[richfaces-svn-commits] JBoss Rich Faces SVN: r1388 - in branches/refactor1: cdk and 354 other directories.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Thu Jun 28 15:44:05 EDT 2007


Author: alexsmirnov
Date: 2007-06-28 15:44:00 -0400 (Thu, 28 Jun 2007)
New Revision: 1388

Added:
   branches/refactor1/cdk/
   branches/refactor1/cdk/generator/
   branches/refactor1/cdk/generator/.svnignore
   branches/refactor1/cdk/generator/pom.xml
   branches/refactor1/cdk/generator/src/
   branches/refactor1/cdk/generator/src/main/
   branches/refactor1/cdk/generator/src/main/java/
   branches/refactor1/cdk/generator/src/main/java/org/
   branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/
   branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/
   branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/ant/
   branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/ant/AntLogger.java
   branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/ant/JSFGeneratorTask.java
   branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/ant/VCPVersionTask.java
   branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/config/
   branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/config/BuilderConfig.java
   branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/config/ComponentBaseBean.java
   branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/config/ComponentBean.java
   branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/config/ConverterBean.java
   branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/config/EventBean.java
   branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/config/JsfBean.java
   branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/config/ListenerBean.java
   branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/config/LoaderHolder.java
   branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/config/ParsingException.java
   branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/config/PropertyBean.java
   branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/config/RendererBean.java
   branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/config/TagBean.java
   branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/config/TagHandlerBean.java
   branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/config/TestClassHolder.java
   branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/config/ValidatorBean.java
   branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/
   branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/AbstractClassStubBuilder.java
   branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/BlankRendererGenerator.java
   branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/ClassPatternSet.java
   branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/ComponentGenerator.java
   branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/ComponentTagGenerator.java
   branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/ComponentTestGenerator.java
   branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/ConverterGenerator.java
   branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/ConverterTagGenerator.java
   branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/FaceletsTaglibGenerator.java
   branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/FacesConfigGenerator.java
   branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/GeneratorException.java
   branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/InnerGenerator.java
   branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/JSFGeneratorConfiguration.java
   branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/ListenerGenerator.java
   branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/Logger.java
   branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/RenderKitBean.java
   branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/RendererCompilationContext.java
   branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/RendererGenerator.java
   branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/ResourcesConfigGenerator.java
   branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/ResourcesConfigGeneratorBean.java
   branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/TagHandlerGenerator.java
   branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/TagTestGenerator.java
   branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/TaglibGenerator.java
   branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/TestDataGenerator.java
   branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/ValidatorGenerator.java
   branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/ValidatorTagGenerator.java
   branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/XMLConfigGenerator.java
   branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/velocity/
   branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/velocity/AntFileResourceLoader.java
   branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/velocity/BuilderContext.java
   branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/velocity/ClasspathTemplateLoader.java
   branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/xml/
   branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/xml/XMLBody.java
   branches/refactor1/cdk/generator/src/main/resources/
   branches/refactor1/cdk/generator/src/main/resources/META-INF/
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/component-config.dtd
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ajax_component_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ajax_dnd_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ajax_output_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ajax_region_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/alt_location_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/content_component_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/display_value_only_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/doc_start.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/draggable_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/dropzone_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ext_ajax_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ext_forceId_attribute.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/extended_command_link_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/extended_data_table_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/header_component_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_anchor_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_button_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_control_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_control_events.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_events.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_form_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_img_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_input_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_input_checkbox_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_input_events.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_input_help_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_input_radio_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_label_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_select_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_style_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_table_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_textarea_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_universal_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/spec_img_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/spec_table_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_command_button_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_command_link_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_data_table_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_input_text_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_input_textarea_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_message_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_messages_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_output_label_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_output_text_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_panel_grid_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_panel_group_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_select_boolean_checkbox_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_select_many_checkbox_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_select_many_listbox_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_select_many_menu_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_select_one_listbox_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_select_one_menu_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_select_one_radio_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_column_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_command_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_component_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_data_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_for_attribute.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_form_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_graphic_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_input_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_message_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_messages_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_output_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_panel_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_parameter_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_select_boolean_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_select_item_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_select_items_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_select_many_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_select_one_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/user_role_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/validator_min_max_attributes.ent
   branches/refactor1/cdk/generator/src/main/resources/META-INF/templates/
   branches/refactor1/cdk/generator/src/main/resources/META-INF/templates/component.vm
   branches/refactor1/cdk/generator/src/main/resources/META-INF/templates/componentTag.vm
   branches/refactor1/cdk/generator/src/main/resources/META-INF/templates/componenttest.vm
   branches/refactor1/cdk/generator/src/main/resources/META-INF/templates/converter.vm
   branches/refactor1/cdk/generator/src/main/resources/META-INF/templates/converterTag.vm
   branches/refactor1/cdk/generator/src/main/resources/META-INF/templates/facelets.taglib.vm
   branches/refactor1/cdk/generator/src/main/resources/META-INF/templates/faces-config.vm
   branches/refactor1/cdk/generator/src/main/resources/META-INF/templates/listener_taghandler.vm
   branches/refactor1/cdk/generator/src/main/resources/META-INF/templates/renderer.vm
   branches/refactor1/cdk/generator/src/main/resources/META-INF/templates/resources-config.vm
   branches/refactor1/cdk/generator/src/main/resources/META-INF/templates/tag.vm
   branches/refactor1/cdk/generator/src/main/resources/META-INF/templates/taghandler.vm
   branches/refactor1/cdk/generator/src/main/resources/META-INF/templates/taglib.vm
   branches/refactor1/cdk/generator/src/main/resources/META-INF/templates/tagtest.vm
   branches/refactor1/cdk/generator/src/main/resources/META-INF/templates/validator.vm
   branches/refactor1/cdk/generator/src/main/resources/META-INF/templates/validatorTag.vm
   branches/refactor1/cdk/generator/src/main/resources/META-INF/templates12/
   branches/refactor1/cdk/generator/src/main/resources/META-INF/templates12/component.vm
   branches/refactor1/cdk/generator/src/main/resources/META-INF/templates12/componentTag.vm
   branches/refactor1/cdk/generator/src/main/resources/META-INF/templates12/componenttest.vm
   branches/refactor1/cdk/generator/src/main/resources/META-INF/templates12/converter.vm
   branches/refactor1/cdk/generator/src/main/resources/META-INF/templates12/converterTag.vm
   branches/refactor1/cdk/generator/src/main/resources/META-INF/templates12/facelets.taglib.vm
   branches/refactor1/cdk/generator/src/main/resources/META-INF/templates12/faces-config.vm
   branches/refactor1/cdk/generator/src/main/resources/META-INF/templates12/listener_taghandler.vm
   branches/refactor1/cdk/generator/src/main/resources/META-INF/templates12/renderer.vm
   branches/refactor1/cdk/generator/src/main/resources/META-INF/templates12/resources-config.vm
   branches/refactor1/cdk/generator/src/main/resources/META-INF/templates12/taghandler.vm
   branches/refactor1/cdk/generator/src/main/resources/META-INF/templates12/taglib.vm
   branches/refactor1/cdk/generator/src/main/resources/META-INF/templates12/tagtest.vm
   branches/refactor1/cdk/generator/src/main/resources/META-INF/templates12/validator.vm
   branches/refactor1/cdk/generator/src/main/resources/META-INF/templates12/validatorTag.vm
   branches/refactor1/cdk/generator/src/main/resources/VM_global_library.vm
   branches/refactor1/cdk/generator/src/main/resources/org/
   branches/refactor1/cdk/generator/src/main/resources/org/ajax4jsf/
   branches/refactor1/cdk/generator/src/main/resources/org/ajax4jsf/builder/
   branches/refactor1/cdk/generator/src/main/resources/org/ajax4jsf/builder/ant/
   branches/refactor1/cdk/generator/src/main/resources/org/ajax4jsf/builder/ant/velocity.properties
   branches/refactor1/cdk/generator/src/site/
   branches/refactor1/cdk/generator/src/site/apt/
   branches/refactor1/cdk/generator/src/site/apt/doc.apt
   branches/refactor1/cdk/generator/src/site/resources/
   branches/refactor1/cdk/generator/src/site/resources/configurationOverview.vsd
   branches/refactor1/cdk/generator/src/site/resources/images/
   branches/refactor1/cdk/generator/src/site/resources/images/configOverview.gif
   branches/refactor1/cdk/generator/src/site/resources/images/exadel_logo.jpg
   branches/refactor1/cdk/generator/src/site/site.xml
   branches/refactor1/cdk/generator/src/test/
   branches/refactor1/cdk/generator/src/test/ant/
   branches/refactor1/cdk/generator/src/test/ant/build.xml
   branches/refactor1/cdk/generator/src/test/config/
   branches/refactor1/cdk/generator/src/test/config/faces-config.ent
   branches/refactor1/cdk/generator/src/test/config/html_universal_attributes.xml
   branches/refactor1/cdk/generator/src/test/config/test.xml
   branches/refactor1/cdk/generator/src/test/config/test2.xml
   branches/refactor1/cdk/generator/src/test/java/
   branches/refactor1/cdk/generator/src/test/java/org/
   branches/refactor1/cdk/generator/src/test/java/org/ajax4jsf/
   branches/refactor1/cdk/generator/src/test/java/org/ajax4jsf/builder/
   branches/refactor1/cdk/generator/src/test/java/org/ajax4jsf/builder/generator/
   branches/refactor1/cdk/generator/src/test/java/org/ajax4jsf/builder/generator/AbstractClass.java
   branches/refactor1/cdk/generator/src/test/java/org/ajax4jsf/builder/generator/AbstractClassStubBuilderTest.java
   branches/refactor1/cdk/generator/src/test/java/org/ajax4jsf/builder/generator/BaseClass.java
   branches/refactor1/cdk/generator/src/test/java/org/ajax4jsf/builder/generator/BaseInterface.java
   branches/refactor1/cdk/generator/src/test/java/org/ajax4jsf/builder/generator/ClassPatternSetTest.java
   branches/refactor1/cdk/generator/src/test/java/org/ajax4jsf/builder/xml/
   branches/refactor1/cdk/generator/src/test/java/org/ajax4jsf/builder/xml/XMLBodyTest.java
   branches/refactor1/cdk/generator/src/test/java/test/
   branches/refactor1/cdk/generator/src/test/java/test/TestComponent.java
   branches/refactor1/cdk/maven-archetype-jsf-component/
   branches/refactor1/cdk/maven-archetype-jsf-component/.svnignore
   branches/refactor1/cdk/maven-archetype-jsf-component/pom.xml
   branches/refactor1/cdk/maven-archetype-jsf-component/src/
   branches/refactor1/cdk/maven-archetype-jsf-component/src/main/
   branches/refactor1/cdk/maven-archetype-jsf-component/src/main/resources/
   branches/refactor1/cdk/maven-archetype-jsf-component/src/main/resources/META-INF/
   branches/refactor1/cdk/maven-archetype-jsf-component/src/main/resources/META-INF/maven/
   branches/refactor1/cdk/maven-archetype-jsf-component/src/main/resources/META-INF/maven/archetype.xml
   branches/refactor1/cdk/maven-archetype-jsf-component/src/main/resources/archetype-resources/
   branches/refactor1/cdk/maven-archetype-jsf-component/src/main/resources/archetype-resources/pom.xml
   branches/refactor1/cdk/maven-archetype-jsf-component/src/main/resources/archetype-resources/src/
   branches/refactor1/cdk/maven-archetype-jsf-component/src/main/resources/archetype-resources/src/main/
   branches/refactor1/cdk/maven-archetype-jsf-component/src/main/resources/archetype-resources/src/main/config/
   branches/refactor1/cdk/maven-archetype-jsf-component/src/main/resources/archetype-resources/src/main/config/component/
   branches/refactor1/cdk/maven-archetype-jsf-component/src/main/resources/archetype-resources/src/main/config/component/README
   branches/refactor1/cdk/maven-archetype-jsf-component/src/main/resources/archetype-resources/src/main/config/component/_compName.xml
   branches/refactor1/cdk/maven-archetype-jsf-component/src/main/resources/archetype-resources/src/main/java/
   branches/refactor1/cdk/maven-archetype-jsf-component/src/main/resources/archetype-resources/src/main/java/component/
   branches/refactor1/cdk/maven-archetype-jsf-component/src/main/resources/archetype-resources/src/main/java/component/README
   branches/refactor1/cdk/maven-archetype-jsf-component/src/main/resources/archetype-resources/src/main/java/component/_CompName.java
   branches/refactor1/cdk/maven-archetype-jsf-component/src/main/resources/archetype-resources/src/main/templates/
   branches/refactor1/cdk/maven-archetype-jsf-component/src/main/resources/archetype-resources/src/main/templates/README
   branches/refactor1/cdk/maven-archetype-jsf-component/src/main/resources/archetype-resources/src/main/templates/_compName.jspx
   branches/refactor1/cdk/maven-archetype-jsf-component/src/main/resources/archetype-resources/src/test/
   branches/refactor1/cdk/maven-archetype-jsf-component/src/main/resources/archetype-resources/src/test/java/
   branches/refactor1/cdk/maven-archetype-jsf-component/src/main/resources/archetype-resources/src/test/java/component/
   branches/refactor1/cdk/maven-archetype-jsf-component/src/main/resources/archetype-resources/src/test/java/component/JSFComponentTest.java
   branches/refactor1/cdk/maven-archetype-jsf-component/src/site/
   branches/refactor1/cdk/maven-archetype-jsf-component/src/site/apt/
   branches/refactor1/cdk/maven-archetype-jsf-component/src/site/apt/index.apt
   branches/refactor1/cdk/maven-archetype-jsf-component/src/site/apt/usage.apt
   branches/refactor1/cdk/maven-archetype-jsf-component/src/site/resources/
   branches/refactor1/cdk/maven-archetype-jsf-component/src/site/resources/images/
   branches/refactor1/cdk/maven-archetype-jsf-component/src/site/resources/images/exadel_logo.jpg
   branches/refactor1/cdk/maven-archetype-jsf-component/src/site/site.xml
   branches/refactor1/cdk/maven-archetype-jsfwebapp/
   branches/refactor1/cdk/maven-archetype-jsfwebapp/.svnignore
   branches/refactor1/cdk/maven-archetype-jsfwebapp/pom.xml
   branches/refactor1/cdk/maven-archetype-jsfwebapp/src/
   branches/refactor1/cdk/maven-archetype-jsfwebapp/src/main/
   branches/refactor1/cdk/maven-archetype-jsfwebapp/src/main/resources/
   branches/refactor1/cdk/maven-archetype-jsfwebapp/src/main/resources/META-INF/
   branches/refactor1/cdk/maven-archetype-jsfwebapp/src/main/resources/META-INF/maven/
   branches/refactor1/cdk/maven-archetype-jsfwebapp/src/main/resources/META-INF/maven/archetype.xml
   branches/refactor1/cdk/maven-archetype-jsfwebapp/src/main/resources/archetype-resources/
   branches/refactor1/cdk/maven-archetype-jsfwebapp/src/main/resources/archetype-resources/pom.xml
   branches/refactor1/cdk/maven-archetype-jsfwebapp/src/main/resources/archetype-resources/src/
   branches/refactor1/cdk/maven-archetype-jsfwebapp/src/main/resources/archetype-resources/src/main/
   branches/refactor1/cdk/maven-archetype-jsfwebapp/src/main/resources/archetype-resources/src/main/java/
   branches/refactor1/cdk/maven-archetype-jsfwebapp/src/main/resources/archetype-resources/src/main/java/Bean.java
   branches/refactor1/cdk/maven-archetype-jsfwebapp/src/main/resources/archetype-resources/src/main/webapp/
   branches/refactor1/cdk/maven-archetype-jsfwebapp/src/main/resources/archetype-resources/src/main/webapp/META-INF/
   branches/refactor1/cdk/maven-archetype-jsfwebapp/src/main/resources/archetype-resources/src/main/webapp/META-INF/MANIFEST.MF
   branches/refactor1/cdk/maven-archetype-jsfwebapp/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/
   branches/refactor1/cdk/maven-archetype-jsfwebapp/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml
   branches/refactor1/cdk/maven-archetype-jsfwebapp/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml.l4t
   branches/refactor1/cdk/maven-archetype-jsfwebapp/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml
   branches/refactor1/cdk/maven-archetype-jsfwebapp/src/main/resources/archetype-resources/src/main/webapp/index.jsp
   branches/refactor1/cdk/maven-archetype-jsfwebapp/src/main/resources/archetype-resources/src/main/webapp/pages/
   branches/refactor1/cdk/maven-archetype-jsfwebapp/src/main/resources/archetype-resources/src/main/webapp/pages/index.jsp
   branches/refactor1/cdk/maven-archetype-jsfwebapp/src/main/resources/archetype-resources/src/main/webapp/pages/index.xhtml
   branches/refactor1/cdk/maven-archetype-jsfwebapp/src/main/resources/archetype-resources/src/test/
   branches/refactor1/cdk/maven-archetype-jsfwebapp/src/main/resources/archetype-resources/src/test/java/
   branches/refactor1/cdk/maven-archetype-jsfwebapp/src/main/resources/archetype-resources/src/test/java/BeanTest.java
   branches/refactor1/cdk/maven-cdk-plugin/
   branches/refactor1/cdk/maven-cdk-plugin/.svnignore
   branches/refactor1/cdk/maven-cdk-plugin/pom.xml
   branches/refactor1/cdk/maven-cdk-plugin/src/
   branches/refactor1/cdk/maven-cdk-plugin/src/main/
   branches/refactor1/cdk/maven-cdk-plugin/src/main/java/
   branches/refactor1/cdk/maven-cdk-plugin/src/main/java/org/
   branches/refactor1/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/
   branches/refactor1/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/
   branches/refactor1/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/maven/
   branches/refactor1/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/maven/MavenCompilationContext.java
   branches/refactor1/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/maven/MavenLogger.java
   branches/refactor1/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/
   branches/refactor1/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/AbstractCDKMojo.java
   branches/refactor1/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/AssemblyLibraryMojo.java
   branches/refactor1/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/CompileMojo.java
   branches/refactor1/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/CreateComponentMojo.java
   branches/refactor1/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/GenerateMojo.java
   branches/refactor1/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/GenerateTestMojo.java
   branches/refactor1/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/Library.java
   branches/refactor1/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/Renderkit.java
   branches/refactor1/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/Taglib.java
   branches/refactor1/cdk/maven-cdk-plugin/src/main/resources/
   branches/refactor1/cdk/maven-cdk-plugin/src/main/resources/VM_global_library.vm
   branches/refactor1/cdk/maven-cdk-plugin/src/main/resources/component/
   branches/refactor1/cdk/maven-cdk-plugin/src/main/resources/component/UIClass.java
   branches/refactor1/cdk/maven-cdk-plugin/src/main/resources/component/config.xml
   branches/refactor1/cdk/maven-cdk-plugin/src/main/resources/component/template.jspx
   branches/refactor1/cdk/maven-cdk-plugin/src/main/resources/templates/
   branches/refactor1/cdk/maven-cdk-plugin/src/main/resources/templates/faces-config.vm
   branches/refactor1/cdk/maven-cdk-plugin/src/main/resources/templates/resources-config.vm
   branches/refactor1/cdk/maven-cdk-plugin/src/main/resources/templates/taglib.vm
   branches/refactor1/cdk/maven-cdk-plugin/src/main/resources/templates/tld.vm
   branches/refactor1/cdk/maven-cdk-plugin/src/main/resources/templates12/
   branches/refactor1/cdk/maven-cdk-plugin/src/main/resources/templates12/faces-config.vm
   branches/refactor1/cdk/maven-cdk-plugin/src/main/resources/templates12/resources-config.vm
   branches/refactor1/cdk/maven-cdk-plugin/src/main/resources/templates12/taglib.vm
   branches/refactor1/cdk/maven-cdk-plugin/src/main/resources/templates12/tld.vm
   branches/refactor1/cdk/maven-cdk-plugin/src/site/
   branches/refactor1/cdk/maven-cdk-plugin/src/site/apt/
   branches/refactor1/cdk/maven-cdk-plugin/src/site/apt/index.apt
   branches/refactor1/cdk/maven-cdk-plugin/src/site/apt/usage.apt
   branches/refactor1/cdk/maven-cdk-plugin/src/site/resources/
   branches/refactor1/cdk/maven-cdk-plugin/src/site/resources/images/
   branches/refactor1/cdk/maven-cdk-plugin/src/site/resources/images/exadel_logo.jpg
   branches/refactor1/cdk/maven-cdk-plugin/src/site/site.xml
   branches/refactor1/docs/ajaxguide/
   branches/refactor1/docs/ajaxguide/CatalogManager.properties
   branches/refactor1/docs/ajaxguide/build.xml
   branches/refactor1/docs/ajaxguide/en/
   branches/refactor1/docs/ajaxguide/en/pom.xml
   branches/refactor1/docs/ajaxguide/en/src/
   branches/refactor1/docs/ajaxguide/en/src/main/
   branches/refactor1/docs/ajaxguide/en/src/main/docbook/
   branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/
   branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/actionparam.desc.xml
   branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/ajaxListener.desc.xml
   branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/ajaxListener.xml
   branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/commandButton.desc.xml
   branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/commandButton.xml
   branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/commandLink.desc.xml
   branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/commandLink.xml
   branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/form.desc.xml
   branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/form.xml
   branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/htmlCommandLink.desc.xml
   branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/htmlCommandLink.xml
   branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/include.desc.xml
   branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/include.xml
   branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/jsFunction.desc.xml
   branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/jsFunction.xml
   branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/keepAlive.desc.xml
   branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/listener.desc.xml
   branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/loadBundle.desc.xml
   branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/loadScript.desc.xml
   branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/loadScript.xml
   branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/loadStyle.desc.xml
   branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/loadStyle.xml
   branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/log.desc.xml
   branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/log.xml
   branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/mediaOutput.desc.xml
   branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/mediaOutput.xml
   branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/outputPanel.desc.xml
   branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/outputPanel.xml
   branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/page.desc.xml
   branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/page.xml
   branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/poll.desc.xml
   branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/poll.xml
   branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/region.desc.xml
   branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/region.xml
   branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/repeat.desc.xml
   branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/repeat.xml
   branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/status.desc.xml
   branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/status.xml
   branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/support.desc.xml
   branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/support.xml
   branches/refactor1/docs/ajaxguide/en/src/main/docbook/master.xml
   branches/refactor1/docs/ajaxguide/en/src/main/docbook/modules/
   branches/refactor1/docs/ajaxguide/en/src/main/docbook/modules/AUGWADParams.xml
   branches/refactor1/docs/ajaxguide/en/src/main/docbook/modules/a4jUGenvsettings.xml
   branches/refactor1/docs/ajaxguide/en/src/main/docbook/modules/a4jUGevcp.xml
   branches/refactor1/docs/ajaxguide/en/src/main/docbook/modules/a4jUGfaq.xml
   branches/refactor1/docs/ajaxguide/en/src/main/docbook/modules/a4jUGideintegration.xml
   branches/refactor1/docs/ajaxguide/en/src/main/docbook/modules/a4jUGintro.xml
   branches/refactor1/docs/ajaxguide/en/src/main/docbook/modules/a4jUGlinks.xml
   branches/refactor1/docs/ajaxguide/en/src/main/docbook/modules/a4jUGskinnability.xml
   branches/refactor1/docs/ajaxguide/en/src/main/docbook/modules/a4jUGstart.xml
   branches/refactor1/docs/ajaxguide/en/src/main/docbook/modules/a4jUGtechreqs.xml
   branches/refactor1/docs/ajaxguide/en/src/main/docbook/modules/a4jUGusingAJAX.xml
   branches/refactor1/docs/ajaxguide/en/src/main/resources/
   branches/refactor1/docs/ajaxguide/en/src/main/resources/css/
   branches/refactor1/docs/ajaxguide/en/src/main/resources/css/html.css
   branches/refactor1/docs/ajaxguide/en/src/main/resources/images/
   branches/refactor1/docs/ajaxguide/en/src/main/resources/images/newpic1.jpg
   branches/refactor1/docs/ajaxguide/en/src/main/resources/images/newpic2.jpg
   branches/refactor1/docs/ajaxguide/en/src/main/resources/images/newpic3.jpg
   branches/refactor1/docs/ajaxguide/en/src/main/resources/images/newpic4.jpg
   branches/refactor1/docs/ajaxguide/pom.xml
   branches/refactor1/docs/maven-docbook-plugin/
   branches/refactor1/docs/maven-docbook-plugin/pom.xml
   branches/refactor1/docs/maven-docbook-plugin/src/
   branches/refactor1/docs/maven-docbook-plugin/src/main/
   branches/refactor1/docs/maven-docbook-plugin/src/main/java/
   branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/
   branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/
   branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/
   branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/
   branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/
   branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/
   branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/AbstractDocBookMojo.java
   branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/Format.java
   branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/GenerationMojo.java
   branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/Options.java
   branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/ResourceMojo.java
   branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/render/
   branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/render/BasicRenderer.java
   branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/render/Formatting.java
   branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/render/HtmlRenderer.java
   branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/render/PdfRenderer.java
   branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/render/Renderer.java
   branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/render/RendererFactory.java
   branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/render/RenderingException.java
   branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/util/
   branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/util/FormatType.java
   branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/util/NoOpWriter.java
   branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/util/ResourceHelper.java
   branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/util/TransformerType.java
   branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/xslt/
   branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/xslt/TransformerFactory.java
   branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/xslt/XSLTException.java
   branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/xslt/catalog/
   branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/xslt/catalog/AbstractCatalogManager.java
   branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/xslt/catalog/ExplicitCatalogManager.java
   branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/xslt/catalog/ImplicitCatalogManager.java
   branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/xslt/resolve/
   branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/xslt/resolve/BasicUrnResolver.java
   branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/xslt/resolve/CurrentVersionResolver.java
   branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/xslt/resolve/ExplicitUrnResolver.java
   branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/xslt/resolve/RelativeJarUriResolver.java
   branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/xslt/resolve/ResolverChain.java
   branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/xslt/resolve/VersionResolver.java
   branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/revdiff/
   branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/revdiff/BaselineHandler.java
   branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/revdiff/ContentItem.java
   branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/revdiff/ContentItemDescriptor.java
   branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/revdiff/Diff.java
   branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/revdiff/DiffCreator.java
   branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/revdiff/GenerationException.java
   branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/revdiff/IndexReportGenerator.java
   branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/revdiff/TranslationDiffReport.java
   branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/revdiff/TranslationHandler.java
   branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/revdiff/TranslationReportGenerator.java
   branches/refactor1/docs/maven-docbook-plugin/src/main/resources/
   branches/refactor1/docs/maven-docbook-plugin/src/main/resources/META-INF/
   branches/refactor1/docs/maven-docbook-plugin/src/main/resources/META-INF/plexus/
   branches/refactor1/docs/maven-docbook-plugin/src/main/resources/META-INF/plexus/components.xml
   branches/refactor1/docs/maven-docbook-plugin/src/main/resources/translation-diff-report.properties
   branches/refactor1/docs/xslt/
   branches/refactor1/docs/xslt/pom.xml
   branches/refactor1/docs/xslt/src/
   branches/refactor1/docs/xslt/src/main/
   branches/refactor1/docs/xslt/src/main/resources/
   branches/refactor1/docs/xslt/src/main/resources/en/
   branches/refactor1/docs/xslt/src/main/resources/en/f.xsl
   branches/refactor1/docs/xslt/src/main/resources/en/fopdf.xsl
   branches/refactor1/docs/xslt/src/main/resources/en/html.css
   branches/refactor1/docs/xslt/src/main/resources/en/html.xsl
   branches/refactor1/docs/xslt/src/main/resources/en/html_chunk.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ChangeLog
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/README
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/calstblx.dtd
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/catalog.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/dbcentx.mod
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/dbgenent.mod
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/dbhierx.mod
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/dbnotnx.mod
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/dbpoolx.mod
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/docbook.cat
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/docbookx.dtd
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-amsa.ent
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-amsb.ent
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-amsc.ent
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-amsn.ent
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-amso.ent
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-amsr.ent
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-box.ent
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-cyr1.ent
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-cyr2.ent
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-dia.ent
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-grk1.ent
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-grk2.ent
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-grk3.ent
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-grk4.ent
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-lat1.ent
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-lat2.ent
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-num.ent
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-pub.ent
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-tech.ent
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/htmltblx.mod
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/soextblx.dtd
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/README
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/VERSION
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/ChangeLog
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/af.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/ar.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/autoidx-ng.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/bg.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/bn.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/ca.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/common.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/cs.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/da.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/de.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/el.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/en.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/es.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/et.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/eu.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/fi.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/fr.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/gentext.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/he.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/hr.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/hu.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/id.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/it.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/ja.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/ko.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/l10n.dtd
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/l10n.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/l10n.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/la.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/labels.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/lt.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/nl.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/nn.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/no.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/pi.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/pl.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/pt.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/pt_br.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/ro.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/ru.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/sk.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/sl.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/sr.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/sr_Latn.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/subtitles.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/sv.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/table.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/targetdatabase.dtd
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/targets.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/th.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/titles.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/tr.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/uk.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/vi.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/xh.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/zh_cn.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/zh_tw.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/ChangeLog
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/admon.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/autoidx-ng.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/autoidx.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/autotoc.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/axf.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/biblio.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/block.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/callout.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/component.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/division.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/docbook.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/docbookng.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/ebnf.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/fo-patch-for-fop.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/fo-rtf.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/fo.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/footnote.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/fop.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/formal.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/glossary.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/graphics.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/htmltbl.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/index.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/info.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/inline.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/keywords.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/lists.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/math.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/pagesetup.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/param.ent
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/param.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/param.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/param.xweb
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/passivetex.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/pdf2index
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/pi.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/profile-docbook.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/qandaset.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/refentry.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/sections.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/synop.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/table.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/task.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/titlepage.templates.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/titlepage.templates.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/titlepage.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/toc.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/verbatim.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/xep.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/xref.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/ChangeLog
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/admon.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/autoidx-ng.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/autoidx.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/autotoc.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/biblio.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/block.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/callout.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/changebars.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/chunk-code.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/chunk-common.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/chunk.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/chunker.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/chunkfast.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/chunktoc.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/component.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/division.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/docbook.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/docbookng.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/ebnf.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/footnote.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/formal.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/glossary.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/graphics.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/html-rtf.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/html.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/htmltbl.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/index.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/info.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/inline.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/keywords.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/lists.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/maketoc.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/manifest.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/math.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/oldchunker.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/onechunk.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/param.ent
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/param.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/param.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/param.xweb
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/pi.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/profile-chunk-code.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/profile-chunk.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/profile-docbook.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/profile-onechunk.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/qandaset.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/refentry.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/sections.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/synop.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/table.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/task.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/titlepage.templates.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/titlepage.templates.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/titlepage.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/toc.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/verbatim.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/xref.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/lib/
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/lib/ChangeLog
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/lib/lib.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/lib/lib.xsl
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/lib/lib.xweb
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/ChangeLog
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/admon.graphics.extension.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/admon.graphics.path.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/admon.graphics.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/admon.style.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/admon.textlabel.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/admonition.properties.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/admonition.title.properties.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/alignment.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/annotate.toc.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/appendix.autolabel.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/arbortext.extensions.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/article.appendix.title.properties.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/author.othername.in.middle.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/autotoc.label.separator.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/axf.extensions.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/base.dir.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/biblioentry.item.separator.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/bibliography.collection.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/bibliography.numbered.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/blockquote.properties.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/body.font.family.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/body.font.master.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/body.font.size.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/body.margin.bottom.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/body.margin.top.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/bridgehead.in.toc.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/callout.defaultcolumn.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/callout.graphics.extension.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/callout.graphics.number.limit.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/callout.graphics.path.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/callout.graphics.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/callout.list.table.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/callout.unicode.font.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/callout.unicode.number.limit.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/callout.unicode.start.character.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/callout.unicode.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/callouts.extension.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/chapter.autolabel.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/chunk.first.sections.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/chunk.quietly.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/chunk.section.depth.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/chunk.sections.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/chunk.toc.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/chunk.tocs.and.lots.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/chunker.output.cdata-section-elements.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/chunker.output.doctype-public.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/chunker.output.doctype-system.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/chunker.output.encoding.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/chunker.output.indent.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/chunker.output.media-type.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/chunker.output.method.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/chunker.output.omit-xml-declaration.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/chunker.output.standalone.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/citerefentry.link.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/collect.xref.targets.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/column.count.back.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/column.count.body.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/column.count.front.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/column.count.index.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/column.count.lot.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/column.count.titlepage.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/column.gap.back.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/column.gap.body.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/column.gap.front.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/column.gap.index.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/column.gap.lot.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/column.gap.titlepage.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/compact.list.item.spacing.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/css.decoration.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/current.docid.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/default.float.class.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/default.image.width.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/default.table.width.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/default.units.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/dingbat.font.family.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/double.sided.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/draft.mode.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/draft.watermark.image.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/ebnf.assignment.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/ebnf.statement.terminator.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/ebnf.table.bgcolor.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/ebnf.table.border.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/eclipse.autolabel.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/eclipse.plugin.id.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/eclipse.plugin.name.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/eclipse.plugin.provider.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/emphasis.propagates.style.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/entry.propagates.style.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/equation.properties.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/example.properties.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/figure.properties.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/firstterm.only.link.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/footer.column.widths.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/footer.content.properties.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/footer.rule.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/footers.on.blank.pages.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/footnote.font.size.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/footnote.number.format.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/footnote.number.symbols.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/fop.extensions.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/formal.object.properties.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/formal.procedures.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/formal.title.placement.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/formal.title.properties.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/funcsynopsis.decoration.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/funcsynopsis.style.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/funcsynopsis.tabular.threshold.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/function.parens.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/generate.id.attributes.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/generate.index.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/generate.legalnotice.link.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/generate.manifest.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/generate.meta.abstract.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/generate.section.toc.level.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/generate.toc.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/glossary.as.blocks.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/glossary.collection.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/glossentry.show.acronym.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/glosslist.as.blocks.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/glossterm.auto.link.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/glossterm.separation.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/glossterm.width.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/graphic.default.extension.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/graphicsize.extension.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/header.column.widths.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/header.content.properties.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/header.rule.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/headers.on.blank.pages.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/html.base.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/html.cellpadding.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/html.cellspacing.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/html.cleanup.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/html.ext.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/html.extra.head.links.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/html.longdesc.link.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/html.longdesc.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/html.stylesheet.type.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/html.stylesheet.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.alias.file.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.autolabel.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.back.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.forward.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.hideshow.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.home.url.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.home.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.jump1.title.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.jump1.url.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.jump1.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.jump2.title.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.jump2.url.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.jump2.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.locate.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.next.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.options.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.prev.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.print.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.refresh.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.stop.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.zoom.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.chm.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.default.topic.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.display.progress.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.encoding.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.enhanced.decompilation.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.enumerate.images.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.force.map.and.alias.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.hhc.binary.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.hhc.folders.instead.books.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.hhc.section.depth.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.hhc.show.root.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.hhc.width.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.hhc.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.hhk.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.hhp.tail.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.hhp.window.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.hhp.windows.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.hhp.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.map.file.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.only.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.remember.window.position.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.show.advanced.search.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.show.favorities.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.show.menu.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.show.toolbar.text.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.title.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.use.hhk.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.window.geometry.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/hyphenate.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/ignore.image.scaling.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/index.preferred.page.properties.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/informal.object.properties.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/inherit.keywords.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/insert.xref.page.number.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/l10n.gentext.default.language.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/l10n.gentext.language.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/l10n.gentext.use.xref.language.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/label.from.part.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/line-height.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/linenumbering.everyNth.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/linenumbering.extension.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/linenumbering.separator.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/linenumbering.width.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/link.mailto.url.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/list.block.spacing.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/list.item.spacing.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/make.graphic.viewport.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/make.index.markup.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/make.single.year.ranges.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/make.valid.html.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/make.year.ranges.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/manifest.in.base.dir.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/manifest.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/manual.toc.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/marker.section.level.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/menuchoice.menu.separator.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/menuchoice.separator.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/monospace.font.family.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/monospace.properties.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/monospace.verbatim.properties.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/navig.graphics.extension.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/navig.graphics.path.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/navig.graphics.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/navig.showtitles.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/nominal.image.depth.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/nominal.image.width.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/nominal.table.width.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/normal.para.spacing.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/olink.base.uri.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/olink.doctitle.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/olink.fragid.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/olink.outline.ext.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/olink.pubid.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/olink.resolver.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/olink.sysid.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/page.height.portrait.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/page.height.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/page.margin.bottom.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/page.margin.inner.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/page.margin.outer.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/page.margin.top.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/page.orientation.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/page.width.portrait.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/page.width.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/paper.type.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/para.propagates.style.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/part.autolabel.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/passivetex.extensions.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/phrase.propagates.style.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/pixels.per.inch.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/points.per.em.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/preface.autolabel.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/preferred.mediaobject.role.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/procedure.properties.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/process.empty.source.toc.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/process.source.toc.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/profile.arch.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/profile.attribute.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/profile.condition.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/profile.conformance.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/profile.lang.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/profile.os.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/profile.revision.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/profile.revisionflag.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/profile.role.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/profile.security.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/profile.separator.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/profile.userlevel.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/profile.value.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/profile.vendor.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/punct.honorific.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/qanda.defaultlabel.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/qanda.inherit.numeration.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/qanda.title.level1.properties.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/qanda.title.level2.properties.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/qanda.title.level3.properties.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/qanda.title.level4.properties.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/qanda.title.level5.properties.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/qanda.title.level6.properties.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/qanda.title.properties.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/qandadiv.autolabel.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/refentry.generate.name.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/refentry.generate.title.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/refentry.pagebreak.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/refentry.separator.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/refentry.title.properties.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/refentry.xref.manvolnum.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/region.after.extent.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/region.before.extent.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/root.filename.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/root.properties.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/rootid.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/runinhead.default.title.end.punct.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/runinhead.title.end.punct.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/sans.font.family.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/saxon.callouts.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/saxon.character.representation.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/saxon.linenumbering.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/saxon.tablecolumns.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/section.autolabel.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/section.label.includes.component.label.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/section.level1.properties.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/section.level2.properties.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/section.level3.properties.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/section.level4.properties.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/section.level5.properties.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/section.level6.properties.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/section.properties.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/section.title.level1.properties.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/section.title.level2.properties.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/section.title.level3.properties.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/section.title.level4.properties.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/section.title.level5.properties.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/section.title.level6.properties.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/section.title.properties.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/segmentedlist.as.table.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/shade.verbatim.style.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/shade.verbatim.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/show.comments.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/show.revisionflag.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/sidebar.properties.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/spacing.paras.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/subscript.properties.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/superscript.properties.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/suppress.footer.navigation.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/suppress.header.navigation.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/suppress.navigation.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/symbol.font.family.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/table.borders.with.css.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/table.cell.border.color.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/table.cell.border.style.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/table.cell.border.thickness.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/table.cell.padding.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/table.entry.padding.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/table.footnote.number.format.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/table.footnote.number.symbols.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/table.frame.border.color.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/table.frame.border.style.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/table.frame.border.thickness.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/table.properties.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/table.table.properties.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/tablecolumns.extension.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/target.database.document.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/targets.filename.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/template.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/tex.math.delims.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/tex.math.file.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/tex.math.in.alt.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/textinsert.extension.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/title.font.family.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/title.margin.left.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/toc.indent.width.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/toc.list.type.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/toc.margin.properties.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/toc.max.depth.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/toc.section.depth.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/ulink.footnote.number.format.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/ulink.footnotes.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/ulink.hyphenate.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/ulink.show.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/ulink.target.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/use.embed.for.svg.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/use.extensions.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/use.id.as.filename.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/use.id.function.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/use.local.olink.style.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/use.role.as.xrefstyle.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/use.role.for.mediaobject.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/use.svg.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/variablelist.as.blocks.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/variablelist.as.table.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/variablelist.max.termlength.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/verbatim.properties.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/xep.extensions.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/xep.index.item.properties.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/xref.label-page.separator.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/xref.label-title.separator.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/xref.properties.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/xref.title-page.separator.xml
   branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/xref.with.number.and.title.xml
   branches/refactor1/docs/xslt/support.properties
   branches/refactor1/docs/xslt/support.xml
   branches/refactor1/docs/xslt/support/
   branches/refactor1/docs/xslt/support/lib/
   branches/refactor1/docs/xslt/support/lib/avalon-framework-cvs-20020806.jar
   branches/refactor1/docs/xslt/support/lib/batik.jar
   branches/refactor1/docs/xslt/support/lib/fop.jar
   branches/refactor1/docs/xslt/support/lib/jai_codec.jar
   branches/refactor1/docs/xslt/support/lib/jai_core.jar
   branches/refactor1/docs/xslt/support/lib/rowan-0.1.jar
   branches/refactor1/docs/xslt/support/lib/saxon-dbxsl-extensions.jar
   branches/refactor1/docs/xslt/support/lib/saxon.jar
   branches/refactor1/extensions/
   branches/refactor1/extensions/gwt/
   branches/refactor1/extensions/gwt/.svnignore
   branches/refactor1/extensions/gwt/pom.xml
   branches/refactor1/extensions/gwt/src/
   branches/refactor1/extensions/gwt/src/main/
   branches/refactor1/extensions/gwt/src/main/java/
   branches/refactor1/extensions/gwt/src/main/java/org/
   branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/
   branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/
   branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/
   branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/ComponentEntryPoint.java
   branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/GwtFacesEvent.java
   branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/GwtFacesException.java
   branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/GwtFacesResult.java
   branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/GwtFacesService.java
   branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/GwtFacesServiceAsync.java
   branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/Parameters.java
   branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/messages/
   branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/messages/MessageBundle.java
   branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/ui/
   branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/ui/ElementNotFoundException.java
   branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/ui/FacetPanel.java
   branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/ui/InputHidden.java
   branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/ui/InputWidget.java
   branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/ui/JSFButton.java
   branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/ui/JSFHiddenSubmit.java
   branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/ui/JSFHyperLink.java
   branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/ui/JSFImage.java
   branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/
   branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/BaseWidgetTag.java
   branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/GwtActionEvent.java
   branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/GwtActionsRule.java
   branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/GwtCallListener.java
   branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/GwtComponent.java
   branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/GwtComponentHandler.java
   branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/GwtEvent.java
   branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/GwtListener.java
   branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/GwtListenerHandler.java
   branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/GwtListenerHelper.java
   branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/GwtListenerMethodHelper.java
   branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/GwtListenerServiceHelper.java
   branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/GwtPhaseListener.java
   branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/GwtSource.java
   branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/GwtUtils.java
   branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/PageRenderer.java
   branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/PageTag.java
   branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/UIPage.java
   branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/UIWidget.java
   branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/WidgetRenderer.java
   branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/WidgetWithFacetsRenderer.java
   branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/server/
   branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/server/GwtFacesServlet.java
   branches/refactor1/extensions/gwt/src/main/resources/
   branches/refactor1/extensions/gwt/src/main/resources/META-INF/
   branches/refactor1/extensions/gwt/src/main/resources/META-INF/faces-config.xml
   branches/refactor1/extensions/gwt/src/main/resources/META-INF/faces-config.xml.l4t
   branches/refactor1/extensions/gwt/src/main/resources/META-INF/gwt.taglib.xml
   branches/refactor1/extensions/gwt/src/main/resources/META-INF/gwt.tld
   branches/refactor1/extensions/gwt/src/main/resources/META-INF/gwt/
   branches/refactor1/extensions/gwt/src/main/resources/META-INF/gwt/history.html
   branches/refactor1/extensions/gwt/src/main/resources/META-INF/valid.xml
   branches/refactor1/extensions/gwt/src/main/resources/org/
   branches/refactor1/extensions/gwt/src/main/resources/org/ajax4jsf/
   branches/refactor1/extensions/gwt/src/main/resources/org/ajax4jsf/gwt/
   branches/refactor1/extensions/gwt/src/main/resources/org/ajax4jsf/gwt/JUnit.gwt.xml
   branches/refactor1/extensions/gwt/src/main/resources/org/ajax4jsf/gwt/Jsf.gwt.xml
   branches/refactor1/extensions/gwt/src/test/
   branches/refactor1/extensions/gwt/src/test/java/
   branches/refactor1/extensions/gwt/src/test/java/org/
   branches/refactor1/extensions/gwt/src/test/java/org/ajax4jsf/
   branches/refactor1/extensions/gwt/src/test/java/org/ajax4jsf/gwt/
   branches/refactor1/extensions/gwt/src/test/java/org/ajax4jsf/gwt/TestCase.gwt.xml
   branches/refactor1/extensions/gwt/src/test/java/org/ajax4jsf/gwt/client/
   branches/refactor1/extensions/gwt/src/test/java/org/ajax4jsf/gwt/client/EntryPointTestCase.java
   branches/refactor1/extensions/portlet/
   branches/refactor1/extensions/portlet/pom.xml
   branches/refactor1/extensions/portlet/src/
   branches/refactor1/extensions/portlet/src/main/
   branches/refactor1/extensions/portlet/src/main/config/
   branches/refactor1/extensions/portlet/src/main/config/component/
   branches/refactor1/extensions/portlet/src/main/java/
   branches/refactor1/extensions/portlet/src/main/java/META-INF/
   branches/refactor1/extensions/portlet/src/main/java/META-INF/MANIFEST.MF
   branches/refactor1/extensions/portlet/src/main/java/org/
   branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/
   branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/
   branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/AjaxFacesPortlet.java
   branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/PortletAjaxContext.java
   branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/PortletRequestWrapper.java
   branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/application/
   branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/application/ComponentsLoader.java
   branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/application/ComponentsLoaderImpl.java
   branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/application/FaceletPortletViewHandler.java
   branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/application/PortalStateManager.java
   branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/application/PortletStateHolder.java
   branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/application/PortletViewHandler.java
   branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/application/PortletViewState.java
   branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/application/PortletWindowStates.java
   branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/application/package.html
   branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/component/
   branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/component/package.html
   branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/
   branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/AbstractExternalContext.java
   branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/ContextAttributesMap.java
   branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/ContextConcatentedMap.java
   branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/ContextMap.java
   branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/ELContextImpl.java
   branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/EnumerationIterator.java
   branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/FacesContextFactoryImpl.java
   branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/FacesContextImpl.java
   branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/FacesContextWrapper.java
   branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/PortletContextImpl.java
   branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/ServletContextImpl.java
   branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/ServletSessionWrapper.java
   branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/SessionAttributesNames.java
   branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/lifecycle/
   branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/lifecycle/PortletLifecycle.java
   branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/lifecycle/PortletLifecycleFactory.java
   branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/lifecycle/package.html
   branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/package.html
   branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/renderkit/
   branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/renderkit/package.html
   branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/renderkit/portlet/
   branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/renderkit/portlet/PortletAjaxViewRootRenderer.java
   branches/refactor1/extensions/portlet/src/main/resources/
   branches/refactor1/extensions/portlet/src/main/resources/META-INF/
   branches/refactor1/extensions/portlet/src/main/resources/META-INF/faces-config.xml
   branches/refactor1/extensions/portlet/src/main/resources/META-INF/faces-config.xml.l4t
   branches/refactor1/extensions/portlet/src/test/
   branches/refactor1/extensions/portlet/src/test/java/
   branches/refactor1/extensions/portlet/src/test/java/org/
   branches/refactor1/extensions/portlet/src/test/java/org/ajax4jsf/
   branches/refactor1/extensions/portlet/src/test/java/org/ajax4jsf/PortletTest.java
   branches/refactor1/extensions/portlet/src/test/java/org/ajax4jsf/portlet/
   branches/refactor1/extensions/portlet/src/test/java/org/ajax4jsf/portlet/AbstractAjax4jsfPortletTestCase.java
   branches/refactor1/extensions/portlet/src/test/java/org/ajax4jsf/portlet/MockActionRequest.java
   branches/refactor1/extensions/portlet/src/test/java/org/ajax4jsf/portlet/MockActionResponse.java
   branches/refactor1/extensions/portlet/src/test/java/org/ajax4jsf/portlet/MockPortletContext.java
   branches/refactor1/extensions/portlet/src/test/java/org/ajax4jsf/portlet/MockPortletRequest.java
   branches/refactor1/extensions/portlet/src/test/java/org/ajax4jsf/portlet/MockPortletResponse.java
   branches/refactor1/extensions/portlet/src/test/java/org/ajax4jsf/portlet/MockRenderRequest.java
   branches/refactor1/extensions/portlet/src/test/java/org/ajax4jsf/portlet/MockRenderResponse.java
   branches/refactor1/extensions/portlet/src/test/java/org/ajax4jsf/portlet/application/
   branches/refactor1/extensions/portlet/src/test/java/org/ajax4jsf/portlet/application/ComponensLoaderTestCase.java
   branches/refactor1/extensions/portlet/src/test/java/org/ajax4jsf/portlet/application/PortletViewStateTestCase.java
   branches/refactor1/extensions/portlet/src/test/java/org/ajax4jsf/portlet/context/
   branches/refactor1/extensions/portlet/src/test/java/org/ajax4jsf/portlet/context/ContextAttributesMapTest.java
   branches/refactor1/extensions/portlet/src/test/java/org/ajax4jsf/portlet/context/ContextFactoryTest.java
   branches/refactor1/extensions/portlet/src/test/java/org/ajax4jsf/portlet/context/FacesContextImplTest.java
   branches/refactor1/extensions/portlet/src/test/java/org/ajax4jsf/portlet/context/PortletExternalContextTest.java
   branches/refactor1/extensions/seam/
   branches/refactor1/extensions/seam/.svnignore
   branches/refactor1/extensions/seam/pom.xml
   branches/refactor1/extensions/seam/src/
   branches/refactor1/extensions/seam/src/main/
   branches/refactor1/extensions/seam/src/main/java/
   branches/refactor1/extensions/seam/src/main/java/org/
   branches/refactor1/extensions/seam/src/main/java/org/ajax4jsf/
   branches/refactor1/extensions/seam/src/main/java/org/ajax4jsf/framework/
   branches/refactor1/extensions/seam/src/main/java/org/ajax4jsf/framework/resource/
   branches/refactor1/extensions/seam/src/main/java/org/ajax4jsf/framework/resource/SeamResourceLifecycle.java
   branches/refactor1/extensions/seam/src/test/
   branches/refactor1/extensions/seam/src/test/java/
   branches/refactor1/extensions/seam/src/test/java/org/
   branches/refactor1/extensions/seam/src/test/java/org/ajax4jsf/
   branches/refactor1/extensions/seam/src/test/java/org/ajax4jsf/AppTest.java
   branches/refactor1/extensions/trinidad/
   branches/refactor1/extensions/trinidad/.svnignore
   branches/refactor1/extensions/trinidad/pom.xml
   branches/refactor1/extensions/trinidad/src/
   branches/refactor1/extensions/trinidad/src/main/
   branches/refactor1/extensions/trinidad/src/main/java/
   branches/refactor1/extensions/trinidad/src/main/java/org/
   branches/refactor1/extensions/trinidad/src/main/java/org/ajax4jsf/
   branches/refactor1/extensions/trinidad/src/main/java/org/ajax4jsf/framework/
   branches/refactor1/extensions/trinidad/src/main/java/org/ajax4jsf/framework/ajax/
   branches/refactor1/extensions/trinidad/src/main/java/org/ajax4jsf/framework/ajax/TrinidadAjaxContext.java
   branches/refactor1/extensions/trinidad/src/main/resources/
   branches/refactor1/extensions/trinidad/src/main/resources/META-INF/
   branches/refactor1/extensions/trinidad/src/main/resources/META-INF/MANIFEST.MF
   branches/refactor1/extensions/trinidad/src/main/resources/META-INF/services/
   branches/refactor1/extensions/trinidad/src/main/resources/META-INF/services/org.ajax4jsf.framework.ajax.AjaxContext
   branches/refactor1/extensions/trinidad/src/test/
   branches/refactor1/extensions/trinidad/src/test/java/
   branches/refactor1/extensions/trinidad/src/test/java/org/
   branches/refactor1/extensions/trinidad/src/test/java/org/ajax4jsf/
   branches/refactor1/extensions/trinidad/src/test/java/org/ajax4jsf/AppTest.java
   branches/refactor1/framework/
   branches/refactor1/framework/api/
   branches/refactor1/framework/api/pom.xml
   branches/refactor1/framework/api/src/
   branches/refactor1/framework/api/src/main/
   branches/refactor1/framework/api/src/main/java/
   branches/refactor1/framework/impl/
   branches/refactor1/framework/impl/.svnignore
   branches/refactor1/framework/impl/generatescript.xml
   branches/refactor1/framework/impl/pom.xml
   branches/refactor1/framework/impl/src/
   branches/refactor1/framework/impl/src/main/
   branches/refactor1/framework/impl/src/main/config/
   branches/refactor1/framework/impl/src/main/config/component/
   branches/refactor1/framework/impl/src/main/config/component/actionParameter.xml
   branches/refactor1/framework/impl/src/main/config/component/commandButton.xml
   branches/refactor1/framework/impl/src/main/config/component/commandLink.xml
   branches/refactor1/framework/impl/src/main/config/component/form.xml
   branches/refactor1/framework/impl/src/main/config/component/function.xml
   branches/refactor1/framework/impl/src/main/config/component/include.xml
   branches/refactor1/framework/impl/src/main/config/component/loadBundle.xml
   branches/refactor1/framework/impl/src/main/config/component/loadScript.xml
   branches/refactor1/framework/impl/src/main/config/component/loadStyle.xml
   branches/refactor1/framework/impl/src/main/config/component/log.xml
   branches/refactor1/framework/impl/src/main/config/component/mediaOutput.xml
   branches/refactor1/framework/impl/src/main/config/component/outputPanel.xml
   branches/refactor1/framework/impl/src/main/config/component/page.xml
   branches/refactor1/framework/impl/src/main/config/component/poll.xml
   branches/refactor1/framework/impl/src/main/config/component/portlet.xml
   branches/refactor1/framework/impl/src/main/config/component/push.xml
   branches/refactor1/framework/impl/src/main/config/component/region.xml
   branches/refactor1/framework/impl/src/main/config/component/repeat.xml
   branches/refactor1/framework/impl/src/main/config/component/status.xml
   branches/refactor1/framework/impl/src/main/config/component/support.xml
   branches/refactor1/framework/impl/src/main/config/faces/
   branches/refactor1/framework/impl/src/main/config/faces/original-faces-config.xml
   branches/refactor1/framework/impl/src/main/config/faces/original-faces-config.xml.l4t
   branches/refactor1/framework/impl/src/main/config/resources/
   branches/refactor1/framework/impl/src/main/config/resources/resources-config.xml
   branches/refactor1/framework/impl/src/main/config/taglib/
   branches/refactor1/framework/impl/src/main/config/taglib/ajax.taglib.include
   branches/refactor1/framework/impl/src/main/config/taglib/ajax.tld.include
   branches/refactor1/framework/impl/src/main/java/
   branches/refactor1/framework/impl/src/main/java/META-INF/
   branches/refactor1/framework/impl/src/main/java/META-INF/MANIFEST.MF
   branches/refactor1/framework/impl/src/main/java/org/
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/FastFilter.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/Filter.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/ForceRender.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/PushEventListener.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/PushEventsCounter.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/ResourceBundleMap.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/UIActionParameter.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/UIAjaxCommandButton.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/UIAjaxCommandLink.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/UIAjaxForm.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/UIAjaxFunction.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/UIAjaxLog.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/UIAjaxOutputPanel.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/UIAjaxRegion.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/UIAjaxStatus.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/UIAjaxSupport.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/UIInclude.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/UILoadBundle.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/UIPoll.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/UIPortlet.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/UIPush.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/UIResource.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/AjaxDataEncoder.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/DataComponentState.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/DataVisitor.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/ExtendedDataModel.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/Range.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/RepeatState.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/SequenceDataModel.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/SequenceRange.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/SerializableDataModel.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/UIDataAdaptor.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/UIRepeat.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/UISelector.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/dataClasses.png
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/package.html
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/resource/
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/resource/ResourceComponent.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/resource/UIMediaOutput.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/cache/
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/cache/Cache.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/cache/CacheConfigurationLoader.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/cache/CacheEntry.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/cache/CacheException.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/cache/CacheFactory.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/cache/CacheListener.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/cache/CacheLoader.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/cache/CacheManager.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/cache/LRUMapCache.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/cache/LRUMapCacheFactory.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/cache/OSCacheCache.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/cache/OSCacheCacheFactory.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/cache/ServletContextInitMap.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/dnd/
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/dnd/DnDScript.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/dnd/Draggable.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/dnd/Dropzone.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/dnd/event/
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/dnd/event/DragEvent.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/dnd/event/DragListener.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/dnd/event/DropEvent.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/dnd/event/DropListener.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/dnd/event/DropListenerBinding.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/dnd/event/DropSource.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/dnd/taglib/
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/dnd/taglib/DropSourceMetaRule.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/DebugLifecycle.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/DebugLifecycleFactory.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/DebugOutputMaker.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/FacesErrorStateHolder.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ViewHandlerWrapper.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxActionComponent.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxActionEvent.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxChildrenEncoder.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxComponent.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxContainer.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxContainerBase.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxContext.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxEvent.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxInputComponent.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxListener.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxListenerHelper.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxOutput.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxRegionBrige.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxRenderEvent.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxRenderListener.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxScript.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxSingleEvent.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxSingleException.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxSource.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxStateManager.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxSupport.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxValidationActionEvent.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxViewHandler.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxViewRoot.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/ComponentInvoker.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/EventValueBinding.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/ImageCacheScript.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/InitPhaseListener.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/InvokerCallback.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/JavaScriptParameter.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/JsfOneOneInvoker.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/ViewIdHolder.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/package.html
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/BaseFilter.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/BaseXMLFilter.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/CacheContent.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/FilterServletResponseWrapper.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/HtmlParser.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/Log4JConfigurator.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/NekkoFilter.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/PollEventsManager.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/ServletStreamWriter.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/TidyFilter.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/XMLResponseWriterState.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/nekko/
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/nekko/HtmlCorrectionFilter.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/nekko/HtmlCorrectionState.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/nekko/NekkoParser.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/nekko/NekkoXMLFilter.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/tidy/
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/tidy/TidyParser.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/tidy/TidyXMLFilter.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/AJAXDataSerializer.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/AjaxChildrenRenderer.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/AjaxComponentRendererBase.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/AjaxContainerRenderer.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/AjaxPhaseListener.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/AjaxRendererUtils.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/AjaxViewRootRenderer.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/ChameleonRenderKit.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/ChameleonRenderKitFactory.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/ChameleonRenderKitImpl.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/ChameleonRenderer.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/ComponentRendererBase.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/ComponentUtils.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/ComponentVariables.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/ComponentsVariableResolver.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/HeaderResourceProducer.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/HeaderResourcesRendererBase.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/JSONDataSerializer.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/PrototypeBasedRendererBase.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/RendererBase.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/RendererUtils.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/AttributeElement.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/BreakException.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/BreakPoint.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/ChildElement.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/ChildrensElement.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/ClassElement.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/ElementBase.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/FacetElement.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/HtmlCompiler.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/IfElement.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/MethodCallElement.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/MethodParameterElement.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/PlainElement.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/PlainElementCreateRule.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/PreparedTemplate.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/PutAttributesRule.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/ResourceElement.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/RootElement.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/SelectorElement.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/TemplateContext.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/TextElement.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/ValueMethodCallElement.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/WithDefaultsRulesWrapper.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/package.html
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/BaseResourceRenderer.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/CacheKey.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/CachedResourceContext.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/ClientScript.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/FacesResourceContext.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/GifRenderer.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/HTMLRenderer.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/ImageRenderer.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/InternetResource.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/InternetResourceBase.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/InternetResourceBuilder.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/InternetResourceService.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/JarResource.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/Java2Dresource.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/JpegRenderer.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/LogfileRenderer.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/MimeRenderer.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/OneTimeRenderer.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/Png8Renderer.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/PngRenderer.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/PrototypeScript.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/ResourceBuilderImpl.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/ResourceContext.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/ResourceLifecycle.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/ResourceNotFoundException.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/ResourceProduser.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/ResourceRenderer.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/ScriptRenderer.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/ServletResourceContext.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/SmartPositionScript.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/StaticResource.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/StyleRenderer.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/TemplateCSSRenderer.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/TemplateCSSResource.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/UserResource.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/cached/
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/cached/CachedResourceBuilder.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/cached/DualLRUMap.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/cached/ResourceBean.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/cached/ResourceBytesDataBean.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/cached/ResourceDataBean.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/cached/cache.properties
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/package.html
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/skin/
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/skin/DummySkinConfiguration.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/skin/Skin.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/skin/SkinBean.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/skin/SkinConfiguration.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/skin/SkinFactory.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/skin/SkinFactoryImpl.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/skin/SkinImpl.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/skin/SkinNotFoundException.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/skin/SkinPropertyResolver.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/skin/SkinVariableResolver.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/skin/VersionBean.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/skin/package.html
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/taglib/
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/taglib/HtmlComponentTagBase.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/taglib/SimpleActionMethodBinding.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/taglib/UIComponentBodyTagBase.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/taglib/UIComponentTagBase.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/GifEncoder.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/HtmlColor.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/HtmlDimensions.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/InputUtils.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/SelectUtils.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/ServicesUtils.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/base64/
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/base64/Base64.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/base64/BinaryDecoder.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/base64/BinaryEncoder.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/base64/Codec.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/base64/Decoder.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/base64/DecoderException.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/base64/Encoder.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/base64/EncoderException.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/base64/URL64Codec.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/base64/URLCodec.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/command/
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/command/CommandScript.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/command/CommandScriptBuilder.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/config/
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/config/FilterBean.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/config/ServletBean.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/config/WebXml.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/DiffusionFilterOp.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/GIFEncoder.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/ImageFilterOp.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/ImageGenerator.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/ImageInfo.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/ImageWaiter.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/ImageWrapper.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/IndexImage.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/Quantize.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/RoundGradientContext.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/RoundGradientPaint.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/SimpleGIFEncoder.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/imageio/
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/imageio/ImageIOGenerator.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/imageio/gif/
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/imageio/gif/GIFImageWriteParam.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/imageio/gif/GIFImageWriter.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/imageio/gif/GIFImageWriterSpi.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/javascript/
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/javascript/AjaxSubmitFunction.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/javascript/JSEncoder.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/javascript/JSFunction.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/javascript/JSFunctionDefinition.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/javascript/JSMin.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/javascript/JSObject.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/javascript/JSReference.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/javascript/ScriptString.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/javascript/ScriptStringBase.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/javascript/ScriptUtils.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/message/
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/message/Messages.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/style/
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/style/CSSFormat.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/style/CSSSelector.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/style/FontFamily.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/ByteBuffer.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/CharBuffer.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/FastBufferInputStream.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/FastBufferOutputStream.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/FastBufferReader.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/FastBufferWriter.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/Test.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/parser/
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/parser/AnyCharState.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/parser/BlankState.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/parser/BufferedAnyCharState.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/parser/BufferedBlankState.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/parser/BufferedSingleCharState.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/parser/BufferedStringState.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/parser/FastHtmlParser.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/parser/KeywordCharState.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/parser/KeywordState.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/parser/ParserState.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/parser/ParsingContext.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/parser/ParsingStateManager.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/parser/SingleCharState.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/parser/StringState.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/parser/XmlIdentifierState.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/Anchor.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/AttVal.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/AttrCheck.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/AttrCheckImpl.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/Attribute.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/AttributeTable.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/Clean.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/Configuration.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/DOMAttrImpl.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/DOMAttrMapImpl.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/DOMCDATASectionImpl.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/DOMCharacterDataImpl.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/DOMCommentImpl.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/DOMDocumentImpl.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/DOMDocumentTypeImpl.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/DOMElementImpl.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/DOMNodeImpl.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/DOMNodeListByTagNameImpl.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/DOMNodeListImpl.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/DOMProcessingInstructionImpl.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/DOMTextImpl.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/Dict.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/EncodingNameMapper.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/EncodingUtils.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/Entity.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/EntityTable.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/IStack.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/Lexer.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/Node.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/Out.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/OutFactory.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/OutImpl.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/OutJavaImpl.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/PPrint.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/ParseProperty.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/ParsePropertyImpl.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/Parser.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/ParserImpl.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/Report.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/StreamIn.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/StreamInFactory.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/StreamInImpl.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/StreamInJavaImpl.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/Style.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/StyleProp.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/TagCheck.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/TagCheckImpl.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/TagTable.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/Tidy.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/TidyBeanInfo.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/TidyLexerListener.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/TidyMessage.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/TidyMessageListener.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/TidyUtils.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/ValidUTF8Sequence.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/renderkit/
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/renderkit/AjaxCommandRendererBase.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/renderkit/AjaxFunctionRendererBase.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/renderkit/LoadResourceRendererBase.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/renderkit/html/
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/renderkit/html/AjaxFormRenderer.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/renderkit/html/AjaxIncludeRenderer.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/renderkit/html/AjaxOutputPanelRenderer.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/renderkit/html/AjaxPageRenderer.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/renderkit/html/AjaxPollRenderer.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/renderkit/html/AjaxPushRenderer.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/renderkit/html/AjaxRegionRenderer.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/renderkit/html/AjaxStatusRenderer.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/renderkit/html/AjaxSupportRenderer.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/renderkit/html/HtmlCommandLinkRenderer.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/renderkit/html/MediaOutputRenderer.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/renderkit/html/RepeatRenderer.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/facelets/
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/facelets/ActionParamHandler.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/facelets/AjaxActionsRule.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/facelets/AjaxComponentHandler.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/facelets/AjaxListenerHandler.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/facelets/AjaxReRendrRule.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/facelets/AjaxSupportHandler.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/facelets/FacetHandler.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/facelets/IncludeFaceletContext.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/facelets/IncludeHandler.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/facelets/KeepAliveHandler.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/facelets/MediaOutputHandler.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/jsp/
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/jsp/ActionParamTag.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/jsp/AjaxFormTag.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/jsp/AjaxListenerTag.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/jsp/AjaxPageTag.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/jsp/AjaxRegionTag.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/jsp/AjaxStatusTag.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/jsp/AjaxSupportTag.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/jsp/IncludeTag.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/jsp/KeepAliveTag.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/jsp/ServletResponseWrapperInclude.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/AttributesImplSerializer.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/CharInfo.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/DOMSerializer.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ElemContext.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ElemDesc.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/EmptySerializer.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/EncodingInfo.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/Encodings.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ExtendedContentHandler.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ExtendedLexicalHandler.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/Method.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/NamespaceMappings.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ObjectFactory.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/OutputPropertiesFactory.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/OutputPropertyUtils.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/SecuritySupport.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/SecuritySupport12.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/SerializationHandler.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/Serializer.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/SerializerBase.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/SerializerConstants.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/SerializerFactory.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/SerializerTrace.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/SerializerTraceWriter.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ToHTMLSAXHandler.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ToHTMLStream.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ToSAXHandler.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ToStream.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ToTextSAXHandler.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ToTextStream.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ToUnknownStream.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ToXHTMLStream.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ToXMLSAXHandler.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ToXMLStream.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/TransformStateSetter.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/TreeWalker.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/Version.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/WriterChain.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/WriterToASCI.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/WriterToUTF8Buffered.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/XSLOutputAttributes.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/AttList.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/BoolStack.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/DOM2Helper.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/Messages.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/MsgKey.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_ca.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_cs.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_de.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_en.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_es.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_fr.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_hu.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_it.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_ja.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_ko.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_pl.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_pt_BR.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_ru.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_sv.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_tr.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_zh_CN.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_zh_TW.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/StringToIntTable.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SystemIDResolver.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/URI.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/Utils.java
   branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/WrappedRuntimeException.java
   branches/refactor1/framework/impl/src/main/javascript/
   branches/refactor1/framework/impl/src/main/javascript/ajaxjsf/
   branches/refactor1/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js
   branches/refactor1/framework/impl/src/main/javascript/ajaxjsf/epilog.js
   branches/refactor1/framework/impl/src/main/javascript/ajaxjsf/imagecache.js
   branches/refactor1/framework/impl/src/main/javascript/ajaxjsf/jsshell.js
   branches/refactor1/framework/impl/src/main/javascript/ajaxjsf/log4ajax.js
   branches/refactor1/framework/impl/src/main/javascript/ajaxjsf/prolog.js
   branches/refactor1/framework/impl/src/main/javascript/ajaxjsf/request.js
   branches/refactor1/framework/impl/src/main/javascript/ajaxjsf/sarissa.js
   branches/refactor1/framework/impl/src/main/javascript/ajaxjsf/sarissa_dhtml.js
   branches/refactor1/framework/impl/src/main/javascript/ajaxjsf/sarissa_ieemu_load.js
   branches/refactor1/framework/impl/src/main/javascript/ajaxjsf/sarissa_ieemu_xpath.js
   branches/refactor1/framework/impl/src/main/javascript/ajaxjsf/sarissa_ieemu_xslt.js
   branches/refactor1/framework/impl/src/main/javascript/ajaxjsf/smartposition.js
   branches/refactor1/framework/impl/src/main/javascript/comment.js
   branches/refactor1/framework/impl/src/main/javascript/dnd/
   branches/refactor1/framework/impl/src/main/javascript/dnd/dnd-draggable.js
   branches/refactor1/framework/impl/src/main/javascript/dnd/dnd-dropzone.js
   branches/refactor1/framework/impl/src/main/javascript/dnd/dnd.js
   branches/refactor1/framework/impl/src/main/javascript/dnd/epilog.js
   branches/refactor1/framework/impl/src/main/javascript/dnd/prolog.js
   branches/refactor1/framework/impl/src/main/javascript/prototype/
   branches/refactor1/framework/impl/src/main/javascript/prototype/HEADER
   branches/refactor1/framework/impl/src/main/javascript/prototype/ajax.js
   branches/refactor1/framework/impl/src/main/javascript/prototype/array.js
   branches/refactor1/framework/impl/src/main/javascript/prototype/base.js
   branches/refactor1/framework/impl/src/main/javascript/prototype/compat.js
   branches/refactor1/framework/impl/src/main/javascript/prototype/dom.js
   branches/refactor1/framework/impl/src/main/javascript/prototype/empty.js
   branches/refactor1/framework/impl/src/main/javascript/prototype/enumerable.js
   branches/refactor1/framework/impl/src/main/javascript/prototype/epilog.js
   branches/refactor1/framework/impl/src/main/javascript/prototype/event.js
   branches/refactor1/framework/impl/src/main/javascript/prototype/form.js
   branches/refactor1/framework/impl/src/main/javascript/prototype/hash.js
   branches/refactor1/framework/impl/src/main/javascript/prototype/patches.js
   branches/refactor1/framework/impl/src/main/javascript/prototype/position.js
   branches/refactor1/framework/impl/src/main/javascript/prototype/prolog.js
   branches/refactor1/framework/impl/src/main/javascript/prototype/prototype.js
   branches/refactor1/framework/impl/src/main/javascript/prototype/prototype1.5.0.js
   branches/refactor1/framework/impl/src/main/javascript/prototype/range.js
   branches/refactor1/framework/impl/src/main/javascript/prototype/string.js
   branches/refactor1/framework/impl/src/main/resources/
   branches/refactor1/framework/impl/src/main/resources/META-INF/
   branches/refactor1/framework/impl/src/main/resources/META-INF/.svnignore
   branches/refactor1/framework/impl/src/main/resources/META-INF/services/
   branches/refactor1/framework/impl/src/main/resources/META-INF/services/javax.imageio.spi.ImageWriterSpi
   branches/refactor1/framework/impl/src/main/resources/META-INF/skins/
   branches/refactor1/framework/impl/src/main/resources/META-INF/skins/DEFAULT.skin.properties
   branches/refactor1/framework/impl/src/main/resources/org/
   branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/
   branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/framework/
   branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/framework/ajax/
   branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/framework/ajax/jsshell.html
   branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/framework/ajax/xmlfilter/
   branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/framework/ajax/xmlfilter/oscache.properties
   branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/framework/ajax/xmlfilter/output.properties
   branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/framework/ajax/xmlfilter/tidy/
   branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/framework/ajax/xmlfilter/tidy/tidy.properties
   branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/framework/util/
   branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/framework/util/command/
   branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/framework/util/command/command.js
   branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/framework/util/message/
   branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/framework/util/message/messages.properties
   branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/org/
   branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/org/w3c/
   branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/org/w3c/tidy/
   branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/org/w3c/tidy/TidyMessages.properties
   branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/org/w3c/tidy/TidyMessages_de.properties
   branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/org/w3c/tidy/TidyMessages_es.properties
   branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/org/w3c/tidy/config.txt
   branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/renderkit/
   branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/renderkit/html/
   branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/renderkit/html/scripts/
   branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/renderkit/html/scripts/form.js
   branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/xml/
   branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/xml/serializer/
   branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/xml/serializer/Encodings.properties
   branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/xml/serializer/HTMLEntities.properties
   branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/xml/serializer/Version.src
   branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/xml/serializer/XMLEntities.properties
   branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/xml/serializer/output_html.properties
   branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/xml/serializer/output_text.properties
   branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/xml/serializer/output_unknown.properties
   branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/xml/serializer/output_xhtml.properties
   branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/xml/serializer/output_xml.properties
   branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/xml/serializer/package.html
   branches/refactor1/framework/impl/src/main/templates/
   branches/refactor1/framework/impl/src/main/templates/org/
   branches/refactor1/framework/impl/src/main/templates/org/ajax4jsf/
   branches/refactor1/framework/impl/src/main/templates/org/ajax4jsf/renderkit/
   branches/refactor1/framework/impl/src/main/templates/org/ajax4jsf/renderkit/html/
   branches/refactor1/framework/impl/src/main/templates/org/ajax4jsf/renderkit/html/button.jspx
   branches/refactor1/framework/impl/src/main/templates/org/ajax4jsf/renderkit/html/function.jspx
   branches/refactor1/framework/impl/src/main/templates/org/ajax4jsf/renderkit/html/link.jspx
   branches/refactor1/framework/impl/src/main/templates/org/ajax4jsf/renderkit/html/log.jspx
   branches/refactor1/framework/impl/src/site/
   branches/refactor1/framework/impl/src/site/site.xml
   branches/refactor1/framework/impl/src/test/
   branches/refactor1/framework/impl/src/test/java/
   branches/refactor1/framework/impl/src/test/java/org/
   branches/refactor1/framework/impl/src/test/java/org/ajax4jsf/
   branches/refactor1/framework/impl/src/test/java/org/ajax4jsf/cache/
   branches/refactor1/framework/impl/src/test/java/org/ajax4jsf/cache/LRUMapCacheThreadedTest.java
   branches/refactor1/framework/impl/src/test/java/org/ajax4jsf/framework/
   branches/refactor1/framework/impl/src/test/java/org/ajax4jsf/framework/ajax/
   branches/refactor1/framework/impl/src/test/java/org/ajax4jsf/framework/ajax/xmlfilter/
   branches/refactor1/framework/impl/src/test/java/org/ajax4jsf/framework/ajax/xmlfilter/nekko/
   branches/refactor1/framework/impl/src/test/java/org/ajax4jsf/framework/ajax/xmlfilter/nekko/HtmlCorrectionFilterTestCase.java
   branches/refactor1/framework/impl/src/test/java/org/ajax4jsf/framework/util/
   branches/refactor1/framework/impl/src/test/java/org/ajax4jsf/framework/util/javascript/
   branches/refactor1/framework/impl/src/test/java/org/ajax4jsf/framework/util/javascript/ScriptUtilsTest.java
   branches/refactor1/framework/impl/src/test/java/org/ajax4jsf/io/
   branches/refactor1/framework/impl/src/test/java/org/ajax4jsf/io/parser/
   branches/refactor1/framework/impl/src/test/java/org/ajax4jsf/io/parser/AllParsingTests.java
   branches/refactor1/framework/impl/src/test/java/org/ajax4jsf/io/parser/FastParserTest.java
   branches/refactor1/framework/impl/src/test/java/org/ajax4jsf/io/parser/ParsingTest.java
   branches/refactor1/framework/impl/src/test/resources/
   branches/refactor1/framework/impl/src/test/resources/META-INF/
   branches/refactor1/framework/impl/src/test/resources/META-INF/skins/
   branches/refactor1/framework/impl/src/test/resources/META-INF/skins/DEFAULT.skin.properties
   branches/refactor1/framework/impl/src/test/resources/META-INF/skins/cyclic.skin.properties
   branches/refactor1/framework/impl/src/test/resources/META-INF/skins/noref.skin.properties
   branches/refactor1/framework/impl/src/test/resources/META-INF/skins/style.skin.properties
   branches/refactor1/framework/impl/src/test/resources/META-INF/skins/test.skin.properties
   branches/refactor1/framework/impl/src/test/resources/bindedtest.skin.properties
   branches/refactor1/framework/impl/src/test/resources/log4j.xml
   branches/refactor1/framework/impl/src/test/resources/oscache.properties
   branches/refactor1/framework/impl/src/test/resources/placeholder.txt
   branches/refactor1/framework/impl/src/test/resources/test.skin.properties
   branches/refactor1/framework/impl/src/test/resources/test.web.root
   branches/refactor1/samples/
   branches/refactor1/samples/ajaxPortlet/
   branches/refactor1/samples/ajaxPortlet/.exadelproject
   branches/refactor1/samples/ajaxPortlet/pom.xml
   branches/refactor1/samples/ajaxPortlet/resources/
   branches/refactor1/samples/ajaxPortlet/resources/WEB-INF/
   branches/refactor1/samples/ajaxPortlet/resources/WEB-INF/lib/
   branches/refactor1/samples/ajaxPortlet/src/
   branches/refactor1/samples/ajaxPortlet/src/main/
   branches/refactor1/samples/ajaxPortlet/src/main/java/
   branches/refactor1/samples/ajaxPortlet/src/main/java/portal/
   branches/refactor1/samples/ajaxPortlet/src/main/java/portal/Bean.java
   branches/refactor1/samples/ajaxPortlet/src/main/webapp/
   branches/refactor1/samples/ajaxPortlet/src/main/webapp/META-INF/
   branches/refactor1/samples/ajaxPortlet/src/main/webapp/META-INF/MANIFEST.MF
   branches/refactor1/samples/ajaxPortlet/src/main/webapp/WEB-INF/
   branches/refactor1/samples/ajaxPortlet/src/main/webapp/WEB-INF/ajaxportlet-object.xml
   branches/refactor1/samples/ajaxPortlet/src/main/webapp/WEB-INF/faces-config.xml
   branches/refactor1/samples/ajaxPortlet/src/main/webapp/WEB-INF/faces-config.xml.l4t
   branches/refactor1/samples/ajaxPortlet/src/main/webapp/WEB-INF/jboss-app.xml
   branches/refactor1/samples/ajaxPortlet/src/main/webapp/WEB-INF/jboss-portlet.xml
   branches/refactor1/samples/ajaxPortlet/src/main/webapp/WEB-INF/jboss_portal.tld
   branches/refactor1/samples/ajaxPortlet/src/main/webapp/WEB-INF/lib/
   branches/refactor1/samples/ajaxPortlet/src/main/webapp/WEB-INF/lib/jsf-facelets.jar
   branches/refactor1/samples/ajaxPortlet/src/main/webapp/WEB-INF/myfaces_ext.tld
   branches/refactor1/samples/ajaxPortlet/src/main/webapp/WEB-INF/portal.taglib.xml
   branches/refactor1/samples/ajaxPortlet/src/main/webapp/WEB-INF/portlet-instances.xml
   branches/refactor1/samples/ajaxPortlet/src/main/webapp/WEB-INF/portlet.tld
   branches/refactor1/samples/ajaxPortlet/src/main/webapp/WEB-INF/portlet.xml
   branches/refactor1/samples/ajaxPortlet/src/main/webapp/WEB-INF/web.xml
   branches/refactor1/samples/ajaxPortlet/src/main/webapp/formSubmit/
   branches/refactor1/samples/ajaxPortlet/src/main/webapp/formSubmit/test.htc
   branches/refactor1/samples/ajaxPortlet/src/main/webapp/formSubmit/test.html
   branches/refactor1/samples/ajaxPortlet/src/main/webapp/jsf/
   branches/refactor1/samples/ajaxPortlet/src/main/webapp/jsf/common/
   branches/refactor1/samples/ajaxPortlet/src/main/webapp/jsf/common/editPreferences.xhtml
   branches/refactor1/samples/ajaxPortlet/src/main/webapp/jsf/common/editSecurity.xhtml
   branches/refactor1/samples/ajaxPortlet/src/main/webapp/jsf/common/editTheme.xhtml
   branches/refactor1/samples/ajaxPortlet/src/main/webapp/jsf/common/showPortletDetails.xhtml
   branches/refactor1/samples/ajaxPortlet/src/main/webapp/jsf/repeater.xhtml
   branches/refactor1/samples/ajaxPortlet/src/main/webapp/jsf/start.xhtml
   branches/refactor1/samples/ajaxPortlet/src/main/webapp/jsf/tabTemplate.xhtml
   branches/refactor1/samples/ajaxPortlet/src/main/webapp/objects.xhtml.html
   branches/refactor1/samples/portal-echo/
   branches/refactor1/samples/portal-echo/pom.xml
   branches/refactor1/samples/portal-echo/resources/
   branches/refactor1/samples/portal-echo/resources/WEB-INF/
   branches/refactor1/samples/portal-echo/resources/WEB-INF/lib/
   branches/refactor1/samples/portal-echo/src/
   branches/refactor1/samples/portal-echo/src/main/
   branches/refactor1/samples/portal-echo/src/main/java/
   branches/refactor1/samples/portal-echo/src/main/java/portal/
   branches/refactor1/samples/portal-echo/src/main/java/portal/Bean.java
   branches/refactor1/samples/portal-echo/src/main/webapp/
   branches/refactor1/samples/portal-echo/src/main/webapp/META-INF/
   branches/refactor1/samples/portal-echo/src/main/webapp/META-INF/MANIFEST.MF
   branches/refactor1/samples/portal-echo/src/main/webapp/WEB-INF/
   branches/refactor1/samples/portal-echo/src/main/webapp/WEB-INF/ajaxportlet-object.xml
   branches/refactor1/samples/portal-echo/src/main/webapp/WEB-INF/faces-config.xml
   branches/refactor1/samples/portal-echo/src/main/webapp/WEB-INF/lib/
   branches/refactor1/samples/portal-echo/src/main/webapp/WEB-INF/lib/jsf-facelets.jar
   branches/refactor1/samples/portal-echo/src/main/webapp/WEB-INF/portlet-instances.xml
   branches/refactor1/samples/portal-echo/src/main/webapp/WEB-INF/portlet.xml
   branches/refactor1/samples/portal-echo/src/main/webapp/WEB-INF/web.xml
   branches/refactor1/samples/portal-echo/src/main/webapp/jsf/
   branches/refactor1/samples/portal-echo/src/main/webapp/jsf/common/
   branches/refactor1/samples/portal-echo/src/main/webapp/jsf/common/editPreferences.xhtml
   branches/refactor1/samples/portal-echo/src/main/webapp/jsf/common/editSecurity.xhtml
   branches/refactor1/samples/portal-echo/src/main/webapp/jsf/common/editTheme.xhtml
   branches/refactor1/samples/portal-echo/src/main/webapp/jsf/common/showPortletDetails.xhtml
   branches/refactor1/samples/portal-echo/src/main/webapp/jsf/repeater.xhtml
   branches/refactor1/samples/portal-echo/src/main/webapp/jsf/start.xhtml
   branches/refactor1/samples/portal-echo/src/main/webapp/jsf/tabTemplate.xhtml
   branches/refactor1/samples/portal-echo/src/main/webapp/objects.xhtml.html
   branches/refactor1/samples/richfaces-samples/
   branches/refactor1/sandbox/api/
   branches/refactor1/sandbox/api/pom.xml
   branches/refactor1/sandbox/api/src/
   branches/refactor1/sandbox/api/src/main/
   branches/refactor1/sandbox/api/src/main/java/
   branches/refactor1/sandbox/samples/
   branches/refactor1/sandbox/ui/
   branches/refactor1/sandbox/ui/calendar/
   branches/refactor1/sandbox/ui/panel2/
   branches/refactor1/sandbox/ui/panelmenu/
   branches/refactor1/sandbox/ui/scrollable-grid/
   branches/refactor1/sandbox/ui/simpleTogglePanel2/
   branches/refactor1/ui/
   branches/refactor1/ui/core/
   branches/refactor1/ui/core/pom.xml
   branches/refactor1/ui/core/src/
   branches/refactor1/ui/core/src/main/
   branches/refactor1/ui/core/src/main/java/
Removed:
   branches/refactor1/richfaces-samples/
   branches/refactor1/richfaces/
   branches/refactor1/sandbox-samples/
   branches/refactor1/sandbox/calendar/
   branches/refactor1/sandbox/panel2/
   branches/refactor1/sandbox/panelmenu/
   branches/refactor1/sandbox/scrollable-grid/
   branches/refactor1/sandbox/simpleTogglePanel2/
Log:
rename projects

Added: branches/refactor1/cdk/generator/.svnignore
===================================================================
--- branches/refactor1/cdk/generator/.svnignore	                        (rev 0)
+++ branches/refactor1/cdk/generator/.svnignore	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1 @@
+target

Added: branches/refactor1/cdk/generator/pom.xml
===================================================================
--- branches/refactor1/cdk/generator/pom.xml	                        (rev 0)
+++ branches/refactor1/cdk/generator/pom.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,84 @@
+<?xml version="1.0"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <parent>
+    <artifactId>cdk</artifactId>
+    <groupId>org.ajax4jsf</groupId>
+    <version>1.1.2-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.ajax4jsf.cdk</groupId>
+  <artifactId>generator</artifactId>
+  <name>Java Server Faces component generator</name>
+  <url>http://labs.jboss.com/wiki/Ajax4jsf/cdk/generator</url>
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <inherited>true</inherited>
+        <configuration>
+          <source>1.5</source>
+          <target>1.5</target>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>3.8.1</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>ant</groupId>
+      <artifactId>ant</artifactId>
+      <version>1.6.5</version>
+    </dependency>
+    <dependency>
+      <groupId>velocity</groupId>
+      <artifactId>velocity-dep</artifactId>
+      <version>1.4</version>
+    </dependency>
+    <dependency>
+      <groupId>commons-beanutils</groupId>
+      <artifactId>commons-beanutils</artifactId>
+      <version>1.6</version>
+    </dependency>
+    <dependency>
+      <groupId>commons-digester</groupId>
+      <artifactId>commons-digester</artifactId>
+      <version>1.5</version>
+    </dependency>
+    <dependency>
+      <groupId>javax.faces</groupId>
+      <artifactId>jsf-api</artifactId>
+      <version>1.2_03</version>
+    </dependency>
+    <dependency>
+      <groupId>javax.servlet.jsp</groupId>
+      <artifactId>jsp-api</artifactId>
+      <version>2.1</version>
+    </dependency>
+    <dependency>
+      <groupId>qdox</groupId>
+      <artifactId>qdox</artifactId>
+      <version>1.6</version>
+    </dependency>
+    <dependency>
+      <groupId>org.ajax4jsf.cdk</groupId>
+      <artifactId>compiler</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>cglib</groupId>
+      <artifactId>cglib</artifactId>
+      <version>2.1_3</version>
+    </dependency>
+  </dependencies>
+  <reporting>
+    <plugins>
+      <plugin>
+        <artifactId>maven-javadoc-plugin</artifactId>
+      </plugin>
+    </plugins>
+  </reporting>
+</project>
\ No newline at end of file

Added: branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/ant/AntLogger.java
===================================================================
--- branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/ant/AntLogger.java	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/ant/AntLogger.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,160 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.builder.ant;
+
+import org.ajax4jsf.builder.generator.Logger;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.Task;
+
+/**
+ * @author shura
+ *
+ */
+public class AntLogger implements Logger {
+
+	private Task _task;
+
+	public AntLogger(Task task) {
+		this._task = task;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.builder.generator.Logger#debug(java.lang.CharSequence)
+	 */
+	public void debug(CharSequence content) {
+		_task.log(content.toString(),Project.MSG_DEBUG);
+
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.builder.generator.Logger#debug(java.lang.CharSequence, java.lang.Throwable)
+	 */
+	public void debug(CharSequence content, Throwable error) {
+		_task.log(content.toString(),Project.MSG_DEBUG);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.builder.generator.Logger#debug(java.lang.Throwable)
+	 */
+	public void debug(Throwable error) {
+		// TODO Auto-generated method stub
+
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.builder.generator.Logger#error(java.lang.CharSequence)
+	 */
+	public void error(CharSequence content) {
+		_task.log(content.toString(),Project.MSG_ERR);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.builder.generator.Logger#error(java.lang.CharSequence, java.lang.Throwable)
+	 */
+	public void error(CharSequence content, Throwable error) {
+		_task.log(content.toString(),Project.MSG_ERR);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.builder.generator.Logger#error(java.lang.Throwable)
+	 */
+	public void error(Throwable error) {
+		// TODO Auto-generated method stub
+
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.builder.generator.Logger#info(java.lang.CharSequence)
+	 */
+	public void info(CharSequence content) {
+		_task.log(content.toString(),Project.MSG_INFO);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.builder.generator.Logger#info(java.lang.CharSequence, java.lang.Throwable)
+	 */
+	public void info(CharSequence content, Throwable error) {
+		_task.log(content.toString(),Project.MSG_INFO);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.builder.generator.Logger#info(java.lang.Throwable)
+	 */
+	public void info(Throwable error) {
+		// TODO Auto-generated method stub
+
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.builder.generator.Logger#isDebugEnabled()
+	 */
+	public boolean isDebugEnabled() {
+		return true;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.builder.generator.Logger#isErrorEnabled()
+	 */
+	public boolean isErrorEnabled() {
+		// TODO Auto-generated method stub
+		return true;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.builder.generator.Logger#isInfoEnabled()
+	 */
+	public boolean isInfoEnabled() {
+		// TODO Auto-generated method stub
+		return true;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.builder.generator.Logger#isWarnEnabled()
+	 */
+	public boolean isWarnEnabled() {
+		// TODO Auto-generated method stub
+		return true;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.builder.generator.Logger#warn(java.lang.CharSequence)
+	 */
+	public void warn(CharSequence content) {
+		_task.log(content.toString(),Project.MSG_WARN);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.builder.generator.Logger#warn(java.lang.CharSequence, java.lang.Throwable)
+	 */
+	public void warn(CharSequence content, Throwable error) {
+		_task.log(content.toString(),Project.MSG_WARN);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.builder.generator.Logger#warn(java.lang.Throwable)
+	 */
+	public void warn(Throwable error) {
+		// TODO Auto-generated method stub
+
+	}
+
+}

Added: branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/ant/JSFGeneratorTask.java
===================================================================
--- branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/ant/JSFGeneratorTask.java	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/ant/JSFGeneratorTask.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,401 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.builder.ant;
+
+import java.io.File;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+
+import org.ajax4jsf.builder.config.BuilderConfig;
+import org.ajax4jsf.builder.config.ParsingException;
+import org.ajax4jsf.builder.generator.ComponentGenerator;
+import org.ajax4jsf.builder.generator.FaceletsTaglibGenerator;
+import org.ajax4jsf.builder.generator.FacesConfigGenerator;
+import org.ajax4jsf.builder.generator.GeneratorException;
+import org.ajax4jsf.builder.generator.InnerGenerator;
+import org.ajax4jsf.builder.generator.JSFGeneratorConfiguration;
+import org.ajax4jsf.builder.generator.ListenerGenerator;
+import org.ajax4jsf.builder.generator.RendererGenerator;
+import org.ajax4jsf.builder.generator.ComponentTagGenerator;
+import org.ajax4jsf.builder.generator.TagHandlerGenerator;
+import org.ajax4jsf.builder.generator.TaglibGenerator;
+import org.ajax4jsf.builder.velocity.BuilderContext;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.Task;
+import org.apache.tools.ant.taskdefs.Ant.Reference;
+import org.apache.tools.ant.types.FileList;
+import org.apache.tools.ant.types.Path;
+import org.apache.velocity.Template;
+import org.apache.velocity.app.VelocityEngine;
+import org.apache.velocity.exception.ParseErrorException;
+import org.apache.velocity.exception.ResourceNotFoundException;
+
+
+/**
+ * Base Task for build componenta,renderers,faces-config,tag and tld files.
+ * for use in ant build.xml , task must be defined as :
+ * &lt;taskdef  classpathref="taskClassPath" 
+ *   classname="com.exadel.vcp.builder.ant.JSFGeneratorTask" 
+ *   name="jsfgenerator"&gt;
+ * Where classpath for task must contain component-builder.jar, velocity-dep.jar 
+ * commons-beanutils.jar and commons-digister.jar . This Task use JDK 1.5 
+ * To invoke task , put 
+ * &lt;jsfgenerator configfile="../conf/test.xml" 
+ *     destdir="../generated"   
+ *     description="Build classes and configs" &gt;
+ *     ....
+ * &lt;/jsfgenerator&gt;
+ * mantadory attributes :
+ *    configfile - point to xml configuration file with components descriptions. For detail of configuration,
+ *     see {@link META-INF/schema/component-config.dtd} and {@link org.ajax4jsf.builder.config.ComponentBean}
+ *     also, can use instead {@link org.apache.tools.ant.types.FileList} type child element &lt;configs&gt; with other config files,
+ *     for syntax see Ant &lt;folelist&gt; element
+ * optional attributes :
+ *    destdir - destination directory for generated files. If not set, must be set in nesting generation elements.
+ *    templates - directory with custom templates. If template not found in this directory, use default fom jar
+ *    classpath, classpathref - classpath definition for load components,tags,renderers classes for analaize properties
+ * for generation of concrete files, used nested elements :
+ * 	&lt;components&gt; generate components implementation classes {@see com.exadel.vcp.builder.ant.ComponentGenerator}
+ *  &lt;renderers&gt;  generate renderers implementation classes  {@see com.exadel.vcp.builder.ant.RendererGenerator}
+ *  &lt;tags&gt;  generate jsp tags implementation classes {@see com.exadel.vcp.builder.ant.TagGenerator}
+ *  &lt;facesconfig&gt; - generate jsf configuration file {@see com.exadel.vcp.builder.ant.FacesConfigGenerator}
+ *  &lt;taglib&gt; generate taglib .tld file {@see com.exadel.vcp.builder.ant.TaglibGenerator}
+ *  &lt;faceletstaglib&gt; - generate taglib for facelets {@see com.exadel.vcp.builder.ant.FaceletsTaglibGenerator}
+ *  also, can use nested &lt;classpath&gt; element, same as javac ant task      
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.11 $ $Date: 2007/02/26 20:49:03 $
+ *
+ */
+public  class JSFGeneratorTask extends Task implements JSFGeneratorConfiguration {
+
+	private FileList _configs;
+	/**
+	 * Configuration file for build 
+	 */
+	private File configFile;
+	/**
+	 * Destination to place sources and config files
+	 */
+	private File destDir;
+	
+	/**
+	 * Directory for velocity templates 
+	 */
+	private File templates;
+	
+	/**
+	 * Classpath for load components and other generation-related classes.
+	 */
+	private Path _classpath;
+
+
+	private	BuilderConfig _config = null;
+	
+	private List<InnerGenerator> _inners = new ArrayList<InnerGenerator>();
+	
+	private String key;
+	
+	private String templatesPath=BuilderContext.TEMPLATES_PATH;
+	/**
+	 * @return Returns the configFile.
+	 */
+	public File getConfigFile() {
+		return configFile;
+	}
+
+	/**
+	 * @param configFile The configFile to set.
+	 */
+	public void setConfigFile(File configFile) {
+		this.configFile = configFile;
+	}
+
+	
+	/**
+	 * Create child element for list of config files.
+	 * Task Can have only one such child
+	 * @return
+	 */
+	public FileList createConfigs() {
+		this._configs = new FileList();
+		return _configs;
+	}
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.builder.ant.JSFGeneratorConfiguration#getDestDir()
+	 */
+	public File getDestDir() {
+		return destDir;
+	}
+
+	/**
+	 * @param destDir The destDir to set.
+	 */
+	public void setDestDir(File destDir) {
+		this.destDir = destDir;
+	}
+
+	/**
+	 * @return Returns the templates.
+	 */
+	public File getTemplates() {
+		return templates;
+	}
+
+	/**
+	 * @param templates The templates to set.
+	 */
+	public void setTemplates(File templates) {
+		this.templates = templates;
+	}
+
+	/**
+	 * @return Returns the classpath.
+	 */
+	public Path getClasspath() {
+		return _classpath;
+	}
+
+	/**
+	 * @param classpath The classpath to set.
+	 */
+	public void setClasspath(Path classpath) {
+		if(null == _classpath) {
+			_classpath = classpath;
+		} else {
+			_classpath.add(classpath);
+		}
+	}
+
+	public Path createClasspath() {
+		Path classpath = new Path(getProject());
+		if(null == _classpath) {
+			_classpath = classpath;
+		} else {
+			_classpath.add(classpath);
+		}
+		return classpath;
+	}
+	
+	public void setClasspathRef(Reference ref) {
+		Object refObj = ref.getReferencedObject();
+		if (refObj instanceof Path) {
+			setClasspath( (Path) refObj );			
+		}
+	}
+	final private static String VELOCITY_PROPERTIES = "velocity.properties";
+
+	
+	private VelocityEngine engine;
+	
+	private Map<String, Template> _templates = new HashMap<String, Template>();
+
+	
+	public void init() throws BuildException {
+		super.init();
+		Properties velocityProperties = new Properties();
+		try {
+		InputStream streamVelosityProperties = JSFGeneratorTask.class.getResourceAsStream(VELOCITY_PROPERTIES);
+		velocityProperties.load(streamVelosityProperties);
+		engine = new VelocityEngine();
+		engine.init(velocityProperties);
+		} catch(Exception e){
+			throw new BuildException("Error init velocity engine",e);
+		}
+	}
+
+	public Template getTemplate(String name) throws GeneratorException {
+		Template template = _templates.get(name);
+		if(null == template){
+			try {
+				template = engine.getTemplate(name);
+			} catch (ResourceNotFoundException e) {
+				throw new GeneratorException(e.getLocalizedMessage());
+			} catch (ParseErrorException e) {
+				throw new GeneratorException(e.getLocalizedMessage());
+			} catch (Exception e) {
+				throw new GeneratorException(e.getLocalizedMessage());
+			}
+			_templates.put(name, template);
+		}
+		return template;
+	}
+
+	
+	/* (non-Javadoc)
+	 * @see org.apache.tools.ant.Task#execute()
+	 */
+	public void execute() throws BuildException {
+		BuilderConfig config;
+		config = getBuilderConfig();
+		for (Iterator<InnerGenerator> it = _inners.iterator(); it.hasNext();) {
+			InnerGenerator generator = it.next();
+			getProject().log("Build files for subtask "+generator.getClass().getSimpleName());
+			try {
+				generator.createFiles(config);
+			} catch (Exception e) {
+				getProject().log("Error for buid files by builder "+generator.getClass().getSimpleName(),Project.MSG_ERR);
+				e.printStackTrace();
+				throw new BuildException("Error for buid files by builder "+generator.getClass().getSimpleName(),e);
+			}
+		}
+	}
+
+	/**
+	 * Lazy parsing and creation of builder configuration.
+	 * @param config
+	 * @return
+	 * @throws BuildException
+	 */
+	private BuilderConfig getBuilderConfig() throws BuildException {
+		if (null == _config) {
+			// Test real configuration
+			if (getConfigFile() == null && getConfigs() == null) {
+				throw new BuildException("Config file name not set");
+			}
+			// Init Velocity
+			try {
+				BuilderContext.init(getTemplates());
+			} catch (GeneratorException e1) {
+				throw new BuildException(e1);
+			}
+			// Parse configuration
+			try {
+				_config = new BuilderConfig(getClassLoader(),new AntLogger(this));
+				if (null != getConfigFile()) {
+					_config.parseConfig(getConfigFile());
+				}
+				if(null != getConfigs()) {
+					String[] files = getConfigs().getFiles(getProject());
+					for (int i = 0; i < files.length; i++) {
+						String file = files[i];
+						_config.parseConfig(new File(getConfigs().getDir(getProject()),file));
+					}
+				}
+				_config.checkComopnentProperties();
+			} catch (ParsingException e) {
+				e.printStackTrace();
+				throw new BuildException("Error building ", e);
+			} catch (Exception e) {
+				// TODO: handle exception
+				e.printStackTrace();
+				throw new BuildException("Error building ", e);
+			}
+		}
+		return _config;
+	}
+
+	public ClassLoader getClassLoader() {
+		return getProject().createClassLoader(getClasspath());
+	}
+
+	public ComponentGenerator createComponents() {
+		 ComponentGenerator generator = new ComponentGenerator(this,new AntLogger(this));
+		 _inners.add(generator);
+		 return generator;
+	}
+	
+	public FacesConfigGenerator createFacesconfig() {
+		 FacesConfigGenerator generator = new FacesConfigGenerator(this,new AntLogger(this));
+		 _inners.add(generator);
+		 return generator;
+	}
+	public RendererGenerator createRenderers() {
+		 RendererGenerator generator = new RendererGenerator(this,new AntLogger(this));
+		 _inners.add(generator);
+		 return generator;
+	}
+	public ComponentTagGenerator createTags() {
+		 ComponentTagGenerator generator = new ComponentTagGenerator(this,new AntLogger(this));
+		 _inners.add(generator);
+		 return generator;
+	}
+	public TaglibGenerator createTaglib() {
+		 TaglibGenerator generator = new TaglibGenerator(this,new AntLogger(this));
+		 _inners.add(generator);
+		 return generator;
+	}
+	
+	public FaceletsTaglibGenerator createFaceletsTaglib() {
+		FaceletsTaglibGenerator generator = new FaceletsTaglibGenerator(this,new AntLogger(this));
+		 _inners.add(generator);
+		 return generator;
+	}
+
+	public TagHandlerGenerator createTagHandler() {
+		 TagHandlerGenerator generator = new TagHandlerGenerator(this,new AntLogger(this));
+		 _inners.add(generator);
+		 return generator;
+	}
+
+	public ListenerGenerator createListenerGenerator() {
+		ListenerGenerator generator = new ListenerGenerator(this, new AntLogger(this));
+		_inners.add(generator);
+		return generator;
+	}
+
+	/**
+	 * @return Returns the configs.
+	 */
+	private FileList getConfigs() {
+		return _configs;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.builder.ant.JSFGeneratorConfiguration#getKey()
+	 */
+	public String getKey() {
+		return this.key;
+	}
+
+	/**
+	 * @param key The key to set.
+	 */
+	public void setKey(String key) {
+		this.key = key;
+		if(key != null && key.length() == 0){
+			this.key = null;
+		}
+			
+	}
+
+	/**
+	 * @return the templatesPath
+	 */
+	public String getTemplatesPath() {
+		return this.templatesPath;
+	}
+
+	/**
+	 * @param templatesPath the templatesPath to set
+	 */
+	public void setTemplatesPath(String templatesPath) {
+		this.templatesPath = templatesPath;
+	}
+	
+	
+}

Added: branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/ant/VCPVersionTask.java
===================================================================
--- branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/ant/VCPVersionTask.java	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/ant/VCPVersionTask.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,165 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.builder.ant;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+
+import org.apache.commons.beanutils.BeanUtils;
+import org.apache.tools.ant.AntClassLoader;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Task;
+import org.apache.tools.ant.taskdefs.Ant.Reference;
+import org.apache.tools.ant.types.Path;
+
+/**
+ * @author Maksim Kaszynski
+ *
+ */
+public class VCPVersionTask extends Task {
+
+	private String versionProperty = "EXADEL_VCP_VERSION";
+	private String vendorProperty = "EXADEL_VCP_VENDOR";
+	private File output;
+	
+	/**
+	 * Full java class name for version bean
+	 */
+	private String _versionBean;
+	
+	/**
+	 * Classpath for load version bean.
+	 */
+	private Path _classpath;
+
+
+	/**
+	 * @return Returns the classpath.
+	 */
+	public Path getClasspath() {
+		return _classpath;
+	}
+
+	/**
+	 * @param classpath The classpath to set.
+	 */
+	public void setClasspath(Path classpath) {
+		if(null == _classpath) {
+			_classpath = classpath;
+		} else {
+			_classpath.add(classpath);
+		}
+	}
+
+	public Path createClasspath() {
+		Path classpath = new Path(getProject());
+		if(null == _classpath) {
+			_classpath = classpath;
+		} else {
+			_classpath.add(classpath);
+		}
+		return classpath;
+	}
+	
+	public void setClasspathRef(Reference ref) {
+		Object refObj = ref.getReferencedObject();
+		if (refObj instanceof Path) {
+			setClasspath( (Path) refObj );			
+		}
+	}
+
+	/**
+	 * @return Returns the versionBean.
+	 */
+	public String getVersionBean() {
+		return this._versionBean;
+	}
+
+	/**
+	 * @param versionBean The versionBean to set.
+	 */
+	public void setVersionBean(String versionBean) {
+		this._versionBean = versionBean;
+	}
+
+	public File getOutput() {
+		return output;
+	}
+	public void setOutput(File outputFile) {
+		this.output = outputFile;
+	}
+	
+	
+	public void execute() throws BuildException {
+		String cvsLabel = null;		
+		try {
+			AntClassLoader classLoader = getProject().createClassLoader(
+					getClasspath());
+			Class beanClass = classLoader.loadClass(getVersionBean());
+
+			Object chameleonBean = beanClass.newInstance();
+
+			String version = BeanUtils.getProperty(chameleonBean, "version");
+			version = version.replaceAll("\\$|(Date(.*))", "").trim();
+			cvsLabel = version.replaceAll("\\W", "_");
+			getProject().setProperty(getVendorProperty(),
+					BeanUtils.getProperty(chameleonBean, "vendor"));
+			getProject().setProperty(getVersionProperty(), version);
+			System.out.println(getProject().getProperty(getVersionProperty()));
+			System.out.println(cvsLabel);
+		} catch (Exception e) {
+			// TODO: handle exception
+			e.printStackTrace();
+			getProject().fireBuildFinished(e);
+		}
+		try {
+			if(output.exists()){
+				output.delete();
+			}
+				FileWriter fileWriter = new FileWriter(output);
+				fileWriter.write(cvsLabel);
+				fileWriter.flush();
+				fileWriter.close();
+		} catch (IOException e) {
+			e.printStackTrace();
+			getProject().fireBuildFinished(e);
+		}
+	
+	}
+	public String getVendorProperty() {
+		return vendorProperty;
+	}
+	public void setVendorProperty(String vendorProperty) {
+		this.vendorProperty = vendorProperty;
+	}
+	public String getVersionProperty() {
+		return versionProperty;
+	}
+	public void setVersionProperty(String versionProperty) {
+		this.versionProperty = versionProperty;
+	}
+
+	
+
+	
+}

Added: branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/config/BuilderConfig.java
===================================================================
--- branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/config/BuilderConfig.java	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/config/BuilderConfig.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,612 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.builder.config;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.naming.ConfigurationException;
+
+import org.ajax4jsf.builder.generator.Logger;
+import org.apache.commons.digester.Digester;
+import org.apache.commons.digester.ExtendedBaseRules;
+import org.apache.tools.ant.BuildException;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+import org.xml.sax.ext.EntityResolver2;
+
+/**
+ * Parse builder config file for use with component creation.
+ * 
+ * @author asmirnov at exadel.com (latest modification by $Author: ishabalov $)
+ * @version $Revision: 1.1.2.10 $ $Date: 2007/02/20 20:57:58 $
+ * 
+ */
+public class BuilderConfig implements LoaderHolder {
+
+    /**
+         * Resource path to config file schemas and entities
+         */
+    public static final String COMPONENT_SCHEMA_BASE = "/META-INF/schema/";
+
+    /**
+         * Resource path to config file schemas and entities
+         */
+    public static final String ENTITIES_FOLDER = "entities";
+
+    /**
+         * default URI to dtd in classpath
+         */
+    private static final String COMPONENT_CONFIG_DTD_URI = COMPONENT_SCHEMA_BASE
+	    + "component-config.dtd";
+
+    /**
+         * root element of configuration file
+         */
+    private static final String GENERATOR_CONFIG_ROOT_ELEMENT = "components";
+
+    /**
+         * PUBLIC Id of configuration schema
+         */
+    private static final String GENERATOR_CONFIG_PUBLIC_ID = "-//AJAX4JSF//CDK Generator config/EN";
+
+    /**
+         * components described in this configuration
+         */
+    private List<ComponentBean> components = new ArrayList<ComponentBean>();
+
+    /**
+         * validators described in this configuration
+         */
+    private List<ValidatorBean> validators = new ArrayList<ValidatorBean>();
+
+    /**
+         * components described in this configuration
+         */
+    private List<ConverterBean> converters = new ArrayList<ConverterBean>();
+
+    /**
+         * renderers described in this configuration
+         */
+    private List<RendererBean> renderers = new ArrayList<RendererBean>();
+
+    private List<ListenerBean> listeners = new ArrayList<ListenerBean>();
+
+    private ClassLoader _loader;
+
+    private Logger _log;
+
+    /**
+         * @param project -
+         *                current ant project
+         */
+    public BuilderConfig(ClassLoader loader, Logger log) {
+	_loader = loader;
+	_log = log;
+    }
+
+    /**
+         * Parsing builder configuration file
+         * 
+         * @param configFile
+         * @throws ParsingException
+         */
+    public void parseConfig(final File configFile) throws ParsingException {
+	getLog().info(" Parse config file " + configFile.toString());
+	Digester digester = new Digester();
+	digester.setRules(new ExtendedBaseRules());
+	digester.setValidating(false);
+	digester.setNamespaceAware(false);
+	// try {
+	// URL dtd =
+        // this.getClass().getClassLoader().getResource(COMPONENT_CONFIG_DTD_URI);
+	// new
+        // URL("resource:/com/exadel/vcp/builder/config/component-config.dtd");
+	getLog()
+		.debug("Register config DTD as URI " + COMPONENT_CONFIG_DTD_URI);
+	digester.register(GENERATOR_CONFIG_PUBLIC_ID, COMPONENT_CONFIG_DTD_URI);
+	// } catch (MalformedURLException e) {
+	// throw new ParsingException("Malformed URL for internal DTD
+        // reference",e);
+	// }
+
+	// setup custom entity resolver for handle file-resource path's
+	// resolve DTD even it not pointed in file, and, for entities - resolve
+        // it in
+	// classpath if entity registered in DTD witn path /META-INF/schema
+	digester.setEntityResolver(new EntityResolver2() {
+
+	    /*
+                 * (non-Javadoc)
+                 * 
+                 * @see org.xml.sax.EntityResolver#resolveEntity(java.lang.String,
+                 *      java.lang.String)
+                 */
+	    public InputSource resolveEntity(String publicId, String systemId)
+		    throws SAXException, IOException {
+		getLog().debug(
+			"Request for entity with systemId " + systemId
+				+ " and publicId " + publicId);
+		if (GENERATOR_CONFIG_PUBLIC_ID.equals(publicId)) {
+		    return getDTDSource();
+		} else if (null != publicId && null != systemId
+			&& systemId.contains(ENTITIES_FOLDER)) {
+		    int base = systemId.indexOf(ENTITIES_FOLDER);
+		    String entity = COMPONENT_SCHEMA_BASE
+			    + systemId.substring(base);
+		    getLog().debug(
+			    "attempt to load entity from classpath " + entity);
+		    InputStream entityStream = BuilderConfig.class
+			    .getResourceAsStream(entity);
+		    if (null != entityStream) {
+			return new InputSource(entityStream);
+		    }
+		}
+		return null;
+	    }
+
+	    public InputSource getExternalSubset(String name, String baseURI)
+		    throws SAXException, IOException {
+		getLog().debug(
+			"Request for ExternalSubset with name " + name
+				+ " and baseURI " + baseURI);
+		if (GENERATOR_CONFIG_ROOT_ELEMENT.equals(name)) {
+		    return getDTDSource();
+		}
+		return null;
+	    }
+
+	    public InputSource resolveEntity(String name, String publicId,
+		    String baseURI, String systemId) throws SAXException,
+		    IOException {
+		getLog().debug(
+			"Request for extended entity with systemId " + systemId
+				+ " and publicId " + publicId);
+		getLog().debug(
+			"additional parameters with name " + name
+				+ " and baseURI " + baseURI);
+		if ("[dtd]".equals(name)
+			&& GENERATOR_CONFIG_PUBLIC_ID.equals(publicId)) {
+		    return getDTDSource();
+		} else if (null == name
+			|| (!name.startsWith("[") && !name.startsWith("&"))) {
+		    return resolveEntity(publicId, systemId);
+		}
+		return null;
+	    }
+
+	    /**
+                 * Resolve config DTD from classpath
+                 * 
+                 * @return source of config file DTD
+                 */
+	    private InputSource getDTDSource() {
+		return new InputSource(BuilderConfig.class
+			.getResourceAsStream(COMPONENT_CONFIG_DTD_URI));
+	    }
+
+	});
+
+	// Parsing rules.
+
+	// Components
+	String path = "components/component";
+	digester.addObjectCreate(path, ComponentBean.class);
+	digester.addBeanPropertySetter(path + "/name");
+	digester.addBeanPropertySetter(path + "/family");
+	digester.addBeanPropertySetter(path + "/classname");
+	digester.addBeanPropertySetter(path + "/superclass");
+	digester.addBeanPropertySetter(path + "/description");
+	digester.addBeanPropertySetter(path + "/displayname");
+	digester.addBeanPropertySetter(path + "/icon");
+	// TODO - for superclass, populate from description in config file, if
+        // exist
+	digester.addSetProperties(path);
+	digester.addSetNext(path, "addComponent");
+	path = "components/renderer";
+	digester.addObjectCreate(path, RendererBean.class);
+	digester.addBeanPropertySetter(path + "/?");
+	digester.addSetProperties(path);
+	digester.addSetNext(path, "addRenderer");
+	path = "components/component/renderer";
+	digester.addObjectCreate(path, RendererBean.class);
+	digester.addBeanPropertySetter(path + "/?");
+	digester.addSetProperties(path);
+	digester.addSetNext(path, "setRenderer");
+
+	path = "components/component/facet";
+	digester.addObjectCreate(path, JsfBean.class);
+	digester.addBeanPropertySetter(path + "/?");
+	digester.addSetProperties(path);
+	digester.addSetNext(path, "addFacet");
+	path = "components/component/event";
+	digester.addObjectCreate(path, EventBean.class);
+	digester.addBeanPropertySetter(path + "/?");
+	digester.addSetProperties(path);
+	digester.addSetNext(path, "addEvent");
+
+	// Validators
+
+	path = "components/validator";
+	digester.addObjectCreate(path, ValidatorBean.class);
+	digester.addBeanPropertySetter(path + "/id");
+	digester.addBeanPropertySetter(path + "/classname");
+	digester.addBeanPropertySetter(path + "/superclass");
+	digester.addBeanPropertySetter(path + "/description");
+	digester.addBeanPropertySetter(path + "/displayname");
+	digester.addBeanPropertySetter(path + "/icon");
+	// TODO - for superclass, populate from description in config file, if
+        // exist
+	digester.addSetProperties(path);
+	digester.addSetNext(path, "addValidator");
+
+	path = "components/validator/property";
+	digester.addObjectCreate(path, PropertyBean.class);
+	digester.addBeanPropertySetter(path + "/?");
+	digester.addSetProperties(path);
+	digester.addSetNext(path, "addProperty");
+
+	// Converters
+
+	path = "components/converter";
+	digester.addObjectCreate(path, ConverterBean.class);
+	digester.addBeanPropertySetter(path + "/id");
+	digester.addBeanPropertySetter(path + "/classname");
+	digester.addBeanPropertySetter(path + "/superclass");
+	digester.addBeanPropertySetter(path + "/description");
+	digester.addBeanPropertySetter(path + "/displayname");
+	digester.addBeanPropertySetter(path + "/icon");
+	digester.addBeanPropertySetter(path + "/forclass");
+	// TODO - for superclass, populate from description in config file, if
+        // exist
+	digester.addSetProperties(path);
+	digester.addSetNext(path, "addConverter");
+
+	// - Tags & Tag handlers
+
+	path = "components/component/tag";
+	digester.addObjectCreate(path, TagBean.class);
+	digester.addBeanPropertySetter(path + "/?");
+	digester.addSetProperties(path);
+	digester.addSetNext(path, "setTag");
+
+	path = "components/validator/tag";
+	digester.addObjectCreate(path, TagBean.class);
+	digester.addBeanPropertySetter(path + "/?");
+	digester.addSetProperties(path);
+	digester.addSetNext(path, "setTag");
+
+	path = "components/converter/tag";
+	digester.addObjectCreate(path, TagBean.class);
+	digester.addBeanPropertySetter(path + "/?");
+	digester.addSetProperties(path);
+	digester.addSetNext(path, "setTag");
+
+	path = "components/component/tag/test";
+	digester.addObjectCreate(path, TestClassHolder.class);
+	digester.addBeanPropertySetter(path + "/?");
+	digester.addSetProperties(path);
+	digester.addSetNext(path, "setTest");
+
+	path = "components/component/test";
+	digester.addObjectCreate(path, TestClassHolder.class);
+	digester.addBeanPropertySetter(path + "/?");
+	digester.addSetProperties(path);
+	digester.addSetNext(path, "setTest");
+
+	path = "components/component/taghandler";
+	digester.addObjectCreate(path, TagHandlerBean.class);
+	digester.addBeanPropertySetter(path + "/?");
+	digester.addSetProperties(path);
+	digester.addSetNext(path, "setTaghandler");
+	/*
+         * path = "components/component/taghandler/test";
+         * digester.addObjectCreate(path, TestClassHolder.class);
+         * digester.addBeanPropertySetter(path+"/?");
+         * digester.addSetProperties(path); digester.addSetNext(path,
+         * "setTest");
+         */
+
+	// Properties
+	path = "components/component/property";
+	digester.addObjectCreate(path, PropertyBean.class);
+	digester.addBeanPropertySetter(path + "/?");
+	digester.addSetProperties(path);
+	digester.addSetNext(path, "addProperty");
+
+	// path = "components/validator/property";
+	// digester.addObjectCreate(path, PropertyBean.class);
+	// digester.addBeanPropertySetter(path+"/?");
+	// digester.addSetProperties(path);
+	// digester.addSetNext(path, "addProperty");
+
+	path = "components/converter/property";
+	digester.addObjectCreate(path, PropertyBean.class);
+	digester.addBeanPropertySetter(path + "/?");
+	digester.addSetProperties(path);
+	digester.addSetNext(path, "addProperty");
+
+	path = "*/properties/property";
+	digester.addObjectCreate(path, PropertyBean.class);
+	digester.addBeanPropertySetter(path + "/?");
+	digester.addSetProperties(path);
+	digester.addSetNext(path, "addProperty");
+
+	// Listeners
+
+	path = "components/listener";
+	digester.addObjectCreate(path, ListenerBean.class);
+	digester.addBeanPropertySetter(path + "/?");
+	digester.addSetProperties(path);
+	digester.addSetNext(path, "addListener");
+	path = "components/listener/tag";
+	digester.addObjectCreate(path, TagBean.class);
+	digester.addBeanPropertySetter(path + "/?");
+	digester.addSetProperties(path);
+	digester.addSetNext(path, "setTag");
+	path = "components/listener/taghandler";
+	digester.addObjectCreate(path, TagHandlerBean.class);
+	digester.addBeanPropertySetter(path + "/?");
+	digester.addSetProperties(path);
+	digester.addSetNext(path, "setTaghandler");
+	path = "components/listener/property";
+	digester.addObjectCreate(path, PropertyBean.class);
+	digester.addBeanPropertySetter(path + "/?");
+	digester.addSetProperties(path);
+	digester.addSetNext(path, "addProperty");
+
+	// Set this config as root.
+	digester.push(this);
+	try {
+	    digester.parse(configFile.toString());
+	} catch (IOException e) {
+	    // TODO Auto-generated catch block
+	    throw new ParsingException("I/O error on parsing config file ", e);
+	} catch (SAXException e) {
+	    // TODO Auto-generated catch block
+	    throw new ParsingException("SAX Parsing error in config file ", e);
+	}
+	// checkComopnentProperties();
+	// return this;
+    }
+
+    /**
+         * Check all components for existing and default properties.
+         * 
+         * @param classpath -
+         *                classpath to find user components, renderers, tags
+         * @throws ConfigurationException
+         */
+    public void checkComopnentProperties() throws ParsingException {
+	// ClassLoader loader = getProject().createClassLoader(classpath);
+	// if(null == loader) {
+	// loader = this.getClass().getClassLoader();
+	// }
+	// setLoader(loader);
+
+	for (ListenerBean listener : getListeners()) {
+	    try {
+		Class<?> listenerClass = Class.forName(listener
+			.getComponentclass(), false, getLoader());
+		for (ComponentBean bean : getComponents()) {
+		    if (bean.getSuperclass() != null) {
+			Class<?> componentSClass = Class.forName(bean
+				.getSuperclass(), false, getLoader());
+
+			if (listenerClass.isAssignableFrom(componentSClass)) {
+
+			    PropertyBean listenerProperty = bean
+				    .getProperty(listener.getName());
+			    if (null == listenerProperty) {
+				listenerProperty = new PropertyBean();
+				listenerProperty.setName(listener.getName());
+				bean.addProperty(listenerProperty);
+
+			    }
+			    // TODO - check existing property for compability with this listener. 
+			    listenerProperty
+				    .setClassname("javax.faces.el.MethodBinding");
+			    listenerProperty.setEl(true);
+			    listenerProperty.setElonly(true);
+			    listenerProperty.setAttachedstate(true);
+			    listenerProperty.setMethodargs(listener
+				    .getEventclass()
+				    + ".class");
+
+			    listener.addSuitableComponent(bean);
+			}
+		    }
+		}
+	    } catch (ClassNotFoundException e) {
+		throw new BuildException(e);
+	    }
+	}
+
+	for (Iterator iter = this.getComponents().iterator(); iter.hasNext();) {
+	    ComponentBaseBean component = (ComponentBaseBean) iter.next();
+	    component.checkProperties();
+	}
+
+	for (Iterator iter = this.getValidators().iterator(); iter.hasNext();) {
+	    ComponentBaseBean component = (ComponentBaseBean) iter.next();
+	    component.checkProperties();
+	}
+
+	for (Iterator iter = this.getConverters().iterator(); iter.hasNext();) {
+	    ComponentBaseBean component = (ComponentBaseBean) iter.next();
+	    component.checkProperties();
+	}
+
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see com.exadel.vcp.builder.config.LoaderHolder#getLoader()
+         */
+    public ClassLoader getLoader() {
+	return _loader;
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see com.exadel.vcp.builder.config.LoaderHolder#setLoader(java.lang.ClassLoader)
+         */
+    public void setLoader(ClassLoader loader) {
+	_loader = loader;
+    }
+
+    public Logger getLog() {
+	return _log;
+    }
+
+    public void addComponent(ComponentBean component) {
+	this.components.add(component);
+	component.setParent(this);
+    }
+
+    public void addValidator(ValidatorBean validator) {
+	this.validators.add(validator);
+	validator.setParent(this);
+    }
+
+    public void addConverter(ConverterBean converter) {
+	this.converters.add(converter);
+	converter.setParent(this);
+    }
+
+    public void addRenderer(RendererBean renderer) {
+	this.renderers.add(renderer);
+	renderer.setParent(this);
+    }
+
+    public void addListener(ListenerBean listener) {
+	this.listeners.add(listener);
+	listener.setParent(this);
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see java.util.List#clear()
+         */
+    public void clear() {
+	components.clear();
+	renderers.clear();
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see java.util.List#contains(java.lang.Object)
+         */
+    public boolean contains(Object o) {
+	return components.contains(o);
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see java.util.List#get(int)
+         */
+    public ComponentBaseBean get(int index) {
+	return components.get(index);
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see java.util.List#indexOf(java.lang.Object)
+         */
+    public int indexOf(ComponentBaseBean o) {
+	return components.indexOf(o);
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see java.util.List#isEmpty()
+         */
+    public boolean isEmpty() {
+	return components.isEmpty();
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see java.util.List#listIterator()
+         */
+    public List<ComponentBean> getComponents() {
+	return components;
+    }
+
+    public List<ConverterBean> getConverters() {
+	return converters;
+    }
+
+    public List<ValidatorBean> getValidators() {
+	return validators;
+    }
+
+    public List<ListenerBean> getListeners() {
+	return listeners;
+    }
+
+    /**
+         * @return the renderers
+         */
+    public List<RendererBean> getRenderers() {
+	return this.renderers;
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see java.util.List#remove(int)
+         */
+    public ComponentBaseBean remove(int index) {
+	return components.remove(index);
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see java.util.List#remove(java.lang.Object)
+         */
+    public boolean remove(ComponentBaseBean o) {
+	return components.remove(o);
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see java.util.List#size()
+         */
+    public int size() {
+	return components.size();
+    }
+}

Added: branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/config/ComponentBaseBean.java
===================================================================
--- branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/config/ComponentBaseBean.java	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/config/ComponentBaseBean.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,375 @@
+package org.ajax4jsf.builder.config;
+
+import java.beans.PropertyDescriptor;
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.faces.component.StateHolder;
+import javax.faces.context.FacesContext;
+import javax.naming.ConfigurationException;
+
+import org.apache.commons.beanutils.PropertyUtils;
+
+public class ComponentBaseBean extends JsfBean {
+
+	private static final String[] ignorableComponentProperties = {
+								"class",
+								"attributes",
+								"childCount",
+								"children",
+								"facets",
+								"facetsAndChildren",
+								"family",
+								"parent",
+								"rendererType",
+								"rendersChildren",
+								"submittedValue",
+								"transient"};
+	private static final String[] enabledTagProperties = {
+			"binding"
+			};
+	private static final String[] attachedStateProperties = {
+			"javax.faces.component.StateHolder",
+			"java.util.List",
+			"javax.faces.el.MethodBinding",
+			"javax.faces.el.ValueBinding",
+			"javax.faces.convert.Converter"
+		};
+	/**
+	 * JSP ( facelets ? ) tag description for component
+	 */
+	private TagBean _tag;
+	private TagHandlerBean _taghandler;
+	/**
+	 * Descriptions of component JavaBean properties
+	 */
+	private Map<String,PropertyBean> properties = new HashMap<String,PropertyBean>();
+	/**
+	 * Flag for generate component instance class
+	 */
+	private boolean generate = true;
+
+	/**
+	 * @return Returns the tag.
+	 */
+	public TagBean getTag() {
+		return _tag;
+	}
+
+	/**
+	 * @param tag The tag to set.
+	 */
+	public void setTag(TagBean tag) {
+		_tag = tag;
+		tag.setParent(this);
+	}
+
+	/**
+	 * @return Returns the generate.
+	 */
+	public boolean isGenerate() {
+		return this.generate;
+	}
+
+	/**
+	 * @param generate The generate to set.
+	 */
+	public void setGenerate(boolean generate) {
+		this.generate = generate;
+	}
+
+	/**
+	 * @return Returns the tagSupport.
+	 */
+	public TagHandlerBean getTaghandler() {
+		return this._taghandler;
+	}
+
+	/**
+	 * @param tagSupport The tagSupport to set.
+	 */
+	public void setTaghandler(TagHandlerBean tagSupport) {
+		this._taghandler = tagSupport;
+	}
+
+	/**
+	 * @return Returns the properties.
+	 */
+	public Collection<PropertyBean> getProperties() {
+		return properties.values();
+	}
+
+	/**
+	 * @param name
+	 * @return true if component have property with given name
+	 */
+	public boolean containProperty(String name) {
+		return properties.containsKey(name);
+	}
+	
+	public PropertyBean getProperty(String name){
+	    return properties.get(name);
+	}
+
+	/**
+	 * Append property to component. If property with name exist, replace it
+	 * @param property
+	 */
+	public void addProperty(PropertyBean property) {
+		this.properties.put(property.getName(),property);
+		property.setParent(this);
+	}
+
+	/**
+	 * Subclasses should extend this method to provide specifc checks
+	 * 
+	 * Check existing and default properties
+	 * For properties filled from configuration, attempt to set additional parameters.
+	 * If base class have any bean properties, append it to configured
+	 * @throws ConfigurationException 
+	 */
+	public void checkProperties() throws ParsingException {
+		try {
+			getLog().debug("Parse properties for Component "+getName()+" with superclass "+getSuperclass());
+            if (getSuperclass() != null)
+            {
+    			Class superClass = getLoader().loadClass(getSuperclass());
+    
+    			Class superSuperClass = superClass;
+    			
+    			while (null != superSuperClass ) {
+    				Class[] interfaces = superSuperClass.getInterfaces();
+    				for (int i = 0; i < interfaces.length; i++) {
+    					Class interfaceClass = interfaces[i];
+    					checkPropertiesForClass(interfaceClass);
+    				}
+    				superSuperClass = superSuperClass.getSuperclass();
+    			}
+    			checkPropertiesForClass(superClass);
+            }
+		} catch (ClassNotFoundException e) {
+			getLog().error("superclass not found for component "+getName(), e);
+		}
+		if (null != getTag()) {
+			try {
+				Class superClass = getLoader().loadClass(getTag().getSuperclass());
+				PropertyDescriptor[] properties = PropertyUtils.getPropertyDescriptors(superClass);
+				// for all properties, add it to component. If property have not abstract getter/setter ,
+				// add it with exist = true . If property in list of hidden names, set hidden = true.
+				for (int i = 0; i < properties.length; i++) {
+					PropertyDescriptor descriptor = properties[i];
+					Method writeMethod = descriptor.getWriteMethod();
+					if(containProperty(descriptor.getName())){
+						if (null != writeMethod && !Modifier.isAbstract(writeMethod.getModifiers()) && Modifier.isPublic(writeMethod.getModifiers()) ) {
+							((PropertyBean) this.properties.get(descriptor
+									.getName())).setExistintag(true);
+						}
+					} else if (null != writeMethod && Modifier.isPublic(writeMethod.getModifiers())) {
+						if (Arrays.asList(enabledTagProperties).contains(
+								descriptor.getName())) {
+							Class type = descriptor.getPropertyType();
+							getLog().debug("Register tag property  "
+									+ descriptor.getName() + " with type name "
+									+ type.getCanonicalName() );
+							PropertyBean property = new PropertyBean();
+							property.setName(descriptor.getName());
+							property.setDescription(descriptor
+									.getShortDescription());
+							property
+									.setDisplayname(descriptor.getDisplayName());
+							property.setClassname(descriptor.getPropertyType()
+									.getCanonicalName());
+							property.setExist(true);
+							if (!Modifier
+									.isAbstract(writeMethod.getModifiers())) {
+								property.setExistintag(true);
+							}
+							addProperty(property);
+						}
+					}
+				}
+				} catch (ClassNotFoundException e) {
+				// TODO Auto-generated catch block
+				getLog().error("superclass not found for tag "+getTag().getName(), e);
+			}
+			
+		}
+	}
+
+	/**
+	 * @param superClass
+	 */
+	private void checkPropertiesForClass(Class superClass) {
+		getLog().debug("Check properties for class "+superClass.getName());
+		// get all property descriptors
+		PropertyDescriptor[] properties = PropertyUtils.getPropertyDescriptors(superClass);
+		// for all properties, add it to component. If property have not abstract getter/setter ,
+		// add it with exist = true . If property in list of hidden names, set hidden = true.
+		PropertyBean property;
+		for (int i = 0; i < properties.length; i++) {
+			PropertyDescriptor descriptor = properties[i];
+			if(!containProperty(descriptor.getName())){
+				if(isIgnorableProperty(superClass, descriptor.getName())) {
+					continue;
+				}
+				Class type = descriptor.getPropertyType();
+				getLog().debug("Register property  "+descriptor.getName()+" with type name "+type.getCanonicalName());
+				property = new PropertyBean();
+				property.setName(descriptor.getName());
+				property.setDescription(descriptor.getShortDescription());
+				property.setDisplayname(descriptor.getDisplayName());
+				property.setClassname(descriptor.getPropertyType().getCanonicalName());
+				property.setExist(true);
+				addProperty(property);
+			} else {
+				// Load and check property.
+				getLog().debug("Check  property  "+descriptor.getName());
+				property = (PropertyBean) this.properties.get(descriptor.getName());
+				if(property.getClassname() == null) {
+					property.setClassname(descriptor.getPropertyType().getCanonicalName());						
+				} else {
+					if(!property.getClassname().equals(descriptor.getPropertyType().getCanonicalName())){
+						getLog().error("Class "+property.getClassname()+" for property "+property.getName()+" not equals with real bean property type: "+descriptor.getPropertyType().getCanonicalName());
+					}
+				}
+				if (property.getDescription() == null) {
+					property.setDescription(descriptor.getShortDescription());					
+				}
+				if(property.getDisplayname() == null){
+					property.setDisplayname(descriptor.getDisplayName());
+				}
+				property.setExist(true);
+			}
+				Method getter = descriptor.getReadMethod();
+				Method setter = descriptor.getWriteMethod();
+				// Abstract methods
+				if(null != setter && null != getter ){
+					if( Modifier.isAbstract(getter.getModifiers()) && Modifier.isAbstract(setter.getModifiers())&& Modifier.isPublic(setter.getModifiers()) ){
+						getLog().debug("Detect as abstract property  "+descriptor.getName());
+						property.setExist(false);
+					} 
+				}
+				if(null == setter || (! Modifier.isPublic(setter.getModifiers())) ){
+					getLog().debug("Detect as hidden property  "+descriptor.getName());
+					property.setHidden(true);
+				}
+				if (isAttachedProperty(property)) {
+					property.setAttachedstate(true);
+				}
+				if (property.isInstanceof("javax.faces.el.MethodBinding") || property.isInstanceof("javax.faces.el.ValueBinding")) {
+					property.setElonly(true);
+				}
+	
+		}
+	}
+
+	private boolean isIgnorableProperty(Class base, String name) {
+		return Arrays.asList(ignorableComponentProperties).contains(name);
+	}
+
+	private boolean isAttachedProperty(PropertyBean prop) {
+		for (int i = 0; i < attachedStateProperties.length; i++) {
+			String clazz = attachedStateProperties[i];
+			if(prop.isInstanceof(clazz)) {
+				return true;
+			}
+		}
+		return false;
+	}
+
+    public boolean isStateHolderRequired() {
+        getLog().info("isStateHolderRequired");
+        for (PropertyBean propertyBean : getProperties())
+        {
+            getLog().info("Property " + propertyBean.getName() + "/" + propertyBean.isTransient());
+            if (!propertyBean.isTransient())
+            {
+                return true;
+            }
+        }
+        return false;
+    }
+    
+    public boolean isSuperclassImplementsStateHolder()
+    {
+        try {
+            Class superClass = getLoader().loadClass(getSuperclass());
+            return (StateHolder.class.isAssignableFrom(superClass));
+        } catch (ClassNotFoundException e) {
+            getLog().error("superclass not found for tag "+getTag().getName(), e);
+            return false;
+        }
+    }
+    
+    public boolean isSuperSaveStateMethodExists()
+    {
+        try {
+            Class superClass = getLoader().loadClass(getSuperclass());
+            Class[] signature = {FacesContext.class};
+            try {
+                Method m = superClass.getMethod("saveState", signature);
+                return !Modifier.isAbstract(m.getModifiers());
+            } catch (NoSuchMethodException e) {
+                return false;
+            }
+        } catch (ClassNotFoundException e) {
+            getLog().error("superclass not found for tag "+getTag().getName(), e);
+            return false;
+        }
+    }
+    
+    public boolean isSuperRestoreStateMethodExists()
+    {
+        try {
+            Class superClass = getLoader().loadClass(getSuperclass());
+            Class[] signature = {FacesContext.class, Object.class};
+            try {
+                Method m = superClass.getMethod("restoreState", signature);
+                return !Modifier.isAbstract(m.getModifiers());
+            } catch (NoSuchMethodException e) {
+                return false;
+            }
+        } catch (ClassNotFoundException e) {
+            getLog().error("superclass not found for tag "+getTag().getName(), e);
+            return false;
+        }
+    }
+    
+    public boolean isSuperIsTransientMethodExists()
+    {
+        try {
+            Class superClass = getLoader().loadClass(getSuperclass());
+            Class[] signature = new Class[0];
+            try {
+                Method m = superClass.getMethod("isTransient", signature);
+                return !Modifier.isAbstract(m.getModifiers());
+            } catch (NoSuchMethodException e) {
+                return false;
+            }
+        } catch (ClassNotFoundException e) {
+            getLog().error("superclass not found for tag "+getTag().getName(), e);
+            return false;
+        }
+    }
+    
+    public boolean isSuperSetTransientMethodExists()
+    {
+        try {
+            Class superClass = getLoader().loadClass(getSuperclass());
+            Class[] signature = {boolean.class};
+            try {
+                Method m = superClass.getMethod("setTransient", signature);
+                return !Modifier.isAbstract(m.getModifiers());
+            } catch (NoSuchMethodException e) {
+                return false;
+            }
+        } catch (ClassNotFoundException e) {
+            getLog().error("superclass not found for tag "+getTag().getName(), e);
+            return false;
+        }
+    }
+}

Added: branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/config/ComponentBean.java
===================================================================
--- branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/config/ComponentBean.java	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/config/ComponentBean.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,154 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.builder.config;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.apache.commons.beanutils.PropertyUtils;
+
+
+
+/**
+ * JavaBean to hold properties of component configuration.
+ * At parsing configuration time, all propertiec can be set as attributes or
+ * child elements of &lt;component&gt: element/.
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.8 $ $Date: 2007/03/01 17:16:00 $
+ *
+ */
+public class ComponentBean extends ComponentBaseBean {
+	
+	/**
+	 * Component family
+	 */
+	private String _family;
+	
+	/**
+	 * Component child facets, for faces-config.xml
+	 */
+	private Set _facets = new HashSet();
+	
+	/**
+	 * Renderer description for this components
+	 */
+	private RendererBean renderer;
+	
+	/**
+	 * Events used by this component. 
+	 */
+	private Set<EventBean> events = new HashSet<EventBean>();
+	
+	/**
+	 * @return Returns the facet.
+	 */
+	public Set getFacets() {
+		return _facets;
+	}
+
+	/**
+	 * @param facet The facet to set.
+	 */
+	public void addFacet(JsfBean facet) {
+		_facets.add(facet);
+	}
+
+	/**
+	 * @return Returns the family.
+	 */
+	public String getFamily() {
+		return _family;
+	}
+
+	/**
+	 * @param family The family to set.
+	 */
+	public void setFamily(String family) {
+		_family = family;
+	}
+
+	/**
+	 * @return Returns the renderer.
+	 */
+	public RendererBean getRenderer() {
+		return renderer;
+	}
+
+	/**
+	 * @param renderer The renderer to set.
+	 */
+	public void setRenderer(RendererBean renderer) {
+		this.renderer = renderer;
+		renderer.setParent(this);
+	}
+
+	/**
+	 * @return the events
+	 */
+	public Set<EventBean> getEvents() {
+		return this.events;
+	}
+	
+	public void addEvent(EventBean event) {
+		this.events.add(event);
+		event.setParent(this);
+	}
+
+	@Override
+	public TestClassHolder getTest() {
+		return super.getTest();
+	}
+	
+	@Override
+	public void setTest(TestClassHolder test) {
+		super.setTest(test);
+		test.setClassname(getClassname() + "ComponentTest");
+	}
+	
+	@Override
+	/**
+	 * Component checks
+	 */
+	public void checkProperties() throws ParsingException {
+		super.checkProperties();
+		if (null != getRenderer()) {
+			getRenderer().checkProperties();
+		}
+		for (EventBean event : getEvents()) {
+			event.checkProperties();
+		}
+		// Attempt to check component Family
+		if (null == getFamily()) {
+			try {
+				Class superClass = getLoader().loadClass(getSuperclass());
+				Object componentInstance =  superClass
+						.newInstance();
+				String family = (String) PropertyUtils.getProperty(componentInstance, "family");
+				setFamily(family);
+				getLog().debug("Detect family of component as "+family);
+			} catch (Exception e) {
+				getLog().error("Error for create instance of component "+getSuperclass()+" exception: "+e.getClass().getName()+" with message "+e.getMessage());
+				throw new ParsingException("'Family' property not set for component"+getName());
+			}
+		}
+	}
+}

Added: branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/config/ConverterBean.java
===================================================================
--- branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/config/ConverterBean.java	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/config/ConverterBean.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,26 @@
+package org.ajax4jsf.builder.config;
+
+public class ConverterBean extends ComponentBaseBean {
+	
+	private String forclass;
+
+	// Map the id onto name
+	
+	public String getId() {
+		return super.getName();
+	}
+	
+	public void setId(String id)
+	{
+		super.setName(id);
+	}
+	
+	public String getForclass() {
+		return forclass;
+	}
+	
+	public void setForclass(String forclass) {
+		this.forclass = forclass;
+	}
+
+}

Added: branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/config/EventBean.java
===================================================================
--- branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/config/EventBean.java	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/config/EventBean.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,86 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.builder.config;
+
+/**
+ * @author shura
+ *
+ */
+public class EventBean extends JsfBean {
+
+	private String _listenerInterface;
+	
+	private String _sourceInterface;
+
+	
+	/**
+	 * @return the listenerInterface
+	 */
+	public String getListenerInterface() {
+		return this._listenerInterface;
+	}
+
+	/**
+	 * @param listenerInterface the listenerInterface to set
+	 */
+	public void setListenerInterface(String listenerInterface) {
+		this._listenerInterface = listenerInterface;
+	}
+
+	/**
+	 * @return the sourceInterface
+	 */
+	public String getSourceInterface() {
+		return this._sourceInterface;
+	}
+
+	/**
+	 * @param sourceInterface the sourceInterface to set
+	 */
+	public void setSourceInterface(String sourceInterface) {
+		this._sourceInterface = sourceInterface;
+	}
+	
+	/* (non-Javadoc)
+	 * @see java.lang.Object#hashCode()
+	 */
+	public int hashCode() {
+		// TODO Auto-generated method stub
+		return getClassname().hashCode();
+	}
+	
+	/* (non-Javadoc)
+	 * @see java.lang.Object#equals(java.lang.Object)
+	 */
+	public boolean equals(Object obj) {
+		// TODO Auto-generated method stub
+		return getClassname().equals(obj);
+	}
+
+	/**
+	 * 
+	 */
+	public void checkProperties() {
+		// TODO Auto-generated method stub
+		
+	}
+}

Added: branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/config/JsfBean.java
===================================================================
--- branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/config/JsfBean.java	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/config/JsfBean.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,324 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.builder.config;
+
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
+
+import org.ajax4jsf.builder.generator.Logger;
+
+
+/**
+ * Base class for most configuration elements. Hold common properties, applicable to
+ * most elements - component, tag, renderer, property
+ * @author shura (latest modification by $Author: ishabalov $)
+ * @version $Revision: 1.1.2.4 $ $Date: 2007/02/20 20:57:58 $
+ *
+ */
+public class JsfBean  implements LoaderHolder {
+
+	/**
+	 * Name for element 
+	 */
+	private String _name;
+	/**
+	 * Display name for configuration file
+	 */
+	private String _displayname;
+	
+	private String _xmlEncodedDisplayname;
+	/**
+	 * Description of element
+	 */
+	private String _description;
+	
+	private String _xmlEncodedDescription;
+	/**
+	 * Icon image file name, for config files
+	 */
+	private String _icon;
+	/**
+	 * Full Java class name for element.
+	 */
+	private String _classname;
+	/**
+	 * Full Java name for base class of element
+	 */
+	private String _superclass;
+
+	private LoaderHolder _parent = null;
+	
+	/**
+	 * appropriate test class 
+	 */
+	private TestClassHolder _test;
+	
+	
+	
+	public TestClassHolder getTest() {
+		return _test;
+	}
+
+	public void setTest(TestClassHolder test) {
+		this._test = test;
+	}
+
+	/**
+	 * @return Returns the classname.
+	 */
+	public String getClassname() {
+		return _classname;
+	}
+
+	/**
+	 * Extract package name for class.
+	 * TODO - handle generalization <package.Class>
+	 * @return
+	 */
+	public String getPackageName() {
+		int lastPoint = getClassname().lastIndexOf('.');
+		if (lastPoint>0) {
+			return getClassname().substring(0,lastPoint);
+		}
+		return "";
+	}
+
+	/**
+	 * Convert full class name to simple.
+	 * @return class name without package name. 
+	 */
+	public String getSimpleClassName() {
+		int lastPoint = getClassname().lastIndexOf('.');
+		if (lastPoint>0) {
+			return getClassname().substring(lastPoint+1);
+		}
+		return getClassname();
+	}
+
+	/**
+	 * @param classname The classname to set.
+	 */
+	public void setClassname(String classname) {
+		_classname = classname;
+	}
+
+	/**
+	 * @return Returns the description.
+	 */
+	public String getDescription() {
+		return _description;
+	}
+
+	/**
+	 * @return Returns the xmlEncodedDescription.
+	 */
+	public String getXmlEncodedDescription() {
+		return this._xmlEncodedDescription;
+	}
+
+	/**
+	 * @param description The description to set.
+	 */
+	public void setDescription(String description) {
+		_description = description;
+		_xmlEncodedDescription = escapeXML(description);
+	}
+
+	/**
+	 * @return Returns the displayName.
+	 */
+	public String getDisplayname() {
+		return _displayname;
+	}
+
+	/**
+	 * @return Returns the xmlEncodedDisplayname.
+	 */
+	public String getXmlEncodedDisplayname() {
+		return this._xmlEncodedDisplayname;
+	}
+
+	/**
+	 * @param displayName The displayName to set.
+	 */
+	public void setDisplayname(String displayName) {
+		_displayname = displayName;
+		_xmlEncodedDisplayname = this.escapeXML(displayName);
+	}
+
+	/**
+	 * @return Returns the icon.
+	 */
+	public String getIcon() {
+		return _icon;
+	}
+
+	/**
+	 * @param icon The icon to set.
+	 */
+	public void setIcon(String icon) {
+		_icon = icon;
+	}
+
+	/**
+	 * @return Returns the name.
+	 */
+	public String getName() {
+		return _name;
+	}
+
+	/**
+	 * @param name The name to set.
+	 */
+	public void setName(String name) {
+		_name = name;
+	}
+
+	/**
+	 * @return Returns the superclass.
+	 */
+	public String getSuperclass() {
+		return _superclass;
+	}
+
+	/**
+	 * @param superclass The superclass to set.
+	 */
+	public void setSuperclass(String superclass) {
+		_superclass = superclass;
+	}
+
+	/**
+	 * Check for instance for class or interface name. 
+	 * @param name
+	 * @return
+	 */
+	public boolean isInstanceof(String name) {
+		String classname = getClassname();
+		if(null == classname){
+			String msg = "classname not set in "+getClass().getName()+" for element "+getName();
+			getLog().error(msg);
+			throw new NullPointerException(msg);
+		}
+		if (classname.equals(name) ) {
+			return true;
+		}
+		try {
+			Class beanClass;
+			try {
+				beanClass = getLoader().loadClass(classname);
+			} catch (ClassNotFoundException e) {
+				if (null == getSuperclass()) {
+					return false;
+				}
+				beanClass = getLoader().loadClass(getSuperclass());
+			}
+			Class superClass = getLoader().loadClass(name);
+			return superClass.isAssignableFrom(beanClass);
+		} catch (ClassNotFoundException e) {
+			getLog().warn("Could't instantiate for testing class "+classname);
+		} catch (Exception e) {
+			getLog().warn("Error in testing class "+classname);
+			e.printStackTrace();
+		}
+		return false;
+	}
+	
+	/**
+	 * Check for not-abstract method with given name for class.
+	 * @param name
+	 * @return
+	 */
+	public boolean haveMethod(String name) {
+		try {
+			Class beanClass;
+			try {
+				beanClass = getLoader().loadClass(getClassname());
+			} catch (ClassNotFoundException e) {
+				beanClass = getLoader().loadClass(getSuperclass());
+			}
+			Method[] methods = beanClass.getMethods();
+			for (int i = 0; i < methods.length; i++) {
+				if(methods[i].getName().equals(name)) {
+					if (! Modifier.isAbstract(methods[i].getModifiers())) {
+						return true;
+					}
+				}
+			}
+		} catch (ClassNotFoundException e) {
+			getLog().warn("Could't instantiate for testing class "+getClassname());
+		} catch (Exception e) {
+			getLog().warn("Error in testing class "+getClassname());
+			e.printStackTrace();
+		}
+		return false;
+		
+	}
+	
+	
+	public String escapeXML(String raw) {
+		if (null != raw) {
+			return raw.replaceAll("<", "&lt;").replaceAll(">", "&gt;")
+					.replaceAll("&", "&amp;");
+		}
+		return null;
+	}
+	/* (non-Javadoc)
+	 * @see com.exadel.vcp.builder.config.LoaderHolder#getLoader()
+	 */
+	public ClassLoader getLoader() {
+		// TODO Auto-generated method stub
+		return getParent().getLoader();
+	}
+	
+	public Logger getLog(){
+		return getParent().getLog();
+	}
+
+	/* (non-Javadoc)
+	 * @see com.exadel.vcp.builder.config.LoaderHolder#setLoader(java.lang.ClassLoader)
+	 */
+	public void setLoader(ClassLoader loader) {
+	}
+
+	
+	/**
+	 * @return Returns the parent.
+	 */
+	public LoaderHolder getParent() {
+		return _parent;
+	}
+
+	/**
+	 * @param parent The parent to set.
+	 */
+	public void setParent(LoaderHolder parent) {
+		_parent = parent;
+	}
+
+	public String upperFirstChar(String name) {
+		char[] charName = name.toCharArray();
+		charName[0] = Character.toUpperCase(charName[0]);
+		return new String(charName);
+	}
+
+}

Added: branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/config/ListenerBean.java
===================================================================
--- branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/config/ListenerBean.java	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/config/ListenerBean.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,74 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.builder.config;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author Nick - mailto:nbelaevski at exadel.com
+ * created 03.12.2006
+ * 
+ */
+public class ListenerBean extends ComponentBean {
+	private String listenerclass;
+	private String componentclass;
+	private String eventclass;
+	
+	private List<ComponentBean> suitableComponents = new ArrayList<ComponentBean>();
+	
+	public String getComponentclass() {
+		return componentclass;
+	}
+	public void setComponentclass(String componentclass) {
+		this.componentclass = componentclass;
+	}
+	public String getEventclass() {
+		return eventclass;
+	}
+	public void setEventclass(String eventclass) {
+		this.eventclass = eventclass;
+	}
+	public String getListenerclass() {
+		return listenerclass;
+	}
+	public void setListenerclass(String listenerclass) {
+		this.listenerclass = listenerclass;
+	}
+
+	public void addSuitableComponent(ComponentBean componentBean) {
+		suitableComponents.add(componentBean);
+	}
+	public List<ComponentBean> getSuitableComponents() {
+		return suitableComponents;
+	}
+	
+	public String getMethodname() {
+		String name = getName();
+		
+		if (name == null || name.length() == 0) { 
+		    return "add" + name; 
+        }
+
+		return "add" + name.substring(0, 1).toUpperCase() + name.substring(1);
+	}
+}

Added: branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/config/LoaderHolder.java
===================================================================
--- branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/config/LoaderHolder.java	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/config/LoaderHolder.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,49 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.builder.config;
+
+import org.ajax4jsf.builder.generator.Logger;
+
+/**
+ * @author asmirnov at exadel.com (latest modification by $Author: ishabalov $)
+ * @version $Revision: 1.1.2.4 $ $Date: 2007/02/20 20:57:59 $
+ *
+ */
+public interface LoaderHolder {
+
+	/**
+	 * @return Returns the loader.
+	 */
+	public ClassLoader getLoader();
+
+	/**
+	 * @param loader The loader to set.
+	 */
+	public void setLoader(ClassLoader loader);
+
+	/**
+	 * @return current logger implementation
+	 */
+	public Logger getLog();
+	
+
+}
\ No newline at end of file

Added: branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/config/ParsingException.java
===================================================================
--- branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/config/ParsingException.java	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/config/ParsingException.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,64 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.builder.config;
+
+/**
+ * @author asmirnov at exadel.com (latest modification by $Author: ishabalov $)
+ * @version $Revision: 1.1.2.2 $ $Date: 2007/02/20 20:57:59 $
+ *
+ */
+public class ParsingException extends Exception {
+
+	/**
+	 * 
+	 */
+	public ParsingException() {
+		super();
+		// TODO Auto-generated constructor stub
+	}
+
+	/**
+	 * @param message
+	 */
+	public ParsingException(String message) {
+		super(message);
+		// TODO Auto-generated constructor stub
+	}
+
+	/**
+	 * @param message
+	 * @param cause
+	 */
+	public ParsingException(String message, Throwable cause) {
+		super(message, cause);
+		// TODO Auto-generated constructor stub
+	}
+
+	/**
+	 * @param cause
+	 */
+	public ParsingException(Throwable cause) {
+		super(cause);
+		// TODO Auto-generated constructor stub
+	}
+
+}

Added: branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/config/PropertyBean.java
===================================================================
--- branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/config/PropertyBean.java	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/config/PropertyBean.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,338 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.builder.config;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Describe JavaBean property of component.
+ * @author asmirnov at exadel.com (latest modification by $Author: ishabalov $)
+ * @version $Revision: 1.1.2.3 $ $Date: 2007/02/20 20:57:59 $
+ *
+ */
+public class PropertyBean extends JsfBean {
+	
+	/**
+	 * Hold default values for java classes and base types
+	 */
+	private static Map<String,String> defaults;
+	
+	/**
+	 * Enable expression language values for property
+	 */
+	private boolean _el= true;
+	
+	/**
+	 * Property can be only as expression(value) binding. For example, actionListener
+	 */
+	private boolean _elonly = false;
+		
+	/**
+	 * If true, property not include to Jsp tag
+	 */
+	private boolean _hidden = false;
+	
+	/**
+	 * If true, do not generate getter/setter/state save code for property in component
+	 */
+	private boolean _exist = false;
+	
+	/**
+	 * If true, property exist in tag superclass - do not generate setter code
+	 */
+	private boolean _existintag = false;
+
+	/**
+	 * If true, Generate access methods to property field ( bypass binding check ).
+	 * additional getter will be have name getRawPropertyName , setter - setRawPropertyName  
+	 */
+	private boolean _raw = false;
+	
+	/**
+	 * Default value for non-initialized property
+	 */
+	private String _defaultvalue = null;
+	
+	/**
+	 * If true, do not include property field to save/restore state code
+	 */
+	private boolean _transient = false;
+	
+	/**
+	 * If trie, save state of property by call {@link javax.faces.component.UIComponentBase#saveAttachedState(javax.faces.context.FacesContext, java.lang.Object)}
+	 */
+	private boolean _attachedstate = false;
+	
+	/**
+	 * Alias for property in jsp tag
+	 */
+	private String _alias = null;
+	/**
+	 * Comma-separated list of class names for {@link javax.faces.el.MethodBinding}
+	 * or other reflection-based properties.
+	 * instanses of calls.
+	 */
+	private String _methodargs = null;
+	
+	/**
+	 * Indicate what this property Required for component.
+	 */
+	private boolean _required = false;
+	
+	static  {
+		defaults = new HashMap<String,String>();
+		defaults.put("boolean","false");
+		defaults.put("int","Integer.MIN_VALUE");
+		defaults.put("long","Long.MIN_VALUE");
+		defaults.put("float","Float.MIN_VALUE");
+		defaults.put("double","Double.MIN_VALUE");
+	}
+	
+	/**
+	 * @return Returns the el.
+	 */
+	public boolean isEl() {
+		return _el;
+	}
+
+	/**
+	 * @param el The el to set.
+	 */
+	public void setEl(boolean el) {
+		_el = el;
+	}
+
+	/**
+	 * @return Returns the elOnly.
+	 */
+	public boolean isElonly() {
+		return _elonly;
+	}
+
+	/**
+	 * @param elOnly The elOnly to set.
+	 */
+	public void setElonly(boolean elOnly) {
+		_elonly = elOnly;
+	}
+
+	/**
+	 * @return Returns the exist.
+	 */
+	public boolean isExist() {
+		return this._exist;
+	}
+
+	/**
+	 * @param exist The exist to set.
+	 */
+	public void setExist(boolean exist) {
+		this._exist = exist;
+	}
+
+	/**
+	 * @return Returns the existInEl.
+	 */
+	public boolean isExistintag() {
+		return this._existintag;
+	}
+
+	/**
+	 * @param existInEl The existInEl to set.
+	 */
+	public void setExistintag(boolean existInEl) {
+		this._existintag = existInEl;
+	}
+
+	/**
+	 * @return Returns the hidden.
+	 */
+	public boolean isHidden() {
+		return this._hidden;
+	}
+
+	/**
+	 * @param hidden The hidden to set.
+	 */
+	public void setHidden(boolean hidden) {
+		this._hidden = hidden;
+		if (hidden) {
+			this._existintag = true;
+		}
+	}
+
+	/**
+	 * Disable all generations for this property. Used for exclude properties defined
+	 * in standart sets as entities in config file or detected from superclass. 
+	 * @param disabled if true , set hidden , exist and existintag properties to true.
+	 */
+	public void setDisabled(boolean disabled) {
+		if (disabled) {
+			setExist(true);
+			setHidden(true);
+		}
+	}
+	/**
+	 * @return Returns the raw.
+	 */
+	public boolean isRaw() {
+		return _raw;
+	}
+
+	/**
+	 * @param raw The raw to set.
+	 */
+	public void setRaw(boolean raw) {
+		_raw = raw;
+	}
+
+	/**
+	 * @return Returns the attachedState.
+	 */
+	public boolean isAttachedstate() {
+		return this._attachedstate;
+	}
+
+	/**
+	 * @param attachedState The attachedState to set.
+	 */
+	public void setAttachedstate(boolean attachedState) {
+		this._attachedstate = attachedState;
+	}
+
+	/**
+	 * @return Returns the methodargs.
+	 */
+	public String getMethodargs() {
+		return _methodargs;
+	}
+
+	/**
+	 * @param methodargs The methodargs to set.
+	 */
+	public void setMethodargs(String methodargs) {
+		_methodargs = methodargs;
+	}
+
+	/**
+	 * @return Returns the transient.
+	 */
+	public boolean isTransient() {
+		return this._transient;
+	}
+
+	/**
+	 * @param transient1 The transient to set.
+	 */
+	public void setTransient(boolean transient1) {
+		this._transient = transient1;
+	}
+
+	/**
+	 * @return Returns the required.
+	 */
+	public boolean isRequired() {
+		return this._required;
+	}
+
+	/**
+	 * @param required The required to set.
+	 */
+	public void setRequired(boolean required) {
+		this._required = required;
+	}
+
+	/**
+	 * @return Returns the alias.
+	 */
+	public String getAlias() {
+		return _alias;
+	}
+
+	/**
+	 * @param alias The alias to set.
+	 */
+	public void setAlias(String alias) {
+		_alias = alias;
+	}
+
+	public String getGetterName() {
+		return getGetterPrefix()+upperFirstChar(getName());
+	}
+
+	public String getSetterName() {
+		return "set"+upperFirstChar(getName());
+	}
+	/**
+	 * @return
+	 */
+	public String getGetterPrefix() {
+		// TODO Auto-generated method stub
+		return "boolean".equals(getClassname())?"is":"get";
+	}
+
+	/* (non-Javadoc)
+	 * @see com.exadel.vcp.builder.config.JsfBean#getShortClassName()
+	 */
+	public String getSimpleClassName() {
+		if (null != getClassname()) {
+			return super.getSimpleClassName();
+		}
+		return "void";
+	}	
+	
+	/**
+	 * @param defaultValue The defaultValue to set.
+	 */
+	public void setDefaultvalue(String defaultValue) {
+		this._defaultvalue = defaultValue;
+	}
+
+	public String getDefaultvalue() {
+		if(null != _defaultvalue){
+			return _defaultvalue;
+		}
+		if (defaults.containsKey(getClassname())) {
+			return (String) defaults.get(getClassname());
+		}
+		return "null";
+		
+	}
+	
+	public boolean isSimpleType() {
+		return defaults.containsKey(getClassname());
+	}
+	
+	public String getBoxingClass(){
+		if(isSimpleType()){
+			String name = upperFirstChar(getClassname());
+			if("Int".equals(name)){
+				name="Integer";
+			} else if("Char".equals(name)){
+				name="Charter";
+			}
+			return name;
+		}
+		return null;
+	}
+}

Added: branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/config/RendererBean.java
===================================================================
--- branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/config/RendererBean.java	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/config/RendererBean.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,163 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.builder.config;
+
+/**
+ * JavaBean to hold renderer configuration properties
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.6 $ $Date: 2007/02/28 21:02:44 $
+ *
+ */
+public class RendererBean extends JsfBean {
+
+	/**
+	 * 
+	 */
+	private String _family;
+	
+	/**
+	 * 
+	 */
+	private String _facet;
+	
+	/**
+	 * If true ( default ) generate template for renderer
+	 */
+	private boolean _generate = true;
+	
+	/**
+	 * If true, override existing renderer classes ( Be careful !)
+	 */
+	private boolean _override = false;
+	
+	/**
+	 * Path to XML template for compile renderer class.
+	 */
+	private String _template; 
+	
+	/**
+	 * Name of render-kit of this renderer.
+	 */
+	private String _renderKit = "HTML_BASIC";
+	
+	/**
+	 * 
+	 */
+	public RendererBean() {
+		super();
+		setSuperclass("org.ajax4jsf.framework.renderer.RendererBase");
+	}
+
+	/**
+	 * @return Returns the facet.
+	 */
+	public String getFacet() {
+		return _facet;
+	}
+
+	/**
+	 * @param facet The facet to set.
+	 */
+	public void setFacet(String facet) {
+		_facet = facet;
+	}
+
+	/**
+	 * @return Returns the family.
+	 */
+	public String getFamily() {
+		return _family;
+	}
+
+	/**
+	 * @param family The family to set.
+	 */
+	public void setFamily(String family) {
+		_family = family;
+	}
+
+	/**
+	 * @return Returns the generate.
+	 */
+	public boolean isGenerate() {
+		return _generate;
+	}
+
+	/**
+	 * @param generate The generate to set.
+	 */
+	public void setGenerate(boolean generate) {
+		_generate = generate;
+	}
+
+	/**
+	 * @return Returns the override.
+	 */
+	public boolean isOverride() {
+		return _override;
+	}
+
+	/**
+	 * @param override The override to set.
+	 */
+	public void setOverride(boolean override) {
+		_override = override;
+	}
+
+	/**
+	 * @return the template
+	 */
+	public String getTemplate() {
+		return this._template;
+	}
+
+	/**
+	 * @param template the template to set
+	 */
+	public void setTemplate(String template) {
+		this._template = template;
+	}
+
+	/**
+	 * @return the renderKit
+	 */
+	public String getRenderKit() {
+		return this._renderKit;
+	}
+
+	/**
+	 * @param renderKit the renderKit to set
+	 */
+	public void setRenderKit(String renderKit) {
+		this._renderKit = renderKit;
+	}
+
+	/**
+	 * Check renderer properties. If nessesary, compile template for remderer class.
+	 */
+	public void checkProperties()  throws ParsingException {
+		if(isGenerate() && null != getTemplate()){
+			getLog().debug("Renderer must be compiled from template "+getTemplate());
+		}
+	}
+
+}

Added: branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/config/TagBean.java
===================================================================
--- branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/config/TagBean.java	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/config/TagBean.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,94 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.builder.config;
+
+/**
+ * Java Bean for hold JSP tag configuration
+ * @author asmirnov at exadel.com (latest modification by $Author: ishabalov $)
+ * @version $Revision: 1.1.2.2 $ $Date: 2007/02/20 20:57:59 $
+ *
+ */
+public class TagBean extends JsfBean {
+
+	/**
+	 * Taglib short name for this tag -for generate different taglibs in task. 
+	 */
+	private String _taglib = null;
+	
+	private String _bodyContent = "JSP";
+	
+	private boolean _generate = true;
+	/**
+	 * Setup default tag superclass
+	 */
+	public TagBean() {
+		super();
+		setSuperclass("com.exadel.vcp.framework.taglib.UIComponentTagBase");
+	}
+
+	/**
+	 * @return Returns the taglib.
+	 */
+	public String getTaglib() {
+		return _taglib;
+	}
+
+	/**
+	 * @param taglib The taglib to set.
+	 */
+	public void setTaglib(String taglib) {
+		_taglib = taglib;
+	}
+
+	public String getBodyContent() {
+		return _bodyContent;
+	}
+
+	public void setBodyContent(String bodyContent) {
+		this._bodyContent = bodyContent;
+	}
+
+	/**
+	 * @return Returns the generate.
+	 */
+	public boolean isGenerate() {
+		return this._generate;
+	}
+
+	/**
+	 * @param generate The generate to set.
+	 */
+	public void setGenerate(boolean generate) {
+		this._generate = generate;
+	}
+	
+	@Override
+	public void setTest(TestClassHolder test) {
+		super.setTest(test);
+		test.setClassname(getClassname() + "TagTest");
+	}
+	
+	@Override
+	public TestClassHolder getTest() {
+		return super.getTest();
+	}
+}

Added: branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/config/TagHandlerBean.java
===================================================================
--- branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/config/TagHandlerBean.java	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/config/TagHandlerBean.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,48 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.builder.config;
+
+/**
+ * Bean for handle facelets tag class properties.
+ * @author shura (latest modification by $Author: ishabalov $)
+ * @version $Revision: 1.1.2.2 $ $Date: 2007/02/20 20:58:00 $
+ *
+ */
+public class TagHandlerBean extends JsfBean {
+	
+	private boolean _generate = false;
+
+	/**
+	 * @return Returns the generate.
+	 */
+	public boolean isGenerate() {
+		return this._generate;
+	}
+
+	/**
+	 * @param generate The generate to set.
+	 */
+	public void setGenerate(boolean generate) {
+		this._generate = generate;
+	}
+
+}

Added: branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/config/TestClassHolder.java
===================================================================
--- branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/config/TestClassHolder.java	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/config/TestClassHolder.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,43 @@
+package org.ajax4jsf.builder.config;
+
+/**
+ * Simple holder for test class name and test superclass name 
+ * @author dbiatenia
+ *
+ */
+public class TestClassHolder {
+
+	private String _classname;
+	
+	private String _superclassname = "org.ajax4jsf.tests.AbstractAjax4JsfTestCase";
+
+	public String getClassname() {
+		return _classname;
+	}
+
+	public void setClassname(String classname) {
+		this._classname = classname;
+	}
+
+	public String getSuperclassname() {
+		return _superclassname;
+	}
+
+	public void setSuperclassname(String superclassname) {
+		this._superclassname = superclassname;
+	}
+	
+	/**
+	 * Convert full class name to simple.
+	 * @return class name without package name. 
+	 */
+	public String getSimpleClassName() {
+		int lastPoint = getClassname().lastIndexOf('.');
+		if (lastPoint>0) {
+			return getClassname().substring(lastPoint+1);
+		}
+		return getClassname();
+	}
+	
+	
+}

Added: branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/config/ValidatorBean.java
===================================================================
--- branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/config/ValidatorBean.java	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/config/ValidatorBean.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,17 @@
+package org.ajax4jsf.builder.config;
+
+public class ValidatorBean extends ComponentBaseBean {
+	
+
+	// Map the id onto name
+	
+	public String getId() {
+		return super.getName();
+	}
+	
+	public void setId(String id)
+	{
+		super.setName(id);
+	}
+
+}

Added: branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/AbstractClassStubBuilder.java
===================================================================
--- branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/AbstractClassStubBuilder.java	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/AbstractClassStubBuilder.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,113 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.builder.generator;
+
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import net.sf.cglib.core.ClassEmitter;
+import net.sf.cglib.core.CodeEmitter;
+import net.sf.cglib.core.EmitUtils;
+import net.sf.cglib.core.MethodInfo;
+import net.sf.cglib.core.ReflectUtils;
+import net.sf.cglib.core.Signature;
+import net.sf.cglib.proxy.Enhancer;
+import net.sf.cglib.proxy.MethodInterceptor;
+
+import org.objectweb.asm.ClassVisitor;
+import org.objectweb.asm.Constants;
+import org.objectweb.asm.Type;
+
+/**
+ * @author Nick - mailto:nbelaevski at exadel.com
+ * created 20.04.2007
+ * 
+ */
+public class AbstractClassStubBuilder {
+	public static <T> T buildStub(final Class<T> clazz, MethodInterceptor interceptor, 
+			ClassLoader classLoader) {
+		Enhancer enhancer = new Enhancer() {
+			@Override
+			public void generateClass(ClassVisitor v) throws Exception {
+		        ClassEmitter ce = new ClassEmitter(v);
+		        ce.begin_class(Constants.V1_4,
+		                       Constants.ACC_PUBLIC,
+		                       getClassName(),
+		                       Type.getType(clazz),
+		                       null,
+		                       null);
+		        EmitUtils.null_constructor(ce);
+		        List methods = new ArrayList();
+		        getMethods(clazz, null, methods);
+		        
+		        for (Iterator iterator = methods.iterator(); iterator
+						.hasNext();) {
+					Method method = (Method) iterator.next();
+					
+					if (Modifier.isAbstract(method.getModifiers())) {
+						MethodInfo methodInfo = ReflectUtils.getMethodInfo(method);
+						Signature signature = methodInfo.getSignature();
+						Type returnType = signature.getReturnType();
+						
+						CodeEmitter e = ce.begin_method(method.getModifiers() & ~Modifier.ABSTRACT, 
+								signature, methodInfo.getExceptionTypes(), 
+								methodInfo.getAttribute());
+						
+						e.zero_or_null(returnType);
+						e.return_value();
+
+						Type[] argumentTypes = methodInfo.getSignature().getArgumentTypes();
+						int size = 0;
+						if (argumentTypes != null) {
+							for (int i = 0; i < argumentTypes.length; i++) {
+								size += argumentTypes[i].getSize();
+							}
+						}
+						
+						// 1 is for this
+						e.visitMaxs(returnType.getSize(), size + 1);
+					
+						e.end_method();
+					}
+		        }
+		        
+		        ce.end_class();
+			}
+		};
+		enhancer.setSuperclass(clazz);
+		enhancer.setCallbackType(MethodInterceptor.class);
+		enhancer.setClassLoader(classLoader != null ? 
+				classLoader : clazz.getClassLoader());
+		Class<T> instrumentedClass = enhancer.createClass(); 
+
+		Enhancer enhancer2 = new Enhancer();
+		enhancer2.setSuperclass(instrumentedClass);
+		enhancer2.setCallback(interceptor);
+		enhancer2.setClassLoader(instrumentedClass.getClassLoader());
+
+		return (T) enhancer2.create();
+	}
+}
+

Added: branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/BlankRendererGenerator.java
===================================================================
--- branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/BlankRendererGenerator.java	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/BlankRendererGenerator.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,157 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.builder.generator;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.Writer;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
+import org.ajax4jsf.builder.config.BuilderConfig;
+import org.ajax4jsf.builder.config.ComponentBean;
+import org.apache.velocity.Template;
+import org.apache.velocity.VelocityContext;
+
+
+/**
+* Class implement functionality for generate base  renderers java files,
+* for manual extention. If renderer property override in config file set to true,
+* override existing renderers files. 
+ * inner element of {@link org.ajax4jsf.builder.ant.JSFGeneratorTask}
+ * use in ant build.xml :
+ * &lt;jsfgenerator ... &gt;
+ *     ....
+ *     &lt;renderers ... /&gt;
+ *     ....
+ * &lt;/jsfgenerator&gt;
+ * attributes:
+  *  package - optional Java package name for override from configuration, used for create set of differern render-kits in one task
+* {@see com.exadel.vcp.builder.ant.InnerGenerator}
+  * @author asmirnov at exadel.com (latest modification by $Author: ishabalov $)
+ * @version $Revision: 1.1.2.2 $ $Date: 2007/02/20 20:58:00 $
+ *
+ */
+public class BlankRendererGenerator extends InnerGenerator {
+
+	private static final String RENDERER_TEMPLATE_NAME = "renderer.vm";
+
+	/**
+	 * Optional package name for override from config.
+	 */
+	private String _package = null;
+
+	/**
+	 * @return Returns the package.
+	 */
+	public String getPackage() {
+		return _package;
+	}
+	/**
+	 * @param package1 The package to set.
+	 */
+	public void setPackage(String package1) {
+		_package = package1;
+	}
+
+	/**
+	 * @param task
+	 */
+	public BlankRendererGenerator(JSFGeneratorConfiguration task, Logger log) {
+		super(task,log);
+		// TODO Auto-generated constructor stub
+	}
+
+	/* (non-Javadoc)
+	 * @see com.exadel.vcp.builder.ant.InnerGenerator#createFiles(com.exadel.vcp.builder.config.BuilderConfig)
+	 */
+	public void createFiles(BuilderConfig config) throws GeneratorException {
+		VelocityContext context = new VelocityContext();
+		Template template = getTemplate();
+//		context.put("templateName",COMPONENT_FILE_TEMPLATE);
+		// Put common properties
+		for (Iterator iter = config.getComponents().iterator(); iter.hasNext();) {
+			ComponentBean component = (ComponentBean) iter.next();
+			if (null != component.getRenderer() && component.getRenderer().isGenerate()) {
+				context.put("component", component);
+				context.put("renderer", component.getRenderer());
+				if (null == getPackage()) {
+					context.put("package", component.getRenderer()
+							.getPackageName());
+				} else {
+					context.put("package", getPackage());
+				}
+				Set<String> importClasses = new HashSet<String>();
+//				for (Iterator it = component.getProperties().iterator(); it
+//						.hasNext();) {
+//					PropertyBean property = (PropertyBean) it.next();
+//					// For non-primitive types, add import declaration.
+//					if (!property.isSimpleType() && !property.isExist()) {
+//						importClasses.add(property.getClassname());
+//					}
+//				}
+				importClasses.add(component.getClassname());
+				importClasses.add(component.getRenderer().getSuperclass());
+				context.put("imports", importClasses);
+				String resultPath ;
+				if (null == getPackage()) {
+					resultPath = component.getRenderer().getClassname().replace('.', '/') + ".java";
+				} else {
+					resultPath = getPackage().replace('.', '/') +"/"+component.getRenderer().getSimpleClassName()+ ".java";					
+				}
+						
+				File javaFile = new File(getDestDir(), resultPath);
+				File javaDir = javaFile.getParentFile();
+				if (!javaDir.exists()) {
+					javaDir.mkdirs();
+				}
+				try {
+					if (javaFile.exists()) {
+						if (component.getRenderer().isOverride()) {
+							javaFile.delete();
+						} else {
+							continue;
+						}
+					}
+					Writer out = new BufferedWriter(new FileWriter(javaFile));
+					template.merge(context, out);
+					out.flush();
+					out.close();
+				} catch (Exception e) {
+					throw new GeneratorException(
+							"Error create new Renderer Java file ", e);
+				}
+			}
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see com.exadel.vcp.builder.ant.InnerGenerator#getDefaultTemplateName()
+	 */
+	protected String getDefaultTemplateName() {
+		// TODO Auto-generated method stub
+		return RENDERER_TEMPLATE_NAME;
+	}
+
+}

Added: branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/ClassPatternSet.java
===================================================================
--- branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/ClassPatternSet.java	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/ClassPatternSet.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,473 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.builder.generator;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 
+ * @author shura
+ * 
+ */
+public class ClassPatternSet {
+
+	private static final char CLASS_SEPARATOR = '.';
+
+	private List<PatternEntry> _includes = new ArrayList<PatternEntry>();
+
+	private List<PatternEntry> _excludes = new ArrayList<PatternEntry>();
+
+	public class PatternEntry {
+		private String name;
+
+		public String getName() {
+			return name;
+		}
+
+		public void setName(String name) {
+			this.name = name;
+		}
+
+		@Override
+		public int hashCode() {
+
+			int hashCode = 0;
+			if (null != name) {
+				hashCode = name.hashCode();
+			}
+			return hashCode;
+		}
+		
+		@Override
+		public boolean equals(Object obj) {
+			if (obj instanceof PatternEntry) {
+				PatternEntry entry = (PatternEntry) obj;
+				if (null != name) {
+					return name.equals(entry.getName());
+				} else {
+					return entry.getName() == null;
+				}
+			}
+			return false;
+		}
+	}
+
+	public PatternEntry createExclude() {
+		PatternEntry entry = new PatternEntry();
+		_excludes.add(entry);
+		return entry;
+	}
+
+	public PatternEntry createInclude() {
+		PatternEntry entry = new PatternEntry();
+		_includes.add(entry);
+		return entry;
+	}
+
+	public String[] getExcludePatterns() {
+		String[] excludesPatterns = new String[_excludes.size()];
+		int i = 0;
+		for (PatternEntry entry : _excludes) {
+			excludesPatterns[i++] = entry.getName();
+		}
+		return excludesPatterns;
+	}
+
+	public void setExcludes(String excludes) {
+		addPatterns(_excludes,excludes);
+
+	}
+
+	private void addPatterns(List<PatternEntry> list, String patterns) {
+		String[] strings = patterns.split(",");
+		for (int i = 0; i < strings.length; i++) {
+			String string = strings[i];
+			PatternEntry entry = new PatternEntry();
+			entry.setName(string);
+			list.add(entry);
+		}
+		
+	}
+
+	public void setIncludes(String includes) {
+		addPatterns(_includes,includes);
+
+	}
+
+	public String[] getIncludePatterns() {
+		String[] includesPatterns = new String[_includes.size()];
+		int i = 0;
+		for (PatternEntry entry : _includes) {
+			includesPatterns[i++] = entry.getName();
+		}
+		return includesPatterns;
+	}
+
+	public boolean matchClass(String className){
+		boolean included = true;
+		if (_includes.size()>0) {
+			included = matchClass(_includes,className);			
+		}
+		if (_excludes.size()>0 && included) {
+			included = ! matchClass(_excludes,className);
+		}
+		return included;
+	}
+
+	private boolean matchClass(List<PatternEntry> list, String className) {
+		for (PatternEntry entry : list) {
+			if (matchPath(entry.getName(),className)) {
+				return true;
+			}
+		}
+		return false;
+	}
+
+	
+    /**
+     * Tests whether or not a given path matches a given pattern.
+     *
+     * @param pattern The pattern to match against. Must not be
+     *                <code>null</code>.
+     * @param str     The path to match, as a String. Must not be
+     *                <code>null</code>.
+     *
+     * @return <code>true</code> if the pattern matches against the string,
+     *         or <code>false</code> otherwise.
+     */
+    boolean matchPath(String pattern, String str) {
+        // When str starts with a File.separator, pattern has to start with a
+        // File.separator.
+        // When pattern starts with a File.separator, str has to start with a
+        // File.separator.
+        if ((str.charAt(0) == CLASS_SEPARATOR)
+                != (pattern.charAt(0) ==CLASS_SEPARATOR)) {
+            return false;
+        }
+
+        String[] patDirs = tokenizePathAsArray(pattern);
+        String[] strDirs = tokenizePathAsArray(str);
+
+        int patIdxStart = 0;
+        int patIdxEnd = patDirs.length - 1;
+        int strIdxStart = 0;
+        int strIdxEnd = strDirs.length - 1;
+
+        // up to first '**'
+        while (patIdxStart <= patIdxEnd && strIdxStart <= strIdxEnd) {
+            String patDir = patDirs[patIdxStart];
+            if (patDir.equals("**")) {
+                break;
+            }
+            if (!match(patDir, strDirs[strIdxStart])) {
+                patDirs = null;
+                strDirs = null;
+                return false;
+            }
+            patIdxStart++;
+            strIdxStart++;
+        }
+        if (strIdxStart > strIdxEnd) {
+            // String is exhausted
+            for (int i = patIdxStart; i <= patIdxEnd; i++) {
+                if (!patDirs[i].equals("**")) {
+                    patDirs = null;
+                    strDirs = null;
+                    return false;
+                }
+            }
+            return true;
+        } else {
+            if (patIdxStart > patIdxEnd) {
+                // String not exhausted, but pattern is. Failure.
+                patDirs = null;
+                strDirs = null;
+                return false;
+            }
+        }
+
+        // up to last '**'
+        while (patIdxStart <= patIdxEnd && strIdxStart <= strIdxEnd) {
+            String patDir = patDirs[patIdxEnd];
+            if (patDir.equals("**")) {
+                break;
+            }
+            if (!match(patDir, strDirs[strIdxEnd])) {
+                patDirs = null;
+                strDirs = null;
+                return false;
+            }
+            patIdxEnd--;
+            strIdxEnd--;
+        }
+        if (strIdxStart > strIdxEnd) {
+            // String is exhausted
+            for (int i = patIdxStart; i <= patIdxEnd; i++) {
+                if (!patDirs[i].equals("**")) {
+                    patDirs = null;
+                    strDirs = null;
+                    return false;
+                }
+            }
+            return true;
+        }
+
+        while (patIdxStart != patIdxEnd && strIdxStart <= strIdxEnd) {
+            int patIdxTmp = -1;
+            for (int i = patIdxStart + 1; i <= patIdxEnd; i++) {
+                if (patDirs[i].equals("**")) {
+                    patIdxTmp = i;
+                    break;
+                }
+            }
+            if (patIdxTmp == patIdxStart + 1) {
+                // '**/**' situation, so skip one
+                patIdxStart++;
+                continue;
+            }
+            // Find the pattern between padIdxStart & padIdxTmp in str between
+            // strIdxStart & strIdxEnd
+            int patLength = (patIdxTmp - patIdxStart - 1);
+            int strLength = (strIdxEnd - strIdxStart + 1);
+            int foundIdx = -1;
+            strLoop:
+                        for (int i = 0; i <= strLength - patLength; i++) {
+                            for (int j = 0; j < patLength; j++) {
+                                String subPat = patDirs[patIdxStart + j + 1];
+                                String subStr = strDirs[strIdxStart + i + j];
+                                if (!match(subPat, subStr)) {
+                                    continue strLoop;
+                                }
+                            }
+
+                            foundIdx = strIdxStart + i;
+                            break;
+                        }
+
+            if (foundIdx == -1) {
+                patDirs = null;
+                strDirs = null;
+                return false;
+            }
+
+            patIdxStart = patIdxTmp;
+            strIdxStart = foundIdx + patLength;
+        }
+
+        for (int i = patIdxStart; i <= patIdxEnd; i++) {
+            if (!patDirs[i].equals("**")) {
+                patDirs = null;
+                strDirs = null;
+                return false;
+            }
+        }
+
+        return true;
+    }
+    
+    /**
+     * Tests whether or not a string matches against a pattern.
+     * The pattern may contain two special characters:<br>
+     * '*' means zero or more characters<br>
+     * '?' means one and only one character
+     *
+     * @param pattern The pattern to match against.
+     *                Must not be <code>null</code>.
+     * @param str     The string which must be matched against the pattern.
+     *                Must not be <code>null</code>.
+     *
+     * @return <code>true</code> if the string matches against the pattern,
+     *         or <code>false</code> otherwise.
+     */
+    boolean match(String pattern, String str) {
+        char[] patArr = pattern.toCharArray();
+        char[] strArr = str.toCharArray();
+        int patIdxStart = 0;
+        int patIdxEnd = patArr.length - 1;
+        int strIdxStart = 0;
+        int strIdxEnd = strArr.length - 1;
+        char ch;
+
+        boolean containsStar = false;
+        for (int i = 0; i < patArr.length; i++) {
+            if (patArr[i] == '*') {
+                containsStar = true;
+                break;
+            }
+        }
+
+        if (!containsStar) {
+            // No '*'s, so we make a shortcut
+            if (patIdxEnd != strIdxEnd) {
+                return false; // Pattern and string do not have the same size
+            }
+            for (int i = 0; i <= patIdxEnd; i++) {
+                ch = patArr[i];
+                if (ch != '?') {
+                    if ( ch != strArr[i]) {
+                        return false; // Character mismatch
+                    }
+                }
+            }
+            return true; // String matches against pattern
+        }
+
+        if (patIdxEnd == 0) {
+            return true; // Pattern contains only '*', which matches anything
+        }
+
+        // Process characters before first star
+        while ((ch = patArr[patIdxStart]) != '*' && strIdxStart <= strIdxEnd) {
+            if (ch != '?') {
+                if ( ch != strArr[strIdxStart]) {
+                    return false; // Character mismatch
+                }
+            }
+            patIdxStart++;
+            strIdxStart++;
+        }
+        if (strIdxStart > strIdxEnd) {
+            // All characters in the string are used. Check if only '*'s are
+            // left in the pattern. If so, we succeeded. Otherwise failure.
+            for (int i = patIdxStart; i <= patIdxEnd; i++) {
+                if (patArr[i] != '*') {
+                    return false;
+                }
+            }
+            return true;
+        }
+
+        // Process characters after last star
+        while ((ch = patArr[patIdxEnd]) != '*' && strIdxStart <= strIdxEnd) {
+            if (ch != '?') {
+                if ( ch != strArr[strIdxEnd]) {
+                    return false; // Character mismatch
+                }
+            }
+            patIdxEnd--;
+            strIdxEnd--;
+        }
+        if (strIdxStart > strIdxEnd) {
+            // All characters in the string are used. Check if only '*'s are
+            // left in the pattern. If so, we succeeded. Otherwise failure.
+            for (int i = patIdxStart; i <= patIdxEnd; i++) {
+                if (patArr[i] != '*') {
+                    return false;
+                }
+            }
+            return true;
+        }
+
+        // process pattern between stars. padIdxStart and patIdxEnd point
+        // always to a '*'.
+        while (patIdxStart != patIdxEnd && strIdxStart <= strIdxEnd) {
+            int patIdxTmp = -1;
+            for (int i = patIdxStart + 1; i <= patIdxEnd; i++) {
+                if (patArr[i] == '*') {
+                    patIdxTmp = i;
+                    break;
+                }
+            }
+            if (patIdxTmp == patIdxStart + 1) {
+                // Two stars next to each other, skip the first one.
+                patIdxStart++;
+                continue;
+            }
+            // Find the pattern between padIdxStart & padIdxTmp in str between
+            // strIdxStart & strIdxEnd
+            int patLength = (patIdxTmp - patIdxStart - 1);
+            int strLength = (strIdxEnd - strIdxStart + 1);
+            int foundIdx = -1;
+            strLoop:
+            for (int i = 0; i <= strLength - patLength; i++) {
+                for (int j = 0; j < patLength; j++) {
+                    ch = patArr[patIdxStart + j + 1];
+                    if (ch != '?') {
+                        if ( ch != strArr[strIdxStart + i
+                                + j]) {
+                            continue strLoop;
+                        }
+                    }
+                }
+
+                foundIdx = strIdxStart + i;
+                break;
+            }
+
+            if (foundIdx == -1) {
+                return false;
+            }
+
+            patIdxStart = patIdxTmp;
+            strIdxStart = foundIdx + patLength;
+        }
+
+        // All characters in the string are used. Check if only '*'s are left
+        // in the pattern. If so, we succeeded. Otherwise failure.
+        for (int i = patIdxStart; i <= patIdxEnd; i++) {
+            if (patArr[i] != '*') {
+                return false;
+            }
+        }
+        return true;
+    }
+
+
+    /**
+     * Split package/classname pattern to strings array
+     */
+     String[] tokenizePathAsArray(String path) {
+        int start = 0;
+        int len = path.length();
+        int count = 0;
+        for (int pos = 0; pos < len; pos++) {
+            if (path.charAt(pos) == CLASS_SEPARATOR) {
+                if (pos != start) {
+                    count++;
+                }
+                start = pos + 1;
+            }
+        }
+        if (len != start) {
+            count++;
+        }
+        String[] l = new String[count];
+        count = 0;
+        start = 0;
+        for (int pos = 0; pos < len; pos++) {
+            if (path.charAt(pos) == CLASS_SEPARATOR) {
+                if (pos != start) {
+                    String tok = path.substring(start, pos);
+                    l[count++] = tok;
+                }
+                start = pos + 1;
+            }
+        }
+        if (len != start) {
+            String tok = path.substring(start);
+            l[count/*++*/] = tok;
+        }
+        return l;
+    }
+
+}

Added: branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/ComponentGenerator.java
===================================================================
--- branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/ComponentGenerator.java	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/ComponentGenerator.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,123 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.builder.generator;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.Writer;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
+import org.ajax4jsf.builder.config.BuilderConfig;
+import org.ajax4jsf.builder.config.ComponentBean;
+import org.ajax4jsf.builder.config.PropertyBean;
+import org.apache.velocity.Template;
+import org.apache.velocity.VelocityContext;
+
+
+/**
+ * Class implement functionality for generate component java files
+ * inner element of {@link org.ajax4jsf.builder.ant.JSFGeneratorTask}
+ * use in ant build.xml :
+ * &lt;jsfgenerator ... &gt;
+ *     ....
+ *     &lt;components ... /&gt;
+ *     ....
+ * &lt;/jsfgenerator&gt;
+ * attributes:
+ * {@see com.exadel.vcp.builder.ant.InnerGenerator}
+ * @author asmirnov at exadel.com (latest modification by $Author: ishabalov $)
+ * @version $Revision: 1.1.2.3 $ $Date: 2007/02/20 20:58:00 $
+ *
+ */
+public class ComponentGenerator extends InnerGenerator {
+
+	private static final String COMPONENT_FILE_TEMPLATE = "component.vm";
+	/**
+	 * @param task
+	 */
+	public ComponentGenerator(JSFGeneratorConfiguration task, Logger log) {
+		super(task,log);
+		// TODO Auto-generated constructor stub
+	}
+
+	/* (non-Javadoc)
+	 * @see com.exadel.vcp.builder.ant.InnerGenerator#createFiles(com.exadel.vcp.builder.config.BuilderConfig)
+	 */
+	public void createFiles(BuilderConfig config) throws GeneratorException {
+		VelocityContext context = new VelocityContext();
+		Template template = getTemplate();
+		context.put("generator",this);
+		// Put common properties
+		for (Iterator iter = config.getComponents().iterator(); iter.hasNext();) {
+			ComponentBean component = (ComponentBean) iter.next();
+			info("Create class file "+component.getClassname());
+			if (component.isGenerate()) {
+				context.put("component", component);
+				context.put("renderer", component.getRenderer());
+				context.put("package", component.getPackageName());
+				Set<String> importClasses = new HashSet<String>();
+				for (Iterator it = component.getProperties().iterator(); it
+						.hasNext();) {
+					PropertyBean property = (PropertyBean) it.next();
+					// For non-primitive types, add import declaration.
+					if (!property.isSimpleType() && !property.isExist()) {
+						importClasses.add(property.getClassname());
+					}
+				}
+				importClasses.add(component.getSuperclass());
+				context.put("imports", importClasses);
+				String resultPath = component.getClassname().replace('.', '/')
+						+ ".java";
+				File javaFile = new File(getDestDir(), resultPath);
+				File javaDir = javaFile.getParentFile();
+				if (!javaDir.exists()) {
+					javaDir.mkdirs();
+				}
+				try {
+					if (javaFile.exists()) {
+						javaFile.delete();
+					}
+					Writer out = new BufferedWriter(new FileWriter(javaFile));
+					template.merge(context, out);
+					out.flush();
+					out.close();
+				} catch (Exception e) {
+					throw new GeneratorException(
+							"Error create new Component Java file ", e);
+				}
+			}
+		}
+		
+	}
+
+	/* (non-Javadoc)
+	 * @see com.exadel.vcp.builder.ant.InnerGenerator#getDefaultTemplateName()
+	 */
+	protected String getDefaultTemplateName() {
+		// TODO Auto-generated method stub
+		return COMPONENT_FILE_TEMPLATE;
+	}
+
+}

Added: branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/ComponentTagGenerator.java
===================================================================
--- branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/ComponentTagGenerator.java	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/ComponentTagGenerator.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,144 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.builder.generator;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.Writer;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
+import org.ajax4jsf.builder.config.BuilderConfig;
+import org.ajax4jsf.builder.config.ComponentBean;
+import org.ajax4jsf.builder.config.PropertyBean;
+import org.ajax4jsf.builder.config.TagBean;
+import org.apache.velocity.Template;
+import org.apache.velocity.VelocityContext;
+
+
+/**
+ * Class implement functionality for generate jap tags java files
+ * inner element of {@link org.ajax4jsf.builder.ant.JSFGeneratorTask}
+ * use in ant build.xml :
+ * &lt;jsfgenerator ... &gt;
+ *     ....
+ *     &lt;tags ... /&gt;
+ *     ....
+ * &lt;/jsfgenerator&gt;
+ * attributes:
+ * {@see com.exadel.vcp.builder.ant.InnerGenerator}
+ * @author asmirnov at exadel.com (latest modification by $Author: ishabalov $)
+ * @version $Revision: 1.1.2.3 $ $Date: 2007/02/20 20:58:01 $
+ *
+ */
+public class ComponentTagGenerator extends InnerGenerator {
+
+	private static final String TAG_TEMPLATE_NAME = "componentTag.vm";
+
+	private String _package = null;
+
+	/**
+	 * @return Returns the package.
+	 */
+	public String getPackage() {
+		return _package;
+	}
+	/**
+	 * @param package1 The package to set.
+	 */
+	public void setPackage(String package1) {
+		_package = package1;
+	}
+	/**
+	 * @param task
+	 */
+	public ComponentTagGenerator(JSFGeneratorConfiguration task, Logger log) {
+		super(task,log);
+		// TODO Auto-generated constructor stub
+	}
+
+	/* (non-Javadoc)
+	 * @see com.exadel.vcp.builder.ant.InnerGenerator#createFiles(com.exadel.vcp.builder.config.BuilderConfig)
+	 */
+	public void createFiles(BuilderConfig config) throws GeneratorException {
+		VelocityContext context = new VelocityContext();
+		context.put("generator",this);
+		Template template = getTemplate();
+		// Put common properties
+		for (Iterator iter = config.getComponents().iterator(); iter.hasNext();) {
+			ComponentBean component = (ComponentBean) iter.next();
+			TagBean tag = component.getTag();
+			if ( null !=  tag && null !=tag.getClassname() && tag.isGenerate()) {
+				info("Create tag class file "+component.getClassname());
+				context.put("component", component);
+				if (null != component.getRenderer()) {
+					context.put("renderer", component.getRenderer());
+				} else {
+					context.put("renderer",Boolean.FALSE);
+				}
+				context.put("tag", component.getTag());
+				context.put("package", component.getTag().getPackageName());
+				Set<String> importClasses = new HashSet<String>();
+				for (Iterator it = component.getProperties().iterator(); it
+						.hasNext();) {
+					PropertyBean property = (PropertyBean) it.next();
+					// For non-primitive types, add import declaration.
+					if (!property.isSimpleType() && !property.isHidden()) {
+						importClasses.add(property.getClassname());
+					}
+				}
+				importClasses.add(component.getTag().getSuperclass());
+				context.put("imports", importClasses);
+				String resultPath = component.getTag().getClassname().replace('.', '/')
+						+ ".java";
+				File javaFile = new File(getDestDir(), resultPath);
+				File javaDir = javaFile.getParentFile();
+				if (!javaDir.exists()) {
+					javaDir.mkdirs();
+				}
+				try {
+					if (javaFile.exists()) {
+						javaFile.delete();
+					}
+					Writer out = new BufferedWriter(new FileWriter(javaFile));
+					template.merge(context, out);
+					out.flush();
+					out.close();
+				} catch (Exception e) {
+					throw new GeneratorException(
+							"Error create new Component JSP Tag Java file ", e);
+				}
+			}
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see com.exadel.vcp.builder.ant.InnerGenerator#getDefaultTemplateName()
+	 */
+	protected String getDefaultTemplateName() {
+		// TODO Auto-generated method stub
+		return TAG_TEMPLATE_NAME;
+	}
+
+}

Added: branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/ComponentTestGenerator.java
===================================================================
--- branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/ComponentTestGenerator.java	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/ComponentTestGenerator.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,87 @@
+package org.ajax4jsf.builder.generator;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.Writer;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
+import org.ajax4jsf.builder.config.BuilderConfig;
+import org.ajax4jsf.builder.config.ComponentBean;
+import org.ajax4jsf.builder.config.PropertyBean;
+import org.apache.velocity.Template;
+import org.apache.velocity.VelocityContext;
+
+public class ComponentTestGenerator extends InnerGenerator{
+
+	private static final String COMPONENT_FILE_TEMPLATE = "componenttest.vm";	
+	
+	public ComponentTestGenerator(JSFGeneratorConfiguration config, Logger log) {
+		super(config, log);
+		// TODO Auto-generated constructor stub
+	}
+
+	@Override
+	public void createFiles(BuilderConfig config) throws GeneratorException {
+		VelocityContext context = new VelocityContext();
+		Template template = getTemplate();
+		context.put("generator",this);
+		
+		context.put("testDataGenerator", new TestDataGenerator(getClassLoader(), getLog()));
+		
+		// Put common properties
+		for (Iterator iter = config.getComponents().iterator(); iter.hasNext();) {
+			ComponentBean component = (ComponentBean) iter.next();
+			if(component.getTest() != null){
+				info("Create component test class file for component "+component.getClassname());
+				if (component.isGenerate()) {
+					context.put("component", component);
+					context.put("renderer", component.getRenderer());
+					context.put("package", component.getPackageName());
+					Set<String> importClasses = new HashSet<String>();
+					for (Iterator it = component.getProperties().iterator(); it
+							.hasNext();) {
+						PropertyBean property = (PropertyBean) it.next();
+						// For non-primitive types, add import declaration.
+						if (!property.isSimpleType() && !property.isExist()) {
+							importClasses.add(property.getClassname());
+						}
+					}
+					importClasses.add(component.getTest().getSuperclassname());
+					context.put("imports", importClasses);
+					String resultPath = component.getTest().getClassname().replace('.', '/')
+							+ ".java";
+					File javaFile = new File(getDestDir(), resultPath);
+					File javaDir = javaFile.getParentFile();
+					if (!javaDir.exists()) {
+						javaDir.mkdirs();
+					}
+					try {
+						if (javaFile.exists()) {
+							javaFile.delete();
+						}
+						Writer out = new BufferedWriter(new FileWriter(javaFile));
+						template.merge(context, out);
+						out.flush();
+						out.close();
+					} catch (Exception e) {
+						throw new GeneratorException(
+								"Error create new Component Java file ", e);
+					}
+				}
+				
+			}
+		}
+		
+	}
+
+	@Override
+	protected String getDefaultTemplateName() {
+		// TODO Auto-generated method stub
+		return COMPONENT_FILE_TEMPLATE;
+	}
+
+	
+}

Added: branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/ConverterGenerator.java
===================================================================
--- branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/ConverterGenerator.java	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/ConverterGenerator.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,107 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.builder.generator;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.Writer;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
+import org.ajax4jsf.builder.config.BuilderConfig;
+import org.ajax4jsf.builder.config.ConverterBean;
+import org.ajax4jsf.builder.config.PropertyBean;
+import org.ajax4jsf.builder.config.ValidatorBean;
+import org.apache.velocity.Template;
+import org.apache.velocity.VelocityContext;
+
+
+
+/**
+ * This class generates an implementation of a JSF converter
+ * 
+ * Uses the converter.vm velocimacro
+ *
+ */
+public class ConverterGenerator extends InnerGenerator {
+
+	private static final String COMPONENT_FILE_TEMPLATE = "converter.vm";
+	/**
+	 * @param task
+	 */
+	public ConverterGenerator(JSFGeneratorConfiguration task, Logger log) {
+		super(task,log);
+	}
+
+	public void createFiles(BuilderConfig config) throws GeneratorException {
+		VelocityContext context = new VelocityContext();
+		Template template = getTemplate();
+		context.put("generator",this);
+		// Put common properties
+		for (Iterator iter = config.getConverters().iterator(); iter.hasNext();) {
+			ConverterBean converter = (ConverterBean) iter.next();
+			info("Create class file "+converter.getClassname());
+			if (converter.isGenerate()) {
+				context.put("converter", converter);
+				context.put("package", converter.getPackageName());
+				Set<String> importClasses = new HashSet<String>();
+				for (Iterator it = converter.getProperties().iterator(); it
+						.hasNext();) {
+					PropertyBean property = (PropertyBean) it.next();
+					// For non-primitive types, add import declaration.
+					if (!property.isSimpleType() && !property.isExist()) {
+						importClasses.add(property.getClassname());
+					}
+				}
+				importClasses.add(converter.getSuperclass());
+				context.put("imports", importClasses);
+				String resultPath = converter.getClassname().replace('.', '/')
+						+ ".java";
+				File javaFile = new File(getDestDir(), resultPath);
+				File javaDir = javaFile.getParentFile();
+				if (!javaDir.exists()) {
+					javaDir.mkdirs();
+				}
+				try {
+					if (javaFile.exists()) {
+						javaFile.delete();
+					}
+					Writer out = new BufferedWriter(new FileWriter(javaFile));
+					template.merge(context, out);
+					out.flush();
+					out.close();
+				} catch (Exception e) {
+					throw new GeneratorException(
+							"Error generating converter: " + converter.getClassname(), e);
+				}
+			}
+		}
+		
+	}
+
+	protected String getDefaultTemplateName() {
+		return COMPONENT_FILE_TEMPLATE;
+	}
+
+}

Added: branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/ConverterTagGenerator.java
===================================================================
--- branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/ConverterTagGenerator.java	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/ConverterTagGenerator.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,137 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.builder.generator;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.Writer;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
+import org.ajax4jsf.builder.config.BuilderConfig;
+import org.ajax4jsf.builder.config.ConverterBean;
+import org.ajax4jsf.builder.config.PropertyBean;
+import org.ajax4jsf.builder.config.TagBean;
+import org.ajax4jsf.builder.config.ValidatorBean;
+import org.apache.velocity.Template;
+import org.apache.velocity.VelocityContext;
+
+
+/**
+ * Class implement functionality for generate jsp tags for validators
+ * inner element of {@link org.ajax4jsf.builder.ant.JSFGeneratorTask}
+ * use in ant build.xml :
+ * &lt;jsfgenerator ... &gt;
+ *     ....
+ *     &lt;tags ... /&gt;
+ *     ....
+ * &lt;/jsfgenerator&gt;
+ * attributes:
+ * {@see com.exadel.vcp.builder.ant.InnerGenerator}
+ *
+ */
+public class ConverterTagGenerator extends InnerGenerator {
+
+	private static final String TAG_TEMPLATE_NAME = "converterTag.vm";
+
+	private String _package = null;
+
+	/**
+	 * @return Returns the package.
+	 */
+	public String getPackage() {
+		return _package;
+	}
+	/**
+	 * @param package1 The package to set.
+	 */
+	public void setPackage(String package1) {
+		_package = package1;
+	}
+	/**
+	 * @param task
+	 */
+	public ConverterTagGenerator(JSFGeneratorConfiguration task, Logger log) {
+		super(task,log);
+	}
+
+	/* (non-Javadoc)
+	 * @see com.exadel.vcp.builder.ant.InnerGenerator#createFiles(com.exadel.vcp.builder.config.BuilderConfig)
+	 */
+	public void createFiles(BuilderConfig config) throws GeneratorException {
+		VelocityContext context = new VelocityContext();
+		context.put("generator",this);
+		Template template = getTemplate();
+		// Put common properties
+		for (Iterator iter = config.getConverters().iterator(); iter.hasNext();) {
+			ConverterBean converter = (ConverterBean) iter.next();
+			TagBean tag = converter.getTag();
+			if ( null !=  tag && null !=tag.getClassname() && tag.isGenerate()) {
+				info("Create tag class file "+converter.getClassname());
+				context.put("converter", converter);
+				
+				context.put("tag", converter.getTag());
+				context.put("package", converter.getTag().getPackageName());
+				Set<String> importClasses = new HashSet<String>();
+				for (Iterator it = converter.getProperties().iterator(); it
+						.hasNext();) {
+					PropertyBean property = (PropertyBean) it.next();
+					// For non-primitive types, add import declaration.
+					if (!property.isSimpleType() && !property.isHidden()) {
+						importClasses.add(property.getClassname());
+					}
+				}
+				importClasses.add(converter.getTag().getSuperclass());
+				context.put("imports", importClasses);
+				String resultPath = converter.getTag().getClassname().replace('.', '/')
+						+ ".java";
+				File javaFile = new File(getDestDir(), resultPath);
+				File javaDir = javaFile.getParentFile();
+				if (!javaDir.exists()) {
+					javaDir.mkdirs();
+				}
+				try {
+					if (javaFile.exists()) {
+						javaFile.delete();
+					}
+					Writer out = new BufferedWriter(new FileWriter(javaFile));
+					template.merge(context, out);
+					out.flush();
+					out.close();
+				} catch (Exception e) {
+					throw new GeneratorException(
+							"Error generating JSP Tag Java file for validator " + converter.getName(), e);
+				}
+			}
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see com.exadel.vcp.builder.ant.InnerGenerator#getDefaultTemplateName()
+	 */
+	protected String getDefaultTemplateName() {
+		return TAG_TEMPLATE_NAME;
+	}
+
+}

Added: branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/FaceletsTaglibGenerator.java
===================================================================
--- branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/FaceletsTaglibGenerator.java	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/FaceletsTaglibGenerator.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,258 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.builder.generator;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.Writer;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.ajax4jsf.builder.config.BuilderConfig;
+import org.ajax4jsf.builder.config.ComponentBean;
+import org.ajax4jsf.builder.config.ConverterBean;
+import org.ajax4jsf.builder.config.ComponentBaseBean;
+import org.ajax4jsf.builder.config.ListenerBean;
+import org.ajax4jsf.builder.config.ValidatorBean;
+import org.apache.velocity.Template;
+import org.apache.velocity.VelocityContext;
+
+/**
+ * @author asmirnov at exadel.com (latest modification by $Author: ishabalov $)
+ * @version $Revision: 1.1.2.5 $ $Date: 2007/02/20 20:58:00 $
+ *
+ */
+public class FaceletsTaglibGenerator extends XMLConfigGenerator {
+
+	private static final String FACELETS_TAGLIB_TEMPLATE_NAME = "facelets.taglib.vm";
+
+	private File _taglib = null;
+	
+	private String _uri = null;
+	
+	private String _shortname = null;
+	
+	private String _description = null;
+	
+	private String _displayName = null;
+
+	/**
+	 * @param task
+	 */
+	public FaceletsTaglibGenerator(JSFGeneratorConfiguration task, Logger log) {
+		super(task,log);
+		// TODO Auto-generated constructor stub
+	}
+
+	/* (non-Javadoc)
+	 * @see com.exadel.vcp.builder.ant.InnerGenerator#createFiles(com.exadel.vcp.builder.config.BuilderConfig)
+	 */
+	public void createFiles(BuilderConfig config) throws GeneratorException {
+		VelocityContext context = new VelocityContext();
+		Template template = getTemplate();
+		// Put common properties
+		List<ComponentBean> components = new ArrayList<ComponentBean>();
+		for (Iterator iter = config.getComponents().iterator(); iter.hasNext();) {
+			ComponentBean component = (ComponentBean) iter.next();
+			boolean includeComponent = true;
+			// Check include patterns
+			if (component.getTag() != null || component.getTaghandler() != null) {
+				includeComponent = isIncludeComponent(component);
+				if (includeComponent) {
+					info("Component "+component.getName() +" included to taglib "+getShortname());
+					components.add(component);
+				} else {
+					info("Component "+component.getName() +" excluded from taglib "+getShortname());						
+				}
+			}
+		}
+		
+		List<ValidatorBean> validators = new ArrayList<ValidatorBean>();
+		for (Iterator iter = config.getValidators().iterator(); iter.hasNext();) {
+			ValidatorBean validator = (ValidatorBean) iter.next();
+			boolean includeValidator = true;
+			// Check include patterns
+			if (validator.getTag() != null || validator.getTaghandler() != null) {
+				includeValidator = isIncludeComponent(validator);
+				if (includeValidator) {
+					info("Validator "+validator.getName() +" included to taglib "+getShortname());
+					validators.add(validator);
+				} else {
+					info("Validator "+validator.getName() +" excluded from taglib "+getShortname());						
+				}
+			}
+		}
+		
+		List<ConverterBean> converters = new ArrayList<ConverterBean>();
+		for (Iterator iter = config.getConverters().iterator(); iter.hasNext();) {
+			ConverterBean converter = (ConverterBean) iter.next();
+			boolean includeConverter = true;
+			// Check include patterns
+			if (converter.getTag() != null || converter.getTaghandler() != null) {
+				includeConverter = isIncludeComponent(converter);
+				if (includeConverter) {
+					info("Converter "+converter.getName() +" included to taglib "+getShortname());
+					converters.add(converter);
+				} else {
+					info("Converter "+converter.getName() +" excluded from taglib "+getShortname());						
+				}
+			}
+		}
+
+		List<ListenerBean> listeners = new ArrayList<ListenerBean>();
+		for (ListenerBean bean : config.getListeners()) {
+			for (ComponentBaseBean componentBean : bean.getSuitableComponents()) {
+				if (components.contains(componentBean)) {
+					listeners.add(bean);
+					break;
+				}
+			}
+		}
+
+		if (components.size() > 0 || validators.size() > 0 || converters.size() > 0) {
+				if (listeners.size() > 0) {
+					context.put("listeners", listeners);
+				}
+
+				if (components.size() > 0)
+				{
+					context.put("components", components);
+				}
+				if (validators.size() > 0)
+				{
+					context.put("validators", validators);
+				}
+				if (converters.size() > 0)
+				{
+					context.put("converters", converters);
+				}
+				context.put("taglib", this);
+				File taglibFile = getTaglib();//new File(getDestDir(), resultPath);
+				File javaDir = taglibFile.getParentFile();
+				if (!javaDir.exists()) {
+					javaDir.mkdirs();
+				}
+				try {
+					if (taglibFile.exists()) {
+						taglibFile.delete();
+					}
+					Writer out = new BufferedWriter(new FileWriter(taglibFile));
+					template.merge(context, out);
+					out.flush();
+					out.close();
+				} catch (Exception e) {
+					throw new GeneratorException(
+							"Error create new taglib file ", e);
+				}
+		}
+
+	}
+
+	/* (non-Javadoc)
+	 * @see com.exadel.vcp.builder.ant.InnerGenerator#getDefaultTemplateName()
+	 */
+	protected String getDefaultTemplateName() {
+		// TODO Auto-generated method stub
+		return FACELETS_TAGLIB_TEMPLATE_NAME;
+	}
+
+	/**
+	 * @return Returns the description.
+	 */
+	public String getDescription() {
+		return _description;
+	}
+
+	/**
+	 * @param description The description to set.
+	 */
+	public void setDescription(String description) {
+		_description = description;
+	}
+
+	/**
+	 * @return Returns the displayName.
+	 */
+	public String getDisplayName() {
+		return _displayName;
+	}
+
+	/**
+	 * @param displayName The displayName to set.
+	 */
+	public void setDisplayName(String displayName) {
+		_displayName = displayName;
+	}
+
+	/**
+	 * @return Returns the shortName.
+	 */
+	public String getShortname() {
+		return _shortname;
+	}
+
+	/**
+	 * @param shortName The shortName to set.
+	 */
+	public void setShortname(String shortName) {
+		_shortname = shortName;
+	}
+
+	/**
+	 * @return Returns the taglib.
+	 */
+	public File getTaglib() {
+		return _taglib;
+	}
+
+	/**
+	 * @param taglib The taglib to set.
+	 */
+	public void setTaglib(File taglib) {
+		_taglib = taglib;
+	}
+
+	/**
+	 * @return Returns the uri.
+	 */
+	public String getUri() {
+		return _uri;
+	}
+
+	/**
+	 * @param uri The uri to set.
+	 */
+	public void setUri(String uri) {
+		_uri = uri;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.builder.generator.XMLConfigGenerator#getRootTag()
+	 */
+	protected String getRootTag() {
+		
+		return "facelet-taglib";
+	}
+
+}

Added: branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/FacesConfigGenerator.java
===================================================================
--- branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/FacesConfigGenerator.java	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/FacesConfigGenerator.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,176 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.builder.generator;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.Writer;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.ajax4jsf.builder.config.BuilderConfig;
+import org.apache.velocity.Template;
+import org.apache.velocity.VelocityContext;
+
+/**
+ * Class implement functionality for generate faces-config file inner element of
+ * {@link org.ajax4jsf.builder.ant.JSFGeneratorTask} use in ant build.xml :
+ * &lt;jsfgenerator ... &gt; .... &lt;facesconfig ... /&gt; ....
+ * &lt;/jsfgenerator&gt; attributes: facesconfig - name of faces-config file
+ * include - name of file, included in config renderkitid - name of renderkit
+ * for renderers renderkitclass - full Java class name of
+ * {@link javax.faces.render.RenderKit} implementation
+ * {@see com.exadel.vcp.builder.ant.InnerGenerator} Nested elements :
+ * &lt;renderkit renderkitid="..." renderkitclass="..." [package="..."] &gt; for
+ * generate any of render-kits at time.
+ * {@see com.exadel.vcp.builder.ant.RenderKitBean}
+ * 
+ * @author asmirnov at exadel.com (latest modification by $Author: ishabalov $)
+ * @version $Revision: 1.1.2.5 $ $Date: 2007/02/20 20:58:00 $
+ * 
+ */
+public class FacesConfigGenerator extends XMLConfigGenerator {
+
+	private static final String FACES_CONFIG_TEMPLATE_NAME = "faces-config.vm";
+
+	private File _facesconfig = null;
+
+	private List<RenderKitBean> renderKits = new ArrayList<RenderKitBean>();
+
+	private ClassLoader _loader;
+
+	/**
+	 * @param task
+	 */
+	public FacesConfigGenerator(JSFGeneratorConfiguration task, Logger log) {
+		super(task, log);
+		// TODO Auto-generated constructor stub
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.exadel.vcp.builder.ant.InnerGenerator#createFiles(com.exadel.vcp.builder.config.BuilderConfig)
+	 */
+	public void createFiles(BuilderConfig config) throws GeneratorException {
+		VelocityContext context = new VelocityContext();
+		Template template = getTemplate();
+		// Put common properties
+		_loader = config.getLoader();
+		context.put("components", config.getComponents());
+		context.put("validators", config.getValidators());
+		context.put("converters", config.getConverters());
+		context.put("renderers", config.getRenderers());
+		context.put("facesConfig", this);
+		File configFile = getFacesconfig();// new File(getDestDir(),
+											// resultPath);
+		File javaDir = configFile.getParentFile();
+		if (!javaDir.exists()) {
+			javaDir.mkdirs();
+		}
+		try {
+			if (configFile.exists()) {
+				configFile.delete();
+			}
+			Writer out = new BufferedWriter(new FileWriter(configFile));
+			template.merge(context, out);
+			out.flush();
+			out.close();
+		} catch (Exception e) {
+			throw new GeneratorException("Error create new faces-config.xml ",
+					e);
+		}
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.exadel.vcp.builder.ant.InnerGenerator#getDefaultTemplateName()
+	 */
+	protected String getDefaultTemplateName() {
+		// TODO Auto-generated method stub
+		return FACES_CONFIG_TEMPLATE_NAME;
+	}
+
+	/**
+	 * @return Returns the taglib.
+	 */
+	public File getFacesconfig() {
+		return _facesconfig;
+	}
+
+	/**
+	 * @param taglib
+	 *            The taglib to set.
+	 */
+	public void setFacesconfig(File taglib) {
+		_facesconfig = taglib;
+	}
+
+	/**
+	 * @return Returns the renderKits.
+	 */
+	public List<RenderKitBean> getRenderKits() {
+		return renderKits;
+	}
+
+	/**
+	 * Create instance of child &lt;renderkit&gt; element
+	 * 
+	 * @return
+	 */
+	public RenderKitBean createRenderKit() {
+		RenderKitBean renderKit = new RenderKitBean();
+		this.renderKits.add(renderKit);
+		return renderKit;
+	}
+
+	/**
+	 * called from a template to validate if a class exists
+	 * 
+	 * @param className
+	 * @return
+	 */
+	public boolean rendererExists(String className) {
+		boolean exists = false;
+		try {
+			Class.forName(className, false, _loader);
+			exists = true;
+		} catch (Exception ex) {
+			info("Class " + className
+					+ " not found, therefore not registered in faces-config");
+		}
+		return exists;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.builder.generator.XMLConfigGenerator#getRootTag()
+	 */
+	protected String getRootTag() {
+
+		return "faces-config";
+	}
+}

Added: branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/GeneratorException.java
===================================================================
--- branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/GeneratorException.java	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/GeneratorException.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,62 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.builder.generator;
+
+/**
+ * @author shura
+ *
+ */
+public class GeneratorException extends Exception {
+
+	/**
+	 * 
+	 */
+	public GeneratorException() {
+		// TODO Auto-generated constructor stub
+	}
+
+	/**
+	 * @param message
+	 */
+	public GeneratorException(String message) {
+		super(message);
+		// TODO Auto-generated constructor stub
+	}
+
+	/**
+	 * @param cause
+	 */
+	public GeneratorException(Throwable cause) {
+		super(cause);
+		// TODO Auto-generated constructor stub
+	}
+
+	/**
+	 * @param message
+	 * @param cause
+	 */
+	public GeneratorException(String message, Throwable cause) {
+		super(message, cause);
+		// TODO Auto-generated constructor stub
+	}
+
+}

Added: branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/InnerGenerator.java
===================================================================
--- branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/InnerGenerator.java	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/InnerGenerator.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,214 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.builder.generator;
+
+import java.io.File;
+
+import org.ajax4jsf.builder.config.BuilderConfig;
+import org.ajax4jsf.builder.config.ComponentBean;
+import org.ajax4jsf.builder.config.ComponentBaseBean;
+import org.ajax4jsf.builder.generator.ClassPatternSet.PatternEntry;
+import org.apache.tools.ant.BuildException;
+import org.apache.velocity.Template;
+
+
+/**
+ * Base class for all JSF generators - component java file ,
+ * faces-config.xml , jsp tag java file , renderer template, jsp & facelets taglib
+ * inner element of {@link org.ajax4jsf.builder.ant.JSFGeneratorTask}
+ * use in ant build.xml :
+ * &lt;jsfgenerator ... &gt;
+ *     ....
+ *     &lt;inner ... /&gt;
+ *     ....
+ * &lt;/jsfgenerator&gt;
+ * attributes:
+ * destdir - override target directory for generated files from task.
+ * templatename - override default name for velocity template.
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.7 $ $Date: 2007/02/26 20:48:40 $
+ *
+ */
+public abstract class InnerGenerator {
+
+	/**
+	 * Destination directory for generated files.
+	 */
+	private File _destDir = null;
+	
+	/**
+	 * Name of Velocity template fale for genetation.
+	 */
+	private String _templateName;
+	
+	private JSFGeneratorConfiguration _config;
+	
+	private Logger _log;
+
+	protected ClassPatternSet _patterns = new ClassPatternSet();
+	
+
+	/**
+	 * @param task
+	 */
+	public InnerGenerator(JSFGeneratorConfiguration config, Logger log) {
+		// TODO Auto-generated constructor stub
+		_config = config;
+		_log = log;
+	}
+
+	/**
+	 * @return the config
+	 */
+	public JSFGeneratorConfiguration getConfig() {
+		return this._config;
+	}
+
+	/**
+	 * @param config the config to set
+	 */
+	public void setConfig(JSFGeneratorConfiguration config) {
+		this._config = config;
+	}
+
+	/**
+	 * @return Returns the destDir.
+	 * @throws GeneratorException 
+	 */
+	public File getDestDir() throws GeneratorException {
+		File destDir = _destDir;
+		if (null == destDir) {
+			destDir = _config.getDestDir();
+		}
+		if (destDir == null) {
+			throw new GeneratorException("Destination directory not set");
+		} else if (destDir.exists() && !destDir.isDirectory()) {
+			throw new GeneratorException("Destination not is directory");
+		}
+		if (!destDir.exists()) {
+			destDir.mkdirs();
+		}
+		return destDir;
+	}
+
+	/**
+	 * @param destDir The destDir to set.
+	 */
+	public void setDestDir(File destDir) {
+		_destDir = destDir;
+	}
+	
+	/**
+	 * @return Returns the key.
+	 */
+	public String getKey() {
+		return this._config.getKey();
+	}
+
+
+	public ClassLoader getClassLoader(){
+		return _config.getClassLoader();
+	}
+	
+	/**
+	 * @return Returns the template.
+	 */
+	public String getTemplateName() {
+		if (null != _templateName) {
+			return _templateName;
+		} else {
+			return _config.getTemplatesPath()+"/"+getDefaultTemplateName();
+		}
+	}
+
+	/**
+	 * @param template The template to set.
+	 */
+	public void setTemplateName(String template) {
+		_templateName = template;
+	}
+
+	public Template getTemplate() throws GeneratorException {
+		return _config.getTemplate(getTemplateName());
+	}
+	
+	
+	/**
+	 * Generate concrete files.
+	 * @param config
+	 * @throws BuildException
+	 */
+	public abstract void createFiles(BuilderConfig config) throws GeneratorException;
+
+	/**
+	 * @return default template name for this generator.
+	 */
+	protected abstract String getDefaultTemplateName();
+
+	public Logger getLog() {
+		return _log;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.apache.tools.ant.Task#log(java.lang.String)
+	 */
+	public void info(String arg0) {
+		getLog().info(arg0);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.apache.tools.ant.Task#log(java.lang.String)
+	 */
+	public void debug(String arg0) {
+		getLog().debug(arg0);
+	}
+
+	public PatternEntry createExclude() {
+		return _patterns.createExclude();
+	}
+
+	public PatternEntry createInclude() {
+		return _patterns.createInclude();
+	}
+
+
+
+	public void setExcludes(String arg0) {
+		_patterns.setExcludes(arg0);
+	}
+
+	public void setIncludes(String arg0) {
+		_patterns.setIncludes(arg0);
+	}
+
+	/**
+	 * @param includes
+	 * @param excludes
+	 * @param component
+	 * @param includeComponent
+	 * @return
+	 */
+	protected boolean isIncludeComponent(ComponentBaseBean component) {
+		boolean includeComponent = _patterns.matchClass(component.getName());
+		return includeComponent;
+	}
+}

Added: branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/JSFGeneratorConfiguration.java
===================================================================
--- branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/JSFGeneratorConfiguration.java	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/JSFGeneratorConfiguration.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,49 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.builder.generator;
+
+import java.io.File;
+
+import org.apache.velocity.Template;
+
+public interface JSFGeneratorConfiguration {
+
+	/**
+	 * @return Returns the destDir.
+	 */
+	public abstract File getDestDir();
+
+	public ClassLoader getClassLoader();
+
+	/**
+	 * @return Returns the key.
+	 */
+	public abstract String getKey();
+	
+	public abstract Template getTemplate(String name)  throws GeneratorException ;
+
+	/**
+	 * @return
+	 */
+	public abstract String getTemplatesPath();
+
+}
\ No newline at end of file

Added: branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/ListenerGenerator.java
===================================================================
--- branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/ListenerGenerator.java	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/ListenerGenerator.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,88 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.builder.generator;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.Writer;
+import java.util.List;
+
+import org.ajax4jsf.builder.config.BuilderConfig;
+import org.ajax4jsf.builder.config.ListenerBean;
+import org.ajax4jsf.builder.config.TagHandlerBean;
+import org.apache.velocity.Template;
+import org.apache.velocity.VelocityContext;
+
+/**
+ * @author Nick - mailto:nbelaevski at exadel.com
+ * created 03.12.2006
+ * 
+ */
+//TODO add JSP tags support
+public class ListenerGenerator extends InnerGenerator {
+
+	public ListenerGenerator(JSFGeneratorConfiguration config, Logger log) {
+		super(config, log);
+	}
+
+	@Override
+	protected String getDefaultTemplateName() {
+		return "listener_taghandler.vm";
+	}
+
+	@Override
+	public void createFiles(BuilderConfig config) throws GeneratorException {
+		VelocityContext context = new VelocityContext();
+		Template template = getTemplate();
+		// Put common properties
+		List<ListenerBean> listeners = config.getListeners();
+		for (ListenerBean bean : listeners) {
+			TagHandlerBean tagHandler = bean.getTaghandler();
+			if ( null != tagHandler && tagHandler.isGenerate() && null !=tagHandler.getClassname()) {
+				context.put("tag", tagHandler);
+				context.put("listener", bean);
+
+				String resultPath = tagHandler.getClassname().replace('.', '/')
+				+ ".java";
+				File javaFile = new File(getDestDir(), resultPath);
+				File javaDir = javaFile.getParentFile();
+				if (!javaDir.exists()) {
+					javaDir.mkdirs();
+				}
+				try {
+					if (javaFile.exists()) {
+						javaFile.delete();
+					}
+					Writer out = new BufferedWriter(new FileWriter(javaFile));
+					template.merge(context, out);
+					out.flush();
+					out.close();
+				} catch (Exception e) {
+					throw new GeneratorException(
+							"Error create new Component Facelets Tag Java file ", e);
+				}
+			}
+		}
+	}
+
+}

Added: branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/Logger.java
===================================================================
--- branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/Logger.java	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/Logger.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,63 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.builder.generator;
+
+/**
+ * @author shura
+ *
+ */
+public interface Logger {
+	
+    boolean isDebugEnabled();
+    
+    void debug( CharSequence content );
+
+    void debug( CharSequence content, Throwable error );
+
+    void debug( Throwable error );
+
+    boolean isInfoEnabled();
+    
+    void info( CharSequence content );
+
+    void info( CharSequence content, Throwable error );
+
+    void info( Throwable error );
+
+    boolean isWarnEnabled();
+    
+    void warn( CharSequence content );
+
+    void warn( CharSequence content, Throwable error );
+
+    void warn( Throwable error );
+
+    boolean isErrorEnabled();
+    
+    void error( CharSequence content );
+
+    void error( CharSequence content, Throwable error );
+
+    void error( Throwable error );
+
+
+}

Added: branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/RenderKitBean.java
===================================================================
--- branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/RenderKitBean.java	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/RenderKitBean.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,123 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.builder.generator;
+
+/**
+ * Child element for {@link org.ajax4jsf.builder.generator.FacesConfigGenerator}
+ * &lt;facesconfig ... &gt;
+ *  &lt;renderkit renderkitid="..." renderkitclass="..." [package="..."] &gt; for generate any of render-kits at time.
+ *  .....
+ *  &lt;/facesconfig&gt;
+ * Properties
+ *  renderkitid - name of render-kit, defaults to HTML_BASIC
+ *  renderkitclass - full Java class name for custom render kit
+ *  package - optional Java package name for override from configuration, used for create set of differern render-kits in one task
+ *  frompackage - optional Java package name, if original renderer class starts with it, replase with "package" attribute
+ * @author asmirnov at exadel.com (latest modification by $Author: ishabalov $)
+ * @version $Revision: 1.1.2.2 $ $Date: 2007/02/20 20:58:01 $
+ *
+ */
+public class RenderKitBean {
+
+	private String _renderkitid = null;
+	private String _renderkitclass = null;
+	
+	private String _package = null;
+	
+	private String _fromPackage = null;
+	
+	/**
+	 * Build result renderer class for this renderer.
+	 * Remove base package ( {@link #getFromPackage()} ) or full package name and
+	 * and append new package name.
+	 * @param fromClass
+	 * @return
+	 */
+	public String rendererClass(String fromClass) {
+		String className = fromClass;
+		// Get short class name
+		if (null != getPackage()) {
+			if (null != getFromPackage()
+					&& fromClass.startsWith(getFromPackage())) {
+				className = fromClass.substring(getFromPackage().length() + 1);
+			} else {
+				int lastPoint = fromClass.lastIndexOf('.');
+				if (lastPoint > 0) {
+					className = fromClass.substring(lastPoint + 1);
+				}
+			}
+			className = getPackage() + "." + className;
+		}
+		return className;
+	}
+
+	/**
+	 * @return Returns the package.
+	 */
+	public String getPackage() {
+		return _package;
+	}
+	/**
+	 * @param package1 The package to set.
+	 */
+	public void setPackage(String package1) {
+		_package = package1;
+	}
+
+	/**
+	 * @return Returns the renderKitClass.
+	 */
+	public String getRenderkitclass() {
+		return this._renderkitclass;
+	}
+	/**
+	 * @param renderKitClass The renderKitClass to set.
+	 */
+	public void setRenderkitclass(String renderKitClass) {
+		this._renderkitclass = renderKitClass;
+	}
+	/**
+	 * @return Returns the renderKitId.
+	 */
+	public String getRenderkitid() {
+		return this._renderkitid;
+	}
+	/**
+	 * @param renderKitId The renderKitId to set.
+	 */
+	public void setRenderkitid(String renderKitId) {
+		this._renderkitid = renderKitId;
+	}
+	/**
+	 * @return Returns the fromPackage.
+	 */
+	public String getFromPackage() {
+		return _fromPackage;
+	}
+	/**
+	 * @param fromPackage The fromPackage to set.
+	 */
+	public void setFromPackage(String fromPackage) {
+		_fromPackage = fromPackage;
+	}
+
+}

Added: branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/RendererCompilationContext.java
===================================================================
--- branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/RendererCompilationContext.java	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/RendererCompilationContext.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,145 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.builder.generator;
+
+import org.ajax4jsf.templatecompiler.builder.AbstractCompilationContext;
+import org.ajax4jsf.templatecompiler.builder.CompilationException;
+import org.apache.velocity.Template;
+
+/**
+ * @author shura
+ * 
+ */
+public class RendererCompilationContext extends AbstractCompilationContext {
+
+	private Logger _log;
+	private JSFGeneratorConfiguration _config;
+
+
+	/**
+	 * @param loader
+	 * @param configuration 
+	 * @throws CompilationException
+	 */
+	public RendererCompilationContext(Logger log, ClassLoader loader, JSFGeneratorConfiguration configuration)
+			throws CompilationException {
+		super(loader);
+		this._log = log;
+		this._config = configuration;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.templatecompiler.builder.CompilationContext#debug(java.lang.String)
+	 */
+	public void debug(String content) {
+		_log.debug(content);
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.templatecompiler.builder.CompilationContext#debug(java.lang.String,
+	 *      java.lang.Throwable)
+	 */
+	public void debug(String content, Throwable error) {
+		_log.debug(content, error);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.templatecompiler.builder.CompilationContext#error(java.lang.String)
+	 */
+	public void error(String content) {
+		_log.error(content);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.templatecompiler.builder.CompilationContext#error(java.lang.String,
+	 *      java.lang.Throwable)
+	 */
+	public void error(String content, Throwable error) {
+		_log.error(content, error);
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.templatecompiler.builder.CompilationContext#info(java.lang.String)
+	 */
+	public void info(String content) {
+		_log.info(content);
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.templatecompiler.builder.CompilationContext#info(java.lang.String,
+	 *      java.lang.Throwable)
+	 */
+	public void info(String content, Throwable error) {
+		_log.info(content, error);
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.templatecompiler.builder.CompilationContext#warn(java.lang.String)
+	 */
+	public void warn(String content) {
+		_log.warn(content);
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.templatecompiler.builder.CompilationContext#warn(java.lang.String,
+	 *      java.lang.Throwable)
+	 */
+	public void warn(String content, Throwable error) {
+		_log.warn(content, error);
+
+	}
+
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.templatecompiler.builder.CompilationContext#getTemplate(java.lang.String)
+	 */
+	public Template getTemplate(String name) throws CompilationException {
+		// TODO Auto-generated method stub
+		try {
+			return _config.getTemplate(name);
+		} catch (GeneratorException e) {
+			throw new CompilationException(e);
+		}
+	}
+
+}

Added: branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/RendererGenerator.java
===================================================================
--- branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/RendererGenerator.java	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/RendererGenerator.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,199 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.builder.generator;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileWriter;
+import java.io.InputStream;
+import java.io.Writer;
+import java.util.Iterator;
+
+import org.ajax4jsf.builder.config.BuilderConfig;
+import org.ajax4jsf.builder.config.ComponentBaseBean;
+import org.ajax4jsf.builder.config.ComponentBean;
+import org.ajax4jsf.builder.config.RendererBean;
+import org.ajax4jsf.templatecompiler.builder.CompilationContext;
+import org.ajax4jsf.templatecompiler.builder.CompilationException;
+import org.ajax4jsf.templatecompiler.builder.TemplateCompiler;
+
+/**
+ * Class implement functionality for generate base renderers java files, for
+ * manual extention. If renderer property override in config file set to true,
+ * override existing renderers files. inner element of
+ * {@link org.ajax4jsf.builder.ant.JSFGeneratorTask} use in ant build.xml :
+ * &lt;jsfgenerator ... &gt; .... &lt;renderers ... /&gt; ....
+ * &lt;/jsfgenerator&gt; attributes: package - optional Java package name for
+ * override from configuration, used for create set of differern render-kits in
+ * one task {@see com.exadel.vcp.builder.ant.InnerGenerator}
+ * 
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.10 $ $Date: 2007/02/26 20:48:40 $
+ * 
+ */
+public class RendererGenerator extends InnerGenerator {
+
+	private static final String RENDERER_TEMPLATE_NAME = "renderer.vm";
+
+	private File _srcDir = null;
+
+	/**
+	 * Optional package name for override from config.
+	 */
+	private String _package = null;
+
+	/**
+	 * @return Returns the package.
+	 */
+	public String getPackage() {
+		return _package;
+	}
+
+	/**
+	 * @param package1
+	 *            The package to set.
+	 */
+	public void setPackage(String package1) {
+		_package = package1;
+	}
+
+	/**
+	 * @return the srcDir
+	 */
+	public File getSrcDir() {
+		return this._srcDir;
+	}
+
+	/**
+	 * @param srcDir
+	 *            the srcDir to set
+	 */
+	public void setSrcDir(File srcDir) {
+		this._srcDir = srcDir;
+	}
+
+	/**
+	 * @param task
+	 */
+	public RendererGenerator(JSFGeneratorConfiguration task, Logger log) {
+		super(task, log);
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.exadel.vcp.builder.ant.InnerGenerator#createFiles(com.exadel.vcp.builder.config.BuilderConfig)
+	 */
+	public void createFiles(BuilderConfig config) throws GeneratorException {
+		// Put common properties
+		for (Iterator iter = config.getComponents().iterator(); iter.hasNext();) {
+			ComponentBean component = (ComponentBean) iter.next();
+			RendererBean renderer = component.getRenderer();
+			createRenderer(renderer, component);
+		}
+		for (Iterator iter = config.getRenderers().iterator(); iter.hasNext();) {
+			RendererBean renderer = (RendererBean) iter.next();
+			createRenderer(renderer, null);
+		}
+	}
+
+	public void createRenderer(RendererBean renderer, ComponentBaseBean component)
+			throws GeneratorException {
+		if (null != renderer && renderer.isGenerate()
+				&& null != renderer.getTemplate()) {
+			try {
+				File template;
+				if (null != getSrcDir()) {
+					template = new File(getSrcDir(), renderer.getTemplate());
+				} else {
+					template = new File(renderer.getTemplate());
+				}
+				CompilationContext rendererBean = new RendererCompilationContext(
+						getLog(), getClassLoader(),getConfig());
+				if (null != renderer.getClassname()) {
+					rendererBean.setBaseclass(renderer.getClassname());
+
+				}
+				if (null != renderer.getClassname()) {
+					rendererBean.setFullClassName(renderer.getClassname());
+				}
+				if (null != component) {
+					try {
+						rendererBean
+								.setComponentClass(component.getClassname());
+					} catch (CompilationException e) {
+						if (null != component.getSuperclass()) {
+							rendererBean.setComponentClass(component
+									.getSuperclass());
+						}
+					}
+
+				}
+				TemplateCompiler templateCompiler = new TemplateCompiler();
+				InputStream templateStream = new FileInputStream(template);
+				templateCompiler.processing(templateStream, rendererBean);
+				renderer.setClassname(rendererBean.getFullClassName());
+				String resultPath = rendererBean.getComponentFileName();
+				if (null == getPackage()) {
+					resultPath = resultPath.replace('.', '/');
+				} else {
+					resultPath = getPackage().replace('.', '/') + "/"
+							+ resultPath;
+				}
+
+				File javaFile = new File(getDestDir(), resultPath + ".java");
+				File javaDir = javaFile.getParentFile();
+				if (!javaDir.exists()) {
+					javaDir.mkdirs();
+				}
+				if (javaFile.exists()) {
+					if (renderer.isOverride()) {
+						javaFile.delete();
+					} else {
+						return;
+					}
+				}
+				Writer out = new BufferedWriter(new FileWriter(javaFile));
+				templateCompiler.generateCode(rendererBean, out);
+				out.flush();
+				out.close();
+			} catch (Exception e) {
+				throw new GeneratorException(
+						"Error create Renderer Java file ", e);
+			}
+		}
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.exadel.vcp.builder.ant.InnerGenerator#getDefaultTemplateName()
+	 */
+	protected String getDefaultTemplateName() {
+		// TODO Auto-generated method stub
+		return RENDERER_TEMPLATE_NAME;
+	}
+
+}

Added: branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/ResourcesConfigGenerator.java
===================================================================
--- branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/ResourcesConfigGenerator.java	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/ResourcesConfigGenerator.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,353 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.builder.generator;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Writer;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import net.sf.cglib.proxy.MethodInterceptor;
+import net.sf.cglib.proxy.MethodProxy;
+
+import org.ajax4jsf.builder.config.BuilderConfig;
+import org.ajax4jsf.builder.config.ComponentBean;
+import org.ajax4jsf.builder.config.ComponentBaseBean;
+import org.ajax4jsf.builder.config.RendererBean;
+import org.ajax4jsf.templatecompiler.builder.CompilationContext;
+import org.ajax4jsf.templatecompiler.builder.CompilationException;
+import org.ajax4jsf.templatecompiler.builder.TemplateCompiler;
+import org.ajax4jsf.templatecompiler.elements.RootElement;
+import org.ajax4jsf.templatecompiler.elements.TemplateElement;
+import org.ajax4jsf.templatecompiler.elements.vcp.FResourceTemplateElement;
+import org.ajax4jsf.templatecompiler.elements.vcp.HeaderResourceElement;
+import org.apache.velocity.Template;
+import org.apache.velocity.VelocityContext;
+
+/**
+ * @author Nick - mailto:nbelaevski at exadel.com
+ * created 17.04.2007
+ * 
+ */
+public class ResourcesConfigGenerator extends FacesConfigGenerator {
+
+	private File resourcesConfig;
+	private File templatesDirectory;
+
+	public ResourcesConfigGenerator(JSFGeneratorConfiguration task, Logger log) {
+		super(task, log);
+	}
+
+	private void addResources(ResourcesConfigGeneratorBean configBean, TemplateElement templateElement,
+			String packageName, RendererBean renderer, BuilderConfig builderConfig) throws ClassNotFoundException {
+		if (templateElement instanceof FResourceTemplateElement) {
+			FResourceTemplateElement resourceTemplateElement = (FResourceTemplateElement) templateElement;
+			String name = resourceTemplateElement.getName();
+			
+			addResource(name, packageName, configBean);
+		} else if (templateElement instanceof RootElement) {
+			RootElement rootElement = (RootElement) templateElement;
+			
+			CompilationContext compilationContext = rootElement.getComponentBean();
+			
+			String classname = renderer.getClassname();
+			int idx = classname.lastIndexOf('.');
+			if (idx != -1) {
+				packageName = classname.substring(0, idx);
+			} else {
+				packageName = "";
+			}
+			
+			ClassLoader loader = builderConfig.getLoader();
+			Class cl = null;
+			
+			try {
+				cl = loader.loadClass(classname);
+			} catch (ClassNotFoundException e) {
+				String superclass = compilationContext.getBaseclassPackageName() + "." + compilationContext.getBaseclassName();
+				if (superclass != null) {
+					cl = loader.loadClass(superclass);
+				}
+			}
+
+			if (cl != null) {
+				GetResourceInterceptor interceptor = new GetResourceInterceptor();
+				Object instance = AbstractClassStubBuilder.buildStub(cl, interceptor,
+						builderConfig.getLoader());
+				
+				try {
+					Method method = null;
+					Object object = null;
+					
+					Class<?> cl1 = instance.getClass();
+					while (cl1 != null && method == null) {
+						try {
+							method = cl1.getDeclaredMethod("getStyles", null);
+						} catch (NoSuchMethodException e) {
+							cl1 = cl1.getSuperclass();
+						}
+					}
+					
+					if (method != null) {
+						method.setAccessible(true);
+						object = method.invoke(instance, null);
+						List<String> list = interceptor.getList();
+						if (list != null) {
+							for (String name : list) {
+								addResource(name, packageName, configBean);
+							}
+						}
+					}
+					
+					interceptor.clearList();
+
+					method = null;
+					cl1 = instance.getClass();
+					while (cl1 != null && method == null) {
+						try {
+							method = cl1.getDeclaredMethod("getScripts", null);
+						} catch (NoSuchMethodException e) {
+							cl1 = cl1.getSuperclass();
+						}
+					}
+					
+					if (method != null) {
+						method.setAccessible(true);
+						object = method.invoke(instance, null);
+						List<String> list = interceptor.getList();
+						if (list != null) {
+							for (String name : list) {
+								addResource(name, packageName, configBean);
+							}
+						}
+					}
+				} catch (SecurityException e) {
+					builderConfig.getLog().error(e.getMessage(), e);
+				} catch (IllegalArgumentException e) {
+					builderConfig.getLog().error(e.getMessage(), e);
+				} catch (IllegalAccessException e) {
+					builderConfig.getLog().error(e.getMessage(), e);
+				} catch (InvocationTargetException e) {
+					builderConfig.getLog().error(e.getMessage(), e);
+				}
+			}
+		} else if (templateElement instanceof HeaderResourceElement) {
+			HeaderResourceElement resourceElement = (HeaderResourceElement) templateElement;
+			String[] paths = resourceElement.getResourcePaths();
+			if (paths != null) {
+				for (int i = 0; i < paths.length; i++) {
+					String string = paths[i];
+					
+					addResource(string, packageName, configBean);
+				}
+			}
+		}
+		
+		ArrayList<TemplateElement> subElements = templateElement.getSubElements();
+		for (TemplateElement element : subElements) {
+			addResources(configBean, element, packageName, renderer, builderConfig);
+		}
+	}
+
+	private void addResource(String name, String packageName,
+			ResourcesConfigGeneratorBean configBean) {
+
+		String resolvedPath = resolveResourcePath(name, packageName);
+		// remove leading / from resource name.
+	        if(name.startsWith("/")){
+	            name = name.substring(1);
+	        }
+		if (resolvedPath != null) {
+			configBean.addPathResource(name, resolvedPath);
+		} else {
+			//couldn't resolve, treat as class name
+			configBean.addClassResource(name, name);
+		}
+	}
+	
+	private String resolveResourcePath(String name, String packageName) {
+		if (name.contains("/")) {
+			String resolvedName;
+
+			if (!name.startsWith("/")) {
+				//need to resolve
+				StringBuffer normalizedName = new StringBuffer();
+				normalizedName.append(packageName.replace('.', '/'));
+				
+				if (!packageName.endsWith("/")) {
+					normalizedName.append('/');
+				}
+
+				normalizedName.append(name);
+				
+				resolvedName = normalizedName.toString();
+			} else {
+				if (name.length() > 0) {
+					resolvedName = name.substring(1);
+				} else {
+					resolvedName = null;
+				}
+			}
+
+			return resolvedName;
+		} 
+		
+		return null;
+	}
+
+	private void addResources(ResourcesConfigGeneratorBean configBean, RendererBean renderer, BuilderConfig builderConfig) throws CompilationException, IOException, ClassNotFoundException {
+		if (null != renderer && renderer.isGenerate()
+				&& null != renderer.getTemplate()) {
+
+			File template;
+			if (null != getTemplates()) {
+				template = new File(getTemplates(), renderer.getTemplate());
+			} else {
+				template = new File(renderer.getTemplate());
+			}
+			CompilationContext rendererBean = new RendererCompilationContext(
+					getLog(), getClassLoader(),getConfig());
+
+			TemplateCompiler templateCompiler = new TemplateCompiler();
+			InputStream templateStream = new FileInputStream(template);
+			templateCompiler.processing(templateStream, rendererBean);
+		
+			TemplateElement root = rendererBean.getTree();
+			
+			String classname = renderer.getClassname();
+			String packageName;
+			int idx = classname.lastIndexOf('.');
+			if (idx != -1) {
+				packageName = classname.substring(0, idx);
+			} else {
+				packageName = "";
+			}
+			
+			addResources(configBean, root, packageName, renderer, builderConfig);
+		}
+	}
+
+	public void createFiles(BuilderConfig config) throws GeneratorException {
+		VelocityContext context = new VelocityContext();
+		Template template = getTemplate();
+		try {
+			// Put common properties
+
+			ResourcesConfigGeneratorBean bean = new ResourcesConfigGeneratorBean();
+			
+			List<ComponentBean> components = config.getComponents();
+			for (ComponentBean componentBean : components) {
+				RendererBean rendererBean = componentBean.getRenderer();
+
+				addResources(bean, rendererBean, config);
+			}
+
+			List<RendererBean> renderers = config.getRenderers();
+			for (RendererBean rendererBean : renderers) {
+				addResources(bean, rendererBean, config);
+			}
+
+			context.put("classResources", bean.getClassResources());
+			context.put("pathResources", bean.getPathResources());
+			context.put("resourcesConfig", this);
+			File configFile = getResourcesConfig();
+			File javaDir = configFile.getParentFile();
+			if (!javaDir.exists()) {
+				javaDir.mkdirs();
+			}
+			if (configFile.exists()) {
+				configFile.delete();
+			}
+			Writer out = new BufferedWriter(new FileWriter(configFile));
+			template.merge(context, out);
+			out.flush();
+			out.close();
+		} catch (Exception e) {
+			throw new GeneratorException("Error create new resources-config.xml ",
+					e);
+		}
+	}
+
+	protected String getRootTag() {
+		return "resource-config";
+	}
+
+	public File getResourcesConfig() {
+		return resourcesConfig;
+	}
+
+	public void setResourcesConfig(File resourcesConfig) {
+		this.resourcesConfig = resourcesConfig;
+	}
+
+	protected String getDefaultTemplateName() {
+		return "resources-config.vm";
+	}
+
+	public void setTemplates(File templatesDirectory) {
+		this.templatesDirectory = templatesDirectory;
+	}
+
+	public File getTemplates() {
+		return this.templatesDirectory;
+	}
+}
+
+class GetResourceInterceptor implements MethodInterceptor {
+
+	private static final Class<?>[] SIGNATURE = new Class<?>[] {
+		String.class
+	};
+	
+	private List<String> list = new ArrayList<String>();
+	
+	public List<String> getList() {
+		return list;
+	}
+	
+	public void clearList() {
+		list.clear();
+	}
+	
+	public Object intercept(Object instance, Method method, Object[] args,
+			MethodProxy methodProxy) throws Throwable {
+
+		if ("getResource".equals(method.getName()) && 
+				Arrays.equals(SIGNATURE, method.getParameterTypes())) {
+
+			list.add((String) args[0]);
+			
+			return null;
+		} else {
+			return methodProxy.invokeSuper(instance, args);
+		}
+	}
+	
+}
\ No newline at end of file

Added: branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/ResourcesConfigGeneratorBean.java
===================================================================
--- branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/ResourcesConfigGeneratorBean.java	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/ResourcesConfigGeneratorBean.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,53 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.builder.generator;
+
+import java.util.HashMap;
+import java.util.Map;
+
+
+
+/**
+ * @author Nick - mailto:nbelaevski at exadel.com
+ * created 17.04.2007
+ * 
+ */
+public class ResourcesConfigGeneratorBean {
+	private HashMap<String, String> classResources = new HashMap<String, String>();
+	private HashMap<String, String> pathResources = new HashMap<String, String>();
+	
+	public void addClassResource(String name, String className) {
+		classResources.put(name, className);
+	}
+
+	public void addPathResource(String name, String path) {
+		pathResources.put(name, path);
+	}
+
+	public Map<String, String> getClassResources() {
+		return classResources;
+	}
+	
+	public Map<String, String> getPathResources() {
+		return pathResources;
+	}
+}
\ No newline at end of file

Added: branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/TagHandlerGenerator.java
===================================================================
--- branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/TagHandlerGenerator.java	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/TagHandlerGenerator.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,142 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.builder.generator;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.Writer;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
+import org.ajax4jsf.builder.config.BuilderConfig;
+import org.ajax4jsf.builder.config.ComponentBean;
+import org.ajax4jsf.builder.config.PropertyBean;
+import org.ajax4jsf.builder.config.TagHandlerBean;
+import org.apache.velocity.Template;
+import org.apache.velocity.VelocityContext;
+
+
+/**
+ * Class implement functionality for generate facelets tags java files
+ * inner element of {@link org.ajax4jsf.builder.ant.JSFGeneratorTask}
+ * use in ant build.xml :
+ * &lt;jsfgenerator ... &gt;
+ *     ....
+ *     &lt;tagsupport ... /&gt;
+ *     ....
+ * &lt;/jsfgenerator&gt;
+ * attributes:
+ * {@see com.exadel.vcp.builder.ant.InnerGenerator}
+ * @author asmirnov at exadel.com (latest modification by $Author: ishabalov $)
+ * @version $Revision: 1.1.2.3 $ $Date: 2007/02/20 20:58:01 $
+ *
+ */
+public class TagHandlerGenerator extends InnerGenerator {
+
+	private static final String TAG_TEMPLATE_NAME = "taghandler.vm";
+
+	private String _package = null;
+
+	/**
+	 * @return Returns the package.
+	 */
+	public String getPackage() {
+		return _package;
+	}
+	/**
+	 * @param package1 The package to set.
+	 */
+	public void setPackage(String package1) {
+		_package = package1;
+	}
+	/**
+	 * @param task
+	 */
+	public TagHandlerGenerator(JSFGeneratorConfiguration task, Logger log) {
+		super(task,log);
+		// TODO Auto-generated constructor stub
+	}
+
+	/* (non-Javadoc)
+	 * @see com.exadel.vcp.builder.ant.InnerGenerator#createFiles(com.exadel.vcp.builder.config.BuilderConfig)
+	 */
+	public void createFiles(BuilderConfig config) throws GeneratorException {
+		VelocityContext context = new VelocityContext();
+		Template template = getTemplate();
+		// Put common properties
+		for (Iterator iter = config.getComponents().iterator(); iter.hasNext();) {
+			ComponentBean component = (ComponentBean) iter.next();
+			TagHandlerBean tagHandler = component.getTaghandler();
+			if ( null != tagHandler && tagHandler.isGenerate() && null !=tagHandler.getClassname()) {
+				context.put("component", component);
+				if (null != component.getRenderer()) {
+					context.put("renderer", component.getRenderer());
+				} else {
+					context.put("renderer",Boolean.FALSE);
+				}
+				context.put("tag", tagHandler);
+				context.put("package", tagHandler.getPackageName());
+				Set<String> importClasses = new HashSet<String>();
+				for (Iterator it = component.getProperties().iterator(); it
+						.hasNext();) {
+					PropertyBean property = (PropertyBean) it.next();
+					// For non-primitive types, add import declaration.
+					if (!property.isSimpleType() && !property.isHidden()) {
+						importClasses.add(property.getClassname());
+					}
+				}
+				importClasses.add(tagHandler.getSuperclass());
+				context.put("imports", importClasses);
+				String resultPath = tagHandler.getClassname().replace('.', '/')
+						+ ".java";
+				File javaFile = new File(getDestDir(), resultPath);
+				File javaDir = javaFile.getParentFile();
+				if (!javaDir.exists()) {
+					javaDir.mkdirs();
+				}
+				try {
+					if (javaFile.exists()) {
+						javaFile.delete();
+					}
+					Writer out = new BufferedWriter(new FileWriter(javaFile));
+					template.merge(context, out);
+					out.flush();
+					out.close();
+				} catch (Exception e) {
+					throw new GeneratorException(
+							"Error create new Component Facelets Tag Java file ", e);
+				}
+			}
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see com.exadel.vcp.builder.ant.InnerGenerator#getDefaultTemplateName()
+	 */
+	protected String getDefaultTemplateName() {
+		// TODO Auto-generated method stub
+		return TAG_TEMPLATE_NAME;
+	}
+
+}

Added: branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/TagTestGenerator.java
===================================================================
--- branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/TagTestGenerator.java	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/TagTestGenerator.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,91 @@
+package org.ajax4jsf.builder.generator;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.Writer;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
+import org.ajax4jsf.builder.config.BuilderConfig;
+import org.ajax4jsf.builder.config.ComponentBean;
+import org.ajax4jsf.builder.config.PropertyBean;
+import org.ajax4jsf.builder.config.TagBean;
+import org.apache.velocity.Template;
+import org.apache.velocity.VelocityContext;
+
+public class TagTestGenerator extends InnerGenerator{
+
+	private static final String COMPONENT_FILE_TEMPLATE = "tagtest.vm";	
+	
+	public TagTestGenerator(JSFGeneratorConfiguration config, Logger log) {
+		super(config, log);
+		// TODO Auto-generated constructor stub
+	}
+
+	@Override
+	public void createFiles(BuilderConfig config) throws GeneratorException {
+		// TODO Auto-generated method stub
+		System.out.println("Preparing to generate test for tag class... ");
+		VelocityContext context = new VelocityContext();
+		context.put("generator",this);
+		Template template = getTemplate();
+		// Put common properties
+		for (Iterator iter = config.getComponents().iterator(); iter.hasNext();) {
+			ComponentBean component = (ComponentBean) iter.next();
+			TagBean tag = component.getTag();
+			if ( null !=  tag && null !=tag.getClassname() && tag.isGenerate() 
+					&& tag.getTest() != null) {
+				info("Create test class file for tag " + component.getTag().getSimpleClassName());
+				context.put("component", component);
+				if (null != component.getRenderer()) {
+					context.put("renderer", component.getRenderer());
+				} else {
+					context.put("renderer",Boolean.FALSE);
+				}
+				context.put("tag", component.getTag());
+				context.put("package", component.getTag().getPackageName());
+				Set<String> importClasses = new HashSet<String>();
+				for (Iterator it = component.getProperties().iterator(); it
+						.hasNext();) {
+					PropertyBean property = (PropertyBean) it.next();
+					// For non-primitive types, add import declaration.
+					if (!property.isSimpleType() && !property.isHidden()) {
+						importClasses.add(property.getClassname());
+					}
+				}
+				importClasses.add(component.getTag().getTest().getSuperclassname());
+				context.put("imports", importClasses);
+				String resultPath = component.getTag().getTest().getClassname().replace('.', '/')
+						+ ".java";
+				//System.out.println("resultPath - " + resultPath);
+				//System.out.println("getDestDir() - " + getDestDir());
+				File javaFile = new File(getDestDir(), resultPath);
+				File javaDir = javaFile.getParentFile();
+				if (!javaDir.exists()) {
+					javaDir.mkdirs();
+				}
+				try {
+					if (javaFile.exists()) {
+						javaFile.delete();
+					}
+					Writer out = new BufferedWriter(new FileWriter(javaFile));
+					template.merge(context, out);
+					out.flush();
+					out.close();
+				} catch (Exception e) {
+					throw new GeneratorException(
+							"Error create new Component JSP Tag Test Java file ", e);
+				}
+			}
+		}
+	}
+
+	@Override
+	protected String getDefaultTemplateName() {
+		// TODO Auto-generated method stub
+		return COMPONENT_FILE_TEMPLATE;
+	}
+
+}

Added: branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/TaglibGenerator.java
===================================================================
--- branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/TaglibGenerator.java	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/TaglibGenerator.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,328 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.builder.generator;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.Writer;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.ajax4jsf.builder.config.BuilderConfig;
+import org.ajax4jsf.builder.config.ComponentBean;
+import org.ajax4jsf.builder.config.ConverterBean;
+import org.ajax4jsf.builder.config.ValidatorBean;
+import org.apache.velocity.Template;
+import org.apache.velocity.VelocityContext;
+
+
+/**
+ * Class implement functionality for generate jsp taglib .tld file
+ * inner element of {@link org.ajax4jsf.builder.ant.JSFGeneratorTask}
+ * use in ant build.xml :
+ * &lt;jsfgenerator ... &gt;
+ *     ....
+ *     &lt;taglib ... /&gt;
+ *     ....
+ * &lt;/jsfgenerator&gt;
+ * attributes:
+ * taglib - name of .tld file
+ * Next properties use for common tld elements :
+ * uri - taglib uri
+ * shortname -
+ * description - taglib description
+ * displayname
+ * tlibversion , default 1.2
+ * jspversion , default 2.0
+ * listenerclass - full java name of context listener class
+ * validatorclass - full java name of jsp validator class
+ * include - name of file, included in tld before first tag element
+ * For include-exclude components ( by component type ) from taglib, can be used attributes
+ * includes or excludes , and nested elements &lt;include ... /&gt; and &lt;exclude ... /&gt;
+ * with same sintax as other ant tasks
+ * {@see com.exadel.vcp.builder.ant.InnerGenerator}
+ * @author asmirnov at exadel.com (latest modification by $Author: ishabalov $)
+ * @version $Revision: 1.1.2.4 $ $Date: 2007/02/20 20:58:02 $
+ *
+ */
+public class TaglibGenerator extends XMLConfigGenerator {
+	
+	private static final String TAGLIB_TEMPLATE_NAME = "taglib.vm";
+
+	private File _taglib = null;
+	
+	private String _uri = null;
+	
+	private String _shortname = null;
+	
+	private String _description = null;
+	
+	private String _displayname = null;
+	
+	private String _tlibversion = "1.2";
+	
+	private String _jspversion = "2.0";
+	
+	private String _listenerclass = null;
+	
+	private String _validatorclass = null;
+
+	/**
+	 * @param task
+	 */
+	public TaglibGenerator(JSFGeneratorConfiguration task, Logger log) {
+		super(task,log);
+//		_patterns.setProject(task.getProject());
+		// TODO Auto-generated constructor stub
+	}
+
+	/* (non-Javadoc)
+	 * @see com.exadel.vcp.builder.ant.InnerGenerator#createFiles(com.exadel.vcp.builder.config.BuilderConfig)
+	 */
+	public void createFiles(BuilderConfig config) throws GeneratorException {
+		// parsecomponents aganist patterns.
+			List<ComponentBean> compmnents = new ArrayList<ComponentBean>();
+			for (Iterator iter = config.getComponents().iterator(); iter.hasNext();) {
+				ComponentBean component = (ComponentBean) iter.next();
+				boolean includeComponent = true;
+				// Check include patterns
+				if (component.getTag() != null && (component.getTag().getTaglib() == null || component.getTag().getTaglib().equals(getShortname()))) {
+					includeComponent = isIncludeComponent(component);
+					if (includeComponent) {
+						info("Component "+component.getName() +" included in taglib "+getShortname());
+						compmnents.add(component);
+					} else {
+						info("Component "+component.getName() +" excluded from taglib "+getShortname());						
+					}
+				}
+			}
+         List<ValidatorBean> validators = new ArrayList<ValidatorBean>();
+         for (Iterator iter = config.getValidators().iterator(); iter.hasNext();) {
+            ValidatorBean validator = (ValidatorBean) iter.next();
+            boolean includeComponent = true;
+            // Check include patterns
+            if (validator.getTag() != null && (validator.getTag().getTaglib() == null || validator.getTag().getTaglib().equals(getShortname()))) {
+               includeComponent = isIncludeComponent(validator);
+               if (includeComponent) {
+                  info("Validator "+validator.getName() +" included in taglib "+getShortname());
+                  validators.add(validator);
+               } else {
+                  info("Validator "+validator.getName() +" excluded from taglib "+getShortname());                
+               }
+            }
+         }
+         List<ConverterBean> converters = new ArrayList<ConverterBean>();
+         for (Iterator iter = config.getConverters().iterator(); iter.hasNext();) {
+            ConverterBean converter = (ConverterBean) iter.next();
+            boolean includeComponent = true;
+            // Check include patterns
+            if (converter.getTag() != null && (converter.getTag().getTaglib() == null || converter.getTag().getTaglib().equals(getShortname()))) {
+               includeComponent = isIncludeComponent(converter);
+               if (includeComponent) {
+                  info("Converter "+converter.getName() +" included in taglib "+getShortname());
+                  converters.add(converter);
+               } else {
+                  info("Converter "+converter.getName() +" excluded from taglib "+getShortname());                
+               }
+            }
+         }
+			if (compmnents.size() > 0 || validators.size() > 0 || converters.size() > 0) {
+				VelocityContext context = new VelocityContext();
+				Template template = getTemplate();
+				// Put common properties
+				if (compmnents.size() > 0) {
+					context.put("components", compmnents);
+				}
+				if (validators.size() > 0) {
+					context.put("validators", validators);
+				}
+				if (converters.size() > 0) {
+					context.put("converters", converters);
+				}
+				context.put("taglib", this);
+				File taglibFile = getTaglib();//new File(getDestDir(), resultPath);
+				File javaDir = taglibFile.getParentFile();
+				if (!javaDir.exists()) {
+					javaDir.mkdirs();
+				}
+				try {
+					if (taglibFile.exists()) {
+						taglibFile.delete();
+					}
+					Writer out = new BufferedWriter(new FileWriter(taglibFile));
+					template.merge(context, out);
+					out.flush();
+					out.close();
+				} catch (Exception e) {
+					throw new GeneratorException("Error create new taglib file ", e);
+				}
+			} else {
+				info("No components included in taglib "+getShortname());
+			}
+
+	}
+
+	/* (non-Javadoc)
+	 * @see com.exadel.vcp.builder.ant.InnerGenerator#getDefaultTemplateName()
+	 */
+	protected String getDefaultTemplateName() {
+		// TODO Auto-generated method stub
+		return TAGLIB_TEMPLATE_NAME;
+	}
+
+	/**
+	 * @return Returns the description.
+	 */
+	public String getDescription() {
+		return _description;
+	}
+
+	/**
+	 * @param description The description to set.
+	 */
+	public void setDescription(String description) {
+		_description = description;
+	}
+
+	/**
+	 * @return Returns the displayName.
+	 */
+	public String getDisplayname() {
+		return _displayname;
+	}
+
+	/**
+	 * @param displayName The displayName to set.
+	 */
+	public void setDisplayname(String displayName) {
+		_displayname = displayName;
+	}
+
+	/**
+	 * @return Returns the jspVersion.
+	 */
+	public String getJspversion() {
+		return _jspversion;
+	}
+
+	/**
+	 * @param jspVersion The jspVersion to set.
+	 */
+	public void setJspversion(String jspVersion) {
+		_jspversion = jspVersion;
+	}
+
+	/**
+	 * @return Returns the listenerClass.
+	 */
+	public String getListenerclass() {
+		return _listenerclass;
+	}
+
+	/**
+	 * @param listenerClass The listenerClass to set.
+	 */
+	public void setListenerclass(String listenerClass) {
+		_listenerclass = listenerClass;
+	}
+
+	/**
+	 * @return Returns the shortName.
+	 */
+	public String getShortname() {
+		return _shortname;
+	}
+
+	/**
+	 * @param shortName The shortName to set.
+	 */
+	public void setShortname(String shortName) {
+		_shortname = shortName;
+	}
+
+	/**
+	 * @return Returns the taglib.
+	 */
+	public File getTaglib() {
+		return _taglib;
+	}
+
+	/**
+	 * @param taglib The taglib to set.
+	 */
+	public void setTaglib(File taglib) {
+		_taglib = taglib;
+	}
+
+	/**
+	 * @return Returns the tlibVersion.
+	 */
+	public String getTlibversion() {
+		return _tlibversion;
+	}
+
+	/**
+	 * @param tlibVersion The tlibVersion to set.
+	 */
+	public void setTlibversion(String tlibVersion) {
+		_tlibversion = tlibVersion;
+	}
+
+	/**
+	 * @return Returns the uri.
+	 */
+	public String getUri() {
+		return _uri;
+	}
+
+	/**
+	 * @param uri The uri to set.
+	 */
+	public void setUri(String uri) {
+		_uri = uri;
+	}
+
+	/**
+	 * @return Returns the validatorClass.
+	 */
+	public String getValidatorclass() {
+		return _validatorclass;
+	}
+
+	/**
+	 * @param validatorClass The validatorClass to set.
+	 */
+	public void setValidatorclass(String validatorClass) {
+		_validatorclass = validatorClass;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.builder.generator.XMLConfigGenerator#getRootTag()
+	 */
+	protected String getRootTag() {
+		// 
+		return "taglib";
+	}
+
+}

Added: branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/TestDataGenerator.java
===================================================================
--- branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/TestDataGenerator.java	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/TestDataGenerator.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,138 @@
+/**
+ * 
+ */
+package org.ajax4jsf.builder.generator;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.ajax4jsf.builder.config.PropertyBean;
+
+/**
+ * @author Nick Belaevski - nbelaevski at exadel.com
+ * created 13.04.2007
+ * 
+ */
+public class TestDataGenerator {
+
+	private ClassLoader loader;
+	private Logger logger;
+
+	private static Map<String, String> testData = new HashMap<String, String>();
+	static {
+		testData.put(Boolean.TYPE.getName(), "true");
+		testData.put(Character.TYPE.getName(), "'#'");
+		testData.put(Byte.TYPE.getName(), "17");
+		testData.put(Short.TYPE.getName(), "18");
+		testData.put(Integer.TYPE.getName(), "20");
+		testData.put(Long.TYPE.getName(), "26");
+		testData.put(Float.TYPE.getName(), "2.05f");
+		testData.put(Double.TYPE.getName(), "1.34d");
+
+		testData.put(Boolean.class.getName(), "new Boolean(true)");
+		testData.put(Character.class.getName(), "new Character('#')");
+		testData.put(Byte.class.getName(), "new Byte(17)");
+		testData.put(Short.class.getName(), "new Short(18)");
+		testData.put(Integer.class.getName(), "new Integer(20)");
+		testData.put(Long.class.getName(), "new Long(26)");
+		testData.put(Float.class.getName(), "new Float(2.05f)");
+		testData.put(Double.class.getName(), "new Double(1.34d)");
+
+	}
+
+	private static Map<String, String> testData1 = new HashMap<String, String>();
+	static {
+		testData1.put(Boolean.TYPE.getName(), "false");
+		testData1.put(Character.TYPE.getName(), "'*'");
+		testData1.put(Byte.TYPE.getName(), "8");
+		testData1.put(Short.TYPE.getName(), "26");
+		testData1.put(Integer.TYPE.getName(), "15");
+		testData1.put(Long.TYPE.getName(), "13");
+		testData1.put(Float.TYPE.getName(), "1.05f");
+		testData1.put(Double.TYPE.getName(), "1.44d");
+
+		testData1.put(Boolean.class.getName(), "new Boolean(false)");
+		testData1.put(Character.class.getName(), "new Character('*')");
+		testData1.put(Byte.class.getName(), "new Byte(8)");
+		testData1.put(Short.class.getName(), "new Short(26)");
+		testData1.put(Integer.class.getName(), "new Integer(15)");
+		testData1.put(Long.class.getName(), "new Long(13)");
+		testData1.put(Float.class.getName(), "new Float(1.05f)");
+		testData1.put(Double.class.getName(), "new Double(1.44d)");
+
+	}
+	
+	private static Map<String, Class> primitiveToWrapper = new HashMap<String, Class>();
+	static {
+		primitiveToWrapper.put(Boolean.TYPE.getName(), Boolean.class);
+		primitiveToWrapper.put(Character.TYPE.getName(), Character.class);
+		primitiveToWrapper.put(Byte.TYPE.getName(), Byte.class);
+		primitiveToWrapper.put(Short.TYPE.getName(), Short.class);
+		primitiveToWrapper.put(Integer.TYPE.getName(), Integer.class);
+		primitiveToWrapper.put(Long.TYPE.getName(), Long.class);
+		primitiveToWrapper.put(Float.TYPE.getName(), Float.class);
+		primitiveToWrapper.put(Double.TYPE.getName(), Double.class);
+	}
+
+	public TestDataGenerator(ClassLoader loader, Logger logger) {
+		super();
+		this.loader = loader;
+		this.logger = logger;
+	}
+
+
+	public String getTestVeClass(PropertyBean propertyBean) {
+		String type = propertyBean.getClassname();
+		Class clazz = primitiveToWrapper.get(propertyBean.getClassname());
+		if (clazz == null) {
+			try {
+				clazz = loader.loadClass(propertyBean.getClassname());
+			} catch (ClassNotFoundException e) {
+				logger.error(e);
+
+				return null;
+			}
+		}
+
+		return clazz.getName();
+	}
+	
+	public String getTestVeData(PropertyBean propertyBean) {
+		String veClass = getTestVeClass(propertyBean);
+		if (veClass != null) {
+			return getTestData(propertyBean.getName(), veClass, 0);
+		}
+		
+		return "";
+	}
+
+	public String getTestVeData1(PropertyBean propertyBean) {
+		String veClass = getTestVeClass(propertyBean);
+		if (veClass != null) {
+			return getTestData(propertyBean.getName(), veClass, 1);
+		}
+		
+		return "";
+	}
+
+	private String getTestData(String propertyName, String className, int number) {
+		String string = number == 0 ? testData.get(className) : testData1.get(className);
+		if (string != null) {
+			return string;
+		}
+
+		if (number == 0) {
+			return "\"" + propertyName + "\"";
+		}
+	
+		return "\"" + propertyName + "_" + propertyName + "\"";
+	}	
+	
+	public String getTestData(PropertyBean propertyBean) {
+		return getTestData(propertyBean.getName(), propertyBean.getClassname(), 0);
+	}
+
+	public String getTestData1(PropertyBean propertyBean) {
+		return getTestData(propertyBean.getName(), propertyBean.getClassname(), 1);
+	}
+}

Added: branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/ValidatorGenerator.java
===================================================================
--- branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/ValidatorGenerator.java	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/ValidatorGenerator.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,105 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.builder.generator;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.Writer;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
+import org.ajax4jsf.builder.config.BuilderConfig;
+import org.ajax4jsf.builder.config.PropertyBean;
+import org.ajax4jsf.builder.config.ValidatorBean;
+import org.apache.velocity.Template;
+import org.apache.velocity.VelocityContext;
+
+
+/**
+ * This class generates an implementation of a JSF validator
+ * 
+ * Uses the validator.vm velocimacro
+ *
+ */
+public class ValidatorGenerator extends InnerGenerator {
+
+	private static final String COMPONENT_FILE_TEMPLATE = "validator.vm";
+	/**
+	 * @param task
+	 */
+	public ValidatorGenerator(JSFGeneratorConfiguration task, Logger log) {
+		super(task,log);
+	}
+
+	public void createFiles(BuilderConfig config) throws GeneratorException {
+		VelocityContext context = new VelocityContext();
+		Template template = getTemplate();
+		context.put("generator",this);
+		// Put common properties
+		for (Iterator iter = config.getValidators().iterator(); iter.hasNext();) {
+			ValidatorBean validator = (ValidatorBean) iter.next();
+			info("Create class file "+validator.getClassname());
+			if (validator.isGenerate()) {
+				context.put("validator", validator);
+				context.put("package", validator.getPackageName());
+				Set<String> importClasses = new HashSet<String>();
+				for (Iterator it = validator.getProperties().iterator(); it
+						.hasNext();) {
+					PropertyBean property = (PropertyBean) it.next();
+					// For non-primitive types, add import declaration.
+					if (!property.isSimpleType() && !property.isExist()) {
+						importClasses.add(property.getClassname());
+					}
+				}
+				importClasses.add(validator.getSuperclass());
+				context.put("imports", importClasses);
+				String resultPath = validator.getClassname().replace('.', '/')
+						+ ".java";
+				File javaFile = new File(getDestDir(), resultPath);
+				File javaDir = javaFile.getParentFile();
+				if (!javaDir.exists()) {
+					javaDir.mkdirs();
+				}
+				try {
+					if (javaFile.exists()) {
+						javaFile.delete();
+					}
+					Writer out = new BufferedWriter(new FileWriter(javaFile));
+					template.merge(context, out);
+					out.flush();
+					out.close();
+				} catch (Exception e) {
+					throw new GeneratorException(
+							"Error generating validator: " + validator.getClassname(), e);
+				}
+			}
+		}
+		
+	}
+
+	protected String getDefaultTemplateName() {
+		return COMPONENT_FILE_TEMPLATE;
+	}
+
+}

Added: branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/ValidatorTagGenerator.java
===================================================================
--- branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/ValidatorTagGenerator.java	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/ValidatorTagGenerator.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,138 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.builder.generator;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.Writer;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
+import org.ajax4jsf.builder.config.BuilderConfig;
+import org.ajax4jsf.builder.config.PropertyBean;
+import org.ajax4jsf.builder.config.TagBean;
+import org.ajax4jsf.builder.config.ValidatorBean;
+import org.apache.velocity.Template;
+import org.apache.velocity.VelocityContext;
+
+
+/**
+ * Class implement functionality for generate jsp tags for validators
+ * inner element of {@link org.ajax4jsf.builder.ant.JSFGeneratorTask}
+ * use in ant build.xml :
+ * &lt;jsfgenerator ... &gt;
+ *     ....
+ *     &lt;tags ... /&gt;
+ *     ....
+ * &lt;/jsfgenerator&gt;
+ * attributes:
+ * {@see com.exadel.vcp.builder.ant.InnerGenerator}
+ *
+ */
+public class ValidatorTagGenerator extends InnerGenerator {
+
+	private static final String TAG_TEMPLATE_NAME = "validatorTag.vm";
+
+	private String _package = null;
+
+	/**
+	 * @return Returns the package.
+	 */
+	public String getPackage() {
+		return _package;
+	}
+	/**
+	 * @param package1 The package to set.
+	 */
+	public void setPackage(String package1) {
+		_package = package1;
+	}
+	/**
+	 * @param task
+	 */
+	public ValidatorTagGenerator(JSFGeneratorConfiguration task, Logger log) {
+		super(task,log);
+		// TODO Auto-generated constructor stub
+	}
+
+	/* (non-Javadoc)
+	 * @see com.exadel.vcp.builder.ant.InnerGenerator#createFiles(com.exadel.vcp.builder.config.BuilderConfig)
+	 */
+	public void createFiles(BuilderConfig config) throws GeneratorException {
+		VelocityContext context = new VelocityContext();
+		context.put("generator",this);
+		Template template = getTemplate();
+		// Put common properties
+		for (Iterator iter = config.getValidators().iterator(); iter.hasNext();) {
+			ValidatorBean validator = (ValidatorBean) iter.next();
+			TagBean tag = validator.getTag();
+			if ( null !=  tag && null !=tag.getClassname() && tag.isGenerate()) {
+				info("Create tag class file "+validator.getClassname());
+				context.put("validator", validator);
+				
+				context.put("tag", validator.getTag());
+				context.put("package", validator.getTag().getPackageName());
+				Set<String> importClasses = new HashSet<String>();
+				for (Iterator it = validator.getProperties().iterator(); it
+						.hasNext();) {
+					PropertyBean property = (PropertyBean) it.next();
+					// For non-primitive types, add import declaration.
+					if (!property.isSimpleType() && !property.isHidden()) {
+						importClasses.add(property.getClassname());
+					}
+				}
+				importClasses.add(validator.getTag().getSuperclass());
+				context.put("imports", importClasses);
+				String resultPath = validator.getTag().getClassname().replace('.', '/')
+						+ ".java";
+				File javaFile = new File(getDestDir(), resultPath);
+				File javaDir = javaFile.getParentFile();
+				if (!javaDir.exists()) {
+					javaDir.mkdirs();
+				}
+				try {
+					if (javaFile.exists()) {
+						javaFile.delete();
+					}
+					Writer out = new BufferedWriter(new FileWriter(javaFile));
+					template.merge(context, out);
+					out.flush();
+					out.close();
+				} catch (Exception e) {
+					throw new GeneratorException(
+							"Error generating JSP Tag Java file for validator " + validator.getName(), e);
+				}
+			}
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see com.exadel.vcp.builder.ant.InnerGenerator#getDefaultTemplateName()
+	 */
+	protected String getDefaultTemplateName() {
+		// TODO Auto-generated method stub
+		return TAG_TEMPLATE_NAME;
+	}
+
+}

Added: branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/XMLConfigGenerator.java
===================================================================
--- branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/XMLConfigGenerator.java	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/XMLConfigGenerator.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,106 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.builder.generator;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+
+import org.ajax4jsf.builder.config.ParsingException;
+import org.ajax4jsf.builder.xml.XMLBody;
+
+/**
+ * @author shura
+ * 
+ */
+public abstract class XMLConfigGenerator extends InnerGenerator {
+
+	private File _include = null;
+
+	/**
+	 * @param config
+	 * @param log
+	 */
+	public XMLConfigGenerator(JSFGeneratorConfiguration config, Logger log) {
+		super(config, log);
+	}
+
+	/**
+	 * @return Returns the include.
+	 */
+	public File getInclude() {
+		return _include;
+	}
+
+	/**
+	 * @param include
+	 *            The include to set.
+	 */
+	public void setInclude(File include) {
+		_include = include;
+	}
+
+	public String getIncludeContent() {
+		String content = "";
+		File include = getInclude();
+		if (null != include) {
+			if (include.isDirectory()) {
+				File[] files = include.listFiles();
+				for (int i = 0; i < files.length; i++) {
+					File file = files[i];
+					if (file.isFile()) {
+						content = content + getXMLBody(file);
+
+					}
+				}
+			} else if (include.exists()) {
+				content = getXMLBody(include);
+			}
+		}
+		return content;
+	}
+
+	/**
+	 * @param file
+	 * @return
+	 */
+	private String getXMLBody(File file) {
+		XMLBody body = new XMLBody();
+		try {
+			body.loadXML(new FileInputStream(file));
+			if (body.isRootName(getRootTag())) {
+				return body.getContent();
+			}
+		} catch (FileNotFoundException e) {
+			getLog().warn("Not found include file ", e);
+		} catch (ParsingException e) {
+			getLog().warn("Error parsing include file ", e);
+		}
+		return "";
+	}
+
+	/**
+	 * @return
+	 */
+	protected abstract String getRootTag();
+
+}

Added: branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/velocity/AntFileResourceLoader.java
===================================================================
--- branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/velocity/AntFileResourceLoader.java	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/velocity/AntFileResourceLoader.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,114 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.builder.velocity;
+
+import java.io.BufferedInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.InputStream;
+
+import org.apache.commons.collections.ExtendedProperties;
+import org.apache.velocity.exception.ResourceNotFoundException;
+import org.apache.velocity.runtime.resource.Resource;
+import org.apache.velocity.runtime.resource.loader.ResourceLoader;
+
+/**
+ * Load resource from file, name prepared by Ant 
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2006/12/04 14:45:58 $
+ *
+ */
+public class AntFileResourceLoader extends ResourceLoader {
+
+	/* (non-Javadoc)
+	 * @see org.apache.velocity.runtime.resource.loader.ResourceLoader#init(org.apache.commons.collections.ExtendedProperties)
+	 */
+	public void init(ExtendedProperties arg0) {
+        rsvc.info("AntFileResourceLoader : initialization starting.");
+        rsvc.info("AntFileResourceLoader : initialization complete.");
+	}
+
+	/* (non-Javadoc)
+	 * @see org.apache.velocity.runtime.resource.loader.ResourceLoader#getResourceStream(java.lang.String)
+	 */
+	public InputStream getResourceStream(String templateName) throws ResourceNotFoundException {
+        /*
+         * Make sure we have a valid templateName.
+         */
+        if (templateName == null || templateName.length() == 0)
+        {
+            /*
+             * If we don't get a properly formed templateName then
+             * there's not much we can do. So we'll forget about
+             * trying to search any more paths for the template.
+             */
+            throw new ResourceNotFoundException(
+                "Need to specify a file name or file path!");
+        }
+        try 
+        {
+            rsvc.info("AntFileResourceLoader : attempt to load file "+templateName);
+            File file = new File( templateName );   
+        
+            if ( file.canRead() )
+            {
+                return new BufferedInputStream(
+                    new FileInputStream(file.getAbsolutePath()));
+            }
+            else
+            {                
+                String msg = "AntFileResourceLoader Error: can not read file " +
+                templateName;
+          
+               throw new ResourceNotFoundException( msg );
+            }                
+        }
+        catch( FileNotFoundException fnfe )
+        {
+            /*
+             *  log and convert to a general Velocity ResourceNotFoundException
+             */
+            String msg = "AntFileResourceLoader Error: file not found " +
+            templateName;
+      
+           throw new ResourceNotFoundException( msg );
+        }
+	}
+
+	/* (non-Javadoc)
+	 * @see org.apache.velocity.runtime.resource.loader.ResourceLoader#isSourceModified(org.apache.velocity.runtime.resource.Resource)
+	 */
+	public boolean isSourceModified(Resource arg0) {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.apache.velocity.runtime.resource.loader.ResourceLoader#getLastModified(org.apache.velocity.runtime.resource.Resource)
+	 */
+	public long getLastModified(Resource arg0) {
+		// TODO Auto-generated method stub
+		return 0;
+	}
+
+}

Added: branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/velocity/BuilderContext.java
===================================================================
--- branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/velocity/BuilderContext.java	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/velocity/BuilderContext.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,86 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.builder.velocity;
+
+import java.io.File;
+import java.util.Properties;
+
+import org.ajax4jsf.builder.generator.GeneratorException;
+import org.apache.velocity.Template;
+import org.apache.velocity.VelocityContext;
+import org.apache.velocity.app.Velocity;
+
+/**
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.5 $ $Date: 2007/02/26 20:48:51 $
+ *
+ */
+public class BuilderContext extends VelocityContext {
+
+	public static final String TEMPLATES_PATH = "META-INF/templates";
+
+	public static final String TEMPLATES12_PATH = "META-INF/templates12";
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = -4533522269902933084L;
+	
+	public static void init(File templatesDir) throws GeneratorException{
+		try {
+			Properties velocityProperties = new Properties();
+			try {
+				velocityProperties.load(BuilderContext.class.getClassLoader()
+						.getResourceAsStream(TEMPLATES_PATH+"/velocity.properties"));
+			} catch (Exception e) {
+				e.printStackTrace();
+			}
+			if (null != templatesDir) {
+				velocityProperties.put("resource.loader", "file,"+velocityProperties.getProperty("resource.loader","classpath,antfile"));
+				velocityProperties
+						.put("file.resource.loader.class",
+								"org.apache.velocity.runtime.resource.loader.FileResourceLoader");
+				velocityProperties.put("file.resource.loader.path",
+						templatesDir.getAbsolutePath());
+			}
+			Velocity.init(velocityProperties);
+		} catch (Exception e1) {
+			e1.printStackTrace();
+			throw new GeneratorException(
+					"Error initialization Velocity engine", e1);
+		}
+
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.builder.ant.JSFGeneratorConfiguration#getTemplate(java.lang.String)
+	 */
+	public static Template getTemplate(String templateName) throws GeneratorException {
+		try {
+			return Velocity.getTemplate(templateName);
+		}  catch (Exception e) {
+			throw new GeneratorException("Error loading template " + templateName,e);
+		}
+	}
+
+
+}

Added: branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/velocity/ClasspathTemplateLoader.java
===================================================================
--- branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/velocity/ClasspathTemplateLoader.java	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/velocity/ClasspathTemplateLoader.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,53 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.builder.velocity;
+
+import java.io.InputStream;
+
+import org.apache.velocity.exception.ResourceNotFoundException;
+import org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader;
+
+
+/**
+ * @author asmirnov at exadel.com (latest modification by $Author: ishabalov $)
+ * @version $Revision: 1.1.2.4 $ $Date: 2007/02/20 20:58:02 $
+ *
+ */
+public class ClasspathTemplateLoader extends ClasspathResourceLoader {
+
+	/* (non-Javadoc)
+	 * @see org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader#getResourceStream(java.lang.String)
+	 */
+	public synchronized InputStream getResourceStream(String name) throws ResourceNotFoundException {
+		if(null == name || name.length()==0) {
+			throw new ResourceNotFoundException("Resource name not set for classpath template loading ");
+		}
+		StringBuffer templatePath = new StringBuffer(BuilderContext.TEMPLATES_PATH);
+		if(!name.startsWith("/")) {
+			templatePath.append('/');
+		}
+		templatePath.append(name);
+		return super.getResourceStream(templatePath.toString());
+	}
+
+	
+}

Added: branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/xml/XMLBody.java
===================================================================
--- branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/xml/XMLBody.java	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/java/org/ajax4jsf/builder/xml/XMLBody.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,221 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.builder.xml;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.StringReader;
+import java.io.StringWriter;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathConstants;
+import javax.xml.xpath.XPathExpressionException;
+import javax.xml.xpath.XPathFactory;
+
+import org.ajax4jsf.builder.config.ParsingException;
+import org.w3c.dom.Document;
+import org.w3c.dom.DocumentFragment;
+import org.w3c.dom.DocumentType;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.EntityResolver;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+/**
+ * This class must read XML file from input stream and can extract body of root
+ * element for include into target in generation.
+ * 
+ * @author shura
+ * 
+ */
+public class XMLBody {
+	private Document xmlDocument;
+
+	private Element rootElement;
+
+	/**
+	 * Load XML document and parse it into DOM.
+	 * 
+	 * @param input
+	 * @throws ParsingException
+	 */
+	public void loadXML(InputStream input) throws ParsingException {
+		try {
+			// Create Document Builder Factory
+			DocumentBuilderFactory docFactory = DocumentBuilderFactory
+					.newInstance();
+
+			docFactory.setValidating(false);
+			// Create Document Builder
+			DocumentBuilder docBuilder = docFactory.newDocumentBuilder();
+			
+			docBuilder.isValidating();
+			
+			// Disable loading of external Entityes
+			docBuilder.setEntityResolver(new EntityResolver() {
+				// Dummi resolver - alvays do nothing
+				public InputSource resolveEntity(String publicId, String systemId)
+						throws SAXException, IOException {
+					return new InputSource(new StringReader(""));
+				}
+
+			});
+
+			// open and parse XML-file
+			xmlDocument = docBuilder.parse(input);
+
+			// Get Root xmlElement
+			rootElement = xmlDocument.getDocumentElement();
+		} catch (Exception e) {
+			throw new ParsingException("Error load XML ", e);
+		}
+
+	}
+
+	/**
+	 * Check name of root element is as expected.
+	 * 
+	 * @param name
+	 * @return
+	 */
+	public boolean isRootName(String name) {
+		return rootElement.getNodeName().equals(name);
+	}
+
+	public String getDoctype() {
+		DocumentType doctype = xmlDocument.getDoctype();
+		if (null != doctype) {
+			return doctype.getName();
+		}
+		return null;
+	}
+
+	public String getPiblicId() {
+		DocumentType doctype = xmlDocument.getDoctype();
+		if (null != doctype) {
+			return doctype.getPublicId();
+		}
+		return null;
+	}
+
+	public String getRootTypeName() {
+		return rootElement.getSchemaTypeInfo().getTypeName();
+	}
+
+	public String getContent() throws ParsingException {
+		NodeList childNodes = rootElement.getChildNodes();
+		return serializeNodes(childNodes);
+	}
+
+	private String serializeNodes(NodeList childNodes) throws ParsingException {
+		DocumentFragment fragment = xmlDocument.createDocumentFragment();
+		for (int i = 0; i < childNodes.getLength(); i++) {
+			fragment.appendChild(childNodes.item(i).cloneNode(true));
+		}
+		try {
+			TransformerFactory transformerFactory = TransformerFactory
+					.newInstance();
+			Transformer transformer = transformerFactory.newTransformer();
+			transformer.setOutputProperty("omit-xml-declaration", "yes");
+			StringWriter out = new StringWriter();
+			StreamResult result = new StreamResult(out);
+			transformer.transform(new DOMSource(fragment), result);
+			return out.toString();
+
+		} catch (Exception e) {
+			throw new ParsingException(e);
+		}
+	}
+	
+	public String getContent(String xpath) throws ParsingException{
+		XPath path = XPathFactory.newInstance().newXPath();
+		NodeList childNodes;
+		try {
+			childNodes = (NodeList) path.evaluate(xpath, xmlDocument,XPathConstants.NODESET);
+		} catch (XPathExpressionException e) {
+			throw new ParsingException("Error evaluate xpath",e);
+		}
+		return serializeNodes(childNodes);
+	}
+
+	public String getContentUnique(String xpath, String keyXPath, Set<String> keySet) throws ParsingException{
+		if (keyXPath == null) {
+			return getContent(xpath);
+		} else {
+			
+			XPath path = XPathFactory.newInstance().newXPath();
+			NodeList childNodes;
+			try {
+				childNodes = (NodeList) path.evaluate(xpath, xmlDocument,XPathConstants.NODESET);
+				
+				List<Node> nodeSet = new ArrayList<Node>();
+				
+				for (int i = 0; i < childNodes.getLength(); i++) {
+					Node node = childNodes.item(i).cloneNode(true);
+					
+					String key = serializeNodes((NodeList) path.evaluate(keyXPath, node, XPathConstants.NODESET));
+					if (!keySet.contains(key)) {
+						keySet.add(key);
+						nodeSet.add(node);
+					}
+				}
+
+				return serializeNodes(new ArrayNodeList(nodeSet.toArray(new Node[nodeSet.size()])));
+			
+			} catch (XPathExpressionException e) {
+				throw new ParsingException("Error evaluate xpath",e);
+			}
+		}
+	}
+}
+
+class ArrayNodeList implements NodeList {
+	private Node[] nodes;
+
+	public ArrayNodeList(Node[] nodes) {
+		super();
+		this.nodes = nodes;
+	}
+
+	public int getLength() {
+		return nodes.length;
+	}
+
+	public Node item(int index) {
+		if (index < nodes.length) {
+			return this.nodes[index];
+		}
+		
+		return null;
+	}
+}

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/component-config.dtd
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/component-config.dtd	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/component-config.dtd	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,249 @@
+<!-- Defenition of component configuration for generator 
+	PUBLIC-ID "-//AJAX4JSF//CDK Generator config/EN"
+	SYSTEM-ID https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd -->
+<!-- Root element for components and renderers  -->	
+<!ELEMENT components (component*,renderer*,listener*,validator*,converter*) >
+<!-- Component description with common properties, tags and renderers descriptions  -->	
+<!ELEMENT component (name,family?,classname?,superclass?,test*,description?,displayname?,icon?,facet*,renderer*,tag?,taghandler?,(include|properties|property)*)>
+<!-- Validator description with properties and tags -->
+<!ELEMENT validator (name,classname?,superclass?,test*,description?,displayname?,icon?,tag?,taghandler?,(include|properties|property)*)>
+<!-- Validator description with properties and tags -->
+<!ELEMENT converter (name,classname?,superclass?,test*,description?,displayname?,icon?,tag?,taghandler?,(include|properties|property)*)>
+
+<!-- components with generate=false not produce component class, 
+     use for describe superclasses for other components -->
+<!ATTLIST component
+	generate (true|false) "true" 
+	>
+	
+<!-- validators with generate=false do not generate a class -->
+<!ATTLIST validator
+	generate (true|false) "true" 
+	>
+	
+<!-- converters with generate=false do not generate a class -->
+<!ATTLIST converter
+	generate (true|false) "true" 
+	>
+
+<!-- Common component parameters -->
+<!-- Name of component/renderer/property -->
+<!ELEMENT name (#PCDATA)>
+<!-- Id of the validator/converter -->
+<!ELEMENT id (#PCDATA)>
+<!-- Component family -->
+<!ELEMENT family (#PCDATA)>
+<!-- Element Description for config files -->
+<!ELEMENT description ANY>
+<!-- Element Dispaly name , for config files -->
+<!ELEMENT displayname ANY>
+<!-- Element icon image , for config files -->
+<!ELEMENT icon (#PCDATA)>
+<!-- component allowed facet  name , for config files -->
+<!ELEMENT facet (name,displayname?,description?)>
+<!-- Full name of Java class -->
+<!ELEMENT classname (#PCDATA)>
+<!-- Full name of Java super class -->
+<!ELEMENT superclass (#PCDATA)>
+<!-- Define renderer for this component -->
+<!ELEMENT renderer (name,(classname|template),superclass?,description?,displayname?,icon?,facet?,renderkit?)>
+<!-- Define render kit Id for renderer -->
+<!ELEMENT renderkit (#PCDATA)>
+<!-- Template file name -->
+<!ELEMENT template (#PCDATA)>
+
+<!ATTLIST renderer
+	generate (true|false) "false" 
+	override (true|false) "false" 
+	>
+
+<!-- Define JSP tag for this component -->
+<!ELEMENT tag (name,classname,superclass?,test*,taglib?,description?,displayname?,icon?)>
+<!ATTLIST tag
+	generate (true|false) "true" 
+	bodyContent (JSP|empty) "JSP" 
+	>
+
+<!ELEMENT test (classname?,superclassname?)>
+<!--!ELEMENT classname (#PCDATA)-->
+<!ELEMENT superclassname (#PCDATA)>
+
+<!-- Define JSP tag for this component -->
+<!ELEMENT taghandler (name?,classname,superclass?,description?,displayname?,icon?)>
+<!ATTLIST taghandler
+	generate (true|false) "false" 
+	>
+
+<!ELEMENT listener (name,listenerclass,componentclass,eventclass,methodname?,tag?,taghandler?,property*)>
+
+<!ELEMENT listenerclass (#PCDATA)>
+<!ELEMENT eventclass (#PCDATA)>
+<!ELEMENT componentclass (#PCDATA)>
+<!ELEMENT methodname (#PCDATA)>
+
+<!-- Short name of taglib for this tag - for generate set of taglibs in single task -->
+<!ELEMENT taglib (#PCDATA)>
+
+<!-- proprties group for included entity -->
+<!ELEMENT properties ((include|properties|property)*)>
+
+<!-- Define single property for this component -->
+<!ELEMENT property (name,classname?,description?,defaultvalue?,methodargs?,alias*)>
+
+<!-- default value for property -->
+<!ELEMENT defaultvalue (#PCDATA)>
+
+<!-- comma-separated list of method call parameters classes for Method-binded property -->
+<!ELEMENT methodargs (#PCDATA)>
+
+<!-- alias for property in JSP tag -->
+<!ELEMENT alias (#PCDATA)>
+
+<!ATTLIST property 
+	el (true|false) "true"
+	elonly (true|false) "false"
+	hidden (true|false) "false"
+	exist (true|false) "false"
+	raw (true|false) "false"
+	existintag (true|false) "false"
+	attachedstate (true|false) "false"
+	transient (true|false) "false"
+	hidden (true|false) "false"
+	required (true|false) "false"
+	disabled (true|false) "false"	
+	>
+<!-- include pre-defined properties set -->
+<!ELEMENT include EMPTY >
+<!ATTLIST include 
+      href CDATA #REQUIRED
+>
+
+<!-- pre-defined entities for common components properties -->
+<!ENTITY html_attributes   PUBLIC "html_universal_attributes" "entities/html_universal_attributes.ent">	
+<!-- pre-defined entities for common component events -->
+<!ENTITY html_events   PUBLIC "html_events" "entities/html_events.ent">	
+<!-- pre-defined entities for common controls' events -->
+<!ENTITY html_control_events   PUBLIC "html_control_events" "entities/html_control_events.ent">	
+<!-- -->
+<!ENTITY ajax_region_attributes PUBLIC "ajax_region_attributes" "entities/ajax_region_attributes.ent">
+<!-- -->
+<!ENTITY ajax_component_attributes PUBLIC "ajax_component_attributes" "entities/ajax_component_attributes.ent">
+<!-- -->
+<!ENTITY ajax_output_attributes PUBLIC "ajax_output_attributes" "entities/ajax_output_attributes.ent">
+<!-- -->
+<!ENTITY ajax_dnd_attributes PUBLIC "ajax_dnd_attributes" "entities/ajax_dnd_attributes.ent">
+<!-- -->
+<!ENTITY dropzone_attributes PUBLIC "dropzone_attributes" "entities/dropzone_attributes.ent">
+<!-- -->
+<!ENTITY draggable_attributes PUBLIC "draggable_attributes" "entities/draggable_attributes.ent">
+
+<!-- imported from myfaces -->
+
+<!-- -->
+<!ENTITY validator_min_max_attributes PUBLIC "validator_min_max_attributes" "entities/validator_min_max_attributes.ent">
+<!-- -->
+<!ENTITY ui_component_attributes PUBLIC "ui_component_attributes" "entities/ui_component_attributes.ent">
+<!-- -->
+<!ENTITY ui_parameter_attributes PUBLIC "ui_parameter_attributes" "entities/ui_parameter_attributes.ent">
+<!-- -->
+<!ENTITY ui_for_attribute PUBLIC "ui_for_attribute" "entities/ui_for_attribute.ent">
+<!-- -->
+<!ENTITY ui_select_item_attributes PUBLIC "ui_select_item_attributes" "entities/ui_select_item_attributes.ent">
+<!-- -->
+<!ENTITY ui_select_items_attributes PUBLIC "ui_select_items_attributes" "entities/ui_select_items_attributes.ent">
+<!-- -->
+<!ENTITY html_anchor_attributes PUBLIC "html_anchor_attributes" "entities/html_anchor_attributes.ent">
+<!-- -->
+<!ENTITY html_button_attributes PUBLIC "html_button_attributes" "entities/html_button_attributes.ent">
+<!-- -->
+<!ENTITY html_event_handler_attributes PUBLIC "html_event_handler_attributes" "entities/html_events.ent">
+<!-- -->
+<!ENTITY html_form_attributes PUBLIC "html_form_attributes" "entities/html_form_attributes.ent">
+<!-- -->
+<!ENTITY spec_img_attributes PUBLIC "spec_img_attributes" "entities/spec_img_attributes.ent"> 
+<!-- -->
+<!ENTITY html_img_attributes PUBLIC "html_img_attributes" "entities/html_img_attributes.ent">
+<!-- -->
+<!ENTITY html_input_attributes PUBLIC "html_input_attributes" "entities/html_input_attributes.ent">
+<!-- -->
+<!ENTITY html_input_checkbox_attributes PUBLIC "html_input_checkbox_attributes" "entities/html_input_checkbox_attributes.ent">
+<!-- -->
+<!ENTITY html_input_radio_attributes PUBLIC "html_input_radio_attributes" "entities/html_input_radio_attributes.ent">
+<!-- -->
+<!ENTITY html_label_attributes PUBLIC "html_label_attributes" "entities/html_label_attributes.ent">
+<!-- -->
+<!ENTITY html_select_attributes PUBLIC "html_select_attributes" "entities/html_select_attributes.ent">
+<!-- -->
+<!ENTITY html_table_attributes PUBLIC "html_table_attributes" "entities/html_table_attributes.ent">
+<!-- -->
+<!ENTITY html_textarea_attributes PUBLIC "html_textarea_attributes" "entities/html_textarea_attributes.ent">
+<!-- -->
+<!ENTITY html_universal_attributes PUBLIC "html_universal_attributes" "entities/html_universal_attributes.ent">
+<!-- -->
+<!ENTITY html_style_attributes PUBLIC "html_style_attributes" "entities/html_style_attributes.ent">
+<!-- -->
+<!ENTITY html_control_attributes PUBLIC "html_control_attributes" "entities/html_control_attributes.ent">
+<!-- -->
+<!ENTITY html_control_events PUBLIC "html_control_events" "entities/html_control_events.ent">
+<!-- -->
+<!ENTITY html_events PUBLIC "html_events" "entities/html_events.ent">
+<!-- -->
+<!ENTITY html_input_events PUBLIC "html_input_events" "entities/html_input_events.ent">
+<!-- -->
+<!ENTITY ui_column_attributes PUBLIC "ui_column_attributes" "entities/ui_column_attributes.ent">
+<!-- -->
+<!ENTITY ui_command_attributes PUBLIC "ui_command_attributes" "entities/ui_command_attributes.ent">
+<!-- -->
+<!ENTITY ui_component_attributes PUBLIC "ui_component_attributes" "entities/ui_component_attributes.ent">
+<!-- -->
+<!ENTITY ui_data_attributes PUBLIC "ui_data_attributes" "entities/ui_data_attributes.ent">
+<!-- -->
+<!ENTITY ui_form_attributes PUBLIC "ui_form_attributes" "entities/ui_form_attributes.ent">
+<!-- -->
+<!ENTITY ui_graphic_attributes PUBLIC "ui_graphic_attributes" "entities/ui_graphic_attributes.ent">
+<!-- -->
+<!ENTITY ui_input_attributes PUBLIC "ui_input_attributes" "entities/ui_input_attributes.ent">
+<!-- -->
+<!ENTITY ui_message_attributes PUBLIC "ui_message_attributes" "entities/ui_message_attributes.ent">
+<!-- -->
+<!ENTITY ui_messages_attributes PUBLIC "ui_messages_attributes" "entities/ui_messages_attributes.ent">
+<!-- -->
+<!ENTITY ui_output_attributes PUBLIC "ui_output_attributes" "entities/ui_output_attributes.ent">
+<!-- -->
+<!ENTITY ui_panel_attributes PUBLIC "ui_panel_attributes" "entities/ui_panel_attributes.ent">
+<!-- -->
+<!ENTITY ui_parameter_attributes PUBLIC "ui_parameter_attributes" "entities/ui_parameter_attributes.ent">
+<!-- -->
+<!ENTITY ui_select_boolean_attributes PUBLIC "ui_select_boolean_attributes" "entities/ui_select_boolean_attributes.ent">
+<!-- -->
+<!ENTITY ui_select_many_attributes PUBLIC "ui_select_many_attributes" "entities/ui_select_many_attributes.ent">
+<!-- -->
+<!ENTITY ui_select_one_attributes PUBLIC "ui_select_one_attributes" "entities/ui_select_one_attributes.ent">
+<!-- -->
+<!ENTITY spec_img_attributes PUBLIC "spec_img_attributes" "entities/spec_img_attributes.ent">
+<!-- -->
+<!ENTITY spec_table_attributes PUBLIC "spec_table_attributes" "entities/spec_table_attributes.ent">
+<!-- -->
+<!ENTITY content_component_attributes PUBLIC "content_component_attributes" "entities/content_component_attributes.ent">
+<!-- -->
+<!ENTITY header_component_attributes PUBLIC "header_component_attributes" "entities/header_component_attributes.ent">
+<!--
+<!ENTITY standard_command_button_attributes PUBLIC "standard_command_button_attributes" "entities/standard_command_button_attributes.ent">
+<!ENTITY standard_command_link_attributes PUBLIC "standard_command_link_attributes" "entities/standard_command_link_attributes.ent">
+<!ENTITY standard_data_table_attributes PUBLIC "standard_data_table_attributes" "entities/standard_data_table_attributes.ent">
+<!ENTITY standard_input_text_attributes PUBLIC "standard_input_text_attributes" "entities/standard_input_text_attributes.ent">
+<!ENTITY standard_input_textarea_attributes PUBLIC "standard_input_textarea_attributes" "entities/standard_input_textarea_attributes.ent">
+<!ENTITY standard_message_attributes PUBLIC "standard_message_attributes" "entities/standard_message_attributes.ent">
+<!ENTITY standard_messages_attributes PUBLIC "standard_messages_attributes" "entities/standard_messages_attributes.ent">
+<!ENTITY standard_output_label_attributes PUBLIC "standard_output_label_attributes" "entities/standard_output_label_attributes.ent">
+<!ENTITY standard_output_text_attributes PUBLIC "standard_output_text_attributes" "entities/standard_output_text_attributes.ent">
+<!ENTITY standard_panel_group_attributes PUBLIC "standard_panel_group_attributes" "entities/standard_panel_group_attributes.ent">
+<!ENTITY standard_panel_grid_attributes PUBLIC "standard_panel_grid_attributes" "entities/standard_panel_grid_attributes.ent">
+<!ENTITY standard_select_boolean_checkbox_attributes PUBLIC "standard_select_boolean_checkbox_attributes" "entities/standard_select_boolean_checkbox_attributes.ent">
+<!ENTITY standard_select_many_checkbox_attributes PUBLIC "standard_select_many_checkbox_attributes" "entities/standard_select_many_checkbox_attributes.ent">
+<!ENTITY standard_select_many_listbox_attributes PUBLIC "standard_select_many_listbox_attributes" "entities/standard_select_many_listbox_attributes.ent">
+<!ENTITY standard_select_many_menu_attributes PUBLIC "standard_select_many_menu_attributes" "entities/standard_select_many_menu_attributes.ent">
+<!ENTITY standard_select_one_listbox_attributes PUBLIC "standard_select_one_listbox_attributes" "entities/standard_select_one_listbox_attributes.ent">
+<!ENTITY standard_select_one_menu_attributes PUBLIC "standard_select_one_menu_attributes" "entities/standard_select_one_menu_attributes.ent">
+<!ENTITY standard_select_one_radio_attributes PUBLIC "standard_select_one_radio_attributes" "entities/standard_select_one_radio_attributes.ent">
+-->
\ No newline at end of file

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ajax_component_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ajax_component_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ajax_component_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,91 @@
+<properties>
+    <!--
+    <property >
+       <name>ajaxType</name>
+       <classname>java.lang.String</classname>
+       <description>If value equals "link" ( default ), builded JavaScript
+            code for "event" will submit as Action component. For
+            "input" value, and if parent component instance of UIInput will submit also value
+            for input field. For "validator" value force request processing to render after process validators phase.
+            For this, all conversions and validations method will performed, but new values not set to backed beans. 
+            </description>
+    </property>
+    -->
+    
+    <property >
+        <name>ajaxSingle</name>
+        <classname>boolean</classname>
+        <description>if "true", submits ONLY one field/link, instead of all form controls</description>
+    </property>
+    
+    <property >
+        <name>bypassUpdates</name>
+        <classname>boolean</classname>
+        <description>If "true", after process validations phase it skips updates of model beans on a force render response. It can be used for validating components input</description>
+    </property>
+    
+    <property >
+        <name>limitToList</name>
+        <classname>boolean</classname>
+        <description>If "true", updates on client side ONLY elements from this 'reRender' property. If "false" (default) updates all rendered by ajax region components</description>
+    </property>
+    
+    <property >
+        <name>reRender</name>
+        <classname>java.lang.Object</classname>
+        <description>Id['s] (in format of call  UIComponent.findComponent()) of components, rendered in case of AjaxRequest  caused by this component. Can be single id, comma-separated list of Id's, or EL Expression  with array or Collection</description>
+    </property>
+    
+    <property >
+        <name>status</name>
+        <classname>java.lang.String</classname>
+        <description>ID (in format of call UIComponent.findComponent()) of Request status component</description>
+    </property>
+    
+    <property >
+        <name>eventsQueue</name>
+        <classname>java.lang.String</classname>
+        <description>Name of requests queue to avoid send next request before complete other from same event. Can be used to reduce number of requests of frequently events (key press, mouse move etc.)</description>
+    </property>
+    
+    <property >
+        <name>requestDelay</name>
+        <classname>int</classname>
+        <description> Delay (in ms.) for send ajax request on JavaScript event. In conjunction with events queue can reduce number of requests on keyboard or mouse move events</description>
+    </property>
+    
+    <property >
+        <name>oncomplete</name>
+        <classname>java.lang.String</classname>
+        <description>JavaScript code for call after request completed on client side</description>
+    </property>
+    <property >
+        <name>focus</name>
+        <classname>java.lang.String</classname>
+        <description>id of element to set focus after request completed on client side</description>
+    </property>
+    <property >
+       <name>data</name>
+       <classname>java.lang.Object</classname>
+       <description>Serialized (on default with JSON) data passed on the client by a developer on AJAX request. It's accessible via "data.foo" syntax</description>
+    </property>
+	<property>
+			<name>ignoreDupResponses</name>
+			<classname>boolean</classname>
+			<description>
+				If "true", unfinished request will be aborted on new event
+			</description>
+	</property>
+	<property>
+			<name>timeout</name>
+			<classname>int</classname>
+			<description>Response waiting time on a particular request. If a response is not received during this time, the request is aborted</description>
+	</property>
+    <!--
+    <property >
+       <name></name>
+       <classname></classname>
+       <description></description>
+    </property>
+-->    
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ajax_dnd_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ajax_dnd_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ajax_dnd_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,25 @@
+<properties>
+    <property hidden="true">
+        <name>tagName</name>
+        <classname>java.lang.String</classname>
+        <description><![CDATA[A name of an html element encoded for this component.]]></description>
+        <defaultvalue><![CDATA["div"]]></defaultvalue> 
+    </property>
+    <property>
+        <name>sid</name>
+        <classname>java.lang.String</classname>
+        <description><![CDATA[EXACT value for an encoded html 'id' attribute, instead of JSF client id generation.]]></description>
+        <!-- 			<defaultvalue><![CDATA[]]></defaultvalue>  -->
+    </property>
+    <property hidden="true">
+        <name>effectDepth</name>
+        <classname>java.lang.String</classname>
+        <description>depth from 0 ( max ) to 1 ( none ) of visual effect  ( zoom, opacity etc )</description>
+    </property>
+    <property hidden="true">
+        <name>effectDuration</name>
+        <classname>java.lang.String</classname>
+        <description>time in seconds for duration of visual effect  ( zoom, opacity etc )</description>
+    </property>
+    
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ajax_output_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ajax_output_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ajax_output_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,21 @@
+<properties>
+    <property>
+        <name>ajaxRendered</name>
+        <classname>boolean</classname>
+        <defaultvalue>true</defaultvalue>
+        <description>
+            Define, must be (or not) content of this component will be included in AJAX response created by parent AJAX Container, even if not forced by reRender list of ajax action.
+            ignored if component marked to output by Ajax action.
+        </description>
+    </property>
+    <property>
+        <name>keepTransient</name>
+        <classname>boolean</classname>
+        <description><![CDATA[
+				Flag for mark all child components to non-transient. If "true", all children components will be set to non-transient state and keep in saved components tree.
+				For output in self-renderer region all content (By default, all content in <f:verbatim> tags and non-jsf elements in facelets, marked as transient - since, self-rendered ajax regions don't plain output for ajax processing).
+			]]></description>
+        <defaultvalue>false</defaultvalue>
+    </property>
+    
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ajax_region_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ajax_region_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ajax_region_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,26 @@
+<properties>
+    <property  elonly="true" el="true" attachedstate="true" >
+        <name>ajaxListener</name>
+        <defaultvalue>null</defaultvalue>
+        <classname>javax.faces.el.MethodBinding</classname>
+        <methodargs>org.ajax4jsf.framework.ajax.AjaxEvent.class</methodargs>
+        <description> MethodBinding representing an action listener method that will be notified when this component is activated by the ajax Request and handle it. The expression must evaluate to a public method that takes an AjaxEvent parameter, with a return type of void</description>
+    </property>
+    <property hidden="true">
+        <name>submitted</name>
+        <classname>boolean</classname>        
+    </property>    
+    <property >
+        <name>selfRendered</name>
+        <classname>boolean</classname>
+        <description>if "true", self-render subtree at InvokeApplication ( or Decode, if immediate property set to true )  phase </description>
+    </property>
+    
+    <property >
+        <name>immediate</name>
+        <classname>boolean</classname>
+        <description>Flag indicating that, if this component is activated by ajaxrequest, notifications should be delivered to interested listeners and actions immediately (that is, during Apply Request Values phase) rather than waiting until Invoke Application phase</description>
+    </property>
+    
+    
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/alt_location_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/alt_location_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/alt_location_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,25 @@
+<properties>
+    
+    <property>
+        <name>javascriptLocation</name><classname>java.lang.String</classname><description>
+            An alternate location to find javascript resources.  If no values are specified, javaScript will
+            be loaded from the resources directory using AddResource and ExtensionsFilter
+        </description>
+    </property>
+    
+    <property>
+        <name>imageLocation</name><classname>java.lang.String</classname><description>
+            An alternate location to find image resources.  If no values are specified, images will
+            be loaded from the resources directory using AddResource and ExtensionsFilter
+        </description>
+    </property>
+    
+    <property>
+        <name>styleLocation</name><classname>java.lang.String</classname><description>
+            An alternate location to find stylesheet resources.  If no values are specified, stylesheets will
+            be loaded from the resources directory using AddResource and ExtensionsFilter
+        </description>
+    </property>
+    
+    
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/content_component_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/content_component_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/content_component_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,14 @@
+<properties>
+    <property>
+        <name>contentStyle</name>
+        <classname>java.lang.String</classname>
+        <description>The component content style</description>
+        <defaultvalue><![CDATA[""]]></defaultvalue>
+    </property>
+    <property>
+        <name>contentClass</name>
+        <classname>java.lang.String</classname>
+        <description>The component content style class</description>
+    </property>
+    
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/display_value_only_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/display_value_only_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/display_value_only_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,22 @@
+<properties>
+    
+    
+    <property>
+        <name>displayValueOnly</name><classname>java.lang.String</classname><description>
+            If "true", renders only the value of the component, but no input widget.
+            Default is false
+        </description>
+    </property>
+    <property>
+        <name>displayValueOnlyStyle</name><classname>java.lang.String</classname><description>
+            Style used when displayValueOnly is true
+        </description>
+    </property>
+    <property>
+        <name>displayValueOnlyStyleClass</name><classname>java.lang.String</classname><description>
+            Style class used when displayValueOnly is true
+        </description>
+    </property>
+     
+    
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/doc_start.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/doc_start.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/doc_start.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1 @@
+<properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/draggable_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/draggable_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/draggable_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,36 @@
+<properties>
+    <property >
+        <name>dragValue</name>
+        <classname>java.lang.Object</classname>
+        <description><![CDATA[Data to be sent to the drop zone after a drop event]]></description>
+    </property>
+    <property>
+        <name>dragType</name>
+        <classname>java.lang.String</classname>
+        <description><![CDATA[Key of a drag object. It's used to define a necessity of processing the current dragged element on the drop zone side]]></description>
+    </property>
+    <property>
+        <name>dragIndicator</name>
+        <classname>java.lang.String</classname>
+        <description><![CDATA[Id of the dragIndicator component used as drag operation cursor]]></description>
+    </property>
+    <property >
+        <name>ondragstart</name>
+        <classname>java.lang.String</classname>
+        <description>A JavaScript event handler called before drag object</description>
+    </property>
+    <property>
+        <name>ondragend</name>
+        <classname>java.lang.String</classname>
+        <description>A JavaScript event handler called after a drag operation</description>
+    </property>
+ 		<property elonly="true" attachedstate="true">
+			<name>dragListener</name>
+			<classname>javax.faces.el.MethodBinding</classname>
+			<description>
+				MethodBinding representing an listener method that will be notified afrer drag operation.
+			</description>
+			<methodargs>org.ajax4jsf.dnd.event.DragEvent.class</methodargs>
+		</property>
+    
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/dropzone_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/dropzone_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/dropzone_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,48 @@
+<properties>
+    <property >
+        <name>dropValue</name>
+        <classname>java.lang.Object</classname>
+        <description><![CDATA[Data to be processed after a drop event]]></description>
+    </property>
+    <property>
+        <name>typeMapping</name>
+        <classname>java.lang.Object</classname>
+        <description><![CDATA[Map between a draggable type and an indicator name on zone. it's defined with the pair (drag type:indicator name))]]></description>
+        <!-- 			<defaultvalue><![CDATA[]]></defaultvalue>  -->
+    </property>
+    <property>
+        <name>acceptedTypes</name>
+        <classname>java.lang.Object</classname>
+        <description><![CDATA[List of drag types to be processed by the current drop zone]]></description>
+        <!-- 			<defaultvalue><![CDATA[]]></defaultvalue>  -->
+    </property>
+    <property >
+        <name>ondragenter</name>
+        <classname>java.lang.String</classname>
+        <description>A JavaScript event handler called on enter draggable object to zone</description>
+    </property>
+    <property>
+        <name>ondragexit</name>
+        <classname>java.lang.String</classname>
+        <description>A JavaScript event handler called after a drag object leaves zone</description>
+    </property>
+    <property>
+        <name>ondrop</name>
+        <classname>java.lang.String</classname>
+        <description>A JavaScript event handler called after a drag object is dropped to zone</description>
+    </property>    
+    <property>
+        <name>ondropend</name>
+        <classname>java.lang.String</classname>
+        <description>A JavaScript handler for event fired on a drop even the drop for a given type is not available</description>
+    </property>    
+		<property>
+			<name>dropListener</name>
+			<classname>javax.faces.el.MethodBinding</classname>
+			<description><![CDATA[
+				MethodBinding representing an action listener method that will be notified afrer drop operation
+				]]>
+			</description>
+			<methodargs>org.ajax4jsf.dnd.event.DropEvent.class</methodargs>
+		</property>
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ext_ajax_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ext_ajax_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ext_ajax_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,14 @@
+<properties>
+    
+    <property>
+        <name>onSuccess</name><classname>java.lang.String</classname><description>A JavaScript method to call on successful ajax update</description>
+    </property>
+    <property>
+        <name>onFailure</name><classname>java.lang.String</classname><description>A JavaScript method to call on failed ajax update</description>
+    </property>
+    <property>
+        <name>onStart</name><classname>java.lang.String</classname><description>A JavaScript method to call on start of ajax update</description>
+    </property>
+    
+    
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ext_forceId_attribute.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ext_forceId_attribute.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ext_forceId_attribute.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,12 @@
+<properties>    
+    <property>
+        <name>forceId</name><classname>java.lang.String</classname><description>If "true", this component will force the use of the specified id when rendering</description>
+    </property>
+    <property>
+        <name>forceIdIndex</name><classname>java.lang.String</classname><description>
+            If "false", this component isn't append a '[n]' suffix (where 'n' is the row index) to components 
+            that are contained within a "list."  This value is true by default and the value is ignored if 
+            the value of forceId is false (or not specified.)
+        </description>
+    </property>     
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/extended_command_link_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/extended_command_link_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/extended_command_link_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,134 @@
+<properties>
+        <property>
+        <name>id</name><classname>java.lang.String</classname><description>Every component may have a unique id automatically created if omitted</description>
+    </property>
+    <property>
+        <name>rendered</name><classname>java.lang.String</classname><description>If "false", this component isn't rendered</description>
+    </property>
+    <property>
+        <name>binding</name><classname>java.lang.String</classname><description>The attribute takes a value-binding expression for a component property of
+a backing bean</description>
+    </property>
+    
+    <property>
+        <name>action</name><classname>java.lang.String</classname><description>MethodBinding pointing at an application action to be invoked, if this UIComponent is activated manually, during the Apply Request Values or Invoke Application phase of a request processing lifecycle, depending on a value of an immediate property</description>
+    </property>
+    <property>
+        <name>actionListener</name><classname>java.lang.String</classname><description>MethodBinding pointing at a method accepting ActionEvent and returning type void</description>
+    </property>
+    <property>
+        <name>immediate</name><classname>java.lang.String</classname><description>"True" means, that the default ActionListener should be executed immediately (i.e. during Apply Request Values phase of the request processing lifecycle), rather than waiting until the Invoke Application phase</description>
+    </property>
+    <property>
+        <name>value</name><classname>java.lang.String</classname><description>Initial value to set when rendered for the first time</description>
+    </property>
+    
+    
+    <property>
+        <name>dir</name><classname>java.lang.String</classname><description>Alternate textual description of the element rendered by this component</description>
+    </property>
+    <property>
+        <name>lang</name><classname>java.lang.String</classname><description> Code describing the language used in the generated markup for this component</description>
+    </property>
+    <property>
+        <name>style</name><classname>java.lang.String</classname><description>CSS style(s) is/are to be applied when this component is rendered</description>
+    </property>
+    <property>
+        <name>title</name><classname>java.lang.String</classname><description>Advisory title information about markup elements generated for this component</description>
+    </property>
+    <property>
+        <name>styleClass</name><classname>java.lang.String</classname><description>Corresponds to the HTML class attribute</description>
+    </property>
+    
+    
+    <property>
+        <name>onclick</name><classname>java.lang.String</classname><description>Defines a JavaScript onclick event handler</description>
+    </property>
+    <property>
+        <name>ondblclick</name><classname>java.lang.String</classname><description>Defines a JavaScript ondblclick  event handler</description>
+    </property>
+    <property>
+        <name>onmousedown</name><classname>java.lang.String</classname><description>Defines a JavaScript onmousedown event handler</description>
+    </property>
+    <property>
+        <name>onmouseup</name><classname>java.lang.String</classname><description>Defines a JavaScript onmouseup event handler</description>
+    </property>
+    <property>
+        <name>onmouseover</name><classname>java.lang.String</classname><description>Defines a JavaScript onmouseover event handler</description>
+    </property>
+    <property>
+        <name>onmousemove</name><classname>java.lang.String</classname><description>Defines a JavaScript onmousemove event handler</description>
+    </property>
+    <property>
+        <name>onmouseout</name><classname>java.lang.String</classname><description>Defines a JavaScript onmouseout event handler</description>
+    </property>
+    <property>
+        <name>onkeypress</name><classname>java.lang.String</classname><description>Defines a JavaScript onkeypress event handler</description>
+    </property>
+    <property>
+        <name>onkeydown</name><classname>java.lang.String</classname><description>Defines a JavaScript onkeydown event handler</description>
+    </property>
+    <property>
+        <name>onkeyup</name><classname>java.lang.String</classname><description>Defines a JavaScript onkeyup event handler</description>
+    </property>
+    
+    
+    <property>
+        <name>accesskey</name><classname>java.lang.String</classname><description>This attribute assigns an access key to an element. An access key is a single character from the document character set. Note. Authors should consider the input method of the expected reader when specifying an accesskey</description>
+    </property>
+    <property>
+        <name>charset</name><classname>java.lang.String</classname><description>The character encoding of the resource designated by this hyperlink</description>
+    </property>
+    <property>
+        <name>coords</name><classname>java.lang.String</classname><description>This attribute specifies the position and shape on the screen. The number and order of values depends on the shape being defined. Possible combinations:
+            
+            * rect: left-x, top-y, right-x, bottom-y.
+            * circle: center-x, center-y, radius. Note. When the radius value is percentage value, user agents should calculate the final radius value based on the associated object width and height. The radius should be the smaller value of the two.
+            * poly: x1, y1, x2, y2, ..., xN, yN. The first x and y coordinate pair and the last should be the same to close the polygon. When these coordinate values are not the same, user agents should infer an additional coordinate pair to close the polygon.
+            
+            Coordinates are relative to the top, left corner of the object. All values are lengths. All values are separated by commas.
+        </description>
+    </property>
+    
+    <property>
+        <name>hreflang</name><classname>java.lang.String</classname><description>Base language of a resource specified with the href attribute; hreflang may only be used with href</description>
+    </property>
+    
+    <property>
+        <name>rel</name><classname>java.lang.String</classname><description>The relationship from the current document to an anchor specified by this hyperlink. The value of this attribute is a space-separated list of link types</description>
+    </property>
+    <property>
+        <name>rev</name><classname>java.lang.String</classname><description>A reverse link from an anchor specified by this hyperlink to the current document. The value of this attribute is a space-separated list of link types</description>
+    </property>
+    <property>
+        <name>shape</name><classname>java.lang.String</classname><description>default|rect|circle|poly [CI]
+            This attribute specifies the shape of a region. Possible values:
+            
+            * default: Specifies the entire region.
+            * rect: Define a rectangular region.
+            * circle: Define a circular region.
+            * poly: Define a polygonal region.
+            
+        </description>
+    </property>
+    <property>
+        <name>tabindex</name><classname>java.lang.String</classname><description>This attribute specifies a position of the current element in the tabbing order for the current document. This value must be a number between 0 and 32767. User agents should ignore leading zeros</description>
+    </property>
+    <property>
+        <name>type</name><classname>java.lang.String</classname><description>	 The content type of the resource designated by this hyperlink</description>
+    </property>
+    
+    <property>
+        <name>onblur</name><classname>java.lang.String</classname><description> JavaScript code. The onblur event occurs when an element loses focus either by the pointing device or by tabbing navigation. It may be used with the same elements as onfocus</description>
+    </property>
+    
+    <property>
+        <name>onfocus</name><classname>java.lang.String</classname><description>JavaScript code</description>
+    </property>
+    <property>
+        <name>target</name><classname>java.lang.String</classname><description>This attribute specifies the name of a frame where a document is to be opened.
+            
+            By assigning a name to a frame via the name attribute, authors can refer to it as the "target" of links defined by other elements 
+        </description>
+    </property>  
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/extended_data_table_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/extended_data_table_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/extended_data_table_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,131 @@
+<properties>
+    
+    <property>
+        <name>preserveDataModel</name><classname>java.lang.String</classname><description>
+            Indicates whether a state of the whole DataModel should be saved and
+            restored.
+            Default: false
+        </description>
+    </property>
+    <property>
+        <name>forceIdIndexFormula</name><classname>java.lang.String</classname><description>
+            A formula that overrides the defaut row index in the construction of table
+            body components.
+            Example : #{myRowVar.key}
+            Warning, the EL should evaluate to a unique value for each row!
+        </description>
+    </property>
+    <property>
+        <name>sortColumn</name><classname>java.lang.String</classname><description>
+            Value reference to a model property that gives the current sort column name
+        </description>
+    </property>
+    <property>
+        <name>sortAscending</name><classname>java.lang.String</classname><description>
+            Value reference to a model property that gives the current sort direction
+        </description>
+    </property>
+    <property>
+        <name>preserveSort</name><classname>java.lang.String</classname><description>
+            Indicates whether the state of the sortColumn and sortAscending attribute
+            should be saved and restored and written back to a model during an
+            update model phase.
+            Default: true
+        </description>
+    </property>
+    <property>
+        <name>renderedIfEmpty</name><classname>java.lang.String</classname><description>
+            Indicates whether this table should be rendered if the underlying DataModel is
+            empty.
+            You could as well use rendered="#{not empty bean.list}", but this one causes
+            the getList method of your model bean beeing called up to five times per
+            request, which is not optimal when the list is backed by a DB table.
+            Using renderedIfEmpty="false" solves this problem, because the MyFaces
+            extended HtmlDataTable automatically caches the DataModel and calles the
+            model getter only once per request.
+            Default: true
+        </description>
+    </property>
+    <property>
+        <name>rowIndexVar</name><classname>java.lang.String</classname><description>
+            A parameter name, under which the current rowIndex is set in request scope
+            similar to the var parameter
+        </description>
+    </property>
+    <property>
+        <name>rowCountVar</name><classname>java.lang.String</classname><description>
+            A parameter name, under which the rowCount is set in request scope
+            similar to the var parameter
+        </description>
+    </property>
+    <property>
+        <name>previousRowDataVar</name><classname>java.lang.String</classname><description>
+            A parameter name, under which the previous RowData Object is set in request scope
+            similar to the rowIndexVar and rowCountVar parameters.
+            Mind that the value of this request scope attribute is null in the first row
+            or when isRowAvailable returns false for the previous row
+        </description>
+    </property>
+    <property>
+        <name>rowOnClick</name><classname>java.lang.String</classname><description>
+            Defines a JavaScript onclick event handler for each table row
+        </description>
+    </property>
+    <property>
+        <name>rowOnDblClick</name><classname>java.lang.String</classname><description>
+            Defines a JavaScript ondblclick event handler for each table row
+        </description>
+    </property>
+    <property>
+        <name>rowOnMouseDown</name><classname>java.lang.String</classname><description>
+            Defines a JavaScript onmpusedown event handler for each table row
+        </description>
+    </property>
+    <property>
+        <name>rowOnMouseUp</name><classname>java.lang.String</classname><description>
+            Defines a JavaScript onmouseup event handler for each table row
+        </description>
+    </property>
+    <property>
+        <name>rowOnMouseOver</name><classname>java.lang.String</classname><description>
+            Defines a JavaScript onmouseover event handler for each table row
+        </description>
+    </property>
+    <property>
+        <name>rowOnMouseMove</name><classname>java.lang.String</classname><description>
+            Defines a JavaScript onmousemove event handler for each table row
+        </description>
+    </property>
+    <property>
+        <name>rowOnMouseOut</name><classname>java.lang.String</classname><description>
+            Defines a JavaScript onmouseout event handler for each table row
+        </description>
+    </property>
+    <property>
+        <name>rowOnKeyPress</name><classname>java.lang.String</classname><description>
+            Defines a JavaScript onkeypress event handler for each table row
+        </description>
+    </property>
+    <property>
+        <name>rowOnKeyDown</name><classname>java.lang.String</classname><description>
+            Defines a JavaScript onkeydown event handler for each table row
+        </description>
+    </property>
+    <property>
+        <name>rowOnKeyUp</name><classname>java.lang.String</classname><description>
+            Defines a JavaScript onkeyup event handler for each table row
+        </description>
+    </property>
+    <property>
+        <name>rowId</name><classname>java.lang.String</classname><description>
+            The id to use for &lt;tr&gt; elements that are generated by a table
+        </description>
+    </property>
+    <property>
+        <name>rowStyleClass</name><classname>java.lang.String</classname><description>Corresponds to the HTML class attribute for the row tr tag</description>
+    </property>
+    <property>
+        <name>rowStyle</name><classname>java.lang.String</classname><description>Corresponds to the HTML style attribute for the row tr tag</description>
+    </property>
+    
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/header_component_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/header_component_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/header_component_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,14 @@
+<properties>
+    <property>
+        <name>headerStyle</name>
+        <classname>java.lang.String</classname>
+        <description>The component header style</description>
+        <defaultvalue><![CDATA[""]]></defaultvalue>
+    </property>
+    <property>
+        <name>headerClass</name>
+        <classname>java.lang.String</classname>
+        <description>The component header style class</description>
+    </property>
+    
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_anchor_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_anchor_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_anchor_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,87 @@
+<properties>
+    <property>
+        <name>accesskey</name>
+        <classname>java.lang.String</classname>
+        <description>This attribute assigns an access key to an element. An access key is a single character from the document character set. Note: Authors should consider the input method of the expected reader when specifying an accesskey</description>
+    </property>
+    <property>
+        <name>charset</name>
+        <classname>java.lang.String</classname>
+        <description> The character encoding of a resource designated by this hyperlink</description>
+    </property>
+    <property>
+        <name>coords</name>
+        <classname>java.lang.String</classname>
+        <description> This attribute specifies the position and shape on the screen. The number and order of values depends on the shape being defined. Possible combinations:
+            
+            * rect: left-x, top-y, right-x, bottom-y.
+            * circle: center-x, center-y, radius. Note. When the radius value is percentage value, user agents should calculate the final radius value based on the associated object's width and height. The radius should be the smaller value of the two.
+            * poly: x1, y1, x2, y2, ..., xN, yN. The first x and y coordinate pair and the last should be the same to close the polygon. When these coordinate values are not the same, user agents should infer an additional coordinate pair to close the polygon.
+            
+            Coordinates are relative to the top, left corner of the object. All values are lengths. All values are separated by commas
+        </description>
+    </property>
+    
+    <property>
+        <name>hreflang</name>
+        <classname>java.lang.String</classname>
+        <description>Base language of a resource specified with the href attribute; hreflang may only be used with href</description>
+    </property>
+    
+    <property>
+        <name>rel</name>
+        <classname>java.lang.String</classname>
+        <description>The relationship from the current document to the anchor specified by this hyperlink. The value of this attribute is a space-separated list of link types</description>
+    </property>
+    <property>
+        <name>rev</name>
+        <classname>java.lang.String</classname>
+        <description>A reverse link from the anchor specified by this hyperlink to the current document. The value of this attribute is a space-separated list of link types</description>
+    </property>
+    <property>
+        <name>shape</name>
+        <classname>java.lang.String</classname>
+        <description>default|rect|circle|poly [CI]
+            This attribute specifies the shape of a region. Possible values:
+            
+            * default: Specifies the entire region.
+            * rect: Define a rectangular region.
+            * circle: Define a circular region.
+            * poly: Define a polygonal region.
+            
+        </description>
+    </property>
+    <property>
+        <name>tabindex</name>
+        <classname>java.lang.String</classname>
+        <description>This attribute specifies the position of the current element in the tabbing order for the current document. This value must be a number between 0 and 32767. User agents should ignore leading zeros</description>
+    </property>
+    <property>
+        <name>type</name>
+        <classname>java.lang.String</classname>
+        <description>The content type of the resource designated by this hyperlink</description>
+    </property>
+    
+    <property>
+        <name>onblur</name>
+        <classname>java.lang.String</classname>
+        <description>JavaScript code. The onblur event occurs when an element loses focus either by the pointing device or by tabbing navigation. It may be used with the same elements as onfocus</description>
+    </property>
+    <property>
+        <name>onfocus</name>
+        <classname>java.lang.String</classname>
+        <description>JavaScript code. The onfocus event occurs when an element gets focus</description>
+    </property>
+    
+    <property>
+        <name>target</name>
+        <classname>java.lang.String</classname>
+        <description>This attribute specifies the name of a frame where a document is to be opened.
+            
+            By assigning a name to a frame via the name attribute, authors can refer to it as the "target" of links defined by other elements 
+        </description>
+    </property>
+    
+    
+    
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_button_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_button_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_button_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,8 @@
+<properties>
+    &html_control_attributes;
+    <property>
+        <name>type</name>
+        <classname>java.lang.String</classname>
+        <description>submit|reset|image|button This attribute specifies a type of control to create. The default value for this attribute is "submit"</description>
+    </property>    
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_control_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_control_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_control_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,28 @@
+<properties>
+    <property>
+        <name>accesskey</name>
+        <classname>java.lang.String</classname>
+        <description>This attribute assigns an access key to an element. An access key is a single character from the document character set. Note: Authors should consider the input method of the expected reader when specifying an accesskey</description>
+    </property>
+    <property>
+        <name>alt</name>
+        <classname>java.lang.String</classname>
+        <description>For a user agents that cannot display images, forms, or applets, this attribute specifies alternate text. The language of the alternate text is specified by the lang attribute</description>
+    </property>
+    <property>
+        <name>disabled</name>
+        <classname>boolean</classname>
+        <description>When set for a form control, this boolean attribute disables the control for user input</description>
+    </property>
+    
+    <property>
+        <name>size</name>
+        <classname>int</classname>
+        <description>This attribute tells the user agent the initial width of the control. The width is given in pixels except when type attribute has the value "text" or "password". In that case, its value refers to the (integer) number of characters</description>
+    </property>
+    <property>
+        <name>tabindex</name>
+        <classname>java.lang.String</classname>
+        <description>This attribute specifies the position of the current element in the tabbing order for the current document. This value must be a number between 0 and 32767. User agents should ignore leading zeros</description>
+    </property>
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_control_events.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_control_events.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_control_events.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,20 @@
+<properties>
+    <!-- HTML 4.0 - events specific for controls -->
+    <property>
+        <name>onblur</name>
+        <classname>java.lang.String</classname>
+        <description>HTML: script expression; the element lost the focus</description>
+    </property>
+    <property>
+        <name>onfocus</name>
+        <classname>java.lang.String</classname>
+        <description>HTML: script expression; the element got the focus</description>
+    </property>
+    <property>
+        <name>onchange</name>
+        <classname>java.lang.String</classname>
+        <description>HTML: script expression; the element value was changed</description>
+    </property>
+    
+    
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_events.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_events.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_events.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,54 @@
+<properties>
+    <!-- HTML 4.0 events -->
+    <property>
+        <name>onclick</name>
+        <classname>java.lang.String</classname>
+        <description>HTML: a script expression; a pointer button is clicked</description>
+    </property>
+    <property>
+        <name>ondblclick</name>
+        <classname>java.lang.String</classname>
+        <description>HTML: a script expression; a pointer button is double-clicked</description>
+    </property>
+    <property>
+        <name>onkeydown</name>
+        <classname>java.lang.String</classname>
+        <description>HTML: a script expression; a key is pressed down</description>
+    </property>
+    <property>
+        <name>onkeypress</name>
+        <classname>java.lang.String</classname>
+        <description>HTML: a script expression; a key is pressed and released</description>
+    </property>
+    <property>
+        <name>onkeyup</name>
+        <classname>java.lang.String</classname>
+        <description>HTML: a script expression; a key is released</description>
+    </property>
+    <property>
+        <name>onmousedown</name>
+        <classname>java.lang.String</classname>
+        <description>HTML: script expression; a pointer button is pressed down</description>
+    </property>
+    <property>
+        <name>onmousemove</name>
+        <classname>java.lang.String</classname>
+        <description>HTML: a script expression; a pointer is moved within</description>
+    </property>
+    <property>
+        <name>onmouseout</name>
+        <classname>java.lang.String</classname>
+        <description>HTML: a script expression; a pointer is moved away</description>
+    </property>
+    <property>
+        <name>onmouseover</name>
+        <classname>java.lang.String</classname>
+        <description>HTML: a script expression; a pointer is moved onto</description>
+    </property>
+    <property>
+        <name>onmouseup</name>
+        <classname>java.lang.String</classname>
+        <description>HTML: script expression; a pointer button is released</description>
+    </property>
+    
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_form_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_form_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_form_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,40 @@
+<properties>
+    <property>
+        <name>accept</name>
+        <classname>java.lang.String</classname>
+        <description>This attribute specifies a comma-separated list of content types that a server processing this form will handle correctly. User agents may use this information to filter out non-conforming files when prompting a user to select files to be sent to the server (cf. the INPUT element when type="file")</description>
+    </property>
+    <property>
+        <name>acceptCharset</name>
+        <classname>java.lang.String</classname>
+        <description>This attribute specifies the list of character encodings for input data that is accepted by the server processing this form. The value is a space- and/or comma-delimited list of charset values. The client must interpret this list as an exclusive-or list, i.e., the server is able to accept any single character encoding per entity received.
+            
+            The default value for this attribute is the reserved string "UNKNOWN". User agents may interpret this value as the character encoding that was used to transmit the document containing this FORM element
+        </description>
+    </property>
+    <property>
+        <name>enctype</name>
+        <classname>java.lang.String</classname>
+        <description>This attribute specifies the content type used to submit the form to the server (when the value of method is "post"). The default value for this attribute is "application/x-www-form-urlencoded". The value "multipart/form-data" should be used in combination with the INPUT element, type="file"</description>
+    </property>
+    <property>
+        <name>onreset</name>
+        <classname>java.lang.String</classname>
+        <description>The onreset event occurs when a form is reset. It only applies to the FORM element</description>
+    </property>
+    <property>
+        <name>onsubmit</name>
+        <classname>java.lang.String</classname>
+        <description>The onsubmit event occurs when a form is submitted. It only applies to the FORM element</description>
+    </property>
+    <property>
+        <name>target</name>
+        <classname>java.lang.String</classname>
+        <description>This attribute specifies the name of a frame where a document is to be opened.
+            
+            By assigning a name to a frame via the name attribute, authors can refer to it as the "target" of links defined by other elements 
+        </description>
+    </property>
+    
+    
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_img_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_img_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_img_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,31 @@
+<properties>
+    <property>
+        <name>align</name>
+        <classname>java.lang.String</classname>
+        <description>bottom|middle|top|left|right
+            Deprecated. This attribute specifies the position of an IMG, OBJECT, or APPLET with respect to its context.
+            
+            The following values for align concern the object's position with respect to surrounding text:
+            
+            * bottom: means that the bottom of the object should be vertically aligned with the current baseline. This is the default value.
+            * middle: means that the center of the object should be vertically aligned with the current baseline.
+            * top: means that the top of the object should be vertically aligned with the top of the current text line
+        </description>
+    </property>
+    <property>
+        <name>border</name>
+        <classname>java.lang.String</classname>
+        <description>Deprecated. This attribute specifies the width of an IMG or OBJECT border, in pixels. The default value for this attribute depends on the user agent</description>
+    </property>
+    <property>
+        <name>hspace</name>
+        <classname>java.lang.String</classname>
+        <description>Deprecated. This attribute specifies the amount of white space to be inserted to the left and right of an IMG, APPLET, or OBJECT. The default value is not specified, but is generally a small, non-zero length</description>
+    </property>
+    <property>
+        <name>vspace</name>
+        <classname>java.lang.String</classname>
+        <description>Deprecated. This attribute specifies the amount of white space to be inserted above and below an IMG, APPLET, or OBJECT. The default value is not specified, but is generally a small, non-zero length</description>
+    </property>    
+    
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_input_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_input_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_input_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,25 @@
+<properties>
+    &html_control_attributes;
+    
+    
+    <property>
+        <name>align</name>
+        <classname>java.lang.String</classname>
+        <description>left|center|right|justify [CI]
+            Deprecated. This attribute specifies the horizontal alignment of its element with respect to the surrounding context. Possible values:
+            
+            * left: text lines are rendered flush left.
+            * center: text lines are centered.
+            * right: text lines are rendered flush right.
+            * justify: text lines are justified to both margins.
+            
+            The default depends on the base text direction. For left to right text, the default is align=left, while for right to left text, the default is align=right
+        </description>
+    </property>
+    <property>
+        <name>maxlength</name>
+        <classname>int</classname>
+        <description>When the type attribute has the value "text" or "password", this attribute specifies the maximum number of characters the user may enter. This number may exceed the specified size, in which case the user agent should offer a scrolling mechanism. The default value for this attribute is an unlimited number</description>
+    </property>
+    
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_input_checkbox_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_input_checkbox_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_input_checkbox_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,45 @@
+<properties>
+    
+    
+    <property>
+        <name>accesskey</name><classname>java.lang.String</classname><description>This attribute assigns an access key to an element. An access key is a single character from the document character set. Note. Authors should consider the input method of the expected reader when specifying an access key</description>
+    </property>
+    <property>
+        <name>alt</name><classname>java.lang.String</classname>	<description>For user agents that cannot display images, forms, or applets, this attribute specifies alternate text. The language of the alternate text is specified by the lang attribute</description>
+    </property>
+    <property>
+        <name>datafld</name><classname>java.lang.String</classname><description>Retrieves which field of a given data source, as specified by the dataSrc property, to bind to the specified object</description> 
+    </property>
+    <property>
+        <name>datasrc</name><classname>java.lang.String</classname><description>Retrieves the source of the data for data binding</description> 
+    </property>
+    <property>
+        <name>dataformatas</name><classname>java.lang.String</classname><description>Indicates whether the bound data is plain text or HTML</description>
+    </property>
+    <property>
+        <name>disabled</name><classname>java.lang.String</classname><description>Disabled state of an element or button</description>
+    </property>
+    <property>
+        <name>onblur</name><classname>java.lang.String</classname><description> JavaScript code. The onblur event occurs when an element loses focus either by the pointing device or by tabbing navigation. It may be used with the same elements as onfocus</description>
+    </property>
+    <property>
+        <name>onchange</name><classname>java.lang.String</classname><description>Element's value changes</description>
+    </property>
+    <property>
+        <name>onfocus</name><classname>java.lang.String</classname><description>JavaScript code</description>
+    </property>
+    <property>
+        <name>onselect</name><classname>java.lang.String</classname><description>Text is selected in an input field</description>
+    </property>
+    <property>
+        <name>readonly</name><classname>java.lang.String</classname><description>Flag indicating that this component will prohibit
+            changes by the user.  The element may receive focus
+            unless it has also been disabled
+        </description>
+    </property>
+    <property>
+        <name>tabindex</name><classname>java.lang.String</classname><description>This attribute specifies the position of the current element in the tabbing order for the current document. This value must be a number between 0 and 32767. User agents should ignore leading zeros</description>
+    </property>
+    
+    
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_input_events.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_input_events.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_input_events.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,8 @@
+<properties>
+    &html_control_events;
+    <property>
+        <name>onselect</name>
+        <classname>java.lang.String</classname>
+        <description>HTML: script expression; The onselect event occurs when a user selects some text in a text field. This attribute may be used with the INPUT and TEXTAREA elements</description>
+    </property>
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_input_help_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_input_help_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_input_help_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,9 @@
+<properties>
+    
+    
+    <property>
+        <name>helpText</name><classname>java.lang.String</classname><description>Makes tiptext appear over an item when the mouse is hovered over it</description>
+    </property>
+    <property>
+        <name>selectText</name><classname>java.lang.String</classname><description>Selects text in the field</description>
+    </properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_input_radio_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_input_radio_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_input_radio_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,45 @@
+<properties>
+    
+    
+    <property>
+        <name>accesskey</name><classname>java.lang.String</classname><description>This attribute assigns an access key to an element. An access key is a single character from the document character set. Note. Authors should consider the input method of the expected reader when specifying an accesskey</description>
+    </property>
+    <property>
+        <name>alt</name><classname>java.lang.String</classname><description>For user agents that cannot display images, forms, or applets, this attribute specifies alternate text. The language of the alternate text is specified by the lang attribute</description>
+    </property>
+    <property>
+        <name>datafld</name><classname>java.lang.String</classname><description>Retrieves which field of a given data source, as specified by the dataSrc property, to bind to the specified object</description>
+    </property>
+    <property>
+        <name>datasrc</name><classname>java.lang.String</classname><description>Retrieves the source of the data for data binding</description>
+    </property>
+    <property>
+        <name>dataformatas</name><classname>java.lang.String</classname><description>Indicates whether the bound data is plain text or HTML</description>
+    </property>
+    <property>
+        <name>disabled</name><classname>java.lang.String</classname><description>Disabled state of an element or button</description>
+    </property>
+    <property>
+        <name>onblur</name><classname>java.lang.String</classname><description> JavaScript code. The onblur event occurs when an element loses focus either by the pointing device or by tabbing navigation. It may be used with the same elements as onfocus</description>
+    </property>
+    <property>
+        <name>onchange</name><classname>java.lang.String</classname><description>Element's value changes</description>
+    </property>
+    <property>
+        <name>onfocus</name><classname>java.lang.String</classname><description>JavaScript code</description>
+    </property>
+    <property>
+        <name>onselect</name><classname>java.lang.String</classname><description>Text is selected in an input field</description>
+    </property>
+    <property>
+        <name>readonly</name><classname>java.lang.String</classname><description>Flag indicating that this component will prohibit
+            changes by the user.  The element may receive focus
+            unless it has also been disabled
+        </description>
+    </property>
+    <property>
+        <name>tabindex</name><classname>java.lang.String</classname>
+    </property>
+    
+    
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_label_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_label_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_label_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,16 @@
+<properties>
+    
+    
+    <property>
+        <name>accesskey</name><classname>java.lang.String</classname><description>This attribute assigns an access key to an element. An access key is a single character from the document character set. Note. Authors should consider the input method of the expected reader when specifying an accesskey</description>
+    </property>
+    
+    <property>
+        <name>onblur</name><classname>java.lang.String</classname><description> JavaScript code. The onblur event occurs when an element loses focus either by the pointing device or by tabbing navigation. It may be used with the same elements as onfocus</description>
+    </property>
+    <property>
+        <name>onfocus</name><classname>java.lang.String</classname><description>JavaScript code</description>
+    </property>
+    
+    
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_select_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_select_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_select_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,38 @@
+<properties>
+    
+    
+    <property>
+        <name>datafld</name><classname>java.lang.String</classname><description>Retrieves which field of a given data source, as specified by the dataSrc property, to bind to the specified object</description>
+    </property>
+    <property>
+        <name>datasrc</name><classname>java.lang.String</classname><description>Retrieves the source of the data for data binding</description>
+    </property>
+    <property>
+        <name>dataformatas</name><classname>java.lang.String</classname><description>Indicates whether the bound data is plain text or HTML</description>
+    </property>
+    <property>
+        <name>disabled</name><classname>java.lang.String</classname><description>Disabled state of an element or button</description>
+    </property>
+    
+    
+    <property>
+        <name>onblur</name><classname>java.lang.String</classname><description> JavaScript code. The onblur event occurs when an element loses focus either by the pointing device or by tabbing navigation. It may be used with the same elements as onfocus</description>
+    </property>
+    <property>
+        <name>onchange</name><classname>java.lang.String</classname><description>Element's value changes</description>
+    </property>
+    <property>
+        <name>onfocus</name><classname>java.lang.String</classname><description>JavaScript code</description>
+    </property>
+    
+    <property>
+        <name>tabindex</name><classname>java.lang.String</classname><description>This attribute specifies the position of the current element in the tabbing order for the current document. This value must be a number between 0 and 32767. User agents should ignore leading zeros</description>
+    </property>
+    <property>
+        <name>readonly</name><classname>java.lang.String</classname><description>Flag indicating that this component will prohibit
+            changes by the user.  The element may receive focus
+            unless it has also been disabled
+        </description>
+    </property>
+    
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_style_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_style_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_style_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,14 @@
+<properties>
+    <property>
+        <name>style</name>
+        <classname>java.lang.String</classname>
+        <description>CSS style(s) is/are to be applied when this component is rendered</description>
+    </property>
+    <property>
+        <name>styleClass</name>
+        <classname>java.lang.String</classname>
+        <description>Corresponds to the HTML class attribute</description>
+    </property>
+    
+    
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_table_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_table_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_table_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,83 @@
+<properties>
+    <property>
+        <name>align</name>
+        <classname>java.lang.String</classname>
+        <description>left|center|right [CI]
+            Deprecated. This attribute specifies the position of the table with respect to the document. Permitted values:
+            
+            * left: The table is to the left of the document.
+            * center: The table is to the center of the document.
+            * right: The table is to the right of the document
+            
+        </description>
+    </property>
+    <property>
+        <name>border</name>
+        <classname>java.lang.String</classname>
+        <description>This attributes specifies the width (in pixels only) of the frame around a table</description>
+    </property>
+    <property>
+        <name>bgcolor</name>
+        <classname>java.lang.String</classname>
+        <description>Deprecated. This attribute sets the background color for the document body or table cells.
+            
+            This attribute sets the background color of the canvas for the document body (the BODY element) or for tables (the TABLE, TR, TH, and TD elements). Additional attributes for specifying text color can be used with the BODY element.
+            
+            This attribute has been deprecated in favor of style sheets for specifying background color information
+        </description>
+    </property>
+    <property>
+        <name>cellpadding</name>
+        <classname>java.lang.String</classname>
+        <description>This attribute specifies the amount of space between the border of the cell and its contents. If the value of this attribute is a pixel length, all four margins should be this distance from the contents. If the value of the attribute is percentage length, the top and bottom margins should be equally separated from the content based on percentage of the available vertical space, and the left and right margins should be equally separated from the content based on percentage of the available horizontal space
+            
+        </description>
+    </property>
+    <property>
+        <name>cellspacing</name>
+        <classname>java.lang.String</classname>
+        <description>This attribute specifies how much space the user agent should leave between the left side of the table and the left-hand side of the leftmost column, the top of the table and the top side of the topmost row, and so on for the right and bottom of the table. The attribute also specifies the amount of space to leave between cells</description>
+    </property>
+    <property>
+        <name>frame</name>
+        <classname>java.lang.String</classname>
+        <description>void|above|below|hsides|lhs|rhs|vsides|box|border [CI]
+            This attribute specifies which sides of the frame surrounding a table will be visible. Possible values:
+            
+            * void: No sides. This is the default value.
+            * above: The top side only.
+            * below: The bottom side only.
+            * hsides: The top and bottom sides only.
+            * vsides: The right and left sides only.
+            * lhs: The left-hand side only.
+            * rhs: The right-hand side only.
+            * box: All four sides.
+            * border: All four sides
+            
+        </description>
+    </property>
+    <property>
+        <name>rules</name>
+        <classname>java.lang.String</classname>
+        <description>This attribute specifies which rules will appear between cells within a table. The rendering of rules is user agent dependent. Possible values:
+            
+            * none: No rules. This is the default value.
+            * groups: Rules will appear between row groups (see THEAD, TFOOT, and TBODY) and column groups (see COLGROUP and COL) only.
+            * rows: Rules will appear between rows only.
+            * cols: Rules will appear between columns only.
+            * all: Rules will appear between all rows and columns
+        </description>
+    </property>
+    <property>
+        <name>summary</name>
+        <classname>java.lang.String</classname>
+        <description>This attribute provides a summary of the table's purpose and structure for user agents rendering to non-visual media such as speech and Braille</description>
+    </property>
+    <property>
+        <name>width</name>
+        <classname>java.lang.String</classname>
+        <description>This attribute specifies the desired width of the entire table and is intended for visual user agents. When the value is percentage value, the value is relative to the user agent's available horizontal space. In the absence of any width specification, table width is determined by the user agent</description>
+    </property>
+    
+    
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_textarea_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_textarea_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_textarea_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,48 @@
+<properties>
+    
+    
+    <property>
+        <name>accesskey</name><classname>java.lang.String</classname><description>This attribute assigns an access key to an element. An access key is a single character from the document character set. Note. Authors should consider the input method of the expected reader when specifying an accesskey</description>
+    </property>
+    <property>
+        <name>cols</name><classname>java.lang.String</classname><description>Number of columns</description>
+    </property>
+    <property>
+        <name>datafld</name><classname>java.lang.String</classname><description>Retrieves which field of a given data source, as specified by the dataSrc property, to bind to the specified object</description>
+    </property>
+    <property>
+        <name>datasrc</name><classname>java.lang.String</classname><description>Retrieves the source of the data for data binding</description>
+    </property>
+    <property>
+        <name>dataformatas</name><classname>java.lang.String</classname><description>Indicates whether the bound data is plain text or HTML</description>
+    </property>
+    <property>
+        <name>disabled</name><classname>java.lang.String</classname><description>Disabled state of an element or button</description>
+    </property>
+    <property>
+        <name>onblur</name><classname>java.lang.String</classname><description> JavaScript code. The onblur event occurs when an element loses focus either by the pointing device or by tabbing navigation. It may be used with the same elements as onfocus</description>
+    </property>
+    <property>
+        <name>onchange</name><classname>java.lang.String</classname><description>Element's value changes</description>
+    </property>
+    <property>
+        <name>onfocus</name><classname>java.lang.String</classname><description>JavaScript code</description>
+    </property>
+    <property>
+        <name>onselect</name><classname>java.lang.String</classname><description>Text is selected in an input field</description>
+    </property>
+    <property>
+        <name>readonly</name><classname>java.lang.String</classname><description>Flag indicating that this component will prohibit
+            changes by the user.  The element may receive focus
+            unless it has also been disabled
+        </description>
+    </property>
+    <property>
+        <name>rows</name><classname>java.lang.String</classname><description>Number of rows</description>
+    </property>
+    <property>
+        <name>tabindex</name><classname>java.lang.String</classname><description>This attribute specifies the position of the current element in the tabbing order for the current document. This value must be a number between 0 and 32767. User agents should ignore leading zeros</description>
+    </property>
+    
+    
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_universal_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_universal_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/html_universal_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<properties>
+    &html_style_attributes;
+    <property>
+        <name>dir</name>
+        <classname>java.lang.String</classname>
+        <description>
+			Direction indication for text that does not inherit
+			directionality. Valid values are "LTR" (left-to-right)
+			and "RTL" (right-to-left)
+		</description>
+    </property>
+    <property>
+        <name>lang</name>
+        <classname>java.lang.String</classname>
+        <description> Code describing the language used in the generated markup for this component</description>
+    </property>
+    <property>
+        <name>title</name>
+        <classname>java.lang.String</classname>
+        <description> Advisory title information about markup elements generated for this component</description>
+    </property>
+    
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/spec_img_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/spec_img_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/spec_img_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,39 @@
+<properties>
+    <property>
+        <name>alt</name>
+        <classname>java.lang.String</classname>
+        <description>For user agents that cannot display images, forms, or applets, this attribute specifies alternate text. The language of the alternate text is specified by the lang attribute</description>
+    </property>
+    <property>
+        <name>height</name>
+        <classname>java.lang.String</classname>
+        <description>    Image and object height override.
+            
+            When specified, the width and height attributes tell user agents to override the natural image or object size in favor of these values
+        </description>
+    </property>
+    <property>
+        <name>ismap</name>
+        <classname>boolean</classname>
+        <description>Flag indicating that this image is to be used as a server side image map. Such an image must be enclosed within a hyperlink ("a")</description>
+    </property>
+    <property>
+        <name>longdesc</name>
+        <classname>java.lang.String</classname>
+        <description>URI to a long description of the image represented by this element</description>
+    </property>
+    
+    
+    <property>
+        <name>usemap</name>
+        <classname>java.lang.String</classname>
+        <description> The name of a client side image map (an HTML "map" element) for which this element provides the image</description>
+    </property>
+    <property>
+        <name>width</name>
+        <classname>java.lang.String</classname>
+        <description>Image and object width override. When specified, the width and height attributes tell user agents to override the natural image or object size in favor of these values</description>
+    </property>
+    
+    
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/spec_table_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/spec_table_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/spec_table_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,24 @@
+<properties>
+    
+    <property>
+        <name>columnClasses</name>
+        <classname>java.lang.String</classname>
+        <description> Comma-delimited list of CSS style classes that are be applied to the columns of this table. A space separated list of classes may also be specified for any individual column. If the number of elements in this list is less than the number of columns specified in the "columns" attribute, no "class" attribute is output for each column greater than the number of elements in the list. If the number of elements in the list is greater than the number of columns specified in the "columns" attribute, the elements at the position in the list after the value of the "columns" attribute are ignored</description>
+    </property>
+    <property>
+        <name>footerClass</name>
+        <classname>java.lang.String</classname>
+        <description>Space-separated list of CSS style class(es) that are be applied to any footer generated for this table</description>
+    </property>
+    <property>
+        <name>headerClass</name>
+        <classname>java.lang.String</classname>
+        <description> Space-separated list of CSS style class(es) that are be applied to any header generated for this table</description>
+    </property>
+    <property>
+        <name>rowClasses</name>
+        <classname>java.lang.String</classname>
+        <description> A comma-delimited list of CSS style classes that is applied to popup table rows. A space separated list of classes may also be specified for any individual row. The styles are applied, in turn, to each row in the table. For example, if the list has two elements, the first style class in the list is applied to the first row, the second to the second row, the first to the third row, the second to the fourth row, etc. In other words, we keep iterating through the list until we reach the end, and then we start at the beginning again</description>
+    </property>
+    
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_command_button_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_command_button_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_command_button_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,120 @@
+<properties>
+    
+    
+    
+    
+    <property>
+        <name>id</name><classname>java.lang.String</classname><description>Every component may have an unique id. Automatically created if omitted</description>
+    </property>
+    <property>
+        <name>rendered</name><classname>java.lang.String</classname><description>If "false", this component will not be rendered</description>
+    </property>
+    <property>
+        <name>binding</name><classname>java.lang.String</classname><description>The attribute takes a value-binding expression for a component property of
+a backing bean</description>
+    </property>
+    
+    <property  attachedstate="true">
+        <name>action</name><classname>java.lang.String</classname><description>MethodBinding pointing at the application action to be invoked, if this UIComponent is activated by the user, during the Apply Request Values or Invoke Application phase of the request processing lifecycle, depending on the value of the immediate property</description>
+    </property>
+    <property  attachedstate="true">
+        <name>actionListener</name><classname>java.lang.String</classname><description>MethodBinding pointing at method accepting an ActionEvent with return type void</description>
+    </property>
+    <property>
+        <name>immediate</name><classname>java.lang.String</classname><description>True means, that the default ActionListener should be executed immediately (i.e. during Apply Request Values phase of the request processing lifecycle), rather than waiting until the Invoke Application phase</description>
+    </property>
+    <property>
+        <name>value</name><classname>java.lang.String</classname><description>Initial value to set when rendered for the first time</description>
+    </property>
+    
+    
+    <property>
+        <name>dir</name><classname>java.lang.String</classname><description>Alternate textual description of the element rendered by this component</description>
+    </property>
+    <property>
+        <name>lang</name><classname>java.lang.String</classname><description>Code describing the language used in the generated markup for this component</description>
+    </property>
+    <property>
+        <name>style</name><classname>java.lang.String</classname><description>CSS style(s) is/are to be applied when this component is rendered</description>
+    </property>
+    <property>
+        <name>title</name><classname>java.lang.String</classname><description>Advisory title information about markup elements generated for this component</description>
+    </property>
+    <property>
+        <name>styleClass</name><classname>java.lang.String</classname><description>Corresponds to the HTML class attribute</description>
+    </property>
+    
+    
+    <property>
+        <name>onclick</name><classname>java.lang.String</classname><description>Defines a JavaScript onclick event handler</description>
+    </property>
+    <property>
+        <name>ondblclick</name><classname>java.lang.String</classname><description>Defines a JavaScript ondblclick  event handler</description>
+    </property>
+    <property>
+        <name>onmousedown</name><classname>java.lang.String</classname><description>Defines a JavaScript onmousedown event handler</description>
+    </property>
+    <property>
+        <name>onmouseup</name><classname>java.lang.String</classname><description>Defines a JavaScript onmouseup event handler</description>
+    </property>
+    <property>
+        <name>onmouseover</name><classname>java.lang.String</classname><description>Defines a JavaScript onmouseover event handler</description>
+    </property>
+    <property>
+        <name>onmousemove</name><classname>java.lang.String</classname><description>Defines a JavaScript onmousemove event handler</description>
+    </property>
+    <property>
+        <name>onmouseout</name><classname>java.lang.String</classname><description>Defines a JavaScript onmouseout event handler</description>
+    </property>
+    <property>
+        <name>onkeypress</name><classname>java.lang.String</classname><description>Defines a JavaScript onkeypress event handler</description>
+    </property>
+    <property>
+        <name>onkeydown</name><classname>java.lang.String</classname><description>Defines a JavaScript onkeydown event handler</description>
+    </property>
+    <property>
+        <name>onkeyup</name><classname>java.lang.String</classname><description>Defines a JavaScript onkeyup event handler</description>
+    </property>
+    
+    
+    <property>
+        <name>accesskey</name><classname>java.lang.String</classname><description>This attribute assigns an access key to an element. An access key is a single character from the document character set. Note. Authors should consider the input method of the expected reader when specifying an accesskey</description>
+    </property>
+    <property>
+        <name>alt</name><classname>java.lang.String</classname><description>For user agents that cannot display images, forms, or applets, this attribute specifies alternate text. The 
+            
+            language of the alternate text is specified by the lang attribute.
+        </description>
+    </property>
+    <property>
+        <name>disabled</name><classname>java.lang.String</classname><description>Disabled state of an element or button</description>
+    </property>
+    <property>
+        <name>onblur</name><classname>java.lang.String</classname><description> JavaScript code. The onblur event occurs when an element loses focus either by the pointing device or by tabbing navigation. It may be used with the same elements as onfocus</description>
+    </property>
+    <property>
+        <name>onchange</name><classname>java.lang.String</classname><description>Element's value changes</description>
+    </property>
+    <property>
+        <name>onfocus</name><classname>java.lang.String</classname><description>JavaScript code</description>
+    </property>
+    <property>
+        <name>onselect</name><classname>java.lang.String</classname><description>An element is selected</description>
+    </property>
+    <property>
+        <name>size</name><classname>java.lang.String</classname><description>see JSF Spec</description>
+    </property>
+    <property>
+        <name>tabindex</name><classname>java.lang.String</classname><description>This attribute specifies the position of the current element in the tabbing order for the current document. This value must be a number between 0 and 32767. User agents should ignore leading zeros</description>
+    </property>
+    <property>
+        <name>type</name><classname>java.lang.String</classname><description>	 The content type of the resource designated by this component</description>
+    </property>
+    
+    
+    <property>
+        <name>image</name><classname>java.lang.String</classname>
+    </property>
+    
+    
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_command_link_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_command_link_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_command_link_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,120 @@
+<properties>
+    
+    
+    
+    
+    <property>
+        <name>id</name><classname>java.lang.String</classname><description>Every component may have an unique id. Automatically created if omitted</description>
+    </property>
+    <property>
+        <name>rendered</name><classname>java.lang.String</classname><description>If "false", this component will not be rendered</description>
+    </property>
+    <property>
+        <name>binding</name><classname>java.lang.String</classname><description>The attribute takes a value-binding expression for a component property of
+a backing bean/description>
+    </property>
+    
+    <property  attachedstate="true">
+        <name>action</name><classname>java.lang.String</classname><description>MethodBinding pointing at an application action to be invoked, if this UIComponent is activated manually, during the Apply Request Values or Invoke Application phase of a request processing lifecycle, depending on a value of an immediate property</description>
+    </property>
+    <property  attachedstate="true">
+        <name>actionListener</name><classname>java.lang.String</classname><description>MethodBinding pointing at a method accepting ActionEvent and returning type void</description>
+    </property>
+    <property>
+        <name>immediate</name><classname>java.lang.String</classname><description>True means, that the default ActionListener should be executed immediately (i.e. during Apply Request Values phase of the request processing lifecycle), rather than waiting until the Invoke Application phase</description>
+    </property>
+    <property>
+        <name>value</name><classname>java.lang.String</classname><description>Initial value to set when rendered for the first time</description>
+    </property>
+    
+    
+    <property>
+        <name>dir</name><classname>java.lang.String</classname><description>Alternate textual description of the element rendered by this component</description>
+    </property>
+    <property>
+        <name>lang</name><classname>java.lang.String</classname><description>Code describing the language used in the generated markup for this component</description>
+    </property>
+    <property>
+        <name>style</name><classname>java.lang.String</classname><description>CSS style(s) is/are to be applied when this component is rendered</description>
+    </property>
+    <property>
+        <name>title</name><classname>java.lang.String</classname><description>Advisory title information about markup elements generated for this component</description>
+    </property>
+    <property>
+        <name>styleClass</name><classname>java.lang.String</classname><description>Corresponds to the HTML class attribute</description>
+    </property>
+    
+    
+    <property>
+        <name>onclick</name><classname>java.lang.String</classname><description>Defines a JavaScript onclick event handler</description>
+    </property>
+    <property>
+        <name>ondblclick</name><classname>java.lang.String</classname><description>Defines a JavaScript ondblclick  event handler</description>
+    </property>
+    <property>
+        <name>onmousedown</name><classname>java.lang.String</classname><description>Defines a JavaScript onmousedown event handler</description>
+    </property>
+    <property>
+        <name>onmouseup</name><classname>java.lang.String</classname><description>Defines a JavaScript onmouseup event handler</description>
+    </property>
+    <property>
+        <name>onmouseover</name><classname>java.lang.String</classname><description>Defines a JavaScript onmouseover event handler</description>
+    </property>
+    <property>
+        <name>onmousemove</name><classname>java.lang.String</classname><description>Defines a JavaScript onmousemove event handler</description>
+    </property>
+    <property>
+        <name>onmouseout</name><classname>java.lang.String</classname><description>Defines a JavaScript onmouseout event handler</description>
+    </property>
+    <property>
+        <name>onkeypress</name><classname>java.lang.String</classname><description>Defines a JavaScript onkeypress event handler</description>
+    </property>
+    <property>
+        <name>onkeydown</name><classname>java.lang.String</classname><description>Defines a JavaScript onkeydown event handler</description>
+    </property>
+    <property>
+        <name>onkeyup</name><classname>java.lang.String</classname><description>Defines a JavaScript onkeyup event handler</description>
+    </property>
+    
+    
+    <property>
+        <name>accesskey</name><classname>java.lang.String</classname><description>This attribute assigns an access key to an element. An access key is a single character from the document character set. Note. Authors should consider the input method of the expected reader when specifying an accesskey</description>
+    </property>
+    <property>
+        <name>charset</name><classname>java.lang.String</classname><description>The character encoding of the resource designated by this hyperlink</description>
+    </property>
+    <property>
+        <name>coords</name><classname>java.lang.String</classname><description>This attribute specifies the position and shape on the screen. The number and order of values depends on the shape being defined. Possible combinations:
+            
+            <property>
+                <name>hreflang</name><classname>java.lang.String</classname><description>Base language of a resource specified with the href attribute; hreflang may only be used with href</description>
+            </property>
+            
+            <property>
+                <name>rel</name><classname>java.lang.String</classname><description>The relationship from the current document to the anchor specified by this hyperlink. The value of this attribute is a space-separated list of link types</description>
+            </property>
+            <property>
+                <name>rev</name><classname>java.lang.String</classname><description>A reverse link from the anchor specified by this hyperlink to the current document. The value of this attribute is a space-separated list of link types</description>
+            </property>
+            <property>
+                <name>shape</name><classname>java.lang.String</classname><description>default|rect|circle|poly [CI]
+                    <property>
+                        <name>tabindex</name><classname>java.lang.String</classname><description>This attribute specifies the position of the current element in the tabbing order for the current document. This value must be a number between 0 and 32767. User agents should ignore leading zeros</description>
+                    </property>
+                    <property>
+                        <name>type</name><classname>java.lang.String</classname><description>	 The content type of the resource designated by this hyperlink</description>
+                    </property>
+                    
+                    <property>
+                        <name>onblur</name><classname>java.lang.String</classname><description> JavaScript code. The onblur event occurs when an element loses focus either by the pointing device or by tabbing navigation. It may be used with the same elements as onfocus</description>
+                    </property>
+                    
+                    <property>
+                        <name>onfocus</name><classname>java.lang.String</classname><description>JavaScript code</description>
+                    </property>
+                    <property>
+                        <name>target</name><classname>java.lang.String</classname><description>    This attribute specifies the name of a frame where a document is to be opened.
+                            
+                            
+                            
+                        </properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_data_table_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_data_table_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_data_table_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,181 @@
+<properties>
+    
+    
+    
+    
+    <property>
+        <name>id</name><classname>java.lang.String</classname><description>Every component may have an unique id. Automatically created if omitted</description>
+    </property>
+    <property>
+        <name>rendered</name><classname>java.lang.String</classname><description>If "false", this component will not be rendered</description>
+    </property>
+    <property>
+        <name>binding</name><classname>java.lang.String</classname><description>The attribute takes a value-binding expression for a component property of
+a backing bean</description>
+    </property>
+    
+    
+    
+    <property>
+        <name>dir</name><classname>java.lang.String</classname><description>Alternate textual description of the element rendered by this component</description>
+    </property>
+    <property>
+        <name>lang</name><classname>java.lang.String</classname><description> Code describing the language used in the generated markup for this component</description>
+    </property>
+    <property>
+        <name>style</name><classname>java.lang.String</classname><description>CSS style(s)is/are to be applied when this component is rendered</description>
+    </property>
+    <property>
+        <name>title</name><classname>java.lang.String</classname><description> Advisory title information about markup elements generated for this component</description>
+    </property>
+    <property>
+        <name>styleClass</name><classname>java.lang.String</classname><description>Corresponds to the HTML class attribute</description>
+    </property>
+    
+    
+    <property>
+        <name>onclick</name><classname>java.lang.String</classname><description>Defines a JavaScript onclick event handler</description>
+    </property>
+    <property>
+        <name>ondblclick</name><classname>java.lang.String</classname><description>Defines a JavaScript ondblclick  event handler</description>
+    </property>
+    <property>
+        <name>onmousedown</name><classname>java.lang.String</classname><description>Defines a JavaScript onmousedown event handler</description>
+    </property>
+    <property>
+        <name>onmouseup</name><classname>java.lang.String</classname><description>Defines a JavaScript onmouseup event handler</description>
+    </property>
+    <property>
+        <name>onmouseover</name><classname>java.lang.String</classname><description>Defines a JavaScript onmouseover event handler</description>
+    </property>
+    <property>
+        <name>onmousemove</name><classname>java.lang.String</classname><description>Defines a JavaScript onmousemove event handler</description>
+    </property>
+    <property>
+        <name>onmouseout</name><classname>java.lang.String</classname><description>Defines a JavaScript onmouseout event handler</description>
+    </property>
+    <property>
+        <name>onkeypress</name><classname>java.lang.String</classname><description>Defines a JavaScript onkeypress event handler</description>
+    </property>
+    <property>
+        <name>onkeydown</name><classname>java.lang.String</classname><description>Defines a JavaScript onkeydown event handler</description>
+    </property>
+    <property>
+        <name>onkeyup</name><classname>java.lang.String</classname><description>Defines a JavaScript onkeyup event handler</description>
+    </property>
+    
+    
+    
+    <property>
+        <name>align</name><classname>java.lang.String</classname><description>left|center|right [CI]
+            Deprecated. This attribute specifies the position of the table with respect to the document. Permitted values:
+            
+            * left: The table is to the left of the document.
+            * center: The table is to the center of the document.
+            * right: The table is to the right of the document
+            
+        </description>
+    </property>
+    <property>
+        <name>border</name><classname>java.lang.String</classname><description>This attributes specifies the width (in pixels only) of the frame around a table </description>
+    </property>
+    <property>
+        <name>bgcolor</name><classname>java.lang.String</classname><description>Deprecated. This attribute sets the background color for the document body or table cells.
+            
+            This attribute sets the background color of the canvas for the document body (the BODY element) or for tables (the TABLE, TR, TH, and TD elements). Additional attributes for specifying text color can be used with the BODY element.
+            
+            This attribute has been deprecated in favor of style sheets for specifying background color information
+        </description>
+    </property>
+    <property>
+        <name>cellpadding</name><classname>java.lang.String</classname><description>    This
+         attribute specifies the amount of space between the border of the cell and its contents.
+          If the value of this attribute is a pixel length, all four margins should be this
+           distance from the contents. If the value of the attribute is percentage length, the
+            top and bottom margins should be equally separated from the content based on percentage of the available vertical space, and the left and right margins should be
+             equally separated from the content based on percentage of the available horizontal space
+            
+        </description>
+    </property>
+    <property>
+        <name>cellspacing</name><classname>java.lang.String</classname><description>This attribute specifies how much space the user agent should leave between the left side of the table and the left-hand side of the leftmost column, the top of the table and the top side of the topmost row, and so on for the right and bottom of the table. The attribute also specifies the amount of space to leave between cells</description>
+    </property>
+    <property>
+        <name>datafld</name><classname>java.lang.String</classname><description>Retrieves which field of a given data source, as specified by the dataSrc property, to bind to the specified object</description>
+    </property>
+    <property>
+        <name>datasrc</name><classname>java.lang.String</classname><description>Retrieves the source of the data for data binding</description>
+    </property>
+    <property>
+        <name>dataformatas</name><classname>java.lang.String</classname><description>Indicates whether the bound data is plain text or HTML</description>
+    </property>
+    <property>
+        <name>frame</name><classname>java.lang.String</classname><description>void|above|below|hsides|lhs|rhs|vsides|box|border [CI]
+            This attribute specifies which sides of the frame surrounding a table will be visible. Possible values:
+            
+            * void: No sides. This is the default value.
+            * above: The top side only.
+            * below: The bottom side only.
+            * hsides: The top and bottom sides only.
+            * vsides: The right and left sides only.
+            * lhs: The left-hand side only.
+            * rhs: The right-hand side only.
+            * box: All four sides.
+            * border: All four sides
+            
+        </description>
+    </property>
+    <property>
+        <name>rules</name><classname>java.lang.String</classname><description>This attribute specifies which rules will appear between cells within a table. The rendering of rules is user agent dependent. Possible values:
+            
+            * none: No rules. This is the default value.
+            * groups: Rules will appear between row groups (see THEAD, TFOOT, and TBODY) and column groups (see COLGROUP and COL) only.
+            * rows: Rules will appear between rows only.
+            * cols: Rules will appear between columns only.
+            * all: Rules will appear between all rows and columns
+        </description>
+    </property>
+    <property>
+        <name>summary</name><classname>java.lang.String</classname><description>This attribute provides a summary of the table's purpose and structure for user agents rendering to non-visual media such as speech and Braille</description>
+    </property>
+    <property>
+        <name>width</name><classname>java.lang.String</classname><description>This attribute specifies the desired width of the entire table and is intended for visual user agents. When the value is percentage value, the value is relative to the user agent's available horizontal space. In the absence of any width specification, table width is determined by the user agent</description>
+    </property>
+    
+    
+    <property>
+        <name>value</name><classname>java.lang.String</classname><description>Supported types see JSF Spec 4.1.3</description>
+    </property>
+    <property>
+        <name>var</name><classname>java.lang.String</classname><description>
+            The request-scope attribute under which the data object for the
+            current row will be exposed when iterating
+        </description>
+    </property>
+    <property>
+        <name>rows</name><classname>java.lang.String</classname><description>
+            The number of rows to be displayed, or zero for all remaining
+            rows in the table.
+        </description>
+    </property>
+    <property>
+        <name>first</name><classname>java.lang.String</classname><description>
+            The zero-relative row number of the first row to be displayed
+        </description>
+    </property>
+    
+    <property>
+        <name>columnClasses</name><classname>java.lang.String</classname><description>Comma-separated list of CSS classes for columns</description>
+    </property>
+    <property>
+        <name>footerClass</name><classname>java.lang.String</classname><description>CSS class for the table footer</description>
+    </property>
+    <property>
+        <name>headerClass</name><classname>java.lang.String</classname><description>CSS class for the table header</description>
+    </property>
+    <property>
+        <name>rowClasses</name><classname>java.lang.String</classname><description>A comma-delimited list of CSS style classes that is applied to popup table rows</description>
+    </property>
+    
+    
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_input_text_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_input_text_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_input_text_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,138 @@
+<properties>
+    
+    
+    
+    
+    
+    <property>
+        <name>id</name><classname>java.lang.String</classname><description>Every component may have an unique id. Automatically created if omitted</description>
+    </property>
+    <property>
+        <name>rendered</name><classname>java.lang.String</classname><description>If "false", this component will not be rendered</description>
+    </property>
+    <property>
+        <name>binding</name><classname>java.lang.String</classname><description>The attribute takes a value-binding expression for a component property of
+a backing bean</description>
+    </property>
+    
+    <property>
+        <name>value</name><classname>java.lang.String</classname><description>Initial value to set when rendered for the first time</description>
+    </property>
+    <property>
+        <name>converter</name><classname>java.lang.String</classname><description>Id of Converter to be used or reference to a Converter</description>
+    </property>
+    
+    <property>
+        <name>immediate</name><classname>java.lang.String</classname><description> Flag indicating that this component's value must be converted and validated immediately (that is, during Apply Request Values phase), rather than waiting until Process Validations phase</description>
+    </property>
+    <property>
+        <name>required</name><classname>java.lang.String</classname><description>If "true", this component will be checked for non-empty input</description>
+    </property>
+    <property>
+        <name>validator</name><classname>java.lang.String</classname><description>MethodBinding pointing at a method that will be called during Process Validations phase of the request processing lifecycle, to validate the current value of this component</description>
+    </property>
+    <property>
+        <name>valueChangeListener</name><classname>java.lang.String</classname><description>Listener for value changes</description>
+    </property>
+    
+    
+    <property>
+        <name>dir</name><classname>java.lang.String</classname><description>Alternate textual description of the element rendered by this component</description>
+    </property>
+    <property>
+        <name>lang</name><classname>java.lang.String</classname><description> Code describing the language used in the generated markup for this component</description>
+    </property>
+    <property>
+        <name>style</name><classname>java.lang.String</classname><description>CSS style(s) is/are to be applied when this component is rendered</description>
+    </property>
+    <property>
+        <name>title</name><classname>java.lang.String</classname><description> Advisory title information about markup elements generated for this component</description>
+    </property>
+    <property>
+        <name>styleClass</name><classname>java.lang.String</classname><description>Corresponds to the HTML class attribute</description>
+    </property>
+    
+    
+    <property>
+        <name>onclick</name><classname>java.lang.String</classname><description>Defines a JavaScript onclick event handler</description>
+    </property>
+    <property>
+        <name>ondblclick</name><classname>java.lang.String</classname><description>Defines a JavaScript ondblclick  event handler</description>
+    </property>
+    <property>
+        <name>onmousedown</name><classname>java.lang.String</classname><description>Defines a JavaScript onmousedown event handler</description>
+    </property>
+    <property>
+        <name>onmouseup</name><classname>java.lang.String</classname><description>Defines a JavaScript onmouseup event handler</description>
+    </property>
+    <property>
+        <name>onmouseover</name><classname>java.lang.String</classname><description>Defines a JavaScript onmouseover event handler</description>
+    </property>
+    <property>
+        <name>onmousemove</name><classname>java.lang.String</classname><description>Defines a JavaScript onmousemove event handler</description>
+    </property>
+    <property>
+        <name>onmouseout</name><classname>java.lang.String</classname><description>Defines a JavaScript onmouseout event handler</description>
+    </property>
+    <property>
+        <name>onkeypress</name><classname>java.lang.String</classname><description>Defines a JavaScript onkeypress event handler</description>
+    </property>
+    <property>
+        <name>onkeydown</name><classname>java.lang.String</classname><description>Defines a JavaScript onkeydown event handler</description>
+    </property>
+    <property>
+        <name>onkeyup</name><classname>java.lang.String</classname><description>Defines a JavaScript onkeyup event handler</description>
+    </property>
+    
+    
+    <property>
+        <name>accesskey</name><classname>java.lang.String</classname><description>This attribute assigns an access key to an element. An access key is a single character from the document character set. Note. Authors should consider the input method of the expected reader when specifying an accesskey</description>
+    </property>
+    <property>
+        <name>align</name><classname>java.lang.String</classname><description>left|center|right [CI]
+            Deprecated. This attribute specifies the position of the table with respect to the document. Permitted values:
+            
+            * left: The table is to the left of the document.
+            * center: The table is to the center of the document.
+            * right: The table is to the right of the document
+            
+        </description>
+    </property>
+    <property>
+        <name>alt</name><classname>java.lang.String</classname>For user agents that cannot display images, forms, or applets, this attribute specifies alternate text. The 
+        
+        language of the alternate text is specified by the lang attribute.
+    </property>
+    <property>
+        <name>disabled</name><classname>java.lang.String</classname><description>Disabled state of an element or button</description>
+    </property>
+    <property>
+        <name>maxlength</name><classname>java.lang.String</classname><description>Maximum number of characters for text fields</description>
+    </property>
+    <property>
+        <name>onblur</name><classname>java.lang.String</classname><description> JavaScript code. The onblur event occurs when an element loses focus either by the pointing device or by tabbing navigation. It may be used with the same elements as onfocus</description>
+    </property>
+    <property>
+        <name>onchange</name><classname>java.lang.String</classname><description>Element's value changes</description>
+    </property>
+    <property>
+        <name>onfocus</name><classname>java.lang.String</classname><description>JavaScript code</description>
+    </property>
+    <property>
+        <name>onselect</name><classname>java.lang.String</classname><description>Text is selected in an input field</description>
+    </property>
+    <property>
+        <name>readonly</name><classname>java.lang.String</classname><description>Flag indicating that this component will prohibit
+            changes by the user.  The element may receive focus
+            unless it has also been disabled.
+        </description>
+    </property>
+    <property>
+        <name>size</name><classname>java.lang.String</classname><description>see JSF Spec</description>
+    </property>
+    <property>
+        <name>tabindex</name><classname>java.lang.String</classname><description>This attribute specifies the position of the current element in the tabbing order for the current document. This value must be a number between 0 and 32767. User agents should ignore leading zeros</description>
+    </property>
+    
+    
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_input_textarea_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_input_textarea_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_input_textarea_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,132 @@
+<properties>
+    
+    
+    
+    
+    
+    <property>
+        <name>id</name><classname>java.lang.String</classname><description>Every component may have an unique id. Automatically created if omitted</description>
+    </property>
+    <property>
+        <name>rendered</name><classname>java.lang.String</classname><description>If "false", this component will not be rendered</description>
+    </property>
+    <property>
+        <name>binding</name><classname>java.lang.String</classname><description>The attribute takes a value-binding expression for a component property of
+a backing bean</description>
+    </property>
+    
+    <property>
+        <name>value</name><classname>java.lang.String</classname><description>Initial value to set when rendered for the first time</description>
+    </property>
+    <property>
+        <name>converter</name><classname>java.lang.String</classname><description>Id of Converter to be used or reference to a Converter</description>
+    </property>
+    
+    <property>
+        <name>immediate</name><classname>java.lang.String</classname><description> Flag indicating that this component's value must be converted and validated immediately (that is, during Apply Request Values phase), rather than waiting until Process Validations phase</description>
+    </property>
+    <property>
+        <name>required</name><classname>java.lang.String</classname><description>If "true", this component will be checked for non-empty input</description>
+    </property>
+    <property>
+        <name>validator</name><classname>java.lang.String</classname><description>MethodBinding pointing at a method that will be called during Process Validations phase of the request processing lifecycle, to validate the current value of this component</description>
+    </property>
+    <property>
+        <name>valueChangeListener</name><classname>java.lang.String</classname><description>Listener for value changes</description>
+    </property>
+    
+    
+    <property>
+        <name>accesskey</name><classname>java.lang.String</classname><description>This attribute assigns an access key to an element. An access key is a single character from the document character set. Note. Authors should consider the input method of the expected reader when specifying an accesskey</description>
+    </property>
+    <property>
+        <name>cols</name><classname>java.lang.String</classname><description>Number of columns</description>
+    </property>
+    <property>
+        <name>datafld</name><classname>java.lang.String</classname><description>Retrieves which field of a given data source, as specified by the dataSrc property, to bind to the specified object</description>
+    </property>
+    <property>
+        <name>datasrc</name><classname>java.lang.String</classname><description>Retrieves the source of the data for data binding</description>
+    </property>
+    <property>
+        <name>dataformatas</name><classname>java.lang.String</classname><description>Indicates whether the bound data is plain text or HTML</description>
+    </property>
+    <property>
+        <name>disabled</name><classname>java.lang.String</classname><description>Disabled state of an element or button</description>
+    </property>
+    <property>
+        <name>onblur</name><classname>java.lang.String</classname><description> JavaScript code. The onblur event occurs when an element loses focus either by the pointing device or by tabbing navigation. It may be used with the same elements as onfocus</description>
+    </property>
+    <property>
+        <name>onchange</name><classname>java.lang.String</classname><description>Element's value changes</description>
+    </property>
+    <property>
+        <name>onfocus</name><classname>java.lang.String</classname><description>JavaScript code </description>
+    </property>
+    <property>
+        <name>onselect</name><classname>java.lang.String</classname><description>Text is selected in an input field</description>
+    </property>
+    <property>
+        <name>readonly</name><classname>java.lang.String</classname>Flag indicating that this component will prohibit
+        changes by the user.  The element may receive focus
+        unless it has also been disabled.
+        <property>
+            <name>rows</name><classname>java.lang.String</classname><description>Number of rows</description>
+        </property>
+        <property>
+            <name>tabindex</name><classname>java.lang.String</classname><description>This attribute specifies the position of the current element in the tabbing order for the current document. This value must be a number between 0 and 32767. User agents should ignore leading zeros</description>
+        </property>
+        
+        
+        <property>
+            <name>dir</name><classname>java.lang.String</classname><description>Alternate textual description of the element rendered by this component</description>
+        </property>
+        <property>
+            <name>lang</name><classname>java.lang.String</classname><description> Code describing the language used in the generated markup for this component</description>
+        </property>
+        <property>
+            <name>style</name><classname>java.lang.String</classname><description>CSS style(s) is/are to be applied when this component is rendered</description>
+        </property>
+        <property>
+            <name>title</name><classname>java.lang.String</classname><description> Advisory title information about markup elements generated for this component</description>
+        </property>
+        <property>
+            <name>styleClass</name><classname>java.lang.String</classname><description>Corresponds to the HTML class attribute</description>
+        </property>
+        
+        
+        <property>
+            <name>onclick</name><classname>java.lang.String</classname><description>Defines a JavaScript onclick event handler</description>
+        </property>
+        <property>
+            <name>ondblclick</name><classname>java.lang.String</classname><description>Defines a JavaScript ondblclick  event handler</description>
+        </property>
+        <property>
+            <name>onmousedown</name><classname>java.lang.String</classname><description>Defines a JavaScript onmousedown event handler</description>
+        </property>
+        <property>
+            <name>onmouseup</name><classname>java.lang.String</classname><description>Defines a JavaScript onmouseup event handler</description>
+        </property>
+        <property>
+            <name>onmouseover</name><classname>java.lang.String</classname><description>Defines a JavaScript onmouseover event handler</description>
+        </property>
+        <property>
+            <name>onmousemove</name><classname>java.lang.String</classname><description>Defines a JavaScript onmousemove event handler</description>
+        </property>
+        <property>
+            <name>onmouseout</name><classname>java.lang.String</classname><description>Defines a JavaScript onmouseout event handler</description>
+        </property>
+        <property>
+            <name>onkeypress</name><classname>java.lang.String</classname><description>Defines a JavaScript onkeypress event handler</description>
+        </property>
+        <property>
+            <name>onkeydown</name><classname>java.lang.String</classname><description>Defines a JavaScript onkeydown event handler</description>
+        </property>
+        <property>
+            <name>onkeyup</name><classname>java.lang.String</classname><description>Defines a JavaScript onkeyup event handler</description>
+        </property>
+        
+        
+        
+        
+    </properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_message_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_message_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_message_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,113 @@
+<properties>
+    
+    
+    
+    
+    <property>
+        <name>id</name><classname>java.lang.String</classname><description>Every component may have an unique id. Automatically created if omitted</description>
+    </property>
+    <property>
+        <name>rendered</name><classname>java.lang.String</classname><description>If "false", this component will not be rendered</description>
+    </property>
+    <property>
+        <name>binding</name><classname>java.lang.String</classname><description>The attribute takes a value-binding expression for a component property of
+a backing bean</description>
+    </property>
+    
+    <property>
+        <name>for</name><classname>java.lang.String</classname><description>The client identifier of the component for which this component represents associated message(s)</description>
+    </property>
+    <property>
+        <name>showSummary</name><classname>java.lang.String</classname><description>Indicates whether the summary of the associated message(s) should be displayed.
+            Default is: true
+        </description>
+    </property>
+    <property>
+        <name>showDetail</name><classname>java.lang.String</classname><description>Indicates whether the detail of the associated message(s) should be displayed.
+            Default is: false
+        </description>
+    </property>
+    
+    
+    
+    <property>
+        <name>dir</name><classname>java.lang.String</classname><description>Alternate textual description of the element rendered by this component</description>
+    </property>
+    <property>
+        <name>lang</name><classname>java.lang.String</classname><description> Code describing the language used in the generated markup for this component</description>
+    </property>
+    <property>
+        <name>style</name><classname>java.lang.String</classname><description>CSS style(s) to be applied when this component is rendered</description>
+    </property>
+    <property>
+        <name>title</name><classname>java.lang.String</classname><description> Advisory title information about markup elements generated for this component</description>
+    </property>
+    <property>
+        <name>styleClass</name><classname>java.lang.String</classname><description>Corresponds to the HTML class attribute</description>
+    </property>
+    
+    
+    <property>
+        <name>onclick</name><classname>java.lang.String</classname><description>Defines a JavaScript onclick event handler</description>
+    </property>
+    <property>
+        <name>ondblclick</name><classname>java.lang.String</classname><description>Defines a JavaScript ondblclick  event handler</description>
+    </property>
+    <property>
+        <name>onmousedown</name><classname>java.lang.String</classname><description>Defines a JavaScript onmousedown event handler</description>
+    </property>
+    <property>
+        <name>onmouseup</name><classname>java.lang.String</classname><description>Defines a JavaScript onmouseup event handler</description>
+    </property>
+    <property>
+        <name>onmouseover</name><classname>java.lang.String</classname><description>Defines a JavaScript onmouseover event handler</description>
+    </property>
+    <property>
+        <name>onmousemove</name><classname>java.lang.String</classname><description>Defines a JavaScript onmousemove event handler</description>
+    </property>
+    <property>
+        <name>onmouseout</name><classname>java.lang.String</classname><description>Defines a JavaScript onmouseout event handler</description>
+    </property>
+    <property>
+        <name>onkeypress</name><classname>java.lang.String</classname><description>Defines a JavaScript onkeypress event handler</description>
+    </property>
+    <property>
+        <name>onkeydown</name><classname>java.lang.String</classname><description>Defines a JavaScript onkeydown event handler</description>
+    </property>
+    <property>
+        <name>onkeyup</name><classname>java.lang.String</classname><description>Defines a JavaScript onkeyup event handler</description>
+    </property>
+    
+    
+    <property>
+        <name>infoClass</name><classname>java.lang.String</classname><description>CSS class to be used for messages with severity "INFO"</description>
+    </property>
+    <property>
+        <name>infoStyle</name><classname>java.lang.String</classname><description>CSS style(s) is/are to be used for messages with severity "INFO"</description>
+    </property>
+    <property>
+        <name>warnClass</name><classname>java.lang.String</classname><description>CSS class is to be used for messages with severity "WARN"</description>
+    </property>
+    <property>
+        <name>warnStyle</name><classname>java.lang.String</classname><description>CSS style is to be used for messages with severity "WARN"</description>
+    </property>
+    <property>
+        <name>errorClass</name><classname>java.lang.String</classname><description>CSS class is to be used for messages with severity "ERROR"</description>
+    </property>
+    <property>
+        <name>errorStyle</name><classname>java.lang.String</classname><description>CSS style is to be used for messages with severity "ERROR"</description>
+    </property>
+    <property>
+        <name>fatalClass</name><classname>java.lang.String</classname><description>CSS class is to be used for messages with severity "FATAL"</description>
+    </property>
+    <property>
+        <name>fatalStyle</name><classname>java.lang.String</classname><description>CSS style(s) is/are to be used for messages with severity "FATAL"</description>
+    </property>
+    <property>
+        <name>tooltip</name><classname>java.lang.String</classname><description>
+            If "true", the message summary will be rendered as a tooltip (i.e. HTML title attribute)
+        </description>
+    </property>
+    
+    
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_messages_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_messages_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_messages_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,117 @@
+<properties>
+    
+    
+    
+    
+    <property>
+        <name>id</name><classname>java.lang.String</classname><description>Every component may have an unique id. Automatically created if omitted</description>
+    </property>
+    <property>
+        <name>rendered</name><classname>java.lang.String</classname><description>If "false", this component will not be rendered</description>
+    </property>
+    <property>
+        <name>binding</name><classname>java.lang.String</classname><description>The attribute takes a value-binding expression for a component property of
+a backing bean</description>
+    </property>
+    
+    <property>
+        <name>showSummary</name><classname>java.lang.String</classname><description>Indicates whether the summary of the message(s) should be displayed.
+            Default is: true
+        </description>
+    </property>
+    <property>
+        <name>showDetail</name><classname>java.lang.String</classname><description>Indicates whether the detail of the message(s) should be displayed.
+            Default is: false
+        </description>
+    </property>
+    <property>
+        <name>globalOnly</name><classname>java.lang.String</classname><description>Indicates whether only global messages (that is, messages with no associated client identifier) should be rendered.
+            Default is: false
+        </description>
+    </property>
+    
+    
+    <property>
+        <name>dir</name><classname>java.lang.String</classname><description>Alternate textual description of the element rendered by this component</description>
+    </property>
+    <property>
+        <name>lang</name><classname>java.lang.String</classname><description> Code describing the language used in the generated markup for this component</description>
+    </property>
+    <property>
+        <name>style</name><classname>java.lang.String</classname><description>CSS style(s) to be applied when this component is rendere</description>
+    </property>
+    <property>
+        <name>title</name><classname>java.lang.String</classname><description> Advisory title information about markup elements generated for this component</description>
+    </property>
+    <property>
+        <name>styleClass</name><classname>java.lang.String</classname><description>Corresponds to the HTML class attribute</description>
+    </property>
+    
+    
+    <property>
+        <name>onclick</name><classname>java.lang.String</classname><description>Defines a JavaScript onclick event handler</description>
+    </property>
+    <property>
+        <name>ondblclick</name><classname>java.lang.String</classname><description>Defines a JavaScript ondblclick  event handler</description>
+    </property>
+    <property>
+        <name>onmousedown</name><classname>java.lang.String</classname><description>Defines a JavaScript onmousedown event handler</description>
+    </property>
+    <property>
+        <name>onmouseup</name><classname>java.lang.String</classname><description>Defines a JavaScript onmouseup event handler</description>
+    </property>
+    <property>
+        <name>onmouseover</name><classname>java.lang.String</classname><description>Defines a JavaScript onmouseover event handler</description>
+    </property>
+    <property>
+        <name>onmousemove</name><classname>java.lang.String</classname><description>Defines a JavaScript onmousemove event handler</description>
+    </property>
+    <property>
+        <name>onmouseout</name><classname>java.lang.String</classname><description>Defines a JavaScript onmouseout event handler</description>
+    </property>
+    <property>
+        <name>onkeypress</name><classname>java.lang.String</classname><description>Defines a JavaScript onkeypress event handler</description>
+    </property>
+    <property>
+        <name>onkeydown</name><classname>java.lang.String</classname><description>Defines a JavaScript onkeydown event handler</description>
+    </property>
+    <property>
+        <name>onkeyup</name><classname>java.lang.String</classname><description>Defines a JavaScript onkeyup event handler</description>
+    </property>
+    
+    
+    <property>
+        <name>infoClass</name><classname>java.lang.String</classname><description>CSS class to be used for messages with severity "INFO"</description>
+    </property>
+    <property>
+        <name>infoStyle</name><classname>java.lang.String</classname><description>CSS style(s) is/are to be used for messages with severity "INFO"</description>
+    </property>
+    <property>
+        <name>warnClass</name><classname>java.lang.String</classname><description>CSS class is to be used for messages with severity "WARN"</description>
+    </property>
+    <property>
+        <name>warnStyle</name><classname>java.lang.String</classname><description>CSS style(s) is/are to be used for messages with severity "WARN"</description>
+    </property>
+    <property>
+        <name>errorClass</name><classname>java.lang.String</classname><description>CSS class is to be used for messages with severity "ERROR"</description>
+    </property>
+    <property>
+        <name>errorStyle</name><classname>java.lang.String</classname><description>CSS style(s) is/are to be used for messages with severity "ERROR"</description>
+    </property>
+    <property>
+        <name>fatalClass</name><classname>java.lang.String</classname><description>CSS class is to be used for messages with severity "FATAL"</description>
+    </property>
+    <property>
+        <name>fatalStyle</name><classname>java.lang.String</classname><description>CSS style(s) is/are to be used for messages with severity "FATAL"</description>
+    </property>
+    <property>
+        <name>layout</name><classname>java.lang.String</classname><description>The layout: "table" or "list". Default: list</description>
+    </property>
+    <property>
+        <name>tooltip</name><classname>java.lang.String</classname><description>
+            If "true", the message summary will be rendered as a tooltip (i.e. HTML title attribute)
+        </description>
+    </property>
+    
+    
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_output_label_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_output_label_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_output_label_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,94 @@
+<properties>
+    
+    
+    
+    
+    <property>
+        <name>id</name><classname>java.lang.String</classname><description>Every component may have an unique id. Automatically created if omitted</description>
+    </property>
+    <property>
+        <name>rendered</name><classname>java.lang.String</classname><description>If "false", this component will not be rendered</description>
+    </property>
+    <property>
+        <name>binding</name><classname>java.lang.String</classname><description>The attribute takes a value-binding expression for a component property of
+a backing bean</description>
+    </property>
+    
+    <property>
+        <name>value</name><classname>java.lang.String</classname><description>Initial value to set when rendered for the first time</description>
+    </property>
+    <property>
+        <name>converter</name><classname>java.lang.String</classname><description>Id of Converter to be used or reference to a Converter</description>
+    </property>
+    
+    
+    <property>
+        <name>dir</name><classname>java.lang.String</classname><description>Alternate textual description of the element rendered by this component</description>
+    </property>
+    <property>
+        <name>lang</name><classname>java.lang.String</classname><description> Code describing the language used in the generated markup for this component</description>
+    </property>
+    <property>
+        <name>style</name><classname>java.lang.String</classname><description>CSS style(s) to be applied when this component is rendered</description>
+    </property>
+    <property>
+        <name>title</name><classname>java.lang.String</classname><description> Advisory title information about markup elements generated for this component</description>
+    </property>
+    <property>
+        <name>styleClass</name><classname>java.lang.String</classname><description>Corresponds to the HTML class attribute</description>
+    </property>
+    
+    
+    <property>
+        <name>onclick</name><classname>java.lang.String</classname><description>Defines a JavaScript onclick event handler</description>
+    </property>
+    <property>
+        <name>ondblclick</name><classname>java.lang.String</classname><description>Defines a JavaScript ondblclick  event handler</description>
+    </property>
+    <property>
+        <name>onmousedown</name><classname>java.lang.String</classname><description>Defines a JavaScript onmousedown event handler</description>
+    </property>
+    <property>
+        <name>onmouseup</name><classname>java.lang.String</classname><description>Defines a JavaScript onmouseup event handler</description>
+    </property>
+    <property>
+        <name>onmouseover</name><classname>java.lang.String</classname><description>Defines a JavaScript onmouseover event handler</description>
+    </property>
+    <property>
+        <name>onmousemove</name><classname>java.lang.String</classname><description>Defines a JavaScript onmousemove event handler</description>
+    </property>
+    <property>
+        <name>onmouseout</name><classname>java.lang.String</classname><description>Defines a JavaScript onmouseout event handler</description>
+    </property>
+    <property>
+        <name>onkeypress</name><classname>java.lang.String</classname><description>Defines a JavaScript onkeypress event handler</description>
+    </property>
+    <property>
+        <name>onkeydown</name><classname>java.lang.String</classname><description>Defines a JavaScript onkeydown event handler</description>
+    </property>
+    <property>
+        <name>onkeyup</name><classname>java.lang.String</classname><description>Defines a JavaScript onkeyup event handler</description>
+    </property>
+    
+    
+    <property>
+        <name>accesskey</name><classname>java.lang.String</classname><description>This attribute assigns an access key to an element. An access key is a single character from the document character set. Note. Authors should consider the input method of the expected reader when specifying an accesskey</description>
+    </property>
+    
+    <property>
+        <name>onblur</name><classname>java.lang.String</classname><description> JavaScript code. The onblur event occurs when an element loses focus either by the pointing device or by tabbing navigation. It may be used with the same elements as onfocus</description>
+    </property>
+    <property>
+        <name>onfocus</name><classname>java.lang.String</classname><description>JavaScript code</description>
+    </property>
+    
+    
+    <property>
+        <name>for</name><classname>java.lang.String</classname><description>
+            The client identifier of the component for which this component
+            represents associated message(s)
+        </description>
+    </property>
+    
+    
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_output_text_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_output_text_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_output_text_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,82 @@
+<properties>
+    
+    
+    
+    
+    <property>
+        <name>id</name><classname>java.lang.String</classname><description>Every component may have an unique id. Automatically created if omitted</description>
+    </property>
+    <property>
+        <name>rendered</name><classname>java.lang.String</classname><description>If "false", this component will not be rendered</description>
+    </property>
+    <property>
+        <name>binding</name><classname>java.lang.String</classname><description>The attribute takes a value-binding expression for a component property of
+a backing bean</description>
+    </property>
+    
+    <property>
+        <name>value</name><classname>java.lang.String</classname><description>Initial value to set when rendered for the first time</description>
+    </property>
+    <property>
+        <name>converter</name><classname>java.lang.String</classname><description>Id of Converter to be used or reference to a Converter</description>
+    </property>
+    
+    
+    <property>
+        <name>dir</name><classname>java.lang.String</classname><description>Alternate textual description of the element rendered by this component</description>
+    </property>
+    <property>
+        <name>lang</name><classname>java.lang.String</classname><description> Code describing the language used in the generated markup for this component</description>
+    </property>
+    <property>
+        <name>style</name><classname>java.lang.String</classname><description>CSS style(s) to be applied when this component is rendered</description>
+    </property>
+    <property>
+        <name>title</name><classname>java.lang.String</classname><description> Advisory title information about markup elements generated for this component</description>
+    </property>
+    <property>
+        <name>styleClass</name><classname>java.lang.String</classname><description>Corresponds to the HTML class attribute</description>
+    </property>
+    
+    
+    <property>
+        <name>onclick</name><classname>java.lang.String</classname><description>Defines a JavaScript onclick event handler</description>
+    </property>
+    <property>
+        <name>ondblclick</name><classname>java.lang.String</classname><description>Defines a JavaScript ondblclick  event handler</description>
+    </property>
+    <property>
+        <name>onmousedown</name><classname>java.lang.String</classname><description>Defines a JavaScript onmousedown event handler</description>
+    </property>
+    <property>
+        <name>onmouseup</name><classname>java.lang.String</classname><description>Defines a JavaScript onmouseup event handler</description>
+    </property>
+    <property>
+        <name>onmouseover</name><classname>java.lang.String</classname><description>Defines a JavaScript onmouseover event handler</description>
+    </property>
+    <property>
+        <name>onmousemove</name><classname>java.lang.String</classname><description>Defines a JavaScript onmousemove event handler</description>
+    </property>
+    <property>
+        <name>onmouseout</name><classname>java.lang.String</classname><description>Defines a JavaScript onmouseout event handler</description>
+    </property>
+    <property>
+        <name>onkeypress</name><classname>java.lang.String</classname><description>Defines a JavaScript onkeypress event handler</description>
+    </property>
+    <property>
+        <name>onkeydown</name><classname>java.lang.String</classname><description>Defines a JavaScript onkeydown event handler</description>
+    </property>
+    <property>
+        <name>onkeyup</name><classname>java.lang.String</classname><description>Defines a JavaScript onkeyup event handler</description>
+    </property>
+    
+    
+    <property>
+        <name>escape</name><classname>java.lang.String</classname><description>
+            Indicates whether rendered markup should be escaped.
+            Default: true
+        </description>
+    </property>
+    
+    
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_panel_grid_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_panel_grid_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_panel_grid_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,155 @@
+<properties>
+    
+    
+    
+    <property>
+        <name>id</name><classname>java.lang.String</classname><description>Every component may have an unique id. Automatically created if omitted</description>
+    </property>
+    <property>
+        <name>rendered</name><classname>java.lang.String</classname><description>If "false", this component will not be rendered</description>
+    </property>
+    <property>
+        <name>binding</name><classname>java.lang.String</classname><description>The attribute takes a value-binding expression for a component property of a backing bean</description>
+    </property>
+    
+    
+    
+    <property>
+        <name>dir</name><classname>java.lang.String</classname><description>Alternate textual description of the element rendered by this component</description>
+    </property>
+    <property>
+        <name>lang</name><classname>java.lang.String</classname><description> Code describing the language used in the generated markup for this component</description>
+    </property>
+    <property>
+        <name>style</name><classname>java.lang.String</classname><description>CSS style(s) is/are to be applied when this component is rendered</description>
+    </property>
+    <property>
+        <name>title</name><classname>java.lang.String</classname><description> Advisory title information about markup elements generated for this component</description>
+    </property>
+    <property>
+        <name>styleClass</name><classname>java.lang.String</classname><description>Corresponds to the HTML class attribute</description>
+    </property>
+    
+    
+    <property>
+        <name>onclick</name><classname>java.lang.String</classname><description>Defines a JavaScript onclick event handler</description>
+    </property>
+    <property>
+        <name>ondblclick</name><classname>java.lang.String</classname><description>Defines a JavaScript ondblclick  event handler</description>
+    </property>
+    <property>
+        <name>onmousedown</name><classname>java.lang.String</classname><description>Defines a JavaScript onmousedown event handler</description>
+    </property>
+    <property>
+        <name>onmouseup</name><classname>java.lang.String</classname><description>Defines a JavaScript onmouseup event handler</description>
+    </property>
+    <property>
+        <name>onmouseover</name><classname>java.lang.String</classname><description>Defines a JavaScript onmouseover event handler</description>
+    </property>
+    <property>
+        <name>onmousemove</name><classname>java.lang.String</classname><description>Defines a JavaScript onmousemove event handler</description>
+    </property>
+    <property>
+        <name>onmouseout</name><classname>java.lang.String</classname><description>Defines a JavaScript onmouseout event handler</description>
+    </property>
+    <property>
+        <name>onkeypress</name><classname>java.lang.String</classname><description>Defines a JavaScript onkeypress event handler</description>
+    </property>
+    <property>
+        <name>onkeydown</name><classname>java.lang.String</classname><description>Defines a JavaScript onkeydown event handler</description>
+    </property>
+    <property>
+        <name>onkeyup</name><classname>java.lang.String</classname><description>Defines a JavaScript onkeyup event handler</description>
+    </property>
+    
+    
+    <property>
+        <name>align</name><classname>java.lang.String</classname><description>left|center|right [CI]
+            Deprecated. This attribute specifies the position of the table with respect to the document. Permitted values:
+            
+            * left: The table is to the left of the document.
+            * center: The table is to the center of the document.
+            * right: The table is to the right of the document
+            
+        </description>
+    </property>
+    <property>
+        <name>border</name><classname>java.lang.String</classname><description>This attributes specifies the width (in pixels only) of the frame around a table</description>
+    </property>
+    <property>
+        <name>bgcolor</name><classname>java.lang.String</classname><description>    Deprecated. This attribute sets the background color for the document body or table cells.
+            
+            This attribute sets the background color of the canvas for the document body (the BODY element) or for tables (the TABLE, TR, TH, and TD elements). Additional attributes for specifying text color can be used with the BODY element.
+            
+            This attribute has been deprecated in favor of style sheets for specifying background color information
+        </description>
+    </property>
+    <property>
+        <name>cellpadding</name><classname>java.lang.String</classname><description>    This attribute specifies the amount of space between the border of the cell and its contents. If the value of this attribute is a pixel length, all four margins should be this distance from the contents. If the value of the attribute is percentage length, the top and bottom margins should be equally separated from the content based on percentage of the available vertical space, and the left and right margins should be equally separated from the content based on percentage of the available horizontal space
+            
+        </description>
+    </property>
+    <property>
+        <name>cellspacing</name><classname>java.lang.String</classname><description>This attribute specifies how much space the user agent should leave between the left side of the table and the left-hand side of the leftmost column, the top of the table and the top side of the topmost row, and so on for the right and bottom of the table. The attribute also specifies the amount of space to leave between cells</description>
+    </property>
+    <property>
+        <name>datafld</name><classname>java.lang.String</classname><description>Retrieves which field of a given data source, as specified by the dataSrc property, to bind to the specified object</description>
+    </property>
+    <property>
+        <name>datasrc</name><classname>java.lang.String</classname><description>Retrieves the source of the data for data binding</description>
+    </property>
+    <property>
+        <name>dataformatas</name><classname>java.lang.String</classname><description>Indicates whether the bound data is plain text or HTML</description>
+    </property>
+    <property>
+        <name>frame</name><classname>java.lang.String</classname><description>void|above|below|hsides|lhs|rhs|vsides|box|border [CI]
+            This attribute specifies which sides of the frame surrounding a table will be visible. Possible values:
+            
+            * void: No sides. This is the default value.
+            * above: The top side only.
+            * below: The bottom side only.
+            * hsides: The top and bottom sides only.
+            * vsides: The right and left sides only.
+            * lhs: The left-hand side only.
+            * rhs: The right-hand side only.
+            * box: All four sides.
+            * border: All four sides
+            
+        </description>
+    </property>
+    <property>
+        <name>rules</name><classname>java.lang.String</classname><description>This attribute specifies which rules will appear between cells within a table. The rendering of rules is user agent dependent. Possible values:
+            
+            * none: No rules. This is the default value.
+            * groups: Rules will appear between row groups (see THEAD, TFOOT, and TBODY) and column groups (see COLGROUP and COL) only.
+            * rows: Rules will appear between rows only.
+            * cols: Rules will appear between columns only.
+            * all: Rules will appear between all rows and columns
+        </description>
+    </property>
+    <property>
+        <name>summary</name><classname>java.lang.String</classname><description>This attribute provides a summary of the table's purpose and structure for user agents rendering to non-visual media such as speech and Braille</description>
+    </property>
+    <property>
+        <name>width</name><classname>java.lang.String</classname><description>Image and object width override. When specified, the width and height attributes tell user agents to override the natural image or object size in favor of these values</description>
+    </property>
+    
+    
+    <property>
+        <name>columnClasses</name><classname>java.lang.String</classname>
+    </property>
+    <property>
+        <name>columns</name><classname>java.lang.String</classname>
+    </property>
+    <property>
+        <name>footerClass</name><classname>java.lang.String</classname>
+    </property>
+    <property>
+        <name>headerClass</name><classname>java.lang.String</classname>
+    </property>
+    <property>
+        <name>rowClasses</name><classname>java.lang.String</classname>
+    </property>
+    
+    
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_panel_group_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_panel_group_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_panel_group_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,63 @@
+<properties>
+    
+    
+    
+    
+    <property>
+        <name>id</name><classname>java.lang.String</classname><description>Every component may have an unique id. Automatically created if omitted</description>
+    </property>
+    <property>
+        <name>rendered</name><classname>java.lang.String</classname><description>If "false", this component will not be rendered</description>
+    </property>
+    <property>
+        <name>binding</name><classname>java.lang.String</classname><description>The attribute takes a value-binding expression for a component property of
+a backing bean</description>
+    </property>
+    
+    
+    
+    <property>
+        <name>dir</name><classname>java.lang.String</classname><description>Alternate textual description of the element rendered by this component</description>
+    </property>
+    <property>
+        <name>lang</name><classname>java.lang.String</classname><description>Code describing the language used in the generated markup for this component</description>
+    </property>
+    <property>
+        <name>style</name><classname>java.lang.String</classname><description>CSS style(s) to be applied when this component is rendered</description>
+    </property>
+    <property>
+        <name>title</name><classname>java.lang.String</classname><description> Advisory title information about markup elements generated for this component</description>
+    </property>
+    <property>
+        <name>styleClass</name><classname>java.lang.String</classname><description>Corresponds to the HTML class attribute</description>
+    </property>
+    
+    
+    <property>
+        <name>onclick</name><classname>java.lang.String</classname><description>Defines a JavaScript onclick event handler</description>
+    </property>
+    <property>
+        <name>ondblclick</name><classname>java.lang.String</classname><description>Defines a JavaScript ondblclick  event handler</description>
+    </property>
+    <property>
+        <name>onmousedown</name><classname>java.lang.String</classname><description>Defines a JavaScript onmousedown event handler</description>
+    </property>
+    <property>
+        <name>onmouseup</name><classname>java.lang.String</classname><description>Defines a JavaScript onmouseup event handler</description>
+    </property>
+    <property>
+        <name>onmouseover</name><classname>java.lang.String</classname><description>Defines a JavaScript onmouseover event handler</description>
+    </property>
+    <property>
+        <name>onmousemove</name><classname>java.lang.String</classname><description>Defines a JavaScript onmousemove event handler</description>
+    </property>
+    <property>
+        <name>onmouseout</name><classname>java.lang.String</classname><description>Defines a JavaScript onmouseout event handler</description>
+    </property>
+    <property>
+        <name>onkeypress</name><classname>java.lang.String</classname><description>Defines a JavaScript onkeypress event handler</description>
+    </property>
+    <property>
+        <name>onkeydown</name><classname>java.lang.String</classname><description>Defines a JavaScript onkeydown event handler</description>
+    </property>
+    <property>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_select_boolean_checkbox_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_select_boolean_checkbox_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_select_boolean_checkbox_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,85 @@
+<properties>
+    
+    
+    
+    
+    
+    
+    <property>
+        <name>id</name><classname>java.lang.String</classname><description>Every component may have an unique id. Automatically created if omitted</description>
+    </property>
+    <property>
+        <name>rendered</name><classname>java.lang.String</classname><description>If "false", this component will not be rendered</description>
+    </property>
+    <property>
+        <name>binding</name><classname>java.lang.String</classname><description>The attribute takes a value-binding expression for a component property of
+a backing bean</description>
+    </property>
+    
+    <property>
+        <name>value</name><classname>java.lang.String</classname><description>Initial value to set when rendered for the first time</description>
+    </property>
+    <property>
+        <name>converter</name><classname>java.lang.String</classname><description>Id of Converter to be used or reference to a Converter</description>
+    </property>
+    
+    <property>
+        <name>immediate</name><classname>java.lang.String</classname><description> Flag indicating that this component's value must be converted and validated immediately (that is, during Apply Request Values phase), rather than waiting until Process Validations phase</description>
+    </property>
+    <property>
+        <name>required</name><classname>java.lang.String</classname><description>If "true", this component will be checked for non-empty input</description>
+    </property>
+    <property>
+        <name>validator</name><classname>java.lang.String</classname><description>MethodBinding pointing at a method that will be called during Process Validations phase of the request processing lifecycle, to validate the current value of this component</description>
+    </property>
+    <property>
+        <name>valueChangeListener</name><classname>java.lang.String</classname><description>Listener for value changes</description>
+    </property>
+    
+    
+    
+    <property>
+        <name>dir</name><classname>java.lang.String</classname><description>Alternate textual description of the element rendered by this component</description>
+    </property>
+    <property>
+        <name>lang</name><classname>java.lang.String</classname><description> Code describing the language used in the generated markup for this component</description>
+    </property>
+    <property>
+        <name>style</name><classname>java.lang.String</classname><description>CSS style(s) to be applied when this component is rendered</description>
+    </property>
+    <property>
+        <name>title</name><classname>java.lang.String</classname><description> Advisory title information about markup elements generated for this component</description>
+    </property>
+    <property>
+        <name>styleClass</name><classname>java.lang.String</classname><description>Corresponds to the HTML class attribute</description>
+    </property>
+    
+    
+    <property>
+        <name>onclick</name><classname>java.lang.String</classname><description>Defines a JavaScript onclick event handler</description>
+    </property>
+    <property>
+        <name>ondblclick</name><classname>java.lang.String</classname><description>Defines a JavaScript ondblclick  event handler</description>
+    </property>
+    <property>
+        <name>onmousedown</name><classname>java.lang.String</classname><description>Defines a JavaScript onmousedown event handler</description>
+    </property>
+    <property>
+        <name>onmouseup</name><classname>java.lang.String</classname><description>Defines a JavaScript onmouseup event handler</description>
+    </property>
+    <property>
+        <name>onmouseover</name><classname>java.lang.String</classname><description>Defines a JavaScript onmouseover event handler</description>
+    </property>
+    <property>
+        <name>onmousemove</name><classname>java.lang.String</classname><description>Defines a JavaScript onmousemove event handler</description>
+    </property>
+    <property>
+        <name>onmouseout</name><classname>java.lang.String</classname><description>Defines a JavaScript onmouseout event handler</description>
+    </property>
+    <property>
+        <name>onkeypress</name><classname>java.lang.String</classname><description>Defines a JavaScript onkeypress event handler</description>
+    </property>
+    <property>
+        <name>onkeydown</name><classname>java.lang.String</classname><description>Defines a JavaScript onkeydown event handler</description>
+    </property>
+    <property>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_select_many_checkbox_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_select_many_checkbox_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_select_many_checkbox_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,146 @@
+<properties>
+    
+    
+    
+    
+    
+    
+    <property>
+        <name>id</name><classname>java.lang.String</classname><description>Every component may have an unique id. Automatically created if omitted</description>
+    </property>
+    <property>
+        <name>rendered</name><classname>java.lang.String</classname><description>If "false", this component will not be rendered</description>
+    </property>
+    <property>
+        <name>binding</name><classname>java.lang.String</classname><description>The attribute takes a value-binding expression for a component property of
+a backing bean</description>
+    </property>
+    
+    <property>
+        <name>value</name><classname>java.lang.String</classname><description>Initial value to set when rendered for the first time</description>
+    </property>
+    <property>
+        <name>converter</name><classname>java.lang.String</classname><description>Id of Converter to be used or reference to a Converter</description>
+    </property>
+    
+    <property>
+        <name>immediate</name><classname>java.lang.String</classname><description> Flag indicating that this component's value must be converted and validated immediately (that is, during Apply Request Values phase), rather than waiting until Process Validations phase</description>
+    </property>
+    <property>
+        <name>required</name><classname>java.lang.String</classname><description>If "true", this component will be checked for non-empty input</description>
+    </property>
+    <property>
+        <name>validator</name><classname>java.lang.String</classname><description>MethodBinding pointing at a method that will be called during Process Validations phase of the request processing lifecycle, to validate the current value of this component</description>
+    </property>
+    <property>
+        <name>valueChangeListener</name><classname>java.lang.String</classname><description>Listener for value changes</description>
+    </property>
+    
+    
+    
+    <property>
+        <name>dir</name><classname>java.lang.String</classname><description>Alternate textual description of the element rendered by this component</description>
+    </property>
+    <property>
+        <name>lang</name><classname>java.lang.String</classname><description> Code describing the language used in the generated markup for this component</description>
+    </property>
+    <property>
+        <name>style</name><classname>java.lang.String</classname><description>CSS style(s) to be applied when this component is rendered</description>
+    </property>
+    <property>
+        <name>title</name><classname>java.lang.String</classname><description> Advisory title information about markup elements generated for this component</description>
+    </property>
+    <property>
+        <name>styleClass</name><classname>java.lang.String</classname><description>Corresponds to the HTML class attribute</description>
+    </property>
+    
+    
+    <property>
+        <name>onclick</name><classname>java.lang.String</classname><description>Defines a JavaScript onclick event handler</description>
+    </property>
+    <property>
+        <name>ondblclick</name><classname>java.lang.String</classname><description>Defines a JavaScript ondblclick  event handler</description>
+    </property>
+    <property>
+        <name>onmousedown</name><classname>java.lang.String</classname><description>Defines a JavaScript onmousedown event handler</description>
+    </property>
+    <property>
+        <name>onmouseup</name><classname>java.lang.String</classname><description>Defines a JavaScript onmouseup event handler</description>
+    </property>
+    <property>
+        <name>onmouseover</name><classname>java.lang.String</classname><description>Defines a JavaScript onmouseover event handler</description>
+    </property>
+    <property>
+        <name>onmousemove</name><classname>java.lang.String</classname><description>Defines a JavaScript onmousemove event handler</description>
+    </property>
+    <property>
+        <name>onmouseout</name><classname>java.lang.String</classname><description>Defines a JavaScript onmouseout event handler</description>
+    </property>
+    <property>
+        <name>onkeypress</name><classname>java.lang.String</classname><description>Defines a JavaScript onkeypress event handler</description>
+    </property>
+    <property>
+        <name>onkeydown</name><classname>java.lang.String</classname><description>Defines a JavaScript onkeydown event handler</description>
+    </property>
+    <property>
+        <name>onkeyup</name><classname>java.lang.String</classname><description>Defines a JavaScript onkeyup event handler</description>
+    </property>
+    
+    
+    <property>
+        <name>accesskey</name><classname>java.lang.String</classname><description>This attribute assigns an access key to an element. An access key is a single character from the document character set. Note. Authors should consider the input method of the expected reader when specifying an accesskey</description>
+    </property>
+    <property>
+        <name>alt</name><classname>java.lang.String</classname><description>For user agents that cannot display images, forms, or applets, this attribute specifies alternate text. The 
+            
+            language of the alternate text is specified by the lang attribute
+        </description>
+    </property>
+    <property>
+        <name>datafld</name><classname>java.lang.String</classname><description>Retrieves which field of a given data source, as specified by the dataSrc property, to bind to the specified object</description>
+    </property>
+    <property>
+        <name>datasrc</name><classname>java.lang.String</classname><description>Retrieves the source of the data for data binding</description>
+    </property>
+    <property>
+        <name>dataformatas</name><classname>java.lang.String</classname><description>Indicates whether the bound data is plain text or HTML</description>
+    </property>
+    <property>
+        <name>disabled</name><classname>java.lang.String</classname><description>Disabled state of an element or button</description>
+    </property>
+    <property>
+        <name>onblur</name><classname>java.lang.String</classname><description> JavaScript code. The onblur event occurs when an element loses focus either by the pointing device or by tabbing navigation. It may be used with the same elements as onfocus</description>
+    </property>
+    <property>
+        <name>onchange</name><classname>java.lang.String</classname><description>Element's value changes</description>
+    </property>
+    <property>
+        <name>onfocus</name><classname>java.lang.String</classname><description>JavaScript code </description>
+    </property>
+    <property>
+        <name>onselect</name><classname>java.lang.String</classname><description>An element is selected</description>
+    </property>
+    <property>
+        <name>readonly</name><classname>java.lang.String</classname><description>Flag indicating that this component will prohibit
+            changes by the user.  The element may receive focus
+            unless it has also been disabled
+        </description>
+    </property>
+    <property>
+        <name>tabindex</name><classname>java.lang.String</classname><description>This attribute specifies the position of the current element in the tabbing order for the current document. This value must be a number between 0 and 32767. User agents should ignore leading zeros</description>
+    </property>
+    
+    
+    <property>
+        <name>layout</name><classname>java.lang.String</classname><description>see JSF Spec. 8.5.9</description>
+    </property>
+    
+    <property>
+        <name>enabledClass</name><classname>java.lang.String</classname><description>CSS class is for enabled elements</description>
+    </property>
+    <property>
+        <name>disabledClass</name><classname>java.lang.String</classname><description>CSS class is for disabled elements</description>
+    </property>
+    
+    
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_select_many_listbox_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_select_many_listbox_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_select_many_listbox_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,134 @@
+<properties>
+    
+    
+    
+    
+    
+    <property>
+        <name>id</name><classname>java.lang.String</classname><description>Every component may have an unique id. Automatically created if omitted</description>
+    </property>
+    <property>
+        <name>rendered</name><classname>java.lang.String</classname><description>If "false", this component will not be rendered</description>
+    </property>
+    <property>
+        <name>binding</name><classname>java.lang.String</classname><description>The attribute takes a value-binding expression for a component property of
+a backing bean</description>
+    </property>
+    
+    <property>
+        <name>value</name><classname>java.lang.String</classname><description>Initial value to set when rendered for the first time</description>
+    </property>
+    <property>
+        <name>converter</name><classname>java.lang.String</classname><description>Id of Converter to be used or reference to a Converter</description>
+    </property>
+    
+    <property>
+        <name>immediate</name><classname>java.lang.String</classname><description> Flag indicating that this component's value must be converted and validated immediately (that is, during Apply Request Values phase), rather than waiting until Process Validations phase</description>
+    </property>
+    <property>
+        <name>required</name><classname>java.lang.String</classname><description>If "true", this component will be checked for non-empty input</description>
+    </property>
+    <property>
+        <name>validator</name><classname>java.lang.String</classname><description>MethodBinding pointing at a method that will be called during Process Validations phase of the request processing lifecycle, to validate the current value of this component</description>
+    </property>
+    <property>
+        <name>valueChangeListener</name><classname>java.lang.String</classname><description>Listener for value changes</description>
+    </property>
+    
+    
+    
+    <property>
+        <name>dir</name><classname>java.lang.String</classname><description>Alternate textual description of the element rendered by this component</description>
+    </property>
+    <property>
+        <name>lang</name><classname>java.lang.String</classname><description> Code describing the language used in the generated markup for this component</description>
+    </property>
+    <property>
+        <name>style</name><classname>java.lang.String</classname><description>CSS style(s) is/are to be applied when this component is rendered</description>
+    </property>
+    <property>
+        <name>title</name><classname>java.lang.String</classname><description> Advisory title information about markup elements generated for this component</description>
+    </property>
+    <property>
+        <name>styleClass</name><classname>java.lang.String</classname><description>Corresponds to the HTML class attribute</description>
+    </property>
+    
+    
+    <property>
+        <name>onclick</name><classname>java.lang.String</classname><description>Defines a JavaScript onclick event handler</description>
+    </property>
+    <property>
+        <name>ondblclick</name><classname>java.lang.String</classname><description>Defines a JavaScript ondblclick  event handler</description>
+    </property>
+    <property>
+        <name>onmousedown</name><classname>java.lang.String</classname><description>Defines a JavaScript onmousedown event handler</description>
+    </property>
+    <property>
+        <name>onmouseup</name><classname>java.lang.String</classname><description>Defines a JavaScript onmouseup event handler</description>
+    </property>
+    <property>
+        <name>onmouseover</name><classname>java.lang.String</classname><description>Defines a JavaScript onmouseover event handler</description>
+    </property>
+    <property>
+        <name>onmousemove</name><classname>java.lang.String</classname><description>Defines a JavaScript onmousemove event handler</description>
+    </property>
+    <property>
+        <name>onmouseout</name><classname>java.lang.String</classname><description>Defines a JavaScript onmouseout event handler</description>
+    </property>
+    <property>
+        <name>onkeypress</name><classname>java.lang.String</classname><description>Defines a JavaScript onkeypress event handler</description>
+    </property>
+    <property>
+        <name>onkeydown</name><classname>java.lang.String</classname><description>Defines a JavaScript onkeydown event handler</description>
+    </property>
+    <property>
+        <name>onkeyup</name><classname>java.lang.String</classname><description>Defines a JavaScript onkeyup event handler</description>
+    </property>
+    
+    
+    <property>
+        <name>datafld</name><classname>java.lang.String</classname><description>Retrieves which field of a given data source, as specified by the dataSrc property, to bind to the specified object</description>
+    </property>
+    <property>
+        <name>datasrc</name><classname>java.lang.String</classname><description>Retrieves the source of the data for data binding</description>
+    </property>
+    <property>
+        <name>dataformatas</name><classname>java.lang.String</classname><description>Indicates whether the bound data is plain text or HTML</description>
+    </property>
+    <property>
+        <name>disabled</name><classname>java.lang.String</classname><description>Disabled state of an element or button</description>
+    </property>
+    
+    
+    <property>
+        <name>onblur</name><classname>java.lang.String</classname><description> JavaScript code. The onblur event occurs when an element loses focus either by the pointing device or by tabbing navigation. It may be used with the same elements as onfocus</description>
+    </property>
+    <property>
+        <name>onchange</name><classname>java.lang.String</classname><description>Element's value changes</description>
+    </property>
+    <property>
+        <name>onfocus</name><classname>java.lang.String</classname><description>JavaScript code</description>
+    </property>
+    
+    <property>
+        <name>tabindex</name><classname>java.lang.String</classname><description>This attribute specifies the position of the current element in the tabbing order for the current document. This value must be a number between 0 and 32767. User agents should ignore leading zeros</description>
+    </property>
+    <property>
+        <name>readonly</name><classname>java.lang.String</classname><description>Flag indicating that this component will prohibit
+            changes by the user.  The element may receive focus
+            unless it has also been disabled
+        </description>
+    </property>
+    
+    <property>
+        <name>size</name><classname>java.lang.String</classname><description>see JSF Spec</description>
+    </property>
+    <property>
+        <name>enabledClass</name><classname>java.lang.String</classname><description>CSS class is for enabled elements</description>
+    </property>
+    <property>
+        <name>disabledClass</name><classname>java.lang.String</classname><description>CSS class is for disabled elements</description>
+    </property>
+    
+    
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_select_many_menu_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_select_many_menu_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_select_many_menu_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,130 @@
+<properties>
+    
+    
+    
+    
+    
+    <property>
+        <name>id</name><classname>java.lang.String</classname><description>Every component may have a unique id automatically created if omitted</description>
+    </property>
+    <property>
+        <name>rendered</name><classname>java.lang.String</classname><description>If "false", this component isn't rendered</description>
+    </property>
+    <property>
+        <name>binding</name><classname>java.lang.String</classname><description>The attribute takes a value-binding expression for a component property of
+a backing bean</description>
+    </property>
+    
+    <property>
+        <name>value</name><classname>java.lang.String</classname><description>The initial value to set when rendered for the first time</description>
+    </property>
+    <property>
+        <name>converter</name><classname>java.lang.String</classname><description>Id of Converter to be used or reference to a Converter</description>
+    </property>
+    
+    <property>
+        <name>immediate</name><classname>java.lang.String</classname><description>A flag indicating that this component value must be converted and validated immediately (that is, during Apply Request Values phase), rather than waiting until Process Validations phase</description>
+    </property>
+    <property>
+        <name>required</name><classname>java.lang.String</classname><description>If "true", this component will be checked for non-empty input</description>
+    </property>
+    <property>
+        <name>validator</name><classname>java.lang.String</classname><description>MethodBinding pointing at a method that is called during Process Validations phase of a request processing lifecycle, to validate the current value of this component</description>
+    </property>
+    <property>
+        <name>valueChangeListener</name><classname>java.lang.String</classname><description>Listener for value changes</description>
+    </property>
+    
+    
+    
+    <property>
+        <name>dir</name><classname>java.lang.String</classname><description>Alternate textual description of the element rendered by this component</description>
+    </property>
+    <property>
+        <name>lang</name><classname>java.lang.String</classname><description>A Code describing the language used in the generated markup for this component</description>
+    </property>
+    <property>
+        <name>style</name><classname>java.lang.String</classname><description>CSS style(s) to apply when this component is rendered</description>
+    </property>
+    <property>
+        <name>title</name><classname>java.lang.String</classname><description>An advisory title information about markup elements generated for this component</description>
+    </property>
+    <property>
+        <name>styleClass</name><classname>java.lang.String</classname><description>Corresponds to the HTML class attribute</description>
+    </property>
+    
+    
+    <property>
+        <name>onclick</name><classname>java.lang.String</classname><description>Defines a JavaScript onclick event handler</description>
+    </property>
+    <property>
+        <name>ondblclick</name><classname>java.lang.String</classname><description>Defines a JavaScript ondblclick event handler</description>
+    </property>
+    <property>
+        <name>onmousedown</name><classname>java.lang.String</classname><description>Defines a JavaScript onmousedown event handler</description>
+    </property>
+    <property>
+        <name>onmouseup</name><classname>java.lang.String</classname><description>Defines a JavaScript onmouseup event handler</description>
+    </property>
+    <property>
+        <name>onmouseover</name><classname>java.lang.String</classname><description>Defines a JavaScript onmouseover event handler</description>
+    </property>
+    <property>
+        <name>onmousemove</name><classname>java.lang.String</classname><description>Defines a JavaScript onmousemove event handler</description>
+    </property>
+    <property>
+        <name>onmouseout</name><classname>java.lang.String</classname><description>Defines a JavaScript onmouseout event handler</description>
+    </property>
+    <property>
+        <name>onkeypress</name><classname>java.lang.String</classname><description>Defines a JavaScript onkeypress event handler</description>
+    </property>
+    <property>
+        <name>onkeydown</name><classname>java.lang.String</classname><description>Defines a JavaScript onkeydown event handler</description>
+    </property>
+    <property>
+        <name>onkeyup</name><classname>java.lang.String</classname><description>Defines a JavaScript onkeyup event handler</description>
+    </property>
+    
+    
+    <property>
+        <name>datafld</name><classname>java.lang.String</classname><description>Retrieves which field of a given data source, as specified by the dataSrc property, to bind to the specified object</description>
+    </property>
+    <property>
+        <name>datasrc</name><classname>java.lang.String</classname><description>Retrieves the source of the data for data binding</description>
+    </property>
+    <property>
+        <name>dataformatas</name><classname>java.lang.String</classname><description>Indicates whether the bound data is plain text or HTML</description>
+    </property>
+    <property>
+        <name>disabled</name><classname>java.lang.String</classname><description>Disabled state of an element or button</description>
+    </property>
+    
+    
+    <property>
+        <name>onblur</name><classname>java.lang.String</classname><description>A JavaScript code. The onblur event occurs when an element loses focus either by a pointing device or by tabbing navigation. It may be used with the same elements as onfocus</description>
+    </property>
+    <property>
+        <name>onchange</name><classname>java.lang.String</classname><description>Element value changes</description>
+    </property>
+    <property>
+        <name>onfocus</name><classname>java.lang.String</classname><description>JavaScript code</description>
+    </property>
+    
+    <property>
+        <name>tabindex</name><classname>java.lang.String</classname><description>This attribute specifies the position of the current element in the tabbing order for the current document. This value must be a number between 0 and 32767.A User agents should ignore leading zeros</description>
+    </property>
+    <property>
+        <name>readonly</name><classname>java.lang.String</classname><description>A flag indicating that this component prohibits
+            changes by a user.  The element may receive focus
+            unless it has also been disabled
+        </description>
+    </property>
+    <property>
+        <name>enabledClass</name><classname>java.lang.String</classname><description>A CSS class for enabled elements</description>
+    </property>
+    <property>
+        <name>disabledClass</name><classname>java.lang.String</classname><description>A CSS class for disabled elements</description>
+    </property>
+    
+    
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_select_one_listbox_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_select_one_listbox_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_select_one_listbox_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,134 @@
+<properties>
+    
+    
+    
+    
+    
+    <property>
+        <name>id</name><classname>java.lang.String</classname><description>Every component may have a unique id automatically created if omitted</description>
+    </property>
+    <property>
+        <name>rendered</name><classname>java.lang.String</classname><description>If "false", this component isn't rendered</description>
+    </property>
+    <property>
+        <name>binding</name><classname>java.lang.String</classname><description>The attribute takes a value-binding expression for a component property of
+a backing bean</description>
+    </property>
+    
+    <property>
+        <name>value</name><classname>java.lang.String</classname><description>The initial value to set when rendered for the first time</description>
+    </property>
+    <property>
+        <name>converter</name><classname>java.lang.String</classname><description>Id of Converter to be used or reference to a Converter</description>
+    </property>
+    
+    <property>
+        <name>immediate</name><classname>java.lang.String</classname><description> Flag indicating that this component value must be converted and validated immediately (that is, during Apply Request Values phase), rather than waiting until a Process Validations phase</description>
+    </property>
+    <property>
+        <name>required</name><classname>java.lang.String</classname><description>If "true", this component is checked for non-empty input</description>
+    </property>
+    <property>
+        <name>validator</name><classname>java.lang.String</classname><description>MethodBinding pointing at a method that is called during Process Validations phase of a request processing lifecycle, to validate the current value of this component</description>
+    </property>
+    <property>
+        <name>valueChangeListener</name><classname>java.lang.String</classname><description>Listener for value changes</description>
+    </property>
+    
+    
+    
+    <property>
+        <name>dir</name><classname>java.lang.String</classname><description>An alternate textual description of the element rendered by this component</description>
+    </property>
+    <property>
+        <name>lang</name><classname>java.lang.String</classname><description>A code describing the language used in the generated markup for this component</description>
+    </property>
+    <property>
+        <name>style</name><classname>java.lang.String</classname><description>CSS style(s) to apply when this component is rendered</description>
+    </property>
+    <property>
+        <name>title</name><classname>java.lang.String</classname><description>Advisory title information about markup elements generated for this component</description>
+    </property>
+    <property>
+        <name>styleClass</name><classname>java.lang.String</classname><description>Corresponds to an HTML class attribute</description>
+    </property>
+    
+    
+    <property>
+        <name>onclick</name><classname>java.lang.String</classname><description>Defines a JavaScript onclick event handler</description>
+    </property>
+    <property>
+        <name>ondblclick</name><classname>java.lang.String</classname><description>Defines a JavaScript ondblclick  event handler</description>
+    </property>
+    <property>
+        <name>onmousedown</name><classname>java.lang.String</classname><description>Defines a JavaScript onmousedown event handler</description>
+    </property>
+    <property>
+        <name>onmouseup</name><classname>java.lang.String</classname><description>Defines a JavaScript onmouseup event handler</description>
+    </property>
+    <property>
+        <name>onmouseover</name><classname>java.lang.String</classname><description>Defines a JavaScript onmouseover event handler</description>
+    </property>
+    <property>
+        <name>onmousemove</name><classname>java.lang.String</classname><description>Defines a JavaScript onmousemove event handler</description>
+    </property>
+    <property>
+        <name>onmouseout</name><classname>java.lang.String</classname><description>Defines a JavaScript onmouseout event handler</description>
+    </property>
+    <property>
+        <name>onkeypress</name><classname>java.lang.String</classname><description>Defines a JavaScript onkeypress event handler</description>
+    </property>
+    <property>
+        <name>onkeydown</name><classname>java.lang.String</classname><description>Defines a JavaScript onkeydown event handler</description>
+    </property>
+    <property>
+        <name>onkeyup</name><classname>java.lang.String</classname><description>Defines a JavaScript onkeyup event handler</description>
+    </property>
+    
+    
+    <property>
+        <name>datafld</name><classname>java.lang.String</classname><description>Retrieves which field of a given data source, as specified by the dataSrc property, to bind to a specified object</description>
+    </property>
+    <property>
+        <name>datasrc</name><classname>java.lang.String</classname><description>Retrieves a source of the data for data binding</description>
+    </property>
+    <property>
+        <name>dataformatas</name><classname>java.lang.String</classname><description>Indicates whether the bound data is plain text or HTML</description>
+    </property>
+    <property>
+        <name>disabled</name><classname>java.lang.String</classname><description>Disabled state of an element or button</description>
+    </property>
+    
+    
+    <property>
+        <name>onblur</name><classname>java.lang.String</classname><description> JavaScript code. The onblur event occurs when an element loses focus either by the pointing device or by tabbing navigation. It may be used with the same elements as onfocus</description>
+    </property>
+    <property>
+        <name>onchange</name><classname>java.lang.String</classname><description>Element's value changes</description>
+    </property>
+    <property>
+        <name>onfocus</name><classname>java.lang.String</classname><description>JavaScript code </description>
+    </property>
+    
+    <property>
+        <name>tabindex</name><classname>java.lang.String</classname><description>This attribute specifies the position of the current element in the tabbing order for the current document. This value must be a number between 0 and 32767. User agents should ignore leading zeros</description>
+    </property>
+    <property>
+        <name>readonly</name><classname>java.lang.String</classname><description>Flag indicating that this component will prohibit
+            changes by the user.  The element may receive focus
+            unless it has also been disabled
+        </description>
+    </property>
+    
+    <property>
+        <name>size</name><classname>java.lang.String</classname><description>see JSF Spec</description>
+    </property>
+    <property>
+        <name>enabledClass</name><classname>java.lang.String</classname><description>CSS class for enabled elements</description>
+    </property>
+    <property>
+        <name>disabledClass</name><classname>java.lang.String</classname><description>CSS class for disabled elements</description>
+    </property>
+    
+    
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_select_one_menu_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_select_one_menu_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_select_one_menu_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,130 @@
+<properties>
+    
+    
+    
+    
+    
+    
+    <property>
+        <name>id</name><classname>java.lang.String</classname><description>Every component may have a unique id automatically created if omitted</description>
+    </property>
+    <property>
+        <name>rendered</name><classname>java.lang.String</classname><description>If "false", this component isn't rendered</description>
+    </property>
+    <property>
+        <name>binding</name><classname>java.lang.String</classname><description>The attribute takes a value-binding expression for a component property of
+a backing bean</description>
+    </property>
+    
+    <property>
+        <name>value</name><classname>java.lang.String</classname><description>Initial value to set when rendered for the first time</description>
+    </property>
+    <property>
+        <name>converter</name><classname>java.lang.String</classname><description>Id of Converter to be used or reference to a Converter</description>
+    </property>
+    
+    <property>
+        <name>immediate</name><classname>java.lang.String</classname><description> Flag indicating that this component's value must be converted and validated immediately (that is, during Apply Request Values phase), rather than waiting until Process Validations phase</description>
+    </property>
+    <property>
+        <name>required</name><classname>java.lang.String</classname><description>If "true", this component will be checked for non-empty input</description>
+    </property>
+    <property>
+        <name>validator</name><classname>java.lang.String</classname><description>Method Binding pointing at a method that will be called during Process Validations phase of the request processing lifecycle, to validate the current value of this component</description>
+    </property>
+    <property>
+        <name>valueChangeListener</name><classname>java.lang.String</classname><description>Listener for value changes</description>
+    </property>
+    
+    
+    
+    <property>
+        <name>dir</name><classname>java.lang.String</classname><description>Alternate textual description of the element rendered by this component</description>
+    </property>
+    <property>
+        <name>lang</name><classname>java.lang.String</classname><description> Code describing the language used in the generated markup for this component</description>
+    </property>
+    <property>
+        <name>style</name><classname>java.lang.String</classname><description>CSS style(s) to be applied when this component is rendered</description>
+    </property>
+    <property>
+        <name>title</name><classname>java.lang.String</classname><description> Advisory title information about markup elements generated for this component</description>
+    </property>
+    <property>
+        <name>styleClass</name><classname>java.lang.String</classname><description>Corresponds to the HTML class attribute</description>
+    </property>
+    
+    
+    <property>
+        <name>onclick</name><classname>java.lang.String</classname><description>Defines a JavaScript onclick event handler</description>
+    </property>
+    <property>
+        <name>ondblclick</name><classname>java.lang.String</classname><description>Defines a JavaScript ondblclick  event handler</description>
+    </property>
+    <property>
+        <name>onmousedown</name><classname>java.lang.String</classname><description>Defines a JavaScript onmousedown event handler</description>
+    </property>
+    <property>
+        <name>onmouseup</name><classname>java.lang.String</classname><description>Defines a JavaScript onmouseup event handler</description>
+    </property>
+    <property>
+        <name>onmouseover</name><classname>java.lang.String</classname><description>Defines a JavaScript onmouseover event handler</description>
+    </property>
+    <property>
+        <name>onmousemove</name><classname>java.lang.String</classname><description>Defines a JavaScript onmousemove event handler</description>
+    </property>
+    <property>
+        <name>onmouseout</name><classname>java.lang.String</classname><description>Defines a JavaScript onmouseout event handler</description>
+    </property>
+    <property>
+        <name>onkeypress</name><classname>java.lang.String</classname><description>Defines a JavaScript onkeypress event handler</description>
+    </property>
+    <property>
+        <name>onkeydown</name><classname>java.lang.String</classname><description>Defines a JavaScript onkeydown event handler</description>
+    </property>
+    <property>
+        <name>onkeyup</name><classname>java.lang.String</classname><description>Defines a JavaScript onkeyup event handler</description>
+    </property>
+    
+    
+    <property>
+        <name>datafld</name><classname>java.lang.String</classname><description>Retrieves which field of a given data source, as specified by the dataSrc property, to bind to the specified object</description>
+    </property>
+    <property>
+        <name>datasrc</name><classname>java.lang.String</classname><description>Retrieves the source of the data for data binding</description>
+    </property>
+    <property>
+        <name>dataformatas</name><classname>java.lang.String</classname><description>Indicates whether the bound data is plain text or HTML</description>
+    </property>
+    <property>
+        <name>disabled</name><classname>java.lang.String</classname><description>Disabled state of an element or button</description>
+    </property>
+    
+    
+    <property>
+        <name>onblur</name><classname>java.lang.String</classname><description> JavaScript code. The onblur event occurs when an element loses focus either by the pointing device or by tabbing navigation. It may be used with the same elements as onfocus</description>
+    </property>
+    <property>
+        <name>onchange</name><classname>java.lang.String</classname><description>Element's value changes</description>
+    </property>
+    <property>
+        <name>onfocus</name><classname>java.lang.String</classname><description>JavaScript code </description>
+    </property>
+    
+    <property>
+        <name>tabindex</name><classname>java.lang.String</classname><description>This attribute specifies the position of the current element in the tabbing order for the current document. This value must be a number between 0 and 32767. User agents should ignore leading zeros</description>
+    </property>
+    <property>
+        <name>readonly</name><classname>java.lang.String</classname><description>Flag indicating that this component will prohibit
+            changes by the user.  The element may receive focus
+            unless it has also been disabled
+        </description>
+    </property>
+    <property>
+        <name>enabledClass</name><classname>java.lang.String</classname><description>CSS class for enabled elements</description>
+    </property>
+    <property>
+        <name>disabledClass</name><classname>java.lang.String</classname><description>CSS class for disabled elements</description>
+    </property>
+    
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_select_one_radio_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_select_one_radio_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/standard_select_one_radio_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,148 @@
+<properties>
+    
+    
+    
+    
+    
+    
+    <property>
+        <name>id</name><classname>java.lang.String</classname><description>Every component may have an unique id automatically created if omitted</description>
+    </property>
+    <property>
+        <name>rendered</name><classname>java.lang.String</classname><description>If "false", this component isn't rendered</description>
+    </property>
+    <property>
+        <name>binding</name><classname>java.lang.String</classname><description>The attribute takes a value-binding expression for a component property of
+a backing bean</description>
+    </property>
+    
+    <property>
+        <name>value</name><classname>java.lang.String</classname><description>Initial value to set when rendered for the first time</description>
+    </property>
+    <property>
+        <name>converter</name><classname>java.lang.String</classname><description>Id of Converter to be used or reference to a Converter</description>
+    </property>
+    
+    <property>
+        <name>immediate</name><classname>java.lang.String</classname><description>A flag indicating that this component value must be converted and validated immediately (that is, during Apply Request Values phase), rather than waiting until a Process Validations phase</description>
+    </property>
+    <property>
+        <name>required</name><classname>java.lang.String</classname><description>If "true", this component will be checked for non-empty input</description>
+    </property>
+    <property>
+        <name>validator</name><classname>java.lang.String</classname><description>MethodBinding pointing at a method that will be called during Process Validations phase of the request processing lifecycle, to validate the current value of this component</description>
+    </property>
+    <property>
+        <name>valueChangeListener</name><classname>java.lang.String</classname><description>Listener for value changes</description>
+    </property>
+    
+    
+    
+    <property>
+        <name>dir</name><classname>java.lang.String</classname><description>Alternate textual description of the element rendered by this component</description>
+    </property>
+    <property>
+        <name>lang</name><classname>java.lang.String</classname><description> Code describing the language used in the generated markup for this component</description>
+    </property>
+    <property>
+        <name>style</name><classname>java.lang.String</classname><description>CSS style(s) to be applied when this component is rendered</description>
+    </property>
+    <property>
+        <name>title</name><classname>java.lang.String</classname><description> Advisory title information about markup elements generated for this component</description>
+    </property>
+    <property>
+        <name>styleClass</name><classname>java.lang.String</classname><description>Corresponds to the HTML class attribute</description>
+    </property>
+    
+    
+    <property>
+        <name>onclick</name><classname>java.lang.String</classname><description>Defines a JavaScript onclick event handler</description>
+    </property>
+    <property>
+        <name>ondblclick</name><classname>java.lang.String</classname><description>Defines a JavaScript ondblclick  event handler</description>
+    </property>
+    <property>
+        <name>onmousedown</name><classname>java.lang.String</classname><description>Defines a JavaScript onmousedown event handler</description>
+    </property>
+    <property>
+        <name>onmouseup</name><classname>java.lang.String</classname><description>Defines a JavaScript onmouseup event handler</description>
+    </property>
+    <property>
+        <name>onmouseover</name><classname>java.lang.String</classname><description>Defines a JavaScript onmouseover event handler</description>
+    </property>
+    <property>
+        <name>onmousemove</name><classname>java.lang.String</classname><description>Defines a JavaScript onmousemove event handler</description>
+    </property>
+    <property>
+        <name>onmouseout</name><classname>java.lang.String</classname><description>Defines a JavaScript onmouseout event handler</description>
+    </property>
+    <property>
+        <name>onkeypress</name><classname>java.lang.String</classname><description>Defines a JavaScript onkeypress event handler</description>
+    </property>
+    <property>
+        <name>onkeydown</name><classname>java.lang.String</classname><description>Defines a JavaScript onkeydown event handler</description>
+    </property>
+    <property>
+        <name>onkeyup</name><classname>java.lang.String</classname><description>Defines a JavaScript onkeyup event handler</description>
+    </property>
+    
+    
+    <property>
+        <name>accesskey</name><classname>java.lang.String</classname><description>This attribute assigns an access key to an element. An access key is a single character from the document character set. Note. Authors should consider the input method of the expected reader when specifying an accesskey</description>
+    </property>
+    <property>
+        <name>alt</name><classname>java.lang.String</classname><description>For user agents that cannot display images, forms, or applets, this attribute specifies alternate text. The 
+            
+            language of the alternate text is specified by the lang attribute
+        </description>
+    </property>
+    <property>
+        <name>datafld</name><classname>java.lang.String</classname><description>Retrieves which field of a given data source, as specified by the dataSrc property, to bind to the specified object</description>
+    </property>
+    <property>
+        <name>datasrc</name><classname>java.lang.String</classname><description>Retrieves the source of the data for data binding</description>
+    </property>
+    <property>
+        <name>dataformatas</name><classname>java.lang.String</classname><description>Indicates whether the bound data is plain text or HTML</description>
+    </property>
+    <property>
+        <name>disabled</name><classname>java.lang.String</classname><description>Disabled state of an element or button</description>
+    </property>
+    <property>
+        <name>onblur</name><classname>java.lang.String</classname><description> JavaScript code. The onblur event occurs when an element loses focus either by the pointing device or by tabbing navigation. It may be used with the same elements as onfocus</description>
+    </property>
+    <property>
+        <name>onchange</name><classname>java.lang.String</classname><description>Element's value changes</description>
+    </property>
+    <property>
+        <name>onfocus</name><classname>java.lang.String</classname><description>JavaScript code </description>
+    </property>
+    <property>
+        <name>onselect</name><classname>java.lang.String</classname><description>An element is selected</description>
+    </property>
+    <property>
+        <name>readonly</name><classname>java.lang.String</classname><description>Flag indicating that this component will prohibit
+            changes by the user.  The element may receive focus
+            unless it has also been disabled
+        </description>
+    </property>
+    <property>
+        <name>tabindex</name><classname>java.lang.String</classname><description>This attribute specifies the position of the current element in the tabbing order for the current document. This value must be a number between 0 and 32767. User agents should ignore leading zeros</description>
+    </property>
+    
+    
+    <property>
+        <name>layout</name><classname>java.lang.String</classname><description>see JSF Spec. 8.5.10</description>
+    </property>
+    <property>
+        <name>border</name><classname>java.lang.String</classname><description>see JSF Spec. 8.5.10</description>
+    </property>
+    <property>
+        <name>enabledClass</name><classname>java.lang.String</classname>standard_select_one_radio_attributes
+    </property>
+    <property>
+        <name>disabledClass</name><classname>java.lang.String</classname><description>CSS class is for disabled elements</description>
+    </property>
+    
+    
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_column_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_column_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_column_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,5 @@
+<properties>
+    
+    
+    
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_command_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_command_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_command_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,45 @@
+<properties>
+    <!-- common attributes for action component -->
+    
+    &ui_component_attributes;
+    
+    <property  attachedstate="true">
+        <name>action</name>
+        <classname>javax.faces.el.MethodBinding</classname>
+        <description>
+            MethodBinding pointing at the application action to be invoked,
+            if this UIComponent is activated by the user, during the Apply
+            Request Values or Invoke Application phase of the request
+            processing lifecycle, depending on the value of the immediate
+            property
+        </description>
+        <methodargs> </methodargs>
+    </property>
+    <property elonly="true"  attachedstate="true">
+        <name>actionListener</name>
+        <classname>javax.faces.el.MethodBinding</classname>
+        <description>
+            MethodBinding pointing at method accepting  an ActionEvent with return type void
+        </description>
+        <methodargs>javax.faces.event.ActionEvent.class</methodargs>
+    </property>
+    <property>
+        <name>immediate</name>
+        <classname>boolean</classname>
+        <description>
+            True means, that the default ActionListener should be executed
+            immediately (i.e. during Apply Request Values phase of the
+            request processing lifecycle), rather than waiting until the
+            Invoke Application phase
+        </description>
+    </property>
+    <property>
+        <name>value</name>
+        <classname>java.lang.Object</classname>
+        <description>
+            The current value for this component
+        </description>
+    </property>
+    
+    
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_component_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_component_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_component_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,25 @@
+<properties>
+    <!-- Attributes  applicable to all JSF components -->
+    <property existintag="true" exist="true" el="false">
+        <name>id</name>
+        <classname>java.lang.String</classname>
+        <description>
+            Every component may have a unique id that is automatically created if omitted
+        </description>
+    </property>
+    <property>
+        <name>rendered</name>
+        <classname>boolean</classname>
+        <description>
+            If "false", this component is not rendered
+        </description>
+    </property>
+    <property existintag="true" exist="true" el="true" elonly="true">
+        <name>binding</name>
+        <classname>java.lang.String</classname>
+        <description>The attribute takes a value-binding expression for a component property of
+a backing bean</description>
+    </property>
+    
+    
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_data_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_data_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_data_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,37 @@
+<properties>
+    <property>
+        <name>first</name>
+        <classname>int</classname>
+        <description>
+            A zero-relative row number of the first row to display
+        </description>
+    </property>
+    <property>
+        <name>rows</name>
+        <classname>int</classname>
+        <description>
+            A number of rows to display, or zero for all remaining
+            rows in the table
+        </description>
+    </property>
+    <property>
+        <name>var</name>
+        <classname>java.lang.String</classname>
+        <description>
+            A request-scope attribute via which the data object for the
+            current row will be used when iterating
+        </description>
+    </property>
+    <property disabled="true">
+        <name>rowIndex</name>
+        <description>An index of row</description>
+    </property>
+    <property disabled="true">
+        <name>header</name>
+        <description>A header of a table</description>
+    </property>
+    <property disabled="true">
+        <name>footer</name>
+        <description>A footer of a table</description>
+    </property>
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_for_attribute.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_for_attribute.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_for_attribute.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,13 @@
+<properties>
+    <!-- Attribute  'for' used for point to other component -->
+    <property>
+        <name>for</name>
+        <classname>java.lang.String</classname>
+        <description><![CDATA[
+		id (or full path of id's) of target components, for which this element must provide support.
+		If a target component inside of the same <code>NamingContainer</code> (UIForm, UIData in base implementations), can be simple value of the "id" attribute.
+		For other cases must include id's of <code>NamingContainer</code> components, separated by ':'. For search from the root of components, must be started with ':'.
+		]]>
+        </description>
+    </property>
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_form_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_form_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_form_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,6 @@
+<properties>
+    
+    &ui_component_attributes;
+    
+    
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_graphic_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_graphic_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_graphic_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,11 @@
+<properties>
+    &ui_component_attributes;
+    <property>
+        <name>value</name>
+        <alias>url</alias>
+        <classname>java.lang.Object</classname>
+        <description>URL of the image (see JSF.4.1.5)</description>
+    </property>
+    
+    
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_input_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_input_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_input_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,38 @@
+<properties>
+    &ui_output_attributes;
+    
+    <property>
+        <name>immediate</name>
+        <classname>boolean</classname>
+        <description>
+            A flag indicating that this component value must be converted
+            and validated immediately (that is, during Apply Request Values
+            phase), rather than waiting until a Process Validations phase
+        </description>
+    </property>
+    <property>
+        <name>required</name>
+        <classname>boolean</classname>
+        <description>
+            If "true", this component is checked for non-empty input
+        </description>
+    </property>
+    <property  attachedstate="true">
+        <name>validator</name>
+        <classname>javax.faces.el.MethodBinding</classname>
+        <methodargs> </methodargs>
+        <description>
+            MethodBinding pointing at a method that is called during
+            Process Validations phase of the request processing lifecycle,
+            to validate the current value of this component
+        </description>
+    </property>
+    <property  attachedstate="true">
+        <name>valueChangeListener</name>
+        <classname>javax.faces.el.MethodBinding</classname>
+        <methodargs> </methodargs>
+        <description>Listener for value changes</description>
+    </property>
+    
+    
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_message_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_message_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_message_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,32 @@
+<properties>
+    &ui_component_attributes;
+    <property>
+        <name>for</name>
+        <classname>java.lang.String</classname>
+        <description>
+            A client identifier of the component for which this component
+            represents associated message(s)
+        </description>
+    </property>
+    <property>
+        <name>showSummary</name>
+        <classname>boolean</classname>
+        <description>
+            Indicates whether the summary of associated message(s)
+            should be displayed. Default is: true
+        </description>
+        <defaultvalue>true</defaultvalue>
+    </property>
+    <property>
+        <name>showDetail</name>
+        <classname>boolean</classname>
+        <description>
+            Indicates whether the detail of associated message(s) should
+            be displayed. Default is: false
+        </description>
+        <defaultvalue>false</defaultvalue>
+    </property>
+    
+    
+    
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_messages_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_messages_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_messages_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,41 @@
+<properties>
+    &ui_component_attributes;
+    <property>
+        <name>for</name>
+        <classname>java.lang.String</classname>
+        <description>
+            A client identifier of the component for which this component
+            represents associated message(s)
+        </description>
+    </property>
+    <property>
+        <name>showSummary</name>
+        <classname>boolean</classname>
+        <description>
+            Indicates whether the summary of associated message(s)
+            should be displayed. Default is: true
+        </description>
+        <defaultvalue>true</defaultvalue>
+    </property>
+    <property>
+        <name>showDetail</name>
+        <classname>boolean</classname>
+        <description>
+            Indicates whether the detail of the associated message(s) should
+            be displayed. Default is: false
+        </description>
+        <defaultvalue>false</defaultvalue>
+    </property>
+    <property>
+        <name>globalOnly</name>
+        <classname>boolean</classname>
+        <description>
+            Indicates whether only global messages (that is, messages with
+            no associated client identifier) should be rendered. Default is:
+            false
+        </description>
+        <defaultvalue>false</defaultvalue>
+    </property>
+    
+    
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_output_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_output_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_output_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,19 @@
+<properties>
+    &ui_component_attributes;
+    <property>
+        <name>value</name>
+        <classname>java.lang.Object</classname>
+        <description>
+            The initial value to set when rendered for the first time
+        </description>
+    </property>
+    <property  attachedstate="true">
+        <name>converter</name>
+        <classname>javax.faces.convert.Converter</classname>
+        <description>
+            Id of Converter to be used or reference to a Converter
+        </description>
+    </property>
+    
+    
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_panel_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_panel_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_panel_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,13 @@
+<properties>
+    
+    
+    
+    &ui_component_attributes;
+    
+    <property>
+        <name>layout</name>
+        <classname>java.lang.String</classname>
+        <description>It defines a visual layout of a panel, it can be "block" or "inline"</description>
+    </property>
+    
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_parameter_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_parameter_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_parameter_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,24 @@
+<properties>
+    &ui_component_attributes;
+    <!-- Disable - not applicable for param -->
+    <property exist="true" existintag="true" hidden="true">
+        <name>rendered</name>
+        <classname>boolean</classname>
+        <description>
+            If "false", this component isn't rendered
+        </description>
+    </property>
+    
+    <property>
+        <name>name</name>
+        <classname>java.lang.String</classname>
+        <description>A name of this parameter</description>
+    </property>
+    <property>
+        <name>value</name>
+        <classname>java.lang.Object</classname>
+        <description>An initial value or a value binding</description>
+    </property>
+    
+    
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_select_boolean_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_select_boolean_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_select_boolean_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,6 @@
+<properties>
+    &ui_input_attributes;
+    
+    
+    
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_select_item_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_select_item_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_select_item_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,44 @@
+<properties>
+    &ui_component_attributes;
+    <!-- Disable - not applicable for param -->
+    <property exist="true" existintag="true" hidden="true">
+        <name>rendered</name>
+        <classname>boolean</classname>
+        <description>
+            If "false", this component isn't rendered
+        </description>
+    </property>
+    
+    <property>
+        <name>itemDisabled</name>
+        <classname>boolean</classname>
+        <description>
+            If "true", this component isn't saved during state saving
+        </description>
+    </property>
+    <property>
+        <name>itemDescription</name>
+        <classname>java.lang.String</classname>
+        <description>A description used by tools only</description>
+    </property>
+    <property>
+        <name>itemLabel</name>
+        <classname>java.lang.String</classname>
+        <description>A text shown by the item</description>
+    </property>
+    <property>
+        <name>itemValue</name>
+        <classname>java.lang.Object</classname>
+        <description>Item value, which is passed to the server as a request parameter</description>
+    </property>
+    <property>
+        <name>value</name>
+        <classname>java.lang.Object</classname>
+        <description>
+            A value reference pointing at a javax.faces.model.SelectItem
+            instance
+        </description>
+    </property>
+    
+    
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_select_items_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_select_items_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_select_items_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,21 @@
+<properties>
+    &ui_component_attributes;
+    <!-- Disable - not applicable for param -->
+    <property exist="true" existintag="true" hidden="true">
+        <name>rendered</name>
+        <classname>boolean</classname>
+        <description>
+            If "false", this component isn't rendered
+        </description>
+    </property>
+    <property>
+        <name>value</name>
+        <classname>java.lang.Object</classname>
+        <description>
+            A value reference pointing at a List or Array of
+            javax.faces.model.SelectItem instances
+        </description>
+    </property>
+    
+    
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_select_many_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_select_many_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_select_many_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,40 @@
+<properties>
+    
+    
+    
+    
+    
+    <property>
+        <name>id</name><classname>java.lang.String</classname><description>Every component may have a unique id automatically created if omitted</description>
+    </property>
+    <property>
+        <name>rendered</name><classname>java.lang.String</classname><description>If "false", this component isn't rendered</description>
+    </property>
+    <property>
+        <name>binding</name><classname>java.lang.String</classname><description>The attribute takes a value-binding expression for a component property of
+a backing bean</description>
+    </property>
+    
+    <property>
+        <name>value</name><classname>java.lang.String</classname><description>The initial value to set when rendered for the first time</description>
+    </property>
+    <property>
+        <name>converter</name><classname>java.lang.String</classname><description>Id of Converter to be used or reference to a Converter</description>
+    </property>
+    
+    <property>
+        <name>immediate</name><classname>java.lang.String</classname><description>A flag indicating that this component value must be converted and validated immediately (that is, during an Apply Request Values phase), rather than waiting until a Process Validations phase</description>
+    </property>
+    <property>
+        <name>required</name><classname>java.lang.String</classname><description>If "true", this component is checked for a non-empty input</description>
+    </property>
+    <property>
+        <name>validator</name><classname>java.lang.String</classname><description>MethodBinding pointing at a method that is called during Process Validations phase of the request processing lifecycle, to validate the current value of this component</description>
+    </property>
+    <property>
+        <name>valueChangeListener</name><classname>java.lang.String</classname><description>Listener for value changes</description>
+    </property>
+    
+    
+    
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_select_one_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_select_one_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/ui_select_one_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,40 @@
+<properties>
+    
+    
+    
+    
+    
+    <property>
+        <name>id</name><classname>java.lang.String</classname><description>Every component may have an unique id. Automatically created if omitted</description>
+    </property>
+    <property>
+        <name>rendered</name><classname>java.lang.String</classname><description>If "false", this component isn't rendered</description>
+    </property>
+    <property>
+        <name>binding</name><classname>java.lang.String</classname><description>The attribute takes a value-binding expression for a component property of
+a backing bean</description>
+    </property>
+    
+    <property>
+        <name>value</name><classname>java.lang.String</classname><description>Initial value to set when rendered for the first time</description>
+    </property>
+    <property>
+        <name>converter</name><classname>java.lang.String</classname><description>Id of Converter to be used or reference to a Converter</description>
+    </property>
+    
+    <property>
+        <name>immediate</name><classname>java.lang.String</classname><description> Flag indicating that this component value must be converted and validated immediately (that is, during an Apply Request Values phase), rather than waiting until Process Validations phase</description>
+    </property>
+    <property>
+        <name>required</name><classname>java.lang.String</classname><description>If "true", this component will be checked for non-empty input</description>
+    </property>
+    <property>
+        <name>validator</name><classname>java.lang.String</classname><description>MethodBinding pointing at a method that is called during a Process Validations phase of the request processing lifecycle, to validate the current value of this component</description>
+    </property>
+    <property>
+        <name>valueChangeListener</name><classname>java.lang.String</classname><description>Listener for value changes</description>
+    </property>
+    
+    
+    
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/user_role_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/user_role_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/user_role_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,22 @@
+<properties>
+    <property>
+        <name>enabledOnUserRole</name>
+        <classname>boolean</classname>
+        <description>
+            If a user is in the given role, this component is rendered
+            normally. If not, no hyperlink is rendered but all nested tags
+            (=body) are rendered
+        </description>
+    </property>
+    <property>
+        <name>visibleOnUserRole</name>
+        <classname>boolean</classname>
+        <description>
+            If a user is in given role, this component will be rendered
+            normally. If not, nothing is rendered and the body of this tag
+            is skipped
+        </description>
+    </property>
+    
+    
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/validator_min_max_attributes.ent
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/validator_min_max_attributes.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/schema/entities/validator_min_max_attributes.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,14 @@
+<properties>
+    <property>
+        <name>minimum</name>
+        <classname>int</classname>
+        <description>A minimum possible value within an optional range</description>
+    </property>
+    <property>
+        <name>maximum</name>
+        <classname>int</classname>
+        <description> A maximum within an optional range</description>
+    </property>
+    
+    
+</properties>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/templates/component.vm
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/templates/component.vm	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/templates/component.vm	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,202 @@
+/**
+ * GENERATED FILE - DO NOT EDIT
+ *
+ */
+
+package $package;
+
+#foreach($import in $imports)
+import $import ;
+#end
+
+import javax.faces.context.FacesContext;
+import javax.faces.el.ValueBinding;
+#if(${generator.key})
+
+import java.io.IOException;
+import javax.faces.FacesException;
+import org.ajax4jsf.framework.util.base64.Codec;
+#end
+
+/**
+ * Component-Type ${component.name}
+ * Component-Family ${component.family}
+  	#if(${component.renderer})
+ * Renderer-Type ${component.renderer.name}
+  	#end
+ * ${component.xmlEncodedDescription}
+ */
+ public class $component.simpleClassName extends $component.superclass {
+
+  public static final String COMPONENT_TYPE = "${component.name}";
+
+  /**
+   *  Constructor to init default renderers 
+   */ 
+  public $component.simpleClassName (){
+  	#if(${component.renderer})
+  	setRendererType("${component.renderer.name}");
+  	#end
+  }
+
+// Component properties fields
+#set( $fiedCounter = 1 )
+#foreach( $prop in $component.properties )
+ #if( !$prop.exist )
+	/**
+	 * $prop.name
+	 * ${prop.xmlEncodedDescription}
+	 */
+	 #if($prop.simpleType)
+	 private $prop.simpleClassName  _$prop.name = ${prop.defaultvalue};		
+	/**
+	 * Flag indicated what $prop.name is set.
+	 */
+	 private boolean _${prop.name}Set = false;	
+	 #set( $fiedCounter = $fiedCounter+2)
+	 #else
+	 private $prop.simpleClassName  _$prop.name = null; /* Default is ${prop.defaultvalue}*/
+	 #set( $fiedCounter = $fiedCounter+1)
+	 #end
+#end	 
+#end
+
+// Getters-setters
+#foreach( $prop in $component.properties )
+ #if( !$prop.exist )
+   /**
+	 * ${prop.xmlEncodedDescription}
+	 * Setter for $prop.name
+	 * @param $prop.name - new value
+	 */
+	 public void ${prop.setterName}( $prop.simpleClassName  __$prop.name ){
+		this._${prop.name} = __$prop.name;
+	 #if($prop.simpleType)
+		this._${prop.name}Set = true;
+	 #end
+	 }
+
+
+   /**
+	 * ${prop.xmlEncodedDescription}
+	 * Getter for $prop.name
+	 * @return $prop.name value from local variable or value bindings
+	 */
+	 public $prop.simpleClassName ${prop.getterName}(  ){
+	 #if($prop.simpleType)
+		 if(this._${prop.name}Set){
+			return this._${prop.name};
+		 }
+    	ValueBinding vb = getValueBinding("${prop.name}");
+    	if (vb != null) {
+    	    ${prop.boxingClass} value = (${prop.boxingClass}) vb.getValue(getFacesContext());
+    	    if (null == value) {
+    			return this._${prop.name};
+    	    }
+    	    return (value.${prop.classname}Value());
+    	} else {
+    	    return (this._${prop.name});
+    	}
+	 #else
+        if (null != this._${prop.name})
+        {
+            return this._${prop.name};
+        #if( !$prop.isInstanceof("javax.faces.el.MethodBinding") && !$prop.isInstanceof("javax.faces.el.ValueBinding"))
+	    }
+        ValueBinding vb = getValueBinding("${prop.name}");
+        if (null != vb){
+            return (${prop.simpleClassName})vb.getValue(getFacesContext());
+		#end
+        } else {
+            return ${prop.defaultvalue};
+        }
+	 #end
+	 }
+	 #if($prop.raw)
+   /**
+	 * ${prop.xmlEncodedDescription}
+	 * Raw Setter for $prop.name
+	 * @param $prop.name - new value
+	 */
+	 public void ${prop.setterName}Raw( $prop.simpleClassName  __$prop.name ){
+		this._${prop.name} = __$prop.name;
+	 }
+   /**
+	 * ${prop.xmlEncodedDescription}
+	 * Raw ( bypadd bindings ) Getter for $prop.name
+	 * @return $prop.name value from local variable 
+	 */
+	 public $prop.simpleClassName ${prop.getterName}Raw(  ){
+			return this._${prop.name};
+	 }
+	 #end
+ #end	 
+#end
+
+#if( ${component.family}  )
+// Component family.
+	public static final String COMPONENT_FAMILY = "${component.family}";
+
+	public String getFamily() {
+		return COMPONENT_FAMILY;
+	}
+#end
+
+// Save state
+// ----------------------------------------------------- StateHolder Methods
+
+
+    public Object saveState(FacesContext context) {
+        Object values[] = new Object[${fiedCounter}];
+        values[0] = super.saveState(context);
+#set($currentField = 1)
+#foreach( $prop in $component.properties )
+ #if( !$prop.exist )
+	 #if($prop.simpleType)		
+       values[${currentField}] = new ${prop.boxingClass}(_$prop.name);
+	   #set( $currentField = $currentField+1)
+	   values[${currentField}] = Boolean.valueOf(_${prop.name}Set);	
+	   #set( $currentField = $currentField+1)
+	 #else
+	   #if(!${prop.attachedstate} )
+       values[${currentField}] = _$prop.name;
+	   #else
+       values[${currentField}] = saveAttachedState(context, _$prop.name );		
+	   #end
+	   #set( $currentField = $currentField+1)
+	 #end
+	
+ #end	 
+#end
+	  return values;
+   }
+   
+
+    public void restoreState(FacesContext context, Object state) {
+        Object values[] = (Object[]) state;
+        super.restoreState(context, values[0]);
+#set($currentField = 1)
+#foreach( $prop in $component.properties )
+ #if( !$prop.exist )
+	 #if($prop.simpleType)		
+       _$prop.name = ((${prop.boxingClass})values[${currentField}]).${prop.classname}Value();
+	   #set( $currentField = $currentField+1)
+	   _${prop.name}Set = ((Boolean)values[${currentField}]).booleanValue();	
+	   #set( $currentField = $currentField+1)
+	 #else
+	   #if( !${prop.attachedstate} )
+       _$prop.name = (${prop.simpleClassName})values[${currentField}] ;
+	   #else
+       _$prop.name = (${prop.simpleClassName})restoreAttachedState(context,values[${currentField}] );		
+	   #end
+	   #set( $currentField = $currentField+1)
+	 #end
+	
+ #end	 
+#end
+	
+		
+	}	
+// Utilites
+
+}
\ No newline at end of file

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/templates/componentTag.vm
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/templates/componentTag.vm	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/templates/componentTag.vm	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,149 @@
+/**
+ * GENERATED FILE - DO NOT EDIT
+ *
+ */
+package ${tag.packageName};
+
+#foreach($import in $imports)
+import $import ;
+#end
+import javax.faces.component.UIComponent;
+import ${component.classname};
+
+public class $tag.simpleClassName extends $tag.superclass {
+
+// Fields
+#foreach( $prop in $component.properties )
+ #if( !$prop.existintag )
+	/*
+	 * $prop.name
+	 * ${prop.xmlEncodedDescription}
+	 */
+	 private String  _$prop.name = null;
+
+ #end	 
+#end
+// Setters
+#foreach( $prop in $component.properties )
+ #if( !$prop.existintag )
+	/*
+	 * $prop.name
+	 * ${prop.xmlEncodedDescription}
+	 */
+	/*
+	 * $prop.description
+	 * Setter for $prop.name
+	 * @param $prop.name - new value
+	 */
+	 public void ${prop.setterName}( String  __${prop.name} ){
+		this._${prop.name} = __${prop.name};
+     }
+	 
+ #end
+ #if( $prop.alias)
+	/*
+	 * ${prop.xmlEncodedDescription}
+	 * Setter for alias of $prop.name as $prop.alias
+	 * @param $prop.name - new value
+	 */
+	 public void set${prop.upperFirstChar($prop.alias)}( String  __${prop.alias} ){
+		this.${prop.setterName}(__${prop.alias});
+     }
+ #end
+#end 	 
+// Release
+
+    /* (non-Javadoc)
+     * @see org.ajax4jsf.components.taglib.html.HtmlCommandButtonTagBase#release()
+     */
+    public void release()
+    {
+        // TODO Auto-generated method stub
+        super.release();
+#foreach( $prop in $component.properties )
+ #if( !$prop.existintag )
+	    this._${prop.name} = null;
+ #end	 
+#end
+	}
+	
+    /* (non-Javadoc)
+     * @see org.ajax4jsf.components.taglib.html.HtmlCommandButtonTagBase#setProperties(javax.faces.component.UIComponent)
+     */
+    protected void setProperties(UIComponent component)
+    {
+        // TODO Auto-generated method stub
+        super.setProperties(component);
+	
+#foreach( $prop in $component.properties )
+ #if( !$prop.existintag )
+		 #if(!$prop.el)
+			if(isValueReference(this._${prop.name})){
+				throw new IllegalArgumentException("Component ${component.name} with Id " + component.getClientId(getFacesContext() +" not allowed EL expression for property ${prop.name}")
+			}
+		 #end	
+		 #if($prop.name == "action")
+			setActionProperty(component, this._${prop.name});
+		 #elseif($prop.name == "actionListener")
+			setActionListenerProperty(component, this._${prop.name});
+		 #elseif($prop.name == "converter")
+			setConverterProperty(component, this._${prop.name});
+		 #elseif($prop.name == "validator")
+			setValidatorProperty(component, this._${prop.name});
+		 #elseif($prop.name == "valueChangeListener")
+			setValueChangedListenerProperty(component, this._${prop.name});
+		 #elseif($prop.name == "value")
+			setValueProperty(component, this._${prop.name});
+		 #elseif($prop.elOnly || $prop.isInstanceof("javax.faces.el.ValueBinding") )
+			setValueBinding(component, "${prop.name}",this._${prop.name});
+		 #elseif(${prop.simpleType})
+			// Simple type - ${prop.simpleClassName}
+			set${prop.boxingClass}Property(component, "${prop.name}",this._${prop.name}); 
+		 #elseif($prop.classname == "java.lang.Boolean" || $prop.classname == "java.lang.Integer" || $prop.classname == "java.lang.Long")
+			set${prop.simpleClassName}Property(component, "${prop.name}",this._${prop.name}); 
+		 #elseif( $prop.classname == "java.lang.String")
+			setStringProperty(component, "${prop.name}",this._${prop.name});
+		 #elseif( $prop.classname == "java.lang.Object")
+			// TODO - handle object
+			setStringProperty(component, "${prop.name}",this._${prop.name});
+		 #elseif( $prop.isInstanceof("javax.faces.el.MethodBinding") )
+			if(null != this._${prop.name}){
+             if (isValueReference(this._${prop.name}))
+             {
+                MethodBinding mb = getFacesContext().getApplication().createMethodBinding(this._${prop.name},
+                                                                                new Class[]{${prop.methodargs}});
+                ((${component.simpleClassName})component).${prop.setterName}(mb);
+             }
+             else
+             {
+                getFacesContext().getExternalContext().log("Component " + component.getClientId(getFacesContext()) + " has invalid ${prop.name} value: " + this._${prop.name});
+             }
+			}
+		 #else
+			// TODO - setup properties for other cases.
+			// name ${prop.name} with type $prop.classname
+		 #end	
+ #end	 
+#end
+   }
+	
+	/* (non-Javadoc)
+	 * @see javax.faces.webapp.UIComponentTag#getComponentType()
+	 */
+	public String getComponentType() {
+		// TODO Auto-generated method stub
+		return "${component.name}";
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.webapp.UIComponentTag#getRendererType()
+	 */
+	public String getRendererType() {
+		#if($renderer)
+		return "${renderer.name}";
+		#else
+		return null;
+		#end
+	}
+
+}

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/templates/componenttest.vm
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/templates/componenttest.vm	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/templates/componenttest.vm	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,156 @@
+/**
+ * GENERATED FILE - DO NOT EDIT
+ *
+ */
+
+package $package;
+
+#foreach($import in $imports)
+import $import ;
+#end
+
+import com.gargoylesoftware.htmlunit.Page;
+import javax.faces.component.UIForm;
+import javax.faces.component.html.HtmlForm;
+import com.gargoylesoftware.htmlunit.html.HtmlPage;
+import com.gargoylesoftware.htmlunit.html.HtmlElement;
+import javax.faces.context.FacesContext;
+import javax.faces.el.ValueBinding;
+import javax.faces.component.UIViewRoot;
+
+import org.ajax4jsf.tests.MockValueBinding;
+
+//import ${component.classname};
+#if(${generator.key})
+
+import java.io.IOException;
+import javax.faces.FacesException;
+import org.ajax4jsf.framework.util.base64.Codec;
+#end
+
+public class $component.test.simpleClassName extends $component.test.superclassname {
+
+//  public static final String COMPONENT_TYPE = "${component.name}";
+
+
+#set( $fiedCounter = 1 )
+#foreach( $prop in $component.properties )
+ #if( !$prop.exist )
+	 #if($prop.simpleType)
+	 private boolean _${prop.name}Set = false;	
+	 #set( $fiedCounter = $fiedCounter+2)
+	 #else
+	 #set( $fiedCounter = $fiedCounter+1)
+	 #end
+#end	 
+#end
+  
+  private $component.simpleClassName component;
+  private UIForm form;
+//  private FacesContext context;
+
+  /**
+   *  Constructor to init default renderers 
+   */ 
+  public $component.test.simpleClassName (String name){
+  	super(name);
+  }
+
+	/*
+	* setup the tets
+	*/
+	public void setUp() throws Exception {
+		super.setUp();
+		component = new ${component.simpleClassName}();
+		form = new HtmlForm();
+		form.setId("form");
+		facesContext.getViewRoot().getChildren().add(form);
+		
+		component.setId("component");
+#foreach( $prop in $component.properties )
+	#if(!$prop.exist && !$prop.elonly && !$prop.classname.startsWith("javax.faces."))
+		component.${prop.setterName}($testDataGenerator.getTestData(${prop}) );
+	 #end
+#end
+		
+		form.getChildren().add(component);
+		
+	}
+
+	/*
+	* setup the tets
+	*/
+	public void tearDown() throws Exception{
+		super.tearDown();
+		component = null;
+		form = null;
+	}
+
+	public void testComponent() throws Exception {
+	  	#if(${component.renderer})
+			assertEquals("${component.renderer.name}", component.getRendererType());
+	  	#end
+
+/*		
+		HtmlPage renderedView = renderView();
+		assertNotNull(renderedView);
+    	System.out.println(renderedView.getWebResponse().getContentAsString());
+    	HtmlElement element = renderedView.getHtmlElementById(form.getId() + ":" + component.getId());
+    	assertNotNull(element);
+*/    	
+//    	values[0] = component.saveState(facesContext);
+    	
+	}
+/*
+	public void testDefaultValues(){
+		
+	}
+*/
+	public void testContext(){
+		
+		Object state = component.saveState(facesContext);
+/*		
+    	UIViewRoot root = facesContext.getViewRoot();
+    	root.processDecodes(facesContext);
+    	root.processValidators(facesContext);
+    	root.processUpdates(facesContext);
+    	root.processApplication(facesContext);
+*/
+		testRestoreState(state);
+	}
+
+	public void testGetters() {
+		${component.simpleClassName} component = new ${component.simpleClassName}();
+		
+#foreach( $prop in $component.properties )
+	#if(!$prop.exist && !$prop.elonly && !$prop.classname.startsWith("javax.faces."))
+		component.setValueBinding("${prop.name}", new MockValueBinding($testDataGenerator.getTestVeData(${prop}), ${testDataGenerator.getTestVeClass(${prop})}.class));
+		assertEquals($testDataGenerator.getTestData(${prop}), component.${prop.getterName}());
+		component.${prop.setterName}($testDataGenerator.getTestData1(${prop}) );
+		assertEquals($testDataGenerator.getTestData1(${prop}), component.${prop.getterName}());
+	 #end
+#end
+
+
+	}
+	
+	private void testRestoreState(Object state){
+		${component.simpleClassName} restoredComponent = new ${component.simpleClassName}();
+		restoredComponent.restoreState(facesContext, state);
+		
+#foreach( $prop in $component.properties )
+	#if(!$prop.exist)
+		assertEquals(component.${prop.getterName}(), restoredComponent.${prop.getterName}());
+	 #end
+#end
+
+	}
+	
+	private void assertEquals(double d1, double d2) {
+		assertEquals(d1, d2, 0);
+	}
+	
+	private void assertEquals(float d1, float d2) {
+		assertEquals(d1, d2, 0);
+	}
+}

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/templates/converter.vm
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/templates/converter.vm	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/templates/converter.vm	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,221 @@
+package $package;
+
+#foreach($import in $imports)
+import $import ;
+#end
+
+ import javax.faces.context.FacesContext;
+ import javax.faces.el.ValueBinding;
+import javax.faces.component.StateHolder;
+ 
+ /**
+  * Converter-Id ${converter.id}
+  * ${converter.xmlEncodedDescription}
+  */
+ 
+public class $converter.simpleClassName extends $converter.superclass #if(${converter.stateHolderRequired} && !${converter.superclassImplementsStateHolder})implements StateHolder#end
+ {
+ 
+   public static final String CONVERTER_ID = "${converter.id}";
+
+   
+ 
+ // Conveter properties fields
+
+#set( $fieldCounter = 0 )
+ #foreach( $prop in $converter.properties )
+
+#if( !$prop.exist )
+   /**
+    * $prop.name
+    * ${prop.xmlEncodedDescription}
+    */
+
+#if($prop.simpleType)
+   private $prop.simpleClassName  _$prop.name = ${prop.defaultvalue};		
+   /**
+    * Flag indicated that $prop.name is set.
+    */
+   private boolean _${prop.name}Set = false;	
+#set( $fieldCounter = $fieldCounter+2)
+#else
+   private $prop.simpleClassName  _$prop.name = null; /* Default is ${prop.defaultvalue}*/
+#set( $fieldCounter = $fieldCounter+1)
+ #end
+#end	 
+#end
+ 
+ // Getters and setters
+ #foreach( $prop in $converter.properties )
+
+#if( !$prop.exist )
+   /**
+    * ${prop.xmlEncodedDescription}
+    * Setter for $prop.name
+	*/
+   public void ${prop.setterName}( $prop.simpleClassName  __$prop.name )
+   {
+     this._${prop.name} = __$prop.name;
+
+#if($prop.simpleType)
+ 	this._${prop.name}Set = true;
+
+#end
+   }
+ 
+  /**
+   * ${prop.xmlEncodedDescription}
+   * Getter for $prop.name
+   * @return $prop.name value from local variable or value binding
+   */
+   public $prop.simpleClassName ${prop.getterName}()
+   {
+     ValueBinding vb = getValueBinding("${prop.name}");
+
+#if($prop.simpleType)
+     if(this._${prop.name}Set)
+     {
+ 	  return this._${prop.name};
+
+         return (this._${prop.name});
+       }
+     }
+
+#else
+     if (null != this._${prop.name}) 
+     {
+       return this._${prop.name};
+     }
+
+#if( !$prop.isInstanceof("javax.faces.el.MethodBinding") && !$prop.isInstanceof("javax.faces.el.ValueBinding"))
+     else if (null != vb)
+     {
+       return (${prop.simpleClassName})vb.getValue(getFacesContext());
+     }
+
+#end
+     else
+     {
+       return ${prop.defaultvalue};
+     }
+
+#end
+  }
+ 	#if($prop.raw)
+  /**
+   * ${prop.xmlEncodedDescription}
+   * Raw Setter for $prop.name
+   * @param $prop.name - new value
+   */
+
+   {
+     return this._${prop.name};
+   }
+ #end
+#end	 
+#end
+ 
+#if($converter.stateHolderRequired)
+ 
+  // Save state
+  // ----------------------------------------------------- StateHolder Methods
+
+  private boolean _transient;
+
+#if(${converter.superclassImplementsStateHolder})
+#set($currentField=1)
+#set($fieldCounter = $fieldCounter+1)
+#else
+#set($currentField=0)
+#end
+   public Object saveState(FacesContext context) {
+
+#if(${converter.superSaveStateMethodExists})
+    Object values[] = new Object[${fieldCounter}];
+     values[0] = super.saveState(context);
+#else
+    Object values[] = new Object[${fieldCounter}];
+#end
+#foreach( $prop in $converter.properties )
+#if( !$prop.exist )
+#if($prop.simpleType)		
+     values[${currentField}] = new ${prop.boxingClass}(_$prop.name);
+#set( $currentField = $currentField+1)
+    values[${currentField}] = Boolean.valueOf(_${prop.name}Set);	
+#set( $currentField = $currentField+1)
+#else
+#if(!${prop.attachedstate} )
+     values[${currentField}] = _$prop.name;
+#else
+     values[${currentField}] = saveAttachedState(context, _$prop.name );		
+ #end
+
+#set( $currentField = $currentField+1)
+#end	
+#end	 
+#end
+	return values;
+   }
+    
+
+#if(${converter.superclassImplementsStateHolder})
+#set($currentField=1)
+#else
+#set($currentField=0)
+#end
+   public void restoreState(FacesContext context, Object state) {
+#if(${converter.superRestoreStateMethodExists})
+     Object values[] = (Object[]) state;
+     super.restoreState(context, values[0]);
+#else
+    Object values[] = (Object[]) state;
+#end
+#foreach( $prop in $converter.properties )
+#if( !$prop.exist )
+#if($prop.simpleType)		
+     _$prop.name = ((${prop.boxingClass})values[${currentField}]).${prop.classname}Value();
+#set( $currentField = $currentField+1)
+    _${prop.name}Set = ((Boolean)values[${currentField}]).booleanValue();	
+#set( $currentField = $currentField+1)
+#else
+#if( !${prop.attachedstate} )
+     _$prop.name = (${prop.simpleClassName})values[${currentField}] ;
+#else
+     _$prop.name = (${prop.simpleClassName})restoreAttachedState(context,values[${currentField}] );		
+ #end
+#set( $currentField = $currentField+1)
+#end
+ 	
+#end	 
+#end
+  }
+  
+#if(!$converter.superIsTransientMethodExists)
+  public boolean isTransient()
+  {
+    return _transient;
+  }
+#end
+ 
+#if(!$converter.superSetTransientMethodExists)
+  public void setTransient(boolean newTransientValue)
+  {
+    this._transient = newTransientValue;
+  }
+#end
+
+#end
+	  
+  // Utilites
+
+  private FacesContext getFacesContext()
+  {
+    return FacesContext.getCurrentInstance();
+  }
+  
+  private ValueBinding getValueBinding(String name)
+  {
+    return getFacesContext().getApplication().createValueBinding(name);
+  }
+
+ }

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/templates/converterTag.vm
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/templates/converterTag.vm	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/templates/converterTag.vm	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,95 @@
+/**
+ * GENERATED FILE - DO NOT EDIT
+ *
+ */
+package ${tag.packageName};
+
+#foreach($import in $imports)
+import $import ;
+#end
+import javax.faces.component.UIComponent;
+import javax.faces.convert.Converter;
+import javax.faces.webapp.UIComponentTag;
+import javax.faces.context.FacesContext;
+import javax.faces.el.ValueBinding;
+import org.apache.commons.beanutils.ConvertUtils;
+import javax.servlet.jsp.JspException;
+import ${converter.classname};
+
+public class $tag.simpleClassName extends $tag.superclass 
+{
+
+// Fields
+#foreach( $prop in $converter.properties )
+#if( !$prop.existintag )
+  /*
+   * $prop.name
+   * ${prop.xmlEncodedDescription}
+   */
+  private String  _$prop.name = null;
+
+#end	 
+#end
+// Setters
+#foreach( $prop in $converter.properties )
+#if( !$prop.existintag )
+  /*
+   * $prop.description
+   * Setter for $prop.name
+   * @param $prop.name - new value
+   */
+  public void ${prop.setterName}(String  __${prop.name}) 
+  {
+    this._${prop.name} = __${prop.name};
+  }
+	 
+#end
+#if( $prop.alias)
+  /*
+   * ${prop.xmlEncodedDescription}
+   * Setter for alias of $prop.name as $prop.alias
+   * @param $prop.name - new value
+   */
+  public void set${prop.upperFirstChar($prop.alias)}(String  __${prop.alias}) 
+  {
+    this.${prop.setterName}(__${prop.alias});
+  }
+#end
+#end
+
+  protected Converter createConverter() throws JspException 
+  {
+    ${converter.simpleClassName} converter = new ${converter.simpleClassName}();
+    _setProperties(converter);
+    return converter;
+  }
+
+  // Support method to wire in attributes
+  private void _setProperties(${converter.simpleClassName} converter) throws JspException 
+  {
+    FacesContext facesContext = FacesContext.getCurrentInstance();
+#foreach( $prop in $converter.properties )
+#if( !$prop.existintag )
+    if (_${prop.name} != null) 
+    {
+#if( ${prop.el} )
+      if (UIComponentTag.isValueReference(_${prop.name})) 
+      {
+        ValueBinding vb = facesContext.getApplication().createValueBinding(_${prop.name});
+        converter.${prop.setterName}((${prop.simpleClassName}) vb.getValue(facesContext));
+      }
+#if (!${prop.elonly})
+      else
+      {
+        converter.${prop.setterName}((${prop.simpleClassName}) ConvertUtils.convert(_${prop.name}, ${prop.simpleClassName}.class));
+      }
+#end
+    }
+#else
+    converter.${prop.setterName}((${prop.simpleClassName}) ConvertUtils.convert(_${prop.name}, ${prop.simpleClassName}.class));
+#end
+#end
+#end
+  }
+
+}

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/templates/facelets.taglib.vm
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/templates/facelets.taglib.vm	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/templates/facelets.taglib.vm	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE facelet-taglib PUBLIC
+  "-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN"
+  "http://java.sun.com/dtd/facelet-taglib_1_0.dtd">
+<facelet-taglib xmlns="http://java.sun.com/JSF/Facelet">
+	<namespace>${taglib.uri}</namespace>
+
+${taglib.includeContent}
+
+#foreach( $component in ${components})
+#if($component.tag)
+ <tag>
+  <tag-name>${component.tag.name}</tag-name>
+  <component>
+			<component-type>${component.name}</component-type>
+#if(${component.renderer})
+			<renderer-type>
+				${component.renderer.name}
+			</renderer-type>
+#end
+#if(${component.taghandler})
+		    <handler-class>
+				${component.taghandler.classname}
+			</handler-class>
+#end
+  </component>
+	
+ </tag>
+#end
+#end
+
+
+#foreach( $listener in ${listeners})
+ <tag>
+  <tag-name>${listener.name}</tag-name>
+#if(${listener.taghandler})
+		    <handler-class>
+				${listener.taghandler.classname}
+			</handler-class>
+#end
+	
+ </tag>
+#end
+
+</facelet-taglib>
\ No newline at end of file

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/templates/faces-config.vm
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/templates/faces-config.vm	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/templates/faces-config.vm	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
+                              "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
+<faces-config>
+	
+${facesConfig.includeContent}
+
+#foreach( $validator in ${validators})
+  <validator>
+	<validator-id>${validator.id}</validator-id>
+	<validator-class>${validator.classname}</validator-class>
+	#if(${validator.description})
+	<description>${validator.description}</description>
+	#end
+	#if(${validator.displayname})
+	<display-name>${validator.displayname}</display-name>
+	#end
+	#if(${validator.icon})
+	<icon>${validator.icon}</icon>
+	#end
+  </validator>
+#end
+
+#foreach( $converter in ${converters})
+  <converter>
+	#if(${converter.id})
+	<converter-id>${converter.id}</converter-id>
+	#end
+	#if(${converter.forclass})
+	<converter-for-class>${converter.forclass}</converter-for-class>
+	#end
+
+	<converter-class>${converter.classname}</converter-class>
+
+	#if(${converter.description})
+	<description>${converter.description}</description>
+	#end
+	#if(${converter.displayname})
+	<display-name>${converter.displayname}</display-name>
+	#end
+	#if(${converter.icon})
+	<icon>${converter.icon}</icon>
+	#end
+  </converter>
+#end
+
+
+
+#foreach( $component in ${components})
+#if( $component.generate )
+  <component>
+  #if(${component.description})  
+	<description>${component.xmlEncodedDescription}</description>
+  #end
+  #if(${component.displayname})  
+	<display-name>${component.xmlEncodedDisplayname}</display-name>
+  #end
+    <component-type>${component.name}</component-type>
+    <component-class>${component.classname}</component-class>
+    
+#foreach( $facet in $component.facets)
+	<facet>
+  #if(${facet.description})  
+	<description>${facet.xmlEncodedDescription}</description>
+  #end
+  #if(${facet.displayname})  
+	<display-name>${facet.xmlEncodedDisplayname}</display-name>
+  #end
+      <facet-name>${facet.name}</facet-name>
+    </facet>
+#end
+	#if(${component.renderer})
+    <component-extension>
+      <component-family>${component.family}</component-family>
+      <renderer-type>${component.renderer.name}</renderer-type>
+    </component-extension>
+    #end
+  </component>
+#end
+#end
+
+#foreach( $renderkit in $facesConfig.renderKits)
+  <render-kit>
+		#if(${renderkit.renderkitid})
+		<render-kit-id>${renderkit.renderkitid}</render-kit-id>
+		#if(${renderkit.renderkitclass})
+		<render-kit-class>${renderkit.renderkitclass}</render-kit-class>
+		#end
+		#end
+#foreach( $component in $components)
+	#if($component.renderer)
+		#set($rendererClass = $renderkit.rendererClass($component.renderer.classname) )
+		#if( $component.renderer.generate || $facesConfig.rendererExists("${rendererClass}"))
+  		<renderer>
+			<component-family>${component.family}</component-family>
+			<renderer-type>
+				${component.renderer.name}
+			</renderer-type>
+			<renderer-class>
+				${rendererClass}
+			</renderer-class>
+		</renderer>
+		#end
+	#end
+#end
+  </render-kit>
+#end
+
+
+</faces-config>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/templates/listener_taghandler.vm
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/templates/listener_taghandler.vm	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/templates/listener_taghandler.vm	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,101 @@
+/**
+ * GENERATED FILE - DO NOT EDIT
+ *
+ */
+
+package ${tag.packageName};
+
+#foreach($import in $imports)
+import $import ;
+#end
+import javax.faces.component.UIComponent;
+import ${listener.componentclass};
+
+import java.io.IOException;
+
+import javax.faces.*;
+import javax.faces.el.*;
+
+import javax.el.*;
+
+import com.sun.facelets.*;
+import com.sun.facelets.el.*;
+import com.sun.facelets.tag.*;
+import com.sun.facelets.tag.jsf.*;
+
+public class $tag.simpleClassName extends TagHandler {
+
+	private Class listenerType;
+
+    private final TagAttribute type;
+
+    private final TagAttribute binding;
+
+	public ${tag.simpleClassName}(TagConfig config) {
+	    super(config);
+		this.binding = this.getAttribute("binding");
+        this.type = this.getAttribute("type");
+        if (type != null) {
+            if (!type.isLiteral()) {
+                throw new TagAttributeException(this.tag, this.type, "Must be literal");
+            }
+            try {
+                this.listenerType = Class.forName(type.getValue());
+            } catch (Exception e) {
+                throw new TagAttributeException(this.tag, this.type, e);
+            }
+        }
+  	}
+
+  	 public void apply(FaceletContext ctx, UIComponent parent)
+            throws IOException, FacesException, FaceletException, ELException {
+        if (parent instanceof $listener.componentclass) {
+            // only process if parent was just created
+            if (parent.getParent() == null) {
+                ${listener.componentclass} src = (${listener.componentclass}) parent;
+                ${listener.listenerclass} listener = null;
+                ValueExpression ve = null;
+                if (this.binding != null) {
+                    ve = this.binding.getValueExpression(ctx,
+                            ${listener.listenerclass}.class);
+                    listener = (${listener.listenerclass}) ve.getValue(ctx);
+                }
+                if (listener == null) {
+                    try {
+                        listener = (${listener.listenerclass}) listenerType.newInstance();
+                    } catch (Exception e) {
+                        throw new TagAttributeException(this.tag, this.type, e.getCause());
+                    }
+                    if (ve != null) {
+                        ve.setValue(ctx, ve);
+                    }
+                }
+				#foreach($prop in $listener.properties)
+				 #if( !$prop.existintag )
+					TagAttribute attribute;
+					#if( $prop.required )
+					attribute = getRequiredAttribute("${prop.name}");
+					#else
+					attribute = getAttribute("${prop.name}");
+					#end
+		            if (attribute != null) {
+						ValueBinding binding;
+		
+						binding = new LegacyValueBinding(
+							attribute.getValueExpression(ctx, 
+							${prop.classname}.class));
+					
+			            listener.${prop.setterName}(binding);
+					}
+				 #end
+				#end
+
+                src.${listener.methodname}(listener);
+            }
+        } else {
+            throw new TagException(this.tag,
+                    "Parent is not of type ${listener.componentclass}, type is: " + parent);
+        }
+    }
+  	
+}

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/templates/renderer.vm
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/templates/renderer.vm	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/templates/renderer.vm	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,25 @@
+/**
+ * GENERATED FILE - DO NOT EDIT
+ *
+ */
+package ${package};
+
+import ${component.classname};
+import ${renderer.superclass};
+
+/**
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.2 $ $Date: 2007/01/03 21:05:15 $
+ *
+ */
+public class ${renderer.simpleClassName} extends ${renderer.superclass} {
+
+   /** 
+	 * @see org.ajax4jsf.framework.renderer.RendererBase#getComponentClass()
+	 */
+	protected Class getComponentClass() {
+		// Expected component class for rendering
+		return ${component.simpleClassName}.class;
+	}
+
+}

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/templates/resources-config.vm
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/templates/resources-config.vm	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/templates/resources-config.vm	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<resource-config>
+<!-- Include manual created resource -->
+${resourcesConfig.includeContent}
+
+#foreach( $key in ${classResources.keySet()})
+	<resource class="${classResources.get($key)}">
+		<name>${key}</name>
+	</resource>
+#end
+
+#foreach( $key in ${pathResources.keySet()})
+	<resource>
+		<name>${key}</name>
+		<path>${pathResources.get($key)}</path>
+	</resource>
+#end
+</resource-config>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/templates/tag.vm
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/templates/tag.vm	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/templates/tag.vm	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,154 @@
+/**
+ * GENERATED FILE - DO NOT EDIT
+ *
+ */
+package ${tag.packageName};
+
+#foreach($import in $imports)
+import $import ;
+#end
+import javax.faces.component.UIComponent;
+import ${component.classname};
+
+/**
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.2 $ $Date: 2007/01/03 21:05:14 $
+ *
+ */
+public class $tag.simpleClassName extends $tag.superclass {
+
+// Fields
+#foreach( $prop in $component.properties )
+ #if( !$prop.existintag )
+	/*
+	 * $prop.name
+	 * ${prop.xmlEncodedDescription}
+	 */
+	 private String  _$prop.name = null;
+
+ #end	 
+#end
+// Setters
+#foreach( $prop in $component.properties )
+ #if( !$prop.existintag )
+	/*
+	 * $prop.name
+	 * ${prop.xmlEncodedDescription}
+	 */
+	/*
+	 * $prop.description
+	 * Setter for $prop.name
+	 * @param $prop.name - new value
+	 */
+	 public void ${prop.setterName}( String  __${prop.name} ){
+		this._${prop.name} = __${prop.name};
+     }
+	 
+ #end
+ #if( $prop.alias)
+	/*
+	 * ${prop.xmlEncodedDescription}
+	 * Setter for alias of $prop.name as $prop.alias
+	 * @param $prop.name - new value
+	 */
+	 public void set${prop.upperFirstChar($prop.alias)}( String  __${prop.alias} ){
+		this.${prop.setterName}(__${prop.alias});
+     }
+ #end
+#end 	 
+// Release
+
+    /* (non-Javadoc)
+     * @see org.ajax4jsf.components.taglib.html.HtmlCommandButtonTagBase#release()
+     */
+    public void release()
+    {
+        // TODO Auto-generated method stub
+        super.release();
+#foreach( $prop in $component.properties )
+ #if( !$prop.existintag )
+	    this._${prop.name} = null;
+ #end	 
+#end
+	}
+	
+    /* (non-Javadoc)
+     * @see org.ajax4jsf.components.taglib.html.HtmlCommandButtonTagBase#setProperties(javax.faces.component.UIComponent)
+     */
+    protected void setProperties(UIComponent component)
+    {
+        // TODO Auto-generated method stub
+        super.setProperties(component);
+	
+#foreach( $prop in $component.properties )
+ #if( !$prop.existintag )
+		 #if(!$prop.el)
+			if(isValueReference(this._${prop.name})){
+				throw new IllegalArgumentException("Component ${component.name} with Id " + component.getClientId(getFacesContext()) +" not allowed EL expression for property ${prop.name}");
+			}
+		 #end	
+		 #if($prop.name == "action")
+			setActionProperty(component, this._${prop.name});
+		 #elseif($prop.name == "actionListener")
+			setActionListenerProperty(component, this._${prop.name});
+		 #elseif($prop.name == "converter")
+			setConverterProperty(component, this._${prop.name});
+		 #elseif($prop.name == "validator")
+			setValidatorProperty(component, this._${prop.name});
+		 #elseif($prop.name == "valueChangeListener")
+			setValueChangedListenerProperty(component, this._${prop.name});
+		 #elseif($prop.name == "value")
+			setValueProperty(component, this._${prop.name});
+		 #elseif($prop.elOnly || $prop.isInstanceof("javax.faces.el.ValueBinding") )
+			setValueBinding(component, "${prop.name}",this._${prop.name});
+		 #elseif(${prop.simpleType})
+			// Simple type - ${prop.simpleClassName}
+			set${prop.boxingClass}Property(component, "${prop.name}",this._${prop.name}); 
+		 #elseif($prop.classname == "java.lang.Boolean" || $prop.classname == "java.lang.Integer" || $prop.classname == "java.lang.Long")
+			set${prop.simpleClassName}Property(component, "${prop.name}",this._${prop.name}); 
+		 #elseif( $prop.classname == "java.lang.String")
+			setStringProperty(component, "${prop.name}",this._${prop.name});
+		 #elseif( $prop.classname == "java.lang.Object")
+			// TODO - handle object
+			setStringProperty(component, "${prop.name}",this._${prop.name});
+		 #elseif( $prop.isInstanceof("javax.faces.el.MethodBinding") )
+			if(null != this._${prop.name}){
+             if (isValueReference(this._${prop.name}))
+             {
+                MethodBinding mb = getFacesContext().getApplication().createMethodBinding(this._${prop.name},
+                                                                                new Class[]{${prop.methodargs}});
+                ((${component.simpleClassName})component).${prop.setterName}(mb);
+             }
+             else
+             {
+                getFacesContext().getExternalContext().log("Component " + component.getClientId(getFacesContext()) + " has invalid ${prop.name} value: " + this._${prop.name});
+             }
+			}
+		 #else
+			// TODO - setup properties for other cases.
+			// name ${prop.name} with type $prop.classname
+		 #end	
+ #end	 
+#end
+   }
+	
+	/* (non-Javadoc)
+	 * @see javax.faces.webapp.UIComponentTag#getComponentType()
+	 */
+	public String getComponentType() {
+		// TODO Auto-generated method stub
+		return "${component.name}";
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.webapp.UIComponentTag#getRendererType()
+	 */
+	public String getRendererType() {
+		#if($renderer)
+		return "${renderer.name}";
+		#else
+		return null;
+		#end
+	}
+
+}

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/templates/taghandler.vm
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/templates/taghandler.vm	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/templates/taghandler.vm	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,102 @@
+/**
+ * GENERATED FILE - DO NOT EDIT
+ *
+ */
+
+package ${tag.packageName};
+
+#foreach($import in $imports)
+import $import ;
+#end
+import javax.faces.component.UIComponent;
+import ${component.classname};
+import com.sun.facelets.tag.jsf.ComponentHandler;
+import com.sun.facelets.tag.jsf.ComponentConfig;
+
+import com.sun.facelets.*;
+import com.sun.facelets.el.*;
+import com.sun.facelets.tag.*;
+/**
+ * @author shura (latest modification by $Author: ishabalov $)
+ * @version $Revision: 1.1.2.4 $ $Date: 2007/02/20 20:58:03 $
+ *
+ */
+public class $tag.simpleClassName extends $tag.superclass {
+
+
+  private static final ${tag.simpleClassName}MetaRule metaRule = new ${tag.simpleClassName}MetaRule();
+
+
+  
+  public ${tag.simpleClassName}(ComponentConfig config) 
+  {
+    super(config);
+  }
+// Metarule
+  protected MetaRuleset createMetaRuleset(Class type)
+  {
+    MetaRuleset m = super.createMetaRuleset(type);
+	m.addRule(metaRule);
+	return m;
+  }
+
+  	/**
+	 * @author shura (latest modification by $Author: ishabalov $)
+	 * @version $Revision: 1.1.2.4 $ $Date: 2007/02/20 20:58:03 $
+	 *
+	 */
+	static class ${tag.simpleClassName}MetaRule extends MetaRule{
+
+		/* (non-Javadoc)
+		 * @see com.sun.facelets.tag.MetaRule#applyRule(java.lang.String, com.sun.facelets.tag.TagAttribute, com.sun.facelets.tag.MetadataTarget)
+		 */
+		public Metadata applyRule(String name, TagAttribute attribute, MetadataTarget meta) {
+	        if (meta.isTargetInstanceOf(${component.simpleClassName}.class)) {
+		#foreach($prop in $component.properties)
+		 #if( !$prop.existintag )
+		  #if( $prop.isInstanceof("javax.faces.el.MethodBinding") )
+	            if ("${prop.name}".equals(name)) {
+	                    return new ${prop.name}Mapper(attribute);
+	            }
+
+		  #end
+		 #end
+		#end
+	        }
+			return null;
+		}
+
+	}
+
+#foreach($prop in $component.properties)
+#if( !$prop.existintag )
+
+  #if( $prop.isInstanceof("javax.faces.el.MethodBinding") )
+	
+	static class ${prop.name}Mapper extends Metadata {
+
+		private static final Class[] SIGNATURE = new Class[] {${prop.methodargs}};
+
+		private final TagAttribute _action;
+		/**
+		 * @param attribute
+		 */
+		public ${prop.name}Mapper(TagAttribute attribute) {
+			_action = attribute;
+		}
+
+		/* (non-Javadoc)
+		 * @see com.sun.facelets.tag.Metadata#applyMetadata(com.sun.facelets.FaceletContext, java.lang.Object)
+		 */
+		public void applyMetadata(FaceletContext ctx, Object instance) {
+            ((${component.simpleClassName}) instance)
+            .${prop.setterName}(new LegacyMethodBinding(this._action
+                    .getMethodExpression(ctx, null,
+                            SIGNATURE)));
+		}
+
+	}
+	#end
+ #end
+ #end
+}

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/templates/taglib.vm
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/templates/taglib.vm	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/templates/taglib.vm	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,135 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
+                        "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
+<taglib>
+ <tlib-version>${taglib.tlibversion}</tlib-version>
+ <jsp-version>${taglib.jspversion}</jsp-version>
+#if(${taglib.shortname})
+ <short-name>${taglib.shortname}</short-name>
+#end
+ <uri>${taglib.uri}</uri>
+#if(${taglib.description})
+ <description>${taglib.description}</description>
+#end
+${taglib.includeContent}
+
+#foreach( $component in ${components})
+	#if($component.tag)
+ <tag>
+  <name>${component.tag.name}</name>
+  <tag-class>${component.tag.classname}</tag-class>
+  <body-content>${component.tag.bodyContent}</body-content>
+  #if(${component.tag.displayname})  
+	<display-name>${component.tag.xmlEncodedDisplayname}</display-name>
+  #elseif(${component.displayname})
+	<display-name>${component.xmlEncodedDisplayname}</display-name>
+  #end
+  #if(${component.tag.description})
+  <description>${component.tag.xmlEncodedDescription}</description>
+  #else
+  <description>${component.xmlEncodedDescription}</description>
+  #end
+  #foreach( $prop in ${component.properties} )
+	#if( !${prop.hidden} && !${prop.disabled} )
+  <attribute>
+   <name>${prop.name}</name>
+   #if(${prop.required})
+	<required>true</required>
+   #end
+   <rtexprvalue>false</rtexprvalue>
+   <description>${prop.xmlEncodedDescription}</description>
+  </attribute>
+	#if( $prop.alias )
+  <attribute>
+   <name>${prop.alias}</name>
+   <rtexprvalue>false</rtexprvalue>
+   <description>Alias for ${prop.name} : ${prop.xmlEncodedDescription}</description>
+  </attribute>
+	#end
+	#end
+  #end
+</tag>
+#end
+#end
+
+#foreach( $validator in ${validators})
+	#if($validator.tag)
+ <tag>
+  <name>${validator.tag.name}</name>
+  <tag-class>${validator.tag.classname}</tag-class>
+  <body-content>${validator.tag.bodyContent}</body-content>
+  #if(${validator.tag.displayname})  
+	<display-name>${validator.tag.xmlEncodedDisplayname}</display-name>
+  #elseif(${validator.displayname})
+	<display-name>${validator.xmlEncodedDisplayname}</display-name>
+  #end
+  #if(${validator.tag.description})
+  <description>${validator.tag.xmlEncodedDescription}</description>
+  #elseif(${validator.xmlEncodedDescription})
+  <description>${validator.xmlEncodedDescription}</description>
+  #end
+  #foreach( $prop in ${validator.properties} )
+	#if( !${prop.hidden} && !${prop.disabled} )
+  <attribute>
+   <name>${prop.name}</name>
+   #if(${prop.required})
+	<required>true</required>
+   #end
+   <rtexprvalue>false</rtexprvalue>
+   <description>${prop.xmlEncodedDescription}</description>
+  </attribute>
+	#if( $prop.alias )
+  <attribute>
+   <name>${prop.alias}</name>
+   <rtexprvalue>false</rtexprvalue>
+   <description>Alias for ${prop.name} : ${prop.xmlEncodedDescription}</description>
+  </attribute>
+	#end
+	#end
+  #end
+</tag>
+#end
+#end
+
+#foreach( $converter in ${converters})
+	#if($converter.tag)
+ <tag>
+  <name>${converter.tag.name}</name>
+  <tag-class>${converter.tag.classname}</tag-class>
+  <body-content>${converter.tag.bodyContent}</body-content>
+  #if(${converter.tag.displayname})  
+	<display-name>${converter.tag.xmlEncodedDisplayname}</display-name>
+  #elseif(${converter.displayname})
+	<display-name>${converter.xmlEncodedDisplayname}</display-name>
+  #end
+  #if(${converter.tag.description})
+  <description>${converter.tag.xmlEncodedDescription}</description>
+  #elseif(${converter.xmlEncodedDescription})
+  <description>${converter.xmlEncodedDescription}</description>
+  #end
+  #foreach( $prop in ${converter.properties} )
+	#if( !${prop.hidden} && !${prop.disabled} )
+  <attribute>
+   <name>${prop.name}</name>
+   #if(${prop.required})
+	<required>true</required>
+   #end
+   <rtexprvalue>false</rtexprvalue>
+   <description>${prop.xmlEncodedDescription}</description>
+  </attribute>
+	#if( $prop.alias )
+  <attribute>
+   <name>${prop.alias}</name>
+   <rtexprvalue>false</rtexprvalue>
+   <description>Alias for ${prop.name} : ${prop.xmlEncodedDescription}</description>
+  </attribute>
+	#end
+	#end
+  #end
+</tag>
+#end
+#end
+
+
+
+</taglib>
\ No newline at end of file

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/templates/tagtest.vm
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/templates/tagtest.vm	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/templates/tagtest.vm	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,173 @@
+/**
+ * GENERATED FILE - DO NOT EDIT
+ *
+ */
+package ${tag.packageName};
+
+#foreach($import in $imports)
+import $import ;
+#end
+import javax.faces.component.UIComponent;
+import javax.faces.webapp.UIComponentTag;
+import ${component.classname};
+import javax.faces.application.Application;
+import javax.faces.el.ValueBinding;
+import javax.servlet.Servlet;
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequestWrapper;
+import javax.servlet.http.HttpSession;
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.JspWriter;
+import javax.servlet.jsp.PageContext;
+import javax.servlet.jsp.el.ExpressionEvaluator;
+import javax.servlet.jsp.el.VariableResolver;
+import javax.servlet.jsp.tagext.Tag;
+import java.io.IOException;
+import java.util.Enumeration;
+
+
+
+/**
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.2 $ $Date: 2007/01/03 21:05:14 $
+ *
+ */
+public class $tag.test.simpleClassName extends $tag.test.superclassname {
+
+
+	private $tag.simpleClassName tag;
+
+  /**
+   *  Constructor to init default renderers 
+   */ 
+  public ${tag.test.simpleClassName} (String name){
+  	super(name);
+  }
+
+
+	public void setUp() throws Exception {
+		super.setUp();
+		tag = new ${tag.simpleClassName}();
+		tag.setParent(new UIComponentTag(){
+
+			public String getComponentType() {
+				// TODO Auto-generated method stub
+				return null;
+			}
+
+			public String getRendererType() {
+				// TODO Auto-generated method stub
+				return null;
+			}
+			
+			public int doStartTag() throws JspException {
+				// TODO Auto-generated method stub
+				return Tag.EVAL_BODY_INCLUDE;
+			}
+			
+			public int doEndTag() throws JspException {
+				// TODO Auto-generated method stub
+				return Tag.EVAL_BODY_INCLUDE;
+			}
+			
+		});
+		
+	}
+
+	public void tearDown() throws Exception {
+		super.tearDown();
+		tag = null;
+	}
+	
+	
+	public void testSetPropertiesUIComponent() {
+		${component.simpleClassName} component = new ${component.simpleClassName}();
+	// create binding		
+		Application application = null;
+		ValueBinding binding = null;
+
+	#foreach( $prop in $tag.properties )
+		#if($prop.el)
+			 application = facesContext.getApplication();
+		     binding = application.createValueBinding(component.getOnclick());
+    		 component.setValueBinding("${prop.name}", binding);
+				#if($prop.classname == "java.lang.String")
+				component.${prop.setterName}( " __$prop.name" );	
+				#elseif($prop.classname == "java.lang.Boolean")
+				component.${prop.setterName}( new Boolean(true) );
+				#end
+		#end
+		//tag.${prop.setterName}("__${prop.name}");
+	#end
+
+		tag.setProperties(component);
+
+/*
+	#foreach( $prop in $component.properties )
+	 #if( !$prop.existintag )
+		 #if(!$prop.el)
+			if(isValueReference(this._${prop.name})){
+				throw new IllegalArgumentException("Component ${component.name} with Id " + component.getClientId(getFacesContext() +" not allowed EL expression for property ${prop.name}")
+			}
+		 #end	
+		 #if($prop.name == "action")
+		 	
+			setActionProperty(component, tag._${prop.name});
+		 #elseif($prop.name == "actionListener")
+			setActionListenerProperty(component, this._${prop.name});
+		 #elseif($prop.name == "converter")
+			setConverterProperty(component, this._${prop.name});
+		 #elseif($prop.name == "validator")
+			setValidatorProperty(component, this._${prop.name});
+		 #elseif($prop.name == "valueChangeListener")
+			setValueChangedListenerProperty(component, this._${prop.name});
+		 #elseif($prop.name == "value")
+			setValueProperty(component, this._${prop.name});
+		 #elseif($prop.elOnly || $prop.isInstanceof("javax.faces.el.ValueBinding") )
+			setValueBinding(component, "${prop.name}",this._${prop.name});
+		 #elseif(${prop.simpleType})
+			// Simple type - ${prop.simpleClassName}
+			set${prop.boxingClass}Property(component, "${prop.name}",this._${prop.name}); 
+		 #elseif($prop.classname == "java.lang.Boolean" || $prop.classname == "java.lang.Integer" || $prop.classname == "java.lang.Long")
+			set${prop.simpleClassName}Property(component, "${prop.name}",this._${prop.name}); 
+		 #elseif( $prop.classname == "java.lang.String")
+			setStringProperty(component, "${prop.name}",this._${prop.name});
+		 #elseif( $prop.classname == "java.lang.Object")
+			// TODO - handle object
+			setStringProperty(component, "${prop.name}",this._${prop.name});
+		 #elseif( $prop.isInstanceof("javax.faces.el.MethodBinding") )
+			if(null != this._${prop.name}){
+             if (isValueReference(this._${prop.name}))
+             {
+                MethodBinding mb = getFacesContext().getApplication().createMethodBinding(this._${prop.name},
+                                                                                new Class[]{${prop.methodargs}});
+                ((${component.simpleClassName})component).${prop.setterName}(mb);
+             }
+             else
+             {
+                getFacesContext().getExternalContext().log("Component " + component.getClientId(getFacesContext()) + " has invalid ${prop.name} value: " + this._${prop.name});
+             }
+			}
+		 #else
+			// TODO - setup properties for other cases.
+			// name ${prop.name} with type $prop.classname
+		 #end	
+	 #end	 
+	#end
+*/	
+	}
+	
+	public void testGetRendererType(){
+		assertNotNull(tag.getRendererType());
+	}
+	
+	public void testGetComponentType(){
+		assertNotNull(tag.getComponentType());
+	}
+	
+	
+}

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/templates/validator.vm
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/templates/validator.vm	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/templates/validator.vm	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,232 @@
+package $package;
+
+#foreach($import in $imports)
+import $import ;
+#end
+
+import javax.faces.context.FacesContext;
+import javax.faces.el.ValueBinding;
+import javax.faces.component.StateHolder;
+
+/**
+ * Validator-Id ${validator.id}
+ * ${validator.xmlEncodedDescription}
+ */
+public class $validator.simpleClassName extends $validator.superclass #if(${validator.stateHolderRequired} && !${validator.superclassImplementsStateHolder})implements StateHolder#end
+{
+
+  public static final String VALIDATOR_ID = "${validator.id}";
+
+  /**
+   *  Default no-args contstructor
+   */ 
+  public $validator.simpleClassName ()
+  {
+  }
+
+// Validator properties fields
+#set( $fieldCounter = 0 )
+#foreach( $prop in $validator.properties )
+#if( !$prop.exist )
+  /**
+   * $prop.name
+   * ${prop.xmlEncodedDescription}
+   */
+#if($prop.simpleType)
+  private $prop.simpleClassName  _$prop.name = ${prop.defaultvalue};		
+  /**
+   * Flag indicated that $prop.name is set.
+   */
+  private boolean _${prop.name}Set = false;	
+#set( $fieldCounter = $fieldCounter+2)
+#else
+  private $prop.simpleClassName  _$prop.name = null; /* Default is ${prop.defaultvalue}*/
+#set( $fieldCounter = $fieldCounter+1)
+#end
+#end	 
+#end
+
+// Getters and setters
+#foreach( $prop in $validator.properties )
+#if( !$prop.exist )
+  /**
+   * ${prop.xmlEncodedDescription}
+   * Setter for $prop.name
+   * @param $prop.name - new value
+   */
+  public void ${prop.setterName}( $prop.simpleClassName  __$prop.name )
+  {
+    this._${prop.name} = __$prop.name;
+#if($prop.simpleType)
+	this._${prop.name}Set = true;
+#end
+  }
+
+  /**
+   * ${prop.xmlEncodedDescription}
+   * Getter for $prop.name
+   * @return $prop.name value from local variable or value binding
+   */
+  public $prop.simpleClassName ${prop.getterName}()
+  {
+    ValueBinding vb = getValueBinding(_${prop.name});
+#if($prop.simpleType)
+    if(this._${prop.name}Set)
+    {
+	  return this._${prop.name};
+    }
+    if (vb != null) 
+    {
+      ${prop.boxingClass} value = (${prop.boxingClass}) vb.getValue(getFacesContext());
+      if (null == value) 
+      {
+        return this._${prop.name};
+      }
+      //return (value.${prop.classname}Value());
+      } else 
+      {
+        return (this._${prop.name});
+      }
+    }
+#else
+    if (null != this._${prop.name}) 
+    {
+      return this._${prop.name};
+    }
+#if( !$prop.isInstanceof("javax.faces.el.MethodBinding") && !$prop.isInstanceof("javax.faces.el.ValueBinding"))
+    else if (null != vb)
+    {
+      return (${prop.simpleClassName})vb.getValue(getFacesContext());
+    }
+#end
+    else
+    {
+      return ${prop.defaultvalue};
+    }
+  }
+#end
+#if($prop.raw)
+  /**
+   * ${prop.xmlEncodedDescription}
+   * Raw Setter for $prop.name
+   * @param $prop.name - new value
+   */
+  public void ${prop.setterName}Raw( $prop.simpleClassName  __$prop.name )
+  {
+    this._${prop.name} = __$prop.name;
+  }
+  /*
+   * ${prop.xmlEncodedDescription}
+   * Raw ( bypadd bindings ) Getter for $prop.name
+   * @return $prop.name value from local variable 
+   */
+  public $prop.simpleClassName ${prop.getterName}Raw()
+  {
+    return this._${prop.name};
+  }
+#end
+#end	 
+#end
+
+
+#if($validator.stateHolderRequired)
+	
+  // Save state
+  // ----------------------------------------------------- StateHolder Methods
+
+  private boolean _transient;
+#if(${validator.superclassImplementsStateHolder})
+#set($currentField=1)
+#set( $fieldCounter = $fieldCounter+1)
+#else
+#set($currentField=0)
+#end
+  public Object saveState(FacesContext context) {
+#if(${validator.superSaveStateMethodExists})
+    Object values[] = new Object[${fieldCounter}];
+    values[0] = super.saveState(context);
+#else
+    Object values[] = new Object[${fieldCounter}];
+#end
+#foreach( $prop in $validator.properties )
+#if( !$prop.exist )
+#if($prop.simpleType)		
+    values[${currentField}] = new ${prop.boxingClass}(_$prop.name);
+#set( $currentField = $currentField+1)
+    values[${currentField}] = Boolean.valueOf(_${prop.name}Set);	
+#set( $currentField = $currentField+1)
+#else
+#if(!${prop.attachedstate} )
+    values[${currentField}] = _$prop.name;
+#else
+    values[${currentField}] = saveAttachedState(context, _$prop.name );		
+#end
+#set( $currentField = $currentField+1)
+#end	
+#end	 
+#end
+    return values;
+  }
+   
+#if(${validator.superclassImplementsStateHolder})
+#set($currentField=1)
+#else
+#set($currentField=0)
+#end
+  public void restoreState(FacesContext context, Object state) {
+#if(${validator.superRestoreStateMethodExists})
+    Object values[] = (Object[]) state;
+    super.restoreState(context, values[0]);
+#else
+    Object values[] = (Object[]) state;
+#end
+#foreach( $prop in $validator.properties )
+#if( !$prop.exist )
+#if($prop.simpleType)		
+    _$prop.name = ((${prop.boxingClass})values[${currentField}]).${prop.classname}Value();
+#set( $currentField = $currentField+1)
+    _${prop.name}Set = ((Boolean)values[${currentField}]).booleanValue();	
+#set( $currentField = $currentField+1)
+#else
+#if( !${prop.attachedstate} )
+    _$prop.name = (${prop.simpleClassName})values[${currentField}] ;
+#else
+    _$prop.name = (${prop.simpleClassName})restoreAttachedState(context,values[${currentField}] );		
+#end
+#set( $currentField = $currentField+1)
+#end
+	
+#end	 
+#end
+  }
+  
+#if(!$validator.superIsTransientMethodExists)
+  public boolean isTransient()
+  {
+    return _transient;
+  }
+#end
+
+#if(!$validator.superSetTransientMethodExists)
+  public void setTransient(boolean newTransientValue)
+  {
+    this._transient = newTransientValue;
+  }
+#end
+
+#end
+	
+
+// Utilites
+
+  private FacesContext getFacesContext()
+  {
+    return FacesContext.getCurrentInstance();
+  }
+  
+  private ValueBinding getValueBinding(String name)
+  {
+    return getFacesContext().getApplication().createValueBinding(name);
+  }
+
+}
\ No newline at end of file

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/templates/validatorTag.vm
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/templates/validatorTag.vm	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/templates/validatorTag.vm	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,96 @@
+/**
+ * GENERATED FILE - DO NOT EDIT
+ *
+ */
+package ${tag.packageName};
+
+#foreach($import in $imports)
+import $import ;
+#end
+import javax.faces.component.UIComponent;
+import javax.faces.webapp.UIComponentTag;
+import javax.faces.validator.Validator;
+import org.apache.commons.beanutils.ConvertUtils;
+import javax.faces.context.FacesContext;
+import javax.servlet.jsp.JspException;
+import javax.faces.el.ValueBinding;
+import ${validator.classname};
+
+public class $tag.simpleClassName extends $tag.superclass {
+
+	//private String validatorId = "${validator.id}";
+	
+	
+// Fields
+#foreach( $prop in $validator.properties )
+#if( !$prop.existintag )
+  /*
+   * $prop.name
+   * ${prop.xmlEncodedDescription}
+   */
+  private String  _$prop.name = null;
+
+#end	 
+#end
+// Setters
+#foreach( $prop in $validator.properties )
+#if( !$prop.existintag )
+  /*
+   * $prop.description
+   * Setter for $prop.name
+   * @param $prop.name - new value
+   */
+  public void ${prop.setterName}( String  __${prop.name} )
+  {
+	this._${prop.name} = __${prop.name};
+  }
+	 
+#end
+#if( $prop.alias)
+  /* 
+   * ${prop.xmlEncodedDescription}
+   * Setter for alias of $prop.name as $prop.alias
+   * @param $prop.name - new value
+   */
+  public void set${prop.upperFirstChar($prop.alias)}( String  __${prop.alias} )
+  {
+    this.${prop.setterName}(__${prop.alias});
+  }
+#end
+#end
+
+  protected Validator createValidator() throws JspException
+  {
+    ${validator.simpleClassName} validator = new ${validator.simpleClassName}();
+    _setProperties(validator);
+    return validator;
+  }
+
+  // Support method to wire in properties
+  private void _setProperties(${validator.simpleClassName} validator) throws JspException 
+  {
+    FacesContext facesContext = FacesContext.getCurrentInstance();
+#foreach( $prop in $validator.properties )
+#if( !$prop.existintag )
+    if (_${prop.name} != null) 
+    {
+#if( ${prop.el} )
+      if (UIComponentTag.isValueReference(_${prop.name})) 
+      {
+        ValueBinding vb = facesContext.getApplication().createValueBinding(_${prop.name});
+        validator.${prop.setterName}((${prop.simpleClassName}) vb.getValue(facesContext));
+      }
+#if (!${prop.elonly})
+      else
+      {
+        validator.${prop.setterName}((${prop.simpleClassName}) ConvertUtils.convert(_${prop.name}, ${prop.simpleClassName}.class));
+      }
+#end
+    }
+#else
+    validator.${prop.setterName}((${prop.simpleClassName}) ConvertUtils.convert(_${prop.name}, ${prop.simpleClassName}.class));
+#end
+#end
+#end
+  }
+}

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/templates12/component.vm
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/templates12/component.vm	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/templates12/component.vm	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,202 @@
+/**
+ * GENERATED FILE - DO NOT EDIT
+ *
+ */
+
+package $package;
+
+#foreach($import in $imports)
+import $import ;
+#end
+
+import javax.faces.context.FacesContext;
+import javax.faces.el.ValueBinding;
+#if(${generator.key})
+
+import java.io.IOException;
+import javax.faces.FacesException;
+import org.ajax4jsf.framework.util.base64.Codec;
+#end
+
+/**
+ * Component-Type ${component.name}
+ * Component-Family ${component.family}
+  	#if(${component.renderer})
+ * Renderer-Type ${component.renderer.name}
+  	#end
+ * ${component.xmlEncodedDescription}
+ */
+ public class $component.simpleClassName extends $component.superclass {
+
+  public static final String COMPONENT_TYPE = "${component.name}";
+
+  /**
+   *  Constructor to init default renderers 
+   */ 
+  public $component.simpleClassName (){
+  	#if(${component.renderer})
+  	setRendererType("${component.renderer.name}");
+  	#end
+  }
+
+// Component properties fields
+#set( $fiedCounter = 1 )
+#foreach( $prop in $component.properties )
+ #if( !$prop.exist )
+	/**
+	 * $prop.name
+	 * ${prop.xmlEncodedDescription}
+	 */
+	 #if($prop.simpleType)
+	 private $prop.simpleClassName  _$prop.name = ${prop.defaultvalue};		
+	/**
+	 * Flag indicated what $prop.name is set.
+	 */
+	 private boolean _${prop.name}Set = false;	
+	 #set( $fiedCounter = $fiedCounter+2)
+	 #else
+	 private $prop.simpleClassName  _$prop.name = null; /* Default is ${prop.defaultvalue}*/
+	 #set( $fiedCounter = $fiedCounter+1)
+	 #end
+#end	 
+#end
+
+// Getters-setters
+#foreach( $prop in $component.properties )
+ #if( !$prop.exist )
+   /**
+	 * ${prop.xmlEncodedDescription}
+	 * Setter for $prop.name
+	 * @param $prop.name - new value
+	 */
+	 public void ${prop.setterName}( $prop.simpleClassName  __$prop.name ){
+		this._${prop.name} = __$prop.name;
+	 #if($prop.simpleType)
+		this._${prop.name}Set = true;
+	 #end
+	 }
+
+
+   /**
+	 * ${prop.xmlEncodedDescription}
+	 * Getter for $prop.name
+	 * @return $prop.name value from local variable or value bindings
+	 */
+	 public $prop.simpleClassName ${prop.getterName}(  ){
+	 #if($prop.simpleType)
+		 if(this._${prop.name}Set){
+			return this._${prop.name};
+		 }
+    	ValueBinding vb = getValueBinding("${prop.name}");
+    	if (vb != null) {
+    	    ${prop.boxingClass} value = (${prop.boxingClass}) vb.getValue(getFacesContext());
+    	    if (null == value) {
+    			return this._${prop.name};
+    	    }
+    	    return (value.${prop.classname}Value());
+    	} else {
+    	    return (this._${prop.name});
+    	}
+	 #else
+        if (null != this._${prop.name})
+        {
+            return this._${prop.name};
+        #if( !$prop.isInstanceof("javax.faces.el.MethodBinding") && !$prop.isInstanceof("javax.faces.el.ValueBinding"))
+	    }
+        ValueBinding vb = getValueBinding("${prop.name}");
+        if (null != vb){
+            return (${prop.simpleClassName})vb.getValue(getFacesContext());
+		#end
+        } else {
+            return ${prop.defaultvalue};
+        }
+	 #end
+	 }
+	 #if($prop.raw)
+   /**
+	 * ${prop.xmlEncodedDescription}
+	 * Raw Setter for $prop.name
+	 * @param $prop.name - new value
+	 */
+	 public void ${prop.setterName}Raw( $prop.simpleClassName  __$prop.name ){
+		this._${prop.name} = __$prop.name;
+	 }
+   /**
+	 * ${prop.xmlEncodedDescription}
+	 * Raw ( bypadd bindings ) Getter for $prop.name
+	 * @return $prop.name value from local variable 
+	 */
+	 public $prop.simpleClassName ${prop.getterName}Raw(  ){
+			return this._${prop.name};
+	 }
+	 #end
+ #end	 
+#end
+
+#if( ${component.family}  )
+// Component family.
+	public static final String COMPONENT_FAMILY = "${component.family}";
+
+	public String getFamily() {
+		return COMPONENT_FAMILY;
+	}
+#end
+
+// Save state
+// ----------------------------------------------------- StateHolder Methods
+
+
+    public Object saveState(FacesContext context) {
+        Object values[] = new Object[${fiedCounter}];
+        values[0] = super.saveState(context);
+#set($currentField = 1)
+#foreach( $prop in $component.properties )
+ #if( !$prop.exist )
+	 #if($prop.simpleType)		
+       values[${currentField}] = new ${prop.boxingClass}(_$prop.name);
+	   #set( $currentField = $currentField+1)
+	   values[${currentField}] = Boolean.valueOf(_${prop.name}Set);	
+	   #set( $currentField = $currentField+1)
+	 #else
+	   #if(!${prop.attachedstate} )
+       values[${currentField}] = _$prop.name;
+	   #else
+       values[${currentField}] = saveAttachedState(context, _$prop.name );		
+	   #end
+	   #set( $currentField = $currentField+1)
+	 #end
+	
+ #end	 
+#end
+	  return values;
+   }
+   
+
+    public void restoreState(FacesContext context, Object state) {
+        Object values[] = (Object[]) state;
+        super.restoreState(context, values[0]);
+#set($currentField = 1)
+#foreach( $prop in $component.properties )
+ #if( !$prop.exist )
+	 #if($prop.simpleType)		
+       _$prop.name = ((${prop.boxingClass})values[${currentField}]).${prop.classname}Value();
+	   #set( $currentField = $currentField+1)
+	   _${prop.name}Set = ((Boolean)values[${currentField}]).booleanValue();	
+	   #set( $currentField = $currentField+1)
+	 #else
+	   #if( !${prop.attachedstate} )
+       _$prop.name = (${prop.simpleClassName})values[${currentField}] ;
+	   #else
+       _$prop.name = (${prop.simpleClassName})restoreAttachedState(context,values[${currentField}] );		
+	   #end
+	   #set( $currentField = $currentField+1)
+	 #end
+	
+ #end	 
+#end
+	
+		
+	}	
+// Utilites
+
+}
\ No newline at end of file

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/templates12/componentTag.vm
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/templates12/componentTag.vm	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/templates12/componentTag.vm	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,149 @@
+/**
+ * GENERATED FILE - DO NOT EDIT
+ *
+ */
+package ${tag.packageName};
+
+#foreach($import in $imports)
+import $import ;
+#end
+import javax.faces.component.UIComponent;
+import ${component.classname};
+
+public class $tag.simpleClassName extends $tag.superclass {
+
+// Fields
+#foreach( $prop in $component.properties )
+ #if( !$prop.existintag )
+	/*
+	 * $prop.name
+	 * ${prop.xmlEncodedDescription}
+	 */
+	 private String  _$prop.name = null;
+
+ #end	 
+#end
+// Setters
+#foreach( $prop in $component.properties )
+ #if( !$prop.existintag )
+	/*
+	 * $prop.name
+	 * ${prop.xmlEncodedDescription}
+	 */
+	/**
+	 * $prop.description
+	 * Setter for $prop.name
+	 * @param $prop.name - new value
+	 */
+	 public void ${prop.setterName}( String  __${prop.name} ){
+		this._${prop.name} = __${prop.name};
+     }
+	 
+ #end
+ #if( $prop.alias)
+	/**
+	 * ${prop.xmlEncodedDescription}
+	 * Setter for alias of $prop.name as $prop.alias
+	 * @param $prop.name - new value
+	 */
+	 public void set${prop.upperFirstChar($prop.alias)}( String  __${prop.alias} ){
+		this.${prop.setterName}(__${prop.alias});
+     }
+ #end
+#end 	 
+// Release
+
+    /* (non-Javadoc)
+     * @see org.ajax4jsf.components.taglib.html.HtmlCommandButtonTagBase#release()
+     */
+    public void release()
+    {
+        // TODO Auto-generated method stub
+        super.release();
+#foreach( $prop in $component.properties )
+ #if( !$prop.existintag )
+	    this._${prop.name} = null;
+ #end	 
+#end
+	}
+	
+    /* (non-Javadoc)
+     * @see org.ajax4jsf.components.taglib.html.HtmlCommandButtonTagBase#setProperties(javax.faces.component.UIComponent)
+     */
+    protected void setProperties(UIComponent component)
+    {
+        // TODO Auto-generated method stub
+        super.setProperties(component);
+	
+#foreach( $prop in $component.properties )
+ #if( !$prop.existintag )
+		 #if(!$prop.el)
+			if(isValueReference(this._${prop.name})){
+				throw new IllegalArgumentException("Component ${component.name} with Id " + component.getClientId(getFacesContext() +" not allowed EL expression for property ${prop.name}")
+			}
+		 #end	
+		 #if($prop.name == "action")
+			setActionProperty(component, this._${prop.name});
+		 #elseif($prop.name == "actionListener")
+			setActionListenerProperty(component, this._${prop.name});
+		 #elseif($prop.name == "converter")
+			setConverterProperty(component, this._${prop.name});
+		 #elseif($prop.name == "validator")
+			setValidatorProperty(component, this._${prop.name});
+		 #elseif($prop.name == "valueChangeListener")
+			setValueChangedListenerProperty(component, this._${prop.name});
+		 #elseif($prop.name == "value")
+			setValueProperty(component, this._${prop.name});
+		 #elseif($prop.elOnly || $prop.isInstanceof("javax.faces.el.ValueBinding") )
+			setValueBinding(component, "${prop.name}",this._${prop.name});
+		 #elseif(${prop.simpleType})
+			// Simple type - ${prop.simpleClassName}
+			set${prop.boxingClass}Property(component, "${prop.name}",this._${prop.name}); 
+		 #elseif($prop.classname == "java.lang.Boolean" || $prop.classname == "java.lang.Integer" || $prop.classname == "java.lang.Long")
+			set${prop.simpleClassName}Property(component, "${prop.name}",this._${prop.name}); 
+		 #elseif( $prop.classname == "java.lang.String")
+			setStringProperty(component, "${prop.name}",this._${prop.name});
+		 #elseif( $prop.classname == "java.lang.Object")
+			// TODO - handle object
+			setStringProperty(component, "${prop.name}",this._${prop.name});
+		 #elseif( $prop.isInstanceof("javax.faces.el.MethodBinding") )
+			if(null != this._${prop.name}){
+             if (isValueReference(this._${prop.name}))
+             {
+                MethodBinding mb = getFacesContext().getApplication().createMethodBinding(this._${prop.name},
+                                                                                new Class[]{${prop.methodargs}});
+                ((${component.simpleClassName})component).${prop.setterName}(mb);
+             }
+             else
+             {
+                getFacesContext().getExternalContext().log("Component " + component.getClientId(getFacesContext()) + " has invalid ${prop.name} value: " + this._${prop.name});
+             }
+			}
+		 #else
+			// TODO - setup properties for other cases.
+			// name ${prop.name} with type $prop.classname
+		 #end	
+ #end	 
+#end
+   }
+	
+	/* (non-Javadoc)
+	 * @see javax.faces.webapp.UIComponentTag#getComponentType()
+	 */
+	public String getComponentType() {
+		// TODO Auto-generated method stub
+		return "${component.name}";
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.webapp.UIComponentTag#getRendererType()
+	 */
+	public String getRendererType() {
+		#if($renderer)
+		return "${renderer.name}";
+		#else
+		return null;
+		#end
+	}
+
+}

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/templates12/componenttest.vm
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/templates12/componenttest.vm	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/templates12/componenttest.vm	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,159 @@
+/**
+ * GENERATED FILE - DO NOT EDIT
+ *
+ */
+
+package $package;
+
+#foreach($import in $imports)
+import $import ;
+#end
+
+import com.gargoylesoftware.htmlunit.Page;
+import javax.faces.component.UIForm;
+import javax.faces.component.html.HtmlForm;
+import com.gargoylesoftware.htmlunit.html.HtmlPage;
+import com.gargoylesoftware.htmlunit.html.HtmlElement;
+import javax.faces.context.FacesContext;
+import javax.faces.el.ValueBinding;
+import javax.faces.component.UIViewRoot;
+
+import org.ajax4jsf.tests.MockValueBinding;
+
+//import ${component.classname};
+#if(${generator.key})
+
+import java.io.IOException;
+import javax.faces.FacesException;
+import org.ajax4jsf.framework.util.base64.Codec;
+#end
+
+public class $component.test.simpleClassName extends $component.test.superclassname {
+
+//  public static final String COMPONENT_TYPE = "${component.name}";
+
+
+#set( $fiedCounter = 1 )
+#foreach( $prop in $component.properties )
+ #if( !$prop.exist )
+	 #if($prop.simpleType)
+	 private boolean _${prop.name}Set = false;	
+	 #set( $fiedCounter = $fiedCounter+2)
+	 #else
+	 #set( $fiedCounter = $fiedCounter+1)
+	 #end
+#end	 
+#end
+  
+  private $component.simpleClassName component;
+  private UIForm form;
+//  private FacesContext context;
+
+  /**
+   *  Constructor to init default renderers 
+   */ 
+  public $component.test.simpleClassName (String name){
+  	super(name);
+  }
+
+	/*
+	* setup the tets
+	*/
+	public void setUp() throws Exception {
+		super.setUp();
+		component = new ${component.simpleClassName}();
+		form = new HtmlForm();
+		form.setId("form");
+		facesContext.getViewRoot().getChildren().add(form);
+		
+		component.setId("component");
+#foreach( $prop in $component.properties )
+	#if(!$prop.exist && $prop.name != "value")
+		#if($prop.classname == "java.lang.String")
+		component.${prop.setterName}( " __$prop.name" );	
+		#elseif($prop.classname == "java.lang.Boolean")
+		component.${prop.setterName}( new Boolean(true) );
+		#end
+	 #end
+#end
+		
+		form.getChildren().add(component);
+		
+	}
+
+	/*
+	* setup the tets
+	*/
+	public void tearDown() throws Exception{
+		super.tearDown();
+		component = null;
+		form = null;
+	}
+
+	public void testComponent() throws Exception {
+	  	#if(${component.renderer})
+			assertEquals("${component.renderer.name}", component.getRendererType());
+	  	#end
+/*		
+		HtmlPage renderedView = renderView();
+		assertNotNull(renderedView);
+    	System.out.println(renderedView.getWebResponse().getContentAsString());
+    	HtmlElement element = renderedView.getHtmlElementById(form.getId() + ":" + component.getId());
+    	assertNotNull(element);
+*/    	
+//    	values[0] = component.saveState(facesContext);
+    	
+	}
+/*
+	public void testDefaultValues(){
+		
+	}
+*/
+	public void testContext(){
+		
+		Object state = component.saveState(facesContext);
+/*		
+    	UIViewRoot root = facesContext.getViewRoot();
+    	root.processDecodes(facesContext);
+    	root.processValidators(facesContext);
+    	root.processUpdates(facesContext);
+    	root.processApplication(facesContext);
+*/
+		testRestoreState(state);
+	}
+	
+	public void testGetters() {
+		${component.simpleClassName} component = new ${component.simpleClassName}();
+		
+#foreach( $prop in $component.properties )
+	#if(!$prop.exist && !$prop.elonly && !$prop.classname.startsWith("javax.faces."))
+		component.setValueBinding("${prop.name}", new MockValueBinding($testDataGenerator.getTestVeData(${prop}), ${testDataGenerator.getTestVeClass(${prop})}.class));
+		assertEquals($testDataGenerator.getTestData(${prop}), component.${prop.getterName}());
+		component.${prop.setterName}($testDataGenerator.getTestData1(${prop}) );
+		assertEquals($testDataGenerator.getTestData1(${prop}), component.${prop.getterName}());
+	 #end
+#end
+
+
+	}
+
+	private void testRestoreState(Object state){
+		${component.simpleClassName} restoredComponent = new ${component.simpleClassName}();
+		restoredComponent.restoreState(facesContext, state);
+		
+#foreach( $prop in $component.properties )
+	#if(!$prop.exist)
+		assertEquals(component.${prop.getterName}(), restoredComponent.${prop.getterName}());
+	 #end
+#end
+
+	}
+	
+	private void assertEquals(double d1, double d2) {
+		assertEquals(d1, d2, 0);
+	}
+	
+	private void assertEquals(float d1, float d2) {
+		assertEquals(d1, d2, 0);
+	}
+}
\ No newline at end of file

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/templates12/converter.vm
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/templates12/converter.vm	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/templates12/converter.vm	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,221 @@
+package $package;
+
+#foreach($import in $imports)
+import $import ;
+#end
+
+ import javax.faces.context.FacesContext;
+ import javax.faces.el.ValueBinding;
+import javax.faces.component.StateHolder;
+ 
+ /**
+  * Converter-Id ${converter.id}
+  * ${converter.xmlEncodedDescription}
+  */
+ 
+public class $converter.simpleClassName extends $converter.superclass #if(${converter.stateHolderRequired} && !${converter.superclassImplementsStateHolder})implements StateHolder#end
+ {
+ 
+   public static final String CONVERTER_ID = "${converter.id}";
+
+   
+ 
+ // Conveter properties fields
+
+#set( $fieldCounter = 0 )
+ #foreach( $prop in $converter.properties )
+
+#if( !$prop.exist )
+   /**
+    * $prop.name
+    * ${prop.xmlEncodedDescription}
+    */
+
+#if($prop.simpleType)
+   private $prop.simpleClassName  _$prop.name = ${prop.defaultvalue};		
+   /**
+    * Flag indicated that $prop.name is set.
+    */
+   private boolean _${prop.name}Set = false;	
+#set( $fieldCounter = $fieldCounter+2)
+#else
+   private $prop.simpleClassName  _$prop.name = null; /* Default is ${prop.defaultvalue}*/
+#set( $fieldCounter = $fieldCounter+1)
+ #end
+#end	 
+#end
+ 
+ // Getters and setters
+ #foreach( $prop in $converter.properties )
+
+#if( !$prop.exist )
+   /**
+    * ${prop.xmlEncodedDescription}
+    * Setter for $prop.name
+	*/
+   public void ${prop.setterName}( $prop.simpleClassName  __$prop.name )
+   {
+     this._${prop.name} = __$prop.name;
+
+#if($prop.simpleType)
+ 	this._${prop.name}Set = true;
+
+#end
+   }
+ 
+  /**
+   * ${prop.xmlEncodedDescription}
+   * Getter for $prop.name
+   * @return $prop.name value from local variable or value binding
+   */
+   public $prop.simpleClassName ${prop.getterName}()
+   {
+     ValueBinding vb = getValueBinding("${prop.name}");
+
+#if($prop.simpleType)
+     if(this._${prop.name}Set)
+     {
+ 	  return this._${prop.name};
+
+         return (this._${prop.name});
+       }
+     }
+
+#else
+     if (null != this._${prop.name}) 
+     {
+       return this._${prop.name};
+     }
+
+#if( !$prop.isInstanceof("javax.faces.el.MethodBinding") && !$prop.isInstanceof("javax.faces.el.ValueBinding"))
+     else if (null != vb)
+     {
+       return (${prop.simpleClassName})vb.getValue(getFacesContext());
+     }
+
+#end
+     else
+     {
+       return ${prop.defaultvalue};
+     }
+
+#end
+  }
+ 	#if($prop.raw)
+  /**
+   * ${prop.xmlEncodedDescription}
+   * Raw Setter for $prop.name
+   * @param $prop.name - new value
+   */
+
+   {
+     return this._${prop.name};
+   }
+ #end
+#end	 
+#end
+ 
+#if($converter.stateHolderRequired)
+ 
+  // Save state
+  // ----------------------------------------------------- StateHolder Methods
+
+  private boolean _transient;
+
+#if(${converter.superclassImplementsStateHolder})
+#set($currentField=1)
+#set($fieldCounter = $fieldCounter+1)
+#else
+#set($currentField=0)
+#end
+   public Object saveState(FacesContext context) {
+
+#if(${converter.superSaveStateMethodExists})
+    Object values[] = new Object[${fieldCounter}];
+     values[0] = super.saveState(context);
+#else
+    Object values[] = new Object[${fieldCounter}];
+#end
+#foreach( $prop in $converter.properties )
+#if( !$prop.exist )
+#if($prop.simpleType)		
+     values[${currentField}] = new ${prop.boxingClass}(_$prop.name);
+#set( $currentField = $currentField+1)
+    values[${currentField}] = Boolean.valueOf(_${prop.name}Set);	
+#set( $currentField = $currentField+1)
+#else
+#if(!${prop.attachedstate} )
+     values[${currentField}] = _$prop.name;
+#else
+     values[${currentField}] = saveAttachedState(context, _$prop.name );		
+ #end
+
+#set( $currentField = $currentField+1)
+#end	
+#end	 
+#end
+	return values;
+   }
+    
+
+#if(${converter.superclassImplementsStateHolder})
+#set($currentField=1)
+#else
+#set($currentField=0)
+#end
+   public void restoreState(FacesContext context, Object state) {
+#if(${converter.superRestoreStateMethodExists})
+     Object values[] = (Object[]) state;
+     super.restoreState(context, values[0]);
+#else
+    Object values[] = (Object[]) state;
+#end
+#foreach( $prop in $converter.properties )
+#if( !$prop.exist )
+#if($prop.simpleType)		
+     _$prop.name = ((${prop.boxingClass})values[${currentField}]).${prop.classname}Value();
+#set( $currentField = $currentField+1)
+    _${prop.name}Set = ((Boolean)values[${currentField}]).booleanValue();	
+#set( $currentField = $currentField+1)
+#else
+#if( !${prop.attachedstate} )
+     _$prop.name = (${prop.simpleClassName})values[${currentField}] ;
+#else
+     _$prop.name = (${prop.simpleClassName})restoreAttachedState(context,values[${currentField}] );		
+ #end
+#set( $currentField = $currentField+1)
+#end
+ 	
+#end	 
+#end
+  }
+  
+#if(!$converter.superIsTransientMethodExists)
+  public boolean isTransient()
+  {
+    return _transient;
+  }
+#end
+ 
+#if(!$converter.superSetTransientMethodExists)
+  public void setTransient(boolean newTransientValue)
+  {
+    this._transient = newTransientValue;
+  }
+#end
+
+#end
+	  
+  // Utilites
+
+  private FacesContext getFacesContext()
+  {
+    return FacesContext.getCurrentInstance();
+  }
+  
+  private ValueBinding getValueBinding(String name)
+  {
+    return getFacesContext().getApplication().createValueBinding(name);
+  }
+
+ }

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/templates12/converterTag.vm
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/templates12/converterTag.vm	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/templates12/converterTag.vm	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,95 @@
+/**
+ * GENERATED FILE - DO NOT EDIT
+ *
+ */
+package ${tag.packageName};
+
+#foreach($import in $imports)
+import $import ;
+#end
+import javax.faces.component.UIComponent;
+import javax.faces.convert.Converter;
+import javax.faces.webapp.UIComponentTag;
+import javax.faces.context.FacesContext;
+import javax.faces.el.ValueBinding;
+import org.apache.commons.beanutils.ConvertUtils;
+import javax.servlet.jsp.JspException;
+import ${converter.classname};
+
+public class $tag.simpleClassName extends $tag.superclass 
+{
+
+// Fields
+#foreach( $prop in $converter.properties )
+#if( !$prop.existintag )
+  /*
+   * $prop.name
+   * ${prop.xmlEncodedDescription}
+   */
+  private String  _$prop.name = null;
+
+#end	 
+#end
+// Setters
+#foreach( $prop in $converter.properties )
+#if( !$prop.existintag )
+  /*
+   * $prop.description
+   * Setter for $prop.name
+   * @param $prop.name - new value
+   */
+  public void ${prop.setterName}(String  __${prop.name}) 
+  {
+    this._${prop.name} = __${prop.name};
+  }
+	 
+#end
+#if( $prop.alias)
+  /*
+   * ${prop.xmlEncodedDescription}
+   * Setter for alias of $prop.name as $prop.alias
+   * @param $prop.name - new value
+   */
+  public void set${prop.upperFirstChar($prop.alias)}(String  __${prop.alias}) 
+  {
+    this.${prop.setterName}(__${prop.alias});
+  }
+#end
+#end
+
+  protected Converter createConverter() throws JspException 
+  {
+    ${converter.simpleClassName} converter = new ${converter.simpleClassName}();
+    _setProperties(converter);
+    return converter;
+  }
+
+  // Support method to wire in attributes
+  private void _setProperties(${converter.simpleClassName} converter) throws JspException 
+  {
+    FacesContext facesContext = FacesContext.getCurrentInstance();
+#foreach( $prop in $converter.properties )
+#if( !$prop.existintag )
+    if (_${prop.name} != null) 
+    {
+#if( ${prop.el} )
+      if (UIComponentTag.isValueReference(_${prop.name})) 
+      {
+        ValueBinding vb = facesContext.getApplication().createValueBinding(_${prop.name});
+        converter.${prop.setterName}((${prop.simpleClassName}) vb.getValue(facesContext));
+      }
+#if (!${prop.elonly})
+      else
+      {
+        converter.${prop.setterName}((${prop.simpleClassName}) ConvertUtils.convert(_${prop.name}, ${prop.simpleClassName}.class));
+      }
+#end
+    }
+#else
+    converter.${prop.setterName}((${prop.simpleClassName}) ConvertUtils.convert(_${prop.name}, ${prop.simpleClassName}.class));
+#end
+#end
+#end
+  }
+
+}

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/templates12/facelets.taglib.vm
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/templates12/facelets.taglib.vm	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/templates12/facelets.taglib.vm	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE facelet-taglib PUBLIC
+  "-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN"
+  "http://java.sun.com/dtd/facelet-taglib_1_0.dtd">
+<facelet-taglib xmlns="http://java.sun.com/JSF/Facelet">
+  <namespace>${taglib.uri}</namespace>
+
+${taglib.includeContent}
+
+#foreach( $component in ${components} )
+  #if($component.tag)
+  <tag>
+    <tag-name>${component.tag.name}</tag-name>
+    <component>
+	  <component-type>${component.name}</component-type>
+    #if(${component.renderer})
+	  <renderer-type>${component.renderer.name}</renderer-type>
+    #end
+    #if(${component.taghandler})
+      <handler-class>${component.taghandler.classname}</handler-class>
+    #end
+    </component>
+  </tag>
+  #end
+#end
+
+#foreach( $validator in ${validators})
+#if($validator.tag)
+  <tag>
+    <tag-name>${validator.tag.name}</tag-name>
+    <validator>
+      <validator-id>${validator.id}</validator-id>
+#if(${validator.taghandler})
+      <handler-class>${validator.taghandler.classname}</handler-class>
+#end
+    </validator>
+  </tag>
+#end
+#end
+
+#foreach( $converter in ${converters} )
+#if($converter.tag)
+  <tag>
+    <tag-name>${converter.tag.name}</tag-name>
+    <converter>
+      <converter-id>${converter.id}</converter-id>
+#if(${converter.taghandler})
+      <handler-class>${converter.taghandler.classname}</handler-class>
+#end
+    </converter>
+  </tag>
+#end
+#end
+
+
+#foreach( $listener in ${listeners})
+ <tag>
+  <tag-name>${listener.name}</tag-name>
+#if(${listener.taghandler})
+		    <handler-class>
+				${listener.taghandler.classname}
+			</handler-class>
+#end
+	
+ </tag>
+#end
+
+</facelet-taglib>
\ No newline at end of file

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/templates12/faces-config.vm
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/templates12/faces-config.vm	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/templates12/faces-config.vm	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
+                              "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
+<faces-config>
+	
+${facesConfig.includeContent}
+
+#foreach( $validator in ${validators})
+  <validator>
+	<validator-id>${validator.id}</validator-id>
+	<validator-class>${validator.classname}</validator-class>
+	#if(${validator.description})
+	<description>${validator.description}</description>
+	#end
+	#if(${validator.displayname})
+	<display-name>${validator.displayname}</display-name>
+	#end
+	#if(${validator.icon})
+	<icon>${validator.icon}</icon>
+	#end
+  </validator>
+#end
+
+#foreach( $converter in ${converters})
+  <converter>
+	#if(${converter.id})
+	<converter-id>${converter.id}</converter-id>
+	#end
+	#if(${converter.forclass})
+	<converter-for-class>${converter.forclass}</converter-for-class>
+	#end
+
+	<converter-class>${converter.classname}</converter-class>
+
+	#if(${converter.description})
+	<description>${converter.description}</description>
+	#end
+	#if(${converter.displayname})
+	<display-name>${converter.displayname}</display-name>
+	#end
+	#if(${converter.icon})
+	<icon>${converter.icon}</icon>
+	#end
+  </converter>
+#end
+
+
+
+#foreach( $component in ${components})
+#if( $component.generate )
+  <component>
+  #if(${component.description})  
+	<description>${component.xmlEncodedDescription}</description>
+  #end
+  #if(${component.displayname})  
+	<display-name>${component.xmlEncodedDisplayname}</display-name>
+  #end
+    <component-type>${component.name}</component-type>
+    <component-class>${component.classname}</component-class>
+    
+#foreach( $facet in $component.facets)
+	<facet>
+  #if(${facet.description})  
+	<description>${facet.xmlEncodedDescription}</description>
+  #end
+  #if(${facet.displayname})  
+	<display-name>${facet.xmlEncodedDisplayname}</display-name>
+  #end
+      <facet-name>${facet.name}</facet-name>
+    </facet>
+#end
+	#if(${component.renderer})
+    <component-extension>
+      <component-family>${component.family}</component-family>
+      <renderer-type>${component.renderer.name}</renderer-type>
+    </component-extension>
+    #end
+  </component>
+#end
+#end
+
+#foreach( $renderkit in $facesConfig.renderKits)
+  <render-kit>
+		#if(${renderkit.renderkitid})
+		<render-kit-id>${renderkit.renderkitid}</render-kit-id>
+		#if(${renderkit.renderkitclass})
+		<render-kit-class>${renderkit.renderkitclass}</render-kit-class>
+		#end
+		#end
+#foreach( $component in $components)
+	#if($component.renderer)
+		#set($rendererClass = $renderkit.rendererClass($component.renderer.classname) )
+		#if( $component.renderer.generate || $facesConfig.rendererExists("${rendererClass}"))
+  		<renderer>
+			<component-family>${component.family}</component-family>
+			<renderer-type>
+				${component.renderer.name}
+			</renderer-type>
+			<renderer-class>
+				${rendererClass}
+			</renderer-class>
+		</renderer>
+		#end
+	#end
+#end
+  </render-kit>
+#end
+
+
+</faces-config>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/templates12/listener_taghandler.vm
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/templates12/listener_taghandler.vm	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/templates12/listener_taghandler.vm	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,101 @@
+/**
+ * GENERATED FILE - DO NOT EDIT
+ *
+ */
+
+package ${tag.packageName};
+
+#foreach($import in $imports)
+import $import ;
+#end
+import javax.faces.component.UIComponent;
+import ${listener.componentclass};
+
+import java.io.IOException;
+
+import javax.faces.*;
+import javax.faces.el.*;
+
+import javax.el.*;
+
+import com.sun.facelets.*;
+import com.sun.facelets.el.*;
+import com.sun.facelets.tag.*;
+import com.sun.facelets.tag.jsf.*;
+
+public class $tag.simpleClassName extends TagHandler {
+
+	private Class listenerType;
+
+    private final TagAttribute type;
+
+    private final TagAttribute binding;
+
+	public ${tag.simpleClassName}(TagConfig config) {
+	    super(config);
+		this.binding = this.getAttribute("binding");
+        this.type = this.getAttribute("type");
+        if (type != null) {
+            if (!type.isLiteral()) {
+                throw new TagAttributeException(this.tag, this.type, "Must be literal");
+            }
+            try {
+                this.listenerType = Class.forName(type.getValue());
+            } catch (Exception e) {
+                throw new TagAttributeException(this.tag, this.type, e);
+            }
+        }
+  	}
+
+  	 public void apply(FaceletContext ctx, UIComponent parent)
+            throws IOException, FacesException, FaceletException, ELException {
+        if (parent instanceof $listener.componentclass) {
+            // only process if parent was just created
+            if (parent.getParent() == null) {
+                ${listener.componentclass} src = (${listener.componentclass}) parent;
+                ${listener.listenerclass} listener = null;
+                ValueExpression ve = null;
+                if (this.binding != null) {
+                    ve = this.binding.getValueExpression(ctx,
+                            ${listener.listenerclass}.class);
+                    listener = (${listener.listenerclass}) ve.getValue(ctx);
+                }
+                if (listener == null) {
+                    try {
+                        listener = (${listener.listenerclass}) listenerType.newInstance();
+                    } catch (Exception e) {
+                        throw new TagAttributeException(this.tag, this.type, e.getCause());
+                    }
+                    if (ve != null) {
+                        ve.setValue(ctx, ve);
+                    }
+                }
+				#foreach($prop in $listener.properties)
+				 #if( !$prop.existintag )
+					TagAttribute attribute;
+					#if( $prop.required )
+					attribute = getRequiredAttribute("${prop.name}");
+					#else
+					attribute = getAttribute("${prop.name}");
+					#end
+		            if (attribute != null) {
+						ValueBinding binding;
+		
+						binding = new LegacyValueBinding(
+							attribute.getValueExpression(ctx, 
+							${prop.classname}.class));
+					
+			            listener.${prop.setterName}(binding);
+					}
+				 #end
+				#end
+
+                src.${listener.methodname}(listener);
+            }
+        } else {
+            throw new TagException(this.tag,
+                    "Parent is not of type ${listener.componentclass}, type is: " + parent);
+        }
+    }
+  	
+}

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/templates12/renderer.vm
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/templates12/renderer.vm	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/templates12/renderer.vm	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,25 @@
+/**
+ * GENERATED FILE - DO NOT EDIT
+ *
+ */
+package ${package};
+
+import ${component.classname};
+import ${renderer.superclass};
+
+/**
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/02/26 20:48:49 $
+ *
+ */
+public class ${renderer.simpleClassName} extends ${renderer.superclass} {
+
+   /** 
+	 * @see org.ajax4jsf.framework.renderer.RendererBase#getComponentClass()
+	 */
+	protected Class getComponentClass() {
+		// Expected component class for rendering
+		return ${component.simpleClassName}.class;
+	}
+
+}

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/templates12/resources-config.vm
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/templates12/resources-config.vm	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/templates12/resources-config.vm	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<resource-config>
+<!-- Include manual created resource -->
+${resourcesConfig.includeContent}
+
+#foreach( $key in ${classResources.keySet()})
+	<resource class="${classResources.get($key)}">
+		<name>${key}</name>
+	</resource>
+#end
+
+#foreach( $key in ${pathResources.keySet()})
+	<resource>
+		<name>${key}</name>
+		<path>${pathResources.get($key)}</path>
+	</resource>
+#end
+</resource-config>

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/templates12/taghandler.vm
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/templates12/taghandler.vm	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/templates12/taghandler.vm	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,102 @@
+/**
+ * GENERATED FILE - DO NOT EDIT
+ *
+ */
+
+package ${tag.packageName};
+
+#foreach($import in $imports)
+import $import ;
+#end
+import javax.faces.component.UIComponent;
+import ${component.classname};
+import com.sun.facelets.tag.jsf.ComponentHandler;
+import com.sun.facelets.tag.jsf.ComponentConfig;
+
+import com.sun.facelets.*;
+import com.sun.facelets.el.*;
+import com.sun.facelets.tag.*;
+/**
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/02/26 20:48:51 $
+ *
+ */
+public class $tag.simpleClassName extends $tag.superclass {
+
+
+  private static final ${tag.simpleClassName}MetaRule metaRule = new ${tag.simpleClassName}MetaRule();
+
+
+  
+  public ${tag.simpleClassName}(ComponentConfig config) 
+  {
+    super(config);
+  }
+// Metarule
+  protected MetaRuleset createMetaRuleset(Class type)
+  {
+    MetaRuleset m = super.createMetaRuleset(type);
+	m.addRule(metaRule);
+	return m;
+  }
+
+  	/**
+	 * @author shura (latest modification by $Author: alexsmirnov $)
+	 * @version $Revision: 1.1.2.1 $ $Date: 2007/02/26 20:48:51 $
+	 *
+	 */
+	static class ${tag.simpleClassName}MetaRule extends MetaRule{
+
+		/* (non-Javadoc)
+		 * @see com.sun.facelets.tag.MetaRule#applyRule(java.lang.String, com.sun.facelets.tag.TagAttribute, com.sun.facelets.tag.MetadataTarget)
+		 */
+		public Metadata applyRule(String name, TagAttribute attribute, MetadataTarget meta) {
+	        if (meta.isTargetInstanceOf(${component.simpleClassName}.class)) {
+		#foreach($prop in $component.properties)
+		 #if( !$prop.existintag )
+		  #if( $prop.isInstanceof("javax.faces.el.MethodBinding") )
+	            if ("${prop.name}".equals(name)) {
+	                    return new ${prop.name}Mapper(attribute);
+	            }
+
+		  #end
+		 #end
+		#end
+	        }
+			return null;
+		}
+
+	}
+
+#foreach($prop in $component.properties)
+#if( !$prop.existintag )
+
+  #if( $prop.isInstanceof("javax.faces.el.MethodBinding") )
+	
+	static class ${prop.name}Mapper extends Metadata {
+
+		private static final Class[] SIGNATURE = new Class[] {${prop.methodargs}};
+
+		private final TagAttribute _action;
+		/**
+		 * @param attribute
+		 */
+		public ${prop.name}Mapper(TagAttribute attribute) {
+			_action = attribute;
+		}
+
+		/* (non-Javadoc)
+		 * @see com.sun.facelets.tag.Metadata#applyMetadata(com.sun.facelets.FaceletContext, java.lang.Object)
+		 */
+		public void applyMetadata(FaceletContext ctx, Object instance) {
+            ((${component.simpleClassName}) instance)
+            .${prop.setterName}(new LegacyMethodBinding(this._action
+                    .getMethodExpression(ctx, null,
+                            SIGNATURE)));
+		}
+
+	}
+	#end
+ #end
+ #end
+}

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/templates12/taglib.vm
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/templates12/taglib.vm	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/templates12/taglib.vm	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,135 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
+                        "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
+<taglib>
+ <tlib-version>${taglib.tlibversion}</tlib-version>
+ <jsp-version>${taglib.jspversion}</jsp-version>
+#if(${taglib.shortname})
+ <short-name>${taglib.shortname}</short-name>
+#end
+ <uri>${taglib.uri}</uri>
+#if(${taglib.description})
+ <description>${taglib.description}</description>
+#end
+${taglib.includeContent}
+
+#foreach( $component in ${components})
+	#if($component.tag)
+ <tag>
+  <name>${component.tag.name}</name>
+  <tag-class>${component.tag.classname}</tag-class>
+  <body-content>${component.tag.bodyContent}</body-content>
+  #if(${component.tag.displayname})  
+	<display-name>${component.tag.xmlEncodedDisplayname}</display-name>
+  #elseif(${component.displayname})
+	<display-name>${component.xmlEncodedDisplayname}</display-name>
+  #end
+  #if(${component.tag.description})
+  <description>${component.tag.xmlEncodedDescription}</description>
+  #else
+  <description>${component.xmlEncodedDescription}</description>
+  #end
+  #foreach( $prop in ${component.properties} )
+	#if( !${prop.hidden} && !${prop.disabled} )
+  <attribute>
+   <name>${prop.name}</name>
+   #if(${prop.required})
+	<required>true</required>
+   #end
+   <rtexprvalue>false</rtexprvalue>
+   <description>${prop.xmlEncodedDescription}</description>
+  </attribute>
+	#if( $prop.alias )
+  <attribute>
+   <name>${prop.alias}</name>
+   <rtexprvalue>false</rtexprvalue>
+   <description>Alias for ${prop.name} : ${prop.xmlEncodedDescription}</description>
+  </attribute>
+	#end
+	#end
+  #end
+</tag>
+#end
+#end
+
+#foreach( $validator in ${validators})
+	#if($validator.tag)
+ <tag>
+  <name>${validator.tag.name}</name>
+  <tag-class>${validator.tag.classname}</tag-class>
+  <body-content>${validator.tag.bodyContent}</body-content>
+  #if(${validator.tag.displayname})  
+	<display-name>${validator.tag.xmlEncodedDisplayname}</display-name>
+  #elseif(${validator.displayname})
+	<display-name>${validator.xmlEncodedDisplayname}</display-name>
+  #end
+  #if(${validator.tag.description})
+  <description>${validator.tag.xmlEncodedDescription}</description>
+  #elseif(${validator.xmlEncodedDescription})
+  <description>${validator.xmlEncodedDescription}</description>
+  #end
+  #foreach( $prop in ${validator.properties} )
+	#if( !${prop.hidden} && !${prop.disabled} )
+  <attribute>
+   <name>${prop.name}</name>
+   #if(${prop.required})
+	<required>true</required>
+   #end
+   <rtexprvalue>false</rtexprvalue>
+   <description>${prop.xmlEncodedDescription}</description>
+  </attribute>
+	#if( $prop.alias )
+  <attribute>
+   <name>${prop.alias}</name>
+   <rtexprvalue>false</rtexprvalue>
+   <description>Alias for ${prop.name} : ${prop.xmlEncodedDescription}</description>
+  </attribute>
+	#end
+	#end
+  #end
+</tag>
+#end
+#end
+
+#foreach( $converter in ${converters})
+	#if($converter.tag)
+ <tag>
+  <name>${converter.tag.name}</name>
+  <tag-class>${converter.tag.classname}</tag-class>
+  <body-content>${converter.tag.bodyContent}</body-content>
+  #if(${converter.tag.displayname})  
+	<display-name>${converter.tag.xmlEncodedDisplayname}</display-name>
+  #elseif(${converter.displayname})
+	<display-name>${converter.xmlEncodedDisplayname}</display-name>
+  #end
+  #if(${converter.tag.description})
+  <description>${converter.tag.xmlEncodedDescription}</description>
+  #elseif(${converter.xmlEncodedDescription})
+  <description>${converter.xmlEncodedDescription}</description>
+  #end
+  #foreach( $prop in ${converter.properties} )
+	#if( !${prop.hidden} && !${prop.disabled} )
+  <attribute>
+   <name>${prop.name}</name>
+   #if(${prop.required})
+	<required>true</required>
+   #end
+   <rtexprvalue>false</rtexprvalue>
+   <description>${prop.xmlEncodedDescription}</description>
+  </attribute>
+	#if( $prop.alias )
+  <attribute>
+   <name>${prop.alias}</name>
+   <rtexprvalue>false</rtexprvalue>
+   <description>Alias for ${prop.name} : ${prop.xmlEncodedDescription}</description>
+  </attribute>
+	#end
+	#end
+  #end
+</tag>
+#end
+#end
+
+
+
+</taglib>
\ No newline at end of file

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/templates12/tagtest.vm
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/templates12/tagtest.vm	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/templates12/tagtest.vm	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,173 @@
+/**
+ * GENERATED FILE - DO NOT EDIT
+ *
+ */
+package ${tag.packageName};
+
+#foreach($import in $imports)
+import $import ;
+#end
+import javax.faces.component.UIComponent;
+import javax.faces.webapp.UIComponentTag;
+import ${component.classname};
+import javax.faces.application.Application;
+import javax.faces.el.ValueBinding;
+import javax.servlet.Servlet;
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequestWrapper;
+import javax.servlet.http.HttpSession;
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.JspWriter;
+import javax.servlet.jsp.PageContext;
+import javax.servlet.jsp.el.ExpressionEvaluator;
+import javax.servlet.jsp.el.VariableResolver;
+import javax.servlet.jsp.tagext.Tag;
+import java.io.IOException;
+import java.util.Enumeration;
+
+
+
+/**
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.2 $ $Date: 2007/01/03 21:05:14 $
+ *
+ */
+public class $tag.test.simpleClassName extends $tag.test.superclassname {
+
+
+	private $tag.simpleClassName tag;
+
+  /**
+   *  Constructor to init default renderers 
+   */ 
+  public ${tag.test.simpleClassName} (String name){
+  	super(name);
+  }
+
+
+	public void setUp() throws Exception {
+		super.setUp();
+		tag = new ${tag.simpleClassName}();
+		tag.setParent(new UIComponentTag(){
+
+			public String getComponentType() {
+				// TODO Auto-generated method stub
+				return null;
+			}
+
+			public String getRendererType() {
+				// TODO Auto-generated method stub
+				return null;
+			}
+			
+			public int doStartTag() throws JspException {
+				// TODO Auto-generated method stub
+				return Tag.EVAL_BODY_INCLUDE;
+			}
+			
+			public int doEndTag() throws JspException {
+				// TODO Auto-generated method stub
+				return Tag.EVAL_BODY_INCLUDE;
+			}
+			
+		});
+		
+	}
+
+	public void tearDown() throws Exception {
+		super.tearDown();
+		tag = null;
+	}
+	
+	
+	public void testSetPropertiesUIComponent() {
+		${component.simpleClassName} component = new ${component.simpleClassName}();
+	// create binding		
+		Application application = null;
+		ValueBinding binding = null;
+
+	#foreach( $prop in $tag.properties )
+		#if($prop.el)
+			 application = facesContext.getApplication();
+		     binding = application.createValueBinding(component.getOnclick());
+    		 component.setValueBinding("${prop.name}", binding);
+				#if($prop.classname == "java.lang.String")
+				component.${prop.setterName}( " __$prop.name" );	
+				#elseif($prop.classname == "java.lang.Boolean")
+				component.${prop.setterName}( new Boolean(true) );
+				#end
+		#end
+		//tag.${prop.setterName}("__${prop.name}");
+	#end
+
+		tag.setProperties(component);
+
+/*
+	#foreach( $prop in $component.properties )
+	 #if( !$prop.existintag )
+		 #if(!$prop.el)
+			if(isValueReference(this._${prop.name})){
+				throw new IllegalArgumentException("Component ${component.name} with Id " + component.getClientId(getFacesContext() +" not allowed EL expression for property ${prop.name}")
+			}
+		 #end	
+		 #if($prop.name == "action")
+		 	
+			setActionProperty(component, tag._${prop.name});
+		 #elseif($prop.name == "actionListener")
+			setActionListenerProperty(component, this._${prop.name});
+		 #elseif($prop.name == "converter")
+			setConverterProperty(component, this._${prop.name});
+		 #elseif($prop.name == "validator")
+			setValidatorProperty(component, this._${prop.name});
+		 #elseif($prop.name == "valueChangeListener")
+			setValueChangedListenerProperty(component, this._${prop.name});
+		 #elseif($prop.name == "value")
+			setValueProperty(component, this._${prop.name});
+		 #elseif($prop.elOnly || $prop.isInstanceof("javax.faces.el.ValueBinding") )
+			setValueBinding(component, "${prop.name}",this._${prop.name});
+		 #elseif(${prop.simpleType})
+			// Simple type - ${prop.simpleClassName}
+			set${prop.boxingClass}Property(component, "${prop.name}",this._${prop.name}); 
+		 #elseif($prop.classname == "java.lang.Boolean" || $prop.classname == "java.lang.Integer" || $prop.classname == "java.lang.Long")
+			set${prop.simpleClassName}Property(component, "${prop.name}",this._${prop.name}); 
+		 #elseif( $prop.classname == "java.lang.String")
+			setStringProperty(component, "${prop.name}",this._${prop.name});
+		 #elseif( $prop.classname == "java.lang.Object")
+			// TODO - handle object
+			setStringProperty(component, "${prop.name}",this._${prop.name});
+		 #elseif( $prop.isInstanceof("javax.faces.el.MethodBinding") )
+			if(null != this._${prop.name}){
+             if (isValueReference(this._${prop.name}))
+             {
+                MethodBinding mb = getFacesContext().getApplication().createMethodBinding(this._${prop.name},
+                                                                                new Class[]{${prop.methodargs}});
+                ((${component.simpleClassName})component).${prop.setterName}(mb);
+             }
+             else
+             {
+                getFacesContext().getExternalContext().log("Component " + component.getClientId(getFacesContext()) + " has invalid ${prop.name} value: " + this._${prop.name});
+             }
+			}
+		 #else
+			// TODO - setup properties for other cases.
+			// name ${prop.name} with type $prop.classname
+		 #end	
+	 #end	 
+	#end
+*/	
+	}
+	
+	public void testGetRendererType(){
+		assertNotNull(tag.getRendererType());
+	}
+	
+	public void testGetComponentType(){
+		assertNotNull(tag.getComponentType());
+	}
+	
+	
+}

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/templates12/validator.vm
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/templates12/validator.vm	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/templates12/validator.vm	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,232 @@
+package $package;
+
+#foreach($import in $imports)
+import $import ;
+#end
+
+import javax.faces.context.FacesContext;
+import javax.faces.el.ValueBinding;
+import javax.faces.component.StateHolder;
+
+/**
+ * Validator-Id ${validator.id}
+ * ${validator.xmlEncodedDescription}
+ */
+public class $validator.simpleClassName extends $validator.superclass #if(${validator.stateHolderRequired} && !${validator.superclassImplementsStateHolder})implements StateHolder#end
+{
+
+  public static final String VALIDATOR_ID = "${validator.id}";
+
+  /**
+   *  Default no-args contstructor
+   */ 
+  public $validator.simpleClassName ()
+  {
+  }
+
+// Validator properties fields
+#set( $fieldCounter = 0 )
+#foreach( $prop in $validator.properties )
+#if( !$prop.exist )
+  /**
+   * $prop.name
+   * ${prop.xmlEncodedDescription}
+   */
+#if($prop.simpleType)
+  private $prop.simpleClassName  _$prop.name = ${prop.defaultvalue};		
+  /**
+   * Flag indicated that $prop.name is set.
+   */
+  private boolean _${prop.name}Set = false;	
+#set( $fieldCounter = $fieldCounter+2)
+#else
+  private $prop.simpleClassName  _$prop.name = null; /* Default is ${prop.defaultvalue}*/
+#set( $fieldCounter = $fieldCounter+1)
+#end
+#end	 
+#end
+
+// Getters and setters
+#foreach( $prop in $validator.properties )
+#if( !$prop.exist )
+  /**
+   * ${prop.xmlEncodedDescription}
+   * Setter for $prop.name
+   * @param $prop.name - new value
+   */
+  public void ${prop.setterName}( $prop.simpleClassName  __$prop.name )
+  {
+    this._${prop.name} = __$prop.name;
+#if($prop.simpleType)
+	this._${prop.name}Set = true;
+#end
+  }
+
+  /**
+   * ${prop.xmlEncodedDescription}
+   * Getter for $prop.name
+   * @return $prop.name value from local variable or value binding
+   */
+  public $prop.simpleClassName ${prop.getterName}()
+  {
+    ValueBinding vb = getValueBinding(_${prop.name});
+#if($prop.simpleType)
+    if(this._${prop.name}Set)
+    {
+	  return this._${prop.name};
+    }
+    if (vb != null) 
+    {
+      ${prop.boxingClass} value = (${prop.boxingClass}) vb.getValue(getFacesContext());
+      if (null == value) 
+      {
+        return this._${prop.name};
+      }
+      //return (value.${prop.classname}Value());
+      } else 
+      {
+        return (this._${prop.name});
+      }
+    }
+#else
+    if (null != this._${prop.name}) 
+    {
+      return this._${prop.name};
+    }
+#if( !$prop.isInstanceof("javax.faces.el.MethodBinding") && !$prop.isInstanceof("javax.faces.el.ValueBinding"))
+    else if (null != vb)
+    {
+      return (${prop.simpleClassName})vb.getValue(getFacesContext());
+    }
+#end
+    else
+    {
+      return ${prop.defaultvalue};
+    }
+  }
+#end
+#if($prop.raw)
+  /**
+   * ${prop.xmlEncodedDescription}
+   * Raw Setter for $prop.name
+   * @param $prop.name - new value
+   */
+  public void ${prop.setterName}Raw( $prop.simpleClassName  __$prop.name )
+  {
+    this._${prop.name} = __$prop.name;
+  }
+  /*
+   * ${prop.xmlEncodedDescription}
+   * Raw ( bypadd bindings ) Getter for $prop.name
+   * @return $prop.name value from local variable 
+   */
+  public $prop.simpleClassName ${prop.getterName}Raw()
+  {
+    return this._${prop.name};
+  }
+#end
+#end	 
+#end
+
+
+#if($validator.stateHolderRequired)
+	
+  // Save state
+  // ----------------------------------------------------- StateHolder Methods
+
+  private boolean _transient;
+#if(${validator.superclassImplementsStateHolder})
+#set($currentField=1)
+#set( $fieldCounter = $fieldCounter+1)
+#else
+#set($currentField=0)
+#end
+  public Object saveState(FacesContext context) {
+#if(${validator.superSaveStateMethodExists})
+    Object values[] = new Object[${fieldCounter}];
+    values[0] = super.saveState(context);
+#else
+    Object values[] = new Object[${fieldCounter}];
+#end
+#foreach( $prop in $validator.properties )
+#if( !$prop.exist )
+#if($prop.simpleType)		
+    values[${currentField}] = new ${prop.boxingClass}(_$prop.name);
+#set( $currentField = $currentField+1)
+    values[${currentField}] = Boolean.valueOf(_${prop.name}Set);	
+#set( $currentField = $currentField+1)
+#else
+#if(!${prop.attachedstate} )
+    values[${currentField}] = _$prop.name;
+#else
+    values[${currentField}] = saveAttachedState(context, _$prop.name );		
+#end
+#set( $currentField = $currentField+1)
+#end	
+#end	 
+#end
+    return values;
+  }
+   
+#if(${validator.superclassImplementsStateHolder})
+#set($currentField=1)
+#else
+#set($currentField=0)
+#end
+  public void restoreState(FacesContext context, Object state) {
+#if(${validator.superRestoreStateMethodExists})
+    Object values[] = (Object[]) state;
+    super.restoreState(context, values[0]);
+#else
+    Object values[] = (Object[]) state;
+#end
+#foreach( $prop in $validator.properties )
+#if( !$prop.exist )
+#if($prop.simpleType)		
+    _$prop.name = ((${prop.boxingClass})values[${currentField}]).${prop.classname}Value();
+#set( $currentField = $currentField+1)
+    _${prop.name}Set = ((Boolean)values[${currentField}]).booleanValue();	
+#set( $currentField = $currentField+1)
+#else
+#if( !${prop.attachedstate} )
+    _$prop.name = (${prop.simpleClassName})values[${currentField}] ;
+#else
+    _$prop.name = (${prop.simpleClassName})restoreAttachedState(context,values[${currentField}] );		
+#end
+#set( $currentField = $currentField+1)
+#end
+	
+#end	 
+#end
+  }
+  
+#if(!$validator.superIsTransientMethodExists)
+  public boolean isTransient()
+  {
+    return _transient;
+  }
+#end
+
+#if(!$validator.superSetTransientMethodExists)
+  public void setTransient(boolean newTransientValue)
+  {
+    this._transient = newTransientValue;
+  }
+#end
+
+#end
+	
+
+// Utilites
+
+  private FacesContext getFacesContext()
+  {
+    return FacesContext.getCurrentInstance();
+  }
+  
+  private ValueBinding getValueBinding(String name)
+  {
+    return getFacesContext().getApplication().createValueBinding(name);
+  }
+
+}
\ No newline at end of file

Added: branches/refactor1/cdk/generator/src/main/resources/META-INF/templates12/validatorTag.vm
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/META-INF/templates12/validatorTag.vm	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/META-INF/templates12/validatorTag.vm	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,93 @@
+/**
+ * GENERATED FILE - DO NOT EDIT
+ *
+ */
+package ${tag.packageName};
+
+#foreach($import in $imports)
+import $import ;
+#end
+import javax.faces.component.UIComponent;
+import javax.faces.webapp.UIComponentTag;
+import javax.faces.validator.Validator;
+import org.apache.commons.beanutils.ConvertUtils;
+import javax.faces.context.FacesContext;
+import javax.servlet.jsp.JspException;
+import javax.faces.el.ValueBinding;
+import ${validator.classname};
+
+public class $tag.simpleClassName extends $tag.superclass {
+
+// Fields
+#foreach( $prop in $validator.properties )
+#if( !$prop.existintag )
+  /*
+   * $prop.name
+   * ${prop.xmlEncodedDescription}
+   */
+  private String  _$prop.name = null;
+
+#end	 
+#end
+// Setters
+#foreach( $prop in $validator.properties )
+#if( !$prop.existintag )
+  /*
+   * $prop.description
+   * Setter for $prop.name
+   * @param $prop.name - new value
+   */
+  public void ${prop.setterName}( String  __${prop.name} )
+  {
+	this._${prop.name} = __${prop.name};
+  }
+	 
+#end
+#if( $prop.alias)
+  /* 
+   * ${prop.xmlEncodedDescription}
+   * Setter for alias of $prop.name as $prop.alias
+   * @param $prop.name - new value
+   */
+  public void set${prop.upperFirstChar($prop.alias)}( String  __${prop.alias} )
+  {
+    this.${prop.setterName}(__${prop.alias});
+  }
+#end
+#end
+
+  protected Validator createValidator() throws JspException
+  {
+    ${validator.simpleClassName} validator = new ${validator.simpleClassName}();
+    _setProperties(validator);
+    return validator;
+  }
+
+  // Support method to wire in properties
+  private void _setProperties(${validator.simpleClassName} validator) throws JspException 
+  {
+    FacesContext facesContext = FacesContext.getCurrentInstance();
+#foreach( $prop in $validator.properties )
+#if( !$prop.existintag )
+    if (_${prop.name} != null) 
+    {
+#if( ${prop.el} )
+      if (UIComponentTag.isValueReference(_${prop.name})) 
+      {
+        ValueBinding vb = facesContext.getApplication().createValueBinding(_${prop.name});
+        validator.${prop.setterName}((${prop.simpleClassName}) vb.getValue(facesContext));
+      }
+#if (!${prop.elonly})
+      else
+      {
+        validator.${prop.setterName}((${prop.simpleClassName}) ConvertUtils.convert(_${prop.name}, ${prop.simpleClassName}.class));
+      }
+#end
+    }
+#else
+    validator.${prop.setterName}((${prop.simpleClassName}) ConvertUtils.convert(_${prop.name}, ${prop.simpleClassName}.class));
+#end
+#end
+#end
+  }
+}

Added: branches/refactor1/cdk/generator/src/main/resources/VM_global_library.vm
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/VM_global_library.vm	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/VM_global_library.vm	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,6 @@
+#macro( quietnull $a)
+#if($a)$a#end
+#end
+
+
+

Added: branches/refactor1/cdk/generator/src/main/resources/org/ajax4jsf/builder/ant/velocity.properties
===================================================================
--- branches/refactor1/cdk/generator/src/main/resources/org/ajax4jsf/builder/ant/velocity.properties	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/main/resources/org/ajax4jsf/builder/ant/velocity.properties	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,3 @@
+resource.loader classpath,antfile
+classpath.resource.loader.class org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
+antfile.resource.loader.class org.ajax4jsf.builder.velocity.AntFileResourceLoader

Added: branches/refactor1/cdk/generator/src/site/apt/doc.apt
===================================================================
--- branches/refactor1/cdk/generator/src/site/apt/doc.apt	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/site/apt/doc.apt	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,97 @@
+----------------------------------------------
+   Java Server Faces components generator
+----------------------------------------------
+----------------------------------------------
+----------------------------------------------
+
+Preferable classes names.
+
+  By default, geterator expects the next structure for Java classes :
+  
+    * <\<prefix\>>.component.Abstract<\<Name\>> - the optional abstract superclass for JSF component. To avoid manual
+   writing for EL-enabled getters/setters, saveState/restoreState methods, listener-related methods etc, developer
+   can create abstract class, and generator will create the implementation.
+    
+    * <\<prefix\>>.component.UI<\<Name\>> - Base component class. It can be generated from the abstract superclass, or created by developer.
+    
+    * <\<prefix\>>.component.<\<markup\>>.<\<Markup\>><\<RendererName\>>renderer-specific generated component( where the markup is render-kit specific generation name, such as html | xml | wml ).
+   In addition to the UI Component class, contains Java Bean getter/setter methods for renderer-specific attributes. This class is generated by CDK.
+	
+    * <\<prefix\>>.<\<Name\>> - JSF UI component-type. Can be provided in the configuration or calculated from the component class name.
+	
+    * <\<prefix\>>.<\<Markup\>><\<RendererName\>> - renderer-specific JSF component-type. Can be provided in the configuration or calculated from the renderer name.
+	
+    * <\<prefix\>>.renderkit.<\<RendererName\>>RendererBase - optional Renderer superclass, implements methods from template renderer  used by generated. Created by component developer.
+	
+    * <\<prefix\>>.renderkit.<\<markup\>>.<\<RendererName\>>Renderer - generated renderer.
+	
+    * <\<prefix\>>.<\<RendererName\>>Renderer - JSF renderer-type. Can be provided in the configuration or calculated from the renderer name.
+	
+    * <\<prefix\>>.<\<Markup\>><\<RendererName\>>.xml - template for generating the renderer class. jspx - like syntax is used. Provided by component developer.
+	
+    * <\<prefix\>>.taglib.<\<RendererName\>>Tag - JSP tag class.
+	
+    * <\<prefix\>>.taglib.<\<RendererName\>>TagHandler - facelets tag handler class.
+	
+    * <\<renderername\>> - JSP/facelets tag name.
+	
+   []
+	
+   For components, that uses JSF events :
+	
+    * <\<prefix\>>.event.<\<Event\>>Event - event class. Provided by component developer.
+	
+    * <\<prefix\>>.event.<\<Event\>>Listener - Event listener interface. Can be generated by CDK
+	
+    * process<\<Event\>> - event processing method name in listener interface.
+	
+    * <\<prefix\>>.event.<\<Event\>>Source - Interface for event processing component ( with methos add<\<Event\>>Listener(<\<Event\>>Listener listener ) , remove<\<Event\>>Listener.... )
+	
+    * <\<prefix\>>.event.<\<Event\>>EventWrapper - wrapper class. Uses for binding listener's EL-expression in user's beans.
+	
+    * <\<prefix\>>.taglib.<\<Event\>>ListenerTag - JSP tag class for creating listener instance. Parent tag must creates component implementing Source interface.
+	
+    * <\<prefix\>>.taglib.<\<Event\>>ListenerTagHandler - facelets tag class for create listener instance.
+	
+   []
+	
+   Definitions that are used in this structure ( uppercase symbols means Java names notation, for name "foo" <\<name\>> mean "foo", and <\<Name\>> - "Foo"  ): 
+	
+   [<\<prefix\>>] is a common library name ( for example, base JSF components use <\<javax.faces\>> prefix ). value for prefix get from abstract component package or renderer template path.
+	
+   [<\<name\>>] is a name for base component ( for UIInput component <\<name\>> is "input" ). value for component name generator can got from UI... or Abstract... class name.
+	
+   [<\<markup\>>] is a render-kit generated content name, "html" for HTML/XHTML pages, "wml" for mobile content etc. Must be provided in the render-kit description by ant task or maven POM. By default, "html" is used
+	
+   [<\<rendererName\>>] - name of renderer for concreting a visual component implementation, e.g. "commandButton" , "panelGroup" etc. Generator can take rendererName from a template file name.
+	
+   [<\<event\>>] is a name for Faces Event ( "action" for all ActionSource components like UICommand ). Can be provided in the component configuration, or got from the implemented ...Source interface.
+	
+
+Configuration building rules.
+
+    We have a lot of methods for providing the component configuration. By default, generator will check a source folders and search for
+  classes according to the default layout. As a minimal work, developer can create an abstract component class and renderer template with required structure.
+  For classes, found with defined naming conventions, all other files and classes will be generateed automatically.
+  For additional information and custom names and classes, developer can provide such information directly in Java code by special annotations, or
+  create a special xml configuration file.
+  
+* A sequence for collecting configuration information ( library-wide information provided by ant task or maven-plugin configuration ):
+
+  [[1]] As a first step, generator must read xml components configuration files and build internal structure for generation.
+  
+  [[2]] Generator searches in the all sources folders for Java classes with name like Abstract* or UI*, inherited from javax.faces.component.UIComponent.
+  
+  [[3]] For all components classes, founded on the step 2, but not included in xml config, generator must create default configuration object, with names for generated classes constructed by default layout.
+  
+  [[4]] All classes in configuration must be checked for Java or JavaDoc annotations with additional meta-information, as far as generator use reflection for searching the same information from superclasses and all implemented interfaces.
+  For standard JSF classes and interfaces information provided in generator, for additional libraries developer can create special xml files with description. For components created in generated project, generator will build such files, and they can be used in depended projects.
+  
+  [[5]] For all Renderer templates ( placed in the separated folder ), but not included in the xml config, generator must also create default configuration objects, in the same manner as for components. 
+  
+  [[6]] Creates real Renderer's classes, by templates-compiler part of CDK. Meta information from templates will be used as additional qualification for components config.
+  
+  [[7]] Generates Java classes for components, tags and event-related interfaces.
+  
+  [[8]] creates configuration files ( faces-config.xml , ...tld, ...taglib.xml ).
+  
\ No newline at end of file

Added: branches/refactor1/cdk/generator/src/site/resources/configurationOverview.vsd
===================================================================
(Binary files differ)


Property changes on: branches/refactor1/cdk/generator/src/site/resources/configurationOverview.vsd
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: branches/refactor1/cdk/generator/src/site/resources/images/configOverview.gif
===================================================================
(Binary files differ)


Property changes on: branches/refactor1/cdk/generator/src/site/resources/images/configOverview.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: branches/refactor1/cdk/generator/src/site/resources/images/exadel_logo.jpg
===================================================================
(Binary files differ)


Property changes on: branches/refactor1/cdk/generator/src/site/resources/images/exadel_logo.jpg
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: branches/refactor1/cdk/generator/src/site/site.xml
===================================================================
--- branches/refactor1/cdk/generator/src/site/site.xml	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/site/site.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<project name="JSF Components generator">
+  <bannerLeft>
+    <name>JSF Components generator</name>
+    <src>images/exadel_logo.jpg</src>
+    <href>http://ajax4jsf.org/</href>
+  </bannerLeft>
+  <bannerRight>
+    <src>http://maven.apache.org/images/maven-small.gif</src>
+  </bannerRight>
+  <publishDate position="navigation-bottom" format="MM-dd-yy"/>
+  <version position="left" />
+  <body>
+    <links>
+      <item name="JSF" href="https://javaserverfaces.dev.java.net/" />
+      <item name="Maven 2" href="http://maven.apache.org/maven2/"/>
+    </links>
+
+    <menu name="JSF CDK">
+      <item name="Documentation" href="doc.html"/>
+    </menu>
+    <menu ref="parent"/>
+    <menu ref="reports" />
+
+  </body>
+</project>
\ No newline at end of file

Added: branches/refactor1/cdk/generator/src/test/ant/build.xml
===================================================================
--- branches/refactor1/cdk/generator/src/test/ant/build.xml	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/test/ant/build.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,77 @@
+<?xml version="1.0"?>
+<!-- ====================================================================== 
+     17.01.2006 20:06:20                                                        
+
+     Test    
+     Test of component builder
+                   
+     shura                                                                
+     ====================================================================== -->
+<project name="Test" default="default">
+    <description>
+            Test of component builder
+    </description>
+
+	<property name="project.dir" value="${basedir}/../.."/>
+
+	<property name="project.build.dir" value="${project.dir}/bin"/>
+	
+	<property name="commonLibs" value="${project.dir}/../commonLibs"/>
+
+
+	<path id="taskClassPath">
+		<pathelement location="${project.build.dir}"/>
+		<fileset dir="${project.dir}/lib">
+			<include name="*.jar"/>
+	    </fileset>
+		
+<fileset dir="${commonLibs}" id="commonLibs">
+    <include name="*.jar"/>
+</fileset>
+
+	</path>
+	
+
+    <!-- ================================= 
+          target: default              
+         ================================= -->
+    <target name="default" depends="depends" description="--> Test of component builder">
+    	<taskdef  classpathref="taskClassPath" classname="com.exadel.vcp.builder.ant.JSFGeneratorTask" name="jsfgenerator">
+    	</taskdef>
+        <jsfgenerator configfile="../conf/test.xml" destdir="../generated"   description="Build classes and configs" >
+       		    <configs dir="../conf">
+        			<file name="test2.xml" />
+        		</configs>	
+          	    <classpath >
+          	    	<pathelement path="${project.dir}/lib/jsf-api.jar"/>
+          	    	<pathelement location="${project.build.dir}"/>
+          	    	<pathelement location="${project.dir}/../chameleon-framework/bin"/>
+          	    	<fileset dir="${commonLibs}" id="commonLibs">
+          	    	    <include name="*.jar"/>
+          	    	</fileset>
+        		</classpath>
+        	<components/>
+        	<tags />
+        	<facesconfig include="../conf/faces-config.ent"  facesConfig="../generated/META-INF/faces-config.xml">
+        		 <renderkit renderKitId="HTML_BASIC" />
+        		 <renderkit renderKitId="CHAMELEON" package="test.chameleon.render"/>
+        	</facesconfig>
+        	<taglib shortName="test" uri="http://exadel.com/test" taglib="../generated/META-INF/test.tld">
+        		<include name="test.*"/>
+        	</taglib>
+        	<taglib shortName="other" uri="http://exadel.com/other" taglib="../generated/META-INF/other.tld">
+        		<exclude name="test.*"/>
+        	</taglib>
+        	<renderers />
+        	<renderers package="test.chameleon.render" />
+    	</jsfgenerator>
+    </target>
+
+    <!-- - - - - - - - - - - - - - - - - - 
+          target: depends                      
+         - - - - - - - - - - - - - - - - - -->
+    <target name="depends">
+    </target>
+
+</project>
+

Added: branches/refactor1/cdk/generator/src/test/config/faces-config.ent
===================================================================
--- branches/refactor1/cdk/generator/src/test/config/faces-config.ent	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/test/config/faces-config.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,10 @@
+	<factory>
+		<render-kit-factory>com.exadel.vcp.framework.renderer.ChameleonRenderKitFactory</render-kit-factory>
+	</factory>
+	<application>
+		<variable-resolver>com.exadel.vcp.framework.skin.SkinVariableResolver</variable-resolver>
+		<property-resolver>com.exadel.vcp.framework.skin.SkinPropertyResolver</property-resolver>
+	</application>
+  <lifecycle>
+  	<phase-listener>com.exadel.vcp.framework.renderer.BeforeRenderListener</phase-listener>
+  </lifecycle>

Added: branches/refactor1/cdk/generator/src/test/config/html_universal_attributes.xml
===================================================================
--- branches/refactor1/cdk/generator/src/test/config/html_universal_attributes.xml	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/test/config/html_universal_attributes.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,52 @@
+<!-- HTML 4.0 universal propertys -->
+
+<property>
+
+    <name>dir</name>
+
+      <classname>java.lang.String</classname>
+
+    <description>HTML: The direction of text display, either 'ltr' (left-to-right) or 'rtl' (right-to-left).</description>
+
+</property>
+
+<property>
+
+    <name>lang</name>
+
+      <classname>java.lang.String</classname>
+
+    <description>HTML: The base language of this document.</description>
+
+</property>
+
+<property>
+
+    <name>style</name>
+
+    <classname>java.lang.String</classname>
+
+    <description>HTML: CSS styling instructions.</description>
+
+</property>
+
+<property>
+
+    <name>title</name>
+
+      <classname>java.lang.String</classname>
+
+    <description>HTML: An advisory title for this element.  Often used by the user agent as a tooltip.</description>
+
+</property>
+
+<property>
+
+    <name>styleClass</name>
+
+      <classname>java.lang.String</classname>
+
+    <description>The CSS class for this element.  Corresponds to the HTML 'class' property.</description>
+
+</property>
+

Added: branches/refactor1/cdk/generator/src/test/config/test.xml
===================================================================
--- branches/refactor1/cdk/generator/src/test/config/test.xml	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/test/config/test.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE components 
+	PUBLIC "-//AJAX4JSF//CDK Generator config/EN" 
+	"https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" [
+<!ENTITY universal_html_attributes   SYSTEM "html_universal_attributes.xml">	
+]>
+
+<components>
+  <component>
+    <name>test.Test</name>
+    <description>Test of component generator</description>
+    <displayname>Generated Command</displayname>
+    <icon>icon</icon>
+    <facet>
+       <name>testfacet</name>
+       <displayname> Test of component facet </displayname>
+    </facet>
+    <superclass>javax.faces.component.UICommand</superclass>
+    <classname>test.UITest</classname>
+    <renderer generate="true" override="true" >
+      <name>test.TestRenderer</name>
+      <classname>test.TestRenderer</classname>
+      <!-- 
+      <superclass>javax.faces.renderer.Renderer</superclass>
+       -->
+      <description>test renderer description</description>
+      <displayname>renderer displayname</displayname>
+      <icon>icon</icon>
+    </renderer>
+    <tag>
+      <name>test</name>
+      <classname>test.tags.TestTag</classname>
+      <superclass>com.exadel.vcp.framework.taglib.HtmlComponentTagBase</superclass>
+      <description>test tag description</description>
+      <displayname>tag displayname</displayname>
+      <icon>icon</icon>
+    	
+    </tag>
+    &html_attributes;
+    <property>
+      <name>mainProperty</name>
+      <classname>java.lang.String</classname>
+      <description>main description</description>
+    </property>
+    <property>
+      <name>superValue</name>
+      <classname>long</classname>
+      <description>main description</description>
+    </property>
+    <property>
+      <name>abstractProperty</name>
+      <classname>java.lang.Integer</classname>
+      <description>abstract  description</description>
+    </property>
+    <property>
+      <name>abstractProperty</name>
+       <classname>javax.faces.el.MethodBinding</classname>
+      <description>Method binded property description</description>
+      <methodargs>javax.faces.component.UIComponent.class</methodargs>
+    </property>
+  </component>
+</components>

Added: branches/refactor1/cdk/generator/src/test/config/test2.xml
===================================================================
--- branches/refactor1/cdk/generator/src/test/config/test2.xml	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/test/config/test2.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE components 
+	PUBLIC "-//AJAX4JSF//CDK Generator config/EN" 
+	"https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" [
+<!ENTITY universal_html_attributes   SYSTEM "html_universal_attributes.xml">	
+]>
+
+<components>
+  <component>
+    <name>other.Test</name>
+    <family>javax.faces.Input</family>
+    <description>Test of component generator</description>
+    <displayname>Generated Command</displayname>
+    <icon>icon</icon>
+    <facet>
+       <name>testfacet</name>
+       <displayname> Test of component facet </displayname>
+    </facet>
+    <superclass>javax.faces.component.UIInput</superclass>
+    <classname>test.other.UITest</classname>
+    <renderer generate="true" override="true" >
+      <name>other.TestRenderer</name>
+      <classname>test.other.TestRenderer</classname>
+      <!-- 
+      <superclass>javax.faces.renderer.Renderer</superclass>
+       -->
+      <description>test renderer description</description>
+      <displayname>renderer displayname</displayname>
+      <icon>icon</icon>
+    </renderer>
+    <tag>
+      <name>test</name>
+      <classname>test.other.tags.TestTag</classname>
+      <superclass>com.exadel.vcp.framework.taglib.HtmlComponentTagBase</superclass>
+      <description>test tag description</description>
+      <displayname>tag displayname</displayname>
+      <icon>icon</icon>
+    	
+    </tag>
+    &html_attributes;
+    <property>
+      <name>mainProperty</name>
+      <classname>java.lang.String</classname>
+      <description>main description</description>
+    </property>
+    <property>
+      <name>superValue</name>
+      <classname>long</classname>
+      <description>main description</description>
+    </property>
+    <property>
+      <name>abstractProperty</name>
+      <classname>java.lang.Integer</classname>
+      <description>abstract  description</description>
+    </property>
+    <property>
+      <name>abstractProperty</name>
+       <classname>javax.faces.el.MethodBinding</classname>
+      <description>Method binded property description</description>
+      <methodargs>javax.faces.component.UIComponent.class</methodargs>
+    </property>
+  </component>
+</components>

Added: branches/refactor1/cdk/generator/src/test/java/org/ajax4jsf/builder/generator/AbstractClass.java
===================================================================
--- branches/refactor1/cdk/generator/src/test/java/org/ajax4jsf/builder/generator/AbstractClass.java	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/test/java/org/ajax4jsf/builder/generator/AbstractClass.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,27 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.builder.generator;
+
+
+
+public abstract class AbstractClass extends BaseClass {
+}

Added: branches/refactor1/cdk/generator/src/test/java/org/ajax4jsf/builder/generator/AbstractClassStubBuilderTest.java
===================================================================
--- branches/refactor1/cdk/generator/src/test/java/org/ajax4jsf/builder/generator/AbstractClassStubBuilderTest.java	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/test/java/org/ajax4jsf/builder/generator/AbstractClassStubBuilderTest.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,58 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.builder.generator;
+
+import java.lang.reflect.Method;
+
+import net.sf.cglib.proxy.MethodInterceptor;
+import net.sf.cglib.proxy.MethodProxy;
+import junit.framework.TestCase;
+
+/**
+ * @author Nick - mailto:nbelaevski at exadel.com
+ * created 20.04.2007
+ * 
+ */
+public class AbstractClassStubBuilderTest extends TestCase {
+	public void testLoader() throws Exception {
+		BaseInterface newInstance = AbstractClassStubBuilder.buildStub(AbstractClass.class, new Proxy(), null);
+		assertEquals(0, newInstance.test(), 0);
+		assertEquals(0, newInstance.test1(), 0);
+		assertEquals(0, newInstance.test2());
+		assertEquals(0, newInstance.test3());
+		assertEquals(0, newInstance.test4(), 0);
+		assertEquals(0, newInstance.test5());
+		assertEquals(null, newInstance.test6());
+		newInstance.test7();
+		assertEquals(false, newInstance.test8());
+		assertEquals(0, newInstance.test9());
+	}
+
+	public static class Proxy implements MethodInterceptor {
+
+		public Object intercept(Object instance, Method method, Object[] arguments,
+				MethodProxy methodProxy) throws Throwable {
+			return methodProxy.invokeSuper(instance, arguments);
+		}
+		
+	}
+}

Added: branches/refactor1/cdk/generator/src/test/java/org/ajax4jsf/builder/generator/BaseClass.java
===================================================================
--- branches/refactor1/cdk/generator/src/test/java/org/ajax4jsf/builder/generator/BaseClass.java	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/test/java/org/ajax4jsf/builder/generator/BaseClass.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,67 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.builder.generator;
+
+
+
+public abstract class BaseClass implements BaseInterface {
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.builder.generator.BaseInterface#test()
+	 */
+	public abstract float test();
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.builder.generator.BaseInterface#test1()
+	 */
+	public abstract double test1();
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.builder.generator.BaseInterface#test2()
+	 */
+	public abstract short test2();
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.builder.generator.BaseInterface#test3()
+	 */
+	public abstract long test3();
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.builder.generator.BaseInterface#test4()
+	 */
+	public abstract float test4();
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.builder.generator.BaseInterface#test5()
+	 */
+	public abstract int test5();
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.builder.generator.BaseInterface#test6()
+	 */
+	public abstract String test6();
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.builder.generator.BaseInterface#test7()
+	 */
+	public abstract void test7();
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.builder.generator.BaseInterface#test8()
+	 */
+	public abstract boolean test8();
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.builder.generator.BaseInterface#test9()
+	 */
+	public abstract char test9();
+}
\ No newline at end of file

Added: branches/refactor1/cdk/generator/src/test/java/org/ajax4jsf/builder/generator/BaseInterface.java
===================================================================
--- branches/refactor1/cdk/generator/src/test/java/org/ajax4jsf/builder/generator/BaseInterface.java	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/test/java/org/ajax4jsf/builder/generator/BaseInterface.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,46 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.builder.generator;
+
+public interface BaseInterface {
+
+	public abstract float test();
+
+	public abstract double test1();
+
+	public abstract short test2();
+
+	public abstract long test3();
+
+	public abstract float test4();
+
+	public abstract int test5();
+
+	public abstract String test6();
+
+	public abstract void test7();
+
+	public abstract boolean test8();
+
+	public abstract char test9();
+
+}
\ No newline at end of file

Added: branches/refactor1/cdk/generator/src/test/java/org/ajax4jsf/builder/generator/ClassPatternSetTest.java
===================================================================
--- branches/refactor1/cdk/generator/src/test/java/org/ajax4jsf/builder/generator/ClassPatternSetTest.java	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/test/java/org/ajax4jsf/builder/generator/ClassPatternSetTest.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,157 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.builder.generator;
+
+import junit.framework.TestCase;
+
+/**
+ * @author shura
+ *
+ */
+public class ClassPatternSetTest extends TestCase {
+	
+	
+	protected ClassPatternSet patterns;
+
+	/**
+	 * @param name
+	 */
+	public ClassPatternSetTest(String name) {
+		super(name);
+	}
+
+	/* (non-Javadoc)
+	 * @see junit.framework.TestCase#setUp()
+	 */
+	protected void setUp() throws Exception {
+		super.setUp();
+		patterns = new ClassPatternSet();
+	}
+
+	/* (non-Javadoc)
+	 * @see junit.framework.TestCase#tearDown()
+	 */
+	protected void tearDown() throws Exception {
+		super.tearDown();
+		patterns = null;
+	}
+
+	/**
+	 * Test method for {@link org.ajax4jsf.builder.generator.ClassPatternSet#setExcludes(java.lang.String)}.
+	 */
+	public void testSetExcludes() {
+		patterns.setExcludes("a");
+		String[] excludePatterns = patterns.getExcludePatterns();
+		assertEquals(1, excludePatterns.length);
+		assertEquals("a", excludePatterns[0]);
+	}
+
+	/**
+	 * Test method for {@link org.ajax4jsf.builder.generator.ClassPatternSet#setExcludes(java.lang.String)}.
+	 */
+	public void testSetExcludes1() {
+		patterns.setExcludes("a,b");
+		String[] excludePatterns = patterns.getExcludePatterns();
+		assertEquals(2, excludePatterns.length);
+		assertEquals("a", excludePatterns[0]);
+		assertEquals("b", excludePatterns[1]);
+	}
+
+	/**
+	 * Test method for {@link org.ajax4jsf.builder.generator.ClassPatternSet#setIncludes(java.lang.String)}.
+	 */
+	public void testSetIncludes() {
+		patterns.setIncludes("a");
+		String[] includePatterns = patterns.getIncludePatterns();
+		assertEquals(1, includePatterns.length);
+		assertEquals("a", includePatterns[0]);
+	}
+
+	/**
+	 * Test method for {@link org.ajax4jsf.builder.generator.ClassPatternSet#matchClass(java.lang.String)}.
+	 */
+	public void testMatchClassExclude() {
+		patterns.setExcludes("**.Abst*,b.**");
+		assertTrue(patterns.matchClass("a.b.UIComp"));
+		assertFalse(patterns.matchClass("b.a.UIComp"));
+		assertFalse(patterns.matchClass("a.b.AbstractUIComp"));
+	}
+
+	/**
+	 * Test method for {@link org.ajax4jsf.builder.generator.ClassPatternSet#matchClass(java.lang.String)}.
+	 */
+	public void testMatchClassInclude() {
+		patterns.setIncludes("**.UI*,a.**");
+		assertTrue(patterns.matchClass("a.b.UIComp"));
+		assertTrue(patterns.matchClass("b.a.UIComp"));
+		assertFalse(patterns.matchClass("b.a.AbstractUIComp"));
+	}
+	
+	/**
+	 * Test method for {@link org.ajax4jsf.builder.generator.ClassPatternSet#matchClass(java.lang.String)}.
+	 */
+	public void testMatchClassIncExclude() {
+		patterns.setExcludes("**.Abst*,b.**");
+		patterns.setIncludes("**.UI*,a.**");
+		assertTrue(patterns.matchClass("a.b.UIComp"));
+		assertFalse(patterns.matchClass("b.a.UIComp"));
+		assertFalse(patterns.matchClass("a.b.AbstractUIComp"));
+	}
+	
+	/**
+	 * Test method for {@link org.ajax4jsf.builder.generator.ClassPatternSet#matchPath(java.lang.String, java.lang.String)}.
+	 */
+	public void testMatchPath() {
+		assertTrue(patterns.matchPath("**.D", "a.b.D"));
+		assertTrue(patterns.matchPath("**.D?", "a.b.Da"));
+		assertTrue(patterns.matchPath("**.D*", "a.b.Def"));
+		assertTrue(patterns.matchPath("a.**.UI*", "a.b.UIComp"));
+	}
+
+	/**
+	 * Test method for {@link org.ajax4jsf.builder.generator.ClassPatternSet#match(java.lang.String, java.lang.String)}.
+	 */
+	public void testMatch() {
+		assertTrue(patterns.match("a", "a"));
+		assertTrue(patterns.match("*", "a"));
+		assertTrue(patterns.match("?", "a"));
+		assertTrue(patterns.match("*a", "a"));
+		assertTrue(patterns.match("*a", "ba"));
+		assertTrue(patterns.match("*a", "cba"));
+		assertTrue(patterns.match("a*a", "aba"));
+		assertTrue(patterns.match("a*", "abc"));
+		assertTrue(patterns.match("?a", "ba"));
+		// Not match
+		assertFalse(patterns.match("?", "ab"));
+		assertFalse(patterns.match("b?", "ab"));
+		assertFalse(patterns.match("b*", "ab"));
+	}
+
+	/**
+	 * Test method for {@link org.ajax4jsf.builder.generator.ClassPatternSet#tokenizePathAsArray(java.lang.String)}.
+	 */
+	public void testTokenizePathAsArray() {
+		String[] strings = patterns.tokenizePathAsArray("a.b.c");
+		assertEquals(3, strings.length);
+	}
+
+}

Added: branches/refactor1/cdk/generator/src/test/java/org/ajax4jsf/builder/xml/XMLBodyTest.java
===================================================================
--- branches/refactor1/cdk/generator/src/test/java/org/ajax4jsf/builder/xml/XMLBodyTest.java	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/test/java/org/ajax4jsf/builder/xml/XMLBodyTest.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,188 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.builder.xml;
+
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+import java.util.HashSet;
+
+import javax.xml.xpath.XPathExpressionException;
+
+import org.ajax4jsf.builder.config.ParsingException;
+
+import junit.framework.TestCase;
+
+/**
+ * @author shura
+ * 
+ */
+public class XMLBodyTest extends TestCase {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see junit.framework.TestCase#setUp()
+	 */
+	protected void setUp() throws Exception {
+		super.setUp();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see junit.framework.TestCase#tearDown()
+	 */
+	protected void tearDown() throws Exception {
+		super.tearDown();
+	}
+
+	/**
+	 * Test method for
+	 * {@link org.ajax4jsf.builder.xml.XMLBody#loadXML(java.io.InputStream)}.
+	 * 
+	 * @throws ParsingException
+	 */
+	public void testLoadXML() throws ParsingException {
+		String xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+				+ "<!DOCTYPE faces-config PUBLIC \"-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN\"\n"
+				+ "                              \"http://java.sun.com/dtd/web-facesconfig_1_1.dtd\">\n"
+				+ "<faces-config>\n"
+				+ "	<component>\n"
+				+ "		<component-type>org.ajax4jsf.ajax.Test</component-type>\n"
+				+ "		<component-class>org.ajax4jsf.ajax.html.Test</component-class>\n"
+				+ "\n" + "		<component-extension>\n"
+				+ "			<component-family>org.ajax4jsf.Test</component-family>\n"
+				+ "			<renderer-type>org.ajax4jsf.Test</renderer-type>\n"
+				+ "		</component-extension>\n" + "	</component>\n"
+				+ "</faces-config>";
+		InputStream in = new ByteArrayInputStream(xml.getBytes());
+		XMLBody body = new XMLBody();
+		body.loadXML(in);
+	}
+
+	/**
+	 * Test method for
+	 * {@link org.ajax4jsf.builder.xml.XMLBody#isRootName(java.lang.String)}.
+	 * 
+	 * @throws ParsingException
+	 */
+	public void testIsRootName() throws ParsingException {
+		String xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+				+ "<!DOCTYPE faces-config PUBLIC \"-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN\"\n"
+				+ "                              \"http://java.sun.com/dtd/web-facesconfig_1_1.dtd\">\n"
+				+ "<faces-config>\n" + "	<component>\n" + "	</component>\n"
+				+ "</faces-config>";
+		InputStream in = new ByteArrayInputStream(xml.getBytes());
+		XMLBody body = new XMLBody();
+		body.loadXML(in);
+		assertTrue(body.isRootName("faces-config"));
+		assertEquals("faces-config", body.getDoctype());
+	}
+
+	/**
+	 * Test method for {@link org.ajax4jsf.builder.xml.XMLBody#getDoctype()}.
+	 * 
+	 * @throws ParsingException
+	 */
+	public void testGetDoctype() throws ParsingException {
+		String xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+				+ "<!DOCTYPE faces-config PUBLIC \"-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN\"\n"
+				+ "                              \"http://java.sun.com/dtd/web-facesconfig_1_1.dtd\">\n"
+				+ "<faces-config>\n" + "	<component>\n" + "	</component>\n"
+				+ "</faces-config>";
+		InputStream in = new ByteArrayInputStream(xml.getBytes());
+		XMLBody body = new XMLBody();
+		body.loadXML(in);
+		assertEquals(
+				"-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN",
+				body.getPiblicId());
+	}
+
+	/**
+	 * Test method for
+	 * {@link org.ajax4jsf.builder.xml.XMLBody#getRootNameSpace()}.
+	 * 
+	 * @throws ParsingException
+	 */
+	public void testGetRootNameSpace() throws ParsingException {
+		String xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+				+ "<project  xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n"
+				+ "  <modelVersion>4.0.0</modelVersion>\n" + "</project>";
+		InputStream in = new ByteArrayInputStream(xml.getBytes());
+		XMLBody body = new XMLBody();
+		body.loadXML(in);
+		assertNull( body.getRootTypeName());
+	}
+
+	/**
+	 * Test method for {@link org.ajax4jsf.builder.xml.XMLBody#getContent()}.
+	 * 
+	 * @throws ParsingException
+	 */
+	public void testGetContent() throws ParsingException {
+		String xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+				+ "<project  xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">"
+				+ "<modelVersion>4.0.0</modelVersion></project>";
+		InputStream in = new ByteArrayInputStream(xml.getBytes());
+		XMLBody body = new XMLBody();
+		body.loadXML(in);
+		assertEquals("<modelVersion>4.0.0</modelVersion>", body.getContent());
+	}
+
+	public void testGetContentXpath() throws ParsingException {
+		String xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+				+ "<!DOCTYPE faces-config PUBLIC \"-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN\"\n"
+				+ "                              \"http://java.sun.com/dtd/web-facesconfig_1_1.dtd\">\n"
+				+ "<faces-config>\n" + "	<component>blabla</component>\n"
+				+ "</faces-config>";
+		InputStream in = new ByteArrayInputStream(xml.getBytes());
+		XMLBody body = new XMLBody();
+		body.loadXML(in);
+		try {
+			assertEquals(
+					"<component>blabla</component>",
+					body.getContent("/faces-config/component"));
+		} catch (ParsingException e) {
+			e.printStackTrace();
+			assertTrue(e.getMessage(),false);
+		}
+	}
+
+	public void testGetContentUnique() throws ParsingException {
+		String xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+				+ "<!DOCTYPE faces-config PUBLIC \"-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN\"\n"
+				+ "                              \"http://java.sun.com/dtd/web-facesconfig_1_1.dtd\">\n"
+				+ "<faces-config>\n" + "	<component><test>blabla</test></component><component><test>blabla</test></component><component><test>blabla2</test></component>\n"
+				+ "</faces-config>";
+		InputStream in = new ByteArrayInputStream(xml.getBytes());
+		XMLBody body = new XMLBody();
+		body.loadXML(in);
+		try {
+			assertEquals(
+					"<component><test>blabla</test></component><component><test>blabla2</test></component>",
+					body.getContentUnique("/faces-config/component", "test/text()", new HashSet<String>()));
+		} catch (ParsingException e) {
+			e.printStackTrace();
+			assertTrue(e.getMessage(),false);
+		}
+	}
+}

Added: branches/refactor1/cdk/generator/src/test/java/test/TestComponent.java
===================================================================
--- branches/refactor1/cdk/generator/src/test/java/test/TestComponent.java	                        (rev 0)
+++ branches/refactor1/cdk/generator/src/test/java/test/TestComponent.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,51 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package test;
+
+
+
+import javax.faces.component.UIInput;
+
+
+
+/**
+
+ * @author shura (latest modification by $Author: ishabalov $)
+
+ * @version $Revision: 1.1.2.2 $ $Date: 2007/02/20 20:58:03 $
+
+ *
+
+ */
+
+public abstract class TestComponent extends UIInput {
+
+
+
+	public abstract String getMyProperty();
+
+	
+
+	public abstract void setMyProperty(String myProperty);
+
+}
+

Added: branches/refactor1/cdk/maven-archetype-jsf-component/.svnignore
===================================================================
--- branches/refactor1/cdk/maven-archetype-jsf-component/.svnignore	                        (rev 0)
+++ branches/refactor1/cdk/maven-archetype-jsf-component/.svnignore	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1 @@
+target

Added: branches/refactor1/cdk/maven-archetype-jsf-component/pom.xml
===================================================================
--- branches/refactor1/cdk/maven-archetype-jsf-component/pom.xml	                        (rev 0)
+++ branches/refactor1/cdk/maven-archetype-jsf-component/pom.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,11 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <parent>
+    <artifactId>cdk</artifactId>
+    <groupId>org.ajax4jsf</groupId>
+    <version>1.1.2-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.ajax4jsf.cdk</groupId>
+  <artifactId>maven-archetype-jsf-component</artifactId>
+  <name>Archetype - maven-archetype-jsf-component</name>
+</project>
\ No newline at end of file

Added: branches/refactor1/cdk/maven-archetype-jsf-component/src/main/resources/META-INF/maven/archetype.xml
===================================================================
--- branches/refactor1/cdk/maven-archetype-jsf-component/src/main/resources/META-INF/maven/archetype.xml	                        (rev 0)
+++ branches/refactor1/cdk/maven-archetype-jsf-component/src/main/resources/META-INF/maven/archetype.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,18 @@
+<archetype>
+  <id>maven-archetype-jsf-component</id>
+  <sources><!--
+    <source>src/main/java/component/_CompName.java</source>
+  -->
+    <source>src/main/java/component/README</source>
+  </sources>
+  <testSources>
+    <source>src/test/java/component/JSFComponentTest.java</source>
+  </testSources>
+  <resources><!--
+    <resource>src/main/config/component/_compName.xml</resource>
+    <resource>src/main/templates/_compName.jspx</resource>
+  -->
+    <resource>src/main/config/component/README</resource>
+    <resource>src/main/templates/README</resource>
+  </resources>
+</archetype>

Added: branches/refactor1/cdk/maven-archetype-jsf-component/src/main/resources/archetype-resources/pom.xml
===================================================================
--- branches/refactor1/cdk/maven-archetype-jsf-component/src/main/resources/archetype-resources/pom.xml	                        (rev 0)
+++ branches/refactor1/cdk/maven-archetype-jsf-component/src/main/resources/archetype-resources/pom.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,32 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>${groupId}</groupId>
+  <artifactId>${artifactId}</artifactId>
+  <name>${artifactId}</name>
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.ajax4jsf.cdk</groupId>
+				<artifactId>maven-cdk-plugin</artifactId>
+				  <version>1.1.1-SNAPSHOT</version>
+				<configuration>
+					<library>
+					<prefix>${groupId}</prefix>
+					<taglib>
+						<shortName>${artifactId}</shortName>
+					</taglib>
+					</library>
+				</configuration>
+				<executions>
+					<execution>
+						<phase>generate-sources</phase>
+						<goals>
+							<goal>generate</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
+		</plugins>
+	</build>
+</project>

Added: branches/refactor1/cdk/maven-archetype-jsf-component/src/main/resources/archetype-resources/src/main/config/component/README
===================================================================

Added: branches/refactor1/cdk/maven-archetype-jsf-component/src/main/resources/archetype-resources/src/main/config/component/_compName.xml
===================================================================
--- branches/refactor1/cdk/maven-archetype-jsf-component/src/main/resources/archetype-resources/src/main/config/component/_compName.xml	                        (rev 0)
+++ branches/refactor1/cdk/maven-archetype-jsf-component/src/main/resources/archetype-resources/src/main/config/component/_compName.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN"  "https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" >
+<!-- 
+<!DOCTYPE components PUBLIC "-//EXADEL//Generator config/EN"  "http://exadel.com/dtds/component-config.dtd" >
+ -->
+<components>
+	<component>
+		<name>${groupId}.${artifactId}</name>
+		<family>${groupId}.${artifactId}</family>
+		<classname>${groupId}.component.html.Html${artifactId}</classname>
+		<superclass>${groupId}.component.UI${artifactId}</superclass>
+		<description>
+			<![CDATA[
+    ]]>
+		</description>
+		<renderer generate="true" override="true">
+			<name>${groupId}.${artifactId}Renderer</name>
+			<template>${artifactId}.jspx</template>
+		</renderer>
+		<tag>
+			<name>${artifactId}</name>
+			<classname>${groupId}.taglib.${artifactId}Tag</classname>
+			<superclass>
+				org.ajax4jsf.framework.taglib.HtmlComponentTagBase
+			</superclass>
+		</tag>
+		<!--
+		<taghandler>
+			<classname>org.ajax4jsf.tag.TestHandler</classname>
+		</taghandler>
+		-->
+		&ui_component_attributes;
+		<!--
+		<property>
+			<name>param</name>
+			<classname>java.lang.String</classname>
+			<description>
+			</description>
+			<defaultvalue>"default"</defaultvalue>
+		</property>
+        -->
+	</component>
+</components>

Added: branches/refactor1/cdk/maven-archetype-jsf-component/src/main/resources/archetype-resources/src/main/java/component/README
===================================================================

Added: branches/refactor1/cdk/maven-archetype-jsf-component/src/main/resources/archetype-resources/src/main/java/component/_CompName.java
===================================================================
--- branches/refactor1/cdk/maven-archetype-jsf-component/src/main/resources/archetype-resources/src/main/java/component/_CompName.java	                        (rev 0)
+++ branches/refactor1/cdk/maven-archetype-jsf-component/src/main/resources/archetype-resources/src/main/java/component/_CompName.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,32 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package ${groupId}.component;
+
+import javax.faces.component.UIComponentBase;
+
+/**
+ * JSF component class
+ *
+ */
+public abstract class UI${artifactId} extends UIComponentBase 
+{
+}

Added: branches/refactor1/cdk/maven-archetype-jsf-component/src/main/resources/archetype-resources/src/main/templates/README
===================================================================

Added: branches/refactor1/cdk/maven-archetype-jsf-component/src/main/resources/archetype-resources/src/main/templates/_compName.jspx
===================================================================
--- branches/refactor1/cdk/maven-archetype-jsf-component/src/main/resources/archetype-resources/src/main/templates/_compName.jspx	                        (rev 0)
+++ branches/refactor1/cdk/maven-archetype-jsf-component/src/main/resources/archetype-resources/src/main/templates/_compName.jspx	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<f:root 
+	xmlns:f="http://ajax4jsf.org/cdk/template" 
+	xmlns:c=" http://java.sun.com/jsf/core" 
+	xmlns:ui=" http://ajax4jsf.org/cdk/ui"
+	xmlns:u=" http://ajax4jsf.org/cdk/u"
+	xmlns:x=" http://ajax4jsf.org/cdk/x"
+	class="${groupId}.renderkit.html.${artifactId}Renderer"
+	baseclass="org.ajax4jsf.framework.renderer.AjaxComponentRendererBase"
+	component="${groupId}.component.UI${artifactId}" 
+	>
+	<f:clientid var="clientId"/>
+	<div id="#{clientId}"
+		x:passThruWithExclusions="value,name,type,id"
+		>
+	</div>
+</f:root>
\ No newline at end of file

Added: branches/refactor1/cdk/maven-archetype-jsf-component/src/main/resources/archetype-resources/src/test/java/component/JSFComponentTest.java
===================================================================
--- branches/refactor1/cdk/maven-archetype-jsf-component/src/main/resources/archetype-resources/src/test/java/component/JSFComponentTest.java	                        (rev 0)
+++ branches/refactor1/cdk/maven-archetype-jsf-component/src/main/resources/archetype-resources/src/test/java/component/JSFComponentTest.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,53 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package ${groupId}.component;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+import javax.faces.component.UIComponent;
+
+/**
+ * Unit test for simple Component.
+ */
+public class JSFComponentTest 
+    extends TestCase
+{
+    /**
+     * Create the test case
+     *
+     * @param testName name of the test case
+     */
+    public JSFComponentTest( String testName )
+    {
+        super( testName );
+    }
+
+
+    /**
+     * Rigourous Test :-)
+     */
+    public void testComponent()
+    {
+        assertTrue( true );
+    }
+}

Added: branches/refactor1/cdk/maven-archetype-jsf-component/src/site/apt/index.apt
===================================================================

Added: branches/refactor1/cdk/maven-archetype-jsf-component/src/site/apt/usage.apt
===================================================================
--- branches/refactor1/cdk/maven-archetype-jsf-component/src/site/apt/usage.apt	                        (rev 0)
+++ branches/refactor1/cdk/maven-archetype-jsf-component/src/site/apt/usage.apt	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,15 @@
+                        ----------------------------------------------
+                          Java Server Faces component project template
+                        ----------------------------------------------
+                        ----------------------------------------------
+                        ----------------------------------------------
+
+ For create new jsf component project, run maven command :
+ 
++-----------------------------------------------------------------------------------------------------------+
+ mvn archetype:create -DarchetypeGroupId=org.ajax4jsf.cdk -DarchetypeArtifactId=maven-archetype-jsf-component \ 
+  -DarchetypeVersion=1.1-SNAPSHOT -DgroupId=\<my.groupid\> -DartifactId=\<my-artifactId\>
++-----------------------------------------------------------------------------------------------------------+
+ 
+ This command will create project for generate component library, with one empty component "comp"
+ 
\ No newline at end of file

Added: branches/refactor1/cdk/maven-archetype-jsf-component/src/site/resources/images/exadel_logo.jpg
===================================================================
(Binary files differ)


Property changes on: branches/refactor1/cdk/maven-archetype-jsf-component/src/site/resources/images/exadel_logo.jpg
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: branches/refactor1/cdk/maven-archetype-jsf-component/src/site/site.xml
===================================================================
--- branches/refactor1/cdk/maven-archetype-jsf-component/src/site/site.xml	                        (rev 0)
+++ branches/refactor1/cdk/maven-archetype-jsf-component/src/site/site.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<project name="JSF Components development kit">
+  <bannerLeft>
+    <name>JSF Component project archetype</name>
+    <src>images/exadel_logo.jpg</src>
+    <href>http://ajax4jsf.org/cdk</href>
+  </bannerLeft>
+  <bannerRight>
+    <src>http://maven.apache.org/images/maven-small.gif</src>
+  </bannerRight>
+  <publishDate position="navigation-bottom" format="MM-dd-yy"/>
+  <body>
+    <links>
+      <item name="JSF" href="https://javaserverfaces.dev.java.net/" />
+      <item name="Maven 2" href="http://maven.apache.org/maven2/"/>
+    </links>
+
+    <menu name="JSF CDK">
+      <item name="Introduction" href="index.html"/>
+      <item name="Usage" href="usage.html"/>
+    </menu>
+    <menu ref="modules" />
+  </body>
+</project>
\ No newline at end of file

Added: branches/refactor1/cdk/maven-archetype-jsfwebapp/.svnignore
===================================================================
--- branches/refactor1/cdk/maven-archetype-jsfwebapp/.svnignore	                        (rev 0)
+++ branches/refactor1/cdk/maven-archetype-jsfwebapp/.svnignore	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1 @@
+target

Added: branches/refactor1/cdk/maven-archetype-jsfwebapp/pom.xml
===================================================================
--- branches/refactor1/cdk/maven-archetype-jsfwebapp/pom.xml	                        (rev 0)
+++ branches/refactor1/cdk/maven-archetype-jsfwebapp/pom.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,11 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <parent>
+    <artifactId>cdk</artifactId>
+    <groupId>org.ajax4jsf</groupId>
+    <version>1.1.2-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.ajax4jsf.cdk</groupId>
+  <artifactId>maven-archetype-jsfwebapp</artifactId>
+  <name>Archetype for jsf webapp project</name>
+</project>
\ No newline at end of file

Added: branches/refactor1/cdk/maven-archetype-jsfwebapp/src/main/resources/META-INF/maven/archetype.xml
===================================================================
--- branches/refactor1/cdk/maven-archetype-jsfwebapp/src/main/resources/META-INF/maven/archetype.xml	                        (rev 0)
+++ branches/refactor1/cdk/maven-archetype-jsfwebapp/src/main/resources/META-INF/maven/archetype.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,16 @@
+<archetype>
+  <id>maven-archetype-jsfwebapp</id>
+  <sources>
+    <source>src/main/java/Bean.java</source>
+  </sources>
+  <testSources>
+    <source>src/test/java/BeanTest.java</source>
+  </testSources>
+  <resources>
+    <resource>src/main/webapp/index.jsp</resource>
+    <resource>src/main/webapp/pages/index.jsp</resource>
+    <resource>src/main/webapp/pages/index.xhtml</resource>
+    <resource>src/main/webapp/WEB-INF/web.xml</resource>
+    <resource>src/main/webapp/WEB-INF/faces-config.xml</resource>
+  </resources>
+</archetype>

Added: branches/refactor1/cdk/maven-archetype-jsfwebapp/src/main/resources/archetype-resources/pom.xml
===================================================================
--- branches/refactor1/cdk/maven-archetype-jsfwebapp/src/main/resources/archetype-resources/pom.xml	                        (rev 0)
+++ branches/refactor1/cdk/maven-archetype-jsfwebapp/src/main/resources/archetype-resources/pom.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,31 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>${groupId}</groupId>
+	<artifactId>${artifactId}</artifactId>
+	<packaging>war</packaging>
+	<name>${artifactId} Maven Webapp</name>
+	<build>
+		<finalName>${artifactId}</finalName>
+	</build>
+
+	<dependencies>
+#if(${facelets})
+		<dependency>
+			<groupId>com.sun.facelets</groupId>
+			<artifactId>jsf-facelets</artifactId>
+			<version>1.1.12</version>
+		</dependency>
+		<dependency>
+			<groupId>javax.el</groupId>
+			<artifactId>el-api</artifactId>
+			<version>1.0</version>
+		</dependency>
+		<dependency>
+			<groupId>el-impl</groupId>
+			<artifactId>el-impl</artifactId>
+			<version>1.0</version>
+			<scope>runtime</scope>
+		</dependency>
+#end
+	</dependencies>
+</project>

Added: branches/refactor1/cdk/maven-archetype-jsfwebapp/src/main/resources/archetype-resources/src/main/java/Bean.java
===================================================================
--- branches/refactor1/cdk/maven-archetype-jsfwebapp/src/main/resources/archetype-resources/src/main/java/Bean.java	                        (rev 0)
+++ branches/refactor1/cdk/maven-archetype-jsfwebapp/src/main/resources/archetype-resources/src/main/java/Bean.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,29 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package ${package};
+/**
+ * @author $Autor$
+ *
+ */
+public class Bean {
+	
+}
\ No newline at end of file

Added: branches/refactor1/cdk/maven-archetype-jsfwebapp/src/main/resources/archetype-resources/src/main/webapp/META-INF/MANIFEST.MF
===================================================================
--- branches/refactor1/cdk/maven-archetype-jsfwebapp/src/main/resources/archetype-resources/src/main/webapp/META-INF/MANIFEST.MF	                        (rev 0)
+++ branches/refactor1/cdk/maven-archetype-jsfwebapp/src/main/resources/archetype-resources/src/main/webapp/META-INF/MANIFEST.MF	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,6 @@
+Manifest-Version: 1.0
+
+Class-Path: 
+
+
+

Added: branches/refactor1/cdk/maven-archetype-jsfwebapp/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- branches/refactor1/cdk/maven-archetype-jsfwebapp/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml	                        (rev 0)
+++ branches/refactor1/cdk/maven-archetype-jsfwebapp/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
+                              "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
+<faces-config>
+ <managed-bean>
+  <managed-bean-name>bean</managed-bean-name>
+  <managed-bean-class>${package}.Bean</managed-bean-class>
+  <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+</faces-config>

Added: branches/refactor1/cdk/maven-archetype-jsfwebapp/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml.l4t
===================================================================
--- branches/refactor1/cdk/maven-archetype-jsfwebapp/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml.l4t	                        (rev 0)
+++ branches/refactor1/cdk/maven-archetype-jsfwebapp/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml.l4t	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<PROCESS ENTITY="JSFProcess"/>

Added: branches/refactor1/cdk/maven-archetype-jsfwebapp/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml
===================================================================
--- branches/refactor1/cdk/maven-archetype-jsfwebapp/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml	                        (rev 0)
+++ branches/refactor1/cdk/maven-archetype-jsfwebapp/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+ <display-name>Archetype Created Web Application</display-name>
+ <context-param>
+  <param-name>javax.faces.CONFIG_FILES</param-name>
+  <param-value>/WEB-INF/faces-config.xml</param-value>
+ </context-param>
+ <context-param>
+  <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+  <param-value>server</param-value>
+ </context-param>
+ <!-- 
+#if(${facelets})
+ -->
+ <context-param>
+  <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
+  <param-value>.xhtml</param-value>
+ </context-param>
+ <context-param>
+  <param-name>facelets.REFRESH_PERIOD</param-name>
+  <param-value>2</param-value>
+ </context-param>
+ <context-param>
+  <param-name>facelets.DEVELOPMENT</param-name>
+  <param-value>true</param-value>
+ </context-param>
+ <context-param>
+  <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
+  <param-value>com.sun.facelets.FaceletViewHandler</param-value>
+ </context-param>
+ <!-- 
+#end
+ --> 
+ <filter>
+  <display-name>Ajax4jsf Filter</display-name>
+  <filter-name>ajax4jsf</filter-name>
+  <filter-class>org.ajax4jsf.Filter</filter-class>
+ </filter>
+ <filter-mapping>
+  <filter-name>ajax4jsf</filter-name>
+  <servlet-name>Faces Servlet</servlet-name>
+  <dispatcher>REQUEST</dispatcher>
+  <dispatcher>FORWARD</dispatcher>
+  <dispatcher>INCLUDE</dispatcher>
+ </filter-mapping>
+ <servlet>
+  <servlet-name>Faces Servlet</servlet-name>
+  <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+  <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+  <servlet-name>Faces Servlet</servlet-name>
+  <url-pattern>/faces/*</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+  <servlet-name>Faces Servlet</servlet-name>
+  <url-pattern>*.jsf</url-pattern>
+ </servlet-mapping>
+ <login-config>
+  <auth-method>BASIC</auth-method>
+ </login-config>
+</web-app>

Added: branches/refactor1/cdk/maven-archetype-jsfwebapp/src/main/resources/archetype-resources/src/main/webapp/index.jsp
===================================================================
--- branches/refactor1/cdk/maven-archetype-jsfwebapp/src/main/resources/archetype-resources/src/main/webapp/index.jsp	                        (rev 0)
+++ branches/refactor1/cdk/maven-archetype-jsfwebapp/src/main/resources/archetype-resources/src/main/webapp/index.jsp	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,11 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+
+<html>
+
+<head></head>
+
+	<body>
+		<jsp:forward page="/pages/index.jsf" />
+	</body>
+
+</html>
\ No newline at end of file

Added: branches/refactor1/cdk/maven-archetype-jsfwebapp/src/main/resources/archetype-resources/src/main/webapp/pages/index.jsp
===================================================================
--- branches/refactor1/cdk/maven-archetype-jsfwebapp/src/main/resources/archetype-resources/src/main/webapp/pages/index.jsp	                        (rev 0)
+++ branches/refactor1/cdk/maven-archetype-jsfwebapp/src/main/resources/archetype-resources/src/main/webapp/pages/index.jsp	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,12 @@
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<html>
+	<head>
+		<title></title>
+	</head>
+	<body>
+		<f:view>
+			
+		</f:view>
+	</body>	
+</html>  

Added: branches/refactor1/cdk/maven-archetype-jsfwebapp/src/main/resources/archetype-resources/src/main/webapp/pages/index.xhtml
===================================================================
--- branches/refactor1/cdk/maven-archetype-jsfwebapp/src/main/resources/archetype-resources/src/main/webapp/pages/index.xhtml	                        (rev 0)
+++ branches/refactor1/cdk/maven-archetype-jsfwebapp/src/main/resources/archetype-resources/src/main/webapp/pages/index.xhtml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,12 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+	  xmlns:f="http://java.sun.com/jsf/core"
+      xmlns:h="http://java.sun.com/jsf/html"
+      xmlns:ui="http://java.sun.com/jsf/facelets"
+      xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+      xmlns:c="http://java.sun.com/jsp/jstl/core"  
+      >
+	<f:view>
+
+	</f:view>
+</html>	
\ No newline at end of file

Added: branches/refactor1/cdk/maven-archetype-jsfwebapp/src/main/resources/archetype-resources/src/test/java/BeanTest.java
===================================================================
--- branches/refactor1/cdk/maven-archetype-jsfwebapp/src/main/resources/archetype-resources/src/test/java/BeanTest.java	                        (rev 0)
+++ branches/refactor1/cdk/maven-archetype-jsfwebapp/src/main/resources/archetype-resources/src/test/java/BeanTest.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,46 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package ${package};
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+/**
+*/
+public class BeanTest 
+    extends TestCase
+{
+    /**
+     * Create the test case
+     *
+     * @param testName name of the test case
+     */
+    public BeanTest( String testName )
+    {
+        super( testName );
+    }
+
+    public void testStub() throws Exception {
+    	
+    }
+}

Added: branches/refactor1/cdk/maven-cdk-plugin/.svnignore
===================================================================
--- branches/refactor1/cdk/maven-cdk-plugin/.svnignore	                        (rev 0)
+++ branches/refactor1/cdk/maven-cdk-plugin/.svnignore	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1 @@
+target

Added: branches/refactor1/cdk/maven-cdk-plugin/pom.xml
===================================================================
--- branches/refactor1/cdk/maven-cdk-plugin/pom.xml	                        (rev 0)
+++ branches/refactor1/cdk/maven-cdk-plugin/pom.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,56 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<parent>
+		<artifactId>cdk</artifactId>
+		<groupId>org.ajax4jsf</groupId>
+		<version>1.1.2-SNAPSHOT</version>
+	</parent>
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>org.ajax4jsf.cdk</groupId>
+	<artifactId>maven-cdk-plugin</artifactId>
+	<packaging>maven-plugin</packaging>
+	<name>Maven plugin for JSF components code generation</name>
+	<url>http://labs.jboss.com/wiki/Ajax4jsf/cdk/maven-cdk-plugin/</url>
+	<dependencies>
+		<dependency>
+			<groupId>org.apache.maven</groupId>
+			<artifactId>maven-artifact</artifactId>
+			<version>2.0.4</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.maven</groupId>
+			<artifactId>maven-plugin-api</artifactId>
+			<version>2.0.4</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.maven</groupId>
+			<artifactId>maven-project</artifactId>
+			<version>2.0.4</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.maven</groupId>
+			<artifactId>maven-archiver</artifactId>
+			<version>2.2</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.maven.shared</groupId>
+			<artifactId>file-management</artifactId>
+			<version>1.1</version>
+		</dependency>
+		<dependency>
+			<groupId>org.codehaus.plexus</groupId>
+			<artifactId>plexus-velocity</artifactId>
+			<version>1.1.2</version>
+		</dependency>
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<version>3.8.1</version>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.ajax4jsf.cdk</groupId>
+			<artifactId>generator</artifactId>
+			<version>${project.version}</version>
+		</dependency>
+	</dependencies>
+</project>
\ No newline at end of file

Added: branches/refactor1/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/maven/MavenCompilationContext.java
===================================================================
--- branches/refactor1/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/maven/MavenCompilationContext.java	                        (rev 0)
+++ branches/refactor1/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/maven/MavenCompilationContext.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,130 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.builder.maven;
+
+import org.ajax4jsf.templatecompiler.builder.CompilationException;
+import org.ajax4jsf.templatecompiler.builder.AbstractCompilationContext;
+import org.ajax4jsf.templatecompiler.elements.ElementsFactory;
+import org.apache.velocity.Template;
+import org.apache.velocity.app.VelocityEngine;
+import org.apache.velocity.exception.ParseErrorException;
+import org.apache.velocity.exception.ResourceNotFoundException;
+
+/**
+ * @author shura
+ *
+ */
+public class MavenCompilationContext extends AbstractCompilationContext {
+
+	private MavenLogger logger;
+	private VelocityEngine engine;
+	
+	/**
+	 * @param logger
+	 * @throws CompilationException 
+	 */
+	public MavenCompilationContext(MavenLogger logger,ClassLoader loader,VelocityEngine engine) throws CompilationException {
+		super(loader);
+		this.logger = logger;
+		this.engine = engine;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.templatecompiler.builder.CompilationContext#debug(java.lang.String)
+	 */
+	public void debug(String content) {
+		logger.debug(content);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.templatecompiler.builder.CompilationContext#debug(java.lang.String, java.lang.Throwable)
+	 */
+	public void debug(String content, Throwable error) {
+		logger.debug(content, error);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.templatecompiler.builder.CompilationContext#error(java.lang.String)
+	 */
+	public void error(String content) {
+		logger.error(content);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.templatecompiler.builder.CompilationContext#error(java.lang.String, java.lang.Throwable)
+	 */
+	public void error(String content, Throwable error) {
+		logger.error(content, error);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.templatecompiler.builder.CompilationContext#info(java.lang.String)
+	 */
+	public void info(String content) {
+		logger.info(content);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.templatecompiler.builder.CompilationContext#info(java.lang.String, java.lang.Throwable)
+	 */
+	public void info(String content, Throwable error) {
+		logger.info(content, error);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.templatecompiler.builder.CompilationContext#warn(java.lang.String)
+	 */
+	public void warn(String content) {
+		logger.warn(content);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.templatecompiler.builder.CompilationContext#warn(java.lang.String, java.lang.Throwable)
+	 */
+	public void warn(String content, Throwable error) {
+		logger.warn(content, error);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.templatecompiler.builder.CompilationContext#getElementsFactory()
+	 */
+	public ElementsFactory getElementsFactory() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.templatecompiler.builder.CompilationContext#getTemplate(java.lang.String)
+	 */
+	public Template getTemplate(String name) throws CompilationException {
+		try {
+		return engine.getTemplate(name);
+	} catch (ResourceNotFoundException e) {
+		throw new CompilationException(e.getLocalizedMessage());
+	} catch (ParseErrorException e) {
+		throw new CompilationException(e.getLocalizedMessage());
+	} catch (Exception e) {
+		throw new CompilationException(e.getLocalizedMessage());
+	}
+	}
+
+}

Added: branches/refactor1/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/maven/MavenLogger.java
===================================================================
--- branches/refactor1/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/maven/MavenLogger.java	                        (rev 0)
+++ branches/refactor1/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/maven/MavenLogger.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,175 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.builder.maven;
+
+import org.ajax4jsf.builder.generator.Logger;
+import org.apache.maven.plugin.logging.Log;
+
+/**
+ * @author shura
+ *
+ */
+public class MavenLogger implements Logger {
+	
+	private Log _log;
+
+	/**
+	 * @param _log
+	 */
+	public MavenLogger(Log _log) {
+		super();
+		this._log = _log;
+	}
+
+	/**
+	 * @param content
+	 * @param error
+	 * @see org.apache.maven.plugin.logging.Log#debug(java.lang.CharSequence, java.lang.Throwable)
+	 */
+	public void debug(CharSequence content, Throwable error) {
+		_log.debug(content, error);
+	}
+
+	/**
+	 * @param content
+	 * @see org.apache.maven.plugin.logging.Log#debug(java.lang.CharSequence)
+	 */
+	public void debug(CharSequence content) {
+		_log.debug(content);
+	}
+
+	/**
+	 * @param error
+	 * @see org.apache.maven.plugin.logging.Log#debug(java.lang.Throwable)
+	 */
+	public void debug(Throwable error) {
+		_log.debug(error);
+	}
+
+	/**
+	 * @param content
+	 * @param error
+	 * @see org.apache.maven.plugin.logging.Log#error(java.lang.CharSequence, java.lang.Throwable)
+	 */
+	public void error(CharSequence content, Throwable error) {
+		_log.error(content, error);
+	}
+
+	/**
+	 * @param content
+	 * @see org.apache.maven.plugin.logging.Log#error(java.lang.CharSequence)
+	 */
+	public void error(CharSequence content) {
+		_log.error(content);
+	}
+
+	/**
+	 * @param error
+	 * @see org.apache.maven.plugin.logging.Log#error(java.lang.Throwable)
+	 */
+	public void error(Throwable error) {
+		_log.error(error);
+	}
+
+	/**
+	 * @param content
+	 * @param error
+	 * @see org.apache.maven.plugin.logging.Log#info(java.lang.CharSequence, java.lang.Throwable)
+	 */
+	public void info(CharSequence content, Throwable error) {
+		_log.info(content, error);
+	}
+
+	/**
+	 * @param content
+	 * @see org.apache.maven.plugin.logging.Log#info(java.lang.CharSequence)
+	 */
+	public void info(CharSequence content) {
+		_log.info(content);
+	}
+
+	/**
+	 * @param error
+	 * @see org.apache.maven.plugin.logging.Log#info(java.lang.Throwable)
+	 */
+	public void info(Throwable error) {
+		_log.info(error);
+	}
+
+	/**
+	 * @return
+	 * @see org.apache.maven.plugin.logging.Log#isDebugEnabled()
+	 */
+	public boolean isDebugEnabled() {
+		return _log.isDebugEnabled();
+	}
+
+	/**
+	 * @return
+	 * @see org.apache.maven.plugin.logging.Log#isErrorEnabled()
+	 */
+	public boolean isErrorEnabled() {
+		return _log.isErrorEnabled();
+	}
+
+	/**
+	 * @return
+	 * @see org.apache.maven.plugin.logging.Log#isInfoEnabled()
+	 */
+	public boolean isInfoEnabled() {
+		return _log.isInfoEnabled();
+	}
+
+	/**
+	 * @return
+	 * @see org.apache.maven.plugin.logging.Log#isWarnEnabled()
+	 */
+	public boolean isWarnEnabled() {
+		return _log.isWarnEnabled();
+	}
+
+	/**
+	 * @param content
+	 * @param error
+	 * @see org.apache.maven.plugin.logging.Log#warn(java.lang.CharSequence, java.lang.Throwable)
+	 */
+	public void warn(CharSequence content, Throwable error) {
+		_log.warn(content, error);
+	}
+
+	/**
+	 * @param content
+	 * @see org.apache.maven.plugin.logging.Log#warn(java.lang.CharSequence)
+	 */
+	public void warn(CharSequence content) {
+		_log.warn(content);
+	}
+
+	/**
+	 * @param error
+	 * @see org.apache.maven.plugin.logging.Log#warn(java.lang.Throwable)
+	 */
+	public void warn(Throwable error) {
+		_log.warn(error);
+	}
+
+}

Added: branches/refactor1/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/AbstractCDKMojo.java
===================================================================
--- branches/refactor1/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/AbstractCDKMojo.java	                        (rev 0)
+++ branches/refactor1/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/AbstractCDKMojo.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,283 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.builder.mojo;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.lang.reflect.Method;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.Iterator;
+import java.util.List;
+
+import org.apache.maven.artifact.DependencyResolutionRequiredException;
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.project.MavenProject;
+import org.apache.velocity.Template;
+import org.apache.velocity.VelocityContext;
+import org.apache.velocity.app.VelocityEngine;
+import org.apache.velocity.exception.MethodInvocationException;
+import org.apache.velocity.exception.ParseErrorException;
+import org.apache.velocity.exception.ResourceNotFoundException;
+import org.codehaus.plexus.velocity.VelocityComponent;
+
+/**
+ * @author shura
+ *
+ */
+public abstract class AbstractCDKMojo extends AbstractMojo {
+
+	/**
+	 * Top maven project.
+	 * 
+	 * @parameter expression="${project}"
+	 * @readonly
+	 */
+	protected MavenProject project;
+	/**
+	 * 
+	 * @parameter
+	 */
+	protected String key;
+	/**
+	 * Place for component configuration XML files. All '*.xml' files wil be
+	 * parsed as components config. All '*.ent' files will be processed as
+	 * include configurations.
+	 * 
+	 * @parameter expression="src/main/config/component"
+	 */
+	protected File componentConfigDirectory;
+	/**
+	 * Place for faces configuration XML files
+	 * 
+	 * @parameter expression="src/main/config/faces"
+	 */
+	protected File facesConfigInclude;
+	/**
+	 * Place for component configuration XML files
+	 * 
+	 * @parameter expression="src/main/config/taglib"
+	 */
+	protected File taglibInclude;
+	/**
+	 * Place for component configuration XML files
+	 * 
+	 * @parameter expression="src/main/config/resources"
+	 */
+	protected File resourcesInclude;
+	/**
+	 * 
+	 * @parameter expression="src/main/templates"
+	 */
+	protected File templatesDirectory;
+	/**
+	 * Directory where the output Java Files will be located.
+	 * 
+	 * @parameter expression="${project.build.directory}/generated-component/java"
+	 */
+	protected File outputJavaDirectory;
+
+	/**
+	 * @parameter expression="${project.build.directory}/generated-component/test"
+	 */
+	protected File outputTestsDirectory;
+
+	/**
+	 * Directory where the output Java Files will be located.
+	 * 
+	 * @parameter expression="${project.build.directory}/generated-component/resources"
+	 */
+	protected File outputResourcesDirectory;
+	/**
+	 * @parameter
+	 */
+	protected Library library;
+	/**
+	 * The source directories containing the sources to be compiled.
+	 * 
+	 * @parameter expression="${project.compileSourceRoots}"
+	 * @required
+	 * @readonly
+	 */
+	protected List compileSourceRoots;
+	/**
+	 * Project classpath.
+	 * 
+	 * @parameter expression="${project.compileClasspathElements}"
+	 * @required
+	 * @readonly
+	 */
+	protected List classpathElements;
+	/**
+	 * The directory for compiled classes.
+	 * 
+	 * @parameter expression="${project.build.outputDirectory}"
+	 * @required
+	 * @readonly
+	 */
+	protected File outputDirectory;
+	/**
+	 * @component
+	 */
+	protected VelocityComponent velocity;
+	/**
+	 * Check library configuration, and fill all empty values to default.
+	 * 
+	 * @return
+	 */
+	protected Taglib checkLibraryConfig() {
+		if (null != library) {
+			getLog().debug("Library prefix is " + library.getPrefix());
+		} else {
+			library = new Library();
+		}
+		if (null == library.getPrefix()) {
+			library.setPrefix(project.getGroupId());
+
+		}
+		if (null == library.getDescription()) {
+			library.setDescription(project.getDescription());	
+		}
+		if( null == library.getJsfVersion()){
+			String version = Library.JSF11;
+			// Check version-specific methods in UIComponent class
+			try {
+				Class componentClass = createProjectClassLoader(project, false).loadClass("javax.faces.component.UIComponent");
+				Method[] methods = componentClass.getDeclaredMethods();
+				for (int i = 0; i < methods.length; i++) {
+					if("encodeAll".equals(methods[i].getName())){
+						version = Library.JSF12;
+						break;
+					}
+				}
+			} catch (ClassNotFoundException e) {
+				// Ignore - by defaule, generate codes for JSF 1.1
+			}
+			library.setJsfVersion(version);
+		}
+		Renderkit[] renderkits = library.getRenderkits();
+		if (null != renderkits) {
+			for (int i = 0; i < renderkits.length; i++) {
+				Renderkit renderkit = renderkits[i];
+				getLog().debug("Renderkit name is " + renderkit.getName());
+				if(null == renderkit.getPackage()){
+					renderkit.setPackage(library.getPrefix()+".renderkit."+renderkit.getName().toLowerCase());
+				}
+			}
+		} else {
+			renderkits = new Renderkit[1];
+			Renderkit renderkit = new Renderkit();
+			renderkit.setMarkup("html");
+			renderkit.setName("HTML_BASIC");
+			renderkit.setPackage(library.getPrefix()+".renderkit."+renderkit.getName().toLowerCase());
+			renderkits[0] = renderkit;
+			library.setRenderkits(renderkits);
+		}
+		Taglib taglib = library.getTaglib();
+		if (null != taglib) {
+			getLog().debug("Taglib uri is " + taglib.getUri());
+			getLog().debug("Taglib shortname is " + taglib.getShortName());
+		} else {
+			taglib = new Taglib();
+			library.setTaglib(taglib);
+		}
+		if (null == taglib.getDisplayName()) {
+			taglib.setDisplayName(project.getDescription());
+
+		}
+		if( null == taglib.getJspVersion()){
+			// Jsf 1.2 can use JSP 2.1 only, other - 2.0
+			taglib.setJspVersion(library.getJsfVersion().equals(Library.JSF12)?"2.1":"1.2");
+		}
+		if (null == taglib.getUri()) {
+			String url = project.getUrl();
+			if (null == url) {
+				url = "http://";
+				String[] parts = project.getGroupId().split(".");
+				for (int i = parts.length - 1; i >= 0; i--) {
+					url = url + parts[i];
+					if (i > 0) {
+						url = url + ".";
+					}
+				}
+				url = url + "/" + project.getArtifactId();
+			}
+			taglib.setUri(url);
+
+		}
+		if (null == taglib.getShortName()) {
+			taglib.setShortName(project.getArtifactId());
+
+		}
+		return taglib;
+	}
+
+	protected void writeParsedTemplate(String templateName, VelocityContext context, File configFile) throws IOException, ResourceNotFoundException, ParseErrorException, MethodInvocationException, Exception {
+		File dir = configFile.getParentFile();
+		if(!dir.exists()){
+			dir.mkdirs();
+		}
+		VelocityEngine engine = velocity.getEngine();
+		FileWriter fileWriter = new FileWriter(configFile);
+		Template velocityTemplate = engine.getTemplate(templateName);
+		velocityTemplate.merge(context, fileWriter);
+		fileWriter.flush();
+		fileWriter.close();
+	}
+
+	protected ClassLoader createProjectClassLoader(MavenProject project, boolean useCCL) {
+		ClassLoader classLoader = Thread.currentThread()
+		.getContextClassLoader();
+		try {
+			List compileClasspathElements = project
+			.getCompileClasspathElements();
+			String outputDirectory = project.getBuild().getOutputDirectory();
+			URL[] urls = new URL[compileClasspathElements.size() + 1];
+			int i = 0;
+			urls[i++] = new File(outputDirectory).toURL();
+			for (Iterator iter = compileClasspathElements.iterator(); iter
+			.hasNext();) {
+				String element = (String) iter.next();
+				urls[i++] = new File(element).toURL();
+			}
+
+			if (useCCL) {
+				classLoader = new URLClassLoader(urls, classLoader);
+			} else {
+				classLoader = new URLClassLoader(urls);
+			}
+		} catch (MalformedURLException e) {
+			getLog().error("Bad URL in classpath", e);
+		} catch (DependencyResolutionRequiredException e) {
+			getLog().error("Dependencies not resolved ", e);
+		}
+
+		return classLoader;
+	}
+
+	protected ClassLoader createProjectClassLoader(MavenProject project) {
+		return createProjectClassLoader(project, true);
+	}
+
+}
\ No newline at end of file

Added: branches/refactor1/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/AssemblyLibraryMojo.java
===================================================================
--- branches/refactor1/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/AssemblyLibraryMojo.java	                        (rev 0)
+++ branches/refactor1/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/AssemblyLibraryMojo.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,691 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.builder.mojo;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.ajax4jsf.builder.config.ParsingException;
+import org.ajax4jsf.builder.xml.XMLBody;
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
+import org.apache.maven.artifact.resolver.ArtifactResolutionException;
+import org.apache.maven.model.Dependency;
+import org.apache.maven.model.Model;
+import org.apache.maven.model.Parent;
+import org.apache.maven.model.Resource;
+import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
+import org.apache.maven.model.io.xpp3.MavenXpp3Writer;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
+import org.apache.maven.project.MavenProject;
+import org.apache.maven.project.MavenProjectBuilder;
+import org.apache.maven.project.ProjectBuildingException;
+import org.apache.maven.shared.io.scan.ResourceInclusionScanner;
+import org.apache.maven.shared.io.scan.SimpleResourceInclusionScanner;
+import org.apache.velocity.VelocityContext;
+import org.apache.velocity.exception.MethodInvocationException;
+import org.apache.velocity.exception.ParseErrorException;
+import org.apache.velocity.exception.ResourceNotFoundException;
+import org.codehaus.plexus.archiver.UnArchiver;
+import org.codehaus.plexus.archiver.manager.ArchiverManager;
+import org.codehaus.plexus.util.DirectoryScanner;
+
+/**
+ * This plugin assembly full components library from modules, included in parent
+ * project. Steps to create library : 1. Got parent project, and check modules
+ * included in them. 2. For every module , build project and got it properties.
+ * 3. Resolve module artifact, check for "jar" type and include/exclude
+ * criteria. for accepted modules, unpack it to classes directory, and put
+ * config files in separate directories. 4. Append unpacked directory to
+ * resources, included in result jar. 5. Merge all META-INF/faces-config.xml ,
+ * *.tld, *.taglib.xml , resources-config.xml into ones. 6. append dependencies
+ * of included projects to this.
+ * 
+ * @author shura
+ * @goal assembly
+ * @requiresDependencyResolution compile
+ * @phase generate-resources
+ */
+public class AssemblyLibraryMojo extends AbstractCDKMojo {
+
+	private static final String TEMPLATES_PREFIX = "/templates/";
+
+	private static final String TEMPLATES12_PREFIX = "/templates12/";
+
+	private static final String FACES_CONFIG_TEMPLATE = "faces-config.vm";
+
+	private static final String RESOURCES_CONFIG_TEMPLATE = "resources-config.vm";
+
+	private static final String TLD_TEMPLATE = "tld.vm";
+
+	private static final String TAGLIB_TEMPLATE = "taglib.vm";
+
+	/**
+	 * Used to look up Artifacts in the remote repository.
+	 * 
+	 * @component
+	 */
+	private org.apache.maven.artifact.factory.ArtifactFactory factory;
+
+	/**
+	 * Used to look up Artifacts in the remote repository.
+	 * 
+	 * @component
+	 */
+	private org.apache.maven.artifact.resolver.ArtifactResolver resolver;
+
+	/**
+	 * The local repository.
+	 * 
+	 * @parameter expression="${localRepository}"
+	 */
+	private ArtifactRepository localRepository;
+
+	/**
+	 * To look up Archiver/UnArchiver implementations
+	 * 
+	 * @component
+	 */
+	private ArchiverManager archiverManager;
+
+	/**
+	 * Project builder
+	 * 
+	 * @component
+	 */
+	private MavenProjectBuilder mavenProjectBuilder;
+
+	/**
+	 * The reactor projects.
+	 * 
+	 * @parameter expression="${reactorProjects}"
+	 * @required
+	 * @readonly
+	 */
+	private List reactorProjects;
+
+	/**
+	 * The reactor projects.
+	 * 
+	 * @parameter expression="${project.parent}"
+	 * @readonly
+	 */
+	private MavenProject parentProject;
+
+	/**
+	 * The directory for compiled classes.
+	 * 
+	 * @parameter expression="${project.build.directory}"
+	 * @required
+	 * @readonly
+	 */
+	private File buildDirectory;
+
+	/**
+	 * The directory for compiled classes.
+	 * 
+	 * @parameter expression="${project.build.directory}/pom.xml"
+	 * @required
+	 * @readonly
+	 */
+	private File generatedPom;
+
+	/**
+	 * The directory for compiled classes.
+	 * 
+	 * @parameter expression="${project.build.directory}/src"
+	 * @required
+	 * @readonly
+	 */
+	private File modulesSrc;
+
+	/**
+	 * @parameter
+	 */
+	private String templates;
+
+	/**
+	 * @parameter
+	 */
+	private String includeTld = "META-INF/*.tld";
+
+	/**
+	 * @parameter
+	 */
+	private String includeTaglib = "META-INF/*.taglib.xml";
+
+	/**
+	 * 
+	 */
+	public AssemblyLibraryMojo() {
+		// used for plexus init.
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.apache.maven.plugin.Mojo#execute()
+	 */
+	public void execute() throws MojoExecutionException, MojoFailureException {
+		// Parent project not set for a custom lifecycles. Try to load artifact.
+		if (null == parentProject || null == parentProject.getFile()) {
+			Parent parentModel = project.getModel().getParent();
+			if (null != parentModel) {
+				String relativePath = parentModel.getRelativePath();
+				File parentPom = new File(project.getFile().getAbsoluteFile().getParentFile(), relativePath);
+				if (parentPom.isDirectory()) {
+					parentPom = new File(parentPom, "pom.xml");
+				}
+				if (parentPom.exists()) {
+					try {
+						parentProject = mavenProjectBuilder.build(parentPom,
+								localRepository, null);
+					} catch (ProjectBuildingException e) {
+						throw new MojoFailureException("Error get parent project for a components library");
+					}
+				} else {
+					throw new MojoFailureException("Parent project pom file not found for a components library");					
+				}
+			}else {
+				throw new MojoFailureException("Components library project must have parent pom with components modules");
+			}
+
+		}
+		if (null != parentProject) {
+			this.checkLibraryConfig();
+			if (null == templates) {
+				templates = Library.JSF12.equals(library.getJsfVersion()) ? TEMPLATES12_PREFIX
+						: TEMPLATES_PREFIX;
+			}
+			Model generatedProject;
+			try {
+				MavenXpp3Reader reader = new MavenXpp3Reader();
+				generatedProject = reader
+						.read(new FileReader(project.getFile()));
+			} catch (Exception e1) {
+				throw new MojoExecutionException("Unable to read local POM", e1);
+			}
+			List modules = parentProject.getModules();
+			List models = new ArrayList(modules.size());
+			Map<String, Dependency> projectsDependencies = new HashMap<String, Dependency>();
+			for (Iterator iter = modules.iterator(); iter.hasNext();) {
+				String moduleName = (String) iter.next();
+				getLog().info("Parent project have module " + moduleName);
+				Model model;
+				File f = new File(parentProject.getBasedir(), moduleName
+						+ "/pom.xml");
+				if (f.exists()) {
+					try {
+						model = mavenProjectBuilder.build(f, localRepository,
+								null).getModel();
+					} catch (ProjectBuildingException e) {
+						throw new MojoExecutionException(
+								"Unable to read local module-POM", e);
+					}
+				} else {
+					getLog().warn("No filesystem module-POM available");
+
+					model = new Model();
+					model.setName(moduleName);
+					model.setUrl(moduleName);
+				}
+				if (project.getGroupId().equals(model.getGroupId())
+						&& "jar".equals(model.getPackaging())
+						&& (!project.getArtifactId().equals(
+								model.getArtifactId()))) {
+					// TODO - check include/exclude
+					getLog().debug(
+							"Project " + model.getName()
+									+ " included to library set");
+					List dependencies = model.getDependencies();
+					for (Iterator iterator = dependencies.iterator(); iterator
+							.hasNext();) {
+						Dependency dependency = (Dependency) iterator.next();
+						getLog().debug(
+								dependency.getClass().getName() + " : "
+										+ dependency + " with key: "
+										+ dependency.getManagementKey());
+						if (!"test".equals(dependency.getScope())) {
+							projectsDependencies.put(dependency
+									.getManagementKey(), dependency);
+
+						}
+					}
+					models.add(model);
+				}
+			}
+			// Remove modules projects from dependencise
+			Set<String> unwanted = new HashSet<String>(projectsDependencies
+					.size());
+			for (Iterator iter = models.iterator(); iter.hasNext();) {
+				Model model = (Model) iter.next();
+				for (Iterator iterator = projectsDependencies.values()
+						.iterator(); iterator.hasNext();) {
+					Dependency dependency = (Dependency) iterator.next();
+					if (model.getGroupId().equals(dependency.getGroupId())
+							&& model.getArtifactId().equals(
+									dependency.getArtifactId())) {
+						getLog().debug(
+								"Remove dependency of library module "
+										+ dependency.getManagementKey());
+						unwanted.add(dependency.getManagementKey());
+					}
+				}
+				// Got module and unpack it to target directory.
+				Artifact artifact = factory.createBuildArtifact(model
+						.getGroupId(), model.getArtifactId(), model
+						.getVersion(), model.getPackaging());
+				File moduleDir = new File(buildDirectory, model.getArtifactId());
+				unpackArtifact(artifact, moduleDir, true);
+				artifact = factory.createArtifactWithClassifier(model
+						.getGroupId(), model.getArtifactId(), model
+						.getVersion(), "jar", "sources");
+				unpackArtifact(artifact, modulesSrc, false);
+			}
+			// Add projects dependencies to this project
+			projectsDependencies.keySet().removeAll(unwanted);
+			generatedProject.getDependencies().addAll(
+					projectsDependencies.values());
+			writePom(generatedProject);
+			mergeFacesConfig(models);
+			File resourcesConfig = new File(outputDirectory,
+					"META-INF/resources-config.xml");
+			mergeXML(models, "META-INF/resources-config.xml",
+					RESOURCES_CONFIG_TEMPLATE, "/resource-config/resource", "name/text()",
+					new VelocityContext(), resourcesConfig);
+			File tld = new File(outputDirectory, "META-INF/"
+					+ library.getTaglib().getShortName() + ".tld");
+			mergeXML(models, includeTld, TLD_TEMPLATE,
+					"/taglib/tag | /taglib/listener", 
+					null, new VelocityContext(), tld);
+			File taglib = new File(outputDirectory, "META-INF/"
+					+ library.getTaglib().getShortName() + ".taglib.xml");
+			mergeXML(models, includeTaglib, TAGLIB_TEMPLATE,
+					"/facelet-taglib/tag | /facelet-taglib/function",
+					null, new VelocityContext(), taglib);
+		}else {
+			throw new MojoFailureException("Components library project must have parent pom with components modules");
+		}
+
+	}
+
+	/**
+	 * @param models
+	 * @throws MojoExecutionException
+	 */
+	private void mergeFacesConfig(List models) throws MojoExecutionException {
+		StringBuffer config = new StringBuffer();
+		for (int i = 0; i < library.getRenderkits().length; i++) {
+			Renderkit kit = library.getRenderkits()[i];
+			kit.setContent(new StringBuffer());
+		}
+		for (Iterator iter = models.iterator(); iter.hasNext();) {
+			Model model = (Model) iter.next();
+			File moduleFacesConfig = new File(buildDirectory, model
+					.getArtifactId()
+					+ "/META-INF/faces-config.xml");
+			if (moduleFacesConfig.exists()) {
+				getLog().info(
+						"Process faces-config.xml for module "
+								+ model.getArtifactId());
+				XMLBody configBody = new XMLBody();
+				try {
+					configBody.loadXML(new FileInputStream(moduleFacesConfig));
+					config
+							.append(configBody
+									.getContent("/faces-config/*[name()!=\'render-kit\']"));
+					for (int i = 0; i < library.getRenderkits().length; i++) {
+						Renderkit kit = library.getRenderkits()[i];
+						kit
+								.getContent()
+								.append(
+										configBody
+												.getContent("/faces-config/render-kit[child::render-kit-id='"
+														+ kit.getName()
+														+ "']/renderer"));
+					}
+				} catch (FileNotFoundException e) {
+					throw new MojoExecutionException(
+							"Could't read faces-config file", e);
+				} catch (ParsingException e) {
+					throw new MojoExecutionException(
+							"Error parsing faces-config file", e);
+				}
+			}
+		}
+		VelocityContext context = new VelocityContext();
+		context.put("content", config.toString());
+		context.put("library", library);
+		context.put("renderkits", Arrays.asList(library.getRenderkits()));
+		try {
+			writeParsedTemplate(templates + FACES_CONFIG_TEMPLATE, context,
+					new File(outputDirectory, "META-INF/faces-config.xml"));
+		} catch (Exception e) {
+			throw new MojoExecutionException(
+					"Error to process faces-config template", e);
+		}
+	}
+
+	/**
+	 * Merge XML files from extracted models to one in build directory.
+	 * 
+	 * @param models
+	 *            models collected in library.
+	 * @param filename
+	 *            relative path to config file in models/output.
+	 * @param templateName -
+	 *            name of velocity template for result file.
+	 * @param commonXpath -
+	 *            XPath expression fof common part of result file.
+	 * @param keyXPath - XPath expression for key part of common parts
+	 * @param keySet - {@link Set} to check for duplicate keys. Must not be null
+	 * @param context -
+	 *            Velocity context for template processing.
+	 * @throws MojoExecutionException
+	 */
+	private void mergeXML(List models, String filename, String templateName,
+			String commonXpath, String keyXPath, VelocityContext context, File target)
+			throws MojoExecutionException {
+		Set<String> keySet = new HashSet<String>();
+		StringBuffer content = new StringBuffer();
+		List<XMLBody> xmls = new ArrayList<XMLBody>(models.size());
+		String[] split = filename.split(",");
+		for (Iterator iter = models.iterator(); iter.hasNext();) {
+			Model model = (Model) iter.next();
+			File moduleDir = new File(buildDirectory, model.getArtifactId());
+			DirectoryScanner ds = new DirectoryScanner();
+			ds.setFollowSymlinks(true);
+			ds.setBasedir(moduleDir);
+			ds.setIncludes(split);
+			ds.addDefaultExcludes();
+			ds.scan();
+			String[] files = ds.getIncludedFiles();
+			for (int i = 0; i < files.length; i++) {
+				File moduleFacesConfig = new File(moduleDir, files[i]);
+				getLog().info(
+						"Process " + files[i] + " for module "
+								+ model.getArtifactId());
+				XMLBody configBody = new XMLBody();
+				try {
+					configBody.loadXML(new FileInputStream(moduleFacesConfig));
+					xmls.add(configBody);
+					if (commonXpath != null) {
+						if (keyXPath == null) {
+							content.append(configBody.getContent(commonXpath));
+						} else {
+							content.append(configBody.getContentUnique(commonXpath, keyXPath, keySet));
+						}
+					} else {
+						content.append(configBody.getContent());
+					}
+				} catch (FileNotFoundException e) {
+					throw new MojoExecutionException("Could't read  file "
+							+ moduleFacesConfig.getPath(), e);
+				} catch (ParsingException e) {
+					throw new MojoExecutionException(
+							"Error parsing config file "
+									+ moduleFacesConfig.getPath(), e);
+				}
+			}
+		}
+		if (xmls.size() > 0) {
+			context.put("content", content.toString());
+			context.put("library", library);
+			context.put("models", models);
+			context.put("xmls", xmls);
+			try {
+				writeParsedTemplate(templates + templateName, context, target);
+			} catch (Exception e) {
+				throw new MojoExecutionException("Error to process template "
+						+ templateName + " for files " + filename, e);
+			}
+
+		}
+	}
+
+	private void unpackArtifact(Artifact artifact, File moduleDir,
+			boolean isResource) throws MojoExecutionException {
+		try {
+			resolver.resolve(artifact, Collections.EMPTY_LIST, localRepository);
+			unpack(artifact.getFile(), moduleDir);
+			if (isResource) {
+				Resource resource = new Resource();
+				resource.setDirectory(moduleDir.getPath());
+				resource.addExclude("META-INF/faces-config.xml");
+				resource.addExclude("META-INF/resources-config.xml");
+				resource.addExclude("META-INF/*.taglib.xml");
+				resource.addExclude("META-INF/*.tld");
+				project.addResource(resource);
+
+			}
+		} catch (ArtifactResolutionException e) {
+			getLog().error("Error with resolve artifact " + artifact, e);
+		} catch (ArtifactNotFoundException e) {
+			getLog().error("Not found artifact " + artifact, e);
+		}
+	}
+
+	private List<MavenProject> populateReactorProjects() {
+		List<MavenProject> projects = new ArrayList<MavenProject>();
+		if (reactorProjects != null && reactorProjects.size() > 1) {
+			Iterator reactorItr = reactorProjects.iterator();
+
+			while (reactorItr.hasNext()) {
+				MavenProject reactorProject = (MavenProject) reactorItr.next();
+
+				if (reactorProject != null
+						&& reactorProject.getParent() != null
+						&& project.getArtifactId().equals(
+								reactorProject.getParent().getArtifactId())) {
+					String name = reactorProject.getGroupId() + ":"
+							+ reactorProject.getArtifactId();
+					getLog().info("Have reactor project with name " + name);
+					projects.add(reactorProject);
+				}
+			}
+		}
+		return projects;
+	}
+
+	/**
+	 * Unpacks the archive file.
+	 * 
+	 * @param file
+	 *            File to be unpacked.
+	 * @param location
+	 *            Location where to put the unpacked files.
+	 */
+	private void unpack(File file, File location) throws MojoExecutionException {
+
+		getLog().debug(
+				"Unpack file " + file.getAbsolutePath() + " to: "
+						+ location.getAbsolutePath());
+		try {
+			location.mkdirs();
+
+			UnArchiver unArchiver;
+
+			unArchiver = archiverManager.getUnArchiver(file);
+
+			unArchiver.setSourceFile(file);
+
+			unArchiver.setDestDirectory(location);
+
+			unArchiver.setOverwrite(true);
+
+			unArchiver.extract();
+
+		} catch (Exception e) {
+			throw new MojoExecutionException("Error unpacking file: " + file
+					+ " to: " + location + "\r\n" + e.toString(), e);
+		}
+	}
+
+	private void writePom(Model pom) throws MojoExecutionException {
+		MavenXpp3Writer pomWriter = new MavenXpp3Writer();
+		try {
+			FileWriter out = new FileWriter(generatedPom);
+			pomWriter.write(out, pom);
+		} catch (IOException e) {
+			throw new MojoExecutionException("Error for write generated pom", e);
+		}
+
+	}
+
+	/**
+	 * @return the archiverManager
+	 */
+	public ArchiverManager getArchiverManager() {
+		return this.archiverManager;
+	}
+
+	/**
+	 * @param archiverManager
+	 *            the archiverManager to set
+	 */
+	public void setArchiverManager(ArchiverManager archiverManager) {
+		this.archiverManager = archiverManager;
+	}
+
+	/**
+	 * @return the buildDirectory
+	 */
+	public File getBuildDirectory() {
+		return this.buildDirectory;
+	}
+
+	/**
+	 * @param buildDirectory
+	 *            the buildDirectory to set
+	 */
+	public void setBuildDirectory(File buildDirectory) {
+		this.buildDirectory = buildDirectory;
+	}
+
+	/**
+	 * @return the factory
+	 */
+	public org.apache.maven.artifact.factory.ArtifactFactory getFactory() {
+		return this.factory;
+	}
+
+	/**
+	 * @param factory
+	 *            the factory to set
+	 */
+	public void setFactory(
+			org.apache.maven.artifact.factory.ArtifactFactory factory) {
+		this.factory = factory;
+	}
+
+	/**
+	 * @return the localRepository
+	 */
+	public ArtifactRepository getLocalRepository() {
+		return this.localRepository;
+	}
+
+	/**
+	 * @param localRepository
+	 *            the localRepository to set
+	 */
+	public void setLocalRepository(ArtifactRepository localRepository) {
+		this.localRepository = localRepository;
+	}
+
+	/**
+	 * @return the mavenProjectBuilder
+	 */
+	public MavenProjectBuilder getMavenProjectBuilder() {
+		return this.mavenProjectBuilder;
+	}
+
+	/**
+	 * @param mavenProjectBuilder
+	 *            the mavenProjectBuilder to set
+	 */
+	public void setMavenProjectBuilder(MavenProjectBuilder mavenProjectBuilder) {
+		this.mavenProjectBuilder = mavenProjectBuilder;
+	}
+
+	/**
+	 * @return the parentProject
+	 */
+	public MavenProject getParentProject() {
+		return this.parentProject;
+	}
+
+	/**
+	 * @param parentProject
+	 *            the parentProject to set
+	 */
+	public void setParentProject(MavenProject parentProject) {
+		this.parentProject = parentProject;
+	}
+
+	/**
+	 * @return the reactorProjects
+	 */
+	public List getReactorProjects() {
+		return this.reactorProjects;
+	}
+
+	/**
+	 * @param reactorProjects
+	 *            the reactorProjects to set
+	 */
+	public void setReactorProjects(List reactorProjects) {
+		this.reactorProjects = reactorProjects;
+	}
+
+	/**
+	 * @return the resolver
+	 */
+	public org.apache.maven.artifact.resolver.ArtifactResolver getResolver() {
+		return this.resolver;
+	}
+
+	/**
+	 * @param resolver
+	 *            the resolver to set
+	 */
+	public void setResolver(
+			org.apache.maven.artifact.resolver.ArtifactResolver resolver) {
+		this.resolver = resolver;
+	}
+
+}

Added: branches/refactor1/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/CompileMojo.java
===================================================================
--- branches/refactor1/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/CompileMojo.java	                        (rev 0)
+++ branches/refactor1/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/CompileMojo.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,296 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.builder.mojo;
+
+import java.beans.PropertyDescriptor;
+import java.io.File;
+import java.lang.reflect.Array;
+import java.lang.reflect.InvocationTargetException;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.commons.beanutils.PropertyUtils;
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.model.Parent;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
+import org.apache.maven.project.MavenProject;
+import org.apache.maven.project.MavenProjectBuilder;
+import org.apache.maven.project.ProjectBuildingException;
+import org.codehaus.plexus.PlexusConstants;
+import org.codehaus.plexus.PlexusContainer;
+import org.codehaus.plexus.archiver.manager.ArchiverManager;
+import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
+import org.codehaus.plexus.context.Context;
+import org.codehaus.plexus.context.ContextException;
+import org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable;
+
+/**
+ * Compile all xml templates, matched given pattern to Java classes. Sources
+ * will be created in {@link AbstractCDKMojo#outputJavaDirectory}
+ * 
+ * @goal compile
+ * @requiresDependencyResolution compile
+ * @phase generate-sources
+ * @author shura
+ * 
+ */
+public class CompileMojo extends AbstractCDKMojo implements Contextualizable {
+
+	/**
+	 * Project executed by first compile lifecycle.
+	 * 
+	 * @parameter expression="${executedProject}"
+	 * @readonly
+	 */
+	private MavenProject executedProject;
+
+	/**
+	 * The reactor projects.
+	 * 
+	 * @parameter expression="${project.parent}"
+	 * @readonly
+	 */
+	private MavenProject parentProject;
+	/**
+	 * @parameter default-value=${project.groupId}
+	 */
+	private String defaultPackage;
+
+	/**
+	 * A list of inclusion filters for the compiler. By default, include all
+	 * files in templates directory.
+	 * 
+	 * @parameter
+	 */
+	private String[] includes;
+
+	/**
+	 * A list of exclusion filters for the compiler. None by default.
+	 * 
+	 * @parameter
+	 */
+	private String[] excludes;
+
+	/**
+	 * The local repository.
+	 * 
+	 * @parameter expression="${localRepository}"
+	 */
+	private ArtifactRepository localRepository;
+
+	/**
+	 * To look up Archiver/UnArchiver implementations
+	 * 
+	 * @component
+	 */
+	private ArchiverManager archiverManager;
+
+	/**
+	 * Project builder
+	 * 
+	 * @component
+	 */
+	private MavenProjectBuilder mavenProjectBuilder;
+	private PlexusContainer container;
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.apache.maven.plugin.Mojo#execute()
+	 */
+	public void execute() throws MojoExecutionException, MojoFailureException {
+
+		// VelocityTemplates.init();
+		try {
+			List components = container
+					.lookupList("org.ajax4jsf.templatecompiler.elements.ElementsFactory");
+			for (Iterator iter = components.iterator(); iter.hasNext();) {
+				Object element = iter.next();
+				System.out.println(element.getClass().getName());
+
+			}
+			System.out.println("Components Map");
+			Map componentsMap = container
+					.lookupMap("org.ajax4jsf.templatecompiler.elements.ElementsFactory");
+			for (Iterator iter = componentsMap.entrySet().iterator(); iter
+					.hasNext();) {
+				Map.Entry element = (Map.Entry) iter.next();
+				System.out.println(element.getKey() + ":"
+						+ element.getValue().getClass().getName());
+			}
+		} catch (ComponentLookupException e) {
+			throw new MojoExecutionException(
+					"Error lookup ElementFactory components");
+		}
+		Parent parentModel = project.getModel().getParent();
+		if (null != parentModel) {
+			String relativePath = parentModel.getRelativePath();
+			File parentPom = new File(project.getFile().getParentFile(), relativePath);
+			if (parentPom.isDirectory()) {
+				parentPom = new File(parentPom, "pom.xml");
+			}
+			if (parentPom.exists()) {
+				try {
+					parentProject = mavenProjectBuilder.build(parentPom,
+							localRepository, null);
+				} catch (ProjectBuildingException e) {
+					throw new MojoExecutionException("Error get parent project for a components library",e);
+				}
+			} else {
+				throw new MojoFailureException("Parent project pom file "+parentPom.getAbsolutePath()+" is not found for a components library");					
+			}
+		}else {
+			throw new MojoFailureException("Components library project must have parent pom with components modules");
+		}
+		getLog().info("Parent Project object :\n" + toLog(parentProject) + "\n");
+		getLog().info("Project object :\n" + toLog(project) + "\n");
+		getLog().info("Project object Model :\n" + toLog(project.getModel()) + "\n");
+		getLog().info("Project object Parent Model :\n" + toLog(project.getModel().getParent()) + "\n");
+		
+		getLog().info(
+				"Executed Project object :\n" + toLog(executedProject) + "\n");
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable#contextualize(org.codehaus.plexus.context.Context)
+	 */
+	public void contextualize(Context context) throws ContextException {
+		this.container = (PlexusContainer) context
+				.get(PlexusConstants.PLEXUS_KEY);
+
+	}
+
+	private void logBean(Object bean) {
+		StringBuffer content = new StringBuffer();
+	}
+
+	/**
+	 * Convert any Java Object to JavaScript representation ( as possible ).
+	 * 
+	 * @param obj
+	 * @return
+	 * @throws MojoExecutionException
+	 */
+	public String toLog(Object obj) throws MojoExecutionException {
+		if (null == obj) {
+			return "null";
+		} else if (obj.getClass().isArray()) {
+			StringBuffer ret = new StringBuffer("[");
+			boolean first = true;
+			for (int i = 0; i < Array.getLength(obj); i++) {
+				Object element = Array.get(obj, i);
+				if (!first) {
+					ret.append(',');
+				}
+				ret.append(toLog(element));
+				first = false;
+			}
+			return ret.append("]\n").toString();
+		} else if (obj instanceof Collection) {
+			// Collections put as JavaScript array.
+			Collection collection = (Collection) obj;
+			StringBuffer ret = new StringBuffer("[");
+			boolean first = true;
+			for (Iterator iter = collection.iterator(); iter.hasNext();) {
+				Object element = iter.next();
+				if (!first) {
+					ret.append(',');
+				}
+				ret.append(toLog(element));
+				first = false;
+			}
+			return ret.append("]\n").toString();
+		} else if (obj instanceof Map) {
+			// Maps put as JavaScript hash.
+			Map map = (Map) obj;
+
+			StringBuffer ret = new StringBuffer("{");
+			boolean first = true;
+			for (Iterator iter = map.keySet().iterator(); iter.hasNext();) {
+				Object key = (Object) iter.next();
+				if (!first) {
+					ret.append(',');
+				}
+				ret.append(key);
+				ret.append(":");
+				ret.append(toLog(map.get(key)));
+				first = false;
+			}
+			return ret.append("}\n").toString();
+		} else if (obj instanceof Number || obj instanceof Boolean) {
+			// numbers and boolean put as-is, without conversion
+			return obj.toString();
+		} else if (obj instanceof String) {
+			// all other put as encoded strings.
+			StringBuffer ret = new StringBuffer();
+			addEncodedString(ret, obj);
+			return ret.append("\n").toString();
+		}
+		// All other objects threaded as Java Beans.
+		try {
+			StringBuffer ret = new StringBuffer("{");
+			PropertyDescriptor[] propertyDescriptors = PropertyUtils
+					.getPropertyDescriptors(obj);
+			boolean first = true;
+			for (int i = 0; i < propertyDescriptors.length; i++) {
+				PropertyDescriptor propertyDescriptor = propertyDescriptors[i];
+				String key = propertyDescriptor.getName();
+				if ("class".equals(key)
+						|| propertyDescriptor.getReadMethod() == null) {
+					continue;
+				}
+				if (!first) {
+					ret.append(",\n\t");
+				}
+				addEncodedString(ret, key);
+				ret.append(":");
+				try {
+					ret.append(String.valueOf(PropertyUtils.getProperty(obj,
+							key)));
+
+				} catch (InvocationTargetException e) {
+					ret.append("Not ACCESIBLE");
+				}// ret.append(toLog(PropertyUtils.getProperty(obj, key)));
+				first = false;
+			}
+			return ret.append("}\n").toString();
+		} catch (Exception e) {
+			throw new MojoExecutionException(
+					"Error in conversion Java Object to String", e);
+		}
+	}
+
+	public void addEncodedString(StringBuffer buff, Object obj) {
+		buff.append("'");
+		buff.append(obj);
+		buff.append("'");
+
+	}
+
+}

Added: branches/refactor1/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/CreateComponentMojo.java
===================================================================
--- branches/refactor1/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/CreateComponentMojo.java	                        (rev 0)
+++ branches/refactor1/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/CreateComponentMojo.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,140 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.builder.mojo;
+
+import java.io.File;
+import java.util.Iterator;
+import java.util.List;
+
+import org.apache.maven.model.Plugin;
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
+import org.apache.velocity.VelocityContext;
+
+/**
+ * @author shura
+ * @goal create
+ *
+ */
+public class CreateComponentMojo extends AbstractCDKMojo {
+
+	private static final String TEMPLATES_PREFIX = "/component/";
+	
+	private static final String CONFIG_TEMPLATE = TEMPLATES_PREFIX+"config.xml";
+
+	private static final String CLASS_TEMPLATE = TEMPLATES_PREFIX+"UIClass.java";
+
+	private static final String RENDERER_TEMPLATE = TEMPLATES_PREFIX+"template.jspx";
+
+	/**
+	 * @parameter expression="${name}"
+	 * @required
+	 */
+	private String name ;
+	
+	/**
+	 * @parameter expression="${markup}"
+	 */
+	private String markup ;
+	
+	/**
+	 * @parameter expression="${baseClass}" default-value="javax.faces.component.UIComponentBase"
+	 */
+	private String baseClass ;
+
+	/**
+	 * Directory where the output Java Files will be located.
+	 * 
+	 * @parameter expression="${project.build.plugins}"
+	 * @required
+	 * @readonly
+	 */
+     private List plugins ;
+	
+	/* (non-Javadoc)
+	 * @see org.apache.maven.plugin.Mojo#execute()
+	 */
+	public void execute() throws MojoExecutionException, MojoFailureException {
+		if(project.getFile()!= null){
+			boolean found= false;
+			Plugin plugin = null;
+			// Search for this plugin in project pom
+			for (Iterator iter = plugins.iterator(); iter.hasNext();) {
+				plugin = (Plugin) iter.next();
+				if("maven-cdk-plugin".equals(plugin.getArtifactId()) && 
+						"org.ajax4jsf.cdk".equals(plugin.getGroupId())){
+					found = true;
+					break;
+				}
+			}
+			if(found){
+				try {
+					createComponent(plugin);
+				} catch (Exception e) {
+					throw new MojoExecutionException("Error on create component",e);
+				}
+			} else {
+				throw new MojoFailureException("This project is not configured for JSF components generation");
+			}
+		} else {
+			throw new MojoFailureException("Goal 'create' must be run in existing project directory");
+		}
+
+	}
+
+	/**
+	 * @param plugin
+	 * @throws Exception 
+	 */
+	private void createComponent(Plugin plugin) throws Exception {
+		checkLibraryConfig();
+		String className = Character.toUpperCase(name.charAt(0))+name.substring(1);
+		VelocityContext context = new VelocityContext();
+		context.put("name", name);
+		context.put("className", className);
+		String basePackage = baseClass.substring(0, baseClass.lastIndexOf('.'));
+		String baseClassName = baseClass.substring(baseClass.lastIndexOf('.')+1);
+		context.put("baseClass", baseClass);
+		context.put("basePackage", basePackage);
+		context.put("baseClassName", baseClassName);
+		String prefix = library.getPrefix();
+		context.put("package", prefix);
+		context.put("prefix", prefix);
+		String path = prefix.replace('.', '/');
+		context.put("path", path);
+		if(null == markup){
+			markup = library.getRenderkits()[0].getMarkup();
+		}
+		context.put("markup", markup);
+		String markupName = Character.toUpperCase(markup.charAt(0))+markup.substring(1);
+		context.put("markupName", markupName);
+		// Create component configuration file.
+		File configFile = new File(componentConfigDirectory,name+".xml");
+		writeParsedTemplate(CONFIG_TEMPLATE, context, configFile);
+		File classFile = new File(project.getBuild().getSourceDirectory()+"/"+path+"/component/UI"+className+".java");
+		writeParsedTemplate(CLASS_TEMPLATE, context, classFile);
+		File templFile = new File(templatesDirectory,path+"/"+markup+className+".jspx");
+		writeParsedTemplate(RENDERER_TEMPLATE, context, templFile);
+	}
+
+}

Added: branches/refactor1/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/GenerateMojo.java
===================================================================
--- branches/refactor1/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/GenerateMojo.java	                        (rev 0)
+++ branches/refactor1/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/GenerateMojo.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,292 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.builder.mojo;
+
+import java.io.File;
+import java.io.FilenameFilter;
+
+import org.ajax4jsf.builder.config.BuilderConfig;
+import org.ajax4jsf.builder.config.ParsingException;
+import org.ajax4jsf.builder.generator.ComponentGenerator;
+import org.ajax4jsf.builder.generator.ConverterGenerator;
+import org.ajax4jsf.builder.generator.ConverterTagGenerator;
+import org.ajax4jsf.builder.generator.FaceletsTaglibGenerator;
+import org.ajax4jsf.builder.generator.FacesConfigGenerator;
+import org.ajax4jsf.builder.generator.GeneratorException;
+import org.ajax4jsf.builder.generator.JSFGeneratorConfiguration;
+import org.ajax4jsf.builder.generator.ListenerGenerator;
+import org.ajax4jsf.builder.generator.RenderKitBean;
+import org.ajax4jsf.builder.generator.RendererGenerator;
+import org.ajax4jsf.builder.generator.ResourcesConfigGenerator;
+import org.ajax4jsf.builder.generator.ComponentTagGenerator;
+import org.ajax4jsf.builder.generator.TagHandlerGenerator;
+import org.ajax4jsf.builder.generator.TaglibGenerator;
+import org.ajax4jsf.builder.generator.ValidatorGenerator;
+import org.ajax4jsf.builder.generator.ValidatorTagGenerator;
+import org.ajax4jsf.builder.maven.MavenLogger;
+import org.ajax4jsf.builder.velocity.BuilderContext;
+import org.apache.maven.model.Resource;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
+import org.apache.maven.project.MavenProject;
+import org.apache.velocity.Template;
+import org.apache.velocity.exception.ParseErrorException;
+import org.apache.velocity.exception.ResourceNotFoundException;
+
+/**
+ * This plugin geterate JSF components and renderers source code, as well as
+ * configuration files.
+ * 
+ * @author shura
+ * @goal generate
+ * @requiresDependencyResolution compile
+ * @phase generate-sources
+ * @execute phase="compile"
+ */
+public class GenerateMojo extends AbstractCDKMojo implements
+		JSFGeneratorConfiguration {
+
+	/**
+	 * Project executed by first compile lifecycle.
+	 * 
+	 * @parameter expression="${executedProject}"
+	 * @readonly
+	 */
+	protected MavenProject executedProject;
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.apache.maven.plugin.Mojo#execute()
+	 */
+	public void execute() throws MojoExecutionException, MojoFailureException {
+		getLog().debug("GenerateMojo components");
+		if (null != executedProject) {
+			Taglib taglib = checkLibraryConfig();
+			// compile goal executed
+			try {
+				// Parse config files.
+				ClassLoader generatiorLoader = createProjectClassLoader(executedProject);
+				BuilderConfig config = createConfig(generatiorLoader);
+				MavenLogger mavenLogger = new MavenLogger(getLog());
+				// TODO - parse sources by qdox for JavaDoc comments ?
+				// GenerateMojo components.
+				ComponentGenerator compGenerator = new ComponentGenerator(this,
+						mavenLogger);
+				compGenerator.createFiles(config);
+				// GenerateMojo validators
+				ValidatorGenerator validatorGenerator = new ValidatorGenerator(this, mavenLogger);
+				validatorGenerator.createFiles(config);
+				// GenerateMojo converters
+				ConverterGenerator converterGenerator = new ConverterGenerator(this, mavenLogger);
+				converterGenerator.createFiles(config);
+				// GenerateMojo renderers
+				RendererGenerator rendererGenerator = new RendererGenerator(
+						this, mavenLogger);
+				rendererGenerator.setSrcDir(templatesDirectory);
+				rendererGenerator.createFiles(config);
+				// GenerateMojo component test
+/*				
+				ComponentTestGenerator componentTestGenerator = new ComponentTestGenerator(this, mavenLogger);
+				componentTestGenerator.setDestDir(outputTestsDirectory);
+				componentTestGenerator.createFiles(config);
+*/				
+				// GenerateMojo tags
+				ComponentTagGenerator componentTagGenerator = new ComponentTagGenerator(this, mavenLogger);
+				componentTagGenerator.createFiles(config);
+            
+//        GenerateMojo tags for validators
+            ValidatorTagGenerator validatorTagGenerator = new ValidatorTagGenerator(this, mavenLogger);
+            validatorTagGenerator.createFiles(config);
+            
+//          GenerateMojo tags for converters
+            ConverterTagGenerator converterTagGenerator = new ConverterTagGenerator(this, mavenLogger);
+            converterTagGenerator.createFiles(config);
+				
+				// GenerateMojo tag test
+/*				
+				TagTestGenerator tagTestGenerator = new TagTestGenerator(this, mavenLogger);
+				tagTestGenerator.setDestDir(outputTestsDirectory);
+				tagTestGenerator.createFiles(config);
+*/				
+				// GenerateMojo tag handlers
+				TagHandlerGenerator tagHandlerGenerator = new TagHandlerGenerator(
+						this, mavenLogger);
+				tagHandlerGenerator.createFiles(config);
+				//Generate listeners
+				ListenerGenerator listenerGenerator = new ListenerGenerator(this, mavenLogger);
+				listenerGenerator.createFiles(config);
+				
+				JSFGeneratorConfiguration resourcesConfiguration = new JSFGeneratorConfiguration() {
+
+					public ClassLoader getClassLoader() {
+						return createProjectClassLoader(executedProject);
+					}
+
+					public File getDestDir() {
+						return outputResourcesDirectory;
+					}
+
+					public String getKey() {
+						return key;
+					}
+
+					public Template getTemplate(String name) throws GeneratorException {
+						return GenerateMojo.this.getTemplate(name);
+					}
+
+					public String getTemplatesPath() {
+						return GenerateMojo.this.getTemplatesPath();
+					}
+
+				};
+				// GenerateMojo faces-config
+				FacesConfigGenerator configGenerator = new FacesConfigGenerator(
+						resourcesConfiguration, mavenLogger);
+				configGenerator.setInclude(facesConfigInclude);
+				configGenerator.setFacesconfig(new File(
+						outputResourcesDirectory, "META-INF/faces-config.xml"));
+				RenderKitBean renderKitBean = configGenerator.createRenderKit();
+				renderKitBean.setRenderkitid("HTML_BASIC");
+				configGenerator.createFiles(config);
+				// GenerateMojo JSP taglib
+				if (null != taglib) {
+					TaglibGenerator taglibGenerator = new TaglibGenerator(
+							resourcesConfiguration, mavenLogger);
+					taglibGenerator.setUri(taglib.getUri());
+					taglibGenerator.setShortname(taglib.getShortName());
+					taglibGenerator.setListenerclass(taglib.getListenerClass());
+					taglibGenerator.setDisplayname(taglib.getDisplayName());
+					taglibGenerator.setListenerclass(taglib.getListenerClass());
+					taglibGenerator.setValidatorclass(taglib.getValidatorClass());
+					taglibGenerator.setTlibversion(taglib.getTlibVersion());
+					taglibGenerator.setJspversion(taglib.getJspVersion());
+					taglibGenerator.setInclude(taglibInclude);
+					taglibGenerator.setTaglib(new File(
+							outputResourcesDirectory, "META-INF/"+taglib.getShortName()
+									+ ".tld"));
+					taglibGenerator.createFiles(config);
+					// GenerateMojo Facelets taglib
+					FaceletsTaglibGenerator faceletsTaglibGenerator = new FaceletsTaglibGenerator(
+							resourcesConfiguration, mavenLogger);
+					faceletsTaglibGenerator.setUri(taglib.getUri());
+					faceletsTaglibGenerator.setShortname(taglib.getShortName());
+					faceletsTaglibGenerator.setInclude(taglibInclude);
+					faceletsTaglibGenerator.setTaglib(new File(
+							outputResourcesDirectory, "META-INF/"+taglib.getShortName()
+									+ ".taglib.xml"));
+					faceletsTaglibGenerator.createFiles(config);
+				}
+				
+				// Generate resources configuration file resources-config.xml
+				// for all images/scripts/css...
+				ResourcesConfigGenerator resourcesConfigGenerator = new ResourcesConfigGenerator(resourcesConfiguration, mavenLogger);
+				resourcesConfigGenerator.setInclude(resourcesInclude);
+				resourcesConfigGenerator.setTemplates(templatesDirectory);
+				resourcesConfigGenerator.setResourcesConfig(new File(
+						outputResourcesDirectory, "META-INF/resources-config.xml"));
+				resourcesConfigGenerator.createFiles(config);
+				
+				// Add generated sources and resources to project
+				project.addCompileSourceRoot(outputJavaDirectory.getPath());
+//				project.addCompileSourceRoot(outputTestsDirectory.getPath());
+				
+				Resource resource = new Resource();
+				resource.setDirectory(outputResourcesDirectory.getPath());
+//				resource.setTargetPath("META-INF");
+				project.addResource(resource);
+			} catch (Exception e) {
+				getLog().error("Error on generate component", e);
+				throw new MojoExecutionException(
+						"Error in component generation", e);
+			}
+		}
+
+	}
+
+	protected BuilderConfig createConfig(ClassLoader generatiorLoader)
+			throws ParsingException {
+		BuilderConfig builderConfig = new BuilderConfig(generatiorLoader,
+				new MavenLogger(getLog()));
+		// Get all *.xml config files
+		FilenameFilter filter = new FilenameFilter() {
+
+			public boolean accept(File dir, String name) {
+
+				return name.toLowerCase().endsWith(".xml");
+			}
+
+		};
+		File[] files = componentConfigDirectory.listFiles(filter);
+		if (null == files) {
+			throw new ParsingException("No config files found");
+		}
+		for (int i = 0; i < files.length; i++) {
+			builderConfig.parseConfig(files[i]);
+		}
+		builderConfig.checkComopnentProperties();
+		return builderConfig;
+	}
+
+	public File getDestDir() {
+		// TODO Auto-generated method stub
+		return outputJavaDirectory;
+	}
+
+	public String getKey() {
+		// TODO Auto-generated method stub
+		return key;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.builder.generator.JSFGeneratorConfiguration#getClassLoader()
+	 */
+	public ClassLoader getClassLoader() {
+		return createProjectClassLoader(executedProject);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.builder.generator.JSFGeneratorConfiguration#getTemplate(java.lang.String)
+	 */
+	public Template getTemplate(String name) throws GeneratorException {
+		// TODO Auto-generated method stub
+		try {
+			return this.velocity.getEngine().getTemplate(name);
+		} catch (ResourceNotFoundException e) {
+			throw new GeneratorException(e.getLocalizedMessage());
+		} catch (ParseErrorException e) {
+			throw new GeneratorException(e.getLocalizedMessage());
+		} catch (Exception e) {
+			throw new GeneratorException(e.getLocalizedMessage());
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.builder.generator.JSFGeneratorConfiguration#getTemplatesPath()
+	 */
+	public String getTemplatesPath() {		
+		return Library.JSF12.equals(library.getJsfVersion())?BuilderContext.TEMPLATES12_PATH:BuilderContext.TEMPLATES_PATH;
+	}
+
+}

Added: branches/refactor1/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/GenerateTestMojo.java
===================================================================
--- branches/refactor1/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/GenerateTestMojo.java	                        (rev 0)
+++ branches/refactor1/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/GenerateTestMojo.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,152 @@
+package org.ajax4jsf.builder.mojo;
+
+import org.ajax4jsf.builder.config.BuilderConfig;
+import org.ajax4jsf.builder.generator.ComponentTestGenerator;
+import org.ajax4jsf.builder.generator.TagTestGenerator;
+import org.ajax4jsf.builder.maven.MavenLogger;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
+import org.apache.maven.project.MavenProject;
+import org.apache.velocity.Template;
+
+/**
+ * 
+ * @author dbiatenia
+ * @goal generate-tests
+ * @requiresDependencyResolution test
+ * @phase generate-test-sources
+ * @execute phase="test-compile"
+ */
+public class GenerateTestMojo extends GenerateMojo{
+
+	public void execute() throws MojoExecutionException, MojoFailureException {
+		getLog().debug("GenerateTestMojo tests");
+		if (null != executedProject) {
+			Taglib taglib = checkLibraryConfig();
+			// compile goal executed
+			try {
+				// Parse config files.
+				ClassLoader generatiorLoader = createProjectClassLoader(executedProject);
+				BuilderConfig config = createConfig(generatiorLoader);
+				MavenLogger mavenLogger = new MavenLogger(getLog());
+				// TODO - parse sources by qdox for JavaDoc comments ?
+				// GenerateMojo components.
+/*				
+				ComponentGenerator compGenerator = new ComponentGenerator(this,
+						mavenLogger);
+				compGenerator.createFiles(config);
+*/				
+				// GenerateMojo renderers
+/*				
+				RendererGenerator rendererGenerator = new RendererGenerator(
+						this, mavenLogger);
+				rendererGenerator.setSrcDir(templatesDirectory);
+				rendererGenerator.createFiles(config);
+*/				
+				// GenerateMojo component test 
+				ComponentTestGenerator componentTestGenerator = new ComponentTestGenerator(this, mavenLogger);
+				componentTestGenerator.setDestDir(outputTestsDirectory);
+				componentTestGenerator.createFiles(config);
+				
+				// GenerateMojo tags
+/*				
+				TagGenerator tagGenerator = new TagGenerator(this, mavenLogger);
+				tagGenerator.createFiles(config);
+*/				
+				// GenerateMojo tag test
+				TagTestGenerator tagTestGenerator = new TagTestGenerator(this, mavenLogger);
+				tagTestGenerator.setDestDir(outputTestsDirectory);
+				tagTestGenerator.createFiles(config);
+				
+				// GenerateMojo tag handlers
+/*				
+				TagHandlerGenerator tagHandlerGenerator = new TagHandlerGenerator(
+						this, mavenLogger);
+				tagHandlerGenerator.createFiles(config);
+				//Generate listeners
+				ListenerGenerator listenerGenerator = new ListenerGenerator(this, mavenLogger);
+				listenerGenerator.createFiles(config);
+*/
+/*				
+				JSFGeneratorConfiguration resourcesConfiguration = new JSFGeneratorConfiguration() {
+
+					public ClassLoader getClassLoader() {
+						return createProjectClassLoader(executedProject);
+					}
+
+					public File getDestDir() {
+						return outputResourcesDirectory;
+					}
+
+					public String getKey() {
+						return key;
+					}
+
+					public Template getTemplate(String name) throws GeneratorException {
+						return GenerateTestMojo.this.getTemplate(name);
+					}
+
+					public String getTemplatesPath() {
+						return GenerateTestMojo.this.getTemplatesPath();
+					}
+
+				};
+				// GenerateMojo faces-config
+				FacesConfigGenerator configGenerator = new FacesConfigGenerator(
+						resourcesConfiguration, mavenLogger);
+				configGenerator.setInclude(facesConfigInclude);
+				configGenerator.setFacesconfig(new File(
+						outputResourcesDirectory, "META-INF/faces-config.xml"));
+				RenderKitBean renderKitBean = configGenerator.createRenderKit();
+				renderKitBean.setRenderkitid("HTML_BASIC");
+				configGenerator.createFiles(config);
+				// GenerateMojo JSP taglib
+				if (null != taglib) {
+					TaglibGenerator taglibGenerator = new TaglibGenerator(
+							resourcesConfiguration, mavenLogger);
+					taglibGenerator.setUri(taglib.getUri());
+					taglibGenerator.setShortname(taglib.getShortName());
+					taglibGenerator.setListenerclass(taglib.getListenerClass());
+					taglibGenerator.setDisplayname(taglib.getDisplayName());
+					taglibGenerator.setListenerclass(taglib.getListenerClass());
+					taglibGenerator.setValidatorclass(taglib.getValidatorClass());
+					taglibGenerator.setTlibversion(taglib.getTlibVersion());
+					taglibGenerator.setJspversion(taglib.getJspVersion());
+					taglibGenerator.setInclude(taglibInclude);
+					taglibGenerator.setTaglib(new File(
+							outputResourcesDirectory, "META-INF/"+taglib.getShortName()
+									+ ".tld"));
+					taglibGenerator.createFiles(config);
+					// GenerateMojo Facelets taglib
+					FaceletsTaglibGenerator faceletsTaglibGenerator = new FaceletsTaglibGenerator(
+							resourcesConfiguration, mavenLogger);
+					faceletsTaglibGenerator.setUri(taglib.getUri());
+					faceletsTaglibGenerator.setShortname(taglib.getShortName());
+					faceletsTaglibGenerator.setInclude(taglibInclude);
+					faceletsTaglibGenerator.setTaglib(new File(
+							outputResourcesDirectory, "META-INF/"+taglib.getShortName()
+									+ ".taglib.xml"));
+					faceletsTaglibGenerator.createFiles(config);
+				}
+				// Generate resources configuration file resources-config.xml
+				// for all images/scripts/css...
+				// Add generated sources and resources to project
+*/				 
+//				project.addCompileSourceRoot(outputJavaDirectory.getPath());
+				project.addTestCompileSourceRoot(outputTestsDirectory.getPath());
+/*				
+				Resource resource = new Resource();
+				resource.setDirectory(outputResourcesDirectory.getPath());
+//				resource.setTargetPath("META-INF");
+				project.addResource(resource);
+*/				
+			} catch (Exception e) {
+				getLog().error("Error on generate component", e);
+				throw new MojoExecutionException(
+						"Error in component generation", e);
+			}
+		}
+
+	}
+
+}

Added: branches/refactor1/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/Library.java
===================================================================
--- branches/refactor1/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/Library.java	                        (rev 0)
+++ branches/refactor1/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/Library.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,128 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.builder.mojo;
+
+/**
+ * @author shura
+ * 
+ */
+public class Library {
+
+	public static final String JSF10 = "1.0";
+
+	public static final String JSF11 = "1.1";
+
+	public static final String JSF12 = "1.2";
+
+	private String _prefix;
+
+	private String _description;
+
+	private String _jsfVersion;
+
+	private Taglib _taglib;
+
+	private Renderkit[] _renderkits;
+
+	/**
+	 * @return the prefix
+	 */
+	public String getPrefix() {
+		return this._prefix;
+	}
+
+	/**
+	 * @param prefix
+	 *            the prefix to set
+	 */
+	public void setPrefix(String prefix) {
+		this._prefix = prefix;
+	}
+
+	/**
+	 * @return the renderkits
+	 */
+	public Renderkit[] getRenderkits() {
+		return this._renderkits;
+	}
+
+	/**
+	 * @param renderkits
+	 *            the renderkits to set
+	 */
+	public void setRenderkits(Renderkit[] renderkits) {
+		this._renderkits = renderkits;
+	}
+
+	/**
+	 * @return the taglib
+	 */
+	public Taglib getTaglib() {
+		return this._taglib;
+	}
+
+	/**
+	 * @param taglib
+	 *            the taglib to set
+	 */
+	public void setTaglib(Taglib taglib) {
+		this._taglib = taglib;
+	}
+
+	/**
+	 * @return the description
+	 */
+	public String getDescription() {
+		return this._description;
+	}
+
+	/**
+	 * @param description
+	 *            the description to set
+	 */
+	public void setDescription(String description) {
+		this._description = description;
+	}
+
+	/**
+	 * @return the jsfVersion
+	 */
+	public String getJsfVersion() {
+		return this._jsfVersion;
+	}
+
+	/**
+	 * @param jsfVersion
+	 *            the jsfVersion to set
+	 */
+	public void setJsfVersion(String jsfVersion) {
+		if (JSF10.equals(jsfVersion) || JSF11.equals(jsfVersion)
+				|| JSF12.equals(jsfVersion)) {
+			this._jsfVersion = jsfVersion;
+
+		} else {
+			throw new IllegalArgumentException(
+					"Supported JSF versions is  1.0,1.1 and 1.2 only. ");
+		}
+	}
+
+}

Added: branches/refactor1/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/Renderkit.java
===================================================================
--- branches/refactor1/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/Renderkit.java	                        (rev 0)
+++ branches/refactor1/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/Renderkit.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,124 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.builder.mojo;
+
+/**
+ * @author shura
+ *
+ */
+public class Renderkit {
+	
+	private String _name = "HTML_BASIC";
+	
+	private String _markup = "html";
+	
+	private String _classname;
+	
+	private String _package;
+	
+	private StringBuffer _content;
+
+	/**
+	 * @return the classname
+	 */
+	public String getClassname() {
+		return this._classname;
+	}
+
+	/**
+	 * @param classname the classname to set
+	 */
+	public void setClassname(String classname) {
+		this._classname = classname;
+	}
+
+	/**
+	 * @return the markup
+	 */
+	public String getMarkup() {
+		return this._markup;
+	}
+
+	/**
+	 * @param markup the markup to set
+	 */
+	public void setMarkup(String markup) {
+		this._markup = markup;
+	}
+
+	/**
+	 * @return the name
+	 */
+	public String getName() {
+		return this._name;
+	}
+
+	/**
+	 * @param name the name to set
+	 */
+	public void setName(String name) {
+		this._name = name;
+	}
+
+	/**
+	 * @return the package
+	 */
+	public String getPackage() {
+		return this._package;
+	}
+
+	/**
+	 * @param package1 the package to set
+	 */
+	public void setPackage(String package1) {
+		this._package = package1;
+	}
+
+	/**
+	 * @return the content
+	 */
+	StringBuffer getContent() {
+		return this._content;
+	}
+
+	/**
+	 * @param content the content to set
+	 */
+	void setContent(StringBuffer content) {
+		this._content = content;
+	}
+	
+	public String getFacesConfig(){
+		if(null != _content){
+			return _content.toString();
+		}
+		return "";
+	}
+	/* (non-Javadoc)
+	 * @see java.lang.Object#toString()
+	 */
+	public String toString() {
+		// TODO Auto-generated method stub
+		return "render-kit id ["+_name+"], class ["+_classname+"], content :"+_content;
+	}
+
+}

Added: branches/refactor1/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/Taglib.java
===================================================================
--- branches/refactor1/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/Taglib.java	                        (rev 0)
+++ branches/refactor1/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/Taglib.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,159 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.builder.mojo;
+
+import java.io.File;
+
+/**
+ * @author shura
+ *
+ */
+public class Taglib {
+	
+	private File _taglib;
+	
+	private String _uri;
+	
+	private String _shortName;
+	
+	private String _listenerClass;
+	
+	private String _displayName;
+
+	private String _tlibVersion = "1.2";
+	
+	private String _jspVersion ;
+		
+	private String _validatorClass = null;
+	/**
+	 * @return the displayName
+	 */
+	public String getDisplayName() {
+		return this._displayName;
+	}
+
+	/**
+	 * @param displayName the displayName to set
+	 */
+	public void setDisplayName(String displayName) {
+		this._displayName = displayName;
+	}
+
+	/**
+	 * @return the listenerClass
+	 */
+	public String getListenerClass() {
+		return this._listenerClass;
+	}
+
+	/**
+	 * @param listenerClass the listenerClass to set
+	 */
+	public void setListenerClass(String listenerClass) {
+		this._listenerClass = listenerClass;
+	}
+
+	/**
+	 * @return the shortName
+	 */
+	public String getShortName() {
+		return this._shortName;
+	}
+
+	/**
+	 * @param shortName the shortName to set
+	 */
+	public void setShortName(String shortName) {
+		this._shortName = shortName;
+	}
+
+	/**
+	 * @return the taglib
+	 */
+	public File getTaglib() {
+		return this._taglib;
+	}
+
+	/**
+	 * @param taglib the taglib to set
+	 */
+	public void setTaglib(File taglib) {
+		this._taglib = taglib;
+	}
+
+	/**
+	 * @return the uri
+	 */
+	public String getUri() {
+		return this._uri;
+	}
+
+	/**
+	 * @param uri the uri to set
+	 */
+	public void setUri(String uri) {
+		this._uri = uri;
+	}
+
+	/**
+	 * @return the jspVersion
+	 */
+	public String getJspVersion() {
+		return this._jspVersion;
+	}
+
+	/**
+	 * @param jspVersion the jspVersion to set
+	 */
+	public void setJspVersion(String jspVersion) {
+		this._jspVersion = jspVersion;
+	}
+
+	/**
+	 * @return the tlibVersion
+	 */
+	public String getTlibVersion() {
+		return this._tlibVersion;
+	}
+
+	/**
+	 * @param tlibVersion the tlibVersion to set
+	 */
+	public void setTlibVersion(String tlibVersion) {
+		this._tlibVersion = tlibVersion;
+	}
+
+	/**
+	 * @return the validatorClass
+	 */
+	public String getValidatorClass() {
+		return this._validatorClass;
+	}
+
+	/**
+	 * @param validatorClass the validatorClass to set
+	 */
+	public void setValidatorClass(String validatorClass) {
+		this._validatorClass = validatorClass;
+	}
+
+}

Added: branches/refactor1/cdk/maven-cdk-plugin/src/main/resources/VM_global_library.vm
===================================================================
--- branches/refactor1/cdk/maven-cdk-plugin/src/main/resources/VM_global_library.vm	                        (rev 0)
+++ branches/refactor1/cdk/maven-cdk-plugin/src/main/resources/VM_global_library.vm	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,6 @@
+#macro( quietnull $a)
+#if($a)$a#end
+#end
+
+
+

Added: branches/refactor1/cdk/maven-cdk-plugin/src/main/resources/component/UIClass.java
===================================================================
--- branches/refactor1/cdk/maven-cdk-plugin/src/main/resources/component/UIClass.java	                        (rev 0)
+++ branches/refactor1/cdk/maven-cdk-plugin/src/main/resources/component/UIClass.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,19 @@
+/**
+ *
+ */
+
+package ${package}.component;
+
+import ${baseClass};
+
+/**
+ * JSF component class
+ *
+ */
+public abstract class UI${className} extends ${baseClassName} {
+	
+	private static final String COMPONENT_TYPE = "${prefix}.${className}";
+	
+	private static final String COMPONENT_FAMILY = "${prefix}.${className}";
+	
+}

Added: branches/refactor1/cdk/maven-cdk-plugin/src/main/resources/component/config.xml
===================================================================
--- branches/refactor1/cdk/maven-cdk-plugin/src/main/resources/component/config.xml	                        (rev 0)
+++ branches/refactor1/cdk/maven-cdk-plugin/src/main/resources/component/config.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN"  "https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" >
+<components>
+	<component>
+		<name>${prefix}.${className}</name>
+		<family>${prefix}.${className}</family>
+		<classname>${package}.component.${markup}.${markupName}${className}</classname>
+		<superclass>${package}.component.UI${className}</superclass>
+		<description>
+			<![CDATA[
+    ]]>
+		</description>
+		<renderer generate="true" override="true">
+			<name>${prefix}.${className}Renderer</name>
+			<template>${path}/${markup}${className}.jspx</template>
+		</renderer>
+		<tag>
+			<name>${name}</name>
+			<classname>${package}.taglib.${className}Tag</classname>
+			<superclass>
+				org.ajax4jsf.framework.taglib.HtmlComponentTagBase
+			</superclass>
+		</tag>
+		<!--
+		<taghandler>
+			<classname>org.ajax4jsf.tag.TestHandler</classname>
+		</taghandler>
+		-->
+		&ui_component_attributes;
+		<!--
+		<property>
+			<name>param</name>
+			<classname>java.lang.String</classname>
+			<description>
+			</description>
+			<defaultvalue>"default"</defaultvalue>
+		</property>
+        -->
+	</component>
+</components>

Added: branches/refactor1/cdk/maven-cdk-plugin/src/main/resources/component/template.jspx
===================================================================
--- branches/refactor1/cdk/maven-cdk-plugin/src/main/resources/component/template.jspx	                        (rev 0)
+++ branches/refactor1/cdk/maven-cdk-plugin/src/main/resources/component/template.jspx	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<f:root 
+	xmlns:f="http://ajax4jsf.org/cdk/template" 
+	xmlns:c=" http://java.sun.com/jsf/core" 
+	xmlns:ui=" http://ajax4jsf.org/cdk/ui"
+	xmlns:u=" http://ajax4jsf.org/cdk/u"
+	xmlns:x=" http://ajax4jsf.org/cdk/x"
+	class="${package}.renderkit.${markup}.${className}Renderer"
+	baseclass="org.ajax4jsf.framework.renderer.AjaxComponentRendererBase"
+	component="${package}.component.UI${className}" 
+	>
+	<f:clientid var="clientId"/>
+	<div id="#{clientId}"
+		x:passThruWithExclusions="value,name,type,id"
+		>
+	</div>
+</f:root>
\ No newline at end of file

Added: branches/refactor1/cdk/maven-cdk-plugin/src/main/resources/templates/faces-config.vm
===================================================================
--- branches/refactor1/cdk/maven-cdk-plugin/src/main/resources/templates/faces-config.vm	                        (rev 0)
+++ branches/refactor1/cdk/maven-cdk-plugin/src/main/resources/templates/faces-config.vm	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
+                              "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
+<faces-config>
+${content}
+
+#foreach( $kit in ${renderkits})
+  <render-kit>
+		#if(${kit.name})
+		<render-kit-id>${kit.name}</render-kit-id>
+		#if(${kit.classname})
+		<render-kit-class>${kit.classname}</render-kit-class>
+		#end
+		#end
+		${kit.facesConfig}
+  </render-kit>
+#end
+
+
+</faces-config>

Added: branches/refactor1/cdk/maven-cdk-plugin/src/main/resources/templates/resources-config.vm
===================================================================
--- branches/refactor1/cdk/maven-cdk-plugin/src/main/resources/templates/resources-config.vm	                        (rev 0)
+++ branches/refactor1/cdk/maven-cdk-plugin/src/main/resources/templates/resources-config.vm	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<resource-config>
+${content}
+</resource-config>

Added: branches/refactor1/cdk/maven-cdk-plugin/src/main/resources/templates/taglib.vm
===================================================================
--- branches/refactor1/cdk/maven-cdk-plugin/src/main/resources/templates/taglib.vm	                        (rev 0)
+++ branches/refactor1/cdk/maven-cdk-plugin/src/main/resources/templates/taglib.vm	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE facelet-taglib PUBLIC
+  "-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN"
+  "http://java.sun.com/dtd/facelet-taglib_1_0.dtd">
+<facelet-taglib xmlns="http://java.sun.com/JSF/Facelet">
+<namespace>${library.taglib.uri}</namespace>
+
+${content}
+</facelet-taglib>
\ No newline at end of file

Added: branches/refactor1/cdk/maven-cdk-plugin/src/main/resources/templates/tld.vm
===================================================================
--- branches/refactor1/cdk/maven-cdk-plugin/src/main/resources/templates/tld.vm	                        (rev 0)
+++ branches/refactor1/cdk/maven-cdk-plugin/src/main/resources/templates/tld.vm	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
+                        "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
+<taglib>
+ <tlib-version>${library.taglib.tlibVersion}</tlib-version>
+ <jsp-version>${library.taglib.jspVersion}</jsp-version>
+#if(${library.taglib.shortName})
+ <short-name>${library.taglib.shortName}</short-name>
+#end
+ <uri>${library.taglib.uri}</uri>
+#if(${library.taglib.displayName})
+ <display-name>${library.taglib.displayName}</display-name>
+#end
+#if(${library.description})
+ <description>${library.description}</description>
+#end
+#if(${library.taglib.validatorClass})
+ <validator>
+ 	<validator-class>${library.taglib.validatorClass}</validator-class>
+ </validator>
+#end
+
+${content}
+</taglib>
\ No newline at end of file

Added: branches/refactor1/cdk/maven-cdk-plugin/src/main/resources/templates12/faces-config.vm
===================================================================
--- branches/refactor1/cdk/maven-cdk-plugin/src/main/resources/templates12/faces-config.vm	                        (rev 0)
+++ branches/refactor1/cdk/maven-cdk-plugin/src/main/resources/templates12/faces-config.vm	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faces-config xmlns="http://java.sun.com/xml/ns/javaee"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"
+    version="1.2">
+
+${content}
+#foreach( $kit in ${renderkits})
+  <render-kit>
+		#if(${kit.name})
+		<render-kit-id>${kit.name}</render-kit-id>
+		#if(${kit.classname})
+		<render-kit-class>${kit.classname}</render-kit-class>
+		#end
+		#end
+		${kit.facesConfig}
+  </render-kit>
+#end
+
+
+</faces-config>

Added: branches/refactor1/cdk/maven-cdk-plugin/src/main/resources/templates12/resources-config.vm
===================================================================
--- branches/refactor1/cdk/maven-cdk-plugin/src/main/resources/templates12/resources-config.vm	                        (rev 0)
+++ branches/refactor1/cdk/maven-cdk-plugin/src/main/resources/templates12/resources-config.vm	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<resource-config>
+${content}
+</resource-config>

Added: branches/refactor1/cdk/maven-cdk-plugin/src/main/resources/templates12/taglib.vm
===================================================================
--- branches/refactor1/cdk/maven-cdk-plugin/src/main/resources/templates12/taglib.vm	                        (rev 0)
+++ branches/refactor1/cdk/maven-cdk-plugin/src/main/resources/templates12/taglib.vm	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE facelet-taglib PUBLIC
+  "-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN"
+  "http://java.sun.com/dtd/facelet-taglib_1_0.dtd">
+<facelet-taglib xmlns="http://java.sun.com/JSF/Facelet">
+<namespace>${library.taglib.uri}</namespace>
+
+${content}
+</facelet-taglib>
\ No newline at end of file

Added: branches/refactor1/cdk/maven-cdk-plugin/src/main/resources/templates12/tld.vm
===================================================================
--- branches/refactor1/cdk/maven-cdk-plugin/src/main/resources/templates12/tld.vm	                        (rev 0)
+++ branches/refactor1/cdk/maven-cdk-plugin/src/main/resources/templates12/tld.vm	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<taglib xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd"
+   xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="${library.taglib.jspVersion}">
+
+<tlib-version>${library.taglib.tlibVersion}</tlib-version>
+#if(${library.taglib.shortName})
+ <short-name>${library.taglib.shortName}</short-name>
+#end
+ <uri>${library.taglib.uri}</uri>
+#if(${library.taglib.displayName})
+ <display-name>${library.taglib.displayName}</display-name>
+#end
+#if(${library.description})
+ <description>${library.description}</description>
+#end
+#if(${library.taglib.validatorClass})
+ <validator>
+ 	<validator-class>${library.taglib.validatorClass}</validator-class>
+ </validator>
+#end
+
+${content}
+</taglib>
\ No newline at end of file

Added: branches/refactor1/cdk/maven-cdk-plugin/src/site/apt/index.apt
===================================================================

Added: branches/refactor1/cdk/maven-cdk-plugin/src/site/apt/usage.apt
===================================================================
--- branches/refactor1/cdk/maven-cdk-plugin/src/site/apt/usage.apt	                        (rev 0)
+++ branches/refactor1/cdk/maven-cdk-plugin/src/site/apt/usage.apt	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,84 @@
+                        ----------------------------------------------
+                          Java Server Faces component generator Maven plugin
+                        ----------------------------------------------
+                        ----------------------------------------------
+                        ----------------------------------------------
+
+ This plugin are generate source and configuration fales for jsf components library
+ 
+ For use this plugin in maven project, append build instruction to pom.xml :
+ 
++-----------------------------------------------------------------------------------------------------------+
+	<build>
+		<plugins>
+		    ......
+			<plugin>
+				<groupId>org.ajax4jsf.cdk</groupId>
+				<artifactId>maven-cdk-plugin</artifactId>
+				<configuration>
+				  ..........see below........
+				</configuration>
+				<executions>
+					<execution>
+						<phase>generate-sources</phase>
+						<goals>
+							<goal>generate</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
+			.......
+		</plugins>
+	</build>
+
++-----------------------------------------------------------------------------------------------------------+
+ 
+ Full configuration for generated library ( per component configuration placed in special .xml files  )
+ 
++-----------------------------------------------------------------------------------------------------------+
+				<configuration>
+				  <!-- Generation parameters ( source, config, destination folders, name patterns etc ) -->
+				  ...........
+				  <library>
+				     <prefix>foo.bar</prefix>
+				     <description>This is My JSF components library</description>
+				     <taglib>
+						<uri>http://bar.foo/booz</uri>
+						<shortName>booz</shortName>
+						<taglib>booz.tld</taglib>
+						<displayName>My taglib</displayName>
+						<jspVersion>2.0<jspVersion>						
+				     </taglib>
+				     <renderkits>
+				       <renderkit>
+				           <name>HTML_FOO</name>
+				           <markup>html</markup>
+				           <classname>foo.bar.renderkit.FooKit</classname>
+				           <package>foo.bar.renderkit.html_foo</package>
+				       </renderkit>
+				     </renderkits>
+				   </library>
+				</configuration>
++-----------------------------------------------------------------------------------------------------------+
+ 
+ Definition of parameters in library configuration :
+ 
+  [prefix] is a common package name and JSF id's prefix for standart layout in component generator, default is POM groupId
+  
+  [description] is a text for include in all generated config files and component library documentation, default is POM description.
+  
+  [taglib/uri] is a namespace for generated JSP/Facelets libraries, default is POM url.
+  
+  [taglib/shortName] is a common prefix for JSP/Facelets libraries, default is POM artifactId
+  
+  [renderkits] describe all JSF render kit's used in project. default is one HTML_BASIC.
+  
+  [renderkit/name] is a JSF render kit id, same as in faces-config.xml.
+  
+  [renderkit/markup] is a output format of renderers included in this kit ( html,wml,xul... ). Default value is "html"
+  
+  [renderkit/classname] is a class name of renderKit. default is not set ( empty ).
+  
+  [renderkit/package] is a default package  for all renderers classes included in this renderkit. default is a "\<prefix\>.renderkit.\<name\>"
+  
+  
\ No newline at end of file

Added: branches/refactor1/cdk/maven-cdk-plugin/src/site/resources/images/exadel_logo.jpg
===================================================================
(Binary files differ)


Property changes on: branches/refactor1/cdk/maven-cdk-plugin/src/site/resources/images/exadel_logo.jpg
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: branches/refactor1/cdk/maven-cdk-plugin/src/site/site.xml
===================================================================
--- branches/refactor1/cdk/maven-cdk-plugin/src/site/site.xml	                        (rev 0)
+++ branches/refactor1/cdk/maven-cdk-plugin/src/site/site.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<project name="JSF Components development kit">
+  <bannerLeft>
+    <name>JSF Component generator Maven plugin</name>
+    <src>images/exadel_logo.jpg</src>
+    <href>http://ajax4jsf.org/cdk</href>
+  </bannerLeft>
+  <bannerRight>
+    <src>http://maven.apache.org/images/maven-small.gif</src>
+  </bannerRight>
+  <publishDate position="navigation-bottom" format="MM-dd-yy"/>
+  <body>
+    <links>
+      <item name="JSF" href="https://javaserverfaces.dev.java.net/" />
+      <item name="Maven 2" href="http://maven.apache.org/maven2/"/>
+    </links>
+
+    <menu name="JSF CDK">
+      <item name="Introduction" href="index.html"/>
+      <item name="Usage" href="usage.html"/>
+    </menu>
+    <menu ref="parent"/>
+    <menu ref="reports" />
+  </body>
+</project>
\ No newline at end of file

Added: branches/refactor1/docs/ajaxguide/CatalogManager.properties
===================================================================
--- branches/refactor1/docs/ajaxguide/CatalogManager.properties	                        (rev 0)
+++ branches/refactor1/docs/ajaxguide/CatalogManager.properties	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,5 @@
+verbosity=1
+catalogs=./dtd/catalog.xml
+prefer=public
+static-catalog=yes
+relative-catalogs=no
\ No newline at end of file

Added: branches/refactor1/docs/ajaxguide/build.xml
===================================================================
--- branches/refactor1/docs/ajaxguide/build.xml	                        (rev 0)
+++ branches/refactor1/docs/ajaxguide/build.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,20 @@
+<project name="Documentation" default="all.doc" basedir=".">
+
+    <!-- Set the following property to generate the doco in the output folder -->
+    <property name="build.dir" value="${basedir}/../target/usersguide"/>
+
+    <property name="pdf.name"              value="ajax4jsf-usersguide.pdf" />
+    <import file="../xslt/support.xml" />
+
+    <target name="all.doc" depends="clean">
+        <antcall target="lang.all"><param name="lang" value="en"/></antcall>
+    </target>
+        
+    <!-- Use this alternate target to enable uptodate checking, i.e.
+         don't generate docs if nothing has changed
+    <target name="all.doc">
+        <antcall target="lang.all.run"><param name="lang" value="en"/></antcall>
+    </target>
+    -->
+
+</project>

Added: branches/refactor1/docs/ajaxguide/en/pom.xml
===================================================================
--- branches/refactor1/docs/ajaxguide/en/pom.xml	                        (rev 0)
+++ branches/refactor1/docs/ajaxguide/en/pom.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,36 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+	<modelVersion>4.0.0</modelVersion>
+
+	<parent>
+		<groupId>org.ajax4jsf.docs</groupId>
+		<artifactId>userguide</artifactId>
+		<version>1.1.2-SNAPSHOT</version>
+		<relativePath>../pom.xml</relativePath>
+	</parent>
+	<groupId>org.ajax4jsf.docs.userguide</groupId>
+	<artifactId>${translation}</artifactId>
+	<packaging>jar</packaging>
+	<name>Ajax4jsf Manual (${translation})</name>
+
+	<properties>
+		<translation>en</translation>
+	</properties>
+	<build>
+				<plugins>
+				<plugin>
+					<groupId>org.apache.maven.plugins</groupId>
+					<artifactId>maven-dependency-plugin</artifactId>
+				</plugin>
+				<plugin>
+					<groupId>org.codehaus.mojo</groupId>
+					<artifactId>xml-maven-plugin</artifactId>
+				</plugin>
+
+				<plugin>
+					<groupId>org.ajax4jsf.docs</groupId>
+					<artifactId>maven-docbook-plugin</artifactId>
+				</plugin>
+			</plugins>
+	</build>
+</project>

Added: branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/actionparam.desc.xml
===================================================================
--- branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/actionparam.desc.xml	                        (rev 0)
+++ branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/actionparam.desc.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,10 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<section>
+    <para>The <emphasis role="bold">
+        <property>&lt;a4j:actionparam&gt;</property>
+      </emphasis> component combines the functionality of both JSF components:  <emphasis role="bold">
+        <property>&lt;f:param&gt;</property>
+      </emphasis> and <emphasis role="bold">
+        <property>&lt;f:actionListener&gt;</property>
+      </emphasis>.</para>
+</section>
\ No newline at end of file

Added: branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/ajaxListener.desc.xml
===================================================================
--- branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/ajaxListener.desc.xml	                        (rev 0)
+++ branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/ajaxListener.desc.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,5 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<section>
+  <para>The <emphasis role="bold"><property>&lt;a4j:ajaxListener&gt;</property></emphasis>
+component is the same one as &quot;ActionListener&quot; or &quot;ValueChangeListener&quot;, but for an AJAX container.</para>
+</section>

Added: branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/ajaxListener.xml
===================================================================
--- branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/ajaxListener.xml	                        (rev 0)
+++ branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/ajaxListener.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<root>
+    <programlisting role="XML">
+    <![CDATA[<a4j:region selfRendered="true" ajaxListener="#{bean.processAjax}" id="Region">
+
+    </a4j:region>]]>
+    </programlisting>
+    <para>
+        Every time when AJAX request triggered from &quot;region&quot; method &quot;processAjax&quot; of &quot;bean&quot; will be called.
+    </para>
+</root>
\ No newline at end of file

Added: branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/commandButton.desc.xml
===================================================================
--- branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/commandButton.desc.xml	                        (rev 0)
+++ branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/commandButton.desc.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,11 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<chapter>
+<section>
+<title>Description</title>
+    <para>The <emphasis role="bold">
+        <property>&lt;a4j:commandButton&gt;</property>
+      </emphasis>component is very similar to the<emphasis role="bold">
+        <property>&lt;h:commandButton&gt;</property>
+      </emphasis>component, the only difference is that an AJAX form submit is generated on a click and it allows dynamic rerendering after a response comes back. It&apos;s not necessary to plug any support into the component, as AJAX support is already built in.</para>
+</section>
+</chapter>
\ No newline at end of file

Added: branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/commandButton.xml
===================================================================
--- branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/commandButton.xml	                        (rev 0)
+++ branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/commandButton.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,59 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<chapter> 
+      <para><table frame="all">
+ <title>Component identification parameters</title>
+        <tgroup cols="2">
+	  <thead>
+            <row>
+                <entry>Name</entry>
+                <entry>Value</entry>
+            </row>
+       </thead>
+          <tbody>
+            <row>
+              <entry>component-type</entry>
+              <entry>org.ajax4jsf.ajax.CommandButton</entry>
+            </row>
+            <row>
+              <entry>component-family</entry>
+              <entry>javax.faces.Command </entry>
+            </row>
+            <row>
+              <entry>component-class</entry>
+              <entry>org.ajax4jsf.ajax.html.HtmlCommandButton</entry>
+            </row>
+            <row>
+              <entry>renderer-type</entry>
+              <entry>org.ajax4jsf.components.AjaxCommandButtonRenderer </entry>
+            </row>
+          </tbody>
+        </tgroup>
+      </table></para>
+        <section>
+      <title>Creating on a page</title>
+      <para><emphasis role="bold"><property>&lt;a4j:commandButton&gt;</property></emphasis> is used in the same way as <emphasis role="bold"><property>&lt;h:commandButton&gt;</property></emphasis>, but with definition of the area that is updated after the response comes back from the server.</para>
+			<programlisting role="XML"><![CDATA[<a4j:commandButton reRender="someData" action="#{bean.action1}" value="Link"/>]]></programlisting>
+            <para>This definition of the component provides a link, a click on the link causes an AJAX form submit on the server, &quot;action1&quot; method performance, and rendering of the component with &quot;someData&quot; id after the response comes back from the server.</para>
+    </section>
+	  <section>
+      <title>Dynamical creation of a component from Java code</title>
+      <programlisting role="JAVA"><![CDATA[import org.ajax4jsf.ajax.html.HtmlAjaxCommandButton;
+...
+HtmlAjaxCommandButton myButton = new HtmlAjaxCommandButton();
+...
+]]></programlisting>
+    </section>
+    <section>
+      <title>Key attributes and ways of usage</title>
+      <para>The component <emphasis role="bold"><property>&lt;a4j:commandButton&gt;</property></emphasis> placed on a page generates the following HTML code:</para>
+	  <programlisting role="XHTML"><![CDATA[<input type="submit" onclick="A4J.AJAX.Submit(...request parameters);return false;" value="sort"/>
+]]></programlisting>
+      <para>Hence, the utility method &quot;A4J.AJAX.Submit&quot; is called on a click, the method performs AJAX request as the <emphasis role="bold"><property>&lt;a4j:support&gt;</property></emphasis> component</para>
+	 <note>
+      <title>Note:</title>
+      <para>AJAX support is built in and it&apos;s not necessary to add nested <emphasis role="bold"><property>&lt;a4j:support&gt;</property></emphasis> to the component.</para>
+	  </note>
+	  <para>Common JSF navigation could be performed after an AJAX submit and partial rendering, but Navigation Case must be defined as <emphasis role="bold"><property>&lt;redirect/&gt;</property></emphasis> in order to avoid problems with some browsers.</para>
+	  <para>As any Ajax4jsf component sending AJAX requests and processing server responses <emphasis role="bold"><property>&lt;a4j:commandButton&gt;</property></emphasis> has all attributes described above (see <emphasis role="bold"><property>&lt;a4j:support&gt;</property></emphasis> chapter) that provide the required behavior of requests sending (delay, limitation of submit area and rendering, and etc.)</para>
+    </section>
+</chapter>
\ No newline at end of file

Added: branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/commandLink.desc.xml
===================================================================
--- branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/commandLink.desc.xml	                        (rev 0)
+++ branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/commandLink.desc.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,11 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<chapter>
+<section>
+<title>Description</title>
+    <para> The <emphasis role="bold">
+        <property>&lt;a4j:commandLink&gt;</property>
+      </emphasis>component is very similar to the <emphasis role="bold">
+        <property>&lt;h:commandLink&gt;</property>
+      </emphasis> component, the only difference is that an AJAX form submit is generated on a click and it allows dynamic rerendering after a response comes back. It&apos;s not necessary to plug any support into the component, as AJAX support is already built in.</para>
+</section>
+</chapter>
\ No newline at end of file

Added: branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/commandLink.xml
===================================================================
--- branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/commandLink.xml	                        (rev 0)
+++ branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/commandLink.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,68 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<chapter>
+  
+      <para><table frame="all">
+ <title>Component identification parameters</title>
+        <tgroup cols="2">
+	  <thead>
+            <row>
+                <entry>Name</entry>
+                <entry>Value</entry>
+            </row>
+       </thead>
+          <tbody>
+            <row>
+              <entry>component-type</entry>
+              <entry>org.ajax4jsf.ajax.CommandLink</entry>
+            </row>
+            <row>
+              <entry>component-family</entry>
+              <entry>javax.faces.Command </entry>
+            </row>
+            <row>
+              <entry>component-class</entry>
+              <entry>org.ajax4jsf.ajax.html.HtmlCommandLink</entry>
+            </row>
+            <row>
+              <entry>renderer-type</entry>
+              <entry>org.ajax4jsf.components.AjaxCommandLinkRenderer </entry>
+            </row>
+          </tbody>
+        </tgroup>
+      </table></para>
+    
+    <section>
+      <title>Creating on a page</title>
+      <para><emphasis role="bold"><property>&lt;a4j:commandLink&gt;</property></emphasis> is used in the same way as <emphasis role="bold"><property>&lt;h:commandLink&gt;</property></emphasis>, but with definition of the area that is updated after the response comes back from the server.</para>
+			<programlisting role="XML"><![CDATA[<a4j:commandLink reRender="someData" action="#{bean.action1}" value="Link"/>]]></programlisting>
+            <para>This definition of the component provides a link, and a click on the link causes an AJAX form
+             submit on the server, &quot;action1&quot; method performance, and rendering of the component 
+             with &quot;someData&quot; id after the response comes back from the server.</para>
+    </section>
+	  <section>
+      <title>Dynamical creation of a component from Java code</title>
+      <programlisting role="JAVA"><![CDATA[import org.ajax4jsf.ajax.html.HtmlAjaxCommandLink;
+...
+HtmlAjaxCommandLink myLink = new HtmlAjaxCommandLink();
+...
+]]></programlisting>
+    </section>
+    <section>
+      <title>Key attributes and ways of usage</title>
+      <para>The component <emphasis role="bold"><property>&lt;a4j:commandLink&gt;</property></emphasis> placed on a page generates the following HTML code:</para>
+	  <programlisting role="JSP"><![CDATA[<a href="#" onclick="A4J.AJAX.Submit(?"request parameters");
+	  return 
+	  <a href="#" onclick="A4J.AJAX.Submit(?"request parameters");
+	  return false;">
+	  <span style="color: black;">Link Value</span>
+	  </a>
+]]></programlisting>
+      <para>Hence, the utility method &quot;A4J.AJAX.Submit&quot; is called on a click, the method performs AJAX request as the <emphasis role="bold"><property>&lt;a4j:support&gt;</property></emphasis> component</para>
+	 <note>
+      <title>Note:</title>
+      <para>AJAX support is built in and it&apos;s not necessary to add nested <emphasis role="bold"><property>&lt;a4j:support&gt;</property></emphasis> to the component.</para>
+	  </note>
+	  <para>Common JSF navigation could be performed after AJAX submit and partial rendering, but Navigation Case must be defined as <emphasis role="bold"><property>&lt;redirect/&gt;</property></emphasis> in order to avoid problems with some browsers.</para>
+	  <para>As any Ajax4jsf component sending AJAX requests and processing server responses <emphasis role="bold"><property>&lt;a4j:commandLink&gt;</property></emphasis> has all attributes described above (see <emphasis role="bold"><property>&lt;a4j:support&gt;</property></emphasis> chapter) that provide the required behavior of requests sending (delay, limitation of submit area and rendering, etc.)</para>
+    </section>
+</chapter>
\ No newline at end of file

Added: branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/form.desc.xml
===================================================================
--- branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/form.desc.xml	                        (rev 0)
+++ branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/form.desc.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,9 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<chapter>
+  <section>
+    <title>Description</title>
+    <para>The <emphasis role="bold">
+        <property>&lt;a4j:form&gt;</property>
+      </emphasis> component is very similar to the same component from the JSF HTML library, the only slight difference is in generation of links inside and possibility of AJAX by-default submission.</para>
+  </section>
+</chapter>

Added: branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/form.xml
===================================================================
--- branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/form.xml	                        (rev 0)
+++ branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/form.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,83 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<chapter>
+  
+     <table>
+	  <title>Component identification parameters </title>
+      <tgroup cols="2">
+	  <thead>
+            <row>
+                  <entry>Name</entry>
+                  <entry>Value</entry>
+            </row>
+        </thead>
+        <tbody>
+          <row>
+            <entry>component-type</entry>
+            <entry>org.ajax4jsf.ajax.Form</entry>
+          </row>
+          <row>
+            <entry>component-family</entry>
+            <entry>javax.faces.Form</entry>
+          </row>
+          <row>
+            <entry>component-class</entry>
+            <entry>org.ajax4jsf.ajax.html.AjaxForm</entry>
+          </row>
+          <row>
+            <entry>renderer-type</entry>
+            <entry>org.ajax4jsf.FormRenderer</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </table>
+  
+  <section>
+    <title>Creating on a page</title>
+    <para>Component definition on a page is similar to definition of the original component from JSF HTML library. </para>
+    <programlisting role="XML"><![CDATA[<a4j:form>
+	<!--...Some content to be submitted.-->
+</a4j:form>
+]]></programlisting>
+  </section>
+  <section>
+    <title>Dynamical creation of a component from Java code</title>
+    <programlisting role="JAVA"><![CDATA[import org.ajax4jsf.ajax.html.AjaxForm;
+...
+AjaxForm myForm = new AjaxForm();
+...
+]]></programlisting>
+  </section>
+  <section>
+    <title>Key attributes and ways of usage</title>
+    <para>The difference with the original component is that all hidden fields required for command links are always rendered and it doesn't depend on links rendering on the initial page. It solves the problem with invalid links that weren't rendered on a page immediately, but after some AJAX request.</para>
+    <para>Beginning with release 1.0.5 additional attributes that make this form variant universal have appeared. With a new attribute definition as ajax=<emphasis role="italic">
+        <property>&quot;true&quot;</property>
+      </emphasis>, it becomes possible to set AJAX submission way for any components inside, i.e. not a page URL is used as an <emphasis role="italic">
+        <property>&quot;action&quot;</property>
+      </emphasis> attribute, but the javascript:A4J.AJAX.Submit(...) call. In this case, rendering is defined as reRender=list of Ids for the form element itself.</para>
+	<para>Example</para>
+	<programlisting role="XML"><![CDATA[<a4j:form id="helloForm" ajaxSubmit="true" reRender="table">
+	...
+	<t:dataTable id="table"... >
+		...
+	</t:dataTable>
+	...
+	<t:dataScroller for="table"... >
+		...
+	</t:dataScroller>
+	...
+</a4j:form
+]]></programlisting>
+<para>This example shows that in order to make  <emphasis role="bold">
+        <property>&lt;t:dataScroller&gt;</property>
+      </emphasis> submissions to be AJAX ones it's required only to place this <emphasis role="bold">
+        <property>&lt;t:dataScroller&gt;</property>
+      </emphasis> into <emphasis role="bold">
+        <property>&lt;a4j:form&gt;</property>
+      </emphasis>. In the other case it is necessary to redefine renders for its child links elements that are defined as <emphasis role="bold">
+        <property>&lt;h:commandLink&gt;</property>
+      </emphasis> and can't be made AJAX ones with using e.g. <emphasis role="bold">
+        <property>&lt;a4j:support&gt;</property>
+      </emphasis>.</para>
+  </section>
+</chapter>

Added: branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/htmlCommandLink.desc.xml
===================================================================
--- branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/htmlCommandLink.desc.xml	                        (rev 0)
+++ branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/htmlCommandLink.desc.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,9 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<chapter>
+<section>
+<title>Description</title>
+    <para>The <emphasis role="bold">
+        <property>&lt;a4j:htmlCommandLink&gt;</property>
+      </emphasis> component is very similar to the same component from the JSF HTML library, the only slight difference is in links generation and problem solving that occurs when an original component is used.</para>
+</section>
+</chapter>
\ No newline at end of file

Added: branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/htmlCommandLink.xml
===================================================================
--- branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/htmlCommandLink.xml	                        (rev 0)
+++ branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/htmlCommandLink.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,67 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<chapter>
+
+     <table>
+	  <title>Component identification parameters </title>
+      <tgroup cols="2">
+	  <thead>
+            <row>
+                  <entry>Name</entry>
+                  <entry>Value</entry>
+            </row>
+        </thead>
+        <tbody>
+          <row>
+            <entry>component-type</entry>
+            <entry>javax.faces.HtmlCommandLink</entry>
+          </row>
+          <row>
+            <entry>component-family</entry>
+            <entry>javax.faces.Command</entry>
+          </row>
+          <row>
+            <entry>component-class</entry>
+            <entry>javax.faces.component.html.HtmlCommandLink</entry>
+          </row>
+          <row>
+            <entry>renderer-type</entry>
+            <entry>org.ajax4jsf.HtmlCommandLinkRenderer</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </table>
+  
+  <section>
+    <title>Creating on a page</title>
+    <para>Component definition on a page is the same as for the original component from the JSF HTML library.</para>
+    <programlisting role="XML"><![CDATA[<a4j:htmlCommandLink value="value" action="action"/>
+]]></programlisting>
+</section>
+  <section>
+    <title>Dynamical creation of a component from Java code</title>
+    <programlisting role="JAVA"><![CDATA[import javax.faces.component.html.HtmlCommandLink;
+...
+HtmlCommandLink myForm = new HtmlCommandLink();
+...
+]]></programlisting>
+  </section>
+  <section>
+    <title>Key attributes and ways of usage</title>
+    <para>The difference with the original component is that all hidden fields required for command links with the child <emphasis role="bold">
+        <property>&lt;f:param&gt;</property>
+      </emphasis> elements are always rendered and it doesn't depend on links rendering on the initial page. It solves the problem with invalid links that weren&apos;t rendered on a page immediately, but after some AJAX request.</para>
+    <programlisting role="XML"><![CDATA[<a4j:form>
+	...
+	<a4j:htmlComandLink action="action" value="link" rendered="#{bean.rendered}">
+		<f:param ...>
+	<a4j:htmlComandLink>
+	...
+</a4j:form>
+]]></programlisting>
+<para>In this example <emphasis role="bold">
+        <property>&lt;a4j:htmlCommandLink&gt;</property>
+      </emphasis>works as standard <emphasis role="bold">
+        <property>&lt;h:commandLink&gt;</property>
+      </emphasis>, but here hidden fields required for correct functionality are rendered before the first downloading of a page, though it doesn't happen if its attribute isn't set to &quot;false&quot;.</para>
+      </section>
+</chapter>

Added: branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/include.desc.xml
===================================================================
--- branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/include.desc.xml	                        (rev 0)
+++ branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/include.desc.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,9 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<chapter>
+  <section>
+    <title>Description</title>
+    <para>The <emphasis role="bold">
+        <property>&lt;a4j:include&gt;</property>
+      </emphasis> component is used for page areas update after an AJAX request according to the faces-config Navigation Rules and for implementation of wizard-like parts work in AJAX mode.</para>
+  </section>
+</chapter>

Added: branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/include.xml
===================================================================
--- branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/include.xml	                        (rev 0)
+++ branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/include.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,86 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<chapter>
+  
+     <para><table frame="all">
+         <title>Component identification parameters</title>
+        <tgroup cols="2">
+	  <thead>
+            <row>
+                <entry>Name</entry>
+                <entry>Value</entry>
+            </row>
+        </thead>
+          <tbody>
+            <row>
+              <entry>component-type</entry>
+              <entry>org.ajax4jsf.ajax.Include</entry>
+            </row>
+            <row>
+              <entry>component-family</entry>
+              <entry>org.ajax4jsf.ajax.Output</entry>
+            </row>
+            <row>
+              <entry>component-class</entry>
+              <entry>org.ajax4jsf.ajax.html.Include</entry>
+            </row>
+            <row>
+              <entry>renderer-type</entry>
+              <entry>org.ajax4jsf.AjaxIncludeRenderer</entry>
+            </row>
+          </tbody>
+        </tgroup>
+      </table></para>
+  
+  <section>
+    <title>Creating on a page</title>
+    <para>To use the component, it&apos;s necessary to place the following strings on a page:</para>
+     <programlisting role="XML"><![CDATA[<h:panelGroup id="wizard">
+		<a4j:include  viewId="/pages/include/first.xhtml" />
+</h:panelGroup>
+]]></programlisting>
+<para>For navigation inside a page defined in viewId any components responsible for AJAX requests to the server generation are used.</para>
+<para>For example, the following component on the page &quot;/pages/include/first.xhtml&quot;</para>
+<programlisting role="XML"><![CDATA[...
+<a4j:commandButton action="next" reRender="wizard"/>
+...
+]]></programlisting>
+<para>And in faces-config it's defined:</para>
+<programlisting role="XML"><![CDATA[<navigation-rule>
+  <from-view-id>/pages/include/first.xhtml</from-view-id>
+  <navigation-case>
+   <from-outcome>next</from-outcome>
+   <to-view-id>/pages/include/second.xhtml</to-view-id>
+  </navigation-case>
+ </navigation-rule>
+]]></programlisting>
+<para>In this case after a click on a button defined inside &quot;first.xhtml&quot; view, navigation is performed after an AJAX request (the same as standard JSF one) only inside this view.</para>
+ </section>
+  <section>
+    <title>Dynamical creation of a component from Java code</title>
+	<programlisting role="XML"><![CDATA[<a4j:outputPanel ajaxRendered="true">
+	<a4j:include  viewId="/pages/include/first.xhtml"/>
+</a4j:outputPanel>
+]]></programlisting>
+<para>If <emphasis role="bold">
+        <property>&lt;a4j:include&gt;</property>
+      </emphasis> is defined this way, any AJAX request returning outcome inside generates navigation with this <emphasis role="bold">
+        <property>&lt;a4j:include&gt;</property>
+      </emphasis>.</para>
+<para>Ajax Action for navigation implementation inside view must be placed inside <emphasis role="bold">
+        <property>&lt;a4j:include&gt;</property>
+      </emphasis> pages. Navigation defined by these pages is applied to the <emphasis role="bold">
+        <property>&lt;a4j:include&gt;</property>
+      </emphasis> element current for them.</para>
+<para>As in the general case for Ajax Action component, if the <emphasis role="bold">
+        <property>&lt;a4j:action&gt;</property>
+      </emphasis>component inside <emphasis role="bold">
+        <property>&lt;a4j:include&gt;</property>
+      </emphasis>returns outcome defined as <emphasis role="bold">
+        <property>&lt;redirect/&gt;</property>,
+      </emphasis> AJAX submit is performed with navigation of the whole page and not only of the current view. 
+</para>
+<para> 
+Some additional information you can find here: <ulink url="http://jboss.com/index.html?module=bb&amp;op=viewtopic&amp;t=104158">Ajax4Jsf Users Forum.</ulink>
+</para>
+</section>
+</chapter>
\ No newline at end of file

Added: branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/jsFunction.desc.xml
===================================================================
--- branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/jsFunction.desc.xml	                        (rev 0)
+++ branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/jsFunction.desc.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<root>
+	<section>
+		<title>Description</title>
+		<para>
+			The <emphasis role="bold">
+        <property>&lt;a4j:jsFunction&gt;</property>
+      </emphasis> component allows to invoke the server side data and return it in a JSON format to use in a client JavaScript calls.	
+		</para>
+	</section>
+</root>
\ No newline at end of file

Added: branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/jsFunction.xml
===================================================================
--- branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/jsFunction.xml	                        (rev 0)
+++ branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/jsFunction.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter>
+  
+     <table>
+	  <title>Component identification parameters </title>
+      <tgroup cols="2">
+	  <thead>
+            <row>
+                  <entry>Name</entry>
+                  <entry>Value</entry>
+            </row>
+        </thead>
+        <tbody>
+          <row>
+            <entry>component-type</entry>
+            <entry>org.ajax4jsf.ajax.Function</entry>
+          </row>
+          <row>
+            <entry>component-family</entry>
+            <entry>org.ajax4jsf.components.AjaxFunction</entry>
+          </row>
+          <row>
+            <entry>component-class</entry>
+            <entry>org.ajax4jsf.ajax.html.HtmlAjaxFunction</entry>
+          </row>
+          <row>
+            <entry>renderer-type</entry>
+            <entry>org.ajax4jsf.components.AjaxFunctionRenderer</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </table>
+  
+  <section>
+    <title>Creating on a page</title>
+    <para>Simple component definition example:</para>
+    <programlisting role="XML"><![CDATA[...
+<head>
+	<script>
+		<!--There is some script named "myScript" that uses parameters which will be taken from server-->
+	</script>
+</head>
+<body>
+...
+<a4j:jsFunction data="#{bean.someProperty}" name="callScript" oncomplete="myScript(data.subProperty1, data.subProperty2)"/>
+...]]>
+	</programlisting>
+	<para>
+		The script &quot;myScript&quot; will be called after <property>bean.someProperty</property> data 
+		will be returned from server(e.g. It&apos;ll be object with two subproperties).  
+	</para>
+  </section>
+  <section>
+    <title>Dynamical creation of a component from Java code</title>
+    <programlisting role="JAVA"><![CDATA[import org.ajax4jsf.ajax.html.HtmlAjaxFunction;
+...
+HtmlAjaxFunction myFunction = new HtmlAjaxFunction();
+...
+]]></programlisting>
+  </section>
+  <section>
+    <title>Key attributes and ways of usage</title>
+   		<para>
+   			As the component uses Ajax request to get data from server - it has all 
+   			common Ajax Action attributes. So, action and actionListener can be 
+   			invoked, and reRendering some parts of the page fired after calling 
+   			function.
+   		</para>
+   </section>
+</chapter>   
\ No newline at end of file

Added: branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/keepAlive.desc.xml
===================================================================
--- branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/keepAlive.desc.xml	                        (rev 0)
+++ branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/keepAlive.desc.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,10 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<section>
+    <para>The <emphasis role="bold">
+        <property>&lt;a4j:keepAlive&gt;</property>
+      </emphasis> component allows to keep a state of each bean between requests.</para>
+	  <para>
+	  Some additional information about usage of components can be found <ulink url="http://jboss.com/index.html?module=bb&amp;op=viewtopic&amp;t=104989">here.
+	</ulink>
+	  </para>
+</section>
\ No newline at end of file

Added: branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/listener.desc.xml
===================================================================
--- branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/listener.desc.xml	                        (rev 0)
+++ branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/listener.desc.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,11 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<section>
+    <para> The <emphasis role="bold">
+        <property>&lt;a4j:ajaxListener&gt;</property>
+      </emphasis> component is the same one as <emphasis role="bold">
+        <property>&lt;f:action&gt;</property>
+      </emphasis> or <emphasis role="bold">
+        <property>&lt;f:value&gt;</property>
+      </emphasis> components but it is used for an AJAX container. 
+</para>
+</section>
\ No newline at end of file

Added: branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/loadBundle.desc.xml
===================================================================
--- branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/loadBundle.desc.xml	                        (rev 0)
+++ branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/loadBundle.desc.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,6 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<section>
+    <para>The <emphasis role="bold">
+        <property>&lt;a4j:loadBundle&gt;</property>
+      </emphasis> component is similar to the same component from the JSF Core library. The component loads a resource bundle localized for the Locale of the current view and exposes it (as a Map) in the request attributes of the current request.</para>
+</section>
\ No newline at end of file

Added: branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/loadScript.desc.xml
===================================================================
--- branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/loadScript.desc.xml	                        (rev 0)
+++ branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/loadScript.desc.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<root>
+	<section>
+	  
+		<title>Description</title>
+		<para>
+			Inserts script links to the head element. Render the value of the component as the value of 
+			the &quot;src&quot; attribute, after passing it to the getResourceURL() method of the ViewHandler for this application, and passing the result through the encodeResourceURL() method of the ExternalContext.		
+		</para>
+	</section>
+</root>
\ No newline at end of file

Added: branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/loadScript.xml
===================================================================
--- branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/loadScript.xml	                        (rev 0)
+++ branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/loadScript.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter>
+     <table>
+	  <title>Component identification parameters </title>
+      <tgroup cols="2">
+	  <thead>
+            <row>
+                  <entry>Name</entry>
+                  <entry>Value</entry>
+            </row>
+        </thead>
+        <tbody>
+          <row>
+            <entry>component-type</entry>
+            <entry>org.ajax4jsf.LoadScript</entry>
+          </row>
+          <row>
+            <entry>component-family</entry>
+            <entry>org.ajax4jsf.LoadScript</entry>
+          </row>
+          <row>
+            <entry>component-class</entry>
+            <entry>org.ajax4jsf.ajax.html.HtmlLoadScript</entry>
+          </row>
+          <row>
+            <entry>renderer-type</entry>
+            <entry>org.ajax4jsf.LoadScriptRenderer</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </table>
+  
+  <section>
+    <title>Creating on a page</title>
+    <para>Simple Component definition on a page:</para>
+    <programlisting role="XML"><![CDATA[<a4j:loadScript src="scripts/someScript.js"/>
+]]></programlisting>
+  </section>
+  <section>
+    <title>Dynamical creation of a component from Java code</title>
+    <programlisting role="JAVA"><![CDATA[import org.ajax4jsf.ajax.html.HtmlLoadScript;
+...
+HtmlLoadScript myScript = new HtmlLoadScript();
+...
+]]></programlisting>
+  </section>
+  <section>
+    <title>Key attributes and ways of usage</title>
+    <para>
+    	As it was mentioned <link linkend="loadScript">before</link> this componment returns its value passing it to the
+    	 getResourceUR() method of the ViewHandler for this application, and passing 
+    	 the result	through the encodeResourceURL() method of the ExternalContext.
+    </para>
+    <para>
+    	It means that the Context will be inserts automatically to the link. And calls
+    	 like <property>resource://</property> will be properly handled.
+    </para>
+    <para>
+    	Except this - you may be free to put your script links right from the child 
+    	page while using <property>facelets templates</property> .
+    </para>
+</section>
+</chapter>   
\ No newline at end of file

Added: branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/loadStyle.desc.xml
===================================================================
--- branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/loadStyle.desc.xml	                        (rev 0)
+++ branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/loadStyle.desc.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<root>
+	<section>
+		<title>Description</title>
+		<para>
+			Inserts stylesheet links to the head element. Render the value of the component as the value of 
+			the &quot;src&quot; attribute, after passing it to the getResourceURL() method of the ViewHandler for this application, and passing the result through the encodeResourceURL() method of the ExternalContext.		
+		</para>
+	</section>
+</root>
\ No newline at end of file

Added: branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/loadStyle.xml
===================================================================
--- branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/loadStyle.xml	                        (rev 0)
+++ branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/loadStyle.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter>
+     <table>
+	  <title>Component identification parameters </title>
+      <tgroup cols="2">
+	  <thead>
+            <row>
+                  <entry>Name</entry>
+                  <entry>Value</entry>
+            </row>
+        </thead>
+        <tbody>
+          <row>
+            <entry>component-type</entry>
+            <entry>org.ajax4jsf.LoadStyle</entry>
+          </row>
+          <row>
+            <entry>component-family</entry>
+            <entry>org.ajax4jsf.LoadStyle</entry>
+          </row>
+          <row>
+            <entry>component-class</entry>
+            <entry>org.ajax4jsf.ajax.html.HtmlLoadStyle</entry>
+          </row>
+          <row>
+            <entry>renderer-type</entry>
+            <entry>org.ajax4jsf.LoadStyleRenderer</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </table>
+  
+  <section>
+    <title>Creating on a page</title>
+    <para>Simple Component definition on a page:</para>
+    <programlisting role="XML"><![CDATA[<a4j:loadStyle src="styles/style.css"/>
+]]></programlisting>
+  </section>
+  <section>
+    <title>Dynamical creation of a component from Java code</title>
+    <programlisting role="JAVA"><![CDATA[import org.ajax4jsf.ajax.html.HtmlLoadStyle;
+...
+HtmlLoadScript myStyle = new HtmlLoadStyle();
+...
+]]></programlisting>
+  </section>
+  <section>
+    <title>Key attributes and ways of usage</title>
+    <para>
+    	As it was mentioned <link linkend="loadStyle">before</link> this componment returns its value passing it to the
+    	 getResourceUR() method of the ViewHandler for this application, and passing 
+    	 the result	via the encodeResourceURL() method of the ExternalContext.
+    </para>
+    <para>
+    	It means that the Context will be inserts automatically to the link. And calls
+    	 like <property>resource://</property> will be properly handled.
+    </para>
+    <para>
+    	Except this - you may be free to put your stylesheet links right from the child 
+    	page while using <property>facelets templates</property> .
+    </para>
+</section>
+  
+</chapter>   
\ No newline at end of file

Added: branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/log.desc.xml
===================================================================
--- branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/log.desc.xml	                        (rev 0)
+++ branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/log.desc.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,9 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<root>
+<section>
+<title>Description</title>
+      <para>The <emphasis role="bold">
+        <property>&lt;a4j:log &gt;</property>
+      </emphasis> component generates JavaScript for opening of the window with client-side debug information on an AJAX request.</para>
+  </section>
+</root>
\ No newline at end of file

Added: branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/log.xml
===================================================================
--- branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/log.xml	                        (rev 0)
+++ branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/log.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,64 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<chapter>
+  <section>
+     <para><table frame="all">
+         <title>Component identification parameters</title>
+        <tgroup cols="2">
+	  <thead>
+            <row>
+                <entry>Name</entry>
+                <entry>Value</entry>
+            </row>
+        </thead>
+          <tbody>
+            <row>
+              <entry>component-type</entry>
+              <entry>org.ajax4jsf.ajax.Log</entry>
+            </row>
+            <row>
+              <entry>component-family</entry>
+              <entry>org.ajax4jsf.ajax.Log</entry>
+            </row>
+            <row>
+              <entry>component-class</entry>
+              <entry>org.ajax4jsf.ajax.html.AjaxLog</entry>
+            </row>
+            <row>
+              <entry>renderer-type</entry>
+              <entry>org.ajax4jsf.LogRenderer</entry>
+            </row>
+          </tbody>
+        </tgroup>
+      </table></para>
+  </section>
+  <section>
+    <title>Creating on a page</title>
+    <para>To use the component, it&apos;s necessary to place the following string on a page:</para><programlisting role="XML"><![CDATA[<a4j:log/>]]></programlisting>
+    <para>Then, in order to open a log window, press &quot;CTRL+SHIFT+L&quot; on a page with the component.</para>
+  </section>
+  <section>
+    <title>Dynamical creation of a component from Java code</title>
+    <programlisting role="JAVA"><![CDATA[import org.ajax4jsf.ajax.html.AjaxLog;
+...
+AjaxLog myLog = new AjaxLog();
+...]]></programlisting>
+  </section>
+  <section>
+    <title>Key attributes and ways of usage</title>
+    <para>Usage of the appropriate component attributes could change a representation level of debug information as well as the  hot key for a window opening.</para>
+    <para>The hot key could be changed with the <emphasis role="italic">
+        <property>&quot;hotkey&quot;</property>
+       </emphasis> 
+attribute, where it&apos;s necessary to define one letter that together with &quot;CTRL+SHIFT&quot; opens a window.</para>
+    <para>The <emphasis role="italic">
+        <property>&quot;level&quot;</property>
+       </emphasis> 
+attribute with several possible values (FATAL, ERROR, WARN, INFO, ALL) could change a logging level.</para>
+    <para>The log could be generated not only in a new window, but also on the current page in a separate <emphasis role="bold"><property>&lt;div&gt;</property></emphasis>, this is also controlled with the <emphasis role="italic">
+        <property>&quot;popup&quot;</property>
+       </emphasis> 
+attribute on the component. </para>
+    <para>Example:</para><programlisting role="XML"><![CDATA[<a4j:log level="ALL" popup="false" width="400" height="200"/>]]></programlisting>
+    <para>The component defined this way is decoded on a page as <emphasis role="bold"><property>&lt;div&gt;</property></emphasis> inside a page, where all the information beginning with informational message is generated.</para>
+  </section>
+</chapter>

Added: branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/mediaOutput.desc.xml
===================================================================
--- branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/mediaOutput.desc.xml	                        (rev 0)
+++ branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/mediaOutput.desc.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,9 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<root>
+<section>
+<title>Description</title>
+    <para>The <emphasis role="bold">
+        <property>&lt;a4j:mediaOutput&gt;</property>
+      </emphasis> component implements one of the basic features specified in the framework. The component is a facility for generating images, video, sounds and other binary resources defined by a user on-the-fly.</para>
+</section>
+</root>
\ No newline at end of file

Added: branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/mediaOutput.xml
===================================================================
--- branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/mediaOutput.xml	                        (rev 0)
+++ branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/mediaOutput.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,83 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<chapter>
+     <table>
+	  <title>Component identification parameters </title>
+      <tgroup cols="2">
+	  <thead>
+            <row>
+                  <entry>Name</entry>
+                  <entry>Value</entry>
+            </row>
+        </thead>
+        <tbody>
+          <row>
+            <entry>component-type</entry>
+            <entry>org.ajax4jsf.MediaOutput</entry>
+          </row>
+          <row>
+            <entry>component-family</entry>
+            <entry>org.ajax4jsf.Resource</entry>
+          </row>
+          <row>
+            <entry>component-class</entry>
+            <entry>org.ajax4jsf.ajax.html.MediaOutput</entry>
+          </row>
+          <row>
+            <entry>renderer-type</entry>
+            <entry>org.ajax4jsf.MediaOutputRenderer</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </table>
+  
+  <section>
+    <title>Creating on a page</title>
+    <para>To use the component it&apos;s necessary to define it on a page and set Java methods for data keeping and data transmission to output stream. </para>
+	<para>Component definition on a page for graphical data output</para>
+    <programlisting role="XML"><![CDATA[...
+<a4j:mediaOutput element="img" cacheable="false" session="true"
+    createContent="#{paintBean.paint}" value="#{paintData}"
+    mimeType="image/jpeg"/>
+...
+]]></programlisting>
+<para>Here is the content of paintData that is a bean containing output data</para>
+<programlisting role="JAVA"><![CDATA[package demo;
+
+public class PaintData implements Serializable{
+        private static final long serialVersionUID = 1L;
+        Integer width=100;
+        Integer weight=50;
+...
+]]></programlisting>
+<para>The Paint method of the  paintBean class is a method transmitting graphical data into output stream.</para>
+<programlisting role="JAVA"><![CDATA[public void paint(OutputStream out, Object data) throws IOException{
+	<!--...Some code that puts binary data to "out" Stream-->
+        }
+]]></programlisting>
+  </section>
+  <section>
+    <title>Dynamical creation of a component from Java code</title>
+    <programlisting role="JAVA"><![CDATA[import org.ajax4jsf.ajax.html.MediaOutput;
+...
+MediaOutput myMedia = new MediaOutput ();
+...
+]]></programlisting>
+  </section>
+  <section>
+    <title>Key attributes and ways of usage</title>
+    <para>As it was shown in the example above there are two main components:</para>
+    <itemizedlist>
+        <listitem>
+          createContent specifies a method accepting 2 parameters. The first (of java.io.OutputStream type) defines a stream, where any binary data is output. The second (of java.lang.Object type) contains deserialized object with data specified in the <emphasis role="italic">
+        <property>&quot;value&quot;</property>
+      </emphasis> attribute.
+		</listitem>
+        <listitem>
+          Value specifies a bean class keeping data for transmitting into a method that transmits it into a stream.
+        </listitem>
+      </itemizedlist>
+	  <note><title>Note:</title>A bean class transmitted into value should implement Serializable interface.
+	  </note>
+	  <para>Hence, when using the component it's possible to output user data of any type on a page with AJAX requests.</para>
+      </section>
+</chapter>
\ No newline at end of file

Added: branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/outputPanel.desc.xml
===================================================================
--- branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/outputPanel.desc.xml	                        (rev 0)
+++ branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/outputPanel.desc.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,7 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<root>
+<section>
+<title>Description</title>
+  <para>The component is used for components grouping in the AJAX output area, which offers several additional output opportunities such as inserting of non-present in tree components, saving of transient elements after AJAX request and some others.</para>
+</section>
+</root>
\ No newline at end of file

Added: branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/outputPanel.xml
===================================================================
--- branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/outputPanel.xml	                        (rev 0)
+++ branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/outputPanel.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,125 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<chapter>
+  
+    <table>
+	    <title>Component identification parameters </title>
+      <tgroup cols="2">
+	  <thead>
+            <row>
+                <entry>Name</entry>
+                <entry>Value</entry>
+            </row>
+        </thead>
+        <tbody>
+          <row>
+            <entry>component-type</entry>
+            <entry>org.ajax4jsf.ajax.OutputPanel</entry>
+          </row>
+          <row>
+            <entry>component-family</entry>
+            <entry>javax.faces.Panel</entry>
+          </row>
+          <row>
+            <entry>component-type</entry>
+            <entry>org.ajax4jsf.ajax.OutputPanel</entry>
+          </row>
+          <row>
+            <entry>component-class</entry>
+            <entry>org.ajax4jsf.ajax.html.HtmlAjaxOutputPanel</entry>
+          </row>
+          <row>
+            <entry>renderer-type</entry>
+            <entry>org.ajax4jsf.components.AjaxOutputPanelRenderer</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </table>
+  
+  <section>
+    <title>Creating on a page</title>
+    <para>Here is the simplest way for a component creation on a page.</para>
+    <programlisting role="XML"><![CDATA[<a4j:outputPanel>
+<!--...Some Content Inside-->
+</a4j:outputPanel>
+]]></programlisting>
+  </section>
+  <section>
+    <title>Dynamical creation of a component from Java code</title>
+    <programlisting role="JAVA"><![CDATA[import org.ajax4jsf.ajax.html.HtmlAjaxOutputPanel;
+...
+HtmlAjaxOutputPanel  myPanel = new HtmlAjaxOutputPanel();
+]]></programlisting>
+  </section>
+  <section>
+    <title>Key attributes and ways of usage</title>
+    <para><emphasis role="bold"><property>&lt;a4j:outPanel&gt;</property></emphasis> allows marking of a page area, which is updated on Ajax response. Anyway, <emphasis role="bold">
+        <property>&lt;a4j:outputPanel&gt;</property>
+      </emphasis> usage is optional, as in Ajax4jsf it&apos;s possible to indicate any existing component id on a component view in order to define updating areas. 
+
+To speed up the performance, Ajax4jsf updates only a component tree. <emphasis role="bold">
+        <property>&lt;a4j:outputPanel&gt;</property>
+      </emphasis> usage is recommended for wrapping components that aren&apos;t rendered during the primary non-ajax response, as the components don&apos;t present in a component tree. 
+</para>
+    <para><emphasis role="bold">Example:</emphasis></para>
+    <programlisting role="XML"><![CDATA[<a4j:support ... reRender="mypanel"/>
+...
+<a4j:outputPanel id="mypanel">
+  <h:panelGrid rendered="#{not empty foo.bar}">
+	...
+  </h:panelGrid>
+</a4j:outputPanel>
+]]></programlisting>
+    <para>In addition to the areas directly indicated in reRender attribute of Ajax components, <emphasis role="bold">
+        <property>&lt;a4j:outputPanel&gt;</property>
+      </emphasis> allows to update a part of a page basing on its own flag. The flag is defined by the ajaxRendered attribute. The flag is commonly used when a part of a page must be updated or can be updated on any response.</para>
+    <para><emphasis role="bold">Example:</emphasis></para>
+	<programlisting role="XML"><![CDATA[<a4j:outputPanel ajaxRendered="true">
+  <h:messages/>
+</a4j:outputPanel>
+]]></programlisting>
+    <para>On default <emphasis role="bold">
+        <property>&lt;a4j:outputPanel&gt;</property>
+      </emphasis> is output as a pair of opening and closing html <emphasis role="bold"><property>&lt;span&gt;</property></emphasis> tag, but with the help of the layout attribute this output way could be changed. There are three variants for this component value:</para>
+    <itemizedlist>
+      <listitem>
+        inline (default)
+      </listitem>
+      <listitem>
+        block
+      </listitem>
+      <listitem>
+        none
+      </listitem>
+    </itemizedlist>
+    <para>If layout=&quot;block&quot; is chosen, the component is rendered as a pair of opening and closing <emphasis role="bold"><property>&lt;div&gt;</property></emphasis> tag, to which it’s possible to apply any available style attributes available for block tags. </para>
+    <para>Layout=&quot;none&quot; helps to avoid an unnecessary tag round a context that could or couldn&apos;t be rendered according to the defined &quot;rendered&quot; attribute conditions. If an inner context isn’t rendered, <emphasis role="bold">
+        <property>&lt;a4j:outputPanel&gt;</property>
+      </emphasis> is rendered as a <emphasis role="bold"><property>&lt;span&gt;</property></emphasis> tag with the id equal to an id of a child component and &quot;display:none&quot; style. If a child component is rendered, <emphasis role="bold">
+        <property>&lt;a4j:outputPanel&gt;</property>
+      </emphasis> doesn&apos;t present at all in a final code.</para>
+    <para><emphasis role="bold">Example:</emphasis></para>
+	<programlisting role="XML"><![CDATA[<a4j:support .... reRender="mypanel"/>
+...
+<a4j:outputPanel layout="none">
+  <h:panelGrid id="mypanel" rendered="#{not empty foo.bar}">
+	...
+  </h:panelGrid>
+</a4j:outputPanel>
+]]></programlisting>
+    <para>As you see, the code is very similar to the one shown above, but <emphasis role="italic"><property>&quot;reRender &quot;</property></emphasis> attribute refers directly to the updating panelGrid and not to the framing outputPanel, and it&apos;s more semantically correct.</para>
+    <para><emphasis role="bold"><property>&lt;a4j:outPanel&gt;</property></emphasis> should be used for non-JSF component part framing, which is to be updated on Ajax response, as Ajax4jsf specifies the list of updating areas as a list of an existing JSF component. </para>
+    <para>On default non-JSF context isn&apos;t saved in a component tree, but is rendered anew every time. To accelerate the processing speed and Ajax response input speed, Ajax4jsf saves non-JSF context in a component tree on default. This option could be canceled by keepTransient attribute that cancels transient flag forced setting for child components. This flag setting keeps the current value set by child components.</para>
+    <para>Note: In JSF 1.1 implementation and lower, where non-JSF context should be framed with the &quot;f:verbatim&quot; attribute,  <emphasis role="bold">
+        <property>&lt;a4j:outputPanel&gt;</property>
+      </emphasis> doesn&apos;t improve this JSF implementation option in any way, so you still have to use this tag where it&apos;s necessary without Ajax4jsf usage. </para>
+    <para>Ajax4jsf allows setting Ajax responses rendering directly basing on component tree nodes without referring to the JSP (XHTML) page code. It could be defined by selfRendered attribute setting to <emphasis role="italic">
+        <property>&quot;true&quot;</property>
+      </emphasis> 
+ on <emphasis role="bold">
+        <property>&lt;a4j:region&gt;</property>
+      </emphasis> and could help considerably speed up a response output. However, if a transient flag is kept as it is, this rapid processing could cause missing of transient components that present on view and don’t come into a component tree. Hence, for any particular case you could choose a way for you application optimization: speed up processing or redundant memory for keeping tree part earlier defined a transient. </para>
+<para>
+Some additional information about usage of component you can find <ulink url="http://www.jboss.com/index.html?module=bb&amp;op=viewtopic&amp;p=4052203#4052203">here</ulink>.
+</para>	  
+  </section>
+</chapter>
\ No newline at end of file

Added: branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/page.desc.xml
===================================================================
--- branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/page.desc.xml	                        (rev 0)
+++ branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/page.desc.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,7 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<root>
+  <section>
+<title>Description</title>
+    <para><emphasis role="bold"><property>&lt;a4j:page&gt;</property></emphasis> is a deprecated component used for solving of incompatibility problems in early Ajax4jsf and MyFaces versions. The component encodes the full html page structure. </para>
+  </section>
+</root>

Added: branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/page.xml
===================================================================
--- branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/page.xml	                        (rev 0)
+++ branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/page.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,87 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<chapter>
+  
+      <table>
+      <title>Component identification parameters </title>
+      <tgroup cols="2">
+        <thead>
+          <row>
+            <entry>Name</entry>
+            <entry>Value</entry>
+          </row>
+        </thead>
+        <tbody>
+          <row>
+            <entry>component-type</entry>
+            <entry>org.ajax4jsf.components.Page</entry>
+          </row>
+          <row>
+            <entry>component-family</entry>
+            <entry>org.ajax4jsf.components.AjaxRegion.</entry>
+          </row>
+          <row>
+            <entry>component-class</entry>
+            <entry>org.ajax4jsf.components.Page</entry>
+          </row>
+          <row>
+            <entry>renderer-type</entry>
+            <entry>org.ajax4jsf.components.PageRenderer</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </table>
+  
+  <section>
+    <title>Creating on a page</title>
+    <para>This component should be defined as a child component for <emphasis role="bold">
+        <property>&lt;f:view&gt;</property>
+      </emphasis></para>
+    <programlisting role="XML"><![CDATA[<f:view>
+ <a4j:page>
+  <f:facet name="head">
+   <!--...Head Content here-->
+  </f:facet>
+   <!--...Page Content here-->
+ </a4j:page>
+</f:view>
+]]></programlisting>
+    <para>This structure is rendered as:</para>
+    <programlisting role="XML"><![CDATA[<HTML>
+ <HEAD> 
+ <!--...Head Content here-->
+ </HEAD> 
+<body >
+ <!--...Page Content Here-->
+</body> 
+</HTML>]]></programlisting>
+  </section>
+  <section>
+    <title>Dynamical creation of a component from Java code</title>
+    <programlisting role="JAVA"><![CDATA[import org.ajax4jsf.components.Page;
+...
+Page myPage = new Page();
+...
+]]></programlisting>
+  </section>
+  <section>
+    <title>Key attributes and ways of usage</title>
+    <para>The component is mostly used to solve the following problem with MyFaces for erlier Ajax4gsf versions: in MyFaces <emphasis role="bold">
+        <property>&lt;f:view&gt;</property>
+      </emphasis> doesn&apos;t get control over the &quot;<emphasis role="italic">
+        <property>RENDER_RESPONSE</property>
+      </emphasis>&quot; phase, thus AJAX can&apos;t get control and make a response also. To avoid this problem it was necessary to use <emphasis role="bold">
+        <property>&lt;a4j:page&gt;</property>
+      </emphasis> on the page round the AJAX updatable area. In the last versions of both frameworks the problem is successfully  fixed and no <emphasis role="bold"><property>&lt;a4j:page&gt;</property></emphasis> usage is required.</para>
+    <para>The component is rendered as a full HTML page template (it was shown in the example). The &quot;<emphasis role="italic">
+        <property>head</property>
+      </emphasis>&quot; section is defined with the help of the corresponding facet with the name=&quot;head&quot; and also there is an attribute with the same name for contentType definition.</para>
+    <para>All other component functionality is the same as of <emphasis role="bold">
+        &lt;a4j:region&gt;.
+      </emphasis> Its desctriprion could be found 
+<member>
+      <ulink url="http://webdownload.exadel.com/downloads/ajax4jsf/documentation/tldDoc/">here</ulink>.
+</member></para>
+
+ 
+  </section>
+</chapter>

Added: branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/poll.desc.xml
===================================================================
--- branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/poll.desc.xml	                        (rev 0)
+++ branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/poll.desc.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,9 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<root>
+<section>
+<title>Description</title>
+    <para>The <emphasis role="bold">
+        <property>&lt;a4j:poll&gt;</property>
+      </emphasis> component allows periodical sending of AJAX requests to the server and is used for a page update according to a specified in milliseconds time interval.</para>
+</section>
+</root>
\ No newline at end of file

Added: branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/poll.xml
===================================================================
--- branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/poll.xml	                        (rev 0)
+++ branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/poll.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,76 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<chapter>
+  
+      <table>
+      <title>Component identification parameters </title>
+      <tgroup cols="2">
+        <thead>
+          <row>
+            <entry>Name</entry>
+            <entry>Value</entry>
+          </row>
+        </thead>
+        <tbody>
+          <row>
+            <entry>component-type</entry>
+            <entry>org.ajax4jsf.components.Poll</entry>
+          </row>
+          <row>
+            <entry>component-family</entry>
+            <entry>org.ajax4jsf.components.AjaxPoll</entry>
+          </row>
+          <row>
+            <entry>component-class</entry>
+            <entry>org.ajax4jsf.components.AjaxPoll</entry>
+          </row>
+          <row>
+            <entry>renderer-type</entry>
+            <entry>org.ajax4jsf.components.AjaxPollRenderer</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </table>
+  
+  <section>
+    <title>Creating on a page</title>
+    <para>To use this component it&apos;s necessary only to set an update interval.</para>
+    <programlisting role="XML"><![CDATA[<a4j:poll interval="1000" reRender="someDataTable" action="#{bean.action1}"/>
+]]></programlisting>
+    <para>The <emphasis role="bold">
+        <property>&lt;a4j:poll&gt;</property>
+      </emphasis> component defined this way every second submits AJAX form onto the server, performs the corresponding action and renders a components with the <emphasis role="italic">
+        <property>&quot;someDataTable&quot;</property>
+      </emphasis> id after a response comes back.</para>
+  </section>
+  <section>
+    <title>Dynamical creation of a component from Java code</title>
+    <programlisting role="JAVA"><![CDATA[import org.ajax4jsf.ajax.html.AjaxPoll;
+...
+AjaxPoll myPoll = new AjaxPoll();
+...
+]]></programlisting>
+  </section>
+  <section>
+    <title>Key attributes and ways of usage</title>
+    <para>The component decodes all necessary JavaScript for time count and on the expiry of some interval for calling of a Ajax4jsf utility  method for Ajax request sending (A4J.AJAX.Submit (Some request parameters)).
+	 </para>
+	 <para>
+	 The timer could be stopped or started in any time. The current state is controlled on the component with the <emphasis role="italic">
+        <property>"enabled"</property>
+      </emphasis> attribute:
+	 </para>
+	 <programlisting role="XML"><![CDATA[<a4j:poll interval="1000" enabled="#{bean.boolProperty}"/>
+]]></programlisting>
+<para>As any Ajax4jsf Action component, <emphasis role="bold">
+        <property>&lt;a4j:poll&gt;</property>
+      </emphasis> has all described in the <emphasis role="bold">
+        <property><ulink url="ch06s05.html">&lt;a4j:support&gt;</ulink></property>
+      </emphasis> chapter attributes to provide the necessary behavior of request sending (delay, limitation of a submit and render area, requests frequency, and etc.). For detailed information on these attributes see again the <emphasis role="bold">
+        <property><ulink url="ch06s05.html">&lt;a4j:support&gt;</ulink></property></emphasis> component description.
+ </para>
+ <para>
+The aditional information about component usage you can find here:<ulink url="http://jboss.com/index.html?module=bb&amp;op=viewtopic&amp;t=103909">Ajax4Jsf Users Forum.
+	</ulink>
+ </para>
+  </section>
+</chapter>
\ No newline at end of file

Added: branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/region.desc.xml
===================================================================
--- branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/region.desc.xml	                        (rev 0)
+++ branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/region.desc.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,11 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<root>
+<section>
+<title>Description</title>
+  <para>
+The <emphasis role="bold">
+<property>&lt;a4j:region&gt;</property>
+</emphasis> component defines an area that is decoded on the server after AJAX submission.
+</para>
+</section>
+</root>

Added: branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/region.xml
===================================================================
--- branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/region.xml	                        (rev 0)
+++ branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/region.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,116 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<chapter>
+  
+     <table>
+	  <title>Component identification parameters </title>
+      <tgroup cols="2">
+	  <thead>
+            <row>
+                  <entry>Name</entry>
+                  <entry>Value</entry>
+            </row>
+        </thead>
+        <tbody>
+          <row>
+            <entry>component-type</entry>
+            <entry>org.ajax4jsf.ajax.AjaxRegion</entry>
+          </row>
+          <row>
+            <entry>component-family</entry>
+            <entry>org.ajax4jsf.components.AjaxRegion.</entry>
+          </row>
+          <row>
+            <entry>component-class</entry>
+            <entry>org.ajax4jsf.ajax.html.HtmlAjaxRegion</entry>
+          </row>
+          <row>
+            <entry>renderer-type</entry>
+            <entry>org.ajax4jsf.components.AjaxRegionRenderer</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </table>
+  
+  <section>
+    <title>Creating on a page</title>
+    <para>Here is an example of the region decoding on a page. </para>
+    <programlisting role="XML"><![CDATA[<a4j:region>
+	<!--..Some content that will be decoded on server after Ajax request.-->
+</a4j:region>]]></programlisting>
+  </section>
+  <section>
+    <title>Dynamical creation of a component from Java code</title>
+    <programlisting role="JAVA"><![CDATA[import org.ajax4jsf.ajax.html.HtmlAjaxRegion;
+...
+HtmlAjaxRegion newRegion = new HtmlAjaxRegion();
+...
+]]></programlisting>
+  </section>
+  <section>
+    <title>Key attributes and ways of usage</title>
+    <para>The region is a component used for manipulation with components sent to the server. It sets particular processing parameters for an area on the server, i.e. the region deals with data input on the server and has no direct impact on output. To read more on the components responsible for out, see &quot;reference&quot; 
+</para>
+    <para>The region marks an area page that is decoded on the server. In most cases it is not necessary to use the region, as ViewRoot is a default region. This component helps to reduce data quantity processed by the server, but the region doesn&apos;t influence on the standard submission rules. It means that:<itemizedlist>
+        <listitem>
+          The area that is to be submitted onto the server should be embedded in <emphasis role="bold">
+<property>&lt;h:form/a4j:form&gt;</property>
+</emphasis> component. 
+        </listitem>
+        <listitem>
+          The whole form is submitted on Ajax response and not a region that request is performed from. 
+        </listitem>
+      </itemizedlist></para>
+    <para><emphasis role="bold">Example:</emphasis></para>
+    <programlisting role="XML"><![CDATA[<h:form id="form1">
+	<a4j:region>
+		<a4j:commandLink reRender="someID" value="Link" id="link1"/>
+		<!--..Some content that will be decoded on server after Ajax request.-->
+	</a4j:region>
+<h:form>]]></programlisting>
+    <para>Hence, the <emphasis role="bold">
+        <property>&lt;a4j:commandLink&gt;</property>
+      </emphasis> request generation causes full &quot;form1&quot; form submission onto the server, the only difference is that a component tree part decoded on the serve is the part included into the region.</para>
+    <para>The regions could be nested in any order, the server picks out and decodes only the region, which contains a particular component that sends a request.</para>
+    <para><emphasis role="bold">Example:</emphasis></para>
+    <programlisting role="XML"><![CDATA[<a4j:region>
+	<a4j:commandLink reRender="someID" value="Link" id="link1"/>
+	<a4j:region>
+		<a4j:commandLink reRender="someID" value="Link" id="link2"/>
+		<!--..Some content that will be decoded on server after Ajax request.-->
+	</a4j:region >
+	<!--..Some content that will be decoded on server after Ajax request.-->
+</a4j:region >]]></programlisting>
+    <para>Therefore, the external region is decoded for the &quot;link1&quot; and the internal one is decoded for the &quot;link2&quot;.</para>
+    <para>Ajax4jsf allows setting Ajax responses rendering directly basing on component tree nodes without referring to the JSP (XHTML) page code. It could be defined by selfRendered attribute setting to &quot;true&quot; on <emphasis role="bold">
+        <property>&lt;a4j:region&gt;</property>
+      </emphasis> and could help considerably speed up a response output. However, this rapid processing could cause missing of transient components that present on view and don&apos;t come into a component tree as well as omitting of <emphasis role="bold">
+        <property>&lt;a4j:outputPanel&gt;</property>
+      </emphasis> usage described below. 
+</para>
+    <para><emphasis role="bold">Example:</emphasis></para>
+    <programlisting role="XML"><![CDATA[<a4j:region selfRendered ="true">
+	<a4j:commandLink reRender="someID" value="Link" id="link1"/>
+	<!--..Some content with HTML used ("br" ,"h1" and other tags used)-->
+</a4j:region >]]></programlisting>
+    <para>In this case, the processing is quicker and going on without referring to a page code, but the HTML code that isn&apos;t saved in a component tree could be lost. Thus, this optimization should be very carefully performed and a usage of the additional components ajax4jsf (<emphasis role="bold"><property>&lt;a4j:outputPanel&gt;</property></emphasis>) is required. </para>
+    <para>The processing could be also accelerated if a region decoded for the processing passes straight away into Encode. But to update some data out of the region or on another region, use the <emphasis role="italic">
+        <property>&quot;renderRegionOnly&quot;</property>
+      </emphasis> 
+attribute set to &quot;false&quot; (&quot;true on default&quot;) to change this behaviour.</para>
+    <para><emphasis role="bold">Example:</emphasis></para>
+    <programlisting role="XML"><![CDATA[<a4j:region renderRegionOnly="true">
+	<a4j:commandLink reRender="someID2" value="Link1" id="link1"/>
+	<h:panelGroup id="someId1">
+	</h:panelGroup>
+</a4j:region>
+<a4j:region renderRegionOnly="false">
+	<a4j:commandLink reRender="someID1" value="Link2" id="link2"/>
+	<h:panelGroup  id="someId1">
+	</h:panelGroup>
+</a4j:region>]]></programlisting>
+    <para>This example shows that one of the regions is decoded when a link is used inside. Nevertheless, 
+    if after processing the &quot;link1&quot; is clicked, the first region passes into Encode as a root 
+    region and encode performance time is reduced. This optimization doesn&apos;t allow data update out of the
+     region and should be implemented very carefully. The data out of the region described with &quot;renderRegionOnly&quot;=&quot;false&quot; is updated successfully.</para>
+  </section>
+</chapter>

Added: branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/repeat.desc.xml
===================================================================
--- branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/repeat.desc.xml	                        (rev 0)
+++ branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/repeat.desc.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,9 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<root>
+<section>
+<title>Description</title>
+    <para>The <emphasis role="bold">
+        <property>&lt;a4j:repeat&gt;</property>
+      </emphasis> component implements a basic iteration component allowing to update a set of its children with AJAX.</para>
+</section>
+</root>
\ No newline at end of file

Added: branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/repeat.xml
===================================================================
--- branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/repeat.xml	                        (rev 0)
+++ branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/repeat.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,114 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<chapter>
+  
+      <para><table frame="all">
+ <title>Component identification parameters</title>
+        <tgroup cols="2">
+	  <thead>
+            <row>
+                <entry>Name</entry>
+                <entry>Value</entry>
+            </row>
+       </thead>
+          <tbody>
+            <row>
+              <entry>component-type</entry>
+              <entry>org.ajax4jsf.ajax.Repeat </entry>
+            </row>
+            <row>
+              <entry>component-family</entry>
+              <entry>javax.faces.Data </entry>
+            </row>
+            <row>
+              <entry>component-class</entry>
+              <entry>org.ajax4jsf.ajax.html.HtmlAjaxRepeat </entry>
+            </row>
+            <row>
+              <entry>renderer-type</entry>
+              <entry>org.ajax4jsf.components.RepeatRenderer </entry>
+            </row>
+          </tbody>
+        </tgroup>
+      </table></para>
+    
+    <section>
+      <title>Creating on a page</title>
+      <para>The component definition on a page is the same as for the <emphasis role="italic">
+        <property>&quot;facelets&quot;</property>
+       </emphasis> component:</para>
+			<programlisting role="XML"><![CDATA[<a4j:repeat id="detail" value="#{bean.props}" var="detail">
+	<h:outputText value="#{detail.someProperty}"/>
+</a4j:repeat>]]></programlisting>
+            <para>The output is generated according to a collection contained in <emphasis role="italic">
+        <property>&quot;bean.props&quot;</property>
+       </emphasis> with the &quot;detail&quot; key passed to child components.</para>
+	   </section>
+	  <section>
+      <title>Dynamical creation of a component from Java code</title>
+      <programlisting role="JAVA"><![CDATA[import org.ajax4jsf.ajax.html.HtmlAjaxRepeat;
+...
+HtmlAjaxRepeat repeater = new HtmlAjaxRepeat ();
+...
+]]></programlisting>
+    </section>
+    <section>
+      <title>Key attributes and ways of usage</title>
+      <para>The main difference of this component from iterative components of other libraries is a special <emphasis role="italic">
+        <property>&quot;ajaxKeys&quot;</property>
+       </emphasis> attribute. This attribute defines strings that are updated after an AJAX request. As a result it becomes easier to update several child components separately without updating the whole page.</para>
+	  <programlisting role="JSP"><![CDATA[<a4j:poll intervall="1000" action="#{repeater.action}" reRender="list">
+...
+<table>
+ <tbody>
+   <a4j:repeat value="#{bean.props}" var="detail" binding="#{repeater.myRepeat}"
+	 id="list" ajaxKeys="#{repeater.ajaxedRowsSet}">
+	 </tr>
+	   <td>
+	    <h:outputText value="detail.someProperty">
+	    </td>
+	  </tr>
+   </a4j:repeat>
+   <tbody>
+<table>
+]]></programlisting>
+      <para>Thus, a list with a table structure from <emphasis role="italic">
+        <property>&quot;bean.props&quot;</property>
+       </emphasis> is output.</para>
+	   <para>In the above-mentioned example the component <emphasis role="bold">
+        <property>&lt;a4j:poll&gt;</property>
+       </emphasis> sends AJAX requests every second, calling the <emphasis role="italic">
+        <property>&quot;action&quot;</property>
+       </emphasis> method of the  <emphasis role="italic">
+        <property>&quot;repeater&quot;</property>
+       </emphasis> bean. 	   
+	   </para>
+	    <note>
+    <title>Note:</title>
+    <para>The <emphasis role="bold">
+        <property>&lt;a4j:repeater&gt;</property>
+       </emphasis> component is defined as fully updated, but really updated there are only the strings which rowKeys are included into the set <emphasis role="italic">
+        <property>&quot;ajaxRowSet&quot;</property>
+       </emphasis> defined in the <emphasis role="italic">
+        <property>&quot;ajaxKeys&quot;</property>
+       </emphasis> attribute </para>
+	   <para>The set could be defined during the action method processing using data on a model from the property <emphasis role="italic">
+        <property>&quot;repeater.myRepeat&quot;</property>
+       </emphasis></para>
+  </note>
+<para>One more benefit of this component is absence of strictly defined markup as JSF HTML DataTable and Tomahawk DataTable has, hence the components could be used more flexibly anywhere where it&apos;s necessary to output the results of selection from some collection.</para>
+<para>The next example shows collection output as a plain HTML list</para>
+	  <programlisting role="JSP"><![CDATA[<ul>
+      <a4j:repeat ...>
+	    <li>...<li/>
+	     ...
+	    <li>...<li/>
+      </a4j:repeat>
+</ul>
+]]></programlisting>
+      <para>All other general attributes are defined according to the similar attributes of iterative components (<emphasis role="bold">
+        <property>&lt;h:dataTable&gt;</property>
+       </emphasis> or <emphasis role="bold">
+        <property>&lt;ui:repeat&gt;</property>
+       </emphasis>) and are used in the same way.</para>
+    </section>
+</chapter>
\ No newline at end of file

Added: branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/status.desc.xml
===================================================================
--- branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/status.desc.xml	                        (rev 0)
+++ branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/status.desc.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,9 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<root>
+  <section>
+<title>Description</title>
+    <para>The <emphasis role="bold">
+        <property>&lt;a4j:status&gt;</property>
+      </emphasis> component generates elements for displaying of the current AJAX requests status. There are two status modes: AJAX request is in process or finished.</para>
+  </section>
+</root>
\ No newline at end of file

Added: branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/status.xml
===================================================================
--- branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/status.xml	                        (rev 0)
+++ branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/status.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,115 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<chapter>
+  
+      <para><table frame="all">
+ <title>Component identification parameters</title>
+        <tgroup cols="2">
+	  <thead>
+            <row>
+                <entry>Name</entry>
+                <entry>Value</entry>
+            </row>
+       </thead>
+          <tbody>
+            <row>
+              <entry>component-type</entry>
+              <entry>org.ajax4jsf.ajax.Status </entry>
+            </row>
+            <row>
+              <entry>component-family</entry>
+              <entry>javax.faces.Panel </entry>
+            </row>
+            <row>
+              <entry>component-class</entry>
+              <entry>org.ajax4jsf.ajax.html.HtmlAjaxStatus </entry>
+            </row>
+            <row>
+              <entry>renderer-type</entry>
+              <entry>org.ajax4jsf.components.AjaxStatusRenderer </entry>
+            </row>
+          </tbody>
+        </tgroup>
+      </table></para>
+    
+    <section>
+      <title>Creating on a page</title>
+      <para>There are two ways to define elements indicating a request status :</para>
+	  <itemizedlist>
+          <listitem>
+            With <emphasis role="italic">
+                <property>&quot;StartText&quot;/&quot;StopText&quot;</property>
+              </emphasis> atributes:
+			<programlisting role="XML"><![CDATA[<a4j:status startText="Progress" stopText="Done" for="stat1">]]></programlisting>
+            <para>In this case, text elements for the corresponding status are generated.</para>
+          </listitem>
+        </itemizedlist>
+		<itemizedlist>
+          <listitem>
+            With &quot;Start&quot;/&quot;Stop&quot; facets definition:
+			<programlisting role="XML"><![CDATA[<a4j:status for="stat2">
+	<f:facet name="start">
+		<h:graphicImage value="ajax_process.gif" />
+	</f:facet>
+	<f:facet name="stop">
+		<h:graphicImage value="ajax_stoped.gif" />
+	</f:facet>
+</a4j:status>]]></programlisting>
+            <para>In this case, the elements are generated for each  status and correspond the facets content.</para>
+          </listitem>
+        </itemizedlist>
+    </section>
+	  <section>
+      <title>Dynamical creation of a component from Java code</title>
+      <programlisting role="JAVA"><![CDATA[import org.ajax4jsf.ajax.html.HtmlAjaxStatus;
+...
+HtmlAjaxStatus  myStatus = new HtmlAjaxStatus();
+...]]></programlisting>
+    </section>
+    <section>
+      <title>Key attributes and ways of usage</title>
+      <para>There are  two ways for components or containers definition, which AJAX requests status is tracked by a component.<itemizedlist>
+          <listitem>
+           Definition with the <emphasis role="italic">
+        <property>&quot;for&quot;</property>
+       </emphasis> 
+attribute on the <emphasis role="bold">
+          <property>&lt;a4j:status&gt;</property>
+        </emphasis> component. Here <emphasis role="italic">
+        <property>&quot;for&quot;</property>
+       </emphasis> 
+attribute should point at an AJAX container (<emphasis role="bold"><property>&lt;a4j:region&gt;</property></emphasis>) &quot;id&quot;, which requests are tracked by a component.
+          </listitem>
+        </itemizedlist><itemizedlist>
+          <listitem>
+            Definition with the <emphasis role="italic">
+        <property>&quot;status&quot;</property>
+       </emphasis> 
+attribute obtained by any Ajax4jsf library action component. The attribute should point at the <emphasis role="bold">
+          <property>&lt;a4j:status&gt;</property>
+        </emphasis>  component &quot;id&quot;. Then this  <emphasis role="bold">
+          <property>&lt;a4j:status&gt;</property>
+        </emphasis> component   shows the status for the request fired from this action component.
+          </listitem>
+        </itemizedlist></para>
+      <para>The component creates two <emphasis role="bold"><property>&lt;span&gt;</property></emphasis> elements with content defined for each status, one of the elements (start) is initially hidden. At the beginning of an AJAX request, elements state is inversed, hence the second element is shown and the first is hidden. At the end of a response processing, elements display states return to its initial values.</para>
+      <para>Example:</para>
+	  <programlisting role="XML"><![CDATA[<a4j:status startText="Started" stopText="stopped"  layout="block"/>]]></programlisting>
+      <para>is decoded on a page as:</para><programlisting role="XML"><![CDATA[<span id="j_id20:status.start" style="display: none">
+      Started
+</span>
+<span id="j_id20:status.stop">
+        Stopped
+</span>]]></programlisting>
+      <para>And after the generation of an AJAX response is changed to:</para>
+	  <programlisting role="XML"><![CDATA[<span id="j_id20:status.start">
+        Started
+</span>
+<span id="j_id20:status.stop" style="display: none">
+        Stopped
+</span>]]></programlisting>
+      <para>There is a possibility to group a <emphasis role="bold"><property>&lt;a4j:status&gt;</property></emphasis> elements content into <emphasis role="bold"><property>&lt;div&gt;</property></emphasis> elements, instead of <emphasis role="bold"><property>&lt;span&gt;</property></emphasis>. To use it, just redefine the <emphasis role="italic">
+        <property>&quot;layout&quot;</property>
+       </emphasis> 
+attribute from &quot;incline&quot;(default) to &quot;block&quot;.</para>
+    </section>
+</chapter>

Added: branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/support.desc.xml
===================================================================
--- branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/support.desc.xml	                        (rev 0)
+++ branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/support.desc.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,9 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<root>
+<section>
+<title>Description</title>
+  <para>The <emphasis role="bold">
+          <property>&lt;a4j:support&gt;</property>
+        </emphasis> component adds an AJAX support to any existing JSF component. It allows a component to generate asynchronous requests on the necessary event demand and with partial update of page content after a response incoming from the server.</para>
+</section>
+</root>
\ No newline at end of file

Added: branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/support.xml
===================================================================
--- branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/support.xml	                        (rev 0)
+++ branches/refactor1/docs/ajaxguide/en/src/main/docbook/included/support.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,146 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<chapter>
+  
+    <table>
+	 <title>Component identification parameters</title>
+      <tgroup cols="2">
+	  <thead>
+            <row>
+                <entry>Name</entry>
+                <entry>Value</entry>
+            </row>
+        </thead>	 
+        <tbody>
+          <row>
+            <entry>component-type</entry>
+            <entry>org.ajax4jsf.ajax.Support</entry>
+          </row>
+          <row>
+            <entry>component-family</entry>
+            <entry>org.ajax4jsf.components.AjaxSupport</entry>
+          </row>
+          <row>
+            <entry>component-class</entry>
+            <entry>org.ajax4jsf.ajax.html.HtmlAjaxSupport</entry>
+          </row>
+          <row>
+            <entry>renderer-type</entry>
+            <entry>org.ajax4jsf.components.AjaxSupportRenderer</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </table>
+ 
+  <section>
+    <title>Creating on a page</title>
+    <para>To use a component, place <emphasis role="bold">
+          <property>&lt;a4j:support&gt;</property>
+        </emphasis> as nested to the component requesting AJAX functionality and specify an event of a
+         parent component that generates AJAX request and the components to be rerendered after a response
+          from the server.</para>
+    <para><emphasis role="bold">Example:</emphasis></para>
+    <programlisting role="XML"><![CDATA[<h:inputText value="#{bean.text}">
+	<a4j:support event="onkeyup" reRender="repeater"/>
+</h:inputText>
+<h:outputText id="repeater" value="#{bean.text}"/>]]></programlisting>
+    <para>On every keyup event generated by an input field, a form is submitted on the server with the help of Ajax and 
+    on a response coming from the server, element with &quot;repeater&quot; id, founded in a DOM tree is 
+    redrawn according to a new data from the response.</para>
+  </section>
+  <section>
+    <title>Dynamical creation of a component from Java code</title>
+    <programlisting role="JAVA"><![CDATA[import org.ajax4jsf.ajax.html.HtmlAjaxSupport;
+...
+HtmlAjaxSupport mySupport = new HtmlAjaxSupport();>]]></programlisting>
+  </section>
+  <section>
+    <title>Key attributes and ways of usage</title>
+    <para>A4j support addition is very similar to correspondent event redefinition of a component, i.e. 
+</para>
+    <para><emphasis role="bold">Example:</emphasis></para>
+	<programlisting role="XML"><![CDATA[<h:inputText value="#{bean.text}">
+    <a4j:support event="onkeyup" reRender="repeater"/>
+</h:inputText>
+]]></programlisting>
+<para>Is decoded on the page as:</para>
+<programlisting role="XML"><![CDATA[
+<input  onkeyup="A4J.AJAX.Submit( Some request parameters )"/>
+]]></programlisting>
+    <para>As you see from the code, the &quot;onkeyup&quot;
+event calls a utility ajax4jsf method that submit a form creating a special marks for a filter informing that  it is an Ajax request. Thus, any supports quantity could be added to every component, the supports define component behavior on these events. </para>
+    <note>
+      <para>The components: <emphasis role="bold"><property>&lt;a4j:commandLink&gt;</property></emphasis>, <emphasis role="bold"><property>&lt;a4j:commandButton&gt;</property></emphasis>, <emphasis role="bold">
+          <property>&lt;a4j:poll&gt;</property>
+        </emphasis> and others from Ajax4jsf library are already supplied with <emphasis role="bold">
+          <property>&lt;a4j:support&gt;</property>
+        </emphasis> functionality and there is no necessity to add the support to them. </para>
+    </note>
+    <para>With the help of <emphasis role="italic">
+        <property>&quot;onsubmit&quot;</property></emphasis> and <emphasis role="italic">
+        <property>&quot;oncomplete&quot;</property></emphasis> attributes the component allows using JavaScript before (for request sending conditions checking) and after an AJAX response processing termination (for performance of user-defined activities on the client) </para>
+    <para><emphasis role="bold">Example:</emphasis></para>
+	<programlisting role="XML"><![CDATA[<h:selectOneMenu value="#{bean.text}">
+	<f:selectItem itemValue="First Item " itemLabel="First Item"/>
+	<f:selectItem itemValue=" Second Item " itemLabel="Second Item"/>
+	<f:selectItem itemValue=" Third Item " itemLabel="Third Item"/>
+		<a4j:support event="onblur" reRender="panel" onsubmit="if(!confirm('Are you sure to change the option ?')) 
+					{form.reset(); return false;}" oncomplete="alert('Value succesfully stored')"/>
+</h:selectOneMenu>]]></programlisting>
+    <para>In example there is the condition checking (confirm) is used before request sending and message printing after the request processing is over. </para>
+    <para>The components allows different AJAX request managing ways for its various optimization in particular conditions such as: 
+<itemizedlist>
+        <listitem>
+          <emphasis role="bold">Limitation of the submit area and updating area for the request.</emphasis>
+          <para><emphasis role="italic"><property>&quot;ajaxSingle&quot;</property></emphasis> is an attribute that allows submission on the server only component sending a request, as if the component presented on a separate form. 
+
+</para>
+          <para><emphasis role="italic"><property>&quot;limitToList&quot;</property></emphasis> is an attribute  that allows to limit areas, which are updated after the responses. Only these components defined in the  reRender attribute are updated. </para>
+        </listitem>
+      </itemizedlist></para>
+    <para><emphasis role="bold">Example 1:</emphasis></para>
+	<programlisting role="XML"><![CDATA[<h:form>
+	<h:inputText value="#{person.name}">
+		<a4j:support event="onkeyup" reRender="test" ajaxSingle="true"/>
+	</h:inputText>
+	<h:inputText value="#{person.middleName}"/>
+</form>]]></programlisting>
+    <para>In this example the request contains only the input component causes the  request generation, not  all the components contained on a form, because of &quot;ajaxSingle=true&quot; usage.  </para>
+    <para><emphasis role="bold">Example 2:</emphasis></para>
+	<programlisting role="XML"><![CDATA[<h:form>
+	<a4j:outputPanel ajaxRendered="true">
+		<h:messages/>
+	</a4j:outputPanel>
+	<h:inputText value="#{person.name}">
+		<a4j:support event="onkeyup" reRender="test" limitToList="true"/>
+	</h:inputText>
+	<h:outputText value="#{person.name}" id="test"/>
+</form>]]></programlisting>
+    <para>In this example the component &quot;h:messages&quot; is always updated (as it capturing all AJAX requests, located in ajaxRendered <emphasis role="bold"><property>&lt;a4j:outputPanel&gt;</property></emphasis>), except the case when a response is sent from the input component from the example. On sending this component marks that updating area is limited to the defined in it components, it means that on its usage with &quot;limitToList&quot;=&quot;true&quot;  the only component updated is the one with &quot;d&quot;=&quot;test&quot;.</para>
+	<itemizedlist>
+        <listitem>
+          <emphasis role="bold">Limitation of requests frequency and updates quantity after the responses. </emphasis>
+          <para><emphasis role="italic"><property>&quot;requestDelay&quot;</property></emphasis> is an attribute that defines a time interval in seconds minimally permissible between responses. 
+
+</para>
+          <para><emphasis role="italic"><property>&quot;eventQueue&quot;</property></emphasis> is an attribute for naming of the queue where the next response is kept in till its processing, but if the next event comes in till this time is over, the waiting event is taken away, replacing with a new one. 
+
+</para>
+          <para><emphasis role="italic"><property>&quot;ignoreDupResponces&quot;</property></emphasis> is an attribute that allows to disable any updates on the client after an AJAX request if another AJAX request is already sent. 
+</para>
+          <para><emphasis role="italic"><property>&quot;timeout&quot;</property></emphasis> is an attribute that allows to set a time interval in millisecond to define a maximum time period of response wait time. In case of the interval interaction, a new request is sent and the previous one is canceled. Postprocessing of a response isn't performed.
+</para>
+          <para><emphasis role="bold">Example:</emphasis></para>
+		  <programlisting role="XML"><![CDATA[<h:form>
+	<h:inputText value="#{person.name}">
+	   <a4j:support event="onkeyup" reRender="test" 
+	   requestDelay="1000" ignoreDupResponces="true" eventsQueue="myQueue"/>
+	</h:inputText>
+	<h:outputText value="#{person.name}" id="test"/>
+</form>]]></programlisting>
+          <para>This example clearly shows  mentioned above attributes. If quick typing in a text field happens, every next requests sending is delayed for a second and requests quantity is reduced. The requests are kept in the queue &quot;myQueue&quot; till its the sending.
+Moreover, if the next request is already sent, the rerendering after the previous request is banned, and
+ it helps to avoid unnecessary processing on the client.</para>
+        </listitem>
+      </itemizedlist>
+  </section>
+  </chapter>
\ No newline at end of file

Added: branches/refactor1/docs/ajaxguide/en/src/main/docbook/master.xml
===================================================================
--- branches/refactor1/docs/ajaxguide/en/src/main/docbook/master.xml	                        (rev 0)
+++ branches/refactor1/docs/ajaxguide/en/src/main/docbook/master.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3CR3//EN"
+"../../../../../xslt/src/main/resources/support/docbook-dtd/docbookx.dtd"
+[	<!ENTITY introduction SYSTEM "modules/a4jUGintro.xml">
+	<!ENTITY technicalRequirements SYSTEM "modules/a4jUGtechreqs.xml">
+	<!ENTITY getttingStarted SYSTEM "modules/a4jUGstart.xml">
+	<!ENTITY envSettings SYSTEM "modules/a4jUGenvsettings.xml">
+	<!ENTITY usingAJAX SYSTEM "modules/a4jUGusingAJAX.xml">
+	<!ENTITY componentDetails SYSTEM "../../../target/generated/a4j.xml">
+	<!ENTITY skinnability SYSTEM "modules/a4jUGskinnability.xml">
+	<!ENTITY IDEintegration SYSTEM "modules/a4jUGideintegration.xml">
+	<!ENTITY EVCP SYSTEM "modules/a4jUGevcp.xml">
+	<!ENTITY resourceLinks SYSTEM "modules/a4jUGlinks.xml">
+	<!ENTITY wadParams SYSTEM "modules/AUGWADParams.xml">
+	<!ENTITY FAQ SYSTEM "modules/a4jUGfaq.xml">
+]>
+<book>
+    <bookinfo>
+    	<title>Ajax4jsf Developer Guide</title>
+	<subtitle>A JSF component library and framework for incorporating AJAX into Web applications</subtitle>
+        <copyright>
+			<year>2007</year>
+			<holder>Red Hat</holder>
+	    </copyright>
+    	
+    </bookinfo>
+	<toc/>  
+		&introduction;
+        &technicalRequirements;
+        &envSettings;
+		&getttingStarted;
+		&usingAJAX;
+        <chapter>
+            
+            <title>Ajax4jsf components</title>
+	   	&componentDetails;
+	   	</chapter>
+		&skinnability;
+        &IDEintegration;
+        &resourceLinks;        
+</book>    

Added: branches/refactor1/docs/ajaxguide/en/src/main/docbook/modules/AUGWADParams.xml
===================================================================
--- branches/refactor1/docs/ajaxguide/en/src/main/docbook/modules/AUGWADParams.xml	                        (rev 0)
+++ branches/refactor1/docs/ajaxguide/en/src/main/docbook/modules/AUGWADParams.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="UTF-8"?>
+  <section id="WebApplicationDescriptorParameters"  xreflabel="WebApplicationDescriptorParameters">
+  <?dbhtml filename="WebApplicationDescriptorParameters.html" ?>
+
+  <chapterinfo>
+    <keywordset>
+      <keyword>Descriptor</keyword>
+
+      <keyword>JSF</keyword>
+
+      <keyword>Ajax4jsf</keyword>
+    </keywordset>
+  </chapterinfo>
+
+      <title>Web Application Descriptor parameters</title>
+      <para>These parameters help with development and increase the flexibility of Ajax4jsf use.</para>
+          <para>
+          <table>
+              <title>Initialization Parameters</title>
+              <tgroup cols="3">
+                  <thead>
+                      <row>
+                          <entry>Name</entry>
+                          <entry>Default</entry>
+                          <entry>Description</entry>
+                      </row>
+                  </thead>
+                  <tbody>
+                      <row>
+                          <entry>org.ajax4jsf.LOGFILE</entry>
+                          <entry>none</entry>
+                          <entry>
+                       The is an URL to an application or a container log file (if possible). If this parameter is set, a content from the given URL will be shown on a <emphasis role="italic"><property>Debug</property></emphasis> error page in the <emphasis role="italic"><property>iframe</property></emphasis> window 
+                          </entry>
+                      </row>
+                      <row>
+                          <entry>org.ajax4jsf.VIEW_HANDLERS</entry>
+                          <entry>none</entry>
+                          <entry>
+                              Is a comma-separated list of custom <emphasis role="italic"><property>"ViewHandler"</property></emphasis> instances 
+                              for inserting in chain. Handlers are inserted in the given order. So must be used if the order of them is important. 
+                              No need to define ajax4jsf handler there, as it will be always the first.  
+                          </entry>
+                      </row>
+                      <row>
+                          <entry> org.ajax4jsf.CONTROL_COMPONENTS</entry>
+                          <entry>none</entry>
+                          <entry>
+                             Is a comma-separated list of names for a component as a special control case, such as messages bundle loader, alias bean components, etc. Is a type of component got by a reflection from the static field <emphasis role="italic"><property>COMPONENT_TYPE</property></emphasis>. For components with such types encode methods always are called in rendering AJAX responses, even if a component isn&apos;t in an updated part 
+                          </entry>
+                      </row>
+                      <row>
+                          <entry>org.ajax4jsf.ENCRYPT_RESOURCE_DATA</entry>
+                          <entry>false</entry>
+                          <entry>
+                              For generated resources, such as encrypt generation data, it&apos;s encoded in the resource URL. For example, URL for an image generated from the <emphasis role="italic"><property>mediaOutput</property></emphasis> component contains a name of a generation method, since for a hacker attack, it is possible to create a request for any JSF baked beans or other attributes. To prevent such attacks, set this parameter to true in critical applications (works with JRE > 1.4)
+                          </entry>
+                      </row>
+                      <row>
+                          <entry>org.ajax4jsf.ENCRYPT_PASSWORD</entry>
+                          <entry>random</entry>
+                          <entry>
+                              Is a password for encrypt resources data. If isn&apos;t set, random password is used 
+                          </entry>
+                      </row>
+                      <row>
+                          <entry>org.ajax4jsf.SKIN</entry>
+                          <entry>DEFAULT</entry>
+                          <entry>Is a name of a skin used in an application. It can be a literal string with a skin name, or the <emphasis role="italic"><property>EL</property></emphasis> expression (#{...}) pointed to a <emphasis role="italic"><property>String</property></emphasis> property (skin name) or a property with the type org.ajax4jsf.framework.skin. Skin in last case, this instance will be used as a current skin
+                          </entry>
+                      </row>
+					  <row>
+                          <entry>org.ajax4jsf.COMPRESS_SCRIPT</entry>
+                          <entry>true</entry>
+                          <entry>It doesn&apos;t allow A4J to reformat JavaScript files (makes it impossible to debug)
+                          </entry>
+                      </row>
+                  </tbody>
+              </tgroup>
+          </table>
+          </para>
+          <para>
+          <table>
+              <title>org.ajax4jsf.Filter Initialization Parameters</title>
+              <tgroup cols="3">
+                  <thead>
+                      <row>
+                          <entry>Name</entry>
+                          <entry>Default</entry>
+                          <entry>Description</entry>
+                      </row>
+                  </thead>
+                  <tbody>
+                      <row>
+                          <entry>log4j-init-file</entry>
+                          <entry>-</entry>
+                          <entry>Is a path (relative to web application context) to the log4j.xml configuration file, it can be used to setup per-application custom logging
+                          </entry>
+                      </row>
+                      <row>
+                          <entry>enable-cache</entry>
+                          <entry>true</entry>
+                          <entry>Enables caching of framework-generated resources (Javascript, CSS, images, etc). For debug purposes - development custom JavaScript or Style - prevent to use old cached in browser
+                          </entry>
+                      </row>
+                      <row>
+                          <entry>forceparser</entry>
+                          <entry>true</entry>
+                          <entry>
+                              Forces parsing by a filter <emphasis role="italic"><property>HTML</property></emphasis> syntax checker on any JSF page. If false, only AJAX responses are parsed to syntax check and conversion to well-formed XML. Setting to false improve performance, but can provide visual effects on AJAX updates
+                          </entry>
+                      </row>
+                  </tbody>
+              </tgroup>
+          </table>
+          </para>
+  </section>
\ No newline at end of file

Added: branches/refactor1/docs/ajaxguide/en/src/main/docbook/modules/a4jUGenvsettings.xml
===================================================================
--- branches/refactor1/docs/ajaxguide/en/src/main/docbook/modules/a4jUGenvsettings.xml	                        (rev 0)
+++ branches/refactor1/docs/ajaxguide/en/src/main/docbook/modules/a4jUGenvsettings.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,208 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<chapter id="SettingsForDifferentEnvironments" xreflabel="SettingsForDifferentEnvironments">
+  <?dbhtml filename="SettingsForDifferentEnvironments.html"?>
+<chapterinfo>
+    <keywordset>
+      <keyword>MyFaces</keyword>
+
+      <keyword>JSF</keyword>
+
+      <keyword>Ajax4jsf</keyword>
+      <keyword>AjaxViewHandler</keyword>
+    </keywordset>
+  </chapterinfo>
+
+  <title>Settings for different environments</title>
+  <para>Ajax4jsf comes with support for all tags (components) included in the
+  JavaServer Faces specification. To add Ajax4jsf capabilities to an existing
+  JSF project you should just put the Ajax4jsf libraries into the lib folder of
+  the project and add filter mapping. The behavior of the existing project
+  doesn&apos;t change just because of  Ajax4jsf.</para>
+&wadParams;
+<section id="SunJSFRI">
+<?dbhtml filename="SunJSFRI.html"?>
+    <title>Sun JSF RI</title>
+    <para>Ajax4jsf works with any implementation of <property>JSF</property> (both JSF 1.1 and
+      JSF 1.2) and with most <property>JSF</property> component libraries without any additional settings. 
+      For more information look at:</para>
+    
+<simplelist>
+<member>
+      <ulink url="http://java.sun.com/javaee/javaserverfaces/">java.sun.com</ulink>
+</member>
+</simplelist>
+    
+  </section>
+  <section id="ApacheMyFaces">
+  <?dbhtml filename="ApacheMyFaces.html"?>
+    <title>Apache MyFaces</title>
+    <para>Ajax4jsf works with all <property>Apache MyFaces</property> versions (1.1.1 - 1.1.5)
+    including specific libraries like Tomahawk Sandbox and 
+    Trinidad (the previous ADF Faces). However, there are some considerations
+    to take into account for configuring applications to work with <property>MyFaces</property> and
+    Ajax4jsf.</para>
+    <para>There are some problems with different filters defined in
+    the web.xml file clashing. To avoid these problems, the Ajax4jsf filter
+    must be the first one among other filters in the web.xml configuration
+    file.</para>
+    <para>For more information look at:<ulink url="http://myfaces.apache.org">http://myfaces.apache.org</ulink></para>
+    <para>
+      There&apos;s one more problem while using <property>MyFaces + Seam</property>. If you use this combination you should use 
+      <emphasis role="bold">
+        <property>&lt;a4j:page&gt;</property>
+      </emphasis> inside<emphasis role="bold">
+         <property>&lt;f:view&gt;</property>
+      </emphasis>(right after it in your code) wrapping another content
+      inside your pages because of some problems in realization of <emphasis role="bold">
+        <property>&lt;f:view&gt;</property>
+      </emphasis> in myFaces. 
+    </para>
+    <para>The problem is to be overcome in the nearest future.</para>
+  </section>
+  <section id="FaceletsSupport">
+  <?dbhtml filename="FaceletsSupport.html"?>
+    <title>Facelets Support</title>
+    <para>A high-level support for <property>Facelets</property> is one of our main support
+    features. When working with Ajax4jsf, there is no difference what release
+    of <property>Facelets</property> is used. </para>
+    <para>You should also take into account that some JSF frameworks such as <property>Facelets</property> use their own
+    ViewHandler and need to have it first in the chain of ViewHandlers and the
+    Ajax4jsf AjaxViewHandler is not an exception. At first Ajax4jsf installs its ViewHandler in any case, so in case of two frameworks, for example Ajax4jsf + Facelets, no changes in settings are required. Although, when more then one framework (except Ajax4jsf) is used, it's possible to use the VIEW_HANDLERS parameter defining these frameworks view handlers according to its usage order in it. 
+    For example, the
+    declaration:</para>
+    <programlisting role="XML">    &lt;context-param&gt;
+      &lt;param-name&gt;org.ajax4jsf.VIEW_HANDLERS&lt;/param-name&gt;
+      &lt;param-value&gt;com.sun.facelets.FaceletViewHandler&lt;/param-value&gt;
+    &lt;/context-param&gt;</programlisting>
+    <para>says that <property>Facelets</property> will officially be the first, however AjaxViewHandler
+    will be a little ahead temporarily to do some small, but very
+    important job. </para>
+    <note>
+        <title>Note:</title>
+        <para>In this case you don&apos;t have to define <property>FaceletViewHandler</property> in the
+    WEB-INF/faces-config.xml.</para>
+      </note>
+  </section>
+  <section id="JBossSeamSupport">
+  <?dbhtml filename="JBossSeamSupport.html"?>
+    <title>JBoss Seam Support</title>
+    <para>Ajax4jsf 1.1 now works out-of-the-box with <property>JBoss Seam </property>and Facelets running inside JBoss AS 4.0.4 and higher.
+      There is no more shared JAR files needed. You just have to package the Ajax4jsf library with your application.
+    </para>
+    <para>
+          Your web.xml still must be like this:
+        </para>
+    <programlisting role="XML"><![CDATA[web-app version="2.4" 
+    xmlns="http://java.sun.com/xml/ns/j2ee"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+
+   <!-- Seam -->
+   <listener>
+       <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
+   </listener>
+
+   <!--  ajax4jsf -->
+   <filter>
+       <display-name>Ajax4jsf Filter</display-name>
+       <filter-name>ajax4jsf</filter-name>
+       <filter-class>org.ajax4jsf.Filter</filter-class>
+   </filter>
+   <filter-mapping>
+      <filter-name>ajax4jsf</filter-name>
+      <url-pattern>*.seam</url-pattern>
+   </filter-mapping>
+
+   <!-- Propagate conversations across redirects -->
+   <filter>
+       <filter-name>Seam Redirect Filter</filter-name>
+       <filter-class>org.jboss.seam.servlet.SeamRedirectFilter</filter-class>
+   </filter>
+   <filter-mapping>
+       <filter-name>Seam Redirect Filter</filter-name>
+       <url-pattern>*.seam</url-pattern>
+   </filter-mapping>
+   
+  <filter>
+    <filter-name>Seam Exception Filter</filter-name>
+    <filter-class>org.jboss.seam.servlet.SeamExceptionFilter</filter-class>
+  </filter>
+
+  <filter-mapping>
+      <filter-name>Seam Exception Filter</filter-name>
+      <url-pattern>*.jsf</url-pattern>
+  </filter-mapping>
+  
+  <!-- JSF --> 
+  <context-param>
+    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+    <param-value>client</param-value>
+   </context-param> 
+     
+  <context-param>
+  <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
+  <param-value>com.sun.facelets.FaceletViewHandler</param-value>
+  </context-param>
+  
+  <context-param>
+    <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
+    <param-value>.xhtml</param-value>
+  </context-param>
+  <context-param>
+    <param-name>facelets.REFRESH_PERIOD</param-name>
+    <param-value>2</param-value>
+  </context-param>
+  <context-param>
+    <param-name>facelets.DEVELOPMENT</param-name>
+    <param-value>true</param-value>
+  </context-param>
+  <context-param>
+    <param-name>com.sun.faces.validateXml</param-name>
+    <param-value>true</param-value>
+  </context-param>
+  <context-param>
+    <param-name>com.sun.faces.verifyObjects</param-name>
+    <param-value>true</param-value>
+  </context-param>
+  <context-param>
+    <param-name>org.ajax4jsf.SKIN</param-name>
+    <param-value>DEFAULT</param-value>
+  </context-param>
+  
+  <servlet>
+      <servlet-name>Faces Servlet</servlet-name>
+      <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+      <load-on-startup>1</load-on-startup>
+  </servlet>
+
+  <!-- Faces Servlet Mapping -->
+  <servlet-mapping>
+      <servlet-name>Faces Servlet</servlet-name>
+      <url-pattern>*.seam</url-pattern>
+  </servlet-mapping>
+
+  <!-- MyFaces -->
+  <listener>
+      <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
+  </listener>    
+</web-app>]]>      </programlisting>
+    <para>Only one issue still persists while using <property>Seam</property> with MyFaces. Look at myFaces part of this section.</para>
+  </section>
+  <section id="Portlet Support">
+    <title>Portlet Support</title>
+    <para><property>Portlets</property> have support since version Ajax4jsf 1.1.1. Provide your feedback on compatible with Ajax4jsf if you face some problems.</para>
+  </section>
+  <section id="Sybase EAServer">
+    <title>Sybase EAServer</title>
+    <para>The load-on-startup for the Faces Servlet had to be set to 0 in web.xml.</para>
+    <programlisting role="XML"><![CDATA[...
+      <servlet>
+          <servlet-name>Faces Servlet</servlet-name>
+          <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+          <load-on-startup>0</load-on-startup>
+    </servlet>
+...
+]]></programlisting>
+    <para> This is because, EAServer calls servlet init() before the ServletContextInitializer. Not an EAServer bug, this is in Servlet 2.3 spec.</para>
+  </section>
+</chapter>

Added: branches/refactor1/docs/ajaxguide/en/src/main/docbook/modules/a4jUGevcp.xml
===================================================================
--- branches/refactor1/docs/ajaxguide/en/src/main/docbook/modules/a4jUGevcp.xml	                        (rev 0)
+++ branches/refactor1/docs/ajaxguide/en/src/main/docbook/modules/a4jUGevcp.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,26 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<chapter id="ExadelRichFacesVisualComponentPlatform2.0AndAjax4jsf" xreflabel="ExadelRichFacesVisualComponentPlatform2.0AndAjax4jsf">
+  <?dbhtml filename="ExadelRichFacesVisualComponentPlatform2.0AndAjax4jsf.html"?>
+   <chapterinfo>
+    <keywordset>
+      <keyword>RichFaces</keyword>
+
+      <keyword>JSF</keyword>
+
+      <keyword>Ajax4jsf</keyword>
+    </keywordset>
+  </chapterinfo>
+
+  <title>Exadel Rich Faces Visual Component Platform 2.0 and Ajax4jsf</title>
+  <para><property> Exadel Rich Faces Visual Component Platform 2.0</property> is an advanced framework built on the top of Ajax4jsf and used for
+      building rich interfaces for Web applications. It adds more Ajax and UI
+      components and includes extensive support for easy skinnability realization in UI 
+      designs.
+  </para>
+  <formalpara>
+    <title>Compatibility</title>
+    <para>Make sure you are using <property>Rich Faces version 2.0</property> and 
+    higher, earlier versions contain built-in Ajax4jsf kernel and can&apos;t be used together 
+    with new Ajax4jsf versions.</para>
+  </formalpara>
+</chapter>

Added: branches/refactor1/docs/ajaxguide/en/src/main/docbook/modules/a4jUGfaq.xml
===================================================================
--- branches/refactor1/docs/ajaxguide/en/src/main/docbook/modules/a4jUGfaq.xml	                        (rev 0)
+++ branches/refactor1/docs/ajaxguide/en/src/main/docbook/modules/a4jUGfaq.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,375 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<section id="FAQ" xreflabel="FAQ">
+    <?dbhtml filename="FAQ.html"?>
+    <sectioninfo>
+        <keywordset>
+            <keyword>RENDER_RESPONSE</keyword>
+
+            <keyword>onComplete</keyword>
+
+            <keyword>keepAlive</keyword>
+            <keyword>requestDelay</keyword>
+        </keywordset>
+    </sectioninfo>
+    <title>FAQ</title>
+    <section id="DecidingWhatToChangeOnTheServerSide">
+        <?dbhtml filename="DecidingWhatToChangeOnTheServerSide.html"?>
+        <title>What should I change on the server side?</title>
+        <para> As it was mentioned <ulink url="index.html#DecideWhatToChange">before</ulink>, the
+            list of zones to be reRendered can be specified as EL expression. But there is a
+            question that must be specified more exactly. </para>
+        <para> The list of Ids is formed during beforePhase of RENDER_RESPONSE. Therefore, in this
+            case one can point reRender to the Set type Bean&apos;s property and fill the Set
+            during a tracking request. </para>
+        <para> It&apos;s the way to form a list of updatable areas dynamically. </para>
+    </section>
+    <section id="CheckSendingRequestConditions.CustomJavaScriptBeforeRequest.OnSubmitAttribute">
+        <?dbhtml filename="CheckSendingRequestConditions.CustomJavaScriptBeforeRequest.OnSubmitAttribute.html"?>
+
+        <title>How to check sending request conditions? Custom JavaScript before request
+            &quot;OnSubmit&quot; attribute.</title>
+        <para> To check on the client some terms of request sending, the <emphasis role="italic">
+                <property>&quot;onSubmit</property>
+            </emphasis>&quot; attribute is added to all components, which may cause the request. </para>
+        <para>
+            <emphasis role="bold">Example: </emphasis>
+        </para>
+        <programlisting role="XML"><![CDATA[<h:inputText id="i" value="#{beanText.kennung}">
+            <a4j:support event="onfocus" onsubmit="doSomething();" reRender="panelToReRender"/>
+</h:inputText>]]></programlisting>
+        <para> So in this case &quot;<emphasis role="italic"
+                ><property>doSomething()</property>&quot;</emphasis> function is executed before
+            the AJAX request. </para>
+        <para> Besides, if this function returns &quot;false&quot;, AJAX request
+            isn&apos;t fired. </para>
+        <note>
+            <title>Note:</title>
+            <para>Behavior of our <emphasis role="italic">
+                    <property>&quot;onsubmit&quot;</property>
+                </emphasis>slightly differs from the standard one. Do not return <emphasis
+                    role="italic">
+                    <property>&quot;true&quot;</property>
+                </emphasis> if you want to fire the request - because <emphasis role="bold">
+                    <property>&lt;xxx&gt;&lt;a4j:support
+                        event=&quot;onclick&quot; onsubmit=&quot;return
+                        true;&quot;&gt;</property>
+                </emphasis> is transformed into &lt;xxx onclick=&quot;return true;
+                A4J.Submit(.... );&quot; &gt; and the request isn&apos;t fired also in
+                this case (but the standard event processing fired). You must only return <emphasis
+                    role="italic">
+                    <property>&quot;false&quot;</property>
+                </emphasis> if your conditions weren&apos;t completed or perform some actions
+                (if needed) without any returns in case you need to fire it. </para>
+        </note>
+    </section>
+    <section id="onCompleteAttribute.DifferencesAfterRelease1.0">
+        <?dbhtml filename="onCompleteAttribute.DifferencesAfterRelease1.0.html"?>
+        <title> What is differences of &quot;onCompelete&quot; attribute after release 1.0?</title>
+        <para> To avoid differences with other JavaScript attributes, a function placement in a
+            JavaScript call is changed, instead of simple inserting of attribute content
+            (..oncomplete :anotherFunction(this)..), it places (oncomplete:
+            function(){anotherFunction(this);}..) in anonymous function, to allow put
+            &quot;chain&quot; of statements in attribute. </para>
+        <para> Since, <emphasis role="italic">
+                <property>&quot;this&quot;</property>
+            </emphasis> keyword will point to a parameters map instead of a control element as it
+            was before. You may use <emphasis role="italic">
+                <property>document.findElementById()</property>
+            </emphasis>to get references to this object after a request is processed as when a page
+            is updated in AJAX you will have reference to a control, removed from a DOM tree. </para>
+        <para> Or, if you are sure that your element is not updated, you can add <emphasis
+                role="italic">
+                <property>&quot;onsubmit&quot;</property>
+            </emphasis> in <emphasis role="bold">
+                <property>&lt;a4j:support&gt;</property>
+            </emphasis> (or onclick in <emphasis role="bold">
+                <property>&lt;a4j:commandLink/Button&gt;</property>
+            </emphasis>) to place reference to known variable (<emphasis role="bold">
+                <property>&lt;a4j:commandLink onclick="var myControl=this;"
+                    oncomplete="anotherFunction(myControl)"/&gt;</property>
+            </emphasis>). </para>
+        <important>
+            <title>New:</title>
+            <para> The onComplete syntax now is: </para>
+            <programlisting role="XML">
+	<![CDATA[<someAjaxActionComponent ...oncomplete="myFunc(req,event,data)".../>]]>
+            </programlisting>
+            <para> where the <property>event</property> is a variable where the JS event copy that
+                fires the request is placed into. One may use it to get the element instead of this.
+                and <property>data</property> is a variable that contains deserialized value from
+                the <property>data</property> attribute. </para>
+        </important>
+    </section>
+    <section id="InvokeOnComponentUsingWithJSF1.2">
+        <?dbhtml filename="InvokeOnComponentUsingWithJSF1.2.html"?>
+        <title>Is it possible to use InvokeOnComponent with JSF 1.2?</title>
+        <para> Ajax4jsf currently does not use <emphasis role="italic">invokeOnComponent</emphasis>
+            because of the 2 reasons: </para>
+        <itemizedlist>
+            <listitem> Compatibility with JSF 1.1 and MyFaces applications is kept, due to a big
+                amount of code used in corporate applications. </listitem>
+            <listitem>
+                <emphasis role="italic"> InvokeOnComponent</emphasis> works with already known
+                clientId, and works fine for communication between widget and backed component, or
+                updates content of already rendered component. But there are some troubles to use
+                this method for more complex use-cases implemented in Ajax4jsf, as there is a choice
+                for updatable components in application logic, where it&apos;s necessary to
+                navigate in a components tree by the native id, with
+                <property>findComponent()</property> methods. </listitem>
+        </itemizedlist>
+        <para> Thus, for example, only entire dataTable can be updated in response (but all AJAX
+            action components inside table work properly). </para>
+    </section>
+    <!--<section id="RegionsInDataTables">
+      <?dbhtml filename="RegionsInDataTables.html"?>
+    <title>Regions in Data Tables</title>
+    <para>The regions in Data Tables aren&apos;t supported now, but the feature will be implemented in a new Ajax4jsf version for JSF 1.2.</para>
+  </section>-->
+    <section id="keepAliveComponentGeneratesException">
+        <?dbhtml filename="keepAliveComponentGeneratesException.html"?>
+        <title>How to avoid generating exception for &quot;keepAlive&quot; component?</title>
+        <para>To avoid exception, don&apos;t forget that the component stores beans in
+            serialized view, but your bean should implement java.io.Serializable.</para>
+    </section>
+    <section id="FilterUsageDamagesAnApplicationLayout">
+        <?dbhtml filename="FilterUsageDamagesAnApplicationLayout.html"?>
+        <title>Why does filter usage damage an application layout?</title>
+        <para>Ajax4jsf uses <property>filters</property> for correction of xhtml code received on an
+            AJAX response, because when a response is recieved from the server, Ajax4jsf makes
+            direct changes in DOM tree and browser doesn&apos;t make any corrections in
+            generated xhtml. There are two ways for setting <property>filters</property> that could
+            be used in an Ajax4jsf-based application.</para>
+        <para> The first one:</para>
+        <programlisting role="XML"><![CDATA[<context-param filter>
+  <display-name>Ajax4jsf Filter</display-name>
+  <filter-name>ajax4jsf</filter-name>
+  <filter-class>org.ajax4jsf.Filter</filter-class>
+</filter>]]></programlisting>
+        <para>This <property>filter</property> is based on Tidy Filter usage and recommended for
+            applications with complicated or non-standard markup, as all the necessary xhtml code
+            corrections are made by the filter when a response comes from the server.</para>
+        <para> Anyway, some obvious errors could damage a layout, if it happens, make sure that the
+            markup corresponds to the xhtml-strict specification. </para>
+        <para>The second one:</para>
+        <programlisting role="XML"><![CDATA[<filter>
+  <display-name>org.ajax4jsf.FastFilter</display-name>
+  <filter-name>ajax4jsf</filter-name>
+  <filter-class>org.ajax4jsf.FastFilter</filter-class>
+</filter>]]></programlisting>
+        <para>This <property>filter</property> is based on the Nekko pacer. In this case an output
+            xhtml code isn&apos;t strictly verified and it also could cause lot&apos;s of
+            errors and corrupt a layout as a result. Though if you sure that your application markup
+            is really strict for this filter, the filter considerably accelerates all AJAX requests
+            processing. </para>
+        <para><emphasis role="bold">Extra information</emphasis>. </para>
+        <para>forceParcer parameters setting for <property>filters</property>:</para>
+        <programlisting role="XML"><![CDATA[<filter>
+...
+<init-param>
+<param-name>forceparser</param-name>
+<param-value>false</param-value>
+</init-param>
+...
+</filter>]]></programlisting>
+        <para>The &quot;false&quot; setting for initialization parameter switches off
+            application of filters for non-AJAX requests, if &quot;true&quot; is chosen, the
+            filter checks all requests. <important>
+                <title>Changes for Ajax4jsf 1.1.0</title>
+                <property>forceparser parameter</property> default value is false from this version.
+            </important>
+        </para>
+    </section>
+    <section id="AFormIsNotSubmittedOrASetterIsNotCalledAfterAJAXrequest">
+        <?dbhtml filename="AFormIsNotSubmittedOrASetterIsNotCalledAfterAJAXrequest.html"?>
+        <title>Why form isn&apos;t submitted or setter isn&apos;t called after AJAX request?</title>
+        <para>This situation could happen because of conversion/validation errors on form
+            submission. In order to verify this, it&apos;s necessary to place this updating via
+            an AJAX error message inside a form:</para>
+        <programlisting role="XML"><![CDATA[<a4j:outputPanel ajaxRendered="true">
+   <h:messages/>
+</a4j:outpurPanel>]]></programlisting>
+    </section>
+
+    <section id="DelayedRenderZone">
+        <?dbhtml filename="DelayedRenderZone.html"?>
+        <title>How to create &quot;a4j delayed render zone&quot;?</title>
+        <para>The <emphasis role="bold">&lt;a4j:support&gt;</emphasis> component has a
+            &quot;requestDelay&quot; attribute where you can define the delay.</para>
+        <para>More information about this problem could be found on the <ulink
+                url="http://jboss.com/index.html?module=bb&amp;op=viewtopic&amp;t=104969"
+                >Ajax4Jsf Users Forum.</ulink>
+        </para>
+    </section>
+
+
+    <section id="HowToStopPoll">
+        <?dbhtml filename="HowToStopPoll.html"?>
+        <title>How to stop &quot;a4j:poll&quot;?</title>
+        <para>More information about this problem could be found on the <ulink
+                url="http://jboss.com/index.html?module=bb&amp;op=viewtopic&amp;t=104951"
+                >Ajax4Jsf Users Forum. </ulink>
+        </para>
+    </section>
+
+
+    <section id="IgnoreDupResponsesAndRequestDelay">
+        <?dbhtml filename="IgnoreDupResponsesAndRequestDelay.html"?>
+
+        <title>How to use IgnoreDupResponses and requestDelay?</title>
+        <para>The <emphasis role="italic">
+                <property>&quot;IgnoreDupResponses&quot;</property>
+            </emphasis> attribute appeared from 1.0.4 RC1 version and is used on the client for
+            response ignoring after an AJAX request if a newer request has been already sent. <para>
+                The additional information could be found on the<ulink
+                    url="http://jboss.com/index.html?module=bb&amp;op=viewtopic&amp;t=105766"
+                    >here</ulink>. </para>
+            <emphasis role="italic">
+                <property>&quot;RequestDelay&quot;</property>
+            </emphasis> attribute also defines the client behavior. It sets the time delay, after
+            which another request could be sent, all other requests are taken away from a queue
+            except the last one. </para>
+    </section>
+
+
+    <section id="RefreshImage">
+        <?dbhtml filename="RefreshImage.html"?>
+        <title>How to refresh an image using &lt;a4j:support&gt; component?</title>
+        <para>More information about this problem could be found on the <ulink
+                url="http://jboss.com/index.html?module=bb&amp;op=viewtopic&amp;t=105995"
+                >Ajax4Jsf Users Forum. </ulink>
+        </para>
+    </section>
+
+
+
+    <section id="EventQueueUsage">
+        <?dbhtml filename="EventQueueUsage.html"?>
+        <title>How to use &quot;EventQueue&quot; attribute?</title>
+        <para>The <emphasis role="italic">
+                <property>&quot;EventQueue&quot;</property>
+            </emphasis> attribute defines the query name where the requests are saved before their
+            sending to the server. The queue is created for redundant requests deleting during
+            frequent events, which call several requests forming one after another. The queue cuts
+            redundant requests and send only the last one. The queue is created in any case and
+            named on default, the attribute usage only re-defines this name. </para>
+    </section>
+
+    <section id="PageRequiredOrNot">
+        <?dbhtml filename="PageRequiredOrNot.html"?>
+        <title>Is &lt;a4j:page&gt; component required or not?</title>
+        <para>
+            <emphasis role="bold">&lt;4j:page&gt;</emphasis> is a component used for solving
+            of incompatibility problems in early Ajax4jsf and MyFaces versions. The component
+            encodes the full html page structure. </para>
+        <para>More information about this problem could be found on the <ulink
+                url="http://jboss.com/index.html?module=bb&amp;op=viewtopic&amp;t=106849&amp;postdays=0&amp;postorder=asc&amp;start=0"
+                >Ajax4Jsf Users Forum. </ulink>
+        </para>
+    </section>
+
+    <section id="SeveralStatusOnPage">
+        <?dbhtml filename="SeveralStatusOnPage.html"?>
+        <title>Can I have several &lt;a4j:status&gt; components on one page?</title>
+        <para>Yes, you can. More information about this problem could be found on the <ulink
+                url="http://livedemo.exadel.com/a4j-status/">JBoss Ajax4jsf Online Demos</ulink>.
+        </para>
+    </section>
+
+    <section id="SomeProblemsWithRendering">
+        <?dbhtml filename="SomeProblemsWithRendering.html"?>
+        <title>Can I use &lt;a4j:region&gt; within &lt;a4j:repeat&gt;?</title>
+        <para>
+            <emphasis role="bold">&lt;a4j:region&gt;</emphasis> can&apos;t work inside
+            iteration components like <emphasis role="bold">&lt;h:dataTable&gt;</emphasis>
+            and <emphasis role="bold">&lt;a4j:repeat&gt;</emphasis>. </para>
+        <para>The details  could be found on the <ulink
+                url="http://jboss.com/index.html?module=bb&amp;op=viewtopic&amp;t=109080"
+                >here. </ulink>
+        </para>
+    </section>
+
+    <section id="RerenderingPartPage">
+        <?dbhtml filename="RerenderingPartPage.html"?>
+        <title>How to reRender only particular row(s) of dataTable?</title>
+        <para> If you use dataTable then you may use ajaxKeys attribute to bind the rowKeys to be
+            reRendered there. After you need to point reRender on the whole table and only specified
+            rows will be reRedered. Also the example of usage of <emphasis role="bold"
+                >&lt;a4j:repeat&gt;</emphasis> component are available <ulink
+                url="http://livedemo.exadel.com/a4j-repeat/">here</ulink>.</para>
+    </section>
+
+
+    <section id="RerederingSingleDataTableColumn">
+        <?dbhtml filename="RerederingSingleDataTableColumn.html"?>
+        <title>How to reRender single dataTable column?</title>
+        <para>More information about this problem could be found on the <ulink
+                url="http://jboss.com/index.html?module=bb&amp;op=viewtopic&amp;t=105725"
+                >Ajax4Jsf Users Forum. </ulink>
+        </para>
+    </section>
+
+    <section id="reRenderingfailed">
+        <?dbhtml filename="reRenderingfailed.html"?>
+        <title>Why does reRendering fail? Hide/Show components using rendered.</title>
+        <para> During &quot;show/hide&quot; functionality implementation the main error
+            happens because of the &quot;reRender&quot; attribute of some AJAX Action
+            Component is set on a component that depends on rendered properties, i.e. a component
+            that is to be hidden/rendered is tried to be updated. The problem is that if
+            rendered=&quot;false&quot; in this moment, the component isn&apos;t in the
+            DOM tree and can&apos;t be updated because of the general limitations described in
+            the Ajax Processing chapter. </para>
+        <para>The correct variant of functionality implantation:</para>
+
+        <orderedlist>
+            <listitem>
+                <para>With the rendered attribute wrap the component that is to be hidden or
+                    rendered on AJAX in a wrapper component (e.g. a4j:outputPanel)</para>
+            </listitem>
+
+            <listitem>
+                <para>Set reRender of an AJAX Action component on this wrapper component instead of
+                    the component itself.</para>
+            </listitem>
+        </orderedlist>
+
+        <para>
+            <emphasis role="bold">Example:</emphasis>
+        </para>
+
+        <programlisting role="XML"><![CDATA[...
+<a4j:outputPanel id="panel"> 
+	<h:panelGroup rendered="#{bean.rendered}">
+		<!--Some nested content to be hidden/shown depending on bean.rendered -->
+	</h:panelGroup>
+</a4j:outputPanel>
+...
+<a4j:commandButton action=".." value=".." reRender="panel"/>
+...
+]]></programlisting>
+
+        <para>In this case the wrapper component always presents in the DOM tree and its inner
+            content could be updated dynamically on AJAX.</para>
+    </section>
+
+    <section id="JSCallPropblemsInInclude">
+        <?dbhtml filename="JSCallPropblemsInInclude.html"?>
+        <title>Why does JavaScript call don&apos;t work in &lt;a4j:include&gt;?</title>
+        <para>More information about this problem could be found on the <ulink
+                url="http://jboss.com/index.html?module=bb&amp;op=viewtopic&amp;t=104317"
+                >Ajax4Jsf Users Forum. </ulink>
+        </para>
+    </section>
+
+    <section id="ResourceNotRegisteredException">
+        <?dbhtml filename="ResourceNotRegisteredException.html"?>
+        <title>What does ResourceNotRegistered Exception mean?</title>
+
+        <para>Ajax4jsf registers its resources (scripts, images) after an application is accessed
+            and then accesses it via a generated URL. During an application development when a
+            developer constantly updates it on the server, it could happen that Ajax4jsf
+            re-registers its resources after every server restart and a browser tries to access them
+            via cashed URL.</para>
+
+        <para>The problem is solved with browser cash update (e.g. CTRL+F5).</para>
+    </section>
+</section>

Added: branches/refactor1/docs/ajaxguide/en/src/main/docbook/modules/a4jUGideintegration.xml
===================================================================
--- branches/refactor1/docs/ajaxguide/en/src/main/docbook/modules/a4jUGideintegration.xml	                        (rev 0)
+++ branches/refactor1/docs/ajaxguide/en/src/main/docbook/modules/a4jUGideintegration.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,24 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<chapter id="IDEIntegration" xreflabel="IDEIntegration">
+  <?dbhtml filename="IDEIntegration.html"?>
+
+  <chapterinfo>
+    <keywordset>
+      <keyword>Visual Page Editor</keyword>
+
+      <keyword>Open On</keyword>
+
+      <keyword>Content Assist</keyword>
+      <keyword>Components Palette</keyword>
+    </keywordset>
+  </chapterinfo>
+  <title>IDE Integration</title>
+  <para><ulink url="http://www.exadel.com/web/portal/products/ExadelStudioPro">Exadel
+   Studio 4</ulink> is an <property>IDE</property> that provides a full support for Exadel
+    RichFaces, Ajax4jsf, Facelets, Struts, MyFaces, and other Web technologies. In addition
+  to this, it seamlessly combines visual and source-oriented development
+  approaches. One way in which <property>Ajax4jsf</property> and <property>RichFaces</property> are supported is implemented via
+  special predefined capabilities that can be added to any JSF project and
+  then be accessed with the help of the Visual Page Editor, Open On, Content Assist,
+  and Components Palette features.</para>
+</chapter>

Added: branches/refactor1/docs/ajaxguide/en/src/main/docbook/modules/a4jUGintro.xml
===================================================================
--- branches/refactor1/docs/ajaxguide/en/src/main/docbook/modules/a4jUGintro.xml	                        (rev 0)
+++ branches/refactor1/docs/ajaxguide/en/src/main/docbook/modules/a4jUGintro.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,81 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<chapter id="Introduction" xreflabel="Introduction">
+  <?dbhtml filename="Introduction.html" ?>
+
+  <chapterinfo>
+    <keywordset>
+      <keyword>AJAX</keyword>
+
+      <keyword>JSF</keyword>
+
+      <keyword>Ajax4jsf</keyword>
+      <keyword>Component Development Kit</keyword>
+    </keywordset>
+  </chapterinfo>
+  <title>Introduction</title>
+  <para><property>Ajax4jsf</property> is an open source framework that adds AJAX capability
+   into existing JSF applications without resorting to JavaScript. </para>
+  <para><property>Ajax4jsf</property> leverages JavaServer Faces framework including 
+  lifecycle, validation, conversion facilities and management of static and dynamic 
+  resources. <property>Ajax4jsf</property> rich components with built-in AJAX support and a
+   highly customizable look-and-feel can be easily incorporated into JSF applications. </para>
+  <para><property>Ajax4jsf</property> allows to:</para>
+  <formalpara>
+    <title>Intensify the whole set of JSF benefits while working with AJAX</title>
+    <para><property>Ajax4jsf</property> is fully integrated into the JSF lifecycle. While
+     other frameworks only give you access to the managed bean facility, <property>Ajax4jsf</property> advantages the action and value change listeners, as well as invokes server-side validators and converters during the AJAX request-response cycle. </para>
+  </formalpara>
+  <formalpara>
+    <title>Add AJAX capability to existing JSF applications</title>
+    <para> The framework is implemented by using a component library. The library sets AJAX
+     functionality into existing pages, so there is no need to write any JavaScript code or
+      to replace existing components with new AJAX one. <property>Ajax4jsf</property> enables page-wide AJAX support instead of the traditional component-wide support and it gives the opportunity to define the event on the page. An event invokes an AJAX request and areas of the page which are synchronized with the JSF Component Tree after changing the data on the server by AJAX request in accordance with events fired on the client. </para>
+  </formalpara>
+  <formalpara>
+    <title>Write your own custom rich components with built-in AJAX support</title>
+    <para>In the near future, a full Component Development Kit (CDK) for 
+    <property>Ajax4jsf</property> will be realized. The CDK includes a code-generation 
+    facility and a templating facility using a JSP-like syntax. These capabilities help to
+     avoid a routine process of a component creation. The component factory works like a 
+     well-oiled machine allowing the creation of first-class rich components with built-in 
+     AJAX functionality even more easily than the creation of simpler components by means of
+      the traditional coding approach. </para>
+  </formalpara>
+  <formalpara>
+    <title>Package resources with application Java classes</title>
+    <para>In addition to its core, AJAX functionality of <property>Ajax4jsf</property> 
+    provides an advanced support for the different resources management: pictures, JavaScript
+     code, and CSS stylesheets. The resource framework makes possible to pack easily these 
+     resources into Jar files along with the code of your custom components.</para>
+  </formalpara>
+  <formalpara>
+    <title>Easily generate images on-the-fly</title>
+    <para>Resource framework can generate images on-the-fly so that it becomes possible to 
+    create images using the familiar approach of the 
+    <emphasis role="italic"><property>"Java Graphics2D"</property></emphasis>  library.</para>
+  </formalpara>
+  <formalpara>
+    <title>Create a modern rich user interface look-and-feel with skins-based technology</title>
+    <para><property>Ajax4jsf</property> provides a skinnability feature that allows easily 
+    define and manage different color schemes and other parameters of the UI with the help
+     of named skin parameters. Hence it is possible to access the skin parameters from JSP
+      code and the Java code (e.g. to adjust generated on-the-fly images based on the text 
+      parts of the UI).</para>
+  </formalpara>
+  <note>
+    <title>Note:</title>
+    <para>skinnability is not an equivalent of traditional CSS, but a complement.</para>
+  </note>
+  <formalpara>
+    <title>Test and create the components, actions, listeners, and pages at the same time</title>
+    <para>An automated testing facility is in our roadmap for the near future. This 
+    facility will generate test cases for your component as soon as you develop it. 
+    The testing framework will not just test the components, but also any other server-side 
+    or client-side functionality including JavaScript code. What is more, it will do all of
+     this without deploying the test application into the Servlet container. </para>
+  </formalpara>
+  <para><property>Ajax4jsf</property> components come ready to use out-of-the-box, so 
+  developers save their time and immediately gain the advantage of the mentioned <link linkend="Introduction">above</link> 
+  features in Web applications creation. As a result, usage experience can be faster and 
+  easily obtained.</para>
+</chapter>
\ No newline at end of file

Added: branches/refactor1/docs/ajaxguide/en/src/main/docbook/modules/a4jUGlinks.xml
===================================================================
--- branches/refactor1/docs/ajaxguide/en/src/main/docbook/modules/a4jUGlinks.xml	                        (rev 0)
+++ branches/refactor1/docs/ajaxguide/en/src/main/docbook/modules/a4jUGlinks.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,67 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<chapter id="resourceLinks" xreflabel="resourceLinks">
+  <?dbhtml filename="resourceLinks.html"?>
+
+  <chapterinfo>
+    <keywordset>
+      <keyword>JBoss Forum</keyword>
+
+      <keyword>JSF</keyword>
+
+      <keyword>Ajax4jsf</keyword>
+    </keywordset>
+  </chapterinfo>
+  <title>Links to Web Resources</title>
+  <para><table>
+      <title>Ajax4jsf Resources</title>
+      <tgroup cols="2">
+        <thead>
+          <row>
+            <entry>Resources</entry>
+            <entry>Links</entry>
+          </row>
+        </thead>
+        <tbody>
+          <row>
+            <entry>Ajax4jsf on jboss.org</entry>
+            <entry>
+              <para><ulink url="http://labs.jboss.com/portal/jbossajax4jsf/">JBoss Ajax4jsf</ulink></para>
+            </entry>
+          </row>
+          <row>
+            <entry>RichFaces</entry>
+            <entry>
+              <para><ulink url="http://labs.jboss.com/portal/jbossrichfaces/">JBoss RichFaces</ulink></para>
+            </entry>
+          </row>
+          <row>
+            <entry>JBoss Forums</entry>
+            <entry>
+              <para><ulink url="http://jboss.com/index.html?module=bb&amp;op=main&amp;c=27">JBoss Forums</ulink></para>
+            </entry>
+          </row>
+          
+		  
+		  <row>
+            <entry>Ajax4Jsf Wiki</entry>
+            <entry>
+              <para><ulink url="http://labs.jboss.com/wiki/Ajax4jsf">Ajax4Jsf Wiki</ulink></para>
+            </entry>
+          </row>		  
+		  
+		  <row>
+            <entry>RichFaces Wiki</entry>
+            <entry>
+              <para><ulink url="http://labs.jboss.com/wiki/RichFaces">RichFaces Wiki</ulink></para>
+            </entry>
+          </row>
+          <row>
+            <entry>Ajax4jsf/RichFaces Blog</entry>
+            <entry>
+              <ulink url="http://jroller.com/page/a4j">http://jroller.com/page/a4j</ulink>
+            </entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </table></para>
+</chapter>

Added: branches/refactor1/docs/ajaxguide/en/src/main/docbook/modules/a4jUGskinnability.xml
===================================================================
--- branches/refactor1/docs/ajaxguide/en/src/main/docbook/modules/a4jUGskinnability.xml	                        (rev 0)
+++ branches/refactor1/docs/ajaxguide/en/src/main/docbook/modules/a4jUGskinnability.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,79 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<chapter id="Built-inSkinnabilityInAjax4jsf"  xreflabel="Built-inSkinnabilityInAjax4jsf">
+  <?dbhtml filename="Built-inSkinnabilityInAjax4jsf.html"?>
+
+  <chapterinfo>
+    <keywordset>
+      <keyword>Skinnability</keyword>
+
+      <keyword>skins</keyword>
+
+      <keyword>custom skin</keyword>
+    </keywordset>
+  </chapterinfo>
+
+  <title>Built-in skinnability in Ajax4jsf</title>
+  <para>Ajax4jsf gives an opportunity to incorporate <property>skinnability</property> into UI
+  design. With this framework you can easily use named skin parameters in
+  properties files to control the appearance of the skins that are applied
+  consistently to a whole set of components. You can look at examples of
+  predefined skins at:</para>
+  <simplelist>
+    <member>
+      <ulink url="http://livedemo.exadel.com/richfaces-demo/">http://livedemo.exadel.com/richfaces-demo/</ulink>
+    </member>
+  </simplelist>
+  <para>
+    You may simply control the look-and-feel of your application by using the <property>skinnability</property> service 
+    of the Ajax4jsf framework. With the means of this service you can define the same style for rendering 
+    standard JSF components and custom JSF components built with the help of Ajax4jsf.
+  </para>
+  <para>To find out more on  <property>skinnability</property> possibilities, follow these
+  steps:</para>
+   <itemizedlist>
+    <listitem>
+      Create a custom render kit and register it in the faces-config.xml
+      like this:
+      <programlisting role="XML"><![CDATA[<render-kit>
+        <render-kit-id>NEW_SKIN</render-kit-id>
+        <render-kit-class> 
+            org.ajax4jsf.framework.renderer.ChameleonRenderKitImpl
+        </render-kit-class>
+</render-kit>]]></programlisting>
+    </listitem>
+    <listitem>
+      Then you need to create and register custom renderers for the
+      component based on the look-and-feel predefined variables:
+      <programlisting role="XML"><![CDATA[<renderer>
+        <component-family>javax.faces.Command</component-family> 
+        <renderer-type>javax.faces.Link</renderer-type> 
+        <renderer-class>
+           newskin.HtmlCommandLinkRenderer
+        </renderer-class> 
+</renderer>]]></programlisting>
+    </listitem>
+    <listitem>
+      Finally, you need to place a properties file with skin parameters
+      into the class path root. There are two requirements for the properties
+      file:
+      <itemizedlist>
+        <listitem>
+          The file must be named <emphasis role="bold"><property>&lt;skinName&gt;</property></emphasis>.skin.properties, in this case, it would be called
+          <filename>newskin.skin.properties</filename>.
+        </listitem>
+        <listitem>
+          The first line in this file should be render.kit=
+          <emphasis role="bold"><property>&lt;render-kit-id&gt;</property>,</emphasis> in this case, it would be called
+          render.kit=NEW_SKIN.
+        </listitem>
+      </itemizedlist>
+    </listitem>
+   </itemizedlist>
+  <para>Extra information on custom renderers creation can be found
+  at:</para>
+  <simplelist>
+    <member>
+      <ulink url="http://java.sun.com/javaee/javaserverfaces/reference/docs/index.html">http://java.sun.com/javaee/javaserverfaces/reference/docs/index.html</ulink>
+    </member>
+  </simplelist>
+</chapter>

Added: branches/refactor1/docs/ajaxguide/en/src/main/docbook/modules/a4jUGstart.xml
===================================================================
--- branches/refactor1/docs/ajaxguide/en/src/main/docbook/modules/a4jUGstart.xml	                        (rev 0)
+++ branches/refactor1/docs/ajaxguide/en/src/main/docbook/modules/a4jUGstart.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,254 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<chapter id="GettingStartedWithAjax4jsf"  xreflabel="GettingStartedWithAjax4jsf">
+  <?dbhtml filename="GettingStartedWithAjax4jsf.html"?>
+
+  <chapterinfo>
+    <keywordset>
+      <keyword>Ajax4jsf Filter</keyword>
+
+      <keyword>JSF</keyword>
+
+      <keyword>Ajax4jsf</keyword>
+    </keywordset>
+  </chapterinfo>
+
+  <title>Getting Started with Ajax4jsf</title>
+  <section id="Environment">
+  <?dbhtml filename="Environment.html" ?>
+    <title>Environment</title>
+    <para>
+    To use Ajax4jsf framework you need JDK 1.4 or  higher, any JSF implementation
+    and your favorite Servlet Container. To read more on the <property>Environments</property>, see further chapters.</para>
+    <para>
+    Ajax4jsf is designed in an easy-to-use way, so that you should do only a few simple steps to get AJAX functionality  in your JSF application.
+  </para>
+  </section>
+  <section id="DownloadingAjax4jsf">
+  <?dbhtml filename="DownloadingAjax4jsf.html" ?>
+    <title>Downloading Ajax4jsf</title>
+    <para>The latest release of <property>Ajax4jsf</property> is available for download at:<simplelist><member><ulink url="http://labs.jboss.com/portal/jbossajax4jsf/downloads">http://labs.jboss.com/portal/jbossajax4jsf/downloads</ulink></member></simplelist>
+    in the <property>Ajax4jsf</property> project area under JBoss.</para>
+  </section>
+  <section id="Installation">
+  <?dbhtml filename="Installation.html" ?>
+    <title>Installation</title>
+    <itemizedlist>
+      <listitem>
+        
+          Unzip <emphasis role="italic">
+            <property>&quot;ajax4jsf.zip&quot;</property>
+          </emphasis> file to the chosen folder.
+        
+      </listitem>
+      <listitem>
+        
+          Copy <emphasis role="italic"><property>&quot;ajax4jsf.jar&quot;</property></emphasis> and <emphasis role="italic"><property>&quot;oscache-2.3.2.jar&quot;</property></emphasis> files into the <emphasis role="italic">
+            <property>&quot;WEB-INF/lib&quot;</property>
+          </emphasis> folder of your application.
+        
+      </listitem>
+	      <note>
+            <title>Note:</title>
+            <para>Starting from Ajax4jsf 1.1.1, the oscache  library is not required to be in the classpath anymore.
+			</para>
+          </note>
+      <listitem>
+          Add the following content into the <emphasis role="italic">
+            <property>&quot;WEB-INF/web.xml&quot;</property>
+          </emphasis> file of your application:
+        
+        <programlisting role="XML"><![CDATA[<filter> 
+  <display-name>Ajax4jsf Filter</display-name> 
+  <filter-name>ajax4jsf</filter-name> 
+  <filter-class>org.ajax4jsf.Filter</filter-class> 
+ </filter> 
+ <filter-mapping> 
+  <filter-name>ajax4jsf</filter-name> 
+   <servlet-name>Faces Servlet</servlet-name>
+   <dispatcher>REQUEST</dispatcher>
+   <dispatcher>FORWARD</dispatcher>
+   <dispatcher>INCLUDE</dispatcher>
+ </filter-mapping>]]></programlisting>
+        <note>
+            <title>Note:</title>
+            <para>You can copy and paste the above text from the <emphasis role="italic">
+                <property>&quot;README.txt&quot;</property>
+              </emphasis>     file.</para>
+          </note>
+      </listitem>
+      <listitem>
+        
+        <para>Add the following line for each JSP page of your application where you are going to bring in AJAX  functionality.</para>
+        <programlisting role="XML">  <![CDATA[<%@ taglib uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j"%>]]></programlisting>
+        <para>For XHTML pages:</para>
+	    <programlisting role="XML">&lt;xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"&gt;</programlisting>
+      </listitem>
+    </itemizedlist>
+  </section>
+  <section id="SimpleAJAXEchoProject"> 
+  <?dbhtml filename="SimpleAJAXEchoProject.html" ?>
+    <title>Simple AJAX Echo Project </title>
+    <para>
+      In our JSF project you need only one JSP page that has a form with a couple of child tags: 
+      <emphasis role="bold">
+        <property>&lt;h:inputText&gt;</property>
+      </emphasis> and <emphasis role="bold">
+        <property>&lt;h:outputText&gt;</property>
+      </emphasis>. 
+    </para>
+    <para>This simple application  let you input some text into the <emphasis role="bold">
+        <property>&lt;h:inputText&gt;</property>
+      </emphasis>,
+      send data to the server, and see the server response as a value of <emphasis role="bold">
+        <property>&lt;h:outputText&gt;</property>
+      </emphasis>. 
+    </para>
+    <section id="JSPPage">
+    <?dbhtml filename="JSPPage.html"?> 
+      <title>JSP Page</title>
+      <para>Here is the necessary page (echo.jsp):</para>
+      <programlisting role="JSP">    <![CDATA[<%@ taglib uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j"%>
+    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+    <html>
+      <head>
+        <title>repeater </title> 
+      </head>
+      <body>
+        <f:view>
+          <h:form>
+            <h:inputText size="50" value="#{bean.text}" > 
+              <a4j:support event="onkeyup" reRender="rep"/>
+            </h:inputText>
+            <h:outputText value="#{bean.text}" id="rep"/>
+          </h:form>
+        </f:view>
+      </body>
+    </html>]]></programlisting>
+      <para>The only line that distinguishes  this page from a &quot;regular&quot; JSF one is</para>
+      <programlisting role="XML"><![CDATA[<a4j:support event="onkeyup" reRender="rep"/>]]></programlisting>
+      <para>The line adds  an AJAX support to the parent <emphasis role="bold">
+          <property>&lt;h:inputText&gt;</property>
+        </emphasis> tag. This support is 
+        bound to &quot;onkeyup&quot; JavaScript event, so that  each time when this event is fired on the 
+        parent tag, our application sends an AJAX request to the server. It means that the 
+        text field pointed to our managed bean property contains up-to-date value of our input.
+      </para>
+      <para>
+        The value of <emphasis role="italic"><property>&quot;reRender&quot;</property></emphasis> attribute of the <emphasis role="bold">
+          <property>&lt;a4j:support&gt;</property>
+        </emphasis> tag defines which part(s) of our 
+        page is (are) to be updated. In this case, the only part of the page to
+		update is the <emphasis role="bold">
+          <property>&lt;h:outputText&gt;</property>
+        </emphasis> tag because its ID value matches to the value of <emphasis role="italic"><property>&quot;reRender&quot;</property></emphasis> 
+        attribute. As you see, it&apos;s not difficult  to update multiple elements on the page, only  list their IDs 
+        as the value of <emphasis role="italic"><property>&quot;reRender&quot;</property></emphasis>.
+      </para>
+    </section>
+    <section id="DataBean">
+    <?dbhtml filename="DataBean.html"?>
+      <title>Data Bean</title>
+      <para>In order to build this application, you should create a managed bean:</para>
+      <programlisting role="JAVA">package demo;
+	  
+public class Bean {
+	private String text;
+	public Bean() {
+	}
+	public String getText() {
+		return text;
+	}
+	public void setText(String text) {
+		this.text = text;
+	}
+}</programlisting>
+    </section>
+    <section id="faces-config.xml">
+    <?dbhtml filename="faces-config.xml.html"?>
+      <title>faces-config.xml</title>
+      <para>Next, it&apos;s necessary  to register your bean inside of the faces-config.xml file:</para>
+      <programlisting role="XML">    <![CDATA[<?xml version="1.0" encoding="UTF-8"?>
+    <!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD  JavaServer Faces Config 1.1//EN"
+    "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
+    <faces-config>
+      <managed-bean>
+        <managed-bean-name>bean</managed-bean-name>
+        <managed-bean-class>demo.Bean</managed-bean-class>
+        <managed-bean-scope>request</managed-bean-scope>
+        <managed-property>
+          <property-name>text</property-name>
+          <value/>
+        </managed-property>
+      </managed-bean>
+    </faces-config>]]></programlisting>
+      <para> <note>
+          <title>Note:</title>
+          <para>Nothing that relates directly to Ajax4jsf is required
+        in the configuration file.</para>
+        </note></para>
+    </section>
+    <section id="Web.xml">
+    <?dbhtml filename="Web.xml.html"?>
+      <title>Web.xml</title>
+      <para>It is also necessary to add jar files (see <ulink url="GettingStartedWithAjax4jsf.html#Installation">installation chapter</ulink>) and modify the &quot;web.xml&quot; file:
+      </para>
+      <programlisting role="XML">    <![CDATA[<?xml version="1.0"?>
+    <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
+      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+      xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee  http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+      
+      <display-name>a4jEchoText</display-name>
+      <context-param>
+        <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+        <param-value>server</param-value>
+      </context-param>
+      <filter> 
+		<display-name>Ajax4jsf Filter</display-name> 
+		<filter-name>ajax4jsf</filter-name> 
+		<filter-class>org.ajax4jsf.Filter</filter-class> 
+	  </filter> 
+	  <filter-mapping> 
+	    <filter-name>ajax4jsf</filter-name> 
+		<servlet-name>Faces Servlet</servlet-name>
+		<dispatcher>REQUEST</dispatcher>
+		<dispatcher>FORWARD</dispatcher>
+		<dispatcher>INCLUDE</dispatcher>
+	   </filter-map>
+       <listener>
+        <listener-class>
+          com.sun.faces.config.ConfigureListener
+        </listener-class>
+      </listener>
+      
+      <!-- Faces Servlet -->
+      <servlet>
+        <servlet-name>Faces Servlet</servlet-name>
+        <servlet-class>
+          javax.faces.webapp.FacesServlet
+        </servlet-class>
+        <load-on-startup>1</load-on-startup>
+      </servlet>
+      
+      <!-- Faces Servlet Mapping -->
+      <servlet-mapping>
+        <servlet-name>Faces Servlet</servlet-name>
+        <url-pattern>*.jsf</url-pattern>
+      </servlet-mapping>
+      <login-config>
+        <auth-method>BASIC</auth-method>
+      </login-config>
+    </web-app>]]></programlisting>
+      <para>Now your application should work.</para>
+    </section>
+    <section id="Deployment">
+    <?dbhtml filename="Deployment.html"?>
+      <title>Deployment</title>
+      <para>Finally, you should be able to place this application on your Web
+        server.To start your project, point
+        your browser at
+<ulink url="http://localhost:8080/a4jEchoText/echo.jsf">http://localhost:8080/a4jEchoText/echo.jsf</ulink>
+</para>
+    </section>
+  </section>
+</chapter>

Added: branches/refactor1/docs/ajaxguide/en/src/main/docbook/modules/a4jUGtechreqs.xml
===================================================================
--- branches/refactor1/docs/ajaxguide/en/src/main/docbook/modules/a4jUGtechreqs.xml	                        (rev 0)
+++ branches/refactor1/docs/ajaxguide/en/src/main/docbook/modules/a4jUGtechreqs.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,119 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<chapter id="TechnicalRequirements"  xreflabel="TechnicalRequirements"><?dbhtml filename="TechnicalRequirements.html" ?>
+
+  <chapterinfo>
+    <keywordset>
+      <keyword>browser</keyword>
+
+      <keyword>JSF</keyword>
+
+      <keyword>Ajax4jsf</keyword>
+      <keyword>server</keyword>
+    </keywordset>
+  </chapterinfo>
+
+  <title>Technical Requirements</title>
+  <para>Ajax4jsf is an open architecture framework developed to be compatible with widespread environments.</para>
+  <para>This is what you need to start working with Ajax4jsf:</para>
+  <itemizedlist>
+    <listitem>
+      Java
+    </listitem>
+    <listitem>
+      JavaServer Faces
+    </listitem>
+    <listitem>
+      Java application server or servlet container
+    </listitem>
+    <listitem>
+      Browser (on client side)
+    </listitem>
+  </itemizedlist>
+  <section id="SupportedJavaVersions">
+    <title>Supported Java Versions</title>
+    <itemizedlist>
+      <listitem>
+        JDK 1.4 - 1.6
+      </listitem>
+    </itemizedlist>
+  </section>
+  <section id="Supported JavaServer Faces Implementations">
+<?dbhtml filename="SupportedJavaVersions.html"?>
+    <title>Supported JavaServer Faces Implementations</title>
+    <itemizedlist>
+      <listitem>
+        Sun JSF 1.1 RI - 1.2
+      </listitem>
+      <listitem>
+        MyFaces 1.1.1 - 1.1.5
+      </listitem>
+	  <listitem>
+	    Facelets JSF 1.1.1 - 1.2
+	  </listitem>
+    </itemizedlist>
+  </section>
+  <section id="SupportedServers">
+<?dbhtml filename="SupportedServers.html"?>
+    <title>Supported Servers</title>
+    <itemizedlist>
+      <listitem>
+        Apache Tomcat 4.1 - 6
+      </listitem>
+      <listitem>
+        IBM Web Sphere 5.1 - 6
+      </listitem>
+      <listitem>
+        BEA Web Logic 8.1 - 9
+      </listitem>
+      <listitem>
+        Oracle AS/OC4J 10.1.3
+      </listitem>
+      <listitem>
+        Resin 3.0
+      </listitem>
+      <listitem>
+        Jetty 5.1.X
+      </listitem>
+      <listitem>
+        Sun Application Server 8 (J2EE 1.4)
+      </listitem>
+      <listitem>
+        Glassfish (J2EE 5)
+      </listitem>
+      <listitem>
+        JBoss 3.2 - 4.x
+      </listitem>
+      <listitem>
+        Sybase EAServer 6.0.1
+      </listitem>
+    </itemizedlist>
+    
+  </section>
+  <section id="SupportedBrowsers">
+<?dbhtml filename="SupportedBrowsers.html"?>
+    <title>Supported Browsers</title>
+    <itemizedlist>
+      <listitem>
+        Internet Explorer 5.5 - 7
+      </listitem>
+      <listitem>
+        Firefox 1.5 - 2.0
+      </listitem>
+      <listitem>
+        Opera 8.5 - 9.0
+      </listitem>
+      <listitem>
+        Netscape 7.0
+      </listitem>
+      <listitem>
+        Safari 2.0
+      </listitem>
+      <listitem>
+				Conqueror 3 and higher
+			</listitem>
+    </itemizedlist>
+	<para>This list is composed basing on reports received from our users. We assume the list can be incomplete and absence of your environment in the list doesn&apos;t mean incompatibility.</para>
+  <para>We appreciate your feedback on platforms and browsers that aren&apos;t in the list
+   but are compatible with Ajax4jsf. It helps us to keep the list up-to-date.</para>
+  </section>
+</chapter>

Added: branches/refactor1/docs/ajaxguide/en/src/main/docbook/modules/a4jUGusingAJAX.xml
===================================================================
--- branches/refactor1/docs/ajaxguide/en/src/main/docbook/modules/a4jUGusingAJAX.xml	                        (rev 0)
+++ branches/refactor1/docs/ajaxguide/en/src/main/docbook/modules/a4jUGusingAJAX.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,316 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<chapter id="BasicConceptsOfTheAjax4jsfFramework"  xreflabel="BasicConceptsOfTheAjax4jsfFramework">
+  <?dbhtml filename="BasicConceptsOfTheAjax4jsfFramework.html"?>
+
+  <chapterinfo>
+    <keywordset>
+      <keyword>AjaxContainer</keyword>
+
+      <keyword>Request Processing</keyword>
+
+      <keyword>Ajax4jsf</keyword>
+    </keywordset>
+  </chapterinfo>
+
+  <title>Basic concepts of the Ajax4jsf Framework</title>
+  <section id="introToBasics">
+  <?dbhtml filename="introToBasics.html"?>
+    <title>Introduction</title>
+    <para>The framework is implemented as a component library which adds AJAX capability into existing 
+      pages, so you don&apos;t need to write any JavaScript code or to replace existing 
+      components with new AJAX widgets. <property>Ajax4jsf</property> enables page-wide AJAX support instead of the 
+      traditional component-wide support. So, you can define the event on the page that 
+      invokes an AJAX request and the areas of the page that should be synchronized with the JSF 
+      Component Tree after the AJAX request changes the data on the server according to the 
+      events fired on the client.</para>
+    <para>Next Figure shows how it works:</para>
+    <figure>
+      <title>Request Processing flow</title>
+    </figure>
+    <mediaobject>
+      <imageobject>
+        <imagedata fileref="images/newpic1.jpg"/>
+      </imageobject>
+    </mediaobject>
+    <para><property>Ajax4jsf</property> allows to define (by means of JSF tags) different parts of a JSF page you 
+      wish to update with  an AJAX request and provide a few options to send AJAX requests to 
+      the server. Also  JSF page doesn&apos;t change from a &quot;regular&quot; JSF 
+      page and you don&apos;t need to write  any JavaScript  or XMLHttpRequest objects by hands, everything is done automatically.</para>
+  </section>
+  <section id="ArchitectureOverview">
+  <?dbhtml filename="ArchitectureOverview.html"?>
+    <title>Architecture Overview</title>
+    <para>Next figure lists several important elements of the <property>Ajax4jsf</property> framework</para>
+    <figure>
+      <title>Ajax4jsf component structure</title>
+    </figure>
+    <mediaobject>
+      <imageobject>
+        <imagedata fileref="images/newpic2.jpg"/>
+      </imageobject>
+    </mediaobject>
+    <formalpara>
+      <title>Ajax Filter.</title>
+      <para>To get all benefits of  <property>Ajax4jsf</property>, you should  register an AJAX Filter in web.xml 
+      file of your application.The AJAX Filter recognizes multiple request types. The sequence diagram on Figure 3 
+      shows the difference in processing of a &quot;regular&quot; JSF request and an AJAX request.</para>
+    </formalpara>
+    <para>In the first case the whole JSF tree will be encoded,
+      in the second one option it depends on the &quot;size&quot; of the AJAX region (you can define AJAX region 
+      by using the <emphasis role="bold"><property>&lt;a4j:region&gt;</property></emphasis>). As you can see, in the second case the filter parses 
+      the content of an AJAX response before sending it to the client side.</para>
+    <para>Have a look at the next picture to understand these two ways:</para>
+    <figure>
+      <title>Request Processing sequence diagram</title>
+    </figure>
+    <mediaobject>
+      <imageobject>
+        <imagedata fileref="images/newpic3.jpg"/>
+      </imageobject>
+    </mediaobject>
+    <para>In both cases, the information about required static or dynamic resources that your application 
+      requests is registered in the ResourseBuilder class.</para>
+    <para>When a request for a resource comes (Figure 4), the AJAX filter checks the Resource Cache 
+      for this resource and if it is there, the resource is sent to the client. Otherwise, 
+      the filter searches for the resource among those that are registered by the 
+      ResourceBuilder. If the resource is registered, the AJAX filter will send a request to the 
+      ResourceBuilder to create (deliver) the resource.</para>
+    <para>Next Figure shows the ways of  resource request processing.</para>
+    <figure>
+      <title>Resource request sequence diagram</title>
+    </figure>
+    <mediaobject>
+      <imageobject>
+        <imagedata fileref="images/newpic4.jpg"/>
+      </imageobject>
+    </mediaobject>
+    <formalpara>
+      <title>AJAX Action Components</title>
+      <para>
+      There are four AJAX Action Components: AjaxCommandButton,  AjaxCommandLink, AjaxPoll and AjaxSupport. 
+      You can use them to send AJAX requests from the client side. 
+    </para>
+    </formalpara>
+    <formalpara>
+      <title>AJAX Containers</title>
+      <para>
+      AjaxContainer is an interface that describes an area on your JSF page that should be decoded 
+      during an AJAX request. AjaxViewRoot and AjaxRegion are implementations of this interface.      
+    </para>
+    </formalpara>
+    <formalpara>
+      <title>JavaScript Engine</title>
+      <para><property> Ajax4jsf</property> JavaScript Engine runs on the client-side. It knows how to update different areas 
+      on your JSF page based on the information from the Ajax response. Do 
+      not use this JavaScript code directly, as it is available automatically.      
+    </para>
+    </formalpara>
+  </section>
+  <section id="LimitationsAndRules">
+  <?dbhtml filename="LimitationAndRules.html"?>
+    <title>Limitations and Rules</title>
+    <para>In order to create AJAX4JSF applications properly,  keep the following points in mind:</para>
+    <itemizedlist>
+      <listitem>
+        The AJAX framework should not append or delete, but only replace elements on the page. For successful updates, an element with the same ID as in the response must exist on the page. If you&apos;d like to append any code to a page, put in a placeholder for it (any empty element). For the same reason, it&apos;s recommended to place messages in the<emphasis role="italic">
+            <property>&quot;AjaxOutput&quot;</property>
+          </emphasis> component (as no messages is also a message).
+      </listitem>
+      <listitem>
+        Don&apos;t use <emphasis role="bold">
+            <property>&lt;f:verbatim&gt;</property>
+          </emphasis>  for self-rendered containers, since this component is transient and not saved in the tree.
+      </listitem>
+      <listitem>
+        AJAX requests are made by XMLHttpRequest functions in XML format, but this XML bypasses most validations and the corrections that might be made in a browser. So, create only a strict standards-compliant code for HTML and XHTML, without skipping any required elements or attributes. Any necessary XML corrections are automatically made by the XML filter on the server, but lot&apos;s of  unexpected effects can be produced by an  incorrect HTML code.
+      </listitem>
+    </itemizedlist>
+  </section>
+  <section id="HowTo...">
+  <?dbhtml filename="HowTo.html"?>
+    <title>How To...</title>
+    <section id="SendAnAJAXRequest">
+    <?dbhtml filename="SendAnAJAXRequest.html"?>
+      <title>Send an AJAX request</title>
+      <para>There are different ways to send AJAX requests from your JSF page. You may use 
+          <emphasis role="bold"><property>&lt;a4j:commandButton&gt;</property></emphasis>, <emphasis role="bold">
+          <property>&lt;a4j:commandLink&gt;</property>, <emphasis role="bold"><property>&lt;a4j:poll&gt;</property></emphasis>
+        </emphasis> or <emphasis role="bold">
+          <property>&lt;a4j:support&gt;</property>
+        </emphasis> tags.           
+        </para>
+      <para>All these tags hide the usual JavaScript activities that are required for an XMHttpRequest 
+          object building and  an AJAX request sending. Also, they allow you to decide which components of 
+          your JSF page are to be re-rendered as a result of the AJAX response (you can list the 
+          IDs of these components in the &quot;reRender&quot; attribute).
+        </para>
+      <para>
+          <emphasis role="bold">
+          <property>&lt;a4j:commandButton&gt;</property>
+        </emphasis> and <emphasis role="bold">
+          <property>&lt;a4j:commandLink&gt;</property>
+        </emphasis> tags are used to send an AJAX 
+          request on &quot;onclick&quot; JavaScript event. 
+        </para>
+      <para>
+          <emphasis role="bold">
+          <property>&lt;a4j:poll&gt;</property>
+        </emphasis> tag is used to send an AJAX 
+          request periodically using a timer. 
+        </para>
+      <para>The <emphasis role="bold">
+          <property>&lt;a4j:support&gt;</property>
+        </emphasis> tag allows you to add AJAX functionality to standard JSF components 
+          and send AJAX request onto a chosen JavaScript event: &quot;onkeyup&quot;, &quot;onmouseover&quot;, 
+          etc.
+        </para>
+      <para>Most important attributes of components that provide AJAX request calling features are:</para>
+      <itemizedlist>
+        <listitem>
+              <emphasis role="italic">
+              <property>&quot;reRender&quot;</property>
+            </emphasis>attribute as it was mentioned  <link linkend="SendAnAJAXRequest">before</link> specifies components to be reRendered 
+              after AJAX response. The attribute can be specified using EL expression and formed dynamicaly on the
+              server side (see <ulink url="index.html#FAQ">FAQ chapter</ulink>).
+		</listitem>
+        <listitem>
+             <emphasis role="italic">
+              <property>&quot;RequestDelay&quot;</property>
+            </emphasis> attribute is used for a requests frequency regulation.
+		</listitem>
+        </itemizedlist>
+          <programlisting role="XML"><![CDATA[<h:inputText size="50" value="#{bean.text}">
+        <a4j:support event="onkeyup" RequestDelay="3"/>
+</h:inputText>]]></programlisting>
+          <para>So every next request from the frequent keyboard events will be delayed 
+              on 3 ms to reduce the number of requests.
+            </para>
+        <itemizedlist>
+        <listitem>
+               <emphasis role="italic">
+              <property>&quot;EventsQueue&quot;</property>
+            </emphasis> is a queue that stores the next request. 
+		</listitem>
+		<listitem>
+             <emphasis role="italic">
+              <property>&quot;LimitToList&quot;</property>
+            </emphasis> attribute is used to regulate updatable regions. Setting 
+              it to true limits the updatable areas only to ones specified in a
+              reRender list, in other case all Output Panels of the region are updated.
+   </listitem>
+        <listitem> <emphasis role="italic">
+              <property>&quot;ajaxSingle&quot;</property>
+            </emphasis> attributes specify regions to be sent with a request, 
+              if &quot;false&quot; it is a full region, in other case it&apos;s is only a control caused 
+              event.
+</listitem>
+      </itemizedlist>
+    </section>
+    <section id="DecideWhatToSend">
+    <?dbhtml filename="DecideWhatToSend.html"?>
+      <title>Decide What to Send</title>
+      <para>You may describe a region on the page you wish to send to the server, in this way you  can 
+          control what part of the JSF View is decoded on the server side when you send an 
+          AJAX request.  
+        </para>
+      <para>The easiest way to describe an AJAX region on your JSF page is to do nothing, 
+          because the content between the <emphasis role="bold">
+          <property>&lt;f:view&gt;</property>
+        </emphasis> and <emphasis role="bold">
+          <property>&lt;/f:view&gt;</property>
+        </emphasis> tags is considered 
+          the default AJAX region.
+        </para>
+      <para>You may define multiple AJAX regions on the JSF page (they can even be nested) by using 
+          the <emphasis role="bold">
+          <property>&lt;a4j:region&gt;</property>
+        </emphasis> tag. 
+        </para>
+      <para>If you wish to render the content of an AJAX response outside of the active region then 
+          the value of the &quot;renderRegionOnly&quot; attribute should be set to &quot;false&quot;. Otherwise, your 
+          AJAX updates are limited to elements of the active region.
+        </para>
+    </section>
+    <section id="DecideWhatToChange">
+    <?dbhtml filename="DecideWhatToChange.html"?>
+      <title>Decide What to Change</title>
+      <para>Using IDs in the &quot;reRender&quot; attribute to define &quot;AJAX zones&quot; for update works fine in 
+          many  cases. 
+        </para>
+      <para>But you can not use this approach if your page contains, e.g. a <emphasis role="bold"><property>&lt;f:verbatim&gt;</property></emphasis>
+          tag and you wish to update its content on an AJAX response.
+        </para>
+      <para>The problem with the <emphasis role="bold">
+          <property>&lt;f:verbatim/&gt;</property>
+        </emphasis> tag as described above is related to the 
+          value of the transientFlag of JSF components. If the value of this flag is true, the 
+          component must not participate in state saving or restoring of process.
+        </para>
+      <para>In order to provide a solution to this kind of problems, Ajax4jsf uses the concept of 
+          an output panel that is defined by the <emphasis role="bold">
+          <property>&lt;a4j:outputPanel&gt;</property>
+        </emphasis> tag. If you put a <emphasis role="bold"><property>&lt;f:verbatim&gt;</property></emphasis>
+          tag inside of the output panel, then the content of the <emphasis role="bold">
+          <property>&lt;f:verbatim/&gt;</property>
+        </emphasis> tag and content of 
+          other panel&apos;s child tags could be updated on AJAX response. There are two ways to 
+          control this:
+          <itemizedlist>
+          <listitem> 
+                By setting the &quot;ajaxRendered&quot; attribute value to &quot;true&quot;.
+</listitem>
+          <listitem>
+                By setting the &quot;reRender&quot; attribute value of an Action Component to the output panel ID.
+</listitem>
+        </itemizedlist>          
+        </para>
+    </section>
+  </section>
+  <section id="RequestErrorsAndSessionExpirationHandling">
+  <?dbhtml filename="RequestErrorsAndSessionExpirationHandling.html"?>
+  <title>Request Errors and Session Expiration Handling</title>
+  <para>Ajax4jsf allows to redefine standard handlers responsible for processing of different exceptional situations. It helps to define own JavaScript, which is executed when this situations occur.</para>
+  <section id="RequestErrorsHandling">
+  <?dbhtml filename="RequestErrorsHandling.html"?>
+    <title>Request Errors Handling</title>
+    <para>To execute your own code on the client in case of an error during AJAX request, it's necessary to redefine the standard "A4J.AJAX.onError " method:</para>
+	<programlisting role="JAVA"><![CDATA[A4J.AJAX.onError = function(req,status,message) { 
+          // Custom Developer Code 
+};]]></programlisting>
+    <para>The function defined this way accepts as parameters:</para>
+	 <itemizedlist>
+      <listitem>req - a params string of a request that calls an error</listitem>
+      <listitem>status - the number of an error returned by the server</listitem>
+      <listitem>message - a default message for the given error</listitem>
+	 </itemizedlist>
+ <para>Thus, it&apos;s possible to create your own handler that is called on timeouts, inner server errors, and etc.</para>
+  </section>
+  <section id="SessionExpiredHandling">
+  <?dbhtml filename="SessionExpiredHandling.html"?>
+    <title>Session Expired Handling</title>
+    <para>Beginning with Ajax4jsf version 1.0.5 it&apos;s possible to redefine also the <emphasis role="italic">
+     <property>&quot;onExpired&quot;</property>
+     </emphasis> framework method that is called on the <emphasis role="italic">
+     <property>&quot;Session Expiration&quot;</property>
+     </emphasis> event.</para>
+     <programlisting role="JAVA"><![CDATA[A4J.AJAX.onExpired = function(loc,expiredMsg){ 
+          // Custom Developer Code 
+};
+]]></programlisting>
+
+<para>Here the function receives in params:</para>
+    <itemizedlist>
+      <listitem>loc - URL of the current page (on demand can be updated) </listitem>
+      <listitem>expiredMsg - a default message on <emphasis role="italic">
+     <property>&quot;Session Expiration&quot;</property>
+     </emphasis>event.</listitem>
+    </itemizedlist>	 
+<note>
+<title>Note:</title>
+Until the version 1.0.5 the method can&apos;t be redefined on <emphasis role="italic">
+     <property>&quot;Session Expiration&quot;</property>,
+     </emphasis> a confirmation dialog with a request for view reloading was always called.
+</note>
+  </section>
+</section>
+&FAQ;</chapter>

Added: branches/refactor1/docs/ajaxguide/en/src/main/resources/css/html.css
===================================================================
--- branches/refactor1/docs/ajaxguide/en/src/main/resources/css/html.css	                        (rev 0)
+++ branches/refactor1/docs/ajaxguide/en/src/main/resources/css/html.css	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,122 @@
+ * {
+     font-family: "Verdana", "Arial", "Helvetica";
+     font-size: 14px;
+ }
+
+ A {
+     color: #0000CC;
+ }
+
+ A:active {
+     color: #0000CC;
+ }
+
+ A:visited {
+     color: #0000CC;
+ }
+
+ P, OL, UL, LI, DL, DT, DD, BLOCKQUOTE {
+     color: #000000;
+ }
+
+ TD, TH, SPAN {
+     color: #000000;
+ }
+
+ BLOCKQUOTE {
+     margin-right: 0px;
+ }
+
+
+ H1, H2, H3, H4, H5, H6    {
+     color:       #003399;
+     font-weight: 500;
+     margin-top:  10px;
+     padding-top: 5px;
+ }
+
+ H1 { font-size: 150%; }
+ H2 { font-size: 140%; }
+ H3 { font-size: 110%; font-weight: bold; }
+ H4 { font-size: 110%; font-weight: bold;}
+ H5 { font-size: 100%; font-style: italic; }
+ H6 { font-size: 100%; font-style: italic; }
+
+ TABLE  {
+     border-collapse: collapse;
+     border-spacing:  0;
+     border:          1px dashed #CCCCCC;
+     empty-cells:     hide;
+     width: 100%
+ }
+
+ TD  {
+     padding: 4pt;
+ }
+
+
+ TT {
+     font-size:  90%;
+     font-style: monospace;
+     color:      #111111;
+ }
+
+ PRE {
+     font-size:        100%;
+     padding:          5px;
+     border-style:     solid;
+     border-width:     1px;
+     border-color:     #CCCCCC;
+     background-color: #F4F4F4;
+ }
+
+ HR  {
+     width:            100%;
+     height:           1px;
+     background-color: #CCCCCC;
+     border-width:     0px;
+     padding:          0px;
+     color:            #CCCCCC;
+ }
+
+ .variablelist {
+     padding-top:    10;
+     padding-bottom: 10;
+     margin:         0;
+ }
+
+ .itemizedlist {
+     padding-top:    0;
+     padding-bottom: 0;
+     margin:         0;
+ list-style-type: disc;
+
+ }
+
+ .orderedlist{
+     padding-top:    0;
+     padding-bottom: 0;
+     margin:         0;
+ }
+
+ .term {
+     font-weight: bold;
+ }
+
+ .note
+ {
+    padding-bottom: 5px;
+    padding-left: 5px;
+    padding-right: 5px;
+    background-color: #FFFFCC;
+ }
+
+ .warning
+ {
+    padding-bottom: 5px;
+    padding-left: 5px;
+    padding-right: 5px;
+    background-color: #FBDADA;
+ }
+
+

Added: branches/refactor1/docs/ajaxguide/en/src/main/resources/images/newpic1.jpg
===================================================================
(Binary files differ)


Property changes on: branches/refactor1/docs/ajaxguide/en/src/main/resources/images/newpic1.jpg
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: branches/refactor1/docs/ajaxguide/en/src/main/resources/images/newpic2.jpg
===================================================================
(Binary files differ)


Property changes on: branches/refactor1/docs/ajaxguide/en/src/main/resources/images/newpic2.jpg
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: branches/refactor1/docs/ajaxguide/en/src/main/resources/images/newpic3.jpg
===================================================================
(Binary files differ)


Property changes on: branches/refactor1/docs/ajaxguide/en/src/main/resources/images/newpic3.jpg
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: branches/refactor1/docs/ajaxguide/en/src/main/resources/images/newpic4.jpg
===================================================================
(Binary files differ)


Property changes on: branches/refactor1/docs/ajaxguide/en/src/main/resources/images/newpic4.jpg
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: branches/refactor1/docs/ajaxguide/pom.xml
===================================================================
--- branches/refactor1/docs/ajaxguide/pom.xml	                        (rev 0)
+++ branches/refactor1/docs/ajaxguide/pom.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,258 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<parent>
+		<artifactId>docs</artifactId>
+		<groupId>org.ajax4jsf</groupId>
+		<version>1.1.2-SNAPSHOT</version>
+	</parent>
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>org.ajax4jsf.docs</groupId>
+	<artifactId>userguide</artifactId>
+	<version>1.1.2-SNAPSHOT</version>
+	<packaging>pom</packaging>
+	<description>Ajax4jsf user guide</description>
+	<pluginRepositories>
+		<pluginRepository>
+			<releases>
+				<enabled>true</enabled>
+			</releases>
+			<snapshots>
+				<enabled>false</enabled>
+				<updatePolicy>never</updatePolicy>
+			</snapshots>
+			<id>repository.jboss.com</id>
+			<name>Jboss Repository for Maven</name>
+			<url>http://repository.jboss.com/maven2/</url>
+			<layout>default</layout>
+		</pluginRepository>
+	</pluginRepositories>
+	<build>
+		<pluginManagement>
+			<plugins>
+				<plugin>
+					<groupId>org.apache.maven.plugins</groupId>
+					<artifactId>maven-dependency-plugin</artifactId>
+					<executions>
+						<execution>
+							<id>unpack</id>
+							<phase>generate-resources</phase>
+							<goals>
+								<goal>unpack</goal>
+							</goals>
+							<configuration>
+								<artifactItems>
+									<artifactItem>
+										<groupId>org.ajax4jsf</groupId>
+										<artifactId>
+											ajax4jsf
+										</artifactId>
+										<version>
+											${project.version}
+										</version>
+										<type>jar</type>
+										<overWrite>true</overWrite>
+										<outputDirectory>
+											${project.build.directory}/library
+										</outputDirectory>
+									</artifactItem>
+									<artifactItem>
+										<groupId>
+											org.ajax4jsf.docs
+										</groupId>
+										<artifactId>xslt</artifactId>
+										<version>
+											${project.version}
+										</version>
+										<type>jar</type>
+										<overWrite>true</overWrite>
+										<outputDirectory>
+											${project.build.directory}/xslt
+										</outputDirectory>
+									</artifactItem>
+								</artifactItems>
+								<outputDirectory>
+									${project.build.directory}/library
+								</outputDirectory>
+								<overWriteReleases>
+									false
+								</overWriteReleases>
+								<overWriteSnapshots>
+									true
+								</overWriteSnapshots>
+							</configuration>
+						</execution>
+					</executions>
+				</plugin>
+				<plugin>
+					<groupId>org.codehaus.mojo</groupId>
+					<artifactId>xml-maven-plugin</artifactId>
+					<executions>
+						<execution>
+							<id>transformTld</id>
+							<phase>process-resources</phase>
+							<goals>
+								<goal>transform</goal>
+							</goals>
+						</execution>
+					</executions>
+					<dependencies>
+						<dependency>
+							<groupId>net.sf.saxon</groupId>
+							<artifactId>saxon</artifactId>
+							<version>8.7</version>
+						</dependency>
+					</dependencies>
+					<configuration>
+						<transformationSets>
+							<transformationSet>
+								<dir>
+									${project.build.directory}/library/META-INF
+								</dir>
+								<includes>
+									<include>*.tld</include>
+								</includes>
+								<outputDir>
+									${project.build.directory}/generated/
+								</outputDir>
+								<stylesheet>
+									${project.build.directory}/xslt/${translation}/f.xsl
+								</stylesheet>
+								<fileMappers>
+									<fileMapper
+										implementation="org.codehaus.plexus.components.io.filemappers.FileExtensionMapper">
+										<targetExtension>
+											xml
+										</targetExtension>
+									</fileMapper>
+								</fileMappers>
+								<parameters>
+									<parameter>
+										<name>lang</name>
+										<value>
+											${basedir}/src/main/docbook
+										</value>
+									</parameter>
+									<parameter>
+										<name>title</name>
+										<value>${project.name}</value>
+									</parameter>
+								</parameters>
+							</transformationSet>
+						</transformationSets>
+					</configuration>
+				</plugin>
+
+				<plugin>
+					<groupId>org.ajax4jsf.docs</groupId>
+					<artifactId>maven-docbook-plugin</artifactId>
+					<version>${project.version}</version>
+					<executions>
+						<execution>
+						    <id>generate</id>
+							<!--
+								<phase>compile</phase>
+							-->
+							<goals>
+								<goal>generate</goal>
+							</goals>
+						</execution>
+						<execution>
+						    <id>resources</id>
+							<!--
+								<phase>compile</phase>
+							-->
+							<goals>
+								<goal>resources</goal>
+							</goals>
+						</execution>
+					</executions>
+					<dependencies>
+						<dependency>
+							<groupId>org.ajax4jsf.docs</groupId>
+							<artifactId>xslt</artifactId>
+							<version>${project.version}</version>
+						</dependency>
+					</dependencies>
+					<configuration>
+						<sourceDirectory>
+							${basedir}/src/main/docbook
+						</sourceDirectory>
+						<targetDirectory>
+							${project.build.outputDirectory}
+						</targetDirectory>
+						<sourceDocumentName>
+							master.xml
+						</sourceDocumentName>
+						<formats>
+							<format>
+								<formatName>html_single</formatName>
+								<stylesheetResource>
+									/${translation}/html.xsl
+								</stylesheetResource>
+								<finalName>
+									ajax4jsf_reference.html
+								</finalName>
+							</format>
+							<format>
+								<formatName>html</formatName>
+								<stylesheetResource>
+									/${translation}/html_chunk.xsl
+								</stylesheetResource>
+								<finalName>index.html</finalName>
+							</format>
+							<format>
+								<formatName>pdf</formatName>
+								<stylesheetResource>
+									/${translation}/fopdf.xsl
+								</stylesheetResource>
+								<finalName>
+									ajax4jsf_reference.pdf
+								</finalName>
+							</format>
+						</formats>
+						<xincludeSupported>true</xincludeSupported>
+						<options>
+							<xincludeSupported>true</xincludeSupported>
+							<xmlTransformerType>
+								saxon
+							</xmlTransformerType>
+							<!--
+								<transformerParameters>
+								<property>
+								<name>custom.titlepage.img</name>
+								<value>
+								${basedir}/src/main/resources/shared/images/hibernate_logo_a.png
+								</value>
+								</property>
+								</transformerParameters>
+							-->
+						</options>
+					</configuration>
+
+				</plugin>
+			</plugins>
+		</pluginManagement>
+	</build>
+
+	<!-- report plugin is currently hosed
+		<reporting>
+		<plugins>
+		<plugin>
+		<groupId>org.jboss.maven.plugin</groupId>
+		<artifactId>jboss-docbook-plugin</artifactId>
+		</plugin>
+		</plugins>
+		</reporting>
+	-->
+	<properties>
+		<masterTranslation>en</masterTranslation>
+	</properties>
+
+	<modules>
+		<module>en</module>
+	</modules>
+
+</project>
+

Added: branches/refactor1/docs/maven-docbook-plugin/pom.xml
===================================================================
--- branches/refactor1/docs/maven-docbook-plugin/pom.xml	                        (rev 0)
+++ branches/refactor1/docs/maven-docbook-plugin/pom.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,154 @@
+<?xml version="1.0"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<artifactId>docs</artifactId>
+		<groupId>org.ajax4jsf</groupId>
+		<version>1.1.2-SNAPSHOT</version>
+	</parent>
+
+	<groupId>org.ajax4jsf.docs</groupId>
+	<artifactId>maven-docbook-plugin</artifactId>
+	<packaging>maven-plugin</packaging>
+
+	<name>DocBook XML Transformations</name>
+	<description>
+		Plugin for generating documentation from DocBook sources and
+		either standard or custom XSL stylesheets.
+	</description>
+
+	<dependencies>
+		<dependency>
+			<groupId>org.ajax4jsf.docs</groupId>
+			<artifactId>docbook</artifactId>
+			<version>${project.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.maven</groupId>
+			<artifactId>maven-plugin-api</artifactId>
+			<version>2.0</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.maven.reporting</groupId>
+			<artifactId>maven-reporting-api</artifactId>
+			<version>2.0.4</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.maven.reporting</groupId>
+			<artifactId>maven-reporting-impl</artifactId>
+			<version>2.0.4</version>
+		</dependency>
+		<dependency>
+			<groupId>plexus</groupId>
+			<artifactId>plexus-utils</artifactId>
+			<version>1.0.1</version>
+		</dependency>
+		<dependency>
+			<groupId>avalon-framework</groupId>
+			<artifactId>avalon-framework</artifactId>
+			<version>4.1.5</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.maven.doxia</groupId>
+			<artifactId>doxia-core</artifactId>
+			<version>${doxiaVersion}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.maven.doxia</groupId>
+			<artifactId>doxia-decoration-model</artifactId>
+			<version>${doxiaSiteVersion}</version>
+			<exclusions>
+				<exclusion>
+					<groupId>org.codehaus.plexus</groupId>
+					<artifactId>plexus-component-api</artifactId>
+				</exclusion>
+				<exclusion>
+					<groupId>org.codehaus.plexus</groupId>
+					<artifactId>plexus-container-default</artifactId>
+				</exclusion>
+			</exclusions>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.maven.doxia</groupId>
+			<artifactId>doxia-site-renderer</artifactId>
+			<version>${doxiaSiteVersion}</version>
+			<exclusions>
+				<exclusion>
+					<groupId>org.codehaus.plexus</groupId>
+					<artifactId>plexus-component-api</artifactId>
+				</exclusion>
+				<exclusion>
+					<groupId>org.codehaus.plexus</groupId>
+					<artifactId>plexus-container-default</artifactId>
+				</exclusion>
+			</exclusions>
+		</dependency>
+		<dependency>
+			<groupId>xml-resolver</groupId>
+			<artifactId>xml-resolver</artifactId>
+			<version>1.1</version>
+		</dependency>
+		<dependency>
+			<groupId>xerces</groupId>
+			<artifactId>xercesImpl</artifactId>
+			<version>2.8.0</version>
+			<scope>runtime</scope>
+		</dependency>
+		<dependency>
+			<groupId>xerces</groupId>
+			<artifactId>xmlParserAPIs</artifactId>
+			<version>2.6.2</version>
+			<scope>runtime</scope>
+		</dependency>
+		<dependency>
+			<groupId>saxon</groupId>
+			<artifactId>saxon</artifactId>
+			<version>6.5.3</version>
+		</dependency>
+		<dependency>
+			<groupId>fop</groupId>
+			<artifactId>fop</artifactId>
+			<version>0.93</version>
+			<classifier>jdk14</classifier>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.xmlgraphics</groupId>
+			<artifactId>fop</artifactId>
+			<version>0.93</version>
+		</dependency>
+		<!--
+			<dependency>
+			<groupId>batik</groupId>
+			<artifactId>batik-1.5-fop</artifactId>
+			<version>0.20-5</version>
+			</dependency>
+		-->
+		<dependency>
+			<groupId>javax.media</groupId>
+			<artifactId>jai-core</artifactId>
+			<version>1.1.3</version>
+			<scope>runtime</scope>
+		</dependency>
+		<dependency>
+			<groupId>com.sun.media</groupId>
+			<artifactId>jai-codec</artifactId>
+			<version>1.1.3</version>
+			<scope>runtime</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.maven.plugins</groupId>
+			<artifactId>maven-resources-plugin</artifactId>
+			<version>2.2</version>
+		</dependency>
+	</dependencies>
+
+	<properties>
+		<doxiaVersion>1.0-alpha-8</doxiaVersion>
+		<doxiaSiteVersion>1.0-alpha-8</doxiaSiteVersion>
+	</properties>
+
+</project>

Added: branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/AbstractDocBookMojo.java
===================================================================
--- branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/AbstractDocBookMojo.java	                        (rev 0)
+++ branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/AbstractDocBookMojo.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,89 @@
+package org.jboss.maven.plugin.docbook.gen;
+
+import java.io.File;
+
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
+import org.apache.maven.project.MavenProject;
+import org.jboss.maven.plugin.docbook.gen.render.Formatting;
+import org.jboss.maven.plugin.docbook.gen.render.RenderingException;
+import org.jboss.maven.plugin.docbook.gen.util.FormatType;
+import org.jboss.maven.plugin.docbook.gen.xslt.XSLTException;
+
+/**
+ * Basic support for the various DocBook mojos in this package.  Mainly, we are
+ * defining common configuration attributes of the packaging.
+ *
+ * @author Steve Ebersole
+ */
+public abstract class AbstractDocBookMojo extends AbstractMojo {
+    /**
+	 * INTERNAL : The project being built
+	 *
+     * @parameter expression="${project}"
+     * @required
+     * @readonly
+     */
+    protected MavenProject project;
+
+	/**
+	 * The name of the document (relative to sourceDirectory) which is the
+	 * document to be rendered.
+	 *
+	 * @parameter
+	*  @required
+	 */
+	protected String sourceDocumentName;
+
+	/**
+	 * The directory where the sources are located.
+	 *
+	 * @parameter expression="${basedir}/src/main/docbook"
+	 */
+	protected File sourceDirectory;
+
+	/**
+	 * The directory where the output will be written.
+	 *
+	 * @parameter expression="${basedir}/target/docbook"
+	 */
+	protected File targetDirectory;
+
+	/**
+	 * The formats in which to perform rendering.
+	 *
+     * @parameter
+	*  @required
+	 */
+	protected Format[] formats;
+
+	/**
+	 * Configurable options
+	 *
+     * @parameter
+	 */
+	protected Options options;
+
+	public Formatting[] getFormattings() {
+		Formatting[] formattings = new Formatting[ formats.length ];
+		for ( int i = 0; i < formats.length; i++ ) {
+			formattings[i] = new Formatting( FormatType.parse( formats[i].getFormatName() ), formats[i] );
+		}
+		return formattings;
+	}
+
+	public final void execute() throws MojoExecutionException, MojoFailureException {
+		try {
+			process( getFormattings() );
+		}
+		catch ( XSLTException e ) {
+			throw new MojoExecutionException( "XSLT problem", e );
+		}
+		catch ( RenderingException e ) {
+			throw new MojoExecutionException( "Rendering problem", e );
+		}
+	}
+
+	protected abstract void process(Formatting[] formattings) throws RenderingException, XSLTException;
+}

Added: branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/Format.java
===================================================================
--- branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/Format.java	                        (rev 0)
+++ branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/Format.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,65 @@
+package org.jboss.maven.plugin.docbook.gen;
+
+/**
+ * Represents a user format specification.
+ *
+ * @author Steve Ebersole
+ */
+public class Format {
+	private String formatName;
+
+	private String targetFileExtension;
+	private String finalName;
+	private String stylesheetResource;
+	private Boolean imagePathSettingRequired;
+	private Boolean imageCopyingRequired;
+	private Boolean doingChunking;
+
+	public Format() {
+	}
+
+	public Format(
+			String formatName,
+			String targetFileExtension,
+			String finalName,
+			String stylesheetResource,
+			Boolean imagePathSettingRequired,
+			Boolean imageCopyingRequired,
+			Boolean doingChunking) {
+		this.formatName = formatName;
+		this.targetFileExtension = targetFileExtension;
+		this.finalName = finalName;
+		this.stylesheetResource = stylesheetResource;
+		this.imagePathSettingRequired = imagePathSettingRequired;
+		this.imageCopyingRequired = imageCopyingRequired;
+		this.doingChunking = doingChunking;
+	}
+
+	public String getFormatName() {
+		return formatName;
+	}
+
+	public String getTargetFileExtension() {
+		return targetFileExtension;
+	}
+
+	public String getFinalName() {
+		return finalName;
+	}
+
+	public String getStylesheetResource() {
+		return stylesheetResource;
+	}
+
+	public Boolean getImagePathSettingRequired() {
+		return imagePathSettingRequired;
+	}
+
+	public Boolean getImageCopyingRequired() {
+		return imageCopyingRequired;
+	}
+
+	public Boolean getDoingChunking() {
+		return doingChunking;
+	}
+}

Added: branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/GenerationMojo.java
===================================================================
--- branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/GenerationMojo.java	                        (rev 0)
+++ branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/GenerationMojo.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,44 @@
+package org.jboss.maven.plugin.docbook.gen;
+
+import java.io.File;
+
+import org.codehaus.plexus.util.FileUtils;
+import org.jboss.maven.plugin.docbook.gen.render.Formatting;
+import org.jboss.maven.plugin.docbook.gen.render.RendererFactory;
+import org.jboss.maven.plugin.docbook.gen.render.RenderingException;
+import org.jboss.maven.plugin.docbook.gen.xslt.XSLTException;
+
+/**
+ * A DocBook plugin based on the excellent docbkx-maven-plugin, but which
+ * specifically handles language translations in a more transparent way.
+ *
+ * @goal generate
+ * @phase compile
+ *
+ * @author Steve Ebersole
+ */
+public class GenerationMojo extends AbstractDocBookMojo {
+
+	protected void process(Formatting[] formattings) throws XSLTException, RenderingException {
+		if ( !sourceDirectory.exists() ) {
+			getLog().info( "sourceDirectory [" + sourceDirectory.getAbsolutePath() + "] did not exist" );
+			return;
+		}
+		File source = new File( sourceDirectory, sourceDocumentName );
+		if ( !source.exists() ) {
+			getLog().info( "source [" + source.getAbsolutePath() + "] did not exist" );
+			return;
+		}
+
+		if ( !targetDirectory.exists() ) {
+			FileUtils.mkdir( targetDirectory.getAbsolutePath() );
+		}
+
+		RendererFactory rendererFactory = new RendererFactory( options, source, targetDirectory, project, getLog() );
+
+		for ( int i = 0; i < formattings.length; i++ ) {
+			rendererFactory.buildRenderer( formattings[i] ).render( source );
+		}
+	}
+
+}

Added: branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/Options.java
===================================================================
--- branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/Options.java	                        (rev 0)
+++ branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/Options.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,65 @@
+package org.jboss.maven.plugin.docbook.gen;
+
+import java.util.Properties;
+
+/**
+ * A (detachable) representation of the user configuration.
+ *
+ * @author Steve Ebersole
+ */
+public class Options {
+    private boolean xincludeSupported;
+	private String[] catalogs;
+	private String xmlTransformerType;
+	private Properties transformerParameters;
+	private boolean useRelativeImageUris = true;
+	// TODO : try as hard as I possibly can to remove this :(
+	// 		this is gettable either from (1) VERSION (fm:project/fm:Version) or
+	// 		(2) the dependencies making up the execution classpath
+	//
+	//		In #1, it would require had parsing :(, and #2 I've yet to actually
+	//		find a wsay to do this...
+	private String docbookVersion;
+
+	public Options() {
+	}
+
+	public Options(
+			boolean xincludeSupported,
+			String[] catalogs,
+			String xmlTransformerType,
+			Properties transformerParameters,
+			boolean useRelativeImageUris,
+			String docBookVersion) {
+		this.xincludeSupported = xincludeSupported;
+		this.catalogs = catalogs;
+		this.xmlTransformerType = xmlTransformerType;
+		this.transformerParameters = transformerParameters;
+		this.useRelativeImageUris = useRelativeImageUris;
+		this.docbookVersion = docBookVersion;
+	}
+
+	public boolean isXincludeSupported() {
+		return xincludeSupported;
+	}
+
+	public String[] getCatalogs() {
+		return catalogs;
+	}
+
+	public String getXmlTransformerType() {
+		return xmlTransformerType;
+	}
+
+	public Properties getTransformerParameters() {
+		return transformerParameters;
+	}
+
+	public boolean isUseRelativeImageUris() {
+		return useRelativeImageUris;
+	}
+
+	public String getDocbookVersion() {
+		return docbookVersion;
+	}
+}

Added: branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/ResourceMojo.java
===================================================================
--- branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/ResourceMojo.java	                        (rev 0)
+++ branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/ResourceMojo.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,176 @@
+package org.jboss.maven.plugin.docbook.gen;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.Reader;
+import java.io.Writer;
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Properties;
+
+import org.apache.maven.model.Resource;
+import org.apache.maven.plugin.resources.PropertyUtils;
+import org.apache.maven.plugin.resources.ReflectionProperties;
+import org.codehaus.plexus.util.DirectoryScanner;
+import org.codehaus.plexus.util.FileUtils;
+import org.codehaus.plexus.util.IOUtil;
+import org.codehaus.plexus.util.InterpolationFilterReader;
+import org.jboss.maven.plugin.docbook.gen.render.Formatting;
+import org.jboss.maven.plugin.docbook.gen.render.RendererFactory;
+import org.jboss.maven.plugin.docbook.gen.render.RenderingException;
+import org.jboss.maven.plugin.docbook.gen.xslt.XSLTException;
+
+/**
+ * A DocBook plugin based on the excellent docbkx-maven-plugin, but which
+ * specifically handles language translations in a more transparent way.
+ *
+ * @goal resources
+ * @phase process-resources
+ *
+ * @author Steve Ebersole
+ */
+public class ResourceMojo extends AbstractDocBookMojo {
+
+	private Properties filterProperties;
+
+
+	protected void process(Formatting[] formattings) throws RenderingException, XSLTException {
+		RendererFactory rendererFactory = new RendererFactory( options, null, targetDirectory, project, getLog() );
+		try {
+			for ( int i = 0; i < formattings.length; i++ ) {
+				if ( formattings[i].isImageCopyingRequired() ) {
+					File dir = rendererFactory.buildRenderer( formattings[i] ).prepareDirectory();
+					copyResources( collectResource(), dir );
+				}
+			}
+		}
+		catch ( IOException e ) {
+			throw new RenderingException( "unable to process resources", e );
+		}
+	}
+
+	private List collectResource() {
+		// todo : need a way to be able to get to the images defined by the xslt dependencies and include them
+		//
+		// for now, just return project resources
+		return project.getResources();
+	}
+
+	protected void copyResources(List resources, File outputDir) throws IOException {
+        initializeFiltering();
+
+        for ( Iterator i = resources.iterator(); i.hasNext(); ) {
+            Resource resource = ( Resource ) i.next();
+            String targetPath = resource.getTargetPath();
+            File resourceDirectory = new File( resource.getDirectory() );
+
+            if ( !resourceDirectory.exists() ) {
+                getLog().info( "Resource directory does not exist: " + resourceDirectory );
+                continue;
+            }
+
+            if ( !outputDir.exists() ) {
+                if ( !outputDir.mkdirs() ) {
+                    throw new IOException( "Cannot create resource output directory: " + outputDir );
+                }
+            }
+
+            DirectoryScanner scanner = new DirectoryScanner();
+            scanner.setBasedir( resource.getDirectory() );
+
+			if ( resource.getIncludes() != null && !resource.getIncludes().isEmpty() ) {
+                scanner.setIncludes( ( String[]) resource.getIncludes().toArray( new String[] {} ) );
+            }
+            else {
+                scanner.setIncludes( new String[] { "**/**" } );
+            }
+
+            if ( resource.getExcludes() != null && !resource.getExcludes().isEmpty() ) {
+                scanner.setExcludes( (String[]) resource.getExcludes().toArray( new String[] {} ) );
+            }
+
+            scanner.addDefaultExcludes();
+            scanner.scan();
+
+            List includedFiles = Arrays.asList( scanner.getIncludedFiles() );
+
+            for ( Iterator j = includedFiles.iterator(); j.hasNext(); ) {
+                String name = (String) j.next();
+                String destination = name;
+
+                if ( targetPath != null ) {
+                    destination = targetPath + "/" + name;
+                }
+
+                File source = new File( resource.getDirectory(), name );
+                File destinationFile = new File( outputDir, destination );
+
+                if ( !destinationFile.getParentFile().exists() ) {
+                    destinationFile.getParentFile().mkdirs();
+                }
+
+				copyFile( source, destinationFile, resource.isFiltering() );
+            }
+        }
+    }
+
+    private void initializeFiltering() throws IOException {
+        filterProperties = new Properties();
+        filterProperties.putAll( System.getProperties() );
+
+        // Project properties
+        filterProperties.putAll( project.getProperties() );
+
+		Iterator itr = project.getBuild().getFilters().iterator();
+		while ( itr.hasNext() ) {
+            String filtersfile = ( String ) itr.next();
+            Properties properties = PropertyUtils.loadPropertyFile( new File( filtersfile ), true, true );
+            filterProperties.putAll( properties );
+        }
+    }
+
+    private void copyFile( File from, File to, boolean filtering ) throws IOException {
+        if ( !filtering )
+        {
+            if ( to.lastModified() < from.lastModified() )
+            {
+                FileUtils.copyFile( from, to );
+            }
+        }
+        else
+        {
+            // buffer so it isn't reading a byte at a time!
+            Reader fileReader = null;
+            Writer fileWriter = null;
+            try {
+				fileReader = new BufferedReader( new FileReader( from ) );
+				fileWriter = new FileWriter( to );
+
+				// support ${token}
+                Reader reader = new InterpolationFilterReader( fileReader, filterProperties, "${", "}" );
+
+                // support @token@
+                reader = new InterpolationFilterReader( reader, filterProperties, "@", "@" );
+
+                boolean isPropertiesFile = false;
+
+                if ( to.isFile() && to.getName().endsWith( ".properties" ) ) {
+                    isPropertiesFile = true;
+                }
+
+                reader = new InterpolationFilterReader( reader, new ReflectionProperties( project, isPropertiesFile ), "${", "}" );
+
+                IOUtil.copy( reader, fileWriter );
+            }
+            finally
+            {
+                IOUtil.close( fileReader );
+                IOUtil.close( fileWriter );
+            }
+        }
+    }
+}

Added: branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/render/BasicRenderer.java
===================================================================
--- branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/render/BasicRenderer.java	                        (rev 0)
+++ branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/render/BasicRenderer.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,166 @@
+package org.jboss.maven.plugin.docbook.gen.render;
+
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
+
+import javax.xml.transform.Transformer;
+import javax.xml.transform.Source;
+import javax.xml.transform.Result;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.sax.SAXSource;
+import javax.xml.parsers.SAXParserFactory;
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.jboss.maven.plugin.docbook.gen.xslt.XSLTException;
+import org.jboss.maven.plugin.docbook.gen.util.ResourceHelper;
+import org.apache.maven.plugin.logging.Log;
+import org.codehaus.plexus.util.FileUtils;
+import org.xml.sax.EntityResolver;
+import org.xml.sax.XMLReader;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+import com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl;
+
+/**
+ * {@inheritDoc}
+ *
+ * @author Steve Ebersole
+ */
+public class BasicRenderer implements Renderer {
+	public static final String DTD_VALIDATION_FEATURE = "http://xml.org/sax/features/validation";
+	public static final String DTD_LOADING_FEATURE = "http://apache.org/xml/features/nonvalidating/load-external-dtd";
+
+	protected final RendererFactory factory;
+	protected final Formatting formatting;
+
+	public BasicRenderer(RendererFactory factory, Formatting formatting) {
+		this.factory = factory;
+		this.formatting = formatting;
+	}
+
+	public File prepareDirectory() throws RenderingException {
+		File target = new File( factory.getTargetDirectory(), formatting.getFormatName() );
+		if ( ! target.exists() ) {
+			FileUtils.mkdir( target.getAbsolutePath() );
+		}
+		return target;
+	}
+
+	public final void render(File source) throws RenderingException, XSLTException {
+		getLog().debug( "starting formatting [" + formatting.getFormatName() + "]" );
+
+		File target = prepareTarget( prepareDirectory(), source );
+
+		Transformer transformer = buildTransformer( target );
+		Source transformationSource = buildSource( source );
+		Result transformationResult = buildResult( target );
+		try {
+			transformer.transform( transformationSource, transformationResult );
+		}
+		catch ( TransformerException e ) {
+			throw new RenderingException( "unable to perform transformation", e );
+		}
+		finally {
+			releaseResult( transformationResult );
+		}
+		
+	}
+
+	private File prepareTarget(File directory, File source) throws RenderingException {
+		String targetFileName = deduceTargetFileName( source );
+		getLog().debug( "preparing target file [" + targetFileName + "]" );
+		File target = new File( directory, targetFileName );
+		if ( target.exists() ) {
+			if ( !target.delete() ) {
+				getLog().warn( "unable to clean up previous output file [" + target.getAbsolutePath() + "]" );
+			}
+		}
+		if ( !target.exists() ) {
+			try {
+				target.createNewFile();
+			}
+			catch ( IOException e ) {
+				throw new RenderingException( "unable to create output file [" + target.getAbsolutePath() + "]", e );
+			}
+		}
+		return target;
+	}
+
+	private String deduceTargetFileName(File source) {
+		return formatting.getNamingStrategy().deduceTargetFileName( source );
+	}
+
+	protected Transformer buildTransformer(File targetFile)
+			throws RenderingException, XSLTException {
+		final URL transformationStylesheet = resolveTransformationStylesheet();
+		Transformer transformer = factory.getTransformerFactory()
+				.buildTransformer( formatting, transformationStylesheet );
+		if ( formatting.isImagePathSettingRequired() ) {
+			String imgSrcPath = factory.getTargetDirectory().getAbsolutePath() + "/";
+			getLog().debug( "setting 'img.src.path' [" + imgSrcPath + "]" );
+			transformer.setParameter( "img.src.path", imgSrcPath );
+		}
+		if ( factory.getOptions().isUseRelativeImageUris() ) {
+			getLog().debug( "enforcing retention of relative image URIs" );
+			transformer.setParameter( "keep.relative.image.uris", "0" );
+		}
+		if ( formatting.isDoingChunking() ) {
+			getLog().debug( "Chunking output." );
+			String rootFilename = targetFile.getName();
+			rootFilename = rootFilename.substring( 0, rootFilename.lastIndexOf( '.' ) );
+			transformer.setParameter( "root.filename", rootFilename );
+			transformer.setParameter( "base.dir", targetFile.getParent() + File.separator );
+                        transformer.setParameter( "manifest.in.base.dir", "1" );
+		}
+		return transformer;
+	}
+
+	protected final URL resolveTransformationStylesheet() throws RenderingException {
+		return ResourceHelper.requireResource( formatting.getStylesheetResource() );
+//		return format.getStylesheetResource() != null
+//				? ResourceHelper.requireResource( format.getStylesheetResource() )
+//				: ResourceHelper.requireResource( format.getFormatType().getStylesheetResource() );
+	}
+
+	private Source buildSource(File sourceFile) throws RenderingException {
+		try {
+			EntityResolver resolver = factory.getCatalogResolver();
+			SAXParserFactory factory = createParserFactory();
+			XMLReader reader = factory.newSAXParser().getXMLReader();
+			reader.setEntityResolver( resolver );
+
+			// Disable DTD loading and validation
+			reader.setFeature( DTD_LOADING_FEATURE, false );
+			reader.setFeature( DTD_VALIDATION_FEATURE, false );
+
+			return new SAXSource( reader, new InputSource( sourceFile.getAbsolutePath() ) );
+		}
+		catch ( ParserConfigurationException e ) {
+			throw new RenderingException( "unable to build SAX Parser", e );
+		}
+		catch ( SAXException e ) {
+			throw new RenderingException( "unable to build SAX Parser", e );
+		}
+	}
+
+	protected final SAXParserFactory createParserFactory() {
+        SAXParserFactory parserFactory = new SAXParserFactoryImpl();
+        parserFactory.setXIncludeAware( factory.getOptions().isXincludeSupported() );
+        return parserFactory;
+    }
+
+	protected Result buildResult(File targetFile) throws RenderingException {
+		return new StreamResult( targetFile );
+	}
+
+	protected void releaseResult(Result transformationResult) {
+		// typically nothing to do...
+	}
+
+	protected Log getLog() {
+		return factory.getLog();
+	}
+}

Added: branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/render/Formatting.java
===================================================================
--- branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/render/Formatting.java	                        (rev 0)
+++ branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/render/Formatting.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,105 @@
+package org.jboss.maven.plugin.docbook.gen.render;
+
+import java.io.File;
+
+import org.codehaus.plexus.util.FileUtils;
+import org.jboss.maven.plugin.docbook.gen.Format;
+import org.jboss.maven.plugin.docbook.gen.util.FormatType;
+
+/**
+ * Defined formatting information.  Basically stuff to either pass into the xsl
+ * transformer or stuff needed to prepare for transformation.
+ *
+ * @author Steve Ebersole
+ */
+public class Formatting {
+	// todo : the usage of 'FormatType' here are ok.
+
+	private final String formatName;
+	private final String stylesheetResource;
+	private final boolean imagePathSettingRequired;
+	private final boolean imageCopyingRequired;
+	private final boolean doingChunking;
+	private final FormatType standardDocBookSpec;
+	private final TargetNamingStrategy namingStrategy;
+
+	public Formatting(FormatType standardDocBookSpec, Format userSpec) {
+		// todo : there may not be matching standard docbook formatter...
+		if ( ! standardDocBookSpec.getName().equals( userSpec.getFormatName() ) ) {
+			throw new IllegalArgumentException( "formatting type mismatch" );
+		}
+
+		this.standardDocBookSpec = standardDocBookSpec;
+		this.formatName = standardDocBookSpec.getName();
+
+		this.stylesheetResource = userSpec.getStylesheetResource() == null
+				? standardDocBookSpec.getStylesheetResource()
+				: userSpec.getStylesheetResource();
+
+		this.imageCopyingRequired = userSpec.getImageCopyingRequired() == null
+				? standardDocBookSpec.isImageCopyingRequired()
+				: userSpec.getImageCopyingRequired().booleanValue();
+
+		this.imagePathSettingRequired = userSpec.getImagePathSettingRequired() == null
+				? standardDocBookSpec.isImagePathSettingRequired()
+				: userSpec.getImagePathSettingRequired().booleanValue();
+
+		this.doingChunking =userSpec.getDoingChunking() == null
+				? standardDocBookSpec.isDoingChunking()
+				: userSpec.getDoingChunking().booleanValue();
+
+		this.namingStrategy = new TargetNamingStrategy( standardDocBookSpec, userSpec );
+	}
+
+	public String getFormatName() {
+		return formatName;
+	}
+
+	public FormatType getStandardDocBookSpec() {
+		return standardDocBookSpec;
+	}
+
+	public String getStylesheetResource() {
+		return stylesheetResource;
+	}
+
+	public boolean isImagePathSettingRequired() {
+		return imagePathSettingRequired;
+	}
+
+	public boolean isImageCopyingRequired() {
+		return imageCopyingRequired;
+	}
+
+	public boolean isDoingChunking() {
+		return doingChunking;
+	}
+
+	public TargetNamingStrategy getNamingStrategy() {
+		return namingStrategy;
+	}
+
+	public static class TargetNamingStrategy {
+		private String targetFileExtension;
+		private String finalName;
+
+		public TargetNamingStrategy(FormatType standardDocBookSpec, Format userSpec) {
+			if ( userSpec.getFinalName() != null ) {
+				this.targetFileExtension = null;
+				this.finalName = userSpec.getFinalName();
+			}
+			else {
+				this.targetFileExtension = userSpec.getTargetFileExtension() == null
+						? standardDocBookSpec.getStandardFileExtension()
+						: userSpec.getTargetFileExtension();
+				this.finalName = null;
+			}
+		}
+
+		public String deduceTargetFileName(File source) {
+			return finalName == null
+				? FileUtils.basename( source.getAbsolutePath() ) + targetFileExtension
+				: finalName;
+		}
+	}
+}

Added: branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/render/HtmlRenderer.java
===================================================================
--- branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/render/HtmlRenderer.java	                        (rev 0)
+++ branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/render/HtmlRenderer.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+package org.jboss.maven.plugin.docbook.gen.render;
+
+import java.io.File;
+import javax.xml.transform.Transformer;
+
+import org.jboss.maven.plugin.docbook.gen.xslt.XSLTException;
+
+/**
+ * Special handling for html processing
+ *
+ * @author Steve Ebersole
+ */
+public class HtmlRenderer extends BasicRenderer {
+	public HtmlRenderer(RendererFactory factory, Formatting formatting) {
+		super( factory, formatting );
+	}
+
+	protected Transformer buildTransformer(File targetFile)
+			throws RenderingException, XSLTException {
+		Transformer transformer = super.buildTransformer( targetFile );
+		return transformer;
+	}
+}

Added: branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/render/PdfRenderer.java
===================================================================
--- branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/render/PdfRenderer.java	                        (rev 0)
+++ branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/render/PdfRenderer.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,135 @@
+package org.jboss.maven.plugin.docbook.gen.render;
+
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.FileNotFoundException;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.imageio.stream.FileImageInputStream;
+import javax.xml.transform.Result;
+import javax.xml.transform.Source;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.URIResolver;
+import javax.xml.transform.sax.SAXResult;
+import javax.xml.transform.stream.StreamSource;
+
+//import org.apache.fop.apps.Driver;
+import org.apache.fop.apps.FOPException;
+import org.apache.fop.apps.Fop;
+import org.apache.fop.apps.FopFactory;
+import org.apache.fop.apps.MimeConstants;
+import org.apache.avalon.framework.logger.Logger;
+import org.apache.maven.model.Resource;
+import org.apache.maven.plugin.logging.Log;
+import org.jboss.maven.plugin.docbook.gen.xslt.XSLTException;
+import org.jboss.maven.plugin.docbook.gen.xslt.resolve.ResolverChain;
+
+/**
+ * Special handling for pdf rendering
+ * 
+ * @author Steve Ebersole
+ */
+public class PdfRenderer extends BasicRenderer {
+    private FopFactory fopFactory;
+
+    public PdfRenderer(RendererFactory factory, Formatting formatting) {
+	super(factory, formatting);
+    }
+
+    /**
+         * @param factory
+         * @param formatting
+         * @throws XSLTException
+         */
+    private FopFactory getFopFactory() throws RenderingException {
+	if (null == fopFactory) {
+	    fopFactory = FopFactory.newInstance();
+	    final List resources = factory.getProject().getResources();
+	    ResolverChain resolvers = new ResolverChain();
+	    URIResolver resolver = new URIResolver() {
+
+		public Source resolve(String href, String base)
+			throws TransformerException {
+		    getLog().info(
+			    "Request to resource " + href
+				    + " with document base " + base);
+		    for (Iterator iter = resources.iterator(); iter.hasNext();) {
+			Resource resource = (Resource) iter.next();
+			String directory = resource.getDirectory();
+			File res = new File(new File(directory), href);
+			if (res.exists()) {
+			    try {
+				return new StreamSource(
+					new FileInputStream(res));
+			    } catch (FileNotFoundException e) {
+				continue;
+			    }
+			}
+		    }
+		    return null;
+		}
+
+	    };
+	    resolvers.addResolver(resolver);
+	    try {
+		resolvers.addResolver(factory.getTransformerFactory()
+		    .buildUriResolver(formatting.getStandardDocBookSpec()));
+	    } catch (XSLTException e) {
+		    throw new RenderingException("Error create URIResolver for a fop transformation", e);
+	    }
+	    fopFactory.setURIResolver(resolvers);
+	}
+	return fopFactory;
+    }
+
+    protected Result buildResult(File targetFile) throws RenderingException {
+	getLog().info(
+		"building formatting result [" + targetFile.getAbsolutePath()
+			+ "]");
+	return new PdfResult(getFopFactory(),targetFile);
+   }
+
+    private static class PdfResult extends SAXResult {
+	 private OutputStream out;
+
+	public PdfResult(FopFactory fopFactory, File target) throws RenderingException {
+	        super();
+		try {
+		    out = new BufferedOutputStream(
+		    			    new java.io.FileOutputStream(target));
+		    // Step 3: Construct fop with desired output format
+		    Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, out);
+		    // driver.setOutputStream( out );
+		    setHandler(fop.getDefaultHandler());
+		} catch (FileNotFoundException e) {
+		    throw new RenderingException("unable to access target file "
+			    + target.getAbsolutePath());
+		} catch (FOPException e) {
+		    throw new RenderingException("Error create FOP  renderer ", e);
+		}
+	}
+	
+	public void flush() throws IOException {
+	    out.flush();
+	    out.close();
+	}
+    }
+    
+    protected void releaseResult(Result transformationResult) {
+        super.releaseResult(transformationResult);
+        if (transformationResult instanceof PdfResult) {
+	    PdfResult pdfResult = (PdfResult) transformationResult;
+	    try {
+		pdfResult.flush();
+	    } catch (IOException e) {
+		getLog().error("Error close output PDF file", e);
+	    }
+	}
+    }
+    
+
+}

Added: branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/render/Renderer.java
===================================================================
--- branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/render/Renderer.java	                        (rev 0)
+++ branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/render/Renderer.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,16 @@
+package org.jboss.maven.plugin.docbook.gen.render;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.jboss.maven.plugin.docbook.gen.xslt.XSLTException;
+
+/**
+ * Responsible for rendering a given source document in a particular format.
+ *
+ * @author Steve Ebersole
+ */
+public interface Renderer {
+	public File prepareDirectory() throws RenderingException;
+	public void render(File source) throws RenderingException, XSLTException;
+}

Added: branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/render/RendererFactory.java
===================================================================
--- branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/render/RendererFactory.java	                        (rev 0)
+++ branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/render/RendererFactory.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,105 @@
+package org.jboss.maven.plugin.docbook.gen.render;
+
+import java.io.File;
+
+import org.jboss.maven.plugin.docbook.gen.Format;
+import org.jboss.maven.plugin.docbook.gen.Options;
+import org.jboss.maven.plugin.docbook.gen.util.TransformerType;
+import org.jboss.maven.plugin.docbook.gen.util.FormatType;
+import org.jboss.maven.plugin.docbook.gen.xslt.XSLTException;
+import org.jboss.maven.plugin.docbook.gen.xslt.TransformerFactory;
+import org.jboss.maven.plugin.docbook.gen.xslt.catalog.ImplicitCatalogManager;
+import org.jboss.maven.plugin.docbook.gen.xslt.catalog.ExplicitCatalogManager;
+import org.apache.xml.resolver.CatalogManager;
+import org.apache.xml.resolver.tools.CatalogResolver;
+import org.apache.maven.plugin.logging.Log;
+import org.apache.maven.project.MavenProject;
+
+/**
+ * Builds a renderer for the given format
+ *
+ * @author Steve Ebersole
+ */
+public class RendererFactory {
+	private final Options options;
+	private final File source;
+	private final File targetDirectory;
+	private final MavenProject project;
+	private Log log;
+
+	private CatalogResolver catalogResolver;
+	private TransformerFactory transformerFactory;
+
+	public RendererFactory(Options options, File source, File targetDirectory, MavenProject project, Log log) {
+		this.options = options;
+		this.source = source;
+		this.targetDirectory = targetDirectory;
+		this.project = project;
+		this.log = log;
+	}
+
+
+	public Options getOptions() {
+		return options;
+	}
+
+	public File getSource() {
+		return source;
+	}
+
+	public File getTargetDirectory() {
+		return targetDirectory;
+	}
+
+	public Log getLog() {
+		return log;
+	}
+
+	public CatalogResolver getCatalogResolver() {
+		if ( catalogResolver == null ) {
+			CatalogManager catalogManager;
+			if ( options.getCatalogs() == null || options.getCatalogs().length == 0 ) {
+				catalogManager = new ImplicitCatalogManager();
+			}
+			else {
+				catalogManager = new ExplicitCatalogManager( options.getCatalogs() );
+			}
+			catalogResolver = new CatalogResolver( catalogManager );
+		}
+		return catalogResolver;
+	}
+
+	public TransformerFactory getTransformerFactory() {
+		if ( transformerFactory == null ) {
+			transformerFactory = new TransformerFactory(
+					TransformerType.parse( options.getXmlTransformerType() ),
+					options.getTransformerParameters(),
+					getCatalogResolver(),
+					options.getDocbookVersion()
+			);
+		}
+		return transformerFactory;
+	}
+
+	public Renderer buildRenderer(Formatting formatting) throws XSLTException {
+		// todo : these usages of 'FormatType' are ok as well
+		if ( formatting.getFormatName().equals( FormatType.PDF.getName() ) ) {
+			return new PdfRenderer( this, formatting );
+		}
+		else if ( formatting.getFormatName().equals( FormatType.HTML.getName() )
+				|| formatting.getFormatName().equals( FormatType.HTML_SINGLE.getName() ) ) {
+			return new HtmlRenderer( this, formatting );
+		}
+		else {
+			return new BasicRenderer( this, formatting );
+		}
+	}
+
+
+	/**
+	 * @return the project
+	 */
+	public MavenProject getProject() {
+	    return project;
+	}
+}

Added: branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/render/RenderingException.java
===================================================================
--- branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/render/RenderingException.java	                        (rev 0)
+++ branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/render/RenderingException.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,17 @@
+package org.jboss.maven.plugin.docbook.gen.render;
+
+/**
+ * {@inheritDoc}
+ *
+ * @author Steve Ebersole
+ */
+public class RenderingException extends Exception {
+
+	public RenderingException(String message) {
+		super( message );
+	}
+
+	public RenderingException(String message, Throwable cause) {
+		super( message, cause );
+	}
+}

Added: branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/util/FormatType.java
===================================================================
--- branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/util/FormatType.java	                        (rev 0)
+++ branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/util/FormatType.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,141 @@
+package org.jboss.maven.plugin.docbook.gen.util;
+
+/**
+ * An enumeration of the various types of formatting supported in this plugin.
+ * <p/>
+ * DocBook does define some other output formatting support (like HTML Help),
+ * but those are not covered nor supported by this plugin.
+ * <p/>
+ * Really, instead of a discrete enumeration, these should act as templates
+ * based on the docbook standard formats.  The attributes here should be exposed
+ * to the user for configuration, thesse attributes values acting as defaults
+ * based on the selected format-name.
+ *
+ * @author Steve Ebersole
+ */
+public class FormatType {
+	public static final FormatType ECLIPSE =
+			new HtmlBasedFormat( "eclipse", "/eclipse/eclipse.xsl" );
+
+	public static final FormatType HTML =
+			new HtmlBasedFormat( "html", "/html/chunk.xsl" );
+
+	public static final FormatType HTML_SINGLE =
+			new HtmlBasedFormat( "html_single", "/html/docbook.xsl", false );
+
+	public static final FormatType HTMLHELP =
+			new HtmlBasedFormat( "htmlhelp", "/htmlhelp/htmlhelp.xsl" );
+
+	public static final FormatType JAVAHELP =
+			new HtmlBasedFormat( "javahelp", "/javahelp/javahelp.xsl" );
+
+	public static final FormatType MAN =
+			new HtmlBasedFormat( "man", "/manpages/docbook.xsl", false );
+
+	public static final FormatType PDF =
+			new FormatType( "pdf", "pdf", "/fo/docbook.xsl", true, false, false );
+
+	public static final FormatType WEBSITE =
+			new HtmlBasedFormat( "website", "/website/website.xsl", false );
+
+// I'd rather not support this...
+//	public static final FormatType WORDML =
+//			new FormatType( "wordml", "doc", "/wordml/wordml.xsl", ?, ?, ? );
+
+	public static final FormatType XHTML =
+			new FormatType( "xhtml", "xhtml", "/xhtml/docbook.xsl", false, true, false );
+
+	private final String name;
+	private final String standardFileExtension;
+	private final String stylesheetResource;
+	private final boolean imagePathSettingRequired;
+	private final boolean imageCopyingRequired;
+	private final boolean doingChunking;
+
+	public FormatType(
+			String name,
+			String standardFileExtension,
+			String stylesheetResource,
+			boolean imagePathSettingRequired,
+			boolean imageCopyingRequired,
+			boolean doingChunking) {
+		this.name = name;
+		this.standardFileExtension = standardFileExtension;
+		this.stylesheetResource = stylesheetResource;
+		this.imagePathSettingRequired = imagePathSettingRequired;
+		this.imageCopyingRequired = imageCopyingRequired;
+		this.doingChunking = doingChunking;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public String getStandardFileExtension() {
+		return standardFileExtension;
+	}
+
+	public String getStylesheetResource() {
+		return stylesheetResource;
+	}
+
+	public boolean isImagePathSettingRequired() {
+		return imagePathSettingRequired;
+	}
+
+	public boolean isImageCopyingRequired() {
+		return imageCopyingRequired;
+	}
+
+	public boolean isDoingChunking() {
+		return doingChunking;
+	}
+
+	public static FormatType parse(String name) {
+		if ( ECLIPSE.name.equals( name ) ) {
+			return ECLIPSE;
+		}
+		else if ( HTML.name.equals( name ) ) {
+			return HTML;
+		}
+		else if ( HTML_SINGLE.name.equals( name ) ) {
+			return HTML_SINGLE;
+		}
+		else if ( HTMLHELP.name.equals( name ) ) {
+			return HTMLHELP;
+		}
+		else if ( JAVAHELP.name.equals( name ) ) {
+			return JAVAHELP;
+		}
+		else if ( MAN.name.equals( name ) ) {
+			return MAN;
+		}
+		else if ( PDF.name.equals( name ) ) {
+			return PDF;
+		}
+		else if ( WEBSITE.name.equals( name ) ) {
+			return WEBSITE;
+		}
+//		else if ( WORDML.name.equals( name ) ) {
+//			return WORDML;
+//		}
+		else if ( XHTML.name.equals( name ) ) {
+			return XHTML;
+		}
+		else {
+			return null;
+		}
+	}
+
+
+	// convenience for html based formats to simplify ctors ~~~~~~~~~~~~~~~~~~~
+
+	private static class HtmlBasedFormat extends FormatType {
+		private HtmlBasedFormat(String name, String stylesheetResource) {
+			this( name, stylesheetResource, true );
+		}
+		private HtmlBasedFormat(String name, String stylesheetResource, boolean doingChunking) {
+			super( name, "html", stylesheetResource, false, true, doingChunking );
+		}
+	}
+}

Added: branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/util/NoOpWriter.java
===================================================================
--- branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/util/NoOpWriter.java	                        (rev 0)
+++ branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/util/NoOpWriter.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,20 @@
+package org.jboss.maven.plugin.docbook.gen.util;
+
+import java.io.Writer;
+
+/**
+ * A writer which does no writing :)
+ *
+ * @author Steve Ebersole
+ */
+public class NoOpWriter extends Writer {
+
+	public void write(char cbuf[], int off, int len) {
+	}
+
+	public void flush() {
+	}
+
+	public void close() {
+	}
+}

Added: branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/util/ResourceHelper.java
===================================================================
--- branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/util/ResourceHelper.java	                        (rev 0)
+++ branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/util/ResourceHelper.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,26 @@
+package org.jboss.maven.plugin.docbook.gen.util;
+
+import java.net.URL;
+
+/**
+ * Simple helpers for locating and handling classpath resource lookups.
+ *
+ * @author Steve Ebersole
+ */
+public class ResourceHelper {
+	public static URL requireResource(String name) {
+		URL resource = locateResource( name );
+		if ( resource == null ) {
+			throw new IllegalArgumentException( "could not locate resource [" + name + "]" );
+		}
+		return resource;
+	}
+
+	public static URL locateResource(String name) {
+		ClassLoader loader = Thread.currentThread().getContextClassLoader();
+		if ( loader == null ) {
+			loader = ResourceHelper.class.getClassLoader();
+		}
+		return loader.getResource( name );
+	}
+}

Added: branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/util/TransformerType.java
===================================================================
--- branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/util/TransformerType.java	                        (rev 0)
+++ branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/util/TransformerType.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,37 @@
+package org.jboss.maven.plugin.docbook.gen.util;
+
+/**
+ * Enumeration of supported XSLT transformers.
+ *
+ * @author Steve Ebersole
+ */
+public class TransformerType {
+	public static final TransformerType SAXON = new TransformerType( "saxon", false );
+	public static final TransformerType XALAN = new TransformerType( "xalan", true );
+
+	private final String name;
+	private final boolean supportsReset;
+
+	private TransformerType(String name, boolean supportsReset) {
+		this.name = name;
+		this.supportsReset = supportsReset;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public boolean supportsReset() {
+		return supportsReset;
+	}
+
+	public static TransformerType parse(String name) {
+		if ( XALAN.name.equals( name ) ) {
+			return XALAN;
+		}
+		else {
+			// default
+			return SAXON;
+		}
+	}
+}

Added: branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/xslt/TransformerFactory.java
===================================================================
--- branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/xslt/TransformerFactory.java	                        (rev 0)
+++ branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/xslt/TransformerFactory.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,122 @@
+package org.jboss.maven.plugin.docbook.gen.xslt;
+
+import java.io.IOException;
+import java.net.URL;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Properties;
+import javax.xml.transform.Source;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.URIResolver;
+import javax.xml.transform.stream.StreamSource;
+
+import com.icl.saxon.Controller;
+import org.apache.xml.resolver.tools.CatalogResolver;
+import org.jboss.maven.plugin.docbook.gen.render.Formatting;
+import org.jboss.maven.plugin.docbook.gen.util.FormatType;
+import org.jboss.maven.plugin.docbook.gen.util.NoOpWriter;
+import org.jboss.maven.plugin.docbook.gen.util.ResourceHelper;
+import org.jboss.maven.plugin.docbook.gen.util.TransformerType;
+import org.jboss.maven.plugin.docbook.gen.xslt.resolve.CurrentVersionResolver;
+import org.jboss.maven.plugin.docbook.gen.xslt.resolve.ExplicitUrnResolver;
+import org.jboss.maven.plugin.docbook.gen.xslt.resolve.RelativeJarUriResolver;
+import org.jboss.maven.plugin.docbook.gen.xslt.resolve.ResolverChain;
+import org.jboss.maven.plugin.docbook.gen.xslt.resolve.VersionResolver;
+
+/**
+ * A factory for {@link javax.xml.transform.Transformer} instances, configurable
+ * to return either SAXON or XALAN based transformers.
+ *
+ * @author Steve Ebersole
+ */
+public class TransformerFactory {
+	private final TransformerType transformerType;
+	private final Properties transformerParameters;
+	private final CatalogResolver catalogResolver;
+	private final String docbookVersion;
+
+	public TransformerFactory(
+			TransformerType transformerType,
+			Properties transformerParameters,
+			CatalogResolver catalogResolver, String docbookVersion) {
+		this.transformerType = transformerType;
+		this.transformerParameters = transformerParameters;
+		this.catalogResolver = catalogResolver;
+		this.docbookVersion = docbookVersion;
+	}
+
+	public Transformer buildTransformer(Formatting formatting, URL customStylesheet) throws XSLTException {
+		URIResolver uriResolver = buildUriResolver( formatting.getStandardDocBookSpec() );
+
+		javax.xml.transform.TransformerFactory transformerFactory = buildTransformerFactory();
+		transformerFactory.setURIResolver( uriResolver );
+
+		URL xsltStylesheet = customStylesheet == null
+				? ResourceHelper.requireResource( formatting.getStylesheetResource() )
+				: customStylesheet;
+
+		Transformer transformer;
+		try {
+			Source source = new StreamSource( xsltStylesheet.openStream(), xsltStylesheet.toExternalForm() );
+			transformer = transformerFactory.newTransformer( source );
+		}
+		catch ( IOException e ) {
+			throw new XSLTException( "problem opening stylesheet", e );
+		}
+		catch ( TransformerConfigurationException e ) {
+			throw new XSLTException( "unable to build transformer", e );
+		}
+
+		transformer.setURIResolver( uriResolver );
+		applyParameters( transformer );
+
+		if ( transformer instanceof Controller ) {
+			Controller controller = ( Controller ) transformer;
+			try {
+				controller.makeMessageEmitter();
+				controller.getMessageEmitter().setWriter( new NoOpWriter() );
+			}
+			catch ( TransformerException te ) {
+				// intentionally empty
+			}
+		}
+		return transformer;
+	}
+
+	private javax.xml.transform.TransformerFactory buildTransformerFactory() {
+		if ( transformerType == TransformerType.XALAN ) {
+			return new com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl();
+		}
+		else {
+			// saxon as default...
+			return new com.icl.saxon.TransformerFactoryImpl();
+		}
+	}
+
+	private void applyParameters(Transformer transformer) {
+		if ( transformerParameters == null ) {
+			return;
+		}
+		Iterator itr = transformerParameters.entrySet().iterator();
+		while ( itr.hasNext() ) {
+			final Map.Entry entry = ( Map.Entry ) itr.next();
+			transformer.setParameter( ( String ) entry.getKey(), entry.getValue() );
+		}
+	}
+
+	public URIResolver buildUriResolver(FormatType formatType) throws XSLTException {
+		ResolverChain resolverChain = new ResolverChain();
+		if ( formatType != null ) {
+			resolverChain.addResolver( new ExplicitUrnResolver( formatType ) );
+		}
+		resolverChain.addResolver( new CurrentVersionResolver() );
+		if ( docbookVersion != null ) {
+			resolverChain.addResolver( new VersionResolver( docbookVersion ) );
+		}
+		resolverChain.addResolver( new RelativeJarUriResolver() );
+		resolverChain.addResolver( catalogResolver );
+		return resolverChain;
+	}
+}

Added: branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/xslt/XSLTException.java
===================================================================
--- branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/xslt/XSLTException.java	                        (rev 0)
+++ branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/xslt/XSLTException.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,18 @@
+package org.jboss.maven.plugin.docbook.gen.xslt;
+
+/**
+ * Indicates problems either building XSLT transformers or performing
+ * transformations.
+ *
+ * @author Steve Ebersole
+ */
+public class XSLTException extends Exception {
+
+	public XSLTException(String message) {
+		super( message );
+	}
+
+	public XSLTException(String message, Throwable cause) {
+		super( message, cause );
+	}
+}

Added: branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/xslt/catalog/AbstractCatalogManager.java
===================================================================
--- branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/xslt/catalog/AbstractCatalogManager.java	                        (rev 0)
+++ branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/xslt/catalog/AbstractCatalogManager.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,31 @@
+package org.jboss.maven.plugin.docbook.gen.xslt.catalog;
+
+import org.apache.xml.resolver.CatalogManager;
+
+/**
+ * Basic support for our notion of CatalogManagers.
+ *
+ * @author Steve Ebersole
+ */
+public abstract class AbstractCatalogManager extends CatalogManager {
+	public AbstractCatalogManager(String[] catalogNames) {
+		super();
+		setIgnoreMissingProperties( true );
+		if ( catalogNames != null && catalogNames.length != 0 ) {
+			StringBuffer buffer = new StringBuffer();
+			boolean first = true;
+			for ( int i = 0; i < catalogNames.length; i++ ) {
+				if ( catalogNames[i] != null ) {
+					if ( first ) {
+						first = false;
+					}
+					else {
+						buffer.append( ';' );
+					}
+				}
+				buffer.append( catalogNames[i] );
+			}
+			setCatalogFiles( buffer.toString() );
+		}
+	}
+}

Added: branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/xslt/catalog/ExplicitCatalogManager.java
===================================================================
--- branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/xslt/catalog/ExplicitCatalogManager.java	                        (rev 0)
+++ branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/xslt/catalog/ExplicitCatalogManager.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,14 @@
+package org.jboss.maven.plugin.docbook.gen.xslt.catalog;
+
+
+/**
+ * Utilizes explicit, user-supplied catalog names to build a
+ * CatalogManager.
+ *
+ * @author Steve Ebersole
+ */
+public class ExplicitCatalogManager extends AbstractCatalogManager {
+	public ExplicitCatalogManager(String[] catalogNames) {
+		super( catalogNames );
+	}
+}

Added: branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/xslt/catalog/ImplicitCatalogManager.java
===================================================================
--- branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/xslt/catalog/ImplicitCatalogManager.java	                        (rev 0)
+++ branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/xslt/catalog/ImplicitCatalogManager.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,41 @@
+package org.jboss.maven.plugin.docbook.gen.xslt.catalog;
+
+import java.util.Enumeration;
+import java.util.ArrayList;
+import java.net.URL;
+import java.io.IOException;
+
+/**
+ * CatalogManager which resolves its catalogs internally via  classpath
+ * resource lookups.  Its looks for resources named '/catalog.xml' on the
+ * classpath.
+ *
+ * @author Steve Ebersole
+ */
+public class ImplicitCatalogManager extends AbstractCatalogManager {
+	public ImplicitCatalogManager() {
+		super( resolveCatalogNames() );
+	}
+
+	private static String[] resolveCatalogNames() {
+        ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
+		if ( classLoader == null ) {
+			classLoader = ImplicitCatalogManager.class.getClassLoader();
+		}
+		ArrayList names = new ArrayList();
+        try {
+            Enumeration enumeration = classLoader.getResources( "/catalog.xml" );
+            while ( enumeration.hasMoreElements() ) {
+				final URL resource = ( URL ) enumeration.nextElement();
+				final String resourcePath = resource.toExternalForm();
+				if ( resourcePath != null ) {
+					names.add( resourcePath );
+				}
+            }
+        }
+		catch ( IOException ignore ) {
+			// intentionally empty
+		}
+		return ( String[] ) names.toArray( new String[ names.size() ] );
+	}
+}

Added: branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/xslt/resolve/BasicUrnResolver.java
===================================================================
--- branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/xslt/resolve/BasicUrnResolver.java	                        (rev 0)
+++ branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/xslt/resolve/BasicUrnResolver.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,29 @@
+package org.jboss.maven.plugin.docbook.gen.xslt.resolve;
+
+import javax.xml.transform.URIResolver;
+import javax.xml.transform.Source;
+import javax.xml.transform.TransformerException;
+
+/**
+ * Basic support for URIResolvers which map a URN unto a single replacement
+ * {@link Source}.
+ *
+ * @author Steve Ebersole
+ */
+public class BasicUrnResolver implements URIResolver {
+	private final String urn;
+	private final Source source;
+
+	public BasicUrnResolver(String urn, Source source) {
+		this.urn = urn;
+		this.source = source;
+	}
+
+	public Source resolve(String href, String base) throws TransformerException {
+		return urn.equals( href ) ? source : null;
+	}
+
+	public String toString() {
+		return super.toString() + " [URN:" + urn + "]";
+	}
+}

Added: branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/xslt/resolve/CurrentVersionResolver.java
===================================================================
--- branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/xslt/resolve/CurrentVersionResolver.java	                        (rev 0)
+++ branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/xslt/resolve/CurrentVersionResolver.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,14 @@
+package org.jboss.maven.plugin.docbook.gen.xslt.resolve;
+
+/**
+ * Map hrefs starting with <tt>http://docbook.sourceforge.net/release/xsl/current/</tt>
+ * to classpath resource lookups.
+ *
+ * @author Steve Ebersole
+ */
+public class CurrentVersionResolver extends VersionResolver {
+
+	public CurrentVersionResolver() {
+		super( "current" );
+	}
+}

Added: branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/xslt/resolve/ExplicitUrnResolver.java
===================================================================
--- branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/xslt/resolve/ExplicitUrnResolver.java	                        (rev 0)
+++ branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/xslt/resolve/ExplicitUrnResolver.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,39 @@
+package org.jboss.maven.plugin.docbook.gen.xslt.resolve;
+
+import java.net.URL;
+import java.io.IOException;
+import javax.xml.transform.Source;
+import javax.xml.transform.stream.StreamSource;
+
+import org.jboss.maven.plugin.docbook.gen.util.FormatType;
+import org.jboss.maven.plugin.docbook.gen.util.ResourceHelper;
+import org.jboss.maven.plugin.docbook.gen.xslt.XSLTException;
+
+/**
+ * Resolves an explicit <tt>urn:docbook:stylesheet</tt> URN against the standard
+ * DocBook stylesheets.
+ *
+ * @author Steve Ebersole
+ */
+public class ExplicitUrnResolver extends BasicUrnResolver {
+	private final FormatType formatType;
+
+	public ExplicitUrnResolver(FormatType type) throws XSLTException {
+		super( "urn:docbook:stylesheet", createSource( type ) );
+		this.formatType = type;
+	}
+
+	private static Source createSource(FormatType type) throws XSLTException {
+		URL stylesheet = ResourceHelper.requireResource( type.getStylesheetResource() );
+		try {
+			return new StreamSource( stylesheet.openStream(), stylesheet.toExternalForm() );
+		}
+		catch ( IOException e ) {
+			throw new XSLTException( "could not locate DocBook stylesheet [" + type.getName() + "]", e );
+		}
+	}
+
+	public String toString() {
+		return super.toString() + " [" + formatType.getName() + "]";
+	}
+}

Added: branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/xslt/resolve/RelativeJarUriResolver.java
===================================================================
--- branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/xslt/resolve/RelativeJarUriResolver.java	                        (rev 0)
+++ branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/xslt/resolve/RelativeJarUriResolver.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,36 @@
+package org.jboss.maven.plugin.docbook.gen.xslt.resolve;
+
+import java.net.URL;
+import javax.xml.transform.URIResolver;
+import javax.xml.transform.Source;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.stream.StreamSource;
+
+/**
+ * Responsible for resolving relative references from jar base urls.
+ *
+ * @author Steve Ebersole
+ */
+public class RelativeJarUriResolver implements URIResolver {
+	public Source resolve(String href, String base) throws TransformerException {
+		// href need to be relative
+		if ( href.indexOf( "://" ) > 0 || href.startsWith( "/" ) ) {
+			return null;
+		}
+
+		// base would need to start with jar:
+		if ( null == base || (!base.startsWith( "jar:" )) ) {
+			return null;
+		}
+
+		String fullHref = base.substring( 4, base.lastIndexOf( '/' ) + 1 )
+				+ href;
+		try {
+			URL url = new URL( fullHref );
+			return new StreamSource( url.openStream(), url.toExternalForm() );
+		}
+		catch ( Throwable t ) {
+			return null;
+		}
+	}
+}

Added: branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/xslt/resolve/ResolverChain.java
===================================================================
--- branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/xslt/resolve/ResolverChain.java	                        (rev 0)
+++ branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/xslt/resolve/ResolverChain.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,56 @@
+package org.jboss.maven.plugin.docbook.gen.xslt.resolve;
+
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Iterator;
+import javax.xml.transform.URIResolver;
+import javax.xml.transform.Source;
+import javax.xml.transform.TransformerException;
+
+/**
+ * Allows chaining a series of {@link URIResolver resolvers} together.
+ * <p/>
+ * "Precedence" of the resolvers is determined by the order in which
+ * they are {@link #addResolver added}.
+ *
+ * @author Steve Ebersole
+ */
+public class ResolverChain implements URIResolver {
+	private List resolvers = new ArrayList();
+
+	public ResolverChain() {
+	}
+
+	public ResolverChain(URIResolver resolver) {
+		this();
+		addResolver( resolver );
+	}
+
+	/**
+	 * Adds a resolver to the chain.
+	 *
+	 * @param resolver The resolver to add.
+	 */
+	public void addResolver(URIResolver resolver) {
+		resolvers.add( resolver );
+	}
+
+	/**
+	 * Here we iterate over all the chained resolvers and delegate to them
+	 * until we find one which can handle the resolve request (if any).
+	 *
+	 * {@inheritDoc}
+	 */
+	public Source resolve(String href, String base) throws TransformerException {
+		Source result = null;
+		Iterator itr = resolvers.iterator();
+		while ( itr.hasNext() ) {
+			final URIResolver resolver = ( URIResolver ) itr.next();
+			result = resolver.resolve( href, base );
+			if ( result != null ) {
+				break;
+			}
+		}
+		return result;
+	}
+}

Added: branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/xslt/resolve/VersionResolver.java
===================================================================
--- branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/xslt/resolve/VersionResolver.java	                        (rev 0)
+++ branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/gen/xslt/resolve/VersionResolver.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,55 @@
+package org.jboss.maven.plugin.docbook.gen.xslt.resolve;
+
+import java.net.URL;
+import java.io.IOException;
+import javax.xml.transform.Source;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.URIResolver;
+import javax.xml.transform.stream.StreamSource;
+
+import org.jboss.maven.plugin.docbook.gen.util.ResourceHelper;
+
+/**
+ * {@inheritDoc}
+ *
+ * @author Steve Ebersole
+ */
+public class VersionResolver implements URIResolver {
+	public static final String BASE_HREF = "http://docbook.sourceforge.net/release/xsl/";
+
+	private final String version;
+	private final String versionHref;
+
+	public VersionResolver(String version) {
+		this.version = version;
+		this.versionHref = BASE_HREF + version;
+	}
+
+	public Source resolve(String href, String base) throws TransformerException {
+		if ( href.startsWith( versionHref ) ) {
+			return resolve( href );
+		}
+		else if ( null != base && base.startsWith( versionHref ) ) {
+			return resolve( base + "/" + href );
+		}
+		return null;
+	}
+
+	private Source resolve(String href) {
+		String resource = href.substring( versionHref.length() );
+		try {
+			URL resourceURL = ResourceHelper.requireResource( resource );
+			return new StreamSource( resourceURL.openStream(), resourceURL.toExternalForm() );
+		}
+		catch ( IllegalArgumentException e ) {
+			return null;
+		}
+		catch ( IOException e ) {
+			return null;
+		}
+	}
+
+	public String toString() {
+		return super.toString() + " [version=" + version + "]";
+	}
+}

Added: branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/revdiff/BaselineHandler.java
===================================================================
--- branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/revdiff/BaselineHandler.java	                        (rev 0)
+++ branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/revdiff/BaselineHandler.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,59 @@
+package org.jboss.maven.plugin.docbook.revdiff;
+
+import java.util.Map;
+
+import org.xml.sax.helpers.DefaultHandler;
+import org.xml.sax.Locator;
+import org.xml.sax.Attributes;
+import org.xml.sax.SAXException;
+
+/**
+ * An XML parse handler used to create a catalog of baseline elements.
+ * <p/>
+ * Typically this would be used against the master translation to create
+ * a baseline against which particular translations would be checked.
+ *
+ * @author Christian Bauer
+ * @author Steve Ebersole
+ */
+public class BaselineHandler extends DefaultHandler {
+	private final Map catalog;
+	private Locator docLocator;
+
+	public void setDocumentLocator(Locator locator) {
+		this.docLocator = locator;
+	}
+
+	public BaselineHandler(Map catalog) {
+		this.catalog = catalog;
+	}
+
+	public void startElement(
+			String namespaceURI,
+			String localName,
+			String qualifiedName,
+			Attributes atts) throws SAXException {
+
+		// Only add ModuleElements that have an identifier
+		String identifier = atts.getValue( "id" );
+		if ( identifier != null ) {
+			// The default revision is 0
+			int revision = 0;
+			if ( atts.getValue( "revision" ) != null ) {
+				revision = new Integer( atts.getValue( "revision" ) ).intValue();
+			}
+
+			// Generate new ContentItem and new original state
+			ContentItem contentItem = new ContentItem( identifier );
+			ContentItemDescriptor descriptor = new ContentItemDescriptor(
+					docLocator.getSystemId(),
+					qualifiedName,
+					revision,
+					docLocator.getLineNumber(),
+					docLocator.getColumnNumber()
+			);
+			contentItem.setMasterDescriptor( descriptor );
+			catalog.put( identifier, contentItem );
+		}
+	}
+}

Added: branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/revdiff/ContentItem.java
===================================================================
--- branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/revdiff/ContentItem.java	                        (rev 0)
+++ branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/revdiff/ContentItem.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,59 @@
+package org.jboss.maven.plugin.docbook.revdiff;
+
+/**
+ * Describes a particular piece of content, including descriptors
+ * from both the master and a particular translation
+ *
+ * @author Christian Bauer
+ */
+public class ContentItem {
+    private final String identifier;
+    private ContentItemDescriptor masterDescriptor;
+    private ContentItemDescriptor translationDescriptor;
+
+    public ContentItem(String identifier) {
+        this.identifier = identifier;
+    }
+
+    public String getIdentifier() {
+        return identifier;
+    }
+
+    public ContentItemDescriptor getMasterDescriptor() {
+        return masterDescriptor;
+    }
+
+    public void setMasterDescriptor(ContentItemDescriptor masterDescriptor) {
+        this.masterDescriptor = masterDescriptor;
+    }
+
+    public ContentItemDescriptor getTranslationDescriptor() {
+        return translationDescriptor;
+    }
+
+    public void setTranslationDescriptor(ContentItemDescriptor translationDescriptor) {
+        this.translationDescriptor = translationDescriptor;
+    }
+
+
+	public boolean equals(Object o) {
+		if ( this == o ) {
+			return true;
+		}
+		if ( o == null || getClass() != o.getClass() ) {
+			return false;
+		}
+
+		ContentItem that = ( ContentItem ) o;
+
+		if ( !identifier.equals( that.identifier ) ) {
+			return false;
+		}
+
+		return true;
+	}
+
+	public int hashCode() {
+		return identifier.hashCode();
+	}
+}

Added: branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/revdiff/ContentItemDescriptor.java
===================================================================
--- branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/revdiff/ContentItemDescriptor.java	                        (rev 0)
+++ branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/revdiff/ContentItemDescriptor.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,44 @@
+package org.jboss.maven.plugin.docbook.revdiff;
+
+/**
+ * {@inheritDoc}
+ *
+ * @author Christian Bauer
+ */
+public class ContentItemDescriptor {
+    public static int REVISION_IGNORE = -1;
+
+    private final String sourceSystemId;
+    private final String elementName;
+    private final int revision;
+    private final int row;
+    private final int column;
+
+	public ContentItemDescriptor(String sourceSystemId, String elementName, int revision, int row, int column) {
+		this.sourceSystemId = sourceSystemId;
+		this.elementName = elementName;
+		this.revision = revision;
+		this.row = row;
+		this.column = column;
+	}
+
+	public int getRevision() {
+        return revision;
+    }
+
+    public String getElementName() {
+        return elementName;
+    }
+
+    public String getSourceSystemId() {
+        return sourceSystemId;
+    }
+
+    public int getRow() {
+        return row;
+    }
+
+	public int getColumn() {
+		return column;
+	}
+}

Added: branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/revdiff/Diff.java
===================================================================
--- branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/revdiff/Diff.java	                        (rev 0)
+++ branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/revdiff/Diff.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,39 @@
+package org.jboss.maven.plugin.docbook.revdiff;
+
+import java.util.Set;
+import java.util.HashSet;
+import java.util.Iterator;
+
+/**
+ * Represents the difference between two sources.
+ *
+ * @author Steve Ebersole
+ */
+public class Diff {
+	private Set elementsOnlyInMaster = new HashSet();
+	private Set elementsOnlyInTranslation = new HashSet();
+	private Set elementsDiffRevision = new HashSet();
+
+	public void addOnlyInMaster(ContentItem element) {
+		elementsOnlyInMaster.add( element );
+	}
+
+	public void addOnlyInTranslation(ContentItem element) {
+		elementsOnlyInTranslation.add( element );
+	}
+
+	public void addDiffRevision(ContentItem element) {
+		elementsDiffRevision.add( element );
+	}
+
+	public Iterator getElementsOnlyInMaster() {
+		return elementsOnlyInMaster.iterator();
+	}
+
+	public Iterator getElementsOnlyInTranslation() {
+		return elementsOnlyInTranslation.iterator();
+	}
+	public Iterator getElementsDiffRevision() {
+		return elementsDiffRevision.iterator();
+	}
+}

Added: branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/revdiff/DiffCreator.java
===================================================================
--- branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/revdiff/DiffCreator.java	                        (rev 0)
+++ branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/revdiff/DiffCreator.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,100 @@
+package org.jboss.maven.plugin.docbook.revdiff;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParserFactory;
+
+import com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl;
+import org.xml.sax.SAXException;
+import org.xml.sax.SAXNotRecognizedException;
+import org.xml.sax.SAXNotSupportedException;
+import org.xml.sax.XMLReader;
+import org.apache.maven.plugin.logging.Log;
+
+/**
+ * Responsible for creating a diff description.
+ *
+ * @author Steve Ebersole
+ */
+public class DiffCreator {
+
+	private final XMLReader parser;
+	private final Log log;
+
+	public DiffCreator(boolean xincludeSupport, Log log) throws GenerationException {
+		this.parser = generateParser( xincludeSupport );
+		this.log = log;
+	}
+
+	public synchronized Diff findDiff(File master, File translation) throws GenerationException {
+		Map catalog = new HashMap();
+
+		// Parse master file
+		BaselineHandler baselineHandler = new BaselineHandler( catalog );
+		parser.setContentHandler( baselineHandler );
+		try {
+			parser.parse( master.getAbsolutePath() );
+		}
+		catch( IOException e ) {
+			throw new GenerationException( "unable to locate specified master [" + master.getAbsolutePath() + "]", e );
+		}
+		catch ( SAXException e ) {
+			throw new GenerationException( "error parsing master [" + master.getAbsolutePath() + "]", e );
+		}
+
+		log.debug( "encountered [" + catalog.size() + "] master content elements" );
+
+		Diff diff = new Diff();
+
+		// Parse translation
+		TranslationHandler translationHandler = new TranslationHandler( catalog, diff );
+		parser.setContentHandler( translationHandler );
+		try {
+			parser.parse( translation.getAbsolutePath() );
+		}
+		catch ( IOException e ) {
+			throw new GenerationException( "unable to locate specified translation [" + translation.getAbsolutePath() + "]", e );
+		}
+		catch ( SAXException e ) {
+			throw new GenerationException( "error parsing translation [" + translation.getAbsolutePath() + "]", e );
+		}
+
+		// as a final step, allow translation handler to finish up
+		translationHandler.finish();
+
+		return diff;
+	}
+
+	private XMLReader generateParser(boolean xincludeSupport) throws GenerationException {
+		try {
+			XMLReader parser = createParserFactory( xincludeSupport ).newSAXParser().getXMLReader();
+//			SAXParser parser = new SAXParser();
+			// Disable validation against DTD
+			parser.setFeature( "http://xml.org/sax/features/validation", false );
+			// Disable DTD loading in Xerces
+			parser.setFeature( "http://apache.org/xml/features/nonvalidating/load-external-dtd", false );
+			return parser;
+		}
+		catch ( SAXNotSupportedException e ) {
+			throw new GenerationException( "unable to generate SAX Parser", e );
+		}
+		catch ( SAXNotRecognizedException e ) {
+			throw new GenerationException( "unable to generate SAX Parser", e );
+		}
+		catch ( ParserConfigurationException e ) {
+			throw new GenerationException( "unable to generate SAX Parser", e );
+		}
+		catch ( SAXException e ) {
+			throw new GenerationException( "unable to generate SAX Parser", e );
+		}
+	}
+
+	private SAXParserFactory createParserFactory(boolean xincludeSupport) {
+        SAXParserFactory factory = new SAXParserFactoryImpl();
+        factory.setXIncludeAware( xincludeSupport );
+        return factory;
+    }
+}

Added: branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/revdiff/GenerationException.java
===================================================================
--- branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/revdiff/GenerationException.java	                        (rev 0)
+++ branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/revdiff/GenerationException.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,16 @@
+package org.jboss.maven.plugin.docbook.revdiff;
+
+/**
+ * Indicates problems generating the diff report
+ *
+ * @author Steve Ebersole
+ */
+public class GenerationException extends Exception {
+	public GenerationException(String message) {
+		super( message );
+	}
+
+	public GenerationException(String message, Throwable cause) {
+		super( message, cause );
+	}
+}

Added: branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/revdiff/IndexReportGenerator.java
===================================================================
--- branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/revdiff/IndexReportGenerator.java	                        (rev 0)
+++ branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/revdiff/IndexReportGenerator.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,70 @@
+package org.jboss.maven.plugin.docbook.revdiff;
+
+import java.util.Locale;
+import java.util.List;
+import java.util.Iterator;
+import java.util.ResourceBundle;
+
+import org.apache.maven.doxia.sink.Sink;
+import org.apache.maven.plugin.logging.Log;
+import org.apache.maven.reporting.MavenReportException;
+
+/**
+ * {@inheritDoc}
+ *
+ * @author Steve Ebersole
+ */
+public class IndexReportGenerator {
+	private final ResourceBundle bundle;
+	private final Sink sink;
+	private final Log log;
+
+	public static class TranslationReportDescriptor {
+		private final Locale translation;
+		private final String reportPath;
+
+		public TranslationReportDescriptor(Locale translation, String reportPath) {
+			this.translation = translation;
+			this.reportPath = reportPath;
+		}
+	}
+
+	public IndexReportGenerator(ResourceBundle bundle, Sink sink, Log log) {
+		this.bundle = bundle;
+		this.sink = sink;
+		this.log = log;
+	}
+
+	public void generate(List reportDescriptors) throws MavenReportException {
+		log.debug( "writing index report via provided sink" );
+		sink.head();
+		sink.text( bundle.getString( "report.name" ) );
+        sink.head_();
+
+        sink.body();
+		sink.sectionTitle1();
+        sink.anchor( bundle.getString( "report.header" ) );
+        sink.anchor_();
+        sink.text( bundle.getString( "report.header" ) );
+        sink.sectionTitle1_();
+
+		sink.table();
+		Iterator itr = reportDescriptors.iterator();
+		while ( itr.hasNext() ) {
+			final TranslationReportDescriptor descriptor = ( TranslationReportDescriptor ) itr.next();
+			sink.tableRow();
+			sink.tableCell();
+			sink.link( descriptor.reportPath );
+			sink.text( descriptor.translation.getDisplayName( Locale.ENGLISH ) + " (" + descriptor.translation.toString() + ")" );
+			sink.link_();
+			sink.tableCell_();
+			sink.tableRow_();
+		}
+		sink.table_();
+
+		sink.body_();
+        sink.flush();
+        sink.close();
+		log.debug( "index report sink flushed and closed" );
+	}
+}

Added: branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/revdiff/TranslationDiffReport.java
===================================================================
--- branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/revdiff/TranslationDiffReport.java	                        (rev 0)
+++ branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/revdiff/TranslationDiffReport.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,271 @@
+package org.jboss.maven.plugin.docbook.revdiff;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Locale;
+import java.util.ResourceBundle;
+
+import org.apache.maven.doxia.siterenderer.Renderer;
+import org.apache.maven.project.MavenProject;
+import org.apache.maven.reporting.AbstractMavenReport;
+import org.apache.maven.reporting.MavenReportException;
+import org.codehaus.plexus.util.DirectoryScanner;
+
+/**
+ * A plugin for generating a "translation diff" report across different
+ * translations of the same document.  This is useful for the translators to
+ * know what changes exist between their translation and the master.
+ *
+ * @goal diff
+ * 
+ * @author Christian Bauer
+ * @author Steve Ebersole
+ */
+public class TranslationDiffReport extends AbstractMavenReport {
+
+	public static final String NAME = "translation-diff-report";
+
+	/**
+	 * The directory containing the translated DocBook sources.
+	 *
+	 * @parameter expression="${basedir}/src/main/docbook/translations"
+     * @required
+	 */
+	private File translationsDirectory;
+
+	/**
+     * Directory where reports will go.
+     *
+     * @parameter expression="${project.reporting.outputDirectory}"
+     * @required
+     * @readonly
+     */
+    private File reportingDirectory;
+
+	/**
+	 * Which translation is considered the master.
+	 *
+	 * @parameter default-value="en"
+	 */
+	private String masterTranslation;
+
+	/**
+	 * (non master) translations to be included in the report.
+	 *
+	 * @parameter
+	 */
+	private String[] translationIncludes;
+
+	/**
+	 * Patternsets of sources (relative to translationsDirectory) to include
+	 * in reporting.
+	 *
+	 * @parameter
+	 */
+	private String[] sourceIncludes;
+
+    /**
+     * A boolean, indicating if XInclude should be supported.
+     *
+     * @parameter default-value="false"
+     */
+    private boolean xincludeSupported;
+
+	/**
+     * Whether to build an aggregated report at the root, or build individual reports.
+     *
+     * @parameter expression="${aggregate}" default-value="false"
+     */
+    protected boolean aggregate;
+
+	/**
+     * @parameter expression="${project}"
+     * @required
+     * @readonly
+     */
+    private MavenProject project;
+
+	private File reportOutputDirectory;
+
+	/**
+	 * @parameter expression="${component.org.apache.maven.doxia.siterenderer.Renderer}"
+     * @required
+     * @readonly
+     */
+    private Renderer siteRenderer;
+
+	protected Renderer getSiteRenderer() {
+		return siteRenderer;
+	}
+
+	protected MavenProject getProject() {
+		return project;
+	}
+
+	public String getCategoryName() {
+		return CATEGORY_PROJECT_REPORTS;
+	}
+
+	protected String getOutputDirectory() {
+		return getReportOutputDirectory().getAbsolutePath();
+	}
+
+	public String getOutputName() {
+		return "index";
+	}
+
+	public String getName(Locale locale) {
+		return getBundle( locale ).getString( "report.name" );
+	}
+
+	public String getDescription(Locale locale) {
+		return getBundle( locale ).getString( "report.description" );
+	}
+
+	private ResourceBundle getBundle(Locale locale) {
+		return ResourceBundle.getBundle( NAME, locale, this.getClass().getClassLoader() );
+	}
+
+	public void setReportOutputDirectory(File dir) {
+		if ( NAME.equals( dir.getName() ) ) {
+			this.reportOutputDirectory = dir;
+		}
+		else {
+			this.reportOutputDirectory = new File( dir, NAME );
+		}
+	}
+
+	public File getReportOutputDirectory() {
+		if ( reportOutputDirectory == null ) {
+			reportOutputDirectory = new File( reportingDirectory, NAME );
+		}
+		return reportOutputDirectory;
+	}
+
+	public boolean isExternalReport() {
+		return false;
+	}
+
+	public boolean canGenerateReport() {
+		return true;
+	}
+
+	protected void executeReport(Locale locale) throws MavenReportException {
+		getLog().debug( "starting docbook:diff goal execution [masterTranslation=" + masterTranslation + "]" );
+
+		if ( ! translationsDirectory.exists() ) {
+			getLog().debug( "translations directory [" + translationsDirectory.getAbsolutePath() + "] did not exist" );
+			return;
+		}
+
+		File masterTranslationDirectory = new File( translationsDirectory, masterTranslation );
+		if ( ! masterTranslationDirectory.exists() ) {
+			getLog().info( "master translation directory [" + masterTranslationDirectory.getAbsolutePath() + "] did not exist" );
+			return;
+		}
+
+		if ( translationIncludes == null || translationIncludes.length == 0 ) {
+			// use all translations...
+			ArrayList includes = new ArrayList();
+			File[] subdirs = translationsDirectory.listFiles();
+			for ( int i = 0; i < subdirs.length; i++ ) {
+				includes.add( subdirs[i].getName() );
+			}
+			translationIncludes = ( String[] ) includes.toArray( new String[ includes.size() ] );
+		}
+
+		if ( sourceIncludes == null || sourceIncludes.length == 0 ) {
+			sourceIncludes = new String[] { "*.xml" };
+		}
+
+		List reports = new ArrayList();
+		for ( int i = 0; i < translationIncludes.length; i++ ) {
+			if ( masterTranslation.equals( translationIncludes[i] ) ) {
+				continue;
+			}
+			final File translationDirectory = new File( translationsDirectory, translationIncludes[i] );
+			if ( ! translationDirectory.exists() ) {
+				getLog().info( "translation directory [" + translationDirectory.getAbsolutePath() + "] did not exist" );
+				continue;
+			}
+
+			if ( generateTranslationReport( masterTranslationDirectory, translationDirectory, translationIncludes[i] ) ) {
+				reports.add(
+						new IndexReportGenerator.TranslationReportDescriptor(
+								new Locale( translationIncludes[i] ),
+								NAME + "/" + buildTranslationReportName( translationIncludes[i] )
+						)
+				);
+			}
+		}
+
+		new IndexReportGenerator( getBundle( locale ), getSink(), getLog() ).generate( reports );
+	}
+
+	private void prepReportFile(File reportFile) throws MavenReportException {
+		if ( reportFile.exists() ) {
+			reportFile.delete();
+		}
+		if ( !reportFile.exists() ) {
+			try {
+				reportFile.createNewFile();
+			}
+			catch ( IOException e ) {
+				throw new MavenReportException( "unable to prep report file [" + reportFile.getAbsolutePath() + "]" );
+			}
+		}
+	}
+
+	private String buildTranslationReportName(String translationName) {
+		return "report-" + translationName + ".html";
+	}
+
+	private boolean generateTranslationReport(
+			File masterTranslationDirectory,
+			File translationDirectory,
+			String translationName) throws MavenReportException {
+		getLog().debug( "starting docbook:diff processing [translation=" + translationName + "]" );
+
+		DirectoryScanner scanner = new DirectoryScanner();
+		scanner.setBasedir( masterTranslationDirectory );
+		scanner.setIncludes( sourceIncludes );
+		scanner.scan();
+		String[] masterSources = scanner.getIncludedFiles();
+
+		scanner = new DirectoryScanner();
+		scanner.setBasedir( translationDirectory );
+		scanner.setIncludes( sourceIncludes );
+		scanner.scan();
+		String[] translationSources = scanner.getIncludedFiles();
+
+		if ( ! Arrays.equals( masterSources, translationSources ) ) {
+			getLog().warn( "includes returned different master and translation sets" );
+			return false;
+		}
+
+		Locale locale = new Locale( translationName );
+		File output = new File( getReportOutputDirectory(), buildTranslationReportName( translationName ) );
+		prepReportFile( output );
+
+		try {
+			DiffCreator diffCreator = new DiffCreator( xincludeSupported, getLog() );
+			TranslationReportGenerator generator = new TranslationReportGenerator( translationsDirectory, getBundle( locale ), getLog() );
+
+			for ( int i = 0; i < masterSources.length; i++ ) {
+				getLog().debug( "processing source [" + masterSources[i] + "]" );
+				final File master = new File( masterTranslationDirectory, masterSources[i] );
+				final File translation = new File( translationDirectory, translationSources[i] );
+				final Diff diff = diffCreator.findDiff( master, translation );
+				generator.generate( diff, output, locale.toString() );
+			}
+		}
+		catch ( GenerationException e ) {
+			throw new MavenReportException( "unable to generate report", e );
+		}
+		return true;
+	}
+
+}

Added: branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/revdiff/TranslationHandler.java
===================================================================
--- branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/revdiff/TranslationHandler.java	                        (rev 0)
+++ branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/revdiff/TranslationHandler.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,91 @@
+package org.jboss.maven.plugin.docbook.revdiff;
+
+import java.util.Map;
+import java.util.Iterator;
+
+import org.xml.sax.helpers.DefaultHandler;
+import org.xml.sax.Locator;
+import org.xml.sax.Attributes;
+import org.xml.sax.SAXException;
+
+/**
+ * Handles actually discerning diffs between the translations based on the
+ * revision numbers of the content elements.
+ *
+ * @author Christian Bauer
+ * @author Steve Ebersole
+ */
+public class TranslationHandler extends DefaultHandler {
+	private final Map catalog;
+	private final Diff diff;
+	private Locator docLocator;
+
+	public TranslationHandler(Map catalog, Diff diff) {
+		this.catalog = catalog;
+		this.diff = diff;
+	}
+
+	public void setDocumentLocator(Locator locator) {
+		this.docLocator = locator;
+	}
+
+	public void startElement(
+			String namespaceURI,
+			String localName,
+			String qualifiedName,
+			Attributes atts) throws SAXException {
+
+		String identifier = atts.getValue( "id" );
+		if ( identifier != null ) {
+			int revision = 0;
+			if ( atts.getValue( "revision" ) != null ) {
+				revision = new Integer( atts.getValue( "revision" ) ).intValue();
+			}
+
+			ContentItemDescriptor translationState = new ContentItemDescriptor(
+					docLocator.getSystemId(),
+					qualifiedName,
+					revision,
+					docLocator.getLineNumber(),
+					docLocator.getColumnNumber()
+			);
+
+			// Locate the corresponding ContentItem from the master
+			//
+			// NOTE: we use remove to keep track of the fact that the transation
+			// has used that element; that way, afterwards, we know all the
+			// "unused" ones which would indicate elements recently added to
+			// the master...
+			ContentItem contentItem = ( ContentItem ) catalog.remove( identifier );
+			if ( contentItem == null ) {
+				// we have encountered an element in the translation which
+				// is not present in the master.  This *should indicate that we
+				// have a section that was removed from the master, but not yet
+				// removed from the translation...
+				if ( revision != ContentItemDescriptor.REVISION_IGNORE ) {
+					contentItem = new ContentItem( identifier );
+					contentItem.setTranslationDescriptor( translationState );
+					diff.addOnlyInTranslation( contentItem );
+				}
+			}
+			else {
+				// the element is present in both; check the revisions
+				if ( revision != contentItem.getMasterDescriptor().getRevision() && revision != ContentItemDescriptor.REVISION_IGNORE ) {
+					contentItem.setTranslationDescriptor( translationState );
+					diff.addDiffRevision( contentItem );
+				}
+			}
+		}
+	}
+
+	public void finish() {
+		// anything left in the catalog at this point is stuff that is present
+		// in the master but absent from the translation...
+		Iterator itr = catalog.entrySet().iterator();
+		while ( itr.hasNext() ) {
+			final ContentItem contentItem = ( ContentItem ) ( ( Map.Entry ) itr.next() ).getValue();
+			itr.remove();
+			diff.addOnlyInMaster( contentItem );
+		}
+	}
+}

Added: branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/revdiff/TranslationReportGenerator.java
===================================================================
--- branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/revdiff/TranslationReportGenerator.java	                        (rev 0)
+++ branches/refactor1/docs/maven-docbook-plugin/src/main/java/org/jboss/maven/plugin/docbook/revdiff/TranslationReportGenerator.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,187 @@
+package org.jboss.maven.plugin.docbook.revdiff;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.util.Iterator;
+import java.util.ResourceBundle;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.apache.maven.plugin.logging.Log;
+import org.codehaus.plexus.util.FileUtils;
+
+/**
+ * Generate a diff report.
+ *
+ * @author Christian Bauer
+ * @author Steve Ebersole
+ */
+public class TranslationReportGenerator {
+	// todo : use templating...
+	private final String base;
+	private final ResourceBundle bundle;
+	private final Log log;
+
+	public TranslationReportGenerator(File basedir, ResourceBundle bundle, Log log) {
+		try {
+			this.base = basedir.toURL().toExternalForm();
+		}
+		catch ( MalformedURLException e ) {
+			throw new IllegalArgumentException( "basedir was a malformed url" );
+		}
+		log.debug( "constructing docbook diff report generator [base=" + base + "]" );
+		this.bundle = bundle;
+		this.log = log;
+	}
+
+	public void generate(Diff diff, File output, String translation) throws GenerationException {
+		if ( output.exists() ) {
+			log.debug( "cleaning up previous translation-diff report output [" + output.getAbsolutePath() + "]" );
+			output.delete();
+		}
+
+		File outputDirectory = output.getParentFile();
+		if ( !outputDirectory.exists() ) {
+			String outputDirectoryPath = outputDirectory.getAbsolutePath();
+			log.debug( "creating translation-diff report directory [" + outputDirectoryPath + "]" );
+			FileUtils.mkdir( outputDirectoryPath );
+		}
+
+		try {
+			output.createNewFile();
+		}
+		catch ( IOException e ) {
+			throw new GenerationException( "unable to create output file [" + output.getAbsolutePath() + "]", e );
+		}
+
+		try {
+			FileWriter writer = new FileWriter( output );
+			writer.write( pageHead( translation ) );
+
+			writer.write( "<table cellpadding=4>" );
+
+			writer.write( generateNewInMaster( diff ) );
+			writer.write( "<tr><td>&nbsp;</td></tr>" );
+			writer.write( generateDiffRevision( diff ) );
+			writer.write( "<tr><td>&nbsp;</td></tr>" );
+			writer.write( generateNewInTranslation( diff ) );
+
+			writer.write( "</table>" );
+			writer.write( pageFoot() );
+			writer.close();
+		}
+		catch ( IOException e ) {
+			throw new GenerationException( "error writing report [" + output.getAbsolutePath() + "]", e );
+		}
+	}
+
+	private String pageHead(String translation) {
+		StringBuffer buf = new StringBuffer( 256 );
+		buf.append( "<html><head><title>" ).append( bundle.getString( "report.name" ) ).append( "</title></head><body><div align=\"center\">" );
+		buf.append( "<h3>" ).append( bundle.getString( "report.header") ).append( " - " ).append( translation ).append( "</h3>" );
+		return buf.toString();
+	}
+
+	private String pageFoot() {
+		StringBuffer buf = new StringBuffer( 256 );
+		buf.append( "</div></body></html>" );
+		return buf.toString();
+	}
+
+	private String generateNewInMaster(Diff diff) {
+		StringBuffer buf = new StringBuffer();
+		Iterator itr = diff.getElementsOnlyInMaster();
+		while ( itr.hasNext() ) {
+			final ContentItem contentItem = ( ContentItem ) itr.next();
+			buf.append( "<tr><td bgcolor=#eeeeee>ID: " ).append( contentItem.getIdentifier() ).append( "</td></tr>" );
+			buf.append( "<tr><td>" );
+			buf.append( "<b>" ).append( formatReference( contentItem.getMasterDescriptor() ) ).append( "</b>" );
+			buf.append( "</td></tr>" );
+		}
+
+		String result = "";
+		if ( buf.length() > 0 ) {
+			result = "<tr bgcolor=#cccccc><td><b>New in master:</b></td></tr>";
+		}
+		return result + buf.toString();
+	}
+
+	private String generateDiffRevision(Diff diff) {
+		StringBuffer buf = new StringBuffer();
+		Iterator itr = diff.getElementsDiffRevision();
+		while ( itr.hasNext() ) {
+			final ContentItem contentItem = ( ContentItem ) itr.next();
+			buf.append( "<tr><td bgcolor=#eeeeee>ID: " ).append( contentItem.getIdentifier() ).append( "</td></tr>" );
+			if ( !contentItem.getMasterDescriptor().getElementName().equals( contentItem.getTranslationDescriptor().getElementName() ) ) {
+				buf.append( "<tr><td bgcolor=#ee6666>" );
+				buf.append( "Element names differ: " )
+						.append( contentItem.getMasterDescriptor().getElementName() )
+						.append( "/" )
+						.append( contentItem.getTranslationDescriptor().getElementName() );
+				buf.append( "</td></tr>" );
+			}
+			buf.append( "<tr><td>" );
+			buf.append( "Master: <b>" ).append( formatReference( contentItem.getMasterDescriptor() ) ).append( "</b>" );
+			buf.append( "</td></tr>" );
+			buf.append( "<tr><td>" );
+			buf.append( "Translation: <b>" ).append( formatReference( contentItem.getTranslationDescriptor() ) ).append( "</b>" );
+			buf.append( "</td></tr>" );
+			buf.append( "<tr><td>" );
+			buf.append( "Master Revision: " ).append( contentItem.getMasterDescriptor().getRevision() );
+			buf.append( "</td></tr>" );
+			buf.append( "<tr><td>" );
+			buf.append( "Translation Revision: " ).append( contentItem.getTranslationDescriptor().getRevision() );
+			buf.append( "</td></tr>" );
+		}
+
+		String result = "";
+		if ( buf.length() > 0 ) {
+			result = "<tr bgcolor=#cccccc><td><b>Translation needs update:</b></td></tr>";
+		}
+		return result + buf.toString();
+	}
+
+	private String generateNewInTranslation(Diff diff) {
+		StringBuffer buf = new StringBuffer();
+		Iterator itr = diff.getElementsOnlyInTranslation();
+		while ( itr.hasNext() ) {
+			final ContentItem contentItem = ( ContentItem ) itr.next();
+			buf.append( "<tr><td bgcolor=#eeeeee>ID: " ).append( contentItem.getIdentifier() ).append( "</td></tr>" );
+			buf.append( "<tr><td>" );
+			buf.append( "<b>" ).append( formatReference( contentItem.getTranslationDescriptor() ) ).append( "</b>" );
+			buf.append( "</td></tr>" );
+		}
+		String result = "";
+		if ( buf.length() > 0 ) {
+			result = "<tr bgcolor=#cccccc><td><b>Only present in translation:</b></td></tr>";
+		}
+		return result + buf.toString();
+	}
+
+	private String formatReference(ContentItemDescriptor descriptor) {
+		return makeSystemIdRelative( descriptor.getSourceSystemId() ) +
+				":" + descriptor.getElementName() +
+				" (" + descriptor.getRow() + "," + descriptor.getColumn() + ")";
+	}
+
+	private String makeSystemIdRelative(String systemId) {
+		String systemIdUrl = toURL( systemId ).toExternalForm();
+		log.debug( "checking source [" + systemIdUrl + "] against base [" + base + "]" );
+		if ( systemIdUrl.startsWith( base ) ) {
+			return systemIdUrl.substring( base.length() );
+		}
+		else {
+			return systemIdUrl;
+		}
+	}
+
+	private URL toURL(String systemId) {
+		try {
+			return new URL( systemId );
+		}
+		catch ( MalformedURLException e ) {
+			throw new UnsupportedOperationException( "unable to parse systemId [" + systemId + "] as URL" );
+		}
+	}
+}

Added: branches/refactor1/docs/maven-docbook-plugin/src/main/resources/META-INF/plexus/components.xml
===================================================================
--- branches/refactor1/docs/maven-docbook-plugin/src/main/resources/META-INF/plexus/components.xml	                        (rev 0)
+++ branches/refactor1/docs/maven-docbook-plugin/src/main/resources/META-INF/plexus/components.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,31 @@
+<component-set>
+
+    <components>
+
+        <component>
+            <role>org.apache.maven.reporting.MavenReport</role>
+            <role-hint>diff</role-hint>
+            <implementation>org.jboss.maven.plugin.docbook.revdiff.TranslationDiffReport</implementation>
+            <instantiation-strategy>per-lookup</instantiation-strategy>
+        </component>
+
+        <component>
+            <role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role>
+            <role-hint>docbook</role-hint>
+            <implementation>org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping</implementation>
+            <configuration>
+                <phases>
+                    <process-resources>org.jboss.maven.plugins:maven-jboss-docbook-plugin:resources</process-resources>
+                    <compile>org.jboss.maven.plugins:maven-jboss-docbook-plugin:generate</compile>
+                    <!--
+                    <package>org.codehaus.plexus:plexus-maven-plugin:app</package>
+                    -->
+                    <install>org.apache.maven.plugins:maven-install-plugin:install</install>
+                    <deploy>org.apache.maven.plugins:maven-deploy-plugin:deploy</deploy>
+                </phases>
+            </configuration>
+        </component>
+
+    </components>
+
+</component-set>
\ No newline at end of file

Added: branches/refactor1/docs/maven-docbook-plugin/src/main/resources/translation-diff-report.properties
===================================================================
--- branches/refactor1/docs/maven-docbook-plugin/src/main/resources/translation-diff-report.properties	                        (rev 0)
+++ branches/refactor1/docs/maven-docbook-plugin/src/main/resources/translation-diff-report.properties	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,3 @@
+report.name=Translation Diff Report
+report.description=Calculates differences between translation and master
+report.header=Translation Diff Report

Added: branches/refactor1/docs/xslt/pom.xml
===================================================================
--- branches/refactor1/docs/xslt/pom.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/pom.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<parent>
+		<artifactId>docs</artifactId>
+		<groupId>org.ajax4jsf</groupId>
+		<version>1.1.2-SNAPSHOT</version>
+	</parent>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.ajax4jsf.docs</groupId>
+  <artifactId>xslt</artifactId>
+  <description>Docbook documentation stylesheets</description>
+</project>
+

Added: branches/refactor1/docs/xslt/src/main/resources/en/f.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/en/f.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/en/f.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+               xmlns:javaee="http://java.sun.com/JSP/TagLibraryDescriptor"
+               version="1.0" exclude-result-prefixes="javaee">
+    <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
+     <xsl:param name="lang" />
+     <xsl:param name="title" />
+    
+    <xsl:template match="javaee:taglib | taglib">
+        <xsl:variable name="excluded-tag-names">header2,header3,header4,header5,header6</xsl:variable>
+        
+       <xsl:for-each select="javaee:tag | tag">
+	   
+	   <!--xsl:value-of select="./name/text()" /-->
+
+		   <xsl:if test="not(contains($excluded-tag-names, javaee:name))">
+				<xsl:call-template name="tag" />
+		   </xsl:if>
+		   <xsl:if test="not(contains($excluded-tag-names, ./name/text()))">
+				<xsl:call-template name="tag" />
+		   </xsl:if>
+       </xsl:for-each>
+    </xsl:template>
+
+	<xsl:template name="tag">
+        <section role="NotInToc">
+            <xsl:variable name="tag_name">
+				<xsl:choose>
+					<xsl:when test="javaee:name">
+						<xsl:value-of select="javaee:name" />
+					</xsl:when>
+					<xsl:otherwise>
+						<xsl:value-of select="./name/text()" />
+					</xsl:otherwise>
+				</xsl:choose>
+			</xsl:variable>
+			<xsl:variable name="prefix">
+				<xsl:choose>
+					<xsl:when test="/javaee:taglib/javaee:short-name">
+						<xsl:value-of select="/javaee:taglib/javaee:short-name" />
+					</xsl:when>
+					<xsl:otherwise>
+						<xsl:value-of select="/taglib/short-name/text()" />
+					</xsl:otherwise>
+				</xsl:choose>
+			</xsl:variable>
+			
+        	<xsl:attribute name="id"><xsl:value-of select="$tag_name"/></xsl:attribute>
+            <title>&lt;<xsl:value-of select="concat($prefix,':', $tag_name)" />&gt;</title>
+			<xsl:for-each select="document(concat($lang, '/included/',$tag_name, '.desc.xml'))/*">
+                <xsl:copy-of select="./*"/>
+            </xsl:for-each>
+            <table>
+                <title><xsl:value-of select="$prefix"/>:<xsl:value-of select="javaee:name"/><xsl:value-of select="name"/> attributes</title>
+                <tgroup cols="2">
+                    <thead>
+                        <row>
+                            <entry>Attribute Name</entry>
+                            <entry>Description</entry>
+                        </row>
+                    </thead>                
+                <tbody>
+                    <xsl:for-each select="javaee:attribute | attribute">
+                        <row>
+                        <entry>
+                            <xsl:value-of select="javaee:name"/>
+			   <xsl:value-of select="name"/>
+		            	</entry>
+                        <entry>
+                            <xsl:value-of select="javaee:description" disable-output-escaping="yes"/>
+                            <xsl:value-of select="description" disable-output-escaping="yes"/>
+			            </entry>
+                    </row>
+                    </xsl:for-each>
+                </tbody>
+                </tgroup>
+            </table>
+ 			<xsl:for-each select="document(concat($lang,'/included/',$tag_name, '.xml'))/*">
+                <xsl:copy-of select="./*"/>
+            </xsl:for-each>
+        </section>
+	</xsl:template>
+</xsl:transform>
\ No newline at end of file

Added: branches/refactor1/docs/xslt/src/main/resources/en/fopdf.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/en/fopdf.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/en/fopdf.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,543 @@
+<?xml version="1.0"?>
+
+<!--
+    This was originally the XSL FO configuration file for the Hibernate
+    Reference Documentation. It defines a custom titlepage and
+    the parameters for the A4 sized PDF printable output.  It is released 
+    under the LGPL. 
+
+    Modifications were made to better suit the needs of the JBoss documentation.
+-->
+
+<!DOCTYPE xsl:stylesheet [
+    <!ENTITY db_xsl_path "../support/docbook-xsl">
+]>
+
+<xsl:stylesheet version="1.0" xmlns="http://www.w3.org/TR/xhtml1/transitional"
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:fo="http://www.w3.org/1999/XSL/Format" exclude-result-prefixes="#default">
+    
+    
+    <!-- import the main docbook.xsl before we apply our overrides -->
+    <xsl:import href="&db_xsl_path;/fo/docbook.xsl"/>
+    
+   
+    <!-- ########## XRef -->
+    <!-- this controls whether xrefs have the title in it.  We 
+         don't want that -->
+    <xsl:param name="xref.with.number.and.title" select="0"/>
+    
+    <xsl:template match="processing-instruction('lb')">
+        <fo:block>
+            <xsl:text> </xsl:text>
+        </fo:block>
+    </xsl:template>    
+    
+    <!--########## Custom Title Page -->
+    <xsl:template name="book.titlepage.recto">
+        <fo:block>
+            <fo:table table-layout="fixed" width="175mm">
+                <fo:table-column column-width="175mm"/>
+                <fo:table-body>
+                    <fo:table-row>
+                        <fo:table-cell text-align="center">
+                            <xsl:if test="bookinfo/mediaobject">
+                                <fo:block>
+                                    <fo:external-graphic>
+                                        <xsl:attribute name="src">
+                                            FILE:<xsl:value-of
+                          select="bookinfo/mediaobject/imageobject/imagedata/@fileref" />
+                                        </xsl:attribute>    
+                                    </fo:external-graphic>
+                                </fo:block>
+                            </xsl:if>
+                            <xsl:if test="bookinfo/title">
+                                <fo:block font-family="Helvetica" font-size="22pt" padding-before="10mm">
+                                    <xsl:value-of select="bookinfo/title"/>
+                                </fo:block>
+                            </xsl:if>
+                            <xsl:if test="bookinfo/subtitle">
+                                <fo:block font-family="Helvetica" font-size="18pt" padding-before="10mm">
+                                    <xsl:value-of select="bookinfo/subtitle"/>
+                                </fo:block>
+                            </xsl:if>
+                            <xsl:if test="bookinfo/releaseinfo">
+                                <fo:block font-family="Helvetica" font-size="12pt"
+                                    padding="10mm"><xsl:value-of select="bookinfo/releaseinfo"/>
+                                </fo:block>
+                            </xsl:if>
+                            <xsl:if test="bookinfo/copyright">
+                                <fo:block font-family="Helvetica" font-size="12pt"
+                                    padding="10mm">                                    
+                                  
+                                    <xsl:apply-templates select="bookinfo/copyright"
+                                                         mode="titlepage.mode"/>
+                                </fo:block>
+                            </xsl:if>
+                        </fo:table-cell>
+                    </fo:table-row>
+                </fo:table-body>
+            </fo:table>
+        </fo:block>
+    </xsl:template>
+    
+    <!-- Prevent blank pages in output -->
+    <xsl:template name="book.titlepage.before.verso"/>
+    <xsl:template name="book.titlepage.verso"/>
+    <xsl:template name="book.titlepage.separator"/>
+    
+    
+    <!--###################################################
+                          Header
+        ################################################### -->
+    <!-- More space in the center header for long text -->
+    <xsl:attribute-set name="header.content.properties">
+        <xsl:attribute name="font-family">
+            <xsl:value-of select="$body.font.family"/>
+        </xsl:attribute>
+        <xsl:attribute name="margin-left">-5em</xsl:attribute>
+        <xsl:attribute name="margin-right">-5em</xsl:attribute>
+    </xsl:attribute-set>
+    
+    
+    <!--###################################################
+                          Custom Footer
+        ################################################### -->
+    <!-- This footer prints the Hibernate version number on the left side -->
+    <xsl:template name="footer.content">
+        <xsl:param name="pageclass" select="''"/>
+        <xsl:param name="sequence" select="''"/>
+        <xsl:param name="position" select="''"/>
+        <xsl:param name="gentext-key" select="''"/>
+        <xsl:variable name="Version">
+            <xsl:choose>
+                <xsl:when test="//releaseinfo">
+                    <xsl:text>JBoss </xsl:text>
+                    <xsl:value-of select="//releaseinfo"/>
+                </xsl:when>
+                <xsl:otherwise>
+                    <!-- nop -->
+                </xsl:otherwise>
+            </xsl:choose>
+        </xsl:variable>
+        <xsl:choose>
+            <xsl:when test="$sequence='blank'">
+                <xsl:choose>
+                    <xsl:when test="$double.sided != 0 and $position = 'left'">
+                        <xsl:value-of select="$Version"/>
+                    </xsl:when>
+                    <xsl:when test="$double.sided = 0 and $position = 'center'">
+                        <!-- nop -->
+                    </xsl:when>
+                    <xsl:otherwise>
+                        <fo:page-number/>
+                    </xsl:otherwise>
+                </xsl:choose>
+            </xsl:when>
+            <xsl:when test="$pageclass='titlepage'">
+                <!-- nop: other titlepage sequences have no footer -->
+            </xsl:when>
+            <xsl:when test="$double.sided != 0 and $sequence = 'even' and $position='left'">
+                <fo:page-number/>
+            </xsl:when>
+            <xsl:when test="$double.sided != 0 and $sequence = 'odd' and $position='right'">
+                <fo:page-number/>
+            </xsl:when>
+            <xsl:when test="$double.sided = 0 and $position='right'">
+                <fo:page-number/>
+            </xsl:when>
+            <xsl:when test="$double.sided != 0 and $sequence = 'odd' and $position='left'">
+                <xsl:value-of select="$Version"/>
+            </xsl:when>
+            <xsl:when test="$double.sided != 0 and $sequence = 'even' and $position='right'">
+                <xsl:value-of select="$Version"/>
+            </xsl:when>
+            <xsl:when test="$double.sided = 0 and $position='left'">
+                <xsl:value-of select="$Version"/>
+            </xsl:when>
+            <xsl:otherwise>
+                <!-- nop -->
+            </xsl:otherwise>
+        </xsl:choose>
+    </xsl:template>
+    
+    
+    
+    <!--###################################################
+                       Custom Toc Line
+        ################################################### -->
+    <!-- Improve the TOC. -->
+    <xsl:template name="toc.trt">
+        <xsl:variable name="id">
+            <xsl:call-template name="object.id"/>
+        </xsl:variable>
+        <xsl:variable name="label">
+            <xsl:apply-templates select="." mode="label.markup"/>
+        </xsl:variable>
+        <fo:block text-align-last="justify" end-indent="{$toc.indent.width}pt" last-line-end-indent="-{$toc.indent.width}pt">
+            <fo:inline keep-with-next.within-line="always">
+                <fo:basic-link internal-destination="{$id}">
+                    <!-- Chapter titles should be bold. -->
+                    <xsl:choose>
+                        <xsl:when test="local-name(.) = 'chapter'">
+                            <xsl:attribute name="font-weight">bold</xsl:attribute>
+                        </xsl:when>
+                    </xsl:choose>
+                    <xsl:if test="$label != ''">
+                        <xsl:copy-of select="$label"/>
+                        <xsl:value-of select="$autotoc.label.separator"/>
+                    </xsl:if>
+                    <xsl:apply-templates select="." mode="titleabbrev.markup"/>
+                </fo:basic-link>
+            </fo:inline>
+            <fo:inline keep-together.within-line="always">
+                <xsl:text/>
+                <fo:leader leader-pattern="dots" leader-pattern-width="3pt"
+                    leader-alignment="reference-area" keep-with-next.within-line="always"/>
+                <xsl:text/>
+                <fo:basic-link internal-destination="{$id}">
+                    <fo:page-number-citation ref-id="{$id}"/>
+                </fo:basic-link>
+            </fo:inline>
+        </fo:block>
+    </xsl:template>
+    
+    
+    <!--###################################################
+                          Extensions
+        ################################################### -->
+    <!-- These extensions are required for table printing and other stuff -->
+    <xsl:param name="use.extensions">1</xsl:param>
+
+    <xsl:param name="linenumbering.extension">1</xsl:param>
+    <xsl:param name="linenumbering.everyNth">1</xsl:param>
+    <xsl:param name="linenumbering.separator">: </xsl:param>
+
+    <xsl:param name="tablecolumns.extension">0</xsl:param>
+    <!-- FOP provide only PDF Bookmarks at the moment -->
+    <xsl:param name="fop.extensions">1</xsl:param>
+    
+    
+    
+    <!--###################################################
+                          Table Of Contents
+        ################################################### -->
+    <!-- Generate the TOCs for named components only -->
+    <xsl:param name="generate.toc"> book toc,title</xsl:param>
+    <!-- ,figure,table,equation -->
+    <!-- Show only Sections up to level 3 in the TOCs -->
+    <xsl:param name="toc.section.depth">3</xsl:param>
+    <!-- Dot and Whitespace as separator in TOC between Label and Title-->
+    <xsl:param name="autotoc.label.separator" select="'.  '"/>
+    
+    
+    <!--###################################################
+                       Paper & Page Size
+        ################################################### -->
+    <!-- Paper type, no headers on blank pages, no double sided printing -->
+<!--     <xsl:param name="paper.type" select="'A4'"/>-->
+    <xsl:param name="double.sided">0</xsl:param>
+    <xsl:param name="headers.on.blank.pages">0</xsl:param>
+    <xsl:param name="footers.on.blank.pages">0</xsl:param>
+    <!-- Space between paper border and content (chaotic stuff, don't touch) -->
+    <xsl:param name="page.margin.top">5mm</xsl:param>
+    <xsl:param name="region.before.extent">10mm</xsl:param>
+    <xsl:param name="body.margin.top">10mm</xsl:param>
+    <xsl:param name="body.margin.bottom">15mm</xsl:param>
+    <xsl:param name="region.after.extent">10mm</xsl:param>
+    <xsl:param name="page.margin.bottom">0mm</xsl:param>
+    <xsl:param name="page.margin.outer">18mm</xsl:param>
+    <xsl:param name="page.margin.inner">18mm</xsl:param>
+    <!-- No intendation of Titles -->
+    <xsl:param name="title.margin.left">0pc</xsl:param>
+    
+    
+    <!--###################################################
+                       Fonts & Styles
+        ################################################### -->
+    <!-- Default Font size -->
+    <xsl:param name="body.font.master">11</xsl:param>
+    <!-- Line height in body text -->
+    <xsl:param name="line-height">1.4</xsl:param>
+    <!-- Monospaced fonts are smaller than regular text -->
+    <xsl:attribute-set name="monospace.properties">
+        <xsl:attribute name="font-family">
+            <xsl:value-of select="$monospace.font.family"/>
+        </xsl:attribute>
+        <xsl:attribute name="font-size">0.8em</xsl:attribute>
+    </xsl:attribute-set>
+    
+    
+    <!--###################################################
+                       Tables
+        ################################################### -->
+    <!-- The table width should be adapted to the paper size -->
+    <xsl:param name="default.table.width">17.4cm</xsl:param>
+    <!-- Some padding inside tables -->
+    <xsl:attribute-set name="table.cell.padding">
+        <xsl:attribute name="padding-left">4pt</xsl:attribute>
+        <xsl:attribute name="padding-right">4pt</xsl:attribute>
+        <xsl:attribute name="padding-top">4pt</xsl:attribute>
+        <xsl:attribute name="padding-bottom">4pt</xsl:attribute>
+    </xsl:attribute-set>
+    <!-- Only hairlines as frame and cell borders in tables -->
+    <xsl:param name="table.frame.border.thickness">0.1pt</xsl:param>
+    <xsl:param name="table.cell.border.thickness">0.1pt</xsl:param>
+    
+    
+    
+    <!--###################################################
+                             Labels
+        ################################################### -->
+    <!-- Label Chapters and Sections (numbering) -->
+    <xsl:param name="chapter.autolabel">1</xsl:param> 
+    <xsl:param name="section.autolabel" select="1"/>
+    <xsl:param name="section.label.includes.component.label" select="1"/>
+    
+    
+    <!--###################################################
+                             Titles
+        ################################################### -->
+     
+    <xsl:attribute-set name="chapter.titlepage.recto.style">
+        <xsl:attribute name="text-align">right</xsl:attribute>
+        <xsl:attribute name="font-weight">bold</xsl:attribute>
+        <xsl:attribute name="font-size">
+            <xsl:value-of select="$body.font.master * 1.8"/>
+            <xsl:text>pt</xsl:text>
+        </xsl:attribute>
+    </xsl:attribute-set>
+    
+        
+    <xsl:attribute-set name="appendix.titlepage.recto.style">
+        <xsl:attribute name="text-align">right</xsl:attribute>
+        <xsl:attribute name="font-weight">bold</xsl:attribute>
+        <xsl:attribute name="font-size">
+            <xsl:value-of select="$body.font.master * 1.8"/>
+            <xsl:text>pt</xsl:text>
+        </xsl:attribute>
+    </xsl:attribute-set>
+    
+    <xsl:template name="appendix.titlepage.before.recto">
+        <xsl:param name="node" select="ancestor-or-self::appendix[1]"/> 
+        <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"
+            text-align="right"
+            font-size="72pt" font-weight="bold">
+            <xsl:number from="book" format="A"/>
+        </fo:block>
+    </xsl:template>
+    
+    <xsl:template name="chapter.titlepage.before.recto">
+        <xsl:param name="node" select="ancestor-or-self::chapter[1]"/> 
+        <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"
+            text-align="right"
+            font-size="72pt" font-weight="bold">
+            <xsl:number from="book" format="1"/>
+        </fo:block>
+    </xsl:template>
+
+    <xsl:template match="title" mode="appendix.titlepage.recto.auto.mode">
+        <xsl:variable name="titleabbrev">
+            <xsl:apply-templates select="ancestor-or-self::appendix[1]"
+                mode="titleabbrev.markup"/>
+        </xsl:variable>
+
+        <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"
+            xsl:use-attribute-sets="appendix.titlepage.recto.style">
+            <xsl:value-of select="$titleabbrev" />
+        </fo:block>
+    </xsl:template>
+    
+    <xsl:template match="title" mode="chapter.titlepage.recto.auto.mode">
+        <xsl:variable name="titleabbrev">
+            <xsl:apply-templates select="ancestor-or-self::chapter[1]"
+                mode="titleabbrev.markup"/>
+        </xsl:variable>
+
+        <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"
+            xsl:use-attribute-sets="chapter.titlepage.recto.style">
+            <xsl:value-of select="$titleabbrev" />
+        </fo:block>
+    </xsl:template>
+  
+    
+    <!-- Sections 1, 2 and 3 titles have a small bump factor and padding -->
+    <xsl:attribute-set name="section.title.level1.properties">
+        <xsl:attribute name="space-before.optimum">0.8em</xsl:attribute>
+        <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute>
+        <xsl:attribute name="space-before.maximum">0.8em</xsl:attribute>
+        <xsl:attribute name="font-size">
+            <xsl:value-of select="$body.font.master * 1.5"/>
+            <xsl:text>pt</xsl:text>
+        </xsl:attribute>
+        <xsl:attribute name="space-after.optimum">0.1em</xsl:attribute>
+        <xsl:attribute name="space-after.minimum">0.1em</xsl:attribute>
+        <xsl:attribute name="space-after.maximum">0.1em</xsl:attribute>
+    </xsl:attribute-set>
+    <xsl:attribute-set name="section.title.level2.properties">
+        <xsl:attribute name="space-before.optimum">0.6em</xsl:attribute>
+        <xsl:attribute name="space-before.minimum">0.6em</xsl:attribute>
+        <xsl:attribute name="space-before.maximum">0.6em</xsl:attribute>
+        <xsl:attribute name="font-size">
+            <xsl:value-of select="$body.font.master * 1.25"/>
+            <xsl:text>pt</xsl:text>
+        </xsl:attribute>
+        <xsl:attribute name="space-after.optimum">0.1em</xsl:attribute>
+        <xsl:attribute name="space-after.minimum">0.1em</xsl:attribute>
+        <xsl:attribute name="space-after.maximum">0.1em</xsl:attribute>
+    </xsl:attribute-set>
+    <xsl:attribute-set name="section.title.level3.properties">
+        <xsl:attribute name="space-before.optimum">0.4em</xsl:attribute>
+        <xsl:attribute name="space-before.minimum">0.4em</xsl:attribute>
+        <xsl:attribute name="space-before.maximum">0.4em</xsl:attribute>
+        <xsl:attribute name="font-size">
+            <xsl:value-of select="$body.font.master * 1.0"/>
+            <xsl:text>pt</xsl:text>
+        </xsl:attribute>
+        <xsl:attribute name="space-after.optimum">0.1em</xsl:attribute>
+        <xsl:attribute name="space-after.minimum">0.1em</xsl:attribute>
+        <xsl:attribute name="space-after.maximum">0.1em</xsl:attribute>
+    </xsl:attribute-set>
+    
+    <!-- Titles of formal objects (tables, examples, ...) -->
+    <xsl:attribute-set name="formal.title.properties" 
+                      use-attribute-sets="normal.para.spacing">
+        <xsl:attribute name="font-weight">bold</xsl:attribute>
+        <xsl:attribute name="font-size">
+            <xsl:value-of select="$body.font.master"/>
+            <xsl:text>pt</xsl:text>
+        </xsl:attribute>
+        <xsl:attribute name="hyphenate">false</xsl:attribute>
+        <xsl:attribute name="space-after.minimum">0.4em</xsl:attribute>
+        <xsl:attribute name="space-after.optimum">0.6em</xsl:attribute>
+        <xsl:attribute name="space-after.maximum">0.8em</xsl:attribute>
+    </xsl:attribute-set>
+    
+    
+    
+   <!-- ########## blockquote -->    
+   <xsl:attribute-set name="blockquote.properties">
+        <xsl:attribute name="space-before.minimum">1em</xsl:attribute>
+        <xsl:attribute name="space-before.optimum">1em</xsl:attribute>
+        <xsl:attribute name="space-before.maximum">1em</xsl:attribute>
+        <xsl:attribute name="space-after.minimum">0.1em</xsl:attribute>
+        <xsl:attribute name="space-after.optimum">0.1em</xsl:attribute>
+        <xsl:attribute name="space-after.maximum">0.1em</xsl:attribute>
+        <xsl:attribute name="border-color">#444444</xsl:attribute>
+        <xsl:attribute name="border-style">solid</xsl:attribute>
+        <xsl:attribute name="border-width">0.1pt</xsl:attribute>
+        <xsl:attribute name="padding-top">0.5em</xsl:attribute>
+        <xsl:attribute name="padding-left">0.5em</xsl:attribute>
+        <xsl:attribute name="padding-right">0.5em</xsl:attribute>
+        <xsl:attribute name="padding-bottom">0.5em</xsl:attribute>
+        <xsl:attribute name="margin-left">0.5em</xsl:attribute>
+        <xsl:attribute name="margin-right">0.5em</xsl:attribute>
+        <xsl:attribute name="background-color">#F0F0F0</xsl:attribute>
+    </xsl:attribute-set>
+
+
+
+    <!--###################################################
+                          Programlistings
+        ################################################### -->
+    <!-- Verbatim text formatting (programlistings) -->
+    <xsl:attribute-set name="verbatim.properties">
+        <xsl:attribute name="space-before.minimum">1em</xsl:attribute>
+        <xsl:attribute name="space-before.optimum">1em</xsl:attribute>
+        <xsl:attribute name="space-before.maximum">1em</xsl:attribute>
+        <xsl:attribute name="space-after.minimum">0.1em</xsl:attribute>
+        <xsl:attribute name="space-after.optimum">0.1em</xsl:attribute>
+        <xsl:attribute name="space-after.maximum">0.1em</xsl:attribute>
+        <xsl:attribute name="border-color">#444444</xsl:attribute>
+        <xsl:attribute name="border-style">solid</xsl:attribute>
+        <xsl:attribute name="border-width">0.1pt</xsl:attribute>
+        <xsl:attribute name="padding-top">0.5em</xsl:attribute>
+        <xsl:attribute name="padding-left">0.5em</xsl:attribute>
+        <xsl:attribute name="padding-right">0.5em</xsl:attribute>
+        <xsl:attribute name="padding-bottom">0.5em</xsl:attribute>
+        <xsl:attribute name="margin-left">0.5em</xsl:attribute>
+        <xsl:attribute name="margin-right">0.5em</xsl:attribute>
+    </xsl:attribute-set>
+    <!-- Shade (background) programlistings -->
+    <xsl:param name="shade.verbatim">1</xsl:param>
+    <xsl:attribute-set name="shade.verbatim.style">
+        <xsl:attribute name="background-color">#F0F0F0</xsl:attribute>
+    </xsl:attribute-set>
+    
+    
+    
+    <!--###################################################
+                             Callouts
+        ################################################### -->
+    <!-- We want to use callouts... -->
+    <xsl:param name="callout.extensions">1</xsl:param>
+    <!-- Place callout bullets at this column in programmlisting.-->
+    <xsl:param name="callout.defaultcolumn">90</xsl:param>
+    <!--
+        No, don't use crappy graphics for the callout bullets. This setting
+        enables some weird Unicode rendering for some fancy bullet points
+        in callouts. By default, this can only count to 10 and produces
+        strange results if you ever have more than 10 callouts for one
+        programlisting. We will fix that next.
+    -->
+    <xsl:param name="callout.graphics">0</xsl:param>
+    <!--
+        Again, fun with DocBook XSL: The callout bullets are rendered in
+        two places: In the programlisting itself and in the list below
+        the listing, with the actual callout text. The rendering in the
+        programlisting is some XSL transformer extension (e.g. a Saxon
+        extension), so we can't change that without messing with the
+        extensions. We only can turn it off by setting this limit to
+        zero, then, a simple bracket style like "(3)" and "(4)" will
+        be used in the programlisting.
+    -->
+    <xsl:param name="callout.unicode.number.limit" select="'0'"/>
+    <!--
+        The callout bullets in the actual callout list will be rendered
+        with an XSL FO template. The default template is broken: limited to 10
+        nice looking Unicode bullet points and then it doesn't print anything,
+        the fallback doesn't work. We implement our own template, which is not
+        as complicated, more ugly, but works. As always, function is more
+        important than form.
+    -->
+    <xsl:template name="callout-bug">
+        <xsl:param name="conum" select="1"/>
+        <fo:inline color="black" padding-top="0.1em" padding-bottom="0.1em"
+            padding-start="0.2em" padding-end="0.2em" baseline-shift="0.1em"
+            font-family="{$monospace.font.family}" font-weight="bold" font-size="75%">
+            <xsl:text>(</xsl:text>
+            <xsl:value-of select="$conum"/>
+            <xsl:text>)</xsl:text>
+        </fo:inline>
+    </xsl:template>
+    
+    
+    
+    <!--###################################################
+                              Misc
+        ################################################### -->
+    <!-- Correct placement of titles for figures and examples. -->
+    <xsl:param name="formal.title.placement"> figure after example before
+        equation before table before procedure before </xsl:param>
+    <!-- Format Variable Lists as Blocks (prevents horizontal overflow). -->
+    <xsl:param name="variablelist.as.blocks">1</xsl:param>
+    <!-- The horrible list spacing problems, this is much better. -->
+    <xsl:attribute-set name="list.block.spacing">
+        <xsl:attribute name="space-before.optimum">0.8em</xsl:attribute>
+        <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute>
+        <xsl:attribute name="space-before.maximum">0.8em</xsl:attribute>
+        <xsl:attribute name="space-after.optimum">0.1em</xsl:attribute>
+        <xsl:attribute name="space-after.minimum">0.1em</xsl:attribute>
+        <xsl:attribute name="space-after.maximum">0.1em</xsl:attribute>
+    </xsl:attribute-set>
+    <!-- Newer DocBook XSL apparently thinks that some sections are by
+         default "draft" status, and this idiotic thing is by default
+         also set to "maybe", so it spits out a lot of errors with the
+         latest FOP as the XSL/FO styles have references to some draft
+         watermarks, which you actually don't want in the first place.
+         Turn this crap off. If you have to work with the "status"
+         attribute, don't.
+    -->
+    <xsl:param name="draft.mode" select="'no'"/>
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/en/html.css
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/en/html.css	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/en/html.css	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,122 @@
+ * {
+     font-family: "Verdana", "Arial", "Helvetica";
+     font-size: 14px;
+ }
+
+ A {
+     color: #0000CC;
+ }
+
+ A:active {
+     color: #0000CC;
+ }
+
+ A:visited {
+     color: #0000CC;
+ }
+
+ P, OL, UL, LI, DL, DT, DD, BLOCKQUOTE {
+     color: #000000;
+ }
+
+ TD, TH, SPAN {
+     color: #000000;
+ }
+
+ BLOCKQUOTE {
+     margin-right: 0px;
+ }
+
+
+ H1, H2, H3, H4, H5, H6    {
+     color:       #003399;
+     font-weight: 500;
+     margin-top:  10px;
+     padding-top: 5px;
+ }
+
+ H1 { font-size: 150%; }
+ H2 { font-size: 140%; }
+ H3 { font-size: 110%; font-weight: bold; }
+ H4 { font-size: 110%; font-weight: bold;}
+ H5 { font-size: 100%; font-style: italic; }
+ H6 { font-size: 100%; font-style: italic; }
+
+ TABLE  {
+     border-collapse: collapse;
+     border-spacing:  0;
+     border:          1px dashed #CCCCCC;
+     empty-cells:     hide;
+     width: 100%
+ }
+
+ TD  {
+     padding: 4pt;
+ }
+
+
+ TT {
+     font-size:  90%;
+     font-style: monospace;
+     color:      #111111;
+ }
+
+ PRE {
+     font-size:        100%;
+     padding:          5px;
+     border-style:     solid;
+     border-width:     1px;
+     border-color:     #CCCCCC;
+     background-color: #F4F4F4;
+ }
+
+ HR  {
+     width:            100%;
+     height:           1px;
+     background-color: #CCCCCC;
+     border-width:     0px;
+     padding:          0px;
+     color:            #CCCCCC;
+ }
+
+ .variablelist {
+     padding-top:    10;
+     padding-bottom: 10;
+     margin:         0;
+ }
+
+ .itemizedlist {
+     padding-top:    0;
+     padding-bottom: 0;
+     margin:         0;
+ list-style-type: disc;
+
+ }
+
+ .orderedlist{
+     padding-top:    0;
+     padding-bottom: 0;
+     margin:         0;
+ }
+
+ .term {
+     font-weight: bold;
+ }
+
+ .note
+ {
+    padding-bottom: 5px;
+    padding-left: 5px;
+    padding-right: 5px;
+    background-color: #FFFFCC;
+ }
+
+ .warning
+ {
+    padding-bottom: 5px;
+    padding-left: 5px;
+    padding-right: 5px;
+    background-color: #FBDADA;
+ }
+
+

Added: branches/refactor1/docs/xslt/src/main/resources/en/html.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/en/html.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/en/html.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,86 @@
+<?xml version="1.0"?>
+
+<!--
+
+    This is the XSL HTML configuration file for the Hibernate
+    Reference Documentation.
+
+    It took me days to figure out this stuff and fix most of
+    the obvious bugs in the DocBook XSL distribution. Some of
+    the workarounds might not be appropriate with a newer version
+    of DocBook XSL. This file is released as part of Hibernate,
+    hence LGPL licensed.
+
+    christian at hibernate.org
+-->
+
+<!DOCTYPE xsl:stylesheet [
+    <!ENTITY db_xsl_path        "../support/docbook-xsl">
+]>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                version="1.0"
+                xmlns="http://www.w3.org/TR/xhtml1/transitional"
+                exclude-result-prefixes="#default">
+                
+<xsl:import href="&db_xsl_path;/html/docbook.xsl"/>
+
+<!--###################################################
+                     HTML Settings
+    ################################################### -->   
+
+    <xsl:param name="html.stylesheet">css/html.css</xsl:param>
+
+    <!-- These extensions are required for table printing and other stuff -->
+    <xsl:param name="use.extensions">1</xsl:param>
+    <xsl:param name="tablecolumns.extension">0</xsl:param>
+    <xsl:param name="callout.extensions">1</xsl:param>
+    <xsl:param name="graphicsize.extension">0</xsl:param>
+
+<!--###################################################
+                      Table Of Contents
+    ################################################### -->   
+
+    <!-- Generate the TOCs for named components only -->
+    <xsl:param name="generate.toc">
+        book   toc
+    </xsl:param>
+    
+    <!-- Show only Sections up to level 3 in the TOCs -->
+    <xsl:param name="toc.section.depth">3</xsl:param>
+    
+<!--###################################################
+                         Labels
+    ################################################### -->   
+
+    <!-- Label Chapters and Sections (numbering) -->
+    <xsl:param name="chapter.autolabel">1</xsl:param>
+    <xsl:param name="section.autolabel" select="1"/>
+    <xsl:param name="section.label.includes.component.label" select="1"/>
+
+<!--###################################################
+                         Callouts
+    ################################################### -->
+
+    <!-- Don't use graphics, use a simple number style -->
+    <xsl:param name="callout.graphics">0</xsl:param>
+
+    <!-- Place callout marks at this column in annotated areas -->
+    <xsl:param name="callout.defaultcolumn">90</xsl:param>
+
+<!--###################################################
+                          Misc
+    ################################################### -->   
+
+    <!-- Placement of titles -->
+    <xsl:param name="formal.title.placement">
+        figure after
+        example before
+        equation before
+        table before
+        procedure before
+    </xsl:param>    
+    <xsl:template match="section[@role = 'NotInToc']//*"  mode="toc" />
+    <xsl:template match="chapter[@role = 'NotInToc']//section//*"  mode="toc" />
+    
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/en/html_chunk.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/en/html_chunk.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/en/html_chunk.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,88 @@
+<?xml version="1.0"?>
+
+<!--
+
+    This is the XSL HTML configuration file for the Hibernate
+    Reference Documentation.
+
+    It took me days to figure out this stuff and fix most of
+    the obvious bugs in the DocBook XSL distribution. Some of
+    the workarounds might not be appropriate with a newer version
+    of DocBook XSL. This file is released as part of Hibernate,
+    hence LGPL licensed.
+
+    christian at hibernate.org
+-->
+
+<!DOCTYPE xsl:stylesheet [
+    <!ENTITY db_xsl_path        "../support/docbook-xsl">
+]>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                version="1.0"
+                xmlns="http://www.w3.org/TR/xhtml1/transitional"
+                exclude-result-prefixes="#default">
+                
+<xsl:import href="&db_xsl_path;/html/chunk.xsl"/>
+
+<!--###################################################
+                     HTML Settings
+    ################################################### -->   
+
+    <xsl:param name="chunk.section.depth">'5'</xsl:param>
+    <xsl:param name="use.id.as.filename">'1'</xsl:param>
+    <xsl:param name="html.stylesheet">css/html.css</xsl:param>
+
+    <!-- These extensions are required for table printing and other stuff -->
+    <xsl:param name="use.extensions">1</xsl:param>
+    <xsl:param name="tablecolumns.extension">0</xsl:param>
+    <xsl:param name="callout.extensions">1</xsl:param>
+    <xsl:param name="graphicsize.extension">0</xsl:param>
+    
+<!--###################################################
+                      Table Of Contents
+    ################################################### -->   
+
+    <!-- Generate the TOCs for named components only -->
+    <xsl:param name="generate.toc">
+        book   toc
+    </xsl:param>
+    
+    <!-- Show only Sections up to level 3 in the TOCs -->
+    <xsl:param name="toc.section.depth">3</xsl:param>
+
+<!--###################################################
+                         Labels
+    ################################################### -->   
+
+    <!-- Label Chapters and Sections (numbering) -->
+    <xsl:param name="chapter.autolabel">1</xsl:param>
+    <xsl:param name="section.autolabel" select="1"/>
+    <xsl:param name="section.label.includes.component.label" select="1"/>
+                
+<!--###################################################
+                         Callouts
+    ################################################### -->   
+
+    <!-- Don't use graphics, use a simple number style -->
+    <xsl:param name="callout.graphics">0</xsl:param>
+
+    <!-- Place callout marks at this column in annotated areas -->
+    <xsl:param name="callout.defaultcolumn">90</xsl:param>
+
+<!--###################################################
+                          Misc
+    ################################################### -->   
+
+    <!-- Placement of titles -->
+    <xsl:param name="formal.title.placement">
+        figure after
+        example before
+        equation before
+        table before
+        procedure before
+    </xsl:param>    
+    <xsl:template match="section[@role = 'NotInToc']//*"  mode="toc" />
+    <xsl:template match="chapter[@role = 'NotInToc']//section//*"  mode="toc" />
+    
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ChangeLog
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ChangeLog	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ChangeLog	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,363 @@
+2004-01-21  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* calstblx.dtd, catalog.xml, dbcentx.mod, dbgenent.mod, dbhierx.mod, dbnotnx.mod, dbpoolx.mod, docbook.cat, docbookx.dtd, htmltblx.mod: 
+	Changed version number to V4.3CR2
+
+	* dbpoolx.mod, htmltblx.mod: Make sure floatstyle is on table and informaltable
+
+2003-12-21  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* Makefile, freshmeat.xsl: Support freshmeat target
+
+	* calstblx.dtd, catalog.xml, dbcentx.mod, dbgenent.mod, dbhierx.mod, dbnotnx.mod, dbpoolx.mod, docbook.cat, htmltblx.mod: 
+	Updated version numbers
+
+	* dbpoolx.mod: Refactor parameter entities for informaltable so that textobject is handled correctly; avoid duplicate ID on caption when HTML tables are allowed.
+
+	* docbookx.dtd: DocBook V4.3CR2 released
+
+2003-12-20  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* dbpoolx.mod: Put HTML attributes on caption of HTML tables are allowed
+
+2003-12-19  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* Makefile: Add doc target
+
+	* htmltblx.mod: Make sure textobject goes in the DocBook branch of informaltable
+
+2003-12-02  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* calstblx.dtd, catalog.xml, dbcentx.mod, dbgenent.mod, dbhierx.mod, dbnotnx.mod, dbpoolx.mod, docbook.cat, htmltblx.mod: 
+	Updated version number
+
+	* docbookx.dtd: Released 4.3CR1
+
+2003-10-28  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* calstblx.dtd, catalog.xml, dbcentx.mod, dbgenent.mod, dbhierx.mod, dbnotnx.mod, dbpoolx.mod, docbook.cat, docbookx.dtd, htmltblx.mod: 
+	Released 4.3b5
+
+	* dbnotnx.mod: Added SWF notation
+
+	* dbpoolx.mod: Make firstterm isomorphic to glossterm
+
+2003-09-28  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* dbpoolx.mod: RFE #573812: allow blockinfo on blockquote
+
+	* dbpoolx.mod: RFE #564776: added process, service, server, and daemon to the class values of systemitem
+
+	* dbpoolx.mod: RFE #571998: added initializer to paramdef
+
+	* dbpoolx.mod: RFE #518074: added a number of new values to the class attribute of database
+
+	* dbpoolx.mod: RFE #533734: allow void to be optional on {method|constructor|destructor}synopsis
+
+	* dbpoolx.mod: Added StepAlternatives
+
+	* dbpoolx.mod: RFE #507975: revision should allow author or authorinitials
+
+	* dbpoolx.mod: RFE #517604: allow optional title on glosslist
+
+	* dbpoolx.mod: RFE #570068: added emailmessage, webpage, and newsposting as pubwork values for citetitle
+
+	* dbpoolx.mod: RFE #571996: added prefix, namespace, and localname to class for sgmltag
+
+2003-09-25  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* calstblx.dtd, catalog.xml, dbcentx.mod, dbgenent.mod, dbhierx.mod, dbnotnx.mod, dbpoolx.mod, docbook.cat, docbookx.dtd, htmltblx.mod: 
+	Changed V4.2b2 to V4.2b3
+
+	* dbhierx.mod: Allow Set to be recursive
+
+	* dbhierx.mod, dbpoolx.mod: Added type attribute to indexterm and index
+
+	* dbpoolx.mod: Added xml:base
+
+	* dbpoolx.mod: Added code
+
+	* dbpoolx.mod: RFE #615473: added floatstyle to (informal)figure, (informal)example, and (informal)equation
+
+	* htmltblx.mod: Fixup some PEs so that we don't get duplicated attribute declarations
+
+	* htmltblx.mod: Put blockinfo and textobject back into the CALS table model
+
+2003-08-15  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* calstblx.dtd, catalog.xml, dbcentx.mod, dbgenent.mod, dbhierx.mod, dbnotnx.mod, dbpoolx.mod, docbook.cat, docbookx.dtd, htmltblx.mod: 
+	Changed 4.2 to 4.3b2
+
+	* calstblx.dtd, dbpoolx.mod, htmltblx.mod, soextblx.dtd: 
+	Allow HTML table models in addition to CALS or SOEx table models (2003 Apr)
+
+	* dbpoolx.mod: Task markup (2003 Jun)
+
+2003-08-11  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* dbhierx.mod: Related to RFE 514435: allow multiple refnamediv elements in refentry (2003 Jul)
+
+	* dbnotnx.mod: RFE 698844: add PDF notation (2003 May)
+
+	* dbpoolx.mod: RFE 660044: support continuation and startinglinenumber on verbatims (2003 Feb)
+
+	* dbpoolx.mod: Related to RFE 679316: add orgname to inlines (2003 Jul)
+
+	* dbpoolx.mod: RFE 655526: support modifier in funcprototype (2003 Feb)
+
+	* dbpoolx.mod: RFE 573419: add bidirectional text override (2003 Apr)
+
+	* dbpoolx.mod: Added function attribute to keycap for improved semantics (2003 Jul)
+
+	* dbpoolx.mod: RFE 691762: add language attribute to verbatim environments (2003 May)
+
+	* dbpoolx.mod: RFE 705885: add namespace attribute to sgmltag (2003 May)
+
+	* dbpoolx.mod: RFE 565716: support for URI element (2003 Apr)
+
+2003-08-09  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* dbpoolx.mod: RFE 582822: paramdef and varargs on funcprototype (2003 Feb)
+
+	* dbpoolx.mod: RFE 638456: support translators (2003 Feb)
+
+	* dbpoolx.mod: Added xrefstyle (2002 Dec)
+
+	* dbpoolx.mod: RFE 473365: choice attribute for paramdef (2003 Feb)
+
+	* dbpoolx.mod: RFE 570068: new values for pubwork (2003 Jan)
+
+	* docbookx.dtd: Fix SDATA entity for euro
+
+2002-07-17  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* calstblx.dtd, catalog.xml, dbcentx.mod, dbgenent.mod, dbhierx.mod, dbnotnx.mod, dbpoolx.mod, docbook.cat, docbookx.dtd: 
+	DocBook XML V4.2 released
+
+2002-05-28  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* calstblx.dtd, catalog.xml, dbcentx.mod, dbgenent.mod, dbhierx.mod, dbnotnx.mod, dbpoolx.mod, docbook.cat, docbookx.dtd: 
+	Updated comments to reflect CR3
+
+2002-05-21  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* dbnotnx.mod: SVG notation accidentally left out of notation.class
+
+	* docbookx.dtd: Fix syntactic error intentionally introduced behind mutually exclusive PEs. Now make the DTD useless, but not syntactically invalid
+
+2002-05-12  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* dbpoolx.mod: Add accidentally missing local.info.class to info.class
+
+2002-03-19  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* calstblx.dtd, dbcentx.mod, dbgenent.mod, dbhierx.mod, dbnotnx.mod, dbpoolx.mod: 
+	Prepare for CR1
+
+	* catalog.xml, docbook.cat: Prepare for CR1 and fix search-and-replace typos
+
+	* dbpoolx.mod: Make type other tokens in bibliorelation unique for SGML compatibility
+
+	* dbpoolx.mod: Make spatial/temporal other tokens unique for SGML compatibility
+
+	* dbpoolx.mod: Added bibliosource, bibliorelation, and bibliocoverage
+
+	* dbpoolx.mod: Move bibliorelation type attribute into a PE so that it can be expanded the way we want
+
+	* dbpoolx.mod: Implemented RFE #480957
+
+	* dbpoolx.mod: Revise graphic attributes: add contentwidth, contentdepth, and valign
+
+	* dbpoolx.mod: Add class attribute to orgname
+
+	* dbpoolx.mod: Implemented RFE #480954: add textdata element
+
+	* dbpoolx.mod: Added blockinfo element
+
+	* dbpoolx.mod: RFE #513426: Text alternative for tables
+
+	* dbpoolx.mod: Add consortium to the list of classes on orgname
+
+	* docbookx.dtd: DocBook V4.2 Candidate Release 1 released
+
+2002-02-05  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* dbhierx.mod: Implemented RFE #501363
+
+	* dbpoolx.mod: Implemented RFE #492099
+
+	* dbpoolx.mod: Implemented RFE #498848
+
+	* dbpoolx.mod: Implemented RFE #480955
+
+2002-01-06  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* dbcentx.mod: Added marked sections around character set entity references
+
+2001-11-20  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* calstblx.dtd, catalog.xml, dbcentx.mod, dbgenent.mod, dbhierx.mod, dbnotnx.mod, dbpoolx.mod, docbook.cat, docbookx.dtd: 
+	DocBook V4.2b1 released
+
+	* dbpoolx.mod: Implemented RFE #482821
+
+2001-11-19  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* dbhierx.mod, dbpoolx.mod: Implemented RFE #456460
+
+2001-11-18  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* dbpoolx.mod: RFE #482817: Add errortext element
+
+2001-11-17  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* dbpoolx.mod: RFE 482821: Add extension to the list of class values on filename
+
+	* dbpoolx.mod: RFE 482053: Add support for DOI in meta
+
+	* dbpoolx.mod: Removed bogus occurrence indicator in info.class; fixed typo in qandaset PEs
+
+2001-11-13  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* 40chg.txt, 41chg.txt, LostLog: Removed old files
+
+	* Makefile: Fixed typo
+
+	* Makefile: Makefile
+
+	* README: Removed version information
+
+	* README, readme.txt: Renamed
+
+	* calstblx.dtd, catalog.xml, dbcentx.mod, dbgenent.mod, dbhierx.mod, dbnotnx.mod, dbpoolx.mod, docbook.cat, docbookx.dtd: 
+	Removed 'XML' from public identifiers for files that will now be common to both XML and SGML
+
+	* catalog.xml: Fixed missing end tag
+
+2001-11-12  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* calstblx.dtd, dbcentx.mod, dbgenent.mod, dbnotnx.mod, readme.txt: 
+	Updated version numbers
+
+	* catalog.xml, docbook.cat: Added XML Catalog; updated public identifiers in catalog
+
+	* dbpoolx.mod: Implemented RFE #480956
+
+	* dbpoolx.mod: Former RFE 133: Added newsgroup class to systemitem
+
+2001-11-09  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* dbhierx.mod: Implemented RFE #426382
+
+	* dbhierx.mod: Implemented RFE #417671
+
+	* dbhierx.mod, dbpoolx.mod: Implemented RFE #436072
+
+	* dbhierx.mod, dbpoolx.mod, docbookx.dtd: Changed version number
+
+	* dbnotnx.mod: Implemented RFE #440597
+
+	* dbpoolx.mod: Implemented RFE #435485
+
+	* dbpoolx.mod: Expand the content model of the following elements from smallcptr.char.mix back to cptr.char.mix: interfacename, action, database, filename, hardware, keycap, option, parameter, property, and systemitem (command, interface, and literal were never reduced).
+
+	* dbpoolx.mod: Implemented RFE #431418
+
+	* dbpoolx.mod: Implemented RFE #431419
+
+	* dbpoolx.mod: Implemented RFE #435466
+
+	* dbpoolx.mod: Implemented RFE #439136
+
+	* dbpoolx.mod: Implemented RFE #431415
+
+	* dbpoolx.mod: Implemented RFE #431413
+
+	* dbpoolx.mod: Implemented RFE #434439
+
+2001-11-07  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* calstblx.dtd, dbcentx.mod, dbhierx.mod, dbpoolx.mod, docbookx.dtd: 
+	Towards a 4.2 release: reparameterize so that the SGML DTD is just a customization of the XML DTD
+
+	* calstblx.dtd, dbhierx.mod, dbnotnx.mod, dbpoolx.mod, docbookx.dtd: 
+	Whitespace fixes
+
+2001-08-07  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* dbhierx.mod: RFE 426382: Norm to allow SimpleSect inside Section
+
+	* dbpoolx.mod: RFE 431419: Norm to add markup for FS type and partition
+
+	* dbpoolx.mod: RFE 431418: Norm to add typing to funcdef and paramdef
+
+	* dbpoolx.mod: Fix comments; implement proposal of the TC to expand the content model of selected inlines
+
+	* dbpoolx.mod: RFE 434439: Add language attribute to fieldsynopsis et al.
+
+	* dbpoolx.mod: RFE 431415: Norm to add markup for host identifiers
+
+2001-06-18  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* 40chg.txt, 41chg.txt, LostLog, Makefile, calstblx.dtd, dbcentx.mod, dbgenent.mod, dbhierx.mod, dbnotnx.mod, dbpoolx.mod, docbook.cat, docbookx.cat, docbookx.dtd, readme.txt: 
+	Additional work on DocBook XML V5.0; I had the wrong CVS repository for a while so there's a bunch of changes lumped together here
+
+	* Makefile: branches:  1.1.2;
+	file Makefile was initially added on branch V50-devel.
+
+2001-03-12  <ndw at users.sourceforge.net>
+
+	* calstblx.dtd, dbcentx.mod, dbgenent.mod, dbhierx.mod, dbnotnx.mod, dbpoolx.mod, docbookx.dtd, readme.txt: 
+	Updated version numbers
+
+	* dbcentx.mod, dbhierx.mod, dbnotnx.mod, dbpoolx.mod, docbookx.dtd, soextblx.dtd: 
+	New file.
+
+	* docbook.cat: New file.
+
+	* docbookx.cat: branches:  1.1.2;
+	file docbookx.cat was initially added on branch V50-devel.
+
+	* docbookx.cat: New file.
+
+2001-01-14  <ndw at users.sourceforge.net>
+
+	* dbpoolx.mod: branches:  1.5.2;
+	RFE #140: Allow multiple MsgExplan inside SimpleMsgEntry
+
+2000-11-12  <ndw at users.sourceforge.net>
+
+	* dbhierx.mod: branches:  1.6.2;
+	Add refentry; accidentally left out
+
+	* dbhierx.mod: Allow beginpage to be the first child of toc, lot, appendix, chapter,
+	part, preface, reference, and refentry. (It can't be at the start of
+	bibliography, glossary, index, or setindex because of ambiguity
+	problems.)
+
+2000-09-19  <ndw at users.sourceforge.net>
+
+	* 40chg.txt, calstblx.dtd, dbcentx.mod, dbgenent.ent, dbhierx.mod, dbnotnx.mod, dbpoolx.mod, docbookx.dtd, readme.txt, soextblx.dtd: 
+	DocBook XML V4.0
+
+	* 40chg.txt, soextblx.dtd: branches:  1.2.2;
+	DocBook XML V4.1
+
+	* 41chg.txt, LostLog, calstblx.dtd, dbcentx.mod, dbgenent.ent, dbgenent.mod, dbhierx.mod, dbnotnx.mod, dbpoolx.mod, docbook.cat, docbookx.dtd, readme.txt: 
+	DocBook XML V4.1.1
+
+	* 41chg.txt, LostLog, calstblx.dtd, dbcentx.mod, dbgenent.ent, dbhierx.mod, dbnotnx.mod, dbpoolx.mod, docbook.cat, docbookx.dtd, readme.txt: 
+	DocBook XML V4.1
+
+	* 41chg.txt, LostLog, docbook.cat: branches:  1.3.2;
+	DocBook XML V4.1.2
+
+	* calstblx.dtd, dbcentx.mod, dbnotnx.mod, docbookx.dtd, readme.txt: 
+	branches:  1.4.2;
+	DocBook XML V4.1.2
+
+	* dbgenent.mod: branches:  1.2.2;
+	DocBook XML V4.1.2
+
+	* dbhierx.mod, dbpoolx.mod: DocBook XML V4.1.2
+

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/README
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/README	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/README	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,8 @@
+README for the DocBook XML DTD
+
+For more information about DocBook, please see
+
+  http://www.oasis-open.org/docbook/
+
+Please send all questions, comments, concerns, and bug reports to the
+DocBook mailing list: docbook at lists.oasis-open.org

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/calstblx.dtd
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/calstblx.dtd	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/calstblx.dtd	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,205 @@
+<!-- ...................................................................... -->
+<!-- DocBook CALS Table Model V4.3CR3 ........................................ -->
+<!-- File calstblx.mod .................................................... -->
+
+<!-- Copyright 1992-2002 HaL Computer Systems, Inc.,
+     O'Reilly & Associates, Inc., ArborText, Inc., Fujitsu Software
+     Corporation, Norman Walsh, Sun Microsystems, Inc., and the
+     Organization for the Advancement of Structured Information
+     Standards (OASIS).
+
+     This DTD is based on the CALS Table Model
+     PUBLIC "-//USA-DOD//DTD Table Model 951010//EN"
+
+     $Id: calstblx.dtd,v 1.1.1.1 2004/10/19 21:21:34 juntao Exp $
+
+     Permission to use, copy, modify and distribute the DocBook DTD
+     and its accompanying documentation for any purpose and without fee
+     is hereby granted in perpetuity, provided that the above copyright
+     notice and this paragraph appear in all copies.  The copyright
+     holders make no representation about the suitability of the DTD for
+     any purpose.  It is provided "as is" without expressed or implied
+     warranty.
+
+     If you modify the DocBook DTD in any way, except for declaring and
+     referencing additional sets of general entities and declaring
+     additional notations, label your DTD as a variant of DocBook.  See
+     the maintenance documentation for more information.
+
+     Please direct all questions, bug reports, or suggestions for
+     changes to the docbook at lists.oasis-open.org mailing list. For more
+     information, see http://www.oasis-open.org/docbook/.
+-->
+
+<!-- ...................................................................... -->
+
+<!-- This module contains the definitions for the CALS Table Model
+     converted to XML. It has been modified slightly for use in the
+     combined HTML/CALS models supported by DocBook V4.3.
+-->
+
+<!-- These definitions are not directly related to the table model, but are
+     used in the default CALS table model and are usually defined elsewhere
+     (and prior to the inclusion of this table module) in a CALS DTD. -->
+
+<!ENTITY % bodyatt "">
+<!ENTITY % secur "">
+
+<!-- no if zero(s),
+                                yes if any other digits value -->
+
+<!ENTITY % yesorno 'CDATA'>
+<!ENTITY % titles  'title?'>
+
+<!-- default for use in entry content -->
+
+<!ENTITY % paracon '#PCDATA'>
+
+<!--
+The parameter entities as defined below provide the CALS table model
+as published (as part of the Example DTD) in MIL-HDBK-28001.
+
+These following declarations provide the CALS-compliant default definitions
+for these entities.  However, these entities can and should be redefined
+(by giving the appropriate parameter entity declaration(s) prior to the
+reference to this Table Model declaration set entity) to fit the needs
+of the current application.
+-->
+
+<!ENTITY % tbl.table.name       "(table|chart)">
+<!ENTITY % tbl.table-titles.mdl "%titles;,">
+<!ENTITY % tbl.table-main.mdl   "(tgroup+|graphic+)">
+<!ENTITY % tbl.table.mdl        "%tbl.table-titles.mdl; %tbl.table-main.mdl;">
+<!ENTITY % tbl.table.att        '
+    tabstyle    CDATA           #IMPLIED
+    tocentry    %yesorno;       #IMPLIED
+    shortentry  %yesorno;       #IMPLIED
+    orient      (port|land)     #IMPLIED
+    pgwide      %yesorno;       #IMPLIED '>
+<!ENTITY % tbl.tgroup.mdl       "colspec*,spanspec*,thead?,tfoot?,tbody">
+<!ENTITY % tbl.tgroup.att       '
+    tgroupstyle CDATA           #IMPLIED '>
+<!ENTITY % tbl.hdft.mdl         "colspec*,row+">
+<!ENTITY % tbl.row.mdl          "(entry|entrytbl)+">
+<!ENTITY % tbl.entrytbl.mdl     "colspec*,spanspec*,thead?,tbody">
+<!ENTITY % tbl.entry.mdl        "(para|warning|caution|note|legend|%paracon;)*">
+
+<!ENTITY % tbl.frame.attval     "top|bottom|topbot|all|sides|none">
+<!ENTITY % tbl.tbody.mdl        "row+">
+
+<!-- =====  Element and attribute declarations follow. =====  -->
+
+<!ELEMENT table %ho; (%tbl.table.mdl;)>
+
+<!ATTLIST table
+        frame           (%tbl.frame.attval;)                    #IMPLIED
+        colsep          %yesorno;                               #IMPLIED
+        rowsep          %yesorno;                               #IMPLIED
+        %tbl.table.att;
+        %bodyatt;
+        %secur;
+>
+
+<!ELEMENT tgroup %ho; (%tbl.tgroup.mdl;) >
+
+<!ATTLIST tgroup
+        cols            CDATA                                   #REQUIRED
+        %tbl.tgroup.att;
+        colsep          %yesorno;                               #IMPLIED
+        rowsep          %yesorno;                               #IMPLIED
+        align           (left|right|center|justify|char)        #IMPLIED
+        char            CDATA                                   #IMPLIED
+        charoff         CDATA                                   #IMPLIED
+        %secur;
+>
+
+<!ELEMENT colspec %ho; EMPTY >
+
+<!ATTLIST colspec
+        colnum          CDATA                                   #IMPLIED
+        colname         CDATA                                   #IMPLIED
+        colwidth        CDATA                                   #IMPLIED
+        colsep          %yesorno;                               #IMPLIED
+        rowsep          %yesorno;                               #IMPLIED
+        align           (left|right|center|justify|char)        #IMPLIED
+        char            CDATA                                   #IMPLIED
+        charoff         CDATA                                   #IMPLIED
+>
+
+<!ELEMENT spanspec %ho; EMPTY >
+
+<!ATTLIST spanspec
+        namest          CDATA                                   #REQUIRED
+        nameend         CDATA                                   #REQUIRED
+        spanname        CDATA                                   #REQUIRED
+        colsep          %yesorno;                               #IMPLIED
+        rowsep          %yesorno;                               #IMPLIED
+        align           (left|right|center|justify|char)        #IMPLIED
+        char            CDATA                                   #IMPLIED
+        charoff         CDATA                                   #IMPLIED
+>
+
+<!ELEMENT thead %ho; (%tbl.hdft.mdl;)>
+<!ATTLIST thead
+        valign          (top|middle|bottom)                     #IMPLIED
+        %secur;
+>
+
+<!ELEMENT tfoot %ho; (%tbl.hdft.mdl;)>
+<!ATTLIST tfoot
+        valign          (top|middle|bottom)                     #IMPLIED
+        %secur;
+>
+
+<!ELEMENT tbody %ho; (%tbl.tbody.mdl;)>
+
+<!ATTLIST tbody
+        valign          (top|middle|bottom)                     #IMPLIED
+        %secur;
+>
+
+<!ELEMENT row %ho; (%tbl.row.mdl;)>
+
+<!ATTLIST row
+        rowsep          %yesorno;                               #IMPLIED
+        valign          (top|middle|bottom)                     #IMPLIED
+        %secur;
+>
+
+<!ELEMENT entrytbl %ho; (%tbl.entrytbl.mdl;)>
+
+<!ATTLIST entrytbl
+        cols            CDATA                                   #REQUIRED
+        %tbl.tgroup.att;
+        colname         CDATA                                   #IMPLIED
+        spanname        CDATA                                   #IMPLIED
+        namest          CDATA                                   #IMPLIED
+        nameend         CDATA                                   #IMPLIED
+        colsep          %yesorno;                               #IMPLIED
+        rowsep          %yesorno;                               #IMPLIED
+        align           (left|right|center|justify|char)        #IMPLIED
+        char            CDATA                                   #IMPLIED
+        charoff         CDATA                                   #IMPLIED
+        %secur;
+>
+
+<!ELEMENT entry %ho; (%tbl.entry.mdl;)*>
+
+<!ATTLIST entry
+        colname         CDATA                                   #IMPLIED
+        namest          CDATA                                   #IMPLIED
+        nameend         CDATA                                   #IMPLIED
+        spanname        CDATA                                   #IMPLIED
+        morerows        CDATA                                   #IMPLIED
+        colsep          %yesorno;                               #IMPLIED
+        rowsep          %yesorno;                               #IMPLIED
+        align           (left|right|center|justify|char)        #IMPLIED
+        char            CDATA                                   #IMPLIED
+        charoff         CDATA                                   #IMPLIED
+        rotate          %yesorno;                               #IMPLIED
+        valign          (top|middle|bottom)                     #IMPLIED
+        %secur;
+>
+
+<!-- End of DocBook CALS Table Model V4.3CR3 ................................. -->
+<!-- ...................................................................... -->

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/catalog.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/catalog.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/catalog.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,115 @@
+<?xml version='1.0'?>
+<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
+
+<!-- ...................................................................... -->
+<!-- XML Catalog data for DocBook XML V4.3CR3 ................................ -->
+<!-- File catalog.xml ..................................................... -->
+
+<!-- Please direct all questions, bug reports, or suggestions for
+     changes to the docbook at lists.oasis-open.org mailing list. For more
+     information, see http://www.oasis-open.org/.
+  -->
+
+<!-- This is the catalog data file for DocBook V4.3CR3. It is provided as
+     a convenience in building your own catalog files. You need not use
+     the filenames listed here, and need not use the filename method of
+     identifying storage objects at all.  See the documentation for
+     detailed information on the files associated with the DocBook DTD.
+     See XML Catalogs at http://www.oasis-open.org/committees/entity/ for
+     detailed information on supplying and using catalog data.
+  -->
+
+<!-- ...................................................................... -->
+<!-- DocBook driver file .................................................. -->
+
+<public publicId="-//OASIS//DTD DocBook XML V4.3CR3//EN"
+        uri="docbookx.dtd"/>
+
+<!-- ...................................................................... -->
+<!-- DocBook modules ...................................................... -->
+
+<public publicId="-//OASIS//DTD DocBook CALS Table Model V4.3CR3//EN"
+        uri="calstblx.dtd"/>
+
+<public publicId="-//OASIS//DTD XML Exchange Table Model 19990315//EN"
+        uri="soextblx.dtd"/>
+
+<public publicId="-//OASIS//ELEMENTS DocBook Information Pool V4.3CR3//EN"
+        uri="dbpoolx.mod"/>
+
+<public publicId="-//OASIS//ELEMENTS DocBook Document Hierarchy V4.3CR3//EN"
+        uri="dbhierx.mod"/>
+
+<public publicId="-//OASIS//ENTITIES DocBook Additional General Entities V4.3CR3//EN"
+        uri="dbgenent.mod"/>
+
+<public publicId="-//OASIS//ENTITIES DocBook Notations V4.3CR3//EN"
+        uri="dbnotnx.mod"/>
+
+<public publicId="-//OASIS//ENTITIES DocBook Character Entities V4.3CR3//EN"
+        uri="dbcentx.mod"/>
+
+<!-- ...................................................................... -->
+<!-- ISO entity sets ...................................................... -->
+
+<public publicId="ISO 8879:1986//ENTITIES Diacritical Marks//EN//XML"
+        uri="ent/iso-dia.ent"/>
+
+<public publicId="ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN//XML"
+        uri="ent/iso-num.ent"/>
+
+<public publicId="ISO 8879:1986//ENTITIES Publishing//EN//XML"
+        uri="ent/iso-pub.ent"/>
+
+<public publicId="ISO 8879:1986//ENTITIES General Technical//EN//XML"
+        uri="ent/iso-tech.ent"/>
+
+<public publicId="ISO 8879:1986//ENTITIES Added Latin 1//EN//XML"
+        uri="ent/iso-lat1.ent"/>
+
+<public publicId="ISO 8879:1986//ENTITIES Added Latin 2//EN//XML"
+        uri="ent/iso-lat2.ent"/>
+
+<public publicId="ISO 8879:1986//ENTITIES Greek Letters//EN//XML"
+        uri="ent/iso-grk1.ent"/>
+
+<public publicId="ISO 8879:1986//ENTITIES Monotoniko Greek//EN//XML"
+        uri="ent/iso-grk2.ent"/>
+
+<public publicId="ISO 8879:1986//ENTITIES Greek Symbols//EN//XML"
+        uri="ent/iso-grk3.ent"/>
+
+<public publicId="ISO 8879:1986//ENTITIES Alternative Greek Symbols//EN//XML"
+        uri="ent/iso-grk4.ent"/>
+
+<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Arrow Relations//EN//XML"
+        uri="ent/iso-amsa.ent"/>
+
+<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Binary Operators//EN//XML"
+        uri="ent/iso-amsb.ent"/>
+
+<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Delimiters//EN//XML"
+        uri="ent/iso-amsc.ent"/>
+
+<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Negated Relations//EN//XML"
+        uri="ent/iso-amsn.ent"/>
+
+<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Ordinary//EN//XML"
+        uri="ent/iso-amso.ent"/>
+
+<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Relations//EN//XML"
+        uri="ent/iso-amsr.ent"/>
+
+<public publicId="ISO 8879:1986//ENTITIES Box and Line Drawing//EN//XML"
+        uri="ent/iso-box.ent"/>
+
+<public publicId="ISO 8879:1986//ENTITIES Russian Cyrillic//EN//XML"
+        uri="ent/iso-cyr1.ent"/>
+
+<public publicId="ISO 8879:1986//ENTITIES Non-Russian Cyrillic//EN//XML"
+        uri="ent/iso-cyr2.ent"/>
+
+<!-- End of catalog data for DocBook XML V4.3CR3 ............................. -->
+<!-- ...................................................................... -->
+
+</catalog>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/dbcentx.mod
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/dbcentx.mod	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/dbcentx.mod	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,384 @@
+<!-- ...................................................................... -->
+<!-- DocBook character entities module V4.3CR3 ............................... -->
+<!-- File dbcentx.mod ..................................................... -->
+
+<!-- Copyright 1992-2002 HaL Computer Systems, Inc.,
+     O'Reilly & Associates, Inc., ArborText, Inc., Fujitsu Software
+     Corporation, Norman Walsh, Sun Microsystems, Inc., and the
+     Organization for the Advancement of Structured Information
+     Standards (OASIS).
+
+     $Id: dbcentx.mod,v 1.1.1.1 2004/10/19 21:21:34 juntao Exp $
+
+     Permission to use, copy, modify and distribute the DocBook DTD
+     and its accompanying documentation for any purpose and without fee
+     is hereby granted in perpetuity, provided that the above copyright
+     notice and this paragraph appear in all copies.  The copyright
+     holders make no representation about the suitability of the DTD for
+     any purpose.  It is provided "as is" without expressed or implied
+     warranty.
+
+     If you modify the DocBook DTD in any way, except for declaring and
+     referencing additional sets of general entities and declaring
+     additional notations, label your DTD as a variant of DocBook.  See
+     the maintenance documentation for more information.
+
+     Please direct all questions, bug reports, or suggestions for
+     changes to the docbook at lists.oasis-open.org mailing list. For more
+     information, see http://www.oasis-open.org/docbook/.
+-->
+
+<!-- ...................................................................... -->
+
+<!-- This module contains the entity declarations for the standard ISO
+     entity sets used by DocBook.
+
+     In DTD driver files referring to this module, please use an entity
+     declaration that uses the public identifier shown below:
+
+     <!ENTITY % dbcent PUBLIC
+     "-//OASIS//ENTITIES DocBook Character Entities V4.3CR3//EN"
+     "dbcentx.mod">
+     %dbcent;
+
+     See the documentation for detailed information on the parameter
+     entity and module scheme used in DocBook, customizing DocBook and
+     planning for interchange, and changes made since the last release
+     of DocBook.
+-->
+
+<!-- ...................................................................... -->
+
+<![%sgml.features;[
+
+<!ENTITY % ISOamsa.module "INCLUDE">
+<![ %ISOamsa.module; [
+<!ENTITY % ISOamsa PUBLIC
+"ISO 8879:1986//ENTITIES Added Math Symbols: Arrow Relations//EN">
+<!--end of ISOamsa.module-->]]>
+
+<!ENTITY % ISOamsb.module "INCLUDE">
+<![ %ISOamsb.module; [
+<!ENTITY % ISOamsb PUBLIC
+"ISO 8879:1986//ENTITIES Added Math Symbols: Binary Operators//EN">
+<!--end of ISOamsb.module-->]]>
+
+<!ENTITY % ISOamsc.module "INCLUDE">
+<![ %ISOamsc.module; [
+<!ENTITY % ISOamsc PUBLIC
+"ISO 8879:1986//ENTITIES Added Math Symbols: Delimiters//EN">
+<!--end of ISOamsc.module-->]]>
+
+<!ENTITY % ISOamsn.module "INCLUDE">
+<![ %ISOamsn.module; [
+<!ENTITY % ISOamsn PUBLIC
+"ISO 8879:1986//ENTITIES Added Math Symbols: Negated Relations//EN">
+<!--end of ISOamsn.module-->]]>
+
+<!ENTITY % ISOamso.module "INCLUDE">
+<![ %ISOamso.module; [
+<!ENTITY % ISOamso PUBLIC
+"ISO 8879:1986//ENTITIES Added Math Symbols: Ordinary//EN">
+<!--end of ISOamso.module-->]]>
+
+<!ENTITY % ISOamsr.module "INCLUDE">
+<![ %ISOamsr.module; [
+<!ENTITY % ISOamsr PUBLIC
+"ISO 8879:1986//ENTITIES Added Math Symbols: Relations//EN">
+<!--end of ISOamsr.module-->]]>
+
+<!ENTITY % ISObox.module "INCLUDE">
+<![ %ISObox.module; [
+<!ENTITY % ISObox PUBLIC
+"ISO 8879:1986//ENTITIES Box and Line Drawing//EN">
+<!--end of ISObox.module-->]]>
+
+<!ENTITY % ISOcyr1.module "INCLUDE">
+<![ %ISOcyr1.module; [
+<!ENTITY % ISOcyr1 PUBLIC
+"ISO 8879:1986//ENTITIES Russian Cyrillic//EN">
+<!--end of ISOcyr1.module-->]]>
+
+<!ENTITY % ISOcyr2.module "INCLUDE">
+<![ %ISOcyr2.module; [
+<!ENTITY % ISOcyr2 PUBLIC
+"ISO 8879:1986//ENTITIES Non-Russian Cyrillic//EN">
+<!--end of ISOcyr2.module-->]]>
+
+<!ENTITY % ISOdia.module "INCLUDE">
+<![ %ISOdia.module; [
+<!ENTITY % ISOdia PUBLIC
+"ISO 8879:1986//ENTITIES Diacritical Marks//EN">
+<!--end of ISOdia.module-->]]>
+
+<!ENTITY % ISOgrk1.module "INCLUDE">
+<![ %ISOgrk1.module; [
+<!ENTITY % ISOgrk1 PUBLIC
+"ISO 8879:1986//ENTITIES Greek Letters//EN">
+<!--end of ISOgrk1.module-->]]>
+
+<!ENTITY % ISOgrk2.module "INCLUDE">
+<![ %ISOgrk2.module; [
+<!ENTITY % ISOgrk2 PUBLIC
+"ISO 8879:1986//ENTITIES Monotoniko Greek//EN">
+<!--end of ISOgrk2.module-->]]>
+
+<!ENTITY % ISOgrk3.module "INCLUDE">
+<![ %ISOgrk3.module; [
+<!ENTITY % ISOgrk3 PUBLIC
+"ISO 8879:1986//ENTITIES Greek Symbols//EN">
+<!--end of ISOgrk3.module-->]]>
+
+<!ENTITY % ISOgrk4.module "INCLUDE">
+<![ %ISOgrk4.module; [
+<!ENTITY % ISOgrk4 PUBLIC
+"ISO 8879:1986//ENTITIES Alternative Greek Symbols//EN">
+<!--end of ISOgrk4.module-->]]>
+
+<!ENTITY % ISOlat1.module "INCLUDE">
+<![ %ISOlat1.module; [
+<!ENTITY % ISOlat1 PUBLIC
+"ISO 8879:1986//ENTITIES Added Latin 1//EN">
+<!--end of ISOlat1.module-->]]>
+
+<!ENTITY % ISOlat2.module "INCLUDE">
+<![ %ISOlat2.module; [
+<!ENTITY % ISOlat2 PUBLIC
+"ISO 8879:1986//ENTITIES Added Latin 2//EN">
+<!--end of ISOlat2.module-->]]>
+
+<!ENTITY % ISOnum.module "INCLUDE">
+<![ %ISOnum.module; [
+<!ENTITY % ISOnum PUBLIC
+"ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN">
+<!--end of ISOnum.module-->]]>
+
+<!ENTITY % ISOpub.module "INCLUDE">
+<![ %ISOpub.module; [
+<!ENTITY % ISOpub PUBLIC
+"ISO 8879:1986//ENTITIES Publishing//EN">
+<!--end of ISOpub.module-->]]>
+
+<!ENTITY % ISOtech.module "INCLUDE">
+<![ %ISOtech.module; [
+<!ENTITY % ISOtech PUBLIC
+"ISO 8879:1986//ENTITIES General Technical//EN">
+<!--end of ISOtech.module-->]]>
+
+<!--end of sgml.features-->]]>
+
+<![%xml.features;[
+
+<!ENTITY % ISOamsa.module "INCLUDE">
+<![%ISOamsa.module;[
+<!ENTITY % ISOamsa PUBLIC
+"ISO 8879:1986//ENTITIES Added Math Symbols: Arrow Relations//EN//XML"
+"ent/iso-amsa.ent">
+<!--end of ISOamsa.module-->]]>
+
+<!ENTITY % ISOamsb.module "INCLUDE">
+<![%ISOamsb.module;[
+<!ENTITY % ISOamsb PUBLIC
+"ISO 8879:1986//ENTITIES Added Math Symbols: Binary Operators//EN//XML"
+"ent/iso-amsb.ent">
+<!--end of ISOamsb.module-->]]>
+
+<!ENTITY % ISOamsc.module "INCLUDE">
+<![%ISOamsc.module;[
+<!ENTITY % ISOamsc PUBLIC
+"ISO 8879:1986//ENTITIES Added Math Symbols: Delimiters//EN//XML"
+"ent/iso-amsc.ent">
+<!--end of ISOamsc.module-->]]>
+
+<!ENTITY % ISOamsn.module "INCLUDE">
+<![%ISOamsn.module;[
+<!ENTITY % ISOamsn PUBLIC
+"ISO 8879:1986//ENTITIES Added Math Symbols: Negated Relations//EN//XML"
+"ent/iso-amsn.ent">
+<!--end of ISOamsn.module-->]]>
+
+<!ENTITY % ISOamso.module "INCLUDE">
+<![%ISOamso.module;[
+<!ENTITY % ISOamso PUBLIC
+"ISO 8879:1986//ENTITIES Added Math Symbols: Ordinary//EN//XML"
+"ent/iso-amso.ent">
+<!--end of ISOamso.module-->]]>
+
+<!ENTITY % ISOamsr.module "INCLUDE">
+<![%ISOamsr.module;[
+<!ENTITY % ISOamsr PUBLIC
+"ISO 8879:1986//ENTITIES Added Math Symbols: Relations//EN//XML"
+"ent/iso-amsr.ent">
+<!--end of ISOamsr.module-->]]>
+
+<!ENTITY % ISObox.module "INCLUDE">
+<![%ISObox.module;[
+<!ENTITY % ISObox PUBLIC
+"ISO 8879:1986//ENTITIES Box and Line Drawing//EN//XML"
+"ent/iso-box.ent">
+<!--end of ISObox.module-->]]>
+
+<!ENTITY % ISOcyr1.module "INCLUDE">
+<![%ISOcyr1.module;[
+<!ENTITY % ISOcyr1 PUBLIC
+"ISO 8879:1986//ENTITIES Russian Cyrillic//EN//XML"
+"ent/iso-cyr1.ent">
+<!--end of ISOcyr1.module-->]]>
+
+<!ENTITY % ISOcyr2.module "INCLUDE">
+<![%ISOcyr2.module;[
+<!ENTITY % ISOcyr2 PUBLIC
+"ISO 8879:1986//ENTITIES Non-Russian Cyrillic//EN//XML"
+"ent/iso-cyr2.ent">
+<!--end of ISOcyr2.module-->]]>
+
+<!ENTITY % ISOdia.module "INCLUDE">
+<![%ISOdia.module;[
+<!ENTITY % ISOdia PUBLIC
+"ISO 8879:1986//ENTITIES Diacritical Marks//EN//XML"
+"ent/iso-dia.ent">
+<!--end of ISOdia.module-->]]>
+
+<!ENTITY % ISOgrk1.module "INCLUDE">
+<![%ISOgrk1.module;[
+<!ENTITY % ISOgrk1 PUBLIC
+"ISO 8879:1986//ENTITIES Greek Letters//EN//XML"
+"ent/iso-grk1.ent">
+<!--end of ISOgrk1.module-->]]>
+
+<!ENTITY % ISOgrk2.module "INCLUDE">
+<![%ISOgrk2.module;[
+<!ENTITY % ISOgrk2 PUBLIC
+"ISO 8879:1986//ENTITIES Monotoniko Greek//EN//XML"
+"ent/iso-grk2.ent">
+<!--end of ISOgrk2.module-->]]>
+
+<!ENTITY % ISOgrk3.module "INCLUDE">
+<![%ISOgrk3.module;[
+<!ENTITY % ISOgrk3 PUBLIC
+"ISO 8879:1986//ENTITIES Greek Symbols//EN//XML"
+"ent/iso-grk3.ent">
+<!--end of ISOgrk3.module-->]]>
+
+<!ENTITY % ISOgrk4.module "INCLUDE">
+<![%ISOgrk4.module;[
+<!ENTITY % ISOgrk4 PUBLIC
+"ISO 8879:1986//ENTITIES Alternative Greek Symbols//EN//XML"
+"ent/iso-grk4.ent">
+<!--end of ISOgrk4.module-->]]>
+
+<!ENTITY % ISOlat1.module "INCLUDE">
+<![%ISOlat1.module;[
+<!ENTITY % ISOlat1 PUBLIC
+"ISO 8879:1986//ENTITIES Added Latin 1//EN//XML"
+"ent/iso-lat1.ent">
+<!--end of ISOlat1.module-->]]>
+
+<!ENTITY % ISOlat2.module "INCLUDE">
+<![%ISOlat2.module;[
+<!ENTITY % ISOlat2 PUBLIC
+"ISO 8879:1986//ENTITIES Added Latin 2//EN//XML"
+"ent/iso-lat2.ent">
+<!--end of ISOlat2.module-->]]>
+
+<!ENTITY % ISOnum.module "INCLUDE">
+<![%ISOnum.module;[
+<!ENTITY % ISOnum PUBLIC
+"ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN//XML"
+"ent/iso-num.ent">
+<!--end of ISOnum.module-->]]>
+
+<!ENTITY % ISOpub.module "INCLUDE">
+<![%ISOpub.module;[
+<!ENTITY % ISOpub PUBLIC
+"ISO 8879:1986//ENTITIES Publishing//EN//XML"
+"ent/iso-pub.ent">
+<!--end of ISOpub.module-->]]>
+
+<!ENTITY % ISOtech.module "INCLUDE">
+<![%ISOtech.module;[
+<!ENTITY % ISOtech PUBLIC
+"ISO 8879:1986//ENTITIES General Technical//EN//XML"
+"ent/iso-tech.ent">
+<!--end of ISOtech.module-->]]>
+
+<!--end of xml.features-->]]>
+
+<![ %ISOamsa.module; [
+%ISOamsa;
+]]>
+
+<![ %ISOamsb.module; [
+%ISOamsb;
+]]>
+
+<![ %ISOamsc.module; [
+%ISOamsc;
+]]>
+
+<![ %ISOamsn.module; [
+%ISOamsn;
+]]>
+
+<![ %ISOamso.module; [
+%ISOamso;
+]]>
+
+<![ %ISOamsr.module; [
+%ISOamsr;
+]]>
+
+<![ %ISObox.module; [
+%ISObox;
+]]>
+
+<![ %ISOcyr1.module; [
+%ISOcyr1;
+]]>
+
+<![ %ISOcyr2.module; [
+%ISOcyr2;
+]]>
+
+<![ %ISOdia.module; [
+%ISOdia;
+]]>
+
+<![ %ISOgrk1.module; [
+%ISOgrk1;
+]]>
+
+<![ %ISOgrk2.module; [
+%ISOgrk2;
+]]>
+
+<![ %ISOgrk3.module; [
+%ISOgrk3;
+]]>
+
+<![ %ISOgrk4.module; [
+%ISOgrk4;
+]]>
+
+<![ %ISOlat1.module; [
+%ISOlat1;
+]]>
+
+<![ %ISOlat2.module; [
+%ISOlat2;
+]]>
+
+<![ %ISOnum.module; [
+%ISOnum;
+]]>
+
+<![ %ISOpub.module; [
+%ISOpub;
+]]>
+
+<![ %ISOtech.module; [
+%ISOtech;
+]]>
+
+<!-- End of DocBook character entity sets module V4.3CR3 ..................... -->
+<!-- ...................................................................... -->

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/dbgenent.mod
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/dbgenent.mod	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/dbgenent.mod	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,41 @@
+<!-- ...................................................................... -->
+<!-- DocBook additional general entities V4.3CR3 ............................. -->
+
+<!-- Copyright 1992-2002 HaL Computer Systems, Inc.,
+     O'Reilly & Associates, Inc., ArborText, Inc., Fujitsu Software
+     Corporation, Norman Walsh, Sun Microsystems, Inc., and the
+     Organization for the Advancement of Structured Information
+     Standards (OASIS).
+
+     In DTD driver files referring to this module, please use an entity
+     declaration that uses the public identifier shown below:
+
+     <!ENTITY % dbgenent PUBLIC
+     "-//OASIS//ENTITIES DocBook Additional General Entities V4.3CR3//EN"
+     "dbgenent.mod">
+     %dbgenent;
+-->
+
+<!-- File dbgenent.mod .................................................... -->
+
+<!-- You can edit this file to add the following:
+
+     o General entity declarations of any kind.  For example:
+
+       <!ENTITY productname "WinWidget">          (small boilerplate)
+       <!ENTITY legal-notice SYSTEM "notice.sgm"> (large boilerplate)
+
+     o Notation declarations.  For example:
+
+       <!NOTATION chicken-scratch SYSTEM>
+
+     o Declarations for and references to external parameter entities
+       containing collections of any of the above.  For example:
+
+       <!ENTITY % all-titles PUBLIC "-//DocTools//ELEMENTS Book Titles//EN"
+           "booktitles.ent">
+       %all-titles;
+-->
+
+<!-- End of DocBook additional general entities V4.3CR3 ...................... -->
+<!-- ...................................................................... -->

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/dbhierx.mod
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/dbhierx.mod	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/dbhierx.mod	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,2116 @@
+<!-- ...................................................................... -->
+<!-- DocBook document hierarchy module V4.3CR3 ............................... -->
+<!-- File dbhierx.mod ..................................................... -->
+
+<!-- Copyright 1992-2002 HaL Computer Systems, Inc.,
+     O'Reilly & Associates, Inc., ArborText, Inc., Fujitsu Software
+     Corporation, Norman Walsh, Sun Microsystems, Inc., and the
+     Organization for the Advancement of Structured Information
+     Standards (OASIS).
+
+     $Id: dbhierx.mod,v 1.1.1.1 2004/10/19 21:21:34 juntao Exp $
+
+     Permission to use, copy, modify and distribute the DocBook DTD
+     and its accompanying documentation for any purpose and without fee
+     is hereby granted in perpetuity, provided that the above copyright
+     notice and this paragraph appear in all copies.  The copyright
+     holders make no representation about the suitability of the DTD for
+     any purpose.  It is provided "as is" without expressed or implied
+     warranty.
+
+     If you modify the DocBook DTD in any way, except for declaring and
+     referencing additional sets of general entities and declaring
+     additional notations, label your DTD as a variant of DocBook.  See
+     the maintenance documentation for more information.
+
+     Please direct all questions, bug reports, or suggestions for
+     changes to the docbook at lists.oasis-open.org mailing list. For more
+     information, see http://www.oasis-open.org/docbook/.
+-->
+
+<!-- ...................................................................... -->
+
+<!-- This module contains the definitions for the overall document
+     hierarchies of DocBook documents.  It covers computer documentation
+     manuals and manual fragments, as well as reference entries (such as
+     man pages) and technical journals or anthologies containing
+     articles.
+
+     This module depends on the DocBook information pool module.  All
+     elements and entities referenced but not defined here are assumed
+     to be defined in the information pool module.
+
+     In DTD driver files referring to this module, please use an entity
+     declaration that uses the public identifier shown below:
+
+     <!ENTITY % dbhier PUBLIC
+     "-//OASIS//ELEMENTS DocBook Document Hierarchy V4.3CR3//EN"
+     "dbhierx.mod">
+     %dbhier;
+
+     See the documentation for detailed information on the parameter
+     entity and module scheme used in DocBook, customizing DocBook and
+     planning for interchange, and changes made since the last release
+     of DocBook.
+-->
+
+<!-- ...................................................................... -->
+<!-- Entities for module inclusions ....................................... -->
+
+<!ENTITY % dbhier.redecl.module		"IGNORE">
+<!ENTITY % dbhier.redecl2.module	"IGNORE">
+
+<!-- ...................................................................... -->
+<!-- Entities for element classes ......................................... -->
+
+<!ENTITY % local.appendix.class "">
+<!ENTITY % appendix.class	"appendix %local.appendix.class;">
+
+<!ENTITY % local.article.class "">
+<!ENTITY % article.class	"article %local.article.class;">
+
+<!ENTITY % local.book.class "">
+<!ENTITY % book.class		"book %local.book.class;">
+
+<!ENTITY % local.chapter.class "">
+<!ENTITY % chapter.class	"chapter %local.chapter.class;">
+
+<!ENTITY % local.index.class "">
+<!ENTITY % index.class		"index|setindex %local.index.class;">
+
+<!ENTITY % local.refentry.class "">
+<!ENTITY % refentry.class	"refentry %local.refentry.class;">
+
+<!ENTITY % local.section.class "">
+<!ENTITY % section.class	"section %local.section.class;">
+
+<!ENTITY % local.nav.class "">
+<!ENTITY % nav.class		"toc|lot|index|glossary|bibliography
+				%local.nav.class;">
+
+<!-- Redeclaration placeholder ............................................ -->
+
+<!-- For redeclaring entities that are declared after this point while
+     retaining their references to the entities that are declared before
+     this point -->
+
+<![%dbhier.redecl.module;[
+<!-- Defining rdbhier here makes some buggy XML parsers happy. -->
+<!ENTITY % rdbhier "">
+%rdbhier;
+<!--end of dbhier.redecl.module-->]]>
+
+<!-- ...................................................................... -->
+<!-- Entities for element mixtures ........................................ -->
+
+<!-- The DocBook TC may produce an official forms module for DocBook. -->
+<!-- This PE provides the hook by which it can be inserted into the DTD. -->
+<!ENTITY % forms.hook "">
+
+<!ENTITY % local.divcomponent.mix "">
+<!ENTITY % divcomponent.mix
+		"%list.class;		|%admon.class;
+		|%linespecific.class;	|%synop.class;
+		|%para.class;		|%informal.class;
+		|%formal.class;		|%compound.class;
+		|%genobj.class;		|%descobj.class;
+		|%ndxterm.class;        |beginpage
+                %forms.hook;
+		%local.divcomponent.mix;">
+
+<!ENTITY % local.refcomponent.mix "">
+<!ENTITY % refcomponent.mix
+		"%list.class;		|%admon.class;
+		|%linespecific.class;	|%synop.class;
+		|%para.class;		|%informal.class;
+		|%formal.class;		|%compound.class;
+		|%genobj.class;		|%descobj.class;
+		|%ndxterm.class;        |beginpage
+		%local.refcomponent.mix;">
+
+<!ENTITY % local.indexdivcomponent.mix "">
+<!ENTITY % indexdivcomponent.mix
+		"itemizedlist|orderedlist|variablelist|simplelist
+		|%linespecific.class;	|%synop.class;
+		|%para.class;		|%informal.class;
+		|anchor|remark
+		|%link.char.class;
+ 		                        |beginpage
+		%local.indexdivcomponent.mix;">
+
+<!ENTITY % local.refname.char.mix "">
+<!ENTITY % refname.char.mix
+		"#PCDATA
+		|%tech.char.class;
+		%local.refname.char.mix;">
+
+<!ENTITY % local.partcontent.mix "">
+<!ENTITY % partcontent.mix
+		"%appendix.class;|%chapter.class;|%nav.class;|%article.class;
+		|preface|%refentry.class;|reference %local.partcontent.mix;">
+
+<!ENTITY % local.refinline.char.mix "">
+<!ENTITY % refinline.char.mix
+		"#PCDATA
+		|%xref.char.class;	|%gen.char.class;
+		|%link.char.class;	|%tech.char.class;
+		|%base.char.class;	|%docinfo.char.class;
+		|%other.char.class;
+		|%ndxterm.class;        |beginpage
+		%local.refinline.char.mix;">
+
+<!ENTITY % local.refclass.char.mix "">
+<!ENTITY % refclass.char.mix
+		"#PCDATA
+		|application
+		%local.refclass.char.mix;">
+
+<!-- Redeclaration placeholder 2 .......................................... -->
+
+<!-- For redeclaring entities that are declared after this point while
+     retaining their references to the entities that are declared before
+     this point -->
+
+<![%dbhier.redecl2.module;[
+<!-- Defining rdbhier2 here makes some buggy XML parsers happy. -->
+<!ENTITY % rdbhier2 "">
+%rdbhier2;
+<!--end of dbhier.redecl2.module-->]]>
+
+<!-- ...................................................................... -->
+<!-- Entities for content models .......................................... -->
+
+<!ENTITY % div.title.content
+	"title, subtitle?, titleabbrev?">
+
+<!ENTITY % bookcomponent.title.content
+	"title, subtitle?, titleabbrev?">
+
+<!ENTITY % sect.title.content
+	"title, subtitle?, titleabbrev?">
+
+<!ENTITY % refsect.title.content
+	"title, subtitle?, titleabbrev?">
+
+<!ENTITY % bookcomponent.content
+	"((%divcomponent.mix;)+,
+	(sect1*|(%refentry.class;)*|simplesect*|(%section.class;)*))
+	| (sect1+|(%refentry.class;)+|simplesect+|(%section.class;)+)">
+
+<!-- ...................................................................... -->
+<!-- Set and SetInfo ...................................................... -->
+
+<!ENTITY % set.content.module "INCLUDE">
+<![%set.content.module;[
+<!ENTITY % set.module "INCLUDE">
+<![%set.module;[
+<!ENTITY % local.set.attrib "">
+<!ENTITY % set.role.attrib "%role.attrib;">
+
+<!ENTITY % set.element "INCLUDE">
+<![%set.element;[
+<!ELEMENT set %ho; ((%div.title.content;)?, setinfo?, toc?, (set|%book.class;)+,
+		setindex?)
+		%ubiq.inclusion;>
+<!--end of set.element-->]]>
+
+<!-- FPI: SGML formal public identifier -->
+
+
+<!ENTITY % set.attlist "INCLUDE">
+<![%set.attlist;[
+<!ATTLIST set
+		fpi		CDATA		#IMPLIED
+		%status.attrib;
+		%common.attrib;
+		%set.role.attrib;
+		%local.set.attrib;
+>
+<!--end of set.attlist-->]]>
+<!--end of set.module-->]]>
+
+<!ENTITY % setinfo.module "INCLUDE">
+<![%setinfo.module;[
+<!ENTITY % local.setinfo.attrib "">
+<!ENTITY % setinfo.role.attrib "%role.attrib;">
+
+<!ENTITY % setinfo.element "INCLUDE">
+<![%setinfo.element;[
+<!ELEMENT setinfo %ho; ((%info.class;)+)
+		%beginpage.exclusion;>
+<!--end of setinfo.element-->]]>
+
+<!-- Contents: IDs of the ToC, Books, and SetIndex that comprise
+		the set, in the order of their appearance -->
+
+
+<!ENTITY % setinfo.attlist "INCLUDE">
+<![%setinfo.attlist;[
+<!ATTLIST setinfo
+		contents	IDREFS		#IMPLIED
+		%common.attrib;
+		%setinfo.role.attrib;
+		%local.setinfo.attrib;
+>
+<!--end of setinfo.attlist-->]]>
+<!--end of setinfo.module-->]]>
+<!--end of set.content.module-->]]>
+
+<!-- ...................................................................... -->
+<!-- Book and BookInfo .................................................... -->
+
+<!ENTITY % book.content.module "INCLUDE">
+<![%book.content.module;[
+<!ENTITY % book.module "INCLUDE">
+<![%book.module;[
+
+<!ENTITY % local.book.attrib "">
+<!ENTITY % book.role.attrib "%role.attrib;">
+
+<!ENTITY % book.element "INCLUDE">
+<![%book.element;[
+<!ELEMENT book %ho; ((%div.title.content;)?, bookinfo?,
+ 		(dedication | toc | lot
+ 		| glossary | bibliography | preface
+		| %chapter.class; | reference | part
+		| %article.class;
+ 		| %appendix.class;
+		| %index.class;
+		| colophon)*)
+		%ubiq.inclusion;>
+<!--end of book.element-->]]>
+
+<!-- FPI: SGML formal public identifier -->
+
+
+<!ENTITY % book.attlist "INCLUDE">
+<![%book.attlist;[
+<!ATTLIST book		fpi		CDATA		#IMPLIED
+		%label.attrib;
+		%status.attrib;
+		%common.attrib;
+		%book.role.attrib;
+		%local.book.attrib;
+>
+<!--end of book.attlist-->]]>
+<!--end of book.module-->]]>
+
+<!ENTITY % bookinfo.module "INCLUDE">
+<![%bookinfo.module;[
+<!ENTITY % local.bookinfo.attrib "">
+<!ENTITY % bookinfo.role.attrib "%role.attrib;">
+
+<!ENTITY % bookinfo.element "INCLUDE">
+<![%bookinfo.element;[
+<!ELEMENT bookinfo %ho; ((%info.class;)+)
+		%beginpage.exclusion;>
+<!--end of bookinfo.element-->]]>
+
+<!-- Contents: IDs of the ToC, LoTs, Prefaces, Parts, Chapters,
+		Appendixes, References, GLossary, Bibliography, and indexes
+		comprising the Book, in the order of their appearance -->
+
+
+<!ENTITY % bookinfo.attlist "INCLUDE">
+<![%bookinfo.attlist;[
+<!ATTLIST bookinfo
+		contents	IDREFS		#IMPLIED
+		%common.attrib;
+		%bookinfo.role.attrib;
+		%local.bookinfo.attrib;
+>
+<!--end of bookinfo.attlist-->]]>
+<!--end of bookinfo.module-->]]>
+<!--end of book.content.module-->]]>
+
+<!-- ...................................................................... -->
+<!-- Dedication, ToC, and LoT ............................................. -->
+
+<!ENTITY % dedication.module "INCLUDE">
+<![%dedication.module;[
+<!ENTITY % local.dedication.attrib "">
+<!ENTITY % dedication.role.attrib "%role.attrib;">
+
+<!ENTITY % dedication.element "INCLUDE">
+<![%dedication.element;[
+<!ELEMENT dedication %ho; ((%sect.title.content;)?, (%legalnotice.mix;)+)>
+<!--end of dedication.element-->]]>
+
+<!ENTITY % dedication.attlist "INCLUDE">
+<![%dedication.attlist;[
+<!ATTLIST dedication
+		%status.attrib;
+		%common.attrib;
+		%dedication.role.attrib;
+		%local.dedication.attrib;
+>
+<!--end of dedication.attlist-->]]>
+<!--end of dedication.module-->]]>
+
+<!ENTITY % colophon.module "INCLUDE">
+<![ %colophon.module; [
+<!ENTITY % local.colophon.attrib "">
+<!ENTITY % colophon.role.attrib "%role.attrib;">
+
+<!ENTITY % colophon.element "INCLUDE">
+<![ %colophon.element; [
+<!ELEMENT colophon %ho; ((%sect.title.content;)?, (%textobject.mix;)+)>
+<!--end of colophon.element-->]]>
+
+<!ENTITY % colophon.attlist "INCLUDE">
+<![ %colophon.attlist; [
+<!ATTLIST colophon
+		%status.attrib;
+		%common.attrib;
+		%colophon.role.attrib;
+		%local.colophon.attrib;>
+<!--end of colophon.attlist-->]]>
+<!--end of colophon.module-->]]>
+
+<!ENTITY % toc.content.module "INCLUDE">
+<![%toc.content.module;[
+<!ENTITY % toc.module "INCLUDE">
+<![%toc.module;[
+<!ENTITY % local.toc.attrib "">
+<!ENTITY % toc.role.attrib "%role.attrib;">
+
+<!ENTITY % toc.element "INCLUDE">
+<![%toc.element;[
+<!ELEMENT toc %ho; (beginpage?,
+		(%bookcomponent.title.content;)?,
+		tocfront*,
+		(tocpart | tocchap)*, tocback*)>
+<!--end of toc.element-->]]>
+
+<!ENTITY % toc.attlist "INCLUDE">
+<![%toc.attlist;[
+<!ATTLIST toc
+		%pagenum.attrib;
+		%common.attrib;
+		%toc.role.attrib;
+		%local.toc.attrib;
+>
+<!--end of toc.attlist-->]]>
+<!--end of toc.module-->]]>
+
+<!ENTITY % tocfront.module "INCLUDE">
+<![%tocfront.module;[
+<!ENTITY % local.tocfront.attrib "">
+<!ENTITY % tocfront.role.attrib "%role.attrib;">
+
+<!ENTITY % tocfront.element "INCLUDE">
+<![%tocfront.element;[
+<!ELEMENT tocfront %ho; (%para.char.mix;)*>
+<!--end of tocfront.element-->]]>
+
+<!-- to element that this entry represents -->
+
+
+<!ENTITY % tocfront.attlist "INCLUDE">
+<![%tocfront.attlist;[
+<!ATTLIST tocfront
+		%label.attrib;
+		%linkend.attrib;		%pagenum.attrib;
+		%common.attrib;
+		%tocfront.role.attrib;
+		%local.tocfront.attrib;
+>
+<!--end of tocfront.attlist-->]]>
+<!--end of tocfront.module-->]]>
+
+<!ENTITY % tocentry.module "INCLUDE">
+<![%tocentry.module;[
+<!ENTITY % local.tocentry.attrib "">
+<!ENTITY % tocentry.role.attrib "%role.attrib;">
+
+<!ENTITY % tocentry.element "INCLUDE">
+<![%tocentry.element;[
+<!ELEMENT tocentry %ho; (%para.char.mix;)*>
+<!--end of tocentry.element-->]]>
+
+<!-- to element that this entry represents -->
+
+
+<!ENTITY % tocentry.attlist "INCLUDE">
+<![%tocentry.attlist;[
+<!ATTLIST tocentry
+		%linkend.attrib;		%pagenum.attrib;
+		%common.attrib;
+		%tocentry.role.attrib;
+		%local.tocentry.attrib;
+>
+<!--end of tocentry.attlist-->]]>
+<!--end of tocentry.module-->]]>
+
+<!ENTITY % tocpart.module "INCLUDE">
+<![%tocpart.module;[
+<!ENTITY % local.tocpart.attrib "">
+<!ENTITY % tocpart.role.attrib "%role.attrib;">
+
+<!ENTITY % tocpart.element "INCLUDE">
+<![%tocpart.element;[
+<!ELEMENT tocpart %ho; (tocentry+, tocchap*)>
+<!--end of tocpart.element-->]]>
+
+<!ENTITY % tocpart.attlist "INCLUDE">
+<![%tocpart.attlist;[
+<!ATTLIST tocpart
+		%common.attrib;
+		%tocpart.role.attrib;
+		%local.tocpart.attrib;
+>
+<!--end of tocpart.attlist-->]]>
+<!--end of tocpart.module-->]]>
+
+<!ENTITY % tocchap.module "INCLUDE">
+<![%tocchap.module;[
+<!ENTITY % local.tocchap.attrib "">
+<!ENTITY % tocchap.role.attrib "%role.attrib;">
+
+<!ENTITY % tocchap.element "INCLUDE">
+<![%tocchap.element;[
+<!ELEMENT tocchap %ho; (tocentry+, toclevel1*)>
+<!--end of tocchap.element-->]]>
+
+<!ENTITY % tocchap.attlist "INCLUDE">
+<![%tocchap.attlist;[
+<!ATTLIST tocchap
+		%label.attrib;
+		%common.attrib;
+		%tocchap.role.attrib;
+		%local.tocchap.attrib;
+>
+<!--end of tocchap.attlist-->]]>
+<!--end of tocchap.module-->]]>
+
+<!ENTITY % toclevel1.module "INCLUDE">
+<![%toclevel1.module;[
+<!ENTITY % local.toclevel1.attrib "">
+<!ENTITY % toclevel1.role.attrib "%role.attrib;">
+
+<!ENTITY % toclevel1.element "INCLUDE">
+<![%toclevel1.element;[
+<!ELEMENT toclevel1 %ho; (tocentry+, toclevel2*)>
+<!--end of toclevel1.element-->]]>
+
+<!ENTITY % toclevel1.attlist "INCLUDE">
+<![%toclevel1.attlist;[
+<!ATTLIST toclevel1
+		%common.attrib;
+		%toclevel1.role.attrib;
+		%local.toclevel1.attrib;
+>
+<!--end of toclevel1.attlist-->]]>
+<!--end of toclevel1.module-->]]>
+
+<!ENTITY % toclevel2.module "INCLUDE">
+<![%toclevel2.module;[
+<!ENTITY % local.toclevel2.attrib "">
+<!ENTITY % toclevel2.role.attrib "%role.attrib;">
+
+<!ENTITY % toclevel2.element "INCLUDE">
+<![%toclevel2.element;[
+<!ELEMENT toclevel2 %ho; (tocentry+, toclevel3*)>
+<!--end of toclevel2.element-->]]>
+
+<!ENTITY % toclevel2.attlist "INCLUDE">
+<![%toclevel2.attlist;[
+<!ATTLIST toclevel2
+		%common.attrib;
+		%toclevel2.role.attrib;
+		%local.toclevel2.attrib;
+>
+<!--end of toclevel2.attlist-->]]>
+<!--end of toclevel2.module-->]]>
+
+<!ENTITY % toclevel3.module "INCLUDE">
+<![%toclevel3.module;[
+<!ENTITY % local.toclevel3.attrib "">
+<!ENTITY % toclevel3.role.attrib "%role.attrib;">
+
+<!ENTITY % toclevel3.element "INCLUDE">
+<![%toclevel3.element;[
+<!ELEMENT toclevel3 %ho; (tocentry+, toclevel4*)>
+<!--end of toclevel3.element-->]]>
+
+<!ENTITY % toclevel3.attlist "INCLUDE">
+<![%toclevel3.attlist;[
+<!ATTLIST toclevel3
+		%common.attrib;
+		%toclevel3.role.attrib;
+		%local.toclevel3.attrib;
+>
+<!--end of toclevel3.attlist-->]]>
+<!--end of toclevel3.module-->]]>
+
+<!ENTITY % toclevel4.module "INCLUDE">
+<![%toclevel4.module;[
+<!ENTITY % local.toclevel4.attrib "">
+<!ENTITY % toclevel4.role.attrib "%role.attrib;">
+
+<!ENTITY % toclevel4.element "INCLUDE">
+<![%toclevel4.element;[
+<!ELEMENT toclevel4 %ho; (tocentry+, toclevel5*)>
+<!--end of toclevel4.element-->]]>
+
+<!ENTITY % toclevel4.attlist "INCLUDE">
+<![%toclevel4.attlist;[
+<!ATTLIST toclevel4
+		%common.attrib;
+		%toclevel4.role.attrib;
+		%local.toclevel4.attrib;
+>
+<!--end of toclevel4.attlist-->]]>
+<!--end of toclevel4.module-->]]>
+
+<!ENTITY % toclevel5.module "INCLUDE">
+<![%toclevel5.module;[
+<!ENTITY % local.toclevel5.attrib "">
+<!ENTITY % toclevel5.role.attrib "%role.attrib;">
+
+<!ENTITY % toclevel5.element "INCLUDE">
+<![%toclevel5.element;[
+<!ELEMENT toclevel5 %ho; (tocentry+)>
+<!--end of toclevel5.element-->]]>
+
+<!ENTITY % toclevel5.attlist "INCLUDE">
+<![%toclevel5.attlist;[
+<!ATTLIST toclevel5
+		%common.attrib;
+		%toclevel5.role.attrib;
+		%local.toclevel5.attrib;
+>
+<!--end of toclevel5.attlist-->]]>
+<!--end of toclevel5.module-->]]>
+
+<!ENTITY % tocback.module "INCLUDE">
+<![%tocback.module;[
+<!ENTITY % local.tocback.attrib "">
+<!ENTITY % tocback.role.attrib "%role.attrib;">
+
+<!ENTITY % tocback.element "INCLUDE">
+<![%tocback.element;[
+<!ELEMENT tocback %ho; (%para.char.mix;)*>
+<!--end of tocback.element-->]]>
+
+<!-- to element that this entry represents -->
+
+
+<!ENTITY % tocback.attlist "INCLUDE">
+<![%tocback.attlist;[
+<!ATTLIST tocback
+		%label.attrib;
+		%linkend.attrib;		%pagenum.attrib;
+		%common.attrib;
+		%tocback.role.attrib;
+		%local.tocback.attrib;
+>
+<!--end of tocback.attlist-->]]>
+<!--end of tocback.module-->]]>
+<!--end of toc.content.module-->]]>
+
+<!ENTITY % lot.content.module "INCLUDE">
+<![%lot.content.module;[
+<!ENTITY % lot.module "INCLUDE">
+<![%lot.module;[
+<!ENTITY % local.lot.attrib "">
+<!ENTITY % lot.role.attrib "%role.attrib;">
+
+<!ENTITY % lot.element "INCLUDE">
+<![%lot.element;[
+<!ELEMENT lot %ho; (beginpage?, (%bookcomponent.title.content;)?, lotentry*)>
+<!--end of lot.element-->]]>
+
+<!ENTITY % lot.attlist "INCLUDE">
+<![%lot.attlist;[
+<!ATTLIST lot
+		%label.attrib;
+		%common.attrib;
+		%lot.role.attrib;
+		%local.lot.attrib;
+>
+<!--end of lot.attlist-->]]>
+<!--end of lot.module-->]]>
+
+<!ENTITY % lotentry.module "INCLUDE">
+<![%lotentry.module;[
+<!ENTITY % local.lotentry.attrib "">
+<!ENTITY % lotentry.role.attrib "%role.attrib;">
+
+<!ENTITY % lotentry.element "INCLUDE">
+<![%lotentry.element;[
+<!ELEMENT lotentry %ho; (%para.char.mix;)*>
+<!--end of lotentry.element-->]]>
+
+<!-- SrcCredit: Information about the source of the entry,
+		as for a list of illustrations -->
+<!-- linkend: to element that this entry represents-->
+<!ENTITY % lotentry.attlist "INCLUDE">
+<![%lotentry.attlist;[
+<!ATTLIST lotentry
+		%linkend.attrib;
+		%pagenum.attrib;
+		srccredit	CDATA		#IMPLIED
+		%common.attrib;
+		%lotentry.role.attrib;
+		%local.lotentry.attrib;
+>
+<!--end of lotentry.attlist-->]]>
+<!--end of lotentry.module-->]]>
+<!--end of lot.content.module-->]]>
+
+<!-- ...................................................................... -->
+<!-- Appendix, Chapter, Part, Preface, Reference, PartIntro ............... -->
+
+<!ENTITY % appendix.module "INCLUDE">
+<![%appendix.module;[
+<!ENTITY % local.appendix.attrib "">
+<!ENTITY % appendix.role.attrib "%role.attrib;">
+
+<!ENTITY % appendix.element "INCLUDE">
+<![%appendix.element;[
+<!ELEMENT appendix %ho; (beginpage?,
+                     appendixinfo?,
+                     (%bookcomponent.title.content;),
+                     (%nav.class;)*,
+                     tocchap?,
+                     (%bookcomponent.content;),
+                     (%nav.class;)*)
+		%ubiq.inclusion;>
+<!--end of appendix.element-->]]>
+
+<!ENTITY % appendix.attlist "INCLUDE">
+<![%appendix.attlist;[
+<!ATTLIST appendix
+		%label.attrib;
+		%status.attrib;
+		%common.attrib;
+		%appendix.role.attrib;
+		%local.appendix.attrib;
+>
+<!--end of appendix.attlist-->]]>
+<!--end of appendix.module-->]]>
+
+<!ENTITY % chapter.module "INCLUDE">
+<![%chapter.module;[
+<!ENTITY % local.chapter.attrib "">
+<!ENTITY % chapter.role.attrib "%role.attrib;">
+
+<!ENTITY % chapter.element "INCLUDE">
+<![%chapter.element;[
+<!ELEMENT chapter %ho; (beginpage?,
+                    chapterinfo?,
+                    (%bookcomponent.title.content;),
+                    (%nav.class;)*,
+                    tocchap?,
+                    (%bookcomponent.content;),
+                    (%nav.class;)*)
+		%ubiq.inclusion;>
+<!--end of chapter.element-->]]>
+
+<!ENTITY % chapter.attlist "INCLUDE">
+<![%chapter.attlist;[
+<!ATTLIST chapter
+		%label.attrib;
+		%status.attrib;
+		%common.attrib;
+		%chapter.role.attrib;
+		%local.chapter.attrib;
+>
+<!--end of chapter.attlist-->]]>
+<!--end of chapter.module-->]]>
+
+<!ENTITY % part.module "INCLUDE">
+<![%part.module;[
+
+<!-- Note that Part was to have its content model reduced in V4.3CR3.  This
+change will not be made after all. -->
+
+<!ENTITY % local.part.attrib "">
+<!ENTITY % part.role.attrib "%role.attrib;">
+
+<!ENTITY % part.element "INCLUDE">
+<![%part.element;[
+<!ELEMENT part %ho; (beginpage?,
+                partinfo?, (%bookcomponent.title.content;), partintro?,
+		(%partcontent.mix;)+)
+		%ubiq.inclusion;>
+<!--end of part.element-->]]>
+
+<!ENTITY % part.attlist "INCLUDE">
+<![%part.attlist;[
+<!ATTLIST part
+		%label.attrib;
+		%status.attrib;
+		%common.attrib;
+		%part.role.attrib;
+		%local.part.attrib;
+>
+<!--end of part.attlist-->]]>
+<!--ELEMENT PartIntro (defined below)-->
+<!--end of part.module-->]]>
+
+<!ENTITY % preface.module "INCLUDE">
+<![%preface.module;[
+<!ENTITY % local.preface.attrib "">
+<!ENTITY % preface.role.attrib "%role.attrib;">
+
+<!ENTITY % preface.element "INCLUDE">
+<![%preface.element;[
+<!ELEMENT preface %ho; (beginpage?,
+                    prefaceinfo?,
+                    (%bookcomponent.title.content;),
+                    (%nav.class;)*,
+                    tocchap?,
+                    (%bookcomponent.content;),
+                    (%nav.class;)*)
+		%ubiq.inclusion;>
+<!--end of preface.element-->]]>
+
+<!ENTITY % preface.attlist "INCLUDE">
+<![%preface.attlist;[
+<!ATTLIST preface
+		%status.attrib;
+		%common.attrib;
+		%preface.role.attrib;
+		%local.preface.attrib;
+>
+<!--end of preface.attlist-->]]>
+<!--end of preface.module-->]]>
+
+<!ENTITY % reference.module "INCLUDE">
+<![%reference.module;[
+<!ENTITY % local.reference.attrib "">
+<!ENTITY % reference.role.attrib "%role.attrib;">
+
+<!ENTITY % reference.element "INCLUDE">
+<![%reference.element;[
+<!ELEMENT reference %ho; (beginpage?,
+                     referenceinfo?,
+                     (%bookcomponent.title.content;), partintro?,
+                     (%refentry.class;)+)
+		%ubiq.inclusion;>
+<!--end of reference.element-->]]>
+
+<!ENTITY % reference.attlist "INCLUDE">
+<![%reference.attlist;[
+<!ATTLIST reference
+		%label.attrib;
+		%status.attrib;
+		%common.attrib;
+		%reference.role.attrib;
+		%local.reference.attrib;
+>
+<!--end of reference.attlist-->]]>
+<!--ELEMENT PartIntro (defined below)-->
+<!--end of reference.module-->]]>
+
+<!ENTITY % partintro.module "INCLUDE">
+<![%partintro.module;[
+<!ENTITY % local.partintro.attrib "">
+<!ENTITY % partintro.role.attrib "%role.attrib;">
+
+<!ENTITY % partintro.element "INCLUDE">
+<![%partintro.element;[
+<!ELEMENT partintro %ho; ((%div.title.content;)?, (%bookcomponent.content;))
+		%ubiq.inclusion;>
+<!--end of partintro.element-->]]>
+
+<!ENTITY % partintro.attlist "INCLUDE">
+<![%partintro.attlist;[
+<!ATTLIST partintro
+		%label.attrib;
+		%common.attrib;
+		%partintro.role.attrib;
+		%local.partintro.attrib;
+>
+<!--end of partintro.attlist-->]]>
+<!--end of partintro.module-->]]>
+
+<!-- ...................................................................... -->
+<!-- Other Info elements .................................................. -->
+
+<!ENTITY % appendixinfo.module "INCLUDE">
+<![ %appendixinfo.module; [
+<!ENTITY % local.appendixinfo.attrib "">
+<!ENTITY % appendixinfo.role.attrib "%role.attrib;">
+
+<!ENTITY % appendixinfo.element "INCLUDE">
+<![ %appendixinfo.element; [
+<!ELEMENT appendixinfo %ho; ((%info.class;)+)
+		%beginpage.exclusion;>
+<!--end of appendixinfo.element-->]]>
+
+<!ENTITY % appendixinfo.attlist "INCLUDE">
+<![ %appendixinfo.attlist; [
+<!ATTLIST appendixinfo
+		%common.attrib;
+		%appendixinfo.role.attrib;
+		%local.appendixinfo.attrib;
+>
+<!--end of appendixinfo.attlist-->]]>
+<!--end of appendixinfo.module-->]]>
+
+<!ENTITY % bibliographyinfo.module "INCLUDE">
+<![ %bibliographyinfo.module; [
+<!ENTITY % local.bibliographyinfo.attrib "">
+<!ENTITY % bibliographyinfo.role.attrib "%role.attrib;">
+
+<!ENTITY % bibliographyinfo.element "INCLUDE">
+<![ %bibliographyinfo.element; [
+<!ELEMENT bibliographyinfo %ho; ((%info.class;)+)
+		%beginpage.exclusion;>
+<!--end of bibliographyinfo.element-->]]>
+
+<!ENTITY % bibliographyinfo.attlist "INCLUDE">
+<![ %bibliographyinfo.attlist; [
+<!ATTLIST bibliographyinfo
+		%common.attrib;
+		%bibliographyinfo.role.attrib;
+		%local.bibliographyinfo.attrib;
+>
+<!--end of bibliographyinfo.attlist-->]]>
+<!--end of bibliographyinfo.module-->]]>
+
+<!ENTITY % chapterinfo.module "INCLUDE">
+<![ %chapterinfo.module; [
+<!ENTITY % local.chapterinfo.attrib "">
+<!ENTITY % chapterinfo.role.attrib "%role.attrib;">
+
+<!ENTITY % chapterinfo.element "INCLUDE">
+<![ %chapterinfo.element; [
+<!ELEMENT chapterinfo %ho; ((%info.class;)+)
+		%beginpage.exclusion;>
+<!--end of chapterinfo.element-->]]>
+
+<!ENTITY % chapterinfo.attlist "INCLUDE">
+<![ %chapterinfo.attlist; [
+<!ATTLIST chapterinfo
+		%common.attrib;
+		%chapterinfo.role.attrib;
+		%local.chapterinfo.attrib;
+>
+<!--end of chapterinfo.attlist-->]]>
+<!--end of chapterinfo.module-->]]>
+
+<!ENTITY % glossaryinfo.module "INCLUDE">
+<![ %glossaryinfo.module; [
+<!ENTITY % local.glossaryinfo.attrib "">
+<!ENTITY % glossaryinfo.role.attrib "%role.attrib;">
+
+<!ENTITY % glossaryinfo.element "INCLUDE">
+<![ %glossaryinfo.element; [
+<!ELEMENT glossaryinfo %ho; ((%info.class;)+)
+		%beginpage.exclusion;>
+<!--end of glossaryinfo.element-->]]>
+
+<!ENTITY % glossaryinfo.attlist "INCLUDE">
+<![ %glossaryinfo.attlist; [
+<!ATTLIST glossaryinfo
+		%common.attrib;
+		%glossaryinfo.role.attrib;
+		%local.glossaryinfo.attrib;
+>
+<!--end of glossaryinfo.attlist-->]]>
+<!--end of glossaryinfo.module-->]]>
+
+<!ENTITY % indexinfo.module "INCLUDE">
+<![ %indexinfo.module; [
+<!ENTITY % local.indexinfo.attrib "">
+<!ENTITY % indexinfo.role.attrib "%role.attrib;">
+
+<!ENTITY % indexinfo.element "INCLUDE">
+<![ %indexinfo.element; [
+<!ELEMENT indexinfo %ho; ((%info.class;)+)>
+<!--end of indexinfo.element-->]]>
+
+<!ENTITY % indexinfo.attlist "INCLUDE">
+<![ %indexinfo.attlist; [
+<!ATTLIST indexinfo
+		%common.attrib;
+		%indexinfo.role.attrib;
+		%local.indexinfo.attrib;
+>
+<!--end of indexinfo.attlist-->]]>
+<!--end of indexinfo.module-->]]>
+
+<!ENTITY % setindexinfo.module "INCLUDE">
+<![ %setindexinfo.module; [
+<!ENTITY % local.setindexinfo.attrib "">
+<!ENTITY % setindexinfo.role.attrib "%role.attrib;">
+
+<!ENTITY % setindexinfo.element "INCLUDE">
+<![ %setindexinfo.element; [
+<!ELEMENT setindexinfo %ho; ((%info.class;)+)
+		%beginpage.exclusion;>
+<!--end of setindexinfo.element-->]]>
+
+<!ENTITY % setindexinfo.attlist "INCLUDE">
+<![ %setindexinfo.attlist; [
+<!ATTLIST setindexinfo
+		%common.attrib;
+		%setindexinfo.role.attrib;
+		%local.setindexinfo.attrib;
+>
+<!--end of setindexinfo.attlist-->]]>
+<!--end of setindexinfo.module-->]]>
+
+<!ENTITY % partinfo.module "INCLUDE">
+<![ %partinfo.module; [
+<!ENTITY % local.partinfo.attrib "">
+<!ENTITY % partinfo.role.attrib "%role.attrib;">
+
+<!ENTITY % partinfo.element "INCLUDE">
+<![ %partinfo.element; [
+<!ELEMENT partinfo %ho; ((%info.class;)+)
+		%beginpage.exclusion;>
+<!--end of partinfo.element-->]]>
+
+<!ENTITY % partinfo.attlist "INCLUDE">
+<![ %partinfo.attlist; [
+<!ATTLIST partinfo
+		%common.attrib;
+		%partinfo.role.attrib;
+		%local.partinfo.attrib;
+>
+<!--end of partinfo.attlist-->]]>
+<!--end of partinfo.module-->]]>
+
+<!ENTITY % prefaceinfo.module "INCLUDE">
+<![ %prefaceinfo.module; [
+<!ENTITY % local.prefaceinfo.attrib "">
+<!ENTITY % prefaceinfo.role.attrib "%role.attrib;">
+
+<!ENTITY % prefaceinfo.element "INCLUDE">
+<![ %prefaceinfo.element; [
+<!ELEMENT prefaceinfo %ho; ((%info.class;)+)
+		%beginpage.exclusion;>
+<!--end of prefaceinfo.element-->]]>
+
+<!ENTITY % prefaceinfo.attlist "INCLUDE">
+<![ %prefaceinfo.attlist; [
+<!ATTLIST prefaceinfo
+		%common.attrib;
+		%prefaceinfo.role.attrib;
+		%local.prefaceinfo.attrib;
+>
+<!--end of prefaceinfo.attlist-->]]>
+<!--end of prefaceinfo.module-->]]>
+
+<!ENTITY % refentryinfo.module "INCLUDE">
+<![ %refentryinfo.module; [
+<!ENTITY % local.refentryinfo.attrib "">
+<!ENTITY % refentryinfo.role.attrib "%role.attrib;">
+
+<!ENTITY % refentryinfo.element "INCLUDE">
+<![ %refentryinfo.element; [
+<!ELEMENT refentryinfo %ho; ((%info.class;)+)
+		%beginpage.exclusion;>
+<!--end of refentryinfo.element-->]]>
+
+<!ENTITY % refentryinfo.attlist "INCLUDE">
+<![ %refentryinfo.attlist; [
+<!ATTLIST refentryinfo
+		%common.attrib;
+		%refentryinfo.role.attrib;
+		%local.refentryinfo.attrib;
+>
+<!--end of refentryinfo.attlist-->]]>
+<!--end of refentryinfo.module-->]]>
+
+<!ENTITY % refsectioninfo.module "INCLUDE">
+<![ %refsectioninfo.module; [
+<!ENTITY % local.refsectioninfo.attrib "">
+<!ENTITY % refsectioninfo.role.attrib "%role.attrib;">
+
+<!ENTITY % refsectioninfo.element "INCLUDE">
+<![ %refsectioninfo.element; [
+<!ELEMENT refsectioninfo %ho; ((%info.class;)+)
+		%beginpage.exclusion;>
+<!--end of refsectioninfo.element-->]]>
+
+<!ENTITY % refsectioninfo.attlist "INCLUDE">
+<![ %refsectioninfo.attlist; [
+<!ATTLIST refsectioninfo
+		%common.attrib;
+		%refsectioninfo.role.attrib;
+		%local.refsectioninfo.attrib;
+>
+<!--end of refsectioninfo.attlist-->]]>
+<!--end of refsectioninfo.module-->]]>
+
+<!ENTITY % refsect1info.module "INCLUDE">
+<![ %refsect1info.module; [
+<!ENTITY % local.refsect1info.attrib "">
+<!ENTITY % refsect1info.role.attrib "%role.attrib;">
+
+<!ENTITY % refsect1info.element "INCLUDE">
+<![ %refsect1info.element; [
+<!ELEMENT refsect1info %ho; ((%info.class;)+)
+		%beginpage.exclusion;>
+<!--end of refsect1info.element-->]]>
+
+<!ENTITY % refsect1info.attlist "INCLUDE">
+<![ %refsect1info.attlist; [
+<!ATTLIST refsect1info
+		%common.attrib;
+		%refsect1info.role.attrib;
+		%local.refsect1info.attrib;
+>
+<!--end of refsect1info.attlist-->]]>
+<!--end of refsect1info.module-->]]>
+
+<!ENTITY % refsect2info.module "INCLUDE">
+<![ %refsect2info.module; [
+<!ENTITY % local.refsect2info.attrib "">
+<!ENTITY % refsect2info.role.attrib "%role.attrib;">
+
+<!ENTITY % refsect2info.element "INCLUDE">
+<![ %refsect2info.element; [
+<!ELEMENT refsect2info %ho; ((%info.class;)+)
+		%beginpage.exclusion;>
+<!--end of refsect2info.element-->]]>
+
+<!ENTITY % refsect2info.attlist "INCLUDE">
+<![ %refsect2info.attlist; [
+<!ATTLIST refsect2info
+		%common.attrib;
+		%refsect2info.role.attrib;
+		%local.refsect2info.attrib;
+>
+<!--end of refsect2info.attlist-->]]>
+<!--end of refsect2info.module-->]]>
+
+<!ENTITY % refsect3info.module "INCLUDE">
+<![ %refsect3info.module; [
+<!ENTITY % local.refsect3info.attrib "">
+<!ENTITY % refsect3info.role.attrib "%role.attrib;">
+
+<!ENTITY % refsect3info.element "INCLUDE">
+<![ %refsect3info.element; [
+<!ELEMENT refsect3info %ho; ((%info.class;)+)
+		%beginpage.exclusion;>
+<!--end of refsect3info.element-->]]>
+
+<!ENTITY % refsect3info.attlist "INCLUDE">
+<![ %refsect3info.attlist; [
+<!ATTLIST refsect3info
+		%common.attrib;
+		%refsect3info.role.attrib;
+		%local.refsect3info.attrib;
+>
+<!--end of refsect3info.attlist-->]]>
+<!--end of refsect3info.module-->]]>
+
+<!ENTITY % refsynopsisdivinfo.module "INCLUDE">
+<![ %refsynopsisdivinfo.module; [
+<!ENTITY % local.refsynopsisdivinfo.attrib "">
+<!ENTITY % refsynopsisdivinfo.role.attrib "%role.attrib;">
+
+<!ENTITY % refsynopsisdivinfo.element "INCLUDE">
+<![ %refsynopsisdivinfo.element; [
+<!ELEMENT refsynopsisdivinfo %ho; ((%info.class;)+)
+		%beginpage.exclusion;>
+<!--end of refsynopsisdivinfo.element-->]]>
+
+<!ENTITY % refsynopsisdivinfo.attlist "INCLUDE">
+<![ %refsynopsisdivinfo.attlist; [
+<!ATTLIST refsynopsisdivinfo
+		%common.attrib;
+		%refsynopsisdivinfo.role.attrib;
+		%local.refsynopsisdivinfo.attrib;
+>
+<!--end of refsynopsisdivinfo.attlist-->]]>
+<!--end of refsynopsisdivinfo.module-->]]>
+
+<!ENTITY % referenceinfo.module "INCLUDE">
+<![ %referenceinfo.module; [
+<!ENTITY % local.referenceinfo.attrib "">
+<!ENTITY % referenceinfo.role.attrib "%role.attrib;">
+
+<!ENTITY % referenceinfo.element "INCLUDE">
+<![ %referenceinfo.element; [
+<!ELEMENT referenceinfo %ho; ((%info.class;)+)
+		%beginpage.exclusion;>
+<!--end of referenceinfo.element-->]]>
+
+<!ENTITY % referenceinfo.attlist "INCLUDE">
+<![ %referenceinfo.attlist; [
+<!ATTLIST referenceinfo
+		%common.attrib;
+		%referenceinfo.role.attrib;
+		%local.referenceinfo.attrib;
+>
+<!--end of referenceinfo.attlist-->]]>
+<!--end of referenceinfo.module-->]]>
+
+<!ENTITY % local.sect1info.attrib "">
+<!ENTITY % sect1info.role.attrib "%role.attrib;">
+
+<!ENTITY % sect1info.element "INCLUDE">
+<![%sect1info.element;[
+<!ELEMENT sect1info %ho; ((%info.class;)+)
+		%beginpage.exclusion;>
+<!--end of sect1info.element-->]]>
+
+<!ENTITY % sect1info.attlist "INCLUDE">
+<![%sect1info.attlist;[
+<!ATTLIST sect1info
+		%common.attrib;
+		%sect1info.role.attrib;
+		%local.sect1info.attrib;
+>
+<!--end of sect1info.attlist-->]]>
+
+<!ENTITY % local.sect2info.attrib "">
+<!ENTITY % sect2info.role.attrib "%role.attrib;">
+
+<!ENTITY % sect2info.element "INCLUDE">
+<![%sect2info.element;[
+<!ELEMENT sect2info %ho; ((%info.class;)+)
+		%beginpage.exclusion;>
+<!--end of sect2info.element-->]]>
+
+<!ENTITY % sect2info.attlist "INCLUDE">
+<![%sect2info.attlist;[
+<!ATTLIST sect2info
+		%common.attrib;
+		%sect2info.role.attrib;
+		%local.sect2info.attrib;
+>
+<!--end of sect2info.attlist-->]]>
+
+<!ENTITY % local.sect3info.attrib "">
+<!ENTITY % sect3info.role.attrib "%role.attrib;">
+
+<!ENTITY % sect3info.element "INCLUDE">
+<![%sect3info.element;[
+<!ELEMENT sect3info %ho; ((%info.class;)+)
+		%beginpage.exclusion;>
+<!--end of sect3info.element-->]]>
+
+<!ENTITY % sect3info.attlist "INCLUDE">
+<![%sect3info.attlist;[
+<!ATTLIST sect3info
+		%common.attrib;
+		%sect3info.role.attrib;
+		%local.sect3info.attrib;
+>
+<!--end of sect3info.attlist-->]]>
+
+<!ENTITY % local.sect4info.attrib "">
+<!ENTITY % sect4info.role.attrib "%role.attrib;">
+
+<!ENTITY % sect4info.element "INCLUDE">
+<![%sect4info.element;[
+<!ELEMENT sect4info %ho; ((%info.class;)+)
+		%beginpage.exclusion;>
+<!--end of sect4info.element-->]]>
+
+<!ENTITY % sect4info.attlist "INCLUDE">
+<![%sect4info.attlist;[
+<!ATTLIST sect4info
+		%common.attrib;
+		%sect4info.role.attrib;
+		%local.sect4info.attrib;
+>
+<!--end of sect4info.attlist-->]]>
+
+<!ENTITY % local.sect5info.attrib "">
+<!ENTITY % sect5info.role.attrib "%role.attrib;">
+
+<!ENTITY % sect5info.element "INCLUDE">
+<![%sect5info.element;[
+<!ELEMENT sect5info %ho; ((%info.class;)+)
+		%beginpage.exclusion;>
+<!--end of sect5info.element-->]]>
+
+<!ENTITY % sect5info.attlist "INCLUDE">
+<![%sect5info.attlist;[
+<!ATTLIST sect5info
+		%common.attrib;
+		%sect5info.role.attrib;
+		%local.sect5info.attrib;
+>
+<!--end of sect5info.attlist-->]]>
+
+<!-- ...................................................................... -->
+<!-- Section (parallel to Sect*) ......................................... -->
+
+<!ENTITY % section.content.module "INCLUDE">
+<![ %section.content.module; [
+<!ENTITY % section.module "INCLUDE">
+<![ %section.module; [
+<!ENTITY % local.section.attrib "">
+<!ENTITY % section.role.attrib "%role.attrib;">
+
+<!ENTITY % section.element "INCLUDE">
+<![ %section.element; [
+<!ELEMENT section %ho; (sectioninfo?,
+			(%sect.title.content;),
+			(%nav.class;)*,
+			(((%divcomponent.mix;)+,
+ 			  ((%refentry.class;)*|(%section.class;)*|simplesect*))
+			 | (%refentry.class;)+|(%section.class;)+|simplesect+),
+			(%nav.class;)*)
+		%ubiq.inclusion;>
+<!--end of section.element-->]]>
+
+<!ENTITY % section.attlist "INCLUDE">
+<![ %section.attlist; [
+<!ATTLIST section
+		%label.attrib;
+		%status.attrib;
+		%common.attrib;
+		%section.role.attrib;
+		%local.section.attrib;
+>
+<!--end of section.attlist-->]]>
+<!--end of section.module-->]]>
+
+<!ENTITY % sectioninfo.module "INCLUDE">
+<![ %sectioninfo.module; [
+<!ENTITY % sectioninfo.role.attrib "%role.attrib;">
+<!ENTITY % local.sectioninfo.attrib "">
+
+<!ENTITY % sectioninfo.element "INCLUDE">
+<![ %sectioninfo.element; [
+<!ELEMENT sectioninfo %ho; ((%info.class;)+)
+		%beginpage.exclusion;>
+<!--end of sectioninfo.element-->]]>
+
+<!ENTITY % sectioninfo.attlist "INCLUDE">
+<![ %sectioninfo.attlist; [
+<!ATTLIST sectioninfo
+		%common.attrib;
+		%sectioninfo.role.attrib;
+		%local.sectioninfo.attrib;
+>
+<!--end of sectioninfo.attlist-->]]>
+<!--end of sectioninfo.module-->]]>
+<!--end of section.content.module-->]]>
+
+<!-- ...................................................................... -->
+<!-- Sect1, Sect2, Sect3, Sect4, Sect5 .................................... -->
+
+<!ENTITY % sect1.module "INCLUDE">
+<![%sect1.module;[
+<!ENTITY % local.sect1.attrib "">
+<!ENTITY % sect1.role.attrib "%role.attrib;">
+
+<!ENTITY % sect1.element "INCLUDE">
+<![%sect1.element;[
+<!ELEMENT sect1 %ho; (sect1info?, (%sect.title.content;), (%nav.class;)*,
+		(((%divcomponent.mix;)+,
+		((%refentry.class;)* | sect2* | simplesect*))
+		| (%refentry.class;)+ | sect2+ | simplesect+), (%nav.class;)*)
+		%ubiq.inclusion;>
+<!--end of sect1.element-->]]>
+
+<!-- Renderas: Indicates the format in which the heading should
+		appear -->
+
+
+<!ENTITY % sect1.attlist "INCLUDE">
+<![%sect1.attlist;[
+<!ATTLIST sect1
+		renderas	(sect2
+				|sect3
+				|sect4
+				|sect5)		#IMPLIED
+		%label.attrib;
+		%status.attrib;
+		%common.attrib;
+		%sect1.role.attrib;
+		%local.sect1.attrib;
+>
+<!--end of sect1.attlist-->]]>
+<!--end of sect1.module-->]]>
+
+<!ENTITY % sect2.module "INCLUDE">
+<![%sect2.module;[
+<!ENTITY % local.sect2.attrib "">
+<!ENTITY % sect2.role.attrib "%role.attrib;">
+
+<!ENTITY % sect2.element "INCLUDE">
+<![%sect2.element;[
+<!ELEMENT sect2 %ho; (sect2info?, (%sect.title.content;), (%nav.class;)*,
+		(((%divcomponent.mix;)+,
+		((%refentry.class;)* | sect3* | simplesect*))
+		| (%refentry.class;)+ | sect3+ | simplesect+), (%nav.class;)*)>
+<!--end of sect2.element-->]]>
+
+<!-- Renderas: Indicates the format in which the heading should
+		appear -->
+
+
+<!ENTITY % sect2.attlist "INCLUDE">
+<![%sect2.attlist;[
+<!ATTLIST sect2
+		renderas	(sect1
+				|sect3
+				|sect4
+				|sect5)		#IMPLIED
+		%label.attrib;
+		%status.attrib;
+		%common.attrib;
+		%sect2.role.attrib;
+		%local.sect2.attrib;
+>
+<!--end of sect2.attlist-->]]>
+<!--end of sect2.module-->]]>
+
+<!ENTITY % sect3.module "INCLUDE">
+<![%sect3.module;[
+<!ENTITY % local.sect3.attrib "">
+<!ENTITY % sect3.role.attrib "%role.attrib;">
+
+<!ENTITY % sect3.element "INCLUDE">
+<![%sect3.element;[
+<!ELEMENT sect3 %ho; (sect3info?, (%sect.title.content;), (%nav.class;)*,
+		(((%divcomponent.mix;)+,
+		((%refentry.class;)* | sect4* | simplesect*))
+		| (%refentry.class;)+ | sect4+ | simplesect+), (%nav.class;)*)>
+<!--end of sect3.element-->]]>
+
+<!-- Renderas: Indicates the format in which the heading should
+		appear -->
+
+
+<!ENTITY % sect3.attlist "INCLUDE">
+<![%sect3.attlist;[
+<!ATTLIST sect3
+		renderas	(sect1
+				|sect2
+				|sect4
+				|sect5)		#IMPLIED
+		%label.attrib;
+		%status.attrib;
+		%common.attrib;
+		%sect3.role.attrib;
+		%local.sect3.attrib;
+>
+<!--end of sect3.attlist-->]]>
+<!--end of sect3.module-->]]>
+
+<!ENTITY % sect4.module "INCLUDE">
+<![%sect4.module;[
+<!ENTITY % local.sect4.attrib "">
+<!ENTITY % sect4.role.attrib "%role.attrib;">
+
+<!ENTITY % sect4.element "INCLUDE">
+<![%sect4.element;[
+<!ELEMENT sect4 %ho; (sect4info?, (%sect.title.content;), (%nav.class;)*,
+		(((%divcomponent.mix;)+,
+		((%refentry.class;)* | sect5* | simplesect*))
+		| (%refentry.class;)+ | sect5+ | simplesect+), (%nav.class;)*)>
+<!--end of sect4.element-->]]>
+
+<!-- Renderas: Indicates the format in which the heading should
+		appear -->
+
+
+<!ENTITY % sect4.attlist "INCLUDE">
+<![%sect4.attlist;[
+<!ATTLIST sect4
+		renderas	(sect1
+				|sect2
+				|sect3
+				|sect5)		#IMPLIED
+		%label.attrib;
+		%status.attrib;
+		%common.attrib;
+		%sect4.role.attrib;
+		%local.sect4.attrib;
+>
+<!--end of sect4.attlist-->]]>
+<!--end of sect4.module-->]]>
+
+<!ENTITY % sect5.module "INCLUDE">
+<![%sect5.module;[
+<!ENTITY % local.sect5.attrib "">
+<!ENTITY % sect5.role.attrib "%role.attrib;">
+
+<!ENTITY % sect5.element "INCLUDE">
+<![%sect5.element;[
+<!ELEMENT sect5 %ho; (sect5info?, (%sect.title.content;), (%nav.class;)*,
+		(((%divcomponent.mix;)+, ((%refentry.class;)* | simplesect*))
+		| (%refentry.class;)+ | simplesect+), (%nav.class;)*)>
+<!--end of sect5.element-->]]>
+
+<!-- Renderas: Indicates the format in which the heading should
+		appear -->
+
+
+<!ENTITY % sect5.attlist "INCLUDE">
+<![%sect5.attlist;[
+<!ATTLIST sect5
+		renderas	(sect1
+				|sect2
+				|sect3
+				|sect4)		#IMPLIED
+		%label.attrib;
+		%status.attrib;
+		%common.attrib;
+		%sect5.role.attrib;
+		%local.sect5.attrib;
+>
+<!--end of sect5.attlist-->]]>
+<!--end of sect5.module-->]]>
+
+<!ENTITY % simplesect.module "INCLUDE">
+<![%simplesect.module;[
+<!ENTITY % local.simplesect.attrib "">
+<!ENTITY % simplesect.role.attrib "%role.attrib;">
+
+<!ENTITY % simplesect.element "INCLUDE">
+<![%simplesect.element;[
+<!ELEMENT simplesect %ho; ((%sect.title.content;), (%divcomponent.mix;)+)
+		%ubiq.inclusion;>
+<!--end of simplesect.element-->]]>
+
+<!ENTITY % simplesect.attlist "INCLUDE">
+<![%simplesect.attlist;[
+<!ATTLIST simplesect
+		%common.attrib;
+		%simplesect.role.attrib;
+		%local.simplesect.attrib;
+>
+<!--end of simplesect.attlist-->]]>
+<!--end of simplesect.module-->]]>
+
+<!-- ...................................................................... -->
+<!-- Bibliography ......................................................... -->
+
+<!ENTITY % bibliography.content.module "INCLUDE">
+<![%bibliography.content.module;[
+<!ENTITY % bibliography.module "INCLUDE">
+<![%bibliography.module;[
+<!ENTITY % local.bibliography.attrib "">
+<!ENTITY % bibliography.role.attrib "%role.attrib;">
+
+<!ENTITY % bibliography.element "INCLUDE">
+<![%bibliography.element;[
+<!ELEMENT bibliography %ho; (bibliographyinfo?,
+                        (%bookcomponent.title.content;)?,
+                        (%component.mix;)*,
+                        (bibliodiv+ | (biblioentry|bibliomixed)+))>
+<!--end of bibliography.element-->]]>
+
+<!ENTITY % bibliography.attlist "INCLUDE">
+<![%bibliography.attlist;[
+<!ATTLIST bibliography
+		%status.attrib;
+		%common.attrib;
+		%bibliography.role.attrib;
+		%local.bibliography.attrib;
+>
+<!--end of bibliography.attlist-->]]>
+<!--end of bibliography.module-->]]>
+
+<!ENTITY % bibliodiv.module "INCLUDE">
+<![%bibliodiv.module;[
+<!ENTITY % local.bibliodiv.attrib "">
+<!ENTITY % bibliodiv.role.attrib "%role.attrib;">
+
+<!ENTITY % bibliodiv.element "INCLUDE">
+<![%bibliodiv.element;[
+<!ELEMENT bibliodiv %ho; ((%sect.title.content;)?, (%component.mix;)*,
+		(biblioentry|bibliomixed)+)>
+<!--end of bibliodiv.element-->]]>
+
+<!ENTITY % bibliodiv.attlist "INCLUDE">
+<![%bibliodiv.attlist;[
+<!ATTLIST bibliodiv
+		%status.attrib;
+		%common.attrib;
+		%bibliodiv.role.attrib;
+		%local.bibliodiv.attrib;
+>
+<!--end of bibliodiv.attlist-->]]>
+<!--end of bibliodiv.module-->]]>
+<!--end of bibliography.content.module-->]]>
+
+<!-- ...................................................................... -->
+<!-- Glossary ............................................................. -->
+
+<!ENTITY % glossary.content.module "INCLUDE">
+<![%glossary.content.module;[
+<!ENTITY % glossary.module "INCLUDE">
+<![%glossary.module;[
+<!ENTITY % local.glossary.attrib "">
+<!ENTITY % glossary.role.attrib "%role.attrib;">
+
+<!ENTITY % glossary.element "INCLUDE">
+<![%glossary.element;[
+<!ELEMENT glossary %ho; (glossaryinfo?,
+                    (%bookcomponent.title.content;)?,
+                    (%component.mix;)*,
+                    (glossdiv+ | glossentry+), bibliography?)>
+<!--end of glossary.element-->]]>
+
+<!ENTITY % glossary.attlist "INCLUDE">
+<![%glossary.attlist;[
+<!ATTLIST glossary
+		%status.attrib;
+		%common.attrib;
+		%glossary.role.attrib;
+		%local.glossary.attrib;
+>
+<!--end of glossary.attlist-->]]>
+<!--end of glossary.module-->]]>
+
+<!ENTITY % glossdiv.module "INCLUDE">
+<![%glossdiv.module;[
+<!ENTITY % local.glossdiv.attrib "">
+<!ENTITY % glossdiv.role.attrib "%role.attrib;">
+
+<!ENTITY % glossdiv.element "INCLUDE">
+<![%glossdiv.element;[
+<!ELEMENT glossdiv %ho; ((%sect.title.content;), (%component.mix;)*,
+		glossentry+)>
+<!--end of glossdiv.element-->]]>
+
+<!ENTITY % glossdiv.attlist "INCLUDE">
+<![%glossdiv.attlist;[
+<!ATTLIST glossdiv
+		%status.attrib;
+		%common.attrib;
+		%glossdiv.role.attrib;
+		%local.glossdiv.attrib;
+>
+<!--end of glossdiv.attlist-->]]>
+<!--end of glossdiv.module-->]]>
+<!--end of glossary.content.module-->]]>
+
+<!-- ...................................................................... -->
+<!-- Index and SetIndex ................................................... -->
+
+<!ENTITY % index.content.module "INCLUDE">
+<![%index.content.module;[
+<!ENTITY % indexes.module "INCLUDE">
+<![%indexes.module;[
+<!ENTITY % local.indexes.attrib "">
+<!ENTITY % indexes.role.attrib "%role.attrib;">
+
+<!ENTITY % index.element "INCLUDE">
+<![%index.element;[
+<!ELEMENT index %ho; (indexinfo?,
+                 (%bookcomponent.title.content;)?,
+                 (%component.mix;)*,
+                 (indexdiv* | indexentry*))
+		%ndxterm.exclusion;>
+<!--end of index.element-->]]>
+
+<!ENTITY % index.attlist "INCLUDE">
+<![%index.attlist;[
+<!ATTLIST index
+		type		CDATA		#IMPLIED
+		%common.attrib;
+		%indexes.role.attrib;
+		%local.indexes.attrib;
+>
+<!--end of index.attlist-->]]>
+
+<!ENTITY % setindex.element "INCLUDE">
+<![%setindex.element;[
+<!ELEMENT setindex %ho; (setindexinfo?,
+                    (%bookcomponent.title.content;)?,
+                    (%component.mix;)*,
+                    (indexdiv* | indexentry*))
+		%ndxterm.exclusion;>
+<!--end of setindex.element-->]]>
+
+<!ENTITY % setindex.attlist "INCLUDE">
+<![%setindex.attlist;[
+<!ATTLIST setindex
+		%common.attrib;
+		%indexes.role.attrib;
+		%local.indexes.attrib;
+>
+<!--end of setindex.attlist-->]]>
+<!--end of indexes.module-->]]>
+
+<!ENTITY % indexdiv.module "INCLUDE">
+<![%indexdiv.module;[
+
+<!-- SegmentedList in this content is useful for marking up permuted
+     indices. -->
+
+<!ENTITY % local.indexdiv.attrib "">
+<!ENTITY % indexdiv.role.attrib "%role.attrib;">
+
+<!ENTITY % indexdiv.element "INCLUDE">
+<![%indexdiv.element;[
+<!ELEMENT indexdiv %ho; ((%sect.title.content;)?, ((%indexdivcomponent.mix;)*,
+		(indexentry+ | segmentedlist)))>
+<!--end of indexdiv.element-->]]>
+
+<!ENTITY % indexdiv.attlist "INCLUDE">
+<![%indexdiv.attlist;[
+<!ATTLIST indexdiv
+		%common.attrib;
+		%indexdiv.role.attrib;
+		%local.indexdiv.attrib;
+>
+<!--end of indexdiv.attlist-->]]>
+<!--end of indexdiv.module-->]]>
+
+<!ENTITY % indexentry.module "INCLUDE">
+<![%indexentry.module;[
+<!-- Index entries appear in the index, not the text. -->
+
+<!ENTITY % local.indexentry.attrib "">
+<!ENTITY % indexentry.role.attrib "%role.attrib;">
+
+<!ENTITY % indexentry.element "INCLUDE">
+<![%indexentry.element;[
+<!ELEMENT indexentry %ho; (primaryie, (seeie|seealsoie)*,
+		(secondaryie, (seeie|seealsoie|tertiaryie)*)*)>
+<!--end of indexentry.element-->]]>
+
+<!ENTITY % indexentry.attlist "INCLUDE">
+<![%indexentry.attlist;[
+<!ATTLIST indexentry
+		%common.attrib;
+		%indexentry.role.attrib;
+		%local.indexentry.attrib;
+>
+<!--end of indexentry.attlist-->]]>
+<!--end of indexentry.module-->]]>
+
+<!ENTITY % primsecterie.module "INCLUDE">
+<![%primsecterie.module;[
+<!ENTITY % local.primsecterie.attrib "">
+<!ENTITY % primsecterie.role.attrib "%role.attrib;">
+
+<!ENTITY % primaryie.element "INCLUDE">
+<![%primaryie.element;[
+<!ELEMENT primaryie %ho; (%ndxterm.char.mix;)*>
+<!--end of primaryie.element-->]]>
+
+<!-- to IndexTerms that these entries represent -->
+
+<!ENTITY % primaryie.attlist "INCLUDE">
+<![%primaryie.attlist;[
+<!ATTLIST primaryie
+		%linkends.attrib;		%common.attrib;
+		%primsecterie.role.attrib;
+		%local.primsecterie.attrib;
+>
+<!--end of primaryie.attlist-->]]>
+
+<!ENTITY % secondaryie.element "INCLUDE">
+<![%secondaryie.element;[
+<!ELEMENT secondaryie %ho; (%ndxterm.char.mix;)*>
+<!--end of secondaryie.element-->]]>
+
+<!-- to IndexTerms that these entries represent -->
+
+<!ENTITY % secondaryie.attlist "INCLUDE">
+<![%secondaryie.attlist;[
+<!ATTLIST secondaryie
+		%linkends.attrib;		%common.attrib;
+		%primsecterie.role.attrib;
+		%local.primsecterie.attrib;
+>
+<!--end of secondaryie.attlist-->]]>
+
+<!ENTITY % tertiaryie.element "INCLUDE">
+<![%tertiaryie.element;[
+<!ELEMENT tertiaryie %ho; (%ndxterm.char.mix;)*>
+<!--end of tertiaryie.element-->]]>
+
+<!-- to IndexTerms that these entries represent -->
+
+<!ENTITY % tertiaryie.attlist "INCLUDE">
+<![%tertiaryie.attlist;[
+<!ATTLIST tertiaryie
+		%linkends.attrib;		%common.attrib;
+		%primsecterie.role.attrib;
+		%local.primsecterie.attrib;
+>
+<!--end of tertiaryie.attlist-->]]>
+
+<!--end of primsecterie.module-->]]>
+
+<!ENTITY % seeie.module "INCLUDE">
+<![%seeie.module;[
+<!ENTITY % local.seeie.attrib "">
+<!ENTITY % seeie.role.attrib "%role.attrib;">
+
+<!ENTITY % seeie.element "INCLUDE">
+<![%seeie.element;[
+<!ELEMENT seeie %ho; (%ndxterm.char.mix;)*>
+<!--end of seeie.element-->]]>
+
+<!-- to IndexEntry to look up -->
+
+
+<!ENTITY % seeie.attlist "INCLUDE">
+<![%seeie.attlist;[
+<!ATTLIST seeie
+		%linkend.attrib;		%common.attrib;
+		%seeie.role.attrib;
+		%local.seeie.attrib;
+>
+<!--end of seeie.attlist-->]]>
+<!--end of seeie.module-->]]>
+
+<!ENTITY % seealsoie.module "INCLUDE">
+<![%seealsoie.module;[
+<!ENTITY % local.seealsoie.attrib "">
+<!ENTITY % seealsoie.role.attrib "%role.attrib;">
+
+<!ENTITY % seealsoie.element "INCLUDE">
+<![%seealsoie.element;[
+<!ELEMENT seealsoie %ho; (%ndxterm.char.mix;)*>
+<!--end of seealsoie.element-->]]>
+
+<!-- to related IndexEntries -->
+
+
+<!ENTITY % seealsoie.attlist "INCLUDE">
+<![%seealsoie.attlist;[
+<!ATTLIST seealsoie
+		%linkends.attrib;		%common.attrib;
+		%seealsoie.role.attrib;
+		%local.seealsoie.attrib;
+>
+<!--end of seealsoie.attlist-->]]>
+<!--end of seealsoie.module-->]]>
+<!--end of index.content.module-->]]>
+
+<!-- ...................................................................... -->
+<!-- RefEntry ............................................................. -->
+
+<!ENTITY % refentry.content.module "INCLUDE">
+<![%refentry.content.module;[
+<!ENTITY % refentry.module "INCLUDE">
+<![%refentry.module;[
+<!ENTITY % local.refentry.attrib "">
+<!ENTITY % refentry.role.attrib "%role.attrib;">
+
+<!ENTITY % refentry.element "INCLUDE">
+<![%refentry.element;[
+<!ELEMENT refentry %ho; (beginpage?,
+                    (%ndxterm.class;)*,
+                    refentryinfo?, refmeta?, (remark|%link.char.class;)*,
+                    refnamediv+, refsynopsisdiv?, (refsect1+|refsection+))
+		%ubiq.inclusion;>
+<!--end of refentry.element-->]]>
+
+<!ENTITY % refentry.attlist "INCLUDE">
+<![%refentry.attlist;[
+<!ATTLIST refentry
+		%status.attrib;
+		%common.attrib;
+		%refentry.role.attrib;
+		%local.refentry.attrib;
+>
+<!--end of refentry.attlist-->]]>
+<!--end of refentry.module-->]]>
+
+<!ENTITY % refmeta.module "INCLUDE">
+<![%refmeta.module;[
+<!ENTITY % local.refmeta.attrib "">
+<!ENTITY % refmeta.role.attrib "%role.attrib;">
+
+<!ENTITY % refmeta.element "INCLUDE">
+<![%refmeta.element;[
+<!ELEMENT refmeta %ho; ((%ndxterm.class;)*,
+                   refentrytitle, manvolnum?, refmiscinfo*,
+                   (%ndxterm.class;)*)
+		%beginpage.exclusion;>
+<!--end of refmeta.element-->]]>
+
+<!ENTITY % refmeta.attlist "INCLUDE">
+<![%refmeta.attlist;[
+<!ATTLIST refmeta
+		%common.attrib;
+		%refmeta.role.attrib;
+		%local.refmeta.attrib;
+>
+<!--end of refmeta.attlist-->]]>
+<!--end of refmeta.module-->]]>
+
+<!ENTITY % refmiscinfo.module "INCLUDE">
+<![%refmiscinfo.module;[
+<!ENTITY % local.refmiscinfo.attrib "">
+<!ENTITY % refmiscinfo.role.attrib "%role.attrib;">
+
+<!ENTITY % refmiscinfo.element "INCLUDE">
+<![%refmiscinfo.element;[
+<!ELEMENT refmiscinfo %ho; (%docinfo.char.mix;)*>
+<!--end of refmiscinfo.element-->]]>
+
+<!-- Class: Freely assignable parameter; no default -->
+
+
+<!ENTITY % refmiscinfo.attlist "INCLUDE">
+<![%refmiscinfo.attlist;[
+<!ATTLIST refmiscinfo
+		class		CDATA		#IMPLIED
+		%common.attrib;
+		%refmiscinfo.role.attrib;
+		%local.refmiscinfo.attrib;
+>
+<!--end of refmiscinfo.attlist-->]]>
+<!--end of refmiscinfo.module-->]]>
+
+<!ENTITY % refnamediv.module "INCLUDE">
+<![%refnamediv.module;[
+<!ENTITY % local.refnamediv.attrib "">
+<!ENTITY % refnamediv.role.attrib "%role.attrib;">
+
+<!ENTITY % refnamediv.element "INCLUDE">
+<![%refnamediv.element;[
+<!ELEMENT refnamediv %ho; (refdescriptor?, refname+, refpurpose, refclass*,
+		(remark|%link.char.class;)*)>
+<!--end of refnamediv.element-->]]>
+
+<!ENTITY % refnamediv.attlist "INCLUDE">
+<![%refnamediv.attlist;[
+<!ATTLIST refnamediv
+		%common.attrib;
+		%refnamediv.role.attrib;
+		%local.refnamediv.attrib;
+>
+<!--end of refnamediv.attlist-->]]>
+<!--end of refnamediv.module-->]]>
+
+<!ENTITY % refdescriptor.module "INCLUDE">
+<![%refdescriptor.module;[
+<!ENTITY % local.refdescriptor.attrib "">
+<!ENTITY % refdescriptor.role.attrib "%role.attrib;">
+
+<!ENTITY % refdescriptor.element "INCLUDE">
+<![%refdescriptor.element;[
+<!ELEMENT refdescriptor %ho; (%refname.char.mix;)*>
+<!--end of refdescriptor.element-->]]>
+
+<!ENTITY % refdescriptor.attlist "INCLUDE">
+<![%refdescriptor.attlist;[
+<!ATTLIST refdescriptor
+		%common.attrib;
+		%refdescriptor.role.attrib;
+		%local.refdescriptor.attrib;
+>
+<!--end of refdescriptor.attlist-->]]>
+<!--end of refdescriptor.module-->]]>
+
+<!ENTITY % refname.module "INCLUDE">
+<![%refname.module;[
+<!ENTITY % local.refname.attrib "">
+<!ENTITY % refname.role.attrib "%role.attrib;">
+
+<!ENTITY % refname.element "INCLUDE">
+<![%refname.element;[
+<!ELEMENT refname %ho; (%refname.char.mix;)*>
+<!--end of refname.element-->]]>
+
+<!ENTITY % refname.attlist "INCLUDE">
+<![%refname.attlist;[
+<!ATTLIST refname
+		%common.attrib;
+		%refname.role.attrib;
+		%local.refname.attrib;
+>
+<!--end of refname.attlist-->]]>
+<!--end of refname.module-->]]>
+
+<!ENTITY % refpurpose.module "INCLUDE">
+<![%refpurpose.module;[
+<!ENTITY % local.refpurpose.attrib "">
+<!ENTITY % refpurpose.role.attrib "%role.attrib;">
+
+<!ENTITY % refpurpose.element "INCLUDE">
+<![%refpurpose.element;[
+<!ELEMENT refpurpose %ho; (%refinline.char.mix;)*>
+<!--end of refpurpose.element-->]]>
+
+<!ENTITY % refpurpose.attlist "INCLUDE">
+<![%refpurpose.attlist;[
+<!ATTLIST refpurpose
+		%common.attrib;
+		%refpurpose.role.attrib;
+		%local.refpurpose.attrib;
+>
+<!--end of refpurpose.attlist-->]]>
+<!--end of refpurpose.module-->]]>
+
+<!ENTITY % refclass.module "INCLUDE">
+<![%refclass.module;[
+<!ENTITY % local.refclass.attrib "">
+<!ENTITY % refclass.role.attrib "%role.attrib;">
+
+<!ENTITY % refclass.element "INCLUDE">
+<![%refclass.element;[
+<!ELEMENT refclass %ho; (%refclass.char.mix;)*>
+<!--end of refclass.element-->]]>
+
+<!ENTITY % refclass.attlist "INCLUDE">
+<![%refclass.attlist;[
+<!ATTLIST refclass
+		%common.attrib;
+		%refclass.role.attrib;
+		%local.refclass.attrib;
+>
+<!--end of refclass.attlist-->]]>
+<!--end of refclass.module-->]]>
+
+<!ENTITY % refsynopsisdiv.module "INCLUDE">
+<![%refsynopsisdiv.module;[
+<!ENTITY % local.refsynopsisdiv.attrib "">
+<!ENTITY % refsynopsisdiv.role.attrib "%role.attrib;">
+
+<!ENTITY % refsynopsisdiv.element "INCLUDE">
+<![%refsynopsisdiv.element;[
+<!ELEMENT refsynopsisdiv %ho; (refsynopsisdivinfo?, (%refsect.title.content;)?,
+		(((%refcomponent.mix;)+, refsect2*) | (refsect2+)))>
+<!--end of refsynopsisdiv.element-->]]>
+
+<!ENTITY % refsynopsisdiv.attlist "INCLUDE">
+<![%refsynopsisdiv.attlist;[
+<!ATTLIST refsynopsisdiv
+		%common.attrib;
+		%refsynopsisdiv.role.attrib;
+		%local.refsynopsisdiv.attrib;
+>
+<!--end of refsynopsisdiv.attlist-->]]>
+<!--end of refsynopsisdiv.module-->]]>
+
+<!ENTITY % refsection.module "INCLUDE">
+<![%refsection.module;[
+<!ENTITY % local.refsection.attrib "">
+<!ENTITY % refsection.role.attrib "%role.attrib;">
+
+<!ENTITY % refsection.element "INCLUDE">
+<![%refsection.element;[
+<!ELEMENT refsection %ho; (refsectioninfo?, (%refsect.title.content;),
+		(((%refcomponent.mix;)+, refsection*) | refsection+))>
+<!--end of refsection.element-->]]>
+
+<!ENTITY % refsection.attlist "INCLUDE">
+<![%refsection.attlist;[
+<!ATTLIST refsection
+		%status.attrib;
+		%common.attrib;
+		%refsection.role.attrib;
+		%local.refsection.attrib;
+>
+<!--end of refsection.attlist-->]]>
+<!--end of refsection.module-->]]>
+
+<!ENTITY % refsect1.module "INCLUDE">
+<![%refsect1.module;[
+<!ENTITY % local.refsect1.attrib "">
+<!ENTITY % refsect1.role.attrib "%role.attrib;">
+
+<!ENTITY % refsect1.element "INCLUDE">
+<![%refsect1.element;[
+<!ELEMENT refsect1 %ho; (refsect1info?, (%refsect.title.content;),
+		(((%refcomponent.mix;)+, refsect2*) | refsect2+))>
+<!--end of refsect1.element-->]]>
+
+<!ENTITY % refsect1.attlist "INCLUDE">
+<![%refsect1.attlist;[
+<!ATTLIST refsect1
+		%status.attrib;
+		%common.attrib;
+		%refsect1.role.attrib;
+		%local.refsect1.attrib;
+>
+<!--end of refsect1.attlist-->]]>
+<!--end of refsect1.module-->]]>
+
+<!ENTITY % refsect2.module "INCLUDE">
+<![%refsect2.module;[
+<!ENTITY % local.refsect2.attrib "">
+<!ENTITY % refsect2.role.attrib "%role.attrib;">
+
+<!ENTITY % refsect2.element "INCLUDE">
+<![%refsect2.element;[
+<!ELEMENT refsect2 %ho; (refsect2info?, (%refsect.title.content;),
+	(((%refcomponent.mix;)+, refsect3*) | refsect3+))>
+<!--end of refsect2.element-->]]>
+
+<!ENTITY % refsect2.attlist "INCLUDE">
+<![%refsect2.attlist;[
+<!ATTLIST refsect2
+		%status.attrib;
+		%common.attrib;
+		%refsect2.role.attrib;
+		%local.refsect2.attrib;
+>
+<!--end of refsect2.attlist-->]]>
+<!--end of refsect2.module-->]]>
+
+<!ENTITY % refsect3.module "INCLUDE">
+<![%refsect3.module;[
+<!ENTITY % local.refsect3.attrib "">
+<!ENTITY % refsect3.role.attrib "%role.attrib;">
+
+<!ENTITY % refsect3.element "INCLUDE">
+<![%refsect3.element;[
+<!ELEMENT refsect3 %ho; (refsect3info?, (%refsect.title.content;),
+	(%refcomponent.mix;)+)>
+<!--end of refsect3.element-->]]>
+
+<!ENTITY % refsect3.attlist "INCLUDE">
+<![%refsect3.attlist;[
+<!ATTLIST refsect3
+		%status.attrib;
+		%common.attrib;
+		%refsect3.role.attrib;
+		%local.refsect3.attrib;
+>
+<!--end of refsect3.attlist-->]]>
+<!--end of refsect3.module-->]]>
+<!--end of refentry.content.module-->]]>
+
+<!-- ...................................................................... -->
+<!-- Article .............................................................. -->
+
+<!ENTITY % article.module "INCLUDE">
+<![%article.module;[
+<!-- An Article is a chapter-level, stand-alone document that is often,
+     but need not be, collected into a Book. -->
+
+<!ENTITY % local.article.attrib "">
+<!ENTITY % article.role.attrib "%role.attrib;">
+
+<!ENTITY % article.element "INCLUDE">
+<![%article.element;[
+<!ELEMENT article %ho; ((%div.title.content;)?, articleinfo?, tocchap?, lot*,
+			(%bookcomponent.content;),
+			((%nav.class;) | (%appendix.class;) | ackno)*)
+		%ubiq.inclusion;>
+<!--end of article.element-->]]>
+
+<!-- Class: Indicates the type of a particular article;
+		all articles have the same structure and general purpose.
+		No default. -->
+<!-- ParentBook: ID of the enclosing Book -->
+
+
+<!ENTITY % article.attlist "INCLUDE">
+<![%article.attlist;[
+<!ATTLIST article
+		class		(journalarticle
+				|productsheet
+				|whitepaper
+				|techreport
+                                |specification
+				|faq)		#IMPLIED
+		parentbook	IDREF		#IMPLIED
+		%status.attrib;
+		%common.attrib;
+		%article.role.attrib;
+		%local.article.attrib;
+>
+<!--end of article.attlist-->]]>
+<!--end of article.module-->]]>
+
+<!-- End of DocBook document hierarchy module V4.3CR3 ........................ -->
+<!-- ...................................................................... -->

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/dbnotnx.mod
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/dbnotnx.mod	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/dbnotnx.mod	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,102 @@
+<!-- ...................................................................... -->
+<!-- DocBook notations module V4.3CR3 ........................................ -->
+<!-- File dbnotnx.mod ..................................................... -->
+
+<!-- Copyright 1992-2002 HaL Computer Systems, Inc.,
+     O'Reilly & Associates, Inc., ArborText, Inc., Fujitsu Software
+     Corporation, Norman Walsh, Sun Microsystems, Inc., and the
+     Organization for the Advancement of Structured Information
+     Standards (OASIS).
+
+     $Id: dbnotnx.mod,v 1.1.1.1 2004/10/19 21:21:34 juntao Exp $
+
+     Permission to use, copy, modify and distribute the DocBook DTD
+     and its accompanying documentation for any purpose and without fee
+     is hereby granted in perpetuity, provided that the above copyright
+     notice and this paragraph appear in all copies.  The copyright
+     holders make no representation about the suitability of the DTD for
+     any purpose.  It is provided "as is" without expressed or implied
+     warranty.
+
+     If you modify the DocBook DTD in any way, except for declaring and
+     referencing additional sets of general entities and declaring
+     additional notations, label your DTD as a variant of DocBook.  See
+     the maintenance documentation for more information.
+
+     Please direct all questions, bug reports, or suggestions for
+     changes to the docbook at lists.oasis-open.org mailing list. For more
+     information, see http://www.oasis-open.org/docbook/.
+-->
+
+<!-- ...................................................................... -->
+
+<!-- This module contains the entity declarations for the standard ISO
+     entity sets used by DocBook.
+
+     In DTD driver files referring to this module, please use an entity
+     declaration that uses the public identifier shown below:
+
+     <!ENTITY % dbnotn PUBLIC
+     "-//OASIS//ENTITIES DocBook Notations V4.3CR3//EN"
+     "dbnotnx.mod">
+     %dbnotn;
+
+     See the documentation for detailed information on the parameter
+     entity and module scheme used in DocBook, customizing DocBook and
+     planning for interchange, and changes made since the last release
+     of DocBook.
+-->
+
+<!ENTITY % local.notation.class "">
+<!ENTITY % notation.class
+		"BMP| CGM-CHAR | CGM-BINARY | CGM-CLEAR | DITROFF | DVI
+		| EPS | EQN | FAX | GIF | GIF87a | GIF89a
+		| JPG | JPEG | IGES | PCX
+		| PIC | PNG | PS | SGML | TBL | TEX | TIFF | WMF | WPG
+                | SVG | PDF | SWF
+		| linespecific
+		%local.notation.class;">
+
+<!NOTATION BMP		PUBLIC
+"+//ISBN 0-7923-94.2-1::Graphic Notation//NOTATION Microsoft Windows bitmap//EN">
+<!NOTATION CGM-CHAR	PUBLIC "ISO 8632/2//NOTATION Character encoding//EN">
+<!NOTATION CGM-BINARY	PUBLIC "ISO 8632/3//NOTATION Binary encoding//EN">
+<!NOTATION CGM-CLEAR	PUBLIC "ISO 8632/4//NOTATION Clear text encoding//EN">
+<!NOTATION DITROFF	SYSTEM "DITROFF">
+<!NOTATION DVI		SYSTEM "DVI">
+<!NOTATION EPS		PUBLIC
+"+//ISBN 0-201-18127-4::Adobe//NOTATION PostScript Language Ref. Manual//EN">
+<!NOTATION EQN		SYSTEM "EQN">
+<!NOTATION FAX		PUBLIC
+"-//USA-DOD//NOTATION CCITT Group 4 Facsimile Type 1 Untiled Raster//EN">
+<!NOTATION GIF		SYSTEM "GIF">
+<!NOTATION GIF87a               PUBLIC
+"-//CompuServe//NOTATION Graphics Interchange Format 87a//EN">
+
+<!NOTATION GIF89a               PUBLIC
+"-//CompuServe//NOTATION Graphics Interchange Format 89a//EN">
+<!NOTATION JPG		SYSTEM "JPG">
+<!NOTATION JPEG		SYSTEM "JPG">
+<!NOTATION IGES		PUBLIC
+"-//USA-DOD//NOTATION (ASME/ANSI Y14.26M-1987) Initial Graphics Exchange Specification//EN">
+<!NOTATION PCX		PUBLIC
+"+//ISBN 0-7923-94.2-1::Graphic Notation//NOTATION ZSoft PCX bitmap//EN">
+<!NOTATION PIC		SYSTEM "PIC">
+<!NOTATION PNG          SYSTEM "http://www.w3.org/TR/REC-png">
+<!NOTATION PS		SYSTEM "PS">
+<!NOTATION SGML		PUBLIC
+"ISO 8879:1986//NOTATION Standard Generalized Markup Language//EN">
+<!NOTATION TBL		SYSTEM "TBL">
+<!NOTATION TEX		PUBLIC
+"+//ISBN 0-201-13448-9::Knuth//NOTATION The TeXbook//EN">
+<!NOTATION TIFF		SYSTEM "TIFF">
+<!NOTATION WMF		PUBLIC
+"+//ISBN 0-7923-94.2-1::Graphic Notation//NOTATION Microsoft Windows Metafile//EN">
+<!NOTATION WPG		SYSTEM "WPG"> <!--WordPerfect Graphic format-->
+<!NOTATION SVG		SYSTEM "http://www.w3.org/TR/SVG/">
+<!NOTATION PDF		SYSTEM "http://www.adobe.com/products/acrobat/adobepdf.html">
+<!NOTATION SWF          SYSTEM "http://www.macromedia.com/software/flash">
+<!NOTATION linespecific	SYSTEM "linespecific">
+
+<!-- End of DocBook notations module V4.3CR3 ................................. -->
+<!-- ...................................................................... -->

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/dbpoolx.mod
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/dbpoolx.mod	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/dbpoolx.mod	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,8250 @@
+<!-- ...................................................................... -->
+<!-- DocBook XML information pool module V4.3CR3 ............................. -->
+<!-- File dbpoolx.mod ..................................................... -->
+
+<!-- Copyright 1992-2002 HaL Computer Systems, Inc.,
+     O'Reilly & Associates, Inc., ArborText, Inc., Fujitsu Software
+     Corporation, Norman Walsh, Sun Microsystems, Inc., and the
+     Organization for the Advancement of Structured Information
+     Standards (OASIS).
+
+     $Id: dbpoolx.mod,v 1.1.1.1 2004/10/19 21:21:35 juntao Exp $
+
+     Permission to use, copy, modify and distribute the DocBook XML DTD
+     and its accompanying documentation for any purpose and without fee
+     is hereby granted in perpetuity, provided that the above copyright
+     notice and this paragraph appear in all copies.  The copyright
+     holders make no representation about the suitability of the DTD for
+     any purpose.  It is provided "as is" without expressed or implied
+     warranty.
+
+     If you modify the DocBook XML DTD in any way, except for declaring and
+     referencing additional sets of general entities and declaring
+     additional notations, label your DTD as a variant of DocBook.  See
+     the maintenance documentation for more information.
+
+     Please direct all questions, bug reports, or suggestions for
+     changes to the docbook at lists.oasis-open.org mailing list. For more
+     information, see http://www.oasis-open.org/docbook/.
+-->
+
+<!-- ...................................................................... -->
+
+<!-- This module contains the definitions for the objects, inline
+     elements, and so on that are available to be used as the main
+     content of DocBook documents.  Some elements are useful for general
+     publishing, and others are useful specifically for computer
+     documentation.
+
+     This module has the following dependencies on other modules:
+
+     o It assumes that a %notation.class; entity is defined by the
+       driver file or other high-level module.  This entity is
+       referenced in the NOTATION attributes for the graphic-related and
+       ModeSpec elements.
+
+     o It assumes that an appropriately parameterized table module is
+       available for use with the table-related elements.
+
+     In DTD driver files referring to this module, please use an entity
+     declaration that uses the public identifier shown below:
+
+     <!ENTITY % dbpool PUBLIC
+     "-//OASIS//ELEMENTS DocBook XML Information Pool V4.3CR3//EN"
+     "dbpoolx.mod">
+     %dbpool;
+
+     See the documentation for detailed information on the parameter
+     entity and module scheme used in DocBook, customizing DocBook and
+     planning for interchange, and changes made since the last release
+     of DocBook.
+-->
+
+<!-- ...................................................................... -->
+<!-- General-purpose semantics entities ................................... -->
+
+<!ENTITY % yesorno.attvals	"CDATA">
+
+<!-- ...................................................................... -->
+<!-- Entities for module inclusions ....................................... -->
+
+<!ENTITY % dbpool.redecl.module "IGNORE">
+
+<!-- ...................................................................... -->
+<!-- Entities for element classes and mixtures ............................ -->
+
+<!-- "Ubiquitous" classes: ndxterm.class and beginpage -->
+
+<!ENTITY % local.ndxterm.class "">
+<!ENTITY % ndxterm.class
+		"indexterm %local.ndxterm.class;">
+
+<!-- Object-level classes ................................................. -->
+
+<!ENTITY % local.list.class "">
+<!ENTITY % list.class
+		"calloutlist|glosslist|itemizedlist|orderedlist|segmentedlist
+		|simplelist|variablelist %local.list.class;">
+
+<!ENTITY % local.admon.class "">
+<!ENTITY % admon.class
+		"caution|important|note|tip|warning %local.admon.class;">
+
+<!ENTITY % local.linespecific.class "">
+<!ENTITY % linespecific.class
+		"literallayout|programlisting|programlistingco|screen
+		|screenco|screenshot %local.linespecific.class;">
+
+<!ENTITY % local.method.synop.class "">
+<!ENTITY % method.synop.class
+		"constructorsynopsis
+                 |destructorsynopsis
+                 |methodsynopsis %local.method.synop.class;">
+
+<!ENTITY % local.synop.class "">
+<!ENTITY % synop.class
+		"synopsis|cmdsynopsis|funcsynopsis
+                 |classsynopsis|fieldsynopsis
+                 |%method.synop.class; %local.synop.class;">
+
+<!ENTITY % local.para.class "">
+<!ENTITY % para.class
+		"formalpara|para|simpara %local.para.class;">
+
+<!ENTITY % local.informal.class "">
+<!ENTITY % informal.class
+		"address|blockquote
+                |graphic|graphicco|mediaobject|mediaobjectco
+                |informalequation
+		|informalexample
+                |informalfigure
+                |informaltable %local.informal.class;">
+
+<!ENTITY % local.formal.class "">
+<!ENTITY % formal.class
+		"equation|example|figure|table %local.formal.class;">
+
+<!-- The DocBook TC may produce an official EBNF module for DocBook. -->
+<!-- This PE provides the hook by which it can be inserted into the DTD. -->
+<!ENTITY % ebnf.block.hook "">
+
+<!ENTITY % local.compound.class "">
+<!ENTITY % compound.class
+		"msgset|procedure|sidebar|qandaset|task
+                 %ebnf.block.hook;
+                 %local.compound.class;">
+
+<!ENTITY % local.genobj.class "">
+<!ENTITY % genobj.class
+		"anchor|bridgehead|remark|highlights
+		%local.genobj.class;">
+
+<!ENTITY % local.descobj.class "">
+<!ENTITY % descobj.class
+		"abstract|authorblurb|epigraph
+		%local.descobj.class;">
+
+<!-- Character-level classes .............................................. -->
+
+<!ENTITY % local.xref.char.class "">
+<!ENTITY % xref.char.class
+		"footnoteref|xref %local.xref.char.class;">
+
+<!ENTITY % local.gen.char.class "">
+<!ENTITY % gen.char.class
+		"abbrev|acronym|citation|citerefentry|citetitle|emphasis
+		|firstterm|foreignphrase|glossterm|footnote|phrase|orgname
+		|quote|trademark|wordasword|personname %local.gen.char.class;">
+
+<!ENTITY % local.link.char.class "">
+<!ENTITY % link.char.class
+		"link|olink|ulink %local.link.char.class;">
+
+<!-- The DocBook TC may produce an official EBNF module for DocBook. -->
+<!-- This PE provides the hook by which it can be inserted into the DTD. -->
+<!ENTITY % ebnf.inline.hook "">
+
+<!ENTITY % local.tech.char.class "">
+<!ENTITY % tech.char.class
+		"action|application
+                |classname|methodname|interfacename|exceptionname
+                |ooclass|oointerface|ooexception
+                |command|computeroutput
+		|database|email|envar|errorcode|errorname|errortype|errortext|filename
+		|function|guibutton|guiicon|guilabel|guimenu|guimenuitem
+		|guisubmenu|hardware|interface|keycap
+		|keycode|keycombo|keysym|literal|code|constant|markup|medialabel
+		|menuchoice|mousebutton|option|optional|parameter
+		|prompt|property|replaceable|returnvalue|sgmltag|structfield
+		|structname|symbol|systemitem|uri|token|type|userinput|varname
+                %ebnf.inline.hook;
+		%local.tech.char.class;">
+
+<!ENTITY % local.base.char.class "">
+<!ENTITY % base.char.class
+		"anchor %local.base.char.class;">
+
+<!ENTITY % local.docinfo.char.class "">
+<!ENTITY % docinfo.char.class
+		"author|authorinitials|corpauthor|corpcredit|modespec|othercredit
+		|productname|productnumber|revhistory
+		%local.docinfo.char.class;">
+
+<!ENTITY % local.other.char.class "">
+<!ENTITY % other.char.class
+		"remark|subscript|superscript %local.other.char.class;">
+
+<!ENTITY % local.inlineobj.char.class "">
+<!ENTITY % inlineobj.char.class
+		"inlinegraphic|inlinemediaobject|inlineequation %local.inlineobj.char.class;">
+
+<!-- ...................................................................... -->
+<!-- Entities for content models .......................................... -->
+
+<!ENTITY % formalobject.title.content "title, titleabbrev?">
+
+<!-- Redeclaration placeholder ............................................ -->
+
+<!-- For redeclaring entities that are declared after this point while
+     retaining their references to the entities that are declared before
+     this point -->
+
+<![%dbpool.redecl.module;[
+<!-- Defining rdbpool here makes some buggy XML parsers happy. -->
+<!ENTITY % rdbpool "">
+%rdbpool;
+<!--end of dbpool.redecl.module-->]]>
+
+<!-- Object-level mixtures ................................................ -->
+
+<!--
+                      list admn line synp para infm form cmpd gen  desc
+Component mixture       X    X    X    X    X    X    X    X    X    X
+Sidebar mixture         X    X    X    X    X    X    X    a    X
+Footnote mixture        X         X    X    X    X
+Example mixture         X         X    X    X    X
+Highlights mixture      X    X              X
+Paragraph mixture       X         X    X         X
+Admonition mixture      X         X    X    X    X    X    b    c
+Figure mixture                    X    X         X
+Table entry mixture     X    X    X         X    d
+Glossary def mixture    X         X    X    X    X         e
+Legal notice mixture    X    X    X         X    f
+
+a. Just Procedure; not Sidebar itself or MsgSet.
+b. No MsgSet.
+c. No Highlights.
+d. Just Graphic; no other informal objects.
+e. No Anchor, BridgeHead, or Highlights.
+f. Just BlockQuote; no other informal objects.
+-->
+
+<!ENTITY % local.component.mix "">
+<!ENTITY % component.mix
+		"%list.class;		|%admon.class;
+		|%linespecific.class;	|%synop.class;
+		|%para.class;		|%informal.class;
+		|%formal.class;		|%compound.class;
+		|%genobj.class;		|%descobj.class;
+		|%ndxterm.class;        |beginpage
+		%local.component.mix;">
+
+<!ENTITY % local.sidebar.mix "">
+<!ENTITY % sidebar.mix
+		"%list.class;		|%admon.class;
+		|%linespecific.class;	|%synop.class;
+		|%para.class;		|%informal.class;
+		|%formal.class;		|procedure
+		|%genobj.class;
+		|%ndxterm.class;        |beginpage
+		%local.sidebar.mix;">
+
+<!ENTITY % local.qandaset.mix "">
+<!ENTITY % qandaset.mix
+		"%list.class;           |%admon.class;
+		|%linespecific.class;	|%synop.class;
+		|%para.class;		|%informal.class;
+		|%formal.class;		|procedure
+		|%genobj.class;
+		|%ndxterm.class;
+		%local.qandaset.mix;">
+
+<!ENTITY % local.revdescription.mix "">
+<!ENTITY % revdescription.mix
+		"%list.class;		|%admon.class;
+		|%linespecific.class;	|%synop.class;
+		|%para.class;		|%informal.class;
+		|%formal.class;		|procedure
+		|%genobj.class;
+		|%ndxterm.class;
+		%local.revdescription.mix;">
+
+<!ENTITY % local.footnote.mix "">
+<!ENTITY % footnote.mix
+		"%list.class;
+		|%linespecific.class;	|%synop.class;
+		|%para.class;		|%informal.class;
+		%local.footnote.mix;">
+
+<!ENTITY % local.example.mix "">
+<!ENTITY % example.mix
+		"%list.class;
+		|%linespecific.class;	|%synop.class;
+		|%para.class;		|%informal.class;
+		|%ndxterm.class;        |beginpage
+		%local.example.mix;">
+
+<!ENTITY % local.highlights.mix "">
+<!ENTITY % highlights.mix
+		"%list.class;		|%admon.class;
+		|%para.class;
+		|%ndxterm.class;
+		%local.highlights.mix;">
+
+<!-- %formal.class; is explicitly excluded from many contexts in which
+     paragraphs are used -->
+<!ENTITY % local.para.mix "">
+<!ENTITY % para.mix
+		"%list.class;           |%admon.class;
+		|%linespecific.class;
+					|%informal.class;
+		|%formal.class;
+		%local.para.mix;">
+
+<!ENTITY % local.admon.mix "">
+<!ENTITY % admon.mix
+		"%list.class;
+		|%linespecific.class;	|%synop.class;
+		|%para.class;		|%informal.class;
+		|%formal.class;		|procedure|sidebar
+		|anchor|bridgehead|remark
+		|%ndxterm.class;        |beginpage
+		%local.admon.mix;">
+
+<!ENTITY % local.figure.mix "">
+<!ENTITY % figure.mix
+		"%linespecific.class;	|%synop.class;
+					|%informal.class;
+		|%ndxterm.class;        |beginpage
+		%local.figure.mix;">
+
+<!ENTITY % local.tabentry.mix "">
+<!ENTITY % tabentry.mix
+		"%list.class;		|%admon.class;
+		|%linespecific.class;
+		|%para.class;		|graphic|mediaobject
+		%local.tabentry.mix;">
+
+<!ENTITY % local.glossdef.mix "">
+<!ENTITY % glossdef.mix
+		"%list.class;
+		|%linespecific.class;	|%synop.class;
+		|%para.class;		|%informal.class;
+		|%formal.class;
+		|remark
+		|%ndxterm.class;        |beginpage
+		%local.glossdef.mix;">
+
+<!ENTITY % local.legalnotice.mix "">
+<!ENTITY % legalnotice.mix
+		"%list.class;		|%admon.class;
+		|%linespecific.class;
+		|%para.class;		|blockquote
+		|%ndxterm.class;        |beginpage
+		%local.legalnotice.mix;">
+
+<!ENTITY % local.textobject.mix "">
+<!ENTITY % textobject.mix
+		"%list.class;		|%admon.class;
+		|%linespecific.class;
+		|%para.class;		|blockquote
+		%local.textobject.mix;">
+
+<!ENTITY % local.mediaobject.mix "">
+<!ENTITY % mediaobject.mix
+		"videoobject|audioobject|imageobject|textobject %local.mediaobject.mix;">
+
+<!ENTITY % local.listpreamble.mix "">
+<!ENTITY % listpreamble.mix
+		"                  	 %admon.class;
+		|%linespecific.class;	|%synop.class;
+		|%para.class;		|%informal.class;
+		|%genobj.class;		|%descobj.class;
+		|%ndxterm.class;        |beginpage
+		%local.listpreamble.mix;">
+
+<!-- Character-level mixtures ............................................. -->
+
+<![%sgml.features;[
+<!ENTITY % local.ubiq.mix "">
+<!ENTITY % ubiq.mix "%ndxterm.class;|beginpage %local.ubiq.mix;">
+
+<!ENTITY % ubiq.exclusion "-(%ubiq.mix)">
+<!ENTITY % ubiq.inclusion "+(%ubiq.mix)">
+
+<!ENTITY % footnote.exclusion "-(footnote|%formal.class;)">
+<!ENTITY % highlights.exclusion "-(%ubiq.mix;|%formal.class;)">
+<!ENTITY % admon.exclusion "-(%admon.class;)">
+<!ENTITY % formal.exclusion "-(%formal.class;)">
+<!ENTITY % acronym.exclusion "-(acronym)">
+<!ENTITY % beginpage.exclusion "-(beginpage)">
+<!ENTITY % ndxterm.exclusion "-(%ndxterm.class;)">
+<!ENTITY % blockquote.exclusion "-(epigraph)">
+<!ENTITY % remark.exclusion "-(remark|%ubiq.mix;)">
+<!ENTITY % glossterm.exclusion "-(glossterm)">
+<!ENTITY % links.exclusion "-(link|olink|ulink|xref)">
+]]><!-- sgml.features -->
+
+<!-- not [sgml.features[ -->
+<!ENTITY % local.ubiq.mix "">
+<!ENTITY % ubiq.mix "">
+
+<!ENTITY % ubiq.exclusion "">
+<!ENTITY % ubiq.inclusion "">
+
+<!ENTITY % footnote.exclusion "">
+<!ENTITY % highlights.exclusion "">
+<!ENTITY % admon.exclusion "">
+<!ENTITY % formal.exclusion "">
+<!ENTITY % acronym.exclusion "">
+<!ENTITY % beginpage.exclusion "">
+<!ENTITY % ndxterm.exclusion "">
+<!ENTITY % blockquote.exclusion "">
+<!ENTITY % remark.exclusion "">
+<!ENTITY % glossterm.exclusion "">
+<!ENTITY % links.exclusion "">
+<!-- ]] not sgml.features -->
+
+<!--
+                    #PCD xref word link cptr base dnfo othr inob (synop)
+para.char.mix         X    X    X    X    X    X    X    X    X
+title.char.mix        X    X    X    X    X    X    X    X    X
+ndxterm.char.mix      X    X    X    X    X    X    X    X    a
+cptr.char.mix         X              X    X    X         X    a
+smallcptr.char.mix    X                   b                   a
+word.char.mix         X         c    X         X         X    a
+docinfo.char.mix      X         d    X    b              X    a
+
+a. Just InlineGraphic; no InlineEquation.
+b. Just Replaceable; no other computer terms.
+c. Just Emphasis and Trademark; no other word elements.
+d. Just Acronym, Emphasis, and Trademark; no other word elements.
+-->
+
+<!-- The DocBook TC may produce an official forms module for DocBook. -->
+<!-- This PE provides the hook by which it can be inserted into the DTD. -->
+<!ENTITY % forminlines.hook "">
+
+<!ENTITY % local.para.char.mix "">
+<!ENTITY % para.char.mix
+		"#PCDATA
+		|%xref.char.class;	|%gen.char.class;
+		|%link.char.class;	|%tech.char.class;
+		|%base.char.class;	|%docinfo.char.class;
+		|%other.char.class;	|%inlineobj.char.class;
+		|%synop.class;
+		|%ndxterm.class;        |beginpage
+                %forminlines.hook;
+		%local.para.char.mix;">
+
+<!ENTITY % local.title.char.mix "">
+<!ENTITY % title.char.mix
+		"#PCDATA
+		|%xref.char.class;	|%gen.char.class;
+		|%link.char.class;	|%tech.char.class;
+		|%base.char.class;	|%docinfo.char.class;
+		|%other.char.class;	|%inlineobj.char.class;
+		|%ndxterm.class;
+		%local.title.char.mix;">
+
+<!ENTITY % local.ndxterm.char.mix "">
+<!ENTITY % ndxterm.char.mix
+		"#PCDATA
+		|%xref.char.class;	|%gen.char.class;
+		|%link.char.class;	|%tech.char.class;
+		|%base.char.class;	|%docinfo.char.class;
+		|%other.char.class;	|inlinegraphic|inlinemediaobject
+		%local.ndxterm.char.mix;">
+
+<!ENTITY % local.cptr.char.mix "">
+<!ENTITY % cptr.char.mix
+		"#PCDATA
+		|%link.char.class;	|%tech.char.class;
+		|%base.char.class;
+		|%other.char.class;	|inlinegraphic|inlinemediaobject
+		|%ndxterm.class;        |beginpage
+		%local.cptr.char.mix;">
+
+<!ENTITY % local.smallcptr.char.mix "">
+<!ENTITY % smallcptr.char.mix
+		"#PCDATA
+					|replaceable
+					|inlinegraphic|inlinemediaobject
+		|%ndxterm.class;        |beginpage
+		%local.smallcptr.char.mix;">
+
+<!ENTITY % local.word.char.mix "">
+<!ENTITY % word.char.mix
+		"#PCDATA
+					|acronym|emphasis|trademark
+		|%link.char.class;
+		|%base.char.class;
+		|%other.char.class;	|inlinegraphic|inlinemediaobject
+		|%ndxterm.class;        |beginpage
+		%local.word.char.mix;">
+
+<!ENTITY % local.docinfo.char.mix "">
+<!ENTITY % docinfo.char.mix
+		"#PCDATA
+		|%link.char.class;
+					|emphasis|trademark
+					|replaceable
+		|%other.char.class;	|inlinegraphic|inlinemediaobject
+		|%ndxterm.class;
+		%local.docinfo.char.mix;">
+<!--ENTITY % bibliocomponent.mix (see Bibliographic section, below)-->
+<!--ENTITY % person.ident.mix (see Bibliographic section, below)-->
+
+<!-- ...................................................................... -->
+<!-- Entities for attributes and attribute components ..................... -->
+
+<!-- Effectivity attributes ............................................... -->
+
+
+<!-- Arch: Computer or chip architecture to which element applies; no
+	default -->
+
+<!ENTITY % arch.attrib
+	"arch		CDATA		#IMPLIED">
+
+<!-- Condition: General-purpose effectivity attribute -->
+
+<!ENTITY % condition.attrib
+	"condition	CDATA		#IMPLIED">
+
+<!-- Conformance: Standards conformance characteristics -->
+
+<!ENTITY % conformance.attrib
+	"conformance	NMTOKENS	#IMPLIED">
+
+
+<!-- OS: Operating system to which element applies; no default -->
+
+<!ENTITY % os.attrib
+	"os		CDATA		#IMPLIED">
+
+
+<!-- Revision: Editorial revision to which element belongs; no default -->
+
+<!ENTITY % revision.attrib
+	"revision	CDATA		#IMPLIED">
+
+<!-- Security: Security classification; no default -->
+
+<!ENTITY % security.attrib
+	"security	CDATA		#IMPLIED">
+
+<!-- UserLevel: Level of user experience to which element applies; no
+	default -->
+
+<!ENTITY % userlevel.attrib
+	"userlevel	CDATA		#IMPLIED">
+
+
+<!-- Vendor: Computer vendor to which element applies; no default -->
+
+<!ENTITY % vendor.attrib
+	"vendor		CDATA		#IMPLIED">
+
+<!ENTITY % local.effectivity.attrib "">
+<!ENTITY % effectivity.attrib
+	"%arch.attrib;
+        %condition.attrib;
+	%conformance.attrib;
+	%os.attrib;
+	%revision.attrib;
+        %security.attrib;
+	%userlevel.attrib;
+	%vendor.attrib;
+	%local.effectivity.attrib;"
+>
+
+<!-- Common attributes .................................................... -->
+
+
+<!-- Id: Unique identifier of element; no default -->
+
+<!ENTITY % id.attrib
+	"id		ID		#IMPLIED">
+
+
+<!-- Id: Unique identifier of element; a value must be supplied; no
+	default -->
+
+<!ENTITY % idreq.attrib
+	"id		ID		#REQUIRED">
+
+
+<!-- Lang: Indicator of language in which element is written, for
+	translation, character set management, etc.; no default -->
+
+<!ENTITY % lang.attrib
+	"lang		CDATA		#IMPLIED">
+
+
+<!-- Remap: Previous role of element before conversion; no default -->
+
+<!ENTITY % remap.attrib
+	"remap		CDATA		#IMPLIED">
+
+
+<!-- Role: New role of element in local environment; no default -->
+
+<!ENTITY % role.attrib
+	"role		CDATA		#IMPLIED">
+
+
+<!-- XRefLabel: Alternate labeling string for XRef text generation;
+	default is usually title or other appropriate label text already
+	contained in element -->
+
+<!ENTITY % xreflabel.attrib
+	"xreflabel	CDATA		#IMPLIED">
+
+
+<!-- RevisionFlag: Revision status of element; default is that element
+	wasn't revised -->
+
+<!ENTITY % revisionflag.attrib
+	"revisionflag	(changed
+			|added
+			|deleted
+			|off)		#IMPLIED">
+
+<!ENTITY % local.common.attrib "">
+
+<!-- dir: Bidirectional override -->
+
+<!ENTITY % dir.attrib
+	"dir		(ltr
+			|rtl
+			|lro
+			|rlo)		#IMPLIED">
+
+<!-- xml:base: base URI -->
+
+<!ENTITY % xml-base.attrib
+	"xml:base	CDATA		#IMPLIED">
+
+<!-- Role is included explicitly on each element -->
+
+<!ENTITY % common.attrib
+	"%id.attrib;
+	%lang.attrib;
+	%remap.attrib;
+	%xreflabel.attrib;
+	%revisionflag.attrib;
+	%effectivity.attrib;
+	%dir.attrib;
+	%xml-base.attrib;
+	%local.common.attrib;"
+>
+
+<!-- Role is included explicitly on each element -->
+
+<!ENTITY % idreq.common.attrib
+	"%idreq.attrib;
+	%lang.attrib;
+	%remap.attrib;
+	%xreflabel.attrib;
+	%revisionflag.attrib;
+	%effectivity.attrib;
+	%dir.attrib;
+	%xml-base.attrib;
+	%local.common.attrib;"
+>
+
+<!-- Semi-common attributes and other attribute entities .................. -->
+
+<!ENTITY % local.graphics.attrib "">
+
+<!-- EntityRef: Name of an external entity containing the content
+	of the graphic -->
+<!-- FileRef: Filename, qualified by a pathname if desired,
+	designating the file containing the content of the graphic -->
+<!-- Format: Notation of the element content, if any -->
+<!-- SrcCredit: Information about the source of the Graphic -->
+<!-- Width: Same as CALS reprowid (desired width) -->
+<!-- Depth: Same as CALS reprodep (desired depth) -->
+<!-- Align: Same as CALS hplace with 'none' removed; #IMPLIED means
+	application-specific -->
+<!-- Scale: Conflation of CALS hscale and vscale -->
+<!-- Scalefit: Same as CALS scalefit -->
+
+<!ENTITY % graphics.attrib
+	"
+	entityref	ENTITY		#IMPLIED
+	fileref 	CDATA		#IMPLIED
+	format		(%notation.class;) #IMPLIED
+	srccredit	CDATA		#IMPLIED
+	width		CDATA		#IMPLIED
+	contentwidth	CDATA		#IMPLIED
+	depth		CDATA		#IMPLIED
+	contentdepth	CDATA		#IMPLIED
+	align		(left
+			|right
+			|center)	#IMPLIED
+	valign		(top
+			|middle
+			|bottom)	#IMPLIED
+	scale		CDATA		#IMPLIED
+	scalefit	%yesorno.attvals;
+					#IMPLIED
+	%local.graphics.attrib;"
+>
+
+<!ENTITY % local.keyaction.attrib "">
+
+<!-- Action: Key combination type; default is unspecified if one
+	child element, Simul if there is more than one; if value is
+	Other, the OtherAction attribute must have a nonempty value -->
+<!-- OtherAction: User-defined key combination type -->
+
+<!ENTITY % keyaction.attrib
+	"
+	action		(click
+			|double-click
+			|press
+			|seq
+			|simul
+			|other)		#IMPLIED
+	otheraction	CDATA		#IMPLIED
+	%local.keyaction.attrib;"
+>
+
+
+<!-- Label: Identifying number or string; default is usually the
+	appropriate number or string autogenerated by a formatter -->
+
+<!ENTITY % label.attrib
+	"label		CDATA		#IMPLIED">
+
+
+<!-- Format: whether element is assumed to contain significant white
+	space -->
+
+<!ENTITY % linespecific.attrib
+	"format		NOTATION
+			(linespecific)	'linespecific'
+         linenumbering	(numbered|unnumbered) 	#IMPLIED
+         continuation	(continues|restarts)	#IMPLIED
+         startinglinenumber	CDATA		#IMPLIED
+         language	CDATA			#IMPLIED">
+
+<!-- Linkend: link to related information; no default -->
+
+<!ENTITY % linkend.attrib
+	"linkend	IDREF		#IMPLIED">
+
+
+<!-- Linkend: required link to related information -->
+
+<!ENTITY % linkendreq.attrib
+	"linkend	IDREF		#REQUIRED">
+
+
+<!-- Linkends: link to one or more sets of related information; no
+	default -->
+
+<!ENTITY % linkends.attrib
+	"linkends	IDREFS		#IMPLIED">
+
+
+<!ENTITY % local.mark.attrib "">
+<!ENTITY % mark.attrib
+	"mark		CDATA		#IMPLIED
+	%local.mark.attrib;"
+>
+
+
+<!-- MoreInfo: whether element's content has an associated RefEntry -->
+
+<!ENTITY % moreinfo.attrib
+	"moreinfo	(refentry|none)	'none'">
+
+
+<!-- Pagenum: number of page on which element appears; no default -->
+
+<!ENTITY % pagenum.attrib
+	"pagenum	CDATA		#IMPLIED">
+
+<!ENTITY % local.status.attrib "">
+
+<!-- Status: Editorial or publication status of the element
+	it applies to, such as "in review" or "approved for distribution" -->
+
+<!ENTITY % status.attrib
+	"status		CDATA		#IMPLIED
+	%local.status.attrib;"
+>
+
+
+<!-- Width: width of the longest line in the element to which it
+	pertains, in number of characters -->
+
+<!ENTITY % width.attrib
+	"width		CDATA		#IMPLIED">
+
+<!-- ...................................................................... -->
+<!-- Title elements ....................................................... -->
+
+<!ENTITY % title.module "INCLUDE">
+<![%title.module;[
+<!ENTITY % local.title.attrib "">
+<!ENTITY % title.role.attrib "%role.attrib;">
+
+<!ENTITY % title.element "INCLUDE">
+<![%title.element;[
+<!ELEMENT title %ho; (%title.char.mix;)*>
+<!--end of title.element-->]]>
+
+<!ENTITY % title.attlist "INCLUDE">
+<![%title.attlist;[
+<!ATTLIST title
+		%pagenum.attrib;
+		%common.attrib;
+		%title.role.attrib;
+		%local.title.attrib;
+>
+<!--end of title.attlist-->]]>
+<!--end of title.module-->]]>
+
+<!ENTITY % titleabbrev.module "INCLUDE">
+<![%titleabbrev.module;[
+<!ENTITY % local.titleabbrev.attrib "">
+<!ENTITY % titleabbrev.role.attrib "%role.attrib;">
+
+<!ENTITY % titleabbrev.element "INCLUDE">
+<![%titleabbrev.element;[
+<!ELEMENT titleabbrev %ho; (%title.char.mix;)*>
+<!--end of titleabbrev.element-->]]>
+
+<!ENTITY % titleabbrev.attlist "INCLUDE">
+<![%titleabbrev.attlist;[
+<!ATTLIST titleabbrev
+		%common.attrib;
+		%titleabbrev.role.attrib;
+		%local.titleabbrev.attrib;
+>
+<!--end of titleabbrev.attlist-->]]>
+<!--end of titleabbrev.module-->]]>
+
+<!ENTITY % subtitle.module "INCLUDE">
+<![%subtitle.module;[
+<!ENTITY % local.subtitle.attrib "">
+<!ENTITY % subtitle.role.attrib "%role.attrib;">
+
+<!ENTITY % subtitle.element "INCLUDE">
+<![%subtitle.element;[
+<!ELEMENT subtitle %ho; (%title.char.mix;)*>
+<!--end of subtitle.element-->]]>
+
+<!ENTITY % subtitle.attlist "INCLUDE">
+<![%subtitle.attlist;[
+<!ATTLIST subtitle
+		%common.attrib;
+		%subtitle.role.attrib;
+		%local.subtitle.attrib;
+>
+<!--end of subtitle.attlist-->]]>
+<!--end of subtitle.module-->]]>
+
+<!-- ...................................................................... -->
+<!-- Bibliographic entities and elements .................................. -->
+
+<!-- The bibliographic elements are typically used in the document
+     hierarchy. They do not appear in content models of information
+     pool elements.  See also the document information elements,
+     below. -->
+
+<!ENTITY % local.person.ident.mix "">
+<!ENTITY % person.ident.mix
+		"honorific|firstname|surname|lineage|othername|affiliation
+		|authorblurb|contrib %local.person.ident.mix;">
+
+<!ENTITY % local.bibliocomponent.mix "">
+<!ENTITY % bibliocomponent.mix
+		"abbrev|abstract|address|artpagenums|author
+		|authorgroup|authorinitials|bibliomisc|biblioset
+		|collab|confgroup|contractnum|contractsponsor
+		|copyright|corpauthor|corpname|corpcredit|date|edition
+		|editor|invpartnumber|isbn|issn|issuenum|orgname
+		|biblioid|citebiblioid|bibliosource|bibliorelation|bibliocoverage
+		|othercredit|pagenums|printhistory|productname
+		|productnumber|pubdate|publisher|publishername
+		|pubsnumber|releaseinfo|revhistory|seriesvolnums
+		|subtitle|title|titleabbrev|volumenum|citetitle
+		|personname|%person.ident.mix;
+		|%ndxterm.class;
+		%local.bibliocomponent.mix;">
+
+<!-- I don't think this is well placed, but it needs to be here because of -->
+<!-- the reference to bibliocomponent.mix -->
+<!ENTITY % local.info.class "">
+<!ENTITY % info.class
+		"graphic | mediaobject | legalnotice | modespec
+		 | subjectset | keywordset | itermset | %bibliocomponent.mix;
+                 %local.info.class;">
+
+<!ENTITY % biblioentry.module "INCLUDE">
+<![%biblioentry.module;[
+<!ENTITY % local.biblioentry.attrib "">
+<!ENTITY % biblioentry.role.attrib "%role.attrib;">
+
+<!ENTITY % biblioentry.element "INCLUDE">
+<![%biblioentry.element;[
+<!ELEMENT biblioentry %ho; ((articleinfo | (%bibliocomponent.mix;))+)
+                      %ubiq.exclusion;>
+<!--end of biblioentry.element-->]]>
+
+<!ENTITY % biblioentry.attlist "INCLUDE">
+<![%biblioentry.attlist;[
+<!ATTLIST biblioentry
+		%common.attrib;
+		%biblioentry.role.attrib;
+		%local.biblioentry.attrib;
+>
+<!--end of biblioentry.attlist-->]]>
+<!--end of biblioentry.module-->]]>
+
+<!ENTITY % bibliomixed.module "INCLUDE">
+<![%bibliomixed.module;[
+<!ENTITY % local.bibliomixed.attrib "">
+<!ENTITY % bibliomixed.role.attrib "%role.attrib;">
+
+<!ENTITY % bibliomixed.element "INCLUDE">
+<![%bibliomixed.element;[
+<!ELEMENT bibliomixed %ho; (#PCDATA | %bibliocomponent.mix; | bibliomset)*
+                      %ubiq.exclusion;>
+<!--end of bibliomixed.element-->]]>
+
+<!ENTITY % bibliomixed.attlist "INCLUDE">
+<![%bibliomixed.attlist;[
+<!ATTLIST bibliomixed
+		%common.attrib;
+		%bibliomixed.role.attrib;
+		%local.bibliomixed.attrib;
+>
+<!--end of bibliomixed.attlist-->]]>
+<!--end of bibliomixed.module-->]]>
+
+<!ENTITY % articleinfo.module "INCLUDE">
+<![%articleinfo.module;[
+<!ENTITY % local.articleinfo.attrib "">
+<!ENTITY % articleinfo.role.attrib "%role.attrib;">
+
+<!ENTITY % articleinfo.element "INCLUDE">
+<![%articleinfo.element;[
+<!ELEMENT articleinfo %ho; ((%info.class;)+)
+	%beginpage.exclusion;>
+<!--end of articleinfo.element-->]]>
+
+<!ENTITY % articleinfo.attlist "INCLUDE">
+<![%articleinfo.attlist;[
+<!ATTLIST articleinfo
+		%common.attrib;
+		%articleinfo.role.attrib;
+		%local.articleinfo.attrib;
+>
+<!--end of articleinfo.attlist-->]]>
+<!--end of articleinfo.module-->]]>
+
+<!ENTITY % biblioset.module "INCLUDE">
+<![%biblioset.module;[
+<!ENTITY % local.biblioset.attrib "">
+<!ENTITY % biblioset.role.attrib "%role.attrib;">
+
+<!ENTITY % biblioset.element "INCLUDE">
+<![%biblioset.element;[
+<!ELEMENT biblioset %ho; ((%bibliocomponent.mix;)+)
+                      %ubiq.exclusion;>
+<!--end of biblioset.element-->]]>
+
+<!-- Relation: Relationship of elements contained within BiblioSet -->
+
+
+<!ENTITY % biblioset.attlist "INCLUDE">
+<![%biblioset.attlist;[
+<!ATTLIST biblioset
+		relation	CDATA		#IMPLIED
+		%common.attrib;
+		%biblioset.role.attrib;
+		%local.biblioset.attrib;
+>
+<!--end of biblioset.attlist-->]]>
+<!--end of biblioset.module-->]]>
+
+<!ENTITY % bibliomset.module "INCLUDE">
+<![%bibliomset.module;[
+<!ENTITY % bibliomset.role.attrib "%role.attrib;">
+<!ENTITY % local.bibliomset.attrib "">
+
+<!ENTITY % bibliomset.element "INCLUDE">
+<![%bibliomset.element;[
+<!ELEMENT bibliomset %ho; (#PCDATA | %bibliocomponent.mix; | bibliomset)*
+                      %ubiq.exclusion;>
+<!--end of bibliomset.element-->]]>
+
+<!-- Relation: Relationship of elements contained within BiblioMSet -->
+
+
+<!ENTITY % bibliomset.attlist "INCLUDE">
+<![%bibliomset.attlist;[
+<!ATTLIST bibliomset
+		relation	CDATA		#IMPLIED
+		%common.attrib;
+		%bibliomset.role.attrib;
+		%local.bibliomset.attrib;
+>
+<!--end of bibliomset.attlist-->]]>
+<!--end of bibliomset.module-->]]>
+
+<!ENTITY % bibliomisc.module "INCLUDE">
+<![%bibliomisc.module;[
+<!ENTITY % local.bibliomisc.attrib "">
+<!ENTITY % bibliomisc.role.attrib "%role.attrib;">
+
+<!ENTITY % bibliomisc.element "INCLUDE">
+<![%bibliomisc.element;[
+<!ELEMENT bibliomisc %ho; (%para.char.mix;)*>
+<!--end of bibliomisc.element-->]]>
+
+<!ENTITY % bibliomisc.attlist "INCLUDE">
+<![%bibliomisc.attlist;[
+<!ATTLIST bibliomisc
+		%common.attrib;
+		%bibliomisc.role.attrib;
+		%local.bibliomisc.attrib;
+>
+<!--end of bibliomisc.attlist-->]]>
+<!--end of bibliomisc.module-->]]>
+
+<!-- ...................................................................... -->
+<!-- Subject, Keyword, and ITermSet elements .............................. -->
+
+<!ENTITY % subjectset.content.module "INCLUDE">
+<![%subjectset.content.module;[
+<!ENTITY % subjectset.module "INCLUDE">
+<![%subjectset.module;[
+<!ENTITY % local.subjectset.attrib "">
+<!ENTITY % subjectset.role.attrib "%role.attrib;">
+
+<!ENTITY % subjectset.element "INCLUDE">
+<![%subjectset.element;[
+<!ELEMENT subjectset %ho; (subject+)>
+<!--end of subjectset.element-->]]>
+
+<!-- Scheme: Controlled vocabulary employed in SubjectTerms -->
+
+
+<!ENTITY % subjectset.attlist "INCLUDE">
+<![%subjectset.attlist;[
+<!ATTLIST subjectset
+		scheme		NMTOKEN		#IMPLIED
+		%common.attrib;
+		%subjectset.role.attrib;
+		%local.subjectset.attrib;
+>
+<!--end of subjectset.attlist-->]]>
+<!--end of subjectset.module-->]]>
+
+<!ENTITY % subject.module "INCLUDE">
+<![%subject.module;[
+<!ENTITY % local.subject.attrib "">
+<!ENTITY % subject.role.attrib "%role.attrib;">
+
+<!ENTITY % subject.element "INCLUDE">
+<![%subject.element;[
+<!ELEMENT subject %ho; (subjectterm+)>
+<!--end of subject.element-->]]>
+
+<!-- Weight: Ranking of this group of SubjectTerms relative
+		to others, 0 is low, no highest value specified -->
+
+
+<!ENTITY % subject.attlist "INCLUDE">
+<![%subject.attlist;[
+<!ATTLIST subject
+		weight		CDATA		#IMPLIED
+		%common.attrib;
+		%subject.role.attrib;
+		%local.subject.attrib;
+>
+<!--end of subject.attlist-->]]>
+<!--end of subject.module-->]]>
+
+<!ENTITY % subjectterm.module "INCLUDE">
+<![%subjectterm.module;[
+<!ENTITY % local.subjectterm.attrib "">
+<!ENTITY % subjectterm.role.attrib "%role.attrib;">
+
+<!ENTITY % subjectterm.element "INCLUDE">
+<![%subjectterm.element;[
+<!ELEMENT subjectterm %ho; (#PCDATA)>
+<!--end of subjectterm.element-->]]>
+
+<!ENTITY % subjectterm.attlist "INCLUDE">
+<![%subjectterm.attlist;[
+<!ATTLIST subjectterm
+		%common.attrib;
+		%subjectterm.role.attrib;
+		%local.subjectterm.attrib;
+>
+<!--end of subjectterm.attlist-->]]>
+<!--end of subjectterm.module-->]]>
+<!--end of subjectset.content.module-->]]>
+
+<!ENTITY % keywordset.content.module "INCLUDE">
+<![%keywordset.content.module;[
+<!ENTITY % keywordset.module "INCLUDE">
+<![%keywordset.module;[
+<!ENTITY % local.keywordset.attrib "">
+<!ENTITY % keywordset.role.attrib "%role.attrib;">
+
+<!ENTITY % keywordset.element "INCLUDE">
+<![%keywordset.element;[
+<!ELEMENT keywordset %ho; (keyword+)>
+<!--end of keywordset.element-->]]>
+
+<!ENTITY % keywordset.attlist "INCLUDE">
+<![%keywordset.attlist;[
+<!ATTLIST keywordset
+		%common.attrib;
+		%keywordset.role.attrib;
+		%local.keywordset.attrib;
+>
+<!--end of keywordset.attlist-->]]>
+<!--end of keywordset.module-->]]>
+
+<!ENTITY % keyword.module "INCLUDE">
+<![%keyword.module;[
+<!ENTITY % local.keyword.attrib "">
+<!ENTITY % keyword.role.attrib "%role.attrib;">
+
+<!ENTITY % keyword.element "INCLUDE">
+<![%keyword.element;[
+<!ELEMENT keyword %ho; (#PCDATA)>
+<!--end of keyword.element-->]]>
+
+<!ENTITY % keyword.attlist "INCLUDE">
+<![%keyword.attlist;[
+<!ATTLIST keyword
+		%common.attrib;
+		%keyword.role.attrib;
+		%local.keyword.attrib;
+>
+<!--end of keyword.attlist-->]]>
+<!--end of keyword.module-->]]>
+<!--end of keywordset.content.module-->]]>
+
+<!ENTITY % itermset.module "INCLUDE">
+<![%itermset.module;[
+<!ENTITY % local.itermset.attrib "">
+<!ENTITY % itermset.role.attrib "%role.attrib;">
+
+<!ENTITY % itermset.element "INCLUDE">
+<![%itermset.element;[
+<!ELEMENT itermset %ho; (indexterm+)>
+<!--end of itermset.element-->]]>
+
+<!ENTITY % itermset.attlist "INCLUDE">
+<![%itermset.attlist;[
+<!ATTLIST itermset
+		%common.attrib;
+		%itermset.role.attrib;
+		%local.itermset.attrib;
+>
+<!--end of itermset.attlist-->]]>
+<!--end of itermset.module-->]]>
+
+<!-- Bibliographic info for "blocks" -->
+
+<!ENTITY % blockinfo.module "INCLUDE">
+<![ %blockinfo.module; [
+<!ENTITY % local.blockinfo.attrib "">
+<!ENTITY % blockinfo.role.attrib "%role.attrib;">
+
+<!ENTITY % blockinfo.element "INCLUDE">
+<![ %blockinfo.element; [
+<!ELEMENT blockinfo %ho; ((%info.class;)+)
+	%beginpage.exclusion;>
+<!--end of blockinfo.element-->]]>
+
+<!ENTITY % blockinfo.attlist "INCLUDE">
+<![ %blockinfo.attlist; [
+<!ATTLIST blockinfo
+		%common.attrib;
+		%blockinfo.role.attrib;
+		%local.blockinfo.attrib;
+>
+<!--end of blockinfo.attlist-->]]>
+<!--end of blockinfo.module-->]]>
+
+<!-- ...................................................................... -->
+<!-- Compound (section-ish) elements ...................................... -->
+
+<!-- Message set ...................... -->
+
+<!ENTITY % msgset.content.module "INCLUDE">
+<![%msgset.content.module;[
+<!ENTITY % msgset.module "INCLUDE">
+<![%msgset.module;[
+<!ENTITY % local.msgset.attrib "">
+<!ENTITY % msgset.role.attrib "%role.attrib;">
+
+<!ENTITY % msgset.element "INCLUDE">
+<![%msgset.element;[
+<!ELEMENT msgset %ho; (blockinfo?, (%formalobject.title.content;)?,
+                       (msgentry+|simplemsgentry+))>
+<!--end of msgset.element-->]]>
+
+<!ENTITY % msgset.attlist "INCLUDE">
+<![%msgset.attlist;[
+<!ATTLIST msgset
+		%common.attrib;
+		%msgset.role.attrib;
+		%local.msgset.attrib;
+>
+<!--end of msgset.attlist-->]]>
+<!--end of msgset.module-->]]>
+
+<!ENTITY % msgentry.module "INCLUDE">
+<![%msgentry.module;[
+<!ENTITY % local.msgentry.attrib "">
+<!ENTITY % msgentry.role.attrib "%role.attrib;">
+
+<!ENTITY % msgentry.element "INCLUDE">
+<![%msgentry.element;[
+<!ELEMENT msgentry %ho; (msg+, msginfo?, msgexplan*)>
+<!--end of msgentry.element-->]]>
+
+<!ENTITY % msgentry.attlist "INCLUDE">
+<![%msgentry.attlist;[
+<!ATTLIST msgentry
+		%common.attrib;
+		%msgentry.role.attrib;
+		%local.msgentry.attrib;
+>
+<!--end of msgentry.attlist-->]]>
+<!--end of msgentry.module-->]]>
+
+<!ENTITY % simplemsgentry.module "INCLUDE">
+<![ %simplemsgentry.module; [
+<!ENTITY % local.simplemsgentry.attrib "">
+<!ENTITY % simplemsgentry.role.attrib "%role.attrib;">
+
+<!ENTITY % simplemsgentry.element "INCLUDE">
+<![ %simplemsgentry.element; [
+<!ELEMENT simplemsgentry %ho; (msgtext, msgexplan+)>
+<!--end of simplemsgentry.element-->]]>
+
+<!ENTITY % simplemsgentry.attlist "INCLUDE">
+<![ %simplemsgentry.attlist; [
+<!ATTLIST simplemsgentry
+		audience	CDATA	#IMPLIED
+		level		CDATA	#IMPLIED
+		origin		CDATA	#IMPLIED
+		%common.attrib;
+		%simplemsgentry.role.attrib;
+		%local.simplemsgentry.attrib;
+>
+<!--end of simplemsgentry.attlist-->]]>
+<!--end of simplemsgentry.module-->]]>
+
+<!ENTITY % msg.module "INCLUDE">
+<![%msg.module;[
+<!ENTITY % local.msg.attrib "">
+<!ENTITY % msg.role.attrib "%role.attrib;">
+
+<!ENTITY % msg.element "INCLUDE">
+<![%msg.element;[
+<!ELEMENT msg %ho; (title?, msgmain, (msgsub | msgrel)*)>
+<!--end of msg.element-->]]>
+
+<!ENTITY % msg.attlist "INCLUDE">
+<![%msg.attlist;[
+<!ATTLIST msg
+		%common.attrib;
+		%msg.role.attrib;
+		%local.msg.attrib;
+>
+<!--end of msg.attlist-->]]>
+<!--end of msg.module-->]]>
+
+<!ENTITY % msgmain.module "INCLUDE">
+<![%msgmain.module;[
+<!ENTITY % local.msgmain.attrib "">
+<!ENTITY % msgmain.role.attrib "%role.attrib;">
+
+<!ENTITY % msgmain.element "INCLUDE">
+<![%msgmain.element;[
+<!ELEMENT msgmain %ho; (title?, msgtext)>
+<!--end of msgmain.element-->]]>
+
+<!ENTITY % msgmain.attlist "INCLUDE">
+<![%msgmain.attlist;[
+<!ATTLIST msgmain
+		%common.attrib;
+		%msgmain.role.attrib;
+		%local.msgmain.attrib;
+>
+<!--end of msgmain.attlist-->]]>
+<!--end of msgmain.module-->]]>
+
+<!ENTITY % msgsub.module "INCLUDE">
+<![%msgsub.module;[
+<!ENTITY % local.msgsub.attrib "">
+<!ENTITY % msgsub.role.attrib "%role.attrib;">
+
+<!ENTITY % msgsub.element "INCLUDE">
+<![%msgsub.element;[
+<!ELEMENT msgsub %ho; (title?, msgtext)>
+<!--end of msgsub.element-->]]>
+
+<!ENTITY % msgsub.attlist "INCLUDE">
+<![%msgsub.attlist;[
+<!ATTLIST msgsub
+		%common.attrib;
+		%msgsub.role.attrib;
+		%local.msgsub.attrib;
+>
+<!--end of msgsub.attlist-->]]>
+<!--end of msgsub.module-->]]>
+
+<!ENTITY % msgrel.module "INCLUDE">
+<![%msgrel.module;[
+<!ENTITY % local.msgrel.attrib "">
+<!ENTITY % msgrel.role.attrib "%role.attrib;">
+
+<!ENTITY % msgrel.element "INCLUDE">
+<![%msgrel.element;[
+<!ELEMENT msgrel %ho; (title?, msgtext)>
+<!--end of msgrel.element-->]]>
+
+<!ENTITY % msgrel.attlist "INCLUDE">
+<![%msgrel.attlist;[
+<!ATTLIST msgrel
+		%common.attrib;
+		%msgrel.role.attrib;
+		%local.msgrel.attrib;
+>
+<!--end of msgrel.attlist-->]]>
+<!--end of msgrel.module-->]]>
+
+<!-- MsgText (defined in the Inlines section, below)-->
+
+<!ENTITY % msginfo.module "INCLUDE">
+<![%msginfo.module;[
+<!ENTITY % local.msginfo.attrib "">
+<!ENTITY % msginfo.role.attrib "%role.attrib;">
+
+<!ENTITY % msginfo.element "INCLUDE">
+<![%msginfo.element;[
+<!ELEMENT msginfo %ho; ((msglevel | msgorig | msgaud)*)>
+<!--end of msginfo.element-->]]>
+
+<!ENTITY % msginfo.attlist "INCLUDE">
+<![%msginfo.attlist;[
+<!ATTLIST msginfo
+		%common.attrib;
+		%msginfo.role.attrib;
+		%local.msginfo.attrib;
+>
+<!--end of msginfo.attlist-->]]>
+<!--end of msginfo.module-->]]>
+
+<!ENTITY % msglevel.module "INCLUDE">
+<![%msglevel.module;[
+<!ENTITY % local.msglevel.attrib "">
+<!ENTITY % msglevel.role.attrib "%role.attrib;">
+
+<!ENTITY % msglevel.element "INCLUDE">
+<![%msglevel.element;[
+<!ELEMENT msglevel %ho; (%smallcptr.char.mix;)*>
+<!--end of msglevel.element-->]]>
+
+<!ENTITY % msglevel.attlist "INCLUDE">
+<![%msglevel.attlist;[
+<!ATTLIST msglevel
+		%common.attrib;
+		%msglevel.role.attrib;
+		%local.msglevel.attrib;
+>
+<!--end of msglevel.attlist-->]]>
+<!--end of msglevel.module-->]]>
+
+<!ENTITY % msgorig.module "INCLUDE">
+<![%msgorig.module;[
+<!ENTITY % local.msgorig.attrib "">
+<!ENTITY % msgorig.role.attrib "%role.attrib;">
+
+<!ENTITY % msgorig.element "INCLUDE">
+<![%msgorig.element;[
+<!ELEMENT msgorig %ho; (%smallcptr.char.mix;)*>
+<!--end of msgorig.element-->]]>
+
+<!ENTITY % msgorig.attlist "INCLUDE">
+<![%msgorig.attlist;[
+<!ATTLIST msgorig
+		%common.attrib;
+		%msgorig.role.attrib;
+		%local.msgorig.attrib;
+>
+<!--end of msgorig.attlist-->]]>
+<!--end of msgorig.module-->]]>
+
+<!ENTITY % msgaud.module "INCLUDE">
+<![%msgaud.module;[
+<!ENTITY % local.msgaud.attrib "">
+<!ENTITY % msgaud.role.attrib "%role.attrib;">
+
+<!ENTITY % msgaud.element "INCLUDE">
+<![%msgaud.element;[
+<!ELEMENT msgaud %ho; (%para.char.mix;)*>
+<!--end of msgaud.element-->]]>
+
+<!ENTITY % msgaud.attlist "INCLUDE">
+<![%msgaud.attlist;[
+<!ATTLIST msgaud
+		%common.attrib;
+		%msgaud.role.attrib;
+		%local.msgaud.attrib;
+>
+<!--end of msgaud.attlist-->]]>
+<!--end of msgaud.module-->]]>
+
+<!ENTITY % msgexplan.module "INCLUDE">
+<![%msgexplan.module;[
+<!ENTITY % local.msgexplan.attrib "">
+<!ENTITY % msgexplan.role.attrib "%role.attrib;">
+
+<!ENTITY % msgexplan.element "INCLUDE">
+<![%msgexplan.element;[
+<!ELEMENT msgexplan %ho; (title?, (%component.mix;)+)>
+<!--end of msgexplan.element-->]]>
+
+<!ENTITY % msgexplan.attlist "INCLUDE">
+<![%msgexplan.attlist;[
+<!ATTLIST msgexplan
+		%common.attrib;
+		%msgexplan.role.attrib;
+		%local.msgexplan.attrib;
+>
+<!--end of msgexplan.attlist-->]]>
+<!--end of msgexplan.module-->]]>
+<!--end of msgset.content.module-->]]>
+
+<!ENTITY % task.content.module "INCLUDE">
+<![%task.content.module;[
+<!ENTITY % task.module "INCLUDE">
+<![%task.module;[
+<!ENTITY % local.task.attrib "">
+<!ENTITY % task.role.attrib "%role.attrib;">
+
+<!ENTITY % task.element "INCLUDE">
+<![%task.element;[
+<!ELEMENT task %ho; (blockinfo?,(%ndxterm.class;)*,
+                     (%formalobject.title.content;),
+                     tasksummary?,
+                     taskprerequisites?,
+                     procedure,
+                     example*,
+                     taskrelated?)>
+<!--end of task.element-->]]>
+
+<!ENTITY % task.attlist "INCLUDE">
+<![%task.attlist;[
+<!ATTLIST task
+		%common.attrib;
+		%task.role.attrib;
+		%local.task.attrib;
+>
+<!--end of task.attlist-->]]>
+<!--end of task.module-->]]>
+
+<!ENTITY % tasksummary.module "INCLUDE">
+<![%tasksummary.module;[
+<!ENTITY % local.tasksummary.attrib "">
+<!ENTITY % tasksummary.role.attrib "%role.attrib;">
+
+<!ENTITY % tasksummary.element "INCLUDE">
+<![%tasksummary.element;[
+<!ELEMENT tasksummary %ho; (blockinfo?,
+                            (%formalobject.title.content;)?,
+                            (%component.mix;)+)>
+<!--end of tasksummary.element-->]]>
+
+<!ENTITY % tasksummary.attlist "INCLUDE">
+<![%tasksummary.attlist;[
+<!ATTLIST tasksummary
+		%common.attrib;
+		%tasksummary.role.attrib;
+		%local.tasksummary.attrib;
+>
+<!--end of tasksummary.attlist-->]]>
+<!--end of tasksummary.module-->]]>
+
+<!ENTITY % taskprerequisites.module "INCLUDE">
+<![%taskprerequisites.module;[
+<!ENTITY % local.taskprerequisites.attrib "">
+<!ENTITY % taskprerequisites.role.attrib "%role.attrib;">
+
+<!ENTITY % taskprerequisites.element "INCLUDE">
+<![%taskprerequisites.element;[
+<!ELEMENT taskprerequisites %ho; (blockinfo?,
+                                  (%formalobject.title.content;)?,
+                                  (%component.mix;)+)>
+<!--end of taskprerequisites.element-->]]>
+
+<!ENTITY % taskprerequisites.attlist "INCLUDE">
+<![%taskprerequisites.attlist;[
+<!ATTLIST taskprerequisites
+		%common.attrib;
+		%taskprerequisites.role.attrib;
+		%local.taskprerequisites.attrib;
+>
+<!--end of taskprerequisites.attlist-->]]>
+<!--end of taskprerequisites.module-->]]>
+
+<!ENTITY % taskrelated.module "INCLUDE">
+<![%taskrelated.module;[
+<!ENTITY % local.taskrelated.attrib "">
+<!ENTITY % taskrelated.role.attrib "%role.attrib;">
+
+<!ENTITY % taskrelated.element "INCLUDE">
+<![%taskrelated.element;[
+<!ELEMENT taskrelated %ho; (blockinfo?,
+                            (%formalobject.title.content;)?,
+                            (%component.mix;)+)>
+<!--end of taskrelated.element-->]]>
+
+<!ENTITY % taskrelated.attlist "INCLUDE">
+<![%taskrelated.attlist;[
+<!ATTLIST taskrelated
+		%common.attrib;
+		%taskrelated.role.attrib;
+		%local.taskrelated.attrib;
+>
+<!--end of taskrelated.attlist-->]]>
+<!--end of taskrelated.module-->]]>
+<!--end of task.content.module-->]]>
+
+<!-- QandASet ........................ -->
+<!ENTITY % qandaset.content.module "INCLUDE">
+<![ %qandaset.content.module; [
+<!ENTITY % qandaset.module "INCLUDE">
+<![ %qandaset.module; [
+<!ENTITY % local.qandaset.attrib "">
+<!ENTITY % qandaset.role.attrib "%role.attrib;">
+
+<!ENTITY % qandaset.element "INCLUDE">
+<![ %qandaset.element; [
+<!ELEMENT qandaset %ho; (blockinfo?, (%formalobject.title.content;)?,
+			(%qandaset.mix;)*,
+                        (qandadiv+|qandaentry+))>
+<!--end of qandaset.element-->]]>
+
+<!ENTITY % qandaset.attlist "INCLUDE">
+<![ %qandaset.attlist; [
+<!ATTLIST qandaset
+		defaultlabel	(qanda|number|none)       #IMPLIED
+		%common.attrib;
+		%qandaset.role.attrib;
+		%local.qandaset.attrib;>
+<!--end of qandaset.attlist-->]]>
+<!--end of qandaset.module-->]]>
+
+<!ENTITY % qandadiv.module "INCLUDE">
+<![ %qandadiv.module; [
+<!ENTITY % local.qandadiv.attrib "">
+<!ENTITY % qandadiv.role.attrib "%role.attrib;">
+
+<!ENTITY % qandadiv.element "INCLUDE">
+<![ %qandadiv.element; [
+<!ELEMENT qandadiv %ho; (blockinfo?, (%formalobject.title.content;)?,
+			(%qandaset.mix;)*,
+			(qandadiv+|qandaentry+))>
+<!--end of qandadiv.element-->]]>
+
+<!ENTITY % qandadiv.attlist "INCLUDE">
+<![ %qandadiv.attlist; [
+<!ATTLIST qandadiv
+		%common.attrib;
+		%qandadiv.role.attrib;
+		%local.qandadiv.attrib;>
+<!--end of qandadiv.attlist-->]]>
+<!--end of qandadiv.module-->]]>
+
+<!ENTITY % qandaentry.module "INCLUDE">
+<![ %qandaentry.module; [
+<!ENTITY % local.qandaentry.attrib "">
+<!ENTITY % qandaentry.role.attrib "%role.attrib;">
+
+<!ENTITY % qandaentry.element "INCLUDE">
+<![ %qandaentry.element; [
+<!ELEMENT qandaentry %ho; (blockinfo?, revhistory?, question, answer*)>
+<!--end of qandaentry.element-->]]>
+
+<!ENTITY % qandaentry.attlist "INCLUDE">
+<![ %qandaentry.attlist; [
+<!ATTLIST qandaentry
+		%common.attrib;
+		%qandaentry.role.attrib;
+		%local.qandaentry.attrib;>
+<!--end of qandaentry.attlist-->]]>
+<!--end of qandaentry.module-->]]>
+
+<!ENTITY % question.module "INCLUDE">
+<![ %question.module; [
+<!ENTITY % local.question.attrib "">
+<!ENTITY % question.role.attrib "%role.attrib;">
+
+<!ENTITY % question.element "INCLUDE">
+<![ %question.element; [
+<!ELEMENT question %ho; (label?, (%qandaset.mix;)+)>
+<!--end of question.element-->]]>
+
+<!ENTITY % question.attlist "INCLUDE">
+<![ %question.attlist; [
+<!ATTLIST question
+		%common.attrib;
+		%question.role.attrib;
+		%local.question.attrib;
+>
+<!--end of question.attlist-->]]>
+<!--end of question.module-->]]>
+
+<!ENTITY % answer.module "INCLUDE">
+<![ %answer.module; [
+<!ENTITY % local.answer.attrib "">
+<!ENTITY % answer.role.attrib "%role.attrib;">
+
+<!ENTITY % answer.element "INCLUDE">
+<![ %answer.element; [
+<!ELEMENT answer %ho; (label?, (%qandaset.mix;)*, qandaentry*)>
+<!--end of answer.element-->]]>
+
+<!ENTITY % answer.attlist "INCLUDE">
+<![ %answer.attlist; [
+<!ATTLIST answer
+		%common.attrib;
+		%answer.role.attrib;
+		%local.answer.attrib;
+>
+<!--end of answer.attlist-->]]>
+<!--end of answer.module-->]]>
+
+<!ENTITY % label.module "INCLUDE">
+<![ %label.module; [
+<!ENTITY % local.label.attrib "">
+<!ENTITY % label.role.attrib "%role.attrib;">
+
+<!ENTITY % label.element "INCLUDE">
+<![ %label.element; [
+<!ELEMENT label %ho; (%word.char.mix;)*>
+<!--end of label.element-->]]>
+
+<!ENTITY % label.attlist "INCLUDE">
+<![ %label.attlist; [
+<!ATTLIST label
+		%common.attrib;
+		%label.role.attrib;
+		%local.label.attrib;
+>
+<!--end of label.attlist-->]]>
+<!--end of label.module-->]]>
+<!--end of qandaset.content.module-->]]>
+
+<!-- Procedure ........................ -->
+
+<!ENTITY % procedure.content.module "INCLUDE">
+<![%procedure.content.module;[
+<!ENTITY % procedure.module "INCLUDE">
+<![%procedure.module;[
+<!ENTITY % local.procedure.attrib "">
+<!ENTITY % procedure.role.attrib "%role.attrib;">
+
+<!ENTITY % procedure.element "INCLUDE">
+<![%procedure.element;[
+<!ELEMENT procedure %ho; (blockinfo?, (%formalobject.title.content;)?,
+                          (%component.mix;)*, step+)>
+<!--end of procedure.element-->]]>
+
+<!ENTITY % procedure.attlist "INCLUDE">
+<![%procedure.attlist;[
+<!ATTLIST procedure
+		%common.attrib;
+		%procedure.role.attrib;
+		%local.procedure.attrib;
+>
+<!--end of procedure.attlist-->]]>
+<!--end of procedure.module-->]]>
+
+<!ENTITY % step.module "INCLUDE">
+<![%step.module;[
+<!ENTITY % local.step.attrib "">
+<!ENTITY % step.role.attrib "%role.attrib;">
+
+<!ENTITY % step.element "INCLUDE">
+<![%step.element;[
+<!ELEMENT step %ho; (title?, (((%component.mix;)+, ((substeps|stepalternatives), (%component.mix;)*)?)
+                    | ((substeps|stepalternatives), (%component.mix;)*)))>
+<!--end of step.element-->]]>
+
+<!-- Performance: Whether the Step must be performed -->
+<!-- not #REQUIRED! -->
+
+
+<!ENTITY % step.attlist "INCLUDE">
+<![%step.attlist;[
+<!ATTLIST step
+		performance	(optional
+				|required)	"required"
+		%common.attrib;
+		%step.role.attrib;
+		%local.step.attrib;
+>
+<!--end of step.attlist-->]]>
+<!--end of step.module-->]]>
+
+<!ENTITY % substeps.module "INCLUDE">
+<![%substeps.module;[
+<!ENTITY % local.substeps.attrib "">
+<!ENTITY % substeps.role.attrib "%role.attrib;">
+
+<!ENTITY % substeps.element "INCLUDE">
+<![%substeps.element;[
+<!ELEMENT substeps %ho; (step+)>
+<!--end of substeps.element-->]]>
+
+<!-- Performance: whether entire set of substeps must be performed -->
+<!-- not #REQUIRED! -->
+
+<!ENTITY % substeps.attlist "INCLUDE">
+<![%substeps.attlist;[
+<!ATTLIST substeps
+		performance	(optional
+				|required)	"required"
+		%common.attrib;
+		%substeps.role.attrib;
+		%local.substeps.attrib;
+>
+<!--end of substeps.attlist-->]]>
+<!--end of substeps.module-->]]>
+
+<!ENTITY % stepalternatives.module "INCLUDE">
+<![%stepalternatives.module;[
+<!ENTITY % local.stepalternatives.attrib "">
+<!ENTITY % stepalternatives.role.attrib "%role.attrib;">
+
+<!ENTITY % stepalternatives.element "INCLUDE">
+<![%stepalternatives.element;[
+<!ELEMENT stepalternatives %ho; (step+)>
+<!--end of stepalternatives.element-->]]>
+
+<!-- Performance: Whether (one of) the alternatives must be performed -->
+<!-- not #REQUIRED! -->
+
+<!ENTITY % stepalternatives.attlist "INCLUDE">
+<![%stepalternatives.attlist;[
+<!ATTLIST stepalternatives
+		performance	(optional
+				|required)	"required"
+		%common.attrib;
+		%stepalternatives.role.attrib;
+		%local.stepalternatives.attrib;
+>
+<!--end of stepalternatives.attlist-->]]>
+<!--end of stepalternatives.module-->]]>
+<!--end of procedure.content.module-->]]>
+
+<!-- Sidebar .......................... -->
+
+<!ENTITY % sidebar.content.model "INCLUDE">
+<![ %sidebar.content.model; [
+
+<!ENTITY % sidebarinfo.module "INCLUDE">
+<![ %sidebarinfo.module; [
+<!ENTITY % local.sidebarinfo.attrib "">
+<!ENTITY % sidebarinfo.role.attrib "%role.attrib;">
+
+<!ENTITY % sidebarinfo.element "INCLUDE">
+<![ %sidebarinfo.element; [
+<!ELEMENT sidebarinfo %ho; ((%info.class;)+)
+	%beginpage.exclusion;>
+<!--end of sidebarinfo.element-->]]>
+
+<!ENTITY % sidebarinfo.attlist "INCLUDE">
+<![ %sidebarinfo.attlist; [
+<!ATTLIST sidebarinfo
+		%common.attrib;
+		%sidebarinfo.role.attrib;
+		%local.sidebarinfo.attrib;
+>
+<!--end of sidebarinfo.attlist-->]]>
+<!--end of sidebarinfo.module-->]]>
+
+<!ENTITY % sidebar.module "INCLUDE">
+<![%sidebar.module;[
+<!ENTITY % local.sidebar.attrib "">
+<!ENTITY % sidebar.role.attrib "%role.attrib;">
+
+<!ENTITY % sidebar.element "INCLUDE">
+<![%sidebar.element;[
+<!ELEMENT sidebar %ho; (sidebarinfo?,
+                   (%formalobject.title.content;)?,
+                   (%sidebar.mix;)+)>
+<!--end of sidebar.element-->]]>
+
+<!ENTITY % sidebar.attlist "INCLUDE">
+<![%sidebar.attlist;[
+<!ATTLIST sidebar
+		%common.attrib;
+		%sidebar.role.attrib;
+		%local.sidebar.attrib;
+>
+<!--end of sidebar.attlist-->]]>
+<!--end of sidebar.module-->]]>
+<!--end of sidebar.content.model-->]]>
+
+<!-- ...................................................................... -->
+<!-- Paragraph-related elements ........................................... -->
+
+<!ENTITY % abstract.module "INCLUDE">
+<![%abstract.module;[
+<!ENTITY % local.abstract.attrib "">
+<!ENTITY % abstract.role.attrib "%role.attrib;">
+
+<!ENTITY % abstract.element "INCLUDE">
+<![%abstract.element;[
+<!ELEMENT abstract %ho; (title?, (%para.class;)+)>
+<!--end of abstract.element-->]]>
+
+<!ENTITY % abstract.attlist "INCLUDE">
+<![%abstract.attlist;[
+<!ATTLIST abstract
+		%common.attrib;
+		%abstract.role.attrib;
+		%local.abstract.attrib;
+>
+<!--end of abstract.attlist-->]]>
+<!--end of abstract.module-->]]>
+
+<!ENTITY % authorblurb.module "INCLUDE">
+<![%authorblurb.module;[
+<!ENTITY % local.authorblurb.attrib "">
+<!ENTITY % authorblurb.role.attrib "%role.attrib;">
+
+<!ENTITY % authorblurb.element "INCLUDE">
+<![%authorblurb.element;[
+<!ELEMENT authorblurb %ho; (title?, (%para.class;)+)>
+<!--end of authorblurb.element-->]]>
+
+<!ENTITY % authorblurb.attlist "INCLUDE">
+<![%authorblurb.attlist;[
+<!ATTLIST authorblurb
+		%common.attrib;
+		%authorblurb.role.attrib;
+		%local.authorblurb.attrib;
+>
+<!--end of authorblurb.attlist-->]]>
+<!--end of authorblurb.module-->]]>
+
+<!ENTITY % personblurb.module "INCLUDE">
+<![%personblurb.module;[
+<!ENTITY % local.personblurb.attrib "">
+<!ENTITY % personblurb.role.attrib "%role.attrib;">
+
+<!ENTITY % personblurb.element "INCLUDE">
+<![%personblurb.element;[
+<!ELEMENT personblurb %ho; (title?, (%para.class;)+)>
+<!--end of personblurb.element-->]]>
+
+<!ENTITY % personblurb.attlist "INCLUDE">
+<![%personblurb.attlist;[
+<!ATTLIST personblurb
+		%common.attrib;
+		%personblurb.role.attrib;
+		%local.personblurb.attrib;
+>
+<!--end of personblurb.attlist-->]]>
+<!--end of personblurb.module-->]]>
+
+<!ENTITY % blockquote.module "INCLUDE">
+<![%blockquote.module;[
+
+<!ENTITY % local.blockquote.attrib "">
+<!ENTITY % blockquote.role.attrib "%role.attrib;">
+
+<!ENTITY % blockquote.element "INCLUDE">
+<![%blockquote.element;[
+<!ELEMENT blockquote %ho; (blockinfo?, title?, attribution?, (%component.mix;)+)
+                      %blockquote.exclusion;>
+<!--end of blockquote.element-->]]>
+
+<!ENTITY % blockquote.attlist "INCLUDE">
+<![%blockquote.attlist;[
+<!ATTLIST blockquote
+		%common.attrib;
+		%blockquote.role.attrib;
+		%local.blockquote.attrib;
+>
+<!--end of blockquote.attlist-->]]>
+<!--end of blockquote.module-->]]>
+
+<!ENTITY % attribution.module "INCLUDE">
+<![%attribution.module;[
+<!ENTITY % local.attribution.attrib "">
+<!ENTITY % attribution.role.attrib "%role.attrib;">
+
+<!ENTITY % attribution.element "INCLUDE">
+<![%attribution.element;[
+<!ELEMENT attribution %ho; (%para.char.mix;)*>
+<!--end of attribution.element-->]]>
+
+<!ENTITY % attribution.attlist "INCLUDE">
+<![%attribution.attlist;[
+<!ATTLIST attribution
+		%common.attrib;
+		%attribution.role.attrib;
+		%local.attribution.attrib;
+>
+<!--end of attribution.attlist-->]]>
+<!--end of attribution.module-->]]>
+
+<!ENTITY % bridgehead.module "INCLUDE">
+<![%bridgehead.module;[
+<!ENTITY % local.bridgehead.attrib "">
+<!ENTITY % bridgehead.role.attrib "%role.attrib;">
+
+<!ENTITY % bridgehead.element "INCLUDE">
+<![%bridgehead.element;[
+<!ELEMENT bridgehead %ho; (%title.char.mix;)*>
+<!--end of bridgehead.element-->]]>
+
+<!-- Renderas: Indicates the format in which the BridgeHead
+		should appear -->
+
+
+<!ENTITY % bridgehead.attlist "INCLUDE">
+<![%bridgehead.attlist;[
+<!ATTLIST bridgehead
+		renderas	(other
+				|sect1
+				|sect2
+				|sect3
+				|sect4
+				|sect5)		#IMPLIED
+		%common.attrib;
+		%bridgehead.role.attrib;
+		%local.bridgehead.attrib;
+>
+<!--end of bridgehead.attlist-->]]>
+<!--end of bridgehead.module-->]]>
+
+<!ENTITY % remark.module "INCLUDE">
+<![%remark.module;[
+<!ENTITY % local.remark.attrib "">
+<!ENTITY % remark.role.attrib "%role.attrib;">
+
+<!ENTITY % remark.element "INCLUDE">
+<![%remark.element;[
+<!ELEMENT remark %ho; (%para.char.mix;)*
+                      %remark.exclusion;>
+<!--end of remark.element-->]]>
+
+<!ENTITY % remark.attlist "INCLUDE">
+<![%remark.attlist;[
+<!ATTLIST remark
+		%common.attrib;
+		%remark.role.attrib;
+		%local.remark.attrib;
+>
+<!--end of remark.attlist-->]]>
+<!--end of remark.module-->]]>
+
+<!ENTITY % epigraph.module "INCLUDE">
+<![%epigraph.module;[
+<!ENTITY % local.epigraph.attrib "">
+<!ENTITY % epigraph.role.attrib "%role.attrib;">
+
+<!ENTITY % epigraph.element "INCLUDE">
+<![%epigraph.element;[
+<!ELEMENT epigraph %ho; (attribution?, ((%para.class;)|literallayout)+)>
+<!--end of epigraph.element-->]]>
+
+<!ENTITY % epigraph.attlist "INCLUDE">
+<![%epigraph.attlist;[
+<!ATTLIST epigraph
+		%common.attrib;
+		%epigraph.role.attrib;
+		%local.epigraph.attrib;
+>
+<!--end of epigraph.attlist-->]]>
+<!-- Attribution (defined above)-->
+<!--end of epigraph.module-->]]>
+
+<!ENTITY % footnote.module "INCLUDE">
+<![%footnote.module;[
+<!ENTITY % local.footnote.attrib "">
+<!ENTITY % footnote.role.attrib "%role.attrib;">
+
+<!ENTITY % footnote.element "INCLUDE">
+<![%footnote.element;[
+<!ELEMENT footnote %ho; ((%footnote.mix;)+)
+                      %footnote.exclusion;>
+<!--end of footnote.element-->]]>
+
+<!ENTITY % footnote.attlist "INCLUDE">
+<![%footnote.attlist;[
+<!ATTLIST footnote
+		%label.attrib;
+		%common.attrib;
+		%footnote.role.attrib;
+		%local.footnote.attrib;
+>
+<!--end of footnote.attlist-->]]>
+<!--end of footnote.module-->]]>
+
+<!ENTITY % highlights.module "INCLUDE">
+<![%highlights.module;[
+<!ENTITY % local.highlights.attrib "">
+<!ENTITY % highlights.role.attrib "%role.attrib;">
+
+<!ENTITY % highlights.element "INCLUDE">
+<![%highlights.element;[
+<!ELEMENT highlights %ho; ((%highlights.mix;)+)
+                      %highlights.exclusion;>
+<!--end of highlights.element-->]]>
+
+<!ENTITY % highlights.attlist "INCLUDE">
+<![%highlights.attlist;[
+<!ATTLIST highlights
+		%common.attrib;
+		%highlights.role.attrib;
+		%local.highlights.attrib;
+>
+<!--end of highlights.attlist-->]]>
+<!--end of highlights.module-->]]>
+
+<!ENTITY % formalpara.module "INCLUDE">
+<![%formalpara.module;[
+<!ENTITY % local.formalpara.attrib "">
+<!ENTITY % formalpara.role.attrib "%role.attrib;">
+
+<!ENTITY % formalpara.element "INCLUDE">
+<![%formalpara.element;[
+<!ELEMENT formalpara %ho; (title, (%ndxterm.class;)*, para)>
+<!--end of formalpara.element-->]]>
+
+<!ENTITY % formalpara.attlist "INCLUDE">
+<![%formalpara.attlist;[
+<!ATTLIST formalpara
+		%common.attrib;
+		%formalpara.role.attrib;
+		%local.formalpara.attrib;
+>
+<!--end of formalpara.attlist-->]]>
+<!--end of formalpara.module-->]]>
+
+<!ENTITY % para.module "INCLUDE">
+<![%para.module;[
+<!ENTITY % local.para.attrib "">
+<!ENTITY % para.role.attrib "%role.attrib;">
+
+<!ENTITY % para.element "INCLUDE">
+<![%para.element;[
+<!ELEMENT para %ho; (%para.char.mix; | %para.mix;)*>
+<!--end of para.element-->]]>
+
+<!ENTITY % para.attlist "INCLUDE">
+<![%para.attlist;[
+<!ATTLIST para
+		%common.attrib;
+		%para.role.attrib;
+		%local.para.attrib;
+>
+<!--end of para.attlist-->]]>
+<!--end of para.module-->]]>
+
+<!ENTITY % simpara.module "INCLUDE">
+<![%simpara.module;[
+<!ENTITY % local.simpara.attrib "">
+<!ENTITY % simpara.role.attrib "%role.attrib;">
+
+<!ENTITY % simpara.element "INCLUDE">
+<![%simpara.element;[
+<!ELEMENT simpara %ho; (%para.char.mix;)*>
+<!--end of simpara.element-->]]>
+
+<!ENTITY % simpara.attlist "INCLUDE">
+<![%simpara.attlist;[
+<!ATTLIST simpara
+		%common.attrib;
+		%simpara.role.attrib;
+		%local.simpara.attrib;
+>
+<!--end of simpara.attlist-->]]>
+<!--end of simpara.module-->]]>
+
+<!ENTITY % admon.module "INCLUDE">
+<![%admon.module;[
+<!ENTITY % local.admon.attrib "">
+<!ENTITY % admon.role.attrib "%role.attrib;">
+
+
+<!ENTITY % caution.element "INCLUDE">
+<![%caution.element;[
+<!ELEMENT caution %ho; (title?, (%admon.mix;)+)
+                      %admon.exclusion;>
+<!--end of caution.element-->]]>
+
+<!ENTITY % caution.attlist "INCLUDE">
+<![%caution.attlist;[
+<!ATTLIST caution
+		%common.attrib;
+		%admon.role.attrib;
+		%local.admon.attrib;
+>
+<!--end of caution.attlist-->]]>
+
+
+<!ENTITY % important.element "INCLUDE">
+<![%important.element;[
+<!ELEMENT important %ho; (title?, (%admon.mix;)+)
+                      %admon.exclusion;>
+<!--end of important.element-->]]>
+
+<!ENTITY % important.attlist "INCLUDE">
+<![%important.attlist;[
+<!ATTLIST important
+		%common.attrib;
+		%admon.role.attrib;
+		%local.admon.attrib;
+>
+<!--end of important.attlist-->]]>
+
+
+<!ENTITY % note.element "INCLUDE">
+<![%note.element;[
+<!ELEMENT note %ho; (title?, (%admon.mix;)+)
+                      %admon.exclusion;>
+<!--end of note.element-->]]>
+
+<!ENTITY % note.attlist "INCLUDE">
+<![%note.attlist;[
+<!ATTLIST note
+		%common.attrib;
+		%admon.role.attrib;
+		%local.admon.attrib;
+>
+<!--end of note.attlist-->]]>
+
+<!ENTITY % tip.element "INCLUDE">
+<![%tip.element;[
+<!ELEMENT tip %ho; (title?, (%admon.mix;)+)
+                      %admon.exclusion;>
+<!--end of tip.element-->]]>
+
+<!ENTITY % tip.attlist "INCLUDE">
+<![%tip.attlist;[
+<!ATTLIST tip
+		%common.attrib;
+		%admon.role.attrib;
+		%local.admon.attrib;
+>
+<!--end of tip.attlist-->]]>
+
+
+<!ENTITY % warning.element "INCLUDE">
+<![%warning.element;[
+<!ELEMENT warning %ho; (title?, (%admon.mix;)+)
+                      %admon.exclusion;>
+<!--end of warning.element-->]]>
+
+<!ENTITY % warning.attlist "INCLUDE">
+<![%warning.attlist;[
+<!ATTLIST warning
+		%common.attrib;
+		%admon.role.attrib;
+		%local.admon.attrib;
+>
+<!--end of warning.attlist-->]]>
+
+<!--end of admon.module-->]]>
+
+<!-- ...................................................................... -->
+<!-- Lists ................................................................ -->
+
+<!-- GlossList ........................ -->
+
+<!ENTITY % glosslist.module "INCLUDE">
+<![%glosslist.module;[
+<!ENTITY % local.glosslist.attrib "">
+<!ENTITY % glosslist.role.attrib "%role.attrib;">
+
+<!ENTITY % glosslist.element "INCLUDE">
+<![%glosslist.element;[
+<!ELEMENT glosslist %ho; (blockinfo?, (%formalobject.title.content;)?, glossentry+)>
+<!--end of glosslist.element-->]]>
+
+<!ENTITY % glosslist.attlist "INCLUDE">
+<![%glosslist.attlist;[
+<!ATTLIST glosslist
+		%common.attrib;
+		%glosslist.role.attrib;
+		%local.glosslist.attrib;
+>
+<!--end of glosslist.attlist-->]]>
+<!--end of glosslist.module-->]]>
+
+<!ENTITY % glossentry.content.module "INCLUDE">
+<![%glossentry.content.module;[
+<!ENTITY % glossentry.module "INCLUDE">
+<![%glossentry.module;[
+<!ENTITY % local.glossentry.attrib "">
+<!ENTITY % glossentry.role.attrib "%role.attrib;">
+
+<!ENTITY % glossentry.element "INCLUDE">
+<![%glossentry.element;[
+<!ELEMENT glossentry %ho; (glossterm, acronym?, abbrev?,
+                      (%ndxterm.class;)*,
+                      revhistory?, (glosssee|glossdef+))>
+<!--end of glossentry.element-->]]>
+
+<!-- SortAs: String by which the GlossEntry is to be sorted
+		(alphabetized) in lieu of its proper content -->
+
+
+<!ENTITY % glossentry.attlist "INCLUDE">
+<![%glossentry.attlist;[
+<!ATTLIST glossentry
+		sortas		CDATA		#IMPLIED
+		%common.attrib;
+		%glossentry.role.attrib;
+		%local.glossentry.attrib;
+>
+<!--end of glossentry.attlist-->]]>
+<!--end of glossentry.module-->]]>
+
+<!-- GlossTerm (defined in the Inlines section, below)-->
+<!ENTITY % glossdef.module "INCLUDE">
+<![%glossdef.module;[
+<!ENTITY % local.glossdef.attrib "">
+<!ENTITY % glossdef.role.attrib "%role.attrib;">
+
+<!ENTITY % glossdef.element "INCLUDE">
+<![%glossdef.element;[
+<!ELEMENT glossdef %ho; ((%glossdef.mix;)+, glossseealso*)>
+<!--end of glossdef.element-->]]>
+
+<!-- Subject: List of subjects; keywords for the definition -->
+
+
+<!ENTITY % glossdef.attlist "INCLUDE">
+<![%glossdef.attlist;[
+<!ATTLIST glossdef
+		subject		CDATA		#IMPLIED
+		%common.attrib;
+		%glossdef.role.attrib;
+		%local.glossdef.attrib;
+>
+<!--end of glossdef.attlist-->]]>
+<!--end of glossdef.module-->]]>
+
+<!ENTITY % glosssee.module "INCLUDE">
+<![%glosssee.module;[
+<!ENTITY % local.glosssee.attrib "">
+<!ENTITY % glosssee.role.attrib "%role.attrib;">
+
+<!ENTITY % glosssee.element "INCLUDE">
+<![%glosssee.element;[
+<!ELEMENT glosssee %ho; (%para.char.mix;)*>
+<!--end of glosssee.element-->]]>
+
+<!-- OtherTerm: Reference to the GlossEntry whose GlossTerm
+		should be displayed at the point of the GlossSee -->
+
+
+<!ENTITY % glosssee.attlist "INCLUDE">
+<![%glosssee.attlist;[
+<!ATTLIST glosssee
+		otherterm	IDREF		#IMPLIED
+		%common.attrib;
+		%glosssee.role.attrib;
+		%local.glosssee.attrib;
+>
+<!--end of glosssee.attlist-->]]>
+<!--end of glosssee.module-->]]>
+
+<!ENTITY % glossseealso.module "INCLUDE">
+<![%glossseealso.module;[
+<!ENTITY % local.glossseealso.attrib "">
+<!ENTITY % glossseealso.role.attrib "%role.attrib;">
+
+<!ENTITY % glossseealso.element "INCLUDE">
+<![%glossseealso.element;[
+<!ELEMENT glossseealso %ho; (%para.char.mix;)*>
+<!--end of glossseealso.element-->]]>
+
+<!-- OtherTerm: Reference to the GlossEntry whose GlossTerm
+		should be displayed at the point of the GlossSeeAlso -->
+
+
+<!ENTITY % glossseealso.attlist "INCLUDE">
+<![%glossseealso.attlist;[
+<!ATTLIST glossseealso
+		otherterm	IDREF		#IMPLIED
+		%common.attrib;
+		%glossseealso.role.attrib;
+		%local.glossseealso.attrib;
+>
+<!--end of glossseealso.attlist-->]]>
+<!--end of glossseealso.module-->]]>
+<!--end of glossentry.content.module-->]]>
+
+<!-- ItemizedList and OrderedList ..... -->
+
+<!ENTITY % itemizedlist.module "INCLUDE">
+<![%itemizedlist.module;[
+<!ENTITY % local.itemizedlist.attrib "">
+<!ENTITY % itemizedlist.role.attrib "%role.attrib;">
+
+<!ENTITY % itemizedlist.element "INCLUDE">
+<![%itemizedlist.element;[
+<!ELEMENT itemizedlist %ho; (blockinfo?, (%formalobject.title.content;)?,
+ 			    (%listpreamble.mix;)*, listitem+)>
+
+<!--end of itemizedlist.element-->]]>
+
+<!-- Spacing: Whether the vertical space in the list should be
+		compressed -->
+<!-- Mark: Keyword, e.g., bullet, dash, checkbox, none;
+		list of keywords and defaults are implementation specific -->
+
+
+<!ENTITY % itemizedlist.attlist "INCLUDE">
+<![%itemizedlist.attlist;[
+<!ATTLIST itemizedlist		spacing		(normal
+				|compact)	#IMPLIED
+		%mark.attrib;
+		%common.attrib;
+		%itemizedlist.role.attrib;
+		%local.itemizedlist.attrib;
+>
+<!--end of itemizedlist.attlist-->]]>
+<!--end of itemizedlist.module-->]]>
+
+<!ENTITY % orderedlist.module "INCLUDE">
+<![%orderedlist.module;[
+<!ENTITY % local.orderedlist.attrib "">
+<!ENTITY % orderedlist.role.attrib "%role.attrib;">
+
+<!ENTITY % orderedlist.element "INCLUDE">
+<![%orderedlist.element;[
+<!ELEMENT orderedlist %ho; (blockinfo?, (%formalobject.title.content;)?,
+ 			    (%listpreamble.mix;)*, listitem+)>
+
+<!--end of orderedlist.element-->]]>
+
+<!-- Numeration: Style of ListItem numbered; default is expected
+		to be Arabic -->
+<!-- InheritNum: Specifies for a nested list that the numbering
+		of ListItems should include the number of the item
+		within which they are nested (e.g., 1a and 1b within 1,
+		rather than a and b) -->
+<!-- Continuation: Where list numbering begins afresh (Restarts,
+		the default) or continues that of the immediately preceding
+		list (Continues) -->
+<!-- Spacing: Whether the vertical space in the list should be
+		compressed -->
+
+
+<!ENTITY % orderedlist.attlist "INCLUDE">
+<![%orderedlist.attlist;[
+<!ATTLIST orderedlist
+		numeration	(arabic
+				|upperalpha
+				|loweralpha
+				|upperroman
+				|lowerroman)	#IMPLIED
+		inheritnum	(inherit
+				|ignore)	"ignore"
+		continuation	(continues
+				|restarts)	"restarts"
+		spacing		(normal
+				|compact)	#IMPLIED
+		%common.attrib;
+		%orderedlist.role.attrib;
+		%local.orderedlist.attrib;
+>
+<!--end of orderedlist.attlist-->]]>
+<!--end of orderedlist.module-->]]>
+
+<!ENTITY % listitem.module "INCLUDE">
+<![%listitem.module;[
+<!ENTITY % local.listitem.attrib "">
+<!ENTITY % listitem.role.attrib "%role.attrib;">
+
+<!ENTITY % listitem.element "INCLUDE">
+<![%listitem.element;[
+<!ELEMENT listitem %ho; ((%component.mix;)+)>
+<!--end of listitem.element-->]]>
+
+<!-- Override: Indicates the mark to be used for this ListItem
+		instead of the default mark or the mark specified by
+		the Mark attribute on the enclosing ItemizedList -->
+
+
+<!ENTITY % listitem.attlist "INCLUDE">
+<![%listitem.attlist;[
+<!ATTLIST listitem
+		override	CDATA		#IMPLIED
+		%common.attrib;
+		%listitem.role.attrib;
+		%local.listitem.attrib;
+>
+<!--end of listitem.attlist-->]]>
+<!--end of listitem.module-->]]>
+
+<!-- SegmentedList .................... -->
+<!ENTITY % segmentedlist.content.module "INCLUDE">
+<![%segmentedlist.content.module;[
+<!ENTITY % segmentedlist.module "INCLUDE">
+<![%segmentedlist.module;[
+<!ENTITY % local.segmentedlist.attrib "">
+<!ENTITY % segmentedlist.role.attrib "%role.attrib;">
+
+<!ENTITY % segmentedlist.element "INCLUDE">
+<![%segmentedlist.element;[
+<!ELEMENT segmentedlist %ho; ((%formalobject.title.content;)?,
+                         segtitle+,
+                         seglistitem+)>
+<!--end of segmentedlist.element-->]]>
+
+<!ENTITY % segmentedlist.attlist "INCLUDE">
+<![%segmentedlist.attlist;[
+<!ATTLIST segmentedlist
+		%common.attrib;
+		%segmentedlist.role.attrib;
+		%local.segmentedlist.attrib;
+>
+<!--end of segmentedlist.attlist-->]]>
+<!--end of segmentedlist.module-->]]>
+
+<!ENTITY % segtitle.module "INCLUDE">
+<![%segtitle.module;[
+<!ENTITY % local.segtitle.attrib "">
+<!ENTITY % segtitle.role.attrib "%role.attrib;">
+
+<!ENTITY % segtitle.element "INCLUDE">
+<![%segtitle.element;[
+<!ELEMENT segtitle %ho; (%title.char.mix;)*>
+<!--end of segtitle.element-->]]>
+
+<!ENTITY % segtitle.attlist "INCLUDE">
+<![%segtitle.attlist;[
+<!ATTLIST segtitle
+		%common.attrib;
+		%segtitle.role.attrib;
+		%local.segtitle.attrib;
+>
+<!--end of segtitle.attlist-->]]>
+<!--end of segtitle.module-->]]>
+
+<!ENTITY % seglistitem.module "INCLUDE">
+<![%seglistitem.module;[
+<!ENTITY % local.seglistitem.attrib "">
+<!ENTITY % seglistitem.role.attrib "%role.attrib;">
+
+<!ENTITY % seglistitem.element "INCLUDE">
+<![%seglistitem.element;[
+<!ELEMENT seglistitem %ho; (seg+)>
+<!--end of seglistitem.element-->]]>
+
+<!ENTITY % seglistitem.attlist "INCLUDE">
+<![%seglistitem.attlist;[
+<!ATTLIST seglistitem
+		%common.attrib;
+		%seglistitem.role.attrib;
+		%local.seglistitem.attrib;
+>
+<!--end of seglistitem.attlist-->]]>
+<!--end of seglistitem.module-->]]>
+
+<!ENTITY % seg.module "INCLUDE">
+<![%seg.module;[
+<!ENTITY % local.seg.attrib "">
+<!ENTITY % seg.role.attrib "%role.attrib;">
+
+<!ENTITY % seg.element "INCLUDE">
+<![%seg.element;[
+<!ELEMENT seg %ho; (%para.char.mix;)*>
+<!--end of seg.element-->]]>
+
+<!ENTITY % seg.attlist "INCLUDE">
+<![%seg.attlist;[
+<!ATTLIST seg
+		%common.attrib;
+		%seg.role.attrib;
+		%local.seg.attrib;
+>
+<!--end of seg.attlist-->]]>
+<!--end of seg.module-->]]>
+<!--end of segmentedlist.content.module-->]]>
+
+<!-- SimpleList ....................... -->
+
+<!ENTITY % simplelist.content.module "INCLUDE">
+<![%simplelist.content.module;[
+<!ENTITY % simplelist.module "INCLUDE">
+<![%simplelist.module;[
+<!ENTITY % local.simplelist.attrib "">
+<!ENTITY % simplelist.role.attrib "%role.attrib;">
+
+<!ENTITY % simplelist.element "INCLUDE">
+<![%simplelist.element;[
+<!ELEMENT simplelist %ho; (member+)>
+<!--end of simplelist.element-->]]>
+
+<!-- Columns: The number of columns the array should contain -->
+<!-- Type: How the Members of the SimpleList should be
+		formatted: Inline (members separated with commas etc.
+		inline), Vert (top to bottom in n Columns), or Horiz (in
+		the direction of text flow) in n Columns.  If Column
+		is 1 or implied, Type=Vert and Type=Horiz give the same
+		results. -->
+
+
+<!ENTITY % simplelist.attlist "INCLUDE">
+<![%simplelist.attlist;[
+<!ATTLIST simplelist
+		columns		CDATA		#IMPLIED
+		type		(inline
+				|vert
+				|horiz)		"vert"
+		%common.attrib;
+		%simplelist.role.attrib;
+		%local.simplelist.attrib;
+>
+<!--end of simplelist.attlist-->]]>
+<!--end of simplelist.module-->]]>
+
+<!ENTITY % member.module "INCLUDE">
+<![%member.module;[
+<!ENTITY % local.member.attrib "">
+<!ENTITY % member.role.attrib "%role.attrib;">
+
+<!ENTITY % member.element "INCLUDE">
+<![%member.element;[
+<!ELEMENT member %ho; (%para.char.mix;)*>
+<!--end of member.element-->]]>
+
+<!ENTITY % member.attlist "INCLUDE">
+<![%member.attlist;[
+<!ATTLIST member
+		%common.attrib;
+		%member.role.attrib;
+		%local.member.attrib;
+>
+<!--end of member.attlist-->]]>
+<!--end of member.module-->]]>
+<!--end of simplelist.content.module-->]]>
+
+<!-- VariableList ..................... -->
+
+<!ENTITY % variablelist.content.module "INCLUDE">
+<![%variablelist.content.module;[
+<!ENTITY % variablelist.module "INCLUDE">
+<![%variablelist.module;[
+<!ENTITY % local.variablelist.attrib "">
+<!ENTITY % variablelist.role.attrib "%role.attrib;">
+
+<!ENTITY % variablelist.element "INCLUDE">
+<![%variablelist.element;[
+<!ELEMENT variablelist %ho; (blockinfo?, (%formalobject.title.content;)?,
+ 			    (%listpreamble.mix;)*, varlistentry+)>
+<!--end of variablelist.element-->]]>
+
+<!-- TermLength: Length beyond which the presentation engine
+		may consider the Term too long and select an alternate
+		presentation of the Term and, or, its associated ListItem. -->
+
+
+<!ENTITY % variablelist.attlist "INCLUDE">
+<![%variablelist.attlist;[
+<!ATTLIST variablelist
+		termlength	CDATA		#IMPLIED
+		%common.attrib;
+		%variablelist.role.attrib;
+		%local.variablelist.attrib;
+>
+<!--end of variablelist.attlist-->]]>
+<!--end of variablelist.module-->]]>
+
+<!ENTITY % varlistentry.module "INCLUDE">
+<![%varlistentry.module;[
+<!ENTITY % local.varlistentry.attrib "">
+<!ENTITY % varlistentry.role.attrib "%role.attrib;">
+
+<!ENTITY % varlistentry.element "INCLUDE">
+<![%varlistentry.element;[
+<!ELEMENT varlistentry %ho; (term+, listitem)>
+<!--end of varlistentry.element-->]]>
+
+<!ENTITY % varlistentry.attlist "INCLUDE">
+<![%varlistentry.attlist;[
+<!ATTLIST varlistentry
+		%common.attrib;
+		%varlistentry.role.attrib;
+		%local.varlistentry.attrib;
+>
+<!--end of varlistentry.attlist-->]]>
+<!--end of varlistentry.module-->]]>
+
+<!ENTITY % term.module "INCLUDE">
+<![%term.module;[
+<!ENTITY % local.term.attrib "">
+<!ENTITY % term.role.attrib "%role.attrib;">
+
+<!ENTITY % term.element "INCLUDE">
+<![%term.element;[
+<!ELEMENT term %ho; (%para.char.mix;)*>
+<!--end of term.element-->]]>
+
+<!ENTITY % term.attlist "INCLUDE">
+<![%term.attlist;[
+<!ATTLIST term
+		%common.attrib;
+		%term.role.attrib;
+		%local.term.attrib;
+>
+<!--end of term.attlist-->]]>
+<!--end of term.module-->]]>
+
+<!-- ListItem (defined above)-->
+<!--end of variablelist.content.module-->]]>
+
+<!-- CalloutList ...................... -->
+
+<!ENTITY % calloutlist.content.module "INCLUDE">
+<![%calloutlist.content.module;[
+<!ENTITY % calloutlist.module "INCLUDE">
+<![%calloutlist.module;[
+<!ENTITY % local.calloutlist.attrib "">
+<!ENTITY % calloutlist.role.attrib "%role.attrib;">
+
+<!ENTITY % calloutlist.element "INCLUDE">
+<![%calloutlist.element;[
+<!ELEMENT calloutlist %ho; ((%formalobject.title.content;)?, callout+)>
+<!--end of calloutlist.element-->]]>
+
+<!ENTITY % calloutlist.attlist "INCLUDE">
+<![%calloutlist.attlist;[
+<!ATTLIST calloutlist
+		%common.attrib;
+		%calloutlist.role.attrib;
+		%local.calloutlist.attrib;
+>
+<!--end of calloutlist.attlist-->]]>
+<!--end of calloutlist.module-->]]>
+
+<!ENTITY % callout.module "INCLUDE">
+<![%callout.module;[
+<!ENTITY % local.callout.attrib "">
+<!ENTITY % callout.role.attrib "%role.attrib;">
+
+<!ENTITY % callout.element "INCLUDE">
+<![%callout.element;[
+<!ELEMENT callout %ho; ((%component.mix;)+)>
+<!--end of callout.element-->]]>
+
+<!-- AreaRefs: IDs of one or more Areas or AreaSets described
+		by this Callout -->
+
+
+<!ENTITY % callout.attlist "INCLUDE">
+<![%callout.attlist;[
+<!ATTLIST callout
+		arearefs	IDREFS		#REQUIRED
+		%common.attrib;
+		%callout.role.attrib;
+		%local.callout.attrib;
+>
+<!--end of callout.attlist-->]]>
+<!--end of callout.module-->]]>
+<!--end of calloutlist.content.module-->]]>
+
+<!-- ...................................................................... -->
+<!-- Objects .............................................................. -->
+
+<!-- Examples etc. .................... -->
+
+<!ENTITY % example.module "INCLUDE">
+<![%example.module;[
+<!ENTITY % local.example.attrib "">
+<!ENTITY % example.role.attrib "%role.attrib;">
+
+<!ENTITY % example.element "INCLUDE">
+<![%example.element;[
+<!ELEMENT example %ho; (blockinfo?, (%formalobject.title.content;), (%example.mix;)+)
+		%formal.exclusion;>
+<!--end of example.element-->]]>
+
+<!ENTITY % example.attlist "INCLUDE">
+<![%example.attlist;[
+<!ATTLIST example
+		floatstyle	CDATA			#IMPLIED
+		%label.attrib;
+		%width.attrib;
+		%common.attrib;
+		%example.role.attrib;
+		%local.example.attrib;
+>
+<!--end of example.attlist-->]]>
+<!--end of example.module-->]]>
+
+<!ENTITY % informalexample.module "INCLUDE">
+<![%informalexample.module;[
+<!ENTITY % local.informalexample.attrib "">
+<!ENTITY % informalexample.role.attrib "%role.attrib;">
+
+<!ENTITY % informalexample.element "INCLUDE">
+<![%informalexample.element;[
+<!ELEMENT informalexample %ho; (blockinfo?, (%example.mix;)+)>
+<!--end of informalexample.element-->]]>
+
+<!ENTITY % informalexample.attlist "INCLUDE">
+<![%informalexample.attlist;[
+<!ATTLIST informalexample
+		floatstyle	CDATA			#IMPLIED
+		%width.attrib;
+		%common.attrib;
+		%informalexample.role.attrib;
+		%local.informalexample.attrib;
+>
+<!--end of informalexample.attlist-->]]>
+<!--end of informalexample.module-->]]>
+
+<!ENTITY % programlistingco.module "INCLUDE">
+<![%programlistingco.module;[
+<!ENTITY % local.programlistingco.attrib "">
+<!ENTITY % programlistingco.role.attrib "%role.attrib;">
+
+<!ENTITY % programlistingco.element "INCLUDE">
+<![%programlistingco.element;[
+<!ELEMENT programlistingco %ho; (areaspec, programlisting, calloutlist*)>
+<!--end of programlistingco.element-->]]>
+
+<!ENTITY % programlistingco.attlist "INCLUDE">
+<![%programlistingco.attlist;[
+<!ATTLIST programlistingco
+		%common.attrib;
+		%programlistingco.role.attrib;
+		%local.programlistingco.attrib;
+>
+<!--end of programlistingco.attlist-->]]>
+<!-- CalloutList (defined above in Lists)-->
+<!--end of informalexample.module-->]]>
+
+<!ENTITY % areaspec.content.module "INCLUDE">
+<![%areaspec.content.module;[
+<!ENTITY % areaspec.module "INCLUDE">
+<![%areaspec.module;[
+<!ENTITY % local.areaspec.attrib "">
+<!ENTITY % areaspec.role.attrib "%role.attrib;">
+
+<!ENTITY % areaspec.element "INCLUDE">
+<![%areaspec.element;[
+<!ELEMENT areaspec %ho; ((area|areaset)+)>
+<!--end of areaspec.element-->]]>
+
+<!-- Units: global unit of measure in which coordinates in
+		this spec are expressed:
+
+		- CALSPair "x1,y1 x2,y2": lower-left and upper-right
+		coordinates in a rectangle describing repro area in which
+		graphic is placed, where X and Y dimensions are each some
+		number 0..10000 (taken from CALS graphic attributes)
+
+		- LineColumn "line column": line number and column number
+		at which to start callout text in "linespecific" content
+
+		- LineRange "startline endline": whole lines from startline
+		to endline in "linespecific" content
+
+		- LineColumnPair "line1 col1 line2 col2": starting and ending
+		points of area in "linespecific" content that starts at
+		first position and ends at second position (including the
+		beginnings of any intervening lines)
+
+		- Other: directive to look at value of OtherUnits attribute
+		to get implementation-specific keyword
+
+		The default is implementation-specific; usually dependent on
+		the parent element (GraphicCO gets CALSPair, ProgramListingCO
+		and ScreenCO get LineColumn) -->
+<!-- OtherUnits: User-defined units -->
+
+
+<!ENTITY % areaspec.attlist "INCLUDE">
+<![%areaspec.attlist;[
+<!ATTLIST areaspec
+		units		(calspair
+				|linecolumn
+				|linerange
+				|linecolumnpair
+				|other)		#IMPLIED
+		otherunits	NMTOKEN		#IMPLIED
+		%common.attrib;
+		%areaspec.role.attrib;
+		%local.areaspec.attrib;
+>
+<!--end of areaspec.attlist-->]]>
+<!--end of areaspec.module-->]]>
+
+<!ENTITY % area.module "INCLUDE">
+<![%area.module;[
+<!ENTITY % local.area.attrib "">
+<!ENTITY % area.role.attrib "%role.attrib;">
+
+<!ENTITY % area.element "INCLUDE">
+<![%area.element;[
+<!ELEMENT area %ho; EMPTY>
+<!--end of area.element-->]]>
+
+<!-- bug number/symbol override or initialization -->
+<!-- to any related information -->
+<!-- Units: unit of measure in which coordinates in this
+		area are expressed; inherits from AreaSet and AreaSpec -->
+<!-- OtherUnits: User-defined units -->
+
+
+<!ENTITY % area.attlist "INCLUDE">
+<![%area.attlist;[
+<!ATTLIST area
+		%label.attrib;
+		%linkends.attrib;
+		units		(calspair
+				|linecolumn
+				|linerange
+				|linecolumnpair
+				|other)		#IMPLIED
+		otherunits	NMTOKEN		#IMPLIED
+		coords		CDATA		#REQUIRED
+		%idreq.common.attrib;
+		%area.role.attrib;
+		%local.area.attrib;
+>
+<!--end of area.attlist-->]]>
+<!--end of area.module-->]]>
+
+<!ENTITY % areaset.module "INCLUDE">
+<![%areaset.module;[
+<!ENTITY % local.areaset.attrib "">
+<!ENTITY % areaset.role.attrib "%role.attrib;">
+
+<!ENTITY % areaset.element "INCLUDE">
+<![%areaset.element;[
+<!ELEMENT areaset %ho; (area+)>
+<!--end of areaset.element-->]]>
+
+<!-- bug number/symbol override or initialization -->
+<!-- Units: unit of measure in which coordinates in this
+		area are expressed; inherits from AreaSpec -->
+
+
+<!ENTITY % areaset.attlist "INCLUDE">
+<![%areaset.attlist;[
+<!ATTLIST areaset
+		%label.attrib;
+		units		(calspair
+				|linecolumn
+				|linerange
+				|linecolumnpair
+				|other)		#IMPLIED
+		otherunits	NMTOKEN		#IMPLIED
+		coords		CDATA		#REQUIRED
+		%idreq.common.attrib;
+		%areaset.role.attrib;
+		%local.areaset.attrib;
+>
+<!--end of areaset.attlist-->]]>
+<!--end of areaset.module-->]]>
+<!--end of areaspec.content.module-->]]>
+
+<!ENTITY % programlisting.module "INCLUDE">
+<![%programlisting.module;[
+<!ENTITY % local.programlisting.attrib "">
+<!ENTITY % programlisting.role.attrib "%role.attrib;">
+
+<!ENTITY % programlisting.element "INCLUDE">
+<![%programlisting.element;[
+<!ELEMENT programlisting %ho; (%para.char.mix;|co|coref|lineannotation|textobject)*>
+<!--end of programlisting.element-->]]>
+
+<!ENTITY % programlisting.attlist "INCLUDE">
+<![%programlisting.attlist;[
+<!ATTLIST programlisting
+		%width.attrib;
+		%linespecific.attrib;
+		%common.attrib;
+		%programlisting.role.attrib;
+		%local.programlisting.attrib;
+>
+<!--end of programlisting.attlist-->]]>
+<!--end of programlisting.module-->]]>
+
+<!ENTITY % literallayout.module "INCLUDE">
+<![%literallayout.module;[
+<!ENTITY % local.literallayout.attrib "">
+<!ENTITY % literallayout.role.attrib "%role.attrib;">
+
+<!ENTITY % literallayout.element "INCLUDE">
+<![%literallayout.element;[
+<!ELEMENT literallayout %ho; (%para.char.mix;|co|coref|textobject|lineannotation)*>
+<!--end of literallayout.element-->]]>
+
+<!ENTITY % literallayout.attlist "INCLUDE">
+<![%literallayout.attlist;[
+<!ATTLIST literallayout
+		%width.attrib;
+		%linespecific.attrib;
+		class	(monospaced|normal)	"normal"
+		%common.attrib;
+		%literallayout.role.attrib;
+		%local.literallayout.attrib;
+>
+<!--end of literallayout.attlist-->]]>
+<!-- LineAnnotation (defined in the Inlines section, below)-->
+<!--end of literallayout.module-->]]>
+
+<!ENTITY % screenco.module "INCLUDE">
+<![%screenco.module;[
+<!ENTITY % local.screenco.attrib "">
+<!ENTITY % screenco.role.attrib "%role.attrib;">
+
+<!ENTITY % screenco.element "INCLUDE">
+<![%screenco.element;[
+<!ELEMENT screenco %ho; (areaspec, screen, calloutlist*)>
+<!--end of screenco.element-->]]>
+
+<!ENTITY % screenco.attlist "INCLUDE">
+<![%screenco.attlist;[
+<!ATTLIST screenco
+		%common.attrib;
+		%screenco.role.attrib;
+		%local.screenco.attrib;
+>
+<!--end of screenco.attlist-->]]>
+<!-- AreaSpec (defined above)-->
+<!-- CalloutList (defined above in Lists)-->
+<!--end of screenco.module-->]]>
+
+<!ENTITY % screen.module "INCLUDE">
+<![%screen.module;[
+<!ENTITY % local.screen.attrib "">
+<!ENTITY % screen.role.attrib "%role.attrib;">
+
+<!ENTITY % screen.element "INCLUDE">
+<![%screen.element;[
+<!ELEMENT screen %ho; (%para.char.mix;|co|coref|textobject|lineannotation)*>
+<!--end of screen.element-->]]>
+
+<!ENTITY % screen.attlist "INCLUDE">
+<![%screen.attlist;[
+<!ATTLIST screen
+		%width.attrib;
+		%linespecific.attrib;
+		%common.attrib;
+		%screen.role.attrib;
+		%local.screen.attrib;
+>
+<!--end of screen.attlist-->]]>
+<!--end of screen.module-->]]>
+
+<!ENTITY % screenshot.content.module "INCLUDE">
+<![%screenshot.content.module;[
+<!ENTITY % screenshot.module "INCLUDE">
+<![%screenshot.module;[
+<!ENTITY % local.screenshot.attrib "">
+<!ENTITY % screenshot.role.attrib "%role.attrib;">
+
+<!ENTITY % screenshot.element "INCLUDE">
+<![%screenshot.element;[
+<!ELEMENT screenshot %ho; (screeninfo?,
+                      (graphic|graphicco
+                      |mediaobject|mediaobjectco))>
+<!--end of screenshot.element-->]]>
+
+<!ENTITY % screenshot.attlist "INCLUDE">
+<![%screenshot.attlist;[
+<!ATTLIST screenshot
+		%common.attrib;
+		%screenshot.role.attrib;
+		%local.screenshot.attrib;
+>
+<!--end of screenshot.attlist-->]]>
+<!--end of screenshot.module-->]]>
+
+<!ENTITY % screeninfo.module "INCLUDE">
+<![%screeninfo.module;[
+<!ENTITY % local.screeninfo.attrib "">
+<!ENTITY % screeninfo.role.attrib "%role.attrib;">
+
+<!ENTITY % screeninfo.element "INCLUDE">
+<![%screeninfo.element;[
+<!ELEMENT screeninfo %ho; (%para.char.mix;)*
+		%ubiq.exclusion;>
+<!--end of screeninfo.element-->]]>
+
+<!ENTITY % screeninfo.attlist "INCLUDE">
+<![%screeninfo.attlist;[
+<!ATTLIST screeninfo
+		%common.attrib;
+		%screeninfo.role.attrib;
+		%local.screeninfo.attrib;
+>
+<!--end of screeninfo.attlist-->]]>
+<!--end of screeninfo.module-->]]>
+<!--end of screenshot.content.module-->]]>
+
+<!-- Figures etc. ..................... -->
+
+<!ENTITY % figure.module "INCLUDE">
+<![%figure.module;[
+<!ENTITY % local.figure.attrib "">
+<!ENTITY % figure.role.attrib "%role.attrib;">
+
+<!ENTITY % figure.element "INCLUDE">
+<![%figure.element;[
+<!ELEMENT figure %ho; (blockinfo?, (%formalobject.title.content;),
+                       (%figure.mix; | %link.char.class;)+)>
+<!--end of figure.element-->]]>
+
+<!-- Float: Whether the Figure is supposed to be rendered
+		where convenient (yes (1) value) or at the place it occurs
+		in the text (no (0) value, the default) -->
+
+
+<!ENTITY % figure.attlist "INCLUDE">
+<![%figure.attlist;[
+<!ATTLIST figure
+		float		%yesorno.attvals;	'0'
+		floatstyle	CDATA			#IMPLIED
+		pgwide      	%yesorno.attvals;       #IMPLIED
+		%label.attrib;
+		%common.attrib;
+		%figure.role.attrib;
+		%local.figure.attrib;
+>
+<!--end of figure.attlist-->]]>
+<!--end of figure.module-->]]>
+
+<!ENTITY % informalfigure.module "INCLUDE">
+<![ %informalfigure.module; [
+<!ENTITY % local.informalfigure.attrib "">
+<!ENTITY % informalfigure.role.attrib "%role.attrib;">
+
+<!ENTITY % informalfigure.element "INCLUDE">
+<![ %informalfigure.element; [
+<!ELEMENT informalfigure %ho; (blockinfo?, (%figure.mix; | %link.char.class;)+)>
+<!--end of informalfigure.element-->]]>
+
+<!ENTITY % informalfigure.attlist "INCLUDE">
+<![ %informalfigure.attlist; [
+<!--
+Float: Whether the Figure is supposed to be rendered
+where convenient (yes (1) value) or at the place it occurs
+in the text (no (0) value, the default)
+-->
+<!ATTLIST informalfigure
+		float		%yesorno.attvals;	"0"
+		floatstyle	CDATA			#IMPLIED
+		pgwide      	%yesorno.attvals;       #IMPLIED
+		%label.attrib;
+		%common.attrib;
+		%informalfigure.role.attrib;
+		%local.informalfigure.attrib;
+>
+<!--end of informalfigure.attlist-->]]>
+<!--end of informalfigure.module-->]]>
+
+<!ENTITY % graphicco.module "INCLUDE">
+<![%graphicco.module;[
+<!ENTITY % local.graphicco.attrib "">
+<!ENTITY % graphicco.role.attrib "%role.attrib;">
+
+<!ENTITY % graphicco.element "INCLUDE">
+<![%graphicco.element;[
+<!ELEMENT graphicco %ho; (areaspec, graphic, calloutlist*)>
+<!--end of graphicco.element-->]]>
+
+<!ENTITY % graphicco.attlist "INCLUDE">
+<![%graphicco.attlist;[
+<!ATTLIST graphicco
+		%common.attrib;
+		%graphicco.role.attrib;
+		%local.graphicco.attrib;
+>
+<!--end of graphicco.attlist-->]]>
+<!-- AreaSpec (defined above in Examples)-->
+<!-- CalloutList (defined above in Lists)-->
+<!--end of graphicco.module-->]]>
+
+<!-- Graphical data can be the content of Graphic, or you can reference
+     an external file either as an entity (Entitref) or a filename
+     (Fileref). -->
+
+<!ENTITY % graphic.module "INCLUDE">
+<![%graphic.module;[
+<!ENTITY % local.graphic.attrib "">
+<!ENTITY % graphic.role.attrib "%role.attrib;">
+
+<!ENTITY % graphic.element "INCLUDE">
+<![%graphic.element;[
+<!ELEMENT graphic %ho; EMPTY>
+<!--end of graphic.element-->]]>
+
+<!ENTITY % graphic.attlist "INCLUDE">
+<![%graphic.attlist;[
+<!ATTLIST graphic
+		%graphics.attrib;
+		%common.attrib;
+		%graphic.role.attrib;
+		%local.graphic.attrib;
+>
+<!--end of graphic.attlist-->]]>
+<!--end of graphic.module-->]]>
+
+<!ENTITY % inlinegraphic.module "INCLUDE">
+<![%inlinegraphic.module;[
+<!ENTITY % local.inlinegraphic.attrib "">
+<!ENTITY % inlinegraphic.role.attrib "%role.attrib;">
+
+<!ENTITY % inlinegraphic.element "INCLUDE">
+<![%inlinegraphic.element;[
+<!ELEMENT inlinegraphic %ho; EMPTY>
+<!--end of inlinegraphic.element-->]]>
+
+<!ENTITY % inlinegraphic.attlist "INCLUDE">
+<![%inlinegraphic.attlist;[
+<!ATTLIST inlinegraphic
+		%graphics.attrib;
+		%common.attrib;
+		%inlinegraphic.role.attrib;
+		%local.inlinegraphic.attrib;
+>
+<!--end of inlinegraphic.attlist-->]]>
+<!--end of inlinegraphic.module-->]]>
+
+<!ENTITY % mediaobject.content.module "INCLUDE">
+<![ %mediaobject.content.module; [
+
+<!ENTITY % mediaobject.module "INCLUDE">
+<![ %mediaobject.module; [
+<!ENTITY % local.mediaobject.attrib "">
+<!ENTITY % mediaobject.role.attrib "%role.attrib;">
+
+<!ENTITY % mediaobject.element "INCLUDE">
+<![ %mediaobject.element; [
+<!ELEMENT mediaobject %ho; (objectinfo?,
+                           (%mediaobject.mix;)+,
+			   caption?)>
+<!--end of mediaobject.element-->]]>
+
+<!ENTITY % mediaobject.attlist "INCLUDE">
+<![ %mediaobject.attlist; [
+<!ATTLIST mediaobject
+		%common.attrib;
+		%mediaobject.role.attrib;
+		%local.mediaobject.attrib;
+>
+<!--end of mediaobject.attlist-->]]>
+<!--end of mediaobject.module-->]]>
+
+<!ENTITY % inlinemediaobject.module "INCLUDE">
+<![ %inlinemediaobject.module; [
+<!ENTITY % local.inlinemediaobject.attrib "">
+<!ENTITY % inlinemediaobject.role.attrib "%role.attrib;">
+
+<!ENTITY % inlinemediaobject.element "INCLUDE">
+<![ %inlinemediaobject.element; [
+<!ELEMENT inlinemediaobject %ho; (objectinfo?,
+                	         (%mediaobject.mix;)+)>
+<!--end of inlinemediaobject.element-->]]>
+
+<!ENTITY % inlinemediaobject.attlist "INCLUDE">
+<![ %inlinemediaobject.attlist; [
+<!ATTLIST inlinemediaobject
+		%common.attrib;
+		%inlinemediaobject.role.attrib;
+		%local.inlinemediaobject.attrib;
+>
+<!--end of inlinemediaobject.attlist-->]]>
+<!--end of inlinemediaobject.module-->]]>
+
+<!ENTITY % videoobject.module "INCLUDE">
+<![ %videoobject.module; [
+<!ENTITY % local.videoobject.attrib "">
+<!ENTITY % videoobject.role.attrib "%role.attrib;">
+
+<!ENTITY % videoobject.element "INCLUDE">
+<![ %videoobject.element; [
+<!ELEMENT videoobject %ho; (objectinfo?, videodata)>
+<!--end of videoobject.element-->]]>
+
+<!ENTITY % videoobject.attlist "INCLUDE">
+<![ %videoobject.attlist; [
+<!ATTLIST videoobject
+		%common.attrib;
+		%videoobject.role.attrib;
+		%local.videoobject.attrib;
+>
+<!--end of videoobject.attlist-->]]>
+<!--end of videoobject.module-->]]>
+
+<!ENTITY % audioobject.module "INCLUDE">
+<![ %audioobject.module; [
+<!ENTITY % local.audioobject.attrib "">
+<!ENTITY % audioobject.role.attrib "%role.attrib;">
+
+<!ENTITY % audioobject.element "INCLUDE">
+<![ %audioobject.element; [
+<!ELEMENT audioobject %ho; (objectinfo?, audiodata)>
+<!--end of audioobject.element-->]]>
+
+<!ENTITY % audioobject.attlist "INCLUDE">
+<![ %audioobject.attlist; [
+<!ATTLIST audioobject
+		%common.attrib;
+		%audioobject.role.attrib;
+		%local.audioobject.attrib;
+>
+<!--end of audioobject.attlist-->]]>
+<!--end of audioobject.module-->]]>
+
+<!ENTITY % imageobject.module "INCLUDE">
+<![ %imageobject.module; [
+<!ENTITY % local.imageobject.attrib "">
+<!ENTITY % imageobject.role.attrib "%role.attrib;">
+
+<!ENTITY % imageobject.element "INCLUDE">
+<![ %imageobject.element; [
+<!ELEMENT imageobject %ho; (objectinfo?, imagedata)>
+<!--end of imageobject.element-->]]>
+
+<!ENTITY % imageobject.attlist "INCLUDE">
+<![ %imageobject.attlist; [
+<!ATTLIST imageobject
+		%common.attrib;
+		%imageobject.role.attrib;
+		%local.imageobject.attrib;
+>
+<!--end of imageobject.attlist-->]]>
+<!--end of imageobject.module-->]]>
+
+<!ENTITY % textobject.module "INCLUDE">
+<![ %textobject.module; [
+<!ENTITY % local.textobject.attrib "">
+<!ENTITY % textobject.role.attrib "%role.attrib;">
+
+<!ENTITY % textobject.element "INCLUDE">
+<![ %textobject.element; [
+<!ELEMENT textobject %ho; (objectinfo?, (phrase|textdata|(%textobject.mix;)+))>
+<!--end of textobject.element-->]]>
+
+<!ENTITY % textobject.attlist "INCLUDE">
+<![ %textobject.attlist; [
+<!ATTLIST textobject
+		%common.attrib;
+		%textobject.role.attrib;
+		%local.textobject.attrib;
+>
+<!--end of textobject.attlist-->]]>
+<!--end of textobject.module-->]]>
+
+<!ENTITY % objectinfo.module "INCLUDE">
+<![ %objectinfo.module; [
+<!ENTITY % local.objectinfo.attrib "">
+<!ENTITY % objectinfo.role.attrib "%role.attrib;">
+
+<!ENTITY % objectinfo.element "INCLUDE">
+<![ %objectinfo.element; [
+<!ELEMENT objectinfo %ho; ((%info.class;)+)
+	%beginpage.exclusion;>
+<!--end of objectinfo.element-->]]>
+
+<!ENTITY % objectinfo.attlist "INCLUDE">
+<![ %objectinfo.attlist; [
+<!ATTLIST objectinfo
+		%common.attrib;
+		%objectinfo.role.attrib;
+		%local.objectinfo.attrib;
+>
+<!--end of objectinfo.attlist-->]]>
+<!--end of objectinfo.module-->]]>
+
+<!--EntityRef: Name of an external entity containing the content
+	of the object data-->
+<!--FileRef: Filename, qualified by a pathname if desired,
+	designating the file containing the content of the object data-->
+<!--Format: Notation of the element content, if any-->
+<!--SrcCredit: Information about the source of the image-->
+<!ENTITY % local.objectdata.attrib "">
+<!ENTITY % objectdata.attrib
+	"
+	entityref	ENTITY		#IMPLIED
+	fileref 	CDATA		#IMPLIED
+	format		(%notation.class;)
+					#IMPLIED
+	srccredit	CDATA		#IMPLIED
+	%local.objectdata.attrib;"
+>
+
+<!ENTITY % videodata.module "INCLUDE">
+<![ %videodata.module; [
+<!ENTITY % local.videodata.attrib "">
+<!ENTITY % videodata.role.attrib "%role.attrib;">
+
+<!ENTITY % videodata.element "INCLUDE">
+<![ %videodata.element; [
+<!ELEMENT videodata %ho; EMPTY>
+<!--end of videodata.element-->]]>
+
+<!ENTITY % videodata.attlist "INCLUDE">
+<![ %videodata.attlist; [
+
+<!--Width: Same as CALS reprowid (desired width)-->
+<!--Depth: Same as CALS reprodep (desired depth)-->
+<!--Align: Same as CALS hplace with 'none' removed; #IMPLIED means
+	application-specific-->
+<!--Scale: Conflation of CALS hscale and vscale-->
+<!--Scalefit: Same as CALS scalefit-->
+<!ATTLIST videodata
+	width		CDATA		#IMPLIED
+	contentwidth	CDATA		#IMPLIED
+	depth		CDATA		#IMPLIED
+	contentdepth	CDATA		#IMPLIED
+	align		(left
+			|right
+			|center)	#IMPLIED
+	valign		(top
+			|middle
+			|bottom)	#IMPLIED
+	scale		CDATA		#IMPLIED
+	scalefit	%yesorno.attvals;
+					#IMPLIED
+		%objectdata.attrib;
+		%common.attrib;
+		%videodata.role.attrib;
+		%local.videodata.attrib;
+>
+<!--end of videodata.attlist-->]]>
+<!--end of videodata.module-->]]>
+
+<!ENTITY % audiodata.module "INCLUDE">
+<![ %audiodata.module; [
+<!ENTITY % local.audiodata.attrib "">
+<!ENTITY % audiodata.role.attrib "%role.attrib;">
+
+<!ENTITY % audiodata.element "INCLUDE">
+<![ %audiodata.element; [
+<!ELEMENT audiodata %ho; EMPTY>
+<!--end of audiodata.element-->]]>
+
+<!ENTITY % audiodata.attlist "INCLUDE">
+<![ %audiodata.attlist; [
+<!ATTLIST audiodata
+		%objectdata.attrib;
+		%common.attrib;
+		%audiodata.role.attrib;
+		%local.audiodata.attrib;
+>
+<!--end of audiodata.attlist-->]]>
+<!--end of audiodata.module-->]]>
+
+<!ENTITY % imagedata.module "INCLUDE">
+<![ %imagedata.module; [
+<!ENTITY % local.imagedata.attrib "">
+<!ENTITY % imagedata.role.attrib "%role.attrib;">
+
+<!ENTITY % imagedata.element "INCLUDE">
+<![ %imagedata.element; [
+<!ELEMENT imagedata %ho; EMPTY>
+<!--end of imagedata.element-->]]>
+
+<!ENTITY % imagedata.attlist "INCLUDE">
+<![ %imagedata.attlist; [
+
+<!--Width: Same as CALS reprowid (desired width)-->
+<!--Depth: Same as CALS reprodep (desired depth)-->
+<!--Align: Same as CALS hplace with 'none' removed; #IMPLIED means
+	application-specific-->
+<!--Scale: Conflation of CALS hscale and vscale-->
+<!--Scalefit: Same as CALS scalefit-->
+<!ATTLIST imagedata
+	width		CDATA		#IMPLIED
+	contentwidth	CDATA		#IMPLIED
+	depth		CDATA		#IMPLIED
+	contentdepth	CDATA		#IMPLIED
+	align		(left
+			|right
+			|center)	#IMPLIED
+	valign		(top
+			|middle
+			|bottom)	#IMPLIED
+	scale		CDATA		#IMPLIED
+	scalefit	%yesorno.attvals;
+					#IMPLIED
+		%objectdata.attrib;
+		%common.attrib;
+		%imagedata.role.attrib;
+		%local.imagedata.attrib;
+>
+<!--end of imagedata.attlist-->]]>
+<!--end of imagedata.module-->]]>
+
+<!ENTITY % textdata.module "INCLUDE">
+<![ %textdata.module; [
+<!ENTITY % local.textdata.attrib "">
+<!ENTITY % textdata.role.attrib "%role.attrib;">
+
+<!ENTITY % textdata.element "INCLUDE">
+<![ %textdata.element; [
+<!ELEMENT textdata %ho; EMPTY>
+<!--end of textdata.element-->]]>
+
+<!ENTITY % textdata.attlist "INCLUDE">
+<![ %textdata.attlist; [
+<!ATTLIST textdata
+		encoding	CDATA	#IMPLIED
+		%objectdata.attrib;
+		%common.attrib;
+		%textdata.role.attrib;
+		%local.textdata.attrib;
+>
+<!--end of textdata.attlist-->]]>
+<!--end of textdata.module-->]]>
+
+<!ENTITY % mediaobjectco.module "INCLUDE">
+<![ %mediaobjectco.module; [
+<!ENTITY % local.mediaobjectco.attrib "">
+<!ENTITY % mediaobjectco.role.attrib "%role.attrib;">
+
+<!ENTITY % mediaobjectco.element "INCLUDE">
+<![ %mediaobjectco.element; [
+<!ELEMENT mediaobjectco %ho; (objectinfo?, imageobjectco,
+			   (imageobjectco|textobject)*)>
+<!--end of mediaobjectco.element-->]]>
+
+<!ENTITY % mediaobjectco.attlist "INCLUDE">
+<![ %mediaobjectco.attlist; [
+<!ATTLIST mediaobjectco
+		%common.attrib;
+		%mediaobjectco.role.attrib;
+		%local.mediaobjectco.attrib;
+>
+<!--end of mediaobjectco.attlist-->]]>
+<!--end of mediaobjectco.module-->]]>
+
+<!ENTITY % imageobjectco.module "INCLUDE">
+<![ %imageobjectco.module; [
+<!ENTITY % local.imageobjectco.attrib "">
+<!ENTITY % imageobjectco.role.attrib "%role.attrib;">
+
+<!ENTITY % imageobjectco.element "INCLUDE">
+<![ %imageobjectco.element; [
+<!ELEMENT imageobjectco %ho; (areaspec, imageobject, calloutlist*)>
+<!--end of imageobjectco.element-->]]>
+
+<!ENTITY % imageobjectco.attlist "INCLUDE">
+<![ %imageobjectco.attlist; [
+<!ATTLIST imageobjectco
+		%common.attrib;
+		%imageobjectco.role.attrib;
+		%local.imageobjectco.attrib;
+>
+<!--end of imageobjectco.attlist-->]]>
+<!--end of imageobjectco.module-->]]>
+<!--end of mediaobject.content.module-->]]>
+
+<!-- Equations ........................ -->
+
+<!-- This PE provides a mechanism for replacing equation content, -->
+<!-- perhaps adding a new or different model (e.g., MathML) -->
+<!ENTITY % equation.content "(alt?, (graphic+|mediaobject+))">
+<!ENTITY % inlineequation.content "(alt?, (graphic+|inlinemediaobject+))">
+
+<!ENTITY % equation.module "INCLUDE">
+<![%equation.module;[
+<!ENTITY % local.equation.attrib "">
+<!ENTITY % equation.role.attrib "%role.attrib;">
+
+<!ENTITY % equation.element "INCLUDE">
+<![%equation.element;[
+<!ELEMENT equation %ho; (blockinfo?, (%formalobject.title.content;)?,
+                         (informalequation | %equation.content;))>
+<!--end of equation.element-->]]>
+
+<!ENTITY % equation.attlist "INCLUDE">
+<![%equation.attlist;[
+<!ATTLIST equation
+		floatstyle	CDATA			#IMPLIED
+		%label.attrib;
+	 	%common.attrib;
+		%equation.role.attrib;
+		%local.equation.attrib;
+>
+<!--end of equation.attlist-->]]>
+<!--end of equation.module-->]]>
+
+<!ENTITY % informalequation.module "INCLUDE">
+<![%informalequation.module;[
+<!ENTITY % local.informalequation.attrib "">
+<!ENTITY % informalequation.role.attrib "%role.attrib;">
+
+<!ENTITY % informalequation.element "INCLUDE">
+<![%informalequation.element;[
+<!ELEMENT informalequation %ho; (blockinfo?, %equation.content;) >
+<!--end of informalequation.element-->]]>
+
+<!ENTITY % informalequation.attlist "INCLUDE">
+<![%informalequation.attlist;[
+<!ATTLIST informalequation
+		floatstyle	CDATA			#IMPLIED
+		%common.attrib;
+		%informalequation.role.attrib;
+		%local.informalequation.attrib;
+>
+<!--end of informalequation.attlist-->]]>
+<!--end of informalequation.module-->]]>
+
+<!ENTITY % inlineequation.module "INCLUDE">
+<![%inlineequation.module;[
+<!ENTITY % local.inlineequation.attrib "">
+<!ENTITY % inlineequation.role.attrib "%role.attrib;">
+
+<!ENTITY % inlineequation.element "INCLUDE">
+<![%inlineequation.element;[
+<!ELEMENT inlineequation %ho; (%inlineequation.content;)>
+<!--end of inlineequation.element-->]]>
+
+<!ENTITY % inlineequation.attlist "INCLUDE">
+<![%inlineequation.attlist;[
+<!ATTLIST inlineequation
+		%common.attrib;
+		%inlineequation.role.attrib;
+		%local.inlineequation.attrib;
+>
+<!--end of inlineequation.attlist-->]]>
+<!--end of inlineequation.module-->]]>
+
+<!ENTITY % alt.module "INCLUDE">
+<![%alt.module;[
+<!ENTITY % local.alt.attrib "">
+<!ENTITY % alt.role.attrib "%role.attrib;">
+
+<!ENTITY % alt.element "INCLUDE">
+<![%alt.element;[
+<!ELEMENT alt %ho; (#PCDATA)>
+<!--end of alt.element-->]]>
+
+<!ENTITY % alt.attlist "INCLUDE">
+<![%alt.attlist;[
+<!ATTLIST alt
+		%common.attrib;
+		%alt.role.attrib;
+		%local.alt.attrib;
+>
+<!--end of alt.attlist-->]]>
+<!--end of alt.module-->]]>
+
+<!-- Tables ........................... -->
+
+<!ENTITY % table.module "INCLUDE">
+<![%table.module;[
+
+<!-- Choose a table model. CALS or OASIS XML Exchange -->
+
+<!ENTITY % cals.table.module "INCLUDE">
+<![%cals.table.module;[
+<!ENTITY % exchange.table.module "IGNORE">
+]]>
+<!ENTITY % exchange.table.module "INCLUDE">
+
+<!-- Do we allow the HTML table model as well? -->
+<!ENTITY % allow.html.tables "INCLUDE">
+<![%allow.html.tables;[
+  <!-- ====================================================== -->
+  <!--  xhtmltbl.mod defines HTML tables and sets parameter
+        entities so that, when the CALS table module is read,
+        we end up allowing any table to be CALS or HTML.
+        i.e. This include must come first!                    -->
+  <!-- ====================================================== -->
+
+<!ENTITY % htmltbl
+  PUBLIC "-//OASIS//ELEMENTS DocBook XML HTML Tables V4.3CR3//EN"
+  "htmltblx.mod">
+%htmltbl;
+<!--end of allow.html.tables-->]]>
+
+<!ENTITY % tables.role.attrib "%role.attrib;">
+
+<![%cals.table.module;[
+<!-- Add label and role attributes to table and informaltable -->
+<!ENTITY % bodyatt "
+		floatstyle	CDATA			#IMPLIED
+                %label.attrib;"
+>
+
+<!-- Add common attributes to Table, TGroup, TBody, THead, TFoot, Row,
+     EntryTbl, and Entry (and InformalTable element). -->
+<!ENTITY % secur
+	"%common.attrib;
+	%tables.role.attrib;">
+
+<!ENTITY % common.table.attribs
+	"%bodyatt;
+	%secur;">
+
+<!-- Content model for Table. -->
+<!ENTITY % tbl.table.mdl
+	"(blockinfo?, (%formalobject.title.content;), (%ndxterm.class;)*,
+	  textobject*,
+          (graphic+|mediaobject+|tgroup+))">
+
+<!-- Allow either objects or inlines; beware of REs between elements. -->
+<!ENTITY % tbl.entry.mdl "%para.char.mix; | %tabentry.mix;">
+
+<!-- Reference CALS Table Model -->
+<!ENTITY % tablemodel
+  PUBLIC "-//OASIS//DTD DocBook CALS Table Model V4.3CR3//EN"
+  "calstblx.dtd">
+]]>
+
+<![%exchange.table.module;[
+<!-- Add common attributes and the Label attribute to Table and -->
+<!-- InformalTable.                                             -->
+<!ENTITY % bodyatt
+	"%common.attrib;
+	%label.attrib;
+	%tables.role.attrib;">
+
+<!ENTITY % common.table.attribs
+	"%bodyatt;">
+
+<!-- Add common attributes to TGroup, ColSpec, TBody, THead, Row, Entry -->
+
+<!ENTITY % tbl.tgroup.att       "%common.attrib;">
+<!ENTITY % tbl.colspec.att      "%common.attrib;">
+<!ENTITY % tbl.tbody.att        "%common.attrib;">
+<!ENTITY % tbl.thead.att        "%common.attrib;">
+<!ENTITY % tbl.row.att          "%common.attrib;">
+<!ENTITY % tbl.entry.att        "%common.attrib;">
+
+<!-- Content model for Table. -->
+<!ENTITY % tbl.table.mdl
+	"(blockinfo?, (%formalobject.title.content;), (%ndxterm.class;)*,
+	  textobject*,
+          (graphic+|mediaobject+|tgroup+))">
+
+<!-- Allow either objects or inlines; beware of REs between elements. -->
+<!ENTITY % tbl.entry.mdl "(%para.char.mix; | %tabentry.mix;)*">
+
+<!-- Reference OASIS Exchange Table Model -->
+<!ENTITY % tablemodel
+  PUBLIC "-//OASIS//DTD XML Exchange Table Model 19990315//EN"
+  "soextblx.dtd">
+]]>
+
+%tablemodel;
+
+<!--end of table.module-->]]>
+
+<!ENTITY % informaltable.module "INCLUDE">
+<![%informaltable.module;[
+
+<!-- Note that InformalTable is dependent on some of the entity
+     declarations that customize Table. -->
+
+<!ENTITY % local.informaltable.attrib "">
+
+<!-- the following entity may have been declared by the XHTML table module -->
+<!ENTITY % informal.tbl.table.mdl "textobject*, (graphic+|mediaobject+|tgroup+)">
+
+<!ENTITY % informaltable.element "INCLUDE">
+<![%informaltable.element;[
+<!ELEMENT informaltable %ho; (blockinfo?, (%informal.tbl.table.mdl;))>
+<!--end of informaltable.element-->]]>
+
+<!-- Frame, Colsep, and Rowsep must be repeated because
+		they are not in entities in the table module. -->
+<!-- includes TabStyle, ToCentry, ShortEntry,
+				Orient, PgWide -->
+<!-- includes Label -->
+<!-- includes common attributes -->
+
+<!ENTITY % informaltable.attlist "INCLUDE">
+<![%informaltable.attlist;[
+<!ATTLIST informaltable
+		frame		(%tbl.frame.attval;)	#IMPLIED
+		colsep		%yesorno.attvals;	#IMPLIED
+		rowsep		%yesorno.attvals;	#IMPLIED
+		%common.table.attribs;
+		%tbl.table.att;
+		%local.informaltable.attrib;
+>
+<!--end of informaltable.attlist-->]]>
+<!--end of informaltable.module-->]]>
+
+<!ENTITY % caption.module "INCLUDE">
+<![ %caption.module; [
+<!ENTITY % local.caption.attrib "">
+<!ENTITY % caption.role.attrib "%role.attrib;">
+
+<!ENTITY % caption.element "INCLUDE">
+<![ %caption.element; [
+<!ELEMENT caption %ho; (#PCDATA | %textobject.mix;)*>
+<!--end of caption.element-->]]>
+
+<!ENTITY % caption.attlist "INCLUDE">
+<![ %caption.attlist; [
+<!-- attrs comes from HTML tables ... -->
+
+<![ %allow.html.tables; [
+<!-- common.attrib, but without ID because ID is in attrs -->
+<!ENTITY % caption.attlist.content "
+	%lang.attrib;
+	%remap.attrib;
+	%xreflabel.attrib;
+	%revisionflag.attrib;
+	%effectivity.attrib;
+	%dir.attrib;
+	%xml-base.attrib;
+	%local.common.attrib;
+		%caption.role.attrib;
+		%attrs;
+		align	(top|bottom|left|right)	#IMPLIED
+		%local.caption.attrib;
+">
+]]>
+<!ENTITY % caption.attlist.content "
+		%common.attrib;
+		%caption.role.attrib;
+		%local.caption.attrib;
+">
+
+<!ATTLIST caption %caption.attlist.content;>
+
+<!--end of caption.attlist-->]]>
+<!--end of caption.module-->]]>
+
+<!-- ...................................................................... -->
+<!-- Synopses ............................................................. -->
+
+<!-- Synopsis ......................... -->
+
+<!ENTITY % synopsis.module "INCLUDE">
+<![%synopsis.module;[
+<!ENTITY % local.synopsis.attrib "">
+<!ENTITY % synopsis.role.attrib "%role.attrib;">
+
+<!ENTITY % synopsis.element "INCLUDE">
+<![%synopsis.element;[
+<!ELEMENT synopsis %ho; (%para.char.mix;|graphic|mediaobject|co|coref|textobject|lineannotation)*>
+<!--end of synopsis.element-->]]>
+
+<!ENTITY % synopsis.attlist "INCLUDE">
+<![%synopsis.attlist;[
+<!ATTLIST synopsis
+		%label.attrib;
+		%linespecific.attrib;
+		%common.attrib;
+		%synopsis.role.attrib;
+		%local.synopsis.attrib;
+>
+<!--end of synopsis.attlist-->]]>
+
+<!-- LineAnnotation (defined in the Inlines section, below)-->
+<!--end of synopsis.module-->]]>
+
+<!-- CmdSynopsis ...................... -->
+
+<!ENTITY % cmdsynopsis.content.module "INCLUDE">
+<![%cmdsynopsis.content.module;[
+<!ENTITY % cmdsynopsis.module "INCLUDE">
+<![%cmdsynopsis.module;[
+<!ENTITY % local.cmdsynopsis.attrib "">
+<!ENTITY % cmdsynopsis.role.attrib "%role.attrib;">
+
+<!ENTITY % cmdsynopsis.element "INCLUDE">
+<![%cmdsynopsis.element;[
+<!ELEMENT cmdsynopsis %ho; ((command | arg | group | sbr)+, synopfragment*)>
+<!--end of cmdsynopsis.element-->]]>
+
+<!-- Sepchar: Character that should separate command and all
+		top-level arguments; alternate value might be e.g., &Delta; -->
+
+
+<!ENTITY % cmdsynopsis.attlist "INCLUDE">
+<![%cmdsynopsis.attlist;[
+<!ATTLIST cmdsynopsis
+		%label.attrib;
+		sepchar		CDATA		" "
+		cmdlength	CDATA		#IMPLIED
+		%common.attrib;
+		%cmdsynopsis.role.attrib;
+		%local.cmdsynopsis.attrib;
+>
+<!--end of cmdsynopsis.attlist-->]]>
+<!--end of cmdsynopsis.module-->]]>
+
+<!ENTITY % arg.module "INCLUDE">
+<![%arg.module;[
+<!ENTITY % local.arg.attrib "">
+<!ENTITY % arg.role.attrib "%role.attrib;">
+
+<!ENTITY % arg.element "INCLUDE">
+<![%arg.element;[
+<!ELEMENT arg %ho; (#PCDATA
+		| arg
+		| group
+		| option
+		| synopfragmentref
+		| replaceable
+		| sbr)*>
+<!--end of arg.element-->]]>
+
+<!-- Choice: Whether Arg must be supplied: Opt (optional to
+		supply, e.g. [arg]; the default), Req (required to supply,
+		e.g. {arg}), or Plain (required to supply, e.g. arg) -->
+<!-- Rep: whether Arg is repeatable: Norepeat (e.g. arg without
+		ellipsis; the default), or Repeat (e.g. arg...) -->
+
+
+<!ENTITY % arg.attlist "INCLUDE">
+<![%arg.attlist;[
+<!ATTLIST arg
+		choice		(opt
+				|req
+				|plain)		'opt'
+		rep		(norepeat
+				|repeat)	'norepeat'
+		%common.attrib;
+		%arg.role.attrib;
+		%local.arg.attrib;
+>
+<!--end of arg.attlist-->]]>
+<!--end of arg.module-->]]>
+
+<!ENTITY % group.module "INCLUDE">
+<![%group.module;[
+
+<!ENTITY % local.group.attrib "">
+<!ENTITY % group.role.attrib "%role.attrib;">
+
+<!ENTITY % group.element "INCLUDE">
+<![%group.element;[
+<!ELEMENT group %ho; ((arg | group | option | synopfragmentref
+		| replaceable | sbr)+)>
+<!--end of group.element-->]]>
+
+<!-- Choice: Whether Group must be supplied: Opt (optional to
+		supply, e.g.  [g1|g2|g3]; the default), Req (required to
+		supply, e.g.  {g1|g2|g3}), Plain (required to supply,
+		e.g.  g1|g2|g3), OptMult (can supply zero or more, e.g.
+		[[g1|g2|g3]]), or ReqMult (must supply one or more, e.g.
+		{{g1|g2|g3}}) -->
+<!-- Rep: whether Group is repeatable: Norepeat (e.g. group
+		without ellipsis; the default), or Repeat (e.g. group...) -->
+
+
+<!ENTITY % group.attlist "INCLUDE">
+<![%group.attlist;[
+<!ATTLIST group
+		choice		(opt
+				|req
+				|plain)         'opt'
+		rep		(norepeat
+				|repeat)	'norepeat'
+		%common.attrib;
+		%group.role.attrib;
+		%local.group.attrib;
+>
+<!--end of group.attlist-->]]>
+<!--end of group.module-->]]>
+
+<!ENTITY % sbr.module "INCLUDE">
+<![%sbr.module;[
+<!ENTITY % local.sbr.attrib "">
+<!-- Synopsis break -->
+<!ENTITY % sbr.role.attrib "%role.attrib;">
+
+<!ENTITY % sbr.element "INCLUDE">
+<![%sbr.element;[
+<!ELEMENT sbr %ho; EMPTY>
+<!--end of sbr.element-->]]>
+
+<!ENTITY % sbr.attlist "INCLUDE">
+<![%sbr.attlist;[
+<!ATTLIST sbr
+		%common.attrib;
+		%sbr.role.attrib;
+		%local.sbr.attrib;
+>
+<!--end of sbr.attlist-->]]>
+<!--end of sbr.module-->]]>
+
+<!ENTITY % synopfragmentref.module "INCLUDE">
+<![%synopfragmentref.module;[
+<!ENTITY % local.synopfragmentref.attrib "">
+<!ENTITY % synopfragmentref.role.attrib "%role.attrib;">
+
+<!ENTITY % synopfragmentref.element "INCLUDE">
+<![%synopfragmentref.element;[
+<!ELEMENT synopfragmentref %ho; (#PCDATA)>
+<!--end of synopfragmentref.element-->]]>
+
+<!-- to SynopFragment of complex synopsis
+			material for separate referencing -->
+
+
+<!ENTITY % synopfragmentref.attlist "INCLUDE">
+<![%synopfragmentref.attlist;[
+<!ATTLIST synopfragmentref
+		%linkendreq.attrib;		%common.attrib;
+		%synopfragmentref.role.attrib;
+		%local.synopfragmentref.attrib;
+>
+<!--end of synopfragmentref.attlist-->]]>
+<!--end of synopfragmentref.module-->]]>
+
+<!ENTITY % synopfragment.module "INCLUDE">
+<![%synopfragment.module;[
+<!ENTITY % local.synopfragment.attrib "">
+<!ENTITY % synopfragment.role.attrib "%role.attrib;">
+
+<!ENTITY % synopfragment.element "INCLUDE">
+<![%synopfragment.element;[
+<!ELEMENT synopfragment %ho; ((arg | group)+)>
+<!--end of synopfragment.element-->]]>
+
+<!ENTITY % synopfragment.attlist "INCLUDE">
+<![%synopfragment.attlist;[
+<!ATTLIST synopfragment
+		%idreq.common.attrib;
+		%synopfragment.role.attrib;
+		%local.synopfragment.attrib;
+>
+<!--end of synopfragment.attlist-->]]>
+<!--end of synopfragment.module-->]]>
+
+<!-- Command (defined in the Inlines section, below)-->
+<!-- Option (defined in the Inlines section, below)-->
+<!-- Replaceable (defined in the Inlines section, below)-->
+<!--end of cmdsynopsis.content.module-->]]>
+
+<!-- FuncSynopsis ..................... -->
+
+<!ENTITY % funcsynopsis.content.module "INCLUDE">
+<![%funcsynopsis.content.module;[
+<!ENTITY % funcsynopsis.module "INCLUDE">
+<![%funcsynopsis.module;[
+
+<!ENTITY % local.funcsynopsis.attrib "">
+<!ENTITY % funcsynopsis.role.attrib "%role.attrib;">
+
+<!ENTITY % funcsynopsis.element "INCLUDE">
+<![%funcsynopsis.element;[
+<!ELEMENT funcsynopsis %ho; ((funcsynopsisinfo | funcprototype)+)>
+<!--end of funcsynopsis.element-->]]>
+
+<!ENTITY % funcsynopsis.attlist "INCLUDE">
+<![%funcsynopsis.attlist;[
+<!ATTLIST funcsynopsis
+		%label.attrib;
+		%common.attrib;
+		%funcsynopsis.role.attrib;
+		%local.funcsynopsis.attrib;
+>
+<!--end of funcsynopsis.attlist-->]]>
+<!--end of funcsynopsis.module-->]]>
+
+<!ENTITY % funcsynopsisinfo.module "INCLUDE">
+<![%funcsynopsisinfo.module;[
+<!ENTITY % local.funcsynopsisinfo.attrib "">
+<!ENTITY % funcsynopsisinfo.role.attrib "%role.attrib;">
+
+<!ENTITY % funcsynopsisinfo.element "INCLUDE">
+<![%funcsynopsisinfo.element;[
+<!ELEMENT funcsynopsisinfo %ho; (%cptr.char.mix;|textobject|lineannotation)*>
+<!--end of funcsynopsisinfo.element-->]]>
+
+<!ENTITY % funcsynopsisinfo.attlist "INCLUDE">
+<![%funcsynopsisinfo.attlist;[
+<!ATTLIST funcsynopsisinfo
+		%linespecific.attrib;
+		%common.attrib;
+		%funcsynopsisinfo.role.attrib;
+		%local.funcsynopsisinfo.attrib;
+>
+<!--end of funcsynopsisinfo.attlist-->]]>
+<!--end of funcsynopsisinfo.module-->]]>
+
+<!ENTITY % funcprototype.module "INCLUDE">
+<![%funcprototype.module;[
+<!ENTITY % local.funcprototype.attrib "">
+<!ENTITY % funcprototype.role.attrib "%role.attrib;">
+
+<!ENTITY % funcprototype.element "INCLUDE">
+<![%funcprototype.element;[
+<!ELEMENT funcprototype %ho; (modifier*,
+                              funcdef,
+                              (void|varargs|(paramdef+, varargs?)),
+                              modifier*)>
+
+<!--end of funcprototype.element-->]]>
+
+<!ENTITY % funcprototype.attlist "INCLUDE">
+<![%funcprototype.attlist;[
+<!ATTLIST funcprototype
+		%common.attrib;
+		%funcprototype.role.attrib;
+		%local.funcprototype.attrib;
+>
+<!--end of funcprototype.attlist-->]]>
+<!--end of funcprototype.module-->]]>
+
+<!ENTITY % funcdef.module "INCLUDE">
+<![%funcdef.module;[
+<!ENTITY % local.funcdef.attrib "">
+<!ENTITY % funcdef.role.attrib "%role.attrib;">
+
+<!ENTITY % funcdef.element "INCLUDE">
+<![%funcdef.element;[
+<!ELEMENT funcdef %ho; (#PCDATA
+		| type
+		| replaceable
+		| function)*>
+<!--end of funcdef.element-->]]>
+
+<!ENTITY % funcdef.attlist "INCLUDE">
+<![%funcdef.attlist;[
+<!ATTLIST funcdef
+		%common.attrib;
+		%funcdef.role.attrib;
+		%local.funcdef.attrib;
+>
+<!--end of funcdef.attlist-->]]>
+<!--end of funcdef.module-->]]>
+
+<!ENTITY % void.module "INCLUDE">
+<![%void.module;[
+<!ENTITY % local.void.attrib "">
+<!ENTITY % void.role.attrib "%role.attrib;">
+
+<!ENTITY % void.element "INCLUDE">
+<![%void.element;[
+<!ELEMENT void %ho; EMPTY>
+<!--end of void.element-->]]>
+
+<!ENTITY % void.attlist "INCLUDE">
+<![%void.attlist;[
+<!ATTLIST void
+		%common.attrib;
+		%void.role.attrib;
+		%local.void.attrib;
+>
+<!--end of void.attlist-->]]>
+<!--end of void.module-->]]>
+
+<!ENTITY % varargs.module "INCLUDE">
+<![%varargs.module;[
+<!ENTITY % local.varargs.attrib "">
+<!ENTITY % varargs.role.attrib "%role.attrib;">
+
+<!ENTITY % varargs.element "INCLUDE">
+<![%varargs.element;[
+<!ELEMENT varargs %ho; EMPTY>
+<!--end of varargs.element-->]]>
+
+<!ENTITY % varargs.attlist "INCLUDE">
+<![%varargs.attlist;[
+<!ATTLIST varargs
+		%common.attrib;
+		%varargs.role.attrib;
+		%local.varargs.attrib;
+>
+<!--end of varargs.attlist-->]]>
+<!--end of varargs.module-->]]>
+
+<!-- Processing assumes that only one Parameter will appear in a
+     ParamDef, and that FuncParams will be used at most once, for
+     providing information on the "inner parameters" for parameters that
+     are pointers to functions. -->
+
+<!ENTITY % paramdef.module "INCLUDE">
+<![%paramdef.module;[
+<!ENTITY % local.paramdef.attrib "">
+<!ENTITY % paramdef.role.attrib "%role.attrib;">
+
+<!ENTITY % paramdef.element "INCLUDE">
+<![%paramdef.element;[
+<!ELEMENT paramdef %ho; (#PCDATA
+                | initializer
+		| type
+		| replaceable
+		| parameter
+		| funcparams)*>
+<!--end of paramdef.element-->]]>
+
+<!ENTITY % paramdef.attlist "INCLUDE">
+<![%paramdef.attlist;[
+<!ATTLIST paramdef
+		choice		(opt
+				|req)	#IMPLIED
+		%common.attrib;
+		%paramdef.role.attrib;
+		%local.paramdef.attrib;
+>
+<!--end of paramdef.attlist-->]]>
+<!--end of paramdef.module-->]]>
+
+<!ENTITY % funcparams.module "INCLUDE">
+<![%funcparams.module;[
+<!ENTITY % local.funcparams.attrib "">
+<!ENTITY % funcparams.role.attrib "%role.attrib;">
+
+<!ENTITY % funcparams.element "INCLUDE">
+<![%funcparams.element;[
+<!ELEMENT funcparams %ho; (%cptr.char.mix;)*>
+<!--end of funcparams.element-->]]>
+
+<!ENTITY % funcparams.attlist "INCLUDE">
+<![%funcparams.attlist;[
+<!ATTLIST funcparams
+		%common.attrib;
+		%funcparams.role.attrib;
+		%local.funcparams.attrib;
+>
+<!--end of funcparams.attlist-->]]>
+<!--end of funcparams.module-->]]>
+
+<!-- LineAnnotation (defined in the Inlines section, below)-->
+<!-- Replaceable (defined in the Inlines section, below)-->
+<!-- Function (defined in the Inlines section, below)-->
+<!-- Parameter (defined in the Inlines section, below)-->
+<!--end of funcsynopsis.content.module-->]]>
+
+<!-- ClassSynopsis ..................... -->
+
+<!ENTITY % classsynopsis.content.module "INCLUDE">
+<![%classsynopsis.content.module;[
+
+<!ENTITY % classsynopsis.module "INCLUDE">
+<![%classsynopsis.module;[
+<!ENTITY % local.classsynopsis.attrib "">
+<!ENTITY % classsynopsis.role.attrib "%role.attrib;">
+
+<!ENTITY % classsynopsis.element "INCLUDE">
+<![%classsynopsis.element;[
+<!ELEMENT classsynopsis %ho; ((ooclass|oointerface|ooexception)+,
+                         (classsynopsisinfo
+                          |fieldsynopsis|%method.synop.class;)*)>
+<!--end of classsynopsis.element-->]]>
+
+<!ENTITY % classsynopsis.attlist "INCLUDE">
+<![%classsynopsis.attlist;[
+<!ATTLIST classsynopsis
+	language	CDATA	#IMPLIED
+	class	(class|interface)	"class"
+	%common.attrib;
+	%classsynopsis.role.attrib;
+	%local.classsynopsis.attrib;
+>
+<!--end of classsynopsis.attlist-->]]>
+<!--end of classsynopsis.module-->]]>
+
+<!ENTITY % classsynopsisinfo.module "INCLUDE">
+<![ %classsynopsisinfo.module; [
+<!ENTITY % local.classsynopsisinfo.attrib "">
+<!ENTITY % classsynopsisinfo.role.attrib "%role.attrib;">
+
+<!ENTITY % classsynopsisinfo.element "INCLUDE">
+<![ %classsynopsisinfo.element; [
+<!ELEMENT classsynopsisinfo %ho; (%cptr.char.mix;|textobject|lineannotation)*>
+<!--end of classsynopsisinfo.element-->]]>
+
+<!ENTITY % classsynopsisinfo.attlist "INCLUDE">
+<![ %classsynopsisinfo.attlist; [
+<!ATTLIST classsynopsisinfo
+		%linespecific.attrib;
+		%common.attrib;
+		%classsynopsisinfo.role.attrib;
+		%local.classsynopsisinfo.attrib;
+>
+<!--end of classsynopsisinfo.attlist-->]]>
+<!--end of classsynopsisinfo.module-->]]>
+
+<!ENTITY % ooclass.module "INCLUDE">
+<![%ooclass.module;[
+<!ENTITY % local.ooclass.attrib "">
+<!ENTITY % ooclass.role.attrib "%role.attrib;">
+
+<!ENTITY % ooclass.element "INCLUDE">
+<![%ooclass.element;[
+<!ELEMENT ooclass %ho; (modifier*, classname)>
+<!--end of ooclass.element-->]]>
+
+<!ENTITY % ooclass.attlist "INCLUDE">
+<![%ooclass.attlist;[
+<!ATTLIST ooclass
+	%common.attrib;
+	%ooclass.role.attrib;
+	%local.ooclass.attrib;
+>
+<!--end of ooclass.attlist-->]]>
+<!--end of ooclass.module-->]]>
+
+<!ENTITY % oointerface.module "INCLUDE">
+<![%oointerface.module;[
+<!ENTITY % local.oointerface.attrib "">
+<!ENTITY % oointerface.role.attrib "%role.attrib;">
+
+<!ENTITY % oointerface.element "INCLUDE">
+<![%oointerface.element;[
+<!ELEMENT oointerface %ho; (modifier*, interfacename)>
+<!--end of oointerface.element-->]]>
+
+<!ENTITY % oointerface.attlist "INCLUDE">
+<![%oointerface.attlist;[
+<!ATTLIST oointerface
+	%common.attrib;
+	%oointerface.role.attrib;
+	%local.oointerface.attrib;
+>
+<!--end of oointerface.attlist-->]]>
+<!--end of oointerface.module-->]]>
+
+<!ENTITY % ooexception.module "INCLUDE">
+<![%ooexception.module;[
+<!ENTITY % local.ooexception.attrib "">
+<!ENTITY % ooexception.role.attrib "%role.attrib;">
+
+<!ENTITY % ooexception.element "INCLUDE">
+<![%ooexception.element;[
+<!ELEMENT ooexception %ho; (modifier*, exceptionname)>
+<!--end of ooexception.element-->]]>
+
+<!ENTITY % ooexception.attlist "INCLUDE">
+<![%ooexception.attlist;[
+<!ATTLIST ooexception
+	%common.attrib;
+	%ooexception.role.attrib;
+	%local.ooexception.attrib;
+>
+<!--end of ooexception.attlist-->]]>
+<!--end of ooexception.module-->]]>
+
+<!ENTITY % modifier.module "INCLUDE">
+<![%modifier.module;[
+<!ENTITY % local.modifier.attrib "">
+<!ENTITY % modifier.role.attrib "%role.attrib;">
+
+<!ENTITY % modifier.element "INCLUDE">
+<![%modifier.element;[
+<!ELEMENT modifier %ho; (%smallcptr.char.mix;)*>
+<!--end of modifier.element-->]]>
+
+<!ENTITY % modifier.attlist "INCLUDE">
+<![%modifier.attlist;[
+<!ATTLIST modifier
+	%common.attrib;
+	%modifier.role.attrib;
+	%local.modifier.attrib;
+>
+<!--end of modifier.attlist-->]]>
+<!--end of modifier.module-->]]>
+
+<!ENTITY % interfacename.module "INCLUDE">
+<![%interfacename.module;[
+<!ENTITY % local.interfacename.attrib "">
+<!ENTITY % interfacename.role.attrib "%role.attrib;">
+
+<!ENTITY % interfacename.element "INCLUDE">
+<![%interfacename.element;[
+<!ELEMENT interfacename %ho; (%cptr.char.mix;)*>
+<!--end of interfacename.element-->]]>
+
+<!ENTITY % interfacename.attlist "INCLUDE">
+<![%interfacename.attlist;[
+<!ATTLIST interfacename
+	%common.attrib;
+	%interfacename.role.attrib;
+	%local.interfacename.attrib;
+>
+<!--end of interfacename.attlist-->]]>
+<!--end of interfacename.module-->]]>
+
+<!ENTITY % exceptionname.module "INCLUDE">
+<![%exceptionname.module;[
+<!ENTITY % local.exceptionname.attrib "">
+<!ENTITY % exceptionname.role.attrib "%role.attrib;">
+
+<!ENTITY % exceptionname.element "INCLUDE">
+<![%exceptionname.element;[
+<!ELEMENT exceptionname %ho; (%smallcptr.char.mix;)*>
+<!--end of exceptionname.element-->]]>
+
+<!ENTITY % exceptionname.attlist "INCLUDE">
+<![%exceptionname.attlist;[
+<!ATTLIST exceptionname
+	%common.attrib;
+	%exceptionname.role.attrib;
+	%local.exceptionname.attrib;
+>
+<!--end of exceptionname.attlist-->]]>
+<!--end of exceptionname.module-->]]>
+
+<!ENTITY % fieldsynopsis.module "INCLUDE">
+<![%fieldsynopsis.module;[
+<!ENTITY % local.fieldsynopsis.attrib "">
+<!ENTITY % fieldsynopsis.role.attrib "%role.attrib;">
+
+<!ENTITY % fieldsynopsis.element "INCLUDE">
+<![%fieldsynopsis.element;[
+<!ELEMENT fieldsynopsis %ho; (modifier*, type?, varname, initializer?)>
+<!--end of fieldsynopsis.element-->]]>
+
+<!ENTITY % fieldsynopsis.attlist "INCLUDE">
+<![%fieldsynopsis.attlist;[
+<!ATTLIST fieldsynopsis
+	language	CDATA	#IMPLIED
+	%common.attrib;
+	%fieldsynopsis.role.attrib;
+	%local.fieldsynopsis.attrib;
+>
+<!--end of fieldsynopsis.attlist-->]]>
+<!--end of fieldsynopsis.module-->]]>
+
+<!ENTITY % initializer.module "INCLUDE">
+<![%initializer.module;[
+<!ENTITY % local.initializer.attrib "">
+<!ENTITY % initializer.role.attrib "%role.attrib;">
+
+<!ENTITY % initializer.element "INCLUDE">
+<![%initializer.element;[
+<!ELEMENT initializer %ho; (%smallcptr.char.mix;)*>
+<!--end of initializer.element-->]]>
+
+<!ENTITY % initializer.attlist "INCLUDE">
+<![%initializer.attlist;[
+<!ATTLIST initializer
+	%common.attrib;
+	%initializer.role.attrib;
+	%local.initializer.attrib;
+>
+<!--end of initializer.attlist-->]]>
+<!--end of initializer.module-->]]>
+
+<!ENTITY % constructorsynopsis.module "INCLUDE">
+<![%constructorsynopsis.module;[
+<!ENTITY % local.constructorsynopsis.attrib "">
+<!ENTITY % constructorsynopsis.role.attrib "%role.attrib;">
+
+<!ENTITY % constructorsynopsis.element "INCLUDE">
+<![%constructorsynopsis.element;[
+<!ELEMENT constructorsynopsis %ho; (modifier*,
+                               methodname?,
+                               (methodparam+|void?),
+                               exceptionname*)>
+<!--end of constructorsynopsis.element-->]]>
+
+<!ENTITY % constructorsynopsis.attlist "INCLUDE">
+<![%constructorsynopsis.attlist;[
+<!ATTLIST constructorsynopsis
+	language	CDATA	#IMPLIED
+	%common.attrib;
+	%constructorsynopsis.role.attrib;
+	%local.constructorsynopsis.attrib;
+>
+<!--end of constructorsynopsis.attlist-->]]>
+<!--end of constructorsynopsis.module-->]]>
+
+<!ENTITY % destructorsynopsis.module "INCLUDE">
+<![%destructorsynopsis.module;[
+<!ENTITY % local.destructorsynopsis.attrib "">
+<!ENTITY % destructorsynopsis.role.attrib "%role.attrib;">
+
+<!ENTITY % destructorsynopsis.element "INCLUDE">
+<![%destructorsynopsis.element;[
+<!ELEMENT destructorsynopsis %ho; (modifier*,
+                              methodname?,
+                              (methodparam+|void?),
+                              exceptionname*)>
+<!--end of destructorsynopsis.element-->]]>
+
+<!ENTITY % destructorsynopsis.attlist "INCLUDE">
+<![%destructorsynopsis.attlist;[
+<!ATTLIST destructorsynopsis
+	language	CDATA	#IMPLIED
+	%common.attrib;
+	%destructorsynopsis.role.attrib;
+	%local.destructorsynopsis.attrib;
+>
+<!--end of destructorsynopsis.attlist-->]]>
+<!--end of destructorsynopsis.module-->]]>
+
+<!ENTITY % methodsynopsis.module "INCLUDE">
+<![%methodsynopsis.module;[
+<!ENTITY % local.methodsynopsis.attrib "">
+<!ENTITY % methodsynopsis.role.attrib "%role.attrib;">
+
+<!ENTITY % methodsynopsis.element "INCLUDE">
+<![%methodsynopsis.element;[
+<!ELEMENT methodsynopsis %ho; (modifier*,
+                          (type|void)?,
+                          methodname,
+                          (methodparam+|void?),
+                          exceptionname*,
+                          modifier*)>
+<!--end of methodsynopsis.element-->]]>
+
+<!ENTITY % methodsynopsis.attlist "INCLUDE">
+<![%methodsynopsis.attlist;[
+<!ATTLIST methodsynopsis
+	language	CDATA	#IMPLIED
+	%common.attrib;
+	%methodsynopsis.role.attrib;
+	%local.methodsynopsis.attrib;
+>
+<!--end of methodsynopsis.attlist-->]]>
+<!--end of methodsynopsis.module-->]]>
+
+<!ENTITY % methodname.module "INCLUDE">
+<![%methodname.module;[
+<!ENTITY % local.methodname.attrib "">
+<!ENTITY % methodname.role.attrib "%role.attrib;">
+
+<!ENTITY % methodname.element "INCLUDE">
+<![%methodname.element;[
+<!ELEMENT methodname %ho; (%smallcptr.char.mix;)*>
+<!--end of methodname.element-->]]>
+
+<!ENTITY % methodname.attlist "INCLUDE">
+<![%methodname.attlist;[
+<!ATTLIST methodname
+	%common.attrib;
+	%methodname.role.attrib;
+	%local.methodname.attrib;
+>
+<!--end of methodname.attlist-->]]>
+<!--end of methodname.module-->]]>
+
+<!ENTITY % methodparam.module "INCLUDE">
+<![%methodparam.module;[
+<!ENTITY % local.methodparam.attrib "">
+<!ENTITY % methodparam.role.attrib "%role.attrib;">
+
+<!ENTITY % methodparam.element "INCLUDE">
+<![%methodparam.element;[
+<!ELEMENT methodparam %ho; (modifier*,
+                       type?,
+                       ((parameter,initializer?)|funcparams),
+                       modifier*)>
+<!--end of methodparam.element-->]]>
+
+<!ENTITY % methodparam.attlist "INCLUDE">
+<![%methodparam.attlist;[
+<!ATTLIST methodparam
+	choice		(opt
+			|req
+			|plain)		"req"
+	rep		(norepeat
+			|repeat)	"norepeat"
+	%common.attrib;
+	%methodparam.role.attrib;
+	%local.methodparam.attrib;
+>
+<!--end of methodparam.attlist-->]]>
+<!--end of methodparam.module-->]]>
+<!--end of classsynopsis.content.module-->]]>
+
+<!-- ...................................................................... -->
+<!-- Document information entities and elements ........................... -->
+
+<!-- The document information elements include some elements that are
+     currently used only in the document hierarchy module. They are
+     defined here so that they will be available for use in customized
+     document hierarchies. -->
+
+<!-- .................................. -->
+
+<!ENTITY % docinfo.content.module "INCLUDE">
+<![%docinfo.content.module;[
+
+<!-- Ackno ............................ -->
+
+<!ENTITY % ackno.module "INCLUDE">
+<![%ackno.module;[
+<!ENTITY % local.ackno.attrib "">
+<!ENTITY % ackno.role.attrib "%role.attrib;">
+
+<!ENTITY % ackno.element "INCLUDE">
+<![%ackno.element;[
+<!ELEMENT ackno %ho; (%docinfo.char.mix;)*>
+<!--end of ackno.element-->]]>
+
+<!ENTITY % ackno.attlist "INCLUDE">
+<![%ackno.attlist;[
+<!ATTLIST ackno
+		%common.attrib;
+		%ackno.role.attrib;
+		%local.ackno.attrib;
+>
+<!--end of ackno.attlist-->]]>
+<!--end of ackno.module-->]]>
+
+<!-- Address .......................... -->
+
+<!ENTITY % address.content.module "INCLUDE">
+<![%address.content.module;[
+<!ENTITY % address.module "INCLUDE">
+<![%address.module;[
+<!ENTITY % local.address.attrib "">
+<!ENTITY % address.role.attrib "%role.attrib;">
+
+<!ENTITY % address.element "INCLUDE">
+<![%address.element;[
+<!ELEMENT address %ho; (#PCDATA|personname|%person.ident.mix;
+		|street|pob|postcode|city|state|country|phone
+		|fax|email|otheraddr)*>
+<!--end of address.element-->]]>
+
+<!ENTITY % address.attlist "INCLUDE">
+<![%address.attlist;[
+<!ATTLIST address
+		%linespecific.attrib;
+		%common.attrib;
+		%address.role.attrib;
+		%local.address.attrib;
+>
+<!--end of address.attlist-->]]>
+<!--end of address.module-->]]>
+
+  <!ENTITY % street.module "INCLUDE">
+  <![%street.module;[
+ <!ENTITY % local.street.attrib "">
+  <!ENTITY % street.role.attrib "%role.attrib;">
+
+<!ENTITY % street.element "INCLUDE">
+<![%street.element;[
+<!ELEMENT street %ho; (%docinfo.char.mix;)*>
+<!--end of street.element-->]]>
+
+<!ENTITY % street.attlist "INCLUDE">
+<![%street.attlist;[
+<!ATTLIST street
+		%common.attrib;
+		%street.role.attrib;
+		%local.street.attrib;
+>
+<!--end of street.attlist-->]]>
+  <!--end of street.module-->]]>
+
+  <!ENTITY % pob.module "INCLUDE">
+  <![%pob.module;[
+  <!ENTITY % local.pob.attrib "">
+  <!ENTITY % pob.role.attrib "%role.attrib;">
+
+<!ENTITY % pob.element "INCLUDE">
+<![%pob.element;[
+<!ELEMENT pob %ho; (%docinfo.char.mix;)*>
+<!--end of pob.element-->]]>
+
+<!ENTITY % pob.attlist "INCLUDE">
+<![%pob.attlist;[
+<!ATTLIST pob
+		%common.attrib;
+		%pob.role.attrib;
+		%local.pob.attrib;
+>
+<!--end of pob.attlist-->]]>
+  <!--end of pob.module-->]]>
+
+  <!ENTITY % postcode.module "INCLUDE">
+  <![%postcode.module;[
+  <!ENTITY % local.postcode.attrib "">
+  <!ENTITY % postcode.role.attrib "%role.attrib;">
+
+<!ENTITY % postcode.element "INCLUDE">
+<![%postcode.element;[
+<!ELEMENT postcode %ho; (%docinfo.char.mix;)*>
+<!--end of postcode.element-->]]>
+
+<!ENTITY % postcode.attlist "INCLUDE">
+<![%postcode.attlist;[
+<!ATTLIST postcode
+		%common.attrib;
+		%postcode.role.attrib;
+		%local.postcode.attrib;
+>
+<!--end of postcode.attlist-->]]>
+  <!--end of postcode.module-->]]>
+
+  <!ENTITY % city.module "INCLUDE">
+  <![%city.module;[
+  <!ENTITY % local.city.attrib "">
+  <!ENTITY % city.role.attrib "%role.attrib;">
+
+<!ENTITY % city.element "INCLUDE">
+<![%city.element;[
+<!ELEMENT city %ho; (%docinfo.char.mix;)*>
+<!--end of city.element-->]]>
+
+<!ENTITY % city.attlist "INCLUDE">
+<![%city.attlist;[
+<!ATTLIST city
+		%common.attrib;
+		%city.role.attrib;
+		%local.city.attrib;
+>
+<!--end of city.attlist-->]]>
+  <!--end of city.module-->]]>
+
+  <!ENTITY % state.module "INCLUDE">
+  <![%state.module;[
+  <!ENTITY % local.state.attrib "">
+  <!ENTITY % state.role.attrib "%role.attrib;">
+
+<!ENTITY % state.element "INCLUDE">
+<![%state.element;[
+<!ELEMENT state %ho; (%docinfo.char.mix;)*>
+<!--end of state.element-->]]>
+
+<!ENTITY % state.attlist "INCLUDE">
+<![%state.attlist;[
+<!ATTLIST state
+		%common.attrib;
+		%state.role.attrib;
+		%local.state.attrib;
+>
+<!--end of state.attlist-->]]>
+  <!--end of state.module-->]]>
+
+  <!ENTITY % country.module "INCLUDE">
+  <![%country.module;[
+  <!ENTITY % local.country.attrib "">
+  <!ENTITY % country.role.attrib "%role.attrib;">
+
+<!ENTITY % country.element "INCLUDE">
+<![%country.element;[
+<!ELEMENT country %ho; (%docinfo.char.mix;)*>
+<!--end of country.element-->]]>
+
+<!ENTITY % country.attlist "INCLUDE">
+<![%country.attlist;[
+<!ATTLIST country
+		%common.attrib;
+		%country.role.attrib;
+		%local.country.attrib;
+>
+<!--end of country.attlist-->]]>
+  <!--end of country.module-->]]>
+
+  <!ENTITY % phone.module "INCLUDE">
+  <![%phone.module;[
+  <!ENTITY % local.phone.attrib "">
+  <!ENTITY % phone.role.attrib "%role.attrib;">
+
+<!ENTITY % phone.element "INCLUDE">
+<![%phone.element;[
+<!ELEMENT phone %ho; (%docinfo.char.mix;)*>
+<!--end of phone.element-->]]>
+
+<!ENTITY % phone.attlist "INCLUDE">
+<![%phone.attlist;[
+<!ATTLIST phone
+		%common.attrib;
+		%phone.role.attrib;
+		%local.phone.attrib;
+>
+<!--end of phone.attlist-->]]>
+  <!--end of phone.module-->]]>
+
+  <!ENTITY % fax.module "INCLUDE">
+  <![%fax.module;[
+  <!ENTITY % local.fax.attrib "">
+  <!ENTITY % fax.role.attrib "%role.attrib;">
+
+<!ENTITY % fax.element "INCLUDE">
+<![%fax.element;[
+<!ELEMENT fax %ho; (%docinfo.char.mix;)*>
+<!--end of fax.element-->]]>
+
+<!ENTITY % fax.attlist "INCLUDE">
+<![%fax.attlist;[
+<!ATTLIST fax
+		%common.attrib;
+		%fax.role.attrib;
+		%local.fax.attrib;
+>
+<!--end of fax.attlist-->]]>
+  <!--end of fax.module-->]]>
+
+  <!-- Email (defined in the Inlines section, below)-->
+
+  <!ENTITY % otheraddr.module "INCLUDE">
+  <![%otheraddr.module;[
+  <!ENTITY % local.otheraddr.attrib "">
+  <!ENTITY % otheraddr.role.attrib "%role.attrib;">
+
+<!ENTITY % otheraddr.element "INCLUDE">
+<![%otheraddr.element;[
+<!ELEMENT otheraddr %ho; (%docinfo.char.mix;)*>
+<!--end of otheraddr.element-->]]>
+
+<!ENTITY % otheraddr.attlist "INCLUDE">
+<![%otheraddr.attlist;[
+<!ATTLIST otheraddr
+		%common.attrib;
+		%otheraddr.role.attrib;
+		%local.otheraddr.attrib;
+>
+<!--end of otheraddr.attlist-->]]>
+  <!--end of otheraddr.module-->]]>
+<!--end of address.content.module-->]]>
+
+<!-- Affiliation ...................... -->
+
+<!ENTITY % affiliation.content.module "INCLUDE">
+<![%affiliation.content.module;[
+<!ENTITY % affiliation.module "INCLUDE">
+<![%affiliation.module;[
+<!ENTITY % local.affiliation.attrib "">
+<!ENTITY % affiliation.role.attrib "%role.attrib;">
+
+<!ENTITY % affiliation.element "INCLUDE">
+<![%affiliation.element;[
+<!ELEMENT affiliation %ho; (shortaffil?, jobtitle*, orgname?, orgdiv*,
+		address*)>
+<!--end of affiliation.element-->]]>
+
+<!ENTITY % affiliation.attlist "INCLUDE">
+<![%affiliation.attlist;[
+<!ATTLIST affiliation
+		%common.attrib;
+		%affiliation.role.attrib;
+		%local.affiliation.attrib;
+>
+<!--end of affiliation.attlist-->]]>
+<!--end of affiliation.module-->]]>
+
+  <!ENTITY % shortaffil.module "INCLUDE">
+  <![%shortaffil.module;[
+  <!ENTITY % local.shortaffil.attrib "">
+  <!ENTITY % shortaffil.role.attrib "%role.attrib;">
+
+<!ENTITY % shortaffil.element "INCLUDE">
+<![%shortaffil.element;[
+<!ELEMENT shortaffil %ho; (%docinfo.char.mix;)*>
+<!--end of shortaffil.element-->]]>
+
+<!ENTITY % shortaffil.attlist "INCLUDE">
+<![%shortaffil.attlist;[
+<!ATTLIST shortaffil
+		%common.attrib;
+		%shortaffil.role.attrib;
+		%local.shortaffil.attrib;
+>
+<!--end of shortaffil.attlist-->]]>
+  <!--end of shortaffil.module-->]]>
+
+  <!ENTITY % jobtitle.module "INCLUDE">
+  <![%jobtitle.module;[
+  <!ENTITY % local.jobtitle.attrib "">
+  <!ENTITY % jobtitle.role.attrib "%role.attrib;">
+
+<!ENTITY % jobtitle.element "INCLUDE">
+<![%jobtitle.element;[
+<!ELEMENT jobtitle %ho; (%docinfo.char.mix;)*>
+<!--end of jobtitle.element-->]]>
+
+<!ENTITY % jobtitle.attlist "INCLUDE">
+<![%jobtitle.attlist;[
+<!ATTLIST jobtitle
+		%common.attrib;
+		%jobtitle.role.attrib;
+		%local.jobtitle.attrib;
+>
+<!--end of jobtitle.attlist-->]]>
+  <!--end of jobtitle.module-->]]>
+
+  <!-- OrgName (defined elsewhere in this section)-->
+
+  <!ENTITY % orgdiv.module "INCLUDE">
+  <![%orgdiv.module;[
+  <!ENTITY % local.orgdiv.attrib "">
+  <!ENTITY % orgdiv.role.attrib "%role.attrib;">
+
+<!ENTITY % orgdiv.element "INCLUDE">
+<![%orgdiv.element;[
+<!ELEMENT orgdiv %ho; (%docinfo.char.mix;)*>
+<!--end of orgdiv.element-->]]>
+
+<!ENTITY % orgdiv.attlist "INCLUDE">
+<![%orgdiv.attlist;[
+<!ATTLIST orgdiv
+		%common.attrib;
+		%orgdiv.role.attrib;
+		%local.orgdiv.attrib;
+>
+<!--end of orgdiv.attlist-->]]>
+  <!--end of orgdiv.module-->]]>
+
+  <!-- Address (defined elsewhere in this section)-->
+<!--end of affiliation.content.module-->]]>
+
+<!-- ArtPageNums ...................... -->
+
+<!ENTITY % artpagenums.module "INCLUDE">
+<![%artpagenums.module;[
+<!ENTITY % local.artpagenums.attrib "">
+<!ENTITY % artpagenums.role.attrib "%role.attrib;">
+
+<!ENTITY % artpagenums.element "INCLUDE">
+<![%artpagenums.element;[
+<!ELEMENT artpagenums %ho; (%docinfo.char.mix;)*>
+<!--end of artpagenums.element-->]]>
+
+<!ENTITY % artpagenums.attlist "INCLUDE">
+<![%artpagenums.attlist;[
+<!ATTLIST artpagenums
+		%common.attrib;
+		%artpagenums.role.attrib;
+		%local.artpagenums.attrib;
+>
+<!--end of artpagenums.attlist-->]]>
+<!--end of artpagenums.module-->]]>
+
+<!-- PersonName -->
+
+<!ENTITY % personname.module "INCLUDE">
+<![%personname.module;[
+<!ENTITY % local.personname.attrib "">
+<!ENTITY % personname.role.attrib "%role.attrib;">
+
+<!ENTITY % personname.element "INCLUDE">
+<![%personname.element;[
+<!ELEMENT personname %ho; ((honorific|firstname|surname|lineage|othername)+)>
+<!--end of personname.element-->]]>
+
+<!ENTITY % personname.attlist "INCLUDE">
+<![%personname.attlist;[
+<!ATTLIST personname
+		%common.attrib;
+		%personname.role.attrib;
+		%local.personname.attrib;
+>
+<!--end of personname.attlist-->]]>
+<!--end of personname.module-->]]>
+
+<!-- Author ........................... -->
+
+<!ENTITY % author.module "INCLUDE">
+<![%author.module;[
+<!ENTITY % local.author.attrib "">
+<!ENTITY % author.role.attrib "%role.attrib;">
+
+<!ENTITY % author.element "INCLUDE">
+<![%author.element;[
+<!ELEMENT author %ho; ((personname|(%person.ident.mix;)+),(personblurb|email|address)*)>
+<!--end of author.element-->]]>
+
+<!ENTITY % author.attlist "INCLUDE">
+<![%author.attlist;[
+<!ATTLIST author
+		%common.attrib;
+		%author.role.attrib;
+		%local.author.attrib;
+>
+<!--end of author.attlist-->]]>
+<!--(see "Personal identity elements" for %person.ident.mix;)-->
+<!--end of author.module-->]]>
+
+<!-- AuthorGroup ...................... -->
+
+<!ENTITY % authorgroup.content.module "INCLUDE">
+<![%authorgroup.content.module;[
+<!ENTITY % authorgroup.module "INCLUDE">
+<![%authorgroup.module;[
+<!ENTITY % local.authorgroup.attrib "">
+<!ENTITY % authorgroup.role.attrib "%role.attrib;">
+
+<!ENTITY % authorgroup.element "INCLUDE">
+<![%authorgroup.element;[
+<!ELEMENT authorgroup %ho; ((author|editor|collab|corpauthor|corpcredit|othercredit)+)>
+<!--end of authorgroup.element-->]]>
+
+<!ENTITY % authorgroup.attlist "INCLUDE">
+<![%authorgroup.attlist;[
+<!ATTLIST authorgroup
+		%common.attrib;
+		%authorgroup.role.attrib;
+		%local.authorgroup.attrib;
+>
+<!--end of authorgroup.attlist-->]]>
+<!--end of authorgroup.module-->]]>
+
+  <!-- Author (defined elsewhere in this section)-->
+  <!-- Editor (defined elsewhere in this section)-->
+
+  <!ENTITY % collab.content.module "INCLUDE">
+  <![%collab.content.module;[
+  <!ENTITY % collab.module "INCLUDE">
+  <![%collab.module;[
+  <!ENTITY % local.collab.attrib "">
+  <!ENTITY % collab.role.attrib "%role.attrib;">
+
+<!ENTITY % collab.element "INCLUDE">
+<![%collab.element;[
+<!ELEMENT collab %ho; (collabname, affiliation*)>
+<!--end of collab.element-->]]>
+
+<!ENTITY % collab.attlist "INCLUDE">
+<![%collab.attlist;[
+<!ATTLIST collab
+		%common.attrib;
+		%collab.role.attrib;
+		%local.collab.attrib;
+>
+<!--end of collab.attlist-->]]>
+  <!--end of collab.module-->]]>
+
+    <!ENTITY % collabname.module "INCLUDE">
+  <![%collabname.module;[
+  <!ENTITY % local.collabname.attrib "">
+  <!ENTITY % collabname.role.attrib "%role.attrib;">
+
+<!ENTITY % collabname.element "INCLUDE">
+<![%collabname.element;[
+<!ELEMENT collabname %ho; (%docinfo.char.mix;)*>
+<!--end of collabname.element-->]]>
+
+<!ENTITY % collabname.attlist "INCLUDE">
+<![%collabname.attlist;[
+<!ATTLIST collabname
+		%common.attrib;
+		%collabname.role.attrib;
+		%local.collabname.attrib;
+>
+<!--end of collabname.attlist-->]]>
+    <!--end of collabname.module-->]]>
+
+    <!-- Affiliation (defined elsewhere in this section)-->
+  <!--end of collab.content.module-->]]>
+
+  <!-- CorpAuthor (defined elsewhere in this section)-->
+  <!-- OtherCredit (defined elsewhere in this section)-->
+
+<!--end of authorgroup.content.module-->]]>
+
+<!-- AuthorInitials ................... -->
+
+<!ENTITY % authorinitials.module "INCLUDE">
+<![%authorinitials.module;[
+<!ENTITY % local.authorinitials.attrib "">
+<!ENTITY % authorinitials.role.attrib "%role.attrib;">
+
+<!ENTITY % authorinitials.element "INCLUDE">
+<![%authorinitials.element;[
+<!ELEMENT authorinitials %ho; (%docinfo.char.mix;)*>
+<!--end of authorinitials.element-->]]>
+
+<!ENTITY % authorinitials.attlist "INCLUDE">
+<![%authorinitials.attlist;[
+<!ATTLIST authorinitials
+		%common.attrib;
+		%authorinitials.role.attrib;
+		%local.authorinitials.attrib;
+>
+<!--end of authorinitials.attlist-->]]>
+<!--end of authorinitials.module-->]]>
+
+<!-- ConfGroup ........................ -->
+
+<!ENTITY % confgroup.content.module "INCLUDE">
+<![%confgroup.content.module;[
+<!ENTITY % confgroup.module "INCLUDE">
+<![%confgroup.module;[
+<!ENTITY % local.confgroup.attrib "">
+<!ENTITY % confgroup.role.attrib "%role.attrib;">
+
+<!ENTITY % confgroup.element "INCLUDE">
+<![%confgroup.element;[
+<!ELEMENT confgroup %ho; ((confdates|conftitle|confnum|address|confsponsor)*)>
+<!--end of confgroup.element-->]]>
+
+<!ENTITY % confgroup.attlist "INCLUDE">
+<![%confgroup.attlist;[
+<!ATTLIST confgroup
+		%common.attrib;
+		%confgroup.role.attrib;
+		%local.confgroup.attrib;
+>
+<!--end of confgroup.attlist-->]]>
+<!--end of confgroup.module-->]]>
+
+  <!ENTITY % confdates.module "INCLUDE">
+  <![%confdates.module;[
+  <!ENTITY % local.confdates.attrib "">
+  <!ENTITY % confdates.role.attrib "%role.attrib;">
+
+<!ENTITY % confdates.element "INCLUDE">
+<![%confdates.element;[
+<!ELEMENT confdates %ho; (%docinfo.char.mix;)*>
+<!--end of confdates.element-->]]>
+
+<!ENTITY % confdates.attlist "INCLUDE">
+<![%confdates.attlist;[
+<!ATTLIST confdates
+		%common.attrib;
+		%confdates.role.attrib;
+		%local.confdates.attrib;
+>
+<!--end of confdates.attlist-->]]>
+  <!--end of confdates.module-->]]>
+
+  <!ENTITY % conftitle.module "INCLUDE">
+  <![%conftitle.module;[
+  <!ENTITY % local.conftitle.attrib "">
+  <!ENTITY % conftitle.role.attrib "%role.attrib;">
+
+<!ENTITY % conftitle.element "INCLUDE">
+<![%conftitle.element;[
+<!ELEMENT conftitle %ho; (%docinfo.char.mix;)*>
+<!--end of conftitle.element-->]]>
+
+<!ENTITY % conftitle.attlist "INCLUDE">
+<![%conftitle.attlist;[
+<!ATTLIST conftitle
+		%common.attrib;
+		%conftitle.role.attrib;
+		%local.conftitle.attrib;
+>
+<!--end of conftitle.attlist-->]]>
+  <!--end of conftitle.module-->]]>
+
+  <!ENTITY % confnum.module "INCLUDE">
+  <![%confnum.module;[
+  <!ENTITY % local.confnum.attrib "">
+  <!ENTITY % confnum.role.attrib "%role.attrib;">
+
+<!ENTITY % confnum.element "INCLUDE">
+<![%confnum.element;[
+<!ELEMENT confnum %ho; (%docinfo.char.mix;)*>
+<!--end of confnum.element-->]]>
+
+<!ENTITY % confnum.attlist "INCLUDE">
+<![%confnum.attlist;[
+<!ATTLIST confnum
+		%common.attrib;
+		%confnum.role.attrib;
+		%local.confnum.attrib;
+>
+<!--end of confnum.attlist-->]]>
+  <!--end of confnum.module-->]]>
+
+  <!-- Address (defined elsewhere in this section)-->
+
+  <!ENTITY % confsponsor.module "INCLUDE">
+  <![%confsponsor.module;[
+  <!ENTITY % local.confsponsor.attrib "">
+  <!ENTITY % confsponsor.role.attrib "%role.attrib;">
+
+<!ENTITY % confsponsor.element "INCLUDE">
+<![%confsponsor.element;[
+<!ELEMENT confsponsor %ho; (%docinfo.char.mix;)*>
+<!--end of confsponsor.element-->]]>
+
+<!ENTITY % confsponsor.attlist "INCLUDE">
+<![%confsponsor.attlist;[
+<!ATTLIST confsponsor
+		%common.attrib;
+		%confsponsor.role.attrib;
+		%local.confsponsor.attrib;
+>
+<!--end of confsponsor.attlist-->]]>
+  <!--end of confsponsor.module-->]]>
+<!--end of confgroup.content.module-->]]>
+
+<!-- ContractNum ...................... -->
+
+<!ENTITY % contractnum.module "INCLUDE">
+<![%contractnum.module;[
+<!ENTITY % local.contractnum.attrib "">
+<!ENTITY % contractnum.role.attrib "%role.attrib;">
+
+<!ENTITY % contractnum.element "INCLUDE">
+<![%contractnum.element;[
+<!ELEMENT contractnum %ho; (%docinfo.char.mix;)*>
+<!--end of contractnum.element-->]]>
+
+<!ENTITY % contractnum.attlist "INCLUDE">
+<![%contractnum.attlist;[
+<!ATTLIST contractnum
+		%common.attrib;
+		%contractnum.role.attrib;
+		%local.contractnum.attrib;
+>
+<!--end of contractnum.attlist-->]]>
+<!--end of contractnum.module-->]]>
+
+<!-- ContractSponsor .................. -->
+
+<!ENTITY % contractsponsor.module "INCLUDE">
+<![%contractsponsor.module;[
+<!ENTITY % local.contractsponsor.attrib "">
+<!ENTITY % contractsponsor.role.attrib "%role.attrib;">
+
+<!ENTITY % contractsponsor.element "INCLUDE">
+<![%contractsponsor.element;[
+<!ELEMENT contractsponsor %ho; (%docinfo.char.mix;)*>
+<!--end of contractsponsor.element-->]]>
+
+<!ENTITY % contractsponsor.attlist "INCLUDE">
+<![%contractsponsor.attlist;[
+<!ATTLIST contractsponsor
+		%common.attrib;
+		%contractsponsor.role.attrib;
+		%local.contractsponsor.attrib;
+>
+<!--end of contractsponsor.attlist-->]]>
+<!--end of contractsponsor.module-->]]>
+
+<!-- Copyright ........................ -->
+
+<!ENTITY % copyright.content.module "INCLUDE">
+<![%copyright.content.module;[
+<!ENTITY % copyright.module "INCLUDE">
+<![%copyright.module;[
+<!ENTITY % local.copyright.attrib "">
+<!ENTITY % copyright.role.attrib "%role.attrib;">
+
+<!ENTITY % copyright.element "INCLUDE">
+<![%copyright.element;[
+<!ELEMENT copyright %ho; (year+, holder*)>
+<!--end of copyright.element-->]]>
+
+<!ENTITY % copyright.attlist "INCLUDE">
+<![%copyright.attlist;[
+<!ATTLIST copyright
+		%common.attrib;
+		%copyright.role.attrib;
+		%local.copyright.attrib;
+>
+<!--end of copyright.attlist-->]]>
+<!--end of copyright.module-->]]>
+
+  <!ENTITY % year.module "INCLUDE">
+  <![%year.module;[
+  <!ENTITY % local.year.attrib "">
+  <!ENTITY % year.role.attrib "%role.attrib;">
+
+<!ENTITY % year.element "INCLUDE">
+<![%year.element;[
+<!ELEMENT year %ho; (%docinfo.char.mix;)*>
+<!--end of year.element-->]]>
+
+<!ENTITY % year.attlist "INCLUDE">
+<![%year.attlist;[
+<!ATTLIST year
+		%common.attrib;
+		%year.role.attrib;
+		%local.year.attrib;
+>
+<!--end of year.attlist-->]]>
+  <!--end of year.module-->]]>
+
+  <!ENTITY % holder.module "INCLUDE">
+  <![%holder.module;[
+  <!ENTITY % local.holder.attrib "">
+  <!ENTITY % holder.role.attrib "%role.attrib;">
+
+<!ENTITY % holder.element "INCLUDE">
+<![%holder.element;[
+<!ELEMENT holder %ho; (%docinfo.char.mix;)*>
+<!--end of holder.element-->]]>
+
+<!ENTITY % holder.attlist "INCLUDE">
+<![%holder.attlist;[
+<!ATTLIST holder
+		%common.attrib;
+		%holder.role.attrib;
+		%local.holder.attrib;
+>
+<!--end of holder.attlist-->]]>
+  <!--end of holder.module-->]]>
+<!--end of copyright.content.module-->]]>
+
+<!-- CorpAuthor ....................... -->
+
+<!ENTITY % corpauthor.module "INCLUDE">
+<![%corpauthor.module;[
+<!ENTITY % local.corpauthor.attrib "">
+<!ENTITY % corpauthor.role.attrib "%role.attrib;">
+
+<!ENTITY % corpauthor.element "INCLUDE">
+<![%corpauthor.element;[
+<!ELEMENT corpauthor %ho; (%docinfo.char.mix;)*>
+<!--end of corpauthor.element-->]]>
+
+<!ENTITY % corpauthor.attlist "INCLUDE">
+<![%corpauthor.attlist;[
+<!ATTLIST corpauthor
+		%common.attrib;
+		%corpauthor.role.attrib;
+		%local.corpauthor.attrib;
+>
+<!--end of corpauthor.attlist-->]]>
+<!--end of corpauthor.module-->]]>
+
+<!-- CorpCredit ...................... -->
+
+<!ENTITY % corpcredit.module "INCLUDE">
+<![%corpcredit.module;[
+<!ENTITY % local.corpcredit.attrib "">
+<!ENTITY % corpcredit.role.attrib "%role.attrib;">
+
+<!ENTITY % corpcredit.element "INCLUDE">
+<![%corpcredit.element;[
+<!ELEMENT corpcredit %ho; (%docinfo.char.mix;)*>
+<!--end of corpcredit.element-->]]>
+
+<!ENTITY % corpcredit.attlist "INCLUDE">
+<![%corpcredit.attlist;[
+<!ATTLIST corpcredit
+		class	(graphicdesigner
+			|productioneditor
+			|copyeditor
+			|technicaleditor
+			|translator
+			|other)			#IMPLIED
+		%common.attrib;
+		%corpcredit.role.attrib;
+		%local.corpcredit.attrib;
+>
+<!--end of corpcredit.attlist-->]]>
+<!--end of corpcredit.module-->]]>
+
+<!-- CorpName ......................... -->
+
+<!ENTITY % corpname.module "INCLUDE">
+<![%corpname.module;[
+<!ENTITY % local.corpname.attrib "">
+
+<!ENTITY % corpname.element "INCLUDE">
+<![%corpname.element;[
+<!ELEMENT corpname %ho; (%docinfo.char.mix;)*>
+<!--end of corpname.element-->]]>
+<!ENTITY % corpname.role.attrib "%role.attrib;">
+
+<!ENTITY % corpname.attlist "INCLUDE">
+<![%corpname.attlist;[
+<!ATTLIST corpname
+		%common.attrib;
+		%corpname.role.attrib;
+		%local.corpname.attrib;
+>
+<!--end of corpname.attlist-->]]>
+<!--end of corpname.module-->]]>
+
+<!-- Date ............................. -->
+
+<!ENTITY % date.module "INCLUDE">
+<![%date.module;[
+<!ENTITY % local.date.attrib "">
+<!ENTITY % date.role.attrib "%role.attrib;">
+
+<!ENTITY % date.element "INCLUDE">
+<![%date.element;[
+<!ELEMENT date %ho; (%docinfo.char.mix;)*>
+<!--end of date.element-->]]>
+
+<!ENTITY % date.attlist "INCLUDE">
+<![%date.attlist;[
+<!ATTLIST date
+		%common.attrib;
+		%date.role.attrib;
+		%local.date.attrib;
+>
+<!--end of date.attlist-->]]>
+<!--end of date.module-->]]>
+
+<!-- Edition .......................... -->
+
+<!ENTITY % edition.module "INCLUDE">
+<![%edition.module;[
+<!ENTITY % local.edition.attrib "">
+<!ENTITY % edition.role.attrib "%role.attrib;">
+
+<!ENTITY % edition.element "INCLUDE">
+<![%edition.element;[
+<!ELEMENT edition %ho; (%docinfo.char.mix;)*>
+<!--end of edition.element-->]]>
+
+<!ENTITY % edition.attlist "INCLUDE">
+<![%edition.attlist;[
+<!ATTLIST edition
+		%common.attrib;
+		%edition.role.attrib;
+		%local.edition.attrib;
+>
+<!--end of edition.attlist-->]]>
+<!--end of edition.module-->]]>
+
+<!-- Editor ........................... -->
+
+<!ENTITY % editor.module "INCLUDE">
+<![%editor.module;[
+<!ENTITY % local.editor.attrib "">
+<!ENTITY % editor.role.attrib "%role.attrib;">
+
+<!ENTITY % editor.element "INCLUDE">
+<![%editor.element;[
+<!ELEMENT editor %ho; ((personname|(%person.ident.mix;)+),(personblurb|email|address)*)>
+<!--end of editor.element-->]]>
+
+<!ENTITY % editor.attlist "INCLUDE">
+<![%editor.attlist;[
+<!ATTLIST editor
+		%common.attrib;
+		%editor.role.attrib;
+		%local.editor.attrib;
+>
+<!--end of editor.attlist-->]]>
+  <!--(see "Personal identity elements" for %person.ident.mix;)-->
+<!--end of editor.module-->]]>
+
+<!-- ISBN ............................. -->
+
+<!ENTITY % isbn.module "INCLUDE">
+<![%isbn.module;[
+<!ENTITY % local.isbn.attrib "">
+<!ENTITY % isbn.role.attrib "%role.attrib;">
+
+<!ENTITY % isbn.element "INCLUDE">
+<![%isbn.element;[
+<!ELEMENT isbn %ho; (%docinfo.char.mix;)*>
+<!--end of isbn.element-->]]>
+
+<!ENTITY % isbn.attlist "INCLUDE">
+<![%isbn.attlist;[
+<!ATTLIST isbn
+		%common.attrib;
+		%isbn.role.attrib;
+		%local.isbn.attrib;
+>
+<!--end of isbn.attlist-->]]>
+<!--end of isbn.module-->]]>
+
+<!-- ISSN ............................. -->
+
+<!ENTITY % issn.module "INCLUDE">
+<![%issn.module;[
+<!ENTITY % local.issn.attrib "">
+<!ENTITY % issn.role.attrib "%role.attrib;">
+
+<!ENTITY % issn.element "INCLUDE">
+<![%issn.element;[
+<!ELEMENT issn %ho; (%docinfo.char.mix;)*>
+<!--end of issn.element-->]]>
+
+<!ENTITY % issn.attlist "INCLUDE">
+<![%issn.attlist;[
+<!ATTLIST issn
+		%common.attrib;
+		%issn.role.attrib;
+		%local.issn.attrib;
+>
+<!--end of issn.attlist-->]]>
+<!--end of issn.module-->]]>
+
+<!-- BiblioId ................. -->
+<!ENTITY % biblio.class.attrib
+		"class	(uri
+                         |doi
+                         |isbn
+                         |issn
+                         |libraryofcongress
+                         |pubnumber
+                         |other)	#IMPLIED
+		otherclass	CDATA	#IMPLIED"
+>
+
+<!ENTITY % biblioid.module "INCLUDE">
+<![%biblioid.module;[
+<!ENTITY % local.biblioid.attrib "">
+<!ENTITY % biblioid.role.attrib "%role.attrib;">
+
+<!ENTITY % biblioid.element "INCLUDE">
+<![%biblioid.element;[
+<!ELEMENT biblioid %ho; (%docinfo.char.mix;)*>
+<!--end of biblioid.element-->]]>
+
+<!ENTITY % biblioid.attlist "INCLUDE">
+<![%biblioid.attlist;[
+<!ATTLIST biblioid
+		%biblio.class.attrib;
+		%common.attrib;
+		%biblioid.role.attrib;
+		%local.biblioid.attrib;
+>
+<!--end of biblioid.attlist-->]]>
+<!--end of biblioid.module-->]]>
+
+<!-- CiteBiblioId ................. -->
+
+<!ENTITY % citebiblioid.module "INCLUDE">
+<![%citebiblioid.module;[
+<!ENTITY % local.citebiblioid.attrib "">
+<!ENTITY % citebiblioid.role.attrib "%role.attrib;">
+
+<!ENTITY % citebiblioid.element "INCLUDE">
+<![%citebiblioid.element;[
+<!ELEMENT citebiblioid %ho; (%docinfo.char.mix;)*>
+<!--end of citebiblioid.element-->]]>
+
+<!ENTITY % citebiblioid.attlist "INCLUDE">
+<![%citebiblioid.attlist;[
+<!ATTLIST citebiblioid
+		%biblio.class.attrib;
+		%common.attrib;
+		%citebiblioid.role.attrib;
+		%local.citebiblioid.attrib;
+>
+<!--end of citebiblioid.attlist-->]]>
+<!--end of citebiblioid.module-->]]>
+
+<!-- BiblioSource ................. -->
+
+<!ENTITY % bibliosource.module "INCLUDE">
+<![%bibliosource.module;[
+<!ENTITY % local.bibliosource.attrib "">
+<!ENTITY % bibliosource.role.attrib "%role.attrib;">
+
+<!ENTITY % bibliosource.element "INCLUDE">
+<![%bibliosource.element;[
+<!ELEMENT bibliosource %ho; (%docinfo.char.mix;)*>
+<!--end of bibliosource.element-->]]>
+
+<!ENTITY % bibliosource.attlist "INCLUDE">
+<![%bibliosource.attlist;[
+<!ATTLIST bibliosource
+		%biblio.class.attrib;
+		%common.attrib;
+		%bibliosource.role.attrib;
+		%local.bibliosource.attrib;
+>
+<!--end of bibliosource.attlist-->]]>
+<!--end of bibliosource.module-->]]>
+
+<!-- BiblioRelation ................. -->
+
+<!ENTITY % bibliorelation.module "INCLUDE">
+<![%bibliorelation.module;[
+<!ENTITY % local.bibliorelation.attrib "">
+<!ENTITY % local.bibliorelation.types "">
+
+<!ENTITY % bibliorelation.type.attrib
+                "type    (isversionof
+                         |hasversion
+                         |isreplacedby
+                         |replaces
+                         |isrequiredby
+                         |requires
+                         |ispartof
+                         |haspart
+                         |isreferencedby
+                         |references
+                         |isformatof
+                         |hasformat
+                         |othertype
+                         %local.bibliorelation.types;)       #IMPLIED
+		othertype	CDATA	#IMPLIED
+">
+
+<!ENTITY % bibliorelation.role.attrib "%role.attrib;">
+
+<!ENTITY % bibliorelation.element "INCLUDE">
+<![%bibliorelation.element;[
+<!ELEMENT bibliorelation %ho; (%docinfo.char.mix;)*>
+<!--end of bibliorelation.element-->]]>
+
+<!ENTITY % bibliorelation.attlist "INCLUDE">
+<![%bibliorelation.attlist;[
+<!ATTLIST bibliorelation
+		%biblio.class.attrib;
+		%bibliorelation.type.attrib;
+		%common.attrib;
+		%bibliorelation.role.attrib;
+		%local.bibliorelation.attrib;
+>
+<!--end of bibliorelation.attlist-->]]>
+<!--end of bibliorelation.module-->]]>
+
+<!-- BiblioCoverage ................. -->
+
+<!ENTITY % bibliocoverage.module "INCLUDE">
+<![%bibliocoverage.module;[
+<!ENTITY % local.bibliocoverage.attrib "">
+<!ENTITY % bibliocoverage.role.attrib "%role.attrib;">
+
+<!ENTITY % bibliocoverage.element "INCLUDE">
+<![%bibliocoverage.element;[
+<!ELEMENT bibliocoverage %ho; (%docinfo.char.mix;)*>
+<!--end of bibliocoverage.element-->]]>
+
+<!ENTITY % bibliocoverage.attlist "INCLUDE">
+<![%bibliocoverage.attlist;[
+<!ATTLIST bibliocoverage
+		spatial	(dcmipoint|iso3166|dcmibox|tgn|otherspatial)	#IMPLIED
+		otherspatial	CDATA	#IMPLIED
+		temporal (dcmiperiod|w3c-dtf|othertemporal) #IMPLIED
+		othertemporal	CDATA	#IMPLIED
+		%common.attrib;
+		%bibliocoverage.role.attrib;
+		%local.bibliocoverage.attrib;
+>
+<!--end of bibliocoverage.attlist-->]]>
+<!--end of bibliocoverage.module-->]]>
+
+<!-- InvPartNumber .................... -->
+
+<!ENTITY % invpartnumber.module "INCLUDE">
+<![%invpartnumber.module;[
+<!ENTITY % local.invpartnumber.attrib "">
+<!ENTITY % invpartnumber.role.attrib "%role.attrib;">
+
+<!ENTITY % invpartnumber.element "INCLUDE">
+<![%invpartnumber.element;[
+<!ELEMENT invpartnumber %ho; (%docinfo.char.mix;)*>
+<!--end of invpartnumber.element-->]]>
+
+<!ENTITY % invpartnumber.attlist "INCLUDE">
+<![%invpartnumber.attlist;[
+<!ATTLIST invpartnumber
+		%common.attrib;
+		%invpartnumber.role.attrib;
+		%local.invpartnumber.attrib;
+>
+<!--end of invpartnumber.attlist-->]]>
+<!--end of invpartnumber.module-->]]>
+
+<!-- IssueNum ......................... -->
+
+<!ENTITY % issuenum.module "INCLUDE">
+<![%issuenum.module;[
+<!ENTITY % local.issuenum.attrib "">
+<!ENTITY % issuenum.role.attrib "%role.attrib;">
+
+<!ENTITY % issuenum.element "INCLUDE">
+<![%issuenum.element;[
+<!ELEMENT issuenum %ho; (%docinfo.char.mix;)*>
+<!--end of issuenum.element-->]]>
+
+<!ENTITY % issuenum.attlist "INCLUDE">
+<![%issuenum.attlist;[
+<!ATTLIST issuenum
+		%common.attrib;
+		%issuenum.role.attrib;
+		%local.issuenum.attrib;
+>
+<!--end of issuenum.attlist-->]]>
+<!--end of issuenum.module-->]]>
+
+<!-- LegalNotice ...................... -->
+
+<!ENTITY % legalnotice.module "INCLUDE">
+<![%legalnotice.module;[
+<!ENTITY % local.legalnotice.attrib "">
+<!ENTITY % legalnotice.role.attrib "%role.attrib;">
+
+<!ENTITY % legalnotice.element "INCLUDE">
+<![%legalnotice.element;[
+<!ELEMENT legalnotice %ho; (blockinfo?, title?, (%legalnotice.mix;)+)
+		%formal.exclusion;>
+<!--end of legalnotice.element-->]]>
+
+<!ENTITY % legalnotice.attlist "INCLUDE">
+<![%legalnotice.attlist;[
+<!ATTLIST legalnotice
+		%common.attrib;
+		%legalnotice.role.attrib;
+		%local.legalnotice.attrib;
+>
+<!--end of legalnotice.attlist-->]]>
+<!--end of legalnotice.module-->]]>
+
+<!-- ModeSpec ......................... -->
+
+<!ENTITY % modespec.module "INCLUDE">
+<![%modespec.module;[
+<!ENTITY % local.modespec.attrib "">
+<!ENTITY % modespec.role.attrib "%role.attrib;">
+
+<!ENTITY % modespec.element "INCLUDE">
+<![%modespec.element;[
+<!ELEMENT modespec %ho; (%docinfo.char.mix;)*
+		%ubiq.exclusion;>
+<!--end of modespec.element-->]]>
+
+<!-- Application: Type of action required for completion
+		of the links to which the ModeSpec is relevant (e.g.,
+		retrieval query) -->
+
+
+<!ENTITY % modespec.attlist "INCLUDE">
+<![%modespec.attlist;[
+<!ATTLIST modespec
+		application	NOTATION
+				(%notation.class;)	#IMPLIED
+		%common.attrib;
+		%modespec.role.attrib;
+		%local.modespec.attrib;
+>
+<!--end of modespec.attlist-->]]>
+<!--end of modespec.module-->]]>
+
+<!-- OrgName .......................... -->
+
+<!ENTITY % orgname.module "INCLUDE">
+<![%orgname.module;[
+<!ENTITY % local.orgname.attrib "">
+<!ENTITY % orgname.role.attrib "%role.attrib;">
+
+<!ENTITY % orgname.element "INCLUDE">
+<![%orgname.element;[
+<!ELEMENT orgname %ho; (%docinfo.char.mix;)*>
+<!--end of orgname.element-->]]>
+
+<!ENTITY % orgname.attlist "INCLUDE">
+<![%orgname.attlist;[
+<!ATTLIST orgname
+		%common.attrib;
+		class	(corporation|nonprofit|consortium|informal|other)	#IMPLIED
+		otherclass	CDATA			#IMPLIED
+		%orgname.role.attrib;
+		%local.orgname.attrib;
+>
+<!--end of orgname.attlist-->]]>
+<!--end of orgname.module-->]]>
+
+<!-- OtherCredit ...................... -->
+
+<!ENTITY % othercredit.module "INCLUDE">
+<![%othercredit.module;[
+<!ENTITY % local.othercredit.attrib "">
+<!ENTITY % othercredit.role.attrib "%role.attrib;">
+
+<!ENTITY % othercredit.element "INCLUDE">
+<![%othercredit.element;[
+<!ELEMENT othercredit %ho; ((personname|(%person.ident.mix;)+),
+                            (personblurb|email|address)*)>
+<!--end of othercredit.element-->]]>
+
+<!ENTITY % othercredit.attlist "INCLUDE">
+<![%othercredit.attlist;[
+<!ATTLIST othercredit
+		class	(graphicdesigner
+			|productioneditor
+			|copyeditor
+			|technicaleditor
+			|translator
+			|other)			#IMPLIED
+		%common.attrib;
+		%othercredit.role.attrib;
+		%local.othercredit.attrib;
+>
+<!--end of othercredit.attlist-->]]>
+  <!--(see "Personal identity elements" for %person.ident.mix;)-->
+<!--end of othercredit.module-->]]>
+
+<!-- PageNums ......................... -->
+
+<!ENTITY % pagenums.module "INCLUDE">
+<![%pagenums.module;[
+<!ENTITY % local.pagenums.attrib "">
+<!ENTITY % pagenums.role.attrib "%role.attrib;">
+
+<!ENTITY % pagenums.element "INCLUDE">
+<![%pagenums.element;[
+<!ELEMENT pagenums %ho; (%docinfo.char.mix;)*>
+<!--end of pagenums.element-->]]>
+
+<!ENTITY % pagenums.attlist "INCLUDE">
+<![%pagenums.attlist;[
+<!ATTLIST pagenums
+		%common.attrib;
+		%pagenums.role.attrib;
+		%local.pagenums.attrib;
+>
+<!--end of pagenums.attlist-->]]>
+<!--end of pagenums.module-->]]>
+
+<!-- Personal identity elements ....... -->
+
+<!-- These elements are used only within Author, Editor, and
+OtherCredit. -->
+
+<!ENTITY % person.ident.module "INCLUDE">
+<![%person.ident.module;[
+  <!ENTITY % contrib.module "INCLUDE">
+  <![%contrib.module;[
+  <!ENTITY % local.contrib.attrib "">
+  <!ENTITY % contrib.role.attrib "%role.attrib;">
+
+<!ENTITY % contrib.element "INCLUDE">
+<![%contrib.element;[
+<!ELEMENT contrib %ho; (%docinfo.char.mix;)*>
+<!--end of contrib.element-->]]>
+
+<!ENTITY % contrib.attlist "INCLUDE">
+<![%contrib.attlist;[
+<!ATTLIST contrib
+		%common.attrib;
+		%contrib.role.attrib;
+		%local.contrib.attrib;
+>
+<!--end of contrib.attlist-->]]>
+  <!--end of contrib.module-->]]>
+
+  <!ENTITY % firstname.module "INCLUDE">
+  <![%firstname.module;[
+  <!ENTITY % local.firstname.attrib "">
+  <!ENTITY % firstname.role.attrib "%role.attrib;">
+
+<!ENTITY % firstname.element "INCLUDE">
+<![%firstname.element;[
+<!ELEMENT firstname %ho; (%docinfo.char.mix;)*>
+<!--end of firstname.element-->]]>
+
+<!ENTITY % firstname.attlist "INCLUDE">
+<![%firstname.attlist;[
+<!ATTLIST firstname
+		%common.attrib;
+		%firstname.role.attrib;
+		%local.firstname.attrib;
+>
+<!--end of firstname.attlist-->]]>
+  <!--end of firstname.module-->]]>
+
+  <!ENTITY % honorific.module "INCLUDE">
+  <![%honorific.module;[
+  <!ENTITY % local.honorific.attrib "">
+  <!ENTITY % honorific.role.attrib "%role.attrib;">
+
+<!ENTITY % honorific.element "INCLUDE">
+<![%honorific.element;[
+<!ELEMENT honorific %ho; (%docinfo.char.mix;)*>
+<!--end of honorific.element-->]]>
+
+<!ENTITY % honorific.attlist "INCLUDE">
+<![%honorific.attlist;[
+<!ATTLIST honorific
+		%common.attrib;
+		%honorific.role.attrib;
+		%local.honorific.attrib;
+>
+<!--end of honorific.attlist-->]]>
+  <!--end of honorific.module-->]]>
+
+  <!ENTITY % lineage.module "INCLUDE">
+  <![%lineage.module;[
+  <!ENTITY % local.lineage.attrib "">
+  <!ENTITY % lineage.role.attrib "%role.attrib;">
+
+<!ENTITY % lineage.element "INCLUDE">
+<![%lineage.element;[
+<!ELEMENT lineage %ho; (%docinfo.char.mix;)*>
+<!--end of lineage.element-->]]>
+
+<!ENTITY % lineage.attlist "INCLUDE">
+<![%lineage.attlist;[
+<!ATTLIST lineage
+		%common.attrib;
+		%lineage.role.attrib;
+		%local.lineage.attrib;
+>
+<!--end of lineage.attlist-->]]>
+  <!--end of lineage.module-->]]>
+
+  <!ENTITY % othername.module "INCLUDE">
+  <![%othername.module;[
+  <!ENTITY % local.othername.attrib "">
+  <!ENTITY % othername.role.attrib "%role.attrib;">
+
+<!ENTITY % othername.element "INCLUDE">
+<![%othername.element;[
+<!ELEMENT othername %ho; (%docinfo.char.mix;)*>
+<!--end of othername.element-->]]>
+
+<!ENTITY % othername.attlist "INCLUDE">
+<![%othername.attlist;[
+<!ATTLIST othername
+		%common.attrib;
+		%othername.role.attrib;
+		%local.othername.attrib;
+>
+<!--end of othername.attlist-->]]>
+  <!--end of othername.module-->]]>
+
+  <!ENTITY % surname.module "INCLUDE">
+  <![%surname.module;[
+  <!ENTITY % local.surname.attrib "">
+  <!ENTITY % surname.role.attrib "%role.attrib;">
+
+<!ENTITY % surname.element "INCLUDE">
+<![%surname.element;[
+<!ELEMENT surname %ho; (%docinfo.char.mix;)*>
+<!--end of surname.element-->]]>
+
+<!ENTITY % surname.attlist "INCLUDE">
+<![%surname.attlist;[
+<!ATTLIST surname
+		%common.attrib;
+		%surname.role.attrib;
+		%local.surname.attrib;
+>
+<!--end of surname.attlist-->]]>
+  <!--end of surname.module-->]]>
+<!--end of person.ident.module-->]]>
+
+<!-- PrintHistory ..................... -->
+
+<!ENTITY % printhistory.module "INCLUDE">
+<![%printhistory.module;[
+<!ENTITY % local.printhistory.attrib "">
+<!ENTITY % printhistory.role.attrib "%role.attrib;">
+
+<!ENTITY % printhistory.element "INCLUDE">
+<![%printhistory.element;[
+<!ELEMENT printhistory %ho; ((%para.class;)+)>
+<!--end of printhistory.element-->]]>
+
+<!ENTITY % printhistory.attlist "INCLUDE">
+<![%printhistory.attlist;[
+<!ATTLIST printhistory
+		%common.attrib;
+		%printhistory.role.attrib;
+		%local.printhistory.attrib;
+>
+<!--end of printhistory.attlist-->]]>
+<!--end of printhistory.module-->]]>
+
+<!-- ProductName ...................... -->
+
+<!ENTITY % productname.module "INCLUDE">
+<![%productname.module;[
+<!ENTITY % local.productname.attrib "">
+<!ENTITY % productname.role.attrib "%role.attrib;">
+
+<!ENTITY % productname.element "INCLUDE">
+<![%productname.element;[
+<!ELEMENT productname %ho; (%para.char.mix;)*>
+<!--end of productname.element-->]]>
+
+<!-- Class: More precisely identifies the item the element names -->
+
+
+<!ENTITY % productname.attlist "INCLUDE">
+<![%productname.attlist;[
+<!ATTLIST productname
+		class		(service
+				|trade
+				|registered
+				|copyright)	'trade'
+		%common.attrib;
+		%productname.role.attrib;
+		%local.productname.attrib;
+>
+<!--end of productname.attlist-->]]>
+<!--end of productname.module-->]]>
+
+<!-- ProductNumber .................... -->
+
+<!ENTITY % productnumber.module "INCLUDE">
+<![%productnumber.module;[
+<!ENTITY % local.productnumber.attrib "">
+<!ENTITY % productnumber.role.attrib "%role.attrib;">
+
+<!ENTITY % productnumber.element "INCLUDE">
+<![%productnumber.element;[
+<!ELEMENT productnumber %ho; (%docinfo.char.mix;)*>
+<!--end of productnumber.element-->]]>
+
+<!ENTITY % productnumber.attlist "INCLUDE">
+<![%productnumber.attlist;[
+<!ATTLIST productnumber
+		%common.attrib;
+		%productnumber.role.attrib;
+		%local.productnumber.attrib;
+>
+<!--end of productnumber.attlist-->]]>
+<!--end of productnumber.module-->]]>
+
+<!-- PubDate .......................... -->
+
+<!ENTITY % pubdate.module "INCLUDE">
+<![%pubdate.module;[
+<!ENTITY % local.pubdate.attrib "">
+<!ENTITY % pubdate.role.attrib "%role.attrib;">
+
+<!ENTITY % pubdate.element "INCLUDE">
+<![%pubdate.element;[
+<!ELEMENT pubdate %ho; (%docinfo.char.mix;)*>
+<!--end of pubdate.element-->]]>
+
+<!ENTITY % pubdate.attlist "INCLUDE">
+<![%pubdate.attlist;[
+<!ATTLIST pubdate
+		%common.attrib;
+		%pubdate.role.attrib;
+		%local.pubdate.attrib;
+>
+<!--end of pubdate.attlist-->]]>
+<!--end of pubdate.module-->]]>
+
+<!-- Publisher ........................ -->
+
+<!ENTITY % publisher.content.module "INCLUDE">
+<![%publisher.content.module;[
+<!ENTITY % publisher.module "INCLUDE">
+<![%publisher.module;[
+<!ENTITY % local.publisher.attrib "">
+<!ENTITY % publisher.role.attrib "%role.attrib;">
+
+<!ENTITY % publisher.element "INCLUDE">
+<![%publisher.element;[
+<!ELEMENT publisher %ho; (publishername, address*)>
+<!--end of publisher.element-->]]>
+
+<!ENTITY % publisher.attlist "INCLUDE">
+<![%publisher.attlist;[
+<!ATTLIST publisher
+		%common.attrib;
+		%publisher.role.attrib;
+		%local.publisher.attrib;
+>
+<!--end of publisher.attlist-->]]>
+<!--end of publisher.module-->]]>
+
+  <!ENTITY % publishername.module "INCLUDE">
+  <![%publishername.module;[
+  <!ENTITY % local.publishername.attrib "">
+  <!ENTITY % publishername.role.attrib "%role.attrib;">
+
+<!ENTITY % publishername.element "INCLUDE">
+<![%publishername.element;[
+<!ELEMENT publishername %ho; (%docinfo.char.mix;)*>
+<!--end of publishername.element-->]]>
+
+<!ENTITY % publishername.attlist "INCLUDE">
+<![%publishername.attlist;[
+<!ATTLIST publishername
+		%common.attrib;
+		%publishername.role.attrib;
+		%local.publishername.attrib;
+>
+<!--end of publishername.attlist-->]]>
+  <!--end of publishername.module-->]]>
+
+  <!-- Address (defined elsewhere in this section)-->
+<!--end of publisher.content.module-->]]>
+
+<!-- PubsNumber ....................... -->
+
+<!ENTITY % pubsnumber.module "INCLUDE">
+<![%pubsnumber.module;[
+<!ENTITY % local.pubsnumber.attrib "">
+<!ENTITY % pubsnumber.role.attrib "%role.attrib;">
+
+<!ENTITY % pubsnumber.element "INCLUDE">
+<![%pubsnumber.element;[
+<!ELEMENT pubsnumber %ho; (%docinfo.char.mix;)*>
+<!--end of pubsnumber.element-->]]>
+
+<!ENTITY % pubsnumber.attlist "INCLUDE">
+<![%pubsnumber.attlist;[
+<!ATTLIST pubsnumber
+		%common.attrib;
+		%pubsnumber.role.attrib;
+		%local.pubsnumber.attrib;
+>
+<!--end of pubsnumber.attlist-->]]>
+<!--end of pubsnumber.module-->]]>
+
+<!-- ReleaseInfo ...................... -->
+
+<!ENTITY % releaseinfo.module "INCLUDE">
+<![%releaseinfo.module;[
+<!ENTITY % local.releaseinfo.attrib "">
+<!ENTITY % releaseinfo.role.attrib "%role.attrib;">
+
+<!ENTITY % releaseinfo.element "INCLUDE">
+<![%releaseinfo.element;[
+<!ELEMENT releaseinfo %ho; (%docinfo.char.mix;)*>
+<!--end of releaseinfo.element-->]]>
+
+<!ENTITY % releaseinfo.attlist "INCLUDE">
+<![%releaseinfo.attlist;[
+<!ATTLIST releaseinfo
+		%common.attrib;
+		%releaseinfo.role.attrib;
+		%local.releaseinfo.attrib;
+>
+<!--end of releaseinfo.attlist-->]]>
+<!--end of releaseinfo.module-->]]>
+
+<!-- RevHistory ....................... -->
+
+<!ENTITY % revhistory.content.module "INCLUDE">
+<![%revhistory.content.module;[
+<!ENTITY % revhistory.module "INCLUDE">
+<![%revhistory.module;[
+<!ENTITY % local.revhistory.attrib "">
+<!ENTITY % revhistory.role.attrib "%role.attrib;">
+
+<!ENTITY % revhistory.element "INCLUDE">
+<![%revhistory.element;[
+<!ELEMENT revhistory %ho; (revision+)>
+<!--end of revhistory.element-->]]>
+
+<!ENTITY % revhistory.attlist "INCLUDE">
+<![%revhistory.attlist;[
+<!ATTLIST revhistory
+		%common.attrib;
+		%revhistory.role.attrib;
+		%local.revhistory.attrib;
+>
+<!--end of revhistory.attlist-->]]>
+<!--end of revhistory.module-->]]>
+
+<!ENTITY % revision.module "INCLUDE">
+<![%revision.module;[
+<!ENTITY % local.revision.attrib "">
+<!ENTITY % revision.role.attrib "%role.attrib;">
+
+<!ENTITY % revision.element "INCLUDE">
+<![%revision.element;[
+<!ELEMENT revision %ho; (revnumber, date, (author|authorinitials)*,
+                    (revremark|revdescription)?)>
+<!--end of revision.element-->]]>
+
+<!ENTITY % revision.attlist "INCLUDE">
+<![%revision.attlist;[
+<!ATTLIST revision
+		%common.attrib;
+		%revision.role.attrib;
+		%local.revision.attrib;
+>
+<!--end of revision.attlist-->]]>
+<!--end of revision.module-->]]>
+
+<!ENTITY % revnumber.module "INCLUDE">
+<![%revnumber.module;[
+<!ENTITY % local.revnumber.attrib "">
+<!ENTITY % revnumber.role.attrib "%role.attrib;">
+
+<!ENTITY % revnumber.element "INCLUDE">
+<![%revnumber.element;[
+<!ELEMENT revnumber %ho; (%docinfo.char.mix;)*>
+<!--end of revnumber.element-->]]>
+
+<!ENTITY % revnumber.attlist "INCLUDE">
+<![%revnumber.attlist;[
+<!ATTLIST revnumber
+		%common.attrib;
+		%revnumber.role.attrib;
+		%local.revnumber.attrib;
+>
+<!--end of revnumber.attlist-->]]>
+<!--end of revnumber.module-->]]>
+
+<!-- Date (defined elsewhere in this section)-->
+<!-- AuthorInitials (defined elsewhere in this section)-->
+
+<!ENTITY % revremark.module "INCLUDE">
+<![%revremark.module;[
+<!ENTITY % local.revremark.attrib "">
+<!ENTITY % revremark.role.attrib "%role.attrib;">
+
+<!ENTITY % revremark.element "INCLUDE">
+<![%revremark.element;[
+<!ELEMENT revremark %ho; (%docinfo.char.mix;)*>
+<!--end of revremark.element-->]]>
+
+<!ENTITY % revremark.attlist "INCLUDE">
+<![%revremark.attlist;[
+<!ATTLIST revremark
+		%common.attrib;
+		%revremark.role.attrib;
+		%local.revremark.attrib;
+>
+<!--end of revremark.attlist-->]]>
+<!--end of revremark.module-->]]>
+
+<!ENTITY % revdescription.module "INCLUDE">
+<![ %revdescription.module; [
+<!ENTITY % local.revdescription.attrib "">
+<!ENTITY % revdescription.role.attrib "%role.attrib;">
+
+<!ENTITY % revdescription.element "INCLUDE">
+<![ %revdescription.element; [
+<!ELEMENT revdescription %ho; ((%revdescription.mix;)+)>
+<!--end of revdescription.element-->]]>
+
+<!ENTITY % revdescription.attlist "INCLUDE">
+<![ %revdescription.attlist; [
+<!ATTLIST revdescription
+		%common.attrib;
+		%revdescription.role.attrib;
+		%local.revdescription.attrib;
+>
+<!--end of revdescription.attlist-->]]>
+<!--end of revdescription.module-->]]>
+<!--end of revhistory.content.module-->]]>
+
+<!-- SeriesVolNums .................... -->
+
+<!ENTITY % seriesvolnums.module "INCLUDE">
+<![%seriesvolnums.module;[
+<!ENTITY % local.seriesvolnums.attrib "">
+<!ENTITY % seriesvolnums.role.attrib "%role.attrib;">
+
+<!ENTITY % seriesvolnums.element "INCLUDE">
+<![%seriesvolnums.element;[
+<!ELEMENT seriesvolnums %ho; (%docinfo.char.mix;)*>
+<!--end of seriesvolnums.element-->]]>
+
+<!ENTITY % seriesvolnums.attlist "INCLUDE">
+<![%seriesvolnums.attlist;[
+<!ATTLIST seriesvolnums
+		%common.attrib;
+		%seriesvolnums.role.attrib;
+		%local.seriesvolnums.attrib;
+>
+<!--end of seriesvolnums.attlist-->]]>
+<!--end of seriesvolnums.module-->]]>
+
+<!-- VolumeNum ........................ -->
+
+<!ENTITY % volumenum.module "INCLUDE">
+<![%volumenum.module;[
+<!ENTITY % local.volumenum.attrib "">
+<!ENTITY % volumenum.role.attrib "%role.attrib;">
+
+<!ENTITY % volumenum.element "INCLUDE">
+<![%volumenum.element;[
+<!ELEMENT volumenum %ho; (%docinfo.char.mix;)*>
+<!--end of volumenum.element-->]]>
+
+<!ENTITY % volumenum.attlist "INCLUDE">
+<![%volumenum.attlist;[
+<!ATTLIST volumenum
+		%common.attrib;
+		%volumenum.role.attrib;
+		%local.volumenum.attrib;
+>
+<!--end of volumenum.attlist-->]]>
+<!--end of volumenum.module-->]]>
+
+<!-- .................................. -->
+
+<!--end of docinfo.content.module-->]]>
+
+<!-- ...................................................................... -->
+<!-- Inline, link, and ubiquitous elements ................................ -->
+
+<!-- Technical and computer terms ......................................... -->
+
+<!ENTITY % accel.module "INCLUDE">
+<![%accel.module;[
+<!ENTITY % local.accel.attrib "">
+<!ENTITY % accel.role.attrib "%role.attrib;">
+
+<!ENTITY % accel.element "INCLUDE">
+<![%accel.element;[
+<!ELEMENT accel %ho; (%smallcptr.char.mix;)*>
+<!--end of accel.element-->]]>
+
+<!ENTITY % accel.attlist "INCLUDE">
+<![%accel.attlist;[
+<!ATTLIST accel
+		%common.attrib;
+		%accel.role.attrib;
+		%local.accel.attrib;
+>
+<!--end of accel.attlist-->]]>
+<!--end of accel.module-->]]>
+
+<!ENTITY % action.module "INCLUDE">
+<![%action.module;[
+<!ENTITY % local.action.attrib "">
+<!ENTITY % action.role.attrib "%role.attrib;">
+
+<!ENTITY % action.element "INCLUDE">
+<![%action.element;[
+<!ELEMENT action %ho; (%cptr.char.mix;)*>
+<!--end of action.element-->]]>
+
+<!ENTITY % action.attlist "INCLUDE">
+<![%action.attlist;[
+<!ATTLIST action
+		%moreinfo.attrib;
+		%common.attrib;
+		%action.role.attrib;
+		%local.action.attrib;
+>
+<!--end of action.attlist-->]]>
+<!--end of action.module-->]]>
+
+<!ENTITY % application.module "INCLUDE">
+<![%application.module;[
+<!ENTITY % local.application.attrib "">
+<!ENTITY % application.role.attrib "%role.attrib;">
+
+<!ENTITY % application.element "INCLUDE">
+<![%application.element;[
+<!ELEMENT application %ho; (%para.char.mix;)*>
+<!--end of application.element-->]]>
+
+<!ENTITY % application.attlist "INCLUDE">
+<![%application.attlist;[
+<!ATTLIST application
+		class 		(hardware
+				|software)	#IMPLIED
+		%moreinfo.attrib;
+		%common.attrib;
+		%application.role.attrib;
+		%local.application.attrib;
+>
+<!--end of application.attlist-->]]>
+<!--end of application.module-->]]>
+
+<!ENTITY % classname.module "INCLUDE">
+<![%classname.module;[
+<!ENTITY % local.classname.attrib "">
+<!ENTITY % classname.role.attrib "%role.attrib;">
+
+<!ENTITY % classname.element "INCLUDE">
+<![%classname.element;[
+<!ELEMENT classname %ho; (%smallcptr.char.mix;)*>
+<!--end of classname.element-->]]>
+
+<!ENTITY % classname.attlist "INCLUDE">
+<![%classname.attlist;[
+<!ATTLIST classname
+		%common.attrib;
+		%classname.role.attrib;
+		%local.classname.attrib;
+>
+<!--end of classname.attlist-->]]>
+<!--end of classname.module-->]]>
+
+<!ENTITY % co.module "INCLUDE">
+<![%co.module;[
+<!ENTITY % local.co.attrib "">
+<!-- CO is a callout area of the LineColumn unit type (a single character
+     position); the position is directly indicated by the location of CO. -->
+<!ENTITY % co.role.attrib "%role.attrib;">
+
+<!ENTITY % co.element "INCLUDE">
+<![%co.element;[
+<!ELEMENT co %ho; EMPTY>
+<!--end of co.element-->]]>
+
+<!-- bug number/symbol override or initialization -->
+<!-- to any related information -->
+
+
+<!ENTITY % co.attlist "INCLUDE">
+<![%co.attlist;[
+<!ATTLIST co
+		%label.attrib;
+		%linkends.attrib;
+		%idreq.common.attrib;
+		%co.role.attrib;
+		%local.co.attrib;
+>
+<!--end of co.attlist-->]]>
+<!--end of co.module-->]]>
+
+<!ENTITY % coref.module "INCLUDE">
+<![%coref.module;[
+<!ENTITY % local.coref.attrib "">
+<!-- COREF is a reference to a CO -->
+<!ENTITY % coref.role.attrib "%role.attrib;">
+
+<!ENTITY % coref.element "INCLUDE">
+<![%coref.element;[
+<!ELEMENT coref %ho; EMPTY>
+<!--end of coref.element-->]]>
+
+<!-- bug number/symbol override or initialization -->
+<!-- to any related information -->
+
+<!ENTITY % coref.attlist "INCLUDE">
+<![%coref.attlist;[
+<!ATTLIST coref
+		%label.attrib;
+		%linkendreq.attrib;
+		%common.attrib;
+		%coref.role.attrib;
+		%local.coref.attrib;
+>
+<!--end of coref.attlist-->]]>
+<!--end of coref.module-->]]>
+
+<!ENTITY % command.module "INCLUDE">
+<![%command.module;[
+<!ENTITY % local.command.attrib "">
+<!ENTITY % command.role.attrib "%role.attrib;">
+
+<!ENTITY % command.element "INCLUDE">
+<![%command.element;[
+<!ELEMENT command %ho; (%cptr.char.mix;)*>
+<!--end of command.element-->]]>
+
+<!ENTITY % command.attlist "INCLUDE">
+<![%command.attlist;[
+<!ATTLIST command
+		%moreinfo.attrib;
+		%common.attrib;
+		%command.role.attrib;
+		%local.command.attrib;
+>
+<!--end of command.attlist-->]]>
+<!--end of command.module-->]]>
+
+<!ENTITY % computeroutput.module "INCLUDE">
+<![%computeroutput.module;[
+<!ENTITY % local.computeroutput.attrib "">
+<!ENTITY % computeroutput.role.attrib "%role.attrib;">
+
+<!ENTITY % computeroutput.element "INCLUDE">
+<![%computeroutput.element;[
+<!ELEMENT computeroutput %ho; (%cptr.char.mix;|co)*>
+<!--end of computeroutput.element-->]]>
+
+<!ENTITY % computeroutput.attlist "INCLUDE">
+<![%computeroutput.attlist;[
+<!ATTLIST computeroutput
+		%moreinfo.attrib;
+		%common.attrib;
+		%computeroutput.role.attrib;
+		%local.computeroutput.attrib;
+>
+<!--end of computeroutput.attlist-->]]>
+<!--end of computeroutput.module-->]]>
+
+<!ENTITY % database.module "INCLUDE">
+<![%database.module;[
+<!ENTITY % local.database.attrib "">
+<!ENTITY % database.role.attrib "%role.attrib;">
+
+<!ENTITY % database.element "INCLUDE">
+<![%database.element;[
+<!ELEMENT database %ho; (%cptr.char.mix;)*>
+<!--end of database.element-->]]>
+
+<!-- Class: Type of database the element names; no default -->
+
+
+<!ENTITY % database.attlist "INCLUDE">
+<![%database.attlist;[
+<!ATTLIST database
+		class 		(name
+				|table
+				|field
+				|key1
+				|key2
+				|record
+                                |index
+                                |view
+                                |primarykey
+                                |secondarykey
+                                |foreignkey
+                                |altkey
+                                |procedure
+                                |datatype
+                                |constraint
+                                |rule
+                                |user
+                                |group)	#IMPLIED
+		%moreinfo.attrib;
+		%common.attrib;
+		%database.role.attrib;
+		%local.database.attrib;
+>
+<!--end of database.attlist-->]]>
+<!--end of database.module-->]]>
+
+<!ENTITY % email.module "INCLUDE">
+<![%email.module;[
+<!ENTITY % local.email.attrib "">
+<!ENTITY % email.role.attrib "%role.attrib;">
+
+<!ENTITY % email.element "INCLUDE">
+<![%email.element;[
+<!ELEMENT email %ho; (%docinfo.char.mix;)*>
+<!--end of email.element-->]]>
+
+<!ENTITY % email.attlist "INCLUDE">
+<![%email.attlist;[
+<!ATTLIST email
+		%common.attrib;
+		%email.role.attrib;
+		%local.email.attrib;
+>
+<!--end of email.attlist-->]]>
+<!--end of email.module-->]]>
+
+<!ENTITY % envar.module "INCLUDE">
+<![%envar.module;[
+<!ENTITY % local.envar.attrib "">
+<!ENTITY % envar.role.attrib "%role.attrib;">
+
+<!ENTITY % envar.element "INCLUDE">
+<![%envar.element;[
+<!ELEMENT envar %ho; (%smallcptr.char.mix;)*>
+<!--end of envar.element-->]]>
+
+<!ENTITY % envar.attlist "INCLUDE">
+<![%envar.attlist;[
+<!ATTLIST envar
+		%common.attrib;
+		%envar.role.attrib;
+		%local.envar.attrib;
+>
+<!--end of envar.attlist-->]]>
+<!--end of envar.module-->]]>
+
+
+<!ENTITY % errorcode.module "INCLUDE">
+<![%errorcode.module;[
+<!ENTITY % local.errorcode.attrib "">
+<!ENTITY % errorcode.role.attrib "%role.attrib;">
+
+<!ENTITY % errorcode.element "INCLUDE">
+<![%errorcode.element;[
+<!ELEMENT errorcode %ho; (%smallcptr.char.mix;)*>
+<!--end of errorcode.element-->]]>
+
+<!ENTITY % errorcode.attlist "INCLUDE">
+<![%errorcode.attlist;[
+<!ATTLIST errorcode
+		%moreinfo.attrib;
+		%common.attrib;
+		%errorcode.role.attrib;
+		%local.errorcode.attrib;
+>
+<!--end of errorcode.attlist-->]]>
+<!--end of errorcode.module-->]]>
+
+<!ENTITY % errorname.module "INCLUDE">
+<![%errorname.module;[
+<!ENTITY % local.errorname.attrib "">
+<!ENTITY % errorname.role.attrib "%role.attrib;">
+
+<!ENTITY % errorname.element "INCLUDE">
+<![%errorname.element;[
+<!ELEMENT errorname %ho; (%smallcptr.char.mix;)*>
+<!--end of errorname.element-->]]>
+
+<!ENTITY % errorname.attlist "INCLUDE">
+<![%errorname.attlist;[
+<!ATTLIST errorname
+		%common.attrib;
+		%errorname.role.attrib;
+		%local.errorname.attrib;
+>
+<!--end of errorname.attlist-->]]>
+<!--end of errorname.module-->]]>
+
+<!ENTITY % errortext.module "INCLUDE">
+<![%errortext.module;[
+<!ENTITY % local.errortext.attrib "">
+<!ENTITY % errortext.role.attrib "%role.attrib;">
+
+<!ENTITY % errortext.element "INCLUDE">
+<![%errortext.element;[
+<!ELEMENT errortext %ho; (%smallcptr.char.mix;)*>
+<!--end of errortext.element-->]]>
+
+<!ENTITY % errortext.attlist "INCLUDE">
+<![%errortext.attlist;[
+<!ATTLIST errortext
+		%common.attrib;
+		%errortext.role.attrib;
+		%local.errortext.attrib;
+>
+<!--end of errortext.attlist-->]]>
+<!--end of errortext.module-->]]>
+
+<!ENTITY % errortype.module "INCLUDE">
+<![%errortype.module;[
+<!ENTITY % local.errortype.attrib "">
+<!ENTITY % errortype.role.attrib "%role.attrib;">
+
+<!ENTITY % errortype.element "INCLUDE">
+<![%errortype.element;[
+<!ELEMENT errortype %ho; (%smallcptr.char.mix;)*>
+<!--end of errortype.element-->]]>
+
+<!ENTITY % errortype.attlist "INCLUDE">
+<![%errortype.attlist;[
+<!ATTLIST errortype
+		%common.attrib;
+		%errortype.role.attrib;
+		%local.errortype.attrib;
+>
+<!--end of errortype.attlist-->]]>
+<!--end of errortype.module-->]]>
+
+<!ENTITY % filename.module "INCLUDE">
+<![%filename.module;[
+<!ENTITY % local.filename.attrib "">
+<!ENTITY % filename.role.attrib "%role.attrib;">
+
+<!ENTITY % filename.element "INCLUDE">
+<![%filename.element;[
+<!ELEMENT filename %ho; (%cptr.char.mix;)*>
+<!--end of filename.element-->]]>
+
+<!-- Class: Type of filename the element names; no default -->
+<!-- Path: Search path (possibly system-specific) in which
+		file can be found -->
+
+
+<!ENTITY % filename.attlist "INCLUDE">
+<![%filename.attlist;[
+<!ATTLIST filename
+		class		(headerfile
+                                |partition
+                                |devicefile
+                                |libraryfile
+                                |directory
+                                |extension
+				|symlink)       #IMPLIED
+		path		CDATA		#IMPLIED
+		%moreinfo.attrib;
+		%common.attrib;
+		%filename.role.attrib;
+		%local.filename.attrib;
+>
+<!--end of filename.attlist-->]]>
+<!--end of filename.module-->]]>
+
+<!ENTITY % function.module "INCLUDE">
+<![%function.module;[
+<!ENTITY % local.function.attrib "">
+<!ENTITY % function.role.attrib "%role.attrib;">
+
+<!ENTITY % function.element "INCLUDE">
+<![%function.element;[
+<!ELEMENT function %ho; (%cptr.char.mix;)*>
+<!--end of function.element-->]]>
+
+<!ENTITY % function.attlist "INCLUDE">
+<![%function.attlist;[
+<!ATTLIST function
+		%moreinfo.attrib;
+		%common.attrib;
+		%function.role.attrib;
+		%local.function.attrib;
+>
+<!--end of function.attlist-->]]>
+<!--end of function.module-->]]>
+
+<!ENTITY % guibutton.module "INCLUDE">
+<![%guibutton.module;[
+<!ENTITY % local.guibutton.attrib "">
+<!ENTITY % guibutton.role.attrib "%role.attrib;">
+
+<!ENTITY % guibutton.element "INCLUDE">
+<![%guibutton.element;[
+<!ELEMENT guibutton %ho; (%smallcptr.char.mix;|accel)*>
+<!--end of guibutton.element-->]]>
+
+<!ENTITY % guibutton.attlist "INCLUDE">
+<![%guibutton.attlist;[
+<!ATTLIST guibutton
+		%moreinfo.attrib;
+		%common.attrib;
+		%guibutton.role.attrib;
+		%local.guibutton.attrib;
+>
+<!--end of guibutton.attlist-->]]>
+<!--end of guibutton.module-->]]>
+
+<!ENTITY % guiicon.module "INCLUDE">
+<![%guiicon.module;[
+<!ENTITY % local.guiicon.attrib "">
+<!ENTITY % guiicon.role.attrib "%role.attrib;">
+
+<!ENTITY % guiicon.element "INCLUDE">
+<![%guiicon.element;[
+<!ELEMENT guiicon %ho; (%smallcptr.char.mix;|accel)*>
+<!--end of guiicon.element-->]]>
+
+<!ENTITY % guiicon.attlist "INCLUDE">
+<![%guiicon.attlist;[
+<!ATTLIST guiicon
+		%moreinfo.attrib;
+		%common.attrib;
+		%guiicon.role.attrib;
+		%local.guiicon.attrib;
+>
+<!--end of guiicon.attlist-->]]>
+<!--end of guiicon.module-->]]>
+
+<!ENTITY % guilabel.module "INCLUDE">
+<![%guilabel.module;[
+<!ENTITY % local.guilabel.attrib "">
+<!ENTITY % guilabel.role.attrib "%role.attrib;">
+
+<!ENTITY % guilabel.element "INCLUDE">
+<![%guilabel.element;[
+<!ELEMENT guilabel %ho; (%smallcptr.char.mix;|accel)*>
+<!--end of guilabel.element-->]]>
+
+<!ENTITY % guilabel.attlist "INCLUDE">
+<![%guilabel.attlist;[
+<!ATTLIST guilabel
+		%moreinfo.attrib;
+		%common.attrib;
+		%guilabel.role.attrib;
+		%local.guilabel.attrib;
+>
+<!--end of guilabel.attlist-->]]>
+<!--end of guilabel.module-->]]>
+
+<!ENTITY % guimenu.module "INCLUDE">
+<![%guimenu.module;[
+<!ENTITY % local.guimenu.attrib "">
+<!ENTITY % guimenu.role.attrib "%role.attrib;">
+
+<!ENTITY % guimenu.element "INCLUDE">
+<![%guimenu.element;[
+<!ELEMENT guimenu %ho; (%smallcptr.char.mix;|accel)*>
+<!--end of guimenu.element-->]]>
+
+<!ENTITY % guimenu.attlist "INCLUDE">
+<![%guimenu.attlist;[
+<!ATTLIST guimenu
+		%moreinfo.attrib;
+		%common.attrib;
+		%guimenu.role.attrib;
+		%local.guimenu.attrib;
+>
+<!--end of guimenu.attlist-->]]>
+<!--end of guimenu.module-->]]>
+
+<!ENTITY % guimenuitem.module "INCLUDE">
+<![%guimenuitem.module;[
+<!ENTITY % local.guimenuitem.attrib "">
+<!ENTITY % guimenuitem.role.attrib "%role.attrib;">
+
+<!ENTITY % guimenuitem.element "INCLUDE">
+<![%guimenuitem.element;[
+<!ELEMENT guimenuitem %ho; (%smallcptr.char.mix;|accel)*>
+<!--end of guimenuitem.element-->]]>
+
+<!ENTITY % guimenuitem.attlist "INCLUDE">
+<![%guimenuitem.attlist;[
+<!ATTLIST guimenuitem
+		%moreinfo.attrib;
+		%common.attrib;
+		%guimenuitem.role.attrib;
+		%local.guimenuitem.attrib;
+>
+<!--end of guimenuitem.attlist-->]]>
+<!--end of guimenuitem.module-->]]>
+
+<!ENTITY % guisubmenu.module "INCLUDE">
+<![%guisubmenu.module;[
+<!ENTITY % local.guisubmenu.attrib "">
+<!ENTITY % guisubmenu.role.attrib "%role.attrib;">
+
+<!ENTITY % guisubmenu.element "INCLUDE">
+<![%guisubmenu.element;[
+<!ELEMENT guisubmenu %ho; (%smallcptr.char.mix;|accel)*>
+<!--end of guisubmenu.element-->]]>
+
+<!ENTITY % guisubmenu.attlist "INCLUDE">
+<![%guisubmenu.attlist;[
+<!ATTLIST guisubmenu
+		%moreinfo.attrib;
+		%common.attrib;
+		%guisubmenu.role.attrib;
+		%local.guisubmenu.attrib;
+>
+<!--end of guisubmenu.attlist-->]]>
+<!--end of guisubmenu.module-->]]>
+
+<!ENTITY % hardware.module "INCLUDE">
+<![%hardware.module;[
+<!ENTITY % local.hardware.attrib "">
+<!ENTITY % hardware.role.attrib "%role.attrib;">
+
+<!ENTITY % hardware.element "INCLUDE">
+<![%hardware.element;[
+<!ELEMENT hardware %ho; (%cptr.char.mix;)*>
+<!--end of hardware.element-->]]>
+
+<!ENTITY % hardware.attlist "INCLUDE">
+<![%hardware.attlist;[
+<!ATTLIST hardware
+		%moreinfo.attrib;
+		%common.attrib;
+		%hardware.role.attrib;
+		%local.hardware.attrib;
+>
+<!--end of hardware.attlist-->]]>
+<!--end of hardware.module-->]]>
+
+<!ENTITY % interface.module "INCLUDE">
+<![%interface.module;[
+<!ENTITY % local.interface.attrib "">
+<!ENTITY % interface.role.attrib "%role.attrib;">
+
+<!ENTITY % interface.element "INCLUDE">
+<![%interface.element;[
+<!ELEMENT interface %ho; (%smallcptr.char.mix;|accel)*>
+<!--end of interface.element-->]]>
+
+<!-- Class: Type of the Interface item; no default -->
+
+
+<!ENTITY % interface.attlist "INCLUDE">
+<![%interface.attlist;[
+<!ATTLIST interface
+		%moreinfo.attrib;
+		%common.attrib;
+		%interface.role.attrib;
+		%local.interface.attrib;
+>
+<!--end of interface.attlist-->]]>
+<!--end of interface.module-->]]>
+
+<!ENTITY % keycap.module "INCLUDE">
+<![%keycap.module;[
+<!ENTITY % local.keycap.attrib "">
+<!ENTITY % keycap.role.attrib "%role.attrib;">
+
+<!ENTITY % keycap.element "INCLUDE">
+<![%keycap.element;[
+<!ELEMENT keycap %ho; (%cptr.char.mix;)*>
+<!--end of keycap.element-->]]>
+
+<!ENTITY % keycap.attlist "INCLUDE">
+<![%keycap.attlist;[
+<!ATTLIST keycap
+		function	(alt
+				|control
+				|shift
+				|meta
+				|escape
+				|enter
+				|tab
+				|backspace
+				|command
+				|option
+				|space
+				|delete
+				|insert
+				|up
+				|down
+				|left
+				|right
+				|home
+				|end
+				|pageup
+				|pagedown
+				|other)		#IMPLIED
+		otherfunction	CDATA		#IMPLIED
+		%moreinfo.attrib;
+		%common.attrib;
+		%keycap.role.attrib;
+		%local.keycap.attrib;
+>
+<!--end of keycap.attlist-->]]>
+<!--end of keycap.module-->]]>
+
+<!ENTITY % keycode.module "INCLUDE">
+<![%keycode.module;[
+<!ENTITY % local.keycode.attrib "">
+<!ENTITY % keycode.role.attrib "%role.attrib;">
+
+<!ENTITY % keycode.element "INCLUDE">
+<![%keycode.element;[
+<!ELEMENT keycode %ho; (%smallcptr.char.mix;)*>
+<!--end of keycode.element-->]]>
+
+<!ENTITY % keycode.attlist "INCLUDE">
+<![%keycode.attlist;[
+<!ATTLIST keycode
+		%common.attrib;
+		%keycode.role.attrib;
+		%local.keycode.attrib;
+>
+<!--end of keycode.attlist-->]]>
+<!--end of keycode.module-->]]>
+
+<!ENTITY % keycombo.module "INCLUDE">
+<![%keycombo.module;[
+<!ENTITY % local.keycombo.attrib "">
+<!ENTITY % keycombo.role.attrib "%role.attrib;">
+
+<!ENTITY % keycombo.element "INCLUDE">
+<![%keycombo.element;[
+<!ELEMENT keycombo %ho; ((keycap|keycombo|keysym|mousebutton)+)>
+<!--end of keycombo.element-->]]>
+
+<!ENTITY % keycombo.attlist "INCLUDE">
+<![%keycombo.attlist;[
+<!ATTLIST keycombo
+		%keyaction.attrib;
+		%moreinfo.attrib;
+		%common.attrib;
+		%keycombo.role.attrib;
+		%local.keycombo.attrib;
+>
+<!--end of keycombo.attlist-->]]>
+<!--end of keycombo.module-->]]>
+
+<!ENTITY % keysym.module "INCLUDE">
+<![%keysym.module;[
+<!ENTITY % local.keysym.attrib "">
+<!ENTITY % keysysm.role.attrib "%role.attrib;">
+
+<!ENTITY % keysym.element "INCLUDE">
+<![%keysym.element;[
+<!ELEMENT keysym %ho; (%smallcptr.char.mix;)*>
+<!--end of keysym.element-->]]>
+
+<!ENTITY % keysym.attlist "INCLUDE">
+<![%keysym.attlist;[
+<!ATTLIST keysym
+		%common.attrib;
+		%keysysm.role.attrib;
+		%local.keysym.attrib;
+>
+<!--end of keysym.attlist-->]]>
+<!--end of keysym.module-->]]>
+
+<!ENTITY % lineannotation.module "INCLUDE">
+<![%lineannotation.module;[
+<!ENTITY % local.lineannotation.attrib "">
+<!ENTITY % lineannotation.role.attrib "%role.attrib;">
+
+<!ENTITY % lineannotation.element "INCLUDE">
+<![%lineannotation.element;[
+<!ELEMENT lineannotation %ho; (%para.char.mix;)*>
+<!--end of lineannotation.element-->]]>
+
+<!ENTITY % lineannotation.attlist "INCLUDE">
+<![%lineannotation.attlist;[
+<!ATTLIST lineannotation
+		%common.attrib;
+		%lineannotation.role.attrib;
+		%local.lineannotation.attrib;
+>
+<!--end of lineannotation.attlist-->]]>
+<!--end of lineannotation.module-->]]>
+
+<!ENTITY % literal.module "INCLUDE">
+<![%literal.module;[
+<!ENTITY % local.literal.attrib "">
+<!ENTITY % literal.role.attrib "%role.attrib;">
+
+<!ENTITY % literal.element "INCLUDE">
+<![%literal.element;[
+<!ELEMENT literal %ho; (%cptr.char.mix;)*>
+<!--end of literal.element-->]]>
+
+<!ENTITY % literal.attlist "INCLUDE">
+<![%literal.attlist;[
+<!ATTLIST literal
+		%moreinfo.attrib;
+		%common.attrib;
+		%literal.role.attrib;
+		%local.literal.attrib;
+>
+<!--end of literal.attlist-->]]>
+<!--end of literal.module-->]]>
+
+<!ENTITY % code.module "INCLUDE">
+<![%code.module;[
+<!ENTITY % local.code.attrib "">
+<!ENTITY % code.role.attrib "%role.attrib;">
+
+<!ENTITY % code.element "INCLUDE">
+<![%code.element;[
+<!ELEMENT code %ho; (%cptr.char.mix;)*>
+<!--end of code.element-->]]>
+
+<!ENTITY % code.attlist "INCLUDE">
+<![%code.attlist;[
+<!ATTLIST code
+		language	CDATA	#IMPLIED
+		%common.attrib;
+		%code.role.attrib;
+		%local.code.attrib;
+>
+<!--end of code.attlist-->]]>
+<!--end of code.module-->]]>
+
+<!ENTITY % constant.module "INCLUDE">
+<![ %constant.module; [
+<!ENTITY % local.constant.attrib "">
+<!ENTITY % constant.role.attrib "%role.attrib;">
+
+<!ENTITY % constant.element "INCLUDE">
+<![ %constant.element; [
+<!ELEMENT constant %ho; (%smallcptr.char.mix;)*>
+<!--end of constant.element-->]]>
+
+<!ENTITY % constant.attlist "INCLUDE">
+<![ %constant.attlist; [
+<!ATTLIST constant
+		class	(limit)		#IMPLIED
+		%common.attrib;
+		%constant.role.attrib;
+		%local.constant.attrib;
+>
+<!--end of constant.attlist-->]]>
+<!--end of constant.module-->]]>
+
+<!ENTITY % varname.module "INCLUDE">
+<![ %varname.module; [
+<!ENTITY % local.varname.attrib "">
+<!ENTITY % varname.role.attrib "%role.attrib;">
+
+<!ENTITY % varname.element "INCLUDE">
+<![ %varname.element; [
+<!ELEMENT varname %ho; (%smallcptr.char.mix;)*>
+<!--end of varname.element-->]]>
+
+<!ENTITY % varname.attlist "INCLUDE">
+<![ %varname.attlist; [
+<!ATTLIST varname
+		%common.attrib;
+		%varname.role.attrib;
+		%local.varname.attrib;
+>
+<!--end of varname.attlist-->]]>
+<!--end of varname.module-->]]>
+
+<!ENTITY % markup.module "INCLUDE">
+<![%markup.module;[
+<!ENTITY % local.markup.attrib "">
+<!ENTITY % markup.role.attrib "%role.attrib;">
+
+<!ENTITY % markup.element "INCLUDE">
+<![%markup.element;[
+<!ELEMENT markup %ho; (%smallcptr.char.mix;)*>
+<!--end of markup.element-->]]>
+
+<!ENTITY % markup.attlist "INCLUDE">
+<![%markup.attlist;[
+<!ATTLIST markup
+		%common.attrib;
+		%markup.role.attrib;
+		%local.markup.attrib;
+>
+<!--end of markup.attlist-->]]>
+<!--end of markup.module-->]]>
+
+<!ENTITY % medialabel.module "INCLUDE">
+<![%medialabel.module;[
+<!ENTITY % local.medialabel.attrib "">
+<!ENTITY % medialabel.role.attrib "%role.attrib;">
+
+<!ENTITY % medialabel.element "INCLUDE">
+<![%medialabel.element;[
+<!ELEMENT medialabel %ho; (%smallcptr.char.mix;)*>
+<!--end of medialabel.element-->]]>
+
+<!-- Class: Type of medium named by the element; no default -->
+
+
+<!ENTITY % medialabel.attlist "INCLUDE">
+<![%medialabel.attlist;[
+<!ATTLIST medialabel
+		class 		(cartridge
+				|cdrom
+				|disk
+				|tape)		#IMPLIED
+		%common.attrib;
+		%medialabel.role.attrib;
+		%local.medialabel.attrib;
+>
+<!--end of medialabel.attlist-->]]>
+<!--end of medialabel.module-->]]>
+
+<!ENTITY % menuchoice.content.module "INCLUDE">
+<![%menuchoice.content.module;[
+<!ENTITY % menuchoice.module "INCLUDE">
+<![%menuchoice.module;[
+<!ENTITY % local.menuchoice.attrib "">
+<!ENTITY % menuchoice.role.attrib "%role.attrib;">
+
+<!ENTITY % menuchoice.element "INCLUDE">
+<![%menuchoice.element;[
+<!ELEMENT menuchoice %ho; (shortcut?, (guibutton|guiicon|guilabel
+		|guimenu|guimenuitem|guisubmenu|interface)+)>
+<!--end of menuchoice.element-->]]>
+
+<!ENTITY % menuchoice.attlist "INCLUDE">
+<![%menuchoice.attlist;[
+<!ATTLIST menuchoice
+		%moreinfo.attrib;
+		%common.attrib;
+		%menuchoice.role.attrib;
+		%local.menuchoice.attrib;
+>
+<!--end of menuchoice.attlist-->]]>
+<!--end of menuchoice.module-->]]>
+
+<!ENTITY % shortcut.module "INCLUDE">
+<![%shortcut.module;[
+<!-- See also KeyCombo -->
+<!ENTITY % local.shortcut.attrib "">
+<!ENTITY % shortcut.role.attrib "%role.attrib;">
+
+<!ENTITY % shortcut.element "INCLUDE">
+<![%shortcut.element;[
+<!ELEMENT shortcut %ho; ((keycap|keycombo|keysym|mousebutton)+)>
+<!--end of shortcut.element-->]]>
+
+<!ENTITY % shortcut.attlist "INCLUDE">
+<![%shortcut.attlist;[
+<!ATTLIST shortcut
+		%keyaction.attrib;
+		%moreinfo.attrib;
+		%common.attrib;
+		%shortcut.role.attrib;
+		%local.shortcut.attrib;
+>
+<!--end of shortcut.attlist-->]]>
+<!--end of shortcut.module-->]]>
+<!--end of menuchoice.content.module-->]]>
+
+<!ENTITY % mousebutton.module "INCLUDE">
+<![%mousebutton.module;[
+<!ENTITY % local.mousebutton.attrib "">
+<!ENTITY % mousebutton.role.attrib "%role.attrib;">
+
+<!ENTITY % mousebutton.element "INCLUDE">
+<![%mousebutton.element;[
+<!ELEMENT mousebutton %ho; (%smallcptr.char.mix;)*>
+<!--end of mousebutton.element-->]]>
+
+<!ENTITY % mousebutton.attlist "INCLUDE">
+<![%mousebutton.attlist;[
+<!ATTLIST mousebutton
+		%moreinfo.attrib;
+		%common.attrib;
+		%mousebutton.role.attrib;
+		%local.mousebutton.attrib;
+>
+<!--end of mousebutton.attlist-->]]>
+<!--end of mousebutton.module-->]]>
+
+<!ENTITY % msgtext.module "INCLUDE">
+<![%msgtext.module;[
+<!ENTITY % local.msgtext.attrib "">
+<!ENTITY % msgtext.role.attrib "%role.attrib;">
+
+<!ENTITY % msgtext.element "INCLUDE">
+<![%msgtext.element;[
+<!ELEMENT msgtext %ho; ((%component.mix;)+)>
+<!--end of msgtext.element-->]]>
+
+<!ENTITY % msgtext.attlist "INCLUDE">
+<![%msgtext.attlist;[
+<!ATTLIST msgtext
+		%common.attrib;
+		%msgtext.role.attrib;
+		%local.msgtext.attrib;
+>
+<!--end of msgtext.attlist-->]]>
+<!--end of msgtext.module-->]]>
+
+<!ENTITY % option.module "INCLUDE">
+<![%option.module;[
+<!ENTITY % local.option.attrib "">
+<!ENTITY % option.role.attrib "%role.attrib;">
+
+<!ENTITY % option.element "INCLUDE">
+<![%option.element;[
+<!ELEMENT option %ho; (%cptr.char.mix;)*>
+<!--end of option.element-->]]>
+
+<!ENTITY % option.attlist "INCLUDE">
+<![%option.attlist;[
+<!ATTLIST option
+		%common.attrib;
+		%option.role.attrib;
+		%local.option.attrib;
+>
+<!--end of option.attlist-->]]>
+<!--end of option.module-->]]>
+
+<!ENTITY % optional.module "INCLUDE">
+<![%optional.module;[
+<!ENTITY % local.optional.attrib "">
+<!ENTITY % optional.role.attrib "%role.attrib;">
+
+<!ENTITY % optional.element "INCLUDE">
+<![%optional.element;[
+<!ELEMENT optional %ho; (%cptr.char.mix;)*>
+<!--end of optional.element-->]]>
+
+<!ENTITY % optional.attlist "INCLUDE">
+<![%optional.attlist;[
+<!ATTLIST optional
+		%common.attrib;
+		%optional.role.attrib;
+		%local.optional.attrib;
+>
+<!--end of optional.attlist-->]]>
+<!--end of optional.module-->]]>
+
+<!ENTITY % parameter.module "INCLUDE">
+<![%parameter.module;[
+<!ENTITY % local.parameter.attrib "">
+<!ENTITY % parameter.role.attrib "%role.attrib;">
+
+<!ENTITY % parameter.element "INCLUDE">
+<![%parameter.element;[
+<!ELEMENT parameter %ho; (%cptr.char.mix;)*>
+<!--end of parameter.element-->]]>
+
+<!-- Class: Type of the Parameter; no default -->
+
+
+<!ENTITY % parameter.attlist "INCLUDE">
+<![%parameter.attlist;[
+<!ATTLIST parameter
+		class 		(command
+				|function
+				|option)	#IMPLIED
+		%moreinfo.attrib;
+		%common.attrib;
+		%parameter.role.attrib;
+		%local.parameter.attrib;
+>
+<!--end of parameter.attlist-->]]>
+<!--end of parameter.module-->]]>
+
+<!ENTITY % prompt.module "INCLUDE">
+<![%prompt.module;[
+<!ENTITY % local.prompt.attrib "">
+<!ENTITY % prompt.role.attrib "%role.attrib;">
+
+<!ENTITY % prompt.element "INCLUDE">
+<![%prompt.element;[
+<!ELEMENT prompt %ho; (%smallcptr.char.mix;|co)*>
+<!--end of prompt.element-->]]>
+
+<!ENTITY % prompt.attlist "INCLUDE">
+<![%prompt.attlist;[
+<!ATTLIST prompt
+		%moreinfo.attrib;
+		%common.attrib;
+		%prompt.role.attrib;
+		%local.prompt.attrib;
+>
+<!--end of prompt.attlist-->]]>
+<!--end of prompt.module-->]]>
+
+<!ENTITY % property.module "INCLUDE">
+<![%property.module;[
+<!ENTITY % local.property.attrib "">
+<!ENTITY % property.role.attrib "%role.attrib;">
+
+<!ENTITY % property.element "INCLUDE">
+<![%property.element;[
+<!ELEMENT property %ho; (%cptr.char.mix;)*>
+<!--end of property.element-->]]>
+
+<!ENTITY % property.attlist "INCLUDE">
+<![%property.attlist;[
+<!ATTLIST property
+		%moreinfo.attrib;
+		%common.attrib;
+		%property.role.attrib;
+		%local.property.attrib;
+>
+<!--end of property.attlist-->]]>
+<!--end of property.module-->]]>
+
+<!ENTITY % replaceable.module "INCLUDE">
+<![%replaceable.module;[
+<!ENTITY % local.replaceable.attrib "">
+<!ENTITY % replaceable.role.attrib "%role.attrib;">
+
+<!ENTITY % replaceable.element "INCLUDE">
+<![%replaceable.element;[
+<!ELEMENT replaceable %ho; (#PCDATA
+		| %link.char.class;
+		| optional
+		| %base.char.class;
+		| %other.char.class;
+		| inlinegraphic
+                | inlinemediaobject
+		| co)*>
+<!--end of replaceable.element-->]]>
+
+<!-- Class: Type of information the element represents; no
+		default -->
+
+
+<!ENTITY % replaceable.attlist "INCLUDE">
+<![%replaceable.attlist;[
+<!ATTLIST replaceable
+		class		(command
+				|function
+				|option
+				|parameter)	#IMPLIED
+		%common.attrib;
+		%replaceable.role.attrib;
+		%local.replaceable.attrib;
+>
+<!--end of replaceable.attlist-->]]>
+<!--end of replaceable.module-->]]>
+
+<!ENTITY % returnvalue.module "INCLUDE">
+<![%returnvalue.module;[
+<!ENTITY % local.returnvalue.attrib "">
+<!ENTITY % returnvalue.role.attrib "%role.attrib;">
+
+<!ENTITY % returnvalue.element "INCLUDE">
+<![%returnvalue.element;[
+<!ELEMENT returnvalue %ho; (%smallcptr.char.mix;)*>
+<!--end of returnvalue.element-->]]>
+
+<!ENTITY % returnvalue.attlist "INCLUDE">
+<![%returnvalue.attlist;[
+<!ATTLIST returnvalue
+		%common.attrib;
+		%returnvalue.role.attrib;
+		%local.returnvalue.attrib;
+>
+<!--end of returnvalue.attlist-->]]>
+<!--end of returnvalue.module-->]]>
+
+<!ENTITY % sgmltag.module "INCLUDE">
+<![%sgmltag.module;[
+<!ENTITY % local.sgmltag.attrib "">
+<!ENTITY % sgmltag.role.attrib "%role.attrib;">
+
+<!ENTITY % sgmltag.element "INCLUDE">
+<![%sgmltag.element;[
+<!ELEMENT sgmltag %ho; (%smallcptr.char.mix;)*>
+<!--end of sgmltag.element-->]]>
+
+<!-- Class: Type of SGML construct the element names; no default -->
+
+
+<!ENTITY % sgmltag.attlist "INCLUDE">
+<![%sgmltag.attlist;[
+<!ATTLIST sgmltag
+		class 		(attribute
+				|attvalue
+				|element
+				|endtag
+                                |emptytag
+				|genentity
+				|numcharref
+				|paramentity
+				|pi
+                                |xmlpi
+				|starttag
+				|sgmlcomment
+                                |prefix
+                                |namespace
+                                |localname)	#IMPLIED
+		namespace	CDATA		#IMPLIED
+		%common.attrib;
+		%sgmltag.role.attrib;
+		%local.sgmltag.attrib;
+>
+<!--end of sgmltag.attlist-->]]>
+<!--end of sgmltag.module-->]]>
+
+<!ENTITY % structfield.module "INCLUDE">
+<![%structfield.module;[
+<!ENTITY % local.structfield.attrib "">
+<!ENTITY % structfield.role.attrib "%role.attrib;">
+
+<!ENTITY % structfield.element "INCLUDE">
+<![%structfield.element;[
+<!ELEMENT structfield %ho; (%smallcptr.char.mix;)*>
+<!--end of structfield.element-->]]>
+
+<!ENTITY % structfield.attlist "INCLUDE">
+<![%structfield.attlist;[
+<!ATTLIST structfield
+		%common.attrib;
+		%structfield.role.attrib;
+		%local.structfield.attrib;
+>
+<!--end of structfield.attlist-->]]>
+<!--end of structfield.module-->]]>
+
+<!ENTITY % structname.module "INCLUDE">
+<![%structname.module;[
+<!ENTITY % local.structname.attrib "">
+<!ENTITY % structname.role.attrib "%role.attrib;">
+
+<!ENTITY % structname.element "INCLUDE">
+<![%structname.element;[
+<!ELEMENT structname %ho; (%smallcptr.char.mix;)*>
+<!--end of structname.element-->]]>
+
+<!ENTITY % structname.attlist "INCLUDE">
+<![%structname.attlist;[
+<!ATTLIST structname
+		%common.attrib;
+		%structname.role.attrib;
+		%local.structname.attrib;
+>
+<!--end of structname.attlist-->]]>
+<!--end of structname.module-->]]>
+
+<!ENTITY % symbol.module "INCLUDE">
+<![%symbol.module;[
+<!ENTITY % local.symbol.attrib "">
+<!ENTITY % symbol.role.attrib "%role.attrib;">
+
+<!ENTITY % symbol.element "INCLUDE">
+<![%symbol.element;[
+<!ELEMENT symbol %ho; (%smallcptr.char.mix;)*>
+<!--end of symbol.element-->]]>
+
+<!-- Class: Type of symbol; no default -->
+
+
+<!ENTITY % symbol.attlist "INCLUDE">
+<![%symbol.attlist;[
+<!ATTLIST symbol
+		class		(limit)		#IMPLIED
+		%common.attrib;
+		%symbol.role.attrib;
+		%local.symbol.attrib;
+>
+<!--end of symbol.attlist-->]]>
+<!--end of symbol.module-->]]>
+
+<!ENTITY % systemitem.module "INCLUDE">
+<![%systemitem.module;[
+<!ENTITY % local.systemitem.attrib "">
+<!ENTITY % systemitem.role.attrib "%role.attrib;">
+
+<!ENTITY % systemitem.element "INCLUDE">
+<![%systemitem.element;[
+<!ELEMENT systemitem %ho; (%cptr.char.mix; | acronym | co)*>
+<!--end of systemitem.element-->]]>
+
+<!-- Class: Type of system item the element names; no default -->
+
+<!ENTITY % systemitem.attlist "INCLUDE">
+<![%systemitem.attlist;[
+<!ATTLIST systemitem
+		class	(constant
+			|event
+			|eventhandler
+			|domainname
+			|fqdomainname
+			|ipaddress
+			|netmask
+			|etheraddress
+			|groupname
+			|library
+			|macro
+			|osname
+			|filesystem
+			|resource
+			|systemname
+			|username
+			|newsgroup
+                        |process
+                        |service
+                        |server
+                        |daemon)	#IMPLIED
+		%moreinfo.attrib;
+		%common.attrib;
+		%systemitem.role.attrib;
+		%local.systemitem.attrib;
+>
+<!--end of systemitem.attlist-->]]>
+<!--end of systemitem.module-->]]>
+
+<!ENTITY % uri.module "INCLUDE">
+<![%uri.module;[
+<!ENTITY % local.uri.attrib "">
+<!ENTITY % uri.role.attrib "%role.attrib;">
+
+<!ENTITY % uri.element "INCLUDE">
+<![%uri.element;[
+<!ELEMENT uri %ho; (%smallcptr.char.mix;)*>
+<!--end of uri.element-->]]>
+
+<!-- Type: Type of URI; no default -->
+
+<!ENTITY % uri.attlist "INCLUDE">
+<![%uri.attlist;[
+<!ATTLIST uri
+		type	CDATA	#IMPLIED
+		%common.attrib;
+		%uri.role.attrib;
+		%local.uri.attrib;
+>
+<!--end of uri.attlist-->]]>
+<!--end of uri.module-->]]>
+
+<!ENTITY % token.module "INCLUDE">
+<![%token.module;[
+<!ENTITY % local.token.attrib "">
+<!ENTITY % token.role.attrib "%role.attrib;">
+
+<!ENTITY % token.element "INCLUDE">
+<![%token.element;[
+<!ELEMENT token %ho; (%smallcptr.char.mix;)*>
+<!--end of token.element-->]]>
+
+<!ENTITY % token.attlist "INCLUDE">
+<![%token.attlist;[
+<!ATTLIST token
+		%common.attrib;
+		%token.role.attrib;
+		%local.token.attrib;
+>
+<!--end of token.attlist-->]]>
+<!--end of token.module-->]]>
+
+<!ENTITY % type.module "INCLUDE">
+<![%type.module;[
+<!ENTITY % local.type.attrib "">
+<!ENTITY % type.role.attrib "%role.attrib;">
+
+<!ENTITY % type.element "INCLUDE">
+<![%type.element;[
+<!ELEMENT type %ho; (%smallcptr.char.mix;)*>
+<!--end of type.element-->]]>
+
+<!ENTITY % type.attlist "INCLUDE">
+<![%type.attlist;[
+<!ATTLIST type
+		%common.attrib;
+		%type.role.attrib;
+		%local.type.attrib;
+>
+<!--end of type.attlist-->]]>
+<!--end of type.module-->]]>
+
+<!ENTITY % userinput.module "INCLUDE">
+<![%userinput.module;[
+<!ENTITY % local.userinput.attrib "">
+<!ENTITY % userinput.role.attrib "%role.attrib;">
+
+<!ENTITY % userinput.element "INCLUDE">
+<![%userinput.element;[
+<!ELEMENT userinput %ho; (%cptr.char.mix;|co)*>
+<!--end of userinput.element-->]]>
+
+<!ENTITY % userinput.attlist "INCLUDE">
+<![%userinput.attlist;[
+<!ATTLIST userinput
+		%moreinfo.attrib;
+		%common.attrib;
+		%userinput.role.attrib;
+		%local.userinput.attrib;
+>
+<!--end of userinput.attlist-->]]>
+<!--end of userinput.module-->]]>
+
+<!-- General words and phrases ............................................ -->
+
+<!ENTITY % abbrev.module "INCLUDE">
+<![%abbrev.module;[
+<!ENTITY % local.abbrev.attrib "">
+<!ENTITY % abbrev.role.attrib "%role.attrib;">
+
+<!ENTITY % abbrev.element "INCLUDE">
+<![%abbrev.element;[
+<!ELEMENT abbrev %ho; (%word.char.mix;)*>
+<!--end of abbrev.element-->]]>
+
+<!ENTITY % abbrev.attlist "INCLUDE">
+<![%abbrev.attlist;[
+<!ATTLIST abbrev
+		%common.attrib;
+		%abbrev.role.attrib;
+		%local.abbrev.attrib;
+>
+<!--end of abbrev.attlist-->]]>
+<!--end of abbrev.module-->]]>
+
+<!ENTITY % acronym.module "INCLUDE">
+<![%acronym.module;[
+<!ENTITY % local.acronym.attrib "">
+<!ENTITY % acronym.role.attrib "%role.attrib;">
+
+<!ENTITY % acronym.element "INCLUDE">
+<![%acronym.element;[
+<!ELEMENT acronym %ho; (%word.char.mix;)*
+		%acronym.exclusion;>
+<!--end of acronym.element-->]]>
+
+<!ENTITY % acronym.attlist "INCLUDE">
+<![%acronym.attlist;[
+<!ATTLIST acronym
+		%common.attrib;
+		%acronym.role.attrib;
+		%local.acronym.attrib;
+>
+<!--end of acronym.attlist-->]]>
+<!--end of acronym.module-->]]>
+
+<!ENTITY % citation.module "INCLUDE">
+<![%citation.module;[
+<!ENTITY % local.citation.attrib "">
+<!ENTITY % citation.role.attrib "%role.attrib;">
+
+<!ENTITY % citation.element "INCLUDE">
+<![%citation.element;[
+<!ELEMENT citation %ho; (%para.char.mix;)*>
+<!--end of citation.element-->]]>
+
+<!ENTITY % citation.attlist "INCLUDE">
+<![%citation.attlist;[
+<!ATTLIST citation
+		%common.attrib;
+		%citation.role.attrib;
+		%local.citation.attrib;
+>
+<!--end of citation.attlist-->]]>
+<!--end of citation.module-->]]>
+
+<!ENTITY % citerefentry.module "INCLUDE">
+<![%citerefentry.module;[
+<!ENTITY % local.citerefentry.attrib "">
+<!ENTITY % citerefentry.role.attrib "%role.attrib;">
+
+<!ENTITY % citerefentry.element "INCLUDE">
+<![%citerefentry.element;[
+<!ELEMENT citerefentry %ho; (refentrytitle, manvolnum?)>
+<!--end of citerefentry.element-->]]>
+
+<!ENTITY % citerefentry.attlist "INCLUDE">
+<![%citerefentry.attlist;[
+<!ATTLIST citerefentry
+		%common.attrib;
+		%citerefentry.role.attrib;
+		%local.citerefentry.attrib;
+>
+<!--end of citerefentry.attlist-->]]>
+<!--end of citerefentry.module-->]]>
+
+<!ENTITY % refentrytitle.module "INCLUDE">
+<![%refentrytitle.module;[
+<!ENTITY % local.refentrytitle.attrib "">
+<!ENTITY % refentrytitle.role.attrib "%role.attrib;">
+
+<!ENTITY % refentrytitle.element "INCLUDE">
+<![%refentrytitle.element;[
+<!ELEMENT refentrytitle %ho; (%para.char.mix;)*>
+<!--end of refentrytitle.element-->]]>
+
+<!ENTITY % refentrytitle.attlist "INCLUDE">
+<![%refentrytitle.attlist;[
+<!ATTLIST refentrytitle
+		%common.attrib;
+		%refentrytitle.role.attrib;
+		%local.refentrytitle.attrib;
+>
+<!--end of refentrytitle.attlist-->]]>
+<!--end of refentrytitle.module-->]]>
+
+<!ENTITY % manvolnum.module "INCLUDE">
+<![%manvolnum.module;[
+<!ENTITY % local.manvolnum.attrib "">
+<!ENTITY % namvolnum.role.attrib "%role.attrib;">
+
+<!ENTITY % manvolnum.element "INCLUDE">
+<![%manvolnum.element;[
+<!ELEMENT manvolnum %ho; (%word.char.mix;)*>
+<!--end of manvolnum.element-->]]>
+
+<!ENTITY % manvolnum.attlist "INCLUDE">
+<![%manvolnum.attlist;[
+<!ATTLIST manvolnum
+		%common.attrib;
+		%namvolnum.role.attrib;
+		%local.manvolnum.attrib;
+>
+<!--end of manvolnum.attlist-->]]>
+<!--end of manvolnum.module-->]]>
+
+<!ENTITY % citetitle.module "INCLUDE">
+<![%citetitle.module;[
+<!ENTITY % local.citetitle.attrib "">
+<!ENTITY % citetitle.role.attrib "%role.attrib;">
+
+<!ENTITY % citetitle.element "INCLUDE">
+<![%citetitle.element;[
+<!ELEMENT citetitle %ho; (%para.char.mix;)*>
+<!--end of citetitle.element-->]]>
+
+<!-- Pubwork: Genre of published work cited; no default -->
+
+
+<!ENTITY % citetitle.attlist "INCLUDE">
+<![%citetitle.attlist;[
+<!ATTLIST citetitle
+		pubwork		(article
+				|book
+				|chapter
+				|part
+				|refentry
+				|section
+				|journal
+				|series
+				|set
+				|manuscript
+				|cdrom
+				|dvd
+				|wiki
+				|gopher
+				|bbs
+                                |emailmessage
+                                |webpage
+                                |newsposting)	#IMPLIED
+		%common.attrib;
+		%citetitle.role.attrib;
+		%local.citetitle.attrib;
+>
+<!--end of citetitle.attlist-->]]>
+<!--end of citetitle.module-->]]>
+
+<!ENTITY % emphasis.module "INCLUDE">
+<![%emphasis.module;[
+<!ENTITY % local.emphasis.attrib "">
+<!ENTITY % emphasis.role.attrib "%role.attrib;">
+
+<!ENTITY % emphasis.element "INCLUDE">
+<![%emphasis.element;[
+<!ELEMENT emphasis %ho; (%para.char.mix;)*>
+<!--end of emphasis.element-->]]>
+
+<!ENTITY % emphasis.attlist "INCLUDE">
+<![%emphasis.attlist;[
+<!ATTLIST emphasis
+		%common.attrib;
+		%emphasis.role.attrib;
+		%local.emphasis.attrib;
+>
+<!--end of emphasis.attlist-->]]>
+<!--end of emphasis.module-->]]>
+
+<!ENTITY % foreignphrase.module "INCLUDE">
+<![%foreignphrase.module;[
+<!ENTITY % local.foreignphrase.attrib "">
+<!ENTITY % foreignphrase.role.attrib "%role.attrib;">
+
+<!ENTITY % foreignphrase.element "INCLUDE">
+<![%foreignphrase.element;[
+<!ELEMENT foreignphrase %ho; (%para.char.mix;)*>
+<!--end of foreignphrase.element-->]]>
+
+<!ENTITY % foreignphrase.attlist "INCLUDE">
+<![%foreignphrase.attlist;[
+<!ATTLIST foreignphrase
+		%common.attrib;
+		%foreignphrase.role.attrib;
+		%local.foreignphrase.attrib;
+>
+<!--end of foreignphrase.attlist-->]]>
+<!--end of foreignphrase.module-->]]>
+
+<!ENTITY % glossterm.module "INCLUDE">
+<![%glossterm.module;[
+<!ENTITY % local.glossterm.attrib "">
+<!ENTITY % glossterm.role.attrib "%role.attrib;">
+
+<!ENTITY % glossterm.element "INCLUDE">
+<![%glossterm.element;[
+<!ELEMENT glossterm %ho; (%para.char.mix;)*
+		%glossterm.exclusion;>
+<!--end of glossterm.element-->]]>
+
+<!-- to GlossEntry if Glossterm used in text -->
+<!-- BaseForm: Provides the form of GlossTerm to be used
+		for indexing -->
+
+<!ENTITY % glossterm.attlist "INCLUDE">
+<![%glossterm.attlist;[
+<!ATTLIST glossterm
+		baseform	CDATA		#IMPLIED
+		%linkend.attrib;
+		%common.attrib;
+		%glossterm.role.attrib;
+		%local.glossterm.attrib;
+>
+<!--end of glossterm.attlist-->]]>
+<!--end of glossterm.module-->]]>
+
+<!ENTITY % firstterm.module "INCLUDE">
+<![%firstterm.module;[
+<!ENTITY % local.firstterm.attrib "">
+<!ENTITY % firstterm.role.attrib "%role.attrib;">
+
+<!ENTITY % firstterm.element "INCLUDE">
+<![%firstterm.element;[
+<!ELEMENT firstterm %ho; (%para.char.mix;)*
+		%glossterm.exclusion;>
+<!--end of firstterm.element-->]]>
+
+<!-- to GlossEntry or other explanation -->
+
+
+<!ENTITY % firstterm.attlist "INCLUDE">
+<![%firstterm.attlist;[
+<!ATTLIST firstterm
+		baseform	CDATA		#IMPLIED
+		%linkend.attrib;
+		%common.attrib;
+		%firstterm.role.attrib;
+		%local.firstterm.attrib;
+>
+<!--end of firstterm.attlist-->]]>
+<!--end of firstterm.module-->]]>
+
+<!ENTITY % phrase.module "INCLUDE">
+<![%phrase.module;[
+<!ENTITY % local.phrase.attrib "">
+<!ENTITY % phrase.role.attrib "%role.attrib;">
+
+<!ENTITY % phrase.element "INCLUDE">
+<![%phrase.element;[
+<!ELEMENT phrase %ho; (%para.char.mix;)*>
+<!--end of phrase.element-->]]>
+
+<!ENTITY % phrase.attlist "INCLUDE">
+<![%phrase.attlist;[
+<!ATTLIST phrase
+		%common.attrib;
+		%phrase.role.attrib;
+		%local.phrase.attrib;
+>
+<!--end of phrase.attlist-->]]>
+<!--end of phrase.module-->]]>
+
+<!ENTITY % quote.module "INCLUDE">
+<![%quote.module;[
+<!ENTITY % local.quote.attrib "">
+<!ENTITY % quote.role.attrib "%role.attrib;">
+
+<!ENTITY % quote.element "INCLUDE">
+<![%quote.element;[
+<!ELEMENT quote %ho; (%para.char.mix;)*>
+<!--end of quote.element-->]]>
+
+<!ENTITY % quote.attlist "INCLUDE">
+<![%quote.attlist;[
+<!ATTLIST quote
+		%common.attrib;
+		%quote.role.attrib;
+		%local.quote.attrib;
+>
+<!--end of quote.attlist-->]]>
+<!--end of quote.module-->]]>
+
+<!ENTITY % ssscript.module "INCLUDE">
+<![%ssscript.module;[
+<!ENTITY % local.ssscript.attrib "">
+<!ENTITY % ssscript.role.attrib "%role.attrib;">
+
+<!ENTITY % subscript.element "INCLUDE">
+<![%subscript.element;[
+<!ELEMENT subscript %ho; (#PCDATA
+		| %link.char.class;
+		| emphasis
+		| replaceable
+		| symbol
+		| inlinegraphic
+                | inlinemediaobject
+		| %base.char.class;
+		| %other.char.class;)*
+		%ubiq.exclusion;>
+<!--end of subscript.element-->]]>
+
+<!ENTITY % subscript.attlist "INCLUDE">
+<![%subscript.attlist;[
+<!ATTLIST subscript
+		%common.attrib;
+		%ssscript.role.attrib;
+		%local.ssscript.attrib;
+>
+<!--end of subscript.attlist-->]]>
+
+<!ENTITY % superscript.element "INCLUDE">
+<![%superscript.element;[
+<!ELEMENT superscript %ho; (#PCDATA
+		| %link.char.class;
+		| emphasis
+		| replaceable
+		| symbol
+		| inlinegraphic
+                | inlinemediaobject
+		| %base.char.class;
+		| %other.char.class;)*
+		%ubiq.exclusion;>
+<!--end of superscript.element-->]]>
+
+<!ENTITY % superscript.attlist "INCLUDE">
+<![%superscript.attlist;[
+<!ATTLIST superscript
+		%common.attrib;
+		%ssscript.role.attrib;
+		%local.ssscript.attrib;
+>
+<!--end of superscript.attlist-->]]>
+<!--end of ssscript.module-->]]>
+
+<!ENTITY % trademark.module "INCLUDE">
+<![%trademark.module;[
+<!ENTITY % local.trademark.attrib "">
+<!ENTITY % trademark.role.attrib "%role.attrib;">
+
+<!ENTITY % trademark.element "INCLUDE">
+<![%trademark.element;[
+<!ELEMENT trademark %ho; (#PCDATA
+		| %link.char.class;
+		| %tech.char.class;
+		| %base.char.class;
+		| %other.char.class;
+		| inlinegraphic
+                | inlinemediaobject
+		| emphasis)*>
+<!--end of trademark.element-->]]>
+
+<!-- Class: More precisely identifies the item the element names -->
+
+
+<!ENTITY % trademark.attlist "INCLUDE">
+<![%trademark.attlist;[
+<!ATTLIST trademark
+		class		(service
+				|trade
+				|registered
+				|copyright)	'trade'
+		%common.attrib;
+		%trademark.role.attrib;
+		%local.trademark.attrib;
+>
+<!--end of trademark.attlist-->]]>
+<!--end of trademark.module-->]]>
+
+<!ENTITY % wordasword.module "INCLUDE">
+<![%wordasword.module;[
+<!ENTITY % local.wordasword.attrib "">
+<!ENTITY % wordasword.role.attrib "%role.attrib;">
+
+<!ENTITY % wordasword.element "INCLUDE">
+<![%wordasword.element;[
+<!ELEMENT wordasword %ho; (%word.char.mix;)*>
+<!--end of wordasword.element-->]]>
+
+<!ENTITY % wordasword.attlist "INCLUDE">
+<![%wordasword.attlist;[
+<!ATTLIST wordasword
+		%common.attrib;
+		%wordasword.role.attrib;
+		%local.wordasword.attrib;
+>
+<!--end of wordasword.attlist-->]]>
+<!--end of wordasword.module-->]]>
+
+<!-- Links and cross-references ........................................... -->
+
+<!ENTITY % link.module "INCLUDE">
+<![%link.module;[
+<!ENTITY % local.link.attrib "">
+<!ENTITY % link.role.attrib "%role.attrib;">
+
+<!ENTITY % link.element "INCLUDE">
+<![%link.element;[
+<!ELEMENT link %ho; (%para.char.mix;)*
+		%links.exclusion;>
+<!--end of link.element-->]]>
+
+<!-- Endterm: ID of element containing text that is to be
+		fetched from elsewhere in the document to appear as
+		the content of this element -->
+<!-- to linked-to object -->
+<!-- Type: Freely assignable parameter -->
+
+
+<!ENTITY % link.attlist "INCLUDE">
+<![%link.attlist;[
+<!ATTLIST link
+		endterm		IDREF		#IMPLIED
+		xrefstyle	CDATA		#IMPLIED
+		type		CDATA		#IMPLIED
+		%linkendreq.attrib;
+		%common.attrib;
+		%link.role.attrib;
+		%local.link.attrib;
+>
+<!--end of link.attlist-->]]>
+<!--end of link.module-->]]>
+
+<!ENTITY % olink.module "INCLUDE">
+<![%olink.module;[
+<!ENTITY % local.olink.attrib "">
+<!ENTITY % olink.role.attrib "%role.attrib;">
+
+<!ENTITY % olink.element "INCLUDE">
+<![%olink.element;[
+<!ELEMENT olink %ho; (%para.char.mix;)*
+		%links.exclusion;>
+<!--end of olink.element-->]]>
+
+<!-- TargetDocEnt: Name of an entity to be the target of the link -->
+<!-- LinkMode: ID of a ModeSpec containing instructions for
+		operating on the entity named by TargetDocEnt -->
+<!-- LocalInfo: Information that may be passed to ModeSpec -->
+<!-- Type: Freely assignable parameter -->
+
+
+<!ENTITY % olink.attlist "INCLUDE">
+<![%olink.attlist;[
+<!ATTLIST olink
+		targetdocent	ENTITY 		#IMPLIED
+		linkmode	IDREF		#IMPLIED
+		localinfo 	CDATA		#IMPLIED
+		type		CDATA		#IMPLIED
+		targetdoc	CDATA		#IMPLIED
+		targetptr	CDATA		#IMPLIED
+		xrefstyle	CDATA		#IMPLIED
+		%common.attrib;
+		%olink.role.attrib;
+		%local.olink.attrib;
+>
+<!--end of olink.attlist-->]]>
+<!--end of olink.module-->]]>
+
+<!ENTITY % ulink.module "INCLUDE">
+<![%ulink.module;[
+<!ENTITY % local.ulink.attrib "">
+<!ENTITY % ulink.role.attrib "%role.attrib;">
+
+<!ENTITY % ulink.element "INCLUDE">
+<![%ulink.element;[
+<!ELEMENT ulink %ho; (%para.char.mix;)*
+		%links.exclusion;>
+<!--end of ulink.element-->]]>
+
+<!-- URL: uniform resource locator; the target of the ULink -->
+<!-- Type: Freely assignable parameter -->
+
+
+<!ENTITY % ulink.attlist "INCLUDE">
+<![%ulink.attlist;[
+<!ATTLIST ulink
+		url		CDATA		#REQUIRED
+		type		CDATA		#IMPLIED
+		xrefstyle	CDATA		#IMPLIED
+		%common.attrib;
+		%ulink.role.attrib;
+		%local.ulink.attrib;
+>
+<!--end of ulink.attlist-->]]>
+<!--end of ulink.module-->]]>
+
+<!ENTITY % footnoteref.module "INCLUDE">
+<![%footnoteref.module;[
+<!ENTITY % local.footnoteref.attrib "">
+<!ENTITY % footnoteref.role.attrib "%role.attrib;">
+
+<!ENTITY % footnoteref.element "INCLUDE">
+<![%footnoteref.element;[
+<!ELEMENT footnoteref %ho; EMPTY>
+<!--end of footnoteref.element-->]]>
+
+<!-- to footnote content supplied elsewhere -->
+
+
+<!ENTITY % footnoteref.attlist "INCLUDE">
+<![%footnoteref.attlist;[
+<!ATTLIST footnoteref
+		%linkendreq.attrib;		%label.attrib;
+		%common.attrib;
+		%footnoteref.role.attrib;
+		%local.footnoteref.attrib;
+>
+<!--end of footnoteref.attlist-->]]>
+<!--end of footnoteref.module-->]]>
+
+<!ENTITY % xref.module "INCLUDE">
+<![%xref.module;[
+<!ENTITY % local.xref.attrib "">
+<!ENTITY % xref.role.attrib "%role.attrib;">
+
+<!ENTITY % xref.element "INCLUDE">
+<![%xref.element;[
+<!ELEMENT xref %ho; EMPTY>
+<!--end of xref.element-->]]>
+
+<!-- Endterm: ID of element containing text that is to be
+		fetched from elsewhere in the document to appear as
+		the content of this element -->
+<!-- to linked-to object -->
+
+
+<!ENTITY % xref.attlist "INCLUDE">
+<![%xref.attlist;[
+<!ATTLIST xref
+		endterm		IDREF		#IMPLIED
+		xrefstyle	CDATA		#IMPLIED
+		%common.attrib;
+		%linkendreq.attrib;
+		%xref.role.attrib;
+		%local.xref.attrib;
+>
+<!--end of xref.attlist-->]]>
+<!--end of xref.module-->]]>
+
+<!-- Ubiquitous elements .................................................. -->
+
+<!ENTITY % anchor.module "INCLUDE">
+<![%anchor.module;[
+<!ENTITY % local.anchor.attrib "">
+<!ENTITY % anchor.role.attrib "%role.attrib;">
+
+<!ENTITY % anchor.element "INCLUDE">
+<![%anchor.element;[
+<!ELEMENT anchor %ho; EMPTY>
+<!--end of anchor.element-->]]>
+
+<!-- required -->
+<!-- replaces Lang -->
+
+
+<!ENTITY % anchor.attlist "INCLUDE">
+<![%anchor.attlist;[
+<!ATTLIST anchor
+		%idreq.attrib;		%pagenum.attrib;		%remap.attrib;
+		%xreflabel.attrib;
+		%revisionflag.attrib;
+		%effectivity.attrib;
+		%anchor.role.attrib;
+		%local.anchor.attrib;
+>
+<!--end of anchor.attlist-->]]>
+<!--end of anchor.module-->]]>
+
+<!ENTITY % beginpage.module "INCLUDE">
+<![%beginpage.module;[
+<!ENTITY % local.beginpage.attrib "">
+<!ENTITY % beginpage.role.attrib "%role.attrib;">
+
+<!ENTITY % beginpage.element "INCLUDE">
+<![%beginpage.element;[
+<!ELEMENT beginpage %ho; EMPTY>
+<!--end of beginpage.element-->]]>
+
+<!-- PageNum: Number of page that begins at this point -->
+
+
+<!ENTITY % beginpage.attlist "INCLUDE">
+<![%beginpage.attlist;[
+<!ATTLIST beginpage
+		%pagenum.attrib;
+		%common.attrib;
+		%beginpage.role.attrib;
+		%local.beginpage.attrib;
+>
+<!--end of beginpage.attlist-->]]>
+<!--end of beginpage.module-->]]>
+
+<!-- IndexTerms appear in the text flow for generating or linking an
+     index. -->
+
+<!ENTITY % indexterm.content.module "INCLUDE">
+<![%indexterm.content.module;[
+<!ENTITY % indexterm.module "INCLUDE">
+<![%indexterm.module;[
+<!ENTITY % local.indexterm.attrib "">
+<!ENTITY % indexterm.role.attrib "%role.attrib;">
+
+<!ENTITY % indexterm.element "INCLUDE">
+<![%indexterm.element;[
+<!ELEMENT indexterm %ho; (primary?, ((secondary, ((tertiary, (see|seealso+)?)
+		| see | seealso+)?) | see | seealso+)?)
+			%ubiq.exclusion;>
+<!--end of indexterm.element-->]]>
+
+<!-- Scope: Indicates which generated indices the IndexTerm
+		should appear in: Global (whole document set), Local (this
+		document only), or All (both) -->
+<!-- Significance: Whether this IndexTerm is the most pertinent
+		of its series (Preferred) or not (Normal, the default) -->
+<!-- Class: Indicates type of IndexTerm; default is Singular,
+		or EndOfRange if StartRef is supplied; StartOfRange value
+		must be supplied explicitly on starts of ranges -->
+<!-- StartRef: ID of the IndexTerm that starts the indexing
+		range ended by this IndexTerm -->
+<!-- Zone: IDs of the elements to which the IndexTerm applies,
+		and indicates that the IndexTerm applies to those entire
+		elements rather than the point at which the IndexTerm
+		occurs -->
+
+
+<!ENTITY % indexterm.attlist "INCLUDE">
+<![%indexterm.attlist;[
+<!ATTLIST indexterm
+		%pagenum.attrib;
+		scope		(all
+				|global
+				|local)		#IMPLIED
+		significance	(preferred
+				|normal)	"normal"
+		class		(singular
+				|startofrange
+				|endofrange)	#IMPLIED
+		startref	IDREF		#IMPLIED
+		zone		IDREFS		#IMPLIED
+		type		CDATA		#IMPLIED
+		%common.attrib;
+		%indexterm.role.attrib;
+		%local.indexterm.attrib;
+>
+<!--end of indexterm.attlist-->]]>
+<!--end of indexterm.module-->]]>
+
+<!ENTITY % primsecter.module "INCLUDE">
+<![%primsecter.module;[
+<!ENTITY % local.primsecter.attrib "">
+<!ENTITY % primsecter.role.attrib "%role.attrib;">
+
+
+<!ENTITY % primary.element "INCLUDE">
+<![%primary.element;[
+<!ELEMENT primary %ho;   (%ndxterm.char.mix;)*>
+<!--end of primary.element-->]]>
+<!-- SortAs: Alternate sort string for index sorting, e.g.,
+		"fourteen" for an element containing "14" -->
+
+<!ENTITY % primary.attlist "INCLUDE">
+<![%primary.attlist;[
+<!ATTLIST primary
+		sortas		CDATA		#IMPLIED
+		%common.attrib;
+		%primsecter.role.attrib;
+		%local.primsecter.attrib;
+>
+<!--end of primary.attlist-->]]>
+
+
+<!ENTITY % secondary.element "INCLUDE">
+<![%secondary.element;[
+<!ELEMENT secondary %ho; (%ndxterm.char.mix;)*>
+<!--end of secondary.element-->]]>
+<!-- SortAs: Alternate sort string for index sorting, e.g.,
+		"fourteen" for an element containing "14" -->
+
+<!ENTITY % secondary.attlist "INCLUDE">
+<![%secondary.attlist;[
+<!ATTLIST secondary
+		sortas		CDATA		#IMPLIED
+		%common.attrib;
+		%primsecter.role.attrib;
+		%local.primsecter.attrib;
+>
+<!--end of secondary.attlist-->]]>
+
+
+<!ENTITY % tertiary.element "INCLUDE">
+<![%tertiary.element;[
+<!ELEMENT tertiary %ho;  (%ndxterm.char.mix;)*>
+<!--end of tertiary.element-->]]>
+<!-- SortAs: Alternate sort string for index sorting, e.g.,
+		"fourteen" for an element containing "14" -->
+
+<!ENTITY % tertiary.attlist "INCLUDE">
+<![%tertiary.attlist;[
+<!ATTLIST tertiary
+		sortas		CDATA		#IMPLIED
+		%common.attrib;
+		%primsecter.role.attrib;
+		%local.primsecter.attrib;
+>
+<!--end of tertiary.attlist-->]]>
+
+<!--end of primsecter.module-->]]>
+
+<!ENTITY % seeseealso.module "INCLUDE">
+<![%seeseealso.module;[
+<!ENTITY % local.seeseealso.attrib "">
+<!ENTITY % seeseealso.role.attrib "%role.attrib;">
+
+<!ENTITY % see.element "INCLUDE">
+<![%see.element;[
+<!ELEMENT see %ho; (%ndxterm.char.mix;)*>
+<!--end of see.element-->]]>
+
+<!ENTITY % see.attlist "INCLUDE">
+<![%see.attlist;[
+<!ATTLIST see
+		%common.attrib;
+		%seeseealso.role.attrib;
+		%local.seeseealso.attrib;
+>
+<!--end of see.attlist-->]]>
+
+<!ENTITY % seealso.element "INCLUDE">
+<![%seealso.element;[
+<!ELEMENT seealso %ho; (%ndxterm.char.mix;)*>
+<!--end of seealso.element-->]]>
+
+<!ENTITY % seealso.attlist "INCLUDE">
+<![%seealso.attlist;[
+<!ATTLIST seealso
+		%common.attrib;
+		%seeseealso.role.attrib;
+		%local.seeseealso.attrib;
+>
+<!--end of seealso.attlist-->]]>
+<!--end of seeseealso.module-->]]>
+<!--end of indexterm.content.module-->]]>
+
+<!-- End of DocBook XML information pool module V4.3CR3 ...................... -->
+<!-- ...................................................................... -->

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/docbook.cat
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/docbook.cat	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/docbook.cat	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,110 @@
+  -- ...................................................................... --
+  -- Catalog data for DocBook XML V4.3CR3 .................................... --
+  -- File docbook.cat ..................................................... --
+
+  -- Please direct all questions, bug reports, or suggestions for
+     changes to the docbook at lists.oasis-open.org mailing list. For more
+     information, see http://www.oasis-open.org/.
+  --
+
+  -- This is the catalog data file for DocBook XML V4.3CR3. It is provided as
+     a convenience in building your own catalog files. You need not use
+     the filenames listed here, and need not use the filename method of
+     identifying storage objects at all.  See the documentation for
+     detailed information on the files associated with the DocBook DTD.
+     See SGML Open Technical Resolution 9401 for detailed information
+     on supplying and using catalog data.
+  --
+
+  -- ...................................................................... --
+  -- DocBook driver file .................................................. --
+
+PUBLIC "-//OASIS//DTD DocBook XML V4.3CR3//EN"
+       "docbookx.dtd"
+
+  -- ...................................................................... --
+  -- DocBook modules ...................................................... --
+
+PUBLIC "-//OASIS//DTD DocBook CALS Table Model V4.3CR3//EN"
+       "calstblx.dtd"
+
+PUBLIC "-//OASIS//DTD XML Exchange Table Model 19990315//EN"
+       "soextblx.dtd"
+
+PUBLIC "-//OASIS//ELEMENTS DocBook Information Pool V4.3CR3//EN"
+       "dbpoolx.mod"
+
+PUBLIC "-//OASIS//ELEMENTS DocBook Document Hierarchy V4.3CR3//EN"
+       "dbhierx.mod"
+
+PUBLIC "-//OASIS//ENTITIES DocBook Additional General Entities V4.3CR3//EN"
+       "dbgenent.mod"
+
+PUBLIC "-//OASIS//ENTITIES DocBook Notations V4.3CR3//EN"
+       "dbnotnx.mod"
+
+PUBLIC "-//OASIS//ENTITIES DocBook Character Entities V4.3CR3//EN"
+       "dbcentx.mod"
+
+  -- ...................................................................... --
+  -- ISO entity sets ...................................................... --
+
+PUBLIC "ISO 8879:1986//ENTITIES Diacritical Marks//EN//XML"
+       "ent/iso-dia.ent"
+
+PUBLIC "ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN//XML"
+       "ent/iso-num.ent"
+
+PUBLIC "ISO 8879:1986//ENTITIES Publishing//EN//XML"
+       "ent/iso-pub.ent"
+
+PUBLIC "ISO 8879:1986//ENTITIES General Technical//EN//XML"
+       "ent/iso-tech.ent"
+
+PUBLIC "ISO 8879:1986//ENTITIES Added Latin 1//EN//XML"
+       "ent/iso-lat1.ent"
+
+PUBLIC "ISO 8879:1986//ENTITIES Added Latin 2//EN//XML"
+       "ent/iso-lat2.ent"
+
+PUBLIC "ISO 8879:1986//ENTITIES Greek Letters//EN//XML"
+       "ent/iso-grk1.ent"
+
+PUBLIC "ISO 8879:1986//ENTITIES Monotoniko Greek//EN//XML"
+       "ent/iso-grk2.ent"
+
+PUBLIC "ISO 8879:1986//ENTITIES Greek Symbols//EN//XML"
+       "ent/iso-grk3.ent"
+
+PUBLIC "ISO 8879:1986//ENTITIES Alternative Greek Symbols//EN//XML"
+       "ent/iso-grk4.ent"
+
+PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Arrow Relations//EN//XML"
+       "ent/iso-amsa.ent"
+
+PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Binary Operators//EN//XML"
+       "ent/iso-amsb.ent"
+
+PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Delimiters//EN//XML"
+       "ent/iso-amsc.ent"
+
+PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Negated Relations//EN//XML"
+       "ent/iso-amsn.ent"
+
+PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Ordinary//EN//XML"
+       "ent/iso-amso.ent"
+
+PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Relations//EN//XML"
+       "ent/iso-amsr.ent"
+
+PUBLIC "ISO 8879:1986//ENTITIES Box and Line Drawing//EN//XML"
+       "ent/iso-box.ent"
+
+PUBLIC "ISO 8879:1986//ENTITIES Russian Cyrillic//EN//XML"
+       "ent/iso-cyr1.ent"
+
+PUBLIC "ISO 8879:1986//ENTITIES Non-Russian Cyrillic//EN//XML"
+       "ent/iso-cyr2.ent"
+
+  -- End of catalog data for DocBook XML V4.3CR3 ............................. --
+  -- ...................................................................... --

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/docbookx.dtd
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/docbookx.dtd	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/docbookx.dtd	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,165 @@
+<!-- ...................................................................... -->
+<!-- DocBook XML DTD V4.3CR3 ................................................. -->
+<!-- File docbookx.dtd .................................................... -->
+
+<!-- Copyright 1992-2002 HaL Computer Systems, Inc.,
+     O'Reilly & Associates, Inc., ArborText, Inc., Fujitsu Software
+     Corporation, Norman Walsh, Sun Microsystems, Inc., and the
+     Organization for the Advancement of Structured Information
+     Standards (OASIS).
+
+     $Id: docbookx.dtd,v 1.1.1.1 2004/10/19 21:21:35 juntao Exp $
+
+     Permission to use, copy, modify and distribute the DocBook XML DTD
+     and its accompanying documentation for any purpose and without fee
+     is hereby granted in perpetuity, provided that the above copyright
+     notice and this paragraph appear in all copies.  The copyright
+     holders make no representation about the suitability of the DTD for
+     any purpose.  It is provided "as is" without expressed or implied
+     warranty.
+
+     If you modify the DocBook DTD in any way, except for declaring and
+     referencing additional sets of general entities and declaring
+     additional notations, label your DTD as a variant of DocBook.  See
+     the maintenance documentation for more information.
+
+     Please direct all questions, bug reports, or suggestions for
+     changes to the docbook at lists.oasis-open.org mailing list. For more
+     information, see http://www.oasis-open.org/docbook/.
+-->
+
+<!-- ...................................................................... -->
+
+<!-- This is the driver file for V4.3CR3 of the DocBook DTD.
+     Please use the following formal public identifier to identify it:
+
+     "-//OASIS//DTD DocBook XML V4.3CR3//EN"
+
+     For example, if your document's top-level element is Book, and
+     you are using DocBook directly, use the FPI in the DOCTYPE
+     declaration:
+
+     <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3CR3//EN"
+                    "http://www.oasis-open.org/docbook/xml/4.3b2/docbookx.dtd"
+                    [...]>
+
+     Or, if you have a higher-level driver file that customizes DocBook,
+     use the FPI in the parameter entity declaration:
+
+     <!ENTITY % DocBookDTD PUBLIC "-//OASIS//DTD DocBook XML V4.3CR3//EN"
+                "http://www.oasis-open.org/docbook/xml/4.3b2/docbookx.dtd">
+     %DocBookDTD;
+
+     See the documentation for detailed information on the parameter
+     entity and module scheme used in DocBook, customizing DocBook and
+     planning for interchange, and changes made since the last release
+     of DocBook.
+-->
+
+<!-- ...................................................................... -->
+<!-- Enable SGML features ................................................. -->
+
+<!ENTITY % sgml.features "IGNORE">
+<![%sgml.features;[
+<!ENTITY % xml.features "IGNORE">
+]]>
+<!ENTITY % xml.features "INCLUDE">
+
+<![%sgml.features;[
+<![%xml.features;[
+
+<!-- ERROR: Exactly one of xml.features and sgml.features must be turned on! -->
+<!ENTITY % dbnotn SYSTEM "http://www.oasis-open.org/docbook/xml/configerror.txt">
+<!ENTITY % dbcent SYSTEM "http://www.oasis-open.org/docbook/xml/configerror.txt">
+<!ENTITY % dbpool SYSTEM "http://www.oasis-open.org/docbook/xml/configerror.txt">
+<!ENTITY % dbhier SYSTEM "http://www.oasis-open.org/docbook/xml/configerror.txt">
+<!ENTITY % dbgenent SYSTEM "http://www.oasis-open.org/docbook/xml/configerror.txt">
+
+]]>
+]]>
+
+<![%sgml.features;[
+<!ENTITY % ho "- O">
+<!ENTITY % hh "- -">
+]]>
+
+<![%xml.features;[
+<!ENTITY % ho "">
+<!ENTITY % hh "">
+]]>
+
+<!-- ...................................................................... -->
+<!-- Notation declarations ................................................ -->
+
+<!ENTITY % dbnotn.module "INCLUDE">
+<![%dbnotn.module;[
+<!ENTITY % dbnotn PUBLIC
+"-//OASIS//ENTITIES DocBook Notations V4.3CR3//EN"
+"dbnotnx.mod">
+%dbnotn;
+]]>
+
+<!-- ...................................................................... -->
+<!-- ISO character entity sets ............................................ -->
+
+<!ENTITY % dbcent.module "INCLUDE">
+<![%dbcent.module;[
+
+<![%sgml.features;[
+<!ENTITY euro SDATA "[euro  ]"><!-- euro sign -->
+]]>
+<![%xml.features;[
+<!ENTITY euro "&#x20AC;"><!-- euro sign, U+20AC NEW -->
+]]>
+
+<!ENTITY % dbcent PUBLIC
+"-//OASIS//ENTITIES DocBook Character Entities V4.3CR3//EN"
+"dbcentx.mod">
+%dbcent;
+]]>
+
+<!-- ...................................................................... -->
+<!-- DTD modules .......................................................... -->
+
+<!-- Information pool .............. -->
+
+<!ENTITY % dbpool.module "INCLUDE">
+<![ %dbpool.module; [
+<!ENTITY % dbpool PUBLIC
+"-//OASIS//ELEMENTS DocBook Information Pool V4.3CR3//EN"
+"dbpoolx.mod">
+%dbpool;
+]]>
+
+<!-- Redeclaration placeholder ..... -->
+
+<!ENTITY % intermod.redecl.module "IGNORE">
+<![%intermod.redecl.module;[
+<!-- Defining rdbmods here makes some buggy XML parsers happy. -->
+<!ENTITY % rdbmods "">
+%rdbmods;
+<!--end of intermod.redecl.module-->]]>
+
+<!-- Document hierarchy ............ -->
+
+<!ENTITY % dbhier.module "INCLUDE">
+<![ %dbhier.module; [
+<!ENTITY % dbhier PUBLIC
+"-//OASIS//ELEMENTS DocBook Document Hierarchy V4.3CR3//EN"
+"dbhierx.mod">
+%dbhier;
+]]>
+
+<!-- ...................................................................... -->
+<!-- Other general entities ............................................... -->
+
+<!ENTITY % dbgenent.module "INCLUDE">
+<![ %dbgenent.module; [
+<!ENTITY % dbgenent PUBLIC
+"-//OASIS//ENTITIES DocBook Additional General Entities V4.3CR3//EN"
+"dbgenent.mod">
+%dbgenent;
+]]>
+
+<!-- End of DocBook XML DTD V4.3CR3 .......................................... -->
+<!-- ...................................................................... -->

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-amsa.ent
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-amsa.ent	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-amsa.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,63 @@
+<!-- iso-amsa.ent (initially distributed with DocBook XML DTD V4.1.1beta1) -->
+
+<!-- Derived from the corresponding ISO 8879 standard entity set
+     and the Unicode character mappings provided by Sebastian Rahtz
+     With additional derivations from
+     ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/MISC/SGML.TXT -->
+
+<!ENTITY cularr	"&#x21B6;"> <!-- ANTICLOCKWISE TOP SEMICIRCLE ARROW -->
+<!ENTITY curarr	"&#x21B7;"> <!-- CLOCKWISE TOP SEMICIRCLE ARROW -->
+<!ENTITY dArr	"&#x21D3;"> <!-- DOWNWARDS DOUBLE ARROW -->
+<!ENTITY darr2	"&#x21CA;"> <!-- DOWNWARDS PAIRED ARROWS -->
+<!ENTITY dharl	"&#x21C3;"> <!-- DOWNWARDS HARPOON WITH BARB LEFTWARDS -->
+<!ENTITY dharr	"&#x21C2;"> <!-- DOWNWARDS HARPOON WITH BARB RIGHTWARDS -->
+<!ENTITY lAarr	"&#x21DA;"> <!-- LEFTWARDS TRIPLE ARROW -->
+<!ENTITY Larr	"&#x219E;"> <!-- LEFTWARDS TWO HEADED ARROW -->
+<!ENTITY larr2	"&#x21C7;"> <!-- LEFTWARDS PAIRED ARROWS -->
+<!ENTITY larrhk	"&#x21A9;"> <!-- LEFTWARDS ARROW WITH HOOK -->
+<!ENTITY larrlp	"&#x21AB;"> <!-- LEFTWARDS ARROW WITH LOOP -->
+<!ENTITY larrtl	"&#x21A2;"> <!-- LEFTWARDS ARROW WITH TAIL -->
+<!ENTITY lhard	"&#x21BD;"> <!-- LEFTWARDS HARPOON WITH BARB DOWNWARDS -->
+<!ENTITY lharu	"&#x21BC;"> <!-- LEFTWARDS HARPOON WITH BARB UPWARDS -->
+<!ENTITY hArr	"&#x21D4;"> <!--  -->
+<!ENTITY harr	"&#x2194;"> <!-- LEFT RIGHT ARROW -->
+<!ENTITY lrarr2	"&#x21C6;"> <!-- LEFTWARDS ARROW OVER RIGHTWARDS ARROW -->
+<!ENTITY rlarr2	"&#x21C4;"> <!-- RIGHTWARDS ARROW OVER LEFTWARDS ARROW -->
+<!ENTITY harrw	"&#x21AD;"> <!-- LEFT RIGHT WAVE ARROW -->
+<!ENTITY rlhar2	"&#x21CC;"> <!-- RIGHTWARDS HARPOON OVER LEFTWARDS HARPOON -->
+<!ENTITY lrhar2	"&#x21CB;"> <!-- LEFTWARDS HARPOON OVER RIGHTWARDS HARPOON -->
+<!ENTITY lsh	"&#x21B0;"> <!-- UPWARDS ARROW WITH TIP LEFTWARDS -->
+<!ENTITY map	"&#x21A6;"> <!-- RIGHTWARDS ARROW FROM BAR -->
+<!ENTITY mumap	"&#x22B8;"> <!-- MULTIMAP -->
+<!ENTITY nearr	"&#x2197;"> <!-- NORTH EAST ARROW -->
+<!ENTITY nlArr	"&#x21CD;"> <!-- LEFTWARDS DOUBLE ARROW WITH STROKE -->
+<!ENTITY nlarr	"&#x219A;"> <!-- LEFTWARDS ARROW WITH STROKE -->
+<!ENTITY nhArr	"&#x21CE;"> <!-- LEFT RIGHT DOUBLE ARROW WITH STROKE -->
+<!ENTITY nharr	"&#x21AE;"> <!-- LEFT RIGHT ARROW WITH STROKE -->
+<!ENTITY nrarr	"&#x219B;"> <!-- RIGHTWARDS ARROW WITH STROKE -->
+<!ENTITY nrArr	"&#x21CF;"> <!-- RIGHTWARDS DOUBLE ARROW WITH STROKE -->
+<!ENTITY nwarr	"&#x2196;"> <!-- NORTH WEST ARROW -->
+<!ENTITY olarr	"&#x21BA;"> <!-- ANTICLOCKWISE OPEN CIRCLE ARROW -->
+<!ENTITY orarr	"&#x21BB;"> <!-- CLOCKWISE OPEN CIRCLE ARROW -->
+<!ENTITY rAarr	"&#x21DB;"> <!-- RIGHTWARDS TRIPLE ARROW -->
+<!ENTITY Rarr	"&#x21A0;"> <!-- RIGHTWARDS TWO HEADED ARROW -->
+<!ENTITY rarr2	"&#x21C9;"> <!-- RIGHTWARDS PAIRED ARROWS -->
+<!ENTITY rarrhk	"&#x21AA;"> <!-- RIGHTWARDS ARROW WITH HOOK -->
+<!ENTITY rarrlp	"&#x21AC;"> <!-- RIGHTWARDS ARROW WITH LOOP -->
+<!ENTITY rarrtl	"&#x21A3;"> <!-- RIGHTWARDS ARROW WITH TAIL -->
+<!ENTITY rarrw	"&#x219D;"> <!-- RIGHTWARDS SQUIGGLE ARROW -->
+<!ENTITY rhard	"&#x21C1;"> <!-- RIGHTWARDS HARPOON WITH BARB DOWNWARDS -->
+<!ENTITY rharu	"&#x21C0;"> <!-- RIGHTWARDS HARPOON WITH BARB UPWARDS -->
+<!ENTITY rsh	"&#x21B1;"> <!-- UPWARDS ARROW WITH TIP RIGHTWARDS -->
+<!ENTITY drarr	"&#x2198;"> <!-- SOUTH EAST ARROW -->
+<!ENTITY dlarr	"&#x2199;"> <!-- SOUTH WEST ARROW -->
+<!ENTITY uArr	"&#x21D1;"> <!-- UPWARDS DOUBLE ARROW -->
+<!ENTITY uarr2	"&#x21C8;"> <!-- UPWARDS PAIRED ARROWS -->
+<!ENTITY vArr	"&#x21D5;"> <!-- UP DOWN DOUBLE ARROW -->
+<!ENTITY varr	"&#x2195;"> <!-- UP DOWN ARROW -->
+<!ENTITY uharl	"&#x21BF;"> <!-- UPWARDS HARPOON WITH BARB LEFTWARDS -->
+<!ENTITY uharr	"&#x21BE;"> <!-- UPWARDS HARPOON WITH BARB RIGHTWARDS -->
+<!ENTITY xlArr	"&#x21D0;"> <!-- LEFTWARDS DOUBLE ARROW -->
+<!ENTITY xhArr	"&#x2194;"> <!-- LEFT RIGHT ARROW -->
+<!ENTITY xharr	"&#x2194;"> <!-- LEFT RIGHT ARROW -->
+<!ENTITY xrArr	"&#x21D2;"> <!-- RIGHTWARDS DOUBLE ARROW -->

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-amsb.ent
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-amsb.ent	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-amsb.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,49 @@
+<!-- iso-amsb.ent (initially distributed with DocBook XML DTD V4.1.1beta1) -->
+
+<!-- Derived from the corresponding ISO 8879 standard entity set
+     and the Unicode character mappings provided by Sebastian Rahtz.
+     With additional derivations from
+     ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/MISC/SGML.TXT -->
+
+<!ENTITY amalg	"&#x2210;"> <!-- N-ARY COPRODUCT -->
+<!ENTITY Barwed	"&#x2306;"> <!-- PERSPECTIVE -->
+<!ENTITY barwed	"&#x22BC;"> <!-- NAND -->
+<!ENTITY Cap	"&#x22D2;"> <!-- DOUBLE INTERSECTION -->
+<!ENTITY Cup	"&#x22D3;"> <!-- DOUBLE UNION -->
+<!ENTITY cuvee	"&#x22CE;"> <!-- CURLY LOGICAL OR -->
+<!ENTITY cuwed	"&#x22CF;"> <!-- CURLY LOGICAL AND -->
+<!ENTITY diam	"&#x22C4;"> <!-- DIAMOND OPERATOR -->
+<!ENTITY divonx	"&#x22C7;"> <!-- DIVISION TIMES -->
+<!ENTITY intcal	"&#x22BA;"> <!-- INTERCALATE -->
+<!ENTITY lthree	"&#x22CB;"> <!-- LEFT SEMIDIRECT PRODUCT -->
+<!ENTITY ltimes	"&#x22C9;"> <!-- LEFT NORMAL FACTOR SEMIDIRECT PRODUCT -->
+<!ENTITY minusb	"&#x229F;"> <!-- SQUARED MINUS -->
+<!ENTITY oast	"&#x229B;"> <!-- CIRCLED ASTERISK OPERATOR -->
+<!ENTITY ocir	"&#x229A;"> <!-- CIRCLED RING OPERATOR -->
+<!ENTITY odash	"&#x229D;"> <!-- CIRCLED DASH -->
+<!ENTITY odot	"&#x2299;"> <!-- CIRCLED DOT OPERATOR -->
+<!ENTITY ominus	"&#x2296;"> <!-- CIRCLED MINUS -->
+<!ENTITY oplus	"&#x2295;"> <!-- CIRCLED PLUS -->
+<!ENTITY osol	"&#x2298;"> <!-- CIRCLED DIVISION SLASH -->
+<!ENTITY otimes	"&#x2297;"> <!-- CIRCLED TIMES -->
+<!ENTITY plusb	"&#x229E;"> <!-- SQUARED PLUS -->
+<!ENTITY plusdo	"&#x2214;"> <!-- DOT PLUS -->
+<!ENTITY rthree	"&#x22CC;"> <!-- RIGHT SEMIDIRECT PRODUCT -->
+<!ENTITY rtimes	"&#x22CA;"> <!-- RIGHT NORMAL FACTOR SEMIDIRECT PRODUCT -->
+<!ENTITY sdot	"&#x22C5;"> <!-- DOT OPERATOR -->
+<!ENTITY sdotb	"&#x22A1;"> <!-- SQUARED DOT OPERATOR -->
+<!ENTITY setmn	"&#x2216;"> <!-- SET MINUS -->
+<!ENTITY sqcap	"&#x2293;"> <!-- SQUARE CAP -->
+<!ENTITY sqcup	"&#x2294;"> <!-- SQUARE CUP -->
+<!ENTITY ssetmn	"&#x2216;"> <!-- SET MINUS -->
+<!ENTITY sstarf	"&#x22C6;"> <!-- STAR OPERATOR -->
+<!ENTITY timesb	"&#x22A0;"> <!-- SQUARED TIMES -->
+<!ENTITY top	"&#x22A4;"> <!-- DOWN TACK -->
+<!ENTITY uplus	"&#x228E;"> <!-- MULTISET UNION -->
+<!ENTITY wreath	"&#x2240;"> <!-- WREATH PRODUCT -->
+<!ENTITY xcirc	"&#x25CB;"> <!-- WHITE CIRCLE -->
+<!ENTITY xdtri	"&#x25BD;"> <!-- WHITE DOWN-POINTING TRIANGLE -->
+<!ENTITY xutri	"&#x25B3;"> <!-- WHITE UP-POINTING TRIANGLE -->
+<!ENTITY coprod	"&#x2210;"> <!-- N-ARY COPRODUCT -->
+<!ENTITY prod	"&#x220F;"> <!-- N-ARY PRODUCT -->
+<!ENTITY sum	"&#x2211;"> <!-- N-ARY SUMMATION -->

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-amsc.ent
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-amsc.ent	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-amsc.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,15 @@
+<!-- iso-amsc.ent (initially distributed with DocBook XML DTD V4.1.1beta1) -->
+
+<!-- Derived from the corresponding ISO 8879 standard entity set
+     and the Unicode character mappings provided by Sebastian Rahtz -->
+
+<!ENTITY rceil	"&#x2309;"> <!-- RIGHT CEILING -->
+<!ENTITY rfloor	"&#x230B;"> <!-- RIGHT FLOOR -->
+<!ENTITY rpargt	"&#xE291;"> <!--  -->
+<!ENTITY urcorn	"&#x231D;"> <!-- TOP RIGHT CORNER -->
+<!ENTITY drcorn	"&#x231F;"> <!-- BOTTOM RIGHT CORNER -->
+<!ENTITY lceil	"&#x2308;"> <!-- LEFT CEILING -->
+<!ENTITY lfloor	"&#x230A;"> <!-- LEFT FLOOR -->
+<!--     lpargt	Unknown unicode character -->
+<!ENTITY ulcorn	"&#x231C;"> <!-- TOP LEFT CORNER -->
+<!ENTITY dlcorn	"&#x231E;"> <!-- BOTTOM LEFT CORNER -->

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-amsn.ent
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-amsn.ent	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-amsn.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,66 @@
+<!-- iso-amsn.ent (initially distributed with DocBook XML DTD V4.1.1beta1) -->
+
+<!-- Derived from the corresponding ISO 8879 standard entity set
+     and the Unicode character mappings provided by Sebastian Rahtz
+     With additional derivations from
+     ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/MISC/SGML.TXT -->
+
+<!ENTITY gnap	"&#xE411;"> <!--  -->
+<!ENTITY gne	"&#x2269;"> <!--  -->
+<!ENTITY gnE	"&#x2269;"> <!--  -->
+<!ENTITY gnsim	"&#x22E7;"> <!-- GREATER-THAN BUT NOT EQUIVALENT TO -->
+<!ENTITY gvnE	"&#x2269;"> <!-- GREATER-THAN BUT NOT EQUAL TO -->
+<!ENTITY lnap	"&#xE2A2;"> <!--  -->
+<!ENTITY lnE	"&#x2268;"> <!--  -->
+<!ENTITY lne	"&#x2268;"> <!--  -->
+<!ENTITY lnsim	"&#x22E6;"> <!--  -->
+<!ENTITY lvnE	"&#x2268;"> <!-- LESS-THAN BUT NOT EQUAL TO -->
+<!ENTITY nap	"&#x2249;"> <!-- NOT ALMOST EQUAL TO -->
+<!ENTITY ncong	"&#x2247;"> <!-- NEITHER APPROXIMATELY NOR ACTUALLY EQUAL TO -->
+<!ENTITY nequiv	"&#x2262;"> <!-- NOT IDENTICAL TO -->
+<!ENTITY ngE	"&#x2271;"> <!--  -->
+<!ENTITY nge	"&#x2271;"> <!-- NEITHER GREATER-THAN NOR EQUAL TO -->
+<!ENTITY nges	"&#x2271;"> <!--  -->
+<!ENTITY ngt	"&#x226F;"> <!-- NOT GREATER-THAN -->
+<!ENTITY nle	"&#x2270;"> <!-- NEITHER LESS-THAN NOR EQUAL TO -->
+<!ENTITY nlE	"&#x2270;"> <!--  -->
+<!ENTITY nles	"&#x2270;"> <!--  -->
+<!ENTITY nlt	"&#x226E;"> <!-- NOT LESS-THAN -->
+<!ENTITY nltri	"&#x22EA;"> <!-- NOT NORMAL SUBGROUP OF -->
+<!ENTITY nltrie	"&#x22EC;"> <!-- NOT NORMAL SUBGROUP OF OR EQUAL TO -->
+<!ENTITY nmid	"&#x2224;"> <!-- DOES NOT DIVIDE -->
+<!ENTITY npar	"&#x2226;"> <!-- NOT PARALLEL TO -->
+<!ENTITY npr	"&#x2280;"> <!-- DOES NOT PRECEDE -->
+<!ENTITY npre	"&#x22E0;"> <!-- DOES NOT PRECEDE OR EQUAL -->
+<!ENTITY nrtri	"&#x22EB;"> <!-- DOES NOT CONTAIN AS NORMAL SUBGROUP -->
+<!ENTITY nrtrie	"&#x22ED;"> <!-- DOES NOT CONTAIN AS NORMAL SUBGROUP OR EQUAL -->
+<!ENTITY nsc	"&#x2281;"> <!-- DOES NOT SUCCEED -->
+<!ENTITY nsce	"&#x22E1;"> <!-- DOES NOT SUCCEED OR EQUAL -->
+<!ENTITY nsim	"&#x2241;"> <!--  -->
+<!ENTITY nsime	"&#x2244;"> <!--  -->
+<!ENTITY nsmid	"&#xE2AA;"> <!--  -->
+<!ENTITY nspar	"&#x2226;"> <!-- NOT PARALLEL TO -->
+<!ENTITY nsub	"&#x2284;"> <!-- NOT A SUBSET OF -->
+<!ENTITY nsube	"&#x2288;"> <!--  -->
+<!ENTITY nsubE	"&#x2288;"> <!--  -->
+<!ENTITY nsup	"&#x2285;"> <!-- NOT A SUPERSET OF -->
+<!ENTITY nsupE	"&#x2289;"> <!--  -->
+<!ENTITY nsupe	"&#x2289;"> <!--  -->
+<!ENTITY nvdash	"&#x22AC;"> <!-- DOES NOT PROVE -->
+<!ENTITY nvDash	"&#x22AD;"> <!-- NOT TRUE -->
+<!ENTITY nVDash	"&#x22AF;"> <!-- NEGATED DOUBLE VERTICAL BAR DOUBLE RIGHT TURNSTILE -->
+<!ENTITY nVdash	"&#x22AE;"> <!-- DOES NOT FORCE -->
+<!ENTITY prnap	"&#x22E8;"> <!--  -->
+<!ENTITY prnE	"&#xE2B3;"> <!--  -->
+<!ENTITY prnsim	"&#x22E8;"> <!--  -->
+<!ENTITY scnap	"&#x22E9;"> <!--  -->
+<!ENTITY scnE	"&#xE2B5;"> <!--  -->
+<!ENTITY scnsim	"&#x22E9;"> <!--  -->
+<!ENTITY subne	"&#x228A;"> <!--  -->
+<!ENTITY subnE	"&#x228A;"> <!-- SUBSET OF WITH NOT EQUAL TO -->
+<!ENTITY supne	"&#x228B;"> <!--  -->
+<!ENTITY supnE	"&#x228B;"> <!--  -->
+<!ENTITY vsubnE	"&#xE2B8;"> <!--  -->
+<!ENTITY vsubne	"&#x228A;"> <!-- SUBSET OF WITH NOT EQUAL TO -->
+<!ENTITY vsupne	"&#x228B;"> <!-- SUPERSET OF WITH NOT EQUAL TO -->
+<!ENTITY vsupnE	"&#x228B;"> <!-- SUPERSET OF WITH NOT EQUAL TO -->

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-amso.ent
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-amso.ent	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-amso.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,26 @@
+<!-- iso-amso.ent (initially distributed with DocBook XML DTD V4.1.1beta1) -->
+
+<!-- Derived from the corresponding ISO 8879 standard entity set
+     and the Unicode character mappings provided by Sebastian Rahtz
+     With additional derivations from
+     ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/MISC/SGML.TXT -->
+
+<!ENTITY ang	"&#x2220;"> <!-- ANGLE -->
+<!ENTITY angmsd	"&#x2221;"> <!-- MEASURED ANGLE -->
+<!ENTITY beth	"&#x2136;"> <!-- BET SYMBOL -->
+<!ENTITY bprime	"&#x2035;"> <!-- REVERSED PRIME -->
+<!ENTITY comp	"&#x2201;"> <!-- COMPLEMENT -->
+<!ENTITY daleth	"&#x2138;"> <!-- DALET SYMBOL -->
+<!ENTITY ell	"&#x2113;"> <!-- SCRIPT SMALL L -->
+<!ENTITY empty	"&#x2205;"> <!--  -->
+<!ENTITY gimel	"&#x2137;"> <!-- GIMEL SYMBOL -->
+<!ENTITY image	"&#x2111;"> <!-- BLACK-LETTER CAPITAL I -->
+<!ENTITY inodot	"&#x0131;"> <!-- LATIN SMALL LETTER DOTLESS I -->
+<!--     jnodot	Unknown unicode character -->
+<!ENTITY nexist	"&#x2204;"> <!-- THERE DOES NOT EXIST -->
+<!ENTITY oS	"&#x24C8;"> <!-- CIRCLED LATIN CAPITAL LETTER S -->
+<!ENTITY planck	"&#x210F;"> <!-- PLANCK CONSTANT OVER TWO PI -->
+<!ENTITY real	"&#x211C;"> <!-- BLACK-LETTER CAPITAL R -->
+<!ENTITY sbsol	"&#xFE68;"> <!-- SMALL REVERSE SOLIDUS -->
+<!ENTITY vprime	"&#x2032;"> <!-- PRIME -->
+<!ENTITY weierp	"&#x2118;"> <!-- SCRIPT CAPITAL P -->

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-amsr.ent
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-amsr.ent	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-amsr.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,91 @@
+<!-- iso-amsr.ent (initially distributed with DocBook XML DTD V4.1.1beta1) -->
+
+<!-- Derived from the corresponding ISO 8879 standard entity set
+     and the Unicode character mappings provided by Sebastian Rahtz.
+     With additional derivations from
+     ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/MISC/SGML.TXT -->
+
+<!ENTITY ape	"&#x224A;"> <!--  -->
+<!ENTITY asymp	"&#x224D;"> <!-- EQUIVALENT TO -->
+<!ENTITY bcong	"&#x224C;"> <!-- ALL EQUAL TO -->
+<!ENTITY bepsi	"&#x220D;"> <!-- SMALL CONTAINS AS MEMBER -->
+<!ENTITY bowtie	"&#x22C8;"> <!--  -->
+<!ENTITY bsim	"&#x223D;"> <!--  -->
+<!ENTITY bsime	"&#x22CD;"> <!--  -->
+<!ENTITY bump	"&#x224E;"> <!--  -->
+<!ENTITY bumpe	"&#x224F;"> <!--  -->
+<!ENTITY cire	"&#x2257;"> <!--  -->
+<!ENTITY colone	"&#x2254;"> <!--  -->
+<!ENTITY cuepr	"&#x22DE;"> <!--  -->
+<!ENTITY cuesc	"&#x22DF;"> <!--  -->
+<!ENTITY cupre	"&#x227C;"> <!--  -->
+<!ENTITY dashv	"&#x22A3;"> <!--  -->
+<!ENTITY ecir	"&#x2256;"> <!--  -->
+<!ENTITY ecolon	"&#x2255;"> <!--  -->
+<!ENTITY eDot	"&#x2251;"> <!--  -->
+<!ENTITY esdot	"&#x2250;"> <!--  -->
+<!ENTITY efDot	"&#x2252;"> <!--  -->
+<!ENTITY egs	"&#x22DD;"> <!--  -->
+<!ENTITY els	"&#x22DC;"> <!--  -->
+<!ENTITY erDot	"&#x2253;"> <!--  -->
+<!ENTITY fork	"&#x22D4;"> <!--  -->
+<!ENTITY frown	"&#x2322;"> <!--  -->
+<!ENTITY gap	"&#x2273;"> <!-- GREATER-THAN OR EQUIVALENT TO -->
+<!ENTITY gsdot	"&#x22D7;"> <!--  -->
+<!ENTITY gE	"&#x2267;"> <!--  -->
+<!ENTITY gel	"&#x22DB;"> <!--  -->
+<!ENTITY gEl	"&#x22DB;"> <!--  -->
+<!ENTITY ges	"&#x2265;"> <!-- GREATER-THAN OR EQUAL TO -->
+<!ENTITY Gg	"&#x22D9;"> <!-- VERY MUCH GREATER-THAN -->
+<!ENTITY gl	"&#x2277;"> <!--  -->
+<!ENTITY gsim	"&#x2273;"> <!-- GREATER-THAN OR EQUIVALENT TO -->
+<!ENTITY Gt	"&#x226B;"> <!-- MUCH GREATER-THAN -->
+<!ENTITY lap	"&#x2272;"> <!-- LESS-THAN OR EQUIVALENT TO -->
+<!ENTITY ldot	"&#x22D6;"> <!--  -->
+<!ENTITY lE	"&#x2266;"> <!--  -->
+<!ENTITY lEg	"&#x22DA;"> <!--  -->
+<!ENTITY leg	"&#x22DA;"> <!--  -->
+<!ENTITY les	"&#x2264;"> <!-- LESS-THAN OR EQUAL TO -->
+<!ENTITY lg	"&#x2276;"> <!-- LESS-THAN OR GREATER-THAN -->
+<!ENTITY Ll	"&#x22D8;"> <!--  -->
+<!ENTITY lsim	"&#x2272;"> <!-- LESS-THAN OR EQUIVALENT TO -->
+<!ENTITY Lt	"&#x226A;"> <!-- MUCH LESS-THAN -->
+<!ENTITY ltrie	"&#x22B4;"> <!--  -->
+<!ENTITY mid	"&#x2223;"> <!--  -->
+<!ENTITY models	"&#x22A7;"> <!-- MODELS -->
+<!ENTITY pr	"&#x227A;"> <!--  -->
+<!ENTITY prap	"&#x227E;"> <!--  -->
+<!ENTITY pre	"&#x227C;"> <!--  -->
+<!ENTITY prsim	"&#x227E;"> <!--  -->
+<!ENTITY rtrie	"&#x22B5;"> <!--  -->
+<!ENTITY samalg	"&#x2210;"> <!--  -->
+<!ENTITY sc	"&#x227B;"> <!--  -->
+<!ENTITY scap	"&#x227F;"> <!--  -->
+<!ENTITY sccue	"&#x227D;"> <!--  -->
+<!ENTITY sce	"&#x227D;"> <!--  -->
+<!ENTITY scsim	"&#x227F;"> <!--  -->
+<!ENTITY sfrown	"&#x2322;"> <!-- FROWN -->
+<!ENTITY smid	"&#xE301;"> <!--  -->
+<!ENTITY smile	"&#x2323;"> <!--  -->
+<!ENTITY spar	"&#x2225;"> <!-- PARALLEL TO -->
+<!ENTITY sqsub	"&#x228F;"> <!--  -->
+<!ENTITY sqsube	"&#x2291;"> <!--  -->
+<!ENTITY sqsup	"&#x2290;"> <!--  -->
+<!ENTITY sqsupe	"&#x2292;"> <!--  -->
+<!ENTITY ssmile	"&#x2323;"> <!-- SMILE -->
+<!ENTITY Sub	"&#x22D0;"> <!--  -->
+<!ENTITY subE	"&#x2286;"> <!--  -->
+<!ENTITY Sup	"&#x22D1;"> <!--  -->
+<!ENTITY supE	"&#x2287;"> <!--  -->
+<!ENTITY thkap	"&#x2248;"> <!-- ALMOST EQUAL TO -->
+<!ENTITY thksim	"&#x223C;"> <!-- TILDE OPERATOR -->
+<!ENTITY trie	"&#x225C;"> <!--  -->
+<!ENTITY twixt	"&#x226C;"> <!-- BETWEEN -->
+<!ENTITY vdash	"&#x22A2;"> <!--  -->
+<!ENTITY Vdash	"&#x22A9;"> <!--  -->
+<!ENTITY vDash	"&#x22A8;"> <!--  -->
+<!ENTITY veebar	"&#x22BB;"> <!--  -->
+<!ENTITY vltri	"&#x22B2;"> <!--  -->
+<!ENTITY vprop	"&#x221D;"> <!--  -->
+<!ENTITY vrtri	"&#x22B3;"> <!--  -->
+<!ENTITY Vvdash	"&#x22AA;"> <!--  -->

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-box.ent
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-box.ent	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-box.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,45 @@
+<!-- iso-box.ent (initially distributed with DocBook XML DTD V4.1.1beta1) -->
+
+<!-- Derived from the corresponding ISO 8879 standard entity set
+     and the Unicode character mappings provided by Sebastian Rahtz -->
+
+<!ENTITY boxh	"&#x2500;"> <!-- BOX DRAWINGS LIGHT HORIZONTAL -->
+<!ENTITY boxv	"&#x2502;"> <!-- BOX DRAWINGS LIGHT VERTICAL -->
+<!ENTITY boxur	"&#x2514;"> <!-- BOX DRAWINGS LIGHT UP AND RIGHT -->
+<!ENTITY boxul	"&#x2518;"> <!-- BOX DRAWINGS LIGHT UP AND LEFT -->
+<!ENTITY boxdl	"&#x2510;"> <!-- BOX DRAWINGS LIGHT DOWN AND LEFT -->
+<!ENTITY boxdr	"&#x250C;"> <!-- BOX DRAWINGS LIGHT DOWN AND RIGHT -->
+<!ENTITY boxvr	"&#x251C;"> <!-- BOX DRAWINGS LIGHT VERTICAL AND RIGHT -->
+<!ENTITY boxhu	"&#x2534;"> <!-- BOX DRAWINGS LIGHT UP AND HORIZONTAL -->
+<!ENTITY boxvl	"&#x2524;"> <!-- BOX DRAWINGS LIGHT VERTICAL AND LEFT -->
+<!ENTITY boxhd	"&#x252C;"> <!-- BOX DRAWINGS LIGHT DOWN AND HORIZONTAL -->
+<!ENTITY boxvh	"&#x253C;"> <!-- BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL -->
+<!ENTITY boxvR	"&#x255E;"> <!-- BOX DRAWINGS VERTICAL SINGLE AND RIGHT DOUBLE -->
+<!ENTITY boxhU	"&#x2567;"> <!-- BOX DRAWINGS UP SINGLE AND HORIZONTAL DOUBLE -->
+<!ENTITY boxvL	"&#x2561;"> <!-- BOX DRAWINGS VERTICAL SINGLE AND LEFT DOUBLE -->
+<!ENTITY boxhD	"&#x2564;"> <!-- BOX DRAWINGS DOWN SINGLE AND HORIZONTAL DOUBLE -->
+<!ENTITY boxvH	"&#x256A;"> <!-- BOX DRAWINGS VERTICAL SINGLE AND HORIZONTAL DOUBLE -->
+<!ENTITY boxH	"&#x2550;"> <!-- BOX DRAWINGS DOUBLE HORIZONTAL -->
+<!ENTITY boxV	"&#x2551;"> <!-- BOX DRAWINGS DOUBLE VERTICAL -->
+<!ENTITY boxUR	"&#x2558;"> <!-- BOX DRAWINGS UP SINGLE AND RIGHT DOUBLE -->
+<!ENTITY boxUL	"&#x255B;"> <!-- BOX DRAWINGS UP SINGLE AND LEFT DOUBLE -->
+<!ENTITY boxDL	"&#x2555;"> <!-- BOX DRAWINGS DOWN SINGLE AND LEFT DOUBLE -->
+<!ENTITY boxDR	"&#x2552;"> <!-- BOX DRAWINGS DOWN SINGLE AND RIGHT DOUBLE -->
+<!ENTITY boxVR	"&#x255F;"> <!-- BOX DRAWINGS VERTICAL DOUBLE AND RIGHT SINGLE -->
+<!ENTITY boxHU	"&#x2568;"> <!-- BOX DRAWINGS UP DOUBLE AND HORIZONTAL SINGLE -->
+<!ENTITY boxVL	"&#x2562;"> <!-- BOX DRAWINGS VERTICAL DOUBLE AND LEFT SINGLE -->
+<!ENTITY boxHD	"&#x2565;"> <!-- BOX DRAWINGS DOWN DOUBLE AND HORIZONTAL SINGLE -->
+<!ENTITY boxVH	"&#x256B;"> <!-- BOX DRAWINGS VERTICAL DOUBLE AND HORIZONTAL SINGLE -->
+<!ENTITY boxVr	"&#x2560;"> <!-- BOX DRAWINGS DOUBLE VERTICAL AND RIGHT -->
+<!ENTITY boxHu	"&#x2569;"> <!-- BOX DRAWINGS DOUBLE UP AND HORIZONTAL -->
+<!ENTITY boxVl	"&#x2563;"> <!-- BOX DRAWINGS DOUBLE VERTICAL AND LEFT -->
+<!ENTITY boxHd	"&#x2566;"> <!-- BOX DRAWINGS DOUBLE DOWN AND HORIZONTAL -->
+<!ENTITY boxVh	"&#x256C;"> <!-- BOX DRAWINGS DOUBLE VERTICAL AND HORIZONTAL -->
+<!ENTITY boxuR	"&#x2559;"> <!-- BOX DRAWINGS UP DOUBLE AND RIGHT SINGLE -->
+<!ENTITY boxUl	"&#x255C;"> <!-- BOX DRAWINGS UP DOUBLE AND LEFT SINGLE -->
+<!ENTITY boxdL	"&#x2556;"> <!-- BOX DRAWINGS DOWN DOUBLE AND LEFT SINGLE -->
+<!ENTITY boxDr	"&#x2553;"> <!-- BOX DRAWINGS DOWN DOUBLE AND RIGHT SINGLE -->
+<!ENTITY boxUr	"&#x255A;"> <!-- BOX DRAWINGS DOUBLE UP AND RIGHT -->
+<!ENTITY boxuL	"&#x255D;"> <!-- BOX DRAWINGS DOUBLE UP AND LEFT -->
+<!ENTITY boxDl	"&#x2557;"> <!-- BOX DRAWINGS DOUBLE DOWN AND LEFT -->
+<!ENTITY boxdR	"&#x2554;"> <!-- BOX DRAWINGS DOUBLE DOWN AND RIGHT -->

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-cyr1.ent
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-cyr1.ent	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-cyr1.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,72 @@
+<!-- iso-cyr1.ent (initially distributed with DocBook XML DTD V4.1.1beta1) -->
+
+<!-- Derived from the corresponding ISO 8879 standard entity set
+     and the Unicode character mappings provided by Sebastian Rahtz -->
+
+<!ENTITY acy	"&#x0430;"> <!-- CYRILLIC SMALL LETTER A -->
+<!ENTITY Acy	"&#x0410;"> <!-- CYRILLIC CAPITAL LETTER A -->
+<!ENTITY bcy	"&#x0431;"> <!-- CYRILLIC SMALL LETTER BE -->
+<!ENTITY Bcy	"&#x0411;"> <!-- CYRILLIC CAPITAL LETTER BE -->
+<!ENTITY vcy	"&#x0432;"> <!-- CYRILLIC SMALL LETTER VE -->
+<!ENTITY Vcy	"&#x0412;"> <!-- CYRILLIC CAPITAL LETTER VE -->
+<!ENTITY gcy	"&#x0433;"> <!-- CYRILLIC SMALL LETTER GHE -->
+<!ENTITY Gcy	"&#x0413;"> <!-- CYRILLIC CAPITAL LETTER GHE -->
+<!ENTITY dcy	"&#x0434;"> <!-- CYRILLIC SMALL LETTER DE -->
+<!ENTITY Dcy	"&#x0414;"> <!-- CYRILLIC CAPITAL LETTER DE -->
+<!ENTITY iecy	"&#x0435;"> <!-- CYRILLIC SMALL LETTER IE -->
+<!ENTITY IEcy	"&#x0415;"> <!-- CYRILLIC CAPITAL LETTER IE -->
+<!ENTITY iocy	"&#x0451;"> <!-- CYRILLIC SMALL LETTER IO -->
+<!ENTITY IOcy	"&#x0401;"> <!-- CYRILLIC CAPITAL LETTER IO -->
+<!ENTITY zhcy	"&#x0436;"> <!-- CYRILLIC SMALL LETTER ZHE -->
+<!ENTITY ZHcy	"&#x0416;"> <!-- CYRILLIC CAPITAL LETTER ZHE -->
+<!ENTITY zcy	"&#x0437;"> <!-- CYRILLIC SMALL LETTER ZE -->
+<!ENTITY Zcy	"&#x0417;"> <!-- CYRILLIC CAPITAL LETTER ZE -->
+<!ENTITY icy	"&#x0438;"> <!-- CYRILLIC SMALL LETTER I -->
+<!ENTITY Icy	"&#x0418;"> <!-- CYRILLIC CAPITAL LETTER I -->
+<!ENTITY jcy	"&#x0439;"> <!-- CYRILLIC SMALL LETTER SHORT I -->
+<!ENTITY Jcy	"&#x0419;"> <!-- CYRILLIC CAPITAL LETTER SHORT I -->
+<!ENTITY kcy	"&#x043A;"> <!-- CYRILLIC SMALL LETTER KA -->
+<!ENTITY Kcy	"&#x041A;"> <!-- CYRILLIC CAPITAL LETTER KA -->
+<!ENTITY lcy	"&#x043B;"> <!-- CYRILLIC SMALL LETTER EL -->
+<!ENTITY Lcy	"&#x041B;"> <!-- CYRILLIC CAPITAL LETTER EL -->
+<!ENTITY mcy	"&#x043C;"> <!-- CYRILLIC SMALL LETTER EM -->
+<!ENTITY Mcy	"&#x041C;"> <!-- CYRILLIC CAPITAL LETTER EM -->
+<!ENTITY ncy	"&#x043D;"> <!-- CYRILLIC SMALL LETTER EN -->
+<!ENTITY Ncy	"&#x041D;"> <!-- CYRILLIC CAPITAL LETTER EN -->
+<!ENTITY ocy	"&#x043E;"> <!-- CYRILLIC SMALL LETTER O -->
+<!ENTITY Ocy	"&#x041E;"> <!-- CYRILLIC CAPITAL LETTER O -->
+<!ENTITY pcy	"&#x043F;"> <!-- CYRILLIC SMALL LETTER PE -->
+<!ENTITY Pcy	"&#x041F;"> <!-- CYRILLIC CAPITAL LETTER PE -->
+<!ENTITY rcy	"&#x0440;"> <!-- CYRILLIC SMALL LETTER ER -->
+<!ENTITY Rcy	"&#x0420;"> <!-- CYRILLIC CAPITAL LETTER ER -->
+<!ENTITY scy	"&#x0441;"> <!-- CYRILLIC SMALL LETTER ES -->
+<!ENTITY Scy	"&#x0421;"> <!-- CYRILLIC CAPITAL LETTER ES -->
+<!ENTITY tcy	"&#x0442;"> <!-- CYRILLIC SMALL LETTER TE -->
+<!ENTITY Tcy	"&#x0422;"> <!-- CYRILLIC CAPITAL LETTER TE -->
+<!ENTITY ucy	"&#x0443;"> <!-- CYRILLIC SMALL LETTER U -->
+<!ENTITY Ucy	"&#x0423;"> <!-- CYRILLIC CAPITAL LETTER U -->
+<!ENTITY fcy	"&#x0444;"> <!-- CYRILLIC SMALL LETTER EF -->
+<!ENTITY Fcy	"&#x0424;"> <!-- CYRILLIC CAPITAL LETTER EF -->
+<!ENTITY khcy	"&#x0445;"> <!-- CYRILLIC SMALL LETTER HA -->
+<!ENTITY KHcy	"&#x0425;"> <!-- CYRILLIC CAPITAL LETTER HA -->
+<!ENTITY tscy	"&#x0446;"> <!-- CYRILLIC SMALL LETTER TSE -->
+<!ENTITY TScy	"&#x0426;"> <!-- CYRILLIC CAPITAL LETTER TSE -->
+<!ENTITY chcy	"&#x0447;"> <!-- CYRILLIC SMALL LETTER CHE -->
+<!ENTITY CHcy	"&#x0427;"> <!-- CYRILLIC CAPITAL LETTER CHE -->
+<!ENTITY shcy	"&#x0448;"> <!-- CYRILLIC SMALL LETTER SHA -->
+<!ENTITY SHcy	"&#x0428;"> <!-- CYRILLIC CAPITAL LETTER SHA -->
+<!ENTITY shchcy	"&#x0449;"> <!-- CYRILLIC SMALL LETTER SHCHA -->
+<!ENTITY SHCHcy	"&#x0429;"> <!-- CYRILLIC CAPITAL LETTER SHCHA -->
+<!ENTITY hardcy	"&#x044A;"> <!-- CYRILLIC SMALL LETTER HARD SIGN -->
+<!ENTITY HARDcy	"&#x042A;"> <!-- CYRILLIC CAPITAL LETTER HARD SIGN -->
+<!ENTITY ycy	"&#x044B;"> <!-- CYRILLIC SMALL LETTER YERU -->
+<!ENTITY Ycy	"&#x042B;"> <!-- CYRILLIC CAPITAL LETTER YERU -->
+<!ENTITY softcy	"&#x044C;"> <!-- CYRILLIC SMALL LETTER SOFT SIGN -->
+<!ENTITY SOFTcy	"&#x042C;"> <!-- CYRILLIC CAPITAL LETTER SOFT SIGN -->
+<!ENTITY ecy	"&#x044D;"> <!-- CYRILLIC SMALL LETTER E -->
+<!ENTITY Ecy	"&#x042D;"> <!-- CYRILLIC CAPITAL LETTER E -->
+<!ENTITY yucy	"&#x044E;"> <!-- CYRILLIC SMALL LETTER YU -->
+<!ENTITY YUcy	"&#x042E;"> <!-- CYRILLIC CAPITAL LETTER YU -->
+<!ENTITY yacy	"&#x044F;"> <!-- CYRILLIC SMALL LETTER YA -->
+<!ENTITY YAcy	"&#x042F;"> <!-- CYRILLIC CAPITAL LETTER YA -->
+<!ENTITY numero	"&#x2116;"> <!-- NUMERO SIGN -->

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-cyr2.ent
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-cyr2.ent	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-cyr2.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,31 @@
+<!-- iso-cyr2.ent (initially distributed with DocBook XML DTD V4.1.1beta1) -->
+
+<!-- Derived from the corresponding ISO 8879 standard entity set
+     and the Unicode character mappings provided by Sebastian Rahtz -->
+
+<!ENTITY djcy	"&#x0452;"> <!-- CYRILLIC SMALL LETTER DJE -->
+<!ENTITY DJcy	"&#x0402;"> <!-- CYRILLIC CAPITAL LETTER DJE -->
+<!ENTITY gjcy	"&#x0453;"> <!-- CYRILLIC SMALL LETTER GJE -->
+<!ENTITY GJcy	"&#x0403;"> <!-- CYRILLIC CAPITAL LETTER GJE -->
+<!ENTITY jukcy	"&#x0454;"> <!-- CYRILLIC SMALL LETTER UKRAINIAN IE -->
+<!ENTITY Jukcy	"&#x0404;"> <!-- CYRILLIC CAPITAL LETTER UKRAINIAN IE -->
+<!ENTITY dscy	"&#x0455;"> <!-- CYRILLIC SMALL LETTER DZE -->
+<!ENTITY DScy	"&#x0405;"> <!-- CYRILLIC CAPITAL LETTER DZE -->
+<!ENTITY iukcy	"&#x0456;"> <!-- CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I -->
+<!ENTITY Iukcy	"&#x0406;"> <!-- CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I -->
+<!ENTITY yicy	"&#x0457;"> <!-- CYRILLIC SMALL LETTER YI -->
+<!ENTITY YIcy	"&#x0407;"> <!-- CYRILLIC CAPITAL LETTER YI -->
+<!ENTITY jsercy	"&#x0458;"> <!-- CYRILLIC SMALL LETTER JE -->
+<!ENTITY Jsercy	"&#x0408;"> <!-- CYRILLIC CAPITAL LETTER JE -->
+<!ENTITY ljcy	"&#x0459;"> <!-- CYRILLIC SMALL LETTER LJE -->
+<!ENTITY LJcy	"&#x0409;"> <!-- CYRILLIC CAPITAL LETTER LJE -->
+<!ENTITY njcy	"&#x045A;"> <!-- CYRILLIC SMALL LETTER NJE -->
+<!ENTITY NJcy	"&#x040A;"> <!-- CYRILLIC CAPITAL LETTER NJE -->
+<!ENTITY tshcy	"&#x045B;"> <!-- CYRILLIC SMALL LETTER TSHE -->
+<!ENTITY TSHcy	"&#x040B;"> <!-- CYRILLIC CAPITAL LETTER TSHE -->
+<!ENTITY kjcy	"&#x045C;"> <!-- CYRILLIC SMALL LETTER KJE -->
+<!ENTITY KJcy	"&#x040C;"> <!-- CYRILLIC CAPITAL LETTER KJE -->
+<!ENTITY ubrcy	"&#x045E;"> <!-- CYRILLIC SMALL LETTER SHORT U -->
+<!ENTITY Ubrcy	"&#x040E;"> <!-- CYRILLIC CAPITAL LETTER SHORT U -->
+<!ENTITY dzcy	"&#x045F;"> <!-- CYRILLIC SMALL LETTER DZHE -->
+<!ENTITY DZcy	"&#x040F;"> <!-- CYRILLIC CAPITAL LETTER DZHE -->

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-dia.ent
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-dia.ent	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-dia.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,19 @@
+<!-- iso-dia.ent (initially distributed with DocBook XML DTD V4.1.1beta1) -->
+
+<!-- Derived from the corresponding ISO 8879 standard entity set
+     and the Unicode character mappings provided by Sebastian Rahtz -->
+
+<!ENTITY acute	"&#x00B4;"> <!-- ACUTE ACCENT -->
+<!ENTITY breve	"&#x02D8;"> <!-- BREVE -->
+<!ENTITY caron	"&#x02C7;"> <!-- CARON -->
+<!ENTITY cedil	"&#x00B8;"> <!-- CEDILLA -->
+<!ENTITY circ	"&#x005E;"> <!-- RING OPERATOR -->
+<!ENTITY dblac	"&#x02DD;"> <!-- DOUBLE ACUTE ACCENT -->
+<!ENTITY die	"&#x00A8;"> <!--  -->
+<!ENTITY dot	"&#x02D9;"> <!-- DOT ABOVE -->
+<!ENTITY grave	"&#x0060;"> <!-- GRAVE ACCENT -->
+<!ENTITY macr	"&#x00AF;"> <!-- MACRON -->
+<!ENTITY ogon	"&#x02DB;"> <!-- OGONEK -->
+<!ENTITY ring	"&#x02DA;"> <!-- RING ABOVE -->
+<!ENTITY tilde	"&#x02DC;"> <!-- TILDE -->
+<!ENTITY uml	"&#x00A8;"> <!--  -->

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-grk1.ent
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-grk1.ent	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-grk1.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,54 @@
+<!-- iso-grk1.ent (initially distributed with DocBook XML DTD V4.1.1beta1) -->
+
+<!-- Derived from the corresponding ISO 8879 standard entity set
+     and the Unicode character mappings provided by Sebastian Rahtz -->
+
+<!ENTITY agr	"&#x03B1;"> <!--  -->
+<!ENTITY Agr	"&#x0391;"> <!-- GREEK CAPITAL LETTER ALPHA -->
+<!ENTITY bgr	"&#x03B2;"> <!-- GREEK SMALL LETTER BETA -->
+<!ENTITY Bgr	"&#x0392;"> <!-- GREEK CAPITAL LETTER BETA -->
+<!ENTITY ggr	"&#x03B3;"> <!-- GREEK SMALL LETTER GAMMA -->
+<!ENTITY Ggr	"&#x0393;"> <!-- GREEK CAPITAL LETTER GAMMA -->
+<!ENTITY dgr	"&#x03B4;"> <!-- GREEK SMALL LETTER DELTA -->
+<!ENTITY Dgr	"&#x0394;"> <!-- GREEK CAPITAL LETTER DELTA -->
+<!ENTITY egr	"&#x03B5;"> <!--  -->
+<!ENTITY Egr	"&#x0395;"> <!-- GREEK CAPITAL LETTER EPSILON -->
+<!ENTITY zgr	"&#x03B6;"> <!-- GREEK SMALL LETTER ZETA -->
+<!ENTITY Zgr	"&#x0396;"> <!-- GREEK CAPITAL LETTER ZETA -->
+<!ENTITY eegr	"&#x03B7;"> <!-- GREEK SMALL LETTER ETA -->
+<!ENTITY EEgr	"&#x0397;"> <!-- GREEK CAPITAL LETTER ETA -->
+<!ENTITY thgr	"&#x03B8;"> <!--  -->
+<!ENTITY THgr	"&#x0398;"> <!-- GREEK CAPITAL LETTER THETA -->
+<!ENTITY igr	"&#x03B9;"> <!-- GREEK SMALL LETTER IOTA -->
+<!ENTITY Igr	"&#x0399;"> <!-- GREEK CAPITAL LETTER IOTA -->
+<!ENTITY kgr	"&#x03BA;"> <!-- GREEK SMALL LETTER KAPPA -->
+<!ENTITY Kgr	"&#x039A;"> <!-- GREEK CAPITAL LETTER KAPPA -->
+<!ENTITY lgr	"&#x03BB;"> <!-- GREEK SMALL LETTER LAMDA -->
+<!ENTITY Lgr	"&#x039B;"> <!-- GREEK CAPITAL LETTER LAMDA -->
+<!ENTITY mgr	"&#x03BC;"> <!-- GREEK SMALL LETTER MU -->
+<!ENTITY Mgr	"&#x039C;"> <!-- GREEK CAPITAL LETTER MU -->
+<!ENTITY ngr	"&#x03BD;"> <!-- GREEK SMALL LETTER NU -->
+<!ENTITY Ngr	"&#x039D;"> <!-- GREEK CAPITAL LETTER NU -->
+<!ENTITY xgr	"&#x03BE;"> <!-- GREEK SMALL LETTER XI -->
+<!ENTITY Xgr	"&#x039E;"> <!-- GREEK CAPITAL LETTER XI -->
+<!ENTITY ogr	"&#x03BF;"> <!-- GREEK SMALL LETTER OMICRON -->
+<!ENTITY Ogr	"&#x039F;"> <!-- GREEK CAPITAL LETTER OMICRON -->
+<!ENTITY pgr	"&#x03C0;"> <!-- GREEK SMALL LETTER PI -->
+<!ENTITY Pgr	"&#x03A0;"> <!-- GREEK CAPITAL LETTER PI -->
+<!ENTITY rgr	"&#x03C1;"> <!-- GREEK SMALL LETTER RHO -->
+<!ENTITY Rgr	"&#x03A1;"> <!-- GREEK CAPITAL LETTER RHO -->
+<!ENTITY sgr	"&#x03C3;"> <!-- GREEK SMALL LETTER SIGMA -->
+<!ENTITY Sgr	"&#x03A3;"> <!-- GREEK CAPITAL LETTER SIGMA -->
+<!ENTITY sfgr	"&#x03C2;"> <!--  -->
+<!ENTITY tgr	"&#x03C4;"> <!-- GREEK SMALL LETTER TAU -->
+<!ENTITY Tgr	"&#x03A4;"> <!-- GREEK CAPITAL LETTER TAU -->
+<!ENTITY ugr	"&#x03C5;"> <!-- GREEK SMALL LETTER UPSILON -->
+<!ENTITY Ugr	"&#x03A5;"> <!--  -->
+<!ENTITY phgr	"&#x03C6;"> <!-- GREEK SMALL LETTER PHI -->
+<!ENTITY PHgr	"&#x03A6;"> <!-- GREEK CAPITAL LETTER PHI -->
+<!ENTITY khgr	"&#x03C7;"> <!-- GREEK SMALL LETTER CHI -->
+<!ENTITY KHgr	"&#x03A7;"> <!-- GREEK CAPITAL LETTER CHI -->
+<!ENTITY psgr	"&#x03C8;"> <!-- GREEK SMALL LETTER PSI -->
+<!ENTITY PSgr	"&#x03A8;"> <!-- GREEK CAPITAL LETTER PSI -->
+<!ENTITY ohgr	"&#x03C9;"> <!-- GREEK SMALL LETTER OMEGA -->
+<!ENTITY OHgr	"&#x03A9;"> <!-- GREEK CAPITAL LETTER OMEGA -->

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-grk2.ent
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-grk2.ent	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-grk2.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,25 @@
+<!-- iso-grk2.ent (initially distributed with DocBook XML DTD V4.1.1beta1) -->
+
+<!-- Derived from the corresponding ISO 8879 standard entity set
+     and the Unicode character mappings provided by Sebastian Rahtz -->
+
+<!ENTITY aacgr	"&#x03AC;"> <!-- GREEK SMALL LETTER ALPHA WITH TONOS -->
+<!ENTITY Aacgr	"&#x0386;"> <!-- GREEK CAPITAL LETTER ALPHA WITH TONOS -->
+<!ENTITY eacgr	"&#x03AD;"> <!-- GREEK SMALL LETTER EPSILON WITH TONOS -->
+<!ENTITY Eacgr	"&#x0388;"> <!-- GREEK CAPITAL LETTER EPSILON WITH TONOS -->
+<!ENTITY eeacgr	"&#x03AE;"> <!-- GREEK SMALL LETTER ETA WITH TONOS -->
+<!ENTITY EEacgr	"&#x0389;"> <!-- GREEK CAPITAL LETTER ETA WITH TONOS -->
+<!ENTITY idigr	"&#x03CA;"> <!-- GREEK SMALL LETTER IOTA WITH DIALYTIKA -->
+<!ENTITY Idigr	"&#x03AA;"> <!-- GREEK CAPITAL LETTER IOTA WITH DIALYTIKA -->
+<!ENTITY iacgr	"&#x03AF;"> <!-- GREEK SMALL LETTER IOTA WITH TONOS -->
+<!ENTITY Iacgr	"&#x038A;"> <!-- GREEK CAPITAL LETTER IOTA WITH TONOS -->
+<!ENTITY idiagr	"&#x0390;"> <!-- GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS -->
+<!ENTITY oacgr	"&#x03CC;"> <!-- GREEK SMALL LETTER OMICRON WITH TONOS -->
+<!ENTITY Oacgr	"&#x038C;"> <!-- GREEK CAPITAL LETTER OMICRON WITH TONOS -->
+<!ENTITY udigr	"&#x03CB;"> <!-- GREEK SMALL LETTER UPSILON WITH DIALYTIKA -->
+<!ENTITY Udigr	"&#x03AB;"> <!-- GREEK CAPITAL LETTER UPSILON WITH DIALYTIKA -->
+<!ENTITY uacgr	"&#x03CD;"> <!-- GREEK SMALL LETTER UPSILON WITH TONOS -->
+<!ENTITY Uacgr	"&#x038E;"> <!-- GREEK CAPITAL LETTER UPSILON WITH TONOS -->
+<!ENTITY udiagr	"&#x03B0;"> <!-- GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS -->
+<!ENTITY ohacgr	"&#x03CE;"> <!-- GREEK SMALL LETTER OMEGA WITH TONOS -->
+<!ENTITY OHacgr	"&#x038F;"> <!-- GREEK CAPITAL LETTER OMEGA WITH TONOS -->

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-grk3.ent
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-grk3.ent	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-grk3.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,48 @@
+<!-- iso-grk3.ent (initially distributed with DocBook XML DTD V4.1.1beta1) -->
+
+<!-- Derived from the corresponding ISO 8879 standard entity set
+     and the Unicode character mappings provided by Sebastian Rahtz -->
+
+<!ENTITY alpha	"&#x03B1;"> <!--  -->
+<!ENTITY beta	"&#x03B2;"> <!-- GREEK SMALL LETTER BETA -->
+<!ENTITY gamma	"&#x03B3;"> <!-- GREEK SMALL LETTER GAMMA -->
+<!ENTITY Gamma	"&#x0393;"> <!-- GREEK CAPITAL LETTER GAMMA -->
+<!ENTITY gammad	"&#x03DC;"> <!-- GREEK LETTER DIGAMMA -->
+<!ENTITY delta	"&#x03B4;"> <!-- GREEK SMALL LETTER DELTA -->
+<!ENTITY Delta	"&#x0394;"> <!-- GREEK CAPITAL LETTER DELTA -->
+<!ENTITY epsi	"&#x220A;"> <!--  -->
+<!ENTITY epsiv	"&#x03B5;"> <!--  -->
+<!ENTITY epsis	"&#x220A;"> <!--  -->
+<!ENTITY zeta	"&#x03B6;"> <!-- GREEK SMALL LETTER ZETA -->
+<!ENTITY eta	"&#x03B7;"> <!-- GREEK SMALL LETTER ETA -->
+<!ENTITY thetas	"&#x03B8;"> <!--  -->
+<!ENTITY Theta	"&#x0398;"> <!-- GREEK CAPITAL LETTER THETA -->
+<!ENTITY thetav	"&#x03D1;"> <!--  -->
+<!ENTITY iota	"&#x03B9;"> <!-- GREEK SMALL LETTER IOTA -->
+<!ENTITY kappa	"&#x03BA;"> <!-- GREEK SMALL LETTER KAPPA -->
+<!ENTITY kappav	"&#x03F0;"> <!-- GREEK KAPPA SYMBOL -->
+<!ENTITY lambda	"&#x03BB;"> <!-- GREEK SMALL LETTER LAMDA -->
+<!ENTITY Lambda	"&#x039B;"> <!-- GREEK CAPITAL LETTER LAMDA -->
+<!ENTITY mu	"&#x03BC;"> <!-- GREEK SMALL LETTER MU -->
+<!ENTITY nu	"&#x03BD;"> <!-- GREEK SMALL LETTER NU -->
+<!ENTITY xi	"&#x03BE;"> <!-- GREEK SMALL LETTER XI -->
+<!ENTITY Xi	"&#x039E;"> <!-- GREEK CAPITAL LETTER XI -->
+<!ENTITY pi	"&#x03C0;"> <!-- GREEK SMALL LETTER PI -->
+<!ENTITY piv	"&#x03D6;"> <!-- GREEK PI SYMBOL -->
+<!ENTITY Pi	"&#x03A0;"> <!-- GREEK CAPITAL LETTER PI -->
+<!ENTITY rho	"&#x03C1;"> <!-- GREEK SMALL LETTER RHO -->
+<!ENTITY rhov	"&#x03F1;"> <!-- GREEK RHO SYMBOL -->
+<!ENTITY sigma	"&#x03C3;"> <!-- GREEK SMALL LETTER SIGMA -->
+<!ENTITY Sigma	"&#x03A3;"> <!-- GREEK CAPITAL LETTER SIGMA -->
+<!ENTITY sigmav	"&#x03C2;"> <!--  -->
+<!ENTITY tau	"&#x03C4;"> <!-- GREEK SMALL LETTER TAU -->
+<!ENTITY upsi	"&#x03C5;"> <!-- GREEK SMALL LETTER UPSILON -->
+<!ENTITY Upsi	"&#x03D2;"> <!--  -->
+<!ENTITY phis	"&#x03C6;"> <!-- GREEK SMALL LETTER PHI -->
+<!ENTITY Phi	"&#x03A6;"> <!-- GREEK CAPITAL LETTER PHI -->
+<!ENTITY phiv	"&#x03D5;"> <!-- GREEK PHI SYMBOL -->
+<!ENTITY chi	"&#x03C7;"> <!-- GREEK SMALL LETTER CHI -->
+<!ENTITY psi	"&#x03C8;"> <!-- GREEK SMALL LETTER PSI -->
+<!ENTITY Psi	"&#x03A8;"> <!-- GREEK CAPITAL LETTER PSI -->
+<!ENTITY omega	"&#x03C9;"> <!-- GREEK SMALL LETTER OMEGA -->
+<!ENTITY Omega	"&#x03A9;"> <!-- GREEK CAPITAL LETTER OMEGA -->

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-grk4.ent
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-grk4.ent	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-grk4.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,48 @@
+<!-- iso-grk4.ent (initially distributed with DocBook XML DTD V4.1.1beta1) -->
+
+<!-- Derived from the corresponding ISO 8879 standard entity set
+     and the Unicode character mappings provided by Sebastian Rahtz -->
+
+<!ENTITY b.alpha	"&#x03B1;"> <!--  -->
+<!ENTITY b.beta	"&#x03B2;"> <!-- GREEK SMALL LETTER BETA -->
+<!ENTITY b.gamma	"&#x03B3;"> <!-- GREEK SMALL LETTER GAMMA -->
+<!ENTITY b.Gamma	"&#x0393;"> <!-- GREEK CAPITAL LETTER GAMMA -->
+<!ENTITY b.gammad	"&#x03DC;"> <!-- GREEK LETTER DIGAMMA -->
+<!ENTITY b.delta	"&#x03B4;"> <!-- GREEK SMALL LETTER DELTA -->
+<!ENTITY b.Delta	"&#x0394;"> <!-- GREEK CAPITAL LETTER DELTA -->
+<!ENTITY b.epsi	"&#x03B5;"> <!--  -->
+<!ENTITY b.epsiv	"&#x03B5;"> <!--  -->
+<!ENTITY b.epsis	"&#x03B5;"> <!--  -->
+<!ENTITY b.zeta	"&#x03B6;"> <!-- GREEK SMALL LETTER ZETA -->
+<!ENTITY b.eta	"&#x03B7;"> <!-- GREEK SMALL LETTER ETA -->
+<!ENTITY b.thetas	"&#x03B8;"> <!--  -->
+<!ENTITY b.Theta	"&#x0398;"> <!-- GREEK CAPITAL LETTER THETA -->
+<!ENTITY b.thetav	"&#x03D1;"> <!--  -->
+<!ENTITY b.iota	"&#x03B9;"> <!-- GREEK SMALL LETTER IOTA -->
+<!ENTITY b.kappa	"&#x03BA;"> <!-- GREEK SMALL LETTER KAPPA -->
+<!ENTITY b.kappav	"&#x03F0;"> <!-- GREEK KAPPA SYMBOL -->
+<!ENTITY b.lambda	"&#x03BB;"> <!-- GREEK SMALL LETTER LAMDA -->
+<!ENTITY b.Lambda	"&#x039B;"> <!-- GREEK CAPITAL LETTER LAMDA -->
+<!ENTITY b.mu	"&#x03BC;"> <!-- GREEK SMALL LETTER MU -->
+<!ENTITY b.nu	"&#x03BD;"> <!-- GREEK SMALL LETTER NU -->
+<!ENTITY b.xi	"&#x03BE;"> <!-- GREEK SMALL LETTER XI -->
+<!ENTITY b.Xi	"&#x039E;"> <!-- GREEK CAPITAL LETTER XI -->
+<!ENTITY b.pi	"&#x03C0;"> <!-- GREEK SMALL LETTER PI -->
+<!ENTITY b.Pi	"&#x03A0;"> <!-- GREEK CAPITAL LETTER PI -->
+<!ENTITY b.piv	"&#x03D6;"> <!-- GREEK PI SYMBOL -->
+<!ENTITY b.rho	"&#x03C1;"> <!-- GREEK SMALL LETTER RHO -->
+<!ENTITY b.rhov	"&#x03F1;"> <!-- GREEK RHO SYMBOL -->
+<!ENTITY b.sigma	"&#x03C3;"> <!-- GREEK SMALL LETTER SIGMA -->
+<!ENTITY b.Sigma	"&#x03A3;"> <!-- GREEK CAPITAL LETTER SIGMA -->
+<!ENTITY b.sigmav	"&#x03C2;"> <!--  -->
+<!ENTITY b.tau	"&#x03C4;"> <!-- GREEK SMALL LETTER TAU -->
+<!ENTITY b.upsi	"&#x03C5;"> <!-- GREEK SMALL LETTER UPSILON -->
+<!ENTITY b.Upsi	"&#x03D2;"> <!--  -->
+<!ENTITY b.phis	"&#x03C6;"> <!-- GREEK SMALL LETTER PHI -->
+<!ENTITY b.Phi	"&#x03A6;"> <!-- GREEK CAPITAL LETTER PHI -->
+<!ENTITY b.phiv	"&#x03D5;"> <!-- GREEK PHI SYMBOL -->
+<!ENTITY b.chi	"&#x03C7;"> <!-- GREEK SMALL LETTER CHI -->
+<!ENTITY b.psi	"&#x03C8;"> <!-- GREEK SMALL LETTER PSI -->
+<!ENTITY b.Psi	"&#x03A8;"> <!-- GREEK CAPITAL LETTER PSI -->
+<!ENTITY b.omega	"&#x03C9;"> <!-- GREEK SMALL LETTER OMEGA -->
+<!ENTITY b.Omega	"&#x03A9;"> <!-- GREEK CAPITAL LETTER OMEGA -->

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-lat1.ent
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-lat1.ent	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-lat1.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,67 @@
+<!-- iso-lat1.ent (initially distributed with DocBook XML DTD V4.1.1beta1) -->
+
+<!-- Derived from the corresponding ISO 8879 standard entity set
+     and the Unicode character mappings provided by Sebastian Rahtz -->
+
+<!ENTITY aacute	"&#x00E1;"> <!-- LATIN SMALL LETTER A WITH ACUTE -->
+<!ENTITY Aacute	"&#x00C1;"> <!-- LATIN CAPITAL LETTER A WITH ACUTE -->
+<!ENTITY acirc	"&#x00E2;"> <!-- LATIN SMALL LETTER A WITH CIRCUMFLEX -->
+<!ENTITY Acirc	"&#x00C2;"> <!-- LATIN CAPITAL LETTER A WITH CIRCUMFLEX -->
+<!ENTITY agrave	"&#x00E0;"> <!-- LATIN SMALL LETTER A WITH GRAVE -->
+<!ENTITY Agrave	"&#x00C0;"> <!-- LATIN CAPITAL LETTER A WITH GRAVE -->
+<!ENTITY aring	"&#x00E5;"> <!-- LATIN SMALL LETTER A WITH RING ABOVE -->
+<!ENTITY Aring	"&#x00C5;"> <!-- LATIN CAPITAL LETTER A WITH RING ABOVE -->
+<!ENTITY atilde	"&#x00E3;"> <!-- LATIN SMALL LETTER A WITH TILDE -->
+<!ENTITY Atilde	"&#x00C3;"> <!-- LATIN CAPITAL LETTER A WITH TILDE -->
+<!ENTITY auml	"&#x00E4;"> <!-- LATIN SMALL LETTER A WITH DIAERESIS -->
+<!ENTITY Auml	"&#x00C4;"> <!-- LATIN CAPITAL LETTER A WITH DIAERESIS -->
+<!ENTITY aelig	"&#x00E6;"> <!-- LATIN SMALL LETTER AE -->
+<!ENTITY AElig	"&#x00C6;"> <!-- LATIN CAPITAL LETTER AE -->
+<!ENTITY ccedil	"&#x00E7;"> <!-- LATIN SMALL LETTER C WITH CEDILLA -->
+<!ENTITY Ccedil	"&#x00C7;"> <!-- LATIN CAPITAL LETTER C WITH CEDILLA -->
+<!ENTITY eth	"&#x00F0;"> <!-- LATIN SMALL LETTER ETH -->
+<!ENTITY ETH	"&#x00D0;"> <!-- LATIN CAPITAL LETTER ETH -->
+<!ENTITY eacute	"&#x00E9;"> <!-- LATIN SMALL LETTER E WITH ACUTE -->
+<!ENTITY Eacute	"&#x00C9;"> <!-- LATIN CAPITAL LETTER E WITH ACUTE -->
+<!ENTITY ecirc	"&#x00EA;"> <!-- LATIN SMALL LETTER E WITH CIRCUMFLEX -->
+<!ENTITY Ecirc	"&#x00CA;"> <!-- LATIN CAPITAL LETTER E WITH CIRCUMFLEX -->
+<!ENTITY egrave	"&#x00E8;"> <!-- LATIN SMALL LETTER E WITH GRAVE -->
+<!ENTITY Egrave	"&#x00C8;"> <!-- LATIN CAPITAL LETTER E WITH GRAVE -->
+<!ENTITY euml	"&#x00EB;"> <!-- LATIN SMALL LETTER E WITH DIAERESIS -->
+<!ENTITY Euml	"&#x00CB;"> <!-- LATIN CAPITAL LETTER E WITH DIAERESIS -->
+<!ENTITY iacute	"&#x00ED;"> <!-- LATIN SMALL LETTER I WITH ACUTE -->
+<!ENTITY Iacute	"&#x00CD;"> <!-- LATIN CAPITAL LETTER I WITH ACUTE -->
+<!ENTITY icirc	"&#x00EE;"> <!-- LATIN SMALL LETTER I WITH CIRCUMFLEX -->
+<!ENTITY Icirc	"&#x00CE;"> <!-- LATIN CAPITAL LETTER I WITH CIRCUMFLEX -->
+<!ENTITY igrave	"&#x00EC;"> <!-- LATIN SMALL LETTER I WITH GRAVE -->
+<!ENTITY Igrave	"&#x00CC;"> <!-- LATIN CAPITAL LETTER I WITH GRAVE -->
+<!ENTITY iuml	"&#x00EF;"> <!-- LATIN SMALL LETTER I WITH DIAERESIS -->
+<!ENTITY Iuml	"&#x00CF;"> <!-- LATIN CAPITAL LETTER I WITH DIAERESIS -->
+<!ENTITY ntilde	"&#x00F1;"> <!-- LATIN SMALL LETTER N WITH TILDE -->
+<!ENTITY Ntilde	"&#x00D1;"> <!-- LATIN CAPITAL LETTER N WITH TILDE -->
+<!ENTITY oacute	"&#x00F3;"> <!-- LATIN SMALL LETTER O WITH ACUTE -->
+<!ENTITY Oacute	"&#x00D3;"> <!-- LATIN CAPITAL LETTER O WITH ACUTE -->
+<!ENTITY ocirc	"&#x00F4;"> <!-- LATIN SMALL LETTER O WITH CIRCUMFLEX -->
+<!ENTITY Ocirc	"&#x00D4;"> <!-- LATIN CAPITAL LETTER O WITH CIRCUMFLEX -->
+<!ENTITY ograve	"&#x00F2;"> <!-- LATIN SMALL LETTER O WITH GRAVE -->
+<!ENTITY Ograve	"&#x00D2;"> <!-- LATIN CAPITAL LETTER O WITH GRAVE -->
+<!ENTITY oslash	"&#x00F8;"> <!-- CIRCLED DIVISION SLASH -->
+<!ENTITY Oslash	"&#x00D8;"> <!-- LATIN CAPITAL LETTER O WITH STROKE -->
+<!ENTITY otilde	"&#x00F5;"> <!-- LATIN SMALL LETTER O WITH TILDE -->
+<!ENTITY Otilde	"&#x00D5;"> <!-- LATIN CAPITAL LETTER O WITH TILDE -->
+<!ENTITY ouml	"&#x00F6;"> <!-- LATIN SMALL LETTER O WITH DIAERESIS -->
+<!ENTITY Ouml	"&#x00D6;"> <!-- LATIN CAPITAL LETTER O WITH DIAERESIS -->
+<!ENTITY szlig	"&#x00DF;"> <!-- LATIN SMALL LETTER SHARP S -->
+<!ENTITY thorn	"&#x00FE;"> <!-- LATIN SMALL LETTER THORN -->
+<!ENTITY THORN	"&#x00DE;"> <!-- LATIN CAPITAL LETTER THORN -->
+<!ENTITY uacute	"&#x00FA;"> <!-- LATIN SMALL LETTER U WITH ACUTE -->
+<!ENTITY Uacute	"&#x00DA;"> <!-- LATIN CAPITAL LETTER U WITH ACUTE -->
+<!ENTITY ucirc	"&#x00FB;"> <!-- LATIN SMALL LETTER U WITH CIRCUMFLEX -->
+<!ENTITY Ucirc	"&#x00DB;"> <!-- LATIN CAPITAL LETTER U WITH CIRCUMFLEX -->
+<!ENTITY ugrave	"&#x00F9;"> <!-- LATIN SMALL LETTER U WITH GRAVE -->
+<!ENTITY Ugrave	"&#x00D9;"> <!-- LATIN CAPITAL LETTER U WITH GRAVE -->
+<!ENTITY uuml	"&#x00FC;"> <!-- LATIN SMALL LETTER U WITH DIAERESIS -->
+<!ENTITY Uuml	"&#x00DC;"> <!-- LATIN CAPITAL LETTER U WITH DIAERESIS -->
+<!ENTITY yacute	"&#x00FD;"> <!-- LATIN SMALL LETTER Y WITH ACUTE -->
+<!ENTITY Yacute	"&#x00DD;"> <!-- LATIN CAPITAL LETTER Y WITH ACUTE -->
+<!ENTITY yuml	"&#x00FF;"> <!-- LATIN SMALL LETTER Y WITH DIAERESIS -->

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-lat2.ent
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-lat2.ent	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-lat2.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,126 @@
+<!-- iso-lat2.ent (initially distributed with DocBook XML DTD V4.1.1beta1) -->
+
+<!-- Derived from the corresponding ISO 8879 standard entity set
+     and the Unicode character mappings provided by Sebastian Rahtz -->
+
+<!ENTITY abreve	"&#x0103;"> <!-- LATIN SMALL LETTER A WITH BREVE -->
+<!ENTITY Abreve	"&#x0102;"> <!-- LATIN CAPITAL LETTER A WITH BREVE -->
+<!ENTITY amacr	"&#x0101;"> <!-- LATIN SMALL LETTER A WITH MACRON -->
+<!ENTITY Amacr	"&#x0100;"> <!-- LATIN CAPITAL LETTER A WITH MACRON -->
+<!ENTITY aogon	"&#x0105;"> <!-- LATIN SMALL LETTER A WITH OGONEK -->
+<!ENTITY Aogon	"&#x0104;"> <!-- LATIN CAPITAL LETTER A WITH OGONEK -->
+<!ENTITY cacute	"&#x0107;"> <!-- LATIN SMALL LETTER C WITH ACUTE -->
+<!ENTITY Cacute	"&#x0106;"> <!-- LATIN CAPITAL LETTER C WITH ACUTE -->
+<!ENTITY ccaron	"&#x010D;"> <!-- LATIN SMALL LETTER C WITH CARON -->
+<!ENTITY Ccaron	"&#x010C;"> <!-- LATIN CAPITAL LETTER C WITH CARON -->
+<!ENTITY ccirc	"&#x0109;"> <!-- LATIN SMALL LETTER C WITH CIRCUMFLEX -->
+<!ENTITY Ccirc	"&#x0108;"> <!-- LATIN CAPITAL LETTER C WITH CIRCUMFLEX -->
+<!ENTITY cdot	"&#x010B;"> <!-- DOT OPERATOR -->
+<!ENTITY Cdot	"&#x010A;"> <!-- LATIN CAPITAL LETTER C WITH DOT ABOVE -->
+<!ENTITY dcaron	"&#x010F;"> <!-- LATIN SMALL LETTER D WITH CARON -->
+<!ENTITY Dcaron	"&#x010E;"> <!-- LATIN CAPITAL LETTER D WITH CARON -->
+<!ENTITY dstrok	"&#x0111;"> <!-- LATIN SMALL LETTER D WITH STROKE -->
+<!ENTITY Dstrok	"&#x0110;"> <!-- LATIN CAPITAL LETTER D WITH STROKE -->
+<!ENTITY ecaron	"&#x011B;"> <!-- LATIN SMALL LETTER E WITH CARON -->
+<!ENTITY Ecaron	"&#x011A;"> <!-- LATIN CAPITAL LETTER E WITH CARON -->
+<!ENTITY edot	"&#x0117;"> <!-- LATIN SMALL LETTER E WITH DOT ABOVE -->
+<!ENTITY Edot	"&#x0116;"> <!-- LATIN CAPITAL LETTER E WITH DOT ABOVE -->
+<!ENTITY emacr	"&#x0113;"> <!-- LATIN SMALL LETTER E WITH MACRON -->
+<!ENTITY Emacr	"&#x0112;"> <!-- LATIN CAPITAL LETTER E WITH MACRON -->
+<!ENTITY eogon	"&#x0119;"> <!-- LATIN SMALL LETTER E WITH OGONEK -->
+<!ENTITY Eogon	"&#x0118;"> <!-- LATIN CAPITAL LETTER E WITH OGONEK -->
+<!ENTITY gacute	"&#x01F5;"> <!-- LATIN SMALL LETTER G WITH ACUTE -->
+<!ENTITY gbreve	"&#x011F;"> <!-- LATIN SMALL LETTER G WITH BREVE -->
+<!ENTITY Gbreve	"&#x011E;"> <!-- LATIN CAPITAL LETTER G WITH BREVE -->
+<!ENTITY Gcedil	"&#x0122;"> <!-- LATIN CAPITAL LETTER G WITH CEDILLA -->
+<!ENTITY gcirc	"&#x011D;"> <!-- LATIN SMALL LETTER G WITH CIRCUMFLEX -->
+<!ENTITY Gcirc	"&#x011C;"> <!-- LATIN CAPITAL LETTER G WITH CIRCUMFLEX -->
+<!ENTITY gdot	"&#x0121;"> <!-- LATIN SMALL LETTER G WITH DOT ABOVE -->
+<!ENTITY Gdot	"&#x0120;"> <!-- LATIN CAPITAL LETTER G WITH DOT ABOVE -->
+<!ENTITY hcirc	"&#x0125;"> <!-- LATIN SMALL LETTER H WITH CIRCUMFLEX -->
+<!ENTITY Hcirc	"&#x0124;"> <!-- LATIN CAPITAL LETTER H WITH CIRCUMFLEX -->
+<!ENTITY hstrok	"&#x0127;"> <!-- LATIN SMALL LETTER H WITH STROKE -->
+<!ENTITY Hstrok	"&#x0126;"> <!-- LATIN CAPITAL LETTER H WITH STROKE -->
+<!ENTITY Idot	"&#x0130;"> <!-- LATIN CAPITAL LETTER I WITH DOT ABOVE -->
+<!ENTITY Imacr	"&#x012A;"> <!-- LATIN CAPITAL LETTER I WITH MACRON -->
+<!ENTITY imacr	"&#x012B;"> <!-- LATIN SMALL LETTER I WITH MACRON -->
+<!ENTITY ijlig	"&#x0133;"> <!-- LATIN SMALL LIGATURE IJ -->
+<!ENTITY IJlig	"&#x0132;"> <!-- LATIN CAPITAL LIGATURE IJ -->
+<!ENTITY inodot	"&#x0131;"> <!-- LATIN SMALL LETTER DOTLESS I -->
+<!ENTITY iogon	"&#x012F;"> <!-- LATIN SMALL LETTER I WITH OGONEK -->
+<!ENTITY Iogon	"&#x012E;"> <!-- LATIN CAPITAL LETTER I WITH OGONEK -->
+<!ENTITY itilde	"&#x0129;"> <!-- LATIN SMALL LETTER I WITH TILDE -->
+<!ENTITY Itilde	"&#x0128;"> <!-- LATIN CAPITAL LETTER I WITH TILDE -->
+<!ENTITY jcirc	"&#x0135;"> <!-- LATIN SMALL LETTER J WITH CIRCUMFLEX -->
+<!ENTITY Jcirc	"&#x0134;"> <!-- LATIN CAPITAL LETTER J WITH CIRCUMFLEX -->
+<!ENTITY kcedil	"&#x0137;"> <!-- LATIN SMALL LETTER K WITH CEDILLA -->
+<!ENTITY Kcedil	"&#x0136;"> <!-- LATIN CAPITAL LETTER K WITH CEDILLA -->
+<!ENTITY kgreen	"&#x0138;"> <!-- LATIN SMALL LETTER KRA -->
+<!ENTITY lacute	"&#x013A;"> <!-- LATIN SMALL LETTER L WITH ACUTE -->
+<!ENTITY Lacute	"&#x0139;"> <!-- LATIN CAPITAL LETTER L WITH ACUTE -->
+<!ENTITY lcaron	"&#x013E;"> <!-- LATIN SMALL LETTER L WITH CARON -->
+<!ENTITY Lcaron	"&#x013D;"> <!-- LATIN CAPITAL LETTER L WITH CARON -->
+<!ENTITY lcedil	"&#x013C;"> <!-- LATIN SMALL LETTER L WITH CEDILLA -->
+<!ENTITY Lcedil	"&#x013B;"> <!-- LATIN CAPITAL LETTER L WITH CEDILLA -->
+<!ENTITY lmidot	"&#x0140;"> <!-- LATIN SMALL LETTER L WITH MIDDLE DOT -->
+<!ENTITY Lmidot	"&#x013F;"> <!-- LATIN CAPITAL LETTER L WITH MIDDLE DOT -->
+<!ENTITY lstrok	"&#x0142;"> <!-- LATIN SMALL LETTER L WITH STROKE -->
+<!ENTITY Lstrok	"&#x0141;"> <!-- LATIN CAPITAL LETTER L WITH STROKE -->
+<!ENTITY nacute	"&#x0144;"> <!-- LATIN SMALL LETTER N WITH ACUTE -->
+<!ENTITY Nacute	"&#x0143;"> <!-- LATIN CAPITAL LETTER N WITH ACUTE -->
+<!ENTITY eng	"&#x014B;"> <!-- LATIN SMALL LETTER ENG -->
+<!ENTITY ENG	"&#x014A;"> <!-- LATIN CAPITAL LETTER ENG -->
+<!ENTITY napos	"&#x0149;"> <!-- LATIN SMALL LETTER N PRECEDED BY APOSTROPHE -->
+<!ENTITY ncaron	"&#x0148;"> <!-- LATIN SMALL LETTER N WITH CARON -->
+<!ENTITY Ncaron	"&#x0147;"> <!-- LATIN CAPITAL LETTER N WITH CARON -->
+<!ENTITY ncedil	"&#x0146;"> <!-- LATIN SMALL LETTER N WITH CEDILLA -->
+<!ENTITY Ncedil	"&#x0145;"> <!-- LATIN CAPITAL LETTER N WITH CEDILLA -->
+<!ENTITY odblac	"&#x0151;"> <!-- LATIN SMALL LETTER O WITH DOUBLE ACUTE -->
+<!ENTITY Odblac	"&#x0150;"> <!-- LATIN CAPITAL LETTER O WITH DOUBLE ACUTE -->
+<!ENTITY Omacr	"&#x014C;"> <!-- LATIN CAPITAL LETTER O WITH MACRON -->
+<!ENTITY omacr	"&#x014D;"> <!-- LATIN SMALL LETTER O WITH MACRON -->
+<!ENTITY oelig	"&#x0153;"> <!-- LATIN SMALL LIGATURE OE -->
+<!ENTITY OElig	"&#x0152;"> <!-- LATIN CAPITAL LIGATURE OE -->
+<!ENTITY racute	"&#x0155;"> <!-- LATIN SMALL LETTER R WITH ACUTE -->
+<!ENTITY Racute	"&#x0154;"> <!-- LATIN CAPITAL LETTER R WITH ACUTE -->
+<!ENTITY rcaron	"&#x0159;"> <!-- LATIN SMALL LETTER R WITH CARON -->
+<!ENTITY Rcaron	"&#x0158;"> <!-- LATIN CAPITAL LETTER R WITH CARON -->
+<!ENTITY rcedil	"&#x0157;"> <!-- LATIN SMALL LETTER R WITH CEDILLA -->
+<!ENTITY Rcedil	"&#x0156;"> <!-- LATIN CAPITAL LETTER R WITH CEDILLA -->
+<!ENTITY sacute	"&#x015B;"> <!-- LATIN SMALL LETTER S WITH ACUTE -->
+<!ENTITY Sacute	"&#x015A;"> <!-- LATIN CAPITAL LETTER S WITH ACUTE -->
+<!ENTITY scaron	"&#x0161;"> <!-- LATIN SMALL LETTER S WITH CARON -->
+<!ENTITY Scaron	"&#x0160;"> <!-- LATIN CAPITAL LETTER S WITH CARON -->
+<!ENTITY scedil	"&#x015F;"> <!-- LATIN SMALL LETTER S WITH CEDILLA -->
+<!ENTITY Scedil	"&#x015E;"> <!-- LATIN CAPITAL LETTER S WITH CEDILLA -->
+<!ENTITY scirc	"&#x015D;"> <!-- LATIN SMALL LETTER S WITH CIRCUMFLEX -->
+<!ENTITY Scirc	"&#x015C;"> <!-- LATIN CAPITAL LETTER S WITH CIRCUMFLEX -->
+<!ENTITY tcaron	"&#x0165;"> <!-- LATIN SMALL LETTER T WITH CARON -->
+<!ENTITY Tcaron	"&#x0164;"> <!-- LATIN CAPITAL LETTER T WITH CARON -->
+<!ENTITY tcedil	"&#x0163;"> <!-- LATIN SMALL LETTER T WITH CEDILLA -->
+<!ENTITY Tcedil	"&#x0162;"> <!-- LATIN CAPITAL LETTER T WITH CEDILLA -->
+<!ENTITY tstrok	"&#x0167;"> <!-- LATIN SMALL LETTER T WITH STROKE -->
+<!ENTITY Tstrok	"&#x0166;"> <!-- LATIN CAPITAL LETTER T WITH STROKE -->
+<!ENTITY ubreve	"&#x016D;"> <!-- LATIN SMALL LETTER U WITH BREVE -->
+<!ENTITY Ubreve	"&#x016C;"> <!-- LATIN CAPITAL LETTER U WITH BREVE -->
+<!ENTITY udblac	"&#x0171;"> <!-- LATIN SMALL LETTER U WITH DOUBLE ACUTE -->
+<!ENTITY Udblac	"&#x0170;"> <!-- LATIN CAPITAL LETTER U WITH DOUBLE ACUTE -->
+<!ENTITY umacr	"&#x016B;"> <!-- LATIN SMALL LETTER U WITH MACRON -->
+<!ENTITY Umacr	"&#x016A;"> <!-- LATIN CAPITAL LETTER U WITH MACRON -->
+<!ENTITY uogon	"&#x0173;"> <!-- LATIN SMALL LETTER U WITH OGONEK -->
+<!ENTITY Uogon	"&#x0172;"> <!-- LATIN CAPITAL LETTER U WITH OGONEK -->
+<!ENTITY uring	"&#x016F;"> <!-- LATIN SMALL LETTER U WITH RING ABOVE -->
+<!ENTITY Uring	"&#x016E;"> <!-- LATIN CAPITAL LETTER U WITH RING ABOVE -->
+<!ENTITY utilde	"&#x0169;"> <!-- LATIN SMALL LETTER U WITH TILDE -->
+<!ENTITY Utilde	"&#x0168;"> <!-- LATIN CAPITAL LETTER U WITH TILDE -->
+<!ENTITY wcirc	"&#x0175;"> <!-- LATIN SMALL LETTER W WITH CIRCUMFLEX -->
+<!ENTITY Wcirc	"&#x0174;"> <!-- LATIN CAPITAL LETTER W WITH CIRCUMFLEX -->
+<!ENTITY ycirc	"&#x0177;"> <!-- LATIN SMALL LETTER Y WITH CIRCUMFLEX -->
+<!ENTITY Ycirc	"&#x0176;"> <!-- LATIN CAPITAL LETTER Y WITH CIRCUMFLEX -->
+<!ENTITY Yuml	"&#x0178;"> <!-- LATIN CAPITAL LETTER Y WITH DIAERESIS -->
+<!ENTITY zacute	"&#x017A;"> <!-- LATIN SMALL LETTER Z WITH ACUTE -->
+<!ENTITY Zacute	"&#x0179;"> <!-- LATIN CAPITAL LETTER Z WITH ACUTE -->
+<!ENTITY zcaron	"&#x017E;"> <!-- LATIN SMALL LETTER Z WITH CARON -->
+<!ENTITY Zcaron	"&#x017D;"> <!-- LATIN CAPITAL LETTER Z WITH CARON -->
+<!ENTITY zdot	"&#x017C;"> <!-- LATIN SMALL LETTER Z WITH DOT ABOVE -->
+<!ENTITY Zdot	"&#x017B;"> <!-- LATIN CAPITAL LETTER Z WITH DOT ABOVE -->

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-num.ent
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-num.ent	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-num.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,81 @@
+<!-- iso-num.ent (initially distributed with DocBook XML DTD V4.1.1beta1) -->
+
+<!-- Derived from the corresponding ISO 8879 standard entity set
+     and the Unicode character mappings provided by Sebastian Rahtz -->
+
+<!ENTITY half	"&#x00BD;"> <!-- VULGAR FRACTION ONE HALF -->
+<!ENTITY frac12	"&#x00BD;"> <!-- VULGAR FRACTION ONE HALF -->
+<!ENTITY frac14	"&#x00BC;"> <!-- VULGAR FRACTION ONE QUARTER -->
+<!ENTITY frac34	"&#x00BE;"> <!-- VULGAR FRACTION THREE QUARTERS -->
+<!ENTITY frac18	"&#x215B;"> <!--  -->
+<!ENTITY frac38	"&#x215C;"> <!--  -->
+<!ENTITY frac58	"&#x215D;"> <!--  -->
+<!ENTITY frac78	"&#x215E;"> <!--  -->
+<!ENTITY sup1	"&#x00B9;"> <!-- SUPERSCRIPT ONE -->
+<!ENTITY sup2	"&#x00B2;"> <!-- SUPERSCRIPT TWO -->
+<!ENTITY sup3	"&#x00B3;"> <!-- SUPERSCRIPT THREE -->
+<!ENTITY plus	"&#x002B;"> <!-- PLUS SIGN -->
+<!ENTITY plusmn	"&#x00B1;"> <!-- PLUS-MINUS SIGN -->
+<!ENTITY lt	"&#38;#60;"> <!-- LESS-THAN SIGN -->
+<!ENTITY equals	"&#x003D;"> <!-- EQUALS SIGN -->
+<!ENTITY gt	"&#x003E;"> <!-- GREATER-THAN SIGN -->
+<!ENTITY divide	"&#x00F7;"> <!-- DIVISION SIGN -->
+<!ENTITY times	"&#x00D7;"> <!-- MULTIPLICATION SIGN -->
+<!ENTITY curren	"&#x00A4;"> <!-- CURRENCY SIGN -->
+<!ENTITY pound	"&#x00A3;"> <!-- POUND SIGN -->
+<!ENTITY dollar	"&#x0024;"> <!-- DOLLAR SIGN -->
+<!ENTITY cent	"&#x00A2;"> <!-- CENT SIGN -->
+<!ENTITY yen	"&#x00A5;"> <!-- YEN SIGN -->
+<!ENTITY num	"&#x0023;"> <!-- NUMBER SIGN -->
+<!ENTITY percnt	"&#x0025;"> <!-- PERCENT SIGN -->
+<!ENTITY amp	"&#38;#38;"> <!-- AMPERSAND -->
+<!ENTITY ast	"&#x002A;"> <!-- ASTERISK OPERATOR -->
+<!ENTITY commat	"&#x0040;"> <!-- COMMERCIAL AT -->
+<!ENTITY lsqb	"&#x005B;"> <!-- LEFT SQUARE BRACKET -->
+<!ENTITY bsol	"&#x005C;"> <!-- REVERSE SOLIDUS -->
+<!ENTITY rsqb	"&#x005D;"> <!-- RIGHT SQUARE BRACKET -->
+<!ENTITY lcub	"&#x007B;"> <!-- LEFT CURLY BRACKET -->
+<!ENTITY horbar	"&#x2015;"> <!-- HORIZONTAL BAR -->
+<!ENTITY verbar	"&#x007C;"> <!-- VERTICAL LINE -->
+<!ENTITY rcub	"&#x007D;"> <!-- RIGHT CURLY BRACKET -->
+<!ENTITY micro	"&#x00B5;"> <!-- MICRO SIGN -->
+<!ENTITY ohm	"&#x2126;"> <!-- OHM SIGN -->
+<!ENTITY deg	"&#x00B0;"> <!-- DEGREE SIGN -->
+<!ENTITY ordm	"&#x00BA;"> <!-- MASCULINE ORDINAL INDICATOR -->
+<!ENTITY ordf	"&#x00AA;"> <!-- FEMININE ORDINAL INDICATOR -->
+<!ENTITY sect	"&#x00A7;"> <!-- SECTION SIGN -->
+<!ENTITY para	"&#x00B6;"> <!-- PILCROW SIGN -->
+<!ENTITY middot	"&#x00B7;"> <!-- MIDDLE DOT -->
+<!ENTITY larr	"&#x2190;"> <!-- LEFTWARDS DOUBLE ARROW -->
+<!ENTITY rarr	"&#x2192;"> <!-- RIGHTWARDS DOUBLE ARROW -->
+<!ENTITY uarr	"&#x2191;"> <!-- UPWARDS ARROW -->
+<!ENTITY darr	"&#x2193;"> <!-- DOWNWARDS ARROW -->
+<!ENTITY copy	"&#x00A9;"> <!-- COPYRIGHT SIGN -->
+<!ENTITY reg	"&#x00AE;"> <!-- REG TRADE MARK SIGN -->
+<!ENTITY trade	"&#x2122;"> <!-- TRADE MARK SIGN -->
+<!ENTITY brvbar	"&#x00A6;"> <!-- BROKEN BAR -->
+<!ENTITY not	"&#x00AC;"> <!-- NOT SIGN -->
+<!ENTITY sung	"&#x2669;"> <!--  -->
+<!ENTITY excl	"&#x0021;"> <!-- EXCLAMATION MARK -->
+<!ENTITY iexcl	"&#x00A1;"> <!-- INVERTED EXCLAMATION MARK -->
+<!ENTITY quot	"&#x0022;"> <!-- QUOTATION MARK -->
+<!ENTITY apos	"&#x0027;"> <!-- APOSTROPHE -->
+<!ENTITY lpar	"&#x0028;"> <!-- LEFT PARENTHESIS -->
+<!ENTITY rpar	"&#x0029;"> <!-- RIGHT PARENTHESIS -->
+<!ENTITY comma	"&#x002C;"> <!-- COMMA -->
+<!ENTITY lowbar	"&#x005F;"> <!-- LOW LINE -->
+<!ENTITY hyphen	"&#x002D;"> <!-- HYPHEN-MINUS -->
+<!ENTITY period	"&#x002E;"> <!-- FULL STOP -->
+<!ENTITY sol	"&#x002F;"> <!-- SOLIDUS -->
+<!ENTITY colon	"&#x003A;"> <!-- COLON -->
+<!ENTITY semi	"&#x003B;"> <!-- SEMICOLON -->
+<!ENTITY quest	"&#x003F;"> <!-- QUESTION MARK -->
+<!ENTITY iquest	"&#x00BF;"> <!-- INVERTED QUESTION MARK -->
+<!ENTITY laquo	"&#x00AB;"> <!-- LEFT-POINTING DOUBLE ANGLE QUOTATION MARK -->
+<!ENTITY raquo	"&#x00BB;"> <!-- RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK -->
+<!ENTITY lsquo	"&#x2018;"> <!--  -->
+<!ENTITY rsquo	"&#x2019;"> <!-- RIGHT SINGLE QUOTATION MARK -->
+<!ENTITY ldquo	"&#x201C;"> <!--  -->
+<!ENTITY rdquo	"&#x201D;"> <!-- RIGHT DOUBLE QUOTATION MARK -->
+<!ENTITY nbsp	"&#x00A0;"> <!-- NO-BREAK SPACE -->
+<!ENTITY shy	"&#x00AD;"> <!-- SOFT HYPHEN -->

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-pub.ent
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-pub.ent	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-pub.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,90 @@
+<!-- iso-pub.ent (initially distributed with DocBook XML DTD V4.1.1beta1) -->
+
+<!-- Derived from the corresponding ISO 8879 standard entity set
+     and the Unicode character mappings provided by Sebastian Rahtz -->
+
+<!ENTITY emsp	"&#x2003;"> <!-- EM SPACE -->
+<!ENTITY ensp	"&#x2002;"> <!-- EN SPACE -->
+<!ENTITY emsp13	"&#x2004;"> <!-- THREE-PER-EM SPACE -->
+<!ENTITY emsp14	"&#x2005;"> <!-- FOUR-PER-EM SPACE -->
+<!ENTITY numsp	"&#x2007;"> <!-- FIGURE SPACE -->
+<!ENTITY puncsp	"&#x2008;"> <!-- PUNCTUATION SPACE -->
+<!ENTITY thinsp	"&#x2009;"> <!-- THIN SPACE -->
+<!ENTITY hairsp	"&#x200A;"> <!-- HAIR SPACE -->
+<!ENTITY mdash	"&#x2014;"> <!-- EM DASH -->
+<!ENTITY ndash	"&#x2013;"> <!-- EN DASH -->
+<!ENTITY dash	"&#x2010;"> <!-- HYPHEN -->
+<!ENTITY blank	"&#x2423;"> <!-- OPEN BOX -->
+<!ENTITY hellip	"&#x2026;"> <!-- HORIZONTAL ELLIPSIS -->
+<!ENTITY nldr	"&#x2025;"> <!-- TWO DOT LEADER -->
+<!ENTITY frac13	"&#x2153;"> <!-- VULGAR FRACTION ONE THIRD -->
+<!ENTITY frac23	"&#x2154;"> <!-- VULGAR FRACTION TWO THIRDS -->
+<!ENTITY frac15	"&#x2155;"> <!-- VULGAR FRACTION ONE FIFTH -->
+<!ENTITY frac25	"&#x2156;"> <!-- VULGAR FRACTION TWO FIFTHS -->
+<!ENTITY frac35	"&#x2157;"> <!-- VULGAR FRACTION THREE FIFTHS -->
+<!ENTITY frac45	"&#x2158;"> <!-- VULGAR FRACTION FOUR FIFTHS -->
+<!ENTITY frac16	"&#x2159;"> <!-- VULGAR FRACTION ONE SIXTH -->
+<!ENTITY frac56	"&#x215A;"> <!-- VULGAR FRACTION FIVE SIXTHS -->
+<!ENTITY incare	"&#x2105;"> <!-- CARE OF -->
+<!ENTITY block	"&#x2588;"> <!-- FULL BLOCK -->
+<!ENTITY uhblk	"&#x2580;"> <!-- UPPER HALF BLOCK -->
+<!ENTITY lhblk	"&#x2584;"> <!-- LOWER HALF BLOCK -->
+<!ENTITY blk14	"&#x2591;"> <!-- LIGHT SHADE -->
+<!ENTITY blk12	"&#x2592;"> <!-- MEDIUM SHADE -->
+<!ENTITY blk34	"&#x2593;"> <!-- DARK SHADE -->
+<!ENTITY marker	"&#x25AE;"> <!-- BLACK VERTICAL RECTANGLE -->
+<!ENTITY cir	"&#x25CB;"> <!-- WHITE CIRCLE -->
+<!ENTITY squ	"&#x25A1;"> <!-- WHITE SQUARE -->
+<!ENTITY rect	"&#x25AD;"> <!-- WHITE RECTANGLE -->
+<!ENTITY utri	"&#x25B5;"> <!-- WHITE UP-POINTING TRIANGLE -->
+<!ENTITY dtri	"&#x25BF;"> <!-- WHITE DOWN-POINTING TRIANGLE -->
+<!ENTITY star	"&#x22C6;"> <!-- STAR OPERATOR -->
+<!ENTITY bull	"&#x2022;"> <!-- BULLET -->
+<!ENTITY squf	"&#x25AA;"> <!--  -->
+<!ENTITY utrif	"&#x25B4;"> <!-- BLACK UP-POINTING TRIANGLE -->
+<!ENTITY dtrif	"&#x25BE;"> <!-- BLACK DOWN-POINTING TRIANGLE -->
+<!ENTITY ltrif	"&#x25C2;"> <!-- BLACK LEFT-POINTING TRIANGLE -->
+<!ENTITY rtrif	"&#x25B8;"> <!-- BLACK RIGHT-POINTING TRIANGLE -->
+<!ENTITY clubs	"&#x2663;"> <!-- BLACK CLUB SUIT -->
+<!ENTITY diams	"&#x2666;"> <!-- BLACK DIAMOND SUIT -->
+<!ENTITY hearts	"&#x2665;"> <!-- BLACK HEART SUIT -->
+<!ENTITY spades	"&#x2660;"> <!-- BLACK SPADE SUIT -->
+<!ENTITY malt	"&#x2720;"> <!-- MALTESE CROSS -->
+<!ENTITY dagger	"&#x2020;"> <!-- DAGGER -->
+<!ENTITY Dagger	"&#x2021;"> <!-- DOUBLE DAGGER -->
+<!ENTITY check	"&#x2713;"> <!-- CHECK MARK -->
+<!ENTITY cross	"&#x2717;"> <!-- BALLOT X -->
+<!ENTITY sharp	"&#x266F;"> <!-- MUSIC SHARP SIGN -->
+<!ENTITY flat	"&#x266D;"> <!-- MUSIC FLAT SIGN -->
+<!ENTITY male	"&#x2642;"> <!-- MALE SIGN -->
+<!ENTITY female	"&#x2640;"> <!--  -->
+<!ENTITY phone	"&#x260E;"> <!-- TELEPHONE SIGN -->
+<!ENTITY telrec	"&#x2315;"> <!-- TELEPHONE RECORDER -->
+<!ENTITY copysr	"&#x2117;"> <!-- SOUND RECORDING COPYRIGHT -->
+<!ENTITY caret	"&#x2041;"> <!-- CARET -->
+<!ENTITY lsquor	"&#x201A;"> <!-- SINGLE LOW-9 QUOTATION MARK -->
+<!ENTITY ldquor	"&#x201E;"> <!-- DOUBLE LOW-9 QUOTATION MARK -->
+<!ENTITY fflig	"&#xFB00;"> <!--  -->
+<!ENTITY filig	"&#xFB01;"> <!--  -->
+<!--     fjlig	Unknown unicode character -->
+<!ENTITY ffilig	"&#xFB03;"> <!--  -->
+<!ENTITY ffllig	"&#xFB04;"> <!--  -->
+<!ENTITY fllig	"&#xFB02;"> <!--  -->
+<!ENTITY mldr	"&#x2026;"> <!-- HORIZONTAL ELLIPSIS -->
+<!ENTITY rdquor	"&#x201C;"> <!--  -->
+<!ENTITY rsquor	"&#x2018;"> <!--  -->
+<!ENTITY vellip	"&#x22EE;"> <!--  -->
+<!ENTITY hybull	"&#x2043;"> <!-- HYPHEN BULLET -->
+<!ENTITY loz	"&#x25CA;"> <!-- LOZENGE -->
+<!ENTITY lozf	"&#x2726;"> <!--  -->
+<!ENTITY ltri	"&#x25C3;"> <!-- WHITE LEFT-POINTING TRIANGLE -->
+<!ENTITY rtri	"&#x25B9;"> <!-- WHITE RIGHT-POINTING TRIANGLE -->
+<!ENTITY starf	"&#x2605;"> <!-- BLACK STAR -->
+<!ENTITY natur	"&#x266E;"> <!-- MUSIC NATURAL SIGN -->
+<!ENTITY rx	"&#x211E;"> <!-- PRESCRIPTION TAKE -->
+<!ENTITY sext	"&#x2736;"> <!-- SIX POINTED BLACK STAR -->
+<!ENTITY target	"&#x2316;"> <!-- POSITION INDICATOR -->
+<!ENTITY dlcrop	"&#x230D;"> <!-- BOTTOM LEFT CROP -->
+<!ENTITY drcrop	"&#x230C;"> <!-- BOTTOM RIGHT CROP -->
+<!ENTITY ulcrop	"&#x230F;"> <!-- TOP LEFT CROP -->
+<!ENTITY urcrop	"&#x230E;"> <!-- TOP RIGHT CROP -->

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-tech.ent
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-tech.ent	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/ent/iso-tech.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,69 @@
+<!-- iso-tech.ent (initially distributed with DocBook XML DTD V4.1.1beta1) -->
+
+<!-- Derived from the corresponding ISO 8879 standard entity set
+     and the Unicode character mappings provided by Sebastian Rahtz.
+     With additional derivations from
+     ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/MISC/SGML.TXT -->
+
+<!ENTITY aleph	"&#x2135;"> <!-- ALEF SYMBOL -->
+<!ENTITY and	"&#x2227;"> <!--  -->
+<!ENTITY ang90	"&#x221F;"> <!-- RIGHT ANGLE -->
+<!ENTITY angsph	"&#x2222;"> <!--  -->
+<!ENTITY ap	"&#x2248;"> <!--  -->
+<!ENTITY becaus	"&#x2235;"> <!-- BECAUSE -->
+<!ENTITY bottom	"&#x22A5;"> <!--  -->
+<!ENTITY cap	"&#x2229;"> <!--  -->
+<!ENTITY cong	"&#x2245;"> <!--  -->
+<!ENTITY conint	"&#x222E;"> <!--  -->
+<!ENTITY cup	"&#x222A;"> <!--  -->
+<!ENTITY equiv	"&#x2261;"> <!--  -->
+<!ENTITY exist	"&#x2203;"> <!--  -->
+<!ENTITY forall	"&#x2200;"> <!--  -->
+<!ENTITY fnof	"&#x0192;"> <!-- LATIN SMALL LETTER F WITH HOOK -->
+<!ENTITY ge	"&#x2265;"> <!-- GREATER-THAN OR EQUAL TO -->
+<!ENTITY iff	"&#x21D4;"> <!-- LEFT RIGHT DOUBLE ARROW -->
+<!ENTITY infin	"&#x221E;"> <!--  -->
+<!ENTITY int	"&#x222B;"> <!--  -->
+<!ENTITY isin	"&#x220A;"> <!--  -->
+<!ENTITY lang	"&#x3008;"> <!--  -->
+<!ENTITY lArr	"&#x21D0;"> <!-- LEFTWARDS ARROW -->
+<!ENTITY le	"&#x2264;"> <!--  -->
+<!ENTITY minus	"&#x2212;"> <!-- MINUS SIGN -->
+<!ENTITY mnplus	"&#x2213;"> <!--  -->
+<!ENTITY nabla	"&#x2207;"> <!-- NABLA -->
+<!ENTITY ne	"&#x2260;"> <!--  -->
+<!ENTITY ni	"&#x220D;"> <!--  -->
+<!ENTITY or	"&#x2228;"> <!--  -->
+<!ENTITY par	"&#x2225;"> <!-- PARALLEL TO -->
+<!ENTITY part	"&#x2202;"> <!--  -->
+<!ENTITY permil	"&#x2030;"> <!-- PER MILLE SIGN -->
+<!ENTITY perp	"&#x22A5;"> <!--  -->
+<!ENTITY prime	"&#x2032;"> <!-- PRIME -->
+<!ENTITY Prime	"&#x2033;"> <!-- DOUBLE PRIME -->
+<!ENTITY prop	"&#x221D;"> <!--  -->
+<!ENTITY radic	"&#x221A;"> <!--  -->
+<!ENTITY rang	"&#x3009;"> <!--  -->
+<!ENTITY rArr	"&#x21D2;"> <!-- RIGHTWARDS ARROW -->
+<!ENTITY sim	"&#x223C;"> <!--  -->
+<!ENTITY sime	"&#x2243;"> <!--  -->
+<!ENTITY square	"&#x25A1;"> <!-- WHITE SQUARE -->
+<!ENTITY sub	"&#x2282;"> <!--  -->
+<!ENTITY sube	"&#x2286;"> <!--  -->
+<!ENTITY sup	"&#x2283;"> <!--  -->
+<!ENTITY supe	"&#x2287;"> <!--  -->
+<!ENTITY there4	"&#x2234;"> <!--  -->
+<!ENTITY Verbar	"&#x2016;"> <!-- DOUBLE VERTICAL LINE -->
+<!ENTITY angst	"&#x212B;"> <!-- ANGSTROM SIGN -->
+<!ENTITY bernou	"&#x212C;"> <!-- SCRIPT CAPITAL B -->
+<!ENTITY compfn	"&#x2218;"> <!-- RING OPERATOR -->
+<!ENTITY Dot	"&#x00A8;"> <!--  -->
+<!ENTITY DotDot	"&#x20DC;"> <!-- COMBINING FOUR DOTS ABOVE -->
+<!ENTITY hamilt	"&#x210B;"> <!-- SCRIPT CAPITAL H -->
+<!ENTITY lagran	"&#x2112;"> <!-- SCRIPT CAPITAL L -->
+<!ENTITY lowast	"&#x2217;"> <!-- ASTERISK OPERATOR -->
+<!ENTITY notin	"&#x2209;"> <!--  -->
+<!ENTITY order	"&#x2134;"> <!-- SCRIPT SMALL O -->
+<!ENTITY phmmat	"&#x2133;"> <!-- SCRIPT CAPITAL M -->
+<!ENTITY tdot	"&#x20DB;"> <!-- COMBINING THREE DOTS ABOVE -->
+<!ENTITY tprime	"&#x2034;"> <!-- TRIPLE PRIME -->
+<!ENTITY wedgeq	"&#x2259;"> <!-- ESTIMATES -->

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/htmltblx.mod
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/htmltblx.mod	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/htmltblx.mod	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,228 @@
+<!-- ...................................................................... -->
+<!-- DocBook XML HTML Table Module V4.3CR3 ................................... -->
+<!-- File htmltblx.mod .................................................... -->
+
+<!-- Copyright 2003 ArborText, Inc., Norman Walsh, Sun Microsystems, Inc.,
+     and the Organization for the Advancement of Structured Information
+     Standards (OASIS).
+
+     $Id: htmltblx.mod,v 1.1.1.1 2004/10/19 21:21:35 juntao Exp $
+
+     Permission to use, copy, modify and distribute the DocBook XML DTD
+     and its accompanying documentation for any purpose and without fee
+     is hereby granted in perpetuity, provided that the above copyright
+     notice and this paragraph appear in all copies.  The copyright
+     holders make no representation about the suitability of the DTD for
+     any purpose.  It is provided "as is" without expressed or implied
+     warranty.
+
+     If you modify the DocBook XML DTD in any way, except for declaring and
+     referencing additional sets of general entities and declaring
+     additional notations, label your DTD as a variant of DocBook.  See
+     the maintenance documentation for more information.
+
+     Please direct all questions, bug reports, or suggestions for
+     changes to the docbook at lists.oasis-open.org mailing list. For more
+     information, see http://www.oasis-open.org/docbook/.
+-->
+
+<!-- ...................................................................... -->
+
+<!-- This module contains the definitions for elements that are
+     isomorphic to the HTML elements. One could argue we should
+     instead have based ourselves on the XHTML Table Module, but the
+     HTML one is more like what browsers are likely to accept today
+     and users are likely to use.
+
+     This module has been developed for use with the DocBook V4.3
+     "union table model" in which elements and attlists common to both
+     models are defined (as the union) in the CALS table module by
+     setting various parameter entities appropriately in this file.
+
+     In DTD driver files referring to this module, please use an entity
+     declaration that uses the public identifier shown below:
+
+     <!ENTITY % htmltbl PUBLIC
+     "-//OASIS//ELEMENTS DocBook XML HTML Tables V4.3CR3//EN"
+     "htmltblx.mod">
+     %htmltbl;
+
+     See the documentation for detailed information on the parameter
+     entity and module scheme used in DocBook, customizing DocBook and
+     planning for interchange, and changes made since the last release
+     of DocBook.
+-->
+
+<!--======================= XHTML Tables =======================================-->
+
+<!ENTITY % html.coreattrs
+ "id          ID             #IMPLIED
+  class       CDATA          #IMPLIED
+  style       CDATA          #IMPLIED
+  title       CDATA         #IMPLIED"
+  >
+
+<!-- Does not contain lang or dir because they are in %common.attribs -->
+<!ENTITY % i18n
+ "xml:lang    NMTOKEN        #IMPLIED"
+  >
+
+<!ENTITY % events
+ "onclick     CDATA       #IMPLIED
+  ondblclick  CDATA       #IMPLIED
+  onmousedown CDATA       #IMPLIED
+  onmouseup   CDATA       #IMPLIED
+  onmouseover CDATA       #IMPLIED
+  onmousemove CDATA       #IMPLIED
+  onmouseout  CDATA       #IMPLIED
+  onkeypress  CDATA       #IMPLIED
+  onkeydown   CDATA       #IMPLIED
+  onkeyup     CDATA       #IMPLIED"
+  >
+
+<!ENTITY % attrs "%html.coreattrs; %i18n; %events;">
+
+<!ENTITY % cellhalign
+  "align      (left|center|right|justify|char) #IMPLIED
+   char       CDATA    #IMPLIED
+   charoff    CDATA       #IMPLIED"
+  >
+
+<!ENTITY % cellvalign
+  "valign     (top|middle|bottom|baseline) #IMPLIED"
+  >
+
+<!ELEMENT colgroup (col)*>
+<!ELEMENT col      EMPTY>
+<!ELEMENT tr       (th|td)+>
+<!ELEMENT th       (%para.char.mix; | %tabentry.mix;)*>
+<!ELEMENT td       (%para.char.mix; | %tabentry.mix;)*>
+
+<!ATTLIST colgroup
+  %attrs;
+  span        CDATA       "1"
+  width       CDATA  #IMPLIED
+  %cellhalign;
+  %cellvalign;
+  >
+
+<!ATTLIST col
+  %attrs;
+  span        CDATA       "1"
+  width       CDATA  #IMPLIED
+  %cellhalign;
+  %cellvalign;
+  >
+
+<!ATTLIST tr
+  %attrs;
+  %cellhalign;
+  %cellvalign;
+  bgcolor     CDATA        #IMPLIED
+  >
+
+<!ATTLIST th
+  %attrs;
+  abbr        CDATA         #IMPLIED
+  axis        CDATA          #IMPLIED
+  headers     IDREFS         #IMPLIED
+  scope       (row|col|rowgroup|colgroup)   #IMPLIED
+  rowspan     CDATA       "1"
+  colspan     CDATA       "1"
+  %cellhalign;
+  %cellvalign;
+  nowrap      (nowrap)       #IMPLIED
+  bgcolor     CDATA         #IMPLIED
+  width       CDATA       #IMPLIED
+  height      CDATA       #IMPLIED
+  >
+
+<!ATTLIST td
+  %attrs;
+  abbr        CDATA         #IMPLIED
+  axis        CDATA          #IMPLIED
+  headers     IDREFS         #IMPLIED
+  scope       (row|col|rowgroup|colgroup)   #IMPLIED
+  rowspan     CDATA       "1"
+  colspan     CDATA       "1"
+  %cellhalign;
+  %cellvalign;
+  nowrap      (nowrap)       #IMPLIED
+  bgcolor     CDATA         #IMPLIED
+  width       CDATA       #IMPLIED
+  height      CDATA       #IMPLIED
+  >
+
+<!-- ====================================================== -->
+<!--        Set up to read in the CALS model configured to
+            merge with the XHTML table model                -->
+<!-- ====================================================== -->
+
+<!ENTITY % tables.role.attrib "%role.attrib;">
+
+<!-- Add label and role attributes to table and informaltable -->
+<!ENTITY % bodyatt "
+		floatstyle	CDATA			#IMPLIED
+                %label.attrib;"
+>
+
+<!-- Add common attributes to Table, TGroup, TBody, THead, TFoot, Row, 
+     EntryTbl, and Entry (and InformalTable element). -->
+
+<!ENTITY % secur "
+	%common.attrib;
+	class       CDATA          #IMPLIED
+	style       CDATA          #IMPLIED
+	title       CDATA         #IMPLIED
+	%i18n;
+	%events;
+	%tables.role.attrib;">
+
+<!ENTITY % common.table.attribs
+	"%bodyatt;
+	%secur;">
+
+<!-- Content model for Table (that also allows HTML tables) -->
+<!ENTITY % tbl.table.mdl
+	"((blockinfo?,
+           (%formalobject.title.content;),
+           (%ndxterm.class;)*,
+           textobject*,
+           (graphic+|mediaobject+|tgroup+))
+         |(caption, (col*|colgroup*), thead?, tfoot?, (tbody+|tr+)))">
+
+<!ENTITY % informal.tbl.table.mdl
+	"(textobject*,
+          (graphic+|mediaobject+|tgroup+))
+         | ((col*|colgroup*), thead?, tfoot?, (tbody+|tr+))">
+
+<!-- Attributes for Table (including HTML ones) -->
+<!ENTITY % tbl.table.att        '
+    tabstyle    CDATA           #IMPLIED
+    tocentry    %yesorno.attvals;       #IMPLIED
+    shortentry  %yesorno.attvals;       #IMPLIED
+    orient      (port|land)     #IMPLIED
+    pgwide      %yesorno.attvals;       #IMPLIED 
+    summary     CDATA          #IMPLIED
+    width       CDATA        #IMPLIED
+    border      CDATA        #IMPLIED
+    rules       (none | groups | rows | cols | all)      #IMPLIED
+    cellspacing CDATA        #IMPLIED
+    cellpadding CDATA        #IMPLIED
+    align       (left|center|right)   #IMPLIED
+    bgcolor     CDATA         #IMPLIED
+'>
+
+<!ENTITY % tbl.frame.attval "void|above|below|hsides|lhs|rhs|vsides|box|border|
+top|bottom|topbot|all|sides|none">
+
+<!-- Allow either objects or inlines; beware of REs between elements. -->
+<!ENTITY % tbl.entry.mdl "%para.char.mix; | %tabentry.mix;">
+
+<!-- thead, tfoot, and tbody are defined in both table models,
+     so we set up parameter entities to define union models for them
+ -->
+
+<!ENTITY % tbl.hdft.mdl        "(tr+|(colspec*,row+))">
+<!ENTITY % tbl.tbody.mdl       "(tr+|row+)">
+<!ENTITY % tbl.valign.attval   "top|middle|bottom|baseline">

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/soextblx.dtd
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/soextblx.dtd	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-dtd/soextblx.dtd	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,314 @@
+<!-- XML EXCHANGE TABLE MODEL DECLARATION MODULE -->
+
+<!-- This set of declarations defines the XML version of the Exchange
+     Table Model as of the date shown in the Formal Public Identifier
+     (FPI) for this entity.
+
+     This set of declarations may be referred to using a public external
+     entity declaration and reference as shown in the following three
+     lines:
+
+     <!ENTITY % calstblx
+       PUBLIC "-//OASIS//DTD XML Exchange Table Model 19990315//EN">
+       %calstblx;
+
+     If various parameter entities used within this set of declarations
+     are to be given non-default values, the appropriate declarations
+     should be given before calling in this package (i.e., before the
+     "%calstblx;" reference).
+-->
+
+<!-- The motivation for this XML version of the Exchange Table Model
+     is simply to create an XML version of the SGML Exchange Table
+     Model. By design, no effort has been made to "improve" the model.
+
+     This XML version incorporates the logical bare minimum changes
+     necessary to make the Exchange Table Model a valid XML DTD.
+
+     It has been modified slightly for use in the combined HTML/CALS models
+     supported by DocBook V4.3.
+-->
+
+<!-- The XML version of the Exchange Table Model differs from
+     the SGML version in the following ways:
+
+     The following parameter entities have been removed:
+
+       - tbl.table.excep, tbl.hdft.excep, tbl.row.excep, tbl.entry.excep
+         There are no exceptions in XML. The following normative statement
+         is made in lieu of exceptions: the exchange table model explicitly
+         forbids a table from occurring within another table. If the
+         content model of an entry includes a table element, then this
+         cannot be enforced by the DTD, but it is a deviation from the
+         exchange table model to include a table within a table.
+
+       - tbl.hdft.name, tbl.hdft.mdl, tbl.hdft.excep, tbl.hdft.att
+         The motivation for these elements was to change the table
+         header/footer elements. Since XML does not allow element declarations
+         to contain name groups, and the exchange table model does not
+         allow a table to contain footers, the continued presence of these
+         attributes seems unnecessary.
+
+     The following parameter entity has been added:
+
+       - tbl.thead.att
+         This entity parameterizes the attributes on thead. It replaces
+         the tbl.hdft.att parameter entity.
+
+     Other miscellaneous changes:
+
+       - Tag ommission indicators have been removed
+       - Comments have been removed from declarations
+       - NUMBER attributes have been changed to NMTOKEN
+       - NUTOKEN attributes have been to changed to NMTOKEN
+       - Removed the grouping characters around the content model
+         parameter entry for the 'entry' element. This is necessary
+         so that an entry can contain #PCDATA and be defined as an
+         optional, repeatable OR group beginning with #PCDATA.
+-->
+
+<!-- This entity includes a set of element and attribute declarations
+     that partially defines the Exchange table model.  However, the model
+     is not well-defined without the accompanying natural language
+     description of the semantics (meanings) of these various elements,
+     attributes, and attribute values.  The semantic writeup, also available
+     from SGML Open, should be used in conjunction with this entity.
+-->
+
+<!-- In order to use the Exchange table model, various parameter entity
+     declarations are required.  A brief description is as follows:
+
+     ENTITY NAME      WHERE USED              WHAT IT IS
+
+     %yesorno         In ATTLIST of:          An attribute declared value
+                      almost all elements     for a "boolean" attribute
+
+     %paracon         In content model of:    The "text" (logical content)
+                      <entry>                 of the model group for <entry>
+
+     %titles          In content model of:    The "title" part of the model
+                      table element           group for the table element
+
+     %tbl.table.name  In declaration of:      The name of the "table"
+                      table element           element
+
+     %tbl.table-titles.mdl In content model of: The model group for the title
+                      table elements          part of the content model for
+                                              table element
+
+     %tbl.table.mdl   In content model of:    The model group for the content
+                      table elements          model for table element,
+                                              often (and by default) defined
+                                              in terms of %tbl.table-titles.mdl
+                                              and tgroup
+
+     %tbl.table.att   In ATTLIST of:          Additional attributes on the
+                      table element           table element
+
+     %bodyatt         In ATTLIST of:          Additional attributes on the
+                      table element           table element (for backward
+                                              compatibility with the SGML
+                                              model)
+
+     %tbl.tgroup.mdl  In content model of:    The model group for the content
+                      <tgroup>                model for <tgroup>
+
+     %tbl.tgroup.att  In ATTLIST of:          Additional attributes on the
+                      <tgroup>                <tgroup> element
+
+     %tbl.thead.att   In ATTLIST of:          Additional attributes on the
+                      <thead>                 <thead> element
+
+     %tbl.tbody.att   In ATTLIST of:          Additional attributes on the
+                      <tbody>                 <tbody> element
+
+     %tbl.colspec.att In ATTLIST of:          Additional attributes on the
+                      <colspec>               <colspec> element
+
+     %tbl.row.mdl     In content model of:    The model group for the content
+                      <row>                   model for <row>
+
+     %tbl.row.att     In ATTLIST of:          Additional attributes on the
+                      <row>                   <row> element
+
+     %tbl.entry.mdl   In content model of:    The model group for the content
+                      <entry>                 model for <entry>
+
+     %tbl.entry.att   In ATTLIST of:          Additional attributes on the
+                      <entry>                 <entry> element
+
+     This set of declarations will use the default definitions shown below
+     for any of these parameter entities that are not declared before this
+     set of declarations is referenced.
+-->
+
+<!-- These definitions are not directly related to the table model, but are
+     used in the default CALS table model and may be defined elsewhere (and
+     prior to the inclusion of this table module) in the referencing DTD. -->
+
+<!ENTITY % yesorno 'NMTOKEN'> <!-- no if zero(s), yes if any other value -->
+<!ENTITY % titles  'title?'>
+<!ENTITY % pcd "#PCDATA">
+<!ENTITY % paracon '%pcd;'> <!-- default for use in entry content -->
+
+<!--
+The parameter entities as defined below change and simplify the CALS table
+model as published (as part of the Example DTD) in MIL-HDBK-28001.  The
+resulting simplified DTD has support from the SGML Open vendors and is
+therefore more interoperable among different systems.
+
+These following declarations provide the Exchange default definitions
+for these entities.  However, these entities can be redefined (by giving
+the appropriate parameter entity declaration(s) prior to the reference
+to this Table Model declaration set entity) to fit the needs of the
+current application.
+
+Note, however, that changes may have significant effect on the ability to
+interchange table information.  These changes may manifest themselves
+in useability, presentation, and possible structure information degradation.
+-->
+
+<!ENTITY % tbl.table.name       "table">
+<!ENTITY % tbl.table-titles.mdl "%titles;,">
+<!ENTITY % tbl.table-main.mdl   "tgroup+">
+<!ENTITY % tbl.table.mdl        "%tbl.table-titles.mdl; %tbl.table-main.mdl;">
+<!ENTITY % tbl.table.att        "
+    pgwide      %yesorno;       #IMPLIED ">
+<!ENTITY % bodyatt              "">
+<!ENTITY % tbl.tgroup.mdl       "colspec*,thead?,tbody">
+<!ENTITY % tbl.tgroup.att       "">
+<!ENTITY % tbl.thead.att        "">
+<!ENTITY % tbl.tbody.att        "">
+<!ENTITY % tbl.colspec.att      "">
+<!ENTITY % tbl.row.mdl          "entry+">
+<!ENTITY % tbl.row.att          "">
+<!ENTITY % tbl.entry.mdl        "(%paracon;)*">
+<!ENTITY % tbl.entry.att        "">
+
+<!ENTITY % tbl.frame.attval     "top|bottom|topbot|all|sides|none">
+<!ENTITY % tbl.tbody.mdl        "row+">
+
+<!-- =====  Element and attribute declarations follow. =====  -->
+
+<!--
+     Default declarations previously defined in this entity and
+     referenced below include:
+     ENTITY % tbl.table.name       "table"
+     ENTITY % tbl.table-titles.mdl "%titles;,"
+     ENTITY % tbl.table.mdl        "%tbl.table-titles; tgroup+"
+     ENTITY % tbl.table.att        "
+                        pgwide          %yesorno;       #IMPLIED "
+-->
+
+<!ELEMENT %tbl.table.name; (%tbl.table.mdl;)>
+
+<!ATTLIST %tbl.table.name;
+        frame           (%tbl.frame.attval;)                    #IMPLIED
+        colsep          %yesorno;                               #IMPLIED
+        rowsep          %yesorno;                               #IMPLIED
+        %tbl.table.att;
+        %bodyatt;
+>
+
+<!--
+     Default declarations previously defined in this entity and
+     referenced below include:
+     ENTITY % tbl.tgroup.mdl    "colspec*,thead?,tbody"
+     ENTITY % tbl.tgroup.att    ""
+-->
+
+<!ELEMENT tgroup (%tbl.tgroup.mdl;) >
+
+<!ATTLIST tgroup
+        cols            NMTOKEN                                 #REQUIRED
+        colsep          %yesorno;                               #IMPLIED
+        rowsep          %yesorno;                               #IMPLIED
+        align           (left|right|center|justify|char)        #IMPLIED
+        %tbl.tgroup.att;
+>
+
+<!--
+     Default declarations previously defined in this entity and
+     referenced below include:
+     ENTITY % tbl.colspec.att   ""
+-->
+
+<!ELEMENT colspec EMPTY >
+
+<!ATTLIST colspec
+        colnum          NMTOKEN                                 #IMPLIED
+        colname         NMTOKEN                                 #IMPLIED
+        colwidth        CDATA                                   #IMPLIED
+        colsep          %yesorno;                               #IMPLIED
+        rowsep          %yesorno;                               #IMPLIED
+        align           (left|right|center|justify|char)        #IMPLIED
+        char            CDATA                                   #IMPLIED
+        charoff         NMTOKEN                                 #IMPLIED
+        %tbl.colspec.att;
+>
+
+<!--
+     Default declarations previously defined in this entity and
+     referenced below include:
+     ENTITY % tbl.thead.att      ""
+-->
+
+<!ELEMENT thead (row+)>
+
+<!ATTLIST thead
+        valign          (top|middle|bottom)                     #IMPLIED
+        %tbl.thead.att;
+>
+
+<!--
+     Default declarations previously defined in this entity and
+     referenced below include:
+     ENTITY % tbl.tbody.att     ""
+-->
+
+<!ELEMENT tbody (%tbl.tbody.mdl;)>
+
+<!ATTLIST tbody
+        valign          (top|middle|bottom)                     #IMPLIED
+        %tbl.tbody.att;
+>
+
+<!--
+     Default declarations previously defined in this entity and
+     referenced below include:
+     ENTITY % tbl.row.mdl       "entry+"
+     ENTITY % tbl.row.att       ""
+-->
+
+<!ELEMENT row (%tbl.row.mdl;)>
+
+<!ATTLIST row
+        rowsep          %yesorno;                               #IMPLIED
+        valign          (top|middle|bottom)                     #IMPLIED
+        %tbl.row.att;
+>
+
+
+<!--
+     Default declarations previously defined in this entity and
+     referenced below include:
+     ENTITY % paracon           "#PCDATA"
+     ENTITY % tbl.entry.mdl     "(%paracon;)*"
+     ENTITY % tbl.entry.att     ""
+-->
+
+<!ELEMENT entry (%tbl.entry.mdl;)*>
+
+<!ATTLIST entry
+        colname         NMTOKEN                                 #IMPLIED
+        namest          NMTOKEN                                 #IMPLIED
+        nameend         NMTOKEN                                 #IMPLIED
+        morerows        NMTOKEN                                 #IMPLIED
+        colsep          %yesorno;                               #IMPLIED
+        rowsep          %yesorno;                               #IMPLIED
+        align           (left|right|center|justify|char)        #IMPLIED
+        char            CDATA                                   #IMPLIED
+        charoff         NMTOKEN                                 #IMPLIED
+        valign          (top|middle|bottom)                     #IMPLIED
+        %tbl.entry.att;
+>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/README
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/README	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/README	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,107 @@
+README for the DocBook Stylesheets
+
+These are XSL stylesheets for the DocBook XML DTD. (They would
+also work for the DocBook DTD, modulo certain namecase problems
+and the fact that there aren't (yet) any XSL implementations
+that work with SGML source documents.)
+
+As of version 1.0, most of the elements in DocBook are handled
+in some way or another, usually reasonably, but there's still
+lots of work to be done.
+
+For more information, see http://docbook.sourceforge.net/
+
+Manifest
+--------
+
+README      this file
+TODO        planned features not yet implemented (may be incomplete :-)
+BUGS        known problems (may also be incomplete :-)
+VERSION     the current version number (note that this is an XSL stylesheet,
+            included by both fo/docbook.xsl and html/docbook.xsl)
+WhatsNew    changes since the last public release (for a complete list
+            of changes, see the ChangeLog file(s))
+common/	    contains code common to both stylesheets
+doc/        documentation
+docsrc/     documentation sources
+extensions/ Java extensions
+fo/         stylesheets that produce XSL FO
+html/	    stylesheets that produce HTML
+htmlhelp/   stylesheets that produce HTML Help 
+images/     images
+javahelp/   stylesheets that produce Java Help
+lib/        contains schema-independent functions
+template/   contains templates for building stylesheet customization layers
+xhtml/      stylesheets that produce XHTML
+
+Changes
+-------
+
+See the ChangeLog in each directory for additional information
+about the specific changes.
+
+See WhatsNew for changes since the last release.
+
+Installation
+------------
+
+Unpack the distribution somewhere.
+
+Use
+---
+
+Process your DocBook documents with one of the following stylesheets
+using your favorite XSLT processor:
+
+  xhtml/docbook.xsl     - for XHTML
+  html/docbook.xsl      - for HTML (as a single file)
+  html/chunk.xsl        - for HTML (multiple files)
+  fo/docbook.xsl        - for XSL FO
+  htmlhelp/htmlhelp.xsl - for HTML Help
+  javahelp/javahelp.xsl - for JavaHelp
+
+Copyright
+---------
+
+Copyright (C) 1999, 2000, 2001, 2002 Norman Walsh
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the ``Software''), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+Except as contained in this notice, the names of individuals
+credited with contribution to this software shall not be used in
+advertising or otherwise to promote the sale, use or other
+dealings in this Software without prior written authorization
+from the individuals in question.
+
+Any stylesheet derived from this Software that is publically
+distributed will be identified with a different name and the
+version strings in any derived Software will be changed so that
+no possibility of confusion between the derived package and this
+Software will exist.
+
+Warranty
+--------
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT.  IN NO EVENT SHALL NORMAN WALSH OR ANY OTHER
+CONTRIBUTOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Contacting the Author
+---------------------
+
+These stylesheets are maintained by Norman Walsh, <ndw at nwalsh.com>.

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/VERSION
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/VERSION	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/VERSION	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,84 @@
+<?xml version='1.0'?> <!-- -*- nxml -*- -->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fm="http://freshmeat.net/projects/freshmeat-submit/"
+		xmlns:sf="http://sourceforge.net/"
+		exclude-result-prefixes="fm sf"
+                version='1.0'>
+
+<xsl:param name="VERSION" select="string(document('')//fm:Version[1])"/>
+<xsl:param name="sf-relid" select="0"/>
+<xsl:strip-space elements="fm:*"/>
+
+<fm:project>
+  <fm:Project>DocBook</fm:Project>
+  <fm:Branch>XSL Stylesheets</fm:Branch>
+  <fm:Version>1.65.1</fm:Version>
+<!--
+  <fm:License>MIT/X Consortium License</fm:License>
+-->
+  <fm:Release-Focus>
+  <!-- initial freshmeat announcement -->
+  <!-- documentation -->
+  <!-- code cleanup -->
+  <!-- Minor feature enhancements -->
+  <!-- major feature enhancements -->
+  Minor bugfixes
+  <!-- major bugfixes -->
+  <!-- minor security fixes -->
+  <!-- major security fixes -->
+  </fm:Release-Focus>
+  <fm:Home-Page-URL>http://sourceforge.net/projects/docbook/</fm:Home-Page-URL>
+  <fm:Gzipped-Tar-URL>http://prdownloads.sourceforge.net/docbook/docbook-xsl-{VERSION}.tar.gz?download</fm:Gzipped-Tar-URL>
+  <fm:Zipped-Tar-URL>http://prdownloads.sourceforge.net/docbook/docbook-xsl-{VERSION}.zip?download</fm:Zipped-Tar-URL>
+  <fm:Changelog-URL>http://sourceforge.net/project/shownotes.php?release_id={SFRELID}</fm:Changelog-URL>
+  <fm:CVS-URL>http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/xsl/</fm:CVS-URL>
+  <fm:Mailing-List-URL>http://lists.oasis-open.org/archives/docbook-apps/</fm:Mailing-List-URL>
+  <fm:Changes>Small bug fixes. Fixed CA localization.
+</fm:Changes>
+</fm:project>
+
+<xsl:template match="/" priority="-100">
+  <xsl:if test="$sf-relid = 0">
+    <xsl:message terminate="yes">
+      <xsl:text>You must specify the sf-relid as a parameter.</xsl:text>
+    </xsl:message>
+  </xsl:if>
+
+  <xsl:apply-templates select="//fm:project"/>
+</xsl:template>
+
+<xsl:template match="fm:project">
+  <xsl:text>&#10;</xsl:text>
+  <xsl:apply-templates/>
+  <xsl:text>&#10;</xsl:text>
+  <xsl:apply-templates select="fm:Changes" mode="text"/>
+</xsl:template>
+
+<xsl:template match="fm:Changes"/>
+
+<xsl:template match="fm:Gzipped-Tar-URL|fm:Zipped-Tar-URL">
+  <xsl:value-of select="local-name(.)"/>
+  <xsl:text>: </xsl:text>
+  <xsl:value-of select="substring-before(., '{VERSION}')"/>
+  <xsl:value-of select="$VERSION"/>
+  <xsl:value-of select="substring-after(., '{VERSION}')"/>
+  <xsl:text>&#10;</xsl:text>
+</xsl:template>
+
+<xsl:template match="fm:Changelog-URL">
+  <xsl:value-of select="local-name(.)"/>
+  <xsl:text>: </xsl:text>
+  <xsl:value-of select="substring-before(., '{SFRELID}')"/>
+  <xsl:value-of select="$sf-relid"/>
+  <xsl:value-of select="substring-after(., '{SFRELID}')"/>
+  <xsl:text>&#10;</xsl:text>
+</xsl:template>
+
+<xsl:template match="fm:*">
+  <xsl:value-of select="local-name(.)"/>
+  <xsl:text>: </xsl:text>
+  <xsl:value-of select="normalize-space(.)"/>
+  <xsl:text>&#10;</xsl:text>
+</xsl:template>
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/ChangeLog
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/ChangeLog	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/ChangeLog	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,624 @@
+2004-02-18  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* labels.xsl: Turn off procedure number when formal.procedures = 0.
+
+2004-01-29  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* subtitles.xsl, titles.xsl: Support 'info'
+
+2004-01-26  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* targets.xsl: Pass empty doctype parameters to write.chunk so the
+	output can be used as an entity without DOCTYPE.
+
+2003-12-31  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* autoidx-ng.xsl, l10n.dtd: Added support for new i18n friendly indexing method
+
+2003-12-15  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* .cvsignore, Makefile: Support sr_Latn locale
+
+2003-12-13  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* l10n.xml: Added sr_Latn.xml for Serbian in Latin script.
+
+2003-12-06  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* common.xsl: Fixed bug #851603 infinite recursion in copyright.year when
+	no <year> elements at all.
+
+2003-12-05  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* common.xsl: section.level now computes refentry sections relative to container element.
+
+2003-11-30  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* gentext.xsl, labels.xsl, subtitles.xsl, table.xsl, targets.xsl, titles.xsl: 
+	Added CVS $Id: ChangeLog,v 1.1.1.1 2004/10/19 21:21:36 juntao Exp $ comment.
+
+2003-11-17  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* labels.xsl: Fixed bug where sect1 generated infinite loop when root element
+	and $section.label.includes.component.label is non zero.
+
+2003-10-12  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* gentext.xsl: Fixed cut-and-paste typo in substitute.markup template.
+
+2003-09-23  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* pi.xsl: Fixed dbdatetime PI, which was using context
+	datetime-abbrev for format "B" rather than datetime-full.
+
+2003-08-27  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* titles.xsl: Support HTML tables
+
+2003-08-18  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* .cvsignore: Ignore generate XML documents for Latin and Bangla
+
+	* Makefile, l10n.xml: Add support for Latin
+
+2003-07-31  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* Makefile: Update Makefile to new gentext mechanism
+
+2003-07-31  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* gentext.xsl: Added template for question in object.xref.markup mode
+	to handle case of defaultlabel = qanda.
+
+	* labels.xsl: Removed processing of @label on qandadiv since that is
+	not an allowed attribute of qandadiv.
+
+2003-07-25  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* Makefile, l10n.xml: Added bn.xml Bangla language.
+
+	* gentext.xsl: Handles new xref contexts and the new xrefstyle attribute
+	on xref elements.
+
+	* pi.xsl: Now uses new datetime-full and datetime-abbrev gentext
+	contexts for certain date components.
+
+2003-07-08  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* l10n.xsl: Removed extraneous variable l10n.name which is not used.
+
+2003-06-24  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* l10n.xsl: Fixed bug in l10n.language template where $target parameter
+	was missing from xpath expression.
+
+2003-06-21  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* .cvsignore, Makefile: Added Croatian
+
+2003-05-19  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* .cvsignore, Makefile: Added Arabic
+
+2003-05-08  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* titles.xsl: Support 'title.markup' on glossentry
+
+2003-04-29  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* pi.xsl: Added localization support for datetime PI
+
+2003-04-27  <dcramer at users.sourceforge.net>
+
+	* common.xsl: Added level 6 to test for section depth in section.level template so that section.title.level6.properties will be used for sections that are 6 deep or deeper. This should also cause a h6 to be created in html output.
+
+2003-04-16  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* pi.xsl: Changed PI name from <?timestamp?> to <?dbtimestamp?>
+
+2003-04-14  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* pi.xsl: New file.
+
+2003-04-13  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* table.xsl: A few bug fixes for the colsep/rowsep code
+
+2003-04-12  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* common.xsl: Don't use SVG graphics if use.svg=0
+
+	* table.xsl: Support template to find out if there are more columns in the current row of a table
+
+2003-04-05  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* gentext.xsl: Now uses number-and-title-template for sections only
+	if $section.autolabel is not zero.
+
+2003-03-02  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* common.xsl: Fixed several errors related to TeX math processing
+
+2003-02-25  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* l10n.dtd: Added missing 'english-language-name' attribute to the l10n
+	element, and the missing 'style' attribute to the template
+	element so the current gentext documents will validate.
+
+2003-01-30  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* common.xsl: Corrected several references to parameter $qanda.defaultlabel
+	that were missing the "$".
+
+2003-01-23  Adam Di Carlo <adicarlo at users.sourceforge.net>
+
+	* Makefile: make use of cvstools/Makefile.incl
+
+2003-01-20  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* gentext.xsl: Support experimental parameter to specify that number-and-title xrefs should be used even when things are numbered
+
+	* gentext.xsl: Added object.titleabbrev.markup for consistency
+
+	* l10n.xsl: Added gentext.template.exists to test if a gentext template exists. Clever name, huh?
+
+	* titles.xsl: Expanded support for obtaining titleabbrevs
+
+2003-01-10  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* .cvsignore, l10n.xml: Added bg.xml
+
+	* Makefile: Add Bulgarian
+
+2003-01-02  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* labels.xsl, titles.xsl: Support setindex (there were all sorts of things wrong with it)
+
+2003-01-01  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* table.xsl: CALS says the default for colsep and rowsep is 1.
+
+	* table.xsl: Fix variable scoping problem
+
+	* titles.xsl: Support titleabbrev (outside of info elements anyway)
+
+2002-12-18  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* common.xsl: The select.mediaobject.index template now uses the
+	$stylesheet.result.type parameter to choose the role
+	value, with xhtml falling back to html if needed.
+
+2002-12-17  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* common.xsl: Changed selection of mediaobject to be more consistent using
+	a separate select.mediaobject.index template. Also added
+	text-align to block containing external-graphic in fo output.
+
+2002-11-23  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* common.xsl: Fixed bug in orderedlist-starting-number test when
+	@continuation not set.
+
+2002-11-14  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* common.xsl: Handle nested refsections in section.level
+
+	* gentext.xsl: Pass full xpath name to gentext.template instead of just the local-name
+
+	* l10n.xsl: Make gentext.template search through /-separated names
+
+2002-10-19  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* l10n.xsl: Support output of language attribute
+
+2002-10-09  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* l10n.xsl: Make 3166 language codes work in upper or lowercase
+
+2002-10-02  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* common.xsl: Added orderedlist-starting-number and orderedlist-item-number templates
+
+2002-10-01  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* common.xsl: Changed the section.level template to return a number that matches
+	the section level (sect1 = 1, etc.).
+
+2002-09-27  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* l10n.xml: Add Thai
+
+2002-09-15  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* .cvsignore, Makefile, l10n.xml: Added LT and VI localizations
+
+2002-09-04  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* common.xsl: Refactor person.name templates so that it's easy to override them
+
+	* l10n.xsl: Move l10n.* parameters into ../params so they can be properly documented; made l10n.gentext.use.xref.language a numeric boolean parameter instead of a proper boolean
+
+2002-09-03  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* common.xsl: Remove spurious character on line 432
+
+	* table.xsl: Make sure row-level colsep and rowsep values are 'inherited' onto missing cells
+
+2002-09-02  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* common.xsl: Support person-name style from localization data in personal names
+
+2002-08-28  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* table.xsl: Make inherited attributes work for 'missing' table cells
+
+2002-07-29  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* targetdatabase.dtd: Forgot to fix the attribute on the <obj> element
+	as well.
+
+	* targetdatabase.dtd: Changed the targetptr attribute from #REQUIRED to #IMPLIED
+	since it is not required on all objects.
+
+	* targetdatabase.dtd: Replaced targetid attribute on document with targetptr
+	per the decision of the DocBook Technical Committee.
+
+2002-07-17  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* labels.xsl: Fixed thinko
+
+	* labels.xsl: Don't count equations without titles when labelling equations
+
+2002-07-13  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* targets.xsl: Fixed output encoding to utf-8 so a targets database
+	can handle mixed languages.
+	Added omit-xml-declaration to get around the standalone
+	attribute in the XML declaration not being permitted
+	in system entities.
+
+2002-07-09  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* labels.xsl: Bug #558333: use containing section for the label of a bridgehead if section.autolabel is non-zero
+
+2002-07-07  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* common.xsl: Changed the name of the second-order itemizedlist mark
+	from 'round' (not supported in browsers' <ul> 'type' attribute)
+	to 'circle', which is supported.
+	Both are already supported in FO stylesheet.
+
+2002-07-06  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* targets.xsl: The default.encoding parameter has been renamed chunker.output.encoding
+
+2002-07-05  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* labels.xsl, titles.xsl: Added 'verbose' parameter to default templates in
+	title.markup mode and label.markup mode, and made
+	the error message conditional on that parameter.  The
+	default value is 1, so the message will still be
+	there for normal usage.  But the targets.xsl
+	stylesheet sets verbose to 0 when trolling for
+	cross reference targets to eliminate useless noise
+	on elements that have an id attribute but no title or label.
+
+	* targetdatabase.dtd: New file.
+
+	* targets.xsl: New file.
+
+2002-06-11  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* common.xsl: Augmented debugging message (commented out)
+
+	* gentext.xsl: Experimental support for xrefstyle; support for %d in templates
+
+	* l10n.xsl: Experimental support for xrefstyle
+
+	* titles.xsl: Support refsynopsisdiv in title.markup mode
+
+2002-05-23  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* common.xsl: Support for SVG in HTML
+
+2002-05-21  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* gentext.xsl: Whitespace
+
+	* labels.xsl: Don't generate '. ' after QandA labels
+
+2002-05-12  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* common.xsl: Fix bugs in extension checking in mediaobject.filename
+
+	* l10n.xsl: Reworked test in gentext.template; should have no user-visible changes
+
+	* table.xsl: Removed some obsolete templates; reworked inheritance for improved border support (still implements old DocBook semantics which aren't quite CALS)
+
+	* titles.xsl: Improved error message
+
+2002-04-21  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* .cvsignore, Makefile, l10n.xml: Add support for Hebrew localization
+
+2002-03-24  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* common.xsl: Change comment: personname is no longer experimental
+
+2002-03-18  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* common.xsl: Replace generate.*.toc and generate.*.lot with single generate.toc parameter.
+
+2002-03-18  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* gentext.xsl: Replaced the substitute-markup template with one
+	using simpler logic.  Added params for the content
+	to be substituted so it can be used with olinks
+	where the content is supplied from a data file.
+
+2002-03-14  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* common.xsl: Handle revisionflag a little better on copyrights
+
+	* common.xsl, gentext.xsl, l10n.xsl, labels.xsl, subtitles.xsl, table.xsl, titles.xsl: 
+	Whitespace only: change CR/LF back to LF. Norm was a total moron.
+
+	* common.xsl, gentext.xsl, l10n.xsl, labels.xsl, subtitles.xsl, table.xsl, titles.xsl: 
+	Whitespace changes only: use PC-style CR/LF because Unix clients choke on this far less often than PC clients choke on the reverse. Grrr.
+
+2002-03-07  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* titles.xsl: refentry title in title.markup mode now follows $allow-anchors setting
+	to prevent index entries from appearing in the TOC.
+
+2002-01-28  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* l10n.dtd, l10n.xml: Tweaks to the l10n.dtd to make it as namespace aware as DTDs can be
+
+2002-01-25  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* table.xsl: Fix bug that caused rowsep and colsep to be ignored on empty cells
+
+2002-01-10  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* l10n.xsl: Don't rely on the order of attribute nodes cause they don't have one
+
+2002-01-03  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* .cvsignore, Makefile: Added Thai localization
+
+	* common.xsl: Calculate itemized list symbol based on depth analagous to orderedlist numeration
+
+	* gentext.xsl: Use unnumbered gentext keys appropriately
+
+2001-12-15  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* common.xsl: Improved support for TeX math inside equations.
+
+2001-12-04  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* labels.xsl: Bug #435320: Poor enumeration of LoTs and LoFs
+
+	* titles.xsl: Bug! Can't put HTML here. But what does this break?
+
+2001-12-02  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* titles.xsl: Make no.anchor.mode 'sticky'. This is really necessary because otherwise title inlines effectively turn it off
+
+2001-12-01  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* labels.xsl: Improve FAQ labeling
+
+2001-11-29  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* l10n.xsl: Fixed error message for missing localization so that if
+	missing in en.xml, it doesn't say 'using en'.
+
+2001-11-28  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* common.xsl: Added punct.honorific parameter
+
+	* l10n.xsl: Removed crufty gentext.xref.text template
+
+2001-11-15  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* common.xsl: Support experimental personname wrapper
+
+2001-11-14  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* .cvsignore, Makefile, l10n.xml: Added Basque
+
+2001-11-12  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* common.xsl: Support well-formed documents, use key() instead of id()
+
+2001-11-09  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* .cvsignore, Makefile, l10n.xml: Added Nynorsk
+
+2001-11-06  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* labels.xsl: Why did I assume sections should always be labelled in articles?
+
+2001-11-02  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* common.xsl: Support FAMILY Given style personal names
+
+2001-10-30  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* .cvsignore, Makefile, l10n.xml: Added Xhosa
+
+2001-10-16  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* table.xsl: Table support improvements
+
+2001-10-15  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* .cvsignore, Makefile, l10n.xml: Added Ukranian
+
+	* table.xsl: Fix calculation of rowsep and colsep; added experimental support for table.borders.with.css in HTML; calculation of alignments needs to be added along the same lines
+
+2001-10-14  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* table.xsl: New file.
+
+2001-09-25  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* common.xsl: Support automatic collation of year ranges in copyright
+
+	* l10n.xsl: Fix gentext.nav.* templates
+
+2001-09-22  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* gentext.xsl: Rewrote substitute-markup to support %p
+
+	* gentext.xsl, labels.xsl: Bug #463033: allow xref to list items (in orderedlists) and varlistentrys
+
+	* titles.xsl: Support title.markup for legal notices
+
+2001-08-29  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* common.xsl: Fix orderedlist numerations
+
+2001-08-14  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* l10n.xsl: Calculation of the dingbat nodeset was simply broken
+
+2001-08-13  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* Makefile: Added stylesheet as a dependency
+
+2001-08-04  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* l10n.dtd: Rename internationalization to i18n, localization to l10n
+
+	* l10n.xml: Rename internationalization to i18n, localization to l10n, add namespace declaration
+
+	* l10n.xsl: Support a local i18n override, rename internationalization to i18n, localization to l10n, add namespace declaration
+
+	* labels.xsl: PartIntros never get a label
+
+2001-08-01  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* gentext.xsl: Pass allow-anchors through properly
+
+	* labels.xsl: Fix question labelling
+
+	* titles.xsl: Output anchors for titles if the titles have ids
+
+2001-07-31  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* l10n.xsl: Reverted the change from [last()] to [1] back to [last()]
+	because that is the correct code.
+
+	* l10n.xsl: Added code to the "l10n.language" template to fall
+	back to the two-letter lang code if a longer lang
+	does not have a <lang>.xml localization file.
+	And it falls back to the default lang if it can't
+	find that either.
+	
+	Also fixed a bug for finding the lang attribute.
+	It was using the last() function, but in an
+	ancestor-or-self node set you want the first ancestor
+	(closest) with a lang value.
+	
+	49c49
+	<                                |ancestor-or-self::*/@xml:lang)[last()]"/>
+	---
+	>                                |ancestor-or-self::*/@xml:lang)[1]"/>
+
+2001-07-17  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* common.xsl: Fixed bug #442160. Parameter graphic.default.extension is now used also for <graphic> and <inlinegraphic> not only for <imagedata>.
+
+2001-07-08  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* gentext.xsl, titles.xsl: Support xref to bridgehead
+
+2001-07-04  <uid48421 at users.sourceforge.net>
+
+	* .cvsignore, Makefile, l10n.xml: Added support for Turkish
+
+	* .cvsignore, Makefile, l10n.xml: Added Afrikaans
+
+	* common.xsl, titles.xsl: Bug #429011, fix xref to qandset elements
+
+	* labels.xsl: Bug #426188, fix question/answer labels
+
+2001-06-21  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* common.xsl, gentext.xsl, labels.xsl, titles.xsl: Use common code to calculate step numbers; support xref to procedures and steps; added formal.procedures parameter
+
+2001-06-20  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* l10n.xsl: Xalan debugging; harmless changes
+
+2001-06-14  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* subtitles.xsl: Support subtitle on article
+
+2001-05-23  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* common.xsl: Fix dup. template bug with is.graphic.*
+
+	* gentext.xsl: Workaround article/appendix formatting bug (HACK)
+
+	* labels.xsl: Label appendixes correctly in books and articles
+
+2001-05-21  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* labels.xsl: Tweak for section labels in articles
+
+2001-05-12  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* common.xsl: Added refsect* to the section.level template
+
+2001-05-04  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* .cvsignore, Makefile, l10n.xml: Add Serbian localization
+
+2001-04-21  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* common.xsl: My first crude attempts at support for qandaset
+
+2001-04-19  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* gentext.xsl, titles.xsl: Fix bug #417193, make sure allow-anchors is properly propagated through substitute-markup
+
+2001-04-18  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* titles.xsl: Suppress indexterms in no.anchor.mode
+
+2001-04-17  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* labels.xsl: Move label.from.part parameter into param.xsl; default it to 0 so that chapters and appendixes are numbered monotonically throughout a book by default. Moved param.xsl up in the include list, just for good measure
+
+2001-04-16  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* gentext.xsl: Fix bug in processing of subtitle content
+
+	* labels.xsl: Only label.from.part if there actually is a part
+
+	* titles.xsl: Don't put ulink, link, olink, or xref in titles if anchor's aren't allowed
+
+2001-04-15  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* gentext.xsl: Localize the textonly calculations by creating a object.title.markup.textonly mode
+
+2001-04-03  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* gentext.xsl, labels.xsl, titles.xsl: Fix bug 412487, make XSL-generated callout marks honor callout mark parameters
+
+	* titles.xsl: Restore no.anchor.mode and suppress footnotes in no.anchor.mode
+
+2001-04-02  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* .cvsignore, Makefile: New file.
+
+	* common.xsl, gentext.xsl, l10n.xml, l10n.xsl, labels.xsl, subtitles.xsl, titles.xsl: 
+	New file.
+
+	* gentext.xsl: Commented out debugging messages
+
+	* l10n.dtd: New file.
+

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/af.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/af.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/af.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1153 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="af" english-language-name="Afrikaans">
+
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+   <l:gentext key="Abstract" text="Samevatting"/>
+   <l:gentext key="abstract" text="samevatting"/>
+   <l:gentext key="Answer" text="Antwoord:"/>
+   <l:gentext key="answer" text="antwoord:"/>
+   <l:gentext key="Appendix" text="Aanhangsel"/>
+   <l:gentext key="appendix" text="aanhangsel"/>
+   <l:gentext key="Article" text="Artikel"/>
+   <l:gentext key="article" text="artikel"/>
+   <l:gentext key="Bibliography" text="Bibliografie"/>
+   <l:gentext key="bibliography" text="bibliografie"/>
+   <l:gentext key="Book" text="Boek"/>
+   <l:gentext key="book" text="boek"/>
+   <l:gentext key="CAUTION" text="PAS OP"/>
+   <l:gentext key="Caution" text="Pas op"/>
+   <l:gentext key="caution" text="pas op"/>
+   <l:gentext key="Chapter" text="Hoofdstuk"/>
+   <l:gentext key="chapter" text="hoofdstuk"/>
+   <l:gentext key="Colophon" text="Kolifon"/>
+   <l:gentext key="colophon" text="kolifon"/>
+   <l:gentext key="Copyright" text="Kopie reg"/>
+   <l:gentext key="copyright" text="kopie reg"/>
+   <l:gentext key="Dedication" text="Opgedra aan"/>
+   <l:gentext key="dedication" text="opgedra aan"/>
+   <l:gentext key="Edition" text="Uitgawe"/>
+   <l:gentext key="edition" text="uitgawe"/>
+   <l:gentext key="Equation" text="Vergelyking"/>
+   <l:gentext key="equation" text="vergelyking"/>
+   <l:gentext key="Example" text="Voorbeeld"/>
+   <l:gentext key="example" text="voorbeeld"/>
+   <l:gentext key="Figure" text="Figuur"/>
+   <l:gentext key="figure" text="figuur"/>
+   <l:gentext key="Glossary" text="Woordlys"/>
+   <l:gentext key="glossary" text="woordlys"/>
+   <l:gentext key="GlossSee" text="WoordelysSien"/>
+   <l:gentext key="glosssee" text="woordelyssien"/>
+   <l:gentext key="GlossSeeAlso" text="WoordelysSienOok"/>
+   <l:gentext key="glossseealso" text="woordelyssienook"/>
+   <l:gentext key="IMPORTANT" text="BELANGRIK"/>
+   <l:gentext key="important" text="belangrik"/>
+   <l:gentext key="Important" text="Belangrik"/>
+   <l:gentext key="Index" text="Indeks"/>
+   <l:gentext key="index" text="indeks"/>
+   <l:gentext key="ISBN" text="ISBN"/>
+   <l:gentext key="isbn" text="isbn"/>
+   <l:gentext key="LegalNotice" text="RegsKennisgewing"/>
+   <l:gentext key="legalnotice" text="regskennisgewing"/>
+   <l:gentext key="MsgAud" text="Teikengroep"/>
+   <l:gentext key="msgaud" text="teikengroep"/>
+   <l:gentext key="MsgLevel" text="Vlak"/>
+   <l:gentext key="msglevel" text="vlak"/>
+   <l:gentext key="MsgOrig" text="Herkoms"/>
+   <l:gentext key="msgorig" text="herkoms"/>
+   <l:gentext key="NOTE" text="OPMERKING"/>
+   <l:gentext key="Note" text="Opmerking"/>
+   <l:gentext key="note" text="opmerking"/>
+   <l:gentext key="Part" text="Deel"/>
+   <l:gentext key="part" text="deel"/>
+   <l:gentext key="Preface" text="Voorwoord"/>
+   <l:gentext key="preface" text="voorwoord"/>
+   <l:gentext key="Procedure" text="Prosedure"/>
+   <l:gentext key="procedure" text="prosedure"/>
+   <l:gentext key="ProductionSet" text="ProduksieStel"/>
+   <l:gentext key="PubDate" text="Publication Date" lang="en"/>
+   <l:gentext key="pubdate" text="Publication date" lang="en"/>
+   <l:gentext key="Published" text="Uitgegee"/>
+   <l:gentext key="published" text="uitgegee"/>
+   <l:gentext key="Qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="Question" text="Vraag:"/>
+   <l:gentext key="question" text="vraag:"/>
+   <l:gentext key="RefEntry" text="Verwysingslemma"/>
+   <l:gentext key="refentry" text="verwysingslemma"/>
+   <l:gentext key="Reference" text="Verwysing"/>
+   <l:gentext key="reference" text="verwysing"/>
+   <l:gentext key="RefName" text="Verwysingsnaam"/>
+   <l:gentext key="refname" text="verwysingsnaam"/>
+   <l:gentext key="RefSection" text="Verwysingsparagraaf"/>
+   <l:gentext key="refsection" text="verwysingsparagraaf"/>
+   <l:gentext key="RefSynopsisDiv" text="Verwysingsamevatting"/>
+   <l:gentext key="refsynopsisdiv" text="verwysingsamevatting"/>
+   <l:gentext key="RevHistory" text="Hersiening geskiedenis"/>
+   <l:gentext key="revhistory" text="hersiening geskiedenis"/>
+   <l:gentext key="revision" text="hersiening"/>
+   <l:gentext key="Revision" text="Hersiening"/>
+   <l:gentext key="sect1" text="Paragraaf"/>
+   <l:gentext key="sect2" text="Paragraaf"/>
+   <l:gentext key="sect3" text="Paragraaf"/>
+   <l:gentext key="sect4" text="Paragraaf"/>
+   <l:gentext key="sect5" text="Paragraaf"/>
+   <l:gentext key="section" text="paragraaf"/>
+   <l:gentext key="Section" text="Paragraaf"/>
+   <l:gentext key="see" text="sien"/>
+   <l:gentext key="See" text="Sien"/>
+   <l:gentext key="seealso" text="sien ook"/>
+   <l:gentext key="Seealso" text="Sien ook"/>
+   <l:gentext key="SeeAlso" text="Sien Ook"/>
+   <l:gentext key="set" text="versameling"/>
+   <l:gentext key="Set" text="Versameling"/>
+   <l:gentext key="setindex" text="versamelingindeks"/>
+   <l:gentext key="SetIndex" text="VersamelingIndeks"/>
+   <l:gentext key="Sidebar" text="Kantbalk"/>
+   <l:gentext key="sidebar" text="kantbalk"/>
+   <l:gentext key="step" text="stap"/>
+   <l:gentext key="Step" text="Stap"/>
+   <l:gentext key="Table" text="Tabel"/>
+   <l:gentext key="table" text="tabel"/>
+   <l:gentext key="tip" text="leidraad"/>
+   <l:gentext key="TIP" text="LEIDRAAD"/>
+   <l:gentext key="Tip" text="Leidraad"/>
+   <l:gentext key="Warning" text="Waarskuwing"/>
+   <l:gentext key="warning" text="waarskuwing"/>
+   <l:gentext key="WARNING" text="WAARSKUWING"/>
+   <l:gentext key="and" text="en"/>
+   <l:gentext key="by" text="deur"/>
+   <l:gentext key="called" text="called" lang="en"/>
+   <l:gentext key="Edited" text="Geredigeer"/>
+   <l:gentext key="edited" text="geredigeer"/>
+   <l:gentext key="Editedby" text="Geredigeer deur"/>
+   <l:gentext key="editedby" text="geredigeer deur"/>
+   <l:gentext key="in" text="in"/>
+   <l:gentext key="lastlistcomma" text=","/>
+   <l:gentext key="listcomma" text=","/>
+   <l:gentext key="nonexistantelement" text="element bestaan nie"/>
+   <l:gentext key="notes" text="Notas"/>
+   <l:gentext key="Notes" text="notas"/>
+   <l:gentext key="Pgs" text="bl."/>
+   <l:gentext key="pgs" text="bl."/>
+   <l:gentext key="Revisedby" text="Hersien deur"/>
+   <l:gentext key="revisedby" text="hersien deur"/>
+   <l:gentext key="TableNotes" text="TabelOpmerking"/>
+   <l:gentext key="tablenotes" text="tabelopmerking"/>
+   <l:gentext key="TableofContents" text="Inhoudsopgawe"/>
+   <l:gentext key="tableofcontents" text="inhoudsopgawe"/>
+   <l:gentext key="the" text="" lang="en"/>
+   <l:gentext key="unexpectedelementname" text="onverwagte element naam"/>
+   <l:gentext key="unsupported" text="nie geondersteun"/>
+   <l:gentext key="xrefto" text="verwysing na"/>
+   <l:gentext key="listofequations" text="lys van vergelykings"/>
+   <l:gentext key="ListofEquations" text="Lys van vergelykings"/>
+   <l:gentext key="ListofExamples" text="Lys van voorbeelde"/>
+   <l:gentext key="listofexamples" text="lys van voorbeelde"/>
+   <l:gentext key="ListofFigures" text="Lys van figure"/>
+   <l:gentext key="listoffigures" text="lys van figure"/>
+   <l:gentext key="ListofProcedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listofprocedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listoftables" text="lys van tabelle"/>
+   <l:gentext key="ListofTables" text="Lys van tabelle"/>
+   <l:gentext key="ListofUnknown" text="Lys van onbekende tipes"/>
+   <l:gentext key="listofunknown" text="lys van onbekende tipes"/>
+   <l:gentext key="nav-home" text="Begin"/>
+   <l:gentext key="nav-next" text="Volgende"/>
+   <l:gentext key="nav-next-sibling" text="Verder vooruit"/>
+   <l:gentext key="nav-prev" text="Terug"/>
+   <l:gentext key="nav-prev-sibling" text="Verder terug"/>
+   <l:gentext key="nav-up" text="Boontoe"/>
+   <l:gentext key="nav-toc" text="ToC" lang="en"/>
+   <l:gentext key="Draft" text="Proef"/>
+   <l:gentext key="above" text="bo"/>
+   <l:gentext key="below" text="onder"/>
+   <l:gentext key="sectioncalled" text="die seksie genaamd"/>
+   <l:gentext key="index symbols" text="indeks simbole"/>
+   <l:gentext key="lowercase.alpha" text="abcdefghijklmnopqrstuvwxyz"/>
+   <l:gentext key="uppercase.alpha" text="ABCDEFGHIJKLMNOPQRSTUVWXYZ"/>
+   <l:dingbat key="startquote" text="&#8220;"/>
+   <l:dingbat key="endquote" text="&#8221;"/>
+   <l:dingbat key="nestedstartquote" text="&#8216;"/>
+   <l:dingbat key="nestedendquote" text="&#8217;"/>
+   <l:dingbat key="singlestartquote" text="&#8216;" lang="en"/>
+   <l:dingbat key="singleendquote" text="&#8217;" lang="en"/>
+   <l:dingbat key="bullet" text="&#8226;"/>
+   <l:gentext key="hyphenation-character" text="-" lang="en"/>
+   <l:gentext key="hyphenation-push-character-count" text="2" lang="en"/>
+   <l:gentext key="hyphenation-remain-character-count" text="2" lang="en"/>
+
+   <l:context name="styles">
+      <l:template name="person-name" text="first-last"/>
+   </l:context>
+
+   <l:context name="title">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="%t"/>
+      <l:template name="appendix" text="Aanhangsel %n. %t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="biblioentry" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliolist" text="%t" lang="en"/>
+      <l:template name="bibliomixed" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="Hoofdstuk %n. %t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="Vergelyking %n. %t"/>
+      <l:template name="example" text="Voorbeeld %n. %t"/>
+      <l:template name="figure" text="Figuur %n. %t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="glosslist" text="%t" lang="en"/>
+      <l:template name="glossentry" text="%t" lang="en"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text=""/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="Deel %n. %t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="procedure.formal" text="Prosedure&#160;%n.&#160;%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="productionset.formal" text="ProduksieStel&#160;%n"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="%t"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="%t"/>
+      <l:template name="refentry" text="%t"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsection" text="%t"/>
+      <l:template name="refsect1" text="%t"/>
+      <l:template name="refsect2" text="%t"/>
+      <l:template name="refsect3" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="refsynopsisdivinfo" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="step" text="%t"/>
+      <l:template name="table" text="Tabel %n. %t"/>
+      <l:template name="task" text="%t" lang="en"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="" lang="en"/>
+      <l:template name="warning" text="%t"/>
+   </l:context>
+
+   <l:context name="title-unnumbered">
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article/appendix" text="%t" lang="en"/>
+      <l:template name="bridgehead" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="sect1" text="%t"/>
+      <l:template name="sect2" text="%t"/>
+      <l:template name="sect3" text="%t"/>
+      <l:template name="sect4" text="%t"/>
+      <l:template name="sect5" text="%t"/>
+      <l:template name="section" text="%t"/>
+      <l:template name="simplesect" text="%t"/>
+   </l:context>
+
+   <l:context name="title-numbered">
+      <l:template name="appendix" text="Aanhangsel %n. %t"/>
+      <l:template name="article/appendix" text="%n.&#160;%t" lang="en"/>
+      <l:template name="bridgehead" text="%n.&#160;%t"/>
+      <l:template name="chapter" text="Hoofdstuk %n. %t"/>
+      <l:template name="sect1" text="%n. %t"/>
+      <l:template name="sect2" text="%n. %t"/>
+      <l:template name="sect3" text="%n. %t"/>
+      <l:template name="sect4" text="%n. %t"/>
+      <l:template name="sect5" text="%n. %t"/>
+      <l:template name="section" text="%n. %t"/>
+      <l:template name="simplesect" text="%n. %t"/>
+   </l:context>
+
+   <l:context name="subtitle">
+      <l:template name="appendix" text="%s"/>
+      <l:template name="article" text="%s"/>
+      <l:template name="bibliodiv" text="%s"/>
+      <l:template name="biblioentry" text="%s"/>
+      <l:template name="bibliography" text="%s"/>
+      <l:template name="bibliomixed" text="%s"/>
+      <l:template name="bibliomset" text="%s"/>
+      <l:template name="biblioset" text="%s"/>
+      <l:template name="book" text="%s"/>
+      <l:template name="chapter" text="%s"/>
+      <l:template name="colophon" text="%s"/>
+      <l:template name="dedication" text="%s"/>
+      <l:template name="glossary" text="%s"/>
+      <l:template name="glossdiv" text="%s"/>
+      <l:template name="index" text="%s"/>
+      <l:template name="indexdiv" text="%s"/>
+      <l:template name="lot" text="%s"/>
+      <l:template name="part" text="%s"/>
+      <l:template name="partintro" text="%s"/>
+      <l:template name="preface" text="%s"/>
+      <l:template name="refentry" text="%s"/>
+      <l:template name="reference" text="%s"/>
+      <l:template name="refsection" text="%s"/>
+      <l:template name="refsect1" text="%s"/>
+      <l:template name="refsect2" text="%s"/>
+      <l:template name="refsect3" text="%s"/>
+      <l:template name="refsynopsisdiv" text="%s"/>
+      <l:template name="sect1" text="%s"/>
+      <l:template name="sect2" text="%s"/>
+      <l:template name="sect3" text="%s"/>
+      <l:template name="sect4" text="%s"/>
+      <l:template name="sect5" text="%s"/>
+      <l:template name="section" text="%s"/>
+      <l:template name="set" text="%s"/>
+      <l:template name="setindex" text="%s"/>
+      <l:template name="sidebar" text="%s"/>
+      <l:template name="simplesect" text="%s"/>
+      <l:template name="toc" text="%s"/>
+   </l:context>
+
+   <l:context name="xref">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="Antwoord:&#160;%n"/>
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="constraintdef" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="%t"/>
+      <l:template name="example" text="%t"/>
+      <l:template name="figure" text="%t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text="%n"/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="%t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="Vraag:&#160;%n"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="Vraag:&#160;%n"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="table" text="%t"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="%n"/>
+      <l:template name="warning" text="%t"/>
+      <l:template name="page.citation" text=" [%p]"/>
+      <l:template name="page" text="(page %p)" lang="en"/>
+      <l:template name="pageabbrev" text="(p. %p)" lang="en"/>
+      <l:template name="Page" text="Page %p" lang="en"/>
+      <l:template name="bridgehead" text="die seksie genaamd &#8220;%t&#8221;"/>
+      <l:template name="refsection" text="die seksie genaamd &#8220;%t&#8221;"/>
+      <l:template name="refsect1" text="die seksie genaamd &#8220;%t&#8221;"/>
+      <l:template name="refsect2" text="die seksie genaamd &#8220;%t&#8221;"/>
+      <l:template name="refsect3" text="die seksie genaamd &#8220;%t&#8221;"/>
+      <l:template name="sect1" text="die seksie genaamd &#8220;%t&#8221;"/>
+      <l:template name="sect2" text="die seksie genaamd &#8220;%t&#8221;"/>
+      <l:template name="sect3" text="die seksie genaamd &#8220;%t&#8221;"/>
+      <l:template name="sect4" text="die seksie genaamd &#8220;%t&#8221;"/>
+      <l:template name="sect5" text="die seksie genaamd &#8220;%t&#8221;"/>
+      <l:template name="section" text="die seksie genaamd &#8220;%t&#8221;"/>
+      <l:template name="simplesect" text="die seksie genaamd &#8220;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="xref-number">
+      <l:template name="answer" text="Antwoord:&#160;%n"/>
+      <l:template name="appendix" text="Aanhangsel&#160;%n"/>
+      <l:template name="bridgehead" text="Paragraaf&#160;%n"/>
+      <l:template name="chapter" text="Hoofdstuk&#160;%n"/>
+      <l:template name="equation" text="Vergelyking&#160;%n"/>
+      <l:template name="example" text="Voorbeeld&#160;%n"/>
+      <l:template name="figure" text="Figuur&#160;%n"/>
+      <l:template name="part" text="Deel&#160;%n"/>
+      <l:template name="procedure" text="Prosedure&#160;%n"/>
+      <l:template name="productionset" text="ProduksieStel&#160;%n"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n"/>
+      <l:template name="qandaentry" text="Vraag:&#160;%n"/>
+      <l:template name="question" text="Vraag:&#160;%n"/>
+      <l:template name="sect1" text="Paragraaf&#160;%n"/>
+      <l:template name="sect2" text="Paragraaf&#160;%n"/>
+      <l:template name="sect3" text="Paragraaf&#160;%n"/>
+      <l:template name="sect4" text="Paragraaf&#160;%n"/>
+      <l:template name="sect5" text="Paragraaf&#160;%n"/>
+      <l:template name="section" text="Paragraaf&#160;%n"/>
+      <l:template name="table" text="Tabel&#160;%n"/>
+   </l:context>
+
+   <l:context name="xref-number-and-title">
+      <l:template name="appendix" text="Aanhangsel&#160;%n, %t"/>
+      <l:template name="bridgehead" text="Paragraaf&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="chapter" text="Hoofdstuk&#160;%n, %t"/>
+      <l:template name="equation" text="Vergelyking&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="example" text="Voorbeeld&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="figure" text="Figuur&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="part" text="Deel&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="procedure" text="Prosedure&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="productionset" text="ProduksieStel&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="refsect1" text="die seksie genaamd &#8220;%t&#8221;"/>
+      <l:template name="refsect2" text="die seksie genaamd &#8220;%t&#8221;"/>
+      <l:template name="refsect3" text="die seksie genaamd &#8220;%t&#8221;"/>
+      <l:template name="refsection" text="die seksie genaamd &#8220;%t&#8221;"/>
+      <l:template name="sect1" text="Paragraaf&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect2" text="Paragraaf&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect3" text="Paragraaf&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect4" text="Paragraaf&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect5" text="Paragraaf&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="section" text="Paragraaf&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="simplesect" text="die seksie genaamd &#8220;%t&#8221;"/>
+      <l:template name="table" text="Tabel&#160;%n, &#8220;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="authorgroup">
+      <l:template name="sep" text=", "/>
+      <l:template name="sep2" text=" en "/>
+      <l:template name="seplast" text=", en "/>
+   </l:context>
+
+   <l:context name="glossary">
+      <l:template name="see" text="WoordelysSien "/>
+      <l:template name="seealso" text="WoordelysSienOok "/>
+   </l:context>
+
+   <l:context name="msgset">
+      <l:template name="MsgAud" text="Teikengroep: "/>
+      <l:template name="MsgLevel" text="Vlak: "/>
+      <l:template name="MsgOrig" text="Herkoms: "/>
+   </l:context>
+
+   <l:context name="datetime">
+      <l:template name="format" text="m/d/Y" lang="en"/>
+   </l:context>
+
+   <l:context name="datetime-full">
+      <l:template name="January" text="January" lang="en"/>
+      <l:template name="February" text="February" lang="en"/>
+      <l:template name="March" text="March" lang="en"/>
+      <l:template name="April" text="April" lang="en"/>
+      <l:template name="May" text="May" lang="en"/>
+      <l:template name="June" text="June" lang="en"/>
+      <l:template name="July" text="July" lang="en"/>
+      <l:template name="August" text="August" lang="en"/>
+      <l:template name="September" text="September" lang="en"/>
+      <l:template name="October" text="October" lang="en"/>
+      <l:template name="November" text="November" lang="en"/>
+      <l:template name="December" text="December" lang="en"/>
+      <l:template name="Monday" text="Monday" lang="en"/>
+      <l:template name="Tuesday" text="Tuesday" lang="en"/>
+      <l:template name="Wednesday" text="Wednesday" lang="en"/>
+      <l:template name="Thursday" text="Thursday" lang="en"/>
+      <l:template name="Friday" text="Friday" lang="en"/>
+      <l:template name="Saturday" text="Saturday" lang="en"/>
+      <l:template name="Sunday" text="Sunday" lang="en"/>
+   </l:context>
+
+   <l:context name="datetime-abbrev">
+      <l:template name="Jan" text="Jan" lang="en"/>
+      <l:template name="Feb" text="Feb" lang="en"/>
+      <l:template name="Mar" text="Mar" lang="en"/>
+      <l:template name="Apr" text="Apr" lang="en"/>
+      <l:template name="May" text="May" lang="en"/>
+      <l:template name="Jun" text="Jun" lang="en"/>
+      <l:template name="Jul" text="Jul" lang="en"/>
+      <l:template name="Aug" text="Aug" lang="en"/>
+      <l:template name="Sep" text="Sep" lang="en"/>
+      <l:template name="Oct" text="Oct" lang="en"/>
+      <l:template name="Nov" text="Nov" lang="en"/>
+      <l:template name="Dec" text="Dec" lang="en"/>
+      <l:template name="Mon" text="Mon" lang="en"/>
+      <l:template name="Tue" text="Tue" lang="en"/>
+      <l:template name="Wed" text="Wed" lang="en"/>
+      <l:template name="Thu" text="Thu" lang="en"/>
+      <l:template name="Fri" text="Fri" lang="en"/>
+      <l:template name="Sat" text="Sat" lang="en"/>
+      <l:template name="Sun" text="Sun" lang="en"/>
+   </l:context>
+
+   <l:context name="htmlhelp">
+      <l:template name="langcode" text="0x0436 Afrikaans"/>
+   </l:context>
+
+   <l:letters lang="en">
+      <l:l i="-1"/>
+      <l:l i="0">Symbols</l:l>
+      <l:l i="10">A</l:l>
+      <l:l i="10">a</l:l>
+      <l:l i="10">&#192;</l:l>
+      <l:l i="10">&#224;</l:l>
+      <l:l i="10">&#193;</l:l>
+      <l:l i="10">&#225;</l:l>
+      <l:l i="10">&#194;</l:l>
+      <l:l i="10">&#226;</l:l>
+      <l:l i="10">&#195;</l:l>
+      <l:l i="10">&#227;</l:l>
+      <l:l i="10">&#196;</l:l>
+      <l:l i="10">&#228;</l:l>
+      <l:l i="10">&#197;</l:l>
+      <l:l i="10">&#229;</l:l>
+      <l:l i="10">&#256;</l:l>
+      <l:l i="10">&#257;</l:l>
+      <l:l i="10">&#258;</l:l>
+      <l:l i="10">&#259;</l:l>
+      <l:l i="10">&#260;</l:l>
+      <l:l i="10">&#261;</l:l>
+      <l:l i="10">&#461;</l:l>
+      <l:l i="10">&#462;</l:l>
+      <l:l i="10">&#478;</l:l>
+      <l:l i="10">&#479;</l:l>
+      <l:l i="10">&#480;</l:l>
+      <l:l i="10">&#481;</l:l>
+      <l:l i="10">&#506;</l:l>
+      <l:l i="10">&#507;</l:l>
+      <l:l i="10">&#512;</l:l>
+      <l:l i="10">&#513;</l:l>
+      <l:l i="10">&#514;</l:l>
+      <l:l i="10">&#515;</l:l>
+      <l:l i="10">&#550;</l:l>
+      <l:l i="10">&#551;</l:l>
+      <l:l i="10">&#7680;</l:l>
+      <l:l i="10">&#7681;</l:l>
+      <l:l i="10">&#7834;</l:l>
+      <l:l i="10">&#7840;</l:l>
+      <l:l i="10">&#7841;</l:l>
+      <l:l i="10">&#7842;</l:l>
+      <l:l i="10">&#7843;</l:l>
+      <l:l i="10">&#7844;</l:l>
+      <l:l i="10">&#7845;</l:l>
+      <l:l i="10">&#7846;</l:l>
+      <l:l i="10">&#7847;</l:l>
+      <l:l i="10">&#7848;</l:l>
+      <l:l i="10">&#7849;</l:l>
+      <l:l i="10">&#7850;</l:l>
+      <l:l i="10">&#7851;</l:l>
+      <l:l i="10">&#7852;</l:l>
+      <l:l i="10">&#7853;</l:l>
+      <l:l i="10">&#7854;</l:l>
+      <l:l i="10">&#7855;</l:l>
+      <l:l i="10">&#7856;</l:l>
+      <l:l i="10">&#7857;</l:l>
+      <l:l i="10">&#7858;</l:l>
+      <l:l i="10">&#7859;</l:l>
+      <l:l i="10">&#7860;</l:l>
+      <l:l i="10">&#7861;</l:l>
+      <l:l i="10">&#7862;</l:l>
+      <l:l i="10">&#7863;</l:l>
+      <l:l i="20">B</l:l>
+      <l:l i="20">b</l:l>
+      <l:l i="20">&#384;</l:l>
+      <l:l i="20">&#385;</l:l>
+      <l:l i="20">&#595;</l:l>
+      <l:l i="20">&#386;</l:l>
+      <l:l i="20">&#387;</l:l>
+      <l:l i="20">&#7682;</l:l>
+      <l:l i="20">&#7683;</l:l>
+      <l:l i="20">&#7684;</l:l>
+      <l:l i="20">&#7685;</l:l>
+      <l:l i="20">&#7686;</l:l>
+      <l:l i="20">&#7687;</l:l>
+      <l:l i="30">C</l:l>
+      <l:l i="30">c</l:l>
+      <l:l i="30">&#199;</l:l>
+      <l:l i="30">&#231;</l:l>
+      <l:l i="30">&#262;</l:l>
+      <l:l i="30">&#263;</l:l>
+      <l:l i="30">&#264;</l:l>
+      <l:l i="30">&#265;</l:l>
+      <l:l i="30">&#266;</l:l>
+      <l:l i="30">&#267;</l:l>
+      <l:l i="30">&#268;</l:l>
+      <l:l i="30">&#269;</l:l>
+      <l:l i="30">&#391;</l:l>
+      <l:l i="30">&#392;</l:l>
+      <l:l i="30">&#597;</l:l>
+      <l:l i="30">&#7688;</l:l>
+      <l:l i="30">&#7689;</l:l>
+      <l:l i="40">D</l:l>
+      <l:l i="40">d</l:l>
+      <l:l i="40">&#270;</l:l>
+      <l:l i="40">&#271;</l:l>
+      <l:l i="40">&#272;</l:l>
+      <l:l i="40">&#273;</l:l>
+      <l:l i="40">&#394;</l:l>
+      <l:l i="40">&#599;</l:l>
+      <l:l i="40">&#395;</l:l>
+      <l:l i="40">&#396;</l:l>
+      <l:l i="40">&#453;</l:l>
+      <l:l i="40">&#498;</l:l>
+      <l:l i="40">&#545;</l:l>
+      <l:l i="40">&#598;</l:l>
+      <l:l i="40">&#7690;</l:l>
+      <l:l i="40">&#7691;</l:l>
+      <l:l i="40">&#7692;</l:l>
+      <l:l i="40">&#7693;</l:l>
+      <l:l i="40">&#7694;</l:l>
+      <l:l i="40">&#7695;</l:l>
+      <l:l i="40">&#7696;</l:l>
+      <l:l i="40">&#7697;</l:l>
+      <l:l i="40">&#7698;</l:l>
+      <l:l i="40">&#7699;</l:l>
+      <l:l i="50">E</l:l>
+      <l:l i="50">e</l:l>
+      <l:l i="50">&#200;</l:l>
+      <l:l i="50">&#232;</l:l>
+      <l:l i="50">&#201;</l:l>
+      <l:l i="50">&#233;</l:l>
+      <l:l i="50">&#202;</l:l>
+      <l:l i="50">&#234;</l:l>
+      <l:l i="50">&#203;</l:l>
+      <l:l i="50">&#235;</l:l>
+      <l:l i="50">&#274;</l:l>
+      <l:l i="50">&#275;</l:l>
+      <l:l i="50">&#276;</l:l>
+      <l:l i="50">&#277;</l:l>
+      <l:l i="50">&#278;</l:l>
+      <l:l i="50">&#279;</l:l>
+      <l:l i="50">&#280;</l:l>
+      <l:l i="50">&#281;</l:l>
+      <l:l i="50">&#282;</l:l>
+      <l:l i="50">&#283;</l:l>
+      <l:l i="50">&#516;</l:l>
+      <l:l i="50">&#517;</l:l>
+      <l:l i="50">&#518;</l:l>
+      <l:l i="50">&#519;</l:l>
+      <l:l i="50">&#552;</l:l>
+      <l:l i="50">&#553;</l:l>
+      <l:l i="50">&#7700;</l:l>
+      <l:l i="50">&#7701;</l:l>
+      <l:l i="50">&#7702;</l:l>
+      <l:l i="50">&#7703;</l:l>
+      <l:l i="50">&#7704;</l:l>
+      <l:l i="50">&#7705;</l:l>
+      <l:l i="50">&#7706;</l:l>
+      <l:l i="50">&#7707;</l:l>
+      <l:l i="50">&#7708;</l:l>
+      <l:l i="50">&#7709;</l:l>
+      <l:l i="50">&#7864;</l:l>
+      <l:l i="50">&#7865;</l:l>
+      <l:l i="50">&#7866;</l:l>
+      <l:l i="50">&#7867;</l:l>
+      <l:l i="50">&#7868;</l:l>
+      <l:l i="50">&#7869;</l:l>
+      <l:l i="50">&#7870;</l:l>
+      <l:l i="50">&#7871;</l:l>
+      <l:l i="50">&#7872;</l:l>
+      <l:l i="50">&#7873;</l:l>
+      <l:l i="50">&#7874;</l:l>
+      <l:l i="50">&#7875;</l:l>
+      <l:l i="50">&#7876;</l:l>
+      <l:l i="50">&#7877;</l:l>
+      <l:l i="50">&#7878;</l:l>
+      <l:l i="50">&#7879;</l:l>
+      <l:l i="60">F</l:l>
+      <l:l i="60">f</l:l>
+      <l:l i="60">&#401;</l:l>
+      <l:l i="60">&#402;</l:l>
+      <l:l i="60">&#7710;</l:l>
+      <l:l i="60">&#7711;</l:l>
+      <l:l i="70">G</l:l>
+      <l:l i="70">g</l:l>
+      <l:l i="70">&#284;</l:l>
+      <l:l i="70">&#285;</l:l>
+      <l:l i="70">&#286;</l:l>
+      <l:l i="70">&#287;</l:l>
+      <l:l i="70">&#288;</l:l>
+      <l:l i="70">&#289;</l:l>
+      <l:l i="70">&#290;</l:l>
+      <l:l i="70">&#291;</l:l>
+      <l:l i="70">&#403;</l:l>
+      <l:l i="70">&#608;</l:l>
+      <l:l i="70">&#484;</l:l>
+      <l:l i="70">&#485;</l:l>
+      <l:l i="70">&#486;</l:l>
+      <l:l i="70">&#487;</l:l>
+      <l:l i="70">&#500;</l:l>
+      <l:l i="70">&#501;</l:l>
+      <l:l i="70">&#7712;</l:l>
+      <l:l i="70">&#7713;</l:l>
+      <l:l i="80">H</l:l>
+      <l:l i="80">h</l:l>
+      <l:l i="80">&#292;</l:l>
+      <l:l i="80">&#293;</l:l>
+      <l:l i="80">&#294;</l:l>
+      <l:l i="80">&#295;</l:l>
+      <l:l i="80">&#542;</l:l>
+      <l:l i="80">&#543;</l:l>
+      <l:l i="80">&#614;</l:l>
+      <l:l i="80">&#7714;</l:l>
+      <l:l i="80">&#7715;</l:l>
+      <l:l i="80">&#7716;</l:l>
+      <l:l i="80">&#7717;</l:l>
+      <l:l i="80">&#7718;</l:l>
+      <l:l i="80">&#7719;</l:l>
+      <l:l i="80">&#7720;</l:l>
+      <l:l i="80">&#7721;</l:l>
+      <l:l i="80">&#7722;</l:l>
+      <l:l i="80">&#7723;</l:l>
+      <l:l i="80">&#7830;</l:l>
+      <l:l i="90">I</l:l>
+      <l:l i="90">i</l:l>
+      <l:l i="90">&#204;</l:l>
+      <l:l i="90">&#236;</l:l>
+      <l:l i="90">&#205;</l:l>
+      <l:l i="90">&#237;</l:l>
+      <l:l i="90">&#206;</l:l>
+      <l:l i="90">&#238;</l:l>
+      <l:l i="90">&#207;</l:l>
+      <l:l i="90">&#239;</l:l>
+      <l:l i="90">&#296;</l:l>
+      <l:l i="90">&#297;</l:l>
+      <l:l i="90">&#298;</l:l>
+      <l:l i="90">&#299;</l:l>
+      <l:l i="90">&#300;</l:l>
+      <l:l i="90">&#301;</l:l>
+      <l:l i="90">&#302;</l:l>
+      <l:l i="90">&#303;</l:l>
+      <l:l i="90">&#304;</l:l>
+      <l:l i="90">&#407;</l:l>
+      <l:l i="90">&#616;</l:l>
+      <l:l i="90">&#463;</l:l>
+      <l:l i="90">&#464;</l:l>
+      <l:l i="90">&#520;</l:l>
+      <l:l i="90">&#521;</l:l>
+      <l:l i="90">&#522;</l:l>
+      <l:l i="90">&#523;</l:l>
+      <l:l i="90">&#7724;</l:l>
+      <l:l i="90">&#7725;</l:l>
+      <l:l i="90">&#7726;</l:l>
+      <l:l i="90">&#7727;</l:l>
+      <l:l i="90">&#7880;</l:l>
+      <l:l i="90">&#7881;</l:l>
+      <l:l i="90">&#7882;</l:l>
+      <l:l i="90">&#7883;</l:l>
+      <l:l i="100">J</l:l>
+      <l:l i="100">j</l:l>
+      <l:l i="100">&#308;</l:l>
+      <l:l i="100">&#309;</l:l>
+      <l:l i="100">&#496;</l:l>
+      <l:l i="100">&#669;</l:l>
+      <l:l i="110">K</l:l>
+      <l:l i="110">k</l:l>
+      <l:l i="110">&#310;</l:l>
+      <l:l i="110">&#311;</l:l>
+      <l:l i="110">&#408;</l:l>
+      <l:l i="110">&#409;</l:l>
+      <l:l i="110">&#488;</l:l>
+      <l:l i="110">&#489;</l:l>
+      <l:l i="110">&#7728;</l:l>
+      <l:l i="110">&#7729;</l:l>
+      <l:l i="110">&#7730;</l:l>
+      <l:l i="110">&#7731;</l:l>
+      <l:l i="110">&#7732;</l:l>
+      <l:l i="110">&#7733;</l:l>
+      <l:l i="120">L</l:l>
+      <l:l i="120">l</l:l>
+      <l:l i="120">&#313;</l:l>
+      <l:l i="120">&#314;</l:l>
+      <l:l i="120">&#315;</l:l>
+      <l:l i="120">&#316;</l:l>
+      <l:l i="120">&#317;</l:l>
+      <l:l i="120">&#318;</l:l>
+      <l:l i="120">&#319;</l:l>
+      <l:l i="120">&#320;</l:l>
+      <l:l i="120">&#321;</l:l>
+      <l:l i="120">&#322;</l:l>
+      <l:l i="120">&#410;</l:l>
+      <l:l i="120">&#456;</l:l>
+      <l:l i="120">&#564;</l:l>
+      <l:l i="120">&#619;</l:l>
+      <l:l i="120">&#620;</l:l>
+      <l:l i="120">&#621;</l:l>
+      <l:l i="120">&#7734;</l:l>
+      <l:l i="120">&#7735;</l:l>
+      <l:l i="120">&#7736;</l:l>
+      <l:l i="120">&#7737;</l:l>
+      <l:l i="120">&#7738;</l:l>
+      <l:l i="120">&#7739;</l:l>
+      <l:l i="120">&#7740;</l:l>
+      <l:l i="120">&#7741;</l:l>
+      <l:l i="130">M</l:l>
+      <l:l i="130">m</l:l>
+      <l:l i="130">&#625;</l:l>
+      <l:l i="130">&#7742;</l:l>
+      <l:l i="130">&#7743;</l:l>
+      <l:l i="130">&#7744;</l:l>
+      <l:l i="130">&#7745;</l:l>
+      <l:l i="130">&#7746;</l:l>
+      <l:l i="130">&#7747;</l:l>
+      <l:l i="140">N</l:l>
+      <l:l i="140">n</l:l>
+      <l:l i="140">&#209;</l:l>
+      <l:l i="140">&#241;</l:l>
+      <l:l i="140">&#323;</l:l>
+      <l:l i="140">&#324;</l:l>
+      <l:l i="140">&#325;</l:l>
+      <l:l i="140">&#326;</l:l>
+      <l:l i="140">&#327;</l:l>
+      <l:l i="140">&#328;</l:l>
+      <l:l i="140">&#413;</l:l>
+      <l:l i="140">&#626;</l:l>
+      <l:l i="140">&#414;</l:l>
+      <l:l i="140">&#544;</l:l>
+      <l:l i="140">&#459;</l:l>
+      <l:l i="140">&#504;</l:l>
+      <l:l i="140">&#505;</l:l>
+      <l:l i="140">&#565;</l:l>
+      <l:l i="140">&#627;</l:l>
+      <l:l i="140">&#7748;</l:l>
+      <l:l i="140">&#7749;</l:l>
+      <l:l i="140">&#7750;</l:l>
+      <l:l i="140">&#7751;</l:l>
+      <l:l i="140">&#7752;</l:l>
+      <l:l i="140">&#7753;</l:l>
+      <l:l i="140">&#7754;</l:l>
+      <l:l i="140">&#7755;</l:l>
+      <l:l i="150">O</l:l>
+      <l:l i="150">o</l:l>
+      <l:l i="150">&#210;</l:l>
+      <l:l i="150">&#242;</l:l>
+      <l:l i="150">&#211;</l:l>
+      <l:l i="150">&#243;</l:l>
+      <l:l i="150">&#212;</l:l>
+      <l:l i="150">&#244;</l:l>
+      <l:l i="150">&#213;</l:l>
+      <l:l i="150">&#245;</l:l>
+      <l:l i="150">&#214;</l:l>
+      <l:l i="150">&#246;</l:l>
+      <l:l i="150">&#216;</l:l>
+      <l:l i="150">&#248;</l:l>
+      <l:l i="150">&#332;</l:l>
+      <l:l i="150">&#333;</l:l>
+      <l:l i="150">&#334;</l:l>
+      <l:l i="150">&#335;</l:l>
+      <l:l i="150">&#336;</l:l>
+      <l:l i="150">&#337;</l:l>
+      <l:l i="150">&#415;</l:l>
+      <l:l i="150">&#416;</l:l>
+      <l:l i="150">&#417;</l:l>
+      <l:l i="150">&#465;</l:l>
+      <l:l i="150">&#466;</l:l>
+      <l:l i="150">&#490;</l:l>
+      <l:l i="150">&#491;</l:l>
+      <l:l i="150">&#492;</l:l>
+      <l:l i="150">&#493;</l:l>
+      <l:l i="150">&#510;</l:l>
+      <l:l i="150">&#511;</l:l>
+      <l:l i="150">&#524;</l:l>
+      <l:l i="150">&#525;</l:l>
+      <l:l i="150">&#526;</l:l>
+      <l:l i="150">&#527;</l:l>
+      <l:l i="150">&#554;</l:l>
+      <l:l i="150">&#555;</l:l>
+      <l:l i="150">&#556;</l:l>
+      <l:l i="150">&#557;</l:l>
+      <l:l i="150">&#558;</l:l>
+      <l:l i="150">&#559;</l:l>
+      <l:l i="150">&#560;</l:l>
+      <l:l i="150">&#561;</l:l>
+      <l:l i="150">&#7756;</l:l>
+      <l:l i="150">&#7757;</l:l>
+      <l:l i="150">&#7758;</l:l>
+      <l:l i="150">&#7759;</l:l>
+      <l:l i="150">&#7760;</l:l>
+      <l:l i="150">&#7761;</l:l>
+      <l:l i="150">&#7762;</l:l>
+      <l:l i="150">&#7763;</l:l>
+      <l:l i="150">&#7884;</l:l>
+      <l:l i="150">&#7885;</l:l>
+      <l:l i="150">&#7886;</l:l>
+      <l:l i="150">&#7887;</l:l>
+      <l:l i="150">&#7888;</l:l>
+      <l:l i="150">&#7889;</l:l>
+      <l:l i="150">&#7890;</l:l>
+      <l:l i="150">&#7891;</l:l>
+      <l:l i="150">&#7892;</l:l>
+      <l:l i="150">&#7893;</l:l>
+      <l:l i="150">&#7894;</l:l>
+      <l:l i="150">&#7895;</l:l>
+      <l:l i="150">&#7896;</l:l>
+      <l:l i="150">&#7897;</l:l>
+      <l:l i="150">&#7898;</l:l>
+      <l:l i="150">&#7899;</l:l>
+      <l:l i="150">&#7900;</l:l>
+      <l:l i="150">&#7901;</l:l>
+      <l:l i="150">&#7902;</l:l>
+      <l:l i="150">&#7903;</l:l>
+      <l:l i="150">&#7904;</l:l>
+      <l:l i="150">&#7905;</l:l>
+      <l:l i="150">&#7906;</l:l>
+      <l:l i="150">&#7907;</l:l>
+      <l:l i="160">P</l:l>
+      <l:l i="160">p</l:l>
+      <l:l i="160">&#420;</l:l>
+      <l:l i="160">&#421;</l:l>
+      <l:l i="160">&#7764;</l:l>
+      <l:l i="160">&#7765;</l:l>
+      <l:l i="160">&#7766;</l:l>
+      <l:l i="160">&#7767;</l:l>
+      <l:l i="170">Q</l:l>
+      <l:l i="170">q</l:l>
+      <l:l i="170">&#672;</l:l>
+      <l:l i="180">R</l:l>
+      <l:l i="180">r</l:l>
+      <l:l i="180">&#340;</l:l>
+      <l:l i="180">&#341;</l:l>
+      <l:l i="180">&#342;</l:l>
+      <l:l i="180">&#343;</l:l>
+      <l:l i="180">&#344;</l:l>
+      <l:l i="180">&#345;</l:l>
+      <l:l i="180">&#528;</l:l>
+      <l:l i="180">&#529;</l:l>
+      <l:l i="180">&#530;</l:l>
+      <l:l i="180">&#531;</l:l>
+      <l:l i="180">&#636;</l:l>
+      <l:l i="180">&#637;</l:l>
+      <l:l i="180">&#638;</l:l>
+      <l:l i="180">&#7768;</l:l>
+      <l:l i="180">&#7769;</l:l>
+      <l:l i="180">&#7770;</l:l>
+      <l:l i="180">&#7771;</l:l>
+      <l:l i="180">&#7772;</l:l>
+      <l:l i="180">&#7773;</l:l>
+      <l:l i="180">&#7774;</l:l>
+      <l:l i="180">&#7775;</l:l>
+      <l:l i="190">S</l:l>
+      <l:l i="190">s</l:l>
+      <l:l i="190">&#346;</l:l>
+      <l:l i="190">&#347;</l:l>
+      <l:l i="190">&#348;</l:l>
+      <l:l i="190">&#349;</l:l>
+      <l:l i="190">&#350;</l:l>
+      <l:l i="190">&#351;</l:l>
+      <l:l i="190">&#352;</l:l>
+      <l:l i="190">&#353;</l:l>
+      <l:l i="190">&#536;</l:l>
+      <l:l i="190">&#537;</l:l>
+      <l:l i="190">&#642;</l:l>
+      <l:l i="190">&#7776;</l:l>
+      <l:l i="190">&#7777;</l:l>
+      <l:l i="190">&#7778;</l:l>
+      <l:l i="190">&#7779;</l:l>
+      <l:l i="190">&#7780;</l:l>
+      <l:l i="190">&#7781;</l:l>
+      <l:l i="190">&#7782;</l:l>
+      <l:l i="190">&#7783;</l:l>
+      <l:l i="190">&#7784;</l:l>
+      <l:l i="190">&#7785;</l:l>
+      <l:l i="200">T</l:l>
+      <l:l i="200">t</l:l>
+      <l:l i="200">&#354;</l:l>
+      <l:l i="200">&#355;</l:l>
+      <l:l i="200">&#356;</l:l>
+      <l:l i="200">&#357;</l:l>
+      <l:l i="200">&#358;</l:l>
+      <l:l i="200">&#359;</l:l>
+      <l:l i="200">&#427;</l:l>
+      <l:l i="200">&#428;</l:l>
+      <l:l i="200">&#429;</l:l>
+      <l:l i="200">&#430;</l:l>
+      <l:l i="200">&#648;</l:l>
+      <l:l i="200">&#538;</l:l>
+      <l:l i="200">&#539;</l:l>
+      <l:l i="200">&#566;</l:l>
+      <l:l i="200">&#7786;</l:l>
+      <l:l i="200">&#7787;</l:l>
+      <l:l i="200">&#7788;</l:l>
+      <l:l i="200">&#7789;</l:l>
+      <l:l i="200">&#7790;</l:l>
+      <l:l i="200">&#7791;</l:l>
+      <l:l i="200">&#7792;</l:l>
+      <l:l i="200">&#7793;</l:l>
+      <l:l i="200">&#7831;</l:l>
+      <l:l i="210">U</l:l>
+      <l:l i="210">u</l:l>
+      <l:l i="210">&#217;</l:l>
+      <l:l i="210">&#249;</l:l>
+      <l:l i="210">&#218;</l:l>
+      <l:l i="210">&#250;</l:l>
+      <l:l i="210">&#219;</l:l>
+      <l:l i="210">&#251;</l:l>
+      <l:l i="210">&#220;</l:l>
+      <l:l i="210">&#252;</l:l>
+      <l:l i="210">&#360;</l:l>
+      <l:l i="210">&#361;</l:l>
+      <l:l i="210">&#362;</l:l>
+      <l:l i="210">&#363;</l:l>
+      <l:l i="210">&#364;</l:l>
+      <l:l i="210">&#365;</l:l>
+      <l:l i="210">&#366;</l:l>
+      <l:l i="210">&#367;</l:l>
+      <l:l i="210">&#368;</l:l>
+      <l:l i="210">&#369;</l:l>
+      <l:l i="210">&#370;</l:l>
+      <l:l i="210">&#371;</l:l>
+      <l:l i="210">&#431;</l:l>
+      <l:l i="210">&#432;</l:l>
+      <l:l i="210">&#467;</l:l>
+      <l:l i="210">&#468;</l:l>
+      <l:l i="210">&#469;</l:l>
+      <l:l i="210">&#470;</l:l>
+      <l:l i="210">&#471;</l:l>
+      <l:l i="210">&#472;</l:l>
+      <l:l i="210">&#473;</l:l>
+      <l:l i="210">&#474;</l:l>
+      <l:l i="210">&#475;</l:l>
+      <l:l i="210">&#476;</l:l>
+      <l:l i="210">&#532;</l:l>
+      <l:l i="210">&#533;</l:l>
+      <l:l i="210">&#534;</l:l>
+      <l:l i="210">&#535;</l:l>
+      <l:l i="210">&#7794;</l:l>
+      <l:l i="210">&#7795;</l:l>
+      <l:l i="210">&#7796;</l:l>
+      <l:l i="210">&#7797;</l:l>
+      <l:l i="210">&#7798;</l:l>
+      <l:l i="210">&#7799;</l:l>
+      <l:l i="210">&#7800;</l:l>
+      <l:l i="210">&#7801;</l:l>
+      <l:l i="210">&#7802;</l:l>
+      <l:l i="210">&#7803;</l:l>
+      <l:l i="210">&#7908;</l:l>
+      <l:l i="210">&#7909;</l:l>
+      <l:l i="210">&#7910;</l:l>
+      <l:l i="210">&#7911;</l:l>
+      <l:l i="210">&#7912;</l:l>
+      <l:l i="210">&#7913;</l:l>
+      <l:l i="210">&#7914;</l:l>
+      <l:l i="210">&#7915;</l:l>
+      <l:l i="210">&#7916;</l:l>
+      <l:l i="210">&#7917;</l:l>
+      <l:l i="210">&#7918;</l:l>
+      <l:l i="210">&#7919;</l:l>
+      <l:l i="210">&#7920;</l:l>
+      <l:l i="210">&#7921;</l:l>
+      <l:l i="220">V</l:l>
+      <l:l i="220">v</l:l>
+      <l:l i="220">&#434;</l:l>
+      <l:l i="220">&#651;</l:l>
+      <l:l i="220">&#7804;</l:l>
+      <l:l i="220">&#7805;</l:l>
+      <l:l i="220">&#7806;</l:l>
+      <l:l i="220">&#7807;</l:l>
+      <l:l i="230">W</l:l>
+      <l:l i="230">w</l:l>
+      <l:l i="230">&#372;</l:l>
+      <l:l i="230">&#373;</l:l>
+      <l:l i="230">&#7808;</l:l>
+      <l:l i="230">&#7809;</l:l>
+      <l:l i="230">&#7810;</l:l>
+      <l:l i="230">&#7811;</l:l>
+      <l:l i="230">&#7812;</l:l>
+      <l:l i="230">&#7813;</l:l>
+      <l:l i="230">&#7814;</l:l>
+      <l:l i="230">&#7815;</l:l>
+      <l:l i="230">&#7816;</l:l>
+      <l:l i="230">&#7817;</l:l>
+      <l:l i="230">&#7832;</l:l>
+      <l:l i="240">X</l:l>
+      <l:l i="240">x</l:l>
+      <l:l i="240">&#7818;</l:l>
+      <l:l i="240">&#7819;</l:l>
+      <l:l i="240">&#7820;</l:l>
+      <l:l i="240">&#7821;</l:l>
+      <l:l i="250">Y</l:l>
+      <l:l i="250">y</l:l>
+      <l:l i="250">&#221;</l:l>
+      <l:l i="250">&#253;</l:l>
+      <l:l i="250">&#255;</l:l>
+      <l:l i="250">&#376;</l:l>
+      <l:l i="250">&#374;</l:l>
+      <l:l i="250">&#375;</l:l>
+      <l:l i="250">&#435;</l:l>
+      <l:l i="250">&#436;</l:l>
+      <l:l i="250">&#562;</l:l>
+      <l:l i="250">&#563;</l:l>
+      <l:l i="250">&#7822;</l:l>
+      <l:l i="250">&#7823;</l:l>
+      <l:l i="250">&#7833;</l:l>
+      <l:l i="250">&#7922;</l:l>
+      <l:l i="250">&#7923;</l:l>
+      <l:l i="250">&#7924;</l:l>
+      <l:l i="250">&#7925;</l:l>
+      <l:l i="250">&#7926;</l:l>
+      <l:l i="250">&#7927;</l:l>
+      <l:l i="250">&#7928;</l:l>
+      <l:l i="250">&#7929;</l:l>
+      <l:l i="260">Z</l:l>
+      <l:l i="260">z</l:l>
+      <l:l i="260">&#377;</l:l>
+      <l:l i="260">&#378;</l:l>
+      <l:l i="260">&#379;</l:l>
+      <l:l i="260">&#380;</l:l>
+      <l:l i="260">&#381;</l:l>
+      <l:l i="260">&#382;</l:l>
+      <l:l i="260">&#437;</l:l>
+      <l:l i="260">&#438;</l:l>
+      <l:l i="260">&#548;</l:l>
+      <l:l i="260">&#549;</l:l>
+      <l:l i="260">&#656;</l:l>
+      <l:l i="260">&#657;</l:l>
+      <l:l i="260">&#7824;</l:l>
+      <l:l i="260">&#7825;</l:l>
+      <l:l i="260">&#7826;</l:l>
+      <l:l i="260">&#7827;</l:l>
+      <l:l i="260">&#7828;</l:l>
+      <l:l i="260">&#7829;</l:l>
+   </l:letters>
+</l:l10n>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/ar.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/ar.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/ar.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1153 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="ar" english-language-name="Arabic">
+
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+   <l:gentext key="Abstract" text="&#1582;&#1604;&#1575;&#1589;&#1577;"/>
+   <l:gentext key="abstract" text="&#1582;&#1604;&#1575;&#1589;&#1577;"/>
+   <l:gentext key="Answer" text="&#1580;:"/>
+   <l:gentext key="answer" text="&#1580;:"/>
+   <l:gentext key="Appendix" text="&#1605;&#1604;&#1581;&#1602;"/>
+   <l:gentext key="appendix" text="&#1605;&#1604;&#1581;&#1602;"/>
+   <l:gentext key="Article" text="&#1605;&#1602;&#1575;&#1604;"/>
+   <l:gentext key="article" text="&#1605;&#1602;&#1575;&#1604;"/>
+   <l:gentext key="Bibliography" text="&#1602;&#1575;&#1574;&#1605;&#1577; &#1575;&#1604;&#1605;&#1585;&#1575;&#1580;&#1593;"/>
+   <l:gentext key="bibliography" text="&#1602;&#1575;&#1574;&#1605;&#1577; &#1575;&#1604;&#1605;&#1585;&#1575;&#1580;&#1593;"/>
+   <l:gentext key="Book" text="&#1603;&#1578;&#1575;&#1576;"/>
+   <l:gentext key="book" text="&#1603;&#1578;&#1575;&#1576;"/>
+   <l:gentext key="CAUTION" text="&#1578;&#1581;&#1584;&#1610;&#1585;"/>
+   <l:gentext key="Caution" text="&#1578;&#1581;&#1584;&#1610;&#1585;"/>
+   <l:gentext key="caution" text="&#1578;&#1581;&#1584;&#1610;&#1585;"/>
+   <l:gentext key="Chapter" text="&#1601;&#1589;&#1604;"/>
+   <l:gentext key="chapter" text="&#1601;&#1589;&#1604;"/>
+   <l:gentext key="Colophon" text="&#1575;&#1604;&#1606;&#1575;&#1588;&#1585;"/>
+   <l:gentext key="colophon" text="&#1575;&#1604;&#1606;&#1575;&#1588;&#1585;"/>
+   <l:gentext key="Copyright" text="&#1581;&#1602;&#1608;&#1602; &#1575;&#1604;&#1606;&#1588;&#1585;"/>
+   <l:gentext key="copyright" text="&#1581;&#1602;&#1608;&#1602; &#1575;&#1604;&#1606;&#1588;&#1585;"/>
+   <l:gentext key="Dedication" text="&#1573;&#1607;&#1583;&#1575;&#1569;"/>
+   <l:gentext key="dedication" text="&#1573;&#1607;&#1583;&#1575;&#1569;"/>
+   <l:gentext key="Edition" text="&#1606;&#1587;&#1582;&#1577;"/>
+   <l:gentext key="edition" text="&#1606;&#1587;&#1582;&#1577;"/>
+   <l:gentext key="Equation" text="&#1605;&#1593;&#1575;&#1583;&#1604;&#1577;"/>
+   <l:gentext key="equation" text="&#1605;&#1593;&#1575;&#1583;&#1604;&#1577;"/>
+   <l:gentext key="Example" text="&#1605;&#1579;&#1575;&#1604;"/>
+   <l:gentext key="example" text="&#1605;&#1579;&#1575;&#1604;"/>
+   <l:gentext key="Figure" text="&#1588;&#1603;&#1604;"/>
+   <l:gentext key="figure" text="&#1588;&#1603;&#1604;"/>
+   <l:gentext key="Glossary" text="&#1602;&#1575;&#1605;&#1608;&#1587; &#1575;&#1604;&#1605;&#1601;&#1585;&#1583;&#1575;&#1578;"/>
+   <l:gentext key="glossary" text="&#1602;&#1575;&#1605;&#1608;&#1587; &#1575;&#1604;&#1605;&#1601;&#1585;&#1583;&#1575;&#1578;"/>
+   <l:gentext key="GlossSee" text="&#1575;&#1606;&#1592;&#1585;"/>
+   <l:gentext key="glosssee" text="&#1575;&#1606;&#1592;&#1585;"/>
+   <l:gentext key="GlossSeeAlso" text="&#1575;&#1606;&#1592;&#1585; &#1571;&#1610;&#1590;&#1575;&#1611;"/>
+   <l:gentext key="glossseealso" text="&#1575;&#1606;&#1592;&#1585; &#1571;&#1610;&#1590;&#1575;&#1611;"/>
+   <l:gentext key="IMPORTANT" text="&#1607;&#1575;&#1605;"/>
+   <l:gentext key="important" text="&#1607;&#1575;&#1605;"/>
+   <l:gentext key="Important" text="&#1607;&#1575;&#1605;"/>
+   <l:gentext key="Index" text="&#1601;&#1607;&#1585;&#1587;"/>
+   <l:gentext key="index" text="&#1601;&#1607;&#1585;&#1587;"/>
+   <l:gentext key="ISBN" text="&#1575;&#1604;&#1578;&#1585;&#1602;&#1610;&#1605; &#1575;&#1604;&#1593;&#1575;&#1604;&#1605;&#1610; &#1575;&#1604;&#1602;&#1610;&#1575;&#1587;&#1610; &#1604;&#1604;&#1603;&#1578;&#1575;&#1576;"/>
+   <l:gentext key="isbn" text="&#1575;&#1604;&#1578;&#1585;&#1602;&#1610;&#1605; &#1575;&#1604;&#1593;&#1575;&#1604;&#1605;&#1610; &#1575;&#1604;&#1602;&#1610;&#1575;&#1587;&#1610; &#1604;&#1604;&#1603;&#1578;&#1575;&#1576;"/>
+   <l:gentext key="LegalNotice" text="&#1605;&#1604;&#1575;&#1581;&#1592;&#1577; &#1602;&#1575;&#1606;&#1608;&#1606;&#1610;&#1577;"/>
+   <l:gentext key="legalnotice" text="&#1605;&#1604;&#1575;&#1581;&#1592;&#1577; &#1602;&#1575;&#1606;&#1608;&#1606;&#1610;&#1577;"/>
+   <l:gentext key="MsgAud" text="&#1575;&#1604;&#1580;&#1605;&#1607;&#1608;&#1585;"/>
+   <l:gentext key="msgaud" text="&#1575;&#1604;&#1580;&#1605;&#1607;&#1608;&#1585;"/>
+   <l:gentext key="MsgLevel" text="&#1575;&#1604;&#1605;&#1587;&#1578;&#1608;&#1609;"/>
+   <l:gentext key="msglevel" text="&#1575;&#1604;&#1605;&#1587;&#1578;&#1608;&#1609;"/>
+   <l:gentext key="MsgOrig" text="&#1575;&#1604;&#1605;&#1589;&#1583;&#1585;"/>
+   <l:gentext key="msgorig" text="&#1575;&#1604;&#1605;&#1589;&#1583;&#1585;"/>
+   <l:gentext key="NOTE" text="&#1605;&#1604;&#1575;&#1581;&#1592;&#1577;"/>
+   <l:gentext key="Note" text="&#1605;&#1604;&#1575;&#1581;&#1592;&#1577;"/>
+   <l:gentext key="note" text="&#1605;&#1604;&#1575;&#1581;&#1592;&#1577;"/>
+   <l:gentext key="Part" text="&#1580;&#1586;&#1569;"/>
+   <l:gentext key="part" text="&#1580;&#1586;&#1569;"/>
+   <l:gentext key="Preface" text="&#1605;&#1602;&#1583;&#1605;&#1577;"/>
+   <l:gentext key="preface" text="&#1605;&#1602;&#1583;&#1605;&#1577;"/>
+   <l:gentext key="Procedure" text="&#1573;&#1580;&#1585;&#1575;&#1569;"/>
+   <l:gentext key="procedure" text="&#1573;&#1580;&#1585;&#1575;&#1569;"/>
+   <l:gentext key="ProductionSet" text="&#1605;&#1606;&#1578;&#1580;"/>
+   <l:gentext key="PubDate" text="Publication Date" lang="en"/>
+   <l:gentext key="pubdate" text="Publication date" lang="en"/>
+   <l:gentext key="Published" text="&#1605;&#1606;&#1588;&#1608;&#1585;"/>
+   <l:gentext key="published" text="&#1605;&#1606;&#1588;&#1608;&#1585;"/>
+   <l:gentext key="Qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="Question" text="&#1587;:"/>
+   <l:gentext key="question" text="&#1587;:"/>
+   <l:gentext key="RefEntry" text=""/>
+   <l:gentext key="refentry" text=""/>
+   <l:gentext key="Reference" text="&#1605;&#1585;&#1580;&#1593;"/>
+   <l:gentext key="reference" text="&#1605;&#1585;&#1580;&#1593;"/>
+   <l:gentext key="RefName" text="&#1575;&#1604;&#1575;&#1587;&#1605;"/>
+   <l:gentext key="refname" text="&#1575;&#1604;&#1575;&#1587;&#1605;"/>
+   <l:gentext key="RefSection" text=""/>
+   <l:gentext key="refsection" text=""/>
+   <l:gentext key="RefSynopsisDiv" text="&#1575;&#1604;&#1605;&#1582;&#1578;&#1589;&#1585;"/>
+   <l:gentext key="refsynopsisdiv" text="&#1575;&#1604;&#1605;&#1582;&#1578;&#1589;&#1585;"/>
+   <l:gentext key="RevHistory" text="&#1578;&#1575;&#1585;&#1610;&#1582; &#1575;&#1604;&#1605;&#1585;&#1575;&#1580;&#1593;&#1577;"/>
+   <l:gentext key="revhistory" text="&#1578;&#1575;&#1585;&#1610;&#1582; &#1575;&#1604;&#1605;&#1585;&#1575;&#1580;&#1593;&#1577;"/>
+   <l:gentext key="revision" text="&#1605;&#1585;&#1575;&#1580;&#1593;&#1577;"/>
+   <l:gentext key="Revision" text="&#1605;&#1585;&#1575;&#1580;&#1593;&#1577;"/>
+   <l:gentext key="sect1" text="&#1602;&#1587;&#1605;"/>
+   <l:gentext key="sect2" text="&#1602;&#1587;&#1605;"/>
+   <l:gentext key="sect3" text="&#1602;&#1587;&#1605;"/>
+   <l:gentext key="sect4" text="&#1602;&#1587;&#1605;"/>
+   <l:gentext key="sect5" text="&#1602;&#1587;&#1605;"/>
+   <l:gentext key="section" text="&#1602;&#1587;&#1605;"/>
+   <l:gentext key="Section" text="&#1602;&#1587;&#1605;"/>
+   <l:gentext key="see" text="&#1575;&#1587;&#1578;&#1593;&#1585;&#1590;"/>
+   <l:gentext key="See" text="See" lang="en"/>
+   <l:gentext key="seealso" text="&#1575;&#1587;&#1578;&#1593;&#1585;&#1590; &#1571;&#1610;&#1590;&#1575;&#1611;"/>
+   <l:gentext key="Seealso" text="See also" lang="en"/>
+   <l:gentext key="SeeAlso" text="See Also" lang="en"/>
+   <l:gentext key="set" text="&#1605;&#1580;&#1605;&#1608;&#1593;&#1577;"/>
+   <l:gentext key="Set" text="&#1605;&#1580;&#1605;&#1608;&#1593;&#1577;"/>
+   <l:gentext key="setindex" text="&#1601;&#1607;&#1585;&#1587; &#1575;&#1604;&#1605;&#1580;&#1605;&#1608;&#1593;&#1577;"/>
+   <l:gentext key="SetIndex" text="&#1601;&#1607;&#1585;&#1587; &#1575;&#1604;&#1605;&#1580;&#1605;&#1608;&#1593;&#1577;"/>
+   <l:gentext key="Sidebar" text="&#1575;&#1604;&#1588;&#1585;&#1610;&#1591; &#1575;&#1604;&#1580;&#1575;&#1606;&#1576;&#1610;"/>
+   <l:gentext key="sidebar" text="&#1575;&#1604;&#1588;&#1585;&#1610;&#1591; &#1575;&#1604;&#1580;&#1575;&#1606;&#1576;&#1610;"/>
+   <l:gentext key="step" text="&#1582;&#1591;&#1608;&#1577;"/>
+   <l:gentext key="Step" text="&#1582;&#1591;&#1608;&#1577;"/>
+   <l:gentext key="Table" text="&#1580;&#1583;&#1608;&#1604;"/>
+   <l:gentext key="table" text="&#1580;&#1583;&#1608;&#1604;"/>
+   <l:gentext key="tip" text="&#1601;&#1603;&#1585;&#1577; &#1605;&#1601;&#1610;&#1583;&#1577;"/>
+   <l:gentext key="TIP" text="&#1601;&#1603;&#1585;&#1577; &#1605;&#1601;&#1610;&#1583;&#1577;"/>
+   <l:gentext key="Tip" text="&#1601;&#1603;&#1585;&#1577; &#1605;&#1601;&#1610;&#1583;&#1577;"/>
+   <l:gentext key="Warning" text="&#1578;&#1606;&#1576;&#1610;&#1607;"/>
+   <l:gentext key="warning" text="&#1578;&#1606;&#1576;&#1610;&#1607;"/>
+   <l:gentext key="WARNING" text="&#1578;&#1606;&#1576;&#1610;&#1607;"/>
+   <l:gentext key="and" text="&#1608;"/>
+   <l:gentext key="by" text="&#1576;&#1608;&#1575;&#1587;&#1591;&#1577;"/>
+   <l:gentext key="called" text="called" lang="en"/>
+   <l:gentext key="Edited" text="&#1605;&#1593;&#1583;&#1604;"/>
+   <l:gentext key="edited" text="&#1605;&#1593;&#1583;&#1604;"/>
+   <l:gentext key="Editedby" text="&#1605;&#1593;&#1583;&#1604; &#1576;&#1608;&#1575;&#1587;&#1591;&#1577;"/>
+   <l:gentext key="editedby" text="&#1605;&#1593;&#1583;&#1604; &#1576;&#1608;&#1575;&#1587;&#1591;&#1577;"/>
+   <l:gentext key="in" text="&#1601;&#1610;"/>
+   <l:gentext key="lastlistcomma" text="&#1548;"/>
+   <l:gentext key="listcomma" text="&#1548;"/>
+   <l:gentext key="nonexistantelement" text="&#1593;&#1606;&#1589;&#1585; &#1605;&#1601;&#1602;&#1608;&#1583;"/>
+   <l:gentext key="notes" text="&#1605;&#1604;&#1575;&#1581;&#1592;&#1575;&#1578;"/>
+   <l:gentext key="Notes" text="&#1605;&#1604;&#1575;&#1581;&#1592;&#1575;&#1578;"/>
+   <l:gentext key="Pgs" text="&#1589;&#1601;&#1581;&#1575;&#1578;"/>
+   <l:gentext key="pgs" text="&#1589;&#1601;&#1581;&#1575;&#1578;"/>
+   <l:gentext key="Revisedby" text="&#1578;&#1605;&#1578; &#1575;&#1604;&#1605;&#1585;&#1575;&#1580;&#1593;&#1577; &#1576;&#1608;&#1575;&#1587;&#1591;&#1577;: "/>
+   <l:gentext key="revisedby" text="&#1578;&#1605;&#1578; &#1575;&#1604;&#1605;&#1585;&#1575;&#1580;&#1593;&#1577; &#1576;&#1608;&#1575;&#1587;&#1591;&#1577;: "/>
+   <l:gentext key="TableNotes" text="&#1605;&#1604;&#1575;&#1581;&#1592;&#1575;&#1578;"/>
+   <l:gentext key="tablenotes" text="&#1605;&#1604;&#1575;&#1581;&#1592;&#1575;&#1578;"/>
+   <l:gentext key="TableofContents" text="&#1602;&#1575;&#1574;&#1605;&#1577; &#1575;&#1604;&#1605;&#1581;&#1578;&#1608;&#1610;&#1575;&#1578;"/>
+   <l:gentext key="tableofcontents" text="&#1602;&#1575;&#1574;&#1605;&#1577; &#1575;&#1604;&#1605;&#1581;&#1578;&#1608;&#1610;&#1575;&#1578;"/>
+   <l:gentext key="the" text="" lang="en"/>
+   <l:gentext key="unexpectedelementname" text="&#1575;&#1587;&#1605; &#1593;&#1606;&#1589;&#1585; &#1594;&#1610;&#1585; &#1605;&#1578;&#1608;&#1602;&#1593;"/>
+   <l:gentext key="unsupported" text="&#1594;&#1610;&#1585; &#1605;&#1583;&#1593;&#1608;&#1605;"/>
+   <l:gentext key="xrefto" text="&#1573;&#1588;&#1575;&#1585;&#1577; &#1573;&#1604;&#1609;"/>
+   <l:gentext key="listofequations" text="&#1602;&#1575;&#1574;&#1605;&#1577; &#1575;&#1604;&#1605;&#1593;&#1575;&#1583;&#1604;&#1575;&#1578;"/>
+   <l:gentext key="ListofEquations" text="&#1602;&#1575;&#1574;&#1605;&#1577; &#1575;&#1604;&#1605;&#1593;&#1575;&#1583;&#1604;&#1575;&#1578;"/>
+   <l:gentext key="ListofExamples" text="&#1602;&#1575;&#1574;&#1605;&#1577; &#1575;&#1604;&#1571;&#1605;&#1579;&#1604;&#1577;"/>
+   <l:gentext key="listofexamples" text="&#1602;&#1575;&#1574;&#1605;&#1577; &#1575;&#1604;&#1571;&#1605;&#1579;&#1604;&#1577;"/>
+   <l:gentext key="ListofFigures" text="&#1602;&#1575;&#1574;&#1605;&#1577; &#1575;&#1604;&#1571;&#1588;&#1603;&#1575;&#1604;"/>
+   <l:gentext key="listoffigures" text="&#1602;&#1575;&#1574;&#1605;&#1577; &#1575;&#1604;&#1571;&#1588;&#1603;&#1575;&#1604;"/>
+   <l:gentext key="ListofProcedures" text="&#1602;&#1575;&#1574;&#1605;&#1577; &#1575;&#1604;&#1573;&#1580;&#1585;&#1575;&#1569;&#1575;&#1578;"/>
+   <l:gentext key="listofprocedures" text="&#1602;&#1575;&#1574;&#1605;&#1577; &#1575;&#1604;&#1573;&#1580;&#1585;&#1575;&#1569;&#1575;&#1578;"/>
+   <l:gentext key="listoftables" text="&#1602;&#1575;&#1574;&#1605;&#1577; &#1575;&#1604;&#1580;&#1583;&#1575;&#1608;&#1604;"/>
+   <l:gentext key="ListofTables" text="&#1602;&#1575;&#1574;&#1605;&#1577; &#1575;&#1604;&#1580;&#1583;&#1575;&#1608;&#1604;"/>
+   <l:gentext key="ListofUnknown" text="&#1602;&#1575;&#1574;&#1605;&#1577; &#1575;&#1604;&#1605;&#1580;&#1607;&#1608;&#1604;&#1575;&#1578;"/>
+   <l:gentext key="listofunknown" text="&#1602;&#1575;&#1574;&#1605;&#1577; &#1575;&#1604;&#1605;&#1580;&#1607;&#1608;&#1604;&#1575;&#1578;"/>
+   <l:gentext key="nav-home" text="&#1575;&#1604;&#1576;&#1583;&#1575;&#1610;&#1577;"/>
+   <l:gentext key="nav-next" text="&#1575;&#1604;&#1578;&#1575;&#1604;&#1610;"/>
+   <l:gentext key="nav-next-sibling" text="&#1573;&#1604;&#1609; &#1575;&#1604;&#1571;&#1605;&#1575;&#1605;"/>
+   <l:gentext key="nav-prev" text="&#1575;&#1604;&#1587;&#1575;&#1576;&#1602;"/>
+   <l:gentext key="nav-prev-sibling" text="&#1573;&#1604;&#1609; &#1575;&#1604;&#1582;&#1604;&#1601;"/>
+   <l:gentext key="nav-up" text="&#1571;&#1593;&#1604;&#1609;"/>
+   <l:gentext key="nav-toc" text="&#1575;&#1604;&#1601;&#1607;&#1585;&#1587;"/>
+   <l:gentext key="Draft" text="&#1605;&#1587;&#1608;&#1583;&#1577;"/>
+   <l:gentext key="above" text="&#1571;&#1593;&#1604;&#1609;"/>
+   <l:gentext key="below" text="&#1601;&#1610;&#1605;&#1575; &#1610;&#1604;&#1610;"/>
+   <l:gentext key="sectioncalled" text="&#1575;&#1604;&#1602;&#1587;&#1605; &#1575;&#1604;&#1605;&#1587;&#1605;&#1609;"/>
+   <l:gentext key="index symbols" text="&#1575;&#1604;&#1585;&#1605;&#1608;&#1586;"/>
+   <l:gentext key="lowercase.alpha" text="abcdefghijklmnopqrstuvwxyz"/>
+   <l:gentext key="uppercase.alpha" text="ABCDEFGHIJKLMNOPQRSTUVWXYZ"/>
+   <l:dingbat key="startquote" text="&#8220;"/>
+   <l:dingbat key="endquote" text="&#8221;"/>
+   <l:dingbat key="nestedstartquote" text="&#8216;"/>
+   <l:dingbat key="nestedendquote" text="&#8217;"/>
+   <l:dingbat key="singlestartquote" text="&#8216;" lang="en"/>
+   <l:dingbat key="singleendquote" text="&#8217;" lang="en"/>
+   <l:dingbat key="bullet" text="&#8226;"/>
+   <l:gentext key="hyphenation-character" text="&#8208;"/>
+   <l:gentext key="hyphenation-push-character-count" text="2"/>
+   <l:gentext key="hyphenation-remain-character-count" text="2"/>
+
+   <l:context name="styles">
+      <l:template name="person-name" text="first-last"/>
+   </l:context>
+
+   <l:context name="title">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="%t"/>
+      <l:template name="appendix" text="&#1605;&#1604;&#1581;&#1602;&#160;%n.&#160;%t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="biblioentry" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliolist" text="%t" lang="en"/>
+      <l:template name="bibliomixed" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="&#1601;&#1589;&#1604;&#160;%n.&#160;%t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="&#1605;&#1593;&#1575;&#1583;&#1604;&#1577;&#160;%n.&#160;%t"/>
+      <l:template name="example" text="&#1605;&#1579;&#1575;&#1604;&#160;%n.&#160;%t"/>
+      <l:template name="figure" text="&#1588;&#1603;&#1604;&#160;%n.&#160;%t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="glosslist" text="%t" lang="en"/>
+      <l:template name="glossentry" text="%t"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text=""/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="&#1580;&#1586;&#1569;&#160;%n.&#160;%t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="procedure.formal" text="&#1573;&#1580;&#1585;&#1575;&#1569;&#160;%n.&#160;%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="productionset.formal" text="&#1605;&#1606;&#1578;&#1580;&#160;%n"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="%t"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="%t"/>
+      <l:template name="refentry" text="%t"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsection" text="%t"/>
+      <l:template name="refsect1" text="%t"/>
+      <l:template name="refsect2" text="%t"/>
+      <l:template name="refsect3" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="refsynopsisdivinfo" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="step" text="%t"/>
+      <l:template name="table" text="&#1580;&#1583;&#1608;&#1604;&#160;%n.&#160;%t"/>
+      <l:template name="task" text="%t" lang="en"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text=""/>
+      <l:template name="warning" text="%t"/>
+   </l:context>
+
+   <l:context name="title-unnumbered">
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article/appendix" text="%t"/>
+      <l:template name="bridgehead" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="sect1" text="%t"/>
+      <l:template name="sect2" text="%t"/>
+      <l:template name="sect3" text="%t"/>
+      <l:template name="sect4" text="%t"/>
+      <l:template name="sect5" text="%t"/>
+      <l:template name="section" text="%t"/>
+      <l:template name="simplesect" text="%t"/>
+   </l:context>
+
+   <l:context name="title-numbered">
+      <l:template name="appendix" text="&#1605;&#1604;&#1581;&#1602;&#160;%n.&#160;%t"/>
+      <l:template name="article/appendix" text="%n.&#160;%t"/>
+      <l:template name="bridgehead" text="%n.&#160;%t"/>
+      <l:template name="chapter" text="&#1601;&#1589;&#1604;&#160;%n.&#160;%t"/>
+      <l:template name="sect1" text="%n.&#160;%t"/>
+      <l:template name="sect2" text="%n.&#160;%t"/>
+      <l:template name="sect3" text="%n.&#160;%t"/>
+      <l:template name="sect4" text="%n.&#160;%t"/>
+      <l:template name="sect5" text="%n.&#160;%t"/>
+      <l:template name="section" text="%n.&#160;%t"/>
+      <l:template name="simplesect" text="%t"/>
+   </l:context>
+
+   <l:context name="subtitle">
+      <l:template name="appendix" text="%s"/>
+      <l:template name="article" text="%s"/>
+      <l:template name="bibliodiv" text="%s"/>
+      <l:template name="biblioentry" text="%s"/>
+      <l:template name="bibliography" text="%s"/>
+      <l:template name="bibliomixed" text="%s"/>
+      <l:template name="bibliomset" text="%s"/>
+      <l:template name="biblioset" text="%s"/>
+      <l:template name="book" text="%s"/>
+      <l:template name="chapter" text="%s"/>
+      <l:template name="colophon" text="%s"/>
+      <l:template name="dedication" text="%s"/>
+      <l:template name="glossary" text="%s"/>
+      <l:template name="glossdiv" text="%s"/>
+      <l:template name="index" text="%s"/>
+      <l:template name="indexdiv" text="%s"/>
+      <l:template name="lot" text="%s"/>
+      <l:template name="part" text="%s"/>
+      <l:template name="partintro" text="%s"/>
+      <l:template name="preface" text="%s"/>
+      <l:template name="refentry" text="%s"/>
+      <l:template name="reference" text="%s"/>
+      <l:template name="refsection" text="%s"/>
+      <l:template name="refsect1" text="%s"/>
+      <l:template name="refsect2" text="%s"/>
+      <l:template name="refsect3" text="%s"/>
+      <l:template name="refsynopsisdiv" text="%s"/>
+      <l:template name="sect1" text="%s"/>
+      <l:template name="sect2" text="%s"/>
+      <l:template name="sect3" text="%s"/>
+      <l:template name="sect4" text="%s"/>
+      <l:template name="sect5" text="%s"/>
+      <l:template name="section" text="%s"/>
+      <l:template name="set" text="%s"/>
+      <l:template name="setindex" text="%s"/>
+      <l:template name="sidebar" text="%s"/>
+      <l:template name="simplesect" text="%s"/>
+      <l:template name="toc" text="%s"/>
+   </l:context>
+
+   <l:context name="xref">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="&#1580;:&#160;%n"/>
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="constraintdef" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="%t"/>
+      <l:template name="example" text="%t"/>
+      <l:template name="figure" text="%t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text="%n"/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="%t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="&#1587;:&#160;%n"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="&#1587;:&#160;%n"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="table" text="%t"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="%n"/>
+      <l:template name="warning" text="%t"/>
+      <l:template name="page.citation" text=" [%p]"/>
+      <l:template name="page" text="(page %p)" lang="en"/>
+      <l:template name="pageabbrev" text="(p. %p)" lang="en"/>
+      <l:template name="Page" text="Page %p" lang="en"/>
+      <l:template name="bridgehead" text="&#1575;&#1604;&#1602;&#1587;&#1605; &#1575;&#1604;&#1605;&#1587;&#1605;&#1609; &#8220;%t&#8221;"/>
+      <l:template name="refsection" text="&#1575;&#1604;&#1602;&#1587;&#1605; &#1575;&#1604;&#1605;&#1587;&#1605;&#1609; &#8220;%t&#8221;"/>
+      <l:template name="refsect1" text="&#1575;&#1604;&#1602;&#1587;&#1605; &#1575;&#1604;&#1605;&#1587;&#1605;&#1609; &#8220;%t&#8221;"/>
+      <l:template name="refsect2" text="&#1575;&#1604;&#1602;&#1587;&#1605; &#1575;&#1604;&#1605;&#1587;&#1605;&#1609; &#8220;%t&#8221;"/>
+      <l:template name="refsect3" text="&#1575;&#1604;&#1602;&#1587;&#1605; &#1575;&#1604;&#1605;&#1587;&#1605;&#1609; &#8220;%t&#8221;"/>
+      <l:template name="sect1" text="&#1575;&#1604;&#1602;&#1587;&#1605; &#1575;&#1604;&#1605;&#1587;&#1605;&#1609; &#8220;%t&#8221;"/>
+      <l:template name="sect2" text="&#1575;&#1604;&#1602;&#1587;&#1605; &#1575;&#1604;&#1605;&#1587;&#1605;&#1609; &#8220;%t&#8221;"/>
+      <l:template name="sect3" text="&#1575;&#1604;&#1602;&#1587;&#1605; &#1575;&#1604;&#1605;&#1587;&#1605;&#1609; &#8220;%t&#8221;"/>
+      <l:template name="sect4" text="&#1575;&#1604;&#1602;&#1587;&#1605; &#1575;&#1604;&#1605;&#1587;&#1605;&#1609; &#8220;%t&#8221;"/>
+      <l:template name="sect5" text="&#1575;&#1604;&#1602;&#1587;&#1605; &#1575;&#1604;&#1605;&#1587;&#1605;&#1609; &#8220;%t&#8221;"/>
+      <l:template name="section" text="&#1575;&#1604;&#1602;&#1587;&#1605; &#1575;&#1604;&#1605;&#1587;&#1605;&#1609; &#8220;%t&#8221;"/>
+      <l:template name="simplesect" text="&#1575;&#1604;&#1602;&#1587;&#1605; &#1575;&#1604;&#1605;&#1587;&#1605;&#1609; &#8220;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="xref-number">
+      <l:template name="answer" text="&#1580;:&#160;%n"/>
+      <l:template name="appendix" text="&#1605;&#1604;&#1581;&#1602;&#160;%n"/>
+      <l:template name="bridgehead" text="&#1602;&#1587;&#1605;&#160;%n"/>
+      <l:template name="chapter" text="&#1601;&#1589;&#1604;&#160;%n"/>
+      <l:template name="equation" text="&#1605;&#1593;&#1575;&#1583;&#1604;&#1577;&#160;%n"/>
+      <l:template name="example" text="&#1605;&#1579;&#1575;&#1604;&#160;%n"/>
+      <l:template name="figure" text="&#1588;&#1603;&#1604;&#160;%n"/>
+      <l:template name="part" text="&#1580;&#1586;&#1569;&#160;%n"/>
+      <l:template name="procedure" text="&#1573;&#1580;&#1585;&#1575;&#1569;&#160;%n"/>
+      <l:template name="productionset" text="&#1605;&#1606;&#1578;&#1580;&#160;%n"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n"/>
+      <l:template name="qandaentry" text="&#1587;:&#160;%n"/>
+      <l:template name="question" text="&#1587;:&#160;%n"/>
+      <l:template name="sect1" text="&#1602;&#1587;&#1605;&#160;%n"/>
+      <l:template name="sect2" text="&#1602;&#1587;&#1605;&#160;%n"/>
+      <l:template name="sect3" text="&#1602;&#1587;&#1605;&#160;%n"/>
+      <l:template name="sect4" text="&#1602;&#1587;&#1605;&#160;%n"/>
+      <l:template name="sect5" text="&#1602;&#1587;&#1605;&#160;%n"/>
+      <l:template name="section" text="&#1602;&#1587;&#1605;&#160;%n"/>
+      <l:template name="table" text="&#1580;&#1583;&#1608;&#1604;&#160;%n"/>
+   </l:context>
+
+   <l:context name="xref-number-and-title">
+      <l:template name="appendix" text="&#1605;&#1604;&#1581;&#1602;&#160;%n, %t"/>
+      <l:template name="bridgehead" text="&#1602;&#1587;&#1605;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="chapter" text="&#1601;&#1589;&#1604;&#160;%n, %t"/>
+      <l:template name="equation" text="&#1605;&#1593;&#1575;&#1583;&#1604;&#1577;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="example" text="&#1605;&#1579;&#1575;&#1604;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="figure" text="&#1588;&#1603;&#1604;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="part" text="&#1580;&#1586;&#1569;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="procedure" text="&#1573;&#1580;&#1585;&#1575;&#1569;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="productionset" text="&#1605;&#1606;&#1578;&#1580;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="refsect1" text="&#1575;&#1604;&#1602;&#1587;&#1605; &#1575;&#1604;&#1605;&#1587;&#1605;&#1609; &#8220;%t&#8221;"/>
+      <l:template name="refsect2" text="&#1575;&#1604;&#1602;&#1587;&#1605; &#1575;&#1604;&#1605;&#1587;&#1605;&#1609; &#8220;%t&#8221;"/>
+      <l:template name="refsect3" text="&#1575;&#1604;&#1602;&#1587;&#1605; &#1575;&#1604;&#1605;&#1587;&#1605;&#1609; &#8220;%t&#8221;"/>
+      <l:template name="refsection" text="&#1575;&#1604;&#1602;&#1587;&#1605; &#1575;&#1604;&#1605;&#1587;&#1605;&#1609; &#8220;%t&#8221;"/>
+      <l:template name="sect1" text="&#1602;&#1587;&#1605;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect2" text="&#1602;&#1587;&#1605;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect3" text="&#1602;&#1587;&#1605;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect4" text="&#1602;&#1587;&#1605;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect5" text="&#1602;&#1587;&#1605;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="section" text="&#1602;&#1587;&#1605;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="simplesect" text="&#1575;&#1604;&#1602;&#1587;&#1605; &#1575;&#1604;&#1605;&#1587;&#1605;&#1609; &#8220;%t&#8221;"/>
+      <l:template name="table" text="&#1580;&#1583;&#1608;&#1604;&#160;%n, &#8220;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="authorgroup">
+      <l:template name="sep" text="&#1548; "/>
+      <l:template name="sep2" text=" &#1608; "/>
+      <l:template name="seplast" text="&#1548; &#1608; "/>
+   </l:context>
+
+   <l:context name="glossary">
+      <l:template name="see" text="&#1575;&#1606;&#1592;&#1585; "/>
+      <l:template name="seealso" text="&#1575;&#1606;&#1592;&#1585; &#1571;&#1610;&#1590;&#1575;&#1611; "/>
+   </l:context>
+
+   <l:context name="msgset">
+      <l:template name="MsgAud" text="&#1575;&#1604;&#1580;&#1605;&#1607;&#1608;&#1585;: "/>
+      <l:template name="MsgLevel" text="&#1575;&#1604;&#1605;&#1587;&#1578;&#1608;&#1609;: "/>
+      <l:template name="MsgOrig" text="&#1575;&#1604;&#1605;&#1589;&#1583;&#1585;: "/>
+   </l:context>
+
+   <l:context name="datetime">
+      <l:template name="format" text="d/m/Y"/>
+   </l:context>
+
+   <l:context name="datetime-full">
+      <l:template name="January" text="&#1610;&#1606;&#1575;&#1610;&#1585;"/>
+      <l:template name="February" text="&#1601;&#1576;&#1585;&#1575;&#1610;&#1585;"/>
+      <l:template name="March" text="&#1605;&#1575;&#1585;&#1587;"/>
+      <l:template name="April" text="&#1571;&#1576;&#1585;&#1610;&#1604;"/>
+      <l:template name="May" text="&#1605;&#1575;&#1610;&#1608;"/>
+      <l:template name="June" text="&#1610;&#1608;&#1606;&#1610;&#1608;"/>
+      <l:template name="July" text="&#1610;&#1608;&#1604;&#1610;&#1608;"/>
+      <l:template name="August" text="&#1571;&#1594;&#1587;&#1591;&#1587;"/>
+      <l:template name="September" text="&#1587;&#1576;&#1578;&#1605;&#1576;&#1585;"/>
+      <l:template name="October" text="&#1571;&#1603;&#1578;&#1608;&#1576;&#1585;"/>
+      <l:template name="November" text="&#1606;&#1608;&#1601;&#1605;&#1576;&#1585;"/>
+      <l:template name="December" text="&#1583;&#1610;&#1587;&#1605;&#1576;&#1585;"/>
+      <l:template name="Monday" text="&#1575;&#1604;&#1573;&#1579;&#1606;&#1610;&#1606;"/>
+      <l:template name="Tuesday" text="&#1575;&#1604;&#1579;&#1604;&#1575;&#1579;&#1575;&#1569;"/>
+      <l:template name="Wednesday" text="&#1575;&#1604;&#1571;&#1585;&#1576;&#1593;&#1575;&#1569;"/>
+      <l:template name="Thursday" text="&#1575;&#1604;&#1582;&#1605;&#1610;&#1587;"/>
+      <l:template name="Friday" text="&#1575;&#1604;&#1580;&#1605;&#1593;&#1577;"/>
+      <l:template name="Saturday" text="&#1575;&#1604;&#1587;&#1576;&#1578;"/>
+      <l:template name="Sunday" text="&#1575;&#1604;&#1571;&#1581;&#1583;"/>
+   </l:context>
+
+   <l:context name="datetime-abbrev">
+      <l:template name="Jan" text="&#1610;&#1606;&#1575;&#1610;&#1585;"/>
+      <l:template name="Feb" text="&#1601;&#1576;&#1585;&#1575;&#1610;&#1585;"/>
+      <l:template name="Mar" text="&#1605;&#1575;&#1585;&#1587;"/>
+      <l:template name="Apr" text="&#1571;&#1576;&#1585;&#1610;&#1604;"/>
+      <l:template name="May" text="&#1605;&#1575;&#1610;&#1608;"/>
+      <l:template name="Jun" text="&#1610;&#1608;&#1606;&#1610;&#1608;"/>
+      <l:template name="Jul" text="&#1610;&#1608;&#1604;&#1610;&#1608;"/>
+      <l:template name="Aug" text="&#1571;&#1594;&#1587;&#1591;&#1587;"/>
+      <l:template name="Sep" text="&#1587;&#1576;&#1578;&#1605;&#1576;&#1585;"/>
+      <l:template name="Oct" text="&#1571;&#1603;&#1578;&#1608;&#1576;&#1585;"/>
+      <l:template name="Nov" text="&#1606;&#1608;&#1601;&#1605;&#1576;&#1585;"/>
+      <l:template name="Dec" text="&#1583;&#1610;&#1587;&#1605;&#1576;&#1585;"/>
+      <l:template name="Mon" text="&#1575;&#1604;&#1573;&#1579;&#1606;&#1610;&#1606;"/>
+      <l:template name="Tue" text="&#1575;&#1604;&#1579;&#1604;&#1575;&#1579;&#1575;&#1569;"/>
+      <l:template name="Wed" text="&#1575;&#1604;&#1571;&#1585;&#1576;&#1593;&#1575;&#1569;"/>
+      <l:template name="Thu" text="&#1575;&#1604;&#1582;&#1605;&#1610;&#1587;"/>
+      <l:template name="Fri" text="&#1575;&#1604;&#1580;&#1605;&#1593;&#1577;"/>
+      <l:template name="Sat" text="&#1575;&#1604;&#1587;&#1576;&#1578;"/>
+      <l:template name="Sun" text="&#1575;&#1604;&#1571;&#1581;&#1583;"/>
+   </l:context>
+
+   <l:context name="htmlhelp">
+      <l:template name="langcode" text="0x0409 English (UNITED STATES)" lang="en"/>
+   </l:context>
+
+   <l:letters lang="en">
+      <l:l i="-1"/>
+      <l:l i="0">Symbols</l:l>
+      <l:l i="10">A</l:l>
+      <l:l i="10">a</l:l>
+      <l:l i="10">&#192;</l:l>
+      <l:l i="10">&#224;</l:l>
+      <l:l i="10">&#193;</l:l>
+      <l:l i="10">&#225;</l:l>
+      <l:l i="10">&#194;</l:l>
+      <l:l i="10">&#226;</l:l>
+      <l:l i="10">&#195;</l:l>
+      <l:l i="10">&#227;</l:l>
+      <l:l i="10">&#196;</l:l>
+      <l:l i="10">&#228;</l:l>
+      <l:l i="10">&#197;</l:l>
+      <l:l i="10">&#229;</l:l>
+      <l:l i="10">&#256;</l:l>
+      <l:l i="10">&#257;</l:l>
+      <l:l i="10">&#258;</l:l>
+      <l:l i="10">&#259;</l:l>
+      <l:l i="10">&#260;</l:l>
+      <l:l i="10">&#261;</l:l>
+      <l:l i="10">&#461;</l:l>
+      <l:l i="10">&#462;</l:l>
+      <l:l i="10">&#478;</l:l>
+      <l:l i="10">&#479;</l:l>
+      <l:l i="10">&#480;</l:l>
+      <l:l i="10">&#481;</l:l>
+      <l:l i="10">&#506;</l:l>
+      <l:l i="10">&#507;</l:l>
+      <l:l i="10">&#512;</l:l>
+      <l:l i="10">&#513;</l:l>
+      <l:l i="10">&#514;</l:l>
+      <l:l i="10">&#515;</l:l>
+      <l:l i="10">&#550;</l:l>
+      <l:l i="10">&#551;</l:l>
+      <l:l i="10">&#7680;</l:l>
+      <l:l i="10">&#7681;</l:l>
+      <l:l i="10">&#7834;</l:l>
+      <l:l i="10">&#7840;</l:l>
+      <l:l i="10">&#7841;</l:l>
+      <l:l i="10">&#7842;</l:l>
+      <l:l i="10">&#7843;</l:l>
+      <l:l i="10">&#7844;</l:l>
+      <l:l i="10">&#7845;</l:l>
+      <l:l i="10">&#7846;</l:l>
+      <l:l i="10">&#7847;</l:l>
+      <l:l i="10">&#7848;</l:l>
+      <l:l i="10">&#7849;</l:l>
+      <l:l i="10">&#7850;</l:l>
+      <l:l i="10">&#7851;</l:l>
+      <l:l i="10">&#7852;</l:l>
+      <l:l i="10">&#7853;</l:l>
+      <l:l i="10">&#7854;</l:l>
+      <l:l i="10">&#7855;</l:l>
+      <l:l i="10">&#7856;</l:l>
+      <l:l i="10">&#7857;</l:l>
+      <l:l i="10">&#7858;</l:l>
+      <l:l i="10">&#7859;</l:l>
+      <l:l i="10">&#7860;</l:l>
+      <l:l i="10">&#7861;</l:l>
+      <l:l i="10">&#7862;</l:l>
+      <l:l i="10">&#7863;</l:l>
+      <l:l i="20">B</l:l>
+      <l:l i="20">b</l:l>
+      <l:l i="20">&#384;</l:l>
+      <l:l i="20">&#385;</l:l>
+      <l:l i="20">&#595;</l:l>
+      <l:l i="20">&#386;</l:l>
+      <l:l i="20">&#387;</l:l>
+      <l:l i="20">&#7682;</l:l>
+      <l:l i="20">&#7683;</l:l>
+      <l:l i="20">&#7684;</l:l>
+      <l:l i="20">&#7685;</l:l>
+      <l:l i="20">&#7686;</l:l>
+      <l:l i="20">&#7687;</l:l>
+      <l:l i="30">C</l:l>
+      <l:l i="30">c</l:l>
+      <l:l i="30">&#199;</l:l>
+      <l:l i="30">&#231;</l:l>
+      <l:l i="30">&#262;</l:l>
+      <l:l i="30">&#263;</l:l>
+      <l:l i="30">&#264;</l:l>
+      <l:l i="30">&#265;</l:l>
+      <l:l i="30">&#266;</l:l>
+      <l:l i="30">&#267;</l:l>
+      <l:l i="30">&#268;</l:l>
+      <l:l i="30">&#269;</l:l>
+      <l:l i="30">&#391;</l:l>
+      <l:l i="30">&#392;</l:l>
+      <l:l i="30">&#597;</l:l>
+      <l:l i="30">&#7688;</l:l>
+      <l:l i="30">&#7689;</l:l>
+      <l:l i="40">D</l:l>
+      <l:l i="40">d</l:l>
+      <l:l i="40">&#270;</l:l>
+      <l:l i="40">&#271;</l:l>
+      <l:l i="40">&#272;</l:l>
+      <l:l i="40">&#273;</l:l>
+      <l:l i="40">&#394;</l:l>
+      <l:l i="40">&#599;</l:l>
+      <l:l i="40">&#395;</l:l>
+      <l:l i="40">&#396;</l:l>
+      <l:l i="40">&#453;</l:l>
+      <l:l i="40">&#498;</l:l>
+      <l:l i="40">&#545;</l:l>
+      <l:l i="40">&#598;</l:l>
+      <l:l i="40">&#7690;</l:l>
+      <l:l i="40">&#7691;</l:l>
+      <l:l i="40">&#7692;</l:l>
+      <l:l i="40">&#7693;</l:l>
+      <l:l i="40">&#7694;</l:l>
+      <l:l i="40">&#7695;</l:l>
+      <l:l i="40">&#7696;</l:l>
+      <l:l i="40">&#7697;</l:l>
+      <l:l i="40">&#7698;</l:l>
+      <l:l i="40">&#7699;</l:l>
+      <l:l i="50">E</l:l>
+      <l:l i="50">e</l:l>
+      <l:l i="50">&#200;</l:l>
+      <l:l i="50">&#232;</l:l>
+      <l:l i="50">&#201;</l:l>
+      <l:l i="50">&#233;</l:l>
+      <l:l i="50">&#202;</l:l>
+      <l:l i="50">&#234;</l:l>
+      <l:l i="50">&#203;</l:l>
+      <l:l i="50">&#235;</l:l>
+      <l:l i="50">&#274;</l:l>
+      <l:l i="50">&#275;</l:l>
+      <l:l i="50">&#276;</l:l>
+      <l:l i="50">&#277;</l:l>
+      <l:l i="50">&#278;</l:l>
+      <l:l i="50">&#279;</l:l>
+      <l:l i="50">&#280;</l:l>
+      <l:l i="50">&#281;</l:l>
+      <l:l i="50">&#282;</l:l>
+      <l:l i="50">&#283;</l:l>
+      <l:l i="50">&#516;</l:l>
+      <l:l i="50">&#517;</l:l>
+      <l:l i="50">&#518;</l:l>
+      <l:l i="50">&#519;</l:l>
+      <l:l i="50">&#552;</l:l>
+      <l:l i="50">&#553;</l:l>
+      <l:l i="50">&#7700;</l:l>
+      <l:l i="50">&#7701;</l:l>
+      <l:l i="50">&#7702;</l:l>
+      <l:l i="50">&#7703;</l:l>
+      <l:l i="50">&#7704;</l:l>
+      <l:l i="50">&#7705;</l:l>
+      <l:l i="50">&#7706;</l:l>
+      <l:l i="50">&#7707;</l:l>
+      <l:l i="50">&#7708;</l:l>
+      <l:l i="50">&#7709;</l:l>
+      <l:l i="50">&#7864;</l:l>
+      <l:l i="50">&#7865;</l:l>
+      <l:l i="50">&#7866;</l:l>
+      <l:l i="50">&#7867;</l:l>
+      <l:l i="50">&#7868;</l:l>
+      <l:l i="50">&#7869;</l:l>
+      <l:l i="50">&#7870;</l:l>
+      <l:l i="50">&#7871;</l:l>
+      <l:l i="50">&#7872;</l:l>
+      <l:l i="50">&#7873;</l:l>
+      <l:l i="50">&#7874;</l:l>
+      <l:l i="50">&#7875;</l:l>
+      <l:l i="50">&#7876;</l:l>
+      <l:l i="50">&#7877;</l:l>
+      <l:l i="50">&#7878;</l:l>
+      <l:l i="50">&#7879;</l:l>
+      <l:l i="60">F</l:l>
+      <l:l i="60">f</l:l>
+      <l:l i="60">&#401;</l:l>
+      <l:l i="60">&#402;</l:l>
+      <l:l i="60">&#7710;</l:l>
+      <l:l i="60">&#7711;</l:l>
+      <l:l i="70">G</l:l>
+      <l:l i="70">g</l:l>
+      <l:l i="70">&#284;</l:l>
+      <l:l i="70">&#285;</l:l>
+      <l:l i="70">&#286;</l:l>
+      <l:l i="70">&#287;</l:l>
+      <l:l i="70">&#288;</l:l>
+      <l:l i="70">&#289;</l:l>
+      <l:l i="70">&#290;</l:l>
+      <l:l i="70">&#291;</l:l>
+      <l:l i="70">&#403;</l:l>
+      <l:l i="70">&#608;</l:l>
+      <l:l i="70">&#484;</l:l>
+      <l:l i="70">&#485;</l:l>
+      <l:l i="70">&#486;</l:l>
+      <l:l i="70">&#487;</l:l>
+      <l:l i="70">&#500;</l:l>
+      <l:l i="70">&#501;</l:l>
+      <l:l i="70">&#7712;</l:l>
+      <l:l i="70">&#7713;</l:l>
+      <l:l i="80">H</l:l>
+      <l:l i="80">h</l:l>
+      <l:l i="80">&#292;</l:l>
+      <l:l i="80">&#293;</l:l>
+      <l:l i="80">&#294;</l:l>
+      <l:l i="80">&#295;</l:l>
+      <l:l i="80">&#542;</l:l>
+      <l:l i="80">&#543;</l:l>
+      <l:l i="80">&#614;</l:l>
+      <l:l i="80">&#7714;</l:l>
+      <l:l i="80">&#7715;</l:l>
+      <l:l i="80">&#7716;</l:l>
+      <l:l i="80">&#7717;</l:l>
+      <l:l i="80">&#7718;</l:l>
+      <l:l i="80">&#7719;</l:l>
+      <l:l i="80">&#7720;</l:l>
+      <l:l i="80">&#7721;</l:l>
+      <l:l i="80">&#7722;</l:l>
+      <l:l i="80">&#7723;</l:l>
+      <l:l i="80">&#7830;</l:l>
+      <l:l i="90">I</l:l>
+      <l:l i="90">i</l:l>
+      <l:l i="90">&#204;</l:l>
+      <l:l i="90">&#236;</l:l>
+      <l:l i="90">&#205;</l:l>
+      <l:l i="90">&#237;</l:l>
+      <l:l i="90">&#206;</l:l>
+      <l:l i="90">&#238;</l:l>
+      <l:l i="90">&#207;</l:l>
+      <l:l i="90">&#239;</l:l>
+      <l:l i="90">&#296;</l:l>
+      <l:l i="90">&#297;</l:l>
+      <l:l i="90">&#298;</l:l>
+      <l:l i="90">&#299;</l:l>
+      <l:l i="90">&#300;</l:l>
+      <l:l i="90">&#301;</l:l>
+      <l:l i="90">&#302;</l:l>
+      <l:l i="90">&#303;</l:l>
+      <l:l i="90">&#304;</l:l>
+      <l:l i="90">&#407;</l:l>
+      <l:l i="90">&#616;</l:l>
+      <l:l i="90">&#463;</l:l>
+      <l:l i="90">&#464;</l:l>
+      <l:l i="90">&#520;</l:l>
+      <l:l i="90">&#521;</l:l>
+      <l:l i="90">&#522;</l:l>
+      <l:l i="90">&#523;</l:l>
+      <l:l i="90">&#7724;</l:l>
+      <l:l i="90">&#7725;</l:l>
+      <l:l i="90">&#7726;</l:l>
+      <l:l i="90">&#7727;</l:l>
+      <l:l i="90">&#7880;</l:l>
+      <l:l i="90">&#7881;</l:l>
+      <l:l i="90">&#7882;</l:l>
+      <l:l i="90">&#7883;</l:l>
+      <l:l i="100">J</l:l>
+      <l:l i="100">j</l:l>
+      <l:l i="100">&#308;</l:l>
+      <l:l i="100">&#309;</l:l>
+      <l:l i="100">&#496;</l:l>
+      <l:l i="100">&#669;</l:l>
+      <l:l i="110">K</l:l>
+      <l:l i="110">k</l:l>
+      <l:l i="110">&#310;</l:l>
+      <l:l i="110">&#311;</l:l>
+      <l:l i="110">&#408;</l:l>
+      <l:l i="110">&#409;</l:l>
+      <l:l i="110">&#488;</l:l>
+      <l:l i="110">&#489;</l:l>
+      <l:l i="110">&#7728;</l:l>
+      <l:l i="110">&#7729;</l:l>
+      <l:l i="110">&#7730;</l:l>
+      <l:l i="110">&#7731;</l:l>
+      <l:l i="110">&#7732;</l:l>
+      <l:l i="110">&#7733;</l:l>
+      <l:l i="120">L</l:l>
+      <l:l i="120">l</l:l>
+      <l:l i="120">&#313;</l:l>
+      <l:l i="120">&#314;</l:l>
+      <l:l i="120">&#315;</l:l>
+      <l:l i="120">&#316;</l:l>
+      <l:l i="120">&#317;</l:l>
+      <l:l i="120">&#318;</l:l>
+      <l:l i="120">&#319;</l:l>
+      <l:l i="120">&#320;</l:l>
+      <l:l i="120">&#321;</l:l>
+      <l:l i="120">&#322;</l:l>
+      <l:l i="120">&#410;</l:l>
+      <l:l i="120">&#456;</l:l>
+      <l:l i="120">&#564;</l:l>
+      <l:l i="120">&#619;</l:l>
+      <l:l i="120">&#620;</l:l>
+      <l:l i="120">&#621;</l:l>
+      <l:l i="120">&#7734;</l:l>
+      <l:l i="120">&#7735;</l:l>
+      <l:l i="120">&#7736;</l:l>
+      <l:l i="120">&#7737;</l:l>
+      <l:l i="120">&#7738;</l:l>
+      <l:l i="120">&#7739;</l:l>
+      <l:l i="120">&#7740;</l:l>
+      <l:l i="120">&#7741;</l:l>
+      <l:l i="130">M</l:l>
+      <l:l i="130">m</l:l>
+      <l:l i="130">&#625;</l:l>
+      <l:l i="130">&#7742;</l:l>
+      <l:l i="130">&#7743;</l:l>
+      <l:l i="130">&#7744;</l:l>
+      <l:l i="130">&#7745;</l:l>
+      <l:l i="130">&#7746;</l:l>
+      <l:l i="130">&#7747;</l:l>
+      <l:l i="140">N</l:l>
+      <l:l i="140">n</l:l>
+      <l:l i="140">&#209;</l:l>
+      <l:l i="140">&#241;</l:l>
+      <l:l i="140">&#323;</l:l>
+      <l:l i="140">&#324;</l:l>
+      <l:l i="140">&#325;</l:l>
+      <l:l i="140">&#326;</l:l>
+      <l:l i="140">&#327;</l:l>
+      <l:l i="140">&#328;</l:l>
+      <l:l i="140">&#413;</l:l>
+      <l:l i="140">&#626;</l:l>
+      <l:l i="140">&#414;</l:l>
+      <l:l i="140">&#544;</l:l>
+      <l:l i="140">&#459;</l:l>
+      <l:l i="140">&#504;</l:l>
+      <l:l i="140">&#505;</l:l>
+      <l:l i="140">&#565;</l:l>
+      <l:l i="140">&#627;</l:l>
+      <l:l i="140">&#7748;</l:l>
+      <l:l i="140">&#7749;</l:l>
+      <l:l i="140">&#7750;</l:l>
+      <l:l i="140">&#7751;</l:l>
+      <l:l i="140">&#7752;</l:l>
+      <l:l i="140">&#7753;</l:l>
+      <l:l i="140">&#7754;</l:l>
+      <l:l i="140">&#7755;</l:l>
+      <l:l i="150">O</l:l>
+      <l:l i="150">o</l:l>
+      <l:l i="150">&#210;</l:l>
+      <l:l i="150">&#242;</l:l>
+      <l:l i="150">&#211;</l:l>
+      <l:l i="150">&#243;</l:l>
+      <l:l i="150">&#212;</l:l>
+      <l:l i="150">&#244;</l:l>
+      <l:l i="150">&#213;</l:l>
+      <l:l i="150">&#245;</l:l>
+      <l:l i="150">&#214;</l:l>
+      <l:l i="150">&#246;</l:l>
+      <l:l i="150">&#216;</l:l>
+      <l:l i="150">&#248;</l:l>
+      <l:l i="150">&#332;</l:l>
+      <l:l i="150">&#333;</l:l>
+      <l:l i="150">&#334;</l:l>
+      <l:l i="150">&#335;</l:l>
+      <l:l i="150">&#336;</l:l>
+      <l:l i="150">&#337;</l:l>
+      <l:l i="150">&#415;</l:l>
+      <l:l i="150">&#416;</l:l>
+      <l:l i="150">&#417;</l:l>
+      <l:l i="150">&#465;</l:l>
+      <l:l i="150">&#466;</l:l>
+      <l:l i="150">&#490;</l:l>
+      <l:l i="150">&#491;</l:l>
+      <l:l i="150">&#492;</l:l>
+      <l:l i="150">&#493;</l:l>
+      <l:l i="150">&#510;</l:l>
+      <l:l i="150">&#511;</l:l>
+      <l:l i="150">&#524;</l:l>
+      <l:l i="150">&#525;</l:l>
+      <l:l i="150">&#526;</l:l>
+      <l:l i="150">&#527;</l:l>
+      <l:l i="150">&#554;</l:l>
+      <l:l i="150">&#555;</l:l>
+      <l:l i="150">&#556;</l:l>
+      <l:l i="150">&#557;</l:l>
+      <l:l i="150">&#558;</l:l>
+      <l:l i="150">&#559;</l:l>
+      <l:l i="150">&#560;</l:l>
+      <l:l i="150">&#561;</l:l>
+      <l:l i="150">&#7756;</l:l>
+      <l:l i="150">&#7757;</l:l>
+      <l:l i="150">&#7758;</l:l>
+      <l:l i="150">&#7759;</l:l>
+      <l:l i="150">&#7760;</l:l>
+      <l:l i="150">&#7761;</l:l>
+      <l:l i="150">&#7762;</l:l>
+      <l:l i="150">&#7763;</l:l>
+      <l:l i="150">&#7884;</l:l>
+      <l:l i="150">&#7885;</l:l>
+      <l:l i="150">&#7886;</l:l>
+      <l:l i="150">&#7887;</l:l>
+      <l:l i="150">&#7888;</l:l>
+      <l:l i="150">&#7889;</l:l>
+      <l:l i="150">&#7890;</l:l>
+      <l:l i="150">&#7891;</l:l>
+      <l:l i="150">&#7892;</l:l>
+      <l:l i="150">&#7893;</l:l>
+      <l:l i="150">&#7894;</l:l>
+      <l:l i="150">&#7895;</l:l>
+      <l:l i="150">&#7896;</l:l>
+      <l:l i="150">&#7897;</l:l>
+      <l:l i="150">&#7898;</l:l>
+      <l:l i="150">&#7899;</l:l>
+      <l:l i="150">&#7900;</l:l>
+      <l:l i="150">&#7901;</l:l>
+      <l:l i="150">&#7902;</l:l>
+      <l:l i="150">&#7903;</l:l>
+      <l:l i="150">&#7904;</l:l>
+      <l:l i="150">&#7905;</l:l>
+      <l:l i="150">&#7906;</l:l>
+      <l:l i="150">&#7907;</l:l>
+      <l:l i="160">P</l:l>
+      <l:l i="160">p</l:l>
+      <l:l i="160">&#420;</l:l>
+      <l:l i="160">&#421;</l:l>
+      <l:l i="160">&#7764;</l:l>
+      <l:l i="160">&#7765;</l:l>
+      <l:l i="160">&#7766;</l:l>
+      <l:l i="160">&#7767;</l:l>
+      <l:l i="170">Q</l:l>
+      <l:l i="170">q</l:l>
+      <l:l i="170">&#672;</l:l>
+      <l:l i="180">R</l:l>
+      <l:l i="180">r</l:l>
+      <l:l i="180">&#340;</l:l>
+      <l:l i="180">&#341;</l:l>
+      <l:l i="180">&#342;</l:l>
+      <l:l i="180">&#343;</l:l>
+      <l:l i="180">&#344;</l:l>
+      <l:l i="180">&#345;</l:l>
+      <l:l i="180">&#528;</l:l>
+      <l:l i="180">&#529;</l:l>
+      <l:l i="180">&#530;</l:l>
+      <l:l i="180">&#531;</l:l>
+      <l:l i="180">&#636;</l:l>
+      <l:l i="180">&#637;</l:l>
+      <l:l i="180">&#638;</l:l>
+      <l:l i="180">&#7768;</l:l>
+      <l:l i="180">&#7769;</l:l>
+      <l:l i="180">&#7770;</l:l>
+      <l:l i="180">&#7771;</l:l>
+      <l:l i="180">&#7772;</l:l>
+      <l:l i="180">&#7773;</l:l>
+      <l:l i="180">&#7774;</l:l>
+      <l:l i="180">&#7775;</l:l>
+      <l:l i="190">S</l:l>
+      <l:l i="190">s</l:l>
+      <l:l i="190">&#346;</l:l>
+      <l:l i="190">&#347;</l:l>
+      <l:l i="190">&#348;</l:l>
+      <l:l i="190">&#349;</l:l>
+      <l:l i="190">&#350;</l:l>
+      <l:l i="190">&#351;</l:l>
+      <l:l i="190">&#352;</l:l>
+      <l:l i="190">&#353;</l:l>
+      <l:l i="190">&#536;</l:l>
+      <l:l i="190">&#537;</l:l>
+      <l:l i="190">&#642;</l:l>
+      <l:l i="190">&#7776;</l:l>
+      <l:l i="190">&#7777;</l:l>
+      <l:l i="190">&#7778;</l:l>
+      <l:l i="190">&#7779;</l:l>
+      <l:l i="190">&#7780;</l:l>
+      <l:l i="190">&#7781;</l:l>
+      <l:l i="190">&#7782;</l:l>
+      <l:l i="190">&#7783;</l:l>
+      <l:l i="190">&#7784;</l:l>
+      <l:l i="190">&#7785;</l:l>
+      <l:l i="200">T</l:l>
+      <l:l i="200">t</l:l>
+      <l:l i="200">&#354;</l:l>
+      <l:l i="200">&#355;</l:l>
+      <l:l i="200">&#356;</l:l>
+      <l:l i="200">&#357;</l:l>
+      <l:l i="200">&#358;</l:l>
+      <l:l i="200">&#359;</l:l>
+      <l:l i="200">&#427;</l:l>
+      <l:l i="200">&#428;</l:l>
+      <l:l i="200">&#429;</l:l>
+      <l:l i="200">&#430;</l:l>
+      <l:l i="200">&#648;</l:l>
+      <l:l i="200">&#538;</l:l>
+      <l:l i="200">&#539;</l:l>
+      <l:l i="200">&#566;</l:l>
+      <l:l i="200">&#7786;</l:l>
+      <l:l i="200">&#7787;</l:l>
+      <l:l i="200">&#7788;</l:l>
+      <l:l i="200">&#7789;</l:l>
+      <l:l i="200">&#7790;</l:l>
+      <l:l i="200">&#7791;</l:l>
+      <l:l i="200">&#7792;</l:l>
+      <l:l i="200">&#7793;</l:l>
+      <l:l i="200">&#7831;</l:l>
+      <l:l i="210">U</l:l>
+      <l:l i="210">u</l:l>
+      <l:l i="210">&#217;</l:l>
+      <l:l i="210">&#249;</l:l>
+      <l:l i="210">&#218;</l:l>
+      <l:l i="210">&#250;</l:l>
+      <l:l i="210">&#219;</l:l>
+      <l:l i="210">&#251;</l:l>
+      <l:l i="210">&#220;</l:l>
+      <l:l i="210">&#252;</l:l>
+      <l:l i="210">&#360;</l:l>
+      <l:l i="210">&#361;</l:l>
+      <l:l i="210">&#362;</l:l>
+      <l:l i="210">&#363;</l:l>
+      <l:l i="210">&#364;</l:l>
+      <l:l i="210">&#365;</l:l>
+      <l:l i="210">&#366;</l:l>
+      <l:l i="210">&#367;</l:l>
+      <l:l i="210">&#368;</l:l>
+      <l:l i="210">&#369;</l:l>
+      <l:l i="210">&#370;</l:l>
+      <l:l i="210">&#371;</l:l>
+      <l:l i="210">&#431;</l:l>
+      <l:l i="210">&#432;</l:l>
+      <l:l i="210">&#467;</l:l>
+      <l:l i="210">&#468;</l:l>
+      <l:l i="210">&#469;</l:l>
+      <l:l i="210">&#470;</l:l>
+      <l:l i="210">&#471;</l:l>
+      <l:l i="210">&#472;</l:l>
+      <l:l i="210">&#473;</l:l>
+      <l:l i="210">&#474;</l:l>
+      <l:l i="210">&#475;</l:l>
+      <l:l i="210">&#476;</l:l>
+      <l:l i="210">&#532;</l:l>
+      <l:l i="210">&#533;</l:l>
+      <l:l i="210">&#534;</l:l>
+      <l:l i="210">&#535;</l:l>
+      <l:l i="210">&#7794;</l:l>
+      <l:l i="210">&#7795;</l:l>
+      <l:l i="210">&#7796;</l:l>
+      <l:l i="210">&#7797;</l:l>
+      <l:l i="210">&#7798;</l:l>
+      <l:l i="210">&#7799;</l:l>
+      <l:l i="210">&#7800;</l:l>
+      <l:l i="210">&#7801;</l:l>
+      <l:l i="210">&#7802;</l:l>
+      <l:l i="210">&#7803;</l:l>
+      <l:l i="210">&#7908;</l:l>
+      <l:l i="210">&#7909;</l:l>
+      <l:l i="210">&#7910;</l:l>
+      <l:l i="210">&#7911;</l:l>
+      <l:l i="210">&#7912;</l:l>
+      <l:l i="210">&#7913;</l:l>
+      <l:l i="210">&#7914;</l:l>
+      <l:l i="210">&#7915;</l:l>
+      <l:l i="210">&#7916;</l:l>
+      <l:l i="210">&#7917;</l:l>
+      <l:l i="210">&#7918;</l:l>
+      <l:l i="210">&#7919;</l:l>
+      <l:l i="210">&#7920;</l:l>
+      <l:l i="210">&#7921;</l:l>
+      <l:l i="220">V</l:l>
+      <l:l i="220">v</l:l>
+      <l:l i="220">&#434;</l:l>
+      <l:l i="220">&#651;</l:l>
+      <l:l i="220">&#7804;</l:l>
+      <l:l i="220">&#7805;</l:l>
+      <l:l i="220">&#7806;</l:l>
+      <l:l i="220">&#7807;</l:l>
+      <l:l i="230">W</l:l>
+      <l:l i="230">w</l:l>
+      <l:l i="230">&#372;</l:l>
+      <l:l i="230">&#373;</l:l>
+      <l:l i="230">&#7808;</l:l>
+      <l:l i="230">&#7809;</l:l>
+      <l:l i="230">&#7810;</l:l>
+      <l:l i="230">&#7811;</l:l>
+      <l:l i="230">&#7812;</l:l>
+      <l:l i="230">&#7813;</l:l>
+      <l:l i="230">&#7814;</l:l>
+      <l:l i="230">&#7815;</l:l>
+      <l:l i="230">&#7816;</l:l>
+      <l:l i="230">&#7817;</l:l>
+      <l:l i="230">&#7832;</l:l>
+      <l:l i="240">X</l:l>
+      <l:l i="240">x</l:l>
+      <l:l i="240">&#7818;</l:l>
+      <l:l i="240">&#7819;</l:l>
+      <l:l i="240">&#7820;</l:l>
+      <l:l i="240">&#7821;</l:l>
+      <l:l i="250">Y</l:l>
+      <l:l i="250">y</l:l>
+      <l:l i="250">&#221;</l:l>
+      <l:l i="250">&#253;</l:l>
+      <l:l i="250">&#255;</l:l>
+      <l:l i="250">&#376;</l:l>
+      <l:l i="250">&#374;</l:l>
+      <l:l i="250">&#375;</l:l>
+      <l:l i="250">&#435;</l:l>
+      <l:l i="250">&#436;</l:l>
+      <l:l i="250">&#562;</l:l>
+      <l:l i="250">&#563;</l:l>
+      <l:l i="250">&#7822;</l:l>
+      <l:l i="250">&#7823;</l:l>
+      <l:l i="250">&#7833;</l:l>
+      <l:l i="250">&#7922;</l:l>
+      <l:l i="250">&#7923;</l:l>
+      <l:l i="250">&#7924;</l:l>
+      <l:l i="250">&#7925;</l:l>
+      <l:l i="250">&#7926;</l:l>
+      <l:l i="250">&#7927;</l:l>
+      <l:l i="250">&#7928;</l:l>
+      <l:l i="250">&#7929;</l:l>
+      <l:l i="260">Z</l:l>
+      <l:l i="260">z</l:l>
+      <l:l i="260">&#377;</l:l>
+      <l:l i="260">&#378;</l:l>
+      <l:l i="260">&#379;</l:l>
+      <l:l i="260">&#380;</l:l>
+      <l:l i="260">&#381;</l:l>
+      <l:l i="260">&#382;</l:l>
+      <l:l i="260">&#437;</l:l>
+      <l:l i="260">&#438;</l:l>
+      <l:l i="260">&#548;</l:l>
+      <l:l i="260">&#549;</l:l>
+      <l:l i="260">&#656;</l:l>
+      <l:l i="260">&#657;</l:l>
+      <l:l i="260">&#7824;</l:l>
+      <l:l i="260">&#7825;</l:l>
+      <l:l i="260">&#7826;</l:l>
+      <l:l i="260">&#7827;</l:l>
+      <l:l i="260">&#7828;</l:l>
+      <l:l i="260">&#7829;</l:l>
+   </l:letters>
+</l:l10n>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/autoidx-ng.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/autoidx-ng.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/autoidx-ng.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,135 @@
+<?xml version="1.0"?>
+<!DOCTYPE xsl:stylesheet [
+<!ENTITY primary   'normalize-space(concat(primary/@sortas, primary[not(@sortas)]))'>
+]>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                version="1.0"
+                xmlns:func="http://exslt.org/functions"
+                xmlns:exslt="http://exslt.org/common"
+                xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0"
+                extension-element-prefixes="func exslt"
+                exclude-result-prefixes="func exslt i l"
+                xmlns:i="urn:cz-kosek:functions:index">
+
+<!-- ********************************************************************
+     $Id: autoidx-ng.xsl,v 1.1.1.1 2004/10/19 21:21:36 juntao Exp $
+     ********************************************************************
+
+     This file is part of the DocBook XSL Stylesheet distribution.
+     See ../README or http://docbook.sf.net/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- Returns index group code for given term  -->
+<func:function name="i:group-index">
+  <xsl:param name="term"/>
+  
+  <xsl:variable name="letters-rtf">
+    <xsl:variable name="lang">
+      <xsl:call-template name="l10n.language"/>
+    </xsl:variable>
+    
+    <xsl:variable name="local.l10n.letters"
+      select="($local.l10n.xml//l:i18n/l:l10n[@language=$lang]/l:letters)[1]"/>
+    
+    <xsl:variable name="l10n.letters"
+      select="($l10n.xml/l:i18n/l:l10n[@language=$lang]/l:letters)[1]"/>
+    
+    <xsl:choose>
+      <xsl:when test="count($local.l10n.letters) &gt; 0">
+        <xsl:copy-of select="$local.l10n.letters"/>
+      </xsl:when>
+      <xsl:when test="count($l10n.letters) &gt; 0">
+        <xsl:copy-of select="$l10n.letters"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:message>
+          <xsl:text>No "</xsl:text>
+          <xsl:value-of select="$lang"/>
+          <xsl:text>" localization of index grouping letters exists</xsl:text>
+          <xsl:choose>
+            <xsl:when test="$lang = 'en'">
+              <xsl:text>.</xsl:text>
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:text>; using "en".</xsl:text>
+            </xsl:otherwise>
+          </xsl:choose>
+        </xsl:message>
+        
+        <xsl:copy-of select="($l10n.xml/l:i18n/l:l10n[@language='en']/l:letters)[1]"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+  
+  <xsl:variable name="letters" select="exslt:node-set($letters-rtf)/*"/>
+  
+  <xsl:variable name="long-letter-index" select="$letters/l:l[. = substring($term,1,2)]/@i"/>
+  <xsl:variable name="short-letter-index" select="$letters/l:l[. = substring($term,1,1)]/@i"/>
+  <xsl:variable name="letter-index">
+    <xsl:choose>
+      <xsl:when test="$long-letter-index">
+        <xsl:value-of select="$long-letter-index"/>
+      </xsl:when>
+      <xsl:when test="$short-letter-index">
+        <xsl:value-of select="$short-letter-index"/>
+      </xsl:when>
+      <xsl:otherwise>0</xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+  <func:result select="number($letter-index)"/>
+</func:function>
+
+<!-- Return index group letter for given group code -->
+<func:function name="i:group-letter">
+  <xsl:param name="index"/>
+
+  <xsl:variable name="letters-rtf">
+    <xsl:variable name="lang">
+      <xsl:call-template name="l10n.language"/>
+    </xsl:variable>
+    
+    <xsl:variable name="local.l10n.letters"
+      select="($local.l10n.xml//l:i18n/l:l10n[@language=$lang]/l:letters)[1]"/>
+    
+    <xsl:variable name="l10n.letters"
+      select="($l10n.xml/l:i18n/l:l10n[@language=$lang]/l:letters)[1]"/>
+    
+    <xsl:choose>
+      <xsl:when test="count($local.l10n.letters) &gt; 0">
+        <xsl:copy-of select="$local.l10n.letters"/>
+      </xsl:when>
+      <xsl:when test="count($l10n.letters) &gt; 0">
+        <xsl:copy-of select="$l10n.letters"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:message>
+          <xsl:text>No "</xsl:text>
+          <xsl:value-of select="$lang"/>
+          <xsl:text>" localization of index grouping letters exists</xsl:text>
+          <xsl:choose>
+            <xsl:when test="$lang = 'en'">
+              <xsl:text>.</xsl:text>
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:text>; using "en".</xsl:text>
+            </xsl:otherwise>
+          </xsl:choose>
+        </xsl:message>
+        
+        <xsl:copy-of select="($l10n.xml/l:i18n/l:l10n[@language='en']/l:letters)[1]"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+  
+  <xsl:variable name="letters" select="exslt:node-set($letters-rtf)/*"/>
+  
+  <func:result select="$letters/l:l[@i=$index][1]"/>
+</func:function>
+
+<xsl:key name="group-code"
+         match="indexterm"
+         use="i:group-index(&primary;)"/>
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/bg.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/bg.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/bg.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1153 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="bg" english-language-name="Bulgarian">
+
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+   <l:gentext key="Abstract" text="&#1040;&#1085;&#1086;&#1090;&#1072;&#1094;&#1080;&#1103;"/>
+   <l:gentext key="abstract" text="&#1040;&#1085;&#1086;&#1090;&#1072;&#1094;&#1080;&#1103;"/>
+   <l:gentext key="Answer" text="&#1054;:"/>
+   <l:gentext key="answer" text="&#1054;:"/>
+   <l:gentext key="Appendix" text="&#1055;&#1088;&#1080;&#1083;&#1086;&#1078;&#1077;&#1085;&#1080;&#1077;"/>
+   <l:gentext key="appendix" text="&#1087;&#1088;&#1080;&#1083;&#1086;&#1078;&#1077;&#1085;&#1080;&#1077;"/>
+   <l:gentext key="Article" text="&#1057;&#1090;&#1072;&#1090;&#1080;&#1103;"/>
+   <l:gentext key="article" text="&#1057;&#1090;&#1072;&#1090;&#1080;&#1103;"/>
+   <l:gentext key="Bibliography" text="&#1051;&#1080;&#1090;&#1077;&#1088;&#1072;&#1090;&#1091;&#1088;&#1072;"/>
+   <l:gentext key="bibliography" text="&#1051;&#1080;&#1090;&#1077;&#1088;&#1072;&#1090;&#1091;&#1088;&#1072;"/>
+   <l:gentext key="Book" text="&#1050;&#1085;&#1080;&#1075;&#1072;"/>
+   <l:gentext key="book" text="&#1050;&#1085;&#1080;&#1075;&#1072;"/>
+   <l:gentext key="CAUTION" text="&#1042;&#1053;&#1048;&#1052;&#1040;&#1053;&#1048;&#1045;"/>
+   <l:gentext key="Caution" text="&#1042;&#1085;&#1080;&#1084;&#1072;&#1085;&#1080;&#1077;"/>
+   <l:gentext key="caution" text="&#1042;&#1085;&#1080;&#1084;&#1072;&#1085;&#1080;&#1077;"/>
+   <l:gentext key="Chapter" text="&#1043;&#1083;&#1072;&#1074;&#1072;"/>
+   <l:gentext key="chapter" text="&#1075;&#1083;&#1072;&#1074;&#1072;"/>
+   <l:gentext key="Colophon" text="Colophon"/>
+   <l:gentext key="colophon" text="Colophon"/>
+   <l:gentext key="Copyright" text="Copyright"/>
+   <l:gentext key="copyright" text="Copyright"/>
+   <l:gentext key="Dedication" text="&#1055;&#1086;&#1089;&#1074;&#1077;&#1097;&#1077;&#1085;&#1080;&#1077;"/>
+   <l:gentext key="dedication" text="&#1055;&#1086;&#1089;&#1074;&#1077;&#1097;&#1077;&#1085;&#1080;&#1077;"/>
+   <l:gentext key="Edition" text="&#1048;&#1079;&#1076;&#1072;&#1085;&#1080;&#1077;"/>
+   <l:gentext key="edition" text="&#1048;&#1079;&#1076;&#1072;&#1085;&#1080;&#1077;"/>
+   <l:gentext key="Equation" text="&#1060;&#1086;&#1088;&#1084;&#1091;&#1083;&#1072;"/>
+   <l:gentext key="equation" text="&#1060;&#1086;&#1088;&#1084;&#1091;&#1083;&#1072;"/>
+   <l:gentext key="Example" text="&#1055;&#1088;&#1080;&#1084;&#1077;&#1088;"/>
+   <l:gentext key="example" text="&#1055;&#1088;&#1080;&#1084;&#1077;&#1088;"/>
+   <l:gentext key="Figure" text="&#1060;&#1080;&#1075;&#1091;&#1088;&#1072;"/>
+   <l:gentext key="figure" text="&#1060;&#1080;&#1075;&#1091;&#1088;&#1072;"/>
+   <l:gentext key="Glossary" text="&#1058;&#1077;&#1088;&#1084;&#1080;&#1085;&#1086;&#1083;&#1086;&#1075;&#1080;&#1095;&#1077;&#1085; &#1088;&#1077;&#1095;&#1085;&#1080;&#1082;"/>
+   <l:gentext key="glossary" text="&#1058;&#1077;&#1088;&#1084;&#1080;&#1085;&#1086;&#1083;&#1086;&#1075;&#1080;&#1095;&#1077;&#1085; &#1088;&#1077;&#1095;&#1085;&#1080;&#1082;"/>
+   <l:gentext key="GlossSee" text="&#1074;&#1078;."/>
+   <l:gentext key="glosssee" text="&#1074;&#1078;."/>
+   <l:gentext key="GlossSeeAlso" text="&#1074;&#1078;. &#1089;&#1098;&#1097;&#1086;"/>
+   <l:gentext key="glossseealso" text="&#1074;&#1078;. &#1089;&#1098;&#1097;&#1086;"/>
+   <l:gentext key="IMPORTANT" text="&#1042;&#1040;&#1046;&#1053;&#1054;"/>
+   <l:gentext key="important" text="&#1042;&#1072;&#1078;&#1085;&#1086;"/>
+   <l:gentext key="Important" text="&#1042;&#1072;&#1078;&#1085;&#1086;"/>
+   <l:gentext key="Index" text="&#1048;&#1085;&#1076;&#1077;&#1082;&#1089;"/>
+   <l:gentext key="index" text="&#1048;&#1085;&#1076;&#1077;&#1082;&#1089;"/>
+   <l:gentext key="ISBN" text="ISBN"/>
+   <l:gentext key="isbn" text="ISBN"/>
+   <l:gentext key="LegalNotice" text="&#1040;&#1074;&#1090;&#1086;&#1088;&#1089;&#1082;&#1080; &#1087;&#1088;&#1072;&#1074;&#1072;"/>
+   <l:gentext key="legalnotice" text="&#1040;&#1074;&#1090;&#1086;&#1088;&#1089;&#1082;&#1080; &#1087;&#1088;&#1072;&#1074;&#1072;"/>
+   <l:gentext key="MsgAud" text="Audience"/>
+   <l:gentext key="msgaud" text="Audience"/>
+   <l:gentext key="MsgLevel" text="&#1053;&#1080;&#1074;&#1086;"/>
+   <l:gentext key="msglevel" text="&#1053;&#1080;&#1074;&#1086;"/>
+   <l:gentext key="MsgOrig" text="&#1048;&#1079;&#1090;&#1086;&#1095;&#1085;&#1080;&#1082;"/>
+   <l:gentext key="msgorig" text="&#1048;&#1079;&#1090;&#1086;&#1095;&#1085;&#1080;&#1082;"/>
+   <l:gentext key="NOTE" text="&#1047;&#1040;&#1041;&#1045;&#1051;&#1045;&#1046;&#1050;&#1040;"/>
+   <l:gentext key="Note" text="&#1047;&#1072;&#1073;&#1077;&#1083;&#1077;&#1078;&#1082;&#1072;"/>
+   <l:gentext key="note" text="&#1047;&#1072;&#1073;&#1077;&#1083;&#1077;&#1078;&#1082;&#1072;"/>
+   <l:gentext key="Part" text="&#1063;&#1072;&#1089;&#1090;"/>
+   <l:gentext key="part" text="&#1063;&#1072;&#1089;&#1090;"/>
+   <l:gentext key="Preface" text="&#1055;&#1088;&#1077;&#1076;&#1075;&#1086;&#1074;&#1086;&#1088;"/>
+   <l:gentext key="preface" text="&#1055;&#1088;&#1077;&#1076;&#1075;&#1086;&#1074;&#1086;&#1088;"/>
+   <l:gentext key="Procedure" text="&#1055;&#1088;&#1086;&#1094;&#1077;&#1076;&#1091;&#1088;&#1072;"/>
+   <l:gentext key="procedure" text="&#1055;&#1088;&#1086;&#1094;&#1077;&#1076;&#1091;&#1088;&#1072;"/>
+   <l:gentext key="ProductionSet" text="Production"/>
+   <l:gentext key="PubDate" text="&#1044;&#1072;&#1090;&#1072; &#1085;&#1072; &#1080;&#1079;&#1076;&#1072;&#1074;&#1072;&#1085;&#1077;"/>
+   <l:gentext key="pubdate" text="&#1044;&#1072;&#1090;&#1072; &#1085;&#1072; &#1080;&#1079;&#1076;&#1072;&#1074;&#1072;&#1085;&#1077;"/>
+   <l:gentext key="Published" text="&#1048;&#1079;&#1076;&#1072;&#1076;&#1077;&#1085;"/>
+   <l:gentext key="published" text="&#1048;&#1079;&#1076;&#1072;&#1076;&#1077;&#1085;"/>
+   <l:gentext key="Qandadiv" text="&#1042;&#1098;&#1087;&#1088;&#1086;&#1089;&#1080; &#1080; &#1086;&#1090;&#1075;&#1086;&#1074;&#1086;&#1088;&#1080;"/>
+   <l:gentext key="qandadiv" text="&#1042;&#1098;&#1087;&#1088;&#1086;&#1089;&#1080; &#1080; &#1086;&#1090;&#1075;&#1086;&#1074;&#1086;&#1088;&#1080;"/>
+   <l:gentext key="Question" text="&#1042;:"/>
+   <l:gentext key="question" text="&#1042;:"/>
+   <l:gentext key="RefEntry" text=""/>
+   <l:gentext key="refentry" text=""/>
+   <l:gentext key="Reference" text="&#1057;&#1087;&#1088;&#1072;&#1074;&#1086;&#1095;&#1085;&#1080;&#1082;"/>
+   <l:gentext key="reference" text="&#1057;&#1087;&#1088;&#1072;&#1074;&#1086;&#1095;&#1085;&#1080;&#1082;"/>
+   <l:gentext key="RefName" text="&#1053;&#1072;&#1079;&#1074;&#1072;&#1085;&#1080;&#1077;"/>
+   <l:gentext key="refname" text="&#1053;&#1072;&#1079;&#1074;&#1072;&#1085;&#1080;&#1077;"/>
+   <l:gentext key="RefSection" text=""/>
+   <l:gentext key="refsection" text=""/>
+   <l:gentext key="RefSynopsisDiv" text="&#1057;&#1080;&#1085;&#1090;&#1072;&#1082;&#1089;&#1080;&#1089;"/>
+   <l:gentext key="refsynopsisdiv" text="&#1057;&#1080;&#1085;&#1090;&#1072;&#1082;&#1089;&#1080;&#1089;"/>
+   <l:gentext key="RevHistory" text="&#1055;&#1088;&#1086;&#1084;&#1077;&#1085;&#1080;"/>
+   <l:gentext key="revhistory" text="&#1055;&#1088;&#1086;&#1084;&#1077;&#1085;&#1080;"/>
+   <l:gentext key="revision" text="&#1048;&#1079;&#1076;&#1072;&#1085;&#1080;&#1077;"/>
+   <l:gentext key="Revision" text="&#1048;&#1079;&#1076;&#1072;&#1085;&#1080;&#1077;"/>
+   <l:gentext key="sect1" text="&#1056;&#1072;&#1079;&#1076;&#1077;&#1083;"/>
+   <l:gentext key="sect2" text="&#1056;&#1072;&#1079;&#1076;&#1077;&#1083;"/>
+   <l:gentext key="sect3" text="&#1056;&#1072;&#1079;&#1076;&#1077;&#1083;"/>
+   <l:gentext key="sect4" text="&#1056;&#1072;&#1079;&#1076;&#1077;&#1083;"/>
+   <l:gentext key="sect5" text="&#1056;&#1072;&#1079;&#1076;&#1077;&#1083;"/>
+   <l:gentext key="section" text="&#1056;&#1072;&#1079;&#1076;&#1077;&#1083;"/>
+   <l:gentext key="Section" text="&#1056;&#1072;&#1079;&#1076;&#1077;&#1083;"/>
+   <l:gentext key="see" text="&#1074;&#1078;."/>
+   <l:gentext key="See" text="&#1042;&#1078;."/>
+   <l:gentext key="seealso" text="&#1074;&#1078;. &#1089;&#1098;&#1097;&#1086;"/>
+   <l:gentext key="Seealso" text="&#1042;&#1078;. &#1089;&#1098;&#1097;&#1086;"/>
+   <l:gentext key="SeeAlso" text="&#1042;&#1078;. &#1089;&#1098;&#1097;&#1086;"/>
+   <l:gentext key="set" text="&#1059;&#1082;&#1072;&#1079;&#1072;&#1090;&#1077;&#1083;"/>
+   <l:gentext key="Set" text="&#1059;&#1082;&#1072;&#1079;&#1072;&#1090;&#1077;&#1083;"/>
+   <l:gentext key="setindex" text="&#1059;&#1082;&#1072;&#1079;&#1072;&#1090;&#1077;&#1083;"/>
+   <l:gentext key="SetIndex" text="&#1059;&#1082;&#1072;&#1079;&#1072;&#1090;&#1077;&#1083;"/>
+   <l:gentext key="Sidebar" text="&#1056;&#1072;&#1079;&#1076;&#1077;&#1083;&#1080;&#1090;&#1077;&#1083;"/>
+   <l:gentext key="sidebar" text="&#1088;&#1072;&#1079;&#1076;&#1077;&#1083;&#1080;&#1090;&#1077;&#1083;"/>
+   <l:gentext key="step" text="&#1057;&#1090;&#1098;&#1087;&#1082;&#1072;"/>
+   <l:gentext key="Step" text="&#1057;&#1090;&#1098;&#1087;&#1082;&#1072;"/>
+   <l:gentext key="Table" text="&#1058;&#1072;&#1073;&#1083;&#1080;&#1094;&#1072;"/>
+   <l:gentext key="table" text="&#1058;&#1072;&#1073;&#1083;&#1080;&#1094;&#1072;"/>
+   <l:gentext key="tip" text="&#1055;&#1086;&#1079;&#1076;&#1089;&#1082;&#1072;&#1079;&#1082;&#1072;"/>
+   <l:gentext key="TIP" text="&#1055;&#1054;&#1044;&#1057;&#1050;&#1040;&#1047;&#1050;&#1040;"/>
+   <l:gentext key="Tip" text="&#1055;&#1086;&#1079;&#1076;&#1089;&#1082;&#1072;&#1079;&#1082;&#1072;"/>
+   <l:gentext key="Warning" text="&#1042;&#1085;&#1080;&#1084;&#1072;&#1085;&#1080;&#1077;"/>
+   <l:gentext key="warning" text="&#1042;&#1085;&#1080;&#1084;&#1072;&#1085;&#1080;&#1077;"/>
+   <l:gentext key="WARNING" text="&#1042;&#1053;&#1048;&#1052;&#1040;&#1053;&#1048;&#1045;"/>
+   <l:gentext key="and" text="and"/>
+   <l:gentext key="by" text="by"/>
+   <l:gentext key="called" text="called"/>
+   <l:gentext key="Edited" text="&#1056;&#1077;&#1076;&#1072;&#1082;&#1090;&#1080;&#1088;&#1072;&#1085;&#1086; &#1086;&#1090;"/>
+   <l:gentext key="edited" text="&#1056;&#1077;&#1076;&#1072;&#1082;&#1090;&#1080;&#1088;&#1072;&#1085;&#1086; &#1086;&#1090;"/>
+   <l:gentext key="Editedby" text="&#1056;&#1077;&#1076;&#1072;&#1082;&#1090;&#1080;&#1088;&#1072;&#1085;&#1086; &#1086;&#1090;"/>
+   <l:gentext key="editedby" text="&#1056;&#1077;&#1076;&#1072;&#1082;&#1090;&#1080;&#1088;&#1072;&#1085;&#1086; &#1086;&#1090;"/>
+   <l:gentext key="in" text="&#1074;"/>
+   <l:gentext key="lastlistcomma" text=","/>
+   <l:gentext key="listcomma" text=","/>
+   <l:gentext key="nonexistantelement" text="non-existant element"/>
+   <l:gentext key="notes" text="&#1047;&#1072;&#1073;&#1077;&#1083;&#1077;&#1078;&#1082;&#1080;"/>
+   <l:gentext key="Notes" text="&#1047;&#1072;&#1073;&#1077;&#1083;&#1077;&#1078;&#1082;&#1080;"/>
+   <l:gentext key="Pgs" text="&#1089;&#1090;&#1088;."/>
+   <l:gentext key="pgs" text="&#1089;&#1090;&#1088;."/>
+   <l:gentext key="Revisedby" text="&#1054;&#1076;&#1086;&#1073;&#1088;&#1077;&#1085;&#1086; &#1086;&#1090;: "/>
+   <l:gentext key="revisedby" text="&#1054;&#1076;&#1086;&#1073;&#1088;&#1077;&#1085;&#1086; &#1086;&#1090;: "/>
+   <l:gentext key="TableNotes" text="&#1047;&#1072;&#1073;&#1077;&#1083;&#1077;&#1078;&#1082;&#1080;"/>
+   <l:gentext key="tablenotes" text="&#1047;&#1072;&#1073;&#1077;&#1083;&#1077;&#1078;&#1082;&#1080;"/>
+   <l:gentext key="TableofContents" text="&#1057;&#1098;&#1076;&#1098;&#1088;&#1078;&#1072;&#1085;&#1080;&#1077;"/>
+   <l:gentext key="tableofcontents" text="&#1057;&#1098;&#1076;&#1098;&#1088;&#1078;&#1072;&#1085;&#1080;&#1077;"/>
+   <l:gentext key="the" text=""/>
+   <l:gentext key="unexpectedelementname" text="unexpected element name"/>
+   <l:gentext key="unsupported" text="unsupported"/>
+   <l:gentext key="xrefto" text="xref to"/>
+   <l:gentext key="listofequations" text="&#1057;&#1087;&#1080;&#1089;&#1098;&#1082; &#1085;&#1072; &#1092;&#1086;&#1088;&#1084;&#1091;&#1083;&#1080;&#1090;&#1077;"/>
+   <l:gentext key="ListofEquations" text="&#1057;&#1087;&#1080;&#1089;&#1098;&#1082; &#1085;&#1072; &#1092;&#1086;&#1088;&#1084;&#1091;&#1083;&#1080;&#1090;&#1077;"/>
+   <l:gentext key="ListofExamples" text="&#1057;&#1087;&#1080;&#1089;&#1098;&#1082; &#1085;&#1072; &#1087;&#1088;&#1080;&#1084;&#1077;&#1088;&#1080;&#1090;&#1077;"/>
+   <l:gentext key="listofexamples" text="&#1057;&#1087;&#1080;&#1089;&#1098;&#1082; &#1085;&#1072; &#1087;&#1088;&#1080;&#1084;&#1077;&#1088;&#1080;&#1090;&#1077;"/>
+   <l:gentext key="ListofFigures" text="&#1057;&#1087;&#1080;&#1089;&#1098;&#1082; &#1085;&#1072; &#1092;&#1080;&#1075;&#1091;&#1088;&#1080;&#1090;&#1077;"/>
+   <l:gentext key="listoffigures" text="&#1057;&#1087;&#1080;&#1089;&#1098;&#1082; &#1085;&#1072; &#1092;&#1080;&#1075;&#1091;&#1088;&#1080;&#1090;&#1077;"/>
+   <l:gentext key="ListofProcedures" text="&#1057;&#1087;&#1080;&#1089;&#1098;&#1082; &#1085;&#1072; &#1087;&#1088;&#1086;&#1094;&#1077;&#1076;&#1091;&#1088;&#1080;&#1090;&#1077;"/>
+   <l:gentext key="listofprocedures" text="&#1057;&#1087;&#1080;&#1089;&#1098;&#1082; &#1085;&#1072; &#1087;&#1088;&#1086;&#1094;&#1077;&#1076;&#1091;&#1088;&#1080;&#1090;&#1077;"/>
+   <l:gentext key="listoftables" text="&#1057;&#1087;&#1080;&#1089;&#1098;&#1082; &#1085;&#1072; &#1090;&#1072;&#1073;&#1083;&#1080;&#1094;&#1080;&#1090;&#1077;"/>
+   <l:gentext key="ListofTables" text="&#1057;&#1087;&#1080;&#1089;&#1098;&#1082; &#1085;&#1072; &#1090;&#1072;&#1073;&#1083;&#1080;&#1094;&#1080;&#1090;&#1077;"/>
+   <l:gentext key="ListofUnknown" text="&#1053;&#1077;&#1086;&#1087;&#1088;&#1077;&#1076;&#1077;&#1083;&#1077;&#1085; &#1089;&#1087;&#1080;&#1089;&#1098;&#1082;"/>
+   <l:gentext key="listofunknown" text="&#1053;&#1077;&#1086;&#1087;&#1088;&#1077;&#1076;&#1077;&#1083;&#1077;&#1085; &#1089;&#1087;&#1080;&#1089;&#1098;&#1082;"/>
+   <l:gentext key="nav-home" text="&#1053;&#1072;&#1095;&#1072;&#1083;&#1086;"/>
+   <l:gentext key="nav-next" text="&#1057;&#1083;&#1077;&#1076;&#1074;&#1072;&#1097;&#1072; &#1089;&#1090;&#1088;&#1072;&#1085;&#1080;&#1094;&#1072;"/>
+   <l:gentext key="nav-next-sibling" text="&#1057;&#1083;&#1077;&#1076;&#1074;&#1072;&#1097; &#1088;&#1072;&#1079;&#1076;&#1077;&#1083;"/>
+   <l:gentext key="nav-prev" text="&#1055;&#1088;&#1077;&#1076;&#1080;&#1096;&#1085;&#1072; &#1089;&#1090;&#1088;&#1072;&#1085;&#1080;&#1094;&#1072;"/>
+   <l:gentext key="nav-prev-sibling" text="&#1055;&#1088;&#1077;&#1076;&#1080;&#1096;&#1077;&#1085; &#1088;&#1072;&#1079;&#1076;&#1077;&#1083;"/>
+   <l:gentext key="nav-up" text="&#1053;&#1072;&#1095;&#1072;&#1083;&#1086; &#1085;&#1072; &#1088;&#1072;&#1079;&#1076;&#1077;&#1083;&#1072;"/>
+   <l:gentext key="nav-toc" text="&#1057;&#1098;&#1076;&#1098;&#1088;&#1078;&#1072;&#1085;&#1080;&#1077;"/>
+   <l:gentext key="Draft" text="&#1063;&#1077;&#1088;&#1085;&#1086;&#1074;&#1072;"/>
+   <l:gentext key="above" text="&#1087;&#1086;-&#1075;&#1086;&#1088;&#1077;"/>
+   <l:gentext key="below" text="&#1087;&#1086;-&#1076;&#1086;&#1083;&#1091;"/>
+   <l:gentext key="sectioncalled" text="the section called"/>
+   <l:gentext key="index symbols" text="&#1057;&#1080;&#1084;&#1074;&#1086;&#1083;&#1080;"/>
+   <l:gentext key="lowercase.alpha" text="&#1072;&#1073;&#1074;&#1075;&#1076;&#1077;&#1078;&#1079;&#1080;&#1081;&#1082;&#1083;&#1084;&#1085;&#1086;&#1087;&#1088;&#1089;&#1090;&#1091;&#1092;&#1093;&#1094;&#1095;&#1096;&#1097;&#1098;&#1099;&#1100;&#1101;&#1102;&#1103;"/>
+   <l:gentext key="uppercase.alpha" text="&#1040;&#1041;&#1042;&#1043;&#1044;&#1045;&#1046;&#1047;&#1048;&#1049;&#1050;&#1051;&#1052;&#1053;&#1054;&#1055;&#1056;&#1057;&#1058;&#1059;&#1060;&#1061;&#1062;&#1063;&#1064;&#1065;&#1066;&#1067;&#1068;&#1069;&#1070;&#1071;"/>
+   <l:dingbat key="startquote" text="&#8222;"/>
+   <l:dingbat key="endquote" text="&#8220;"/>
+   <l:dingbat key="nestedstartquote" text="&#8216;"/>
+   <l:dingbat key="nestedendquote" text="&#8217;"/>
+   <l:dingbat key="singlestartquote" text="&#8216;"/>
+   <l:dingbat key="singleendquote" text="&#8217;"/>
+   <l:dingbat key="bullet" text="&#8226;"/>
+   <l:gentext key="hyphenation-character" text="-"/>
+   <l:gentext key="hyphenation-push-character-count" text="2"/>
+   <l:gentext key="hyphenation-remain-character-count" text="2"/>
+
+   <l:context name="styles">
+      <l:template name="person-name" text="first-last"/>
+   </l:context>
+
+   <l:context name="title">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="%t"/>
+      <l:template name="appendix" text="&#1055;&#1088;&#1080;&#1083;&#1086;&#1078;&#1077;&#1085;&#1080;&#1077;&#160;%n.&#160;%t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="biblioentry" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliolist" text="%t" lang="en"/>
+      <l:template name="bibliomixed" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="&#1043;&#1083;&#1072;&#1074;&#1072;&#160;%n.&#160;%t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="&#1060;&#1086;&#1088;&#1084;&#1091;&#1083;&#1072;&#160;%n.&#160;%t"/>
+      <l:template name="example" text="&#1055;&#1088;&#1080;&#1084;&#1077;&#1088;&#160;%n.&#160;%t"/>
+      <l:template name="figure" text="&#1060;&#1080;&#1075;&#1091;&#1088;&#1072;&#160;%n.&#160;%t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="glosslist" text="%t" lang="en"/>
+      <l:template name="glossentry" text="%t"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text=""/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="&#1063;&#1072;&#1089;&#1090;&#160;%n.&#160;%t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="procedure.formal" text="&#1055;&#1088;&#1086;&#1094;&#1077;&#1076;&#1091;&#1088;&#1072;&#160;%n.&#160;%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="productionset.formal" text="Production&#160;%n"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="%t"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="%t"/>
+      <l:template name="refentry" text="%t"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsection" text="%t"/>
+      <l:template name="refsect1" text="%t"/>
+      <l:template name="refsect2" text="%t"/>
+      <l:template name="refsect3" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="refsynopsisdivinfo" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="step" text="%t"/>
+      <l:template name="table" text="&#1058;&#1072;&#1073;&#1083;&#1080;&#1094;&#1072;&#160;%n.&#160;%t"/>
+      <l:template name="task" text="%t" lang="en"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text=""/>
+      <l:template name="warning" text="%t"/>
+   </l:context>
+
+   <l:context name="title-unnumbered">
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article/appendix" text="%t"/>
+      <l:template name="bridgehead" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="sect1" text="%t"/>
+      <l:template name="sect2" text="%t"/>
+      <l:template name="sect3" text="%t"/>
+      <l:template name="sect4" text="%t"/>
+      <l:template name="sect5" text="%t"/>
+      <l:template name="section" text="%t"/>
+      <l:template name="simplesect" text="%t"/>
+   </l:context>
+
+   <l:context name="title-numbered">
+      <l:template name="appendix" text="&#1055;&#1088;&#1080;&#1083;&#1086;&#1078;&#1077;&#1085;&#1080;&#1077;&#160;%n.&#160;%t"/>
+      <l:template name="article/appendix" text="%n.&#160;%t"/>
+      <l:template name="bridgehead" text="%n.&#160;%t"/>
+      <l:template name="chapter" text="&#1043;&#1083;&#1072;&#1074;&#1072;&#160;%n.&#160;%t"/>
+      <l:template name="sect1" text="%n.&#160;%t"/>
+      <l:template name="sect2" text="%n.&#160;%t"/>
+      <l:template name="sect3" text="%n.&#160;%t"/>
+      <l:template name="sect4" text="%n.&#160;%t"/>
+      <l:template name="sect5" text="%n.&#160;%t"/>
+      <l:template name="section" text="%n.&#160;%t"/>
+      <l:template name="simplesect" text="%t"/>
+   </l:context>
+
+   <l:context name="subtitle">
+      <l:template name="appendix" text="%s"/>
+      <l:template name="article" text="%s"/>
+      <l:template name="bibliodiv" text="%s"/>
+      <l:template name="biblioentry" text="%s"/>
+      <l:template name="bibliography" text="%s"/>
+      <l:template name="bibliomixed" text="%s"/>
+      <l:template name="bibliomset" text="%s"/>
+      <l:template name="biblioset" text="%s"/>
+      <l:template name="book" text="%s"/>
+      <l:template name="chapter" text="%s"/>
+      <l:template name="colophon" text="%s"/>
+      <l:template name="dedication" text="%s"/>
+      <l:template name="glossary" text="%s"/>
+      <l:template name="glossdiv" text="%s"/>
+      <l:template name="index" text="%s"/>
+      <l:template name="indexdiv" text="%s"/>
+      <l:template name="lot" text="%s"/>
+      <l:template name="part" text="%s"/>
+      <l:template name="partintro" text="%s"/>
+      <l:template name="preface" text="%s"/>
+      <l:template name="refentry" text="%s"/>
+      <l:template name="reference" text="%s"/>
+      <l:template name="refsection" text="%s"/>
+      <l:template name="refsect1" text="%s"/>
+      <l:template name="refsect2" text="%s"/>
+      <l:template name="refsect3" text="%s"/>
+      <l:template name="refsynopsisdiv" text="%s"/>
+      <l:template name="sect1" text="%s"/>
+      <l:template name="sect2" text="%s"/>
+      <l:template name="sect3" text="%s"/>
+      <l:template name="sect4" text="%s"/>
+      <l:template name="sect5" text="%s"/>
+      <l:template name="section" text="%s"/>
+      <l:template name="set" text="%s"/>
+      <l:template name="setindex" text="%s"/>
+      <l:template name="sidebar" text="%s"/>
+      <l:template name="simplesect" text="%s"/>
+      <l:template name="toc" text="%s"/>
+   </l:context>
+
+   <l:context name="xref">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="&#1054;:&#160;%n"/>
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="constraintdef" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="%t"/>
+      <l:template name="example" text="%t"/>
+      <l:template name="figure" text="%t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text="%n"/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="%t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="&#1042;:&#160;%n"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="&#1042;:&#160;%n"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="table" text="%t"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="%n"/>
+      <l:template name="warning" text="%t"/>
+      <l:template name="page.citation" text=" [%p]"/>
+      <l:template name="page" text="(page %p)" lang="en"/>
+      <l:template name="pageabbrev" text="(p. %p)" lang="en"/>
+      <l:template name="Page" text="Page %p" lang="en"/>
+      <l:template name="bridgehead" text="the section called &#8222;%t&#8220;"/>
+      <l:template name="refsection" text="the section called &#8222;%t&#8220;"/>
+      <l:template name="refsect1" text="the section called &#8222;%t&#8220;"/>
+      <l:template name="refsect2" text="the section called &#8222;%t&#8220;"/>
+      <l:template name="refsect3" text="the section called &#8222;%t&#8220;"/>
+      <l:template name="sect1" text="the section called &#8222;%t&#8220;"/>
+      <l:template name="sect2" text="the section called &#8222;%t&#8220;"/>
+      <l:template name="sect3" text="the section called &#8222;%t&#8220;"/>
+      <l:template name="sect4" text="the section called &#8222;%t&#8220;"/>
+      <l:template name="sect5" text="the section called &#8222;%t&#8220;"/>
+      <l:template name="section" text="the section called &#8222;%t&#8220;"/>
+      <l:template name="simplesect" text="the section called &#8222;%t&#8220;"/>
+   </l:context>
+
+   <l:context name="xref-number">
+      <l:template name="answer" text="&#1054;:&#160;%n"/>
+      <l:template name="appendix" text="&#1055;&#1088;&#1080;&#1083;&#1086;&#1078;&#1077;&#1085;&#1080;&#1077;&#160;%n"/>
+      <l:template name="bridgehead" text="&#1056;&#1072;&#1079;&#1076;&#1077;&#1083;&#160;%n"/>
+      <l:template name="chapter" text="&#1043;&#1083;&#1072;&#1074;&#1072;&#160;%n"/>
+      <l:template name="equation" text="&#1060;&#1086;&#1088;&#1084;&#1091;&#1083;&#1072;&#160;%n"/>
+      <l:template name="example" text="&#1055;&#1088;&#1080;&#1084;&#1077;&#1088;&#160;%n"/>
+      <l:template name="figure" text="&#1060;&#1080;&#1075;&#1091;&#1088;&#1072;&#160;%n"/>
+      <l:template name="part" text="&#1063;&#1072;&#1089;&#1090;&#160;%n"/>
+      <l:template name="procedure" text="&#1055;&#1088;&#1086;&#1094;&#1077;&#1076;&#1091;&#1088;&#1072;&#160;%n"/>
+      <l:template name="productionset" text="Production&#160;%n"/>
+      <l:template name="qandadiv" text="&#1042;&#1098;&#1087;&#1088;&#1086;&#1089;&#1080; &#1080; &#1086;&#1090;&#1075;&#1086;&#1074;&#1086;&#1088;&#1080;&#160;%n"/>
+      <l:template name="qandaentry" text="&#1042;:&#160;%n"/>
+      <l:template name="question" text="&#1042;:&#160;%n"/>
+      <l:template name="sect1" text="&#1056;&#1072;&#1079;&#1076;&#1077;&#1083;&#160;%n"/>
+      <l:template name="sect2" text="&#1056;&#1072;&#1079;&#1076;&#1077;&#1083;&#160;%n"/>
+      <l:template name="sect3" text="&#1056;&#1072;&#1079;&#1076;&#1077;&#1083;&#160;%n"/>
+      <l:template name="sect4" text="&#1056;&#1072;&#1079;&#1076;&#1077;&#1083;&#160;%n"/>
+      <l:template name="sect5" text="&#1056;&#1072;&#1079;&#1076;&#1077;&#1083;&#160;%n"/>
+      <l:template name="section" text="&#1056;&#1072;&#1079;&#1076;&#1077;&#1083;&#160;%n"/>
+      <l:template name="table" text="&#1058;&#1072;&#1073;&#1083;&#1080;&#1094;&#1072;&#160;%n"/>
+   </l:context>
+
+   <l:context name="xref-number-and-title">
+      <l:template name="appendix" text="&#1055;&#1088;&#1080;&#1083;&#1086;&#1078;&#1077;&#1085;&#1080;&#1077;&#160;%n, %t"/>
+      <l:template name="bridgehead" text="&#1056;&#1072;&#1079;&#1076;&#1077;&#1083;&#160;%n, &#8222;%t&#8220;"/>
+      <l:template name="chapter" text="&#1043;&#1083;&#1072;&#1074;&#1072;&#160;%n, %t"/>
+      <l:template name="equation" text="&#1060;&#1086;&#1088;&#1084;&#1091;&#1083;&#1072;&#160;%n, &#8222;%t&#8220;"/>
+      <l:template name="example" text="&#1055;&#1088;&#1080;&#1084;&#1077;&#1088;&#160;%n, &#8222;%t&#8220;"/>
+      <l:template name="figure" text="&#1060;&#1080;&#1075;&#1091;&#1088;&#1072;&#160;%n, &#8222;%t&#8220;"/>
+      <l:template name="part" text="&#1063;&#1072;&#1089;&#1090;&#160;%n, &#8222;%t&#8220;"/>
+      <l:template name="procedure" text="&#1055;&#1088;&#1086;&#1094;&#1077;&#1076;&#1091;&#1088;&#1072;&#160;%n, &#8222;%t&#8220;"/>
+      <l:template name="productionset" text="Production&#160;%n, &#8222;%t&#8220;"/>
+      <l:template name="qandadiv" text="&#1042;&#1098;&#1087;&#1088;&#1086;&#1089;&#1080; &#1080; &#1086;&#1090;&#1075;&#1086;&#1074;&#1086;&#1088;&#1080;&#160;%n, &#8222;%t&#8220;"/>
+      <l:template name="refsect1" text="the section called &#8222;%t&#8220;"/>
+      <l:template name="refsect2" text="the section called &#8222;%t&#8220;"/>
+      <l:template name="refsect3" text="the section called &#8222;%t&#8220;"/>
+      <l:template name="refsection" text="the section called &#8222;%t&#8220;"/>
+      <l:template name="sect1" text="&#1056;&#1072;&#1079;&#1076;&#1077;&#1083;&#160;%n, &#8222;%t&#8220;"/>
+      <l:template name="sect2" text="&#1056;&#1072;&#1079;&#1076;&#1077;&#1083;&#160;%n, &#8222;%t&#8220;"/>
+      <l:template name="sect3" text="&#1056;&#1072;&#1079;&#1076;&#1077;&#1083;&#160;%n, &#8222;%t&#8220;"/>
+      <l:template name="sect4" text="&#1056;&#1072;&#1079;&#1076;&#1077;&#1083;&#160;%n, &#8222;%t&#8220;"/>
+      <l:template name="sect5" text="&#1056;&#1072;&#1079;&#1076;&#1077;&#1083;&#160;%n, &#8222;%t&#8220;"/>
+      <l:template name="section" text="&#1056;&#1072;&#1079;&#1076;&#1077;&#1083;&#160;%n, &#8222;%t&#8220;"/>
+      <l:template name="simplesect" text="the section called &#8222;%t&#8220;"/>
+      <l:template name="table" text="&#1058;&#1072;&#1073;&#1083;&#1080;&#1094;&#1072;&#160;%n, &#8222;%t&#8220;"/>
+   </l:context>
+
+   <l:context name="authorgroup">
+      <l:template name="sep" text=", "/>
+      <l:template name="sep2" text="  "/>
+      <l:template name="seplast" text=",  "/>
+   </l:context>
+
+   <l:context name="glossary">
+      <l:template name="see" text="&#1074;&#1078;. "/>
+      <l:template name="seealso" text="&#1074;&#1078;. &#1089;&#1098;&#1097;&#1086; "/>
+   </l:context>
+
+   <l:context name="msgset">
+      <l:template name="MsgAud" text="Audience: "/>
+      <l:template name="MsgLevel" text="&#1053;&#1080;&#1074;&#1086;: "/>
+      <l:template name="MsgOrig" text="&#1048;&#1079;&#1090;&#1086;&#1095;&#1085;&#1080;&#1082;: "/>
+   </l:context>
+
+   <l:context name="datetime">
+      <l:template name="format" text="d/m/Y"/>
+   </l:context>
+
+   <l:context name="datetime-full">
+      <l:template name="January" text="&#1103;&#1085;&#1091;&#1072;&#1088;&#1080;"/>
+      <l:template name="February" text="&#1092;&#1077;&#1074;&#1088;&#1091;&#1072;&#1088;&#1080;"/>
+      <l:template name="March" text="&#1084;&#1072;&#1088;&#1090;"/>
+      <l:template name="April" text="&#1072;&#1087;&#1088;&#1080;&#1083;"/>
+      <l:template name="May" text="&#1084;&#1072;&#1081;"/>
+      <l:template name="June" text="&#1102;&#1085;&#1080;"/>
+      <l:template name="July" text="&#1102;&#1083;&#1080;"/>
+      <l:template name="August" text="&#1072;&#1074;&#1075;&#1091;&#1089;&#1090;"/>
+      <l:template name="September" text="&#1089;&#1077;&#1087;&#1090;&#1077;&#1084;&#1074;&#1088;&#1080;"/>
+      <l:template name="October" text="&#1086;&#1082;&#1090;&#1086;&#1084;&#1074;&#1088;&#1080;"/>
+      <l:template name="November" text="&#1085;&#1086;&#1077;&#1084;&#1074;&#1088;&#1080;"/>
+      <l:template name="December" text="&#1076;&#1077;&#1082;&#1077;&#1084;&#1074;&#1088;&#1080;"/>
+      <l:template name="Monday" text="&#1087;&#1086;&#1085;&#1077;&#1076;&#1077;&#1083;&#1085;&#1080;&#1082;"/>
+      <l:template name="Tuesday" text="&#1074;&#1090;&#1086;&#1088;&#1085;&#1080;&#1082;"/>
+      <l:template name="Wednesday" text="&#1089;&#1088;&#1103;&#1076;&#1072;"/>
+      <l:template name="Thursday" text="&#1095;&#1077;&#1090;&#1074;&#1098;&#1088;&#1090;&#1098;&#1082;"/>
+      <l:template name="Friday" text="&#1087;&#1077;&#1090;&#1098;&#1082;"/>
+      <l:template name="Saturday" text="&#1089;&#1098;&#1073;&#1086;&#1090;&#1072;"/>
+      <l:template name="Sunday" text="&#1085;&#1077;&#1076;&#1077;&#1083;&#1103;"/>
+   </l:context>
+
+   <l:context name="datetime-abbrev">
+      <l:template name="Jan" text="&#1103;&#1085;."/>
+      <l:template name="Feb" text="&#1092;&#1077;&#1074;."/>
+      <l:template name="Mar" text="&#1084;&#1072;&#1088;&#1090;"/>
+      <l:template name="Apr" text="&#1072;&#1087;&#1088;."/>
+      <l:template name="May" text="&#1084;&#1072;&#1081;"/>
+      <l:template name="Jun" text="&#1102;&#1085;&#1080;"/>
+      <l:template name="Jul" text="&#1102;&#1083;&#1080;"/>
+      <l:template name="Aug" text="&#1072;&#1074;&#1075;."/>
+      <l:template name="Sep" text="&#1089;&#1077;&#1087;."/>
+      <l:template name="Oct" text="&#1086;&#1082;&#1090;."/>
+      <l:template name="Nov" text="&#1085;&#1086;&#1077;&#1084;."/>
+      <l:template name="Dec" text="&#1076;&#1077;&#1082;."/>
+      <l:template name="Mon" text="&#1087;&#1086;&#1085;."/>
+      <l:template name="Tue" text="&#1074;&#1090;."/>
+      <l:template name="Wed" text="&#1089;&#1088;."/>
+      <l:template name="Thu" text="&#1095;&#1077;&#1090;."/>
+      <l:template name="Fri" text="&#1087;&#1077;&#1090;."/>
+      <l:template name="Sat" text="&#1089;&#1098;&#1073;."/>
+      <l:template name="Sun" text="&#1085;&#1077;&#1076;."/>
+   </l:context>
+
+   <l:context name="htmlhelp">
+      <l:template name="langcode" text="0x0402 Bulgarian"/>
+   </l:context>
+
+   <l:letters lang="en">
+      <l:l i="-1"/>
+      <l:l i="0">Symbols</l:l>
+      <l:l i="10">A</l:l>
+      <l:l i="10">a</l:l>
+      <l:l i="10">&#192;</l:l>
+      <l:l i="10">&#224;</l:l>
+      <l:l i="10">&#193;</l:l>
+      <l:l i="10">&#225;</l:l>
+      <l:l i="10">&#194;</l:l>
+      <l:l i="10">&#226;</l:l>
+      <l:l i="10">&#195;</l:l>
+      <l:l i="10">&#227;</l:l>
+      <l:l i="10">&#196;</l:l>
+      <l:l i="10">&#228;</l:l>
+      <l:l i="10">&#197;</l:l>
+      <l:l i="10">&#229;</l:l>
+      <l:l i="10">&#256;</l:l>
+      <l:l i="10">&#257;</l:l>
+      <l:l i="10">&#258;</l:l>
+      <l:l i="10">&#259;</l:l>
+      <l:l i="10">&#260;</l:l>
+      <l:l i="10">&#261;</l:l>
+      <l:l i="10">&#461;</l:l>
+      <l:l i="10">&#462;</l:l>
+      <l:l i="10">&#478;</l:l>
+      <l:l i="10">&#479;</l:l>
+      <l:l i="10">&#480;</l:l>
+      <l:l i="10">&#481;</l:l>
+      <l:l i="10">&#506;</l:l>
+      <l:l i="10">&#507;</l:l>
+      <l:l i="10">&#512;</l:l>
+      <l:l i="10">&#513;</l:l>
+      <l:l i="10">&#514;</l:l>
+      <l:l i="10">&#515;</l:l>
+      <l:l i="10">&#550;</l:l>
+      <l:l i="10">&#551;</l:l>
+      <l:l i="10">&#7680;</l:l>
+      <l:l i="10">&#7681;</l:l>
+      <l:l i="10">&#7834;</l:l>
+      <l:l i="10">&#7840;</l:l>
+      <l:l i="10">&#7841;</l:l>
+      <l:l i="10">&#7842;</l:l>
+      <l:l i="10">&#7843;</l:l>
+      <l:l i="10">&#7844;</l:l>
+      <l:l i="10">&#7845;</l:l>
+      <l:l i="10">&#7846;</l:l>
+      <l:l i="10">&#7847;</l:l>
+      <l:l i="10">&#7848;</l:l>
+      <l:l i="10">&#7849;</l:l>
+      <l:l i="10">&#7850;</l:l>
+      <l:l i="10">&#7851;</l:l>
+      <l:l i="10">&#7852;</l:l>
+      <l:l i="10">&#7853;</l:l>
+      <l:l i="10">&#7854;</l:l>
+      <l:l i="10">&#7855;</l:l>
+      <l:l i="10">&#7856;</l:l>
+      <l:l i="10">&#7857;</l:l>
+      <l:l i="10">&#7858;</l:l>
+      <l:l i="10">&#7859;</l:l>
+      <l:l i="10">&#7860;</l:l>
+      <l:l i="10">&#7861;</l:l>
+      <l:l i="10">&#7862;</l:l>
+      <l:l i="10">&#7863;</l:l>
+      <l:l i="20">B</l:l>
+      <l:l i="20">b</l:l>
+      <l:l i="20">&#384;</l:l>
+      <l:l i="20">&#385;</l:l>
+      <l:l i="20">&#595;</l:l>
+      <l:l i="20">&#386;</l:l>
+      <l:l i="20">&#387;</l:l>
+      <l:l i="20">&#7682;</l:l>
+      <l:l i="20">&#7683;</l:l>
+      <l:l i="20">&#7684;</l:l>
+      <l:l i="20">&#7685;</l:l>
+      <l:l i="20">&#7686;</l:l>
+      <l:l i="20">&#7687;</l:l>
+      <l:l i="30">C</l:l>
+      <l:l i="30">c</l:l>
+      <l:l i="30">&#199;</l:l>
+      <l:l i="30">&#231;</l:l>
+      <l:l i="30">&#262;</l:l>
+      <l:l i="30">&#263;</l:l>
+      <l:l i="30">&#264;</l:l>
+      <l:l i="30">&#265;</l:l>
+      <l:l i="30">&#266;</l:l>
+      <l:l i="30">&#267;</l:l>
+      <l:l i="30">&#268;</l:l>
+      <l:l i="30">&#269;</l:l>
+      <l:l i="30">&#391;</l:l>
+      <l:l i="30">&#392;</l:l>
+      <l:l i="30">&#597;</l:l>
+      <l:l i="30">&#7688;</l:l>
+      <l:l i="30">&#7689;</l:l>
+      <l:l i="40">D</l:l>
+      <l:l i="40">d</l:l>
+      <l:l i="40">&#270;</l:l>
+      <l:l i="40">&#271;</l:l>
+      <l:l i="40">&#272;</l:l>
+      <l:l i="40">&#273;</l:l>
+      <l:l i="40">&#394;</l:l>
+      <l:l i="40">&#599;</l:l>
+      <l:l i="40">&#395;</l:l>
+      <l:l i="40">&#396;</l:l>
+      <l:l i="40">&#453;</l:l>
+      <l:l i="40">&#498;</l:l>
+      <l:l i="40">&#545;</l:l>
+      <l:l i="40">&#598;</l:l>
+      <l:l i="40">&#7690;</l:l>
+      <l:l i="40">&#7691;</l:l>
+      <l:l i="40">&#7692;</l:l>
+      <l:l i="40">&#7693;</l:l>
+      <l:l i="40">&#7694;</l:l>
+      <l:l i="40">&#7695;</l:l>
+      <l:l i="40">&#7696;</l:l>
+      <l:l i="40">&#7697;</l:l>
+      <l:l i="40">&#7698;</l:l>
+      <l:l i="40">&#7699;</l:l>
+      <l:l i="50">E</l:l>
+      <l:l i="50">e</l:l>
+      <l:l i="50">&#200;</l:l>
+      <l:l i="50">&#232;</l:l>
+      <l:l i="50">&#201;</l:l>
+      <l:l i="50">&#233;</l:l>
+      <l:l i="50">&#202;</l:l>
+      <l:l i="50">&#234;</l:l>
+      <l:l i="50">&#203;</l:l>
+      <l:l i="50">&#235;</l:l>
+      <l:l i="50">&#274;</l:l>
+      <l:l i="50">&#275;</l:l>
+      <l:l i="50">&#276;</l:l>
+      <l:l i="50">&#277;</l:l>
+      <l:l i="50">&#278;</l:l>
+      <l:l i="50">&#279;</l:l>
+      <l:l i="50">&#280;</l:l>
+      <l:l i="50">&#281;</l:l>
+      <l:l i="50">&#282;</l:l>
+      <l:l i="50">&#283;</l:l>
+      <l:l i="50">&#516;</l:l>
+      <l:l i="50">&#517;</l:l>
+      <l:l i="50">&#518;</l:l>
+      <l:l i="50">&#519;</l:l>
+      <l:l i="50">&#552;</l:l>
+      <l:l i="50">&#553;</l:l>
+      <l:l i="50">&#7700;</l:l>
+      <l:l i="50">&#7701;</l:l>
+      <l:l i="50">&#7702;</l:l>
+      <l:l i="50">&#7703;</l:l>
+      <l:l i="50">&#7704;</l:l>
+      <l:l i="50">&#7705;</l:l>
+      <l:l i="50">&#7706;</l:l>
+      <l:l i="50">&#7707;</l:l>
+      <l:l i="50">&#7708;</l:l>
+      <l:l i="50">&#7709;</l:l>
+      <l:l i="50">&#7864;</l:l>
+      <l:l i="50">&#7865;</l:l>
+      <l:l i="50">&#7866;</l:l>
+      <l:l i="50">&#7867;</l:l>
+      <l:l i="50">&#7868;</l:l>
+      <l:l i="50">&#7869;</l:l>
+      <l:l i="50">&#7870;</l:l>
+      <l:l i="50">&#7871;</l:l>
+      <l:l i="50">&#7872;</l:l>
+      <l:l i="50">&#7873;</l:l>
+      <l:l i="50">&#7874;</l:l>
+      <l:l i="50">&#7875;</l:l>
+      <l:l i="50">&#7876;</l:l>
+      <l:l i="50">&#7877;</l:l>
+      <l:l i="50">&#7878;</l:l>
+      <l:l i="50">&#7879;</l:l>
+      <l:l i="60">F</l:l>
+      <l:l i="60">f</l:l>
+      <l:l i="60">&#401;</l:l>
+      <l:l i="60">&#402;</l:l>
+      <l:l i="60">&#7710;</l:l>
+      <l:l i="60">&#7711;</l:l>
+      <l:l i="70">G</l:l>
+      <l:l i="70">g</l:l>
+      <l:l i="70">&#284;</l:l>
+      <l:l i="70">&#285;</l:l>
+      <l:l i="70">&#286;</l:l>
+      <l:l i="70">&#287;</l:l>
+      <l:l i="70">&#288;</l:l>
+      <l:l i="70">&#289;</l:l>
+      <l:l i="70">&#290;</l:l>
+      <l:l i="70">&#291;</l:l>
+      <l:l i="70">&#403;</l:l>
+      <l:l i="70">&#608;</l:l>
+      <l:l i="70">&#484;</l:l>
+      <l:l i="70">&#485;</l:l>
+      <l:l i="70">&#486;</l:l>
+      <l:l i="70">&#487;</l:l>
+      <l:l i="70">&#500;</l:l>
+      <l:l i="70">&#501;</l:l>
+      <l:l i="70">&#7712;</l:l>
+      <l:l i="70">&#7713;</l:l>
+      <l:l i="80">H</l:l>
+      <l:l i="80">h</l:l>
+      <l:l i="80">&#292;</l:l>
+      <l:l i="80">&#293;</l:l>
+      <l:l i="80">&#294;</l:l>
+      <l:l i="80">&#295;</l:l>
+      <l:l i="80">&#542;</l:l>
+      <l:l i="80">&#543;</l:l>
+      <l:l i="80">&#614;</l:l>
+      <l:l i="80">&#7714;</l:l>
+      <l:l i="80">&#7715;</l:l>
+      <l:l i="80">&#7716;</l:l>
+      <l:l i="80">&#7717;</l:l>
+      <l:l i="80">&#7718;</l:l>
+      <l:l i="80">&#7719;</l:l>
+      <l:l i="80">&#7720;</l:l>
+      <l:l i="80">&#7721;</l:l>
+      <l:l i="80">&#7722;</l:l>
+      <l:l i="80">&#7723;</l:l>
+      <l:l i="80">&#7830;</l:l>
+      <l:l i="90">I</l:l>
+      <l:l i="90">i</l:l>
+      <l:l i="90">&#204;</l:l>
+      <l:l i="90">&#236;</l:l>
+      <l:l i="90">&#205;</l:l>
+      <l:l i="90">&#237;</l:l>
+      <l:l i="90">&#206;</l:l>
+      <l:l i="90">&#238;</l:l>
+      <l:l i="90">&#207;</l:l>
+      <l:l i="90">&#239;</l:l>
+      <l:l i="90">&#296;</l:l>
+      <l:l i="90">&#297;</l:l>
+      <l:l i="90">&#298;</l:l>
+      <l:l i="90">&#299;</l:l>
+      <l:l i="90">&#300;</l:l>
+      <l:l i="90">&#301;</l:l>
+      <l:l i="90">&#302;</l:l>
+      <l:l i="90">&#303;</l:l>
+      <l:l i="90">&#304;</l:l>
+      <l:l i="90">&#407;</l:l>
+      <l:l i="90">&#616;</l:l>
+      <l:l i="90">&#463;</l:l>
+      <l:l i="90">&#464;</l:l>
+      <l:l i="90">&#520;</l:l>
+      <l:l i="90">&#521;</l:l>
+      <l:l i="90">&#522;</l:l>
+      <l:l i="90">&#523;</l:l>
+      <l:l i="90">&#7724;</l:l>
+      <l:l i="90">&#7725;</l:l>
+      <l:l i="90">&#7726;</l:l>
+      <l:l i="90">&#7727;</l:l>
+      <l:l i="90">&#7880;</l:l>
+      <l:l i="90">&#7881;</l:l>
+      <l:l i="90">&#7882;</l:l>
+      <l:l i="90">&#7883;</l:l>
+      <l:l i="100">J</l:l>
+      <l:l i="100">j</l:l>
+      <l:l i="100">&#308;</l:l>
+      <l:l i="100">&#309;</l:l>
+      <l:l i="100">&#496;</l:l>
+      <l:l i="100">&#669;</l:l>
+      <l:l i="110">K</l:l>
+      <l:l i="110">k</l:l>
+      <l:l i="110">&#310;</l:l>
+      <l:l i="110">&#311;</l:l>
+      <l:l i="110">&#408;</l:l>
+      <l:l i="110">&#409;</l:l>
+      <l:l i="110">&#488;</l:l>
+      <l:l i="110">&#489;</l:l>
+      <l:l i="110">&#7728;</l:l>
+      <l:l i="110">&#7729;</l:l>
+      <l:l i="110">&#7730;</l:l>
+      <l:l i="110">&#7731;</l:l>
+      <l:l i="110">&#7732;</l:l>
+      <l:l i="110">&#7733;</l:l>
+      <l:l i="120">L</l:l>
+      <l:l i="120">l</l:l>
+      <l:l i="120">&#313;</l:l>
+      <l:l i="120">&#314;</l:l>
+      <l:l i="120">&#315;</l:l>
+      <l:l i="120">&#316;</l:l>
+      <l:l i="120">&#317;</l:l>
+      <l:l i="120">&#318;</l:l>
+      <l:l i="120">&#319;</l:l>
+      <l:l i="120">&#320;</l:l>
+      <l:l i="120">&#321;</l:l>
+      <l:l i="120">&#322;</l:l>
+      <l:l i="120">&#410;</l:l>
+      <l:l i="120">&#456;</l:l>
+      <l:l i="120">&#564;</l:l>
+      <l:l i="120">&#619;</l:l>
+      <l:l i="120">&#620;</l:l>
+      <l:l i="120">&#621;</l:l>
+      <l:l i="120">&#7734;</l:l>
+      <l:l i="120">&#7735;</l:l>
+      <l:l i="120">&#7736;</l:l>
+      <l:l i="120">&#7737;</l:l>
+      <l:l i="120">&#7738;</l:l>
+      <l:l i="120">&#7739;</l:l>
+      <l:l i="120">&#7740;</l:l>
+      <l:l i="120">&#7741;</l:l>
+      <l:l i="130">M</l:l>
+      <l:l i="130">m</l:l>
+      <l:l i="130">&#625;</l:l>
+      <l:l i="130">&#7742;</l:l>
+      <l:l i="130">&#7743;</l:l>
+      <l:l i="130">&#7744;</l:l>
+      <l:l i="130">&#7745;</l:l>
+      <l:l i="130">&#7746;</l:l>
+      <l:l i="130">&#7747;</l:l>
+      <l:l i="140">N</l:l>
+      <l:l i="140">n</l:l>
+      <l:l i="140">&#209;</l:l>
+      <l:l i="140">&#241;</l:l>
+      <l:l i="140">&#323;</l:l>
+      <l:l i="140">&#324;</l:l>
+      <l:l i="140">&#325;</l:l>
+      <l:l i="140">&#326;</l:l>
+      <l:l i="140">&#327;</l:l>
+      <l:l i="140">&#328;</l:l>
+      <l:l i="140">&#413;</l:l>
+      <l:l i="140">&#626;</l:l>
+      <l:l i="140">&#414;</l:l>
+      <l:l i="140">&#544;</l:l>
+      <l:l i="140">&#459;</l:l>
+      <l:l i="140">&#504;</l:l>
+      <l:l i="140">&#505;</l:l>
+      <l:l i="140">&#565;</l:l>
+      <l:l i="140">&#627;</l:l>
+      <l:l i="140">&#7748;</l:l>
+      <l:l i="140">&#7749;</l:l>
+      <l:l i="140">&#7750;</l:l>
+      <l:l i="140">&#7751;</l:l>
+      <l:l i="140">&#7752;</l:l>
+      <l:l i="140">&#7753;</l:l>
+      <l:l i="140">&#7754;</l:l>
+      <l:l i="140">&#7755;</l:l>
+      <l:l i="150">O</l:l>
+      <l:l i="150">o</l:l>
+      <l:l i="150">&#210;</l:l>
+      <l:l i="150">&#242;</l:l>
+      <l:l i="150">&#211;</l:l>
+      <l:l i="150">&#243;</l:l>
+      <l:l i="150">&#212;</l:l>
+      <l:l i="150">&#244;</l:l>
+      <l:l i="150">&#213;</l:l>
+      <l:l i="150">&#245;</l:l>
+      <l:l i="150">&#214;</l:l>
+      <l:l i="150">&#246;</l:l>
+      <l:l i="150">&#216;</l:l>
+      <l:l i="150">&#248;</l:l>
+      <l:l i="150">&#332;</l:l>
+      <l:l i="150">&#333;</l:l>
+      <l:l i="150">&#334;</l:l>
+      <l:l i="150">&#335;</l:l>
+      <l:l i="150">&#336;</l:l>
+      <l:l i="150">&#337;</l:l>
+      <l:l i="150">&#415;</l:l>
+      <l:l i="150">&#416;</l:l>
+      <l:l i="150">&#417;</l:l>
+      <l:l i="150">&#465;</l:l>
+      <l:l i="150">&#466;</l:l>
+      <l:l i="150">&#490;</l:l>
+      <l:l i="150">&#491;</l:l>
+      <l:l i="150">&#492;</l:l>
+      <l:l i="150">&#493;</l:l>
+      <l:l i="150">&#510;</l:l>
+      <l:l i="150">&#511;</l:l>
+      <l:l i="150">&#524;</l:l>
+      <l:l i="150">&#525;</l:l>
+      <l:l i="150">&#526;</l:l>
+      <l:l i="150">&#527;</l:l>
+      <l:l i="150">&#554;</l:l>
+      <l:l i="150">&#555;</l:l>
+      <l:l i="150">&#556;</l:l>
+      <l:l i="150">&#557;</l:l>
+      <l:l i="150">&#558;</l:l>
+      <l:l i="150">&#559;</l:l>
+      <l:l i="150">&#560;</l:l>
+      <l:l i="150">&#561;</l:l>
+      <l:l i="150">&#7756;</l:l>
+      <l:l i="150">&#7757;</l:l>
+      <l:l i="150">&#7758;</l:l>
+      <l:l i="150">&#7759;</l:l>
+      <l:l i="150">&#7760;</l:l>
+      <l:l i="150">&#7761;</l:l>
+      <l:l i="150">&#7762;</l:l>
+      <l:l i="150">&#7763;</l:l>
+      <l:l i="150">&#7884;</l:l>
+      <l:l i="150">&#7885;</l:l>
+      <l:l i="150">&#7886;</l:l>
+      <l:l i="150">&#7887;</l:l>
+      <l:l i="150">&#7888;</l:l>
+      <l:l i="150">&#7889;</l:l>
+      <l:l i="150">&#7890;</l:l>
+      <l:l i="150">&#7891;</l:l>
+      <l:l i="150">&#7892;</l:l>
+      <l:l i="150">&#7893;</l:l>
+      <l:l i="150">&#7894;</l:l>
+      <l:l i="150">&#7895;</l:l>
+      <l:l i="150">&#7896;</l:l>
+      <l:l i="150">&#7897;</l:l>
+      <l:l i="150">&#7898;</l:l>
+      <l:l i="150">&#7899;</l:l>
+      <l:l i="150">&#7900;</l:l>
+      <l:l i="150">&#7901;</l:l>
+      <l:l i="150">&#7902;</l:l>
+      <l:l i="150">&#7903;</l:l>
+      <l:l i="150">&#7904;</l:l>
+      <l:l i="150">&#7905;</l:l>
+      <l:l i="150">&#7906;</l:l>
+      <l:l i="150">&#7907;</l:l>
+      <l:l i="160">P</l:l>
+      <l:l i="160">p</l:l>
+      <l:l i="160">&#420;</l:l>
+      <l:l i="160">&#421;</l:l>
+      <l:l i="160">&#7764;</l:l>
+      <l:l i="160">&#7765;</l:l>
+      <l:l i="160">&#7766;</l:l>
+      <l:l i="160">&#7767;</l:l>
+      <l:l i="170">Q</l:l>
+      <l:l i="170">q</l:l>
+      <l:l i="170">&#672;</l:l>
+      <l:l i="180">R</l:l>
+      <l:l i="180">r</l:l>
+      <l:l i="180">&#340;</l:l>
+      <l:l i="180">&#341;</l:l>
+      <l:l i="180">&#342;</l:l>
+      <l:l i="180">&#343;</l:l>
+      <l:l i="180">&#344;</l:l>
+      <l:l i="180">&#345;</l:l>
+      <l:l i="180">&#528;</l:l>
+      <l:l i="180">&#529;</l:l>
+      <l:l i="180">&#530;</l:l>
+      <l:l i="180">&#531;</l:l>
+      <l:l i="180">&#636;</l:l>
+      <l:l i="180">&#637;</l:l>
+      <l:l i="180">&#638;</l:l>
+      <l:l i="180">&#7768;</l:l>
+      <l:l i="180">&#7769;</l:l>
+      <l:l i="180">&#7770;</l:l>
+      <l:l i="180">&#7771;</l:l>
+      <l:l i="180">&#7772;</l:l>
+      <l:l i="180">&#7773;</l:l>
+      <l:l i="180">&#7774;</l:l>
+      <l:l i="180">&#7775;</l:l>
+      <l:l i="190">S</l:l>
+      <l:l i="190">s</l:l>
+      <l:l i="190">&#346;</l:l>
+      <l:l i="190">&#347;</l:l>
+      <l:l i="190">&#348;</l:l>
+      <l:l i="190">&#349;</l:l>
+      <l:l i="190">&#350;</l:l>
+      <l:l i="190">&#351;</l:l>
+      <l:l i="190">&#352;</l:l>
+      <l:l i="190">&#353;</l:l>
+      <l:l i="190">&#536;</l:l>
+      <l:l i="190">&#537;</l:l>
+      <l:l i="190">&#642;</l:l>
+      <l:l i="190">&#7776;</l:l>
+      <l:l i="190">&#7777;</l:l>
+      <l:l i="190">&#7778;</l:l>
+      <l:l i="190">&#7779;</l:l>
+      <l:l i="190">&#7780;</l:l>
+      <l:l i="190">&#7781;</l:l>
+      <l:l i="190">&#7782;</l:l>
+      <l:l i="190">&#7783;</l:l>
+      <l:l i="190">&#7784;</l:l>
+      <l:l i="190">&#7785;</l:l>
+      <l:l i="200">T</l:l>
+      <l:l i="200">t</l:l>
+      <l:l i="200">&#354;</l:l>
+      <l:l i="200">&#355;</l:l>
+      <l:l i="200">&#356;</l:l>
+      <l:l i="200">&#357;</l:l>
+      <l:l i="200">&#358;</l:l>
+      <l:l i="200">&#359;</l:l>
+      <l:l i="200">&#427;</l:l>
+      <l:l i="200">&#428;</l:l>
+      <l:l i="200">&#429;</l:l>
+      <l:l i="200">&#430;</l:l>
+      <l:l i="200">&#648;</l:l>
+      <l:l i="200">&#538;</l:l>
+      <l:l i="200">&#539;</l:l>
+      <l:l i="200">&#566;</l:l>
+      <l:l i="200">&#7786;</l:l>
+      <l:l i="200">&#7787;</l:l>
+      <l:l i="200">&#7788;</l:l>
+      <l:l i="200">&#7789;</l:l>
+      <l:l i="200">&#7790;</l:l>
+      <l:l i="200">&#7791;</l:l>
+      <l:l i="200">&#7792;</l:l>
+      <l:l i="200">&#7793;</l:l>
+      <l:l i="200">&#7831;</l:l>
+      <l:l i="210">U</l:l>
+      <l:l i="210">u</l:l>
+      <l:l i="210">&#217;</l:l>
+      <l:l i="210">&#249;</l:l>
+      <l:l i="210">&#218;</l:l>
+      <l:l i="210">&#250;</l:l>
+      <l:l i="210">&#219;</l:l>
+      <l:l i="210">&#251;</l:l>
+      <l:l i="210">&#220;</l:l>
+      <l:l i="210">&#252;</l:l>
+      <l:l i="210">&#360;</l:l>
+      <l:l i="210">&#361;</l:l>
+      <l:l i="210">&#362;</l:l>
+      <l:l i="210">&#363;</l:l>
+      <l:l i="210">&#364;</l:l>
+      <l:l i="210">&#365;</l:l>
+      <l:l i="210">&#366;</l:l>
+      <l:l i="210">&#367;</l:l>
+      <l:l i="210">&#368;</l:l>
+      <l:l i="210">&#369;</l:l>
+      <l:l i="210">&#370;</l:l>
+      <l:l i="210">&#371;</l:l>
+      <l:l i="210">&#431;</l:l>
+      <l:l i="210">&#432;</l:l>
+      <l:l i="210">&#467;</l:l>
+      <l:l i="210">&#468;</l:l>
+      <l:l i="210">&#469;</l:l>
+      <l:l i="210">&#470;</l:l>
+      <l:l i="210">&#471;</l:l>
+      <l:l i="210">&#472;</l:l>
+      <l:l i="210">&#473;</l:l>
+      <l:l i="210">&#474;</l:l>
+      <l:l i="210">&#475;</l:l>
+      <l:l i="210">&#476;</l:l>
+      <l:l i="210">&#532;</l:l>
+      <l:l i="210">&#533;</l:l>
+      <l:l i="210">&#534;</l:l>
+      <l:l i="210">&#535;</l:l>
+      <l:l i="210">&#7794;</l:l>
+      <l:l i="210">&#7795;</l:l>
+      <l:l i="210">&#7796;</l:l>
+      <l:l i="210">&#7797;</l:l>
+      <l:l i="210">&#7798;</l:l>
+      <l:l i="210">&#7799;</l:l>
+      <l:l i="210">&#7800;</l:l>
+      <l:l i="210">&#7801;</l:l>
+      <l:l i="210">&#7802;</l:l>
+      <l:l i="210">&#7803;</l:l>
+      <l:l i="210">&#7908;</l:l>
+      <l:l i="210">&#7909;</l:l>
+      <l:l i="210">&#7910;</l:l>
+      <l:l i="210">&#7911;</l:l>
+      <l:l i="210">&#7912;</l:l>
+      <l:l i="210">&#7913;</l:l>
+      <l:l i="210">&#7914;</l:l>
+      <l:l i="210">&#7915;</l:l>
+      <l:l i="210">&#7916;</l:l>
+      <l:l i="210">&#7917;</l:l>
+      <l:l i="210">&#7918;</l:l>
+      <l:l i="210">&#7919;</l:l>
+      <l:l i="210">&#7920;</l:l>
+      <l:l i="210">&#7921;</l:l>
+      <l:l i="220">V</l:l>
+      <l:l i="220">v</l:l>
+      <l:l i="220">&#434;</l:l>
+      <l:l i="220">&#651;</l:l>
+      <l:l i="220">&#7804;</l:l>
+      <l:l i="220">&#7805;</l:l>
+      <l:l i="220">&#7806;</l:l>
+      <l:l i="220">&#7807;</l:l>
+      <l:l i="230">W</l:l>
+      <l:l i="230">w</l:l>
+      <l:l i="230">&#372;</l:l>
+      <l:l i="230">&#373;</l:l>
+      <l:l i="230">&#7808;</l:l>
+      <l:l i="230">&#7809;</l:l>
+      <l:l i="230">&#7810;</l:l>
+      <l:l i="230">&#7811;</l:l>
+      <l:l i="230">&#7812;</l:l>
+      <l:l i="230">&#7813;</l:l>
+      <l:l i="230">&#7814;</l:l>
+      <l:l i="230">&#7815;</l:l>
+      <l:l i="230">&#7816;</l:l>
+      <l:l i="230">&#7817;</l:l>
+      <l:l i="230">&#7832;</l:l>
+      <l:l i="240">X</l:l>
+      <l:l i="240">x</l:l>
+      <l:l i="240">&#7818;</l:l>
+      <l:l i="240">&#7819;</l:l>
+      <l:l i="240">&#7820;</l:l>
+      <l:l i="240">&#7821;</l:l>
+      <l:l i="250">Y</l:l>
+      <l:l i="250">y</l:l>
+      <l:l i="250">&#221;</l:l>
+      <l:l i="250">&#253;</l:l>
+      <l:l i="250">&#255;</l:l>
+      <l:l i="250">&#376;</l:l>
+      <l:l i="250">&#374;</l:l>
+      <l:l i="250">&#375;</l:l>
+      <l:l i="250">&#435;</l:l>
+      <l:l i="250">&#436;</l:l>
+      <l:l i="250">&#562;</l:l>
+      <l:l i="250">&#563;</l:l>
+      <l:l i="250">&#7822;</l:l>
+      <l:l i="250">&#7823;</l:l>
+      <l:l i="250">&#7833;</l:l>
+      <l:l i="250">&#7922;</l:l>
+      <l:l i="250">&#7923;</l:l>
+      <l:l i="250">&#7924;</l:l>
+      <l:l i="250">&#7925;</l:l>
+      <l:l i="250">&#7926;</l:l>
+      <l:l i="250">&#7927;</l:l>
+      <l:l i="250">&#7928;</l:l>
+      <l:l i="250">&#7929;</l:l>
+      <l:l i="260">Z</l:l>
+      <l:l i="260">z</l:l>
+      <l:l i="260">&#377;</l:l>
+      <l:l i="260">&#378;</l:l>
+      <l:l i="260">&#379;</l:l>
+      <l:l i="260">&#380;</l:l>
+      <l:l i="260">&#381;</l:l>
+      <l:l i="260">&#382;</l:l>
+      <l:l i="260">&#437;</l:l>
+      <l:l i="260">&#438;</l:l>
+      <l:l i="260">&#548;</l:l>
+      <l:l i="260">&#549;</l:l>
+      <l:l i="260">&#656;</l:l>
+      <l:l i="260">&#657;</l:l>
+      <l:l i="260">&#7824;</l:l>
+      <l:l i="260">&#7825;</l:l>
+      <l:l i="260">&#7826;</l:l>
+      <l:l i="260">&#7827;</l:l>
+      <l:l i="260">&#7828;</l:l>
+      <l:l i="260">&#7829;</l:l>
+   </l:letters>
+</l:l10n>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/bn.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/bn.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/bn.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1153 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="bn" english-language-name="Bangla">
+
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+   <l:gentext key="Abstract" text="&#2488;&#2494;&#2480;&#2488;&#2434;&#2453;&#2509;&#2487;&#2503;&#2474;"/>
+   <l:gentext key="abstract" text="&#2488;&#2494;&#2480;&#2488;&#2434;&#2453;&#2509;&#2487;&#2503;&#2474;"/>
+   <l:gentext key="Answer" text="&#2441;&#2468;&#2509;&#2468;&#2480;:"/>
+   <l:gentext key="answer" text="&#2441;&#2468;&#2509;&#2468;&#2480;:"/>
+   <l:gentext key="Appendix" text="&#2474;&#2480;&#2495;&#2486;&#2495;&#2487;&#2509;&#2463;"/>
+   <l:gentext key="appendix" text="&#2474;&#2480;&#2495;&#2486;&#2495;&#2487;&#2509;&#2463;"/>
+   <l:gentext key="Article" text="&#2474;&#2509;&#2480;&#2476;&#2472;&#2509;&#2471;"/>
+   <l:gentext key="article" text="&#2474;&#2509;&#2480;&#2476;&#2472;&#2509;&#2471;"/>
+   <l:gentext key="Bibliography" text="&#2455;&#2509;&#2480;&#2472;&#2509;&#2469; &#2468;&#2494;&#2482;&#2495;&#2453;&#2494;"/>
+   <l:gentext key="bibliography" text="&#2455;&#2509;&#2480;&#2472;&#2509;&#2469; &#2468;&#2494;&#2482;&#2495;&#2453;&#2494;"/>
+   <l:gentext key="Book" text="&#2476;&#2439;"/>
+   <l:gentext key="book" text="&#2476;&#2439;"/>
+   <l:gentext key="CAUTION" text="&#2488;&#2468;&#2480;&#2509;&#2453;&#2468;&#2494;"/>
+   <l:gentext key="Caution" text="&#2488;&#2468;&#2480;&#2509;&#2453;&#2468;&#2494;"/>
+   <l:gentext key="caution" text="&#2488;&#2468;&#2480;&#2509;&#2453;&#2468;&#2494;"/>
+   <l:gentext key="Chapter" text="&#2437;&#2471;&#2509;&#2479;&#2494;&#2527;"/>
+   <l:gentext key="chapter" text="&#2437;&#2471;&#2509;&#2479;&#2494;&#2527;"/>
+   <l:gentext key="Colophon" text="&#2474;&#2509;&#2480;&#2453;&#2494;&#2486;&#2472;&#2494; &#2468;&#2469;&#2509;&#2479; &#2474;&#2499;&#2487;&#2509;&#2464;&#2494;"/>
+   <l:gentext key="colophon" text="&#2474;&#2509;&#2480;&#2453;&#2494;&#2486;&#2472;&#2494; &#2468;&#2469;&#2509;&#2479; &#2474;&#2499;&#2487;&#2509;&#2464;&#2494;"/>
+   <l:gentext key="Copyright" text="&#2488;&#2509;&#2476;&#2468;&#2509;&#2476;"/>
+   <l:gentext key="copyright" text="&#2488;&#2509;&#2476;&#2468;&#2509;&#2476;"/>
+   <l:gentext key="Dedication" text="&#2441;&#2468;&#2509;&#8205;&#2488;&#2480;&#2509;&#2455;"/>
+   <l:gentext key="dedication" text="&#2441;&#2468;&#2509;&#8205;&#2488;&#2480;&#2509;&#2455;"/>
+   <l:gentext key="Edition" text="&#2488;&#2434;&#2488;&#2509;&#2453;&#2480;&#2467;"/>
+   <l:gentext key="edition" text="&#2488;&#2434;&#2488;&#2509;&#2453;&#2480;&#2467;"/>
+   <l:gentext key="Equation" text="&#2488;&#2478;&#2496;&#2453;&#2480;&#2467;"/>
+   <l:gentext key="equation" text="&#2488;&#2478;&#2496;&#2453;&#2480;&#2467;"/>
+   <l:gentext key="Example" text="&#2441;&#2470;&#2494;&#2489;&#2480;&#2467;"/>
+   <l:gentext key="example" text="&#2441;&#2470;&#2494;&#2489;&#2480;&#2467;"/>
+   <l:gentext key="Figure" text="&#2458;&#2495;&#2468;&#2509;&#2480;"/>
+   <l:gentext key="figure" text="&#2458;&#2495;&#2468;&#2509;&#2480;"/>
+   <l:gentext key="Glossary" text="&#2472;&#2495;&#2480;&#2509;&#2456;&#2472;&#2509;&#2463;"/>
+   <l:gentext key="glossary" text="&#2472;&#2495;&#2480;&#2509;&#2456;&#2472;&#2509;&#2463;"/>
+   <l:gentext key="GlossSee" text="&#2470;&#2503;&#2454;&#2497;&#2472;"/>
+   <l:gentext key="glosssee" text="&#2470;&#2503;&#2454;&#2497;&#2472;"/>
+   <l:gentext key="GlossSeeAlso" text="&#2438;&#2480;&#2507; &#2470;&#2503;&#2454;&#2497;&#2472;"/>
+   <l:gentext key="glossseealso" text="&#2438;&#2480;&#2507; &#2470;&#2503;&#2454;&#2497;&#2472;"/>
+   <l:gentext key="IMPORTANT" text="&#2455;&#2497;&#2480;&#2497;&#2468;&#2509;&#2476;&#2474;&#2498;&#2480;&#2509;&#2467;"/>
+   <l:gentext key="important" text="&#2455;&#2497;&#2480;&#2497;&#2468;&#2509;&#2476;&#2474;&#2498;&#2480;&#2509;&#2467;"/>
+   <l:gentext key="Important" text="&#2455;&#2497;&#2480;&#2497;&#2468;&#2509;&#2476;&#2474;&#2498;&#2480;&#2509;&#2467;"/>
+   <l:gentext key="Index" text="&#2488;&#2498;&#2458;&#2495;"/>
+   <l:gentext key="index" text="&#2488;&#2498;&#2458;&#2495;"/>
+   <l:gentext key="ISBN" text="&#2438;&#2439;&#2447;&#2488;&#2476;&#2495;&#2447;&#2472; (ISBN)"/>
+   <l:gentext key="isbn" text="&#2438;&#2439;&#2447;&#2488;&#2476;&#2495;&#2447;&#2472; (ISBN)"/>
+   <l:gentext key="LegalNotice" text="&#2438;&#2439;&#2472;&#2496; &#2476;&#2495;&#2460;&#2509;&#2462;&#2474;&#2509;&#2468;&#2495;"/>
+   <l:gentext key="legalnotice" text="&#2438;&#2439;&#2472;&#2496; &#2476;&#2495;&#2460;&#2509;&#2462;&#2474;&#2509;&#2468;&#2495;"/>
+   <l:gentext key="MsgAud" text="&#2486;&#2509;&#2480;&#2507;&#2468;&#2494;"/>
+   <l:gentext key="msgaud" text="&#2486;&#2509;&#2480;&#2507;&#2468;&#2494;"/>
+   <l:gentext key="MsgLevel" text="&#2488;&#2509;&#2468;&#2480;"/>
+   <l:gentext key="msglevel" text="&#2488;&#2509;&#2468;&#2480;"/>
+   <l:gentext key="MsgOrig" text="&#2441;&#2468;&#2509;&#8205;&#2488;"/>
+   <l:gentext key="msgorig" text="&#2441;&#2468;&#2509;&#8205;&#2488;"/>
+   <l:gentext key="NOTE" text="&#2482;&#2453;&#2509;&#2487;&#2467;&#2496;&#2527;"/>
+   <l:gentext key="Note" text="&#2482;&#2453;&#2509;&#2487;&#2467;&#2496;&#2527;"/>
+   <l:gentext key="note" text="&#2482;&#2453;&#2509;&#2487;&#2467;&#2496;&#2527;"/>
+   <l:gentext key="Part" text="&#2454;&#2472;&#2509;&#2465;"/>
+   <l:gentext key="part" text="&#2454;&#2472;&#2509;&#2465;"/>
+   <l:gentext key="Preface" text="&#2478;&#2497;&#2454;&#2476;&#2472;&#2509;&#2471;"/>
+   <l:gentext key="preface" text="&#2478;&#2497;&#2454;&#2476;&#2472;&#2509;&#2471;"/>
+   <l:gentext key="Procedure" text="&#2474;&#2470;&#2509;&#2471;&#2468;&#2495;"/>
+   <l:gentext key="procedure" text="&#2474;&#2470;&#2509;&#2471;&#2468;&#2495;"/>
+   <l:gentext key="ProductionSet" text="&#2441;&#2468;&#2509;&#8205;&#2474;&#2494;&#2470;&#2472;"/>
+   <l:gentext key="PubDate" text="&#2474;&#2509;&#2480;&#2453;&#2494;&#2486;&#2472;&#2494;&#2480; &#2468;&#2494;&#2480;&#2495;&#2454;"/>
+   <l:gentext key="pubdate" text="&#2474;&#2509;&#2480;&#2453;&#2494;&#2486;&#2472;&#2494;&#2480; &#2468;&#2494;&#2480;&#2495;&#2454;"/>
+   <l:gentext key="Published" text="&#2474;&#2509;&#2480;&#2453;&#2494;&#2486;&#2495;&#2468;"/>
+   <l:gentext key="published" text="&#2474;&#2509;&#2480;&#2453;&#2494;&#2486;&#2495;&#2468;"/>
+   <l:gentext key="Qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="Question" text="&#2474;&#2509;&#2480;&#2486;&#2509;&#2472;:"/>
+   <l:gentext key="question" text="&#2474;&#2509;&#2480;&#2486;&#2509;&#2472;:"/>
+   <l:gentext key="RefEntry" text=""/>
+   <l:gentext key="refentry" text=""/>
+   <l:gentext key="Reference" text="&#2455;&#2509;&#2480;&#2472;&#2509;&#2469;&#2488;&#2498;&#2468;&#2509;&#2480;"/>
+   <l:gentext key="reference" text="&#2455;&#2509;&#2480;&#2472;&#2509;&#2469;&#2488;&#2498;&#2468;&#2509;&#2480;"/>
+   <l:gentext key="RefName" text="&#2472;&#2494;&#2478;"/>
+   <l:gentext key="refname" text="&#2472;&#2494;&#2478;"/>
+   <l:gentext key="RefSection" text=""/>
+   <l:gentext key="refsection" text=""/>
+   <l:gentext key="RefSynopsisDiv" text="&#2488;&#2494;&#2480;&#2494;&#2434;&#2486;"/>
+   <l:gentext key="refsynopsisdiv" text="&#2488;&#2494;&#2480;&#2494;&#2434;&#2486;"/>
+   <l:gentext key="RevHistory" text="&#2474;&#2480;&#2495;&#2476;&#2480;&#2509;&#2471;&#2472; &#2451; &#2474;&#2480;&#2495;&#2476;&#2480;&#2509;&#2468;&#2472; &#2468;&#2494;&#2482;&#2495;&#2453;&#2494;"/>
+   <l:gentext key="revhistory" text="&#2474;&#2480;&#2495;&#2476;&#2480;&#2509;&#2471;&#2472; &#2451; &#2474;&#2480;&#2495;&#2476;&#2480;&#2509;&#2468;&#2472; &#2468;&#2494;&#2482;&#2495;&#2453;&#2494;"/>
+   <l:gentext key="revision" text="&#2488;&#2434;&#2488;&#2509;&#2453;&#2480;&#2467;"/>
+   <l:gentext key="Revision" text="&#2488;&#2434;&#2488;&#2509;&#2453;&#2480;&#2467;"/>
+   <l:gentext key="sect1" text="&#2437;&#2472;&#2497;&#2458;&#2509;&#2459;&#2503;&#2470;"/>
+   <l:gentext key="sect2" text="&#2437;&#2472;&#2497;&#2458;&#2509;&#2459;&#2503;&#2470;"/>
+   <l:gentext key="sect3" text="&#2437;&#2472;&#2497;&#2458;&#2509;&#2459;&#2503;&#2470;"/>
+   <l:gentext key="sect4" text="&#2437;&#2472;&#2497;&#2458;&#2509;&#2459;&#2503;&#2470;"/>
+   <l:gentext key="sect5" text="&#2437;&#2472;&#2497;&#2458;&#2509;&#2459;&#2503;&#2470;"/>
+   <l:gentext key="section" text="&#2437;&#2472;&#2497;&#2458;&#2509;&#2459;&#2503;&#2470;"/>
+   <l:gentext key="Section" text="&#2437;&#2472;&#2497;&#2458;&#2509;&#2459;&#2503;&#2470;"/>
+   <l:gentext key="see" text="&#2470;&#2503;&#2454;&#2497;&#2472;"/>
+   <l:gentext key="See" text="&#2470;&#2503;&#2454;&#2497;&#2472;"/>
+   <l:gentext key="seealso" text="&#2438;&#2480;&#2507; &#2470;&#2503;&#2454;&#2497;&#2472;"/>
+   <l:gentext key="Seealso" text="&#2438;&#2480;&#2507; &#2470;&#2503;&#2454;&#2497;&#2472;"/>
+   <l:gentext key="SeeAlso" text="&#2438;&#2480;&#2507; &#2470;&#2503;&#2454;&#2497;&#2472;"/>
+   <l:gentext key="set" text="&#2488;&#2478;&#2487;&#2509;&#2463;&#2495;"/>
+   <l:gentext key="Set" text="&#2488;&#2478;&#2487;&#2509;&#2463;&#2495;"/>
+   <l:gentext key="setindex" text="&#2488;&#2498;&#2458;&#2495;&#2488;&#2478;&#2487;&#2509;&#2463;&#2495;"/>
+   <l:gentext key="SetIndex" text="&#2488;&#2498;&#2458;&#2495;&#2488;&#2478;&#2487;&#2509;&#2463;&#2495;"/>
+   <l:gentext key="Sidebar" text=""/>
+   <l:gentext key="sidebar" text="&#2488;&#2494;&#2439;&#2465;&#2476;&#2494;&#2480;"/>
+   <l:gentext key="step" text="&#2471;&#2494;&#2474;"/>
+   <l:gentext key="Step" text="&#2471;&#2494;&#2474;"/>
+   <l:gentext key="Table" text="&#2459;&#2453;"/>
+   <l:gentext key="table" text="&#2459;&#2453;"/>
+   <l:gentext key="tip" text="&#2439;&#2457;&#2509;&#2455;&#2495;&#2468;"/>
+   <l:gentext key="TIP" text="&#2439;&#2457;&#2509;&#2455;&#2495;&#2468;"/>
+   <l:gentext key="Tip" text="&#2439;&#2457;&#2509;&#2455;&#2495;&#2468;"/>
+   <l:gentext key="Warning" text="&#2488;&#2468;&#2480;&#2509;&#2453;&#2476;&#2494;&#2467;&#2496;"/>
+   <l:gentext key="warning" text="&#2488;&#2468;&#2480;&#2509;&#2453;&#2476;&#2494;&#2467;&#2496;"/>
+   <l:gentext key="WARNING" text="&#2488;&#2468;&#2480;&#2509;&#2453;&#2476;&#2494;&#2467;&#2496;"/>
+   <l:gentext key="and" text="&#2447;&#2476;&#2434;"/>
+   <l:gentext key="by" text="&#2470;&#2509;&#2476;&#2494;&#2480;&#2494;"/>
+   <l:gentext key="called" text="&#2441;&#2482;&#2509;&#2482;&#2503;&#2454;&#2453;&#2499;&#2468;"/>
+   <l:gentext key="Edited" text="&#2488;&#2478;&#2509;&#2474;&#2494;&#2470;&#2495;&#2468;"/>
+   <l:gentext key="edited" text="&#2488;&#2478;&#2509;&#2474;&#2494;&#2470;&#2495;&#2468;"/>
+   <l:gentext key="Editedby" text="&#2488;&#2478;&#2509;&#2474;&#2494;&#2470;&#2453;"/>
+   <l:gentext key="editedby" text="&#2488;&#2478;&#2509;&#2474;&#2494;&#2470;&#2453;"/>
+   <l:gentext key="in" text="&#2478;&#2471;&#2509;&#2479;&#2503;"/>
+   <l:gentext key="lastlistcomma" text=","/>
+   <l:gentext key="listcomma" text=","/>
+   <l:gentext key="nonexistantelement" text="&#2437;&#2488;&#2509;&#2468;&#2495;&#2468;&#2509;&#2476;&#2489;&#2496;&#2472; &#2441;&#2474;&#2494;&#2470;&#2494;&#2472;"/>
+   <l:gentext key="notes" text="&#2472;&#2507;&#2463;"/>
+   <l:gentext key="Notes" text="&#2472;&#2507;&#2463;"/>
+   <l:gentext key="Pgs" text="&#2474;&#2499;&#2487;&#2509;&#2464;&#2494;."/>
+   <l:gentext key="pgs" text="&#2474;&#2499;&#2487;&#2509;&#2464;&#2494;."/>
+   <l:gentext key="Revisedby" text="&#2474;&#2480;&#2495;&#2478;&#2494;&#2480;&#2509;&#2460;&#2472;&#2494;&#2453;&#2494;&#2480;&#2496;: "/>
+   <l:gentext key="revisedby" text="&#2474;&#2480;&#2495;&#2478;&#2494;&#2480;&#2509;&#2460;&#2472;&#2494;&#2453;&#2494;&#2480;&#2496;: "/>
+   <l:gentext key="TableNotes" text="&#2472;&#2507;&#2463;"/>
+   <l:gentext key="tablenotes" text="&#2472;&#2507;&#2463;"/>
+   <l:gentext key="TableofContents" text="&#2488;&#2498;&#2458;&#2495;&#2474;&#2468;&#2509;&#2480;"/>
+   <l:gentext key="tableofcontents" text="&#2488;&#2498;&#2458;&#2495;&#2474;&#2468;&#2509;&#2480;"/>
+   <l:gentext key="the" text=""/>
+   <l:gentext key="unexpectedelementname" text="&#2437;&#2474;&#2509;&#2480;&#2468;&#2509;&#2479;&#2494;&#2486;&#2495;&#2468; &#2441;&#2474;&#2494;&#2470;&#2494;&#2472;&#2503;&#2480; &#2472;&#2494;&#2478;"/>
+   <l:gentext key="unsupported" text="&#2437;&#2488;&#2478;&#2480;&#2509;&#2469;&#2495;&#2468;"/>
+   <l:gentext key="xrefto" text="&#2472;&#2495;&#2480;&#2509;&#2470;&#2503;&#2486; &#2453;&#2480;&#2503;"/>
+   <l:gentext key="listofequations" text="&#2488;&#2478;&#2496;&#2453;&#2480;&#2467; &#2468;&#2494;&#2482;&#2495;&#2453;&#2494;"/>
+   <l:gentext key="ListofEquations" text="&#2488;&#2478;&#2496;&#2453;&#2480;&#2467; &#2468;&#2494;&#2482;&#2495;&#2453;&#2494;"/>
+   <l:gentext key="ListofExamples" text="&#2441;&#2470;&#2494;&#2489;&#2480;&#2467; &#2468;&#2494;&#2482;&#2495;&#2453;&#2494;"/>
+   <l:gentext key="listofexamples" text="&#2441;&#2470;&#2494;&#2489;&#2480;&#2467; &#2468;&#2494;&#2482;&#2495;&#2453;&#2494;"/>
+   <l:gentext key="ListofFigures" text="&#2458;&#2495;&#2468;&#2509;&#2480;&#2468;&#2494;&#2482;&#2495;&#2453;&#2494;"/>
+   <l:gentext key="listoffigures" text="&#2458;&#2495;&#2468;&#2509;&#2480;&#2468;&#2494;&#2482;&#2495;&#2453;&#2494;"/>
+   <l:gentext key="ListofProcedures" text="&#2474;&#2470;&#2509;&#2471;&#2468;&#2495;&#2480; &#2468;&#2494;&#2482;&#2495;&#2453;&#2494;"/>
+   <l:gentext key="listofprocedures" text="&#2474;&#2470;&#2509;&#2471;&#2468;&#2495;&#2480; &#2468;&#2494;&#2482;&#2495;&#2453;&#2494;"/>
+   <l:gentext key="listoftables" text="&#2459;&#2453;&#2503;&#2480; &#2468;&#2494;&#2482;&#2495;&#2453;&#2494;"/>
+   <l:gentext key="ListofTables" text="&#2459;&#2453;&#2503;&#2480; &#2468;&#2494;&#2482;&#2495;&#2453;&#2494;"/>
+   <l:gentext key="ListofUnknown" text="&#2437;&#2460;&#2509;&#2462;&#2494;&#2468; &#2476;&#2488;&#2509;&#2468;&#2497;&#2480; &#2468;&#2494;&#2482;&#2495;&#2453;&#2494;"/>
+   <l:gentext key="listofunknown" text="&#2437;&#2460;&#2509;&#2462;&#2494;&#2468; &#2476;&#2488;&#2509;&#2468;&#2497;&#2480; &#2468;&#2494;&#2482;&#2495;&#2453;&#2494;"/>
+   <l:gentext key="nav-home" text="&#2474;&#2509;&#2480;&#2469;&#2478; &#2437;&#2476;&#2488;&#2509;&#2469;&#2494;&#2472; (Home)"/>
+   <l:gentext key="nav-next" text="&#2474;&#2480;&#2476;&#2480;&#2509;&#2468;&#2496;"/>
+   <l:gentext key="nav-next-sibling" text="&#2470;&#2509;&#2480;&#2497;&#2468; &#2488;&#2478;&#2509;&#2478;&#2497;&#2454;&#2503;"/>
+   <l:gentext key="nav-prev" text="&#2474;&#2498;&#2480;&#2509;&#2476;&#2476;&#2480;&#2509;&#2468;&#2496;"/>
+   <l:gentext key="nav-prev-sibling" text="&#2470;&#2509;&#2480;&#2497;&#2468; &#2474;&#2486;&#2509;&#2458;&#2494;&#2468;&#2503;"/>
+   <l:gentext key="nav-up" text="&#2441;&#2474;&#2480;"/>
+   <l:gentext key="nav-toc" text="&#2488;&#2498;&#2458;&#2495;&#2474;&#2468;&#2509;&#2480;"/>
+   <l:gentext key="Draft" text="&#2454;&#2488;&#2524;&#2494;"/>
+   <l:gentext key="above" text="&#2441;&#2474;&#2480;"/>
+   <l:gentext key="below" text="&#2472;&#2495;&#2458;"/>
+   <l:gentext key="sectioncalled" text="&#2437;&#2472;&#2497;&#2458;&#2509;&#2459;&#2503;&#2470;"/>
+   <l:gentext key="index symbols" text="&#2474;&#2509;&#2480;&#2468;&#2496;&#2453;"/>
+   <l:gentext key="lowercase.alpha" text="&#2437;&#2438;&#2439;&#2440;&#2441;&#2442;&#2447;&#2448;&#2451;&#2452;&#2443;&#2453;&#2454;&#2455;&#2456;&#2457;&#2458;&#2459;&#2460;&#2461;&#2462;&#2463;&#2464;&#2465;&#2466;&#2467;&#2468;&#2469;&#2470;&#2471;&#2472;&#2474;&#2475;&#2476;&#2477;&#2478;&#2479;&#2480;&#2482;&#2486;&#2487;&#2488;&#2489;&#2434;&#2435;"/>
+   <l:gentext key="uppercase.alpha" text="&#2437;&#2438;&#2439;&#2440;&#2441;&#2442;&#2447;&#2448;&#2451;&#2452;&#2443;&#2453;&#2454;&#2455;&#2456;&#2457;&#2458;&#2459;&#2460;&#2461;&#2462;&#2463;&#2464;&#2465;&#2466;&#2467;&#2468;&#2469;&#2470;&#2471;&#2472;&#2474;&#2475;&#2476;&#2477;&#2478;&#2479;&#2480;&#2482;&#2486;&#2487;&#2488;&#2489;&#2434;&#2435;"/>
+   <l:dingbat key="startquote" text="&#8220;"/>
+   <l:dingbat key="endquote" text="&#8221;"/>
+   <l:dingbat key="nestedstartquote" text="&#8216;"/>
+   <l:dingbat key="nestedendquote" text="&#8217;"/>
+   <l:dingbat key="singlestartquote" text="&#8216;"/>
+   <l:dingbat key="singleendquote" text="&#8217;"/>
+   <l:dingbat key="bullet" text="&#8226;"/>
+   <l:gentext key="hyphenation-character" text="-"/>
+   <l:gentext key="hyphenation-push-character-count" text="2"/>
+   <l:gentext key="hyphenation-remain-character-count" text="2"/>
+
+   <l:context name="styles">
+      <l:template name="person-name" text="first-last"/>
+   </l:context>
+
+   <l:context name="title">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="%t"/>
+      <l:template name="appendix" text="&#2474;&#2480;&#2495;&#2486;&#2495;&#2487;&#2509;&#2463;&#160;%n.&#160;%t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="biblioentry" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliolist" text="%t" lang="en"/>
+      <l:template name="bibliomixed" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="&#2437;&#2471;&#2509;&#2479;&#2494;&#2527;&#160;%n.&#160;%t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="&#2488;&#2478;&#2496;&#2453;&#2480;&#2467;&#160;%n.&#160;%t"/>
+      <l:template name="example" text="&#2441;&#2470;&#2494;&#2489;&#2480;&#2467;&#160;%n.&#160;%t"/>
+      <l:template name="figure" text="&#2458;&#2495;&#2468;&#2509;&#2480;&#160;%n.&#160;%t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="glosslist" text="%t" lang="en"/>
+      <l:template name="glossentry" text="%t"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text=""/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="&#2454;&#2472;&#2509;&#2465;&#160;%n.&#160;%t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="procedure.formal" text="&#2474;&#2470;&#2509;&#2471;&#2468;&#2495;&#160;%n.&#160;%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="productionset.formal" text="&#2441;&#2468;&#2509;&#8205;&#2474;&#2494;&#2470;&#2472;&#160;%n"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="%t"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="%t"/>
+      <l:template name="refentry" text="%t"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsection" text="%t"/>
+      <l:template name="refsect1" text="%t"/>
+      <l:template name="refsect2" text="%t"/>
+      <l:template name="refsect3" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="refsynopsisdivinfo" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="step" text="%t"/>
+      <l:template name="table" text="&#2459;&#2453;&#160;%n.&#160;%t"/>
+      <l:template name="task" text="%t" lang="en"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text=""/>
+      <l:template name="warning" text="%t"/>
+   </l:context>
+
+   <l:context name="title-unnumbered">
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article/appendix" text="%t"/>
+      <l:template name="bridgehead" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="sect1" text="%t"/>
+      <l:template name="sect2" text="%t"/>
+      <l:template name="sect3" text="%t"/>
+      <l:template name="sect4" text="%t"/>
+      <l:template name="sect5" text="%t"/>
+      <l:template name="section" text="%t"/>
+      <l:template name="simplesect" text="%t"/>
+   </l:context>
+
+   <l:context name="title-numbered">
+      <l:template name="appendix" text="&#2474;&#2480;&#2495;&#2486;&#2495;&#2487;&#2509;&#2463;&#160;%n.&#160;%t"/>
+      <l:template name="article/appendix" text="%n.&#160;%t"/>
+      <l:template name="bridgehead" text="%n.&#160;%t"/>
+      <l:template name="chapter" text="&#2437;&#2471;&#2509;&#2479;&#2494;&#2527;&#160;%n.&#160;%t"/>
+      <l:template name="sect1" text="%n.&#160;%t"/>
+      <l:template name="sect2" text="%n.&#160;%t"/>
+      <l:template name="sect3" text="%n.&#160;%t"/>
+      <l:template name="sect4" text="%n.&#160;%t"/>
+      <l:template name="sect5" text="%n.&#160;%t"/>
+      <l:template name="section" text="%n.&#160;%t"/>
+      <l:template name="simplesect" text="%t"/>
+   </l:context>
+
+   <l:context name="subtitle">
+      <l:template name="appendix" text="%s"/>
+      <l:template name="article" text="%s"/>
+      <l:template name="bibliodiv" text="%s"/>
+      <l:template name="biblioentry" text="%s"/>
+      <l:template name="bibliography" text="%s"/>
+      <l:template name="bibliomixed" text="%s"/>
+      <l:template name="bibliomset" text="%s"/>
+      <l:template name="biblioset" text="%s"/>
+      <l:template name="book" text="%s"/>
+      <l:template name="chapter" text="%s"/>
+      <l:template name="colophon" text="%s"/>
+      <l:template name="dedication" text="%s"/>
+      <l:template name="glossary" text="%s"/>
+      <l:template name="glossdiv" text="%s"/>
+      <l:template name="index" text="%s"/>
+      <l:template name="indexdiv" text="%s"/>
+      <l:template name="lot" text="%s"/>
+      <l:template name="part" text="%s"/>
+      <l:template name="partintro" text="%s"/>
+      <l:template name="preface" text="%s"/>
+      <l:template name="refentry" text="%s"/>
+      <l:template name="reference" text="%s"/>
+      <l:template name="refsection" text="%s"/>
+      <l:template name="refsect1" text="%s"/>
+      <l:template name="refsect2" text="%s"/>
+      <l:template name="refsect3" text="%s"/>
+      <l:template name="refsynopsisdiv" text="%s"/>
+      <l:template name="sect1" text="%s"/>
+      <l:template name="sect2" text="%s"/>
+      <l:template name="sect3" text="%s"/>
+      <l:template name="sect4" text="%s"/>
+      <l:template name="sect5" text="%s"/>
+      <l:template name="section" text="%s"/>
+      <l:template name="set" text="%s"/>
+      <l:template name="setindex" text="%s"/>
+      <l:template name="sidebar" text="%s"/>
+      <l:template name="simplesect" text="%s"/>
+      <l:template name="toc" text="%s"/>
+   </l:context>
+
+   <l:context name="xref">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="&#2441;&#2468;&#2509;&#2468;&#2480;:&#160;%n"/>
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="constraintdef" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="%t"/>
+      <l:template name="example" text="%t"/>
+      <l:template name="figure" text="%t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text="%n"/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="%t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="&#2474;&#2509;&#2480;&#2486;&#2509;&#2472;:&#160;%n"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="&#2474;&#2509;&#2480;&#2486;&#2509;&#2472;:&#160;%n"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="table" text="%t"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="%n"/>
+      <l:template name="warning" text="%t"/>
+      <l:template name="page.citation" text=" [%p]"/>
+      <l:template name="page" text="(page %p)" lang="en"/>
+      <l:template name="pageabbrev" text="(p. %p)" lang="en"/>
+      <l:template name="Page" text="Page %p" lang="en"/>
+      <l:template name="bridgehead" text="&#2437;&#2472;&#2497;&#2458;&#2509;&#2459;&#2503;&#2470; &#8220;%t&#8221;"/>
+      <l:template name="refsection" text="&#2437;&#2472;&#2497;&#2458;&#2509;&#2459;&#2503;&#2470; &#8220;%t&#8221;"/>
+      <l:template name="refsect1" text="&#2437;&#2472;&#2497;&#2458;&#2509;&#2459;&#2503;&#2470; &#8220;%t&#8221;"/>
+      <l:template name="refsect2" text="&#2437;&#2472;&#2497;&#2458;&#2509;&#2459;&#2503;&#2470; &#8220;%t&#8221;"/>
+      <l:template name="refsect3" text="&#2437;&#2472;&#2497;&#2458;&#2509;&#2459;&#2503;&#2470; &#8220;%t&#8221;"/>
+      <l:template name="sect1" text="&#2437;&#2472;&#2497;&#2458;&#2509;&#2459;&#2503;&#2470; &#8220;%t&#8221;"/>
+      <l:template name="sect2" text="&#2437;&#2472;&#2497;&#2458;&#2509;&#2459;&#2503;&#2470; &#8220;%t&#8221;"/>
+      <l:template name="sect3" text="&#2437;&#2472;&#2497;&#2458;&#2509;&#2459;&#2503;&#2470; &#8220;%t&#8221;"/>
+      <l:template name="sect4" text="&#2437;&#2472;&#2497;&#2458;&#2509;&#2459;&#2503;&#2470; &#8220;%t&#8221;"/>
+      <l:template name="sect5" text="&#2437;&#2472;&#2497;&#2458;&#2509;&#2459;&#2503;&#2470; &#8220;%t&#8221;"/>
+      <l:template name="section" text="&#2437;&#2472;&#2497;&#2458;&#2509;&#2459;&#2503;&#2470; &#8220;%t&#8221;"/>
+      <l:template name="simplesect" text="&#2437;&#2472;&#2497;&#2458;&#2509;&#2459;&#2503;&#2470; &#8220;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="xref-number">
+      <l:template name="answer" text="&#2441;&#2468;&#2509;&#2468;&#2480;:&#160;%n"/>
+      <l:template name="appendix" text="&#2474;&#2480;&#2495;&#2486;&#2495;&#2487;&#2509;&#2463;&#160;%n"/>
+      <l:template name="bridgehead" text="&#2437;&#2472;&#2497;&#2458;&#2509;&#2459;&#2503;&#2470;&#160;%n"/>
+      <l:template name="chapter" text="&#2437;&#2471;&#2509;&#2479;&#2494;&#2527;&#160;%n"/>
+      <l:template name="equation" text="&#2488;&#2478;&#2496;&#2453;&#2480;&#2467;&#160;%n"/>
+      <l:template name="example" text="&#2441;&#2470;&#2494;&#2489;&#2480;&#2467;&#160;%n"/>
+      <l:template name="figure" text="&#2458;&#2495;&#2468;&#2509;&#2480;&#160;%n"/>
+      <l:template name="part" text="&#2454;&#2472;&#2509;&#2465;&#160;%n"/>
+      <l:template name="procedure" text="&#2474;&#2470;&#2509;&#2471;&#2468;&#2495;&#160;%n"/>
+      <l:template name="productionset" text="&#2441;&#2468;&#2509;&#8205;&#2474;&#2494;&#2470;&#2472;&#160;%n"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n"/>
+      <l:template name="qandaentry" text="&#2474;&#2509;&#2480;&#2486;&#2509;&#2472;:&#160;%n"/>
+      <l:template name="question" text="&#2474;&#2509;&#2480;&#2486;&#2509;&#2472;:&#160;%n"/>
+      <l:template name="sect1" text="&#2437;&#2472;&#2497;&#2458;&#2509;&#2459;&#2503;&#2470;&#160;%n"/>
+      <l:template name="sect2" text="&#2437;&#2472;&#2497;&#2458;&#2509;&#2459;&#2503;&#2470;&#160;%n"/>
+      <l:template name="sect3" text="&#2437;&#2472;&#2497;&#2458;&#2509;&#2459;&#2503;&#2470;&#160;%n"/>
+      <l:template name="sect4" text="&#2437;&#2472;&#2497;&#2458;&#2509;&#2459;&#2503;&#2470;&#160;%n"/>
+      <l:template name="sect5" text="&#2437;&#2472;&#2497;&#2458;&#2509;&#2459;&#2503;&#2470;&#160;%n"/>
+      <l:template name="section" text="&#2437;&#2472;&#2497;&#2458;&#2509;&#2459;&#2503;&#2470;&#160;%n"/>
+      <l:template name="table" text="&#2459;&#2453;&#160;%n"/>
+   </l:context>
+
+   <l:context name="xref-number-and-title">
+      <l:template name="appendix" text="&#2474;&#2480;&#2495;&#2486;&#2495;&#2487;&#2509;&#2463;&#160;%n, %t"/>
+      <l:template name="bridgehead" text="&#2437;&#2472;&#2497;&#2458;&#2509;&#2459;&#2503;&#2470;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="chapter" text="&#2437;&#2471;&#2509;&#2479;&#2494;&#2527;&#160;%n, %t"/>
+      <l:template name="equation" text="&#2488;&#2478;&#2496;&#2453;&#2480;&#2467;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="example" text="&#2441;&#2470;&#2494;&#2489;&#2480;&#2467;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="figure" text="&#2458;&#2495;&#2468;&#2509;&#2480;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="part" text="&#2454;&#2472;&#2509;&#2465;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="procedure" text="&#2474;&#2470;&#2509;&#2471;&#2468;&#2495;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="productionset" text="&#2441;&#2468;&#2509;&#8205;&#2474;&#2494;&#2470;&#2472;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="refsect1" text="&#2437;&#2472;&#2497;&#2458;&#2509;&#2459;&#2503;&#2470; &#8220;%t&#8221;"/>
+      <l:template name="refsect2" text="&#2437;&#2472;&#2497;&#2458;&#2509;&#2459;&#2503;&#2470; &#8220;%t&#8221;"/>
+      <l:template name="refsect3" text="&#2437;&#2472;&#2497;&#2458;&#2509;&#2459;&#2503;&#2470; &#8220;%t&#8221;"/>
+      <l:template name="refsection" text="&#2437;&#2472;&#2497;&#2458;&#2509;&#2459;&#2503;&#2470; &#8220;%t&#8221;"/>
+      <l:template name="sect1" text="&#2437;&#2472;&#2497;&#2458;&#2509;&#2459;&#2503;&#2470;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect2" text="&#2437;&#2472;&#2497;&#2458;&#2509;&#2459;&#2503;&#2470;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect3" text="&#2437;&#2472;&#2497;&#2458;&#2509;&#2459;&#2503;&#2470;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect4" text="&#2437;&#2472;&#2497;&#2458;&#2509;&#2459;&#2503;&#2470;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect5" text="&#2437;&#2472;&#2497;&#2458;&#2509;&#2459;&#2503;&#2470;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="section" text="&#2437;&#2472;&#2497;&#2458;&#2509;&#2459;&#2503;&#2470;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="simplesect" text="&#2437;&#2472;&#2497;&#2458;&#2509;&#2459;&#2503;&#2470; &#8220;%t&#8221;"/>
+      <l:template name="table" text="&#2459;&#2453;&#160;%n, &#8220;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="authorgroup">
+      <l:template name="sep" text=", "/>
+      <l:template name="sep2" text=" &#2447;&#2476;&#2434; "/>
+      <l:template name="seplast" text=", &#2447;&#2476;&#2434; "/>
+   </l:context>
+
+   <l:context name="glossary">
+      <l:template name="see" text="&#2470;&#2503;&#2454;&#2497;&#2472; "/>
+      <l:template name="seealso" text="&#2438;&#2480;&#2507; &#2470;&#2503;&#2454;&#2497;&#2472; "/>
+   </l:context>
+
+   <l:context name="msgset">
+      <l:template name="MsgAud" text="&#2486;&#2509;&#2480;&#2507;&#2468;&#2494;: "/>
+      <l:template name="MsgLevel" text="&#2488;&#2509;&#2468;&#2480;: "/>
+      <l:template name="MsgOrig" text="&#2441;&#2468;&#2509;&#8205;&#2488;: "/>
+   </l:context>
+
+   <l:context name="datetime">
+      <l:template name="format" text="d/m/Y"/>
+   </l:context>
+
+   <l:context name="datetime-full">
+      <l:template name="January" text="&#2460;&#2494;&#2472;&#2497;&#2527;&#2494;&#2480;&#2496;"/>
+      <l:template name="February" text="&#2475;&#2503;&#2476;&#2509;&#2480;&#2497;&#2527;&#2494;&#2480;&#2496;"/>
+      <l:template name="March" text="&#2478;&#2494;&#2480;&#2509;&#2458;"/>
+      <l:template name="April" text="&#2447;&#2474;&#2509;&#2480;&#2495;&#2482;"/>
+      <l:template name="May" text="&#2478;&#2503;"/>
+      <l:template name="June" text="&#2460;&#2497;&#2472;"/>
+      <l:template name="July" text="&#2460;&#2497;&#2482;&#2494;&#2439;"/>
+      <l:template name="August" text="&#2438;&#2455;&#2488;&#2509;&#2463;"/>
+      <l:template name="September" text="&#2488;&#2503;&#2474;&#2509;&#2463;&#2503;&#2478;&#2509;&#2476;&#2480;"/>
+      <l:template name="October" text="&#2437;&#2453;&#2509;&#2463;&#2507;&#2476;&#2480;"/>
+      <l:template name="November" text="&#2472;&#2477;&#2503;&#2478;&#2509;&#2476;&#2480;"/>
+      <l:template name="December" text="&#2465;&#2495;&#2488;&#2503;&#2478;&#2509;&#2476;&#2480;"/>
+      <l:template name="Monday" text="&#2488;&#2507;&#2478;&#2476;&#2494;&#2480;"/>
+      <l:template name="Tuesday" text="&#2478;&#2457;&#2509;&#2455;&#2482;&#2476;&#2494;&#2480;"/>
+      <l:template name="Wednesday" text="&#2476;&#2497;&#2471;&#2476;&#2494;&#2480;"/>
+      <l:template name="Thursday" text="&#2476;&#2499;&#2489;&#2435;&#2488;&#2509;&#2474;&#2468;&#2495;&#2476;&#2494;&#2480;"/>
+      <l:template name="Friday" text="&#2486;&#2497;&#2453;&#2509;&#2480;&#2476;&#2494;&#2480;"/>
+      <l:template name="Saturday" text="&#2486;&#2472;&#2495;&#2476;&#2494;&#2480;"/>
+      <l:template name="Sunday" text="&#2480;&#2476;&#2495;&#2476;&#2494;&#2480;"/>
+   </l:context>
+
+   <l:context name="datetime-abbrev">
+      <l:template name="Jan" text="&#2460;&#2494;&#2472;&#2497;&#2527;&#2494;&#2480;&#2496;"/>
+      <l:template name="Feb" text="&#2475;&#2503;&#2476;&#2509;&#2480;&#2497;&#2527;&#2494;&#2480;&#2496;"/>
+      <l:template name="Mar" text="&#2478;&#2494;&#2480;&#2509;&#2458;"/>
+      <l:template name="Apr" text="&#2447;&#2474;&#2509;&#2480;&#2495;&#2482;"/>
+      <l:template name="May" text="&#2478;&#2503;"/>
+      <l:template name="Jun" text="&#2460;&#2497;&#2472;"/>
+      <l:template name="Jul" text="&#2460;&#2497;&#2482;&#2494;&#2439;"/>
+      <l:template name="Aug" text="&#2438;&#2455;&#2488;&#2509;&#2463;"/>
+      <l:template name="Sep" text="&#2488;&#2503;&#2474;&#2509;&#2463;&#2503;&#2478;&#2509;&#2476;&#2480;"/>
+      <l:template name="Oct" text="&#2437;&#2453;&#2509;&#2463;&#2507;&#2476;&#2480;"/>
+      <l:template name="Nov" text="&#2472;&#2477;&#2503;&#2478;&#2509;&#2476;&#2480;"/>
+      <l:template name="Dec" text="&#2465;&#2495;&#2488;&#2503;&#2478;&#2509;&#2476;&#2480;"/>
+      <l:template name="Mon" text="&#2488;&#2507;&#2478;"/>
+      <l:template name="Tue" text="&#2478;&#2457;&#2509;&#2455;&#2482;"/>
+      <l:template name="Wed" text="&#2476;&#2497;&#2471;"/>
+      <l:template name="Thu" text="&#2476;&#2499;&#2489;&#2435;&#2488;&#2509;&#2474;&#2468;&#2495;"/>
+      <l:template name="Fri" text="&#2486;&#2497;&#2453;&#2509;&#2480;"/>
+      <l:template name="Sat" text="&#2486;&#2472;&#2495;"/>
+      <l:template name="Sun" text="&#2480;&#2476;&#2495;"/>
+   </l:context>
+
+   <l:context name="htmlhelp">
+      <l:template name="langcode" text=" 0x0439 Bangla (Bangladesh and India)"/>
+   </l:context>
+
+   <l:letters lang="en">
+      <l:l i="-1"/>
+      <l:l i="0">Symbols</l:l>
+      <l:l i="10">A</l:l>
+      <l:l i="10">a</l:l>
+      <l:l i="10">&#192;</l:l>
+      <l:l i="10">&#224;</l:l>
+      <l:l i="10">&#193;</l:l>
+      <l:l i="10">&#225;</l:l>
+      <l:l i="10">&#194;</l:l>
+      <l:l i="10">&#226;</l:l>
+      <l:l i="10">&#195;</l:l>
+      <l:l i="10">&#227;</l:l>
+      <l:l i="10">&#196;</l:l>
+      <l:l i="10">&#228;</l:l>
+      <l:l i="10">&#197;</l:l>
+      <l:l i="10">&#229;</l:l>
+      <l:l i="10">&#256;</l:l>
+      <l:l i="10">&#257;</l:l>
+      <l:l i="10">&#258;</l:l>
+      <l:l i="10">&#259;</l:l>
+      <l:l i="10">&#260;</l:l>
+      <l:l i="10">&#261;</l:l>
+      <l:l i="10">&#461;</l:l>
+      <l:l i="10">&#462;</l:l>
+      <l:l i="10">&#478;</l:l>
+      <l:l i="10">&#479;</l:l>
+      <l:l i="10">&#480;</l:l>
+      <l:l i="10">&#481;</l:l>
+      <l:l i="10">&#506;</l:l>
+      <l:l i="10">&#507;</l:l>
+      <l:l i="10">&#512;</l:l>
+      <l:l i="10">&#513;</l:l>
+      <l:l i="10">&#514;</l:l>
+      <l:l i="10">&#515;</l:l>
+      <l:l i="10">&#550;</l:l>
+      <l:l i="10">&#551;</l:l>
+      <l:l i="10">&#7680;</l:l>
+      <l:l i="10">&#7681;</l:l>
+      <l:l i="10">&#7834;</l:l>
+      <l:l i="10">&#7840;</l:l>
+      <l:l i="10">&#7841;</l:l>
+      <l:l i="10">&#7842;</l:l>
+      <l:l i="10">&#7843;</l:l>
+      <l:l i="10">&#7844;</l:l>
+      <l:l i="10">&#7845;</l:l>
+      <l:l i="10">&#7846;</l:l>
+      <l:l i="10">&#7847;</l:l>
+      <l:l i="10">&#7848;</l:l>
+      <l:l i="10">&#7849;</l:l>
+      <l:l i="10">&#7850;</l:l>
+      <l:l i="10">&#7851;</l:l>
+      <l:l i="10">&#7852;</l:l>
+      <l:l i="10">&#7853;</l:l>
+      <l:l i="10">&#7854;</l:l>
+      <l:l i="10">&#7855;</l:l>
+      <l:l i="10">&#7856;</l:l>
+      <l:l i="10">&#7857;</l:l>
+      <l:l i="10">&#7858;</l:l>
+      <l:l i="10">&#7859;</l:l>
+      <l:l i="10">&#7860;</l:l>
+      <l:l i="10">&#7861;</l:l>
+      <l:l i="10">&#7862;</l:l>
+      <l:l i="10">&#7863;</l:l>
+      <l:l i="20">B</l:l>
+      <l:l i="20">b</l:l>
+      <l:l i="20">&#384;</l:l>
+      <l:l i="20">&#385;</l:l>
+      <l:l i="20">&#595;</l:l>
+      <l:l i="20">&#386;</l:l>
+      <l:l i="20">&#387;</l:l>
+      <l:l i="20">&#7682;</l:l>
+      <l:l i="20">&#7683;</l:l>
+      <l:l i="20">&#7684;</l:l>
+      <l:l i="20">&#7685;</l:l>
+      <l:l i="20">&#7686;</l:l>
+      <l:l i="20">&#7687;</l:l>
+      <l:l i="30">C</l:l>
+      <l:l i="30">c</l:l>
+      <l:l i="30">&#199;</l:l>
+      <l:l i="30">&#231;</l:l>
+      <l:l i="30">&#262;</l:l>
+      <l:l i="30">&#263;</l:l>
+      <l:l i="30">&#264;</l:l>
+      <l:l i="30">&#265;</l:l>
+      <l:l i="30">&#266;</l:l>
+      <l:l i="30">&#267;</l:l>
+      <l:l i="30">&#268;</l:l>
+      <l:l i="30">&#269;</l:l>
+      <l:l i="30">&#391;</l:l>
+      <l:l i="30">&#392;</l:l>
+      <l:l i="30">&#597;</l:l>
+      <l:l i="30">&#7688;</l:l>
+      <l:l i="30">&#7689;</l:l>
+      <l:l i="40">D</l:l>
+      <l:l i="40">d</l:l>
+      <l:l i="40">&#270;</l:l>
+      <l:l i="40">&#271;</l:l>
+      <l:l i="40">&#272;</l:l>
+      <l:l i="40">&#273;</l:l>
+      <l:l i="40">&#394;</l:l>
+      <l:l i="40">&#599;</l:l>
+      <l:l i="40">&#395;</l:l>
+      <l:l i="40">&#396;</l:l>
+      <l:l i="40">&#453;</l:l>
+      <l:l i="40">&#498;</l:l>
+      <l:l i="40">&#545;</l:l>
+      <l:l i="40">&#598;</l:l>
+      <l:l i="40">&#7690;</l:l>
+      <l:l i="40">&#7691;</l:l>
+      <l:l i="40">&#7692;</l:l>
+      <l:l i="40">&#7693;</l:l>
+      <l:l i="40">&#7694;</l:l>
+      <l:l i="40">&#7695;</l:l>
+      <l:l i="40">&#7696;</l:l>
+      <l:l i="40">&#7697;</l:l>
+      <l:l i="40">&#7698;</l:l>
+      <l:l i="40">&#7699;</l:l>
+      <l:l i="50">E</l:l>
+      <l:l i="50">e</l:l>
+      <l:l i="50">&#200;</l:l>
+      <l:l i="50">&#232;</l:l>
+      <l:l i="50">&#201;</l:l>
+      <l:l i="50">&#233;</l:l>
+      <l:l i="50">&#202;</l:l>
+      <l:l i="50">&#234;</l:l>
+      <l:l i="50">&#203;</l:l>
+      <l:l i="50">&#235;</l:l>
+      <l:l i="50">&#274;</l:l>
+      <l:l i="50">&#275;</l:l>
+      <l:l i="50">&#276;</l:l>
+      <l:l i="50">&#277;</l:l>
+      <l:l i="50">&#278;</l:l>
+      <l:l i="50">&#279;</l:l>
+      <l:l i="50">&#280;</l:l>
+      <l:l i="50">&#281;</l:l>
+      <l:l i="50">&#282;</l:l>
+      <l:l i="50">&#283;</l:l>
+      <l:l i="50">&#516;</l:l>
+      <l:l i="50">&#517;</l:l>
+      <l:l i="50">&#518;</l:l>
+      <l:l i="50">&#519;</l:l>
+      <l:l i="50">&#552;</l:l>
+      <l:l i="50">&#553;</l:l>
+      <l:l i="50">&#7700;</l:l>
+      <l:l i="50">&#7701;</l:l>
+      <l:l i="50">&#7702;</l:l>
+      <l:l i="50">&#7703;</l:l>
+      <l:l i="50">&#7704;</l:l>
+      <l:l i="50">&#7705;</l:l>
+      <l:l i="50">&#7706;</l:l>
+      <l:l i="50">&#7707;</l:l>
+      <l:l i="50">&#7708;</l:l>
+      <l:l i="50">&#7709;</l:l>
+      <l:l i="50">&#7864;</l:l>
+      <l:l i="50">&#7865;</l:l>
+      <l:l i="50">&#7866;</l:l>
+      <l:l i="50">&#7867;</l:l>
+      <l:l i="50">&#7868;</l:l>
+      <l:l i="50">&#7869;</l:l>
+      <l:l i="50">&#7870;</l:l>
+      <l:l i="50">&#7871;</l:l>
+      <l:l i="50">&#7872;</l:l>
+      <l:l i="50">&#7873;</l:l>
+      <l:l i="50">&#7874;</l:l>
+      <l:l i="50">&#7875;</l:l>
+      <l:l i="50">&#7876;</l:l>
+      <l:l i="50">&#7877;</l:l>
+      <l:l i="50">&#7878;</l:l>
+      <l:l i="50">&#7879;</l:l>
+      <l:l i="60">F</l:l>
+      <l:l i="60">f</l:l>
+      <l:l i="60">&#401;</l:l>
+      <l:l i="60">&#402;</l:l>
+      <l:l i="60">&#7710;</l:l>
+      <l:l i="60">&#7711;</l:l>
+      <l:l i="70">G</l:l>
+      <l:l i="70">g</l:l>
+      <l:l i="70">&#284;</l:l>
+      <l:l i="70">&#285;</l:l>
+      <l:l i="70">&#286;</l:l>
+      <l:l i="70">&#287;</l:l>
+      <l:l i="70">&#288;</l:l>
+      <l:l i="70">&#289;</l:l>
+      <l:l i="70">&#290;</l:l>
+      <l:l i="70">&#291;</l:l>
+      <l:l i="70">&#403;</l:l>
+      <l:l i="70">&#608;</l:l>
+      <l:l i="70">&#484;</l:l>
+      <l:l i="70">&#485;</l:l>
+      <l:l i="70">&#486;</l:l>
+      <l:l i="70">&#487;</l:l>
+      <l:l i="70">&#500;</l:l>
+      <l:l i="70">&#501;</l:l>
+      <l:l i="70">&#7712;</l:l>
+      <l:l i="70">&#7713;</l:l>
+      <l:l i="80">H</l:l>
+      <l:l i="80">h</l:l>
+      <l:l i="80">&#292;</l:l>
+      <l:l i="80">&#293;</l:l>
+      <l:l i="80">&#294;</l:l>
+      <l:l i="80">&#295;</l:l>
+      <l:l i="80">&#542;</l:l>
+      <l:l i="80">&#543;</l:l>
+      <l:l i="80">&#614;</l:l>
+      <l:l i="80">&#7714;</l:l>
+      <l:l i="80">&#7715;</l:l>
+      <l:l i="80">&#7716;</l:l>
+      <l:l i="80">&#7717;</l:l>
+      <l:l i="80">&#7718;</l:l>
+      <l:l i="80">&#7719;</l:l>
+      <l:l i="80">&#7720;</l:l>
+      <l:l i="80">&#7721;</l:l>
+      <l:l i="80">&#7722;</l:l>
+      <l:l i="80">&#7723;</l:l>
+      <l:l i="80">&#7830;</l:l>
+      <l:l i="90">I</l:l>
+      <l:l i="90">i</l:l>
+      <l:l i="90">&#204;</l:l>
+      <l:l i="90">&#236;</l:l>
+      <l:l i="90">&#205;</l:l>
+      <l:l i="90">&#237;</l:l>
+      <l:l i="90">&#206;</l:l>
+      <l:l i="90">&#238;</l:l>
+      <l:l i="90">&#207;</l:l>
+      <l:l i="90">&#239;</l:l>
+      <l:l i="90">&#296;</l:l>
+      <l:l i="90">&#297;</l:l>
+      <l:l i="90">&#298;</l:l>
+      <l:l i="90">&#299;</l:l>
+      <l:l i="90">&#300;</l:l>
+      <l:l i="90">&#301;</l:l>
+      <l:l i="90">&#302;</l:l>
+      <l:l i="90">&#303;</l:l>
+      <l:l i="90">&#304;</l:l>
+      <l:l i="90">&#407;</l:l>
+      <l:l i="90">&#616;</l:l>
+      <l:l i="90">&#463;</l:l>
+      <l:l i="90">&#464;</l:l>
+      <l:l i="90">&#520;</l:l>
+      <l:l i="90">&#521;</l:l>
+      <l:l i="90">&#522;</l:l>
+      <l:l i="90">&#523;</l:l>
+      <l:l i="90">&#7724;</l:l>
+      <l:l i="90">&#7725;</l:l>
+      <l:l i="90">&#7726;</l:l>
+      <l:l i="90">&#7727;</l:l>
+      <l:l i="90">&#7880;</l:l>
+      <l:l i="90">&#7881;</l:l>
+      <l:l i="90">&#7882;</l:l>
+      <l:l i="90">&#7883;</l:l>
+      <l:l i="100">J</l:l>
+      <l:l i="100">j</l:l>
+      <l:l i="100">&#308;</l:l>
+      <l:l i="100">&#309;</l:l>
+      <l:l i="100">&#496;</l:l>
+      <l:l i="100">&#669;</l:l>
+      <l:l i="110">K</l:l>
+      <l:l i="110">k</l:l>
+      <l:l i="110">&#310;</l:l>
+      <l:l i="110">&#311;</l:l>
+      <l:l i="110">&#408;</l:l>
+      <l:l i="110">&#409;</l:l>
+      <l:l i="110">&#488;</l:l>
+      <l:l i="110">&#489;</l:l>
+      <l:l i="110">&#7728;</l:l>
+      <l:l i="110">&#7729;</l:l>
+      <l:l i="110">&#7730;</l:l>
+      <l:l i="110">&#7731;</l:l>
+      <l:l i="110">&#7732;</l:l>
+      <l:l i="110">&#7733;</l:l>
+      <l:l i="120">L</l:l>
+      <l:l i="120">l</l:l>
+      <l:l i="120">&#313;</l:l>
+      <l:l i="120">&#314;</l:l>
+      <l:l i="120">&#315;</l:l>
+      <l:l i="120">&#316;</l:l>
+      <l:l i="120">&#317;</l:l>
+      <l:l i="120">&#318;</l:l>
+      <l:l i="120">&#319;</l:l>
+      <l:l i="120">&#320;</l:l>
+      <l:l i="120">&#321;</l:l>
+      <l:l i="120">&#322;</l:l>
+      <l:l i="120">&#410;</l:l>
+      <l:l i="120">&#456;</l:l>
+      <l:l i="120">&#564;</l:l>
+      <l:l i="120">&#619;</l:l>
+      <l:l i="120">&#620;</l:l>
+      <l:l i="120">&#621;</l:l>
+      <l:l i="120">&#7734;</l:l>
+      <l:l i="120">&#7735;</l:l>
+      <l:l i="120">&#7736;</l:l>
+      <l:l i="120">&#7737;</l:l>
+      <l:l i="120">&#7738;</l:l>
+      <l:l i="120">&#7739;</l:l>
+      <l:l i="120">&#7740;</l:l>
+      <l:l i="120">&#7741;</l:l>
+      <l:l i="130">M</l:l>
+      <l:l i="130">m</l:l>
+      <l:l i="130">&#625;</l:l>
+      <l:l i="130">&#7742;</l:l>
+      <l:l i="130">&#7743;</l:l>
+      <l:l i="130">&#7744;</l:l>
+      <l:l i="130">&#7745;</l:l>
+      <l:l i="130">&#7746;</l:l>
+      <l:l i="130">&#7747;</l:l>
+      <l:l i="140">N</l:l>
+      <l:l i="140">n</l:l>
+      <l:l i="140">&#209;</l:l>
+      <l:l i="140">&#241;</l:l>
+      <l:l i="140">&#323;</l:l>
+      <l:l i="140">&#324;</l:l>
+      <l:l i="140">&#325;</l:l>
+      <l:l i="140">&#326;</l:l>
+      <l:l i="140">&#327;</l:l>
+      <l:l i="140">&#328;</l:l>
+      <l:l i="140">&#413;</l:l>
+      <l:l i="140">&#626;</l:l>
+      <l:l i="140">&#414;</l:l>
+      <l:l i="140">&#544;</l:l>
+      <l:l i="140">&#459;</l:l>
+      <l:l i="140">&#504;</l:l>
+      <l:l i="140">&#505;</l:l>
+      <l:l i="140">&#565;</l:l>
+      <l:l i="140">&#627;</l:l>
+      <l:l i="140">&#7748;</l:l>
+      <l:l i="140">&#7749;</l:l>
+      <l:l i="140">&#7750;</l:l>
+      <l:l i="140">&#7751;</l:l>
+      <l:l i="140">&#7752;</l:l>
+      <l:l i="140">&#7753;</l:l>
+      <l:l i="140">&#7754;</l:l>
+      <l:l i="140">&#7755;</l:l>
+      <l:l i="150">O</l:l>
+      <l:l i="150">o</l:l>
+      <l:l i="150">&#210;</l:l>
+      <l:l i="150">&#242;</l:l>
+      <l:l i="150">&#211;</l:l>
+      <l:l i="150">&#243;</l:l>
+      <l:l i="150">&#212;</l:l>
+      <l:l i="150">&#244;</l:l>
+      <l:l i="150">&#213;</l:l>
+      <l:l i="150">&#245;</l:l>
+      <l:l i="150">&#214;</l:l>
+      <l:l i="150">&#246;</l:l>
+      <l:l i="150">&#216;</l:l>
+      <l:l i="150">&#248;</l:l>
+      <l:l i="150">&#332;</l:l>
+      <l:l i="150">&#333;</l:l>
+      <l:l i="150">&#334;</l:l>
+      <l:l i="150">&#335;</l:l>
+      <l:l i="150">&#336;</l:l>
+      <l:l i="150">&#337;</l:l>
+      <l:l i="150">&#415;</l:l>
+      <l:l i="150">&#416;</l:l>
+      <l:l i="150">&#417;</l:l>
+      <l:l i="150">&#465;</l:l>
+      <l:l i="150">&#466;</l:l>
+      <l:l i="150">&#490;</l:l>
+      <l:l i="150">&#491;</l:l>
+      <l:l i="150">&#492;</l:l>
+      <l:l i="150">&#493;</l:l>
+      <l:l i="150">&#510;</l:l>
+      <l:l i="150">&#511;</l:l>
+      <l:l i="150">&#524;</l:l>
+      <l:l i="150">&#525;</l:l>
+      <l:l i="150">&#526;</l:l>
+      <l:l i="150">&#527;</l:l>
+      <l:l i="150">&#554;</l:l>
+      <l:l i="150">&#555;</l:l>
+      <l:l i="150">&#556;</l:l>
+      <l:l i="150">&#557;</l:l>
+      <l:l i="150">&#558;</l:l>
+      <l:l i="150">&#559;</l:l>
+      <l:l i="150">&#560;</l:l>
+      <l:l i="150">&#561;</l:l>
+      <l:l i="150">&#7756;</l:l>
+      <l:l i="150">&#7757;</l:l>
+      <l:l i="150">&#7758;</l:l>
+      <l:l i="150">&#7759;</l:l>
+      <l:l i="150">&#7760;</l:l>
+      <l:l i="150">&#7761;</l:l>
+      <l:l i="150">&#7762;</l:l>
+      <l:l i="150">&#7763;</l:l>
+      <l:l i="150">&#7884;</l:l>
+      <l:l i="150">&#7885;</l:l>
+      <l:l i="150">&#7886;</l:l>
+      <l:l i="150">&#7887;</l:l>
+      <l:l i="150">&#7888;</l:l>
+      <l:l i="150">&#7889;</l:l>
+      <l:l i="150">&#7890;</l:l>
+      <l:l i="150">&#7891;</l:l>
+      <l:l i="150">&#7892;</l:l>
+      <l:l i="150">&#7893;</l:l>
+      <l:l i="150">&#7894;</l:l>
+      <l:l i="150">&#7895;</l:l>
+      <l:l i="150">&#7896;</l:l>
+      <l:l i="150">&#7897;</l:l>
+      <l:l i="150">&#7898;</l:l>
+      <l:l i="150">&#7899;</l:l>
+      <l:l i="150">&#7900;</l:l>
+      <l:l i="150">&#7901;</l:l>
+      <l:l i="150">&#7902;</l:l>
+      <l:l i="150">&#7903;</l:l>
+      <l:l i="150">&#7904;</l:l>
+      <l:l i="150">&#7905;</l:l>
+      <l:l i="150">&#7906;</l:l>
+      <l:l i="150">&#7907;</l:l>
+      <l:l i="160">P</l:l>
+      <l:l i="160">p</l:l>
+      <l:l i="160">&#420;</l:l>
+      <l:l i="160">&#421;</l:l>
+      <l:l i="160">&#7764;</l:l>
+      <l:l i="160">&#7765;</l:l>
+      <l:l i="160">&#7766;</l:l>
+      <l:l i="160">&#7767;</l:l>
+      <l:l i="170">Q</l:l>
+      <l:l i="170">q</l:l>
+      <l:l i="170">&#672;</l:l>
+      <l:l i="180">R</l:l>
+      <l:l i="180">r</l:l>
+      <l:l i="180">&#340;</l:l>
+      <l:l i="180">&#341;</l:l>
+      <l:l i="180">&#342;</l:l>
+      <l:l i="180">&#343;</l:l>
+      <l:l i="180">&#344;</l:l>
+      <l:l i="180">&#345;</l:l>
+      <l:l i="180">&#528;</l:l>
+      <l:l i="180">&#529;</l:l>
+      <l:l i="180">&#530;</l:l>
+      <l:l i="180">&#531;</l:l>
+      <l:l i="180">&#636;</l:l>
+      <l:l i="180">&#637;</l:l>
+      <l:l i="180">&#638;</l:l>
+      <l:l i="180">&#7768;</l:l>
+      <l:l i="180">&#7769;</l:l>
+      <l:l i="180">&#7770;</l:l>
+      <l:l i="180">&#7771;</l:l>
+      <l:l i="180">&#7772;</l:l>
+      <l:l i="180">&#7773;</l:l>
+      <l:l i="180">&#7774;</l:l>
+      <l:l i="180">&#7775;</l:l>
+      <l:l i="190">S</l:l>
+      <l:l i="190">s</l:l>
+      <l:l i="190">&#346;</l:l>
+      <l:l i="190">&#347;</l:l>
+      <l:l i="190">&#348;</l:l>
+      <l:l i="190">&#349;</l:l>
+      <l:l i="190">&#350;</l:l>
+      <l:l i="190">&#351;</l:l>
+      <l:l i="190">&#352;</l:l>
+      <l:l i="190">&#353;</l:l>
+      <l:l i="190">&#536;</l:l>
+      <l:l i="190">&#537;</l:l>
+      <l:l i="190">&#642;</l:l>
+      <l:l i="190">&#7776;</l:l>
+      <l:l i="190">&#7777;</l:l>
+      <l:l i="190">&#7778;</l:l>
+      <l:l i="190">&#7779;</l:l>
+      <l:l i="190">&#7780;</l:l>
+      <l:l i="190">&#7781;</l:l>
+      <l:l i="190">&#7782;</l:l>
+      <l:l i="190">&#7783;</l:l>
+      <l:l i="190">&#7784;</l:l>
+      <l:l i="190">&#7785;</l:l>
+      <l:l i="200">T</l:l>
+      <l:l i="200">t</l:l>
+      <l:l i="200">&#354;</l:l>
+      <l:l i="200">&#355;</l:l>
+      <l:l i="200">&#356;</l:l>
+      <l:l i="200">&#357;</l:l>
+      <l:l i="200">&#358;</l:l>
+      <l:l i="200">&#359;</l:l>
+      <l:l i="200">&#427;</l:l>
+      <l:l i="200">&#428;</l:l>
+      <l:l i="200">&#429;</l:l>
+      <l:l i="200">&#430;</l:l>
+      <l:l i="200">&#648;</l:l>
+      <l:l i="200">&#538;</l:l>
+      <l:l i="200">&#539;</l:l>
+      <l:l i="200">&#566;</l:l>
+      <l:l i="200">&#7786;</l:l>
+      <l:l i="200">&#7787;</l:l>
+      <l:l i="200">&#7788;</l:l>
+      <l:l i="200">&#7789;</l:l>
+      <l:l i="200">&#7790;</l:l>
+      <l:l i="200">&#7791;</l:l>
+      <l:l i="200">&#7792;</l:l>
+      <l:l i="200">&#7793;</l:l>
+      <l:l i="200">&#7831;</l:l>
+      <l:l i="210">U</l:l>
+      <l:l i="210">u</l:l>
+      <l:l i="210">&#217;</l:l>
+      <l:l i="210">&#249;</l:l>
+      <l:l i="210">&#218;</l:l>
+      <l:l i="210">&#250;</l:l>
+      <l:l i="210">&#219;</l:l>
+      <l:l i="210">&#251;</l:l>
+      <l:l i="210">&#220;</l:l>
+      <l:l i="210">&#252;</l:l>
+      <l:l i="210">&#360;</l:l>
+      <l:l i="210">&#361;</l:l>
+      <l:l i="210">&#362;</l:l>
+      <l:l i="210">&#363;</l:l>
+      <l:l i="210">&#364;</l:l>
+      <l:l i="210">&#365;</l:l>
+      <l:l i="210">&#366;</l:l>
+      <l:l i="210">&#367;</l:l>
+      <l:l i="210">&#368;</l:l>
+      <l:l i="210">&#369;</l:l>
+      <l:l i="210">&#370;</l:l>
+      <l:l i="210">&#371;</l:l>
+      <l:l i="210">&#431;</l:l>
+      <l:l i="210">&#432;</l:l>
+      <l:l i="210">&#467;</l:l>
+      <l:l i="210">&#468;</l:l>
+      <l:l i="210">&#469;</l:l>
+      <l:l i="210">&#470;</l:l>
+      <l:l i="210">&#471;</l:l>
+      <l:l i="210">&#472;</l:l>
+      <l:l i="210">&#473;</l:l>
+      <l:l i="210">&#474;</l:l>
+      <l:l i="210">&#475;</l:l>
+      <l:l i="210">&#476;</l:l>
+      <l:l i="210">&#532;</l:l>
+      <l:l i="210">&#533;</l:l>
+      <l:l i="210">&#534;</l:l>
+      <l:l i="210">&#535;</l:l>
+      <l:l i="210">&#7794;</l:l>
+      <l:l i="210">&#7795;</l:l>
+      <l:l i="210">&#7796;</l:l>
+      <l:l i="210">&#7797;</l:l>
+      <l:l i="210">&#7798;</l:l>
+      <l:l i="210">&#7799;</l:l>
+      <l:l i="210">&#7800;</l:l>
+      <l:l i="210">&#7801;</l:l>
+      <l:l i="210">&#7802;</l:l>
+      <l:l i="210">&#7803;</l:l>
+      <l:l i="210">&#7908;</l:l>
+      <l:l i="210">&#7909;</l:l>
+      <l:l i="210">&#7910;</l:l>
+      <l:l i="210">&#7911;</l:l>
+      <l:l i="210">&#7912;</l:l>
+      <l:l i="210">&#7913;</l:l>
+      <l:l i="210">&#7914;</l:l>
+      <l:l i="210">&#7915;</l:l>
+      <l:l i="210">&#7916;</l:l>
+      <l:l i="210">&#7917;</l:l>
+      <l:l i="210">&#7918;</l:l>
+      <l:l i="210">&#7919;</l:l>
+      <l:l i="210">&#7920;</l:l>
+      <l:l i="210">&#7921;</l:l>
+      <l:l i="220">V</l:l>
+      <l:l i="220">v</l:l>
+      <l:l i="220">&#434;</l:l>
+      <l:l i="220">&#651;</l:l>
+      <l:l i="220">&#7804;</l:l>
+      <l:l i="220">&#7805;</l:l>
+      <l:l i="220">&#7806;</l:l>
+      <l:l i="220">&#7807;</l:l>
+      <l:l i="230">W</l:l>
+      <l:l i="230">w</l:l>
+      <l:l i="230">&#372;</l:l>
+      <l:l i="230">&#373;</l:l>
+      <l:l i="230">&#7808;</l:l>
+      <l:l i="230">&#7809;</l:l>
+      <l:l i="230">&#7810;</l:l>
+      <l:l i="230">&#7811;</l:l>
+      <l:l i="230">&#7812;</l:l>
+      <l:l i="230">&#7813;</l:l>
+      <l:l i="230">&#7814;</l:l>
+      <l:l i="230">&#7815;</l:l>
+      <l:l i="230">&#7816;</l:l>
+      <l:l i="230">&#7817;</l:l>
+      <l:l i="230">&#7832;</l:l>
+      <l:l i="240">X</l:l>
+      <l:l i="240">x</l:l>
+      <l:l i="240">&#7818;</l:l>
+      <l:l i="240">&#7819;</l:l>
+      <l:l i="240">&#7820;</l:l>
+      <l:l i="240">&#7821;</l:l>
+      <l:l i="250">Y</l:l>
+      <l:l i="250">y</l:l>
+      <l:l i="250">&#221;</l:l>
+      <l:l i="250">&#253;</l:l>
+      <l:l i="250">&#255;</l:l>
+      <l:l i="250">&#376;</l:l>
+      <l:l i="250">&#374;</l:l>
+      <l:l i="250">&#375;</l:l>
+      <l:l i="250">&#435;</l:l>
+      <l:l i="250">&#436;</l:l>
+      <l:l i="250">&#562;</l:l>
+      <l:l i="250">&#563;</l:l>
+      <l:l i="250">&#7822;</l:l>
+      <l:l i="250">&#7823;</l:l>
+      <l:l i="250">&#7833;</l:l>
+      <l:l i="250">&#7922;</l:l>
+      <l:l i="250">&#7923;</l:l>
+      <l:l i="250">&#7924;</l:l>
+      <l:l i="250">&#7925;</l:l>
+      <l:l i="250">&#7926;</l:l>
+      <l:l i="250">&#7927;</l:l>
+      <l:l i="250">&#7928;</l:l>
+      <l:l i="250">&#7929;</l:l>
+      <l:l i="260">Z</l:l>
+      <l:l i="260">z</l:l>
+      <l:l i="260">&#377;</l:l>
+      <l:l i="260">&#378;</l:l>
+      <l:l i="260">&#379;</l:l>
+      <l:l i="260">&#380;</l:l>
+      <l:l i="260">&#381;</l:l>
+      <l:l i="260">&#382;</l:l>
+      <l:l i="260">&#437;</l:l>
+      <l:l i="260">&#438;</l:l>
+      <l:l i="260">&#548;</l:l>
+      <l:l i="260">&#549;</l:l>
+      <l:l i="260">&#656;</l:l>
+      <l:l i="260">&#657;</l:l>
+      <l:l i="260">&#7824;</l:l>
+      <l:l i="260">&#7825;</l:l>
+      <l:l i="260">&#7826;</l:l>
+      <l:l i="260">&#7827;</l:l>
+      <l:l i="260">&#7828;</l:l>
+      <l:l i="260">&#7829;</l:l>
+   </l:letters>
+</l:l10n>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/ca.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/ca.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/ca.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1153 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="ca" english-language-name="Catalan">
+
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+   <l:gentext key="Abstract" text="Resum"/>
+   <l:gentext key="abstract" text="Resum"/>
+   <l:gentext key="Answer" text="Resposta"/>
+   <l:gentext key="answer" text="Resposta"/>
+   <l:gentext key="Appendix" text="Ap&#232;ndix"/>
+   <l:gentext key="appendix" text="Ap&#232;ndix"/>
+   <l:gentext key="Article" text="Article"/>
+   <l:gentext key="article" text="Article"/>
+   <l:gentext key="Bibliography" text="Bibliografia"/>
+   <l:gentext key="bibliography" text="Bibliografia"/>
+   <l:gentext key="Book" text="Llibre"/>
+   <l:gentext key="book" text="Llibre"/>
+   <l:gentext key="CAUTION" text="ATENCI&#211;"/>
+   <l:gentext key="Caution" text="Atenci&#243;"/>
+   <l:gentext key="caution" text="Atenci&#243;"/>
+   <l:gentext key="Chapter" text="Cap&#237;tol"/>
+   <l:gentext key="chapter" text="Cap&#237;tol"/>
+   <l:gentext key="Colophon" text="Colof&#243;"/>
+   <l:gentext key="colophon" text="Colof&#243;"/>
+   <l:gentext key="Copyright" text="Dret de reproducci&#243;"/>
+   <l:gentext key="copyright" text="Dret de reproducci&#243;"/>
+   <l:gentext key="Dedication" text="Dedicat&#242;ria"/>
+   <l:gentext key="dedication" text="Dedicat&#242;ria"/>
+   <l:gentext key="Edition" text="Edici&#243;"/>
+   <l:gentext key="edition" text="Edici&#243;"/>
+   <l:gentext key="Equation" text="Equaci&#243;"/>
+   <l:gentext key="equation" text="Equaci&#243;"/>
+   <l:gentext key="Example" text="Exemple"/>
+   <l:gentext key="example" text="Exemple"/>
+   <l:gentext key="Figure" text="Figura"/>
+   <l:gentext key="figure" text="Figura"/>
+   <l:gentext key="Glossary" text="Glossari"/>
+   <l:gentext key="glossary" text="Glossari"/>
+   <l:gentext key="GlossSee" text="Veure"/>
+   <l:gentext key="glosssee" text="Veure"/>
+   <l:gentext key="GlossSeeAlso" text="Veure tamb&#233;"/>
+   <l:gentext key="glossseealso" text="Veure tamb&#233;"/>
+   <l:gentext key="IMPORTANT" text="IMPORTANT"/>
+   <l:gentext key="important" text="Important"/>
+   <l:gentext key="Important" text="Important"/>
+   <l:gentext key="Index" text="&#205;ndex alfab&#232;tic"/>
+   <l:gentext key="index" text="&#205;ndex alfab&#232;tic"/>
+   <l:gentext key="ISBN" text="ISBN"/>
+   <l:gentext key="isbn" text="ISBN"/>
+   <l:gentext key="LegalNotice" text="Av&#237;s legal"/>
+   <l:gentext key="legalnotice" text="Av&#237;s legal"/>
+   <l:gentext key="MsgAud" text="Audi&#232;ncia"/>
+   <l:gentext key="msgaud" text="Audi&#232;ncia"/>
+   <l:gentext key="MsgLevel" text="Nivell"/>
+   <l:gentext key="msglevel" text="Nivell"/>
+   <l:gentext key="MsgOrig" text="Origen"/>
+   <l:gentext key="msgorig" text="Origen"/>
+   <l:gentext key="NOTE" text="NOTA"/>
+   <l:gentext key="Note" text="Nota"/>
+   <l:gentext key="note" text="Nota"/>
+   <l:gentext key="Part" text="Part"/>
+   <l:gentext key="part" text="Part"/>
+   <l:gentext key="Preface" text="Prefaci"/>
+   <l:gentext key="preface" text="Prefaci"/>
+   <l:gentext key="Procedure" text="Procediment"/>
+   <l:gentext key="procedure" text="Procediment"/>
+   <l:gentext key="ProductionSet" text="Producci&#243;"/>
+   <l:gentext key="PubDate" text="Data de publicaci&#243;"/>
+   <l:gentext key="pubdate" text="Data de publicaci&#243;"/>
+   <l:gentext key="Published" text="Publicat"/>
+   <l:gentext key="published" text="Publicat"/>
+   <l:gentext key="Qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="Question" text="Pregunta"/>
+   <l:gentext key="question" text="Pregunta"/>
+   <l:gentext key="RefEntry" text="Entrada de refer&#232;ncia"/>
+   <l:gentext key="refentry" text="Entrada de refer&#232;ncia"/>
+   <l:gentext key="Reference" text="Refer&#232;ncia"/>
+   <l:gentext key="reference" text="Refer&#232;ncia"/>
+   <l:gentext key="RefName" text="Nom"/>
+   <l:gentext key="refname" text="Nom"/>
+   <l:gentext key="RefSection" text="Secci&#243; de refer&#232;ncia"/>
+   <l:gentext key="refsection" text="Secci&#243; de refer&#232;ncia"/>
+   <l:gentext key="RefSynopsisDiv" text="Sinopsi"/>
+   <l:gentext key="refsynopsisdiv" text="Sinopsi"/>
+   <l:gentext key="RevHistory" text="Historial de revisions"/>
+   <l:gentext key="revhistory" text="Historial de revisions"/>
+   <l:gentext key="revision" text="Revisi&#243;"/>
+   <l:gentext key="Revision" text="Revisi&#243;"/>
+   <l:gentext key="sect1" text="Secci&#243;"/>
+   <l:gentext key="sect2" text="Secci&#243;"/>
+   <l:gentext key="sect3" text="Secci&#243;"/>
+   <l:gentext key="sect4" text="Secci&#243;"/>
+   <l:gentext key="sect5" text="Secci&#243;"/>
+   <l:gentext key="section" text="Secci&#243;"/>
+   <l:gentext key="Section" text="Secci&#243;"/>
+   <l:gentext key="see" text="Veure"/>
+   <l:gentext key="See" text="Veure"/>
+   <l:gentext key="seealso" text="Veure tamb&#233;"/>
+   <l:gentext key="Seealso" text="Veure tamb&#233;"/>
+   <l:gentext key="SeeAlso" text="Veure Tamb&#233;"/>
+   <l:gentext key="set" text="Conjunt"/>
+   <l:gentext key="Set" text="Conjunt"/>
+   <l:gentext key="setindex" text="&#205;ndex del conjunt"/>
+   <l:gentext key="SetIndex" text="&#205;ndex del conjunt"/>
+   <l:gentext key="Sidebar" text="Barra lateral"/>
+   <l:gentext key="sidebar" text="Barra lateral"/>
+   <l:gentext key="step" text="Pas"/>
+   <l:gentext key="Step" text="Pas"/>
+   <l:gentext key="Table" text="Taula"/>
+   <l:gentext key="table" text="Taula"/>
+   <l:gentext key="tip" text="Suggeriment"/>
+   <l:gentext key="TIP" text="SUGGERIMENT"/>
+   <l:gentext key="Tip" text="Suggeriment"/>
+   <l:gentext key="Warning" text="Av&#237;s"/>
+   <l:gentext key="warning" text="Av&#237;s"/>
+   <l:gentext key="WARNING" text="AV&#205;S"/>
+   <l:gentext key="and" text="i"/>
+   <l:gentext key="by" text="per"/>
+   <l:gentext key="called" text="called" lang="en"/>
+   <l:gentext key="Edited" text="Editat"/>
+   <l:gentext key="edited" text="Editat"/>
+   <l:gentext key="Editedby" text="Editat per"/>
+   <l:gentext key="editedby" text="Editat per"/>
+   <l:gentext key="in" text="a"/>
+   <l:gentext key="lastlistcomma" text=","/>
+   <l:gentext key="listcomma" text=","/>
+   <l:gentext key="nonexistantelement" text="element inexistent"/>
+   <l:gentext key="notes" text="notes"/>
+   <l:gentext key="Notes" text="Notes"/>
+   <l:gentext key="Pgs" text="P&#224;gs."/>
+   <l:gentext key="pgs" text="P&#224;gs."/>
+   <l:gentext key="Revisedby" text="Revisat per: "/>
+   <l:gentext key="revisedby" text="Revisat per: "/>
+   <l:gentext key="TableNotes" text="Notes de taula"/>
+   <l:gentext key="tablenotes" text="Notes de taula"/>
+   <l:gentext key="TableofContents" text="Sumari"/>
+   <l:gentext key="tableofcontents" text="Sumari"/>
+   <l:gentext key="the" text="" lang="en"/>
+   <l:gentext key="unexpectedelementname" text="nom d'element inesperat"/>
+   <l:gentext key="unsupported" text="no reconeguda"/>
+   <l:gentext key="xrefto" text="refer&#232;ncia a"/>
+   <l:gentext key="listofequations" text="&#205;ndex d'equacions"/>
+   <l:gentext key="ListofEquations" text="&#205;ndex d'equacions"/>
+   <l:gentext key="ListofExamples" text="&#205;ndex d'exemples"/>
+   <l:gentext key="listofexamples" text="&#205;ndex d'exemples"/>
+   <l:gentext key="ListofFigures" text="&#205;ndex de figures"/>
+   <l:gentext key="listoffigures" text="&#205;ndex de figures"/>
+   <l:gentext key="ListofProcedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listofprocedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listoftables" text="&#205;ndex de taules"/>
+   <l:gentext key="ListofTables" text="&#205;ndex de taules"/>
+   <l:gentext key="ListofUnknown" text="&#205;ndex de desconegut ?"/>
+   <l:gentext key="listofunknown" text="&#205;ndex de desconegut ?"/>
+   <l:gentext key="nav-home" text="Inici"/>
+   <l:gentext key="nav-next" text="Seg&#252;ent"/>
+   <l:gentext key="nav-next-sibling" text="Avan&#231;ar"/>
+   <l:gentext key="nav-prev" text="Anterior"/>
+   <l:gentext key="nav-prev-sibling" text="Retrocedir"/>
+   <l:gentext key="nav-up" text="Pujar"/>
+   <l:gentext key="nav-toc" text="ToC" lang="en"/>
+   <l:gentext key="Draft" text="Esborrany"/>
+   <l:gentext key="above" text="dalt"/>
+   <l:gentext key="below" text="baix"/>
+   <l:gentext key="sectioncalled" text="secci&#243; anomenada"/>
+   <l:gentext key="index symbols" text="S&#237;mbols"/>
+   <l:gentext key="lowercase.alpha" text="abcdefghijklmnopqrstuvwxyz&#224;&#232;&#233;&#237;&#242;&#243;&#250;&#241;&#231;"/>
+   <l:gentext key="uppercase.alpha" text="ABCDEFGHIJKLMNOPQRSTUVWXYZ&#192;&#200;&#201;&#205;&#210;&#211;&#218;&#209;&#199;"/>
+   <l:dingbat key="startquote" text="&#8220;"/>
+   <l:dingbat key="endquote" text="&#8221;"/>
+   <l:dingbat key="nestedstartquote" text="&#8216;"/>
+   <l:dingbat key="nestedendquote" text="&#8217;"/>
+   <l:dingbat key="singlestartquote" text="&#8216;" lang="en"/>
+   <l:dingbat key="singleendquote" text="&#8217;" lang="en"/>
+   <l:dingbat key="bullet" text="&#8226;"/>
+   <l:gentext key="hyphenation-character" text="-" lang="en"/>
+   <l:gentext key="hyphenation-push-character-count" text="2" lang="en"/>
+   <l:gentext key="hyphenation-remain-character-count" text="2" lang="en"/>
+
+   <l:context name="styles">
+      <l:template name="person-name" text="last-first"/>
+   </l:context>
+
+   <l:context name="title">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="%t"/>
+      <l:template name="appendix" text="Ap&#232;ndix %n. %t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="biblioentry" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliolist" text="%t" lang="en"/>
+      <l:template name="bibliomixed" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="Cap&#237;tol %n. %t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="Equaci&#243; %n. %t"/>
+      <l:template name="example" text="Exemple %n. %t"/>
+      <l:template name="figure" text="Figura %n. %t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="glosslist" text="%t" lang="en"/>
+      <l:template name="glossentry" text="%t" lang="en"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text=""/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="Part %n. %t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="procedure.formal" text="Procediment&#160;%n.&#160;%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="productionset.formal" text="Producci&#243;&#160;%n"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="%t"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="%t"/>
+      <l:template name="refentry" text="%t"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsection" text="%t"/>
+      <l:template name="refsect1" text="%t"/>
+      <l:template name="refsect2" text="%t"/>
+      <l:template name="refsect3" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="refsynopsisdivinfo" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="step" text="%t"/>
+      <l:template name="table" text="Taula %n. %t"/>
+      <l:template name="task" text="%t" lang="en"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="" lang="en"/>
+      <l:template name="warning" text="%t"/>
+   </l:context>
+
+   <l:context name="title-unnumbered">
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article/appendix" text="%t" lang="en"/>
+      <l:template name="bridgehead" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="sect1" text="%t"/>
+      <l:template name="sect2" text="%t"/>
+      <l:template name="sect3" text="%t"/>
+      <l:template name="sect4" text="%t"/>
+      <l:template name="sect5" text="%t"/>
+      <l:template name="section" text="%t"/>
+      <l:template name="simplesect" text="%t"/>
+   </l:context>
+
+   <l:context name="title-numbered">
+      <l:template name="appendix" text="Ap&#232;ndix %n. %t"/>
+      <l:template name="article/appendix" text="%n.&#160;%t" lang="en"/>
+      <l:template name="bridgehead" text="%n.&#160;%t"/>
+      <l:template name="chapter" text="Cap&#237;tol %n. %t"/>
+      <l:template name="sect1" text="%n. %t"/>
+      <l:template name="sect2" text="%n. %t"/>
+      <l:template name="sect3" text="%n. %t"/>
+      <l:template name="sect4" text="%n. %t"/>
+      <l:template name="sect5" text="%n. %t"/>
+      <l:template name="section" text="%n. %t"/>
+      <l:template name="simplesect" text="%n. %t"/>
+   </l:context>
+
+   <l:context name="subtitle">
+      <l:template name="appendix" text="%s"/>
+      <l:template name="article" text="%s"/>
+      <l:template name="bibliodiv" text="%s"/>
+      <l:template name="biblioentry" text="%s"/>
+      <l:template name="bibliography" text="%s"/>
+      <l:template name="bibliomixed" text="%s"/>
+      <l:template name="bibliomset" text="%s"/>
+      <l:template name="biblioset" text="%s"/>
+      <l:template name="book" text="%s"/>
+      <l:template name="chapter" text="%s"/>
+      <l:template name="colophon" text="%s"/>
+      <l:template name="dedication" text="%s"/>
+      <l:template name="glossary" text="%s"/>
+      <l:template name="glossdiv" text="%s"/>
+      <l:template name="index" text="%s"/>
+      <l:template name="indexdiv" text="%s"/>
+      <l:template name="lot" text="%s"/>
+      <l:template name="part" text="%s"/>
+      <l:template name="partintro" text="%s"/>
+      <l:template name="preface" text="%s"/>
+      <l:template name="refentry" text="%s"/>
+      <l:template name="reference" text="%s"/>
+      <l:template name="refsection" text="%s"/>
+      <l:template name="refsect1" text="%s"/>
+      <l:template name="refsect2" text="%s"/>
+      <l:template name="refsect3" text="%s"/>
+      <l:template name="refsynopsisdiv" text="%s"/>
+      <l:template name="sect1" text="%s"/>
+      <l:template name="sect2" text="%s"/>
+      <l:template name="sect3" text="%s"/>
+      <l:template name="sect4" text="%s"/>
+      <l:template name="sect5" text="%s"/>
+      <l:template name="section" text="%s"/>
+      <l:template name="set" text="%s"/>
+      <l:template name="setindex" text="%s"/>
+      <l:template name="sidebar" text="%s"/>
+      <l:template name="simplesect" text="%s"/>
+      <l:template name="toc" text="%s"/>
+   </l:context>
+
+   <l:context name="xref">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="Resposta&#160;%n"/>
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="constraintdef" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="%t"/>
+      <l:template name="example" text="%t"/>
+      <l:template name="figure" text="%t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text="%n"/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="%t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="Pregunta&#160;%n"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="Pregunta&#160;%n"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="table" text="%t"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="%n"/>
+      <l:template name="warning" text="%t"/>
+      <l:template name="page.citation" text=" [%p]"/>
+      <l:template name="page" text="(page %p)" lang="en"/>
+      <l:template name="pageabbrev" text="(p. %p)" lang="en"/>
+      <l:template name="Page" text="Page %p" lang="en"/>
+      <l:template name="bridgehead" text=" &#8220;%t&#8221;"/>
+      <l:template name="refsection" text="&#8220;%t&#8221;"/>
+      <l:template name="refsect1" text="&#8220;%t&#8221;"/>
+      <l:template name="refsect2" text="&#8220;%t&#8221;"/>
+      <l:template name="refsect3" text="&#8220;%t&#8221;"/>
+      <l:template name="sect1" text="&#8220;%t&#8221;"/>
+      <l:template name="sect2" text="&#8220;%t&#8221;"/>
+      <l:template name="sect3" text="&#8220;%t&#8221;"/>
+      <l:template name="sect4" text="&#8220;%t&#8221;"/>
+      <l:template name="sect5" text="&#8220;%t&#8221;"/>
+      <l:template name="section" text="&#8220;%t&#8221;"/>
+      <l:template name="simplesect" text="&#8220;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="xref-number">
+      <l:template name="answer" text="Resposta&#160;%n"/>
+      <l:template name="appendix" text="Ap&#232;ndix&#160;%n"/>
+      <l:template name="bridgehead" text="Secci&#243;&#160;%n"/>
+      <l:template name="chapter" text="Cap&#237;tol&#160;%n"/>
+      <l:template name="equation" text="Equaci&#243;&#160;%n"/>
+      <l:template name="example" text="Exemple&#160;%n"/>
+      <l:template name="figure" text="Figura&#160;%n"/>
+      <l:template name="part" text="Part&#160;%n"/>
+      <l:template name="procedure" text="Procediment&#160;%n"/>
+      <l:template name="productionset" text="Producci&#243;&#160;%n"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n"/>
+      <l:template name="qandaentry" text="Pregunta&#160;%n"/>
+      <l:template name="question" text="Pregunta&#160;%n"/>
+      <l:template name="sect1" text="Secci&#243;&#160;%n"/>
+      <l:template name="sect2" text="Secci&#243;&#160;%n"/>
+      <l:template name="sect3" text="Secci&#243;&#160;%n"/>
+      <l:template name="sect4" text="Secci&#243;&#160;%n"/>
+      <l:template name="sect5" text="Secci&#243;&#160;%n"/>
+      <l:template name="section" text="Secci&#243;&#160;%n"/>
+      <l:template name="table" text="Taula&#160;%n"/>
+   </l:context>
+
+   <l:context name="xref-number-and-title">
+      <l:template name="appendix" text="Ap&#232;ndix&#160;%n, %t"/>
+      <l:template name="bridgehead" text="Secci&#243;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="chapter" text="Cap&#237;tol&#160;%n, %t"/>
+      <l:template name="equation" text="Equaci&#243;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="example" text="Exemple&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="figure" text="Figura&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="part" text="Part&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="procedure" text="Procediment&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="productionset" text="Producci&#243;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="refsect1" text="secci&#243; anomenada &#8220;%t&#8221;"/>
+      <l:template name="refsect2" text="secci&#243; anomenada &#8220;%t&#8221;"/>
+      <l:template name="refsect3" text="secci&#243; anomenada &#8220;%t&#8221;"/>
+      <l:template name="refsection" text="secci&#243; anomenada &#8220;%t&#8221;"/>
+      <l:template name="sect1" text="Secci&#243;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect2" text="Secci&#243;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect3" text="Secci&#243;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect4" text="Secci&#243;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect5" text="Secci&#243;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="section" text="Secci&#243;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="simplesect" text="secci&#243; anomenada &#8220;%t&#8221;"/>
+      <l:template name="table" text="Taula&#160;%n, &#8220;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="authorgroup">
+      <l:template name="sep" text=", "/>
+      <l:template name="sep2" text=" i "/>
+      <l:template name="seplast" text=", i "/>
+   </l:context>
+
+   <l:context name="glossary">
+      <l:template name="see" text="Veure "/>
+      <l:template name="seealso" text="Veure tamb&#233; "/>
+   </l:context>
+
+   <l:context name="msgset">
+      <l:template name="MsgAud" text="Audi&#232;ncia: "/>
+      <l:template name="MsgLevel" text="Nivell: "/>
+      <l:template name="MsgOrig" text="Origen: "/>
+   </l:context>
+
+   <l:context name="datetime">
+      <l:template name="format" text="m/d/Y" lang="en"/>
+   </l:context>
+
+   <l:context name="datetime-full">
+      <l:template name="January" text="January" lang="en"/>
+      <l:template name="February" text="February" lang="en"/>
+      <l:template name="March" text="March" lang="en"/>
+      <l:template name="April" text="April" lang="en"/>
+      <l:template name="May" text="May" lang="en"/>
+      <l:template name="June" text="June" lang="en"/>
+      <l:template name="July" text="July" lang="en"/>
+      <l:template name="August" text="August" lang="en"/>
+      <l:template name="September" text="September" lang="en"/>
+      <l:template name="October" text="October" lang="en"/>
+      <l:template name="November" text="November" lang="en"/>
+      <l:template name="December" text="December" lang="en"/>
+      <l:template name="Monday" text="Monday" lang="en"/>
+      <l:template name="Tuesday" text="Tuesday" lang="en"/>
+      <l:template name="Wednesday" text="Wednesday" lang="en"/>
+      <l:template name="Thursday" text="Thursday" lang="en"/>
+      <l:template name="Friday" text="Friday" lang="en"/>
+      <l:template name="Saturday" text="Saturday" lang="en"/>
+      <l:template name="Sunday" text="Sunday" lang="en"/>
+   </l:context>
+
+   <l:context name="datetime-abbrev">
+      <l:template name="Jan" text="Jan" lang="en"/>
+      <l:template name="Feb" text="Feb" lang="en"/>
+      <l:template name="Mar" text="Mar" lang="en"/>
+      <l:template name="Apr" text="Apr" lang="en"/>
+      <l:template name="May" text="May" lang="en"/>
+      <l:template name="Jun" text="Jun" lang="en"/>
+      <l:template name="Jul" text="Jul" lang="en"/>
+      <l:template name="Aug" text="Aug" lang="en"/>
+      <l:template name="Sep" text="Sep" lang="en"/>
+      <l:template name="Oct" text="Oct" lang="en"/>
+      <l:template name="Nov" text="Nov" lang="en"/>
+      <l:template name="Dec" text="Dec" lang="en"/>
+      <l:template name="Mon" text="Mon" lang="en"/>
+      <l:template name="Tue" text="Tue" lang="en"/>
+      <l:template name="Wed" text="Wed" lang="en"/>
+      <l:template name="Thu" text="Thu" lang="en"/>
+      <l:template name="Fri" text="Fri" lang="en"/>
+      <l:template name="Sat" text="Sat" lang="en"/>
+      <l:template name="Sun" text="Sun" lang="en"/>
+   </l:context>
+
+   <l:context name="htmlhelp">
+      <l:template name="langcode" text="0x0403 Catalan"/>
+   </l:context>
+
+   <l:letters lang="en">
+      <l:l i="-1"/>
+      <l:l i="0">Symbols</l:l>
+      <l:l i="10">A</l:l>
+      <l:l i="10">a</l:l>
+      <l:l i="10">&#192;</l:l>
+      <l:l i="10">&#224;</l:l>
+      <l:l i="10">&#193;</l:l>
+      <l:l i="10">&#225;</l:l>
+      <l:l i="10">&#194;</l:l>
+      <l:l i="10">&#226;</l:l>
+      <l:l i="10">&#195;</l:l>
+      <l:l i="10">&#227;</l:l>
+      <l:l i="10">&#196;</l:l>
+      <l:l i="10">&#228;</l:l>
+      <l:l i="10">&#197;</l:l>
+      <l:l i="10">&#229;</l:l>
+      <l:l i="10">&#256;</l:l>
+      <l:l i="10">&#257;</l:l>
+      <l:l i="10">&#258;</l:l>
+      <l:l i="10">&#259;</l:l>
+      <l:l i="10">&#260;</l:l>
+      <l:l i="10">&#261;</l:l>
+      <l:l i="10">&#461;</l:l>
+      <l:l i="10">&#462;</l:l>
+      <l:l i="10">&#478;</l:l>
+      <l:l i="10">&#479;</l:l>
+      <l:l i="10">&#480;</l:l>
+      <l:l i="10">&#481;</l:l>
+      <l:l i="10">&#506;</l:l>
+      <l:l i="10">&#507;</l:l>
+      <l:l i="10">&#512;</l:l>
+      <l:l i="10">&#513;</l:l>
+      <l:l i="10">&#514;</l:l>
+      <l:l i="10">&#515;</l:l>
+      <l:l i="10">&#550;</l:l>
+      <l:l i="10">&#551;</l:l>
+      <l:l i="10">&#7680;</l:l>
+      <l:l i="10">&#7681;</l:l>
+      <l:l i="10">&#7834;</l:l>
+      <l:l i="10">&#7840;</l:l>
+      <l:l i="10">&#7841;</l:l>
+      <l:l i="10">&#7842;</l:l>
+      <l:l i="10">&#7843;</l:l>
+      <l:l i="10">&#7844;</l:l>
+      <l:l i="10">&#7845;</l:l>
+      <l:l i="10">&#7846;</l:l>
+      <l:l i="10">&#7847;</l:l>
+      <l:l i="10">&#7848;</l:l>
+      <l:l i="10">&#7849;</l:l>
+      <l:l i="10">&#7850;</l:l>
+      <l:l i="10">&#7851;</l:l>
+      <l:l i="10">&#7852;</l:l>
+      <l:l i="10">&#7853;</l:l>
+      <l:l i="10">&#7854;</l:l>
+      <l:l i="10">&#7855;</l:l>
+      <l:l i="10">&#7856;</l:l>
+      <l:l i="10">&#7857;</l:l>
+      <l:l i="10">&#7858;</l:l>
+      <l:l i="10">&#7859;</l:l>
+      <l:l i="10">&#7860;</l:l>
+      <l:l i="10">&#7861;</l:l>
+      <l:l i="10">&#7862;</l:l>
+      <l:l i="10">&#7863;</l:l>
+      <l:l i="20">B</l:l>
+      <l:l i="20">b</l:l>
+      <l:l i="20">&#384;</l:l>
+      <l:l i="20">&#385;</l:l>
+      <l:l i="20">&#595;</l:l>
+      <l:l i="20">&#386;</l:l>
+      <l:l i="20">&#387;</l:l>
+      <l:l i="20">&#7682;</l:l>
+      <l:l i="20">&#7683;</l:l>
+      <l:l i="20">&#7684;</l:l>
+      <l:l i="20">&#7685;</l:l>
+      <l:l i="20">&#7686;</l:l>
+      <l:l i="20">&#7687;</l:l>
+      <l:l i="30">C</l:l>
+      <l:l i="30">c</l:l>
+      <l:l i="30">&#199;</l:l>
+      <l:l i="30">&#231;</l:l>
+      <l:l i="30">&#262;</l:l>
+      <l:l i="30">&#263;</l:l>
+      <l:l i="30">&#264;</l:l>
+      <l:l i="30">&#265;</l:l>
+      <l:l i="30">&#266;</l:l>
+      <l:l i="30">&#267;</l:l>
+      <l:l i="30">&#268;</l:l>
+      <l:l i="30">&#269;</l:l>
+      <l:l i="30">&#391;</l:l>
+      <l:l i="30">&#392;</l:l>
+      <l:l i="30">&#597;</l:l>
+      <l:l i="30">&#7688;</l:l>
+      <l:l i="30">&#7689;</l:l>
+      <l:l i="40">D</l:l>
+      <l:l i="40">d</l:l>
+      <l:l i="40">&#270;</l:l>
+      <l:l i="40">&#271;</l:l>
+      <l:l i="40">&#272;</l:l>
+      <l:l i="40">&#273;</l:l>
+      <l:l i="40">&#394;</l:l>
+      <l:l i="40">&#599;</l:l>
+      <l:l i="40">&#395;</l:l>
+      <l:l i="40">&#396;</l:l>
+      <l:l i="40">&#453;</l:l>
+      <l:l i="40">&#498;</l:l>
+      <l:l i="40">&#545;</l:l>
+      <l:l i="40">&#598;</l:l>
+      <l:l i="40">&#7690;</l:l>
+      <l:l i="40">&#7691;</l:l>
+      <l:l i="40">&#7692;</l:l>
+      <l:l i="40">&#7693;</l:l>
+      <l:l i="40">&#7694;</l:l>
+      <l:l i="40">&#7695;</l:l>
+      <l:l i="40">&#7696;</l:l>
+      <l:l i="40">&#7697;</l:l>
+      <l:l i="40">&#7698;</l:l>
+      <l:l i="40">&#7699;</l:l>
+      <l:l i="50">E</l:l>
+      <l:l i="50">e</l:l>
+      <l:l i="50">&#200;</l:l>
+      <l:l i="50">&#232;</l:l>
+      <l:l i="50">&#201;</l:l>
+      <l:l i="50">&#233;</l:l>
+      <l:l i="50">&#202;</l:l>
+      <l:l i="50">&#234;</l:l>
+      <l:l i="50">&#203;</l:l>
+      <l:l i="50">&#235;</l:l>
+      <l:l i="50">&#274;</l:l>
+      <l:l i="50">&#275;</l:l>
+      <l:l i="50">&#276;</l:l>
+      <l:l i="50">&#277;</l:l>
+      <l:l i="50">&#278;</l:l>
+      <l:l i="50">&#279;</l:l>
+      <l:l i="50">&#280;</l:l>
+      <l:l i="50">&#281;</l:l>
+      <l:l i="50">&#282;</l:l>
+      <l:l i="50">&#283;</l:l>
+      <l:l i="50">&#516;</l:l>
+      <l:l i="50">&#517;</l:l>
+      <l:l i="50">&#518;</l:l>
+      <l:l i="50">&#519;</l:l>
+      <l:l i="50">&#552;</l:l>
+      <l:l i="50">&#553;</l:l>
+      <l:l i="50">&#7700;</l:l>
+      <l:l i="50">&#7701;</l:l>
+      <l:l i="50">&#7702;</l:l>
+      <l:l i="50">&#7703;</l:l>
+      <l:l i="50">&#7704;</l:l>
+      <l:l i="50">&#7705;</l:l>
+      <l:l i="50">&#7706;</l:l>
+      <l:l i="50">&#7707;</l:l>
+      <l:l i="50">&#7708;</l:l>
+      <l:l i="50">&#7709;</l:l>
+      <l:l i="50">&#7864;</l:l>
+      <l:l i="50">&#7865;</l:l>
+      <l:l i="50">&#7866;</l:l>
+      <l:l i="50">&#7867;</l:l>
+      <l:l i="50">&#7868;</l:l>
+      <l:l i="50">&#7869;</l:l>
+      <l:l i="50">&#7870;</l:l>
+      <l:l i="50">&#7871;</l:l>
+      <l:l i="50">&#7872;</l:l>
+      <l:l i="50">&#7873;</l:l>
+      <l:l i="50">&#7874;</l:l>
+      <l:l i="50">&#7875;</l:l>
+      <l:l i="50">&#7876;</l:l>
+      <l:l i="50">&#7877;</l:l>
+      <l:l i="50">&#7878;</l:l>
+      <l:l i="50">&#7879;</l:l>
+      <l:l i="60">F</l:l>
+      <l:l i="60">f</l:l>
+      <l:l i="60">&#401;</l:l>
+      <l:l i="60">&#402;</l:l>
+      <l:l i="60">&#7710;</l:l>
+      <l:l i="60">&#7711;</l:l>
+      <l:l i="70">G</l:l>
+      <l:l i="70">g</l:l>
+      <l:l i="70">&#284;</l:l>
+      <l:l i="70">&#285;</l:l>
+      <l:l i="70">&#286;</l:l>
+      <l:l i="70">&#287;</l:l>
+      <l:l i="70">&#288;</l:l>
+      <l:l i="70">&#289;</l:l>
+      <l:l i="70">&#290;</l:l>
+      <l:l i="70">&#291;</l:l>
+      <l:l i="70">&#403;</l:l>
+      <l:l i="70">&#608;</l:l>
+      <l:l i="70">&#484;</l:l>
+      <l:l i="70">&#485;</l:l>
+      <l:l i="70">&#486;</l:l>
+      <l:l i="70">&#487;</l:l>
+      <l:l i="70">&#500;</l:l>
+      <l:l i="70">&#501;</l:l>
+      <l:l i="70">&#7712;</l:l>
+      <l:l i="70">&#7713;</l:l>
+      <l:l i="80">H</l:l>
+      <l:l i="80">h</l:l>
+      <l:l i="80">&#292;</l:l>
+      <l:l i="80">&#293;</l:l>
+      <l:l i="80">&#294;</l:l>
+      <l:l i="80">&#295;</l:l>
+      <l:l i="80">&#542;</l:l>
+      <l:l i="80">&#543;</l:l>
+      <l:l i="80">&#614;</l:l>
+      <l:l i="80">&#7714;</l:l>
+      <l:l i="80">&#7715;</l:l>
+      <l:l i="80">&#7716;</l:l>
+      <l:l i="80">&#7717;</l:l>
+      <l:l i="80">&#7718;</l:l>
+      <l:l i="80">&#7719;</l:l>
+      <l:l i="80">&#7720;</l:l>
+      <l:l i="80">&#7721;</l:l>
+      <l:l i="80">&#7722;</l:l>
+      <l:l i="80">&#7723;</l:l>
+      <l:l i="80">&#7830;</l:l>
+      <l:l i="90">I</l:l>
+      <l:l i="90">i</l:l>
+      <l:l i="90">&#204;</l:l>
+      <l:l i="90">&#236;</l:l>
+      <l:l i="90">&#205;</l:l>
+      <l:l i="90">&#237;</l:l>
+      <l:l i="90">&#206;</l:l>
+      <l:l i="90">&#238;</l:l>
+      <l:l i="90">&#207;</l:l>
+      <l:l i="90">&#239;</l:l>
+      <l:l i="90">&#296;</l:l>
+      <l:l i="90">&#297;</l:l>
+      <l:l i="90">&#298;</l:l>
+      <l:l i="90">&#299;</l:l>
+      <l:l i="90">&#300;</l:l>
+      <l:l i="90">&#301;</l:l>
+      <l:l i="90">&#302;</l:l>
+      <l:l i="90">&#303;</l:l>
+      <l:l i="90">&#304;</l:l>
+      <l:l i="90">&#407;</l:l>
+      <l:l i="90">&#616;</l:l>
+      <l:l i="90">&#463;</l:l>
+      <l:l i="90">&#464;</l:l>
+      <l:l i="90">&#520;</l:l>
+      <l:l i="90">&#521;</l:l>
+      <l:l i="90">&#522;</l:l>
+      <l:l i="90">&#523;</l:l>
+      <l:l i="90">&#7724;</l:l>
+      <l:l i="90">&#7725;</l:l>
+      <l:l i="90">&#7726;</l:l>
+      <l:l i="90">&#7727;</l:l>
+      <l:l i="90">&#7880;</l:l>
+      <l:l i="90">&#7881;</l:l>
+      <l:l i="90">&#7882;</l:l>
+      <l:l i="90">&#7883;</l:l>
+      <l:l i="100">J</l:l>
+      <l:l i="100">j</l:l>
+      <l:l i="100">&#308;</l:l>
+      <l:l i="100">&#309;</l:l>
+      <l:l i="100">&#496;</l:l>
+      <l:l i="100">&#669;</l:l>
+      <l:l i="110">K</l:l>
+      <l:l i="110">k</l:l>
+      <l:l i="110">&#310;</l:l>
+      <l:l i="110">&#311;</l:l>
+      <l:l i="110">&#408;</l:l>
+      <l:l i="110">&#409;</l:l>
+      <l:l i="110">&#488;</l:l>
+      <l:l i="110">&#489;</l:l>
+      <l:l i="110">&#7728;</l:l>
+      <l:l i="110">&#7729;</l:l>
+      <l:l i="110">&#7730;</l:l>
+      <l:l i="110">&#7731;</l:l>
+      <l:l i="110">&#7732;</l:l>
+      <l:l i="110">&#7733;</l:l>
+      <l:l i="120">L</l:l>
+      <l:l i="120">l</l:l>
+      <l:l i="120">&#313;</l:l>
+      <l:l i="120">&#314;</l:l>
+      <l:l i="120">&#315;</l:l>
+      <l:l i="120">&#316;</l:l>
+      <l:l i="120">&#317;</l:l>
+      <l:l i="120">&#318;</l:l>
+      <l:l i="120">&#319;</l:l>
+      <l:l i="120">&#320;</l:l>
+      <l:l i="120">&#321;</l:l>
+      <l:l i="120">&#322;</l:l>
+      <l:l i="120">&#410;</l:l>
+      <l:l i="120">&#456;</l:l>
+      <l:l i="120">&#564;</l:l>
+      <l:l i="120">&#619;</l:l>
+      <l:l i="120">&#620;</l:l>
+      <l:l i="120">&#621;</l:l>
+      <l:l i="120">&#7734;</l:l>
+      <l:l i="120">&#7735;</l:l>
+      <l:l i="120">&#7736;</l:l>
+      <l:l i="120">&#7737;</l:l>
+      <l:l i="120">&#7738;</l:l>
+      <l:l i="120">&#7739;</l:l>
+      <l:l i="120">&#7740;</l:l>
+      <l:l i="120">&#7741;</l:l>
+      <l:l i="130">M</l:l>
+      <l:l i="130">m</l:l>
+      <l:l i="130">&#625;</l:l>
+      <l:l i="130">&#7742;</l:l>
+      <l:l i="130">&#7743;</l:l>
+      <l:l i="130">&#7744;</l:l>
+      <l:l i="130">&#7745;</l:l>
+      <l:l i="130">&#7746;</l:l>
+      <l:l i="130">&#7747;</l:l>
+      <l:l i="140">N</l:l>
+      <l:l i="140">n</l:l>
+      <l:l i="140">&#209;</l:l>
+      <l:l i="140">&#241;</l:l>
+      <l:l i="140">&#323;</l:l>
+      <l:l i="140">&#324;</l:l>
+      <l:l i="140">&#325;</l:l>
+      <l:l i="140">&#326;</l:l>
+      <l:l i="140">&#327;</l:l>
+      <l:l i="140">&#328;</l:l>
+      <l:l i="140">&#413;</l:l>
+      <l:l i="140">&#626;</l:l>
+      <l:l i="140">&#414;</l:l>
+      <l:l i="140">&#544;</l:l>
+      <l:l i="140">&#459;</l:l>
+      <l:l i="140">&#504;</l:l>
+      <l:l i="140">&#505;</l:l>
+      <l:l i="140">&#565;</l:l>
+      <l:l i="140">&#627;</l:l>
+      <l:l i="140">&#7748;</l:l>
+      <l:l i="140">&#7749;</l:l>
+      <l:l i="140">&#7750;</l:l>
+      <l:l i="140">&#7751;</l:l>
+      <l:l i="140">&#7752;</l:l>
+      <l:l i="140">&#7753;</l:l>
+      <l:l i="140">&#7754;</l:l>
+      <l:l i="140">&#7755;</l:l>
+      <l:l i="150">O</l:l>
+      <l:l i="150">o</l:l>
+      <l:l i="150">&#210;</l:l>
+      <l:l i="150">&#242;</l:l>
+      <l:l i="150">&#211;</l:l>
+      <l:l i="150">&#243;</l:l>
+      <l:l i="150">&#212;</l:l>
+      <l:l i="150">&#244;</l:l>
+      <l:l i="150">&#213;</l:l>
+      <l:l i="150">&#245;</l:l>
+      <l:l i="150">&#214;</l:l>
+      <l:l i="150">&#246;</l:l>
+      <l:l i="150">&#216;</l:l>
+      <l:l i="150">&#248;</l:l>
+      <l:l i="150">&#332;</l:l>
+      <l:l i="150">&#333;</l:l>
+      <l:l i="150">&#334;</l:l>
+      <l:l i="150">&#335;</l:l>
+      <l:l i="150">&#336;</l:l>
+      <l:l i="150">&#337;</l:l>
+      <l:l i="150">&#415;</l:l>
+      <l:l i="150">&#416;</l:l>
+      <l:l i="150">&#417;</l:l>
+      <l:l i="150">&#465;</l:l>
+      <l:l i="150">&#466;</l:l>
+      <l:l i="150">&#490;</l:l>
+      <l:l i="150">&#491;</l:l>
+      <l:l i="150">&#492;</l:l>
+      <l:l i="150">&#493;</l:l>
+      <l:l i="150">&#510;</l:l>
+      <l:l i="150">&#511;</l:l>
+      <l:l i="150">&#524;</l:l>
+      <l:l i="150">&#525;</l:l>
+      <l:l i="150">&#526;</l:l>
+      <l:l i="150">&#527;</l:l>
+      <l:l i="150">&#554;</l:l>
+      <l:l i="150">&#555;</l:l>
+      <l:l i="150">&#556;</l:l>
+      <l:l i="150">&#557;</l:l>
+      <l:l i="150">&#558;</l:l>
+      <l:l i="150">&#559;</l:l>
+      <l:l i="150">&#560;</l:l>
+      <l:l i="150">&#561;</l:l>
+      <l:l i="150">&#7756;</l:l>
+      <l:l i="150">&#7757;</l:l>
+      <l:l i="150">&#7758;</l:l>
+      <l:l i="150">&#7759;</l:l>
+      <l:l i="150">&#7760;</l:l>
+      <l:l i="150">&#7761;</l:l>
+      <l:l i="150">&#7762;</l:l>
+      <l:l i="150">&#7763;</l:l>
+      <l:l i="150">&#7884;</l:l>
+      <l:l i="150">&#7885;</l:l>
+      <l:l i="150">&#7886;</l:l>
+      <l:l i="150">&#7887;</l:l>
+      <l:l i="150">&#7888;</l:l>
+      <l:l i="150">&#7889;</l:l>
+      <l:l i="150">&#7890;</l:l>
+      <l:l i="150">&#7891;</l:l>
+      <l:l i="150">&#7892;</l:l>
+      <l:l i="150">&#7893;</l:l>
+      <l:l i="150">&#7894;</l:l>
+      <l:l i="150">&#7895;</l:l>
+      <l:l i="150">&#7896;</l:l>
+      <l:l i="150">&#7897;</l:l>
+      <l:l i="150">&#7898;</l:l>
+      <l:l i="150">&#7899;</l:l>
+      <l:l i="150">&#7900;</l:l>
+      <l:l i="150">&#7901;</l:l>
+      <l:l i="150">&#7902;</l:l>
+      <l:l i="150">&#7903;</l:l>
+      <l:l i="150">&#7904;</l:l>
+      <l:l i="150">&#7905;</l:l>
+      <l:l i="150">&#7906;</l:l>
+      <l:l i="150">&#7907;</l:l>
+      <l:l i="160">P</l:l>
+      <l:l i="160">p</l:l>
+      <l:l i="160">&#420;</l:l>
+      <l:l i="160">&#421;</l:l>
+      <l:l i="160">&#7764;</l:l>
+      <l:l i="160">&#7765;</l:l>
+      <l:l i="160">&#7766;</l:l>
+      <l:l i="160">&#7767;</l:l>
+      <l:l i="170">Q</l:l>
+      <l:l i="170">q</l:l>
+      <l:l i="170">&#672;</l:l>
+      <l:l i="180">R</l:l>
+      <l:l i="180">r</l:l>
+      <l:l i="180">&#340;</l:l>
+      <l:l i="180">&#341;</l:l>
+      <l:l i="180">&#342;</l:l>
+      <l:l i="180">&#343;</l:l>
+      <l:l i="180">&#344;</l:l>
+      <l:l i="180">&#345;</l:l>
+      <l:l i="180">&#528;</l:l>
+      <l:l i="180">&#529;</l:l>
+      <l:l i="180">&#530;</l:l>
+      <l:l i="180">&#531;</l:l>
+      <l:l i="180">&#636;</l:l>
+      <l:l i="180">&#637;</l:l>
+      <l:l i="180">&#638;</l:l>
+      <l:l i="180">&#7768;</l:l>
+      <l:l i="180">&#7769;</l:l>
+      <l:l i="180">&#7770;</l:l>
+      <l:l i="180">&#7771;</l:l>
+      <l:l i="180">&#7772;</l:l>
+      <l:l i="180">&#7773;</l:l>
+      <l:l i="180">&#7774;</l:l>
+      <l:l i="180">&#7775;</l:l>
+      <l:l i="190">S</l:l>
+      <l:l i="190">s</l:l>
+      <l:l i="190">&#346;</l:l>
+      <l:l i="190">&#347;</l:l>
+      <l:l i="190">&#348;</l:l>
+      <l:l i="190">&#349;</l:l>
+      <l:l i="190">&#350;</l:l>
+      <l:l i="190">&#351;</l:l>
+      <l:l i="190">&#352;</l:l>
+      <l:l i="190">&#353;</l:l>
+      <l:l i="190">&#536;</l:l>
+      <l:l i="190">&#537;</l:l>
+      <l:l i="190">&#642;</l:l>
+      <l:l i="190">&#7776;</l:l>
+      <l:l i="190">&#7777;</l:l>
+      <l:l i="190">&#7778;</l:l>
+      <l:l i="190">&#7779;</l:l>
+      <l:l i="190">&#7780;</l:l>
+      <l:l i="190">&#7781;</l:l>
+      <l:l i="190">&#7782;</l:l>
+      <l:l i="190">&#7783;</l:l>
+      <l:l i="190">&#7784;</l:l>
+      <l:l i="190">&#7785;</l:l>
+      <l:l i="200">T</l:l>
+      <l:l i="200">t</l:l>
+      <l:l i="200">&#354;</l:l>
+      <l:l i="200">&#355;</l:l>
+      <l:l i="200">&#356;</l:l>
+      <l:l i="200">&#357;</l:l>
+      <l:l i="200">&#358;</l:l>
+      <l:l i="200">&#359;</l:l>
+      <l:l i="200">&#427;</l:l>
+      <l:l i="200">&#428;</l:l>
+      <l:l i="200">&#429;</l:l>
+      <l:l i="200">&#430;</l:l>
+      <l:l i="200">&#648;</l:l>
+      <l:l i="200">&#538;</l:l>
+      <l:l i="200">&#539;</l:l>
+      <l:l i="200">&#566;</l:l>
+      <l:l i="200">&#7786;</l:l>
+      <l:l i="200">&#7787;</l:l>
+      <l:l i="200">&#7788;</l:l>
+      <l:l i="200">&#7789;</l:l>
+      <l:l i="200">&#7790;</l:l>
+      <l:l i="200">&#7791;</l:l>
+      <l:l i="200">&#7792;</l:l>
+      <l:l i="200">&#7793;</l:l>
+      <l:l i="200">&#7831;</l:l>
+      <l:l i="210">U</l:l>
+      <l:l i="210">u</l:l>
+      <l:l i="210">&#217;</l:l>
+      <l:l i="210">&#249;</l:l>
+      <l:l i="210">&#218;</l:l>
+      <l:l i="210">&#250;</l:l>
+      <l:l i="210">&#219;</l:l>
+      <l:l i="210">&#251;</l:l>
+      <l:l i="210">&#220;</l:l>
+      <l:l i="210">&#252;</l:l>
+      <l:l i="210">&#360;</l:l>
+      <l:l i="210">&#361;</l:l>
+      <l:l i="210">&#362;</l:l>
+      <l:l i="210">&#363;</l:l>
+      <l:l i="210">&#364;</l:l>
+      <l:l i="210">&#365;</l:l>
+      <l:l i="210">&#366;</l:l>
+      <l:l i="210">&#367;</l:l>
+      <l:l i="210">&#368;</l:l>
+      <l:l i="210">&#369;</l:l>
+      <l:l i="210">&#370;</l:l>
+      <l:l i="210">&#371;</l:l>
+      <l:l i="210">&#431;</l:l>
+      <l:l i="210">&#432;</l:l>
+      <l:l i="210">&#467;</l:l>
+      <l:l i="210">&#468;</l:l>
+      <l:l i="210">&#469;</l:l>
+      <l:l i="210">&#470;</l:l>
+      <l:l i="210">&#471;</l:l>
+      <l:l i="210">&#472;</l:l>
+      <l:l i="210">&#473;</l:l>
+      <l:l i="210">&#474;</l:l>
+      <l:l i="210">&#475;</l:l>
+      <l:l i="210">&#476;</l:l>
+      <l:l i="210">&#532;</l:l>
+      <l:l i="210">&#533;</l:l>
+      <l:l i="210">&#534;</l:l>
+      <l:l i="210">&#535;</l:l>
+      <l:l i="210">&#7794;</l:l>
+      <l:l i="210">&#7795;</l:l>
+      <l:l i="210">&#7796;</l:l>
+      <l:l i="210">&#7797;</l:l>
+      <l:l i="210">&#7798;</l:l>
+      <l:l i="210">&#7799;</l:l>
+      <l:l i="210">&#7800;</l:l>
+      <l:l i="210">&#7801;</l:l>
+      <l:l i="210">&#7802;</l:l>
+      <l:l i="210">&#7803;</l:l>
+      <l:l i="210">&#7908;</l:l>
+      <l:l i="210">&#7909;</l:l>
+      <l:l i="210">&#7910;</l:l>
+      <l:l i="210">&#7911;</l:l>
+      <l:l i="210">&#7912;</l:l>
+      <l:l i="210">&#7913;</l:l>
+      <l:l i="210">&#7914;</l:l>
+      <l:l i="210">&#7915;</l:l>
+      <l:l i="210">&#7916;</l:l>
+      <l:l i="210">&#7917;</l:l>
+      <l:l i="210">&#7918;</l:l>
+      <l:l i="210">&#7919;</l:l>
+      <l:l i="210">&#7920;</l:l>
+      <l:l i="210">&#7921;</l:l>
+      <l:l i="220">V</l:l>
+      <l:l i="220">v</l:l>
+      <l:l i="220">&#434;</l:l>
+      <l:l i="220">&#651;</l:l>
+      <l:l i="220">&#7804;</l:l>
+      <l:l i="220">&#7805;</l:l>
+      <l:l i="220">&#7806;</l:l>
+      <l:l i="220">&#7807;</l:l>
+      <l:l i="230">W</l:l>
+      <l:l i="230">w</l:l>
+      <l:l i="230">&#372;</l:l>
+      <l:l i="230">&#373;</l:l>
+      <l:l i="230">&#7808;</l:l>
+      <l:l i="230">&#7809;</l:l>
+      <l:l i="230">&#7810;</l:l>
+      <l:l i="230">&#7811;</l:l>
+      <l:l i="230">&#7812;</l:l>
+      <l:l i="230">&#7813;</l:l>
+      <l:l i="230">&#7814;</l:l>
+      <l:l i="230">&#7815;</l:l>
+      <l:l i="230">&#7816;</l:l>
+      <l:l i="230">&#7817;</l:l>
+      <l:l i="230">&#7832;</l:l>
+      <l:l i="240">X</l:l>
+      <l:l i="240">x</l:l>
+      <l:l i="240">&#7818;</l:l>
+      <l:l i="240">&#7819;</l:l>
+      <l:l i="240">&#7820;</l:l>
+      <l:l i="240">&#7821;</l:l>
+      <l:l i="250">Y</l:l>
+      <l:l i="250">y</l:l>
+      <l:l i="250">&#221;</l:l>
+      <l:l i="250">&#253;</l:l>
+      <l:l i="250">&#255;</l:l>
+      <l:l i="250">&#376;</l:l>
+      <l:l i="250">&#374;</l:l>
+      <l:l i="250">&#375;</l:l>
+      <l:l i="250">&#435;</l:l>
+      <l:l i="250">&#436;</l:l>
+      <l:l i="250">&#562;</l:l>
+      <l:l i="250">&#563;</l:l>
+      <l:l i="250">&#7822;</l:l>
+      <l:l i="250">&#7823;</l:l>
+      <l:l i="250">&#7833;</l:l>
+      <l:l i="250">&#7922;</l:l>
+      <l:l i="250">&#7923;</l:l>
+      <l:l i="250">&#7924;</l:l>
+      <l:l i="250">&#7925;</l:l>
+      <l:l i="250">&#7926;</l:l>
+      <l:l i="250">&#7927;</l:l>
+      <l:l i="250">&#7928;</l:l>
+      <l:l i="250">&#7929;</l:l>
+      <l:l i="260">Z</l:l>
+      <l:l i="260">z</l:l>
+      <l:l i="260">&#377;</l:l>
+      <l:l i="260">&#378;</l:l>
+      <l:l i="260">&#379;</l:l>
+      <l:l i="260">&#380;</l:l>
+      <l:l i="260">&#381;</l:l>
+      <l:l i="260">&#382;</l:l>
+      <l:l i="260">&#437;</l:l>
+      <l:l i="260">&#438;</l:l>
+      <l:l i="260">&#548;</l:l>
+      <l:l i="260">&#549;</l:l>
+      <l:l i="260">&#656;</l:l>
+      <l:l i="260">&#657;</l:l>
+      <l:l i="260">&#7824;</l:l>
+      <l:l i="260">&#7825;</l:l>
+      <l:l i="260">&#7826;</l:l>
+      <l:l i="260">&#7827;</l:l>
+      <l:l i="260">&#7828;</l:l>
+      <l:l i="260">&#7829;</l:l>
+   </l:letters>
+</l:l10n>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/common.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/common.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/common.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1658 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+                exclude-result-prefixes="doc"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: common.xsl,v 1.1.1.1 2004/10/19 21:21:37 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     This file contains general templates common to both the HTML and FO
+     versions of the DocBook stylesheets.
+     ******************************************************************** -->
+
+<doc:reference xmlns="">
+<referenceinfo>
+<releaseinfo role="meta">
+$Id: common.xsl,v 1.1.1.1 2004/10/19 21:21:37 juntao Exp $
+</releaseinfo>
+<author><surname>Walsh</surname>
+<firstname>Norman</firstname></author>
+<copyright><year>1999</year><year>2000</year>
+<holder>Norman Walsh</holder>
+</copyright>
+</referenceinfo>
+<title>Common Template Reference</title>
+
+<partintro>
+<section><title>Introduction</title>
+
+<para>This is technical reference documentation for the DocBook XSL
+Stylesheets; it documents (some of) the parameters, templates, and
+other elements of the stylesheets.</para>
+
+<para>This is not intended to be <quote>user</quote> documentation.
+It is provided for developers writing customization layers for the
+stylesheets, and for anyone who's interested in <quote>how it
+works</quote>.</para>
+
+<para>Although I am trying to be thorough, this documentation is known
+to be incomplete. Don't forget to read the source, too :-)</para>
+</section>
+</partintro>
+
+</doc:reference>
+
+<!-- ==================================================================== -->
+<!-- Establish strip/preserve whitespace rules -->
+
+<xsl:preserve-space elements="*"/>
+
+<xsl:strip-space elements="
+abstract affiliation anchor answer appendix area areaset areaspec
+artheader article audiodata audioobject author authorblurb authorgroup
+beginpage bibliodiv biblioentry bibliography biblioset blockquote book
+bookbiblio bookinfo callout calloutlist caption caution chapter
+citerefentry cmdsynopsis co collab colophon colspec confgroup
+copyright dedication docinfo editor entry entrytbl epigraph equation
+example figure footnote footnoteref formalpara funcprototype
+funcsynopsis glossary glossdef glossdiv glossentry glosslist graphicco
+group highlights imagedata imageobject imageobjectco important index
+indexdiv indexentry indexterm informalequation informalexample
+informalfigure informaltable inlineequation inlinemediaobject
+itemizedlist itermset keycombo keywordset legalnotice listitem lot
+mediaobject mediaobjectco menuchoice msg msgentry msgexplan msginfo
+msgmain msgrel msgset msgsub msgtext note objectinfo
+orderedlist othercredit part partintro preface printhistory procedure
+programlistingco publisher qandadiv qandaentry qandaset question
+refentry reference refmeta refnamediv refsect1 refsect1info refsect2
+refsect2info refsect3 refsect3info refsynopsisdiv refsynopsisdivinfo
+revhistory revision row sbr screenco screenshot sect1 sect1info sect2
+sect2info sect3 sect3info sect4 sect4info sect5 sect5info section
+sectioninfo seglistitem segmentedlist seriesinfo set setindex setinfo
+shortcut sidebar simplelist simplesect spanspec step subject
+subjectset substeps synopfragment table tbody textobject tfoot tgroup
+thead tip toc tocchap toclevel1 toclevel2 toclevel3 toclevel4
+toclevel5 tocpart varargs variablelist varlistentry videodata
+videoobject void warning subjectset
+
+classsynopsis
+constructorsynopsis
+destructorsynopsis
+fieldsynopsis
+methodparam
+methodsynopsis
+ooclass
+ooexception
+oointerface
+simplemsgentry
+"/>
+
+<!-- ====================================================================== -->
+
+<doc:template name="is.component" xmlns="">
+<refpurpose>Tests if a given node is a component-level element</refpurpose>
+
+<refdescription>
+<para>This template returns '1' if the specified node is a component
+(Chapter, Appendix, etc.), and '0' otherwise.</para>
+</refdescription>
+
+<refparameter>
+<variablelist>
+<varlistentry><term>node</term>
+<listitem>
+<para>The node which is to be tested.</para>
+</listitem>
+</varlistentry>
+</variablelist>
+</refparameter>
+
+<refreturn>
+<para>This template returns '1' if the specified node is a component
+(Chapter, Appendix, etc.), and '0' otherwise.</para>
+</refreturn>
+</doc:template>
+
+<xsl:template name="is.component">
+  <xsl:param name="node" select="."/>
+  <xsl:choose>
+    <xsl:when test="local-name($node) = 'appendix'
+                    or local-name($node) = 'article'
+                    or local-name($node) = 'chapter'
+                    or local-name($node) = 'preface'
+                    or local-name($node) = 'bibliography'
+                    or local-name($node) = 'glossary'
+                    or local-name($node) = 'index'">1</xsl:when>
+    <xsl:otherwise>0</xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- ====================================================================== -->
+
+<doc:template name="is.section" xmlns="">
+<refpurpose>Tests if a given node is a section-level element</refpurpose>
+
+<refdescription>
+<para>This template returns '1' if the specified node is a section
+(Section, Sect1, Sect2, etc.), and '0' otherwise.</para>
+</refdescription>
+
+<refparameter>
+<variablelist>
+<varlistentry><term>node</term>
+<listitem>
+<para>The node which is to be tested.</para>
+</listitem>
+</varlistentry>
+</variablelist>
+</refparameter>
+
+<refreturn>
+<para>This template returns '1' if the specified node is a section
+(Section, Sect1, Sect2, etc.), and '0' otherwise.</para>
+</refreturn>
+</doc:template>
+
+<xsl:template name="is.section">
+  <xsl:param name="node" select="."/>
+  <xsl:choose>
+    <xsl:when test="local-name($node) = 'section'
+                    or local-name($node) = 'sect1'
+                    or local-name($node) = 'sect2'
+                    or local-name($node) = 'sect3'
+                    or local-name($node) = 'sect4'
+                    or local-name($node) = 'sect5'
+                    or local-name($node) = 'refsect1'
+                    or local-name($node) = 'refsect2'
+                    or local-name($node) = 'refsect3'
+                    or local-name($node) = 'simplesect'">1</xsl:when>
+    <xsl:otherwise>0</xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- ====================================================================== -->
+
+<doc:template name="section.level" xmlns="">
+<refpurpose>Returns the hierarchical level of a section.</refpurpose>
+
+<refdescription>
+<para>This template calculates the hierarchical level of a section.
+The element <sgmltag>sect1</sgmltag> is at level 1, <sgmltag>sect2</sgmltag> is
+at level 2, etc.</para>
+
+<para>Recursive sections are calculated down to the fifth level.</para>
+</refdescription>
+
+<refparameter>
+<variablelist>
+<varlistentry><term>node</term>
+<listitem>
+<para>The section node for which the level should be calculated.
+Defaults to the context node.</para>
+</listitem>
+</varlistentry>
+</variablelist>
+</refparameter>
+
+<refreturn>
+<para>The section level, <quote>1</quote>, <quote>2</quote>, etc.
+</para>
+</refreturn>
+</doc:template>
+
+<xsl:template name="section.level">
+  <xsl:param name="node" select="."/>
+  <xsl:choose>
+    <xsl:when test="name($node)='sect1'">1</xsl:when>
+    <xsl:when test="name($node)='sect2'">2</xsl:when>
+    <xsl:when test="name($node)='sect3'">3</xsl:when>
+    <xsl:when test="name($node)='sect4'">4</xsl:when>
+    <xsl:when test="name($node)='sect5'">5</xsl:when>
+    <xsl:when test="name($node)='section'">
+      <xsl:choose>
+        <xsl:when test="$node/../../../../../../section">6</xsl:when>
+        <xsl:when test="$node/../../../../../section">5</xsl:when>
+        <xsl:when test="$node/../../../../section">4</xsl:when>
+        <xsl:when test="$node/../../../section">3</xsl:when>
+        <xsl:when test="$node/../../section">2</xsl:when>
+        <xsl:otherwise>1</xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+    <xsl:when test="name($node)='refsect1' or
+                    name($node)='refsect2' or
+                    name($node)='refsect3' or
+                    name($node)='refsection' or
+                    name($node)='refsynopsisdiv'">
+      <xsl:call-template name="refentry.section.level">
+        <xsl:with-param name="node" select="$node"/>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:when test="name($node)='simplesect'">
+      <xsl:choose>
+        <xsl:when test="$node/../../sect1">2</xsl:when>
+        <xsl:when test="$node/../../sect2">3</xsl:when>
+        <xsl:when test="$node/../../sect3">4</xsl:when>
+        <xsl:when test="$node/../../sect4">5</xsl:when>
+        <xsl:when test="$node/../../sect5">5</xsl:when>
+        <xsl:when test="$node/../../section">
+          <xsl:choose>
+            <xsl:when test="$node/../../../../../section">5</xsl:when>
+            <xsl:when test="$node/../../../../section">4</xsl:when>
+            <xsl:when test="$node/../../../section">3</xsl:when>
+            <xsl:otherwise>2</xsl:otherwise>
+          </xsl:choose>
+        </xsl:when>
+        <xsl:otherwise>1</xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+    <xsl:otherwise>1</xsl:otherwise>
+  </xsl:choose>
+</xsl:template><!-- section.level -->
+
+<doc:template name="qanda.section.level" xmlns="">
+<refpurpose>Returns the hierarchical level of a QandASet.</refpurpose>
+
+<refdescription>
+<para>This template calculates the hierarchical level of a QandASet.
+</para>
+</refdescription>
+
+<refreturn>
+<para>The level, <quote>1</quote>, <quote>2</quote>, etc.
+</para>
+</refreturn>
+</doc:template>
+
+<xsl:template name="qanda.section.level">
+  <xsl:variable name="section"
+                select="(ancestor::section
+                         |ancestor::simplesect
+                         |ancestor::sect5
+                         |ancestor::sect4
+                         |ancestor::sect3
+                         |ancestor::sect2
+                         |ancestor::sect1
+                         |ancestor::refsect3
+                         |ancestor::refsect2
+                         |ancestor::refsect1)[last()]"/>
+
+  <xsl:choose>
+    <xsl:when test="count($section) = '0'">1</xsl:when>
+    <xsl:otherwise>
+      <xsl:variable name="slevel">
+        <xsl:call-template name="section.level">
+          <xsl:with-param name="node" select="$section"/>
+        </xsl:call-template>
+      </xsl:variable>
+      <xsl:value-of select="$slevel + 1"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- Finds the total section depth of a section in a refentry -->
+<xsl:template name="refentry.section.level">
+  <xsl:param name="node" select="."/>
+
+  <xsl:variable name="RElevel">
+    <xsl:call-template name="refentry.level">
+      <xsl:with-param name="node" select="$node/ancestor::refentry[1]"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="levelinRE">
+    <xsl:choose>
+      <xsl:when test="name($node)='refsynopsisdiv'">1</xsl:when>
+      <xsl:when test="name($node)='refsect1'">1</xsl:when>
+      <xsl:when test="name($node)='refsect2'">2</xsl:when>
+      <xsl:when test="name($node)='refsect3'">3</xsl:when>
+      <xsl:when test="name($node)='refsection'">
+        <xsl:choose>
+          <xsl:when test="$node/../../../../../refsection">5</xsl:when>
+          <xsl:when test="$node/../../../../refsection">4</xsl:when>
+          <xsl:when test="$node/../../../refsection">3</xsl:when>
+          <xsl:when test="$node/../../refsection">2</xsl:when>
+          <xsl:otherwise>1</xsl:otherwise>
+        </xsl:choose>
+      </xsl:when>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:value-of select="$levelinRE + $RElevel"/>
+</xsl:template>
+
+<!-- Finds the section depth of a refentry -->
+<xsl:template name="refentry.level">
+  <xsl:param name="node" select="."/>
+  <xsl:variable name="container"
+                select="($node/ancestor::section |
+                        $node/ancestor::sect1 |
+                        $node/ancestor::sect2 |
+                        $node/ancestor::sect3 |
+                        $node/ancestor::sect4 |
+                        $node/ancestor::sect5)[last()]"/>
+
+  <xsl:choose>
+    <xsl:when test="$container">
+      <xsl:variable name="slevel">
+        <xsl:call-template name="section.level">
+          <xsl:with-param name="node" select="$container"/>
+        </xsl:call-template>
+      </xsl:variable>
+      <xsl:value-of select="$slevel + 1"/>
+    </xsl:when>
+    <xsl:otherwise>1</xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="qandadiv.section.level">
+  <xsl:variable name="section.level">
+    <xsl:call-template name="qanda.section.level"/>
+  </xsl:variable>
+  <xsl:variable name="anc.divs" select="ancestor::qandadiv"/>
+
+  <xsl:value-of select="count($anc.divs) + number($section.level)"/>
+</xsl:template>
+
+<xsl:template name="question.answer.label">
+  <xsl:variable name="deflabel">
+    <xsl:choose>
+      <xsl:when test="ancestor-or-self::*[@defaultlabel]">
+        <xsl:value-of select="(ancestor-or-self::*[@defaultlabel])[last()]
+                              /@defaultlabel"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$qanda.defaultlabel"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:variable name="label" select="@label"/>
+
+<!--
+ (hnr      (hierarchical-number-recursive (normalize "qandadiv") node))
+
+	 (parsect  (ancestor-member node (section-element-list)))
+
+	 (defnum   (if (and %qanda-inherit-numeration% 
+			    %section-autolabel%)
+		       (if (node-list-empty? parsect)
+			   (section-autolabel-prefix node)
+			   (section-autolabel parsect))
+		       ""))
+
+	 (hnumber  (let loop ((numlist hnr) (number defnum) 
+			      (sep (if (equal? defnum "") "" ".")))
+		     (if (null? numlist)
+			 number
+			 (loop (cdr numlist) 
+			       (string-append number
+					      sep
+					      (number->string (car numlist)))
+			       "."))))
+	 (cnumber  (child-number (parent node)))
+	 (number   (string-append hnumber 
+				  (if (equal? hnumber "")
+				      ""
+				      ".")
+				  (number->string cnumber))))
+-->
+
+  <xsl:choose>
+    <xsl:when test="$deflabel = 'qanda'">
+      <xsl:call-template name="gentext">
+        <xsl:with-param name="key">
+          <xsl:choose>
+            <xsl:when test="local-name(.) = 'question'">question</xsl:when>
+            <xsl:when test="local-name(.) = 'answer'">answer</xsl:when>
+            <xsl:when test="local-name(.) = 'qandadiv'">qandadiv</xsl:when>
+            <xsl:otherwise>qandaset</xsl:otherwise>
+          </xsl:choose>
+        </xsl:with-param>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:when test="$deflabel = 'label'">
+      <xsl:value-of select="$label"/>
+    </xsl:when>
+    <xsl:when test="$deflabel = 'number'
+                    and local-name(.) = 'question'">
+      <xsl:apply-templates select="ancestor::qandaset[1]"
+                           mode="number"/>
+      <xsl:choose>
+        <xsl:when test="ancestor::qandadiv">
+          <xsl:apply-templates select="ancestor::qandadiv[1]"
+                               mode="number"/>
+          <xsl:apply-templates select="ancestor::qandaentry"
+                               mode="number"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:apply-templates select="ancestor::qandaentry"
+                               mode="number"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+    <xsl:otherwise>
+      <!-- nothing -->
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="qandaset" mode="number">
+  <!-- FIXME: -->
+</xsl:template>
+
+<xsl:template match="qandadiv" mode="number">
+  <xsl:number level="multiple" from="qandaset" format="1."/>
+</xsl:template>
+
+<xsl:template match="qandaentry" mode="number">
+  <xsl:choose>
+    <xsl:when test="ancestor::qandadiv">
+      <xsl:number level="single" from="qandadiv" format="1."/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:number level="single" from="qandaset" format="1."/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- ====================================================================== -->
+
+<xsl:template name="object.id">
+  <xsl:param name="object" select="."/>
+  <xsl:choose>
+    <xsl:when test="$object/@id">
+      <xsl:value-of select="$object/@id"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:value-of select="generate-id($object)"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="person.name">
+  <!-- Formats a personal name. Handles corpauthor as a special case. -->
+  <xsl:param name="node" select="."/>
+
+  <xsl:variable name="style">
+    <xsl:choose>
+      <xsl:when test="$node/@role">
+        <xsl:value-of select="$node/@role"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:call-template name="gentext.template">
+          <xsl:with-param name="context" select="'styles'"/>
+          <xsl:with-param name="name" select="'person-name'"/>
+        </xsl:call-template>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:choose>
+    <!-- the personname element is a specialcase -->
+    <xsl:when test="$node/personname">
+      <xsl:call-template name="person.name">
+        <xsl:with-param name="node" select="$node/personname"/>
+      </xsl:call-template>
+    </xsl:when>
+
+    <!-- handle corpauthor as a special case...-->
+    <xsl:when test="name($node)='corpauthor'">
+      <xsl:apply-templates select="$node"/>
+    </xsl:when>
+
+    <xsl:otherwise>
+      <xsl:choose>
+        <xsl:when test="$style = 'family-given'">
+          <xsl:call-template name="person.name.family-given">
+            <xsl:with-param name="node" select="$node"/>
+          </xsl:call-template>
+        </xsl:when>
+        <xsl:when test="$style = 'last-first'">
+          <xsl:call-template name="person.name.last-first">
+            <xsl:with-param name="node" select="$node"/>
+          </xsl:call-template>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:call-template name="person.name.first-last">
+            <xsl:with-param name="node" select="$node"/>
+          </xsl:call-template>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="person.name.family-given">
+  <xsl:param name="node" select="."/>
+
+  <!-- The family-given style applies a convention for identifying given -->
+  <!-- and family names in locales where it may be ambiguous -->
+  <xsl:apply-templates select="$node//surname[1]"/>
+
+  <xsl:if test="$node//surname and $node//firstname">
+    <xsl:text> </xsl:text>
+  </xsl:if>
+
+  <xsl:apply-templates select="$node//firstname[1]"/>
+
+  <xsl:text> [FAMILY Given]</xsl:text>
+</xsl:template>
+
+<xsl:template name="person.name.last-first">
+  <xsl:param name="node" select="."/>
+
+  <xsl:apply-templates select="$node//surname[1]"/>
+
+  <xsl:if test="$node//surname and $node//firstname">
+    <xsl:text>, </xsl:text>
+  </xsl:if>
+
+  <xsl:apply-templates select="$node//firstname[1]"/>
+</xsl:template>
+
+<xsl:template name="person.name.first-last">
+  <xsl:param name="node" select="."/>
+
+  <xsl:if test="$node//honorific">
+    <xsl:apply-templates select="$node//honorific[1]"/>
+    <xsl:value-of select="$punct.honorific"/>
+  </xsl:if>
+
+  <xsl:if test="$node//firstname">
+    <xsl:if test="$node//honorific">
+      <xsl:text> </xsl:text>
+    </xsl:if>
+    <xsl:apply-templates select="$node//firstname[1]"/>
+  </xsl:if>
+
+  <xsl:if test="$node//othername and $author.othername.in.middle != 0">
+    <xsl:if test="$node//honorific or $node//firstname">
+      <xsl:text> </xsl:text>
+    </xsl:if>
+    <xsl:apply-templates select="$node//othername[1]"/>
+  </xsl:if>
+
+  <xsl:if test="$node//surname">
+    <xsl:if test="$node//honorific or $node//firstname
+                  or ($node//othername and $author.othername.in.middle != 0)">
+      <xsl:text> </xsl:text>
+    </xsl:if>
+    <xsl:apply-templates select="$node//surname[1]"/>
+  </xsl:if>
+
+  <xsl:if test="$node//lineage">
+    <xsl:text>, </xsl:text>
+    <xsl:apply-templates select="$node//lineage[1]"/>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template name="person.name.list">
+  <!-- Return a formatted string representation of the contents of
+       the current element. The current element must contain one or
+       more AUTHORs, CORPAUTHORs, OTHERCREDITs, and/or EDITORs.
+
+       John Doe
+     or
+       John Doe and Jane Doe
+     or
+       John Doe, Jane Doe, and A. Nonymous
+  -->
+  <xsl:param name="person.list"
+             select="author|corpauthor|othercredit|editor"/>
+  <xsl:param name="person.count" select="count($person.list)"/>
+  <xsl:param name="count" select="1"/>
+
+  <xsl:choose>
+    <xsl:when test="$count &gt; $person.count"></xsl:when>
+    <xsl:otherwise>
+      <xsl:call-template name="person.name">
+        <xsl:with-param name="node" select="$person.list[position()=$count]"/>
+      </xsl:call-template>
+
+      <xsl:choose>
+        <xsl:when test="$person.count = 2 and $count = 1">
+          <xsl:call-template name="gentext.template">
+            <xsl:with-param name="context" select="'authorgroup'"/>
+            <xsl:with-param name="name" select="'sep2'"/>
+          </xsl:call-template>
+        </xsl:when>
+        <xsl:when test="$person.count &gt; 2 and $count+1 = $person.count">
+          <xsl:call-template name="gentext.template">
+            <xsl:with-param name="context" select="'authorgroup'"/>
+            <xsl:with-param name="name" select="'seplast'"/>
+          </xsl:call-template>
+        </xsl:when>
+        <xsl:when test="$count &lt; $person.count">
+          <xsl:call-template name="gentext.template">
+            <xsl:with-param name="context" select="'authorgroup'"/>
+            <xsl:with-param name="name" select="'sep'"/>
+          </xsl:call-template>
+        </xsl:when>
+      </xsl:choose>
+
+      <xsl:call-template name="person.name.list">
+        <xsl:with-param name="person.list" select="$person.list"/>
+        <xsl:with-param name="person.count" select="$person.count"/>
+        <xsl:with-param name="count" select="$count+1"/>
+      </xsl:call-template>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template><!-- person.name.list -->
+
+<!-- === synopsis ======================================================= -->
+<!-- The following definitions match those given in the reference
+     documentation for DocBook V3.0
+-->
+
+<xsl:variable name="arg.choice.opt.open.str">[</xsl:variable>
+<xsl:variable name="arg.choice.opt.close.str">]</xsl:variable>
+<xsl:variable name="arg.choice.req.open.str">{</xsl:variable>
+<xsl:variable name="arg.choice.req.close.str">}</xsl:variable>
+<xsl:variable name="arg.choice.plain.open.str"><xsl:text> </xsl:text></xsl:variable>
+<xsl:variable name="arg.choice.plain.close.str"><xsl:text> </xsl:text></xsl:variable>
+<xsl:variable name="arg.choice.def.open.str">[</xsl:variable>
+<xsl:variable name="arg.choice.def.close.str">]</xsl:variable>
+<xsl:variable name="arg.rep.repeat.str">...</xsl:variable>
+<xsl:variable name="arg.rep.norepeat.str"></xsl:variable>
+<xsl:variable name="arg.rep.def.str"></xsl:variable>
+<xsl:variable name="arg.or.sep"> | </xsl:variable>
+<xsl:variable name="cmdsynopsis.hanging.indent">4pi</xsl:variable>
+
+<!-- ====================================================================== -->
+
+<!--
+<xsl:template name="xref.g.subst">
+  <xsl:param name="string"></xsl:param>
+  <xsl:param name="target" select="."/>
+  <xsl:variable name="subst">%g</xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="contains($string, $subst)">
+      <xsl:value-of select="substring-before($string, $subst)"/>
+      <xsl:call-template name="gentext.element.name">
+        <xsl:with-param name="element.name" select="name($target)"/>
+      </xsl:call-template>
+      <xsl:call-template name="xref.g.subst">
+        <xsl:with-param name="string"
+                        select="substring-after($string, $subst)"/>
+        <xsl:with-param name="target" select="$target"/>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:value-of select="$string"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="xref.t.subst">
+  <xsl:param name="string"></xsl:param>
+  <xsl:param name="target" select="."/>
+  <xsl:variable name="subst">%t</xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="contains($string, $subst)">
+      <xsl:call-template name="xref.g.subst">
+        <xsl:with-param name="string"
+                        select="substring-before($string, $subst)"/>
+        <xsl:with-param name="target" select="$target"/>
+      </xsl:call-template>
+      <xsl:call-template name="title.xref">
+        <xsl:with-param name="target" select="$target"/>
+      </xsl:call-template>
+      <xsl:call-template name="xref.t.subst">
+        <xsl:with-param name="string"
+                        select="substring-after($string, $subst)"/>
+        <xsl:with-param name="target" select="$target"/>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:call-template name="xref.g.subst">
+        <xsl:with-param name="string" select="$string"/>
+        <xsl:with-param name="target" select="$target"/>
+      </xsl:call-template>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="xref.n.subst">
+  <xsl:param name="string"></xsl:param>
+  <xsl:param name="target" select="."/>
+  <xsl:variable name="subst">%n</xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="contains($string, $subst)">
+      <xsl:call-template name="xref.t.subst">
+        <xsl:with-param name="string"
+                        select="substring-before($string, $subst)"/>
+        <xsl:with-param name="target" select="$target"/>
+      </xsl:call-template>
+      <xsl:call-template name="number.xref">
+        <xsl:with-param name="target" select="$target"/>
+      </xsl:call-template>
+      <xsl:call-template name="xref.t.subst">
+        <xsl:with-param name="string"
+                        select="substring-after($string, $subst)"/>
+        <xsl:with-param name="target" select="$target"/>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:call-template name="xref.t.subst">
+        <xsl:with-param name="string" select="$string"/>
+        <xsl:with-param name="target" select="$target"/>
+      </xsl:call-template>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="subst.xref.text">
+  <xsl:param name="xref.text"></xsl:param>
+  <xsl:param name="target" select="."/>
+
+  <xsl:call-template name="xref.n.subst">
+    <xsl:with-param name="string" select="$xref.text"/>
+    <xsl:with-param name="target" select="$target"/>
+  </xsl:call-template>
+</xsl:template>
+-->
+
+<!-- ====================================================================== -->
+
+<xsl:template name="filename-basename">
+  <!-- We assume all filenames are really URIs and use "/" -->
+  <xsl:param name="filename"></xsl:param>
+  <xsl:param name="recurse" select="false()"/>
+
+  <xsl:choose>
+    <xsl:when test="substring-after($filename, '/') != ''">
+      <xsl:call-template name="filename-basename">
+        <xsl:with-param name="filename"
+                        select="substring-after($filename, '/')"/>
+        <xsl:with-param name="recurse" select="true()"/>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:value-of select="$filename"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="filename-extension">
+  <xsl:param name="filename"></xsl:param>
+  <xsl:param name="recurse" select="false()"/>
+
+  <!-- Make sure we only look at the base name... -->
+  <xsl:variable name="basefn">
+    <xsl:choose>
+      <xsl:when test="$recurse">
+        <xsl:value-of select="$filename"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:call-template name="filename-basename">
+          <xsl:with-param name="filename" select="$filename"/>
+        </xsl:call-template>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="substring-after($basefn, '.') != ''">
+      <xsl:call-template name="filename-extension">
+        <xsl:with-param name="filename"
+                        select="substring-after($basefn, '.')"/>
+        <xsl:with-param name="recurse" select="true()"/>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:when test="$recurse">
+      <xsl:value-of select="$basefn"/>
+    </xsl:when>
+    <xsl:otherwise></xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- ====================================================================== -->
+
+<doc:template name="select.mediaobject" xmlns="">
+<refpurpose>Selects and processes an appropriate media object from a list</refpurpose>
+
+<refdescription>
+<para>This template takes a list of media objects (usually the
+children of a mediaobject or inlinemediaobject) and processes
+the "right" object.</para>
+
+<para>This template relies on a template named 
+"select.mediaobject.index" to determine which object
+in the list is appropriate.</para>
+
+<para>If no acceptable object is located, nothing happens.</para>
+</refdescription>
+
+<refparameter>
+<variablelist>
+<varlistentry><term>olist</term>
+<listitem>
+<para>The node list of potential objects to examine.</para>
+</listitem>
+</varlistentry>
+</variablelist>
+</refparameter>
+
+<refreturn>
+<para>Calls &lt;xsl:apply-templates&gt; on the selected object.</para>
+</refreturn>
+</doc:template>
+
+<xsl:template name="select.mediaobject">
+  <xsl:param name="olist"
+             select="imageobject|imageobjectco
+                     |videoobject|audioobject|textobject"/>
+  
+  <xsl:variable name="mediaobject.index">
+    <xsl:call-template name="select.mediaobject.index">
+      <xsl:with-param name="olist" select="$olist"/>
+      <xsl:with-param name="count" select="1"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:if test="$mediaobject.index != ''">
+    <xsl:apply-templates select="$olist[position() = $mediaobject.index]"/>
+  </xsl:if>
+</xsl:template>
+
+<!-- ====================================================================== -->
+
+<doc:template name="select.mediaobject.index" xmlns="">
+<refpurpose>Selects the position of the appropriate media object from a list</refpurpose>
+
+<refdescription>
+<para>This template takes a list of media objects (usually the
+children of a mediaobject or inlinemediaobject) and determines
+the "right" object. It returns the position of that object
+to be used by the calling template.</para>
+
+<para>If the parameter <parameter>use.role.for.mediaobject</parameter>
+is nonzero, then it first checks for an object with
+a role attribute of the appropriate value.  It takes the first
+of those.  Otherwise, it takes the first acceptable object
+through a recursive pass through the list.</para>
+
+<para>This template relies on a template named "is.acceptable.mediaobject"
+to determine if a given object is an acceptable graphic. The semantics
+of media objects is that the first acceptable graphic should be used.
+</para>
+
+<para>If no acceptable object is located, no index is returned.</para>
+</refdescription>
+
+<refparameter>
+<variablelist>
+<varlistentry><term>olist</term>
+<listitem>
+<para>The node list of potential objects to examine.</para>
+</listitem>
+</varlistentry>
+<varlistentry><term>count</term>
+<listitem>
+<para>The position in the list currently being considered by the 
+recursive process.</para>
+</listitem>
+</varlistentry>
+</variablelist>
+</refparameter>
+
+<refreturn>
+<para>Returns the position in the original list of the selected object.</para>
+</refreturn>
+</doc:template>
+
+<xsl:template name="select.mediaobject.index">
+  <xsl:param name="olist"
+             select="imageobject|imageobjectco
+                     |videoobject|audioobject|textobject"/>
+  <xsl:param name="count">1</xsl:param>
+
+  <xsl:choose>
+    <!-- Test for objects preferred by role -->
+    <xsl:when test="$use.role.for.mediaobject != 0 
+               and $preferred.mediaobject.role != ''
+               and $olist[@role = $preferred.mediaobject.role]"> 
+      
+      <!-- Get the first hit's position index -->
+      <xsl:for-each select="$olist">
+        <xsl:if test="@role = $preferred.mediaobject.role and
+             not(preceding-sibling::*[@role = $preferred.mediaobject.role])"> 
+          <xsl:value-of select="position()"/> 
+        </xsl:if>
+      </xsl:for-each>
+    </xsl:when>
+
+    <xsl:when test="$use.role.for.mediaobject != 0 
+               and $olist[@role = $stylesheet.result.type]">
+      <!-- Get the first hit's position index -->
+      <xsl:for-each select="$olist">
+        <xsl:if test="@role = $stylesheet.result.type and 
+              not(preceding-sibling::*[@role = $stylesheet.result.type])"> 
+          <xsl:value-of select="position()"/> 
+        </xsl:if>
+      </xsl:for-each>
+    </xsl:when>
+    <!-- Accept 'html' for $stylesheet.result.type = 'xhtml' -->
+    <xsl:when test="$use.role.for.mediaobject != 0 
+               and $stylesheet.result.type = 'xhtml'
+               and $olist[@role = 'html']">
+      <!-- Get the first hit's position index -->
+      <xsl:for-each select="$olist">
+        <xsl:if test="@role = 'html' and 
+              not(preceding-sibling::*[@role = 'html'])"> 
+          <xsl:value-of select="position()"/> 
+        </xsl:if>
+      </xsl:for-each>
+    </xsl:when>
+    <xsl:otherwise>
+      <!-- Otherwise select first acceptable object -->
+      <xsl:if test="$count &lt;= count($olist)">
+        <xsl:variable name="object" select="$olist[position()=$count]"/>
+    
+        <xsl:variable name="useobject">
+          <xsl:choose>
+            <!-- The phrase is used only when contains TeX Math and output is FO -->
+            <xsl:when test="name($object)='textobject' and $object/phrase
+                            and $object/@role='tex' and $stylesheet.result.type = 'fo'
+                            and $tex.math.in.alt != ''">
+              <xsl:text>1</xsl:text> 
+            </xsl:when>
+            <!-- The phrase is never used -->
+            <xsl:when test="name($object)='textobject' and $object/phrase">
+              <xsl:text>0</xsl:text>
+            </xsl:when>
+            <xsl:when test="name($object)='textobject'
+                            and $object/ancestor::equation ">
+            <!-- The first textobject is not a reasonable fallback
+                 for equation image -->
+              <xsl:text>0</xsl:text>
+            </xsl:when>
+            <!-- The first textobject is a reasonable fallback -->
+            <xsl:when test="name($object)='textobject'
+                            and $object[not(@role) or @role!='tex']">
+              <xsl:text>1</xsl:text>
+            </xsl:when>
+            <!-- don't use graphic when output is FO, TeX Math is used 
+                 and there is math in alt element -->
+            <xsl:when test="$object/ancestor::equation and 
+                            $object/ancestor::equation/alt[@role='tex']
+                            and $stylesheet.result.type = 'fo'
+                            and $tex.math.in.alt != ''">
+              <xsl:text>0</xsl:text>
+            </xsl:when>
+            <!-- If there's only one object, use it -->
+            <xsl:when test="$count = 1 and count($olist) = 1">
+               <xsl:text>1</xsl:text>
+            </xsl:when>
+            <!-- Otherwise, see if this one is a useable graphic -->
+            <xsl:otherwise>
+              <xsl:choose>
+                <!-- peek inside imageobjectco to simplify the test -->
+                <xsl:when test="local-name($object) = 'imageobjectco'">
+                  <xsl:call-template name="is.acceptable.mediaobject">
+                    <xsl:with-param name="object" select="$object/imageobject"/>
+                  </xsl:call-template>
+                </xsl:when>
+                <xsl:otherwise>
+                  <xsl:call-template name="is.acceptable.mediaobject">
+                    <xsl:with-param name="object" select="$object"/>
+                  </xsl:call-template>
+                </xsl:otherwise>
+              </xsl:choose>
+            </xsl:otherwise>
+          </xsl:choose>
+        </xsl:variable>
+    
+        <xsl:choose>
+          <xsl:when test="$useobject='1'">
+            <xsl:value-of select="$count"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:call-template name="select.mediaobject.index">
+              <xsl:with-param name="olist" select="$olist"/>
+              <xsl:with-param name="count" select="$count + 1"/>
+            </xsl:call-template>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:if>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<doc:template name="is.acceptable.mediaobject" xmlns="">
+<refpurpose>Returns '1' if the specified media object is recognized.</refpurpose>
+
+<refdescription>
+<para>This template examines a media object and returns '1' if the
+object is recognized as a graphic.</para>
+</refdescription>
+
+<refparameter>
+<variablelist>
+<varlistentry><term>object</term>
+<listitem>
+<para>The media object to consider.</para>
+</listitem>
+</varlistentry>
+</variablelist>
+</refparameter>
+
+<refreturn>
+<para>0 or 1</para>
+</refreturn>
+</doc:template>
+
+<xsl:template name="is.acceptable.mediaobject">
+  <xsl:param name="object"></xsl:param>
+
+  <xsl:variable name="filename">
+    <xsl:call-template name="mediaobject.filename">
+      <xsl:with-param name="object" select="$object"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="ext">
+    <xsl:call-template name="filename-extension">
+      <xsl:with-param name="filename" select="$filename"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <!-- there will only be one -->
+  <xsl:variable name="data" select="$object/videodata
+                                    |$object/imagedata
+                                    |$object/audiodata"/>
+
+  <xsl:variable name="format" select="$data/@format"/>
+
+  <xsl:variable name="graphic.format">
+    <xsl:if test="$format">
+      <xsl:call-template name="is.graphic.format">
+        <xsl:with-param name="format" select="$format"/>
+      </xsl:call-template>
+    </xsl:if>
+  </xsl:variable>
+
+  <xsl:variable name="graphic.ext">
+    <xsl:if test="$ext">
+      <xsl:call-template name="is.graphic.extension">
+        <xsl:with-param name="ext" select="$ext"/>
+      </xsl:call-template>
+    </xsl:if>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="$use.svg = 0 and $format = 'SVG'">0</xsl:when>
+    <xsl:when xmlns:svg="http://www.w3.org/2000/svg"
+              test="$use.svg != 0 and $object/svg:*">1</xsl:when>
+    <xsl:when test="$graphic.format = '1'">1</xsl:when>
+    <xsl:when test="$graphic.ext = '1'">1</xsl:when>
+    <xsl:otherwise>0</xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="mediaobject.filename">
+  <xsl:param name="object"></xsl:param>
+
+  <xsl:variable name="data" select="$object/videodata
+                                    |$object/imagedata
+                                    |$object/audiodata
+                                    |$object"/>
+
+  <xsl:variable name="filename">
+    <xsl:choose>
+      <xsl:when test="$data[@fileref]">
+        <xsl:value-of select="$data/@fileref"/>
+      </xsl:when>
+      <xsl:when test="$data[@entityref]">
+        <xsl:value-of select="unparsed-entity-uri($data/@entityref)"/>
+      </xsl:when>
+      <xsl:otherwise></xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:variable name="real.ext">
+    <xsl:call-template name="filename-extension">
+      <xsl:with-param name="filename" select="$filename"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="ext">
+    <xsl:choose>
+      <xsl:when test="$real.ext != ''">
+        <xsl:value-of select="$real.ext"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$graphic.default.extension"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:variable name="graphic.ext">
+    <xsl:call-template name="is.graphic.extension">
+      <xsl:with-param name="ext" select="$ext"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="$real.ext = ''">
+      <xsl:choose>
+        <xsl:when test="$ext != ''">
+          <xsl:value-of select="$filename"/>
+          <xsl:text>.</xsl:text>
+          <xsl:value-of select="$ext"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="$filename"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+    <xsl:when test="not($graphic.ext)">
+      <xsl:choose>
+        <xsl:when test="$graphic.default.extension != ''">
+          <xsl:value-of select="$filename"/>
+          <xsl:text>.</xsl:text>
+          <xsl:value-of select="$graphic.default.extension"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="$filename"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:value-of select="$filename"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- ====================================================================== -->
+
+<doc:template name="check.id.unique" xmlns="">
+<refpurpose>Warn users about references to non-unique IDs</refpurpose>
+<refdescription>
+<para>If passed an ID in <varname>linkend</varname>,
+<function>check.id.unique</function> prints
+a warning message to the user if either the ID does not exist or
+the ID is not unique.</para>
+</refdescription>
+</doc:template>
+
+<xsl:template name="check.id.unique">
+  <xsl:param name="linkend"></xsl:param>
+  <xsl:if test="$linkend != ''">
+    <xsl:variable name="targets" select="key('id',$linkend)"/>
+    <xsl:variable name="target" select="$targets[1]"/>
+
+    <xsl:if test="count($targets)=0">
+      <xsl:message>
+        <xsl:text>Error: no ID for constraint linkend: </xsl:text>
+        <xsl:value-of select="$linkend"/>
+        <xsl:text>.</xsl:text>
+      </xsl:message>
+      <!--
+      <xsl:message>
+        <xsl:text>If the ID exists in your document, did your </xsl:text>
+        <xsl:text>XSLT Processor load the DTD?</xsl:text>
+      </xsl:message>
+      -->
+    </xsl:if>
+
+    <xsl:if test="count($targets)>1">
+      <xsl:message>
+        <xsl:text>Warning: multiple "IDs" for constraint linkend: </xsl:text>
+        <xsl:value-of select="$linkend"/>
+        <xsl:text>.</xsl:text>
+      </xsl:message>
+    </xsl:if>
+  </xsl:if>
+</xsl:template>
+
+<doc:template name="check.idref.targets" xmlns="">
+<refpurpose>Warn users about incorrectly typed references</refpurpose>
+<refdescription>
+<para>If passed an ID in <varname>linkend</varname>,
+<function>check.idref.targets</function> makes sure that the element
+pointed to by the link is one of the elements listed in
+<varname>element-list</varname> and warns the user otherwise.</para>
+</refdescription>
+</doc:template>
+
+<xsl:template name="check.idref.targets">
+  <xsl:param name="linkend"></xsl:param>
+  <xsl:param name="element-list"></xsl:param>
+  <xsl:if test="$linkend != ''">
+    <xsl:variable name="targets" select="key('id',$linkend)"/>
+    <xsl:variable name="target" select="$targets[1]"/>
+
+    <xsl:if test="count($target) &gt; 0">
+      <xsl:if test="not(contains(concat(' ', $element-list, ' '), name($target)))">
+        <xsl:message>
+          <xsl:text>Error: linkend (</xsl:text>
+          <xsl:value-of select="$linkend"/>
+          <xsl:text>) points to "</xsl:text>
+          <xsl:value-of select="name($target)"/>
+          <xsl:text>" not (one of): </xsl:text>
+          <xsl:value-of select="$element-list"/>
+        </xsl:message>
+      </xsl:if>
+    </xsl:if>
+  </xsl:if>
+</xsl:template>
+
+<!-- ====================================================================== -->
+<!-- Procedure Step Numeration -->
+
+<xsl:param name="procedure.step.numeration.formats" select="'1aiAI'"/>
+
+<xsl:template name="procedure.step.numeration">
+  <xsl:param name="context" select="."/>
+  <xsl:variable name="format.length"
+                select="string-length($procedure.step.numeration.formats)"/>
+  <xsl:choose>
+    <xsl:when test="local-name($context) = 'substeps'">
+      <xsl:variable name="ssdepth"
+                    select="count($context/ancestor::substeps)"/>
+      <xsl:variable name="sstype" select="($ssdepth mod $format.length)+2"/>
+      <xsl:choose>
+        <xsl:when test="$sstype &gt; $format.length">
+          <xsl:value-of select="substring($procedure.step.numeration.formats,1,1)"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="substring($procedure.step.numeration.formats,$sstype,1)"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+    <xsl:when test="local-name($context) = 'step'">
+      <xsl:variable name="sdepth"
+                    select="count($context/ancestor::substeps)"/>
+      <xsl:variable name="stype" select="($sdepth mod $format.length)+1"/>
+      <xsl:value-of select="substring($procedure.step.numeration.formats,$stype,1)"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:message>
+        <xsl:text>Unexpected context in procedure.step.numeration: </xsl:text>
+        <xsl:value-of select="local-name($context)"/>
+      </xsl:message>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="step" mode="number">
+  <xsl:param name="rest" select="''"/>
+  <xsl:param name="recursive" select="1"/>
+  <xsl:variable name="format">
+    <xsl:call-template name="procedure.step.numeration"/>
+  </xsl:variable>
+  <xsl:variable name="num">
+    <xsl:number count="step" format="{$format}"/>
+  </xsl:variable>
+  <xsl:choose>
+    <xsl:when test="$recursive != 0 and ancestor::step">
+      <xsl:apply-templates select="ancestor::step[1]" mode="number">
+        <xsl:with-param name="rest" select="concat('.', $num, $rest)"/>
+      </xsl:apply-templates>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:value-of select="concat($num, $rest)"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- ====================================================================== -->
+<!-- OrderedList Numeration -->
+
+<xsl:template name="orderedlist-starting-number">
+  <xsl:param name="list" select="."/>
+  <xsl:choose>
+    <xsl:when test="not($list/@continuation = 'continues')">1</xsl:when>
+    <xsl:otherwise>
+      <xsl:variable name="prevlist"
+                    select="$list/preceding::orderedlist[1]"/>
+      <xsl:choose>
+        <xsl:when test="count($prevlist) = 0">2</xsl:when>
+        <xsl:otherwise>
+          <xsl:variable name="prevlength" select="count($prevlist/listitem)"/>
+          <xsl:variable name="prevstart">
+            <xsl:call-template name="orderedlist-starting-number">
+              <xsl:with-param name="list" select="$prevlist"/>
+            </xsl:call-template>
+          </xsl:variable>
+          <xsl:value-of select="$prevstart + $prevlength"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="orderedlist-item-number">
+  <!-- context node must be a listitem in an orderedlist -->
+  <xsl:param name="node" select="."/>
+
+  <xsl:choose>
+    <xsl:when test="$node/@override">
+      <xsl:value-of select="$node/@override"/>
+    </xsl:when>
+    <xsl:when test="$node/preceding-sibling::listitem">
+      <xsl:variable name="pnum">
+        <xsl:call-template name="orderedlist-item-number">
+          <xsl:with-param name="node" select="$node/preceding-sibling::listitem[1]"/>
+        </xsl:call-template>
+      </xsl:variable>
+      <xsl:value-of select="$pnum + 1"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:call-template name="orderedlist-starting-number">
+        <xsl:with-param name="list" select="parent::*"/>
+      </xsl:call-template>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="next.numeration">
+  <xsl:param name="numeration" select="'default'"/>
+  <xsl:choose>
+    <!-- Change this list if you want to change the order of numerations -->
+    <xsl:when test="$numeration = 'arabic'">loweralpha</xsl:when>
+    <xsl:when test="$numeration = 'loweralpha'">lowerroman</xsl:when>
+    <xsl:when test="$numeration = 'lowerroman'">upperalpha</xsl:when>
+    <xsl:when test="$numeration = 'upperalpha'">upperroman</xsl:when>
+    <xsl:when test="$numeration = 'upperroman'">arabic</xsl:when>
+    <xsl:otherwise>arabic</xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="list.numeration">
+  <xsl:param name="node" select="."/>
+
+  <xsl:choose>
+    <xsl:when test="$node/@numeration">
+      <xsl:value-of select="$node/@numeration"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:choose>
+        <xsl:when test="$node/ancestor::orderedlist">
+          <xsl:call-template name="next.numeration">
+            <xsl:with-param name="numeration">
+              <xsl:call-template name="list.numeration">
+                <xsl:with-param name="node" select="$node/ancestor::orderedlist[1]"/>
+              </xsl:call-template>
+            </xsl:with-param>
+          </xsl:call-template>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:call-template name="next.numeration"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- ====================================================================== -->
+<!-- ItemizedList "Numeration" -->
+
+<xsl:template name="next.itemsymbol">
+  <xsl:param name="itemsymbol" select="'default'"/>
+  <xsl:choose>
+    <!-- Change this list if you want to change the order of symbols -->
+    <xsl:when test="$itemsymbol = 'disc'">circle</xsl:when>
+    <xsl:when test="$itemsymbol = 'round'">square</xsl:when>
+    <xsl:otherwise>disc</xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="list.itemsymbol">
+  <xsl:param name="node" select="."/>
+
+  <xsl:choose>
+    <xsl:when test="$node/@mark">
+      <xsl:value-of select="$node/@mark"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:choose>
+        <xsl:when test="$node/ancestor::itemizedlist">
+          <xsl:call-template name="next.itemsymbol">
+            <xsl:with-param name="itemsymbol">
+              <xsl:call-template name="list.itemsymbol">
+                <xsl:with-param name="node" select="$node/ancestor::itemizedlist[1]"/>
+              </xsl:call-template>
+            </xsl:with-param>
+          </xsl:call-template>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:call-template name="next.itemsymbol"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- ====================================================================== -->
+
+<doc:template name="copyright.years" xmlns="">
+<refpurpose>Print a set of years with collapsed ranges</refpurpose>
+
+<refdescription>
+<para>This template prints a list of year elements with consecutive
+years printed as a range. In other words:</para>
+
+<screen><![CDATA[<year>1992</year>
+<year>1993</year>
+<year>1994</year>]]></screen>
+
+<para>is printed <quote>1992-1994</quote>, whereas:</para>
+
+<screen><![CDATA[<year>1992</year>
+<year>1994</year>]]></screen>
+
+<para>is printed <quote>1992, 1994</quote>.</para>
+
+<para>This template assumes that all the year elements contain only
+decimal year numbers, that the elements are sorted in increasing
+numerical order, that there are no duplicates, and that all the years
+are expressed in full <quote>century+year</quote>
+(<quote>1999</quote> not <quote>99</quote>) notation.</para>
+</refdescription>
+
+<refparameter>
+<variablelist>
+<varlistentry><term>years</term>
+<listitem>
+<para>The initial set of year elements.</para>
+</listitem>
+</varlistentry>
+<varlistentry><term>print.ranges</term>
+<listitem>
+<para>If non-zero, multi-year ranges are collapsed. If zero, all years
+are printed discretely.</para>
+</listitem>
+</varlistentry>
+<varlistentry><term>single.year.ranges</term>
+<listitem>
+<para>If non-zero, two consecutive years will be printed as a range,
+otherwise, they will be printed discretely. In other words, a single
+year range is <quote>1991-1992</quote> but discretely it's
+<quote>1991, 1992</quote>.</para>
+</listitem>
+</varlistentry>
+</variablelist>
+</refparameter>
+
+<refreturn>
+<para>This template returns the formatted list of years.</para>
+</refreturn>
+</doc:template>
+
+<xsl:template name="copyright.years">
+  <xsl:param name="years"/>
+  <xsl:param name="print.ranges" select="1"/>
+  <xsl:param name="single.year.ranges" select="0"/>
+  <xsl:param name="firstyear" select="0"/>
+  <xsl:param name="nextyear" select="0"/>
+
+  <!--
+  <xsl:message terminate="no">
+    <xsl:text>CY: </xsl:text>
+    <xsl:value-of select="count($years)"/>
+    <xsl:text>, </xsl:text>
+    <xsl:value-of select="$firstyear"/>
+    <xsl:text>, </xsl:text>
+    <xsl:value-of select="$nextyear"/>
+    <xsl:text>, </xsl:text>
+    <xsl:value-of select="$print.ranges"/>
+    <xsl:text>, </xsl:text>
+    <xsl:value-of select="$single.year.ranges"/>
+    <xsl:text> (</xsl:text>
+    <xsl:value-of select="$years[1]"/>
+    <xsl:text>)</xsl:text>
+  </xsl:message>
+  -->
+
+  <xsl:choose>
+    <xsl:when test="$print.ranges = 0 and count($years) &gt; 0">
+      <xsl:choose>
+        <xsl:when test="count($years) = 1">
+          <xsl:apply-templates select="$years[1]" mode="titlepage.mode"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:apply-templates select="$years[1]" mode="titlepage.mode"/>
+          <xsl:text>, </xsl:text>
+          <xsl:call-template name="copyright.years">
+            <xsl:with-param name="years"
+                            select="$years[position() &gt; 1]"/>
+            <xsl:with-param name="print.ranges" select="$print.ranges"/>
+            <xsl:with-param name="single.year.ranges"
+                            select="$single.year.ranges"/>
+          </xsl:call-template>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+    <xsl:when test="count($years) = 0">
+      <xsl:variable name="lastyear" select="$nextyear - 1"/>
+      <xsl:choose>
+        <xsl:when test="$firstyear = 0">
+          <!-- there weren't any years at all -->
+        </xsl:when>
+        <xsl:when test="$firstyear = $lastyear">
+          <xsl:value-of select="$firstyear"/>
+        </xsl:when>
+        <xsl:when test="$single.year.ranges = 0
+                        and $lastyear = $firstyear + 1">
+          <xsl:value-of select="$firstyear"/>
+          <xsl:text>, </xsl:text>
+          <xsl:value-of select="$lastyear"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="$firstyear"/>
+          <xsl:text>-</xsl:text>
+          <xsl:value-of select="$lastyear"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+    <xsl:when test="$firstyear = 0">
+      <xsl:call-template name="copyright.years">
+        <xsl:with-param name="years"
+                        select="$years[position() &gt; 1]"/>
+        <xsl:with-param name="firstyear" select="$years[1]"/>
+        <xsl:with-param name="nextyear" select="$years[1] + 1"/>
+        <xsl:with-param name="print.ranges" select="$print.ranges"/>
+        <xsl:with-param name="single.year.ranges"
+                        select="$single.year.ranges"/>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:when test="$nextyear = $years[1]">
+      <xsl:call-template name="copyright.years">
+        <xsl:with-param name="years"
+                        select="$years[position() &gt; 1]"/>
+        <xsl:with-param name="firstyear" select="$firstyear"/>
+        <xsl:with-param name="nextyear" select="$nextyear + 1"/>
+        <xsl:with-param name="print.ranges" select="$print.ranges"/>
+        <xsl:with-param name="single.year.ranges"
+                        select="$single.year.ranges"/>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:otherwise>
+      <!-- we have years left, but they aren't in the current range -->
+      <xsl:choose>
+        <xsl:when test="$nextyear = $firstyear + 1">
+          <xsl:value-of select="$firstyear"/>
+          <xsl:text>, </xsl:text>
+        </xsl:when>
+        <xsl:when test="$single.year.ranges = 0
+                        and $nextyear = $firstyear + 2">
+          <xsl:value-of select="$firstyear"/>
+          <xsl:text>, </xsl:text>
+          <xsl:value-of select="$nextyear - 1"/>
+          <xsl:text>, </xsl:text>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="$firstyear"/>
+          <xsl:text>-</xsl:text>
+          <xsl:value-of select="$nextyear - 1"/>
+          <xsl:text>, </xsl:text>
+        </xsl:otherwise>
+      </xsl:choose>
+      <xsl:call-template name="copyright.years">
+        <xsl:with-param name="years"
+                        select="$years[position() &gt; 1]"/>
+        <xsl:with-param name="firstyear" select="$years[1]"/>
+        <xsl:with-param name="nextyear" select="$years[1] + 1"/>
+        <xsl:with-param name="print.ranges" select="$print.ranges"/>
+        <xsl:with-param name="single.year.ranges"
+                        select="$single.year.ranges"/>
+      </xsl:call-template>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- ====================================================================== -->
+
+<doc:template name="find.path.params" xmlns="">
+<refpurpose>Search in a table for the "best" match for the node</refpurpose>
+
+<refdescription>
+<para>This template searches in a table for the value that most-closely
+(in the typical best-match sense of XSLT) matches the current (element)
+node location.</para>
+</refdescription>
+</doc:template>
+
+<xsl:template name="find.path.params">
+  <xsl:param name="node" select="."/>
+  <xsl:param name="table" select="''"/>
+  <xsl:param name="location">
+    <xsl:call-template name="xpath.location">
+      <xsl:with-param name="node" select="$node"/>
+    </xsl:call-template>
+  </xsl:param>
+
+  <xsl:variable name="value">
+    <xsl:call-template name="lookup.key">
+      <xsl:with-param name="key" select="$location"/>
+      <xsl:with-param name="table" select="$table"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="$value != ''">
+      <xsl:value-of select="$value"/>
+    </xsl:when>
+    <xsl:when test="contains($location, '/')">
+      <xsl:call-template name="find.path.params">
+        <xsl:with-param name="node" select="$node"/>
+        <xsl:with-param name="table" select="$table"/>
+        <xsl:with-param name="location" select="substring-after($location, '/')"/>
+      </xsl:call-template>
+    </xsl:when>
+  </xsl:choose>
+</xsl:template>
+
+</xsl:stylesheet>
+

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/cs.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/cs.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/cs.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,624 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="cs" english-language-name="Czech">
+
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+   <l:gentext key="Abstract" text="Abstrakt"/>
+   <l:gentext key="abstract" text="Abstrakt"/>
+   <l:gentext key="Answer" text="Odpov&#283;&#271;:"/>
+   <l:gentext key="answer" text="Odpov&#283;&#271;:"/>
+   <l:gentext key="Appendix" text="P&#345;&#237;loha"/>
+   <l:gentext key="appendix" text="P&#345;&#237;loha"/>
+   <l:gentext key="Article" text="&#268;l&#225;nek"/>
+   <l:gentext key="article" text="&#268;l&#225;nek"/>
+   <l:gentext key="Bibliography" text="Bibliografie"/>
+   <l:gentext key="bibliography" text="Bibliografie"/>
+   <l:gentext key="Book" text="Kniha"/>
+   <l:gentext key="book" text="Kniha"/>
+   <l:gentext key="CAUTION" text="V&#253;straha"/>
+   <l:gentext key="Caution" text="V&#253;straha"/>
+   <l:gentext key="caution" text="V&#253;straha"/>
+   <l:gentext key="Chapter" text="Kapitola"/>
+   <l:gentext key="chapter" text="Kapitola"/>
+   <l:gentext key="Colophon" text="Tir&#225;&#382;"/>
+   <l:gentext key="colophon" text="Tir&#225;&#382;"/>
+   <l:gentext key="Copyright" text="Copyright"/>
+   <l:gentext key="copyright" text="Copyright"/>
+   <l:gentext key="Dedication" text="V&#283;nov&#225;n&#237;"/>
+   <l:gentext key="dedication" text="V&#283;nov&#225;n&#237;"/>
+   <l:gentext key="Edition" text="Vyd&#225;n&#237;"/>
+   <l:gentext key="edition" text="Vyd&#225;n&#237;"/>
+   <l:gentext key="Equation" text="Rovnice"/>
+   <l:gentext key="equation" text="Rovnice"/>
+   <l:gentext key="Example" text="P&#345;&#237;klad"/>
+   <l:gentext key="example" text="P&#345;&#237;klad"/>
+   <l:gentext key="Figure" text="Obr&#225;zek"/>
+   <l:gentext key="figure" text="Obr&#225;zek"/>
+   <l:gentext key="Glossary" text="Slovn&#237;k"/>
+   <l:gentext key="glossary" text="Slovn&#237;k"/>
+   <l:gentext key="GlossSee" text="Viz"/>
+   <l:gentext key="glosssee" text="Viz"/>
+   <l:gentext key="GlossSeeAlso" text="Viz t&#233;&#382;"/>
+   <l:gentext key="glossseealso" text="Viz t&#233;&#382;"/>
+   <l:gentext key="IMPORTANT" text="D&#367;le&#382;it&#233;"/>
+   <l:gentext key="important" text="D&#367;le&#382;it&#233;"/>
+   <l:gentext key="Important" text="D&#367;le&#382;it&#233;"/>
+   <l:gentext key="Index" text="Rejst&#345;&#237;k"/>
+   <l:gentext key="index" text="Rejst&#345;&#237;k"/>
+   <l:gentext key="ISBN" text="ISBN"/>
+   <l:gentext key="isbn" text="ISBN"/>
+   <l:gentext key="LegalNotice" text="Pr&#225;vn&#237; dolo&#382;ka"/>
+   <l:gentext key="legalnotice" text="Pr&#225;vn&#237; dolo&#382;ka"/>
+   <l:gentext key="MsgAud" text="Publikum"/>
+   <l:gentext key="msgaud" text="Publikum"/>
+   <l:gentext key="MsgLevel" text="&#218;rove&#328;"/>
+   <l:gentext key="msglevel" text="&#218;rove&#328;"/>
+   <l:gentext key="MsgOrig" text="P&#367;vod"/>
+   <l:gentext key="msgorig" text="P&#367;vod"/>
+   <l:gentext key="NOTE" text="Pozn&#225;mka"/>
+   <l:gentext key="Note" text="Pozn&#225;mka"/>
+   <l:gentext key="note" text="Pozn&#225;mka"/>
+   <l:gentext key="Part" text="&#268;&#225;st"/>
+   <l:gentext key="part" text="&#268;&#225;st"/>
+   <l:gentext key="Preface" text="P&#345;edmluva"/>
+   <l:gentext key="preface" text="P&#345;edmluva"/>
+   <l:gentext key="Procedure" text="Postup"/>
+   <l:gentext key="procedure" text="Postup"/>
+   <l:gentext key="ProductionSet" text="Produkce"/>
+   <l:gentext key="PubDate" text="Publication Date" lang="en"/>
+   <l:gentext key="pubdate" text="Publication date" lang="en"/>
+   <l:gentext key="Published" text="Vyd&#225;no"/>
+   <l:gentext key="published" text="Vyd&#225;no"/>
+   <l:gentext key="Qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="Question" text="Ot&#225;zka:"/>
+   <l:gentext key="question" text="Ot&#225;zka:"/>
+   <l:gentext key="RefEntry" text=""/>
+   <l:gentext key="refentry" text=""/>
+   <l:gentext key="Reference" text="Odkaz"/>
+   <l:gentext key="reference" text="Odkaz"/>
+   <l:gentext key="RefName" text="Jm&#233;no"/>
+   <l:gentext key="refname" text="Jm&#233;no"/>
+   <l:gentext key="RefSection" text=""/>
+   <l:gentext key="refsection" text=""/>
+   <l:gentext key="RefSynopsisDiv" text="P&#345;ehled"/>
+   <l:gentext key="refsynopsisdiv" text="P&#345;ehled"/>
+   <l:gentext key="RevHistory" text="P&#345;ehled reviz&#237;"/>
+   <l:gentext key="revhistory" text="P&#345;ehled reviz&#237;"/>
+   <l:gentext key="revision" text="Revize"/>
+   <l:gentext key="Revision" text="Revize"/>
+   <l:gentext key="sect1" text="Odd&#237;l"/>
+   <l:gentext key="sect2" text="Odd&#237;l"/>
+   <l:gentext key="sect3" text="Odd&#237;l"/>
+   <l:gentext key="sect4" text="Odd&#237;l"/>
+   <l:gentext key="sect5" text="Odd&#237;l"/>
+   <l:gentext key="section" text="Odd&#237;l"/>
+   <l:gentext key="Section" text="Odd&#237;l"/>
+   <l:gentext key="see" text="Viz"/>
+   <l:gentext key="See" text="Viz"/>
+   <l:gentext key="seealso" text="Viz t&#233;&#382;"/>
+   <l:gentext key="Seealso" text="Viz t&#233;&#382;"/>
+   <l:gentext key="SeeAlso" text="Viz t&#233;&#382;"/>
+   <l:gentext key="set" text="Sada"/>
+   <l:gentext key="Set" text="Sada"/>
+   <l:gentext key="setindex" text="Rejst&#345;&#237;k sady"/>
+   <l:gentext key="SetIndex" text="Rejst&#345;&#237;k sady"/>
+   <l:gentext key="Sidebar" text="Margin&#225;lie"/>
+   <l:gentext key="sidebar" text="Margin&#225;lie"/>
+   <l:gentext key="step" text="krok"/>
+   <l:gentext key="Step" text="Krok"/>
+   <l:gentext key="Table" text="Tabulka"/>
+   <l:gentext key="table" text="Tabulka"/>
+   <l:gentext key="tip" text="Tip"/>
+   <l:gentext key="TIP" text="Tip"/>
+   <l:gentext key="Tip" text="Tip"/>
+   <l:gentext key="Warning" text="Varov&#225;n&#237;"/>
+   <l:gentext key="warning" text="Varov&#225;n&#237;"/>
+   <l:gentext key="WARNING" text="Varov&#225;n&#237;"/>
+   <l:gentext key="and" text="a"/>
+   <l:gentext key="by" text="by"/>
+   <l:gentext key="called" text="called" lang="en"/>
+   <l:gentext key="Edited" text="Vyd&#225;no"/>
+   <l:gentext key="edited" text="Vyd&#225;no"/>
+   <l:gentext key="Editedby" text="Sestavil"/>
+   <l:gentext key="editedby" text="Sestavil"/>
+   <l:gentext key="in" text="v"/>
+   <l:gentext key="lastlistcomma" text=","/>
+   <l:gentext key="listcomma" text=","/>
+   <l:gentext key="nonexistantelement" text="neexistuj&#237;c&#237; prvek"/>
+   <l:gentext key="notes" text="Pozn&#225;mky"/>
+   <l:gentext key="Notes" text="Pozn&#225;mky"/>
+   <l:gentext key="Pgs" text="Str."/>
+   <l:gentext key="pgs" text="Str."/>
+   <l:gentext key="Revisedby" text="Revidoval: "/>
+   <l:gentext key="revisedby" text="Revidoval: "/>
+   <l:gentext key="TableNotes" text="Pozn&#225;mky"/>
+   <l:gentext key="tablenotes" text="Pozn&#225;mky"/>
+   <l:gentext key="TableofContents" text="Obsah"/>
+   <l:gentext key="tableofcontents" text="Obsah"/>
+   <l:gentext key="the" text="" lang="en"/>
+   <l:gentext key="unexpectedelementname" text="Neo&#269;ek&#225;van&#233; jm&#233;no prvku"/>
+   <l:gentext key="unsupported" text="nepodporovan&#253;"/>
+   <l:gentext key="xrefto" text="xref k"/>
+   <l:gentext key="listofequations" text="Seznam rovnic"/>
+   <l:gentext key="ListofEquations" text="Seznam rovnic"/>
+   <l:gentext key="ListofExamples" text="Seznam p&#345;&#237;klad&#367;"/>
+   <l:gentext key="listofexamples" text="Seznam p&#345;&#237;klad&#367;"/>
+   <l:gentext key="ListofFigures" text="Seznam obr&#225;zk&#367;"/>
+   <l:gentext key="listoffigures" text="Seznam obr&#225;zk&#367;"/>
+   <l:gentext key="ListofProcedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listofprocedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listoftables" text="Seznam tabulek"/>
+   <l:gentext key="ListofTables" text="Seznam tabulek"/>
+   <l:gentext key="ListofUnknown" text="Seznam nezn&#225;m&#233;ho"/>
+   <l:gentext key="listofunknown" text="Seznam nezn&#225;m&#233;ho"/>
+   <l:gentext key="nav-home" text="Dom&#367;"/>
+   <l:gentext key="nav-next" text="Dal&#353;&#237;"/>
+   <l:gentext key="nav-next-sibling" text="Rychle dop&#345;edu"/>
+   <l:gentext key="nav-prev" text="P&#345;edch&#225;zej&#237;c&#237;"/>
+   <l:gentext key="nav-prev-sibling" text="Rychle zp&#283;t"/>
+   <l:gentext key="nav-up" text="Nahoru"/>
+   <l:gentext key="nav-toc" text="ToC" lang="en"/>
+   <l:gentext key="Draft" text="N&#225;vrh"/>
+   <l:gentext key="above" text="nad"/>
+   <l:gentext key="below" text="pod"/>
+   <l:gentext key="sectioncalled" text="odd&#237;l nazvan&#253;"/>
+   <l:gentext key="index symbols" text="Symboly"/>
+   <l:gentext key="lowercase.alpha" text="a&#225;bc&#269;d&#271;e&#233;&#283;fghi&#237;jklmno&#243;pqr&#345;s&#353;t&#357;u&#250;&#367;vwxy&#253;z&#382;"/>
+   <l:gentext key="uppercase.alpha" text="A&#193;BC&#268;D&#270;E&#201;&#282;FGHI&#205;JKLMNO&#211;PQR&#344;S&#352;T&#356;U&#218;&#366;VWXY&#221;Z&#381;"/>
+   <l:dingbat key="startquote" text="&#8222;"/>
+   <l:dingbat key="endquote" text="&#8220;"/>
+   <l:dingbat key="nestedstartquote" text="&#8218;"/>
+   <l:dingbat key="nestedendquote" text="&#8216;"/>
+   <l:dingbat key="singlestartquote" text="&#8216;" lang="en"/>
+   <l:dingbat key="singleendquote" text="&#8217;" lang="en"/>
+   <l:dingbat key="bullet" text="&#8226;"/>
+   <l:gentext key="hyphenation-character" text="-" lang="en"/>
+   <l:gentext key="hyphenation-push-character-count" text="2" lang="en"/>
+   <l:gentext key="hyphenation-remain-character-count" text="2" lang="en"/>
+
+   <l:context name="styles">
+      <l:template name="person-name" text="first-last"/>
+   </l:context>
+
+   <l:context name="title">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="%t"/>
+      <l:template name="appendix" text="P&#345;&#237;loha %n. %t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="biblioentry" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliolist" text="%t" lang="en"/>
+      <l:template name="bibliomixed" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="Kapitola %n. %t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="Rovnice %n. %t"/>
+      <l:template name="example" text="P&#345;&#237;klad %n. %t"/>
+      <l:template name="figure" text="Obr&#225;zek %n. %t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="glosslist" text="%t" lang="en"/>
+      <l:template name="glossentry" text="%t" lang="en"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text=""/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="&#268;&#225;st %n. %t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="procedure.formal" text="Postup %n. %t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="productionset.formal" text="Produkce %n"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="%t"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="%t"/>
+      <l:template name="refentry" text="%t"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsection" text="%t"/>
+      <l:template name="refsect1" text="%t"/>
+      <l:template name="refsect2" text="%t"/>
+      <l:template name="refsect3" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="refsynopsisdivinfo" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="step" text="%t"/>
+      <l:template name="table" text="Tabulka %n. %t"/>
+      <l:template name="task" text="%t" lang="en"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text=""/>
+      <l:template name="warning" text="%t"/>
+   </l:context>
+
+   <l:context name="title-unnumbered">
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article/appendix" text="%t" lang="en"/>
+      <l:template name="bridgehead" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="sect1" text="%t"/>
+      <l:template name="sect2" text="%t"/>
+      <l:template name="sect3" text="%t"/>
+      <l:template name="sect4" text="%t"/>
+      <l:template name="sect5" text="%t"/>
+      <l:template name="section" text="%t"/>
+      <l:template name="simplesect" text="%t"/>
+   </l:context>
+
+   <l:context name="title-numbered">
+      <l:template name="appendix" text="P&#345;&#237;loha %n. %t"/>
+      <l:template name="article/appendix" text="%n.&#160;%t" lang="en"/>
+      <l:template name="bridgehead" text="%n. %t"/>
+      <l:template name="chapter" text="Kapitola %n. %t"/>
+      <l:template name="sect1" text="%n. %t"/>
+      <l:template name="sect2" text="%n. %t"/>
+      <l:template name="sect3" text="%n. %t"/>
+      <l:template name="sect4" text="%n. %t"/>
+      <l:template name="sect5" text="%n. %t"/>
+      <l:template name="section" text="%n. %t"/>
+      <l:template name="simplesect" text="%n. %t"/>
+   </l:context>
+
+   <l:context name="subtitle">
+      <l:template name="appendix" text="%s"/>
+      <l:template name="article" text="%s"/>
+      <l:template name="bibliodiv" text="%s"/>
+      <l:template name="biblioentry" text="%s"/>
+      <l:template name="bibliography" text="%s"/>
+      <l:template name="bibliomixed" text="%s"/>
+      <l:template name="bibliomset" text="%s"/>
+      <l:template name="biblioset" text="%s"/>
+      <l:template name="book" text="%s"/>
+      <l:template name="chapter" text="%s"/>
+      <l:template name="colophon" text="%s"/>
+      <l:template name="dedication" text="%s"/>
+      <l:template name="glossary" text="%s"/>
+      <l:template name="glossdiv" text="%s"/>
+      <l:template name="index" text="%s"/>
+      <l:template name="indexdiv" text="%s"/>
+      <l:template name="lot" text="%s"/>
+      <l:template name="part" text="%s"/>
+      <l:template name="partintro" text="%s"/>
+      <l:template name="preface" text="%s"/>
+      <l:template name="refentry" text="%s"/>
+      <l:template name="reference" text="%s"/>
+      <l:template name="refsection" text="%s"/>
+      <l:template name="refsect1" text="%s"/>
+      <l:template name="refsect2" text="%s"/>
+      <l:template name="refsect3" text="%s"/>
+      <l:template name="refsynopsisdiv" text="%s"/>
+      <l:template name="sect1" text="%s"/>
+      <l:template name="sect2" text="%s"/>
+      <l:template name="sect3" text="%s"/>
+      <l:template name="sect4" text="%s"/>
+      <l:template name="sect5" text="%s"/>
+      <l:template name="section" text="%s"/>
+      <l:template name="set" text="%s"/>
+      <l:template name="setindex" text="%s"/>
+      <l:template name="sidebar" text="%s"/>
+      <l:template name="simplesect" text="%s"/>
+      <l:template name="toc" text="%s"/>
+   </l:context>
+
+   <l:context name="xref">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="%n"/>
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="constraintdef" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="%t"/>
+      <l:template name="example" text="%t"/>
+      <l:template name="figure" text="%t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text="%n"/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="%t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="%n"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="%n"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="table" text="%t"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="%n"/>
+      <l:template name="warning" text="%t"/>
+      <l:template name="page.citation" text=" [%p]"/>
+      <l:template name="page" text="(page %p)" lang="en"/>
+      <l:template name="pageabbrev" text="(p. %p)" lang="en"/>
+      <l:template name="Page" text="Page %p" lang="en"/>
+      <l:template name="bridgehead" text="&#8222;%t&#8220;"/>
+      <l:template name="refsection" text="&#8222;%t&#8220;"/>
+      <l:template name="refsect1" text="&#8222;%t&#8220;"/>
+      <l:template name="refsect2" text="&#8222;%t&#8220;"/>
+      <l:template name="refsect3" text="&#8222;%t&#8220;"/>
+      <l:template name="sect1" text="&#8222;%t&#8220;"/>
+      <l:template name="sect2" text="&#8222;%t&#8220;"/>
+      <l:template name="sect3" text="&#8222;%t&#8220;"/>
+      <l:template name="sect4" text="&#8222;%t&#8220;"/>
+      <l:template name="sect5" text="&#8222;%t&#8220;"/>
+      <l:template name="section" text="&#8222;%t&#8220;"/>
+      <l:template name="simplesect" text="&#8222;%t&#8220;"/>
+   </l:context>
+
+   <l:context name="xref-number">
+      <l:template name="answer" text="%n"/>
+      <l:template name="appendix" text="%n"/>
+      <l:template name="bridgehead" text="%n"/>
+      <l:template name="chapter" text="%n"/>
+      <l:template name="equation" text="%n"/>
+      <l:template name="example" text="%n"/>
+      <l:template name="figure" text="%n"/>
+      <l:template name="part" text="%n"/>
+      <l:template name="procedure" text="%n"/>
+      <l:template name="productionset" text="%n"/>
+      <l:template name="qandadiv" text="%n"/>
+      <l:template name="qandaentry" text="%n"/>
+      <l:template name="question" text="%n"/>
+      <l:template name="sect1" text="%n"/>
+      <l:template name="sect2" text="%n"/>
+      <l:template name="sect3" text="%n"/>
+      <l:template name="sect4" text="%n"/>
+      <l:template name="sect5" text="%n"/>
+      <l:template name="section" text="%n"/>
+      <l:template name="table" text="%n"/>
+   </l:context>
+
+   <l:context name="xref-number-and-title">
+      <l:template name="appendix" text="%n &#8211; &#8222;%t&#8220;"/>
+      <l:template name="bridgehead" text="%n &#8211; &#8222;%t&#8220;"/>
+      <l:template name="chapter" text="%n &#8211; &#8222;%t&#8220;"/>
+      <l:template name="equation" text="%n &#8211; &#8222;%t&#8220;"/>
+      <l:template name="example" text="%n &#8211; &#8222;%t&#8220;"/>
+      <l:template name="figure" text="%n &#8211; &#8222;%t&#8220;"/>
+      <l:template name="part" text="%n &#8211; &#8222;%t&#8220;"/>
+      <l:template name="procedure" text="%n &#8211; &#8222;%t&#8220;"/>
+      <l:template name="productionset" text="%n &#8211; &#8222;%t&#8220;"/>
+      <l:template name="qandadiv" text="%n &#8211; &#8222;%t&#8220;"/>
+      <l:template name="refsect1" text="&#8222;%t&#8220;"/>
+      <l:template name="refsect2" text="&#8222;%t&#8220;"/>
+      <l:template name="refsect3" text="&#8222;%t&#8220;"/>
+      <l:template name="refsection" text="&#8222;%t&#8220;"/>
+      <l:template name="sect1" text="%n &#8211; &#8222;%t&#8220;"/>
+      <l:template name="sect2" text="%n &#8211; &#8222;%t&#8220;"/>
+      <l:template name="sect3" text="%n &#8211; &#8222;%t&#8220;"/>
+      <l:template name="sect4" text="%n &#8211; &#8222;%t&#8220;"/>
+      <l:template name="sect5" text="%n &#8211; &#8222;%t&#8220;"/>
+      <l:template name="section" text="%n &#8211; &#8222;%t&#8220;"/>
+      <l:template name="simplesect" text="%n &#8211; &#8222;%t&#8220;"/>
+      <l:template name="table" text="%n &#8211; &#8222;%t&#8220;"/>
+   </l:context>
+
+   <l:context name="authorgroup">
+      <l:template name="sep" text=", "/>
+      <l:template name="sep2" text=" a "/>
+      <l:template name="seplast" text=" a "/>
+   </l:context>
+
+   <l:context name="glossary">
+      <l:template name="see" text="Viz "/>
+      <l:template name="seealso" text="Viz t&#233;&#382; "/>
+   </l:context>
+
+   <l:context name="msgset">
+      <l:template name="MsgAud" text="Publikum: "/>
+      <l:template name="MsgLevel" text="&#218;rove&#328;: "/>
+      <l:template name="MsgOrig" text="P&#367;vod: "/>
+   </l:context>
+
+   <l:context name="datetime">
+      <l:template name="format" text="d.&#160;B Y"/>
+   </l:context>
+
+   <l:context name="datetime-full">
+      <l:template name="January" text="ledna"/>
+      <l:template name="February" text="&#250;nora"/>
+      <l:template name="March" text="b&#345;ezna"/>
+      <l:template name="April" text="dubna"/>
+      <l:template name="May" text="kv&#283;tna"/>
+      <l:template name="June" text="&#269;ervna"/>
+      <l:template name="July" text="&#269;ervence"/>
+      <l:template name="August" text="srpna"/>
+      <l:template name="September" text="z&#225;&#345;&#237;"/>
+      <l:template name="October" text="&#345;&#237;jna"/>
+      <l:template name="November" text="listopadu"/>
+      <l:template name="December" text="prosince"/>
+      <l:template name="Monday" text="pond&#283;l&#237;"/>
+      <l:template name="Tuesday" text="&#250;ter&#253;"/>
+      <l:template name="Wednesday" text="st&#345;eda"/>
+      <l:template name="Thursday" text="&#269;tvrtek"/>
+      <l:template name="Friday" text="p&#225;tek"/>
+      <l:template name="Saturday" text="sobota"/>
+      <l:template name="Sunday" text="ned&#283;le"/>
+   </l:context>
+
+   <l:context name="datetime-abbrev">
+      <l:template name="Jan" text="led"/>
+      <l:template name="Feb" text="&#250;no"/>
+      <l:template name="Mar" text="b&#345;e"/>
+      <l:template name="Apr" text="dub"/>
+      <l:template name="May" text="kv&#283;"/>
+      <l:template name="Jun" text="&#269;er"/>
+      <l:template name="Jul" text="&#269;nc"/>
+      <l:template name="Aug" text="srp"/>
+      <l:template name="Sep" text="z&#225;&#345;"/>
+      <l:template name="Oct" text="&#345;ij"/>
+      <l:template name="Nov" text="lis"/>
+      <l:template name="Dec" text="pro"/>
+      <l:template name="Mon" text="po"/>
+      <l:template name="Tue" text="&#250;t"/>
+      <l:template name="Wed" text="st"/>
+      <l:template name="Thu" text="&#269;t"/>
+      <l:template name="Fri" text="p&#225;"/>
+      <l:template name="Sat" text="so"/>
+      <l:template name="Sun" text="ne"/>
+   </l:context>
+
+   <l:context name="htmlhelp">
+      <l:template name="langcode" text="0x0405 Czech"/>
+   </l:context>
+
+   <l:letters>
+      <l:l i="-1"/>
+      <l:l i="0">Symboly</l:l>
+      <l:l i="1">A</l:l>
+      <l:l i="1">a</l:l>
+      <l:l i="1">&#193;</l:l>
+      <l:l i="1">&#225;</l:l>
+      <l:l i="2">B</l:l>
+      <l:l i="2">b</l:l>
+      <l:l i="3">C</l:l>
+      <l:l i="3">c</l:l>
+      <l:l i="4">&#268;</l:l>
+      <l:l i="4">&#269;</l:l>
+      <l:l i="5">D</l:l>
+      <l:l i="5">d</l:l>
+      <l:l i="5">&#270;</l:l>
+      <l:l i="5">&#271;</l:l>
+      <l:l i="7">E</l:l>
+      <l:l i="7">e</l:l>
+      <l:l i="7">&#201;</l:l>
+      <l:l i="7">&#233;</l:l>
+      <l:l i="7">&#282;</l:l>
+      <l:l i="7">&#283;</l:l>
+      <l:l i="7">&#203;</l:l>
+      <l:l i="7">&#235;</l:l>
+      <l:l i="8">F</l:l>
+      <l:l i="8">f</l:l>
+      <l:l i="9">G</l:l>
+      <l:l i="9">g</l:l>
+      <l:l i="10">H</l:l>
+      <l:l i="10">h</l:l>
+      <l:l i="11">Ch</l:l>
+      <l:l i="11">ch</l:l>
+      <l:l i="11">cH</l:l>
+      <l:l i="11">CH</l:l>
+      <l:l i="12">I</l:l>
+      <l:l i="12">i</l:l>
+      <l:l i="12">&#205;</l:l>
+      <l:l i="12">&#237;</l:l>
+      <l:l i="13">J</l:l>
+      <l:l i="13">j</l:l>
+      <l:l i="14">K</l:l>
+      <l:l i="14">k</l:l>
+      <l:l i="15">L</l:l>
+      <l:l i="15">l</l:l>
+      <l:l i="16">M</l:l>
+      <l:l i="16">m</l:l>
+      <l:l i="17">N</l:l>
+      <l:l i="17">n</l:l>
+      <l:l i="17">&#327;</l:l>
+      <l:l i="17">&#328;</l:l>
+      <l:l i="19">O</l:l>
+      <l:l i="19">o</l:l>
+      <l:l i="19">&#211;</l:l>
+      <l:l i="19">&#243;</l:l>
+      <l:l i="19">&#214;</l:l>
+      <l:l i="19">&#246;</l:l>
+      <l:l i="20">P</l:l>
+      <l:l i="20">p</l:l>
+      <l:l i="21">Q</l:l>
+      <l:l i="21">q</l:l>
+      <l:l i="22">R</l:l>
+      <l:l i="22">r</l:l>
+      <l:l i="23">&#344;</l:l>
+      <l:l i="23">&#345;</l:l>
+      <l:l i="24">S</l:l>
+      <l:l i="24">s</l:l>
+      <l:l i="25">&#352;</l:l>
+      <l:l i="25">&#353;</l:l>
+      <l:l i="26">T</l:l>
+      <l:l i="26">t</l:l>
+      <l:l i="26">&#356;</l:l>
+      <l:l i="26">&#357;</l:l>
+      <l:l i="28">U</l:l>
+      <l:l i="28">u</l:l>
+      <l:l i="28">&#218;</l:l>
+      <l:l i="28">&#250;</l:l>
+      <l:l i="28">&#366;</l:l>
+      <l:l i="28">&#367;</l:l>
+      <l:l i="28">&#220;</l:l>
+      <l:l i="28">&#252;</l:l>
+      <l:l i="29">V</l:l>
+      <l:l i="29">v</l:l>
+      <l:l i="30">W</l:l>
+      <l:l i="30">w</l:l>
+      <l:l i="31">X</l:l>
+      <l:l i="31">x</l:l>
+      <l:l i="32">Y</l:l>
+      <l:l i="32">y</l:l>
+      <l:l i="32">&#221;</l:l>
+      <l:l i="32">&#253;</l:l>
+      <l:l i="33">Z</l:l>
+      <l:l i="33">z</l:l>
+      <l:l i="34">&#381;</l:l>
+      <l:l i="34">&#382;</l:l>
+   </l:letters>
+</l:l10n>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/da.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/da.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/da.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,588 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="da" english-language-name="Danish">
+
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+   <l:gentext key="Abstract" text="Resum&#233;"/>
+   <l:gentext key="abstract" text="resum&#233;"/>
+   <l:gentext key="Answer" text="Svar"/>
+   <l:gentext key="answer" text="svar"/>
+   <l:gentext key="Appendix" text="Appendiks"/>
+   <l:gentext key="appendix" text="appendiks"/>
+   <l:gentext key="Article" text="Artikel"/>
+   <l:gentext key="article" text="artikel"/>
+   <l:gentext key="Bibliography" text="Litteraturliste"/>
+   <l:gentext key="bibliography" text="litteraturliste"/>
+   <l:gentext key="Book" text="Bog"/>
+   <l:gentext key="book" text="bog"/>
+   <l:gentext key="CAUTION" text="PAS P&#197;"/>
+   <l:gentext key="Caution" text="Pas p&#229;"/>
+   <l:gentext key="caution" text="pas p&#229;"/>
+   <l:gentext key="Chapter" text="Kapitel"/>
+   <l:gentext key="chapter" text="kapitel"/>
+   <l:gentext key="Colophon" text="Kolofon"/>
+   <l:gentext key="colophon" text="kolofon"/>
+   <l:gentext key="Copyright" text="Ophavsret"/>
+   <l:gentext key="copyright" text="ophavsret"/>
+   <l:gentext key="Dedication" text="Tilegnet"/>
+   <l:gentext key="dedication" text="tilegnet"/>
+   <l:gentext key="Edition" text="Udgave"/>
+   <l:gentext key="edition" text="udgave"/>
+   <l:gentext key="Equation" text="Ligning"/>
+   <l:gentext key="equation" text="ligning"/>
+   <l:gentext key="Example" text="Eksempel"/>
+   <l:gentext key="example" text="eksempel"/>
+   <l:gentext key="Figure" text="Figur"/>
+   <l:gentext key="figure" text="figur"/>
+   <l:gentext key="Glossary" text="Ordliste"/>
+   <l:gentext key="glossary" text="ordliste"/>
+   <l:gentext key="GlossSee" text="Se"/>
+   <l:gentext key="glosssee" text="se"/>
+   <l:gentext key="GlossSeeAlso" text="Se ogs&#229;"/>
+   <l:gentext key="glossseealso" text="se ogs&#229;"/>
+   <l:gentext key="IMPORTANT" text="VIGTIGT"/>
+   <l:gentext key="important" text="vigtigt"/>
+   <l:gentext key="Important" text="Vigtigt"/>
+   <l:gentext key="Index" text="Stikordsregister"/>
+   <l:gentext key="index" text="stikordsregister"/>
+   <l:gentext key="ISBN" text="ISBN"/>
+   <l:gentext key="isbn" text="ISBN"/>
+   <l:gentext key="LegalNotice" text="Retslig note"/>
+   <l:gentext key="legalnotice" text="retslig note"/>
+   <l:gentext key="MsgAud" text="M&#229;lgruppe"/>
+   <l:gentext key="msgaud" text="m&#229;lgruppe"/>
+   <l:gentext key="MsgLevel" text="Niveau"/>
+   <l:gentext key="msglevel" text="niveau"/>
+   <l:gentext key="MsgOrig" text="Grundlag"/>
+   <l:gentext key="msgorig" text="grundlag"/>
+   <l:gentext key="NOTE" text="BEM&#198;RK"/>
+   <l:gentext key="Note" text="Bem&#230;rk"/>
+   <l:gentext key="note" text="bem&#230;rk"/>
+   <l:gentext key="Part" text="Del"/>
+   <l:gentext key="part" text="del"/>
+   <l:gentext key="Preface" text="Forord"/>
+   <l:gentext key="preface" text="forord"/>
+   <l:gentext key="Procedure" text="Procedure"/>
+   <l:gentext key="procedure" text="procedure"/>
+   <l:gentext key="ProductionSet" text="Produktion"/>
+   <l:gentext key="PubDate" text="Publication Date" lang="en"/>
+   <l:gentext key="pubdate" text="Publication date" lang="en"/>
+   <l:gentext key="Published" text="Udgivet"/>
+   <l:gentext key="published" text="udgivet"/>
+   <l:gentext key="Qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="Question" text="Sp&#248;rgsm&#229;l"/>
+   <l:gentext key="question" text="sp&#248;rgsm&#229;l"/>
+   <l:gentext key="RefEntry" text="Punkt"/>
+   <l:gentext key="refentry" text="punkt"/>
+   <l:gentext key="Reference" text="Henvisning"/>
+   <l:gentext key="reference" text="henvisning"/>
+   <l:gentext key="RefName" text="Navn"/>
+   <l:gentext key="refname" text="navn"/>
+   <l:gentext key="RefSection" text="Afsnit"/>
+   <l:gentext key="refsection" text="afsnit"/>
+   <l:gentext key="RefSynopsisDiv" text="Synopsis"/>
+   <l:gentext key="refsynopsisdiv" text="synopsis"/>
+   <l:gentext key="RevHistory" text="Revisionshistorie"/>
+   <l:gentext key="revhistory" text="revisionshistorie"/>
+   <l:gentext key="revision" text="revision"/>
+   <l:gentext key="Revision" text="Revision"/>
+   <l:gentext key="sect1" text="Afsnit"/>
+   <l:gentext key="sect2" text="Afsnit"/>
+   <l:gentext key="sect3" text="Afsnit"/>
+   <l:gentext key="sect4" text="Afsnit"/>
+   <l:gentext key="sect5" text="Afsnit"/>
+   <l:gentext key="section" text="afsnit"/>
+   <l:gentext key="Section" text="Afsnit"/>
+   <l:gentext key="see" text="se"/>
+   <l:gentext key="See" text="Se"/>
+   <l:gentext key="seealso" text="se ogs&#229;"/>
+   <l:gentext key="Seealso" text="Se ogs&#229;"/>
+   <l:gentext key="SeeAlso" text="Se ogs&#229;"/>
+   <l:gentext key="set" text="s&#230;t"/>
+   <l:gentext key="Set" text="S&#230;t"/>
+   <l:gentext key="setindex" text="s&#230;t indeks"/>
+   <l:gentext key="SetIndex" text="S&#230;t indeks"/>
+   <l:gentext key="Sidebar" text="Sidebj&#230;lke"/>
+   <l:gentext key="sidebar" text="sidebj&#230;lke"/>
+   <l:gentext key="step" text="trin"/>
+   <l:gentext key="Step" text="Trin"/>
+   <l:gentext key="Table" text="Tabel"/>
+   <l:gentext key="table" text="tabel"/>
+   <l:gentext key="tip" text="vink"/>
+   <l:gentext key="TIP" text="VINK"/>
+   <l:gentext key="Tip" text="Vink"/>
+   <l:gentext key="Warning" text="Advarsel"/>
+   <l:gentext key="warning" text="advarsel"/>
+   <l:gentext key="WARNING" text="ADVARSEL"/>
+   <l:gentext key="and" text="og"/>
+   <l:gentext key="by" text="af"/>
+   <l:gentext key="called" text="called" lang="en"/>
+   <l:gentext key="Edited" text="Redigeret"/>
+   <l:gentext key="edited" text="redigeret"/>
+   <l:gentext key="Editedby" text="Redigeret af"/>
+   <l:gentext key="editedby" text="redigeret af"/>
+   <l:gentext key="in" text="i"/>
+   <l:gentext key="lastlistcomma" text=" og "/>
+   <l:gentext key="listcomma" text=", "/>
+   <l:gentext key="nonexistantelement" text="ikke-eksisterende element"/>
+   <l:gentext key="notes" text="slutbem&#230;rkning:"/>
+   <l:gentext key="Notes" text="Slutbem&#230;rkning:"/>
+   <l:gentext key="Pgs" text="Siderne"/>
+   <l:gentext key="pgs" text="siderne"/>
+   <l:gentext key="Revisedby" text="Revideret af: "/>
+   <l:gentext key="revisedby" text="revideret af: "/>
+   <l:gentext key="TableNotes" text="Noter:"/>
+   <l:gentext key="tablenotes" text="noter:"/>
+   <l:gentext key="TableofContents" text="Indholdsfortegnelse"/>
+   <l:gentext key="tableofcontents" text="indholdsfortegnelse"/>
+   <l:gentext key="the" text="" lang="en"/>
+   <l:gentext key="unexpectedelementname" text="uventet elementnavn"/>
+   <l:gentext key="unsupported" text="ikke underst&#248;ttet"/>
+   <l:gentext key="xrefto" text="krydshenvisning til"/>
+   <l:gentext key="listofequations" text="ligningsliste"/>
+   <l:gentext key="ListofEquations" text="Ligningsliste"/>
+   <l:gentext key="ListofExamples" text="Eksempelliste"/>
+   <l:gentext key="listofexamples" text="eksempelliste"/>
+   <l:gentext key="ListofFigures" text="Figurliste"/>
+   <l:gentext key="listoffigures" text="figurliste"/>
+   <l:gentext key="ListofProcedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listofprocedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listoftables" text="tabelliste"/>
+   <l:gentext key="ListofTables" text="Tabelliste"/>
+   <l:gentext key="ListofUnknown" text="Liste over ukendte"/>
+   <l:gentext key="listofunknown" text="liste over ukendte"/>
+   <l:gentext key="nav-home" text="hjem"/>
+   <l:gentext key="nav-next" text="n&#230;ste"/>
+   <l:gentext key="nav-next-sibling" text="hurtigt fremad"/>
+   <l:gentext key="nav-prev" text="forrige"/>
+   <l:gentext key="nav-prev-sibling" text="hurtigt tilbage"/>
+   <l:gentext key="nav-up" text="op"/>
+   <l:gentext key="nav-toc" text="ToC" lang="en"/>
+   <l:gentext key="Draft" text="Kladde"/>
+   <l:gentext key="above" text="over"/>
+   <l:gentext key="below" text="under"/>
+   <l:gentext key="sectioncalled" text="afsnittet der hedder"/>
+   <l:gentext key="index symbols" text="symboler"/>
+   <l:gentext key="lowercase.alpha" text="abcdefghijklmnopqrstuvwxyz&#230;&#248;&#229;"/>
+   <l:gentext key="uppercase.alpha" text="ABCDEFGHIJKLMNOPQRSTUVWXYZ&#198;&#216;&#197;"/>
+   <l:dingbat key="startquote" text="&#8220;"/>
+   <l:dingbat key="endquote" text="&#8221;"/>
+   <l:dingbat key="nestedstartquote" text="&#8216;"/>
+   <l:dingbat key="nestedendquote" text="&#8217;"/>
+   <l:dingbat key="singlestartquote" text="&#8216;" lang="en"/>
+   <l:dingbat key="singleendquote" text="&#8217;" lang="en"/>
+   <l:dingbat key="bullet" text="&#8226;"/>
+   <l:gentext key="hyphenation-character" text="-"/>
+   <l:gentext key="hyphenation-push-character-count" text="2"/>
+   <l:gentext key="hyphenation-remain-character-count" text="2"/>
+
+   <l:context name="styles">
+      <l:template name="person-name" text="first-last"/>
+   </l:context>
+
+   <l:context name="title">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="%t"/>
+      <l:template name="appendix" text="Appendiks %n. %t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="biblioentry" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliolist" text="%t" lang="en"/>
+      <l:template name="bibliomixed" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="Kapitel %n. %t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="Ligning %n. %t"/>
+      <l:template name="example" text="Eksempel %n. %t"/>
+      <l:template name="figure" text="Figur %n. %t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="glosslist" text="%t" lang="en"/>
+      <l:template name="glossentry" text="%t" lang="en"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text=""/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="Del %n. %t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="procedure.formal" text="Procedure %n. %t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="productionset.formal" text="Produktion %n"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="%t"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="Sp&#248;rgsm&#229;l %n"/>
+      <l:template name="refentry" text="%t"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsection" text="%t"/>
+      <l:template name="refsect1" text="%t"/>
+      <l:template name="refsect2" text="%t"/>
+      <l:template name="refsect3" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="refsynopsisdivinfo" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="step" text="%t"/>
+      <l:template name="table" text="Tabel %n. %t"/>
+      <l:template name="task" text="%t" lang="en"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text=""/>
+      <l:template name="warning" text="%t"/>
+   </l:context>
+
+   <l:context name="title-unnumbered">
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article/appendix" text="%t" lang="en"/>
+      <l:template name="bridgehead" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="sect1" text="%t"/>
+      <l:template name="sect2" text="%t"/>
+      <l:template name="sect3" text="%t"/>
+      <l:template name="sect4" text="%t"/>
+      <l:template name="sect5" text="%t"/>
+      <l:template name="section" text="%t"/>
+      <l:template name="simplesect" text="%t"/>
+   </l:context>
+
+   <l:context name="title-numbered">
+      <l:template name="appendix" text="Appendiks %n. %t"/>
+      <l:template name="article/appendix" text="%n.&#160;%t" lang="en"/>
+      <l:template name="bridgehead" text="%n. %t"/>
+      <l:template name="chapter" text="Kapitel %n. %t"/>
+      <l:template name="sect1" text="%n. %t"/>
+      <l:template name="sect2" text="%n. %t"/>
+      <l:template name="sect3" text="%n. %t"/>
+      <l:template name="sect4" text="%n. %t"/>
+      <l:template name="sect5" text="%n. %t"/>
+      <l:template name="section" text="%n. %t"/>
+      <l:template name="simplesect" text="%t"/>
+   </l:context>
+
+   <l:context name="subtitle">
+      <l:template name="appendix" text="%s"/>
+      <l:template name="article" text="%s"/>
+      <l:template name="bibliodiv" text="%s"/>
+      <l:template name="biblioentry" text="%s"/>
+      <l:template name="bibliography" text="%s"/>
+      <l:template name="bibliomixed" text="%s"/>
+      <l:template name="bibliomset" text="%s"/>
+      <l:template name="biblioset" text="%s"/>
+      <l:template name="book" text="%s"/>
+      <l:template name="chapter" text="%s"/>
+      <l:template name="colophon" text="%s"/>
+      <l:template name="dedication" text="%s"/>
+      <l:template name="glossary" text="%s"/>
+      <l:template name="glossdiv" text="%s"/>
+      <l:template name="index" text="%s"/>
+      <l:template name="indexdiv" text="%s"/>
+      <l:template name="lot" text="%s"/>
+      <l:template name="part" text="%s"/>
+      <l:template name="partintro" text="%s"/>
+      <l:template name="preface" text="%s"/>
+      <l:template name="refentry" text="%s"/>
+      <l:template name="reference" text="%s"/>
+      <l:template name="refsection" text="%s"/>
+      <l:template name="refsect1" text="%s"/>
+      <l:template name="refsect2" text="%s"/>
+      <l:template name="refsect3" text="%s"/>
+      <l:template name="refsynopsisdiv" text="%s"/>
+      <l:template name="sect1" text="%s"/>
+      <l:template name="sect2" text="%s"/>
+      <l:template name="sect3" text="%s"/>
+      <l:template name="sect4" text="%s"/>
+      <l:template name="sect5" text="%s"/>
+      <l:template name="section" text="%s"/>
+      <l:template name="set" text="%s"/>
+      <l:template name="setindex" text="%s"/>
+      <l:template name="sidebar" text="%s"/>
+      <l:template name="simplesect" text="%s"/>
+      <l:template name="toc" text="%s"/>
+   </l:context>
+
+   <l:context name="xref">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="Svar %n"/>
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="constraintdef" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="%t"/>
+      <l:template name="example" text="%t"/>
+      <l:template name="figure" text="%t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text="%n"/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="%t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="Sp&#248;rgsm&#229;l %n"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="Sp&#248;rgsm&#229;l %n"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="table" text="%t"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="%n"/>
+      <l:template name="warning" text="%t"/>
+      <l:template name="page.citation" text=" [%p]"/>
+      <l:template name="page" text="(page %p)" lang="en"/>
+      <l:template name="pageabbrev" text="(p. %p)" lang="en"/>
+      <l:template name="Page" text="Page %p" lang="en"/>
+      <l:template name="bridgehead" text="afsnittet der hedder &#8220;%t&#8221;"/>
+      <l:template name="refsection" text="&#8220;%t&#8221;"/>
+      <l:template name="refsect1" text="&#8220;%t&#8221;"/>
+      <l:template name="refsect2" text="&#8220;%t&#8221;"/>
+      <l:template name="refsect3" text="&#8220;%t&#8221;"/>
+      <l:template name="sect1" text="&#8220;%t&#8221;"/>
+      <l:template name="sect2" text="&#8220;%t&#8221;"/>
+      <l:template name="sect3" text="&#8220;%t&#8221;"/>
+      <l:template name="sect4" text="&#8220;%t&#8221;"/>
+      <l:template name="sect5" text="&#8220;%t&#8221;"/>
+      <l:template name="section" text="&#8220;%t&#8221;"/>
+      <l:template name="simplesect" text="&#8220;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="xref-number">
+      <l:template name="answer" text="Svar&#160;%n"/>
+      <l:template name="appendix" text="Appendiks&#160;%n"/>
+      <l:template name="bridgehead" text="Afsnit&#160;%n"/>
+      <l:template name="chapter" text="Kapitel&#160;%n"/>
+      <l:template name="equation" text="Ligning&#160;%n"/>
+      <l:template name="example" text="Eksempel&#160;%n"/>
+      <l:template name="figure" text="Figur&#160;%n"/>
+      <l:template name="part" text="Del&#160;%n"/>
+      <l:template name="procedure" text="Procedure&#160;%n"/>
+      <l:template name="productionset" text="Produktion&#160;%n"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n"/>
+      <l:template name="qandaentry" text="Sp&#248;rgsm&#229;l&#160;%n"/>
+      <l:template name="question" text="Sp&#248;rgsm&#229;l&#160;%n"/>
+      <l:template name="sect1" text="Afsnit&#160;%n"/>
+      <l:template name="sect2" text="Afsnit&#160;%n"/>
+      <l:template name="sect3" text="Afsnit&#160;%n"/>
+      <l:template name="sect4" text="Afsnit&#160;%n"/>
+      <l:template name="sect5" text="Afsnit&#160;%n"/>
+      <l:template name="section" text="Afsnit&#160;%n"/>
+      <l:template name="table" text="Tabel&#160;%n"/>
+   </l:context>
+
+   <l:context name="xref-number-and-title">
+      <l:template name="appendix" text="Appendiks&#160;%n, %t"/>
+      <l:template name="bridgehead" text="Afsnit&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="chapter" text="Kapitel&#160;%n, %t"/>
+      <l:template name="equation" text="Ligning&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="example" text="Eksempel&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="figure" text="Figur&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="part" text="Del&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="procedure" text="Procedure&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="productionset" text="Produktion&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="refsect1" text="afsnittet der hedder &#8220;%t&#8221;"/>
+      <l:template name="refsect2" text="afsnittet der hedder &#8220;%t&#8221;"/>
+      <l:template name="refsect3" text="afsnittet der hedder &#8220;%t&#8221;"/>
+      <l:template name="refsection" text="afsnittet der hedder &#8220;%t&#8221;"/>
+      <l:template name="sect1" text="Afsnit&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect2" text="Afsnit&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect3" text="Afsnit&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect4" text="Afsnit&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect5" text="Afsnit&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="section" text="Afsnit&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="simplesect" text="afsnittet der hedder &#8220;%t&#8221;"/>
+      <l:template name="table" text="Tabel&#160;%n, &#8220;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="authorgroup">
+      <l:template name="sep" text=",  "/>
+      <l:template name="sep2" text=" og "/>
+      <l:template name="seplast" text=" og  og "/>
+   </l:context>
+
+   <l:context name="glossary">
+      <l:template name="see" text="Se "/>
+      <l:template name="seealso" text="Se ogs&#229; "/>
+   </l:context>
+
+   <l:context name="msgset">
+      <l:template name="MsgAud" text="M&#229;lgruppe: "/>
+      <l:template name="MsgLevel" text="Niveau: "/>
+      <l:template name="MsgOrig" text="Grundlag: "/>
+   </l:context>
+
+   <l:context name="datetime">
+      <l:template name="format" text="d/m/Y"/>
+   </l:context>
+
+   <l:context name="datetime-full">
+      <l:template name="January" text="Januar"/>
+      <l:template name="February" text="Februar"/>
+      <l:template name="March" text="Marts"/>
+      <l:template name="April" text="April"/>
+      <l:template name="May" text="Maj"/>
+      <l:template name="June" text="Juni"/>
+      <l:template name="July" text="July"/>
+      <l:template name="August" text="August"/>
+      <l:template name="September" text="September"/>
+      <l:template name="October" text="Oktober"/>
+      <l:template name="November" text="November"/>
+      <l:template name="December" text="December"/>
+      <l:template name="Monday" text="Mandag"/>
+      <l:template name="Tuesday" text="Tirsdag"/>
+      <l:template name="Wednesday" text="Onsdag"/>
+      <l:template name="Thursday" text="Torsdag"/>
+      <l:template name="Friday" text="Fredag"/>
+      <l:template name="Saturday" text="L&#248;rdag"/>
+      <l:template name="Sunday" text="S&#248;ndag"/>
+   </l:context>
+
+   <l:context name="datetime-abbrev">
+      <l:template name="Jan" text="Jan"/>
+      <l:template name="Feb" text="Feb"/>
+      <l:template name="Mar" text="Mar"/>
+      <l:template name="Apr" text="Apr"/>
+      <l:template name="May" text="Maj"/>
+      <l:template name="Jun" text="Jun"/>
+      <l:template name="Jul" text="Jul"/>
+      <l:template name="Aug" text="Aug"/>
+      <l:template name="Sep" text="Sep"/>
+      <l:template name="Oct" text="Okt"/>
+      <l:template name="Nov" text="Nov"/>
+      <l:template name="Dec" text="Dec"/>
+      <l:template name="Mon" text="Man"/>
+      <l:template name="Tue" text="Tir"/>
+      <l:template name="Wed" text="ins"/>
+      <l:template name="Thu" text="Tor"/>
+      <l:template name="Fri" text="Fre"/>
+      <l:template name="Sat" text="L&#248;r"/>
+      <l:template name="Sun" text="S&#248;n"/>
+   </l:context>
+
+   <l:context name="htmlhelp">
+      <l:template name="langcode" text="0x0406 Danish"/>
+   </l:context>
+
+   <l:letters>
+      <l:l i="1">A</l:l>
+      <l:l i="1">a</l:l>
+      <l:l i="2">B</l:l>
+      <l:l i="2">b</l:l>
+      <l:l i="3">C</l:l>
+      <l:l i="3">c</l:l>
+      <l:l i="4">D</l:l>
+      <l:l i="4">d</l:l>
+      <l:l i="5">E</l:l>
+      <l:l i="5">e</l:l>
+      <l:l i="6">F</l:l>
+      <l:l i="6">f</l:l>
+      <l:l i="7">G</l:l>
+      <l:l i="7">g</l:l>
+      <l:l i="8">H</l:l>
+      <l:l i="8">h</l:l>
+      <l:l i="9">I</l:l>
+      <l:l i="9">i</l:l>
+      <l:l i="10">J</l:l>
+      <l:l i="10">j</l:l>
+      <l:l i="11">K</l:l>
+      <l:l i="11">k</l:l>
+      <l:l i="12">L</l:l>
+      <l:l i="12">l</l:l>
+      <l:l i="13">M</l:l>
+      <l:l i="13">m</l:l>
+      <l:l i="14">N</l:l>
+      <l:l i="14">n</l:l>
+      <l:l i="15">O</l:l>
+      <l:l i="15">o</l:l>
+      <l:l i="16">P</l:l>
+      <l:l i="16">p</l:l>
+      <l:l i="17">Q</l:l>
+      <l:l i="17">q</l:l>
+      <l:l i="18">R</l:l>
+      <l:l i="18">r</l:l>
+      <l:l i="19">S</l:l>
+      <l:l i="19">s</l:l>
+      <l:l i="20">T</l:l>
+      <l:l i="20">t</l:l>
+      <l:l i="21">U</l:l>
+      <l:l i="21">u</l:l>
+      <l:l i="22">V</l:l>
+      <l:l i="22">v</l:l>
+      <l:l i="23">W</l:l>
+      <l:l i="23">w</l:l>
+      <l:l i="24">X</l:l>
+      <l:l i="24">x</l:l>
+      <l:l i="25">Y</l:l>
+      <l:l i="25">y</l:l>
+      <l:l i="26">Z</l:l>
+      <l:l i="26">z</l:l>
+      <l:l i="27">&#198;</l:l>
+      <l:l i="27">&#230;</l:l>
+      <l:l i="28">&#216;</l:l>
+      <l:l i="28">&#248;</l:l>
+      <l:l i="29">&#197;</l:l>
+      <l:l i="29">&#229;</l:l>
+   </l:letters>
+</l:l10n>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/de.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/de.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/de.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,590 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="de" english-language-name="German">
+
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+   <l:gentext key="Abstract" text="Zusammenfassung"/>
+   <l:gentext key="abstract" text="Zusammenfassung"/>
+   <l:gentext key="Answer" text="A:"/>
+   <l:gentext key="answer" text="A:"/>
+   <l:gentext key="Appendix" text="Anhang"/>
+   <l:gentext key="appendix" text="Anhang"/>
+   <l:gentext key="Article" text="Artikel"/>
+   <l:gentext key="article" text="Artikel"/>
+   <l:gentext key="Bibliography" text="Literaturverzeichnis"/>
+   <l:gentext key="bibliography" text="Literaturverzeichnis"/>
+   <l:gentext key="Book" text="Buch"/>
+   <l:gentext key="book" text="Buch"/>
+   <l:gentext key="CAUTION" text="ACHTUNG"/>
+   <l:gentext key="Caution" text="Achtung"/>
+   <l:gentext key="caution" text="Achtung"/>
+   <l:gentext key="Chapter" text="Kapitel"/>
+   <l:gentext key="chapter" text="Kapitel"/>
+   <l:gentext key="Colophon" text="Kolophon"/>
+   <l:gentext key="colophon" text="Kolophon"/>
+   <l:gentext key="Copyright" text="Copyright"/>
+   <l:gentext key="copyright" text="Copyright"/>
+   <l:gentext key="Dedication" text="Widmung"/>
+   <l:gentext key="dedication" text="Widmung"/>
+   <l:gentext key="Edition" text="Ausgabe"/>
+   <l:gentext key="edition" text="Ausgabe"/>
+   <l:gentext key="Equation" text="Gleichung"/>
+   <l:gentext key="equation" text="Gleichung"/>
+   <l:gentext key="Example" text="Beispiel"/>
+   <l:gentext key="example" text="Beispiel"/>
+   <l:gentext key="Figure" text="Abbildung"/>
+   <l:gentext key="figure" text="Abbildung"/>
+   <l:gentext key="Glossary" text="Glossar"/>
+   <l:gentext key="glossary" text="Glossar"/>
+   <l:gentext key="GlossSee" text="Siehe"/>
+   <l:gentext key="glosssee" text="Siehe"/>
+   <l:gentext key="GlossSeeAlso" text="Siehe auch"/>
+   <l:gentext key="glossseealso" text="Siehe auch"/>
+   <l:gentext key="IMPORTANT" text="WICHTIG"/>
+   <l:gentext key="important" text="Wichtig"/>
+   <l:gentext key="Important" text="Wichtig"/>
+   <l:gentext key="Index" text="Stichwortverzeichnis"/>
+   <l:gentext key="index" text="Stichwortverzeichnis"/>
+   <l:gentext key="ISBN" text="ISBN"/>
+   <l:gentext key="isbn" text="ISBN"/>
+   <l:gentext key="LegalNotice" text="Rechtlicher Hinweis"/>
+   <l:gentext key="legalnotice" text="Rechtlicher Hinweis"/>
+   <l:gentext key="MsgAud" text="Zielgruppe"/>
+   <l:gentext key="msgaud" text="Zielgruppe"/>
+   <l:gentext key="MsgLevel" text="Dringlichkeit"/>
+   <l:gentext key="msglevel" text="Dringlichkeit"/>
+   <l:gentext key="MsgOrig" text="Ursprung"/>
+   <l:gentext key="msgorig" text="Ursprung"/>
+   <l:gentext key="NOTE" text="ANMERKUNG"/>
+   <l:gentext key="Note" text="Anmerkung"/>
+   <l:gentext key="note" text="Anmerkung"/>
+   <l:gentext key="Part" text="Teil"/>
+   <l:gentext key="part" text="Teil"/>
+   <l:gentext key="Preface" text="Vorwort"/>
+   <l:gentext key="preface" text="Vorwort"/>
+   <l:gentext key="Procedure" text="Prozedur"/>
+   <l:gentext key="procedure" text="Prozedur"/>
+   <l:gentext key="ProductionSet" text="Produktion"/>
+   <l:gentext key="PubDate" text="Ver&#246;ffentlicht"/>
+   <l:gentext key="pubdate" text="Ver&#246;ffentlicht"/>
+   <l:gentext key="Published" text="Ver&#246;ffentlicht"/>
+   <l:gentext key="published" text="Ver&#246;ffentlicht"/>
+   <l:gentext key="Qandadiv" text="F &amp; A"/>
+   <l:gentext key="qandadiv" text="F &amp; A"/>
+   <l:gentext key="Question" text="F:"/>
+   <l:gentext key="question" text="F:"/>
+   <l:gentext key="RefEntry" text=""/>
+   <l:gentext key="refentry" text=""/>
+   <l:gentext key="Reference" text="Verweis"/>
+   <l:gentext key="reference" text="Verweis"/>
+   <l:gentext key="RefName" text="Name"/>
+   <l:gentext key="refname" text="Name"/>
+   <l:gentext key="RefSection" text="Abschnitt"/>
+   <l:gentext key="refsection" text="Abschnitt"/>
+   <l:gentext key="RefSynopsisDiv" text="Synopsis"/>
+   <l:gentext key="refsynopsisdiv" text="Synopsis"/>
+   <l:gentext key="RevHistory" text="Versionsgeschichte"/>
+   <l:gentext key="revhistory" text="Versionsgeschichte"/>
+   <l:gentext key="revision" text="Version"/>
+   <l:gentext key="Revision" text="Version"/>
+   <l:gentext key="sect1" text="Abschnitt"/>
+   <l:gentext key="sect2" text="Abschnitt"/>
+   <l:gentext key="sect3" text="Abschnitt"/>
+   <l:gentext key="sect4" text="Abschnitt"/>
+   <l:gentext key="sect5" text="Abschnitt"/>
+   <l:gentext key="section" text="Abschnitt"/>
+   <l:gentext key="Section" text="Abschnitt"/>
+   <l:gentext key="see" text="Siehe"/>
+   <l:gentext key="See" text="Siehe"/>
+   <l:gentext key="seealso" text="Siehe auch"/>
+   <l:gentext key="Seealso" text="Siehe auch"/>
+   <l:gentext key="SeeAlso" text="Siehe auch"/>
+   <l:gentext key="set" text="Satz"/>
+   <l:gentext key="Set" text="Satz"/>
+   <l:gentext key="setindex" text="Stichwortverzeichnis"/>
+   <l:gentext key="SetIndex" text="Stichwortverzeichnis"/>
+   <l:gentext key="Sidebar" text="Randnotiz"/>
+   <l:gentext key="sidebar" text="randnotiz"/>
+   <l:gentext key="step" text="Schritt"/>
+   <l:gentext key="Step" text="Schritt"/>
+   <l:gentext key="Table" text="Tabelle"/>
+   <l:gentext key="table" text="Tabelle"/>
+   <l:gentext key="tip" text="Tipp"/>
+   <l:gentext key="TIP" text="TIPP"/>
+   <l:gentext key="Tip" text="Tipp"/>
+   <l:gentext key="Warning" text="Warnung"/>
+   <l:gentext key="warning" text="Warnung"/>
+   <l:gentext key="WARNING" text="WARNUNG"/>
+   <l:gentext key="and" text="und"/>
+   <l:gentext key="by" text="von"/>
+   <l:gentext key="called" text="called" lang="en"/>
+   <l:gentext key="Edited" text="Herausgegeben"/>
+   <l:gentext key="edited" text="Herausgegeben"/>
+   <l:gentext key="Editedby" text="Herausgegeben von"/>
+   <l:gentext key="editedby" text="Herausgegeben von"/>
+   <l:gentext key="in" text="in"/>
+   <l:gentext key="lastlistcomma" text=","/>
+   <l:gentext key="listcomma" text=","/>
+   <l:gentext key="nonexistantelement" text="nicht existierendes Element"/>
+   <l:gentext key="notes" text="Fu&#223;noten"/>
+   <l:gentext key="Notes" text="Fu&#223;noten"/>
+   <l:gentext key="Pgs" text="Seiten"/>
+   <l:gentext key="pgs" text="Seiten"/>
+   <l:gentext key="Revisedby" text="Ge&#228;ndert durch: "/>
+   <l:gentext key="revisedby" text="Ge&#228;ndert durch: "/>
+   <l:gentext key="TableNotes" text="Bemerkungen"/>
+   <l:gentext key="tablenotes" text="Bemerkungen"/>
+   <l:gentext key="TableofContents" text="Inhaltsverzeichnis"/>
+   <l:gentext key="tableofcontents" text="Inhaltsverzeichnis"/>
+   <l:gentext key="the" text=""/>
+   <l:gentext key="unexpectedelementname" text="Unerwarteter Elementname"/>
+   <l:gentext key="unsupported" text="wird nicht unterst&#252;tzt"/>
+   <l:gentext key="xrefto" text="xref auf"/>
+   <l:gentext key="listofequations" text="Gleichungen"/>
+   <l:gentext key="ListofEquations" text="Gleichungen"/>
+   <l:gentext key="ListofExamples" text="Beispiele"/>
+   <l:gentext key="listofexamples" text="Beispiele"/>
+   <l:gentext key="ListofFigures" text="Abbildungsverzeichnis"/>
+   <l:gentext key="listoffigures" text="Abbildungsverzeichnis"/>
+   <l:gentext key="ListofProcedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listofprocedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listoftables" text="Tabellenverzeichnis"/>
+   <l:gentext key="ListofTables" text="Tabellenverzeichnis"/>
+   <l:gentext key="ListofUnknown" text="???-Verzeichnis"/>
+   <l:gentext key="listofunknown" text="???-Verzeichnis"/>
+   <l:gentext key="nav-home" text="Zum Anfang"/>
+   <l:gentext key="nav-next" text="Weiter"/>
+   <l:gentext key="nav-next-sibling" text="Schnell weiter"/>
+   <l:gentext key="nav-prev" text="Zur&#252;ck"/>
+   <l:gentext key="nav-prev-sibling" text="Schnell zur&#252;ck"/>
+   <l:gentext key="nav-up" text="Nach oben"/>
+   <l:gentext key="nav-toc" text="InhV"/>
+   <l:gentext key="Draft" text="Entwurf"/>
+   <l:gentext key="above" text="oben"/>
+   <l:gentext key="below" text="unten"/>
+   <l:gentext key="sectioncalled" text="der Abschnitt namens"/>
+   <l:gentext key="index symbols" text="Symbole"/>
+   <l:gentext key="lowercase.alpha" text="abcdefghijklmnopqrstuvwxyz&#228;&#246;&#252;&#223;"/>
+   <l:gentext key="uppercase.alpha" text="ABCDEFGHIJKLMNOPQRSTUVWXYZ&#196;&#214;&#220;&#223;"/>
+   <l:dingbat key="startquote" text="&#8222;"/>
+   <l:dingbat key="endquote" text="&#8220;"/>
+   <l:dingbat key="nestedstartquote" text="&#8218;"/>
+   <l:dingbat key="nestedendquote" text="&#8216;"/>
+   <l:dingbat key="singlestartquote" text="&#8218;"/>
+   <l:dingbat key="singleendquote" text="&#8216;"/>
+   <l:dingbat key="bullet" text="&#8226;"/>
+   <l:gentext key="hyphenation-character" text="-"/>
+   <l:gentext key="hyphenation-push-character-count" text="2"/>
+   <l:gentext key="hyphenation-remain-character-count" text="3"/>
+
+   <l:context name="styles">
+      <l:template name="person-name" text="first-last"/>
+   </l:context>
+
+   <l:context name="title">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="%t"/>
+      <l:template name="appendix" text="Anhang %n. %t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="biblioentry" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliolist" text="%t" lang="en"/>
+      <l:template name="bibliomixed" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="Kapitel %n. %t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="Gleichung %n. %t"/>
+      <l:template name="example" text="Beispiel %n. %t"/>
+      <l:template name="figure" text="Abbildung %n. %t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="glosslist" text="%t" lang="en"/>
+      <l:template name="glossentry" text="%t"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text=""/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="Teil %n. %t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="procedure.formal" text="Prozedur %n. %t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="productionset.formal" text="Produktion&#160;%n"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="%t"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="F: %n"/>
+      <l:template name="refentry" text="%t"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsection" text="%t"/>
+      <l:template name="refsect1" text="%t"/>
+      <l:template name="refsect2" text="%t"/>
+      <l:template name="refsect3" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="refsynopsisdivinfo" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="step" text="%t"/>
+      <l:template name="table" text="Tabelle %n. %t"/>
+      <l:template name="task" text="%t"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="" lang="en"/>
+      <l:template name="warning" text="%t"/>
+   </l:context>
+
+   <l:context name="title-unnumbered">
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article/appendix" text="%t"/>
+      <l:template name="bridgehead" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="sect1" text="%t"/>
+      <l:template name="sect2" text="%t"/>
+      <l:template name="sect3" text="%t"/>
+      <l:template name="sect4" text="%t"/>
+      <l:template name="sect5" text="%t"/>
+      <l:template name="section" text="%t"/>
+      <l:template name="simplesect" text="%t"/>
+   </l:context>
+
+   <l:context name="title-numbered">
+      <l:template name="appendix" text="Anhang %n. %t"/>
+      <l:template name="article/appendix" text="%n.&#160;%t"/>
+      <l:template name="bridgehead" text="%n.&#160;%t"/>
+      <l:template name="chapter" text="Kapitel %n. %t"/>
+      <l:template name="sect1" text="%n. %t"/>
+      <l:template name="sect2" text="%n. %t"/>
+      <l:template name="sect3" text="%n. %t"/>
+      <l:template name="sect4" text="%n. %t"/>
+      <l:template name="sect5" text="%n. %t"/>
+      <l:template name="section" text="%n. %t"/>
+      <l:template name="simplesect" text="%n. %t"/>
+   </l:context>
+
+   <l:context name="subtitle">
+      <l:template name="appendix" text="%s"/>
+      <l:template name="article" text="%s"/>
+      <l:template name="bibliodiv" text="%s"/>
+      <l:template name="biblioentry" text="%s"/>
+      <l:template name="bibliography" text="%s"/>
+      <l:template name="bibliomixed" text="%s"/>
+      <l:template name="bibliomset" text="%s"/>
+      <l:template name="biblioset" text="%s"/>
+      <l:template name="book" text="%s"/>
+      <l:template name="chapter" text="%s"/>
+      <l:template name="colophon" text="%s"/>
+      <l:template name="dedication" text="%s"/>
+      <l:template name="glossary" text="%s"/>
+      <l:template name="glossdiv" text="%s"/>
+      <l:template name="index" text="%s"/>
+      <l:template name="indexdiv" text="%s"/>
+      <l:template name="lot" text="%s"/>
+      <l:template name="part" text="%s"/>
+      <l:template name="partintro" text="%s"/>
+      <l:template name="preface" text="%s"/>
+      <l:template name="refentry" text="%s"/>
+      <l:template name="reference" text="%s"/>
+      <l:template name="refsection" text="%s"/>
+      <l:template name="refsect1" text="%s"/>
+      <l:template name="refsect2" text="%s"/>
+      <l:template name="refsect3" text="%s"/>
+      <l:template name="refsynopsisdiv" text="%s"/>
+      <l:template name="sect1" text="%s"/>
+      <l:template name="sect2" text="%s"/>
+      <l:template name="sect3" text="%s"/>
+      <l:template name="sect4" text="%s"/>
+      <l:template name="sect5" text="%s"/>
+      <l:template name="section" text="%s"/>
+      <l:template name="set" text="%s"/>
+      <l:template name="setindex" text="%s"/>
+      <l:template name="sidebar" text="%s"/>
+      <l:template name="simplesect" text="%s"/>
+      <l:template name="toc" text="%s"/>
+   </l:context>
+
+   <l:context name="xref">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="A:&#160;%n"/>
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="constraintdef" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="%t"/>
+      <l:template name="example" text="%t"/>
+      <l:template name="figure" text="%t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text="%n"/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="%t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="F:&#160;%n"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="F: %n"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="table" text="%t"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="%n"/>
+      <l:template name="warning" text="%t"/>
+      <l:template name="page.citation" text=" [%p]"/>
+      <l:template name="page" text="(Seite %p)"/>
+      <l:template name="pageabbrev" text="(S. %p)"/>
+      <l:template name="Page" text="Seite %p"/>
+      <l:template name="bridgehead" text="&#8222;%t&#8220;"/>
+      <l:template name="refsection" text="&#8222;%t&#8220;"/>
+      <l:template name="refsect1" text="&#8222;%t&#8220;"/>
+      <l:template name="refsect2" text="&#8222;%t&#8220;"/>
+      <l:template name="refsect3" text="&#8222;%t&#8220;"/>
+      <l:template name="sect1" text="&#8222;%t&#8220;"/>
+      <l:template name="sect2" text="&#8222;%t&#8220;"/>
+      <l:template name="sect3" text="&#8222;%t&#8220;"/>
+      <l:template name="sect4" text="&#8222;%t&#8220;"/>
+      <l:template name="sect5" text="&#8222;%t&#8220;"/>
+      <l:template name="section" text="&#8222;%t&#8220;"/>
+      <l:template name="simplesect" text="&#8222;%t&#8220;"/>
+   </l:context>
+
+   <l:context name="xref-number">
+      <l:template name="answer" text="A:&#160;%n"/>
+      <l:template name="appendix" text="Anhang&#160;%n"/>
+      <l:template name="bridgehead" text="Abschnitt&#160;%n"/>
+      <l:template name="chapter" text="Kapitel&#160;%n"/>
+      <l:template name="equation" text="Gleichung&#160;%n"/>
+      <l:template name="example" text="Beispiel&#160;%n"/>
+      <l:template name="figure" text="Abbildung&#160;%n"/>
+      <l:template name="part" text="Teil&#160;%n"/>
+      <l:template name="procedure" text="Prozedur&#160;%n"/>
+      <l:template name="productionset" text="Produktion&#160;%n"/>
+      <l:template name="qandadiv" text="F &amp; A&#160;%n"/>
+      <l:template name="qandaentry" text="F:&#160;%n"/>
+      <l:template name="question" text="F:&#160;%n"/>
+      <l:template name="sect1" text="Abschnitt&#160;%n"/>
+      <l:template name="sect2" text="Abschnitt&#160;%n"/>
+      <l:template name="sect3" text="Abschnitt&#160;%n"/>
+      <l:template name="sect4" text="Abschnitt&#160;%n"/>
+      <l:template name="sect5" text="Abschnitt&#160;%n"/>
+      <l:template name="section" text="Abschnitt&#160;%n"/>
+      <l:template name="table" text="Tabelle&#160;%n"/>
+   </l:context>
+
+   <l:context name="xref-number-and-title">
+      <l:template name="appendix" text="Anhang&#160;%n, %t"/>
+      <l:template name="bridgehead" text="Abschnitt&#160;%n, &#8222;%t&#8220;"/>
+      <l:template name="chapter" text="Kapitel&#160;%n, %t"/>
+      <l:template name="equation" text="Gleichung&#160;%n, &#8222;%t&#8220;"/>
+      <l:template name="example" text="Beispiel&#160;%n, &#8222;%t&#8220;"/>
+      <l:template name="figure" text="Abbildung&#160;%n, &#8222;%t&#8220;"/>
+      <l:template name="part" text="Teil&#160;%n, &#8222;%t&#8220;"/>
+      <l:template name="procedure" text="Prozedur&#160;%n, &#8222;%t&#8220;"/>
+      <l:template name="productionset" text="Produktion&#160;%n, &#8222;%t&#8220;"/>
+      <l:template name="qandadiv" text="F &amp; A&#160;%n, &#8222;%t&#8220;"/>
+      <l:template name="refsect1" text="der Abschnitt namens &#8222;%t&#8220;"/>
+      <l:template name="refsect2" text="der Abschnitt namens &#8222;%t&#8220;"/>
+      <l:template name="refsect3" text="der Abschnitt namens &#8222;%t&#8220;"/>
+      <l:template name="refsection" text="der Abschnitt namens &#8222;%t&#8220;"/>
+      <l:template name="sect1" text="Abschnitt&#160;%n, &#8222;%t&#8220;"/>
+      <l:template name="sect2" text="Abschnitt&#160;%n, &#8222;%t&#8220;"/>
+      <l:template name="sect3" text="Abschnitt&#160;%n, &#8222;%t&#8220;"/>
+      <l:template name="sect4" text="Abschnitt&#160;%n, &#8222;%t&#8220;"/>
+      <l:template name="sect5" text="Abschnitt&#160;%n, &#8222;%t&#8220;"/>
+      <l:template name="section" text="Abschnitt&#160;%n, &#8222;%t&#8220;"/>
+      <l:template name="simplesect" text="der Abschnitt namens &#8222;%t&#8220;"/>
+      <l:template name="table" text="Tabelle&#160;%n, &#8222;%t&#8220;"/>
+   </l:context>
+
+   <l:context name="authorgroup">
+      <l:template name="sep" text=", "/>
+      <l:template name="sep2" text=" und "/>
+      <l:template name="seplast" text=" und "/>
+   </l:context>
+
+   <l:context name="glossary">
+      <l:template name="see" text="Siehe "/>
+      <l:template name="seealso" text="Siehe auch "/>
+   </l:context>
+
+   <l:context name="msgset">
+      <l:template name="MsgAud" text="Zielgruppe: "/>
+      <l:template name="MsgLevel" text="Dringlichkeit: "/>
+      <l:template name="MsgOrig" text="Ursprung: "/>
+   </l:context>
+
+   <l:context name="datetime">
+      <l:template name="format" text="d.M.Y"/>
+   </l:context>
+
+   <l:context name="datetime-full">
+      <l:template name="January" text="Januar"/>
+      <l:template name="February" text="Februar"/>
+      <l:template name="March" text="M&#228;rz"/>
+      <l:template name="April" text="April"/>
+      <l:template name="May" text="Mai"/>
+      <l:template name="June" text="Juni"/>
+      <l:template name="July" text="Juli"/>
+      <l:template name="August" text="August"/>
+      <l:template name="September" text="September"/>
+      <l:template name="October" text="Oktober"/>
+      <l:template name="November" text="November"/>
+      <l:template name="December" text="Dezember"/>
+      <l:template name="Monday" text="Montag"/>
+      <l:template name="Tuesday" text="Dienstag"/>
+      <l:template name="Wednesday" text="Mittwoch"/>
+      <l:template name="Thursday" text="Donnerstag"/>
+      <l:template name="Friday" text="Freitag"/>
+      <l:template name="Saturday" text="Samstag"/>
+      <l:template name="Sunday" text="Sonntag"/>
+   </l:context>
+
+   <l:context name="datetime-abbrev">
+      <l:template name="Jan" text="Jan"/>
+      <l:template name="Feb" text="Feb"/>
+      <l:template name="Mar" text="Mar"/>
+      <l:template name="Apr" text="Apr"/>
+      <l:template name="May" text="Mai"/>
+      <l:template name="Jun" text="Jun"/>
+      <l:template name="Jul" text="Jul"/>
+      <l:template name="Aug" text="Aug"/>
+      <l:template name="Sep" text="Sep"/>
+      <l:template name="Oct" text="Okt"/>
+      <l:template name="Nov" text="Nov"/>
+      <l:template name="Dec" text="Dez"/>
+      <l:template name="Mon" text="Mo"/>
+      <l:template name="Tue" text="Di"/>
+      <l:template name="Wed" text="Mi"/>
+      <l:template name="Thu" text="Do"/>
+      <l:template name="Fri" text="Fr"/>
+      <l:template name="Sat" text="Sa"/>
+      <l:template name="Sun" text="So"/>
+   </l:context>
+
+   <l:context name="htmlhelp">
+      <l:template name="langcode" text="0x0407 German (GERMANY)"/>
+   </l:context>
+
+   <l:letters>
+      <l:l i="-1"/>
+      <l:l i="0">Symbole</l:l>
+      <l:l i="1">A</l:l>
+      <l:l i="1">a</l:l>
+      <l:l i="1">&#196;</l:l>
+      <l:l i="1">&#228;</l:l>
+      <l:l i="2">B</l:l>
+      <l:l i="2">b</l:l>
+      <l:l i="3">C</l:l>
+      <l:l i="3">c</l:l>
+      <l:l i="4">D</l:l>
+      <l:l i="4">d</l:l>
+      <l:l i="5">E</l:l>
+      <l:l i="5">e</l:l>
+      <l:l i="6">F</l:l>
+      <l:l i="6">f</l:l>
+      <l:l i="7">G</l:l>
+      <l:l i="7">g</l:l>
+      <l:l i="8">H</l:l>
+      <l:l i="8">h</l:l>
+      <l:l i="9">I</l:l>
+      <l:l i="9">i</l:l>
+      <l:l i="10">J</l:l>
+      <l:l i="10">j</l:l>
+      <l:l i="11">K</l:l>
+      <l:l i="11">k</l:l>
+      <l:l i="12">L</l:l>
+      <l:l i="12">l</l:l>
+      <l:l i="13">M</l:l>
+      <l:l i="13">m</l:l>
+      <l:l i="14">N</l:l>
+      <l:l i="14">n</l:l>
+      <l:l i="15">O</l:l>
+      <l:l i="15">o</l:l>
+      <l:l i="15">&#214;</l:l>
+      <l:l i="15">&#246;</l:l>
+      <l:l i="16">P</l:l>
+      <l:l i="16">p</l:l>
+      <l:l i="17">Q</l:l>
+      <l:l i="17">q</l:l>
+      <l:l i="18">R</l:l>
+      <l:l i="18">r</l:l>
+      <l:l i="19">S</l:l>
+      <l:l i="19">s</l:l>
+      <l:l i="20">T</l:l>
+      <l:l i="20">t</l:l>
+      <l:l i="21">U</l:l>
+      <l:l i="21">u</l:l>
+      <l:l i="21">&#220;</l:l>
+      <l:l i="21">&#252;</l:l>
+      <l:l i="22">V</l:l>
+      <l:l i="22">v</l:l>
+      <l:l i="23">W</l:l>
+      <l:l i="23">w</l:l>
+      <l:l i="24">X</l:l>
+      <l:l i="24">x</l:l>
+      <l:l i="25">Y</l:l>
+      <l:l i="25">y</l:l>
+      <l:l i="26">Z</l:l>
+      <l:l i="26">z</l:l>
+   </l:letters>
+</l:l10n>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/el.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/el.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/el.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1153 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="el" english-language-name="Greek">
+
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+   <l:gentext key="Abstract" text="&#208;&#229;&#241;&#223;&#235;&#231;&#248;&#231;"/>
+   <l:gentext key="abstract" text="&#208;&#229;&#241;&#223;&#235;&#231;&#248;&#231;"/>
+   <l:gentext key="Answer" text="&#193;:"/>
+   <l:gentext key="answer" text="&#193;:"/>
+   <l:gentext key="Appendix" text="&#208;&#225;&#241;&#220;&#241;&#244;&#231;&#236;&#225;"/>
+   <l:gentext key="appendix" text="&#240;&#225;&#241;&#220;&#241;&#244;&#231;&#236;&#225;"/>
+   <l:gentext key="Article" text="&#182;&#241;&#232;&#241;&#239;"/>
+   <l:gentext key="article" text="&#182;&#241;&#232;&#241;&#239;"/>
+   <l:gentext key="Bibliography" text="&#194;&#233;&#226;&#235;&#233;&#239;&#227;&#241;&#225;&#246;&#223;&#225;"/>
+   <l:gentext key="bibliography" text="&#194;&#233;&#226;&#235;&#233;&#239;&#227;&#241;&#225;&#246;&#223;&#225;"/>
+   <l:gentext key="Book" text="&#194;&#233;&#226;&#235;&#223;&#239;"/>
+   <l:gentext key="book" text="&#194;&#233;&#226;&#235;&#223;&#239;"/>
+   <l:gentext key="CAUTION" text="&#208;&#209;&#207;&#211;&#207;&#215;&#199;"/>
+   <l:gentext key="Caution" text="&#208;&#241;&#239;&#243;&#239;&#247;&#222;"/>
+   <l:gentext key="caution" text="&#208;&#241;&#239;&#243;&#239;&#247;&#222;"/>
+   <l:gentext key="Chapter" text="&#202;&#229;&#246;&#220;&#235;&#225;&#233;&#239;"/>
+   <l:gentext key="chapter" text="&#234;&#229;&#246;&#220;&#235;&#225;&#233;&#239;"/>
+   <l:gentext key="Colophon" text="&#202;&#239;&#241;&#249;&#237;&#223;&#228;&#225;"/>
+   <l:gentext key="colophon" text="&#202;&#239;&#241;&#249;&#237;&#223;&#228;&#225;"/>
+   <l:gentext key="Copyright" text="&#208;&#237;&#229;&#245;&#236;&#225;&#244;&#233;&#234;&#220; &#196;&#233;&#234;&#225;&#233;&#254;&#236;&#225;&#244;&#225;"/>
+   <l:gentext key="copyright" text="&#208;&#237;&#229;&#245;&#236;&#225;&#244;&#233;&#234;&#220; &#196;&#233;&#234;&#225;&#233;&#254;&#236;&#225;&#244;&#225;"/>
+   <l:gentext key="Dedication" text="&#193;&#246;&#233;&#221;&#241;&#249;&#243;&#231;"/>
+   <l:gentext key="dedication" text="&#193;&#246;&#233;&#221;&#241;&#249;&#243;&#231;"/>
+   <l:gentext key="Edition" text="&#184;&#234;&#228;&#239;&#243;&#231;"/>
+   <l:gentext key="edition" text="&#184;&#234;&#228;&#239;&#243;&#231;"/>
+   <l:gentext key="Equation" text="&#197;&#238;&#223;&#243;&#249;&#243;&#231;"/>
+   <l:gentext key="equation" text="&#197;&#238;&#223;&#243;&#249;&#243;&#231;"/>
+   <l:gentext key="Example" text="&#208;&#225;&#241;&#220;&#228;&#229;&#233;&#227;&#236;&#225;"/>
+   <l:gentext key="example" text="&#208;&#225;&#241;&#220;&#228;&#229;&#233;&#227;&#236;&#225;"/>
+   <l:gentext key="Figure" text="&#211;&#247;&#222;&#236;&#225;"/>
+   <l:gentext key="figure" text="&#211;&#247;&#222;&#236;&#225;"/>
+   <l:gentext key="Glossary" text="&#195;&#235;&#249;&#243;&#243;&#220;&#241;&#233;&#239;"/>
+   <l:gentext key="glossary" text="&#195;&#235;&#249;&#243;&#243;&#220;&#241;&#233;&#239;"/>
+   <l:gentext key="GlossSee" text="&#196;&#229;&#223;&#244;&#229;"/>
+   <l:gentext key="glosssee" text="&#196;&#229;&#223;&#244;&#229;"/>
+   <l:gentext key="GlossSeeAlso" text="&#196;&#229;&#223;&#244;&#229; &#197;&#240;&#223;&#243;&#231;&#242;"/>
+   <l:gentext key="glossseealso" text="&#196;&#229;&#223;&#244;&#229; &#197;&#240;&#223;&#243;&#231;&#242;"/>
+   <l:gentext key="IMPORTANT" text="&#211;&#199;&#204;&#193;&#205;&#212;&#201;&#202;&#207;"/>
+   <l:gentext key="important" text="&#211;&#231;&#236;&#225;&#237;&#244;&#233;&#234;&#252;"/>
+   <l:gentext key="Important" text="&#211;&#231;&#236;&#225;&#237;&#244;&#233;&#234;&#252;"/>
+   <l:gentext key="Index" text="&#197;&#245;&#241;&#229;&#244;&#222;&#241;&#233;&#239;"/>
+   <l:gentext key="index" text="&#197;&#245;&#241;&#229;&#244;&#222;&#241;&#233;&#239;"/>
+   <l:gentext key="ISBN" text="ISBN"/>
+   <l:gentext key="isbn" text="ISBN"/>
+   <l:gentext key="LegalNotice" text="&#205;&#239;&#236;&#233;&#234;&#222; &#211;&#231;&#236;&#229;&#223;&#249;&#243;&#231;"/>
+   <l:gentext key="legalnotice" text="&#205;&#239;&#236;&#233;&#234;&#222; &#211;&#231;&#236;&#229;&#223;&#249;&#243;&#231;"/>
+   <l:gentext key="MsgAud" text="&#193;&#234;&#241;&#239;&#225;&#244;&#222;&#241;&#233;&#239;"/>
+   <l:gentext key="msgaud" text="&#193;&#234;&#241;&#239;&#225;&#244;&#222;&#241;&#233;&#239;"/>
+   <l:gentext key="MsgLevel" text="&#197;&#240;&#223;&#240;&#229;&#228;&#239;"/>
+   <l:gentext key="msglevel" text="&#197;&#240;&#223;&#240;&#229;&#228;&#239;"/>
+   <l:gentext key="MsgOrig" text="&#208;&#231;&#227;&#222;"/>
+   <l:gentext key="msgorig" text="&#208;&#231;&#227;&#222;"/>
+   <l:gentext key="NOTE" text="&#211;&#199;&#204;&#197;&#201;&#217;&#211;&#199;"/>
+   <l:gentext key="Note" text="&#211;&#231;&#236;&#229;&#223;&#249;&#243;&#231;"/>
+   <l:gentext key="note" text="&#211;&#231;&#236;&#229;&#223;&#249;&#243;&#231;"/>
+   <l:gentext key="Part" text="&#204;&#221;&#241;&#239;&#242;"/>
+   <l:gentext key="part" text="&#204;&#221;&#241;&#239;&#242;"/>
+   <l:gentext key="Preface" text="&#197;&#233;&#243;&#225;&#227;&#249;&#227;&#222;"/>
+   <l:gentext key="preface" text="&#197;&#233;&#243;&#225;&#227;&#249;&#227;&#222;"/>
+   <l:gentext key="Procedure" text="&#196;&#233;&#225;&#228;&#233;&#234;&#225;&#243;&#223;&#225;"/>
+   <l:gentext key="procedure" text="&#196;&#233;&#225;&#228;&#233;&#234;&#225;&#243;&#223;&#225;"/>
+   <l:gentext key="ProductionSet" text="Production"/>
+   <l:gentext key="PubDate" text="Publication Date" lang="en"/>
+   <l:gentext key="pubdate" text="Publication date" lang="en"/>
+   <l:gentext key="Published" text="&#196;&#231;&#236;&#239;&#243;&#233;&#229;&#245;&#236;&#221;&#237;&#239;"/>
+   <l:gentext key="published" text="&#196;&#231;&#236;&#239;&#243;&#233;&#229;&#245;&#236;&#221;&#237;&#239;"/>
+   <l:gentext key="Qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="Question" text="&#197;:"/>
+   <l:gentext key="question" text="&#197;:"/>
+   <l:gentext key="RefEntry" text=""/>
+   <l:gentext key="refentry" text=""/>
+   <l:gentext key="Reference" text="&#193;&#237;&#225;&#246;&#239;&#241;&#220;"/>
+   <l:gentext key="reference" text="&#193;&#237;&#225;&#246;&#239;&#241;&#220;"/>
+   <l:gentext key="RefName" text="&#188;&#237;&#239;&#236;&#225;"/>
+   <l:gentext key="refname" text="&#188;&#237;&#239;&#236;&#225;"/>
+   <l:gentext key="RefSection" text=""/>
+   <l:gentext key="refsection" text=""/>
+   <l:gentext key="RefSynopsisDiv" text="&#211;&#253;&#237;&#239;&#248;&#231;"/>
+   <l:gentext key="refsynopsisdiv" text="&#211;&#253;&#237;&#239;&#248;&#231;"/>
+   <l:gentext key="RevHistory" text="&#201;&#243;&#244;&#239;&#241;&#233;&#234;&#252; &#193;&#237;&#225;&#232;&#229;&#249;&#241;&#222;&#243;&#229;&#249;&#237;"/>
+   <l:gentext key="revhistory" text="&#201;&#243;&#244;&#239;&#241;&#233;&#234;&#252; &#193;&#237;&#225;&#232;&#229;&#249;&#241;&#222;&#243;&#229;&#249;&#237;"/>
+   <l:gentext key="revision" text="&#193;&#237;&#225;&#232;&#229;&#254;&#241;&#231;&#243;&#231;"/>
+   <l:gentext key="Revision" text="&#193;&#237;&#225;&#232;&#229;&#254;&#241;&#231;&#243;&#231;"/>
+   <l:gentext key="sect1" text="Section"/>
+   <l:gentext key="sect2" text="Section"/>
+   <l:gentext key="sect3" text="Section"/>
+   <l:gentext key="sect4" text="Section"/>
+   <l:gentext key="sect5" text="Section"/>
+   <l:gentext key="section" text="&#244;&#236;&#222;&#236;&#225;"/>
+   <l:gentext key="Section" text="&#212;&#236;&#222;&#236;&#225;"/>
+   <l:gentext key="see" text="&#196;&#229;&#223;&#244;&#229;"/>
+   <l:gentext key="See" text="&#196;&#229;&#223;&#244;&#229;"/>
+   <l:gentext key="seealso" text="&#196;&#229;&#223;&#244;&#229; &#197;&#240;&#223;&#243;&#231;&#242;"/>
+   <l:gentext key="Seealso" text="&#196;&#229;&#223;&#244;&#229; &#229;&#240;&#223;&#243;&#231;&#242;"/>
+   <l:gentext key="SeeAlso" text="&#196;&#229;&#223;&#244;&#229; &#197;&#240;&#223;&#243;&#231;&#242;"/>
+   <l:gentext key="set" text="&#211;&#253;&#237;&#239;&#235;&#239;"/>
+   <l:gentext key="Set" text="&#211;&#253;&#237;&#239;&#235;&#239;"/>
+   <l:gentext key="setindex" text="&#197;&#245;&#241;&#229;&#244;&#222;&#241;&#233;&#239; &#211;&#245;&#237;&#252;&#235;&#249;&#237;"/>
+   <l:gentext key="SetIndex" text="&#197;&#245;&#241;&#229;&#244;&#222;&#241;&#233;&#239; &#211;&#245;&#237;&#252;&#235;&#249;&#237;"/>
+   <l:gentext key="Sidebar" text=""/>
+   <l:gentext key="sidebar" text="&#229;&#240;&#229;&#238;&#231;&#227;&#231;&#236;&#225;&#244;&#233;&#234;&#252; &#240;&#235;&#229;&#245;&#241;&#233;&#234;&#252; &#225;&#241;&#232;&#241;&#223;&#228;&#233;&#239;"/>
+   <l:gentext key="step" text="&#246;&#220;&#243;&#231;"/>
+   <l:gentext key="Step" text="&#214;&#220;&#243;&#231;"/>
+   <l:gentext key="Table" text="&#208;&#223;&#237;&#225;&#234;&#225;&#242;"/>
+   <l:gentext key="table" text="&#208;&#223;&#237;&#225;&#234;&#225;&#242;"/>
+   <l:gentext key="tip" text="&#213;&#240;&#252;&#228;&#229;&#233;&#238;&#231;"/>
+   <l:gentext key="TIP" text="&#213;&#208;&#207;&#196;&#197;&#201;&#206;&#199;"/>
+   <l:gentext key="Tip" text="&#213;&#240;&#252;&#228;&#229;&#233;&#238;&#231;"/>
+   <l:gentext key="Warning" text="&#208;&#241;&#239;&#229;&#233;&#228;&#239;&#240;&#239;&#223;&#231;&#243;&#231;"/>
+   <l:gentext key="warning" text="&#208;&#241;&#239;&#229;&#233;&#228;&#239;&#240;&#239;&#223;&#231;&#243;&#231;"/>
+   <l:gentext key="WARNING" text="&#208;&#209;&#207;&#197;&#201;&#196;&#207;&#208;&#207;&#201;&#199;&#211;&#199;"/>
+   <l:gentext key="and" text="&#234;&#225;&#233;"/>
+   <l:gentext key="by" text="&#225;&#240;&#252;"/>
+   <l:gentext key="called" text="called" lang="en"/>
+   <l:gentext key="Edited" text="&#197;&#240;&#233;&#236;&#221;&#235;&#229;&#233;&#225;"/>
+   <l:gentext key="edited" text="&#197;&#240;&#233;&#236;&#221;&#235;&#229;&#233;&#225;"/>
+   <l:gentext key="Editedby" text="&#197;&#240;&#233;&#236;&#221;&#235;&#229;&#233;&#225; &#225;&#240;&#252;"/>
+   <l:gentext key="editedby" text="&#197;&#240;&#233;&#236;&#221;&#235;&#229;&#233;&#225; &#225;&#240;&#252;"/>
+   <l:gentext key="in" text="&#243;&#229;"/>
+   <l:gentext key="lastlistcomma" text=","/>
+   <l:gentext key="listcomma" text=","/>
+   <l:gentext key="nonexistantelement" text="&#236;&#231;-&#245;&#240;&#225;&#241;&#234;&#244;&#252; &#243;&#244;&#239;&#233;&#247;&#229;&#223;&#239;"/>
+   <l:gentext key="notes" text="&#211;&#231;&#236;&#229;&#233;&#254;&#243;&#229;&#233;&#242;"/>
+   <l:gentext key="Notes" text="&#211;&#231;&#236;&#229;&#233;&#254;&#243;&#229;&#233;&#242;"/>
+   <l:gentext key="Pgs" text="&#211;&#235;&#228;&#242;."/>
+   <l:gentext key="pgs" text="&#211;&#235;&#228;&#242;."/>
+   <l:gentext key="Revisedby" text="Revised by: "/>
+   <l:gentext key="revisedby" text="Revised by: "/>
+   <l:gentext key="TableNotes" text="&#208;&#223;&#237;&#225;&#234;&#225;&#242; &#211;&#231;&#236;&#229;&#233;&#254;&#243;&#229;&#249;&#237;"/>
+   <l:gentext key="tablenotes" text="&#208;&#223;&#237;&#225;&#234;&#225;&#242; &#211;&#231;&#236;&#229;&#233;&#254;&#243;&#229;&#249;&#237;"/>
+   <l:gentext key="TableofContents" text="&#208;&#223;&#237;&#225;&#234;&#225;&#242; &#208;&#229;&#241;&#233;&#229;&#247;&#239;&#236;&#221;&#237;&#249;&#237;"/>
+   <l:gentext key="tableofcontents" text="&#208;&#223;&#237;&#225;&#234;&#225;&#242; &#208;&#229;&#241;&#233;&#229;&#247;&#239;&#236;&#221;&#237;&#249;&#237;"/>
+   <l:gentext key="the" text="" lang="en"/>
+   <l:gentext key="unexpectedelementname" text="&#204;&#231; &#225;&#237;&#225;&#236;&#229;&#237;&#252;&#236;&#229;&#237;&#239; &#252;&#237;&#239;&#236;&#225; &#243;&#244;&#239;&#233;&#247;&#229;&#223;&#239;&#245;"/>
+   <l:gentext key="unsupported" text="&#236;&#231; &#245;&#240;&#239;&#243;&#244;&#231;&#241;&#233;&#230;&#252;&#236;&#229;&#237;&#239;"/>
+   <l:gentext key="xrefto" text="&#225;&#237;&#244;&#233;&#240;&#225;&#241;&#225;&#240;&#239;&#236;&#240;&#222; &#243;&#229;"/>
+   <l:gentext key="listofequations" text="&#202;&#225;&#244;&#220;&#235;&#239;&#227;&#239;&#242; &#197;&#238;&#233;&#243;&#254;&#243;&#229;&#249;&#237;"/>
+   <l:gentext key="ListofEquations" text="&#202;&#225;&#244;&#220;&#235;&#239;&#227;&#239;&#242; &#197;&#238;&#233;&#243;&#254;&#243;&#229;&#249;&#237;"/>
+   <l:gentext key="ListofExamples" text="&#202;&#225;&#244;&#220;&#235;&#239;&#227;&#239;&#242; &#208;&#225;&#241;&#225;&#228;&#229;&#233;&#227;&#236;&#220;&#244;&#249;&#237;"/>
+   <l:gentext key="listofexamples" text="&#202;&#225;&#244;&#220;&#235;&#239;&#227;&#239;&#242; &#208;&#225;&#241;&#225;&#228;&#229;&#233;&#227;&#236;&#220;&#244;&#249;&#237;"/>
+   <l:gentext key="ListofFigures" text="&#202;&#225;&#244;&#220;&#235;&#239;&#227;&#239;&#242; &#211;&#247;&#231;&#236;&#220;&#244;&#249;&#237;"/>
+   <l:gentext key="listoffigures" text="&#202;&#225;&#244;&#220;&#235;&#239;&#227;&#239;&#242; &#211;&#247;&#231;&#236;&#220;&#244;&#249;&#237;"/>
+   <l:gentext key="ListofProcedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listofprocedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listoftables" text="&#202;&#225;&#244;&#220;&#235;&#239;&#227;&#239;&#242; &#208;&#233;&#237;&#220;&#234;&#249;&#237;"/>
+   <l:gentext key="ListofTables" text="&#202;&#225;&#244;&#220;&#235;&#239;&#227;&#239;&#242; &#208;&#233;&#237;&#220;&#234;&#249;&#237;"/>
+   <l:gentext key="ListofUnknown" text="&#202;&#225;&#244;&#220;&#235;&#239;&#227;&#239;&#242; &#193;&#227;&#237;&#254;&#243;&#244;&#249;&#237;"/>
+   <l:gentext key="listofunknown" text="&#202;&#225;&#244;&#220;&#235;&#239;&#227;&#239;&#242; &#193;&#227;&#237;&#254;&#243;&#244;&#249;&#237;"/>
+   <l:gentext key="nav-home" text="&#193;&#241;&#247;&#222;"/>
+   <l:gentext key="nav-next" text="&#197;&#240;&#252;&#236;&#229;&#237;&#239;"/>
+   <l:gentext key="nav-next-sibling" text="&#208;&#241;&#239;&#242; &#244;&#239; &#244;&#221;&#235;&#239;&#242;"/>
+   <l:gentext key="nav-prev" text="&#208;&#241;&#239;&#231;&#227;"/>
+   <l:gentext key="nav-prev-sibling" text="&#208;&#241;&#239;&#242; &#244;&#231;&#237; &#225;&#241;&#247;&#222;"/>
+   <l:gentext key="nav-up" text="&#208;&#220;&#237;&#249;"/>
+   <l:gentext key="nav-toc" text="ToC" lang="en"/>
+   <l:gentext key="Draft" text="Draft"/>
+   <l:gentext key="above" text="above"/>
+   <l:gentext key="below" text="below"/>
+   <l:gentext key="sectioncalled" text="the section called"/>
+   <l:gentext key="index symbols" text="Symbols"/>
+   <l:gentext key="lowercase.alpha" text="abcdefghijklmnopqrstuvwxyz"/>
+   <l:gentext key="uppercase.alpha" text="ABCDEFGHIJKLMNOPQRSTUVWXYZ"/>
+   <l:dingbat key="startquote" text="&#8220;"/>
+   <l:dingbat key="endquote" text="&#8221;"/>
+   <l:dingbat key="nestedstartquote" text="&#8216;"/>
+   <l:dingbat key="nestedendquote" text="&#8217;"/>
+   <l:dingbat key="singlestartquote" text="&#8216;" lang="en"/>
+   <l:dingbat key="singleendquote" text="&#8217;" lang="en"/>
+   <l:dingbat key="bullet" text="&#8226;"/>
+   <l:gentext key="hyphenation-character" text="-" lang="en"/>
+   <l:gentext key="hyphenation-push-character-count" text="2" lang="en"/>
+   <l:gentext key="hyphenation-remain-character-count" text="2" lang="en"/>
+
+   <l:context name="styles">
+      <l:template name="person-name" text="first-last"/>
+   </l:context>
+
+   <l:context name="title">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="%t"/>
+      <l:template name="appendix" text="&#208;&#225;&#241;&#220;&#241;&#244;&#231;&#236;&#225; %n. %t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="biblioentry" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliolist" text="%t" lang="en"/>
+      <l:template name="bibliomixed" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="&#202;&#229;&#246;&#220;&#235;&#225;&#233;&#239; %n. %t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="&#197;&#238;&#223;&#243;&#249;&#243;&#231; %n. %t"/>
+      <l:template name="example" text="&#208;&#225;&#241;&#220;&#228;&#229;&#233;&#227;&#236;&#225; %n. %t"/>
+      <l:template name="figure" text="&#211;&#247;&#222;&#236;&#225; %n. %t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="glosslist" text="%t" lang="en"/>
+      <l:template name="glossentry" text="%t" lang="en"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text=""/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="&#204;&#221;&#241;&#239;&#242; %n. %t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="procedure.formal" text="&#196;&#233;&#225;&#228;&#233;&#234;&#225;&#243;&#223;&#225;&#160;%n.&#160;%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="productionset.formal" text="Production&#160;%n"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="%t"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="%t"/>
+      <l:template name="refentry" text="%t"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsection" text="%t"/>
+      <l:template name="refsect1" text="%t"/>
+      <l:template name="refsect2" text="%t"/>
+      <l:template name="refsect3" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="refsynopsisdivinfo" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="step" text="%t"/>
+      <l:template name="table" text="&#208;&#223;&#237;&#225;&#234;&#225;&#242; %n. %t"/>
+      <l:template name="task" text="%t" lang="en"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="" lang="en"/>
+      <l:template name="warning" text="%t"/>
+   </l:context>
+
+   <l:context name="title-unnumbered">
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article/appendix" text="%t" lang="en"/>
+      <l:template name="bridgehead" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="sect1" text="%t"/>
+      <l:template name="sect2" text="%t"/>
+      <l:template name="sect3" text="%t"/>
+      <l:template name="sect4" text="%t"/>
+      <l:template name="sect5" text="%t"/>
+      <l:template name="section" text="%t"/>
+      <l:template name="simplesect" text="%t"/>
+   </l:context>
+
+   <l:context name="title-numbered">
+      <l:template name="appendix" text="&#208;&#225;&#241;&#220;&#241;&#244;&#231;&#236;&#225; %n. %t"/>
+      <l:template name="article/appendix" text="%n.&#160;%t" lang="en"/>
+      <l:template name="bridgehead" text="%n.&#160;%t"/>
+      <l:template name="chapter" text="&#202;&#229;&#246;&#220;&#235;&#225;&#233;&#239; %n. %t"/>
+      <l:template name="sect1" text="%n. %t"/>
+      <l:template name="sect2" text="%n. %t"/>
+      <l:template name="sect3" text="%n. %t"/>
+      <l:template name="sect4" text="%n. %t"/>
+      <l:template name="sect5" text="%n. %t"/>
+      <l:template name="section" text="%n. %t"/>
+      <l:template name="simplesect" text="%n. %t"/>
+   </l:context>
+
+   <l:context name="subtitle">
+      <l:template name="appendix" text="%s"/>
+      <l:template name="article" text="%s"/>
+      <l:template name="bibliodiv" text="%s"/>
+      <l:template name="biblioentry" text="%s"/>
+      <l:template name="bibliography" text="%s"/>
+      <l:template name="bibliomixed" text="%s"/>
+      <l:template name="bibliomset" text="%s"/>
+      <l:template name="biblioset" text="%s"/>
+      <l:template name="book" text="%s"/>
+      <l:template name="chapter" text="%s"/>
+      <l:template name="colophon" text="%s"/>
+      <l:template name="dedication" text="%s"/>
+      <l:template name="glossary" text="%s"/>
+      <l:template name="glossdiv" text="%s"/>
+      <l:template name="index" text="%s"/>
+      <l:template name="indexdiv" text="%s"/>
+      <l:template name="lot" text="%s"/>
+      <l:template name="part" text="%s"/>
+      <l:template name="partintro" text="%s"/>
+      <l:template name="preface" text="%s"/>
+      <l:template name="refentry" text="%s"/>
+      <l:template name="reference" text="%s"/>
+      <l:template name="refsection" text="%s"/>
+      <l:template name="refsect1" text="%s"/>
+      <l:template name="refsect2" text="%s"/>
+      <l:template name="refsect3" text="%s"/>
+      <l:template name="refsynopsisdiv" text="%s"/>
+      <l:template name="sect1" text="%s"/>
+      <l:template name="sect2" text="%s"/>
+      <l:template name="sect3" text="%s"/>
+      <l:template name="sect4" text="%s"/>
+      <l:template name="sect5" text="%s"/>
+      <l:template name="section" text="%s"/>
+      <l:template name="set" text="%s"/>
+      <l:template name="setindex" text="%s"/>
+      <l:template name="sidebar" text="%s"/>
+      <l:template name="simplesect" text="%s"/>
+      <l:template name="toc" text="%s"/>
+   </l:context>
+
+   <l:context name="xref">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="&#193;:&#160;%n"/>
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="constraintdef" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="%t"/>
+      <l:template name="example" text="%t"/>
+      <l:template name="figure" text="%t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text="%n"/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="%t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="&#197;:&#160;%n"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="&#197;:&#160;%n"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="table" text="%t"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="%n"/>
+      <l:template name="warning" text="%t"/>
+      <l:template name="page.citation" text=" [%p]"/>
+      <l:template name="page" text="(page %p)" lang="en"/>
+      <l:template name="pageabbrev" text="(p. %p)" lang="en"/>
+      <l:template name="Page" text="Page %p" lang="en"/>
+      <l:template name="bridgehead" text="&#8220;%t&#8221;"/>
+      <l:template name="refsection" text="&#8220;%t&#8221;"/>
+      <l:template name="refsect1" text="&#8220;%t&#8221;"/>
+      <l:template name="refsect2" text="&#8220;%t&#8221;"/>
+      <l:template name="refsect3" text="&#8220;%t&#8221;"/>
+      <l:template name="sect1" text="&#8220;%t&#8221;"/>
+      <l:template name="sect2" text="&#8220;%t&#8221;"/>
+      <l:template name="sect3" text="&#8220;%t&#8221;"/>
+      <l:template name="sect4" text="&#8220;%t&#8221;"/>
+      <l:template name="sect5" text="&#8220;%t&#8221;"/>
+      <l:template name="section" text="&#8220;%t&#8221;"/>
+      <l:template name="simplesect" text="&#8220;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="xref-number">
+      <l:template name="answer" text="&#193;:&#160;%n"/>
+      <l:template name="appendix" text="&#208;&#225;&#241;&#220;&#241;&#244;&#231;&#236;&#225;&#160;%n"/>
+      <l:template name="bridgehead" text="&#212;&#236;&#222;&#236;&#225;&#160;%n"/>
+      <l:template name="chapter" text="&#202;&#229;&#246;&#220;&#235;&#225;&#233;&#239;&#160;%n"/>
+      <l:template name="equation" text="&#197;&#238;&#223;&#243;&#249;&#243;&#231;&#160;%n"/>
+      <l:template name="example" text="&#208;&#225;&#241;&#220;&#228;&#229;&#233;&#227;&#236;&#225;&#160;%n"/>
+      <l:template name="figure" text="&#211;&#247;&#222;&#236;&#225;&#160;%n"/>
+      <l:template name="part" text="&#204;&#221;&#241;&#239;&#242;&#160;%n"/>
+      <l:template name="procedure" text="&#196;&#233;&#225;&#228;&#233;&#234;&#225;&#243;&#223;&#225;&#160;%n"/>
+      <l:template name="productionset" text="Production&#160;%n"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n"/>
+      <l:template name="qandaentry" text="&#197;:&#160;%n"/>
+      <l:template name="question" text="&#197;:&#160;%n"/>
+      <l:template name="sect1" text="&#212;&#236;&#222;&#236;&#225;&#160;%n"/>
+      <l:template name="sect2" text="&#212;&#236;&#222;&#236;&#225;&#160;%n"/>
+      <l:template name="sect3" text="&#212;&#236;&#222;&#236;&#225;&#160;%n"/>
+      <l:template name="sect4" text="&#212;&#236;&#222;&#236;&#225;&#160;%n"/>
+      <l:template name="sect5" text="&#212;&#236;&#222;&#236;&#225;&#160;%n"/>
+      <l:template name="section" text="&#212;&#236;&#222;&#236;&#225;&#160;%n"/>
+      <l:template name="table" text="&#208;&#223;&#237;&#225;&#234;&#225;&#242;&#160;%n"/>
+   </l:context>
+
+   <l:context name="xref-number-and-title">
+      <l:template name="appendix" text="&#208;&#225;&#241;&#220;&#241;&#244;&#231;&#236;&#225;&#160;%n, %t"/>
+      <l:template name="bridgehead" text="&#212;&#236;&#222;&#236;&#225;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="chapter" text="&#202;&#229;&#246;&#220;&#235;&#225;&#233;&#239;&#160;%n, %t"/>
+      <l:template name="equation" text="&#197;&#238;&#223;&#243;&#249;&#243;&#231;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="example" text="&#208;&#225;&#241;&#220;&#228;&#229;&#233;&#227;&#236;&#225;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="figure" text="&#211;&#247;&#222;&#236;&#225;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="part" text="&#204;&#221;&#241;&#239;&#242;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="procedure" text="&#196;&#233;&#225;&#228;&#233;&#234;&#225;&#243;&#223;&#225;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="productionset" text="Production&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="refsect1" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="refsect2" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="refsect3" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="refsection" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="sect1" text="&#212;&#236;&#222;&#236;&#225;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect2" text="&#212;&#236;&#222;&#236;&#225;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect3" text="&#212;&#236;&#222;&#236;&#225;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect4" text="&#212;&#236;&#222;&#236;&#225;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect5" text="&#212;&#236;&#222;&#236;&#225;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="section" text="&#212;&#236;&#222;&#236;&#225;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="simplesect" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="table" text="&#208;&#223;&#237;&#225;&#234;&#225;&#242;&#160;%n, &#8220;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="authorgroup">
+      <l:template name="sep" text=", "/>
+      <l:template name="sep2" text=" &#234;&#225;&#233; "/>
+      <l:template name="seplast" text=", &#234;&#225;&#233; "/>
+   </l:context>
+
+   <l:context name="glossary">
+      <l:template name="see" text="&#196;&#229;&#223;&#244;&#229; "/>
+      <l:template name="seealso" text="&#196;&#229;&#223;&#244;&#229; &#197;&#240;&#223;&#243;&#231;&#242; "/>
+   </l:context>
+
+   <l:context name="msgset">
+      <l:template name="MsgAud" text="&#193;&#234;&#241;&#239;&#225;&#244;&#222;&#241;&#233;&#239;: "/>
+      <l:template name="MsgLevel" text="&#197;&#240;&#223;&#240;&#229;&#228;&#239;: "/>
+      <l:template name="MsgOrig" text="&#208;&#231;&#227;&#222;: "/>
+   </l:context>
+
+   <l:context name="datetime">
+      <l:template name="format" text="m/d/Y" lang="en"/>
+   </l:context>
+
+   <l:context name="datetime-full">
+      <l:template name="January" text="January" lang="en"/>
+      <l:template name="February" text="February" lang="en"/>
+      <l:template name="March" text="March" lang="en"/>
+      <l:template name="April" text="April" lang="en"/>
+      <l:template name="May" text="May" lang="en"/>
+      <l:template name="June" text="June" lang="en"/>
+      <l:template name="July" text="July" lang="en"/>
+      <l:template name="August" text="August" lang="en"/>
+      <l:template name="September" text="September" lang="en"/>
+      <l:template name="October" text="October" lang="en"/>
+      <l:template name="November" text="November" lang="en"/>
+      <l:template name="December" text="December" lang="en"/>
+      <l:template name="Monday" text="Monday" lang="en"/>
+      <l:template name="Tuesday" text="Tuesday" lang="en"/>
+      <l:template name="Wednesday" text="Wednesday" lang="en"/>
+      <l:template name="Thursday" text="Thursday" lang="en"/>
+      <l:template name="Friday" text="Friday" lang="en"/>
+      <l:template name="Saturday" text="Saturday" lang="en"/>
+      <l:template name="Sunday" text="Sunday" lang="en"/>
+   </l:context>
+
+   <l:context name="datetime-abbrev">
+      <l:template name="Jan" text="Jan" lang="en"/>
+      <l:template name="Feb" text="Feb" lang="en"/>
+      <l:template name="Mar" text="Mar" lang="en"/>
+      <l:template name="Apr" text="Apr" lang="en"/>
+      <l:template name="May" text="May" lang="en"/>
+      <l:template name="Jun" text="Jun" lang="en"/>
+      <l:template name="Jul" text="Jul" lang="en"/>
+      <l:template name="Aug" text="Aug" lang="en"/>
+      <l:template name="Sep" text="Sep" lang="en"/>
+      <l:template name="Oct" text="Oct" lang="en"/>
+      <l:template name="Nov" text="Nov" lang="en"/>
+      <l:template name="Dec" text="Dec" lang="en"/>
+      <l:template name="Mon" text="Mon" lang="en"/>
+      <l:template name="Tue" text="Tue" lang="en"/>
+      <l:template name="Wed" text="Wed" lang="en"/>
+      <l:template name="Thu" text="Thu" lang="en"/>
+      <l:template name="Fri" text="Fri" lang="en"/>
+      <l:template name="Sat" text="Sat" lang="en"/>
+      <l:template name="Sun" text="Sun" lang="en"/>
+   </l:context>
+
+   <l:context name="htmlhelp">
+      <l:template name="langcode" text="0x0408 Greek"/>
+   </l:context>
+
+   <l:letters lang="en">
+      <l:l i="-1"/>
+      <l:l i="0">Symbols</l:l>
+      <l:l i="10">A</l:l>
+      <l:l i="10">a</l:l>
+      <l:l i="10">&#192;</l:l>
+      <l:l i="10">&#224;</l:l>
+      <l:l i="10">&#193;</l:l>
+      <l:l i="10">&#225;</l:l>
+      <l:l i="10">&#194;</l:l>
+      <l:l i="10">&#226;</l:l>
+      <l:l i="10">&#195;</l:l>
+      <l:l i="10">&#227;</l:l>
+      <l:l i="10">&#196;</l:l>
+      <l:l i="10">&#228;</l:l>
+      <l:l i="10">&#197;</l:l>
+      <l:l i="10">&#229;</l:l>
+      <l:l i="10">&#256;</l:l>
+      <l:l i="10">&#257;</l:l>
+      <l:l i="10">&#258;</l:l>
+      <l:l i="10">&#259;</l:l>
+      <l:l i="10">&#260;</l:l>
+      <l:l i="10">&#261;</l:l>
+      <l:l i="10">&#461;</l:l>
+      <l:l i="10">&#462;</l:l>
+      <l:l i="10">&#478;</l:l>
+      <l:l i="10">&#479;</l:l>
+      <l:l i="10">&#480;</l:l>
+      <l:l i="10">&#481;</l:l>
+      <l:l i="10">&#506;</l:l>
+      <l:l i="10">&#507;</l:l>
+      <l:l i="10">&#512;</l:l>
+      <l:l i="10">&#513;</l:l>
+      <l:l i="10">&#514;</l:l>
+      <l:l i="10">&#515;</l:l>
+      <l:l i="10">&#550;</l:l>
+      <l:l i="10">&#551;</l:l>
+      <l:l i="10">&#7680;</l:l>
+      <l:l i="10">&#7681;</l:l>
+      <l:l i="10">&#7834;</l:l>
+      <l:l i="10">&#7840;</l:l>
+      <l:l i="10">&#7841;</l:l>
+      <l:l i="10">&#7842;</l:l>
+      <l:l i="10">&#7843;</l:l>
+      <l:l i="10">&#7844;</l:l>
+      <l:l i="10">&#7845;</l:l>
+      <l:l i="10">&#7846;</l:l>
+      <l:l i="10">&#7847;</l:l>
+      <l:l i="10">&#7848;</l:l>
+      <l:l i="10">&#7849;</l:l>
+      <l:l i="10">&#7850;</l:l>
+      <l:l i="10">&#7851;</l:l>
+      <l:l i="10">&#7852;</l:l>
+      <l:l i="10">&#7853;</l:l>
+      <l:l i="10">&#7854;</l:l>
+      <l:l i="10">&#7855;</l:l>
+      <l:l i="10">&#7856;</l:l>
+      <l:l i="10">&#7857;</l:l>
+      <l:l i="10">&#7858;</l:l>
+      <l:l i="10">&#7859;</l:l>
+      <l:l i="10">&#7860;</l:l>
+      <l:l i="10">&#7861;</l:l>
+      <l:l i="10">&#7862;</l:l>
+      <l:l i="10">&#7863;</l:l>
+      <l:l i="20">B</l:l>
+      <l:l i="20">b</l:l>
+      <l:l i="20">&#384;</l:l>
+      <l:l i="20">&#385;</l:l>
+      <l:l i="20">&#595;</l:l>
+      <l:l i="20">&#386;</l:l>
+      <l:l i="20">&#387;</l:l>
+      <l:l i="20">&#7682;</l:l>
+      <l:l i="20">&#7683;</l:l>
+      <l:l i="20">&#7684;</l:l>
+      <l:l i="20">&#7685;</l:l>
+      <l:l i="20">&#7686;</l:l>
+      <l:l i="20">&#7687;</l:l>
+      <l:l i="30">C</l:l>
+      <l:l i="30">c</l:l>
+      <l:l i="30">&#199;</l:l>
+      <l:l i="30">&#231;</l:l>
+      <l:l i="30">&#262;</l:l>
+      <l:l i="30">&#263;</l:l>
+      <l:l i="30">&#264;</l:l>
+      <l:l i="30">&#265;</l:l>
+      <l:l i="30">&#266;</l:l>
+      <l:l i="30">&#267;</l:l>
+      <l:l i="30">&#268;</l:l>
+      <l:l i="30">&#269;</l:l>
+      <l:l i="30">&#391;</l:l>
+      <l:l i="30">&#392;</l:l>
+      <l:l i="30">&#597;</l:l>
+      <l:l i="30">&#7688;</l:l>
+      <l:l i="30">&#7689;</l:l>
+      <l:l i="40">D</l:l>
+      <l:l i="40">d</l:l>
+      <l:l i="40">&#270;</l:l>
+      <l:l i="40">&#271;</l:l>
+      <l:l i="40">&#272;</l:l>
+      <l:l i="40">&#273;</l:l>
+      <l:l i="40">&#394;</l:l>
+      <l:l i="40">&#599;</l:l>
+      <l:l i="40">&#395;</l:l>
+      <l:l i="40">&#396;</l:l>
+      <l:l i="40">&#453;</l:l>
+      <l:l i="40">&#498;</l:l>
+      <l:l i="40">&#545;</l:l>
+      <l:l i="40">&#598;</l:l>
+      <l:l i="40">&#7690;</l:l>
+      <l:l i="40">&#7691;</l:l>
+      <l:l i="40">&#7692;</l:l>
+      <l:l i="40">&#7693;</l:l>
+      <l:l i="40">&#7694;</l:l>
+      <l:l i="40">&#7695;</l:l>
+      <l:l i="40">&#7696;</l:l>
+      <l:l i="40">&#7697;</l:l>
+      <l:l i="40">&#7698;</l:l>
+      <l:l i="40">&#7699;</l:l>
+      <l:l i="50">E</l:l>
+      <l:l i="50">e</l:l>
+      <l:l i="50">&#200;</l:l>
+      <l:l i="50">&#232;</l:l>
+      <l:l i="50">&#201;</l:l>
+      <l:l i="50">&#233;</l:l>
+      <l:l i="50">&#202;</l:l>
+      <l:l i="50">&#234;</l:l>
+      <l:l i="50">&#203;</l:l>
+      <l:l i="50">&#235;</l:l>
+      <l:l i="50">&#274;</l:l>
+      <l:l i="50">&#275;</l:l>
+      <l:l i="50">&#276;</l:l>
+      <l:l i="50">&#277;</l:l>
+      <l:l i="50">&#278;</l:l>
+      <l:l i="50">&#279;</l:l>
+      <l:l i="50">&#280;</l:l>
+      <l:l i="50">&#281;</l:l>
+      <l:l i="50">&#282;</l:l>
+      <l:l i="50">&#283;</l:l>
+      <l:l i="50">&#516;</l:l>
+      <l:l i="50">&#517;</l:l>
+      <l:l i="50">&#518;</l:l>
+      <l:l i="50">&#519;</l:l>
+      <l:l i="50">&#552;</l:l>
+      <l:l i="50">&#553;</l:l>
+      <l:l i="50">&#7700;</l:l>
+      <l:l i="50">&#7701;</l:l>
+      <l:l i="50">&#7702;</l:l>
+      <l:l i="50">&#7703;</l:l>
+      <l:l i="50">&#7704;</l:l>
+      <l:l i="50">&#7705;</l:l>
+      <l:l i="50">&#7706;</l:l>
+      <l:l i="50">&#7707;</l:l>
+      <l:l i="50">&#7708;</l:l>
+      <l:l i="50">&#7709;</l:l>
+      <l:l i="50">&#7864;</l:l>
+      <l:l i="50">&#7865;</l:l>
+      <l:l i="50">&#7866;</l:l>
+      <l:l i="50">&#7867;</l:l>
+      <l:l i="50">&#7868;</l:l>
+      <l:l i="50">&#7869;</l:l>
+      <l:l i="50">&#7870;</l:l>
+      <l:l i="50">&#7871;</l:l>
+      <l:l i="50">&#7872;</l:l>
+      <l:l i="50">&#7873;</l:l>
+      <l:l i="50">&#7874;</l:l>
+      <l:l i="50">&#7875;</l:l>
+      <l:l i="50">&#7876;</l:l>
+      <l:l i="50">&#7877;</l:l>
+      <l:l i="50">&#7878;</l:l>
+      <l:l i="50">&#7879;</l:l>
+      <l:l i="60">F</l:l>
+      <l:l i="60">f</l:l>
+      <l:l i="60">&#401;</l:l>
+      <l:l i="60">&#402;</l:l>
+      <l:l i="60">&#7710;</l:l>
+      <l:l i="60">&#7711;</l:l>
+      <l:l i="70">G</l:l>
+      <l:l i="70">g</l:l>
+      <l:l i="70">&#284;</l:l>
+      <l:l i="70">&#285;</l:l>
+      <l:l i="70">&#286;</l:l>
+      <l:l i="70">&#287;</l:l>
+      <l:l i="70">&#288;</l:l>
+      <l:l i="70">&#289;</l:l>
+      <l:l i="70">&#290;</l:l>
+      <l:l i="70">&#291;</l:l>
+      <l:l i="70">&#403;</l:l>
+      <l:l i="70">&#608;</l:l>
+      <l:l i="70">&#484;</l:l>
+      <l:l i="70">&#485;</l:l>
+      <l:l i="70">&#486;</l:l>
+      <l:l i="70">&#487;</l:l>
+      <l:l i="70">&#500;</l:l>
+      <l:l i="70">&#501;</l:l>
+      <l:l i="70">&#7712;</l:l>
+      <l:l i="70">&#7713;</l:l>
+      <l:l i="80">H</l:l>
+      <l:l i="80">h</l:l>
+      <l:l i="80">&#292;</l:l>
+      <l:l i="80">&#293;</l:l>
+      <l:l i="80">&#294;</l:l>
+      <l:l i="80">&#295;</l:l>
+      <l:l i="80">&#542;</l:l>
+      <l:l i="80">&#543;</l:l>
+      <l:l i="80">&#614;</l:l>
+      <l:l i="80">&#7714;</l:l>
+      <l:l i="80">&#7715;</l:l>
+      <l:l i="80">&#7716;</l:l>
+      <l:l i="80">&#7717;</l:l>
+      <l:l i="80">&#7718;</l:l>
+      <l:l i="80">&#7719;</l:l>
+      <l:l i="80">&#7720;</l:l>
+      <l:l i="80">&#7721;</l:l>
+      <l:l i="80">&#7722;</l:l>
+      <l:l i="80">&#7723;</l:l>
+      <l:l i="80">&#7830;</l:l>
+      <l:l i="90">I</l:l>
+      <l:l i="90">i</l:l>
+      <l:l i="90">&#204;</l:l>
+      <l:l i="90">&#236;</l:l>
+      <l:l i="90">&#205;</l:l>
+      <l:l i="90">&#237;</l:l>
+      <l:l i="90">&#206;</l:l>
+      <l:l i="90">&#238;</l:l>
+      <l:l i="90">&#207;</l:l>
+      <l:l i="90">&#239;</l:l>
+      <l:l i="90">&#296;</l:l>
+      <l:l i="90">&#297;</l:l>
+      <l:l i="90">&#298;</l:l>
+      <l:l i="90">&#299;</l:l>
+      <l:l i="90">&#300;</l:l>
+      <l:l i="90">&#301;</l:l>
+      <l:l i="90">&#302;</l:l>
+      <l:l i="90">&#303;</l:l>
+      <l:l i="90">&#304;</l:l>
+      <l:l i="90">&#407;</l:l>
+      <l:l i="90">&#616;</l:l>
+      <l:l i="90">&#463;</l:l>
+      <l:l i="90">&#464;</l:l>
+      <l:l i="90">&#520;</l:l>
+      <l:l i="90">&#521;</l:l>
+      <l:l i="90">&#522;</l:l>
+      <l:l i="90">&#523;</l:l>
+      <l:l i="90">&#7724;</l:l>
+      <l:l i="90">&#7725;</l:l>
+      <l:l i="90">&#7726;</l:l>
+      <l:l i="90">&#7727;</l:l>
+      <l:l i="90">&#7880;</l:l>
+      <l:l i="90">&#7881;</l:l>
+      <l:l i="90">&#7882;</l:l>
+      <l:l i="90">&#7883;</l:l>
+      <l:l i="100">J</l:l>
+      <l:l i="100">j</l:l>
+      <l:l i="100">&#308;</l:l>
+      <l:l i="100">&#309;</l:l>
+      <l:l i="100">&#496;</l:l>
+      <l:l i="100">&#669;</l:l>
+      <l:l i="110">K</l:l>
+      <l:l i="110">k</l:l>
+      <l:l i="110">&#310;</l:l>
+      <l:l i="110">&#311;</l:l>
+      <l:l i="110">&#408;</l:l>
+      <l:l i="110">&#409;</l:l>
+      <l:l i="110">&#488;</l:l>
+      <l:l i="110">&#489;</l:l>
+      <l:l i="110">&#7728;</l:l>
+      <l:l i="110">&#7729;</l:l>
+      <l:l i="110">&#7730;</l:l>
+      <l:l i="110">&#7731;</l:l>
+      <l:l i="110">&#7732;</l:l>
+      <l:l i="110">&#7733;</l:l>
+      <l:l i="120">L</l:l>
+      <l:l i="120">l</l:l>
+      <l:l i="120">&#313;</l:l>
+      <l:l i="120">&#314;</l:l>
+      <l:l i="120">&#315;</l:l>
+      <l:l i="120">&#316;</l:l>
+      <l:l i="120">&#317;</l:l>
+      <l:l i="120">&#318;</l:l>
+      <l:l i="120">&#319;</l:l>
+      <l:l i="120">&#320;</l:l>
+      <l:l i="120">&#321;</l:l>
+      <l:l i="120">&#322;</l:l>
+      <l:l i="120">&#410;</l:l>
+      <l:l i="120">&#456;</l:l>
+      <l:l i="120">&#564;</l:l>
+      <l:l i="120">&#619;</l:l>
+      <l:l i="120">&#620;</l:l>
+      <l:l i="120">&#621;</l:l>
+      <l:l i="120">&#7734;</l:l>
+      <l:l i="120">&#7735;</l:l>
+      <l:l i="120">&#7736;</l:l>
+      <l:l i="120">&#7737;</l:l>
+      <l:l i="120">&#7738;</l:l>
+      <l:l i="120">&#7739;</l:l>
+      <l:l i="120">&#7740;</l:l>
+      <l:l i="120">&#7741;</l:l>
+      <l:l i="130">M</l:l>
+      <l:l i="130">m</l:l>
+      <l:l i="130">&#625;</l:l>
+      <l:l i="130">&#7742;</l:l>
+      <l:l i="130">&#7743;</l:l>
+      <l:l i="130">&#7744;</l:l>
+      <l:l i="130">&#7745;</l:l>
+      <l:l i="130">&#7746;</l:l>
+      <l:l i="130">&#7747;</l:l>
+      <l:l i="140">N</l:l>
+      <l:l i="140">n</l:l>
+      <l:l i="140">&#209;</l:l>
+      <l:l i="140">&#241;</l:l>
+      <l:l i="140">&#323;</l:l>
+      <l:l i="140">&#324;</l:l>
+      <l:l i="140">&#325;</l:l>
+      <l:l i="140">&#326;</l:l>
+      <l:l i="140">&#327;</l:l>
+      <l:l i="140">&#328;</l:l>
+      <l:l i="140">&#413;</l:l>
+      <l:l i="140">&#626;</l:l>
+      <l:l i="140">&#414;</l:l>
+      <l:l i="140">&#544;</l:l>
+      <l:l i="140">&#459;</l:l>
+      <l:l i="140">&#504;</l:l>
+      <l:l i="140">&#505;</l:l>
+      <l:l i="140">&#565;</l:l>
+      <l:l i="140">&#627;</l:l>
+      <l:l i="140">&#7748;</l:l>
+      <l:l i="140">&#7749;</l:l>
+      <l:l i="140">&#7750;</l:l>
+      <l:l i="140">&#7751;</l:l>
+      <l:l i="140">&#7752;</l:l>
+      <l:l i="140">&#7753;</l:l>
+      <l:l i="140">&#7754;</l:l>
+      <l:l i="140">&#7755;</l:l>
+      <l:l i="150">O</l:l>
+      <l:l i="150">o</l:l>
+      <l:l i="150">&#210;</l:l>
+      <l:l i="150">&#242;</l:l>
+      <l:l i="150">&#211;</l:l>
+      <l:l i="150">&#243;</l:l>
+      <l:l i="150">&#212;</l:l>
+      <l:l i="150">&#244;</l:l>
+      <l:l i="150">&#213;</l:l>
+      <l:l i="150">&#245;</l:l>
+      <l:l i="150">&#214;</l:l>
+      <l:l i="150">&#246;</l:l>
+      <l:l i="150">&#216;</l:l>
+      <l:l i="150">&#248;</l:l>
+      <l:l i="150">&#332;</l:l>
+      <l:l i="150">&#333;</l:l>
+      <l:l i="150">&#334;</l:l>
+      <l:l i="150">&#335;</l:l>
+      <l:l i="150">&#336;</l:l>
+      <l:l i="150">&#337;</l:l>
+      <l:l i="150">&#415;</l:l>
+      <l:l i="150">&#416;</l:l>
+      <l:l i="150">&#417;</l:l>
+      <l:l i="150">&#465;</l:l>
+      <l:l i="150">&#466;</l:l>
+      <l:l i="150">&#490;</l:l>
+      <l:l i="150">&#491;</l:l>
+      <l:l i="150">&#492;</l:l>
+      <l:l i="150">&#493;</l:l>
+      <l:l i="150">&#510;</l:l>
+      <l:l i="150">&#511;</l:l>
+      <l:l i="150">&#524;</l:l>
+      <l:l i="150">&#525;</l:l>
+      <l:l i="150">&#526;</l:l>
+      <l:l i="150">&#527;</l:l>
+      <l:l i="150">&#554;</l:l>
+      <l:l i="150">&#555;</l:l>
+      <l:l i="150">&#556;</l:l>
+      <l:l i="150">&#557;</l:l>
+      <l:l i="150">&#558;</l:l>
+      <l:l i="150">&#559;</l:l>
+      <l:l i="150">&#560;</l:l>
+      <l:l i="150">&#561;</l:l>
+      <l:l i="150">&#7756;</l:l>
+      <l:l i="150">&#7757;</l:l>
+      <l:l i="150">&#7758;</l:l>
+      <l:l i="150">&#7759;</l:l>
+      <l:l i="150">&#7760;</l:l>
+      <l:l i="150">&#7761;</l:l>
+      <l:l i="150">&#7762;</l:l>
+      <l:l i="150">&#7763;</l:l>
+      <l:l i="150">&#7884;</l:l>
+      <l:l i="150">&#7885;</l:l>
+      <l:l i="150">&#7886;</l:l>
+      <l:l i="150">&#7887;</l:l>
+      <l:l i="150">&#7888;</l:l>
+      <l:l i="150">&#7889;</l:l>
+      <l:l i="150">&#7890;</l:l>
+      <l:l i="150">&#7891;</l:l>
+      <l:l i="150">&#7892;</l:l>
+      <l:l i="150">&#7893;</l:l>
+      <l:l i="150">&#7894;</l:l>
+      <l:l i="150">&#7895;</l:l>
+      <l:l i="150">&#7896;</l:l>
+      <l:l i="150">&#7897;</l:l>
+      <l:l i="150">&#7898;</l:l>
+      <l:l i="150">&#7899;</l:l>
+      <l:l i="150">&#7900;</l:l>
+      <l:l i="150">&#7901;</l:l>
+      <l:l i="150">&#7902;</l:l>
+      <l:l i="150">&#7903;</l:l>
+      <l:l i="150">&#7904;</l:l>
+      <l:l i="150">&#7905;</l:l>
+      <l:l i="150">&#7906;</l:l>
+      <l:l i="150">&#7907;</l:l>
+      <l:l i="160">P</l:l>
+      <l:l i="160">p</l:l>
+      <l:l i="160">&#420;</l:l>
+      <l:l i="160">&#421;</l:l>
+      <l:l i="160">&#7764;</l:l>
+      <l:l i="160">&#7765;</l:l>
+      <l:l i="160">&#7766;</l:l>
+      <l:l i="160">&#7767;</l:l>
+      <l:l i="170">Q</l:l>
+      <l:l i="170">q</l:l>
+      <l:l i="170">&#672;</l:l>
+      <l:l i="180">R</l:l>
+      <l:l i="180">r</l:l>
+      <l:l i="180">&#340;</l:l>
+      <l:l i="180">&#341;</l:l>
+      <l:l i="180">&#342;</l:l>
+      <l:l i="180">&#343;</l:l>
+      <l:l i="180">&#344;</l:l>
+      <l:l i="180">&#345;</l:l>
+      <l:l i="180">&#528;</l:l>
+      <l:l i="180">&#529;</l:l>
+      <l:l i="180">&#530;</l:l>
+      <l:l i="180">&#531;</l:l>
+      <l:l i="180">&#636;</l:l>
+      <l:l i="180">&#637;</l:l>
+      <l:l i="180">&#638;</l:l>
+      <l:l i="180">&#7768;</l:l>
+      <l:l i="180">&#7769;</l:l>
+      <l:l i="180">&#7770;</l:l>
+      <l:l i="180">&#7771;</l:l>
+      <l:l i="180">&#7772;</l:l>
+      <l:l i="180">&#7773;</l:l>
+      <l:l i="180">&#7774;</l:l>
+      <l:l i="180">&#7775;</l:l>
+      <l:l i="190">S</l:l>
+      <l:l i="190">s</l:l>
+      <l:l i="190">&#346;</l:l>
+      <l:l i="190">&#347;</l:l>
+      <l:l i="190">&#348;</l:l>
+      <l:l i="190">&#349;</l:l>
+      <l:l i="190">&#350;</l:l>
+      <l:l i="190">&#351;</l:l>
+      <l:l i="190">&#352;</l:l>
+      <l:l i="190">&#353;</l:l>
+      <l:l i="190">&#536;</l:l>
+      <l:l i="190">&#537;</l:l>
+      <l:l i="190">&#642;</l:l>
+      <l:l i="190">&#7776;</l:l>
+      <l:l i="190">&#7777;</l:l>
+      <l:l i="190">&#7778;</l:l>
+      <l:l i="190">&#7779;</l:l>
+      <l:l i="190">&#7780;</l:l>
+      <l:l i="190">&#7781;</l:l>
+      <l:l i="190">&#7782;</l:l>
+      <l:l i="190">&#7783;</l:l>
+      <l:l i="190">&#7784;</l:l>
+      <l:l i="190">&#7785;</l:l>
+      <l:l i="200">T</l:l>
+      <l:l i="200">t</l:l>
+      <l:l i="200">&#354;</l:l>
+      <l:l i="200">&#355;</l:l>
+      <l:l i="200">&#356;</l:l>
+      <l:l i="200">&#357;</l:l>
+      <l:l i="200">&#358;</l:l>
+      <l:l i="200">&#359;</l:l>
+      <l:l i="200">&#427;</l:l>
+      <l:l i="200">&#428;</l:l>
+      <l:l i="200">&#429;</l:l>
+      <l:l i="200">&#430;</l:l>
+      <l:l i="200">&#648;</l:l>
+      <l:l i="200">&#538;</l:l>
+      <l:l i="200">&#539;</l:l>
+      <l:l i="200">&#566;</l:l>
+      <l:l i="200">&#7786;</l:l>
+      <l:l i="200">&#7787;</l:l>
+      <l:l i="200">&#7788;</l:l>
+      <l:l i="200">&#7789;</l:l>
+      <l:l i="200">&#7790;</l:l>
+      <l:l i="200">&#7791;</l:l>
+      <l:l i="200">&#7792;</l:l>
+      <l:l i="200">&#7793;</l:l>
+      <l:l i="200">&#7831;</l:l>
+      <l:l i="210">U</l:l>
+      <l:l i="210">u</l:l>
+      <l:l i="210">&#217;</l:l>
+      <l:l i="210">&#249;</l:l>
+      <l:l i="210">&#218;</l:l>
+      <l:l i="210">&#250;</l:l>
+      <l:l i="210">&#219;</l:l>
+      <l:l i="210">&#251;</l:l>
+      <l:l i="210">&#220;</l:l>
+      <l:l i="210">&#252;</l:l>
+      <l:l i="210">&#360;</l:l>
+      <l:l i="210">&#361;</l:l>
+      <l:l i="210">&#362;</l:l>
+      <l:l i="210">&#363;</l:l>
+      <l:l i="210">&#364;</l:l>
+      <l:l i="210">&#365;</l:l>
+      <l:l i="210">&#366;</l:l>
+      <l:l i="210">&#367;</l:l>
+      <l:l i="210">&#368;</l:l>
+      <l:l i="210">&#369;</l:l>
+      <l:l i="210">&#370;</l:l>
+      <l:l i="210">&#371;</l:l>
+      <l:l i="210">&#431;</l:l>
+      <l:l i="210">&#432;</l:l>
+      <l:l i="210">&#467;</l:l>
+      <l:l i="210">&#468;</l:l>
+      <l:l i="210">&#469;</l:l>
+      <l:l i="210">&#470;</l:l>
+      <l:l i="210">&#471;</l:l>
+      <l:l i="210">&#472;</l:l>
+      <l:l i="210">&#473;</l:l>
+      <l:l i="210">&#474;</l:l>
+      <l:l i="210">&#475;</l:l>
+      <l:l i="210">&#476;</l:l>
+      <l:l i="210">&#532;</l:l>
+      <l:l i="210">&#533;</l:l>
+      <l:l i="210">&#534;</l:l>
+      <l:l i="210">&#535;</l:l>
+      <l:l i="210">&#7794;</l:l>
+      <l:l i="210">&#7795;</l:l>
+      <l:l i="210">&#7796;</l:l>
+      <l:l i="210">&#7797;</l:l>
+      <l:l i="210">&#7798;</l:l>
+      <l:l i="210">&#7799;</l:l>
+      <l:l i="210">&#7800;</l:l>
+      <l:l i="210">&#7801;</l:l>
+      <l:l i="210">&#7802;</l:l>
+      <l:l i="210">&#7803;</l:l>
+      <l:l i="210">&#7908;</l:l>
+      <l:l i="210">&#7909;</l:l>
+      <l:l i="210">&#7910;</l:l>
+      <l:l i="210">&#7911;</l:l>
+      <l:l i="210">&#7912;</l:l>
+      <l:l i="210">&#7913;</l:l>
+      <l:l i="210">&#7914;</l:l>
+      <l:l i="210">&#7915;</l:l>
+      <l:l i="210">&#7916;</l:l>
+      <l:l i="210">&#7917;</l:l>
+      <l:l i="210">&#7918;</l:l>
+      <l:l i="210">&#7919;</l:l>
+      <l:l i="210">&#7920;</l:l>
+      <l:l i="210">&#7921;</l:l>
+      <l:l i="220">V</l:l>
+      <l:l i="220">v</l:l>
+      <l:l i="220">&#434;</l:l>
+      <l:l i="220">&#651;</l:l>
+      <l:l i="220">&#7804;</l:l>
+      <l:l i="220">&#7805;</l:l>
+      <l:l i="220">&#7806;</l:l>
+      <l:l i="220">&#7807;</l:l>
+      <l:l i="230">W</l:l>
+      <l:l i="230">w</l:l>
+      <l:l i="230">&#372;</l:l>
+      <l:l i="230">&#373;</l:l>
+      <l:l i="230">&#7808;</l:l>
+      <l:l i="230">&#7809;</l:l>
+      <l:l i="230">&#7810;</l:l>
+      <l:l i="230">&#7811;</l:l>
+      <l:l i="230">&#7812;</l:l>
+      <l:l i="230">&#7813;</l:l>
+      <l:l i="230">&#7814;</l:l>
+      <l:l i="230">&#7815;</l:l>
+      <l:l i="230">&#7816;</l:l>
+      <l:l i="230">&#7817;</l:l>
+      <l:l i="230">&#7832;</l:l>
+      <l:l i="240">X</l:l>
+      <l:l i="240">x</l:l>
+      <l:l i="240">&#7818;</l:l>
+      <l:l i="240">&#7819;</l:l>
+      <l:l i="240">&#7820;</l:l>
+      <l:l i="240">&#7821;</l:l>
+      <l:l i="250">Y</l:l>
+      <l:l i="250">y</l:l>
+      <l:l i="250">&#221;</l:l>
+      <l:l i="250">&#253;</l:l>
+      <l:l i="250">&#255;</l:l>
+      <l:l i="250">&#376;</l:l>
+      <l:l i="250">&#374;</l:l>
+      <l:l i="250">&#375;</l:l>
+      <l:l i="250">&#435;</l:l>
+      <l:l i="250">&#436;</l:l>
+      <l:l i="250">&#562;</l:l>
+      <l:l i="250">&#563;</l:l>
+      <l:l i="250">&#7822;</l:l>
+      <l:l i="250">&#7823;</l:l>
+      <l:l i="250">&#7833;</l:l>
+      <l:l i="250">&#7922;</l:l>
+      <l:l i="250">&#7923;</l:l>
+      <l:l i="250">&#7924;</l:l>
+      <l:l i="250">&#7925;</l:l>
+      <l:l i="250">&#7926;</l:l>
+      <l:l i="250">&#7927;</l:l>
+      <l:l i="250">&#7928;</l:l>
+      <l:l i="250">&#7929;</l:l>
+      <l:l i="260">Z</l:l>
+      <l:l i="260">z</l:l>
+      <l:l i="260">&#377;</l:l>
+      <l:l i="260">&#378;</l:l>
+      <l:l i="260">&#379;</l:l>
+      <l:l i="260">&#380;</l:l>
+      <l:l i="260">&#381;</l:l>
+      <l:l i="260">&#382;</l:l>
+      <l:l i="260">&#437;</l:l>
+      <l:l i="260">&#438;</l:l>
+      <l:l i="260">&#548;</l:l>
+      <l:l i="260">&#549;</l:l>
+      <l:l i="260">&#656;</l:l>
+      <l:l i="260">&#657;</l:l>
+      <l:l i="260">&#7824;</l:l>
+      <l:l i="260">&#7825;</l:l>
+      <l:l i="260">&#7826;</l:l>
+      <l:l i="260">&#7827;</l:l>
+      <l:l i="260">&#7828;</l:l>
+      <l:l i="260">&#7829;</l:l>
+   </l:letters>
+</l:l10n>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/en.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/en.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/en.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1153 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="en" english-language-name="English">
+
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+   <l:gentext key="Abstract" text="Abstract"/>
+   <l:gentext key="abstract" text="Abstract"/>
+   <l:gentext key="Answer" text="A:"/>
+   <l:gentext key="answer" text="A:"/>
+   <l:gentext key="Appendix" text="Appendix"/>
+   <l:gentext key="appendix" text="appendix"/>
+   <l:gentext key="Article" text="Article"/>
+   <l:gentext key="article" text="Article"/>
+   <l:gentext key="Bibliography" text="Bibliography"/>
+   <l:gentext key="bibliography" text="Bibliography"/>
+   <l:gentext key="Book" text="Book"/>
+   <l:gentext key="book" text="Book"/>
+   <l:gentext key="CAUTION" text="CAUTION"/>
+   <l:gentext key="Caution" text="Caution"/>
+   <l:gentext key="caution" text="Caution"/>
+   <l:gentext key="Chapter" text="Chapter"/>
+   <l:gentext key="chapter" text="chapter"/>
+   <l:gentext key="Colophon" text="Colophon"/>
+   <l:gentext key="colophon" text="Colophon"/>
+   <l:gentext key="Copyright" text="Copyright"/>
+   <l:gentext key="copyright" text="Copyright"/>
+   <l:gentext key="Dedication" text="Dedication"/>
+   <l:gentext key="dedication" text="Dedication"/>
+   <l:gentext key="Edition" text="Edition"/>
+   <l:gentext key="edition" text="Edition"/>
+   <l:gentext key="Equation" text="Equation"/>
+   <l:gentext key="equation" text="Equation"/>
+   <l:gentext key="Example" text="Example"/>
+   <l:gentext key="example" text="Example"/>
+   <l:gentext key="Figure" text="Figure"/>
+   <l:gentext key="figure" text="Figure"/>
+   <l:gentext key="Glossary" text="Glossary"/>
+   <l:gentext key="glossary" text="Glossary"/>
+   <l:gentext key="GlossSee" text="See"/>
+   <l:gentext key="glosssee" text="See"/>
+   <l:gentext key="GlossSeeAlso" text="See Also"/>
+   <l:gentext key="glossseealso" text="See Also"/>
+   <l:gentext key="IMPORTANT" text="IMPORTANT"/>
+   <l:gentext key="important" text="Important"/>
+   <l:gentext key="Important" text="Important"/>
+   <l:gentext key="Index" text="Index"/>
+   <l:gentext key="index" text="Index"/>
+   <l:gentext key="ISBN" text="ISBN"/>
+   <l:gentext key="isbn" text="ISBN"/>
+   <l:gentext key="LegalNotice" text="Legal Notice"/>
+   <l:gentext key="legalnotice" text="Legal Notice"/>
+   <l:gentext key="MsgAud" text="Audience"/>
+   <l:gentext key="msgaud" text="Audience"/>
+   <l:gentext key="MsgLevel" text="Level"/>
+   <l:gentext key="msglevel" text="Level"/>
+   <l:gentext key="MsgOrig" text="Origin"/>
+   <l:gentext key="msgorig" text="Origin"/>
+   <l:gentext key="NOTE" text="NOTE"/>
+   <l:gentext key="Note" text="Note"/>
+   <l:gentext key="note" text="Note"/>
+   <l:gentext key="Part" text="Part"/>
+   <l:gentext key="part" text="Part"/>
+   <l:gentext key="Preface" text="Preface"/>
+   <l:gentext key="preface" text="Preface"/>
+   <l:gentext key="Procedure" text="Procedure"/>
+   <l:gentext key="procedure" text="Procedure"/>
+   <l:gentext key="ProductionSet" text="Production"/>
+   <l:gentext key="PubDate" text="Publication Date"/>
+   <l:gentext key="pubdate" text="Publication date"/>
+   <l:gentext key="Published" text="Published"/>
+   <l:gentext key="published" text="Published"/>
+   <l:gentext key="Qandadiv" text="Q &amp; A"/>
+   <l:gentext key="qandadiv" text="Q &amp; A"/>
+   <l:gentext key="Question" text="Q:"/>
+   <l:gentext key="question" text="Q:"/>
+   <l:gentext key="RefEntry" text=""/>
+   <l:gentext key="refentry" text=""/>
+   <l:gentext key="Reference" text="Reference"/>
+   <l:gentext key="reference" text="Reference"/>
+   <l:gentext key="RefName" text="Name"/>
+   <l:gentext key="refname" text="Name"/>
+   <l:gentext key="RefSection" text=""/>
+   <l:gentext key="refsection" text=""/>
+   <l:gentext key="RefSynopsisDiv" text="Synopsis"/>
+   <l:gentext key="refsynopsisdiv" text="Synopsis"/>
+   <l:gentext key="RevHistory" text="Revision History"/>
+   <l:gentext key="revhistory" text="Revision History"/>
+   <l:gentext key="revision" text="Revision"/>
+   <l:gentext key="Revision" text="Revision"/>
+   <l:gentext key="sect1" text="Section"/>
+   <l:gentext key="sect2" text="Section"/>
+   <l:gentext key="sect3" text="Section"/>
+   <l:gentext key="sect4" text="Section"/>
+   <l:gentext key="sect5" text="Section"/>
+   <l:gentext key="section" text="Section"/>
+   <l:gentext key="Section" text="Section"/>
+   <l:gentext key="see" text="see"/>
+   <l:gentext key="See" text="See"/>
+   <l:gentext key="seealso" text="see also"/>
+   <l:gentext key="Seealso" text="See also"/>
+   <l:gentext key="SeeAlso" text="See Also"/>
+   <l:gentext key="set" text="Set"/>
+   <l:gentext key="Set" text="Set"/>
+   <l:gentext key="setindex" text="Set Index"/>
+   <l:gentext key="SetIndex" text="Set Index"/>
+   <l:gentext key="Sidebar" text=""/>
+   <l:gentext key="sidebar" text="sidebar"/>
+   <l:gentext key="step" text="step"/>
+   <l:gentext key="Step" text="Step"/>
+   <l:gentext key="Table" text="Table"/>
+   <l:gentext key="table" text="Table"/>
+   <l:gentext key="tip" text="Tip"/>
+   <l:gentext key="TIP" text="TIP"/>
+   <l:gentext key="Tip" text="Tip"/>
+   <l:gentext key="Warning" text="Warning"/>
+   <l:gentext key="warning" text="Warning"/>
+   <l:gentext key="WARNING" text="WARNING"/>
+   <l:gentext key="and" text="and"/>
+   <l:gentext key="by" text="by"/>
+   <l:gentext key="called" text="called"/>
+   <l:gentext key="Edited" text="Edited"/>
+   <l:gentext key="edited" text="Edited"/>
+   <l:gentext key="Editedby" text="Edited by"/>
+   <l:gentext key="editedby" text="Edited by"/>
+   <l:gentext key="in" text="in"/>
+   <l:gentext key="lastlistcomma" text=","/>
+   <l:gentext key="listcomma" text=","/>
+   <l:gentext key="nonexistantelement" text="non-existant element"/>
+   <l:gentext key="notes" text="Notes"/>
+   <l:gentext key="Notes" text="Notes"/>
+   <l:gentext key="Pgs" text="Pgs."/>
+   <l:gentext key="pgs" text="Pgs."/>
+   <l:gentext key="Revisedby" text="Revised by: "/>
+   <l:gentext key="revisedby" text="Revised by: "/>
+   <l:gentext key="TableNotes" text="Notes"/>
+   <l:gentext key="tablenotes" text="Notes"/>
+   <l:gentext key="TableofContents" text="Table of Contents"/>
+   <l:gentext key="tableofcontents" text="Table of Contents"/>
+   <l:gentext key="the" text=""/>
+   <l:gentext key="unexpectedelementname" text="Unexpected element name"/>
+   <l:gentext key="unsupported" text="unsupported"/>
+   <l:gentext key="xrefto" text="xref to"/>
+   <l:gentext key="listofequations" text="List of Equations"/>
+   <l:gentext key="ListofEquations" text="List of Equations"/>
+   <l:gentext key="ListofExamples" text="List of Examples"/>
+   <l:gentext key="listofexamples" text="List of Examples"/>
+   <l:gentext key="ListofFigures" text="List of Figures"/>
+   <l:gentext key="listoffigures" text="List of Figures"/>
+   <l:gentext key="ListofProcedures" text="List of Procedures"/>
+   <l:gentext key="listofprocedures" text="List of Procedures"/>
+   <l:gentext key="listoftables" text="List of Tables"/>
+   <l:gentext key="ListofTables" text="List of Tables"/>
+   <l:gentext key="ListofUnknown" text="List of Unknown"/>
+   <l:gentext key="listofunknown" text="List of Unknown"/>
+   <l:gentext key="nav-home" text="Home"/>
+   <l:gentext key="nav-next" text="Next"/>
+   <l:gentext key="nav-next-sibling" text="Fast Forward"/>
+   <l:gentext key="nav-prev" text="Prev"/>
+   <l:gentext key="nav-prev-sibling" text="Fast Backward"/>
+   <l:gentext key="nav-up" text="Up"/>
+   <l:gentext key="nav-toc" text="ToC"/>
+   <l:gentext key="Draft" text="Draft"/>
+   <l:gentext key="above" text="above"/>
+   <l:gentext key="below" text="below"/>
+   <l:gentext key="sectioncalled" text="the section called"/>
+   <l:gentext key="index symbols" text="Symbols"/>
+   <l:gentext key="lowercase.alpha" text="abcdefghijklmnopqrstuvwxyz"/>
+   <l:gentext key="uppercase.alpha" text="ABCDEFGHIJKLMNOPQRSTUVWXYZ"/>
+   <l:dingbat key="startquote" text="&#8220;"/>
+   <l:dingbat key="endquote" text="&#8221;"/>
+   <l:dingbat key="nestedstartquote" text="&#8216;"/>
+   <l:dingbat key="nestedendquote" text="&#8217;"/>
+   <l:dingbat key="singlestartquote" text="&#8216;"/>
+   <l:dingbat key="singleendquote" text="&#8217;"/>
+   <l:dingbat key="bullet" text="&#8226;"/>
+   <l:gentext key="hyphenation-character" text="-"/>
+   <l:gentext key="hyphenation-push-character-count" text="2"/>
+   <l:gentext key="hyphenation-remain-character-count" text="2"/>
+
+   <l:context name="styles">
+      <l:template name="person-name" text="first-last"/>
+   </l:context>
+
+   <l:context name="title">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="%t"/>
+      <l:template name="appendix" text="Appendix&#160;%n.&#160;%t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="biblioentry" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliolist" text="%t"/>
+      <l:template name="bibliomixed" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="Chapter&#160;%n.&#160;%t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="Equation&#160;%n.&#160;%t"/>
+      <l:template name="example" text="Example&#160;%n.&#160;%t"/>
+      <l:template name="figure" text="Figure&#160;%n.&#160;%t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="glosslist" text="%t"/>
+      <l:template name="glossentry" text="%t"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text=""/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="Part&#160;%n.&#160;%t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="procedure.formal" text="Procedure&#160;%n.&#160;%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="productionset.formal" text="Production&#160;%n"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="%t"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="%t"/>
+      <l:template name="refentry" text="%t"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsection" text="%t"/>
+      <l:template name="refsect1" text="%t"/>
+      <l:template name="refsect2" text="%t"/>
+      <l:template name="refsect3" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="refsynopsisdivinfo" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="step" text="%t"/>
+      <l:template name="table" text="Table&#160;%n.&#160;%t"/>
+      <l:template name="task" text="%t"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text=""/>
+      <l:template name="warning" text="%t"/>
+   </l:context>
+
+   <l:context name="title-unnumbered">
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article/appendix" text="%t"/>
+      <l:template name="bridgehead" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="sect1" text="%t"/>
+      <l:template name="sect2" text="%t"/>
+      <l:template name="sect3" text="%t"/>
+      <l:template name="sect4" text="%t"/>
+      <l:template name="sect5" text="%t"/>
+      <l:template name="section" text="%t"/>
+      <l:template name="simplesect" text="%t"/>
+   </l:context>
+
+   <l:context name="title-numbered">
+      <l:template name="appendix" text="Appendix&#160;%n.&#160;%t"/>
+      <l:template name="article/appendix" text="%n.&#160;%t"/>
+      <l:template name="bridgehead" text="%n.&#160;%t"/>
+      <l:template name="chapter" text="Chapter&#160;%n.&#160;%t"/>
+      <l:template name="sect1" text="%n.&#160;%t"/>
+      <l:template name="sect2" text="%n.&#160;%t"/>
+      <l:template name="sect3" text="%n.&#160;%t"/>
+      <l:template name="sect4" text="%n.&#160;%t"/>
+      <l:template name="sect5" text="%n.&#160;%t"/>
+      <l:template name="section" text="%n.&#160;%t"/>
+      <l:template name="simplesect" text="%t"/>
+   </l:context>
+
+   <l:context name="subtitle">
+      <l:template name="appendix" text="%s"/>
+      <l:template name="article" text="%s"/>
+      <l:template name="bibliodiv" text="%s"/>
+      <l:template name="biblioentry" text="%s"/>
+      <l:template name="bibliography" text="%s"/>
+      <l:template name="bibliomixed" text="%s"/>
+      <l:template name="bibliomset" text="%s"/>
+      <l:template name="biblioset" text="%s"/>
+      <l:template name="book" text="%s"/>
+      <l:template name="chapter" text="%s"/>
+      <l:template name="colophon" text="%s"/>
+      <l:template name="dedication" text="%s"/>
+      <l:template name="glossary" text="%s"/>
+      <l:template name="glossdiv" text="%s"/>
+      <l:template name="index" text="%s"/>
+      <l:template name="indexdiv" text="%s"/>
+      <l:template name="lot" text="%s"/>
+      <l:template name="part" text="%s"/>
+      <l:template name="partintro" text="%s"/>
+      <l:template name="preface" text="%s"/>
+      <l:template name="refentry" text="%s"/>
+      <l:template name="reference" text="%s"/>
+      <l:template name="refsection" text="%s"/>
+      <l:template name="refsect1" text="%s"/>
+      <l:template name="refsect2" text="%s"/>
+      <l:template name="refsect3" text="%s"/>
+      <l:template name="refsynopsisdiv" text="%s"/>
+      <l:template name="sect1" text="%s"/>
+      <l:template name="sect2" text="%s"/>
+      <l:template name="sect3" text="%s"/>
+      <l:template name="sect4" text="%s"/>
+      <l:template name="sect5" text="%s"/>
+      <l:template name="section" text="%s"/>
+      <l:template name="set" text="%s"/>
+      <l:template name="setindex" text="%s"/>
+      <l:template name="sidebar" text="%s"/>
+      <l:template name="simplesect" text="%s"/>
+      <l:template name="toc" text="%s"/>
+   </l:context>
+
+   <l:context name="xref">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="A:&#160;%n"/>
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="constraintdef" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="%t"/>
+      <l:template name="example" text="%t"/>
+      <l:template name="figure" text="%t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text="%n"/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="%t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="Q:&#160;%n"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="Q:&#160;%n"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="table" text="%t"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="%n"/>
+      <l:template name="warning" text="%t"/>
+      <l:template name="page.citation" text=" [%p]"/>
+      <l:template name="page" text="(page %p)"/>
+      <l:template name="pageabbrev" text="(p. %p)"/>
+      <l:template name="Page" text="Page %p"/>
+      <l:template name="bridgehead" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="refsection" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="refsect1" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="refsect2" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="refsect3" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="sect1" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="sect2" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="sect3" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="sect4" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="sect5" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="section" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="simplesect" text="the section called &#8220;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="xref-number">
+      <l:template name="answer" text="A:&#160;%n"/>
+      <l:template name="appendix" text="Appendix&#160;%n"/>
+      <l:template name="bridgehead" text="Section&#160;%n"/>
+      <l:template name="chapter" text="Chapter&#160;%n"/>
+      <l:template name="equation" text="Equation&#160;%n"/>
+      <l:template name="example" text="Example&#160;%n"/>
+      <l:template name="figure" text="Figure&#160;%n"/>
+      <l:template name="part" text="Part&#160;%n"/>
+      <l:template name="procedure" text="Procedure&#160;%n"/>
+      <l:template name="productionset" text="Production&#160;%n"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n"/>
+      <l:template name="qandaentry" text="Q:&#160;%n"/>
+      <l:template name="question" text="Q:&#160;%n"/>
+      <l:template name="sect1" text="Section&#160;%n"/>
+      <l:template name="sect2" text="Section&#160;%n"/>
+      <l:template name="sect3" text="Section&#160;%n"/>
+      <l:template name="sect4" text="Section&#160;%n"/>
+      <l:template name="sect5" text="Section&#160;%n"/>
+      <l:template name="section" text="Section&#160;%n"/>
+      <l:template name="table" text="Table&#160;%n"/>
+   </l:context>
+
+   <l:context name="xref-number-and-title">
+      <l:template name="appendix" text="Appendix&#160;%n, %t"/>
+      <l:template name="bridgehead" text="Section&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="chapter" text="Chapter&#160;%n, %t"/>
+      <l:template name="equation" text="Equation&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="example" text="Example&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="figure" text="Figure&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="part" text="Part&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="procedure" text="Procedure&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="productionset" text="Production&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="refsect1" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="refsect2" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="refsect3" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="refsection" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="sect1" text="Section&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect2" text="Section&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect3" text="Section&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect4" text="Section&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect5" text="Section&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="section" text="Section&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="simplesect" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="table" text="Table&#160;%n, &#8220;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="authorgroup">
+      <l:template name="sep" text=", "/>
+      <l:template name="sep2" text=" and "/>
+      <l:template name="seplast" text=", and "/>
+   </l:context>
+
+   <l:context name="glossary">
+      <l:template name="see" text="See "/>
+      <l:template name="seealso" text="See Also "/>
+   </l:context>
+
+   <l:context name="msgset">
+      <l:template name="MsgAud" text="Audience: "/>
+      <l:template name="MsgLevel" text="Level: "/>
+      <l:template name="MsgOrig" text="Origin: "/>
+   </l:context>
+
+   <l:context name="datetime">
+      <l:template name="format" text="m/d/Y"/>
+   </l:context>
+
+   <l:context name="datetime-full">
+      <l:template name="January" text="January"/>
+      <l:template name="February" text="February"/>
+      <l:template name="March" text="March"/>
+      <l:template name="April" text="April"/>
+      <l:template name="May" text="May"/>
+      <l:template name="June" text="June"/>
+      <l:template name="July" text="July"/>
+      <l:template name="August" text="August"/>
+      <l:template name="September" text="September"/>
+      <l:template name="October" text="October"/>
+      <l:template name="November" text="November"/>
+      <l:template name="December" text="December"/>
+      <l:template name="Monday" text="Monday"/>
+      <l:template name="Tuesday" text="Tuesday"/>
+      <l:template name="Wednesday" text="Wednesday"/>
+      <l:template name="Thursday" text="Thursday"/>
+      <l:template name="Friday" text="Friday"/>
+      <l:template name="Saturday" text="Saturday"/>
+      <l:template name="Sunday" text="Sunday"/>
+   </l:context>
+
+   <l:context name="datetime-abbrev">
+      <l:template name="Jan" text="Jan"/>
+      <l:template name="Feb" text="Feb"/>
+      <l:template name="Mar" text="Mar"/>
+      <l:template name="Apr" text="Apr"/>
+      <l:template name="May" text="May"/>
+      <l:template name="Jun" text="Jun"/>
+      <l:template name="Jul" text="Jul"/>
+      <l:template name="Aug" text="Aug"/>
+      <l:template name="Sep" text="Sep"/>
+      <l:template name="Oct" text="Oct"/>
+      <l:template name="Nov" text="Nov"/>
+      <l:template name="Dec" text="Dec"/>
+      <l:template name="Mon" text="Mon"/>
+      <l:template name="Tue" text="Tue"/>
+      <l:template name="Wed" text="Wed"/>
+      <l:template name="Thu" text="Thu"/>
+      <l:template name="Fri" text="Fri"/>
+      <l:template name="Sat" text="Sat"/>
+      <l:template name="Sun" text="Sun"/>
+   </l:context>
+
+   <l:context name="htmlhelp">
+      <l:template name="langcode" text="0x0409 English (UNITED STATES)"/>
+   </l:context>
+
+   <l:letters>
+      <l:l i="-1"/>
+      <l:l i="0">Symbols</l:l>
+      <l:l i="10">A</l:l>
+      <l:l i="10">a</l:l>
+      <l:l i="10">&#192;</l:l>
+      <l:l i="10">&#224;</l:l>
+      <l:l i="10">&#193;</l:l>
+      <l:l i="10">&#225;</l:l>
+      <l:l i="10">&#194;</l:l>
+      <l:l i="10">&#226;</l:l>
+      <l:l i="10">&#195;</l:l>
+      <l:l i="10">&#227;</l:l>
+      <l:l i="10">&#196;</l:l>
+      <l:l i="10">&#228;</l:l>
+      <l:l i="10">&#197;</l:l>
+      <l:l i="10">&#229;</l:l>
+      <l:l i="10">&#256;</l:l>
+      <l:l i="10">&#257;</l:l>
+      <l:l i="10">&#258;</l:l>
+      <l:l i="10">&#259;</l:l>
+      <l:l i="10">&#260;</l:l>
+      <l:l i="10">&#261;</l:l>
+      <l:l i="10">&#461;</l:l>
+      <l:l i="10">&#462;</l:l>
+      <l:l i="10">&#478;</l:l>
+      <l:l i="10">&#479;</l:l>
+      <l:l i="10">&#480;</l:l>
+      <l:l i="10">&#481;</l:l>
+      <l:l i="10">&#506;</l:l>
+      <l:l i="10">&#507;</l:l>
+      <l:l i="10">&#512;</l:l>
+      <l:l i="10">&#513;</l:l>
+      <l:l i="10">&#514;</l:l>
+      <l:l i="10">&#515;</l:l>
+      <l:l i="10">&#550;</l:l>
+      <l:l i="10">&#551;</l:l>
+      <l:l i="10">&#7680;</l:l>
+      <l:l i="10">&#7681;</l:l>
+      <l:l i="10">&#7834;</l:l>
+      <l:l i="10">&#7840;</l:l>
+      <l:l i="10">&#7841;</l:l>
+      <l:l i="10">&#7842;</l:l>
+      <l:l i="10">&#7843;</l:l>
+      <l:l i="10">&#7844;</l:l>
+      <l:l i="10">&#7845;</l:l>
+      <l:l i="10">&#7846;</l:l>
+      <l:l i="10">&#7847;</l:l>
+      <l:l i="10">&#7848;</l:l>
+      <l:l i="10">&#7849;</l:l>
+      <l:l i="10">&#7850;</l:l>
+      <l:l i="10">&#7851;</l:l>
+      <l:l i="10">&#7852;</l:l>
+      <l:l i="10">&#7853;</l:l>
+      <l:l i="10">&#7854;</l:l>
+      <l:l i="10">&#7855;</l:l>
+      <l:l i="10">&#7856;</l:l>
+      <l:l i="10">&#7857;</l:l>
+      <l:l i="10">&#7858;</l:l>
+      <l:l i="10">&#7859;</l:l>
+      <l:l i="10">&#7860;</l:l>
+      <l:l i="10">&#7861;</l:l>
+      <l:l i="10">&#7862;</l:l>
+      <l:l i="10">&#7863;</l:l>
+      <l:l i="20">B</l:l>
+      <l:l i="20">b</l:l>
+      <l:l i="20">&#384;</l:l>
+      <l:l i="20">&#385;</l:l>
+      <l:l i="20">&#595;</l:l>
+      <l:l i="20">&#386;</l:l>
+      <l:l i="20">&#387;</l:l>
+      <l:l i="20">&#7682;</l:l>
+      <l:l i="20">&#7683;</l:l>
+      <l:l i="20">&#7684;</l:l>
+      <l:l i="20">&#7685;</l:l>
+      <l:l i="20">&#7686;</l:l>
+      <l:l i="20">&#7687;</l:l>
+      <l:l i="30">C</l:l>
+      <l:l i="30">c</l:l>
+      <l:l i="30">&#199;</l:l>
+      <l:l i="30">&#231;</l:l>
+      <l:l i="30">&#262;</l:l>
+      <l:l i="30">&#263;</l:l>
+      <l:l i="30">&#264;</l:l>
+      <l:l i="30">&#265;</l:l>
+      <l:l i="30">&#266;</l:l>
+      <l:l i="30">&#267;</l:l>
+      <l:l i="30">&#268;</l:l>
+      <l:l i="30">&#269;</l:l>
+      <l:l i="30">&#391;</l:l>
+      <l:l i="30">&#392;</l:l>
+      <l:l i="30">&#597;</l:l>
+      <l:l i="30">&#7688;</l:l>
+      <l:l i="30">&#7689;</l:l>
+      <l:l i="40">D</l:l>
+      <l:l i="40">d</l:l>
+      <l:l i="40">&#270;</l:l>
+      <l:l i="40">&#271;</l:l>
+      <l:l i="40">&#272;</l:l>
+      <l:l i="40">&#273;</l:l>
+      <l:l i="40">&#394;</l:l>
+      <l:l i="40">&#599;</l:l>
+      <l:l i="40">&#395;</l:l>
+      <l:l i="40">&#396;</l:l>
+      <l:l i="40">&#453;</l:l>
+      <l:l i="40">&#498;</l:l>
+      <l:l i="40">&#545;</l:l>
+      <l:l i="40">&#598;</l:l>
+      <l:l i="40">&#7690;</l:l>
+      <l:l i="40">&#7691;</l:l>
+      <l:l i="40">&#7692;</l:l>
+      <l:l i="40">&#7693;</l:l>
+      <l:l i="40">&#7694;</l:l>
+      <l:l i="40">&#7695;</l:l>
+      <l:l i="40">&#7696;</l:l>
+      <l:l i="40">&#7697;</l:l>
+      <l:l i="40">&#7698;</l:l>
+      <l:l i="40">&#7699;</l:l>
+      <l:l i="50">E</l:l>
+      <l:l i="50">e</l:l>
+      <l:l i="50">&#200;</l:l>
+      <l:l i="50">&#232;</l:l>
+      <l:l i="50">&#201;</l:l>
+      <l:l i="50">&#233;</l:l>
+      <l:l i="50">&#202;</l:l>
+      <l:l i="50">&#234;</l:l>
+      <l:l i="50">&#203;</l:l>
+      <l:l i="50">&#235;</l:l>
+      <l:l i="50">&#274;</l:l>
+      <l:l i="50">&#275;</l:l>
+      <l:l i="50">&#276;</l:l>
+      <l:l i="50">&#277;</l:l>
+      <l:l i="50">&#278;</l:l>
+      <l:l i="50">&#279;</l:l>
+      <l:l i="50">&#280;</l:l>
+      <l:l i="50">&#281;</l:l>
+      <l:l i="50">&#282;</l:l>
+      <l:l i="50">&#283;</l:l>
+      <l:l i="50">&#516;</l:l>
+      <l:l i="50">&#517;</l:l>
+      <l:l i="50">&#518;</l:l>
+      <l:l i="50">&#519;</l:l>
+      <l:l i="50">&#552;</l:l>
+      <l:l i="50">&#553;</l:l>
+      <l:l i="50">&#7700;</l:l>
+      <l:l i="50">&#7701;</l:l>
+      <l:l i="50">&#7702;</l:l>
+      <l:l i="50">&#7703;</l:l>
+      <l:l i="50">&#7704;</l:l>
+      <l:l i="50">&#7705;</l:l>
+      <l:l i="50">&#7706;</l:l>
+      <l:l i="50">&#7707;</l:l>
+      <l:l i="50">&#7708;</l:l>
+      <l:l i="50">&#7709;</l:l>
+      <l:l i="50">&#7864;</l:l>
+      <l:l i="50">&#7865;</l:l>
+      <l:l i="50">&#7866;</l:l>
+      <l:l i="50">&#7867;</l:l>
+      <l:l i="50">&#7868;</l:l>
+      <l:l i="50">&#7869;</l:l>
+      <l:l i="50">&#7870;</l:l>
+      <l:l i="50">&#7871;</l:l>
+      <l:l i="50">&#7872;</l:l>
+      <l:l i="50">&#7873;</l:l>
+      <l:l i="50">&#7874;</l:l>
+      <l:l i="50">&#7875;</l:l>
+      <l:l i="50">&#7876;</l:l>
+      <l:l i="50">&#7877;</l:l>
+      <l:l i="50">&#7878;</l:l>
+      <l:l i="50">&#7879;</l:l>
+      <l:l i="60">F</l:l>
+      <l:l i="60">f</l:l>
+      <l:l i="60">&#401;</l:l>
+      <l:l i="60">&#402;</l:l>
+      <l:l i="60">&#7710;</l:l>
+      <l:l i="60">&#7711;</l:l>
+      <l:l i="70">G</l:l>
+      <l:l i="70">g</l:l>
+      <l:l i="70">&#284;</l:l>
+      <l:l i="70">&#285;</l:l>
+      <l:l i="70">&#286;</l:l>
+      <l:l i="70">&#287;</l:l>
+      <l:l i="70">&#288;</l:l>
+      <l:l i="70">&#289;</l:l>
+      <l:l i="70">&#290;</l:l>
+      <l:l i="70">&#291;</l:l>
+      <l:l i="70">&#403;</l:l>
+      <l:l i="70">&#608;</l:l>
+      <l:l i="70">&#484;</l:l>
+      <l:l i="70">&#485;</l:l>
+      <l:l i="70">&#486;</l:l>
+      <l:l i="70">&#487;</l:l>
+      <l:l i="70">&#500;</l:l>
+      <l:l i="70">&#501;</l:l>
+      <l:l i="70">&#7712;</l:l>
+      <l:l i="70">&#7713;</l:l>
+      <l:l i="80">H</l:l>
+      <l:l i="80">h</l:l>
+      <l:l i="80">&#292;</l:l>
+      <l:l i="80">&#293;</l:l>
+      <l:l i="80">&#294;</l:l>
+      <l:l i="80">&#295;</l:l>
+      <l:l i="80">&#542;</l:l>
+      <l:l i="80">&#543;</l:l>
+      <l:l i="80">&#614;</l:l>
+      <l:l i="80">&#7714;</l:l>
+      <l:l i="80">&#7715;</l:l>
+      <l:l i="80">&#7716;</l:l>
+      <l:l i="80">&#7717;</l:l>
+      <l:l i="80">&#7718;</l:l>
+      <l:l i="80">&#7719;</l:l>
+      <l:l i="80">&#7720;</l:l>
+      <l:l i="80">&#7721;</l:l>
+      <l:l i="80">&#7722;</l:l>
+      <l:l i="80">&#7723;</l:l>
+      <l:l i="80">&#7830;</l:l>
+      <l:l i="90">I</l:l>
+      <l:l i="90">i</l:l>
+      <l:l i="90">&#204;</l:l>
+      <l:l i="90">&#236;</l:l>
+      <l:l i="90">&#205;</l:l>
+      <l:l i="90">&#237;</l:l>
+      <l:l i="90">&#206;</l:l>
+      <l:l i="90">&#238;</l:l>
+      <l:l i="90">&#207;</l:l>
+      <l:l i="90">&#239;</l:l>
+      <l:l i="90">&#296;</l:l>
+      <l:l i="90">&#297;</l:l>
+      <l:l i="90">&#298;</l:l>
+      <l:l i="90">&#299;</l:l>
+      <l:l i="90">&#300;</l:l>
+      <l:l i="90">&#301;</l:l>
+      <l:l i="90">&#302;</l:l>
+      <l:l i="90">&#303;</l:l>
+      <l:l i="90">&#304;</l:l>
+      <l:l i="90">&#407;</l:l>
+      <l:l i="90">&#616;</l:l>
+      <l:l i="90">&#463;</l:l>
+      <l:l i="90">&#464;</l:l>
+      <l:l i="90">&#520;</l:l>
+      <l:l i="90">&#521;</l:l>
+      <l:l i="90">&#522;</l:l>
+      <l:l i="90">&#523;</l:l>
+      <l:l i="90">&#7724;</l:l>
+      <l:l i="90">&#7725;</l:l>
+      <l:l i="90">&#7726;</l:l>
+      <l:l i="90">&#7727;</l:l>
+      <l:l i="90">&#7880;</l:l>
+      <l:l i="90">&#7881;</l:l>
+      <l:l i="90">&#7882;</l:l>
+      <l:l i="90">&#7883;</l:l>
+      <l:l i="100">J</l:l>
+      <l:l i="100">j</l:l>
+      <l:l i="100">&#308;</l:l>
+      <l:l i="100">&#309;</l:l>
+      <l:l i="100">&#496;</l:l>
+      <l:l i="100">&#669;</l:l>
+      <l:l i="110">K</l:l>
+      <l:l i="110">k</l:l>
+      <l:l i="110">&#310;</l:l>
+      <l:l i="110">&#311;</l:l>
+      <l:l i="110">&#408;</l:l>
+      <l:l i="110">&#409;</l:l>
+      <l:l i="110">&#488;</l:l>
+      <l:l i="110">&#489;</l:l>
+      <l:l i="110">&#7728;</l:l>
+      <l:l i="110">&#7729;</l:l>
+      <l:l i="110">&#7730;</l:l>
+      <l:l i="110">&#7731;</l:l>
+      <l:l i="110">&#7732;</l:l>
+      <l:l i="110">&#7733;</l:l>
+      <l:l i="120">L</l:l>
+      <l:l i="120">l</l:l>
+      <l:l i="120">&#313;</l:l>
+      <l:l i="120">&#314;</l:l>
+      <l:l i="120">&#315;</l:l>
+      <l:l i="120">&#316;</l:l>
+      <l:l i="120">&#317;</l:l>
+      <l:l i="120">&#318;</l:l>
+      <l:l i="120">&#319;</l:l>
+      <l:l i="120">&#320;</l:l>
+      <l:l i="120">&#321;</l:l>
+      <l:l i="120">&#322;</l:l>
+      <l:l i="120">&#410;</l:l>
+      <l:l i="120">&#456;</l:l>
+      <l:l i="120">&#564;</l:l>
+      <l:l i="120">&#619;</l:l>
+      <l:l i="120">&#620;</l:l>
+      <l:l i="120">&#621;</l:l>
+      <l:l i="120">&#7734;</l:l>
+      <l:l i="120">&#7735;</l:l>
+      <l:l i="120">&#7736;</l:l>
+      <l:l i="120">&#7737;</l:l>
+      <l:l i="120">&#7738;</l:l>
+      <l:l i="120">&#7739;</l:l>
+      <l:l i="120">&#7740;</l:l>
+      <l:l i="120">&#7741;</l:l>
+      <l:l i="130">M</l:l>
+      <l:l i="130">m</l:l>
+      <l:l i="130">&#625;</l:l>
+      <l:l i="130">&#7742;</l:l>
+      <l:l i="130">&#7743;</l:l>
+      <l:l i="130">&#7744;</l:l>
+      <l:l i="130">&#7745;</l:l>
+      <l:l i="130">&#7746;</l:l>
+      <l:l i="130">&#7747;</l:l>
+      <l:l i="140">N</l:l>
+      <l:l i="140">n</l:l>
+      <l:l i="140">&#209;</l:l>
+      <l:l i="140">&#241;</l:l>
+      <l:l i="140">&#323;</l:l>
+      <l:l i="140">&#324;</l:l>
+      <l:l i="140">&#325;</l:l>
+      <l:l i="140">&#326;</l:l>
+      <l:l i="140">&#327;</l:l>
+      <l:l i="140">&#328;</l:l>
+      <l:l i="140">&#413;</l:l>
+      <l:l i="140">&#626;</l:l>
+      <l:l i="140">&#414;</l:l>
+      <l:l i="140">&#544;</l:l>
+      <l:l i="140">&#459;</l:l>
+      <l:l i="140">&#504;</l:l>
+      <l:l i="140">&#505;</l:l>
+      <l:l i="140">&#565;</l:l>
+      <l:l i="140">&#627;</l:l>
+      <l:l i="140">&#7748;</l:l>
+      <l:l i="140">&#7749;</l:l>
+      <l:l i="140">&#7750;</l:l>
+      <l:l i="140">&#7751;</l:l>
+      <l:l i="140">&#7752;</l:l>
+      <l:l i="140">&#7753;</l:l>
+      <l:l i="140">&#7754;</l:l>
+      <l:l i="140">&#7755;</l:l>
+      <l:l i="150">O</l:l>
+      <l:l i="150">o</l:l>
+      <l:l i="150">&#210;</l:l>
+      <l:l i="150">&#242;</l:l>
+      <l:l i="150">&#211;</l:l>
+      <l:l i="150">&#243;</l:l>
+      <l:l i="150">&#212;</l:l>
+      <l:l i="150">&#244;</l:l>
+      <l:l i="150">&#213;</l:l>
+      <l:l i="150">&#245;</l:l>
+      <l:l i="150">&#214;</l:l>
+      <l:l i="150">&#246;</l:l>
+      <l:l i="150">&#216;</l:l>
+      <l:l i="150">&#248;</l:l>
+      <l:l i="150">&#332;</l:l>
+      <l:l i="150">&#333;</l:l>
+      <l:l i="150">&#334;</l:l>
+      <l:l i="150">&#335;</l:l>
+      <l:l i="150">&#336;</l:l>
+      <l:l i="150">&#337;</l:l>
+      <l:l i="150">&#415;</l:l>
+      <l:l i="150">&#416;</l:l>
+      <l:l i="150">&#417;</l:l>
+      <l:l i="150">&#465;</l:l>
+      <l:l i="150">&#466;</l:l>
+      <l:l i="150">&#490;</l:l>
+      <l:l i="150">&#491;</l:l>
+      <l:l i="150">&#492;</l:l>
+      <l:l i="150">&#493;</l:l>
+      <l:l i="150">&#510;</l:l>
+      <l:l i="150">&#511;</l:l>
+      <l:l i="150">&#524;</l:l>
+      <l:l i="150">&#525;</l:l>
+      <l:l i="150">&#526;</l:l>
+      <l:l i="150">&#527;</l:l>
+      <l:l i="150">&#554;</l:l>
+      <l:l i="150">&#555;</l:l>
+      <l:l i="150">&#556;</l:l>
+      <l:l i="150">&#557;</l:l>
+      <l:l i="150">&#558;</l:l>
+      <l:l i="150">&#559;</l:l>
+      <l:l i="150">&#560;</l:l>
+      <l:l i="150">&#561;</l:l>
+      <l:l i="150">&#7756;</l:l>
+      <l:l i="150">&#7757;</l:l>
+      <l:l i="150">&#7758;</l:l>
+      <l:l i="150">&#7759;</l:l>
+      <l:l i="150">&#7760;</l:l>
+      <l:l i="150">&#7761;</l:l>
+      <l:l i="150">&#7762;</l:l>
+      <l:l i="150">&#7763;</l:l>
+      <l:l i="150">&#7884;</l:l>
+      <l:l i="150">&#7885;</l:l>
+      <l:l i="150">&#7886;</l:l>
+      <l:l i="150">&#7887;</l:l>
+      <l:l i="150">&#7888;</l:l>
+      <l:l i="150">&#7889;</l:l>
+      <l:l i="150">&#7890;</l:l>
+      <l:l i="150">&#7891;</l:l>
+      <l:l i="150">&#7892;</l:l>
+      <l:l i="150">&#7893;</l:l>
+      <l:l i="150">&#7894;</l:l>
+      <l:l i="150">&#7895;</l:l>
+      <l:l i="150">&#7896;</l:l>
+      <l:l i="150">&#7897;</l:l>
+      <l:l i="150">&#7898;</l:l>
+      <l:l i="150">&#7899;</l:l>
+      <l:l i="150">&#7900;</l:l>
+      <l:l i="150">&#7901;</l:l>
+      <l:l i="150">&#7902;</l:l>
+      <l:l i="150">&#7903;</l:l>
+      <l:l i="150">&#7904;</l:l>
+      <l:l i="150">&#7905;</l:l>
+      <l:l i="150">&#7906;</l:l>
+      <l:l i="150">&#7907;</l:l>
+      <l:l i="160">P</l:l>
+      <l:l i="160">p</l:l>
+      <l:l i="160">&#420;</l:l>
+      <l:l i="160">&#421;</l:l>
+      <l:l i="160">&#7764;</l:l>
+      <l:l i="160">&#7765;</l:l>
+      <l:l i="160">&#7766;</l:l>
+      <l:l i="160">&#7767;</l:l>
+      <l:l i="170">Q</l:l>
+      <l:l i="170">q</l:l>
+      <l:l i="170">&#672;</l:l>
+      <l:l i="180">R</l:l>
+      <l:l i="180">r</l:l>
+      <l:l i="180">&#340;</l:l>
+      <l:l i="180">&#341;</l:l>
+      <l:l i="180">&#342;</l:l>
+      <l:l i="180">&#343;</l:l>
+      <l:l i="180">&#344;</l:l>
+      <l:l i="180">&#345;</l:l>
+      <l:l i="180">&#528;</l:l>
+      <l:l i="180">&#529;</l:l>
+      <l:l i="180">&#530;</l:l>
+      <l:l i="180">&#531;</l:l>
+      <l:l i="180">&#636;</l:l>
+      <l:l i="180">&#637;</l:l>
+      <l:l i="180">&#638;</l:l>
+      <l:l i="180">&#7768;</l:l>
+      <l:l i="180">&#7769;</l:l>
+      <l:l i="180">&#7770;</l:l>
+      <l:l i="180">&#7771;</l:l>
+      <l:l i="180">&#7772;</l:l>
+      <l:l i="180">&#7773;</l:l>
+      <l:l i="180">&#7774;</l:l>
+      <l:l i="180">&#7775;</l:l>
+      <l:l i="190">S</l:l>
+      <l:l i="190">s</l:l>
+      <l:l i="190">&#346;</l:l>
+      <l:l i="190">&#347;</l:l>
+      <l:l i="190">&#348;</l:l>
+      <l:l i="190">&#349;</l:l>
+      <l:l i="190">&#350;</l:l>
+      <l:l i="190">&#351;</l:l>
+      <l:l i="190">&#352;</l:l>
+      <l:l i="190">&#353;</l:l>
+      <l:l i="190">&#536;</l:l>
+      <l:l i="190">&#537;</l:l>
+      <l:l i="190">&#642;</l:l>
+      <l:l i="190">&#7776;</l:l>
+      <l:l i="190">&#7777;</l:l>
+      <l:l i="190">&#7778;</l:l>
+      <l:l i="190">&#7779;</l:l>
+      <l:l i="190">&#7780;</l:l>
+      <l:l i="190">&#7781;</l:l>
+      <l:l i="190">&#7782;</l:l>
+      <l:l i="190">&#7783;</l:l>
+      <l:l i="190">&#7784;</l:l>
+      <l:l i="190">&#7785;</l:l>
+      <l:l i="200">T</l:l>
+      <l:l i="200">t</l:l>
+      <l:l i="200">&#354;</l:l>
+      <l:l i="200">&#355;</l:l>
+      <l:l i="200">&#356;</l:l>
+      <l:l i="200">&#357;</l:l>
+      <l:l i="200">&#358;</l:l>
+      <l:l i="200">&#359;</l:l>
+      <l:l i="200">&#427;</l:l>
+      <l:l i="200">&#428;</l:l>
+      <l:l i="200">&#429;</l:l>
+      <l:l i="200">&#430;</l:l>
+      <l:l i="200">&#648;</l:l>
+      <l:l i="200">&#538;</l:l>
+      <l:l i="200">&#539;</l:l>
+      <l:l i="200">&#566;</l:l>
+      <l:l i="200">&#7786;</l:l>
+      <l:l i="200">&#7787;</l:l>
+      <l:l i="200">&#7788;</l:l>
+      <l:l i="200">&#7789;</l:l>
+      <l:l i="200">&#7790;</l:l>
+      <l:l i="200">&#7791;</l:l>
+      <l:l i="200">&#7792;</l:l>
+      <l:l i="200">&#7793;</l:l>
+      <l:l i="200">&#7831;</l:l>
+      <l:l i="210">U</l:l>
+      <l:l i="210">u</l:l>
+      <l:l i="210">&#217;</l:l>
+      <l:l i="210">&#249;</l:l>
+      <l:l i="210">&#218;</l:l>
+      <l:l i="210">&#250;</l:l>
+      <l:l i="210">&#219;</l:l>
+      <l:l i="210">&#251;</l:l>
+      <l:l i="210">&#220;</l:l>
+      <l:l i="210">&#252;</l:l>
+      <l:l i="210">&#360;</l:l>
+      <l:l i="210">&#361;</l:l>
+      <l:l i="210">&#362;</l:l>
+      <l:l i="210">&#363;</l:l>
+      <l:l i="210">&#364;</l:l>
+      <l:l i="210">&#365;</l:l>
+      <l:l i="210">&#366;</l:l>
+      <l:l i="210">&#367;</l:l>
+      <l:l i="210">&#368;</l:l>
+      <l:l i="210">&#369;</l:l>
+      <l:l i="210">&#370;</l:l>
+      <l:l i="210">&#371;</l:l>
+      <l:l i="210">&#431;</l:l>
+      <l:l i="210">&#432;</l:l>
+      <l:l i="210">&#467;</l:l>
+      <l:l i="210">&#468;</l:l>
+      <l:l i="210">&#469;</l:l>
+      <l:l i="210">&#470;</l:l>
+      <l:l i="210">&#471;</l:l>
+      <l:l i="210">&#472;</l:l>
+      <l:l i="210">&#473;</l:l>
+      <l:l i="210">&#474;</l:l>
+      <l:l i="210">&#475;</l:l>
+      <l:l i="210">&#476;</l:l>
+      <l:l i="210">&#532;</l:l>
+      <l:l i="210">&#533;</l:l>
+      <l:l i="210">&#534;</l:l>
+      <l:l i="210">&#535;</l:l>
+      <l:l i="210">&#7794;</l:l>
+      <l:l i="210">&#7795;</l:l>
+      <l:l i="210">&#7796;</l:l>
+      <l:l i="210">&#7797;</l:l>
+      <l:l i="210">&#7798;</l:l>
+      <l:l i="210">&#7799;</l:l>
+      <l:l i="210">&#7800;</l:l>
+      <l:l i="210">&#7801;</l:l>
+      <l:l i="210">&#7802;</l:l>
+      <l:l i="210">&#7803;</l:l>
+      <l:l i="210">&#7908;</l:l>
+      <l:l i="210">&#7909;</l:l>
+      <l:l i="210">&#7910;</l:l>
+      <l:l i="210">&#7911;</l:l>
+      <l:l i="210">&#7912;</l:l>
+      <l:l i="210">&#7913;</l:l>
+      <l:l i="210">&#7914;</l:l>
+      <l:l i="210">&#7915;</l:l>
+      <l:l i="210">&#7916;</l:l>
+      <l:l i="210">&#7917;</l:l>
+      <l:l i="210">&#7918;</l:l>
+      <l:l i="210">&#7919;</l:l>
+      <l:l i="210">&#7920;</l:l>
+      <l:l i="210">&#7921;</l:l>
+      <l:l i="220">V</l:l>
+      <l:l i="220">v</l:l>
+      <l:l i="220">&#434;</l:l>
+      <l:l i="220">&#651;</l:l>
+      <l:l i="220">&#7804;</l:l>
+      <l:l i="220">&#7805;</l:l>
+      <l:l i="220">&#7806;</l:l>
+      <l:l i="220">&#7807;</l:l>
+      <l:l i="230">W</l:l>
+      <l:l i="230">w</l:l>
+      <l:l i="230">&#372;</l:l>
+      <l:l i="230">&#373;</l:l>
+      <l:l i="230">&#7808;</l:l>
+      <l:l i="230">&#7809;</l:l>
+      <l:l i="230">&#7810;</l:l>
+      <l:l i="230">&#7811;</l:l>
+      <l:l i="230">&#7812;</l:l>
+      <l:l i="230">&#7813;</l:l>
+      <l:l i="230">&#7814;</l:l>
+      <l:l i="230">&#7815;</l:l>
+      <l:l i="230">&#7816;</l:l>
+      <l:l i="230">&#7817;</l:l>
+      <l:l i="230">&#7832;</l:l>
+      <l:l i="240">X</l:l>
+      <l:l i="240">x</l:l>
+      <l:l i="240">&#7818;</l:l>
+      <l:l i="240">&#7819;</l:l>
+      <l:l i="240">&#7820;</l:l>
+      <l:l i="240">&#7821;</l:l>
+      <l:l i="250">Y</l:l>
+      <l:l i="250">y</l:l>
+      <l:l i="250">&#221;</l:l>
+      <l:l i="250">&#253;</l:l>
+      <l:l i="250">&#255;</l:l>
+      <l:l i="250">&#376;</l:l>
+      <l:l i="250">&#374;</l:l>
+      <l:l i="250">&#375;</l:l>
+      <l:l i="250">&#435;</l:l>
+      <l:l i="250">&#436;</l:l>
+      <l:l i="250">&#562;</l:l>
+      <l:l i="250">&#563;</l:l>
+      <l:l i="250">&#7822;</l:l>
+      <l:l i="250">&#7823;</l:l>
+      <l:l i="250">&#7833;</l:l>
+      <l:l i="250">&#7922;</l:l>
+      <l:l i="250">&#7923;</l:l>
+      <l:l i="250">&#7924;</l:l>
+      <l:l i="250">&#7925;</l:l>
+      <l:l i="250">&#7926;</l:l>
+      <l:l i="250">&#7927;</l:l>
+      <l:l i="250">&#7928;</l:l>
+      <l:l i="250">&#7929;</l:l>
+      <l:l i="260">Z</l:l>
+      <l:l i="260">z</l:l>
+      <l:l i="260">&#377;</l:l>
+      <l:l i="260">&#378;</l:l>
+      <l:l i="260">&#379;</l:l>
+      <l:l i="260">&#380;</l:l>
+      <l:l i="260">&#381;</l:l>
+      <l:l i="260">&#382;</l:l>
+      <l:l i="260">&#437;</l:l>
+      <l:l i="260">&#438;</l:l>
+      <l:l i="260">&#548;</l:l>
+      <l:l i="260">&#549;</l:l>
+      <l:l i="260">&#656;</l:l>
+      <l:l i="260">&#657;</l:l>
+      <l:l i="260">&#7824;</l:l>
+      <l:l i="260">&#7825;</l:l>
+      <l:l i="260">&#7826;</l:l>
+      <l:l i="260">&#7827;</l:l>
+      <l:l i="260">&#7828;</l:l>
+      <l:l i="260">&#7829;</l:l>
+   </l:letters>
+</l:l10n>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/es.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/es.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/es.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,600 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="es" english-language-name="Spanish">
+
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+   <l:gentext key="Abstract" text="Resumen"/>
+   <l:gentext key="abstract" text="resumen"/>
+   <l:gentext key="Answer" text="R:"/>
+   <l:gentext key="answer" text="r:"/>
+   <l:gentext key="Appendix" text="Ap&#233;ndice"/>
+   <l:gentext key="appendix" text="ap&#233;ndice"/>
+   <l:gentext key="Article" text="Art&#237;culo"/>
+   <l:gentext key="article" text="art&#237;culo"/>
+   <l:gentext key="Bibliography" text="Bibliograf&#237;a"/>
+   <l:gentext key="bibliography" text="bibliograf&#237;a"/>
+   <l:gentext key="Book" text="Libro"/>
+   <l:gentext key="book" text="libro"/>
+   <l:gentext key="CAUTION" text="ATENCI&#211;N"/>
+   <l:gentext key="Caution" text="Atenci&#243;n"/>
+   <l:gentext key="caution" text="atenci&#243;n"/>
+   <l:gentext key="Chapter" text="Cap&#237;tulo"/>
+   <l:gentext key="chapter" text="cap&#237;tulo"/>
+   <l:gentext key="Colophon" text="Colof&#243;n"/>
+   <l:gentext key="colophon" text="colof&#243;n"/>
+   <l:gentext key="Copyright" text="Copyright"/>
+   <l:gentext key="copyright" text="copyright"/>
+   <l:gentext key="Dedication" text="Dedicatoria"/>
+   <l:gentext key="dedication" text="dedicatoria"/>
+   <l:gentext key="Edition" text="Edici&#243;n"/>
+   <l:gentext key="edition" text="edici&#243;n"/>
+   <l:gentext key="Equation" text="Ecuaci&#243;n"/>
+   <l:gentext key="equation" text="ecuaci&#243;n"/>
+   <l:gentext key="Example" text="Ejemplo"/>
+   <l:gentext key="example" text="ejemplo"/>
+   <l:gentext key="Figure" text="Figura"/>
+   <l:gentext key="figure" text="figura"/>
+   <l:gentext key="Glossary" text="Glosario"/>
+   <l:gentext key="glossary" text="glosario"/>
+   <l:gentext key="GlossSee" text="Ver"/>
+   <l:gentext key="glosssee" text="ver"/>
+   <l:gentext key="GlossSeeAlso" text="Ver tambi&#233;n"/>
+   <l:gentext key="glossseealso" text="ver tambi&#233;n"/>
+   <l:gentext key="IMPORTANT" text="IMPORTANTE"/>
+   <l:gentext key="important" text="importante"/>
+   <l:gentext key="Important" text="Importante"/>
+   <l:gentext key="Index" text="&#205;ndice"/>
+   <l:gentext key="index" text="&#237;ndice"/>
+   <l:gentext key="ISBN" text="ISBN"/>
+   <l:gentext key="isbn" text="isbn"/>
+   <l:gentext key="LegalNotice" text="Aviso Legal"/>
+   <l:gentext key="legalnotice" text="aviso legal"/>
+   <l:gentext key="MsgAud" text="Audiencia"/>
+   <l:gentext key="msgaud" text="audiencia"/>
+   <l:gentext key="MsgLevel" text="Nivel"/>
+   <l:gentext key="msglevel" text="nivel"/>
+   <l:gentext key="MsgOrig" text="Origen"/>
+   <l:gentext key="msgorig" text="origen"/>
+   <l:gentext key="NOTE" text="NOTA"/>
+   <l:gentext key="Note" text="Nota"/>
+   <l:gentext key="note" text="nota"/>
+   <l:gentext key="Part" text="Parte"/>
+   <l:gentext key="part" text="parte"/>
+   <l:gentext key="Preface" text="Prefacio"/>
+   <l:gentext key="preface" text="prefacio"/>
+   <l:gentext key="Procedure" text="Procedimiento"/>
+   <l:gentext key="procedure" text="procedimiento"/>
+   <l:gentext key="ProductionSet" text="Producci&#243;n"/>
+   <l:gentext key="PubDate" text="Fecha de publicaci&#243;n"/>
+   <l:gentext key="pubdate" text="fecha de publicaci&#243;n"/>
+   <l:gentext key="Published" text="Publicado"/>
+   <l:gentext key="published" text="publicado"/>
+   <l:gentext key="Qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="Question" text="P:"/>
+   <l:gentext key="question" text="p:"/>
+   <l:gentext key="RefEntry" text="Entrada de referencia"/>
+   <l:gentext key="refentry" text="entrada de referencia"/>
+   <l:gentext key="Reference" text="Referencia"/>
+   <l:gentext key="reference" text="referencia"/>
+   <l:gentext key="RefName" text="Nombre de referencia"/>
+   <l:gentext key="refname" text="nombre de referencia"/>
+   <l:gentext key="RefSection" text="Secci&#243;n de referencia"/>
+   <l:gentext key="refsection" text="secci&#243;n de referencia"/>
+   <l:gentext key="RefSynopsisDiv" text="Sinopsis"/>
+   <l:gentext key="refsynopsisdiv" text="sinopsis"/>
+   <l:gentext key="RevHistory" text="Historial de revisiones"/>
+   <l:gentext key="revhistory" text="Historial de revisiones"/>
+   <l:gentext key="revision" text="revisi&#243;n"/>
+   <l:gentext key="Revision" text="Revisi&#243;n"/>
+   <l:gentext key="sect1" text="Secci&#243;n"/>
+   <l:gentext key="sect2" text="Secci&#243;n"/>
+   <l:gentext key="sect3" text="Secci&#243;n"/>
+   <l:gentext key="sect4" text="Secci&#243;n"/>
+   <l:gentext key="sect5" text="Secci&#243;n"/>
+   <l:gentext key="section" text="secci&#243;n"/>
+   <l:gentext key="Section" text="Secci&#243;n"/>
+   <l:gentext key="see" text="ver"/>
+   <l:gentext key="See" text="Ver"/>
+   <l:gentext key="seealso" text="ver tambi&#233;n"/>
+   <l:gentext key="Seealso" text="Ver tambi&#233;n"/>
+   <l:gentext key="SeeAlso" text="Ver Tambi&#233;n"/>
+   <l:gentext key="set" text="conjunto"/>
+   <l:gentext key="Set" text="Conjunto"/>
+   <l:gentext key="setindex" text="&#237;ndice del conjunto"/>
+   <l:gentext key="SetIndex" text="&#205;ndice del Conjunto"/>
+   <l:gentext key="Sidebar" text="Barra lateral"/>
+   <l:gentext key="sidebar" text="barra lateral"/>
+   <l:gentext key="step" text="paso"/>
+   <l:gentext key="Step" text="Paso"/>
+   <l:gentext key="Table" text="Tabla"/>
+   <l:gentext key="table" text="tabla"/>
+   <l:gentext key="tip" text="sugerencia"/>
+   <l:gentext key="TIP" text="SUGERENCIA"/>
+   <l:gentext key="Tip" text="Sugerencia"/>
+   <l:gentext key="Warning" text="Aviso"/>
+   <l:gentext key="warning" text="aviso"/>
+   <l:gentext key="WARNING" text="AVISO"/>
+   <l:gentext key="and" text="y"/>
+   <l:gentext key="by" text="por"/>
+   <l:gentext key="called" text="called" lang="en"/>
+   <l:gentext key="Edited" text="Editado"/>
+   <l:gentext key="edited" text="editado"/>
+   <l:gentext key="Editedby" text="Editado por"/>
+   <l:gentext key="editedby" text="editado por"/>
+   <l:gentext key="in" text="en"/>
+   <l:gentext key="lastlistcomma" text=","/>
+   <l:gentext key="listcomma" text=","/>
+   <l:gentext key="nonexistantelement" text="elemento inexistente"/>
+   <l:gentext key="notes" text="notas"/>
+   <l:gentext key="Notes" text="Notas"/>
+   <l:gentext key="Pgs" text="Pags."/>
+   <l:gentext key="pgs" text="pags."/>
+   <l:gentext key="Revisedby" text="Revisado por: "/>
+   <l:gentext key="revisedby" text="revisado por: "/>
+   <l:gentext key="TableNotes" text="Notas de Tabla"/>
+   <l:gentext key="tablenotes" text="notas de tabla"/>
+   <l:gentext key="TableofContents" text="Tabla de contenidos"/>
+   <l:gentext key="tableofcontents" text="tabla de contenidos"/>
+   <l:gentext key="the" text="" lang="en"/>
+   <l:gentext key="unexpectedelementname" text="nombre de elemento inesperado"/>
+   <l:gentext key="unsupported" text="no soportado"/>
+   <l:gentext key="xrefto" text="referencia a"/>
+   <l:gentext key="listofequations" text="lista de ecuaciones"/>
+   <l:gentext key="ListofEquations" text="Lista de ecuaciones"/>
+   <l:gentext key="ListofExamples" text="Lista de ejemplos"/>
+   <l:gentext key="listofexamples" text="lista de ejemplos"/>
+   <l:gentext key="ListofFigures" text="Lista de figuras"/>
+   <l:gentext key="listoffigures" text="lista de figuras"/>
+   <l:gentext key="ListofProcedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listofprocedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listoftables" text="lista de tablas"/>
+   <l:gentext key="ListofTables" text="Lista de tablas"/>
+   <l:gentext key="ListofUnknown" text="Lista de desconocido"/>
+   <l:gentext key="listofunknown" text="lista de desconocido"/>
+   <l:gentext key="nav-home" text="Inicio"/>
+   <l:gentext key="nav-next" text="Siguiente"/>
+   <l:gentext key="nav-next-sibling" text="Avanzar"/>
+   <l:gentext key="nav-prev" text="Anterior"/>
+   <l:gentext key="nav-prev-sibling" text="Retroceder"/>
+   <l:gentext key="nav-up" text="Subir"/>
+   <l:gentext key="nav-toc" text="ToC" lang="en"/>
+   <l:gentext key="Draft" text="Borrador"/>
+   <l:gentext key="above" text="arriba"/>
+   <l:gentext key="below" text="abajo"/>
+   <l:gentext key="sectioncalled" text="secci&#243;n llamada"/>
+   <l:gentext key="index symbols" text="S&#237;mbolos"/>
+   <l:gentext key="lowercase.alpha" text="abcdefghijklmnopqrstuvwxyz&#225;&#233;&#237;&#243;&#250;&#241;"/>
+   <l:gentext key="uppercase.alpha" text="ABCDEFGHIJKLMNOPQRSTUVWXYZ&#193;&#201;&#205;&#211;&#218;&#209;"/>
+   <l:dingbat key="startquote" text="&#8220;"/>
+   <l:dingbat key="endquote" text="&#8221;"/>
+   <l:dingbat key="nestedstartquote" text="&#8216;"/>
+   <l:dingbat key="nestedendquote" text="&#8217;"/>
+   <l:dingbat key="singlestartquote" text="&#8216;" lang="en"/>
+   <l:dingbat key="singleendquote" text="&#8217;" lang="en"/>
+   <l:dingbat key="bullet" text="&#8226;"/>
+   <l:gentext key="hyphenation-character" text="-" lang="en"/>
+   <l:gentext key="hyphenation-push-character-count" text="2" lang="en"/>
+   <l:gentext key="hyphenation-remain-character-count" text="2" lang="en"/>
+
+   <l:context name="styles">
+      <l:template name="person-name" text="first-last"/>
+   </l:context>
+
+   <l:context name="title">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="%t"/>
+      <l:template name="appendix" text="Ap&#233;ndice %n. %t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="biblioentry" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliolist" text="%t" lang="en"/>
+      <l:template name="bibliomixed" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="Cap&#237;tulo %n. %t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="Ecuaci&#243;n %n. %t"/>
+      <l:template name="example" text="Ejemplo %n. %t"/>
+      <l:template name="figure" text="Figura %n. %t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="glosslist" text="%t" lang="en"/>
+      <l:template name="glossentry" text="%t" lang="en"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text=""/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="Parte %n. %t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="procedure.formal" text="Procedimiento %n. %t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="productionset.formal" text="Producci&#243;n %n"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="%t"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="%t"/>
+      <l:template name="refentry" text="%t"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsection" text="%t"/>
+      <l:template name="refsect1" text="%t"/>
+      <l:template name="refsect2" text="%t"/>
+      <l:template name="refsect3" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="refsynopsisdivinfo" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="step" text="%t"/>
+      <l:template name="table" text="Tabla %n. %t"/>
+      <l:template name="task" text="%t" lang="en"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="" lang="en"/>
+      <l:template name="warning" text="%t"/>
+   </l:context>
+
+   <l:context name="title-unnumbered">
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article/appendix" text="%t" lang="en"/>
+      <l:template name="bridgehead" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="sect1" text="%t"/>
+      <l:template name="sect2" text="%t"/>
+      <l:template name="sect3" text="%t"/>
+      <l:template name="sect4" text="%t"/>
+      <l:template name="sect5" text="%t"/>
+      <l:template name="section" text="%t"/>
+      <l:template name="simplesect" text="%t"/>
+   </l:context>
+
+   <l:context name="title-numbered">
+      <l:template name="appendix" text="Ap&#233;ndice %n. %t"/>
+      <l:template name="article/appendix" text="%n.&#160;%t" lang="en"/>
+      <l:template name="bridgehead" text="%n. %t"/>
+      <l:template name="chapter" text="Cap&#237;tulo %n. %t"/>
+      <l:template name="sect1" text="%n. %t"/>
+      <l:template name="sect2" text="%n. %t"/>
+      <l:template name="sect3" text="%n. %t"/>
+      <l:template name="sect4" text="%n. %t"/>
+      <l:template name="sect5" text="%n. %t"/>
+      <l:template name="section" text="%n. %t"/>
+      <l:template name="simplesect" text="%t"/>
+   </l:context>
+
+   <l:context name="subtitle">
+      <l:template name="appendix" text="%s"/>
+      <l:template name="article" text="%s"/>
+      <l:template name="bibliodiv" text="%s"/>
+      <l:template name="biblioentry" text="%s"/>
+      <l:template name="bibliography" text="%s"/>
+      <l:template name="bibliomixed" text="%s"/>
+      <l:template name="bibliomset" text="%s"/>
+      <l:template name="biblioset" text="%s"/>
+      <l:template name="book" text="%s"/>
+      <l:template name="chapter" text="%s"/>
+      <l:template name="colophon" text="%s"/>
+      <l:template name="dedication" text="%s"/>
+      <l:template name="glossary" text="%s"/>
+      <l:template name="glossdiv" text="%s"/>
+      <l:template name="index" text="%s"/>
+      <l:template name="indexdiv" text="%s"/>
+      <l:template name="lot" text="%s"/>
+      <l:template name="part" text="%s"/>
+      <l:template name="partintro" text="%s"/>
+      <l:template name="preface" text="%s"/>
+      <l:template name="refentry" text="%s"/>
+      <l:template name="reference" text="%s"/>
+      <l:template name="refsection" text="%s"/>
+      <l:template name="refsect1" text="%s"/>
+      <l:template name="refsect2" text="%s"/>
+      <l:template name="refsect3" text="%s"/>
+      <l:template name="refsynopsisdiv" text="%s"/>
+      <l:template name="sect1" text="%s"/>
+      <l:template name="sect2" text="%s"/>
+      <l:template name="sect3" text="%s"/>
+      <l:template name="sect4" text="%s"/>
+      <l:template name="sect5" text="%s"/>
+      <l:template name="section" text="%s"/>
+      <l:template name="set" text="%s"/>
+      <l:template name="setindex" text="%s"/>
+      <l:template name="sidebar" text="%s"/>
+      <l:template name="simplesect" text="%s"/>
+      <l:template name="toc" text="%s"/>
+   </l:context>
+
+   <l:context name="xref">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="R:&#160;%n"/>
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="constraintdef" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="%t"/>
+      <l:template name="example" text="%t"/>
+      <l:template name="figure" text="%t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text="%n"/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="%t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="P:&#160;%n"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="P:&#160;%n"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="table" text="%t"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="%n"/>
+      <l:template name="warning" text="%t"/>
+      <l:template name="page.citation" text=" [%p]"/>
+      <l:template name="page" text="(page %p)" lang="en"/>
+      <l:template name="pageabbrev" text="(p. %p)" lang="en"/>
+      <l:template name="Page" text="Page %p" lang="en"/>
+      <l:template name="bridgehead" text="&#8220;%t&#8221;"/>
+      <l:template name="refsection" text="&#8220;%t&#8221;"/>
+      <l:template name="refsect1" text="&#8220;%t&#8221;"/>
+      <l:template name="refsect2" text="&#8220;%t&#8221;"/>
+      <l:template name="refsect3" text="&#8220;%t&#8221;"/>
+      <l:template name="sect1" text="&#8220;%t&#8221;"/>
+      <l:template name="sect2" text="&#8220;%t&#8221;"/>
+      <l:template name="sect3" text="&#8220;%t&#8221;"/>
+      <l:template name="sect4" text="&#8220;%t&#8221;"/>
+      <l:template name="sect5" text="&#8220;%t&#8221;"/>
+      <l:template name="section" text="&#8220;%t&#8221;"/>
+      <l:template name="simplesect" text="&#8220;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="xref-number">
+      <l:template name="answer" text="R:&#160;%n"/>
+      <l:template name="appendix" text="Ap&#233;ndice&#160;%n"/>
+      <l:template name="bridgehead" text="Secci&#243;n&#160;%n"/>
+      <l:template name="chapter" text="Cap&#237;tulo&#160;%n"/>
+      <l:template name="equation" text="Ecuaci&#243;n&#160;%n"/>
+      <l:template name="example" text="Ejemplo&#160;%n"/>
+      <l:template name="figure" text="Figura&#160;%n"/>
+      <l:template name="part" text="Parte&#160;%n"/>
+      <l:template name="procedure" text="Procedimiento&#160;%n"/>
+      <l:template name="productionset" text="Producci&#243;n&#160;%n"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n"/>
+      <l:template name="qandaentry" text="P:&#160;%n"/>
+      <l:template name="question" text="P:&#160;%n"/>
+      <l:template name="sect1" text="Secci&#243;n&#160;%n"/>
+      <l:template name="sect2" text="Secci&#243;n&#160;%n"/>
+      <l:template name="sect3" text="Secci&#243;n&#160;%n"/>
+      <l:template name="sect4" text="Secci&#243;n&#160;%n"/>
+      <l:template name="sect5" text="Secci&#243;n&#160;%n"/>
+      <l:template name="section" text="Secci&#243;n&#160;%n"/>
+      <l:template name="table" text="Tabla&#160;%n"/>
+   </l:context>
+
+   <l:context name="xref-number-and-title">
+      <l:template name="appendix" text="Ap&#233;ndice&#160;%n, %t"/>
+      <l:template name="bridgehead" text="Secci&#243;n&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="chapter" text="Cap&#237;tulo&#160;%n, %t"/>
+      <l:template name="equation" text="Ecuaci&#243;n&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="example" text="Ejemplo&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="figure" text="Figura&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="part" text="Parte&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="procedure" text="Procedimiento&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="productionset" text="Producci&#243;n&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="refsect1" text="secci&#243;n llamada &#8220;%t&#8221;"/>
+      <l:template name="refsect2" text="secci&#243;n llamada &#8220;%t&#8221;"/>
+      <l:template name="refsect3" text="secci&#243;n llamada &#8220;%t&#8221;"/>
+      <l:template name="refsection" text="secci&#243;n llamada &#8220;%t&#8221;"/>
+      <l:template name="sect1" text="Secci&#243;n&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect2" text="Secci&#243;n&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect3" text="Secci&#243;n&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect4" text="Secci&#243;n&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect5" text="Secci&#243;n&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="section" text="Secci&#243;n&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="simplesect" text="secci&#243;n llamada &#8220;%t&#8221;"/>
+      <l:template name="table" text="Tabla&#160;%n, &#8220;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="authorgroup">
+      <l:template name="sep" text=", "/>
+      <l:template name="sep2" text=" y "/>
+      <l:template name="seplast" text=", y "/>
+   </l:context>
+
+   <l:context name="glossary">
+      <l:template name="see" text="Ver "/>
+      <l:template name="seealso" text="Ver tambi&#233;n "/>
+   </l:context>
+
+   <l:context name="msgset">
+      <l:template name="MsgAud" text="Audiencia: "/>
+      <l:template name="MsgLevel" text="Nivel: "/>
+      <l:template name="MsgOrig" text="Origen: "/>
+   </l:context>
+
+   <l:context name="datetime">
+      <l:template name="format" text="m/d/Y" lang="en"/>
+   </l:context>
+
+   <l:context name="datetime-full">
+      <l:template name="January" text="January" lang="en"/>
+      <l:template name="February" text="February" lang="en"/>
+      <l:template name="March" text="March" lang="en"/>
+      <l:template name="April" text="April" lang="en"/>
+      <l:template name="May" text="May" lang="en"/>
+      <l:template name="June" text="June" lang="en"/>
+      <l:template name="July" text="July" lang="en"/>
+      <l:template name="August" text="August" lang="en"/>
+      <l:template name="September" text="September" lang="en"/>
+      <l:template name="October" text="October" lang="en"/>
+      <l:template name="November" text="November" lang="en"/>
+      <l:template name="December" text="December" lang="en"/>
+      <l:template name="Monday" text="Monday" lang="en"/>
+      <l:template name="Tuesday" text="Tuesday" lang="en"/>
+      <l:template name="Wednesday" text="Wednesday" lang="en"/>
+      <l:template name="Thursday" text="Thursday" lang="en"/>
+      <l:template name="Friday" text="Friday" lang="en"/>
+      <l:template name="Saturday" text="Saturday" lang="en"/>
+      <l:template name="Sunday" text="Sunday" lang="en"/>
+   </l:context>
+
+   <l:context name="datetime-abbrev">
+      <l:template name="Jan" text="Jan" lang="en"/>
+      <l:template name="Feb" text="Feb" lang="en"/>
+      <l:template name="Mar" text="Mar" lang="en"/>
+      <l:template name="Apr" text="Apr" lang="en"/>
+      <l:template name="May" text="May" lang="en"/>
+      <l:template name="Jun" text="Jun" lang="en"/>
+      <l:template name="Jul" text="Jul" lang="en"/>
+      <l:template name="Aug" text="Aug" lang="en"/>
+      <l:template name="Sep" text="Sep" lang="en"/>
+      <l:template name="Oct" text="Oct" lang="en"/>
+      <l:template name="Nov" text="Nov" lang="en"/>
+      <l:template name="Dec" text="Dec" lang="en"/>
+      <l:template name="Mon" text="Mon" lang="en"/>
+      <l:template name="Tue" text="Tue" lang="en"/>
+      <l:template name="Wed" text="Wed" lang="en"/>
+      <l:template name="Thu" text="Thu" lang="en"/>
+      <l:template name="Fri" text="Fri" lang="en"/>
+      <l:template name="Sat" text="Sat" lang="en"/>
+      <l:template name="Sun" text="Sun" lang="en"/>
+   </l:context>
+
+   <l:context name="htmlhelp">
+      <l:template name="langcode" text="0x040a Spanish (Traditional Sort)"/>
+   </l:context>
+
+   <l:letters>
+      <l:l i="-1"/>
+      <l:l i="0">S&#237;mbolos</l:l>
+      <l:l i="1">A</l:l>
+      <l:l i="1">a</l:l>
+      <l:l i="1">&#225;</l:l>
+      <l:l i="1">&#193;</l:l>
+      <l:l i="2">B</l:l>
+      <l:l i="2">b</l:l>
+      <l:l i="3">C</l:l>
+      <l:l i="3">c</l:l>
+      <l:l i="4">CH</l:l>
+      <l:l i="4">ch</l:l>
+      <l:l i="5">D</l:l>
+      <l:l i="5">d</l:l>
+      <l:l i="6">E</l:l>
+      <l:l i="6">e</l:l>
+      <l:l i="6">&#201;</l:l>
+      <l:l i="6">&#233;</l:l>
+      <l:l i="7">F</l:l>
+      <l:l i="7">f</l:l>
+      <l:l i="8">G</l:l>
+      <l:l i="8">g</l:l>
+      <l:l i="9">H</l:l>
+      <l:l i="9">h</l:l>
+      <l:l i="10">I</l:l>
+      <l:l i="10">i</l:l>
+      <l:l i="10">&#205;</l:l>
+      <l:l i="10">&#237;</l:l>
+      <l:l i="11">J</l:l>
+      <l:l i="11">j</l:l>
+      <l:l i="12">K</l:l>
+      <l:l i="12">k</l:l>
+      <l:l i="13">L</l:l>
+      <l:l i="13">l</l:l>
+      <l:l i="14">LL</l:l>
+      <l:l i="14">ll</l:l>
+      <l:l i="15">M</l:l>
+      <l:l i="15">m</l:l>
+      <l:l i="16">N</l:l>
+      <l:l i="16">n</l:l>
+      <l:l i="17">&#209;</l:l>
+      <l:l i="17">&#241;</l:l>
+      <l:l i="18">O</l:l>
+      <l:l i="18">o</l:l>
+      <l:l i="18">&#211;</l:l>
+      <l:l i="18">&#243;</l:l>
+      <l:l i="19">P</l:l>
+      <l:l i="19">p</l:l>
+      <l:l i="20">Q</l:l>
+      <l:l i="20">q</l:l>
+      <l:l i="21">R</l:l>
+      <l:l i="21">r</l:l>
+      <l:l i="22">S</l:l>
+      <l:l i="22">s</l:l>
+      <l:l i="23">T</l:l>
+      <l:l i="23">t</l:l>
+      <l:l i="24">U</l:l>
+      <l:l i="24">u</l:l>
+      <l:l i="24">&#218;</l:l>
+      <l:l i="24">&#250;</l:l>
+      <l:l i="25">V</l:l>
+      <l:l i="25">v</l:l>
+      <l:l i="26">W</l:l>
+      <l:l i="26">w</l:l>
+      <l:l i="27">X</l:l>
+      <l:l i="27">x</l:l>
+      <l:l i="28">Y</l:l>
+      <l:l i="28">y</l:l>
+      <l:l i="29">Z</l:l>
+      <l:l i="29">z</l:l>
+   </l:letters>
+</l:l10n>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/et.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/et.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/et.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1153 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="et" english-language-name="Estonian">
+
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+   <l:gentext key="Abstract" text="&#220;levaade"/>
+   <l:gentext key="abstract" text="&#220;levaade"/>
+   <l:gentext key="Answer" text="V:"/>
+   <l:gentext key="answer" text="V:"/>
+   <l:gentext key="Appendix" text="Lisa"/>
+   <l:gentext key="appendix" text="lisa"/>
+   <l:gentext key="Article" text="Artikkel"/>
+   <l:gentext key="article" text="Artikkel"/>
+   <l:gentext key="Bibliography" text="Bibliograafia"/>
+   <l:gentext key="bibliography" text="Bibliograafia"/>
+   <l:gentext key="Book" text="Raamat"/>
+   <l:gentext key="book" text="Raamat"/>
+   <l:gentext key="CAUTION" text="ETTEVAATUST"/>
+   <l:gentext key="Caution" text="Ettevaatust"/>
+   <l:gentext key="caution" text="Ettevaatust"/>
+   <l:gentext key="Chapter" text="Peat&#252;kk"/>
+   <l:gentext key="chapter" text="peat&#252;kk"/>
+   <l:gentext key="Colophon" text="L&#245;pum&#228;rgis"/>
+   <l:gentext key="colophon" text="L&#245;pum&#228;rgis"/>
+   <l:gentext key="Copyright" text="Autori&#245;igus"/>
+   <l:gentext key="copyright" text="Autori&#245;igus"/>
+   <l:gentext key="Dedication" text="P&#252;hendus"/>
+   <l:gentext key="dedication" text="P&#252;hendus"/>
+   <l:gentext key="Edition" text="V&#228;ljaanne"/>
+   <l:gentext key="edition" text="V&#228;ljaanne"/>
+   <l:gentext key="Equation" text="Valem"/>
+   <l:gentext key="equation" text="Valem"/>
+   <l:gentext key="Example" text="N&#228;ide"/>
+   <l:gentext key="example" text="N&#228;ide"/>
+   <l:gentext key="Figure" text="Joonis"/>
+   <l:gentext key="figure" text="Joonis"/>
+   <l:gentext key="Glossary" text="S&#245;nastik"/>
+   <l:gentext key="glossary" text="S&#245;nastik"/>
+   <l:gentext key="GlossSee" text="Vt."/>
+   <l:gentext key="glosssee" text="Vt."/>
+   <l:gentext key="GlossSeeAlso" text="Vt. ka"/>
+   <l:gentext key="glossseealso" text="Vt. ka"/>
+   <l:gentext key="IMPORTANT" text="OLULINE"/>
+   <l:gentext key="important" text="Oluline"/>
+   <l:gentext key="Important" text="Oluline"/>
+   <l:gentext key="Index" text="Aineregister"/>
+   <l:gentext key="index" text="Aineregister"/>
+   <l:gentext key="ISBN" text="ISBN"/>
+   <l:gentext key="isbn" text="ISBN"/>
+   <l:gentext key="LegalNotice" text="Autori&#245;iguse m&#228;rge"/>
+   <l:gentext key="legalnotice" text="Autori&#245;iguse m&#228;rge"/>
+   <l:gentext key="MsgAud" text="Auditoorium"/>
+   <l:gentext key="msgaud" text="Auditoorium"/>
+   <l:gentext key="MsgLevel" text="Tase"/>
+   <l:gentext key="msglevel" text="Tase"/>
+   <l:gentext key="MsgOrig" text="Algallikas"/>
+   <l:gentext key="msgorig" text="Algallikas"/>
+   <l:gentext key="NOTE" text="M&#196;RKUS"/>
+   <l:gentext key="Note" text="M&#228;rkus"/>
+   <l:gentext key="note" text="M&#228;rkus"/>
+   <l:gentext key="Part" text="Osa"/>
+   <l:gentext key="part" text="Osa"/>
+   <l:gentext key="Preface" text="Eess&#245;na"/>
+   <l:gentext key="preface" text="Eess&#245;na"/>
+   <l:gentext key="Procedure" text="Protseduur"/>
+   <l:gentext key="procedure" text="Protseduur"/>
+   <l:gentext key="ProductionSet" text="Production"/>
+   <l:gentext key="PubDate" text="Publication Date" lang="en"/>
+   <l:gentext key="pubdate" text="Publication date" lang="en"/>
+   <l:gentext key="Published" text="Avaldatud"/>
+   <l:gentext key="published" text="Avaldatud"/>
+   <l:gentext key="Qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="Question" text="K:"/>
+   <l:gentext key="question" text="K:"/>
+   <l:gentext key="RefEntry" text=""/>
+   <l:gentext key="refentry" text=""/>
+   <l:gentext key="Reference" text="Viide"/>
+   <l:gentext key="reference" text="Viide"/>
+   <l:gentext key="RefName" text="Nimi"/>
+   <l:gentext key="refname" text="Nimi"/>
+   <l:gentext key="RefSection" text="L&#245;ik"/>
+   <l:gentext key="refsection" text="L&#245;ik"/>
+   <l:gentext key="RefSynopsisDiv" text="S&#252;nopsis"/>
+   <l:gentext key="refsynopsisdiv" text="S&#252;nopsis"/>
+   <l:gentext key="RevHistory" text="Vigade paranduste ajalugu"/>
+   <l:gentext key="revhistory" text="Vigade paranduste ajalugu"/>
+   <l:gentext key="revision" text="Vigade parandus"/>
+   <l:gentext key="Revision" text="Vigade parandus"/>
+   <l:gentext key="sect1" text="Section"/>
+   <l:gentext key="sect2" text="Section"/>
+   <l:gentext key="sect3" text="Section"/>
+   <l:gentext key="sect4" text="Section"/>
+   <l:gentext key="sect5" text="Section"/>
+   <l:gentext key="section" text="l&#245;ik"/>
+   <l:gentext key="Section" text="Sektsioon"/>
+   <l:gentext key="see" text="Vt."/>
+   <l:gentext key="See" text="Vt."/>
+   <l:gentext key="seealso" text="Vt. ka"/>
+   <l:gentext key="Seealso" text="Vt. ka"/>
+   <l:gentext key="SeeAlso" text="Vt. ka"/>
+   <l:gentext key="set" text="Sea"/>
+   <l:gentext key="Set" text="Sea"/>
+   <l:gentext key="setindex" text="Sea indeks"/>
+   <l:gentext key="SetIndex" text="Sea indeks"/>
+   <l:gentext key="Sidebar" text=""/>
+   <l:gentext key="sidebar" text="k&#252;lgriba"/>
+   <l:gentext key="step" text="samm"/>
+   <l:gentext key="Step" text="Samm"/>
+   <l:gentext key="Table" text="Tabel"/>
+   <l:gentext key="table" text="Tabel"/>
+   <l:gentext key="tip" text="Vihje"/>
+   <l:gentext key="TIP" text="VIHJE"/>
+   <l:gentext key="Tip" text="Vihje"/>
+   <l:gentext key="Warning" text="Hoiatus"/>
+   <l:gentext key="warning" text="Hoiatus"/>
+   <l:gentext key="WARNING" text="HOIATUS"/>
+   <l:gentext key="and" text="ja"/>
+   <l:gentext key="by" text="by"/>
+   <l:gentext key="called" text="called" lang="en"/>
+   <l:gentext key="Edited" text="Redaktsioon"/>
+   <l:gentext key="edited" text="Redaktsioon"/>
+   <l:gentext key="Editedby" text="Redaktsiooni autor(id)"/>
+   <l:gentext key="editedby" text="Redaktsiooni autor(id)"/>
+   <l:gentext key="in" text="in"/>
+   <l:gentext key="lastlistcomma" text=","/>
+   <l:gentext key="listcomma" text=","/>
+   <l:gentext key="nonexistantelement" text="mitte eksisteeriv element"/>
+   <l:gentext key="notes" text="M&#228;rkused"/>
+   <l:gentext key="Notes" text="M&#228;rkused"/>
+   <l:gentext key="Pgs" text="Lk."/>
+   <l:gentext key="pgs" text="Lk."/>
+   <l:gentext key="Revisedby" text="&#220;le vaadanud: "/>
+   <l:gentext key="revisedby" text="&#220;le vaadanud: "/>
+   <l:gentext key="TableNotes" text="M&#228;rkused"/>
+   <l:gentext key="tablenotes" text="M&#228;rkused"/>
+   <l:gentext key="TableofContents" text="Sisukord"/>
+   <l:gentext key="tableofcontents" text="Sisukord"/>
+   <l:gentext key="the" text="" lang="en"/>
+   <l:gentext key="unexpectedelementname" text="Ootamatu elemendi nimi"/>
+   <l:gentext key="unsupported" text="toetuseta"/>
+   <l:gentext key="xrefto" text="viide"/>
+   <l:gentext key="listofequations" text="Valemite nimekiri"/>
+   <l:gentext key="ListofEquations" text="Valemite nimekiri"/>
+   <l:gentext key="ListofExamples" text="N&#228;idete nimekiri"/>
+   <l:gentext key="listofexamples" text="N&#228;idete nimekiri"/>
+   <l:gentext key="ListofFigures" text="Jooniste nimekiri"/>
+   <l:gentext key="listoffigures" text="Jooniste nimekiri"/>
+   <l:gentext key="ListofProcedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listofprocedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listoftables" text="Tabelite nimekiri"/>
+   <l:gentext key="ListofTables" text="Tabelite nimekiri"/>
+   <l:gentext key="ListofUnknown" text="Tundmatute nimekiri"/>
+   <l:gentext key="listofunknown" text="Tundmatute nimekiri"/>
+   <l:gentext key="nav-home" text="Koju"/>
+   <l:gentext key="nav-next" text="J&#228;rgmine"/>
+   <l:gentext key="nav-next-sibling" text="Kiiresti edasi"/>
+   <l:gentext key="nav-prev" text="Eelmine"/>
+   <l:gentext key="nav-prev-sibling" text="Kiiresti tagasi"/>
+   <l:gentext key="nav-up" text="&#220;les"/>
+   <l:gentext key="nav-toc" text="ToC" lang="en"/>
+   <l:gentext key="Draft" text="Draft"/>
+   <l:gentext key="above" text="above"/>
+   <l:gentext key="below" text="below"/>
+   <l:gentext key="sectioncalled" text="the section called"/>
+   <l:gentext key="index symbols" text="Symbols"/>
+   <l:gentext key="lowercase.alpha" text="abcdefghijklmnopqrstuvwxyz"/>
+   <l:gentext key="uppercase.alpha" text="ABCDEFGHIJKLMNOPQRSTUVWXYZ"/>
+   <l:dingbat key="startquote" text="&#8220;"/>
+   <l:dingbat key="endquote" text="&#8221;"/>
+   <l:dingbat key="nestedstartquote" text="&#8216;"/>
+   <l:dingbat key="nestedendquote" text="&#8217;"/>
+   <l:dingbat key="singlestartquote" text="&#8216;" lang="en"/>
+   <l:dingbat key="singleendquote" text="&#8217;" lang="en"/>
+   <l:dingbat key="bullet" text="&#8226;"/>
+   <l:gentext key="hyphenation-character" text="-" lang="en"/>
+   <l:gentext key="hyphenation-push-character-count" text="2" lang="en"/>
+   <l:gentext key="hyphenation-remain-character-count" text="2" lang="en"/>
+
+   <l:context name="styles">
+      <l:template name="person-name" text="first-last"/>
+   </l:context>
+
+   <l:context name="title">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="%t"/>
+      <l:template name="appendix" text="Lisa %n. %t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="biblioentry" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliolist" text="%t" lang="en"/>
+      <l:template name="bibliomixed" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="Peat&#252;kk %n. %t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="Valem %n. %t"/>
+      <l:template name="example" text="N&#228;ide %n. %t"/>
+      <l:template name="figure" text="Joonis %n. %t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="glosslist" text="%t" lang="en"/>
+      <l:template name="glossentry" text="%t" lang="en"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text=""/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="Osa %n. %t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="procedure.formal" text="Protseduur&#160;%n.&#160;%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="productionset.formal" text="Production&#160;%n"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="%t"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="%t"/>
+      <l:template name="refentry" text="%t"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsection" text="%t"/>
+      <l:template name="refsect1" text="%t"/>
+      <l:template name="refsect2" text="%t"/>
+      <l:template name="refsect3" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="refsynopsisdivinfo" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="step" text="%t"/>
+      <l:template name="table" text="Tabel %n. %t"/>
+      <l:template name="task" text="%t" lang="en"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="" lang="en"/>
+      <l:template name="warning" text="%t"/>
+   </l:context>
+
+   <l:context name="title-unnumbered">
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article/appendix" text="%t" lang="en"/>
+      <l:template name="bridgehead" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="sect1" text="%t"/>
+      <l:template name="sect2" text="%t"/>
+      <l:template name="sect3" text="%t"/>
+      <l:template name="sect4" text="%t"/>
+      <l:template name="sect5" text="%t"/>
+      <l:template name="section" text="%t"/>
+      <l:template name="simplesect" text="%t"/>
+   </l:context>
+
+   <l:context name="title-numbered">
+      <l:template name="appendix" text="Lisa %n. %t"/>
+      <l:template name="article/appendix" text="%n.&#160;%t" lang="en"/>
+      <l:template name="bridgehead" text="%n. %t"/>
+      <l:template name="chapter" text="Peat&#252;kk %n. %t"/>
+      <l:template name="sect1" text="%n. %t"/>
+      <l:template name="sect2" text="%n. %t"/>
+      <l:template name="sect3" text="%n. %t"/>
+      <l:template name="sect4" text="%n. %t"/>
+      <l:template name="sect5" text="%n. %t"/>
+      <l:template name="section" text="%n. %t"/>
+      <l:template name="simplesect" text="%n. %t"/>
+   </l:context>
+
+   <l:context name="subtitle">
+      <l:template name="appendix" text="%s"/>
+      <l:template name="article" text="%s"/>
+      <l:template name="bibliodiv" text="%s"/>
+      <l:template name="biblioentry" text="%s"/>
+      <l:template name="bibliography" text="%s"/>
+      <l:template name="bibliomixed" text="%s"/>
+      <l:template name="bibliomset" text="%s"/>
+      <l:template name="biblioset" text="%s"/>
+      <l:template name="book" text="%s"/>
+      <l:template name="chapter" text="%s"/>
+      <l:template name="colophon" text="%s"/>
+      <l:template name="dedication" text="%s"/>
+      <l:template name="glossary" text="%s"/>
+      <l:template name="glossdiv" text="%s"/>
+      <l:template name="index" text="%s"/>
+      <l:template name="indexdiv" text="%s"/>
+      <l:template name="lot" text="%s"/>
+      <l:template name="part" text="%s"/>
+      <l:template name="partintro" text="%s"/>
+      <l:template name="preface" text="%s"/>
+      <l:template name="refentry" text="%s"/>
+      <l:template name="reference" text="%s"/>
+      <l:template name="refsection" text="%s"/>
+      <l:template name="refsect1" text="%s"/>
+      <l:template name="refsect2" text="%s"/>
+      <l:template name="refsect3" text="%s"/>
+      <l:template name="refsynopsisdiv" text="%s"/>
+      <l:template name="sect1" text="%s"/>
+      <l:template name="sect2" text="%s"/>
+      <l:template name="sect3" text="%s"/>
+      <l:template name="sect4" text="%s"/>
+      <l:template name="sect5" text="%s"/>
+      <l:template name="section" text="%s"/>
+      <l:template name="set" text="%s"/>
+      <l:template name="setindex" text="%s"/>
+      <l:template name="sidebar" text="%s"/>
+      <l:template name="simplesect" text="%s"/>
+      <l:template name="toc" text="%s"/>
+   </l:context>
+
+   <l:context name="xref">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="V:&#160;%n"/>
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="constraintdef" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="%t"/>
+      <l:template name="example" text="%t"/>
+      <l:template name="figure" text="%t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text="%n"/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="%t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="K:&#160;%n"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="K:&#160;%n"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="table" text="%t"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="%n"/>
+      <l:template name="warning" text="%t"/>
+      <l:template name="page.citation" text=" [%p]"/>
+      <l:template name="page" text="(page %p)" lang="en"/>
+      <l:template name="pageabbrev" text="(p. %p)" lang="en"/>
+      <l:template name="Page" text="Page %p" lang="en"/>
+      <l:template name="bridgehead" text="&#8220;%t&#8221;"/>
+      <l:template name="refsection" text="&#8220;%t&#8221;"/>
+      <l:template name="refsect1" text="&#8220;%t&#8221;"/>
+      <l:template name="refsect2" text="&#8220;%t&#8221;"/>
+      <l:template name="refsect3" text="&#8220;%t&#8221;"/>
+      <l:template name="sect1" text="&#8220;%t&#8221;"/>
+      <l:template name="sect2" text="&#8220;%t&#8221;"/>
+      <l:template name="sect3" text="&#8220;%t&#8221;"/>
+      <l:template name="sect4" text="&#8220;%t&#8221;"/>
+      <l:template name="sect5" text="&#8220;%t&#8221;"/>
+      <l:template name="section" text="&#8220;%t&#8221;"/>
+      <l:template name="simplesect" text="&#8220;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="xref-number">
+      <l:template name="answer" text="V:&#160;%n"/>
+      <l:template name="appendix" text="Lisa&#160;%n"/>
+      <l:template name="bridgehead" text="Sektsioon&#160;%n"/>
+      <l:template name="chapter" text="Peat&#252;kk&#160;%n"/>
+      <l:template name="equation" text="Valem&#160;%n"/>
+      <l:template name="example" text="N&#228;ide&#160;%n"/>
+      <l:template name="figure" text="Joonis&#160;%n"/>
+      <l:template name="part" text="Osa&#160;%n"/>
+      <l:template name="procedure" text="Protseduur&#160;%n"/>
+      <l:template name="productionset" text="Production&#160;%n"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n"/>
+      <l:template name="qandaentry" text="K:&#160;%n"/>
+      <l:template name="question" text="K:&#160;%n"/>
+      <l:template name="sect1" text="Sektsioon&#160;%n"/>
+      <l:template name="sect2" text="Sektsioon&#160;%n"/>
+      <l:template name="sect3" text="Sektsioon&#160;%n"/>
+      <l:template name="sect4" text="Sektsioon&#160;%n"/>
+      <l:template name="sect5" text="Sektsioon&#160;%n"/>
+      <l:template name="section" text="Sektsioon&#160;%n"/>
+      <l:template name="table" text="Tabel&#160;%n"/>
+   </l:context>
+
+   <l:context name="xref-number-and-title">
+      <l:template name="appendix" text="Lisa&#160;%n, %t"/>
+      <l:template name="bridgehead" text="Sektsioon&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="chapter" text="Peat&#252;kk&#160;%n, %t"/>
+      <l:template name="equation" text="Valem&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="example" text="N&#228;ide&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="figure" text="Joonis&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="part" text="Osa&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="procedure" text="Protseduur&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="productionset" text="Production&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="refsect1" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="refsect2" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="refsect3" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="refsection" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="sect1" text="Sektsioon&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect2" text="Sektsioon&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect3" text="Sektsioon&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect4" text="Sektsioon&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect5" text="Sektsioon&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="section" text="Sektsioon&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="simplesect" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="table" text="Tabel&#160;%n, &#8220;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="authorgroup">
+      <l:template name="sep" text=", "/>
+      <l:template name="sep2" text=" ja "/>
+      <l:template name="seplast" text=", ja "/>
+   </l:context>
+
+   <l:context name="glossary">
+      <l:template name="see" text="Vt. "/>
+      <l:template name="seealso" text="Vt. ka "/>
+   </l:context>
+
+   <l:context name="msgset">
+      <l:template name="MsgAud" text="Auditoorium: "/>
+      <l:template name="MsgLevel" text="Tase: "/>
+      <l:template name="MsgOrig" text="Algallikas: "/>
+   </l:context>
+
+   <l:context name="datetime">
+      <l:template name="format" text="m/d/Y" lang="en"/>
+   </l:context>
+
+   <l:context name="datetime-full">
+      <l:template name="January" text="January" lang="en"/>
+      <l:template name="February" text="February" lang="en"/>
+      <l:template name="March" text="March" lang="en"/>
+      <l:template name="April" text="April" lang="en"/>
+      <l:template name="May" text="May" lang="en"/>
+      <l:template name="June" text="June" lang="en"/>
+      <l:template name="July" text="July" lang="en"/>
+      <l:template name="August" text="August" lang="en"/>
+      <l:template name="September" text="September" lang="en"/>
+      <l:template name="October" text="October" lang="en"/>
+      <l:template name="November" text="November" lang="en"/>
+      <l:template name="December" text="December" lang="en"/>
+      <l:template name="Monday" text="Monday" lang="en"/>
+      <l:template name="Tuesday" text="Tuesday" lang="en"/>
+      <l:template name="Wednesday" text="Wednesday" lang="en"/>
+      <l:template name="Thursday" text="Thursday" lang="en"/>
+      <l:template name="Friday" text="Friday" lang="en"/>
+      <l:template name="Saturday" text="Saturday" lang="en"/>
+      <l:template name="Sunday" text="Sunday" lang="en"/>
+   </l:context>
+
+   <l:context name="datetime-abbrev">
+      <l:template name="Jan" text="Jan" lang="en"/>
+      <l:template name="Feb" text="Feb" lang="en"/>
+      <l:template name="Mar" text="Mar" lang="en"/>
+      <l:template name="Apr" text="Apr" lang="en"/>
+      <l:template name="May" text="May" lang="en"/>
+      <l:template name="Jun" text="Jun" lang="en"/>
+      <l:template name="Jul" text="Jul" lang="en"/>
+      <l:template name="Aug" text="Aug" lang="en"/>
+      <l:template name="Sep" text="Sep" lang="en"/>
+      <l:template name="Oct" text="Oct" lang="en"/>
+      <l:template name="Nov" text="Nov" lang="en"/>
+      <l:template name="Dec" text="Dec" lang="en"/>
+      <l:template name="Mon" text="Mon" lang="en"/>
+      <l:template name="Tue" text="Tue" lang="en"/>
+      <l:template name="Wed" text="Wed" lang="en"/>
+      <l:template name="Thu" text="Thu" lang="en"/>
+      <l:template name="Fri" text="Fri" lang="en"/>
+      <l:template name="Sat" text="Sat" lang="en"/>
+      <l:template name="Sun" text="Sun" lang="en"/>
+   </l:context>
+
+   <l:context name="htmlhelp">
+      <l:template name="langcode" text="0x0425 Estonian"/>
+   </l:context>
+
+   <l:letters lang="en">
+      <l:l i="-1"/>
+      <l:l i="0">Symbols</l:l>
+      <l:l i="10">A</l:l>
+      <l:l i="10">a</l:l>
+      <l:l i="10">&#192;</l:l>
+      <l:l i="10">&#224;</l:l>
+      <l:l i="10">&#193;</l:l>
+      <l:l i="10">&#225;</l:l>
+      <l:l i="10">&#194;</l:l>
+      <l:l i="10">&#226;</l:l>
+      <l:l i="10">&#195;</l:l>
+      <l:l i="10">&#227;</l:l>
+      <l:l i="10">&#196;</l:l>
+      <l:l i="10">&#228;</l:l>
+      <l:l i="10">&#197;</l:l>
+      <l:l i="10">&#229;</l:l>
+      <l:l i="10">&#256;</l:l>
+      <l:l i="10">&#257;</l:l>
+      <l:l i="10">&#258;</l:l>
+      <l:l i="10">&#259;</l:l>
+      <l:l i="10">&#260;</l:l>
+      <l:l i="10">&#261;</l:l>
+      <l:l i="10">&#461;</l:l>
+      <l:l i="10">&#462;</l:l>
+      <l:l i="10">&#478;</l:l>
+      <l:l i="10">&#479;</l:l>
+      <l:l i="10">&#480;</l:l>
+      <l:l i="10">&#481;</l:l>
+      <l:l i="10">&#506;</l:l>
+      <l:l i="10">&#507;</l:l>
+      <l:l i="10">&#512;</l:l>
+      <l:l i="10">&#513;</l:l>
+      <l:l i="10">&#514;</l:l>
+      <l:l i="10">&#515;</l:l>
+      <l:l i="10">&#550;</l:l>
+      <l:l i="10">&#551;</l:l>
+      <l:l i="10">&#7680;</l:l>
+      <l:l i="10">&#7681;</l:l>
+      <l:l i="10">&#7834;</l:l>
+      <l:l i="10">&#7840;</l:l>
+      <l:l i="10">&#7841;</l:l>
+      <l:l i="10">&#7842;</l:l>
+      <l:l i="10">&#7843;</l:l>
+      <l:l i="10">&#7844;</l:l>
+      <l:l i="10">&#7845;</l:l>
+      <l:l i="10">&#7846;</l:l>
+      <l:l i="10">&#7847;</l:l>
+      <l:l i="10">&#7848;</l:l>
+      <l:l i="10">&#7849;</l:l>
+      <l:l i="10">&#7850;</l:l>
+      <l:l i="10">&#7851;</l:l>
+      <l:l i="10">&#7852;</l:l>
+      <l:l i="10">&#7853;</l:l>
+      <l:l i="10">&#7854;</l:l>
+      <l:l i="10">&#7855;</l:l>
+      <l:l i="10">&#7856;</l:l>
+      <l:l i="10">&#7857;</l:l>
+      <l:l i="10">&#7858;</l:l>
+      <l:l i="10">&#7859;</l:l>
+      <l:l i="10">&#7860;</l:l>
+      <l:l i="10">&#7861;</l:l>
+      <l:l i="10">&#7862;</l:l>
+      <l:l i="10">&#7863;</l:l>
+      <l:l i="20">B</l:l>
+      <l:l i="20">b</l:l>
+      <l:l i="20">&#384;</l:l>
+      <l:l i="20">&#385;</l:l>
+      <l:l i="20">&#595;</l:l>
+      <l:l i="20">&#386;</l:l>
+      <l:l i="20">&#387;</l:l>
+      <l:l i="20">&#7682;</l:l>
+      <l:l i="20">&#7683;</l:l>
+      <l:l i="20">&#7684;</l:l>
+      <l:l i="20">&#7685;</l:l>
+      <l:l i="20">&#7686;</l:l>
+      <l:l i="20">&#7687;</l:l>
+      <l:l i="30">C</l:l>
+      <l:l i="30">c</l:l>
+      <l:l i="30">&#199;</l:l>
+      <l:l i="30">&#231;</l:l>
+      <l:l i="30">&#262;</l:l>
+      <l:l i="30">&#263;</l:l>
+      <l:l i="30">&#264;</l:l>
+      <l:l i="30">&#265;</l:l>
+      <l:l i="30">&#266;</l:l>
+      <l:l i="30">&#267;</l:l>
+      <l:l i="30">&#268;</l:l>
+      <l:l i="30">&#269;</l:l>
+      <l:l i="30">&#391;</l:l>
+      <l:l i="30">&#392;</l:l>
+      <l:l i="30">&#597;</l:l>
+      <l:l i="30">&#7688;</l:l>
+      <l:l i="30">&#7689;</l:l>
+      <l:l i="40">D</l:l>
+      <l:l i="40">d</l:l>
+      <l:l i="40">&#270;</l:l>
+      <l:l i="40">&#271;</l:l>
+      <l:l i="40">&#272;</l:l>
+      <l:l i="40">&#273;</l:l>
+      <l:l i="40">&#394;</l:l>
+      <l:l i="40">&#599;</l:l>
+      <l:l i="40">&#395;</l:l>
+      <l:l i="40">&#396;</l:l>
+      <l:l i="40">&#453;</l:l>
+      <l:l i="40">&#498;</l:l>
+      <l:l i="40">&#545;</l:l>
+      <l:l i="40">&#598;</l:l>
+      <l:l i="40">&#7690;</l:l>
+      <l:l i="40">&#7691;</l:l>
+      <l:l i="40">&#7692;</l:l>
+      <l:l i="40">&#7693;</l:l>
+      <l:l i="40">&#7694;</l:l>
+      <l:l i="40">&#7695;</l:l>
+      <l:l i="40">&#7696;</l:l>
+      <l:l i="40">&#7697;</l:l>
+      <l:l i="40">&#7698;</l:l>
+      <l:l i="40">&#7699;</l:l>
+      <l:l i="50">E</l:l>
+      <l:l i="50">e</l:l>
+      <l:l i="50">&#200;</l:l>
+      <l:l i="50">&#232;</l:l>
+      <l:l i="50">&#201;</l:l>
+      <l:l i="50">&#233;</l:l>
+      <l:l i="50">&#202;</l:l>
+      <l:l i="50">&#234;</l:l>
+      <l:l i="50">&#203;</l:l>
+      <l:l i="50">&#235;</l:l>
+      <l:l i="50">&#274;</l:l>
+      <l:l i="50">&#275;</l:l>
+      <l:l i="50">&#276;</l:l>
+      <l:l i="50">&#277;</l:l>
+      <l:l i="50">&#278;</l:l>
+      <l:l i="50">&#279;</l:l>
+      <l:l i="50">&#280;</l:l>
+      <l:l i="50">&#281;</l:l>
+      <l:l i="50">&#282;</l:l>
+      <l:l i="50">&#283;</l:l>
+      <l:l i="50">&#516;</l:l>
+      <l:l i="50">&#517;</l:l>
+      <l:l i="50">&#518;</l:l>
+      <l:l i="50">&#519;</l:l>
+      <l:l i="50">&#552;</l:l>
+      <l:l i="50">&#553;</l:l>
+      <l:l i="50">&#7700;</l:l>
+      <l:l i="50">&#7701;</l:l>
+      <l:l i="50">&#7702;</l:l>
+      <l:l i="50">&#7703;</l:l>
+      <l:l i="50">&#7704;</l:l>
+      <l:l i="50">&#7705;</l:l>
+      <l:l i="50">&#7706;</l:l>
+      <l:l i="50">&#7707;</l:l>
+      <l:l i="50">&#7708;</l:l>
+      <l:l i="50">&#7709;</l:l>
+      <l:l i="50">&#7864;</l:l>
+      <l:l i="50">&#7865;</l:l>
+      <l:l i="50">&#7866;</l:l>
+      <l:l i="50">&#7867;</l:l>
+      <l:l i="50">&#7868;</l:l>
+      <l:l i="50">&#7869;</l:l>
+      <l:l i="50">&#7870;</l:l>
+      <l:l i="50">&#7871;</l:l>
+      <l:l i="50">&#7872;</l:l>
+      <l:l i="50">&#7873;</l:l>
+      <l:l i="50">&#7874;</l:l>
+      <l:l i="50">&#7875;</l:l>
+      <l:l i="50">&#7876;</l:l>
+      <l:l i="50">&#7877;</l:l>
+      <l:l i="50">&#7878;</l:l>
+      <l:l i="50">&#7879;</l:l>
+      <l:l i="60">F</l:l>
+      <l:l i="60">f</l:l>
+      <l:l i="60">&#401;</l:l>
+      <l:l i="60">&#402;</l:l>
+      <l:l i="60">&#7710;</l:l>
+      <l:l i="60">&#7711;</l:l>
+      <l:l i="70">G</l:l>
+      <l:l i="70">g</l:l>
+      <l:l i="70">&#284;</l:l>
+      <l:l i="70">&#285;</l:l>
+      <l:l i="70">&#286;</l:l>
+      <l:l i="70">&#287;</l:l>
+      <l:l i="70">&#288;</l:l>
+      <l:l i="70">&#289;</l:l>
+      <l:l i="70">&#290;</l:l>
+      <l:l i="70">&#291;</l:l>
+      <l:l i="70">&#403;</l:l>
+      <l:l i="70">&#608;</l:l>
+      <l:l i="70">&#484;</l:l>
+      <l:l i="70">&#485;</l:l>
+      <l:l i="70">&#486;</l:l>
+      <l:l i="70">&#487;</l:l>
+      <l:l i="70">&#500;</l:l>
+      <l:l i="70">&#501;</l:l>
+      <l:l i="70">&#7712;</l:l>
+      <l:l i="70">&#7713;</l:l>
+      <l:l i="80">H</l:l>
+      <l:l i="80">h</l:l>
+      <l:l i="80">&#292;</l:l>
+      <l:l i="80">&#293;</l:l>
+      <l:l i="80">&#294;</l:l>
+      <l:l i="80">&#295;</l:l>
+      <l:l i="80">&#542;</l:l>
+      <l:l i="80">&#543;</l:l>
+      <l:l i="80">&#614;</l:l>
+      <l:l i="80">&#7714;</l:l>
+      <l:l i="80">&#7715;</l:l>
+      <l:l i="80">&#7716;</l:l>
+      <l:l i="80">&#7717;</l:l>
+      <l:l i="80">&#7718;</l:l>
+      <l:l i="80">&#7719;</l:l>
+      <l:l i="80">&#7720;</l:l>
+      <l:l i="80">&#7721;</l:l>
+      <l:l i="80">&#7722;</l:l>
+      <l:l i="80">&#7723;</l:l>
+      <l:l i="80">&#7830;</l:l>
+      <l:l i="90">I</l:l>
+      <l:l i="90">i</l:l>
+      <l:l i="90">&#204;</l:l>
+      <l:l i="90">&#236;</l:l>
+      <l:l i="90">&#205;</l:l>
+      <l:l i="90">&#237;</l:l>
+      <l:l i="90">&#206;</l:l>
+      <l:l i="90">&#238;</l:l>
+      <l:l i="90">&#207;</l:l>
+      <l:l i="90">&#239;</l:l>
+      <l:l i="90">&#296;</l:l>
+      <l:l i="90">&#297;</l:l>
+      <l:l i="90">&#298;</l:l>
+      <l:l i="90">&#299;</l:l>
+      <l:l i="90">&#300;</l:l>
+      <l:l i="90">&#301;</l:l>
+      <l:l i="90">&#302;</l:l>
+      <l:l i="90">&#303;</l:l>
+      <l:l i="90">&#304;</l:l>
+      <l:l i="90">&#407;</l:l>
+      <l:l i="90">&#616;</l:l>
+      <l:l i="90">&#463;</l:l>
+      <l:l i="90">&#464;</l:l>
+      <l:l i="90">&#520;</l:l>
+      <l:l i="90">&#521;</l:l>
+      <l:l i="90">&#522;</l:l>
+      <l:l i="90">&#523;</l:l>
+      <l:l i="90">&#7724;</l:l>
+      <l:l i="90">&#7725;</l:l>
+      <l:l i="90">&#7726;</l:l>
+      <l:l i="90">&#7727;</l:l>
+      <l:l i="90">&#7880;</l:l>
+      <l:l i="90">&#7881;</l:l>
+      <l:l i="90">&#7882;</l:l>
+      <l:l i="90">&#7883;</l:l>
+      <l:l i="100">J</l:l>
+      <l:l i="100">j</l:l>
+      <l:l i="100">&#308;</l:l>
+      <l:l i="100">&#309;</l:l>
+      <l:l i="100">&#496;</l:l>
+      <l:l i="100">&#669;</l:l>
+      <l:l i="110">K</l:l>
+      <l:l i="110">k</l:l>
+      <l:l i="110">&#310;</l:l>
+      <l:l i="110">&#311;</l:l>
+      <l:l i="110">&#408;</l:l>
+      <l:l i="110">&#409;</l:l>
+      <l:l i="110">&#488;</l:l>
+      <l:l i="110">&#489;</l:l>
+      <l:l i="110">&#7728;</l:l>
+      <l:l i="110">&#7729;</l:l>
+      <l:l i="110">&#7730;</l:l>
+      <l:l i="110">&#7731;</l:l>
+      <l:l i="110">&#7732;</l:l>
+      <l:l i="110">&#7733;</l:l>
+      <l:l i="120">L</l:l>
+      <l:l i="120">l</l:l>
+      <l:l i="120">&#313;</l:l>
+      <l:l i="120">&#314;</l:l>
+      <l:l i="120">&#315;</l:l>
+      <l:l i="120">&#316;</l:l>
+      <l:l i="120">&#317;</l:l>
+      <l:l i="120">&#318;</l:l>
+      <l:l i="120">&#319;</l:l>
+      <l:l i="120">&#320;</l:l>
+      <l:l i="120">&#321;</l:l>
+      <l:l i="120">&#322;</l:l>
+      <l:l i="120">&#410;</l:l>
+      <l:l i="120">&#456;</l:l>
+      <l:l i="120">&#564;</l:l>
+      <l:l i="120">&#619;</l:l>
+      <l:l i="120">&#620;</l:l>
+      <l:l i="120">&#621;</l:l>
+      <l:l i="120">&#7734;</l:l>
+      <l:l i="120">&#7735;</l:l>
+      <l:l i="120">&#7736;</l:l>
+      <l:l i="120">&#7737;</l:l>
+      <l:l i="120">&#7738;</l:l>
+      <l:l i="120">&#7739;</l:l>
+      <l:l i="120">&#7740;</l:l>
+      <l:l i="120">&#7741;</l:l>
+      <l:l i="130">M</l:l>
+      <l:l i="130">m</l:l>
+      <l:l i="130">&#625;</l:l>
+      <l:l i="130">&#7742;</l:l>
+      <l:l i="130">&#7743;</l:l>
+      <l:l i="130">&#7744;</l:l>
+      <l:l i="130">&#7745;</l:l>
+      <l:l i="130">&#7746;</l:l>
+      <l:l i="130">&#7747;</l:l>
+      <l:l i="140">N</l:l>
+      <l:l i="140">n</l:l>
+      <l:l i="140">&#209;</l:l>
+      <l:l i="140">&#241;</l:l>
+      <l:l i="140">&#323;</l:l>
+      <l:l i="140">&#324;</l:l>
+      <l:l i="140">&#325;</l:l>
+      <l:l i="140">&#326;</l:l>
+      <l:l i="140">&#327;</l:l>
+      <l:l i="140">&#328;</l:l>
+      <l:l i="140">&#413;</l:l>
+      <l:l i="140">&#626;</l:l>
+      <l:l i="140">&#414;</l:l>
+      <l:l i="140">&#544;</l:l>
+      <l:l i="140">&#459;</l:l>
+      <l:l i="140">&#504;</l:l>
+      <l:l i="140">&#505;</l:l>
+      <l:l i="140">&#565;</l:l>
+      <l:l i="140">&#627;</l:l>
+      <l:l i="140">&#7748;</l:l>
+      <l:l i="140">&#7749;</l:l>
+      <l:l i="140">&#7750;</l:l>
+      <l:l i="140">&#7751;</l:l>
+      <l:l i="140">&#7752;</l:l>
+      <l:l i="140">&#7753;</l:l>
+      <l:l i="140">&#7754;</l:l>
+      <l:l i="140">&#7755;</l:l>
+      <l:l i="150">O</l:l>
+      <l:l i="150">o</l:l>
+      <l:l i="150">&#210;</l:l>
+      <l:l i="150">&#242;</l:l>
+      <l:l i="150">&#211;</l:l>
+      <l:l i="150">&#243;</l:l>
+      <l:l i="150">&#212;</l:l>
+      <l:l i="150">&#244;</l:l>
+      <l:l i="150">&#213;</l:l>
+      <l:l i="150">&#245;</l:l>
+      <l:l i="150">&#214;</l:l>
+      <l:l i="150">&#246;</l:l>
+      <l:l i="150">&#216;</l:l>
+      <l:l i="150">&#248;</l:l>
+      <l:l i="150">&#332;</l:l>
+      <l:l i="150">&#333;</l:l>
+      <l:l i="150">&#334;</l:l>
+      <l:l i="150">&#335;</l:l>
+      <l:l i="150">&#336;</l:l>
+      <l:l i="150">&#337;</l:l>
+      <l:l i="150">&#415;</l:l>
+      <l:l i="150">&#416;</l:l>
+      <l:l i="150">&#417;</l:l>
+      <l:l i="150">&#465;</l:l>
+      <l:l i="150">&#466;</l:l>
+      <l:l i="150">&#490;</l:l>
+      <l:l i="150">&#491;</l:l>
+      <l:l i="150">&#492;</l:l>
+      <l:l i="150">&#493;</l:l>
+      <l:l i="150">&#510;</l:l>
+      <l:l i="150">&#511;</l:l>
+      <l:l i="150">&#524;</l:l>
+      <l:l i="150">&#525;</l:l>
+      <l:l i="150">&#526;</l:l>
+      <l:l i="150">&#527;</l:l>
+      <l:l i="150">&#554;</l:l>
+      <l:l i="150">&#555;</l:l>
+      <l:l i="150">&#556;</l:l>
+      <l:l i="150">&#557;</l:l>
+      <l:l i="150">&#558;</l:l>
+      <l:l i="150">&#559;</l:l>
+      <l:l i="150">&#560;</l:l>
+      <l:l i="150">&#561;</l:l>
+      <l:l i="150">&#7756;</l:l>
+      <l:l i="150">&#7757;</l:l>
+      <l:l i="150">&#7758;</l:l>
+      <l:l i="150">&#7759;</l:l>
+      <l:l i="150">&#7760;</l:l>
+      <l:l i="150">&#7761;</l:l>
+      <l:l i="150">&#7762;</l:l>
+      <l:l i="150">&#7763;</l:l>
+      <l:l i="150">&#7884;</l:l>
+      <l:l i="150">&#7885;</l:l>
+      <l:l i="150">&#7886;</l:l>
+      <l:l i="150">&#7887;</l:l>
+      <l:l i="150">&#7888;</l:l>
+      <l:l i="150">&#7889;</l:l>
+      <l:l i="150">&#7890;</l:l>
+      <l:l i="150">&#7891;</l:l>
+      <l:l i="150">&#7892;</l:l>
+      <l:l i="150">&#7893;</l:l>
+      <l:l i="150">&#7894;</l:l>
+      <l:l i="150">&#7895;</l:l>
+      <l:l i="150">&#7896;</l:l>
+      <l:l i="150">&#7897;</l:l>
+      <l:l i="150">&#7898;</l:l>
+      <l:l i="150">&#7899;</l:l>
+      <l:l i="150">&#7900;</l:l>
+      <l:l i="150">&#7901;</l:l>
+      <l:l i="150">&#7902;</l:l>
+      <l:l i="150">&#7903;</l:l>
+      <l:l i="150">&#7904;</l:l>
+      <l:l i="150">&#7905;</l:l>
+      <l:l i="150">&#7906;</l:l>
+      <l:l i="150">&#7907;</l:l>
+      <l:l i="160">P</l:l>
+      <l:l i="160">p</l:l>
+      <l:l i="160">&#420;</l:l>
+      <l:l i="160">&#421;</l:l>
+      <l:l i="160">&#7764;</l:l>
+      <l:l i="160">&#7765;</l:l>
+      <l:l i="160">&#7766;</l:l>
+      <l:l i="160">&#7767;</l:l>
+      <l:l i="170">Q</l:l>
+      <l:l i="170">q</l:l>
+      <l:l i="170">&#672;</l:l>
+      <l:l i="180">R</l:l>
+      <l:l i="180">r</l:l>
+      <l:l i="180">&#340;</l:l>
+      <l:l i="180">&#341;</l:l>
+      <l:l i="180">&#342;</l:l>
+      <l:l i="180">&#343;</l:l>
+      <l:l i="180">&#344;</l:l>
+      <l:l i="180">&#345;</l:l>
+      <l:l i="180">&#528;</l:l>
+      <l:l i="180">&#529;</l:l>
+      <l:l i="180">&#530;</l:l>
+      <l:l i="180">&#531;</l:l>
+      <l:l i="180">&#636;</l:l>
+      <l:l i="180">&#637;</l:l>
+      <l:l i="180">&#638;</l:l>
+      <l:l i="180">&#7768;</l:l>
+      <l:l i="180">&#7769;</l:l>
+      <l:l i="180">&#7770;</l:l>
+      <l:l i="180">&#7771;</l:l>
+      <l:l i="180">&#7772;</l:l>
+      <l:l i="180">&#7773;</l:l>
+      <l:l i="180">&#7774;</l:l>
+      <l:l i="180">&#7775;</l:l>
+      <l:l i="190">S</l:l>
+      <l:l i="190">s</l:l>
+      <l:l i="190">&#346;</l:l>
+      <l:l i="190">&#347;</l:l>
+      <l:l i="190">&#348;</l:l>
+      <l:l i="190">&#349;</l:l>
+      <l:l i="190">&#350;</l:l>
+      <l:l i="190">&#351;</l:l>
+      <l:l i="190">&#352;</l:l>
+      <l:l i="190">&#353;</l:l>
+      <l:l i="190">&#536;</l:l>
+      <l:l i="190">&#537;</l:l>
+      <l:l i="190">&#642;</l:l>
+      <l:l i="190">&#7776;</l:l>
+      <l:l i="190">&#7777;</l:l>
+      <l:l i="190">&#7778;</l:l>
+      <l:l i="190">&#7779;</l:l>
+      <l:l i="190">&#7780;</l:l>
+      <l:l i="190">&#7781;</l:l>
+      <l:l i="190">&#7782;</l:l>
+      <l:l i="190">&#7783;</l:l>
+      <l:l i="190">&#7784;</l:l>
+      <l:l i="190">&#7785;</l:l>
+      <l:l i="200">T</l:l>
+      <l:l i="200">t</l:l>
+      <l:l i="200">&#354;</l:l>
+      <l:l i="200">&#355;</l:l>
+      <l:l i="200">&#356;</l:l>
+      <l:l i="200">&#357;</l:l>
+      <l:l i="200">&#358;</l:l>
+      <l:l i="200">&#359;</l:l>
+      <l:l i="200">&#427;</l:l>
+      <l:l i="200">&#428;</l:l>
+      <l:l i="200">&#429;</l:l>
+      <l:l i="200">&#430;</l:l>
+      <l:l i="200">&#648;</l:l>
+      <l:l i="200">&#538;</l:l>
+      <l:l i="200">&#539;</l:l>
+      <l:l i="200">&#566;</l:l>
+      <l:l i="200">&#7786;</l:l>
+      <l:l i="200">&#7787;</l:l>
+      <l:l i="200">&#7788;</l:l>
+      <l:l i="200">&#7789;</l:l>
+      <l:l i="200">&#7790;</l:l>
+      <l:l i="200">&#7791;</l:l>
+      <l:l i="200">&#7792;</l:l>
+      <l:l i="200">&#7793;</l:l>
+      <l:l i="200">&#7831;</l:l>
+      <l:l i="210">U</l:l>
+      <l:l i="210">u</l:l>
+      <l:l i="210">&#217;</l:l>
+      <l:l i="210">&#249;</l:l>
+      <l:l i="210">&#218;</l:l>
+      <l:l i="210">&#250;</l:l>
+      <l:l i="210">&#219;</l:l>
+      <l:l i="210">&#251;</l:l>
+      <l:l i="210">&#220;</l:l>
+      <l:l i="210">&#252;</l:l>
+      <l:l i="210">&#360;</l:l>
+      <l:l i="210">&#361;</l:l>
+      <l:l i="210">&#362;</l:l>
+      <l:l i="210">&#363;</l:l>
+      <l:l i="210">&#364;</l:l>
+      <l:l i="210">&#365;</l:l>
+      <l:l i="210">&#366;</l:l>
+      <l:l i="210">&#367;</l:l>
+      <l:l i="210">&#368;</l:l>
+      <l:l i="210">&#369;</l:l>
+      <l:l i="210">&#370;</l:l>
+      <l:l i="210">&#371;</l:l>
+      <l:l i="210">&#431;</l:l>
+      <l:l i="210">&#432;</l:l>
+      <l:l i="210">&#467;</l:l>
+      <l:l i="210">&#468;</l:l>
+      <l:l i="210">&#469;</l:l>
+      <l:l i="210">&#470;</l:l>
+      <l:l i="210">&#471;</l:l>
+      <l:l i="210">&#472;</l:l>
+      <l:l i="210">&#473;</l:l>
+      <l:l i="210">&#474;</l:l>
+      <l:l i="210">&#475;</l:l>
+      <l:l i="210">&#476;</l:l>
+      <l:l i="210">&#532;</l:l>
+      <l:l i="210">&#533;</l:l>
+      <l:l i="210">&#534;</l:l>
+      <l:l i="210">&#535;</l:l>
+      <l:l i="210">&#7794;</l:l>
+      <l:l i="210">&#7795;</l:l>
+      <l:l i="210">&#7796;</l:l>
+      <l:l i="210">&#7797;</l:l>
+      <l:l i="210">&#7798;</l:l>
+      <l:l i="210">&#7799;</l:l>
+      <l:l i="210">&#7800;</l:l>
+      <l:l i="210">&#7801;</l:l>
+      <l:l i="210">&#7802;</l:l>
+      <l:l i="210">&#7803;</l:l>
+      <l:l i="210">&#7908;</l:l>
+      <l:l i="210">&#7909;</l:l>
+      <l:l i="210">&#7910;</l:l>
+      <l:l i="210">&#7911;</l:l>
+      <l:l i="210">&#7912;</l:l>
+      <l:l i="210">&#7913;</l:l>
+      <l:l i="210">&#7914;</l:l>
+      <l:l i="210">&#7915;</l:l>
+      <l:l i="210">&#7916;</l:l>
+      <l:l i="210">&#7917;</l:l>
+      <l:l i="210">&#7918;</l:l>
+      <l:l i="210">&#7919;</l:l>
+      <l:l i="210">&#7920;</l:l>
+      <l:l i="210">&#7921;</l:l>
+      <l:l i="220">V</l:l>
+      <l:l i="220">v</l:l>
+      <l:l i="220">&#434;</l:l>
+      <l:l i="220">&#651;</l:l>
+      <l:l i="220">&#7804;</l:l>
+      <l:l i="220">&#7805;</l:l>
+      <l:l i="220">&#7806;</l:l>
+      <l:l i="220">&#7807;</l:l>
+      <l:l i="230">W</l:l>
+      <l:l i="230">w</l:l>
+      <l:l i="230">&#372;</l:l>
+      <l:l i="230">&#373;</l:l>
+      <l:l i="230">&#7808;</l:l>
+      <l:l i="230">&#7809;</l:l>
+      <l:l i="230">&#7810;</l:l>
+      <l:l i="230">&#7811;</l:l>
+      <l:l i="230">&#7812;</l:l>
+      <l:l i="230">&#7813;</l:l>
+      <l:l i="230">&#7814;</l:l>
+      <l:l i="230">&#7815;</l:l>
+      <l:l i="230">&#7816;</l:l>
+      <l:l i="230">&#7817;</l:l>
+      <l:l i="230">&#7832;</l:l>
+      <l:l i="240">X</l:l>
+      <l:l i="240">x</l:l>
+      <l:l i="240">&#7818;</l:l>
+      <l:l i="240">&#7819;</l:l>
+      <l:l i="240">&#7820;</l:l>
+      <l:l i="240">&#7821;</l:l>
+      <l:l i="250">Y</l:l>
+      <l:l i="250">y</l:l>
+      <l:l i="250">&#221;</l:l>
+      <l:l i="250">&#253;</l:l>
+      <l:l i="250">&#255;</l:l>
+      <l:l i="250">&#376;</l:l>
+      <l:l i="250">&#374;</l:l>
+      <l:l i="250">&#375;</l:l>
+      <l:l i="250">&#435;</l:l>
+      <l:l i="250">&#436;</l:l>
+      <l:l i="250">&#562;</l:l>
+      <l:l i="250">&#563;</l:l>
+      <l:l i="250">&#7822;</l:l>
+      <l:l i="250">&#7823;</l:l>
+      <l:l i="250">&#7833;</l:l>
+      <l:l i="250">&#7922;</l:l>
+      <l:l i="250">&#7923;</l:l>
+      <l:l i="250">&#7924;</l:l>
+      <l:l i="250">&#7925;</l:l>
+      <l:l i="250">&#7926;</l:l>
+      <l:l i="250">&#7927;</l:l>
+      <l:l i="250">&#7928;</l:l>
+      <l:l i="250">&#7929;</l:l>
+      <l:l i="260">Z</l:l>
+      <l:l i="260">z</l:l>
+      <l:l i="260">&#377;</l:l>
+      <l:l i="260">&#378;</l:l>
+      <l:l i="260">&#379;</l:l>
+      <l:l i="260">&#380;</l:l>
+      <l:l i="260">&#381;</l:l>
+      <l:l i="260">&#382;</l:l>
+      <l:l i="260">&#437;</l:l>
+      <l:l i="260">&#438;</l:l>
+      <l:l i="260">&#548;</l:l>
+      <l:l i="260">&#549;</l:l>
+      <l:l i="260">&#656;</l:l>
+      <l:l i="260">&#657;</l:l>
+      <l:l i="260">&#7824;</l:l>
+      <l:l i="260">&#7825;</l:l>
+      <l:l i="260">&#7826;</l:l>
+      <l:l i="260">&#7827;</l:l>
+      <l:l i="260">&#7828;</l:l>
+      <l:l i="260">&#7829;</l:l>
+   </l:letters>
+</l:l10n>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/eu.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/eu.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/eu.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1153 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="eu" english-language-name="Basque">
+
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+   <l:gentext key="Abstract" text="Laburpena"/>
+   <l:gentext key="abstract" text="Laburpena"/>
+   <l:gentext key="Answer" text="E:"/>
+   <l:gentext key="answer" text="E:"/>
+   <l:gentext key="Appendix" text="Eranskina"/>
+   <l:gentext key="appendix" text="eranskina"/>
+   <l:gentext key="Article" text="Artikulua"/>
+   <l:gentext key="article" text="Artikulua"/>
+   <l:gentext key="Bibliography" text="Bibliografia"/>
+   <l:gentext key="bibliography" text="Bibliografia"/>
+   <l:gentext key="Book" text="Liburua"/>
+   <l:gentext key="book" text="Liburua"/>
+   <l:gentext key="CAUTION" text="KONTUZ"/>
+   <l:gentext key="Caution" text="Kontuz"/>
+   <l:gentext key="caution" text="Kontuz"/>
+   <l:gentext key="Chapter" text="Atala"/>
+   <l:gentext key="chapter" text="atala"/>
+   <l:gentext key="Colophon" text="Azken ohar"/>
+   <l:gentext key="colophon" text="Azken ohar"/>
+   <l:gentext key="Copyright" text="Copyright"/>
+   <l:gentext key="copyright" text="Copyright"/>
+   <l:gentext key="Dedication" text="Eskaintza"/>
+   <l:gentext key="dedication" text="Eskaintza"/>
+   <l:gentext key="Edition" text="Edizioa"/>
+   <l:gentext key="edition" text="Edizioa"/>
+   <l:gentext key="Equation" text="Ekuazioa"/>
+   <l:gentext key="equation" text="Ekuazioa"/>
+   <l:gentext key="Example" text="Adibidea"/>
+   <l:gentext key="example" text="Adibidea"/>
+   <l:gentext key="Figure" text="Irudia"/>
+   <l:gentext key="figure" text="Irudia"/>
+   <l:gentext key="Glossary" text="Glosarioa"/>
+   <l:gentext key="glossary" text="Glosarioa"/>
+   <l:gentext key="GlossSee" text="Ikus"/>
+   <l:gentext key="glosssee" text="Ikus"/>
+   <l:gentext key="GlossSeeAlso" text="Ikus baita ere"/>
+   <l:gentext key="glossseealso" text="Ikus baita ere"/>
+   <l:gentext key="IMPORTANT" text="GARRANTZITSUA"/>
+   <l:gentext key="important" text="Garrantzitsua"/>
+   <l:gentext key="Important" text="Garrantzitsua"/>
+   <l:gentext key="Index" text="Indizea"/>
+   <l:gentext key="index" text="Indizea"/>
+   <l:gentext key="ISBN" text="ISBN"/>
+   <l:gentext key="isbn" text="ISBN"/>
+   <l:gentext key="LegalNotice" text="Legezko abisua"/>
+   <l:gentext key="legalnotice" text="Legezko abisua"/>
+   <l:gentext key="MsgAud" text="Audientzia"/>
+   <l:gentext key="msgaud" text="Audientzia"/>
+   <l:gentext key="MsgLevel" text="Maila"/>
+   <l:gentext key="msglevel" text="Maila"/>
+   <l:gentext key="MsgOrig" text="Jatorria"/>
+   <l:gentext key="msgorig" text="Jatorria"/>
+   <l:gentext key="NOTE" text="OHARRA"/>
+   <l:gentext key="Note" text="Oharra"/>
+   <l:gentext key="note" text="Oharra"/>
+   <l:gentext key="Part" text="Zatia"/>
+   <l:gentext key="part" text="Zatia"/>
+   <l:gentext key="Preface" text="Hitzaurrea"/>
+   <l:gentext key="preface" text="Hitzaurrea"/>
+   <l:gentext key="Procedure" text="Prozedura"/>
+   <l:gentext key="procedure" text="Prozedura"/>
+   <l:gentext key="ProductionSet" text="Ekoizpena"/>
+   <l:gentext key="PubDate" text="Publication Date" lang="en"/>
+   <l:gentext key="pubdate" text="Publication date" lang="en"/>
+   <l:gentext key="Published" text="Argitaratua"/>
+   <l:gentext key="published" text="Argitaratua"/>
+   <l:gentext key="Qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="Question" text="Galdera"/>
+   <l:gentext key="question" text="galdera"/>
+   <l:gentext key="RefEntry" text="Sarrera"/>
+   <l:gentext key="refentry" text="Sarrera"/>
+   <l:gentext key="Reference" text="Erreferentzia"/>
+   <l:gentext key="reference" text="Erreferentzia"/>
+   <l:gentext key="RefName" text="Izena"/>
+   <l:gentext key="refname" text="Izena"/>
+   <l:gentext key="RefSection" text="Sekzioa"/>
+   <l:gentext key="refsection" text="sekzioa"/>
+   <l:gentext key="RefSynopsisDiv" text="Laburpena"/>
+   <l:gentext key="refsynopsisdiv" text="Laburpena"/>
+   <l:gentext key="RevHistory" text="Berrikuspenaren historia"/>
+   <l:gentext key="revhistory" text="Berrikuspenaren historia"/>
+   <l:gentext key="revision" text="Berrikuspena"/>
+   <l:gentext key="Revision" text="Berrikuspena"/>
+   <l:gentext key="sect1" text="Atala"/>
+   <l:gentext key="sect2" text="Atala"/>
+   <l:gentext key="sect3" text="Atala"/>
+   <l:gentext key="sect4" text="Atala"/>
+   <l:gentext key="sect5" text="Atala"/>
+   <l:gentext key="section" text="Atala"/>
+   <l:gentext key="Section" text="Atala"/>
+   <l:gentext key="see" text="Ikus"/>
+   <l:gentext key="See" text="Ikus"/>
+   <l:gentext key="seealso" text="Ikus baita ere"/>
+   <l:gentext key="Seealso" text="Ikus baita ere"/>
+   <l:gentext key="SeeAlso" text="Ikus baita ere"/>
+   <l:gentext key="set" text="Konfiguratu"/>
+   <l:gentext key="Set" text="Konfiguratu"/>
+   <l:gentext key="setindex" text="Konfiguratu indizea"/>
+   <l:gentext key="SetIndex" text="Konfiguratu indizea"/>
+   <l:gentext key="Sidebar" text="Alboko barra"/>
+   <l:gentext key="sidebar" text="alboko barra"/>
+   <l:gentext key="step" text="urratsa"/>
+   <l:gentext key="Step" text="Urratsa"/>
+   <l:gentext key="Table" text="Taula"/>
+   <l:gentext key="table" text="Taula"/>
+   <l:gentext key="tip" text="Iradokizuna"/>
+   <l:gentext key="TIP" text="IRADOKIZUNA"/>
+   <l:gentext key="Tip" text="Iradokizuna"/>
+   <l:gentext key="Warning" text="Abisua"/>
+   <l:gentext key="warning" text="Abisua"/>
+   <l:gentext key="WARNING" text="ABISUA"/>
+   <l:gentext key="and" text="eta"/>
+   <l:gentext key="by" text="Honek"/>
+   <l:gentext key="called" text="called" lang="en"/>
+   <l:gentext key="Edited" text="editatua"/>
+   <l:gentext key="edited" text="editatua"/>
+   <l:gentext key="Editedby" text="Honek editatua"/>
+   <l:gentext key="editedby" text="Honek editatua"/>
+   <l:gentext key="in" text="non"/>
+   <l:gentext key="lastlistcomma" text=","/>
+   <l:gentext key="listcomma" text=","/>
+   <l:gentext key="nonexistantelement" text="lehendik ez dagoen elementua"/>
+   <l:gentext key="notes" text="Oharrak"/>
+   <l:gentext key="Notes" text="Oharrak"/>
+   <l:gentext key="Pgs" text="Orr."/>
+   <l:gentext key="pgs" text="Orr."/>
+   <l:gentext key="Revisedby" text="Berrikuspena: "/>
+   <l:gentext key="revisedby" text="Berrikuspena: "/>
+   <l:gentext key="TableNotes" text="Oharrak"/>
+   <l:gentext key="tablenotes" text="Oharrak"/>
+   <l:gentext key="TableofContents" text="Edukien aurkibidea"/>
+   <l:gentext key="tableofcontents" text="Edukien aurkibidea"/>
+   <l:gentext key="the" text="" lang="en"/>
+   <l:gentext key="unexpectedelementname" text="Ustekabeko elemetu-izena"/>
+   <l:gentext key="unsupported" text="onartzen ez den"/>
+   <l:gentext key="xrefto" text="xref honi"/>
+   <l:gentext key="listofequations" text="Ekuazioen zerrenda"/>
+   <l:gentext key="ListofEquations" text="Ekuazioen zerrenda"/>
+   <l:gentext key="ListofExamples" text="Adibideen zerrenda"/>
+   <l:gentext key="listofexamples" text="Adibideen zerrenda"/>
+   <l:gentext key="ListofFigures" text="Irudien zerrenda"/>
+   <l:gentext key="listoffigures" text="Irudien zerrenda"/>
+   <l:gentext key="ListofProcedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listofprocedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listoftables" text="Taulen zerrenda"/>
+   <l:gentext key="ListofTables" text="Taulen zerrenda"/>
+   <l:gentext key="ListofUnknown" text="Ezezagunen zerrenda"/>
+   <l:gentext key="listofunknown" text="Ezazagunen zerrenda"/>
+   <l:gentext key="nav-home" text="Etxea"/>
+   <l:gentext key="nav-next" text="Hurrengoa"/>
+   <l:gentext key="nav-next-sibling" text="Aurreratze azkarra"/>
+   <l:gentext key="nav-prev" text="Aurrekoa"/>
+   <l:gentext key="nav-prev-sibling" text="Atzeratze azkarra"/>
+   <l:gentext key="nav-up" text="Gora"/>
+   <l:gentext key="nav-toc" text="ToC" lang="en"/>
+   <l:gentext key="Draft" text="Zirriborroa"/>
+   <l:gentext key="above" text="goian"/>
+   <l:gentext key="below" text="behean"/>
+   <l:gentext key="sectioncalled" text="honela deritzon atala"/>
+   <l:gentext key="index symbols" text="Ikurrak"/>
+   <l:gentext key="lowercase.alpha" text="abcdefghijklmnopqrstuvwxyz"/>
+   <l:gentext key="uppercase.alpha" text="ABCDEFGHIJKLMNOPQRSTUVWXYZ"/>
+   <l:dingbat key="startquote" text="&#8220;"/>
+   <l:dingbat key="endquote" text="&#8221;"/>
+   <l:dingbat key="nestedstartquote" text="&#8216;"/>
+   <l:dingbat key="nestedendquote" text="&#8217;"/>
+   <l:dingbat key="singlestartquote" text="&#8216;" lang="en"/>
+   <l:dingbat key="singleendquote" text="&#8217;" lang="en"/>
+   <l:dingbat key="bullet" text="&#8226;"/>
+   <l:gentext key="hyphenation-character" text="-" lang="en"/>
+   <l:gentext key="hyphenation-push-character-count" text="2" lang="en"/>
+   <l:gentext key="hyphenation-remain-character-count" text="2" lang="en"/>
+
+   <l:context name="styles">
+      <l:template name="person-name" text="first-last"/>
+   </l:context>
+
+   <l:context name="title">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="%t"/>
+      <l:template name="appendix" text="Eranskina %n. %t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="biblioentry" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliolist" text="%t" lang="en"/>
+      <l:template name="bibliomixed" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="Atala %n. %t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="Ekuazioa %n. %t"/>
+      <l:template name="example" text="Adibidea %n. %t"/>
+      <l:template name="figure" text="Irudia %n. %t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="glosslist" text="%t" lang="en"/>
+      <l:template name="glossentry" text="%t" lang="en"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text=""/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="Zatia %n. %t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="procedure.formal" text="Prozedura %n. %t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="productionset.formal" text="Ekoizpena %n"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="%t"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="%t"/>
+      <l:template name="refentry" text="%t"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsection" text="%t"/>
+      <l:template name="refsect1" text="%t"/>
+      <l:template name="refsect2" text="%t"/>
+      <l:template name="refsect3" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="refsynopsisdivinfo" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="step" text="%t"/>
+      <l:template name="table" text="Taula %n. %t"/>
+      <l:template name="task" text="%t" lang="en"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text=""/>
+      <l:template name="warning" text="%t"/>
+   </l:context>
+
+   <l:context name="title-unnumbered">
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article/appendix" text="%t" lang="en"/>
+      <l:template name="bridgehead" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="sect1" text="%t"/>
+      <l:template name="sect2" text="%t"/>
+      <l:template name="sect3" text="%t"/>
+      <l:template name="sect4" text="%t"/>
+      <l:template name="sect5" text="%t"/>
+      <l:template name="section" text="%t"/>
+      <l:template name="simplesect" text="%t"/>
+   </l:context>
+
+   <l:context name="title-numbered">
+      <l:template name="appendix" text="Eranskina %n. %t"/>
+      <l:template name="article/appendix" text="%n.&#160;%t" lang="en"/>
+      <l:template name="bridgehead" text="%n. %t"/>
+      <l:template name="chapter" text="Atala %n. %t"/>
+      <l:template name="sect1" text="%n. %t"/>
+      <l:template name="sect2" text="%n. %t"/>
+      <l:template name="sect3" text="%n. %t"/>
+      <l:template name="sect4" text="%n. %t"/>
+      <l:template name="sect5" text="%n. %t"/>
+      <l:template name="section" text="%n. %t"/>
+      <l:template name="simplesect" text="%t"/>
+   </l:context>
+
+   <l:context name="subtitle">
+      <l:template name="appendix" text="%s"/>
+      <l:template name="article" text="%s"/>
+      <l:template name="bibliodiv" text="%s"/>
+      <l:template name="biblioentry" text="%s"/>
+      <l:template name="bibliography" text="%s"/>
+      <l:template name="bibliomixed" text="%s"/>
+      <l:template name="bibliomset" text="%s"/>
+      <l:template name="biblioset" text="%s"/>
+      <l:template name="book" text="%s"/>
+      <l:template name="chapter" text="%s"/>
+      <l:template name="colophon" text="%s"/>
+      <l:template name="dedication" text="%s"/>
+      <l:template name="glossary" text="%s"/>
+      <l:template name="glossdiv" text="%s"/>
+      <l:template name="index" text="%s"/>
+      <l:template name="indexdiv" text="%s"/>
+      <l:template name="lot" text="%s"/>
+      <l:template name="part" text="%s"/>
+      <l:template name="partintro" text="%s"/>
+      <l:template name="preface" text="%s"/>
+      <l:template name="refentry" text="%s"/>
+      <l:template name="reference" text="%s"/>
+      <l:template name="refsection" text="%s"/>
+      <l:template name="refsect1" text="%s"/>
+      <l:template name="refsect2" text="%s"/>
+      <l:template name="refsect3" text="%s"/>
+      <l:template name="refsynopsisdiv" text="%s"/>
+      <l:template name="sect1" text="%s"/>
+      <l:template name="sect2" text="%s"/>
+      <l:template name="sect3" text="%s"/>
+      <l:template name="sect4" text="%s"/>
+      <l:template name="sect5" text="%s"/>
+      <l:template name="section" text="%s"/>
+      <l:template name="set" text="%s"/>
+      <l:template name="setindex" text="%s"/>
+      <l:template name="sidebar" text="%s"/>
+      <l:template name="simplesect" text="%s"/>
+      <l:template name="toc" text="%s"/>
+   </l:context>
+
+   <l:context name="xref">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="E:&#160;%n"/>
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="constraintdef" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="%t"/>
+      <l:template name="example" text="%t"/>
+      <l:template name="figure" text="%t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text="%n"/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="%t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="Galdera&#160;%n"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="Galdera&#160;%n"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="table" text="%t"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="%n"/>
+      <l:template name="warning" text="%t"/>
+      <l:template name="page.citation" text=" [%p]"/>
+      <l:template name="page" text="(page %p)" lang="en"/>
+      <l:template name="pageabbrev" text="(p. %p)" lang="en"/>
+      <l:template name="Page" text="Page %p" lang="en"/>
+      <l:template name="bridgehead" text="honela deritzon atala &#8220;%t&#8221;"/>
+      <l:template name="refsection" text="honela deritzon atala &#8220;%t&#8221;"/>
+      <l:template name="refsect1" text="honela deritzon atala &#8220;%t&#8221;"/>
+      <l:template name="refsect2" text="honela deritzon atala &#8220;%t&#8221;"/>
+      <l:template name="refsect3" text="honela deritzon atala &#8220;%t&#8221;"/>
+      <l:template name="sect1" text="honela deritzon atala &#8220;%t&#8221;"/>
+      <l:template name="sect2" text="honela deritzon atala &#8220;%t&#8221;"/>
+      <l:template name="sect3" text="honela deritzon atala &#8220;%t&#8221;"/>
+      <l:template name="sect4" text="honela deritzon atala &#8220;%t&#8221;"/>
+      <l:template name="sect5" text="honela deritzon atala &#8220;%t&#8221;"/>
+      <l:template name="section" text="honela deritzon atala &#8220;%t&#8221;"/>
+      <l:template name="simplesect" text="honela deritzon atala &#8220;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="xref-number">
+      <l:template name="answer" text="E:&#160;%n"/>
+      <l:template name="appendix" text="Eranskina&#160;%n"/>
+      <l:template name="bridgehead" text="Atala&#160;%n"/>
+      <l:template name="chapter" text="Atala&#160;%n"/>
+      <l:template name="equation" text="Ekuazioa&#160;%n"/>
+      <l:template name="example" text="Adibidea&#160;%n"/>
+      <l:template name="figure" text="Irudia&#160;%n"/>
+      <l:template name="part" text="Zatia&#160;%n"/>
+      <l:template name="procedure" text="Prozedura&#160;%n"/>
+      <l:template name="productionset" text="Ekoizpena&#160;%n"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n"/>
+      <l:template name="qandaentry" text="Galdera&#160;%n"/>
+      <l:template name="question" text="Galdera&#160;%n"/>
+      <l:template name="sect1" text="Atala&#160;%n"/>
+      <l:template name="sect2" text="Atala&#160;%n"/>
+      <l:template name="sect3" text="Atala&#160;%n"/>
+      <l:template name="sect4" text="Atala&#160;%n"/>
+      <l:template name="sect5" text="Atala&#160;%n"/>
+      <l:template name="section" text="Atala&#160;%n"/>
+      <l:template name="table" text="Taula&#160;%n"/>
+   </l:context>
+
+   <l:context name="xref-number-and-title">
+      <l:template name="appendix" text="Eranskina&#160;%n, %t"/>
+      <l:template name="bridgehead" text="Atala&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="chapter" text="Atala&#160;%n, %t"/>
+      <l:template name="equation" text="Ekuazioa&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="example" text="Adibidea&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="figure" text="Irudia&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="part" text="Zatia&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="procedure" text="Prozedura&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="productionset" text="Ekoizpena&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="refsect1" text="honela deritzon atala &#8220;%t&#8221;"/>
+      <l:template name="refsect2" text="honela deritzon atala &#8220;%t&#8221;"/>
+      <l:template name="refsect3" text="honela deritzon atala &#8220;%t&#8221;"/>
+      <l:template name="refsection" text="honela deritzon atala &#8220;%t&#8221;"/>
+      <l:template name="sect1" text="Atala&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect2" text="Atala&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect3" text="Atala&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect4" text="Atala&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect5" text="Atala&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="section" text="Atala&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="simplesect" text="honela deritzon atala &#8220;%t&#8221;"/>
+      <l:template name="table" text="Taula&#160;%n, &#8220;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="authorgroup">
+      <l:template name="sep" text=", "/>
+      <l:template name="sep2" text=" eta "/>
+      <l:template name="seplast" text=", eta "/>
+   </l:context>
+
+   <l:context name="glossary">
+      <l:template name="see" text="Ikus "/>
+      <l:template name="seealso" text="Ikus baita ere "/>
+   </l:context>
+
+   <l:context name="msgset">
+      <l:template name="MsgAud" text="Audientzia: "/>
+      <l:template name="MsgLevel" text="Maila: "/>
+      <l:template name="MsgOrig" text="Jatorria: "/>
+   </l:context>
+
+   <l:context name="datetime">
+      <l:template name="format" text="m/d/Y" lang="en"/>
+   </l:context>
+
+   <l:context name="datetime-full">
+      <l:template name="January" text="January" lang="en"/>
+      <l:template name="February" text="February" lang="en"/>
+      <l:template name="March" text="March" lang="en"/>
+      <l:template name="April" text="April" lang="en"/>
+      <l:template name="May" text="May" lang="en"/>
+      <l:template name="June" text="June" lang="en"/>
+      <l:template name="July" text="July" lang="en"/>
+      <l:template name="August" text="August" lang="en"/>
+      <l:template name="September" text="September" lang="en"/>
+      <l:template name="October" text="October" lang="en"/>
+      <l:template name="November" text="November" lang="en"/>
+      <l:template name="December" text="December" lang="en"/>
+      <l:template name="Monday" text="Monday" lang="en"/>
+      <l:template name="Tuesday" text="Tuesday" lang="en"/>
+      <l:template name="Wednesday" text="Wednesday" lang="en"/>
+      <l:template name="Thursday" text="Thursday" lang="en"/>
+      <l:template name="Friday" text="Friday" lang="en"/>
+      <l:template name="Saturday" text="Saturday" lang="en"/>
+      <l:template name="Sunday" text="Sunday" lang="en"/>
+   </l:context>
+
+   <l:context name="datetime-abbrev">
+      <l:template name="Jan" text="Jan" lang="en"/>
+      <l:template name="Feb" text="Feb" lang="en"/>
+      <l:template name="Mar" text="Mar" lang="en"/>
+      <l:template name="Apr" text="Apr" lang="en"/>
+      <l:template name="May" text="May" lang="en"/>
+      <l:template name="Jun" text="Jun" lang="en"/>
+      <l:template name="Jul" text="Jul" lang="en"/>
+      <l:template name="Aug" text="Aug" lang="en"/>
+      <l:template name="Sep" text="Sep" lang="en"/>
+      <l:template name="Oct" text="Oct" lang="en"/>
+      <l:template name="Nov" text="Nov" lang="en"/>
+      <l:template name="Dec" text="Dec" lang="en"/>
+      <l:template name="Mon" text="Mon" lang="en"/>
+      <l:template name="Tue" text="Tue" lang="en"/>
+      <l:template name="Wed" text="Wed" lang="en"/>
+      <l:template name="Thu" text="Thu" lang="en"/>
+      <l:template name="Fri" text="Fri" lang="en"/>
+      <l:template name="Sat" text="Sat" lang="en"/>
+      <l:template name="Sun" text="Sun" lang="en"/>
+   </l:context>
+
+   <l:context name="htmlhelp">
+      <l:template name="langcode" text="0x042d Basque"/>
+   </l:context>
+
+   <l:letters lang="en">
+      <l:l i="-1"/>
+      <l:l i="0">Symbols</l:l>
+      <l:l i="10">A</l:l>
+      <l:l i="10">a</l:l>
+      <l:l i="10">&#192;</l:l>
+      <l:l i="10">&#224;</l:l>
+      <l:l i="10">&#193;</l:l>
+      <l:l i="10">&#225;</l:l>
+      <l:l i="10">&#194;</l:l>
+      <l:l i="10">&#226;</l:l>
+      <l:l i="10">&#195;</l:l>
+      <l:l i="10">&#227;</l:l>
+      <l:l i="10">&#196;</l:l>
+      <l:l i="10">&#228;</l:l>
+      <l:l i="10">&#197;</l:l>
+      <l:l i="10">&#229;</l:l>
+      <l:l i="10">&#256;</l:l>
+      <l:l i="10">&#257;</l:l>
+      <l:l i="10">&#258;</l:l>
+      <l:l i="10">&#259;</l:l>
+      <l:l i="10">&#260;</l:l>
+      <l:l i="10">&#261;</l:l>
+      <l:l i="10">&#461;</l:l>
+      <l:l i="10">&#462;</l:l>
+      <l:l i="10">&#478;</l:l>
+      <l:l i="10">&#479;</l:l>
+      <l:l i="10">&#480;</l:l>
+      <l:l i="10">&#481;</l:l>
+      <l:l i="10">&#506;</l:l>
+      <l:l i="10">&#507;</l:l>
+      <l:l i="10">&#512;</l:l>
+      <l:l i="10">&#513;</l:l>
+      <l:l i="10">&#514;</l:l>
+      <l:l i="10">&#515;</l:l>
+      <l:l i="10">&#550;</l:l>
+      <l:l i="10">&#551;</l:l>
+      <l:l i="10">&#7680;</l:l>
+      <l:l i="10">&#7681;</l:l>
+      <l:l i="10">&#7834;</l:l>
+      <l:l i="10">&#7840;</l:l>
+      <l:l i="10">&#7841;</l:l>
+      <l:l i="10">&#7842;</l:l>
+      <l:l i="10">&#7843;</l:l>
+      <l:l i="10">&#7844;</l:l>
+      <l:l i="10">&#7845;</l:l>
+      <l:l i="10">&#7846;</l:l>
+      <l:l i="10">&#7847;</l:l>
+      <l:l i="10">&#7848;</l:l>
+      <l:l i="10">&#7849;</l:l>
+      <l:l i="10">&#7850;</l:l>
+      <l:l i="10">&#7851;</l:l>
+      <l:l i="10">&#7852;</l:l>
+      <l:l i="10">&#7853;</l:l>
+      <l:l i="10">&#7854;</l:l>
+      <l:l i="10">&#7855;</l:l>
+      <l:l i="10">&#7856;</l:l>
+      <l:l i="10">&#7857;</l:l>
+      <l:l i="10">&#7858;</l:l>
+      <l:l i="10">&#7859;</l:l>
+      <l:l i="10">&#7860;</l:l>
+      <l:l i="10">&#7861;</l:l>
+      <l:l i="10">&#7862;</l:l>
+      <l:l i="10">&#7863;</l:l>
+      <l:l i="20">B</l:l>
+      <l:l i="20">b</l:l>
+      <l:l i="20">&#384;</l:l>
+      <l:l i="20">&#385;</l:l>
+      <l:l i="20">&#595;</l:l>
+      <l:l i="20">&#386;</l:l>
+      <l:l i="20">&#387;</l:l>
+      <l:l i="20">&#7682;</l:l>
+      <l:l i="20">&#7683;</l:l>
+      <l:l i="20">&#7684;</l:l>
+      <l:l i="20">&#7685;</l:l>
+      <l:l i="20">&#7686;</l:l>
+      <l:l i="20">&#7687;</l:l>
+      <l:l i="30">C</l:l>
+      <l:l i="30">c</l:l>
+      <l:l i="30">&#199;</l:l>
+      <l:l i="30">&#231;</l:l>
+      <l:l i="30">&#262;</l:l>
+      <l:l i="30">&#263;</l:l>
+      <l:l i="30">&#264;</l:l>
+      <l:l i="30">&#265;</l:l>
+      <l:l i="30">&#266;</l:l>
+      <l:l i="30">&#267;</l:l>
+      <l:l i="30">&#268;</l:l>
+      <l:l i="30">&#269;</l:l>
+      <l:l i="30">&#391;</l:l>
+      <l:l i="30">&#392;</l:l>
+      <l:l i="30">&#597;</l:l>
+      <l:l i="30">&#7688;</l:l>
+      <l:l i="30">&#7689;</l:l>
+      <l:l i="40">D</l:l>
+      <l:l i="40">d</l:l>
+      <l:l i="40">&#270;</l:l>
+      <l:l i="40">&#271;</l:l>
+      <l:l i="40">&#272;</l:l>
+      <l:l i="40">&#273;</l:l>
+      <l:l i="40">&#394;</l:l>
+      <l:l i="40">&#599;</l:l>
+      <l:l i="40">&#395;</l:l>
+      <l:l i="40">&#396;</l:l>
+      <l:l i="40">&#453;</l:l>
+      <l:l i="40">&#498;</l:l>
+      <l:l i="40">&#545;</l:l>
+      <l:l i="40">&#598;</l:l>
+      <l:l i="40">&#7690;</l:l>
+      <l:l i="40">&#7691;</l:l>
+      <l:l i="40">&#7692;</l:l>
+      <l:l i="40">&#7693;</l:l>
+      <l:l i="40">&#7694;</l:l>
+      <l:l i="40">&#7695;</l:l>
+      <l:l i="40">&#7696;</l:l>
+      <l:l i="40">&#7697;</l:l>
+      <l:l i="40">&#7698;</l:l>
+      <l:l i="40">&#7699;</l:l>
+      <l:l i="50">E</l:l>
+      <l:l i="50">e</l:l>
+      <l:l i="50">&#200;</l:l>
+      <l:l i="50">&#232;</l:l>
+      <l:l i="50">&#201;</l:l>
+      <l:l i="50">&#233;</l:l>
+      <l:l i="50">&#202;</l:l>
+      <l:l i="50">&#234;</l:l>
+      <l:l i="50">&#203;</l:l>
+      <l:l i="50">&#235;</l:l>
+      <l:l i="50">&#274;</l:l>
+      <l:l i="50">&#275;</l:l>
+      <l:l i="50">&#276;</l:l>
+      <l:l i="50">&#277;</l:l>
+      <l:l i="50">&#278;</l:l>
+      <l:l i="50">&#279;</l:l>
+      <l:l i="50">&#280;</l:l>
+      <l:l i="50">&#281;</l:l>
+      <l:l i="50">&#282;</l:l>
+      <l:l i="50">&#283;</l:l>
+      <l:l i="50">&#516;</l:l>
+      <l:l i="50">&#517;</l:l>
+      <l:l i="50">&#518;</l:l>
+      <l:l i="50">&#519;</l:l>
+      <l:l i="50">&#552;</l:l>
+      <l:l i="50">&#553;</l:l>
+      <l:l i="50">&#7700;</l:l>
+      <l:l i="50">&#7701;</l:l>
+      <l:l i="50">&#7702;</l:l>
+      <l:l i="50">&#7703;</l:l>
+      <l:l i="50">&#7704;</l:l>
+      <l:l i="50">&#7705;</l:l>
+      <l:l i="50">&#7706;</l:l>
+      <l:l i="50">&#7707;</l:l>
+      <l:l i="50">&#7708;</l:l>
+      <l:l i="50">&#7709;</l:l>
+      <l:l i="50">&#7864;</l:l>
+      <l:l i="50">&#7865;</l:l>
+      <l:l i="50">&#7866;</l:l>
+      <l:l i="50">&#7867;</l:l>
+      <l:l i="50">&#7868;</l:l>
+      <l:l i="50">&#7869;</l:l>
+      <l:l i="50">&#7870;</l:l>
+      <l:l i="50">&#7871;</l:l>
+      <l:l i="50">&#7872;</l:l>
+      <l:l i="50">&#7873;</l:l>
+      <l:l i="50">&#7874;</l:l>
+      <l:l i="50">&#7875;</l:l>
+      <l:l i="50">&#7876;</l:l>
+      <l:l i="50">&#7877;</l:l>
+      <l:l i="50">&#7878;</l:l>
+      <l:l i="50">&#7879;</l:l>
+      <l:l i="60">F</l:l>
+      <l:l i="60">f</l:l>
+      <l:l i="60">&#401;</l:l>
+      <l:l i="60">&#402;</l:l>
+      <l:l i="60">&#7710;</l:l>
+      <l:l i="60">&#7711;</l:l>
+      <l:l i="70">G</l:l>
+      <l:l i="70">g</l:l>
+      <l:l i="70">&#284;</l:l>
+      <l:l i="70">&#285;</l:l>
+      <l:l i="70">&#286;</l:l>
+      <l:l i="70">&#287;</l:l>
+      <l:l i="70">&#288;</l:l>
+      <l:l i="70">&#289;</l:l>
+      <l:l i="70">&#290;</l:l>
+      <l:l i="70">&#291;</l:l>
+      <l:l i="70">&#403;</l:l>
+      <l:l i="70">&#608;</l:l>
+      <l:l i="70">&#484;</l:l>
+      <l:l i="70">&#485;</l:l>
+      <l:l i="70">&#486;</l:l>
+      <l:l i="70">&#487;</l:l>
+      <l:l i="70">&#500;</l:l>
+      <l:l i="70">&#501;</l:l>
+      <l:l i="70">&#7712;</l:l>
+      <l:l i="70">&#7713;</l:l>
+      <l:l i="80">H</l:l>
+      <l:l i="80">h</l:l>
+      <l:l i="80">&#292;</l:l>
+      <l:l i="80">&#293;</l:l>
+      <l:l i="80">&#294;</l:l>
+      <l:l i="80">&#295;</l:l>
+      <l:l i="80">&#542;</l:l>
+      <l:l i="80">&#543;</l:l>
+      <l:l i="80">&#614;</l:l>
+      <l:l i="80">&#7714;</l:l>
+      <l:l i="80">&#7715;</l:l>
+      <l:l i="80">&#7716;</l:l>
+      <l:l i="80">&#7717;</l:l>
+      <l:l i="80">&#7718;</l:l>
+      <l:l i="80">&#7719;</l:l>
+      <l:l i="80">&#7720;</l:l>
+      <l:l i="80">&#7721;</l:l>
+      <l:l i="80">&#7722;</l:l>
+      <l:l i="80">&#7723;</l:l>
+      <l:l i="80">&#7830;</l:l>
+      <l:l i="90">I</l:l>
+      <l:l i="90">i</l:l>
+      <l:l i="90">&#204;</l:l>
+      <l:l i="90">&#236;</l:l>
+      <l:l i="90">&#205;</l:l>
+      <l:l i="90">&#237;</l:l>
+      <l:l i="90">&#206;</l:l>
+      <l:l i="90">&#238;</l:l>
+      <l:l i="90">&#207;</l:l>
+      <l:l i="90">&#239;</l:l>
+      <l:l i="90">&#296;</l:l>
+      <l:l i="90">&#297;</l:l>
+      <l:l i="90">&#298;</l:l>
+      <l:l i="90">&#299;</l:l>
+      <l:l i="90">&#300;</l:l>
+      <l:l i="90">&#301;</l:l>
+      <l:l i="90">&#302;</l:l>
+      <l:l i="90">&#303;</l:l>
+      <l:l i="90">&#304;</l:l>
+      <l:l i="90">&#407;</l:l>
+      <l:l i="90">&#616;</l:l>
+      <l:l i="90">&#463;</l:l>
+      <l:l i="90">&#464;</l:l>
+      <l:l i="90">&#520;</l:l>
+      <l:l i="90">&#521;</l:l>
+      <l:l i="90">&#522;</l:l>
+      <l:l i="90">&#523;</l:l>
+      <l:l i="90">&#7724;</l:l>
+      <l:l i="90">&#7725;</l:l>
+      <l:l i="90">&#7726;</l:l>
+      <l:l i="90">&#7727;</l:l>
+      <l:l i="90">&#7880;</l:l>
+      <l:l i="90">&#7881;</l:l>
+      <l:l i="90">&#7882;</l:l>
+      <l:l i="90">&#7883;</l:l>
+      <l:l i="100">J</l:l>
+      <l:l i="100">j</l:l>
+      <l:l i="100">&#308;</l:l>
+      <l:l i="100">&#309;</l:l>
+      <l:l i="100">&#496;</l:l>
+      <l:l i="100">&#669;</l:l>
+      <l:l i="110">K</l:l>
+      <l:l i="110">k</l:l>
+      <l:l i="110">&#310;</l:l>
+      <l:l i="110">&#311;</l:l>
+      <l:l i="110">&#408;</l:l>
+      <l:l i="110">&#409;</l:l>
+      <l:l i="110">&#488;</l:l>
+      <l:l i="110">&#489;</l:l>
+      <l:l i="110">&#7728;</l:l>
+      <l:l i="110">&#7729;</l:l>
+      <l:l i="110">&#7730;</l:l>
+      <l:l i="110">&#7731;</l:l>
+      <l:l i="110">&#7732;</l:l>
+      <l:l i="110">&#7733;</l:l>
+      <l:l i="120">L</l:l>
+      <l:l i="120">l</l:l>
+      <l:l i="120">&#313;</l:l>
+      <l:l i="120">&#314;</l:l>
+      <l:l i="120">&#315;</l:l>
+      <l:l i="120">&#316;</l:l>
+      <l:l i="120">&#317;</l:l>
+      <l:l i="120">&#318;</l:l>
+      <l:l i="120">&#319;</l:l>
+      <l:l i="120">&#320;</l:l>
+      <l:l i="120">&#321;</l:l>
+      <l:l i="120">&#322;</l:l>
+      <l:l i="120">&#410;</l:l>
+      <l:l i="120">&#456;</l:l>
+      <l:l i="120">&#564;</l:l>
+      <l:l i="120">&#619;</l:l>
+      <l:l i="120">&#620;</l:l>
+      <l:l i="120">&#621;</l:l>
+      <l:l i="120">&#7734;</l:l>
+      <l:l i="120">&#7735;</l:l>
+      <l:l i="120">&#7736;</l:l>
+      <l:l i="120">&#7737;</l:l>
+      <l:l i="120">&#7738;</l:l>
+      <l:l i="120">&#7739;</l:l>
+      <l:l i="120">&#7740;</l:l>
+      <l:l i="120">&#7741;</l:l>
+      <l:l i="130">M</l:l>
+      <l:l i="130">m</l:l>
+      <l:l i="130">&#625;</l:l>
+      <l:l i="130">&#7742;</l:l>
+      <l:l i="130">&#7743;</l:l>
+      <l:l i="130">&#7744;</l:l>
+      <l:l i="130">&#7745;</l:l>
+      <l:l i="130">&#7746;</l:l>
+      <l:l i="130">&#7747;</l:l>
+      <l:l i="140">N</l:l>
+      <l:l i="140">n</l:l>
+      <l:l i="140">&#209;</l:l>
+      <l:l i="140">&#241;</l:l>
+      <l:l i="140">&#323;</l:l>
+      <l:l i="140">&#324;</l:l>
+      <l:l i="140">&#325;</l:l>
+      <l:l i="140">&#326;</l:l>
+      <l:l i="140">&#327;</l:l>
+      <l:l i="140">&#328;</l:l>
+      <l:l i="140">&#413;</l:l>
+      <l:l i="140">&#626;</l:l>
+      <l:l i="140">&#414;</l:l>
+      <l:l i="140">&#544;</l:l>
+      <l:l i="140">&#459;</l:l>
+      <l:l i="140">&#504;</l:l>
+      <l:l i="140">&#505;</l:l>
+      <l:l i="140">&#565;</l:l>
+      <l:l i="140">&#627;</l:l>
+      <l:l i="140">&#7748;</l:l>
+      <l:l i="140">&#7749;</l:l>
+      <l:l i="140">&#7750;</l:l>
+      <l:l i="140">&#7751;</l:l>
+      <l:l i="140">&#7752;</l:l>
+      <l:l i="140">&#7753;</l:l>
+      <l:l i="140">&#7754;</l:l>
+      <l:l i="140">&#7755;</l:l>
+      <l:l i="150">O</l:l>
+      <l:l i="150">o</l:l>
+      <l:l i="150">&#210;</l:l>
+      <l:l i="150">&#242;</l:l>
+      <l:l i="150">&#211;</l:l>
+      <l:l i="150">&#243;</l:l>
+      <l:l i="150">&#212;</l:l>
+      <l:l i="150">&#244;</l:l>
+      <l:l i="150">&#213;</l:l>
+      <l:l i="150">&#245;</l:l>
+      <l:l i="150">&#214;</l:l>
+      <l:l i="150">&#246;</l:l>
+      <l:l i="150">&#216;</l:l>
+      <l:l i="150">&#248;</l:l>
+      <l:l i="150">&#332;</l:l>
+      <l:l i="150">&#333;</l:l>
+      <l:l i="150">&#334;</l:l>
+      <l:l i="150">&#335;</l:l>
+      <l:l i="150">&#336;</l:l>
+      <l:l i="150">&#337;</l:l>
+      <l:l i="150">&#415;</l:l>
+      <l:l i="150">&#416;</l:l>
+      <l:l i="150">&#417;</l:l>
+      <l:l i="150">&#465;</l:l>
+      <l:l i="150">&#466;</l:l>
+      <l:l i="150">&#490;</l:l>
+      <l:l i="150">&#491;</l:l>
+      <l:l i="150">&#492;</l:l>
+      <l:l i="150">&#493;</l:l>
+      <l:l i="150">&#510;</l:l>
+      <l:l i="150">&#511;</l:l>
+      <l:l i="150">&#524;</l:l>
+      <l:l i="150">&#525;</l:l>
+      <l:l i="150">&#526;</l:l>
+      <l:l i="150">&#527;</l:l>
+      <l:l i="150">&#554;</l:l>
+      <l:l i="150">&#555;</l:l>
+      <l:l i="150">&#556;</l:l>
+      <l:l i="150">&#557;</l:l>
+      <l:l i="150">&#558;</l:l>
+      <l:l i="150">&#559;</l:l>
+      <l:l i="150">&#560;</l:l>
+      <l:l i="150">&#561;</l:l>
+      <l:l i="150">&#7756;</l:l>
+      <l:l i="150">&#7757;</l:l>
+      <l:l i="150">&#7758;</l:l>
+      <l:l i="150">&#7759;</l:l>
+      <l:l i="150">&#7760;</l:l>
+      <l:l i="150">&#7761;</l:l>
+      <l:l i="150">&#7762;</l:l>
+      <l:l i="150">&#7763;</l:l>
+      <l:l i="150">&#7884;</l:l>
+      <l:l i="150">&#7885;</l:l>
+      <l:l i="150">&#7886;</l:l>
+      <l:l i="150">&#7887;</l:l>
+      <l:l i="150">&#7888;</l:l>
+      <l:l i="150">&#7889;</l:l>
+      <l:l i="150">&#7890;</l:l>
+      <l:l i="150">&#7891;</l:l>
+      <l:l i="150">&#7892;</l:l>
+      <l:l i="150">&#7893;</l:l>
+      <l:l i="150">&#7894;</l:l>
+      <l:l i="150">&#7895;</l:l>
+      <l:l i="150">&#7896;</l:l>
+      <l:l i="150">&#7897;</l:l>
+      <l:l i="150">&#7898;</l:l>
+      <l:l i="150">&#7899;</l:l>
+      <l:l i="150">&#7900;</l:l>
+      <l:l i="150">&#7901;</l:l>
+      <l:l i="150">&#7902;</l:l>
+      <l:l i="150">&#7903;</l:l>
+      <l:l i="150">&#7904;</l:l>
+      <l:l i="150">&#7905;</l:l>
+      <l:l i="150">&#7906;</l:l>
+      <l:l i="150">&#7907;</l:l>
+      <l:l i="160">P</l:l>
+      <l:l i="160">p</l:l>
+      <l:l i="160">&#420;</l:l>
+      <l:l i="160">&#421;</l:l>
+      <l:l i="160">&#7764;</l:l>
+      <l:l i="160">&#7765;</l:l>
+      <l:l i="160">&#7766;</l:l>
+      <l:l i="160">&#7767;</l:l>
+      <l:l i="170">Q</l:l>
+      <l:l i="170">q</l:l>
+      <l:l i="170">&#672;</l:l>
+      <l:l i="180">R</l:l>
+      <l:l i="180">r</l:l>
+      <l:l i="180">&#340;</l:l>
+      <l:l i="180">&#341;</l:l>
+      <l:l i="180">&#342;</l:l>
+      <l:l i="180">&#343;</l:l>
+      <l:l i="180">&#344;</l:l>
+      <l:l i="180">&#345;</l:l>
+      <l:l i="180">&#528;</l:l>
+      <l:l i="180">&#529;</l:l>
+      <l:l i="180">&#530;</l:l>
+      <l:l i="180">&#531;</l:l>
+      <l:l i="180">&#636;</l:l>
+      <l:l i="180">&#637;</l:l>
+      <l:l i="180">&#638;</l:l>
+      <l:l i="180">&#7768;</l:l>
+      <l:l i="180">&#7769;</l:l>
+      <l:l i="180">&#7770;</l:l>
+      <l:l i="180">&#7771;</l:l>
+      <l:l i="180">&#7772;</l:l>
+      <l:l i="180">&#7773;</l:l>
+      <l:l i="180">&#7774;</l:l>
+      <l:l i="180">&#7775;</l:l>
+      <l:l i="190">S</l:l>
+      <l:l i="190">s</l:l>
+      <l:l i="190">&#346;</l:l>
+      <l:l i="190">&#347;</l:l>
+      <l:l i="190">&#348;</l:l>
+      <l:l i="190">&#349;</l:l>
+      <l:l i="190">&#350;</l:l>
+      <l:l i="190">&#351;</l:l>
+      <l:l i="190">&#352;</l:l>
+      <l:l i="190">&#353;</l:l>
+      <l:l i="190">&#536;</l:l>
+      <l:l i="190">&#537;</l:l>
+      <l:l i="190">&#642;</l:l>
+      <l:l i="190">&#7776;</l:l>
+      <l:l i="190">&#7777;</l:l>
+      <l:l i="190">&#7778;</l:l>
+      <l:l i="190">&#7779;</l:l>
+      <l:l i="190">&#7780;</l:l>
+      <l:l i="190">&#7781;</l:l>
+      <l:l i="190">&#7782;</l:l>
+      <l:l i="190">&#7783;</l:l>
+      <l:l i="190">&#7784;</l:l>
+      <l:l i="190">&#7785;</l:l>
+      <l:l i="200">T</l:l>
+      <l:l i="200">t</l:l>
+      <l:l i="200">&#354;</l:l>
+      <l:l i="200">&#355;</l:l>
+      <l:l i="200">&#356;</l:l>
+      <l:l i="200">&#357;</l:l>
+      <l:l i="200">&#358;</l:l>
+      <l:l i="200">&#359;</l:l>
+      <l:l i="200">&#427;</l:l>
+      <l:l i="200">&#428;</l:l>
+      <l:l i="200">&#429;</l:l>
+      <l:l i="200">&#430;</l:l>
+      <l:l i="200">&#648;</l:l>
+      <l:l i="200">&#538;</l:l>
+      <l:l i="200">&#539;</l:l>
+      <l:l i="200">&#566;</l:l>
+      <l:l i="200">&#7786;</l:l>
+      <l:l i="200">&#7787;</l:l>
+      <l:l i="200">&#7788;</l:l>
+      <l:l i="200">&#7789;</l:l>
+      <l:l i="200">&#7790;</l:l>
+      <l:l i="200">&#7791;</l:l>
+      <l:l i="200">&#7792;</l:l>
+      <l:l i="200">&#7793;</l:l>
+      <l:l i="200">&#7831;</l:l>
+      <l:l i="210">U</l:l>
+      <l:l i="210">u</l:l>
+      <l:l i="210">&#217;</l:l>
+      <l:l i="210">&#249;</l:l>
+      <l:l i="210">&#218;</l:l>
+      <l:l i="210">&#250;</l:l>
+      <l:l i="210">&#219;</l:l>
+      <l:l i="210">&#251;</l:l>
+      <l:l i="210">&#220;</l:l>
+      <l:l i="210">&#252;</l:l>
+      <l:l i="210">&#360;</l:l>
+      <l:l i="210">&#361;</l:l>
+      <l:l i="210">&#362;</l:l>
+      <l:l i="210">&#363;</l:l>
+      <l:l i="210">&#364;</l:l>
+      <l:l i="210">&#365;</l:l>
+      <l:l i="210">&#366;</l:l>
+      <l:l i="210">&#367;</l:l>
+      <l:l i="210">&#368;</l:l>
+      <l:l i="210">&#369;</l:l>
+      <l:l i="210">&#370;</l:l>
+      <l:l i="210">&#371;</l:l>
+      <l:l i="210">&#431;</l:l>
+      <l:l i="210">&#432;</l:l>
+      <l:l i="210">&#467;</l:l>
+      <l:l i="210">&#468;</l:l>
+      <l:l i="210">&#469;</l:l>
+      <l:l i="210">&#470;</l:l>
+      <l:l i="210">&#471;</l:l>
+      <l:l i="210">&#472;</l:l>
+      <l:l i="210">&#473;</l:l>
+      <l:l i="210">&#474;</l:l>
+      <l:l i="210">&#475;</l:l>
+      <l:l i="210">&#476;</l:l>
+      <l:l i="210">&#532;</l:l>
+      <l:l i="210">&#533;</l:l>
+      <l:l i="210">&#534;</l:l>
+      <l:l i="210">&#535;</l:l>
+      <l:l i="210">&#7794;</l:l>
+      <l:l i="210">&#7795;</l:l>
+      <l:l i="210">&#7796;</l:l>
+      <l:l i="210">&#7797;</l:l>
+      <l:l i="210">&#7798;</l:l>
+      <l:l i="210">&#7799;</l:l>
+      <l:l i="210">&#7800;</l:l>
+      <l:l i="210">&#7801;</l:l>
+      <l:l i="210">&#7802;</l:l>
+      <l:l i="210">&#7803;</l:l>
+      <l:l i="210">&#7908;</l:l>
+      <l:l i="210">&#7909;</l:l>
+      <l:l i="210">&#7910;</l:l>
+      <l:l i="210">&#7911;</l:l>
+      <l:l i="210">&#7912;</l:l>
+      <l:l i="210">&#7913;</l:l>
+      <l:l i="210">&#7914;</l:l>
+      <l:l i="210">&#7915;</l:l>
+      <l:l i="210">&#7916;</l:l>
+      <l:l i="210">&#7917;</l:l>
+      <l:l i="210">&#7918;</l:l>
+      <l:l i="210">&#7919;</l:l>
+      <l:l i="210">&#7920;</l:l>
+      <l:l i="210">&#7921;</l:l>
+      <l:l i="220">V</l:l>
+      <l:l i="220">v</l:l>
+      <l:l i="220">&#434;</l:l>
+      <l:l i="220">&#651;</l:l>
+      <l:l i="220">&#7804;</l:l>
+      <l:l i="220">&#7805;</l:l>
+      <l:l i="220">&#7806;</l:l>
+      <l:l i="220">&#7807;</l:l>
+      <l:l i="230">W</l:l>
+      <l:l i="230">w</l:l>
+      <l:l i="230">&#372;</l:l>
+      <l:l i="230">&#373;</l:l>
+      <l:l i="230">&#7808;</l:l>
+      <l:l i="230">&#7809;</l:l>
+      <l:l i="230">&#7810;</l:l>
+      <l:l i="230">&#7811;</l:l>
+      <l:l i="230">&#7812;</l:l>
+      <l:l i="230">&#7813;</l:l>
+      <l:l i="230">&#7814;</l:l>
+      <l:l i="230">&#7815;</l:l>
+      <l:l i="230">&#7816;</l:l>
+      <l:l i="230">&#7817;</l:l>
+      <l:l i="230">&#7832;</l:l>
+      <l:l i="240">X</l:l>
+      <l:l i="240">x</l:l>
+      <l:l i="240">&#7818;</l:l>
+      <l:l i="240">&#7819;</l:l>
+      <l:l i="240">&#7820;</l:l>
+      <l:l i="240">&#7821;</l:l>
+      <l:l i="250">Y</l:l>
+      <l:l i="250">y</l:l>
+      <l:l i="250">&#221;</l:l>
+      <l:l i="250">&#253;</l:l>
+      <l:l i="250">&#255;</l:l>
+      <l:l i="250">&#376;</l:l>
+      <l:l i="250">&#374;</l:l>
+      <l:l i="250">&#375;</l:l>
+      <l:l i="250">&#435;</l:l>
+      <l:l i="250">&#436;</l:l>
+      <l:l i="250">&#562;</l:l>
+      <l:l i="250">&#563;</l:l>
+      <l:l i="250">&#7822;</l:l>
+      <l:l i="250">&#7823;</l:l>
+      <l:l i="250">&#7833;</l:l>
+      <l:l i="250">&#7922;</l:l>
+      <l:l i="250">&#7923;</l:l>
+      <l:l i="250">&#7924;</l:l>
+      <l:l i="250">&#7925;</l:l>
+      <l:l i="250">&#7926;</l:l>
+      <l:l i="250">&#7927;</l:l>
+      <l:l i="250">&#7928;</l:l>
+      <l:l i="250">&#7929;</l:l>
+      <l:l i="260">Z</l:l>
+      <l:l i="260">z</l:l>
+      <l:l i="260">&#377;</l:l>
+      <l:l i="260">&#378;</l:l>
+      <l:l i="260">&#379;</l:l>
+      <l:l i="260">&#380;</l:l>
+      <l:l i="260">&#381;</l:l>
+      <l:l i="260">&#382;</l:l>
+      <l:l i="260">&#437;</l:l>
+      <l:l i="260">&#438;</l:l>
+      <l:l i="260">&#548;</l:l>
+      <l:l i="260">&#549;</l:l>
+      <l:l i="260">&#656;</l:l>
+      <l:l i="260">&#657;</l:l>
+      <l:l i="260">&#7824;</l:l>
+      <l:l i="260">&#7825;</l:l>
+      <l:l i="260">&#7826;</l:l>
+      <l:l i="260">&#7827;</l:l>
+      <l:l i="260">&#7828;</l:l>
+      <l:l i="260">&#7829;</l:l>
+   </l:letters>
+</l:l10n>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/fi.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/fi.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/fi.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1153 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="fi" english-language-name="Finnish">
+
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+   <l:gentext key="Abstract" text="Lyhennelm&#228;"/>
+   <l:gentext key="abstract" text="Lyhennelm&#228;"/>
+   <l:gentext key="Answer" text="A:"/>
+   <l:gentext key="answer" text="A:"/>
+   <l:gentext key="Appendix" text="Liite"/>
+   <l:gentext key="appendix" text="liite"/>
+   <l:gentext key="Article" text="Artikkeli"/>
+   <l:gentext key="article" text="Artikkeli"/>
+   <l:gentext key="Bibliography" text="L&#228;hteet"/>
+   <l:gentext key="bibliography" text="L&#228;hteet"/>
+   <l:gentext key="Book" text="Kirja"/>
+   <l:gentext key="book" text="Kirja"/>
+   <l:gentext key="CAUTION" text="VARO"/>
+   <l:gentext key="Caution" text="Varo"/>
+   <l:gentext key="caution" text="Varo"/>
+   <l:gentext key="Chapter" text="Luku"/>
+   <l:gentext key="chapter" text="luku"/>
+   <l:gentext key="Colophon" text="Colophon"/>
+   <l:gentext key="colophon" text="Colophon"/>
+   <l:gentext key="Copyright" text="Copyright"/>
+   <l:gentext key="copyright" text="Copyright"/>
+   <l:gentext key="Dedication" text="Omistus"/>
+   <l:gentext key="dedication" text="Omistus"/>
+   <l:gentext key="Edition" text="Edition"/>
+   <l:gentext key="edition" text="Edition"/>
+   <l:gentext key="Equation" text="Kaava"/>
+   <l:gentext key="equation" text="Kaava"/>
+   <l:gentext key="Example" text="Esimerkki"/>
+   <l:gentext key="example" text="Esimerkki"/>
+   <l:gentext key="Figure" text="Kuva"/>
+   <l:gentext key="figure" text="Kuva"/>
+   <l:gentext key="Glossary" text="Sanasto"/>
+   <l:gentext key="glossary" text="Sanasto"/>
+   <l:gentext key="GlossSee" text="Katso"/>
+   <l:gentext key="glosssee" text="Katso"/>
+   <l:gentext key="GlossSeeAlso" text="Katso my&#246;s"/>
+   <l:gentext key="glossseealso" text="Katso my&#246;s"/>
+   <l:gentext key="IMPORTANT" text="T&#196;RKE&#196;&#196;"/>
+   <l:gentext key="important" text="T&#228;rke&#228;&#228;"/>
+   <l:gentext key="Important" text="T&#228;rke&#228;&#228;"/>
+   <l:gentext key="Index" text="Indeksi"/>
+   <l:gentext key="index" text="Indeksi"/>
+   <l:gentext key="ISBN" text="ISBN"/>
+   <l:gentext key="isbn" text="ISBN"/>
+   <l:gentext key="LegalNotice" text="Legal Notice"/>
+   <l:gentext key="legalnotice" text="Legal Notice"/>
+   <l:gentext key="MsgAud" text="Yleis&#246;"/>
+   <l:gentext key="msgaud" text="Yleis&#246;"/>
+   <l:gentext key="MsgLevel" text="Taso"/>
+   <l:gentext key="msglevel" text="Taso"/>
+   <l:gentext key="MsgOrig" text="Alkuper&#228;"/>
+   <l:gentext key="msgorig" text="Alkuper&#228;"/>
+   <l:gentext key="NOTE" text="HUOMAA"/>
+   <l:gentext key="Note" text="Huomaa"/>
+   <l:gentext key="note" text="Huomaa"/>
+   <l:gentext key="Part" text="Osa"/>
+   <l:gentext key="part" text="Osa"/>
+   <l:gentext key="Preface" text="Esipuhe"/>
+   <l:gentext key="preface" text="Esipuhe"/>
+   <l:gentext key="Procedure" text="Aliohjelma"/>
+   <l:gentext key="procedure" text="Aliohjelma"/>
+   <l:gentext key="ProductionSet" text="Production"/>
+   <l:gentext key="PubDate" text="Publication Date" lang="en"/>
+   <l:gentext key="pubdate" text="Publication date" lang="en"/>
+   <l:gentext key="Published" text="Julkaistu"/>
+   <l:gentext key="published" text="Julkaistu"/>
+   <l:gentext key="Qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="Question" text="Q:"/>
+   <l:gentext key="question" text="Q:"/>
+   <l:gentext key="RefEntry" text=""/>
+   <l:gentext key="refentry" text=""/>
+   <l:gentext key="Reference" text="L&#228;hdeluettelo"/>
+   <l:gentext key="reference" text="L&#228;hdeluettelo"/>
+   <l:gentext key="RefName" text="Nimi"/>
+   <l:gentext key="refname" text="Nimi"/>
+   <l:gentext key="RefSection" text=""/>
+   <l:gentext key="refsection" text=""/>
+   <l:gentext key="RefSynopsisDiv" text="Synopsis"/>
+   <l:gentext key="refsynopsisdiv" text="Synopsis"/>
+   <l:gentext key="RevHistory" text="Versiohistoria"/>
+   <l:gentext key="revhistory" text="Versiohistoria"/>
+   <l:gentext key="revision" text="Versio"/>
+   <l:gentext key="Revision" text="Versio"/>
+   <l:gentext key="sect1" text="Section"/>
+   <l:gentext key="sect2" text="Section"/>
+   <l:gentext key="sect3" text="Section"/>
+   <l:gentext key="sect4" text="Section"/>
+   <l:gentext key="sect5" text="Section"/>
+   <l:gentext key="section" text="kohta"/>
+   <l:gentext key="Section" text="Kohta"/>
+   <l:gentext key="see" text="Katso"/>
+   <l:gentext key="See" text="Katso"/>
+   <l:gentext key="seealso" text="Katso my&#246;s"/>
+   <l:gentext key="Seealso" text="Katso my&#246;s"/>
+   <l:gentext key="SeeAlso" text="Katso my&#246;s"/>
+   <l:gentext key="set" text="Kokoelma"/>
+   <l:gentext key="Set" text="Kokoelma"/>
+   <l:gentext key="setindex" text="Kokoelman indeksi"/>
+   <l:gentext key="SetIndex" text="Kokoelman indeksi"/>
+   <l:gentext key="Sidebar" text=""/>
+   <l:gentext key="sidebar" text="sivupalkki"/>
+   <l:gentext key="step" text="step"/>
+   <l:gentext key="Step" text="Step"/>
+   <l:gentext key="Table" text="Taulu"/>
+   <l:gentext key="table" text="Taulu"/>
+   <l:gentext key="tip" text="Vihje"/>
+   <l:gentext key="TIP" text="VIHJE"/>
+   <l:gentext key="Tip" text="Vihje"/>
+   <l:gentext key="Warning" text="Varoitus"/>
+   <l:gentext key="warning" text="Varoitus"/>
+   <l:gentext key="WARNING" text="VAROITUS"/>
+   <l:gentext key="and" text="ja"/>
+   <l:gentext key="by" text="by"/>
+   <l:gentext key="called" text="called" lang="en"/>
+   <l:gentext key="Edited" text="Toim."/>
+   <l:gentext key="edited" text="Toim."/>
+   <l:gentext key="Editedby" text="Toimittanut"/>
+   <l:gentext key="editedby" text="Toimittanut"/>
+   <l:gentext key="in" text="teoksessa"/>
+   <l:gentext key="lastlistcomma" text=","/>
+   <l:gentext key="listcomma" text=","/>
+   <l:gentext key="nonexistantelement" text="elementti&#228; ei ole olemassa"/>
+   <l:gentext key="notes" text="Notes"/>
+   <l:gentext key="Notes" text="Notes"/>
+   <l:gentext key="Pgs" text="Sivut"/>
+   <l:gentext key="pgs" text="Sivut"/>
+   <l:gentext key="Revisedby" text="Revised by: "/>
+   <l:gentext key="revisedby" text="Revised by: "/>
+   <l:gentext key="TableNotes" text="Notes"/>
+   <l:gentext key="tablenotes" text="Notes"/>
+   <l:gentext key="TableofContents" text="Sis&#228;llys"/>
+   <l:gentext key="tableofcontents" text="Sis&#228;llys"/>
+   <l:gentext key="the" text="" lang="en"/>
+   <l:gentext key="unexpectedelementname" text="Odottamaton elementin nimi"/>
+   <l:gentext key="unsupported" text="ei tueta"/>
+   <l:gentext key="xrefto" text="xref johonkin"/>
+   <l:gentext key="listofequations" text="Luettelo esimerkeist&#228;"/>
+   <l:gentext key="ListofEquations" text="Luettelo esimerkeist&#228;"/>
+   <l:gentext key="ListofExamples" text="Luettelo esimerkeist&#228;"/>
+   <l:gentext key="listofexamples" text="Luettelo esimerkeist&#228;"/>
+   <l:gentext key="ListofFigures" text="Luettelo kuvista"/>
+   <l:gentext key="listoffigures" text="Luettelo kuvista"/>
+   <l:gentext key="ListofProcedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listofprocedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listoftables" text="Luettelo tauluista"/>
+   <l:gentext key="ListofTables" text="Luettelo tauluista"/>
+   <l:gentext key="ListofUnknown" text="Luettelo tuntemattomista"/>
+   <l:gentext key="listofunknown" text="Luettelo tuntemattomista"/>
+   <l:gentext key="nav-home" text="Alkuun"/>
+   <l:gentext key="nav-next" text="Seuraava"/>
+   <l:gentext key="nav-next-sibling" text="Nopeasti eteenp&#228;in"/>
+   <l:gentext key="nav-prev" text="Edellinen"/>
+   <l:gentext key="nav-prev-sibling" text="Nopeasti taaksep&#228;in"/>
+   <l:gentext key="nav-up" text="Yl&#246;s"/>
+   <l:gentext key="nav-toc" text="ToC" lang="en"/>
+   <l:gentext key="Draft" text="Draft"/>
+   <l:gentext key="above" text="above"/>
+   <l:gentext key="below" text="below"/>
+   <l:gentext key="sectioncalled" text="the section called"/>
+   <l:gentext key="index symbols" text="Symbols"/>
+   <l:gentext key="lowercase.alpha" text="abcdefghijklmnopqrstuvwxyz"/>
+   <l:gentext key="uppercase.alpha" text="ABCDEFGHIJKLMNOPQRSTUVWXYZ"/>
+   <l:dingbat key="startquote" text="&#8220;"/>
+   <l:dingbat key="endquote" text="&#8221;"/>
+   <l:dingbat key="nestedstartquote" text="&#8216;"/>
+   <l:dingbat key="nestedendquote" text="&#8217;"/>
+   <l:dingbat key="singlestartquote" text="&#8216;" lang="en"/>
+   <l:dingbat key="singleendquote" text="&#8217;" lang="en"/>
+   <l:dingbat key="bullet" text="&#8226;"/>
+   <l:gentext key="hyphenation-character" text="-" lang="en"/>
+   <l:gentext key="hyphenation-push-character-count" text="2" lang="en"/>
+   <l:gentext key="hyphenation-remain-character-count" text="2" lang="en"/>
+
+   <l:context name="styles">
+      <l:template name="person-name" text="first-last"/>
+   </l:context>
+
+   <l:context name="title">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="%t"/>
+      <l:template name="appendix" text="Liite %n. %t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="biblioentry" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliolist" text="%t" lang="en"/>
+      <l:template name="bibliomixed" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="Luku %n. %t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="Kaava %n. %t"/>
+      <l:template name="example" text="Esimerkki %n. %t"/>
+      <l:template name="figure" text="Kuva %n. %t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="glosslist" text="%t" lang="en"/>
+      <l:template name="glossentry" text="%t" lang="en"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text=""/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="Osa %n. %t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="procedure.formal" text="Aliohjelma&#160;%n.&#160;%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="productionset.formal" text="Production&#160;%n"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="%t"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="%t"/>
+      <l:template name="refentry" text="%t"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsection" text="%t"/>
+      <l:template name="refsect1" text="%t"/>
+      <l:template name="refsect2" text="%t"/>
+      <l:template name="refsect3" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="refsynopsisdivinfo" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="step" text="%t"/>
+      <l:template name="table" text="Taulu %n. %t"/>
+      <l:template name="task" text="%t" lang="en"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="" lang="en"/>
+      <l:template name="warning" text="%t"/>
+   </l:context>
+
+   <l:context name="title-unnumbered">
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article/appendix" text="%t" lang="en"/>
+      <l:template name="bridgehead" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="sect1" text="%t"/>
+      <l:template name="sect2" text="%t"/>
+      <l:template name="sect3" text="%t"/>
+      <l:template name="sect4" text="%t"/>
+      <l:template name="sect5" text="%t"/>
+      <l:template name="section" text="%t"/>
+      <l:template name="simplesect" text="%t"/>
+   </l:context>
+
+   <l:context name="title-numbered">
+      <l:template name="appendix" text="Liite %n. %t"/>
+      <l:template name="article/appendix" text="%n.&#160;%t" lang="en"/>
+      <l:template name="bridgehead" text="%t"/>
+      <l:template name="chapter" text="Luku %n. %t"/>
+      <l:template name="sect1" text="%n. %t"/>
+      <l:template name="sect2" text="%n. %t"/>
+      <l:template name="sect3" text="%n. %t"/>
+      <l:template name="sect4" text="%n. %t"/>
+      <l:template name="sect5" text="%n. %t"/>
+      <l:template name="section" text="%n. %t"/>
+      <l:template name="simplesect" text="%n. %t"/>
+   </l:context>
+
+   <l:context name="subtitle">
+      <l:template name="appendix" text="%s"/>
+      <l:template name="article" text="%s"/>
+      <l:template name="bibliodiv" text="%s"/>
+      <l:template name="biblioentry" text="%s"/>
+      <l:template name="bibliography" text="%s"/>
+      <l:template name="bibliomixed" text="%s"/>
+      <l:template name="bibliomset" text="%s"/>
+      <l:template name="biblioset" text="%s"/>
+      <l:template name="book" text="%s"/>
+      <l:template name="chapter" text="%s"/>
+      <l:template name="colophon" text="%s"/>
+      <l:template name="dedication" text="%s"/>
+      <l:template name="glossary" text="%s"/>
+      <l:template name="glossdiv" text="%s"/>
+      <l:template name="index" text="%s"/>
+      <l:template name="indexdiv" text="%s"/>
+      <l:template name="lot" text="%s"/>
+      <l:template name="part" text="%s"/>
+      <l:template name="partintro" text="%s"/>
+      <l:template name="preface" text="%s"/>
+      <l:template name="refentry" text="%s"/>
+      <l:template name="reference" text="%s"/>
+      <l:template name="refsection" text="%s"/>
+      <l:template name="refsect1" text="%s"/>
+      <l:template name="refsect2" text="%s"/>
+      <l:template name="refsect3" text="%s"/>
+      <l:template name="refsynopsisdiv" text="%s"/>
+      <l:template name="sect1" text="%s"/>
+      <l:template name="sect2" text="%s"/>
+      <l:template name="sect3" text="%s"/>
+      <l:template name="sect4" text="%s"/>
+      <l:template name="sect5" text="%s"/>
+      <l:template name="section" text="%s"/>
+      <l:template name="set" text="%s"/>
+      <l:template name="setindex" text="%s"/>
+      <l:template name="sidebar" text="%s"/>
+      <l:template name="simplesect" text="%s"/>
+      <l:template name="toc" text="%s"/>
+   </l:context>
+
+   <l:context name="xref">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="A:&#160;%n"/>
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="constraintdef" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="%t"/>
+      <l:template name="example" text="%t"/>
+      <l:template name="figure" text="%t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text="%n"/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="%t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="Q:&#160;%n"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="Q:&#160;%n"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="table" text="%t"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="%n"/>
+      <l:template name="warning" text="%t"/>
+      <l:template name="page.citation" text=" [%p]"/>
+      <l:template name="page" text="(page %p)" lang="en"/>
+      <l:template name="pageabbrev" text="(p. %p)" lang="en"/>
+      <l:template name="Page" text="Page %p" lang="en"/>
+      <l:template name="bridgehead" text="&#8220;%t&#8221;"/>
+      <l:template name="refsection" text="&#8220;%t&#8221;"/>
+      <l:template name="refsect1" text="&#8220;%t&#8221;"/>
+      <l:template name="refsect2" text="&#8220;%t&#8221;"/>
+      <l:template name="refsect3" text="&#8220;%t&#8221;"/>
+      <l:template name="sect1" text="&#8220;%t&#8221;"/>
+      <l:template name="sect2" text="&#8220;%t&#8221;"/>
+      <l:template name="sect3" text="&#8220;%t&#8221;"/>
+      <l:template name="sect4" text="&#8220;%t&#8221;"/>
+      <l:template name="sect5" text="&#8220;%t&#8221;"/>
+      <l:template name="section" text="&#8220;%t&#8221;"/>
+      <l:template name="simplesect" text="&#8220;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="xref-number">
+      <l:template name="answer" text="A:&#160;%n"/>
+      <l:template name="appendix" text="Liite&#160;%n"/>
+      <l:template name="bridgehead" text="Kohta&#160;%n"/>
+      <l:template name="chapter" text="Luku&#160;%n"/>
+      <l:template name="equation" text="Kaava&#160;%n"/>
+      <l:template name="example" text="Esimerkki&#160;%n"/>
+      <l:template name="figure" text="Kuva&#160;%n"/>
+      <l:template name="part" text="Osa&#160;%n"/>
+      <l:template name="procedure" text="Aliohjelma&#160;%n"/>
+      <l:template name="productionset" text="Production&#160;%n"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n"/>
+      <l:template name="qandaentry" text="Q:&#160;%n"/>
+      <l:template name="question" text="Q:&#160;%n"/>
+      <l:template name="sect1" text="Kohta&#160;%n"/>
+      <l:template name="sect2" text="Kohta&#160;%n"/>
+      <l:template name="sect3" text="Kohta&#160;%n"/>
+      <l:template name="sect4" text="Kohta&#160;%n"/>
+      <l:template name="sect5" text="Kohta&#160;%n"/>
+      <l:template name="section" text="Kohta&#160;%n"/>
+      <l:template name="table" text="Taulu&#160;%n"/>
+   </l:context>
+
+   <l:context name="xref-number-and-title">
+      <l:template name="appendix" text="Liite&#160;%n, %t"/>
+      <l:template name="bridgehead" text="Kohta&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="chapter" text="Luku&#160;%n, %t"/>
+      <l:template name="equation" text="Kaava&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="example" text="Esimerkki&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="figure" text="Kuva&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="part" text="Osa&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="procedure" text="Aliohjelma&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="productionset" text="Production&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="refsect1" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="refsect2" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="refsect3" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="refsection" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="sect1" text="Kohta&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect2" text="Kohta&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect3" text="Kohta&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect4" text="Kohta&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect5" text="Kohta&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="section" text="Kohta&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="simplesect" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="table" text="Taulu&#160;%n, &#8220;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="authorgroup">
+      <l:template name="sep" text=", "/>
+      <l:template name="sep2" text=" ja "/>
+      <l:template name="seplast" text=", ja "/>
+   </l:context>
+
+   <l:context name="glossary">
+      <l:template name="see" text="Katso "/>
+      <l:template name="seealso" text="Katso my&#246;s "/>
+   </l:context>
+
+   <l:context name="msgset">
+      <l:template name="MsgAud" text="Yleis&#246;: "/>
+      <l:template name="MsgLevel" text="Taso: "/>
+      <l:template name="MsgOrig" text="Alkuper&#228;: "/>
+   </l:context>
+
+   <l:context name="datetime">
+      <l:template name="format" text="m/d/Y" lang="en"/>
+   </l:context>
+
+   <l:context name="datetime-full">
+      <l:template name="January" text="January" lang="en"/>
+      <l:template name="February" text="February" lang="en"/>
+      <l:template name="March" text="March" lang="en"/>
+      <l:template name="April" text="April" lang="en"/>
+      <l:template name="May" text="May" lang="en"/>
+      <l:template name="June" text="June" lang="en"/>
+      <l:template name="July" text="July" lang="en"/>
+      <l:template name="August" text="August" lang="en"/>
+      <l:template name="September" text="September" lang="en"/>
+      <l:template name="October" text="October" lang="en"/>
+      <l:template name="November" text="November" lang="en"/>
+      <l:template name="December" text="December" lang="en"/>
+      <l:template name="Monday" text="Monday" lang="en"/>
+      <l:template name="Tuesday" text="Tuesday" lang="en"/>
+      <l:template name="Wednesday" text="Wednesday" lang="en"/>
+      <l:template name="Thursday" text="Thursday" lang="en"/>
+      <l:template name="Friday" text="Friday" lang="en"/>
+      <l:template name="Saturday" text="Saturday" lang="en"/>
+      <l:template name="Sunday" text="Sunday" lang="en"/>
+   </l:context>
+
+   <l:context name="datetime-abbrev">
+      <l:template name="Jan" text="Jan" lang="en"/>
+      <l:template name="Feb" text="Feb" lang="en"/>
+      <l:template name="Mar" text="Mar" lang="en"/>
+      <l:template name="Apr" text="Apr" lang="en"/>
+      <l:template name="May" text="May" lang="en"/>
+      <l:template name="Jun" text="Jun" lang="en"/>
+      <l:template name="Jul" text="Jul" lang="en"/>
+      <l:template name="Aug" text="Aug" lang="en"/>
+      <l:template name="Sep" text="Sep" lang="en"/>
+      <l:template name="Oct" text="Oct" lang="en"/>
+      <l:template name="Nov" text="Nov" lang="en"/>
+      <l:template name="Dec" text="Dec" lang="en"/>
+      <l:template name="Mon" text="Mon" lang="en"/>
+      <l:template name="Tue" text="Tue" lang="en"/>
+      <l:template name="Wed" text="Wed" lang="en"/>
+      <l:template name="Thu" text="Thu" lang="en"/>
+      <l:template name="Fri" text="Fri" lang="en"/>
+      <l:template name="Sat" text="Sat" lang="en"/>
+      <l:template name="Sun" text="Sun" lang="en"/>
+   </l:context>
+
+   <l:context name="htmlhelp">
+      <l:template name="langcode" text="0x040b Finnish"/>
+   </l:context>
+
+   <l:letters lang="en">
+      <l:l i="-1"/>
+      <l:l i="0">Symbols</l:l>
+      <l:l i="10">A</l:l>
+      <l:l i="10">a</l:l>
+      <l:l i="10">&#192;</l:l>
+      <l:l i="10">&#224;</l:l>
+      <l:l i="10">&#193;</l:l>
+      <l:l i="10">&#225;</l:l>
+      <l:l i="10">&#194;</l:l>
+      <l:l i="10">&#226;</l:l>
+      <l:l i="10">&#195;</l:l>
+      <l:l i="10">&#227;</l:l>
+      <l:l i="10">&#196;</l:l>
+      <l:l i="10">&#228;</l:l>
+      <l:l i="10">&#197;</l:l>
+      <l:l i="10">&#229;</l:l>
+      <l:l i="10">&#256;</l:l>
+      <l:l i="10">&#257;</l:l>
+      <l:l i="10">&#258;</l:l>
+      <l:l i="10">&#259;</l:l>
+      <l:l i="10">&#260;</l:l>
+      <l:l i="10">&#261;</l:l>
+      <l:l i="10">&#461;</l:l>
+      <l:l i="10">&#462;</l:l>
+      <l:l i="10">&#478;</l:l>
+      <l:l i="10">&#479;</l:l>
+      <l:l i="10">&#480;</l:l>
+      <l:l i="10">&#481;</l:l>
+      <l:l i="10">&#506;</l:l>
+      <l:l i="10">&#507;</l:l>
+      <l:l i="10">&#512;</l:l>
+      <l:l i="10">&#513;</l:l>
+      <l:l i="10">&#514;</l:l>
+      <l:l i="10">&#515;</l:l>
+      <l:l i="10">&#550;</l:l>
+      <l:l i="10">&#551;</l:l>
+      <l:l i="10">&#7680;</l:l>
+      <l:l i="10">&#7681;</l:l>
+      <l:l i="10">&#7834;</l:l>
+      <l:l i="10">&#7840;</l:l>
+      <l:l i="10">&#7841;</l:l>
+      <l:l i="10">&#7842;</l:l>
+      <l:l i="10">&#7843;</l:l>
+      <l:l i="10">&#7844;</l:l>
+      <l:l i="10">&#7845;</l:l>
+      <l:l i="10">&#7846;</l:l>
+      <l:l i="10">&#7847;</l:l>
+      <l:l i="10">&#7848;</l:l>
+      <l:l i="10">&#7849;</l:l>
+      <l:l i="10">&#7850;</l:l>
+      <l:l i="10">&#7851;</l:l>
+      <l:l i="10">&#7852;</l:l>
+      <l:l i="10">&#7853;</l:l>
+      <l:l i="10">&#7854;</l:l>
+      <l:l i="10">&#7855;</l:l>
+      <l:l i="10">&#7856;</l:l>
+      <l:l i="10">&#7857;</l:l>
+      <l:l i="10">&#7858;</l:l>
+      <l:l i="10">&#7859;</l:l>
+      <l:l i="10">&#7860;</l:l>
+      <l:l i="10">&#7861;</l:l>
+      <l:l i="10">&#7862;</l:l>
+      <l:l i="10">&#7863;</l:l>
+      <l:l i="20">B</l:l>
+      <l:l i="20">b</l:l>
+      <l:l i="20">&#384;</l:l>
+      <l:l i="20">&#385;</l:l>
+      <l:l i="20">&#595;</l:l>
+      <l:l i="20">&#386;</l:l>
+      <l:l i="20">&#387;</l:l>
+      <l:l i="20">&#7682;</l:l>
+      <l:l i="20">&#7683;</l:l>
+      <l:l i="20">&#7684;</l:l>
+      <l:l i="20">&#7685;</l:l>
+      <l:l i="20">&#7686;</l:l>
+      <l:l i="20">&#7687;</l:l>
+      <l:l i="30">C</l:l>
+      <l:l i="30">c</l:l>
+      <l:l i="30">&#199;</l:l>
+      <l:l i="30">&#231;</l:l>
+      <l:l i="30">&#262;</l:l>
+      <l:l i="30">&#263;</l:l>
+      <l:l i="30">&#264;</l:l>
+      <l:l i="30">&#265;</l:l>
+      <l:l i="30">&#266;</l:l>
+      <l:l i="30">&#267;</l:l>
+      <l:l i="30">&#268;</l:l>
+      <l:l i="30">&#269;</l:l>
+      <l:l i="30">&#391;</l:l>
+      <l:l i="30">&#392;</l:l>
+      <l:l i="30">&#597;</l:l>
+      <l:l i="30">&#7688;</l:l>
+      <l:l i="30">&#7689;</l:l>
+      <l:l i="40">D</l:l>
+      <l:l i="40">d</l:l>
+      <l:l i="40">&#270;</l:l>
+      <l:l i="40">&#271;</l:l>
+      <l:l i="40">&#272;</l:l>
+      <l:l i="40">&#273;</l:l>
+      <l:l i="40">&#394;</l:l>
+      <l:l i="40">&#599;</l:l>
+      <l:l i="40">&#395;</l:l>
+      <l:l i="40">&#396;</l:l>
+      <l:l i="40">&#453;</l:l>
+      <l:l i="40">&#498;</l:l>
+      <l:l i="40">&#545;</l:l>
+      <l:l i="40">&#598;</l:l>
+      <l:l i="40">&#7690;</l:l>
+      <l:l i="40">&#7691;</l:l>
+      <l:l i="40">&#7692;</l:l>
+      <l:l i="40">&#7693;</l:l>
+      <l:l i="40">&#7694;</l:l>
+      <l:l i="40">&#7695;</l:l>
+      <l:l i="40">&#7696;</l:l>
+      <l:l i="40">&#7697;</l:l>
+      <l:l i="40">&#7698;</l:l>
+      <l:l i="40">&#7699;</l:l>
+      <l:l i="50">E</l:l>
+      <l:l i="50">e</l:l>
+      <l:l i="50">&#200;</l:l>
+      <l:l i="50">&#232;</l:l>
+      <l:l i="50">&#201;</l:l>
+      <l:l i="50">&#233;</l:l>
+      <l:l i="50">&#202;</l:l>
+      <l:l i="50">&#234;</l:l>
+      <l:l i="50">&#203;</l:l>
+      <l:l i="50">&#235;</l:l>
+      <l:l i="50">&#274;</l:l>
+      <l:l i="50">&#275;</l:l>
+      <l:l i="50">&#276;</l:l>
+      <l:l i="50">&#277;</l:l>
+      <l:l i="50">&#278;</l:l>
+      <l:l i="50">&#279;</l:l>
+      <l:l i="50">&#280;</l:l>
+      <l:l i="50">&#281;</l:l>
+      <l:l i="50">&#282;</l:l>
+      <l:l i="50">&#283;</l:l>
+      <l:l i="50">&#516;</l:l>
+      <l:l i="50">&#517;</l:l>
+      <l:l i="50">&#518;</l:l>
+      <l:l i="50">&#519;</l:l>
+      <l:l i="50">&#552;</l:l>
+      <l:l i="50">&#553;</l:l>
+      <l:l i="50">&#7700;</l:l>
+      <l:l i="50">&#7701;</l:l>
+      <l:l i="50">&#7702;</l:l>
+      <l:l i="50">&#7703;</l:l>
+      <l:l i="50">&#7704;</l:l>
+      <l:l i="50">&#7705;</l:l>
+      <l:l i="50">&#7706;</l:l>
+      <l:l i="50">&#7707;</l:l>
+      <l:l i="50">&#7708;</l:l>
+      <l:l i="50">&#7709;</l:l>
+      <l:l i="50">&#7864;</l:l>
+      <l:l i="50">&#7865;</l:l>
+      <l:l i="50">&#7866;</l:l>
+      <l:l i="50">&#7867;</l:l>
+      <l:l i="50">&#7868;</l:l>
+      <l:l i="50">&#7869;</l:l>
+      <l:l i="50">&#7870;</l:l>
+      <l:l i="50">&#7871;</l:l>
+      <l:l i="50">&#7872;</l:l>
+      <l:l i="50">&#7873;</l:l>
+      <l:l i="50">&#7874;</l:l>
+      <l:l i="50">&#7875;</l:l>
+      <l:l i="50">&#7876;</l:l>
+      <l:l i="50">&#7877;</l:l>
+      <l:l i="50">&#7878;</l:l>
+      <l:l i="50">&#7879;</l:l>
+      <l:l i="60">F</l:l>
+      <l:l i="60">f</l:l>
+      <l:l i="60">&#401;</l:l>
+      <l:l i="60">&#402;</l:l>
+      <l:l i="60">&#7710;</l:l>
+      <l:l i="60">&#7711;</l:l>
+      <l:l i="70">G</l:l>
+      <l:l i="70">g</l:l>
+      <l:l i="70">&#284;</l:l>
+      <l:l i="70">&#285;</l:l>
+      <l:l i="70">&#286;</l:l>
+      <l:l i="70">&#287;</l:l>
+      <l:l i="70">&#288;</l:l>
+      <l:l i="70">&#289;</l:l>
+      <l:l i="70">&#290;</l:l>
+      <l:l i="70">&#291;</l:l>
+      <l:l i="70">&#403;</l:l>
+      <l:l i="70">&#608;</l:l>
+      <l:l i="70">&#484;</l:l>
+      <l:l i="70">&#485;</l:l>
+      <l:l i="70">&#486;</l:l>
+      <l:l i="70">&#487;</l:l>
+      <l:l i="70">&#500;</l:l>
+      <l:l i="70">&#501;</l:l>
+      <l:l i="70">&#7712;</l:l>
+      <l:l i="70">&#7713;</l:l>
+      <l:l i="80">H</l:l>
+      <l:l i="80">h</l:l>
+      <l:l i="80">&#292;</l:l>
+      <l:l i="80">&#293;</l:l>
+      <l:l i="80">&#294;</l:l>
+      <l:l i="80">&#295;</l:l>
+      <l:l i="80">&#542;</l:l>
+      <l:l i="80">&#543;</l:l>
+      <l:l i="80">&#614;</l:l>
+      <l:l i="80">&#7714;</l:l>
+      <l:l i="80">&#7715;</l:l>
+      <l:l i="80">&#7716;</l:l>
+      <l:l i="80">&#7717;</l:l>
+      <l:l i="80">&#7718;</l:l>
+      <l:l i="80">&#7719;</l:l>
+      <l:l i="80">&#7720;</l:l>
+      <l:l i="80">&#7721;</l:l>
+      <l:l i="80">&#7722;</l:l>
+      <l:l i="80">&#7723;</l:l>
+      <l:l i="80">&#7830;</l:l>
+      <l:l i="90">I</l:l>
+      <l:l i="90">i</l:l>
+      <l:l i="90">&#204;</l:l>
+      <l:l i="90">&#236;</l:l>
+      <l:l i="90">&#205;</l:l>
+      <l:l i="90">&#237;</l:l>
+      <l:l i="90">&#206;</l:l>
+      <l:l i="90">&#238;</l:l>
+      <l:l i="90">&#207;</l:l>
+      <l:l i="90">&#239;</l:l>
+      <l:l i="90">&#296;</l:l>
+      <l:l i="90">&#297;</l:l>
+      <l:l i="90">&#298;</l:l>
+      <l:l i="90">&#299;</l:l>
+      <l:l i="90">&#300;</l:l>
+      <l:l i="90">&#301;</l:l>
+      <l:l i="90">&#302;</l:l>
+      <l:l i="90">&#303;</l:l>
+      <l:l i="90">&#304;</l:l>
+      <l:l i="90">&#407;</l:l>
+      <l:l i="90">&#616;</l:l>
+      <l:l i="90">&#463;</l:l>
+      <l:l i="90">&#464;</l:l>
+      <l:l i="90">&#520;</l:l>
+      <l:l i="90">&#521;</l:l>
+      <l:l i="90">&#522;</l:l>
+      <l:l i="90">&#523;</l:l>
+      <l:l i="90">&#7724;</l:l>
+      <l:l i="90">&#7725;</l:l>
+      <l:l i="90">&#7726;</l:l>
+      <l:l i="90">&#7727;</l:l>
+      <l:l i="90">&#7880;</l:l>
+      <l:l i="90">&#7881;</l:l>
+      <l:l i="90">&#7882;</l:l>
+      <l:l i="90">&#7883;</l:l>
+      <l:l i="100">J</l:l>
+      <l:l i="100">j</l:l>
+      <l:l i="100">&#308;</l:l>
+      <l:l i="100">&#309;</l:l>
+      <l:l i="100">&#496;</l:l>
+      <l:l i="100">&#669;</l:l>
+      <l:l i="110">K</l:l>
+      <l:l i="110">k</l:l>
+      <l:l i="110">&#310;</l:l>
+      <l:l i="110">&#311;</l:l>
+      <l:l i="110">&#408;</l:l>
+      <l:l i="110">&#409;</l:l>
+      <l:l i="110">&#488;</l:l>
+      <l:l i="110">&#489;</l:l>
+      <l:l i="110">&#7728;</l:l>
+      <l:l i="110">&#7729;</l:l>
+      <l:l i="110">&#7730;</l:l>
+      <l:l i="110">&#7731;</l:l>
+      <l:l i="110">&#7732;</l:l>
+      <l:l i="110">&#7733;</l:l>
+      <l:l i="120">L</l:l>
+      <l:l i="120">l</l:l>
+      <l:l i="120">&#313;</l:l>
+      <l:l i="120">&#314;</l:l>
+      <l:l i="120">&#315;</l:l>
+      <l:l i="120">&#316;</l:l>
+      <l:l i="120">&#317;</l:l>
+      <l:l i="120">&#318;</l:l>
+      <l:l i="120">&#319;</l:l>
+      <l:l i="120">&#320;</l:l>
+      <l:l i="120">&#321;</l:l>
+      <l:l i="120">&#322;</l:l>
+      <l:l i="120">&#410;</l:l>
+      <l:l i="120">&#456;</l:l>
+      <l:l i="120">&#564;</l:l>
+      <l:l i="120">&#619;</l:l>
+      <l:l i="120">&#620;</l:l>
+      <l:l i="120">&#621;</l:l>
+      <l:l i="120">&#7734;</l:l>
+      <l:l i="120">&#7735;</l:l>
+      <l:l i="120">&#7736;</l:l>
+      <l:l i="120">&#7737;</l:l>
+      <l:l i="120">&#7738;</l:l>
+      <l:l i="120">&#7739;</l:l>
+      <l:l i="120">&#7740;</l:l>
+      <l:l i="120">&#7741;</l:l>
+      <l:l i="130">M</l:l>
+      <l:l i="130">m</l:l>
+      <l:l i="130">&#625;</l:l>
+      <l:l i="130">&#7742;</l:l>
+      <l:l i="130">&#7743;</l:l>
+      <l:l i="130">&#7744;</l:l>
+      <l:l i="130">&#7745;</l:l>
+      <l:l i="130">&#7746;</l:l>
+      <l:l i="130">&#7747;</l:l>
+      <l:l i="140">N</l:l>
+      <l:l i="140">n</l:l>
+      <l:l i="140">&#209;</l:l>
+      <l:l i="140">&#241;</l:l>
+      <l:l i="140">&#323;</l:l>
+      <l:l i="140">&#324;</l:l>
+      <l:l i="140">&#325;</l:l>
+      <l:l i="140">&#326;</l:l>
+      <l:l i="140">&#327;</l:l>
+      <l:l i="140">&#328;</l:l>
+      <l:l i="140">&#413;</l:l>
+      <l:l i="140">&#626;</l:l>
+      <l:l i="140">&#414;</l:l>
+      <l:l i="140">&#544;</l:l>
+      <l:l i="140">&#459;</l:l>
+      <l:l i="140">&#504;</l:l>
+      <l:l i="140">&#505;</l:l>
+      <l:l i="140">&#565;</l:l>
+      <l:l i="140">&#627;</l:l>
+      <l:l i="140">&#7748;</l:l>
+      <l:l i="140">&#7749;</l:l>
+      <l:l i="140">&#7750;</l:l>
+      <l:l i="140">&#7751;</l:l>
+      <l:l i="140">&#7752;</l:l>
+      <l:l i="140">&#7753;</l:l>
+      <l:l i="140">&#7754;</l:l>
+      <l:l i="140">&#7755;</l:l>
+      <l:l i="150">O</l:l>
+      <l:l i="150">o</l:l>
+      <l:l i="150">&#210;</l:l>
+      <l:l i="150">&#242;</l:l>
+      <l:l i="150">&#211;</l:l>
+      <l:l i="150">&#243;</l:l>
+      <l:l i="150">&#212;</l:l>
+      <l:l i="150">&#244;</l:l>
+      <l:l i="150">&#213;</l:l>
+      <l:l i="150">&#245;</l:l>
+      <l:l i="150">&#214;</l:l>
+      <l:l i="150">&#246;</l:l>
+      <l:l i="150">&#216;</l:l>
+      <l:l i="150">&#248;</l:l>
+      <l:l i="150">&#332;</l:l>
+      <l:l i="150">&#333;</l:l>
+      <l:l i="150">&#334;</l:l>
+      <l:l i="150">&#335;</l:l>
+      <l:l i="150">&#336;</l:l>
+      <l:l i="150">&#337;</l:l>
+      <l:l i="150">&#415;</l:l>
+      <l:l i="150">&#416;</l:l>
+      <l:l i="150">&#417;</l:l>
+      <l:l i="150">&#465;</l:l>
+      <l:l i="150">&#466;</l:l>
+      <l:l i="150">&#490;</l:l>
+      <l:l i="150">&#491;</l:l>
+      <l:l i="150">&#492;</l:l>
+      <l:l i="150">&#493;</l:l>
+      <l:l i="150">&#510;</l:l>
+      <l:l i="150">&#511;</l:l>
+      <l:l i="150">&#524;</l:l>
+      <l:l i="150">&#525;</l:l>
+      <l:l i="150">&#526;</l:l>
+      <l:l i="150">&#527;</l:l>
+      <l:l i="150">&#554;</l:l>
+      <l:l i="150">&#555;</l:l>
+      <l:l i="150">&#556;</l:l>
+      <l:l i="150">&#557;</l:l>
+      <l:l i="150">&#558;</l:l>
+      <l:l i="150">&#559;</l:l>
+      <l:l i="150">&#560;</l:l>
+      <l:l i="150">&#561;</l:l>
+      <l:l i="150">&#7756;</l:l>
+      <l:l i="150">&#7757;</l:l>
+      <l:l i="150">&#7758;</l:l>
+      <l:l i="150">&#7759;</l:l>
+      <l:l i="150">&#7760;</l:l>
+      <l:l i="150">&#7761;</l:l>
+      <l:l i="150">&#7762;</l:l>
+      <l:l i="150">&#7763;</l:l>
+      <l:l i="150">&#7884;</l:l>
+      <l:l i="150">&#7885;</l:l>
+      <l:l i="150">&#7886;</l:l>
+      <l:l i="150">&#7887;</l:l>
+      <l:l i="150">&#7888;</l:l>
+      <l:l i="150">&#7889;</l:l>
+      <l:l i="150">&#7890;</l:l>
+      <l:l i="150">&#7891;</l:l>
+      <l:l i="150">&#7892;</l:l>
+      <l:l i="150">&#7893;</l:l>
+      <l:l i="150">&#7894;</l:l>
+      <l:l i="150">&#7895;</l:l>
+      <l:l i="150">&#7896;</l:l>
+      <l:l i="150">&#7897;</l:l>
+      <l:l i="150">&#7898;</l:l>
+      <l:l i="150">&#7899;</l:l>
+      <l:l i="150">&#7900;</l:l>
+      <l:l i="150">&#7901;</l:l>
+      <l:l i="150">&#7902;</l:l>
+      <l:l i="150">&#7903;</l:l>
+      <l:l i="150">&#7904;</l:l>
+      <l:l i="150">&#7905;</l:l>
+      <l:l i="150">&#7906;</l:l>
+      <l:l i="150">&#7907;</l:l>
+      <l:l i="160">P</l:l>
+      <l:l i="160">p</l:l>
+      <l:l i="160">&#420;</l:l>
+      <l:l i="160">&#421;</l:l>
+      <l:l i="160">&#7764;</l:l>
+      <l:l i="160">&#7765;</l:l>
+      <l:l i="160">&#7766;</l:l>
+      <l:l i="160">&#7767;</l:l>
+      <l:l i="170">Q</l:l>
+      <l:l i="170">q</l:l>
+      <l:l i="170">&#672;</l:l>
+      <l:l i="180">R</l:l>
+      <l:l i="180">r</l:l>
+      <l:l i="180">&#340;</l:l>
+      <l:l i="180">&#341;</l:l>
+      <l:l i="180">&#342;</l:l>
+      <l:l i="180">&#343;</l:l>
+      <l:l i="180">&#344;</l:l>
+      <l:l i="180">&#345;</l:l>
+      <l:l i="180">&#528;</l:l>
+      <l:l i="180">&#529;</l:l>
+      <l:l i="180">&#530;</l:l>
+      <l:l i="180">&#531;</l:l>
+      <l:l i="180">&#636;</l:l>
+      <l:l i="180">&#637;</l:l>
+      <l:l i="180">&#638;</l:l>
+      <l:l i="180">&#7768;</l:l>
+      <l:l i="180">&#7769;</l:l>
+      <l:l i="180">&#7770;</l:l>
+      <l:l i="180">&#7771;</l:l>
+      <l:l i="180">&#7772;</l:l>
+      <l:l i="180">&#7773;</l:l>
+      <l:l i="180">&#7774;</l:l>
+      <l:l i="180">&#7775;</l:l>
+      <l:l i="190">S</l:l>
+      <l:l i="190">s</l:l>
+      <l:l i="190">&#346;</l:l>
+      <l:l i="190">&#347;</l:l>
+      <l:l i="190">&#348;</l:l>
+      <l:l i="190">&#349;</l:l>
+      <l:l i="190">&#350;</l:l>
+      <l:l i="190">&#351;</l:l>
+      <l:l i="190">&#352;</l:l>
+      <l:l i="190">&#353;</l:l>
+      <l:l i="190">&#536;</l:l>
+      <l:l i="190">&#537;</l:l>
+      <l:l i="190">&#642;</l:l>
+      <l:l i="190">&#7776;</l:l>
+      <l:l i="190">&#7777;</l:l>
+      <l:l i="190">&#7778;</l:l>
+      <l:l i="190">&#7779;</l:l>
+      <l:l i="190">&#7780;</l:l>
+      <l:l i="190">&#7781;</l:l>
+      <l:l i="190">&#7782;</l:l>
+      <l:l i="190">&#7783;</l:l>
+      <l:l i="190">&#7784;</l:l>
+      <l:l i="190">&#7785;</l:l>
+      <l:l i="200">T</l:l>
+      <l:l i="200">t</l:l>
+      <l:l i="200">&#354;</l:l>
+      <l:l i="200">&#355;</l:l>
+      <l:l i="200">&#356;</l:l>
+      <l:l i="200">&#357;</l:l>
+      <l:l i="200">&#358;</l:l>
+      <l:l i="200">&#359;</l:l>
+      <l:l i="200">&#427;</l:l>
+      <l:l i="200">&#428;</l:l>
+      <l:l i="200">&#429;</l:l>
+      <l:l i="200">&#430;</l:l>
+      <l:l i="200">&#648;</l:l>
+      <l:l i="200">&#538;</l:l>
+      <l:l i="200">&#539;</l:l>
+      <l:l i="200">&#566;</l:l>
+      <l:l i="200">&#7786;</l:l>
+      <l:l i="200">&#7787;</l:l>
+      <l:l i="200">&#7788;</l:l>
+      <l:l i="200">&#7789;</l:l>
+      <l:l i="200">&#7790;</l:l>
+      <l:l i="200">&#7791;</l:l>
+      <l:l i="200">&#7792;</l:l>
+      <l:l i="200">&#7793;</l:l>
+      <l:l i="200">&#7831;</l:l>
+      <l:l i="210">U</l:l>
+      <l:l i="210">u</l:l>
+      <l:l i="210">&#217;</l:l>
+      <l:l i="210">&#249;</l:l>
+      <l:l i="210">&#218;</l:l>
+      <l:l i="210">&#250;</l:l>
+      <l:l i="210">&#219;</l:l>
+      <l:l i="210">&#251;</l:l>
+      <l:l i="210">&#220;</l:l>
+      <l:l i="210">&#252;</l:l>
+      <l:l i="210">&#360;</l:l>
+      <l:l i="210">&#361;</l:l>
+      <l:l i="210">&#362;</l:l>
+      <l:l i="210">&#363;</l:l>
+      <l:l i="210">&#364;</l:l>
+      <l:l i="210">&#365;</l:l>
+      <l:l i="210">&#366;</l:l>
+      <l:l i="210">&#367;</l:l>
+      <l:l i="210">&#368;</l:l>
+      <l:l i="210">&#369;</l:l>
+      <l:l i="210">&#370;</l:l>
+      <l:l i="210">&#371;</l:l>
+      <l:l i="210">&#431;</l:l>
+      <l:l i="210">&#432;</l:l>
+      <l:l i="210">&#467;</l:l>
+      <l:l i="210">&#468;</l:l>
+      <l:l i="210">&#469;</l:l>
+      <l:l i="210">&#470;</l:l>
+      <l:l i="210">&#471;</l:l>
+      <l:l i="210">&#472;</l:l>
+      <l:l i="210">&#473;</l:l>
+      <l:l i="210">&#474;</l:l>
+      <l:l i="210">&#475;</l:l>
+      <l:l i="210">&#476;</l:l>
+      <l:l i="210">&#532;</l:l>
+      <l:l i="210">&#533;</l:l>
+      <l:l i="210">&#534;</l:l>
+      <l:l i="210">&#535;</l:l>
+      <l:l i="210">&#7794;</l:l>
+      <l:l i="210">&#7795;</l:l>
+      <l:l i="210">&#7796;</l:l>
+      <l:l i="210">&#7797;</l:l>
+      <l:l i="210">&#7798;</l:l>
+      <l:l i="210">&#7799;</l:l>
+      <l:l i="210">&#7800;</l:l>
+      <l:l i="210">&#7801;</l:l>
+      <l:l i="210">&#7802;</l:l>
+      <l:l i="210">&#7803;</l:l>
+      <l:l i="210">&#7908;</l:l>
+      <l:l i="210">&#7909;</l:l>
+      <l:l i="210">&#7910;</l:l>
+      <l:l i="210">&#7911;</l:l>
+      <l:l i="210">&#7912;</l:l>
+      <l:l i="210">&#7913;</l:l>
+      <l:l i="210">&#7914;</l:l>
+      <l:l i="210">&#7915;</l:l>
+      <l:l i="210">&#7916;</l:l>
+      <l:l i="210">&#7917;</l:l>
+      <l:l i="210">&#7918;</l:l>
+      <l:l i="210">&#7919;</l:l>
+      <l:l i="210">&#7920;</l:l>
+      <l:l i="210">&#7921;</l:l>
+      <l:l i="220">V</l:l>
+      <l:l i="220">v</l:l>
+      <l:l i="220">&#434;</l:l>
+      <l:l i="220">&#651;</l:l>
+      <l:l i="220">&#7804;</l:l>
+      <l:l i="220">&#7805;</l:l>
+      <l:l i="220">&#7806;</l:l>
+      <l:l i="220">&#7807;</l:l>
+      <l:l i="230">W</l:l>
+      <l:l i="230">w</l:l>
+      <l:l i="230">&#372;</l:l>
+      <l:l i="230">&#373;</l:l>
+      <l:l i="230">&#7808;</l:l>
+      <l:l i="230">&#7809;</l:l>
+      <l:l i="230">&#7810;</l:l>
+      <l:l i="230">&#7811;</l:l>
+      <l:l i="230">&#7812;</l:l>
+      <l:l i="230">&#7813;</l:l>
+      <l:l i="230">&#7814;</l:l>
+      <l:l i="230">&#7815;</l:l>
+      <l:l i="230">&#7816;</l:l>
+      <l:l i="230">&#7817;</l:l>
+      <l:l i="230">&#7832;</l:l>
+      <l:l i="240">X</l:l>
+      <l:l i="240">x</l:l>
+      <l:l i="240">&#7818;</l:l>
+      <l:l i="240">&#7819;</l:l>
+      <l:l i="240">&#7820;</l:l>
+      <l:l i="240">&#7821;</l:l>
+      <l:l i="250">Y</l:l>
+      <l:l i="250">y</l:l>
+      <l:l i="250">&#221;</l:l>
+      <l:l i="250">&#253;</l:l>
+      <l:l i="250">&#255;</l:l>
+      <l:l i="250">&#376;</l:l>
+      <l:l i="250">&#374;</l:l>
+      <l:l i="250">&#375;</l:l>
+      <l:l i="250">&#435;</l:l>
+      <l:l i="250">&#436;</l:l>
+      <l:l i="250">&#562;</l:l>
+      <l:l i="250">&#563;</l:l>
+      <l:l i="250">&#7822;</l:l>
+      <l:l i="250">&#7823;</l:l>
+      <l:l i="250">&#7833;</l:l>
+      <l:l i="250">&#7922;</l:l>
+      <l:l i="250">&#7923;</l:l>
+      <l:l i="250">&#7924;</l:l>
+      <l:l i="250">&#7925;</l:l>
+      <l:l i="250">&#7926;</l:l>
+      <l:l i="250">&#7927;</l:l>
+      <l:l i="250">&#7928;</l:l>
+      <l:l i="250">&#7929;</l:l>
+      <l:l i="260">Z</l:l>
+      <l:l i="260">z</l:l>
+      <l:l i="260">&#377;</l:l>
+      <l:l i="260">&#378;</l:l>
+      <l:l i="260">&#379;</l:l>
+      <l:l i="260">&#380;</l:l>
+      <l:l i="260">&#381;</l:l>
+      <l:l i="260">&#382;</l:l>
+      <l:l i="260">&#437;</l:l>
+      <l:l i="260">&#438;</l:l>
+      <l:l i="260">&#548;</l:l>
+      <l:l i="260">&#549;</l:l>
+      <l:l i="260">&#656;</l:l>
+      <l:l i="260">&#657;</l:l>
+      <l:l i="260">&#7824;</l:l>
+      <l:l i="260">&#7825;</l:l>
+      <l:l i="260">&#7826;</l:l>
+      <l:l i="260">&#7827;</l:l>
+      <l:l i="260">&#7828;</l:l>
+      <l:l i="260">&#7829;</l:l>
+   </l:letters>
+</l:l10n>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/fr.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/fr.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/fr.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,614 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="fr" english-language-name="French">
+
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+   <l:gentext key="Abstract" text="R&#233;sum&#233;"/>
+   <l:gentext key="abstract" text="R&#233;sum&#233;"/>
+   <l:gentext key="Answer" text="R&#160;:"/>
+   <l:gentext key="answer" text="R&#160;:"/>
+   <l:gentext key="Appendix" text="Annexe"/>
+   <l:gentext key="appendix" text="annexe"/>
+   <l:gentext key="Article" text="Article"/>
+   <l:gentext key="article" text="Article"/>
+   <l:gentext key="Bibliography" text="Bibliographie"/>
+   <l:gentext key="bibliography" text="Bibliographie"/>
+   <l:gentext key="Book" text="Livre"/>
+   <l:gentext key="book" text="Livre"/>
+   <l:gentext key="CAUTION" text="ATTENTION"/>
+   <l:gentext key="Caution" text="Attention"/>
+   <l:gentext key="caution" text="Attention"/>
+   <l:gentext key="Chapter" text="Chapitre"/>
+   <l:gentext key="chapter" text="chapitre"/>
+   <l:gentext key="Colophon" text="Colophon"/>
+   <l:gentext key="colophon" text="Colophon"/>
+   <l:gentext key="Copyright" text="Copyright"/>
+   <l:gentext key="copyright" text="Copyright"/>
+   <l:gentext key="Dedication" text="D&#233;dicace"/>
+   <l:gentext key="dedication" text="D&#233;dicace"/>
+   <l:gentext key="Edition" text="&#201;dition"/>
+   <l:gentext key="edition" text="&#201;dition"/>
+   <l:gentext key="Equation" text="&#201;quation"/>
+   <l:gentext key="equation" text="&#201;quation"/>
+   <l:gentext key="Example" text="Exemple"/>
+   <l:gentext key="example" text="Exemple"/>
+   <l:gentext key="Figure" text="Figure"/>
+   <l:gentext key="figure" text="Figure"/>
+   <l:gentext key="Glossary" text="Glossaire"/>
+   <l:gentext key="glossary" text="Glossaire"/>
+   <l:gentext key="GlossSee" text="Voir"/>
+   <l:gentext key="glosssee" text="Voir"/>
+   <l:gentext key="GlossSeeAlso" text="Voir aussi"/>
+   <l:gentext key="glossseealso" text="Voir aussi"/>
+   <l:gentext key="IMPORTANT" text="IMPORTANT"/>
+   <l:gentext key="important" text="Important"/>
+   <l:gentext key="Important" text="Important"/>
+   <l:gentext key="Index" text="Index"/>
+   <l:gentext key="index" text="Index"/>
+   <l:gentext key="ISBN" text="ISBN"/>
+   <l:gentext key="isbn" text="ISBN"/>
+   <l:gentext key="LegalNotice" text="Note l&#233;gale"/>
+   <l:gentext key="legalnotice" text="Note l&#233;gale"/>
+   <l:gentext key="MsgAud" text="Public vis&#233;"/>
+   <l:gentext key="msgaud" text="Public vis&#233;"/>
+   <l:gentext key="MsgLevel" text="Niveau"/>
+   <l:gentext key="msglevel" text="Niveau"/>
+   <l:gentext key="MsgOrig" text="Origine"/>
+   <l:gentext key="msgorig" text="Origine"/>
+   <l:gentext key="NOTE" text="NOTE"/>
+   <l:gentext key="Note" text="Note"/>
+   <l:gentext key="note" text="Note"/>
+   <l:gentext key="Part" text="Partie"/>
+   <l:gentext key="part" text="Partie"/>
+   <l:gentext key="Preface" text="Pr&#233;face"/>
+   <l:gentext key="preface" text="Pr&#233;face"/>
+   <l:gentext key="Procedure" text="Proc&#233;dure"/>
+   <l:gentext key="procedure" text="Proc&#233;dure"/>
+   <l:gentext key="ProductionSet" text="Production"/>
+   <l:gentext key="PubDate" text="Date de publication"/>
+   <l:gentext key="pubdate" text="Date de publication"/>
+   <l:gentext key="Published" text="Publi&#233;"/>
+   <l:gentext key="published" text="Publi&#233;"/>
+   <l:gentext key="Qandadiv" text="Q &amp; R"/>
+   <l:gentext key="qandadiv" text="Q &amp; R"/>
+   <l:gentext key="Question" text="Q&#160;:"/>
+   <l:gentext key="question" text="Q&#160;:"/>
+   <l:gentext key="RefEntry" text=""/>
+   <l:gentext key="refentry" text=""/>
+   <l:gentext key="Reference" text="R&#233;f&#233;rence"/>
+   <l:gentext key="reference" text="R&#233;f&#233;rence"/>
+   <l:gentext key="RefName" text="Nom"/>
+   <l:gentext key="refname" text="Nom"/>
+   <l:gentext key="RefSection" text=""/>
+   <l:gentext key="refsection" text=""/>
+   <l:gentext key="RefSynopsisDiv" text="Synopsis"/>
+   <l:gentext key="refsynopsisdiv" text="Synopsis"/>
+   <l:gentext key="RevHistory" text="Historique des versions"/>
+   <l:gentext key="revhistory" text="Historique des versions"/>
+   <l:gentext key="revision" text="Version"/>
+   <l:gentext key="Revision" text="Version"/>
+   <l:gentext key="sect1" text="Section"/>
+   <l:gentext key="sect2" text="Section"/>
+   <l:gentext key="sect3" text="Section"/>
+   <l:gentext key="sect4" text="Section"/>
+   <l:gentext key="sect5" text="Section"/>
+   <l:gentext key="section" text="section"/>
+   <l:gentext key="Section" text="Section"/>
+   <l:gentext key="see" text="voir"/>
+   <l:gentext key="See" text="Voir"/>
+   <l:gentext key="seealso" text="voir aussi"/>
+   <l:gentext key="Seealso" text="Voir aussi"/>
+   <l:gentext key="SeeAlso" text="Voir Aussi"/>
+   <l:gentext key="set" text="Ensemble"/>
+   <l:gentext key="Set" text="Ensemble"/>
+   <l:gentext key="setindex" text="Index"/>
+   <l:gentext key="SetIndex" text="Index"/>
+   <l:gentext key="Sidebar" text=""/>
+   <l:gentext key="sidebar" text="sidebar"/>
+   <l:gentext key="step" text="&#233;tape"/>
+   <l:gentext key="Step" text="&#201;tape"/>
+   <l:gentext key="Table" text="Tableau"/>
+   <l:gentext key="table" text="Tableau"/>
+   <l:gentext key="tip" text="ASTUCE"/>
+   <l:gentext key="TIP" text="ASTUCE"/>
+   <l:gentext key="Tip" text="Astuce"/>
+   <l:gentext key="Warning" text="Avertissement"/>
+   <l:gentext key="warning" text="AVERTISSEMENT"/>
+   <l:gentext key="WARNING" text="AVERTISSEMENT"/>
+   <l:gentext key="and" text="et"/>
+   <l:gentext key="by" text="par"/>
+   <l:gentext key="called" text="intitul&#233;"/>
+   <l:gentext key="Edited" text="Publi&#233;"/>
+   <l:gentext key="edited" text="Publi&#233;"/>
+   <l:gentext key="Editedby" text="Publi&#233; par"/>
+   <l:gentext key="editedby" text="Publi&#233; par"/>
+   <l:gentext key="in" text="dans"/>
+   <l:gentext key="lastlistcomma" text=","/>
+   <l:gentext key="listcomma" text=","/>
+   <l:gentext key="nonexistantelement" text="Cet &#233;l&#233;ment n'existe pas"/>
+   <l:gentext key="notes" text="Notes"/>
+   <l:gentext key="Notes" text="Notes"/>
+   <l:gentext key="Pgs" text="Pages"/>
+   <l:gentext key="pgs" text="Pages"/>
+   <l:gentext key="Revisedby" text="Revu par&#160;: "/>
+   <l:gentext key="revisedby" text="Revu par&#160;: "/>
+   <l:gentext key="TableNotes" text="Remarques"/>
+   <l:gentext key="tablenotes" text="Remarques"/>
+   <l:gentext key="TableofContents" text="Table des mati&#232;res"/>
+   <l:gentext key="tableofcontents" text="Table des mati&#232;res"/>
+   <l:gentext key="the" text=""/>
+   <l:gentext key="unexpectedelementname" text="Nom d'&#233;l&#233;ment non attendu"/>
+   <l:gentext key="unsupported" text="Non reconnu par le syst&#232;me"/>
+   <l:gentext key="xrefto" text="R&#233;f&#233;rence vers"/>
+   <l:gentext key="listofequations" text="Liste des &#233;quations"/>
+   <l:gentext key="ListofEquations" text="Liste des &#233;quations"/>
+   <l:gentext key="ListofExamples" text="Liste des exemples"/>
+   <l:gentext key="listofexamples" text="Liste des exemples"/>
+   <l:gentext key="ListofFigures" text="Liste des illustrations"/>
+   <l:gentext key="listoffigures" text="Liste des illustrations"/>
+   <l:gentext key="ListofProcedures" text="Liste des proc&#233;dures"/>
+   <l:gentext key="listofprocedures" text="Liste des proc&#233;dures"/>
+   <l:gentext key="listoftables" text="Liste des tableaux"/>
+   <l:gentext key="ListofTables" text="Liste des tableaux"/>
+   <l:gentext key="ListofUnknown" text="Liste des inconnues"/>
+   <l:gentext key="listofunknown" text="Liste des inconnues"/>
+   <l:gentext key="nav-home" text="Sommaire"/>
+   <l:gentext key="nav-next" text="Suivant"/>
+   <l:gentext key="nav-next-sibling" text="Avance rapide"/>
+   <l:gentext key="nav-prev" text="Pr&#233;c&#233;dent"/>
+   <l:gentext key="nav-prev-sibling" text="Arri&#232;re rapide"/>
+   <l:gentext key="nav-up" text="Niveau sup&#233;rieur"/>
+   <l:gentext key="nav-toc" text="TdM"/>
+   <l:gentext key="Draft" text="Brouillon"/>
+   <l:gentext key="above" text="au dessus"/>
+   <l:gentext key="below" text="au dessous"/>
+   <l:gentext key="sectioncalled" text="la section intitul&#233;e"/>
+   <l:gentext key="index symbols" text="Symboles"/>
+   <l:gentext key="lowercase.alpha" text="abcdefghijklmnopqrstuvwxyz&#226;&#234;&#238;&#244;&#251;&#235;&#239;&#252;&#224;&#232;&#249;&#233;&#231;&#230;&#339;"/>
+   <l:gentext key="uppercase.alpha" text="ABCDEFGHIJKLMNOPQRSTUVWXYZ&#194;&#202;&#206;&#212;&#219;&#203;&#207;&#220;&#192;&#200;&#217;&#201;&#199;&#198;&#338;"/>
+   <l:dingbat key="startquote" text="&#171;&#160;"/>
+   <l:dingbat key="endquote" text="&#160;&#187;"/>
+   <l:dingbat key="nestedstartquote" text="&#171;&#160;"/>
+   <l:dingbat key="nestedendquote" text="&#160;&#187;"/>
+   <l:dingbat key="singlestartquote" text="&#8249;"/>
+   <l:dingbat key="singleendquote" text="&#8250;"/>
+   <l:dingbat key="bullet" text="&#8226;"/>
+   <l:gentext key="hyphenation-character" text="-"/>
+   <l:gentext key="hyphenation-push-character-count" text="2"/>
+   <l:gentext key="hyphenation-remain-character-count" text="2"/>
+
+   <l:context name="styles">
+      <l:template name="person-name" text="first-last"/>
+   </l:context>
+
+   <l:context name="title">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="%t"/>
+      <l:template name="appendix" text="Annexe&#160;%n.&#160;%t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="biblioentry" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliolist" text="%t" lang="en"/>
+      <l:template name="bibliomixed" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="Chapitre&#160;%n.&#160;%t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="&#201;quation&#160;%n.&#160;%t"/>
+      <l:template name="example" text="Exemple&#160;%n.&#160;%t"/>
+      <l:template name="figure" text="Figure&#160;%n.&#160;%t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="glosslist" text="%t" lang="en"/>
+      <l:template name="glossentry" text="%t"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text=""/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="%t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="procedure.formal" text="Proc&#233;dure&#160;%n.&#160;%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="productionset.formal" text="Production&#160;%n"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="%t"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="%t"/>
+      <l:template name="refentry" text="%t"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsection" text="%t"/>
+      <l:template name="refsect1" text="%t"/>
+      <l:template name="refsect2" text="%t"/>
+      <l:template name="refsect3" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="refsynopsisdivinfo" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="step" text="%t"/>
+      <l:template name="table" text="Tableau&#160;%n.&#160;%t"/>
+      <l:template name="task" text="%t"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text=""/>
+      <l:template name="warning" text="%t"/>
+   </l:context>
+
+   <l:context name="title-unnumbered">
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article/appendix" text="%t"/>
+      <l:template name="bridgehead" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="sect1" text="%t"/>
+      <l:template name="sect2" text="%t"/>
+      <l:template name="sect3" text="%t"/>
+      <l:template name="sect4" text="%t"/>
+      <l:template name="sect5" text="%t"/>
+      <l:template name="section" text="%t"/>
+      <l:template name="simplesect" text="%t"/>
+   </l:context>
+
+   <l:context name="title-numbered">
+      <l:template name="appendix" text="Annexe&#160;%n.&#160;%t"/>
+      <l:template name="article/appendix" text="%n.&#160;%t"/>
+      <l:template name="bridgehead" text="%n.&#160;%t"/>
+      <l:template name="chapter" text="Chapitre&#160;%n.&#160;%t"/>
+      <l:template name="sect1" text="%n.&#160;%t"/>
+      <l:template name="sect2" text="%n.&#160;%t"/>
+      <l:template name="sect3" text="%n.&#160;%t"/>
+      <l:template name="sect4" text="%n.&#160;%t"/>
+      <l:template name="sect5" text="%n.&#160;%t"/>
+      <l:template name="section" text="%n.&#160;%t"/>
+      <l:template name="simplesect" text="%t"/>
+   </l:context>
+
+   <l:context name="subtitle">
+      <l:template name="appendix" text="%s"/>
+      <l:template name="article" text="%s"/>
+      <l:template name="bibliodiv" text="%s"/>
+      <l:template name="biblioentry" text="%s"/>
+      <l:template name="bibliography" text="%s"/>
+      <l:template name="bibliomixed" text="%s"/>
+      <l:template name="bibliomset" text="%s"/>
+      <l:template name="biblioset" text="%s"/>
+      <l:template name="book" text="%s"/>
+      <l:template name="chapter" text="%s"/>
+      <l:template name="colophon" text="%s"/>
+      <l:template name="dedication" text="%s"/>
+      <l:template name="glossary" text="%s"/>
+      <l:template name="glossdiv" text="%s"/>
+      <l:template name="index" text="%s"/>
+      <l:template name="indexdiv" text="%s"/>
+      <l:template name="lot" text="%s"/>
+      <l:template name="part" text="%s"/>
+      <l:template name="partintro" text="%s"/>
+      <l:template name="preface" text="%s"/>
+      <l:template name="refentry" text="%s"/>
+      <l:template name="reference" text="%s"/>
+      <l:template name="refsection" text="%s"/>
+      <l:template name="refsect1" text="%s"/>
+      <l:template name="refsect2" text="%s"/>
+      <l:template name="refsect3" text="%s"/>
+      <l:template name="refsynopsisdiv" text="%s"/>
+      <l:template name="sect1" text="%s"/>
+      <l:template name="sect2" text="%s"/>
+      <l:template name="sect3" text="%s"/>
+      <l:template name="sect4" text="%s"/>
+      <l:template name="sect5" text="%s"/>
+      <l:template name="section" text="%s"/>
+      <l:template name="set" text="%s"/>
+      <l:template name="setindex" text="%s"/>
+      <l:template name="sidebar" text="%s"/>
+      <l:template name="simplesect" text="%s"/>
+      <l:template name="toc" text="%s"/>
+   </l:context>
+
+   <l:context name="xref">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="R&#160;:&#160;%n"/>
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="constraintdef" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="%t"/>
+      <l:template name="example" text="%t"/>
+      <l:template name="figure" text="%t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text="%n"/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="%t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="Q&#160;:&#160;%n"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="Q&#160;:&#160;%n"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="table" text="%t"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="%n"/>
+      <l:template name="warning" text="%t"/>
+      <l:template name="page.citation" text=" [%p]"/>
+      <l:template name="page" text="(page %p)"/>
+      <l:template name="pageabbrev" text="(p. %p)"/>
+      <l:template name="Page" text="Page %p"/>
+      <l:template name="bridgehead" text="la section intitul&#233;e &#171;&#160;%t&#160;&#187;"/>
+      <l:template name="refsection" text="la section intitul&#233;e &#171;&#160;%t&#160;&#187;"/>
+      <l:template name="refsect1" text="la section intitul&#233;e &#171;&#160;%t&#160;&#187;"/>
+      <l:template name="refsect2" text="la section intitul&#233;e &#171;&#160;%t&#160;&#187;"/>
+      <l:template name="refsect3" text="la section intitul&#233;e &#171;&#160;%t&#160;&#187;"/>
+      <l:template name="sect1" text="la section intitul&#233;e &#171;&#160;%t&#160;&#187;"/>
+      <l:template name="sect2" text="la section intitul&#233;e &#171;&#160;%t&#160;&#187;"/>
+      <l:template name="sect3" text="la section intitul&#233;e &#171;&#160;%t&#160;&#187;"/>
+      <l:template name="sect4" text="la section intitul&#233;e &#171;&#160;%t&#160;&#187;"/>
+      <l:template name="sect5" text="la section intitul&#233;e &#171;&#160;%t&#160;&#187;"/>
+      <l:template name="section" text="la section intitul&#233;e &#171;&#160;%t&#160;&#187;"/>
+      <l:template name="simplesect" text="la section intitul&#233;e &#171;&#160;%t&#160;&#187;"/>
+   </l:context>
+
+   <l:context name="xref-number">
+      <l:template name="answer" text="R&#160;:&#160;%n"/>
+      <l:template name="appendix" text="Annexe&#160;%n"/>
+      <l:template name="bridgehead" text="Section&#160;%n"/>
+      <l:template name="chapter" text="Chapitre&#160;%n"/>
+      <l:template name="equation" text="&#201;quation&#160;%n"/>
+      <l:template name="example" text="Exemple&#160;%n"/>
+      <l:template name="figure" text="Figure&#160;%n"/>
+      <l:template name="part" text="Partie&#160;%n"/>
+      <l:template name="procedure" text="Proc&#233;dure&#160;%n"/>
+      <l:template name="productionset" text="Production&#160;%n"/>
+      <l:template name="qandadiv" text="Q &amp; R&#160;%n"/>
+      <l:template name="qandaentry" text="Q&#160;:&#160;%n"/>
+      <l:template name="question" text="Q&#160;:&#160;%n"/>
+      <l:template name="sect1" text="Section&#160;%n"/>
+      <l:template name="sect2" text="Section&#160;%n"/>
+      <l:template name="sect3" text="Section&#160;%n"/>
+      <l:template name="sect4" text="Section&#160;%n"/>
+      <l:template name="sect5" text="Section&#160;%n"/>
+      <l:template name="section" text="Section&#160;%n"/>
+      <l:template name="table" text="Tableau&#160;%n"/>
+   </l:context>
+
+   <l:context name="xref-number-and-title">
+      <l:template name="appendix" text="Annexe&#160;%n, %t"/>
+      <l:template name="bridgehead" text="Section&#160;%n, &#171;&#160;%t&#160;&#187;"/>
+      <l:template name="chapter" text="Chapitre&#160;%n, %t"/>
+      <l:template name="equation" text="&#201;quation&#160;%n, &#171;&#160;%t&#160;&#187;"/>
+      <l:template name="example" text="Exemple&#160;%n, &#171;&#160;%t&#160;&#187;"/>
+      <l:template name="figure" text="Figure&#160;%n, &#171;&#160;%t&#160;&#187;"/>
+      <l:template name="part" text="Partie&#160;%n, &#171;&#160;%t&#160;&#187;"/>
+      <l:template name="procedure" text="Proc&#233;dure&#160;%n, &#171;&#160;%t&#160;&#187;"/>
+      <l:template name="productionset" text="Production&#160;%n, &#171;&#160;%t&#160;&#187;"/>
+      <l:template name="qandadiv" text="Q &amp; R&#160;%n, &#171;&#160;%t&#160;&#187;"/>
+      <l:template name="refsect1" text="la section intitul&#233;e &#171;&#160;%t&#160;&#187;"/>
+      <l:template name="refsect2" text="la section intitul&#233;e &#171;&#160;%t&#160;&#187;"/>
+      <l:template name="refsect3" text="la section intitul&#233;e &#171;&#160;%t&#160;&#187;"/>
+      <l:template name="refsection" text="la section intitul&#233;e &#171;&#160;%t&#160;&#187;"/>
+      <l:template name="sect1" text="Section&#160;%n, &#171;&#160;%t&#160;&#187;"/>
+      <l:template name="sect2" text="Section&#160;%n, &#171;&#160;%t&#160;&#187;"/>
+      <l:template name="sect3" text="Section&#160;%n, &#171;&#160;%t&#160;&#187;"/>
+      <l:template name="sect4" text="Section&#160;%n, &#171;&#160;%t&#160;&#187;"/>
+      <l:template name="sect5" text="Section&#160;%n, &#171;&#160;%t&#160;&#187;"/>
+      <l:template name="section" text="Section&#160;%n, &#171;&#160;%t&#160;&#187;"/>
+      <l:template name="simplesect" text="la section intitul&#233;e &#171;&#160;%t&#160;&#187;"/>
+      <l:template name="table" text="Tableau&#160;%n, &#171;&#160;%t&#160;&#187;"/>
+   </l:context>
+
+   <l:context name="authorgroup">
+      <l:template name="sep" text=", "/>
+      <l:template name="sep2" text=" et "/>
+      <l:template name="seplast" text=", et "/>
+   </l:context>
+
+   <l:context name="glossary">
+      <l:template name="see" text="Voir "/>
+      <l:template name="seealso" text="Voir aussi "/>
+   </l:context>
+
+   <l:context name="msgset">
+      <l:template name="MsgAud" text="Public vis&#233;: "/>
+      <l:template name="MsgLevel" text="Niveau: "/>
+      <l:template name="MsgOrig" text="Origine: "/>
+   </l:context>
+
+   <l:context name="datetime">
+      <l:template name="format" text="d/m/Y"/>
+   </l:context>
+
+   <l:context name="datetime-full">
+      <l:template name="January" text="janvier"/>
+      <l:template name="February" text="f&#233;vrier"/>
+      <l:template name="March" text="mars"/>
+      <l:template name="April" text="avril"/>
+      <l:template name="May" text="mai"/>
+      <l:template name="June" text="juin"/>
+      <l:template name="July" text="juillet"/>
+      <l:template name="August" text="ao&#251;t"/>
+      <l:template name="September" text="septembre"/>
+      <l:template name="October" text="octobre"/>
+      <l:template name="November" text="novembre"/>
+      <l:template name="December" text="d&#233;cembre"/>
+      <l:template name="Monday" text="lundi"/>
+      <l:template name="Tuesday" text="mardi"/>
+      <l:template name="Wednesday" text="mercredi"/>
+      <l:template name="Thursday" text="jeudi"/>
+      <l:template name="Friday" text="vendredi"/>
+      <l:template name="Saturday" text="samedi"/>
+      <l:template name="Sunday" text="dimanche"/>
+   </l:context>
+
+   <l:context name="datetime-abbrev">
+      <l:template name="Jan" text="jan"/>
+      <l:template name="Feb" text="f&#233;v"/>
+      <l:template name="Mar" text="mar"/>
+      <l:template name="Apr" text="avr"/>
+      <l:template name="May" text="mai"/>
+      <l:template name="Jun" text="jun"/>
+      <l:template name="Jul" text="jui"/>
+      <l:template name="Aug" text="ao&#251;"/>
+      <l:template name="Sep" text="sep"/>
+      <l:template name="Oct" text="oct"/>
+      <l:template name="Nov" text="nov"/>
+      <l:template name="Dec" text="d&#233;c"/>
+      <l:template name="Mon" text="lun"/>
+      <l:template name="Tue" text="mar"/>
+      <l:template name="Wed" text="mer"/>
+      <l:template name="Thu" text="jeu"/>
+      <l:template name="Fri" text="ven"/>
+      <l:template name="Sat" text="sam"/>
+      <l:template name="Sun" text="dim"/>
+   </l:context>
+
+   <l:context name="htmlhelp">
+      <l:template name="langcode" text="0x040c French (FRANCE)"/>
+   </l:context>
+
+   <l:letters>
+      <l:l i="-1"/>
+      <l:l i="0">Symboles</l:l>
+      <l:l i="1">A</l:l>
+      <l:l i="1">a</l:l>
+      <l:l i="1">&#224;</l:l>
+      <l:l i="1">&#192;</l:l>
+      <l:l i="1">&#226;</l:l>
+      <l:l i="1">&#194;</l:l>
+      <l:l i="1">&#198;</l:l>
+      <l:l i="1">&#230;</l:l>
+      <l:l i="2">B</l:l>
+      <l:l i="2">b</l:l>
+      <l:l i="3">C</l:l>
+      <l:l i="3">c</l:l>
+      <l:l i="3">&#231;</l:l>
+      <l:l i="4">D</l:l>
+      <l:l i="4">d</l:l>
+      <l:l i="5">E</l:l>
+      <l:l i="5">e</l:l>
+      <l:l i="5">&#234;</l:l>
+      <l:l i="5">&#202;</l:l>
+      <l:l i="5">&#233;</l:l>
+      <l:l i="5">&#201;</l:l>
+      <l:l i="5">&#232;</l:l>
+      <l:l i="5">&#200;</l:l>
+      <l:l i="5">&#235;</l:l>
+      <l:l i="5">&#203;</l:l>
+      <l:l i="5">&#8364;</l:l>
+      <l:l i="6">F</l:l>
+      <l:l i="6">f</l:l>
+      <l:l i="7">G</l:l>
+      <l:l i="7">g</l:l>
+      <l:l i="8">H</l:l>
+      <l:l i="8">h</l:l>
+      <l:l i="9">I</l:l>
+      <l:l i="9">i</l:l>
+      <l:l i="9">&#206;</l:l>
+      <l:l i="9">&#238;</l:l>
+      <l:l i="9">&#207;</l:l>
+      <l:l i="9">&#239;</l:l>
+      <l:l i="10">J</l:l>
+      <l:l i="10">j</l:l>
+      <l:l i="11">K</l:l>
+      <l:l i="11">k</l:l>
+      <l:l i="12">L</l:l>
+      <l:l i="12">l</l:l>
+      <l:l i="13">M</l:l>
+      <l:l i="13">m</l:l>
+      <l:l i="14">N</l:l>
+      <l:l i="14">n</l:l>
+      <l:l i="15">O</l:l>
+      <l:l i="15">o</l:l>
+      <l:l i="15">&#214;</l:l>
+      <l:l i="15">&#246;</l:l>
+      <l:l i="15">&#338;</l:l>
+      <l:l i="15">&#339;</l:l>
+      <l:l i="16">P</l:l>
+      <l:l i="16">p</l:l>
+      <l:l i="17">Q</l:l>
+      <l:l i="17">q</l:l>
+      <l:l i="18">R</l:l>
+      <l:l i="18">r</l:l>
+      <l:l i="19">S</l:l>
+      <l:l i="19">s</l:l>
+      <l:l i="20">T</l:l>
+      <l:l i="20">t</l:l>
+      <l:l i="21">U</l:l>
+      <l:l i="21">u</l:l>
+      <l:l i="21">&#217;</l:l>
+      <l:l i="21">&#249;</l:l>
+      <l:l i="21">&#219;</l:l>
+      <l:l i="21">&#251;</l:l>
+      <l:l i="21">&#220;</l:l>
+      <l:l i="21">&#252;</l:l>
+      <l:l i="22">V</l:l>
+      <l:l i="22">v</l:l>
+      <l:l i="23">W</l:l>
+      <l:l i="23">w</l:l>
+      <l:l i="24">X</l:l>
+      <l:l i="24">x</l:l>
+      <l:l i="25">Y</l:l>
+      <l:l i="25">y</l:l>
+      <l:l i="26">Z</l:l>
+      <l:l i="26">z</l:l>
+   </l:letters>
+</l:l10n>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/gentext.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/gentext.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/gentext.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,716 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+                exclude-result-prefixes="doc"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: gentext.xsl,v 1.1.1.1 2004/10/19 21:21:38 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+
+<xsl:template match="*" mode="object.title.template">
+  <xsl:call-template name="gentext.template">
+    <xsl:with-param name="context" select="'title'"/>
+    <xsl:with-param name="name">
+      <xsl:call-template name="xpath.location"/>
+    </xsl:with-param>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="chapter" mode="object.title.template">
+  <xsl:choose>
+    <xsl:when test="$chapter.autolabel != 0">
+      <xsl:call-template name="gentext.template">
+        <xsl:with-param name="context" select="'title-numbered'"/>
+        <xsl:with-param name="name">
+          <xsl:call-template name="xpath.location"/>
+        </xsl:with-param>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:call-template name="gentext.template">
+        <xsl:with-param name="context" select="'title-unnumbered'"/>
+        <xsl:with-param name="name">
+          <xsl:call-template name="xpath.location"/>
+        </xsl:with-param>
+      </xsl:call-template>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="appendix" mode="object.title.template">
+  <xsl:choose>
+    <xsl:when test="$appendix.autolabel != 0">
+      <xsl:call-template name="gentext.template">
+        <xsl:with-param name="context" select="'title-numbered'"/>
+        <xsl:with-param name="name">
+          <xsl:call-template name="xpath.location"/>
+        </xsl:with-param>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:call-template name="gentext.template">
+        <xsl:with-param name="context" select="'title-unnumbered'"/>
+        <xsl:with-param name="name">
+          <xsl:call-template name="xpath.location"/>
+        </xsl:with-param>
+      </xsl:call-template>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="section|sect1|sect2|sect3|sect4|sect5|simplesect
+                     |bridgehead"
+              mode="object.title.template">
+  <xsl:choose>
+    <xsl:when test="$section.autolabel != 0">
+      <xsl:call-template name="gentext.template">
+        <xsl:with-param name="context" select="'title-numbered'"/>
+        <xsl:with-param name="name">
+          <xsl:call-template name="xpath.location"/>
+        </xsl:with-param>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:call-template name="gentext.template">
+        <xsl:with-param name="context" select="'title-unnumbered'"/>
+        <xsl:with-param name="name">
+          <xsl:call-template name="xpath.location"/>
+        </xsl:with-param>
+      </xsl:call-template>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="procedure" mode="object.title.template">
+  <xsl:choose>
+    <xsl:when test="$formal.procedures != 0">
+      <xsl:call-template name="gentext.template">
+        <xsl:with-param name="context" select="'title'"/>
+        <xsl:with-param name="name">
+          <xsl:call-template name="xpath.location"/>
+          <xsl:text>.formal</xsl:text>
+        </xsl:with-param>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:call-template name="gentext.template">
+        <xsl:with-param name="context" select="'title'"/>
+        <xsl:with-param name="name">
+          <xsl:call-template name="xpath.location"/>
+        </xsl:with-param>
+      </xsl:call-template>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- ============================================================ -->
+
+<xsl:template match="*" mode="object.subtitle.template">
+  <xsl:call-template name="gentext.template">
+    <xsl:with-param name="context" select="'subtitle'"/>
+    <xsl:with-param name="name">
+      <xsl:call-template name="xpath.location"/>
+    </xsl:with-param>
+  </xsl:call-template>
+</xsl:template>
+
+<!-- ============================================================ -->
+
+<xsl:template match="*" mode="is.autonumber">
+  <xsl:value-of select="'0'"/>
+</xsl:template>
+
+<xsl:template match="section|sect1|sect2|sect3|sect4|sect5" 
+              mode="is.autonumber">
+  <xsl:value-of select="$section.autolabel"/>
+</xsl:template>
+
+<xsl:template match="figure|example|table|equation" mode="is.autonumber">
+  <xsl:value-of select="'1'"/>
+</xsl:template>
+
+<xsl:template match="appendix" mode="is.autonumber">
+  <xsl:value-of select="$appendix.autolabel"/>
+</xsl:template>
+
+<xsl:template match="chapter" mode="is.autonumber">
+  <xsl:value-of select="$chapter.autolabel"/>
+</xsl:template>
+
+<xsl:template match="part" mode="is.autonumber">
+  <xsl:value-of select="$part.autolabel"/>
+</xsl:template>
+
+<xsl:template match="preface" mode="is.autonumber">
+  <xsl:value-of select="$preface.autolabel"/>
+</xsl:template>
+
+<xsl:template match="question|answer" mode="is.autonumber">
+  <xsl:choose>
+    <xsl:when test="$qanda.defaultlabel = 'number'
+                    and not(label)">
+      <xsl:value-of select="'1'"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:value-of select="'0'"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="qandadiv" mode="is.autonumber">
+  <xsl:value-of select="$qandadiv.autolabel"/>
+</xsl:template>
+
+<xsl:template match="bridgehead" mode="is.autonumber">
+  <xsl:value-of select="$section.autolabel"/>
+</xsl:template>
+
+<xsl:template match="*" mode="object.xref.template">
+  <xsl:param name="purpose"/>
+  <xsl:param name="xrefstyle"/>
+  <xsl:param name="referrer"/>
+
+  <!-- Is autonumbering on? -->
+  <xsl:variable name="autonumber">
+    <xsl:apply-templates select="." mode="is.autonumber"/>
+  </xsl:variable>
+
+  <xsl:variable name="number-and-title-template">
+    <xsl:call-template name="gentext.template.exists">
+      <xsl:with-param name="context" select="'xref-number-and-title'"/>
+      <xsl:with-param name="name">
+        <xsl:call-template name="xpath.location"/>
+      </xsl:with-param>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="number-template">
+    <xsl:call-template name="gentext.template.exists">
+      <xsl:with-param name="context" select="'xref-number'"/>
+      <xsl:with-param name="name">
+        <xsl:call-template name="xpath.location"/>
+      </xsl:with-param>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="context">
+    <xsl:choose>
+      <xsl:when test="$autonumber != 0 
+                      and $number-and-title-template != 0
+                      and $xref.with.number.and.title != 0">
+         <xsl:value-of select="'xref-number-and-title'"/>
+      </xsl:when>
+      <xsl:when test="$autonumber != 0 
+                      and $number-template != 0">
+         <xsl:value-of select="'xref-number'"/>
+      </xsl:when>
+      <xsl:otherwise>
+         <xsl:value-of select="'xref'"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:call-template name="gentext.template">
+    <xsl:with-param name="context" select="$context"/>
+    <xsl:with-param name="name">
+      <xsl:call-template name="xpath.location"/>
+    </xsl:with-param>
+    <xsl:with-param name="purpose" select="$purpose"/>
+    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+    <xsl:with-param name="referrer" select="$referrer"/>
+  </xsl:call-template>
+
+</xsl:template>
+
+
+<!-- ============================================================ -->
+
+<xsl:template match="*" mode="object.title.markup">
+  <xsl:param name="allow-anchors" select="0"/>
+  <xsl:variable name="template">
+    <xsl:apply-templates select="." mode="object.title.template"/>
+  </xsl:variable>
+
+<!--
+  <xsl:message>
+    <xsl:text>object.title.markup: </xsl:text>
+    <xsl:value-of select="local-name(.)"/>
+    <xsl:text>: </xsl:text>
+    <xsl:value-of select="$template"/>
+  </xsl:message>
+-->
+
+  <xsl:call-template name="substitute-markup">
+    <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
+    <xsl:with-param name="template" select="$template"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="*" mode="object.title.markup.textonly">
+  <xsl:variable name="title">
+    <xsl:apply-templates select="." mode="object.title.markup"/>
+  </xsl:variable>
+  <xsl:value-of select="$title"/>
+</xsl:template>
+
+<!-- ============================================================ -->
+
+<xsl:template match="*" mode="object.titleabbrev.markup">
+  <xsl:param name="allow-anchors" select="0"/>
+
+  <!-- Just for consistency in template naming -->
+
+  <xsl:apply-templates select="." mode="titleabbrev.markup">
+    <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<!-- ============================================================ -->
+
+<xsl:template match="*" mode="object.subtitle.markup">
+  <xsl:variable name="template">
+    <xsl:apply-templates select="." mode="object.subtitle.template"/>
+  </xsl:variable>
+
+  <xsl:call-template name="substitute-markup">
+    <xsl:with-param name="template" select="$template"/>
+  </xsl:call-template>
+</xsl:template>
+
+<!-- ============================================================ -->
+
+<xsl:template match="*" mode="object.xref.markup">
+  <xsl:param name="purpose"/>
+  <xsl:param name="xrefstyle"/>
+  <xsl:param name="referrer"/>
+
+  <xsl:variable name="template">
+    <xsl:choose>
+      <xsl:when test="starts-with(normalize-space($xrefstyle), 'select:')">
+        <xsl:call-template name="make.gentext.template">
+          <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+          <xsl:with-param name="purpose" select="$purpose"/>
+          <xsl:with-param name="referrer" select="$referrer"/>
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:when test="starts-with(normalize-space($xrefstyle), 'template:')">
+        <xsl:value-of select="substring-after(normalize-space($xrefstyle), 'template:')"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:apply-templates select="." mode="object.xref.template">
+          <xsl:with-param name="purpose" select="$purpose"/>
+          <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+          <xsl:with-param name="referrer" select="$referrer"/>
+        </xsl:apply-templates>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+<!-- 
+  <xsl:message>
+    <xsl:text>object.xref.markup: </xsl:text>
+    <xsl:value-of select="local-name(.)"/>
+    <xsl:text>(</xsl:text>
+    <xsl:value-of select="$xrefstyle"/>
+    <xsl:text>, </xsl:text>
+    <xsl:value-of select="$purpose"/>
+    <xsl:text>)</xsl:text>
+    <xsl:text>: [</xsl:text>
+    <xsl:value-of select="$template"/>
+    <xsl:text>]</xsl:text>
+  </xsl:message>
+-->
+
+  <xsl:if test="$template = ''">
+    <xsl:message>
+      <xsl:text>object.xref.markup: empty xref template</xsl:text>
+      <xsl:text> for linkend="</xsl:text>
+      <xsl:value-of select="@id"/>
+      <xsl:text>" and @xrefstyle="</xsl:text>
+      <xsl:value-of select="$xrefstyle"/>
+      <xsl:text>"</xsl:text>
+    </xsl:message>
+  </xsl:if>
+
+  <xsl:call-template name="substitute-markup">
+    <xsl:with-param name="purpose" select="$purpose"/>
+    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+    <xsl:with-param name="referrer" select="$referrer"/>
+    <xsl:with-param name="template" select="$template"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="listitem" mode="object.xref.markup">
+  <xsl:choose>
+    <xsl:when test="parent::orderedlist">
+      <xsl:variable name="template">
+        <xsl:apply-templates select="." mode="object.xref.template"/>
+      </xsl:variable>
+      <xsl:call-template name="substitute-markup">
+        <xsl:with-param name="template" select="$template"/>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:message>
+        <xsl:text>Xref is only supported to listitems in an</xsl:text>
+        <xsl:text> orderedlist: </xsl:text>
+        <xsl:value-of select="@id"/>
+      </xsl:message>
+      <xsl:text>???</xsl:text>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="question" mode="object.xref.markup">
+  <xsl:param name="purpose"/>
+  <xsl:param name="xrefstyle"/>
+  <xsl:param name="referrer"/>
+
+  <xsl:variable name="deflabel">
+    <xsl:choose>
+      <xsl:when test="ancestor-or-self::*[@defaultlabel]">
+        <xsl:value-of select="(ancestor-or-self::*[@defaultlabel])[last()]
+                              /@defaultlabel"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$qanda.defaultlabel"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:variable name="template">
+    <xsl:choose>
+      <!-- This avoids double Q: Q: in xref when defaultlabel=qanda -->
+      <xsl:when test="$deflabel = 'qanda' and not(label)">%n</xsl:when>
+      <xsl:otherwise>
+        <xsl:apply-templates select="." mode="object.xref.template">
+          <xsl:with-param name="purpose" select="$purpose"/>
+          <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+          <xsl:with-param name="referrer" select="$referrer"/>
+        </xsl:apply-templates>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:call-template name="substitute-markup">
+    <xsl:with-param name="purpose" select="$purpose"/>
+    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+    <xsl:with-param name="referrer" select="$referrer"/>
+    <xsl:with-param name="template" select="$template"/>
+  </xsl:call-template>
+</xsl:template>
+
+<!-- ============================================================ -->
+
+<xsl:template name="substitute-markup">
+  <xsl:param name="template" select="''"/>
+  <xsl:param name="allow-anchors" select="'0'"/>
+  <xsl:param name="title" select="''"/>
+  <xsl:param name="subtitle" select="''"/>
+  <xsl:param name="label" select="''"/>
+  <xsl:param name="pagenumber" select="''"/>
+  <xsl:param name="purpose"/>
+  <xsl:param name="xrefstyle"/>
+  <xsl:param name="referrer"/>
+
+  <xsl:choose>
+    <xsl:when test="contains($template, '%')">
+      <xsl:value-of select="substring-before($template, '%')"/>
+      <xsl:variable name="candidate"
+             select="substring(substring-after($template, '%'), 1, 1)"/>
+      <xsl:choose>
+        <xsl:when test="$candidate = 't'">
+          <xsl:apply-templates select="." mode="insert.title.markup">
+            <xsl:with-param name="purpose" select="$purpose"/>
+            <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+            <xsl:with-param name="title">
+              <xsl:choose>
+                <xsl:when test="$title != ''">
+                  <xsl:copy-of select="$title"/>
+                </xsl:when>
+                <xsl:otherwise>
+                  <xsl:apply-templates select="." mode="title.markup">
+                    <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
+                  </xsl:apply-templates>
+                </xsl:otherwise>
+              </xsl:choose>
+            </xsl:with-param>
+          </xsl:apply-templates>
+        </xsl:when>
+        <xsl:when test="$candidate = 's'">
+          <xsl:apply-templates select="." mode="insert.subtitle.markup">
+            <xsl:with-param name="purpose" select="$purpose"/>
+            <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+            <xsl:with-param name="subtitle">
+              <xsl:choose>
+                <xsl:when test="$subtitle != ''">
+                  <xsl:copy-of select="$subtitle"/>
+                </xsl:when>
+                <xsl:otherwise>
+                  <xsl:apply-templates select="." mode="subtitle.markup">
+                    <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
+                  </xsl:apply-templates>
+                </xsl:otherwise>
+              </xsl:choose>
+            </xsl:with-param>
+          </xsl:apply-templates>
+        </xsl:when>
+        <xsl:when test="$candidate = 'n'">
+          <xsl:apply-templates select="." mode="insert.label.markup">
+            <xsl:with-param name="purpose" select="$purpose"/>
+            <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+            <xsl:with-param name="label">
+              <xsl:choose>
+                <xsl:when test="$label != ''">
+                  <xsl:copy-of select="$label"/>
+                </xsl:when>
+                <xsl:otherwise>
+                  <xsl:apply-templates select="." mode="label.markup"/>
+                </xsl:otherwise>
+              </xsl:choose>
+            </xsl:with-param>
+          </xsl:apply-templates>
+        </xsl:when>
+        <xsl:when test="$candidate = 'p'">
+          <xsl:apply-templates select="." mode="insert.pagenumber.markup">
+            <xsl:with-param name="purpose" select="$purpose"/>
+            <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+            <xsl:with-param name="pagenumber">
+              <xsl:choose>
+                <xsl:when test="$pagenumber != ''">
+                  <xsl:copy-of select="$pagenumber"/>
+                </xsl:when>
+                <xsl:otherwise>
+                  <xsl:apply-templates select="." mode="pagenumber.markup"/>
+                </xsl:otherwise>
+              </xsl:choose>
+            </xsl:with-param>
+          </xsl:apply-templates>
+        </xsl:when>
+        <xsl:when test="$candidate = 'd'">
+          <xsl:apply-templates select="." mode="insert.direction.markup">
+            <xsl:with-param name="purpose" select="$purpose"/>
+            <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+            <xsl:with-param name="direction">
+              <xsl:choose>
+                <xsl:when test="$referrer">
+                  <xsl:variable name="referent-is-below">
+                    <xsl:for-each select="preceding::xref">
+                      <xsl:if test="generate-id(.) = generate-id($referrer)">1</xsl:if>
+                    </xsl:for-each>
+                  </xsl:variable>
+                  <xsl:choose>
+                    <xsl:when test="$referent-is-below = ''">
+                      <xsl:call-template name="gentext">
+                        <xsl:with-param name="key" select="'above'"/>
+                      </xsl:call-template>
+                    </xsl:when>
+                    <xsl:otherwise>
+                      <xsl:call-template name="gentext">
+                        <xsl:with-param name="key" select="'below'"/>
+                      </xsl:call-template>
+                    </xsl:otherwise>
+                  </xsl:choose>
+                </xsl:when>
+                <xsl:otherwise>
+                  <xsl:message>Attempt to use %d in gentext with no referrer!</xsl:message>
+                </xsl:otherwise>
+              </xsl:choose>
+            </xsl:with-param>
+          </xsl:apply-templates>
+        </xsl:when>
+        <xsl:when test="$candidate = '%' ">
+          <xsl:text>%</xsl:text>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:text>%</xsl:text><xsl:value-of select="$candidate"/>
+        </xsl:otherwise>
+      </xsl:choose>
+      <!-- recurse with the rest of the template string -->
+      <xsl:variable name="rest"
+            select="substring($template,
+            string-length(substring-before($template, '%'))+3)"/>
+      <xsl:call-template name="substitute-markup">
+        <xsl:with-param name="template" select="$rest"/>
+        <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
+        <xsl:with-param name="title" select="$title"/>
+        <xsl:with-param name="subtitle" select="$subtitle"/>
+        <xsl:with-param name="label" select="$label"/>
+        <xsl:with-param name="pagenumber" select="$pagenumber"/>
+        <xsl:with-param name="purpose" select="$purpose"/>
+        <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+        <xsl:with-param name="referrer" select="$referrer"/>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:value-of select="$template"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- ============================================================ -->
+
+<xsl:template name="make.gentext.template">
+  <xsl:param name="xrefstyle" select="''"/>
+  <xsl:param name="purpose"/>
+  <xsl:param name="referrer"/>
+  <xsl:param name="lang">
+    <xsl:call-template name="l10n.language"/>
+  </xsl:param>
+
+  <!-- parse xrefstyle to get parts -->
+  <xsl:variable name="parts"
+      select="substring-after(normalize-space($xrefstyle), 'select:')"/>
+
+  <xsl:variable name="labeltype">
+    <xsl:choose>
+      <xsl:when test="contains($parts, 'labelnumber')">
+         <xsl:text>labelnumber</xsl:text>
+      </xsl:when>
+      <xsl:when test="contains($parts, 'labelname')">
+         <xsl:text>labelname</xsl:text>
+      </xsl:when>
+      <xsl:when test="contains($parts, 'label')">
+         <xsl:text>label</xsl:text>
+      </xsl:when>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:variable name="titletype">
+    <xsl:choose>
+      <xsl:when test="contains($parts, 'quotedtitle')">
+         <xsl:text>quotedtitle</xsl:text>
+      </xsl:when>
+      <xsl:when test="contains($parts, 'title')">
+         <xsl:text>title</xsl:text>
+      </xsl:when>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:variable name="pagetype">
+    <xsl:choose>
+      <xsl:when test="$insert.xref.page.number = 'no'">
+        <!-- suppress page numbers -->
+      </xsl:when>
+      <xsl:when test="contains($parts, 'nopage')">
+         <xsl:text>nopage</xsl:text>
+      </xsl:when>
+      <xsl:when test="contains($parts, 'pagenumber')">
+         <xsl:text>pagenumber</xsl:text>
+      </xsl:when>
+      <xsl:when test="contains($parts, 'pageabbrev')">
+         <xsl:text>pageabbrev</xsl:text>
+      </xsl:when>
+      <xsl:when test="contains($parts, 'Page')">
+         <xsl:text>Page</xsl:text>
+      </xsl:when>
+      <xsl:when test="contains($parts, 'page')">
+         <xsl:text>page</xsl:text>
+      </xsl:when>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:if test="$labeltype != ''">
+    <xsl:choose>
+      <xsl:when test="$labeltype = 'labelname'">
+        <xsl:call-template name="gentext"/>
+      </xsl:when>
+      <xsl:when test="$labeltype = 'labelnumber'">
+        <xsl:text>%n</xsl:text>
+      </xsl:when>
+      <xsl:when test="$labeltype = 'label'">
+        <xsl:call-template name="gentext.template">
+          <xsl:with-param name="context" select="'xref-number'"/>
+          <xsl:with-param name="name">
+            <xsl:call-template name="xpath.location"/>
+          </xsl:with-param>
+          <xsl:with-param name="purpose" select="$purpose"/>
+          <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+          <xsl:with-param name="referrer" select="$referrer"/>
+        </xsl:call-template>
+      </xsl:when>
+    </xsl:choose>
+
+    <xsl:choose>
+      <xsl:when test="$titletype != ''">
+        <xsl:value-of select="$xref.label-title.separator"/>
+      </xsl:when>
+      <xsl:when test="$pagetype != ''">
+        <xsl:value-of select="$xref.label-page.separator"/>
+      </xsl:when>
+    </xsl:choose>
+  </xsl:if>
+
+  <xsl:if test="$titletype != ''">
+    <xsl:choose>
+      <xsl:when test="$titletype = 'title'">
+        <xsl:text>%t</xsl:text>
+      </xsl:when>
+      <xsl:when test="$titletype = 'quotedtitle'">
+        <xsl:call-template name="gentext.dingbat">
+          <xsl:with-param name="dingbat" select="'startquote'"/>
+        </xsl:call-template>
+        <xsl:text>%t</xsl:text>
+        <xsl:call-template name="gentext.dingbat">
+          <xsl:with-param name="dingbat" select="'endquote'"/>
+        </xsl:call-template>
+      </xsl:when>
+    </xsl:choose>
+
+    <xsl:choose>
+      <xsl:when test="$pagetype != '' and $pagetype != 'nopage'">
+        <xsl:value-of select="$xref.title-page.separator"/>
+      </xsl:when>
+    </xsl:choose>
+  </xsl:if>
+  
+  <xsl:if test="$pagetype != ''">
+    <xsl:choose>
+      <!-- special case: use regular xref template -->
+      <xsl:when test="$pagetype = 'nopage' 
+                      and $labeltype = '' 
+                      and $titletype = ''">
+        <xsl:apply-templates select="." mode="object.xref.template">
+          <xsl:with-param name="purpose" select="$purpose"/>
+          <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+          <xsl:with-param name="referrer" select="$referrer"/>
+        </xsl:apply-templates>
+      </xsl:when>
+      <xsl:when test="$pagetype = 'page'">
+        <xsl:call-template name="gentext.template">
+          <xsl:with-param name="context" select="'xref'"/>
+          <xsl:with-param name="name" select="'page'"/>
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:when test="$pagetype = 'Page'">
+        <xsl:call-template name="gentext.template">
+          <xsl:with-param name="context" select="'xref'"/>
+          <xsl:with-param name="name" select="'Page'"/>
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:when test="$pagetype = 'pageabbrev'">
+        <xsl:call-template name="gentext.template">
+          <xsl:with-param name="context" select="'xref'"/>
+          <xsl:with-param name="name" select="'pageabbrev'"/>
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:when test="$pagetype = 'pagenumber'">
+        <xsl:text>%p</xsl:text>
+      </xsl:when>
+    </xsl:choose>
+
+  </xsl:if>
+
+</xsl:template>
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/he.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/he.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/he.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1153 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="he" english-language-name="Hebrew">
+
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+   <l:gentext key="Abstract" text="&#1505;&#1497;&#1499;&#1493;&#1501;"/>
+   <l:gentext key="abstract" text="&#1505;&#1497;&#1499;&#1493;&#1501;"/>
+   <l:gentext key="Answer" text="&#1514;:"/>
+   <l:gentext key="answer" text="&#1514;:"/>
+   <l:gentext key="Appendix" text="&#1504;&#1505;&#1508;&#1495;"/>
+   <l:gentext key="appendix" text="&#1504;&#1505;&#1508;&#1495;"/>
+   <l:gentext key="Article" text="&#1502;&#1488;&#1502;&#1512;"/>
+   <l:gentext key="article" text="&#1502;&#1488;&#1502;&#1512;"/>
+   <l:gentext key="Bibliography" text="&#1489;&#1497;&#1489;&#1500;&#1497;&#1493;&#1490;&#1512;&#1508;&#1497;&#1492;"/>
+   <l:gentext key="bibliography" text="&#1489;&#1497;&#1489;&#1500;&#1497;&#1493;&#1490;&#1512;&#1508;&#1497;&#1492;"/>
+   <l:gentext key="Book" text="&#1505;&#1508;&#1512;"/>
+   <l:gentext key="book" text="&#1505;&#1508;&#1512;"/>
+   <l:gentext key="CAUTION" text="&#1488;&#1494;&#1492;&#1512;&#1492;"/>
+   <l:gentext key="Caution" text="&#1488;&#1494;&#1492;&#1512;&#1492;"/>
+   <l:gentext key="caution" text="&#1488;&#1494;&#1492;&#1512;&#1492;"/>
+   <l:gentext key="Chapter" text="&#1508;&#1512;&#1511;"/>
+   <l:gentext key="chapter" text="&#1508;&#1512;&#1511;"/>
+   <l:gentext key="Colophon" text="&#1511;&#1493;&#1500;&#1493;&#1508;&#1493;&#1503;"/>
+   <l:gentext key="colophon" text="&#1511;&#1493;&#1500;&#1493;&#1508;&#1493;&#1503;"/>
+   <l:gentext key="Copyright" text="&#1494;&#1499;&#1493;&#1497;&#1493;&#1514; &#1497;&#1493;&#1510;&#1512;&#1497;&#1501;"/>
+   <l:gentext key="copyright" text="&#1494;&#1499;&#1493;&#1497;&#1493;&#1514; &#1497;&#1493;&#1510;&#1512;&#1497;&#1501;"/>
+   <l:gentext key="Dedication" text="&#1492;&#1511;&#1491;&#1513;&#1492;"/>
+   <l:gentext key="dedication" text="&#1492;&#1511;&#1491;&#1513;&#1492;"/>
+   <l:gentext key="Edition" text="&#1502;&#1492;&#1491;&#1493;&#1512;&#1492;"/>
+   <l:gentext key="edition" text="&#1502;&#1492;&#1491;&#1493;&#1512;&#1492;"/>
+   <l:gentext key="Equation" text="&#1502;&#1513;&#1493;&#1493;&#1488;&#1492;"/>
+   <l:gentext key="equation" text="&#1502;&#1513;&#1493;&#1493;&#1488;&#1492;"/>
+   <l:gentext key="Example" text="&#1491;&#1493;&#1490;&#1502;&#1492;"/>
+   <l:gentext key="example" text="&#1491;&#1493;&#1490;&#1502;&#1492;"/>
+   <l:gentext key="Figure" text="&#1488;&#1497;&#1493;&#1512;"/>
+   <l:gentext key="figure" text="&#1488;&#1497;&#1493;&#1512;"/>
+   <l:gentext key="Glossary" text="&#1502;&#1497;&#1500;&#1493;&#1503; &#1502;&#1493;&#1504;&#1495;&#1497;&#1501;"/>
+   <l:gentext key="glossary" text="&#1502;&#1497;&#1500;&#1493;&#1503; &#1502;&#1493;&#1504;&#1495;&#1497;&#1501;"/>
+   <l:gentext key="GlossSee" text="&#1512;&#1488;&#1492;"/>
+   <l:gentext key="glosssee" text="&#1512;&#1488;&#1492;"/>
+   <l:gentext key="GlossSeeAlso" text="&#1512;&#1488;&#1492; &#1490;&#1501;"/>
+   <l:gentext key="glossseealso" text="&#1512;&#1488;&#1492; &#1490;&#1501;"/>
+   <l:gentext key="IMPORTANT" text="&#1495;&#1513;&#1493;&#1489;"/>
+   <l:gentext key="important" text="&#1495;&#1513;&#1493;&#1489;"/>
+   <l:gentext key="Important" text="&#1495;&#1513;&#1493;&#1489;"/>
+   <l:gentext key="Index" text="&#1488;&#1497;&#1504;&#1491;&#1511;&#1505;"/>
+   <l:gentext key="index" text="&#1488;&#1497;&#1504;&#1491;&#1511;&#1505;"/>
+   <l:gentext key="ISBN" text="&#1502;&#1505;&#1508;&#1512; &#1505;&#1508;&#1512; &#1505;&#1496;&#1504;&#1491;&#1512;&#1496;&#1497; &#1489;&#1497;&#1504;&#1500;&#1488;&#1493;&#1502;&#1497;"/>
+   <l:gentext key="isbn" text="&#1502;&#1505;&#1508;&#1512; &#1505;&#1508;&#1512; &#1505;&#1496;&#1504;&#1491;&#1512;&#1496;&#1497; &#1489;&#1497;&#1504;&#1500;&#1488;&#1493;&#1502;&#1497;"/>
+   <l:gentext key="LegalNotice" text="&#1492;&#1493;&#1491;&#1506;&#1492; &#1502;&#1513;&#1508;&#1496;&#1497;&#1514;"/>
+   <l:gentext key="legalnotice" text="&#1492;&#1493;&#1491;&#1506;&#1492; &#1502;&#1513;&#1508;&#1496;&#1497;&#1514;"/>
+   <l:gentext key="MsgAud" text="&#1511;&#1492;&#1500; &#1497;&#1506;&#1491;"/>
+   <l:gentext key="msgaud" text="&#1511;&#1492;&#1500; &#1497;&#1506;&#1491;"/>
+   <l:gentext key="MsgLevel" text="&#1512;&#1502;&#1492;"/>
+   <l:gentext key="msglevel" text="&#1512;&#1502;&#1492;"/>
+   <l:gentext key="MsgOrig" text="&#1502;&#1511;&#1493;&#1512;"/>
+   <l:gentext key="msgorig" text="&#1502;&#1511;&#1493;&#1512;"/>
+   <l:gentext key="NOTE" text="&#1513;&#1497;&#1501; &#1500;&#1489;"/>
+   <l:gentext key="Note" text="&#1513;&#1497;&#1501; &#1500;&#1489;"/>
+   <l:gentext key="note" text="&#1513;&#1497;&#1501; &#1500;&#1489;"/>
+   <l:gentext key="Part" text="&#1495;&#1500;&#1511;"/>
+   <l:gentext key="part" text="&#1495;&#1500;&#1511;"/>
+   <l:gentext key="Preface" text="&#1502;&#1489;&#1493;&#1488;"/>
+   <l:gentext key="preface" text="&#1502;&#1489;&#1493;&#1488;"/>
+   <l:gentext key="Procedure" text="&#1492;&#1500;&#1497;&#1498;"/>
+   <l:gentext key="procedure" text="&#1492;&#1500;&#1497;&#1498;"/>
+   <l:gentext key="ProductionSet" text="&#1497;&#1497;&#1510;&#1493;&#1512;"/>
+   <l:gentext key="PubDate" text="Publication Date" lang="en"/>
+   <l:gentext key="pubdate" text="Publication date" lang="en"/>
+   <l:gentext key="Published" text="&#1492;&#1493;&#1510;&#1488; &#1500;&#1488;&#1493;&#1512;"/>
+   <l:gentext key="published" text="&#1492;&#1493;&#1510;&#1488; &#1500;&#1488;&#1493;&#1512;"/>
+   <l:gentext key="Qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="Question" text="&#1513;:"/>
+   <l:gentext key="question" text="&#1513;:"/>
+   <l:gentext key="RefEntry" text=""/>
+   <l:gentext key="refentry" text=""/>
+   <l:gentext key="Reference" text="&#1502;&#1512;&#1488;&#1492; &#1502;&#1511;&#1493;&#1501;"/>
+   <l:gentext key="reference" text="&#1502;&#1512;&#1488;&#1492; &#1502;&#1511;&#1493;&#1501;"/>
+   <l:gentext key="RefName" text="&#1513;&#1501;"/>
+   <l:gentext key="refname" text="&#1513;&#1501;"/>
+   <l:gentext key="RefSection" text=""/>
+   <l:gentext key="refsection" text=""/>
+   <l:gentext key="RefSynopsisDiv" text="&#1514;&#1502;&#1510;&#1497;&#1514;"/>
+   <l:gentext key="refsynopsisdiv" text="&#1514;&#1502;&#1510;&#1497;&#1514;"/>
+   <l:gentext key="RevHistory" text="&#1492;&#1497;&#1505;&#1496;&#1493;&#1512;&#1497;&#1497;&#1514; &#1490;&#1497;&#1512;&#1505;&#1488;&#1493;&#1514;"/>
+   <l:gentext key="revhistory" text="&#1492;&#1497;&#1505;&#1496;&#1493;&#1512;&#1497;&#1497;&#1514; &#1490;&#1497;&#1512;&#1505;&#1488;&#1493;&#1514;"/>
+   <l:gentext key="revision" text="&#1490;&#1497;&#1512;&#1505;&#1492;"/>
+   <l:gentext key="Revision" text="&#1490;&#1497;&#1512;&#1505;&#1492;"/>
+   <l:gentext key="sect1" text="&#1505;&#1506;&#1497;&#1507;"/>
+   <l:gentext key="sect2" text="&#1505;&#1506;&#1497;&#1507;"/>
+   <l:gentext key="sect3" text="&#1505;&#1506;&#1497;&#1507;"/>
+   <l:gentext key="sect4" text="&#1505;&#1506;&#1497;&#1507;"/>
+   <l:gentext key="sect5" text="&#1505;&#1506;&#1497;&#1507;"/>
+   <l:gentext key="section" text="&#1505;&#1506;&#1497;&#1507;"/>
+   <l:gentext key="Section" text="&#1505;&#1506;&#1497;&#1507;"/>
+   <l:gentext key="see" text="&#1512;&#1488;&#1492;"/>
+   <l:gentext key="See" text="&#1512;&#1488;&#1492;"/>
+   <l:gentext key="seealso" text="&#1512;&#1488;&#1492; &#1490;&#1501;"/>
+   <l:gentext key="Seealso" text="&#1512;&#1488;&#1492; &#1490;&#1501;"/>
+   <l:gentext key="SeeAlso" text="&#1512;&#1488;&#1492; &#1490;&#1501;"/>
+   <l:gentext key="set" text="&#1505;&#1497;&#1491;&#1512;&#1492;"/>
+   <l:gentext key="Set" text="&#1505;&#1497;&#1491;&#1512;&#1492;"/>
+   <l:gentext key="setindex" text="&#1488;&#1497;&#1504;&#1511;&#1491;&#1511;&#1505; &#1505;&#1491;&#1512;&#1493;&#1514;"/>
+   <l:gentext key="SetIndex" text="&#1488;&#1497;&#1504;&#1491;&#1511;&#1505; &#1505;&#1491;&#1512;&#1493;&#1514;"/>
+   <l:gentext key="Sidebar" text=""/>
+   <l:gentext key="sidebar" text="&#1508;&#1505; &#1510;&#1491;&#1491;&#1497;"/>
+   <l:gentext key="step" text="&#1510;&#1506;&#1491;"/>
+   <l:gentext key="Step" text="&#1510;&#1506;&#1491;"/>
+   <l:gentext key="Table" text="&#1496;&#1489;&#1500;&#1492;"/>
+   <l:gentext key="table" text="&#1496;&#1489;&#1500;&#1492;"/>
+   <l:gentext key="tip" text="&#1506;&#1510;&#1492;"/>
+   <l:gentext key="TIP" text="&#1506;&#1510;&#1492;"/>
+   <l:gentext key="Tip" text="&#1506;&#1510;&#1492;"/>
+   <l:gentext key="Warning" text="&#1488;&#1494;&#1492;&#1512;&#1492;"/>
+   <l:gentext key="warning" text="&#1488;&#1494;&#1492;&#1512;&#1492;"/>
+   <l:gentext key="WARNING" text="&#1488;&#1494;&#1492;&#1512;&#1492;"/>
+   <l:gentext key="and" text="&#1493;"/>
+   <l:gentext key="by" text="&#1502;&#1488;&#1514;"/>
+   <l:gentext key="called" text="called" lang="en"/>
+   <l:gentext key="Edited" text="&#1504;&#1506;&#1512;&#1498;"/>
+   <l:gentext key="edited" text="&#1504;&#1506;&#1512;&#1498;"/>
+   <l:gentext key="Editedby" text="&#1504;&#1506;&#1512;&#1498; &#1506;&#1500; &#1497;&#1491;&#1497;"/>
+   <l:gentext key="editedby" text="&#1504;&#1506;&#1512;&#1498; &#1506;&#1500; &#1497;&#1491;&#1497;"/>
+   <l:gentext key="in" text="&#1489;"/>
+   <l:gentext key="lastlistcomma" text=","/>
+   <l:gentext key="listcomma" text=","/>
+   <l:gentext key="nonexistantelement" text="&#1502;&#1512;&#1499;&#1497;&#1489; &#1513;&#1488;&#1497;&#1504;&#1493; &#1511;&#1497;&#1497;&#1501;"/>
+   <l:gentext key="notes" text="&#1492;&#1506;&#1512;&#1493;&#1514;"/>
+   <l:gentext key="Notes" text="&#1492;&#1506;&#1512;&#1493;&#1514;"/>
+   <l:gentext key="Pgs" text="&#1506;&#1502;&#1493;&#1491;&#1497;&#1501;"/>
+   <l:gentext key="pgs" text="&#1506;&#1502;&#1493;&#1491;&#1497;&#1501;"/>
+   <l:gentext key="Revisedby" text="&#1492;&#1493;&#1490;&#1492; &#1506;&#1500; &#1497;&#1491;&#1497;: "/>
+   <l:gentext key="revisedby" text="&#1492;&#1493;&#1490;&#1492; &#1506;&#1500; &#1497;&#1491;&#1497;: "/>
+   <l:gentext key="TableNotes" text="&#1492;&#1506;&#1512;&#1493;&#1514;"/>
+   <l:gentext key="tablenotes" text="&#1492;&#1506;&#1512;&#1493;&#1514;"/>
+   <l:gentext key="TableofContents" text="&#1514;&#1493;&#1499;&#1503; &#1492;&#1506;&#1504;&#1497;&#1497;&#1504;&#1497;&#1501;"/>
+   <l:gentext key="tableofcontents" text="&#1514;&#1493;&#1499;&#1503; &#1492;&#1506;&#1504;&#1497;&#1497;&#1504;&#1497;&#1501;"/>
+   <l:gentext key="the" text="" lang="en"/>
+   <l:gentext key="unexpectedelementname" text="&#1513;&#1501; &#1502;&#1512;&#1499;&#1497;&#1489; &#1489;&#1500;&#1514;&#1497; &#1510;&#1508;&#1493;&#1497;"/>
+   <l:gentext key="unsupported" text="&#1500;&#1488; &#1504;&#1514;&#1502;&#1498;"/>
+   <l:gentext key="xrefto" text="&#1492;&#1514;&#1497;&#1497;&#1495;&#1505;&#1493;&#1514; &#1510;&#1493;&#1500;&#1489;&#1514; &#1488;&#1500;"/>
+   <l:gentext key="listofequations" text="&#1512;&#1513;&#1497;&#1502;&#1514; &#1502;&#1513;&#1493;&#1493;&#1488;&#1493;&#1514;"/>
+   <l:gentext key="ListofEquations" text="&#1512;&#1513;&#1497;&#1502;&#1514; &#1502;&#1513;&#1493;&#1493;&#1488;&#1493;&#1514;"/>
+   <l:gentext key="ListofExamples" text="&#1512;&#1513;&#1497;&#1502;&#1514; &#1491;&#1493;&#1490;&#1502;&#1488;&#1493;&#1514;"/>
+   <l:gentext key="listofexamples" text="&#1512;&#1513;&#1497;&#1502;&#1514; &#1491;&#1493;&#1490;&#1502;&#1488;&#1493;&#1514;"/>
+   <l:gentext key="ListofFigures" text="&#1512;&#1513;&#1497;&#1502;&#1514; &#1488;&#1497;&#1493;&#1512;&#1497;&#1501;"/>
+   <l:gentext key="listoffigures" text="&#1512;&#1513;&#1497;&#1502;&#1514; &#1488;&#1497;&#1493;&#1512;&#1497;&#1501;"/>
+   <l:gentext key="ListofProcedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listofprocedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listoftables" text="&#1512;&#1513;&#1497;&#1502;&#1514; &#1496;&#1489;&#1500;&#1488;&#1493;&#1514;"/>
+   <l:gentext key="ListofTables" text="&#1512;&#1513;&#1497;&#1502;&#1514; &#1496;&#1489;&#1500;&#1488;&#1493;&#1514;"/>
+   <l:gentext key="ListofUnknown" text="&#1512;&#1513;&#1497;&#1502;&#1492; &#1513;&#1500; &#1502;&#1512;&#1499;&#1497;&#1489;&#1497;&#1501; &#1500;&#1488; &#1497;&#1491;&#1493;&#1506;&#1497;&#1501;"/>
+   <l:gentext key="listofunknown" text="&#1512;&#1513;&#1497;&#1502;&#1492; &#1513;&#1500; &#1502;&#1512;&#1499;&#1497;&#1489;&#1497;&#1501; &#1500;&#1488; &#1497;&#1491;&#1493;&#1506;&#1497;&#1501;"/>
+   <l:gentext key="nav-home" text="&#1512;&#1488;&#1513;&#1497;"/>
+   <l:gentext key="nav-next" text="&#1492;&#1489;&#1488;"/>
+   <l:gentext key="nav-next-sibling" text="&#1491;&#1500;&#1490; &#1500;&#1505;&#1493;&#1507;"/>
+   <l:gentext key="nav-prev" text="&#1492;&#1511;&#1493;&#1491;&#1501;"/>
+   <l:gentext key="nav-prev-sibling" text="&#1495;&#1494;&#1493;&#1512; &#1500;&#1492;&#1514;&#1495;&#1500;&#1492;"/>
+   <l:gentext key="nav-up" text="&#1500;&#1502;&#1506;&#1500;&#1492;"/>
+   <l:gentext key="nav-toc" text="ToC" lang="en"/>
+   <l:gentext key="Draft" text="&#1496;&#1497;&#1493;&#1496;&#1492;"/>
+   <l:gentext key="above" text="&#1500;&#1502;&#1506;&#1500;&#1492;"/>
+   <l:gentext key="below" text="&#1500;&#1502;&#1496;&#1492;"/>
+   <l:gentext key="sectioncalled" text="&#1492;&#1505;&#1506;&#1497;&#1507; &#1513;&#1504;&#1511;&#1512;&#1488;"/>
+   <l:gentext key="index symbols" text="&#1505;&#1502;&#1500;&#1497;&#1501;"/>
+   <l:gentext key="lowercase.alpha" text="abcdefghijklmnopqrstuvwxyz"/>
+   <l:gentext key="uppercase.alpha" text="ABCDEFGHIJKLMNOPQRSTUVWXYZ"/>
+   <l:dingbat key="startquote" text="&#8220;"/>
+   <l:dingbat key="endquote" text="&#8221;"/>
+   <l:dingbat key="nestedstartquote" text="&#8216;"/>
+   <l:dingbat key="nestedendquote" text="&#8217;"/>
+   <l:dingbat key="singlestartquote" text="&#8216;" lang="en"/>
+   <l:dingbat key="singleendquote" text="&#8217;" lang="en"/>
+   <l:dingbat key="bullet" text="&#8226;"/>
+   <l:gentext key="hyphenation-character" text="-" lang="en"/>
+   <l:gentext key="hyphenation-push-character-count" text="2" lang="en"/>
+   <l:gentext key="hyphenation-remain-character-count" text="2" lang="en"/>
+
+   <l:context name="styles">
+      <l:template name="person-name" text="first-last"/>
+   </l:context>
+
+   <l:context name="title">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="%t"/>
+      <l:template name="appendix" text="&#1504;&#1505;&#1508;&#1495; %n. %t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="biblioentry" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliolist" text="%t" lang="en"/>
+      <l:template name="bibliomixed" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="&#1508;&#1512;&#1511; %n. %t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="&#1502;&#1513;&#1493;&#1493;&#1488;&#1492; %n. %t"/>
+      <l:template name="example" text="&#1491;&#1493;&#1490;&#1502;&#1492; %n. %t"/>
+      <l:template name="figure" text="&#1488;&#1497;&#1493;&#1512; %n. %t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="glosslist" text="%t" lang="en"/>
+      <l:template name="glossentry" text="%t" lang="en"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text=""/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="&#1495;&#1500;&#1511; %n. %t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="procedure.formal" text="&#1492;&#1500;&#1497;&#1498; %n. %t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="productionset.formal" text="&#1497;&#1497;&#1510;&#1493;&#1512; %n"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="%t"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="%t"/>
+      <l:template name="refentry" text="%t"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsection" text="%t"/>
+      <l:template name="refsect1" text="%t"/>
+      <l:template name="refsect2" text="%t"/>
+      <l:template name="refsect3" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="refsynopsisdivinfo" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="step" text="%t"/>
+      <l:template name="table" text="&#1496;&#1489;&#1500;&#1492; %n. %t"/>
+      <l:template name="task" text="%t" lang="en"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text=""/>
+      <l:template name="warning" text="%t"/>
+   </l:context>
+
+   <l:context name="title-unnumbered">
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article/appendix" text="%t" lang="en"/>
+      <l:template name="bridgehead" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="sect1" text="%t"/>
+      <l:template name="sect2" text="%t"/>
+      <l:template name="sect3" text="%t"/>
+      <l:template name="sect4" text="%t"/>
+      <l:template name="sect5" text="%t"/>
+      <l:template name="section" text="%t"/>
+      <l:template name="simplesect" text="%t"/>
+   </l:context>
+
+   <l:context name="title-numbered">
+      <l:template name="appendix" text="&#1504;&#1505;&#1508;&#1495; %n. %t"/>
+      <l:template name="article/appendix" text="%n.&#160;%t" lang="en"/>
+      <l:template name="bridgehead" text="%n. %t"/>
+      <l:template name="chapter" text="&#1508;&#1512;&#1511; %n. %t"/>
+      <l:template name="sect1" text="%n. %t"/>
+      <l:template name="sect2" text="%n. %t"/>
+      <l:template name="sect3" text="%n. %t"/>
+      <l:template name="sect4" text="%n. %t"/>
+      <l:template name="sect5" text="%n. %t"/>
+      <l:template name="section" text="%n. %t"/>
+      <l:template name="simplesect" text="%t"/>
+   </l:context>
+
+   <l:context name="subtitle">
+      <l:template name="appendix" text="%s"/>
+      <l:template name="article" text="%s"/>
+      <l:template name="bibliodiv" text="%s"/>
+      <l:template name="biblioentry" text="%s"/>
+      <l:template name="bibliography" text="%s"/>
+      <l:template name="bibliomixed" text="%s"/>
+      <l:template name="bibliomset" text="%s"/>
+      <l:template name="biblioset" text="%s"/>
+      <l:template name="book" text="%s"/>
+      <l:template name="chapter" text="%s"/>
+      <l:template name="colophon" text="%s"/>
+      <l:template name="dedication" text="%s"/>
+      <l:template name="glossary" text="%s"/>
+      <l:template name="glossdiv" text="%s"/>
+      <l:template name="index" text="%s"/>
+      <l:template name="indexdiv" text="%s"/>
+      <l:template name="lot" text="%s"/>
+      <l:template name="part" text="%s"/>
+      <l:template name="partintro" text="%s"/>
+      <l:template name="preface" text="%s"/>
+      <l:template name="refentry" text="%s"/>
+      <l:template name="reference" text="%s"/>
+      <l:template name="refsection" text="%s"/>
+      <l:template name="refsect1" text="%s"/>
+      <l:template name="refsect2" text="%s"/>
+      <l:template name="refsect3" text="%s"/>
+      <l:template name="refsynopsisdiv" text="%s"/>
+      <l:template name="sect1" text="%s"/>
+      <l:template name="sect2" text="%s"/>
+      <l:template name="sect3" text="%s"/>
+      <l:template name="sect4" text="%s"/>
+      <l:template name="sect5" text="%s"/>
+      <l:template name="section" text="%s"/>
+      <l:template name="set" text="%s"/>
+      <l:template name="setindex" text="%s"/>
+      <l:template name="sidebar" text="%s"/>
+      <l:template name="simplesect" text="%s"/>
+      <l:template name="toc" text="%s"/>
+   </l:context>
+
+   <l:context name="xref">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="&#1514;:&#160;%n"/>
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="constraintdef" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="%t"/>
+      <l:template name="example" text="%t"/>
+      <l:template name="figure" text="%t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text="%n"/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="%t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="&#1513;:&#160;%n"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="&#1513;:&#160;%n"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="table" text="%t"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="%n"/>
+      <l:template name="warning" text="%t"/>
+      <l:template name="page.citation" text=" [%p]"/>
+      <l:template name="page" text="(page %p)" lang="en"/>
+      <l:template name="pageabbrev" text="(p. %p)" lang="en"/>
+      <l:template name="Page" text="Page %p" lang="en"/>
+      <l:template name="bridgehead" text="&#1492;&#1505;&#1506;&#1497;&#1507; &#1513;&#1504;&#1511;&#1512;&#1488; &#8220;%t&#8221;"/>
+      <l:template name="refsection" text="&#1492;&#1505;&#1506;&#1497;&#1507; &#1513;&#1504;&#1511;&#1512;&#1488; &#8220;%t&#8221;"/>
+      <l:template name="refsect1" text="&#1492;&#1505;&#1506;&#1497;&#1507; &#1513;&#1504;&#1511;&#1512;&#1488; &#8220;%t&#8221;"/>
+      <l:template name="refsect2" text="&#1492;&#1505;&#1506;&#1497;&#1507; &#1513;&#1504;&#1511;&#1512;&#1488; &#8220;%t&#8221;"/>
+      <l:template name="refsect3" text="&#1492;&#1505;&#1506;&#1497;&#1507; &#1513;&#1504;&#1511;&#1512;&#1488; &#8220;%t&#8221;"/>
+      <l:template name="sect1" text="&#1492;&#1505;&#1506;&#1497;&#1507; &#1513;&#1504;&#1511;&#1512;&#1488; &#8220;%t&#8221;"/>
+      <l:template name="sect2" text="&#1492;&#1505;&#1506;&#1497;&#1507; &#1513;&#1504;&#1511;&#1512;&#1488; &#8220;%t&#8221;"/>
+      <l:template name="sect3" text="&#1492;&#1505;&#1506;&#1497;&#1507; &#1513;&#1504;&#1511;&#1512;&#1488; &#8220;%t&#8221;"/>
+      <l:template name="sect4" text="&#1492;&#1505;&#1506;&#1497;&#1507; &#1513;&#1504;&#1511;&#1512;&#1488; &#8220;%t&#8221;"/>
+      <l:template name="sect5" text="&#1492;&#1505;&#1506;&#1497;&#1507; &#1513;&#1504;&#1511;&#1512;&#1488; &#8220;%t&#8221;"/>
+      <l:template name="section" text="&#1492;&#1505;&#1506;&#1497;&#1507; &#1513;&#1504;&#1511;&#1512;&#1488; &#8220;%t&#8221;"/>
+      <l:template name="simplesect" text="&#1492;&#1505;&#1506;&#1497;&#1507; &#1513;&#1504;&#1511;&#1512;&#1488; &#8220;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="xref-number">
+      <l:template name="answer" text="&#1514;:&#160;%n"/>
+      <l:template name="appendix" text="&#1504;&#1505;&#1508;&#1495;&#160;%n"/>
+      <l:template name="bridgehead" text="&#1505;&#1506;&#1497;&#1507;&#160;%n"/>
+      <l:template name="chapter" text="&#1508;&#1512;&#1511;&#160;%n"/>
+      <l:template name="equation" text="&#1502;&#1513;&#1493;&#1493;&#1488;&#1492;&#160;%n"/>
+      <l:template name="example" text="&#1491;&#1493;&#1490;&#1502;&#1492;&#160;%n"/>
+      <l:template name="figure" text="&#1488;&#1497;&#1493;&#1512;&#160;%n"/>
+      <l:template name="part" text="&#1495;&#1500;&#1511;&#160;%n"/>
+      <l:template name="procedure" text="&#1492;&#1500;&#1497;&#1498;&#160;%n"/>
+      <l:template name="productionset" text="&#1497;&#1497;&#1510;&#1493;&#1512;&#160;%n"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n"/>
+      <l:template name="qandaentry" text="&#1513;:&#160;%n"/>
+      <l:template name="question" text="&#1513;:&#160;%n"/>
+      <l:template name="sect1" text="&#1505;&#1506;&#1497;&#1507;&#160;%n"/>
+      <l:template name="sect2" text="&#1505;&#1506;&#1497;&#1507;&#160;%n"/>
+      <l:template name="sect3" text="&#1505;&#1506;&#1497;&#1507;&#160;%n"/>
+      <l:template name="sect4" text="&#1505;&#1506;&#1497;&#1507;&#160;%n"/>
+      <l:template name="sect5" text="&#1505;&#1506;&#1497;&#1507;&#160;%n"/>
+      <l:template name="section" text="&#1505;&#1506;&#1497;&#1507;&#160;%n"/>
+      <l:template name="table" text="&#1496;&#1489;&#1500;&#1492;&#160;%n"/>
+   </l:context>
+
+   <l:context name="xref-number-and-title">
+      <l:template name="appendix" text="&#1504;&#1505;&#1508;&#1495;&#160;%n, %t"/>
+      <l:template name="bridgehead" text="&#1505;&#1506;&#1497;&#1507;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="chapter" text="&#1508;&#1512;&#1511;&#160;%n, %t"/>
+      <l:template name="equation" text="&#1502;&#1513;&#1493;&#1493;&#1488;&#1492;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="example" text="&#1491;&#1493;&#1490;&#1502;&#1492;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="figure" text="&#1488;&#1497;&#1493;&#1512;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="part" text="&#1495;&#1500;&#1511;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="procedure" text="&#1492;&#1500;&#1497;&#1498;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="productionset" text="&#1497;&#1497;&#1510;&#1493;&#1512;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="refsect1" text="&#1492;&#1505;&#1506;&#1497;&#1507; &#1513;&#1504;&#1511;&#1512;&#1488; &#8220;%t&#8221;"/>
+      <l:template name="refsect2" text="&#1492;&#1505;&#1506;&#1497;&#1507; &#1513;&#1504;&#1511;&#1512;&#1488; &#8220;%t&#8221;"/>
+      <l:template name="refsect3" text="&#1492;&#1505;&#1506;&#1497;&#1507; &#1513;&#1504;&#1511;&#1512;&#1488; &#8220;%t&#8221;"/>
+      <l:template name="refsection" text="&#1492;&#1505;&#1506;&#1497;&#1507; &#1513;&#1504;&#1511;&#1512;&#1488; &#8220;%t&#8221;"/>
+      <l:template name="sect1" text="&#1505;&#1506;&#1497;&#1507;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect2" text="&#1505;&#1506;&#1497;&#1507;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect3" text="&#1505;&#1506;&#1497;&#1507;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect4" text="&#1505;&#1506;&#1497;&#1507;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect5" text="&#1505;&#1506;&#1497;&#1507;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="section" text="&#1505;&#1506;&#1497;&#1507;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="simplesect" text="&#1492;&#1505;&#1506;&#1497;&#1507; &#1513;&#1504;&#1511;&#1512;&#1488; &#8220;%t&#8221;"/>
+      <l:template name="table" text="&#1496;&#1489;&#1500;&#1492;&#160;%n, &#8220;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="authorgroup">
+      <l:template name="sep" text=", "/>
+      <l:template name="sep2" text=" &#1493; "/>
+      <l:template name="seplast" text=", &#1493; "/>
+   </l:context>
+
+   <l:context name="glossary">
+      <l:template name="see" text="&#1512;&#1488;&#1492; "/>
+      <l:template name="seealso" text="&#1512;&#1488;&#1492; &#1490;&#1501; "/>
+   </l:context>
+
+   <l:context name="msgset">
+      <l:template name="MsgAud" text="&#1511;&#1492;&#1500; &#1497;&#1506;&#1491;: "/>
+      <l:template name="MsgLevel" text="&#1512;&#1502;&#1492;: "/>
+      <l:template name="MsgOrig" text="&#1502;&#1511;&#1493;&#1512;: "/>
+   </l:context>
+
+   <l:context name="datetime">
+      <l:template name="format" text="m/d/Y" lang="en"/>
+   </l:context>
+
+   <l:context name="datetime-full">
+      <l:template name="January" text="January" lang="en"/>
+      <l:template name="February" text="February" lang="en"/>
+      <l:template name="March" text="March" lang="en"/>
+      <l:template name="April" text="April" lang="en"/>
+      <l:template name="May" text="May" lang="en"/>
+      <l:template name="June" text="June" lang="en"/>
+      <l:template name="July" text="July" lang="en"/>
+      <l:template name="August" text="August" lang="en"/>
+      <l:template name="September" text="September" lang="en"/>
+      <l:template name="October" text="October" lang="en"/>
+      <l:template name="November" text="November" lang="en"/>
+      <l:template name="December" text="December" lang="en"/>
+      <l:template name="Monday" text="Monday" lang="en"/>
+      <l:template name="Tuesday" text="Tuesday" lang="en"/>
+      <l:template name="Wednesday" text="Wednesday" lang="en"/>
+      <l:template name="Thursday" text="Thursday" lang="en"/>
+      <l:template name="Friday" text="Friday" lang="en"/>
+      <l:template name="Saturday" text="Saturday" lang="en"/>
+      <l:template name="Sunday" text="Sunday" lang="en"/>
+   </l:context>
+
+   <l:context name="datetime-abbrev">
+      <l:template name="Jan" text="Jan" lang="en"/>
+      <l:template name="Feb" text="Feb" lang="en"/>
+      <l:template name="Mar" text="Mar" lang="en"/>
+      <l:template name="Apr" text="Apr" lang="en"/>
+      <l:template name="May" text="May" lang="en"/>
+      <l:template name="Jun" text="Jun" lang="en"/>
+      <l:template name="Jul" text="Jul" lang="en"/>
+      <l:template name="Aug" text="Aug" lang="en"/>
+      <l:template name="Sep" text="Sep" lang="en"/>
+      <l:template name="Oct" text="Oct" lang="en"/>
+      <l:template name="Nov" text="Nov" lang="en"/>
+      <l:template name="Dec" text="Dec" lang="en"/>
+      <l:template name="Mon" text="Mon" lang="en"/>
+      <l:template name="Tue" text="Tue" lang="en"/>
+      <l:template name="Wed" text="Wed" lang="en"/>
+      <l:template name="Thu" text="Thu" lang="en"/>
+      <l:template name="Fri" text="Fri" lang="en"/>
+      <l:template name="Sat" text="Sat" lang="en"/>
+      <l:template name="Sun" text="Sun" lang="en"/>
+   </l:context>
+
+   <l:context name="htmlhelp">
+      <l:template name="langcode" text="0x040d Hebrew (ISRAEL)"/>
+   </l:context>
+
+   <l:letters lang="en">
+      <l:l i="-1"/>
+      <l:l i="0">Symbols</l:l>
+      <l:l i="10">A</l:l>
+      <l:l i="10">a</l:l>
+      <l:l i="10">&#192;</l:l>
+      <l:l i="10">&#224;</l:l>
+      <l:l i="10">&#193;</l:l>
+      <l:l i="10">&#225;</l:l>
+      <l:l i="10">&#194;</l:l>
+      <l:l i="10">&#226;</l:l>
+      <l:l i="10">&#195;</l:l>
+      <l:l i="10">&#227;</l:l>
+      <l:l i="10">&#196;</l:l>
+      <l:l i="10">&#228;</l:l>
+      <l:l i="10">&#197;</l:l>
+      <l:l i="10">&#229;</l:l>
+      <l:l i="10">&#256;</l:l>
+      <l:l i="10">&#257;</l:l>
+      <l:l i="10">&#258;</l:l>
+      <l:l i="10">&#259;</l:l>
+      <l:l i="10">&#260;</l:l>
+      <l:l i="10">&#261;</l:l>
+      <l:l i="10">&#461;</l:l>
+      <l:l i="10">&#462;</l:l>
+      <l:l i="10">&#478;</l:l>
+      <l:l i="10">&#479;</l:l>
+      <l:l i="10">&#480;</l:l>
+      <l:l i="10">&#481;</l:l>
+      <l:l i="10">&#506;</l:l>
+      <l:l i="10">&#507;</l:l>
+      <l:l i="10">&#512;</l:l>
+      <l:l i="10">&#513;</l:l>
+      <l:l i="10">&#514;</l:l>
+      <l:l i="10">&#515;</l:l>
+      <l:l i="10">&#550;</l:l>
+      <l:l i="10">&#551;</l:l>
+      <l:l i="10">&#7680;</l:l>
+      <l:l i="10">&#7681;</l:l>
+      <l:l i="10">&#7834;</l:l>
+      <l:l i="10">&#7840;</l:l>
+      <l:l i="10">&#7841;</l:l>
+      <l:l i="10">&#7842;</l:l>
+      <l:l i="10">&#7843;</l:l>
+      <l:l i="10">&#7844;</l:l>
+      <l:l i="10">&#7845;</l:l>
+      <l:l i="10">&#7846;</l:l>
+      <l:l i="10">&#7847;</l:l>
+      <l:l i="10">&#7848;</l:l>
+      <l:l i="10">&#7849;</l:l>
+      <l:l i="10">&#7850;</l:l>
+      <l:l i="10">&#7851;</l:l>
+      <l:l i="10">&#7852;</l:l>
+      <l:l i="10">&#7853;</l:l>
+      <l:l i="10">&#7854;</l:l>
+      <l:l i="10">&#7855;</l:l>
+      <l:l i="10">&#7856;</l:l>
+      <l:l i="10">&#7857;</l:l>
+      <l:l i="10">&#7858;</l:l>
+      <l:l i="10">&#7859;</l:l>
+      <l:l i="10">&#7860;</l:l>
+      <l:l i="10">&#7861;</l:l>
+      <l:l i="10">&#7862;</l:l>
+      <l:l i="10">&#7863;</l:l>
+      <l:l i="20">B</l:l>
+      <l:l i="20">b</l:l>
+      <l:l i="20">&#384;</l:l>
+      <l:l i="20">&#385;</l:l>
+      <l:l i="20">&#595;</l:l>
+      <l:l i="20">&#386;</l:l>
+      <l:l i="20">&#387;</l:l>
+      <l:l i="20">&#7682;</l:l>
+      <l:l i="20">&#7683;</l:l>
+      <l:l i="20">&#7684;</l:l>
+      <l:l i="20">&#7685;</l:l>
+      <l:l i="20">&#7686;</l:l>
+      <l:l i="20">&#7687;</l:l>
+      <l:l i="30">C</l:l>
+      <l:l i="30">c</l:l>
+      <l:l i="30">&#199;</l:l>
+      <l:l i="30">&#231;</l:l>
+      <l:l i="30">&#262;</l:l>
+      <l:l i="30">&#263;</l:l>
+      <l:l i="30">&#264;</l:l>
+      <l:l i="30">&#265;</l:l>
+      <l:l i="30">&#266;</l:l>
+      <l:l i="30">&#267;</l:l>
+      <l:l i="30">&#268;</l:l>
+      <l:l i="30">&#269;</l:l>
+      <l:l i="30">&#391;</l:l>
+      <l:l i="30">&#392;</l:l>
+      <l:l i="30">&#597;</l:l>
+      <l:l i="30">&#7688;</l:l>
+      <l:l i="30">&#7689;</l:l>
+      <l:l i="40">D</l:l>
+      <l:l i="40">d</l:l>
+      <l:l i="40">&#270;</l:l>
+      <l:l i="40">&#271;</l:l>
+      <l:l i="40">&#272;</l:l>
+      <l:l i="40">&#273;</l:l>
+      <l:l i="40">&#394;</l:l>
+      <l:l i="40">&#599;</l:l>
+      <l:l i="40">&#395;</l:l>
+      <l:l i="40">&#396;</l:l>
+      <l:l i="40">&#453;</l:l>
+      <l:l i="40">&#498;</l:l>
+      <l:l i="40">&#545;</l:l>
+      <l:l i="40">&#598;</l:l>
+      <l:l i="40">&#7690;</l:l>
+      <l:l i="40">&#7691;</l:l>
+      <l:l i="40">&#7692;</l:l>
+      <l:l i="40">&#7693;</l:l>
+      <l:l i="40">&#7694;</l:l>
+      <l:l i="40">&#7695;</l:l>
+      <l:l i="40">&#7696;</l:l>
+      <l:l i="40">&#7697;</l:l>
+      <l:l i="40">&#7698;</l:l>
+      <l:l i="40">&#7699;</l:l>
+      <l:l i="50">E</l:l>
+      <l:l i="50">e</l:l>
+      <l:l i="50">&#200;</l:l>
+      <l:l i="50">&#232;</l:l>
+      <l:l i="50">&#201;</l:l>
+      <l:l i="50">&#233;</l:l>
+      <l:l i="50">&#202;</l:l>
+      <l:l i="50">&#234;</l:l>
+      <l:l i="50">&#203;</l:l>
+      <l:l i="50">&#235;</l:l>
+      <l:l i="50">&#274;</l:l>
+      <l:l i="50">&#275;</l:l>
+      <l:l i="50">&#276;</l:l>
+      <l:l i="50">&#277;</l:l>
+      <l:l i="50">&#278;</l:l>
+      <l:l i="50">&#279;</l:l>
+      <l:l i="50">&#280;</l:l>
+      <l:l i="50">&#281;</l:l>
+      <l:l i="50">&#282;</l:l>
+      <l:l i="50">&#283;</l:l>
+      <l:l i="50">&#516;</l:l>
+      <l:l i="50">&#517;</l:l>
+      <l:l i="50">&#518;</l:l>
+      <l:l i="50">&#519;</l:l>
+      <l:l i="50">&#552;</l:l>
+      <l:l i="50">&#553;</l:l>
+      <l:l i="50">&#7700;</l:l>
+      <l:l i="50">&#7701;</l:l>
+      <l:l i="50">&#7702;</l:l>
+      <l:l i="50">&#7703;</l:l>
+      <l:l i="50">&#7704;</l:l>
+      <l:l i="50">&#7705;</l:l>
+      <l:l i="50">&#7706;</l:l>
+      <l:l i="50">&#7707;</l:l>
+      <l:l i="50">&#7708;</l:l>
+      <l:l i="50">&#7709;</l:l>
+      <l:l i="50">&#7864;</l:l>
+      <l:l i="50">&#7865;</l:l>
+      <l:l i="50">&#7866;</l:l>
+      <l:l i="50">&#7867;</l:l>
+      <l:l i="50">&#7868;</l:l>
+      <l:l i="50">&#7869;</l:l>
+      <l:l i="50">&#7870;</l:l>
+      <l:l i="50">&#7871;</l:l>
+      <l:l i="50">&#7872;</l:l>
+      <l:l i="50">&#7873;</l:l>
+      <l:l i="50">&#7874;</l:l>
+      <l:l i="50">&#7875;</l:l>
+      <l:l i="50">&#7876;</l:l>
+      <l:l i="50">&#7877;</l:l>
+      <l:l i="50">&#7878;</l:l>
+      <l:l i="50">&#7879;</l:l>
+      <l:l i="60">F</l:l>
+      <l:l i="60">f</l:l>
+      <l:l i="60">&#401;</l:l>
+      <l:l i="60">&#402;</l:l>
+      <l:l i="60">&#7710;</l:l>
+      <l:l i="60">&#7711;</l:l>
+      <l:l i="70">G</l:l>
+      <l:l i="70">g</l:l>
+      <l:l i="70">&#284;</l:l>
+      <l:l i="70">&#285;</l:l>
+      <l:l i="70">&#286;</l:l>
+      <l:l i="70">&#287;</l:l>
+      <l:l i="70">&#288;</l:l>
+      <l:l i="70">&#289;</l:l>
+      <l:l i="70">&#290;</l:l>
+      <l:l i="70">&#291;</l:l>
+      <l:l i="70">&#403;</l:l>
+      <l:l i="70">&#608;</l:l>
+      <l:l i="70">&#484;</l:l>
+      <l:l i="70">&#485;</l:l>
+      <l:l i="70">&#486;</l:l>
+      <l:l i="70">&#487;</l:l>
+      <l:l i="70">&#500;</l:l>
+      <l:l i="70">&#501;</l:l>
+      <l:l i="70">&#7712;</l:l>
+      <l:l i="70">&#7713;</l:l>
+      <l:l i="80">H</l:l>
+      <l:l i="80">h</l:l>
+      <l:l i="80">&#292;</l:l>
+      <l:l i="80">&#293;</l:l>
+      <l:l i="80">&#294;</l:l>
+      <l:l i="80">&#295;</l:l>
+      <l:l i="80">&#542;</l:l>
+      <l:l i="80">&#543;</l:l>
+      <l:l i="80">&#614;</l:l>
+      <l:l i="80">&#7714;</l:l>
+      <l:l i="80">&#7715;</l:l>
+      <l:l i="80">&#7716;</l:l>
+      <l:l i="80">&#7717;</l:l>
+      <l:l i="80">&#7718;</l:l>
+      <l:l i="80">&#7719;</l:l>
+      <l:l i="80">&#7720;</l:l>
+      <l:l i="80">&#7721;</l:l>
+      <l:l i="80">&#7722;</l:l>
+      <l:l i="80">&#7723;</l:l>
+      <l:l i="80">&#7830;</l:l>
+      <l:l i="90">I</l:l>
+      <l:l i="90">i</l:l>
+      <l:l i="90">&#204;</l:l>
+      <l:l i="90">&#236;</l:l>
+      <l:l i="90">&#205;</l:l>
+      <l:l i="90">&#237;</l:l>
+      <l:l i="90">&#206;</l:l>
+      <l:l i="90">&#238;</l:l>
+      <l:l i="90">&#207;</l:l>
+      <l:l i="90">&#239;</l:l>
+      <l:l i="90">&#296;</l:l>
+      <l:l i="90">&#297;</l:l>
+      <l:l i="90">&#298;</l:l>
+      <l:l i="90">&#299;</l:l>
+      <l:l i="90">&#300;</l:l>
+      <l:l i="90">&#301;</l:l>
+      <l:l i="90">&#302;</l:l>
+      <l:l i="90">&#303;</l:l>
+      <l:l i="90">&#304;</l:l>
+      <l:l i="90">&#407;</l:l>
+      <l:l i="90">&#616;</l:l>
+      <l:l i="90">&#463;</l:l>
+      <l:l i="90">&#464;</l:l>
+      <l:l i="90">&#520;</l:l>
+      <l:l i="90">&#521;</l:l>
+      <l:l i="90">&#522;</l:l>
+      <l:l i="90">&#523;</l:l>
+      <l:l i="90">&#7724;</l:l>
+      <l:l i="90">&#7725;</l:l>
+      <l:l i="90">&#7726;</l:l>
+      <l:l i="90">&#7727;</l:l>
+      <l:l i="90">&#7880;</l:l>
+      <l:l i="90">&#7881;</l:l>
+      <l:l i="90">&#7882;</l:l>
+      <l:l i="90">&#7883;</l:l>
+      <l:l i="100">J</l:l>
+      <l:l i="100">j</l:l>
+      <l:l i="100">&#308;</l:l>
+      <l:l i="100">&#309;</l:l>
+      <l:l i="100">&#496;</l:l>
+      <l:l i="100">&#669;</l:l>
+      <l:l i="110">K</l:l>
+      <l:l i="110">k</l:l>
+      <l:l i="110">&#310;</l:l>
+      <l:l i="110">&#311;</l:l>
+      <l:l i="110">&#408;</l:l>
+      <l:l i="110">&#409;</l:l>
+      <l:l i="110">&#488;</l:l>
+      <l:l i="110">&#489;</l:l>
+      <l:l i="110">&#7728;</l:l>
+      <l:l i="110">&#7729;</l:l>
+      <l:l i="110">&#7730;</l:l>
+      <l:l i="110">&#7731;</l:l>
+      <l:l i="110">&#7732;</l:l>
+      <l:l i="110">&#7733;</l:l>
+      <l:l i="120">L</l:l>
+      <l:l i="120">l</l:l>
+      <l:l i="120">&#313;</l:l>
+      <l:l i="120">&#314;</l:l>
+      <l:l i="120">&#315;</l:l>
+      <l:l i="120">&#316;</l:l>
+      <l:l i="120">&#317;</l:l>
+      <l:l i="120">&#318;</l:l>
+      <l:l i="120">&#319;</l:l>
+      <l:l i="120">&#320;</l:l>
+      <l:l i="120">&#321;</l:l>
+      <l:l i="120">&#322;</l:l>
+      <l:l i="120">&#410;</l:l>
+      <l:l i="120">&#456;</l:l>
+      <l:l i="120">&#564;</l:l>
+      <l:l i="120">&#619;</l:l>
+      <l:l i="120">&#620;</l:l>
+      <l:l i="120">&#621;</l:l>
+      <l:l i="120">&#7734;</l:l>
+      <l:l i="120">&#7735;</l:l>
+      <l:l i="120">&#7736;</l:l>
+      <l:l i="120">&#7737;</l:l>
+      <l:l i="120">&#7738;</l:l>
+      <l:l i="120">&#7739;</l:l>
+      <l:l i="120">&#7740;</l:l>
+      <l:l i="120">&#7741;</l:l>
+      <l:l i="130">M</l:l>
+      <l:l i="130">m</l:l>
+      <l:l i="130">&#625;</l:l>
+      <l:l i="130">&#7742;</l:l>
+      <l:l i="130">&#7743;</l:l>
+      <l:l i="130">&#7744;</l:l>
+      <l:l i="130">&#7745;</l:l>
+      <l:l i="130">&#7746;</l:l>
+      <l:l i="130">&#7747;</l:l>
+      <l:l i="140">N</l:l>
+      <l:l i="140">n</l:l>
+      <l:l i="140">&#209;</l:l>
+      <l:l i="140">&#241;</l:l>
+      <l:l i="140">&#323;</l:l>
+      <l:l i="140">&#324;</l:l>
+      <l:l i="140">&#325;</l:l>
+      <l:l i="140">&#326;</l:l>
+      <l:l i="140">&#327;</l:l>
+      <l:l i="140">&#328;</l:l>
+      <l:l i="140">&#413;</l:l>
+      <l:l i="140">&#626;</l:l>
+      <l:l i="140">&#414;</l:l>
+      <l:l i="140">&#544;</l:l>
+      <l:l i="140">&#459;</l:l>
+      <l:l i="140">&#504;</l:l>
+      <l:l i="140">&#505;</l:l>
+      <l:l i="140">&#565;</l:l>
+      <l:l i="140">&#627;</l:l>
+      <l:l i="140">&#7748;</l:l>
+      <l:l i="140">&#7749;</l:l>
+      <l:l i="140">&#7750;</l:l>
+      <l:l i="140">&#7751;</l:l>
+      <l:l i="140">&#7752;</l:l>
+      <l:l i="140">&#7753;</l:l>
+      <l:l i="140">&#7754;</l:l>
+      <l:l i="140">&#7755;</l:l>
+      <l:l i="150">O</l:l>
+      <l:l i="150">o</l:l>
+      <l:l i="150">&#210;</l:l>
+      <l:l i="150">&#242;</l:l>
+      <l:l i="150">&#211;</l:l>
+      <l:l i="150">&#243;</l:l>
+      <l:l i="150">&#212;</l:l>
+      <l:l i="150">&#244;</l:l>
+      <l:l i="150">&#213;</l:l>
+      <l:l i="150">&#245;</l:l>
+      <l:l i="150">&#214;</l:l>
+      <l:l i="150">&#246;</l:l>
+      <l:l i="150">&#216;</l:l>
+      <l:l i="150">&#248;</l:l>
+      <l:l i="150">&#332;</l:l>
+      <l:l i="150">&#333;</l:l>
+      <l:l i="150">&#334;</l:l>
+      <l:l i="150">&#335;</l:l>
+      <l:l i="150">&#336;</l:l>
+      <l:l i="150">&#337;</l:l>
+      <l:l i="150">&#415;</l:l>
+      <l:l i="150">&#416;</l:l>
+      <l:l i="150">&#417;</l:l>
+      <l:l i="150">&#465;</l:l>
+      <l:l i="150">&#466;</l:l>
+      <l:l i="150">&#490;</l:l>
+      <l:l i="150">&#491;</l:l>
+      <l:l i="150">&#492;</l:l>
+      <l:l i="150">&#493;</l:l>
+      <l:l i="150">&#510;</l:l>
+      <l:l i="150">&#511;</l:l>
+      <l:l i="150">&#524;</l:l>
+      <l:l i="150">&#525;</l:l>
+      <l:l i="150">&#526;</l:l>
+      <l:l i="150">&#527;</l:l>
+      <l:l i="150">&#554;</l:l>
+      <l:l i="150">&#555;</l:l>
+      <l:l i="150">&#556;</l:l>
+      <l:l i="150">&#557;</l:l>
+      <l:l i="150">&#558;</l:l>
+      <l:l i="150">&#559;</l:l>
+      <l:l i="150">&#560;</l:l>
+      <l:l i="150">&#561;</l:l>
+      <l:l i="150">&#7756;</l:l>
+      <l:l i="150">&#7757;</l:l>
+      <l:l i="150">&#7758;</l:l>
+      <l:l i="150">&#7759;</l:l>
+      <l:l i="150">&#7760;</l:l>
+      <l:l i="150">&#7761;</l:l>
+      <l:l i="150">&#7762;</l:l>
+      <l:l i="150">&#7763;</l:l>
+      <l:l i="150">&#7884;</l:l>
+      <l:l i="150">&#7885;</l:l>
+      <l:l i="150">&#7886;</l:l>
+      <l:l i="150">&#7887;</l:l>
+      <l:l i="150">&#7888;</l:l>
+      <l:l i="150">&#7889;</l:l>
+      <l:l i="150">&#7890;</l:l>
+      <l:l i="150">&#7891;</l:l>
+      <l:l i="150">&#7892;</l:l>
+      <l:l i="150">&#7893;</l:l>
+      <l:l i="150">&#7894;</l:l>
+      <l:l i="150">&#7895;</l:l>
+      <l:l i="150">&#7896;</l:l>
+      <l:l i="150">&#7897;</l:l>
+      <l:l i="150">&#7898;</l:l>
+      <l:l i="150">&#7899;</l:l>
+      <l:l i="150">&#7900;</l:l>
+      <l:l i="150">&#7901;</l:l>
+      <l:l i="150">&#7902;</l:l>
+      <l:l i="150">&#7903;</l:l>
+      <l:l i="150">&#7904;</l:l>
+      <l:l i="150">&#7905;</l:l>
+      <l:l i="150">&#7906;</l:l>
+      <l:l i="150">&#7907;</l:l>
+      <l:l i="160">P</l:l>
+      <l:l i="160">p</l:l>
+      <l:l i="160">&#420;</l:l>
+      <l:l i="160">&#421;</l:l>
+      <l:l i="160">&#7764;</l:l>
+      <l:l i="160">&#7765;</l:l>
+      <l:l i="160">&#7766;</l:l>
+      <l:l i="160">&#7767;</l:l>
+      <l:l i="170">Q</l:l>
+      <l:l i="170">q</l:l>
+      <l:l i="170">&#672;</l:l>
+      <l:l i="180">R</l:l>
+      <l:l i="180">r</l:l>
+      <l:l i="180">&#340;</l:l>
+      <l:l i="180">&#341;</l:l>
+      <l:l i="180">&#342;</l:l>
+      <l:l i="180">&#343;</l:l>
+      <l:l i="180">&#344;</l:l>
+      <l:l i="180">&#345;</l:l>
+      <l:l i="180">&#528;</l:l>
+      <l:l i="180">&#529;</l:l>
+      <l:l i="180">&#530;</l:l>
+      <l:l i="180">&#531;</l:l>
+      <l:l i="180">&#636;</l:l>
+      <l:l i="180">&#637;</l:l>
+      <l:l i="180">&#638;</l:l>
+      <l:l i="180">&#7768;</l:l>
+      <l:l i="180">&#7769;</l:l>
+      <l:l i="180">&#7770;</l:l>
+      <l:l i="180">&#7771;</l:l>
+      <l:l i="180">&#7772;</l:l>
+      <l:l i="180">&#7773;</l:l>
+      <l:l i="180">&#7774;</l:l>
+      <l:l i="180">&#7775;</l:l>
+      <l:l i="190">S</l:l>
+      <l:l i="190">s</l:l>
+      <l:l i="190">&#346;</l:l>
+      <l:l i="190">&#347;</l:l>
+      <l:l i="190">&#348;</l:l>
+      <l:l i="190">&#349;</l:l>
+      <l:l i="190">&#350;</l:l>
+      <l:l i="190">&#351;</l:l>
+      <l:l i="190">&#352;</l:l>
+      <l:l i="190">&#353;</l:l>
+      <l:l i="190">&#536;</l:l>
+      <l:l i="190">&#537;</l:l>
+      <l:l i="190">&#642;</l:l>
+      <l:l i="190">&#7776;</l:l>
+      <l:l i="190">&#7777;</l:l>
+      <l:l i="190">&#7778;</l:l>
+      <l:l i="190">&#7779;</l:l>
+      <l:l i="190">&#7780;</l:l>
+      <l:l i="190">&#7781;</l:l>
+      <l:l i="190">&#7782;</l:l>
+      <l:l i="190">&#7783;</l:l>
+      <l:l i="190">&#7784;</l:l>
+      <l:l i="190">&#7785;</l:l>
+      <l:l i="200">T</l:l>
+      <l:l i="200">t</l:l>
+      <l:l i="200">&#354;</l:l>
+      <l:l i="200">&#355;</l:l>
+      <l:l i="200">&#356;</l:l>
+      <l:l i="200">&#357;</l:l>
+      <l:l i="200">&#358;</l:l>
+      <l:l i="200">&#359;</l:l>
+      <l:l i="200">&#427;</l:l>
+      <l:l i="200">&#428;</l:l>
+      <l:l i="200">&#429;</l:l>
+      <l:l i="200">&#430;</l:l>
+      <l:l i="200">&#648;</l:l>
+      <l:l i="200">&#538;</l:l>
+      <l:l i="200">&#539;</l:l>
+      <l:l i="200">&#566;</l:l>
+      <l:l i="200">&#7786;</l:l>
+      <l:l i="200">&#7787;</l:l>
+      <l:l i="200">&#7788;</l:l>
+      <l:l i="200">&#7789;</l:l>
+      <l:l i="200">&#7790;</l:l>
+      <l:l i="200">&#7791;</l:l>
+      <l:l i="200">&#7792;</l:l>
+      <l:l i="200">&#7793;</l:l>
+      <l:l i="200">&#7831;</l:l>
+      <l:l i="210">U</l:l>
+      <l:l i="210">u</l:l>
+      <l:l i="210">&#217;</l:l>
+      <l:l i="210">&#249;</l:l>
+      <l:l i="210">&#218;</l:l>
+      <l:l i="210">&#250;</l:l>
+      <l:l i="210">&#219;</l:l>
+      <l:l i="210">&#251;</l:l>
+      <l:l i="210">&#220;</l:l>
+      <l:l i="210">&#252;</l:l>
+      <l:l i="210">&#360;</l:l>
+      <l:l i="210">&#361;</l:l>
+      <l:l i="210">&#362;</l:l>
+      <l:l i="210">&#363;</l:l>
+      <l:l i="210">&#364;</l:l>
+      <l:l i="210">&#365;</l:l>
+      <l:l i="210">&#366;</l:l>
+      <l:l i="210">&#367;</l:l>
+      <l:l i="210">&#368;</l:l>
+      <l:l i="210">&#369;</l:l>
+      <l:l i="210">&#370;</l:l>
+      <l:l i="210">&#371;</l:l>
+      <l:l i="210">&#431;</l:l>
+      <l:l i="210">&#432;</l:l>
+      <l:l i="210">&#467;</l:l>
+      <l:l i="210">&#468;</l:l>
+      <l:l i="210">&#469;</l:l>
+      <l:l i="210">&#470;</l:l>
+      <l:l i="210">&#471;</l:l>
+      <l:l i="210">&#472;</l:l>
+      <l:l i="210">&#473;</l:l>
+      <l:l i="210">&#474;</l:l>
+      <l:l i="210">&#475;</l:l>
+      <l:l i="210">&#476;</l:l>
+      <l:l i="210">&#532;</l:l>
+      <l:l i="210">&#533;</l:l>
+      <l:l i="210">&#534;</l:l>
+      <l:l i="210">&#535;</l:l>
+      <l:l i="210">&#7794;</l:l>
+      <l:l i="210">&#7795;</l:l>
+      <l:l i="210">&#7796;</l:l>
+      <l:l i="210">&#7797;</l:l>
+      <l:l i="210">&#7798;</l:l>
+      <l:l i="210">&#7799;</l:l>
+      <l:l i="210">&#7800;</l:l>
+      <l:l i="210">&#7801;</l:l>
+      <l:l i="210">&#7802;</l:l>
+      <l:l i="210">&#7803;</l:l>
+      <l:l i="210">&#7908;</l:l>
+      <l:l i="210">&#7909;</l:l>
+      <l:l i="210">&#7910;</l:l>
+      <l:l i="210">&#7911;</l:l>
+      <l:l i="210">&#7912;</l:l>
+      <l:l i="210">&#7913;</l:l>
+      <l:l i="210">&#7914;</l:l>
+      <l:l i="210">&#7915;</l:l>
+      <l:l i="210">&#7916;</l:l>
+      <l:l i="210">&#7917;</l:l>
+      <l:l i="210">&#7918;</l:l>
+      <l:l i="210">&#7919;</l:l>
+      <l:l i="210">&#7920;</l:l>
+      <l:l i="210">&#7921;</l:l>
+      <l:l i="220">V</l:l>
+      <l:l i="220">v</l:l>
+      <l:l i="220">&#434;</l:l>
+      <l:l i="220">&#651;</l:l>
+      <l:l i="220">&#7804;</l:l>
+      <l:l i="220">&#7805;</l:l>
+      <l:l i="220">&#7806;</l:l>
+      <l:l i="220">&#7807;</l:l>
+      <l:l i="230">W</l:l>
+      <l:l i="230">w</l:l>
+      <l:l i="230">&#372;</l:l>
+      <l:l i="230">&#373;</l:l>
+      <l:l i="230">&#7808;</l:l>
+      <l:l i="230">&#7809;</l:l>
+      <l:l i="230">&#7810;</l:l>
+      <l:l i="230">&#7811;</l:l>
+      <l:l i="230">&#7812;</l:l>
+      <l:l i="230">&#7813;</l:l>
+      <l:l i="230">&#7814;</l:l>
+      <l:l i="230">&#7815;</l:l>
+      <l:l i="230">&#7816;</l:l>
+      <l:l i="230">&#7817;</l:l>
+      <l:l i="230">&#7832;</l:l>
+      <l:l i="240">X</l:l>
+      <l:l i="240">x</l:l>
+      <l:l i="240">&#7818;</l:l>
+      <l:l i="240">&#7819;</l:l>
+      <l:l i="240">&#7820;</l:l>
+      <l:l i="240">&#7821;</l:l>
+      <l:l i="250">Y</l:l>
+      <l:l i="250">y</l:l>
+      <l:l i="250">&#221;</l:l>
+      <l:l i="250">&#253;</l:l>
+      <l:l i="250">&#255;</l:l>
+      <l:l i="250">&#376;</l:l>
+      <l:l i="250">&#374;</l:l>
+      <l:l i="250">&#375;</l:l>
+      <l:l i="250">&#435;</l:l>
+      <l:l i="250">&#436;</l:l>
+      <l:l i="250">&#562;</l:l>
+      <l:l i="250">&#563;</l:l>
+      <l:l i="250">&#7822;</l:l>
+      <l:l i="250">&#7823;</l:l>
+      <l:l i="250">&#7833;</l:l>
+      <l:l i="250">&#7922;</l:l>
+      <l:l i="250">&#7923;</l:l>
+      <l:l i="250">&#7924;</l:l>
+      <l:l i="250">&#7925;</l:l>
+      <l:l i="250">&#7926;</l:l>
+      <l:l i="250">&#7927;</l:l>
+      <l:l i="250">&#7928;</l:l>
+      <l:l i="250">&#7929;</l:l>
+      <l:l i="260">Z</l:l>
+      <l:l i="260">z</l:l>
+      <l:l i="260">&#377;</l:l>
+      <l:l i="260">&#378;</l:l>
+      <l:l i="260">&#379;</l:l>
+      <l:l i="260">&#380;</l:l>
+      <l:l i="260">&#381;</l:l>
+      <l:l i="260">&#382;</l:l>
+      <l:l i="260">&#437;</l:l>
+      <l:l i="260">&#438;</l:l>
+      <l:l i="260">&#548;</l:l>
+      <l:l i="260">&#549;</l:l>
+      <l:l i="260">&#656;</l:l>
+      <l:l i="260">&#657;</l:l>
+      <l:l i="260">&#7824;</l:l>
+      <l:l i="260">&#7825;</l:l>
+      <l:l i="260">&#7826;</l:l>
+      <l:l i="260">&#7827;</l:l>
+      <l:l i="260">&#7828;</l:l>
+      <l:l i="260">&#7829;</l:l>
+   </l:letters>
+</l:l10n>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/hr.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/hr.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/hr.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1153 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="hr" english-language-name="Croatian">
+
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+   <l:gentext key="Abstract" text="Sa&#382;etak"/>
+   <l:gentext key="abstract" text="Sa&#382;etak"/>
+   <l:gentext key="Answer" text="Odgovor:"/>
+   <l:gentext key="answer" text="Odgovor:"/>
+   <l:gentext key="Appendix" text="Dodatak"/>
+   <l:gentext key="appendix" text="dodatak"/>
+   <l:gentext key="Article" text="&#268;lanak"/>
+   <l:gentext key="article" text="&#268;lanak"/>
+   <l:gentext key="Bibliography" text="Literatura"/>
+   <l:gentext key="bibliography" text="Literatura"/>
+   <l:gentext key="Book" text="Knjiga"/>
+   <l:gentext key="book" text="Knjiga"/>
+   <l:gentext key="CAUTION" text="OPREZ"/>
+   <l:gentext key="Caution" text="Oprez"/>
+   <l:gentext key="caution" text="Oprez"/>
+   <l:gentext key="Chapter" text="Poglavlje"/>
+   <l:gentext key="chapter" text="poglavlje"/>
+   <l:gentext key="Colophon" text="Impresum"/>
+   <l:gentext key="colophon" text="Impresum"/>
+   <l:gentext key="Copyright" text="Autorska prava"/>
+   <l:gentext key="copyright" text="Autorska prava"/>
+   <l:gentext key="Dedication" text="Posveta"/>
+   <l:gentext key="dedication" text="Posveta"/>
+   <l:gentext key="Edition" text="Izdanje"/>
+   <l:gentext key="edition" text="Izdanje"/>
+   <l:gentext key="Equation" text="Jednad&#382;ba"/>
+   <l:gentext key="equation" text="Jednad&#382;ba"/>
+   <l:gentext key="Example" text="Primjer"/>
+   <l:gentext key="example" text="Primjer"/>
+   <l:gentext key="Figure" text="Slika"/>
+   <l:gentext key="figure" text="Slika"/>
+   <l:gentext key="Glossary" text="Rje&#269;nik"/>
+   <l:gentext key="glossary" text="Rje&#269;nik"/>
+   <l:gentext key="GlossSee" text="Vidi"/>
+   <l:gentext key="glosssee" text="Vidi"/>
+   <l:gentext key="GlossSeeAlso" text="Vidi i"/>
+   <l:gentext key="glossseealso" text="Vidi i"/>
+   <l:gentext key="IMPORTANT" text="VA&#381;NO"/>
+   <l:gentext key="important" text="Va&#382;no"/>
+   <l:gentext key="Important" text="Va&#382;no"/>
+   <l:gentext key="Index" text="Kazalo"/>
+   <l:gentext key="index" text="Kazalo"/>
+   <l:gentext key="ISBN" text="ISBN"/>
+   <l:gentext key="isbn" text="ISBN"/>
+   <l:gentext key="LegalNotice" text="Pravne odredbe"/>
+   <l:gentext key="legalnotice" text="Pravne odredbe"/>
+   <l:gentext key="MsgAud" text="Primatelji"/>
+   <l:gentext key="msgaud" text="Primatelji"/>
+   <l:gentext key="MsgLevel" text="Razina"/>
+   <l:gentext key="msglevel" text="Razina"/>
+   <l:gentext key="MsgOrig" text="Izvor"/>
+   <l:gentext key="msgorig" text="Izvor"/>
+   <l:gentext key="NOTE" text="BILJE&#352;KA"/>
+   <l:gentext key="Note" text="Bilje&#353;ka"/>
+   <l:gentext key="note" text="Bilje&#353;ka"/>
+   <l:gentext key="Part" text="Dio"/>
+   <l:gentext key="part" text="Dio"/>
+   <l:gentext key="Preface" text="Predgovor"/>
+   <l:gentext key="preface" text="Predgovor"/>
+   <l:gentext key="Procedure" text="Postupak"/>
+   <l:gentext key="procedure" text="Postupak"/>
+   <l:gentext key="ProductionSet" text="Produkcija"/>
+   <l:gentext key="PubDate" text="Publication Date" lang="en"/>
+   <l:gentext key="pubdate" text="Publication date" lang="en"/>
+   <l:gentext key="Published" text="Objavljeno"/>
+   <l:gentext key="published" text="Objavljeno"/>
+   <l:gentext key="Qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="Question" text="Pitanje:"/>
+   <l:gentext key="question" text="Pitanje:"/>
+   <l:gentext key="RefEntry" text=""/>
+   <l:gentext key="refentry" text=""/>
+   <l:gentext key="Reference" text="Referenca"/>
+   <l:gentext key="reference" text="Referenca"/>
+   <l:gentext key="RefName" text="Ime"/>
+   <l:gentext key="refname" text="Ime"/>
+   <l:gentext key="RefSection" text=""/>
+   <l:gentext key="refsection" text=""/>
+   <l:gentext key="RefSynopsisDiv" text="Pregled"/>
+   <l:gentext key="refsynopsisdiv" text="Pregled"/>
+   <l:gentext key="RevHistory" text="Povijest preinaka"/>
+   <l:gentext key="revhistory" text="Povijest preinaka"/>
+   <l:gentext key="revision" text="Preinaka"/>
+   <l:gentext key="Revision" text="Preinaka"/>
+   <l:gentext key="sect1" text="Odjeljak"/>
+   <l:gentext key="sect2" text="Odjeljak"/>
+   <l:gentext key="sect3" text="Odjeljak"/>
+   <l:gentext key="sect4" text="Odjeljak"/>
+   <l:gentext key="sect5" text="Odjeljak"/>
+   <l:gentext key="section" text="Odjeljak"/>
+   <l:gentext key="Section" text="Odjeljak"/>
+   <l:gentext key="see" text="vidi"/>
+   <l:gentext key="See" text="See" lang="en"/>
+   <l:gentext key="seealso" text="vidi i"/>
+   <l:gentext key="Seealso" text="See also" lang="en"/>
+   <l:gentext key="SeeAlso" text="See Also" lang="en"/>
+   <l:gentext key="set" text="Set"/>
+   <l:gentext key="Set" text="Set"/>
+   <l:gentext key="setindex" text="Kazalo seta"/>
+   <l:gentext key="SetIndex" text="Kazalo seta"/>
+   <l:gentext key="Sidebar" text=""/>
+   <l:gentext key="sidebar" text="sidebar"/>
+   <l:gentext key="step" text="korak"/>
+   <l:gentext key="Step" text="Korak"/>
+   <l:gentext key="Table" text="Tablica"/>
+   <l:gentext key="table" text="Tablica"/>
+   <l:gentext key="tip" text="Savjet"/>
+   <l:gentext key="TIP" text="SAVJET"/>
+   <l:gentext key="Tip" text="Savjet"/>
+   <l:gentext key="Warning" text="Upozorenje"/>
+   <l:gentext key="warning" text="Upozorenje"/>
+   <l:gentext key="WARNING" text="UPOZORENJE"/>
+   <l:gentext key="and" text="i"/>
+   <l:gentext key="by" text="po"/>
+   <l:gentext key="called" text="called" lang="en"/>
+   <l:gentext key="Edited" text="Uredio/la"/>
+   <l:gentext key="edited" text="Uredio/la"/>
+   <l:gentext key="Editedby" text="Uredio/la"/>
+   <l:gentext key="editedby" text="Uredio/la"/>
+   <l:gentext key="in" text="u"/>
+   <l:gentext key="lastlistcomma" text=","/>
+   <l:gentext key="listcomma" text=","/>
+   <l:gentext key="nonexistantelement" text="nepostoje&#263;i element"/>
+   <l:gentext key="notes" text="Bilje&#353;ke"/>
+   <l:gentext key="Notes" text="Bilje&#353;ke"/>
+   <l:gentext key="Pgs" text="Str."/>
+   <l:gentext key="pgs" text="Str."/>
+   <l:gentext key="Revisedby" text="Promijenjeno po: "/>
+   <l:gentext key="revisedby" text="Promijenjeno po: "/>
+   <l:gentext key="TableNotes" text="Napomene"/>
+   <l:gentext key="tablenotes" text="Napomene"/>
+   <l:gentext key="TableofContents" text="Sadr&#382;aj"/>
+   <l:gentext key="tableofcontents" text="Sadr&#382;aj"/>
+   <l:gentext key="the" text="" lang="en"/>
+   <l:gentext key="unexpectedelementname" text="Neo&#269;ekivano ime elementa"/>
+   <l:gentext key="unsupported" text="nepodr&#382;ano"/>
+   <l:gentext key="xrefto" text="xref za"/>
+   <l:gentext key="listofequations" text="Popis jednad&#382;bi"/>
+   <l:gentext key="ListofEquations" text="Popis jednad&#382;bi"/>
+   <l:gentext key="ListofExamples" text="Popis primjera"/>
+   <l:gentext key="listofexamples" text="Popis primjera"/>
+   <l:gentext key="ListofFigures" text="Popis slika"/>
+   <l:gentext key="listoffigures" text="Popis slika"/>
+   <l:gentext key="ListofProcedures" text="Popis postupaka"/>
+   <l:gentext key="listofprocedures" text="Popis postupaka"/>
+   <l:gentext key="listoftables" text="Popis tablica"/>
+   <l:gentext key="ListofTables" text="Popis tablica "/>
+   <l:gentext key="ListofUnknown" text="Popis nepoznanica"/>
+   <l:gentext key="listofunknown" text="Popis nepoznanica"/>
+   <l:gentext key="nav-home" text="Po&#269;etak"/>
+   <l:gentext key="nav-next" text="Naprijed"/>
+   <l:gentext key="nav-next-sibling" text="Sko&#269;i unaprijed"/>
+   <l:gentext key="nav-prev" text="Natrag"/>
+   <l:gentext key="nav-prev-sibling" text="Sko&#269;i unatrag"/>
+   <l:gentext key="nav-up" text="Gore"/>
+   <l:gentext key="nav-toc" text="Sadr&#382;aj"/>
+   <l:gentext key="Draft" text="Nacrt"/>
+   <l:gentext key="above" text="iznad"/>
+   <l:gentext key="below" text="ispod"/>
+   <l:gentext key="sectioncalled" text="the section called"/>
+   <l:gentext key="index symbols" text="Oznake"/>
+   <l:gentext key="lowercase.alpha" text="abc&#269;&#263;d&#273;efghijklmnopqrs&#353;tuvwxyz&#382;"/>
+   <l:gentext key="uppercase.alpha" text="ABC&#268;&#262;D&#272;EFGHIJKLMNOPQRS&#352;TUVWXYZ&#381;"/>
+   <l:dingbat key="startquote" text="&#8222;"/>
+   <l:dingbat key="endquote" text="&#8220;"/>
+   <l:dingbat key="nestedstartquote" text="&#8218;"/>
+   <l:dingbat key="nestedendquote" text="&#8216;"/>
+   <l:dingbat key="singlestartquote" text="&#8216;" lang="en"/>
+   <l:dingbat key="singleendquote" text="&#8217;" lang="en"/>
+   <l:dingbat key="bullet" text="&#8226;"/>
+   <l:gentext key="hyphenation-character" text="&#8208;"/>
+   <l:gentext key="hyphenation-push-character-count" text="2"/>
+   <l:gentext key="hyphenation-remain-character-count" text="2"/>
+
+   <l:context name="styles">
+      <l:template name="person-name" text="first-last"/>
+   </l:context>
+
+   <l:context name="title">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="%t"/>
+      <l:template name="appendix" text="Dodatak&#160;%n.&#160;%t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="biblioentry" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliolist" text="%t" lang="en"/>
+      <l:template name="bibliomixed" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="Poglavlje&#160;%n.&#160;%t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="Jednad&#382;ba&#160;%n.&#160;%t"/>
+      <l:template name="example" text="Primjer&#160;%n.&#160;%t"/>
+      <l:template name="figure" text="Slika&#160;%n.&#160;%t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="glosslist" text="%t" lang="en"/>
+      <l:template name="glossentry" text="%t"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text=""/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="Dio&#160;%n.&#160;%t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="procedure.formal" text="Postupak&#160;%n.&#160;%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="productionset.formal" text="Produkcija&#160;%n"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="%t"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="%t"/>
+      <l:template name="refentry" text="%t"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsection" text="%t"/>
+      <l:template name="refsect1" text="%t"/>
+      <l:template name="refsect2" text="%t"/>
+      <l:template name="refsect3" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="refsynopsisdivinfo" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="step" text="%t"/>
+      <l:template name="table" text="Tablica&#160;%n.&#160;%t"/>
+      <l:template name="task" text="%t" lang="en"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text=""/>
+      <l:template name="warning" text="%t"/>
+   </l:context>
+
+   <l:context name="title-unnumbered">
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article/appendix" text="%t"/>
+      <l:template name="bridgehead" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="sect1" text="%t"/>
+      <l:template name="sect2" text="%t"/>
+      <l:template name="sect3" text="%t"/>
+      <l:template name="sect4" text="%t"/>
+      <l:template name="sect5" text="%t"/>
+      <l:template name="section" text="%t"/>
+      <l:template name="simplesect" text="%t"/>
+   </l:context>
+
+   <l:context name="title-numbered">
+      <l:template name="appendix" text="Dodatak&#160;%n.&#160;%t"/>
+      <l:template name="article/appendix" text="%n.&#160;%t"/>
+      <l:template name="bridgehead" text="%n.&#160;%t"/>
+      <l:template name="chapter" text="Poglavlje&#160;%n.&#160;%t"/>
+      <l:template name="sect1" text="%n.&#160;%t"/>
+      <l:template name="sect2" text="%n.&#160;%t"/>
+      <l:template name="sect3" text="%n.&#160;%t"/>
+      <l:template name="sect4" text="%n.&#160;%t"/>
+      <l:template name="sect5" text="%n.&#160;%t"/>
+      <l:template name="section" text="%n.&#160;%t"/>
+      <l:template name="simplesect" text="%t"/>
+   </l:context>
+
+   <l:context name="subtitle">
+      <l:template name="appendix" text="%s"/>
+      <l:template name="article" text="%s"/>
+      <l:template name="bibliodiv" text="%s"/>
+      <l:template name="biblioentry" text="%s"/>
+      <l:template name="bibliography" text="%s"/>
+      <l:template name="bibliomixed" text="%s"/>
+      <l:template name="bibliomset" text="%s"/>
+      <l:template name="biblioset" text="%s"/>
+      <l:template name="book" text="%s"/>
+      <l:template name="chapter" text="%s"/>
+      <l:template name="colophon" text="%s"/>
+      <l:template name="dedication" text="%s"/>
+      <l:template name="glossary" text="%s"/>
+      <l:template name="glossdiv" text="%s"/>
+      <l:template name="index" text="%s"/>
+      <l:template name="indexdiv" text="%s"/>
+      <l:template name="lot" text="%s"/>
+      <l:template name="part" text="%s"/>
+      <l:template name="partintro" text="%s"/>
+      <l:template name="preface" text="%s"/>
+      <l:template name="refentry" text="%s"/>
+      <l:template name="reference" text="%s"/>
+      <l:template name="refsection" text="%s"/>
+      <l:template name="refsect1" text="%s"/>
+      <l:template name="refsect2" text="%s"/>
+      <l:template name="refsect3" text="%s"/>
+      <l:template name="refsynopsisdiv" text="%s"/>
+      <l:template name="sect1" text="%s"/>
+      <l:template name="sect2" text="%s"/>
+      <l:template name="sect3" text="%s"/>
+      <l:template name="sect4" text="%s"/>
+      <l:template name="sect5" text="%s"/>
+      <l:template name="section" text="%s"/>
+      <l:template name="set" text="%s"/>
+      <l:template name="setindex" text="%s"/>
+      <l:template name="sidebar" text="%s"/>
+      <l:template name="simplesect" text="%s"/>
+      <l:template name="toc" text="%s"/>
+   </l:context>
+
+   <l:context name="xref">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="Odgovor:&#160;%n"/>
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="constraintdef" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="%t"/>
+      <l:template name="example" text="%t"/>
+      <l:template name="figure" text="%t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text="%n"/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="%t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="Pitanje:&#160;%n"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="Pitanje:&#160;%n"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="table" text="%t"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="%n"/>
+      <l:template name="warning" text="%t"/>
+      <l:template name="page.citation" text=" [%p]"/>
+      <l:template name="page" text="(page %p)" lang="en"/>
+      <l:template name="pageabbrev" text="(p. %p)" lang="en"/>
+      <l:template name="Page" text="Page %p" lang="en"/>
+      <l:template name="bridgehead" text="the section called &#8222;%t&#8220;"/>
+      <l:template name="refsection" text="the section called &#8222;%t&#8220;"/>
+      <l:template name="refsect1" text="the section called &#8222;%t&#8220;"/>
+      <l:template name="refsect2" text="the section called &#8222;%t&#8220;"/>
+      <l:template name="refsect3" text="the section called &#8222;%t&#8220;"/>
+      <l:template name="sect1" text="the section called &#8222;%t&#8220;"/>
+      <l:template name="sect2" text="the section called &#8222;%t&#8220;"/>
+      <l:template name="sect3" text="the section called &#8222;%t&#8220;"/>
+      <l:template name="sect4" text="the section called &#8222;%t&#8220;"/>
+      <l:template name="sect5" text="the section called &#8222;%t&#8220;"/>
+      <l:template name="section" text="the section called &#8222;%t&#8220;"/>
+      <l:template name="simplesect" text="the section called &#8222;%t&#8220;"/>
+   </l:context>
+
+   <l:context name="xref-number">
+      <l:template name="answer" text="Odgovor:&#160;%n"/>
+      <l:template name="appendix" text="Dodatak&#160;%n"/>
+      <l:template name="bridgehead" text="Odjeljak&#160;%n"/>
+      <l:template name="chapter" text="Poglavlje&#160;%n"/>
+      <l:template name="equation" text="Jednad&#382;ba&#160;%n"/>
+      <l:template name="example" text="Primjer&#160;%n"/>
+      <l:template name="figure" text="Slika&#160;%n"/>
+      <l:template name="part" text="Dio&#160;%n"/>
+      <l:template name="procedure" text="Postupak&#160;%n"/>
+      <l:template name="productionset" text="Produkcija&#160;%n"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n"/>
+      <l:template name="qandaentry" text="Pitanje:&#160;%n"/>
+      <l:template name="question" text="Pitanje:&#160;%n"/>
+      <l:template name="sect1" text="Odjeljak&#160;%n"/>
+      <l:template name="sect2" text="Odjeljak&#160;%n"/>
+      <l:template name="sect3" text="Odjeljak&#160;%n"/>
+      <l:template name="sect4" text="Odjeljak&#160;%n"/>
+      <l:template name="sect5" text="Odjeljak&#160;%n"/>
+      <l:template name="section" text="Odjeljak&#160;%n"/>
+      <l:template name="table" text="Tablica&#160;%n"/>
+   </l:context>
+
+   <l:context name="xref-number-and-title">
+      <l:template name="appendix" text="Dodatak&#160;%n, %t"/>
+      <l:template name="bridgehead" text="Odjeljak&#160;%n, &#8222;%t&#8220;"/>
+      <l:template name="chapter" text="Poglavlje&#160;%n, %t"/>
+      <l:template name="equation" text="Jednad&#382;ba&#160;%n, &#8222;%t&#8220;"/>
+      <l:template name="example" text="Primjer&#160;%n, &#8222;%t&#8220;"/>
+      <l:template name="figure" text="Slika&#160;%n, &#8222;%t&#8220;"/>
+      <l:template name="part" text="Dio&#160;%n, &#8222;%t&#8220;"/>
+      <l:template name="procedure" text="Postupak&#160;%n, &#8222;%t&#8220;"/>
+      <l:template name="productionset" text="Produkcija&#160;%n, &#8222;%t&#8220;"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n, &#8222;%t&#8220;"/>
+      <l:template name="refsect1" text="the section called &#8222;%t&#8220;"/>
+      <l:template name="refsect2" text="the section called &#8222;%t&#8220;"/>
+      <l:template name="refsect3" text="the section called &#8222;%t&#8220;"/>
+      <l:template name="refsection" text="the section called &#8222;%t&#8220;"/>
+      <l:template name="sect1" text="Odjeljak&#160;%n, &#8222;%t&#8220;"/>
+      <l:template name="sect2" text="Odjeljak&#160;%n, &#8222;%t&#8220;"/>
+      <l:template name="sect3" text="Odjeljak&#160;%n, &#8222;%t&#8220;"/>
+      <l:template name="sect4" text="Odjeljak&#160;%n, &#8222;%t&#8220;"/>
+      <l:template name="sect5" text="Odjeljak&#160;%n, &#8222;%t&#8220;"/>
+      <l:template name="section" text="Odjeljak&#160;%n, &#8222;%t&#8220;"/>
+      <l:template name="simplesect" text="the section called &#8222;%t&#8220;"/>
+      <l:template name="table" text="Tablica&#160;%n, &#8222;%t&#8220;"/>
+   </l:context>
+
+   <l:context name="authorgroup">
+      <l:template name="sep" text=", "/>
+      <l:template name="sep2" text=" i "/>
+      <l:template name="seplast" text=", i "/>
+   </l:context>
+
+   <l:context name="glossary">
+      <l:template name="see" text="Vidi "/>
+      <l:template name="seealso" text="Vidi i "/>
+   </l:context>
+
+   <l:context name="msgset">
+      <l:template name="MsgAud" text="Primatelji: "/>
+      <l:template name="MsgLevel" text="Razina: "/>
+      <l:template name="MsgOrig" text="Izvor: "/>
+   </l:context>
+
+   <l:context name="datetime">
+      <l:template name="format" text="m/d/Y"/>
+   </l:context>
+
+   <l:context name="datetime-full">
+      <l:template name="January" text="Sije&#269;anj"/>
+      <l:template name="February" text="Velja&#269;a"/>
+      <l:template name="March" text="O&#382;ujak"/>
+      <l:template name="April" text="Travanj"/>
+      <l:template name="May" text="Svibanj"/>
+      <l:template name="June" text="Lipanj"/>
+      <l:template name="July" text="Srpanj"/>
+      <l:template name="August" text="Kolovoz"/>
+      <l:template name="September" text="Rujan"/>
+      <l:template name="October" text="Listopad"/>
+      <l:template name="November" text="Studeni"/>
+      <l:template name="December" text="Prosinac"/>
+      <l:template name="Monday" text="Ponedjeljak"/>
+      <l:template name="Tuesday" text="Utorak"/>
+      <l:template name="Wednesday" text="Srijeda"/>
+      <l:template name="Thursday" text="&#268;etvrtak"/>
+      <l:template name="Friday" text="Petak"/>
+      <l:template name="Saturday" text="Subota"/>
+      <l:template name="Sunday" text="Nedjelja"/>
+   </l:context>
+
+   <l:context name="datetime-abbrev">
+      <l:template name="Jan" text="Sij"/>
+      <l:template name="Feb" text="Velj"/>
+      <l:template name="Mar" text="O&#382;u"/>
+      <l:template name="Apr" text="Tra"/>
+      <l:template name="May" text="Svi"/>
+      <l:template name="Jun" text="Lip"/>
+      <l:template name="Jul" text="Srp"/>
+      <l:template name="Aug" text="Kol"/>
+      <l:template name="Sep" text="Ruj"/>
+      <l:template name="Oct" text="Lis"/>
+      <l:template name="Nov" text="Stu"/>
+      <l:template name="Dec" text="Pro"/>
+      <l:template name="Mon" text="Pon"/>
+      <l:template name="Tue" text="Uto"/>
+      <l:template name="Wed" text="Sri"/>
+      <l:template name="Thu" text="&#268;et"/>
+      <l:template name="Fri" text="Pet"/>
+      <l:template name="Sat" text="Sub"/>
+      <l:template name="Sun" text="Ned"/>
+   </l:context>
+
+   <l:context name="htmlhelp">
+      <l:template name="langcode" text="0x041a Croatian"/>
+   </l:context>
+
+   <l:letters lang="en">
+      <l:l i="-1"/>
+      <l:l i="0">Symbols</l:l>
+      <l:l i="10">A</l:l>
+      <l:l i="10">a</l:l>
+      <l:l i="10">&#192;</l:l>
+      <l:l i="10">&#224;</l:l>
+      <l:l i="10">&#193;</l:l>
+      <l:l i="10">&#225;</l:l>
+      <l:l i="10">&#194;</l:l>
+      <l:l i="10">&#226;</l:l>
+      <l:l i="10">&#195;</l:l>
+      <l:l i="10">&#227;</l:l>
+      <l:l i="10">&#196;</l:l>
+      <l:l i="10">&#228;</l:l>
+      <l:l i="10">&#197;</l:l>
+      <l:l i="10">&#229;</l:l>
+      <l:l i="10">&#256;</l:l>
+      <l:l i="10">&#257;</l:l>
+      <l:l i="10">&#258;</l:l>
+      <l:l i="10">&#259;</l:l>
+      <l:l i="10">&#260;</l:l>
+      <l:l i="10">&#261;</l:l>
+      <l:l i="10">&#461;</l:l>
+      <l:l i="10">&#462;</l:l>
+      <l:l i="10">&#478;</l:l>
+      <l:l i="10">&#479;</l:l>
+      <l:l i="10">&#480;</l:l>
+      <l:l i="10">&#481;</l:l>
+      <l:l i="10">&#506;</l:l>
+      <l:l i="10">&#507;</l:l>
+      <l:l i="10">&#512;</l:l>
+      <l:l i="10">&#513;</l:l>
+      <l:l i="10">&#514;</l:l>
+      <l:l i="10">&#515;</l:l>
+      <l:l i="10">&#550;</l:l>
+      <l:l i="10">&#551;</l:l>
+      <l:l i="10">&#7680;</l:l>
+      <l:l i="10">&#7681;</l:l>
+      <l:l i="10">&#7834;</l:l>
+      <l:l i="10">&#7840;</l:l>
+      <l:l i="10">&#7841;</l:l>
+      <l:l i="10">&#7842;</l:l>
+      <l:l i="10">&#7843;</l:l>
+      <l:l i="10">&#7844;</l:l>
+      <l:l i="10">&#7845;</l:l>
+      <l:l i="10">&#7846;</l:l>
+      <l:l i="10">&#7847;</l:l>
+      <l:l i="10">&#7848;</l:l>
+      <l:l i="10">&#7849;</l:l>
+      <l:l i="10">&#7850;</l:l>
+      <l:l i="10">&#7851;</l:l>
+      <l:l i="10">&#7852;</l:l>
+      <l:l i="10">&#7853;</l:l>
+      <l:l i="10">&#7854;</l:l>
+      <l:l i="10">&#7855;</l:l>
+      <l:l i="10">&#7856;</l:l>
+      <l:l i="10">&#7857;</l:l>
+      <l:l i="10">&#7858;</l:l>
+      <l:l i="10">&#7859;</l:l>
+      <l:l i="10">&#7860;</l:l>
+      <l:l i="10">&#7861;</l:l>
+      <l:l i="10">&#7862;</l:l>
+      <l:l i="10">&#7863;</l:l>
+      <l:l i="20">B</l:l>
+      <l:l i="20">b</l:l>
+      <l:l i="20">&#384;</l:l>
+      <l:l i="20">&#385;</l:l>
+      <l:l i="20">&#595;</l:l>
+      <l:l i="20">&#386;</l:l>
+      <l:l i="20">&#387;</l:l>
+      <l:l i="20">&#7682;</l:l>
+      <l:l i="20">&#7683;</l:l>
+      <l:l i="20">&#7684;</l:l>
+      <l:l i="20">&#7685;</l:l>
+      <l:l i="20">&#7686;</l:l>
+      <l:l i="20">&#7687;</l:l>
+      <l:l i="30">C</l:l>
+      <l:l i="30">c</l:l>
+      <l:l i="30">&#199;</l:l>
+      <l:l i="30">&#231;</l:l>
+      <l:l i="30">&#262;</l:l>
+      <l:l i="30">&#263;</l:l>
+      <l:l i="30">&#264;</l:l>
+      <l:l i="30">&#265;</l:l>
+      <l:l i="30">&#266;</l:l>
+      <l:l i="30">&#267;</l:l>
+      <l:l i="30">&#268;</l:l>
+      <l:l i="30">&#269;</l:l>
+      <l:l i="30">&#391;</l:l>
+      <l:l i="30">&#392;</l:l>
+      <l:l i="30">&#597;</l:l>
+      <l:l i="30">&#7688;</l:l>
+      <l:l i="30">&#7689;</l:l>
+      <l:l i="40">D</l:l>
+      <l:l i="40">d</l:l>
+      <l:l i="40">&#270;</l:l>
+      <l:l i="40">&#271;</l:l>
+      <l:l i="40">&#272;</l:l>
+      <l:l i="40">&#273;</l:l>
+      <l:l i="40">&#394;</l:l>
+      <l:l i="40">&#599;</l:l>
+      <l:l i="40">&#395;</l:l>
+      <l:l i="40">&#396;</l:l>
+      <l:l i="40">&#453;</l:l>
+      <l:l i="40">&#498;</l:l>
+      <l:l i="40">&#545;</l:l>
+      <l:l i="40">&#598;</l:l>
+      <l:l i="40">&#7690;</l:l>
+      <l:l i="40">&#7691;</l:l>
+      <l:l i="40">&#7692;</l:l>
+      <l:l i="40">&#7693;</l:l>
+      <l:l i="40">&#7694;</l:l>
+      <l:l i="40">&#7695;</l:l>
+      <l:l i="40">&#7696;</l:l>
+      <l:l i="40">&#7697;</l:l>
+      <l:l i="40">&#7698;</l:l>
+      <l:l i="40">&#7699;</l:l>
+      <l:l i="50">E</l:l>
+      <l:l i="50">e</l:l>
+      <l:l i="50">&#200;</l:l>
+      <l:l i="50">&#232;</l:l>
+      <l:l i="50">&#201;</l:l>
+      <l:l i="50">&#233;</l:l>
+      <l:l i="50">&#202;</l:l>
+      <l:l i="50">&#234;</l:l>
+      <l:l i="50">&#203;</l:l>
+      <l:l i="50">&#235;</l:l>
+      <l:l i="50">&#274;</l:l>
+      <l:l i="50">&#275;</l:l>
+      <l:l i="50">&#276;</l:l>
+      <l:l i="50">&#277;</l:l>
+      <l:l i="50">&#278;</l:l>
+      <l:l i="50">&#279;</l:l>
+      <l:l i="50">&#280;</l:l>
+      <l:l i="50">&#281;</l:l>
+      <l:l i="50">&#282;</l:l>
+      <l:l i="50">&#283;</l:l>
+      <l:l i="50">&#516;</l:l>
+      <l:l i="50">&#517;</l:l>
+      <l:l i="50">&#518;</l:l>
+      <l:l i="50">&#519;</l:l>
+      <l:l i="50">&#552;</l:l>
+      <l:l i="50">&#553;</l:l>
+      <l:l i="50">&#7700;</l:l>
+      <l:l i="50">&#7701;</l:l>
+      <l:l i="50">&#7702;</l:l>
+      <l:l i="50">&#7703;</l:l>
+      <l:l i="50">&#7704;</l:l>
+      <l:l i="50">&#7705;</l:l>
+      <l:l i="50">&#7706;</l:l>
+      <l:l i="50">&#7707;</l:l>
+      <l:l i="50">&#7708;</l:l>
+      <l:l i="50">&#7709;</l:l>
+      <l:l i="50">&#7864;</l:l>
+      <l:l i="50">&#7865;</l:l>
+      <l:l i="50">&#7866;</l:l>
+      <l:l i="50">&#7867;</l:l>
+      <l:l i="50">&#7868;</l:l>
+      <l:l i="50">&#7869;</l:l>
+      <l:l i="50">&#7870;</l:l>
+      <l:l i="50">&#7871;</l:l>
+      <l:l i="50">&#7872;</l:l>
+      <l:l i="50">&#7873;</l:l>
+      <l:l i="50">&#7874;</l:l>
+      <l:l i="50">&#7875;</l:l>
+      <l:l i="50">&#7876;</l:l>
+      <l:l i="50">&#7877;</l:l>
+      <l:l i="50">&#7878;</l:l>
+      <l:l i="50">&#7879;</l:l>
+      <l:l i="60">F</l:l>
+      <l:l i="60">f</l:l>
+      <l:l i="60">&#401;</l:l>
+      <l:l i="60">&#402;</l:l>
+      <l:l i="60">&#7710;</l:l>
+      <l:l i="60">&#7711;</l:l>
+      <l:l i="70">G</l:l>
+      <l:l i="70">g</l:l>
+      <l:l i="70">&#284;</l:l>
+      <l:l i="70">&#285;</l:l>
+      <l:l i="70">&#286;</l:l>
+      <l:l i="70">&#287;</l:l>
+      <l:l i="70">&#288;</l:l>
+      <l:l i="70">&#289;</l:l>
+      <l:l i="70">&#290;</l:l>
+      <l:l i="70">&#291;</l:l>
+      <l:l i="70">&#403;</l:l>
+      <l:l i="70">&#608;</l:l>
+      <l:l i="70">&#484;</l:l>
+      <l:l i="70">&#485;</l:l>
+      <l:l i="70">&#486;</l:l>
+      <l:l i="70">&#487;</l:l>
+      <l:l i="70">&#500;</l:l>
+      <l:l i="70">&#501;</l:l>
+      <l:l i="70">&#7712;</l:l>
+      <l:l i="70">&#7713;</l:l>
+      <l:l i="80">H</l:l>
+      <l:l i="80">h</l:l>
+      <l:l i="80">&#292;</l:l>
+      <l:l i="80">&#293;</l:l>
+      <l:l i="80">&#294;</l:l>
+      <l:l i="80">&#295;</l:l>
+      <l:l i="80">&#542;</l:l>
+      <l:l i="80">&#543;</l:l>
+      <l:l i="80">&#614;</l:l>
+      <l:l i="80">&#7714;</l:l>
+      <l:l i="80">&#7715;</l:l>
+      <l:l i="80">&#7716;</l:l>
+      <l:l i="80">&#7717;</l:l>
+      <l:l i="80">&#7718;</l:l>
+      <l:l i="80">&#7719;</l:l>
+      <l:l i="80">&#7720;</l:l>
+      <l:l i="80">&#7721;</l:l>
+      <l:l i="80">&#7722;</l:l>
+      <l:l i="80">&#7723;</l:l>
+      <l:l i="80">&#7830;</l:l>
+      <l:l i="90">I</l:l>
+      <l:l i="90">i</l:l>
+      <l:l i="90">&#204;</l:l>
+      <l:l i="90">&#236;</l:l>
+      <l:l i="90">&#205;</l:l>
+      <l:l i="90">&#237;</l:l>
+      <l:l i="90">&#206;</l:l>
+      <l:l i="90">&#238;</l:l>
+      <l:l i="90">&#207;</l:l>
+      <l:l i="90">&#239;</l:l>
+      <l:l i="90">&#296;</l:l>
+      <l:l i="90">&#297;</l:l>
+      <l:l i="90">&#298;</l:l>
+      <l:l i="90">&#299;</l:l>
+      <l:l i="90">&#300;</l:l>
+      <l:l i="90">&#301;</l:l>
+      <l:l i="90">&#302;</l:l>
+      <l:l i="90">&#303;</l:l>
+      <l:l i="90">&#304;</l:l>
+      <l:l i="90">&#407;</l:l>
+      <l:l i="90">&#616;</l:l>
+      <l:l i="90">&#463;</l:l>
+      <l:l i="90">&#464;</l:l>
+      <l:l i="90">&#520;</l:l>
+      <l:l i="90">&#521;</l:l>
+      <l:l i="90">&#522;</l:l>
+      <l:l i="90">&#523;</l:l>
+      <l:l i="90">&#7724;</l:l>
+      <l:l i="90">&#7725;</l:l>
+      <l:l i="90">&#7726;</l:l>
+      <l:l i="90">&#7727;</l:l>
+      <l:l i="90">&#7880;</l:l>
+      <l:l i="90">&#7881;</l:l>
+      <l:l i="90">&#7882;</l:l>
+      <l:l i="90">&#7883;</l:l>
+      <l:l i="100">J</l:l>
+      <l:l i="100">j</l:l>
+      <l:l i="100">&#308;</l:l>
+      <l:l i="100">&#309;</l:l>
+      <l:l i="100">&#496;</l:l>
+      <l:l i="100">&#669;</l:l>
+      <l:l i="110">K</l:l>
+      <l:l i="110">k</l:l>
+      <l:l i="110">&#310;</l:l>
+      <l:l i="110">&#311;</l:l>
+      <l:l i="110">&#408;</l:l>
+      <l:l i="110">&#409;</l:l>
+      <l:l i="110">&#488;</l:l>
+      <l:l i="110">&#489;</l:l>
+      <l:l i="110">&#7728;</l:l>
+      <l:l i="110">&#7729;</l:l>
+      <l:l i="110">&#7730;</l:l>
+      <l:l i="110">&#7731;</l:l>
+      <l:l i="110">&#7732;</l:l>
+      <l:l i="110">&#7733;</l:l>
+      <l:l i="120">L</l:l>
+      <l:l i="120">l</l:l>
+      <l:l i="120">&#313;</l:l>
+      <l:l i="120">&#314;</l:l>
+      <l:l i="120">&#315;</l:l>
+      <l:l i="120">&#316;</l:l>
+      <l:l i="120">&#317;</l:l>
+      <l:l i="120">&#318;</l:l>
+      <l:l i="120">&#319;</l:l>
+      <l:l i="120">&#320;</l:l>
+      <l:l i="120">&#321;</l:l>
+      <l:l i="120">&#322;</l:l>
+      <l:l i="120">&#410;</l:l>
+      <l:l i="120">&#456;</l:l>
+      <l:l i="120">&#564;</l:l>
+      <l:l i="120">&#619;</l:l>
+      <l:l i="120">&#620;</l:l>
+      <l:l i="120">&#621;</l:l>
+      <l:l i="120">&#7734;</l:l>
+      <l:l i="120">&#7735;</l:l>
+      <l:l i="120">&#7736;</l:l>
+      <l:l i="120">&#7737;</l:l>
+      <l:l i="120">&#7738;</l:l>
+      <l:l i="120">&#7739;</l:l>
+      <l:l i="120">&#7740;</l:l>
+      <l:l i="120">&#7741;</l:l>
+      <l:l i="130">M</l:l>
+      <l:l i="130">m</l:l>
+      <l:l i="130">&#625;</l:l>
+      <l:l i="130">&#7742;</l:l>
+      <l:l i="130">&#7743;</l:l>
+      <l:l i="130">&#7744;</l:l>
+      <l:l i="130">&#7745;</l:l>
+      <l:l i="130">&#7746;</l:l>
+      <l:l i="130">&#7747;</l:l>
+      <l:l i="140">N</l:l>
+      <l:l i="140">n</l:l>
+      <l:l i="140">&#209;</l:l>
+      <l:l i="140">&#241;</l:l>
+      <l:l i="140">&#323;</l:l>
+      <l:l i="140">&#324;</l:l>
+      <l:l i="140">&#325;</l:l>
+      <l:l i="140">&#326;</l:l>
+      <l:l i="140">&#327;</l:l>
+      <l:l i="140">&#328;</l:l>
+      <l:l i="140">&#413;</l:l>
+      <l:l i="140">&#626;</l:l>
+      <l:l i="140">&#414;</l:l>
+      <l:l i="140">&#544;</l:l>
+      <l:l i="140">&#459;</l:l>
+      <l:l i="140">&#504;</l:l>
+      <l:l i="140">&#505;</l:l>
+      <l:l i="140">&#565;</l:l>
+      <l:l i="140">&#627;</l:l>
+      <l:l i="140">&#7748;</l:l>
+      <l:l i="140">&#7749;</l:l>
+      <l:l i="140">&#7750;</l:l>
+      <l:l i="140">&#7751;</l:l>
+      <l:l i="140">&#7752;</l:l>
+      <l:l i="140">&#7753;</l:l>
+      <l:l i="140">&#7754;</l:l>
+      <l:l i="140">&#7755;</l:l>
+      <l:l i="150">O</l:l>
+      <l:l i="150">o</l:l>
+      <l:l i="150">&#210;</l:l>
+      <l:l i="150">&#242;</l:l>
+      <l:l i="150">&#211;</l:l>
+      <l:l i="150">&#243;</l:l>
+      <l:l i="150">&#212;</l:l>
+      <l:l i="150">&#244;</l:l>
+      <l:l i="150">&#213;</l:l>
+      <l:l i="150">&#245;</l:l>
+      <l:l i="150">&#214;</l:l>
+      <l:l i="150">&#246;</l:l>
+      <l:l i="150">&#216;</l:l>
+      <l:l i="150">&#248;</l:l>
+      <l:l i="150">&#332;</l:l>
+      <l:l i="150">&#333;</l:l>
+      <l:l i="150">&#334;</l:l>
+      <l:l i="150">&#335;</l:l>
+      <l:l i="150">&#336;</l:l>
+      <l:l i="150">&#337;</l:l>
+      <l:l i="150">&#415;</l:l>
+      <l:l i="150">&#416;</l:l>
+      <l:l i="150">&#417;</l:l>
+      <l:l i="150">&#465;</l:l>
+      <l:l i="150">&#466;</l:l>
+      <l:l i="150">&#490;</l:l>
+      <l:l i="150">&#491;</l:l>
+      <l:l i="150">&#492;</l:l>
+      <l:l i="150">&#493;</l:l>
+      <l:l i="150">&#510;</l:l>
+      <l:l i="150">&#511;</l:l>
+      <l:l i="150">&#524;</l:l>
+      <l:l i="150">&#525;</l:l>
+      <l:l i="150">&#526;</l:l>
+      <l:l i="150">&#527;</l:l>
+      <l:l i="150">&#554;</l:l>
+      <l:l i="150">&#555;</l:l>
+      <l:l i="150">&#556;</l:l>
+      <l:l i="150">&#557;</l:l>
+      <l:l i="150">&#558;</l:l>
+      <l:l i="150">&#559;</l:l>
+      <l:l i="150">&#560;</l:l>
+      <l:l i="150">&#561;</l:l>
+      <l:l i="150">&#7756;</l:l>
+      <l:l i="150">&#7757;</l:l>
+      <l:l i="150">&#7758;</l:l>
+      <l:l i="150">&#7759;</l:l>
+      <l:l i="150">&#7760;</l:l>
+      <l:l i="150">&#7761;</l:l>
+      <l:l i="150">&#7762;</l:l>
+      <l:l i="150">&#7763;</l:l>
+      <l:l i="150">&#7884;</l:l>
+      <l:l i="150">&#7885;</l:l>
+      <l:l i="150">&#7886;</l:l>
+      <l:l i="150">&#7887;</l:l>
+      <l:l i="150">&#7888;</l:l>
+      <l:l i="150">&#7889;</l:l>
+      <l:l i="150">&#7890;</l:l>
+      <l:l i="150">&#7891;</l:l>
+      <l:l i="150">&#7892;</l:l>
+      <l:l i="150">&#7893;</l:l>
+      <l:l i="150">&#7894;</l:l>
+      <l:l i="150">&#7895;</l:l>
+      <l:l i="150">&#7896;</l:l>
+      <l:l i="150">&#7897;</l:l>
+      <l:l i="150">&#7898;</l:l>
+      <l:l i="150">&#7899;</l:l>
+      <l:l i="150">&#7900;</l:l>
+      <l:l i="150">&#7901;</l:l>
+      <l:l i="150">&#7902;</l:l>
+      <l:l i="150">&#7903;</l:l>
+      <l:l i="150">&#7904;</l:l>
+      <l:l i="150">&#7905;</l:l>
+      <l:l i="150">&#7906;</l:l>
+      <l:l i="150">&#7907;</l:l>
+      <l:l i="160">P</l:l>
+      <l:l i="160">p</l:l>
+      <l:l i="160">&#420;</l:l>
+      <l:l i="160">&#421;</l:l>
+      <l:l i="160">&#7764;</l:l>
+      <l:l i="160">&#7765;</l:l>
+      <l:l i="160">&#7766;</l:l>
+      <l:l i="160">&#7767;</l:l>
+      <l:l i="170">Q</l:l>
+      <l:l i="170">q</l:l>
+      <l:l i="170">&#672;</l:l>
+      <l:l i="180">R</l:l>
+      <l:l i="180">r</l:l>
+      <l:l i="180">&#340;</l:l>
+      <l:l i="180">&#341;</l:l>
+      <l:l i="180">&#342;</l:l>
+      <l:l i="180">&#343;</l:l>
+      <l:l i="180">&#344;</l:l>
+      <l:l i="180">&#345;</l:l>
+      <l:l i="180">&#528;</l:l>
+      <l:l i="180">&#529;</l:l>
+      <l:l i="180">&#530;</l:l>
+      <l:l i="180">&#531;</l:l>
+      <l:l i="180">&#636;</l:l>
+      <l:l i="180">&#637;</l:l>
+      <l:l i="180">&#638;</l:l>
+      <l:l i="180">&#7768;</l:l>
+      <l:l i="180">&#7769;</l:l>
+      <l:l i="180">&#7770;</l:l>
+      <l:l i="180">&#7771;</l:l>
+      <l:l i="180">&#7772;</l:l>
+      <l:l i="180">&#7773;</l:l>
+      <l:l i="180">&#7774;</l:l>
+      <l:l i="180">&#7775;</l:l>
+      <l:l i="190">S</l:l>
+      <l:l i="190">s</l:l>
+      <l:l i="190">&#346;</l:l>
+      <l:l i="190">&#347;</l:l>
+      <l:l i="190">&#348;</l:l>
+      <l:l i="190">&#349;</l:l>
+      <l:l i="190">&#350;</l:l>
+      <l:l i="190">&#351;</l:l>
+      <l:l i="190">&#352;</l:l>
+      <l:l i="190">&#353;</l:l>
+      <l:l i="190">&#536;</l:l>
+      <l:l i="190">&#537;</l:l>
+      <l:l i="190">&#642;</l:l>
+      <l:l i="190">&#7776;</l:l>
+      <l:l i="190">&#7777;</l:l>
+      <l:l i="190">&#7778;</l:l>
+      <l:l i="190">&#7779;</l:l>
+      <l:l i="190">&#7780;</l:l>
+      <l:l i="190">&#7781;</l:l>
+      <l:l i="190">&#7782;</l:l>
+      <l:l i="190">&#7783;</l:l>
+      <l:l i="190">&#7784;</l:l>
+      <l:l i="190">&#7785;</l:l>
+      <l:l i="200">T</l:l>
+      <l:l i="200">t</l:l>
+      <l:l i="200">&#354;</l:l>
+      <l:l i="200">&#355;</l:l>
+      <l:l i="200">&#356;</l:l>
+      <l:l i="200">&#357;</l:l>
+      <l:l i="200">&#358;</l:l>
+      <l:l i="200">&#359;</l:l>
+      <l:l i="200">&#427;</l:l>
+      <l:l i="200">&#428;</l:l>
+      <l:l i="200">&#429;</l:l>
+      <l:l i="200">&#430;</l:l>
+      <l:l i="200">&#648;</l:l>
+      <l:l i="200">&#538;</l:l>
+      <l:l i="200">&#539;</l:l>
+      <l:l i="200">&#566;</l:l>
+      <l:l i="200">&#7786;</l:l>
+      <l:l i="200">&#7787;</l:l>
+      <l:l i="200">&#7788;</l:l>
+      <l:l i="200">&#7789;</l:l>
+      <l:l i="200">&#7790;</l:l>
+      <l:l i="200">&#7791;</l:l>
+      <l:l i="200">&#7792;</l:l>
+      <l:l i="200">&#7793;</l:l>
+      <l:l i="200">&#7831;</l:l>
+      <l:l i="210">U</l:l>
+      <l:l i="210">u</l:l>
+      <l:l i="210">&#217;</l:l>
+      <l:l i="210">&#249;</l:l>
+      <l:l i="210">&#218;</l:l>
+      <l:l i="210">&#250;</l:l>
+      <l:l i="210">&#219;</l:l>
+      <l:l i="210">&#251;</l:l>
+      <l:l i="210">&#220;</l:l>
+      <l:l i="210">&#252;</l:l>
+      <l:l i="210">&#360;</l:l>
+      <l:l i="210">&#361;</l:l>
+      <l:l i="210">&#362;</l:l>
+      <l:l i="210">&#363;</l:l>
+      <l:l i="210">&#364;</l:l>
+      <l:l i="210">&#365;</l:l>
+      <l:l i="210">&#366;</l:l>
+      <l:l i="210">&#367;</l:l>
+      <l:l i="210">&#368;</l:l>
+      <l:l i="210">&#369;</l:l>
+      <l:l i="210">&#370;</l:l>
+      <l:l i="210">&#371;</l:l>
+      <l:l i="210">&#431;</l:l>
+      <l:l i="210">&#432;</l:l>
+      <l:l i="210">&#467;</l:l>
+      <l:l i="210">&#468;</l:l>
+      <l:l i="210">&#469;</l:l>
+      <l:l i="210">&#470;</l:l>
+      <l:l i="210">&#471;</l:l>
+      <l:l i="210">&#472;</l:l>
+      <l:l i="210">&#473;</l:l>
+      <l:l i="210">&#474;</l:l>
+      <l:l i="210">&#475;</l:l>
+      <l:l i="210">&#476;</l:l>
+      <l:l i="210">&#532;</l:l>
+      <l:l i="210">&#533;</l:l>
+      <l:l i="210">&#534;</l:l>
+      <l:l i="210">&#535;</l:l>
+      <l:l i="210">&#7794;</l:l>
+      <l:l i="210">&#7795;</l:l>
+      <l:l i="210">&#7796;</l:l>
+      <l:l i="210">&#7797;</l:l>
+      <l:l i="210">&#7798;</l:l>
+      <l:l i="210">&#7799;</l:l>
+      <l:l i="210">&#7800;</l:l>
+      <l:l i="210">&#7801;</l:l>
+      <l:l i="210">&#7802;</l:l>
+      <l:l i="210">&#7803;</l:l>
+      <l:l i="210">&#7908;</l:l>
+      <l:l i="210">&#7909;</l:l>
+      <l:l i="210">&#7910;</l:l>
+      <l:l i="210">&#7911;</l:l>
+      <l:l i="210">&#7912;</l:l>
+      <l:l i="210">&#7913;</l:l>
+      <l:l i="210">&#7914;</l:l>
+      <l:l i="210">&#7915;</l:l>
+      <l:l i="210">&#7916;</l:l>
+      <l:l i="210">&#7917;</l:l>
+      <l:l i="210">&#7918;</l:l>
+      <l:l i="210">&#7919;</l:l>
+      <l:l i="210">&#7920;</l:l>
+      <l:l i="210">&#7921;</l:l>
+      <l:l i="220">V</l:l>
+      <l:l i="220">v</l:l>
+      <l:l i="220">&#434;</l:l>
+      <l:l i="220">&#651;</l:l>
+      <l:l i="220">&#7804;</l:l>
+      <l:l i="220">&#7805;</l:l>
+      <l:l i="220">&#7806;</l:l>
+      <l:l i="220">&#7807;</l:l>
+      <l:l i="230">W</l:l>
+      <l:l i="230">w</l:l>
+      <l:l i="230">&#372;</l:l>
+      <l:l i="230">&#373;</l:l>
+      <l:l i="230">&#7808;</l:l>
+      <l:l i="230">&#7809;</l:l>
+      <l:l i="230">&#7810;</l:l>
+      <l:l i="230">&#7811;</l:l>
+      <l:l i="230">&#7812;</l:l>
+      <l:l i="230">&#7813;</l:l>
+      <l:l i="230">&#7814;</l:l>
+      <l:l i="230">&#7815;</l:l>
+      <l:l i="230">&#7816;</l:l>
+      <l:l i="230">&#7817;</l:l>
+      <l:l i="230">&#7832;</l:l>
+      <l:l i="240">X</l:l>
+      <l:l i="240">x</l:l>
+      <l:l i="240">&#7818;</l:l>
+      <l:l i="240">&#7819;</l:l>
+      <l:l i="240">&#7820;</l:l>
+      <l:l i="240">&#7821;</l:l>
+      <l:l i="250">Y</l:l>
+      <l:l i="250">y</l:l>
+      <l:l i="250">&#221;</l:l>
+      <l:l i="250">&#253;</l:l>
+      <l:l i="250">&#255;</l:l>
+      <l:l i="250">&#376;</l:l>
+      <l:l i="250">&#374;</l:l>
+      <l:l i="250">&#375;</l:l>
+      <l:l i="250">&#435;</l:l>
+      <l:l i="250">&#436;</l:l>
+      <l:l i="250">&#562;</l:l>
+      <l:l i="250">&#563;</l:l>
+      <l:l i="250">&#7822;</l:l>
+      <l:l i="250">&#7823;</l:l>
+      <l:l i="250">&#7833;</l:l>
+      <l:l i="250">&#7922;</l:l>
+      <l:l i="250">&#7923;</l:l>
+      <l:l i="250">&#7924;</l:l>
+      <l:l i="250">&#7925;</l:l>
+      <l:l i="250">&#7926;</l:l>
+      <l:l i="250">&#7927;</l:l>
+      <l:l i="250">&#7928;</l:l>
+      <l:l i="250">&#7929;</l:l>
+      <l:l i="260">Z</l:l>
+      <l:l i="260">z</l:l>
+      <l:l i="260">&#377;</l:l>
+      <l:l i="260">&#378;</l:l>
+      <l:l i="260">&#379;</l:l>
+      <l:l i="260">&#380;</l:l>
+      <l:l i="260">&#381;</l:l>
+      <l:l i="260">&#382;</l:l>
+      <l:l i="260">&#437;</l:l>
+      <l:l i="260">&#438;</l:l>
+      <l:l i="260">&#548;</l:l>
+      <l:l i="260">&#549;</l:l>
+      <l:l i="260">&#656;</l:l>
+      <l:l i="260">&#657;</l:l>
+      <l:l i="260">&#7824;</l:l>
+      <l:l i="260">&#7825;</l:l>
+      <l:l i="260">&#7826;</l:l>
+      <l:l i="260">&#7827;</l:l>
+      <l:l i="260">&#7828;</l:l>
+      <l:l i="260">&#7829;</l:l>
+   </l:letters>
+</l:l10n>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/hu.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/hu.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/hu.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1153 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="hu" english-language-name="Hungarian">
+
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+   <l:gentext key="Abstract" text="Kivonat"/>
+   <l:gentext key="abstract" text="kivonat"/>
+   <l:gentext key="Answer" text="V:"/>
+   <l:gentext key="answer" text="v:"/>
+   <l:gentext key="Appendix" text="F&#252;ggel&#233;k"/>
+   <l:gentext key="appendix" text="f&#252;ggel&#233;k"/>
+   <l:gentext key="Article" text="Cikk"/>
+   <l:gentext key="article" text="cikk"/>
+   <l:gentext key="Bibliography" text="Irodalomjegyz&#233;k"/>
+   <l:gentext key="bibliography" text="irodalomjegyz&#233;k"/>
+   <l:gentext key="Book" text="K&#246;nyv"/>
+   <l:gentext key="book" text="k&#246;nyv"/>
+   <l:gentext key="CAUTION" text="FIGYELEM"/>
+   <l:gentext key="Caution" text="Figyelem"/>
+   <l:gentext key="caution" text="figyelem"/>
+   <l:gentext key="Chapter" text="Fejezet"/>
+   <l:gentext key="chapter" text="fejezet"/>
+   <l:gentext key="Colophon" text="V&#233;gsz&#243;"/>
+   <l:gentext key="colophon" text="v&#233;gsz&#243;"/>
+   <l:gentext key="Copyright" text="Copyright"/>
+   <l:gentext key="copyright" text="copyright"/>
+   <l:gentext key="Dedication" text="Aj&#225;nl&#225;s"/>
+   <l:gentext key="dedication" text="aj&#225;nl&#225;s"/>
+   <l:gentext key="Edition" text="Kiad&#225;s"/>
+   <l:gentext key="edition" text="kiad&#225;s"/>
+   <l:gentext key="Equation" text="Egyenlet"/>
+   <l:gentext key="equation" text="egyenlet"/>
+   <l:gentext key="Example" text="P&#233;lda"/>
+   <l:gentext key="example" text="p&#233;lda"/>
+   <l:gentext key="Figure" text="&#193;bra"/>
+   <l:gentext key="figure" text="&#225;bra"/>
+   <l:gentext key="Glossary" text="Sz&#243;jegyz&#233;k"/>
+   <l:gentext key="glossary" text="sz&#243;jegyz&#233;k"/>
+   <l:gentext key="GlossSee" text="L&#225;sd"/>
+   <l:gentext key="glosssee" text="l&#225;sd"/>
+   <l:gentext key="GlossSeeAlso" text="L&#225;sd m&#233;g"/>
+   <l:gentext key="glossseealso" text="l&#225;sd m&#233;g"/>
+   <l:gentext key="IMPORTANT" text="FONTOS"/>
+   <l:gentext key="important" text="fontos"/>
+   <l:gentext key="Important" text="Fontos"/>
+   <l:gentext key="Index" text="T&#225;rgymutat&#243;"/>
+   <l:gentext key="index" text="t&#225;rgymutat&#243;"/>
+   <l:gentext key="ISBN" text="ISBN"/>
+   <l:gentext key="isbn" text="isbn"/>
+   <l:gentext key="LegalNotice" text="Jogi k&#246;zlem&#233;ny"/>
+   <l:gentext key="legalnotice" text="jogi k&#246;zlem&#233;ny"/>
+   <l:gentext key="MsgAud" text="C&#233;lk&#246;z&#246;ns&#233;g"/>
+   <l:gentext key="msgaud" text="c&#233;lk&#246;z&#246;ns&#233;g"/>
+   <l:gentext key="MsgLevel" text="Szint"/>
+   <l:gentext key="msglevel" text="szint"/>
+   <l:gentext key="MsgOrig" text="Eredet"/>
+   <l:gentext key="msgorig" text="eredet"/>
+   <l:gentext key="NOTE" text="MEGJEGYZ&#201;S"/>
+   <l:gentext key="Note" text="Megjegyz&#233;s"/>
+   <l:gentext key="note" text="megjegyz&#233;s"/>
+   <l:gentext key="Part" text="R&#233;sz"/>
+   <l:gentext key="part" text="r&#233;sz"/>
+   <l:gentext key="Preface" text="El&#337;sz&#243;"/>
+   <l:gentext key="preface" text="el&#337;sz&#243;"/>
+   <l:gentext key="Procedure" text="Elj&#225;r&#225;s"/>
+   <l:gentext key="procedure" text="elj&#225;r&#225;s"/>
+   <l:gentext key="ProductionSet" text="Elemcsoport"/>
+   <l:gentext key="PubDate" text="Publication Date" lang="en"/>
+   <l:gentext key="pubdate" text="Publication date" lang="en"/>
+   <l:gentext key="Published" text="Megjelent"/>
+   <l:gentext key="published" text="megjelent"/>
+   <l:gentext key="Qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="Question" text="K:"/>
+   <l:gentext key="question" text="k:"/>
+   <l:gentext key="RefEntry" text="Bejegyz&#233;s"/>
+   <l:gentext key="refentry" text="bejegyz&#233;s"/>
+   <l:gentext key="Reference" text="Referencia"/>
+   <l:gentext key="reference" text="referencia"/>
+   <l:gentext key="RefName" text="N&#233;v"/>
+   <l:gentext key="refname" text="n&#233;v"/>
+   <l:gentext key="RefSection" text="Szakasz"/>
+   <l:gentext key="refsection" text="szakasz"/>
+   <l:gentext key="RefSynopsisDiv" text="&#193;ttekint&#233;s"/>
+   <l:gentext key="refsynopsisdiv" text="&#225;ttekint&#233;s"/>
+   <l:gentext key="RevHistory" text="Verzi&#243;t&#246;rt&#233;net"/>
+   <l:gentext key="revhistory" text="verzi&#243;t&#246;rt&#233;net"/>
+   <l:gentext key="revision" text="verzi&#243;"/>
+   <l:gentext key="Revision" text="Verzi&#243;"/>
+   <l:gentext key="sect1" text="Szakasz"/>
+   <l:gentext key="sect2" text="Szakasz"/>
+   <l:gentext key="sect3" text="Szakasz"/>
+   <l:gentext key="sect4" text="Szakasz"/>
+   <l:gentext key="sect5" text="Szakasz"/>
+   <l:gentext key="section" text="szakasz"/>
+   <l:gentext key="Section" text="Szakasz"/>
+   <l:gentext key="see" text="l&#225;sd"/>
+   <l:gentext key="See" text="L&#225;sd"/>
+   <l:gentext key="seealso" text="l&#225;sd m&#233;g"/>
+   <l:gentext key="Seealso" text="L&#225;sd m&#233;g"/>
+   <l:gentext key="SeeAlso" text="L&#225;sd m&#233;g"/>
+   <l:gentext key="set" text="csoport"/>
+   <l:gentext key="Set" text="Csoport"/>
+   <l:gentext key="setindex" text="csoportmutat&#243;"/>
+   <l:gentext key="SetIndex" text="Csoportmutat&#243;"/>
+   <l:gentext key="Sidebar" text="Sz&#233;ljegyzet"/>
+   <l:gentext key="sidebar" text="sz&#233;ljegyzet"/>
+   <l:gentext key="step" text="l&#233;p&#233;s"/>
+   <l:gentext key="Step" text="L&#233;p&#233;s"/>
+   <l:gentext key="Table" text="T&#225;bl&#225;zat"/>
+   <l:gentext key="table" text="t&#225;bl&#225;zat"/>
+   <l:gentext key="tip" text="tipp"/>
+   <l:gentext key="TIP" text="TIPP"/>
+   <l:gentext key="Tip" text="Tipp"/>
+   <l:gentext key="Warning" text="Figyelem"/>
+   <l:gentext key="warning" text="figyelem"/>
+   <l:gentext key="WARNING" text="FIGYELEM"/>
+   <l:gentext key="and" text="&#233;s"/>
+   <l:gentext key="by" text="by"/>
+   <l:gentext key="called" text="called" lang="en"/>
+   <l:gentext key="Edited" text="Szerk."/>
+   <l:gentext key="edited" text="szerk."/>
+   <l:gentext key="Editedby" text="Szerkesztette"/>
+   <l:gentext key="editedby" text="szerkesztette"/>
+   <l:gentext key="in" text="in"/>
+   <l:gentext key="lastlistcomma" text=","/>
+   <l:gentext key="listcomma" text=","/>
+   <l:gentext key="nonexistantelement" text="nem l&#233;tez&#337; elem"/>
+   <l:gentext key="notes" text="megjegyz&#233;sek"/>
+   <l:gentext key="Notes" text="Megjegyz&#233;sek"/>
+   <l:gentext key="Pgs" text="Lsz."/>
+   <l:gentext key="pgs" text="lsz."/>
+   <l:gentext key="Revisedby" text="Megvizsg&#225;lva"/>
+   <l:gentext key="revisedby" text="megvizsg&#225;lva"/>
+   <l:gentext key="TableNotes" text="Megjegyz&#233;sek"/>
+   <l:gentext key="tablenotes" text="megjegyz&#233;sek"/>
+   <l:gentext key="TableofContents" text="Tartalom"/>
+   <l:gentext key="tableofcontents" text="tartalom"/>
+   <l:gentext key="the" text="" lang="en"/>
+   <l:gentext key="unexpectedelementname" text="nem v&#225;rt elemn&#233;v"/>
+   <l:gentext key="unsupported" text="nem t&#225;mogatott"/>
+   <l:gentext key="xrefto" text="keresztref"/>
+   <l:gentext key="listofequations" text="az egyenletek list&#225;ja"/>
+   <l:gentext key="ListofEquations" text="Az egyenletek list&#225;ja"/>
+   <l:gentext key="ListofExamples" text="A p&#233;ld&#225;k list&#225;ja"/>
+   <l:gentext key="listofexamples" text="a p&#233;ld&#225;k list&#225;ja"/>
+   <l:gentext key="ListofFigures" text="Az &#225;br&#225;k list&#225;ja"/>
+   <l:gentext key="listoffigures" text="az &#225;br&#225;k list&#225;ja"/>
+   <l:gentext key="ListofProcedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listofprocedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listoftables" text="a t&#225;bl&#225;zatok list&#225;ja"/>
+   <l:gentext key="ListofTables" text="A t&#225;bl&#225;zatok list&#225;ja"/>
+   <l:gentext key="ListofUnknown" text="Az egy&#233;b elemek list&#225;ja"/>
+   <l:gentext key="listofunknown" text="az egy&#233;b elemek list&#225;ja"/>
+   <l:gentext key="nav-home" text="Tartalom"/>
+   <l:gentext key="nav-next" text="K&#246;vetkez&#337;"/>
+   <l:gentext key="nav-next-sibling" text="Gyors el&#337;re"/>
+   <l:gentext key="nav-prev" text="El&#337;z&#337;"/>
+   <l:gentext key="nav-prev-sibling" text="Gyors vissza"/>
+   <l:gentext key="nav-up" text="Fel"/>
+   <l:gentext key="nav-toc" text="ToC" lang="en"/>
+   <l:gentext key="Draft" text="V&#225;zlat"/>
+   <l:gentext key="above" text="fent"/>
+   <l:gentext key="below" text="lent"/>
+   <l:gentext key="sectioncalled" text="ilyen nev&#369; szakasz:"/>
+   <l:gentext key="index symbols" text="szimb&#243;lummutat&#243;"/>
+   <l:gentext key="lowercase.alpha" text="a&#225;bcde&#233;fghi&#237;jklmno&#243;&#246;&#337;pqrstu&#250;&#252;&#171;vwxyz"/>
+   <l:gentext key="uppercase.alpha" text="A&#193;BCDE&#201;FGHI&#205;JKLMNO&#211;&#214;&#336;PQRSTU&#218;&#220;&#368;VWXYZ"/>
+   <l:dingbat key="startquote" text="&#8222;"/>
+   <l:dingbat key="endquote" text="&#8221;"/>
+   <l:dingbat key="nestedstartquote" text="&#187;"/>
+   <l:dingbat key="nestedendquote" text="&#171;"/>
+   <l:dingbat key="singlestartquote" text="&#8216;" lang="en"/>
+   <l:dingbat key="singleendquote" text="&#8217;" lang="en"/>
+   <l:dingbat key="bullet" text="&#8226;"/>
+   <l:gentext key="hyphenation-character" text="-" lang="en"/>
+   <l:gentext key="hyphenation-push-character-count" text="2" lang="en"/>
+   <l:gentext key="hyphenation-remain-character-count" text="2" lang="en"/>
+
+   <l:context name="styles">
+      <l:template name="person-name" text="last-first"/>
+   </l:context>
+
+   <l:context name="title">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="%t"/>
+      <l:template name="appendix" text="%n. f&#252;ggel&#233;k - %t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="biblioentry" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliolist" text="%t" lang="en"/>
+      <l:template name="bibliomixed" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="%n. fejezet - %t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="%n. egyenlet - %t"/>
+      <l:template name="example" text="%n. p&#233;lda - %t"/>
+      <l:template name="figure" text="%n. &#225;bra - %t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="glosslist" text="%t" lang="en"/>
+      <l:template name="glossentry" text="%t" lang="en"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text=""/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="%n. r&#233;sz - %t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="procedure.formal" text="Elj&#225;r&#225;s&#160;%n.&#160;%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="productionset.formal" text="Elemcsoport&#160;%n"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="%t"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="%t"/>
+      <l:template name="refentry" text="%t"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsection" text="%t"/>
+      <l:template name="refsect1" text="%t"/>
+      <l:template name="refsect2" text="%t"/>
+      <l:template name="refsect3" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="refsynopsisdivinfo" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="step" text="%t"/>
+      <l:template name="table" text="%n. t&#225;bl&#225;zat - %t"/>
+      <l:template name="task" text="%t" lang="en"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="" lang="en"/>
+      <l:template name="warning" text="%t"/>
+   </l:context>
+
+   <l:context name="title-unnumbered">
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article/appendix" text="%t" lang="en"/>
+      <l:template name="bridgehead" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="sect1" text="%t"/>
+      <l:template name="sect2" text="%t"/>
+      <l:template name="sect3" text="%t"/>
+      <l:template name="sect4" text="%t"/>
+      <l:template name="sect5" text="%t"/>
+      <l:template name="section" text="%t"/>
+      <l:template name="simplesect" text="%t"/>
+   </l:context>
+
+   <l:context name="title-numbered">
+      <l:template name="appendix" text="%n. f&#252;ggel&#233;k - %t"/>
+      <l:template name="article/appendix" text="%n.&#160;%t" lang="en"/>
+      <l:template name="bridgehead" text="%t"/>
+      <l:template name="chapter" text="%n. fejezet - %t"/>
+      <l:template name="sect1" text="%n. %t"/>
+      <l:template name="sect2" text="%n. %t"/>
+      <l:template name="sect3" text="%n. %t"/>
+      <l:template name="sect4" text="%n. %t"/>
+      <l:template name="sect5" text="%n. %t"/>
+      <l:template name="section" text="%n. %t"/>
+      <l:template name="simplesect" text="%n. %t"/>
+   </l:context>
+
+   <l:context name="subtitle">
+      <l:template name="appendix" text="%s"/>
+      <l:template name="article" text="%s"/>
+      <l:template name="bibliodiv" text="%s"/>
+      <l:template name="biblioentry" text="%s"/>
+      <l:template name="bibliography" text="%s"/>
+      <l:template name="bibliomixed" text="%s"/>
+      <l:template name="bibliomset" text="%s"/>
+      <l:template name="biblioset" text="%s"/>
+      <l:template name="book" text="%s"/>
+      <l:template name="chapter" text="%s"/>
+      <l:template name="colophon" text="%s"/>
+      <l:template name="dedication" text="%s"/>
+      <l:template name="glossary" text="%s"/>
+      <l:template name="glossdiv" text="%s"/>
+      <l:template name="index" text="%s"/>
+      <l:template name="indexdiv" text="%s"/>
+      <l:template name="lot" text="%s"/>
+      <l:template name="part" text="%s"/>
+      <l:template name="partintro" text="%s"/>
+      <l:template name="preface" text="%s"/>
+      <l:template name="refentry" text="%s"/>
+      <l:template name="reference" text="%s"/>
+      <l:template name="refsection" text="%s"/>
+      <l:template name="refsect1" text="%s"/>
+      <l:template name="refsect2" text="%s"/>
+      <l:template name="refsect3" text="%s"/>
+      <l:template name="refsynopsisdiv" text="%s"/>
+      <l:template name="sect1" text="%s"/>
+      <l:template name="sect2" text="%s"/>
+      <l:template name="sect3" text="%s"/>
+      <l:template name="sect4" text="%s"/>
+      <l:template name="sect5" text="%s"/>
+      <l:template name="section" text="%s"/>
+      <l:template name="set" text="%s"/>
+      <l:template name="setindex" text="%s"/>
+      <l:template name="sidebar" text="%s"/>
+      <l:template name="simplesect" text="%s"/>
+      <l:template name="toc" text="%s"/>
+   </l:context>
+
+   <l:context name="xref">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="V:&#160;%n"/>
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="constraintdef" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="%t"/>
+      <l:template name="example" text="%t"/>
+      <l:template name="figure" text="%t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text="%n"/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="%t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="K:&#160;%n"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="K:&#160;%n"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="table" text="%t"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="%n"/>
+      <l:template name="warning" text="%t"/>
+      <l:template name="page.citation" text=" [%p]"/>
+      <l:template name="page" text="(page %p)" lang="en"/>
+      <l:template name="pageabbrev" text="(p. %p)" lang="en"/>
+      <l:template name="Page" text="Page %p" lang="en"/>
+      <l:template name="bridgehead" text="&#8222;%t&#8221;"/>
+      <l:template name="refsection" text="&#8222;%t&#8221;"/>
+      <l:template name="refsect1" text="&#8222;%t&#8221;"/>
+      <l:template name="refsect2" text="&#8222;%t&#8221;"/>
+      <l:template name="refsect3" text="&#8222;%t&#8221;"/>
+      <l:template name="sect1" text="&#8222;%t&#8221;"/>
+      <l:template name="sect2" text="&#8222;%t&#8221;"/>
+      <l:template name="sect3" text="&#8222;%t&#8221;"/>
+      <l:template name="sect4" text="&#8222;%t&#8221;"/>
+      <l:template name="sect5" text="&#8222;%t&#8221;"/>
+      <l:template name="section" text="&#8222;%t&#8221;"/>
+      <l:template name="simplesect" text="&#8222;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="xref-number">
+      <l:template name="answer" text="V:&#160;%n"/>
+      <l:template name="appendix" text="%n. f&#252;ggel&#233;k"/>
+      <l:template name="bridgehead" text="Szakasz&#160;%n"/>
+      <l:template name="chapter" text="%n. fejezet"/>
+      <l:template name="equation" text="Egyenlet&#160;%n"/>
+      <l:template name="example" text="%n. p&#233;lda"/>
+      <l:template name="figure" text="%n. &#225;bra"/>
+      <l:template name="part" text="%n. r&#233;sz"/>
+      <l:template name="procedure" text="Elj&#225;r&#225;s&#160;%n"/>
+      <l:template name="productionset" text="Elemcsoport&#160;%n"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n"/>
+      <l:template name="qandaentry" text="K:&#160;%n"/>
+      <l:template name="question" text="K:&#160;%n"/>
+      <l:template name="sect1" text="%n. szakasz"/>
+      <l:template name="sect2" text="%n. szakasz"/>
+      <l:template name="sect3" text="%n. szakasz"/>
+      <l:template name="sect4" text="%n. szakasz"/>
+      <l:template name="sect5" text="%n. szakasz"/>
+      <l:template name="section" text="%n. szakasz"/>
+      <l:template name="table" text="T&#225;bl&#225;zat&#160;%n"/>
+   </l:context>
+
+   <l:context name="xref-number-and-title">
+      <l:template name="appendix" text="%n. f&#252;ggel&#233;k - %t"/>
+      <l:template name="bridgehead" text="Szakasz&#160;%n, &#8222;%t&#8221;"/>
+      <l:template name="chapter" text="%n. fejezet - %t"/>
+      <l:template name="equation" text="Egyenlet&#160;%n, &#8222;%t&#8221;"/>
+      <l:template name="example" text="%n. p&#233;lda - %t"/>
+      <l:template name="figure" text="%n. &#225;bra - %t"/>
+      <l:template name="part" text="%n. r&#233;sz - %t"/>
+      <l:template name="procedure" text="Elj&#225;r&#225;s&#160;%n, &#8222;%t&#8221;"/>
+      <l:template name="productionset" text="Elemcsoport&#160;%n, &#8222;%t&#8221;"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n, &#8222;%t&#8221;"/>
+      <l:template name="refsect1" text="&#8222;%t&#8221;"/>
+      <l:template name="refsect2" text="&#8222;%t&#8221;"/>
+      <l:template name="refsect3" text="&#8222;%t&#8221;"/>
+      <l:template name="refsection" text="&#8222;%t&#8221;"/>
+      <l:template name="sect1" text="%n. szakasz - %t"/>
+      <l:template name="sect2" text="%n. szakasz - %t"/>
+      <l:template name="sect3" text="%n. szakasz - %t"/>
+      <l:template name="sect4" text="%n. szakasz - %t"/>
+      <l:template name="sect5" text="%n. szakasz - %t"/>
+      <l:template name="section" text="%n. szakasz - %t"/>
+      <l:template name="simplesect" text="&#8222;%t&#8221;"/>
+      <l:template name="table" text="%n. t&#225;bl&#225;zat - %t"/>
+   </l:context>
+
+   <l:context name="authorgroup">
+      <l:template name="sep" text=", "/>
+      <l:template name="sep2" text=" &#233;s "/>
+      <l:template name="seplast" text=", &#233;s "/>
+   </l:context>
+
+   <l:context name="glossary">
+      <l:template name="see" text="L&#225;sd "/>
+      <l:template name="seealso" text="L&#225;sd m&#233;g "/>
+   </l:context>
+
+   <l:context name="msgset">
+      <l:template name="MsgAud" text="C&#233;lk&#246;z&#246;ns&#233;g: "/>
+      <l:template name="MsgLevel" text="Szint: "/>
+      <l:template name="MsgOrig" text="Eredet: "/>
+   </l:context>
+
+   <l:context name="datetime">
+      <l:template name="format" text="m/d/Y" lang="en"/>
+   </l:context>
+
+   <l:context name="datetime-full">
+      <l:template name="January" text="January" lang="en"/>
+      <l:template name="February" text="February" lang="en"/>
+      <l:template name="March" text="March" lang="en"/>
+      <l:template name="April" text="April" lang="en"/>
+      <l:template name="May" text="May" lang="en"/>
+      <l:template name="June" text="June" lang="en"/>
+      <l:template name="July" text="July" lang="en"/>
+      <l:template name="August" text="August" lang="en"/>
+      <l:template name="September" text="September" lang="en"/>
+      <l:template name="October" text="October" lang="en"/>
+      <l:template name="November" text="November" lang="en"/>
+      <l:template name="December" text="December" lang="en"/>
+      <l:template name="Monday" text="Monday" lang="en"/>
+      <l:template name="Tuesday" text="Tuesday" lang="en"/>
+      <l:template name="Wednesday" text="Wednesday" lang="en"/>
+      <l:template name="Thursday" text="Thursday" lang="en"/>
+      <l:template name="Friday" text="Friday" lang="en"/>
+      <l:template name="Saturday" text="Saturday" lang="en"/>
+      <l:template name="Sunday" text="Sunday" lang="en"/>
+   </l:context>
+
+   <l:context name="datetime-abbrev">
+      <l:template name="Jan" text="Jan" lang="en"/>
+      <l:template name="Feb" text="Feb" lang="en"/>
+      <l:template name="Mar" text="Mar" lang="en"/>
+      <l:template name="Apr" text="Apr" lang="en"/>
+      <l:template name="May" text="May" lang="en"/>
+      <l:template name="Jun" text="Jun" lang="en"/>
+      <l:template name="Jul" text="Jul" lang="en"/>
+      <l:template name="Aug" text="Aug" lang="en"/>
+      <l:template name="Sep" text="Sep" lang="en"/>
+      <l:template name="Oct" text="Oct" lang="en"/>
+      <l:template name="Nov" text="Nov" lang="en"/>
+      <l:template name="Dec" text="Dec" lang="en"/>
+      <l:template name="Mon" text="Mon" lang="en"/>
+      <l:template name="Tue" text="Tue" lang="en"/>
+      <l:template name="Wed" text="Wed" lang="en"/>
+      <l:template name="Thu" text="Thu" lang="en"/>
+      <l:template name="Fri" text="Fri" lang="en"/>
+      <l:template name="Sat" text="Sat" lang="en"/>
+      <l:template name="Sun" text="Sun" lang="en"/>
+   </l:context>
+
+   <l:context name="htmlhelp">
+      <l:template name="langcode" text="0x040e Hungarian"/>
+   </l:context>
+
+   <l:letters lang="en">
+      <l:l i="-1"/>
+      <l:l i="0">Symbols</l:l>
+      <l:l i="10">A</l:l>
+      <l:l i="10">a</l:l>
+      <l:l i="10">&#192;</l:l>
+      <l:l i="10">&#224;</l:l>
+      <l:l i="10">&#193;</l:l>
+      <l:l i="10">&#225;</l:l>
+      <l:l i="10">&#194;</l:l>
+      <l:l i="10">&#226;</l:l>
+      <l:l i="10">&#195;</l:l>
+      <l:l i="10">&#227;</l:l>
+      <l:l i="10">&#196;</l:l>
+      <l:l i="10">&#228;</l:l>
+      <l:l i="10">&#197;</l:l>
+      <l:l i="10">&#229;</l:l>
+      <l:l i="10">&#256;</l:l>
+      <l:l i="10">&#257;</l:l>
+      <l:l i="10">&#258;</l:l>
+      <l:l i="10">&#259;</l:l>
+      <l:l i="10">&#260;</l:l>
+      <l:l i="10">&#261;</l:l>
+      <l:l i="10">&#461;</l:l>
+      <l:l i="10">&#462;</l:l>
+      <l:l i="10">&#478;</l:l>
+      <l:l i="10">&#479;</l:l>
+      <l:l i="10">&#480;</l:l>
+      <l:l i="10">&#481;</l:l>
+      <l:l i="10">&#506;</l:l>
+      <l:l i="10">&#507;</l:l>
+      <l:l i="10">&#512;</l:l>
+      <l:l i="10">&#513;</l:l>
+      <l:l i="10">&#514;</l:l>
+      <l:l i="10">&#515;</l:l>
+      <l:l i="10">&#550;</l:l>
+      <l:l i="10">&#551;</l:l>
+      <l:l i="10">&#7680;</l:l>
+      <l:l i="10">&#7681;</l:l>
+      <l:l i="10">&#7834;</l:l>
+      <l:l i="10">&#7840;</l:l>
+      <l:l i="10">&#7841;</l:l>
+      <l:l i="10">&#7842;</l:l>
+      <l:l i="10">&#7843;</l:l>
+      <l:l i="10">&#7844;</l:l>
+      <l:l i="10">&#7845;</l:l>
+      <l:l i="10">&#7846;</l:l>
+      <l:l i="10">&#7847;</l:l>
+      <l:l i="10">&#7848;</l:l>
+      <l:l i="10">&#7849;</l:l>
+      <l:l i="10">&#7850;</l:l>
+      <l:l i="10">&#7851;</l:l>
+      <l:l i="10">&#7852;</l:l>
+      <l:l i="10">&#7853;</l:l>
+      <l:l i="10">&#7854;</l:l>
+      <l:l i="10">&#7855;</l:l>
+      <l:l i="10">&#7856;</l:l>
+      <l:l i="10">&#7857;</l:l>
+      <l:l i="10">&#7858;</l:l>
+      <l:l i="10">&#7859;</l:l>
+      <l:l i="10">&#7860;</l:l>
+      <l:l i="10">&#7861;</l:l>
+      <l:l i="10">&#7862;</l:l>
+      <l:l i="10">&#7863;</l:l>
+      <l:l i="20">B</l:l>
+      <l:l i="20">b</l:l>
+      <l:l i="20">&#384;</l:l>
+      <l:l i="20">&#385;</l:l>
+      <l:l i="20">&#595;</l:l>
+      <l:l i="20">&#386;</l:l>
+      <l:l i="20">&#387;</l:l>
+      <l:l i="20">&#7682;</l:l>
+      <l:l i="20">&#7683;</l:l>
+      <l:l i="20">&#7684;</l:l>
+      <l:l i="20">&#7685;</l:l>
+      <l:l i="20">&#7686;</l:l>
+      <l:l i="20">&#7687;</l:l>
+      <l:l i="30">C</l:l>
+      <l:l i="30">c</l:l>
+      <l:l i="30">&#199;</l:l>
+      <l:l i="30">&#231;</l:l>
+      <l:l i="30">&#262;</l:l>
+      <l:l i="30">&#263;</l:l>
+      <l:l i="30">&#264;</l:l>
+      <l:l i="30">&#265;</l:l>
+      <l:l i="30">&#266;</l:l>
+      <l:l i="30">&#267;</l:l>
+      <l:l i="30">&#268;</l:l>
+      <l:l i="30">&#269;</l:l>
+      <l:l i="30">&#391;</l:l>
+      <l:l i="30">&#392;</l:l>
+      <l:l i="30">&#597;</l:l>
+      <l:l i="30">&#7688;</l:l>
+      <l:l i="30">&#7689;</l:l>
+      <l:l i="40">D</l:l>
+      <l:l i="40">d</l:l>
+      <l:l i="40">&#270;</l:l>
+      <l:l i="40">&#271;</l:l>
+      <l:l i="40">&#272;</l:l>
+      <l:l i="40">&#273;</l:l>
+      <l:l i="40">&#394;</l:l>
+      <l:l i="40">&#599;</l:l>
+      <l:l i="40">&#395;</l:l>
+      <l:l i="40">&#396;</l:l>
+      <l:l i="40">&#453;</l:l>
+      <l:l i="40">&#498;</l:l>
+      <l:l i="40">&#545;</l:l>
+      <l:l i="40">&#598;</l:l>
+      <l:l i="40">&#7690;</l:l>
+      <l:l i="40">&#7691;</l:l>
+      <l:l i="40">&#7692;</l:l>
+      <l:l i="40">&#7693;</l:l>
+      <l:l i="40">&#7694;</l:l>
+      <l:l i="40">&#7695;</l:l>
+      <l:l i="40">&#7696;</l:l>
+      <l:l i="40">&#7697;</l:l>
+      <l:l i="40">&#7698;</l:l>
+      <l:l i="40">&#7699;</l:l>
+      <l:l i="50">E</l:l>
+      <l:l i="50">e</l:l>
+      <l:l i="50">&#200;</l:l>
+      <l:l i="50">&#232;</l:l>
+      <l:l i="50">&#201;</l:l>
+      <l:l i="50">&#233;</l:l>
+      <l:l i="50">&#202;</l:l>
+      <l:l i="50">&#234;</l:l>
+      <l:l i="50">&#203;</l:l>
+      <l:l i="50">&#235;</l:l>
+      <l:l i="50">&#274;</l:l>
+      <l:l i="50">&#275;</l:l>
+      <l:l i="50">&#276;</l:l>
+      <l:l i="50">&#277;</l:l>
+      <l:l i="50">&#278;</l:l>
+      <l:l i="50">&#279;</l:l>
+      <l:l i="50">&#280;</l:l>
+      <l:l i="50">&#281;</l:l>
+      <l:l i="50">&#282;</l:l>
+      <l:l i="50">&#283;</l:l>
+      <l:l i="50">&#516;</l:l>
+      <l:l i="50">&#517;</l:l>
+      <l:l i="50">&#518;</l:l>
+      <l:l i="50">&#519;</l:l>
+      <l:l i="50">&#552;</l:l>
+      <l:l i="50">&#553;</l:l>
+      <l:l i="50">&#7700;</l:l>
+      <l:l i="50">&#7701;</l:l>
+      <l:l i="50">&#7702;</l:l>
+      <l:l i="50">&#7703;</l:l>
+      <l:l i="50">&#7704;</l:l>
+      <l:l i="50">&#7705;</l:l>
+      <l:l i="50">&#7706;</l:l>
+      <l:l i="50">&#7707;</l:l>
+      <l:l i="50">&#7708;</l:l>
+      <l:l i="50">&#7709;</l:l>
+      <l:l i="50">&#7864;</l:l>
+      <l:l i="50">&#7865;</l:l>
+      <l:l i="50">&#7866;</l:l>
+      <l:l i="50">&#7867;</l:l>
+      <l:l i="50">&#7868;</l:l>
+      <l:l i="50">&#7869;</l:l>
+      <l:l i="50">&#7870;</l:l>
+      <l:l i="50">&#7871;</l:l>
+      <l:l i="50">&#7872;</l:l>
+      <l:l i="50">&#7873;</l:l>
+      <l:l i="50">&#7874;</l:l>
+      <l:l i="50">&#7875;</l:l>
+      <l:l i="50">&#7876;</l:l>
+      <l:l i="50">&#7877;</l:l>
+      <l:l i="50">&#7878;</l:l>
+      <l:l i="50">&#7879;</l:l>
+      <l:l i="60">F</l:l>
+      <l:l i="60">f</l:l>
+      <l:l i="60">&#401;</l:l>
+      <l:l i="60">&#402;</l:l>
+      <l:l i="60">&#7710;</l:l>
+      <l:l i="60">&#7711;</l:l>
+      <l:l i="70">G</l:l>
+      <l:l i="70">g</l:l>
+      <l:l i="70">&#284;</l:l>
+      <l:l i="70">&#285;</l:l>
+      <l:l i="70">&#286;</l:l>
+      <l:l i="70">&#287;</l:l>
+      <l:l i="70">&#288;</l:l>
+      <l:l i="70">&#289;</l:l>
+      <l:l i="70">&#290;</l:l>
+      <l:l i="70">&#291;</l:l>
+      <l:l i="70">&#403;</l:l>
+      <l:l i="70">&#608;</l:l>
+      <l:l i="70">&#484;</l:l>
+      <l:l i="70">&#485;</l:l>
+      <l:l i="70">&#486;</l:l>
+      <l:l i="70">&#487;</l:l>
+      <l:l i="70">&#500;</l:l>
+      <l:l i="70">&#501;</l:l>
+      <l:l i="70">&#7712;</l:l>
+      <l:l i="70">&#7713;</l:l>
+      <l:l i="80">H</l:l>
+      <l:l i="80">h</l:l>
+      <l:l i="80">&#292;</l:l>
+      <l:l i="80">&#293;</l:l>
+      <l:l i="80">&#294;</l:l>
+      <l:l i="80">&#295;</l:l>
+      <l:l i="80">&#542;</l:l>
+      <l:l i="80">&#543;</l:l>
+      <l:l i="80">&#614;</l:l>
+      <l:l i="80">&#7714;</l:l>
+      <l:l i="80">&#7715;</l:l>
+      <l:l i="80">&#7716;</l:l>
+      <l:l i="80">&#7717;</l:l>
+      <l:l i="80">&#7718;</l:l>
+      <l:l i="80">&#7719;</l:l>
+      <l:l i="80">&#7720;</l:l>
+      <l:l i="80">&#7721;</l:l>
+      <l:l i="80">&#7722;</l:l>
+      <l:l i="80">&#7723;</l:l>
+      <l:l i="80">&#7830;</l:l>
+      <l:l i="90">I</l:l>
+      <l:l i="90">i</l:l>
+      <l:l i="90">&#204;</l:l>
+      <l:l i="90">&#236;</l:l>
+      <l:l i="90">&#205;</l:l>
+      <l:l i="90">&#237;</l:l>
+      <l:l i="90">&#206;</l:l>
+      <l:l i="90">&#238;</l:l>
+      <l:l i="90">&#207;</l:l>
+      <l:l i="90">&#239;</l:l>
+      <l:l i="90">&#296;</l:l>
+      <l:l i="90">&#297;</l:l>
+      <l:l i="90">&#298;</l:l>
+      <l:l i="90">&#299;</l:l>
+      <l:l i="90">&#300;</l:l>
+      <l:l i="90">&#301;</l:l>
+      <l:l i="90">&#302;</l:l>
+      <l:l i="90">&#303;</l:l>
+      <l:l i="90">&#304;</l:l>
+      <l:l i="90">&#407;</l:l>
+      <l:l i="90">&#616;</l:l>
+      <l:l i="90">&#463;</l:l>
+      <l:l i="90">&#464;</l:l>
+      <l:l i="90">&#520;</l:l>
+      <l:l i="90">&#521;</l:l>
+      <l:l i="90">&#522;</l:l>
+      <l:l i="90">&#523;</l:l>
+      <l:l i="90">&#7724;</l:l>
+      <l:l i="90">&#7725;</l:l>
+      <l:l i="90">&#7726;</l:l>
+      <l:l i="90">&#7727;</l:l>
+      <l:l i="90">&#7880;</l:l>
+      <l:l i="90">&#7881;</l:l>
+      <l:l i="90">&#7882;</l:l>
+      <l:l i="90">&#7883;</l:l>
+      <l:l i="100">J</l:l>
+      <l:l i="100">j</l:l>
+      <l:l i="100">&#308;</l:l>
+      <l:l i="100">&#309;</l:l>
+      <l:l i="100">&#496;</l:l>
+      <l:l i="100">&#669;</l:l>
+      <l:l i="110">K</l:l>
+      <l:l i="110">k</l:l>
+      <l:l i="110">&#310;</l:l>
+      <l:l i="110">&#311;</l:l>
+      <l:l i="110">&#408;</l:l>
+      <l:l i="110">&#409;</l:l>
+      <l:l i="110">&#488;</l:l>
+      <l:l i="110">&#489;</l:l>
+      <l:l i="110">&#7728;</l:l>
+      <l:l i="110">&#7729;</l:l>
+      <l:l i="110">&#7730;</l:l>
+      <l:l i="110">&#7731;</l:l>
+      <l:l i="110">&#7732;</l:l>
+      <l:l i="110">&#7733;</l:l>
+      <l:l i="120">L</l:l>
+      <l:l i="120">l</l:l>
+      <l:l i="120">&#313;</l:l>
+      <l:l i="120">&#314;</l:l>
+      <l:l i="120">&#315;</l:l>
+      <l:l i="120">&#316;</l:l>
+      <l:l i="120">&#317;</l:l>
+      <l:l i="120">&#318;</l:l>
+      <l:l i="120">&#319;</l:l>
+      <l:l i="120">&#320;</l:l>
+      <l:l i="120">&#321;</l:l>
+      <l:l i="120">&#322;</l:l>
+      <l:l i="120">&#410;</l:l>
+      <l:l i="120">&#456;</l:l>
+      <l:l i="120">&#564;</l:l>
+      <l:l i="120">&#619;</l:l>
+      <l:l i="120">&#620;</l:l>
+      <l:l i="120">&#621;</l:l>
+      <l:l i="120">&#7734;</l:l>
+      <l:l i="120">&#7735;</l:l>
+      <l:l i="120">&#7736;</l:l>
+      <l:l i="120">&#7737;</l:l>
+      <l:l i="120">&#7738;</l:l>
+      <l:l i="120">&#7739;</l:l>
+      <l:l i="120">&#7740;</l:l>
+      <l:l i="120">&#7741;</l:l>
+      <l:l i="130">M</l:l>
+      <l:l i="130">m</l:l>
+      <l:l i="130">&#625;</l:l>
+      <l:l i="130">&#7742;</l:l>
+      <l:l i="130">&#7743;</l:l>
+      <l:l i="130">&#7744;</l:l>
+      <l:l i="130">&#7745;</l:l>
+      <l:l i="130">&#7746;</l:l>
+      <l:l i="130">&#7747;</l:l>
+      <l:l i="140">N</l:l>
+      <l:l i="140">n</l:l>
+      <l:l i="140">&#209;</l:l>
+      <l:l i="140">&#241;</l:l>
+      <l:l i="140">&#323;</l:l>
+      <l:l i="140">&#324;</l:l>
+      <l:l i="140">&#325;</l:l>
+      <l:l i="140">&#326;</l:l>
+      <l:l i="140">&#327;</l:l>
+      <l:l i="140">&#328;</l:l>
+      <l:l i="140">&#413;</l:l>
+      <l:l i="140">&#626;</l:l>
+      <l:l i="140">&#414;</l:l>
+      <l:l i="140">&#544;</l:l>
+      <l:l i="140">&#459;</l:l>
+      <l:l i="140">&#504;</l:l>
+      <l:l i="140">&#505;</l:l>
+      <l:l i="140">&#565;</l:l>
+      <l:l i="140">&#627;</l:l>
+      <l:l i="140">&#7748;</l:l>
+      <l:l i="140">&#7749;</l:l>
+      <l:l i="140">&#7750;</l:l>
+      <l:l i="140">&#7751;</l:l>
+      <l:l i="140">&#7752;</l:l>
+      <l:l i="140">&#7753;</l:l>
+      <l:l i="140">&#7754;</l:l>
+      <l:l i="140">&#7755;</l:l>
+      <l:l i="150">O</l:l>
+      <l:l i="150">o</l:l>
+      <l:l i="150">&#210;</l:l>
+      <l:l i="150">&#242;</l:l>
+      <l:l i="150">&#211;</l:l>
+      <l:l i="150">&#243;</l:l>
+      <l:l i="150">&#212;</l:l>
+      <l:l i="150">&#244;</l:l>
+      <l:l i="150">&#213;</l:l>
+      <l:l i="150">&#245;</l:l>
+      <l:l i="150">&#214;</l:l>
+      <l:l i="150">&#246;</l:l>
+      <l:l i="150">&#216;</l:l>
+      <l:l i="150">&#248;</l:l>
+      <l:l i="150">&#332;</l:l>
+      <l:l i="150">&#333;</l:l>
+      <l:l i="150">&#334;</l:l>
+      <l:l i="150">&#335;</l:l>
+      <l:l i="150">&#336;</l:l>
+      <l:l i="150">&#337;</l:l>
+      <l:l i="150">&#415;</l:l>
+      <l:l i="150">&#416;</l:l>
+      <l:l i="150">&#417;</l:l>
+      <l:l i="150">&#465;</l:l>
+      <l:l i="150">&#466;</l:l>
+      <l:l i="150">&#490;</l:l>
+      <l:l i="150">&#491;</l:l>
+      <l:l i="150">&#492;</l:l>
+      <l:l i="150">&#493;</l:l>
+      <l:l i="150">&#510;</l:l>
+      <l:l i="150">&#511;</l:l>
+      <l:l i="150">&#524;</l:l>
+      <l:l i="150">&#525;</l:l>
+      <l:l i="150">&#526;</l:l>
+      <l:l i="150">&#527;</l:l>
+      <l:l i="150">&#554;</l:l>
+      <l:l i="150">&#555;</l:l>
+      <l:l i="150">&#556;</l:l>
+      <l:l i="150">&#557;</l:l>
+      <l:l i="150">&#558;</l:l>
+      <l:l i="150">&#559;</l:l>
+      <l:l i="150">&#560;</l:l>
+      <l:l i="150">&#561;</l:l>
+      <l:l i="150">&#7756;</l:l>
+      <l:l i="150">&#7757;</l:l>
+      <l:l i="150">&#7758;</l:l>
+      <l:l i="150">&#7759;</l:l>
+      <l:l i="150">&#7760;</l:l>
+      <l:l i="150">&#7761;</l:l>
+      <l:l i="150">&#7762;</l:l>
+      <l:l i="150">&#7763;</l:l>
+      <l:l i="150">&#7884;</l:l>
+      <l:l i="150">&#7885;</l:l>
+      <l:l i="150">&#7886;</l:l>
+      <l:l i="150">&#7887;</l:l>
+      <l:l i="150">&#7888;</l:l>
+      <l:l i="150">&#7889;</l:l>
+      <l:l i="150">&#7890;</l:l>
+      <l:l i="150">&#7891;</l:l>
+      <l:l i="150">&#7892;</l:l>
+      <l:l i="150">&#7893;</l:l>
+      <l:l i="150">&#7894;</l:l>
+      <l:l i="150">&#7895;</l:l>
+      <l:l i="150">&#7896;</l:l>
+      <l:l i="150">&#7897;</l:l>
+      <l:l i="150">&#7898;</l:l>
+      <l:l i="150">&#7899;</l:l>
+      <l:l i="150">&#7900;</l:l>
+      <l:l i="150">&#7901;</l:l>
+      <l:l i="150">&#7902;</l:l>
+      <l:l i="150">&#7903;</l:l>
+      <l:l i="150">&#7904;</l:l>
+      <l:l i="150">&#7905;</l:l>
+      <l:l i="150">&#7906;</l:l>
+      <l:l i="150">&#7907;</l:l>
+      <l:l i="160">P</l:l>
+      <l:l i="160">p</l:l>
+      <l:l i="160">&#420;</l:l>
+      <l:l i="160">&#421;</l:l>
+      <l:l i="160">&#7764;</l:l>
+      <l:l i="160">&#7765;</l:l>
+      <l:l i="160">&#7766;</l:l>
+      <l:l i="160">&#7767;</l:l>
+      <l:l i="170">Q</l:l>
+      <l:l i="170">q</l:l>
+      <l:l i="170">&#672;</l:l>
+      <l:l i="180">R</l:l>
+      <l:l i="180">r</l:l>
+      <l:l i="180">&#340;</l:l>
+      <l:l i="180">&#341;</l:l>
+      <l:l i="180">&#342;</l:l>
+      <l:l i="180">&#343;</l:l>
+      <l:l i="180">&#344;</l:l>
+      <l:l i="180">&#345;</l:l>
+      <l:l i="180">&#528;</l:l>
+      <l:l i="180">&#529;</l:l>
+      <l:l i="180">&#530;</l:l>
+      <l:l i="180">&#531;</l:l>
+      <l:l i="180">&#636;</l:l>
+      <l:l i="180">&#637;</l:l>
+      <l:l i="180">&#638;</l:l>
+      <l:l i="180">&#7768;</l:l>
+      <l:l i="180">&#7769;</l:l>
+      <l:l i="180">&#7770;</l:l>
+      <l:l i="180">&#7771;</l:l>
+      <l:l i="180">&#7772;</l:l>
+      <l:l i="180">&#7773;</l:l>
+      <l:l i="180">&#7774;</l:l>
+      <l:l i="180">&#7775;</l:l>
+      <l:l i="190">S</l:l>
+      <l:l i="190">s</l:l>
+      <l:l i="190">&#346;</l:l>
+      <l:l i="190">&#347;</l:l>
+      <l:l i="190">&#348;</l:l>
+      <l:l i="190">&#349;</l:l>
+      <l:l i="190">&#350;</l:l>
+      <l:l i="190">&#351;</l:l>
+      <l:l i="190">&#352;</l:l>
+      <l:l i="190">&#353;</l:l>
+      <l:l i="190">&#536;</l:l>
+      <l:l i="190">&#537;</l:l>
+      <l:l i="190">&#642;</l:l>
+      <l:l i="190">&#7776;</l:l>
+      <l:l i="190">&#7777;</l:l>
+      <l:l i="190">&#7778;</l:l>
+      <l:l i="190">&#7779;</l:l>
+      <l:l i="190">&#7780;</l:l>
+      <l:l i="190">&#7781;</l:l>
+      <l:l i="190">&#7782;</l:l>
+      <l:l i="190">&#7783;</l:l>
+      <l:l i="190">&#7784;</l:l>
+      <l:l i="190">&#7785;</l:l>
+      <l:l i="200">T</l:l>
+      <l:l i="200">t</l:l>
+      <l:l i="200">&#354;</l:l>
+      <l:l i="200">&#355;</l:l>
+      <l:l i="200">&#356;</l:l>
+      <l:l i="200">&#357;</l:l>
+      <l:l i="200">&#358;</l:l>
+      <l:l i="200">&#359;</l:l>
+      <l:l i="200">&#427;</l:l>
+      <l:l i="200">&#428;</l:l>
+      <l:l i="200">&#429;</l:l>
+      <l:l i="200">&#430;</l:l>
+      <l:l i="200">&#648;</l:l>
+      <l:l i="200">&#538;</l:l>
+      <l:l i="200">&#539;</l:l>
+      <l:l i="200">&#566;</l:l>
+      <l:l i="200">&#7786;</l:l>
+      <l:l i="200">&#7787;</l:l>
+      <l:l i="200">&#7788;</l:l>
+      <l:l i="200">&#7789;</l:l>
+      <l:l i="200">&#7790;</l:l>
+      <l:l i="200">&#7791;</l:l>
+      <l:l i="200">&#7792;</l:l>
+      <l:l i="200">&#7793;</l:l>
+      <l:l i="200">&#7831;</l:l>
+      <l:l i="210">U</l:l>
+      <l:l i="210">u</l:l>
+      <l:l i="210">&#217;</l:l>
+      <l:l i="210">&#249;</l:l>
+      <l:l i="210">&#218;</l:l>
+      <l:l i="210">&#250;</l:l>
+      <l:l i="210">&#219;</l:l>
+      <l:l i="210">&#251;</l:l>
+      <l:l i="210">&#220;</l:l>
+      <l:l i="210">&#252;</l:l>
+      <l:l i="210">&#360;</l:l>
+      <l:l i="210">&#361;</l:l>
+      <l:l i="210">&#362;</l:l>
+      <l:l i="210">&#363;</l:l>
+      <l:l i="210">&#364;</l:l>
+      <l:l i="210">&#365;</l:l>
+      <l:l i="210">&#366;</l:l>
+      <l:l i="210">&#367;</l:l>
+      <l:l i="210">&#368;</l:l>
+      <l:l i="210">&#369;</l:l>
+      <l:l i="210">&#370;</l:l>
+      <l:l i="210">&#371;</l:l>
+      <l:l i="210">&#431;</l:l>
+      <l:l i="210">&#432;</l:l>
+      <l:l i="210">&#467;</l:l>
+      <l:l i="210">&#468;</l:l>
+      <l:l i="210">&#469;</l:l>
+      <l:l i="210">&#470;</l:l>
+      <l:l i="210">&#471;</l:l>
+      <l:l i="210">&#472;</l:l>
+      <l:l i="210">&#473;</l:l>
+      <l:l i="210">&#474;</l:l>
+      <l:l i="210">&#475;</l:l>
+      <l:l i="210">&#476;</l:l>
+      <l:l i="210">&#532;</l:l>
+      <l:l i="210">&#533;</l:l>
+      <l:l i="210">&#534;</l:l>
+      <l:l i="210">&#535;</l:l>
+      <l:l i="210">&#7794;</l:l>
+      <l:l i="210">&#7795;</l:l>
+      <l:l i="210">&#7796;</l:l>
+      <l:l i="210">&#7797;</l:l>
+      <l:l i="210">&#7798;</l:l>
+      <l:l i="210">&#7799;</l:l>
+      <l:l i="210">&#7800;</l:l>
+      <l:l i="210">&#7801;</l:l>
+      <l:l i="210">&#7802;</l:l>
+      <l:l i="210">&#7803;</l:l>
+      <l:l i="210">&#7908;</l:l>
+      <l:l i="210">&#7909;</l:l>
+      <l:l i="210">&#7910;</l:l>
+      <l:l i="210">&#7911;</l:l>
+      <l:l i="210">&#7912;</l:l>
+      <l:l i="210">&#7913;</l:l>
+      <l:l i="210">&#7914;</l:l>
+      <l:l i="210">&#7915;</l:l>
+      <l:l i="210">&#7916;</l:l>
+      <l:l i="210">&#7917;</l:l>
+      <l:l i="210">&#7918;</l:l>
+      <l:l i="210">&#7919;</l:l>
+      <l:l i="210">&#7920;</l:l>
+      <l:l i="210">&#7921;</l:l>
+      <l:l i="220">V</l:l>
+      <l:l i="220">v</l:l>
+      <l:l i="220">&#434;</l:l>
+      <l:l i="220">&#651;</l:l>
+      <l:l i="220">&#7804;</l:l>
+      <l:l i="220">&#7805;</l:l>
+      <l:l i="220">&#7806;</l:l>
+      <l:l i="220">&#7807;</l:l>
+      <l:l i="230">W</l:l>
+      <l:l i="230">w</l:l>
+      <l:l i="230">&#372;</l:l>
+      <l:l i="230">&#373;</l:l>
+      <l:l i="230">&#7808;</l:l>
+      <l:l i="230">&#7809;</l:l>
+      <l:l i="230">&#7810;</l:l>
+      <l:l i="230">&#7811;</l:l>
+      <l:l i="230">&#7812;</l:l>
+      <l:l i="230">&#7813;</l:l>
+      <l:l i="230">&#7814;</l:l>
+      <l:l i="230">&#7815;</l:l>
+      <l:l i="230">&#7816;</l:l>
+      <l:l i="230">&#7817;</l:l>
+      <l:l i="230">&#7832;</l:l>
+      <l:l i="240">X</l:l>
+      <l:l i="240">x</l:l>
+      <l:l i="240">&#7818;</l:l>
+      <l:l i="240">&#7819;</l:l>
+      <l:l i="240">&#7820;</l:l>
+      <l:l i="240">&#7821;</l:l>
+      <l:l i="250">Y</l:l>
+      <l:l i="250">y</l:l>
+      <l:l i="250">&#221;</l:l>
+      <l:l i="250">&#253;</l:l>
+      <l:l i="250">&#255;</l:l>
+      <l:l i="250">&#376;</l:l>
+      <l:l i="250">&#374;</l:l>
+      <l:l i="250">&#375;</l:l>
+      <l:l i="250">&#435;</l:l>
+      <l:l i="250">&#436;</l:l>
+      <l:l i="250">&#562;</l:l>
+      <l:l i="250">&#563;</l:l>
+      <l:l i="250">&#7822;</l:l>
+      <l:l i="250">&#7823;</l:l>
+      <l:l i="250">&#7833;</l:l>
+      <l:l i="250">&#7922;</l:l>
+      <l:l i="250">&#7923;</l:l>
+      <l:l i="250">&#7924;</l:l>
+      <l:l i="250">&#7925;</l:l>
+      <l:l i="250">&#7926;</l:l>
+      <l:l i="250">&#7927;</l:l>
+      <l:l i="250">&#7928;</l:l>
+      <l:l i="250">&#7929;</l:l>
+      <l:l i="260">Z</l:l>
+      <l:l i="260">z</l:l>
+      <l:l i="260">&#377;</l:l>
+      <l:l i="260">&#378;</l:l>
+      <l:l i="260">&#379;</l:l>
+      <l:l i="260">&#380;</l:l>
+      <l:l i="260">&#381;</l:l>
+      <l:l i="260">&#382;</l:l>
+      <l:l i="260">&#437;</l:l>
+      <l:l i="260">&#438;</l:l>
+      <l:l i="260">&#548;</l:l>
+      <l:l i="260">&#549;</l:l>
+      <l:l i="260">&#656;</l:l>
+      <l:l i="260">&#657;</l:l>
+      <l:l i="260">&#7824;</l:l>
+      <l:l i="260">&#7825;</l:l>
+      <l:l i="260">&#7826;</l:l>
+      <l:l i="260">&#7827;</l:l>
+      <l:l i="260">&#7828;</l:l>
+      <l:l i="260">&#7829;</l:l>
+   </l:letters>
+</l:l10n>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/id.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/id.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/id.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1153 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="id" english-language-name="Indonesian">
+
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+   <l:gentext key="Abstract" text="Abstrak"/>
+   <l:gentext key="abstract" text="Abstrak"/>
+   <l:gentext key="Answer" text="Jawab:"/>
+   <l:gentext key="answer" text="Jawab:"/>
+   <l:gentext key="Appendix" text="Lampiran"/>
+   <l:gentext key="appendix" text="lampiran"/>
+   <l:gentext key="Article" text="Artikel"/>
+   <l:gentext key="article" text="Artikel"/>
+   <l:gentext key="Bibliography" text="Bibliografi"/>
+   <l:gentext key="bibliography" text="Bibliografi"/>
+   <l:gentext key="Book" text="Buku"/>
+   <l:gentext key="book" text="Buku"/>
+   <l:gentext key="CAUTION" text="PERHATIAN"/>
+   <l:gentext key="Caution" text="Perhatian"/>
+   <l:gentext key="caution" text="Perhatian"/>
+   <l:gentext key="Chapter" text="Bab"/>
+   <l:gentext key="chapter" text="bab"/>
+   <l:gentext key="Colophon" text="Kolofon"/>
+   <l:gentext key="colophon" text="Kolofon"/>
+   <l:gentext key="Copyright" text="Hak Cipta"/>
+   <l:gentext key="copyright" text="Hak Cipta"/>
+   <l:gentext key="Dedication" text="Dedikasi"/>
+   <l:gentext key="dedication" text="Dedikasi"/>
+   <l:gentext key="Edition" text="Edisi"/>
+   <l:gentext key="edition" text="Edisi"/>
+   <l:gentext key="Equation" text="Persamaan"/>
+   <l:gentext key="equation" text="Persamaan"/>
+   <l:gentext key="Example" text="Teladan"/>
+   <l:gentext key="example" text="Teladan"/>
+   <l:gentext key="Figure" text="Gambar"/>
+   <l:gentext key="figure" text="Gambar"/>
+   <l:gentext key="Glossary" text="Daftar Istilah"/>
+   <l:gentext key="glossary" text="Daftar Istilah"/>
+   <l:gentext key="GlossSee" text="Lihat"/>
+   <l:gentext key="glosssee" text="Lihat"/>
+   <l:gentext key="GlossSeeAlso" text="Lihat Juga"/>
+   <l:gentext key="glossseealso" text="Lihat Juga"/>
+   <l:gentext key="IMPORTANT" text="PENTING"/>
+   <l:gentext key="important" text="Penting"/>
+   <l:gentext key="Important" text="Penting"/>
+   <l:gentext key="Index" text="Indeks"/>
+   <l:gentext key="index" text="Indeks"/>
+   <l:gentext key="ISBN" text="ISBN"/>
+   <l:gentext key="isbn" text="ISBN"/>
+   <l:gentext key="LegalNotice" text="Aspek Hukum"/>
+   <l:gentext key="legalnotice" text="Aspek Hukum"/>
+   <l:gentext key="MsgAud" text="Pemirsa"/>
+   <l:gentext key="msgaud" text="Pemirsa"/>
+   <l:gentext key="MsgLevel" text="Tingkatan"/>
+   <l:gentext key="msglevel" text="Tingkatan"/>
+   <l:gentext key="MsgOrig" text="Asal"/>
+   <l:gentext key="msgorig" text="Asal"/>
+   <l:gentext key="NOTE" text="CATATAN"/>
+   <l:gentext key="Note" text="Catatan"/>
+   <l:gentext key="note" text="Catatan"/>
+   <l:gentext key="Part" text="Bagian"/>
+   <l:gentext key="part" text="Bagian"/>
+   <l:gentext key="Preface" text="Kata Pengantar"/>
+   <l:gentext key="preface" text="Kata Pengantar"/>
+   <l:gentext key="Procedure" text="Prosedur"/>
+   <l:gentext key="procedure" text="Prosedur"/>
+   <l:gentext key="ProductionSet" text="Production"/>
+   <l:gentext key="PubDate" text="Publication Date" lang="en"/>
+   <l:gentext key="pubdate" text="Publication date" lang="en"/>
+   <l:gentext key="Published" text="Diterbitkan"/>
+   <l:gentext key="published" text="Diterbitkan"/>
+   <l:gentext key="Qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="Question" text="Tanya:"/>
+   <l:gentext key="question" text="Tanya:"/>
+   <l:gentext key="RefEntry" text=""/>
+   <l:gentext key="refentry" text=""/>
+   <l:gentext key="Reference" text="Referensi"/>
+   <l:gentext key="reference" text="Referensi"/>
+   <l:gentext key="RefName" text="Nama"/>
+   <l:gentext key="refname" text="Nama"/>
+   <l:gentext key="RefSection" text=""/>
+   <l:gentext key="refsection" text=""/>
+   <l:gentext key="RefSynopsisDiv" text="Sinopsis"/>
+   <l:gentext key="refsynopsisdiv" text="Sinopsis"/>
+   <l:gentext key="RevHistory" text="Catatan Revisi"/>
+   <l:gentext key="revhistory" text="Catatan Revisi"/>
+   <l:gentext key="revision" text="Revisi"/>
+   <l:gentext key="Revision" text="Revisi"/>
+   <l:gentext key="sect1" text="Bagian"/>
+   <l:gentext key="sect2" text="Bagian"/>
+   <l:gentext key="sect3" text="Bagian"/>
+   <l:gentext key="sect4" text="Bagian"/>
+   <l:gentext key="sect5" text="Bagian"/>
+   <l:gentext key="section" text="bagian"/>
+   <l:gentext key="Section" text="Bagian"/>
+   <l:gentext key="see" text="Lihat"/>
+   <l:gentext key="See" text="Lihat"/>
+   <l:gentext key="seealso" text="Lihat Juga"/>
+   <l:gentext key="Seealso" text="Lihat juga"/>
+   <l:gentext key="SeeAlso" text="Lihat Juga"/>
+   <l:gentext key="set" text="Set"/>
+   <l:gentext key="Set" text="Set"/>
+   <l:gentext key="setindex" text="Indeks Set"/>
+   <l:gentext key="SetIndex" text="Indeks Set"/>
+   <l:gentext key="Sidebar" text=""/>
+   <l:gentext key="sidebar" text="sidebar"/>
+   <l:gentext key="step" text="tahap"/>
+   <l:gentext key="Step" text="Tahap"/>
+   <l:gentext key="Table" text="Tabel"/>
+   <l:gentext key="table" text="Tabel"/>
+   <l:gentext key="tip" text="Tip"/>
+   <l:gentext key="TIP" text="TIP"/>
+   <l:gentext key="Tip" text="Tip"/>
+   <l:gentext key="Warning" text="Awas"/>
+   <l:gentext key="warning" text="Awas"/>
+   <l:gentext key="WARNING" text="AWAS"/>
+   <l:gentext key="and" text="dan"/>
+   <l:gentext key="by" text="oleh"/>
+   <l:gentext key="called" text="called" lang="en"/>
+   <l:gentext key="Edited" text="disunting"/>
+   <l:gentext key="edited" text="disunting"/>
+   <l:gentext key="Editedby" text="disunting oleh"/>
+   <l:gentext key="editedby" text="disunting oleh"/>
+   <l:gentext key="in" text="di"/>
+   <l:gentext key="lastlistcomma" text=","/>
+   <l:gentext key="listcomma" text=","/>
+   <l:gentext key="nonexistantelement" text="elemen tak tampak"/>
+   <l:gentext key="notes" text="Catatan"/>
+   <l:gentext key="Notes" text="Catatan"/>
+   <l:gentext key="Pgs" text="Hal."/>
+   <l:gentext key="pgs" text="Hal."/>
+   <l:gentext key="Revisedby" text="Direvisi oleh: "/>
+   <l:gentext key="revisedby" text="Direvisi oleh: "/>
+   <l:gentext key="TableNotes" text="Catatan"/>
+   <l:gentext key="tablenotes" text="Catatan"/>
+   <l:gentext key="TableofContents" text="Daftar Isi"/>
+   <l:gentext key="tableofcontents" text="Daftar Isi"/>
+   <l:gentext key="the" text="" lang="en"/>
+   <l:gentext key="unexpectedelementname" text="Nama Elemen seharusnya tidak ada"/>
+   <l:gentext key="unsupported" text="tidak didukung"/>
+   <l:gentext key="xrefto" text="xref ke"/>
+   <l:gentext key="listofequations" text="Daftar Persamaan"/>
+   <l:gentext key="ListofEquations" text="Daftar Persamaan"/>
+   <l:gentext key="ListofExamples" text="Daftar Teladan"/>
+   <l:gentext key="listofexamples" text="Daftar Teladan"/>
+   <l:gentext key="ListofFigures" text="Daftar Gambar"/>
+   <l:gentext key="listoffigures" text="Daftar Gambar"/>
+   <l:gentext key="ListofProcedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listofprocedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listoftables" text="Daftar Tabel"/>
+   <l:gentext key="ListofTables" text="Daftar Tabel"/>
+   <l:gentext key="ListofUnknown" text="Daftar Gaib"/>
+   <l:gentext key="listofunknown" text="Daftar Gaib"/>
+   <l:gentext key="nav-home" text="Depan"/>
+   <l:gentext key="nav-next" text="Lanjut"/>
+   <l:gentext key="nav-next-sibling" text="Lewati"/>
+   <l:gentext key="nav-prev" text="Kembali"/>
+   <l:gentext key="nav-prev-sibling" text="Sebelumnya"/>
+   <l:gentext key="nav-up" text="Induk"/>
+   <l:gentext key="nav-toc" text="ToC" lang="en"/>
+   <l:gentext key="Draft" text="Draft"/>
+   <l:gentext key="above" text="above"/>
+   <l:gentext key="below" text="below"/>
+   <l:gentext key="sectioncalled" text="the section called"/>
+   <l:gentext key="index symbols" text="Symbols"/>
+   <l:gentext key="lowercase.alpha" text="abcdefghijklmnopqrstuvwxyz"/>
+   <l:gentext key="uppercase.alpha" text="ABCDEFGHIJKLMNOPQRSTUVWXYZ"/>
+   <l:dingbat key="startquote" text="&#8220;"/>
+   <l:dingbat key="endquote" text="&#8221;"/>
+   <l:dingbat key="nestedstartquote" text="&#8216;"/>
+   <l:dingbat key="nestedendquote" text="&#8217;"/>
+   <l:dingbat key="singlestartquote" text="&#8216;" lang="en"/>
+   <l:dingbat key="singleendquote" text="&#8217;" lang="en"/>
+   <l:dingbat key="bullet" text="&#8226;"/>
+   <l:gentext key="hyphenation-character" text="-" lang="en"/>
+   <l:gentext key="hyphenation-push-character-count" text="2" lang="en"/>
+   <l:gentext key="hyphenation-remain-character-count" text="2" lang="en"/>
+
+   <l:context name="styles">
+      <l:template name="person-name" text="first-last"/>
+   </l:context>
+
+   <l:context name="title">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="%t"/>
+      <l:template name="appendix" text="Lampiran %n. %t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="biblioentry" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliolist" text="%t" lang="en"/>
+      <l:template name="bibliomixed" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="Bab %n. %t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="Persamaan %n. %t"/>
+      <l:template name="example" text="Teladan %n. %t"/>
+      <l:template name="figure" text="Gambar %n. %t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="glosslist" text="%t" lang="en"/>
+      <l:template name="glossentry" text="%t" lang="en"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text=""/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="Bagian %n. %t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="procedure.formal" text="Prosedur&#160;%n.&#160;%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="productionset.formal" text="Production&#160;%n"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="%t"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="%t"/>
+      <l:template name="refentry" text="%t"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsection" text="%t"/>
+      <l:template name="refsect1" text="%t"/>
+      <l:template name="refsect2" text="%t"/>
+      <l:template name="refsect3" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="refsynopsisdivinfo" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="step" text="%t"/>
+      <l:template name="table" text="Tabel %n. %t"/>
+      <l:template name="task" text="%t" lang="en"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="" lang="en"/>
+      <l:template name="warning" text="%t"/>
+   </l:context>
+
+   <l:context name="title-unnumbered">
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article/appendix" text="%t" lang="en"/>
+      <l:template name="bridgehead" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="sect1" text="%t"/>
+      <l:template name="sect2" text="%t"/>
+      <l:template name="sect3" text="%t"/>
+      <l:template name="sect4" text="%t"/>
+      <l:template name="sect5" text="%t"/>
+      <l:template name="section" text="%t"/>
+      <l:template name="simplesect" text="%t"/>
+   </l:context>
+
+   <l:context name="title-numbered">
+      <l:template name="appendix" text="Lampiran %n. %t"/>
+      <l:template name="article/appendix" text="%n.&#160;%t" lang="en"/>
+      <l:template name="bridgehead" text="%t"/>
+      <l:template name="chapter" text="Bab %n. %t"/>
+      <l:template name="sect1" text="%n. %t"/>
+      <l:template name="sect2" text="%n. %t"/>
+      <l:template name="sect3" text="%n. %t"/>
+      <l:template name="sect4" text="%n. %t"/>
+      <l:template name="sect5" text="%n. %t"/>
+      <l:template name="section" text="%n. %t"/>
+      <l:template name="simplesect" text="%n. %t"/>
+   </l:context>
+
+   <l:context name="subtitle">
+      <l:template name="appendix" text="%s"/>
+      <l:template name="article" text="%s"/>
+      <l:template name="bibliodiv" text="%s"/>
+      <l:template name="biblioentry" text="%s"/>
+      <l:template name="bibliography" text="%s"/>
+      <l:template name="bibliomixed" text="%s"/>
+      <l:template name="bibliomset" text="%s"/>
+      <l:template name="biblioset" text="%s"/>
+      <l:template name="book" text="%s"/>
+      <l:template name="chapter" text="%s"/>
+      <l:template name="colophon" text="%s"/>
+      <l:template name="dedication" text="%s"/>
+      <l:template name="glossary" text="%s"/>
+      <l:template name="glossdiv" text="%s"/>
+      <l:template name="index" text="%s"/>
+      <l:template name="indexdiv" text="%s"/>
+      <l:template name="lot" text="%s"/>
+      <l:template name="part" text="%s"/>
+      <l:template name="partintro" text="%s"/>
+      <l:template name="preface" text="%s"/>
+      <l:template name="refentry" text="%s"/>
+      <l:template name="reference" text="%s"/>
+      <l:template name="refsection" text="%s"/>
+      <l:template name="refsect1" text="%s"/>
+      <l:template name="refsect2" text="%s"/>
+      <l:template name="refsect3" text="%s"/>
+      <l:template name="refsynopsisdiv" text="%s"/>
+      <l:template name="sect1" text="%s"/>
+      <l:template name="sect2" text="%s"/>
+      <l:template name="sect3" text="%s"/>
+      <l:template name="sect4" text="%s"/>
+      <l:template name="sect5" text="%s"/>
+      <l:template name="section" text="%s"/>
+      <l:template name="set" text="%s"/>
+      <l:template name="setindex" text="%s"/>
+      <l:template name="sidebar" text="%s"/>
+      <l:template name="simplesect" text="%s"/>
+      <l:template name="toc" text="%s"/>
+   </l:context>
+
+   <l:context name="xref">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="Jawab:&#160;%n"/>
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="constraintdef" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="%t"/>
+      <l:template name="example" text="%t"/>
+      <l:template name="figure" text="%t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text="%n"/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="%t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="Tanya:&#160;%n"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="Tanya:&#160;%n"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="table" text="%t"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="%n"/>
+      <l:template name="warning" text="%t"/>
+      <l:template name="page.citation" text=" [%p]"/>
+      <l:template name="page" text="(page %p)" lang="en"/>
+      <l:template name="pageabbrev" text="(p. %p)" lang="en"/>
+      <l:template name="Page" text="Page %p" lang="en"/>
+      <l:template name="bridgehead" text="&#8220;%t&#8221;"/>
+      <l:template name="refsection" text="&#8220;%t&#8221;"/>
+      <l:template name="refsect1" text="&#8220;%t&#8221;"/>
+      <l:template name="refsect2" text="&#8220;%t&#8221;"/>
+      <l:template name="refsect3" text="&#8220;%t&#8221;"/>
+      <l:template name="sect1" text="&#8220;%t&#8221;"/>
+      <l:template name="sect2" text="&#8220;%t&#8221;"/>
+      <l:template name="sect3" text="&#8220;%t&#8221;"/>
+      <l:template name="sect4" text="&#8220;%t&#8221;"/>
+      <l:template name="sect5" text="&#8220;%t&#8221;"/>
+      <l:template name="section" text="&#8220;%t&#8221;"/>
+      <l:template name="simplesect" text="&#8220;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="xref-number">
+      <l:template name="answer" text="Jawab:&#160;%n"/>
+      <l:template name="appendix" text="Lampiran&#160;%n"/>
+      <l:template name="bridgehead" text="Bagian&#160;%n"/>
+      <l:template name="chapter" text="Bab&#160;%n"/>
+      <l:template name="equation" text="Persamaan&#160;%n"/>
+      <l:template name="example" text="Teladan&#160;%n"/>
+      <l:template name="figure" text="Gambar&#160;%n"/>
+      <l:template name="part" text="Bagian&#160;%n"/>
+      <l:template name="procedure" text="Prosedur&#160;%n"/>
+      <l:template name="productionset" text="Production&#160;%n"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n"/>
+      <l:template name="qandaentry" text="Tanya:&#160;%n"/>
+      <l:template name="question" text="Tanya:&#160;%n"/>
+      <l:template name="sect1" text="Bagian&#160;%n"/>
+      <l:template name="sect2" text="Bagian&#160;%n"/>
+      <l:template name="sect3" text="Bagian&#160;%n"/>
+      <l:template name="sect4" text="Bagian&#160;%n"/>
+      <l:template name="sect5" text="Bagian&#160;%n"/>
+      <l:template name="section" text="Bagian&#160;%n"/>
+      <l:template name="table" text="Tabel&#160;%n"/>
+   </l:context>
+
+   <l:context name="xref-number-and-title">
+      <l:template name="appendix" text="Lampiran&#160;%n, %t"/>
+      <l:template name="bridgehead" text="Bagian&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="chapter" text="Bab&#160;%n, %t"/>
+      <l:template name="equation" text="Persamaan&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="example" text="Teladan&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="figure" text="Gambar&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="part" text="Bagian&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="procedure" text="Prosedur&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="productionset" text="Production&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="refsect1" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="refsect2" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="refsect3" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="refsection" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="sect1" text="Bagian&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect2" text="Bagian&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect3" text="Bagian&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect4" text="Bagian&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect5" text="Bagian&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="section" text="Bagian&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="simplesect" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="table" text="Tabel&#160;%n, &#8220;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="authorgroup">
+      <l:template name="sep" text=", "/>
+      <l:template name="sep2" text=" dan "/>
+      <l:template name="seplast" text=", dan "/>
+   </l:context>
+
+   <l:context name="glossary">
+      <l:template name="see" text="Lihat "/>
+      <l:template name="seealso" text="Lihat Juga "/>
+   </l:context>
+
+   <l:context name="msgset">
+      <l:template name="MsgAud" text="Pemirsa: "/>
+      <l:template name="MsgLevel" text="Tingkatan: "/>
+      <l:template name="MsgOrig" text="Asal: "/>
+   </l:context>
+
+   <l:context name="datetime">
+      <l:template name="format" text="m/d/Y" lang="en"/>
+   </l:context>
+
+   <l:context name="datetime-full">
+      <l:template name="January" text="January" lang="en"/>
+      <l:template name="February" text="February" lang="en"/>
+      <l:template name="March" text="March" lang="en"/>
+      <l:template name="April" text="April" lang="en"/>
+      <l:template name="May" text="May" lang="en"/>
+      <l:template name="June" text="June" lang="en"/>
+      <l:template name="July" text="July" lang="en"/>
+      <l:template name="August" text="August" lang="en"/>
+      <l:template name="September" text="September" lang="en"/>
+      <l:template name="October" text="October" lang="en"/>
+      <l:template name="November" text="November" lang="en"/>
+      <l:template name="December" text="December" lang="en"/>
+      <l:template name="Monday" text="Monday" lang="en"/>
+      <l:template name="Tuesday" text="Tuesday" lang="en"/>
+      <l:template name="Wednesday" text="Wednesday" lang="en"/>
+      <l:template name="Thursday" text="Thursday" lang="en"/>
+      <l:template name="Friday" text="Friday" lang="en"/>
+      <l:template name="Saturday" text="Saturday" lang="en"/>
+      <l:template name="Sunday" text="Sunday" lang="en"/>
+   </l:context>
+
+   <l:context name="datetime-abbrev">
+      <l:template name="Jan" text="Jan" lang="en"/>
+      <l:template name="Feb" text="Feb" lang="en"/>
+      <l:template name="Mar" text="Mar" lang="en"/>
+      <l:template name="Apr" text="Apr" lang="en"/>
+      <l:template name="May" text="May" lang="en"/>
+      <l:template name="Jun" text="Jun" lang="en"/>
+      <l:template name="Jul" text="Jul" lang="en"/>
+      <l:template name="Aug" text="Aug" lang="en"/>
+      <l:template name="Sep" text="Sep" lang="en"/>
+      <l:template name="Oct" text="Oct" lang="en"/>
+      <l:template name="Nov" text="Nov" lang="en"/>
+      <l:template name="Dec" text="Dec" lang="en"/>
+      <l:template name="Mon" text="Mon" lang="en"/>
+      <l:template name="Tue" text="Tue" lang="en"/>
+      <l:template name="Wed" text="Wed" lang="en"/>
+      <l:template name="Thu" text="Thu" lang="en"/>
+      <l:template name="Fri" text="Fri" lang="en"/>
+      <l:template name="Sat" text="Sat" lang="en"/>
+      <l:template name="Sun" text="Sun" lang="en"/>
+   </l:context>
+
+   <l:context name="htmlhelp">
+      <l:template name="langcode" text="0x0421 Indonesian (INDONESIA)"/>
+   </l:context>
+
+   <l:letters lang="en">
+      <l:l i="-1"/>
+      <l:l i="0">Symbols</l:l>
+      <l:l i="10">A</l:l>
+      <l:l i="10">a</l:l>
+      <l:l i="10">&#192;</l:l>
+      <l:l i="10">&#224;</l:l>
+      <l:l i="10">&#193;</l:l>
+      <l:l i="10">&#225;</l:l>
+      <l:l i="10">&#194;</l:l>
+      <l:l i="10">&#226;</l:l>
+      <l:l i="10">&#195;</l:l>
+      <l:l i="10">&#227;</l:l>
+      <l:l i="10">&#196;</l:l>
+      <l:l i="10">&#228;</l:l>
+      <l:l i="10">&#197;</l:l>
+      <l:l i="10">&#229;</l:l>
+      <l:l i="10">&#256;</l:l>
+      <l:l i="10">&#257;</l:l>
+      <l:l i="10">&#258;</l:l>
+      <l:l i="10">&#259;</l:l>
+      <l:l i="10">&#260;</l:l>
+      <l:l i="10">&#261;</l:l>
+      <l:l i="10">&#461;</l:l>
+      <l:l i="10">&#462;</l:l>
+      <l:l i="10">&#478;</l:l>
+      <l:l i="10">&#479;</l:l>
+      <l:l i="10">&#480;</l:l>
+      <l:l i="10">&#481;</l:l>
+      <l:l i="10">&#506;</l:l>
+      <l:l i="10">&#507;</l:l>
+      <l:l i="10">&#512;</l:l>
+      <l:l i="10">&#513;</l:l>
+      <l:l i="10">&#514;</l:l>
+      <l:l i="10">&#515;</l:l>
+      <l:l i="10">&#550;</l:l>
+      <l:l i="10">&#551;</l:l>
+      <l:l i="10">&#7680;</l:l>
+      <l:l i="10">&#7681;</l:l>
+      <l:l i="10">&#7834;</l:l>
+      <l:l i="10">&#7840;</l:l>
+      <l:l i="10">&#7841;</l:l>
+      <l:l i="10">&#7842;</l:l>
+      <l:l i="10">&#7843;</l:l>
+      <l:l i="10">&#7844;</l:l>
+      <l:l i="10">&#7845;</l:l>
+      <l:l i="10">&#7846;</l:l>
+      <l:l i="10">&#7847;</l:l>
+      <l:l i="10">&#7848;</l:l>
+      <l:l i="10">&#7849;</l:l>
+      <l:l i="10">&#7850;</l:l>
+      <l:l i="10">&#7851;</l:l>
+      <l:l i="10">&#7852;</l:l>
+      <l:l i="10">&#7853;</l:l>
+      <l:l i="10">&#7854;</l:l>
+      <l:l i="10">&#7855;</l:l>
+      <l:l i="10">&#7856;</l:l>
+      <l:l i="10">&#7857;</l:l>
+      <l:l i="10">&#7858;</l:l>
+      <l:l i="10">&#7859;</l:l>
+      <l:l i="10">&#7860;</l:l>
+      <l:l i="10">&#7861;</l:l>
+      <l:l i="10">&#7862;</l:l>
+      <l:l i="10">&#7863;</l:l>
+      <l:l i="20">B</l:l>
+      <l:l i="20">b</l:l>
+      <l:l i="20">&#384;</l:l>
+      <l:l i="20">&#385;</l:l>
+      <l:l i="20">&#595;</l:l>
+      <l:l i="20">&#386;</l:l>
+      <l:l i="20">&#387;</l:l>
+      <l:l i="20">&#7682;</l:l>
+      <l:l i="20">&#7683;</l:l>
+      <l:l i="20">&#7684;</l:l>
+      <l:l i="20">&#7685;</l:l>
+      <l:l i="20">&#7686;</l:l>
+      <l:l i="20">&#7687;</l:l>
+      <l:l i="30">C</l:l>
+      <l:l i="30">c</l:l>
+      <l:l i="30">&#199;</l:l>
+      <l:l i="30">&#231;</l:l>
+      <l:l i="30">&#262;</l:l>
+      <l:l i="30">&#263;</l:l>
+      <l:l i="30">&#264;</l:l>
+      <l:l i="30">&#265;</l:l>
+      <l:l i="30">&#266;</l:l>
+      <l:l i="30">&#267;</l:l>
+      <l:l i="30">&#268;</l:l>
+      <l:l i="30">&#269;</l:l>
+      <l:l i="30">&#391;</l:l>
+      <l:l i="30">&#392;</l:l>
+      <l:l i="30">&#597;</l:l>
+      <l:l i="30">&#7688;</l:l>
+      <l:l i="30">&#7689;</l:l>
+      <l:l i="40">D</l:l>
+      <l:l i="40">d</l:l>
+      <l:l i="40">&#270;</l:l>
+      <l:l i="40">&#271;</l:l>
+      <l:l i="40">&#272;</l:l>
+      <l:l i="40">&#273;</l:l>
+      <l:l i="40">&#394;</l:l>
+      <l:l i="40">&#599;</l:l>
+      <l:l i="40">&#395;</l:l>
+      <l:l i="40">&#396;</l:l>
+      <l:l i="40">&#453;</l:l>
+      <l:l i="40">&#498;</l:l>
+      <l:l i="40">&#545;</l:l>
+      <l:l i="40">&#598;</l:l>
+      <l:l i="40">&#7690;</l:l>
+      <l:l i="40">&#7691;</l:l>
+      <l:l i="40">&#7692;</l:l>
+      <l:l i="40">&#7693;</l:l>
+      <l:l i="40">&#7694;</l:l>
+      <l:l i="40">&#7695;</l:l>
+      <l:l i="40">&#7696;</l:l>
+      <l:l i="40">&#7697;</l:l>
+      <l:l i="40">&#7698;</l:l>
+      <l:l i="40">&#7699;</l:l>
+      <l:l i="50">E</l:l>
+      <l:l i="50">e</l:l>
+      <l:l i="50">&#200;</l:l>
+      <l:l i="50">&#232;</l:l>
+      <l:l i="50">&#201;</l:l>
+      <l:l i="50">&#233;</l:l>
+      <l:l i="50">&#202;</l:l>
+      <l:l i="50">&#234;</l:l>
+      <l:l i="50">&#203;</l:l>
+      <l:l i="50">&#235;</l:l>
+      <l:l i="50">&#274;</l:l>
+      <l:l i="50">&#275;</l:l>
+      <l:l i="50">&#276;</l:l>
+      <l:l i="50">&#277;</l:l>
+      <l:l i="50">&#278;</l:l>
+      <l:l i="50">&#279;</l:l>
+      <l:l i="50">&#280;</l:l>
+      <l:l i="50">&#281;</l:l>
+      <l:l i="50">&#282;</l:l>
+      <l:l i="50">&#283;</l:l>
+      <l:l i="50">&#516;</l:l>
+      <l:l i="50">&#517;</l:l>
+      <l:l i="50">&#518;</l:l>
+      <l:l i="50">&#519;</l:l>
+      <l:l i="50">&#552;</l:l>
+      <l:l i="50">&#553;</l:l>
+      <l:l i="50">&#7700;</l:l>
+      <l:l i="50">&#7701;</l:l>
+      <l:l i="50">&#7702;</l:l>
+      <l:l i="50">&#7703;</l:l>
+      <l:l i="50">&#7704;</l:l>
+      <l:l i="50">&#7705;</l:l>
+      <l:l i="50">&#7706;</l:l>
+      <l:l i="50">&#7707;</l:l>
+      <l:l i="50">&#7708;</l:l>
+      <l:l i="50">&#7709;</l:l>
+      <l:l i="50">&#7864;</l:l>
+      <l:l i="50">&#7865;</l:l>
+      <l:l i="50">&#7866;</l:l>
+      <l:l i="50">&#7867;</l:l>
+      <l:l i="50">&#7868;</l:l>
+      <l:l i="50">&#7869;</l:l>
+      <l:l i="50">&#7870;</l:l>
+      <l:l i="50">&#7871;</l:l>
+      <l:l i="50">&#7872;</l:l>
+      <l:l i="50">&#7873;</l:l>
+      <l:l i="50">&#7874;</l:l>
+      <l:l i="50">&#7875;</l:l>
+      <l:l i="50">&#7876;</l:l>
+      <l:l i="50">&#7877;</l:l>
+      <l:l i="50">&#7878;</l:l>
+      <l:l i="50">&#7879;</l:l>
+      <l:l i="60">F</l:l>
+      <l:l i="60">f</l:l>
+      <l:l i="60">&#401;</l:l>
+      <l:l i="60">&#402;</l:l>
+      <l:l i="60">&#7710;</l:l>
+      <l:l i="60">&#7711;</l:l>
+      <l:l i="70">G</l:l>
+      <l:l i="70">g</l:l>
+      <l:l i="70">&#284;</l:l>
+      <l:l i="70">&#285;</l:l>
+      <l:l i="70">&#286;</l:l>
+      <l:l i="70">&#287;</l:l>
+      <l:l i="70">&#288;</l:l>
+      <l:l i="70">&#289;</l:l>
+      <l:l i="70">&#290;</l:l>
+      <l:l i="70">&#291;</l:l>
+      <l:l i="70">&#403;</l:l>
+      <l:l i="70">&#608;</l:l>
+      <l:l i="70">&#484;</l:l>
+      <l:l i="70">&#485;</l:l>
+      <l:l i="70">&#486;</l:l>
+      <l:l i="70">&#487;</l:l>
+      <l:l i="70">&#500;</l:l>
+      <l:l i="70">&#501;</l:l>
+      <l:l i="70">&#7712;</l:l>
+      <l:l i="70">&#7713;</l:l>
+      <l:l i="80">H</l:l>
+      <l:l i="80">h</l:l>
+      <l:l i="80">&#292;</l:l>
+      <l:l i="80">&#293;</l:l>
+      <l:l i="80">&#294;</l:l>
+      <l:l i="80">&#295;</l:l>
+      <l:l i="80">&#542;</l:l>
+      <l:l i="80">&#543;</l:l>
+      <l:l i="80">&#614;</l:l>
+      <l:l i="80">&#7714;</l:l>
+      <l:l i="80">&#7715;</l:l>
+      <l:l i="80">&#7716;</l:l>
+      <l:l i="80">&#7717;</l:l>
+      <l:l i="80">&#7718;</l:l>
+      <l:l i="80">&#7719;</l:l>
+      <l:l i="80">&#7720;</l:l>
+      <l:l i="80">&#7721;</l:l>
+      <l:l i="80">&#7722;</l:l>
+      <l:l i="80">&#7723;</l:l>
+      <l:l i="80">&#7830;</l:l>
+      <l:l i="90">I</l:l>
+      <l:l i="90">i</l:l>
+      <l:l i="90">&#204;</l:l>
+      <l:l i="90">&#236;</l:l>
+      <l:l i="90">&#205;</l:l>
+      <l:l i="90">&#237;</l:l>
+      <l:l i="90">&#206;</l:l>
+      <l:l i="90">&#238;</l:l>
+      <l:l i="90">&#207;</l:l>
+      <l:l i="90">&#239;</l:l>
+      <l:l i="90">&#296;</l:l>
+      <l:l i="90">&#297;</l:l>
+      <l:l i="90">&#298;</l:l>
+      <l:l i="90">&#299;</l:l>
+      <l:l i="90">&#300;</l:l>
+      <l:l i="90">&#301;</l:l>
+      <l:l i="90">&#302;</l:l>
+      <l:l i="90">&#303;</l:l>
+      <l:l i="90">&#304;</l:l>
+      <l:l i="90">&#407;</l:l>
+      <l:l i="90">&#616;</l:l>
+      <l:l i="90">&#463;</l:l>
+      <l:l i="90">&#464;</l:l>
+      <l:l i="90">&#520;</l:l>
+      <l:l i="90">&#521;</l:l>
+      <l:l i="90">&#522;</l:l>
+      <l:l i="90">&#523;</l:l>
+      <l:l i="90">&#7724;</l:l>
+      <l:l i="90">&#7725;</l:l>
+      <l:l i="90">&#7726;</l:l>
+      <l:l i="90">&#7727;</l:l>
+      <l:l i="90">&#7880;</l:l>
+      <l:l i="90">&#7881;</l:l>
+      <l:l i="90">&#7882;</l:l>
+      <l:l i="90">&#7883;</l:l>
+      <l:l i="100">J</l:l>
+      <l:l i="100">j</l:l>
+      <l:l i="100">&#308;</l:l>
+      <l:l i="100">&#309;</l:l>
+      <l:l i="100">&#496;</l:l>
+      <l:l i="100">&#669;</l:l>
+      <l:l i="110">K</l:l>
+      <l:l i="110">k</l:l>
+      <l:l i="110">&#310;</l:l>
+      <l:l i="110">&#311;</l:l>
+      <l:l i="110">&#408;</l:l>
+      <l:l i="110">&#409;</l:l>
+      <l:l i="110">&#488;</l:l>
+      <l:l i="110">&#489;</l:l>
+      <l:l i="110">&#7728;</l:l>
+      <l:l i="110">&#7729;</l:l>
+      <l:l i="110">&#7730;</l:l>
+      <l:l i="110">&#7731;</l:l>
+      <l:l i="110">&#7732;</l:l>
+      <l:l i="110">&#7733;</l:l>
+      <l:l i="120">L</l:l>
+      <l:l i="120">l</l:l>
+      <l:l i="120">&#313;</l:l>
+      <l:l i="120">&#314;</l:l>
+      <l:l i="120">&#315;</l:l>
+      <l:l i="120">&#316;</l:l>
+      <l:l i="120">&#317;</l:l>
+      <l:l i="120">&#318;</l:l>
+      <l:l i="120">&#319;</l:l>
+      <l:l i="120">&#320;</l:l>
+      <l:l i="120">&#321;</l:l>
+      <l:l i="120">&#322;</l:l>
+      <l:l i="120">&#410;</l:l>
+      <l:l i="120">&#456;</l:l>
+      <l:l i="120">&#564;</l:l>
+      <l:l i="120">&#619;</l:l>
+      <l:l i="120">&#620;</l:l>
+      <l:l i="120">&#621;</l:l>
+      <l:l i="120">&#7734;</l:l>
+      <l:l i="120">&#7735;</l:l>
+      <l:l i="120">&#7736;</l:l>
+      <l:l i="120">&#7737;</l:l>
+      <l:l i="120">&#7738;</l:l>
+      <l:l i="120">&#7739;</l:l>
+      <l:l i="120">&#7740;</l:l>
+      <l:l i="120">&#7741;</l:l>
+      <l:l i="130">M</l:l>
+      <l:l i="130">m</l:l>
+      <l:l i="130">&#625;</l:l>
+      <l:l i="130">&#7742;</l:l>
+      <l:l i="130">&#7743;</l:l>
+      <l:l i="130">&#7744;</l:l>
+      <l:l i="130">&#7745;</l:l>
+      <l:l i="130">&#7746;</l:l>
+      <l:l i="130">&#7747;</l:l>
+      <l:l i="140">N</l:l>
+      <l:l i="140">n</l:l>
+      <l:l i="140">&#209;</l:l>
+      <l:l i="140">&#241;</l:l>
+      <l:l i="140">&#323;</l:l>
+      <l:l i="140">&#324;</l:l>
+      <l:l i="140">&#325;</l:l>
+      <l:l i="140">&#326;</l:l>
+      <l:l i="140">&#327;</l:l>
+      <l:l i="140">&#328;</l:l>
+      <l:l i="140">&#413;</l:l>
+      <l:l i="140">&#626;</l:l>
+      <l:l i="140">&#414;</l:l>
+      <l:l i="140">&#544;</l:l>
+      <l:l i="140">&#459;</l:l>
+      <l:l i="140">&#504;</l:l>
+      <l:l i="140">&#505;</l:l>
+      <l:l i="140">&#565;</l:l>
+      <l:l i="140">&#627;</l:l>
+      <l:l i="140">&#7748;</l:l>
+      <l:l i="140">&#7749;</l:l>
+      <l:l i="140">&#7750;</l:l>
+      <l:l i="140">&#7751;</l:l>
+      <l:l i="140">&#7752;</l:l>
+      <l:l i="140">&#7753;</l:l>
+      <l:l i="140">&#7754;</l:l>
+      <l:l i="140">&#7755;</l:l>
+      <l:l i="150">O</l:l>
+      <l:l i="150">o</l:l>
+      <l:l i="150">&#210;</l:l>
+      <l:l i="150">&#242;</l:l>
+      <l:l i="150">&#211;</l:l>
+      <l:l i="150">&#243;</l:l>
+      <l:l i="150">&#212;</l:l>
+      <l:l i="150">&#244;</l:l>
+      <l:l i="150">&#213;</l:l>
+      <l:l i="150">&#245;</l:l>
+      <l:l i="150">&#214;</l:l>
+      <l:l i="150">&#246;</l:l>
+      <l:l i="150">&#216;</l:l>
+      <l:l i="150">&#248;</l:l>
+      <l:l i="150">&#332;</l:l>
+      <l:l i="150">&#333;</l:l>
+      <l:l i="150">&#334;</l:l>
+      <l:l i="150">&#335;</l:l>
+      <l:l i="150">&#336;</l:l>
+      <l:l i="150">&#337;</l:l>
+      <l:l i="150">&#415;</l:l>
+      <l:l i="150">&#416;</l:l>
+      <l:l i="150">&#417;</l:l>
+      <l:l i="150">&#465;</l:l>
+      <l:l i="150">&#466;</l:l>
+      <l:l i="150">&#490;</l:l>
+      <l:l i="150">&#491;</l:l>
+      <l:l i="150">&#492;</l:l>
+      <l:l i="150">&#493;</l:l>
+      <l:l i="150">&#510;</l:l>
+      <l:l i="150">&#511;</l:l>
+      <l:l i="150">&#524;</l:l>
+      <l:l i="150">&#525;</l:l>
+      <l:l i="150">&#526;</l:l>
+      <l:l i="150">&#527;</l:l>
+      <l:l i="150">&#554;</l:l>
+      <l:l i="150">&#555;</l:l>
+      <l:l i="150">&#556;</l:l>
+      <l:l i="150">&#557;</l:l>
+      <l:l i="150">&#558;</l:l>
+      <l:l i="150">&#559;</l:l>
+      <l:l i="150">&#560;</l:l>
+      <l:l i="150">&#561;</l:l>
+      <l:l i="150">&#7756;</l:l>
+      <l:l i="150">&#7757;</l:l>
+      <l:l i="150">&#7758;</l:l>
+      <l:l i="150">&#7759;</l:l>
+      <l:l i="150">&#7760;</l:l>
+      <l:l i="150">&#7761;</l:l>
+      <l:l i="150">&#7762;</l:l>
+      <l:l i="150">&#7763;</l:l>
+      <l:l i="150">&#7884;</l:l>
+      <l:l i="150">&#7885;</l:l>
+      <l:l i="150">&#7886;</l:l>
+      <l:l i="150">&#7887;</l:l>
+      <l:l i="150">&#7888;</l:l>
+      <l:l i="150">&#7889;</l:l>
+      <l:l i="150">&#7890;</l:l>
+      <l:l i="150">&#7891;</l:l>
+      <l:l i="150">&#7892;</l:l>
+      <l:l i="150">&#7893;</l:l>
+      <l:l i="150">&#7894;</l:l>
+      <l:l i="150">&#7895;</l:l>
+      <l:l i="150">&#7896;</l:l>
+      <l:l i="150">&#7897;</l:l>
+      <l:l i="150">&#7898;</l:l>
+      <l:l i="150">&#7899;</l:l>
+      <l:l i="150">&#7900;</l:l>
+      <l:l i="150">&#7901;</l:l>
+      <l:l i="150">&#7902;</l:l>
+      <l:l i="150">&#7903;</l:l>
+      <l:l i="150">&#7904;</l:l>
+      <l:l i="150">&#7905;</l:l>
+      <l:l i="150">&#7906;</l:l>
+      <l:l i="150">&#7907;</l:l>
+      <l:l i="160">P</l:l>
+      <l:l i="160">p</l:l>
+      <l:l i="160">&#420;</l:l>
+      <l:l i="160">&#421;</l:l>
+      <l:l i="160">&#7764;</l:l>
+      <l:l i="160">&#7765;</l:l>
+      <l:l i="160">&#7766;</l:l>
+      <l:l i="160">&#7767;</l:l>
+      <l:l i="170">Q</l:l>
+      <l:l i="170">q</l:l>
+      <l:l i="170">&#672;</l:l>
+      <l:l i="180">R</l:l>
+      <l:l i="180">r</l:l>
+      <l:l i="180">&#340;</l:l>
+      <l:l i="180">&#341;</l:l>
+      <l:l i="180">&#342;</l:l>
+      <l:l i="180">&#343;</l:l>
+      <l:l i="180">&#344;</l:l>
+      <l:l i="180">&#345;</l:l>
+      <l:l i="180">&#528;</l:l>
+      <l:l i="180">&#529;</l:l>
+      <l:l i="180">&#530;</l:l>
+      <l:l i="180">&#531;</l:l>
+      <l:l i="180">&#636;</l:l>
+      <l:l i="180">&#637;</l:l>
+      <l:l i="180">&#638;</l:l>
+      <l:l i="180">&#7768;</l:l>
+      <l:l i="180">&#7769;</l:l>
+      <l:l i="180">&#7770;</l:l>
+      <l:l i="180">&#7771;</l:l>
+      <l:l i="180">&#7772;</l:l>
+      <l:l i="180">&#7773;</l:l>
+      <l:l i="180">&#7774;</l:l>
+      <l:l i="180">&#7775;</l:l>
+      <l:l i="190">S</l:l>
+      <l:l i="190">s</l:l>
+      <l:l i="190">&#346;</l:l>
+      <l:l i="190">&#347;</l:l>
+      <l:l i="190">&#348;</l:l>
+      <l:l i="190">&#349;</l:l>
+      <l:l i="190">&#350;</l:l>
+      <l:l i="190">&#351;</l:l>
+      <l:l i="190">&#352;</l:l>
+      <l:l i="190">&#353;</l:l>
+      <l:l i="190">&#536;</l:l>
+      <l:l i="190">&#537;</l:l>
+      <l:l i="190">&#642;</l:l>
+      <l:l i="190">&#7776;</l:l>
+      <l:l i="190">&#7777;</l:l>
+      <l:l i="190">&#7778;</l:l>
+      <l:l i="190">&#7779;</l:l>
+      <l:l i="190">&#7780;</l:l>
+      <l:l i="190">&#7781;</l:l>
+      <l:l i="190">&#7782;</l:l>
+      <l:l i="190">&#7783;</l:l>
+      <l:l i="190">&#7784;</l:l>
+      <l:l i="190">&#7785;</l:l>
+      <l:l i="200">T</l:l>
+      <l:l i="200">t</l:l>
+      <l:l i="200">&#354;</l:l>
+      <l:l i="200">&#355;</l:l>
+      <l:l i="200">&#356;</l:l>
+      <l:l i="200">&#357;</l:l>
+      <l:l i="200">&#358;</l:l>
+      <l:l i="200">&#359;</l:l>
+      <l:l i="200">&#427;</l:l>
+      <l:l i="200">&#428;</l:l>
+      <l:l i="200">&#429;</l:l>
+      <l:l i="200">&#430;</l:l>
+      <l:l i="200">&#648;</l:l>
+      <l:l i="200">&#538;</l:l>
+      <l:l i="200">&#539;</l:l>
+      <l:l i="200">&#566;</l:l>
+      <l:l i="200">&#7786;</l:l>
+      <l:l i="200">&#7787;</l:l>
+      <l:l i="200">&#7788;</l:l>
+      <l:l i="200">&#7789;</l:l>
+      <l:l i="200">&#7790;</l:l>
+      <l:l i="200">&#7791;</l:l>
+      <l:l i="200">&#7792;</l:l>
+      <l:l i="200">&#7793;</l:l>
+      <l:l i="200">&#7831;</l:l>
+      <l:l i="210">U</l:l>
+      <l:l i="210">u</l:l>
+      <l:l i="210">&#217;</l:l>
+      <l:l i="210">&#249;</l:l>
+      <l:l i="210">&#218;</l:l>
+      <l:l i="210">&#250;</l:l>
+      <l:l i="210">&#219;</l:l>
+      <l:l i="210">&#251;</l:l>
+      <l:l i="210">&#220;</l:l>
+      <l:l i="210">&#252;</l:l>
+      <l:l i="210">&#360;</l:l>
+      <l:l i="210">&#361;</l:l>
+      <l:l i="210">&#362;</l:l>
+      <l:l i="210">&#363;</l:l>
+      <l:l i="210">&#364;</l:l>
+      <l:l i="210">&#365;</l:l>
+      <l:l i="210">&#366;</l:l>
+      <l:l i="210">&#367;</l:l>
+      <l:l i="210">&#368;</l:l>
+      <l:l i="210">&#369;</l:l>
+      <l:l i="210">&#370;</l:l>
+      <l:l i="210">&#371;</l:l>
+      <l:l i="210">&#431;</l:l>
+      <l:l i="210">&#432;</l:l>
+      <l:l i="210">&#467;</l:l>
+      <l:l i="210">&#468;</l:l>
+      <l:l i="210">&#469;</l:l>
+      <l:l i="210">&#470;</l:l>
+      <l:l i="210">&#471;</l:l>
+      <l:l i="210">&#472;</l:l>
+      <l:l i="210">&#473;</l:l>
+      <l:l i="210">&#474;</l:l>
+      <l:l i="210">&#475;</l:l>
+      <l:l i="210">&#476;</l:l>
+      <l:l i="210">&#532;</l:l>
+      <l:l i="210">&#533;</l:l>
+      <l:l i="210">&#534;</l:l>
+      <l:l i="210">&#535;</l:l>
+      <l:l i="210">&#7794;</l:l>
+      <l:l i="210">&#7795;</l:l>
+      <l:l i="210">&#7796;</l:l>
+      <l:l i="210">&#7797;</l:l>
+      <l:l i="210">&#7798;</l:l>
+      <l:l i="210">&#7799;</l:l>
+      <l:l i="210">&#7800;</l:l>
+      <l:l i="210">&#7801;</l:l>
+      <l:l i="210">&#7802;</l:l>
+      <l:l i="210">&#7803;</l:l>
+      <l:l i="210">&#7908;</l:l>
+      <l:l i="210">&#7909;</l:l>
+      <l:l i="210">&#7910;</l:l>
+      <l:l i="210">&#7911;</l:l>
+      <l:l i="210">&#7912;</l:l>
+      <l:l i="210">&#7913;</l:l>
+      <l:l i="210">&#7914;</l:l>
+      <l:l i="210">&#7915;</l:l>
+      <l:l i="210">&#7916;</l:l>
+      <l:l i="210">&#7917;</l:l>
+      <l:l i="210">&#7918;</l:l>
+      <l:l i="210">&#7919;</l:l>
+      <l:l i="210">&#7920;</l:l>
+      <l:l i="210">&#7921;</l:l>
+      <l:l i="220">V</l:l>
+      <l:l i="220">v</l:l>
+      <l:l i="220">&#434;</l:l>
+      <l:l i="220">&#651;</l:l>
+      <l:l i="220">&#7804;</l:l>
+      <l:l i="220">&#7805;</l:l>
+      <l:l i="220">&#7806;</l:l>
+      <l:l i="220">&#7807;</l:l>
+      <l:l i="230">W</l:l>
+      <l:l i="230">w</l:l>
+      <l:l i="230">&#372;</l:l>
+      <l:l i="230">&#373;</l:l>
+      <l:l i="230">&#7808;</l:l>
+      <l:l i="230">&#7809;</l:l>
+      <l:l i="230">&#7810;</l:l>
+      <l:l i="230">&#7811;</l:l>
+      <l:l i="230">&#7812;</l:l>
+      <l:l i="230">&#7813;</l:l>
+      <l:l i="230">&#7814;</l:l>
+      <l:l i="230">&#7815;</l:l>
+      <l:l i="230">&#7816;</l:l>
+      <l:l i="230">&#7817;</l:l>
+      <l:l i="230">&#7832;</l:l>
+      <l:l i="240">X</l:l>
+      <l:l i="240">x</l:l>
+      <l:l i="240">&#7818;</l:l>
+      <l:l i="240">&#7819;</l:l>
+      <l:l i="240">&#7820;</l:l>
+      <l:l i="240">&#7821;</l:l>
+      <l:l i="250">Y</l:l>
+      <l:l i="250">y</l:l>
+      <l:l i="250">&#221;</l:l>
+      <l:l i="250">&#253;</l:l>
+      <l:l i="250">&#255;</l:l>
+      <l:l i="250">&#376;</l:l>
+      <l:l i="250">&#374;</l:l>
+      <l:l i="250">&#375;</l:l>
+      <l:l i="250">&#435;</l:l>
+      <l:l i="250">&#436;</l:l>
+      <l:l i="250">&#562;</l:l>
+      <l:l i="250">&#563;</l:l>
+      <l:l i="250">&#7822;</l:l>
+      <l:l i="250">&#7823;</l:l>
+      <l:l i="250">&#7833;</l:l>
+      <l:l i="250">&#7922;</l:l>
+      <l:l i="250">&#7923;</l:l>
+      <l:l i="250">&#7924;</l:l>
+      <l:l i="250">&#7925;</l:l>
+      <l:l i="250">&#7926;</l:l>
+      <l:l i="250">&#7927;</l:l>
+      <l:l i="250">&#7928;</l:l>
+      <l:l i="250">&#7929;</l:l>
+      <l:l i="260">Z</l:l>
+      <l:l i="260">z</l:l>
+      <l:l i="260">&#377;</l:l>
+      <l:l i="260">&#378;</l:l>
+      <l:l i="260">&#379;</l:l>
+      <l:l i="260">&#380;</l:l>
+      <l:l i="260">&#381;</l:l>
+      <l:l i="260">&#382;</l:l>
+      <l:l i="260">&#437;</l:l>
+      <l:l i="260">&#438;</l:l>
+      <l:l i="260">&#548;</l:l>
+      <l:l i="260">&#549;</l:l>
+      <l:l i="260">&#656;</l:l>
+      <l:l i="260">&#657;</l:l>
+      <l:l i="260">&#7824;</l:l>
+      <l:l i="260">&#7825;</l:l>
+      <l:l i="260">&#7826;</l:l>
+      <l:l i="260">&#7827;</l:l>
+      <l:l i="260">&#7828;</l:l>
+      <l:l i="260">&#7829;</l:l>
+   </l:letters>
+</l:l10n>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/it.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/it.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/it.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1153 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="it" english-language-name="Italian">
+
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+   <l:gentext key="Abstract" text="Estratto"/>
+   <l:gentext key="abstract" text="Estratto"/>
+   <l:gentext key="Answer" text="R:"/>
+   <l:gentext key="answer" text="R:"/>
+   <l:gentext key="Appendix" text="Appendice"/>
+   <l:gentext key="appendix" text="appendice"/>
+   <l:gentext key="Article" text="Articolo"/>
+   <l:gentext key="article" text="Articolo"/>
+   <l:gentext key="Bibliography" text="Bibliografia"/>
+   <l:gentext key="bibliography" text="Bibliografia"/>
+   <l:gentext key="Book" text="Libro"/>
+   <l:gentext key="book" text="Libro"/>
+   <l:gentext key="CAUTION" text="ATTENZIONE"/>
+   <l:gentext key="Caution" text="Attenzione"/>
+   <l:gentext key="caution" text="Attenzione"/>
+   <l:gentext key="Chapter" text="Capitolo"/>
+   <l:gentext key="chapter" text="capitolo"/>
+   <l:gentext key="Colophon" text="Colophon"/>
+   <l:gentext key="colophon" text="Colophon"/>
+   <l:gentext key="Copyright" text="Copyright"/>
+   <l:gentext key="copyright" text="Copyright"/>
+   <l:gentext key="Dedication" text="Dedica"/>
+   <l:gentext key="dedication" text="Dedica"/>
+   <l:gentext key="Edition" text="Edizione"/>
+   <l:gentext key="edition" text="Edizione"/>
+   <l:gentext key="Equation" text="Equazione"/>
+   <l:gentext key="equation" text="Equazione"/>
+   <l:gentext key="Example" text="Esempio"/>
+   <l:gentext key="example" text="Esempio"/>
+   <l:gentext key="Figure" text="Figura"/>
+   <l:gentext key="figure" text="Figura"/>
+   <l:gentext key="Glossary" text="Glossario"/>
+   <l:gentext key="glossary" text="Glossario"/>
+   <l:gentext key="GlossSee" text="Vedi"/>
+   <l:gentext key="glosssee" text="Vedi"/>
+   <l:gentext key="GlossSeeAlso" text="Vedi Anche"/>
+   <l:gentext key="glossseealso" text="Vedi Anche"/>
+   <l:gentext key="IMPORTANT" text="IMPORTANTE"/>
+   <l:gentext key="important" text="Importante"/>
+   <l:gentext key="Important" text="Importante"/>
+   <l:gentext key="Index" text="Indice"/>
+   <l:gentext key="index" text="Indice"/>
+   <l:gentext key="ISBN" text="ISBN"/>
+   <l:gentext key="isbn" text="ISBN"/>
+   <l:gentext key="LegalNotice" text="Note Legali"/>
+   <l:gentext key="legalnotice" text="Note Legali"/>
+   <l:gentext key="MsgAud" text="Pubblico"/>
+   <l:gentext key="msgaud" text="Pubblico"/>
+   <l:gentext key="MsgLevel" text="Livello"/>
+   <l:gentext key="msglevel" text="Livello"/>
+   <l:gentext key="MsgOrig" text="Origine"/>
+   <l:gentext key="msgorig" text="Origine"/>
+   <l:gentext key="NOTE" text="NOTA"/>
+   <l:gentext key="Note" text="Nota"/>
+   <l:gentext key="note" text="Nota"/>
+   <l:gentext key="Part" text="Parte"/>
+   <l:gentext key="part" text="Parte"/>
+   <l:gentext key="Preface" text="Prefazione"/>
+   <l:gentext key="preface" text="Prefazione"/>
+   <l:gentext key="Procedure" text="Procedura"/>
+   <l:gentext key="procedure" text="Procedura"/>
+   <l:gentext key="ProductionSet" text="Produzione"/>
+   <l:gentext key="PubDate" text="Publication Date" lang="en"/>
+   <l:gentext key="pubdate" text="Publication date" lang="en"/>
+   <l:gentext key="Published" text="Pubblicato"/>
+   <l:gentext key="published" text="Pubblicato"/>
+   <l:gentext key="Qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="Question" text="D:"/>
+   <l:gentext key="question" text="D:"/>
+   <l:gentext key="RefEntry" text=""/>
+   <l:gentext key="refentry" text=""/>
+   <l:gentext key="Reference" text="Riferimento"/>
+   <l:gentext key="reference" text="Riferimento"/>
+   <l:gentext key="RefName" text="Nome"/>
+   <l:gentext key="refname" text="Nome"/>
+   <l:gentext key="RefSection" text=""/>
+   <l:gentext key="refsection" text=""/>
+   <l:gentext key="RefSynopsisDiv" text="Sinossi"/>
+   <l:gentext key="refsynopsisdiv" text="Sinossi"/>
+   <l:gentext key="RevHistory" text="Diario delle Revisioni"/>
+   <l:gentext key="revhistory" text="Diario delle Revisioni"/>
+   <l:gentext key="revision" text="Revisione"/>
+   <l:gentext key="Revision" text="Revisione"/>
+   <l:gentext key="sect1" text="Sezione"/>
+   <l:gentext key="sect2" text="Sezione"/>
+   <l:gentext key="sect3" text="Sezione"/>
+   <l:gentext key="sect4" text="Sezione"/>
+   <l:gentext key="sect5" text="Sezione"/>
+   <l:gentext key="section" text="Sezione"/>
+   <l:gentext key="Section" text="Sezione"/>
+   <l:gentext key="see" text="Vd."/>
+   <l:gentext key="See" text="Vd."/>
+   <l:gentext key="seealso" text="Vd. Anche"/>
+   <l:gentext key="Seealso" text="Vd. anche"/>
+   <l:gentext key="SeeAlso" text="Vd. Anche"/>
+   <l:gentext key="set" text="Raccolta"/>
+   <l:gentext key="Set" text="Raccolta"/>
+   <l:gentext key="setindex" text="Indice Raccolta"/>
+   <l:gentext key="SetIndex" text="Indice Raccolta"/>
+   <l:gentext key="Sidebar" text=""/>
+   <l:gentext key="sidebar" text="nota a margine"/>
+   <l:gentext key="step" text="passo"/>
+   <l:gentext key="Step" text="Passo"/>
+   <l:gentext key="Table" text="Tabella"/>
+   <l:gentext key="table" text="Tabella"/>
+   <l:gentext key="tip" text="Suggerimento"/>
+   <l:gentext key="TIP" text="SUGGERIMENTO"/>
+   <l:gentext key="Tip" text="Suggerimento"/>
+   <l:gentext key="Warning" text="Avvertimento"/>
+   <l:gentext key="warning" text="avvertimento"/>
+   <l:gentext key="WARNING" text="AVVERTIMENTO"/>
+   <l:gentext key="and" text="e"/>
+   <l:gentext key="by" text="di"/>
+   <l:gentext key="called" text="called" lang="en"/>
+   <l:gentext key="Edited" text="A cura"/>
+   <l:gentext key="edited" text="A cura"/>
+   <l:gentext key="Editedby" text="A cura di"/>
+   <l:gentext key="editedby" text="A cura di"/>
+   <l:gentext key="in" text="in"/>
+   <l:gentext key="lastlistcomma" text=","/>
+   <l:gentext key="listcomma" text=","/>
+   <l:gentext key="nonexistantelement" text="elemento non esistente"/>
+   <l:gentext key="notes" text="Note"/>
+   <l:gentext key="Notes" text="Note"/>
+   <l:gentext key="Pgs" text="pp."/>
+   <l:gentext key="pgs" text="pp."/>
+   <l:gentext key="Revisedby" text="Revisionato da: "/>
+   <l:gentext key="revisedby" text="Revisionato da: "/>
+   <l:gentext key="TableNotes" text="Note"/>
+   <l:gentext key="tablenotes" text="Note"/>
+   <l:gentext key="TableofContents" text="Sommario"/>
+   <l:gentext key="tableofcontents" text="Sommario"/>
+   <l:gentext key="the" text="" lang="en"/>
+   <l:gentext key="unexpectedelementname" text="Nome elemento inaspettato"/>
+   <l:gentext key="unsupported" text="non supportato"/>
+   <l:gentext key="xrefto" text="riferimento a"/>
+   <l:gentext key="listofequations" text="Lista delle Equazioni"/>
+   <l:gentext key="ListofEquations" text="Lista delle Equazioni"/>
+   <l:gentext key="ListofExamples" text="Lista degli Esempi"/>
+   <l:gentext key="listofexamples" text="Lista degli Esempi"/>
+   <l:gentext key="ListofFigures" text="Lista delle Figure"/>
+   <l:gentext key="listoffigures" text="Lista delle Figure"/>
+   <l:gentext key="ListofProcedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listofprocedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listoftables" text="Lista delle Tabelle"/>
+   <l:gentext key="ListofTables" text="Lista delle Tabelle"/>
+   <l:gentext key="ListofUnknown" text="Lista degli Sconosciuti"/>
+   <l:gentext key="listofunknown" text="Lista degli Sconosciuti"/>
+   <l:gentext key="nav-home" text="Partenza"/>
+   <l:gentext key="nav-next" text="Avanti"/>
+   <l:gentext key="nav-next-sibling" text="Salta Avanti"/>
+   <l:gentext key="nav-prev" text="Indietro"/>
+   <l:gentext key="nav-prev-sibling" text="Salta Indietro"/>
+   <l:gentext key="nav-up" text="Risali"/>
+   <l:gentext key="nav-toc" text="ToC" lang="en"/>
+   <l:gentext key="Draft" text="Bozza"/>
+   <l:gentext key="above" text="sopra"/>
+   <l:gentext key="below" text="sotto"/>
+   <l:gentext key="sectioncalled" text="la sezione chiamata"/>
+   <l:gentext key="index symbols" text="Simboli"/>
+   <l:gentext key="lowercase.alpha" text="abcdefghijklmnopqrstuvwxyz"/>
+   <l:gentext key="uppercase.alpha" text="ABCDEFGHIJKLMNOPQRSTUVWXYZ"/>
+   <l:dingbat key="startquote" text="&#8220;"/>
+   <l:dingbat key="endquote" text="&#8221;"/>
+   <l:dingbat key="nestedstartquote" text="&#8216;"/>
+   <l:dingbat key="nestedendquote" text="&#8217;"/>
+   <l:dingbat key="singlestartquote" text="&#8216;" lang="en"/>
+   <l:dingbat key="singleendquote" text="&#8217;" lang="en"/>
+   <l:dingbat key="bullet" text="&#8226;"/>
+   <l:gentext key="hyphenation-character" text="-" lang="en"/>
+   <l:gentext key="hyphenation-push-character-count" text="2" lang="en"/>
+   <l:gentext key="hyphenation-remain-character-count" text="2" lang="en"/>
+
+   <l:context name="styles">
+      <l:template name="person-name" text="first-last"/>
+   </l:context>
+
+   <l:context name="title">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="%t"/>
+      <l:template name="appendix" text="Appendice&#160;%n.&#160;%t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="biblioentry" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliolist" text="%t" lang="en"/>
+      <l:template name="bibliomixed" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="Capitolo&#160;%n.&#160;%t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="Equazione&#160;%n.&#160;%t"/>
+      <l:template name="example" text="Esempio&#160;%n.&#160;%t"/>
+      <l:template name="figure" text="Figura&#160;%n.&#160;%t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="glosslist" text="%t" lang="en"/>
+      <l:template name="glossentry" text="%t" lang="en"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text=""/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="Parte&#160;%n.&#160;%t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="procedure.formal" text="Procedura&#160;%n.&#160;%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="productionset.formal" text="Produzione&#160;%n"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="%t"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="%t"/>
+      <l:template name="refentry" text="%t"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsection" text="%t"/>
+      <l:template name="refsect1" text="%t"/>
+      <l:template name="refsect2" text="%t"/>
+      <l:template name="refsect3" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="refsynopsisdivinfo" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="step" text="%t"/>
+      <l:template name="table" text="Tabella&#160;%n.&#160;%t"/>
+      <l:template name="task" text="%t" lang="en"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text=""/>
+      <l:template name="warning" text="%t"/>
+   </l:context>
+
+   <l:context name="title-unnumbered">
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article/appendix" text="%t" lang="en"/>
+      <l:template name="bridgehead" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="sect1" text="%t"/>
+      <l:template name="sect2" text="%t"/>
+      <l:template name="sect3" text="%t"/>
+      <l:template name="sect4" text="%t"/>
+      <l:template name="sect5" text="%t"/>
+      <l:template name="section" text="%t"/>
+      <l:template name="simplesect" text="%t"/>
+   </l:context>
+
+   <l:context name="title-numbered">
+      <l:template name="appendix" text="Appendice&#160;%n.&#160;%t"/>
+      <l:template name="article/appendix" text="%n.&#160;%t" lang="en"/>
+      <l:template name="bridgehead" text="%n.&#160;%t"/>
+      <l:template name="chapter" text="Capitolo&#160;%n.&#160;%t"/>
+      <l:template name="sect1" text="%n.&#160;%t"/>
+      <l:template name="sect2" text="%n.&#160;%t"/>
+      <l:template name="sect3" text="%n.&#160;%t"/>
+      <l:template name="sect4" text="%n.&#160;%t"/>
+      <l:template name="sect5" text="%n.&#160;%t"/>
+      <l:template name="section" text="%n.&#160;%t"/>
+      <l:template name="simplesect" text="%t"/>
+   </l:context>
+
+   <l:context name="subtitle">
+      <l:template name="appendix" text="%s"/>
+      <l:template name="article" text="%s"/>
+      <l:template name="bibliodiv" text="%s"/>
+      <l:template name="biblioentry" text="%s"/>
+      <l:template name="bibliography" text="%s"/>
+      <l:template name="bibliomixed" text="%s"/>
+      <l:template name="bibliomset" text="%s"/>
+      <l:template name="biblioset" text="%s"/>
+      <l:template name="book" text="%s"/>
+      <l:template name="chapter" text="%s"/>
+      <l:template name="colophon" text="%s"/>
+      <l:template name="dedication" text="%s"/>
+      <l:template name="glossary" text="%s"/>
+      <l:template name="glossdiv" text="%s"/>
+      <l:template name="index" text="%s"/>
+      <l:template name="indexdiv" text="%s"/>
+      <l:template name="lot" text="%s"/>
+      <l:template name="part" text="%s"/>
+      <l:template name="partintro" text="%s"/>
+      <l:template name="preface" text="%s"/>
+      <l:template name="refentry" text="%s"/>
+      <l:template name="reference" text="%s"/>
+      <l:template name="refsection" text="%s"/>
+      <l:template name="refsect1" text="%s"/>
+      <l:template name="refsect2" text="%s"/>
+      <l:template name="refsect3" text="%s"/>
+      <l:template name="refsynopsisdiv" text="%s"/>
+      <l:template name="sect1" text="%s"/>
+      <l:template name="sect2" text="%s"/>
+      <l:template name="sect3" text="%s"/>
+      <l:template name="sect4" text="%s"/>
+      <l:template name="sect5" text="%s"/>
+      <l:template name="section" text="%s"/>
+      <l:template name="set" text="%s"/>
+      <l:template name="setindex" text="%s"/>
+      <l:template name="sidebar" text="%s"/>
+      <l:template name="simplesect" text="%s"/>
+      <l:template name="toc" text="%s"/>
+   </l:context>
+
+   <l:context name="xref">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="R:&#160;%n"/>
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="constraintdef" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="%t"/>
+      <l:template name="example" text="%t"/>
+      <l:template name="figure" text="%t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text="%n"/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="%t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="D:&#160;%n"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="D:&#160;%n"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="table" text="%t"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="%n"/>
+      <l:template name="warning" text="%t"/>
+      <l:template name="page.citation" text=" [%p]"/>
+      <l:template name="page" text="(page %p)" lang="en"/>
+      <l:template name="pageabbrev" text="(p. %p)" lang="en"/>
+      <l:template name="Page" text="Page %p" lang="en"/>
+      <l:template name="bridgehead" text="la sezione chiamata &#8220;%t&#8221;"/>
+      <l:template name="refsection" text="la sezione chiamata &#8220;%t&#8221;"/>
+      <l:template name="refsect1" text="la sezione chiamata &#8220;%t&#8221;"/>
+      <l:template name="refsect2" text="la sezione chiamata &#8220;%t&#8221;"/>
+      <l:template name="refsect3" text="la sezione chiamata &#8220;%t&#8221;"/>
+      <l:template name="sect1" text="la sezione chiamata &#8220;%t&#8221;"/>
+      <l:template name="sect2" text="la sezione chiamata &#8220;%t&#8221;"/>
+      <l:template name="sect3" text="la sezione chiamata &#8220;%t&#8221;"/>
+      <l:template name="sect4" text="la sezione chiamata &#8220;%t&#8221;"/>
+      <l:template name="sect5" text="la sezione chiamata &#8220;%t&#8221;"/>
+      <l:template name="section" text="la sezione chiamata &#8220;%t&#8221;"/>
+      <l:template name="simplesect" text="la sezione chiamata &#8220;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="xref-number">
+      <l:template name="answer" text="R:&#160;%n"/>
+      <l:template name="appendix" text="Appendice&#160;%n"/>
+      <l:template name="bridgehead" text="Sezione&#160;%n"/>
+      <l:template name="chapter" text="Capitolo&#160;%n"/>
+      <l:template name="equation" text="Equazione&#160;%n"/>
+      <l:template name="example" text="Esempio&#160;%n"/>
+      <l:template name="figure" text="Figura&#160;%n"/>
+      <l:template name="part" text="Parte&#160;%n"/>
+      <l:template name="procedure" text="Procedura&#160;%n"/>
+      <l:template name="productionset" text="Produzione&#160;%n"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n"/>
+      <l:template name="qandaentry" text="D:&#160;%n"/>
+      <l:template name="question" text="D:&#160;%n"/>
+      <l:template name="sect1" text="Sezione&#160;%n"/>
+      <l:template name="sect2" text="Sezione&#160;%n"/>
+      <l:template name="sect3" text="Sezione&#160;%n"/>
+      <l:template name="sect4" text="Sezione&#160;%n"/>
+      <l:template name="sect5" text="Sezione&#160;%n"/>
+      <l:template name="section" text="Sezione&#160;%n"/>
+      <l:template name="table" text="Tabella&#160;%n"/>
+   </l:context>
+
+   <l:context name="xref-number-and-title">
+      <l:template name="appendix" text="Appendice&#160;%n, %t"/>
+      <l:template name="bridgehead" text="Sezione&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="chapter" text="Capitolo&#160;%n, %t"/>
+      <l:template name="equation" text="Equazione&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="example" text="Esempio&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="figure" text="Figura&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="part" text="Parte&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="procedure" text="Procedura&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="productionset" text="Produzione&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="refsect1" text="la sezione chiamata &#8220;%t&#8221;"/>
+      <l:template name="refsect2" text="la sezione chiamata &#8220;%t&#8221;"/>
+      <l:template name="refsect3" text="la sezione chiamata &#8220;%t&#8221;"/>
+      <l:template name="refsection" text="la sezione chiamata &#8220;%t&#8221;"/>
+      <l:template name="sect1" text="Sezione&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect2" text="Sezione&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect3" text="Sezione&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect4" text="Sezione&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect5" text="Sezione&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="section" text="Sezione&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="simplesect" text="la sezione chiamata &#8220;%t&#8221;"/>
+      <l:template name="table" text="Tabella&#160;%n, &#8220;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="authorgroup">
+      <l:template name="sep" text=", "/>
+      <l:template name="sep2" text=" e "/>
+      <l:template name="seplast" text=", e "/>
+   </l:context>
+
+   <l:context name="glossary">
+      <l:template name="see" text="Vedi "/>
+      <l:template name="seealso" text="Vedi Anche "/>
+   </l:context>
+
+   <l:context name="msgset">
+      <l:template name="MsgAud" text="Pubblico: "/>
+      <l:template name="MsgLevel" text="Livello: "/>
+      <l:template name="MsgOrig" text="Origine: "/>
+   </l:context>
+
+   <l:context name="datetime">
+      <l:template name="format" text="m/d/Y" lang="en"/>
+   </l:context>
+
+   <l:context name="datetime-full">
+      <l:template name="January" text="January" lang="en"/>
+      <l:template name="February" text="February" lang="en"/>
+      <l:template name="March" text="March" lang="en"/>
+      <l:template name="April" text="April" lang="en"/>
+      <l:template name="May" text="May" lang="en"/>
+      <l:template name="June" text="June" lang="en"/>
+      <l:template name="July" text="July" lang="en"/>
+      <l:template name="August" text="August" lang="en"/>
+      <l:template name="September" text="September" lang="en"/>
+      <l:template name="October" text="October" lang="en"/>
+      <l:template name="November" text="November" lang="en"/>
+      <l:template name="December" text="December" lang="en"/>
+      <l:template name="Monday" text="Monday" lang="en"/>
+      <l:template name="Tuesday" text="Tuesday" lang="en"/>
+      <l:template name="Wednesday" text="Wednesday" lang="en"/>
+      <l:template name="Thursday" text="Thursday" lang="en"/>
+      <l:template name="Friday" text="Friday" lang="en"/>
+      <l:template name="Saturday" text="Saturday" lang="en"/>
+      <l:template name="Sunday" text="Sunday" lang="en"/>
+   </l:context>
+
+   <l:context name="datetime-abbrev">
+      <l:template name="Jan" text="Jan" lang="en"/>
+      <l:template name="Feb" text="Feb" lang="en"/>
+      <l:template name="Mar" text="Mar" lang="en"/>
+      <l:template name="Apr" text="Apr" lang="en"/>
+      <l:template name="May" text="May" lang="en"/>
+      <l:template name="Jun" text="Jun" lang="en"/>
+      <l:template name="Jul" text="Jul" lang="en"/>
+      <l:template name="Aug" text="Aug" lang="en"/>
+      <l:template name="Sep" text="Sep" lang="en"/>
+      <l:template name="Oct" text="Oct" lang="en"/>
+      <l:template name="Nov" text="Nov" lang="en"/>
+      <l:template name="Dec" text="Dec" lang="en"/>
+      <l:template name="Mon" text="Mon" lang="en"/>
+      <l:template name="Tue" text="Tue" lang="en"/>
+      <l:template name="Wed" text="Wed" lang="en"/>
+      <l:template name="Thu" text="Thu" lang="en"/>
+      <l:template name="Fri" text="Fri" lang="en"/>
+      <l:template name="Sat" text="Sat" lang="en"/>
+      <l:template name="Sun" text="Sun" lang="en"/>
+   </l:context>
+
+   <l:context name="htmlhelp">
+      <l:template name="langcode" text="0x0410 Italian"/>
+   </l:context>
+
+   <l:letters lang="en">
+      <l:l i="-1"/>
+      <l:l i="0">Symbols</l:l>
+      <l:l i="10">A</l:l>
+      <l:l i="10">a</l:l>
+      <l:l i="10">&#192;</l:l>
+      <l:l i="10">&#224;</l:l>
+      <l:l i="10">&#193;</l:l>
+      <l:l i="10">&#225;</l:l>
+      <l:l i="10">&#194;</l:l>
+      <l:l i="10">&#226;</l:l>
+      <l:l i="10">&#195;</l:l>
+      <l:l i="10">&#227;</l:l>
+      <l:l i="10">&#196;</l:l>
+      <l:l i="10">&#228;</l:l>
+      <l:l i="10">&#197;</l:l>
+      <l:l i="10">&#229;</l:l>
+      <l:l i="10">&#256;</l:l>
+      <l:l i="10">&#257;</l:l>
+      <l:l i="10">&#258;</l:l>
+      <l:l i="10">&#259;</l:l>
+      <l:l i="10">&#260;</l:l>
+      <l:l i="10">&#261;</l:l>
+      <l:l i="10">&#461;</l:l>
+      <l:l i="10">&#462;</l:l>
+      <l:l i="10">&#478;</l:l>
+      <l:l i="10">&#479;</l:l>
+      <l:l i="10">&#480;</l:l>
+      <l:l i="10">&#481;</l:l>
+      <l:l i="10">&#506;</l:l>
+      <l:l i="10">&#507;</l:l>
+      <l:l i="10">&#512;</l:l>
+      <l:l i="10">&#513;</l:l>
+      <l:l i="10">&#514;</l:l>
+      <l:l i="10">&#515;</l:l>
+      <l:l i="10">&#550;</l:l>
+      <l:l i="10">&#551;</l:l>
+      <l:l i="10">&#7680;</l:l>
+      <l:l i="10">&#7681;</l:l>
+      <l:l i="10">&#7834;</l:l>
+      <l:l i="10">&#7840;</l:l>
+      <l:l i="10">&#7841;</l:l>
+      <l:l i="10">&#7842;</l:l>
+      <l:l i="10">&#7843;</l:l>
+      <l:l i="10">&#7844;</l:l>
+      <l:l i="10">&#7845;</l:l>
+      <l:l i="10">&#7846;</l:l>
+      <l:l i="10">&#7847;</l:l>
+      <l:l i="10">&#7848;</l:l>
+      <l:l i="10">&#7849;</l:l>
+      <l:l i="10">&#7850;</l:l>
+      <l:l i="10">&#7851;</l:l>
+      <l:l i="10">&#7852;</l:l>
+      <l:l i="10">&#7853;</l:l>
+      <l:l i="10">&#7854;</l:l>
+      <l:l i="10">&#7855;</l:l>
+      <l:l i="10">&#7856;</l:l>
+      <l:l i="10">&#7857;</l:l>
+      <l:l i="10">&#7858;</l:l>
+      <l:l i="10">&#7859;</l:l>
+      <l:l i="10">&#7860;</l:l>
+      <l:l i="10">&#7861;</l:l>
+      <l:l i="10">&#7862;</l:l>
+      <l:l i="10">&#7863;</l:l>
+      <l:l i="20">B</l:l>
+      <l:l i="20">b</l:l>
+      <l:l i="20">&#384;</l:l>
+      <l:l i="20">&#385;</l:l>
+      <l:l i="20">&#595;</l:l>
+      <l:l i="20">&#386;</l:l>
+      <l:l i="20">&#387;</l:l>
+      <l:l i="20">&#7682;</l:l>
+      <l:l i="20">&#7683;</l:l>
+      <l:l i="20">&#7684;</l:l>
+      <l:l i="20">&#7685;</l:l>
+      <l:l i="20">&#7686;</l:l>
+      <l:l i="20">&#7687;</l:l>
+      <l:l i="30">C</l:l>
+      <l:l i="30">c</l:l>
+      <l:l i="30">&#199;</l:l>
+      <l:l i="30">&#231;</l:l>
+      <l:l i="30">&#262;</l:l>
+      <l:l i="30">&#263;</l:l>
+      <l:l i="30">&#264;</l:l>
+      <l:l i="30">&#265;</l:l>
+      <l:l i="30">&#266;</l:l>
+      <l:l i="30">&#267;</l:l>
+      <l:l i="30">&#268;</l:l>
+      <l:l i="30">&#269;</l:l>
+      <l:l i="30">&#391;</l:l>
+      <l:l i="30">&#392;</l:l>
+      <l:l i="30">&#597;</l:l>
+      <l:l i="30">&#7688;</l:l>
+      <l:l i="30">&#7689;</l:l>
+      <l:l i="40">D</l:l>
+      <l:l i="40">d</l:l>
+      <l:l i="40">&#270;</l:l>
+      <l:l i="40">&#271;</l:l>
+      <l:l i="40">&#272;</l:l>
+      <l:l i="40">&#273;</l:l>
+      <l:l i="40">&#394;</l:l>
+      <l:l i="40">&#599;</l:l>
+      <l:l i="40">&#395;</l:l>
+      <l:l i="40">&#396;</l:l>
+      <l:l i="40">&#453;</l:l>
+      <l:l i="40">&#498;</l:l>
+      <l:l i="40">&#545;</l:l>
+      <l:l i="40">&#598;</l:l>
+      <l:l i="40">&#7690;</l:l>
+      <l:l i="40">&#7691;</l:l>
+      <l:l i="40">&#7692;</l:l>
+      <l:l i="40">&#7693;</l:l>
+      <l:l i="40">&#7694;</l:l>
+      <l:l i="40">&#7695;</l:l>
+      <l:l i="40">&#7696;</l:l>
+      <l:l i="40">&#7697;</l:l>
+      <l:l i="40">&#7698;</l:l>
+      <l:l i="40">&#7699;</l:l>
+      <l:l i="50">E</l:l>
+      <l:l i="50">e</l:l>
+      <l:l i="50">&#200;</l:l>
+      <l:l i="50">&#232;</l:l>
+      <l:l i="50">&#201;</l:l>
+      <l:l i="50">&#233;</l:l>
+      <l:l i="50">&#202;</l:l>
+      <l:l i="50">&#234;</l:l>
+      <l:l i="50">&#203;</l:l>
+      <l:l i="50">&#235;</l:l>
+      <l:l i="50">&#274;</l:l>
+      <l:l i="50">&#275;</l:l>
+      <l:l i="50">&#276;</l:l>
+      <l:l i="50">&#277;</l:l>
+      <l:l i="50">&#278;</l:l>
+      <l:l i="50">&#279;</l:l>
+      <l:l i="50">&#280;</l:l>
+      <l:l i="50">&#281;</l:l>
+      <l:l i="50">&#282;</l:l>
+      <l:l i="50">&#283;</l:l>
+      <l:l i="50">&#516;</l:l>
+      <l:l i="50">&#517;</l:l>
+      <l:l i="50">&#518;</l:l>
+      <l:l i="50">&#519;</l:l>
+      <l:l i="50">&#552;</l:l>
+      <l:l i="50">&#553;</l:l>
+      <l:l i="50">&#7700;</l:l>
+      <l:l i="50">&#7701;</l:l>
+      <l:l i="50">&#7702;</l:l>
+      <l:l i="50">&#7703;</l:l>
+      <l:l i="50">&#7704;</l:l>
+      <l:l i="50">&#7705;</l:l>
+      <l:l i="50">&#7706;</l:l>
+      <l:l i="50">&#7707;</l:l>
+      <l:l i="50">&#7708;</l:l>
+      <l:l i="50">&#7709;</l:l>
+      <l:l i="50">&#7864;</l:l>
+      <l:l i="50">&#7865;</l:l>
+      <l:l i="50">&#7866;</l:l>
+      <l:l i="50">&#7867;</l:l>
+      <l:l i="50">&#7868;</l:l>
+      <l:l i="50">&#7869;</l:l>
+      <l:l i="50">&#7870;</l:l>
+      <l:l i="50">&#7871;</l:l>
+      <l:l i="50">&#7872;</l:l>
+      <l:l i="50">&#7873;</l:l>
+      <l:l i="50">&#7874;</l:l>
+      <l:l i="50">&#7875;</l:l>
+      <l:l i="50">&#7876;</l:l>
+      <l:l i="50">&#7877;</l:l>
+      <l:l i="50">&#7878;</l:l>
+      <l:l i="50">&#7879;</l:l>
+      <l:l i="60">F</l:l>
+      <l:l i="60">f</l:l>
+      <l:l i="60">&#401;</l:l>
+      <l:l i="60">&#402;</l:l>
+      <l:l i="60">&#7710;</l:l>
+      <l:l i="60">&#7711;</l:l>
+      <l:l i="70">G</l:l>
+      <l:l i="70">g</l:l>
+      <l:l i="70">&#284;</l:l>
+      <l:l i="70">&#285;</l:l>
+      <l:l i="70">&#286;</l:l>
+      <l:l i="70">&#287;</l:l>
+      <l:l i="70">&#288;</l:l>
+      <l:l i="70">&#289;</l:l>
+      <l:l i="70">&#290;</l:l>
+      <l:l i="70">&#291;</l:l>
+      <l:l i="70">&#403;</l:l>
+      <l:l i="70">&#608;</l:l>
+      <l:l i="70">&#484;</l:l>
+      <l:l i="70">&#485;</l:l>
+      <l:l i="70">&#486;</l:l>
+      <l:l i="70">&#487;</l:l>
+      <l:l i="70">&#500;</l:l>
+      <l:l i="70">&#501;</l:l>
+      <l:l i="70">&#7712;</l:l>
+      <l:l i="70">&#7713;</l:l>
+      <l:l i="80">H</l:l>
+      <l:l i="80">h</l:l>
+      <l:l i="80">&#292;</l:l>
+      <l:l i="80">&#293;</l:l>
+      <l:l i="80">&#294;</l:l>
+      <l:l i="80">&#295;</l:l>
+      <l:l i="80">&#542;</l:l>
+      <l:l i="80">&#543;</l:l>
+      <l:l i="80">&#614;</l:l>
+      <l:l i="80">&#7714;</l:l>
+      <l:l i="80">&#7715;</l:l>
+      <l:l i="80">&#7716;</l:l>
+      <l:l i="80">&#7717;</l:l>
+      <l:l i="80">&#7718;</l:l>
+      <l:l i="80">&#7719;</l:l>
+      <l:l i="80">&#7720;</l:l>
+      <l:l i="80">&#7721;</l:l>
+      <l:l i="80">&#7722;</l:l>
+      <l:l i="80">&#7723;</l:l>
+      <l:l i="80">&#7830;</l:l>
+      <l:l i="90">I</l:l>
+      <l:l i="90">i</l:l>
+      <l:l i="90">&#204;</l:l>
+      <l:l i="90">&#236;</l:l>
+      <l:l i="90">&#205;</l:l>
+      <l:l i="90">&#237;</l:l>
+      <l:l i="90">&#206;</l:l>
+      <l:l i="90">&#238;</l:l>
+      <l:l i="90">&#207;</l:l>
+      <l:l i="90">&#239;</l:l>
+      <l:l i="90">&#296;</l:l>
+      <l:l i="90">&#297;</l:l>
+      <l:l i="90">&#298;</l:l>
+      <l:l i="90">&#299;</l:l>
+      <l:l i="90">&#300;</l:l>
+      <l:l i="90">&#301;</l:l>
+      <l:l i="90">&#302;</l:l>
+      <l:l i="90">&#303;</l:l>
+      <l:l i="90">&#304;</l:l>
+      <l:l i="90">&#407;</l:l>
+      <l:l i="90">&#616;</l:l>
+      <l:l i="90">&#463;</l:l>
+      <l:l i="90">&#464;</l:l>
+      <l:l i="90">&#520;</l:l>
+      <l:l i="90">&#521;</l:l>
+      <l:l i="90">&#522;</l:l>
+      <l:l i="90">&#523;</l:l>
+      <l:l i="90">&#7724;</l:l>
+      <l:l i="90">&#7725;</l:l>
+      <l:l i="90">&#7726;</l:l>
+      <l:l i="90">&#7727;</l:l>
+      <l:l i="90">&#7880;</l:l>
+      <l:l i="90">&#7881;</l:l>
+      <l:l i="90">&#7882;</l:l>
+      <l:l i="90">&#7883;</l:l>
+      <l:l i="100">J</l:l>
+      <l:l i="100">j</l:l>
+      <l:l i="100">&#308;</l:l>
+      <l:l i="100">&#309;</l:l>
+      <l:l i="100">&#496;</l:l>
+      <l:l i="100">&#669;</l:l>
+      <l:l i="110">K</l:l>
+      <l:l i="110">k</l:l>
+      <l:l i="110">&#310;</l:l>
+      <l:l i="110">&#311;</l:l>
+      <l:l i="110">&#408;</l:l>
+      <l:l i="110">&#409;</l:l>
+      <l:l i="110">&#488;</l:l>
+      <l:l i="110">&#489;</l:l>
+      <l:l i="110">&#7728;</l:l>
+      <l:l i="110">&#7729;</l:l>
+      <l:l i="110">&#7730;</l:l>
+      <l:l i="110">&#7731;</l:l>
+      <l:l i="110">&#7732;</l:l>
+      <l:l i="110">&#7733;</l:l>
+      <l:l i="120">L</l:l>
+      <l:l i="120">l</l:l>
+      <l:l i="120">&#313;</l:l>
+      <l:l i="120">&#314;</l:l>
+      <l:l i="120">&#315;</l:l>
+      <l:l i="120">&#316;</l:l>
+      <l:l i="120">&#317;</l:l>
+      <l:l i="120">&#318;</l:l>
+      <l:l i="120">&#319;</l:l>
+      <l:l i="120">&#320;</l:l>
+      <l:l i="120">&#321;</l:l>
+      <l:l i="120">&#322;</l:l>
+      <l:l i="120">&#410;</l:l>
+      <l:l i="120">&#456;</l:l>
+      <l:l i="120">&#564;</l:l>
+      <l:l i="120">&#619;</l:l>
+      <l:l i="120">&#620;</l:l>
+      <l:l i="120">&#621;</l:l>
+      <l:l i="120">&#7734;</l:l>
+      <l:l i="120">&#7735;</l:l>
+      <l:l i="120">&#7736;</l:l>
+      <l:l i="120">&#7737;</l:l>
+      <l:l i="120">&#7738;</l:l>
+      <l:l i="120">&#7739;</l:l>
+      <l:l i="120">&#7740;</l:l>
+      <l:l i="120">&#7741;</l:l>
+      <l:l i="130">M</l:l>
+      <l:l i="130">m</l:l>
+      <l:l i="130">&#625;</l:l>
+      <l:l i="130">&#7742;</l:l>
+      <l:l i="130">&#7743;</l:l>
+      <l:l i="130">&#7744;</l:l>
+      <l:l i="130">&#7745;</l:l>
+      <l:l i="130">&#7746;</l:l>
+      <l:l i="130">&#7747;</l:l>
+      <l:l i="140">N</l:l>
+      <l:l i="140">n</l:l>
+      <l:l i="140">&#209;</l:l>
+      <l:l i="140">&#241;</l:l>
+      <l:l i="140">&#323;</l:l>
+      <l:l i="140">&#324;</l:l>
+      <l:l i="140">&#325;</l:l>
+      <l:l i="140">&#326;</l:l>
+      <l:l i="140">&#327;</l:l>
+      <l:l i="140">&#328;</l:l>
+      <l:l i="140">&#413;</l:l>
+      <l:l i="140">&#626;</l:l>
+      <l:l i="140">&#414;</l:l>
+      <l:l i="140">&#544;</l:l>
+      <l:l i="140">&#459;</l:l>
+      <l:l i="140">&#504;</l:l>
+      <l:l i="140">&#505;</l:l>
+      <l:l i="140">&#565;</l:l>
+      <l:l i="140">&#627;</l:l>
+      <l:l i="140">&#7748;</l:l>
+      <l:l i="140">&#7749;</l:l>
+      <l:l i="140">&#7750;</l:l>
+      <l:l i="140">&#7751;</l:l>
+      <l:l i="140">&#7752;</l:l>
+      <l:l i="140">&#7753;</l:l>
+      <l:l i="140">&#7754;</l:l>
+      <l:l i="140">&#7755;</l:l>
+      <l:l i="150">O</l:l>
+      <l:l i="150">o</l:l>
+      <l:l i="150">&#210;</l:l>
+      <l:l i="150">&#242;</l:l>
+      <l:l i="150">&#211;</l:l>
+      <l:l i="150">&#243;</l:l>
+      <l:l i="150">&#212;</l:l>
+      <l:l i="150">&#244;</l:l>
+      <l:l i="150">&#213;</l:l>
+      <l:l i="150">&#245;</l:l>
+      <l:l i="150">&#214;</l:l>
+      <l:l i="150">&#246;</l:l>
+      <l:l i="150">&#216;</l:l>
+      <l:l i="150">&#248;</l:l>
+      <l:l i="150">&#332;</l:l>
+      <l:l i="150">&#333;</l:l>
+      <l:l i="150">&#334;</l:l>
+      <l:l i="150">&#335;</l:l>
+      <l:l i="150">&#336;</l:l>
+      <l:l i="150">&#337;</l:l>
+      <l:l i="150">&#415;</l:l>
+      <l:l i="150">&#416;</l:l>
+      <l:l i="150">&#417;</l:l>
+      <l:l i="150">&#465;</l:l>
+      <l:l i="150">&#466;</l:l>
+      <l:l i="150">&#490;</l:l>
+      <l:l i="150">&#491;</l:l>
+      <l:l i="150">&#492;</l:l>
+      <l:l i="150">&#493;</l:l>
+      <l:l i="150">&#510;</l:l>
+      <l:l i="150">&#511;</l:l>
+      <l:l i="150">&#524;</l:l>
+      <l:l i="150">&#525;</l:l>
+      <l:l i="150">&#526;</l:l>
+      <l:l i="150">&#527;</l:l>
+      <l:l i="150">&#554;</l:l>
+      <l:l i="150">&#555;</l:l>
+      <l:l i="150">&#556;</l:l>
+      <l:l i="150">&#557;</l:l>
+      <l:l i="150">&#558;</l:l>
+      <l:l i="150">&#559;</l:l>
+      <l:l i="150">&#560;</l:l>
+      <l:l i="150">&#561;</l:l>
+      <l:l i="150">&#7756;</l:l>
+      <l:l i="150">&#7757;</l:l>
+      <l:l i="150">&#7758;</l:l>
+      <l:l i="150">&#7759;</l:l>
+      <l:l i="150">&#7760;</l:l>
+      <l:l i="150">&#7761;</l:l>
+      <l:l i="150">&#7762;</l:l>
+      <l:l i="150">&#7763;</l:l>
+      <l:l i="150">&#7884;</l:l>
+      <l:l i="150">&#7885;</l:l>
+      <l:l i="150">&#7886;</l:l>
+      <l:l i="150">&#7887;</l:l>
+      <l:l i="150">&#7888;</l:l>
+      <l:l i="150">&#7889;</l:l>
+      <l:l i="150">&#7890;</l:l>
+      <l:l i="150">&#7891;</l:l>
+      <l:l i="150">&#7892;</l:l>
+      <l:l i="150">&#7893;</l:l>
+      <l:l i="150">&#7894;</l:l>
+      <l:l i="150">&#7895;</l:l>
+      <l:l i="150">&#7896;</l:l>
+      <l:l i="150">&#7897;</l:l>
+      <l:l i="150">&#7898;</l:l>
+      <l:l i="150">&#7899;</l:l>
+      <l:l i="150">&#7900;</l:l>
+      <l:l i="150">&#7901;</l:l>
+      <l:l i="150">&#7902;</l:l>
+      <l:l i="150">&#7903;</l:l>
+      <l:l i="150">&#7904;</l:l>
+      <l:l i="150">&#7905;</l:l>
+      <l:l i="150">&#7906;</l:l>
+      <l:l i="150">&#7907;</l:l>
+      <l:l i="160">P</l:l>
+      <l:l i="160">p</l:l>
+      <l:l i="160">&#420;</l:l>
+      <l:l i="160">&#421;</l:l>
+      <l:l i="160">&#7764;</l:l>
+      <l:l i="160">&#7765;</l:l>
+      <l:l i="160">&#7766;</l:l>
+      <l:l i="160">&#7767;</l:l>
+      <l:l i="170">Q</l:l>
+      <l:l i="170">q</l:l>
+      <l:l i="170">&#672;</l:l>
+      <l:l i="180">R</l:l>
+      <l:l i="180">r</l:l>
+      <l:l i="180">&#340;</l:l>
+      <l:l i="180">&#341;</l:l>
+      <l:l i="180">&#342;</l:l>
+      <l:l i="180">&#343;</l:l>
+      <l:l i="180">&#344;</l:l>
+      <l:l i="180">&#345;</l:l>
+      <l:l i="180">&#528;</l:l>
+      <l:l i="180">&#529;</l:l>
+      <l:l i="180">&#530;</l:l>
+      <l:l i="180">&#531;</l:l>
+      <l:l i="180">&#636;</l:l>
+      <l:l i="180">&#637;</l:l>
+      <l:l i="180">&#638;</l:l>
+      <l:l i="180">&#7768;</l:l>
+      <l:l i="180">&#7769;</l:l>
+      <l:l i="180">&#7770;</l:l>
+      <l:l i="180">&#7771;</l:l>
+      <l:l i="180">&#7772;</l:l>
+      <l:l i="180">&#7773;</l:l>
+      <l:l i="180">&#7774;</l:l>
+      <l:l i="180">&#7775;</l:l>
+      <l:l i="190">S</l:l>
+      <l:l i="190">s</l:l>
+      <l:l i="190">&#346;</l:l>
+      <l:l i="190">&#347;</l:l>
+      <l:l i="190">&#348;</l:l>
+      <l:l i="190">&#349;</l:l>
+      <l:l i="190">&#350;</l:l>
+      <l:l i="190">&#351;</l:l>
+      <l:l i="190">&#352;</l:l>
+      <l:l i="190">&#353;</l:l>
+      <l:l i="190">&#536;</l:l>
+      <l:l i="190">&#537;</l:l>
+      <l:l i="190">&#642;</l:l>
+      <l:l i="190">&#7776;</l:l>
+      <l:l i="190">&#7777;</l:l>
+      <l:l i="190">&#7778;</l:l>
+      <l:l i="190">&#7779;</l:l>
+      <l:l i="190">&#7780;</l:l>
+      <l:l i="190">&#7781;</l:l>
+      <l:l i="190">&#7782;</l:l>
+      <l:l i="190">&#7783;</l:l>
+      <l:l i="190">&#7784;</l:l>
+      <l:l i="190">&#7785;</l:l>
+      <l:l i="200">T</l:l>
+      <l:l i="200">t</l:l>
+      <l:l i="200">&#354;</l:l>
+      <l:l i="200">&#355;</l:l>
+      <l:l i="200">&#356;</l:l>
+      <l:l i="200">&#357;</l:l>
+      <l:l i="200">&#358;</l:l>
+      <l:l i="200">&#359;</l:l>
+      <l:l i="200">&#427;</l:l>
+      <l:l i="200">&#428;</l:l>
+      <l:l i="200">&#429;</l:l>
+      <l:l i="200">&#430;</l:l>
+      <l:l i="200">&#648;</l:l>
+      <l:l i="200">&#538;</l:l>
+      <l:l i="200">&#539;</l:l>
+      <l:l i="200">&#566;</l:l>
+      <l:l i="200">&#7786;</l:l>
+      <l:l i="200">&#7787;</l:l>
+      <l:l i="200">&#7788;</l:l>
+      <l:l i="200">&#7789;</l:l>
+      <l:l i="200">&#7790;</l:l>
+      <l:l i="200">&#7791;</l:l>
+      <l:l i="200">&#7792;</l:l>
+      <l:l i="200">&#7793;</l:l>
+      <l:l i="200">&#7831;</l:l>
+      <l:l i="210">U</l:l>
+      <l:l i="210">u</l:l>
+      <l:l i="210">&#217;</l:l>
+      <l:l i="210">&#249;</l:l>
+      <l:l i="210">&#218;</l:l>
+      <l:l i="210">&#250;</l:l>
+      <l:l i="210">&#219;</l:l>
+      <l:l i="210">&#251;</l:l>
+      <l:l i="210">&#220;</l:l>
+      <l:l i="210">&#252;</l:l>
+      <l:l i="210">&#360;</l:l>
+      <l:l i="210">&#361;</l:l>
+      <l:l i="210">&#362;</l:l>
+      <l:l i="210">&#363;</l:l>
+      <l:l i="210">&#364;</l:l>
+      <l:l i="210">&#365;</l:l>
+      <l:l i="210">&#366;</l:l>
+      <l:l i="210">&#367;</l:l>
+      <l:l i="210">&#368;</l:l>
+      <l:l i="210">&#369;</l:l>
+      <l:l i="210">&#370;</l:l>
+      <l:l i="210">&#371;</l:l>
+      <l:l i="210">&#431;</l:l>
+      <l:l i="210">&#432;</l:l>
+      <l:l i="210">&#467;</l:l>
+      <l:l i="210">&#468;</l:l>
+      <l:l i="210">&#469;</l:l>
+      <l:l i="210">&#470;</l:l>
+      <l:l i="210">&#471;</l:l>
+      <l:l i="210">&#472;</l:l>
+      <l:l i="210">&#473;</l:l>
+      <l:l i="210">&#474;</l:l>
+      <l:l i="210">&#475;</l:l>
+      <l:l i="210">&#476;</l:l>
+      <l:l i="210">&#532;</l:l>
+      <l:l i="210">&#533;</l:l>
+      <l:l i="210">&#534;</l:l>
+      <l:l i="210">&#535;</l:l>
+      <l:l i="210">&#7794;</l:l>
+      <l:l i="210">&#7795;</l:l>
+      <l:l i="210">&#7796;</l:l>
+      <l:l i="210">&#7797;</l:l>
+      <l:l i="210">&#7798;</l:l>
+      <l:l i="210">&#7799;</l:l>
+      <l:l i="210">&#7800;</l:l>
+      <l:l i="210">&#7801;</l:l>
+      <l:l i="210">&#7802;</l:l>
+      <l:l i="210">&#7803;</l:l>
+      <l:l i="210">&#7908;</l:l>
+      <l:l i="210">&#7909;</l:l>
+      <l:l i="210">&#7910;</l:l>
+      <l:l i="210">&#7911;</l:l>
+      <l:l i="210">&#7912;</l:l>
+      <l:l i="210">&#7913;</l:l>
+      <l:l i="210">&#7914;</l:l>
+      <l:l i="210">&#7915;</l:l>
+      <l:l i="210">&#7916;</l:l>
+      <l:l i="210">&#7917;</l:l>
+      <l:l i="210">&#7918;</l:l>
+      <l:l i="210">&#7919;</l:l>
+      <l:l i="210">&#7920;</l:l>
+      <l:l i="210">&#7921;</l:l>
+      <l:l i="220">V</l:l>
+      <l:l i="220">v</l:l>
+      <l:l i="220">&#434;</l:l>
+      <l:l i="220">&#651;</l:l>
+      <l:l i="220">&#7804;</l:l>
+      <l:l i="220">&#7805;</l:l>
+      <l:l i="220">&#7806;</l:l>
+      <l:l i="220">&#7807;</l:l>
+      <l:l i="230">W</l:l>
+      <l:l i="230">w</l:l>
+      <l:l i="230">&#372;</l:l>
+      <l:l i="230">&#373;</l:l>
+      <l:l i="230">&#7808;</l:l>
+      <l:l i="230">&#7809;</l:l>
+      <l:l i="230">&#7810;</l:l>
+      <l:l i="230">&#7811;</l:l>
+      <l:l i="230">&#7812;</l:l>
+      <l:l i="230">&#7813;</l:l>
+      <l:l i="230">&#7814;</l:l>
+      <l:l i="230">&#7815;</l:l>
+      <l:l i="230">&#7816;</l:l>
+      <l:l i="230">&#7817;</l:l>
+      <l:l i="230">&#7832;</l:l>
+      <l:l i="240">X</l:l>
+      <l:l i="240">x</l:l>
+      <l:l i="240">&#7818;</l:l>
+      <l:l i="240">&#7819;</l:l>
+      <l:l i="240">&#7820;</l:l>
+      <l:l i="240">&#7821;</l:l>
+      <l:l i="250">Y</l:l>
+      <l:l i="250">y</l:l>
+      <l:l i="250">&#221;</l:l>
+      <l:l i="250">&#253;</l:l>
+      <l:l i="250">&#255;</l:l>
+      <l:l i="250">&#376;</l:l>
+      <l:l i="250">&#374;</l:l>
+      <l:l i="250">&#375;</l:l>
+      <l:l i="250">&#435;</l:l>
+      <l:l i="250">&#436;</l:l>
+      <l:l i="250">&#562;</l:l>
+      <l:l i="250">&#563;</l:l>
+      <l:l i="250">&#7822;</l:l>
+      <l:l i="250">&#7823;</l:l>
+      <l:l i="250">&#7833;</l:l>
+      <l:l i="250">&#7922;</l:l>
+      <l:l i="250">&#7923;</l:l>
+      <l:l i="250">&#7924;</l:l>
+      <l:l i="250">&#7925;</l:l>
+      <l:l i="250">&#7926;</l:l>
+      <l:l i="250">&#7927;</l:l>
+      <l:l i="250">&#7928;</l:l>
+      <l:l i="250">&#7929;</l:l>
+      <l:l i="260">Z</l:l>
+      <l:l i="260">z</l:l>
+      <l:l i="260">&#377;</l:l>
+      <l:l i="260">&#378;</l:l>
+      <l:l i="260">&#379;</l:l>
+      <l:l i="260">&#380;</l:l>
+      <l:l i="260">&#381;</l:l>
+      <l:l i="260">&#382;</l:l>
+      <l:l i="260">&#437;</l:l>
+      <l:l i="260">&#438;</l:l>
+      <l:l i="260">&#548;</l:l>
+      <l:l i="260">&#549;</l:l>
+      <l:l i="260">&#656;</l:l>
+      <l:l i="260">&#657;</l:l>
+      <l:l i="260">&#7824;</l:l>
+      <l:l i="260">&#7825;</l:l>
+      <l:l i="260">&#7826;</l:l>
+      <l:l i="260">&#7827;</l:l>
+      <l:l i="260">&#7828;</l:l>
+      <l:l i="260">&#7829;</l:l>
+   </l:letters>
+</l:l10n>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/ja.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/ja.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/ja.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1153 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="ja" english-language-name="Japanese">
+
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+   <l:gentext key="Abstract" text="&#27010;&#35201;"/>
+   <l:gentext key="abstract" text="&#27010;&#35201;"/>
+   <l:gentext key="Answer" text="&#31572;&#65306;"/>
+   <l:gentext key="answer" text="&#31572;&#65306;"/>
+   <l:gentext key="Appendix" text="&#20184;&#37682;"/>
+   <l:gentext key="appendix" text="&#20184;&#37682;"/>
+   <l:gentext key="Article" text="&#38917;&#30446;"/>
+   <l:gentext key="article" text="&#38917;&#30446;"/>
+   <l:gentext key="Bibliography" text="&#21442;&#32771;&#25991;&#29486;"/>
+   <l:gentext key="bibliography" text="&#21442;&#32771;&#25991;&#29486;"/>
+   <l:gentext key="Book" text="&#12502;&#12483;&#12463;"/>
+   <l:gentext key="book" text="&#12502;&#12483;&#12463;"/>
+   <l:gentext key="CAUTION" text="&#27880;&#24847;"/>
+   <l:gentext key="Caution" text="&#27880;&#24847;"/>
+   <l:gentext key="caution" text="&#27880;&#24847;"/>
+   <l:gentext key="Chapter" text="&#31456;"/>
+   <l:gentext key="chapter" text="&#31456;"/>
+   <l:gentext key="Colophon" text="&#22885;&#20184;"/>
+   <l:gentext key="colophon" text="&#22885;&#20184;"/>
+   <l:gentext key="Copyright" text="&#35069;&#20316;&#33879;&#20316;"/>
+   <l:gentext key="copyright" text="&#35069;&#20316;&#33879;&#20316;"/>
+   <l:gentext key="Dedication" text="&#35613;&#36766;"/>
+   <l:gentext key="dedication" text="&#35613;&#36766;"/>
+   <l:gentext key="Edition" text="&#32232;&#38598;"/>
+   <l:gentext key="edition" text="&#32232;&#38598;"/>
+   <l:gentext key="Equation" text="&#24335;"/>
+   <l:gentext key="equation" text="&#24335;"/>
+   <l:gentext key="Example" text="&#20363;"/>
+   <l:gentext key="example" text="&#20363;"/>
+   <l:gentext key="Figure" text="&#22259;"/>
+   <l:gentext key="figure" text="&#22259;"/>
+   <l:gentext key="Glossary" text="&#29992;&#35486;&#38598;"/>
+   <l:gentext key="glossary" text="&#29992;&#35486;&#38598;"/>
+   <l:gentext key="GlossSee" text="&#21442;&#29031;"/>
+   <l:gentext key="glosssee" text="&#21442;&#29031;"/>
+   <l:gentext key="GlossSeeAlso" text="&#21442;&#29031;"/>
+   <l:gentext key="glossseealso" text="&#21442;&#29031;"/>
+   <l:gentext key="IMPORTANT" text="&#37325;&#35201;&#38917;&#30446;"/>
+   <l:gentext key="important" text="&#37325;&#35201;&#38917;&#30446;"/>
+   <l:gentext key="Important" text="&#37325;&#35201;&#38917;&#30446;"/>
+   <l:gentext key="Index" text="&#30446;&#27425;"/>
+   <l:gentext key="index" text="&#30446;&#27425;"/>
+   <l:gentext key="ISBN" text="ISBN"/>
+   <l:gentext key="isbn" text="ISBN"/>
+   <l:gentext key="LegalNotice" text="Legal Notice"/>
+   <l:gentext key="legalnotice" text="Legal Notice"/>
+   <l:gentext key="MsgAud" text="&#23550;&#35937;&#32773;"/>
+   <l:gentext key="msgaud" text="&#23550;&#35937;&#32773;"/>
+   <l:gentext key="MsgLevel" text="&#12524;&#12505;&#12523;"/>
+   <l:gentext key="msglevel" text="&#12524;&#12505;&#12523;"/>
+   <l:gentext key="MsgOrig" text="&#30330;&#20449;&#20803;"/>
+   <l:gentext key="msgorig" text="&#30330;&#20449;&#20803;"/>
+   <l:gentext key="NOTE" text="&#27880;&#24847;"/>
+   <l:gentext key="Note" text="&#27880;&#24847;"/>
+   <l:gentext key="note" text="&#27880;&#24847;"/>
+   <l:gentext key="Part" text="&#12497;&#12540;&#12488;"/>
+   <l:gentext key="part" text="&#12497;&#12540;&#12488;"/>
+   <l:gentext key="Preface" text="&#24207;&#25991;"/>
+   <l:gentext key="preface" text="&#24207;&#25991;"/>
+   <l:gentext key="Procedure" text="&#25163;&#38918;"/>
+   <l:gentext key="procedure" text="&#25163;&#38918;"/>
+   <l:gentext key="ProductionSet" text="&#12503;&#12525;&#12480;&#12463;&#12471;&#12519;&#12531;"/>
+   <l:gentext key="PubDate" text="Publication Date" lang="en"/>
+   <l:gentext key="pubdate" text="Publication date" lang="en"/>
+   <l:gentext key="Published" text="&#30330;&#34892;"/>
+   <l:gentext key="published" text="&#30330;&#34892;"/>
+   <l:gentext key="Qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="Question" text="&#21839;&#65306;"/>
+   <l:gentext key="question" text="&#21839;&#65306;"/>
+   <l:gentext key="RefEntry" text=""/>
+   <l:gentext key="refentry" text=""/>
+   <l:gentext key="Reference" text="&#21442;&#29031;"/>
+   <l:gentext key="reference" text="&#21442;&#29031;"/>
+   <l:gentext key="RefName" text="&#21517;&#21069;"/>
+   <l:gentext key="refname" text="&#21517;&#21069;"/>
+   <l:gentext key="RefSection" text=""/>
+   <l:gentext key="refsection" text=""/>
+   <l:gentext key="RefSynopsisDiv" text="&#27010;&#35201;"/>
+   <l:gentext key="refsynopsisdiv" text="&#27010;&#35201;"/>
+   <l:gentext key="RevHistory" text="&#25913;&#35330;&#23653;&#27508;"/>
+   <l:gentext key="revhistory" text="&#25913;&#35330;&#23653;&#27508;"/>
+   <l:gentext key="revision" text="&#25913;&#35330;"/>
+   <l:gentext key="Revision" text="&#25913;&#35330;"/>
+   <l:gentext key="sect1" text="&#38917;"/>
+   <l:gentext key="sect2" text="&#38917;"/>
+   <l:gentext key="sect3" text="&#38917;"/>
+   <l:gentext key="sect4" text="&#38917;"/>
+   <l:gentext key="sect5" text="&#38917;"/>
+   <l:gentext key="section" text="&#38917;"/>
+   <l:gentext key="Section" text="&#38917;"/>
+   <l:gentext key="see" text="&#21442;&#29031;"/>
+   <l:gentext key="See" text="&#21442;&#29031;"/>
+   <l:gentext key="seealso" text="&#21442;&#29031;"/>
+   <l:gentext key="Seealso" text="&#21442;&#29031;"/>
+   <l:gentext key="SeeAlso" text="&#21442;&#29031;"/>
+   <l:gentext key="set" text="&#35373;&#23450;"/>
+   <l:gentext key="Set" text="&#35373;&#23450;"/>
+   <l:gentext key="setindex" text="&#30446;&#27425;&#35373;&#23450;"/>
+   <l:gentext key="SetIndex" text="&#30446;&#27425;&#35373;&#23450;"/>
+   <l:gentext key="Sidebar" text=""/>
+   <l:gentext key="sidebar" text="&#12469;&#12452;&#12489;&#12496;&#12540;"/>
+   <l:gentext key="step" text="&#12473;&#12486;&#12483;&#12503;"/>
+   <l:gentext key="Step" text="&#12473;&#12486;&#12483;&#12503;"/>
+   <l:gentext key="Table" text="&#34920;"/>
+   <l:gentext key="table" text="&#34920;"/>
+   <l:gentext key="tip" text="&#12486;&#12451;&#12483;&#12503;"/>
+   <l:gentext key="TIP" text="&#12486;&#12451;&#12483;&#12503;"/>
+   <l:gentext key="Tip" text="&#12486;&#12451;&#12483;&#12503;"/>
+   <l:gentext key="Warning" text="&#35686;&#21578;"/>
+   <l:gentext key="warning" text="&#35686;&#21578;"/>
+   <l:gentext key="WARNING" text="&#35686;&#21578;"/>
+   <l:gentext key="and" text="&#12289;"/>
+   <l:gentext key="by" text="&#65306;"/>
+   <l:gentext key="called" text="called" lang="en"/>
+   <l:gentext key="Edited" text="&#20316;&#32773;"/>
+   <l:gentext key="edited" text="&#20316;&#32773;"/>
+   <l:gentext key="Editedby" text="&#20316;&#32773;&#65306;"/>
+   <l:gentext key="editedby" text="&#20316;&#32773;&#65306;"/>
+   <l:gentext key="in" text="in"/>
+   <l:gentext key="lastlistcomma" text=","/>
+   <l:gentext key="listcomma" text=","/>
+   <l:gentext key="nonexistantelement" text="&#35201;&#32032;&#12364;&#23384;&#22312;&#12375;&#12414;&#12379;&#12435;"/>
+   <l:gentext key="notes" text="&#27880;&#24847;"/>
+   <l:gentext key="Notes" text="&#27880;&#24847;"/>
+   <l:gentext key="Pgs" text="&#20583;&#29486;"/>
+   <l:gentext key="pgs" text="&#20583;&#29486;"/>
+   <l:gentext key="Revisedby" text="Revised by: "/>
+   <l:gentext key="revisedby" text="Revised by: "/>
+   <l:gentext key="TableNotes" text="&#27880;&#24847;"/>
+   <l:gentext key="tablenotes" text="&#27880;&#24847;"/>
+   <l:gentext key="TableofContents" text="&#30446;&#27425;"/>
+   <l:gentext key="tableofcontents" text="&#30446;&#27425;"/>
+   <l:gentext key="the" text="" lang="en"/>
+   <l:gentext key="unexpectedelementname" text="&#19981;&#26126;&#12394;&#35201;&#32032;&#21517;"/>
+   <l:gentext key="unsupported" text="&#12469;&#12509;&#12540;&#12488;&#12375;&#12414;&#12379;&#12435;"/>
+   <l:gentext key="xrefto" text="xref to"/>
+   <l:gentext key="listofequations" text="&#24335;&#30446;&#27425;"/>
+   <l:gentext key="ListofEquations" text="&#24335;&#30446;&#27425;"/>
+   <l:gentext key="ListofExamples" text="&#20363;&#30446;&#27425;"/>
+   <l:gentext key="listofexamples" text="&#20363;&#30446;&#27425;"/>
+   <l:gentext key="ListofFigures" text="&#22259;&#30446;&#27425;"/>
+   <l:gentext key="listoffigures" text="&#22259;&#30446;&#27425;"/>
+   <l:gentext key="ListofProcedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listofprocedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listoftables" text="&#34920;&#30446;&#27425;"/>
+   <l:gentext key="ListofTables" text="&#34920;&#30446;&#27425;"/>
+   <l:gentext key="ListofUnknown" text="&#19981;&#26126;&#30446;&#27425;"/>
+   <l:gentext key="listofunknown" text="&#19981;&#26126;&#30446;&#27425;"/>
+   <l:gentext key="nav-home" text="&#12507;&#12540;&#12512;"/>
+   <l:gentext key="nav-next" text="&#27425;&#12398;&#12506;&#12540;&#12472;"/>
+   <l:gentext key="nav-next-sibling" text="&#26089;&#36865;&#12426;"/>
+   <l:gentext key="nav-prev" text="&#21069;&#12398;&#12506;&#12540;&#12472;"/>
+   <l:gentext key="nav-prev-sibling" text="&#24059;&#25147;&#12375;"/>
+   <l:gentext key="nav-up" text="&#19978;&#12395;&#25147;&#12427;"/>
+   <l:gentext key="nav-toc" text="ToC" lang="en"/>
+   <l:gentext key="Draft" text="Draft"/>
+   <l:gentext key="above" text="above"/>
+   <l:gentext key="below" text="below"/>
+   <l:gentext key="sectioncalled" text="the section called"/>
+   <l:gentext key="index symbols" text="&#12471;&#12531;&#12508;&#12523;"/>
+   <l:gentext key="lowercase.alpha" text="abcdefghijklmnopqrstuvwxyz" lang="en"/>
+   <l:gentext key="uppercase.alpha" text="ABCDEFGHIJKLMNOPQRSTUVWXYZ" lang="en"/>
+   <l:dingbat key="startquote" text="&#12300;"/>
+   <l:dingbat key="endquote" text="&#12301;"/>
+   <l:dingbat key="nestedstartquote" text="&#12302;"/>
+   <l:dingbat key="nestedendquote" text="&#12303;"/>
+   <l:dingbat key="singlestartquote" text="&#8216;" lang="en"/>
+   <l:dingbat key="singleendquote" text="&#8217;" lang="en"/>
+   <l:dingbat key="bullet" text="&#9679;"/>
+   <l:gentext key="hyphenation-character" text="-" lang="en"/>
+   <l:gentext key="hyphenation-push-character-count" text="2" lang="en"/>
+   <l:gentext key="hyphenation-remain-character-count" text="2" lang="en"/>
+
+   <l:context name="styles">
+      <l:template name="person-name" text="family-given"/>
+   </l:context>
+
+   <l:context name="title">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="%t"/>
+      <l:template name="appendix" text="&#20184;&#37682; %n. %t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="biblioentry" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliolist" text="%t" lang="en"/>
+      <l:template name="bibliomixed" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="&#31532;%n&#31456; %t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="&#24335; %n. %t"/>
+      <l:template name="example" text="&#20363; %n. %t"/>
+      <l:template name="figure" text="&#22259; %n. %t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="glosslist" text="%t" lang="en"/>
+      <l:template name="glossentry" text="%t" lang="en"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text=""/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="&#12497;&#12540;&#12488; %n. %t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="procedure.formal" text="&#25163;&#38918; %n. %t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="productionset.formal" text="&#12503;&#12525;&#12480;&#12463;&#12471;&#12519;&#12531; %n"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="%t"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="%t"/>
+      <l:template name="refentry" text="%t"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsection" text="%t"/>
+      <l:template name="refsect1" text="%t"/>
+      <l:template name="refsect2" text="%t"/>
+      <l:template name="refsect3" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="refsynopsisdivinfo" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="step" text="%t"/>
+      <l:template name="table" text="&#34920; %n. %t"/>
+      <l:template name="task" text="%t" lang="en"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="" lang="en"/>
+      <l:template name="warning" text="%t"/>
+   </l:context>
+
+   <l:context name="title-unnumbered">
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article/appendix" text="%t" lang="en"/>
+      <l:template name="bridgehead" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="sect1" text="%t"/>
+      <l:template name="sect2" text="%t"/>
+      <l:template name="sect3" text="%t"/>
+      <l:template name="sect4" text="%t"/>
+      <l:template name="sect5" text="%t"/>
+      <l:template name="section" text="%t"/>
+      <l:template name="simplesect" text="%t"/>
+   </l:context>
+
+   <l:context name="title-numbered">
+      <l:template name="appendix" text="&#20184;&#37682; %n. %t"/>
+      <l:template name="article/appendix" text="%n.&#160;%t" lang="en"/>
+      <l:template name="bridgehead" text="%n. %t"/>
+      <l:template name="chapter" text="&#31532;%n&#31456; %t"/>
+      <l:template name="sect1" text="%n. %t"/>
+      <l:template name="sect2" text="%n. %t"/>
+      <l:template name="sect3" text="%n. %t"/>
+      <l:template name="sect4" text="%n. %t"/>
+      <l:template name="sect5" text="%n. %t"/>
+      <l:template name="section" text="%n. %t"/>
+      <l:template name="simplesect" text="%t"/>
+   </l:context>
+
+   <l:context name="subtitle">
+      <l:template name="appendix" text="%s"/>
+      <l:template name="article" text="%s"/>
+      <l:template name="bibliodiv" text="%s"/>
+      <l:template name="biblioentry" text="%s"/>
+      <l:template name="bibliography" text="%s"/>
+      <l:template name="bibliomixed" text="%s"/>
+      <l:template name="bibliomset" text="%s"/>
+      <l:template name="biblioset" text="%s"/>
+      <l:template name="book" text="%s"/>
+      <l:template name="chapter" text="%s"/>
+      <l:template name="colophon" text="%s"/>
+      <l:template name="dedication" text="%s"/>
+      <l:template name="glossary" text="%s"/>
+      <l:template name="glossdiv" text="%s"/>
+      <l:template name="index" text="%s"/>
+      <l:template name="indexdiv" text="%s"/>
+      <l:template name="lot" text="%s"/>
+      <l:template name="part" text="%s"/>
+      <l:template name="partintro" text="%s"/>
+      <l:template name="preface" text="%s"/>
+      <l:template name="refentry" text="%s"/>
+      <l:template name="reference" text="%s"/>
+      <l:template name="refsection" text="%s"/>
+      <l:template name="refsect1" text="%s"/>
+      <l:template name="refsect2" text="%s"/>
+      <l:template name="refsect3" text="%s"/>
+      <l:template name="refsynopsisdiv" text="%s"/>
+      <l:template name="sect1" text="%s"/>
+      <l:template name="sect2" text="%s"/>
+      <l:template name="sect3" text="%s"/>
+      <l:template name="sect4" text="%s"/>
+      <l:template name="sect5" text="%s"/>
+      <l:template name="section" text="%s"/>
+      <l:template name="set" text="%s"/>
+      <l:template name="setindex" text="%s"/>
+      <l:template name="sidebar" text="%s"/>
+      <l:template name="simplesect" text="%s"/>
+      <l:template name="toc" text="%s"/>
+   </l:context>
+
+   <l:context name="xref">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="&#31572;&#65306;&#160;%n"/>
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="constraintdef" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="%t"/>
+      <l:template name="example" text="%t"/>
+      <l:template name="figure" text="%t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text="%n"/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="%t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="&#21839;&#65306;&#160;%n"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="&#21839;&#65306;&#160;%n"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="table" text="%t"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="%n"/>
+      <l:template name="warning" text="%t"/>
+      <l:template name="page.citation" text=" [%p]"/>
+      <l:template name="page" text="(page %p)" lang="en"/>
+      <l:template name="pageabbrev" text="(p. %p)" lang="en"/>
+      <l:template name="Page" text="Page %p" lang="en"/>
+      <l:template name="bridgehead" text="%t&#38917;"/>
+      <l:template name="refsection" text="%t&#38917;"/>
+      <l:template name="refsect1" text="%t&#38917;"/>
+      <l:template name="refsect2" text="%t&#38917;"/>
+      <l:template name="refsect3" text="%t&#38917;"/>
+      <l:template name="sect1" text="%t&#38917;"/>
+      <l:template name="sect2" text="%t&#38917;"/>
+      <l:template name="sect3" text="%t&#38917;"/>
+      <l:template name="sect4" text="%t&#38917;"/>
+      <l:template name="sect5" text="%t&#38917;"/>
+      <l:template name="section" text="%t&#38917;"/>
+      <l:template name="simplesect" text="%t&#38917;"/>
+   </l:context>
+
+   <l:context name="xref-number">
+      <l:template name="answer" text="&#31572;&#65306;&#160;%n"/>
+      <l:template name="appendix" text="&#20184;&#37682;%n"/>
+      <l:template name="bridgehead" text="&#38917;&#160;%n"/>
+      <l:template name="chapter" text="&#31532;%n&#31456;"/>
+      <l:template name="equation" text="&#24335;&#160;%n"/>
+      <l:template name="example" text="&#20363;&#160;%n"/>
+      <l:template name="figure" text="&#22259;&#160;%n"/>
+      <l:template name="part" text="&#12497;&#12540;&#12488;&#160;%n"/>
+      <l:template name="procedure" text="&#25163;&#38918;&#160;%n"/>
+      <l:template name="productionset" text="&#12503;&#12525;&#12480;&#12463;&#12471;&#12519;&#12531;&#160;%n"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n"/>
+      <l:template name="qandaentry" text="&#21839;&#65306;&#160;%n"/>
+      <l:template name="question" text="&#21839;&#65306;&#160;%n"/>
+      <l:template name="sect1" text="&#38917;%n"/>
+      <l:template name="sect2" text="&#38917;%n"/>
+      <l:template name="sect3" text="&#38917;%n"/>
+      <l:template name="sect4" text="&#38917;%n"/>
+      <l:template name="sect5" text="&#38917;%n"/>
+      <l:template name="section" text="&#38917;%n"/>
+      <l:template name="table" text="&#34920;&#160;%n"/>
+   </l:context>
+
+   <l:context name="xref-number-and-title">
+      <l:template name="appendix" text="&#20184;&#37682;&#160;%n. %t"/>
+      <l:template name="bridgehead" text="&#38917;&#160;%n. &#12300;%t&#12301;"/>
+      <l:template name="chapter" text="&#31456;&#160;%n. %t"/>
+      <l:template name="equation" text="&#24335;&#160;%n. &#12300;%t&#12301;"/>
+      <l:template name="example" text="&#20363;&#160;%n. &#12300;%t&#12301;"/>
+      <l:template name="figure" text="&#22259;&#160;%n. &#12300;%t&#12301;"/>
+      <l:template name="part" text="&#12497;&#12540;&#12488;&#160;%n. &#12300;%t&#12301;"/>
+      <l:template name="procedure" text="&#25163;&#38918;&#160;%n. &#12300;%t&#12301;"/>
+      <l:template name="productionset" text="&#12503;&#12525;&#12480;&#12463;&#12471;&#12519;&#12531;&#160;%n. &#12300;%t&#12301;"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n. &#12300;%t&#12301;"/>
+      <l:template name="refsect1" text="&#12300;%t&#12301;"/>
+      <l:template name="refsect2" text="&#12300;%t&#12301;"/>
+      <l:template name="refsect3" text="&#12300;%t&#12301;"/>
+      <l:template name="refsection" text="&#12300;%t&#12301;"/>
+      <l:template name="sect1" text="&#38917;%n. &#12300;%t&#12301;"/>
+      <l:template name="sect2" text="&#38917;%n. &#12300;%t&#12301;"/>
+      <l:template name="sect3" text="&#38917;%n. &#12300;%t&#12301;"/>
+      <l:template name="sect4" text="&#38917;%n. &#12300;%t&#12301;"/>
+      <l:template name="sect5" text="&#38917;%n. &#12300;%t&#12301;"/>
+      <l:template name="section" text="&#38917;%n. &#12300;%t&#12301;"/>
+      <l:template name="simplesect" text="&#12300;%t&#12301;"/>
+      <l:template name="table" text="&#34920;&#160;%n. &#12300;%t&#12301;"/>
+   </l:context>
+
+   <l:context name="authorgroup">
+      <l:template name="sep" text=", "/>
+      <l:template name="sep2" text=" &#12289; "/>
+      <l:template name="seplast" text=", &#12289; "/>
+   </l:context>
+
+   <l:context name="glossary">
+      <l:template name="see" text="&#21442;&#29031; "/>
+      <l:template name="seealso" text="&#21442;&#29031; "/>
+   </l:context>
+
+   <l:context name="msgset">
+      <l:template name="MsgAud" text="&#23550;&#35937;&#32773;: "/>
+      <l:template name="MsgLevel" text="&#12524;&#12505;&#12523;: "/>
+      <l:template name="MsgOrig" text="&#30330;&#20449;&#20803;: "/>
+   </l:context>
+
+   <l:context name="datetime">
+      <l:template name="format" text="m/d/Y" lang="en"/>
+   </l:context>
+
+   <l:context name="datetime-full">
+      <l:template name="January" text="January" lang="en"/>
+      <l:template name="February" text="February" lang="en"/>
+      <l:template name="March" text="March" lang="en"/>
+      <l:template name="April" text="April" lang="en"/>
+      <l:template name="May" text="May" lang="en"/>
+      <l:template name="June" text="June" lang="en"/>
+      <l:template name="July" text="July" lang="en"/>
+      <l:template name="August" text="August" lang="en"/>
+      <l:template name="September" text="September" lang="en"/>
+      <l:template name="October" text="October" lang="en"/>
+      <l:template name="November" text="November" lang="en"/>
+      <l:template name="December" text="December" lang="en"/>
+      <l:template name="Monday" text="Monday" lang="en"/>
+      <l:template name="Tuesday" text="Tuesday" lang="en"/>
+      <l:template name="Wednesday" text="Wednesday" lang="en"/>
+      <l:template name="Thursday" text="Thursday" lang="en"/>
+      <l:template name="Friday" text="Friday" lang="en"/>
+      <l:template name="Saturday" text="Saturday" lang="en"/>
+      <l:template name="Sunday" text="Sunday" lang="en"/>
+   </l:context>
+
+   <l:context name="datetime-abbrev">
+      <l:template name="Jan" text="Jan" lang="en"/>
+      <l:template name="Feb" text="Feb" lang="en"/>
+      <l:template name="Mar" text="Mar" lang="en"/>
+      <l:template name="Apr" text="Apr" lang="en"/>
+      <l:template name="May" text="May" lang="en"/>
+      <l:template name="Jun" text="Jun" lang="en"/>
+      <l:template name="Jul" text="Jul" lang="en"/>
+      <l:template name="Aug" text="Aug" lang="en"/>
+      <l:template name="Sep" text="Sep" lang="en"/>
+      <l:template name="Oct" text="Oct" lang="en"/>
+      <l:template name="Nov" text="Nov" lang="en"/>
+      <l:template name="Dec" text="Dec" lang="en"/>
+      <l:template name="Mon" text="Mon" lang="en"/>
+      <l:template name="Tue" text="Tue" lang="en"/>
+      <l:template name="Wed" text="Wed" lang="en"/>
+      <l:template name="Thu" text="Thu" lang="en"/>
+      <l:template name="Fri" text="Fri" lang="en"/>
+      <l:template name="Sat" text="Sat" lang="en"/>
+      <l:template name="Sun" text="Sun" lang="en"/>
+   </l:context>
+
+   <l:context name="htmlhelp">
+      <l:template name="langcode" text="0x0411 Japanese"/>
+   </l:context>
+
+   <l:letters lang="en">
+      <l:l i="-1"/>
+      <l:l i="0">Symbols</l:l>
+      <l:l i="10">A</l:l>
+      <l:l i="10">a</l:l>
+      <l:l i="10">&#192;</l:l>
+      <l:l i="10">&#224;</l:l>
+      <l:l i="10">&#193;</l:l>
+      <l:l i="10">&#225;</l:l>
+      <l:l i="10">&#194;</l:l>
+      <l:l i="10">&#226;</l:l>
+      <l:l i="10">&#195;</l:l>
+      <l:l i="10">&#227;</l:l>
+      <l:l i="10">&#196;</l:l>
+      <l:l i="10">&#228;</l:l>
+      <l:l i="10">&#197;</l:l>
+      <l:l i="10">&#229;</l:l>
+      <l:l i="10">&#256;</l:l>
+      <l:l i="10">&#257;</l:l>
+      <l:l i="10">&#258;</l:l>
+      <l:l i="10">&#259;</l:l>
+      <l:l i="10">&#260;</l:l>
+      <l:l i="10">&#261;</l:l>
+      <l:l i="10">&#461;</l:l>
+      <l:l i="10">&#462;</l:l>
+      <l:l i="10">&#478;</l:l>
+      <l:l i="10">&#479;</l:l>
+      <l:l i="10">&#480;</l:l>
+      <l:l i="10">&#481;</l:l>
+      <l:l i="10">&#506;</l:l>
+      <l:l i="10">&#507;</l:l>
+      <l:l i="10">&#512;</l:l>
+      <l:l i="10">&#513;</l:l>
+      <l:l i="10">&#514;</l:l>
+      <l:l i="10">&#515;</l:l>
+      <l:l i="10">&#550;</l:l>
+      <l:l i="10">&#551;</l:l>
+      <l:l i="10">&#7680;</l:l>
+      <l:l i="10">&#7681;</l:l>
+      <l:l i="10">&#7834;</l:l>
+      <l:l i="10">&#7840;</l:l>
+      <l:l i="10">&#7841;</l:l>
+      <l:l i="10">&#7842;</l:l>
+      <l:l i="10">&#7843;</l:l>
+      <l:l i="10">&#7844;</l:l>
+      <l:l i="10">&#7845;</l:l>
+      <l:l i="10">&#7846;</l:l>
+      <l:l i="10">&#7847;</l:l>
+      <l:l i="10">&#7848;</l:l>
+      <l:l i="10">&#7849;</l:l>
+      <l:l i="10">&#7850;</l:l>
+      <l:l i="10">&#7851;</l:l>
+      <l:l i="10">&#7852;</l:l>
+      <l:l i="10">&#7853;</l:l>
+      <l:l i="10">&#7854;</l:l>
+      <l:l i="10">&#7855;</l:l>
+      <l:l i="10">&#7856;</l:l>
+      <l:l i="10">&#7857;</l:l>
+      <l:l i="10">&#7858;</l:l>
+      <l:l i="10">&#7859;</l:l>
+      <l:l i="10">&#7860;</l:l>
+      <l:l i="10">&#7861;</l:l>
+      <l:l i="10">&#7862;</l:l>
+      <l:l i="10">&#7863;</l:l>
+      <l:l i="20">B</l:l>
+      <l:l i="20">b</l:l>
+      <l:l i="20">&#384;</l:l>
+      <l:l i="20">&#385;</l:l>
+      <l:l i="20">&#595;</l:l>
+      <l:l i="20">&#386;</l:l>
+      <l:l i="20">&#387;</l:l>
+      <l:l i="20">&#7682;</l:l>
+      <l:l i="20">&#7683;</l:l>
+      <l:l i="20">&#7684;</l:l>
+      <l:l i="20">&#7685;</l:l>
+      <l:l i="20">&#7686;</l:l>
+      <l:l i="20">&#7687;</l:l>
+      <l:l i="30">C</l:l>
+      <l:l i="30">c</l:l>
+      <l:l i="30">&#199;</l:l>
+      <l:l i="30">&#231;</l:l>
+      <l:l i="30">&#262;</l:l>
+      <l:l i="30">&#263;</l:l>
+      <l:l i="30">&#264;</l:l>
+      <l:l i="30">&#265;</l:l>
+      <l:l i="30">&#266;</l:l>
+      <l:l i="30">&#267;</l:l>
+      <l:l i="30">&#268;</l:l>
+      <l:l i="30">&#269;</l:l>
+      <l:l i="30">&#391;</l:l>
+      <l:l i="30">&#392;</l:l>
+      <l:l i="30">&#597;</l:l>
+      <l:l i="30">&#7688;</l:l>
+      <l:l i="30">&#7689;</l:l>
+      <l:l i="40">D</l:l>
+      <l:l i="40">d</l:l>
+      <l:l i="40">&#270;</l:l>
+      <l:l i="40">&#271;</l:l>
+      <l:l i="40">&#272;</l:l>
+      <l:l i="40">&#273;</l:l>
+      <l:l i="40">&#394;</l:l>
+      <l:l i="40">&#599;</l:l>
+      <l:l i="40">&#395;</l:l>
+      <l:l i="40">&#396;</l:l>
+      <l:l i="40">&#453;</l:l>
+      <l:l i="40">&#498;</l:l>
+      <l:l i="40">&#545;</l:l>
+      <l:l i="40">&#598;</l:l>
+      <l:l i="40">&#7690;</l:l>
+      <l:l i="40">&#7691;</l:l>
+      <l:l i="40">&#7692;</l:l>
+      <l:l i="40">&#7693;</l:l>
+      <l:l i="40">&#7694;</l:l>
+      <l:l i="40">&#7695;</l:l>
+      <l:l i="40">&#7696;</l:l>
+      <l:l i="40">&#7697;</l:l>
+      <l:l i="40">&#7698;</l:l>
+      <l:l i="40">&#7699;</l:l>
+      <l:l i="50">E</l:l>
+      <l:l i="50">e</l:l>
+      <l:l i="50">&#200;</l:l>
+      <l:l i="50">&#232;</l:l>
+      <l:l i="50">&#201;</l:l>
+      <l:l i="50">&#233;</l:l>
+      <l:l i="50">&#202;</l:l>
+      <l:l i="50">&#234;</l:l>
+      <l:l i="50">&#203;</l:l>
+      <l:l i="50">&#235;</l:l>
+      <l:l i="50">&#274;</l:l>
+      <l:l i="50">&#275;</l:l>
+      <l:l i="50">&#276;</l:l>
+      <l:l i="50">&#277;</l:l>
+      <l:l i="50">&#278;</l:l>
+      <l:l i="50">&#279;</l:l>
+      <l:l i="50">&#280;</l:l>
+      <l:l i="50">&#281;</l:l>
+      <l:l i="50">&#282;</l:l>
+      <l:l i="50">&#283;</l:l>
+      <l:l i="50">&#516;</l:l>
+      <l:l i="50">&#517;</l:l>
+      <l:l i="50">&#518;</l:l>
+      <l:l i="50">&#519;</l:l>
+      <l:l i="50">&#552;</l:l>
+      <l:l i="50">&#553;</l:l>
+      <l:l i="50">&#7700;</l:l>
+      <l:l i="50">&#7701;</l:l>
+      <l:l i="50">&#7702;</l:l>
+      <l:l i="50">&#7703;</l:l>
+      <l:l i="50">&#7704;</l:l>
+      <l:l i="50">&#7705;</l:l>
+      <l:l i="50">&#7706;</l:l>
+      <l:l i="50">&#7707;</l:l>
+      <l:l i="50">&#7708;</l:l>
+      <l:l i="50">&#7709;</l:l>
+      <l:l i="50">&#7864;</l:l>
+      <l:l i="50">&#7865;</l:l>
+      <l:l i="50">&#7866;</l:l>
+      <l:l i="50">&#7867;</l:l>
+      <l:l i="50">&#7868;</l:l>
+      <l:l i="50">&#7869;</l:l>
+      <l:l i="50">&#7870;</l:l>
+      <l:l i="50">&#7871;</l:l>
+      <l:l i="50">&#7872;</l:l>
+      <l:l i="50">&#7873;</l:l>
+      <l:l i="50">&#7874;</l:l>
+      <l:l i="50">&#7875;</l:l>
+      <l:l i="50">&#7876;</l:l>
+      <l:l i="50">&#7877;</l:l>
+      <l:l i="50">&#7878;</l:l>
+      <l:l i="50">&#7879;</l:l>
+      <l:l i="60">F</l:l>
+      <l:l i="60">f</l:l>
+      <l:l i="60">&#401;</l:l>
+      <l:l i="60">&#402;</l:l>
+      <l:l i="60">&#7710;</l:l>
+      <l:l i="60">&#7711;</l:l>
+      <l:l i="70">G</l:l>
+      <l:l i="70">g</l:l>
+      <l:l i="70">&#284;</l:l>
+      <l:l i="70">&#285;</l:l>
+      <l:l i="70">&#286;</l:l>
+      <l:l i="70">&#287;</l:l>
+      <l:l i="70">&#288;</l:l>
+      <l:l i="70">&#289;</l:l>
+      <l:l i="70">&#290;</l:l>
+      <l:l i="70">&#291;</l:l>
+      <l:l i="70">&#403;</l:l>
+      <l:l i="70">&#608;</l:l>
+      <l:l i="70">&#484;</l:l>
+      <l:l i="70">&#485;</l:l>
+      <l:l i="70">&#486;</l:l>
+      <l:l i="70">&#487;</l:l>
+      <l:l i="70">&#500;</l:l>
+      <l:l i="70">&#501;</l:l>
+      <l:l i="70">&#7712;</l:l>
+      <l:l i="70">&#7713;</l:l>
+      <l:l i="80">H</l:l>
+      <l:l i="80">h</l:l>
+      <l:l i="80">&#292;</l:l>
+      <l:l i="80">&#293;</l:l>
+      <l:l i="80">&#294;</l:l>
+      <l:l i="80">&#295;</l:l>
+      <l:l i="80">&#542;</l:l>
+      <l:l i="80">&#543;</l:l>
+      <l:l i="80">&#614;</l:l>
+      <l:l i="80">&#7714;</l:l>
+      <l:l i="80">&#7715;</l:l>
+      <l:l i="80">&#7716;</l:l>
+      <l:l i="80">&#7717;</l:l>
+      <l:l i="80">&#7718;</l:l>
+      <l:l i="80">&#7719;</l:l>
+      <l:l i="80">&#7720;</l:l>
+      <l:l i="80">&#7721;</l:l>
+      <l:l i="80">&#7722;</l:l>
+      <l:l i="80">&#7723;</l:l>
+      <l:l i="80">&#7830;</l:l>
+      <l:l i="90">I</l:l>
+      <l:l i="90">i</l:l>
+      <l:l i="90">&#204;</l:l>
+      <l:l i="90">&#236;</l:l>
+      <l:l i="90">&#205;</l:l>
+      <l:l i="90">&#237;</l:l>
+      <l:l i="90">&#206;</l:l>
+      <l:l i="90">&#238;</l:l>
+      <l:l i="90">&#207;</l:l>
+      <l:l i="90">&#239;</l:l>
+      <l:l i="90">&#296;</l:l>
+      <l:l i="90">&#297;</l:l>
+      <l:l i="90">&#298;</l:l>
+      <l:l i="90">&#299;</l:l>
+      <l:l i="90">&#300;</l:l>
+      <l:l i="90">&#301;</l:l>
+      <l:l i="90">&#302;</l:l>
+      <l:l i="90">&#303;</l:l>
+      <l:l i="90">&#304;</l:l>
+      <l:l i="90">&#407;</l:l>
+      <l:l i="90">&#616;</l:l>
+      <l:l i="90">&#463;</l:l>
+      <l:l i="90">&#464;</l:l>
+      <l:l i="90">&#520;</l:l>
+      <l:l i="90">&#521;</l:l>
+      <l:l i="90">&#522;</l:l>
+      <l:l i="90">&#523;</l:l>
+      <l:l i="90">&#7724;</l:l>
+      <l:l i="90">&#7725;</l:l>
+      <l:l i="90">&#7726;</l:l>
+      <l:l i="90">&#7727;</l:l>
+      <l:l i="90">&#7880;</l:l>
+      <l:l i="90">&#7881;</l:l>
+      <l:l i="90">&#7882;</l:l>
+      <l:l i="90">&#7883;</l:l>
+      <l:l i="100">J</l:l>
+      <l:l i="100">j</l:l>
+      <l:l i="100">&#308;</l:l>
+      <l:l i="100">&#309;</l:l>
+      <l:l i="100">&#496;</l:l>
+      <l:l i="100">&#669;</l:l>
+      <l:l i="110">K</l:l>
+      <l:l i="110">k</l:l>
+      <l:l i="110">&#310;</l:l>
+      <l:l i="110">&#311;</l:l>
+      <l:l i="110">&#408;</l:l>
+      <l:l i="110">&#409;</l:l>
+      <l:l i="110">&#488;</l:l>
+      <l:l i="110">&#489;</l:l>
+      <l:l i="110">&#7728;</l:l>
+      <l:l i="110">&#7729;</l:l>
+      <l:l i="110">&#7730;</l:l>
+      <l:l i="110">&#7731;</l:l>
+      <l:l i="110">&#7732;</l:l>
+      <l:l i="110">&#7733;</l:l>
+      <l:l i="120">L</l:l>
+      <l:l i="120">l</l:l>
+      <l:l i="120">&#313;</l:l>
+      <l:l i="120">&#314;</l:l>
+      <l:l i="120">&#315;</l:l>
+      <l:l i="120">&#316;</l:l>
+      <l:l i="120">&#317;</l:l>
+      <l:l i="120">&#318;</l:l>
+      <l:l i="120">&#319;</l:l>
+      <l:l i="120">&#320;</l:l>
+      <l:l i="120">&#321;</l:l>
+      <l:l i="120">&#322;</l:l>
+      <l:l i="120">&#410;</l:l>
+      <l:l i="120">&#456;</l:l>
+      <l:l i="120">&#564;</l:l>
+      <l:l i="120">&#619;</l:l>
+      <l:l i="120">&#620;</l:l>
+      <l:l i="120">&#621;</l:l>
+      <l:l i="120">&#7734;</l:l>
+      <l:l i="120">&#7735;</l:l>
+      <l:l i="120">&#7736;</l:l>
+      <l:l i="120">&#7737;</l:l>
+      <l:l i="120">&#7738;</l:l>
+      <l:l i="120">&#7739;</l:l>
+      <l:l i="120">&#7740;</l:l>
+      <l:l i="120">&#7741;</l:l>
+      <l:l i="130">M</l:l>
+      <l:l i="130">m</l:l>
+      <l:l i="130">&#625;</l:l>
+      <l:l i="130">&#7742;</l:l>
+      <l:l i="130">&#7743;</l:l>
+      <l:l i="130">&#7744;</l:l>
+      <l:l i="130">&#7745;</l:l>
+      <l:l i="130">&#7746;</l:l>
+      <l:l i="130">&#7747;</l:l>
+      <l:l i="140">N</l:l>
+      <l:l i="140">n</l:l>
+      <l:l i="140">&#209;</l:l>
+      <l:l i="140">&#241;</l:l>
+      <l:l i="140">&#323;</l:l>
+      <l:l i="140">&#324;</l:l>
+      <l:l i="140">&#325;</l:l>
+      <l:l i="140">&#326;</l:l>
+      <l:l i="140">&#327;</l:l>
+      <l:l i="140">&#328;</l:l>
+      <l:l i="140">&#413;</l:l>
+      <l:l i="140">&#626;</l:l>
+      <l:l i="140">&#414;</l:l>
+      <l:l i="140">&#544;</l:l>
+      <l:l i="140">&#459;</l:l>
+      <l:l i="140">&#504;</l:l>
+      <l:l i="140">&#505;</l:l>
+      <l:l i="140">&#565;</l:l>
+      <l:l i="140">&#627;</l:l>
+      <l:l i="140">&#7748;</l:l>
+      <l:l i="140">&#7749;</l:l>
+      <l:l i="140">&#7750;</l:l>
+      <l:l i="140">&#7751;</l:l>
+      <l:l i="140">&#7752;</l:l>
+      <l:l i="140">&#7753;</l:l>
+      <l:l i="140">&#7754;</l:l>
+      <l:l i="140">&#7755;</l:l>
+      <l:l i="150">O</l:l>
+      <l:l i="150">o</l:l>
+      <l:l i="150">&#210;</l:l>
+      <l:l i="150">&#242;</l:l>
+      <l:l i="150">&#211;</l:l>
+      <l:l i="150">&#243;</l:l>
+      <l:l i="150">&#212;</l:l>
+      <l:l i="150">&#244;</l:l>
+      <l:l i="150">&#213;</l:l>
+      <l:l i="150">&#245;</l:l>
+      <l:l i="150">&#214;</l:l>
+      <l:l i="150">&#246;</l:l>
+      <l:l i="150">&#216;</l:l>
+      <l:l i="150">&#248;</l:l>
+      <l:l i="150">&#332;</l:l>
+      <l:l i="150">&#333;</l:l>
+      <l:l i="150">&#334;</l:l>
+      <l:l i="150">&#335;</l:l>
+      <l:l i="150">&#336;</l:l>
+      <l:l i="150">&#337;</l:l>
+      <l:l i="150">&#415;</l:l>
+      <l:l i="150">&#416;</l:l>
+      <l:l i="150">&#417;</l:l>
+      <l:l i="150">&#465;</l:l>
+      <l:l i="150">&#466;</l:l>
+      <l:l i="150">&#490;</l:l>
+      <l:l i="150">&#491;</l:l>
+      <l:l i="150">&#492;</l:l>
+      <l:l i="150">&#493;</l:l>
+      <l:l i="150">&#510;</l:l>
+      <l:l i="150">&#511;</l:l>
+      <l:l i="150">&#524;</l:l>
+      <l:l i="150">&#525;</l:l>
+      <l:l i="150">&#526;</l:l>
+      <l:l i="150">&#527;</l:l>
+      <l:l i="150">&#554;</l:l>
+      <l:l i="150">&#555;</l:l>
+      <l:l i="150">&#556;</l:l>
+      <l:l i="150">&#557;</l:l>
+      <l:l i="150">&#558;</l:l>
+      <l:l i="150">&#559;</l:l>
+      <l:l i="150">&#560;</l:l>
+      <l:l i="150">&#561;</l:l>
+      <l:l i="150">&#7756;</l:l>
+      <l:l i="150">&#7757;</l:l>
+      <l:l i="150">&#7758;</l:l>
+      <l:l i="150">&#7759;</l:l>
+      <l:l i="150">&#7760;</l:l>
+      <l:l i="150">&#7761;</l:l>
+      <l:l i="150">&#7762;</l:l>
+      <l:l i="150">&#7763;</l:l>
+      <l:l i="150">&#7884;</l:l>
+      <l:l i="150">&#7885;</l:l>
+      <l:l i="150">&#7886;</l:l>
+      <l:l i="150">&#7887;</l:l>
+      <l:l i="150">&#7888;</l:l>
+      <l:l i="150">&#7889;</l:l>
+      <l:l i="150">&#7890;</l:l>
+      <l:l i="150">&#7891;</l:l>
+      <l:l i="150">&#7892;</l:l>
+      <l:l i="150">&#7893;</l:l>
+      <l:l i="150">&#7894;</l:l>
+      <l:l i="150">&#7895;</l:l>
+      <l:l i="150">&#7896;</l:l>
+      <l:l i="150">&#7897;</l:l>
+      <l:l i="150">&#7898;</l:l>
+      <l:l i="150">&#7899;</l:l>
+      <l:l i="150">&#7900;</l:l>
+      <l:l i="150">&#7901;</l:l>
+      <l:l i="150">&#7902;</l:l>
+      <l:l i="150">&#7903;</l:l>
+      <l:l i="150">&#7904;</l:l>
+      <l:l i="150">&#7905;</l:l>
+      <l:l i="150">&#7906;</l:l>
+      <l:l i="150">&#7907;</l:l>
+      <l:l i="160">P</l:l>
+      <l:l i="160">p</l:l>
+      <l:l i="160">&#420;</l:l>
+      <l:l i="160">&#421;</l:l>
+      <l:l i="160">&#7764;</l:l>
+      <l:l i="160">&#7765;</l:l>
+      <l:l i="160">&#7766;</l:l>
+      <l:l i="160">&#7767;</l:l>
+      <l:l i="170">Q</l:l>
+      <l:l i="170">q</l:l>
+      <l:l i="170">&#672;</l:l>
+      <l:l i="180">R</l:l>
+      <l:l i="180">r</l:l>
+      <l:l i="180">&#340;</l:l>
+      <l:l i="180">&#341;</l:l>
+      <l:l i="180">&#342;</l:l>
+      <l:l i="180">&#343;</l:l>
+      <l:l i="180">&#344;</l:l>
+      <l:l i="180">&#345;</l:l>
+      <l:l i="180">&#528;</l:l>
+      <l:l i="180">&#529;</l:l>
+      <l:l i="180">&#530;</l:l>
+      <l:l i="180">&#531;</l:l>
+      <l:l i="180">&#636;</l:l>
+      <l:l i="180">&#637;</l:l>
+      <l:l i="180">&#638;</l:l>
+      <l:l i="180">&#7768;</l:l>
+      <l:l i="180">&#7769;</l:l>
+      <l:l i="180">&#7770;</l:l>
+      <l:l i="180">&#7771;</l:l>
+      <l:l i="180">&#7772;</l:l>
+      <l:l i="180">&#7773;</l:l>
+      <l:l i="180">&#7774;</l:l>
+      <l:l i="180">&#7775;</l:l>
+      <l:l i="190">S</l:l>
+      <l:l i="190">s</l:l>
+      <l:l i="190">&#346;</l:l>
+      <l:l i="190">&#347;</l:l>
+      <l:l i="190">&#348;</l:l>
+      <l:l i="190">&#349;</l:l>
+      <l:l i="190">&#350;</l:l>
+      <l:l i="190">&#351;</l:l>
+      <l:l i="190">&#352;</l:l>
+      <l:l i="190">&#353;</l:l>
+      <l:l i="190">&#536;</l:l>
+      <l:l i="190">&#537;</l:l>
+      <l:l i="190">&#642;</l:l>
+      <l:l i="190">&#7776;</l:l>
+      <l:l i="190">&#7777;</l:l>
+      <l:l i="190">&#7778;</l:l>
+      <l:l i="190">&#7779;</l:l>
+      <l:l i="190">&#7780;</l:l>
+      <l:l i="190">&#7781;</l:l>
+      <l:l i="190">&#7782;</l:l>
+      <l:l i="190">&#7783;</l:l>
+      <l:l i="190">&#7784;</l:l>
+      <l:l i="190">&#7785;</l:l>
+      <l:l i="200">T</l:l>
+      <l:l i="200">t</l:l>
+      <l:l i="200">&#354;</l:l>
+      <l:l i="200">&#355;</l:l>
+      <l:l i="200">&#356;</l:l>
+      <l:l i="200">&#357;</l:l>
+      <l:l i="200">&#358;</l:l>
+      <l:l i="200">&#359;</l:l>
+      <l:l i="200">&#427;</l:l>
+      <l:l i="200">&#428;</l:l>
+      <l:l i="200">&#429;</l:l>
+      <l:l i="200">&#430;</l:l>
+      <l:l i="200">&#648;</l:l>
+      <l:l i="200">&#538;</l:l>
+      <l:l i="200">&#539;</l:l>
+      <l:l i="200">&#566;</l:l>
+      <l:l i="200">&#7786;</l:l>
+      <l:l i="200">&#7787;</l:l>
+      <l:l i="200">&#7788;</l:l>
+      <l:l i="200">&#7789;</l:l>
+      <l:l i="200">&#7790;</l:l>
+      <l:l i="200">&#7791;</l:l>
+      <l:l i="200">&#7792;</l:l>
+      <l:l i="200">&#7793;</l:l>
+      <l:l i="200">&#7831;</l:l>
+      <l:l i="210">U</l:l>
+      <l:l i="210">u</l:l>
+      <l:l i="210">&#217;</l:l>
+      <l:l i="210">&#249;</l:l>
+      <l:l i="210">&#218;</l:l>
+      <l:l i="210">&#250;</l:l>
+      <l:l i="210">&#219;</l:l>
+      <l:l i="210">&#251;</l:l>
+      <l:l i="210">&#220;</l:l>
+      <l:l i="210">&#252;</l:l>
+      <l:l i="210">&#360;</l:l>
+      <l:l i="210">&#361;</l:l>
+      <l:l i="210">&#362;</l:l>
+      <l:l i="210">&#363;</l:l>
+      <l:l i="210">&#364;</l:l>
+      <l:l i="210">&#365;</l:l>
+      <l:l i="210">&#366;</l:l>
+      <l:l i="210">&#367;</l:l>
+      <l:l i="210">&#368;</l:l>
+      <l:l i="210">&#369;</l:l>
+      <l:l i="210">&#370;</l:l>
+      <l:l i="210">&#371;</l:l>
+      <l:l i="210">&#431;</l:l>
+      <l:l i="210">&#432;</l:l>
+      <l:l i="210">&#467;</l:l>
+      <l:l i="210">&#468;</l:l>
+      <l:l i="210">&#469;</l:l>
+      <l:l i="210">&#470;</l:l>
+      <l:l i="210">&#471;</l:l>
+      <l:l i="210">&#472;</l:l>
+      <l:l i="210">&#473;</l:l>
+      <l:l i="210">&#474;</l:l>
+      <l:l i="210">&#475;</l:l>
+      <l:l i="210">&#476;</l:l>
+      <l:l i="210">&#532;</l:l>
+      <l:l i="210">&#533;</l:l>
+      <l:l i="210">&#534;</l:l>
+      <l:l i="210">&#535;</l:l>
+      <l:l i="210">&#7794;</l:l>
+      <l:l i="210">&#7795;</l:l>
+      <l:l i="210">&#7796;</l:l>
+      <l:l i="210">&#7797;</l:l>
+      <l:l i="210">&#7798;</l:l>
+      <l:l i="210">&#7799;</l:l>
+      <l:l i="210">&#7800;</l:l>
+      <l:l i="210">&#7801;</l:l>
+      <l:l i="210">&#7802;</l:l>
+      <l:l i="210">&#7803;</l:l>
+      <l:l i="210">&#7908;</l:l>
+      <l:l i="210">&#7909;</l:l>
+      <l:l i="210">&#7910;</l:l>
+      <l:l i="210">&#7911;</l:l>
+      <l:l i="210">&#7912;</l:l>
+      <l:l i="210">&#7913;</l:l>
+      <l:l i="210">&#7914;</l:l>
+      <l:l i="210">&#7915;</l:l>
+      <l:l i="210">&#7916;</l:l>
+      <l:l i="210">&#7917;</l:l>
+      <l:l i="210">&#7918;</l:l>
+      <l:l i="210">&#7919;</l:l>
+      <l:l i="210">&#7920;</l:l>
+      <l:l i="210">&#7921;</l:l>
+      <l:l i="220">V</l:l>
+      <l:l i="220">v</l:l>
+      <l:l i="220">&#434;</l:l>
+      <l:l i="220">&#651;</l:l>
+      <l:l i="220">&#7804;</l:l>
+      <l:l i="220">&#7805;</l:l>
+      <l:l i="220">&#7806;</l:l>
+      <l:l i="220">&#7807;</l:l>
+      <l:l i="230">W</l:l>
+      <l:l i="230">w</l:l>
+      <l:l i="230">&#372;</l:l>
+      <l:l i="230">&#373;</l:l>
+      <l:l i="230">&#7808;</l:l>
+      <l:l i="230">&#7809;</l:l>
+      <l:l i="230">&#7810;</l:l>
+      <l:l i="230">&#7811;</l:l>
+      <l:l i="230">&#7812;</l:l>
+      <l:l i="230">&#7813;</l:l>
+      <l:l i="230">&#7814;</l:l>
+      <l:l i="230">&#7815;</l:l>
+      <l:l i="230">&#7816;</l:l>
+      <l:l i="230">&#7817;</l:l>
+      <l:l i="230">&#7832;</l:l>
+      <l:l i="240">X</l:l>
+      <l:l i="240">x</l:l>
+      <l:l i="240">&#7818;</l:l>
+      <l:l i="240">&#7819;</l:l>
+      <l:l i="240">&#7820;</l:l>
+      <l:l i="240">&#7821;</l:l>
+      <l:l i="250">Y</l:l>
+      <l:l i="250">y</l:l>
+      <l:l i="250">&#221;</l:l>
+      <l:l i="250">&#253;</l:l>
+      <l:l i="250">&#255;</l:l>
+      <l:l i="250">&#376;</l:l>
+      <l:l i="250">&#374;</l:l>
+      <l:l i="250">&#375;</l:l>
+      <l:l i="250">&#435;</l:l>
+      <l:l i="250">&#436;</l:l>
+      <l:l i="250">&#562;</l:l>
+      <l:l i="250">&#563;</l:l>
+      <l:l i="250">&#7822;</l:l>
+      <l:l i="250">&#7823;</l:l>
+      <l:l i="250">&#7833;</l:l>
+      <l:l i="250">&#7922;</l:l>
+      <l:l i="250">&#7923;</l:l>
+      <l:l i="250">&#7924;</l:l>
+      <l:l i="250">&#7925;</l:l>
+      <l:l i="250">&#7926;</l:l>
+      <l:l i="250">&#7927;</l:l>
+      <l:l i="250">&#7928;</l:l>
+      <l:l i="250">&#7929;</l:l>
+      <l:l i="260">Z</l:l>
+      <l:l i="260">z</l:l>
+      <l:l i="260">&#377;</l:l>
+      <l:l i="260">&#378;</l:l>
+      <l:l i="260">&#379;</l:l>
+      <l:l i="260">&#380;</l:l>
+      <l:l i="260">&#381;</l:l>
+      <l:l i="260">&#382;</l:l>
+      <l:l i="260">&#437;</l:l>
+      <l:l i="260">&#438;</l:l>
+      <l:l i="260">&#548;</l:l>
+      <l:l i="260">&#549;</l:l>
+      <l:l i="260">&#656;</l:l>
+      <l:l i="260">&#657;</l:l>
+      <l:l i="260">&#7824;</l:l>
+      <l:l i="260">&#7825;</l:l>
+      <l:l i="260">&#7826;</l:l>
+      <l:l i="260">&#7827;</l:l>
+      <l:l i="260">&#7828;</l:l>
+      <l:l i="260">&#7829;</l:l>
+   </l:letters>
+</l:l10n>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/ko.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/ko.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/ko.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1153 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="ko" english-language-name="Korean">
+
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+   <l:gentext key="Abstract" text="&#52488;&#47197;"/>
+   <l:gentext key="abstract" text="&#52488;&#47197;"/>
+   <l:gentext key="Answer" text="&#45813;&#48320;"/>
+   <l:gentext key="answer" text="&#45813;&#48320;"/>
+   <l:gentext key="Appendix" text="&#48512;&#47197;"/>
+   <l:gentext key="appendix" text="&#48512;&#47197;"/>
+   <l:gentext key="Article" text="&#47928;&#49436;"/>
+   <l:gentext key="article" text="&#47928;&#49436;"/>
+   <l:gentext key="Bibliography" text="&#49436;&#51648;&#49324;&#54637;"/>
+   <l:gentext key="bibliography" text="&#49436;&#51648;&#49324;&#54637;"/>
+   <l:gentext key="Book" text="&#52293;"/>
+   <l:gentext key="book" text="&#52293;"/>
+   <l:gentext key="CAUTION" text="[&#44221;&#44256;]"/>
+   <l:gentext key="Caution" text="&#44221;&#44256;"/>
+   <l:gentext key="caution" text="&#44221;&#44256;"/>
+   <l:gentext key="Chapter" text="&#51109;"/>
+   <l:gentext key="chapter" text="&#51109;"/>
+   <l:gentext key="Colophon" text="&#54032;&#44428;"/>
+   <l:gentext key="colophon" text="&#54032;&#44428;"/>
+   <l:gentext key="Copyright" text="&#51200;&#51089;&#44428;"/>
+   <l:gentext key="copyright" text="&#51200;&#51089;&#44428;"/>
+   <l:gentext key="Dedication" text="&#48148;&#52824;&#45716; &#44544;"/>
+   <l:gentext key="dedication" text="&#48148;&#52824;&#45716; &#44544;"/>
+   <l:gentext key="Edition" text="&#50670;&#51020;"/>
+   <l:gentext key="edition" text="&#50670;&#51020;"/>
+   <l:gentext key="Equation" text="&#49688;&#49885;"/>
+   <l:gentext key="equation" text="&#49688;&#49885;"/>
+   <l:gentext key="Example" text="&#50696;"/>
+   <l:gentext key="example" text="&#50696;"/>
+   <l:gentext key="Figure" text="&#44536;&#47548;"/>
+   <l:gentext key="figure" text="&#44536;&#47548;"/>
+   <l:gentext key="Glossary" text="&#50857;&#50612;&#54644;&#49444;"/>
+   <l:gentext key="glossary" text="&#50857;&#50612;&#54644;&#49444;"/>
+   <l:gentext key="GlossSee" text="&#49332;&#54196;&#48380; &#45236;&#50857;"/>
+   <l:gentext key="glosssee" text="&#49332;&#54196;&#48380; &#45236;&#50857;"/>
+   <l:gentext key="GlossSeeAlso" text="&#45796;&#47480; &#49332;&#54196;&#48380; &#45236;&#50857;"/>
+   <l:gentext key="glossseealso" text="&#45796;&#47480; &#49332;&#54196;&#48380; &#45236;&#50857;"/>
+   <l:gentext key="IMPORTANT" text="[&#51473;&#50836;]"/>
+   <l:gentext key="important" text="&#51473;&#50836;"/>
+   <l:gentext key="Important" text="&#51473;&#50836;"/>
+   <l:gentext key="Index" text="&#49353;&#51064;"/>
+   <l:gentext key="index" text="&#49353;&#51064;"/>
+   <l:gentext key="ISBN" text="ISBN"/>
+   <l:gentext key="isbn" text="ISBN"/>
+   <l:gentext key="LegalNotice" text="&#48277;&#51201; &#44277;&#51648;"/>
+   <l:gentext key="legalnotice" text="&#48277;&#51201; &#44277;&#51648;"/>
+   <l:gentext key="MsgAud" text="&#48155;&#45716; &#51060;"/>
+   <l:gentext key="msgaud" text="&#48155;&#45716; &#51060;"/>
+   <l:gentext key="MsgLevel" text="&#51473;&#50836;&#46020;"/>
+   <l:gentext key="msglevel" text="&#51473;&#50836;&#46020;"/>
+   <l:gentext key="MsgOrig" text="&#48372;&#45236;&#45716; &#51060;"/>
+   <l:gentext key="msgorig" text="&#48372;&#45236;&#45716; &#51060;"/>
+   <l:gentext key="NOTE" text="[&#52280;&#44256;]"/>
+   <l:gentext key="Note" text="&#52280;&#44256;"/>
+   <l:gentext key="note" text="&#52280;&#44256;"/>
+   <l:gentext key="Part" text="&#48512;"/>
+   <l:gentext key="part" text="&#48512;"/>
+   <l:gentext key="Preface" text="&#49436;&#47928;"/>
+   <l:gentext key="preface" text="&#49436;&#47928;"/>
+   <l:gentext key="Procedure" text="&#51208;&#52264;"/>
+   <l:gentext key="procedure" text="&#51208;&#52264;"/>
+   <l:gentext key="ProductionSet" text="Production"/>
+   <l:gentext key="PubDate" text="Publication Date" lang="en"/>
+   <l:gentext key="pubdate" text="Publication date" lang="en"/>
+   <l:gentext key="Published" text="&#54196;&#45252;"/>
+   <l:gentext key="published" text="&#54196;&#45252;"/>
+   <l:gentext key="Qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="Question" text="&#51656;&#47928;"/>
+   <l:gentext key="question" text="&#51656;&#47928;"/>
+   <l:gentext key="RefEntry" text=""/>
+   <l:gentext key="refentry" text=""/>
+   <l:gentext key="Reference" text="&#52280;&#44256;&#47928;&#54732;"/>
+   <l:gentext key="reference" text="&#52280;&#44256;&#47928;&#54732;"/>
+   <l:gentext key="RefName" text="&#51228;&#47785;"/>
+   <l:gentext key="refname" text="&#51228;&#47785;"/>
+   <l:gentext key="RefSection" text=""/>
+   <l:gentext key="refsection" text=""/>
+   <l:gentext key="RefSynopsisDiv" text="&#50836;&#50557;"/>
+   <l:gentext key="refsynopsisdiv" text="&#50836;&#50557;"/>
+   <l:gentext key="RevHistory" text="&#44256;&#52828; &#44284;&#51221;"/>
+   <l:gentext key="revhistory" text="&#44256;&#52828; &#44284;&#51221;"/>
+   <l:gentext key="revision" text="&#44256;&#52840;"/>
+   <l:gentext key="Revision" text="&#44256;&#52840;"/>
+   <l:gentext key="sect1" text="Section"/>
+   <l:gentext key="sect2" text="Section"/>
+   <l:gentext key="sect3" text="Section"/>
+   <l:gentext key="sect4" text="Section"/>
+   <l:gentext key="sect5" text="Section"/>
+   <l:gentext key="section" text="&#51208;"/>
+   <l:gentext key="Section" text="&#51208;"/>
+   <l:gentext key="see" text="&#49332;&#54196;&#48380; &#45236;&#50857;"/>
+   <l:gentext key="See" text="&#49332;&#54196;&#48380; &#45236;&#50857;"/>
+   <l:gentext key="seealso" text="[&#49332;&#54196;&#48380; &#45796;&#47480; &#45236;&#50857;]"/>
+   <l:gentext key="Seealso" text="&#49332;&#54196;&#48380; &#45796;&#47480; &#45236;&#50857;"/>
+   <l:gentext key="SeeAlso" text="[&#49332;&#54196;&#48380; &#45796;&#47480; &#45236;&#50857;]"/>
+   <l:gentext key="set" text="&#51204;&#51665;"/>
+   <l:gentext key="Set" text="&#51204;&#51665;"/>
+   <l:gentext key="setindex" text="&#51204;&#51665; &#49353;&#51064;"/>
+   <l:gentext key="SetIndex" text="&#51204;&#51665; &#49353;&#51064;"/>
+   <l:gentext key="Sidebar" text=""/>
+   <l:gentext key="sidebar" text="&#45927;&#48537;&#51076;"/>
+   <l:gentext key="step" text="&#45800;&#44228;"/>
+   <l:gentext key="Step" text="&#45800;&#44228;"/>
+   <l:gentext key="Table" text="&#54364;"/>
+   <l:gentext key="table" text="&#54364;"/>
+   <l:gentext key="tip" text="&#51089;&#51008; &#51221;&#48372;"/>
+   <l:gentext key="TIP" text="[&#51089;&#51008; &#51221;&#48372;]"/>
+   <l:gentext key="Tip" text="&#51089;&#51008; &#51221;&#48372;"/>
+   <l:gentext key="Warning" text="&#51452;&#51032;"/>
+   <l:gentext key="warning" text="&#51452;&#51032;"/>
+   <l:gentext key="WARNING" text="&#51452;&#51032;!"/>
+   <l:gentext key="and" text="&#44536;&#47532;&#44256;"/>
+   <l:gentext key="by" text="&#51648;&#51008;&#51060;"/>
+   <l:gentext key="called" text="called" lang="en"/>
+   <l:gentext key="Edited" text="&#50670;&#51020;"/>
+   <l:gentext key="edited" text="&#50670;&#51020;"/>
+   <l:gentext key="Editedby" text="&#50670;&#51008;&#51060;"/>
+   <l:gentext key="editedby" text="&#50670;&#51008;&#51060;"/>
+   <l:gentext key="in" text="-"/>
+   <l:gentext key="lastlistcomma" text=","/>
+   <l:gentext key="listcomma" text=","/>
+   <l:gentext key="nonexistantelement" text="&#51316;&#51116;&#54616;&#51648; &#50506;&#45716; &#44592;&#52488;&#50836;&#49548;&#51077;&#45768;&#45796;"/>
+   <l:gentext key="notes" text="&#51452;&#49437;"/>
+   <l:gentext key="Notes" text="&#51452;&#49437;"/>
+   <l:gentext key="Pgs" text="Pgs."/>
+   <l:gentext key="pgs" text="Pgs."/>
+   <l:gentext key="Revisedby" text="&#44256;&#52828;&#51060; "/>
+   <l:gentext key="revisedby" text="&#44256;&#52828;&#51060; "/>
+   <l:gentext key="TableNotes" text="&#52280;&#44256;"/>
+   <l:gentext key="tablenotes" text="&#52280;&#44256;"/>
+   <l:gentext key="TableofContents" text="&#52264;&#47168;"/>
+   <l:gentext key="tableofcontents" text="&#52264;&#47168;"/>
+   <l:gentext key="the" text="" lang="en"/>
+   <l:gentext key="unexpectedelementname" text="&#50508; &#49688; &#50630;&#45716; &#44592;&#52488;&#50836;&#49548; &#51060;&#47492;&#51077;&#45768;&#45796;"/>
+   <l:gentext key="unsupported" text="&#51648;&#50896;&#46104;&#51648; &#50506;&#49845;&#45768;&#45796;"/>
+   <l:gentext key="xrefto" text="&#51060; &#44275;&#51012; &#52280;&#51312;&#54616;&#49464;&#50836; : "/>
+   <l:gentext key="listofequations" text="&#49688;&#49885; &#47785;&#47197;"/>
+   <l:gentext key="ListofEquations" text="&#49688;&#49885; &#47785;&#47197;"/>
+   <l:gentext key="ListofExamples" text="&#50696; &#47785;&#47197;"/>
+   <l:gentext key="listofexamples" text="&#50696; &#47785;&#47197;"/>
+   <l:gentext key="ListofFigures" text="&#44536;&#47548; &#47785;&#47197;"/>
+   <l:gentext key="listoffigures" text="&#44536;&#47548; &#47785;&#47197;"/>
+   <l:gentext key="ListofProcedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listofprocedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listoftables" text="&#54364; &#47785;&#47197;"/>
+   <l:gentext key="ListofTables" text="&#54364; &#47785;&#47197;"/>
+   <l:gentext key="ListofUnknown" text="&#44592;&#53440; &#47785;&#47197;"/>
+   <l:gentext key="listofunknown" text="&#44592;&#53440; &#47785;&#47197;"/>
+   <l:gentext key="nav-home" text="&#52376;&#51020;&#51004;&#47196;"/>
+   <l:gentext key="nav-next" text="&#45796;&#51020;"/>
+   <l:gentext key="nav-next-sibling" text="&#45796;&#51020;&#51004;&#47196; &#44148;&#45320;&#46848;"/>
+   <l:gentext key="nav-prev" text="&#51060;&#51204;"/>
+   <l:gentext key="nav-prev-sibling" text="&#51060;&#51204;&#51004;&#47196; &#44148;&#45320;&#46848;"/>
+   <l:gentext key="nav-up" text="&#50948;&#47196;"/>
+   <l:gentext key="nav-toc" text="ToC" lang="en"/>
+   <l:gentext key="Draft" text="Draft"/>
+   <l:gentext key="above" text="above"/>
+   <l:gentext key="below" text="below"/>
+   <l:gentext key="sectioncalled" text="the section called"/>
+   <l:gentext key="index symbols" text="Symbols"/>
+   <l:gentext key="lowercase.alpha" text="abcdefghijklmnopqrstuvwxyz" lang="en"/>
+   <l:gentext key="uppercase.alpha" text="ABCDEFGHIJKLMNOPQRSTUVWXYZ" lang="en"/>
+   <l:dingbat key="startquote" text="&#8220;"/>
+   <l:dingbat key="endquote" text="&#8221;"/>
+   <l:dingbat key="nestedstartquote" text="&#8216;"/>
+   <l:dingbat key="nestedendquote" text="&#8217;"/>
+   <l:dingbat key="singlestartquote" text="&#8216;" lang="en"/>
+   <l:dingbat key="singleendquote" text="&#8217;" lang="en"/>
+   <l:dingbat key="bullet" text="&#8226;"/>
+   <l:gentext key="hyphenation-character" text="-" lang="en"/>
+   <l:gentext key="hyphenation-push-character-count" text="2" lang="en"/>
+   <l:gentext key="hyphenation-remain-character-count" text="2" lang="en"/>
+
+   <l:context name="styles">
+      <l:template name="person-name" text="first-last"/>
+   </l:context>
+
+   <l:context name="title">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="%t"/>
+      <l:template name="appendix" text="&#48512;&#47197; %n. %t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="biblioentry" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliolist" text="%t" lang="en"/>
+      <l:template name="bibliomixed" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="%n&#51109;. %t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="&#49688;&#49885; %n. %t"/>
+      <l:template name="example" text="&#50696; %n. %t"/>
+      <l:template name="figure" text="&#44536;&#47548; %n. %t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="glosslist" text="%t" lang="en"/>
+      <l:template name="glossentry" text="%t" lang="en"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text=""/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="%n&#48512;. %t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="procedure.formal" text="&#51208;&#52264;&#160;%n.&#160;%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="productionset.formal" text="Production&#160;%n"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="%t"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="%t"/>
+      <l:template name="refentry" text="%t"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsection" text="%t"/>
+      <l:template name="refsect1" text="%t"/>
+      <l:template name="refsect2" text="%t"/>
+      <l:template name="refsect3" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="refsynopsisdivinfo" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="step" text="%t"/>
+      <l:template name="table" text="&#54364; %n. %t"/>
+      <l:template name="task" text="%t" lang="en"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="" lang="en"/>
+      <l:template name="warning" text="%t"/>
+   </l:context>
+
+   <l:context name="title-unnumbered">
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article/appendix" text="%t" lang="en"/>
+      <l:template name="bridgehead" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="sect1" text="%t"/>
+      <l:template name="sect2" text="%t"/>
+      <l:template name="sect3" text="%t"/>
+      <l:template name="sect4" text="%t"/>
+      <l:template name="sect5" text="%t"/>
+      <l:template name="section" text="%t"/>
+      <l:template name="simplesect" text="%t"/>
+   </l:context>
+
+   <l:context name="title-numbered">
+      <l:template name="appendix" text="&#48512;&#47197; %n. %t"/>
+      <l:template name="article/appendix" text="%n.&#160;%t" lang="en"/>
+      <l:template name="bridgehead" text="%n. %t"/>
+      <l:template name="chapter" text="%n&#51109;. %t"/>
+      <l:template name="sect1" text="%n. %t"/>
+      <l:template name="sect2" text="%n. %t"/>
+      <l:template name="sect3" text="%n. %t"/>
+      <l:template name="sect4" text="%n. %t"/>
+      <l:template name="sect5" text="%n. %t"/>
+      <l:template name="section" text="%n. %t"/>
+      <l:template name="simplesect" text="%n. %t"/>
+   </l:context>
+
+   <l:context name="subtitle">
+      <l:template name="appendix" text="%s"/>
+      <l:template name="article" text="%s"/>
+      <l:template name="bibliodiv" text="%s"/>
+      <l:template name="biblioentry" text="%s"/>
+      <l:template name="bibliography" text="%s"/>
+      <l:template name="bibliomixed" text="%s"/>
+      <l:template name="bibliomset" text="%s"/>
+      <l:template name="biblioset" text="%s"/>
+      <l:template name="book" text="%s"/>
+      <l:template name="chapter" text="%s"/>
+      <l:template name="colophon" text="%s"/>
+      <l:template name="dedication" text="%s"/>
+      <l:template name="glossary" text="%s"/>
+      <l:template name="glossdiv" text="%s"/>
+      <l:template name="index" text="%s"/>
+      <l:template name="indexdiv" text="%s"/>
+      <l:template name="lot" text="%s"/>
+      <l:template name="part" text="%s"/>
+      <l:template name="partintro" text="%s"/>
+      <l:template name="preface" text="%s"/>
+      <l:template name="refentry" text="%s"/>
+      <l:template name="reference" text="%s"/>
+      <l:template name="refsection" text="%s"/>
+      <l:template name="refsect1" text="%s"/>
+      <l:template name="refsect2" text="%s"/>
+      <l:template name="refsect3" text="%s"/>
+      <l:template name="refsynopsisdiv" text="%s"/>
+      <l:template name="sect1" text="%s"/>
+      <l:template name="sect2" text="%s"/>
+      <l:template name="sect3" text="%s"/>
+      <l:template name="sect4" text="%s"/>
+      <l:template name="sect5" text="%s"/>
+      <l:template name="section" text="%s"/>
+      <l:template name="set" text="%s"/>
+      <l:template name="setindex" text="%s"/>
+      <l:template name="sidebar" text="%s"/>
+      <l:template name="simplesect" text="%s"/>
+      <l:template name="toc" text="%s"/>
+   </l:context>
+
+   <l:context name="xref">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="&#45813;&#48320;&#160;%n"/>
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="constraintdef" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="%t"/>
+      <l:template name="example" text="%t"/>
+      <l:template name="figure" text="%t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text="%n"/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="%t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="&#51656;&#47928;&#160;%n"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="&#51656;&#47928;&#160;%n"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="table" text="%t"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="%n"/>
+      <l:template name="warning" text="%t"/>
+      <l:template name="page.citation" text=" [%p]"/>
+      <l:template name="page" text="(page %p)" lang="en"/>
+      <l:template name="pageabbrev" text="(p. %p)" lang="en"/>
+      <l:template name="Page" text="Page %p" lang="en"/>
+      <l:template name="bridgehead" text="&#8220;%t&#8221;"/>
+      <l:template name="refsection" text="&#8220;%t&#8221;"/>
+      <l:template name="refsect1" text="&#8220;%t&#8221;"/>
+      <l:template name="refsect2" text="&#8220;%t&#8221;"/>
+      <l:template name="refsect3" text="&#8220;%t&#8221;"/>
+      <l:template name="sect1" text="&#8220;%t&#8221;"/>
+      <l:template name="sect2" text="&#8220;%t&#8221;"/>
+      <l:template name="sect3" text="&#8220;%t&#8221;"/>
+      <l:template name="sect4" text="&#8220;%t&#8221;"/>
+      <l:template name="sect5" text="&#8220;%t&#8221;"/>
+      <l:template name="section" text="&#8220;%t&#8221;"/>
+      <l:template name="simplesect" text="&#8220;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="xref-number">
+      <l:template name="answer" text="&#45813;&#48320;&#160;%n"/>
+      <l:template name="appendix" text="&#48512;&#47197;&#160;%n"/>
+      <l:template name="bridgehead" text="&#51208;&#160;%n"/>
+      <l:template name="chapter" text="%n&#51109;"/>
+      <l:template name="equation" text="&#49688;&#49885;&#160;%n"/>
+      <l:template name="example" text="&#50696;&#160;%n"/>
+      <l:template name="figure" text="&#44536;&#47548;&#160;%n"/>
+      <l:template name="part" text="%n&#48512;"/>
+      <l:template name="procedure" text="&#51208;&#52264;&#160;%n"/>
+      <l:template name="productionset" text="Production&#160;%n"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n"/>
+      <l:template name="qandaentry" text="&#51656;&#47928;&#160;%n"/>
+      <l:template name="question" text="&#51656;&#47928;&#160;%n"/>
+      <l:template name="sect1" text="%n&#51208;"/>
+      <l:template name="sect2" text="%n&#51208;"/>
+      <l:template name="sect3" text="%n&#51208;"/>
+      <l:template name="sect4" text="%n&#51208;"/>
+      <l:template name="sect5" text="%n&#51208;"/>
+      <l:template name="section" text="%n&#51208;"/>
+      <l:template name="table" text="&#54364;&#160;%n"/>
+   </l:context>
+
+   <l:context name="xref-number-and-title">
+      <l:template name="appendix" text="&#48512;&#47197;&#160;%n. %t"/>
+      <l:template name="bridgehead" text="&#51208;&#160;%n. &#8220;%t&#8221;"/>
+      <l:template name="chapter" text="%n&#51109;. %t"/>
+      <l:template name="equation" text="&#49688;&#49885;&#160;%n. &#8220;%t&#8221;"/>
+      <l:template name="example" text="&#50696;&#160;%n. &#8220;%t&#8221;"/>
+      <l:template name="figure" text="&#44536;&#47548;&#160;%n. &#8220;%t&#8221;"/>
+      <l:template name="part" text="%n&#48512;. %t"/>
+      <l:template name="procedure" text="&#51208;&#52264;&#160;%n. &#8220;%t&#8221;"/>
+      <l:template name="productionset" text="Production&#160;%n. &#8220;%t&#8221;"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n. &#8220;%t&#8221;"/>
+      <l:template name="refsect1" text="&#8220;%t&#8221;"/>
+      <l:template name="refsect2" text="startquote/&gt;%t&#8221;"/>
+      <l:template name="refsect3" text="&#8220;%t&#8221;"/>
+      <l:template name="refsection" text="&#8220;%t&#8221;"/>
+      <l:template name="sect1" text="%n&#51208;. &#8220;%t&#8221;"/>
+      <l:template name="sect2" text="%n&#51208;. &#8220;%t&#8221;"/>
+      <l:template name="sect3" text="%n&#51208;. &#8220;%t&#8221;"/>
+      <l:template name="sect4" text="%n&#51208;. &#8220;%t&#8221;"/>
+      <l:template name="sect5" text="%n&#51208;. &#8220;%t&#8221;"/>
+      <l:template name="section" text="%n&#51208;. &#8220;%t&#8221;"/>
+      <l:template name="simplesect" text="&#8220;%t&#8221;"/>
+      <l:template name="table" text="&#54364;&#160;%n. &#8220;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="authorgroup">
+      <l:template name="sep" text=", "/>
+      <l:template name="sep2" text=" &#44536;&#47532;&#44256; "/>
+      <l:template name="seplast" text=", &#44536;&#47532;&#44256; "/>
+   </l:context>
+
+   <l:context name="glossary">
+      <l:template name="see" text="&#49332;&#54196;&#48380; &#45236;&#50857; "/>
+      <l:template name="seealso" text="&#45796;&#47480; &#49332;&#54196;&#48380; &#45236;&#50857; "/>
+   </l:context>
+
+   <l:context name="msgset">
+      <l:template name="MsgAud" text="&#48155;&#45716; &#51060;: "/>
+      <l:template name="MsgLevel" text="&#51473;&#50836;&#46020;: "/>
+      <l:template name="MsgOrig" text="&#48372;&#45236;&#45716; &#51060;: "/>
+   </l:context>
+
+   <l:context name="datetime">
+      <l:template name="format" text="m/d/Y" lang="en"/>
+   </l:context>
+
+   <l:context name="datetime-full">
+      <l:template name="January" text="January" lang="en"/>
+      <l:template name="February" text="February" lang="en"/>
+      <l:template name="March" text="March" lang="en"/>
+      <l:template name="April" text="April" lang="en"/>
+      <l:template name="May" text="May" lang="en"/>
+      <l:template name="June" text="June" lang="en"/>
+      <l:template name="July" text="July" lang="en"/>
+      <l:template name="August" text="August" lang="en"/>
+      <l:template name="September" text="September" lang="en"/>
+      <l:template name="October" text="October" lang="en"/>
+      <l:template name="November" text="November" lang="en"/>
+      <l:template name="December" text="December" lang="en"/>
+      <l:template name="Monday" text="Monday" lang="en"/>
+      <l:template name="Tuesday" text="Tuesday" lang="en"/>
+      <l:template name="Wednesday" text="Wednesday" lang="en"/>
+      <l:template name="Thursday" text="Thursday" lang="en"/>
+      <l:template name="Friday" text="Friday" lang="en"/>
+      <l:template name="Saturday" text="Saturday" lang="en"/>
+      <l:template name="Sunday" text="Sunday" lang="en"/>
+   </l:context>
+
+   <l:context name="datetime-abbrev">
+      <l:template name="Jan" text="Jan" lang="en"/>
+      <l:template name="Feb" text="Feb" lang="en"/>
+      <l:template name="Mar" text="Mar" lang="en"/>
+      <l:template name="Apr" text="Apr" lang="en"/>
+      <l:template name="May" text="May" lang="en"/>
+      <l:template name="Jun" text="Jun" lang="en"/>
+      <l:template name="Jul" text="Jul" lang="en"/>
+      <l:template name="Aug" text="Aug" lang="en"/>
+      <l:template name="Sep" text="Sep" lang="en"/>
+      <l:template name="Oct" text="Oct" lang="en"/>
+      <l:template name="Nov" text="Nov" lang="en"/>
+      <l:template name="Dec" text="Dec" lang="en"/>
+      <l:template name="Mon" text="Mon" lang="en"/>
+      <l:template name="Tue" text="Tue" lang="en"/>
+      <l:template name="Wed" text="Wed" lang="en"/>
+      <l:template name="Thu" text="Thu" lang="en"/>
+      <l:template name="Fri" text="Fri" lang="en"/>
+      <l:template name="Sat" text="Sat" lang="en"/>
+      <l:template name="Sun" text="Sun" lang="en"/>
+   </l:context>
+
+   <l:context name="htmlhelp">
+      <l:template name="langcode" text="0x0412 Korean"/>
+   </l:context>
+
+   <l:letters lang="en">
+      <l:l i="-1"/>
+      <l:l i="0">Symbols</l:l>
+      <l:l i="10">A</l:l>
+      <l:l i="10">a</l:l>
+      <l:l i="10">&#192;</l:l>
+      <l:l i="10">&#224;</l:l>
+      <l:l i="10">&#193;</l:l>
+      <l:l i="10">&#225;</l:l>
+      <l:l i="10">&#194;</l:l>
+      <l:l i="10">&#226;</l:l>
+      <l:l i="10">&#195;</l:l>
+      <l:l i="10">&#227;</l:l>
+      <l:l i="10">&#196;</l:l>
+      <l:l i="10">&#228;</l:l>
+      <l:l i="10">&#197;</l:l>
+      <l:l i="10">&#229;</l:l>
+      <l:l i="10">&#256;</l:l>
+      <l:l i="10">&#257;</l:l>
+      <l:l i="10">&#258;</l:l>
+      <l:l i="10">&#259;</l:l>
+      <l:l i="10">&#260;</l:l>
+      <l:l i="10">&#261;</l:l>
+      <l:l i="10">&#461;</l:l>
+      <l:l i="10">&#462;</l:l>
+      <l:l i="10">&#478;</l:l>
+      <l:l i="10">&#479;</l:l>
+      <l:l i="10">&#480;</l:l>
+      <l:l i="10">&#481;</l:l>
+      <l:l i="10">&#506;</l:l>
+      <l:l i="10">&#507;</l:l>
+      <l:l i="10">&#512;</l:l>
+      <l:l i="10">&#513;</l:l>
+      <l:l i="10">&#514;</l:l>
+      <l:l i="10">&#515;</l:l>
+      <l:l i="10">&#550;</l:l>
+      <l:l i="10">&#551;</l:l>
+      <l:l i="10">&#7680;</l:l>
+      <l:l i="10">&#7681;</l:l>
+      <l:l i="10">&#7834;</l:l>
+      <l:l i="10">&#7840;</l:l>
+      <l:l i="10">&#7841;</l:l>
+      <l:l i="10">&#7842;</l:l>
+      <l:l i="10">&#7843;</l:l>
+      <l:l i="10">&#7844;</l:l>
+      <l:l i="10">&#7845;</l:l>
+      <l:l i="10">&#7846;</l:l>
+      <l:l i="10">&#7847;</l:l>
+      <l:l i="10">&#7848;</l:l>
+      <l:l i="10">&#7849;</l:l>
+      <l:l i="10">&#7850;</l:l>
+      <l:l i="10">&#7851;</l:l>
+      <l:l i="10">&#7852;</l:l>
+      <l:l i="10">&#7853;</l:l>
+      <l:l i="10">&#7854;</l:l>
+      <l:l i="10">&#7855;</l:l>
+      <l:l i="10">&#7856;</l:l>
+      <l:l i="10">&#7857;</l:l>
+      <l:l i="10">&#7858;</l:l>
+      <l:l i="10">&#7859;</l:l>
+      <l:l i="10">&#7860;</l:l>
+      <l:l i="10">&#7861;</l:l>
+      <l:l i="10">&#7862;</l:l>
+      <l:l i="10">&#7863;</l:l>
+      <l:l i="20">B</l:l>
+      <l:l i="20">b</l:l>
+      <l:l i="20">&#384;</l:l>
+      <l:l i="20">&#385;</l:l>
+      <l:l i="20">&#595;</l:l>
+      <l:l i="20">&#386;</l:l>
+      <l:l i="20">&#387;</l:l>
+      <l:l i="20">&#7682;</l:l>
+      <l:l i="20">&#7683;</l:l>
+      <l:l i="20">&#7684;</l:l>
+      <l:l i="20">&#7685;</l:l>
+      <l:l i="20">&#7686;</l:l>
+      <l:l i="20">&#7687;</l:l>
+      <l:l i="30">C</l:l>
+      <l:l i="30">c</l:l>
+      <l:l i="30">&#199;</l:l>
+      <l:l i="30">&#231;</l:l>
+      <l:l i="30">&#262;</l:l>
+      <l:l i="30">&#263;</l:l>
+      <l:l i="30">&#264;</l:l>
+      <l:l i="30">&#265;</l:l>
+      <l:l i="30">&#266;</l:l>
+      <l:l i="30">&#267;</l:l>
+      <l:l i="30">&#268;</l:l>
+      <l:l i="30">&#269;</l:l>
+      <l:l i="30">&#391;</l:l>
+      <l:l i="30">&#392;</l:l>
+      <l:l i="30">&#597;</l:l>
+      <l:l i="30">&#7688;</l:l>
+      <l:l i="30">&#7689;</l:l>
+      <l:l i="40">D</l:l>
+      <l:l i="40">d</l:l>
+      <l:l i="40">&#270;</l:l>
+      <l:l i="40">&#271;</l:l>
+      <l:l i="40">&#272;</l:l>
+      <l:l i="40">&#273;</l:l>
+      <l:l i="40">&#394;</l:l>
+      <l:l i="40">&#599;</l:l>
+      <l:l i="40">&#395;</l:l>
+      <l:l i="40">&#396;</l:l>
+      <l:l i="40">&#453;</l:l>
+      <l:l i="40">&#498;</l:l>
+      <l:l i="40">&#545;</l:l>
+      <l:l i="40">&#598;</l:l>
+      <l:l i="40">&#7690;</l:l>
+      <l:l i="40">&#7691;</l:l>
+      <l:l i="40">&#7692;</l:l>
+      <l:l i="40">&#7693;</l:l>
+      <l:l i="40">&#7694;</l:l>
+      <l:l i="40">&#7695;</l:l>
+      <l:l i="40">&#7696;</l:l>
+      <l:l i="40">&#7697;</l:l>
+      <l:l i="40">&#7698;</l:l>
+      <l:l i="40">&#7699;</l:l>
+      <l:l i="50">E</l:l>
+      <l:l i="50">e</l:l>
+      <l:l i="50">&#200;</l:l>
+      <l:l i="50">&#232;</l:l>
+      <l:l i="50">&#201;</l:l>
+      <l:l i="50">&#233;</l:l>
+      <l:l i="50">&#202;</l:l>
+      <l:l i="50">&#234;</l:l>
+      <l:l i="50">&#203;</l:l>
+      <l:l i="50">&#235;</l:l>
+      <l:l i="50">&#274;</l:l>
+      <l:l i="50">&#275;</l:l>
+      <l:l i="50">&#276;</l:l>
+      <l:l i="50">&#277;</l:l>
+      <l:l i="50">&#278;</l:l>
+      <l:l i="50">&#279;</l:l>
+      <l:l i="50">&#280;</l:l>
+      <l:l i="50">&#281;</l:l>
+      <l:l i="50">&#282;</l:l>
+      <l:l i="50">&#283;</l:l>
+      <l:l i="50">&#516;</l:l>
+      <l:l i="50">&#517;</l:l>
+      <l:l i="50">&#518;</l:l>
+      <l:l i="50">&#519;</l:l>
+      <l:l i="50">&#552;</l:l>
+      <l:l i="50">&#553;</l:l>
+      <l:l i="50">&#7700;</l:l>
+      <l:l i="50">&#7701;</l:l>
+      <l:l i="50">&#7702;</l:l>
+      <l:l i="50">&#7703;</l:l>
+      <l:l i="50">&#7704;</l:l>
+      <l:l i="50">&#7705;</l:l>
+      <l:l i="50">&#7706;</l:l>
+      <l:l i="50">&#7707;</l:l>
+      <l:l i="50">&#7708;</l:l>
+      <l:l i="50">&#7709;</l:l>
+      <l:l i="50">&#7864;</l:l>
+      <l:l i="50">&#7865;</l:l>
+      <l:l i="50">&#7866;</l:l>
+      <l:l i="50">&#7867;</l:l>
+      <l:l i="50">&#7868;</l:l>
+      <l:l i="50">&#7869;</l:l>
+      <l:l i="50">&#7870;</l:l>
+      <l:l i="50">&#7871;</l:l>
+      <l:l i="50">&#7872;</l:l>
+      <l:l i="50">&#7873;</l:l>
+      <l:l i="50">&#7874;</l:l>
+      <l:l i="50">&#7875;</l:l>
+      <l:l i="50">&#7876;</l:l>
+      <l:l i="50">&#7877;</l:l>
+      <l:l i="50">&#7878;</l:l>
+      <l:l i="50">&#7879;</l:l>
+      <l:l i="60">F</l:l>
+      <l:l i="60">f</l:l>
+      <l:l i="60">&#401;</l:l>
+      <l:l i="60">&#402;</l:l>
+      <l:l i="60">&#7710;</l:l>
+      <l:l i="60">&#7711;</l:l>
+      <l:l i="70">G</l:l>
+      <l:l i="70">g</l:l>
+      <l:l i="70">&#284;</l:l>
+      <l:l i="70">&#285;</l:l>
+      <l:l i="70">&#286;</l:l>
+      <l:l i="70">&#287;</l:l>
+      <l:l i="70">&#288;</l:l>
+      <l:l i="70">&#289;</l:l>
+      <l:l i="70">&#290;</l:l>
+      <l:l i="70">&#291;</l:l>
+      <l:l i="70">&#403;</l:l>
+      <l:l i="70">&#608;</l:l>
+      <l:l i="70">&#484;</l:l>
+      <l:l i="70">&#485;</l:l>
+      <l:l i="70">&#486;</l:l>
+      <l:l i="70">&#487;</l:l>
+      <l:l i="70">&#500;</l:l>
+      <l:l i="70">&#501;</l:l>
+      <l:l i="70">&#7712;</l:l>
+      <l:l i="70">&#7713;</l:l>
+      <l:l i="80">H</l:l>
+      <l:l i="80">h</l:l>
+      <l:l i="80">&#292;</l:l>
+      <l:l i="80">&#293;</l:l>
+      <l:l i="80">&#294;</l:l>
+      <l:l i="80">&#295;</l:l>
+      <l:l i="80">&#542;</l:l>
+      <l:l i="80">&#543;</l:l>
+      <l:l i="80">&#614;</l:l>
+      <l:l i="80">&#7714;</l:l>
+      <l:l i="80">&#7715;</l:l>
+      <l:l i="80">&#7716;</l:l>
+      <l:l i="80">&#7717;</l:l>
+      <l:l i="80">&#7718;</l:l>
+      <l:l i="80">&#7719;</l:l>
+      <l:l i="80">&#7720;</l:l>
+      <l:l i="80">&#7721;</l:l>
+      <l:l i="80">&#7722;</l:l>
+      <l:l i="80">&#7723;</l:l>
+      <l:l i="80">&#7830;</l:l>
+      <l:l i="90">I</l:l>
+      <l:l i="90">i</l:l>
+      <l:l i="90">&#204;</l:l>
+      <l:l i="90">&#236;</l:l>
+      <l:l i="90">&#205;</l:l>
+      <l:l i="90">&#237;</l:l>
+      <l:l i="90">&#206;</l:l>
+      <l:l i="90">&#238;</l:l>
+      <l:l i="90">&#207;</l:l>
+      <l:l i="90">&#239;</l:l>
+      <l:l i="90">&#296;</l:l>
+      <l:l i="90">&#297;</l:l>
+      <l:l i="90">&#298;</l:l>
+      <l:l i="90">&#299;</l:l>
+      <l:l i="90">&#300;</l:l>
+      <l:l i="90">&#301;</l:l>
+      <l:l i="90">&#302;</l:l>
+      <l:l i="90">&#303;</l:l>
+      <l:l i="90">&#304;</l:l>
+      <l:l i="90">&#407;</l:l>
+      <l:l i="90">&#616;</l:l>
+      <l:l i="90">&#463;</l:l>
+      <l:l i="90">&#464;</l:l>
+      <l:l i="90">&#520;</l:l>
+      <l:l i="90">&#521;</l:l>
+      <l:l i="90">&#522;</l:l>
+      <l:l i="90">&#523;</l:l>
+      <l:l i="90">&#7724;</l:l>
+      <l:l i="90">&#7725;</l:l>
+      <l:l i="90">&#7726;</l:l>
+      <l:l i="90">&#7727;</l:l>
+      <l:l i="90">&#7880;</l:l>
+      <l:l i="90">&#7881;</l:l>
+      <l:l i="90">&#7882;</l:l>
+      <l:l i="90">&#7883;</l:l>
+      <l:l i="100">J</l:l>
+      <l:l i="100">j</l:l>
+      <l:l i="100">&#308;</l:l>
+      <l:l i="100">&#309;</l:l>
+      <l:l i="100">&#496;</l:l>
+      <l:l i="100">&#669;</l:l>
+      <l:l i="110">K</l:l>
+      <l:l i="110">k</l:l>
+      <l:l i="110">&#310;</l:l>
+      <l:l i="110">&#311;</l:l>
+      <l:l i="110">&#408;</l:l>
+      <l:l i="110">&#409;</l:l>
+      <l:l i="110">&#488;</l:l>
+      <l:l i="110">&#489;</l:l>
+      <l:l i="110">&#7728;</l:l>
+      <l:l i="110">&#7729;</l:l>
+      <l:l i="110">&#7730;</l:l>
+      <l:l i="110">&#7731;</l:l>
+      <l:l i="110">&#7732;</l:l>
+      <l:l i="110">&#7733;</l:l>
+      <l:l i="120">L</l:l>
+      <l:l i="120">l</l:l>
+      <l:l i="120">&#313;</l:l>
+      <l:l i="120">&#314;</l:l>
+      <l:l i="120">&#315;</l:l>
+      <l:l i="120">&#316;</l:l>
+      <l:l i="120">&#317;</l:l>
+      <l:l i="120">&#318;</l:l>
+      <l:l i="120">&#319;</l:l>
+      <l:l i="120">&#320;</l:l>
+      <l:l i="120">&#321;</l:l>
+      <l:l i="120">&#322;</l:l>
+      <l:l i="120">&#410;</l:l>
+      <l:l i="120">&#456;</l:l>
+      <l:l i="120">&#564;</l:l>
+      <l:l i="120">&#619;</l:l>
+      <l:l i="120">&#620;</l:l>
+      <l:l i="120">&#621;</l:l>
+      <l:l i="120">&#7734;</l:l>
+      <l:l i="120">&#7735;</l:l>
+      <l:l i="120">&#7736;</l:l>
+      <l:l i="120">&#7737;</l:l>
+      <l:l i="120">&#7738;</l:l>
+      <l:l i="120">&#7739;</l:l>
+      <l:l i="120">&#7740;</l:l>
+      <l:l i="120">&#7741;</l:l>
+      <l:l i="130">M</l:l>
+      <l:l i="130">m</l:l>
+      <l:l i="130">&#625;</l:l>
+      <l:l i="130">&#7742;</l:l>
+      <l:l i="130">&#7743;</l:l>
+      <l:l i="130">&#7744;</l:l>
+      <l:l i="130">&#7745;</l:l>
+      <l:l i="130">&#7746;</l:l>
+      <l:l i="130">&#7747;</l:l>
+      <l:l i="140">N</l:l>
+      <l:l i="140">n</l:l>
+      <l:l i="140">&#209;</l:l>
+      <l:l i="140">&#241;</l:l>
+      <l:l i="140">&#323;</l:l>
+      <l:l i="140">&#324;</l:l>
+      <l:l i="140">&#325;</l:l>
+      <l:l i="140">&#326;</l:l>
+      <l:l i="140">&#327;</l:l>
+      <l:l i="140">&#328;</l:l>
+      <l:l i="140">&#413;</l:l>
+      <l:l i="140">&#626;</l:l>
+      <l:l i="140">&#414;</l:l>
+      <l:l i="140">&#544;</l:l>
+      <l:l i="140">&#459;</l:l>
+      <l:l i="140">&#504;</l:l>
+      <l:l i="140">&#505;</l:l>
+      <l:l i="140">&#565;</l:l>
+      <l:l i="140">&#627;</l:l>
+      <l:l i="140">&#7748;</l:l>
+      <l:l i="140">&#7749;</l:l>
+      <l:l i="140">&#7750;</l:l>
+      <l:l i="140">&#7751;</l:l>
+      <l:l i="140">&#7752;</l:l>
+      <l:l i="140">&#7753;</l:l>
+      <l:l i="140">&#7754;</l:l>
+      <l:l i="140">&#7755;</l:l>
+      <l:l i="150">O</l:l>
+      <l:l i="150">o</l:l>
+      <l:l i="150">&#210;</l:l>
+      <l:l i="150">&#242;</l:l>
+      <l:l i="150">&#211;</l:l>
+      <l:l i="150">&#243;</l:l>
+      <l:l i="150">&#212;</l:l>
+      <l:l i="150">&#244;</l:l>
+      <l:l i="150">&#213;</l:l>
+      <l:l i="150">&#245;</l:l>
+      <l:l i="150">&#214;</l:l>
+      <l:l i="150">&#246;</l:l>
+      <l:l i="150">&#216;</l:l>
+      <l:l i="150">&#248;</l:l>
+      <l:l i="150">&#332;</l:l>
+      <l:l i="150">&#333;</l:l>
+      <l:l i="150">&#334;</l:l>
+      <l:l i="150">&#335;</l:l>
+      <l:l i="150">&#336;</l:l>
+      <l:l i="150">&#337;</l:l>
+      <l:l i="150">&#415;</l:l>
+      <l:l i="150">&#416;</l:l>
+      <l:l i="150">&#417;</l:l>
+      <l:l i="150">&#465;</l:l>
+      <l:l i="150">&#466;</l:l>
+      <l:l i="150">&#490;</l:l>
+      <l:l i="150">&#491;</l:l>
+      <l:l i="150">&#492;</l:l>
+      <l:l i="150">&#493;</l:l>
+      <l:l i="150">&#510;</l:l>
+      <l:l i="150">&#511;</l:l>
+      <l:l i="150">&#524;</l:l>
+      <l:l i="150">&#525;</l:l>
+      <l:l i="150">&#526;</l:l>
+      <l:l i="150">&#527;</l:l>
+      <l:l i="150">&#554;</l:l>
+      <l:l i="150">&#555;</l:l>
+      <l:l i="150">&#556;</l:l>
+      <l:l i="150">&#557;</l:l>
+      <l:l i="150">&#558;</l:l>
+      <l:l i="150">&#559;</l:l>
+      <l:l i="150">&#560;</l:l>
+      <l:l i="150">&#561;</l:l>
+      <l:l i="150">&#7756;</l:l>
+      <l:l i="150">&#7757;</l:l>
+      <l:l i="150">&#7758;</l:l>
+      <l:l i="150">&#7759;</l:l>
+      <l:l i="150">&#7760;</l:l>
+      <l:l i="150">&#7761;</l:l>
+      <l:l i="150">&#7762;</l:l>
+      <l:l i="150">&#7763;</l:l>
+      <l:l i="150">&#7884;</l:l>
+      <l:l i="150">&#7885;</l:l>
+      <l:l i="150">&#7886;</l:l>
+      <l:l i="150">&#7887;</l:l>
+      <l:l i="150">&#7888;</l:l>
+      <l:l i="150">&#7889;</l:l>
+      <l:l i="150">&#7890;</l:l>
+      <l:l i="150">&#7891;</l:l>
+      <l:l i="150">&#7892;</l:l>
+      <l:l i="150">&#7893;</l:l>
+      <l:l i="150">&#7894;</l:l>
+      <l:l i="150">&#7895;</l:l>
+      <l:l i="150">&#7896;</l:l>
+      <l:l i="150">&#7897;</l:l>
+      <l:l i="150">&#7898;</l:l>
+      <l:l i="150">&#7899;</l:l>
+      <l:l i="150">&#7900;</l:l>
+      <l:l i="150">&#7901;</l:l>
+      <l:l i="150">&#7902;</l:l>
+      <l:l i="150">&#7903;</l:l>
+      <l:l i="150">&#7904;</l:l>
+      <l:l i="150">&#7905;</l:l>
+      <l:l i="150">&#7906;</l:l>
+      <l:l i="150">&#7907;</l:l>
+      <l:l i="160">P</l:l>
+      <l:l i="160">p</l:l>
+      <l:l i="160">&#420;</l:l>
+      <l:l i="160">&#421;</l:l>
+      <l:l i="160">&#7764;</l:l>
+      <l:l i="160">&#7765;</l:l>
+      <l:l i="160">&#7766;</l:l>
+      <l:l i="160">&#7767;</l:l>
+      <l:l i="170">Q</l:l>
+      <l:l i="170">q</l:l>
+      <l:l i="170">&#672;</l:l>
+      <l:l i="180">R</l:l>
+      <l:l i="180">r</l:l>
+      <l:l i="180">&#340;</l:l>
+      <l:l i="180">&#341;</l:l>
+      <l:l i="180">&#342;</l:l>
+      <l:l i="180">&#343;</l:l>
+      <l:l i="180">&#344;</l:l>
+      <l:l i="180">&#345;</l:l>
+      <l:l i="180">&#528;</l:l>
+      <l:l i="180">&#529;</l:l>
+      <l:l i="180">&#530;</l:l>
+      <l:l i="180">&#531;</l:l>
+      <l:l i="180">&#636;</l:l>
+      <l:l i="180">&#637;</l:l>
+      <l:l i="180">&#638;</l:l>
+      <l:l i="180">&#7768;</l:l>
+      <l:l i="180">&#7769;</l:l>
+      <l:l i="180">&#7770;</l:l>
+      <l:l i="180">&#7771;</l:l>
+      <l:l i="180">&#7772;</l:l>
+      <l:l i="180">&#7773;</l:l>
+      <l:l i="180">&#7774;</l:l>
+      <l:l i="180">&#7775;</l:l>
+      <l:l i="190">S</l:l>
+      <l:l i="190">s</l:l>
+      <l:l i="190">&#346;</l:l>
+      <l:l i="190">&#347;</l:l>
+      <l:l i="190">&#348;</l:l>
+      <l:l i="190">&#349;</l:l>
+      <l:l i="190">&#350;</l:l>
+      <l:l i="190">&#351;</l:l>
+      <l:l i="190">&#352;</l:l>
+      <l:l i="190">&#353;</l:l>
+      <l:l i="190">&#536;</l:l>
+      <l:l i="190">&#537;</l:l>
+      <l:l i="190">&#642;</l:l>
+      <l:l i="190">&#7776;</l:l>
+      <l:l i="190">&#7777;</l:l>
+      <l:l i="190">&#7778;</l:l>
+      <l:l i="190">&#7779;</l:l>
+      <l:l i="190">&#7780;</l:l>
+      <l:l i="190">&#7781;</l:l>
+      <l:l i="190">&#7782;</l:l>
+      <l:l i="190">&#7783;</l:l>
+      <l:l i="190">&#7784;</l:l>
+      <l:l i="190">&#7785;</l:l>
+      <l:l i="200">T</l:l>
+      <l:l i="200">t</l:l>
+      <l:l i="200">&#354;</l:l>
+      <l:l i="200">&#355;</l:l>
+      <l:l i="200">&#356;</l:l>
+      <l:l i="200">&#357;</l:l>
+      <l:l i="200">&#358;</l:l>
+      <l:l i="200">&#359;</l:l>
+      <l:l i="200">&#427;</l:l>
+      <l:l i="200">&#428;</l:l>
+      <l:l i="200">&#429;</l:l>
+      <l:l i="200">&#430;</l:l>
+      <l:l i="200">&#648;</l:l>
+      <l:l i="200">&#538;</l:l>
+      <l:l i="200">&#539;</l:l>
+      <l:l i="200">&#566;</l:l>
+      <l:l i="200">&#7786;</l:l>
+      <l:l i="200">&#7787;</l:l>
+      <l:l i="200">&#7788;</l:l>
+      <l:l i="200">&#7789;</l:l>
+      <l:l i="200">&#7790;</l:l>
+      <l:l i="200">&#7791;</l:l>
+      <l:l i="200">&#7792;</l:l>
+      <l:l i="200">&#7793;</l:l>
+      <l:l i="200">&#7831;</l:l>
+      <l:l i="210">U</l:l>
+      <l:l i="210">u</l:l>
+      <l:l i="210">&#217;</l:l>
+      <l:l i="210">&#249;</l:l>
+      <l:l i="210">&#218;</l:l>
+      <l:l i="210">&#250;</l:l>
+      <l:l i="210">&#219;</l:l>
+      <l:l i="210">&#251;</l:l>
+      <l:l i="210">&#220;</l:l>
+      <l:l i="210">&#252;</l:l>
+      <l:l i="210">&#360;</l:l>
+      <l:l i="210">&#361;</l:l>
+      <l:l i="210">&#362;</l:l>
+      <l:l i="210">&#363;</l:l>
+      <l:l i="210">&#364;</l:l>
+      <l:l i="210">&#365;</l:l>
+      <l:l i="210">&#366;</l:l>
+      <l:l i="210">&#367;</l:l>
+      <l:l i="210">&#368;</l:l>
+      <l:l i="210">&#369;</l:l>
+      <l:l i="210">&#370;</l:l>
+      <l:l i="210">&#371;</l:l>
+      <l:l i="210">&#431;</l:l>
+      <l:l i="210">&#432;</l:l>
+      <l:l i="210">&#467;</l:l>
+      <l:l i="210">&#468;</l:l>
+      <l:l i="210">&#469;</l:l>
+      <l:l i="210">&#470;</l:l>
+      <l:l i="210">&#471;</l:l>
+      <l:l i="210">&#472;</l:l>
+      <l:l i="210">&#473;</l:l>
+      <l:l i="210">&#474;</l:l>
+      <l:l i="210">&#475;</l:l>
+      <l:l i="210">&#476;</l:l>
+      <l:l i="210">&#532;</l:l>
+      <l:l i="210">&#533;</l:l>
+      <l:l i="210">&#534;</l:l>
+      <l:l i="210">&#535;</l:l>
+      <l:l i="210">&#7794;</l:l>
+      <l:l i="210">&#7795;</l:l>
+      <l:l i="210">&#7796;</l:l>
+      <l:l i="210">&#7797;</l:l>
+      <l:l i="210">&#7798;</l:l>
+      <l:l i="210">&#7799;</l:l>
+      <l:l i="210">&#7800;</l:l>
+      <l:l i="210">&#7801;</l:l>
+      <l:l i="210">&#7802;</l:l>
+      <l:l i="210">&#7803;</l:l>
+      <l:l i="210">&#7908;</l:l>
+      <l:l i="210">&#7909;</l:l>
+      <l:l i="210">&#7910;</l:l>
+      <l:l i="210">&#7911;</l:l>
+      <l:l i="210">&#7912;</l:l>
+      <l:l i="210">&#7913;</l:l>
+      <l:l i="210">&#7914;</l:l>
+      <l:l i="210">&#7915;</l:l>
+      <l:l i="210">&#7916;</l:l>
+      <l:l i="210">&#7917;</l:l>
+      <l:l i="210">&#7918;</l:l>
+      <l:l i="210">&#7919;</l:l>
+      <l:l i="210">&#7920;</l:l>
+      <l:l i="210">&#7921;</l:l>
+      <l:l i="220">V</l:l>
+      <l:l i="220">v</l:l>
+      <l:l i="220">&#434;</l:l>
+      <l:l i="220">&#651;</l:l>
+      <l:l i="220">&#7804;</l:l>
+      <l:l i="220">&#7805;</l:l>
+      <l:l i="220">&#7806;</l:l>
+      <l:l i="220">&#7807;</l:l>
+      <l:l i="230">W</l:l>
+      <l:l i="230">w</l:l>
+      <l:l i="230">&#372;</l:l>
+      <l:l i="230">&#373;</l:l>
+      <l:l i="230">&#7808;</l:l>
+      <l:l i="230">&#7809;</l:l>
+      <l:l i="230">&#7810;</l:l>
+      <l:l i="230">&#7811;</l:l>
+      <l:l i="230">&#7812;</l:l>
+      <l:l i="230">&#7813;</l:l>
+      <l:l i="230">&#7814;</l:l>
+      <l:l i="230">&#7815;</l:l>
+      <l:l i="230">&#7816;</l:l>
+      <l:l i="230">&#7817;</l:l>
+      <l:l i="230">&#7832;</l:l>
+      <l:l i="240">X</l:l>
+      <l:l i="240">x</l:l>
+      <l:l i="240">&#7818;</l:l>
+      <l:l i="240">&#7819;</l:l>
+      <l:l i="240">&#7820;</l:l>
+      <l:l i="240">&#7821;</l:l>
+      <l:l i="250">Y</l:l>
+      <l:l i="250">y</l:l>
+      <l:l i="250">&#221;</l:l>
+      <l:l i="250">&#253;</l:l>
+      <l:l i="250">&#255;</l:l>
+      <l:l i="250">&#376;</l:l>
+      <l:l i="250">&#374;</l:l>
+      <l:l i="250">&#375;</l:l>
+      <l:l i="250">&#435;</l:l>
+      <l:l i="250">&#436;</l:l>
+      <l:l i="250">&#562;</l:l>
+      <l:l i="250">&#563;</l:l>
+      <l:l i="250">&#7822;</l:l>
+      <l:l i="250">&#7823;</l:l>
+      <l:l i="250">&#7833;</l:l>
+      <l:l i="250">&#7922;</l:l>
+      <l:l i="250">&#7923;</l:l>
+      <l:l i="250">&#7924;</l:l>
+      <l:l i="250">&#7925;</l:l>
+      <l:l i="250">&#7926;</l:l>
+      <l:l i="250">&#7927;</l:l>
+      <l:l i="250">&#7928;</l:l>
+      <l:l i="250">&#7929;</l:l>
+      <l:l i="260">Z</l:l>
+      <l:l i="260">z</l:l>
+      <l:l i="260">&#377;</l:l>
+      <l:l i="260">&#378;</l:l>
+      <l:l i="260">&#379;</l:l>
+      <l:l i="260">&#380;</l:l>
+      <l:l i="260">&#381;</l:l>
+      <l:l i="260">&#382;</l:l>
+      <l:l i="260">&#437;</l:l>
+      <l:l i="260">&#438;</l:l>
+      <l:l i="260">&#548;</l:l>
+      <l:l i="260">&#549;</l:l>
+      <l:l i="260">&#656;</l:l>
+      <l:l i="260">&#657;</l:l>
+      <l:l i="260">&#7824;</l:l>
+      <l:l i="260">&#7825;</l:l>
+      <l:l i="260">&#7826;</l:l>
+      <l:l i="260">&#7827;</l:l>
+      <l:l i="260">&#7828;</l:l>
+      <l:l i="260">&#7829;</l:l>
+   </l:letters>
+</l:l10n>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/l10n.dtd
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/l10n.dtd	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/l10n.dtd	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,63 @@
+<!ENTITY % prefix "l">
+
+<!ENTITY % xmlns "xmlns:%prefix;">
+<!ENTITY % uri "'http://docbook.sourceforge.net/xmlns/l10n/1.0'">
+
+<!ENTITY % i18n "%prefix;:i18n">
+<!ENTITY % l10n "%prefix;:l10n">
+<!ENTITY % gentext "%prefix;:gentext">
+<!ENTITY % dingbat "%prefix;:dingbat">
+<!ENTITY % context "%prefix;:context">
+<!ENTITY % template "%prefix;:template">
+<!ENTITY % letters "%prefix;:letters">
+<!ENTITY % l "%prefix;:l">
+<!ENTITY % lang "lang NMTOKEN #IMPLIED"> 
+
+<!ELEMENT %i18n; ((%l10n;)+)>
+<!ATTLIST %i18n;
+	%xmlns;		CDATA	#FIXED %uri;
+>
+
+<!ELEMENT %l10n; (%gentext;|%dingbat;|%context;|%letters;)*>
+<!ATTLIST %l10n;
+	%xmlns;		CDATA	#FIXED %uri;
+	language	CDATA	#REQUIRED
+	english-language-name	CDATA	#IMPLIED
+>
+
+<!ELEMENT %gentext; EMPTY>
+<!ATTLIST %gentext;
+	%lang;
+	key		CDATA	#REQUIRED
+	text		CDATA	#REQUIRED
+>
+
+<!ELEMENT %dingbat; EMPTY>
+<!ATTLIST %dingbat;
+        %lang;
+	key		CDATA	#REQUIRED
+	text		CDATA	#REQUIRED
+>
+
+<!ELEMENT %context; ((%template;)+)>
+<!ATTLIST %context;
+	name		CDATA	#REQUIRED
+>
+
+<!ELEMENT %template; EMPTY>
+<!ATTLIST %template;
+        %lang;
+	name		CDATA	#REQUIRED
+	text		CDATA	#REQUIRED
+	style		CDATA	#IMPLIED
+>
+
+<!ELEMENT %letters; ((%l;)+)>
+<!ATTLIST %letters;
+          %lang;
+>
+
+<!ELEMENT %l; (#PCDATA)>
+<!ATTLIST %l;
+          i 		CDATA 	#REQUIRED
+>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/l10n.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/l10n.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/l10n.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,89 @@
+<?xml version='1.0'?>
+<!DOCTYPE l:i18n SYSTEM "l10n.dtd" [
+<!ENTITY af SYSTEM "af.xml">
+<!ENTITY bg SYSTEM "bg.xml">
+<!ENTITY bn SYSTEM "bn.xml">
+<!ENTITY ca SYSTEM "ca.xml">
+<!ENTITY cs SYSTEM "cs.xml">
+<!ENTITY da SYSTEM "da.xml">
+<!ENTITY de SYSTEM "de.xml">
+<!ENTITY el SYSTEM "el.xml">
+<!ENTITY en SYSTEM "en.xml">
+<!ENTITY es SYSTEM "es.xml">
+<!ENTITY et SYSTEM "et.xml">
+<!ENTITY eu SYSTEM "eu.xml">
+<!ENTITY fi SYSTEM "fi.xml">
+<!ENTITY fr SYSTEM "fr.xml">
+<!ENTITY he SYSTEM "he.xml">
+<!ENTITY hu SYSTEM "hu.xml">
+<!ENTITY id SYSTEM "id.xml">
+<!ENTITY it SYSTEM "it.xml">
+<!ENTITY ja SYSTEM "ja.xml">
+<!ENTITY ko SYSTEM "ko.xml">
+<!ENTITY la SYSTEM "la.xml">
+<!ENTITY lit SYSTEM "lt.xml">
+<!ENTITY nl SYSTEM "nl.xml">
+<!ENTITY nn SYSTEM "nn.xml">
+<!ENTITY no SYSTEM "no.xml">
+<!ENTITY pl SYSTEM "pl.xml">
+<!ENTITY pt SYSTEM "pt.xml">
+<!ENTITY pt_br SYSTEM "pt_br.xml">
+<!ENTITY ro SYSTEM "ro.xml">
+<!ENTITY ru SYSTEM "ru.xml">
+<!ENTITY sk SYSTEM "sk.xml">
+<!ENTITY sl SYSTEM "sl.xml">
+<!ENTITY sr SYSTEM "sr.xml">
+<!ENTITY sr_Latn SYSTEM "sr_Latn.xml">
+<!ENTITY sv SYSTEM "sv.xml">
+<!ENTITY th SYSTEM "th.xml">
+<!ENTITY tr SYSTEM "tr.xml">
+<!ENTITY uk SYSTEM "uk.xml">
+<!ENTITY vi SYSTEM "vi.xml">
+<!ENTITY xh SYSTEM "xh.xml">
+<!ENTITY zh_cn SYSTEM "zh_cn.xml">
+<!ENTITY zh_tw SYSTEM "zh_tw.xml">
+]>
+<l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
+&af;
+&bg;
+&bn;
+&ca;
+&cs;
+&da;
+&de;
+&el;
+&en;
+&es;
+&et;
+&eu;
+&fi;
+&fr;
+&he;
+&hu;
+&id;
+&it;
+&ja;
+&ko;
+&la;
+&lit;
+&nl;
+&nn;
+&no;
+&pl;
+&pt;
+&pt_br;
+&ro;
+&ru;
+&sk;
+&sl;
+&sr;
+&sr_Latn;
+&sv;
+&th;
+&tr;
+&uk;
+&vi;
+&xh;
+&zh_cn;
+&zh_tw;
+</l:i18n>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/l10n.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/l10n.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/l10n.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,451 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0"
+                exclude-result-prefixes="l"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: l10n.xsl,v 1.1.1.1 2004/10/19 21:21:39 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     This file contains localization templates (for internationalization)
+     ******************************************************************** -->
+
+<xsl:param name="l10n.xml" select="document('../common/l10n.xml')"/>
+<xsl:param name="local.l10n.xml" select="document('')"/>
+
+<xsl:template name="l10n.language">
+  <xsl:param name="target" select="."/>
+  <xsl:param name="xref-context" select="false()"/>
+
+  <xsl:variable name="mc-language">
+    <xsl:choose>
+      <xsl:when test="$l10n.gentext.language != ''">
+        <xsl:value-of select="$l10n.gentext.language"/>
+      </xsl:when>
+
+      <xsl:when test="$xref-context or $l10n.gentext.use.xref.language != 0">
+        <!-- can't do this one step: attributes are unordered! -->
+        <xsl:variable name="lang-scope"
+                      select="($target/ancestor-or-self::*[@lang]
+                               |$target/ancestor-or-self::*[@xml:lang])[last()]"/>
+        <xsl:variable name="lang-attr"
+                      select="($lang-scope/@lang | $lang-scope/@xml:lang)[1]"/>
+        <xsl:choose>
+          <xsl:when test="string($lang-attr) = ''">
+            <xsl:value-of select="$l10n.gentext.default.language"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:value-of select="$lang-attr"/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:when>
+
+      <xsl:otherwise>
+        <!-- can't do this one step: attributes are unordered! -->
+        <xsl:variable name="lang-scope"
+                      select="($target/ancestor-or-self::*[@lang]
+                           |$target/ancestor-or-self::*[@xml:lang])[last()]"/>
+        <xsl:variable name="lang-attr"
+                      select="($lang-scope/@lang | $lang-scope/@xml:lang)[1]"/>
+
+        <xsl:choose>
+          <xsl:when test="string($lang-attr) = ''">
+            <xsl:value-of select="$l10n.gentext.default.language"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:value-of select="$lang-attr"/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:variable name="language" select="translate($mc-language,
+                                        'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
+                                        'abcdefghijklmnopqrstuvwxyz')"/>
+
+  <xsl:variable name="adjusted.language">
+    <xsl:choose>
+      <xsl:when test="contains($language,'-')">
+        <xsl:value-of select="substring-before($language,'-')"/>
+        <xsl:text>_</xsl:text>
+        <xsl:value-of select="substring-after($language,'-')"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$language"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="$l10n.xml/l:i18n/l:l10n[@language=$adjusted.language]">
+      <xsl:value-of select="$adjusted.language"/>
+    </xsl:when>
+    <!-- try just the lang code without country -->
+    <xsl:when test="$l10n.xml/l:i18n/l:l10n[@language=substring-before($adjusted.language,'_')]">
+      <xsl:value-of select="substring-before($adjusted.language,'_')"/>
+    </xsl:when>
+    <!-- or use the default -->
+    <xsl:otherwise>
+      <xsl:message>
+        <xsl:text>No localization exists for "</xsl:text>
+        <xsl:value-of select="$adjusted.language"/>
+        <xsl:text>" or "</xsl:text>
+        <xsl:value-of select="substring-before($adjusted.language,'_')"/>
+        <xsl:text>". Using default "</xsl:text>
+        <xsl:value-of select="$l10n.gentext.default.language"/>
+        <xsl:text>".</xsl:text>
+      </xsl:message>
+      <xsl:value-of select="$l10n.gentext.default.language"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="language.attribute">
+  <xsl:param name="node" select="."/>
+
+  <xsl:variable name="language">
+    <xsl:choose>
+      <xsl:when test="$l10n.gentext.language != ''">
+        <xsl:value-of select="$l10n.gentext.language"/>
+      </xsl:when>
+
+      <xsl:otherwise>
+        <!-- can't do this one step: attributes are unordered! -->
+        <xsl:variable name="lang-scope"
+                      select="($node/ancestor-or-self::*[@lang]
+                               |$node/ancestor-or-self::*[@xml:lang])[last()]"/>
+        <xsl:variable name="lang-attr"
+                      select="($lang-scope/@lang | $lang-scope/@xml:lang)[1]"/>
+
+        <xsl:choose>
+          <xsl:when test="string($lang-attr) = ''">
+            <xsl:value-of select="$l10n.gentext.default.language"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:value-of select="$lang-attr"/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:if test="$language != ''">
+    <xsl:attribute name="lang">
+      <xsl:value-of select="$language"/>
+    </xsl:attribute>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template name="gentext">
+  <xsl:param name="key" select="local-name(.)"/>
+  <xsl:param name="lang">
+    <xsl:call-template name="l10n.language"/>
+  </xsl:param>
+
+  <xsl:variable name="local.l10n.gentext"
+                select="($local.l10n.xml//l:i18n/l:l10n[@language=$lang]/l:gentext[@key=$key])[1]"/>
+
+  <xsl:variable name="l10n.gentext"
+                select="($l10n.xml/l:i18n/l:l10n[@language=$lang]/l:gentext[@key=$key])[1]"/>
+
+  <xsl:choose>
+    <xsl:when test="count($local.l10n.gentext) &gt; 0">
+      <xsl:value-of select="$local.l10n.gentext/@text"/>
+    </xsl:when>
+    <xsl:when test="count($l10n.gentext) &gt; 0">
+      <xsl:value-of select="$l10n.gentext/@text"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:message>
+        <xsl:text>No "</xsl:text>
+        <xsl:value-of select="$lang"/>
+        <xsl:text>" localization of "</xsl:text>
+        <xsl:value-of select="$key"/>
+        <xsl:text>" exists</xsl:text>
+	<xsl:choose>
+	  <xsl:when test="$lang = 'en'">
+	     <xsl:text>.</xsl:text>
+	  </xsl:when>
+	  <xsl:otherwise>
+	     <xsl:text>; using "en".</xsl:text>
+	  </xsl:otherwise>
+	</xsl:choose>
+      </xsl:message>
+
+      <xsl:value-of select="($l10n.xml/l:i18n/l:l10n[@language='en']/l:gentext[@key=$key])[1]/@text"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="gentext.element.name">
+  <xsl:param name="element.name" select="name(.)"/>
+  <xsl:param name="lang">
+    <xsl:call-template name="l10n.language"/>
+  </xsl:param>
+
+  <xsl:call-template name="gentext">
+    <xsl:with-param name="key" select="$element.name"/>
+    <xsl:with-param name="lang" select="$lang"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="gentext.space">
+  <xsl:text> </xsl:text>
+</xsl:template>
+
+<xsl:template name="gentext.edited.by">
+  <xsl:call-template name="gentext">
+    <xsl:with-param name="key" select="'Editedby'"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="gentext.by">
+  <xsl:call-template name="gentext">
+    <xsl:with-param name="key" select="'by'"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="gentext.dingbat">
+  <xsl:param name="dingbat">bullet</xsl:param>
+  <xsl:param name="lang">
+    <xsl:call-template name="l10n.language"/>
+  </xsl:param>
+
+  <xsl:variable name="local.l10n.dingbat"
+                select="($local.l10n.xml//l:i18n/l:l10n[@language=$lang]/l:dingbat[@key=$dingbat])[1]"/>
+
+  <xsl:variable name="l10n.dingbat"
+                select="($l10n.xml/l:i18n/l:l10n[@language=$lang]/l:dingbat[@key=$dingbat])[1]"/>
+
+  <xsl:choose>
+    <xsl:when test="count($local.l10n.dingbat) &gt; 0">
+      <xsl:value-of select="$local.l10n.dingbat/@text"/>
+    </xsl:when>
+    <xsl:when test="count($l10n.dingbat) &gt; 0">
+      <xsl:value-of select="$l10n.dingbat/@text"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:message>
+        <xsl:text>No "</xsl:text>
+        <xsl:value-of select="$lang"/>
+        <xsl:text>" localization of dingbat </xsl:text>
+        <xsl:value-of select="$dingbat"/>
+        <xsl:text> exists; using "en".</xsl:text>
+      </xsl:message>
+
+      <xsl:value-of select="($l10n.xml/l:i18n/l:l10n[@language='en']/l:dingbat[@key=$dingbat])[1]/@text"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="gentext.startquote">
+  <xsl:call-template name="gentext.dingbat">
+    <xsl:with-param name="dingbat">startquote</xsl:with-param>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="gentext.endquote">
+  <xsl:call-template name="gentext.dingbat">
+    <xsl:with-param name="dingbat">endquote</xsl:with-param>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="gentext.nestedstartquote">
+  <xsl:call-template name="gentext.dingbat">
+    <xsl:with-param name="dingbat">nestedstartquote</xsl:with-param>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="gentext.nestedendquote">
+  <xsl:call-template name="gentext.dingbat">
+    <xsl:with-param name="dingbat">nestedendquote</xsl:with-param>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="gentext.nav.prev">
+  <xsl:call-template name="gentext">
+    <xsl:with-param name="key" select="'nav-prev'"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="gentext.nav.next">
+  <xsl:call-template name="gentext">
+    <xsl:with-param name="key" select="'nav-next'"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="gentext.nav.home">
+  <xsl:call-template name="gentext">
+    <xsl:with-param name="key" select="'nav-home'"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="gentext.nav.up">
+  <xsl:call-template name="gentext">
+    <xsl:with-param name="key" select="'nav-up'"/>
+  </xsl:call-template>
+</xsl:template>
+
+<!-- ============================================================ -->
+
+<xsl:template name="gentext.template">
+  <xsl:param name="context" select="'default'"/>
+  <xsl:param name="name" select="'default'"/>
+  <xsl:param name="origname" select="$name"/>
+  <xsl:param name="purpose"/>
+  <xsl:param name="xrefstyle"/>
+  <xsl:param name="referrer"/>
+  <xsl:param name="lang">
+    <xsl:call-template name="l10n.language"/>
+  </xsl:param>
+
+  <xsl:variable name="local.localization.node"
+                select="($local.l10n.xml//l:i18n/l:l10n[@language=$lang])[1]"/>
+
+  <xsl:variable name="localization.node"
+                select="($l10n.xml/l:i18n/l:l10n[@language=$lang])[1]"/>
+
+  <xsl:if test="count($localization.node) = 0
+                and count($local.localization.node) = 0">
+    <xsl:message>
+      <xsl:text>No "</xsl:text>
+      <xsl:value-of select="$lang"/>
+      <xsl:text>" localization exists.</xsl:text>
+    </xsl:message>
+  </xsl:if>
+
+  <xsl:variable name="local.context.node"
+                select="$local.localization.node/l:context[@name=$context]"/>
+
+  <xsl:variable name="context.node"
+                select="$localization.node/l:context[@name=$context]"/>
+
+  <xsl:if test="count($context.node) = 0
+                and count($local.context.node) = 0">
+    <xsl:message>
+      <xsl:text>No context named "</xsl:text>
+      <xsl:value-of select="$context"/>
+      <xsl:text>" exists in the "</xsl:text>
+      <xsl:value-of select="$lang"/>
+      <xsl:text>" localization.</xsl:text>
+    </xsl:message>
+  </xsl:if>
+
+  <xsl:variable name="local.template.node"
+                select="($local.context.node/l:template[@name=$name
+                                                        and @style
+                                                        and @style=$xrefstyle]
+                        |$local.context.node/l:template[@name=$name
+                                                        and not(@style)])[1]"/>
+
+  <xsl:variable name="template.node"
+                select="($context.node/l:template[@name=$name
+                                                  and @style
+                                                  and @style=$xrefstyle]
+                        |$context.node/l:template[@name=$name
+                                                  and not(@style)])[1]"/>
+
+  <xsl:choose>
+    <xsl:when test="$local.template.node/@text">
+      <xsl:value-of select="$local.template.node/@text"/>
+    </xsl:when>
+    <xsl:when test="$template.node/@text">
+      <xsl:value-of select="$template.node/@text"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:choose>
+        <xsl:when test="contains($name, '/')">
+          <xsl:call-template name="gentext.template">
+            <xsl:with-param name="context" select="$context"/>
+            <xsl:with-param name="name" select="substring-after($name, '/')"/>
+            <xsl:with-param name="origname" select="$origname"/>
+            <xsl:with-param name="purpose" select="$purpose"/>
+            <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+            <xsl:with-param name="referrer" select="$referrer"/>
+            <xsl:with-param name="lang" select="$lang"/>
+          </xsl:call-template>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:message>
+            <xsl:text>No template for "</xsl:text>
+            <xsl:value-of select="$origname"/>
+            <xsl:text>" (or any of its leaves) exists
+in the context named "</xsl:text>
+            <xsl:value-of select="$context"/>
+            <xsl:text>" in the "</xsl:text>
+            <xsl:value-of select="$lang"/>
+            <xsl:text>" localization.</xsl:text>
+          </xsl:message>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="gentext.template.exists">
+  <xsl:param name="context" select="'default'"/>
+  <xsl:param name="name" select="'default'"/>
+  <xsl:param name="origname" select="$name"/>
+  <xsl:param name="purpose"/>
+  <xsl:param name="xrefstyle"/>
+  <xsl:param name="referrer"/>
+  <xsl:param name="lang">
+    <xsl:call-template name="l10n.language"/>
+  </xsl:param>
+
+  <xsl:variable name="local.localization.node"
+                select="($local.l10n.xml//l:i18n/l:l10n[@language=$lang])[1]"/>
+
+  <xsl:variable name="localization.node"
+                select="($l10n.xml/l:i18n/l:l10n[@language=$lang])[1]"/>
+
+  <xsl:variable name="local.context.node"
+                select="$local.localization.node/l:context[@name=$context]"/>
+
+  <xsl:variable name="context.node"
+                select="$localization.node/l:context[@name=$context]"/>
+
+  <xsl:variable name="local.template.node"
+                select="($local.context.node/l:template[@name=$name
+                                                        and @style
+                                                        and @style=$xrefstyle]
+                        |$local.context.node/l:template[@name=$name
+                                                        and not(@style)])[1]"/>
+
+  <xsl:variable name="template.node"
+                select="($context.node/l:template[@name=$name
+                                                  and @style
+                                                  and @style=$xrefstyle]
+                        |$context.node/l:template[@name=$name
+                                                  and not(@style)])[1]"/>
+
+  <xsl:choose>
+    <xsl:when test="$local.template.node/@text">1</xsl:when>
+    <xsl:when test="$template.node/@text">1</xsl:when>
+    <xsl:otherwise>
+      <xsl:choose>
+        <xsl:when test="contains($name, '/')">
+          <xsl:call-template name="gentext.template.exists">
+            <xsl:with-param name="context" select="$context"/>
+            <xsl:with-param name="name" select="substring-after($name, '/')"/>
+            <xsl:with-param name="origname" select="$origname"/>
+            <xsl:with-param name="purpose" select="$purpose"/>
+            <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+            <xsl:with-param name="referrer" select="$referrer"/>
+            <xsl:with-param name="lang" select="$lang"/>
+          </xsl:call-template>
+        </xsl:when>
+        <xsl:otherwise>0</xsl:otherwise>
+      </xsl:choose>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+</xsl:stylesheet>
+

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/la.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/la.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/la.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1153 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="la" english-language-name="Latin">
+
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+   <l:gentext key="Abstract" text="Summarium"/>
+   <l:gentext key="abstract" text="summarium"/>
+   <l:gentext key="Answer" text="R:"/>
+   <l:gentext key="answer" text="r:"/>
+   <l:gentext key="Appendix" text="Additamentum"/>
+   <l:gentext key="appendix" text="additamentum"/>
+   <l:gentext key="Article" text="Articulus"/>
+   <l:gentext key="article" text="articulus"/>
+   <l:gentext key="Bibliography" text="Conspectus librorum"/>
+   <l:gentext key="bibliography" text="conspectus librorum"/>
+   <l:gentext key="Book" text="Liber"/>
+   <l:gentext key="book" text="liber"/>
+   <l:gentext key="CAUTION" text="Caveat"/>
+   <l:gentext key="Caution" text="Caveat"/>
+   <l:gentext key="caution" text="caveat"/>
+   <l:gentext key="Chapter" text="Capitulum"/>
+   <l:gentext key="chapter" text="capitulum"/>
+   <l:gentext key="Colophon" text="Colophon"/>
+   <l:gentext key="colophon" text="colophon"/>
+   <l:gentext key="Copyright" text="Copyright"/>
+   <l:gentext key="copyright" text="copyright"/>
+   <l:gentext key="Dedication" text="Dedicatoria"/>
+   <l:gentext key="dedication" text="dedicatoria"/>
+   <l:gentext key="Edition" text="Editio"/>
+   <l:gentext key="edition" text="editio"/>
+   <l:gentext key="Equation" text="Equatio"/>
+   <l:gentext key="equation" text="equatio"/>
+   <l:gentext key="Example" text="Exemplum"/>
+   <l:gentext key="example" text="exemplum"/>
+   <l:gentext key="Figure" text="Descriptio"/>
+   <l:gentext key="figure" text="descriptio"/>
+   <l:gentext key="Glossary" text="Glossarium"/>
+   <l:gentext key="glossary" text="glossarium"/>
+   <l:gentext key="GlossSee" text="Cfr."/>
+   <l:gentext key="glosssee" text="Cfr."/>
+   <l:gentext key="GlossSeeAlso" text="Cfr. autem"/>
+   <l:gentext key="glossseealso" text="cfr. autem"/>
+   <l:gentext key="IMPORTANT" text="GRAVE"/>
+   <l:gentext key="important" text="grave"/>
+   <l:gentext key="Important" text="Grave"/>
+   <l:gentext key="Index" text="Index"/>
+   <l:gentext key="index" text="index"/>
+   <l:gentext key="ISBN" text="ISBN"/>
+   <l:gentext key="isbn" text="isbn"/>
+   <l:gentext key="LegalNotice" text="Nuntius legalis"/>
+   <l:gentext key="legalnotice" text="nuntius legalis"/>
+   <l:gentext key="MsgAud" text="Legentes"/>
+   <l:gentext key="msgaud" text="legentes"/>
+   <l:gentext key="MsgLevel" text="Libra"/>
+   <l:gentext key="msglevel" text="libra"/>
+   <l:gentext key="MsgOrig" text="Fons"/>
+   <l:gentext key="msgorig" text="fons"/>
+   <l:gentext key="NOTE" text="NOTA"/>
+   <l:gentext key="Note" text="Nota"/>
+   <l:gentext key="note" text="nota"/>
+   <l:gentext key="Part" text="Pars"/>
+   <l:gentext key="part" text="pars"/>
+   <l:gentext key="Preface" text="Praefatio"/>
+   <l:gentext key="preface" text="praefatio"/>
+   <l:gentext key="Procedure" text="Progressio"/>
+   <l:gentext key="procedure" text="progressio"/>
+   <l:gentext key="ProductionSet" text="Compositio"/>
+   <l:gentext key="PubDate" text="Publication Date" lang="en"/>
+   <l:gentext key="pubdate" text="Publication date" lang="en"/>
+   <l:gentext key="Published" text="Editum"/>
+   <l:gentext key="published" text="editum"/>
+   <l:gentext key="Qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="Question" text="Q:"/>
+   <l:gentext key="question" text="q:"/>
+   <l:gentext key="RefEntry" text="Mentionis descriptio"/>
+   <l:gentext key="refentry" text="mentionis descriptio"/>
+   <l:gentext key="Reference" text="Mentio"/>
+   <l:gentext key="reference" text="mentio"/>
+   <l:gentext key="RefName" text="Mentionis signum"/>
+   <l:gentext key="refname" text="mentionis signum"/>
+   <l:gentext key="RefSection" text="Mentionis pars"/>
+   <l:gentext key="refsection" text="mentionis pars"/>
+   <l:gentext key="RefSynopsisDiv" text="Synopsis"/>
+   <l:gentext key="refsynopsisdiv" text="Synopsis"/>
+   <l:gentext key="RevHistory" text="Revisionum historia"/>
+   <l:gentext key="revhistory" text="revisionum historia"/>
+   <l:gentext key="revision" text="Revisio"/>
+   <l:gentext key="Revision" text="revisio"/>
+   <l:gentext key="sect1" text="Sectio"/>
+   <l:gentext key="sect2" text="Sectio"/>
+   <l:gentext key="sect3" text="Sectio"/>
+   <l:gentext key="sect4" text="Sectio"/>
+   <l:gentext key="sect5" text="Sectio"/>
+   <l:gentext key="section" text="Sectio"/>
+   <l:gentext key="Section" text="Sectio"/>
+   <l:gentext key="see" text="videtur"/>
+   <l:gentext key="See" text="See" lang="en"/>
+   <l:gentext key="seealso" text="videtur autem"/>
+   <l:gentext key="Seealso" text="See also" lang="en"/>
+   <l:gentext key="SeeAlso" text="See Also" lang="en"/>
+   <l:gentext key="set" text="complexus"/>
+   <l:gentext key="Set" text="Complexus"/>
+   <l:gentext key="setindex" text="complexi index"/>
+   <l:gentext key="SetIndex" text="Complexi index"/>
+   <l:gentext key="Sidebar" text="Linea a latere posita"/>
+   <l:gentext key="sidebar" text="linea a latere posita"/>
+   <l:gentext key="step" text="peractio"/>
+   <l:gentext key="Step" text="Peractio"/>
+   <l:gentext key="Table" text="Tabula"/>
+   <l:gentext key="table" text="tabula"/>
+   <l:gentext key="tip" text="consilium"/>
+   <l:gentext key="TIP" text="CONSILIUM"/>
+   <l:gentext key="Tip" text="Consilium"/>
+   <l:gentext key="Warning" text="MONITUS"/>
+   <l:gentext key="warning" text="monitus"/>
+   <l:gentext key="WARNING" text="MONITUS"/>
+   <l:gentext key="and" text="et"/>
+   <l:gentext key="by" text="a"/>
+   <l:gentext key="called" text="called" lang="en"/>
+   <l:gentext key="Edited" text="Editum"/>
+   <l:gentext key="edited" text="editum"/>
+   <l:gentext key="Editedby" text="Editum a"/>
+   <l:gentext key="editedby" text="editum a"/>
+   <l:gentext key="in" text="in"/>
+   <l:gentext key="lastlistcomma" text=","/>
+   <l:gentext key="listcomma" text=","/>
+   <l:gentext key="nonexistantelement" text="quod non est"/>
+   <l:gentext key="notes" text="commentaria"/>
+   <l:gentext key="Notes" text="Commentaria"/>
+   <l:gentext key="Pgs" text="Pag."/>
+   <l:gentext key="pgs" text="pag."/>
+   <l:gentext key="Revisedby" text="Excussum a: "/>
+   <l:gentext key="revisedby" text="excussum a: "/>
+   <l:gentext key="TableNotes" text="Tabulae commentaria"/>
+   <l:gentext key="tablenotes" text="tabulae commentaria"/>
+   <l:gentext key="TableofContents" text="Index rerum notabilium"/>
+   <l:gentext key="tableofcontents" text="index rerum notabilium"/>
+   <l:gentext key="the" text="" lang="en"/>
+   <l:gentext key="unexpectedelementname" text="necopinatum nomen"/>
+   <l:gentext key="unsupported" text="non sustentatus"/>
+   <l:gentext key="xrefto" text="mentio"/>
+   <l:gentext key="listofequations" text="index aequationum"/>
+   <l:gentext key="ListofEquations" text="Index aequationum"/>
+   <l:gentext key="ListofExamples" text="Index exemplorum"/>
+   <l:gentext key="listofexamples" text="index exemplorum"/>
+   <l:gentext key="ListofFigures" text="Index descriptionum"/>
+   <l:gentext key="listoffigures" text="index descriptionum"/>
+   <l:gentext key="ListofProcedures" text="Index progressiorum"/>
+   <l:gentext key="listofprocedures" text="index progressiorum"/>
+   <l:gentext key="listoftables" text="index tabularum"/>
+   <l:gentext key="ListofTables" text="Index tabularum"/>
+   <l:gentext key="ListofUnknown" text="Index ignotorum"/>
+   <l:gentext key="listofunknown" text="index ignotorum"/>
+   <l:gentext key="nav-home" text="Initium"/>
+   <l:gentext key="nav-next" text="Sequens"/>
+   <l:gentext key="nav-next-sibling" text="Procede"/>
+   <l:gentext key="nav-prev" text="Praecedens"/>
+   <l:gentext key="nav-prev-sibling" text="Recede"/>
+   <l:gentext key="nav-up" text="Ascende"/>
+   <l:gentext key="nav-toc" text="Index"/>
+   <l:gentext key="Draft" text="Plagula"/>
+   <l:gentext key="above" text="supra"/>
+   <l:gentext key="below" text="sub"/>
+   <l:gentext key="sectioncalled" text="sectio vocata"/>
+   <l:gentext key="index symbols" text="signa"/>
+   <l:gentext key="lowercase.alpha" text="abcdefghijklmnopqrstuvwxyz"/>
+   <l:gentext key="uppercase.alpha" text="ABCDEFGHIJKLMNOPQRSTUVWXYZ"/>
+   <l:dingbat key="startquote" text="&#738;"/>
+   <l:dingbat key="endquote" text="&#1762;"/>
+   <l:dingbat key="nestedstartquote" text="&#8249;"/>
+   <l:dingbat key="nestedendquote" text="&#8250;"/>
+   <l:dingbat key="singlestartquote" text="&#8216;" lang="en"/>
+   <l:dingbat key="singleendquote" text="&#8217;" lang="en"/>
+   <l:dingbat key="bullet" text="&#8226;"/>
+   <l:gentext key="hyphenation-character" text="&#8208;"/>
+   <l:gentext key="hyphenation-push-character-count" text="2"/>
+   <l:gentext key="hyphenation-remain-character-count" text="2"/>
+
+   <l:context name="styles">
+      <l:template name="person-name" text="first-last"/>
+   </l:context>
+
+   <l:context name="title">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="%t"/>
+      <l:template name="appendix" text="Additamentum%n.%t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="biblioentry" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliolist" text="%t" lang="en"/>
+      <l:template name="bibliomixed" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="Capitulum%n.%t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="Equatio%n.%t"/>
+      <l:template name="example" text="Exemplum%n.%t"/>
+      <l:template name="figure" text="Descriptio%n.%t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="glosslist" text="%t" lang="en"/>
+      <l:template name="glossentry" text="%t"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text=""/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="Pars%n.%t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="procedure.formal" text="Progressio%n.%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="productionset.formal" text="Compositio%n"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="%t"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="%t"/>
+      <l:template name="refentry" text="%t"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsection" text="%t"/>
+      <l:template name="refsect1" text="%t"/>
+      <l:template name="refsect2" text="%t"/>
+      <l:template name="refsect3" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="refsynopsisdivinfo" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="step" text="%t"/>
+      <l:template name="table" text="Tabula%n.%t"/>
+      <l:template name="task" text="%t" lang="en"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text=""/>
+      <l:template name="warning" text="%t"/>
+   </l:context>
+
+   <l:context name="title-unnumbered">
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article/appendix" text="%t"/>
+      <l:template name="bridgehead" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="sect1" text="%t"/>
+      <l:template name="sect2" text="%t"/>
+      <l:template name="sect3" text="%t"/>
+      <l:template name="sect4" text="%t"/>
+      <l:template name="sect5" text="%t"/>
+      <l:template name="section" text="%t"/>
+      <l:template name="simplesect" text="%t"/>
+   </l:context>
+
+   <l:context name="title-numbered">
+      <l:template name="appendix" text="Additamentum%n.%t"/>
+      <l:template name="article/appendix" text="%n.%t"/>
+      <l:template name="bridgehead" text="%n.%t"/>
+      <l:template name="chapter" text="Capitulum%n.%t"/>
+      <l:template name="sect1" text="%n.%t"/>
+      <l:template name="sect2" text="%n.%t"/>
+      <l:template name="sect3" text="%n.%t"/>
+      <l:template name="sect4" text="%n.%t"/>
+      <l:template name="sect5" text="%n.%t"/>
+      <l:template name="section" text="%n.%t"/>
+      <l:template name="simplesect" text="%t"/>
+   </l:context>
+
+   <l:context name="subtitle">
+      <l:template name="appendix" text="%s"/>
+      <l:template name="article" text="%s"/>
+      <l:template name="bibliodiv" text="%s"/>
+      <l:template name="biblioentry" text="%s"/>
+      <l:template name="bibliography" text="%s"/>
+      <l:template name="bibliomixed" text="%s"/>
+      <l:template name="bibliomset" text="%s"/>
+      <l:template name="biblioset" text="%s"/>
+      <l:template name="book" text="%s"/>
+      <l:template name="chapter" text="%s"/>
+      <l:template name="colophon" text="%s"/>
+      <l:template name="dedication" text="%s"/>
+      <l:template name="glossary" text="%s"/>
+      <l:template name="glossdiv" text="%s"/>
+      <l:template name="index" text="%s"/>
+      <l:template name="indexdiv" text="%s"/>
+      <l:template name="lot" text="%s"/>
+      <l:template name="part" text="%s"/>
+      <l:template name="partintro" text="%s"/>
+      <l:template name="preface" text="%s"/>
+      <l:template name="refentry" text="%s"/>
+      <l:template name="reference" text="%s"/>
+      <l:template name="refsection" text="%s"/>
+      <l:template name="refsect1" text="%s"/>
+      <l:template name="refsect2" text="%s"/>
+      <l:template name="refsect3" text="%s"/>
+      <l:template name="refsynopsisdiv" text="%s"/>
+      <l:template name="sect1" text="%s"/>
+      <l:template name="sect2" text="%s"/>
+      <l:template name="sect3" text="%s"/>
+      <l:template name="sect4" text="%s"/>
+      <l:template name="sect5" text="%s"/>
+      <l:template name="section" text="%s"/>
+      <l:template name="set" text="%s"/>
+      <l:template name="setindex" text="%s"/>
+      <l:template name="sidebar" text="%s"/>
+      <l:template name="simplesect" text="%s"/>
+      <l:template name="toc" text="%s"/>
+   </l:context>
+
+   <l:context name="xref">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="R:%n"/>
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="constraintdef" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="%t"/>
+      <l:template name="example" text="%t"/>
+      <l:template name="figure" text="%t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text="%n"/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="%t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="Q:%n"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="Q:%n"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="table" text="%t"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="%n"/>
+      <l:template name="warning" text="%t"/>
+      <l:template name="page.citation" text=" [%p]"/>
+      <l:template name="page" text="(page %p)" lang="en"/>
+      <l:template name="pageabbrev" text="(p. %p)" lang="en"/>
+      <l:template name="Page" text="Page %p" lang="en"/>
+      <l:template name="bridgehead" text="sectio vocata &#738;%t&#1762;"/>
+      <l:template name="refsection" text="sectio vocata &#738;%t&#1762;"/>
+      <l:template name="refsect1" text="sectio vocata &#738;%t&#1762;"/>
+      <l:template name="refsect2" text="sectio vocata &#738;%t&#1762;"/>
+      <l:template name="refsect3" text="sectio vocata &#738;%t&#1762;"/>
+      <l:template name="sect1" text="sectio vocata &#738;%t&#1762;"/>
+      <l:template name="sect2" text="sectio vocata &#738;%t&#1762;"/>
+      <l:template name="sect3" text="sectio vocata &#738;%t&#1762;"/>
+      <l:template name="sect4" text="sectio vocata &#738;%t&#1762;"/>
+      <l:template name="sect5" text="sectio vocata &#738;%t&#1762;"/>
+      <l:template name="section" text="sectio vocata &#738;%t&#1762;"/>
+      <l:template name="simplesect" text="sectio vocata &#738;%t&#1762;"/>
+   </l:context>
+
+   <l:context name="xref-number">
+      <l:template name="answer" text="R:%n"/>
+      <l:template name="appendix" text="Additamentum%n"/>
+      <l:template name="bridgehead" text="Sectio%n"/>
+      <l:template name="chapter" text="Capitulum%n"/>
+      <l:template name="equation" text="Equatio%n"/>
+      <l:template name="example" text="Exemplum%n"/>
+      <l:template name="figure" text="Descriptio%n"/>
+      <l:template name="part" text="Pars%n"/>
+      <l:template name="procedure" text="Progressio%n"/>
+      <l:template name="productionset" text="Compositio%n"/>
+      <l:template name="qandadiv" text="Q &amp; A%n"/>
+      <l:template name="qandaentry" text="Q:%n"/>
+      <l:template name="question" text="Q:%n"/>
+      <l:template name="sect1" text="Sectio%n"/>
+      <l:template name="sect2" text="Sectio%n"/>
+      <l:template name="sect3" text="Sectio%n"/>
+      <l:template name="sect4" text="Sectio%n"/>
+      <l:template name="sect5" text="Sectio%n"/>
+      <l:template name="section" text="Sectio%n"/>
+      <l:template name="table" text="Tabula%n"/>
+   </l:context>
+
+   <l:context name="xref-number-and-title">
+      <l:template name="appendix" text="Additamentum%n, %t"/>
+      <l:template name="bridgehead" text="Sectio%n, &#738;%t&#1762;"/>
+      <l:template name="chapter" text="Capitulum%n, %t"/>
+      <l:template name="equation" text="Equatio%n, &#738;%t&#1762;"/>
+      <l:template name="example" text="Exemplum%n, &#738;%t&#1762;"/>
+      <l:template name="figure" text="Descriptio%n, &#738;%t&#1762;"/>
+      <l:template name="part" text="Pars%n, &#738;%t&#1762;"/>
+      <l:template name="procedure" text="Progressio%n, &#738;%t&#1762;"/>
+      <l:template name="productionset" text="Compositio%n, &#738;%t&#1762;"/>
+      <l:template name="qandadiv" text="Q &amp; A%n, &#738;%t&#1762;"/>
+      <l:template name="refsect1" text="sectio vocata &#738;%t&#1762;"/>
+      <l:template name="refsect2" text="sectio vocata &#738;%t&#1762;"/>
+      <l:template name="refsect3" text="sectio vocata &#738;%t&#1762;"/>
+      <l:template name="refsection" text="sectio vocata &#738;%t&#1762;"/>
+      <l:template name="sect1" text="Sectio%n, &#738;%t&#1762;"/>
+      <l:template name="sect2" text="Sectio%n, &#738;%t&#1762;"/>
+      <l:template name="sect3" text="Sectio%n, &#738;%t&#1762;"/>
+      <l:template name="sect4" text="Sectio%n, &#738;%t&#1762;"/>
+      <l:template name="sect5" text="Sectio%n, &#738;%t&#1762;"/>
+      <l:template name="section" text="Sectio%n, &#738;%t&#1762;"/>
+      <l:template name="simplesect" text="sectio vocata &#738;%t&#1762;"/>
+      <l:template name="table" text="Tabula%n, &#738;%t&#1762;"/>
+   </l:context>
+
+   <l:context name="authorgroup">
+      <l:template name="sep" text=", "/>
+      <l:template name="sep2" text=" et "/>
+      <l:template name="seplast" text=", et "/>
+   </l:context>
+
+   <l:context name="glossary">
+      <l:template name="see" text="Cfr. "/>
+      <l:template name="seealso" text="Cfr. autem "/>
+   </l:context>
+
+   <l:context name="msgset">
+      <l:template name="MsgAud" text="Legentes: "/>
+      <l:template name="MsgLevel" text="Libra: "/>
+      <l:template name="MsgOrig" text="Fons: "/>
+   </l:context>
+
+   <l:context name="datetime">
+      <l:template name="format" text="d/m/Y"/>
+   </l:context>
+
+   <l:context name="datetime-full">
+      <l:template name="January" text="Ianuarii"/>
+      <l:template name="February" text="Februarii"/>
+      <l:template name="March" text="Martii"/>
+      <l:template name="April" text="Aprilis"/>
+      <l:template name="May" text="Maii"/>
+      <l:template name="June" text="Iunii"/>
+      <l:template name="July" text="Iulii"/>
+      <l:template name="August" text="Augusti"/>
+      <l:template name="September" text="Septembris"/>
+      <l:template name="October" text="Octobris"/>
+      <l:template name="November" text="Novembris"/>
+      <l:template name="December" text="Decembris"/>
+      <l:template name="Monday" text="Lunae"/>
+      <l:template name="Tuesday" text="Martis"/>
+      <l:template name="Wednesday" text="Mercurii"/>
+      <l:template name="Thursday" text="Iovis"/>
+      <l:template name="Friday" text="Veneris"/>
+      <l:template name="Saturday" text="Sabathi"/>
+      <l:template name="Sunday" text="Dominica"/>
+   </l:context>
+
+   <l:context name="datetime-abbrev">
+      <l:template name="Jan" text="Ian"/>
+      <l:template name="Feb" text="Feb"/>
+      <l:template name="Mar" text="Mar"/>
+      <l:template name="Apr" text="Apr"/>
+      <l:template name="May" text="Mai"/>
+      <l:template name="Jun" text="Iun"/>
+      <l:template name="Jul" text="Iul"/>
+      <l:template name="Aug" text="Aug"/>
+      <l:template name="Sep" text="Sep"/>
+      <l:template name="Oct" text="Oct"/>
+      <l:template name="Nov" text="Nov"/>
+      <l:template name="Dec" text="Dec"/>
+      <l:template name="Mon" text="Lun"/>
+      <l:template name="Tue" text="Mar"/>
+      <l:template name="Wed" text="Mer"/>
+      <l:template name="Thu" text="Iov"/>
+      <l:template name="Fri" text="Ven"/>
+      <l:template name="Sat" text="Sab"/>
+      <l:template name="Sun" text="Dom"/>
+   </l:context>
+
+   <l:context name="htmlhelp">
+      <l:template name="langcode" text="0x0409 English (UNITED STATES)" lang="en"/>
+   </l:context>
+
+   <l:letters lang="en">
+      <l:l i="-1"/>
+      <l:l i="0">Symbols</l:l>
+      <l:l i="10">A</l:l>
+      <l:l i="10">a</l:l>
+      <l:l i="10">&#192;</l:l>
+      <l:l i="10">&#224;</l:l>
+      <l:l i="10">&#193;</l:l>
+      <l:l i="10">&#225;</l:l>
+      <l:l i="10">&#194;</l:l>
+      <l:l i="10">&#226;</l:l>
+      <l:l i="10">&#195;</l:l>
+      <l:l i="10">&#227;</l:l>
+      <l:l i="10">&#196;</l:l>
+      <l:l i="10">&#228;</l:l>
+      <l:l i="10">&#197;</l:l>
+      <l:l i="10">&#229;</l:l>
+      <l:l i="10">&#256;</l:l>
+      <l:l i="10">&#257;</l:l>
+      <l:l i="10">&#258;</l:l>
+      <l:l i="10">&#259;</l:l>
+      <l:l i="10">&#260;</l:l>
+      <l:l i="10">&#261;</l:l>
+      <l:l i="10">&#461;</l:l>
+      <l:l i="10">&#462;</l:l>
+      <l:l i="10">&#478;</l:l>
+      <l:l i="10">&#479;</l:l>
+      <l:l i="10">&#480;</l:l>
+      <l:l i="10">&#481;</l:l>
+      <l:l i="10">&#506;</l:l>
+      <l:l i="10">&#507;</l:l>
+      <l:l i="10">&#512;</l:l>
+      <l:l i="10">&#513;</l:l>
+      <l:l i="10">&#514;</l:l>
+      <l:l i="10">&#515;</l:l>
+      <l:l i="10">&#550;</l:l>
+      <l:l i="10">&#551;</l:l>
+      <l:l i="10">&#7680;</l:l>
+      <l:l i="10">&#7681;</l:l>
+      <l:l i="10">&#7834;</l:l>
+      <l:l i="10">&#7840;</l:l>
+      <l:l i="10">&#7841;</l:l>
+      <l:l i="10">&#7842;</l:l>
+      <l:l i="10">&#7843;</l:l>
+      <l:l i="10">&#7844;</l:l>
+      <l:l i="10">&#7845;</l:l>
+      <l:l i="10">&#7846;</l:l>
+      <l:l i="10">&#7847;</l:l>
+      <l:l i="10">&#7848;</l:l>
+      <l:l i="10">&#7849;</l:l>
+      <l:l i="10">&#7850;</l:l>
+      <l:l i="10">&#7851;</l:l>
+      <l:l i="10">&#7852;</l:l>
+      <l:l i="10">&#7853;</l:l>
+      <l:l i="10">&#7854;</l:l>
+      <l:l i="10">&#7855;</l:l>
+      <l:l i="10">&#7856;</l:l>
+      <l:l i="10">&#7857;</l:l>
+      <l:l i="10">&#7858;</l:l>
+      <l:l i="10">&#7859;</l:l>
+      <l:l i="10">&#7860;</l:l>
+      <l:l i="10">&#7861;</l:l>
+      <l:l i="10">&#7862;</l:l>
+      <l:l i="10">&#7863;</l:l>
+      <l:l i="20">B</l:l>
+      <l:l i="20">b</l:l>
+      <l:l i="20">&#384;</l:l>
+      <l:l i="20">&#385;</l:l>
+      <l:l i="20">&#595;</l:l>
+      <l:l i="20">&#386;</l:l>
+      <l:l i="20">&#387;</l:l>
+      <l:l i="20">&#7682;</l:l>
+      <l:l i="20">&#7683;</l:l>
+      <l:l i="20">&#7684;</l:l>
+      <l:l i="20">&#7685;</l:l>
+      <l:l i="20">&#7686;</l:l>
+      <l:l i="20">&#7687;</l:l>
+      <l:l i="30">C</l:l>
+      <l:l i="30">c</l:l>
+      <l:l i="30">&#199;</l:l>
+      <l:l i="30">&#231;</l:l>
+      <l:l i="30">&#262;</l:l>
+      <l:l i="30">&#263;</l:l>
+      <l:l i="30">&#264;</l:l>
+      <l:l i="30">&#265;</l:l>
+      <l:l i="30">&#266;</l:l>
+      <l:l i="30">&#267;</l:l>
+      <l:l i="30">&#268;</l:l>
+      <l:l i="30">&#269;</l:l>
+      <l:l i="30">&#391;</l:l>
+      <l:l i="30">&#392;</l:l>
+      <l:l i="30">&#597;</l:l>
+      <l:l i="30">&#7688;</l:l>
+      <l:l i="30">&#7689;</l:l>
+      <l:l i="40">D</l:l>
+      <l:l i="40">d</l:l>
+      <l:l i="40">&#270;</l:l>
+      <l:l i="40">&#271;</l:l>
+      <l:l i="40">&#272;</l:l>
+      <l:l i="40">&#273;</l:l>
+      <l:l i="40">&#394;</l:l>
+      <l:l i="40">&#599;</l:l>
+      <l:l i="40">&#395;</l:l>
+      <l:l i="40">&#396;</l:l>
+      <l:l i="40">&#453;</l:l>
+      <l:l i="40">&#498;</l:l>
+      <l:l i="40">&#545;</l:l>
+      <l:l i="40">&#598;</l:l>
+      <l:l i="40">&#7690;</l:l>
+      <l:l i="40">&#7691;</l:l>
+      <l:l i="40">&#7692;</l:l>
+      <l:l i="40">&#7693;</l:l>
+      <l:l i="40">&#7694;</l:l>
+      <l:l i="40">&#7695;</l:l>
+      <l:l i="40">&#7696;</l:l>
+      <l:l i="40">&#7697;</l:l>
+      <l:l i="40">&#7698;</l:l>
+      <l:l i="40">&#7699;</l:l>
+      <l:l i="50">E</l:l>
+      <l:l i="50">e</l:l>
+      <l:l i="50">&#200;</l:l>
+      <l:l i="50">&#232;</l:l>
+      <l:l i="50">&#201;</l:l>
+      <l:l i="50">&#233;</l:l>
+      <l:l i="50">&#202;</l:l>
+      <l:l i="50">&#234;</l:l>
+      <l:l i="50">&#203;</l:l>
+      <l:l i="50">&#235;</l:l>
+      <l:l i="50">&#274;</l:l>
+      <l:l i="50">&#275;</l:l>
+      <l:l i="50">&#276;</l:l>
+      <l:l i="50">&#277;</l:l>
+      <l:l i="50">&#278;</l:l>
+      <l:l i="50">&#279;</l:l>
+      <l:l i="50">&#280;</l:l>
+      <l:l i="50">&#281;</l:l>
+      <l:l i="50">&#282;</l:l>
+      <l:l i="50">&#283;</l:l>
+      <l:l i="50">&#516;</l:l>
+      <l:l i="50">&#517;</l:l>
+      <l:l i="50">&#518;</l:l>
+      <l:l i="50">&#519;</l:l>
+      <l:l i="50">&#552;</l:l>
+      <l:l i="50">&#553;</l:l>
+      <l:l i="50">&#7700;</l:l>
+      <l:l i="50">&#7701;</l:l>
+      <l:l i="50">&#7702;</l:l>
+      <l:l i="50">&#7703;</l:l>
+      <l:l i="50">&#7704;</l:l>
+      <l:l i="50">&#7705;</l:l>
+      <l:l i="50">&#7706;</l:l>
+      <l:l i="50">&#7707;</l:l>
+      <l:l i="50">&#7708;</l:l>
+      <l:l i="50">&#7709;</l:l>
+      <l:l i="50">&#7864;</l:l>
+      <l:l i="50">&#7865;</l:l>
+      <l:l i="50">&#7866;</l:l>
+      <l:l i="50">&#7867;</l:l>
+      <l:l i="50">&#7868;</l:l>
+      <l:l i="50">&#7869;</l:l>
+      <l:l i="50">&#7870;</l:l>
+      <l:l i="50">&#7871;</l:l>
+      <l:l i="50">&#7872;</l:l>
+      <l:l i="50">&#7873;</l:l>
+      <l:l i="50">&#7874;</l:l>
+      <l:l i="50">&#7875;</l:l>
+      <l:l i="50">&#7876;</l:l>
+      <l:l i="50">&#7877;</l:l>
+      <l:l i="50">&#7878;</l:l>
+      <l:l i="50">&#7879;</l:l>
+      <l:l i="60">F</l:l>
+      <l:l i="60">f</l:l>
+      <l:l i="60">&#401;</l:l>
+      <l:l i="60">&#402;</l:l>
+      <l:l i="60">&#7710;</l:l>
+      <l:l i="60">&#7711;</l:l>
+      <l:l i="70">G</l:l>
+      <l:l i="70">g</l:l>
+      <l:l i="70">&#284;</l:l>
+      <l:l i="70">&#285;</l:l>
+      <l:l i="70">&#286;</l:l>
+      <l:l i="70">&#287;</l:l>
+      <l:l i="70">&#288;</l:l>
+      <l:l i="70">&#289;</l:l>
+      <l:l i="70">&#290;</l:l>
+      <l:l i="70">&#291;</l:l>
+      <l:l i="70">&#403;</l:l>
+      <l:l i="70">&#608;</l:l>
+      <l:l i="70">&#484;</l:l>
+      <l:l i="70">&#485;</l:l>
+      <l:l i="70">&#486;</l:l>
+      <l:l i="70">&#487;</l:l>
+      <l:l i="70">&#500;</l:l>
+      <l:l i="70">&#501;</l:l>
+      <l:l i="70">&#7712;</l:l>
+      <l:l i="70">&#7713;</l:l>
+      <l:l i="80">H</l:l>
+      <l:l i="80">h</l:l>
+      <l:l i="80">&#292;</l:l>
+      <l:l i="80">&#293;</l:l>
+      <l:l i="80">&#294;</l:l>
+      <l:l i="80">&#295;</l:l>
+      <l:l i="80">&#542;</l:l>
+      <l:l i="80">&#543;</l:l>
+      <l:l i="80">&#614;</l:l>
+      <l:l i="80">&#7714;</l:l>
+      <l:l i="80">&#7715;</l:l>
+      <l:l i="80">&#7716;</l:l>
+      <l:l i="80">&#7717;</l:l>
+      <l:l i="80">&#7718;</l:l>
+      <l:l i="80">&#7719;</l:l>
+      <l:l i="80">&#7720;</l:l>
+      <l:l i="80">&#7721;</l:l>
+      <l:l i="80">&#7722;</l:l>
+      <l:l i="80">&#7723;</l:l>
+      <l:l i="80">&#7830;</l:l>
+      <l:l i="90">I</l:l>
+      <l:l i="90">i</l:l>
+      <l:l i="90">&#204;</l:l>
+      <l:l i="90">&#236;</l:l>
+      <l:l i="90">&#205;</l:l>
+      <l:l i="90">&#237;</l:l>
+      <l:l i="90">&#206;</l:l>
+      <l:l i="90">&#238;</l:l>
+      <l:l i="90">&#207;</l:l>
+      <l:l i="90">&#239;</l:l>
+      <l:l i="90">&#296;</l:l>
+      <l:l i="90">&#297;</l:l>
+      <l:l i="90">&#298;</l:l>
+      <l:l i="90">&#299;</l:l>
+      <l:l i="90">&#300;</l:l>
+      <l:l i="90">&#301;</l:l>
+      <l:l i="90">&#302;</l:l>
+      <l:l i="90">&#303;</l:l>
+      <l:l i="90">&#304;</l:l>
+      <l:l i="90">&#407;</l:l>
+      <l:l i="90">&#616;</l:l>
+      <l:l i="90">&#463;</l:l>
+      <l:l i="90">&#464;</l:l>
+      <l:l i="90">&#520;</l:l>
+      <l:l i="90">&#521;</l:l>
+      <l:l i="90">&#522;</l:l>
+      <l:l i="90">&#523;</l:l>
+      <l:l i="90">&#7724;</l:l>
+      <l:l i="90">&#7725;</l:l>
+      <l:l i="90">&#7726;</l:l>
+      <l:l i="90">&#7727;</l:l>
+      <l:l i="90">&#7880;</l:l>
+      <l:l i="90">&#7881;</l:l>
+      <l:l i="90">&#7882;</l:l>
+      <l:l i="90">&#7883;</l:l>
+      <l:l i="100">J</l:l>
+      <l:l i="100">j</l:l>
+      <l:l i="100">&#308;</l:l>
+      <l:l i="100">&#309;</l:l>
+      <l:l i="100">&#496;</l:l>
+      <l:l i="100">&#669;</l:l>
+      <l:l i="110">K</l:l>
+      <l:l i="110">k</l:l>
+      <l:l i="110">&#310;</l:l>
+      <l:l i="110">&#311;</l:l>
+      <l:l i="110">&#408;</l:l>
+      <l:l i="110">&#409;</l:l>
+      <l:l i="110">&#488;</l:l>
+      <l:l i="110">&#489;</l:l>
+      <l:l i="110">&#7728;</l:l>
+      <l:l i="110">&#7729;</l:l>
+      <l:l i="110">&#7730;</l:l>
+      <l:l i="110">&#7731;</l:l>
+      <l:l i="110">&#7732;</l:l>
+      <l:l i="110">&#7733;</l:l>
+      <l:l i="120">L</l:l>
+      <l:l i="120">l</l:l>
+      <l:l i="120">&#313;</l:l>
+      <l:l i="120">&#314;</l:l>
+      <l:l i="120">&#315;</l:l>
+      <l:l i="120">&#316;</l:l>
+      <l:l i="120">&#317;</l:l>
+      <l:l i="120">&#318;</l:l>
+      <l:l i="120">&#319;</l:l>
+      <l:l i="120">&#320;</l:l>
+      <l:l i="120">&#321;</l:l>
+      <l:l i="120">&#322;</l:l>
+      <l:l i="120">&#410;</l:l>
+      <l:l i="120">&#456;</l:l>
+      <l:l i="120">&#564;</l:l>
+      <l:l i="120">&#619;</l:l>
+      <l:l i="120">&#620;</l:l>
+      <l:l i="120">&#621;</l:l>
+      <l:l i="120">&#7734;</l:l>
+      <l:l i="120">&#7735;</l:l>
+      <l:l i="120">&#7736;</l:l>
+      <l:l i="120">&#7737;</l:l>
+      <l:l i="120">&#7738;</l:l>
+      <l:l i="120">&#7739;</l:l>
+      <l:l i="120">&#7740;</l:l>
+      <l:l i="120">&#7741;</l:l>
+      <l:l i="130">M</l:l>
+      <l:l i="130">m</l:l>
+      <l:l i="130">&#625;</l:l>
+      <l:l i="130">&#7742;</l:l>
+      <l:l i="130">&#7743;</l:l>
+      <l:l i="130">&#7744;</l:l>
+      <l:l i="130">&#7745;</l:l>
+      <l:l i="130">&#7746;</l:l>
+      <l:l i="130">&#7747;</l:l>
+      <l:l i="140">N</l:l>
+      <l:l i="140">n</l:l>
+      <l:l i="140">&#209;</l:l>
+      <l:l i="140">&#241;</l:l>
+      <l:l i="140">&#323;</l:l>
+      <l:l i="140">&#324;</l:l>
+      <l:l i="140">&#325;</l:l>
+      <l:l i="140">&#326;</l:l>
+      <l:l i="140">&#327;</l:l>
+      <l:l i="140">&#328;</l:l>
+      <l:l i="140">&#413;</l:l>
+      <l:l i="140">&#626;</l:l>
+      <l:l i="140">&#414;</l:l>
+      <l:l i="140">&#544;</l:l>
+      <l:l i="140">&#459;</l:l>
+      <l:l i="140">&#504;</l:l>
+      <l:l i="140">&#505;</l:l>
+      <l:l i="140">&#565;</l:l>
+      <l:l i="140">&#627;</l:l>
+      <l:l i="140">&#7748;</l:l>
+      <l:l i="140">&#7749;</l:l>
+      <l:l i="140">&#7750;</l:l>
+      <l:l i="140">&#7751;</l:l>
+      <l:l i="140">&#7752;</l:l>
+      <l:l i="140">&#7753;</l:l>
+      <l:l i="140">&#7754;</l:l>
+      <l:l i="140">&#7755;</l:l>
+      <l:l i="150">O</l:l>
+      <l:l i="150">o</l:l>
+      <l:l i="150">&#210;</l:l>
+      <l:l i="150">&#242;</l:l>
+      <l:l i="150">&#211;</l:l>
+      <l:l i="150">&#243;</l:l>
+      <l:l i="150">&#212;</l:l>
+      <l:l i="150">&#244;</l:l>
+      <l:l i="150">&#213;</l:l>
+      <l:l i="150">&#245;</l:l>
+      <l:l i="150">&#214;</l:l>
+      <l:l i="150">&#246;</l:l>
+      <l:l i="150">&#216;</l:l>
+      <l:l i="150">&#248;</l:l>
+      <l:l i="150">&#332;</l:l>
+      <l:l i="150">&#333;</l:l>
+      <l:l i="150">&#334;</l:l>
+      <l:l i="150">&#335;</l:l>
+      <l:l i="150">&#336;</l:l>
+      <l:l i="150">&#337;</l:l>
+      <l:l i="150">&#415;</l:l>
+      <l:l i="150">&#416;</l:l>
+      <l:l i="150">&#417;</l:l>
+      <l:l i="150">&#465;</l:l>
+      <l:l i="150">&#466;</l:l>
+      <l:l i="150">&#490;</l:l>
+      <l:l i="150">&#491;</l:l>
+      <l:l i="150">&#492;</l:l>
+      <l:l i="150">&#493;</l:l>
+      <l:l i="150">&#510;</l:l>
+      <l:l i="150">&#511;</l:l>
+      <l:l i="150">&#524;</l:l>
+      <l:l i="150">&#525;</l:l>
+      <l:l i="150">&#526;</l:l>
+      <l:l i="150">&#527;</l:l>
+      <l:l i="150">&#554;</l:l>
+      <l:l i="150">&#555;</l:l>
+      <l:l i="150">&#556;</l:l>
+      <l:l i="150">&#557;</l:l>
+      <l:l i="150">&#558;</l:l>
+      <l:l i="150">&#559;</l:l>
+      <l:l i="150">&#560;</l:l>
+      <l:l i="150">&#561;</l:l>
+      <l:l i="150">&#7756;</l:l>
+      <l:l i="150">&#7757;</l:l>
+      <l:l i="150">&#7758;</l:l>
+      <l:l i="150">&#7759;</l:l>
+      <l:l i="150">&#7760;</l:l>
+      <l:l i="150">&#7761;</l:l>
+      <l:l i="150">&#7762;</l:l>
+      <l:l i="150">&#7763;</l:l>
+      <l:l i="150">&#7884;</l:l>
+      <l:l i="150">&#7885;</l:l>
+      <l:l i="150">&#7886;</l:l>
+      <l:l i="150">&#7887;</l:l>
+      <l:l i="150">&#7888;</l:l>
+      <l:l i="150">&#7889;</l:l>
+      <l:l i="150">&#7890;</l:l>
+      <l:l i="150">&#7891;</l:l>
+      <l:l i="150">&#7892;</l:l>
+      <l:l i="150">&#7893;</l:l>
+      <l:l i="150">&#7894;</l:l>
+      <l:l i="150">&#7895;</l:l>
+      <l:l i="150">&#7896;</l:l>
+      <l:l i="150">&#7897;</l:l>
+      <l:l i="150">&#7898;</l:l>
+      <l:l i="150">&#7899;</l:l>
+      <l:l i="150">&#7900;</l:l>
+      <l:l i="150">&#7901;</l:l>
+      <l:l i="150">&#7902;</l:l>
+      <l:l i="150">&#7903;</l:l>
+      <l:l i="150">&#7904;</l:l>
+      <l:l i="150">&#7905;</l:l>
+      <l:l i="150">&#7906;</l:l>
+      <l:l i="150">&#7907;</l:l>
+      <l:l i="160">P</l:l>
+      <l:l i="160">p</l:l>
+      <l:l i="160">&#420;</l:l>
+      <l:l i="160">&#421;</l:l>
+      <l:l i="160">&#7764;</l:l>
+      <l:l i="160">&#7765;</l:l>
+      <l:l i="160">&#7766;</l:l>
+      <l:l i="160">&#7767;</l:l>
+      <l:l i="170">Q</l:l>
+      <l:l i="170">q</l:l>
+      <l:l i="170">&#672;</l:l>
+      <l:l i="180">R</l:l>
+      <l:l i="180">r</l:l>
+      <l:l i="180">&#340;</l:l>
+      <l:l i="180">&#341;</l:l>
+      <l:l i="180">&#342;</l:l>
+      <l:l i="180">&#343;</l:l>
+      <l:l i="180">&#344;</l:l>
+      <l:l i="180">&#345;</l:l>
+      <l:l i="180">&#528;</l:l>
+      <l:l i="180">&#529;</l:l>
+      <l:l i="180">&#530;</l:l>
+      <l:l i="180">&#531;</l:l>
+      <l:l i="180">&#636;</l:l>
+      <l:l i="180">&#637;</l:l>
+      <l:l i="180">&#638;</l:l>
+      <l:l i="180">&#7768;</l:l>
+      <l:l i="180">&#7769;</l:l>
+      <l:l i="180">&#7770;</l:l>
+      <l:l i="180">&#7771;</l:l>
+      <l:l i="180">&#7772;</l:l>
+      <l:l i="180">&#7773;</l:l>
+      <l:l i="180">&#7774;</l:l>
+      <l:l i="180">&#7775;</l:l>
+      <l:l i="190">S</l:l>
+      <l:l i="190">s</l:l>
+      <l:l i="190">&#346;</l:l>
+      <l:l i="190">&#347;</l:l>
+      <l:l i="190">&#348;</l:l>
+      <l:l i="190">&#349;</l:l>
+      <l:l i="190">&#350;</l:l>
+      <l:l i="190">&#351;</l:l>
+      <l:l i="190">&#352;</l:l>
+      <l:l i="190">&#353;</l:l>
+      <l:l i="190">&#536;</l:l>
+      <l:l i="190">&#537;</l:l>
+      <l:l i="190">&#642;</l:l>
+      <l:l i="190">&#7776;</l:l>
+      <l:l i="190">&#7777;</l:l>
+      <l:l i="190">&#7778;</l:l>
+      <l:l i="190">&#7779;</l:l>
+      <l:l i="190">&#7780;</l:l>
+      <l:l i="190">&#7781;</l:l>
+      <l:l i="190">&#7782;</l:l>
+      <l:l i="190">&#7783;</l:l>
+      <l:l i="190">&#7784;</l:l>
+      <l:l i="190">&#7785;</l:l>
+      <l:l i="200">T</l:l>
+      <l:l i="200">t</l:l>
+      <l:l i="200">&#354;</l:l>
+      <l:l i="200">&#355;</l:l>
+      <l:l i="200">&#356;</l:l>
+      <l:l i="200">&#357;</l:l>
+      <l:l i="200">&#358;</l:l>
+      <l:l i="200">&#359;</l:l>
+      <l:l i="200">&#427;</l:l>
+      <l:l i="200">&#428;</l:l>
+      <l:l i="200">&#429;</l:l>
+      <l:l i="200">&#430;</l:l>
+      <l:l i="200">&#648;</l:l>
+      <l:l i="200">&#538;</l:l>
+      <l:l i="200">&#539;</l:l>
+      <l:l i="200">&#566;</l:l>
+      <l:l i="200">&#7786;</l:l>
+      <l:l i="200">&#7787;</l:l>
+      <l:l i="200">&#7788;</l:l>
+      <l:l i="200">&#7789;</l:l>
+      <l:l i="200">&#7790;</l:l>
+      <l:l i="200">&#7791;</l:l>
+      <l:l i="200">&#7792;</l:l>
+      <l:l i="200">&#7793;</l:l>
+      <l:l i="200">&#7831;</l:l>
+      <l:l i="210">U</l:l>
+      <l:l i="210">u</l:l>
+      <l:l i="210">&#217;</l:l>
+      <l:l i="210">&#249;</l:l>
+      <l:l i="210">&#218;</l:l>
+      <l:l i="210">&#250;</l:l>
+      <l:l i="210">&#219;</l:l>
+      <l:l i="210">&#251;</l:l>
+      <l:l i="210">&#220;</l:l>
+      <l:l i="210">&#252;</l:l>
+      <l:l i="210">&#360;</l:l>
+      <l:l i="210">&#361;</l:l>
+      <l:l i="210">&#362;</l:l>
+      <l:l i="210">&#363;</l:l>
+      <l:l i="210">&#364;</l:l>
+      <l:l i="210">&#365;</l:l>
+      <l:l i="210">&#366;</l:l>
+      <l:l i="210">&#367;</l:l>
+      <l:l i="210">&#368;</l:l>
+      <l:l i="210">&#369;</l:l>
+      <l:l i="210">&#370;</l:l>
+      <l:l i="210">&#371;</l:l>
+      <l:l i="210">&#431;</l:l>
+      <l:l i="210">&#432;</l:l>
+      <l:l i="210">&#467;</l:l>
+      <l:l i="210">&#468;</l:l>
+      <l:l i="210">&#469;</l:l>
+      <l:l i="210">&#470;</l:l>
+      <l:l i="210">&#471;</l:l>
+      <l:l i="210">&#472;</l:l>
+      <l:l i="210">&#473;</l:l>
+      <l:l i="210">&#474;</l:l>
+      <l:l i="210">&#475;</l:l>
+      <l:l i="210">&#476;</l:l>
+      <l:l i="210">&#532;</l:l>
+      <l:l i="210">&#533;</l:l>
+      <l:l i="210">&#534;</l:l>
+      <l:l i="210">&#535;</l:l>
+      <l:l i="210">&#7794;</l:l>
+      <l:l i="210">&#7795;</l:l>
+      <l:l i="210">&#7796;</l:l>
+      <l:l i="210">&#7797;</l:l>
+      <l:l i="210">&#7798;</l:l>
+      <l:l i="210">&#7799;</l:l>
+      <l:l i="210">&#7800;</l:l>
+      <l:l i="210">&#7801;</l:l>
+      <l:l i="210">&#7802;</l:l>
+      <l:l i="210">&#7803;</l:l>
+      <l:l i="210">&#7908;</l:l>
+      <l:l i="210">&#7909;</l:l>
+      <l:l i="210">&#7910;</l:l>
+      <l:l i="210">&#7911;</l:l>
+      <l:l i="210">&#7912;</l:l>
+      <l:l i="210">&#7913;</l:l>
+      <l:l i="210">&#7914;</l:l>
+      <l:l i="210">&#7915;</l:l>
+      <l:l i="210">&#7916;</l:l>
+      <l:l i="210">&#7917;</l:l>
+      <l:l i="210">&#7918;</l:l>
+      <l:l i="210">&#7919;</l:l>
+      <l:l i="210">&#7920;</l:l>
+      <l:l i="210">&#7921;</l:l>
+      <l:l i="220">V</l:l>
+      <l:l i="220">v</l:l>
+      <l:l i="220">&#434;</l:l>
+      <l:l i="220">&#651;</l:l>
+      <l:l i="220">&#7804;</l:l>
+      <l:l i="220">&#7805;</l:l>
+      <l:l i="220">&#7806;</l:l>
+      <l:l i="220">&#7807;</l:l>
+      <l:l i="230">W</l:l>
+      <l:l i="230">w</l:l>
+      <l:l i="230">&#372;</l:l>
+      <l:l i="230">&#373;</l:l>
+      <l:l i="230">&#7808;</l:l>
+      <l:l i="230">&#7809;</l:l>
+      <l:l i="230">&#7810;</l:l>
+      <l:l i="230">&#7811;</l:l>
+      <l:l i="230">&#7812;</l:l>
+      <l:l i="230">&#7813;</l:l>
+      <l:l i="230">&#7814;</l:l>
+      <l:l i="230">&#7815;</l:l>
+      <l:l i="230">&#7816;</l:l>
+      <l:l i="230">&#7817;</l:l>
+      <l:l i="230">&#7832;</l:l>
+      <l:l i="240">X</l:l>
+      <l:l i="240">x</l:l>
+      <l:l i="240">&#7818;</l:l>
+      <l:l i="240">&#7819;</l:l>
+      <l:l i="240">&#7820;</l:l>
+      <l:l i="240">&#7821;</l:l>
+      <l:l i="250">Y</l:l>
+      <l:l i="250">y</l:l>
+      <l:l i="250">&#221;</l:l>
+      <l:l i="250">&#253;</l:l>
+      <l:l i="250">&#255;</l:l>
+      <l:l i="250">&#376;</l:l>
+      <l:l i="250">&#374;</l:l>
+      <l:l i="250">&#375;</l:l>
+      <l:l i="250">&#435;</l:l>
+      <l:l i="250">&#436;</l:l>
+      <l:l i="250">&#562;</l:l>
+      <l:l i="250">&#563;</l:l>
+      <l:l i="250">&#7822;</l:l>
+      <l:l i="250">&#7823;</l:l>
+      <l:l i="250">&#7833;</l:l>
+      <l:l i="250">&#7922;</l:l>
+      <l:l i="250">&#7923;</l:l>
+      <l:l i="250">&#7924;</l:l>
+      <l:l i="250">&#7925;</l:l>
+      <l:l i="250">&#7926;</l:l>
+      <l:l i="250">&#7927;</l:l>
+      <l:l i="250">&#7928;</l:l>
+      <l:l i="250">&#7929;</l:l>
+      <l:l i="260">Z</l:l>
+      <l:l i="260">z</l:l>
+      <l:l i="260">&#377;</l:l>
+      <l:l i="260">&#378;</l:l>
+      <l:l i="260">&#379;</l:l>
+      <l:l i="260">&#380;</l:l>
+      <l:l i="260">&#381;</l:l>
+      <l:l i="260">&#382;</l:l>
+      <l:l i="260">&#437;</l:l>
+      <l:l i="260">&#438;</l:l>
+      <l:l i="260">&#548;</l:l>
+      <l:l i="260">&#549;</l:l>
+      <l:l i="260">&#656;</l:l>
+      <l:l i="260">&#657;</l:l>
+      <l:l i="260">&#7824;</l:l>
+      <l:l i="260">&#7825;</l:l>
+      <l:l i="260">&#7826;</l:l>
+      <l:l i="260">&#7827;</l:l>
+      <l:l i="260">&#7828;</l:l>
+      <l:l i="260">&#7829;</l:l>
+   </l:letters>
+</l:l10n>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/labels.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/labels.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/labels.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,618 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+                exclude-result-prefixes="doc"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: labels.xsl,v 1.1.1.1 2004/10/19 21:21:39 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<!-- label markup -->
+
+<doc:mode mode="label.markup" xmlns="">
+<refpurpose>Provides access to element labels</refpurpose>
+<refdescription>
+<para>Processing an element in the
+<literal role="mode">label.markup</literal> mode produces the
+element label.</para>
+<para>Trailing punctuation is not added to the label.
+</para>
+</refdescription>
+</doc:mode>
+
+<xsl:template match="*" mode="intralabel.punctuation">
+  <xsl:text>.</xsl:text>
+</xsl:template>
+
+<xsl:template match="*" mode="label.markup">
+  <xsl:param name="verbose" select="1"/>
+  <xsl:if test="$verbose">
+    <xsl:message>
+      <xsl:text>Request for label of unexpected element: </xsl:text>
+      <xsl:value-of select="name(.)"/>
+    </xsl:message>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="set|book" mode="label.markup">
+  <xsl:if test="@label">
+    <xsl:value-of select="@label"/>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="part" mode="label.markup">
+  <xsl:choose>
+    <xsl:when test="@label">
+      <xsl:value-of select="@label"/>
+    </xsl:when>
+    <xsl:when test="$part.autolabel != 0">
+      <xsl:number from="book" count="part" format="I"/>
+    </xsl:when>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="partintro" mode="label.markup">
+  <!-- no label -->
+</xsl:template>
+
+<xsl:template match="preface" mode="label.markup">
+  <xsl:choose>
+    <xsl:when test="@label">
+      <xsl:value-of select="@label"/>
+    </xsl:when>
+    <xsl:when test="$preface.autolabel != 0">
+      <xsl:choose>
+        <xsl:when test="$label.from.part != 0 and ancestor::part">
+          <xsl:number from="part" count="preface" format="1" level="any"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:number from="book" count="preface" format="1" level="any"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="chapter" mode="label.markup">
+  <xsl:choose>
+    <xsl:when test="@label">
+      <xsl:value-of select="@label"/>
+    </xsl:when>
+    <xsl:when test="$chapter.autolabel != 0">
+      <xsl:choose>
+        <xsl:when test="$label.from.part != 0 and ancestor::part">
+          <xsl:number from="part" count="chapter" format="1" level="any"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:number from="book" count="chapter" format="1" level="any"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="appendix" mode="label.markup">
+  <xsl:choose>
+    <xsl:when test="@label">
+      <xsl:value-of select="@label"/>
+    </xsl:when>
+    <xsl:when test="$appendix.autolabel != 0">
+      <xsl:choose>
+        <xsl:when test="$label.from.part != 0 and ancestor::part">
+          <xsl:number from="part" count="appendix" format="A" level="any"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:number from="book|article"
+                      count="appendix" format="A" level="any"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="article" mode="label.markup">
+  <xsl:if test="@label">
+    <xsl:value-of select="@label"/>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="dedication|colophon" mode="label.markup">
+  <xsl:if test="@label">
+    <xsl:value-of select="@label"/>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="reference" mode="label.markup">
+  <xsl:choose>
+    <xsl:when test="@label">
+      <xsl:value-of select="@label"/>
+    </xsl:when>
+    <xsl:when test="$part.autolabel != 0">
+      <xsl:number from="book" count="reference" format="I" level="any"/>
+    </xsl:when>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="refentry" mode="label.markup">
+  <xsl:if test="@label">
+    <xsl:value-of select="@label"/>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="section" mode="label.markup">
+  <!-- if this is a nested section, label the parent -->
+  <xsl:if test="local-name(..) = 'section'">
+    <xsl:variable name="parent.section.label">
+      <xsl:apply-templates select=".." mode="label.markup"/>
+    </xsl:variable>
+    <xsl:if test="$parent.section.label != ''">
+      <xsl:apply-templates select=".." mode="label.markup"/>
+      <xsl:apply-templates select=".." mode="intralabel.punctuation"/>
+    </xsl:if>
+  </xsl:if>
+
+  <!-- if the parent is a component, maybe label that too -->
+  <xsl:variable name="parent.is.component">
+    <xsl:call-template name="is.component">
+      <xsl:with-param name="node" select=".."/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <!-- does this section get labelled? -->
+  <xsl:variable name="label">
+    <xsl:call-template name="label.this.section">
+      <xsl:with-param name="section" select="."/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:if test="$section.label.includes.component.label != 0
+                and $parent.is.component != 0">
+    <xsl:variable name="parent.label">
+      <xsl:apply-templates select=".." mode="label.markup"/>
+    </xsl:variable>
+    <xsl:if test="$parent.label != ''">
+      <xsl:apply-templates select=".." mode="label.markup"/>
+      <xsl:apply-templates select=".." mode="intralabel.punctuation"/>
+    </xsl:if>
+  </xsl:if>
+
+<!--
+  <xsl:message>
+    <xsl:value-of select="$label"/>, <xsl:number count="section"/>
+  </xsl:message>
+-->
+
+  <xsl:choose>
+    <xsl:when test="@label">
+      <xsl:value-of select="@label"/>
+    </xsl:when>
+    <xsl:when test="$label != 0">
+      <xsl:number count="section"/>
+    </xsl:when>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="sect1" mode="label.markup">
+  <!-- if the parent is a component, maybe label that too -->
+  <xsl:variable name="parent.is.component">
+    <xsl:call-template name="is.component">
+      <xsl:with-param name="node" select=".."/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:if test="$section.label.includes.component.label != 0
+                and $parent.is.component != 0">
+    <xsl:variable name="parent.label">
+      <xsl:apply-templates select=".." mode="label.markup"/>
+    </xsl:variable>
+    <xsl:if test="$parent.label != ''">
+      <xsl:apply-templates select=".." mode="label.markup"/>
+      <xsl:apply-templates select=".." mode="intralabel.punctuation"/>
+    </xsl:if>
+  </xsl:if>
+
+  <xsl:choose>
+    <xsl:when test="@label">
+      <xsl:value-of select="@label"/>
+    </xsl:when>
+    <xsl:when test="$section.autolabel != 0">
+      <xsl:number count="sect1"/>
+    </xsl:when>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="sect2|sect3|sect4|sect5" mode="label.markup">
+  <!-- label the parent -->
+  <xsl:variable name="parent.label">
+    <xsl:apply-templates select=".." mode="label.markup"/>
+  </xsl:variable>
+  <xsl:if test="$parent.label != ''">
+    <xsl:apply-templates select=".." mode="label.markup"/>
+    <xsl:apply-templates select=".." mode="intralabel.punctuation"/>
+  </xsl:if>
+
+  <xsl:choose>
+    <xsl:when test="@label">
+      <xsl:value-of select="@label"/>
+    </xsl:when>
+    <xsl:when test="$section.autolabel != 0">
+      <xsl:choose>
+        <xsl:when test="local-name(.) = 'sect2'">
+	  <xsl:number count="sect2"/>
+	</xsl:when>
+	<xsl:when test="local-name(.) = 'sect3'">
+	  <xsl:number count="sect3"/>
+	</xsl:when>
+	<xsl:when test="local-name(.) = 'sect4'">
+	  <xsl:number count="sect4"/>
+	</xsl:when>
+	<xsl:when test="local-name(.) = 'sect5'">
+	  <xsl:number count="sect5"/>
+	</xsl:when>
+	<xsl:otherwise>
+	  <xsl:message>label.markup: this can't happen!</xsl:message>
+	</xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="bridgehead" mode="label.markup">
+  <!-- FIXME: could we do a better job here? -->
+  <xsl:variable name="contsec"
+                select="(ancestor::section
+                         |ancestor::simplesect
+                         |ancestor::sect1
+                         |ancestor::sect2
+                         |ancestor::sect3
+                         |ancestor::sect4
+                         |ancestor::sect5
+                         |ancestor::refsect1
+                         |ancestor::refsect2
+                         |ancestor::refsect3
+                         |ancestor::chapter
+                         |ancestor::appendix
+                         |ancestor::preface)[last()]"/>
+
+  <xsl:apply-templates select="$contsec" mode="label.markup"/>
+</xsl:template>
+
+<xsl:template match="refsect1" mode="label.markup">
+  <xsl:choose>
+    <xsl:when test="@label">
+      <xsl:value-of select="@label"/>
+    </xsl:when>
+    <xsl:when test="$section.autolabel != 0">
+      <xsl:number count="refsect1"/>
+    </xsl:when>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="refsect2|refsect3" mode="label.markup">
+  <!-- label the parent -->
+  <xsl:variable name="parent.label">
+    <xsl:apply-templates select=".." mode="label.markup"/>
+  </xsl:variable>
+  <xsl:if test="$parent.label != ''">
+    <xsl:apply-templates select=".." mode="label.markup"/>
+    <xsl:apply-templates select=".." mode="intralabel.punctuation"/>
+  </xsl:if>
+
+  <xsl:choose>
+    <xsl:when test="@label">
+      <xsl:value-of select="@label"/>
+    </xsl:when>
+    <xsl:when test="$section.autolabel != 0">
+      <xsl:choose>
+        <xsl:when test="local-name(.) = 'refsect2'">
+	  <xsl:number count="refsect2"/>
+	</xsl:when>
+        <xsl:otherwise>
+	  <xsl:number count="refsect3"/>
+	</xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="simplesect" mode="label.markup">
+  <!-- if this is a nested section, label the parent -->
+  <xsl:if test="local-name(..) = 'section'
+                or local-name(..) = 'sect1'
+                or local-name(..) = 'sect2'
+                or local-name(..) = 'sect3'
+                or local-name(..) = 'sect4'
+                or local-name(..) = 'sect5'">
+    <xsl:variable name="parent.section.label">
+      <xsl:apply-templates select=".." mode="label.markup"/>
+    </xsl:variable>
+    <xsl:if test="$parent.section.label != ''">
+      <xsl:apply-templates select=".." mode="label.markup"/>
+      <xsl:apply-templates select=".." mode="intralabel.punctuation"/>
+    </xsl:if>
+  </xsl:if>
+
+  <!-- if the parent is a component, maybe label that too -->
+  <xsl:variable name="parent.is.component">
+    <xsl:call-template name="is.component">
+      <xsl:with-param name="node" select=".."/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <!-- does this section get labelled? -->
+  <xsl:variable name="label">
+    <xsl:call-template name="label.this.section">
+      <xsl:with-param name="section" select="."/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:if test="$section.label.includes.component.label != 0
+                and $parent.is.component != 0">
+    <xsl:variable name="parent.label">
+      <xsl:apply-templates select=".." mode="label.markup"/>
+    </xsl:variable>
+    <xsl:if test="$parent.label != ''">
+      <xsl:apply-templates select=".." mode="label.markup"/>
+      <xsl:apply-templates select=".." mode="intralabel.punctuation"/>
+    </xsl:if>
+  </xsl:if>
+
+  <xsl:choose>
+    <xsl:when test="@label">
+      <xsl:value-of select="@label"/>
+    </xsl:when>
+    <xsl:when test="$label != 0">
+      <xsl:number count="simplesect"/>
+    </xsl:when>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="qandadiv" mode="label.markup">
+  <xsl:variable name="lparent" select="(ancestor::set
+                                       |ancestor::book
+                                       |ancestor::chapter
+                                       |ancestor::appendix
+                                       |ancestor::preface
+                                       |ancestor::section
+                                       |ancestor::simplesect
+                                       |ancestor::sect1
+                                       |ancestor::sect2
+                                       |ancestor::sect3
+                                       |ancestor::sect4
+                                       |ancestor::sect5
+                                       |ancestor::refsect1
+                                       |ancestor::refsect2
+                                       |ancestor::refsect3)[last()]"/>
+
+  <xsl:variable name="lparent.prefix">
+    <xsl:apply-templates select="$lparent" mode="label.markup"/>
+  </xsl:variable>
+
+  <xsl:variable name="prefix">
+    <xsl:if test="$qanda.inherit.numeration != 0">
+      <xsl:if test="$lparent.prefix != ''">
+        <xsl:apply-templates select="$lparent" mode="label.markup"/>
+        <xsl:apply-templates select="$lparent" mode="intralabel.punctuation"/>
+      </xsl:if>
+    </xsl:if>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="$qandadiv.autolabel != 0">
+      <xsl:value-of select="$prefix"/>
+      <xsl:number level="multiple" count="qandadiv" format="1"/>
+    </xsl:when>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="question|answer" mode="label.markup">
+  <xsl:variable name="lparent" select="(ancestor::set
+                                       |ancestor::book
+                                       |ancestor::chapter
+                                       |ancestor::appendix
+                                       |ancestor::preface
+                                       |ancestor::section
+                                       |ancestor::simplesect
+                                       |ancestor::sect1
+                                       |ancestor::sect2
+                                       |ancestor::sect3
+                                       |ancestor::sect4
+                                       |ancestor::sect5
+                                       |ancestor::refsect1
+                                       |ancestor::refsect2
+                                       |ancestor::refsect3)[last()]"/>
+
+  <xsl:variable name="lparent.prefix">
+    <xsl:apply-templates select="$lparent" mode="label.markup"/>
+  </xsl:variable>
+
+  <xsl:variable name="prefix">
+    <xsl:if test="$qanda.inherit.numeration != 0">
+      <xsl:if test="$lparent.prefix != ''">
+        <xsl:apply-templates select="$lparent" mode="label.markup"/>
+        <xsl:apply-templates select="$lparent" mode="intralabel.punctuation"/>
+      </xsl:if>
+      <xsl:if test="ancestor::qandadiv">
+        <xsl:apply-templates select="ancestor::qandadiv[1]" mode="label.markup"/>
+        <xsl:apply-templates select="ancestor::qandadiv[1]"
+                             mode="intralabel.punctuation"/>
+      </xsl:if>
+    </xsl:if>
+  </xsl:variable>
+
+  <xsl:variable name="inhlabel"
+                select="ancestor-or-self::qandaset/@defaultlabel[1]"/>
+
+  <xsl:variable name="deflabel">
+    <xsl:choose>
+      <xsl:when test="$inhlabel != ''">
+        <xsl:value-of select="$inhlabel"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$qanda.defaultlabel"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:variable name="label" select="label"/>
+
+  <xsl:choose>
+    <xsl:when test="count($label)>0">
+      <xsl:apply-templates select="$label"/>
+    </xsl:when>
+
+    <xsl:when test="$deflabel = 'qanda' and local-name(.) = 'question'">
+      <xsl:call-template name="gentext">
+        <xsl:with-param name="key" select="'Question'"/>
+      </xsl:call-template>
+    </xsl:when>
+
+    <xsl:when test="$deflabel = 'qanda' and local-name(.) = 'answer'">
+      <xsl:call-template name="gentext">
+        <xsl:with-param name="key" select="'Answer'"/>
+      </xsl:call-template>
+    </xsl:when>
+
+    <xsl:when test="$deflabel = 'number' and local-name(.) = 'question'">
+      <xsl:value-of select="$prefix"/>
+      <xsl:number level="multiple" count="qandaentry" format="1"/>
+    </xsl:when>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="bibliography|glossary|index|setindex" mode="label.markup">
+  <xsl:if test="@label">
+    <xsl:value-of select="@label"/>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="figure|table|example|procedure" mode="label.markup">
+  <xsl:variable name="pchap"
+                select="ancestor::chapter
+                        |ancestor::appendix
+                        |ancestor::article[ancestor::book]"/>
+
+  <xsl:variable name="prefix">
+    <xsl:if test="count($pchap) &gt; 0">
+      <xsl:apply-templates select="$pchap" mode="label.markup"/>
+    </xsl:if>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="@label">
+      <xsl:value-of select="@label"/>
+    </xsl:when>
+    <xsl:when test="local-name() = 'procedure' and
+                    $formal.procedures = 0">
+      <!-- No label -->
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:choose>
+        <xsl:when test="count($pchap)>0">
+          <xsl:if test="$prefix != ''">
+            <xsl:apply-templates select="$pchap" mode="label.markup"/>
+            <xsl:apply-templates select="$pchap" mode="intralabel.punctuation"/>
+          </xsl:if>
+          <xsl:number format="1" from="chapter|appendix" level="any"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:number format="1" from="book|article" level="any"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="equation" mode="label.markup">
+  <xsl:variable name="pchap"
+                select="ancestor::chapter
+                        |ancestor::appendix
+                        |ancestor::article[ancestor::book]"/>
+
+  <xsl:variable name="prefix">
+    <xsl:if test="count($pchap) &gt; 0">
+      <xsl:apply-templates select="$pchap" mode="label.markup"/>
+    </xsl:if>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="@label">
+      <xsl:value-of select="@label"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:choose>
+        <xsl:when test="count($pchap)>0">
+          <xsl:if test="$prefix != ''">
+            <xsl:apply-templates select="$pchap" mode="label.markup"/>
+            <xsl:apply-templates select="$pchap" mode="intralabel.punctuation"/>
+          </xsl:if>
+          <xsl:number format="1" count="equation[title]" from="chapter|appendix" level="any"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:number format="1" count="equation[title]" from="book|article" level="any"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="orderedlist/listitem" mode="label.markup">
+  <xsl:variable name="numeration">
+    <xsl:call-template name="list.numeration">
+      <xsl:with-param name="node" select="parent::orderedlist"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="type">
+    <xsl:choose>
+      <xsl:when test="$numeration='arabic'">1</xsl:when>
+      <xsl:when test="$numeration='loweralpha'">a</xsl:when>
+      <xsl:when test="$numeration='lowerroman'">i</xsl:when>
+      <xsl:when test="$numeration='upperalpha'">A</xsl:when>
+      <xsl:when test="$numeration='upperroman'">I</xsl:when>
+      <!-- What!? This should never happen -->
+      <xsl:otherwise>
+        <xsl:message>
+          <xsl:text>Unexpected numeration: </xsl:text>
+          <xsl:value-of select="$numeration"/>
+        </xsl:message>
+        <xsl:value-of select="1."/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:number count="listitem" format="{$type}"/>
+</xsl:template>
+
+<xsl:template match="abstract" mode="label.markup">
+  <!-- nop -->
+</xsl:template>
+
+<!-- ============================================================ -->
+
+<xsl:template name="label.this.section">
+  <xsl:param name="section" select="."/>
+  <xsl:value-of select="$section.autolabel"/>
+</xsl:template>
+
+<doc:template name="label.this.section" xmlns="">
+<refpurpose>Returns true if $section should be labelled</refpurpose>
+<refdescription>
+<para>Returns true if the specified section should be labelled.
+By default, this template simply returns $section.autolabel, but
+custom stylesheets may override it to get more selective behavior.</para>
+</refdescription>
+</doc:template>
+
+<!-- ============================================================ -->
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/lt.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/lt.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/lt.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1153 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="lt" english-language-name="Lithuanian">
+
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+   <l:gentext key="Abstract" text="Santrauka"/>
+   <l:gentext key="abstract" text="Santrauka"/>
+   <l:gentext key="Answer" text="Ats:"/>
+   <l:gentext key="answer" text="Ats:"/>
+   <l:gentext key="Appendix" text="Priedas"/>
+   <l:gentext key="appendix" text="priedas"/>
+   <l:gentext key="Article" text="Straipsnis"/>
+   <l:gentext key="article" text="Straipsnis"/>
+   <l:gentext key="Bibliography" text="Bibliografija"/>
+   <l:gentext key="bibliography" text="Bibliografija"/>
+   <l:gentext key="Book" text="Knyga"/>
+   <l:gentext key="book" text="Knyga"/>
+   <l:gentext key="CAUTION" text="ATSARGIAI"/>
+   <l:gentext key="Caution" text="Atsargiai"/>
+   <l:gentext key="caution" text="Atsargiai"/>
+   <l:gentext key="Chapter" text="Skyrius"/>
+   <l:gentext key="chapter" text="skyrius"/>
+   <l:gentext key="Colophon" text="&#302;&#382;anga &#303; knyg&#261;"/>
+   <l:gentext key="colophon" text="&#302;&#382;anga &#303; knyg&#336;"/>
+   <l:gentext key="Copyright" text="Autorin&#279;s teis&#279;s"/>
+   <l:gentext key="copyright" text="Autorin&#279;s teis&#279;s"/>
+   <l:gentext key="Dedication" text="Dedikacija"/>
+   <l:gentext key="dedication" text="Dedikacija"/>
+   <l:gentext key="Edition" text="Leidimas"/>
+   <l:gentext key="edition" text="Leidimas"/>
+   <l:gentext key="Equation" text="Lygtis"/>
+   <l:gentext key="equation" text="Lygtis"/>
+   <l:gentext key="Example" text="Pavyzdys"/>
+   <l:gentext key="example" text="Pavyzdys"/>
+   <l:gentext key="Figure" text="Pav."/>
+   <l:gentext key="figure" text="Pav."/>
+   <l:gentext key="Glossary" text="Termin&#371; &#382;odyn&#279;lis"/>
+   <l:gentext key="glossary" text="Termin&#371; &#382;odyn&#279;lis"/>
+   <l:gentext key="GlossSee" text="Termin&#261; &#382;r."/>
+   <l:gentext key="glosssee" text="Termin&#261; &#382;r."/>
+   <l:gentext key="GlossSeeAlso" text="Taip pat &#382;r."/>
+   <l:gentext key="glossseealso" text="Taip pat &#382;r."/>
+   <l:gentext key="IMPORTANT" text="SVARBU"/>
+   <l:gentext key="important" text="Svarbu"/>
+   <l:gentext key="Important" text="Svarbu"/>
+   <l:gentext key="Index" text="Rodykl&#279;"/>
+   <l:gentext key="index" text="Rodykl&#279;"/>
+   <l:gentext key="ISBN" text="ISBN"/>
+   <l:gentext key="isbn" text="ISBN"/>
+   <l:gentext key="LegalNotice" text="Teisin&#279; pastaba"/>
+   <l:gentext key="legalnotice" text="Teisin&#279; pastaba"/>
+   <l:gentext key="MsgAud" text="Auditorija"/>
+   <l:gentext key="msgaud" text="Auditorija"/>
+   <l:gentext key="MsgLevel" text="Lygmuo"/>
+   <l:gentext key="msglevel" text="Lygmuo"/>
+   <l:gentext key="MsgOrig" text="Kilm&#279;"/>
+   <l:gentext key="msgorig" text="Kilm&#279;"/>
+   <l:gentext key="NOTE" text="PASTABA"/>
+   <l:gentext key="Note" text="Pastaba"/>
+   <l:gentext key="note" text="Pastaba"/>
+   <l:gentext key="Part" text="Dalis"/>
+   <l:gentext key="part" text="Dalis"/>
+   <l:gentext key="Preface" text="&#302;&#382;anga"/>
+   <l:gentext key="preface" text="&#302;&#382;anga"/>
+   <l:gentext key="Procedure" text="Proced&#363;ra"/>
+   <l:gentext key="procedure" text="Proced&#363;ra"/>
+   <l:gentext key="ProductionSet" text="Production"/>
+   <l:gentext key="PubDate" text="Publication Date" lang="en"/>
+   <l:gentext key="pubdate" text="Publication date" lang="en"/>
+   <l:gentext key="Published" text="I&#353;leistas"/>
+   <l:gentext key="published" text="I&#353;leistas"/>
+   <l:gentext key="Qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="Question" text="Klausimas:"/>
+   <l:gentext key="question" text="Klausimas:"/>
+   <l:gentext key="RefEntry" text=""/>
+   <l:gentext key="refentry" text=""/>
+   <l:gentext key="Reference" text="Nuoroda"/>
+   <l:gentext key="reference" text="Nuoroda"/>
+   <l:gentext key="RefName" text="Pavadinimas"/>
+   <l:gentext key="refname" text="Pavadinimas"/>
+   <l:gentext key="RefSection" text=""/>
+   <l:gentext key="refsection" text=""/>
+   <l:gentext key="RefSynopsisDiv" text="Trumpa ap&#382;valga"/>
+   <l:gentext key="refsynopsisdiv" text="Trumpa ap&#382;valga"/>
+   <l:gentext key="RevHistory" text="Pataisym&#371; istorija"/>
+   <l:gentext key="revhistory" text="Pataisym&#371; istorija"/>
+   <l:gentext key="revision" text="Pataisytas leidimas"/>
+   <l:gentext key="Revision" text="Pataisytas leidimas"/>
+   <l:gentext key="sect1" text="Skyrius"/>
+   <l:gentext key="sect2" text="Skyrius"/>
+   <l:gentext key="sect3" text="Skyrius"/>
+   <l:gentext key="sect4" text="Skyrius"/>
+   <l:gentext key="sect5" text="Skyrius"/>
+   <l:gentext key="section" text="Skyrius"/>
+   <l:gentext key="Section" text="Skyrius"/>
+   <l:gentext key="see" text="&#382;r."/>
+   <l:gentext key="See" text="See" lang="en"/>
+   <l:gentext key="seealso" text="&#382;r."/>
+   <l:gentext key="Seealso" text="See also" lang="en"/>
+   <l:gentext key="SeeAlso" text="See Also" lang="en"/>
+   <l:gentext key="set" text="Set"/>
+   <l:gentext key="Set" text="Set"/>
+   <l:gentext key="setindex" text="Set Index"/>
+   <l:gentext key="SetIndex" text="Set Index"/>
+   <l:gentext key="Sidebar" text=""/>
+   <l:gentext key="sidebar" text="sidebar"/>
+   <l:gentext key="step" text="&#382;ingsnis"/>
+   <l:gentext key="Step" text="&#381;ingsnis"/>
+   <l:gentext key="Table" text="Lentel&#279;"/>
+   <l:gentext key="table" text="Lentel&#279;"/>
+   <l:gentext key="tip" text="Patarimas"/>
+   <l:gentext key="TIP" text="PATARIMAS"/>
+   <l:gentext key="Tip" text="Patarimas"/>
+   <l:gentext key="Warning" text="&#302;sp&#279;jimas"/>
+   <l:gentext key="warning" text="&#302;sp&#279;jimas"/>
+   <l:gentext key="WARNING" text="&#302;SP&#278;JIMAS"/>
+   <l:gentext key="and" text="ir"/>
+   <l:gentext key="by" text="by"/>
+   <l:gentext key="called" text="called" lang="en"/>
+   <l:gentext key="Edited" text="Redaguotas"/>
+   <l:gentext key="edited" text="Redaguotas"/>
+   <l:gentext key="Editedby" text="Redaguotas:"/>
+   <l:gentext key="editedby" text="Redaguotas:"/>
+   <l:gentext key="in" text="in"/>
+   <l:gentext key="lastlistcomma" text=","/>
+   <l:gentext key="listcomma" text=","/>
+   <l:gentext key="nonexistantelement" text="neegzistuojantis elementas"/>
+   <l:gentext key="notes" text="Pastabos"/>
+   <l:gentext key="Notes" text="Pastabos"/>
+   <l:gentext key="Pgs" text="Pgs."/>
+   <l:gentext key="pgs" text="Pgs."/>
+   <l:gentext key="Revisedby" text="Patais&#279;: "/>
+   <l:gentext key="revisedby" text="Patais&#279;: "/>
+   <l:gentext key="TableNotes" text="Lentel&#279;s pastabos"/>
+   <l:gentext key="tablenotes" text="Lentel&#279;s pastabos"/>
+   <l:gentext key="TableofContents" text="T&#363;rinys"/>
+   <l:gentext key="tableofcontents" text="T&#363;rinys"/>
+   <l:gentext key="the" text="" lang="en"/>
+   <l:gentext key="unexpectedelementname" text="Unexpected element name"/>
+   <l:gentext key="unsupported" text="nepalaikomas"/>
+   <l:gentext key="xrefto" text="xref to"/>
+   <l:gentext key="listofequations" text="Lyg&#269;i&#371; s&#261;ra&#353;as"/>
+   <l:gentext key="ListofEquations" text="Lyg&#269;i&#371; s&#261;ra&#353;as"/>
+   <l:gentext key="ListofExamples" text="Pavyzd&#382;i&#371; s&#261;ra&#353;as"/>
+   <l:gentext key="listofexamples" text="Pavyzd&#382;i&#371; s&#261;ra&#353;as"/>
+   <l:gentext key="ListofFigures" text="Pav. s&#261;ra&#353;as"/>
+   <l:gentext key="listoffigures" text="Pav. s&#261;ra&#353;as"/>
+   <l:gentext key="ListofProcedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listofprocedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listoftables" text="Lenteli&#371; s&#261;ra&#353;as"/>
+   <l:gentext key="ListofTables" text="Lenteli&#371; s&#261;ra&#353;as"/>
+   <l:gentext key="ListofUnknown" text="Ne&#382;inomas s&#261;ra&#353;as"/>
+   <l:gentext key="listofunknown" text="Ne&#382;inomas s&#261;ra&#353;as"/>
+   <l:gentext key="nav-home" text="Namai"/>
+   <l:gentext key="nav-next" text="Sekantis"/>
+   <l:gentext key="nav-next-sibling" text="Fast Forward"/>
+   <l:gentext key="nav-prev" text="Paskesnis"/>
+   <l:gentext key="nav-prev-sibling" text="Fast Backward"/>
+   <l:gentext key="nav-up" text="&#302; vir&#353;&#371;"/>
+   <l:gentext key="nav-toc" text="ToC"/>
+   <l:gentext key="Draft" text="Draft"/>
+   <l:gentext key="above" text="above"/>
+   <l:gentext key="below" text="below"/>
+   <l:gentext key="sectioncalled" text="the section called"/>
+   <l:gentext key="index symbols" text="Symbols"/>
+   <l:gentext key="lowercase.alpha" text="abcdefghijklmnopqrstuvwxyz"/>
+   <l:gentext key="uppercase.alpha" text="ABCDEFGHIJKLMNOPQRSTUVWXYZ"/>
+   <l:dingbat key="startquote" text="&#8220;"/>
+   <l:dingbat key="endquote" text="&#8221;"/>
+   <l:dingbat key="nestedstartquote" text="&#8216;"/>
+   <l:dingbat key="nestedendquote" text="&#8217;"/>
+   <l:dingbat key="singlestartquote" text="&#8216;" lang="en"/>
+   <l:dingbat key="singleendquote" text="&#8217;" lang="en"/>
+   <l:dingbat key="bullet" text="&#8226;"/>
+   <l:gentext key="hyphenation-character" text="-" lang="en"/>
+   <l:gentext key="hyphenation-push-character-count" text="2" lang="en"/>
+   <l:gentext key="hyphenation-remain-character-count" text="2" lang="en"/>
+
+   <l:context name="styles">
+      <l:template name="person-name" text="first-last"/>
+   </l:context>
+
+   <l:context name="title">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="%t"/>
+      <l:template name="appendix" text="Priedas&#160;%n.&#160;%t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="biblioentry" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliolist" text="%t" lang="en"/>
+      <l:template name="bibliomixed" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="Skyrius&#160;%n.&#160;%t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="Lygtis&#160;%n.&#160;%t"/>
+      <l:template name="example" text="Pavyzdys&#160;%n.&#160;%t"/>
+      <l:template name="figure" text="Pav.&#160;%n.&#160;%t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="glosslist" text="%t" lang="en"/>
+      <l:template name="glossentry" text="%t" lang="en"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text=""/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="Dalis&#160;%n.&#160;%t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="procedure.formal" text="Proced&#363;ra&#160;%n.&#160;%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="productionset.formal" text="Production&#160;%n"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="%t"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="%t"/>
+      <l:template name="refentry" text="%t"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsection" text="%t"/>
+      <l:template name="refsect1" text="%t"/>
+      <l:template name="refsect2" text="%t"/>
+      <l:template name="refsect3" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="refsynopsisdivinfo" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="step" text="%t"/>
+      <l:template name="table" text="Lentel&#279;&#160;%n.&#160;%t"/>
+      <l:template name="task" text="%t" lang="en"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text=""/>
+      <l:template name="warning" text="%t"/>
+   </l:context>
+
+   <l:context name="title-unnumbered">
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article/appendix" text="%t" lang="en"/>
+      <l:template name="bridgehead" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="sect1" text="%t"/>
+      <l:template name="sect2" text="%t"/>
+      <l:template name="sect3" text="%t"/>
+      <l:template name="sect4" text="%t"/>
+      <l:template name="sect5" text="%t"/>
+      <l:template name="section" text="%t"/>
+      <l:template name="simplesect" text="%t"/>
+   </l:context>
+
+   <l:context name="title-numbered">
+      <l:template name="appendix" text="Priedas&#160;%n.&#160;%t"/>
+      <l:template name="article/appendix" text="%n.&#160;%t" lang="en"/>
+      <l:template name="bridgehead" text="%n.&#160;%t"/>
+      <l:template name="chapter" text="Skyrius&#160;%n.&#160;%t"/>
+      <l:template name="sect1" text="%n.&#160;%t"/>
+      <l:template name="sect2" text="%n.&#160;%t"/>
+      <l:template name="sect3" text="%n.&#160;%t"/>
+      <l:template name="sect4" text="%n.&#160;%t"/>
+      <l:template name="sect5" text="%n.&#160;%t"/>
+      <l:template name="section" text="%n.&#160;%t"/>
+      <l:template name="simplesect" text="%t"/>
+   </l:context>
+
+   <l:context name="subtitle">
+      <l:template name="appendix" text="%s"/>
+      <l:template name="article" text="%s"/>
+      <l:template name="bibliodiv" text="%s"/>
+      <l:template name="biblioentry" text="%s"/>
+      <l:template name="bibliography" text="%s"/>
+      <l:template name="bibliomixed" text="%s"/>
+      <l:template name="bibliomset" text="%s"/>
+      <l:template name="biblioset" text="%s"/>
+      <l:template name="book" text="%s"/>
+      <l:template name="chapter" text="%s"/>
+      <l:template name="colophon" text="%s"/>
+      <l:template name="dedication" text="%s"/>
+      <l:template name="glossary" text="%s"/>
+      <l:template name="glossdiv" text="%s"/>
+      <l:template name="index" text="%s"/>
+      <l:template name="indexdiv" text="%s"/>
+      <l:template name="lot" text="%s"/>
+      <l:template name="part" text="%s"/>
+      <l:template name="partintro" text="%s"/>
+      <l:template name="preface" text="%s"/>
+      <l:template name="refentry" text="%s"/>
+      <l:template name="reference" text="%s"/>
+      <l:template name="refsection" text="%s"/>
+      <l:template name="refsect1" text="%s"/>
+      <l:template name="refsect2" text="%s"/>
+      <l:template name="refsect3" text="%s"/>
+      <l:template name="refsynopsisdiv" text="%s"/>
+      <l:template name="sect1" text="%s"/>
+      <l:template name="sect2" text="%s"/>
+      <l:template name="sect3" text="%s"/>
+      <l:template name="sect4" text="%s"/>
+      <l:template name="sect5" text="%s"/>
+      <l:template name="section" text="%s"/>
+      <l:template name="set" text="%s"/>
+      <l:template name="setindex" text="%s"/>
+      <l:template name="sidebar" text="%s"/>
+      <l:template name="simplesect" text="%s"/>
+      <l:template name="toc" text="%s"/>
+   </l:context>
+
+   <l:context name="xref">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="Ats:&#160;%n"/>
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="constraintdef" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="%t"/>
+      <l:template name="example" text="%t"/>
+      <l:template name="figure" text="%t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text="%n"/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="%t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="Klausimas:&#160;%n"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="Klausimas:&#160;%n"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="table" text="%t"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="%n"/>
+      <l:template name="warning" text="%t"/>
+      <l:template name="page.citation" text=" [%p]"/>
+      <l:template name="page" text="(page %p)" lang="en"/>
+      <l:template name="pageabbrev" text="(p. %p)" lang="en"/>
+      <l:template name="Page" text="Page %p" lang="en"/>
+      <l:template name="bridgehead" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="refsection" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="refsect1" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="refsect2" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="refsect3" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="sect1" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="sect2" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="sect3" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="sect4" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="sect5" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="section" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="simplesect" text="the section called &#8220;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="xref-number">
+      <l:template name="answer" text="Ats:&#160;%n"/>
+      <l:template name="appendix" text="Priedas&#160;%n"/>
+      <l:template name="bridgehead" text="Skyrius&#160;%n"/>
+      <l:template name="chapter" text="Skyrius&#160;%n"/>
+      <l:template name="equation" text="Lygtis&#160;%n"/>
+      <l:template name="example" text="Pavyzdys&#160;%n"/>
+      <l:template name="figure" text="Pav.&#160;%n"/>
+      <l:template name="part" text="Dalis&#160;%n"/>
+      <l:template name="procedure" text="Proced&#363;ra&#160;%n"/>
+      <l:template name="productionset" text="Production&#160;%n"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n"/>
+      <l:template name="qandaentry" text="Klausimas:&#160;%n"/>
+      <l:template name="question" text="Klausimas:&#160;%n"/>
+      <l:template name="sect1" text="Skyrius&#160;%n"/>
+      <l:template name="sect2" text="Skyrius&#160;%n"/>
+      <l:template name="sect3" text="Skyrius&#160;%n"/>
+      <l:template name="sect4" text="Skyrius&#160;%n"/>
+      <l:template name="sect5" text="Skyrius&#160;%n"/>
+      <l:template name="section" text="Skyrius&#160;%n"/>
+      <l:template name="table" text="Lentel&#279;&#160;%n"/>
+   </l:context>
+
+   <l:context name="xref-number-and-title">
+      <l:template name="appendix" text="Priedas&#160;%n, %t"/>
+      <l:template name="bridgehead" text="Skyrius&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="chapter" text="Skyrius&#160;%n, %t"/>
+      <l:template name="equation" text="Lygtis&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="example" text="Pavyzdys&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="figure" text="Pav.&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="part" text="Dalis&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="procedure" text="Proced&#363;ra&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="productionset" text="Production&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="refsect1" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="refsect2" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="refsect3" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="refsection" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="sect1" text="Skyrius&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect2" text="Skyrius&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect3" text="Skyrius&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect4" text="Skyrius&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect5" text="Skyrius&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="section" text="Skyrius&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="simplesect" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="table" text="Lentel&#279;&#160;%n, &#8220;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="authorgroup">
+      <l:template name="sep" text=", "/>
+      <l:template name="sep2" text=" ir "/>
+      <l:template name="seplast" text=", ir "/>
+   </l:context>
+
+   <l:context name="glossary">
+      <l:template name="see" text="Termin&#261; &#382;r. "/>
+      <l:template name="seealso" text="Taip pat &#382;r. "/>
+   </l:context>
+
+   <l:context name="msgset">
+      <l:template name="MsgAud" text="Auditorija: "/>
+      <l:template name="MsgLevel" text="Lygmuo: "/>
+      <l:template name="MsgOrig" text="Kilm&#279;: "/>
+   </l:context>
+
+   <l:context name="datetime">
+      <l:template name="format" text="m/d/Y" lang="en"/>
+   </l:context>
+
+   <l:context name="datetime-full">
+      <l:template name="January" text="January" lang="en"/>
+      <l:template name="February" text="February" lang="en"/>
+      <l:template name="March" text="March" lang="en"/>
+      <l:template name="April" text="April" lang="en"/>
+      <l:template name="May" text="May" lang="en"/>
+      <l:template name="June" text="June" lang="en"/>
+      <l:template name="July" text="July" lang="en"/>
+      <l:template name="August" text="August" lang="en"/>
+      <l:template name="September" text="September" lang="en"/>
+      <l:template name="October" text="October" lang="en"/>
+      <l:template name="November" text="November" lang="en"/>
+      <l:template name="December" text="December" lang="en"/>
+      <l:template name="Monday" text="Monday" lang="en"/>
+      <l:template name="Tuesday" text="Tuesday" lang="en"/>
+      <l:template name="Wednesday" text="Wednesday" lang="en"/>
+      <l:template name="Thursday" text="Thursday" lang="en"/>
+      <l:template name="Friday" text="Friday" lang="en"/>
+      <l:template name="Saturday" text="Saturday" lang="en"/>
+      <l:template name="Sunday" text="Sunday" lang="en"/>
+   </l:context>
+
+   <l:context name="datetime-abbrev">
+      <l:template name="Jan" text="Jan" lang="en"/>
+      <l:template name="Feb" text="Feb" lang="en"/>
+      <l:template name="Mar" text="Mar" lang="en"/>
+      <l:template name="Apr" text="Apr" lang="en"/>
+      <l:template name="May" text="May" lang="en"/>
+      <l:template name="Jun" text="Jun" lang="en"/>
+      <l:template name="Jul" text="Jul" lang="en"/>
+      <l:template name="Aug" text="Aug" lang="en"/>
+      <l:template name="Sep" text="Sep" lang="en"/>
+      <l:template name="Oct" text="Oct" lang="en"/>
+      <l:template name="Nov" text="Nov" lang="en"/>
+      <l:template name="Dec" text="Dec" lang="en"/>
+      <l:template name="Mon" text="Mon" lang="en"/>
+      <l:template name="Tue" text="Tue" lang="en"/>
+      <l:template name="Wed" text="Wed" lang="en"/>
+      <l:template name="Thu" text="Thu" lang="en"/>
+      <l:template name="Fri" text="Fri" lang="en"/>
+      <l:template name="Sat" text="Sat" lang="en"/>
+      <l:template name="Sun" text="Sun" lang="en"/>
+   </l:context>
+
+   <l:context name="htmlhelp">
+      <l:template name="langcode" text="0x0427 Lithuanian"/>
+   </l:context>
+
+   <l:letters lang="en">
+      <l:l i="-1"/>
+      <l:l i="0">Symbols</l:l>
+      <l:l i="10">A</l:l>
+      <l:l i="10">a</l:l>
+      <l:l i="10">&#192;</l:l>
+      <l:l i="10">&#224;</l:l>
+      <l:l i="10">&#193;</l:l>
+      <l:l i="10">&#225;</l:l>
+      <l:l i="10">&#194;</l:l>
+      <l:l i="10">&#226;</l:l>
+      <l:l i="10">&#195;</l:l>
+      <l:l i="10">&#227;</l:l>
+      <l:l i="10">&#196;</l:l>
+      <l:l i="10">&#228;</l:l>
+      <l:l i="10">&#197;</l:l>
+      <l:l i="10">&#229;</l:l>
+      <l:l i="10">&#256;</l:l>
+      <l:l i="10">&#257;</l:l>
+      <l:l i="10">&#258;</l:l>
+      <l:l i="10">&#259;</l:l>
+      <l:l i="10">&#260;</l:l>
+      <l:l i="10">&#261;</l:l>
+      <l:l i="10">&#461;</l:l>
+      <l:l i="10">&#462;</l:l>
+      <l:l i="10">&#478;</l:l>
+      <l:l i="10">&#479;</l:l>
+      <l:l i="10">&#480;</l:l>
+      <l:l i="10">&#481;</l:l>
+      <l:l i="10">&#506;</l:l>
+      <l:l i="10">&#507;</l:l>
+      <l:l i="10">&#512;</l:l>
+      <l:l i="10">&#513;</l:l>
+      <l:l i="10">&#514;</l:l>
+      <l:l i="10">&#515;</l:l>
+      <l:l i="10">&#550;</l:l>
+      <l:l i="10">&#551;</l:l>
+      <l:l i="10">&#7680;</l:l>
+      <l:l i="10">&#7681;</l:l>
+      <l:l i="10">&#7834;</l:l>
+      <l:l i="10">&#7840;</l:l>
+      <l:l i="10">&#7841;</l:l>
+      <l:l i="10">&#7842;</l:l>
+      <l:l i="10">&#7843;</l:l>
+      <l:l i="10">&#7844;</l:l>
+      <l:l i="10">&#7845;</l:l>
+      <l:l i="10">&#7846;</l:l>
+      <l:l i="10">&#7847;</l:l>
+      <l:l i="10">&#7848;</l:l>
+      <l:l i="10">&#7849;</l:l>
+      <l:l i="10">&#7850;</l:l>
+      <l:l i="10">&#7851;</l:l>
+      <l:l i="10">&#7852;</l:l>
+      <l:l i="10">&#7853;</l:l>
+      <l:l i="10">&#7854;</l:l>
+      <l:l i="10">&#7855;</l:l>
+      <l:l i="10">&#7856;</l:l>
+      <l:l i="10">&#7857;</l:l>
+      <l:l i="10">&#7858;</l:l>
+      <l:l i="10">&#7859;</l:l>
+      <l:l i="10">&#7860;</l:l>
+      <l:l i="10">&#7861;</l:l>
+      <l:l i="10">&#7862;</l:l>
+      <l:l i="10">&#7863;</l:l>
+      <l:l i="20">B</l:l>
+      <l:l i="20">b</l:l>
+      <l:l i="20">&#384;</l:l>
+      <l:l i="20">&#385;</l:l>
+      <l:l i="20">&#595;</l:l>
+      <l:l i="20">&#386;</l:l>
+      <l:l i="20">&#387;</l:l>
+      <l:l i="20">&#7682;</l:l>
+      <l:l i="20">&#7683;</l:l>
+      <l:l i="20">&#7684;</l:l>
+      <l:l i="20">&#7685;</l:l>
+      <l:l i="20">&#7686;</l:l>
+      <l:l i="20">&#7687;</l:l>
+      <l:l i="30">C</l:l>
+      <l:l i="30">c</l:l>
+      <l:l i="30">&#199;</l:l>
+      <l:l i="30">&#231;</l:l>
+      <l:l i="30">&#262;</l:l>
+      <l:l i="30">&#263;</l:l>
+      <l:l i="30">&#264;</l:l>
+      <l:l i="30">&#265;</l:l>
+      <l:l i="30">&#266;</l:l>
+      <l:l i="30">&#267;</l:l>
+      <l:l i="30">&#268;</l:l>
+      <l:l i="30">&#269;</l:l>
+      <l:l i="30">&#391;</l:l>
+      <l:l i="30">&#392;</l:l>
+      <l:l i="30">&#597;</l:l>
+      <l:l i="30">&#7688;</l:l>
+      <l:l i="30">&#7689;</l:l>
+      <l:l i="40">D</l:l>
+      <l:l i="40">d</l:l>
+      <l:l i="40">&#270;</l:l>
+      <l:l i="40">&#271;</l:l>
+      <l:l i="40">&#272;</l:l>
+      <l:l i="40">&#273;</l:l>
+      <l:l i="40">&#394;</l:l>
+      <l:l i="40">&#599;</l:l>
+      <l:l i="40">&#395;</l:l>
+      <l:l i="40">&#396;</l:l>
+      <l:l i="40">&#453;</l:l>
+      <l:l i="40">&#498;</l:l>
+      <l:l i="40">&#545;</l:l>
+      <l:l i="40">&#598;</l:l>
+      <l:l i="40">&#7690;</l:l>
+      <l:l i="40">&#7691;</l:l>
+      <l:l i="40">&#7692;</l:l>
+      <l:l i="40">&#7693;</l:l>
+      <l:l i="40">&#7694;</l:l>
+      <l:l i="40">&#7695;</l:l>
+      <l:l i="40">&#7696;</l:l>
+      <l:l i="40">&#7697;</l:l>
+      <l:l i="40">&#7698;</l:l>
+      <l:l i="40">&#7699;</l:l>
+      <l:l i="50">E</l:l>
+      <l:l i="50">e</l:l>
+      <l:l i="50">&#200;</l:l>
+      <l:l i="50">&#232;</l:l>
+      <l:l i="50">&#201;</l:l>
+      <l:l i="50">&#233;</l:l>
+      <l:l i="50">&#202;</l:l>
+      <l:l i="50">&#234;</l:l>
+      <l:l i="50">&#203;</l:l>
+      <l:l i="50">&#235;</l:l>
+      <l:l i="50">&#274;</l:l>
+      <l:l i="50">&#275;</l:l>
+      <l:l i="50">&#276;</l:l>
+      <l:l i="50">&#277;</l:l>
+      <l:l i="50">&#278;</l:l>
+      <l:l i="50">&#279;</l:l>
+      <l:l i="50">&#280;</l:l>
+      <l:l i="50">&#281;</l:l>
+      <l:l i="50">&#282;</l:l>
+      <l:l i="50">&#283;</l:l>
+      <l:l i="50">&#516;</l:l>
+      <l:l i="50">&#517;</l:l>
+      <l:l i="50">&#518;</l:l>
+      <l:l i="50">&#519;</l:l>
+      <l:l i="50">&#552;</l:l>
+      <l:l i="50">&#553;</l:l>
+      <l:l i="50">&#7700;</l:l>
+      <l:l i="50">&#7701;</l:l>
+      <l:l i="50">&#7702;</l:l>
+      <l:l i="50">&#7703;</l:l>
+      <l:l i="50">&#7704;</l:l>
+      <l:l i="50">&#7705;</l:l>
+      <l:l i="50">&#7706;</l:l>
+      <l:l i="50">&#7707;</l:l>
+      <l:l i="50">&#7708;</l:l>
+      <l:l i="50">&#7709;</l:l>
+      <l:l i="50">&#7864;</l:l>
+      <l:l i="50">&#7865;</l:l>
+      <l:l i="50">&#7866;</l:l>
+      <l:l i="50">&#7867;</l:l>
+      <l:l i="50">&#7868;</l:l>
+      <l:l i="50">&#7869;</l:l>
+      <l:l i="50">&#7870;</l:l>
+      <l:l i="50">&#7871;</l:l>
+      <l:l i="50">&#7872;</l:l>
+      <l:l i="50">&#7873;</l:l>
+      <l:l i="50">&#7874;</l:l>
+      <l:l i="50">&#7875;</l:l>
+      <l:l i="50">&#7876;</l:l>
+      <l:l i="50">&#7877;</l:l>
+      <l:l i="50">&#7878;</l:l>
+      <l:l i="50">&#7879;</l:l>
+      <l:l i="60">F</l:l>
+      <l:l i="60">f</l:l>
+      <l:l i="60">&#401;</l:l>
+      <l:l i="60">&#402;</l:l>
+      <l:l i="60">&#7710;</l:l>
+      <l:l i="60">&#7711;</l:l>
+      <l:l i="70">G</l:l>
+      <l:l i="70">g</l:l>
+      <l:l i="70">&#284;</l:l>
+      <l:l i="70">&#285;</l:l>
+      <l:l i="70">&#286;</l:l>
+      <l:l i="70">&#287;</l:l>
+      <l:l i="70">&#288;</l:l>
+      <l:l i="70">&#289;</l:l>
+      <l:l i="70">&#290;</l:l>
+      <l:l i="70">&#291;</l:l>
+      <l:l i="70">&#403;</l:l>
+      <l:l i="70">&#608;</l:l>
+      <l:l i="70">&#484;</l:l>
+      <l:l i="70">&#485;</l:l>
+      <l:l i="70">&#486;</l:l>
+      <l:l i="70">&#487;</l:l>
+      <l:l i="70">&#500;</l:l>
+      <l:l i="70">&#501;</l:l>
+      <l:l i="70">&#7712;</l:l>
+      <l:l i="70">&#7713;</l:l>
+      <l:l i="80">H</l:l>
+      <l:l i="80">h</l:l>
+      <l:l i="80">&#292;</l:l>
+      <l:l i="80">&#293;</l:l>
+      <l:l i="80">&#294;</l:l>
+      <l:l i="80">&#295;</l:l>
+      <l:l i="80">&#542;</l:l>
+      <l:l i="80">&#543;</l:l>
+      <l:l i="80">&#614;</l:l>
+      <l:l i="80">&#7714;</l:l>
+      <l:l i="80">&#7715;</l:l>
+      <l:l i="80">&#7716;</l:l>
+      <l:l i="80">&#7717;</l:l>
+      <l:l i="80">&#7718;</l:l>
+      <l:l i="80">&#7719;</l:l>
+      <l:l i="80">&#7720;</l:l>
+      <l:l i="80">&#7721;</l:l>
+      <l:l i="80">&#7722;</l:l>
+      <l:l i="80">&#7723;</l:l>
+      <l:l i="80">&#7830;</l:l>
+      <l:l i="90">I</l:l>
+      <l:l i="90">i</l:l>
+      <l:l i="90">&#204;</l:l>
+      <l:l i="90">&#236;</l:l>
+      <l:l i="90">&#205;</l:l>
+      <l:l i="90">&#237;</l:l>
+      <l:l i="90">&#206;</l:l>
+      <l:l i="90">&#238;</l:l>
+      <l:l i="90">&#207;</l:l>
+      <l:l i="90">&#239;</l:l>
+      <l:l i="90">&#296;</l:l>
+      <l:l i="90">&#297;</l:l>
+      <l:l i="90">&#298;</l:l>
+      <l:l i="90">&#299;</l:l>
+      <l:l i="90">&#300;</l:l>
+      <l:l i="90">&#301;</l:l>
+      <l:l i="90">&#302;</l:l>
+      <l:l i="90">&#303;</l:l>
+      <l:l i="90">&#304;</l:l>
+      <l:l i="90">&#407;</l:l>
+      <l:l i="90">&#616;</l:l>
+      <l:l i="90">&#463;</l:l>
+      <l:l i="90">&#464;</l:l>
+      <l:l i="90">&#520;</l:l>
+      <l:l i="90">&#521;</l:l>
+      <l:l i="90">&#522;</l:l>
+      <l:l i="90">&#523;</l:l>
+      <l:l i="90">&#7724;</l:l>
+      <l:l i="90">&#7725;</l:l>
+      <l:l i="90">&#7726;</l:l>
+      <l:l i="90">&#7727;</l:l>
+      <l:l i="90">&#7880;</l:l>
+      <l:l i="90">&#7881;</l:l>
+      <l:l i="90">&#7882;</l:l>
+      <l:l i="90">&#7883;</l:l>
+      <l:l i="100">J</l:l>
+      <l:l i="100">j</l:l>
+      <l:l i="100">&#308;</l:l>
+      <l:l i="100">&#309;</l:l>
+      <l:l i="100">&#496;</l:l>
+      <l:l i="100">&#669;</l:l>
+      <l:l i="110">K</l:l>
+      <l:l i="110">k</l:l>
+      <l:l i="110">&#310;</l:l>
+      <l:l i="110">&#311;</l:l>
+      <l:l i="110">&#408;</l:l>
+      <l:l i="110">&#409;</l:l>
+      <l:l i="110">&#488;</l:l>
+      <l:l i="110">&#489;</l:l>
+      <l:l i="110">&#7728;</l:l>
+      <l:l i="110">&#7729;</l:l>
+      <l:l i="110">&#7730;</l:l>
+      <l:l i="110">&#7731;</l:l>
+      <l:l i="110">&#7732;</l:l>
+      <l:l i="110">&#7733;</l:l>
+      <l:l i="120">L</l:l>
+      <l:l i="120">l</l:l>
+      <l:l i="120">&#313;</l:l>
+      <l:l i="120">&#314;</l:l>
+      <l:l i="120">&#315;</l:l>
+      <l:l i="120">&#316;</l:l>
+      <l:l i="120">&#317;</l:l>
+      <l:l i="120">&#318;</l:l>
+      <l:l i="120">&#319;</l:l>
+      <l:l i="120">&#320;</l:l>
+      <l:l i="120">&#321;</l:l>
+      <l:l i="120">&#322;</l:l>
+      <l:l i="120">&#410;</l:l>
+      <l:l i="120">&#456;</l:l>
+      <l:l i="120">&#564;</l:l>
+      <l:l i="120">&#619;</l:l>
+      <l:l i="120">&#620;</l:l>
+      <l:l i="120">&#621;</l:l>
+      <l:l i="120">&#7734;</l:l>
+      <l:l i="120">&#7735;</l:l>
+      <l:l i="120">&#7736;</l:l>
+      <l:l i="120">&#7737;</l:l>
+      <l:l i="120">&#7738;</l:l>
+      <l:l i="120">&#7739;</l:l>
+      <l:l i="120">&#7740;</l:l>
+      <l:l i="120">&#7741;</l:l>
+      <l:l i="130">M</l:l>
+      <l:l i="130">m</l:l>
+      <l:l i="130">&#625;</l:l>
+      <l:l i="130">&#7742;</l:l>
+      <l:l i="130">&#7743;</l:l>
+      <l:l i="130">&#7744;</l:l>
+      <l:l i="130">&#7745;</l:l>
+      <l:l i="130">&#7746;</l:l>
+      <l:l i="130">&#7747;</l:l>
+      <l:l i="140">N</l:l>
+      <l:l i="140">n</l:l>
+      <l:l i="140">&#209;</l:l>
+      <l:l i="140">&#241;</l:l>
+      <l:l i="140">&#323;</l:l>
+      <l:l i="140">&#324;</l:l>
+      <l:l i="140">&#325;</l:l>
+      <l:l i="140">&#326;</l:l>
+      <l:l i="140">&#327;</l:l>
+      <l:l i="140">&#328;</l:l>
+      <l:l i="140">&#413;</l:l>
+      <l:l i="140">&#626;</l:l>
+      <l:l i="140">&#414;</l:l>
+      <l:l i="140">&#544;</l:l>
+      <l:l i="140">&#459;</l:l>
+      <l:l i="140">&#504;</l:l>
+      <l:l i="140">&#505;</l:l>
+      <l:l i="140">&#565;</l:l>
+      <l:l i="140">&#627;</l:l>
+      <l:l i="140">&#7748;</l:l>
+      <l:l i="140">&#7749;</l:l>
+      <l:l i="140">&#7750;</l:l>
+      <l:l i="140">&#7751;</l:l>
+      <l:l i="140">&#7752;</l:l>
+      <l:l i="140">&#7753;</l:l>
+      <l:l i="140">&#7754;</l:l>
+      <l:l i="140">&#7755;</l:l>
+      <l:l i="150">O</l:l>
+      <l:l i="150">o</l:l>
+      <l:l i="150">&#210;</l:l>
+      <l:l i="150">&#242;</l:l>
+      <l:l i="150">&#211;</l:l>
+      <l:l i="150">&#243;</l:l>
+      <l:l i="150">&#212;</l:l>
+      <l:l i="150">&#244;</l:l>
+      <l:l i="150">&#213;</l:l>
+      <l:l i="150">&#245;</l:l>
+      <l:l i="150">&#214;</l:l>
+      <l:l i="150">&#246;</l:l>
+      <l:l i="150">&#216;</l:l>
+      <l:l i="150">&#248;</l:l>
+      <l:l i="150">&#332;</l:l>
+      <l:l i="150">&#333;</l:l>
+      <l:l i="150">&#334;</l:l>
+      <l:l i="150">&#335;</l:l>
+      <l:l i="150">&#336;</l:l>
+      <l:l i="150">&#337;</l:l>
+      <l:l i="150">&#415;</l:l>
+      <l:l i="150">&#416;</l:l>
+      <l:l i="150">&#417;</l:l>
+      <l:l i="150">&#465;</l:l>
+      <l:l i="150">&#466;</l:l>
+      <l:l i="150">&#490;</l:l>
+      <l:l i="150">&#491;</l:l>
+      <l:l i="150">&#492;</l:l>
+      <l:l i="150">&#493;</l:l>
+      <l:l i="150">&#510;</l:l>
+      <l:l i="150">&#511;</l:l>
+      <l:l i="150">&#524;</l:l>
+      <l:l i="150">&#525;</l:l>
+      <l:l i="150">&#526;</l:l>
+      <l:l i="150">&#527;</l:l>
+      <l:l i="150">&#554;</l:l>
+      <l:l i="150">&#555;</l:l>
+      <l:l i="150">&#556;</l:l>
+      <l:l i="150">&#557;</l:l>
+      <l:l i="150">&#558;</l:l>
+      <l:l i="150">&#559;</l:l>
+      <l:l i="150">&#560;</l:l>
+      <l:l i="150">&#561;</l:l>
+      <l:l i="150">&#7756;</l:l>
+      <l:l i="150">&#7757;</l:l>
+      <l:l i="150">&#7758;</l:l>
+      <l:l i="150">&#7759;</l:l>
+      <l:l i="150">&#7760;</l:l>
+      <l:l i="150">&#7761;</l:l>
+      <l:l i="150">&#7762;</l:l>
+      <l:l i="150">&#7763;</l:l>
+      <l:l i="150">&#7884;</l:l>
+      <l:l i="150">&#7885;</l:l>
+      <l:l i="150">&#7886;</l:l>
+      <l:l i="150">&#7887;</l:l>
+      <l:l i="150">&#7888;</l:l>
+      <l:l i="150">&#7889;</l:l>
+      <l:l i="150">&#7890;</l:l>
+      <l:l i="150">&#7891;</l:l>
+      <l:l i="150">&#7892;</l:l>
+      <l:l i="150">&#7893;</l:l>
+      <l:l i="150">&#7894;</l:l>
+      <l:l i="150">&#7895;</l:l>
+      <l:l i="150">&#7896;</l:l>
+      <l:l i="150">&#7897;</l:l>
+      <l:l i="150">&#7898;</l:l>
+      <l:l i="150">&#7899;</l:l>
+      <l:l i="150">&#7900;</l:l>
+      <l:l i="150">&#7901;</l:l>
+      <l:l i="150">&#7902;</l:l>
+      <l:l i="150">&#7903;</l:l>
+      <l:l i="150">&#7904;</l:l>
+      <l:l i="150">&#7905;</l:l>
+      <l:l i="150">&#7906;</l:l>
+      <l:l i="150">&#7907;</l:l>
+      <l:l i="160">P</l:l>
+      <l:l i="160">p</l:l>
+      <l:l i="160">&#420;</l:l>
+      <l:l i="160">&#421;</l:l>
+      <l:l i="160">&#7764;</l:l>
+      <l:l i="160">&#7765;</l:l>
+      <l:l i="160">&#7766;</l:l>
+      <l:l i="160">&#7767;</l:l>
+      <l:l i="170">Q</l:l>
+      <l:l i="170">q</l:l>
+      <l:l i="170">&#672;</l:l>
+      <l:l i="180">R</l:l>
+      <l:l i="180">r</l:l>
+      <l:l i="180">&#340;</l:l>
+      <l:l i="180">&#341;</l:l>
+      <l:l i="180">&#342;</l:l>
+      <l:l i="180">&#343;</l:l>
+      <l:l i="180">&#344;</l:l>
+      <l:l i="180">&#345;</l:l>
+      <l:l i="180">&#528;</l:l>
+      <l:l i="180">&#529;</l:l>
+      <l:l i="180">&#530;</l:l>
+      <l:l i="180">&#531;</l:l>
+      <l:l i="180">&#636;</l:l>
+      <l:l i="180">&#637;</l:l>
+      <l:l i="180">&#638;</l:l>
+      <l:l i="180">&#7768;</l:l>
+      <l:l i="180">&#7769;</l:l>
+      <l:l i="180">&#7770;</l:l>
+      <l:l i="180">&#7771;</l:l>
+      <l:l i="180">&#7772;</l:l>
+      <l:l i="180">&#7773;</l:l>
+      <l:l i="180">&#7774;</l:l>
+      <l:l i="180">&#7775;</l:l>
+      <l:l i="190">S</l:l>
+      <l:l i="190">s</l:l>
+      <l:l i="190">&#346;</l:l>
+      <l:l i="190">&#347;</l:l>
+      <l:l i="190">&#348;</l:l>
+      <l:l i="190">&#349;</l:l>
+      <l:l i="190">&#350;</l:l>
+      <l:l i="190">&#351;</l:l>
+      <l:l i="190">&#352;</l:l>
+      <l:l i="190">&#353;</l:l>
+      <l:l i="190">&#536;</l:l>
+      <l:l i="190">&#537;</l:l>
+      <l:l i="190">&#642;</l:l>
+      <l:l i="190">&#7776;</l:l>
+      <l:l i="190">&#7777;</l:l>
+      <l:l i="190">&#7778;</l:l>
+      <l:l i="190">&#7779;</l:l>
+      <l:l i="190">&#7780;</l:l>
+      <l:l i="190">&#7781;</l:l>
+      <l:l i="190">&#7782;</l:l>
+      <l:l i="190">&#7783;</l:l>
+      <l:l i="190">&#7784;</l:l>
+      <l:l i="190">&#7785;</l:l>
+      <l:l i="200">T</l:l>
+      <l:l i="200">t</l:l>
+      <l:l i="200">&#354;</l:l>
+      <l:l i="200">&#355;</l:l>
+      <l:l i="200">&#356;</l:l>
+      <l:l i="200">&#357;</l:l>
+      <l:l i="200">&#358;</l:l>
+      <l:l i="200">&#359;</l:l>
+      <l:l i="200">&#427;</l:l>
+      <l:l i="200">&#428;</l:l>
+      <l:l i="200">&#429;</l:l>
+      <l:l i="200">&#430;</l:l>
+      <l:l i="200">&#648;</l:l>
+      <l:l i="200">&#538;</l:l>
+      <l:l i="200">&#539;</l:l>
+      <l:l i="200">&#566;</l:l>
+      <l:l i="200">&#7786;</l:l>
+      <l:l i="200">&#7787;</l:l>
+      <l:l i="200">&#7788;</l:l>
+      <l:l i="200">&#7789;</l:l>
+      <l:l i="200">&#7790;</l:l>
+      <l:l i="200">&#7791;</l:l>
+      <l:l i="200">&#7792;</l:l>
+      <l:l i="200">&#7793;</l:l>
+      <l:l i="200">&#7831;</l:l>
+      <l:l i="210">U</l:l>
+      <l:l i="210">u</l:l>
+      <l:l i="210">&#217;</l:l>
+      <l:l i="210">&#249;</l:l>
+      <l:l i="210">&#218;</l:l>
+      <l:l i="210">&#250;</l:l>
+      <l:l i="210">&#219;</l:l>
+      <l:l i="210">&#251;</l:l>
+      <l:l i="210">&#220;</l:l>
+      <l:l i="210">&#252;</l:l>
+      <l:l i="210">&#360;</l:l>
+      <l:l i="210">&#361;</l:l>
+      <l:l i="210">&#362;</l:l>
+      <l:l i="210">&#363;</l:l>
+      <l:l i="210">&#364;</l:l>
+      <l:l i="210">&#365;</l:l>
+      <l:l i="210">&#366;</l:l>
+      <l:l i="210">&#367;</l:l>
+      <l:l i="210">&#368;</l:l>
+      <l:l i="210">&#369;</l:l>
+      <l:l i="210">&#370;</l:l>
+      <l:l i="210">&#371;</l:l>
+      <l:l i="210">&#431;</l:l>
+      <l:l i="210">&#432;</l:l>
+      <l:l i="210">&#467;</l:l>
+      <l:l i="210">&#468;</l:l>
+      <l:l i="210">&#469;</l:l>
+      <l:l i="210">&#470;</l:l>
+      <l:l i="210">&#471;</l:l>
+      <l:l i="210">&#472;</l:l>
+      <l:l i="210">&#473;</l:l>
+      <l:l i="210">&#474;</l:l>
+      <l:l i="210">&#475;</l:l>
+      <l:l i="210">&#476;</l:l>
+      <l:l i="210">&#532;</l:l>
+      <l:l i="210">&#533;</l:l>
+      <l:l i="210">&#534;</l:l>
+      <l:l i="210">&#535;</l:l>
+      <l:l i="210">&#7794;</l:l>
+      <l:l i="210">&#7795;</l:l>
+      <l:l i="210">&#7796;</l:l>
+      <l:l i="210">&#7797;</l:l>
+      <l:l i="210">&#7798;</l:l>
+      <l:l i="210">&#7799;</l:l>
+      <l:l i="210">&#7800;</l:l>
+      <l:l i="210">&#7801;</l:l>
+      <l:l i="210">&#7802;</l:l>
+      <l:l i="210">&#7803;</l:l>
+      <l:l i="210">&#7908;</l:l>
+      <l:l i="210">&#7909;</l:l>
+      <l:l i="210">&#7910;</l:l>
+      <l:l i="210">&#7911;</l:l>
+      <l:l i="210">&#7912;</l:l>
+      <l:l i="210">&#7913;</l:l>
+      <l:l i="210">&#7914;</l:l>
+      <l:l i="210">&#7915;</l:l>
+      <l:l i="210">&#7916;</l:l>
+      <l:l i="210">&#7917;</l:l>
+      <l:l i="210">&#7918;</l:l>
+      <l:l i="210">&#7919;</l:l>
+      <l:l i="210">&#7920;</l:l>
+      <l:l i="210">&#7921;</l:l>
+      <l:l i="220">V</l:l>
+      <l:l i="220">v</l:l>
+      <l:l i="220">&#434;</l:l>
+      <l:l i="220">&#651;</l:l>
+      <l:l i="220">&#7804;</l:l>
+      <l:l i="220">&#7805;</l:l>
+      <l:l i="220">&#7806;</l:l>
+      <l:l i="220">&#7807;</l:l>
+      <l:l i="230">W</l:l>
+      <l:l i="230">w</l:l>
+      <l:l i="230">&#372;</l:l>
+      <l:l i="230">&#373;</l:l>
+      <l:l i="230">&#7808;</l:l>
+      <l:l i="230">&#7809;</l:l>
+      <l:l i="230">&#7810;</l:l>
+      <l:l i="230">&#7811;</l:l>
+      <l:l i="230">&#7812;</l:l>
+      <l:l i="230">&#7813;</l:l>
+      <l:l i="230">&#7814;</l:l>
+      <l:l i="230">&#7815;</l:l>
+      <l:l i="230">&#7816;</l:l>
+      <l:l i="230">&#7817;</l:l>
+      <l:l i="230">&#7832;</l:l>
+      <l:l i="240">X</l:l>
+      <l:l i="240">x</l:l>
+      <l:l i="240">&#7818;</l:l>
+      <l:l i="240">&#7819;</l:l>
+      <l:l i="240">&#7820;</l:l>
+      <l:l i="240">&#7821;</l:l>
+      <l:l i="250">Y</l:l>
+      <l:l i="250">y</l:l>
+      <l:l i="250">&#221;</l:l>
+      <l:l i="250">&#253;</l:l>
+      <l:l i="250">&#255;</l:l>
+      <l:l i="250">&#376;</l:l>
+      <l:l i="250">&#374;</l:l>
+      <l:l i="250">&#375;</l:l>
+      <l:l i="250">&#435;</l:l>
+      <l:l i="250">&#436;</l:l>
+      <l:l i="250">&#562;</l:l>
+      <l:l i="250">&#563;</l:l>
+      <l:l i="250">&#7822;</l:l>
+      <l:l i="250">&#7823;</l:l>
+      <l:l i="250">&#7833;</l:l>
+      <l:l i="250">&#7922;</l:l>
+      <l:l i="250">&#7923;</l:l>
+      <l:l i="250">&#7924;</l:l>
+      <l:l i="250">&#7925;</l:l>
+      <l:l i="250">&#7926;</l:l>
+      <l:l i="250">&#7927;</l:l>
+      <l:l i="250">&#7928;</l:l>
+      <l:l i="250">&#7929;</l:l>
+      <l:l i="260">Z</l:l>
+      <l:l i="260">z</l:l>
+      <l:l i="260">&#377;</l:l>
+      <l:l i="260">&#378;</l:l>
+      <l:l i="260">&#379;</l:l>
+      <l:l i="260">&#380;</l:l>
+      <l:l i="260">&#381;</l:l>
+      <l:l i="260">&#382;</l:l>
+      <l:l i="260">&#437;</l:l>
+      <l:l i="260">&#438;</l:l>
+      <l:l i="260">&#548;</l:l>
+      <l:l i="260">&#549;</l:l>
+      <l:l i="260">&#656;</l:l>
+      <l:l i="260">&#657;</l:l>
+      <l:l i="260">&#7824;</l:l>
+      <l:l i="260">&#7825;</l:l>
+      <l:l i="260">&#7826;</l:l>
+      <l:l i="260">&#7827;</l:l>
+      <l:l i="260">&#7828;</l:l>
+      <l:l i="260">&#7829;</l:l>
+   </l:letters>
+</l:l10n>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/nl.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/nl.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/nl.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1153 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="nl" english-language-name="Dutch">
+
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+   <l:gentext key="Abstract" text="Samenvatting"/>
+   <l:gentext key="abstract" text="Samenvatting"/>
+   <l:gentext key="Answer" text="Antwoord:"/>
+   <l:gentext key="answer" text="Antwoord:"/>
+   <l:gentext key="Appendix" text="Aanhangsel"/>
+   <l:gentext key="appendix" text="aanhangsel"/>
+   <l:gentext key="Article" text="Artikel"/>
+   <l:gentext key="article" text="Artikel"/>
+   <l:gentext key="Bibliography" text="Literatuurlijst"/>
+   <l:gentext key="bibliography" text="Literatuurlijst"/>
+   <l:gentext key="Book" text="Boek"/>
+   <l:gentext key="book" text="Boek"/>
+   <l:gentext key="CAUTION" text="LET OP"/>
+   <l:gentext key="Caution" text="Let op"/>
+   <l:gentext key="caution" text="Let op"/>
+   <l:gentext key="Chapter" text="Hoofdstuk"/>
+   <l:gentext key="chapter" text="hoofdstuk"/>
+   <l:gentext key="Colophon" text="Colofon"/>
+   <l:gentext key="colophon" text="Colofon"/>
+   <l:gentext key="Copyright" text="Copyright"/>
+   <l:gentext key="copyright" text="Copyright"/>
+   <l:gentext key="Dedication" text="Opdracht"/>
+   <l:gentext key="dedication" text="Opdracht"/>
+   <l:gentext key="Edition" text="Uitgave"/>
+   <l:gentext key="edition" text="Uitgave"/>
+   <l:gentext key="Equation" text="Vergelijking"/>
+   <l:gentext key="equation" text="Vergelijking"/>
+   <l:gentext key="Example" text="Voorbeeld"/>
+   <l:gentext key="example" text="Voorbeeld"/>
+   <l:gentext key="Figure" text="Figuur"/>
+   <l:gentext key="figure" text="Figuur"/>
+   <l:gentext key="Glossary" text="Woordenlijst"/>
+   <l:gentext key="glossary" text="Woordenlijst"/>
+   <l:gentext key="GlossSee" text="Zie"/>
+   <l:gentext key="glosssee" text="Zie"/>
+   <l:gentext key="GlossSeeAlso" text="Zie ook"/>
+   <l:gentext key="glossseealso" text="Zie ook"/>
+   <l:gentext key="IMPORTANT" text="BELANGRIJK"/>
+   <l:gentext key="important" text="Belangrijk"/>
+   <l:gentext key="Important" text="Belangrijk"/>
+   <l:gentext key="Index" text="Register"/>
+   <l:gentext key="index" text="Register"/>
+   <l:gentext key="ISBN" text="ISBN"/>
+   <l:gentext key="isbn" text="ISBN"/>
+   <l:gentext key="LegalNotice" text="Bericht"/>
+   <l:gentext key="legalnotice" text="Bericht"/>
+   <l:gentext key="MsgAud" text="Doelgroep"/>
+   <l:gentext key="msgaud" text="Doelgroep"/>
+   <l:gentext key="MsgLevel" text="Niveau"/>
+   <l:gentext key="msglevel" text="Niveau"/>
+   <l:gentext key="MsgOrig" text="Herkomst"/>
+   <l:gentext key="msgorig" text="Herkomst"/>
+   <l:gentext key="NOTE" text="OPMERKING"/>
+   <l:gentext key="Note" text="Opmerking"/>
+   <l:gentext key="note" text="Opmerking"/>
+   <l:gentext key="Part" text="Deel"/>
+   <l:gentext key="part" text="Deel"/>
+   <l:gentext key="Preface" text="Voorwoord"/>
+   <l:gentext key="preface" text="Voorwoord"/>
+   <l:gentext key="Procedure" text="Procedure"/>
+   <l:gentext key="procedure" text="Procedure"/>
+   <l:gentext key="ProductionSet" text="Production"/>
+   <l:gentext key="PubDate" text="Publication Date" lang="en"/>
+   <l:gentext key="pubdate" text="Publication date" lang="en"/>
+   <l:gentext key="Published" text="Uitgegeven"/>
+   <l:gentext key="published" text="Uitgegeven"/>
+   <l:gentext key="Qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="Question" text="Vraag:"/>
+   <l:gentext key="question" text="Vraag:"/>
+   <l:gentext key="RefEntry" text="Referentielemma"/>
+   <l:gentext key="refentry" text="Referentielemma"/>
+   <l:gentext key="Reference" text="Referentie"/>
+   <l:gentext key="reference" text="Referentie"/>
+   <l:gentext key="RefName" text="Referentienaam"/>
+   <l:gentext key="refname" text="Referentienaam"/>
+   <l:gentext key="RefSection" text="Referentieparagraaf"/>
+   <l:gentext key="refsection" text="Referentieparagraaf"/>
+   <l:gentext key="RefSynopsisDiv" text="Referentiesamenvatting"/>
+   <l:gentext key="refsynopsisdiv" text="Referentiesamenvatting"/>
+   <l:gentext key="RevHistory" text="Wijzigingen"/>
+   <l:gentext key="revhistory" text="Wijzigingen"/>
+   <l:gentext key="revision" text="Herziening"/>
+   <l:gentext key="Revision" text="Herziening"/>
+   <l:gentext key="sect1" text="Paragraaf"/>
+   <l:gentext key="sect2" text="Paragraaf"/>
+   <l:gentext key="sect3" text="Paragraaf"/>
+   <l:gentext key="sect4" text="Paragraaf"/>
+   <l:gentext key="sect5" text="Paragraaf"/>
+   <l:gentext key="section" text="paragraaf"/>
+   <l:gentext key="Section" text="Paragraaf"/>
+   <l:gentext key="see" text="Zie"/>
+   <l:gentext key="See" text="Zie"/>
+   <l:gentext key="seealso" text="Zie ook"/>
+   <l:gentext key="Seealso" text="Zie ook"/>
+   <l:gentext key="SeeAlso" text="Zie ook"/>
+   <l:gentext key="set" text="Verzameling"/>
+   <l:gentext key="Set" text="Verzameling"/>
+   <l:gentext key="setindex" text="Hoofdregister"/>
+   <l:gentext key="SetIndex" text="Hoofdregister"/>
+   <l:gentext key="Sidebar" text="Excursie"/>
+   <l:gentext key="sidebar" text="excursie"/>
+   <l:gentext key="step" text="stap"/>
+   <l:gentext key="Step" text="Stap"/>
+   <l:gentext key="Table" text="Tabel"/>
+   <l:gentext key="table" text="Tabel"/>
+   <l:gentext key="tip" text="Tip"/>
+   <l:gentext key="TIP" text="TIP"/>
+   <l:gentext key="Tip" text="Tip"/>
+   <l:gentext key="Warning" text="Waarschuwing"/>
+   <l:gentext key="warning" text="Waarschuwing"/>
+   <l:gentext key="WARNING" text="WAARSCHUWING"/>
+   <l:gentext key="and" text="en"/>
+   <l:gentext key="by" text="door"/>
+   <l:gentext key="called" text="called" lang="en"/>
+   <l:gentext key="Edited" text="Redactie"/>
+   <l:gentext key="edited" text="Redactie"/>
+   <l:gentext key="Editedby" text="Redactie door"/>
+   <l:gentext key="editedby" text="Redactie door"/>
+   <l:gentext key="in" text="in"/>
+   <l:gentext key="lastlistcomma" text=","/>
+   <l:gentext key="listcomma" text=","/>
+   <l:gentext key="nonexistantelement" text="niet bestaand element"/>
+   <l:gentext key="notes" text="Noten"/>
+   <l:gentext key="Notes" text="Noten"/>
+   <l:gentext key="Pgs" text="blz."/>
+   <l:gentext key="pgs" text="blz."/>
+   <l:gentext key="Revisedby" text="Herzien door: "/>
+   <l:gentext key="revisedby" text="Herzien door: "/>
+   <l:gentext key="TableNotes" text="Opmerkingen"/>
+   <l:gentext key="tablenotes" text="Opmerkingen"/>
+   <l:gentext key="TableofContents" text="Inhoudsopgave"/>
+   <l:gentext key="tableofcontents" text="Inhoudsopgave"/>
+   <l:gentext key="the" text="" lang="en"/>
+   <l:gentext key="unexpectedelementname" text="ONVERWACHT-ELEMENT"/>
+   <l:gentext key="unsupported" text="niet ondersteund"/>
+   <l:gentext key="xrefto" text="verwijzing naar"/>
+   <l:gentext key="listofequations" text="Lijst van vergelijkingen"/>
+   <l:gentext key="ListofEquations" text="Lijst van vergelijkingen"/>
+   <l:gentext key="ListofExamples" text="Lijst van voorbeelden"/>
+   <l:gentext key="listofexamples" text="Lijst van voorbeelden"/>
+   <l:gentext key="ListofFigures" text="Lijst van figuren"/>
+   <l:gentext key="listoffigures" text="Lijst van figuren"/>
+   <l:gentext key="ListofProcedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listofprocedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listoftables" text="Lijst van tabellen"/>
+   <l:gentext key="ListofTables" text="Lijst van tabellen"/>
+   <l:gentext key="ListofUnknown" text="Lijst van ???"/>
+   <l:gentext key="listofunknown" text="Lijst van ???"/>
+   <l:gentext key="nav-home" text="Begin"/>
+   <l:gentext key="nav-next" text="Volgende"/>
+   <l:gentext key="nav-next-sibling" text="Verder vooruit"/>
+   <l:gentext key="nav-prev" text="Terug"/>
+   <l:gentext key="nav-prev-sibling" text="Verder terug"/>
+   <l:gentext key="nav-up" text="Omhoog"/>
+   <l:gentext key="nav-toc" text="ToC" lang="en"/>
+   <l:gentext key="Draft" text="Ontwerp"/>
+   <l:gentext key="above" text="boven"/>
+   <l:gentext key="below" text="onder"/>
+   <l:gentext key="sectioncalled" text="de paragraaf"/>
+   <l:gentext key="index symbols" text="Symbolen"/>
+   <l:gentext key="lowercase.alpha" text="abcdefghijklmnopqrstuvwxyz&#235;&#239;&#233;"/>
+   <l:gentext key="uppercase.alpha" text="ABCDEFGHIJKLMNOPQRSTUVWXYZ&#203;&#207;&#201;"/>
+   <l:dingbat key="startquote" text="&#8220;"/>
+   <l:dingbat key="endquote" text="&#8221;"/>
+   <l:dingbat key="nestedstartquote" text="&#8216;"/>
+   <l:dingbat key="nestedendquote" text="&#8217;"/>
+   <l:dingbat key="singlestartquote" text="&#8216;" lang="en"/>
+   <l:dingbat key="singleendquote" text="&#8217;" lang="en"/>
+   <l:dingbat key="bullet" text="&#8226;"/>
+   <l:gentext key="hyphenation-character" text="-" lang="en"/>
+   <l:gentext key="hyphenation-push-character-count" text="2" lang="en"/>
+   <l:gentext key="hyphenation-remain-character-count" text="2" lang="en"/>
+
+   <l:context name="styles">
+      <l:template name="person-name" text="first-last"/>
+   </l:context>
+
+   <l:context name="title">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="%t"/>
+      <l:template name="appendix" text="Aanhangsel %n. %t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="biblioentry" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliolist" text="%t" lang="en"/>
+      <l:template name="bibliomixed" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="Hoofdstuk %n. %t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="Vergelijking %n. %t"/>
+      <l:template name="example" text="Voorbeeld %n. %t"/>
+      <l:template name="figure" text="Figuur %n. %t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="glosslist" text="%t" lang="en"/>
+      <l:template name="glossentry" text="%t" lang="en"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text=""/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="Deel %n. %t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="procedure.formal" text="Procedure&#160;%n.&#160;%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="productionset.formal" text="Production&#160;%n"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="%t"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="%t"/>
+      <l:template name="refentry" text="%t"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsection" text="%t"/>
+      <l:template name="refsect1" text="%t"/>
+      <l:template name="refsect2" text="%t"/>
+      <l:template name="refsect3" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="refsynopsisdivinfo" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="step" text="%t"/>
+      <l:template name="table" text="Tabel %n. %t"/>
+      <l:template name="task" text="%t" lang="en"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="" lang="en"/>
+      <l:template name="warning" text="%t"/>
+   </l:context>
+
+   <l:context name="title-unnumbered">
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article/appendix" text="%t" lang="en"/>
+      <l:template name="bridgehead" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="sect1" text="%t"/>
+      <l:template name="sect2" text="%t"/>
+      <l:template name="sect3" text="%t"/>
+      <l:template name="sect4" text="%t"/>
+      <l:template name="sect5" text="%t"/>
+      <l:template name="section" text="%t"/>
+      <l:template name="simplesect" text="%t"/>
+   </l:context>
+
+   <l:context name="title-numbered">
+      <l:template name="appendix" text="Aanhangsel %n. %t"/>
+      <l:template name="article/appendix" text="%n.&#160;%t" lang="en"/>
+      <l:template name="bridgehead" text="%n. %t"/>
+      <l:template name="chapter" text="Hoofdstuk %n. %t"/>
+      <l:template name="sect1" text="%n. %t"/>
+      <l:template name="sect2" text="%n. %t"/>
+      <l:template name="sect3" text="%n. %t"/>
+      <l:template name="sect4" text="%n. %t"/>
+      <l:template name="sect5" text="%n. %t"/>
+      <l:template name="section" text="%n. %t"/>
+      <l:template name="simplesect" text="%n. %t"/>
+   </l:context>
+
+   <l:context name="subtitle">
+      <l:template name="appendix" text="%s"/>
+      <l:template name="article" text="%s"/>
+      <l:template name="bibliodiv" text="%s"/>
+      <l:template name="biblioentry" text="%s"/>
+      <l:template name="bibliography" text="%s"/>
+      <l:template name="bibliomixed" text="%s"/>
+      <l:template name="bibliomset" text="%s"/>
+      <l:template name="biblioset" text="%s"/>
+      <l:template name="book" text="%s"/>
+      <l:template name="chapter" text="%s"/>
+      <l:template name="colophon" text="%s"/>
+      <l:template name="dedication" text="%s"/>
+      <l:template name="glossary" text="%s"/>
+      <l:template name="glossdiv" text="%s"/>
+      <l:template name="index" text="%s"/>
+      <l:template name="indexdiv" text="%s"/>
+      <l:template name="lot" text="%s"/>
+      <l:template name="part" text="%s"/>
+      <l:template name="partintro" text="%s"/>
+      <l:template name="preface" text="%s"/>
+      <l:template name="refentry" text="%s"/>
+      <l:template name="reference" text="%s"/>
+      <l:template name="refsection" text="%s"/>
+      <l:template name="refsect1" text="%s"/>
+      <l:template name="refsect2" text="%s"/>
+      <l:template name="refsect3" text="%s"/>
+      <l:template name="refsynopsisdiv" text="%s"/>
+      <l:template name="sect1" text="%s"/>
+      <l:template name="sect2" text="%s"/>
+      <l:template name="sect3" text="%s"/>
+      <l:template name="sect4" text="%s"/>
+      <l:template name="sect5" text="%s"/>
+      <l:template name="section" text="%s"/>
+      <l:template name="set" text="%s"/>
+      <l:template name="setindex" text="%s"/>
+      <l:template name="sidebar" text="%s"/>
+      <l:template name="simplesect" text="%s"/>
+      <l:template name="toc" text="%s"/>
+   </l:context>
+
+   <l:context name="xref">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="Antwoord:&#160;%n"/>
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="constraintdef" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="%t"/>
+      <l:template name="example" text="%t"/>
+      <l:template name="figure" text="%t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text="%n"/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="%t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="Vraag:&#160;%n"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="Vraag:&#160;%n"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="table" text="%t"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="%n"/>
+      <l:template name="warning" text="%t"/>
+      <l:template name="page.citation" text=" [%p]"/>
+      <l:template name="page" text="(page %p)" lang="en"/>
+      <l:template name="pageabbrev" text="(p. %p)" lang="en"/>
+      <l:template name="Page" text="Page %p" lang="en"/>
+      <l:template name="bridgehead" text="de paragraaf &#8220;%t&#8221;"/>
+      <l:template name="refsection" text="de paragraaf &#8220;%t&#8221;"/>
+      <l:template name="refsect1" text="de paragraaf &#8220;%t&#8221;"/>
+      <l:template name="refsect2" text="de paragraaf &#8220;%t&#8221;"/>
+      <l:template name="refsect3" text="de paragraaf &#8220;%t&#8221;"/>
+      <l:template name="sect1" text="de paragraaf &#8220;%t&#8221;"/>
+      <l:template name="sect2" text="de paragraaf &#8220;%t&#8221;"/>
+      <l:template name="sect3" text="de paragraaf &#8220;%t&#8221;"/>
+      <l:template name="sect4" text="de paragraaf &#8220;%t&#8221;"/>
+      <l:template name="sect5" text="de paragraaf &#8220;%t&#8221;"/>
+      <l:template name="section" text="de paragraaf &#8220;%t&#8221;"/>
+      <l:template name="simplesect" text="de paragraaf &#8220;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="xref-number">
+      <l:template name="answer" text="Antwoord:&#160;%n"/>
+      <l:template name="appendix" text="Aanhangsel&#160;%n"/>
+      <l:template name="bridgehead" text="Paragraaf&#160;%n"/>
+      <l:template name="chapter" text="Hoofdstuk&#160;%n"/>
+      <l:template name="equation" text="Vergelijking&#160;%n"/>
+      <l:template name="example" text="Voorbeeld&#160;%n"/>
+      <l:template name="figure" text="Figuur&#160;%n"/>
+      <l:template name="part" text="Deel&#160;%n"/>
+      <l:template name="procedure" text="Procedure&#160;%n"/>
+      <l:template name="productionset" text="Production&#160;%n"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n"/>
+      <l:template name="qandaentry" text="Vraag:&#160;%n"/>
+      <l:template name="question" text="Vraag:&#160;%n"/>
+      <l:template name="sect1" text="Paragraaf&#160;%n"/>
+      <l:template name="sect2" text="Paragraaf&#160;%n"/>
+      <l:template name="sect3" text="Paragraaf&#160;%n"/>
+      <l:template name="sect4" text="Paragraaf&#160;%n"/>
+      <l:template name="sect5" text="Paragraaf&#160;%n"/>
+      <l:template name="section" text="Paragraaf&#160;%n"/>
+      <l:template name="table" text="Tabel&#160;%n"/>
+   </l:context>
+
+   <l:context name="xref-number-and-title">
+      <l:template name="appendix" text="Aanhangsel&#160;%n, %t"/>
+      <l:template name="bridgehead" text="Paragraaf&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="chapter" text="Hoofdstuk&#160;%n, %t"/>
+      <l:template name="equation" text="Vergelijking&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="example" text="Voorbeeld&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="figure" text="Figuur&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="part" text="Deel&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="procedure" text="Procedure&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="productionset" text="Production&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="refsect1" text="de paragraaf &#8220;%t&#8221;"/>
+      <l:template name="refsect2" text="de paragraaf &#8220;%t&#8221;"/>
+      <l:template name="refsect3" text="de paragraaf &#8220;%t&#8221;"/>
+      <l:template name="refsection" text="de paragraaf &#8220;%t&#8221;"/>
+      <l:template name="sect1" text="Paragraaf&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect2" text="Paragraaf&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect3" text="Paragraaf&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect4" text="Paragraaf&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect5" text="Paragraaf&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="section" text="Paragraaf&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="simplesect" text="de paragraaf &#8220;%t&#8221;"/>
+      <l:template name="table" text="Tabel&#160;%n, &#8220;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="authorgroup">
+      <l:template name="sep" text=", "/>
+      <l:template name="sep2" text=" en "/>
+      <l:template name="seplast" text=", en "/>
+   </l:context>
+
+   <l:context name="glossary">
+      <l:template name="see" text="Zie "/>
+      <l:template name="seealso" text="Zie ook "/>
+   </l:context>
+
+   <l:context name="msgset">
+      <l:template name="MsgAud" text="Doelgroep: "/>
+      <l:template name="MsgLevel" text="Niveau: "/>
+      <l:template name="MsgOrig" text="Herkomst: "/>
+   </l:context>
+
+   <l:context name="datetime">
+      <l:template name="format" text="m/d/Y" lang="en"/>
+   </l:context>
+
+   <l:context name="datetime-full">
+      <l:template name="January" text="January" lang="en"/>
+      <l:template name="February" text="February" lang="en"/>
+      <l:template name="March" text="March" lang="en"/>
+      <l:template name="April" text="April" lang="en"/>
+      <l:template name="May" text="May" lang="en"/>
+      <l:template name="June" text="June" lang="en"/>
+      <l:template name="July" text="July" lang="en"/>
+      <l:template name="August" text="August" lang="en"/>
+      <l:template name="September" text="September" lang="en"/>
+      <l:template name="October" text="October" lang="en"/>
+      <l:template name="November" text="November" lang="en"/>
+      <l:template name="December" text="December" lang="en"/>
+      <l:template name="Monday" text="Monday" lang="en"/>
+      <l:template name="Tuesday" text="Tuesday" lang="en"/>
+      <l:template name="Wednesday" text="Wednesday" lang="en"/>
+      <l:template name="Thursday" text="Thursday" lang="en"/>
+      <l:template name="Friday" text="Friday" lang="en"/>
+      <l:template name="Saturday" text="Saturday" lang="en"/>
+      <l:template name="Sunday" text="Sunday" lang="en"/>
+   </l:context>
+
+   <l:context name="datetime-abbrev">
+      <l:template name="Jan" text="Jan" lang="en"/>
+      <l:template name="Feb" text="Feb" lang="en"/>
+      <l:template name="Mar" text="Mar" lang="en"/>
+      <l:template name="Apr" text="Apr" lang="en"/>
+      <l:template name="May" text="May" lang="en"/>
+      <l:template name="Jun" text="Jun" lang="en"/>
+      <l:template name="Jul" text="Jul" lang="en"/>
+      <l:template name="Aug" text="Aug" lang="en"/>
+      <l:template name="Sep" text="Sep" lang="en"/>
+      <l:template name="Oct" text="Oct" lang="en"/>
+      <l:template name="Nov" text="Nov" lang="en"/>
+      <l:template name="Dec" text="Dec" lang="en"/>
+      <l:template name="Mon" text="Mon" lang="en"/>
+      <l:template name="Tue" text="Tue" lang="en"/>
+      <l:template name="Wed" text="Wed" lang="en"/>
+      <l:template name="Thu" text="Thu" lang="en"/>
+      <l:template name="Fri" text="Fri" lang="en"/>
+      <l:template name="Sat" text="Sat" lang="en"/>
+      <l:template name="Sun" text="Sun" lang="en"/>
+   </l:context>
+
+   <l:context name="htmlhelp">
+      <l:template name="langcode" text="0x0413 Dutch"/>
+   </l:context>
+
+   <l:letters lang="en">
+      <l:l i="-1"/>
+      <l:l i="0">Symbols</l:l>
+      <l:l i="10">A</l:l>
+      <l:l i="10">a</l:l>
+      <l:l i="10">&#192;</l:l>
+      <l:l i="10">&#224;</l:l>
+      <l:l i="10">&#193;</l:l>
+      <l:l i="10">&#225;</l:l>
+      <l:l i="10">&#194;</l:l>
+      <l:l i="10">&#226;</l:l>
+      <l:l i="10">&#195;</l:l>
+      <l:l i="10">&#227;</l:l>
+      <l:l i="10">&#196;</l:l>
+      <l:l i="10">&#228;</l:l>
+      <l:l i="10">&#197;</l:l>
+      <l:l i="10">&#229;</l:l>
+      <l:l i="10">&#256;</l:l>
+      <l:l i="10">&#257;</l:l>
+      <l:l i="10">&#258;</l:l>
+      <l:l i="10">&#259;</l:l>
+      <l:l i="10">&#260;</l:l>
+      <l:l i="10">&#261;</l:l>
+      <l:l i="10">&#461;</l:l>
+      <l:l i="10">&#462;</l:l>
+      <l:l i="10">&#478;</l:l>
+      <l:l i="10">&#479;</l:l>
+      <l:l i="10">&#480;</l:l>
+      <l:l i="10">&#481;</l:l>
+      <l:l i="10">&#506;</l:l>
+      <l:l i="10">&#507;</l:l>
+      <l:l i="10">&#512;</l:l>
+      <l:l i="10">&#513;</l:l>
+      <l:l i="10">&#514;</l:l>
+      <l:l i="10">&#515;</l:l>
+      <l:l i="10">&#550;</l:l>
+      <l:l i="10">&#551;</l:l>
+      <l:l i="10">&#7680;</l:l>
+      <l:l i="10">&#7681;</l:l>
+      <l:l i="10">&#7834;</l:l>
+      <l:l i="10">&#7840;</l:l>
+      <l:l i="10">&#7841;</l:l>
+      <l:l i="10">&#7842;</l:l>
+      <l:l i="10">&#7843;</l:l>
+      <l:l i="10">&#7844;</l:l>
+      <l:l i="10">&#7845;</l:l>
+      <l:l i="10">&#7846;</l:l>
+      <l:l i="10">&#7847;</l:l>
+      <l:l i="10">&#7848;</l:l>
+      <l:l i="10">&#7849;</l:l>
+      <l:l i="10">&#7850;</l:l>
+      <l:l i="10">&#7851;</l:l>
+      <l:l i="10">&#7852;</l:l>
+      <l:l i="10">&#7853;</l:l>
+      <l:l i="10">&#7854;</l:l>
+      <l:l i="10">&#7855;</l:l>
+      <l:l i="10">&#7856;</l:l>
+      <l:l i="10">&#7857;</l:l>
+      <l:l i="10">&#7858;</l:l>
+      <l:l i="10">&#7859;</l:l>
+      <l:l i="10">&#7860;</l:l>
+      <l:l i="10">&#7861;</l:l>
+      <l:l i="10">&#7862;</l:l>
+      <l:l i="10">&#7863;</l:l>
+      <l:l i="20">B</l:l>
+      <l:l i="20">b</l:l>
+      <l:l i="20">&#384;</l:l>
+      <l:l i="20">&#385;</l:l>
+      <l:l i="20">&#595;</l:l>
+      <l:l i="20">&#386;</l:l>
+      <l:l i="20">&#387;</l:l>
+      <l:l i="20">&#7682;</l:l>
+      <l:l i="20">&#7683;</l:l>
+      <l:l i="20">&#7684;</l:l>
+      <l:l i="20">&#7685;</l:l>
+      <l:l i="20">&#7686;</l:l>
+      <l:l i="20">&#7687;</l:l>
+      <l:l i="30">C</l:l>
+      <l:l i="30">c</l:l>
+      <l:l i="30">&#199;</l:l>
+      <l:l i="30">&#231;</l:l>
+      <l:l i="30">&#262;</l:l>
+      <l:l i="30">&#263;</l:l>
+      <l:l i="30">&#264;</l:l>
+      <l:l i="30">&#265;</l:l>
+      <l:l i="30">&#266;</l:l>
+      <l:l i="30">&#267;</l:l>
+      <l:l i="30">&#268;</l:l>
+      <l:l i="30">&#269;</l:l>
+      <l:l i="30">&#391;</l:l>
+      <l:l i="30">&#392;</l:l>
+      <l:l i="30">&#597;</l:l>
+      <l:l i="30">&#7688;</l:l>
+      <l:l i="30">&#7689;</l:l>
+      <l:l i="40">D</l:l>
+      <l:l i="40">d</l:l>
+      <l:l i="40">&#270;</l:l>
+      <l:l i="40">&#271;</l:l>
+      <l:l i="40">&#272;</l:l>
+      <l:l i="40">&#273;</l:l>
+      <l:l i="40">&#394;</l:l>
+      <l:l i="40">&#599;</l:l>
+      <l:l i="40">&#395;</l:l>
+      <l:l i="40">&#396;</l:l>
+      <l:l i="40">&#453;</l:l>
+      <l:l i="40">&#498;</l:l>
+      <l:l i="40">&#545;</l:l>
+      <l:l i="40">&#598;</l:l>
+      <l:l i="40">&#7690;</l:l>
+      <l:l i="40">&#7691;</l:l>
+      <l:l i="40">&#7692;</l:l>
+      <l:l i="40">&#7693;</l:l>
+      <l:l i="40">&#7694;</l:l>
+      <l:l i="40">&#7695;</l:l>
+      <l:l i="40">&#7696;</l:l>
+      <l:l i="40">&#7697;</l:l>
+      <l:l i="40">&#7698;</l:l>
+      <l:l i="40">&#7699;</l:l>
+      <l:l i="50">E</l:l>
+      <l:l i="50">e</l:l>
+      <l:l i="50">&#200;</l:l>
+      <l:l i="50">&#232;</l:l>
+      <l:l i="50">&#201;</l:l>
+      <l:l i="50">&#233;</l:l>
+      <l:l i="50">&#202;</l:l>
+      <l:l i="50">&#234;</l:l>
+      <l:l i="50">&#203;</l:l>
+      <l:l i="50">&#235;</l:l>
+      <l:l i="50">&#274;</l:l>
+      <l:l i="50">&#275;</l:l>
+      <l:l i="50">&#276;</l:l>
+      <l:l i="50">&#277;</l:l>
+      <l:l i="50">&#278;</l:l>
+      <l:l i="50">&#279;</l:l>
+      <l:l i="50">&#280;</l:l>
+      <l:l i="50">&#281;</l:l>
+      <l:l i="50">&#282;</l:l>
+      <l:l i="50">&#283;</l:l>
+      <l:l i="50">&#516;</l:l>
+      <l:l i="50">&#517;</l:l>
+      <l:l i="50">&#518;</l:l>
+      <l:l i="50">&#519;</l:l>
+      <l:l i="50">&#552;</l:l>
+      <l:l i="50">&#553;</l:l>
+      <l:l i="50">&#7700;</l:l>
+      <l:l i="50">&#7701;</l:l>
+      <l:l i="50">&#7702;</l:l>
+      <l:l i="50">&#7703;</l:l>
+      <l:l i="50">&#7704;</l:l>
+      <l:l i="50">&#7705;</l:l>
+      <l:l i="50">&#7706;</l:l>
+      <l:l i="50">&#7707;</l:l>
+      <l:l i="50">&#7708;</l:l>
+      <l:l i="50">&#7709;</l:l>
+      <l:l i="50">&#7864;</l:l>
+      <l:l i="50">&#7865;</l:l>
+      <l:l i="50">&#7866;</l:l>
+      <l:l i="50">&#7867;</l:l>
+      <l:l i="50">&#7868;</l:l>
+      <l:l i="50">&#7869;</l:l>
+      <l:l i="50">&#7870;</l:l>
+      <l:l i="50">&#7871;</l:l>
+      <l:l i="50">&#7872;</l:l>
+      <l:l i="50">&#7873;</l:l>
+      <l:l i="50">&#7874;</l:l>
+      <l:l i="50">&#7875;</l:l>
+      <l:l i="50">&#7876;</l:l>
+      <l:l i="50">&#7877;</l:l>
+      <l:l i="50">&#7878;</l:l>
+      <l:l i="50">&#7879;</l:l>
+      <l:l i="60">F</l:l>
+      <l:l i="60">f</l:l>
+      <l:l i="60">&#401;</l:l>
+      <l:l i="60">&#402;</l:l>
+      <l:l i="60">&#7710;</l:l>
+      <l:l i="60">&#7711;</l:l>
+      <l:l i="70">G</l:l>
+      <l:l i="70">g</l:l>
+      <l:l i="70">&#284;</l:l>
+      <l:l i="70">&#285;</l:l>
+      <l:l i="70">&#286;</l:l>
+      <l:l i="70">&#287;</l:l>
+      <l:l i="70">&#288;</l:l>
+      <l:l i="70">&#289;</l:l>
+      <l:l i="70">&#290;</l:l>
+      <l:l i="70">&#291;</l:l>
+      <l:l i="70">&#403;</l:l>
+      <l:l i="70">&#608;</l:l>
+      <l:l i="70">&#484;</l:l>
+      <l:l i="70">&#485;</l:l>
+      <l:l i="70">&#486;</l:l>
+      <l:l i="70">&#487;</l:l>
+      <l:l i="70">&#500;</l:l>
+      <l:l i="70">&#501;</l:l>
+      <l:l i="70">&#7712;</l:l>
+      <l:l i="70">&#7713;</l:l>
+      <l:l i="80">H</l:l>
+      <l:l i="80">h</l:l>
+      <l:l i="80">&#292;</l:l>
+      <l:l i="80">&#293;</l:l>
+      <l:l i="80">&#294;</l:l>
+      <l:l i="80">&#295;</l:l>
+      <l:l i="80">&#542;</l:l>
+      <l:l i="80">&#543;</l:l>
+      <l:l i="80">&#614;</l:l>
+      <l:l i="80">&#7714;</l:l>
+      <l:l i="80">&#7715;</l:l>
+      <l:l i="80">&#7716;</l:l>
+      <l:l i="80">&#7717;</l:l>
+      <l:l i="80">&#7718;</l:l>
+      <l:l i="80">&#7719;</l:l>
+      <l:l i="80">&#7720;</l:l>
+      <l:l i="80">&#7721;</l:l>
+      <l:l i="80">&#7722;</l:l>
+      <l:l i="80">&#7723;</l:l>
+      <l:l i="80">&#7830;</l:l>
+      <l:l i="90">I</l:l>
+      <l:l i="90">i</l:l>
+      <l:l i="90">&#204;</l:l>
+      <l:l i="90">&#236;</l:l>
+      <l:l i="90">&#205;</l:l>
+      <l:l i="90">&#237;</l:l>
+      <l:l i="90">&#206;</l:l>
+      <l:l i="90">&#238;</l:l>
+      <l:l i="90">&#207;</l:l>
+      <l:l i="90">&#239;</l:l>
+      <l:l i="90">&#296;</l:l>
+      <l:l i="90">&#297;</l:l>
+      <l:l i="90">&#298;</l:l>
+      <l:l i="90">&#299;</l:l>
+      <l:l i="90">&#300;</l:l>
+      <l:l i="90">&#301;</l:l>
+      <l:l i="90">&#302;</l:l>
+      <l:l i="90">&#303;</l:l>
+      <l:l i="90">&#304;</l:l>
+      <l:l i="90">&#407;</l:l>
+      <l:l i="90">&#616;</l:l>
+      <l:l i="90">&#463;</l:l>
+      <l:l i="90">&#464;</l:l>
+      <l:l i="90">&#520;</l:l>
+      <l:l i="90">&#521;</l:l>
+      <l:l i="90">&#522;</l:l>
+      <l:l i="90">&#523;</l:l>
+      <l:l i="90">&#7724;</l:l>
+      <l:l i="90">&#7725;</l:l>
+      <l:l i="90">&#7726;</l:l>
+      <l:l i="90">&#7727;</l:l>
+      <l:l i="90">&#7880;</l:l>
+      <l:l i="90">&#7881;</l:l>
+      <l:l i="90">&#7882;</l:l>
+      <l:l i="90">&#7883;</l:l>
+      <l:l i="100">J</l:l>
+      <l:l i="100">j</l:l>
+      <l:l i="100">&#308;</l:l>
+      <l:l i="100">&#309;</l:l>
+      <l:l i="100">&#496;</l:l>
+      <l:l i="100">&#669;</l:l>
+      <l:l i="110">K</l:l>
+      <l:l i="110">k</l:l>
+      <l:l i="110">&#310;</l:l>
+      <l:l i="110">&#311;</l:l>
+      <l:l i="110">&#408;</l:l>
+      <l:l i="110">&#409;</l:l>
+      <l:l i="110">&#488;</l:l>
+      <l:l i="110">&#489;</l:l>
+      <l:l i="110">&#7728;</l:l>
+      <l:l i="110">&#7729;</l:l>
+      <l:l i="110">&#7730;</l:l>
+      <l:l i="110">&#7731;</l:l>
+      <l:l i="110">&#7732;</l:l>
+      <l:l i="110">&#7733;</l:l>
+      <l:l i="120">L</l:l>
+      <l:l i="120">l</l:l>
+      <l:l i="120">&#313;</l:l>
+      <l:l i="120">&#314;</l:l>
+      <l:l i="120">&#315;</l:l>
+      <l:l i="120">&#316;</l:l>
+      <l:l i="120">&#317;</l:l>
+      <l:l i="120">&#318;</l:l>
+      <l:l i="120">&#319;</l:l>
+      <l:l i="120">&#320;</l:l>
+      <l:l i="120">&#321;</l:l>
+      <l:l i="120">&#322;</l:l>
+      <l:l i="120">&#410;</l:l>
+      <l:l i="120">&#456;</l:l>
+      <l:l i="120">&#564;</l:l>
+      <l:l i="120">&#619;</l:l>
+      <l:l i="120">&#620;</l:l>
+      <l:l i="120">&#621;</l:l>
+      <l:l i="120">&#7734;</l:l>
+      <l:l i="120">&#7735;</l:l>
+      <l:l i="120">&#7736;</l:l>
+      <l:l i="120">&#7737;</l:l>
+      <l:l i="120">&#7738;</l:l>
+      <l:l i="120">&#7739;</l:l>
+      <l:l i="120">&#7740;</l:l>
+      <l:l i="120">&#7741;</l:l>
+      <l:l i="130">M</l:l>
+      <l:l i="130">m</l:l>
+      <l:l i="130">&#625;</l:l>
+      <l:l i="130">&#7742;</l:l>
+      <l:l i="130">&#7743;</l:l>
+      <l:l i="130">&#7744;</l:l>
+      <l:l i="130">&#7745;</l:l>
+      <l:l i="130">&#7746;</l:l>
+      <l:l i="130">&#7747;</l:l>
+      <l:l i="140">N</l:l>
+      <l:l i="140">n</l:l>
+      <l:l i="140">&#209;</l:l>
+      <l:l i="140">&#241;</l:l>
+      <l:l i="140">&#323;</l:l>
+      <l:l i="140">&#324;</l:l>
+      <l:l i="140">&#325;</l:l>
+      <l:l i="140">&#326;</l:l>
+      <l:l i="140">&#327;</l:l>
+      <l:l i="140">&#328;</l:l>
+      <l:l i="140">&#413;</l:l>
+      <l:l i="140">&#626;</l:l>
+      <l:l i="140">&#414;</l:l>
+      <l:l i="140">&#544;</l:l>
+      <l:l i="140">&#459;</l:l>
+      <l:l i="140">&#504;</l:l>
+      <l:l i="140">&#505;</l:l>
+      <l:l i="140">&#565;</l:l>
+      <l:l i="140">&#627;</l:l>
+      <l:l i="140">&#7748;</l:l>
+      <l:l i="140">&#7749;</l:l>
+      <l:l i="140">&#7750;</l:l>
+      <l:l i="140">&#7751;</l:l>
+      <l:l i="140">&#7752;</l:l>
+      <l:l i="140">&#7753;</l:l>
+      <l:l i="140">&#7754;</l:l>
+      <l:l i="140">&#7755;</l:l>
+      <l:l i="150">O</l:l>
+      <l:l i="150">o</l:l>
+      <l:l i="150">&#210;</l:l>
+      <l:l i="150">&#242;</l:l>
+      <l:l i="150">&#211;</l:l>
+      <l:l i="150">&#243;</l:l>
+      <l:l i="150">&#212;</l:l>
+      <l:l i="150">&#244;</l:l>
+      <l:l i="150">&#213;</l:l>
+      <l:l i="150">&#245;</l:l>
+      <l:l i="150">&#214;</l:l>
+      <l:l i="150">&#246;</l:l>
+      <l:l i="150">&#216;</l:l>
+      <l:l i="150">&#248;</l:l>
+      <l:l i="150">&#332;</l:l>
+      <l:l i="150">&#333;</l:l>
+      <l:l i="150">&#334;</l:l>
+      <l:l i="150">&#335;</l:l>
+      <l:l i="150">&#336;</l:l>
+      <l:l i="150">&#337;</l:l>
+      <l:l i="150">&#415;</l:l>
+      <l:l i="150">&#416;</l:l>
+      <l:l i="150">&#417;</l:l>
+      <l:l i="150">&#465;</l:l>
+      <l:l i="150">&#466;</l:l>
+      <l:l i="150">&#490;</l:l>
+      <l:l i="150">&#491;</l:l>
+      <l:l i="150">&#492;</l:l>
+      <l:l i="150">&#493;</l:l>
+      <l:l i="150">&#510;</l:l>
+      <l:l i="150">&#511;</l:l>
+      <l:l i="150">&#524;</l:l>
+      <l:l i="150">&#525;</l:l>
+      <l:l i="150">&#526;</l:l>
+      <l:l i="150">&#527;</l:l>
+      <l:l i="150">&#554;</l:l>
+      <l:l i="150">&#555;</l:l>
+      <l:l i="150">&#556;</l:l>
+      <l:l i="150">&#557;</l:l>
+      <l:l i="150">&#558;</l:l>
+      <l:l i="150">&#559;</l:l>
+      <l:l i="150">&#560;</l:l>
+      <l:l i="150">&#561;</l:l>
+      <l:l i="150">&#7756;</l:l>
+      <l:l i="150">&#7757;</l:l>
+      <l:l i="150">&#7758;</l:l>
+      <l:l i="150">&#7759;</l:l>
+      <l:l i="150">&#7760;</l:l>
+      <l:l i="150">&#7761;</l:l>
+      <l:l i="150">&#7762;</l:l>
+      <l:l i="150">&#7763;</l:l>
+      <l:l i="150">&#7884;</l:l>
+      <l:l i="150">&#7885;</l:l>
+      <l:l i="150">&#7886;</l:l>
+      <l:l i="150">&#7887;</l:l>
+      <l:l i="150">&#7888;</l:l>
+      <l:l i="150">&#7889;</l:l>
+      <l:l i="150">&#7890;</l:l>
+      <l:l i="150">&#7891;</l:l>
+      <l:l i="150">&#7892;</l:l>
+      <l:l i="150">&#7893;</l:l>
+      <l:l i="150">&#7894;</l:l>
+      <l:l i="150">&#7895;</l:l>
+      <l:l i="150">&#7896;</l:l>
+      <l:l i="150">&#7897;</l:l>
+      <l:l i="150">&#7898;</l:l>
+      <l:l i="150">&#7899;</l:l>
+      <l:l i="150">&#7900;</l:l>
+      <l:l i="150">&#7901;</l:l>
+      <l:l i="150">&#7902;</l:l>
+      <l:l i="150">&#7903;</l:l>
+      <l:l i="150">&#7904;</l:l>
+      <l:l i="150">&#7905;</l:l>
+      <l:l i="150">&#7906;</l:l>
+      <l:l i="150">&#7907;</l:l>
+      <l:l i="160">P</l:l>
+      <l:l i="160">p</l:l>
+      <l:l i="160">&#420;</l:l>
+      <l:l i="160">&#421;</l:l>
+      <l:l i="160">&#7764;</l:l>
+      <l:l i="160">&#7765;</l:l>
+      <l:l i="160">&#7766;</l:l>
+      <l:l i="160">&#7767;</l:l>
+      <l:l i="170">Q</l:l>
+      <l:l i="170">q</l:l>
+      <l:l i="170">&#672;</l:l>
+      <l:l i="180">R</l:l>
+      <l:l i="180">r</l:l>
+      <l:l i="180">&#340;</l:l>
+      <l:l i="180">&#341;</l:l>
+      <l:l i="180">&#342;</l:l>
+      <l:l i="180">&#343;</l:l>
+      <l:l i="180">&#344;</l:l>
+      <l:l i="180">&#345;</l:l>
+      <l:l i="180">&#528;</l:l>
+      <l:l i="180">&#529;</l:l>
+      <l:l i="180">&#530;</l:l>
+      <l:l i="180">&#531;</l:l>
+      <l:l i="180">&#636;</l:l>
+      <l:l i="180">&#637;</l:l>
+      <l:l i="180">&#638;</l:l>
+      <l:l i="180">&#7768;</l:l>
+      <l:l i="180">&#7769;</l:l>
+      <l:l i="180">&#7770;</l:l>
+      <l:l i="180">&#7771;</l:l>
+      <l:l i="180">&#7772;</l:l>
+      <l:l i="180">&#7773;</l:l>
+      <l:l i="180">&#7774;</l:l>
+      <l:l i="180">&#7775;</l:l>
+      <l:l i="190">S</l:l>
+      <l:l i="190">s</l:l>
+      <l:l i="190">&#346;</l:l>
+      <l:l i="190">&#347;</l:l>
+      <l:l i="190">&#348;</l:l>
+      <l:l i="190">&#349;</l:l>
+      <l:l i="190">&#350;</l:l>
+      <l:l i="190">&#351;</l:l>
+      <l:l i="190">&#352;</l:l>
+      <l:l i="190">&#353;</l:l>
+      <l:l i="190">&#536;</l:l>
+      <l:l i="190">&#537;</l:l>
+      <l:l i="190">&#642;</l:l>
+      <l:l i="190">&#7776;</l:l>
+      <l:l i="190">&#7777;</l:l>
+      <l:l i="190">&#7778;</l:l>
+      <l:l i="190">&#7779;</l:l>
+      <l:l i="190">&#7780;</l:l>
+      <l:l i="190">&#7781;</l:l>
+      <l:l i="190">&#7782;</l:l>
+      <l:l i="190">&#7783;</l:l>
+      <l:l i="190">&#7784;</l:l>
+      <l:l i="190">&#7785;</l:l>
+      <l:l i="200">T</l:l>
+      <l:l i="200">t</l:l>
+      <l:l i="200">&#354;</l:l>
+      <l:l i="200">&#355;</l:l>
+      <l:l i="200">&#356;</l:l>
+      <l:l i="200">&#357;</l:l>
+      <l:l i="200">&#358;</l:l>
+      <l:l i="200">&#359;</l:l>
+      <l:l i="200">&#427;</l:l>
+      <l:l i="200">&#428;</l:l>
+      <l:l i="200">&#429;</l:l>
+      <l:l i="200">&#430;</l:l>
+      <l:l i="200">&#648;</l:l>
+      <l:l i="200">&#538;</l:l>
+      <l:l i="200">&#539;</l:l>
+      <l:l i="200">&#566;</l:l>
+      <l:l i="200">&#7786;</l:l>
+      <l:l i="200">&#7787;</l:l>
+      <l:l i="200">&#7788;</l:l>
+      <l:l i="200">&#7789;</l:l>
+      <l:l i="200">&#7790;</l:l>
+      <l:l i="200">&#7791;</l:l>
+      <l:l i="200">&#7792;</l:l>
+      <l:l i="200">&#7793;</l:l>
+      <l:l i="200">&#7831;</l:l>
+      <l:l i="210">U</l:l>
+      <l:l i="210">u</l:l>
+      <l:l i="210">&#217;</l:l>
+      <l:l i="210">&#249;</l:l>
+      <l:l i="210">&#218;</l:l>
+      <l:l i="210">&#250;</l:l>
+      <l:l i="210">&#219;</l:l>
+      <l:l i="210">&#251;</l:l>
+      <l:l i="210">&#220;</l:l>
+      <l:l i="210">&#252;</l:l>
+      <l:l i="210">&#360;</l:l>
+      <l:l i="210">&#361;</l:l>
+      <l:l i="210">&#362;</l:l>
+      <l:l i="210">&#363;</l:l>
+      <l:l i="210">&#364;</l:l>
+      <l:l i="210">&#365;</l:l>
+      <l:l i="210">&#366;</l:l>
+      <l:l i="210">&#367;</l:l>
+      <l:l i="210">&#368;</l:l>
+      <l:l i="210">&#369;</l:l>
+      <l:l i="210">&#370;</l:l>
+      <l:l i="210">&#371;</l:l>
+      <l:l i="210">&#431;</l:l>
+      <l:l i="210">&#432;</l:l>
+      <l:l i="210">&#467;</l:l>
+      <l:l i="210">&#468;</l:l>
+      <l:l i="210">&#469;</l:l>
+      <l:l i="210">&#470;</l:l>
+      <l:l i="210">&#471;</l:l>
+      <l:l i="210">&#472;</l:l>
+      <l:l i="210">&#473;</l:l>
+      <l:l i="210">&#474;</l:l>
+      <l:l i="210">&#475;</l:l>
+      <l:l i="210">&#476;</l:l>
+      <l:l i="210">&#532;</l:l>
+      <l:l i="210">&#533;</l:l>
+      <l:l i="210">&#534;</l:l>
+      <l:l i="210">&#535;</l:l>
+      <l:l i="210">&#7794;</l:l>
+      <l:l i="210">&#7795;</l:l>
+      <l:l i="210">&#7796;</l:l>
+      <l:l i="210">&#7797;</l:l>
+      <l:l i="210">&#7798;</l:l>
+      <l:l i="210">&#7799;</l:l>
+      <l:l i="210">&#7800;</l:l>
+      <l:l i="210">&#7801;</l:l>
+      <l:l i="210">&#7802;</l:l>
+      <l:l i="210">&#7803;</l:l>
+      <l:l i="210">&#7908;</l:l>
+      <l:l i="210">&#7909;</l:l>
+      <l:l i="210">&#7910;</l:l>
+      <l:l i="210">&#7911;</l:l>
+      <l:l i="210">&#7912;</l:l>
+      <l:l i="210">&#7913;</l:l>
+      <l:l i="210">&#7914;</l:l>
+      <l:l i="210">&#7915;</l:l>
+      <l:l i="210">&#7916;</l:l>
+      <l:l i="210">&#7917;</l:l>
+      <l:l i="210">&#7918;</l:l>
+      <l:l i="210">&#7919;</l:l>
+      <l:l i="210">&#7920;</l:l>
+      <l:l i="210">&#7921;</l:l>
+      <l:l i="220">V</l:l>
+      <l:l i="220">v</l:l>
+      <l:l i="220">&#434;</l:l>
+      <l:l i="220">&#651;</l:l>
+      <l:l i="220">&#7804;</l:l>
+      <l:l i="220">&#7805;</l:l>
+      <l:l i="220">&#7806;</l:l>
+      <l:l i="220">&#7807;</l:l>
+      <l:l i="230">W</l:l>
+      <l:l i="230">w</l:l>
+      <l:l i="230">&#372;</l:l>
+      <l:l i="230">&#373;</l:l>
+      <l:l i="230">&#7808;</l:l>
+      <l:l i="230">&#7809;</l:l>
+      <l:l i="230">&#7810;</l:l>
+      <l:l i="230">&#7811;</l:l>
+      <l:l i="230">&#7812;</l:l>
+      <l:l i="230">&#7813;</l:l>
+      <l:l i="230">&#7814;</l:l>
+      <l:l i="230">&#7815;</l:l>
+      <l:l i="230">&#7816;</l:l>
+      <l:l i="230">&#7817;</l:l>
+      <l:l i="230">&#7832;</l:l>
+      <l:l i="240">X</l:l>
+      <l:l i="240">x</l:l>
+      <l:l i="240">&#7818;</l:l>
+      <l:l i="240">&#7819;</l:l>
+      <l:l i="240">&#7820;</l:l>
+      <l:l i="240">&#7821;</l:l>
+      <l:l i="250">Y</l:l>
+      <l:l i="250">y</l:l>
+      <l:l i="250">&#221;</l:l>
+      <l:l i="250">&#253;</l:l>
+      <l:l i="250">&#255;</l:l>
+      <l:l i="250">&#376;</l:l>
+      <l:l i="250">&#374;</l:l>
+      <l:l i="250">&#375;</l:l>
+      <l:l i="250">&#435;</l:l>
+      <l:l i="250">&#436;</l:l>
+      <l:l i="250">&#562;</l:l>
+      <l:l i="250">&#563;</l:l>
+      <l:l i="250">&#7822;</l:l>
+      <l:l i="250">&#7823;</l:l>
+      <l:l i="250">&#7833;</l:l>
+      <l:l i="250">&#7922;</l:l>
+      <l:l i="250">&#7923;</l:l>
+      <l:l i="250">&#7924;</l:l>
+      <l:l i="250">&#7925;</l:l>
+      <l:l i="250">&#7926;</l:l>
+      <l:l i="250">&#7927;</l:l>
+      <l:l i="250">&#7928;</l:l>
+      <l:l i="250">&#7929;</l:l>
+      <l:l i="260">Z</l:l>
+      <l:l i="260">z</l:l>
+      <l:l i="260">&#377;</l:l>
+      <l:l i="260">&#378;</l:l>
+      <l:l i="260">&#379;</l:l>
+      <l:l i="260">&#380;</l:l>
+      <l:l i="260">&#381;</l:l>
+      <l:l i="260">&#382;</l:l>
+      <l:l i="260">&#437;</l:l>
+      <l:l i="260">&#438;</l:l>
+      <l:l i="260">&#548;</l:l>
+      <l:l i="260">&#549;</l:l>
+      <l:l i="260">&#656;</l:l>
+      <l:l i="260">&#657;</l:l>
+      <l:l i="260">&#7824;</l:l>
+      <l:l i="260">&#7825;</l:l>
+      <l:l i="260">&#7826;</l:l>
+      <l:l i="260">&#7827;</l:l>
+      <l:l i="260">&#7828;</l:l>
+      <l:l i="260">&#7829;</l:l>
+   </l:letters>
+</l:l10n>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/nn.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/nn.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/nn.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1153 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="nn" english-language-name="Nynorsk">
+
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+   <l:gentext key="Abstract" text="Samandrag"/>
+   <l:gentext key="abstract" text="Samandrag"/>
+   <l:gentext key="Answer" text="Svar"/>
+   <l:gentext key="answer" text="svar"/>
+   <l:gentext key="Appendix" text="Tillegg"/>
+   <l:gentext key="appendix" text="tillegg"/>
+   <l:gentext key="Article" text="Artikkel"/>
+   <l:gentext key="article" text="artikkel"/>
+   <l:gentext key="Bibliography" text="Bibliografi"/>
+   <l:gentext key="bibliography" text="bibliografi"/>
+   <l:gentext key="Book" text="Bok"/>
+   <l:gentext key="book" text="bok"/>
+   <l:gentext key="CAUTION" text="OBS"/>
+   <l:gentext key="Caution" text="Obs"/>
+   <l:gentext key="caution" text="OBS"/>
+   <l:gentext key="Chapter" text="Kapittel"/>
+   <l:gentext key="chapter" text="kapittel"/>
+   <l:gentext key="Colophon" text="Kolofon"/>
+   <l:gentext key="colophon" text="kolofon"/>
+   <l:gentext key="Copyright" text="Opphavsrett"/>
+   <l:gentext key="copyright" text="opphavsrett"/>
+   <l:gentext key="Dedication" text="Dedikasjon"/>
+   <l:gentext key="dedication" text="dedikasjon"/>
+   <l:gentext key="Edition" text="Utg&#229;ve"/>
+   <l:gentext key="edition" text="utg&#229;ve"/>
+   <l:gentext key="Equation" text="Formel"/>
+   <l:gentext key="equation" text="formel"/>
+   <l:gentext key="Example" text="D&#248;me"/>
+   <l:gentext key="example" text="d&#248;me"/>
+   <l:gentext key="Figure" text="Figur"/>
+   <l:gentext key="figure" text="figur"/>
+   <l:gentext key="Glossary" text="Ordliste"/>
+   <l:gentext key="glossary" text="ordliste"/>
+   <l:gentext key="GlossSee" text="Sj&#229;"/>
+   <l:gentext key="glosssee" text="sj&#229;"/>
+   <l:gentext key="GlossSeeAlso" text="Sj&#229; &#242;g"/>
+   <l:gentext key="glossseealso" text="sj&#229; &#242;g"/>
+   <l:gentext key="IMPORTANT" text="VIKTIG"/>
+   <l:gentext key="important" text="viktig"/>
+   <l:gentext key="Important" text="Viktig"/>
+   <l:gentext key="Index" text="Indeks"/>
+   <l:gentext key="index" text="indeks"/>
+   <l:gentext key="ISBN" text="ISBN"/>
+   <l:gentext key="isbn" text="ISBN"/>
+   <l:gentext key="LegalNotice" text="Legal Notice"/>
+   <l:gentext key="legalnotice" text="Legal Notice"/>
+   <l:gentext key="MsgAud" text="Publikum"/>
+   <l:gentext key="msgaud" text="publikum"/>
+   <l:gentext key="MsgLevel" text="Niv&#229;"/>
+   <l:gentext key="msglevel" text="niv&#229;"/>
+   <l:gentext key="MsgOrig" text="Opphav"/>
+   <l:gentext key="msgorig" text="Opphav"/>
+   <l:gentext key="NOTE" text="NOTAT"/>
+   <l:gentext key="Note" text="Notat"/>
+   <l:gentext key="note" text="NOTAT"/>
+   <l:gentext key="Part" text="Del"/>
+   <l:gentext key="part" text="del"/>
+   <l:gentext key="Preface" text="Forord"/>
+   <l:gentext key="preface" text="forord"/>
+   <l:gentext key="Procedure" text="Prosedyre"/>
+   <l:gentext key="procedure" text="prosedyre"/>
+   <l:gentext key="ProductionSet" text="Production"/>
+   <l:gentext key="PubDate" text="Publication Date" lang="en"/>
+   <l:gentext key="pubdate" text="Publication date" lang="en"/>
+   <l:gentext key="Published" text="Utgitt"/>
+   <l:gentext key="published" text="utgitt"/>
+   <l:gentext key="Qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="Question" text="Sp&#248;rsm&#229;l"/>
+   <l:gentext key="question" text="sp&#248;rsm&#229;l"/>
+   <l:gentext key="RefEntry" text=""/>
+   <l:gentext key="refentry" text=""/>
+   <l:gentext key="Reference" text="Referanse"/>
+   <l:gentext key="reference" text="referanse"/>
+   <l:gentext key="RefName" text="Namn"/>
+   <l:gentext key="refname" text="namn"/>
+   <l:gentext key="RefSection" text="Del"/>
+   <l:gentext key="refsection" text="del"/>
+   <l:gentext key="RefSynopsisDiv" text="Oversyn"/>
+   <l:gentext key="refsynopsisdiv" text="oversyn"/>
+   <l:gentext key="RevHistory" text="Revisjonshistorie"/>
+   <l:gentext key="revhistory" text="revisjonshistorie"/>
+   <l:gentext key="revision" text="revisjon"/>
+   <l:gentext key="Revision" text="Revisjon"/>
+   <l:gentext key="sect1" text="Section"/>
+   <l:gentext key="sect2" text="Section"/>
+   <l:gentext key="sect3" text="Section"/>
+   <l:gentext key="sect4" text="Section"/>
+   <l:gentext key="sect5" text="Section"/>
+   <l:gentext key="section" text="del"/>
+   <l:gentext key="Section" text="Del"/>
+   <l:gentext key="see" text="sj&#229;"/>
+   <l:gentext key="See" text="Sj&#229;"/>
+   <l:gentext key="seealso" text="sj&#229; &#242;g"/>
+   <l:gentext key="Seealso" text="Sj&#229; &#242;g"/>
+   <l:gentext key="SeeAlso" text="Sj&#229; &#242;g"/>
+   <l:gentext key="set" text="set"/>
+   <l:gentext key="Set" text="Set"/>
+   <l:gentext key="setindex" text="Indeks"/>
+   <l:gentext key="SetIndex" text="Indeks"/>
+   <l:gentext key="Sidebar" text="Sidestolpe"/>
+   <l:gentext key="sidebar" text="sidestolpe"/>
+   <l:gentext key="step" text="steg"/>
+   <l:gentext key="Step" text="Steg"/>
+   <l:gentext key="Table" text="Tabell"/>
+   <l:gentext key="table" text="tabell"/>
+   <l:gentext key="tip" text="tips"/>
+   <l:gentext key="TIP" text="TIPS"/>
+   <l:gentext key="Tip" text="Tips"/>
+   <l:gentext key="Warning" text="&#197;tvaring"/>
+   <l:gentext key="warning" text="&#229;tvaring"/>
+   <l:gentext key="WARNING" text="&#197;TVARING"/>
+   <l:gentext key="and" text="og"/>
+   <l:gentext key="by" text="av"/>
+   <l:gentext key="called" text="called" lang="en"/>
+   <l:gentext key="Edited" text="Redigert"/>
+   <l:gentext key="edited" text="redigert"/>
+   <l:gentext key="Editedby" text="Redigert av"/>
+   <l:gentext key="editedby" text="redigert av"/>
+   <l:gentext key="in" text="i"/>
+   <l:gentext key="lastlistcomma" text=","/>
+   <l:gentext key="listcomma" text=","/>
+   <l:gentext key="nonexistantelement" text="ikkje-eksisterande element"/>
+   <l:gentext key="notes" text="merknader"/>
+   <l:gentext key="Notes" text="Merknader"/>
+   <l:gentext key="Pgs" text="Sider"/>
+   <l:gentext key="pgs" text="sider"/>
+   <l:gentext key="Revisedby" text="Revidert av: "/>
+   <l:gentext key="revisedby" text="revidert av: "/>
+   <l:gentext key="TableNotes" text="Merknader"/>
+   <l:gentext key="tablenotes" text="merknader"/>
+   <l:gentext key="TableofContents" text="Innhald"/>
+   <l:gentext key="tableofcontents" text="Innhald"/>
+   <l:gentext key="the" text="" lang="en"/>
+   <l:gentext key="unexpectedelementname" text="UVENTA-ELEMENTNAVN"/>
+   <l:gentext key="unsupported" text="ikkje st&#248;tta"/>
+   <l:gentext key="xrefto" text="xref til"/>
+   <l:gentext key="listofequations" text="formeloversikt"/>
+   <l:gentext key="ListofEquations" text="Formeloversikt"/>
+   <l:gentext key="ListofExamples" text="D&#248;meoversikt"/>
+   <l:gentext key="listofexamples" text="d&#248;meoversikt"/>
+   <l:gentext key="ListofFigures" text="Figuroversikt"/>
+   <l:gentext key="listoffigures" text="figuroversikt"/>
+   <l:gentext key="ListofProcedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listofprocedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listoftables" text="tabelloversikt"/>
+   <l:gentext key="ListofTables" text="Tabelloversikt"/>
+   <l:gentext key="ListofUnknown" text="???-oversikt"/>
+   <l:gentext key="listofunknown" text="???-oversikt"/>
+   <l:gentext key="nav-home" text="Heim"/>
+   <l:gentext key="nav-next" text="Fram"/>
+   <l:gentext key="nav-next-sibling" text="Raskt framover"/>
+   <l:gentext key="nav-prev" text="Att"/>
+   <l:gentext key="nav-prev-sibling" text="Raskt bakover"/>
+   <l:gentext key="nav-up" text="Opp"/>
+   <l:gentext key="nav-toc" text="ToC" lang="en"/>
+   <l:gentext key="Draft" text="Draft"/>
+   <l:gentext key="above" text="above"/>
+   <l:gentext key="below" text="below"/>
+   <l:gentext key="sectioncalled" text="the section called"/>
+   <l:gentext key="index symbols" text="Symbols"/>
+   <l:gentext key="lowercase.alpha" text="abcdefghijklmnopqrstuvwxyz"/>
+   <l:gentext key="uppercase.alpha" text="ABCDEFGHIJKLMNOPQRSTUVWXYZ"/>
+   <l:dingbat key="startquote" text="&#8220;"/>
+   <l:dingbat key="endquote" text="&#8221;"/>
+   <l:dingbat key="nestedstartquote" text="&#8216;"/>
+   <l:dingbat key="nestedendquote" text="&#8217;"/>
+   <l:dingbat key="singlestartquote" text="&#8216;" lang="en"/>
+   <l:dingbat key="singleendquote" text="&#8217;" lang="en"/>
+   <l:dingbat key="bullet" text="&#8226;"/>
+   <l:gentext key="hyphenation-character" text="-" lang="en"/>
+   <l:gentext key="hyphenation-push-character-count" text="2" lang="en"/>
+   <l:gentext key="hyphenation-remain-character-count" text="2" lang="en"/>
+
+   <l:context name="styles">
+      <l:template name="person-name" text="first-last"/>
+   </l:context>
+
+   <l:context name="title">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="%t"/>
+      <l:template name="appendix" text="Tillegg %n. %t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="biblioentry" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliolist" text="%t" lang="en"/>
+      <l:template name="bibliomixed" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="Kapittel %n. %t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="Formel %n. %t"/>
+      <l:template name="example" text="D&#248;me %n. %t"/>
+      <l:template name="figure" text="Figur %n. %t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="glosslist" text="%t" lang="en"/>
+      <l:template name="glossentry" text="%t" lang="en"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text=""/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="Del %n. %t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="procedure.formal" text="Prosedyre&#160;%n.&#160;%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="productionset.formal" text="Production&#160;%n"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="%t"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="%t"/>
+      <l:template name="refentry" text="%t"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsection" text="%t"/>
+      <l:template name="refsect1" text="%t"/>
+      <l:template name="refsect2" text="%t"/>
+      <l:template name="refsect3" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="refsynopsisdivinfo" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="step" text="%t"/>
+      <l:template name="table" text="Tabell %n. %t"/>
+      <l:template name="task" text="%t" lang="en"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="" lang="en"/>
+      <l:template name="warning" text="%t"/>
+   </l:context>
+
+   <l:context name="title-unnumbered">
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article/appendix" text="%t" lang="en"/>
+      <l:template name="bridgehead" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="sect1" text="%t"/>
+      <l:template name="sect2" text="%t"/>
+      <l:template name="sect3" text="%t"/>
+      <l:template name="sect4" text="%t"/>
+      <l:template name="sect5" text="%t"/>
+      <l:template name="section" text="%t"/>
+      <l:template name="simplesect" text="%t"/>
+   </l:context>
+
+   <l:context name="title-numbered">
+      <l:template name="appendix" text="Tillegg %n. %t"/>
+      <l:template name="article/appendix" text="%n.&#160;%t" lang="en"/>
+      <l:template name="bridgehead" text="%t"/>
+      <l:template name="chapter" text="Kapittel %n. %t"/>
+      <l:template name="sect1" text="%n. %t"/>
+      <l:template name="sect2" text="%n. %t"/>
+      <l:template name="sect3" text="%n. %t"/>
+      <l:template name="sect4" text="%n. %t"/>
+      <l:template name="sect5" text="%n. %t"/>
+      <l:template name="section" text="%n. %t"/>
+      <l:template name="simplesect" text="%n. %t"/>
+   </l:context>
+
+   <l:context name="subtitle">
+      <l:template name="appendix" text="%s"/>
+      <l:template name="article" text="%s"/>
+      <l:template name="bibliodiv" text="%s"/>
+      <l:template name="biblioentry" text="%s"/>
+      <l:template name="bibliography" text="%s"/>
+      <l:template name="bibliomixed" text="%s"/>
+      <l:template name="bibliomset" text="%s"/>
+      <l:template name="biblioset" text="%s"/>
+      <l:template name="book" text="%s"/>
+      <l:template name="chapter" text="%s"/>
+      <l:template name="colophon" text="%s"/>
+      <l:template name="dedication" text="%s"/>
+      <l:template name="glossary" text="%s"/>
+      <l:template name="glossdiv" text="%s"/>
+      <l:template name="index" text="%s"/>
+      <l:template name="indexdiv" text="%s"/>
+      <l:template name="lot" text="%s"/>
+      <l:template name="part" text="%s"/>
+      <l:template name="partintro" text="%s"/>
+      <l:template name="preface" text="%s"/>
+      <l:template name="refentry" text="%s"/>
+      <l:template name="reference" text="%s"/>
+      <l:template name="refsection" text="%s"/>
+      <l:template name="refsect1" text="%s"/>
+      <l:template name="refsect2" text="%s"/>
+      <l:template name="refsect3" text="%s"/>
+      <l:template name="refsynopsisdiv" text="%s"/>
+      <l:template name="sect1" text="%s"/>
+      <l:template name="sect2" text="%s"/>
+      <l:template name="sect3" text="%s"/>
+      <l:template name="sect4" text="%s"/>
+      <l:template name="sect5" text="%s"/>
+      <l:template name="section" text="%s"/>
+      <l:template name="set" text="%s"/>
+      <l:template name="setindex" text="%s"/>
+      <l:template name="sidebar" text="%s"/>
+      <l:template name="simplesect" text="%s"/>
+      <l:template name="toc" text="%s"/>
+   </l:context>
+
+   <l:context name="xref">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="Svar&#160;%n"/>
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="constraintdef" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="%t"/>
+      <l:template name="example" text="%t"/>
+      <l:template name="figure" text="%t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text="%n"/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="%t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="Sp&#248;rsm&#229;l&#160;%n"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="Sp&#248;rsm&#229;l&#160;%n"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="table" text="%t"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="%n"/>
+      <l:template name="warning" text="%t"/>
+      <l:template name="page.citation" text=" [%p]"/>
+      <l:template name="page" text="(page %p)" lang="en"/>
+      <l:template name="pageabbrev" text="(p. %p)" lang="en"/>
+      <l:template name="Page" text="Page %p" lang="en"/>
+      <l:template name="bridgehead" text="&#8220;%t&#8221;"/>
+      <l:template name="refsection" text="&#8220;%t&#8221;"/>
+      <l:template name="refsect1" text="&#8220;%t&#8221;"/>
+      <l:template name="refsect2" text="&#8220;%t&#8221;"/>
+      <l:template name="refsect3" text="&#8220;%t&#8221;"/>
+      <l:template name="sect1" text="&#8220;%t&#8221;"/>
+      <l:template name="sect2" text="&#8220;%t&#8221;"/>
+      <l:template name="sect3" text="&#8220;%t&#8221;"/>
+      <l:template name="sect4" text="&#8220;%t&#8221;"/>
+      <l:template name="sect5" text="&#8220;%t&#8221;"/>
+      <l:template name="section" text="&#8220;%t&#8221;"/>
+      <l:template name="simplesect" text="&#8220;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="xref-number">
+      <l:template name="answer" text="Svar&#160;%n"/>
+      <l:template name="appendix" text="Tillegg&#160;%n"/>
+      <l:template name="bridgehead" text="Del&#160;%n"/>
+      <l:template name="chapter" text="Kapittel&#160;%n"/>
+      <l:template name="equation" text="Formel&#160;%n"/>
+      <l:template name="example" text="D&#248;me&#160;%n"/>
+      <l:template name="figure" text="Figur&#160;%n"/>
+      <l:template name="part" text="Del&#160;%n"/>
+      <l:template name="procedure" text="Prosedyre&#160;%n"/>
+      <l:template name="productionset" text="Production&#160;%n"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n"/>
+      <l:template name="qandaentry" text="Sp&#248;rsm&#229;l&#160;%n"/>
+      <l:template name="question" text="Sp&#248;rsm&#229;l&#160;%n"/>
+      <l:template name="sect1" text="Del&#160;%n"/>
+      <l:template name="sect2" text="Del&#160;%n"/>
+      <l:template name="sect3" text="Del&#160;%n"/>
+      <l:template name="sect4" text="Del&#160;%n"/>
+      <l:template name="sect5" text="Del&#160;%n"/>
+      <l:template name="section" text="Del&#160;%n"/>
+      <l:template name="table" text="Tabell&#160;%n"/>
+   </l:context>
+
+   <l:context name="xref-number-and-title">
+      <l:template name="appendix" text="Tillegg&#160;%n, %t"/>
+      <l:template name="bridgehead" text="Del&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="chapter" text="Kapittel&#160;%n, %t"/>
+      <l:template name="equation" text="Formel&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="example" text="D&#248;me&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="figure" text="Figur&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="part" text="Del&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="procedure" text="Prosedyre&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="productionset" text="Production&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="refsect1" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="refsect2" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="refsect3" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="refsection" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="sect1" text="Del&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect2" text="Del&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect3" text="Del&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect4" text="Del&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect5" text="Del&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="section" text="Del&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="simplesect" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="table" text="Tabell&#160;%n, &#8220;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="authorgroup">
+      <l:template name="sep" text=", "/>
+      <l:template name="sep2" text=" og "/>
+      <l:template name="seplast" text=", og "/>
+   </l:context>
+
+   <l:context name="glossary">
+      <l:template name="see" text="Sj&#229; "/>
+      <l:template name="seealso" text="Sj&#229; &#242;g "/>
+   </l:context>
+
+   <l:context name="msgset">
+      <l:template name="MsgAud" text="Publikum: "/>
+      <l:template name="MsgLevel" text="Niv&#229;: "/>
+      <l:template name="MsgOrig" text="Opphav: "/>
+   </l:context>
+
+   <l:context name="datetime">
+      <l:template name="format" text="m/d/Y" lang="en"/>
+   </l:context>
+
+   <l:context name="datetime-full">
+      <l:template name="January" text="January" lang="en"/>
+      <l:template name="February" text="February" lang="en"/>
+      <l:template name="March" text="March" lang="en"/>
+      <l:template name="April" text="April" lang="en"/>
+      <l:template name="May" text="May" lang="en"/>
+      <l:template name="June" text="June" lang="en"/>
+      <l:template name="July" text="July" lang="en"/>
+      <l:template name="August" text="August" lang="en"/>
+      <l:template name="September" text="September" lang="en"/>
+      <l:template name="October" text="October" lang="en"/>
+      <l:template name="November" text="November" lang="en"/>
+      <l:template name="December" text="December" lang="en"/>
+      <l:template name="Monday" text="Monday" lang="en"/>
+      <l:template name="Tuesday" text="Tuesday" lang="en"/>
+      <l:template name="Wednesday" text="Wednesday" lang="en"/>
+      <l:template name="Thursday" text="Thursday" lang="en"/>
+      <l:template name="Friday" text="Friday" lang="en"/>
+      <l:template name="Saturday" text="Saturday" lang="en"/>
+      <l:template name="Sunday" text="Sunday" lang="en"/>
+   </l:context>
+
+   <l:context name="datetime-abbrev">
+      <l:template name="Jan" text="Jan" lang="en"/>
+      <l:template name="Feb" text="Feb" lang="en"/>
+      <l:template name="Mar" text="Mar" lang="en"/>
+      <l:template name="Apr" text="Apr" lang="en"/>
+      <l:template name="May" text="May" lang="en"/>
+      <l:template name="Jun" text="Jun" lang="en"/>
+      <l:template name="Jul" text="Jul" lang="en"/>
+      <l:template name="Aug" text="Aug" lang="en"/>
+      <l:template name="Sep" text="Sep" lang="en"/>
+      <l:template name="Oct" text="Oct" lang="en"/>
+      <l:template name="Nov" text="Nov" lang="en"/>
+      <l:template name="Dec" text="Dec" lang="en"/>
+      <l:template name="Mon" text="Mon" lang="en"/>
+      <l:template name="Tue" text="Tue" lang="en"/>
+      <l:template name="Wed" text="Wed" lang="en"/>
+      <l:template name="Thu" text="Thu" lang="en"/>
+      <l:template name="Fri" text="Fri" lang="en"/>
+      <l:template name="Sat" text="Sat" lang="en"/>
+      <l:template name="Sun" text="Sun" lang="en"/>
+   </l:context>
+
+   <l:context name="htmlhelp">
+      <l:template name="langcode" text="0x0814 Norwegian (Nynorsk)"/>
+   </l:context>
+
+   <l:letters lang="en">
+      <l:l i="-1"/>
+      <l:l i="0">Symbols</l:l>
+      <l:l i="10">A</l:l>
+      <l:l i="10">a</l:l>
+      <l:l i="10">&#192;</l:l>
+      <l:l i="10">&#224;</l:l>
+      <l:l i="10">&#193;</l:l>
+      <l:l i="10">&#225;</l:l>
+      <l:l i="10">&#194;</l:l>
+      <l:l i="10">&#226;</l:l>
+      <l:l i="10">&#195;</l:l>
+      <l:l i="10">&#227;</l:l>
+      <l:l i="10">&#196;</l:l>
+      <l:l i="10">&#228;</l:l>
+      <l:l i="10">&#197;</l:l>
+      <l:l i="10">&#229;</l:l>
+      <l:l i="10">&#256;</l:l>
+      <l:l i="10">&#257;</l:l>
+      <l:l i="10">&#258;</l:l>
+      <l:l i="10">&#259;</l:l>
+      <l:l i="10">&#260;</l:l>
+      <l:l i="10">&#261;</l:l>
+      <l:l i="10">&#461;</l:l>
+      <l:l i="10">&#462;</l:l>
+      <l:l i="10">&#478;</l:l>
+      <l:l i="10">&#479;</l:l>
+      <l:l i="10">&#480;</l:l>
+      <l:l i="10">&#481;</l:l>
+      <l:l i="10">&#506;</l:l>
+      <l:l i="10">&#507;</l:l>
+      <l:l i="10">&#512;</l:l>
+      <l:l i="10">&#513;</l:l>
+      <l:l i="10">&#514;</l:l>
+      <l:l i="10">&#515;</l:l>
+      <l:l i="10">&#550;</l:l>
+      <l:l i="10">&#551;</l:l>
+      <l:l i="10">&#7680;</l:l>
+      <l:l i="10">&#7681;</l:l>
+      <l:l i="10">&#7834;</l:l>
+      <l:l i="10">&#7840;</l:l>
+      <l:l i="10">&#7841;</l:l>
+      <l:l i="10">&#7842;</l:l>
+      <l:l i="10">&#7843;</l:l>
+      <l:l i="10">&#7844;</l:l>
+      <l:l i="10">&#7845;</l:l>
+      <l:l i="10">&#7846;</l:l>
+      <l:l i="10">&#7847;</l:l>
+      <l:l i="10">&#7848;</l:l>
+      <l:l i="10">&#7849;</l:l>
+      <l:l i="10">&#7850;</l:l>
+      <l:l i="10">&#7851;</l:l>
+      <l:l i="10">&#7852;</l:l>
+      <l:l i="10">&#7853;</l:l>
+      <l:l i="10">&#7854;</l:l>
+      <l:l i="10">&#7855;</l:l>
+      <l:l i="10">&#7856;</l:l>
+      <l:l i="10">&#7857;</l:l>
+      <l:l i="10">&#7858;</l:l>
+      <l:l i="10">&#7859;</l:l>
+      <l:l i="10">&#7860;</l:l>
+      <l:l i="10">&#7861;</l:l>
+      <l:l i="10">&#7862;</l:l>
+      <l:l i="10">&#7863;</l:l>
+      <l:l i="20">B</l:l>
+      <l:l i="20">b</l:l>
+      <l:l i="20">&#384;</l:l>
+      <l:l i="20">&#385;</l:l>
+      <l:l i="20">&#595;</l:l>
+      <l:l i="20">&#386;</l:l>
+      <l:l i="20">&#387;</l:l>
+      <l:l i="20">&#7682;</l:l>
+      <l:l i="20">&#7683;</l:l>
+      <l:l i="20">&#7684;</l:l>
+      <l:l i="20">&#7685;</l:l>
+      <l:l i="20">&#7686;</l:l>
+      <l:l i="20">&#7687;</l:l>
+      <l:l i="30">C</l:l>
+      <l:l i="30">c</l:l>
+      <l:l i="30">&#199;</l:l>
+      <l:l i="30">&#231;</l:l>
+      <l:l i="30">&#262;</l:l>
+      <l:l i="30">&#263;</l:l>
+      <l:l i="30">&#264;</l:l>
+      <l:l i="30">&#265;</l:l>
+      <l:l i="30">&#266;</l:l>
+      <l:l i="30">&#267;</l:l>
+      <l:l i="30">&#268;</l:l>
+      <l:l i="30">&#269;</l:l>
+      <l:l i="30">&#391;</l:l>
+      <l:l i="30">&#392;</l:l>
+      <l:l i="30">&#597;</l:l>
+      <l:l i="30">&#7688;</l:l>
+      <l:l i="30">&#7689;</l:l>
+      <l:l i="40">D</l:l>
+      <l:l i="40">d</l:l>
+      <l:l i="40">&#270;</l:l>
+      <l:l i="40">&#271;</l:l>
+      <l:l i="40">&#272;</l:l>
+      <l:l i="40">&#273;</l:l>
+      <l:l i="40">&#394;</l:l>
+      <l:l i="40">&#599;</l:l>
+      <l:l i="40">&#395;</l:l>
+      <l:l i="40">&#396;</l:l>
+      <l:l i="40">&#453;</l:l>
+      <l:l i="40">&#498;</l:l>
+      <l:l i="40">&#545;</l:l>
+      <l:l i="40">&#598;</l:l>
+      <l:l i="40">&#7690;</l:l>
+      <l:l i="40">&#7691;</l:l>
+      <l:l i="40">&#7692;</l:l>
+      <l:l i="40">&#7693;</l:l>
+      <l:l i="40">&#7694;</l:l>
+      <l:l i="40">&#7695;</l:l>
+      <l:l i="40">&#7696;</l:l>
+      <l:l i="40">&#7697;</l:l>
+      <l:l i="40">&#7698;</l:l>
+      <l:l i="40">&#7699;</l:l>
+      <l:l i="50">E</l:l>
+      <l:l i="50">e</l:l>
+      <l:l i="50">&#200;</l:l>
+      <l:l i="50">&#232;</l:l>
+      <l:l i="50">&#201;</l:l>
+      <l:l i="50">&#233;</l:l>
+      <l:l i="50">&#202;</l:l>
+      <l:l i="50">&#234;</l:l>
+      <l:l i="50">&#203;</l:l>
+      <l:l i="50">&#235;</l:l>
+      <l:l i="50">&#274;</l:l>
+      <l:l i="50">&#275;</l:l>
+      <l:l i="50">&#276;</l:l>
+      <l:l i="50">&#277;</l:l>
+      <l:l i="50">&#278;</l:l>
+      <l:l i="50">&#279;</l:l>
+      <l:l i="50">&#280;</l:l>
+      <l:l i="50">&#281;</l:l>
+      <l:l i="50">&#282;</l:l>
+      <l:l i="50">&#283;</l:l>
+      <l:l i="50">&#516;</l:l>
+      <l:l i="50">&#517;</l:l>
+      <l:l i="50">&#518;</l:l>
+      <l:l i="50">&#519;</l:l>
+      <l:l i="50">&#552;</l:l>
+      <l:l i="50">&#553;</l:l>
+      <l:l i="50">&#7700;</l:l>
+      <l:l i="50">&#7701;</l:l>
+      <l:l i="50">&#7702;</l:l>
+      <l:l i="50">&#7703;</l:l>
+      <l:l i="50">&#7704;</l:l>
+      <l:l i="50">&#7705;</l:l>
+      <l:l i="50">&#7706;</l:l>
+      <l:l i="50">&#7707;</l:l>
+      <l:l i="50">&#7708;</l:l>
+      <l:l i="50">&#7709;</l:l>
+      <l:l i="50">&#7864;</l:l>
+      <l:l i="50">&#7865;</l:l>
+      <l:l i="50">&#7866;</l:l>
+      <l:l i="50">&#7867;</l:l>
+      <l:l i="50">&#7868;</l:l>
+      <l:l i="50">&#7869;</l:l>
+      <l:l i="50">&#7870;</l:l>
+      <l:l i="50">&#7871;</l:l>
+      <l:l i="50">&#7872;</l:l>
+      <l:l i="50">&#7873;</l:l>
+      <l:l i="50">&#7874;</l:l>
+      <l:l i="50">&#7875;</l:l>
+      <l:l i="50">&#7876;</l:l>
+      <l:l i="50">&#7877;</l:l>
+      <l:l i="50">&#7878;</l:l>
+      <l:l i="50">&#7879;</l:l>
+      <l:l i="60">F</l:l>
+      <l:l i="60">f</l:l>
+      <l:l i="60">&#401;</l:l>
+      <l:l i="60">&#402;</l:l>
+      <l:l i="60">&#7710;</l:l>
+      <l:l i="60">&#7711;</l:l>
+      <l:l i="70">G</l:l>
+      <l:l i="70">g</l:l>
+      <l:l i="70">&#284;</l:l>
+      <l:l i="70">&#285;</l:l>
+      <l:l i="70">&#286;</l:l>
+      <l:l i="70">&#287;</l:l>
+      <l:l i="70">&#288;</l:l>
+      <l:l i="70">&#289;</l:l>
+      <l:l i="70">&#290;</l:l>
+      <l:l i="70">&#291;</l:l>
+      <l:l i="70">&#403;</l:l>
+      <l:l i="70">&#608;</l:l>
+      <l:l i="70">&#484;</l:l>
+      <l:l i="70">&#485;</l:l>
+      <l:l i="70">&#486;</l:l>
+      <l:l i="70">&#487;</l:l>
+      <l:l i="70">&#500;</l:l>
+      <l:l i="70">&#501;</l:l>
+      <l:l i="70">&#7712;</l:l>
+      <l:l i="70">&#7713;</l:l>
+      <l:l i="80">H</l:l>
+      <l:l i="80">h</l:l>
+      <l:l i="80">&#292;</l:l>
+      <l:l i="80">&#293;</l:l>
+      <l:l i="80">&#294;</l:l>
+      <l:l i="80">&#295;</l:l>
+      <l:l i="80">&#542;</l:l>
+      <l:l i="80">&#543;</l:l>
+      <l:l i="80">&#614;</l:l>
+      <l:l i="80">&#7714;</l:l>
+      <l:l i="80">&#7715;</l:l>
+      <l:l i="80">&#7716;</l:l>
+      <l:l i="80">&#7717;</l:l>
+      <l:l i="80">&#7718;</l:l>
+      <l:l i="80">&#7719;</l:l>
+      <l:l i="80">&#7720;</l:l>
+      <l:l i="80">&#7721;</l:l>
+      <l:l i="80">&#7722;</l:l>
+      <l:l i="80">&#7723;</l:l>
+      <l:l i="80">&#7830;</l:l>
+      <l:l i="90">I</l:l>
+      <l:l i="90">i</l:l>
+      <l:l i="90">&#204;</l:l>
+      <l:l i="90">&#236;</l:l>
+      <l:l i="90">&#205;</l:l>
+      <l:l i="90">&#237;</l:l>
+      <l:l i="90">&#206;</l:l>
+      <l:l i="90">&#238;</l:l>
+      <l:l i="90">&#207;</l:l>
+      <l:l i="90">&#239;</l:l>
+      <l:l i="90">&#296;</l:l>
+      <l:l i="90">&#297;</l:l>
+      <l:l i="90">&#298;</l:l>
+      <l:l i="90">&#299;</l:l>
+      <l:l i="90">&#300;</l:l>
+      <l:l i="90">&#301;</l:l>
+      <l:l i="90">&#302;</l:l>
+      <l:l i="90">&#303;</l:l>
+      <l:l i="90">&#304;</l:l>
+      <l:l i="90">&#407;</l:l>
+      <l:l i="90">&#616;</l:l>
+      <l:l i="90">&#463;</l:l>
+      <l:l i="90">&#464;</l:l>
+      <l:l i="90">&#520;</l:l>
+      <l:l i="90">&#521;</l:l>
+      <l:l i="90">&#522;</l:l>
+      <l:l i="90">&#523;</l:l>
+      <l:l i="90">&#7724;</l:l>
+      <l:l i="90">&#7725;</l:l>
+      <l:l i="90">&#7726;</l:l>
+      <l:l i="90">&#7727;</l:l>
+      <l:l i="90">&#7880;</l:l>
+      <l:l i="90">&#7881;</l:l>
+      <l:l i="90">&#7882;</l:l>
+      <l:l i="90">&#7883;</l:l>
+      <l:l i="100">J</l:l>
+      <l:l i="100">j</l:l>
+      <l:l i="100">&#308;</l:l>
+      <l:l i="100">&#309;</l:l>
+      <l:l i="100">&#496;</l:l>
+      <l:l i="100">&#669;</l:l>
+      <l:l i="110">K</l:l>
+      <l:l i="110">k</l:l>
+      <l:l i="110">&#310;</l:l>
+      <l:l i="110">&#311;</l:l>
+      <l:l i="110">&#408;</l:l>
+      <l:l i="110">&#409;</l:l>
+      <l:l i="110">&#488;</l:l>
+      <l:l i="110">&#489;</l:l>
+      <l:l i="110">&#7728;</l:l>
+      <l:l i="110">&#7729;</l:l>
+      <l:l i="110">&#7730;</l:l>
+      <l:l i="110">&#7731;</l:l>
+      <l:l i="110">&#7732;</l:l>
+      <l:l i="110">&#7733;</l:l>
+      <l:l i="120">L</l:l>
+      <l:l i="120">l</l:l>
+      <l:l i="120">&#313;</l:l>
+      <l:l i="120">&#314;</l:l>
+      <l:l i="120">&#315;</l:l>
+      <l:l i="120">&#316;</l:l>
+      <l:l i="120">&#317;</l:l>
+      <l:l i="120">&#318;</l:l>
+      <l:l i="120">&#319;</l:l>
+      <l:l i="120">&#320;</l:l>
+      <l:l i="120">&#321;</l:l>
+      <l:l i="120">&#322;</l:l>
+      <l:l i="120">&#410;</l:l>
+      <l:l i="120">&#456;</l:l>
+      <l:l i="120">&#564;</l:l>
+      <l:l i="120">&#619;</l:l>
+      <l:l i="120">&#620;</l:l>
+      <l:l i="120">&#621;</l:l>
+      <l:l i="120">&#7734;</l:l>
+      <l:l i="120">&#7735;</l:l>
+      <l:l i="120">&#7736;</l:l>
+      <l:l i="120">&#7737;</l:l>
+      <l:l i="120">&#7738;</l:l>
+      <l:l i="120">&#7739;</l:l>
+      <l:l i="120">&#7740;</l:l>
+      <l:l i="120">&#7741;</l:l>
+      <l:l i="130">M</l:l>
+      <l:l i="130">m</l:l>
+      <l:l i="130">&#625;</l:l>
+      <l:l i="130">&#7742;</l:l>
+      <l:l i="130">&#7743;</l:l>
+      <l:l i="130">&#7744;</l:l>
+      <l:l i="130">&#7745;</l:l>
+      <l:l i="130">&#7746;</l:l>
+      <l:l i="130">&#7747;</l:l>
+      <l:l i="140">N</l:l>
+      <l:l i="140">n</l:l>
+      <l:l i="140">&#209;</l:l>
+      <l:l i="140">&#241;</l:l>
+      <l:l i="140">&#323;</l:l>
+      <l:l i="140">&#324;</l:l>
+      <l:l i="140">&#325;</l:l>
+      <l:l i="140">&#326;</l:l>
+      <l:l i="140">&#327;</l:l>
+      <l:l i="140">&#328;</l:l>
+      <l:l i="140">&#413;</l:l>
+      <l:l i="140">&#626;</l:l>
+      <l:l i="140">&#414;</l:l>
+      <l:l i="140">&#544;</l:l>
+      <l:l i="140">&#459;</l:l>
+      <l:l i="140">&#504;</l:l>
+      <l:l i="140">&#505;</l:l>
+      <l:l i="140">&#565;</l:l>
+      <l:l i="140">&#627;</l:l>
+      <l:l i="140">&#7748;</l:l>
+      <l:l i="140">&#7749;</l:l>
+      <l:l i="140">&#7750;</l:l>
+      <l:l i="140">&#7751;</l:l>
+      <l:l i="140">&#7752;</l:l>
+      <l:l i="140">&#7753;</l:l>
+      <l:l i="140">&#7754;</l:l>
+      <l:l i="140">&#7755;</l:l>
+      <l:l i="150">O</l:l>
+      <l:l i="150">o</l:l>
+      <l:l i="150">&#210;</l:l>
+      <l:l i="150">&#242;</l:l>
+      <l:l i="150">&#211;</l:l>
+      <l:l i="150">&#243;</l:l>
+      <l:l i="150">&#212;</l:l>
+      <l:l i="150">&#244;</l:l>
+      <l:l i="150">&#213;</l:l>
+      <l:l i="150">&#245;</l:l>
+      <l:l i="150">&#214;</l:l>
+      <l:l i="150">&#246;</l:l>
+      <l:l i="150">&#216;</l:l>
+      <l:l i="150">&#248;</l:l>
+      <l:l i="150">&#332;</l:l>
+      <l:l i="150">&#333;</l:l>
+      <l:l i="150">&#334;</l:l>
+      <l:l i="150">&#335;</l:l>
+      <l:l i="150">&#336;</l:l>
+      <l:l i="150">&#337;</l:l>
+      <l:l i="150">&#415;</l:l>
+      <l:l i="150">&#416;</l:l>
+      <l:l i="150">&#417;</l:l>
+      <l:l i="150">&#465;</l:l>
+      <l:l i="150">&#466;</l:l>
+      <l:l i="150">&#490;</l:l>
+      <l:l i="150">&#491;</l:l>
+      <l:l i="150">&#492;</l:l>
+      <l:l i="150">&#493;</l:l>
+      <l:l i="150">&#510;</l:l>
+      <l:l i="150">&#511;</l:l>
+      <l:l i="150">&#524;</l:l>
+      <l:l i="150">&#525;</l:l>
+      <l:l i="150">&#526;</l:l>
+      <l:l i="150">&#527;</l:l>
+      <l:l i="150">&#554;</l:l>
+      <l:l i="150">&#555;</l:l>
+      <l:l i="150">&#556;</l:l>
+      <l:l i="150">&#557;</l:l>
+      <l:l i="150">&#558;</l:l>
+      <l:l i="150">&#559;</l:l>
+      <l:l i="150">&#560;</l:l>
+      <l:l i="150">&#561;</l:l>
+      <l:l i="150">&#7756;</l:l>
+      <l:l i="150">&#7757;</l:l>
+      <l:l i="150">&#7758;</l:l>
+      <l:l i="150">&#7759;</l:l>
+      <l:l i="150">&#7760;</l:l>
+      <l:l i="150">&#7761;</l:l>
+      <l:l i="150">&#7762;</l:l>
+      <l:l i="150">&#7763;</l:l>
+      <l:l i="150">&#7884;</l:l>
+      <l:l i="150">&#7885;</l:l>
+      <l:l i="150">&#7886;</l:l>
+      <l:l i="150">&#7887;</l:l>
+      <l:l i="150">&#7888;</l:l>
+      <l:l i="150">&#7889;</l:l>
+      <l:l i="150">&#7890;</l:l>
+      <l:l i="150">&#7891;</l:l>
+      <l:l i="150">&#7892;</l:l>
+      <l:l i="150">&#7893;</l:l>
+      <l:l i="150">&#7894;</l:l>
+      <l:l i="150">&#7895;</l:l>
+      <l:l i="150">&#7896;</l:l>
+      <l:l i="150">&#7897;</l:l>
+      <l:l i="150">&#7898;</l:l>
+      <l:l i="150">&#7899;</l:l>
+      <l:l i="150">&#7900;</l:l>
+      <l:l i="150">&#7901;</l:l>
+      <l:l i="150">&#7902;</l:l>
+      <l:l i="150">&#7903;</l:l>
+      <l:l i="150">&#7904;</l:l>
+      <l:l i="150">&#7905;</l:l>
+      <l:l i="150">&#7906;</l:l>
+      <l:l i="150">&#7907;</l:l>
+      <l:l i="160">P</l:l>
+      <l:l i="160">p</l:l>
+      <l:l i="160">&#420;</l:l>
+      <l:l i="160">&#421;</l:l>
+      <l:l i="160">&#7764;</l:l>
+      <l:l i="160">&#7765;</l:l>
+      <l:l i="160">&#7766;</l:l>
+      <l:l i="160">&#7767;</l:l>
+      <l:l i="170">Q</l:l>
+      <l:l i="170">q</l:l>
+      <l:l i="170">&#672;</l:l>
+      <l:l i="180">R</l:l>
+      <l:l i="180">r</l:l>
+      <l:l i="180">&#340;</l:l>
+      <l:l i="180">&#341;</l:l>
+      <l:l i="180">&#342;</l:l>
+      <l:l i="180">&#343;</l:l>
+      <l:l i="180">&#344;</l:l>
+      <l:l i="180">&#345;</l:l>
+      <l:l i="180">&#528;</l:l>
+      <l:l i="180">&#529;</l:l>
+      <l:l i="180">&#530;</l:l>
+      <l:l i="180">&#531;</l:l>
+      <l:l i="180">&#636;</l:l>
+      <l:l i="180">&#637;</l:l>
+      <l:l i="180">&#638;</l:l>
+      <l:l i="180">&#7768;</l:l>
+      <l:l i="180">&#7769;</l:l>
+      <l:l i="180">&#7770;</l:l>
+      <l:l i="180">&#7771;</l:l>
+      <l:l i="180">&#7772;</l:l>
+      <l:l i="180">&#7773;</l:l>
+      <l:l i="180">&#7774;</l:l>
+      <l:l i="180">&#7775;</l:l>
+      <l:l i="190">S</l:l>
+      <l:l i="190">s</l:l>
+      <l:l i="190">&#346;</l:l>
+      <l:l i="190">&#347;</l:l>
+      <l:l i="190">&#348;</l:l>
+      <l:l i="190">&#349;</l:l>
+      <l:l i="190">&#350;</l:l>
+      <l:l i="190">&#351;</l:l>
+      <l:l i="190">&#352;</l:l>
+      <l:l i="190">&#353;</l:l>
+      <l:l i="190">&#536;</l:l>
+      <l:l i="190">&#537;</l:l>
+      <l:l i="190">&#642;</l:l>
+      <l:l i="190">&#7776;</l:l>
+      <l:l i="190">&#7777;</l:l>
+      <l:l i="190">&#7778;</l:l>
+      <l:l i="190">&#7779;</l:l>
+      <l:l i="190">&#7780;</l:l>
+      <l:l i="190">&#7781;</l:l>
+      <l:l i="190">&#7782;</l:l>
+      <l:l i="190">&#7783;</l:l>
+      <l:l i="190">&#7784;</l:l>
+      <l:l i="190">&#7785;</l:l>
+      <l:l i="200">T</l:l>
+      <l:l i="200">t</l:l>
+      <l:l i="200">&#354;</l:l>
+      <l:l i="200">&#355;</l:l>
+      <l:l i="200">&#356;</l:l>
+      <l:l i="200">&#357;</l:l>
+      <l:l i="200">&#358;</l:l>
+      <l:l i="200">&#359;</l:l>
+      <l:l i="200">&#427;</l:l>
+      <l:l i="200">&#428;</l:l>
+      <l:l i="200">&#429;</l:l>
+      <l:l i="200">&#430;</l:l>
+      <l:l i="200">&#648;</l:l>
+      <l:l i="200">&#538;</l:l>
+      <l:l i="200">&#539;</l:l>
+      <l:l i="200">&#566;</l:l>
+      <l:l i="200">&#7786;</l:l>
+      <l:l i="200">&#7787;</l:l>
+      <l:l i="200">&#7788;</l:l>
+      <l:l i="200">&#7789;</l:l>
+      <l:l i="200">&#7790;</l:l>
+      <l:l i="200">&#7791;</l:l>
+      <l:l i="200">&#7792;</l:l>
+      <l:l i="200">&#7793;</l:l>
+      <l:l i="200">&#7831;</l:l>
+      <l:l i="210">U</l:l>
+      <l:l i="210">u</l:l>
+      <l:l i="210">&#217;</l:l>
+      <l:l i="210">&#249;</l:l>
+      <l:l i="210">&#218;</l:l>
+      <l:l i="210">&#250;</l:l>
+      <l:l i="210">&#219;</l:l>
+      <l:l i="210">&#251;</l:l>
+      <l:l i="210">&#220;</l:l>
+      <l:l i="210">&#252;</l:l>
+      <l:l i="210">&#360;</l:l>
+      <l:l i="210">&#361;</l:l>
+      <l:l i="210">&#362;</l:l>
+      <l:l i="210">&#363;</l:l>
+      <l:l i="210">&#364;</l:l>
+      <l:l i="210">&#365;</l:l>
+      <l:l i="210">&#366;</l:l>
+      <l:l i="210">&#367;</l:l>
+      <l:l i="210">&#368;</l:l>
+      <l:l i="210">&#369;</l:l>
+      <l:l i="210">&#370;</l:l>
+      <l:l i="210">&#371;</l:l>
+      <l:l i="210">&#431;</l:l>
+      <l:l i="210">&#432;</l:l>
+      <l:l i="210">&#467;</l:l>
+      <l:l i="210">&#468;</l:l>
+      <l:l i="210">&#469;</l:l>
+      <l:l i="210">&#470;</l:l>
+      <l:l i="210">&#471;</l:l>
+      <l:l i="210">&#472;</l:l>
+      <l:l i="210">&#473;</l:l>
+      <l:l i="210">&#474;</l:l>
+      <l:l i="210">&#475;</l:l>
+      <l:l i="210">&#476;</l:l>
+      <l:l i="210">&#532;</l:l>
+      <l:l i="210">&#533;</l:l>
+      <l:l i="210">&#534;</l:l>
+      <l:l i="210">&#535;</l:l>
+      <l:l i="210">&#7794;</l:l>
+      <l:l i="210">&#7795;</l:l>
+      <l:l i="210">&#7796;</l:l>
+      <l:l i="210">&#7797;</l:l>
+      <l:l i="210">&#7798;</l:l>
+      <l:l i="210">&#7799;</l:l>
+      <l:l i="210">&#7800;</l:l>
+      <l:l i="210">&#7801;</l:l>
+      <l:l i="210">&#7802;</l:l>
+      <l:l i="210">&#7803;</l:l>
+      <l:l i="210">&#7908;</l:l>
+      <l:l i="210">&#7909;</l:l>
+      <l:l i="210">&#7910;</l:l>
+      <l:l i="210">&#7911;</l:l>
+      <l:l i="210">&#7912;</l:l>
+      <l:l i="210">&#7913;</l:l>
+      <l:l i="210">&#7914;</l:l>
+      <l:l i="210">&#7915;</l:l>
+      <l:l i="210">&#7916;</l:l>
+      <l:l i="210">&#7917;</l:l>
+      <l:l i="210">&#7918;</l:l>
+      <l:l i="210">&#7919;</l:l>
+      <l:l i="210">&#7920;</l:l>
+      <l:l i="210">&#7921;</l:l>
+      <l:l i="220">V</l:l>
+      <l:l i="220">v</l:l>
+      <l:l i="220">&#434;</l:l>
+      <l:l i="220">&#651;</l:l>
+      <l:l i="220">&#7804;</l:l>
+      <l:l i="220">&#7805;</l:l>
+      <l:l i="220">&#7806;</l:l>
+      <l:l i="220">&#7807;</l:l>
+      <l:l i="230">W</l:l>
+      <l:l i="230">w</l:l>
+      <l:l i="230">&#372;</l:l>
+      <l:l i="230">&#373;</l:l>
+      <l:l i="230">&#7808;</l:l>
+      <l:l i="230">&#7809;</l:l>
+      <l:l i="230">&#7810;</l:l>
+      <l:l i="230">&#7811;</l:l>
+      <l:l i="230">&#7812;</l:l>
+      <l:l i="230">&#7813;</l:l>
+      <l:l i="230">&#7814;</l:l>
+      <l:l i="230">&#7815;</l:l>
+      <l:l i="230">&#7816;</l:l>
+      <l:l i="230">&#7817;</l:l>
+      <l:l i="230">&#7832;</l:l>
+      <l:l i="240">X</l:l>
+      <l:l i="240">x</l:l>
+      <l:l i="240">&#7818;</l:l>
+      <l:l i="240">&#7819;</l:l>
+      <l:l i="240">&#7820;</l:l>
+      <l:l i="240">&#7821;</l:l>
+      <l:l i="250">Y</l:l>
+      <l:l i="250">y</l:l>
+      <l:l i="250">&#221;</l:l>
+      <l:l i="250">&#253;</l:l>
+      <l:l i="250">&#255;</l:l>
+      <l:l i="250">&#376;</l:l>
+      <l:l i="250">&#374;</l:l>
+      <l:l i="250">&#375;</l:l>
+      <l:l i="250">&#435;</l:l>
+      <l:l i="250">&#436;</l:l>
+      <l:l i="250">&#562;</l:l>
+      <l:l i="250">&#563;</l:l>
+      <l:l i="250">&#7822;</l:l>
+      <l:l i="250">&#7823;</l:l>
+      <l:l i="250">&#7833;</l:l>
+      <l:l i="250">&#7922;</l:l>
+      <l:l i="250">&#7923;</l:l>
+      <l:l i="250">&#7924;</l:l>
+      <l:l i="250">&#7925;</l:l>
+      <l:l i="250">&#7926;</l:l>
+      <l:l i="250">&#7927;</l:l>
+      <l:l i="250">&#7928;</l:l>
+      <l:l i="250">&#7929;</l:l>
+      <l:l i="260">Z</l:l>
+      <l:l i="260">z</l:l>
+      <l:l i="260">&#377;</l:l>
+      <l:l i="260">&#378;</l:l>
+      <l:l i="260">&#379;</l:l>
+      <l:l i="260">&#380;</l:l>
+      <l:l i="260">&#381;</l:l>
+      <l:l i="260">&#382;</l:l>
+      <l:l i="260">&#437;</l:l>
+      <l:l i="260">&#438;</l:l>
+      <l:l i="260">&#548;</l:l>
+      <l:l i="260">&#549;</l:l>
+      <l:l i="260">&#656;</l:l>
+      <l:l i="260">&#657;</l:l>
+      <l:l i="260">&#7824;</l:l>
+      <l:l i="260">&#7825;</l:l>
+      <l:l i="260">&#7826;</l:l>
+      <l:l i="260">&#7827;</l:l>
+      <l:l i="260">&#7828;</l:l>
+      <l:l i="260">&#7829;</l:l>
+   </l:letters>
+</l:l10n>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/no.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/no.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/no.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1153 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="no" english-language-name="Norwegian">
+
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+   <l:gentext key="Abstract" text="Abstract"/>
+   <l:gentext key="abstract" text="Abstract"/>
+   <l:gentext key="Answer" text="A:"/>
+   <l:gentext key="answer" text="A:"/>
+   <l:gentext key="Appendix" text="Tillegg"/>
+   <l:gentext key="appendix" text="Tillegg"/>
+   <l:gentext key="Article" text="Article"/>
+   <l:gentext key="article" text="Article"/>
+   <l:gentext key="Bibliography" text="Bibliografi"/>
+   <l:gentext key="bibliography" text="Bibliografi"/>
+   <l:gentext key="Book" text="Book"/>
+   <l:gentext key="book" text="Book"/>
+   <l:gentext key="CAUTION" text="OBS"/>
+   <l:gentext key="Caution" text="Obs"/>
+   <l:gentext key="caution" text="Obs"/>
+   <l:gentext key="Chapter" text="Kapittel"/>
+   <l:gentext key="chapter" text="Kapittel"/>
+   <l:gentext key="Colophon" text="Colophon"/>
+   <l:gentext key="colophon" text="Colophon"/>
+   <l:gentext key="Copyright" text="Copyright"/>
+   <l:gentext key="copyright" text="Copyright"/>
+   <l:gentext key="Dedication" text="Dedikasjon"/>
+   <l:gentext key="dedication" text="Dedikasjon"/>
+   <l:gentext key="Edition" text="Edition"/>
+   <l:gentext key="edition" text="Edition"/>
+   <l:gentext key="Equation" text="Formel"/>
+   <l:gentext key="equation" text="Formel"/>
+   <l:gentext key="Example" text="Eksempel"/>
+   <l:gentext key="example" text="Eksempel"/>
+   <l:gentext key="Figure" text="Figur"/>
+   <l:gentext key="figure" text="Figur"/>
+   <l:gentext key="Glossary" text="Ordliste"/>
+   <l:gentext key="glossary" text="Ordliste"/>
+   <l:gentext key="GlossSee" text="Se"/>
+   <l:gentext key="glosssee" text="Se"/>
+   <l:gentext key="GlossSeeAlso" text="Se Ogs&#229;"/>
+   <l:gentext key="glossseealso" text="Se Ogs&#229;"/>
+   <l:gentext key="IMPORTANT" text="VIKTIG"/>
+   <l:gentext key="important" text="Viktig"/>
+   <l:gentext key="Important" text="Viktig"/>
+   <l:gentext key="Index" text="Indeks"/>
+   <l:gentext key="index" text="Indeks"/>
+   <l:gentext key="ISBN" text="ISBN"/>
+   <l:gentext key="isbn" text="ISBN"/>
+   <l:gentext key="LegalNotice" text="Legal Notice"/>
+   <l:gentext key="legalnotice" text="Legal Notice"/>
+   <l:gentext key="MsgAud" text="Publikum"/>
+   <l:gentext key="msgaud" text="Publikum"/>
+   <l:gentext key="MsgLevel" text="Niv&#229;"/>
+   <l:gentext key="msglevel" text="Niv&#229;"/>
+   <l:gentext key="MsgOrig" text="Opphav"/>
+   <l:gentext key="msgorig" text="Opphav"/>
+   <l:gentext key="NOTE" text="NOTAT"/>
+   <l:gentext key="Note" text="Notat"/>
+   <l:gentext key="note" text="Notat"/>
+   <l:gentext key="Part" text="Del"/>
+   <l:gentext key="part" text="Del"/>
+   <l:gentext key="Preface" text="Forord"/>
+   <l:gentext key="preface" text="Forord"/>
+   <l:gentext key="Procedure" text="Prosedyre"/>
+   <l:gentext key="procedure" text="Prosedyre"/>
+   <l:gentext key="ProductionSet" text="Production"/>
+   <l:gentext key="PubDate" text="Publication Date" lang="en"/>
+   <l:gentext key="pubdate" text="Publication date" lang="en"/>
+   <l:gentext key="Published" text="Published"/>
+   <l:gentext key="published" text="Published"/>
+   <l:gentext key="Qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="Question" text="Q:"/>
+   <l:gentext key="question" text="Q:"/>
+   <l:gentext key="RefEntry" text=""/>
+   <l:gentext key="refentry" text=""/>
+   <l:gentext key="Reference" text="Referanse"/>
+   <l:gentext key="reference" text="Referanse"/>
+   <l:gentext key="RefName" text="Navn"/>
+   <l:gentext key="refname" text="Navn"/>
+   <l:gentext key="RefSection" text=""/>
+   <l:gentext key="refsection" text=""/>
+   <l:gentext key="RefSynopsisDiv" text="Synopsis"/>
+   <l:gentext key="refsynopsisdiv" text="Synopsis"/>
+   <l:gentext key="RevHistory" text="Revisjonshistorie"/>
+   <l:gentext key="revhistory" text="Revisjonshistorie"/>
+   <l:gentext key="revision" text="Revisjon"/>
+   <l:gentext key="Revision" text="Revisjon"/>
+   <l:gentext key="sect1" text="Section"/>
+   <l:gentext key="sect2" text="Section"/>
+   <l:gentext key="sect3" text="Section"/>
+   <l:gentext key="sect4" text="Section"/>
+   <l:gentext key="sect5" text="Section"/>
+   <l:gentext key="section" text="seksjon"/>
+   <l:gentext key="Section" text="Seksjon"/>
+   <l:gentext key="see" text="Se"/>
+   <l:gentext key="See" text="Se"/>
+   <l:gentext key="seealso" text="Se Ogs&#229;"/>
+   <l:gentext key="Seealso" text="Se ogs&#229;"/>
+   <l:gentext key="SeeAlso" text="Se Ogs&#229;"/>
+   <l:gentext key="set" text="Set"/>
+   <l:gentext key="Set" text="Set"/>
+   <l:gentext key="setindex" text="Indeks"/>
+   <l:gentext key="SetIndex" text="Indeks"/>
+   <l:gentext key="Sidebar" text=""/>
+   <l:gentext key="sidebar" text="sidebar"/>
+   <l:gentext key="step" text="steg"/>
+   <l:gentext key="Step" text="Steg"/>
+   <l:gentext key="Table" text="Tabell"/>
+   <l:gentext key="table" text="Tabell"/>
+   <l:gentext key="tip" text="Tips"/>
+   <l:gentext key="TIP" text="TIPS"/>
+   <l:gentext key="Tip" text="Tips"/>
+   <l:gentext key="Warning" text="Advarsel"/>
+   <l:gentext key="warning" text="Advarsel"/>
+   <l:gentext key="WARNING" text="ADVARSEL"/>
+   <l:gentext key="and" text="og"/>
+   <l:gentext key="by" text="av"/>
+   <l:gentext key="called" text="called" lang="en"/>
+   <l:gentext key="Edited" text="Redigert"/>
+   <l:gentext key="edited" text="Redigert"/>
+   <l:gentext key="Editedby" text="Redigert av"/>
+   <l:gentext key="editedby" text="Redigert av"/>
+   <l:gentext key="in" text="i"/>
+   <l:gentext key="lastlistcomma" text=","/>
+   <l:gentext key="listcomma" text=","/>
+   <l:gentext key="nonexistantelement" text="ikke-eksisterende element"/>
+   <l:gentext key="notes" text="Sluttnotater"/>
+   <l:gentext key="Notes" text="Sluttnotater"/>
+   <l:gentext key="Pgs" text="Sdr."/>
+   <l:gentext key="pgs" text="Sdr."/>
+   <l:gentext key="Revisedby" text="Revised by: "/>
+   <l:gentext key="revisedby" text="Revised by: "/>
+   <l:gentext key="TableNotes" text="Notater"/>
+   <l:gentext key="tablenotes" text="Notater"/>
+   <l:gentext key="TableofContents" text="Innholdsfortegnelse"/>
+   <l:gentext key="tableofcontents" text="Innholdsfortegnelse"/>
+   <l:gentext key="the" text="" lang="en"/>
+   <l:gentext key="unexpectedelementname" text="UVENTET-ELEMENTNAVN"/>
+   <l:gentext key="unsupported" text="ikke st&#248;ttet"/>
+   <l:gentext key="xrefto" text="xref til"/>
+   <l:gentext key="listofequations" text="Formeloversikt"/>
+   <l:gentext key="ListofEquations" text="Formeloversikt"/>
+   <l:gentext key="ListofExamples" text="Eksempeloversikt"/>
+   <l:gentext key="listofexamples" text="Eksempeloversikt"/>
+   <l:gentext key="ListofFigures" text="Figuroversikt"/>
+   <l:gentext key="listoffigures" text="Figuroversikt"/>
+   <l:gentext key="ListofProcedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listofprocedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listoftables" text="Tabelloversikt"/>
+   <l:gentext key="ListofTables" text="Tabelloversikt"/>
+   <l:gentext key="ListofUnknown" text="???-oversikt"/>
+   <l:gentext key="listofunknown" text="???-oversikt"/>
+   <l:gentext key="nav-home" text="Hjem"/>
+   <l:gentext key="nav-next" text="Neste"/>
+   <l:gentext key="nav-next-sibling" text="Raskt Fremover"/>
+   <l:gentext key="nav-prev" text="Forrige"/>
+   <l:gentext key="nav-prev-sibling" text="Raskt Bakover"/>
+   <l:gentext key="nav-up" text="Opp"/>
+   <l:gentext key="nav-toc" text="ToC" lang="en"/>
+   <l:gentext key="Draft" text="Draft"/>
+   <l:gentext key="above" text="above"/>
+   <l:gentext key="below" text="below"/>
+   <l:gentext key="sectioncalled" text="the section called"/>
+   <l:gentext key="index symbols" text="Symbols"/>
+   <l:gentext key="lowercase.alpha" text="abcdefghijklmnopqrstuvwxyz"/>
+   <l:gentext key="uppercase.alpha" text="ABCDEFGHIJKLMNOPQRSTUVWXYZ"/>
+   <l:dingbat key="startquote" text="&#8220;"/>
+   <l:dingbat key="endquote" text="&#8221;"/>
+   <l:dingbat key="nestedstartquote" text="&#8216;"/>
+   <l:dingbat key="nestedendquote" text="&#8217;"/>
+   <l:dingbat key="singlestartquote" text="&#8216;" lang="en"/>
+   <l:dingbat key="singleendquote" text="&#8217;" lang="en"/>
+   <l:dingbat key="bullet" text="&#8226;"/>
+   <l:gentext key="hyphenation-character" text="-" lang="en"/>
+   <l:gentext key="hyphenation-push-character-count" text="2" lang="en"/>
+   <l:gentext key="hyphenation-remain-character-count" text="2" lang="en"/>
+
+   <l:context name="styles">
+      <l:template name="person-name" text="first-last"/>
+   </l:context>
+
+   <l:context name="title">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="%t"/>
+      <l:template name="appendix" text="Tillegg %n. %t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="biblioentry" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliolist" text="%t" lang="en"/>
+      <l:template name="bibliomixed" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="Kapittel %n. %t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="Formel %n. %t"/>
+      <l:template name="example" text="Eksempel %n. %t"/>
+      <l:template name="figure" text="Figur %n. %t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="glosslist" text="%t" lang="en"/>
+      <l:template name="glossentry" text="%t" lang="en"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text=""/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="Del %n. %t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="procedure.formal" text="Prosedyre&#160;%n.&#160;%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="productionset.formal" text="Production&#160;%n"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="%t"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="%t"/>
+      <l:template name="refentry" text="%t"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsection" text="%t"/>
+      <l:template name="refsect1" text="%t"/>
+      <l:template name="refsect2" text="%t"/>
+      <l:template name="refsect3" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="refsynopsisdivinfo" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="step" text="%t"/>
+      <l:template name="table" text="Tabell %n. %t"/>
+      <l:template name="task" text="%t" lang="en"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="" lang="en"/>
+      <l:template name="warning" text="%t"/>
+   </l:context>
+
+   <l:context name="title-unnumbered">
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article/appendix" text="%t" lang="en"/>
+      <l:template name="bridgehead" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="sect1" text="%t"/>
+      <l:template name="sect2" text="%t"/>
+      <l:template name="sect3" text="%t"/>
+      <l:template name="sect4" text="%t"/>
+      <l:template name="sect5" text="%t"/>
+      <l:template name="section" text="%t"/>
+      <l:template name="simplesect" text="%t"/>
+   </l:context>
+
+   <l:context name="title-numbered">
+      <l:template name="appendix" text="Tillegg %n. %t"/>
+      <l:template name="article/appendix" text="%n.&#160;%t" lang="en"/>
+      <l:template name="bridgehead" text="%t"/>
+      <l:template name="chapter" text="Kapittel %n. %t"/>
+      <l:template name="sect1" text="%n. %t"/>
+      <l:template name="sect2" text="%n. %t"/>
+      <l:template name="sect3" text="%n. %t"/>
+      <l:template name="sect4" text="%n. %t"/>
+      <l:template name="sect5" text="%n. %t"/>
+      <l:template name="section" text="%n. %t"/>
+      <l:template name="simplesect" text="%n. %t"/>
+   </l:context>
+
+   <l:context name="subtitle">
+      <l:template name="appendix" text="%s"/>
+      <l:template name="article" text="%s"/>
+      <l:template name="bibliodiv" text="%s"/>
+      <l:template name="biblioentry" text="%s"/>
+      <l:template name="bibliography" text="%s"/>
+      <l:template name="bibliomixed" text="%s"/>
+      <l:template name="bibliomset" text="%s"/>
+      <l:template name="biblioset" text="%s"/>
+      <l:template name="book" text="%s"/>
+      <l:template name="chapter" text="%s"/>
+      <l:template name="colophon" text="%s"/>
+      <l:template name="dedication" text="%s"/>
+      <l:template name="glossary" text="%s"/>
+      <l:template name="glossdiv" text="%s"/>
+      <l:template name="index" text="%s"/>
+      <l:template name="indexdiv" text="%s"/>
+      <l:template name="lot" text="%s"/>
+      <l:template name="part" text="%s"/>
+      <l:template name="partintro" text="%s"/>
+      <l:template name="preface" text="%s"/>
+      <l:template name="refentry" text="%s"/>
+      <l:template name="reference" text="%s"/>
+      <l:template name="refsection" text="%s"/>
+      <l:template name="refsect1" text="%s"/>
+      <l:template name="refsect2" text="%s"/>
+      <l:template name="refsect3" text="%s"/>
+      <l:template name="refsynopsisdiv" text="%s"/>
+      <l:template name="sect1" text="%s"/>
+      <l:template name="sect2" text="%s"/>
+      <l:template name="sect3" text="%s"/>
+      <l:template name="sect4" text="%s"/>
+      <l:template name="sect5" text="%s"/>
+      <l:template name="section" text="%s"/>
+      <l:template name="set" text="%s"/>
+      <l:template name="setindex" text="%s"/>
+      <l:template name="sidebar" text="%s"/>
+      <l:template name="simplesect" text="%s"/>
+      <l:template name="toc" text="%s"/>
+   </l:context>
+
+   <l:context name="xref">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="A:&#160;%n"/>
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="constraintdef" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="%t"/>
+      <l:template name="example" text="%t"/>
+      <l:template name="figure" text="%t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text="%n"/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="%t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="Q:&#160;%n"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="Q:&#160;%n"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="table" text="%t"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="%n"/>
+      <l:template name="warning" text="%t"/>
+      <l:template name="page.citation" text=" [%p]"/>
+      <l:template name="page" text="(page %p)" lang="en"/>
+      <l:template name="pageabbrev" text="(p. %p)" lang="en"/>
+      <l:template name="Page" text="Page %p" lang="en"/>
+      <l:template name="bridgehead" text="&#8220;%t&#8221;"/>
+      <l:template name="refsection" text="&#8220;%t&#8221;"/>
+      <l:template name="refsect1" text="&#8220;%t&#8221;"/>
+      <l:template name="refsect2" text="&#8220;%t&#8221;"/>
+      <l:template name="refsect3" text="&#8220;%t&#8221;"/>
+      <l:template name="sect1" text="&#8220;%t&#8221;"/>
+      <l:template name="sect2" text="&#8220;%t&#8221;"/>
+      <l:template name="sect3" text="&#8220;%t&#8221;"/>
+      <l:template name="sect4" text="&#8220;%t&#8221;"/>
+      <l:template name="sect5" text="&#8220;%t&#8221;"/>
+      <l:template name="section" text="&#8220;%t&#8221;"/>
+      <l:template name="simplesect" text="&#8220;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="xref-number">
+      <l:template name="answer" text="A:&#160;%n"/>
+      <l:template name="appendix" text="Tillegg&#160;%n"/>
+      <l:template name="bridgehead" text="Seksjon&#160;%n"/>
+      <l:template name="chapter" text="Kapittel&#160;%n"/>
+      <l:template name="equation" text="Formel&#160;%n"/>
+      <l:template name="example" text="Eksempel&#160;%n"/>
+      <l:template name="figure" text="Figur&#160;%n"/>
+      <l:template name="part" text="Del&#160;%n"/>
+      <l:template name="procedure" text="Prosedyre&#160;%n"/>
+      <l:template name="productionset" text="Production&#160;%n"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n"/>
+      <l:template name="qandaentry" text="Q:&#160;%n"/>
+      <l:template name="question" text="Q:&#160;%n"/>
+      <l:template name="sect1" text="Seksjon&#160;%n"/>
+      <l:template name="sect2" text="Seksjon&#160;%n"/>
+      <l:template name="sect3" text="Seksjon&#160;%n"/>
+      <l:template name="sect4" text="Seksjon&#160;%n"/>
+      <l:template name="sect5" text="Seksjon&#160;%n"/>
+      <l:template name="section" text="Seksjon&#160;%n"/>
+      <l:template name="table" text="Tabell&#160;%n"/>
+   </l:context>
+
+   <l:context name="xref-number-and-title">
+      <l:template name="appendix" text="Tillegg&#160;%n, %t"/>
+      <l:template name="bridgehead" text="Seksjon&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="chapter" text="Kapittel&#160;%n, %t"/>
+      <l:template name="equation" text="Formel&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="example" text="Eksempel&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="figure" text="Figur&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="part" text="Del&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="procedure" text="Prosedyre&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="productionset" text="Production&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="refsect1" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="refsect2" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="refsect3" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="refsection" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="sect1" text="Seksjon&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect2" text="Seksjon&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect3" text="Seksjon&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect4" text="Seksjon&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect5" text="Seksjon&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="section" text="Seksjon&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="simplesect" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="table" text="Tabell&#160;%n, &#8220;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="authorgroup">
+      <l:template name="sep" text=", "/>
+      <l:template name="sep2" text=" og "/>
+      <l:template name="seplast" text=", og "/>
+   </l:context>
+
+   <l:context name="glossary">
+      <l:template name="see" text="Se "/>
+      <l:template name="seealso" text="Se Ogs&#229; "/>
+   </l:context>
+
+   <l:context name="msgset">
+      <l:template name="MsgAud" text="Publikum: "/>
+      <l:template name="MsgLevel" text="Niv&#229;: "/>
+      <l:template name="MsgOrig" text="Opphav: "/>
+   </l:context>
+
+   <l:context name="datetime">
+      <l:template name="format" text="m/d/Y" lang="en"/>
+   </l:context>
+
+   <l:context name="datetime-full">
+      <l:template name="January" text="January" lang="en"/>
+      <l:template name="February" text="February" lang="en"/>
+      <l:template name="March" text="March" lang="en"/>
+      <l:template name="April" text="April" lang="en"/>
+      <l:template name="May" text="May" lang="en"/>
+      <l:template name="June" text="June" lang="en"/>
+      <l:template name="July" text="July" lang="en"/>
+      <l:template name="August" text="August" lang="en"/>
+      <l:template name="September" text="September" lang="en"/>
+      <l:template name="October" text="October" lang="en"/>
+      <l:template name="November" text="November" lang="en"/>
+      <l:template name="December" text="December" lang="en"/>
+      <l:template name="Monday" text="Monday" lang="en"/>
+      <l:template name="Tuesday" text="Tuesday" lang="en"/>
+      <l:template name="Wednesday" text="Wednesday" lang="en"/>
+      <l:template name="Thursday" text="Thursday" lang="en"/>
+      <l:template name="Friday" text="Friday" lang="en"/>
+      <l:template name="Saturday" text="Saturday" lang="en"/>
+      <l:template name="Sunday" text="Sunday" lang="en"/>
+   </l:context>
+
+   <l:context name="datetime-abbrev">
+      <l:template name="Jan" text="Jan" lang="en"/>
+      <l:template name="Feb" text="Feb" lang="en"/>
+      <l:template name="Mar" text="Mar" lang="en"/>
+      <l:template name="Apr" text="Apr" lang="en"/>
+      <l:template name="May" text="May" lang="en"/>
+      <l:template name="Jun" text="Jun" lang="en"/>
+      <l:template name="Jul" text="Jul" lang="en"/>
+      <l:template name="Aug" text="Aug" lang="en"/>
+      <l:template name="Sep" text="Sep" lang="en"/>
+      <l:template name="Oct" text="Oct" lang="en"/>
+      <l:template name="Nov" text="Nov" lang="en"/>
+      <l:template name="Dec" text="Dec" lang="en"/>
+      <l:template name="Mon" text="Mon" lang="en"/>
+      <l:template name="Tue" text="Tue" lang="en"/>
+      <l:template name="Wed" text="Wed" lang="en"/>
+      <l:template name="Thu" text="Thu" lang="en"/>
+      <l:template name="Fri" text="Fri" lang="en"/>
+      <l:template name="Sat" text="Sat" lang="en"/>
+      <l:template name="Sun" text="Sun" lang="en"/>
+   </l:context>
+
+   <l:context name="htmlhelp">
+      <l:template name="langcode" text="0x0414 Norwegian"/>
+   </l:context>
+
+   <l:letters lang="en">
+      <l:l i="-1"/>
+      <l:l i="0">Symbols</l:l>
+      <l:l i="10">A</l:l>
+      <l:l i="10">a</l:l>
+      <l:l i="10">&#192;</l:l>
+      <l:l i="10">&#224;</l:l>
+      <l:l i="10">&#193;</l:l>
+      <l:l i="10">&#225;</l:l>
+      <l:l i="10">&#194;</l:l>
+      <l:l i="10">&#226;</l:l>
+      <l:l i="10">&#195;</l:l>
+      <l:l i="10">&#227;</l:l>
+      <l:l i="10">&#196;</l:l>
+      <l:l i="10">&#228;</l:l>
+      <l:l i="10">&#197;</l:l>
+      <l:l i="10">&#229;</l:l>
+      <l:l i="10">&#256;</l:l>
+      <l:l i="10">&#257;</l:l>
+      <l:l i="10">&#258;</l:l>
+      <l:l i="10">&#259;</l:l>
+      <l:l i="10">&#260;</l:l>
+      <l:l i="10">&#261;</l:l>
+      <l:l i="10">&#461;</l:l>
+      <l:l i="10">&#462;</l:l>
+      <l:l i="10">&#478;</l:l>
+      <l:l i="10">&#479;</l:l>
+      <l:l i="10">&#480;</l:l>
+      <l:l i="10">&#481;</l:l>
+      <l:l i="10">&#506;</l:l>
+      <l:l i="10">&#507;</l:l>
+      <l:l i="10">&#512;</l:l>
+      <l:l i="10">&#513;</l:l>
+      <l:l i="10">&#514;</l:l>
+      <l:l i="10">&#515;</l:l>
+      <l:l i="10">&#550;</l:l>
+      <l:l i="10">&#551;</l:l>
+      <l:l i="10">&#7680;</l:l>
+      <l:l i="10">&#7681;</l:l>
+      <l:l i="10">&#7834;</l:l>
+      <l:l i="10">&#7840;</l:l>
+      <l:l i="10">&#7841;</l:l>
+      <l:l i="10">&#7842;</l:l>
+      <l:l i="10">&#7843;</l:l>
+      <l:l i="10">&#7844;</l:l>
+      <l:l i="10">&#7845;</l:l>
+      <l:l i="10">&#7846;</l:l>
+      <l:l i="10">&#7847;</l:l>
+      <l:l i="10">&#7848;</l:l>
+      <l:l i="10">&#7849;</l:l>
+      <l:l i="10">&#7850;</l:l>
+      <l:l i="10">&#7851;</l:l>
+      <l:l i="10">&#7852;</l:l>
+      <l:l i="10">&#7853;</l:l>
+      <l:l i="10">&#7854;</l:l>
+      <l:l i="10">&#7855;</l:l>
+      <l:l i="10">&#7856;</l:l>
+      <l:l i="10">&#7857;</l:l>
+      <l:l i="10">&#7858;</l:l>
+      <l:l i="10">&#7859;</l:l>
+      <l:l i="10">&#7860;</l:l>
+      <l:l i="10">&#7861;</l:l>
+      <l:l i="10">&#7862;</l:l>
+      <l:l i="10">&#7863;</l:l>
+      <l:l i="20">B</l:l>
+      <l:l i="20">b</l:l>
+      <l:l i="20">&#384;</l:l>
+      <l:l i="20">&#385;</l:l>
+      <l:l i="20">&#595;</l:l>
+      <l:l i="20">&#386;</l:l>
+      <l:l i="20">&#387;</l:l>
+      <l:l i="20">&#7682;</l:l>
+      <l:l i="20">&#7683;</l:l>
+      <l:l i="20">&#7684;</l:l>
+      <l:l i="20">&#7685;</l:l>
+      <l:l i="20">&#7686;</l:l>
+      <l:l i="20">&#7687;</l:l>
+      <l:l i="30">C</l:l>
+      <l:l i="30">c</l:l>
+      <l:l i="30">&#199;</l:l>
+      <l:l i="30">&#231;</l:l>
+      <l:l i="30">&#262;</l:l>
+      <l:l i="30">&#263;</l:l>
+      <l:l i="30">&#264;</l:l>
+      <l:l i="30">&#265;</l:l>
+      <l:l i="30">&#266;</l:l>
+      <l:l i="30">&#267;</l:l>
+      <l:l i="30">&#268;</l:l>
+      <l:l i="30">&#269;</l:l>
+      <l:l i="30">&#391;</l:l>
+      <l:l i="30">&#392;</l:l>
+      <l:l i="30">&#597;</l:l>
+      <l:l i="30">&#7688;</l:l>
+      <l:l i="30">&#7689;</l:l>
+      <l:l i="40">D</l:l>
+      <l:l i="40">d</l:l>
+      <l:l i="40">&#270;</l:l>
+      <l:l i="40">&#271;</l:l>
+      <l:l i="40">&#272;</l:l>
+      <l:l i="40">&#273;</l:l>
+      <l:l i="40">&#394;</l:l>
+      <l:l i="40">&#599;</l:l>
+      <l:l i="40">&#395;</l:l>
+      <l:l i="40">&#396;</l:l>
+      <l:l i="40">&#453;</l:l>
+      <l:l i="40">&#498;</l:l>
+      <l:l i="40">&#545;</l:l>
+      <l:l i="40">&#598;</l:l>
+      <l:l i="40">&#7690;</l:l>
+      <l:l i="40">&#7691;</l:l>
+      <l:l i="40">&#7692;</l:l>
+      <l:l i="40">&#7693;</l:l>
+      <l:l i="40">&#7694;</l:l>
+      <l:l i="40">&#7695;</l:l>
+      <l:l i="40">&#7696;</l:l>
+      <l:l i="40">&#7697;</l:l>
+      <l:l i="40">&#7698;</l:l>
+      <l:l i="40">&#7699;</l:l>
+      <l:l i="50">E</l:l>
+      <l:l i="50">e</l:l>
+      <l:l i="50">&#200;</l:l>
+      <l:l i="50">&#232;</l:l>
+      <l:l i="50">&#201;</l:l>
+      <l:l i="50">&#233;</l:l>
+      <l:l i="50">&#202;</l:l>
+      <l:l i="50">&#234;</l:l>
+      <l:l i="50">&#203;</l:l>
+      <l:l i="50">&#235;</l:l>
+      <l:l i="50">&#274;</l:l>
+      <l:l i="50">&#275;</l:l>
+      <l:l i="50">&#276;</l:l>
+      <l:l i="50">&#277;</l:l>
+      <l:l i="50">&#278;</l:l>
+      <l:l i="50">&#279;</l:l>
+      <l:l i="50">&#280;</l:l>
+      <l:l i="50">&#281;</l:l>
+      <l:l i="50">&#282;</l:l>
+      <l:l i="50">&#283;</l:l>
+      <l:l i="50">&#516;</l:l>
+      <l:l i="50">&#517;</l:l>
+      <l:l i="50">&#518;</l:l>
+      <l:l i="50">&#519;</l:l>
+      <l:l i="50">&#552;</l:l>
+      <l:l i="50">&#553;</l:l>
+      <l:l i="50">&#7700;</l:l>
+      <l:l i="50">&#7701;</l:l>
+      <l:l i="50">&#7702;</l:l>
+      <l:l i="50">&#7703;</l:l>
+      <l:l i="50">&#7704;</l:l>
+      <l:l i="50">&#7705;</l:l>
+      <l:l i="50">&#7706;</l:l>
+      <l:l i="50">&#7707;</l:l>
+      <l:l i="50">&#7708;</l:l>
+      <l:l i="50">&#7709;</l:l>
+      <l:l i="50">&#7864;</l:l>
+      <l:l i="50">&#7865;</l:l>
+      <l:l i="50">&#7866;</l:l>
+      <l:l i="50">&#7867;</l:l>
+      <l:l i="50">&#7868;</l:l>
+      <l:l i="50">&#7869;</l:l>
+      <l:l i="50">&#7870;</l:l>
+      <l:l i="50">&#7871;</l:l>
+      <l:l i="50">&#7872;</l:l>
+      <l:l i="50">&#7873;</l:l>
+      <l:l i="50">&#7874;</l:l>
+      <l:l i="50">&#7875;</l:l>
+      <l:l i="50">&#7876;</l:l>
+      <l:l i="50">&#7877;</l:l>
+      <l:l i="50">&#7878;</l:l>
+      <l:l i="50">&#7879;</l:l>
+      <l:l i="60">F</l:l>
+      <l:l i="60">f</l:l>
+      <l:l i="60">&#401;</l:l>
+      <l:l i="60">&#402;</l:l>
+      <l:l i="60">&#7710;</l:l>
+      <l:l i="60">&#7711;</l:l>
+      <l:l i="70">G</l:l>
+      <l:l i="70">g</l:l>
+      <l:l i="70">&#284;</l:l>
+      <l:l i="70">&#285;</l:l>
+      <l:l i="70">&#286;</l:l>
+      <l:l i="70">&#287;</l:l>
+      <l:l i="70">&#288;</l:l>
+      <l:l i="70">&#289;</l:l>
+      <l:l i="70">&#290;</l:l>
+      <l:l i="70">&#291;</l:l>
+      <l:l i="70">&#403;</l:l>
+      <l:l i="70">&#608;</l:l>
+      <l:l i="70">&#484;</l:l>
+      <l:l i="70">&#485;</l:l>
+      <l:l i="70">&#486;</l:l>
+      <l:l i="70">&#487;</l:l>
+      <l:l i="70">&#500;</l:l>
+      <l:l i="70">&#501;</l:l>
+      <l:l i="70">&#7712;</l:l>
+      <l:l i="70">&#7713;</l:l>
+      <l:l i="80">H</l:l>
+      <l:l i="80">h</l:l>
+      <l:l i="80">&#292;</l:l>
+      <l:l i="80">&#293;</l:l>
+      <l:l i="80">&#294;</l:l>
+      <l:l i="80">&#295;</l:l>
+      <l:l i="80">&#542;</l:l>
+      <l:l i="80">&#543;</l:l>
+      <l:l i="80">&#614;</l:l>
+      <l:l i="80">&#7714;</l:l>
+      <l:l i="80">&#7715;</l:l>
+      <l:l i="80">&#7716;</l:l>
+      <l:l i="80">&#7717;</l:l>
+      <l:l i="80">&#7718;</l:l>
+      <l:l i="80">&#7719;</l:l>
+      <l:l i="80">&#7720;</l:l>
+      <l:l i="80">&#7721;</l:l>
+      <l:l i="80">&#7722;</l:l>
+      <l:l i="80">&#7723;</l:l>
+      <l:l i="80">&#7830;</l:l>
+      <l:l i="90">I</l:l>
+      <l:l i="90">i</l:l>
+      <l:l i="90">&#204;</l:l>
+      <l:l i="90">&#236;</l:l>
+      <l:l i="90">&#205;</l:l>
+      <l:l i="90">&#237;</l:l>
+      <l:l i="90">&#206;</l:l>
+      <l:l i="90">&#238;</l:l>
+      <l:l i="90">&#207;</l:l>
+      <l:l i="90">&#239;</l:l>
+      <l:l i="90">&#296;</l:l>
+      <l:l i="90">&#297;</l:l>
+      <l:l i="90">&#298;</l:l>
+      <l:l i="90">&#299;</l:l>
+      <l:l i="90">&#300;</l:l>
+      <l:l i="90">&#301;</l:l>
+      <l:l i="90">&#302;</l:l>
+      <l:l i="90">&#303;</l:l>
+      <l:l i="90">&#304;</l:l>
+      <l:l i="90">&#407;</l:l>
+      <l:l i="90">&#616;</l:l>
+      <l:l i="90">&#463;</l:l>
+      <l:l i="90">&#464;</l:l>
+      <l:l i="90">&#520;</l:l>
+      <l:l i="90">&#521;</l:l>
+      <l:l i="90">&#522;</l:l>
+      <l:l i="90">&#523;</l:l>
+      <l:l i="90">&#7724;</l:l>
+      <l:l i="90">&#7725;</l:l>
+      <l:l i="90">&#7726;</l:l>
+      <l:l i="90">&#7727;</l:l>
+      <l:l i="90">&#7880;</l:l>
+      <l:l i="90">&#7881;</l:l>
+      <l:l i="90">&#7882;</l:l>
+      <l:l i="90">&#7883;</l:l>
+      <l:l i="100">J</l:l>
+      <l:l i="100">j</l:l>
+      <l:l i="100">&#308;</l:l>
+      <l:l i="100">&#309;</l:l>
+      <l:l i="100">&#496;</l:l>
+      <l:l i="100">&#669;</l:l>
+      <l:l i="110">K</l:l>
+      <l:l i="110">k</l:l>
+      <l:l i="110">&#310;</l:l>
+      <l:l i="110">&#311;</l:l>
+      <l:l i="110">&#408;</l:l>
+      <l:l i="110">&#409;</l:l>
+      <l:l i="110">&#488;</l:l>
+      <l:l i="110">&#489;</l:l>
+      <l:l i="110">&#7728;</l:l>
+      <l:l i="110">&#7729;</l:l>
+      <l:l i="110">&#7730;</l:l>
+      <l:l i="110">&#7731;</l:l>
+      <l:l i="110">&#7732;</l:l>
+      <l:l i="110">&#7733;</l:l>
+      <l:l i="120">L</l:l>
+      <l:l i="120">l</l:l>
+      <l:l i="120">&#313;</l:l>
+      <l:l i="120">&#314;</l:l>
+      <l:l i="120">&#315;</l:l>
+      <l:l i="120">&#316;</l:l>
+      <l:l i="120">&#317;</l:l>
+      <l:l i="120">&#318;</l:l>
+      <l:l i="120">&#319;</l:l>
+      <l:l i="120">&#320;</l:l>
+      <l:l i="120">&#321;</l:l>
+      <l:l i="120">&#322;</l:l>
+      <l:l i="120">&#410;</l:l>
+      <l:l i="120">&#456;</l:l>
+      <l:l i="120">&#564;</l:l>
+      <l:l i="120">&#619;</l:l>
+      <l:l i="120">&#620;</l:l>
+      <l:l i="120">&#621;</l:l>
+      <l:l i="120">&#7734;</l:l>
+      <l:l i="120">&#7735;</l:l>
+      <l:l i="120">&#7736;</l:l>
+      <l:l i="120">&#7737;</l:l>
+      <l:l i="120">&#7738;</l:l>
+      <l:l i="120">&#7739;</l:l>
+      <l:l i="120">&#7740;</l:l>
+      <l:l i="120">&#7741;</l:l>
+      <l:l i="130">M</l:l>
+      <l:l i="130">m</l:l>
+      <l:l i="130">&#625;</l:l>
+      <l:l i="130">&#7742;</l:l>
+      <l:l i="130">&#7743;</l:l>
+      <l:l i="130">&#7744;</l:l>
+      <l:l i="130">&#7745;</l:l>
+      <l:l i="130">&#7746;</l:l>
+      <l:l i="130">&#7747;</l:l>
+      <l:l i="140">N</l:l>
+      <l:l i="140">n</l:l>
+      <l:l i="140">&#209;</l:l>
+      <l:l i="140">&#241;</l:l>
+      <l:l i="140">&#323;</l:l>
+      <l:l i="140">&#324;</l:l>
+      <l:l i="140">&#325;</l:l>
+      <l:l i="140">&#326;</l:l>
+      <l:l i="140">&#327;</l:l>
+      <l:l i="140">&#328;</l:l>
+      <l:l i="140">&#413;</l:l>
+      <l:l i="140">&#626;</l:l>
+      <l:l i="140">&#414;</l:l>
+      <l:l i="140">&#544;</l:l>
+      <l:l i="140">&#459;</l:l>
+      <l:l i="140">&#504;</l:l>
+      <l:l i="140">&#505;</l:l>
+      <l:l i="140">&#565;</l:l>
+      <l:l i="140">&#627;</l:l>
+      <l:l i="140">&#7748;</l:l>
+      <l:l i="140">&#7749;</l:l>
+      <l:l i="140">&#7750;</l:l>
+      <l:l i="140">&#7751;</l:l>
+      <l:l i="140">&#7752;</l:l>
+      <l:l i="140">&#7753;</l:l>
+      <l:l i="140">&#7754;</l:l>
+      <l:l i="140">&#7755;</l:l>
+      <l:l i="150">O</l:l>
+      <l:l i="150">o</l:l>
+      <l:l i="150">&#210;</l:l>
+      <l:l i="150">&#242;</l:l>
+      <l:l i="150">&#211;</l:l>
+      <l:l i="150">&#243;</l:l>
+      <l:l i="150">&#212;</l:l>
+      <l:l i="150">&#244;</l:l>
+      <l:l i="150">&#213;</l:l>
+      <l:l i="150">&#245;</l:l>
+      <l:l i="150">&#214;</l:l>
+      <l:l i="150">&#246;</l:l>
+      <l:l i="150">&#216;</l:l>
+      <l:l i="150">&#248;</l:l>
+      <l:l i="150">&#332;</l:l>
+      <l:l i="150">&#333;</l:l>
+      <l:l i="150">&#334;</l:l>
+      <l:l i="150">&#335;</l:l>
+      <l:l i="150">&#336;</l:l>
+      <l:l i="150">&#337;</l:l>
+      <l:l i="150">&#415;</l:l>
+      <l:l i="150">&#416;</l:l>
+      <l:l i="150">&#417;</l:l>
+      <l:l i="150">&#465;</l:l>
+      <l:l i="150">&#466;</l:l>
+      <l:l i="150">&#490;</l:l>
+      <l:l i="150">&#491;</l:l>
+      <l:l i="150">&#492;</l:l>
+      <l:l i="150">&#493;</l:l>
+      <l:l i="150">&#510;</l:l>
+      <l:l i="150">&#511;</l:l>
+      <l:l i="150">&#524;</l:l>
+      <l:l i="150">&#525;</l:l>
+      <l:l i="150">&#526;</l:l>
+      <l:l i="150">&#527;</l:l>
+      <l:l i="150">&#554;</l:l>
+      <l:l i="150">&#555;</l:l>
+      <l:l i="150">&#556;</l:l>
+      <l:l i="150">&#557;</l:l>
+      <l:l i="150">&#558;</l:l>
+      <l:l i="150">&#559;</l:l>
+      <l:l i="150">&#560;</l:l>
+      <l:l i="150">&#561;</l:l>
+      <l:l i="150">&#7756;</l:l>
+      <l:l i="150">&#7757;</l:l>
+      <l:l i="150">&#7758;</l:l>
+      <l:l i="150">&#7759;</l:l>
+      <l:l i="150">&#7760;</l:l>
+      <l:l i="150">&#7761;</l:l>
+      <l:l i="150">&#7762;</l:l>
+      <l:l i="150">&#7763;</l:l>
+      <l:l i="150">&#7884;</l:l>
+      <l:l i="150">&#7885;</l:l>
+      <l:l i="150">&#7886;</l:l>
+      <l:l i="150">&#7887;</l:l>
+      <l:l i="150">&#7888;</l:l>
+      <l:l i="150">&#7889;</l:l>
+      <l:l i="150">&#7890;</l:l>
+      <l:l i="150">&#7891;</l:l>
+      <l:l i="150">&#7892;</l:l>
+      <l:l i="150">&#7893;</l:l>
+      <l:l i="150">&#7894;</l:l>
+      <l:l i="150">&#7895;</l:l>
+      <l:l i="150">&#7896;</l:l>
+      <l:l i="150">&#7897;</l:l>
+      <l:l i="150">&#7898;</l:l>
+      <l:l i="150">&#7899;</l:l>
+      <l:l i="150">&#7900;</l:l>
+      <l:l i="150">&#7901;</l:l>
+      <l:l i="150">&#7902;</l:l>
+      <l:l i="150">&#7903;</l:l>
+      <l:l i="150">&#7904;</l:l>
+      <l:l i="150">&#7905;</l:l>
+      <l:l i="150">&#7906;</l:l>
+      <l:l i="150">&#7907;</l:l>
+      <l:l i="160">P</l:l>
+      <l:l i="160">p</l:l>
+      <l:l i="160">&#420;</l:l>
+      <l:l i="160">&#421;</l:l>
+      <l:l i="160">&#7764;</l:l>
+      <l:l i="160">&#7765;</l:l>
+      <l:l i="160">&#7766;</l:l>
+      <l:l i="160">&#7767;</l:l>
+      <l:l i="170">Q</l:l>
+      <l:l i="170">q</l:l>
+      <l:l i="170">&#672;</l:l>
+      <l:l i="180">R</l:l>
+      <l:l i="180">r</l:l>
+      <l:l i="180">&#340;</l:l>
+      <l:l i="180">&#341;</l:l>
+      <l:l i="180">&#342;</l:l>
+      <l:l i="180">&#343;</l:l>
+      <l:l i="180">&#344;</l:l>
+      <l:l i="180">&#345;</l:l>
+      <l:l i="180">&#528;</l:l>
+      <l:l i="180">&#529;</l:l>
+      <l:l i="180">&#530;</l:l>
+      <l:l i="180">&#531;</l:l>
+      <l:l i="180">&#636;</l:l>
+      <l:l i="180">&#637;</l:l>
+      <l:l i="180">&#638;</l:l>
+      <l:l i="180">&#7768;</l:l>
+      <l:l i="180">&#7769;</l:l>
+      <l:l i="180">&#7770;</l:l>
+      <l:l i="180">&#7771;</l:l>
+      <l:l i="180">&#7772;</l:l>
+      <l:l i="180">&#7773;</l:l>
+      <l:l i="180">&#7774;</l:l>
+      <l:l i="180">&#7775;</l:l>
+      <l:l i="190">S</l:l>
+      <l:l i="190">s</l:l>
+      <l:l i="190">&#346;</l:l>
+      <l:l i="190">&#347;</l:l>
+      <l:l i="190">&#348;</l:l>
+      <l:l i="190">&#349;</l:l>
+      <l:l i="190">&#350;</l:l>
+      <l:l i="190">&#351;</l:l>
+      <l:l i="190">&#352;</l:l>
+      <l:l i="190">&#353;</l:l>
+      <l:l i="190">&#536;</l:l>
+      <l:l i="190">&#537;</l:l>
+      <l:l i="190">&#642;</l:l>
+      <l:l i="190">&#7776;</l:l>
+      <l:l i="190">&#7777;</l:l>
+      <l:l i="190">&#7778;</l:l>
+      <l:l i="190">&#7779;</l:l>
+      <l:l i="190">&#7780;</l:l>
+      <l:l i="190">&#7781;</l:l>
+      <l:l i="190">&#7782;</l:l>
+      <l:l i="190">&#7783;</l:l>
+      <l:l i="190">&#7784;</l:l>
+      <l:l i="190">&#7785;</l:l>
+      <l:l i="200">T</l:l>
+      <l:l i="200">t</l:l>
+      <l:l i="200">&#354;</l:l>
+      <l:l i="200">&#355;</l:l>
+      <l:l i="200">&#356;</l:l>
+      <l:l i="200">&#357;</l:l>
+      <l:l i="200">&#358;</l:l>
+      <l:l i="200">&#359;</l:l>
+      <l:l i="200">&#427;</l:l>
+      <l:l i="200">&#428;</l:l>
+      <l:l i="200">&#429;</l:l>
+      <l:l i="200">&#430;</l:l>
+      <l:l i="200">&#648;</l:l>
+      <l:l i="200">&#538;</l:l>
+      <l:l i="200">&#539;</l:l>
+      <l:l i="200">&#566;</l:l>
+      <l:l i="200">&#7786;</l:l>
+      <l:l i="200">&#7787;</l:l>
+      <l:l i="200">&#7788;</l:l>
+      <l:l i="200">&#7789;</l:l>
+      <l:l i="200">&#7790;</l:l>
+      <l:l i="200">&#7791;</l:l>
+      <l:l i="200">&#7792;</l:l>
+      <l:l i="200">&#7793;</l:l>
+      <l:l i="200">&#7831;</l:l>
+      <l:l i="210">U</l:l>
+      <l:l i="210">u</l:l>
+      <l:l i="210">&#217;</l:l>
+      <l:l i="210">&#249;</l:l>
+      <l:l i="210">&#218;</l:l>
+      <l:l i="210">&#250;</l:l>
+      <l:l i="210">&#219;</l:l>
+      <l:l i="210">&#251;</l:l>
+      <l:l i="210">&#220;</l:l>
+      <l:l i="210">&#252;</l:l>
+      <l:l i="210">&#360;</l:l>
+      <l:l i="210">&#361;</l:l>
+      <l:l i="210">&#362;</l:l>
+      <l:l i="210">&#363;</l:l>
+      <l:l i="210">&#364;</l:l>
+      <l:l i="210">&#365;</l:l>
+      <l:l i="210">&#366;</l:l>
+      <l:l i="210">&#367;</l:l>
+      <l:l i="210">&#368;</l:l>
+      <l:l i="210">&#369;</l:l>
+      <l:l i="210">&#370;</l:l>
+      <l:l i="210">&#371;</l:l>
+      <l:l i="210">&#431;</l:l>
+      <l:l i="210">&#432;</l:l>
+      <l:l i="210">&#467;</l:l>
+      <l:l i="210">&#468;</l:l>
+      <l:l i="210">&#469;</l:l>
+      <l:l i="210">&#470;</l:l>
+      <l:l i="210">&#471;</l:l>
+      <l:l i="210">&#472;</l:l>
+      <l:l i="210">&#473;</l:l>
+      <l:l i="210">&#474;</l:l>
+      <l:l i="210">&#475;</l:l>
+      <l:l i="210">&#476;</l:l>
+      <l:l i="210">&#532;</l:l>
+      <l:l i="210">&#533;</l:l>
+      <l:l i="210">&#534;</l:l>
+      <l:l i="210">&#535;</l:l>
+      <l:l i="210">&#7794;</l:l>
+      <l:l i="210">&#7795;</l:l>
+      <l:l i="210">&#7796;</l:l>
+      <l:l i="210">&#7797;</l:l>
+      <l:l i="210">&#7798;</l:l>
+      <l:l i="210">&#7799;</l:l>
+      <l:l i="210">&#7800;</l:l>
+      <l:l i="210">&#7801;</l:l>
+      <l:l i="210">&#7802;</l:l>
+      <l:l i="210">&#7803;</l:l>
+      <l:l i="210">&#7908;</l:l>
+      <l:l i="210">&#7909;</l:l>
+      <l:l i="210">&#7910;</l:l>
+      <l:l i="210">&#7911;</l:l>
+      <l:l i="210">&#7912;</l:l>
+      <l:l i="210">&#7913;</l:l>
+      <l:l i="210">&#7914;</l:l>
+      <l:l i="210">&#7915;</l:l>
+      <l:l i="210">&#7916;</l:l>
+      <l:l i="210">&#7917;</l:l>
+      <l:l i="210">&#7918;</l:l>
+      <l:l i="210">&#7919;</l:l>
+      <l:l i="210">&#7920;</l:l>
+      <l:l i="210">&#7921;</l:l>
+      <l:l i="220">V</l:l>
+      <l:l i="220">v</l:l>
+      <l:l i="220">&#434;</l:l>
+      <l:l i="220">&#651;</l:l>
+      <l:l i="220">&#7804;</l:l>
+      <l:l i="220">&#7805;</l:l>
+      <l:l i="220">&#7806;</l:l>
+      <l:l i="220">&#7807;</l:l>
+      <l:l i="230">W</l:l>
+      <l:l i="230">w</l:l>
+      <l:l i="230">&#372;</l:l>
+      <l:l i="230">&#373;</l:l>
+      <l:l i="230">&#7808;</l:l>
+      <l:l i="230">&#7809;</l:l>
+      <l:l i="230">&#7810;</l:l>
+      <l:l i="230">&#7811;</l:l>
+      <l:l i="230">&#7812;</l:l>
+      <l:l i="230">&#7813;</l:l>
+      <l:l i="230">&#7814;</l:l>
+      <l:l i="230">&#7815;</l:l>
+      <l:l i="230">&#7816;</l:l>
+      <l:l i="230">&#7817;</l:l>
+      <l:l i="230">&#7832;</l:l>
+      <l:l i="240">X</l:l>
+      <l:l i="240">x</l:l>
+      <l:l i="240">&#7818;</l:l>
+      <l:l i="240">&#7819;</l:l>
+      <l:l i="240">&#7820;</l:l>
+      <l:l i="240">&#7821;</l:l>
+      <l:l i="250">Y</l:l>
+      <l:l i="250">y</l:l>
+      <l:l i="250">&#221;</l:l>
+      <l:l i="250">&#253;</l:l>
+      <l:l i="250">&#255;</l:l>
+      <l:l i="250">&#376;</l:l>
+      <l:l i="250">&#374;</l:l>
+      <l:l i="250">&#375;</l:l>
+      <l:l i="250">&#435;</l:l>
+      <l:l i="250">&#436;</l:l>
+      <l:l i="250">&#562;</l:l>
+      <l:l i="250">&#563;</l:l>
+      <l:l i="250">&#7822;</l:l>
+      <l:l i="250">&#7823;</l:l>
+      <l:l i="250">&#7833;</l:l>
+      <l:l i="250">&#7922;</l:l>
+      <l:l i="250">&#7923;</l:l>
+      <l:l i="250">&#7924;</l:l>
+      <l:l i="250">&#7925;</l:l>
+      <l:l i="250">&#7926;</l:l>
+      <l:l i="250">&#7927;</l:l>
+      <l:l i="250">&#7928;</l:l>
+      <l:l i="250">&#7929;</l:l>
+      <l:l i="260">Z</l:l>
+      <l:l i="260">z</l:l>
+      <l:l i="260">&#377;</l:l>
+      <l:l i="260">&#378;</l:l>
+      <l:l i="260">&#379;</l:l>
+      <l:l i="260">&#380;</l:l>
+      <l:l i="260">&#381;</l:l>
+      <l:l i="260">&#382;</l:l>
+      <l:l i="260">&#437;</l:l>
+      <l:l i="260">&#438;</l:l>
+      <l:l i="260">&#548;</l:l>
+      <l:l i="260">&#549;</l:l>
+      <l:l i="260">&#656;</l:l>
+      <l:l i="260">&#657;</l:l>
+      <l:l i="260">&#7824;</l:l>
+      <l:l i="260">&#7825;</l:l>
+      <l:l i="260">&#7826;</l:l>
+      <l:l i="260">&#7827;</l:l>
+      <l:l i="260">&#7828;</l:l>
+      <l:l i="260">&#7829;</l:l>
+   </l:letters>
+</l:l10n>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/pi.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/pi.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/pi.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,177 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+                xmlns:date="http://exslt.org/dates-and-times"
+                exclude-result-prefixes="doc date"
+                extension-element-prefixes="date"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: pi.xsl,v 1.1.1.1 2004/10/19 21:21:39 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     This file contains general templates for processing processing
+     instructions common to both the HTML and FO versions of the
+     DocBook stylesheets.
+     ******************************************************************** -->
+
+<!-- Process PIs also on title pages -->
+<xsl:template match="processing-instruction()" mode="titlepage.mode">
+  <xsl:apply-templates select="."/>
+</xsl:template>
+
+<xsl:template match="processing-instruction('dbtimestamp')">
+  <xsl:variable name="format">
+    <xsl:variable name="pi-format">
+      <xsl:call-template name="pi-attribute">
+        <xsl:with-param name="pis" select="."/>
+        <xsl:with-param name="attribute">format</xsl:with-param>
+      </xsl:call-template>
+    </xsl:variable>
+    <xsl:choose>
+      <xsl:when test="$pi-format != ''">
+        <xsl:value-of select="$pi-format"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:call-template name="gentext.template">
+          <xsl:with-param name="context" select="'datetime'"/>
+          <xsl:with-param name="name" select="'format'"/>
+        </xsl:call-template>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>  
+
+  <xsl:variable name="padding">
+    <xsl:variable name="pi-padding">
+      <xsl:call-template name="pi-attribute">
+        <xsl:with-param name="pis" select="."/>
+        <xsl:with-param name="attribute">padding</xsl:with-param>
+      </xsl:call-template>
+    </xsl:variable>
+    <xsl:choose>
+      <xsl:when test="$pi-padding != ''">
+        <xsl:value-of select="$pi-padding"/>
+      </xsl:when>
+      <xsl:otherwise>1</xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:variable name="date">
+    <xsl:if test="function-available('date:date-time')">
+      <xsl:value-of select="date:date-time()"/>
+    </xsl:if>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="function-available('date:date-time')">
+      <xsl:call-template name="datetime.format">
+        <xsl:with-param name="date" select="$date"/>
+        <xsl:with-param name="format" select="$format"/>
+        <xsl:with-param name="padding" select="$padding"/>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:message>
+        Timestamp processing requires XSLT processor with EXSLT date support.
+      </xsl:message>
+    </xsl:otherwise>
+  </xsl:choose>
+
+</xsl:template>
+
+<xsl:template name="datetime.format">
+  <xsl:param name="date"/>
+  <xsl:param name="format"/>
+  <xsl:param name="padding" select="1"/>
+  
+  <xsl:if test="$format != ''">
+    <xsl:variable name="char" select="substring($format,1,1)"/>
+
+    <xsl:choose>
+      <xsl:when test="$char = 'a'">
+        <xsl:call-template name="gentext.template">
+          <xsl:with-param name="context" select="'datetime-abbrev'"/>
+          <xsl:with-param name="name" select="date:day-abbreviation($date)"/>
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:when test="$char = 'A'">
+        <xsl:call-template name="gentext.template">
+          <xsl:with-param name="context" select="'datetime-full'"/>
+          <xsl:with-param name="name" select="date:day-name($date)"/>
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:when test="$char = 'b'">
+        <xsl:call-template name="gentext.template">
+          <xsl:with-param name="context" select="'datetime-abbrev'"/>
+          <xsl:with-param name="name" select="date:month-abbreviation($date)"/>
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:when test="$char = 'c'">
+        <xsl:value-of select="date:date($date)"/>
+        <xsl:text> </xsl:text>
+        <xsl:value-of select="date:time($date)"/>
+      </xsl:when>
+      <xsl:when test="$char = 'B'">
+        <xsl:call-template name="gentext.template">
+          <xsl:with-param name="context" select="'datetime-full'"/>
+          <xsl:with-param name="name" select="date:month-name($date)"/>
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:when test="$char = 'd'">
+        <xsl:if test="$padding = 1 and string-length(date:day-in-month($date)) = 1">0</xsl:if>
+        <xsl:value-of select="date:day-in-month($date)"/>
+      </xsl:when>
+      <xsl:when test="$char = 'H'">
+        <xsl:if test="$padding = 1 and string-length(date:hour-in-day($date)) = 1">0</xsl:if>
+        <xsl:value-of select="date:hour-in-day($date)"/>
+      </xsl:when>
+      <xsl:when test="$char = 'j'">
+        <xsl:value-of select="date:day-in-year($date)"/>
+      </xsl:when>
+      <xsl:when test="$char = 'm'">
+        <xsl:if test="$padding = 1 and string-length(date:month-in-year($date)) = 1">0</xsl:if>
+        <xsl:value-of select="date:month-in-year($date)"/>
+      </xsl:when>
+      <xsl:when test="$char = 'M'">
+        <xsl:if test="string-length(date:minute-in-hour($date)) = 1">0</xsl:if>
+        <xsl:value-of select="date:minute-in-hour($date)"/>
+      </xsl:when>
+      <xsl:when test="$char = 'S'">
+        <xsl:if test="string-length(date:second-in-minute($date)) = 1">0</xsl:if>
+        <xsl:value-of select="date:second-in-minute($date)"/>
+      </xsl:when>
+      <xsl:when test="$char = 'U'">
+        <xsl:value-of select="date:week-in-year($date)"/>
+      </xsl:when>
+      <xsl:when test="$char = 'w'">
+        <xsl:value-of select="date:day-in-week($date)"/>
+      </xsl:when>
+      <xsl:when test="$char = 'x'">
+        <xsl:value-of select="date:date($date)"/>
+      </xsl:when>
+      <xsl:when test="$char = 'X'">
+        <xsl:value-of select="date:time($date)"/>
+      </xsl:when>
+      <xsl:when test="$char = 'Y'">
+        <xsl:value-of select="date:year($date)"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$char"/>
+      </xsl:otherwise>
+    </xsl:choose>
+    
+    <!-- Process rest of format specifier -->
+    <xsl:call-template name="datetime.format">
+      <xsl:with-param name="date" select="$date"/>
+      <xsl:with-param name="format" select="substring($format,2)"/>
+      <xsl:with-param name="padding" select="$padding"/>
+    </xsl:call-template>
+  </xsl:if>
+
+</xsl:template>
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/pl.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/pl.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/pl.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1153 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="pl" english-language-name="Polish">
+
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+   <l:gentext key="Abstract" text="Abstrakt"/>
+   <l:gentext key="abstract" text="Abstrakt"/>
+   <l:gentext key="Answer" text="Odp:"/>
+   <l:gentext key="answer" text="Odp:"/>
+   <l:gentext key="Appendix" text="Dodatek"/>
+   <l:gentext key="appendix" text="dodatek"/>
+   <l:gentext key="Article" text="Artyku&#322;"/>
+   <l:gentext key="article" text="Artyku&#322;"/>
+   <l:gentext key="Bibliography" text="Bibliografia"/>
+   <l:gentext key="bibliography" text="Bibliografia"/>
+   <l:gentext key="Book" text="Ksi&#261;&#380;ka"/>
+   <l:gentext key="book" text="Ksi&#261;&#380;ka"/>
+   <l:gentext key="CAUTION" text="PRZYPADEK"/>
+   <l:gentext key="Caution" text="Uwaga!"/>
+   <l:gentext key="caution" text="Uwaga!"/>
+   <l:gentext key="Chapter" text="Rozdzia&#322;"/>
+   <l:gentext key="chapter" text="rozdzia&#322;;"/>
+   <l:gentext key="Colophon" text="Colophon"/>
+   <l:gentext key="colophon" text="Colophon"/>
+   <l:gentext key="Copyright" text="Copyright"/>
+   <l:gentext key="copyright" text="Copyright"/>
+   <l:gentext key="Dedication" text="Dedykacja"/>
+   <l:gentext key="dedication" text="Dedykacja"/>
+   <l:gentext key="Edition" text="Wydanie"/>
+   <l:gentext key="edition" text="Wydanie"/>
+   <l:gentext key="Equation" text="R&#243;wnanie"/>
+   <l:gentext key="equation" text="R&#243;wnanie"/>
+   <l:gentext key="Example" text="Przyk&#322;ad"/>
+   <l:gentext key="example" text="Przyk&#322;ad"/>
+   <l:gentext key="Figure" text="Rysunek"/>
+   <l:gentext key="figure" text="Rysunek"/>
+   <l:gentext key="Glossary" text="Glossary"/>
+   <l:gentext key="glossary" text="Glossary"/>
+   <l:gentext key="GlossSee" text="Patrz"/>
+   <l:gentext key="glosssee" text="Patrz"/>
+   <l:gentext key="GlossSeeAlso" text="Patrz te&#380;"/>
+   <l:gentext key="glossseealso" text="Patrz te&#380;"/>
+   <l:gentext key="IMPORTANT" text="WA&#379;NE"/>
+   <l:gentext key="important" text="WA&#379;NE"/>
+   <l:gentext key="Important" text="WA&#379;NE"/>
+   <l:gentext key="Index" text="Indeks"/>
+   <l:gentext key="index" text="Indeks"/>
+   <l:gentext key="ISBN" text="ISBN"/>
+   <l:gentext key="isbn" text="ISBN"/>
+   <l:gentext key="LegalNotice" text="Legal Notice"/>
+   <l:gentext key="legalnotice" text="Legal Notice"/>
+   <l:gentext key="MsgAud" text="Odbiorcy"/>
+   <l:gentext key="msgaud" text="Odbiorcy"/>
+   <l:gentext key="MsgLevel" text="Poziom"/>
+   <l:gentext key="msglevel" text="Poziom"/>
+   <l:gentext key="MsgOrig" text="Nadawca"/>
+   <l:gentext key="msgorig" text="Nadawca"/>
+   <l:gentext key="NOTE" text="Notatka"/>
+   <l:gentext key="Note" text="Notatka"/>
+   <l:gentext key="note" text="Notatka"/>
+   <l:gentext key="Part" text="Cz&#281;&#347;&#263;"/>
+   <l:gentext key="part" text="Cz&#281;&#347;&#263;"/>
+   <l:gentext key="Preface" text="Przedmowa"/>
+   <l:gentext key="preface" text="Przedmowa"/>
+   <l:gentext key="Procedure" text="Procedura"/>
+   <l:gentext key="procedure" text="Procedura"/>
+   <l:gentext key="ProductionSet" text="Production"/>
+   <l:gentext key="PubDate" text="Publication Date" lang="en"/>
+   <l:gentext key="pubdate" text="Publication date" lang="en"/>
+   <l:gentext key="Published" text="Data wydania"/>
+   <l:gentext key="published" text="Data wydania"/>
+   <l:gentext key="Qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="Question" text="Pyt:"/>
+   <l:gentext key="question" text="Pyt:"/>
+   <l:gentext key="RefEntry" text=""/>
+   <l:gentext key="refentry" text=""/>
+   <l:gentext key="Reference" text="Materia&#322;y &#378;r&#243;d&#322;owe"/>
+   <l:gentext key="reference" text="Materia&#322;y &#378;r&#243;d&#322;owe"/>
+   <l:gentext key="RefName" text="Nazwa"/>
+   <l:gentext key="refname" text="Nazwa"/>
+   <l:gentext key="RefSection" text=""/>
+   <l:gentext key="refsection" text=""/>
+   <l:gentext key="RefSynopsisDiv" text="Synopsis"/>
+   <l:gentext key="refsynopsisdiv" text="Synopsis"/>
+   <l:gentext key="RevHistory" text="Historia zmian"/>
+   <l:gentext key="revhistory" text="Historia zmian"/>
+   <l:gentext key="revision" text="Zmiana"/>
+   <l:gentext key="Revision" text="Zmiana"/>
+   <l:gentext key="sect1" text="Section"/>
+   <l:gentext key="sect2" text="Section"/>
+   <l:gentext key="sect3" text="Section"/>
+   <l:gentext key="sect4" text="Section"/>
+   <l:gentext key="sect5" text="Section"/>
+   <l:gentext key="section" text="sekcja"/>
+   <l:gentext key="Section" text="Sekcja"/>
+   <l:gentext key="see" text="Patrz"/>
+   <l:gentext key="See" text="Patrz"/>
+   <l:gentext key="seealso" text="Patrz te&#380;"/>
+   <l:gentext key="Seealso" text="Patrz te&#380;"/>
+   <l:gentext key="SeeAlso" text="Patrz te&#380;"/>
+   <l:gentext key="set" text="Set"/>
+   <l:gentext key="Set" text="Set"/>
+   <l:gentext key="setindex" text="Indeks"/>
+   <l:gentext key="SetIndex" text="Indeks"/>
+   <l:gentext key="Sidebar" text=""/>
+   <l:gentext key="sidebar" text="sidebar"/>
+   <l:gentext key="step" text="krok"/>
+   <l:gentext key="Step" text="krok"/>
+   <l:gentext key="Table" text="Tabela"/>
+   <l:gentext key="table" text="Tabela"/>
+   <l:gentext key="tip" text="Podpowied&#378;"/>
+   <l:gentext key="TIP" text="Podpowied&#378;"/>
+   <l:gentext key="Tip" text="Podpowied&#378;"/>
+   <l:gentext key="Warning" text="Ostrze&#380;enie"/>
+   <l:gentext key="warning" text="Ostrze&#380;enie"/>
+   <l:gentext key="WARNING" text="Ostrze&#380;enie"/>
+   <l:gentext key="and" text="i"/>
+   <l:gentext key="by" text="by"/>
+   <l:gentext key="called" text="called" lang="en"/>
+   <l:gentext key="Edited" text="Edited"/>
+   <l:gentext key="edited" text="Edited"/>
+   <l:gentext key="Editedby" text="Redakcja: "/>
+   <l:gentext key="editedby" text="Redakcja: "/>
+   <l:gentext key="in" text="w"/>
+   <l:gentext key="lastlistcomma" text=","/>
+   <l:gentext key="listcomma" text=","/>
+   <l:gentext key="nonexistantelement" text="nie istniej&#261;cy element"/>
+   <l:gentext key="notes" text="Przypisy"/>
+   <l:gentext key="Notes" text="Przypisy"/>
+   <l:gentext key="Pgs" text="stron"/>
+   <l:gentext key="pgs" text="stron"/>
+   <l:gentext key="Revisedby" text="Revised by: "/>
+   <l:gentext key="revisedby" text="Revised by: "/>
+   <l:gentext key="TableNotes" text="Przypisy"/>
+   <l:gentext key="tablenotes" text="Przypisy"/>
+   <l:gentext key="TableofContents" text="Spis tre&#347;ci"/>
+   <l:gentext key="tableofcontents" text="Spis tre&#347;ci"/>
+   <l:gentext key="the" text="" lang="en"/>
+   <l:gentext key="unexpectedelementname" text="Unexpected element name"/>
+   <l:gentext key="unsupported" text="nie wspierany"/>
+   <l:gentext key="xrefto" text="xref to"/>
+   <l:gentext key="listofequations" text="Spis r&#243;wna&#324;"/>
+   <l:gentext key="ListofEquations" text="Spis r&#243;wna&#324;"/>
+   <l:gentext key="ListofExamples" text="Spis przyk&#322;ad&#243;w"/>
+   <l:gentext key="listofexamples" text="Spis przyk&#322;ad&#243;w"/>
+   <l:gentext key="ListofFigures" text="Spis rysunk&#243;w"/>
+   <l:gentext key="listoffigures" text="Spis rysunk&#243;w"/>
+   <l:gentext key="ListofProcedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listofprocedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listoftables" text="Spis tabel"/>
+   <l:gentext key="ListofTables" text="Spis tabel"/>
+   <l:gentext key="ListofUnknown" text="Spis ???"/>
+   <l:gentext key="listofunknown" text="Spis ???"/>
+   <l:gentext key="nav-home" text="Spis tre&#347;ci"/>
+   <l:gentext key="nav-next" text="Nast&#281;pny"/>
+   <l:gentext key="nav-next-sibling" text="Nast&#281;pny rozdzia&#322;"/>
+   <l:gentext key="nav-prev" text="Poprzedni"/>
+   <l:gentext key="nav-prev-sibling" text="Poprzedni rozdzia&#322;"/>
+   <l:gentext key="nav-up" text="Pocz&#261;tek rozdzia&#322;u"/>
+   <l:gentext key="nav-toc" text="ToC" lang="en"/>
+   <l:gentext key="Draft" text="Draft"/>
+   <l:gentext key="above" text="above"/>
+   <l:gentext key="below" text="below"/>
+   <l:gentext key="sectioncalled" text="the section called"/>
+   <l:gentext key="index symbols" text="Symbols"/>
+   <l:gentext key="lowercase.alpha" text="abcdefghijklmnopqrstuvwxyz"/>
+   <l:gentext key="uppercase.alpha" text="ABCDEFGHIJKLMNOPQRSTUVWXYZ"/>
+   <l:dingbat key="startquote" text="&#8222;"/>
+   <l:dingbat key="endquote" text="&#8221;"/>
+   <l:dingbat key="nestedstartquote" text="&#171;"/>
+   <l:dingbat key="nestedendquote" text="&#187;"/>
+   <l:dingbat key="singlestartquote" text="&#8216;" lang="en"/>
+   <l:dingbat key="singleendquote" text="&#8217;" lang="en"/>
+   <l:dingbat key="bullet" text="&#2022;"/>
+   <l:gentext key="hyphenation-character" text="-" lang="en"/>
+   <l:gentext key="hyphenation-push-character-count" text="2" lang="en"/>
+   <l:gentext key="hyphenation-remain-character-count" text="2" lang="en"/>
+
+   <l:context name="styles">
+      <l:template name="person-name" text="first-last"/>
+   </l:context>
+
+   <l:context name="title">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="%t"/>
+      <l:template name="appendix" text="Dodatek %n. %t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="biblioentry" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliolist" text="%t" lang="en"/>
+      <l:template name="bibliomixed" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="Rozdzia&#322; %n. %t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="R&#243;wnanie %n. %t"/>
+      <l:template name="example" text="Przyk&#322;ad %n. %t"/>
+      <l:template name="figure" text="Rysunek %n. %t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="glosslist" text="%t" lang="en"/>
+      <l:template name="glossentry" text="%t" lang="en"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text=""/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="Cz&#281;&#347;&#263; %n. %t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="procedure.formal" text="Procedura&#160;%n.&#160;%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="productionset.formal" text="Production&#160;%n"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="%t"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="%t"/>
+      <l:template name="refentry" text="%t"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsection" text="%t"/>
+      <l:template name="refsect1" text="%t"/>
+      <l:template name="refsect2" text="%t"/>
+      <l:template name="refsect3" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="refsynopsisdivinfo" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="step" text="%t"/>
+      <l:template name="table" text="Tabela %n. %t"/>
+      <l:template name="task" text="%t" lang="en"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="" lang="en"/>
+      <l:template name="warning" text="%t"/>
+   </l:context>
+
+   <l:context name="title-unnumbered">
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article/appendix" text="%t" lang="en"/>
+      <l:template name="bridgehead" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="sect1" text="%t"/>
+      <l:template name="sect2" text="%t"/>
+      <l:template name="sect3" text="%t"/>
+      <l:template name="sect4" text="%t"/>
+      <l:template name="sect5" text="%t"/>
+      <l:template name="section" text="%t"/>
+      <l:template name="simplesect" text="%t"/>
+   </l:context>
+
+   <l:context name="title-numbered">
+      <l:template name="appendix" text="Dodatek %n. %t"/>
+      <l:template name="article/appendix" text="%n.&#160;%t" lang="en"/>
+      <l:template name="bridgehead" text="%t"/>
+      <l:template name="chapter" text="Rozdzia&#322; %n. %t"/>
+      <l:template name="sect1" text="%n. %t"/>
+      <l:template name="sect2" text="%n. %t"/>
+      <l:template name="sect3" text="%n. %t"/>
+      <l:template name="sect4" text="%n. %t"/>
+      <l:template name="sect5" text="%n. %t"/>
+      <l:template name="section" text="%n. %t"/>
+      <l:template name="simplesect" text="%n. %t"/>
+   </l:context>
+
+   <l:context name="subtitle">
+      <l:template name="appendix" text="%s"/>
+      <l:template name="article" text="%s"/>
+      <l:template name="bibliodiv" text="%s"/>
+      <l:template name="biblioentry" text="%s"/>
+      <l:template name="bibliography" text="%s"/>
+      <l:template name="bibliomixed" text="%s"/>
+      <l:template name="bibliomset" text="%s"/>
+      <l:template name="biblioset" text="%s"/>
+      <l:template name="book" text="%s"/>
+      <l:template name="chapter" text="%s"/>
+      <l:template name="colophon" text="%s"/>
+      <l:template name="dedication" text="%s"/>
+      <l:template name="glossary" text="%s"/>
+      <l:template name="glossdiv" text="%s"/>
+      <l:template name="index" text="%s"/>
+      <l:template name="indexdiv" text="%s"/>
+      <l:template name="lot" text="%s"/>
+      <l:template name="part" text="%s"/>
+      <l:template name="partintro" text="%s"/>
+      <l:template name="preface" text="%s"/>
+      <l:template name="refentry" text="%s"/>
+      <l:template name="reference" text="%s"/>
+      <l:template name="refsection" text="%s"/>
+      <l:template name="refsect1" text="%s"/>
+      <l:template name="refsect2" text="%s"/>
+      <l:template name="refsect3" text="%s"/>
+      <l:template name="refsynopsisdiv" text="%s"/>
+      <l:template name="sect1" text="%s"/>
+      <l:template name="sect2" text="%s"/>
+      <l:template name="sect3" text="%s"/>
+      <l:template name="sect4" text="%s"/>
+      <l:template name="sect5" text="%s"/>
+      <l:template name="section" text="%s"/>
+      <l:template name="set" text="%s"/>
+      <l:template name="setindex" text="%s"/>
+      <l:template name="sidebar" text="%s"/>
+      <l:template name="simplesect" text="%s"/>
+      <l:template name="toc" text="%s"/>
+   </l:context>
+
+   <l:context name="xref">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="Odp:&#160;%n"/>
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="constraintdef" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="%t"/>
+      <l:template name="example" text="%t"/>
+      <l:template name="figure" text="%t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text="%n"/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="%t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="Pyt:&#160;%n"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="Pyt:&#160;%n"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="table" text="%t"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="%n"/>
+      <l:template name="warning" text="%t"/>
+      <l:template name="page.citation" text=" [%p]"/>
+      <l:template name="page" text="(page %p)" lang="en"/>
+      <l:template name="pageabbrev" text="(p. %p)" lang="en"/>
+      <l:template name="Page" text="Page %p" lang="en"/>
+      <l:template name="bridgehead" text="&#8222;%t&#8221;"/>
+      <l:template name="refsection" text="&#8222;%t&#8221;"/>
+      <l:template name="refsect1" text="&#8222;%t&#8221;"/>
+      <l:template name="refsect2" text="&#8222;%t&#8221;"/>
+      <l:template name="refsect3" text="&#8222;%t&#8221;"/>
+      <l:template name="sect1" text="&#8222;%t&#8221;"/>
+      <l:template name="sect2" text="&#8222;%t&#8221;"/>
+      <l:template name="sect3" text="&#8222;%t&#8221;"/>
+      <l:template name="sect4" text="&#8222;%t&#8221;"/>
+      <l:template name="sect5" text="&#8222;%t&#8221;"/>
+      <l:template name="section" text="&#8222;%t&#8221;"/>
+      <l:template name="simplesect" text="&#8222;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="xref-number">
+      <l:template name="answer" text="Odp:&#160;%n"/>
+      <l:template name="appendix" text="Dodatek&#160;%n"/>
+      <l:template name="bridgehead" text="Sekcja&#160;%n"/>
+      <l:template name="chapter" text="Rozdzia&#322;&#160;%n"/>
+      <l:template name="equation" text="R&#243;wnanie&#160;%n"/>
+      <l:template name="example" text="Przyk&#322;ad&#160;%n"/>
+      <l:template name="figure" text="Rysunek&#160;%n"/>
+      <l:template name="part" text="Cz&#281;&#347;&#263;&#160;%n"/>
+      <l:template name="procedure" text="Procedura&#160;%n"/>
+      <l:template name="productionset" text="Production&#160;%n"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n"/>
+      <l:template name="qandaentry" text="Pyt:&#160;%n"/>
+      <l:template name="question" text="Pyt:&#160;%n"/>
+      <l:template name="sect1" text="Sekcja&#160;%n"/>
+      <l:template name="sect2" text="Sekcja&#160;%n"/>
+      <l:template name="sect3" text="Sekcja&#160;%n"/>
+      <l:template name="sect4" text="Sekcja&#160;%n"/>
+      <l:template name="sect5" text="Sekcja&#160;%n"/>
+      <l:template name="section" text="Sekcja&#160;%n"/>
+      <l:template name="table" text="Tabela&#160;%n"/>
+   </l:context>
+
+   <l:context name="xref-number-and-title">
+      <l:template name="appendix" text="Dodatek&#160;%n, %t"/>
+      <l:template name="bridgehead" text="Sekcja&#160;%n, &#8222;%t&#8221;"/>
+      <l:template name="chapter" text="Rozdzia&#322;&#160;%n, %t"/>
+      <l:template name="equation" text="R&#243;wnanie&#160;%n, &#8222;%t&#8221;"/>
+      <l:template name="example" text="Przyk&#322;ad&#160;%n, &#8222;%t&#8221;"/>
+      <l:template name="figure" text="Rysunek&#160;%n, &#8222;%t&#8221;"/>
+      <l:template name="part" text="Cz&#281;&#347;&#263;&#160;%n, &#8222;%t&#8221;"/>
+      <l:template name="procedure" text="Procedura&#160;%n, &#8222;%t&#8221;"/>
+      <l:template name="productionset" text="Production&#160;%n, &#8222;%t&#8221;"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n, &#8222;%t&#8221;"/>
+      <l:template name="refsect1" text="the section called &#8222;%t&#8221;"/>
+      <l:template name="refsect2" text="the section called &#8222;%t&#8221;"/>
+      <l:template name="refsect3" text="the section called &#8222;%t&#8221;"/>
+      <l:template name="refsection" text="the section called &#8222;%t&#8221;"/>
+      <l:template name="sect1" text="Sekcja&#160;%n, &#8222;%t&#8221;"/>
+      <l:template name="sect2" text="Sekcja&#160;%n, &#8222;%t&#8221;"/>
+      <l:template name="sect3" text="Sekcja&#160;%n, &#8222;%t&#8221;"/>
+      <l:template name="sect4" text="Sekcja&#160;%n, &#8222;%t&#8221;"/>
+      <l:template name="sect5" text="Sekcja&#160;%n, &#8222;%t&#8221;"/>
+      <l:template name="section" text="Sekcja&#160;%n, &#8222;%t&#8221;"/>
+      <l:template name="simplesect" text="the section called &#8222;%t&#8221;"/>
+      <l:template name="table" text="Tabela&#160;%n, &#8222;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="authorgroup">
+      <l:template name="sep" text=", "/>
+      <l:template name="sep2" text=" i "/>
+      <l:template name="seplast" text=", i "/>
+   </l:context>
+
+   <l:context name="glossary">
+      <l:template name="see" text="Patrz "/>
+      <l:template name="seealso" text="Patrz te&#380; "/>
+   </l:context>
+
+   <l:context name="msgset">
+      <l:template name="MsgAud" text="Odbiorcy: "/>
+      <l:template name="MsgLevel" text="Poziom: "/>
+      <l:template name="MsgOrig" text="Nadawca: "/>
+   </l:context>
+
+   <l:context name="datetime">
+      <l:template name="format" text="m/d/Y" lang="en"/>
+   </l:context>
+
+   <l:context name="datetime-full">
+      <l:template name="January" text="January" lang="en"/>
+      <l:template name="February" text="February" lang="en"/>
+      <l:template name="March" text="March" lang="en"/>
+      <l:template name="April" text="April" lang="en"/>
+      <l:template name="May" text="May" lang="en"/>
+      <l:template name="June" text="June" lang="en"/>
+      <l:template name="July" text="July" lang="en"/>
+      <l:template name="August" text="August" lang="en"/>
+      <l:template name="September" text="September" lang="en"/>
+      <l:template name="October" text="October" lang="en"/>
+      <l:template name="November" text="November" lang="en"/>
+      <l:template name="December" text="December" lang="en"/>
+      <l:template name="Monday" text="Monday" lang="en"/>
+      <l:template name="Tuesday" text="Tuesday" lang="en"/>
+      <l:template name="Wednesday" text="Wednesday" lang="en"/>
+      <l:template name="Thursday" text="Thursday" lang="en"/>
+      <l:template name="Friday" text="Friday" lang="en"/>
+      <l:template name="Saturday" text="Saturday" lang="en"/>
+      <l:template name="Sunday" text="Sunday" lang="en"/>
+   </l:context>
+
+   <l:context name="datetime-abbrev">
+      <l:template name="Jan" text="Jan" lang="en"/>
+      <l:template name="Feb" text="Feb" lang="en"/>
+      <l:template name="Mar" text="Mar" lang="en"/>
+      <l:template name="Apr" text="Apr" lang="en"/>
+      <l:template name="May" text="May" lang="en"/>
+      <l:template name="Jun" text="Jun" lang="en"/>
+      <l:template name="Jul" text="Jul" lang="en"/>
+      <l:template name="Aug" text="Aug" lang="en"/>
+      <l:template name="Sep" text="Sep" lang="en"/>
+      <l:template name="Oct" text="Oct" lang="en"/>
+      <l:template name="Nov" text="Nov" lang="en"/>
+      <l:template name="Dec" text="Dec" lang="en"/>
+      <l:template name="Mon" text="Mon" lang="en"/>
+      <l:template name="Tue" text="Tue" lang="en"/>
+      <l:template name="Wed" text="Wed" lang="en"/>
+      <l:template name="Thu" text="Thu" lang="en"/>
+      <l:template name="Fri" text="Fri" lang="en"/>
+      <l:template name="Sat" text="Sat" lang="en"/>
+      <l:template name="Sun" text="Sun" lang="en"/>
+   </l:context>
+
+   <l:context name="htmlhelp">
+      <l:template name="langcode" text="0x0415 Polish"/>
+   </l:context>
+
+   <l:letters lang="en">
+      <l:l i="-1"/>
+      <l:l i="0">Symbols</l:l>
+      <l:l i="10">A</l:l>
+      <l:l i="10">a</l:l>
+      <l:l i="10">&#192;</l:l>
+      <l:l i="10">&#224;</l:l>
+      <l:l i="10">&#193;</l:l>
+      <l:l i="10">&#225;</l:l>
+      <l:l i="10">&#194;</l:l>
+      <l:l i="10">&#226;</l:l>
+      <l:l i="10">&#195;</l:l>
+      <l:l i="10">&#227;</l:l>
+      <l:l i="10">&#196;</l:l>
+      <l:l i="10">&#228;</l:l>
+      <l:l i="10">&#197;</l:l>
+      <l:l i="10">&#229;</l:l>
+      <l:l i="10">&#256;</l:l>
+      <l:l i="10">&#257;</l:l>
+      <l:l i="10">&#258;</l:l>
+      <l:l i="10">&#259;</l:l>
+      <l:l i="10">&#260;</l:l>
+      <l:l i="10">&#261;</l:l>
+      <l:l i="10">&#461;</l:l>
+      <l:l i="10">&#462;</l:l>
+      <l:l i="10">&#478;</l:l>
+      <l:l i="10">&#479;</l:l>
+      <l:l i="10">&#480;</l:l>
+      <l:l i="10">&#481;</l:l>
+      <l:l i="10">&#506;</l:l>
+      <l:l i="10">&#507;</l:l>
+      <l:l i="10">&#512;</l:l>
+      <l:l i="10">&#513;</l:l>
+      <l:l i="10">&#514;</l:l>
+      <l:l i="10">&#515;</l:l>
+      <l:l i="10">&#550;</l:l>
+      <l:l i="10">&#551;</l:l>
+      <l:l i="10">&#7680;</l:l>
+      <l:l i="10">&#7681;</l:l>
+      <l:l i="10">&#7834;</l:l>
+      <l:l i="10">&#7840;</l:l>
+      <l:l i="10">&#7841;</l:l>
+      <l:l i="10">&#7842;</l:l>
+      <l:l i="10">&#7843;</l:l>
+      <l:l i="10">&#7844;</l:l>
+      <l:l i="10">&#7845;</l:l>
+      <l:l i="10">&#7846;</l:l>
+      <l:l i="10">&#7847;</l:l>
+      <l:l i="10">&#7848;</l:l>
+      <l:l i="10">&#7849;</l:l>
+      <l:l i="10">&#7850;</l:l>
+      <l:l i="10">&#7851;</l:l>
+      <l:l i="10">&#7852;</l:l>
+      <l:l i="10">&#7853;</l:l>
+      <l:l i="10">&#7854;</l:l>
+      <l:l i="10">&#7855;</l:l>
+      <l:l i="10">&#7856;</l:l>
+      <l:l i="10">&#7857;</l:l>
+      <l:l i="10">&#7858;</l:l>
+      <l:l i="10">&#7859;</l:l>
+      <l:l i="10">&#7860;</l:l>
+      <l:l i="10">&#7861;</l:l>
+      <l:l i="10">&#7862;</l:l>
+      <l:l i="10">&#7863;</l:l>
+      <l:l i="20">B</l:l>
+      <l:l i="20">b</l:l>
+      <l:l i="20">&#384;</l:l>
+      <l:l i="20">&#385;</l:l>
+      <l:l i="20">&#595;</l:l>
+      <l:l i="20">&#386;</l:l>
+      <l:l i="20">&#387;</l:l>
+      <l:l i="20">&#7682;</l:l>
+      <l:l i="20">&#7683;</l:l>
+      <l:l i="20">&#7684;</l:l>
+      <l:l i="20">&#7685;</l:l>
+      <l:l i="20">&#7686;</l:l>
+      <l:l i="20">&#7687;</l:l>
+      <l:l i="30">C</l:l>
+      <l:l i="30">c</l:l>
+      <l:l i="30">&#199;</l:l>
+      <l:l i="30">&#231;</l:l>
+      <l:l i="30">&#262;</l:l>
+      <l:l i="30">&#263;</l:l>
+      <l:l i="30">&#264;</l:l>
+      <l:l i="30">&#265;</l:l>
+      <l:l i="30">&#266;</l:l>
+      <l:l i="30">&#267;</l:l>
+      <l:l i="30">&#268;</l:l>
+      <l:l i="30">&#269;</l:l>
+      <l:l i="30">&#391;</l:l>
+      <l:l i="30">&#392;</l:l>
+      <l:l i="30">&#597;</l:l>
+      <l:l i="30">&#7688;</l:l>
+      <l:l i="30">&#7689;</l:l>
+      <l:l i="40">D</l:l>
+      <l:l i="40">d</l:l>
+      <l:l i="40">&#270;</l:l>
+      <l:l i="40">&#271;</l:l>
+      <l:l i="40">&#272;</l:l>
+      <l:l i="40">&#273;</l:l>
+      <l:l i="40">&#394;</l:l>
+      <l:l i="40">&#599;</l:l>
+      <l:l i="40">&#395;</l:l>
+      <l:l i="40">&#396;</l:l>
+      <l:l i="40">&#453;</l:l>
+      <l:l i="40">&#498;</l:l>
+      <l:l i="40">&#545;</l:l>
+      <l:l i="40">&#598;</l:l>
+      <l:l i="40">&#7690;</l:l>
+      <l:l i="40">&#7691;</l:l>
+      <l:l i="40">&#7692;</l:l>
+      <l:l i="40">&#7693;</l:l>
+      <l:l i="40">&#7694;</l:l>
+      <l:l i="40">&#7695;</l:l>
+      <l:l i="40">&#7696;</l:l>
+      <l:l i="40">&#7697;</l:l>
+      <l:l i="40">&#7698;</l:l>
+      <l:l i="40">&#7699;</l:l>
+      <l:l i="50">E</l:l>
+      <l:l i="50">e</l:l>
+      <l:l i="50">&#200;</l:l>
+      <l:l i="50">&#232;</l:l>
+      <l:l i="50">&#201;</l:l>
+      <l:l i="50">&#233;</l:l>
+      <l:l i="50">&#202;</l:l>
+      <l:l i="50">&#234;</l:l>
+      <l:l i="50">&#203;</l:l>
+      <l:l i="50">&#235;</l:l>
+      <l:l i="50">&#274;</l:l>
+      <l:l i="50">&#275;</l:l>
+      <l:l i="50">&#276;</l:l>
+      <l:l i="50">&#277;</l:l>
+      <l:l i="50">&#278;</l:l>
+      <l:l i="50">&#279;</l:l>
+      <l:l i="50">&#280;</l:l>
+      <l:l i="50">&#281;</l:l>
+      <l:l i="50">&#282;</l:l>
+      <l:l i="50">&#283;</l:l>
+      <l:l i="50">&#516;</l:l>
+      <l:l i="50">&#517;</l:l>
+      <l:l i="50">&#518;</l:l>
+      <l:l i="50">&#519;</l:l>
+      <l:l i="50">&#552;</l:l>
+      <l:l i="50">&#553;</l:l>
+      <l:l i="50">&#7700;</l:l>
+      <l:l i="50">&#7701;</l:l>
+      <l:l i="50">&#7702;</l:l>
+      <l:l i="50">&#7703;</l:l>
+      <l:l i="50">&#7704;</l:l>
+      <l:l i="50">&#7705;</l:l>
+      <l:l i="50">&#7706;</l:l>
+      <l:l i="50">&#7707;</l:l>
+      <l:l i="50">&#7708;</l:l>
+      <l:l i="50">&#7709;</l:l>
+      <l:l i="50">&#7864;</l:l>
+      <l:l i="50">&#7865;</l:l>
+      <l:l i="50">&#7866;</l:l>
+      <l:l i="50">&#7867;</l:l>
+      <l:l i="50">&#7868;</l:l>
+      <l:l i="50">&#7869;</l:l>
+      <l:l i="50">&#7870;</l:l>
+      <l:l i="50">&#7871;</l:l>
+      <l:l i="50">&#7872;</l:l>
+      <l:l i="50">&#7873;</l:l>
+      <l:l i="50">&#7874;</l:l>
+      <l:l i="50">&#7875;</l:l>
+      <l:l i="50">&#7876;</l:l>
+      <l:l i="50">&#7877;</l:l>
+      <l:l i="50">&#7878;</l:l>
+      <l:l i="50">&#7879;</l:l>
+      <l:l i="60">F</l:l>
+      <l:l i="60">f</l:l>
+      <l:l i="60">&#401;</l:l>
+      <l:l i="60">&#402;</l:l>
+      <l:l i="60">&#7710;</l:l>
+      <l:l i="60">&#7711;</l:l>
+      <l:l i="70">G</l:l>
+      <l:l i="70">g</l:l>
+      <l:l i="70">&#284;</l:l>
+      <l:l i="70">&#285;</l:l>
+      <l:l i="70">&#286;</l:l>
+      <l:l i="70">&#287;</l:l>
+      <l:l i="70">&#288;</l:l>
+      <l:l i="70">&#289;</l:l>
+      <l:l i="70">&#290;</l:l>
+      <l:l i="70">&#291;</l:l>
+      <l:l i="70">&#403;</l:l>
+      <l:l i="70">&#608;</l:l>
+      <l:l i="70">&#484;</l:l>
+      <l:l i="70">&#485;</l:l>
+      <l:l i="70">&#486;</l:l>
+      <l:l i="70">&#487;</l:l>
+      <l:l i="70">&#500;</l:l>
+      <l:l i="70">&#501;</l:l>
+      <l:l i="70">&#7712;</l:l>
+      <l:l i="70">&#7713;</l:l>
+      <l:l i="80">H</l:l>
+      <l:l i="80">h</l:l>
+      <l:l i="80">&#292;</l:l>
+      <l:l i="80">&#293;</l:l>
+      <l:l i="80">&#294;</l:l>
+      <l:l i="80">&#295;</l:l>
+      <l:l i="80">&#542;</l:l>
+      <l:l i="80">&#543;</l:l>
+      <l:l i="80">&#614;</l:l>
+      <l:l i="80">&#7714;</l:l>
+      <l:l i="80">&#7715;</l:l>
+      <l:l i="80">&#7716;</l:l>
+      <l:l i="80">&#7717;</l:l>
+      <l:l i="80">&#7718;</l:l>
+      <l:l i="80">&#7719;</l:l>
+      <l:l i="80">&#7720;</l:l>
+      <l:l i="80">&#7721;</l:l>
+      <l:l i="80">&#7722;</l:l>
+      <l:l i="80">&#7723;</l:l>
+      <l:l i="80">&#7830;</l:l>
+      <l:l i="90">I</l:l>
+      <l:l i="90">i</l:l>
+      <l:l i="90">&#204;</l:l>
+      <l:l i="90">&#236;</l:l>
+      <l:l i="90">&#205;</l:l>
+      <l:l i="90">&#237;</l:l>
+      <l:l i="90">&#206;</l:l>
+      <l:l i="90">&#238;</l:l>
+      <l:l i="90">&#207;</l:l>
+      <l:l i="90">&#239;</l:l>
+      <l:l i="90">&#296;</l:l>
+      <l:l i="90">&#297;</l:l>
+      <l:l i="90">&#298;</l:l>
+      <l:l i="90">&#299;</l:l>
+      <l:l i="90">&#300;</l:l>
+      <l:l i="90">&#301;</l:l>
+      <l:l i="90">&#302;</l:l>
+      <l:l i="90">&#303;</l:l>
+      <l:l i="90">&#304;</l:l>
+      <l:l i="90">&#407;</l:l>
+      <l:l i="90">&#616;</l:l>
+      <l:l i="90">&#463;</l:l>
+      <l:l i="90">&#464;</l:l>
+      <l:l i="90">&#520;</l:l>
+      <l:l i="90">&#521;</l:l>
+      <l:l i="90">&#522;</l:l>
+      <l:l i="90">&#523;</l:l>
+      <l:l i="90">&#7724;</l:l>
+      <l:l i="90">&#7725;</l:l>
+      <l:l i="90">&#7726;</l:l>
+      <l:l i="90">&#7727;</l:l>
+      <l:l i="90">&#7880;</l:l>
+      <l:l i="90">&#7881;</l:l>
+      <l:l i="90">&#7882;</l:l>
+      <l:l i="90">&#7883;</l:l>
+      <l:l i="100">J</l:l>
+      <l:l i="100">j</l:l>
+      <l:l i="100">&#308;</l:l>
+      <l:l i="100">&#309;</l:l>
+      <l:l i="100">&#496;</l:l>
+      <l:l i="100">&#669;</l:l>
+      <l:l i="110">K</l:l>
+      <l:l i="110">k</l:l>
+      <l:l i="110">&#310;</l:l>
+      <l:l i="110">&#311;</l:l>
+      <l:l i="110">&#408;</l:l>
+      <l:l i="110">&#409;</l:l>
+      <l:l i="110">&#488;</l:l>
+      <l:l i="110">&#489;</l:l>
+      <l:l i="110">&#7728;</l:l>
+      <l:l i="110">&#7729;</l:l>
+      <l:l i="110">&#7730;</l:l>
+      <l:l i="110">&#7731;</l:l>
+      <l:l i="110">&#7732;</l:l>
+      <l:l i="110">&#7733;</l:l>
+      <l:l i="120">L</l:l>
+      <l:l i="120">l</l:l>
+      <l:l i="120">&#313;</l:l>
+      <l:l i="120">&#314;</l:l>
+      <l:l i="120">&#315;</l:l>
+      <l:l i="120">&#316;</l:l>
+      <l:l i="120">&#317;</l:l>
+      <l:l i="120">&#318;</l:l>
+      <l:l i="120">&#319;</l:l>
+      <l:l i="120">&#320;</l:l>
+      <l:l i="120">&#321;</l:l>
+      <l:l i="120">&#322;</l:l>
+      <l:l i="120">&#410;</l:l>
+      <l:l i="120">&#456;</l:l>
+      <l:l i="120">&#564;</l:l>
+      <l:l i="120">&#619;</l:l>
+      <l:l i="120">&#620;</l:l>
+      <l:l i="120">&#621;</l:l>
+      <l:l i="120">&#7734;</l:l>
+      <l:l i="120">&#7735;</l:l>
+      <l:l i="120">&#7736;</l:l>
+      <l:l i="120">&#7737;</l:l>
+      <l:l i="120">&#7738;</l:l>
+      <l:l i="120">&#7739;</l:l>
+      <l:l i="120">&#7740;</l:l>
+      <l:l i="120">&#7741;</l:l>
+      <l:l i="130">M</l:l>
+      <l:l i="130">m</l:l>
+      <l:l i="130">&#625;</l:l>
+      <l:l i="130">&#7742;</l:l>
+      <l:l i="130">&#7743;</l:l>
+      <l:l i="130">&#7744;</l:l>
+      <l:l i="130">&#7745;</l:l>
+      <l:l i="130">&#7746;</l:l>
+      <l:l i="130">&#7747;</l:l>
+      <l:l i="140">N</l:l>
+      <l:l i="140">n</l:l>
+      <l:l i="140">&#209;</l:l>
+      <l:l i="140">&#241;</l:l>
+      <l:l i="140">&#323;</l:l>
+      <l:l i="140">&#324;</l:l>
+      <l:l i="140">&#325;</l:l>
+      <l:l i="140">&#326;</l:l>
+      <l:l i="140">&#327;</l:l>
+      <l:l i="140">&#328;</l:l>
+      <l:l i="140">&#413;</l:l>
+      <l:l i="140">&#626;</l:l>
+      <l:l i="140">&#414;</l:l>
+      <l:l i="140">&#544;</l:l>
+      <l:l i="140">&#459;</l:l>
+      <l:l i="140">&#504;</l:l>
+      <l:l i="140">&#505;</l:l>
+      <l:l i="140">&#565;</l:l>
+      <l:l i="140">&#627;</l:l>
+      <l:l i="140">&#7748;</l:l>
+      <l:l i="140">&#7749;</l:l>
+      <l:l i="140">&#7750;</l:l>
+      <l:l i="140">&#7751;</l:l>
+      <l:l i="140">&#7752;</l:l>
+      <l:l i="140">&#7753;</l:l>
+      <l:l i="140">&#7754;</l:l>
+      <l:l i="140">&#7755;</l:l>
+      <l:l i="150">O</l:l>
+      <l:l i="150">o</l:l>
+      <l:l i="150">&#210;</l:l>
+      <l:l i="150">&#242;</l:l>
+      <l:l i="150">&#211;</l:l>
+      <l:l i="150">&#243;</l:l>
+      <l:l i="150">&#212;</l:l>
+      <l:l i="150">&#244;</l:l>
+      <l:l i="150">&#213;</l:l>
+      <l:l i="150">&#245;</l:l>
+      <l:l i="150">&#214;</l:l>
+      <l:l i="150">&#246;</l:l>
+      <l:l i="150">&#216;</l:l>
+      <l:l i="150">&#248;</l:l>
+      <l:l i="150">&#332;</l:l>
+      <l:l i="150">&#333;</l:l>
+      <l:l i="150">&#334;</l:l>
+      <l:l i="150">&#335;</l:l>
+      <l:l i="150">&#336;</l:l>
+      <l:l i="150">&#337;</l:l>
+      <l:l i="150">&#415;</l:l>
+      <l:l i="150">&#416;</l:l>
+      <l:l i="150">&#417;</l:l>
+      <l:l i="150">&#465;</l:l>
+      <l:l i="150">&#466;</l:l>
+      <l:l i="150">&#490;</l:l>
+      <l:l i="150">&#491;</l:l>
+      <l:l i="150">&#492;</l:l>
+      <l:l i="150">&#493;</l:l>
+      <l:l i="150">&#510;</l:l>
+      <l:l i="150">&#511;</l:l>
+      <l:l i="150">&#524;</l:l>
+      <l:l i="150">&#525;</l:l>
+      <l:l i="150">&#526;</l:l>
+      <l:l i="150">&#527;</l:l>
+      <l:l i="150">&#554;</l:l>
+      <l:l i="150">&#555;</l:l>
+      <l:l i="150">&#556;</l:l>
+      <l:l i="150">&#557;</l:l>
+      <l:l i="150">&#558;</l:l>
+      <l:l i="150">&#559;</l:l>
+      <l:l i="150">&#560;</l:l>
+      <l:l i="150">&#561;</l:l>
+      <l:l i="150">&#7756;</l:l>
+      <l:l i="150">&#7757;</l:l>
+      <l:l i="150">&#7758;</l:l>
+      <l:l i="150">&#7759;</l:l>
+      <l:l i="150">&#7760;</l:l>
+      <l:l i="150">&#7761;</l:l>
+      <l:l i="150">&#7762;</l:l>
+      <l:l i="150">&#7763;</l:l>
+      <l:l i="150">&#7884;</l:l>
+      <l:l i="150">&#7885;</l:l>
+      <l:l i="150">&#7886;</l:l>
+      <l:l i="150">&#7887;</l:l>
+      <l:l i="150">&#7888;</l:l>
+      <l:l i="150">&#7889;</l:l>
+      <l:l i="150">&#7890;</l:l>
+      <l:l i="150">&#7891;</l:l>
+      <l:l i="150">&#7892;</l:l>
+      <l:l i="150">&#7893;</l:l>
+      <l:l i="150">&#7894;</l:l>
+      <l:l i="150">&#7895;</l:l>
+      <l:l i="150">&#7896;</l:l>
+      <l:l i="150">&#7897;</l:l>
+      <l:l i="150">&#7898;</l:l>
+      <l:l i="150">&#7899;</l:l>
+      <l:l i="150">&#7900;</l:l>
+      <l:l i="150">&#7901;</l:l>
+      <l:l i="150">&#7902;</l:l>
+      <l:l i="150">&#7903;</l:l>
+      <l:l i="150">&#7904;</l:l>
+      <l:l i="150">&#7905;</l:l>
+      <l:l i="150">&#7906;</l:l>
+      <l:l i="150">&#7907;</l:l>
+      <l:l i="160">P</l:l>
+      <l:l i="160">p</l:l>
+      <l:l i="160">&#420;</l:l>
+      <l:l i="160">&#421;</l:l>
+      <l:l i="160">&#7764;</l:l>
+      <l:l i="160">&#7765;</l:l>
+      <l:l i="160">&#7766;</l:l>
+      <l:l i="160">&#7767;</l:l>
+      <l:l i="170">Q</l:l>
+      <l:l i="170">q</l:l>
+      <l:l i="170">&#672;</l:l>
+      <l:l i="180">R</l:l>
+      <l:l i="180">r</l:l>
+      <l:l i="180">&#340;</l:l>
+      <l:l i="180">&#341;</l:l>
+      <l:l i="180">&#342;</l:l>
+      <l:l i="180">&#343;</l:l>
+      <l:l i="180">&#344;</l:l>
+      <l:l i="180">&#345;</l:l>
+      <l:l i="180">&#528;</l:l>
+      <l:l i="180">&#529;</l:l>
+      <l:l i="180">&#530;</l:l>
+      <l:l i="180">&#531;</l:l>
+      <l:l i="180">&#636;</l:l>
+      <l:l i="180">&#637;</l:l>
+      <l:l i="180">&#638;</l:l>
+      <l:l i="180">&#7768;</l:l>
+      <l:l i="180">&#7769;</l:l>
+      <l:l i="180">&#7770;</l:l>
+      <l:l i="180">&#7771;</l:l>
+      <l:l i="180">&#7772;</l:l>
+      <l:l i="180">&#7773;</l:l>
+      <l:l i="180">&#7774;</l:l>
+      <l:l i="180">&#7775;</l:l>
+      <l:l i="190">S</l:l>
+      <l:l i="190">s</l:l>
+      <l:l i="190">&#346;</l:l>
+      <l:l i="190">&#347;</l:l>
+      <l:l i="190">&#348;</l:l>
+      <l:l i="190">&#349;</l:l>
+      <l:l i="190">&#350;</l:l>
+      <l:l i="190">&#351;</l:l>
+      <l:l i="190">&#352;</l:l>
+      <l:l i="190">&#353;</l:l>
+      <l:l i="190">&#536;</l:l>
+      <l:l i="190">&#537;</l:l>
+      <l:l i="190">&#642;</l:l>
+      <l:l i="190">&#7776;</l:l>
+      <l:l i="190">&#7777;</l:l>
+      <l:l i="190">&#7778;</l:l>
+      <l:l i="190">&#7779;</l:l>
+      <l:l i="190">&#7780;</l:l>
+      <l:l i="190">&#7781;</l:l>
+      <l:l i="190">&#7782;</l:l>
+      <l:l i="190">&#7783;</l:l>
+      <l:l i="190">&#7784;</l:l>
+      <l:l i="190">&#7785;</l:l>
+      <l:l i="200">T</l:l>
+      <l:l i="200">t</l:l>
+      <l:l i="200">&#354;</l:l>
+      <l:l i="200">&#355;</l:l>
+      <l:l i="200">&#356;</l:l>
+      <l:l i="200">&#357;</l:l>
+      <l:l i="200">&#358;</l:l>
+      <l:l i="200">&#359;</l:l>
+      <l:l i="200">&#427;</l:l>
+      <l:l i="200">&#428;</l:l>
+      <l:l i="200">&#429;</l:l>
+      <l:l i="200">&#430;</l:l>
+      <l:l i="200">&#648;</l:l>
+      <l:l i="200">&#538;</l:l>
+      <l:l i="200">&#539;</l:l>
+      <l:l i="200">&#566;</l:l>
+      <l:l i="200">&#7786;</l:l>
+      <l:l i="200">&#7787;</l:l>
+      <l:l i="200">&#7788;</l:l>
+      <l:l i="200">&#7789;</l:l>
+      <l:l i="200">&#7790;</l:l>
+      <l:l i="200">&#7791;</l:l>
+      <l:l i="200">&#7792;</l:l>
+      <l:l i="200">&#7793;</l:l>
+      <l:l i="200">&#7831;</l:l>
+      <l:l i="210">U</l:l>
+      <l:l i="210">u</l:l>
+      <l:l i="210">&#217;</l:l>
+      <l:l i="210">&#249;</l:l>
+      <l:l i="210">&#218;</l:l>
+      <l:l i="210">&#250;</l:l>
+      <l:l i="210">&#219;</l:l>
+      <l:l i="210">&#251;</l:l>
+      <l:l i="210">&#220;</l:l>
+      <l:l i="210">&#252;</l:l>
+      <l:l i="210">&#360;</l:l>
+      <l:l i="210">&#361;</l:l>
+      <l:l i="210">&#362;</l:l>
+      <l:l i="210">&#363;</l:l>
+      <l:l i="210">&#364;</l:l>
+      <l:l i="210">&#365;</l:l>
+      <l:l i="210">&#366;</l:l>
+      <l:l i="210">&#367;</l:l>
+      <l:l i="210">&#368;</l:l>
+      <l:l i="210">&#369;</l:l>
+      <l:l i="210">&#370;</l:l>
+      <l:l i="210">&#371;</l:l>
+      <l:l i="210">&#431;</l:l>
+      <l:l i="210">&#432;</l:l>
+      <l:l i="210">&#467;</l:l>
+      <l:l i="210">&#468;</l:l>
+      <l:l i="210">&#469;</l:l>
+      <l:l i="210">&#470;</l:l>
+      <l:l i="210">&#471;</l:l>
+      <l:l i="210">&#472;</l:l>
+      <l:l i="210">&#473;</l:l>
+      <l:l i="210">&#474;</l:l>
+      <l:l i="210">&#475;</l:l>
+      <l:l i="210">&#476;</l:l>
+      <l:l i="210">&#532;</l:l>
+      <l:l i="210">&#533;</l:l>
+      <l:l i="210">&#534;</l:l>
+      <l:l i="210">&#535;</l:l>
+      <l:l i="210">&#7794;</l:l>
+      <l:l i="210">&#7795;</l:l>
+      <l:l i="210">&#7796;</l:l>
+      <l:l i="210">&#7797;</l:l>
+      <l:l i="210">&#7798;</l:l>
+      <l:l i="210">&#7799;</l:l>
+      <l:l i="210">&#7800;</l:l>
+      <l:l i="210">&#7801;</l:l>
+      <l:l i="210">&#7802;</l:l>
+      <l:l i="210">&#7803;</l:l>
+      <l:l i="210">&#7908;</l:l>
+      <l:l i="210">&#7909;</l:l>
+      <l:l i="210">&#7910;</l:l>
+      <l:l i="210">&#7911;</l:l>
+      <l:l i="210">&#7912;</l:l>
+      <l:l i="210">&#7913;</l:l>
+      <l:l i="210">&#7914;</l:l>
+      <l:l i="210">&#7915;</l:l>
+      <l:l i="210">&#7916;</l:l>
+      <l:l i="210">&#7917;</l:l>
+      <l:l i="210">&#7918;</l:l>
+      <l:l i="210">&#7919;</l:l>
+      <l:l i="210">&#7920;</l:l>
+      <l:l i="210">&#7921;</l:l>
+      <l:l i="220">V</l:l>
+      <l:l i="220">v</l:l>
+      <l:l i="220">&#434;</l:l>
+      <l:l i="220">&#651;</l:l>
+      <l:l i="220">&#7804;</l:l>
+      <l:l i="220">&#7805;</l:l>
+      <l:l i="220">&#7806;</l:l>
+      <l:l i="220">&#7807;</l:l>
+      <l:l i="230">W</l:l>
+      <l:l i="230">w</l:l>
+      <l:l i="230">&#372;</l:l>
+      <l:l i="230">&#373;</l:l>
+      <l:l i="230">&#7808;</l:l>
+      <l:l i="230">&#7809;</l:l>
+      <l:l i="230">&#7810;</l:l>
+      <l:l i="230">&#7811;</l:l>
+      <l:l i="230">&#7812;</l:l>
+      <l:l i="230">&#7813;</l:l>
+      <l:l i="230">&#7814;</l:l>
+      <l:l i="230">&#7815;</l:l>
+      <l:l i="230">&#7816;</l:l>
+      <l:l i="230">&#7817;</l:l>
+      <l:l i="230">&#7832;</l:l>
+      <l:l i="240">X</l:l>
+      <l:l i="240">x</l:l>
+      <l:l i="240">&#7818;</l:l>
+      <l:l i="240">&#7819;</l:l>
+      <l:l i="240">&#7820;</l:l>
+      <l:l i="240">&#7821;</l:l>
+      <l:l i="250">Y</l:l>
+      <l:l i="250">y</l:l>
+      <l:l i="250">&#221;</l:l>
+      <l:l i="250">&#253;</l:l>
+      <l:l i="250">&#255;</l:l>
+      <l:l i="250">&#376;</l:l>
+      <l:l i="250">&#374;</l:l>
+      <l:l i="250">&#375;</l:l>
+      <l:l i="250">&#435;</l:l>
+      <l:l i="250">&#436;</l:l>
+      <l:l i="250">&#562;</l:l>
+      <l:l i="250">&#563;</l:l>
+      <l:l i="250">&#7822;</l:l>
+      <l:l i="250">&#7823;</l:l>
+      <l:l i="250">&#7833;</l:l>
+      <l:l i="250">&#7922;</l:l>
+      <l:l i="250">&#7923;</l:l>
+      <l:l i="250">&#7924;</l:l>
+      <l:l i="250">&#7925;</l:l>
+      <l:l i="250">&#7926;</l:l>
+      <l:l i="250">&#7927;</l:l>
+      <l:l i="250">&#7928;</l:l>
+      <l:l i="250">&#7929;</l:l>
+      <l:l i="260">Z</l:l>
+      <l:l i="260">z</l:l>
+      <l:l i="260">&#377;</l:l>
+      <l:l i="260">&#378;</l:l>
+      <l:l i="260">&#379;</l:l>
+      <l:l i="260">&#380;</l:l>
+      <l:l i="260">&#381;</l:l>
+      <l:l i="260">&#382;</l:l>
+      <l:l i="260">&#437;</l:l>
+      <l:l i="260">&#438;</l:l>
+      <l:l i="260">&#548;</l:l>
+      <l:l i="260">&#549;</l:l>
+      <l:l i="260">&#656;</l:l>
+      <l:l i="260">&#657;</l:l>
+      <l:l i="260">&#7824;</l:l>
+      <l:l i="260">&#7825;</l:l>
+      <l:l i="260">&#7826;</l:l>
+      <l:l i="260">&#7827;</l:l>
+      <l:l i="260">&#7828;</l:l>
+      <l:l i="260">&#7829;</l:l>
+   </l:letters>
+</l:l10n>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/pt.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/pt.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/pt.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1153 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="pt" english-language-name="Portuguese">
+
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+   <l:gentext key="Abstract" text="Resumo"/>
+   <l:gentext key="abstract" text="Resumo"/>
+   <l:gentext key="Answer" text="R:"/>
+   <l:gentext key="answer" text="R:"/>
+   <l:gentext key="Appendix" text="Ap&#234;ndice"/>
+   <l:gentext key="appendix" text="ap&#234;ndice"/>
+   <l:gentext key="Article" text="Artigo"/>
+   <l:gentext key="article" text="Artigo"/>
+   <l:gentext key="Bibliography" text="Bibliografia"/>
+   <l:gentext key="bibliography" text="Bibliografia"/>
+   <l:gentext key="Book" text="Livro"/>
+   <l:gentext key="book" text="Livro"/>
+   <l:gentext key="CAUTION" text="CAUTELA"/>
+   <l:gentext key="Caution" text="Cautela"/>
+   <l:gentext key="caution" text="Cautela"/>
+   <l:gentext key="Chapter" text="Cap&#237;tulo"/>
+   <l:gentext key="chapter" text="cap&#237;tulo"/>
+   <l:gentext key="Colophon" text="Colophon"/>
+   <l:gentext key="colophon" text="Colophon"/>
+   <l:gentext key="Copyright" text="Copyright"/>
+   <l:gentext key="copyright" text="Copyright"/>
+   <l:gentext key="Dedication" text="Dedicat&#243;ria"/>
+   <l:gentext key="dedication" text="Dedicat&#243;ria"/>
+   <l:gentext key="Edition" text="Edi&#231;&#227;o"/>
+   <l:gentext key="edition" text="Edi&#231;&#227;o"/>
+   <l:gentext key="Equation" text="Equa&#231;&#227;o"/>
+   <l:gentext key="equation" text="Equa&#231;&#227;o"/>
+   <l:gentext key="Example" text="Exemplo"/>
+   <l:gentext key="example" text="Exemplo"/>
+   <l:gentext key="Figure" text="Figura"/>
+   <l:gentext key="figure" text="Figura"/>
+   <l:gentext key="Glossary" text="Gloss&#193;rio"/>
+   <l:gentext key="glossary" text="Gloss&#193;rio"/>
+   <l:gentext key="GlossSee" text="Ver"/>
+   <l:gentext key="glosssee" text="Ver"/>
+   <l:gentext key="GlossSeeAlso" text="Ver Tamb&#233;m"/>
+   <l:gentext key="glossseealso" text="Ver Tamb&#233;m"/>
+   <l:gentext key="IMPORTANT" text="IMPORTANTE"/>
+   <l:gentext key="important" text="Importante"/>
+   <l:gentext key="Important" text="Importante"/>
+   <l:gentext key="Index" text="&#205;ndice Remissivo"/>
+   <l:gentext key="index" text="&#205;ndice Remissivo"/>
+   <l:gentext key="ISBN" text="ISBN"/>
+   <l:gentext key="isbn" text="ISBN"/>
+   <l:gentext key="LegalNotice" text="Aviso Legal"/>
+   <l:gentext key="legalnotice" text="Aviso Legal"/>
+   <l:gentext key="MsgAud" text="Audi&#234;ncia"/>
+   <l:gentext key="msgaud" text="Audi&#234;ncia"/>
+   <l:gentext key="MsgLevel" text="N&#237;vel"/>
+   <l:gentext key="msglevel" text="N&#237;vel"/>
+   <l:gentext key="MsgOrig" text="Origem"/>
+   <l:gentext key="msgorig" text="Origem"/>
+   <l:gentext key="NOTE" text="NOTA"/>
+   <l:gentext key="Note" text="Nota"/>
+   <l:gentext key="note" text="Nota"/>
+   <l:gentext key="Part" text="Parte"/>
+   <l:gentext key="part" text="Parte"/>
+   <l:gentext key="Preface" text="Pref&#225;cio"/>
+   <l:gentext key="preface" text="Pref&#225;cio"/>
+   <l:gentext key="Procedure" text="Procedimento"/>
+   <l:gentext key="procedure" text="Procedimento"/>
+   <l:gentext key="ProductionSet" text="Production"/>
+   <l:gentext key="PubDate" text="Editado"/>
+   <l:gentext key="pubdate" text="Editado"/>
+   <l:gentext key="Published" text="Publicado"/>
+   <l:gentext key="published" text="Publicado"/>
+   <l:gentext key="Qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="Question" text="P:"/>
+   <l:gentext key="question" text="P:"/>
+   <l:gentext key="RefEntry" text=""/>
+   <l:gentext key="refentry" text=""/>
+   <l:gentext key="Reference" text="Refer&#234;ncia"/>
+   <l:gentext key="reference" text="Refer&#234;ncia"/>
+   <l:gentext key="RefName" text="Nome"/>
+   <l:gentext key="refname" text="Nome"/>
+   <l:gentext key="RefSection" text=""/>
+   <l:gentext key="refsection" text=""/>
+   <l:gentext key="RefSynopsisDiv" text="Sinopse"/>
+   <l:gentext key="refsynopsisdiv" text="Sinopse"/>
+   <l:gentext key="RevHistory" text="Historial de Revis&#245;es"/>
+   <l:gentext key="revhistory" text="Historial de Revis&#245;es"/>
+   <l:gentext key="revision" text="Revis&#227;o"/>
+   <l:gentext key="Revision" text="Revis&#227;o"/>
+   <l:gentext key="sect1" text="Section"/>
+   <l:gentext key="sect2" text="Section"/>
+   <l:gentext key="sect3" text="Section"/>
+   <l:gentext key="sect4" text="Section"/>
+   <l:gentext key="sect5" text="Section"/>
+   <l:gentext key="section" text="sec&#231;&#227;o"/>
+   <l:gentext key="Section" text="Sec&#231;&#227;o"/>
+   <l:gentext key="see" text="Ver"/>
+   <l:gentext key="See" text="Ver"/>
+   <l:gentext key="seealso" text="Ver Tamb&#233;m"/>
+   <l:gentext key="Seealso" text="ver tamb&#233;m"/>
+   <l:gentext key="SeeAlso" text="Ver Tamb&#233;m"/>
+   <l:gentext key="set" text="Set"/>
+   <l:gentext key="Set" text="Set"/>
+   <l:gentext key="setindex" text="Set Index"/>
+   <l:gentext key="SetIndex" text="Set Index"/>
+   <l:gentext key="Sidebar" text="Sidebar"/>
+   <l:gentext key="sidebar" text="sidebar"/>
+   <l:gentext key="step" text="passo"/>
+   <l:gentext key="Step" text="Passo"/>
+   <l:gentext key="Table" text="Tabela"/>
+   <l:gentext key="table" text="Tabela"/>
+   <l:gentext key="tip" text="Dica"/>
+   <l:gentext key="TIP" text="DICA"/>
+   <l:gentext key="Tip" text="Dica"/>
+   <l:gentext key="Warning" text="Aten&#231;&#227;o"/>
+   <l:gentext key="warning" text="Aten&#231;&#227;o"/>
+   <l:gentext key="WARNING" text="ATEN&#199;&#195;O"/>
+   <l:gentext key="and" text="e"/>
+   <l:gentext key="by" text="por"/>
+   <l:gentext key="called" text="called" lang="en"/>
+   <l:gentext key="Edited" text="Editado"/>
+   <l:gentext key="edited" text="Editado"/>
+   <l:gentext key="Editedby" text="Editado por"/>
+   <l:gentext key="editedby" text="Editado por"/>
+   <l:gentext key="in" text="in"/>
+   <l:gentext key="lastlistcomma" text=","/>
+   <l:gentext key="listcomma" text=","/>
+   <l:gentext key="nonexistantelement" text="non-existant element"/>
+   <l:gentext key="notes" text="Notas"/>
+   <l:gentext key="Notes" text="Notas"/>
+   <l:gentext key="Pgs" text="P&#225;ginas"/>
+   <l:gentext key="pgs" text="P&#225;ginas"/>
+   <l:gentext key="Revisedby" text="Revised by: "/>
+   <l:gentext key="revisedby" text="Revised by: "/>
+   <l:gentext key="TableNotes" text="Notas"/>
+   <l:gentext key="tablenotes" text="Notas"/>
+   <l:gentext key="TableofContents" text="&#205;ndice"/>
+   <l:gentext key="tableofcontents" text="&#205;ndice"/>
+   <l:gentext key="the" text="" lang="en"/>
+   <l:gentext key="unexpectedelementname" text="Unexpected element name"/>
+   <l:gentext key="unsupported" text="unsupported"/>
+   <l:gentext key="xrefto" text="xref to"/>
+   <l:gentext key="listofequations" text="Lista de Equa&#231;&#245;es"/>
+   <l:gentext key="ListofEquations" text="Lista de Equa&#231;&#245;es"/>
+   <l:gentext key="ListofExamples" text="Lista de Exemplos"/>
+   <l:gentext key="listofexamples" text="Lista de Exemplos"/>
+   <l:gentext key="ListofFigures" text="Lista de Figuras"/>
+   <l:gentext key="listoffigures" text="Lista de Figuras"/>
+   <l:gentext key="ListofProcedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listofprocedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listoftables" text="Lista de Tabelas"/>
+   <l:gentext key="ListofTables" text="Lista de Tabelas"/>
+   <l:gentext key="ListofUnknown" text="List of ???"/>
+   <l:gentext key="listofunknown" text="List of ???"/>
+   <l:gentext key="nav-home" text="Home"/>
+   <l:gentext key="nav-next" text="Next"/>
+   <l:gentext key="nav-next-sibling" text="Fast Forward"/>
+   <l:gentext key="nav-prev" text="Prev"/>
+   <l:gentext key="nav-prev-sibling" text="Fast Backward"/>
+   <l:gentext key="nav-up" text="Up"/>
+   <l:gentext key="nav-toc" text="ToC" lang="en"/>
+   <l:gentext key="Draft" text="Draft"/>
+   <l:gentext key="above" text="above"/>
+   <l:gentext key="below" text="below"/>
+   <l:gentext key="sectioncalled" text="the section called"/>
+   <l:gentext key="index symbols" text="Symbols"/>
+   <l:gentext key="lowercase.alpha" text="abcdefghijklmnopqrstuvwxyz"/>
+   <l:gentext key="uppercase.alpha" text="ABCDEFGHIJKLMNOPQRSTUVWXYZ"/>
+   <l:dingbat key="startquote" text="&#8220;"/>
+   <l:dingbat key="endquote" text="&#8221;"/>
+   <l:dingbat key="nestedstartquote" text="&#8216;"/>
+   <l:dingbat key="nestedendquote" text="&#8217;"/>
+   <l:dingbat key="singlestartquote" text="&#8216;" lang="en"/>
+   <l:dingbat key="singleendquote" text="&#8217;" lang="en"/>
+   <l:dingbat key="bullet" text="&#8226;"/>
+   <l:gentext key="hyphenation-character" text="-" lang="en"/>
+   <l:gentext key="hyphenation-push-character-count" text="2" lang="en"/>
+   <l:gentext key="hyphenation-remain-character-count" text="2" lang="en"/>
+
+   <l:context name="styles">
+      <l:template name="person-name" text="first-last"/>
+   </l:context>
+
+   <l:context name="title">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="%t"/>
+      <l:template name="appendix" text="Ap&#234;ndice %n. %t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="biblioentry" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliolist" text="%t" lang="en"/>
+      <l:template name="bibliomixed" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="Cap&#237;tulo %n. %t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="Equa&#231;&#227;o %n. %t"/>
+      <l:template name="example" text="Exemplo %n. %t"/>
+      <l:template name="figure" text="Figura %n. %t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="glosslist" text="%t" lang="en"/>
+      <l:template name="glossentry" text="%t" lang="en"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text=""/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="Parte %n. %t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="procedure.formal" text="Procedimento&#160;%n.&#160;%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="productionset.formal" text="Production&#160;%n"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="%t"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="Pergunta %n"/>
+      <l:template name="refentry" text="%t"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsection" text="%t"/>
+      <l:template name="refsect1" text="%t"/>
+      <l:template name="refsect2" text="%t"/>
+      <l:template name="refsect3" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="refsynopsisdivinfo" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="step" text="%t"/>
+      <l:template name="table" text="Tabela %n. %t"/>
+      <l:template name="task" text="%t" lang="en"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="" lang="en"/>
+      <l:template name="warning" text="%t"/>
+   </l:context>
+
+   <l:context name="title-unnumbered">
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article/appendix" text="%t" lang="en"/>
+      <l:template name="bridgehead" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="sect1" text="%t"/>
+      <l:template name="sect2" text="%t"/>
+      <l:template name="sect3" text="%t"/>
+      <l:template name="sect4" text="%t"/>
+      <l:template name="sect5" text="%t"/>
+      <l:template name="section" text="%t"/>
+      <l:template name="simplesect" text="%t"/>
+   </l:context>
+
+   <l:context name="title-numbered">
+      <l:template name="appendix" text="Ap&#234;ndice %n. %t"/>
+      <l:template name="article/appendix" text="%n.&#160;%t" lang="en"/>
+      <l:template name="bridgehead" text="%t"/>
+      <l:template name="chapter" text="Cap&#237;tulo %n. %t"/>
+      <l:template name="sect1" text="%n. %t"/>
+      <l:template name="sect2" text="%n. %t"/>
+      <l:template name="sect3" text="%n. %t"/>
+      <l:template name="sect4" text="%n. %t"/>
+      <l:template name="sect5" text="%n. %t"/>
+      <l:template name="section" text="%n. %t"/>
+      <l:template name="simplesect" text="%n. %t"/>
+   </l:context>
+
+   <l:context name="subtitle">
+      <l:template name="appendix" text="%s"/>
+      <l:template name="article" text="%s"/>
+      <l:template name="bibliodiv" text="%s"/>
+      <l:template name="biblioentry" text="%s"/>
+      <l:template name="bibliography" text="%s"/>
+      <l:template name="bibliomixed" text="%s"/>
+      <l:template name="bibliomset" text="%s"/>
+      <l:template name="biblioset" text="%s"/>
+      <l:template name="book" text="%s"/>
+      <l:template name="chapter" text="%s"/>
+      <l:template name="colophon" text="%s"/>
+      <l:template name="dedication" text="%s"/>
+      <l:template name="glossary" text="%s"/>
+      <l:template name="glossdiv" text="%s"/>
+      <l:template name="index" text="%s"/>
+      <l:template name="indexdiv" text="%s"/>
+      <l:template name="lot" text="%s"/>
+      <l:template name="part" text="%s"/>
+      <l:template name="partintro" text="%s"/>
+      <l:template name="preface" text="%s"/>
+      <l:template name="refentry" text="%s"/>
+      <l:template name="reference" text="%s"/>
+      <l:template name="refsection" text="%s"/>
+      <l:template name="refsect1" text="%s"/>
+      <l:template name="refsect2" text="%s"/>
+      <l:template name="refsect3" text="%s"/>
+      <l:template name="refsynopsisdiv" text="%s"/>
+      <l:template name="sect1" text="%s"/>
+      <l:template name="sect2" text="%s"/>
+      <l:template name="sect3" text="%s"/>
+      <l:template name="sect4" text="%s"/>
+      <l:template name="sect5" text="%s"/>
+      <l:template name="section" text="%s"/>
+      <l:template name="set" text="%s"/>
+      <l:template name="setindex" text="%s"/>
+      <l:template name="sidebar" text="%s"/>
+      <l:template name="simplesect" text="%s"/>
+      <l:template name="toc" text="%s"/>
+   </l:context>
+
+   <l:context name="xref">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="R:&#160;%n"/>
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="constraintdef" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="%t"/>
+      <l:template name="example" text="%t"/>
+      <l:template name="figure" text="%t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text="%n"/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="%t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="P:&#160;%n"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="P:&#160;%n"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="table" text="%t"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="%n"/>
+      <l:template name="warning" text="%t"/>
+      <l:template name="page.citation" text=" [%p]"/>
+      <l:template name="page" text="(page %p)" lang="en"/>
+      <l:template name="pageabbrev" text="(p. %p)" lang="en"/>
+      <l:template name="Page" text="Page %p" lang="en"/>
+      <l:template name="bridgehead" text="&#8220;%t&#8221;"/>
+      <l:template name="refsection" text="&#8220;%t&#8221;"/>
+      <l:template name="refsect1" text="&#8220;%t&#8221;"/>
+      <l:template name="refsect2" text="&#8220;%t&#8221;"/>
+      <l:template name="refsect3" text="&#8220;%t&#8221;"/>
+      <l:template name="sect1" text="&#8220;%t&#8221;"/>
+      <l:template name="sect2" text="&#8220;%t&#8221;"/>
+      <l:template name="sect3" text="&#8220;%t&#8221;"/>
+      <l:template name="sect4" text="&#8220;%t&#8221;"/>
+      <l:template name="sect5" text="&#8220;%t&#8221;"/>
+      <l:template name="section" text="&#8220;%t&#8221;"/>
+      <l:template name="simplesect" text="&#8220;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="xref-number">
+      <l:template name="answer" text="R:&#160;%n"/>
+      <l:template name="appendix" text="Ap&#234;ndice&#160;%n"/>
+      <l:template name="bridgehead" text="Sec&#231;&#227;o&#160;%n"/>
+      <l:template name="chapter" text="Cap&#237;tulo&#160;%n"/>
+      <l:template name="equation" text="Equa&#231;&#227;o&#160;%n"/>
+      <l:template name="example" text="Exemplo&#160;%n"/>
+      <l:template name="figure" text="Figura&#160;%n"/>
+      <l:template name="part" text="Parte&#160;%n"/>
+      <l:template name="procedure" text="Procedimento&#160;%n"/>
+      <l:template name="productionset" text="Production&#160;%n"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n"/>
+      <l:template name="qandaentry" text="P:&#160;%n"/>
+      <l:template name="question" text="P:&#160;%n"/>
+      <l:template name="sect1" text="Sec&#231;&#227;o&#160;%n"/>
+      <l:template name="sect2" text="Sec&#231;&#227;o&#160;%n"/>
+      <l:template name="sect3" text="Sec&#231;&#227;o&#160;%n"/>
+      <l:template name="sect4" text="Sec&#231;&#227;o&#160;%n"/>
+      <l:template name="sect5" text="Sec&#231;&#227;o&#160;%n"/>
+      <l:template name="section" text="Sec&#231;&#227;o&#160;%n"/>
+      <l:template name="table" text="Tabela&#160;%n"/>
+   </l:context>
+
+   <l:context name="xref-number-and-title">
+      <l:template name="appendix" text="Ap&#234;ndice&#160;%n, %t"/>
+      <l:template name="bridgehead" text="Sec&#231;&#227;o&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="chapter" text="Cap&#237;tulo&#160;%n, %t"/>
+      <l:template name="equation" text="Equa&#231;&#227;o&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="example" text="Exemplo&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="figure" text="Figura&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="part" text="Parte&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="procedure" text="Procedimento&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="productionset" text="Production&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="refsect1" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="refsect2" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="refsect3" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="refsection" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="sect1" text="Sec&#231;&#227;o&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect2" text="Sec&#231;&#227;o&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect3" text="Sec&#231;&#227;o&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect4" text="Sec&#231;&#227;o&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect5" text="Sec&#231;&#227;o&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="section" text="Sec&#231;&#227;o&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="simplesect" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="table" text="Tabela&#160;%n, &#8220;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="authorgroup">
+      <l:template name="sep" text=", "/>
+      <l:template name="sep2" text=" e "/>
+      <l:template name="seplast" text=", e "/>
+   </l:context>
+
+   <l:context name="glossary">
+      <l:template name="see" text="Ver "/>
+      <l:template name="seealso" text="Ver Tamb&#233;m "/>
+   </l:context>
+
+   <l:context name="msgset">
+      <l:template name="MsgAud" text="Audi&#234;ncia: "/>
+      <l:template name="MsgLevel" text="N&#237;vel: "/>
+      <l:template name="MsgOrig" text="Origem: "/>
+   </l:context>
+
+   <l:context name="datetime">
+      <l:template name="format" text="m/d/Y" lang="en"/>
+   </l:context>
+
+   <l:context name="datetime-full">
+      <l:template name="January" text="January" lang="en"/>
+      <l:template name="February" text="February" lang="en"/>
+      <l:template name="March" text="March" lang="en"/>
+      <l:template name="April" text="April" lang="en"/>
+      <l:template name="May" text="May" lang="en"/>
+      <l:template name="June" text="June" lang="en"/>
+      <l:template name="July" text="July" lang="en"/>
+      <l:template name="August" text="August" lang="en"/>
+      <l:template name="September" text="September" lang="en"/>
+      <l:template name="October" text="October" lang="en"/>
+      <l:template name="November" text="November" lang="en"/>
+      <l:template name="December" text="December" lang="en"/>
+      <l:template name="Monday" text="Monday" lang="en"/>
+      <l:template name="Tuesday" text="Tuesday" lang="en"/>
+      <l:template name="Wednesday" text="Wednesday" lang="en"/>
+      <l:template name="Thursday" text="Thursday" lang="en"/>
+      <l:template name="Friday" text="Friday" lang="en"/>
+      <l:template name="Saturday" text="Saturday" lang="en"/>
+      <l:template name="Sunday" text="Sunday" lang="en"/>
+   </l:context>
+
+   <l:context name="datetime-abbrev">
+      <l:template name="Jan" text="Jan" lang="en"/>
+      <l:template name="Feb" text="Feb" lang="en"/>
+      <l:template name="Mar" text="Mar" lang="en"/>
+      <l:template name="Apr" text="Apr" lang="en"/>
+      <l:template name="May" text="May" lang="en"/>
+      <l:template name="Jun" text="Jun" lang="en"/>
+      <l:template name="Jul" text="Jul" lang="en"/>
+      <l:template name="Aug" text="Aug" lang="en"/>
+      <l:template name="Sep" text="Sep" lang="en"/>
+      <l:template name="Oct" text="Oct" lang="en"/>
+      <l:template name="Nov" text="Nov" lang="en"/>
+      <l:template name="Dec" text="Dec" lang="en"/>
+      <l:template name="Mon" text="Mon" lang="en"/>
+      <l:template name="Tue" text="Tue" lang="en"/>
+      <l:template name="Wed" text="Wed" lang="en"/>
+      <l:template name="Thu" text="Thu" lang="en"/>
+      <l:template name="Fri" text="Fri" lang="en"/>
+      <l:template name="Sat" text="Sat" lang="en"/>
+      <l:template name="Sun" text="Sun" lang="en"/>
+   </l:context>
+
+   <l:context name="htmlhelp">
+      <l:template name="langcode" text="0x0816 Portuguese (PORTUGAL)"/>
+   </l:context>
+
+   <l:letters lang="en">
+      <l:l i="-1"/>
+      <l:l i="0">Symbols</l:l>
+      <l:l i="10">A</l:l>
+      <l:l i="10">a</l:l>
+      <l:l i="10">&#192;</l:l>
+      <l:l i="10">&#224;</l:l>
+      <l:l i="10">&#193;</l:l>
+      <l:l i="10">&#225;</l:l>
+      <l:l i="10">&#194;</l:l>
+      <l:l i="10">&#226;</l:l>
+      <l:l i="10">&#195;</l:l>
+      <l:l i="10">&#227;</l:l>
+      <l:l i="10">&#196;</l:l>
+      <l:l i="10">&#228;</l:l>
+      <l:l i="10">&#197;</l:l>
+      <l:l i="10">&#229;</l:l>
+      <l:l i="10">&#256;</l:l>
+      <l:l i="10">&#257;</l:l>
+      <l:l i="10">&#258;</l:l>
+      <l:l i="10">&#259;</l:l>
+      <l:l i="10">&#260;</l:l>
+      <l:l i="10">&#261;</l:l>
+      <l:l i="10">&#461;</l:l>
+      <l:l i="10">&#462;</l:l>
+      <l:l i="10">&#478;</l:l>
+      <l:l i="10">&#479;</l:l>
+      <l:l i="10">&#480;</l:l>
+      <l:l i="10">&#481;</l:l>
+      <l:l i="10">&#506;</l:l>
+      <l:l i="10">&#507;</l:l>
+      <l:l i="10">&#512;</l:l>
+      <l:l i="10">&#513;</l:l>
+      <l:l i="10">&#514;</l:l>
+      <l:l i="10">&#515;</l:l>
+      <l:l i="10">&#550;</l:l>
+      <l:l i="10">&#551;</l:l>
+      <l:l i="10">&#7680;</l:l>
+      <l:l i="10">&#7681;</l:l>
+      <l:l i="10">&#7834;</l:l>
+      <l:l i="10">&#7840;</l:l>
+      <l:l i="10">&#7841;</l:l>
+      <l:l i="10">&#7842;</l:l>
+      <l:l i="10">&#7843;</l:l>
+      <l:l i="10">&#7844;</l:l>
+      <l:l i="10">&#7845;</l:l>
+      <l:l i="10">&#7846;</l:l>
+      <l:l i="10">&#7847;</l:l>
+      <l:l i="10">&#7848;</l:l>
+      <l:l i="10">&#7849;</l:l>
+      <l:l i="10">&#7850;</l:l>
+      <l:l i="10">&#7851;</l:l>
+      <l:l i="10">&#7852;</l:l>
+      <l:l i="10">&#7853;</l:l>
+      <l:l i="10">&#7854;</l:l>
+      <l:l i="10">&#7855;</l:l>
+      <l:l i="10">&#7856;</l:l>
+      <l:l i="10">&#7857;</l:l>
+      <l:l i="10">&#7858;</l:l>
+      <l:l i="10">&#7859;</l:l>
+      <l:l i="10">&#7860;</l:l>
+      <l:l i="10">&#7861;</l:l>
+      <l:l i="10">&#7862;</l:l>
+      <l:l i="10">&#7863;</l:l>
+      <l:l i="20">B</l:l>
+      <l:l i="20">b</l:l>
+      <l:l i="20">&#384;</l:l>
+      <l:l i="20">&#385;</l:l>
+      <l:l i="20">&#595;</l:l>
+      <l:l i="20">&#386;</l:l>
+      <l:l i="20">&#387;</l:l>
+      <l:l i="20">&#7682;</l:l>
+      <l:l i="20">&#7683;</l:l>
+      <l:l i="20">&#7684;</l:l>
+      <l:l i="20">&#7685;</l:l>
+      <l:l i="20">&#7686;</l:l>
+      <l:l i="20">&#7687;</l:l>
+      <l:l i="30">C</l:l>
+      <l:l i="30">c</l:l>
+      <l:l i="30">&#199;</l:l>
+      <l:l i="30">&#231;</l:l>
+      <l:l i="30">&#262;</l:l>
+      <l:l i="30">&#263;</l:l>
+      <l:l i="30">&#264;</l:l>
+      <l:l i="30">&#265;</l:l>
+      <l:l i="30">&#266;</l:l>
+      <l:l i="30">&#267;</l:l>
+      <l:l i="30">&#268;</l:l>
+      <l:l i="30">&#269;</l:l>
+      <l:l i="30">&#391;</l:l>
+      <l:l i="30">&#392;</l:l>
+      <l:l i="30">&#597;</l:l>
+      <l:l i="30">&#7688;</l:l>
+      <l:l i="30">&#7689;</l:l>
+      <l:l i="40">D</l:l>
+      <l:l i="40">d</l:l>
+      <l:l i="40">&#270;</l:l>
+      <l:l i="40">&#271;</l:l>
+      <l:l i="40">&#272;</l:l>
+      <l:l i="40">&#273;</l:l>
+      <l:l i="40">&#394;</l:l>
+      <l:l i="40">&#599;</l:l>
+      <l:l i="40">&#395;</l:l>
+      <l:l i="40">&#396;</l:l>
+      <l:l i="40">&#453;</l:l>
+      <l:l i="40">&#498;</l:l>
+      <l:l i="40">&#545;</l:l>
+      <l:l i="40">&#598;</l:l>
+      <l:l i="40">&#7690;</l:l>
+      <l:l i="40">&#7691;</l:l>
+      <l:l i="40">&#7692;</l:l>
+      <l:l i="40">&#7693;</l:l>
+      <l:l i="40">&#7694;</l:l>
+      <l:l i="40">&#7695;</l:l>
+      <l:l i="40">&#7696;</l:l>
+      <l:l i="40">&#7697;</l:l>
+      <l:l i="40">&#7698;</l:l>
+      <l:l i="40">&#7699;</l:l>
+      <l:l i="50">E</l:l>
+      <l:l i="50">e</l:l>
+      <l:l i="50">&#200;</l:l>
+      <l:l i="50">&#232;</l:l>
+      <l:l i="50">&#201;</l:l>
+      <l:l i="50">&#233;</l:l>
+      <l:l i="50">&#202;</l:l>
+      <l:l i="50">&#234;</l:l>
+      <l:l i="50">&#203;</l:l>
+      <l:l i="50">&#235;</l:l>
+      <l:l i="50">&#274;</l:l>
+      <l:l i="50">&#275;</l:l>
+      <l:l i="50">&#276;</l:l>
+      <l:l i="50">&#277;</l:l>
+      <l:l i="50">&#278;</l:l>
+      <l:l i="50">&#279;</l:l>
+      <l:l i="50">&#280;</l:l>
+      <l:l i="50">&#281;</l:l>
+      <l:l i="50">&#282;</l:l>
+      <l:l i="50">&#283;</l:l>
+      <l:l i="50">&#516;</l:l>
+      <l:l i="50">&#517;</l:l>
+      <l:l i="50">&#518;</l:l>
+      <l:l i="50">&#519;</l:l>
+      <l:l i="50">&#552;</l:l>
+      <l:l i="50">&#553;</l:l>
+      <l:l i="50">&#7700;</l:l>
+      <l:l i="50">&#7701;</l:l>
+      <l:l i="50">&#7702;</l:l>
+      <l:l i="50">&#7703;</l:l>
+      <l:l i="50">&#7704;</l:l>
+      <l:l i="50">&#7705;</l:l>
+      <l:l i="50">&#7706;</l:l>
+      <l:l i="50">&#7707;</l:l>
+      <l:l i="50">&#7708;</l:l>
+      <l:l i="50">&#7709;</l:l>
+      <l:l i="50">&#7864;</l:l>
+      <l:l i="50">&#7865;</l:l>
+      <l:l i="50">&#7866;</l:l>
+      <l:l i="50">&#7867;</l:l>
+      <l:l i="50">&#7868;</l:l>
+      <l:l i="50">&#7869;</l:l>
+      <l:l i="50">&#7870;</l:l>
+      <l:l i="50">&#7871;</l:l>
+      <l:l i="50">&#7872;</l:l>
+      <l:l i="50">&#7873;</l:l>
+      <l:l i="50">&#7874;</l:l>
+      <l:l i="50">&#7875;</l:l>
+      <l:l i="50">&#7876;</l:l>
+      <l:l i="50">&#7877;</l:l>
+      <l:l i="50">&#7878;</l:l>
+      <l:l i="50">&#7879;</l:l>
+      <l:l i="60">F</l:l>
+      <l:l i="60">f</l:l>
+      <l:l i="60">&#401;</l:l>
+      <l:l i="60">&#402;</l:l>
+      <l:l i="60">&#7710;</l:l>
+      <l:l i="60">&#7711;</l:l>
+      <l:l i="70">G</l:l>
+      <l:l i="70">g</l:l>
+      <l:l i="70">&#284;</l:l>
+      <l:l i="70">&#285;</l:l>
+      <l:l i="70">&#286;</l:l>
+      <l:l i="70">&#287;</l:l>
+      <l:l i="70">&#288;</l:l>
+      <l:l i="70">&#289;</l:l>
+      <l:l i="70">&#290;</l:l>
+      <l:l i="70">&#291;</l:l>
+      <l:l i="70">&#403;</l:l>
+      <l:l i="70">&#608;</l:l>
+      <l:l i="70">&#484;</l:l>
+      <l:l i="70">&#485;</l:l>
+      <l:l i="70">&#486;</l:l>
+      <l:l i="70">&#487;</l:l>
+      <l:l i="70">&#500;</l:l>
+      <l:l i="70">&#501;</l:l>
+      <l:l i="70">&#7712;</l:l>
+      <l:l i="70">&#7713;</l:l>
+      <l:l i="80">H</l:l>
+      <l:l i="80">h</l:l>
+      <l:l i="80">&#292;</l:l>
+      <l:l i="80">&#293;</l:l>
+      <l:l i="80">&#294;</l:l>
+      <l:l i="80">&#295;</l:l>
+      <l:l i="80">&#542;</l:l>
+      <l:l i="80">&#543;</l:l>
+      <l:l i="80">&#614;</l:l>
+      <l:l i="80">&#7714;</l:l>
+      <l:l i="80">&#7715;</l:l>
+      <l:l i="80">&#7716;</l:l>
+      <l:l i="80">&#7717;</l:l>
+      <l:l i="80">&#7718;</l:l>
+      <l:l i="80">&#7719;</l:l>
+      <l:l i="80">&#7720;</l:l>
+      <l:l i="80">&#7721;</l:l>
+      <l:l i="80">&#7722;</l:l>
+      <l:l i="80">&#7723;</l:l>
+      <l:l i="80">&#7830;</l:l>
+      <l:l i="90">I</l:l>
+      <l:l i="90">i</l:l>
+      <l:l i="90">&#204;</l:l>
+      <l:l i="90">&#236;</l:l>
+      <l:l i="90">&#205;</l:l>
+      <l:l i="90">&#237;</l:l>
+      <l:l i="90">&#206;</l:l>
+      <l:l i="90">&#238;</l:l>
+      <l:l i="90">&#207;</l:l>
+      <l:l i="90">&#239;</l:l>
+      <l:l i="90">&#296;</l:l>
+      <l:l i="90">&#297;</l:l>
+      <l:l i="90">&#298;</l:l>
+      <l:l i="90">&#299;</l:l>
+      <l:l i="90">&#300;</l:l>
+      <l:l i="90">&#301;</l:l>
+      <l:l i="90">&#302;</l:l>
+      <l:l i="90">&#303;</l:l>
+      <l:l i="90">&#304;</l:l>
+      <l:l i="90">&#407;</l:l>
+      <l:l i="90">&#616;</l:l>
+      <l:l i="90">&#463;</l:l>
+      <l:l i="90">&#464;</l:l>
+      <l:l i="90">&#520;</l:l>
+      <l:l i="90">&#521;</l:l>
+      <l:l i="90">&#522;</l:l>
+      <l:l i="90">&#523;</l:l>
+      <l:l i="90">&#7724;</l:l>
+      <l:l i="90">&#7725;</l:l>
+      <l:l i="90">&#7726;</l:l>
+      <l:l i="90">&#7727;</l:l>
+      <l:l i="90">&#7880;</l:l>
+      <l:l i="90">&#7881;</l:l>
+      <l:l i="90">&#7882;</l:l>
+      <l:l i="90">&#7883;</l:l>
+      <l:l i="100">J</l:l>
+      <l:l i="100">j</l:l>
+      <l:l i="100">&#308;</l:l>
+      <l:l i="100">&#309;</l:l>
+      <l:l i="100">&#496;</l:l>
+      <l:l i="100">&#669;</l:l>
+      <l:l i="110">K</l:l>
+      <l:l i="110">k</l:l>
+      <l:l i="110">&#310;</l:l>
+      <l:l i="110">&#311;</l:l>
+      <l:l i="110">&#408;</l:l>
+      <l:l i="110">&#409;</l:l>
+      <l:l i="110">&#488;</l:l>
+      <l:l i="110">&#489;</l:l>
+      <l:l i="110">&#7728;</l:l>
+      <l:l i="110">&#7729;</l:l>
+      <l:l i="110">&#7730;</l:l>
+      <l:l i="110">&#7731;</l:l>
+      <l:l i="110">&#7732;</l:l>
+      <l:l i="110">&#7733;</l:l>
+      <l:l i="120">L</l:l>
+      <l:l i="120">l</l:l>
+      <l:l i="120">&#313;</l:l>
+      <l:l i="120">&#314;</l:l>
+      <l:l i="120">&#315;</l:l>
+      <l:l i="120">&#316;</l:l>
+      <l:l i="120">&#317;</l:l>
+      <l:l i="120">&#318;</l:l>
+      <l:l i="120">&#319;</l:l>
+      <l:l i="120">&#320;</l:l>
+      <l:l i="120">&#321;</l:l>
+      <l:l i="120">&#322;</l:l>
+      <l:l i="120">&#410;</l:l>
+      <l:l i="120">&#456;</l:l>
+      <l:l i="120">&#564;</l:l>
+      <l:l i="120">&#619;</l:l>
+      <l:l i="120">&#620;</l:l>
+      <l:l i="120">&#621;</l:l>
+      <l:l i="120">&#7734;</l:l>
+      <l:l i="120">&#7735;</l:l>
+      <l:l i="120">&#7736;</l:l>
+      <l:l i="120">&#7737;</l:l>
+      <l:l i="120">&#7738;</l:l>
+      <l:l i="120">&#7739;</l:l>
+      <l:l i="120">&#7740;</l:l>
+      <l:l i="120">&#7741;</l:l>
+      <l:l i="130">M</l:l>
+      <l:l i="130">m</l:l>
+      <l:l i="130">&#625;</l:l>
+      <l:l i="130">&#7742;</l:l>
+      <l:l i="130">&#7743;</l:l>
+      <l:l i="130">&#7744;</l:l>
+      <l:l i="130">&#7745;</l:l>
+      <l:l i="130">&#7746;</l:l>
+      <l:l i="130">&#7747;</l:l>
+      <l:l i="140">N</l:l>
+      <l:l i="140">n</l:l>
+      <l:l i="140">&#209;</l:l>
+      <l:l i="140">&#241;</l:l>
+      <l:l i="140">&#323;</l:l>
+      <l:l i="140">&#324;</l:l>
+      <l:l i="140">&#325;</l:l>
+      <l:l i="140">&#326;</l:l>
+      <l:l i="140">&#327;</l:l>
+      <l:l i="140">&#328;</l:l>
+      <l:l i="140">&#413;</l:l>
+      <l:l i="140">&#626;</l:l>
+      <l:l i="140">&#414;</l:l>
+      <l:l i="140">&#544;</l:l>
+      <l:l i="140">&#459;</l:l>
+      <l:l i="140">&#504;</l:l>
+      <l:l i="140">&#505;</l:l>
+      <l:l i="140">&#565;</l:l>
+      <l:l i="140">&#627;</l:l>
+      <l:l i="140">&#7748;</l:l>
+      <l:l i="140">&#7749;</l:l>
+      <l:l i="140">&#7750;</l:l>
+      <l:l i="140">&#7751;</l:l>
+      <l:l i="140">&#7752;</l:l>
+      <l:l i="140">&#7753;</l:l>
+      <l:l i="140">&#7754;</l:l>
+      <l:l i="140">&#7755;</l:l>
+      <l:l i="150">O</l:l>
+      <l:l i="150">o</l:l>
+      <l:l i="150">&#210;</l:l>
+      <l:l i="150">&#242;</l:l>
+      <l:l i="150">&#211;</l:l>
+      <l:l i="150">&#243;</l:l>
+      <l:l i="150">&#212;</l:l>
+      <l:l i="150">&#244;</l:l>
+      <l:l i="150">&#213;</l:l>
+      <l:l i="150">&#245;</l:l>
+      <l:l i="150">&#214;</l:l>
+      <l:l i="150">&#246;</l:l>
+      <l:l i="150">&#216;</l:l>
+      <l:l i="150">&#248;</l:l>
+      <l:l i="150">&#332;</l:l>
+      <l:l i="150">&#333;</l:l>
+      <l:l i="150">&#334;</l:l>
+      <l:l i="150">&#335;</l:l>
+      <l:l i="150">&#336;</l:l>
+      <l:l i="150">&#337;</l:l>
+      <l:l i="150">&#415;</l:l>
+      <l:l i="150">&#416;</l:l>
+      <l:l i="150">&#417;</l:l>
+      <l:l i="150">&#465;</l:l>
+      <l:l i="150">&#466;</l:l>
+      <l:l i="150">&#490;</l:l>
+      <l:l i="150">&#491;</l:l>
+      <l:l i="150">&#492;</l:l>
+      <l:l i="150">&#493;</l:l>
+      <l:l i="150">&#510;</l:l>
+      <l:l i="150">&#511;</l:l>
+      <l:l i="150">&#524;</l:l>
+      <l:l i="150">&#525;</l:l>
+      <l:l i="150">&#526;</l:l>
+      <l:l i="150">&#527;</l:l>
+      <l:l i="150">&#554;</l:l>
+      <l:l i="150">&#555;</l:l>
+      <l:l i="150">&#556;</l:l>
+      <l:l i="150">&#557;</l:l>
+      <l:l i="150">&#558;</l:l>
+      <l:l i="150">&#559;</l:l>
+      <l:l i="150">&#560;</l:l>
+      <l:l i="150">&#561;</l:l>
+      <l:l i="150">&#7756;</l:l>
+      <l:l i="150">&#7757;</l:l>
+      <l:l i="150">&#7758;</l:l>
+      <l:l i="150">&#7759;</l:l>
+      <l:l i="150">&#7760;</l:l>
+      <l:l i="150">&#7761;</l:l>
+      <l:l i="150">&#7762;</l:l>
+      <l:l i="150">&#7763;</l:l>
+      <l:l i="150">&#7884;</l:l>
+      <l:l i="150">&#7885;</l:l>
+      <l:l i="150">&#7886;</l:l>
+      <l:l i="150">&#7887;</l:l>
+      <l:l i="150">&#7888;</l:l>
+      <l:l i="150">&#7889;</l:l>
+      <l:l i="150">&#7890;</l:l>
+      <l:l i="150">&#7891;</l:l>
+      <l:l i="150">&#7892;</l:l>
+      <l:l i="150">&#7893;</l:l>
+      <l:l i="150">&#7894;</l:l>
+      <l:l i="150">&#7895;</l:l>
+      <l:l i="150">&#7896;</l:l>
+      <l:l i="150">&#7897;</l:l>
+      <l:l i="150">&#7898;</l:l>
+      <l:l i="150">&#7899;</l:l>
+      <l:l i="150">&#7900;</l:l>
+      <l:l i="150">&#7901;</l:l>
+      <l:l i="150">&#7902;</l:l>
+      <l:l i="150">&#7903;</l:l>
+      <l:l i="150">&#7904;</l:l>
+      <l:l i="150">&#7905;</l:l>
+      <l:l i="150">&#7906;</l:l>
+      <l:l i="150">&#7907;</l:l>
+      <l:l i="160">P</l:l>
+      <l:l i="160">p</l:l>
+      <l:l i="160">&#420;</l:l>
+      <l:l i="160">&#421;</l:l>
+      <l:l i="160">&#7764;</l:l>
+      <l:l i="160">&#7765;</l:l>
+      <l:l i="160">&#7766;</l:l>
+      <l:l i="160">&#7767;</l:l>
+      <l:l i="170">Q</l:l>
+      <l:l i="170">q</l:l>
+      <l:l i="170">&#672;</l:l>
+      <l:l i="180">R</l:l>
+      <l:l i="180">r</l:l>
+      <l:l i="180">&#340;</l:l>
+      <l:l i="180">&#341;</l:l>
+      <l:l i="180">&#342;</l:l>
+      <l:l i="180">&#343;</l:l>
+      <l:l i="180">&#344;</l:l>
+      <l:l i="180">&#345;</l:l>
+      <l:l i="180">&#528;</l:l>
+      <l:l i="180">&#529;</l:l>
+      <l:l i="180">&#530;</l:l>
+      <l:l i="180">&#531;</l:l>
+      <l:l i="180">&#636;</l:l>
+      <l:l i="180">&#637;</l:l>
+      <l:l i="180">&#638;</l:l>
+      <l:l i="180">&#7768;</l:l>
+      <l:l i="180">&#7769;</l:l>
+      <l:l i="180">&#7770;</l:l>
+      <l:l i="180">&#7771;</l:l>
+      <l:l i="180">&#7772;</l:l>
+      <l:l i="180">&#7773;</l:l>
+      <l:l i="180">&#7774;</l:l>
+      <l:l i="180">&#7775;</l:l>
+      <l:l i="190">S</l:l>
+      <l:l i="190">s</l:l>
+      <l:l i="190">&#346;</l:l>
+      <l:l i="190">&#347;</l:l>
+      <l:l i="190">&#348;</l:l>
+      <l:l i="190">&#349;</l:l>
+      <l:l i="190">&#350;</l:l>
+      <l:l i="190">&#351;</l:l>
+      <l:l i="190">&#352;</l:l>
+      <l:l i="190">&#353;</l:l>
+      <l:l i="190">&#536;</l:l>
+      <l:l i="190">&#537;</l:l>
+      <l:l i="190">&#642;</l:l>
+      <l:l i="190">&#7776;</l:l>
+      <l:l i="190">&#7777;</l:l>
+      <l:l i="190">&#7778;</l:l>
+      <l:l i="190">&#7779;</l:l>
+      <l:l i="190">&#7780;</l:l>
+      <l:l i="190">&#7781;</l:l>
+      <l:l i="190">&#7782;</l:l>
+      <l:l i="190">&#7783;</l:l>
+      <l:l i="190">&#7784;</l:l>
+      <l:l i="190">&#7785;</l:l>
+      <l:l i="200">T</l:l>
+      <l:l i="200">t</l:l>
+      <l:l i="200">&#354;</l:l>
+      <l:l i="200">&#355;</l:l>
+      <l:l i="200">&#356;</l:l>
+      <l:l i="200">&#357;</l:l>
+      <l:l i="200">&#358;</l:l>
+      <l:l i="200">&#359;</l:l>
+      <l:l i="200">&#427;</l:l>
+      <l:l i="200">&#428;</l:l>
+      <l:l i="200">&#429;</l:l>
+      <l:l i="200">&#430;</l:l>
+      <l:l i="200">&#648;</l:l>
+      <l:l i="200">&#538;</l:l>
+      <l:l i="200">&#539;</l:l>
+      <l:l i="200">&#566;</l:l>
+      <l:l i="200">&#7786;</l:l>
+      <l:l i="200">&#7787;</l:l>
+      <l:l i="200">&#7788;</l:l>
+      <l:l i="200">&#7789;</l:l>
+      <l:l i="200">&#7790;</l:l>
+      <l:l i="200">&#7791;</l:l>
+      <l:l i="200">&#7792;</l:l>
+      <l:l i="200">&#7793;</l:l>
+      <l:l i="200">&#7831;</l:l>
+      <l:l i="210">U</l:l>
+      <l:l i="210">u</l:l>
+      <l:l i="210">&#217;</l:l>
+      <l:l i="210">&#249;</l:l>
+      <l:l i="210">&#218;</l:l>
+      <l:l i="210">&#250;</l:l>
+      <l:l i="210">&#219;</l:l>
+      <l:l i="210">&#251;</l:l>
+      <l:l i="210">&#220;</l:l>
+      <l:l i="210">&#252;</l:l>
+      <l:l i="210">&#360;</l:l>
+      <l:l i="210">&#361;</l:l>
+      <l:l i="210">&#362;</l:l>
+      <l:l i="210">&#363;</l:l>
+      <l:l i="210">&#364;</l:l>
+      <l:l i="210">&#365;</l:l>
+      <l:l i="210">&#366;</l:l>
+      <l:l i="210">&#367;</l:l>
+      <l:l i="210">&#368;</l:l>
+      <l:l i="210">&#369;</l:l>
+      <l:l i="210">&#370;</l:l>
+      <l:l i="210">&#371;</l:l>
+      <l:l i="210">&#431;</l:l>
+      <l:l i="210">&#432;</l:l>
+      <l:l i="210">&#467;</l:l>
+      <l:l i="210">&#468;</l:l>
+      <l:l i="210">&#469;</l:l>
+      <l:l i="210">&#470;</l:l>
+      <l:l i="210">&#471;</l:l>
+      <l:l i="210">&#472;</l:l>
+      <l:l i="210">&#473;</l:l>
+      <l:l i="210">&#474;</l:l>
+      <l:l i="210">&#475;</l:l>
+      <l:l i="210">&#476;</l:l>
+      <l:l i="210">&#532;</l:l>
+      <l:l i="210">&#533;</l:l>
+      <l:l i="210">&#534;</l:l>
+      <l:l i="210">&#535;</l:l>
+      <l:l i="210">&#7794;</l:l>
+      <l:l i="210">&#7795;</l:l>
+      <l:l i="210">&#7796;</l:l>
+      <l:l i="210">&#7797;</l:l>
+      <l:l i="210">&#7798;</l:l>
+      <l:l i="210">&#7799;</l:l>
+      <l:l i="210">&#7800;</l:l>
+      <l:l i="210">&#7801;</l:l>
+      <l:l i="210">&#7802;</l:l>
+      <l:l i="210">&#7803;</l:l>
+      <l:l i="210">&#7908;</l:l>
+      <l:l i="210">&#7909;</l:l>
+      <l:l i="210">&#7910;</l:l>
+      <l:l i="210">&#7911;</l:l>
+      <l:l i="210">&#7912;</l:l>
+      <l:l i="210">&#7913;</l:l>
+      <l:l i="210">&#7914;</l:l>
+      <l:l i="210">&#7915;</l:l>
+      <l:l i="210">&#7916;</l:l>
+      <l:l i="210">&#7917;</l:l>
+      <l:l i="210">&#7918;</l:l>
+      <l:l i="210">&#7919;</l:l>
+      <l:l i="210">&#7920;</l:l>
+      <l:l i="210">&#7921;</l:l>
+      <l:l i="220">V</l:l>
+      <l:l i="220">v</l:l>
+      <l:l i="220">&#434;</l:l>
+      <l:l i="220">&#651;</l:l>
+      <l:l i="220">&#7804;</l:l>
+      <l:l i="220">&#7805;</l:l>
+      <l:l i="220">&#7806;</l:l>
+      <l:l i="220">&#7807;</l:l>
+      <l:l i="230">W</l:l>
+      <l:l i="230">w</l:l>
+      <l:l i="230">&#372;</l:l>
+      <l:l i="230">&#373;</l:l>
+      <l:l i="230">&#7808;</l:l>
+      <l:l i="230">&#7809;</l:l>
+      <l:l i="230">&#7810;</l:l>
+      <l:l i="230">&#7811;</l:l>
+      <l:l i="230">&#7812;</l:l>
+      <l:l i="230">&#7813;</l:l>
+      <l:l i="230">&#7814;</l:l>
+      <l:l i="230">&#7815;</l:l>
+      <l:l i="230">&#7816;</l:l>
+      <l:l i="230">&#7817;</l:l>
+      <l:l i="230">&#7832;</l:l>
+      <l:l i="240">X</l:l>
+      <l:l i="240">x</l:l>
+      <l:l i="240">&#7818;</l:l>
+      <l:l i="240">&#7819;</l:l>
+      <l:l i="240">&#7820;</l:l>
+      <l:l i="240">&#7821;</l:l>
+      <l:l i="250">Y</l:l>
+      <l:l i="250">y</l:l>
+      <l:l i="250">&#221;</l:l>
+      <l:l i="250">&#253;</l:l>
+      <l:l i="250">&#255;</l:l>
+      <l:l i="250">&#376;</l:l>
+      <l:l i="250">&#374;</l:l>
+      <l:l i="250">&#375;</l:l>
+      <l:l i="250">&#435;</l:l>
+      <l:l i="250">&#436;</l:l>
+      <l:l i="250">&#562;</l:l>
+      <l:l i="250">&#563;</l:l>
+      <l:l i="250">&#7822;</l:l>
+      <l:l i="250">&#7823;</l:l>
+      <l:l i="250">&#7833;</l:l>
+      <l:l i="250">&#7922;</l:l>
+      <l:l i="250">&#7923;</l:l>
+      <l:l i="250">&#7924;</l:l>
+      <l:l i="250">&#7925;</l:l>
+      <l:l i="250">&#7926;</l:l>
+      <l:l i="250">&#7927;</l:l>
+      <l:l i="250">&#7928;</l:l>
+      <l:l i="250">&#7929;</l:l>
+      <l:l i="260">Z</l:l>
+      <l:l i="260">z</l:l>
+      <l:l i="260">&#377;</l:l>
+      <l:l i="260">&#378;</l:l>
+      <l:l i="260">&#379;</l:l>
+      <l:l i="260">&#380;</l:l>
+      <l:l i="260">&#381;</l:l>
+      <l:l i="260">&#382;</l:l>
+      <l:l i="260">&#437;</l:l>
+      <l:l i="260">&#438;</l:l>
+      <l:l i="260">&#548;</l:l>
+      <l:l i="260">&#549;</l:l>
+      <l:l i="260">&#656;</l:l>
+      <l:l i="260">&#657;</l:l>
+      <l:l i="260">&#7824;</l:l>
+      <l:l i="260">&#7825;</l:l>
+      <l:l i="260">&#7826;</l:l>
+      <l:l i="260">&#7827;</l:l>
+      <l:l i="260">&#7828;</l:l>
+      <l:l i="260">&#7829;</l:l>
+   </l:letters>
+</l:l10n>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/pt_br.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/pt_br.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/pt_br.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1153 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="pt_br" english-language-name="Portuguese (Brazil)">
+
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+   <l:gentext key="Abstract" text="Resumo"/>
+   <l:gentext key="abstract" text="Resumo"/>
+   <l:gentext key="Answer" text="R:"/>
+   <l:gentext key="answer" text="R:"/>
+   <l:gentext key="Appendix" text="Ap&#234;ndice"/>
+   <l:gentext key="appendix" text="ap&#234;ndice"/>
+   <l:gentext key="Article" text="Artigo"/>
+   <l:gentext key="article" text="Artigo"/>
+   <l:gentext key="Bibliography" text="Bibliografia"/>
+   <l:gentext key="bibliography" text="Bibliografia"/>
+   <l:gentext key="Book" text="Livro"/>
+   <l:gentext key="book" text="Livro"/>
+   <l:gentext key="CAUTION" text="CUIDADO"/>
+   <l:gentext key="Caution" text="Cuidado"/>
+   <l:gentext key="caution" text="Cuidado"/>
+   <l:gentext key="Chapter" text="Cap&#237;tulo"/>
+   <l:gentext key="chapter" text="cap&#237;tulo"/>
+   <l:gentext key="Colophon" text="Considera&#231;&#245;es finais"/>
+   <l:gentext key="colophon" text="Considera&#231;&#245;es finais"/>
+   <l:gentext key="Copyright" text="Copyright"/>
+   <l:gentext key="copyright" text="Copyright"/>
+   <l:gentext key="Dedication" text="Dedicat&#243;ria"/>
+   <l:gentext key="dedication" text="Dedicat&#243;ria"/>
+   <l:gentext key="Edition" text="Edi&#231;&#227;o"/>
+   <l:gentext key="edition" text="Edi&#231;&#227;o"/>
+   <l:gentext key="Equation" text="Equa&#231;&#227;o"/>
+   <l:gentext key="equation" text="Equa&#231;&#227;o"/>
+   <l:gentext key="Example" text="Exemplo"/>
+   <l:gentext key="example" text="Exemplo"/>
+   <l:gentext key="Figure" text="Figura"/>
+   <l:gentext key="figure" text="Figura"/>
+   <l:gentext key="Glossary" text="Gloss&#225;rio"/>
+   <l:gentext key="glossary" text="Gloss&#225;rio"/>
+   <l:gentext key="GlossSee" text="Ver"/>
+   <l:gentext key="glosssee" text="Ver"/>
+   <l:gentext key="GlossSeeAlso" text="Ver Tamb&#233;m"/>
+   <l:gentext key="glossseealso" text="Ver Tamb&#233;m"/>
+   <l:gentext key="IMPORTANT" text="IMPORTANTE"/>
+   <l:gentext key="important" text="Importante"/>
+   <l:gentext key="Important" text="Importante"/>
+   <l:gentext key="Index" text="&#205;ndice Remissivo"/>
+   <l:gentext key="index" text="&#205;ndice Remissivo"/>
+   <l:gentext key="ISBN" text="ISBN"/>
+   <l:gentext key="isbn" text="ISBN"/>
+   <l:gentext key="LegalNotice" text="Nota Legal"/>
+   <l:gentext key="legalnotice" text="Nota Legal"/>
+   <l:gentext key="MsgAud" text="Audi&#234;ncia"/>
+   <l:gentext key="msgaud" text="Audi&#234;ncia"/>
+   <l:gentext key="MsgLevel" text="N&#237;vel"/>
+   <l:gentext key="msglevel" text="N&#237;vel"/>
+   <l:gentext key="MsgOrig" text="Origem"/>
+   <l:gentext key="msgorig" text="Origem"/>
+   <l:gentext key="NOTE" text="NOTA"/>
+   <l:gentext key="Note" text="Nota"/>
+   <l:gentext key="note" text="Nota"/>
+   <l:gentext key="Part" text="Parte"/>
+   <l:gentext key="part" text="Parte"/>
+   <l:gentext key="Preface" text="Pref&#225;cio"/>
+   <l:gentext key="preface" text="Pref&#225;cio"/>
+   <l:gentext key="Procedure" text="Procedimento"/>
+   <l:gentext key="procedure" text="Procedimento"/>
+   <l:gentext key="ProductionSet" text="Production"/>
+   <l:gentext key="PubDate" text="Data de Publica&#231;&#227;o"/>
+   <l:gentext key="pubdate" text="Data de Publica&#231;&#227;o"/>
+   <l:gentext key="Published" text="Publicado"/>
+   <l:gentext key="published" text="Publicado"/>
+   <l:gentext key="Qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="Question" text="P:"/>
+   <l:gentext key="question" text="P:"/>
+   <l:gentext key="RefEntry" text=""/>
+   <l:gentext key="refentry" text=""/>
+   <l:gentext key="Reference" text="Refer&#234;ncia"/>
+   <l:gentext key="reference" text="Refer&#234;ncia"/>
+   <l:gentext key="RefName" text="Nome"/>
+   <l:gentext key="refname" text="Nome"/>
+   <l:gentext key="RefSection" text=""/>
+   <l:gentext key="refsection" text=""/>
+   <l:gentext key="RefSynopsisDiv" text="Sinopse"/>
+   <l:gentext key="refsynopsisdiv" text="Sinopse"/>
+   <l:gentext key="RevHistory" text="Hist&#243;rico de Revis&#245;es"/>
+   <l:gentext key="revhistory" text="Hist&#243;rico de Revis&#245;es"/>
+   <l:gentext key="revision" text="Revis&#227;o"/>
+   <l:gentext key="Revision" text="Revis&#227;o"/>
+   <l:gentext key="sect1" text="Section"/>
+   <l:gentext key="sect2" text="Section"/>
+   <l:gentext key="sect3" text="Section"/>
+   <l:gentext key="sect4" text="Section"/>
+   <l:gentext key="sect5" text="Section"/>
+   <l:gentext key="section" text="se&#231;&#227;o"/>
+   <l:gentext key="Section" text="Se&#231;&#227;o"/>
+   <l:gentext key="see" text="Ver"/>
+   <l:gentext key="See" text="Ver"/>
+   <l:gentext key="seealso" text="Ver Tamb&#233;m"/>
+   <l:gentext key="Seealso" text="ver tamb&#233;m"/>
+   <l:gentext key="SeeAlso" text="Ver Tamb&#233;m"/>
+   <l:gentext key="set" text="Conjunto"/>
+   <l:gentext key="Set" text="Conjunto"/>
+   <l:gentext key="setindex" text="&#205;ndice do Conjunto"/>
+   <l:gentext key="SetIndex" text="&#205;ndice do Conjunto"/>
+   <l:gentext key="Sidebar" text="Quadro Lateral"/>
+   <l:gentext key="sidebar" text="quadro lateral"/>
+   <l:gentext key="step" text="passo"/>
+   <l:gentext key="Step" text="Passo"/>
+   <l:gentext key="Table" text="Tabela"/>
+   <l:gentext key="table" text="Tabela"/>
+   <l:gentext key="tip" text="Dica"/>
+   <l:gentext key="TIP" text="DICA"/>
+   <l:gentext key="Tip" text="Dica"/>
+   <l:gentext key="Warning" text="Aten&#231;&#227;o"/>
+   <l:gentext key="warning" text="Aten&#231;&#227;o"/>
+   <l:gentext key="WARNING" text="ATEN&#199;&#195;O"/>
+   <l:gentext key="and" text="e"/>
+   <l:gentext key="by" text="por"/>
+   <l:gentext key="called" text="called" lang="en"/>
+   <l:gentext key="Edited" text="Editado"/>
+   <l:gentext key="edited" text="Editado"/>
+   <l:gentext key="Editedby" text="Editado por"/>
+   <l:gentext key="editedby" text="Editado por"/>
+   <l:gentext key="in" text="in"/>
+   <l:gentext key="lastlistcomma" text=","/>
+   <l:gentext key="listcomma" text=","/>
+   <l:gentext key="nonexistantelement" text="elemento inexistente"/>
+   <l:gentext key="notes" text="Notas"/>
+   <l:gentext key="Notes" text="Notas"/>
+   <l:gentext key="Pgs" text="P&#225;ginas"/>
+   <l:gentext key="pgs" text="P&#225;ginas"/>
+   <l:gentext key="Revisedby" text="Revisado por: "/>
+   <l:gentext key="revisedby" text="Revisado por: "/>
+   <l:gentext key="TableNotes" text="Notas"/>
+   <l:gentext key="tablenotes" text="Notas"/>
+   <l:gentext key="TableofContents" text="&#205;ndice"/>
+   <l:gentext key="tableofcontents" text="&#205;ndice"/>
+   <l:gentext key="the" text="" lang="en"/>
+   <l:gentext key="unexpectedelementname" text="Nome de elemento inesperado"/>
+   <l:gentext key="unsupported" text="n&#227;o suportado"/>
+   <l:gentext key="xrefto" text="refer&#234;ncia para"/>
+   <l:gentext key="listofequations" text="Lista de Equa&#231;&#245;es"/>
+   <l:gentext key="ListofEquations" text="Lista de Equa&#231;&#245;es"/>
+   <l:gentext key="ListofExamples" text="Lista de Exemplos"/>
+   <l:gentext key="listofexamples" text="Lista de Exemplos"/>
+   <l:gentext key="ListofFigures" text="Lista de Figuras"/>
+   <l:gentext key="listoffigures" text="Lista de Figuras"/>
+   <l:gentext key="ListofProcedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listofprocedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listoftables" text="Lista de Tabelas"/>
+   <l:gentext key="ListofTables" text="Lista de Tabelas"/>
+   <l:gentext key="ListofUnknown" text="Lista de ???"/>
+   <l:gentext key="listofunknown" text="Lista de ???"/>
+   <l:gentext key="nav-home" text="Principal"/>
+   <l:gentext key="nav-next" text="Pr&#243;xima"/>
+   <l:gentext key="nav-next-sibling" text="Fim"/>
+   <l:gentext key="nav-prev" text="Anterior"/>
+   <l:gentext key="nav-prev-sibling" text="In&#237;cio"/>
+   <l:gentext key="nav-up" text="Acima"/>
+   <l:gentext key="nav-toc" text="ToC" lang="en"/>
+   <l:gentext key="Draft" text="Draft"/>
+   <l:gentext key="above" text="above"/>
+   <l:gentext key="below" text="below"/>
+   <l:gentext key="sectioncalled" text="the section called"/>
+   <l:gentext key="index symbols" text="Symbols"/>
+   <l:gentext key="lowercase.alpha" text="abcdefghijklmnopqrstuvwxyz"/>
+   <l:gentext key="uppercase.alpha" text="ABCDEFGHIJKLMNOPQRSTUVWXYZ"/>
+   <l:dingbat key="startquote" text="&#8220;"/>
+   <l:dingbat key="endquote" text="&#8221;"/>
+   <l:dingbat key="nestedstartquote" text="&#8216;"/>
+   <l:dingbat key="nestedendquote" text="&#8217;"/>
+   <l:dingbat key="singlestartquote" text="&#8216;" lang="en"/>
+   <l:dingbat key="singleendquote" text="&#8217;" lang="en"/>
+   <l:dingbat key="bullet" text="&#8226;"/>
+   <l:gentext key="hyphenation-character" text="-" lang="en"/>
+   <l:gentext key="hyphenation-push-character-count" text="2" lang="en"/>
+   <l:gentext key="hyphenation-remain-character-count" text="2" lang="en"/>
+
+   <l:context name="styles">
+      <l:template name="person-name" text="first-last"/>
+   </l:context>
+
+   <l:context name="title">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="%t"/>
+      <l:template name="appendix" text="Ap&#234;ndice %n. %t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="biblioentry" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliolist" text="%t" lang="en"/>
+      <l:template name="bibliomixed" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="Cap&#237;tulo %n. %t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="Equa&#231;&#227;o %n. %t"/>
+      <l:template name="example" text="Exemplo %n. %t"/>
+      <l:template name="figure" text="Figura %n. %t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="glosslist" text="%t" lang="en"/>
+      <l:template name="glossentry" text="%t" lang="en"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text=""/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="Parte %n. %t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="procedure.formal" text="Procedimento&#160;%n.&#160;%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="productionset.formal" text="Production&#160;%n"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="%t"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="%t"/>
+      <l:template name="refentry" text="%t"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsection" text="%t" lang="en"/>
+      <l:template name="refsect1" text="%t"/>
+      <l:template name="refsect2" text="%t"/>
+      <l:template name="refsect3" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="refsynopsisdivinfo" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="step" text="%t"/>
+      <l:template name="table" text="Tabela %n. %t"/>
+      <l:template name="task" text="%t" lang="en"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="" lang="en"/>
+      <l:template name="warning" text="%t"/>
+   </l:context>
+
+   <l:context name="title-unnumbered">
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article/appendix" text="%t" lang="en"/>
+      <l:template name="bridgehead" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="sect1" text="%t"/>
+      <l:template name="sect2" text="%t"/>
+      <l:template name="sect3" text="%t"/>
+      <l:template name="sect4" text="%t"/>
+      <l:template name="sect5" text="%t"/>
+      <l:template name="section" text="%t"/>
+      <l:template name="simplesect" text="%t"/>
+   </l:context>
+
+   <l:context name="title-numbered">
+      <l:template name="appendix" text="Ap&#234;ndice %n. %t"/>
+      <l:template name="article/appendix" text="%n.&#160;%t" lang="en"/>
+      <l:template name="bridgehead" text="%t"/>
+      <l:template name="chapter" text="Cap&#237;tulo %n. %t"/>
+      <l:template name="sect1" text="%n. %t"/>
+      <l:template name="sect2" text="%n. %t"/>
+      <l:template name="sect3" text="%n. %t"/>
+      <l:template name="sect4" text="%n. %t"/>
+      <l:template name="sect5" text="%n. %t"/>
+      <l:template name="section" text="%n. %t"/>
+      <l:template name="simplesect" text="%n. %t"/>
+   </l:context>
+
+   <l:context name="subtitle">
+      <l:template name="appendix" text="%s"/>
+      <l:template name="article" text="%s"/>
+      <l:template name="bibliodiv" text="%s"/>
+      <l:template name="biblioentry" text="%s"/>
+      <l:template name="bibliography" text="%s"/>
+      <l:template name="bibliomixed" text="%s"/>
+      <l:template name="bibliomset" text="%s"/>
+      <l:template name="biblioset" text="%s"/>
+      <l:template name="book" text="%s"/>
+      <l:template name="chapter" text="%s"/>
+      <l:template name="colophon" text="%s"/>
+      <l:template name="dedication" text="%s"/>
+      <l:template name="glossary" text="%s"/>
+      <l:template name="glossdiv" text="%s"/>
+      <l:template name="index" text="%s"/>
+      <l:template name="indexdiv" text="%s"/>
+      <l:template name="lot" text="%s"/>
+      <l:template name="part" text="%s"/>
+      <l:template name="partintro" text="%s"/>
+      <l:template name="preface" text="%s"/>
+      <l:template name="refentry" text="%s"/>
+      <l:template name="reference" text="%s"/>
+      <l:template name="refsection" text="%s" lang="en"/>
+      <l:template name="refsect1" text="%s"/>
+      <l:template name="refsect2" text="%s"/>
+      <l:template name="refsect3" text="%s"/>
+      <l:template name="refsynopsisdiv" text="%s"/>
+      <l:template name="sect1" text="%s"/>
+      <l:template name="sect2" text="%s"/>
+      <l:template name="sect3" text="%s"/>
+      <l:template name="sect4" text="%s"/>
+      <l:template name="sect5" text="%s"/>
+      <l:template name="section" text="%s"/>
+      <l:template name="set" text="%s"/>
+      <l:template name="setindex" text="%s"/>
+      <l:template name="sidebar" text="%s"/>
+      <l:template name="simplesect" text="%s"/>
+      <l:template name="toc" text="%s"/>
+   </l:context>
+
+   <l:context name="xref">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="R:&#160;%n"/>
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="constraintdef" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="%t"/>
+      <l:template name="example" text="%t"/>
+      <l:template name="figure" text="%t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text="%n"/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="%t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="P:&#160;%n"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="P:&#160;%n"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="table" text="%t"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="%n"/>
+      <l:template name="warning" text="%t"/>
+      <l:template name="page.citation" text=" [%p]"/>
+      <l:template name="page" text="(page %p)" lang="en"/>
+      <l:template name="pageabbrev" text="(p. %p)" lang="en"/>
+      <l:template name="Page" text="Page %p" lang="en"/>
+      <l:template name="bridgehead" text="&#8220;%t&#8221;"/>
+      <l:template name="refsection" text="the section called &#8220;%t&#8221;" lang="en"/>
+      <l:template name="refsect1" text="&#8220;%t&#8221;"/>
+      <l:template name="refsect2" text="&#8220;%t&#8221;"/>
+      <l:template name="refsect3" text="&#8220;%t&#8221;"/>
+      <l:template name="sect1" text="&#8220;%t&#8221;"/>
+      <l:template name="sect2" text="&#8220;%t&#8221;"/>
+      <l:template name="sect3" text="&#8220;%t&#8221;"/>
+      <l:template name="sect4" text="&#8220;%t&#8221;"/>
+      <l:template name="sect5" text="&#8220;%t&#8221;"/>
+      <l:template name="section" text="&#8220;%t&#8221;"/>
+      <l:template name="simplesect" text="&#8220;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="xref-number">
+      <l:template name="answer" text="R:&#160;%n"/>
+      <l:template name="appendix" text="Ap&#234;ndice&#160;%n"/>
+      <l:template name="bridgehead" text="Se&#231;&#227;o&#160;%n"/>
+      <l:template name="chapter" text="Cap&#237;tulo&#160;%n"/>
+      <l:template name="equation" text="Equa&#231;&#227;o&#160;%n"/>
+      <l:template name="example" text="Exemplo&#160;%n"/>
+      <l:template name="figure" text="Figura&#160;%n"/>
+      <l:template name="part" text="Parte&#160;%n"/>
+      <l:template name="procedure" text="Procedimento&#160;%n"/>
+      <l:template name="productionset" text="Production&#160;%n"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n"/>
+      <l:template name="qandaentry" text="P:&#160;%n"/>
+      <l:template name="question" text="P:&#160;%n"/>
+      <l:template name="sect1" text="Se&#231;&#227;o&#160;%n"/>
+      <l:template name="sect2" text="Se&#231;&#227;o&#160;%n"/>
+      <l:template name="sect3" text="Se&#231;&#227;o&#160;%n"/>
+      <l:template name="sect4" text="Se&#231;&#227;o&#160;%n"/>
+      <l:template name="sect5" text="Se&#231;&#227;o&#160;%n"/>
+      <l:template name="section" text="Se&#231;&#227;o&#160;%n"/>
+      <l:template name="table" text="Tabela&#160;%n"/>
+   </l:context>
+
+   <l:context name="xref-number-and-title">
+      <l:template name="appendix" text="Ap&#234;ndice&#160;%n, %t"/>
+      <l:template name="bridgehead" text="Se&#231;&#227;o&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="chapter" text="Cap&#237;tulo&#160;%n, %t"/>
+      <l:template name="equation" text="Equa&#231;&#227;o&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="example" text="Exemplo&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="figure" text="Figura&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="part" text="Parte&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="procedure" text="Procedimento&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="productionset" text="Production&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="refsect1" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="refsect2" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="refsect3" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="refsection" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="sect1" text="Se&#231;&#227;o&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect2" text="Se&#231;&#227;o&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect3" text="Se&#231;&#227;o&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect4" text="Se&#231;&#227;o&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect5" text="Se&#231;&#227;o&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="section" text="Se&#231;&#227;o&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="simplesect" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="table" text="Tabela&#160;%n, &#8220;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="authorgroup">
+      <l:template name="sep" text=", "/>
+      <l:template name="sep2" text=" e "/>
+      <l:template name="seplast" text=", e "/>
+   </l:context>
+
+   <l:context name="glossary">
+      <l:template name="see" text="Ver "/>
+      <l:template name="seealso" text="Ver Tamb&#233;m "/>
+   </l:context>
+
+   <l:context name="msgset">
+      <l:template name="MsgAud" text="Audi&#234;ncia: "/>
+      <l:template name="MsgLevel" text="N&#237;vel: "/>
+      <l:template name="MsgOrig" text="Origem: "/>
+   </l:context>
+
+   <l:context name="datetime">
+      <l:template name="format" text="m/d/Y" lang="en"/>
+   </l:context>
+
+   <l:context name="datetime-full">
+      <l:template name="January" text="January" lang="en"/>
+      <l:template name="February" text="February" lang="en"/>
+      <l:template name="March" text="March" lang="en"/>
+      <l:template name="April" text="April" lang="en"/>
+      <l:template name="May" text="May" lang="en"/>
+      <l:template name="June" text="June" lang="en"/>
+      <l:template name="July" text="July" lang="en"/>
+      <l:template name="August" text="August" lang="en"/>
+      <l:template name="September" text="September" lang="en"/>
+      <l:template name="October" text="October" lang="en"/>
+      <l:template name="November" text="November" lang="en"/>
+      <l:template name="December" text="December" lang="en"/>
+      <l:template name="Monday" text="Monday" lang="en"/>
+      <l:template name="Tuesday" text="Tuesday" lang="en"/>
+      <l:template name="Wednesday" text="Wednesday" lang="en"/>
+      <l:template name="Thursday" text="Thursday" lang="en"/>
+      <l:template name="Friday" text="Friday" lang="en"/>
+      <l:template name="Saturday" text="Saturday" lang="en"/>
+      <l:template name="Sunday" text="Sunday" lang="en"/>
+   </l:context>
+
+   <l:context name="datetime-abbrev">
+      <l:template name="Jan" text="Jan" lang="en"/>
+      <l:template name="Feb" text="Feb" lang="en"/>
+      <l:template name="Mar" text="Mar" lang="en"/>
+      <l:template name="Apr" text="Apr" lang="en"/>
+      <l:template name="May" text="May" lang="en"/>
+      <l:template name="Jun" text="Jun" lang="en"/>
+      <l:template name="Jul" text="Jul" lang="en"/>
+      <l:template name="Aug" text="Aug" lang="en"/>
+      <l:template name="Sep" text="Sep" lang="en"/>
+      <l:template name="Oct" text="Oct" lang="en"/>
+      <l:template name="Nov" text="Nov" lang="en"/>
+      <l:template name="Dec" text="Dec" lang="en"/>
+      <l:template name="Mon" text="Mon" lang="en"/>
+      <l:template name="Tue" text="Tue" lang="en"/>
+      <l:template name="Wed" text="Wed" lang="en"/>
+      <l:template name="Thu" text="Thu" lang="en"/>
+      <l:template name="Fri" text="Fri" lang="en"/>
+      <l:template name="Sat" text="Sat" lang="en"/>
+      <l:template name="Sun" text="Sun" lang="en"/>
+   </l:context>
+
+   <l:context name="htmlhelp">
+      <l:template name="langcode" text="0x0416 Portuguese (BRAZIL)"/>
+   </l:context>
+
+   <l:letters lang="en">
+      <l:l i="-1"/>
+      <l:l i="0">Symbols</l:l>
+      <l:l i="10">A</l:l>
+      <l:l i="10">a</l:l>
+      <l:l i="10">&#192;</l:l>
+      <l:l i="10">&#224;</l:l>
+      <l:l i="10">&#193;</l:l>
+      <l:l i="10">&#225;</l:l>
+      <l:l i="10">&#194;</l:l>
+      <l:l i="10">&#226;</l:l>
+      <l:l i="10">&#195;</l:l>
+      <l:l i="10">&#227;</l:l>
+      <l:l i="10">&#196;</l:l>
+      <l:l i="10">&#228;</l:l>
+      <l:l i="10">&#197;</l:l>
+      <l:l i="10">&#229;</l:l>
+      <l:l i="10">&#256;</l:l>
+      <l:l i="10">&#257;</l:l>
+      <l:l i="10">&#258;</l:l>
+      <l:l i="10">&#259;</l:l>
+      <l:l i="10">&#260;</l:l>
+      <l:l i="10">&#261;</l:l>
+      <l:l i="10">&#461;</l:l>
+      <l:l i="10">&#462;</l:l>
+      <l:l i="10">&#478;</l:l>
+      <l:l i="10">&#479;</l:l>
+      <l:l i="10">&#480;</l:l>
+      <l:l i="10">&#481;</l:l>
+      <l:l i="10">&#506;</l:l>
+      <l:l i="10">&#507;</l:l>
+      <l:l i="10">&#512;</l:l>
+      <l:l i="10">&#513;</l:l>
+      <l:l i="10">&#514;</l:l>
+      <l:l i="10">&#515;</l:l>
+      <l:l i="10">&#550;</l:l>
+      <l:l i="10">&#551;</l:l>
+      <l:l i="10">&#7680;</l:l>
+      <l:l i="10">&#7681;</l:l>
+      <l:l i="10">&#7834;</l:l>
+      <l:l i="10">&#7840;</l:l>
+      <l:l i="10">&#7841;</l:l>
+      <l:l i="10">&#7842;</l:l>
+      <l:l i="10">&#7843;</l:l>
+      <l:l i="10">&#7844;</l:l>
+      <l:l i="10">&#7845;</l:l>
+      <l:l i="10">&#7846;</l:l>
+      <l:l i="10">&#7847;</l:l>
+      <l:l i="10">&#7848;</l:l>
+      <l:l i="10">&#7849;</l:l>
+      <l:l i="10">&#7850;</l:l>
+      <l:l i="10">&#7851;</l:l>
+      <l:l i="10">&#7852;</l:l>
+      <l:l i="10">&#7853;</l:l>
+      <l:l i="10">&#7854;</l:l>
+      <l:l i="10">&#7855;</l:l>
+      <l:l i="10">&#7856;</l:l>
+      <l:l i="10">&#7857;</l:l>
+      <l:l i="10">&#7858;</l:l>
+      <l:l i="10">&#7859;</l:l>
+      <l:l i="10">&#7860;</l:l>
+      <l:l i="10">&#7861;</l:l>
+      <l:l i="10">&#7862;</l:l>
+      <l:l i="10">&#7863;</l:l>
+      <l:l i="20">B</l:l>
+      <l:l i="20">b</l:l>
+      <l:l i="20">&#384;</l:l>
+      <l:l i="20">&#385;</l:l>
+      <l:l i="20">&#595;</l:l>
+      <l:l i="20">&#386;</l:l>
+      <l:l i="20">&#387;</l:l>
+      <l:l i="20">&#7682;</l:l>
+      <l:l i="20">&#7683;</l:l>
+      <l:l i="20">&#7684;</l:l>
+      <l:l i="20">&#7685;</l:l>
+      <l:l i="20">&#7686;</l:l>
+      <l:l i="20">&#7687;</l:l>
+      <l:l i="30">C</l:l>
+      <l:l i="30">c</l:l>
+      <l:l i="30">&#199;</l:l>
+      <l:l i="30">&#231;</l:l>
+      <l:l i="30">&#262;</l:l>
+      <l:l i="30">&#263;</l:l>
+      <l:l i="30">&#264;</l:l>
+      <l:l i="30">&#265;</l:l>
+      <l:l i="30">&#266;</l:l>
+      <l:l i="30">&#267;</l:l>
+      <l:l i="30">&#268;</l:l>
+      <l:l i="30">&#269;</l:l>
+      <l:l i="30">&#391;</l:l>
+      <l:l i="30">&#392;</l:l>
+      <l:l i="30">&#597;</l:l>
+      <l:l i="30">&#7688;</l:l>
+      <l:l i="30">&#7689;</l:l>
+      <l:l i="40">D</l:l>
+      <l:l i="40">d</l:l>
+      <l:l i="40">&#270;</l:l>
+      <l:l i="40">&#271;</l:l>
+      <l:l i="40">&#272;</l:l>
+      <l:l i="40">&#273;</l:l>
+      <l:l i="40">&#394;</l:l>
+      <l:l i="40">&#599;</l:l>
+      <l:l i="40">&#395;</l:l>
+      <l:l i="40">&#396;</l:l>
+      <l:l i="40">&#453;</l:l>
+      <l:l i="40">&#498;</l:l>
+      <l:l i="40">&#545;</l:l>
+      <l:l i="40">&#598;</l:l>
+      <l:l i="40">&#7690;</l:l>
+      <l:l i="40">&#7691;</l:l>
+      <l:l i="40">&#7692;</l:l>
+      <l:l i="40">&#7693;</l:l>
+      <l:l i="40">&#7694;</l:l>
+      <l:l i="40">&#7695;</l:l>
+      <l:l i="40">&#7696;</l:l>
+      <l:l i="40">&#7697;</l:l>
+      <l:l i="40">&#7698;</l:l>
+      <l:l i="40">&#7699;</l:l>
+      <l:l i="50">E</l:l>
+      <l:l i="50">e</l:l>
+      <l:l i="50">&#200;</l:l>
+      <l:l i="50">&#232;</l:l>
+      <l:l i="50">&#201;</l:l>
+      <l:l i="50">&#233;</l:l>
+      <l:l i="50">&#202;</l:l>
+      <l:l i="50">&#234;</l:l>
+      <l:l i="50">&#203;</l:l>
+      <l:l i="50">&#235;</l:l>
+      <l:l i="50">&#274;</l:l>
+      <l:l i="50">&#275;</l:l>
+      <l:l i="50">&#276;</l:l>
+      <l:l i="50">&#277;</l:l>
+      <l:l i="50">&#278;</l:l>
+      <l:l i="50">&#279;</l:l>
+      <l:l i="50">&#280;</l:l>
+      <l:l i="50">&#281;</l:l>
+      <l:l i="50">&#282;</l:l>
+      <l:l i="50">&#283;</l:l>
+      <l:l i="50">&#516;</l:l>
+      <l:l i="50">&#517;</l:l>
+      <l:l i="50">&#518;</l:l>
+      <l:l i="50">&#519;</l:l>
+      <l:l i="50">&#552;</l:l>
+      <l:l i="50">&#553;</l:l>
+      <l:l i="50">&#7700;</l:l>
+      <l:l i="50">&#7701;</l:l>
+      <l:l i="50">&#7702;</l:l>
+      <l:l i="50">&#7703;</l:l>
+      <l:l i="50">&#7704;</l:l>
+      <l:l i="50">&#7705;</l:l>
+      <l:l i="50">&#7706;</l:l>
+      <l:l i="50">&#7707;</l:l>
+      <l:l i="50">&#7708;</l:l>
+      <l:l i="50">&#7709;</l:l>
+      <l:l i="50">&#7864;</l:l>
+      <l:l i="50">&#7865;</l:l>
+      <l:l i="50">&#7866;</l:l>
+      <l:l i="50">&#7867;</l:l>
+      <l:l i="50">&#7868;</l:l>
+      <l:l i="50">&#7869;</l:l>
+      <l:l i="50">&#7870;</l:l>
+      <l:l i="50">&#7871;</l:l>
+      <l:l i="50">&#7872;</l:l>
+      <l:l i="50">&#7873;</l:l>
+      <l:l i="50">&#7874;</l:l>
+      <l:l i="50">&#7875;</l:l>
+      <l:l i="50">&#7876;</l:l>
+      <l:l i="50">&#7877;</l:l>
+      <l:l i="50">&#7878;</l:l>
+      <l:l i="50">&#7879;</l:l>
+      <l:l i="60">F</l:l>
+      <l:l i="60">f</l:l>
+      <l:l i="60">&#401;</l:l>
+      <l:l i="60">&#402;</l:l>
+      <l:l i="60">&#7710;</l:l>
+      <l:l i="60">&#7711;</l:l>
+      <l:l i="70">G</l:l>
+      <l:l i="70">g</l:l>
+      <l:l i="70">&#284;</l:l>
+      <l:l i="70">&#285;</l:l>
+      <l:l i="70">&#286;</l:l>
+      <l:l i="70">&#287;</l:l>
+      <l:l i="70">&#288;</l:l>
+      <l:l i="70">&#289;</l:l>
+      <l:l i="70">&#290;</l:l>
+      <l:l i="70">&#291;</l:l>
+      <l:l i="70">&#403;</l:l>
+      <l:l i="70">&#608;</l:l>
+      <l:l i="70">&#484;</l:l>
+      <l:l i="70">&#485;</l:l>
+      <l:l i="70">&#486;</l:l>
+      <l:l i="70">&#487;</l:l>
+      <l:l i="70">&#500;</l:l>
+      <l:l i="70">&#501;</l:l>
+      <l:l i="70">&#7712;</l:l>
+      <l:l i="70">&#7713;</l:l>
+      <l:l i="80">H</l:l>
+      <l:l i="80">h</l:l>
+      <l:l i="80">&#292;</l:l>
+      <l:l i="80">&#293;</l:l>
+      <l:l i="80">&#294;</l:l>
+      <l:l i="80">&#295;</l:l>
+      <l:l i="80">&#542;</l:l>
+      <l:l i="80">&#543;</l:l>
+      <l:l i="80">&#614;</l:l>
+      <l:l i="80">&#7714;</l:l>
+      <l:l i="80">&#7715;</l:l>
+      <l:l i="80">&#7716;</l:l>
+      <l:l i="80">&#7717;</l:l>
+      <l:l i="80">&#7718;</l:l>
+      <l:l i="80">&#7719;</l:l>
+      <l:l i="80">&#7720;</l:l>
+      <l:l i="80">&#7721;</l:l>
+      <l:l i="80">&#7722;</l:l>
+      <l:l i="80">&#7723;</l:l>
+      <l:l i="80">&#7830;</l:l>
+      <l:l i="90">I</l:l>
+      <l:l i="90">i</l:l>
+      <l:l i="90">&#204;</l:l>
+      <l:l i="90">&#236;</l:l>
+      <l:l i="90">&#205;</l:l>
+      <l:l i="90">&#237;</l:l>
+      <l:l i="90">&#206;</l:l>
+      <l:l i="90">&#238;</l:l>
+      <l:l i="90">&#207;</l:l>
+      <l:l i="90">&#239;</l:l>
+      <l:l i="90">&#296;</l:l>
+      <l:l i="90">&#297;</l:l>
+      <l:l i="90">&#298;</l:l>
+      <l:l i="90">&#299;</l:l>
+      <l:l i="90">&#300;</l:l>
+      <l:l i="90">&#301;</l:l>
+      <l:l i="90">&#302;</l:l>
+      <l:l i="90">&#303;</l:l>
+      <l:l i="90">&#304;</l:l>
+      <l:l i="90">&#407;</l:l>
+      <l:l i="90">&#616;</l:l>
+      <l:l i="90">&#463;</l:l>
+      <l:l i="90">&#464;</l:l>
+      <l:l i="90">&#520;</l:l>
+      <l:l i="90">&#521;</l:l>
+      <l:l i="90">&#522;</l:l>
+      <l:l i="90">&#523;</l:l>
+      <l:l i="90">&#7724;</l:l>
+      <l:l i="90">&#7725;</l:l>
+      <l:l i="90">&#7726;</l:l>
+      <l:l i="90">&#7727;</l:l>
+      <l:l i="90">&#7880;</l:l>
+      <l:l i="90">&#7881;</l:l>
+      <l:l i="90">&#7882;</l:l>
+      <l:l i="90">&#7883;</l:l>
+      <l:l i="100">J</l:l>
+      <l:l i="100">j</l:l>
+      <l:l i="100">&#308;</l:l>
+      <l:l i="100">&#309;</l:l>
+      <l:l i="100">&#496;</l:l>
+      <l:l i="100">&#669;</l:l>
+      <l:l i="110">K</l:l>
+      <l:l i="110">k</l:l>
+      <l:l i="110">&#310;</l:l>
+      <l:l i="110">&#311;</l:l>
+      <l:l i="110">&#408;</l:l>
+      <l:l i="110">&#409;</l:l>
+      <l:l i="110">&#488;</l:l>
+      <l:l i="110">&#489;</l:l>
+      <l:l i="110">&#7728;</l:l>
+      <l:l i="110">&#7729;</l:l>
+      <l:l i="110">&#7730;</l:l>
+      <l:l i="110">&#7731;</l:l>
+      <l:l i="110">&#7732;</l:l>
+      <l:l i="110">&#7733;</l:l>
+      <l:l i="120">L</l:l>
+      <l:l i="120">l</l:l>
+      <l:l i="120">&#313;</l:l>
+      <l:l i="120">&#314;</l:l>
+      <l:l i="120">&#315;</l:l>
+      <l:l i="120">&#316;</l:l>
+      <l:l i="120">&#317;</l:l>
+      <l:l i="120">&#318;</l:l>
+      <l:l i="120">&#319;</l:l>
+      <l:l i="120">&#320;</l:l>
+      <l:l i="120">&#321;</l:l>
+      <l:l i="120">&#322;</l:l>
+      <l:l i="120">&#410;</l:l>
+      <l:l i="120">&#456;</l:l>
+      <l:l i="120">&#564;</l:l>
+      <l:l i="120">&#619;</l:l>
+      <l:l i="120">&#620;</l:l>
+      <l:l i="120">&#621;</l:l>
+      <l:l i="120">&#7734;</l:l>
+      <l:l i="120">&#7735;</l:l>
+      <l:l i="120">&#7736;</l:l>
+      <l:l i="120">&#7737;</l:l>
+      <l:l i="120">&#7738;</l:l>
+      <l:l i="120">&#7739;</l:l>
+      <l:l i="120">&#7740;</l:l>
+      <l:l i="120">&#7741;</l:l>
+      <l:l i="130">M</l:l>
+      <l:l i="130">m</l:l>
+      <l:l i="130">&#625;</l:l>
+      <l:l i="130">&#7742;</l:l>
+      <l:l i="130">&#7743;</l:l>
+      <l:l i="130">&#7744;</l:l>
+      <l:l i="130">&#7745;</l:l>
+      <l:l i="130">&#7746;</l:l>
+      <l:l i="130">&#7747;</l:l>
+      <l:l i="140">N</l:l>
+      <l:l i="140">n</l:l>
+      <l:l i="140">&#209;</l:l>
+      <l:l i="140">&#241;</l:l>
+      <l:l i="140">&#323;</l:l>
+      <l:l i="140">&#324;</l:l>
+      <l:l i="140">&#325;</l:l>
+      <l:l i="140">&#326;</l:l>
+      <l:l i="140">&#327;</l:l>
+      <l:l i="140">&#328;</l:l>
+      <l:l i="140">&#413;</l:l>
+      <l:l i="140">&#626;</l:l>
+      <l:l i="140">&#414;</l:l>
+      <l:l i="140">&#544;</l:l>
+      <l:l i="140">&#459;</l:l>
+      <l:l i="140">&#504;</l:l>
+      <l:l i="140">&#505;</l:l>
+      <l:l i="140">&#565;</l:l>
+      <l:l i="140">&#627;</l:l>
+      <l:l i="140">&#7748;</l:l>
+      <l:l i="140">&#7749;</l:l>
+      <l:l i="140">&#7750;</l:l>
+      <l:l i="140">&#7751;</l:l>
+      <l:l i="140">&#7752;</l:l>
+      <l:l i="140">&#7753;</l:l>
+      <l:l i="140">&#7754;</l:l>
+      <l:l i="140">&#7755;</l:l>
+      <l:l i="150">O</l:l>
+      <l:l i="150">o</l:l>
+      <l:l i="150">&#210;</l:l>
+      <l:l i="150">&#242;</l:l>
+      <l:l i="150">&#211;</l:l>
+      <l:l i="150">&#243;</l:l>
+      <l:l i="150">&#212;</l:l>
+      <l:l i="150">&#244;</l:l>
+      <l:l i="150">&#213;</l:l>
+      <l:l i="150">&#245;</l:l>
+      <l:l i="150">&#214;</l:l>
+      <l:l i="150">&#246;</l:l>
+      <l:l i="150">&#216;</l:l>
+      <l:l i="150">&#248;</l:l>
+      <l:l i="150">&#332;</l:l>
+      <l:l i="150">&#333;</l:l>
+      <l:l i="150">&#334;</l:l>
+      <l:l i="150">&#335;</l:l>
+      <l:l i="150">&#336;</l:l>
+      <l:l i="150">&#337;</l:l>
+      <l:l i="150">&#415;</l:l>
+      <l:l i="150">&#416;</l:l>
+      <l:l i="150">&#417;</l:l>
+      <l:l i="150">&#465;</l:l>
+      <l:l i="150">&#466;</l:l>
+      <l:l i="150">&#490;</l:l>
+      <l:l i="150">&#491;</l:l>
+      <l:l i="150">&#492;</l:l>
+      <l:l i="150">&#493;</l:l>
+      <l:l i="150">&#510;</l:l>
+      <l:l i="150">&#511;</l:l>
+      <l:l i="150">&#524;</l:l>
+      <l:l i="150">&#525;</l:l>
+      <l:l i="150">&#526;</l:l>
+      <l:l i="150">&#527;</l:l>
+      <l:l i="150">&#554;</l:l>
+      <l:l i="150">&#555;</l:l>
+      <l:l i="150">&#556;</l:l>
+      <l:l i="150">&#557;</l:l>
+      <l:l i="150">&#558;</l:l>
+      <l:l i="150">&#559;</l:l>
+      <l:l i="150">&#560;</l:l>
+      <l:l i="150">&#561;</l:l>
+      <l:l i="150">&#7756;</l:l>
+      <l:l i="150">&#7757;</l:l>
+      <l:l i="150">&#7758;</l:l>
+      <l:l i="150">&#7759;</l:l>
+      <l:l i="150">&#7760;</l:l>
+      <l:l i="150">&#7761;</l:l>
+      <l:l i="150">&#7762;</l:l>
+      <l:l i="150">&#7763;</l:l>
+      <l:l i="150">&#7884;</l:l>
+      <l:l i="150">&#7885;</l:l>
+      <l:l i="150">&#7886;</l:l>
+      <l:l i="150">&#7887;</l:l>
+      <l:l i="150">&#7888;</l:l>
+      <l:l i="150">&#7889;</l:l>
+      <l:l i="150">&#7890;</l:l>
+      <l:l i="150">&#7891;</l:l>
+      <l:l i="150">&#7892;</l:l>
+      <l:l i="150">&#7893;</l:l>
+      <l:l i="150">&#7894;</l:l>
+      <l:l i="150">&#7895;</l:l>
+      <l:l i="150">&#7896;</l:l>
+      <l:l i="150">&#7897;</l:l>
+      <l:l i="150">&#7898;</l:l>
+      <l:l i="150">&#7899;</l:l>
+      <l:l i="150">&#7900;</l:l>
+      <l:l i="150">&#7901;</l:l>
+      <l:l i="150">&#7902;</l:l>
+      <l:l i="150">&#7903;</l:l>
+      <l:l i="150">&#7904;</l:l>
+      <l:l i="150">&#7905;</l:l>
+      <l:l i="150">&#7906;</l:l>
+      <l:l i="150">&#7907;</l:l>
+      <l:l i="160">P</l:l>
+      <l:l i="160">p</l:l>
+      <l:l i="160">&#420;</l:l>
+      <l:l i="160">&#421;</l:l>
+      <l:l i="160">&#7764;</l:l>
+      <l:l i="160">&#7765;</l:l>
+      <l:l i="160">&#7766;</l:l>
+      <l:l i="160">&#7767;</l:l>
+      <l:l i="170">Q</l:l>
+      <l:l i="170">q</l:l>
+      <l:l i="170">&#672;</l:l>
+      <l:l i="180">R</l:l>
+      <l:l i="180">r</l:l>
+      <l:l i="180">&#340;</l:l>
+      <l:l i="180">&#341;</l:l>
+      <l:l i="180">&#342;</l:l>
+      <l:l i="180">&#343;</l:l>
+      <l:l i="180">&#344;</l:l>
+      <l:l i="180">&#345;</l:l>
+      <l:l i="180">&#528;</l:l>
+      <l:l i="180">&#529;</l:l>
+      <l:l i="180">&#530;</l:l>
+      <l:l i="180">&#531;</l:l>
+      <l:l i="180">&#636;</l:l>
+      <l:l i="180">&#637;</l:l>
+      <l:l i="180">&#638;</l:l>
+      <l:l i="180">&#7768;</l:l>
+      <l:l i="180">&#7769;</l:l>
+      <l:l i="180">&#7770;</l:l>
+      <l:l i="180">&#7771;</l:l>
+      <l:l i="180">&#7772;</l:l>
+      <l:l i="180">&#7773;</l:l>
+      <l:l i="180">&#7774;</l:l>
+      <l:l i="180">&#7775;</l:l>
+      <l:l i="190">S</l:l>
+      <l:l i="190">s</l:l>
+      <l:l i="190">&#346;</l:l>
+      <l:l i="190">&#347;</l:l>
+      <l:l i="190">&#348;</l:l>
+      <l:l i="190">&#349;</l:l>
+      <l:l i="190">&#350;</l:l>
+      <l:l i="190">&#351;</l:l>
+      <l:l i="190">&#352;</l:l>
+      <l:l i="190">&#353;</l:l>
+      <l:l i="190">&#536;</l:l>
+      <l:l i="190">&#537;</l:l>
+      <l:l i="190">&#642;</l:l>
+      <l:l i="190">&#7776;</l:l>
+      <l:l i="190">&#7777;</l:l>
+      <l:l i="190">&#7778;</l:l>
+      <l:l i="190">&#7779;</l:l>
+      <l:l i="190">&#7780;</l:l>
+      <l:l i="190">&#7781;</l:l>
+      <l:l i="190">&#7782;</l:l>
+      <l:l i="190">&#7783;</l:l>
+      <l:l i="190">&#7784;</l:l>
+      <l:l i="190">&#7785;</l:l>
+      <l:l i="200">T</l:l>
+      <l:l i="200">t</l:l>
+      <l:l i="200">&#354;</l:l>
+      <l:l i="200">&#355;</l:l>
+      <l:l i="200">&#356;</l:l>
+      <l:l i="200">&#357;</l:l>
+      <l:l i="200">&#358;</l:l>
+      <l:l i="200">&#359;</l:l>
+      <l:l i="200">&#427;</l:l>
+      <l:l i="200">&#428;</l:l>
+      <l:l i="200">&#429;</l:l>
+      <l:l i="200">&#430;</l:l>
+      <l:l i="200">&#648;</l:l>
+      <l:l i="200">&#538;</l:l>
+      <l:l i="200">&#539;</l:l>
+      <l:l i="200">&#566;</l:l>
+      <l:l i="200">&#7786;</l:l>
+      <l:l i="200">&#7787;</l:l>
+      <l:l i="200">&#7788;</l:l>
+      <l:l i="200">&#7789;</l:l>
+      <l:l i="200">&#7790;</l:l>
+      <l:l i="200">&#7791;</l:l>
+      <l:l i="200">&#7792;</l:l>
+      <l:l i="200">&#7793;</l:l>
+      <l:l i="200">&#7831;</l:l>
+      <l:l i="210">U</l:l>
+      <l:l i="210">u</l:l>
+      <l:l i="210">&#217;</l:l>
+      <l:l i="210">&#249;</l:l>
+      <l:l i="210">&#218;</l:l>
+      <l:l i="210">&#250;</l:l>
+      <l:l i="210">&#219;</l:l>
+      <l:l i="210">&#251;</l:l>
+      <l:l i="210">&#220;</l:l>
+      <l:l i="210">&#252;</l:l>
+      <l:l i="210">&#360;</l:l>
+      <l:l i="210">&#361;</l:l>
+      <l:l i="210">&#362;</l:l>
+      <l:l i="210">&#363;</l:l>
+      <l:l i="210">&#364;</l:l>
+      <l:l i="210">&#365;</l:l>
+      <l:l i="210">&#366;</l:l>
+      <l:l i="210">&#367;</l:l>
+      <l:l i="210">&#368;</l:l>
+      <l:l i="210">&#369;</l:l>
+      <l:l i="210">&#370;</l:l>
+      <l:l i="210">&#371;</l:l>
+      <l:l i="210">&#431;</l:l>
+      <l:l i="210">&#432;</l:l>
+      <l:l i="210">&#467;</l:l>
+      <l:l i="210">&#468;</l:l>
+      <l:l i="210">&#469;</l:l>
+      <l:l i="210">&#470;</l:l>
+      <l:l i="210">&#471;</l:l>
+      <l:l i="210">&#472;</l:l>
+      <l:l i="210">&#473;</l:l>
+      <l:l i="210">&#474;</l:l>
+      <l:l i="210">&#475;</l:l>
+      <l:l i="210">&#476;</l:l>
+      <l:l i="210">&#532;</l:l>
+      <l:l i="210">&#533;</l:l>
+      <l:l i="210">&#534;</l:l>
+      <l:l i="210">&#535;</l:l>
+      <l:l i="210">&#7794;</l:l>
+      <l:l i="210">&#7795;</l:l>
+      <l:l i="210">&#7796;</l:l>
+      <l:l i="210">&#7797;</l:l>
+      <l:l i="210">&#7798;</l:l>
+      <l:l i="210">&#7799;</l:l>
+      <l:l i="210">&#7800;</l:l>
+      <l:l i="210">&#7801;</l:l>
+      <l:l i="210">&#7802;</l:l>
+      <l:l i="210">&#7803;</l:l>
+      <l:l i="210">&#7908;</l:l>
+      <l:l i="210">&#7909;</l:l>
+      <l:l i="210">&#7910;</l:l>
+      <l:l i="210">&#7911;</l:l>
+      <l:l i="210">&#7912;</l:l>
+      <l:l i="210">&#7913;</l:l>
+      <l:l i="210">&#7914;</l:l>
+      <l:l i="210">&#7915;</l:l>
+      <l:l i="210">&#7916;</l:l>
+      <l:l i="210">&#7917;</l:l>
+      <l:l i="210">&#7918;</l:l>
+      <l:l i="210">&#7919;</l:l>
+      <l:l i="210">&#7920;</l:l>
+      <l:l i="210">&#7921;</l:l>
+      <l:l i="220">V</l:l>
+      <l:l i="220">v</l:l>
+      <l:l i="220">&#434;</l:l>
+      <l:l i="220">&#651;</l:l>
+      <l:l i="220">&#7804;</l:l>
+      <l:l i="220">&#7805;</l:l>
+      <l:l i="220">&#7806;</l:l>
+      <l:l i="220">&#7807;</l:l>
+      <l:l i="230">W</l:l>
+      <l:l i="230">w</l:l>
+      <l:l i="230">&#372;</l:l>
+      <l:l i="230">&#373;</l:l>
+      <l:l i="230">&#7808;</l:l>
+      <l:l i="230">&#7809;</l:l>
+      <l:l i="230">&#7810;</l:l>
+      <l:l i="230">&#7811;</l:l>
+      <l:l i="230">&#7812;</l:l>
+      <l:l i="230">&#7813;</l:l>
+      <l:l i="230">&#7814;</l:l>
+      <l:l i="230">&#7815;</l:l>
+      <l:l i="230">&#7816;</l:l>
+      <l:l i="230">&#7817;</l:l>
+      <l:l i="230">&#7832;</l:l>
+      <l:l i="240">X</l:l>
+      <l:l i="240">x</l:l>
+      <l:l i="240">&#7818;</l:l>
+      <l:l i="240">&#7819;</l:l>
+      <l:l i="240">&#7820;</l:l>
+      <l:l i="240">&#7821;</l:l>
+      <l:l i="250">Y</l:l>
+      <l:l i="250">y</l:l>
+      <l:l i="250">&#221;</l:l>
+      <l:l i="250">&#253;</l:l>
+      <l:l i="250">&#255;</l:l>
+      <l:l i="250">&#376;</l:l>
+      <l:l i="250">&#374;</l:l>
+      <l:l i="250">&#375;</l:l>
+      <l:l i="250">&#435;</l:l>
+      <l:l i="250">&#436;</l:l>
+      <l:l i="250">&#562;</l:l>
+      <l:l i="250">&#563;</l:l>
+      <l:l i="250">&#7822;</l:l>
+      <l:l i="250">&#7823;</l:l>
+      <l:l i="250">&#7833;</l:l>
+      <l:l i="250">&#7922;</l:l>
+      <l:l i="250">&#7923;</l:l>
+      <l:l i="250">&#7924;</l:l>
+      <l:l i="250">&#7925;</l:l>
+      <l:l i="250">&#7926;</l:l>
+      <l:l i="250">&#7927;</l:l>
+      <l:l i="250">&#7928;</l:l>
+      <l:l i="250">&#7929;</l:l>
+      <l:l i="260">Z</l:l>
+      <l:l i="260">z</l:l>
+      <l:l i="260">&#377;</l:l>
+      <l:l i="260">&#378;</l:l>
+      <l:l i="260">&#379;</l:l>
+      <l:l i="260">&#380;</l:l>
+      <l:l i="260">&#381;</l:l>
+      <l:l i="260">&#382;</l:l>
+      <l:l i="260">&#437;</l:l>
+      <l:l i="260">&#438;</l:l>
+      <l:l i="260">&#548;</l:l>
+      <l:l i="260">&#549;</l:l>
+      <l:l i="260">&#656;</l:l>
+      <l:l i="260">&#657;</l:l>
+      <l:l i="260">&#7824;</l:l>
+      <l:l i="260">&#7825;</l:l>
+      <l:l i="260">&#7826;</l:l>
+      <l:l i="260">&#7827;</l:l>
+      <l:l i="260">&#7828;</l:l>
+      <l:l i="260">&#7829;</l:l>
+   </l:letters>
+</l:l10n>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/ro.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/ro.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/ro.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1153 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="ro" english-language-name="Romanian">
+
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+   <l:gentext key="Abstract" text="Rezumat"/>
+   <l:gentext key="abstract" text="Rezumat"/>
+   <l:gentext key="Answer" text="A:"/>
+   <l:gentext key="answer" text="A:"/>
+   <l:gentext key="Appendix" text="Anexa"/>
+   <l:gentext key="appendix" text="anexa"/>
+   <l:gentext key="Article" text="Articol"/>
+   <l:gentext key="article" text="Articol"/>
+   <l:gentext key="Bibliography" text="Bibliografie"/>
+   <l:gentext key="bibliography" text="Bibliografie"/>
+   <l:gentext key="Book" text="Carte"/>
+   <l:gentext key="book" text="Carte"/>
+   <l:gentext key="CAUTION" text="ATEN&#222;IE"/>
+   <l:gentext key="Caution" text="Aten&#254;ie"/>
+   <l:gentext key="caution" text="Aten&#254;ie"/>
+   <l:gentext key="Chapter" text="Cap."/>
+   <l:gentext key="chapter" text="cap."/>
+   <l:gentext key="Colophon" text="Colophon"/>
+   <l:gentext key="colophon" text="Colophon"/>
+   <l:gentext key="Copyright" text="Copyright"/>
+   <l:gentext key="copyright" text="Copyright"/>
+   <l:gentext key="Dedication" text="Dedica&#254;ie"/>
+   <l:gentext key="dedication" text="Dedica&#254;ie"/>
+   <l:gentext key="Edition" text="Edi&#254;ie"/>
+   <l:gentext key="edition" text="Edi&#254;ie"/>
+   <l:gentext key="Equation" text="ecua&#254;ia"/>
+   <l:gentext key="equation" text="ecua&#254;ia"/>
+   <l:gentext key="Example" text="Exemplu"/>
+   <l:gentext key="example" text="Exemplu"/>
+   <l:gentext key="Figure" text="Fig."/>
+   <l:gentext key="figure" text="Fig."/>
+   <l:gentext key="Glossary" text="Glosar"/>
+   <l:gentext key="glossary" text="Glosar"/>
+   <l:gentext key="GlossSee" text="Vezi"/>
+   <l:gentext key="glosssee" text="Vezi"/>
+   <l:gentext key="GlossSeeAlso" text="Vezi &#351;i"/>
+   <l:gentext key="glossseealso" text="Vezi &#351;i"/>
+   <l:gentext key="IMPORTANT" text="IMPORTANT"/>
+   <l:gentext key="important" text="Important"/>
+   <l:gentext key="Important" text="Important"/>
+   <l:gentext key="Index" text="Index"/>
+   <l:gentext key="index" text="Index"/>
+   <l:gentext key="ISBN" text="ISBN"/>
+   <l:gentext key="isbn" text="ISBN"/>
+   <l:gentext key="LegalNotice" text="Legal Notice"/>
+   <l:gentext key="legalnotice" text="Legal Notice"/>
+   <l:gentext key="MsgAud" text="Audience"/>
+   <l:gentext key="msgaud" text="Audience"/>
+   <l:gentext key="MsgLevel" text="Nivel"/>
+   <l:gentext key="msglevel" text="Nivel"/>
+   <l:gentext key="MsgOrig" text="Origine"/>
+   <l:gentext key="msgorig" text="Origine"/>
+   <l:gentext key="NOTE" text="NOT&#195;"/>
+   <l:gentext key="Note" text="Not&#227;"/>
+   <l:gentext key="note" text="Not&#227;"/>
+   <l:gentext key="Part" text="Parte"/>
+   <l:gentext key="part" text="Parte"/>
+   <l:gentext key="Preface" text="Prefa&#254;&#227;"/>
+   <l:gentext key="preface" text="Prefa&#254;&#227;"/>
+   <l:gentext key="Procedure" text="Procedur&#227;"/>
+   <l:gentext key="procedure" text="Procedur&#227;"/>
+   <l:gentext key="ProductionSet" text="Production"/>
+   <l:gentext key="PubDate" text="Publication Date" lang="en"/>
+   <l:gentext key="pubdate" text="Publication date" lang="en"/>
+   <l:gentext key="Published" text="Publicat"/>
+   <l:gentext key="published" text="Publicat"/>
+   <l:gentext key="Qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="Question" text="Q:"/>
+   <l:gentext key="question" text="Q:"/>
+   <l:gentext key="RefEntry" text=""/>
+   <l:gentext key="refentry" text=""/>
+   <l:gentext key="Reference" text="Referin&#254;&#227;"/>
+   <l:gentext key="reference" text="Referin&#254;&#227;"/>
+   <l:gentext key="RefName" text="Nume"/>
+   <l:gentext key="refname" text="Nume"/>
+   <l:gentext key="RefSection" text=""/>
+   <l:gentext key="refsection" text=""/>
+   <l:gentext key="RefSynopsisDiv" text="Rezumat"/>
+   <l:gentext key="refsynopsisdiv" text="Rezumat"/>
+   <l:gentext key="RevHistory" text="Istoricul versiunilor"/>
+   <l:gentext key="revhistory" text="Istoricul versiunilor"/>
+   <l:gentext key="revision" text="Versiune"/>
+   <l:gentext key="Revision" text="Versiune"/>
+   <l:gentext key="sect1" text="Section"/>
+   <l:gentext key="sect2" text="Section"/>
+   <l:gentext key="sect3" text="Section"/>
+   <l:gentext key="sect4" text="Section"/>
+   <l:gentext key="sect5" text="Section"/>
+   <l:gentext key="section" text="sec."/>
+   <l:gentext key="Section" text="Sec&#254;iune"/>
+   <l:gentext key="see" text="Vezi"/>
+   <l:gentext key="See" text="Vezi"/>
+   <l:gentext key="seealso" text="Vezi &#351;i"/>
+   <l:gentext key="Seealso" text="Vezi &#351;i"/>
+   <l:gentext key="SeeAlso" text="Vezi &#351;i"/>
+   <l:gentext key="set" text="Set"/>
+   <l:gentext key="Set" text="Set"/>
+   <l:gentext key="setindex" text="Index"/>
+   <l:gentext key="SetIndex" text="Index"/>
+   <l:gentext key="Sidebar" text=""/>
+   <l:gentext key="sidebar" text="sidebar"/>
+   <l:gentext key="step" text="opera&#254;iune"/>
+   <l:gentext key="Step" text="Opera&#254;ie"/>
+   <l:gentext key="Table" text="Tabel"/>
+   <l:gentext key="table" text="Tabel"/>
+   <l:gentext key="tip" text="Indica&#254;ie"/>
+   <l:gentext key="TIP" text="INDICA&#222;IE"/>
+   <l:gentext key="Tip" text="Indica&#254;ie"/>
+   <l:gentext key="Warning" text="Avertisment"/>
+   <l:gentext key="warning" text="Avertisment"/>
+   <l:gentext key="WARNING" text="AVERTISMENT"/>
+   <l:gentext key="and" text="&#351;i"/>
+   <l:gentext key="by" text="de"/>
+   <l:gentext key="called" text="called" lang="en"/>
+   <l:gentext key="Edited" text="Publicat"/>
+   <l:gentext key="edited" text="Publicat"/>
+   <l:gentext key="Editedby" text="Publicat de"/>
+   <l:gentext key="editedby" text="Publicat de"/>
+   <l:gentext key="in" text="&#238;n"/>
+   <l:gentext key="lastlistcomma" text=","/>
+   <l:gentext key="listcomma" text=","/>
+   <l:gentext key="nonexistantelement" text="element inexistent"/>
+   <l:gentext key="notes" text="Note"/>
+   <l:gentext key="Notes" text="Note"/>
+   <l:gentext key="Pgs" text="Pagini"/>
+   <l:gentext key="pgs" text="Pagini"/>
+   <l:gentext key="Revisedby" text="Revised by: "/>
+   <l:gentext key="revisedby" text="Revised by: "/>
+   <l:gentext key="TableNotes" text="Remarci"/>
+   <l:gentext key="tablenotes" text="Remarci"/>
+   <l:gentext key="TableofContents" text="Cuprins"/>
+   <l:gentext key="tableofcontents" text="Cuprins"/>
+   <l:gentext key="the" text="" lang="en"/>
+   <l:gentext key="unexpectedelementname" text="Nume de element nea&#351;teptat"/>
+   <l:gentext key="unsupported" text="nerecunoscut de sisitem"/>
+   <l:gentext key="xrefto" text="referin&#254;&#227; c&#227;tre"/>
+   <l:gentext key="listofequations" text="List&#227; de ecua&#254;ii"/>
+   <l:gentext key="ListofEquations" text="List&#227; de ecua&#254;ii"/>
+   <l:gentext key="ListofExamples" text="List&#227; de exemple"/>
+   <l:gentext key="listofexamples" text="List&#227; de exemple"/>
+   <l:gentext key="ListofFigures" text="List&#227; de figuri"/>
+   <l:gentext key="listoffigures" text="List&#227; de figuri"/>
+   <l:gentext key="ListofProcedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listofprocedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listoftables" text="List&#227; de tabele"/>
+   <l:gentext key="ListofTables" text="List&#227; de tabele"/>
+   <l:gentext key="ListofUnknown" text="List&#227; de necunoscute"/>
+   <l:gentext key="listofunknown" text="List&#227; de necunoscute"/>
+   <l:gentext key="nav-home" text="Acas&#227;"/>
+   <l:gentext key="nav-next" text="&#206;nainte"/>
+   <l:gentext key="nav-next-sibling" text="Repede &#239;nainte"/>
+   <l:gentext key="nav-prev" text="&#206;napoi"/>
+   <l:gentext key="nav-prev-sibling" text="Repede &#238;napoi"/>
+   <l:gentext key="nav-up" text="Sus"/>
+   <l:gentext key="nav-toc" text="ToC" lang="en"/>
+   <l:gentext key="Draft" text="Draft"/>
+   <l:gentext key="above" text="above"/>
+   <l:gentext key="below" text="below"/>
+   <l:gentext key="sectioncalled" text="the section called"/>
+   <l:gentext key="index symbols" text="Symbols"/>
+   <l:gentext key="lowercase.alpha" text="abcdefghijklmnopqrstuvwxyz"/>
+   <l:gentext key="uppercase.alpha" text="ABCDEFGHIJKLMNOPQRSTUVWXYZ"/>
+   <l:dingbat key="startquote" text="&#8220;"/>
+   <l:dingbat key="endquote" text="&#8221;"/>
+   <l:dingbat key="nestedstartquote" text="&#8216;"/>
+   <l:dingbat key="nestedendquote" text="&#8217;"/>
+   <l:dingbat key="singlestartquote" text="&#8216;" lang="en"/>
+   <l:dingbat key="singleendquote" text="&#8217;" lang="en"/>
+   <l:dingbat key="bullet" text="&#8226;"/>
+   <l:gentext key="hyphenation-character" text="-" lang="en"/>
+   <l:gentext key="hyphenation-push-character-count" text="2" lang="en"/>
+   <l:gentext key="hyphenation-remain-character-count" text="2" lang="en"/>
+
+   <l:context name="styles">
+      <l:template name="person-name" text="first-last"/>
+   </l:context>
+
+   <l:context name="title">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="%t"/>
+      <l:template name="appendix" text="Anexa %n. %t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="biblioentry" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliolist" text="%t" lang="en"/>
+      <l:template name="bibliomixed" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="Cap. %n. %t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="ecua&#254;ia %n. %t"/>
+      <l:template name="example" text="Exemplu %n. %t"/>
+      <l:template name="figure" text="Fig. %n. %t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="glosslist" text="%t" lang="en"/>
+      <l:template name="glossentry" text="%t" lang="en"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text=""/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="Parte %n. %t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="procedure.formal" text="Procedur&#227;&#160;%n.&#160;%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="productionset.formal" text="Production&#160;%n"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="%t"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="%t"/>
+      <l:template name="refentry" text="%t"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsection" text="%t"/>
+      <l:template name="refsect1" text="%t"/>
+      <l:template name="refsect2" text="%t"/>
+      <l:template name="refsect3" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="refsynopsisdivinfo" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="step" text="%t"/>
+      <l:template name="table" text="Tabel %n. %t"/>
+      <l:template name="task" text="%t" lang="en"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="" lang="en"/>
+      <l:template name="warning" text="%t"/>
+   </l:context>
+
+   <l:context name="title-unnumbered">
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article/appendix" text="%t" lang="en"/>
+      <l:template name="bridgehead" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="sect1" text="%t"/>
+      <l:template name="sect2" text="%t"/>
+      <l:template name="sect3" text="%t"/>
+      <l:template name="sect4" text="%t"/>
+      <l:template name="sect5" text="%t"/>
+      <l:template name="section" text="%t"/>
+      <l:template name="simplesect" text="%t"/>
+   </l:context>
+
+   <l:context name="title-numbered">
+      <l:template name="appendix" text="Anexa %n. %t"/>
+      <l:template name="article/appendix" text="%n.&#160;%t" lang="en"/>
+      <l:template name="bridgehead" text="%t"/>
+      <l:template name="chapter" text="Cap. %n. %t"/>
+      <l:template name="sect1" text="%n. %t"/>
+      <l:template name="sect2" text="%n. %t"/>
+      <l:template name="sect3" text="%n. %t"/>
+      <l:template name="sect4" text="%n. %t"/>
+      <l:template name="sect5" text="%n. %t"/>
+      <l:template name="section" text="%n. %t"/>
+      <l:template name="simplesect" text="%n. %t"/>
+   </l:context>
+
+   <l:context name="subtitle">
+      <l:template name="appendix" text="%s"/>
+      <l:template name="article" text="%s"/>
+      <l:template name="bibliodiv" text="%s"/>
+      <l:template name="biblioentry" text="%s"/>
+      <l:template name="bibliography" text="%s"/>
+      <l:template name="bibliomixed" text="%s"/>
+      <l:template name="bibliomset" text="%s"/>
+      <l:template name="biblioset" text="%s"/>
+      <l:template name="book" text="%s"/>
+      <l:template name="chapter" text="%s"/>
+      <l:template name="colophon" text="%s"/>
+      <l:template name="dedication" text="%s"/>
+      <l:template name="glossary" text="%s"/>
+      <l:template name="glossdiv" text="%s"/>
+      <l:template name="index" text="%s"/>
+      <l:template name="indexdiv" text="%s"/>
+      <l:template name="lot" text="%s"/>
+      <l:template name="part" text="%s"/>
+      <l:template name="partintro" text="%s"/>
+      <l:template name="preface" text="%s"/>
+      <l:template name="refentry" text="%s"/>
+      <l:template name="reference" text="%s"/>
+      <l:template name="refsection" text="%s"/>
+      <l:template name="refsect1" text="%s"/>
+      <l:template name="refsect2" text="%s"/>
+      <l:template name="refsect3" text="%s"/>
+      <l:template name="refsynopsisdiv" text="%s"/>
+      <l:template name="sect1" text="%s"/>
+      <l:template name="sect2" text="%s"/>
+      <l:template name="sect3" text="%s"/>
+      <l:template name="sect4" text="%s"/>
+      <l:template name="sect5" text="%s"/>
+      <l:template name="section" text="%s"/>
+      <l:template name="set" text="%s"/>
+      <l:template name="setindex" text="%s"/>
+      <l:template name="sidebar" text="%s"/>
+      <l:template name="simplesect" text="%s"/>
+      <l:template name="toc" text="%s"/>
+   </l:context>
+
+   <l:context name="xref">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="A:&#160;%n"/>
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="constraintdef" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="%t"/>
+      <l:template name="example" text="%t"/>
+      <l:template name="figure" text="%t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text="%n"/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="%t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="Q:&#160;%n"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="Q:&#160;%n"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="table" text="%t"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="%n"/>
+      <l:template name="warning" text="%t"/>
+      <l:template name="page.citation" text=" [%p]"/>
+      <l:template name="page" text="(page %p)" lang="en"/>
+      <l:template name="pageabbrev" text="(p. %p)" lang="en"/>
+      <l:template name="Page" text="Page %p" lang="en"/>
+      <l:template name="bridgehead" text="&#8220;%t&#8221;"/>
+      <l:template name="refsection" text="&#8220;%t&#8221;"/>
+      <l:template name="refsect1" text="&#8220;%t&#8221;"/>
+      <l:template name="refsect2" text="&#8220;%t&#8221;"/>
+      <l:template name="refsect3" text="&#8220;%t&#8221;"/>
+      <l:template name="sect1" text="&#8220;%t&#8221;"/>
+      <l:template name="sect2" text="&#8220;%t&#8221;"/>
+      <l:template name="sect3" text="&#8220;%t&#8221;"/>
+      <l:template name="sect4" text="&#8220;%t&#8221;"/>
+      <l:template name="sect5" text="&#8220;%t&#8221;"/>
+      <l:template name="section" text="&#8220;%t&#8221;"/>
+      <l:template name="simplesect" text="&#8220;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="xref-number">
+      <l:template name="answer" text="A:&#160;%n"/>
+      <l:template name="appendix" text="Anexa&#160;%n"/>
+      <l:template name="bridgehead" text="Sec&#254;iune&#160;%n"/>
+      <l:template name="chapter" text="Cap.&#160;%n"/>
+      <l:template name="equation" text="ecua&#254;ia&#160;%n"/>
+      <l:template name="example" text="Exemplu&#160;%n"/>
+      <l:template name="figure" text="Fig.&#160;%n"/>
+      <l:template name="part" text="Parte&#160;%n"/>
+      <l:template name="procedure" text="Procedur&#227;&#160;%n"/>
+      <l:template name="productionset" text="Production&#160;%n"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n"/>
+      <l:template name="qandaentry" text="Q:&#160;%n"/>
+      <l:template name="question" text="Q:&#160;%n"/>
+      <l:template name="sect1" text="Sec&#254;iune&#160;%n"/>
+      <l:template name="sect2" text="Sec&#254;iune&#160;%n"/>
+      <l:template name="sect3" text="Sec&#254;iune&#160;%n"/>
+      <l:template name="sect4" text="Sec&#254;iune&#160;%n"/>
+      <l:template name="sect5" text="Sec&#254;iune&#160;%n"/>
+      <l:template name="section" text="Sec&#254;iune&#160;%n"/>
+      <l:template name="table" text="Tabel&#160;%n"/>
+   </l:context>
+
+   <l:context name="xref-number-and-title">
+      <l:template name="appendix" text="Anexa&#160;%n, %t"/>
+      <l:template name="bridgehead" text="Sec&#254;iune&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="chapter" text="Cap.&#160;%n, %t"/>
+      <l:template name="equation" text="ecua&#254;ia&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="example" text="Exemplu&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="figure" text="Fig.&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="part" text="Parte&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="procedure" text="Procedur&#227;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="productionset" text="Production&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="refsect1" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="refsect2" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="refsect3" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="refsection" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="sect1" text="Sec&#254;iune&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect2" text="Sec&#254;iune&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect3" text="Sec&#254;iune&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect4" text="Sec&#254;iune&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect5" text="Sec&#254;iune&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="section" text="Sec&#254;iune&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="simplesect" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="table" text="Tabel&#160;%n, &#8220;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="authorgroup">
+      <l:template name="sep" text=", "/>
+      <l:template name="sep2" text=" &#351;i "/>
+      <l:template name="seplast" text=", &#351;i "/>
+   </l:context>
+
+   <l:context name="glossary">
+      <l:template name="see" text="Vezi "/>
+      <l:template name="seealso" text="Vezi &#351;i "/>
+   </l:context>
+
+   <l:context name="msgset">
+      <l:template name="MsgAud" text=": "/>
+      <l:template name="MsgLevel" text="Nivel: "/>
+      <l:template name="MsgOrig" text="Origine: "/>
+   </l:context>
+
+   <l:context name="datetime">
+      <l:template name="format" text="m/d/Y" lang="en"/>
+   </l:context>
+
+   <l:context name="datetime-full">
+      <l:template name="January" text="January" lang="en"/>
+      <l:template name="February" text="February" lang="en"/>
+      <l:template name="March" text="March" lang="en"/>
+      <l:template name="April" text="April" lang="en"/>
+      <l:template name="May" text="May" lang="en"/>
+      <l:template name="June" text="June" lang="en"/>
+      <l:template name="July" text="July" lang="en"/>
+      <l:template name="August" text="August" lang="en"/>
+      <l:template name="September" text="September" lang="en"/>
+      <l:template name="October" text="October" lang="en"/>
+      <l:template name="November" text="November" lang="en"/>
+      <l:template name="December" text="December" lang="en"/>
+      <l:template name="Monday" text="Monday" lang="en"/>
+      <l:template name="Tuesday" text="Tuesday" lang="en"/>
+      <l:template name="Wednesday" text="Wednesday" lang="en"/>
+      <l:template name="Thursday" text="Thursday" lang="en"/>
+      <l:template name="Friday" text="Friday" lang="en"/>
+      <l:template name="Saturday" text="Saturday" lang="en"/>
+      <l:template name="Sunday" text="Sunday" lang="en"/>
+   </l:context>
+
+   <l:context name="datetime-abbrev">
+      <l:template name="Jan" text="Jan" lang="en"/>
+      <l:template name="Feb" text="Feb" lang="en"/>
+      <l:template name="Mar" text="Mar" lang="en"/>
+      <l:template name="Apr" text="Apr" lang="en"/>
+      <l:template name="May" text="May" lang="en"/>
+      <l:template name="Jun" text="Jun" lang="en"/>
+      <l:template name="Jul" text="Jul" lang="en"/>
+      <l:template name="Aug" text="Aug" lang="en"/>
+      <l:template name="Sep" text="Sep" lang="en"/>
+      <l:template name="Oct" text="Oct" lang="en"/>
+      <l:template name="Nov" text="Nov" lang="en"/>
+      <l:template name="Dec" text="Dec" lang="en"/>
+      <l:template name="Mon" text="Mon" lang="en"/>
+      <l:template name="Tue" text="Tue" lang="en"/>
+      <l:template name="Wed" text="Wed" lang="en"/>
+      <l:template name="Thu" text="Thu" lang="en"/>
+      <l:template name="Fri" text="Fri" lang="en"/>
+      <l:template name="Sat" text="Sat" lang="en"/>
+      <l:template name="Sun" text="Sun" lang="en"/>
+   </l:context>
+
+   <l:context name="htmlhelp">
+      <l:template name="langcode" text="0x0418 Romanian"/>
+   </l:context>
+
+   <l:letters lang="en">
+      <l:l i="-1"/>
+      <l:l i="0">Symbols</l:l>
+      <l:l i="10">A</l:l>
+      <l:l i="10">a</l:l>
+      <l:l i="10">&#192;</l:l>
+      <l:l i="10">&#224;</l:l>
+      <l:l i="10">&#193;</l:l>
+      <l:l i="10">&#225;</l:l>
+      <l:l i="10">&#194;</l:l>
+      <l:l i="10">&#226;</l:l>
+      <l:l i="10">&#195;</l:l>
+      <l:l i="10">&#227;</l:l>
+      <l:l i="10">&#196;</l:l>
+      <l:l i="10">&#228;</l:l>
+      <l:l i="10">&#197;</l:l>
+      <l:l i="10">&#229;</l:l>
+      <l:l i="10">&#256;</l:l>
+      <l:l i="10">&#257;</l:l>
+      <l:l i="10">&#258;</l:l>
+      <l:l i="10">&#259;</l:l>
+      <l:l i="10">&#260;</l:l>
+      <l:l i="10">&#261;</l:l>
+      <l:l i="10">&#461;</l:l>
+      <l:l i="10">&#462;</l:l>
+      <l:l i="10">&#478;</l:l>
+      <l:l i="10">&#479;</l:l>
+      <l:l i="10">&#480;</l:l>
+      <l:l i="10">&#481;</l:l>
+      <l:l i="10">&#506;</l:l>
+      <l:l i="10">&#507;</l:l>
+      <l:l i="10">&#512;</l:l>
+      <l:l i="10">&#513;</l:l>
+      <l:l i="10">&#514;</l:l>
+      <l:l i="10">&#515;</l:l>
+      <l:l i="10">&#550;</l:l>
+      <l:l i="10">&#551;</l:l>
+      <l:l i="10">&#7680;</l:l>
+      <l:l i="10">&#7681;</l:l>
+      <l:l i="10">&#7834;</l:l>
+      <l:l i="10">&#7840;</l:l>
+      <l:l i="10">&#7841;</l:l>
+      <l:l i="10">&#7842;</l:l>
+      <l:l i="10">&#7843;</l:l>
+      <l:l i="10">&#7844;</l:l>
+      <l:l i="10">&#7845;</l:l>
+      <l:l i="10">&#7846;</l:l>
+      <l:l i="10">&#7847;</l:l>
+      <l:l i="10">&#7848;</l:l>
+      <l:l i="10">&#7849;</l:l>
+      <l:l i="10">&#7850;</l:l>
+      <l:l i="10">&#7851;</l:l>
+      <l:l i="10">&#7852;</l:l>
+      <l:l i="10">&#7853;</l:l>
+      <l:l i="10">&#7854;</l:l>
+      <l:l i="10">&#7855;</l:l>
+      <l:l i="10">&#7856;</l:l>
+      <l:l i="10">&#7857;</l:l>
+      <l:l i="10">&#7858;</l:l>
+      <l:l i="10">&#7859;</l:l>
+      <l:l i="10">&#7860;</l:l>
+      <l:l i="10">&#7861;</l:l>
+      <l:l i="10">&#7862;</l:l>
+      <l:l i="10">&#7863;</l:l>
+      <l:l i="20">B</l:l>
+      <l:l i="20">b</l:l>
+      <l:l i="20">&#384;</l:l>
+      <l:l i="20">&#385;</l:l>
+      <l:l i="20">&#595;</l:l>
+      <l:l i="20">&#386;</l:l>
+      <l:l i="20">&#387;</l:l>
+      <l:l i="20">&#7682;</l:l>
+      <l:l i="20">&#7683;</l:l>
+      <l:l i="20">&#7684;</l:l>
+      <l:l i="20">&#7685;</l:l>
+      <l:l i="20">&#7686;</l:l>
+      <l:l i="20">&#7687;</l:l>
+      <l:l i="30">C</l:l>
+      <l:l i="30">c</l:l>
+      <l:l i="30">&#199;</l:l>
+      <l:l i="30">&#231;</l:l>
+      <l:l i="30">&#262;</l:l>
+      <l:l i="30">&#263;</l:l>
+      <l:l i="30">&#264;</l:l>
+      <l:l i="30">&#265;</l:l>
+      <l:l i="30">&#266;</l:l>
+      <l:l i="30">&#267;</l:l>
+      <l:l i="30">&#268;</l:l>
+      <l:l i="30">&#269;</l:l>
+      <l:l i="30">&#391;</l:l>
+      <l:l i="30">&#392;</l:l>
+      <l:l i="30">&#597;</l:l>
+      <l:l i="30">&#7688;</l:l>
+      <l:l i="30">&#7689;</l:l>
+      <l:l i="40">D</l:l>
+      <l:l i="40">d</l:l>
+      <l:l i="40">&#270;</l:l>
+      <l:l i="40">&#271;</l:l>
+      <l:l i="40">&#272;</l:l>
+      <l:l i="40">&#273;</l:l>
+      <l:l i="40">&#394;</l:l>
+      <l:l i="40">&#599;</l:l>
+      <l:l i="40">&#395;</l:l>
+      <l:l i="40">&#396;</l:l>
+      <l:l i="40">&#453;</l:l>
+      <l:l i="40">&#498;</l:l>
+      <l:l i="40">&#545;</l:l>
+      <l:l i="40">&#598;</l:l>
+      <l:l i="40">&#7690;</l:l>
+      <l:l i="40">&#7691;</l:l>
+      <l:l i="40">&#7692;</l:l>
+      <l:l i="40">&#7693;</l:l>
+      <l:l i="40">&#7694;</l:l>
+      <l:l i="40">&#7695;</l:l>
+      <l:l i="40">&#7696;</l:l>
+      <l:l i="40">&#7697;</l:l>
+      <l:l i="40">&#7698;</l:l>
+      <l:l i="40">&#7699;</l:l>
+      <l:l i="50">E</l:l>
+      <l:l i="50">e</l:l>
+      <l:l i="50">&#200;</l:l>
+      <l:l i="50">&#232;</l:l>
+      <l:l i="50">&#201;</l:l>
+      <l:l i="50">&#233;</l:l>
+      <l:l i="50">&#202;</l:l>
+      <l:l i="50">&#234;</l:l>
+      <l:l i="50">&#203;</l:l>
+      <l:l i="50">&#235;</l:l>
+      <l:l i="50">&#274;</l:l>
+      <l:l i="50">&#275;</l:l>
+      <l:l i="50">&#276;</l:l>
+      <l:l i="50">&#277;</l:l>
+      <l:l i="50">&#278;</l:l>
+      <l:l i="50">&#279;</l:l>
+      <l:l i="50">&#280;</l:l>
+      <l:l i="50">&#281;</l:l>
+      <l:l i="50">&#282;</l:l>
+      <l:l i="50">&#283;</l:l>
+      <l:l i="50">&#516;</l:l>
+      <l:l i="50">&#517;</l:l>
+      <l:l i="50">&#518;</l:l>
+      <l:l i="50">&#519;</l:l>
+      <l:l i="50">&#552;</l:l>
+      <l:l i="50">&#553;</l:l>
+      <l:l i="50">&#7700;</l:l>
+      <l:l i="50">&#7701;</l:l>
+      <l:l i="50">&#7702;</l:l>
+      <l:l i="50">&#7703;</l:l>
+      <l:l i="50">&#7704;</l:l>
+      <l:l i="50">&#7705;</l:l>
+      <l:l i="50">&#7706;</l:l>
+      <l:l i="50">&#7707;</l:l>
+      <l:l i="50">&#7708;</l:l>
+      <l:l i="50">&#7709;</l:l>
+      <l:l i="50">&#7864;</l:l>
+      <l:l i="50">&#7865;</l:l>
+      <l:l i="50">&#7866;</l:l>
+      <l:l i="50">&#7867;</l:l>
+      <l:l i="50">&#7868;</l:l>
+      <l:l i="50">&#7869;</l:l>
+      <l:l i="50">&#7870;</l:l>
+      <l:l i="50">&#7871;</l:l>
+      <l:l i="50">&#7872;</l:l>
+      <l:l i="50">&#7873;</l:l>
+      <l:l i="50">&#7874;</l:l>
+      <l:l i="50">&#7875;</l:l>
+      <l:l i="50">&#7876;</l:l>
+      <l:l i="50">&#7877;</l:l>
+      <l:l i="50">&#7878;</l:l>
+      <l:l i="50">&#7879;</l:l>
+      <l:l i="60">F</l:l>
+      <l:l i="60">f</l:l>
+      <l:l i="60">&#401;</l:l>
+      <l:l i="60">&#402;</l:l>
+      <l:l i="60">&#7710;</l:l>
+      <l:l i="60">&#7711;</l:l>
+      <l:l i="70">G</l:l>
+      <l:l i="70">g</l:l>
+      <l:l i="70">&#284;</l:l>
+      <l:l i="70">&#285;</l:l>
+      <l:l i="70">&#286;</l:l>
+      <l:l i="70">&#287;</l:l>
+      <l:l i="70">&#288;</l:l>
+      <l:l i="70">&#289;</l:l>
+      <l:l i="70">&#290;</l:l>
+      <l:l i="70">&#291;</l:l>
+      <l:l i="70">&#403;</l:l>
+      <l:l i="70">&#608;</l:l>
+      <l:l i="70">&#484;</l:l>
+      <l:l i="70">&#485;</l:l>
+      <l:l i="70">&#486;</l:l>
+      <l:l i="70">&#487;</l:l>
+      <l:l i="70">&#500;</l:l>
+      <l:l i="70">&#501;</l:l>
+      <l:l i="70">&#7712;</l:l>
+      <l:l i="70">&#7713;</l:l>
+      <l:l i="80">H</l:l>
+      <l:l i="80">h</l:l>
+      <l:l i="80">&#292;</l:l>
+      <l:l i="80">&#293;</l:l>
+      <l:l i="80">&#294;</l:l>
+      <l:l i="80">&#295;</l:l>
+      <l:l i="80">&#542;</l:l>
+      <l:l i="80">&#543;</l:l>
+      <l:l i="80">&#614;</l:l>
+      <l:l i="80">&#7714;</l:l>
+      <l:l i="80">&#7715;</l:l>
+      <l:l i="80">&#7716;</l:l>
+      <l:l i="80">&#7717;</l:l>
+      <l:l i="80">&#7718;</l:l>
+      <l:l i="80">&#7719;</l:l>
+      <l:l i="80">&#7720;</l:l>
+      <l:l i="80">&#7721;</l:l>
+      <l:l i="80">&#7722;</l:l>
+      <l:l i="80">&#7723;</l:l>
+      <l:l i="80">&#7830;</l:l>
+      <l:l i="90">I</l:l>
+      <l:l i="90">i</l:l>
+      <l:l i="90">&#204;</l:l>
+      <l:l i="90">&#236;</l:l>
+      <l:l i="90">&#205;</l:l>
+      <l:l i="90">&#237;</l:l>
+      <l:l i="90">&#206;</l:l>
+      <l:l i="90">&#238;</l:l>
+      <l:l i="90">&#207;</l:l>
+      <l:l i="90">&#239;</l:l>
+      <l:l i="90">&#296;</l:l>
+      <l:l i="90">&#297;</l:l>
+      <l:l i="90">&#298;</l:l>
+      <l:l i="90">&#299;</l:l>
+      <l:l i="90">&#300;</l:l>
+      <l:l i="90">&#301;</l:l>
+      <l:l i="90">&#302;</l:l>
+      <l:l i="90">&#303;</l:l>
+      <l:l i="90">&#304;</l:l>
+      <l:l i="90">&#407;</l:l>
+      <l:l i="90">&#616;</l:l>
+      <l:l i="90">&#463;</l:l>
+      <l:l i="90">&#464;</l:l>
+      <l:l i="90">&#520;</l:l>
+      <l:l i="90">&#521;</l:l>
+      <l:l i="90">&#522;</l:l>
+      <l:l i="90">&#523;</l:l>
+      <l:l i="90">&#7724;</l:l>
+      <l:l i="90">&#7725;</l:l>
+      <l:l i="90">&#7726;</l:l>
+      <l:l i="90">&#7727;</l:l>
+      <l:l i="90">&#7880;</l:l>
+      <l:l i="90">&#7881;</l:l>
+      <l:l i="90">&#7882;</l:l>
+      <l:l i="90">&#7883;</l:l>
+      <l:l i="100">J</l:l>
+      <l:l i="100">j</l:l>
+      <l:l i="100">&#308;</l:l>
+      <l:l i="100">&#309;</l:l>
+      <l:l i="100">&#496;</l:l>
+      <l:l i="100">&#669;</l:l>
+      <l:l i="110">K</l:l>
+      <l:l i="110">k</l:l>
+      <l:l i="110">&#310;</l:l>
+      <l:l i="110">&#311;</l:l>
+      <l:l i="110">&#408;</l:l>
+      <l:l i="110">&#409;</l:l>
+      <l:l i="110">&#488;</l:l>
+      <l:l i="110">&#489;</l:l>
+      <l:l i="110">&#7728;</l:l>
+      <l:l i="110">&#7729;</l:l>
+      <l:l i="110">&#7730;</l:l>
+      <l:l i="110">&#7731;</l:l>
+      <l:l i="110">&#7732;</l:l>
+      <l:l i="110">&#7733;</l:l>
+      <l:l i="120">L</l:l>
+      <l:l i="120">l</l:l>
+      <l:l i="120">&#313;</l:l>
+      <l:l i="120">&#314;</l:l>
+      <l:l i="120">&#315;</l:l>
+      <l:l i="120">&#316;</l:l>
+      <l:l i="120">&#317;</l:l>
+      <l:l i="120">&#318;</l:l>
+      <l:l i="120">&#319;</l:l>
+      <l:l i="120">&#320;</l:l>
+      <l:l i="120">&#321;</l:l>
+      <l:l i="120">&#322;</l:l>
+      <l:l i="120">&#410;</l:l>
+      <l:l i="120">&#456;</l:l>
+      <l:l i="120">&#564;</l:l>
+      <l:l i="120">&#619;</l:l>
+      <l:l i="120">&#620;</l:l>
+      <l:l i="120">&#621;</l:l>
+      <l:l i="120">&#7734;</l:l>
+      <l:l i="120">&#7735;</l:l>
+      <l:l i="120">&#7736;</l:l>
+      <l:l i="120">&#7737;</l:l>
+      <l:l i="120">&#7738;</l:l>
+      <l:l i="120">&#7739;</l:l>
+      <l:l i="120">&#7740;</l:l>
+      <l:l i="120">&#7741;</l:l>
+      <l:l i="130">M</l:l>
+      <l:l i="130">m</l:l>
+      <l:l i="130">&#625;</l:l>
+      <l:l i="130">&#7742;</l:l>
+      <l:l i="130">&#7743;</l:l>
+      <l:l i="130">&#7744;</l:l>
+      <l:l i="130">&#7745;</l:l>
+      <l:l i="130">&#7746;</l:l>
+      <l:l i="130">&#7747;</l:l>
+      <l:l i="140">N</l:l>
+      <l:l i="140">n</l:l>
+      <l:l i="140">&#209;</l:l>
+      <l:l i="140">&#241;</l:l>
+      <l:l i="140">&#323;</l:l>
+      <l:l i="140">&#324;</l:l>
+      <l:l i="140">&#325;</l:l>
+      <l:l i="140">&#326;</l:l>
+      <l:l i="140">&#327;</l:l>
+      <l:l i="140">&#328;</l:l>
+      <l:l i="140">&#413;</l:l>
+      <l:l i="140">&#626;</l:l>
+      <l:l i="140">&#414;</l:l>
+      <l:l i="140">&#544;</l:l>
+      <l:l i="140">&#459;</l:l>
+      <l:l i="140">&#504;</l:l>
+      <l:l i="140">&#505;</l:l>
+      <l:l i="140">&#565;</l:l>
+      <l:l i="140">&#627;</l:l>
+      <l:l i="140">&#7748;</l:l>
+      <l:l i="140">&#7749;</l:l>
+      <l:l i="140">&#7750;</l:l>
+      <l:l i="140">&#7751;</l:l>
+      <l:l i="140">&#7752;</l:l>
+      <l:l i="140">&#7753;</l:l>
+      <l:l i="140">&#7754;</l:l>
+      <l:l i="140">&#7755;</l:l>
+      <l:l i="150">O</l:l>
+      <l:l i="150">o</l:l>
+      <l:l i="150">&#210;</l:l>
+      <l:l i="150">&#242;</l:l>
+      <l:l i="150">&#211;</l:l>
+      <l:l i="150">&#243;</l:l>
+      <l:l i="150">&#212;</l:l>
+      <l:l i="150">&#244;</l:l>
+      <l:l i="150">&#213;</l:l>
+      <l:l i="150">&#245;</l:l>
+      <l:l i="150">&#214;</l:l>
+      <l:l i="150">&#246;</l:l>
+      <l:l i="150">&#216;</l:l>
+      <l:l i="150">&#248;</l:l>
+      <l:l i="150">&#332;</l:l>
+      <l:l i="150">&#333;</l:l>
+      <l:l i="150">&#334;</l:l>
+      <l:l i="150">&#335;</l:l>
+      <l:l i="150">&#336;</l:l>
+      <l:l i="150">&#337;</l:l>
+      <l:l i="150">&#415;</l:l>
+      <l:l i="150">&#416;</l:l>
+      <l:l i="150">&#417;</l:l>
+      <l:l i="150">&#465;</l:l>
+      <l:l i="150">&#466;</l:l>
+      <l:l i="150">&#490;</l:l>
+      <l:l i="150">&#491;</l:l>
+      <l:l i="150">&#492;</l:l>
+      <l:l i="150">&#493;</l:l>
+      <l:l i="150">&#510;</l:l>
+      <l:l i="150">&#511;</l:l>
+      <l:l i="150">&#524;</l:l>
+      <l:l i="150">&#525;</l:l>
+      <l:l i="150">&#526;</l:l>
+      <l:l i="150">&#527;</l:l>
+      <l:l i="150">&#554;</l:l>
+      <l:l i="150">&#555;</l:l>
+      <l:l i="150">&#556;</l:l>
+      <l:l i="150">&#557;</l:l>
+      <l:l i="150">&#558;</l:l>
+      <l:l i="150">&#559;</l:l>
+      <l:l i="150">&#560;</l:l>
+      <l:l i="150">&#561;</l:l>
+      <l:l i="150">&#7756;</l:l>
+      <l:l i="150">&#7757;</l:l>
+      <l:l i="150">&#7758;</l:l>
+      <l:l i="150">&#7759;</l:l>
+      <l:l i="150">&#7760;</l:l>
+      <l:l i="150">&#7761;</l:l>
+      <l:l i="150">&#7762;</l:l>
+      <l:l i="150">&#7763;</l:l>
+      <l:l i="150">&#7884;</l:l>
+      <l:l i="150">&#7885;</l:l>
+      <l:l i="150">&#7886;</l:l>
+      <l:l i="150">&#7887;</l:l>
+      <l:l i="150">&#7888;</l:l>
+      <l:l i="150">&#7889;</l:l>
+      <l:l i="150">&#7890;</l:l>
+      <l:l i="150">&#7891;</l:l>
+      <l:l i="150">&#7892;</l:l>
+      <l:l i="150">&#7893;</l:l>
+      <l:l i="150">&#7894;</l:l>
+      <l:l i="150">&#7895;</l:l>
+      <l:l i="150">&#7896;</l:l>
+      <l:l i="150">&#7897;</l:l>
+      <l:l i="150">&#7898;</l:l>
+      <l:l i="150">&#7899;</l:l>
+      <l:l i="150">&#7900;</l:l>
+      <l:l i="150">&#7901;</l:l>
+      <l:l i="150">&#7902;</l:l>
+      <l:l i="150">&#7903;</l:l>
+      <l:l i="150">&#7904;</l:l>
+      <l:l i="150">&#7905;</l:l>
+      <l:l i="150">&#7906;</l:l>
+      <l:l i="150">&#7907;</l:l>
+      <l:l i="160">P</l:l>
+      <l:l i="160">p</l:l>
+      <l:l i="160">&#420;</l:l>
+      <l:l i="160">&#421;</l:l>
+      <l:l i="160">&#7764;</l:l>
+      <l:l i="160">&#7765;</l:l>
+      <l:l i="160">&#7766;</l:l>
+      <l:l i="160">&#7767;</l:l>
+      <l:l i="170">Q</l:l>
+      <l:l i="170">q</l:l>
+      <l:l i="170">&#672;</l:l>
+      <l:l i="180">R</l:l>
+      <l:l i="180">r</l:l>
+      <l:l i="180">&#340;</l:l>
+      <l:l i="180">&#341;</l:l>
+      <l:l i="180">&#342;</l:l>
+      <l:l i="180">&#343;</l:l>
+      <l:l i="180">&#344;</l:l>
+      <l:l i="180">&#345;</l:l>
+      <l:l i="180">&#528;</l:l>
+      <l:l i="180">&#529;</l:l>
+      <l:l i="180">&#530;</l:l>
+      <l:l i="180">&#531;</l:l>
+      <l:l i="180">&#636;</l:l>
+      <l:l i="180">&#637;</l:l>
+      <l:l i="180">&#638;</l:l>
+      <l:l i="180">&#7768;</l:l>
+      <l:l i="180">&#7769;</l:l>
+      <l:l i="180">&#7770;</l:l>
+      <l:l i="180">&#7771;</l:l>
+      <l:l i="180">&#7772;</l:l>
+      <l:l i="180">&#7773;</l:l>
+      <l:l i="180">&#7774;</l:l>
+      <l:l i="180">&#7775;</l:l>
+      <l:l i="190">S</l:l>
+      <l:l i="190">s</l:l>
+      <l:l i="190">&#346;</l:l>
+      <l:l i="190">&#347;</l:l>
+      <l:l i="190">&#348;</l:l>
+      <l:l i="190">&#349;</l:l>
+      <l:l i="190">&#350;</l:l>
+      <l:l i="190">&#351;</l:l>
+      <l:l i="190">&#352;</l:l>
+      <l:l i="190">&#353;</l:l>
+      <l:l i="190">&#536;</l:l>
+      <l:l i="190">&#537;</l:l>
+      <l:l i="190">&#642;</l:l>
+      <l:l i="190">&#7776;</l:l>
+      <l:l i="190">&#7777;</l:l>
+      <l:l i="190">&#7778;</l:l>
+      <l:l i="190">&#7779;</l:l>
+      <l:l i="190">&#7780;</l:l>
+      <l:l i="190">&#7781;</l:l>
+      <l:l i="190">&#7782;</l:l>
+      <l:l i="190">&#7783;</l:l>
+      <l:l i="190">&#7784;</l:l>
+      <l:l i="190">&#7785;</l:l>
+      <l:l i="200">T</l:l>
+      <l:l i="200">t</l:l>
+      <l:l i="200">&#354;</l:l>
+      <l:l i="200">&#355;</l:l>
+      <l:l i="200">&#356;</l:l>
+      <l:l i="200">&#357;</l:l>
+      <l:l i="200">&#358;</l:l>
+      <l:l i="200">&#359;</l:l>
+      <l:l i="200">&#427;</l:l>
+      <l:l i="200">&#428;</l:l>
+      <l:l i="200">&#429;</l:l>
+      <l:l i="200">&#430;</l:l>
+      <l:l i="200">&#648;</l:l>
+      <l:l i="200">&#538;</l:l>
+      <l:l i="200">&#539;</l:l>
+      <l:l i="200">&#566;</l:l>
+      <l:l i="200">&#7786;</l:l>
+      <l:l i="200">&#7787;</l:l>
+      <l:l i="200">&#7788;</l:l>
+      <l:l i="200">&#7789;</l:l>
+      <l:l i="200">&#7790;</l:l>
+      <l:l i="200">&#7791;</l:l>
+      <l:l i="200">&#7792;</l:l>
+      <l:l i="200">&#7793;</l:l>
+      <l:l i="200">&#7831;</l:l>
+      <l:l i="210">U</l:l>
+      <l:l i="210">u</l:l>
+      <l:l i="210">&#217;</l:l>
+      <l:l i="210">&#249;</l:l>
+      <l:l i="210">&#218;</l:l>
+      <l:l i="210">&#250;</l:l>
+      <l:l i="210">&#219;</l:l>
+      <l:l i="210">&#251;</l:l>
+      <l:l i="210">&#220;</l:l>
+      <l:l i="210">&#252;</l:l>
+      <l:l i="210">&#360;</l:l>
+      <l:l i="210">&#361;</l:l>
+      <l:l i="210">&#362;</l:l>
+      <l:l i="210">&#363;</l:l>
+      <l:l i="210">&#364;</l:l>
+      <l:l i="210">&#365;</l:l>
+      <l:l i="210">&#366;</l:l>
+      <l:l i="210">&#367;</l:l>
+      <l:l i="210">&#368;</l:l>
+      <l:l i="210">&#369;</l:l>
+      <l:l i="210">&#370;</l:l>
+      <l:l i="210">&#371;</l:l>
+      <l:l i="210">&#431;</l:l>
+      <l:l i="210">&#432;</l:l>
+      <l:l i="210">&#467;</l:l>
+      <l:l i="210">&#468;</l:l>
+      <l:l i="210">&#469;</l:l>
+      <l:l i="210">&#470;</l:l>
+      <l:l i="210">&#471;</l:l>
+      <l:l i="210">&#472;</l:l>
+      <l:l i="210">&#473;</l:l>
+      <l:l i="210">&#474;</l:l>
+      <l:l i="210">&#475;</l:l>
+      <l:l i="210">&#476;</l:l>
+      <l:l i="210">&#532;</l:l>
+      <l:l i="210">&#533;</l:l>
+      <l:l i="210">&#534;</l:l>
+      <l:l i="210">&#535;</l:l>
+      <l:l i="210">&#7794;</l:l>
+      <l:l i="210">&#7795;</l:l>
+      <l:l i="210">&#7796;</l:l>
+      <l:l i="210">&#7797;</l:l>
+      <l:l i="210">&#7798;</l:l>
+      <l:l i="210">&#7799;</l:l>
+      <l:l i="210">&#7800;</l:l>
+      <l:l i="210">&#7801;</l:l>
+      <l:l i="210">&#7802;</l:l>
+      <l:l i="210">&#7803;</l:l>
+      <l:l i="210">&#7908;</l:l>
+      <l:l i="210">&#7909;</l:l>
+      <l:l i="210">&#7910;</l:l>
+      <l:l i="210">&#7911;</l:l>
+      <l:l i="210">&#7912;</l:l>
+      <l:l i="210">&#7913;</l:l>
+      <l:l i="210">&#7914;</l:l>
+      <l:l i="210">&#7915;</l:l>
+      <l:l i="210">&#7916;</l:l>
+      <l:l i="210">&#7917;</l:l>
+      <l:l i="210">&#7918;</l:l>
+      <l:l i="210">&#7919;</l:l>
+      <l:l i="210">&#7920;</l:l>
+      <l:l i="210">&#7921;</l:l>
+      <l:l i="220">V</l:l>
+      <l:l i="220">v</l:l>
+      <l:l i="220">&#434;</l:l>
+      <l:l i="220">&#651;</l:l>
+      <l:l i="220">&#7804;</l:l>
+      <l:l i="220">&#7805;</l:l>
+      <l:l i="220">&#7806;</l:l>
+      <l:l i="220">&#7807;</l:l>
+      <l:l i="230">W</l:l>
+      <l:l i="230">w</l:l>
+      <l:l i="230">&#372;</l:l>
+      <l:l i="230">&#373;</l:l>
+      <l:l i="230">&#7808;</l:l>
+      <l:l i="230">&#7809;</l:l>
+      <l:l i="230">&#7810;</l:l>
+      <l:l i="230">&#7811;</l:l>
+      <l:l i="230">&#7812;</l:l>
+      <l:l i="230">&#7813;</l:l>
+      <l:l i="230">&#7814;</l:l>
+      <l:l i="230">&#7815;</l:l>
+      <l:l i="230">&#7816;</l:l>
+      <l:l i="230">&#7817;</l:l>
+      <l:l i="230">&#7832;</l:l>
+      <l:l i="240">X</l:l>
+      <l:l i="240">x</l:l>
+      <l:l i="240">&#7818;</l:l>
+      <l:l i="240">&#7819;</l:l>
+      <l:l i="240">&#7820;</l:l>
+      <l:l i="240">&#7821;</l:l>
+      <l:l i="250">Y</l:l>
+      <l:l i="250">y</l:l>
+      <l:l i="250">&#221;</l:l>
+      <l:l i="250">&#253;</l:l>
+      <l:l i="250">&#255;</l:l>
+      <l:l i="250">&#376;</l:l>
+      <l:l i="250">&#374;</l:l>
+      <l:l i="250">&#375;</l:l>
+      <l:l i="250">&#435;</l:l>
+      <l:l i="250">&#436;</l:l>
+      <l:l i="250">&#562;</l:l>
+      <l:l i="250">&#563;</l:l>
+      <l:l i="250">&#7822;</l:l>
+      <l:l i="250">&#7823;</l:l>
+      <l:l i="250">&#7833;</l:l>
+      <l:l i="250">&#7922;</l:l>
+      <l:l i="250">&#7923;</l:l>
+      <l:l i="250">&#7924;</l:l>
+      <l:l i="250">&#7925;</l:l>
+      <l:l i="250">&#7926;</l:l>
+      <l:l i="250">&#7927;</l:l>
+      <l:l i="250">&#7928;</l:l>
+      <l:l i="250">&#7929;</l:l>
+      <l:l i="260">Z</l:l>
+      <l:l i="260">z</l:l>
+      <l:l i="260">&#377;</l:l>
+      <l:l i="260">&#378;</l:l>
+      <l:l i="260">&#379;</l:l>
+      <l:l i="260">&#380;</l:l>
+      <l:l i="260">&#381;</l:l>
+      <l:l i="260">&#382;</l:l>
+      <l:l i="260">&#437;</l:l>
+      <l:l i="260">&#438;</l:l>
+      <l:l i="260">&#548;</l:l>
+      <l:l i="260">&#549;</l:l>
+      <l:l i="260">&#656;</l:l>
+      <l:l i="260">&#657;</l:l>
+      <l:l i="260">&#7824;</l:l>
+      <l:l i="260">&#7825;</l:l>
+      <l:l i="260">&#7826;</l:l>
+      <l:l i="260">&#7827;</l:l>
+      <l:l i="260">&#7828;</l:l>
+      <l:l i="260">&#7829;</l:l>
+   </l:letters>
+</l:l10n>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/ru.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/ru.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/ru.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1153 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="ru" english-language-name="Russian">
+
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+   <l:gentext key="Abstract" text="&#1040;&#1085;&#1085;&#1086;&#1090;&#1072;&#1094;&#1080;&#1103;"/>
+   <l:gentext key="abstract" text="&#1040;&#1085;&#1085;&#1086;&#1090;&#1072;&#1094;&#1080;&#1103;"/>
+   <l:gentext key="Answer" text="&#1054;:"/>
+   <l:gentext key="answer" text="&#1054;:"/>
+   <l:gentext key="Appendix" text="&#1055;&#1088;&#1080;&#1083;&#1086;&#1078;&#1077;&#1085;&#1080;&#1077;"/>
+   <l:gentext key="appendix" text="&#1087;&#1088;&#1080;&#1083;&#1086;&#1078;&#1077;&#1085;&#1080;&#1077;"/>
+   <l:gentext key="Article" text="&#1057;&#1090;&#1072;&#1090;&#1100;&#1103;"/>
+   <l:gentext key="article" text="&#1057;&#1090;&#1072;&#1090;&#1100;&#1103;"/>
+   <l:gentext key="Bibliography" text="&#1051;&#1080;&#1090;&#1077;&#1088;&#1072;&#1090;&#1091;&#1088;&#1072;"/>
+   <l:gentext key="bibliography" text="&#1051;&#1080;&#1090;&#1077;&#1088;&#1072;&#1090;&#1091;&#1088;&#1072;"/>
+   <l:gentext key="Book" text="&#1050;&#1085;&#1080;&#1075;&#1072;"/>
+   <l:gentext key="book" text="&#1050;&#1085;&#1080;&#1075;&#1072;"/>
+   <l:gentext key="CAUTION" text="&#1055;&#1056;&#1045;&#1044;&#1054;&#1057;&#1058;&#1045;&#1056;&#1045;&#1046;&#1045;&#1053;&#1048;&#1045;"/>
+   <l:gentext key="Caution" text="&#1055;&#1088;&#1077;&#1076;&#1086;&#1089;&#1090;&#1077;&#1088;&#1077;&#1078;&#1077;&#1085;&#1080;&#1077;"/>
+   <l:gentext key="caution" text="&#1055;&#1088;&#1077;&#1076;&#1086;&#1089;&#1090;&#1077;&#1088;&#1077;&#1078;&#1077;&#1085;&#1080;&#1077;"/>
+   <l:gentext key="Chapter" text="&#1043;&#1083;&#1072;&#1074;&#1072;"/>
+   <l:gentext key="chapter" text="&#1075;&#1083;&#1072;&#1074;&#1072;"/>
+   <l:gentext key="Colophon" text="Colophon"/>
+   <l:gentext key="colophon" text="Colophon"/>
+   <l:gentext key="Copyright" text="Copyright"/>
+   <l:gentext key="copyright" text="Copyright"/>
+   <l:gentext key="Dedication" text="&#1055;&#1086;&#1089;&#1074;&#1103;&#1097;&#1077;&#1085;&#1080;&#1077;"/>
+   <l:gentext key="dedication" text="&#1055;&#1086;&#1089;&#1074;&#1103;&#1097;&#1077;&#1085;&#1080;&#1077;"/>
+   <l:gentext key="Edition" text="&#1056;&#1077;&#1076;&#1072;&#1082;&#1094;&#1080;&#1103;"/>
+   <l:gentext key="edition" text="&#1056;&#1077;&#1076;&#1072;&#1082;&#1094;&#1080;&#1103;"/>
+   <l:gentext key="Equation" text="&#1060;&#1086;&#1088;&#1084;&#1091;&#1083;&#1072;"/>
+   <l:gentext key="equation" text="&#1060;&#1086;&#1088;&#1084;&#1091;&#1083;&#1072;"/>
+   <l:gentext key="Example" text="&#1055;&#1088;&#1080;&#1084;&#1077;&#1088;"/>
+   <l:gentext key="example" text="&#1055;&#1088;&#1080;&#1084;&#1077;&#1088;"/>
+   <l:gentext key="Figure" text="&#1056;&#1080;&#1089;&#1091;&#1085;&#1086;&#1082;"/>
+   <l:gentext key="figure" text="&#1056;&#1080;&#1089;&#1091;&#1085;&#1086;&#1082;"/>
+   <l:gentext key="Glossary" text="&#1043;&#1083;&#1086;&#1089;&#1089;&#1072;&#1088;&#1080;&#1081;"/>
+   <l:gentext key="glossary" text="&#1043;&#1083;&#1086;&#1089;&#1089;&#1072;&#1088;&#1080;&#1081;"/>
+   <l:gentext key="GlossSee" text="&#1057;&#1084;."/>
+   <l:gentext key="glosssee" text="&#1057;&#1084;."/>
+   <l:gentext key="GlossSeeAlso" text="&#1057;&#1084;. &#1090;&#1072;&#1082;&#1078;&#1077;"/>
+   <l:gentext key="glossseealso" text="&#1057;&#1084;. &#1090;&#1072;&#1082;&#1078;&#1077;"/>
+   <l:gentext key="IMPORTANT" text="&#1042;&#1040;&#1046;&#1053;&#1054;"/>
+   <l:gentext key="important" text="&#1042;&#1072;&#1078;&#1085;&#1086;"/>
+   <l:gentext key="Important" text="&#1042;&#1072;&#1078;&#1085;&#1086;"/>
+   <l:gentext key="Index" text="&#1055;&#1088;&#1077;&#1076;&#1084;&#1077;&#1090;&#1085;&#1099;&#1081; &#1091;&#1082;&#1072;&#1079;&#1072;&#1090;&#1077;&#1083;&#1100;"/>
+   <l:gentext key="index" text="&#1055;&#1088;&#1077;&#1076;&#1084;&#1077;&#1090;&#1085;&#1099;&#1081; &#1091;&#1082;&#1072;&#1079;&#1072;&#1090;&#1077;&#1083;&#1100;"/>
+   <l:gentext key="ISBN" text="ISBN"/>
+   <l:gentext key="isbn" text="ISBN"/>
+   <l:gentext key="LegalNotice" text="&#1040;&#1074;&#1090;&#1086;&#1088;&#1089;&#1082;&#1080;&#1077; &#1087;&#1088;&#1072;&#1074;&#1072;"/>
+   <l:gentext key="legalnotice" text="&#1040;&#1074;&#1090;&#1086;&#1088;&#1089;&#1082;&#1080;&#1077; &#1087;&#1088;&#1072;&#1074;&#1072;"/>
+   <l:gentext key="MsgAud" text="Audience"/>
+   <l:gentext key="msgaud" text="Audience"/>
+   <l:gentext key="MsgLevel" text="Level"/>
+   <l:gentext key="msglevel" text="Level"/>
+   <l:gentext key="MsgOrig" text="Origin"/>
+   <l:gentext key="msgorig" text="Origin"/>
+   <l:gentext key="NOTE" text="&#1047;&#1040;&#1052;&#1045;&#1063;&#1040;&#1053;&#1048;&#1045;"/>
+   <l:gentext key="Note" text="&#1047;&#1072;&#1084;&#1077;&#1095;&#1072;&#1085;&#1080;&#1077;"/>
+   <l:gentext key="note" text="&#1047;&#1072;&#1084;&#1077;&#1095;&#1072;&#1085;&#1080;&#1077;"/>
+   <l:gentext key="Part" text="&#1063;&#1072;&#1089;&#1090;&#1100;"/>
+   <l:gentext key="part" text="&#1063;&#1072;&#1089;&#1090;&#1100;"/>
+   <l:gentext key="Preface" text="&#1055;&#1088;&#1077;&#1076;&#1080;&#1089;&#1083;&#1086;&#1074;&#1080;&#1077;"/>
+   <l:gentext key="preface" text="&#1055;&#1088;&#1077;&#1076;&#1080;&#1089;&#1083;&#1086;&#1074;&#1080;&#1077;"/>
+   <l:gentext key="Procedure" text="&#1055;&#1088;&#1086;&#1094;&#1077;&#1076;&#1091;&#1088;&#1072;"/>
+   <l:gentext key="procedure" text="&#1055;&#1088;&#1086;&#1094;&#1077;&#1076;&#1091;&#1088;&#1072;"/>
+   <l:gentext key="ProductionSet" text="Production"/>
+   <l:gentext key="PubDate" text="Publication Date" lang="en"/>
+   <l:gentext key="pubdate" text="Publication date" lang="en"/>
+   <l:gentext key="Published" text="&#1054;&#1087;&#1091;&#1073;&#1083;&#1080;&#1082;&#1086;&#1074;&#1072;&#1085;&#1086;"/>
+   <l:gentext key="published" text="&#1054;&#1087;&#1091;&#1073;&#1083;&#1080;&#1082;&#1086;&#1074;&#1072;&#1085;&#1086;"/>
+   <l:gentext key="Qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="Question" text="&#1042;:"/>
+   <l:gentext key="question" text="&#1042;:"/>
+   <l:gentext key="RefEntry" text=""/>
+   <l:gentext key="refentry" text=""/>
+   <l:gentext key="Reference" text="&#1057;&#1089;&#1099;&#1083;&#1082;&#1072;"/>
+   <l:gentext key="reference" text="&#1057;&#1089;&#1099;&#1083;&#1082;&#1072;"/>
+   <l:gentext key="RefName" text="&#1053;&#1072;&#1079;&#1074;&#1072;&#1085;&#1080;&#1077;"/>
+   <l:gentext key="refname" text="&#1053;&#1072;&#1079;&#1074;&#1072;&#1085;&#1080;&#1077;"/>
+   <l:gentext key="RefSection" text=""/>
+   <l:gentext key="refsection" text=""/>
+   <l:gentext key="RefSynopsisDiv" text="&#1057;&#1080;&#1085;&#1090;&#1072;&#1082;&#1089;&#1080;&#1089;"/>
+   <l:gentext key="refsynopsisdiv" text="&#1057;&#1080;&#1085;&#1090;&#1072;&#1082;&#1089;&#1080;&#1089;"/>
+   <l:gentext key="RevHistory" text="&#1048;&#1089;&#1090;&#1086;&#1088;&#1080;&#1103; &#1087;&#1077;&#1088;&#1077;&#1080;&#1079;&#1076;&#1072;&#1085;&#1080;&#1103;"/>
+   <l:gentext key="revhistory" text="&#1048;&#1089;&#1090;&#1086;&#1088;&#1080;&#1103; &#1087;&#1077;&#1088;&#1077;&#1080;&#1079;&#1076;&#1072;&#1085;&#1080;&#1103;"/>
+   <l:gentext key="revision" text="&#1048;&#1079;&#1076;&#1072;&#1085;&#1080;&#1077;"/>
+   <l:gentext key="Revision" text="&#1048;&#1079;&#1076;&#1072;&#1085;&#1080;&#1077;"/>
+   <l:gentext key="sect1" text="&#1056;&#1072;&#1079;&#1076;&#1077;&#1083;"/>
+   <l:gentext key="sect2" text="&#1056;&#1072;&#1079;&#1076;&#1077;&#1083;"/>
+   <l:gentext key="sect3" text="&#1056;&#1072;&#1079;&#1076;&#1077;&#1083;"/>
+   <l:gentext key="sect4" text="&#1056;&#1072;&#1079;&#1076;&#1077;&#1083;"/>
+   <l:gentext key="sect5" text="&#1056;&#1072;&#1079;&#1076;&#1077;&#1083;"/>
+   <l:gentext key="section" text="&#1088;&#1072;&#1079;&#1076;&#1077;&#1083;"/>
+   <l:gentext key="Section" text="&#1056;&#1072;&#1079;&#1076;&#1077;&#1083;"/>
+   <l:gentext key="see" text="&#1057;&#1084;."/>
+   <l:gentext key="See" text="&#1057;&#1084;."/>
+   <l:gentext key="seealso" text="&#1057;&#1084;. &#1090;&#1072;&#1082;&#1078;&#1077;"/>
+   <l:gentext key="Seealso" text="&#1057;&#1084;. &#1090;&#1072;&#1082;&#1078;&#1077;"/>
+   <l:gentext key="SeeAlso" text="&#1057;&#1084;. &#1090;&#1072;&#1082;&#1078;&#1077;"/>
+   <l:gentext key="set" text="&#1055;&#1086;&#1076;&#1073;&#1086;&#1088;&#1082;&#1072;"/>
+   <l:gentext key="Set" text="&#1055;&#1086;&#1076;&#1073;&#1086;&#1088;&#1082;&#1072;"/>
+   <l:gentext key="setindex" text="&#1048;&#1085;&#1076;&#1077;&#1082;&#1089; &#1087;&#1086;&#1076;&#1073;&#1086;&#1088;&#1082;&#1080;"/>
+   <l:gentext key="SetIndex" text="&#1048;&#1085;&#1076;&#1077;&#1082;&#1089; &#1087;&#1086;&#1076;&#1073;&#1086;&#1088;&#1082;&#1080;"/>
+   <l:gentext key="Sidebar" text="&#1042;&#1099;&#1076;&#1077;&#1083;&#1077;&#1085;&#1080;&#1077;"/>
+   <l:gentext key="sidebar" text="&#1074;&#1099;&#1076;&#1077;&#1083;&#1077;&#1085;&#1080;&#1077;"/>
+   <l:gentext key="step" text="&#1096;&#1072;&#1075;"/>
+   <l:gentext key="Step" text="&#1064;&#1072;&#1075;"/>
+   <l:gentext key="Table" text="&#1058;&#1072;&#1073;&#1083;&#1080;&#1094;&#1072;"/>
+   <l:gentext key="table" text="&#1058;&#1072;&#1073;&#1083;&#1080;&#1094;&#1072;"/>
+   <l:gentext key="tip" text="&#1055;&#1086;&#1076;&#1089;&#1082;&#1072;&#1079;&#1082;&#1072;"/>
+   <l:gentext key="TIP" text="&#1055;&#1054;&#1044;&#1057;&#1050;&#1040;&#1047;&#1050;&#1040;"/>
+   <l:gentext key="Tip" text="&#1055;&#1086;&#1076;&#1089;&#1082;&#1072;&#1079;&#1082;&#1072;"/>
+   <l:gentext key="Warning" text="&#1042;&#1085;&#1080;&#1084;&#1072;&#1085;&#1080;&#1077;"/>
+   <l:gentext key="warning" text="&#1042;&#1085;&#1080;&#1084;&#1072;&#1085;&#1080;&#1077;"/>
+   <l:gentext key="WARNING" text="&#1042;&#1053;&#1048;&#1052;&#1040;&#1053;&#1048;&#1045;"/>
+   <l:gentext key="and" text="and"/>
+   <l:gentext key="by" text="by"/>
+   <l:gentext key="called" text="called"/>
+   <l:gentext key="Edited" text="&#1055;&#1086;&#1076; &#1088;&#1077;&#1076;&#1072;&#1082;&#1094;&#1080;&#1077;&#1081;"/>
+   <l:gentext key="edited" text="&#1055;&#1086;&#1076; &#1088;&#1077;&#1076;&#1072;&#1082;&#1094;&#1080;&#1077;&#1081;"/>
+   <l:gentext key="Editedby" text="&#1055;&#1086;&#1076; &#1088;&#1077;&#1076;&#1072;&#1082;&#1094;&#1080;&#1077;&#1081;"/>
+   <l:gentext key="editedby" text="&#1055;&#1086;&#1076; &#1088;&#1077;&#1076;&#1072;&#1082;&#1094;&#1080;&#1077;&#1081;"/>
+   <l:gentext key="in" text="&#1074;"/>
+   <l:gentext key="lastlistcomma" text=","/>
+   <l:gentext key="listcomma" text=","/>
+   <l:gentext key="nonexistantelement" text="non-existant element"/>
+   <l:gentext key="notes" text="&#1055;&#1088;&#1080;&#1084;&#1077;&#1095;&#1072;&#1085;&#1080;&#1103;"/>
+   <l:gentext key="Notes" text="&#1055;&#1088;&#1080;&#1084;&#1077;&#1095;&#1072;&#1085;&#1080;&#1103;"/>
+   <l:gentext key="Pgs" text="&#1057;&#1090;&#1088;."/>
+   <l:gentext key="pgs" text="&#1057;&#1090;&#1088;."/>
+   <l:gentext key="Revisedby" text="Revised by: "/>
+   <l:gentext key="revisedby" text="Revised by: "/>
+   <l:gentext key="TableNotes" text="&#1055;&#1088;&#1080;&#1084;&#1077;&#1095;&#1072;&#1085;&#1080;&#1103;"/>
+   <l:gentext key="tablenotes" text="&#1055;&#1088;&#1080;&#1084;&#1077;&#1095;&#1072;&#1085;&#1080;&#1103;"/>
+   <l:gentext key="TableofContents" text="&#1057;&#1086;&#1076;&#1077;&#1088;&#1078;&#1072;&#1085;&#1080;&#1077;"/>
+   <l:gentext key="tableofcontents" text="&#1057;&#1086;&#1076;&#1077;&#1088;&#1078;&#1072;&#1085;&#1080;&#1077;"/>
+   <l:gentext key="the" text=""/>
+   <l:gentext key="unexpectedelementname" text="unexpected element name"/>
+   <l:gentext key="unsupported" text="unsupported"/>
+   <l:gentext key="xrefto" text="xref to"/>
+   <l:gentext key="listofequations" text="&#1057;&#1087;&#1080;&#1089;&#1086;&#1082; &#1092;&#1086;&#1088;&#1084;&#1091;&#1083;"/>
+   <l:gentext key="ListofEquations" text="&#1057;&#1087;&#1080;&#1089;&#1086;&#1082; &#1092;&#1086;&#1088;&#1084;&#1091;&#1083;"/>
+   <l:gentext key="ListofExamples" text="&#1057;&#1087;&#1080;&#1089;&#1086;&#1082; &#1087;&#1088;&#1080;&#1084;&#1077;&#1088;&#1086;&#1074;"/>
+   <l:gentext key="listofexamples" text="&#1057;&#1087;&#1080;&#1089;&#1086;&#1082; &#1087;&#1088;&#1080;&#1084;&#1077;&#1088;&#1086;&#1074;"/>
+   <l:gentext key="ListofFigures" text="&#1057;&#1087;&#1080;&#1089;&#1086;&#1082; &#1080;&#1083;&#1083;&#1102;&#1089;&#1090;&#1088;&#1072;&#1094;&#1080;&#1081;"/>
+   <l:gentext key="listoffigures" text="&#1057;&#1087;&#1080;&#1089;&#1086;&#1082; &#1080;&#1083;&#1083;&#1102;&#1089;&#1090;&#1088;&#1072;&#1094;&#1080;&#1081;"/>
+   <l:gentext key="ListofProcedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listofprocedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listoftables" text="&#1057;&#1087;&#1080;&#1089;&#1086;&#1082; &#1090;&#1072;&#1073;&#1083;&#1080;&#1094;"/>
+   <l:gentext key="ListofTables" text="&#1057;&#1087;&#1080;&#1089;&#1086;&#1082; &#1090;&#1072;&#1073;&#1083;&#1080;&#1094;"/>
+   <l:gentext key="ListofUnknown" text="&#1053;&#1077;&#1086;&#1087;&#1088;&#1077;&#1076;&#1077;&#1083;&#1077;&#1085;&#1085;&#1099;&#1081; &#1089;&#1087;&#1080;&#1089;&#1086;&#1082;"/>
+   <l:gentext key="listofunknown" text="&#1053;&#1077;&#1086;&#1087;&#1088;&#1077;&#1076;&#1077;&#1083;&#1077;&#1085;&#1085;&#1099;&#1081; &#1089;&#1087;&#1080;&#1089;&#1086;&#1082;"/>
+   <l:gentext key="nav-home" text="&#1053;&#1072;&#1095;&#1072;&#1083;&#1086;"/>
+   <l:gentext key="nav-next" text="&#1057;&#1083;&#1077;&#1076;."/>
+   <l:gentext key="nav-next-sibling" text="&#1057;&#1083;&#1077;&#1076;. &#1087;&#1086;&#1076;&#1088;&#1072;&#1079;&#1076;&#1077;&#1083;"/>
+   <l:gentext key="nav-prev" text="&#1055;&#1088;&#1077;&#1076;."/>
+   <l:gentext key="nav-prev-sibling" text="&#1055;&#1088;&#1077;&#1076;. &#1087;&#1086;&#1076;&#1088;&#1072;&#1079;&#1076;&#1077;&#1083;"/>
+   <l:gentext key="nav-up" text="&#1059;&#1088;&#1086;&#1074;&#1077;&#1085;&#1100; &#1074;&#1099;&#1096;&#1077;"/>
+   <l:gentext key="nav-toc" text="ToC" lang="en"/>
+   <l:gentext key="Draft" text="&#1063;&#1077;&#1088;&#1085;&#1086;&#1074;&#1080;&#1082;"/>
+   <l:gentext key="above" text="&#1074;&#1099;&#1096;&#1077;"/>
+   <l:gentext key="below" text="&#1085;&#1080;&#1078;&#1077;"/>
+   <l:gentext key="sectioncalled" text="the section called"/>
+   <l:gentext key="index symbols" text="Symbols"/>
+   <l:gentext key="lowercase.alpha" text="&#1072;&#1073;&#1074;&#1075;&#1076;&#1077;&#1105;&#1078;&#1079;&#1080;&#1081;&#1082;&#1083;&#1084;&#1085;&#1086;&#1087;&#1088;&#1089;&#1090;&#1091;&#1092;&#1093;&#1094;&#1095;&#1096;&#1097;&#1098;&#1099;&#1100;&#1101;&#1102;&#1103;"/>
+   <l:gentext key="uppercase.alpha" text="&#1040;&#1041;&#1042;&#1043;&#1044;&#1045;&#1025;&#1046;&#1047;&#1048;&#1049;&#1050;&#1051;&#1052;&#1053;&#1054;&#1055;&#1056;&#1057;&#1058;&#1059;&#1060;&#1061;&#1062;&#1063;&#1064;&#1065;&#1066;&#1067;&#1068;&#1069;&#1070;&#1071;"/>
+   <l:dingbat key="startquote" text="&#171;"/>
+   <l:dingbat key="endquote" text="&#187;"/>
+   <l:dingbat key="nestedstartquote" text="&#8222;"/>
+   <l:dingbat key="nestedendquote" text="&#8220;"/>
+   <l:dingbat key="singlestartquote" text="&#8216;" lang="en"/>
+   <l:dingbat key="singleendquote" text="&#8217;" lang="en"/>
+   <l:dingbat key="bullet" text="&#8226;"/>
+   <l:gentext key="hyphenation-character" text="-" lang="en"/>
+   <l:gentext key="hyphenation-push-character-count" text="2" lang="en"/>
+   <l:gentext key="hyphenation-remain-character-count" text="2" lang="en"/>
+
+   <l:context name="styles">
+      <l:template name="person-name" text="first-last"/>
+   </l:context>
+
+   <l:context name="title">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="%t"/>
+      <l:template name="appendix" text="&#1055;&#1088;&#1080;&#1083;&#1086;&#1078;&#1077;&#1085;&#1080;&#1077; %n. %t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="biblioentry" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliolist" text="%t" lang="en"/>
+      <l:template name="bibliomixed" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="&#1043;&#1083;&#1072;&#1074;&#1072; %n. %t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="&#1060;&#1086;&#1088;&#1084;&#1091;&#1083;&#1072; %n. %t"/>
+      <l:template name="example" text="&#1055;&#1088;&#1080;&#1084;&#1077;&#1088; %n. %t"/>
+      <l:template name="figure" text="&#1056;&#1080;&#1089;&#1091;&#1085;&#1086;&#1082; %n. %t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="glosslist" text="%t" lang="en"/>
+      <l:template name="glossentry" text="%t" lang="en"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text=""/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="&#1063;&#1072;&#1089;&#1090;&#1100; %n. %t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="procedure.formal" text="&#1055;&#1088;&#1086;&#1094;&#1077;&#1076;&#1091;&#1088;&#1072;&#160;%n.&#160;%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="productionset.formal" text="Production&#160;%n"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="%t"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="%t"/>
+      <l:template name="refentry" text="%t"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsection" text="%t"/>
+      <l:template name="refsect1" text="%t"/>
+      <l:template name="refsect2" text="%t"/>
+      <l:template name="refsect3" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="refsynopsisdivinfo" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="step" text="%t"/>
+      <l:template name="table" text="&#1058;&#1072;&#1073;&#1083;&#1080;&#1094;&#1072; %n. %t"/>
+      <l:template name="task" text="%t" lang="en"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="" lang="en"/>
+      <l:template name="warning" text="%t"/>
+   </l:context>
+
+   <l:context name="title-unnumbered">
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article/appendix" text="%t" lang="en"/>
+      <l:template name="bridgehead" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="sect1" text="%t"/>
+      <l:template name="sect2" text="%t"/>
+      <l:template name="sect3" text="%t"/>
+      <l:template name="sect4" text="%t"/>
+      <l:template name="sect5" text="%t"/>
+      <l:template name="section" text="%t"/>
+      <l:template name="simplesect" text="%t"/>
+   </l:context>
+
+   <l:context name="title-numbered">
+      <l:template name="appendix" text="&#1055;&#1088;&#1080;&#1083;&#1086;&#1078;&#1077;&#1085;&#1080;&#1077; %n. %t"/>
+      <l:template name="article/appendix" text="%n.&#160;%t" lang="en"/>
+      <l:template name="bridgehead" text="%t"/>
+      <l:template name="chapter" text="&#1043;&#1083;&#1072;&#1074;&#1072; %n. %t"/>
+      <l:template name="sect1" text="%n. %t"/>
+      <l:template name="sect2" text="%n. %t"/>
+      <l:template name="sect3" text="%n. %t"/>
+      <l:template name="sect4" text="%n. %t"/>
+      <l:template name="sect5" text="%n. %t"/>
+      <l:template name="section" text="%n. %t"/>
+      <l:template name="simplesect" text="%n. %t"/>
+   </l:context>
+
+   <l:context name="subtitle">
+      <l:template name="appendix" text="%s"/>
+      <l:template name="article" text="%s"/>
+      <l:template name="bibliodiv" text="%s"/>
+      <l:template name="biblioentry" text="%s"/>
+      <l:template name="bibliography" text="%s"/>
+      <l:template name="bibliomixed" text="%s"/>
+      <l:template name="bibliomset" text="%s"/>
+      <l:template name="biblioset" text="%s"/>
+      <l:template name="book" text="%s"/>
+      <l:template name="chapter" text="%s"/>
+      <l:template name="colophon" text="%s"/>
+      <l:template name="dedication" text="%s"/>
+      <l:template name="glossary" text="%s"/>
+      <l:template name="glossdiv" text="%s"/>
+      <l:template name="index" text="%s"/>
+      <l:template name="indexdiv" text="%s"/>
+      <l:template name="lot" text="%s"/>
+      <l:template name="part" text="%s"/>
+      <l:template name="partintro" text="%s"/>
+      <l:template name="preface" text="%s"/>
+      <l:template name="refentry" text="%s"/>
+      <l:template name="reference" text="%s"/>
+      <l:template name="refsection" text="%s"/>
+      <l:template name="refsect1" text="%s"/>
+      <l:template name="refsect2" text="%s"/>
+      <l:template name="refsect3" text="%s"/>
+      <l:template name="refsynopsisdiv" text="%s"/>
+      <l:template name="sect1" text="%s"/>
+      <l:template name="sect2" text="%s"/>
+      <l:template name="sect3" text="%s"/>
+      <l:template name="sect4" text="%s"/>
+      <l:template name="sect5" text="%s"/>
+      <l:template name="section" text="%s"/>
+      <l:template name="set" text="%s"/>
+      <l:template name="setindex" text="%s"/>
+      <l:template name="sidebar" text="%s"/>
+      <l:template name="simplesect" text="%s"/>
+      <l:template name="toc" text="%s"/>
+   </l:context>
+
+   <l:context name="xref">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="&#1054;:&#160;%n"/>
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="constraintdef" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="%t"/>
+      <l:template name="example" text="%t"/>
+      <l:template name="figure" text="%t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text="%n"/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="%t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="&#1042;:&#160;%n"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="&#1042;:&#160;%n"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="table" text="%t"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="%n"/>
+      <l:template name="warning" text="%t"/>
+      <l:template name="page.citation" text=" [%p]"/>
+      <l:template name="page" text="(page %p)" lang="en"/>
+      <l:template name="pageabbrev" text="(p. %p)" lang="en"/>
+      <l:template name="Page" text="Page %p" lang="en"/>
+      <l:template name="bridgehead" text="&#171;%t&#187;"/>
+      <l:template name="refsection" text="&#171;%t&#187;"/>
+      <l:template name="refsect1" text="&#171;%t&#187;"/>
+      <l:template name="refsect2" text="&#171;%t&#187;"/>
+      <l:template name="refsect3" text="&#171;%t&#187;"/>
+      <l:template name="sect1" text="&#171;%t&#187;"/>
+      <l:template name="sect2" text="&#171;%t&#187;"/>
+      <l:template name="sect3" text="&#171;%t&#187;"/>
+      <l:template name="sect4" text="&#171;%t&#187;"/>
+      <l:template name="sect5" text="&#171;%t&#187;"/>
+      <l:template name="section" text="&#171;%t&#187;"/>
+      <l:template name="simplesect" text="&#171;%t&#187;"/>
+   </l:context>
+
+   <l:context name="xref-number">
+      <l:template name="answer" text="&#1054;:&#160;%n"/>
+      <l:template name="appendix" text="&#1055;&#1088;&#1080;&#1083;&#1086;&#1078;&#1077;&#1085;&#1080;&#1077;&#160;%n"/>
+      <l:template name="bridgehead" text="&#1056;&#1072;&#1079;&#1076;&#1077;&#1083;&#160;%n"/>
+      <l:template name="chapter" text="&#1043;&#1083;&#1072;&#1074;&#1072;&#160;%n"/>
+      <l:template name="equation" text="&#1060;&#1086;&#1088;&#1084;&#1091;&#1083;&#1072;&#160;%n"/>
+      <l:template name="example" text="&#1055;&#1088;&#1080;&#1084;&#1077;&#1088;&#160;%n"/>
+      <l:template name="figure" text="&#1056;&#1080;&#1089;&#1091;&#1085;&#1086;&#1082;&#160;%n"/>
+      <l:template name="part" text="&#1063;&#1072;&#1089;&#1090;&#1100;&#160;%n"/>
+      <l:template name="procedure" text="&#1055;&#1088;&#1086;&#1094;&#1077;&#1076;&#1091;&#1088;&#1072;&#160;%n"/>
+      <l:template name="productionset" text="Production&#160;%n"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n"/>
+      <l:template name="qandaentry" text="&#1042;:&#160;%n"/>
+      <l:template name="question" text="&#1042;:&#160;%n"/>
+      <l:template name="sect1" text="&#1056;&#1072;&#1079;&#1076;&#1077;&#1083;&#160;%n"/>
+      <l:template name="sect2" text="&#1056;&#1072;&#1079;&#1076;&#1077;&#1083;&#160;%n"/>
+      <l:template name="sect3" text="&#1056;&#1072;&#1079;&#1076;&#1077;&#1083;&#160;%n"/>
+      <l:template name="sect4" text="&#1056;&#1072;&#1079;&#1076;&#1077;&#1083;&#160;%n"/>
+      <l:template name="sect5" text="&#1056;&#1072;&#1079;&#1076;&#1077;&#1083;&#160;%n"/>
+      <l:template name="section" text="&#1056;&#1072;&#1079;&#1076;&#1077;&#1083;&#160;%n"/>
+      <l:template name="table" text="&#1058;&#1072;&#1073;&#1083;&#1080;&#1094;&#1072;&#160;%n"/>
+   </l:context>
+
+   <l:context name="xref-number-and-title">
+      <l:template name="appendix" text="&#1055;&#1088;&#1080;&#1083;&#1086;&#1078;&#1077;&#1085;&#1080;&#1077;&#160;%n, %t"/>
+      <l:template name="bridgehead" text="&#1056;&#1072;&#1079;&#1076;&#1077;&#1083;&#160;%n, &#171;%t&#187;"/>
+      <l:template name="chapter" text="&#1043;&#1083;&#1072;&#1074;&#1072;&#160;%n, %t"/>
+      <l:template name="equation" text="&#1060;&#1086;&#1088;&#1084;&#1091;&#1083;&#1072;&#160;%n, &#171;%t&#187;"/>
+      <l:template name="example" text="&#1055;&#1088;&#1080;&#1084;&#1077;&#1088;&#160;%n, &#171;%t&#187;"/>
+      <l:template name="figure" text="&#1056;&#1080;&#1089;&#1091;&#1085;&#1086;&#1082;&#160;%n, &#171;%t&#187;"/>
+      <l:template name="part" text="&#1063;&#1072;&#1089;&#1090;&#1100;&#160;%n, &#171;%t&#187;"/>
+      <l:template name="procedure" text="&#1055;&#1088;&#1086;&#1094;&#1077;&#1076;&#1091;&#1088;&#1072;&#160;%n, &#171;%t&#187;"/>
+      <l:template name="productionset" text="Production&#160;%n, &#171;%t&#187;"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n, &#171;%t&#187;"/>
+      <l:template name="refsect1" text="the section called &#171;%t&#187;"/>
+      <l:template name="refsect2" text="the section called &#171;%t&#187;"/>
+      <l:template name="refsect3" text="the section called &#171;%t&#187;"/>
+      <l:template name="refsection" text="the section called &#171;%t&#187;"/>
+      <l:template name="sect1" text="&#1056;&#1072;&#1079;&#1076;&#1077;&#1083;&#160;%n, &#171;%t&#187;"/>
+      <l:template name="sect2" text="&#1056;&#1072;&#1079;&#1076;&#1077;&#1083;&#160;%n, &#171;%t&#187;"/>
+      <l:template name="sect3" text="&#1056;&#1072;&#1079;&#1076;&#1077;&#1083;&#160;%n, &#171;%t&#187;"/>
+      <l:template name="sect4" text="&#1056;&#1072;&#1079;&#1076;&#1077;&#1083;&#160;%n, &#171;%t&#187;"/>
+      <l:template name="sect5" text="&#1056;&#1072;&#1079;&#1076;&#1077;&#1083;&#160;%n, &#171;%t&#187;"/>
+      <l:template name="section" text="&#1056;&#1072;&#1079;&#1076;&#1077;&#1083;&#160;%n, &#171;%t&#187;"/>
+      <l:template name="simplesect" text="the section called &#171;%t&#187;"/>
+      <l:template name="table" text="&#1058;&#1072;&#1073;&#1083;&#1080;&#1094;&#1072;&#160;%n, &#171;%t&#187;"/>
+   </l:context>
+
+   <l:context name="authorgroup">
+      <l:template name="sep" text=", "/>
+      <l:template name="sep2" text="  "/>
+      <l:template name="seplast" text=",  "/>
+   </l:context>
+
+   <l:context name="glossary">
+      <l:template name="see" text="&#1057;&#1084;. "/>
+      <l:template name="seealso" text="&#1057;&#1084;. &#1090;&#1072;&#1082;&#1078;&#1077; "/>
+   </l:context>
+
+   <l:context name="msgset">
+      <l:template name="MsgAud" text="Audience: "/>
+      <l:template name="MsgLevel" text="Level: "/>
+      <l:template name="MsgOrig" text="Origin: "/>
+   </l:context>
+
+   <l:context name="datetime">
+      <l:template name="format" text="m/d/Y"/>
+   </l:context>
+
+   <l:context name="datetime-full">
+      <l:template name="January" text="&#1103;&#1085;&#1074;&#1072;&#1088;&#1103;"/>
+      <l:template name="February" text="&#1092;&#1077;&#1074;&#1088;&#1072;&#1083;&#1103;"/>
+      <l:template name="March" text="&#1084;&#1072;&#1088;&#1090;&#1072;"/>
+      <l:template name="April" text="&#1072;&#1087;&#1088;&#1077;&#1083;&#1103;"/>
+      <l:template name="May" text="&#1084;&#1072;&#1103;"/>
+      <l:template name="June" text="&#1080;&#1102;&#1085;&#1103;"/>
+      <l:template name="July" text="&#1080;&#1102;&#1083;&#1103;"/>
+      <l:template name="August" text="&#1072;&#1074;&#1075;&#1091;&#1089;&#1090;&#1072;"/>
+      <l:template name="September" text="&#1089;&#1077;&#1085;&#1090;&#1103;&#1073;&#1088;&#1103;"/>
+      <l:template name="October" text="&#1086;&#1082;&#1090;&#1103;&#1073;&#1088;&#1103;"/>
+      <l:template name="November" text="&#1085;&#1086;&#1103;&#1073;&#1088;&#1103;"/>
+      <l:template name="December" text="&#1076;&#1077;&#1082;&#1072;&#1073;&#1088;&#1103;"/>
+      <l:template name="Monday" text="&#1087;&#1086;&#1085;&#1077;&#1076;&#1077;&#1083;&#1100;&#1085;&#1080;&#1082;"/>
+      <l:template name="Tuesday" text="&#1074;&#1090;&#1086;&#1088;&#1085;&#1080;&#1082;"/>
+      <l:template name="Wednesday" text="&#1089;&#1088;&#1077;&#1076;&#1072;"/>
+      <l:template name="Thursday" text="&#1095;&#1077;&#1090;&#1074;&#1101;&#1088;&#1075;"/>
+      <l:template name="Friday" text="&#1087;&#1103;&#1090;&#1085;&#1080;&#1094;&#1072;"/>
+      <l:template name="Saturday" text="&#1089;&#1091;&#1073;&#1073;&#1086;&#1090;&#1072;"/>
+      <l:template name="Sunday" text="&#1074;&#1086;&#1089;&#1082;&#1088;&#1077;&#1089;&#1077;&#1085;&#1100;&#1077;"/>
+   </l:context>
+
+   <l:context name="datetime-abbrev">
+      <l:template name="Jan" text="&#1071;&#1085;&#1074;"/>
+      <l:template name="Feb" text="&#1060;&#1077;&#1074;"/>
+      <l:template name="Mar" text="&#1052;&#1072;&#1088;"/>
+      <l:template name="Apr" text="&#1040;&#1087;&#1088;"/>
+      <l:template name="May" text="&#1052;&#1072;&#1081;"/>
+      <l:template name="Jun" text="&#1048;&#1102;&#1085;"/>
+      <l:template name="Jul" text="&#1048;&#1102;&#1083;"/>
+      <l:template name="Aug" text="&#1040;&#1074;&#1075;"/>
+      <l:template name="Sep" text="&#1057;&#1077;&#1085;"/>
+      <l:template name="Oct" text="&#1054;&#1082;&#1090;"/>
+      <l:template name="Nov" text="&#1053;&#1086;&#1103;"/>
+      <l:template name="Dec" text="&#1044;&#1077;&#1082;"/>
+      <l:template name="Mon" text="&#1055;&#1085;&#1076;"/>
+      <l:template name="Tue" text="&#1042;&#1090;&#1088;"/>
+      <l:template name="Wed" text="&#1057;&#1088;&#1076;"/>
+      <l:template name="Thu" text="&#1063;&#1090;&#1074;"/>
+      <l:template name="Fri" text="&#1055;&#1090;&#1085;"/>
+      <l:template name="Sat" text="&#1057;&#1073;&#1090;"/>
+      <l:template name="Sun" text="&#1042;&#1089;&#1082;"/>
+   </l:context>
+
+   <l:context name="htmlhelp">
+      <l:template name="langcode" text="0x0419 Russian"/>
+   </l:context>
+
+   <l:letters lang="en">
+      <l:l i="-1"/>
+      <l:l i="0">Symbols</l:l>
+      <l:l i="10">A</l:l>
+      <l:l i="10">a</l:l>
+      <l:l i="10">&#192;</l:l>
+      <l:l i="10">&#224;</l:l>
+      <l:l i="10">&#193;</l:l>
+      <l:l i="10">&#225;</l:l>
+      <l:l i="10">&#194;</l:l>
+      <l:l i="10">&#226;</l:l>
+      <l:l i="10">&#195;</l:l>
+      <l:l i="10">&#227;</l:l>
+      <l:l i="10">&#196;</l:l>
+      <l:l i="10">&#228;</l:l>
+      <l:l i="10">&#197;</l:l>
+      <l:l i="10">&#229;</l:l>
+      <l:l i="10">&#256;</l:l>
+      <l:l i="10">&#257;</l:l>
+      <l:l i="10">&#258;</l:l>
+      <l:l i="10">&#259;</l:l>
+      <l:l i="10">&#260;</l:l>
+      <l:l i="10">&#261;</l:l>
+      <l:l i="10">&#461;</l:l>
+      <l:l i="10">&#462;</l:l>
+      <l:l i="10">&#478;</l:l>
+      <l:l i="10">&#479;</l:l>
+      <l:l i="10">&#480;</l:l>
+      <l:l i="10">&#481;</l:l>
+      <l:l i="10">&#506;</l:l>
+      <l:l i="10">&#507;</l:l>
+      <l:l i="10">&#512;</l:l>
+      <l:l i="10">&#513;</l:l>
+      <l:l i="10">&#514;</l:l>
+      <l:l i="10">&#515;</l:l>
+      <l:l i="10">&#550;</l:l>
+      <l:l i="10">&#551;</l:l>
+      <l:l i="10">&#7680;</l:l>
+      <l:l i="10">&#7681;</l:l>
+      <l:l i="10">&#7834;</l:l>
+      <l:l i="10">&#7840;</l:l>
+      <l:l i="10">&#7841;</l:l>
+      <l:l i="10">&#7842;</l:l>
+      <l:l i="10">&#7843;</l:l>
+      <l:l i="10">&#7844;</l:l>
+      <l:l i="10">&#7845;</l:l>
+      <l:l i="10">&#7846;</l:l>
+      <l:l i="10">&#7847;</l:l>
+      <l:l i="10">&#7848;</l:l>
+      <l:l i="10">&#7849;</l:l>
+      <l:l i="10">&#7850;</l:l>
+      <l:l i="10">&#7851;</l:l>
+      <l:l i="10">&#7852;</l:l>
+      <l:l i="10">&#7853;</l:l>
+      <l:l i="10">&#7854;</l:l>
+      <l:l i="10">&#7855;</l:l>
+      <l:l i="10">&#7856;</l:l>
+      <l:l i="10">&#7857;</l:l>
+      <l:l i="10">&#7858;</l:l>
+      <l:l i="10">&#7859;</l:l>
+      <l:l i="10">&#7860;</l:l>
+      <l:l i="10">&#7861;</l:l>
+      <l:l i="10">&#7862;</l:l>
+      <l:l i="10">&#7863;</l:l>
+      <l:l i="20">B</l:l>
+      <l:l i="20">b</l:l>
+      <l:l i="20">&#384;</l:l>
+      <l:l i="20">&#385;</l:l>
+      <l:l i="20">&#595;</l:l>
+      <l:l i="20">&#386;</l:l>
+      <l:l i="20">&#387;</l:l>
+      <l:l i="20">&#7682;</l:l>
+      <l:l i="20">&#7683;</l:l>
+      <l:l i="20">&#7684;</l:l>
+      <l:l i="20">&#7685;</l:l>
+      <l:l i="20">&#7686;</l:l>
+      <l:l i="20">&#7687;</l:l>
+      <l:l i="30">C</l:l>
+      <l:l i="30">c</l:l>
+      <l:l i="30">&#199;</l:l>
+      <l:l i="30">&#231;</l:l>
+      <l:l i="30">&#262;</l:l>
+      <l:l i="30">&#263;</l:l>
+      <l:l i="30">&#264;</l:l>
+      <l:l i="30">&#265;</l:l>
+      <l:l i="30">&#266;</l:l>
+      <l:l i="30">&#267;</l:l>
+      <l:l i="30">&#268;</l:l>
+      <l:l i="30">&#269;</l:l>
+      <l:l i="30">&#391;</l:l>
+      <l:l i="30">&#392;</l:l>
+      <l:l i="30">&#597;</l:l>
+      <l:l i="30">&#7688;</l:l>
+      <l:l i="30">&#7689;</l:l>
+      <l:l i="40">D</l:l>
+      <l:l i="40">d</l:l>
+      <l:l i="40">&#270;</l:l>
+      <l:l i="40">&#271;</l:l>
+      <l:l i="40">&#272;</l:l>
+      <l:l i="40">&#273;</l:l>
+      <l:l i="40">&#394;</l:l>
+      <l:l i="40">&#599;</l:l>
+      <l:l i="40">&#395;</l:l>
+      <l:l i="40">&#396;</l:l>
+      <l:l i="40">&#453;</l:l>
+      <l:l i="40">&#498;</l:l>
+      <l:l i="40">&#545;</l:l>
+      <l:l i="40">&#598;</l:l>
+      <l:l i="40">&#7690;</l:l>
+      <l:l i="40">&#7691;</l:l>
+      <l:l i="40">&#7692;</l:l>
+      <l:l i="40">&#7693;</l:l>
+      <l:l i="40">&#7694;</l:l>
+      <l:l i="40">&#7695;</l:l>
+      <l:l i="40">&#7696;</l:l>
+      <l:l i="40">&#7697;</l:l>
+      <l:l i="40">&#7698;</l:l>
+      <l:l i="40">&#7699;</l:l>
+      <l:l i="50">E</l:l>
+      <l:l i="50">e</l:l>
+      <l:l i="50">&#200;</l:l>
+      <l:l i="50">&#232;</l:l>
+      <l:l i="50">&#201;</l:l>
+      <l:l i="50">&#233;</l:l>
+      <l:l i="50">&#202;</l:l>
+      <l:l i="50">&#234;</l:l>
+      <l:l i="50">&#203;</l:l>
+      <l:l i="50">&#235;</l:l>
+      <l:l i="50">&#274;</l:l>
+      <l:l i="50">&#275;</l:l>
+      <l:l i="50">&#276;</l:l>
+      <l:l i="50">&#277;</l:l>
+      <l:l i="50">&#278;</l:l>
+      <l:l i="50">&#279;</l:l>
+      <l:l i="50">&#280;</l:l>
+      <l:l i="50">&#281;</l:l>
+      <l:l i="50">&#282;</l:l>
+      <l:l i="50">&#283;</l:l>
+      <l:l i="50">&#516;</l:l>
+      <l:l i="50">&#517;</l:l>
+      <l:l i="50">&#518;</l:l>
+      <l:l i="50">&#519;</l:l>
+      <l:l i="50">&#552;</l:l>
+      <l:l i="50">&#553;</l:l>
+      <l:l i="50">&#7700;</l:l>
+      <l:l i="50">&#7701;</l:l>
+      <l:l i="50">&#7702;</l:l>
+      <l:l i="50">&#7703;</l:l>
+      <l:l i="50">&#7704;</l:l>
+      <l:l i="50">&#7705;</l:l>
+      <l:l i="50">&#7706;</l:l>
+      <l:l i="50">&#7707;</l:l>
+      <l:l i="50">&#7708;</l:l>
+      <l:l i="50">&#7709;</l:l>
+      <l:l i="50">&#7864;</l:l>
+      <l:l i="50">&#7865;</l:l>
+      <l:l i="50">&#7866;</l:l>
+      <l:l i="50">&#7867;</l:l>
+      <l:l i="50">&#7868;</l:l>
+      <l:l i="50">&#7869;</l:l>
+      <l:l i="50">&#7870;</l:l>
+      <l:l i="50">&#7871;</l:l>
+      <l:l i="50">&#7872;</l:l>
+      <l:l i="50">&#7873;</l:l>
+      <l:l i="50">&#7874;</l:l>
+      <l:l i="50">&#7875;</l:l>
+      <l:l i="50">&#7876;</l:l>
+      <l:l i="50">&#7877;</l:l>
+      <l:l i="50">&#7878;</l:l>
+      <l:l i="50">&#7879;</l:l>
+      <l:l i="60">F</l:l>
+      <l:l i="60">f</l:l>
+      <l:l i="60">&#401;</l:l>
+      <l:l i="60">&#402;</l:l>
+      <l:l i="60">&#7710;</l:l>
+      <l:l i="60">&#7711;</l:l>
+      <l:l i="70">G</l:l>
+      <l:l i="70">g</l:l>
+      <l:l i="70">&#284;</l:l>
+      <l:l i="70">&#285;</l:l>
+      <l:l i="70">&#286;</l:l>
+      <l:l i="70">&#287;</l:l>
+      <l:l i="70">&#288;</l:l>
+      <l:l i="70">&#289;</l:l>
+      <l:l i="70">&#290;</l:l>
+      <l:l i="70">&#291;</l:l>
+      <l:l i="70">&#403;</l:l>
+      <l:l i="70">&#608;</l:l>
+      <l:l i="70">&#484;</l:l>
+      <l:l i="70">&#485;</l:l>
+      <l:l i="70">&#486;</l:l>
+      <l:l i="70">&#487;</l:l>
+      <l:l i="70">&#500;</l:l>
+      <l:l i="70">&#501;</l:l>
+      <l:l i="70">&#7712;</l:l>
+      <l:l i="70">&#7713;</l:l>
+      <l:l i="80">H</l:l>
+      <l:l i="80">h</l:l>
+      <l:l i="80">&#292;</l:l>
+      <l:l i="80">&#293;</l:l>
+      <l:l i="80">&#294;</l:l>
+      <l:l i="80">&#295;</l:l>
+      <l:l i="80">&#542;</l:l>
+      <l:l i="80">&#543;</l:l>
+      <l:l i="80">&#614;</l:l>
+      <l:l i="80">&#7714;</l:l>
+      <l:l i="80">&#7715;</l:l>
+      <l:l i="80">&#7716;</l:l>
+      <l:l i="80">&#7717;</l:l>
+      <l:l i="80">&#7718;</l:l>
+      <l:l i="80">&#7719;</l:l>
+      <l:l i="80">&#7720;</l:l>
+      <l:l i="80">&#7721;</l:l>
+      <l:l i="80">&#7722;</l:l>
+      <l:l i="80">&#7723;</l:l>
+      <l:l i="80">&#7830;</l:l>
+      <l:l i="90">I</l:l>
+      <l:l i="90">i</l:l>
+      <l:l i="90">&#204;</l:l>
+      <l:l i="90">&#236;</l:l>
+      <l:l i="90">&#205;</l:l>
+      <l:l i="90">&#237;</l:l>
+      <l:l i="90">&#206;</l:l>
+      <l:l i="90">&#238;</l:l>
+      <l:l i="90">&#207;</l:l>
+      <l:l i="90">&#239;</l:l>
+      <l:l i="90">&#296;</l:l>
+      <l:l i="90">&#297;</l:l>
+      <l:l i="90">&#298;</l:l>
+      <l:l i="90">&#299;</l:l>
+      <l:l i="90">&#300;</l:l>
+      <l:l i="90">&#301;</l:l>
+      <l:l i="90">&#302;</l:l>
+      <l:l i="90">&#303;</l:l>
+      <l:l i="90">&#304;</l:l>
+      <l:l i="90">&#407;</l:l>
+      <l:l i="90">&#616;</l:l>
+      <l:l i="90">&#463;</l:l>
+      <l:l i="90">&#464;</l:l>
+      <l:l i="90">&#520;</l:l>
+      <l:l i="90">&#521;</l:l>
+      <l:l i="90">&#522;</l:l>
+      <l:l i="90">&#523;</l:l>
+      <l:l i="90">&#7724;</l:l>
+      <l:l i="90">&#7725;</l:l>
+      <l:l i="90">&#7726;</l:l>
+      <l:l i="90">&#7727;</l:l>
+      <l:l i="90">&#7880;</l:l>
+      <l:l i="90">&#7881;</l:l>
+      <l:l i="90">&#7882;</l:l>
+      <l:l i="90">&#7883;</l:l>
+      <l:l i="100">J</l:l>
+      <l:l i="100">j</l:l>
+      <l:l i="100">&#308;</l:l>
+      <l:l i="100">&#309;</l:l>
+      <l:l i="100">&#496;</l:l>
+      <l:l i="100">&#669;</l:l>
+      <l:l i="110">K</l:l>
+      <l:l i="110">k</l:l>
+      <l:l i="110">&#310;</l:l>
+      <l:l i="110">&#311;</l:l>
+      <l:l i="110">&#408;</l:l>
+      <l:l i="110">&#409;</l:l>
+      <l:l i="110">&#488;</l:l>
+      <l:l i="110">&#489;</l:l>
+      <l:l i="110">&#7728;</l:l>
+      <l:l i="110">&#7729;</l:l>
+      <l:l i="110">&#7730;</l:l>
+      <l:l i="110">&#7731;</l:l>
+      <l:l i="110">&#7732;</l:l>
+      <l:l i="110">&#7733;</l:l>
+      <l:l i="120">L</l:l>
+      <l:l i="120">l</l:l>
+      <l:l i="120">&#313;</l:l>
+      <l:l i="120">&#314;</l:l>
+      <l:l i="120">&#315;</l:l>
+      <l:l i="120">&#316;</l:l>
+      <l:l i="120">&#317;</l:l>
+      <l:l i="120">&#318;</l:l>
+      <l:l i="120">&#319;</l:l>
+      <l:l i="120">&#320;</l:l>
+      <l:l i="120">&#321;</l:l>
+      <l:l i="120">&#322;</l:l>
+      <l:l i="120">&#410;</l:l>
+      <l:l i="120">&#456;</l:l>
+      <l:l i="120">&#564;</l:l>
+      <l:l i="120">&#619;</l:l>
+      <l:l i="120">&#620;</l:l>
+      <l:l i="120">&#621;</l:l>
+      <l:l i="120">&#7734;</l:l>
+      <l:l i="120">&#7735;</l:l>
+      <l:l i="120">&#7736;</l:l>
+      <l:l i="120">&#7737;</l:l>
+      <l:l i="120">&#7738;</l:l>
+      <l:l i="120">&#7739;</l:l>
+      <l:l i="120">&#7740;</l:l>
+      <l:l i="120">&#7741;</l:l>
+      <l:l i="130">M</l:l>
+      <l:l i="130">m</l:l>
+      <l:l i="130">&#625;</l:l>
+      <l:l i="130">&#7742;</l:l>
+      <l:l i="130">&#7743;</l:l>
+      <l:l i="130">&#7744;</l:l>
+      <l:l i="130">&#7745;</l:l>
+      <l:l i="130">&#7746;</l:l>
+      <l:l i="130">&#7747;</l:l>
+      <l:l i="140">N</l:l>
+      <l:l i="140">n</l:l>
+      <l:l i="140">&#209;</l:l>
+      <l:l i="140">&#241;</l:l>
+      <l:l i="140">&#323;</l:l>
+      <l:l i="140">&#324;</l:l>
+      <l:l i="140">&#325;</l:l>
+      <l:l i="140">&#326;</l:l>
+      <l:l i="140">&#327;</l:l>
+      <l:l i="140">&#328;</l:l>
+      <l:l i="140">&#413;</l:l>
+      <l:l i="140">&#626;</l:l>
+      <l:l i="140">&#414;</l:l>
+      <l:l i="140">&#544;</l:l>
+      <l:l i="140">&#459;</l:l>
+      <l:l i="140">&#504;</l:l>
+      <l:l i="140">&#505;</l:l>
+      <l:l i="140">&#565;</l:l>
+      <l:l i="140">&#627;</l:l>
+      <l:l i="140">&#7748;</l:l>
+      <l:l i="140">&#7749;</l:l>
+      <l:l i="140">&#7750;</l:l>
+      <l:l i="140">&#7751;</l:l>
+      <l:l i="140">&#7752;</l:l>
+      <l:l i="140">&#7753;</l:l>
+      <l:l i="140">&#7754;</l:l>
+      <l:l i="140">&#7755;</l:l>
+      <l:l i="150">O</l:l>
+      <l:l i="150">o</l:l>
+      <l:l i="150">&#210;</l:l>
+      <l:l i="150">&#242;</l:l>
+      <l:l i="150">&#211;</l:l>
+      <l:l i="150">&#243;</l:l>
+      <l:l i="150">&#212;</l:l>
+      <l:l i="150">&#244;</l:l>
+      <l:l i="150">&#213;</l:l>
+      <l:l i="150">&#245;</l:l>
+      <l:l i="150">&#214;</l:l>
+      <l:l i="150">&#246;</l:l>
+      <l:l i="150">&#216;</l:l>
+      <l:l i="150">&#248;</l:l>
+      <l:l i="150">&#332;</l:l>
+      <l:l i="150">&#333;</l:l>
+      <l:l i="150">&#334;</l:l>
+      <l:l i="150">&#335;</l:l>
+      <l:l i="150">&#336;</l:l>
+      <l:l i="150">&#337;</l:l>
+      <l:l i="150">&#415;</l:l>
+      <l:l i="150">&#416;</l:l>
+      <l:l i="150">&#417;</l:l>
+      <l:l i="150">&#465;</l:l>
+      <l:l i="150">&#466;</l:l>
+      <l:l i="150">&#490;</l:l>
+      <l:l i="150">&#491;</l:l>
+      <l:l i="150">&#492;</l:l>
+      <l:l i="150">&#493;</l:l>
+      <l:l i="150">&#510;</l:l>
+      <l:l i="150">&#511;</l:l>
+      <l:l i="150">&#524;</l:l>
+      <l:l i="150">&#525;</l:l>
+      <l:l i="150">&#526;</l:l>
+      <l:l i="150">&#527;</l:l>
+      <l:l i="150">&#554;</l:l>
+      <l:l i="150">&#555;</l:l>
+      <l:l i="150">&#556;</l:l>
+      <l:l i="150">&#557;</l:l>
+      <l:l i="150">&#558;</l:l>
+      <l:l i="150">&#559;</l:l>
+      <l:l i="150">&#560;</l:l>
+      <l:l i="150">&#561;</l:l>
+      <l:l i="150">&#7756;</l:l>
+      <l:l i="150">&#7757;</l:l>
+      <l:l i="150">&#7758;</l:l>
+      <l:l i="150">&#7759;</l:l>
+      <l:l i="150">&#7760;</l:l>
+      <l:l i="150">&#7761;</l:l>
+      <l:l i="150">&#7762;</l:l>
+      <l:l i="150">&#7763;</l:l>
+      <l:l i="150">&#7884;</l:l>
+      <l:l i="150">&#7885;</l:l>
+      <l:l i="150">&#7886;</l:l>
+      <l:l i="150">&#7887;</l:l>
+      <l:l i="150">&#7888;</l:l>
+      <l:l i="150">&#7889;</l:l>
+      <l:l i="150">&#7890;</l:l>
+      <l:l i="150">&#7891;</l:l>
+      <l:l i="150">&#7892;</l:l>
+      <l:l i="150">&#7893;</l:l>
+      <l:l i="150">&#7894;</l:l>
+      <l:l i="150">&#7895;</l:l>
+      <l:l i="150">&#7896;</l:l>
+      <l:l i="150">&#7897;</l:l>
+      <l:l i="150">&#7898;</l:l>
+      <l:l i="150">&#7899;</l:l>
+      <l:l i="150">&#7900;</l:l>
+      <l:l i="150">&#7901;</l:l>
+      <l:l i="150">&#7902;</l:l>
+      <l:l i="150">&#7903;</l:l>
+      <l:l i="150">&#7904;</l:l>
+      <l:l i="150">&#7905;</l:l>
+      <l:l i="150">&#7906;</l:l>
+      <l:l i="150">&#7907;</l:l>
+      <l:l i="160">P</l:l>
+      <l:l i="160">p</l:l>
+      <l:l i="160">&#420;</l:l>
+      <l:l i="160">&#421;</l:l>
+      <l:l i="160">&#7764;</l:l>
+      <l:l i="160">&#7765;</l:l>
+      <l:l i="160">&#7766;</l:l>
+      <l:l i="160">&#7767;</l:l>
+      <l:l i="170">Q</l:l>
+      <l:l i="170">q</l:l>
+      <l:l i="170">&#672;</l:l>
+      <l:l i="180">R</l:l>
+      <l:l i="180">r</l:l>
+      <l:l i="180">&#340;</l:l>
+      <l:l i="180">&#341;</l:l>
+      <l:l i="180">&#342;</l:l>
+      <l:l i="180">&#343;</l:l>
+      <l:l i="180">&#344;</l:l>
+      <l:l i="180">&#345;</l:l>
+      <l:l i="180">&#528;</l:l>
+      <l:l i="180">&#529;</l:l>
+      <l:l i="180">&#530;</l:l>
+      <l:l i="180">&#531;</l:l>
+      <l:l i="180">&#636;</l:l>
+      <l:l i="180">&#637;</l:l>
+      <l:l i="180">&#638;</l:l>
+      <l:l i="180">&#7768;</l:l>
+      <l:l i="180">&#7769;</l:l>
+      <l:l i="180">&#7770;</l:l>
+      <l:l i="180">&#7771;</l:l>
+      <l:l i="180">&#7772;</l:l>
+      <l:l i="180">&#7773;</l:l>
+      <l:l i="180">&#7774;</l:l>
+      <l:l i="180">&#7775;</l:l>
+      <l:l i="190">S</l:l>
+      <l:l i="190">s</l:l>
+      <l:l i="190">&#346;</l:l>
+      <l:l i="190">&#347;</l:l>
+      <l:l i="190">&#348;</l:l>
+      <l:l i="190">&#349;</l:l>
+      <l:l i="190">&#350;</l:l>
+      <l:l i="190">&#351;</l:l>
+      <l:l i="190">&#352;</l:l>
+      <l:l i="190">&#353;</l:l>
+      <l:l i="190">&#536;</l:l>
+      <l:l i="190">&#537;</l:l>
+      <l:l i="190">&#642;</l:l>
+      <l:l i="190">&#7776;</l:l>
+      <l:l i="190">&#7777;</l:l>
+      <l:l i="190">&#7778;</l:l>
+      <l:l i="190">&#7779;</l:l>
+      <l:l i="190">&#7780;</l:l>
+      <l:l i="190">&#7781;</l:l>
+      <l:l i="190">&#7782;</l:l>
+      <l:l i="190">&#7783;</l:l>
+      <l:l i="190">&#7784;</l:l>
+      <l:l i="190">&#7785;</l:l>
+      <l:l i="200">T</l:l>
+      <l:l i="200">t</l:l>
+      <l:l i="200">&#354;</l:l>
+      <l:l i="200">&#355;</l:l>
+      <l:l i="200">&#356;</l:l>
+      <l:l i="200">&#357;</l:l>
+      <l:l i="200">&#358;</l:l>
+      <l:l i="200">&#359;</l:l>
+      <l:l i="200">&#427;</l:l>
+      <l:l i="200">&#428;</l:l>
+      <l:l i="200">&#429;</l:l>
+      <l:l i="200">&#430;</l:l>
+      <l:l i="200">&#648;</l:l>
+      <l:l i="200">&#538;</l:l>
+      <l:l i="200">&#539;</l:l>
+      <l:l i="200">&#566;</l:l>
+      <l:l i="200">&#7786;</l:l>
+      <l:l i="200">&#7787;</l:l>
+      <l:l i="200">&#7788;</l:l>
+      <l:l i="200">&#7789;</l:l>
+      <l:l i="200">&#7790;</l:l>
+      <l:l i="200">&#7791;</l:l>
+      <l:l i="200">&#7792;</l:l>
+      <l:l i="200">&#7793;</l:l>
+      <l:l i="200">&#7831;</l:l>
+      <l:l i="210">U</l:l>
+      <l:l i="210">u</l:l>
+      <l:l i="210">&#217;</l:l>
+      <l:l i="210">&#249;</l:l>
+      <l:l i="210">&#218;</l:l>
+      <l:l i="210">&#250;</l:l>
+      <l:l i="210">&#219;</l:l>
+      <l:l i="210">&#251;</l:l>
+      <l:l i="210">&#220;</l:l>
+      <l:l i="210">&#252;</l:l>
+      <l:l i="210">&#360;</l:l>
+      <l:l i="210">&#361;</l:l>
+      <l:l i="210">&#362;</l:l>
+      <l:l i="210">&#363;</l:l>
+      <l:l i="210">&#364;</l:l>
+      <l:l i="210">&#365;</l:l>
+      <l:l i="210">&#366;</l:l>
+      <l:l i="210">&#367;</l:l>
+      <l:l i="210">&#368;</l:l>
+      <l:l i="210">&#369;</l:l>
+      <l:l i="210">&#370;</l:l>
+      <l:l i="210">&#371;</l:l>
+      <l:l i="210">&#431;</l:l>
+      <l:l i="210">&#432;</l:l>
+      <l:l i="210">&#467;</l:l>
+      <l:l i="210">&#468;</l:l>
+      <l:l i="210">&#469;</l:l>
+      <l:l i="210">&#470;</l:l>
+      <l:l i="210">&#471;</l:l>
+      <l:l i="210">&#472;</l:l>
+      <l:l i="210">&#473;</l:l>
+      <l:l i="210">&#474;</l:l>
+      <l:l i="210">&#475;</l:l>
+      <l:l i="210">&#476;</l:l>
+      <l:l i="210">&#532;</l:l>
+      <l:l i="210">&#533;</l:l>
+      <l:l i="210">&#534;</l:l>
+      <l:l i="210">&#535;</l:l>
+      <l:l i="210">&#7794;</l:l>
+      <l:l i="210">&#7795;</l:l>
+      <l:l i="210">&#7796;</l:l>
+      <l:l i="210">&#7797;</l:l>
+      <l:l i="210">&#7798;</l:l>
+      <l:l i="210">&#7799;</l:l>
+      <l:l i="210">&#7800;</l:l>
+      <l:l i="210">&#7801;</l:l>
+      <l:l i="210">&#7802;</l:l>
+      <l:l i="210">&#7803;</l:l>
+      <l:l i="210">&#7908;</l:l>
+      <l:l i="210">&#7909;</l:l>
+      <l:l i="210">&#7910;</l:l>
+      <l:l i="210">&#7911;</l:l>
+      <l:l i="210">&#7912;</l:l>
+      <l:l i="210">&#7913;</l:l>
+      <l:l i="210">&#7914;</l:l>
+      <l:l i="210">&#7915;</l:l>
+      <l:l i="210">&#7916;</l:l>
+      <l:l i="210">&#7917;</l:l>
+      <l:l i="210">&#7918;</l:l>
+      <l:l i="210">&#7919;</l:l>
+      <l:l i="210">&#7920;</l:l>
+      <l:l i="210">&#7921;</l:l>
+      <l:l i="220">V</l:l>
+      <l:l i="220">v</l:l>
+      <l:l i="220">&#434;</l:l>
+      <l:l i="220">&#651;</l:l>
+      <l:l i="220">&#7804;</l:l>
+      <l:l i="220">&#7805;</l:l>
+      <l:l i="220">&#7806;</l:l>
+      <l:l i="220">&#7807;</l:l>
+      <l:l i="230">W</l:l>
+      <l:l i="230">w</l:l>
+      <l:l i="230">&#372;</l:l>
+      <l:l i="230">&#373;</l:l>
+      <l:l i="230">&#7808;</l:l>
+      <l:l i="230">&#7809;</l:l>
+      <l:l i="230">&#7810;</l:l>
+      <l:l i="230">&#7811;</l:l>
+      <l:l i="230">&#7812;</l:l>
+      <l:l i="230">&#7813;</l:l>
+      <l:l i="230">&#7814;</l:l>
+      <l:l i="230">&#7815;</l:l>
+      <l:l i="230">&#7816;</l:l>
+      <l:l i="230">&#7817;</l:l>
+      <l:l i="230">&#7832;</l:l>
+      <l:l i="240">X</l:l>
+      <l:l i="240">x</l:l>
+      <l:l i="240">&#7818;</l:l>
+      <l:l i="240">&#7819;</l:l>
+      <l:l i="240">&#7820;</l:l>
+      <l:l i="240">&#7821;</l:l>
+      <l:l i="250">Y</l:l>
+      <l:l i="250">y</l:l>
+      <l:l i="250">&#221;</l:l>
+      <l:l i="250">&#253;</l:l>
+      <l:l i="250">&#255;</l:l>
+      <l:l i="250">&#376;</l:l>
+      <l:l i="250">&#374;</l:l>
+      <l:l i="250">&#375;</l:l>
+      <l:l i="250">&#435;</l:l>
+      <l:l i="250">&#436;</l:l>
+      <l:l i="250">&#562;</l:l>
+      <l:l i="250">&#563;</l:l>
+      <l:l i="250">&#7822;</l:l>
+      <l:l i="250">&#7823;</l:l>
+      <l:l i="250">&#7833;</l:l>
+      <l:l i="250">&#7922;</l:l>
+      <l:l i="250">&#7923;</l:l>
+      <l:l i="250">&#7924;</l:l>
+      <l:l i="250">&#7925;</l:l>
+      <l:l i="250">&#7926;</l:l>
+      <l:l i="250">&#7927;</l:l>
+      <l:l i="250">&#7928;</l:l>
+      <l:l i="250">&#7929;</l:l>
+      <l:l i="260">Z</l:l>
+      <l:l i="260">z</l:l>
+      <l:l i="260">&#377;</l:l>
+      <l:l i="260">&#378;</l:l>
+      <l:l i="260">&#379;</l:l>
+      <l:l i="260">&#380;</l:l>
+      <l:l i="260">&#381;</l:l>
+      <l:l i="260">&#382;</l:l>
+      <l:l i="260">&#437;</l:l>
+      <l:l i="260">&#438;</l:l>
+      <l:l i="260">&#548;</l:l>
+      <l:l i="260">&#549;</l:l>
+      <l:l i="260">&#656;</l:l>
+      <l:l i="260">&#657;</l:l>
+      <l:l i="260">&#7824;</l:l>
+      <l:l i="260">&#7825;</l:l>
+      <l:l i="260">&#7826;</l:l>
+      <l:l i="260">&#7827;</l:l>
+      <l:l i="260">&#7828;</l:l>
+      <l:l i="260">&#7829;</l:l>
+   </l:letters>
+</l:l10n>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/sk.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/sk.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/sk.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1153 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="sk" english-language-name="Slovak">
+
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+   <l:gentext key="Abstract" text="Abstrakt"/>
+   <l:gentext key="abstract" text="Abstrakt"/>
+   <l:gentext key="Answer" text="A:"/>
+   <l:gentext key="answer" text="A:"/>
+   <l:gentext key="Appendix" text="Dodatok"/>
+   <l:gentext key="appendix" text="dodatok"/>
+   <l:gentext key="Article" text="&#268;l&#225;nok"/>
+   <l:gentext key="article" text="&#268;l&#225;nok"/>
+   <l:gentext key="Bibliography" text="Bibliografia"/>
+   <l:gentext key="bibliography" text="Bibliografia"/>
+   <l:gentext key="Book" text="Kniha"/>
+   <l:gentext key="book" text="Kniha"/>
+   <l:gentext key="CAUTION" text="V&#221;STRAHA"/>
+   <l:gentext key="Caution" text="V&#253;straha"/>
+   <l:gentext key="caution" text="V&#253;straha"/>
+   <l:gentext key="Chapter" text="Kapitola"/>
+   <l:gentext key="chapter" text="kapitola"/>
+   <l:gentext key="Colophon" text="Tir&#225;&#382;"/>
+   <l:gentext key="colophon" text="Tir&#225;&#382;"/>
+   <l:gentext key="Copyright" text="Copyright"/>
+   <l:gentext key="copyright" text="Copyright"/>
+   <l:gentext key="Dedication" text="Venovanie"/>
+   <l:gentext key="dedication" text="Venovanie"/>
+   <l:gentext key="Edition" text="Vydanie"/>
+   <l:gentext key="edition" text="Vydanie"/>
+   <l:gentext key="Equation" text="Rovnica"/>
+   <l:gentext key="equation" text="Rovnica"/>
+   <l:gentext key="Example" text="Pr&#237;klad"/>
+   <l:gentext key="example" text="Pr&#237;klad"/>
+   <l:gentext key="Figure" text="Obr&#225;zok"/>
+   <l:gentext key="figure" text="Obr&#225;zok"/>
+   <l:gentext key="Glossary" text="Slovn&#237;k"/>
+   <l:gentext key="glossary" text="Slovn&#237;k"/>
+   <l:gentext key="GlossSee" text="Pozri"/>
+   <l:gentext key="glosssee" text="Pozri"/>
+   <l:gentext key="GlossSeeAlso" text="Pozri tie&#382;"/>
+   <l:gentext key="glossseealso" text="Pozri tie&#382;"/>
+   <l:gentext key="IMPORTANT" text="D&#212;LE&#381;IT&#201;"/>
+   <l:gentext key="important" text="D&#244;le&#382;it&#233;"/>
+   <l:gentext key="Important" text="D&#244;le&#382;it&#233;"/>
+   <l:gentext key="Index" text="Zoznam"/>
+   <l:gentext key="index" text="Zoznam"/>
+   <l:gentext key="ISBN" text="ISBN"/>
+   <l:gentext key="isbn" text="ISBN"/>
+   <l:gentext key="LegalNotice" text="Pr&#225;vna pozn&#225;mka"/>
+   <l:gentext key="legalnotice" text="Pr&#225;vna pozn&#225;mka"/>
+   <l:gentext key="MsgAud" text="Publikum"/>
+   <l:gentext key="msgaud" text="Publikum"/>
+   <l:gentext key="MsgLevel" text="&#218;rove&#328;"/>
+   <l:gentext key="msglevel" text="&#218;rove&#328;"/>
+   <l:gentext key="MsgOrig" text="P&#244;vod"/>
+   <l:gentext key="msgorig" text="P&#244;vod"/>
+   <l:gentext key="NOTE" text="POZN&#193;MKA"/>
+   <l:gentext key="Note" text="Pozn&#225;mka"/>
+   <l:gentext key="note" text="Pozn&#225;mka"/>
+   <l:gentext key="Part" text="&#268;as&#357;"/>
+   <l:gentext key="part" text="&#268;as&#357;"/>
+   <l:gentext key="Preface" text="&#218;vod"/>
+   <l:gentext key="preface" text="&#218;vod"/>
+   <l:gentext key="Procedure" text="Postup"/>
+   <l:gentext key="procedure" text="Postup"/>
+   <l:gentext key="ProductionSet" text="Produkcia"/>
+   <l:gentext key="PubDate" text="Publication Date" lang="en"/>
+   <l:gentext key="pubdate" text="Publication date" lang="en"/>
+   <l:gentext key="Published" text="Vydan&#233;"/>
+   <l:gentext key="published" text="Vydan&#233;"/>
+   <l:gentext key="Qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="Question" text="Q:"/>
+   <l:gentext key="question" text="Q:"/>
+   <l:gentext key="RefEntry" text=""/>
+   <l:gentext key="refentry" text=""/>
+   <l:gentext key="Reference" text="Odkaz"/>
+   <l:gentext key="reference" text="Odkaz"/>
+   <l:gentext key="RefName" text="Meno"/>
+   <l:gentext key="refname" text="Meno"/>
+   <l:gentext key="RefSection" text=""/>
+   <l:gentext key="refsection" text=""/>
+   <l:gentext key="RefSynopsisDiv" text="Preh&#318;ad"/>
+   <l:gentext key="refsynopsisdiv" text="Preh&#318;ad"/>
+   <l:gentext key="RevHistory" text="Preh&#318;ad rev&#237;zi&#237;"/>
+   <l:gentext key="revhistory" text="Preh&#318;ad rev&#237;zi&#237;"/>
+   <l:gentext key="revision" text="Rev&#237;zia"/>
+   <l:gentext key="Revision" text="Rev&#237;zia"/>
+   <l:gentext key="sect1" text="Oddiel"/>
+   <l:gentext key="sect2" text="Oddiel"/>
+   <l:gentext key="sect3" text="Oddiel"/>
+   <l:gentext key="sect4" text="Oddiel"/>
+   <l:gentext key="sect5" text="Oddiel"/>
+   <l:gentext key="section" text="oddiel"/>
+   <l:gentext key="Section" text="Oddiel"/>
+   <l:gentext key="see" text="Pozri"/>
+   <l:gentext key="See" text="Pozri"/>
+   <l:gentext key="seealso" text="Pozri tie&#382;"/>
+   <l:gentext key="Seealso" text="Pozri tie&#382;"/>
+   <l:gentext key="SeeAlso" text="Pozri tie&#382;"/>
+   <l:gentext key="set" text="Nastavi&#357;"/>
+   <l:gentext key="Set" text="Nastavi&#357;"/>
+   <l:gentext key="setindex" text="nastavi&#357; index"/>
+   <l:gentext key="SetIndex" text="Nastavi&#357; index"/>
+   <l:gentext key="Sidebar" text="Margin&#225;lia"/>
+   <l:gentext key="sidebar" text="margin&#225;lia"/>
+   <l:gentext key="step" text="krok"/>
+   <l:gentext key="Step" text="Krok"/>
+   <l:gentext key="Table" text="Tabu&#318;ka"/>
+   <l:gentext key="table" text="Tabu&#318;ka"/>
+   <l:gentext key="tip" text="Tip"/>
+   <l:gentext key="TIP" text="TIP"/>
+   <l:gentext key="Tip" text="Tip"/>
+   <l:gentext key="Warning" text="Varovanie"/>
+   <l:gentext key="warning" text="Varovanie"/>
+   <l:gentext key="WARNING" text="VAROVANIE"/>
+   <l:gentext key="and" text="a"/>
+   <l:gentext key="by" text="by"/>
+   <l:gentext key="called" text="called" lang="en"/>
+   <l:gentext key="Edited" text="Vydan&#233;"/>
+   <l:gentext key="edited" text="Vydan&#233;"/>
+   <l:gentext key="Editedby" text="Zostavil: "/>
+   <l:gentext key="editedby" text="Zostavil: "/>
+   <l:gentext key="in" text="v"/>
+   <l:gentext key="lastlistcomma" text=","/>
+   <l:gentext key="listcomma" text=","/>
+   <l:gentext key="nonexistantelement" text="neexistuj&#250;ci prvok"/>
+   <l:gentext key="notes" text="Pozn&#225;mky"/>
+   <l:gentext key="Notes" text="Pozn&#225;mky"/>
+   <l:gentext key="Pgs" text="Str."/>
+   <l:gentext key="pgs" text="Str."/>
+   <l:gentext key="Revisedby" text="Revidoval: "/>
+   <l:gentext key="revisedby" text="Revidoval: "/>
+   <l:gentext key="TableNotes" text="Pozn&#225;mky"/>
+   <l:gentext key="tablenotes" text="Pozn&#225;mky"/>
+   <l:gentext key="TableofContents" text="Obsah"/>
+   <l:gentext key="tableofcontents" text="Obsah"/>
+   <l:gentext key="the" text="" lang="en"/>
+   <l:gentext key="unexpectedelementname" text="Neo&#269;ak&#225;van&#233; meno prvku"/>
+   <l:gentext key="unsupported" text="nepodporovan&#253;"/>
+   <l:gentext key="xrefto" text="xref k"/>
+   <l:gentext key="listofequations" text="Zoznam rovn&#237;c"/>
+   <l:gentext key="ListofEquations" text="Zoznam rovn&#237;c"/>
+   <l:gentext key="ListofExamples" text="Zoznam pr&#237;kladov"/>
+   <l:gentext key="listofexamples" text="Zoznam pr&#237;kladov"/>
+   <l:gentext key="ListofFigures" text="Zoznam obr&#225;zkov"/>
+   <l:gentext key="listoffigures" text="Zoznam obr&#225;zkov"/>
+   <l:gentext key="ListofProcedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listofprocedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listoftables" text="Zoznam tabuliek"/>
+   <l:gentext key="ListofTables" text="Zoznam tabuliek"/>
+   <l:gentext key="ListofUnknown" text="Zoznam nezn&#225;meho"/>
+   <l:gentext key="listofunknown" text="Zoznam nezn&#225;meho"/>
+   <l:gentext key="nav-home" text="Domov"/>
+   <l:gentext key="nav-next" text="Nasleduj&#250;ci"/>
+   <l:gentext key="nav-next-sibling" text="R&#253;chlo dopredu"/>
+   <l:gentext key="nav-prev" text="Predch&#225;dzaj&#250;ci"/>
+   <l:gentext key="nav-prev-sibling" text="R&#253;chlo nazp&#228;t"/>
+   <l:gentext key="nav-up" text="Hore"/>
+   <l:gentext key="nav-toc" text="ToC" lang="en"/>
+   <l:gentext key="Draft" text="Koncept"/>
+   <l:gentext key="above" text="nad"/>
+   <l:gentext key="below" text="pod"/>
+   <l:gentext key="sectioncalled" text="oddiel nazvan&#253;"/>
+   <l:gentext key="index symbols" text="Symboly"/>
+   <l:gentext key="lowercase.alpha" text="a&#225;&#228;bc&#269;d&#271;e&#233;fghi&#237;jkl&#314;&#318;mn&#328;o&#243;&#244;pqr&#341;s&#353;t&#357;u&#250;vwxy&#253;z&#382;"/>
+   <l:gentext key="uppercase.alpha" text="A&#193;&#196;BC&#268;D&#270;E&#201;FGHI&#205;JKL&#313;&#317;MN&#327;O&#211;&#212;PQR&#340;S&#352;T&#356;U&#218;VWXY&#221;Z&#381;"/>
+   <l:dingbat key="startquote" text="&#8220;"/>
+   <l:dingbat key="endquote" text="&#8221;"/>
+   <l:dingbat key="nestedstartquote" text="&#8216;"/>
+   <l:dingbat key="nestedendquote" text="&#8217;"/>
+   <l:dingbat key="singlestartquote" text="&#8216;" lang="en"/>
+   <l:dingbat key="singleendquote" text="&#8217;" lang="en"/>
+   <l:dingbat key="bullet" text="&#8226;"/>
+   <l:gentext key="hyphenation-character" text="-" lang="en"/>
+   <l:gentext key="hyphenation-push-character-count" text="2" lang="en"/>
+   <l:gentext key="hyphenation-remain-character-count" text="2" lang="en"/>
+
+   <l:context name="styles">
+      <l:template name="person-name" text="first-last"/>
+   </l:context>
+
+   <l:context name="title">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="%t"/>
+      <l:template name="appendix" text="Dodatok %n. %t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="biblioentry" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliolist" text="%t" lang="en"/>
+      <l:template name="bibliomixed" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="Kapitola %n. %t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="Rovnica %n. %t"/>
+      <l:template name="example" text="Pr&#237;klad %n. %t"/>
+      <l:template name="figure" text="Obr&#225;zok %n. %t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="glosslist" text="%t" lang="en"/>
+      <l:template name="glossentry" text="%t" lang="en"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text=""/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="&#268;as&#357; %n. %t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="procedure.formal" text="Postup&#160;%n.&#160;%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="productionset.formal" text="Produkcia&#160;%n"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="%t"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="%t"/>
+      <l:template name="refentry" text="%t"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsection" text="%t"/>
+      <l:template name="refsect1" text="%t"/>
+      <l:template name="refsect2" text="%t"/>
+      <l:template name="refsect3" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="refsynopsisdivinfo" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="step" text="%t"/>
+      <l:template name="table" text="Tabu&#318;ka %n. %t"/>
+      <l:template name="task" text="%t" lang="en"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="" lang="en"/>
+      <l:template name="warning" text="%t"/>
+   </l:context>
+
+   <l:context name="title-unnumbered">
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article/appendix" text="%t" lang="en"/>
+      <l:template name="bridgehead" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="sect1" text="%t"/>
+      <l:template name="sect2" text="%t"/>
+      <l:template name="sect3" text="%t"/>
+      <l:template name="sect4" text="%t"/>
+      <l:template name="sect5" text="%t"/>
+      <l:template name="section" text="%t"/>
+      <l:template name="simplesect" text="%t"/>
+   </l:context>
+
+   <l:context name="title-numbered">
+      <l:template name="appendix" text="Dodatok %n. %t"/>
+      <l:template name="article/appendix" text="%n.&#160;%t" lang="en"/>
+      <l:template name="bridgehead" text="%t"/>
+      <l:template name="chapter" text="Kapitola %n. %t"/>
+      <l:template name="sect1" text="%n. %t"/>
+      <l:template name="sect2" text="%n. %t"/>
+      <l:template name="sect3" text="%n. %t"/>
+      <l:template name="sect4" text="%n. %t"/>
+      <l:template name="sect5" text="%n. %t"/>
+      <l:template name="section" text="%n. %t"/>
+      <l:template name="simplesect" text="%n. %t"/>
+   </l:context>
+
+   <l:context name="subtitle">
+      <l:template name="appendix" text="%s"/>
+      <l:template name="article" text="%s"/>
+      <l:template name="bibliodiv" text="%s"/>
+      <l:template name="biblioentry" text="%s"/>
+      <l:template name="bibliography" text="%s"/>
+      <l:template name="bibliomixed" text="%s"/>
+      <l:template name="bibliomset" text="%s"/>
+      <l:template name="biblioset" text="%s"/>
+      <l:template name="book" text="%s"/>
+      <l:template name="chapter" text="%s"/>
+      <l:template name="colophon" text="%s"/>
+      <l:template name="dedication" text="%s"/>
+      <l:template name="glossary" text="%s"/>
+      <l:template name="glossdiv" text="%s"/>
+      <l:template name="index" text="%s"/>
+      <l:template name="indexdiv" text="%s"/>
+      <l:template name="lot" text="%s"/>
+      <l:template name="part" text="%s"/>
+      <l:template name="partintro" text="%s"/>
+      <l:template name="preface" text="%s"/>
+      <l:template name="refentry" text="%s"/>
+      <l:template name="reference" text="%s"/>
+      <l:template name="refsection" text="%s"/>
+      <l:template name="refsect1" text="%s"/>
+      <l:template name="refsect2" text="%s"/>
+      <l:template name="refsect3" text="%s"/>
+      <l:template name="refsynopsisdiv" text="%s"/>
+      <l:template name="sect1" text="%s"/>
+      <l:template name="sect2" text="%s"/>
+      <l:template name="sect3" text="%s"/>
+      <l:template name="sect4" text="%s"/>
+      <l:template name="sect5" text="%s"/>
+      <l:template name="section" text="%s"/>
+      <l:template name="set" text="%s"/>
+      <l:template name="setindex" text="%s"/>
+      <l:template name="sidebar" text="%s"/>
+      <l:template name="simplesect" text="%s"/>
+      <l:template name="toc" text="%s"/>
+   </l:context>
+
+   <l:context name="xref">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="A:&#160;%n"/>
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="constraintdef" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="%t"/>
+      <l:template name="example" text="%t"/>
+      <l:template name="figure" text="%t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text="%n"/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="%t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="Q:&#160;%n"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="Q:&#160;%n"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="table" text="%t"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="%n"/>
+      <l:template name="warning" text="%t"/>
+      <l:template name="page.citation" text=" [%p]"/>
+      <l:template name="page" text="(page %p)" lang="en"/>
+      <l:template name="pageabbrev" text="(p. %p)" lang="en"/>
+      <l:template name="Page" text="Page %p" lang="en"/>
+      <l:template name="bridgehead" text="&#8220;%t&#8221;"/>
+      <l:template name="refsection" text="&#8220;%t&#8221;"/>
+      <l:template name="refsect1" text="&#8220;%t&#8221;"/>
+      <l:template name="refsect2" text="&#8220;%t&#8221;"/>
+      <l:template name="refsect3" text="&#8220;%t&#8221;"/>
+      <l:template name="sect1" text="&#8220;%t&#8221;"/>
+      <l:template name="sect2" text="&#8220;%t&#8221;"/>
+      <l:template name="sect3" text="&#8220;%t&#8221;"/>
+      <l:template name="sect4" text="&#8220;%t&#8221;"/>
+      <l:template name="sect5" text="&#8220;%t&#8221;"/>
+      <l:template name="section" text="&#8220;%t&#8221;"/>
+      <l:template name="simplesect" text="&#8220;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="xref-number">
+      <l:template name="answer" text="A:&#160;%n"/>
+      <l:template name="appendix" text="Dodatok&#160;%n"/>
+      <l:template name="bridgehead" text="Oddiel&#160;%n"/>
+      <l:template name="chapter" text="Kapitola&#160;%n"/>
+      <l:template name="equation" text="Rovnica&#160;%n"/>
+      <l:template name="example" text="Pr&#237;klad&#160;%n"/>
+      <l:template name="figure" text="Obr&#225;zok&#160;%n"/>
+      <l:template name="part" text="&#268;as&#357;&#160;%n"/>
+      <l:template name="procedure" text="Postup&#160;%n"/>
+      <l:template name="productionset" text="Produkcia&#160;%n"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n"/>
+      <l:template name="qandaentry" text="Q:&#160;%n"/>
+      <l:template name="question" text="Q:&#160;%n"/>
+      <l:template name="sect1" text="Oddiel&#160;%n"/>
+      <l:template name="sect2" text="Oddiel&#160;%n"/>
+      <l:template name="sect3" text="Oddiel&#160;%n"/>
+      <l:template name="sect4" text="Oddiel&#160;%n"/>
+      <l:template name="sect5" text="Oddiel&#160;%n"/>
+      <l:template name="section" text="Oddiel&#160;%n"/>
+      <l:template name="table" text="Tabu&#318;ka&#160;%n"/>
+   </l:context>
+
+   <l:context name="xref-number-and-title">
+      <l:template name="appendix" text="Dodatok&#160;%n, %t"/>
+      <l:template name="bridgehead" text="Oddiel&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="chapter" text="Kapitola&#160;%n, %t"/>
+      <l:template name="equation" text="Rovnica&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="example" text="Pr&#237;klad&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="figure" text="Obr&#225;zok&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="part" text="&#268;as&#357;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="procedure" text="Postup&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="productionset" text="Produkcia&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="refsect1" text="oddiel nazvan&#253; &#8220;%t&#8221;"/>
+      <l:template name="refsect2" text="oddiel nazvan&#253; &#8220;%t&#8221;"/>
+      <l:template name="refsect3" text="oddiel nazvan&#253; &#8220;%t&#8221;"/>
+      <l:template name="refsection" text="oddiel nazvan&#253; &#8220;%t&#8221;"/>
+      <l:template name="sect1" text="Oddiel&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect2" text="Oddiel&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect3" text="Oddiel&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect4" text="Oddiel&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect5" text="Oddiel&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="section" text="Oddiel&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="simplesect" text="oddiel nazvan&#253; &#8220;%t&#8221;"/>
+      <l:template name="table" text="Tabu&#318;ka&#160;%n, &#8220;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="authorgroup">
+      <l:template name="sep" text=", "/>
+      <l:template name="sep2" text=" a "/>
+      <l:template name="seplast" text=", a "/>
+   </l:context>
+
+   <l:context name="glossary">
+      <l:template name="see" text="Pozri "/>
+      <l:template name="seealso" text="Pozri tie&#382; "/>
+   </l:context>
+
+   <l:context name="msgset">
+      <l:template name="MsgAud" text="Publikum: "/>
+      <l:template name="MsgLevel" text="&#218;rove&#328;: "/>
+      <l:template name="MsgOrig" text="P&#244;vod: "/>
+   </l:context>
+
+   <l:context name="datetime">
+      <l:template name="format" text="d.&#160;B Y"/>
+   </l:context>
+
+   <l:context name="datetime-full">
+      <l:template name="January" text="janu&#225;ra"/>
+      <l:template name="February" text="febru&#225;ra"/>
+      <l:template name="March" text="marca"/>
+      <l:template name="April" text="apr&#237;la"/>
+      <l:template name="May" text="m&#225;ja"/>
+      <l:template name="June" text="j&#250;na"/>
+      <l:template name="July" text="j&#250;la"/>
+      <l:template name="August" text="augusta"/>
+      <l:template name="September" text="septembra"/>
+      <l:template name="October" text="okt&#243;bra"/>
+      <l:template name="November" text="novembra"/>
+      <l:template name="December" text="decembra"/>
+      <l:template name="Monday" text="pondelok"/>
+      <l:template name="Tuesday" text="utorok"/>
+      <l:template name="Wednesday" text="streda"/>
+      <l:template name="Thursday" text="&#353;tvrtok"/>
+      <l:template name="Friday" text="piatok"/>
+      <l:template name="Saturday" text="sobota"/>
+      <l:template name="Sunday" text="nede&#318;a"/>
+   </l:context>
+
+   <l:context name="datetime-abbrev">
+      <l:template name="Jan" text="jan"/>
+      <l:template name="Feb" text="feb"/>
+      <l:template name="Mar" text="mar"/>
+      <l:template name="Apr" text="apr"/>
+      <l:template name="May" text="m&#225;j"/>
+      <l:template name="Jun" text="j&#250;n"/>
+      <l:template name="Jul" text="j&#250;l"/>
+      <l:template name="Aug" text="aug"/>
+      <l:template name="Sep" text="sep"/>
+      <l:template name="Oct" text="okt"/>
+      <l:template name="Nov" text="nov"/>
+      <l:template name="Dec" text="dec"/>
+      <l:template name="Mon" text="po"/>
+      <l:template name="Tue" text="ut"/>
+      <l:template name="Wed" text="st"/>
+      <l:template name="Thu" text="&#353;t"/>
+      <l:template name="Fri" text="pi"/>
+      <l:template name="Sat" text="so"/>
+      <l:template name="Sun" text="ne"/>
+   </l:context>
+
+   <l:context name="htmlhelp">
+      <l:template name="langcode" text="0x041b Slovak"/>
+   </l:context>
+
+   <l:letters lang="en">
+      <l:l i="-1"/>
+      <l:l i="0">Symbols</l:l>
+      <l:l i="10">A</l:l>
+      <l:l i="10">a</l:l>
+      <l:l i="10">&#192;</l:l>
+      <l:l i="10">&#224;</l:l>
+      <l:l i="10">&#193;</l:l>
+      <l:l i="10">&#225;</l:l>
+      <l:l i="10">&#194;</l:l>
+      <l:l i="10">&#226;</l:l>
+      <l:l i="10">&#195;</l:l>
+      <l:l i="10">&#227;</l:l>
+      <l:l i="10">&#196;</l:l>
+      <l:l i="10">&#228;</l:l>
+      <l:l i="10">&#197;</l:l>
+      <l:l i="10">&#229;</l:l>
+      <l:l i="10">&#256;</l:l>
+      <l:l i="10">&#257;</l:l>
+      <l:l i="10">&#258;</l:l>
+      <l:l i="10">&#259;</l:l>
+      <l:l i="10">&#260;</l:l>
+      <l:l i="10">&#261;</l:l>
+      <l:l i="10">&#461;</l:l>
+      <l:l i="10">&#462;</l:l>
+      <l:l i="10">&#478;</l:l>
+      <l:l i="10">&#479;</l:l>
+      <l:l i="10">&#480;</l:l>
+      <l:l i="10">&#481;</l:l>
+      <l:l i="10">&#506;</l:l>
+      <l:l i="10">&#507;</l:l>
+      <l:l i="10">&#512;</l:l>
+      <l:l i="10">&#513;</l:l>
+      <l:l i="10">&#514;</l:l>
+      <l:l i="10">&#515;</l:l>
+      <l:l i="10">&#550;</l:l>
+      <l:l i="10">&#551;</l:l>
+      <l:l i="10">&#7680;</l:l>
+      <l:l i="10">&#7681;</l:l>
+      <l:l i="10">&#7834;</l:l>
+      <l:l i="10">&#7840;</l:l>
+      <l:l i="10">&#7841;</l:l>
+      <l:l i="10">&#7842;</l:l>
+      <l:l i="10">&#7843;</l:l>
+      <l:l i="10">&#7844;</l:l>
+      <l:l i="10">&#7845;</l:l>
+      <l:l i="10">&#7846;</l:l>
+      <l:l i="10">&#7847;</l:l>
+      <l:l i="10">&#7848;</l:l>
+      <l:l i="10">&#7849;</l:l>
+      <l:l i="10">&#7850;</l:l>
+      <l:l i="10">&#7851;</l:l>
+      <l:l i="10">&#7852;</l:l>
+      <l:l i="10">&#7853;</l:l>
+      <l:l i="10">&#7854;</l:l>
+      <l:l i="10">&#7855;</l:l>
+      <l:l i="10">&#7856;</l:l>
+      <l:l i="10">&#7857;</l:l>
+      <l:l i="10">&#7858;</l:l>
+      <l:l i="10">&#7859;</l:l>
+      <l:l i="10">&#7860;</l:l>
+      <l:l i="10">&#7861;</l:l>
+      <l:l i="10">&#7862;</l:l>
+      <l:l i="10">&#7863;</l:l>
+      <l:l i="20">B</l:l>
+      <l:l i="20">b</l:l>
+      <l:l i="20">&#384;</l:l>
+      <l:l i="20">&#385;</l:l>
+      <l:l i="20">&#595;</l:l>
+      <l:l i="20">&#386;</l:l>
+      <l:l i="20">&#387;</l:l>
+      <l:l i="20">&#7682;</l:l>
+      <l:l i="20">&#7683;</l:l>
+      <l:l i="20">&#7684;</l:l>
+      <l:l i="20">&#7685;</l:l>
+      <l:l i="20">&#7686;</l:l>
+      <l:l i="20">&#7687;</l:l>
+      <l:l i="30">C</l:l>
+      <l:l i="30">c</l:l>
+      <l:l i="30">&#199;</l:l>
+      <l:l i="30">&#231;</l:l>
+      <l:l i="30">&#262;</l:l>
+      <l:l i="30">&#263;</l:l>
+      <l:l i="30">&#264;</l:l>
+      <l:l i="30">&#265;</l:l>
+      <l:l i="30">&#266;</l:l>
+      <l:l i="30">&#267;</l:l>
+      <l:l i="30">&#268;</l:l>
+      <l:l i="30">&#269;</l:l>
+      <l:l i="30">&#391;</l:l>
+      <l:l i="30">&#392;</l:l>
+      <l:l i="30">&#597;</l:l>
+      <l:l i="30">&#7688;</l:l>
+      <l:l i="30">&#7689;</l:l>
+      <l:l i="40">D</l:l>
+      <l:l i="40">d</l:l>
+      <l:l i="40">&#270;</l:l>
+      <l:l i="40">&#271;</l:l>
+      <l:l i="40">&#272;</l:l>
+      <l:l i="40">&#273;</l:l>
+      <l:l i="40">&#394;</l:l>
+      <l:l i="40">&#599;</l:l>
+      <l:l i="40">&#395;</l:l>
+      <l:l i="40">&#396;</l:l>
+      <l:l i="40">&#453;</l:l>
+      <l:l i="40">&#498;</l:l>
+      <l:l i="40">&#545;</l:l>
+      <l:l i="40">&#598;</l:l>
+      <l:l i="40">&#7690;</l:l>
+      <l:l i="40">&#7691;</l:l>
+      <l:l i="40">&#7692;</l:l>
+      <l:l i="40">&#7693;</l:l>
+      <l:l i="40">&#7694;</l:l>
+      <l:l i="40">&#7695;</l:l>
+      <l:l i="40">&#7696;</l:l>
+      <l:l i="40">&#7697;</l:l>
+      <l:l i="40">&#7698;</l:l>
+      <l:l i="40">&#7699;</l:l>
+      <l:l i="50">E</l:l>
+      <l:l i="50">e</l:l>
+      <l:l i="50">&#200;</l:l>
+      <l:l i="50">&#232;</l:l>
+      <l:l i="50">&#201;</l:l>
+      <l:l i="50">&#233;</l:l>
+      <l:l i="50">&#202;</l:l>
+      <l:l i="50">&#234;</l:l>
+      <l:l i="50">&#203;</l:l>
+      <l:l i="50">&#235;</l:l>
+      <l:l i="50">&#274;</l:l>
+      <l:l i="50">&#275;</l:l>
+      <l:l i="50">&#276;</l:l>
+      <l:l i="50">&#277;</l:l>
+      <l:l i="50">&#278;</l:l>
+      <l:l i="50">&#279;</l:l>
+      <l:l i="50">&#280;</l:l>
+      <l:l i="50">&#281;</l:l>
+      <l:l i="50">&#282;</l:l>
+      <l:l i="50">&#283;</l:l>
+      <l:l i="50">&#516;</l:l>
+      <l:l i="50">&#517;</l:l>
+      <l:l i="50">&#518;</l:l>
+      <l:l i="50">&#519;</l:l>
+      <l:l i="50">&#552;</l:l>
+      <l:l i="50">&#553;</l:l>
+      <l:l i="50">&#7700;</l:l>
+      <l:l i="50">&#7701;</l:l>
+      <l:l i="50">&#7702;</l:l>
+      <l:l i="50">&#7703;</l:l>
+      <l:l i="50">&#7704;</l:l>
+      <l:l i="50">&#7705;</l:l>
+      <l:l i="50">&#7706;</l:l>
+      <l:l i="50">&#7707;</l:l>
+      <l:l i="50">&#7708;</l:l>
+      <l:l i="50">&#7709;</l:l>
+      <l:l i="50">&#7864;</l:l>
+      <l:l i="50">&#7865;</l:l>
+      <l:l i="50">&#7866;</l:l>
+      <l:l i="50">&#7867;</l:l>
+      <l:l i="50">&#7868;</l:l>
+      <l:l i="50">&#7869;</l:l>
+      <l:l i="50">&#7870;</l:l>
+      <l:l i="50">&#7871;</l:l>
+      <l:l i="50">&#7872;</l:l>
+      <l:l i="50">&#7873;</l:l>
+      <l:l i="50">&#7874;</l:l>
+      <l:l i="50">&#7875;</l:l>
+      <l:l i="50">&#7876;</l:l>
+      <l:l i="50">&#7877;</l:l>
+      <l:l i="50">&#7878;</l:l>
+      <l:l i="50">&#7879;</l:l>
+      <l:l i="60">F</l:l>
+      <l:l i="60">f</l:l>
+      <l:l i="60">&#401;</l:l>
+      <l:l i="60">&#402;</l:l>
+      <l:l i="60">&#7710;</l:l>
+      <l:l i="60">&#7711;</l:l>
+      <l:l i="70">G</l:l>
+      <l:l i="70">g</l:l>
+      <l:l i="70">&#284;</l:l>
+      <l:l i="70">&#285;</l:l>
+      <l:l i="70">&#286;</l:l>
+      <l:l i="70">&#287;</l:l>
+      <l:l i="70">&#288;</l:l>
+      <l:l i="70">&#289;</l:l>
+      <l:l i="70">&#290;</l:l>
+      <l:l i="70">&#291;</l:l>
+      <l:l i="70">&#403;</l:l>
+      <l:l i="70">&#608;</l:l>
+      <l:l i="70">&#484;</l:l>
+      <l:l i="70">&#485;</l:l>
+      <l:l i="70">&#486;</l:l>
+      <l:l i="70">&#487;</l:l>
+      <l:l i="70">&#500;</l:l>
+      <l:l i="70">&#501;</l:l>
+      <l:l i="70">&#7712;</l:l>
+      <l:l i="70">&#7713;</l:l>
+      <l:l i="80">H</l:l>
+      <l:l i="80">h</l:l>
+      <l:l i="80">&#292;</l:l>
+      <l:l i="80">&#293;</l:l>
+      <l:l i="80">&#294;</l:l>
+      <l:l i="80">&#295;</l:l>
+      <l:l i="80">&#542;</l:l>
+      <l:l i="80">&#543;</l:l>
+      <l:l i="80">&#614;</l:l>
+      <l:l i="80">&#7714;</l:l>
+      <l:l i="80">&#7715;</l:l>
+      <l:l i="80">&#7716;</l:l>
+      <l:l i="80">&#7717;</l:l>
+      <l:l i="80">&#7718;</l:l>
+      <l:l i="80">&#7719;</l:l>
+      <l:l i="80">&#7720;</l:l>
+      <l:l i="80">&#7721;</l:l>
+      <l:l i="80">&#7722;</l:l>
+      <l:l i="80">&#7723;</l:l>
+      <l:l i="80">&#7830;</l:l>
+      <l:l i="90">I</l:l>
+      <l:l i="90">i</l:l>
+      <l:l i="90">&#204;</l:l>
+      <l:l i="90">&#236;</l:l>
+      <l:l i="90">&#205;</l:l>
+      <l:l i="90">&#237;</l:l>
+      <l:l i="90">&#206;</l:l>
+      <l:l i="90">&#238;</l:l>
+      <l:l i="90">&#207;</l:l>
+      <l:l i="90">&#239;</l:l>
+      <l:l i="90">&#296;</l:l>
+      <l:l i="90">&#297;</l:l>
+      <l:l i="90">&#298;</l:l>
+      <l:l i="90">&#299;</l:l>
+      <l:l i="90">&#300;</l:l>
+      <l:l i="90">&#301;</l:l>
+      <l:l i="90">&#302;</l:l>
+      <l:l i="90">&#303;</l:l>
+      <l:l i="90">&#304;</l:l>
+      <l:l i="90">&#407;</l:l>
+      <l:l i="90">&#616;</l:l>
+      <l:l i="90">&#463;</l:l>
+      <l:l i="90">&#464;</l:l>
+      <l:l i="90">&#520;</l:l>
+      <l:l i="90">&#521;</l:l>
+      <l:l i="90">&#522;</l:l>
+      <l:l i="90">&#523;</l:l>
+      <l:l i="90">&#7724;</l:l>
+      <l:l i="90">&#7725;</l:l>
+      <l:l i="90">&#7726;</l:l>
+      <l:l i="90">&#7727;</l:l>
+      <l:l i="90">&#7880;</l:l>
+      <l:l i="90">&#7881;</l:l>
+      <l:l i="90">&#7882;</l:l>
+      <l:l i="90">&#7883;</l:l>
+      <l:l i="100">J</l:l>
+      <l:l i="100">j</l:l>
+      <l:l i="100">&#308;</l:l>
+      <l:l i="100">&#309;</l:l>
+      <l:l i="100">&#496;</l:l>
+      <l:l i="100">&#669;</l:l>
+      <l:l i="110">K</l:l>
+      <l:l i="110">k</l:l>
+      <l:l i="110">&#310;</l:l>
+      <l:l i="110">&#311;</l:l>
+      <l:l i="110">&#408;</l:l>
+      <l:l i="110">&#409;</l:l>
+      <l:l i="110">&#488;</l:l>
+      <l:l i="110">&#489;</l:l>
+      <l:l i="110">&#7728;</l:l>
+      <l:l i="110">&#7729;</l:l>
+      <l:l i="110">&#7730;</l:l>
+      <l:l i="110">&#7731;</l:l>
+      <l:l i="110">&#7732;</l:l>
+      <l:l i="110">&#7733;</l:l>
+      <l:l i="120">L</l:l>
+      <l:l i="120">l</l:l>
+      <l:l i="120">&#313;</l:l>
+      <l:l i="120">&#314;</l:l>
+      <l:l i="120">&#315;</l:l>
+      <l:l i="120">&#316;</l:l>
+      <l:l i="120">&#317;</l:l>
+      <l:l i="120">&#318;</l:l>
+      <l:l i="120">&#319;</l:l>
+      <l:l i="120">&#320;</l:l>
+      <l:l i="120">&#321;</l:l>
+      <l:l i="120">&#322;</l:l>
+      <l:l i="120">&#410;</l:l>
+      <l:l i="120">&#456;</l:l>
+      <l:l i="120">&#564;</l:l>
+      <l:l i="120">&#619;</l:l>
+      <l:l i="120">&#620;</l:l>
+      <l:l i="120">&#621;</l:l>
+      <l:l i="120">&#7734;</l:l>
+      <l:l i="120">&#7735;</l:l>
+      <l:l i="120">&#7736;</l:l>
+      <l:l i="120">&#7737;</l:l>
+      <l:l i="120">&#7738;</l:l>
+      <l:l i="120">&#7739;</l:l>
+      <l:l i="120">&#7740;</l:l>
+      <l:l i="120">&#7741;</l:l>
+      <l:l i="130">M</l:l>
+      <l:l i="130">m</l:l>
+      <l:l i="130">&#625;</l:l>
+      <l:l i="130">&#7742;</l:l>
+      <l:l i="130">&#7743;</l:l>
+      <l:l i="130">&#7744;</l:l>
+      <l:l i="130">&#7745;</l:l>
+      <l:l i="130">&#7746;</l:l>
+      <l:l i="130">&#7747;</l:l>
+      <l:l i="140">N</l:l>
+      <l:l i="140">n</l:l>
+      <l:l i="140">&#209;</l:l>
+      <l:l i="140">&#241;</l:l>
+      <l:l i="140">&#323;</l:l>
+      <l:l i="140">&#324;</l:l>
+      <l:l i="140">&#325;</l:l>
+      <l:l i="140">&#326;</l:l>
+      <l:l i="140">&#327;</l:l>
+      <l:l i="140">&#328;</l:l>
+      <l:l i="140">&#413;</l:l>
+      <l:l i="140">&#626;</l:l>
+      <l:l i="140">&#414;</l:l>
+      <l:l i="140">&#544;</l:l>
+      <l:l i="140">&#459;</l:l>
+      <l:l i="140">&#504;</l:l>
+      <l:l i="140">&#505;</l:l>
+      <l:l i="140">&#565;</l:l>
+      <l:l i="140">&#627;</l:l>
+      <l:l i="140">&#7748;</l:l>
+      <l:l i="140">&#7749;</l:l>
+      <l:l i="140">&#7750;</l:l>
+      <l:l i="140">&#7751;</l:l>
+      <l:l i="140">&#7752;</l:l>
+      <l:l i="140">&#7753;</l:l>
+      <l:l i="140">&#7754;</l:l>
+      <l:l i="140">&#7755;</l:l>
+      <l:l i="150">O</l:l>
+      <l:l i="150">o</l:l>
+      <l:l i="150">&#210;</l:l>
+      <l:l i="150">&#242;</l:l>
+      <l:l i="150">&#211;</l:l>
+      <l:l i="150">&#243;</l:l>
+      <l:l i="150">&#212;</l:l>
+      <l:l i="150">&#244;</l:l>
+      <l:l i="150">&#213;</l:l>
+      <l:l i="150">&#245;</l:l>
+      <l:l i="150">&#214;</l:l>
+      <l:l i="150">&#246;</l:l>
+      <l:l i="150">&#216;</l:l>
+      <l:l i="150">&#248;</l:l>
+      <l:l i="150">&#332;</l:l>
+      <l:l i="150">&#333;</l:l>
+      <l:l i="150">&#334;</l:l>
+      <l:l i="150">&#335;</l:l>
+      <l:l i="150">&#336;</l:l>
+      <l:l i="150">&#337;</l:l>
+      <l:l i="150">&#415;</l:l>
+      <l:l i="150">&#416;</l:l>
+      <l:l i="150">&#417;</l:l>
+      <l:l i="150">&#465;</l:l>
+      <l:l i="150">&#466;</l:l>
+      <l:l i="150">&#490;</l:l>
+      <l:l i="150">&#491;</l:l>
+      <l:l i="150">&#492;</l:l>
+      <l:l i="150">&#493;</l:l>
+      <l:l i="150">&#510;</l:l>
+      <l:l i="150">&#511;</l:l>
+      <l:l i="150">&#524;</l:l>
+      <l:l i="150">&#525;</l:l>
+      <l:l i="150">&#526;</l:l>
+      <l:l i="150">&#527;</l:l>
+      <l:l i="150">&#554;</l:l>
+      <l:l i="150">&#555;</l:l>
+      <l:l i="150">&#556;</l:l>
+      <l:l i="150">&#557;</l:l>
+      <l:l i="150">&#558;</l:l>
+      <l:l i="150">&#559;</l:l>
+      <l:l i="150">&#560;</l:l>
+      <l:l i="150">&#561;</l:l>
+      <l:l i="150">&#7756;</l:l>
+      <l:l i="150">&#7757;</l:l>
+      <l:l i="150">&#7758;</l:l>
+      <l:l i="150">&#7759;</l:l>
+      <l:l i="150">&#7760;</l:l>
+      <l:l i="150">&#7761;</l:l>
+      <l:l i="150">&#7762;</l:l>
+      <l:l i="150">&#7763;</l:l>
+      <l:l i="150">&#7884;</l:l>
+      <l:l i="150">&#7885;</l:l>
+      <l:l i="150">&#7886;</l:l>
+      <l:l i="150">&#7887;</l:l>
+      <l:l i="150">&#7888;</l:l>
+      <l:l i="150">&#7889;</l:l>
+      <l:l i="150">&#7890;</l:l>
+      <l:l i="150">&#7891;</l:l>
+      <l:l i="150">&#7892;</l:l>
+      <l:l i="150">&#7893;</l:l>
+      <l:l i="150">&#7894;</l:l>
+      <l:l i="150">&#7895;</l:l>
+      <l:l i="150">&#7896;</l:l>
+      <l:l i="150">&#7897;</l:l>
+      <l:l i="150">&#7898;</l:l>
+      <l:l i="150">&#7899;</l:l>
+      <l:l i="150">&#7900;</l:l>
+      <l:l i="150">&#7901;</l:l>
+      <l:l i="150">&#7902;</l:l>
+      <l:l i="150">&#7903;</l:l>
+      <l:l i="150">&#7904;</l:l>
+      <l:l i="150">&#7905;</l:l>
+      <l:l i="150">&#7906;</l:l>
+      <l:l i="150">&#7907;</l:l>
+      <l:l i="160">P</l:l>
+      <l:l i="160">p</l:l>
+      <l:l i="160">&#420;</l:l>
+      <l:l i="160">&#421;</l:l>
+      <l:l i="160">&#7764;</l:l>
+      <l:l i="160">&#7765;</l:l>
+      <l:l i="160">&#7766;</l:l>
+      <l:l i="160">&#7767;</l:l>
+      <l:l i="170">Q</l:l>
+      <l:l i="170">q</l:l>
+      <l:l i="170">&#672;</l:l>
+      <l:l i="180">R</l:l>
+      <l:l i="180">r</l:l>
+      <l:l i="180">&#340;</l:l>
+      <l:l i="180">&#341;</l:l>
+      <l:l i="180">&#342;</l:l>
+      <l:l i="180">&#343;</l:l>
+      <l:l i="180">&#344;</l:l>
+      <l:l i="180">&#345;</l:l>
+      <l:l i="180">&#528;</l:l>
+      <l:l i="180">&#529;</l:l>
+      <l:l i="180">&#530;</l:l>
+      <l:l i="180">&#531;</l:l>
+      <l:l i="180">&#636;</l:l>
+      <l:l i="180">&#637;</l:l>
+      <l:l i="180">&#638;</l:l>
+      <l:l i="180">&#7768;</l:l>
+      <l:l i="180">&#7769;</l:l>
+      <l:l i="180">&#7770;</l:l>
+      <l:l i="180">&#7771;</l:l>
+      <l:l i="180">&#7772;</l:l>
+      <l:l i="180">&#7773;</l:l>
+      <l:l i="180">&#7774;</l:l>
+      <l:l i="180">&#7775;</l:l>
+      <l:l i="190">S</l:l>
+      <l:l i="190">s</l:l>
+      <l:l i="190">&#346;</l:l>
+      <l:l i="190">&#347;</l:l>
+      <l:l i="190">&#348;</l:l>
+      <l:l i="190">&#349;</l:l>
+      <l:l i="190">&#350;</l:l>
+      <l:l i="190">&#351;</l:l>
+      <l:l i="190">&#352;</l:l>
+      <l:l i="190">&#353;</l:l>
+      <l:l i="190">&#536;</l:l>
+      <l:l i="190">&#537;</l:l>
+      <l:l i="190">&#642;</l:l>
+      <l:l i="190">&#7776;</l:l>
+      <l:l i="190">&#7777;</l:l>
+      <l:l i="190">&#7778;</l:l>
+      <l:l i="190">&#7779;</l:l>
+      <l:l i="190">&#7780;</l:l>
+      <l:l i="190">&#7781;</l:l>
+      <l:l i="190">&#7782;</l:l>
+      <l:l i="190">&#7783;</l:l>
+      <l:l i="190">&#7784;</l:l>
+      <l:l i="190">&#7785;</l:l>
+      <l:l i="200">T</l:l>
+      <l:l i="200">t</l:l>
+      <l:l i="200">&#354;</l:l>
+      <l:l i="200">&#355;</l:l>
+      <l:l i="200">&#356;</l:l>
+      <l:l i="200">&#357;</l:l>
+      <l:l i="200">&#358;</l:l>
+      <l:l i="200">&#359;</l:l>
+      <l:l i="200">&#427;</l:l>
+      <l:l i="200">&#428;</l:l>
+      <l:l i="200">&#429;</l:l>
+      <l:l i="200">&#430;</l:l>
+      <l:l i="200">&#648;</l:l>
+      <l:l i="200">&#538;</l:l>
+      <l:l i="200">&#539;</l:l>
+      <l:l i="200">&#566;</l:l>
+      <l:l i="200">&#7786;</l:l>
+      <l:l i="200">&#7787;</l:l>
+      <l:l i="200">&#7788;</l:l>
+      <l:l i="200">&#7789;</l:l>
+      <l:l i="200">&#7790;</l:l>
+      <l:l i="200">&#7791;</l:l>
+      <l:l i="200">&#7792;</l:l>
+      <l:l i="200">&#7793;</l:l>
+      <l:l i="200">&#7831;</l:l>
+      <l:l i="210">U</l:l>
+      <l:l i="210">u</l:l>
+      <l:l i="210">&#217;</l:l>
+      <l:l i="210">&#249;</l:l>
+      <l:l i="210">&#218;</l:l>
+      <l:l i="210">&#250;</l:l>
+      <l:l i="210">&#219;</l:l>
+      <l:l i="210">&#251;</l:l>
+      <l:l i="210">&#220;</l:l>
+      <l:l i="210">&#252;</l:l>
+      <l:l i="210">&#360;</l:l>
+      <l:l i="210">&#361;</l:l>
+      <l:l i="210">&#362;</l:l>
+      <l:l i="210">&#363;</l:l>
+      <l:l i="210">&#364;</l:l>
+      <l:l i="210">&#365;</l:l>
+      <l:l i="210">&#366;</l:l>
+      <l:l i="210">&#367;</l:l>
+      <l:l i="210">&#368;</l:l>
+      <l:l i="210">&#369;</l:l>
+      <l:l i="210">&#370;</l:l>
+      <l:l i="210">&#371;</l:l>
+      <l:l i="210">&#431;</l:l>
+      <l:l i="210">&#432;</l:l>
+      <l:l i="210">&#467;</l:l>
+      <l:l i="210">&#468;</l:l>
+      <l:l i="210">&#469;</l:l>
+      <l:l i="210">&#470;</l:l>
+      <l:l i="210">&#471;</l:l>
+      <l:l i="210">&#472;</l:l>
+      <l:l i="210">&#473;</l:l>
+      <l:l i="210">&#474;</l:l>
+      <l:l i="210">&#475;</l:l>
+      <l:l i="210">&#476;</l:l>
+      <l:l i="210">&#532;</l:l>
+      <l:l i="210">&#533;</l:l>
+      <l:l i="210">&#534;</l:l>
+      <l:l i="210">&#535;</l:l>
+      <l:l i="210">&#7794;</l:l>
+      <l:l i="210">&#7795;</l:l>
+      <l:l i="210">&#7796;</l:l>
+      <l:l i="210">&#7797;</l:l>
+      <l:l i="210">&#7798;</l:l>
+      <l:l i="210">&#7799;</l:l>
+      <l:l i="210">&#7800;</l:l>
+      <l:l i="210">&#7801;</l:l>
+      <l:l i="210">&#7802;</l:l>
+      <l:l i="210">&#7803;</l:l>
+      <l:l i="210">&#7908;</l:l>
+      <l:l i="210">&#7909;</l:l>
+      <l:l i="210">&#7910;</l:l>
+      <l:l i="210">&#7911;</l:l>
+      <l:l i="210">&#7912;</l:l>
+      <l:l i="210">&#7913;</l:l>
+      <l:l i="210">&#7914;</l:l>
+      <l:l i="210">&#7915;</l:l>
+      <l:l i="210">&#7916;</l:l>
+      <l:l i="210">&#7917;</l:l>
+      <l:l i="210">&#7918;</l:l>
+      <l:l i="210">&#7919;</l:l>
+      <l:l i="210">&#7920;</l:l>
+      <l:l i="210">&#7921;</l:l>
+      <l:l i="220">V</l:l>
+      <l:l i="220">v</l:l>
+      <l:l i="220">&#434;</l:l>
+      <l:l i="220">&#651;</l:l>
+      <l:l i="220">&#7804;</l:l>
+      <l:l i="220">&#7805;</l:l>
+      <l:l i="220">&#7806;</l:l>
+      <l:l i="220">&#7807;</l:l>
+      <l:l i="230">W</l:l>
+      <l:l i="230">w</l:l>
+      <l:l i="230">&#372;</l:l>
+      <l:l i="230">&#373;</l:l>
+      <l:l i="230">&#7808;</l:l>
+      <l:l i="230">&#7809;</l:l>
+      <l:l i="230">&#7810;</l:l>
+      <l:l i="230">&#7811;</l:l>
+      <l:l i="230">&#7812;</l:l>
+      <l:l i="230">&#7813;</l:l>
+      <l:l i="230">&#7814;</l:l>
+      <l:l i="230">&#7815;</l:l>
+      <l:l i="230">&#7816;</l:l>
+      <l:l i="230">&#7817;</l:l>
+      <l:l i="230">&#7832;</l:l>
+      <l:l i="240">X</l:l>
+      <l:l i="240">x</l:l>
+      <l:l i="240">&#7818;</l:l>
+      <l:l i="240">&#7819;</l:l>
+      <l:l i="240">&#7820;</l:l>
+      <l:l i="240">&#7821;</l:l>
+      <l:l i="250">Y</l:l>
+      <l:l i="250">y</l:l>
+      <l:l i="250">&#221;</l:l>
+      <l:l i="250">&#253;</l:l>
+      <l:l i="250">&#255;</l:l>
+      <l:l i="250">&#376;</l:l>
+      <l:l i="250">&#374;</l:l>
+      <l:l i="250">&#375;</l:l>
+      <l:l i="250">&#435;</l:l>
+      <l:l i="250">&#436;</l:l>
+      <l:l i="250">&#562;</l:l>
+      <l:l i="250">&#563;</l:l>
+      <l:l i="250">&#7822;</l:l>
+      <l:l i="250">&#7823;</l:l>
+      <l:l i="250">&#7833;</l:l>
+      <l:l i="250">&#7922;</l:l>
+      <l:l i="250">&#7923;</l:l>
+      <l:l i="250">&#7924;</l:l>
+      <l:l i="250">&#7925;</l:l>
+      <l:l i="250">&#7926;</l:l>
+      <l:l i="250">&#7927;</l:l>
+      <l:l i="250">&#7928;</l:l>
+      <l:l i="250">&#7929;</l:l>
+      <l:l i="260">Z</l:l>
+      <l:l i="260">z</l:l>
+      <l:l i="260">&#377;</l:l>
+      <l:l i="260">&#378;</l:l>
+      <l:l i="260">&#379;</l:l>
+      <l:l i="260">&#380;</l:l>
+      <l:l i="260">&#381;</l:l>
+      <l:l i="260">&#382;</l:l>
+      <l:l i="260">&#437;</l:l>
+      <l:l i="260">&#438;</l:l>
+      <l:l i="260">&#548;</l:l>
+      <l:l i="260">&#549;</l:l>
+      <l:l i="260">&#656;</l:l>
+      <l:l i="260">&#657;</l:l>
+      <l:l i="260">&#7824;</l:l>
+      <l:l i="260">&#7825;</l:l>
+      <l:l i="260">&#7826;</l:l>
+      <l:l i="260">&#7827;</l:l>
+      <l:l i="260">&#7828;</l:l>
+      <l:l i="260">&#7829;</l:l>
+   </l:letters>
+</l:l10n>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/sl.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/sl.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/sl.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1153 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="sl" english-language-name="Slovenian">
+
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+   <l:gentext key="Abstract" text="Povzetek"/>
+   <l:gentext key="abstract" text="Povzetek"/>
+   <l:gentext key="Answer" text="O:"/>
+   <l:gentext key="answer" text="O:"/>
+   <l:gentext key="Appendix" text="Dodatek"/>
+   <l:gentext key="appendix" text="dodatek"/>
+   <l:gentext key="Article" text="&#268;lanek"/>
+   <l:gentext key="article" text="&#268;lanek"/>
+   <l:gentext key="Bibliography" text="Literatura"/>
+   <l:gentext key="bibliography" text="Literatura"/>
+   <l:gentext key="Book" text="Knjiga"/>
+   <l:gentext key="book" text="Knjiga"/>
+   <l:gentext key="CAUTION" text="OPOZORILO"/>
+   <l:gentext key="Caution" text="Opozorilo"/>
+   <l:gentext key="caution" text="Opozorilo"/>
+   <l:gentext key="Chapter" text="Poglavje"/>
+   <l:gentext key="chapter" text="poglavje"/>
+   <l:gentext key="Colophon" text="Kolofon"/>
+   <l:gentext key="colophon" text="Kolofon"/>
+   <l:gentext key="Copyright" text="Pravna za&#353;&#269;ita"/>
+   <l:gentext key="copyright" text="Pravna za&#353;&#269;ita"/>
+   <l:gentext key="Dedication" text="Posvetilo"/>
+   <l:gentext key="dedication" text="Posvetilo"/>
+   <l:gentext key="Edition" text="Izdaja"/>
+   <l:gentext key="edition" text="Izdaja"/>
+   <l:gentext key="Equation" text="Ena&#269;ba"/>
+   <l:gentext key="equation" text="Ena&#269;ba"/>
+   <l:gentext key="Example" text="Primer"/>
+   <l:gentext key="example" text="Primer"/>
+   <l:gentext key="Figure" text="Slika"/>
+   <l:gentext key="figure" text="Slika"/>
+   <l:gentext key="Glossary" text="Slovar&#269;ek"/>
+   <l:gentext key="glossary" text="Slovar&#269;ek"/>
+   <l:gentext key="GlossSee" text="glej"/>
+   <l:gentext key="glosssee" text="glej"/>
+   <l:gentext key="GlossSeeAlso" text="glej tudi"/>
+   <l:gentext key="glossseealso" text="glej tudi"/>
+   <l:gentext key="IMPORTANT" text="POMEMBNO"/>
+   <l:gentext key="important" text="Pomembno"/>
+   <l:gentext key="Important" text="Pomembno"/>
+   <l:gentext key="Index" text="Stvarno kazalo"/>
+   <l:gentext key="index" text="Stvarno kazalo"/>
+   <l:gentext key="ISBN" text="ISBN"/>
+   <l:gentext key="isbn" text="ISBN"/>
+   <l:gentext key="LegalNotice" text="Pravno sporo&#269;ilo"/>
+   <l:gentext key="legalnotice" text="Pravno sporo&#269;ilo"/>
+   <l:gentext key="MsgAud" text="Ob&#269;instvo"/>
+   <l:gentext key="msgaud" text="Ob&#269;instvo"/>
+   <l:gentext key="MsgLevel" text="Raven"/>
+   <l:gentext key="msglevel" text="Raven"/>
+   <l:gentext key="MsgOrig" text="Izvor"/>
+   <l:gentext key="msgorig" text="Izvor"/>
+   <l:gentext key="NOTE" text="OPOMBA"/>
+   <l:gentext key="Note" text="Opomba"/>
+   <l:gentext key="note" text="Opomba"/>
+   <l:gentext key="Part" text="Del"/>
+   <l:gentext key="part" text="Del"/>
+   <l:gentext key="Preface" text="Predgovor"/>
+   <l:gentext key="preface" text="Predgovor"/>
+   <l:gentext key="Procedure" text="Postopek"/>
+   <l:gentext key="procedure" text="Postopek"/>
+   <l:gentext key="ProductionSet" text="Izdelava"/>
+   <l:gentext key="PubDate" text="Publication Date" lang="en"/>
+   <l:gentext key="pubdate" text="Publication date" lang="en"/>
+   <l:gentext key="Published" text="Izdano"/>
+   <l:gentext key="published" text="Izdano"/>
+   <l:gentext key="Qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="Question" text="V:"/>
+   <l:gentext key="question" text="V:"/>
+   <l:gentext key="RefEntry" text=""/>
+   <l:gentext key="refentry" text=""/>
+   <l:gentext key="Reference" text="Sklic"/>
+   <l:gentext key="reference" text="Sklic"/>
+   <l:gentext key="RefName" text="Ime"/>
+   <l:gentext key="refname" text="Ime"/>
+   <l:gentext key="RefSection" text=""/>
+   <l:gentext key="refsection" text=""/>
+   <l:gentext key="RefSynopsisDiv" text="Sinopsis"/>
+   <l:gentext key="refsynopsisdiv" text="Sinopsis"/>
+   <l:gentext key="RevHistory" text="Zgodovina razli&#269;ic"/>
+   <l:gentext key="revhistory" text="Zgodovina razli&#269;ic"/>
+   <l:gentext key="revision" text="Razli&#269;ica"/>
+   <l:gentext key="Revision" text="Razli&#269;ica"/>
+   <l:gentext key="sect1" text="Razdelek"/>
+   <l:gentext key="sect2" text="Razdelek"/>
+   <l:gentext key="sect3" text="Razdelek"/>
+   <l:gentext key="sect4" text="Razdelek"/>
+   <l:gentext key="sect5" text="Razdelek"/>
+   <l:gentext key="section" text="razdelek"/>
+   <l:gentext key="Section" text="Razdelek"/>
+   <l:gentext key="see" text="glej"/>
+   <l:gentext key="See" text="glej"/>
+   <l:gentext key="seealso" text="glej tudi"/>
+   <l:gentext key="Seealso" text="Glej tudi"/>
+   <l:gentext key="SeeAlso" text="glej tudi"/>
+   <l:gentext key="set" text="Postavi"/>
+   <l:gentext key="Set" text="Postavi"/>
+   <l:gentext key="setindex" text="Postavi stvarno kazalo"/>
+   <l:gentext key="SetIndex" text="Postavi stvarno kazalo"/>
+   <l:gentext key="Sidebar" text=""/>
+   <l:gentext key="sidebar" text="sidebar"/>
+   <l:gentext key="step" text="korak"/>
+   <l:gentext key="Step" text="Korak"/>
+   <l:gentext key="Table" text="Tabela"/>
+   <l:gentext key="table" text="Tabela"/>
+   <l:gentext key="tip" text="Namig"/>
+   <l:gentext key="TIP" text="NAMIG"/>
+   <l:gentext key="Tip" text="Namig"/>
+   <l:gentext key="Warning" text="Pozor"/>
+   <l:gentext key="warning" text="Pozor"/>
+   <l:gentext key="WARNING" text="POZOR"/>
+   <l:gentext key="and" text="in"/>
+   <l:gentext key="by" text="od"/>
+   <l:gentext key="called" text="called" lang="en"/>
+   <l:gentext key="Edited" text="Urejeno"/>
+   <l:gentext key="edited" text="Urejeno"/>
+   <l:gentext key="Editedby" text="Uredil"/>
+   <l:gentext key="editedby" text="Uredil"/>
+   <l:gentext key="in" text="v"/>
+   <l:gentext key="lastlistcomma" text=","/>
+   <l:gentext key="listcomma" text=","/>
+   <l:gentext key="nonexistantelement" text="neobstoje&#269;i element"/>
+   <l:gentext key="notes" text="Notes"/>
+   <l:gentext key="Notes" text="Notes"/>
+   <l:gentext key="Pgs" text="Str."/>
+   <l:gentext key="pgs" text="Str."/>
+   <l:gentext key="Revisedby" text="Pregledal: "/>
+   <l:gentext key="revisedby" text="Pregledal: "/>
+   <l:gentext key="TableNotes" text="Notes"/>
+   <l:gentext key="tablenotes" text="Notes"/>
+   <l:gentext key="TableofContents" text="Kazalo"/>
+   <l:gentext key="tableofcontents" text="Kazalo"/>
+   <l:gentext key="the" text="" lang="en"/>
+   <l:gentext key="unexpectedelementname" text="Nepri&#269;akovano ime elementa"/>
+   <l:gentext key="unsupported" text="nepodprto"/>
+   <l:gentext key="xrefto" text="xref na"/>
+   <l:gentext key="listofequations" text="Seznam ena&#269;b"/>
+   <l:gentext key="ListofEquations" text="Seznam ena&#269;b"/>
+   <l:gentext key="ListofExamples" text="Seznam primerov"/>
+   <l:gentext key="listofexamples" text="Seznam primerov"/>
+   <l:gentext key="ListofFigures" text="Seznam slik"/>
+   <l:gentext key="listoffigures" text="Seznam slik"/>
+   <l:gentext key="ListofProcedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listofprocedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listoftables" text="Seznam tabel"/>
+   <l:gentext key="ListofTables" text="Seznam tabel"/>
+   <l:gentext key="ListofUnknown" text="Seznam neznanih stvari"/>
+   <l:gentext key="listofunknown" text="Seznam neznanih stvari"/>
+   <l:gentext key="nav-home" text="Domov"/>
+   <l:gentext key="nav-next" text="Naprej"/>
+   <l:gentext key="nav-next-sibling" text="Hitro naprej"/>
+   <l:gentext key="nav-prev" text="Nazaj"/>
+   <l:gentext key="nav-prev-sibling" text="Hitro nazaj"/>
+   <l:gentext key="nav-up" text="Gor"/>
+   <l:gentext key="nav-toc" text="ToC" lang="en"/>
+   <l:gentext key="Draft" text="Draft"/>
+   <l:gentext key="above" text="above"/>
+   <l:gentext key="below" text="below"/>
+   <l:gentext key="sectioncalled" text="razdelek, imenovan"/>
+   <l:gentext key="index symbols" text="Simboli"/>
+   <l:gentext key="lowercase.alpha" text="abc&#269;defghijklmnopqrs&#353;tuvwxyz&#382;"/>
+   <l:gentext key="uppercase.alpha" text="ABC&#268;DEFGHIJKLMNOPQRS&#352;TUVWXYZ&#381;"/>
+   <l:dingbat key="startquote" text="&#8220;"/>
+   <l:dingbat key="endquote" text="&#8221;"/>
+   <l:dingbat key="nestedstartquote" text="&#8216;"/>
+   <l:dingbat key="nestedendquote" text="&#8217;"/>
+   <l:dingbat key="singlestartquote" text="&#8216;" lang="en"/>
+   <l:dingbat key="singleendquote" text="&#8217;" lang="en"/>
+   <l:dingbat key="bullet" text="&#8226;"/>
+   <l:gentext key="hyphenation-character" text="-" lang="en"/>
+   <l:gentext key="hyphenation-push-character-count" text="2" lang="en"/>
+   <l:gentext key="hyphenation-remain-character-count" text="2" lang="en"/>
+
+   <l:context name="styles">
+      <l:template name="person-name" text="first-last"/>
+   </l:context>
+
+   <l:context name="title">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="%t"/>
+      <l:template name="appendix" text="Dodatek %n. %t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="biblioentry" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliolist" text="%t" lang="en"/>
+      <l:template name="bibliomixed" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="Poglavje %n. %t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="Ena&#269;ba %n. %t"/>
+      <l:template name="example" text="Primer %n. %t"/>
+      <l:template name="figure" text="Slika %n. %t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="glosslist" text="%t" lang="en"/>
+      <l:template name="glossentry" text="%t" lang="en"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text=""/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="Del %n. %t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="procedure.formal" text="Postopek %n. %t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="productionset.formal" text="Izdelava %n"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="%t"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="%t"/>
+      <l:template name="refentry" text="%t"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsection" text="%t"/>
+      <l:template name="refsect1" text="%t"/>
+      <l:template name="refsect2" text="%t"/>
+      <l:template name="refsect3" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="refsynopsisdivinfo" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="step" text="%t"/>
+      <l:template name="table" text="Tabela %n. %t"/>
+      <l:template name="task" text="%t" lang="en"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text=""/>
+      <l:template name="warning" text="%t"/>
+   </l:context>
+
+   <l:context name="title-unnumbered">
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article/appendix" text="%t" lang="en"/>
+      <l:template name="bridgehead" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="sect1" text="%t"/>
+      <l:template name="sect2" text="%t"/>
+      <l:template name="sect3" text="%t"/>
+      <l:template name="sect4" text="%t"/>
+      <l:template name="sect5" text="%t"/>
+      <l:template name="section" text="%t"/>
+      <l:template name="simplesect" text="%t"/>
+   </l:context>
+
+   <l:context name="title-numbered">
+      <l:template name="appendix" text="Dodatek %n. %t"/>
+      <l:template name="article/appendix" text="%n.&#160;%t" lang="en"/>
+      <l:template name="bridgehead" text="%t"/>
+      <l:template name="chapter" text="Poglavje %n. %t"/>
+      <l:template name="sect1" text="%n. %t"/>
+      <l:template name="sect2" text="%n. %t"/>
+      <l:template name="sect3" text="%n. %t"/>
+      <l:template name="sect4" text="%n. %t"/>
+      <l:template name="sect5" text="%n. %t"/>
+      <l:template name="section" text="%n. %t"/>
+      <l:template name="simplesect" text="%n. %t"/>
+   </l:context>
+
+   <l:context name="subtitle">
+      <l:template name="appendix" text="%s"/>
+      <l:template name="article" text="%s"/>
+      <l:template name="bibliodiv" text="%s"/>
+      <l:template name="biblioentry" text="%s"/>
+      <l:template name="bibliography" text="%s"/>
+      <l:template name="bibliomixed" text="%s"/>
+      <l:template name="bibliomset" text="%s"/>
+      <l:template name="biblioset" text="%s"/>
+      <l:template name="book" text="%s"/>
+      <l:template name="chapter" text="%s"/>
+      <l:template name="colophon" text="%s"/>
+      <l:template name="dedication" text="%s"/>
+      <l:template name="glossary" text="%s"/>
+      <l:template name="glossdiv" text="%s"/>
+      <l:template name="index" text="%s"/>
+      <l:template name="indexdiv" text="%s"/>
+      <l:template name="lot" text="%s"/>
+      <l:template name="part" text="%s"/>
+      <l:template name="partintro" text="%s"/>
+      <l:template name="preface" text="%s"/>
+      <l:template name="refentry" text="%s"/>
+      <l:template name="reference" text="%s"/>
+      <l:template name="refsection" text="%s"/>
+      <l:template name="refsect1" text="%s"/>
+      <l:template name="refsect2" text="%s"/>
+      <l:template name="refsect3" text="%s"/>
+      <l:template name="refsynopsisdiv" text="%s"/>
+      <l:template name="sect1" text="%s"/>
+      <l:template name="sect2" text="%s"/>
+      <l:template name="sect3" text="%s"/>
+      <l:template name="sect4" text="%s"/>
+      <l:template name="sect5" text="%s"/>
+      <l:template name="section" text="%s"/>
+      <l:template name="set" text="%s"/>
+      <l:template name="setindex" text="%s"/>
+      <l:template name="sidebar" text="%s"/>
+      <l:template name="simplesect" text="%s"/>
+      <l:template name="toc" text="%s"/>
+   </l:context>
+
+   <l:context name="xref">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="O:&#160;%n"/>
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="constraintdef" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="%t"/>
+      <l:template name="example" text="%t"/>
+      <l:template name="figure" text="%t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text="%n"/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="%t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="V:&#160;%n"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="V:&#160;%n"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="table" text="%t"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="%n"/>
+      <l:template name="warning" text="%t"/>
+      <l:template name="page.citation" text=" [%p]"/>
+      <l:template name="page" text="(page %p)" lang="en"/>
+      <l:template name="pageabbrev" text="(p. %p)" lang="en"/>
+      <l:template name="Page" text="Page %p" lang="en"/>
+      <l:template name="bridgehead" text="&#8220;%t&#8221;"/>
+      <l:template name="refsection" text="&#8220;%t&#8221;"/>
+      <l:template name="refsect1" text="&#8220;%t&#8221;"/>
+      <l:template name="refsect2" text="&#8220;%t&#8221;"/>
+      <l:template name="refsect3" text="&#8220;%t&#8221;"/>
+      <l:template name="sect1" text="&#8220;%t&#8221;"/>
+      <l:template name="sect2" text="&#8220;%t&#8221;"/>
+      <l:template name="sect3" text="&#8220;%t&#8221;"/>
+      <l:template name="sect4" text="&#8220;%t&#8221;"/>
+      <l:template name="sect5" text="&#8220;%t&#8221;"/>
+      <l:template name="section" text="&#8220;%t&#8221;"/>
+      <l:template name="simplesect" text="&#8220;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="xref-number">
+      <l:template name="answer" text="O:&#160;%n"/>
+      <l:template name="appendix" text="Dodatek&#160;%n"/>
+      <l:template name="bridgehead" text="Razdelek&#160;%n"/>
+      <l:template name="chapter" text="Poglavje&#160;%n"/>
+      <l:template name="equation" text="Ena&#269;ba&#160;%n"/>
+      <l:template name="example" text="Primer&#160;%n"/>
+      <l:template name="figure" text="Slika&#160;%n"/>
+      <l:template name="part" text="Del&#160;%n"/>
+      <l:template name="procedure" text="Postopek&#160;%n"/>
+      <l:template name="productionset" text="Izdelava&#160;%n"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n"/>
+      <l:template name="qandaentry" text="V:&#160;%n"/>
+      <l:template name="question" text="V:&#160;%n"/>
+      <l:template name="sect1" text="Razdelek&#160;%n"/>
+      <l:template name="sect2" text="Razdelek&#160;%n"/>
+      <l:template name="sect3" text="Razdelek&#160;%n"/>
+      <l:template name="sect4" text="Razdelek&#160;%n"/>
+      <l:template name="sect5" text="Razdelek&#160;%n"/>
+      <l:template name="section" text="Razdelek&#160;%n"/>
+      <l:template name="table" text="Tabela&#160;%n"/>
+   </l:context>
+
+   <l:context name="xref-number-and-title">
+      <l:template name="appendix" text="Dodatek&#160;%n, %t"/>
+      <l:template name="bridgehead" text="Razdelek&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="chapter" text="Poglavje&#160;%n, %t"/>
+      <l:template name="equation" text="Ena&#269;ba&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="example" text="Primer&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="figure" text="Slika&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="part" text="Del&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="procedure" text="Postopek&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="productionset" text="Izdelava&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="refsect1" text="razdelek, imenovan &#8220;%t&#8221;"/>
+      <l:template name="refsect2" text="razdelek, imenovan &#8220;%t&#8221;"/>
+      <l:template name="refsect3" text="razdelek, imenovan &#8220;%t&#8221;"/>
+      <l:template name="refsection" text="razdelek, imenovan &#8220;%t&#8221;"/>
+      <l:template name="sect1" text="Razdelek&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect2" text="Razdelek&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect3" text="Razdelek&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect4" text="Razdelek&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect5" text="Razdelek&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="section" text="Razdelek&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="simplesect" text="razdelek, imenovan &#8220;%t&#8221;"/>
+      <l:template name="table" text="Tabela&#160;%n, &#8220;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="authorgroup">
+      <l:template name="sep" text=", "/>
+      <l:template name="sep2" text=" in "/>
+      <l:template name="seplast" text=", in "/>
+   </l:context>
+
+   <l:context name="glossary">
+      <l:template name="see" text="glej "/>
+      <l:template name="seealso" text="glej tudi "/>
+   </l:context>
+
+   <l:context name="msgset">
+      <l:template name="MsgAud" text="Ob&#269;instvo: "/>
+      <l:template name="MsgLevel" text="Raven: "/>
+      <l:template name="MsgOrig" text="Izvor: "/>
+   </l:context>
+
+   <l:context name="datetime">
+      <l:template name="format" text="m/d/Y" lang="en"/>
+   </l:context>
+
+   <l:context name="datetime-full">
+      <l:template name="January" text="January" lang="en"/>
+      <l:template name="February" text="February" lang="en"/>
+      <l:template name="March" text="March" lang="en"/>
+      <l:template name="April" text="April" lang="en"/>
+      <l:template name="May" text="May" lang="en"/>
+      <l:template name="June" text="June" lang="en"/>
+      <l:template name="July" text="July" lang="en"/>
+      <l:template name="August" text="August" lang="en"/>
+      <l:template name="September" text="September" lang="en"/>
+      <l:template name="October" text="October" lang="en"/>
+      <l:template name="November" text="November" lang="en"/>
+      <l:template name="December" text="December" lang="en"/>
+      <l:template name="Monday" text="Monday" lang="en"/>
+      <l:template name="Tuesday" text="Tuesday" lang="en"/>
+      <l:template name="Wednesday" text="Wednesday" lang="en"/>
+      <l:template name="Thursday" text="Thursday" lang="en"/>
+      <l:template name="Friday" text="Friday" lang="en"/>
+      <l:template name="Saturday" text="Saturday" lang="en"/>
+      <l:template name="Sunday" text="Sunday" lang="en"/>
+   </l:context>
+
+   <l:context name="datetime-abbrev">
+      <l:template name="Jan" text="Jan" lang="en"/>
+      <l:template name="Feb" text="Feb" lang="en"/>
+      <l:template name="Mar" text="Mar" lang="en"/>
+      <l:template name="Apr" text="Apr" lang="en"/>
+      <l:template name="May" text="May" lang="en"/>
+      <l:template name="Jun" text="Jun" lang="en"/>
+      <l:template name="Jul" text="Jul" lang="en"/>
+      <l:template name="Aug" text="Aug" lang="en"/>
+      <l:template name="Sep" text="Sep" lang="en"/>
+      <l:template name="Oct" text="Oct" lang="en"/>
+      <l:template name="Nov" text="Nov" lang="en"/>
+      <l:template name="Dec" text="Dec" lang="en"/>
+      <l:template name="Mon" text="Mon" lang="en"/>
+      <l:template name="Tue" text="Tue" lang="en"/>
+      <l:template name="Wed" text="Wed" lang="en"/>
+      <l:template name="Thu" text="Thu" lang="en"/>
+      <l:template name="Fri" text="Fri" lang="en"/>
+      <l:template name="Sat" text="Sat" lang="en"/>
+      <l:template name="Sun" text="Sun" lang="en"/>
+   </l:context>
+
+   <l:context name="htmlhelp">
+      <l:template name="langcode" text="0x0424 Slovenian"/>
+   </l:context>
+
+   <l:letters lang="en">
+      <l:l i="-1"/>
+      <l:l i="0">Symbols</l:l>
+      <l:l i="10">A</l:l>
+      <l:l i="10">a</l:l>
+      <l:l i="10">&#192;</l:l>
+      <l:l i="10">&#224;</l:l>
+      <l:l i="10">&#193;</l:l>
+      <l:l i="10">&#225;</l:l>
+      <l:l i="10">&#194;</l:l>
+      <l:l i="10">&#226;</l:l>
+      <l:l i="10">&#195;</l:l>
+      <l:l i="10">&#227;</l:l>
+      <l:l i="10">&#196;</l:l>
+      <l:l i="10">&#228;</l:l>
+      <l:l i="10">&#197;</l:l>
+      <l:l i="10">&#229;</l:l>
+      <l:l i="10">&#256;</l:l>
+      <l:l i="10">&#257;</l:l>
+      <l:l i="10">&#258;</l:l>
+      <l:l i="10">&#259;</l:l>
+      <l:l i="10">&#260;</l:l>
+      <l:l i="10">&#261;</l:l>
+      <l:l i="10">&#461;</l:l>
+      <l:l i="10">&#462;</l:l>
+      <l:l i="10">&#478;</l:l>
+      <l:l i="10">&#479;</l:l>
+      <l:l i="10">&#480;</l:l>
+      <l:l i="10">&#481;</l:l>
+      <l:l i="10">&#506;</l:l>
+      <l:l i="10">&#507;</l:l>
+      <l:l i="10">&#512;</l:l>
+      <l:l i="10">&#513;</l:l>
+      <l:l i="10">&#514;</l:l>
+      <l:l i="10">&#515;</l:l>
+      <l:l i="10">&#550;</l:l>
+      <l:l i="10">&#551;</l:l>
+      <l:l i="10">&#7680;</l:l>
+      <l:l i="10">&#7681;</l:l>
+      <l:l i="10">&#7834;</l:l>
+      <l:l i="10">&#7840;</l:l>
+      <l:l i="10">&#7841;</l:l>
+      <l:l i="10">&#7842;</l:l>
+      <l:l i="10">&#7843;</l:l>
+      <l:l i="10">&#7844;</l:l>
+      <l:l i="10">&#7845;</l:l>
+      <l:l i="10">&#7846;</l:l>
+      <l:l i="10">&#7847;</l:l>
+      <l:l i="10">&#7848;</l:l>
+      <l:l i="10">&#7849;</l:l>
+      <l:l i="10">&#7850;</l:l>
+      <l:l i="10">&#7851;</l:l>
+      <l:l i="10">&#7852;</l:l>
+      <l:l i="10">&#7853;</l:l>
+      <l:l i="10">&#7854;</l:l>
+      <l:l i="10">&#7855;</l:l>
+      <l:l i="10">&#7856;</l:l>
+      <l:l i="10">&#7857;</l:l>
+      <l:l i="10">&#7858;</l:l>
+      <l:l i="10">&#7859;</l:l>
+      <l:l i="10">&#7860;</l:l>
+      <l:l i="10">&#7861;</l:l>
+      <l:l i="10">&#7862;</l:l>
+      <l:l i="10">&#7863;</l:l>
+      <l:l i="20">B</l:l>
+      <l:l i="20">b</l:l>
+      <l:l i="20">&#384;</l:l>
+      <l:l i="20">&#385;</l:l>
+      <l:l i="20">&#595;</l:l>
+      <l:l i="20">&#386;</l:l>
+      <l:l i="20">&#387;</l:l>
+      <l:l i="20">&#7682;</l:l>
+      <l:l i="20">&#7683;</l:l>
+      <l:l i="20">&#7684;</l:l>
+      <l:l i="20">&#7685;</l:l>
+      <l:l i="20">&#7686;</l:l>
+      <l:l i="20">&#7687;</l:l>
+      <l:l i="30">C</l:l>
+      <l:l i="30">c</l:l>
+      <l:l i="30">&#199;</l:l>
+      <l:l i="30">&#231;</l:l>
+      <l:l i="30">&#262;</l:l>
+      <l:l i="30">&#263;</l:l>
+      <l:l i="30">&#264;</l:l>
+      <l:l i="30">&#265;</l:l>
+      <l:l i="30">&#266;</l:l>
+      <l:l i="30">&#267;</l:l>
+      <l:l i="30">&#268;</l:l>
+      <l:l i="30">&#269;</l:l>
+      <l:l i="30">&#391;</l:l>
+      <l:l i="30">&#392;</l:l>
+      <l:l i="30">&#597;</l:l>
+      <l:l i="30">&#7688;</l:l>
+      <l:l i="30">&#7689;</l:l>
+      <l:l i="40">D</l:l>
+      <l:l i="40">d</l:l>
+      <l:l i="40">&#270;</l:l>
+      <l:l i="40">&#271;</l:l>
+      <l:l i="40">&#272;</l:l>
+      <l:l i="40">&#273;</l:l>
+      <l:l i="40">&#394;</l:l>
+      <l:l i="40">&#599;</l:l>
+      <l:l i="40">&#395;</l:l>
+      <l:l i="40">&#396;</l:l>
+      <l:l i="40">&#453;</l:l>
+      <l:l i="40">&#498;</l:l>
+      <l:l i="40">&#545;</l:l>
+      <l:l i="40">&#598;</l:l>
+      <l:l i="40">&#7690;</l:l>
+      <l:l i="40">&#7691;</l:l>
+      <l:l i="40">&#7692;</l:l>
+      <l:l i="40">&#7693;</l:l>
+      <l:l i="40">&#7694;</l:l>
+      <l:l i="40">&#7695;</l:l>
+      <l:l i="40">&#7696;</l:l>
+      <l:l i="40">&#7697;</l:l>
+      <l:l i="40">&#7698;</l:l>
+      <l:l i="40">&#7699;</l:l>
+      <l:l i="50">E</l:l>
+      <l:l i="50">e</l:l>
+      <l:l i="50">&#200;</l:l>
+      <l:l i="50">&#232;</l:l>
+      <l:l i="50">&#201;</l:l>
+      <l:l i="50">&#233;</l:l>
+      <l:l i="50">&#202;</l:l>
+      <l:l i="50">&#234;</l:l>
+      <l:l i="50">&#203;</l:l>
+      <l:l i="50">&#235;</l:l>
+      <l:l i="50">&#274;</l:l>
+      <l:l i="50">&#275;</l:l>
+      <l:l i="50">&#276;</l:l>
+      <l:l i="50">&#277;</l:l>
+      <l:l i="50">&#278;</l:l>
+      <l:l i="50">&#279;</l:l>
+      <l:l i="50">&#280;</l:l>
+      <l:l i="50">&#281;</l:l>
+      <l:l i="50">&#282;</l:l>
+      <l:l i="50">&#283;</l:l>
+      <l:l i="50">&#516;</l:l>
+      <l:l i="50">&#517;</l:l>
+      <l:l i="50">&#518;</l:l>
+      <l:l i="50">&#519;</l:l>
+      <l:l i="50">&#552;</l:l>
+      <l:l i="50">&#553;</l:l>
+      <l:l i="50">&#7700;</l:l>
+      <l:l i="50">&#7701;</l:l>
+      <l:l i="50">&#7702;</l:l>
+      <l:l i="50">&#7703;</l:l>
+      <l:l i="50">&#7704;</l:l>
+      <l:l i="50">&#7705;</l:l>
+      <l:l i="50">&#7706;</l:l>
+      <l:l i="50">&#7707;</l:l>
+      <l:l i="50">&#7708;</l:l>
+      <l:l i="50">&#7709;</l:l>
+      <l:l i="50">&#7864;</l:l>
+      <l:l i="50">&#7865;</l:l>
+      <l:l i="50">&#7866;</l:l>
+      <l:l i="50">&#7867;</l:l>
+      <l:l i="50">&#7868;</l:l>
+      <l:l i="50">&#7869;</l:l>
+      <l:l i="50">&#7870;</l:l>
+      <l:l i="50">&#7871;</l:l>
+      <l:l i="50">&#7872;</l:l>
+      <l:l i="50">&#7873;</l:l>
+      <l:l i="50">&#7874;</l:l>
+      <l:l i="50">&#7875;</l:l>
+      <l:l i="50">&#7876;</l:l>
+      <l:l i="50">&#7877;</l:l>
+      <l:l i="50">&#7878;</l:l>
+      <l:l i="50">&#7879;</l:l>
+      <l:l i="60">F</l:l>
+      <l:l i="60">f</l:l>
+      <l:l i="60">&#401;</l:l>
+      <l:l i="60">&#402;</l:l>
+      <l:l i="60">&#7710;</l:l>
+      <l:l i="60">&#7711;</l:l>
+      <l:l i="70">G</l:l>
+      <l:l i="70">g</l:l>
+      <l:l i="70">&#284;</l:l>
+      <l:l i="70">&#285;</l:l>
+      <l:l i="70">&#286;</l:l>
+      <l:l i="70">&#287;</l:l>
+      <l:l i="70">&#288;</l:l>
+      <l:l i="70">&#289;</l:l>
+      <l:l i="70">&#290;</l:l>
+      <l:l i="70">&#291;</l:l>
+      <l:l i="70">&#403;</l:l>
+      <l:l i="70">&#608;</l:l>
+      <l:l i="70">&#484;</l:l>
+      <l:l i="70">&#485;</l:l>
+      <l:l i="70">&#486;</l:l>
+      <l:l i="70">&#487;</l:l>
+      <l:l i="70">&#500;</l:l>
+      <l:l i="70">&#501;</l:l>
+      <l:l i="70">&#7712;</l:l>
+      <l:l i="70">&#7713;</l:l>
+      <l:l i="80">H</l:l>
+      <l:l i="80">h</l:l>
+      <l:l i="80">&#292;</l:l>
+      <l:l i="80">&#293;</l:l>
+      <l:l i="80">&#294;</l:l>
+      <l:l i="80">&#295;</l:l>
+      <l:l i="80">&#542;</l:l>
+      <l:l i="80">&#543;</l:l>
+      <l:l i="80">&#614;</l:l>
+      <l:l i="80">&#7714;</l:l>
+      <l:l i="80">&#7715;</l:l>
+      <l:l i="80">&#7716;</l:l>
+      <l:l i="80">&#7717;</l:l>
+      <l:l i="80">&#7718;</l:l>
+      <l:l i="80">&#7719;</l:l>
+      <l:l i="80">&#7720;</l:l>
+      <l:l i="80">&#7721;</l:l>
+      <l:l i="80">&#7722;</l:l>
+      <l:l i="80">&#7723;</l:l>
+      <l:l i="80">&#7830;</l:l>
+      <l:l i="90">I</l:l>
+      <l:l i="90">i</l:l>
+      <l:l i="90">&#204;</l:l>
+      <l:l i="90">&#236;</l:l>
+      <l:l i="90">&#205;</l:l>
+      <l:l i="90">&#237;</l:l>
+      <l:l i="90">&#206;</l:l>
+      <l:l i="90">&#238;</l:l>
+      <l:l i="90">&#207;</l:l>
+      <l:l i="90">&#239;</l:l>
+      <l:l i="90">&#296;</l:l>
+      <l:l i="90">&#297;</l:l>
+      <l:l i="90">&#298;</l:l>
+      <l:l i="90">&#299;</l:l>
+      <l:l i="90">&#300;</l:l>
+      <l:l i="90">&#301;</l:l>
+      <l:l i="90">&#302;</l:l>
+      <l:l i="90">&#303;</l:l>
+      <l:l i="90">&#304;</l:l>
+      <l:l i="90">&#407;</l:l>
+      <l:l i="90">&#616;</l:l>
+      <l:l i="90">&#463;</l:l>
+      <l:l i="90">&#464;</l:l>
+      <l:l i="90">&#520;</l:l>
+      <l:l i="90">&#521;</l:l>
+      <l:l i="90">&#522;</l:l>
+      <l:l i="90">&#523;</l:l>
+      <l:l i="90">&#7724;</l:l>
+      <l:l i="90">&#7725;</l:l>
+      <l:l i="90">&#7726;</l:l>
+      <l:l i="90">&#7727;</l:l>
+      <l:l i="90">&#7880;</l:l>
+      <l:l i="90">&#7881;</l:l>
+      <l:l i="90">&#7882;</l:l>
+      <l:l i="90">&#7883;</l:l>
+      <l:l i="100">J</l:l>
+      <l:l i="100">j</l:l>
+      <l:l i="100">&#308;</l:l>
+      <l:l i="100">&#309;</l:l>
+      <l:l i="100">&#496;</l:l>
+      <l:l i="100">&#669;</l:l>
+      <l:l i="110">K</l:l>
+      <l:l i="110">k</l:l>
+      <l:l i="110">&#310;</l:l>
+      <l:l i="110">&#311;</l:l>
+      <l:l i="110">&#408;</l:l>
+      <l:l i="110">&#409;</l:l>
+      <l:l i="110">&#488;</l:l>
+      <l:l i="110">&#489;</l:l>
+      <l:l i="110">&#7728;</l:l>
+      <l:l i="110">&#7729;</l:l>
+      <l:l i="110">&#7730;</l:l>
+      <l:l i="110">&#7731;</l:l>
+      <l:l i="110">&#7732;</l:l>
+      <l:l i="110">&#7733;</l:l>
+      <l:l i="120">L</l:l>
+      <l:l i="120">l</l:l>
+      <l:l i="120">&#313;</l:l>
+      <l:l i="120">&#314;</l:l>
+      <l:l i="120">&#315;</l:l>
+      <l:l i="120">&#316;</l:l>
+      <l:l i="120">&#317;</l:l>
+      <l:l i="120">&#318;</l:l>
+      <l:l i="120">&#319;</l:l>
+      <l:l i="120">&#320;</l:l>
+      <l:l i="120">&#321;</l:l>
+      <l:l i="120">&#322;</l:l>
+      <l:l i="120">&#410;</l:l>
+      <l:l i="120">&#456;</l:l>
+      <l:l i="120">&#564;</l:l>
+      <l:l i="120">&#619;</l:l>
+      <l:l i="120">&#620;</l:l>
+      <l:l i="120">&#621;</l:l>
+      <l:l i="120">&#7734;</l:l>
+      <l:l i="120">&#7735;</l:l>
+      <l:l i="120">&#7736;</l:l>
+      <l:l i="120">&#7737;</l:l>
+      <l:l i="120">&#7738;</l:l>
+      <l:l i="120">&#7739;</l:l>
+      <l:l i="120">&#7740;</l:l>
+      <l:l i="120">&#7741;</l:l>
+      <l:l i="130">M</l:l>
+      <l:l i="130">m</l:l>
+      <l:l i="130">&#625;</l:l>
+      <l:l i="130">&#7742;</l:l>
+      <l:l i="130">&#7743;</l:l>
+      <l:l i="130">&#7744;</l:l>
+      <l:l i="130">&#7745;</l:l>
+      <l:l i="130">&#7746;</l:l>
+      <l:l i="130">&#7747;</l:l>
+      <l:l i="140">N</l:l>
+      <l:l i="140">n</l:l>
+      <l:l i="140">&#209;</l:l>
+      <l:l i="140">&#241;</l:l>
+      <l:l i="140">&#323;</l:l>
+      <l:l i="140">&#324;</l:l>
+      <l:l i="140">&#325;</l:l>
+      <l:l i="140">&#326;</l:l>
+      <l:l i="140">&#327;</l:l>
+      <l:l i="140">&#328;</l:l>
+      <l:l i="140">&#413;</l:l>
+      <l:l i="140">&#626;</l:l>
+      <l:l i="140">&#414;</l:l>
+      <l:l i="140">&#544;</l:l>
+      <l:l i="140">&#459;</l:l>
+      <l:l i="140">&#504;</l:l>
+      <l:l i="140">&#505;</l:l>
+      <l:l i="140">&#565;</l:l>
+      <l:l i="140">&#627;</l:l>
+      <l:l i="140">&#7748;</l:l>
+      <l:l i="140">&#7749;</l:l>
+      <l:l i="140">&#7750;</l:l>
+      <l:l i="140">&#7751;</l:l>
+      <l:l i="140">&#7752;</l:l>
+      <l:l i="140">&#7753;</l:l>
+      <l:l i="140">&#7754;</l:l>
+      <l:l i="140">&#7755;</l:l>
+      <l:l i="150">O</l:l>
+      <l:l i="150">o</l:l>
+      <l:l i="150">&#210;</l:l>
+      <l:l i="150">&#242;</l:l>
+      <l:l i="150">&#211;</l:l>
+      <l:l i="150">&#243;</l:l>
+      <l:l i="150">&#212;</l:l>
+      <l:l i="150">&#244;</l:l>
+      <l:l i="150">&#213;</l:l>
+      <l:l i="150">&#245;</l:l>
+      <l:l i="150">&#214;</l:l>
+      <l:l i="150">&#246;</l:l>
+      <l:l i="150">&#216;</l:l>
+      <l:l i="150">&#248;</l:l>
+      <l:l i="150">&#332;</l:l>
+      <l:l i="150">&#333;</l:l>
+      <l:l i="150">&#334;</l:l>
+      <l:l i="150">&#335;</l:l>
+      <l:l i="150">&#336;</l:l>
+      <l:l i="150">&#337;</l:l>
+      <l:l i="150">&#415;</l:l>
+      <l:l i="150">&#416;</l:l>
+      <l:l i="150">&#417;</l:l>
+      <l:l i="150">&#465;</l:l>
+      <l:l i="150">&#466;</l:l>
+      <l:l i="150">&#490;</l:l>
+      <l:l i="150">&#491;</l:l>
+      <l:l i="150">&#492;</l:l>
+      <l:l i="150">&#493;</l:l>
+      <l:l i="150">&#510;</l:l>
+      <l:l i="150">&#511;</l:l>
+      <l:l i="150">&#524;</l:l>
+      <l:l i="150">&#525;</l:l>
+      <l:l i="150">&#526;</l:l>
+      <l:l i="150">&#527;</l:l>
+      <l:l i="150">&#554;</l:l>
+      <l:l i="150">&#555;</l:l>
+      <l:l i="150">&#556;</l:l>
+      <l:l i="150">&#557;</l:l>
+      <l:l i="150">&#558;</l:l>
+      <l:l i="150">&#559;</l:l>
+      <l:l i="150">&#560;</l:l>
+      <l:l i="150">&#561;</l:l>
+      <l:l i="150">&#7756;</l:l>
+      <l:l i="150">&#7757;</l:l>
+      <l:l i="150">&#7758;</l:l>
+      <l:l i="150">&#7759;</l:l>
+      <l:l i="150">&#7760;</l:l>
+      <l:l i="150">&#7761;</l:l>
+      <l:l i="150">&#7762;</l:l>
+      <l:l i="150">&#7763;</l:l>
+      <l:l i="150">&#7884;</l:l>
+      <l:l i="150">&#7885;</l:l>
+      <l:l i="150">&#7886;</l:l>
+      <l:l i="150">&#7887;</l:l>
+      <l:l i="150">&#7888;</l:l>
+      <l:l i="150">&#7889;</l:l>
+      <l:l i="150">&#7890;</l:l>
+      <l:l i="150">&#7891;</l:l>
+      <l:l i="150">&#7892;</l:l>
+      <l:l i="150">&#7893;</l:l>
+      <l:l i="150">&#7894;</l:l>
+      <l:l i="150">&#7895;</l:l>
+      <l:l i="150">&#7896;</l:l>
+      <l:l i="150">&#7897;</l:l>
+      <l:l i="150">&#7898;</l:l>
+      <l:l i="150">&#7899;</l:l>
+      <l:l i="150">&#7900;</l:l>
+      <l:l i="150">&#7901;</l:l>
+      <l:l i="150">&#7902;</l:l>
+      <l:l i="150">&#7903;</l:l>
+      <l:l i="150">&#7904;</l:l>
+      <l:l i="150">&#7905;</l:l>
+      <l:l i="150">&#7906;</l:l>
+      <l:l i="150">&#7907;</l:l>
+      <l:l i="160">P</l:l>
+      <l:l i="160">p</l:l>
+      <l:l i="160">&#420;</l:l>
+      <l:l i="160">&#421;</l:l>
+      <l:l i="160">&#7764;</l:l>
+      <l:l i="160">&#7765;</l:l>
+      <l:l i="160">&#7766;</l:l>
+      <l:l i="160">&#7767;</l:l>
+      <l:l i="170">Q</l:l>
+      <l:l i="170">q</l:l>
+      <l:l i="170">&#672;</l:l>
+      <l:l i="180">R</l:l>
+      <l:l i="180">r</l:l>
+      <l:l i="180">&#340;</l:l>
+      <l:l i="180">&#341;</l:l>
+      <l:l i="180">&#342;</l:l>
+      <l:l i="180">&#343;</l:l>
+      <l:l i="180">&#344;</l:l>
+      <l:l i="180">&#345;</l:l>
+      <l:l i="180">&#528;</l:l>
+      <l:l i="180">&#529;</l:l>
+      <l:l i="180">&#530;</l:l>
+      <l:l i="180">&#531;</l:l>
+      <l:l i="180">&#636;</l:l>
+      <l:l i="180">&#637;</l:l>
+      <l:l i="180">&#638;</l:l>
+      <l:l i="180">&#7768;</l:l>
+      <l:l i="180">&#7769;</l:l>
+      <l:l i="180">&#7770;</l:l>
+      <l:l i="180">&#7771;</l:l>
+      <l:l i="180">&#7772;</l:l>
+      <l:l i="180">&#7773;</l:l>
+      <l:l i="180">&#7774;</l:l>
+      <l:l i="180">&#7775;</l:l>
+      <l:l i="190">S</l:l>
+      <l:l i="190">s</l:l>
+      <l:l i="190">&#346;</l:l>
+      <l:l i="190">&#347;</l:l>
+      <l:l i="190">&#348;</l:l>
+      <l:l i="190">&#349;</l:l>
+      <l:l i="190">&#350;</l:l>
+      <l:l i="190">&#351;</l:l>
+      <l:l i="190">&#352;</l:l>
+      <l:l i="190">&#353;</l:l>
+      <l:l i="190">&#536;</l:l>
+      <l:l i="190">&#537;</l:l>
+      <l:l i="190">&#642;</l:l>
+      <l:l i="190">&#7776;</l:l>
+      <l:l i="190">&#7777;</l:l>
+      <l:l i="190">&#7778;</l:l>
+      <l:l i="190">&#7779;</l:l>
+      <l:l i="190">&#7780;</l:l>
+      <l:l i="190">&#7781;</l:l>
+      <l:l i="190">&#7782;</l:l>
+      <l:l i="190">&#7783;</l:l>
+      <l:l i="190">&#7784;</l:l>
+      <l:l i="190">&#7785;</l:l>
+      <l:l i="200">T</l:l>
+      <l:l i="200">t</l:l>
+      <l:l i="200">&#354;</l:l>
+      <l:l i="200">&#355;</l:l>
+      <l:l i="200">&#356;</l:l>
+      <l:l i="200">&#357;</l:l>
+      <l:l i="200">&#358;</l:l>
+      <l:l i="200">&#359;</l:l>
+      <l:l i="200">&#427;</l:l>
+      <l:l i="200">&#428;</l:l>
+      <l:l i="200">&#429;</l:l>
+      <l:l i="200">&#430;</l:l>
+      <l:l i="200">&#648;</l:l>
+      <l:l i="200">&#538;</l:l>
+      <l:l i="200">&#539;</l:l>
+      <l:l i="200">&#566;</l:l>
+      <l:l i="200">&#7786;</l:l>
+      <l:l i="200">&#7787;</l:l>
+      <l:l i="200">&#7788;</l:l>
+      <l:l i="200">&#7789;</l:l>
+      <l:l i="200">&#7790;</l:l>
+      <l:l i="200">&#7791;</l:l>
+      <l:l i="200">&#7792;</l:l>
+      <l:l i="200">&#7793;</l:l>
+      <l:l i="200">&#7831;</l:l>
+      <l:l i="210">U</l:l>
+      <l:l i="210">u</l:l>
+      <l:l i="210">&#217;</l:l>
+      <l:l i="210">&#249;</l:l>
+      <l:l i="210">&#218;</l:l>
+      <l:l i="210">&#250;</l:l>
+      <l:l i="210">&#219;</l:l>
+      <l:l i="210">&#251;</l:l>
+      <l:l i="210">&#220;</l:l>
+      <l:l i="210">&#252;</l:l>
+      <l:l i="210">&#360;</l:l>
+      <l:l i="210">&#361;</l:l>
+      <l:l i="210">&#362;</l:l>
+      <l:l i="210">&#363;</l:l>
+      <l:l i="210">&#364;</l:l>
+      <l:l i="210">&#365;</l:l>
+      <l:l i="210">&#366;</l:l>
+      <l:l i="210">&#367;</l:l>
+      <l:l i="210">&#368;</l:l>
+      <l:l i="210">&#369;</l:l>
+      <l:l i="210">&#370;</l:l>
+      <l:l i="210">&#371;</l:l>
+      <l:l i="210">&#431;</l:l>
+      <l:l i="210">&#432;</l:l>
+      <l:l i="210">&#467;</l:l>
+      <l:l i="210">&#468;</l:l>
+      <l:l i="210">&#469;</l:l>
+      <l:l i="210">&#470;</l:l>
+      <l:l i="210">&#471;</l:l>
+      <l:l i="210">&#472;</l:l>
+      <l:l i="210">&#473;</l:l>
+      <l:l i="210">&#474;</l:l>
+      <l:l i="210">&#475;</l:l>
+      <l:l i="210">&#476;</l:l>
+      <l:l i="210">&#532;</l:l>
+      <l:l i="210">&#533;</l:l>
+      <l:l i="210">&#534;</l:l>
+      <l:l i="210">&#535;</l:l>
+      <l:l i="210">&#7794;</l:l>
+      <l:l i="210">&#7795;</l:l>
+      <l:l i="210">&#7796;</l:l>
+      <l:l i="210">&#7797;</l:l>
+      <l:l i="210">&#7798;</l:l>
+      <l:l i="210">&#7799;</l:l>
+      <l:l i="210">&#7800;</l:l>
+      <l:l i="210">&#7801;</l:l>
+      <l:l i="210">&#7802;</l:l>
+      <l:l i="210">&#7803;</l:l>
+      <l:l i="210">&#7908;</l:l>
+      <l:l i="210">&#7909;</l:l>
+      <l:l i="210">&#7910;</l:l>
+      <l:l i="210">&#7911;</l:l>
+      <l:l i="210">&#7912;</l:l>
+      <l:l i="210">&#7913;</l:l>
+      <l:l i="210">&#7914;</l:l>
+      <l:l i="210">&#7915;</l:l>
+      <l:l i="210">&#7916;</l:l>
+      <l:l i="210">&#7917;</l:l>
+      <l:l i="210">&#7918;</l:l>
+      <l:l i="210">&#7919;</l:l>
+      <l:l i="210">&#7920;</l:l>
+      <l:l i="210">&#7921;</l:l>
+      <l:l i="220">V</l:l>
+      <l:l i="220">v</l:l>
+      <l:l i="220">&#434;</l:l>
+      <l:l i="220">&#651;</l:l>
+      <l:l i="220">&#7804;</l:l>
+      <l:l i="220">&#7805;</l:l>
+      <l:l i="220">&#7806;</l:l>
+      <l:l i="220">&#7807;</l:l>
+      <l:l i="230">W</l:l>
+      <l:l i="230">w</l:l>
+      <l:l i="230">&#372;</l:l>
+      <l:l i="230">&#373;</l:l>
+      <l:l i="230">&#7808;</l:l>
+      <l:l i="230">&#7809;</l:l>
+      <l:l i="230">&#7810;</l:l>
+      <l:l i="230">&#7811;</l:l>
+      <l:l i="230">&#7812;</l:l>
+      <l:l i="230">&#7813;</l:l>
+      <l:l i="230">&#7814;</l:l>
+      <l:l i="230">&#7815;</l:l>
+      <l:l i="230">&#7816;</l:l>
+      <l:l i="230">&#7817;</l:l>
+      <l:l i="230">&#7832;</l:l>
+      <l:l i="240">X</l:l>
+      <l:l i="240">x</l:l>
+      <l:l i="240">&#7818;</l:l>
+      <l:l i="240">&#7819;</l:l>
+      <l:l i="240">&#7820;</l:l>
+      <l:l i="240">&#7821;</l:l>
+      <l:l i="250">Y</l:l>
+      <l:l i="250">y</l:l>
+      <l:l i="250">&#221;</l:l>
+      <l:l i="250">&#253;</l:l>
+      <l:l i="250">&#255;</l:l>
+      <l:l i="250">&#376;</l:l>
+      <l:l i="250">&#374;</l:l>
+      <l:l i="250">&#375;</l:l>
+      <l:l i="250">&#435;</l:l>
+      <l:l i="250">&#436;</l:l>
+      <l:l i="250">&#562;</l:l>
+      <l:l i="250">&#563;</l:l>
+      <l:l i="250">&#7822;</l:l>
+      <l:l i="250">&#7823;</l:l>
+      <l:l i="250">&#7833;</l:l>
+      <l:l i="250">&#7922;</l:l>
+      <l:l i="250">&#7923;</l:l>
+      <l:l i="250">&#7924;</l:l>
+      <l:l i="250">&#7925;</l:l>
+      <l:l i="250">&#7926;</l:l>
+      <l:l i="250">&#7927;</l:l>
+      <l:l i="250">&#7928;</l:l>
+      <l:l i="250">&#7929;</l:l>
+      <l:l i="260">Z</l:l>
+      <l:l i="260">z</l:l>
+      <l:l i="260">&#377;</l:l>
+      <l:l i="260">&#378;</l:l>
+      <l:l i="260">&#379;</l:l>
+      <l:l i="260">&#380;</l:l>
+      <l:l i="260">&#381;</l:l>
+      <l:l i="260">&#382;</l:l>
+      <l:l i="260">&#437;</l:l>
+      <l:l i="260">&#438;</l:l>
+      <l:l i="260">&#548;</l:l>
+      <l:l i="260">&#549;</l:l>
+      <l:l i="260">&#656;</l:l>
+      <l:l i="260">&#657;</l:l>
+      <l:l i="260">&#7824;</l:l>
+      <l:l i="260">&#7825;</l:l>
+      <l:l i="260">&#7826;</l:l>
+      <l:l i="260">&#7827;</l:l>
+      <l:l i="260">&#7828;</l:l>
+      <l:l i="260">&#7829;</l:l>
+   </l:letters>
+</l:l10n>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/sr.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/sr.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/sr.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1153 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="sr" english-language-name="Serbian in Cyrillic script">
+
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+   <l:gentext key="Abstract" text="&#1055;&#1088;&#1077;&#1075;&#1083;&#1077;&#1076;"/>
+   <l:gentext key="abstract" text="&#1087;&#1088;&#1077;&#1075;&#1083;&#1077;&#1076;"/>
+   <l:gentext key="Answer" text="&#1054;:"/>
+   <l:gentext key="answer" text="&#1086;:"/>
+   <l:gentext key="Appendix" text="&#1044;&#1086;&#1076;&#1072;&#1090;&#1072;&#1082;"/>
+   <l:gentext key="appendix" text="&#1076;&#1086;&#1076;&#1072;&#1090;&#1072;&#1082;"/>
+   <l:gentext key="Article" text="&#1063;&#1083;&#1072;&#1085;&#1072;&#1082;"/>
+   <l:gentext key="article" text="&#1095;&#1083;&#1072;&#1085;&#1072;&#1082;"/>
+   <l:gentext key="Bibliography" text="&#1051;&#1080;&#1090;&#1077;&#1088;&#1072;&#1090;&#1091;&#1088;&#1072;"/>
+   <l:gentext key="bibliography" text="&#1083;&#1080;&#1090;&#1077;&#1088;&#1072;&#1090;&#1091;&#1088;&#1072;"/>
+   <l:gentext key="Book" text="&#1050;&#1114;&#1080;&#1075;&#1072;"/>
+   <l:gentext key="book" text="&#1082;&#1114;&#1080;&#1075;&#1072;"/>
+   <l:gentext key="CAUTION" text="&#1059;&#1055;&#1054;&#1047;&#1054;&#1056;&#1045;&#1034;&#1045;"/>
+   <l:gentext key="Caution" text="&#1059;&#1087;&#1086;&#1079;&#1086;&#1088;&#1077;&#1114;&#1077;"/>
+   <l:gentext key="caution" text="&#1091;&#1087;&#1086;&#1079;&#1086;&#1088;&#1077;&#1114;&#1077;"/>
+   <l:gentext key="Chapter" text="&#1055;&#1086;&#1075;&#1083;&#1072;&#1074;&#1113;&#1077;"/>
+   <l:gentext key="chapter" text="&#1087;&#1086;&#1075;&#1083;&#1072;&#1074;&#1113;&#1077;"/>
+   <l:gentext key="Colophon" text="Colophon" lang="en"/>
+   <l:gentext key="colophon" text="Colophon" lang="en"/>
+   <l:gentext key="Copyright" text="Copyright" lang="en"/>
+   <l:gentext key="copyright" text="Copyright" lang="en"/>
+   <l:gentext key="Dedication" text="&#1055;&#1086;&#1089;&#1074;&#1077;&#1090;&#1072;"/>
+   <l:gentext key="dedication" text="&#1087;&#1086;&#1089;&#1074;&#1077;&#1090;&#1072;"/>
+   <l:gentext key="Edition" text="&#1048;&#1079;&#1076;&#1072;&#1114;&#1077;"/>
+   <l:gentext key="edition" text="&#1080;&#1079;&#1076;&#1072;&#1114;&#1077;"/>
+   <l:gentext key="Equation" text="&#1032;&#1077;&#1076;&#1085;&#1072;&#1095;&#1080;&#1085;&#1072;"/>
+   <l:gentext key="equation" text="&#1112;&#1077;&#1076;&#1085;&#1072;&#1095;&#1080;&#1085;&#1072;"/>
+   <l:gentext key="Example" text="&#1055;&#1088;&#1080;&#1084;&#1077;&#1088;"/>
+   <l:gentext key="example" text="&#1087;&#1088;&#1080;&#1084;&#1077;&#1088;"/>
+   <l:gentext key="Figure" text="&#1060;&#1080;&#1075;&#1091;&#1088;&#1072;"/>
+   <l:gentext key="figure" text="&#1092;&#1080;&#1075;&#1091;&#1088;&#1072;"/>
+   <l:gentext key="Glossary" text="&#1056;&#1077;&#1095;&#1085;&#1080;&#1082;"/>
+   <l:gentext key="glossary" text="&#1088;&#1077;&#1095;&#1085;&#1080;&#1082;"/>
+   <l:gentext key="GlossSee" text="&#1042;&#1080;&#1076;&#1080;"/>
+   <l:gentext key="glosssee" text="&#1074;&#1080;&#1076;&#1080;"/>
+   <l:gentext key="GlossSeeAlso" text="&#1042;&#1080;&#1076;&#1080;  &#1090;&#1072;&#1082;&#1086;&#1106;&#1077;"/>
+   <l:gentext key="glossseealso" text="&#1074;&#1080;&#1076;&#1080;  &#1090;&#1072;&#1082;&#1086;&#1106;&#1077;"/>
+   <l:gentext key="IMPORTANT" text="&#1042;&#1040;&#1046;&#1053;&#1054;"/>
+   <l:gentext key="important" text="&#1074;&#1072;&#1078;&#1085;&#1086;"/>
+   <l:gentext key="Important" text="&#1042;&#1072;&#1078;&#1085;&#1086;"/>
+   <l:gentext key="Index" text="&#1048;&#1085;&#1076;&#1077;&#1082;&#1089;"/>
+   <l:gentext key="index" text="&#1080;&#1085;&#1076;&#1077;&#1082;&#1089;"/>
+   <l:gentext key="ISBN" text="ISBN"/>
+   <l:gentext key="isbn" text="ISBN"/>
+   <l:gentext key="LegalNotice" text="Legal Notice" lang="en"/>
+   <l:gentext key="legalnotice" text="Legal Notice" lang="en"/>
+   <l:gentext key="MsgAud" text="&#1055;&#1091;&#1073;&#1083;&#1080;&#1082;&#1072;"/>
+   <l:gentext key="msgaud" text="&#1087;&#1091;&#1073;&#1083;&#1080;&#1082;&#1072;"/>
+   <l:gentext key="MsgLevel" text="&#1053;&#1080;&#1074;&#1086;"/>
+   <l:gentext key="msglevel" text="&#1085;&#1080;&#1074;&#1086;"/>
+   <l:gentext key="MsgOrig" text="&#1048;&#1079;&#1074;&#1086;&#1088;"/>
+   <l:gentext key="msgorig" text="&#1080;&#1079;&#1074;&#1086;&#1088;"/>
+   <l:gentext key="NOTE" text="&#1055;&#1056;&#1048;&#1052;&#1045;&#1044;&#1041;&#1040;"/>
+   <l:gentext key="Note" text="&#1055;&#1088;&#1080;&#1084;&#1077;&#1076;&#1073;&#1072;"/>
+   <l:gentext key="note" text="&#1087;&#1088;&#1080;&#1084;&#1077;&#1076;&#1073;&#1072;"/>
+   <l:gentext key="Part" text="&#1044;&#1077;&#1086;"/>
+   <l:gentext key="part" text="&#1076;&#1077;&#1086;"/>
+   <l:gentext key="Preface" text="&#1055;&#1088;&#1077;&#1076;&#1075;&#1086;&#1074;&#1086;&#1088;"/>
+   <l:gentext key="preface" text="&#1087;&#1088;&#1077;&#1076;&#1075;&#1086;&#1074;&#1086;&#1088;"/>
+   <l:gentext key="Procedure" text="&#1055;&#1088;&#1086;&#1094;&#1077;&#1076;&#1091;&#1088;&#1072;"/>
+   <l:gentext key="procedure" text="&#1087;&#1088;&#1086;&#1094;&#1077;&#1076;&#1091;&#1088;&#1072;"/>
+   <l:gentext key="ProductionSet" text="Production" lang="en"/>
+   <l:gentext key="PubDate" text="&#1044;&#1072;&#1090;&#1091;&#1084;  &#1080;&#1079;&#1076;&#1072;&#1074;&#1072;&#1114;&#1072;"/>
+   <l:gentext key="pubdate" text="&#1076;&#1072;&#1090;&#1091;&#1084;  &#1080;&#1079;&#1076;&#1072;&#1074;&#1072;&#1114;&#1072;"/>
+   <l:gentext key="Published" text="&#1048;&#1079;&#1076;&#1072;&#1085;&#1086;"/>
+   <l:gentext key="published" text="&#1080;&#1079;&#1076;&#1072;&#1085;&#1086;"/>
+   <l:gentext key="Qandadiv" text="&#1055; &#1080; &#1054;"/>
+   <l:gentext key="qandadiv" text="&#1087; &#1080; &#1086;"/>
+   <l:gentext key="Question" text="&#1055;:"/>
+   <l:gentext key="question" text="&#1087;:"/>
+   <l:gentext key="RefEntry" text=""/>
+   <l:gentext key="refentry" text=""/>
+   <l:gentext key="Reference" text="&#1056;&#1077;&#1092;&#1077;&#1088;&#1077;&#1085;&#1094;&#1072;"/>
+   <l:gentext key="reference" text="&#1088;&#1077;&#1092;&#1077;&#1088;&#1077;&#1085;&#1094;&#1072;"/>
+   <l:gentext key="RefName" text="&#1048;&#1084;&#1077;"/>
+   <l:gentext key="refname" text="&#1080;&#1084;&#1077;"/>
+   <l:gentext key="RefSection" text=""/>
+   <l:gentext key="refsection" text=""/>
+   <l:gentext key="RefSynopsisDiv" text="&#1050;&#1088;&#1072;&#1090;&#1072;&#1082;  &#1089;&#1072;&#1076;&#1088;&#1078;&#1072;&#1112;"/>
+   <l:gentext key="refsynopsisdiv" text="&#1082;&#1088;&#1072;&#1090;&#1072;&#1082;  &#1089;&#1072;&#1076;&#1088;&#1078;&#1072;&#1112;"/>
+   <l:gentext key="RevHistory" text="&#1048;&#1089;&#1090;&#1086;&#1088;&#1080;&#1112;&#1072;  &#1088;&#1077;&#1074;&#1080;&#1079;&#1080;&#1112;&#1072;"/>
+   <l:gentext key="revhistory" text="&#1080;&#1089;&#1090;&#1086;&#1088;&#1080;&#1112;&#1072;  &#1088;&#1077;&#1074;&#1080;&#1079;&#1080;&#1112;&#1072;"/>
+   <l:gentext key="revision" text="&#1088;&#1077;&#1074;&#1080;&#1079;&#1080;&#1112;&#1072;"/>
+   <l:gentext key="Revision" text="&#1056;&#1077;&#1074;&#1080;&#1079;&#1080;&#1112;&#1072;"/>
+   <l:gentext key="sect1" text="&#1054;&#1076;&#1077;&#1113;&#1072;&#1082;"/>
+   <l:gentext key="sect2" text="&#1054;&#1076;&#1077;&#1113;&#1072;&#1082;"/>
+   <l:gentext key="sect3" text="&#1054;&#1076;&#1077;&#1113;&#1072;&#1082;"/>
+   <l:gentext key="sect4" text="&#1054;&#1076;&#1077;&#1113;&#1072;&#1082;"/>
+   <l:gentext key="sect5" text="&#1054;&#1076;&#1077;&#1113;&#1072;&#1082;"/>
+   <l:gentext key="section" text="&#1054;&#1076;&#1077;&#1113;&#1072;&#1082;"/>
+   <l:gentext key="Section" text="&#1054;&#1076;&#1077;&#1113;&#1072;&#1082;"/>
+   <l:gentext key="see" text="&#1074;&#1080;&#1076;&#1080;"/>
+   <l:gentext key="See" text="&#1042;&#1080;&#1076;&#1080;"/>
+   <l:gentext key="seealso" text="&#1074;&#1080;&#1076;&#1080;  &#1090;&#1072;&#1082;&#1086;&#1106;&#1077;"/>
+   <l:gentext key="Seealso" text="&#1042;&#1080;&#1076;&#1080;  &#1090;&#1072;&#1082;&#1086;&#1106;&#1077;"/>
+   <l:gentext key="SeeAlso" text="&#1042;&#1080;&#1076;&#1080;  &#1090;&#1072;&#1082;&#1086;&#1106;&#1077;"/>
+   <l:gentext key="set" text="&#1089;&#1082;&#1091;&#1087;"/>
+   <l:gentext key="Set" text="&#1057;&#1082;&#1091;&#1087;"/>
+   <l:gentext key="setindex" text="&#1048;&#1085;&#1076;&#1077;&#1082;&#1089;  &#1089;&#1082;&#1091;&#1087;&#1072;"/>
+   <l:gentext key="SetIndex" text="&#1048;&#1085;&#1076;&#1077;&#1082;&#1089;  &#1089;&#1082;&#1091;&#1087;&#1072;"/>
+   <l:gentext key="Sidebar" text=""/>
+   <l:gentext key="sidebar" text="&#1087;&#1086;&#1074;&#1088;&#1096;  &#1087;&#1086;&#1089;&#1090;&#1088;&#1072;&#1085;&#1094;&#1077;"/>
+   <l:gentext key="step" text="&#1082;&#1086;&#1088;&#1072;&#1082;"/>
+   <l:gentext key="Step" text="&#1050;&#1086;&#1088;&#1072;&#1082;"/>
+   <l:gentext key="Table" text="&#1058;&#1072;&#1073;&#1077;&#1083;&#1072;"/>
+   <l:gentext key="table" text="&#1090;&#1072;&#1073;&#1077;&#1083;&#1072;"/>
+   <l:gentext key="tip" text="&#1089;&#1072;&#1074;&#1077;&#1090;"/>
+   <l:gentext key="TIP" text="&#1057;&#1040;&#1042;&#1045;&#1058;"/>
+   <l:gentext key="Tip" text="&#1057;&#1072;&#1074;&#1077;&#1090;"/>
+   <l:gentext key="Warning" text="&#1059;&#1087;&#1086;&#1079;&#1086;&#1088;&#1077;&#1114;&#1077;"/>
+   <l:gentext key="warning" text="&#1091;&#1087;&#1086;&#1079;&#1086;&#1088;&#1077;&#1114;&#1077;"/>
+   <l:gentext key="WARNING" text="&#1059;&#1055;&#1054;&#1047;&#1054;&#1056;&#1045;&#1034;&#1045;"/>
+   <l:gentext key="and" text="&#1080;"/>
+   <l:gentext key="by" text="&#1086;&#1076;"/>
+   <l:gentext key="called" text="&#1087;&#1086;&#1076;  &#1080;&#1084;&#1077;&#1085;&#1086;&#1084;"/>
+   <l:gentext key="Edited" text="&#1059;&#1088;&#1077;&#1106;&#1077;&#1085;&#1086;"/>
+   <l:gentext key="edited" text="&#1091;&#1088;&#1077;&#1106;&#1077;&#1085;&#1086;"/>
+   <l:gentext key="Editedby" text="&#1059;&#1088;&#1077;&#1076;&#1080;&#1086;(&#1083;&#1072;)"/>
+   <l:gentext key="editedby" text="&#1059;&#1088;&#1077;&#1076;&#1080;&#1086;(&#1083;&#1072;)"/>
+   <l:gentext key="in" text="&#1091;"/>
+   <l:gentext key="lastlistcomma" text=","/>
+   <l:gentext key="listcomma" text=","/>
+   <l:gentext key="nonexistantelement" text="&#1085;&#1077;&#1087;&#1086;&#1089;&#1090;&#1086;&#1112;&#1077;&#1115;&#1080;  &#1077;&#1083;&#1077;&#1084;&#1077;&#1085;&#1090;"/>
+   <l:gentext key="notes" text="&#1087;&#1088;&#1080;&#1084;&#1077;&#1076;&#1073;&#1077;"/>
+   <l:gentext key="Notes" text="&#1055;&#1088;&#1080;&#1084;&#1077;&#1076;&#1073;&#1077;"/>
+   <l:gentext key="Pgs" text="&#1057;&#1090;&#1088;."/>
+   <l:gentext key="pgs" text="&#1089;&#1090;&#1088;."/>
+   <l:gentext key="Revisedby" text="&#1055;&#1088;&#1077;&#1075;&#1083;&#1077;&#1076;&#1072;&#1086;(&#1083;&#1072;):  "/>
+   <l:gentext key="revisedby" text="&#1087;&#1088;&#1077;&#1075;&#1083;&#1077;&#1076;&#1072;&#1086;(&#1083;&#1072;):  "/>
+   <l:gentext key="TableNotes" text="&#1055;&#1088;&#1080;&#1084;&#1077;&#1076;&#1073;&#1077;"/>
+   <l:gentext key="tablenotes" text="&#1087;&#1088;&#1080;&#1084;&#1077;&#1076;&#1073;&#1077;"/>
+   <l:gentext key="TableofContents" text="&#1057;&#1072;&#1076;&#1088;&#1078;&#1072;&#1112;"/>
+   <l:gentext key="tableofcontents" text="&#1089;&#1072;&#1076;&#1088;&#1078;&#1072;&#1112;"/>
+   <l:gentext key="the" text=""/>
+   <l:gentext key="unexpectedelementname" text="&#1085;&#1077;&#1086;&#1095;&#1077;&#1082;&#1080;&#1074;&#1072;&#1085;&#1086;  &#1080;&#1084;&#1077;  &#1077;&#1083;&#1077;&#1084;&#1077;&#1085;&#1090;&#1072;"/>
+   <l:gentext key="unsupported" text="&#1085;&#1080;&#1112;&#1077;  &#1087;&#1086;&#1076;&#1088;&#1078;&#1072;&#1085;&#1086;"/>
+   <l:gentext key="xrefto" text="&#1091;&#1085;&#1072;&#1082;&#1088;&#1089;&#1085;&#1072;  &#1088;&#1077;&#1092;&#1077;&#1088;&#1077;&#1085;&#1094;&#1072;  &#1085;&#1072;"/>
+   <l:gentext key="listofequations" text="&#1083;&#1080;&#1089;&#1090;&#1072;  &#1112;&#1077;&#1076;&#1085;&#1072;&#1095;&#1080;&#1085;&#1072;"/>
+   <l:gentext key="ListofEquations" text="&#1051;&#1080;&#1089;&#1090;&#1072;  &#1112;&#1077;&#1076;&#1085;&#1072;&#1095;&#1080;&#1085;&#1072;"/>
+   <l:gentext key="ListofExamples" text="&#1051;&#1080;&#1089;&#1090;&#1072;  &#1087;&#1088;&#1080;&#1084;&#1077;&#1088;&#1072;"/>
+   <l:gentext key="listofexamples" text="&#1083;&#1080;&#1089;&#1090;&#1072;  &#1087;&#1088;&#1080;&#1084;&#1077;&#1088;&#1072;"/>
+   <l:gentext key="ListofFigures" text="&#1051;&#1080;&#1089;&#1090;&#1072;  &#1092;&#1080;&#1075;&#1091;&#1088;&#1072;"/>
+   <l:gentext key="listoffigures" text="&#1083;&#1080;&#1089;&#1090;&#1072;  &#1092;&#1080;&#1075;&#1091;&#1088;&#1072;"/>
+   <l:gentext key="ListofProcedures" text="&#1051;&#1080;&#1089;&#1090;&#1072;  &#1087;&#1088;&#1086;&#1094;&#1077;&#1076;&#1091;&#1088;&#1072;"/>
+   <l:gentext key="listofprocedures" text="&#1083;&#1080;&#1089;&#1090;&#1072;  &#1087;&#1088;&#1086;&#1094;&#1077;&#1076;&#1091;&#1088;&#1072;"/>
+   <l:gentext key="listoftables" text="&#1083;&#1080;&#1089;&#1090;&#1072;  &#1090;&#1072;&#1073;&#1077;&#1083;&#1072;"/>
+   <l:gentext key="ListofTables" text="&#1051;&#1080;&#1089;&#1090;&#1072;  &#1090;&#1072;&#1073;&#1077;&#1083;&#1072;"/>
+   <l:gentext key="ListofUnknown" text="&#1051;&#1080;&#1089;&#1090;&#1072;  &#1085;&#1077;&#1087;&#1086;&#1079;&#1085;&#1072;&#1090;&#1080;&#1093;"/>
+   <l:gentext key="listofunknown" text="&#1083;&#1080;&#1089;&#1090;&#1072;  &#1085;&#1077;&#1087;&#1086;&#1079;&#1085;&#1072;&#1090;&#1080;&#1093;"/>
+   <l:gentext key="nav-home" text="&#1055;&#1086;&#1095;&#1077;&#1090;&#1072;&#1082;"/>
+   <l:gentext key="nav-next" text="&#1057;&#1083;&#1077;&#1076;&#1077;&#1115;&#1077;"/>
+   <l:gentext key="nav-next-sibling" text="&#1041;&#1088;&#1079;&#1086;  &#1085;&#1072;&#1087;&#1088;&#1077;&#1076;"/>
+   <l:gentext key="nav-prev" text="&#1055;&#1088;&#1077;&#1090;&#1093;&#1086;&#1076;&#1085;&#1086;"/>
+   <l:gentext key="nav-prev-sibling" text="&#1041;&#1088;&#1079;&#1086;  &#1085;&#1072;&#1079;&#1072;&#1076;"/>
+   <l:gentext key="nav-up" text="&#1042;&#1088;&#1093;"/>
+   <l:gentext key="nav-toc" text="&#1057;&#1072;&#1076;&#1088;."/>
+   <l:gentext key="Draft" text="&#1053;&#1072;&#1094;&#1088;&#1090;"/>
+   <l:gentext key="above" text="&#1080;&#1079;&#1085;&#1072;&#1076;"/>
+   <l:gentext key="below" text="&#1080;&#1089;&#1087;&#1086;&#1076;"/>
+   <l:gentext key="sectioncalled" text="&#1086;&#1076;&#1077;&#1113;&#1072;&#1082; &#1087;&#1086;&#1076;  &#1080;&#1084;&#1077;&#1085;&#1086;&#1084;"/>
+   <l:gentext key="index symbols" text="&#1057;&#1080;&#1084;&#1073;&#1086;&#1083;&#1080;"/>
+   <l:gentext key="lowercase.alpha" text="&#1072;&#1073;&#1074;&#1075;&#1076;&#1106;&#1077;&#1078;&#1079;&#1080;&#1112;&#1082;&#1083;&#1113;&#1084;&#1085;&#1114;&#1086;&#1087;&#1088;&#1089;&#1090;&#1115;&#1091;&#1092;&#1093;&#1094;&#1095;&#1119;&#1096;"/>
+   <l:gentext key="uppercase.alpha" text="&#1040;&#1041;&#1042;&#1043;&#1044;&#1026;&#1045;&#1046;&#1047;&#1048;&#1032;&#1050;&#1051;&#1033;&#1052;&#1053;&#1034;&#1054;&#1055;&#1056;&#1057;&#1058;&#1035;&#1059;&#1060;&#1061;&#1062;&#1063;&#1039;&#1064;"/>
+   <l:dingbat key="startquote" text="&#8222;"/>
+   <l:dingbat key="endquote" text="&#8220;"/>
+   <l:dingbat key="nestedstartquote" text="&#8216;"/>
+   <l:dingbat key="nestedendquote" text="&#8217;"/>
+   <l:dingbat key="singlestartquote" text="&#8216;"/>
+   <l:dingbat key="singleendquote" text="&#8217;"/>
+   <l:dingbat key="bullet" text="&#8226;"/>
+   <l:gentext key="hyphenation-character" text="-"/>
+   <l:gentext key="hyphenation-push-character-count" text="2"/>
+   <l:gentext key="hyphenation-remain-character-count" text="2"/>
+
+   <l:context name="styles">
+      <l:template name="person-name" text="&#1080;&#1084;&#1077;-&#1087;&#1088;&#1077;&#1079;&#1080;&#1084;&#1077;"/>
+   </l:context>
+
+   <l:context name="title">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="%t"/>
+      <l:template name="appendix" text="&#1044;&#1086;&#1076;&#1072;&#1090;&#1072;&#1082;&#160;%n.&#160;%t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="biblioentry" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliolist" text="%t" lang="en"/>
+      <l:template name="bibliomixed" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="&#1055;&#1086;&#1075;&#1083;&#1072;&#1074;&#1113;&#1077;&#160;%n.&#160;%t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="&#1032;&#1077;&#1076;&#1085;&#1072;&#1095;&#1080;&#1085;&#1072;&#160;%n.&#160;%t"/>
+      <l:template name="example" text="&#1055;&#1088;&#1080;&#1084;&#1077;&#1088;&#160;%n.&#160;%t"/>
+      <l:template name="figure" text="&#1060;&#1080;&#1075;&#1091;&#1088;&#1072;&#160;%n.&#160;%t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="glosslist" text="%t" lang="en"/>
+      <l:template name="glossentry" text="%t"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text=""/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="&#1044;&#1077;&#1086;&#160;%n.&#160;%t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="procedure.formal" text="&#1055;&#1088;&#1086;&#1094;&#1077;&#1076;&#1091;&#1088;&#1072;&#160;%n.&#160;%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="productionset.formal" text="Production&#160;%n&#34; &#xA;lang=&#34;en"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="%t"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="%t"/>
+      <l:template name="refentry" text="%t"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsection" text="%t"/>
+      <l:template name="refsect1" text="%t"/>
+      <l:template name="refsect2" text="%t"/>
+      <l:template name="refsect3" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="refsynopsisdivinfo" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="step" text="%t"/>
+      <l:template name="table" text="&#1058;&#1072;&#1073;&#1077;&#1083;&#1072;&#160;%n.&#160;%t"/>
+      <l:template name="task" text="%t"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text=""/>
+      <l:template name="warning" text="%t"/>
+   </l:context>
+
+   <l:context name="title-unnumbered">
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article/appendix" text="%t"/>
+      <l:template name="bridgehead" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="sect1" text="%t"/>
+      <l:template name="sect2" text="%t"/>
+      <l:template name="sect3" text="%t"/>
+      <l:template name="sect4" text="%t"/>
+      <l:template name="sect5" text="%t"/>
+      <l:template name="section" text="%t"/>
+      <l:template name="simplesect" text="%t"/>
+   </l:context>
+
+   <l:context name="title-numbered">
+      <l:template name="appendix" text="&#1044;&#1086;&#1076;&#1072;&#1090;&#1072;&#1082;&#160;%n.&#160;%t"/>
+      <l:template name="article/appendix" text="%n.&#160;%t"/>
+      <l:template name="bridgehead" text="%n.&#160;%t"/>
+      <l:template name="chapter" text="&#1055;&#1086;&#1075;&#1083;&#1072;&#1074;&#1113;&#1077;&#160;%n.&#160;%t"/>
+      <l:template name="sect1" text="%n.&#160;%t"/>
+      <l:template name="sect2" text="%n.&#160;%t"/>
+      <l:template name="sect3" text="%n.&#160;%t"/>
+      <l:template name="sect4" text="%n.&#160;%t"/>
+      <l:template name="sect5" text="%n.&#160;%t"/>
+      <l:template name="section" text="%n.&#160;%t"/>
+      <l:template name="simplesect" text="%t"/>
+   </l:context>
+
+   <l:context name="subtitle">
+      <l:template name="appendix" text="%s"/>
+      <l:template name="article" text="%s"/>
+      <l:template name="bibliodiv" text="%s"/>
+      <l:template name="biblioentry" text="%s"/>
+      <l:template name="bibliography" text="%s"/>
+      <l:template name="bibliomixed" text="%s"/>
+      <l:template name="bibliomset" text="%s"/>
+      <l:template name="biblioset" text="%s"/>
+      <l:template name="book" text="%s"/>
+      <l:template name="chapter" text="%s"/>
+      <l:template name="colophon" text="%s"/>
+      <l:template name="dedication" text="%s"/>
+      <l:template name="glossary" text="%s"/>
+      <l:template name="glossdiv" text="%s"/>
+      <l:template name="index" text="%s"/>
+      <l:template name="indexdiv" text="%s"/>
+      <l:template name="lot" text="%s"/>
+      <l:template name="part" text="%s"/>
+      <l:template name="partintro" text="%s"/>
+      <l:template name="preface" text="%s"/>
+      <l:template name="refentry" text="%s"/>
+      <l:template name="reference" text="%s"/>
+      <l:template name="refsection" text="%s"/>
+      <l:template name="refsect1" text="%s"/>
+      <l:template name="refsect2" text="%s"/>
+      <l:template name="refsect3" text="%s"/>
+      <l:template name="refsynopsisdiv" text="%s"/>
+      <l:template name="sect1" text="%s"/>
+      <l:template name="sect2" text="%s"/>
+      <l:template name="sect3" text="%s"/>
+      <l:template name="sect4" text="%s"/>
+      <l:template name="sect5" text="%s"/>
+      <l:template name="section" text="%s"/>
+      <l:template name="set" text="%s"/>
+      <l:template name="setindex" text="%s"/>
+      <l:template name="sidebar" text="%s"/>
+      <l:template name="simplesect" text="%s"/>
+      <l:template name="toc" text="%s"/>
+   </l:context>
+
+   <l:context name="xref">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="&#1054;:&#160;%n"/>
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="constraintdef" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="%t"/>
+      <l:template name="example" text="%t"/>
+      <l:template name="figure" text="%t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text="%n"/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="%t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="&#1055;:&#160;%n"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="&#1055;:&#160;%n"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="table" text="%t"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="%n"/>
+      <l:template name="warning" text="%t"/>
+      <l:template name="page.citation" text=" [%p]"/>
+      <l:template name="page" text="(&#1089;&#1090;&#1088;&#1072;&#1085;&#1072; %p)"/>
+      <l:template name="pageabbrev" text="(&#1089;&#1090;&#1088;. %p)"/>
+      <l:template name="Page" text="&#1057;&#1090;&#1088;&#1072;&#1085;&#1072; %p"/>
+      <l:template name="bridgehead" text="&#1086;&#1076;&#1077;&#1113;&#1072;&#1082; &#1087;&#1086;&#1076; &#xA;&#1080;&#1084;&#1077;&#1085;&#1086;&#1084; &#8222;%t&#8220;"/>
+      <l:template name="refsection" text="&#1086;&#1076;&#1077;&#1113;&#1072;&#1082; &#1087;&#1086;&#1076; &#xA;&#1080;&#1084;&#1077;&#1085;&#1086;&#1084; &#8222;%t&#8220;"/>
+      <l:template name="refsect1" text="&#1086;&#1076;&#1077;&#1113;&#1072;&#1082; &#1087;&#1086;&#1076; &#xA;&#1080;&#1084;&#1077;&#1085;&#1086;&#1084; &#8222;%t&#8220;"/>
+      <l:template name="refsect2" text="&#1086;&#1076;&#1077;&#1113;&#1072;&#1082; &#1087;&#1086;&#1076; &#xA;&#1080;&#1084;&#1077;&#1085;&#1086;&#1084; &#8222;%t&#8220;"/>
+      <l:template name="refsect3" text="&#1086;&#1076;&#1077;&#1113;&#1072;&#1082; &#1087;&#1086;&#1076; &#xA;&#1080;&#1084;&#1077;&#1085;&#1086;&#1084; &#8222;%t&#8220;"/>
+      <l:template name="sect1" text="&#1086;&#1076;&#1077;&#1113;&#1072;&#1082; &#1087;&#1086;&#1076; &#xA;&#1080;&#1084;&#1077;&#1085;&#1086;&#1084; &#8222;%t&#8220;"/>
+      <l:template name="sect2" text="&#1086;&#1076;&#1077;&#1113;&#1072;&#1082; &#1087;&#1086;&#1076; &#xA;&#1080;&#1084;&#1077;&#1085;&#1086;&#1084; &#8222;%t&#8220;"/>
+      <l:template name="sect3" text="&#1086;&#1076;&#1077;&#1113;&#1072;&#1082; &#1087;&#1086;&#1076; &#xA;&#1080;&#1084;&#1077;&#1085;&#1086;&#1084; &#8222;%t&#8220;"/>
+      <l:template name="sect4" text="&#1086;&#1076;&#1077;&#1113;&#1072;&#1082; &#1087;&#1086;&#1076; &#xA;&#1080;&#1084;&#1077;&#1085;&#1086;&#1084; &#8222;%t&#8220;"/>
+      <l:template name="sect5" text="&#1086;&#1076;&#1077;&#1113;&#1072;&#1082; &#1087;&#1086;&#1076; &#xA;&#1080;&#1084;&#1077;&#1085;&#1086;&#1084; &#8222;%t&#8220;"/>
+      <l:template name="section" text="&#1086;&#1076;&#1077;&#1113;&#1072;&#1082; &#1087;&#1086;&#1076; &#xA;&#1080;&#1084;&#1077;&#1085;&#1086;&#1084; &#8222;%t&#8220;"/>
+      <l:template name="simplesect" text="&#1086;&#1076;&#1077;&#1113;&#1072;&#1082; &#1087;&#1086;&#1076; &#xA;&#1080;&#1084;&#1077;&#1085;&#1086;&#1084; &#8222;%t&#8220;"/>
+   </l:context>
+
+   <l:context name="xref-number">
+      <l:template name="answer" text="&#1054;:&#160;%n"/>
+      <l:template name="appendix" text="&#1044;&#1086;&#1076;&#1072;&#1090;&#1072;&#1082;&#160;%n"/>
+      <l:template name="bridgehead" text="&#1054;&#1076;&#1077;&#1113;&#1072;&#1082;&#160;%n"/>
+      <l:template name="chapter" text="&#1055;&#1086;&#1075;&#1083;&#1072;&#1074;&#1113;&#1077;&#160;%n"/>
+      <l:template name="equation" text="&#1032;&#1077;&#1076;&#1085;&#1072;&#1095;&#1080;&#1085;&#1072;&#160;%n"/>
+      <l:template name="example" text="&#1055;&#1088;&#1080;&#1084;&#1077;&#1088;&#160;%n"/>
+      <l:template name="figure" text="&#1060;&#1080;&#1075;&#1091;&#1088;&#1072;&#160;%n"/>
+      <l:template name="part" text="&#1044;&#1077;&#1086;&#160;%n"/>
+      <l:template name="procedure" text="&#1055;&#1088;&#1086;&#1094;&#1077;&#1076;&#1091;&#1088;&#1072;&#160;%n"/>
+      <l:template name="productionset" text="Production&#160;%n&#34; lang=&#34;en"/>
+      <l:template name="qandadiv" text="&#1055; &#1080; &#1054;&#160;%n"/>
+      <l:template name="qandaentry" text="&#1055;:&#160;%n"/>
+      <l:template name="question" text="&#1055;:&#160;%n"/>
+      <l:template name="sect1" text="&#1054;&#1076;&#1077;&#1113;&#1072;&#1082;&#160;%n"/>
+      <l:template name="sect2" text="&#1054;&#1076;&#1077;&#1113;&#1072;&#1082;&#160;%n"/>
+      <l:template name="sect3" text="&#1054;&#1076;&#1077;&#1113;&#1072;&#1082;&#160;%n"/>
+      <l:template name="sect4" text="&#1054;&#1076;&#1077;&#1113;&#1072;&#1082;&#160;%n"/>
+      <l:template name="sect5" text="&#1054;&#1076;&#1077;&#1113;&#1072;&#1082;&#160;%n"/>
+      <l:template name="section" text="&#1054;&#1076;&#1077;&#1113;&#1072;&#1082;&#160;%n"/>
+      <l:template name="table" text="&#1058;&#1072;&#1073;&#1077;&#1083;&#1072;&#160;%n"/>
+   </l:context>
+
+   <l:context name="xref-number-and-title">
+      <l:template name="appendix" text="&#1044;&#1086;&#1076;&#1072;&#1090;&#1072;&#1082;&#160;%n, %t"/>
+      <l:template name="bridgehead" text="&#1054;&#1076;&#1077;&#1113;&#1072;&#1082;&#160;%n, &#xA;&#8222;%t&#8220;"/>
+      <l:template name="chapter" text="&#1055;&#1086;&#1075;&#1083;&#1072;&#1074;&#1113;&#1077;&#160;%n, &#xA;%t"/>
+      <l:template name="equation" text="&#1032;&#1077;&#1076;&#1085;&#1072;&#1095;&#1080;&#1085;&#1072;&#160;%n, &#xA;&#8222;%t&#8220;"/>
+      <l:template name="example" text="&#1055;&#1088;&#1080;&#1084;&#1077;&#1088;&#160;%n, &#xA;&#8222;%t&#8220;"/>
+      <l:template name="figure" text="&#1060;&#1080;&#1075;&#1091;&#1088;&#1072;&#160;%n, &#xA;&#8222;%t&#8220;"/>
+      <l:template name="part" text="&#1044;&#1077;&#1086;&#160;%n, &#xA;&#8222;%t&#8220;"/>
+      <l:template name="procedure" text="&#1055;&#1088;&#1086;&#1094;&#1077;&#1076;&#1091;&#1088;&#1072;&#160;%n, &#xA;&#8222;%t&#8220;"/>
+      <l:template name="productionset" text="Production&#160;%n, &#xA;&#8222;%t&#8220;&#34; lang=&#34;en"/>
+      <l:template name="qandadiv" text="&#1055; &#1080; &#1054;&#160;%n, &#xA;&#8222;%t&#8220;"/>
+      <l:template name="refsect1" text="&#1086;&#1076;&#1077;&#1113;&#1072;&#1082; &#1087;&#1086;&#1076; &#xA;&#1080;&#1084;&#1077;&#1085;&#1086;&#1084; &#8222;%t&#8220;"/>
+      <l:template name="refsect2" text="&#1086;&#1076;&#1077;&#1113;&#1072;&#1082; &#1087;&#1086;&#1076; &#xA;&#1080;&#1084;&#1077;&#1085;&#1086;&#1084; &#8222;%t&#8220;"/>
+      <l:template name="refsect3" text="&#1086;&#1076;&#1077;&#1113;&#1072;&#1082; &#1087;&#1086;&#1076; &#xA;&#1080;&#1084;&#1077;&#1085;&#1086;&#1084; &#8222;%t&#8220;"/>
+      <l:template name="refsection" text="&#1086;&#1076;&#1077;&#1113;&#1072;&#1082; &#1087;&#1086;&#1076; &#xA;&#1080;&#1084;&#1077;&#1085;&#1086;&#1084; &#8222;%t&#8220;"/>
+      <l:template name="sect1" text="&#1054;&#1076;&#1077;&#1113;&#1072;&#1082;&#160;%n, &#xA;&#8222;%t&#8220;"/>
+      <l:template name="sect2" text="&#1054;&#1076;&#1077;&#1113;&#1072;&#1082;&#160;%n, &#xA;&#8222;%t&#8220;"/>
+      <l:template name="sect3" text="&#1054;&#1076;&#1077;&#1113;&#1072;&#1082;&#160;%n, &#xA;&#8222;%t&#8220;"/>
+      <l:template name="sect4" text="&#1054;&#1076;&#1077;&#1113;&#1072;&#1082;&#160;%n, &#xA;&#8222;%t&#8220;"/>
+      <l:template name="sect5" text="&#1054;&#1076;&#1077;&#1113;&#1072;&#1082;&#160;%n, &#xA;&#8222;%t&#8220;"/>
+      <l:template name="section" text="&#1054;&#1076;&#1077;&#1113;&#1072;&#1082;&#160;%n, &#xA;&#8222;%t&#8220;"/>
+      <l:template name="simplesect" text="&#1086;&#1076;&#1077;&#1113;&#1072;&#1082; &#1087;&#1086;&#1076; &#xA;&#1080;&#1084;&#1077;&#1085;&#1086;&#1084; &#8222;%t&#8220;"/>
+      <l:template name="table" text="&#1058;&#1072;&#1073;&#1077;&#1083;&#1072;&#160;%n, &#xA;&#8222;%t&#8220;"/>
+   </l:context>
+
+   <l:context name="authorgroup">
+      <l:template name="sep" text=", "/>
+      <l:template name="sep2" text=" &#1080; "/>
+      <l:template name="seplast" text=", &#1080; "/>
+   </l:context>
+
+   <l:context name="glossary">
+      <l:template name="see" text="&#1042;&#1080;&#1076;&#1080; "/>
+      <l:template name="seealso" text="&#1042;&#1080;&#1076;&#1080; &#xA;&#1090;&#1072;&#1082;&#1086;&#1106;&#1077; "/>
+   </l:context>
+
+   <l:context name="msgset">
+      <l:template name="MsgAud" text="&#1055;&#1091;&#1073;&#1083;&#1080;&#1082;&#1072;: "/>
+      <l:template name="MsgLevel" text="&#1053;&#1080;&#1074;&#1086;: "/>
+      <l:template name="MsgOrig" text="&#1048;&#1079;&#1074;&#1086;&#1088;: "/>
+   </l:context>
+
+   <l:context name="datetime">
+      <l:template name="format" text="d.m.Y."/>
+   </l:context>
+
+   <l:context name="datetime-full">
+      <l:template name="January" text="&#1112;&#1072;&#1085;&#1091;&#1072;&#1088;"/>
+      <l:template name="February" text="&#1092;&#1077;&#1073;&#1088;&#1091;&#1072;&#1088;"/>
+      <l:template name="March" text="&#1084;&#1072;&#1088;&#1090;"/>
+      <l:template name="April" text="&#1072;&#1087;&#1088;&#1080;&#1083;"/>
+      <l:template name="May" text="&#1084;&#1072;&#1112;"/>
+      <l:template name="June" text="&#1112;&#1091;&#1085;"/>
+      <l:template name="July" text="&#1112;&#1091;&#1083;"/>
+      <l:template name="August" text="&#1072;&#1074;&#1075;&#1091;&#1089;&#1090;"/>
+      <l:template name="September" text="&#1089;&#1077;&#1087;&#1090;&#1077;&#1084;&#1073;&#1072;&#1088;"/>
+      <l:template name="October" text="&#1086;&#1082;&#1090;&#1086;&#1073;&#1072;&#1088;"/>
+      <l:template name="November" text="&#1085;&#1086;&#1074;&#1077;&#1084;&#1073;&#1072;&#1088;"/>
+      <l:template name="December" text="&#1076;&#1077;&#1094;&#1077;&#1084;&#1073;&#1072;&#1088;"/>
+      <l:template name="Monday" text="&#1087;&#1086;&#1085;&#1077;&#1076;&#1077;&#1113;&#1072;&#1082;"/>
+      <l:template name="Tuesday" text="&#1091;&#1090;&#1086;&#1088;&#1072;&#1082;"/>
+      <l:template name="Wednesday" text="&#1089;&#1088;&#1077;&#1076;&#1072;"/>
+      <l:template name="Thursday" text="&#1095;&#1077;&#1090;&#1074;&#1088;&#1090;&#1072;&#1082;"/>
+      <l:template name="Friday" text="&#1087;&#1077;&#1090;&#1072;&#1082;"/>
+      <l:template name="Saturday" text="&#1089;&#1091;&#1073;&#1086;&#1090;&#1072;"/>
+      <l:template name="Sunday" text="&#1085;&#1077;&#1076;&#1077;&#1113;&#1072;"/>
+   </l:context>
+
+   <l:context name="datetime-abbrev">
+      <l:template name="Jan" text="&#1112;&#1072;&#1085;"/>
+      <l:template name="Feb" text="&#1092;&#1077;&#1073;"/>
+      <l:template name="Mar" text="&#1084;&#1072;&#1088;"/>
+      <l:template name="Apr" text="&#1072;&#1087;&#1088;"/>
+      <l:template name="May" text="&#1084;&#1072;&#1112;"/>
+      <l:template name="Jun" text="&#1112;&#1091;&#1085;"/>
+      <l:template name="Jul" text="&#1112;&#1091;&#1083;"/>
+      <l:template name="Aug" text="&#1072;&#1074;&#1075;"/>
+      <l:template name="Sep" text="&#1089;&#1077;&#1087;"/>
+      <l:template name="Oct" text="&#1086;&#1082;&#1090;"/>
+      <l:template name="Nov" text="&#1085;&#1086;&#1074;"/>
+      <l:template name="Dec" text="&#1076;&#1077;&#1094;"/>
+      <l:template name="Mon" text="&#1087;&#1086;&#1085;"/>
+      <l:template name="Tue" text="&#1091;&#1090;&#1086;"/>
+      <l:template name="Wed" text="&#1089;&#1088;&#1077;"/>
+      <l:template name="Thu" text="&#1095;&#1077;&#1090;"/>
+      <l:template name="Fri" text="&#1087;&#1077;&#1090;"/>
+      <l:template name="Sat" text="&#1089;&#1091;&#1073;"/>
+      <l:template name="Sun" text="&#1085;&#1077;&#1076;"/>
+   </l:context>
+
+   <l:context name="htmlhelp">
+      <l:template name="langcode" text="0x081a Serbian (Cyrillic)"/>
+   </l:context>
+
+   <l:letters lang="en">
+      <l:l i="-1"/>
+      <l:l i="0">Symbols</l:l>
+      <l:l i="10">A</l:l>
+      <l:l i="10">a</l:l>
+      <l:l i="10">&#192;</l:l>
+      <l:l i="10">&#224;</l:l>
+      <l:l i="10">&#193;</l:l>
+      <l:l i="10">&#225;</l:l>
+      <l:l i="10">&#194;</l:l>
+      <l:l i="10">&#226;</l:l>
+      <l:l i="10">&#195;</l:l>
+      <l:l i="10">&#227;</l:l>
+      <l:l i="10">&#196;</l:l>
+      <l:l i="10">&#228;</l:l>
+      <l:l i="10">&#197;</l:l>
+      <l:l i="10">&#229;</l:l>
+      <l:l i="10">&#256;</l:l>
+      <l:l i="10">&#257;</l:l>
+      <l:l i="10">&#258;</l:l>
+      <l:l i="10">&#259;</l:l>
+      <l:l i="10">&#260;</l:l>
+      <l:l i="10">&#261;</l:l>
+      <l:l i="10">&#461;</l:l>
+      <l:l i="10">&#462;</l:l>
+      <l:l i="10">&#478;</l:l>
+      <l:l i="10">&#479;</l:l>
+      <l:l i="10">&#480;</l:l>
+      <l:l i="10">&#481;</l:l>
+      <l:l i="10">&#506;</l:l>
+      <l:l i="10">&#507;</l:l>
+      <l:l i="10">&#512;</l:l>
+      <l:l i="10">&#513;</l:l>
+      <l:l i="10">&#514;</l:l>
+      <l:l i="10">&#515;</l:l>
+      <l:l i="10">&#550;</l:l>
+      <l:l i="10">&#551;</l:l>
+      <l:l i="10">&#7680;</l:l>
+      <l:l i="10">&#7681;</l:l>
+      <l:l i="10">&#7834;</l:l>
+      <l:l i="10">&#7840;</l:l>
+      <l:l i="10">&#7841;</l:l>
+      <l:l i="10">&#7842;</l:l>
+      <l:l i="10">&#7843;</l:l>
+      <l:l i="10">&#7844;</l:l>
+      <l:l i="10">&#7845;</l:l>
+      <l:l i="10">&#7846;</l:l>
+      <l:l i="10">&#7847;</l:l>
+      <l:l i="10">&#7848;</l:l>
+      <l:l i="10">&#7849;</l:l>
+      <l:l i="10">&#7850;</l:l>
+      <l:l i="10">&#7851;</l:l>
+      <l:l i="10">&#7852;</l:l>
+      <l:l i="10">&#7853;</l:l>
+      <l:l i="10">&#7854;</l:l>
+      <l:l i="10">&#7855;</l:l>
+      <l:l i="10">&#7856;</l:l>
+      <l:l i="10">&#7857;</l:l>
+      <l:l i="10">&#7858;</l:l>
+      <l:l i="10">&#7859;</l:l>
+      <l:l i="10">&#7860;</l:l>
+      <l:l i="10">&#7861;</l:l>
+      <l:l i="10">&#7862;</l:l>
+      <l:l i="10">&#7863;</l:l>
+      <l:l i="20">B</l:l>
+      <l:l i="20">b</l:l>
+      <l:l i="20">&#384;</l:l>
+      <l:l i="20">&#385;</l:l>
+      <l:l i="20">&#595;</l:l>
+      <l:l i="20">&#386;</l:l>
+      <l:l i="20">&#387;</l:l>
+      <l:l i="20">&#7682;</l:l>
+      <l:l i="20">&#7683;</l:l>
+      <l:l i="20">&#7684;</l:l>
+      <l:l i="20">&#7685;</l:l>
+      <l:l i="20">&#7686;</l:l>
+      <l:l i="20">&#7687;</l:l>
+      <l:l i="30">C</l:l>
+      <l:l i="30">c</l:l>
+      <l:l i="30">&#199;</l:l>
+      <l:l i="30">&#231;</l:l>
+      <l:l i="30">&#262;</l:l>
+      <l:l i="30">&#263;</l:l>
+      <l:l i="30">&#264;</l:l>
+      <l:l i="30">&#265;</l:l>
+      <l:l i="30">&#266;</l:l>
+      <l:l i="30">&#267;</l:l>
+      <l:l i="30">&#268;</l:l>
+      <l:l i="30">&#269;</l:l>
+      <l:l i="30">&#391;</l:l>
+      <l:l i="30">&#392;</l:l>
+      <l:l i="30">&#597;</l:l>
+      <l:l i="30">&#7688;</l:l>
+      <l:l i="30">&#7689;</l:l>
+      <l:l i="40">D</l:l>
+      <l:l i="40">d</l:l>
+      <l:l i="40">&#270;</l:l>
+      <l:l i="40">&#271;</l:l>
+      <l:l i="40">&#272;</l:l>
+      <l:l i="40">&#273;</l:l>
+      <l:l i="40">&#394;</l:l>
+      <l:l i="40">&#599;</l:l>
+      <l:l i="40">&#395;</l:l>
+      <l:l i="40">&#396;</l:l>
+      <l:l i="40">&#453;</l:l>
+      <l:l i="40">&#498;</l:l>
+      <l:l i="40">&#545;</l:l>
+      <l:l i="40">&#598;</l:l>
+      <l:l i="40">&#7690;</l:l>
+      <l:l i="40">&#7691;</l:l>
+      <l:l i="40">&#7692;</l:l>
+      <l:l i="40">&#7693;</l:l>
+      <l:l i="40">&#7694;</l:l>
+      <l:l i="40">&#7695;</l:l>
+      <l:l i="40">&#7696;</l:l>
+      <l:l i="40">&#7697;</l:l>
+      <l:l i="40">&#7698;</l:l>
+      <l:l i="40">&#7699;</l:l>
+      <l:l i="50">E</l:l>
+      <l:l i="50">e</l:l>
+      <l:l i="50">&#200;</l:l>
+      <l:l i="50">&#232;</l:l>
+      <l:l i="50">&#201;</l:l>
+      <l:l i="50">&#233;</l:l>
+      <l:l i="50">&#202;</l:l>
+      <l:l i="50">&#234;</l:l>
+      <l:l i="50">&#203;</l:l>
+      <l:l i="50">&#235;</l:l>
+      <l:l i="50">&#274;</l:l>
+      <l:l i="50">&#275;</l:l>
+      <l:l i="50">&#276;</l:l>
+      <l:l i="50">&#277;</l:l>
+      <l:l i="50">&#278;</l:l>
+      <l:l i="50">&#279;</l:l>
+      <l:l i="50">&#280;</l:l>
+      <l:l i="50">&#281;</l:l>
+      <l:l i="50">&#282;</l:l>
+      <l:l i="50">&#283;</l:l>
+      <l:l i="50">&#516;</l:l>
+      <l:l i="50">&#517;</l:l>
+      <l:l i="50">&#518;</l:l>
+      <l:l i="50">&#519;</l:l>
+      <l:l i="50">&#552;</l:l>
+      <l:l i="50">&#553;</l:l>
+      <l:l i="50">&#7700;</l:l>
+      <l:l i="50">&#7701;</l:l>
+      <l:l i="50">&#7702;</l:l>
+      <l:l i="50">&#7703;</l:l>
+      <l:l i="50">&#7704;</l:l>
+      <l:l i="50">&#7705;</l:l>
+      <l:l i="50">&#7706;</l:l>
+      <l:l i="50">&#7707;</l:l>
+      <l:l i="50">&#7708;</l:l>
+      <l:l i="50">&#7709;</l:l>
+      <l:l i="50">&#7864;</l:l>
+      <l:l i="50">&#7865;</l:l>
+      <l:l i="50">&#7866;</l:l>
+      <l:l i="50">&#7867;</l:l>
+      <l:l i="50">&#7868;</l:l>
+      <l:l i="50">&#7869;</l:l>
+      <l:l i="50">&#7870;</l:l>
+      <l:l i="50">&#7871;</l:l>
+      <l:l i="50">&#7872;</l:l>
+      <l:l i="50">&#7873;</l:l>
+      <l:l i="50">&#7874;</l:l>
+      <l:l i="50">&#7875;</l:l>
+      <l:l i="50">&#7876;</l:l>
+      <l:l i="50">&#7877;</l:l>
+      <l:l i="50">&#7878;</l:l>
+      <l:l i="50">&#7879;</l:l>
+      <l:l i="60">F</l:l>
+      <l:l i="60">f</l:l>
+      <l:l i="60">&#401;</l:l>
+      <l:l i="60">&#402;</l:l>
+      <l:l i="60">&#7710;</l:l>
+      <l:l i="60">&#7711;</l:l>
+      <l:l i="70">G</l:l>
+      <l:l i="70">g</l:l>
+      <l:l i="70">&#284;</l:l>
+      <l:l i="70">&#285;</l:l>
+      <l:l i="70">&#286;</l:l>
+      <l:l i="70">&#287;</l:l>
+      <l:l i="70">&#288;</l:l>
+      <l:l i="70">&#289;</l:l>
+      <l:l i="70">&#290;</l:l>
+      <l:l i="70">&#291;</l:l>
+      <l:l i="70">&#403;</l:l>
+      <l:l i="70">&#608;</l:l>
+      <l:l i="70">&#484;</l:l>
+      <l:l i="70">&#485;</l:l>
+      <l:l i="70">&#486;</l:l>
+      <l:l i="70">&#487;</l:l>
+      <l:l i="70">&#500;</l:l>
+      <l:l i="70">&#501;</l:l>
+      <l:l i="70">&#7712;</l:l>
+      <l:l i="70">&#7713;</l:l>
+      <l:l i="80">H</l:l>
+      <l:l i="80">h</l:l>
+      <l:l i="80">&#292;</l:l>
+      <l:l i="80">&#293;</l:l>
+      <l:l i="80">&#294;</l:l>
+      <l:l i="80">&#295;</l:l>
+      <l:l i="80">&#542;</l:l>
+      <l:l i="80">&#543;</l:l>
+      <l:l i="80">&#614;</l:l>
+      <l:l i="80">&#7714;</l:l>
+      <l:l i="80">&#7715;</l:l>
+      <l:l i="80">&#7716;</l:l>
+      <l:l i="80">&#7717;</l:l>
+      <l:l i="80">&#7718;</l:l>
+      <l:l i="80">&#7719;</l:l>
+      <l:l i="80">&#7720;</l:l>
+      <l:l i="80">&#7721;</l:l>
+      <l:l i="80">&#7722;</l:l>
+      <l:l i="80">&#7723;</l:l>
+      <l:l i="80">&#7830;</l:l>
+      <l:l i="90">I</l:l>
+      <l:l i="90">i</l:l>
+      <l:l i="90">&#204;</l:l>
+      <l:l i="90">&#236;</l:l>
+      <l:l i="90">&#205;</l:l>
+      <l:l i="90">&#237;</l:l>
+      <l:l i="90">&#206;</l:l>
+      <l:l i="90">&#238;</l:l>
+      <l:l i="90">&#207;</l:l>
+      <l:l i="90">&#239;</l:l>
+      <l:l i="90">&#296;</l:l>
+      <l:l i="90">&#297;</l:l>
+      <l:l i="90">&#298;</l:l>
+      <l:l i="90">&#299;</l:l>
+      <l:l i="90">&#300;</l:l>
+      <l:l i="90">&#301;</l:l>
+      <l:l i="90">&#302;</l:l>
+      <l:l i="90">&#303;</l:l>
+      <l:l i="90">&#304;</l:l>
+      <l:l i="90">&#407;</l:l>
+      <l:l i="90">&#616;</l:l>
+      <l:l i="90">&#463;</l:l>
+      <l:l i="90">&#464;</l:l>
+      <l:l i="90">&#520;</l:l>
+      <l:l i="90">&#521;</l:l>
+      <l:l i="90">&#522;</l:l>
+      <l:l i="90">&#523;</l:l>
+      <l:l i="90">&#7724;</l:l>
+      <l:l i="90">&#7725;</l:l>
+      <l:l i="90">&#7726;</l:l>
+      <l:l i="90">&#7727;</l:l>
+      <l:l i="90">&#7880;</l:l>
+      <l:l i="90">&#7881;</l:l>
+      <l:l i="90">&#7882;</l:l>
+      <l:l i="90">&#7883;</l:l>
+      <l:l i="100">J</l:l>
+      <l:l i="100">j</l:l>
+      <l:l i="100">&#308;</l:l>
+      <l:l i="100">&#309;</l:l>
+      <l:l i="100">&#496;</l:l>
+      <l:l i="100">&#669;</l:l>
+      <l:l i="110">K</l:l>
+      <l:l i="110">k</l:l>
+      <l:l i="110">&#310;</l:l>
+      <l:l i="110">&#311;</l:l>
+      <l:l i="110">&#408;</l:l>
+      <l:l i="110">&#409;</l:l>
+      <l:l i="110">&#488;</l:l>
+      <l:l i="110">&#489;</l:l>
+      <l:l i="110">&#7728;</l:l>
+      <l:l i="110">&#7729;</l:l>
+      <l:l i="110">&#7730;</l:l>
+      <l:l i="110">&#7731;</l:l>
+      <l:l i="110">&#7732;</l:l>
+      <l:l i="110">&#7733;</l:l>
+      <l:l i="120">L</l:l>
+      <l:l i="120">l</l:l>
+      <l:l i="120">&#313;</l:l>
+      <l:l i="120">&#314;</l:l>
+      <l:l i="120">&#315;</l:l>
+      <l:l i="120">&#316;</l:l>
+      <l:l i="120">&#317;</l:l>
+      <l:l i="120">&#318;</l:l>
+      <l:l i="120">&#319;</l:l>
+      <l:l i="120">&#320;</l:l>
+      <l:l i="120">&#321;</l:l>
+      <l:l i="120">&#322;</l:l>
+      <l:l i="120">&#410;</l:l>
+      <l:l i="120">&#456;</l:l>
+      <l:l i="120">&#564;</l:l>
+      <l:l i="120">&#619;</l:l>
+      <l:l i="120">&#620;</l:l>
+      <l:l i="120">&#621;</l:l>
+      <l:l i="120">&#7734;</l:l>
+      <l:l i="120">&#7735;</l:l>
+      <l:l i="120">&#7736;</l:l>
+      <l:l i="120">&#7737;</l:l>
+      <l:l i="120">&#7738;</l:l>
+      <l:l i="120">&#7739;</l:l>
+      <l:l i="120">&#7740;</l:l>
+      <l:l i="120">&#7741;</l:l>
+      <l:l i="130">M</l:l>
+      <l:l i="130">m</l:l>
+      <l:l i="130">&#625;</l:l>
+      <l:l i="130">&#7742;</l:l>
+      <l:l i="130">&#7743;</l:l>
+      <l:l i="130">&#7744;</l:l>
+      <l:l i="130">&#7745;</l:l>
+      <l:l i="130">&#7746;</l:l>
+      <l:l i="130">&#7747;</l:l>
+      <l:l i="140">N</l:l>
+      <l:l i="140">n</l:l>
+      <l:l i="140">&#209;</l:l>
+      <l:l i="140">&#241;</l:l>
+      <l:l i="140">&#323;</l:l>
+      <l:l i="140">&#324;</l:l>
+      <l:l i="140">&#325;</l:l>
+      <l:l i="140">&#326;</l:l>
+      <l:l i="140">&#327;</l:l>
+      <l:l i="140">&#328;</l:l>
+      <l:l i="140">&#413;</l:l>
+      <l:l i="140">&#626;</l:l>
+      <l:l i="140">&#414;</l:l>
+      <l:l i="140">&#544;</l:l>
+      <l:l i="140">&#459;</l:l>
+      <l:l i="140">&#504;</l:l>
+      <l:l i="140">&#505;</l:l>
+      <l:l i="140">&#565;</l:l>
+      <l:l i="140">&#627;</l:l>
+      <l:l i="140">&#7748;</l:l>
+      <l:l i="140">&#7749;</l:l>
+      <l:l i="140">&#7750;</l:l>
+      <l:l i="140">&#7751;</l:l>
+      <l:l i="140">&#7752;</l:l>
+      <l:l i="140">&#7753;</l:l>
+      <l:l i="140">&#7754;</l:l>
+      <l:l i="140">&#7755;</l:l>
+      <l:l i="150">O</l:l>
+      <l:l i="150">o</l:l>
+      <l:l i="150">&#210;</l:l>
+      <l:l i="150">&#242;</l:l>
+      <l:l i="150">&#211;</l:l>
+      <l:l i="150">&#243;</l:l>
+      <l:l i="150">&#212;</l:l>
+      <l:l i="150">&#244;</l:l>
+      <l:l i="150">&#213;</l:l>
+      <l:l i="150">&#245;</l:l>
+      <l:l i="150">&#214;</l:l>
+      <l:l i="150">&#246;</l:l>
+      <l:l i="150">&#216;</l:l>
+      <l:l i="150">&#248;</l:l>
+      <l:l i="150">&#332;</l:l>
+      <l:l i="150">&#333;</l:l>
+      <l:l i="150">&#334;</l:l>
+      <l:l i="150">&#335;</l:l>
+      <l:l i="150">&#336;</l:l>
+      <l:l i="150">&#337;</l:l>
+      <l:l i="150">&#415;</l:l>
+      <l:l i="150">&#416;</l:l>
+      <l:l i="150">&#417;</l:l>
+      <l:l i="150">&#465;</l:l>
+      <l:l i="150">&#466;</l:l>
+      <l:l i="150">&#490;</l:l>
+      <l:l i="150">&#491;</l:l>
+      <l:l i="150">&#492;</l:l>
+      <l:l i="150">&#493;</l:l>
+      <l:l i="150">&#510;</l:l>
+      <l:l i="150">&#511;</l:l>
+      <l:l i="150">&#524;</l:l>
+      <l:l i="150">&#525;</l:l>
+      <l:l i="150">&#526;</l:l>
+      <l:l i="150">&#527;</l:l>
+      <l:l i="150">&#554;</l:l>
+      <l:l i="150">&#555;</l:l>
+      <l:l i="150">&#556;</l:l>
+      <l:l i="150">&#557;</l:l>
+      <l:l i="150">&#558;</l:l>
+      <l:l i="150">&#559;</l:l>
+      <l:l i="150">&#560;</l:l>
+      <l:l i="150">&#561;</l:l>
+      <l:l i="150">&#7756;</l:l>
+      <l:l i="150">&#7757;</l:l>
+      <l:l i="150">&#7758;</l:l>
+      <l:l i="150">&#7759;</l:l>
+      <l:l i="150">&#7760;</l:l>
+      <l:l i="150">&#7761;</l:l>
+      <l:l i="150">&#7762;</l:l>
+      <l:l i="150">&#7763;</l:l>
+      <l:l i="150">&#7884;</l:l>
+      <l:l i="150">&#7885;</l:l>
+      <l:l i="150">&#7886;</l:l>
+      <l:l i="150">&#7887;</l:l>
+      <l:l i="150">&#7888;</l:l>
+      <l:l i="150">&#7889;</l:l>
+      <l:l i="150">&#7890;</l:l>
+      <l:l i="150">&#7891;</l:l>
+      <l:l i="150">&#7892;</l:l>
+      <l:l i="150">&#7893;</l:l>
+      <l:l i="150">&#7894;</l:l>
+      <l:l i="150">&#7895;</l:l>
+      <l:l i="150">&#7896;</l:l>
+      <l:l i="150">&#7897;</l:l>
+      <l:l i="150">&#7898;</l:l>
+      <l:l i="150">&#7899;</l:l>
+      <l:l i="150">&#7900;</l:l>
+      <l:l i="150">&#7901;</l:l>
+      <l:l i="150">&#7902;</l:l>
+      <l:l i="150">&#7903;</l:l>
+      <l:l i="150">&#7904;</l:l>
+      <l:l i="150">&#7905;</l:l>
+      <l:l i="150">&#7906;</l:l>
+      <l:l i="150">&#7907;</l:l>
+      <l:l i="160">P</l:l>
+      <l:l i="160">p</l:l>
+      <l:l i="160">&#420;</l:l>
+      <l:l i="160">&#421;</l:l>
+      <l:l i="160">&#7764;</l:l>
+      <l:l i="160">&#7765;</l:l>
+      <l:l i="160">&#7766;</l:l>
+      <l:l i="160">&#7767;</l:l>
+      <l:l i="170">Q</l:l>
+      <l:l i="170">q</l:l>
+      <l:l i="170">&#672;</l:l>
+      <l:l i="180">R</l:l>
+      <l:l i="180">r</l:l>
+      <l:l i="180">&#340;</l:l>
+      <l:l i="180">&#341;</l:l>
+      <l:l i="180">&#342;</l:l>
+      <l:l i="180">&#343;</l:l>
+      <l:l i="180">&#344;</l:l>
+      <l:l i="180">&#345;</l:l>
+      <l:l i="180">&#528;</l:l>
+      <l:l i="180">&#529;</l:l>
+      <l:l i="180">&#530;</l:l>
+      <l:l i="180">&#531;</l:l>
+      <l:l i="180">&#636;</l:l>
+      <l:l i="180">&#637;</l:l>
+      <l:l i="180">&#638;</l:l>
+      <l:l i="180">&#7768;</l:l>
+      <l:l i="180">&#7769;</l:l>
+      <l:l i="180">&#7770;</l:l>
+      <l:l i="180">&#7771;</l:l>
+      <l:l i="180">&#7772;</l:l>
+      <l:l i="180">&#7773;</l:l>
+      <l:l i="180">&#7774;</l:l>
+      <l:l i="180">&#7775;</l:l>
+      <l:l i="190">S</l:l>
+      <l:l i="190">s</l:l>
+      <l:l i="190">&#346;</l:l>
+      <l:l i="190">&#347;</l:l>
+      <l:l i="190">&#348;</l:l>
+      <l:l i="190">&#349;</l:l>
+      <l:l i="190">&#350;</l:l>
+      <l:l i="190">&#351;</l:l>
+      <l:l i="190">&#352;</l:l>
+      <l:l i="190">&#353;</l:l>
+      <l:l i="190">&#536;</l:l>
+      <l:l i="190">&#537;</l:l>
+      <l:l i="190">&#642;</l:l>
+      <l:l i="190">&#7776;</l:l>
+      <l:l i="190">&#7777;</l:l>
+      <l:l i="190">&#7778;</l:l>
+      <l:l i="190">&#7779;</l:l>
+      <l:l i="190">&#7780;</l:l>
+      <l:l i="190">&#7781;</l:l>
+      <l:l i="190">&#7782;</l:l>
+      <l:l i="190">&#7783;</l:l>
+      <l:l i="190">&#7784;</l:l>
+      <l:l i="190">&#7785;</l:l>
+      <l:l i="200">T</l:l>
+      <l:l i="200">t</l:l>
+      <l:l i="200">&#354;</l:l>
+      <l:l i="200">&#355;</l:l>
+      <l:l i="200">&#356;</l:l>
+      <l:l i="200">&#357;</l:l>
+      <l:l i="200">&#358;</l:l>
+      <l:l i="200">&#359;</l:l>
+      <l:l i="200">&#427;</l:l>
+      <l:l i="200">&#428;</l:l>
+      <l:l i="200">&#429;</l:l>
+      <l:l i="200">&#430;</l:l>
+      <l:l i="200">&#648;</l:l>
+      <l:l i="200">&#538;</l:l>
+      <l:l i="200">&#539;</l:l>
+      <l:l i="200">&#566;</l:l>
+      <l:l i="200">&#7786;</l:l>
+      <l:l i="200">&#7787;</l:l>
+      <l:l i="200">&#7788;</l:l>
+      <l:l i="200">&#7789;</l:l>
+      <l:l i="200">&#7790;</l:l>
+      <l:l i="200">&#7791;</l:l>
+      <l:l i="200">&#7792;</l:l>
+      <l:l i="200">&#7793;</l:l>
+      <l:l i="200">&#7831;</l:l>
+      <l:l i="210">U</l:l>
+      <l:l i="210">u</l:l>
+      <l:l i="210">&#217;</l:l>
+      <l:l i="210">&#249;</l:l>
+      <l:l i="210">&#218;</l:l>
+      <l:l i="210">&#250;</l:l>
+      <l:l i="210">&#219;</l:l>
+      <l:l i="210">&#251;</l:l>
+      <l:l i="210">&#220;</l:l>
+      <l:l i="210">&#252;</l:l>
+      <l:l i="210">&#360;</l:l>
+      <l:l i="210">&#361;</l:l>
+      <l:l i="210">&#362;</l:l>
+      <l:l i="210">&#363;</l:l>
+      <l:l i="210">&#364;</l:l>
+      <l:l i="210">&#365;</l:l>
+      <l:l i="210">&#366;</l:l>
+      <l:l i="210">&#367;</l:l>
+      <l:l i="210">&#368;</l:l>
+      <l:l i="210">&#369;</l:l>
+      <l:l i="210">&#370;</l:l>
+      <l:l i="210">&#371;</l:l>
+      <l:l i="210">&#431;</l:l>
+      <l:l i="210">&#432;</l:l>
+      <l:l i="210">&#467;</l:l>
+      <l:l i="210">&#468;</l:l>
+      <l:l i="210">&#469;</l:l>
+      <l:l i="210">&#470;</l:l>
+      <l:l i="210">&#471;</l:l>
+      <l:l i="210">&#472;</l:l>
+      <l:l i="210">&#473;</l:l>
+      <l:l i="210">&#474;</l:l>
+      <l:l i="210">&#475;</l:l>
+      <l:l i="210">&#476;</l:l>
+      <l:l i="210">&#532;</l:l>
+      <l:l i="210">&#533;</l:l>
+      <l:l i="210">&#534;</l:l>
+      <l:l i="210">&#535;</l:l>
+      <l:l i="210">&#7794;</l:l>
+      <l:l i="210">&#7795;</l:l>
+      <l:l i="210">&#7796;</l:l>
+      <l:l i="210">&#7797;</l:l>
+      <l:l i="210">&#7798;</l:l>
+      <l:l i="210">&#7799;</l:l>
+      <l:l i="210">&#7800;</l:l>
+      <l:l i="210">&#7801;</l:l>
+      <l:l i="210">&#7802;</l:l>
+      <l:l i="210">&#7803;</l:l>
+      <l:l i="210">&#7908;</l:l>
+      <l:l i="210">&#7909;</l:l>
+      <l:l i="210">&#7910;</l:l>
+      <l:l i="210">&#7911;</l:l>
+      <l:l i="210">&#7912;</l:l>
+      <l:l i="210">&#7913;</l:l>
+      <l:l i="210">&#7914;</l:l>
+      <l:l i="210">&#7915;</l:l>
+      <l:l i="210">&#7916;</l:l>
+      <l:l i="210">&#7917;</l:l>
+      <l:l i="210">&#7918;</l:l>
+      <l:l i="210">&#7919;</l:l>
+      <l:l i="210">&#7920;</l:l>
+      <l:l i="210">&#7921;</l:l>
+      <l:l i="220">V</l:l>
+      <l:l i="220">v</l:l>
+      <l:l i="220">&#434;</l:l>
+      <l:l i="220">&#651;</l:l>
+      <l:l i="220">&#7804;</l:l>
+      <l:l i="220">&#7805;</l:l>
+      <l:l i="220">&#7806;</l:l>
+      <l:l i="220">&#7807;</l:l>
+      <l:l i="230">W</l:l>
+      <l:l i="230">w</l:l>
+      <l:l i="230">&#372;</l:l>
+      <l:l i="230">&#373;</l:l>
+      <l:l i="230">&#7808;</l:l>
+      <l:l i="230">&#7809;</l:l>
+      <l:l i="230">&#7810;</l:l>
+      <l:l i="230">&#7811;</l:l>
+      <l:l i="230">&#7812;</l:l>
+      <l:l i="230">&#7813;</l:l>
+      <l:l i="230">&#7814;</l:l>
+      <l:l i="230">&#7815;</l:l>
+      <l:l i="230">&#7816;</l:l>
+      <l:l i="230">&#7817;</l:l>
+      <l:l i="230">&#7832;</l:l>
+      <l:l i="240">X</l:l>
+      <l:l i="240">x</l:l>
+      <l:l i="240">&#7818;</l:l>
+      <l:l i="240">&#7819;</l:l>
+      <l:l i="240">&#7820;</l:l>
+      <l:l i="240">&#7821;</l:l>
+      <l:l i="250">Y</l:l>
+      <l:l i="250">y</l:l>
+      <l:l i="250">&#221;</l:l>
+      <l:l i="250">&#253;</l:l>
+      <l:l i="250">&#255;</l:l>
+      <l:l i="250">&#376;</l:l>
+      <l:l i="250">&#374;</l:l>
+      <l:l i="250">&#375;</l:l>
+      <l:l i="250">&#435;</l:l>
+      <l:l i="250">&#436;</l:l>
+      <l:l i="250">&#562;</l:l>
+      <l:l i="250">&#563;</l:l>
+      <l:l i="250">&#7822;</l:l>
+      <l:l i="250">&#7823;</l:l>
+      <l:l i="250">&#7833;</l:l>
+      <l:l i="250">&#7922;</l:l>
+      <l:l i="250">&#7923;</l:l>
+      <l:l i="250">&#7924;</l:l>
+      <l:l i="250">&#7925;</l:l>
+      <l:l i="250">&#7926;</l:l>
+      <l:l i="250">&#7927;</l:l>
+      <l:l i="250">&#7928;</l:l>
+      <l:l i="250">&#7929;</l:l>
+      <l:l i="260">Z</l:l>
+      <l:l i="260">z</l:l>
+      <l:l i="260">&#377;</l:l>
+      <l:l i="260">&#378;</l:l>
+      <l:l i="260">&#379;</l:l>
+      <l:l i="260">&#380;</l:l>
+      <l:l i="260">&#381;</l:l>
+      <l:l i="260">&#382;</l:l>
+      <l:l i="260">&#437;</l:l>
+      <l:l i="260">&#438;</l:l>
+      <l:l i="260">&#548;</l:l>
+      <l:l i="260">&#549;</l:l>
+      <l:l i="260">&#656;</l:l>
+      <l:l i="260">&#657;</l:l>
+      <l:l i="260">&#7824;</l:l>
+      <l:l i="260">&#7825;</l:l>
+      <l:l i="260">&#7826;</l:l>
+      <l:l i="260">&#7827;</l:l>
+      <l:l i="260">&#7828;</l:l>
+      <l:l i="260">&#7829;</l:l>
+   </l:letters>
+</l:l10n>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/sr_Latn.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/sr_Latn.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/sr_Latn.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1153 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="sr_Latn" english-language-name="Serbian in Latin script">
+
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+   <l:gentext key="Abstract" text="Pregled"/>
+   <l:gentext key="abstract" text="Pregled"/>
+   <l:gentext key="Answer" text="O:"/>
+   <l:gentext key="answer" text="O:"/>
+   <l:gentext key="Appendix" text="Dodatak"/>
+   <l:gentext key="appendix" text="dodatak"/>
+   <l:gentext key="Article" text="&#268;lanak"/>
+   <l:gentext key="article" text="&#268;lanak"/>
+   <l:gentext key="Bibliography" text="Literatura"/>
+   <l:gentext key="bibliography" text="Literatura"/>
+   <l:gentext key="Book" text="Knjiga"/>
+   <l:gentext key="book" text="Knjiga"/>
+   <l:gentext key="CAUTION" text="UPOZORENJE"/>
+   <l:gentext key="Caution" text="Upozorenje"/>
+   <l:gentext key="caution" text="Upozorenje"/>
+   <l:gentext key="Chapter" text="Poglavlje"/>
+   <l:gentext key="chapter" text="poglavlje"/>
+   <l:gentext key="Colophon" text="Kolofon"/>
+   <l:gentext key="colophon" text="Kolofon"/>
+   <l:gentext key="Copyright" text="Pravna za&#353;tita"/>
+   <l:gentext key="copyright" text="Pravna za&#353;tita"/>
+   <l:gentext key="Dedication" text="Posveta"/>
+   <l:gentext key="dedication" text="Posveta"/>
+   <l:gentext key="Edition" text="Izdanje"/>
+   <l:gentext key="edition" text="Izdanje"/>
+   <l:gentext key="Equation" text="Jedna&#269;ina"/>
+   <l:gentext key="equation" text="Jedna&#269;ina"/>
+   <l:gentext key="Example" text="Primer"/>
+   <l:gentext key="example" text="Primer"/>
+   <l:gentext key="Figure" text="Slika"/>
+   <l:gentext key="figure" text="Slika"/>
+   <l:gentext key="Glossary" text="Re&#269;nik"/>
+   <l:gentext key="glossary" text="Re&#269;nik"/>
+   <l:gentext key="GlossSee" text="Vidi"/>
+   <l:gentext key="glosssee" text="Vidi"/>
+   <l:gentext key="GlossSeeAlso" text="Vidi tako&#273;e"/>
+   <l:gentext key="glossseealso" text="Vidi tako&#273;e"/>
+   <l:gentext key="IMPORTANT" text="VA&#381;NO"/>
+   <l:gentext key="important" text="Va&#382;no"/>
+   <l:gentext key="Important" text="Va&#382;no"/>
+   <l:gentext key="Index" text="Indeks"/>
+   <l:gentext key="index" text="Indeks"/>
+   <l:gentext key="ISBN" text="ISBN"/>
+   <l:gentext key="isbn" text="ISBN"/>
+   <l:gentext key="LegalNotice" text="Pravno obave&#353;tenje"/>
+   <l:gentext key="legalnotice" text="Pravno obave&#353;tenje"/>
+   <l:gentext key="MsgAud" text="MsgAud"/>
+   <l:gentext key="msgaud" text="MsgAud"/>
+   <l:gentext key="MsgLevel" text="Nivo"/>
+   <l:gentext key="msglevel" text="Nivo"/>
+   <l:gentext key="MsgOrig" text="Izvor"/>
+   <l:gentext key="msgorig" text="Izvor"/>
+   <l:gentext key="NOTE" text="PRIMEDBA"/>
+   <l:gentext key="Note" text="Primedba"/>
+   <l:gentext key="note" text="Primedba"/>
+   <l:gentext key="Part" text="Deo"/>
+   <l:gentext key="part" text="Deo"/>
+   <l:gentext key="Preface" text="Predgovor"/>
+   <l:gentext key="preface" text="Predgovor"/>
+   <l:gentext key="Procedure" text="Postupak"/>
+   <l:gentext key="procedure" text="Postupak"/>
+   <l:gentext key="ProductionSet" text="Production"/>
+   <l:gentext key="PubDate" text="Publication Date" lang="en"/>
+   <l:gentext key="pubdate" text="Publication date" lang="en"/>
+   <l:gentext key="Published" text="Izdato"/>
+   <l:gentext key="published" text="Izdato"/>
+   <l:gentext key="Qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="Question" text="P:"/>
+   <l:gentext key="question" text="P:"/>
+   <l:gentext key="RefEntry" text=""/>
+   <l:gentext key="refentry" text=""/>
+   <l:gentext key="Reference" text="Referenca"/>
+   <l:gentext key="reference" text="Referenca"/>
+   <l:gentext key="RefName" text="Ime"/>
+   <l:gentext key="refname" text="Ime"/>
+   <l:gentext key="RefSection" text=""/>
+   <l:gentext key="refsection" text=""/>
+   <l:gentext key="RefSynopsisDiv" text="Sinopsis"/>
+   <l:gentext key="refsynopsisdiv" text="Sinopsis"/>
+   <l:gentext key="RevHistory" text="Istorija revizija"/>
+   <l:gentext key="revhistory" text="Istorija revizija"/>
+   <l:gentext key="revision" text="Revizija"/>
+   <l:gentext key="Revision" text="Revizija"/>
+   <l:gentext key="sect1" text="Section"/>
+   <l:gentext key="sect2" text="Section"/>
+   <l:gentext key="sect3" text="Section"/>
+   <l:gentext key="sect4" text="Section"/>
+   <l:gentext key="sect5" text="Section"/>
+   <l:gentext key="section" text="sekcija"/>
+   <l:gentext key="Section" text="Odeljak"/>
+   <l:gentext key="see" text="vidi"/>
+   <l:gentext key="See" text="vidi"/>
+   <l:gentext key="seealso" text="vidi tako&#273;e"/>
+   <l:gentext key="Seealso" text="Vidi tako&#273;e"/>
+   <l:gentext key="SeeAlso" text="vidi tako&#273;e"/>
+   <l:gentext key="set" text="Postavi"/>
+   <l:gentext key="Set" text="Postavi"/>
+   <l:gentext key="setindex" text="Postavi indeks"/>
+   <l:gentext key="SetIndex" text="Postavi indeks"/>
+   <l:gentext key="Sidebar" text=""/>
+   <l:gentext key="sidebar" text="sidebar"/>
+   <l:gentext key="step" text="korak"/>
+   <l:gentext key="Step" text="Korak"/>
+   <l:gentext key="Table" text="Tabela"/>
+   <l:gentext key="table" text="Tabela"/>
+   <l:gentext key="tip" text="Savet"/>
+   <l:gentext key="TIP" text="SAVET"/>
+   <l:gentext key="Tip" text="Savet"/>
+   <l:gentext key="Warning" text="Upozorenje"/>
+   <l:gentext key="warning" text="Upozorenje"/>
+   <l:gentext key="WARNING" text="UPOZORENJE"/>
+   <l:gentext key="and" text="i"/>
+   <l:gentext key="by" text="od"/>
+   <l:gentext key="called" text="called" lang="en"/>
+   <l:gentext key="Edited" text="Ure&#273;eno"/>
+   <l:gentext key="edited" text="Ure&#273;eno"/>
+   <l:gentext key="Editedby" text="Ure&#273;eno od"/>
+   <l:gentext key="editedby" text="Ure&#273;eno od"/>
+   <l:gentext key="in" text="u"/>
+   <l:gentext key="lastlistcomma" text=","/>
+   <l:gentext key="listcomma" text=","/>
+   <l:gentext key="nonexistantelement" text="nepostoje&#263;i element"/>
+   <l:gentext key="notes" text="Notes"/>
+   <l:gentext key="Notes" text="Notes"/>
+   <l:gentext key="Pgs" text="Str."/>
+   <l:gentext key="pgs" text="Str."/>
+   <l:gentext key="Revisedby" text="Revised by: "/>
+   <l:gentext key="revisedby" text="Revised by: "/>
+   <l:gentext key="TableNotes" text="Notes"/>
+   <l:gentext key="tablenotes" text="Notes"/>
+   <l:gentext key="TableofContents" text="Sadr&#382;aj"/>
+   <l:gentext key="tableofcontents" text="Sadr&#382;aj"/>
+   <l:gentext key="the" text="" lang="en"/>
+   <l:gentext key="unexpectedelementname" text="Neo&#269;ekivano ime elementa"/>
+   <l:gentext key="unsupported" text="nepodr&#382;ano"/>
+   <l:gentext key="xrefto" text="xref na"/>
+   <l:gentext key="listofequations" text="Spisak jedna&#269;ina"/>
+   <l:gentext key="ListofEquations" text="Spisak jedna&#269;ina"/>
+   <l:gentext key="ListofExamples" text="Spisak primera"/>
+   <l:gentext key="listofexamples" text="Spisak primera"/>
+   <l:gentext key="ListofFigures" text="Spisak slika"/>
+   <l:gentext key="listoffigures" text="Spisak slika"/>
+   <l:gentext key="ListofProcedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listofprocedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listoftables" text="Spisak tabela"/>
+   <l:gentext key="ListofTables" text="Spisak tabela"/>
+   <l:gentext key="ListofUnknown" text="Spisak nepoznanica"/>
+   <l:gentext key="listofunknown" text="Spisak nepoznanica"/>
+   <l:gentext key="nav-home" text="Ku&#263;i"/>
+   <l:gentext key="nav-next" text="Napred"/>
+   <l:gentext key="nav-next-sibling" text="Brzo napred"/>
+   <l:gentext key="nav-prev" text="Nazad"/>
+   <l:gentext key="nav-prev-sibling" text="Brzo nazad"/>
+   <l:gentext key="nav-up" text="Gore"/>
+   <l:gentext key="nav-toc" text="ToC" lang="en"/>
+   <l:gentext key="Draft" text="Draft"/>
+   <l:gentext key="above" text="above"/>
+   <l:gentext key="below" text="below"/>
+   <l:gentext key="sectioncalled" text="the section called"/>
+   <l:gentext key="index symbols" text="Symbols"/>
+   <l:gentext key="lowercase.alpha" text="abcdefghijklmnopqrstuvwxyz"/>
+   <l:gentext key="uppercase.alpha" text="ABCDEFGHIJKLMNOPQRSTUVWXYZ"/>
+   <l:dingbat key="startquote" text="&#8220;"/>
+   <l:dingbat key="endquote" text="&#8221;"/>
+   <l:dingbat key="nestedstartquote" text="&#8216;"/>
+   <l:dingbat key="nestedendquote" text="&#8217;"/>
+   <l:dingbat key="singlestartquote" text="&#8216;" lang="en"/>
+   <l:dingbat key="singleendquote" text="&#8217;" lang="en"/>
+   <l:dingbat key="bullet" text="&#8226;"/>
+   <l:gentext key="hyphenation-character" text="-" lang="en"/>
+   <l:gentext key="hyphenation-push-character-count" text="2" lang="en"/>
+   <l:gentext key="hyphenation-remain-character-count" text="2" lang="en"/>
+
+   <l:context name="styles">
+      <l:template name="person-name" text="first-last"/>
+   </l:context>
+
+   <l:context name="title">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="%t"/>
+      <l:template name="appendix" text="Dodatak %n. %t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="biblioentry" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliolist" text="%t" lang="en"/>
+      <l:template name="bibliomixed" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="Poglavlje %n. %t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="Jedna&#269;ina %n. %t"/>
+      <l:template name="example" text="Primer %n. %t"/>
+      <l:template name="figure" text="Slika %n. %t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="glosslist" text="%t" lang="en"/>
+      <l:template name="glossentry" text="%t" lang="en"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text=""/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="Deo %n. %t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="procedure.formal" text="Postupak&#160;%n.&#160;%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="productionset.formal" text="Production&#160;%n"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="%t"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="%t"/>
+      <l:template name="refentry" text="%t"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsection" text="%t"/>
+      <l:template name="refsect1" text="%t"/>
+      <l:template name="refsect2" text="%t"/>
+      <l:template name="refsect3" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="refsynopsisdivinfo" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="step" text="%t"/>
+      <l:template name="table" text="Tabela %n. %t"/>
+      <l:template name="task" text="%t" lang="en"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="" lang="en"/>
+      <l:template name="warning" text="%t"/>
+   </l:context>
+
+   <l:context name="title-unnumbered">
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article/appendix" text="%t" lang="en"/>
+      <l:template name="bridgehead" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="sect1" text="%t"/>
+      <l:template name="sect2" text="%t"/>
+      <l:template name="sect3" text="%t"/>
+      <l:template name="sect4" text="%t"/>
+      <l:template name="sect5" text="%t"/>
+      <l:template name="section" text="%t"/>
+      <l:template name="simplesect" text="%t"/>
+   </l:context>
+
+   <l:context name="title-numbered">
+      <l:template name="appendix" text="Dodatak %n. %t"/>
+      <l:template name="article/appendix" text="%n.&#160;%t" lang="en"/>
+      <l:template name="bridgehead" text="%t"/>
+      <l:template name="chapter" text="Poglavlje %n. %t"/>
+      <l:template name="sect1" text="%n. %t"/>
+      <l:template name="sect2" text="%n. %t"/>
+      <l:template name="sect3" text="%n. %t"/>
+      <l:template name="sect4" text="%n. %t"/>
+      <l:template name="sect5" text="%n. %t"/>
+      <l:template name="section" text="%n. %t"/>
+      <l:template name="simplesect" text="%n. %t"/>
+   </l:context>
+
+   <l:context name="subtitle">
+      <l:template name="appendix" text="%s"/>
+      <l:template name="article" text="%s"/>
+      <l:template name="bibliodiv" text="%s"/>
+      <l:template name="biblioentry" text="%s"/>
+      <l:template name="bibliography" text="%s"/>
+      <l:template name="bibliomixed" text="%s"/>
+      <l:template name="bibliomset" text="%s"/>
+      <l:template name="biblioset" text="%s"/>
+      <l:template name="book" text="%s"/>
+      <l:template name="chapter" text="%s"/>
+      <l:template name="colophon" text="%s"/>
+      <l:template name="dedication" text="%s"/>
+      <l:template name="glossary" text="%s"/>
+      <l:template name="glossdiv" text="%s"/>
+      <l:template name="index" text="%s"/>
+      <l:template name="indexdiv" text="%s"/>
+      <l:template name="lot" text="%s"/>
+      <l:template name="part" text="%s"/>
+      <l:template name="partintro" text="%s"/>
+      <l:template name="preface" text="%s"/>
+      <l:template name="refentry" text="%s"/>
+      <l:template name="reference" text="%s"/>
+      <l:template name="refsection" text="%s"/>
+      <l:template name="refsect1" text="%s"/>
+      <l:template name="refsect2" text="%s"/>
+      <l:template name="refsect3" text="%s"/>
+      <l:template name="refsynopsisdiv" text="%s"/>
+      <l:template name="sect1" text="%s"/>
+      <l:template name="sect2" text="%s"/>
+      <l:template name="sect3" text="%s"/>
+      <l:template name="sect4" text="%s"/>
+      <l:template name="sect5" text="%s"/>
+      <l:template name="section" text="%s"/>
+      <l:template name="set" text="%s"/>
+      <l:template name="setindex" text="%s"/>
+      <l:template name="sidebar" text="%s"/>
+      <l:template name="simplesect" text="%s"/>
+      <l:template name="toc" text="%s"/>
+   </l:context>
+
+   <l:context name="xref">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="O:&#160;%n"/>
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="constraintdef" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="%t"/>
+      <l:template name="example" text="%t"/>
+      <l:template name="figure" text="%t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text="%n"/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="%t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="P:&#160;%n"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="P:&#160;%n"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="table" text="%t"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="%n"/>
+      <l:template name="warning" text="%t"/>
+      <l:template name="page.citation" text=" [%p]"/>
+      <l:template name="page" text="(page %p)" lang="en"/>
+      <l:template name="pageabbrev" text="(p. %p)" lang="en"/>
+      <l:template name="Page" text="Page %p" lang="en"/>
+      <l:template name="bridgehead" text="&#8220;%t&#8221;"/>
+      <l:template name="refsection" text="&#8220;%t&#8221;"/>
+      <l:template name="refsect1" text="&#8220;%t&#8221;"/>
+      <l:template name="refsect2" text="&#8220;%t&#8221;"/>
+      <l:template name="refsect3" text="&#8220;%t&#8221;"/>
+      <l:template name="sect1" text="&#8220;%t&#8221;"/>
+      <l:template name="sect2" text="&#8220;%t&#8221;"/>
+      <l:template name="sect3" text="&#8220;%t&#8221;"/>
+      <l:template name="sect4" text="&#8220;%t&#8221;"/>
+      <l:template name="sect5" text="&#8220;%t&#8221;"/>
+      <l:template name="section" text="&#8220;%t&#8221;"/>
+      <l:template name="simplesect" text="&#8220;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="xref-number">
+      <l:template name="answer" text="O:&#160;%n"/>
+      <l:template name="appendix" text="Dodatak&#160;%n"/>
+      <l:template name="bridgehead" text="Odeljak&#160;%n"/>
+      <l:template name="chapter" text="Poglavlje&#160;%n"/>
+      <l:template name="equation" text="Jedna&#269;ina&#160;%n"/>
+      <l:template name="example" text="Primer&#160;%n"/>
+      <l:template name="figure" text="Slika&#160;%n"/>
+      <l:template name="part" text="Deo&#160;%n"/>
+      <l:template name="procedure" text="Postupak&#160;%n"/>
+      <l:template name="productionset" text="Production&#160;%n"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n"/>
+      <l:template name="qandaentry" text="P:&#160;%n"/>
+      <l:template name="question" text="P:&#160;%n"/>
+      <l:template name="sect1" text="Odeljak&#160;%n"/>
+      <l:template name="sect2" text="Odeljak&#160;%n"/>
+      <l:template name="sect3" text="Odeljak&#160;%n"/>
+      <l:template name="sect4" text="Odeljak&#160;%n"/>
+      <l:template name="sect5" text="Odeljak&#160;%n"/>
+      <l:template name="section" text="Odeljak&#160;%n"/>
+      <l:template name="table" text="Tabela&#160;%n"/>
+   </l:context>
+
+   <l:context name="xref-number-and-title">
+      <l:template name="appendix" text="Dodatak&#160;%n, %t"/>
+      <l:template name="bridgehead" text="Odeljak&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="chapter" text="Poglavlje&#160;%n, %t"/>
+      <l:template name="equation" text="Jedna&#269;ina&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="example" text="Primer&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="figure" text="Slika&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="part" text="Deo&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="procedure" text="Postupak&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="productionset" text="Production&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="refsect1" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="refsect2" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="refsect3" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="refsection" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="sect1" text="Odeljak&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect2" text="Odeljak&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect3" text="Odeljak&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect4" text="Odeljak&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect5" text="Odeljak&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="section" text="Odeljak&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="simplesect" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="table" text="Tabela&#160;%n, &#8220;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="authorgroup">
+      <l:template name="sep" text=", "/>
+      <l:template name="sep2" text=" i "/>
+      <l:template name="seplast" text=", i "/>
+   </l:context>
+
+   <l:context name="glossary">
+      <l:template name="see" text="Vidi "/>
+      <l:template name="seealso" text="Vidi tako&#273;e "/>
+   </l:context>
+
+   <l:context name="msgset">
+      <l:template name="MsgAud" text="MsgAud: "/>
+      <l:template name="MsgLevel" text="Nivo: "/>
+      <l:template name="MsgOrig" text="Izvor: "/>
+   </l:context>
+
+   <l:context name="datetime">
+      <l:template name="format" text="m/d/Y" lang="en"/>
+   </l:context>
+
+   <l:context name="datetime-full">
+      <l:template name="January" text="January" lang="en"/>
+      <l:template name="February" text="February" lang="en"/>
+      <l:template name="March" text="March" lang="en"/>
+      <l:template name="April" text="April" lang="en"/>
+      <l:template name="May" text="May" lang="en"/>
+      <l:template name="June" text="June" lang="en"/>
+      <l:template name="July" text="July" lang="en"/>
+      <l:template name="August" text="August" lang="en"/>
+      <l:template name="September" text="September" lang="en"/>
+      <l:template name="October" text="October" lang="en"/>
+      <l:template name="November" text="November" lang="en"/>
+      <l:template name="December" text="December" lang="en"/>
+      <l:template name="Monday" text="Monday" lang="en"/>
+      <l:template name="Tuesday" text="Tuesday" lang="en"/>
+      <l:template name="Wednesday" text="Wednesday" lang="en"/>
+      <l:template name="Thursday" text="Thursday" lang="en"/>
+      <l:template name="Friday" text="Friday" lang="en"/>
+      <l:template name="Saturday" text="Saturday" lang="en"/>
+      <l:template name="Sunday" text="Sunday" lang="en"/>
+   </l:context>
+
+   <l:context name="datetime-abbrev">
+      <l:template name="Jan" text="Jan" lang="en"/>
+      <l:template name="Feb" text="Feb" lang="en"/>
+      <l:template name="Mar" text="Mar" lang="en"/>
+      <l:template name="Apr" text="Apr" lang="en"/>
+      <l:template name="May" text="May" lang="en"/>
+      <l:template name="Jun" text="Jun" lang="en"/>
+      <l:template name="Jul" text="Jul" lang="en"/>
+      <l:template name="Aug" text="Aug" lang="en"/>
+      <l:template name="Sep" text="Sep" lang="en"/>
+      <l:template name="Oct" text="Oct" lang="en"/>
+      <l:template name="Nov" text="Nov" lang="en"/>
+      <l:template name="Dec" text="Dec" lang="en"/>
+      <l:template name="Mon" text="Mon" lang="en"/>
+      <l:template name="Tue" text="Tue" lang="en"/>
+      <l:template name="Wed" text="Wed" lang="en"/>
+      <l:template name="Thu" text="Thu" lang="en"/>
+      <l:template name="Fri" text="Fri" lang="en"/>
+      <l:template name="Sat" text="Sat" lang="en"/>
+      <l:template name="Sun" text="Sun" lang="en"/>
+   </l:context>
+
+   <l:context name="htmlhelp">
+      <l:template name="langcode" text="0x081a Serbian (Latin)"/>
+   </l:context>
+
+   <l:letters lang="en">
+      <l:l i="-1"/>
+      <l:l i="0">Symbols</l:l>
+      <l:l i="10">A</l:l>
+      <l:l i="10">a</l:l>
+      <l:l i="10">&#192;</l:l>
+      <l:l i="10">&#224;</l:l>
+      <l:l i="10">&#193;</l:l>
+      <l:l i="10">&#225;</l:l>
+      <l:l i="10">&#194;</l:l>
+      <l:l i="10">&#226;</l:l>
+      <l:l i="10">&#195;</l:l>
+      <l:l i="10">&#227;</l:l>
+      <l:l i="10">&#196;</l:l>
+      <l:l i="10">&#228;</l:l>
+      <l:l i="10">&#197;</l:l>
+      <l:l i="10">&#229;</l:l>
+      <l:l i="10">&#256;</l:l>
+      <l:l i="10">&#257;</l:l>
+      <l:l i="10">&#258;</l:l>
+      <l:l i="10">&#259;</l:l>
+      <l:l i="10">&#260;</l:l>
+      <l:l i="10">&#261;</l:l>
+      <l:l i="10">&#461;</l:l>
+      <l:l i="10">&#462;</l:l>
+      <l:l i="10">&#478;</l:l>
+      <l:l i="10">&#479;</l:l>
+      <l:l i="10">&#480;</l:l>
+      <l:l i="10">&#481;</l:l>
+      <l:l i="10">&#506;</l:l>
+      <l:l i="10">&#507;</l:l>
+      <l:l i="10">&#512;</l:l>
+      <l:l i="10">&#513;</l:l>
+      <l:l i="10">&#514;</l:l>
+      <l:l i="10">&#515;</l:l>
+      <l:l i="10">&#550;</l:l>
+      <l:l i="10">&#551;</l:l>
+      <l:l i="10">&#7680;</l:l>
+      <l:l i="10">&#7681;</l:l>
+      <l:l i="10">&#7834;</l:l>
+      <l:l i="10">&#7840;</l:l>
+      <l:l i="10">&#7841;</l:l>
+      <l:l i="10">&#7842;</l:l>
+      <l:l i="10">&#7843;</l:l>
+      <l:l i="10">&#7844;</l:l>
+      <l:l i="10">&#7845;</l:l>
+      <l:l i="10">&#7846;</l:l>
+      <l:l i="10">&#7847;</l:l>
+      <l:l i="10">&#7848;</l:l>
+      <l:l i="10">&#7849;</l:l>
+      <l:l i="10">&#7850;</l:l>
+      <l:l i="10">&#7851;</l:l>
+      <l:l i="10">&#7852;</l:l>
+      <l:l i="10">&#7853;</l:l>
+      <l:l i="10">&#7854;</l:l>
+      <l:l i="10">&#7855;</l:l>
+      <l:l i="10">&#7856;</l:l>
+      <l:l i="10">&#7857;</l:l>
+      <l:l i="10">&#7858;</l:l>
+      <l:l i="10">&#7859;</l:l>
+      <l:l i="10">&#7860;</l:l>
+      <l:l i="10">&#7861;</l:l>
+      <l:l i="10">&#7862;</l:l>
+      <l:l i="10">&#7863;</l:l>
+      <l:l i="20">B</l:l>
+      <l:l i="20">b</l:l>
+      <l:l i="20">&#384;</l:l>
+      <l:l i="20">&#385;</l:l>
+      <l:l i="20">&#595;</l:l>
+      <l:l i="20">&#386;</l:l>
+      <l:l i="20">&#387;</l:l>
+      <l:l i="20">&#7682;</l:l>
+      <l:l i="20">&#7683;</l:l>
+      <l:l i="20">&#7684;</l:l>
+      <l:l i="20">&#7685;</l:l>
+      <l:l i="20">&#7686;</l:l>
+      <l:l i="20">&#7687;</l:l>
+      <l:l i="30">C</l:l>
+      <l:l i="30">c</l:l>
+      <l:l i="30">&#199;</l:l>
+      <l:l i="30">&#231;</l:l>
+      <l:l i="30">&#262;</l:l>
+      <l:l i="30">&#263;</l:l>
+      <l:l i="30">&#264;</l:l>
+      <l:l i="30">&#265;</l:l>
+      <l:l i="30">&#266;</l:l>
+      <l:l i="30">&#267;</l:l>
+      <l:l i="30">&#268;</l:l>
+      <l:l i="30">&#269;</l:l>
+      <l:l i="30">&#391;</l:l>
+      <l:l i="30">&#392;</l:l>
+      <l:l i="30">&#597;</l:l>
+      <l:l i="30">&#7688;</l:l>
+      <l:l i="30">&#7689;</l:l>
+      <l:l i="40">D</l:l>
+      <l:l i="40">d</l:l>
+      <l:l i="40">&#270;</l:l>
+      <l:l i="40">&#271;</l:l>
+      <l:l i="40">&#272;</l:l>
+      <l:l i="40">&#273;</l:l>
+      <l:l i="40">&#394;</l:l>
+      <l:l i="40">&#599;</l:l>
+      <l:l i="40">&#395;</l:l>
+      <l:l i="40">&#396;</l:l>
+      <l:l i="40">&#453;</l:l>
+      <l:l i="40">&#498;</l:l>
+      <l:l i="40">&#545;</l:l>
+      <l:l i="40">&#598;</l:l>
+      <l:l i="40">&#7690;</l:l>
+      <l:l i="40">&#7691;</l:l>
+      <l:l i="40">&#7692;</l:l>
+      <l:l i="40">&#7693;</l:l>
+      <l:l i="40">&#7694;</l:l>
+      <l:l i="40">&#7695;</l:l>
+      <l:l i="40">&#7696;</l:l>
+      <l:l i="40">&#7697;</l:l>
+      <l:l i="40">&#7698;</l:l>
+      <l:l i="40">&#7699;</l:l>
+      <l:l i="50">E</l:l>
+      <l:l i="50">e</l:l>
+      <l:l i="50">&#200;</l:l>
+      <l:l i="50">&#232;</l:l>
+      <l:l i="50">&#201;</l:l>
+      <l:l i="50">&#233;</l:l>
+      <l:l i="50">&#202;</l:l>
+      <l:l i="50">&#234;</l:l>
+      <l:l i="50">&#203;</l:l>
+      <l:l i="50">&#235;</l:l>
+      <l:l i="50">&#274;</l:l>
+      <l:l i="50">&#275;</l:l>
+      <l:l i="50">&#276;</l:l>
+      <l:l i="50">&#277;</l:l>
+      <l:l i="50">&#278;</l:l>
+      <l:l i="50">&#279;</l:l>
+      <l:l i="50">&#280;</l:l>
+      <l:l i="50">&#281;</l:l>
+      <l:l i="50">&#282;</l:l>
+      <l:l i="50">&#283;</l:l>
+      <l:l i="50">&#516;</l:l>
+      <l:l i="50">&#517;</l:l>
+      <l:l i="50">&#518;</l:l>
+      <l:l i="50">&#519;</l:l>
+      <l:l i="50">&#552;</l:l>
+      <l:l i="50">&#553;</l:l>
+      <l:l i="50">&#7700;</l:l>
+      <l:l i="50">&#7701;</l:l>
+      <l:l i="50">&#7702;</l:l>
+      <l:l i="50">&#7703;</l:l>
+      <l:l i="50">&#7704;</l:l>
+      <l:l i="50">&#7705;</l:l>
+      <l:l i="50">&#7706;</l:l>
+      <l:l i="50">&#7707;</l:l>
+      <l:l i="50">&#7708;</l:l>
+      <l:l i="50">&#7709;</l:l>
+      <l:l i="50">&#7864;</l:l>
+      <l:l i="50">&#7865;</l:l>
+      <l:l i="50">&#7866;</l:l>
+      <l:l i="50">&#7867;</l:l>
+      <l:l i="50">&#7868;</l:l>
+      <l:l i="50">&#7869;</l:l>
+      <l:l i="50">&#7870;</l:l>
+      <l:l i="50">&#7871;</l:l>
+      <l:l i="50">&#7872;</l:l>
+      <l:l i="50">&#7873;</l:l>
+      <l:l i="50">&#7874;</l:l>
+      <l:l i="50">&#7875;</l:l>
+      <l:l i="50">&#7876;</l:l>
+      <l:l i="50">&#7877;</l:l>
+      <l:l i="50">&#7878;</l:l>
+      <l:l i="50">&#7879;</l:l>
+      <l:l i="60">F</l:l>
+      <l:l i="60">f</l:l>
+      <l:l i="60">&#401;</l:l>
+      <l:l i="60">&#402;</l:l>
+      <l:l i="60">&#7710;</l:l>
+      <l:l i="60">&#7711;</l:l>
+      <l:l i="70">G</l:l>
+      <l:l i="70">g</l:l>
+      <l:l i="70">&#284;</l:l>
+      <l:l i="70">&#285;</l:l>
+      <l:l i="70">&#286;</l:l>
+      <l:l i="70">&#287;</l:l>
+      <l:l i="70">&#288;</l:l>
+      <l:l i="70">&#289;</l:l>
+      <l:l i="70">&#290;</l:l>
+      <l:l i="70">&#291;</l:l>
+      <l:l i="70">&#403;</l:l>
+      <l:l i="70">&#608;</l:l>
+      <l:l i="70">&#484;</l:l>
+      <l:l i="70">&#485;</l:l>
+      <l:l i="70">&#486;</l:l>
+      <l:l i="70">&#487;</l:l>
+      <l:l i="70">&#500;</l:l>
+      <l:l i="70">&#501;</l:l>
+      <l:l i="70">&#7712;</l:l>
+      <l:l i="70">&#7713;</l:l>
+      <l:l i="80">H</l:l>
+      <l:l i="80">h</l:l>
+      <l:l i="80">&#292;</l:l>
+      <l:l i="80">&#293;</l:l>
+      <l:l i="80">&#294;</l:l>
+      <l:l i="80">&#295;</l:l>
+      <l:l i="80">&#542;</l:l>
+      <l:l i="80">&#543;</l:l>
+      <l:l i="80">&#614;</l:l>
+      <l:l i="80">&#7714;</l:l>
+      <l:l i="80">&#7715;</l:l>
+      <l:l i="80">&#7716;</l:l>
+      <l:l i="80">&#7717;</l:l>
+      <l:l i="80">&#7718;</l:l>
+      <l:l i="80">&#7719;</l:l>
+      <l:l i="80">&#7720;</l:l>
+      <l:l i="80">&#7721;</l:l>
+      <l:l i="80">&#7722;</l:l>
+      <l:l i="80">&#7723;</l:l>
+      <l:l i="80">&#7830;</l:l>
+      <l:l i="90">I</l:l>
+      <l:l i="90">i</l:l>
+      <l:l i="90">&#204;</l:l>
+      <l:l i="90">&#236;</l:l>
+      <l:l i="90">&#205;</l:l>
+      <l:l i="90">&#237;</l:l>
+      <l:l i="90">&#206;</l:l>
+      <l:l i="90">&#238;</l:l>
+      <l:l i="90">&#207;</l:l>
+      <l:l i="90">&#239;</l:l>
+      <l:l i="90">&#296;</l:l>
+      <l:l i="90">&#297;</l:l>
+      <l:l i="90">&#298;</l:l>
+      <l:l i="90">&#299;</l:l>
+      <l:l i="90">&#300;</l:l>
+      <l:l i="90">&#301;</l:l>
+      <l:l i="90">&#302;</l:l>
+      <l:l i="90">&#303;</l:l>
+      <l:l i="90">&#304;</l:l>
+      <l:l i="90">&#407;</l:l>
+      <l:l i="90">&#616;</l:l>
+      <l:l i="90">&#463;</l:l>
+      <l:l i="90">&#464;</l:l>
+      <l:l i="90">&#520;</l:l>
+      <l:l i="90">&#521;</l:l>
+      <l:l i="90">&#522;</l:l>
+      <l:l i="90">&#523;</l:l>
+      <l:l i="90">&#7724;</l:l>
+      <l:l i="90">&#7725;</l:l>
+      <l:l i="90">&#7726;</l:l>
+      <l:l i="90">&#7727;</l:l>
+      <l:l i="90">&#7880;</l:l>
+      <l:l i="90">&#7881;</l:l>
+      <l:l i="90">&#7882;</l:l>
+      <l:l i="90">&#7883;</l:l>
+      <l:l i="100">J</l:l>
+      <l:l i="100">j</l:l>
+      <l:l i="100">&#308;</l:l>
+      <l:l i="100">&#309;</l:l>
+      <l:l i="100">&#496;</l:l>
+      <l:l i="100">&#669;</l:l>
+      <l:l i="110">K</l:l>
+      <l:l i="110">k</l:l>
+      <l:l i="110">&#310;</l:l>
+      <l:l i="110">&#311;</l:l>
+      <l:l i="110">&#408;</l:l>
+      <l:l i="110">&#409;</l:l>
+      <l:l i="110">&#488;</l:l>
+      <l:l i="110">&#489;</l:l>
+      <l:l i="110">&#7728;</l:l>
+      <l:l i="110">&#7729;</l:l>
+      <l:l i="110">&#7730;</l:l>
+      <l:l i="110">&#7731;</l:l>
+      <l:l i="110">&#7732;</l:l>
+      <l:l i="110">&#7733;</l:l>
+      <l:l i="120">L</l:l>
+      <l:l i="120">l</l:l>
+      <l:l i="120">&#313;</l:l>
+      <l:l i="120">&#314;</l:l>
+      <l:l i="120">&#315;</l:l>
+      <l:l i="120">&#316;</l:l>
+      <l:l i="120">&#317;</l:l>
+      <l:l i="120">&#318;</l:l>
+      <l:l i="120">&#319;</l:l>
+      <l:l i="120">&#320;</l:l>
+      <l:l i="120">&#321;</l:l>
+      <l:l i="120">&#322;</l:l>
+      <l:l i="120">&#410;</l:l>
+      <l:l i="120">&#456;</l:l>
+      <l:l i="120">&#564;</l:l>
+      <l:l i="120">&#619;</l:l>
+      <l:l i="120">&#620;</l:l>
+      <l:l i="120">&#621;</l:l>
+      <l:l i="120">&#7734;</l:l>
+      <l:l i="120">&#7735;</l:l>
+      <l:l i="120">&#7736;</l:l>
+      <l:l i="120">&#7737;</l:l>
+      <l:l i="120">&#7738;</l:l>
+      <l:l i="120">&#7739;</l:l>
+      <l:l i="120">&#7740;</l:l>
+      <l:l i="120">&#7741;</l:l>
+      <l:l i="130">M</l:l>
+      <l:l i="130">m</l:l>
+      <l:l i="130">&#625;</l:l>
+      <l:l i="130">&#7742;</l:l>
+      <l:l i="130">&#7743;</l:l>
+      <l:l i="130">&#7744;</l:l>
+      <l:l i="130">&#7745;</l:l>
+      <l:l i="130">&#7746;</l:l>
+      <l:l i="130">&#7747;</l:l>
+      <l:l i="140">N</l:l>
+      <l:l i="140">n</l:l>
+      <l:l i="140">&#209;</l:l>
+      <l:l i="140">&#241;</l:l>
+      <l:l i="140">&#323;</l:l>
+      <l:l i="140">&#324;</l:l>
+      <l:l i="140">&#325;</l:l>
+      <l:l i="140">&#326;</l:l>
+      <l:l i="140">&#327;</l:l>
+      <l:l i="140">&#328;</l:l>
+      <l:l i="140">&#413;</l:l>
+      <l:l i="140">&#626;</l:l>
+      <l:l i="140">&#414;</l:l>
+      <l:l i="140">&#544;</l:l>
+      <l:l i="140">&#459;</l:l>
+      <l:l i="140">&#504;</l:l>
+      <l:l i="140">&#505;</l:l>
+      <l:l i="140">&#565;</l:l>
+      <l:l i="140">&#627;</l:l>
+      <l:l i="140">&#7748;</l:l>
+      <l:l i="140">&#7749;</l:l>
+      <l:l i="140">&#7750;</l:l>
+      <l:l i="140">&#7751;</l:l>
+      <l:l i="140">&#7752;</l:l>
+      <l:l i="140">&#7753;</l:l>
+      <l:l i="140">&#7754;</l:l>
+      <l:l i="140">&#7755;</l:l>
+      <l:l i="150">O</l:l>
+      <l:l i="150">o</l:l>
+      <l:l i="150">&#210;</l:l>
+      <l:l i="150">&#242;</l:l>
+      <l:l i="150">&#211;</l:l>
+      <l:l i="150">&#243;</l:l>
+      <l:l i="150">&#212;</l:l>
+      <l:l i="150">&#244;</l:l>
+      <l:l i="150">&#213;</l:l>
+      <l:l i="150">&#245;</l:l>
+      <l:l i="150">&#214;</l:l>
+      <l:l i="150">&#246;</l:l>
+      <l:l i="150">&#216;</l:l>
+      <l:l i="150">&#248;</l:l>
+      <l:l i="150">&#332;</l:l>
+      <l:l i="150">&#333;</l:l>
+      <l:l i="150">&#334;</l:l>
+      <l:l i="150">&#335;</l:l>
+      <l:l i="150">&#336;</l:l>
+      <l:l i="150">&#337;</l:l>
+      <l:l i="150">&#415;</l:l>
+      <l:l i="150">&#416;</l:l>
+      <l:l i="150">&#417;</l:l>
+      <l:l i="150">&#465;</l:l>
+      <l:l i="150">&#466;</l:l>
+      <l:l i="150">&#490;</l:l>
+      <l:l i="150">&#491;</l:l>
+      <l:l i="150">&#492;</l:l>
+      <l:l i="150">&#493;</l:l>
+      <l:l i="150">&#510;</l:l>
+      <l:l i="150">&#511;</l:l>
+      <l:l i="150">&#524;</l:l>
+      <l:l i="150">&#525;</l:l>
+      <l:l i="150">&#526;</l:l>
+      <l:l i="150">&#527;</l:l>
+      <l:l i="150">&#554;</l:l>
+      <l:l i="150">&#555;</l:l>
+      <l:l i="150">&#556;</l:l>
+      <l:l i="150">&#557;</l:l>
+      <l:l i="150">&#558;</l:l>
+      <l:l i="150">&#559;</l:l>
+      <l:l i="150">&#560;</l:l>
+      <l:l i="150">&#561;</l:l>
+      <l:l i="150">&#7756;</l:l>
+      <l:l i="150">&#7757;</l:l>
+      <l:l i="150">&#7758;</l:l>
+      <l:l i="150">&#7759;</l:l>
+      <l:l i="150">&#7760;</l:l>
+      <l:l i="150">&#7761;</l:l>
+      <l:l i="150">&#7762;</l:l>
+      <l:l i="150">&#7763;</l:l>
+      <l:l i="150">&#7884;</l:l>
+      <l:l i="150">&#7885;</l:l>
+      <l:l i="150">&#7886;</l:l>
+      <l:l i="150">&#7887;</l:l>
+      <l:l i="150">&#7888;</l:l>
+      <l:l i="150">&#7889;</l:l>
+      <l:l i="150">&#7890;</l:l>
+      <l:l i="150">&#7891;</l:l>
+      <l:l i="150">&#7892;</l:l>
+      <l:l i="150">&#7893;</l:l>
+      <l:l i="150">&#7894;</l:l>
+      <l:l i="150">&#7895;</l:l>
+      <l:l i="150">&#7896;</l:l>
+      <l:l i="150">&#7897;</l:l>
+      <l:l i="150">&#7898;</l:l>
+      <l:l i="150">&#7899;</l:l>
+      <l:l i="150">&#7900;</l:l>
+      <l:l i="150">&#7901;</l:l>
+      <l:l i="150">&#7902;</l:l>
+      <l:l i="150">&#7903;</l:l>
+      <l:l i="150">&#7904;</l:l>
+      <l:l i="150">&#7905;</l:l>
+      <l:l i="150">&#7906;</l:l>
+      <l:l i="150">&#7907;</l:l>
+      <l:l i="160">P</l:l>
+      <l:l i="160">p</l:l>
+      <l:l i="160">&#420;</l:l>
+      <l:l i="160">&#421;</l:l>
+      <l:l i="160">&#7764;</l:l>
+      <l:l i="160">&#7765;</l:l>
+      <l:l i="160">&#7766;</l:l>
+      <l:l i="160">&#7767;</l:l>
+      <l:l i="170">Q</l:l>
+      <l:l i="170">q</l:l>
+      <l:l i="170">&#672;</l:l>
+      <l:l i="180">R</l:l>
+      <l:l i="180">r</l:l>
+      <l:l i="180">&#340;</l:l>
+      <l:l i="180">&#341;</l:l>
+      <l:l i="180">&#342;</l:l>
+      <l:l i="180">&#343;</l:l>
+      <l:l i="180">&#344;</l:l>
+      <l:l i="180">&#345;</l:l>
+      <l:l i="180">&#528;</l:l>
+      <l:l i="180">&#529;</l:l>
+      <l:l i="180">&#530;</l:l>
+      <l:l i="180">&#531;</l:l>
+      <l:l i="180">&#636;</l:l>
+      <l:l i="180">&#637;</l:l>
+      <l:l i="180">&#638;</l:l>
+      <l:l i="180">&#7768;</l:l>
+      <l:l i="180">&#7769;</l:l>
+      <l:l i="180">&#7770;</l:l>
+      <l:l i="180">&#7771;</l:l>
+      <l:l i="180">&#7772;</l:l>
+      <l:l i="180">&#7773;</l:l>
+      <l:l i="180">&#7774;</l:l>
+      <l:l i="180">&#7775;</l:l>
+      <l:l i="190">S</l:l>
+      <l:l i="190">s</l:l>
+      <l:l i="190">&#346;</l:l>
+      <l:l i="190">&#347;</l:l>
+      <l:l i="190">&#348;</l:l>
+      <l:l i="190">&#349;</l:l>
+      <l:l i="190">&#350;</l:l>
+      <l:l i="190">&#351;</l:l>
+      <l:l i="190">&#352;</l:l>
+      <l:l i="190">&#353;</l:l>
+      <l:l i="190">&#536;</l:l>
+      <l:l i="190">&#537;</l:l>
+      <l:l i="190">&#642;</l:l>
+      <l:l i="190">&#7776;</l:l>
+      <l:l i="190">&#7777;</l:l>
+      <l:l i="190">&#7778;</l:l>
+      <l:l i="190">&#7779;</l:l>
+      <l:l i="190">&#7780;</l:l>
+      <l:l i="190">&#7781;</l:l>
+      <l:l i="190">&#7782;</l:l>
+      <l:l i="190">&#7783;</l:l>
+      <l:l i="190">&#7784;</l:l>
+      <l:l i="190">&#7785;</l:l>
+      <l:l i="200">T</l:l>
+      <l:l i="200">t</l:l>
+      <l:l i="200">&#354;</l:l>
+      <l:l i="200">&#355;</l:l>
+      <l:l i="200">&#356;</l:l>
+      <l:l i="200">&#357;</l:l>
+      <l:l i="200">&#358;</l:l>
+      <l:l i="200">&#359;</l:l>
+      <l:l i="200">&#427;</l:l>
+      <l:l i="200">&#428;</l:l>
+      <l:l i="200">&#429;</l:l>
+      <l:l i="200">&#430;</l:l>
+      <l:l i="200">&#648;</l:l>
+      <l:l i="200">&#538;</l:l>
+      <l:l i="200">&#539;</l:l>
+      <l:l i="200">&#566;</l:l>
+      <l:l i="200">&#7786;</l:l>
+      <l:l i="200">&#7787;</l:l>
+      <l:l i="200">&#7788;</l:l>
+      <l:l i="200">&#7789;</l:l>
+      <l:l i="200">&#7790;</l:l>
+      <l:l i="200">&#7791;</l:l>
+      <l:l i="200">&#7792;</l:l>
+      <l:l i="200">&#7793;</l:l>
+      <l:l i="200">&#7831;</l:l>
+      <l:l i="210">U</l:l>
+      <l:l i="210">u</l:l>
+      <l:l i="210">&#217;</l:l>
+      <l:l i="210">&#249;</l:l>
+      <l:l i="210">&#218;</l:l>
+      <l:l i="210">&#250;</l:l>
+      <l:l i="210">&#219;</l:l>
+      <l:l i="210">&#251;</l:l>
+      <l:l i="210">&#220;</l:l>
+      <l:l i="210">&#252;</l:l>
+      <l:l i="210">&#360;</l:l>
+      <l:l i="210">&#361;</l:l>
+      <l:l i="210">&#362;</l:l>
+      <l:l i="210">&#363;</l:l>
+      <l:l i="210">&#364;</l:l>
+      <l:l i="210">&#365;</l:l>
+      <l:l i="210">&#366;</l:l>
+      <l:l i="210">&#367;</l:l>
+      <l:l i="210">&#368;</l:l>
+      <l:l i="210">&#369;</l:l>
+      <l:l i="210">&#370;</l:l>
+      <l:l i="210">&#371;</l:l>
+      <l:l i="210">&#431;</l:l>
+      <l:l i="210">&#432;</l:l>
+      <l:l i="210">&#467;</l:l>
+      <l:l i="210">&#468;</l:l>
+      <l:l i="210">&#469;</l:l>
+      <l:l i="210">&#470;</l:l>
+      <l:l i="210">&#471;</l:l>
+      <l:l i="210">&#472;</l:l>
+      <l:l i="210">&#473;</l:l>
+      <l:l i="210">&#474;</l:l>
+      <l:l i="210">&#475;</l:l>
+      <l:l i="210">&#476;</l:l>
+      <l:l i="210">&#532;</l:l>
+      <l:l i="210">&#533;</l:l>
+      <l:l i="210">&#534;</l:l>
+      <l:l i="210">&#535;</l:l>
+      <l:l i="210">&#7794;</l:l>
+      <l:l i="210">&#7795;</l:l>
+      <l:l i="210">&#7796;</l:l>
+      <l:l i="210">&#7797;</l:l>
+      <l:l i="210">&#7798;</l:l>
+      <l:l i="210">&#7799;</l:l>
+      <l:l i="210">&#7800;</l:l>
+      <l:l i="210">&#7801;</l:l>
+      <l:l i="210">&#7802;</l:l>
+      <l:l i="210">&#7803;</l:l>
+      <l:l i="210">&#7908;</l:l>
+      <l:l i="210">&#7909;</l:l>
+      <l:l i="210">&#7910;</l:l>
+      <l:l i="210">&#7911;</l:l>
+      <l:l i="210">&#7912;</l:l>
+      <l:l i="210">&#7913;</l:l>
+      <l:l i="210">&#7914;</l:l>
+      <l:l i="210">&#7915;</l:l>
+      <l:l i="210">&#7916;</l:l>
+      <l:l i="210">&#7917;</l:l>
+      <l:l i="210">&#7918;</l:l>
+      <l:l i="210">&#7919;</l:l>
+      <l:l i="210">&#7920;</l:l>
+      <l:l i="210">&#7921;</l:l>
+      <l:l i="220">V</l:l>
+      <l:l i="220">v</l:l>
+      <l:l i="220">&#434;</l:l>
+      <l:l i="220">&#651;</l:l>
+      <l:l i="220">&#7804;</l:l>
+      <l:l i="220">&#7805;</l:l>
+      <l:l i="220">&#7806;</l:l>
+      <l:l i="220">&#7807;</l:l>
+      <l:l i="230">W</l:l>
+      <l:l i="230">w</l:l>
+      <l:l i="230">&#372;</l:l>
+      <l:l i="230">&#373;</l:l>
+      <l:l i="230">&#7808;</l:l>
+      <l:l i="230">&#7809;</l:l>
+      <l:l i="230">&#7810;</l:l>
+      <l:l i="230">&#7811;</l:l>
+      <l:l i="230">&#7812;</l:l>
+      <l:l i="230">&#7813;</l:l>
+      <l:l i="230">&#7814;</l:l>
+      <l:l i="230">&#7815;</l:l>
+      <l:l i="230">&#7816;</l:l>
+      <l:l i="230">&#7817;</l:l>
+      <l:l i="230">&#7832;</l:l>
+      <l:l i="240">X</l:l>
+      <l:l i="240">x</l:l>
+      <l:l i="240">&#7818;</l:l>
+      <l:l i="240">&#7819;</l:l>
+      <l:l i="240">&#7820;</l:l>
+      <l:l i="240">&#7821;</l:l>
+      <l:l i="250">Y</l:l>
+      <l:l i="250">y</l:l>
+      <l:l i="250">&#221;</l:l>
+      <l:l i="250">&#253;</l:l>
+      <l:l i="250">&#255;</l:l>
+      <l:l i="250">&#376;</l:l>
+      <l:l i="250">&#374;</l:l>
+      <l:l i="250">&#375;</l:l>
+      <l:l i="250">&#435;</l:l>
+      <l:l i="250">&#436;</l:l>
+      <l:l i="250">&#562;</l:l>
+      <l:l i="250">&#563;</l:l>
+      <l:l i="250">&#7822;</l:l>
+      <l:l i="250">&#7823;</l:l>
+      <l:l i="250">&#7833;</l:l>
+      <l:l i="250">&#7922;</l:l>
+      <l:l i="250">&#7923;</l:l>
+      <l:l i="250">&#7924;</l:l>
+      <l:l i="250">&#7925;</l:l>
+      <l:l i="250">&#7926;</l:l>
+      <l:l i="250">&#7927;</l:l>
+      <l:l i="250">&#7928;</l:l>
+      <l:l i="250">&#7929;</l:l>
+      <l:l i="260">Z</l:l>
+      <l:l i="260">z</l:l>
+      <l:l i="260">&#377;</l:l>
+      <l:l i="260">&#378;</l:l>
+      <l:l i="260">&#379;</l:l>
+      <l:l i="260">&#380;</l:l>
+      <l:l i="260">&#381;</l:l>
+      <l:l i="260">&#382;</l:l>
+      <l:l i="260">&#437;</l:l>
+      <l:l i="260">&#438;</l:l>
+      <l:l i="260">&#548;</l:l>
+      <l:l i="260">&#549;</l:l>
+      <l:l i="260">&#656;</l:l>
+      <l:l i="260">&#657;</l:l>
+      <l:l i="260">&#7824;</l:l>
+      <l:l i="260">&#7825;</l:l>
+      <l:l i="260">&#7826;</l:l>
+      <l:l i="260">&#7827;</l:l>
+      <l:l i="260">&#7828;</l:l>
+      <l:l i="260">&#7829;</l:l>
+   </l:letters>
+</l:l10n>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/subtitles.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/subtitles.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/subtitles.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,147 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+                exclude-result-prefixes="doc"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: subtitles.xsl,v 1.1.1.1 2004/10/19 21:21:41 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<!-- subtitle markup -->
+
+<doc:mode mode="subtitle.markup" xmlns="">
+<refpurpose>Provides access to element subtitles</refpurpose>
+<refdescription>
+<para>Processing an element in the
+<literal role="mode">subtitle.markup</literal> mode produces the
+subtitle of the element.
+</para>
+</refdescription>
+</doc:mode>
+
+<xsl:template match="*" mode="subtitle.markup">
+  <xsl:message>
+    <xsl:text>Request for subtitle of unexpected element: </xsl:text>
+    <xsl:value-of select="name(.)"/>
+  </xsl:message>
+  <xsl:text>???SUBTITLE???</xsl:text>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="subtitle.markup">
+  <xsl:param name="allow-anchors" select="'0'"/>
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="set" mode="subtitle.markup">
+  <xsl:param name="allow-anchors" select="'0'"/>
+  <xsl:apply-templates select="(setinfo/subtitle|info/subtitle|subtitle)[1]"
+                       mode="subtitle.markup">
+    <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="book" mode="subtitle.markup">
+  <xsl:param name="allow-anchors" select="'0'"/>
+  <xsl:apply-templates select="(bookinfo/subtitle|info/subtitle|subtitle)[1]"
+                       mode="subtitle.markup">
+    <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="part" mode="subtitle.markup">
+  <xsl:param name="allow-anchors" select="'0'"/>
+  <xsl:apply-templates select="(partinfo/subtitle
+                                |docinfo/subtitle
+                                |info/subtitle
+                                |subtitle)[1]"
+                       mode="subtitle.markup">
+    <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="preface|chapter|appendix" mode="subtitle.markup">
+  <xsl:param name="allow-anchors" select="'0'"/>
+  <xsl:apply-templates select="(docinfo/subtitle
+                                |info/subtitle
+                                |prefaceinfo/subtitle
+                                |chapterinfo/subtitle
+                                |appendixinfo/subtitle
+                                |subtitle)[1]"
+                       mode="subtitle.markup">
+    <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="article" mode="subtitle.markup">
+  <xsl:param name="allow-anchors" select="'0'"/>
+  <xsl:apply-templates select="(artheader/subtitle
+                                |articleinfo/subtitle
+                                |info/subtitle
+                                |subtitle)[1]"
+                       mode="subtitle.markup">
+    <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="dedication|colophon" mode="subtitle.markup">
+  <xsl:param name="allow-anchors" select="'0'"/>
+  <xsl:apply-templates select="subtitle"
+                       mode="subtitle.markup">
+    <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="reference" mode="subtitle.markup">
+  <xsl:param name="allow-anchors" select="'0'"/>
+  <xsl:apply-templates select="(referenceinfo/subtitle
+                                |docinfo/subtitle
+                                |info/subtitle
+                                |subtitle)[1]"
+                       mode="subtitle.markup">
+    <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="refentry" mode="subtitle.markup">
+  <xsl:param name="allow-anchors" select="'0'"/>
+  <xsl:apply-templates select="(refentryinfo/subtitle
+                                |info/subtitle
+                                |docinfo/subtitle)[1]"
+                       mode="subtitle.markup">
+    <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="section
+                     |sect1|sect2|sect3|sect4|sect5
+                     |refsect1|refsect2|refsect3
+                     |simplesect"
+              mode="subtitle.markup">
+  <xsl:param name="allow-anchors" select="'0'"/>
+  <xsl:apply-templates select="(info/subtitle
+                                |sectioninfo/subtitle
+                                |sect1info/subtitle
+                                |sect2info/subtitle
+                                |sect3info/subtitle
+                                |sect4info/subtitle
+                                |sect5info/subtitle
+                                |refsect1info/subtitle
+                                |refsect2info/subtitle
+                                |refsect3info/subtitle
+                                |subtitle)[1]"
+                       mode="subtitle.markup">
+    <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+</xsl:stylesheet>
+

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/sv.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/sv.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/sv.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1153 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="sv" english-language-name="Swedish">
+
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+   <l:gentext key="Abstract" text="Sammanfattning"/>
+   <l:gentext key="abstract" text="Sammanfattning"/>
+   <l:gentext key="Answer" text="A:"/>
+   <l:gentext key="answer" text="A:"/>
+   <l:gentext key="Appendix" text="Appendix"/>
+   <l:gentext key="appendix" text="appendix"/>
+   <l:gentext key="Article" text="Artikel"/>
+   <l:gentext key="article" text="Artikel"/>
+   <l:gentext key="Bibliography" text="Bibliografi"/>
+   <l:gentext key="bibliography" text="Bibliografi"/>
+   <l:gentext key="Book" text="Bok"/>
+   <l:gentext key="book" text="Bok"/>
+   <l:gentext key="CAUTION" text="OBSERVERA"/>
+   <l:gentext key="Caution" text="Observera"/>
+   <l:gentext key="caution" text="Observera"/>
+   <l:gentext key="Chapter" text="Kapitel"/>
+   <l:gentext key="chapter" text="kapitel"/>
+   <l:gentext key="Colophon" text="Colophon"/>
+   <l:gentext key="colophon" text="Colophon"/>
+   <l:gentext key="Copyright" text="Copyright"/>
+   <l:gentext key="copyright" text="Copyright"/>
+   <l:gentext key="Dedication" text="Dedikation"/>
+   <l:gentext key="dedication" text="Dedikation"/>
+   <l:gentext key="Edition" text="Utg&#229;va"/>
+   <l:gentext key="edition" text="Utg&#229;va"/>
+   <l:gentext key="Equation" text="Ekvation"/>
+   <l:gentext key="equation" text="Ekvation"/>
+   <l:gentext key="Example" text="Exempel"/>
+   <l:gentext key="example" text="Exempel"/>
+   <l:gentext key="Figure" text="Figur"/>
+   <l:gentext key="figure" text="Figur"/>
+   <l:gentext key="Glossary" text="Gloslista"/>
+   <l:gentext key="glossary" text="Gloslista"/>
+   <l:gentext key="GlossSee" text="Se"/>
+   <l:gentext key="glosssee" text="Se"/>
+   <l:gentext key="GlossSeeAlso" text="Se &#196;ven"/>
+   <l:gentext key="glossseealso" text="Se &#196;ven"/>
+   <l:gentext key="IMPORTANT" text="VIKTIGT"/>
+   <l:gentext key="important" text="Viktigt"/>
+   <l:gentext key="Important" text="Viktigt"/>
+   <l:gentext key="Index" text="Index"/>
+   <l:gentext key="index" text="Index"/>
+   <l:gentext key="ISBN" text="ISBN"/>
+   <l:gentext key="isbn" text="ISBN"/>
+   <l:gentext key="LegalNotice" text="Legal Notice"/>
+   <l:gentext key="legalnotice" text="Legal Notice"/>
+   <l:gentext key="MsgAud" text="M&#229;lgrupp"/>
+   <l:gentext key="msgaud" text="M&#229;lgrupp"/>
+   <l:gentext key="MsgLevel" text="Niv&#229;"/>
+   <l:gentext key="msglevel" text="Niv&#229;"/>
+   <l:gentext key="MsgOrig" text="Ursprung"/>
+   <l:gentext key="msgorig" text="Ursprung"/>
+   <l:gentext key="NOTE" text="NOTERA"/>
+   <l:gentext key="Note" text="Notera"/>
+   <l:gentext key="note" text="Notera"/>
+   <l:gentext key="Part" text="Del"/>
+   <l:gentext key="part" text="Del"/>
+   <l:gentext key="Preface" text="F&#246;retal"/>
+   <l:gentext key="preface" text="F&#246;retal"/>
+   <l:gentext key="Procedure" text="Procedur"/>
+   <l:gentext key="procedure" text="Procedur"/>
+   <l:gentext key="ProductionSet" text="Production"/>
+   <l:gentext key="PubDate" text="Publication Date" lang="en"/>
+   <l:gentext key="pubdate" text="Publication date" lang="en"/>
+   <l:gentext key="Published" text="Publicerad"/>
+   <l:gentext key="published" text="Publicerad"/>
+   <l:gentext key="Qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="Question" text="Fr&#229;ga:"/>
+   <l:gentext key="question" text="Fr&#229;ga:"/>
+   <l:gentext key="RefEntry" text=""/>
+   <l:gentext key="refentry" text=""/>
+   <l:gentext key="Reference" text="Referens"/>
+   <l:gentext key="reference" text="Referens"/>
+   <l:gentext key="RefName" text="Namn"/>
+   <l:gentext key="refname" text="Namn"/>
+   <l:gentext key="RefSection" text=""/>
+   <l:gentext key="refsection" text=""/>
+   <l:gentext key="RefSynopsisDiv" text="Synopsis"/>
+   <l:gentext key="refsynopsisdiv" text="Synopsis"/>
+   <l:gentext key="RevHistory" text="Revisionshistorik"/>
+   <l:gentext key="revhistory" text="Revisionshistorik"/>
+   <l:gentext key="revision" text="Revision"/>
+   <l:gentext key="Revision" text="Revision"/>
+   <l:gentext key="sect1" text="Section"/>
+   <l:gentext key="sect2" text="Section"/>
+   <l:gentext key="sect3" text="Section"/>
+   <l:gentext key="sect4" text="Section"/>
+   <l:gentext key="sect5" text="Section"/>
+   <l:gentext key="section" text="avsnitt"/>
+   <l:gentext key="Section" text="Avsnitt"/>
+   <l:gentext key="see" text="se"/>
+   <l:gentext key="See" text="Se"/>
+   <l:gentext key="seealso" text="se &#228;ven"/>
+   <l:gentext key="Seealso" text="Se &#228;ven"/>
+   <l:gentext key="SeeAlso" text="Se &#196;ven"/>
+   <l:gentext key="set" text="Set"/>
+   <l:gentext key="Set" text="Set"/>
+   <l:gentext key="setindex" text="Set Index"/>
+   <l:gentext key="SetIndex" text="Set Index"/>
+   <l:gentext key="Sidebar" text="Sidebar"/>
+   <l:gentext key="sidebar" text="sidebar"/>
+   <l:gentext key="step" text="steg"/>
+   <l:gentext key="Step" text="Steg"/>
+   <l:gentext key="Table" text="Tabell"/>
+   <l:gentext key="table" text="Tabell"/>
+   <l:gentext key="tip" text="Tips"/>
+   <l:gentext key="TIP" text="TIPS"/>
+   <l:gentext key="Tip" text="Tips"/>
+   <l:gentext key="Warning" text="Varning"/>
+   <l:gentext key="warning" text="Varning"/>
+   <l:gentext key="WARNING" text="VARNING"/>
+   <l:gentext key="and" text="och"/>
+   <l:gentext key="by" text="av"/>
+   <l:gentext key="called" text="kallas"/>
+   <l:gentext key="Edited" text="Redigerad"/>
+   <l:gentext key="edited" text="Redigerad"/>
+   <l:gentext key="Editedby" text="Redigerad av"/>
+   <l:gentext key="editedby" text="Redigerad av"/>
+   <l:gentext key="in" text="i"/>
+   <l:gentext key="lastlistcomma" text=","/>
+   <l:gentext key="listcomma" text=","/>
+   <l:gentext key="nonexistantelement" text="icke-existerande element"/>
+   <l:gentext key="notes" text="Noter"/>
+   <l:gentext key="Notes" text="Noter"/>
+   <l:gentext key="Pgs" text="Sid."/>
+   <l:gentext key="pgs" text="Sid."/>
+   <l:gentext key="Revisedby" text="Reviderad av: "/>
+   <l:gentext key="revisedby" text="Reviderad av: "/>
+   <l:gentext key="TableNotes" text="Noter"/>
+   <l:gentext key="tablenotes" text="Noter"/>
+   <l:gentext key="TableofContents" text="Inneh&#229;llsf&#246;rteckning"/>
+   <l:gentext key="tableofcontents" text="Inneh&#229;llsf&#246;rteckning"/>
+   <l:gentext key="the" text=""/>
+   <l:gentext key="unexpectedelementname" text="Ov&#228;ntat elementnamn"/>
+   <l:gentext key="unsupported" text="unsupported"/>
+   <l:gentext key="xrefto" text="korsreferens till"/>
+   <l:gentext key="listofequations" text="Ekvationsf&#246;rteckning"/>
+   <l:gentext key="ListofEquations" text="Ekvationsf&#246;rteckning"/>
+   <l:gentext key="ListofExamples" text="Exempelf&#246;rteckning"/>
+   <l:gentext key="listofexamples" text="Exempelf&#246;rteckning"/>
+   <l:gentext key="ListofFigures" text="Figurf&#246;rteckning"/>
+   <l:gentext key="listoffigures" text="Figurf&#246;rteckning"/>
+   <l:gentext key="ListofProcedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listofprocedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listoftables" text="Tabellf&#246;rteckning"/>
+   <l:gentext key="ListofTables" text="Tabellf&#246;rteckning"/>
+   <l:gentext key="ListofUnknown" text="F&#246;rteckning av ok&#228;nda"/>
+   <l:gentext key="listofunknown" text="F&#246;rteckning av ok&#228;nda"/>
+   <l:gentext key="nav-home" text="Hem"/>
+   <l:gentext key="nav-next" text="N&#228;sta"/>
+   <l:gentext key="nav-next-sibling" text="Snabbt fram&#229;t"/>
+   <l:gentext key="nav-prev" text="F&#246;reg&#229;ende"/>
+   <l:gentext key="nav-prev-sibling" text="Snabbt bak&#229;t"/>
+   <l:gentext key="nav-up" text="Upp"/>
+   <l:gentext key="nav-toc" text="ToC" lang="en"/>
+   <l:gentext key="Draft" text="Draft"/>
+   <l:gentext key="above" text="above"/>
+   <l:gentext key="below" text="below"/>
+   <l:gentext key="sectioncalled" text="the section called"/>
+   <l:gentext key="index symbols" text="Symbols"/>
+   <l:gentext key="lowercase.alpha" text="abcdefghijklmnopqrstuvwxyz"/>
+   <l:gentext key="uppercase.alpha" text="ABCDEFGHIJKLMNOPQRSTUVWXYZ"/>
+   <l:dingbat key="startquote" text="&#8220;"/>
+   <l:dingbat key="endquote" text="&#8221;"/>
+   <l:dingbat key="nestedstartquote" text="&#8216;"/>
+   <l:dingbat key="nestedendquote" text="&#8217;"/>
+   <l:dingbat key="singlestartquote" text="&#8216;" lang="en"/>
+   <l:dingbat key="singleendquote" text="&#8217;" lang="en"/>
+   <l:dingbat key="bullet" text="&#8226;"/>
+   <l:gentext key="hyphenation-character" text="-" lang="en"/>
+   <l:gentext key="hyphenation-push-character-count" text="2" lang="en"/>
+   <l:gentext key="hyphenation-remain-character-count" text="2" lang="en"/>
+
+   <l:context name="styles">
+      <l:template name="person-name" text="first-last"/>
+   </l:context>
+
+   <l:context name="title">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="%t"/>
+      <l:template name="appendix" text="Appendix %n. %t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="biblioentry" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliolist" text="%t" lang="en"/>
+      <l:template name="bibliomixed" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="Kapitel %n. %t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="Ekvation %n. %t"/>
+      <l:template name="example" text="Exempel %n. %t"/>
+      <l:template name="figure" text="Figur %n. %t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="glosslist" text="%t" lang="en"/>
+      <l:template name="glossentry" text="%t" lang="en"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text=""/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="Del %n. %t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="procedure.formal" text="Procedur&#160;%n.&#160;%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="productionset.formal" text="Production&#160;%n"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="%t"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="%t"/>
+      <l:template name="refentry" text="%t"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsection" text="%t" lang="en"/>
+      <l:template name="refsect1" text="%t"/>
+      <l:template name="refsect2" text="%t"/>
+      <l:template name="refsect3" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="refsynopsisdivinfo" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="step" text="%t"/>
+      <l:template name="table" text="Tabell %n. %t"/>
+      <l:template name="task" text="%t" lang="en"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="" lang="en"/>
+      <l:template name="warning" text="%t"/>
+   </l:context>
+
+   <l:context name="title-unnumbered">
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article/appendix" text="%t" lang="en"/>
+      <l:template name="bridgehead" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="sect1" text="%t"/>
+      <l:template name="sect2" text="%t"/>
+      <l:template name="sect3" text="%t"/>
+      <l:template name="sect4" text="%t"/>
+      <l:template name="sect5" text="%t"/>
+      <l:template name="section" text="%t"/>
+      <l:template name="simplesect" text="%t"/>
+   </l:context>
+
+   <l:context name="title-numbered">
+      <l:template name="appendix" text="Appendix %n. %t"/>
+      <l:template name="article/appendix" text="%n.&#160;%t" lang="en"/>
+      <l:template name="bridgehead" text="%t"/>
+      <l:template name="chapter" text="Kapitel %n. %t"/>
+      <l:template name="sect1" text="%n. %t"/>
+      <l:template name="sect2" text="%n. %t"/>
+      <l:template name="sect3" text="%n. %t"/>
+      <l:template name="sect4" text="%n. %t"/>
+      <l:template name="sect5" text="%n. %t"/>
+      <l:template name="section" text="%n. %t"/>
+      <l:template name="simplesect" text="%n. %t"/>
+   </l:context>
+
+   <l:context name="subtitle">
+      <l:template name="appendix" text="%s"/>
+      <l:template name="article" text="%s"/>
+      <l:template name="bibliodiv" text="%s"/>
+      <l:template name="biblioentry" text="%s"/>
+      <l:template name="bibliography" text="%s"/>
+      <l:template name="bibliomixed" text="%s"/>
+      <l:template name="bibliomset" text="%s"/>
+      <l:template name="biblioset" text="%s"/>
+      <l:template name="book" text="%s"/>
+      <l:template name="chapter" text="%s"/>
+      <l:template name="colophon" text="%s"/>
+      <l:template name="dedication" text="%s"/>
+      <l:template name="glossary" text="%s"/>
+      <l:template name="glossdiv" text="%s"/>
+      <l:template name="index" text="%s"/>
+      <l:template name="indexdiv" text="%s"/>
+      <l:template name="lot" text="%s"/>
+      <l:template name="part" text="%s"/>
+      <l:template name="partintro" text="%s"/>
+      <l:template name="preface" text="%s"/>
+      <l:template name="refentry" text="%s"/>
+      <l:template name="reference" text="%s"/>
+      <l:template name="refsection" text="%s" lang="en"/>
+      <l:template name="refsect1" text="%s"/>
+      <l:template name="refsect2" text="%s"/>
+      <l:template name="refsect3" text="%s"/>
+      <l:template name="refsynopsisdiv" text="%s"/>
+      <l:template name="sect1" text="%s"/>
+      <l:template name="sect2" text="%s"/>
+      <l:template name="sect3" text="%s"/>
+      <l:template name="sect4" text="%s"/>
+      <l:template name="sect5" text="%s"/>
+      <l:template name="section" text="%s"/>
+      <l:template name="set" text="%s"/>
+      <l:template name="setindex" text="%s"/>
+      <l:template name="sidebar" text="%s"/>
+      <l:template name="simplesect" text="%s"/>
+      <l:template name="toc" text="%s"/>
+   </l:context>
+
+   <l:context name="xref">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="A:&#160;%n"/>
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="constraintdef" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="%t"/>
+      <l:template name="example" text="%t"/>
+      <l:template name="figure" text="%t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text="%n"/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="%t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="Fr&#229;ga:&#160;%n"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="Fr&#229;ga:&#160;%n"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="table" text="%t"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="%n"/>
+      <l:template name="warning" text="%t"/>
+      <l:template name="page.citation" text=" [%p]"/>
+      <l:template name="page" text="(page %p)" lang="en"/>
+      <l:template name="pageabbrev" text="(p. %p)" lang="en"/>
+      <l:template name="Page" text="Page %p" lang="en"/>
+      <l:template name="bridgehead" text="&#8220;%t&#8221;"/>
+      <l:template name="refsection" text="the section called &#8220;%t&#8221;" lang="en"/>
+      <l:template name="refsect1" text="&#8220;%t&#8221;"/>
+      <l:template name="refsect2" text="&#8220;%t&#8221;"/>
+      <l:template name="refsect3" text="&#8220;%t&#8221;"/>
+      <l:template name="sect1" text="&#8220;%t&#8221;"/>
+      <l:template name="sect2" text="&#8220;%t&#8221;"/>
+      <l:template name="sect3" text="&#8220;%t&#8221;"/>
+      <l:template name="sect4" text="&#8220;%t&#8221;"/>
+      <l:template name="sect5" text="&#8220;%t&#8221;"/>
+      <l:template name="section" text="&#8220;%t&#8221;"/>
+      <l:template name="simplesect" text="&#8220;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="xref-number">
+      <l:template name="answer" text="A:&#160;%n"/>
+      <l:template name="appendix" text="Appendix&#160;%n"/>
+      <l:template name="bridgehead" text="Avsnitt&#160;%n"/>
+      <l:template name="chapter" text="Kapitel&#160;%n"/>
+      <l:template name="equation" text="Ekvation&#160;%n"/>
+      <l:template name="example" text="Exempel&#160;%n"/>
+      <l:template name="figure" text="Figur&#160;%n"/>
+      <l:template name="part" text="Del&#160;%n"/>
+      <l:template name="procedure" text="Procedur&#160;%n"/>
+      <l:template name="productionset" text="Production&#160;%n"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n"/>
+      <l:template name="qandaentry" text="Fr&#229;ga:&#160;%n"/>
+      <l:template name="question" text="Fr&#229;ga:&#160;%n"/>
+      <l:template name="sect1" text="Avsnitt&#160;%n"/>
+      <l:template name="sect2" text="Avsnitt&#160;%n"/>
+      <l:template name="sect3" text="Avsnitt&#160;%n"/>
+      <l:template name="sect4" text="Avsnitt&#160;%n"/>
+      <l:template name="sect5" text="Avsnitt&#160;%n"/>
+      <l:template name="section" text="Avsnitt&#160;%n"/>
+      <l:template name="table" text="Tabell&#160;%n"/>
+   </l:context>
+
+   <l:context name="xref-number-and-title">
+      <l:template name="appendix" text="Appendix&#160;%n, %t"/>
+      <l:template name="bridgehead" text="Avsnitt&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="chapter" text="Kapitel&#160;%n, %t"/>
+      <l:template name="equation" text="Ekvation&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="example" text="Exempel&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="figure" text="Figur&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="part" text="Del&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="procedure" text="Procedur&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="productionset" text="Production&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="refsect1" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="refsect2" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="refsect3" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="refsection" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="sect1" text="Avsnitt&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect2" text="Avsnitt&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect3" text="Avsnitt&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect4" text="Avsnitt&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect5" text="Avsnitt&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="section" text="Avsnitt&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="simplesect" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="table" text="Tabell&#160;%n, &#8220;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="authorgroup">
+      <l:template name="sep" text=", "/>
+      <l:template name="sep2" text=" och "/>
+      <l:template name="seplast" text=", och "/>
+   </l:context>
+
+   <l:context name="glossary">
+      <l:template name="see" text="Se "/>
+      <l:template name="seealso" text="Se &#196;ven "/>
+   </l:context>
+
+   <l:context name="msgset">
+      <l:template name="MsgAud" text="M&#229;lgrupp: "/>
+      <l:template name="MsgLevel" text="Niv&#229;: "/>
+      <l:template name="MsgOrig" text="Ursprung: "/>
+   </l:context>
+
+   <l:context name="datetime">
+      <l:template name="format" text="d-m-Y"/>
+   </l:context>
+
+   <l:context name="datetime-full">
+      <l:template name="January" text="Januari"/>
+      <l:template name="February" text="Februari"/>
+      <l:template name="March" text="Mars"/>
+      <l:template name="April" text="April"/>
+      <l:template name="May" text="Maj"/>
+      <l:template name="June" text="Juni"/>
+      <l:template name="July" text="Juli"/>
+      <l:template name="August" text="Augusti"/>
+      <l:template name="September" text="September"/>
+      <l:template name="October" text="Oktober"/>
+      <l:template name="November" text="November"/>
+      <l:template name="December" text="December"/>
+      <l:template name="Monday" text="M&#229;ndag"/>
+      <l:template name="Tuesday" text="Tisdag"/>
+      <l:template name="Wednesday" text="Onsdag"/>
+      <l:template name="Thursday" text="Torsdag"/>
+      <l:template name="Friday" text="Fredag"/>
+      <l:template name="Saturday" text="L&#246;rdag"/>
+      <l:template name="Sunday" text="S&#246;ndag"/>
+   </l:context>
+
+   <l:context name="datetime-abbrev">
+      <l:template name="Jan" text="Jan"/>
+      <l:template name="Feb" text="Feb"/>
+      <l:template name="Mar" text="Mar"/>
+      <l:template name="Apr" text="Apr"/>
+      <l:template name="May" text="Maj"/>
+      <l:template name="Jun" text="Jun"/>
+      <l:template name="Jul" text="Jul"/>
+      <l:template name="Aug" text="Aug"/>
+      <l:template name="Sep" text="Sep"/>
+      <l:template name="Oct" text="Okt"/>
+      <l:template name="Nov" text="Nov"/>
+      <l:template name="Dec" text="Dec"/>
+      <l:template name="Mon" text="Mon"/>
+      <l:template name="Tue" text="Tis"/>
+      <l:template name="Wed" text="Ons"/>
+      <l:template name="Thu" text="Tor"/>
+      <l:template name="Fri" text="Fre"/>
+      <l:template name="Sat" text="L&#246;r"/>
+      <l:template name="Sun" text="S&#246;n"/>
+   </l:context>
+
+   <l:context name="htmlhelp">
+      <l:template name="langcode" text="0x041d Swedish"/>
+   </l:context>
+
+   <l:letters lang="en">
+      <l:l i="-1"/>
+      <l:l i="0">Symbols</l:l>
+      <l:l i="10">A</l:l>
+      <l:l i="10">a</l:l>
+      <l:l i="10">&#192;</l:l>
+      <l:l i="10">&#224;</l:l>
+      <l:l i="10">&#193;</l:l>
+      <l:l i="10">&#225;</l:l>
+      <l:l i="10">&#194;</l:l>
+      <l:l i="10">&#226;</l:l>
+      <l:l i="10">&#195;</l:l>
+      <l:l i="10">&#227;</l:l>
+      <l:l i="10">&#196;</l:l>
+      <l:l i="10">&#228;</l:l>
+      <l:l i="10">&#197;</l:l>
+      <l:l i="10">&#229;</l:l>
+      <l:l i="10">&#256;</l:l>
+      <l:l i="10">&#257;</l:l>
+      <l:l i="10">&#258;</l:l>
+      <l:l i="10">&#259;</l:l>
+      <l:l i="10">&#260;</l:l>
+      <l:l i="10">&#261;</l:l>
+      <l:l i="10">&#461;</l:l>
+      <l:l i="10">&#462;</l:l>
+      <l:l i="10">&#478;</l:l>
+      <l:l i="10">&#479;</l:l>
+      <l:l i="10">&#480;</l:l>
+      <l:l i="10">&#481;</l:l>
+      <l:l i="10">&#506;</l:l>
+      <l:l i="10">&#507;</l:l>
+      <l:l i="10">&#512;</l:l>
+      <l:l i="10">&#513;</l:l>
+      <l:l i="10">&#514;</l:l>
+      <l:l i="10">&#515;</l:l>
+      <l:l i="10">&#550;</l:l>
+      <l:l i="10">&#551;</l:l>
+      <l:l i="10">&#7680;</l:l>
+      <l:l i="10">&#7681;</l:l>
+      <l:l i="10">&#7834;</l:l>
+      <l:l i="10">&#7840;</l:l>
+      <l:l i="10">&#7841;</l:l>
+      <l:l i="10">&#7842;</l:l>
+      <l:l i="10">&#7843;</l:l>
+      <l:l i="10">&#7844;</l:l>
+      <l:l i="10">&#7845;</l:l>
+      <l:l i="10">&#7846;</l:l>
+      <l:l i="10">&#7847;</l:l>
+      <l:l i="10">&#7848;</l:l>
+      <l:l i="10">&#7849;</l:l>
+      <l:l i="10">&#7850;</l:l>
+      <l:l i="10">&#7851;</l:l>
+      <l:l i="10">&#7852;</l:l>
+      <l:l i="10">&#7853;</l:l>
+      <l:l i="10">&#7854;</l:l>
+      <l:l i="10">&#7855;</l:l>
+      <l:l i="10">&#7856;</l:l>
+      <l:l i="10">&#7857;</l:l>
+      <l:l i="10">&#7858;</l:l>
+      <l:l i="10">&#7859;</l:l>
+      <l:l i="10">&#7860;</l:l>
+      <l:l i="10">&#7861;</l:l>
+      <l:l i="10">&#7862;</l:l>
+      <l:l i="10">&#7863;</l:l>
+      <l:l i="20">B</l:l>
+      <l:l i="20">b</l:l>
+      <l:l i="20">&#384;</l:l>
+      <l:l i="20">&#385;</l:l>
+      <l:l i="20">&#595;</l:l>
+      <l:l i="20">&#386;</l:l>
+      <l:l i="20">&#387;</l:l>
+      <l:l i="20">&#7682;</l:l>
+      <l:l i="20">&#7683;</l:l>
+      <l:l i="20">&#7684;</l:l>
+      <l:l i="20">&#7685;</l:l>
+      <l:l i="20">&#7686;</l:l>
+      <l:l i="20">&#7687;</l:l>
+      <l:l i="30">C</l:l>
+      <l:l i="30">c</l:l>
+      <l:l i="30">&#199;</l:l>
+      <l:l i="30">&#231;</l:l>
+      <l:l i="30">&#262;</l:l>
+      <l:l i="30">&#263;</l:l>
+      <l:l i="30">&#264;</l:l>
+      <l:l i="30">&#265;</l:l>
+      <l:l i="30">&#266;</l:l>
+      <l:l i="30">&#267;</l:l>
+      <l:l i="30">&#268;</l:l>
+      <l:l i="30">&#269;</l:l>
+      <l:l i="30">&#391;</l:l>
+      <l:l i="30">&#392;</l:l>
+      <l:l i="30">&#597;</l:l>
+      <l:l i="30">&#7688;</l:l>
+      <l:l i="30">&#7689;</l:l>
+      <l:l i="40">D</l:l>
+      <l:l i="40">d</l:l>
+      <l:l i="40">&#270;</l:l>
+      <l:l i="40">&#271;</l:l>
+      <l:l i="40">&#272;</l:l>
+      <l:l i="40">&#273;</l:l>
+      <l:l i="40">&#394;</l:l>
+      <l:l i="40">&#599;</l:l>
+      <l:l i="40">&#395;</l:l>
+      <l:l i="40">&#396;</l:l>
+      <l:l i="40">&#453;</l:l>
+      <l:l i="40">&#498;</l:l>
+      <l:l i="40">&#545;</l:l>
+      <l:l i="40">&#598;</l:l>
+      <l:l i="40">&#7690;</l:l>
+      <l:l i="40">&#7691;</l:l>
+      <l:l i="40">&#7692;</l:l>
+      <l:l i="40">&#7693;</l:l>
+      <l:l i="40">&#7694;</l:l>
+      <l:l i="40">&#7695;</l:l>
+      <l:l i="40">&#7696;</l:l>
+      <l:l i="40">&#7697;</l:l>
+      <l:l i="40">&#7698;</l:l>
+      <l:l i="40">&#7699;</l:l>
+      <l:l i="50">E</l:l>
+      <l:l i="50">e</l:l>
+      <l:l i="50">&#200;</l:l>
+      <l:l i="50">&#232;</l:l>
+      <l:l i="50">&#201;</l:l>
+      <l:l i="50">&#233;</l:l>
+      <l:l i="50">&#202;</l:l>
+      <l:l i="50">&#234;</l:l>
+      <l:l i="50">&#203;</l:l>
+      <l:l i="50">&#235;</l:l>
+      <l:l i="50">&#274;</l:l>
+      <l:l i="50">&#275;</l:l>
+      <l:l i="50">&#276;</l:l>
+      <l:l i="50">&#277;</l:l>
+      <l:l i="50">&#278;</l:l>
+      <l:l i="50">&#279;</l:l>
+      <l:l i="50">&#280;</l:l>
+      <l:l i="50">&#281;</l:l>
+      <l:l i="50">&#282;</l:l>
+      <l:l i="50">&#283;</l:l>
+      <l:l i="50">&#516;</l:l>
+      <l:l i="50">&#517;</l:l>
+      <l:l i="50">&#518;</l:l>
+      <l:l i="50">&#519;</l:l>
+      <l:l i="50">&#552;</l:l>
+      <l:l i="50">&#553;</l:l>
+      <l:l i="50">&#7700;</l:l>
+      <l:l i="50">&#7701;</l:l>
+      <l:l i="50">&#7702;</l:l>
+      <l:l i="50">&#7703;</l:l>
+      <l:l i="50">&#7704;</l:l>
+      <l:l i="50">&#7705;</l:l>
+      <l:l i="50">&#7706;</l:l>
+      <l:l i="50">&#7707;</l:l>
+      <l:l i="50">&#7708;</l:l>
+      <l:l i="50">&#7709;</l:l>
+      <l:l i="50">&#7864;</l:l>
+      <l:l i="50">&#7865;</l:l>
+      <l:l i="50">&#7866;</l:l>
+      <l:l i="50">&#7867;</l:l>
+      <l:l i="50">&#7868;</l:l>
+      <l:l i="50">&#7869;</l:l>
+      <l:l i="50">&#7870;</l:l>
+      <l:l i="50">&#7871;</l:l>
+      <l:l i="50">&#7872;</l:l>
+      <l:l i="50">&#7873;</l:l>
+      <l:l i="50">&#7874;</l:l>
+      <l:l i="50">&#7875;</l:l>
+      <l:l i="50">&#7876;</l:l>
+      <l:l i="50">&#7877;</l:l>
+      <l:l i="50">&#7878;</l:l>
+      <l:l i="50">&#7879;</l:l>
+      <l:l i="60">F</l:l>
+      <l:l i="60">f</l:l>
+      <l:l i="60">&#401;</l:l>
+      <l:l i="60">&#402;</l:l>
+      <l:l i="60">&#7710;</l:l>
+      <l:l i="60">&#7711;</l:l>
+      <l:l i="70">G</l:l>
+      <l:l i="70">g</l:l>
+      <l:l i="70">&#284;</l:l>
+      <l:l i="70">&#285;</l:l>
+      <l:l i="70">&#286;</l:l>
+      <l:l i="70">&#287;</l:l>
+      <l:l i="70">&#288;</l:l>
+      <l:l i="70">&#289;</l:l>
+      <l:l i="70">&#290;</l:l>
+      <l:l i="70">&#291;</l:l>
+      <l:l i="70">&#403;</l:l>
+      <l:l i="70">&#608;</l:l>
+      <l:l i="70">&#484;</l:l>
+      <l:l i="70">&#485;</l:l>
+      <l:l i="70">&#486;</l:l>
+      <l:l i="70">&#487;</l:l>
+      <l:l i="70">&#500;</l:l>
+      <l:l i="70">&#501;</l:l>
+      <l:l i="70">&#7712;</l:l>
+      <l:l i="70">&#7713;</l:l>
+      <l:l i="80">H</l:l>
+      <l:l i="80">h</l:l>
+      <l:l i="80">&#292;</l:l>
+      <l:l i="80">&#293;</l:l>
+      <l:l i="80">&#294;</l:l>
+      <l:l i="80">&#295;</l:l>
+      <l:l i="80">&#542;</l:l>
+      <l:l i="80">&#543;</l:l>
+      <l:l i="80">&#614;</l:l>
+      <l:l i="80">&#7714;</l:l>
+      <l:l i="80">&#7715;</l:l>
+      <l:l i="80">&#7716;</l:l>
+      <l:l i="80">&#7717;</l:l>
+      <l:l i="80">&#7718;</l:l>
+      <l:l i="80">&#7719;</l:l>
+      <l:l i="80">&#7720;</l:l>
+      <l:l i="80">&#7721;</l:l>
+      <l:l i="80">&#7722;</l:l>
+      <l:l i="80">&#7723;</l:l>
+      <l:l i="80">&#7830;</l:l>
+      <l:l i="90">I</l:l>
+      <l:l i="90">i</l:l>
+      <l:l i="90">&#204;</l:l>
+      <l:l i="90">&#236;</l:l>
+      <l:l i="90">&#205;</l:l>
+      <l:l i="90">&#237;</l:l>
+      <l:l i="90">&#206;</l:l>
+      <l:l i="90">&#238;</l:l>
+      <l:l i="90">&#207;</l:l>
+      <l:l i="90">&#239;</l:l>
+      <l:l i="90">&#296;</l:l>
+      <l:l i="90">&#297;</l:l>
+      <l:l i="90">&#298;</l:l>
+      <l:l i="90">&#299;</l:l>
+      <l:l i="90">&#300;</l:l>
+      <l:l i="90">&#301;</l:l>
+      <l:l i="90">&#302;</l:l>
+      <l:l i="90">&#303;</l:l>
+      <l:l i="90">&#304;</l:l>
+      <l:l i="90">&#407;</l:l>
+      <l:l i="90">&#616;</l:l>
+      <l:l i="90">&#463;</l:l>
+      <l:l i="90">&#464;</l:l>
+      <l:l i="90">&#520;</l:l>
+      <l:l i="90">&#521;</l:l>
+      <l:l i="90">&#522;</l:l>
+      <l:l i="90">&#523;</l:l>
+      <l:l i="90">&#7724;</l:l>
+      <l:l i="90">&#7725;</l:l>
+      <l:l i="90">&#7726;</l:l>
+      <l:l i="90">&#7727;</l:l>
+      <l:l i="90">&#7880;</l:l>
+      <l:l i="90">&#7881;</l:l>
+      <l:l i="90">&#7882;</l:l>
+      <l:l i="90">&#7883;</l:l>
+      <l:l i="100">J</l:l>
+      <l:l i="100">j</l:l>
+      <l:l i="100">&#308;</l:l>
+      <l:l i="100">&#309;</l:l>
+      <l:l i="100">&#496;</l:l>
+      <l:l i="100">&#669;</l:l>
+      <l:l i="110">K</l:l>
+      <l:l i="110">k</l:l>
+      <l:l i="110">&#310;</l:l>
+      <l:l i="110">&#311;</l:l>
+      <l:l i="110">&#408;</l:l>
+      <l:l i="110">&#409;</l:l>
+      <l:l i="110">&#488;</l:l>
+      <l:l i="110">&#489;</l:l>
+      <l:l i="110">&#7728;</l:l>
+      <l:l i="110">&#7729;</l:l>
+      <l:l i="110">&#7730;</l:l>
+      <l:l i="110">&#7731;</l:l>
+      <l:l i="110">&#7732;</l:l>
+      <l:l i="110">&#7733;</l:l>
+      <l:l i="120">L</l:l>
+      <l:l i="120">l</l:l>
+      <l:l i="120">&#313;</l:l>
+      <l:l i="120">&#314;</l:l>
+      <l:l i="120">&#315;</l:l>
+      <l:l i="120">&#316;</l:l>
+      <l:l i="120">&#317;</l:l>
+      <l:l i="120">&#318;</l:l>
+      <l:l i="120">&#319;</l:l>
+      <l:l i="120">&#320;</l:l>
+      <l:l i="120">&#321;</l:l>
+      <l:l i="120">&#322;</l:l>
+      <l:l i="120">&#410;</l:l>
+      <l:l i="120">&#456;</l:l>
+      <l:l i="120">&#564;</l:l>
+      <l:l i="120">&#619;</l:l>
+      <l:l i="120">&#620;</l:l>
+      <l:l i="120">&#621;</l:l>
+      <l:l i="120">&#7734;</l:l>
+      <l:l i="120">&#7735;</l:l>
+      <l:l i="120">&#7736;</l:l>
+      <l:l i="120">&#7737;</l:l>
+      <l:l i="120">&#7738;</l:l>
+      <l:l i="120">&#7739;</l:l>
+      <l:l i="120">&#7740;</l:l>
+      <l:l i="120">&#7741;</l:l>
+      <l:l i="130">M</l:l>
+      <l:l i="130">m</l:l>
+      <l:l i="130">&#625;</l:l>
+      <l:l i="130">&#7742;</l:l>
+      <l:l i="130">&#7743;</l:l>
+      <l:l i="130">&#7744;</l:l>
+      <l:l i="130">&#7745;</l:l>
+      <l:l i="130">&#7746;</l:l>
+      <l:l i="130">&#7747;</l:l>
+      <l:l i="140">N</l:l>
+      <l:l i="140">n</l:l>
+      <l:l i="140">&#209;</l:l>
+      <l:l i="140">&#241;</l:l>
+      <l:l i="140">&#323;</l:l>
+      <l:l i="140">&#324;</l:l>
+      <l:l i="140">&#325;</l:l>
+      <l:l i="140">&#326;</l:l>
+      <l:l i="140">&#327;</l:l>
+      <l:l i="140">&#328;</l:l>
+      <l:l i="140">&#413;</l:l>
+      <l:l i="140">&#626;</l:l>
+      <l:l i="140">&#414;</l:l>
+      <l:l i="140">&#544;</l:l>
+      <l:l i="140">&#459;</l:l>
+      <l:l i="140">&#504;</l:l>
+      <l:l i="140">&#505;</l:l>
+      <l:l i="140">&#565;</l:l>
+      <l:l i="140">&#627;</l:l>
+      <l:l i="140">&#7748;</l:l>
+      <l:l i="140">&#7749;</l:l>
+      <l:l i="140">&#7750;</l:l>
+      <l:l i="140">&#7751;</l:l>
+      <l:l i="140">&#7752;</l:l>
+      <l:l i="140">&#7753;</l:l>
+      <l:l i="140">&#7754;</l:l>
+      <l:l i="140">&#7755;</l:l>
+      <l:l i="150">O</l:l>
+      <l:l i="150">o</l:l>
+      <l:l i="150">&#210;</l:l>
+      <l:l i="150">&#242;</l:l>
+      <l:l i="150">&#211;</l:l>
+      <l:l i="150">&#243;</l:l>
+      <l:l i="150">&#212;</l:l>
+      <l:l i="150">&#244;</l:l>
+      <l:l i="150">&#213;</l:l>
+      <l:l i="150">&#245;</l:l>
+      <l:l i="150">&#214;</l:l>
+      <l:l i="150">&#246;</l:l>
+      <l:l i="150">&#216;</l:l>
+      <l:l i="150">&#248;</l:l>
+      <l:l i="150">&#332;</l:l>
+      <l:l i="150">&#333;</l:l>
+      <l:l i="150">&#334;</l:l>
+      <l:l i="150">&#335;</l:l>
+      <l:l i="150">&#336;</l:l>
+      <l:l i="150">&#337;</l:l>
+      <l:l i="150">&#415;</l:l>
+      <l:l i="150">&#416;</l:l>
+      <l:l i="150">&#417;</l:l>
+      <l:l i="150">&#465;</l:l>
+      <l:l i="150">&#466;</l:l>
+      <l:l i="150">&#490;</l:l>
+      <l:l i="150">&#491;</l:l>
+      <l:l i="150">&#492;</l:l>
+      <l:l i="150">&#493;</l:l>
+      <l:l i="150">&#510;</l:l>
+      <l:l i="150">&#511;</l:l>
+      <l:l i="150">&#524;</l:l>
+      <l:l i="150">&#525;</l:l>
+      <l:l i="150">&#526;</l:l>
+      <l:l i="150">&#527;</l:l>
+      <l:l i="150">&#554;</l:l>
+      <l:l i="150">&#555;</l:l>
+      <l:l i="150">&#556;</l:l>
+      <l:l i="150">&#557;</l:l>
+      <l:l i="150">&#558;</l:l>
+      <l:l i="150">&#559;</l:l>
+      <l:l i="150">&#560;</l:l>
+      <l:l i="150">&#561;</l:l>
+      <l:l i="150">&#7756;</l:l>
+      <l:l i="150">&#7757;</l:l>
+      <l:l i="150">&#7758;</l:l>
+      <l:l i="150">&#7759;</l:l>
+      <l:l i="150">&#7760;</l:l>
+      <l:l i="150">&#7761;</l:l>
+      <l:l i="150">&#7762;</l:l>
+      <l:l i="150">&#7763;</l:l>
+      <l:l i="150">&#7884;</l:l>
+      <l:l i="150">&#7885;</l:l>
+      <l:l i="150">&#7886;</l:l>
+      <l:l i="150">&#7887;</l:l>
+      <l:l i="150">&#7888;</l:l>
+      <l:l i="150">&#7889;</l:l>
+      <l:l i="150">&#7890;</l:l>
+      <l:l i="150">&#7891;</l:l>
+      <l:l i="150">&#7892;</l:l>
+      <l:l i="150">&#7893;</l:l>
+      <l:l i="150">&#7894;</l:l>
+      <l:l i="150">&#7895;</l:l>
+      <l:l i="150">&#7896;</l:l>
+      <l:l i="150">&#7897;</l:l>
+      <l:l i="150">&#7898;</l:l>
+      <l:l i="150">&#7899;</l:l>
+      <l:l i="150">&#7900;</l:l>
+      <l:l i="150">&#7901;</l:l>
+      <l:l i="150">&#7902;</l:l>
+      <l:l i="150">&#7903;</l:l>
+      <l:l i="150">&#7904;</l:l>
+      <l:l i="150">&#7905;</l:l>
+      <l:l i="150">&#7906;</l:l>
+      <l:l i="150">&#7907;</l:l>
+      <l:l i="160">P</l:l>
+      <l:l i="160">p</l:l>
+      <l:l i="160">&#420;</l:l>
+      <l:l i="160">&#421;</l:l>
+      <l:l i="160">&#7764;</l:l>
+      <l:l i="160">&#7765;</l:l>
+      <l:l i="160">&#7766;</l:l>
+      <l:l i="160">&#7767;</l:l>
+      <l:l i="170">Q</l:l>
+      <l:l i="170">q</l:l>
+      <l:l i="170">&#672;</l:l>
+      <l:l i="180">R</l:l>
+      <l:l i="180">r</l:l>
+      <l:l i="180">&#340;</l:l>
+      <l:l i="180">&#341;</l:l>
+      <l:l i="180">&#342;</l:l>
+      <l:l i="180">&#343;</l:l>
+      <l:l i="180">&#344;</l:l>
+      <l:l i="180">&#345;</l:l>
+      <l:l i="180">&#528;</l:l>
+      <l:l i="180">&#529;</l:l>
+      <l:l i="180">&#530;</l:l>
+      <l:l i="180">&#531;</l:l>
+      <l:l i="180">&#636;</l:l>
+      <l:l i="180">&#637;</l:l>
+      <l:l i="180">&#638;</l:l>
+      <l:l i="180">&#7768;</l:l>
+      <l:l i="180">&#7769;</l:l>
+      <l:l i="180">&#7770;</l:l>
+      <l:l i="180">&#7771;</l:l>
+      <l:l i="180">&#7772;</l:l>
+      <l:l i="180">&#7773;</l:l>
+      <l:l i="180">&#7774;</l:l>
+      <l:l i="180">&#7775;</l:l>
+      <l:l i="190">S</l:l>
+      <l:l i="190">s</l:l>
+      <l:l i="190">&#346;</l:l>
+      <l:l i="190">&#347;</l:l>
+      <l:l i="190">&#348;</l:l>
+      <l:l i="190">&#349;</l:l>
+      <l:l i="190">&#350;</l:l>
+      <l:l i="190">&#351;</l:l>
+      <l:l i="190">&#352;</l:l>
+      <l:l i="190">&#353;</l:l>
+      <l:l i="190">&#536;</l:l>
+      <l:l i="190">&#537;</l:l>
+      <l:l i="190">&#642;</l:l>
+      <l:l i="190">&#7776;</l:l>
+      <l:l i="190">&#7777;</l:l>
+      <l:l i="190">&#7778;</l:l>
+      <l:l i="190">&#7779;</l:l>
+      <l:l i="190">&#7780;</l:l>
+      <l:l i="190">&#7781;</l:l>
+      <l:l i="190">&#7782;</l:l>
+      <l:l i="190">&#7783;</l:l>
+      <l:l i="190">&#7784;</l:l>
+      <l:l i="190">&#7785;</l:l>
+      <l:l i="200">T</l:l>
+      <l:l i="200">t</l:l>
+      <l:l i="200">&#354;</l:l>
+      <l:l i="200">&#355;</l:l>
+      <l:l i="200">&#356;</l:l>
+      <l:l i="200">&#357;</l:l>
+      <l:l i="200">&#358;</l:l>
+      <l:l i="200">&#359;</l:l>
+      <l:l i="200">&#427;</l:l>
+      <l:l i="200">&#428;</l:l>
+      <l:l i="200">&#429;</l:l>
+      <l:l i="200">&#430;</l:l>
+      <l:l i="200">&#648;</l:l>
+      <l:l i="200">&#538;</l:l>
+      <l:l i="200">&#539;</l:l>
+      <l:l i="200">&#566;</l:l>
+      <l:l i="200">&#7786;</l:l>
+      <l:l i="200">&#7787;</l:l>
+      <l:l i="200">&#7788;</l:l>
+      <l:l i="200">&#7789;</l:l>
+      <l:l i="200">&#7790;</l:l>
+      <l:l i="200">&#7791;</l:l>
+      <l:l i="200">&#7792;</l:l>
+      <l:l i="200">&#7793;</l:l>
+      <l:l i="200">&#7831;</l:l>
+      <l:l i="210">U</l:l>
+      <l:l i="210">u</l:l>
+      <l:l i="210">&#217;</l:l>
+      <l:l i="210">&#249;</l:l>
+      <l:l i="210">&#218;</l:l>
+      <l:l i="210">&#250;</l:l>
+      <l:l i="210">&#219;</l:l>
+      <l:l i="210">&#251;</l:l>
+      <l:l i="210">&#220;</l:l>
+      <l:l i="210">&#252;</l:l>
+      <l:l i="210">&#360;</l:l>
+      <l:l i="210">&#361;</l:l>
+      <l:l i="210">&#362;</l:l>
+      <l:l i="210">&#363;</l:l>
+      <l:l i="210">&#364;</l:l>
+      <l:l i="210">&#365;</l:l>
+      <l:l i="210">&#366;</l:l>
+      <l:l i="210">&#367;</l:l>
+      <l:l i="210">&#368;</l:l>
+      <l:l i="210">&#369;</l:l>
+      <l:l i="210">&#370;</l:l>
+      <l:l i="210">&#371;</l:l>
+      <l:l i="210">&#431;</l:l>
+      <l:l i="210">&#432;</l:l>
+      <l:l i="210">&#467;</l:l>
+      <l:l i="210">&#468;</l:l>
+      <l:l i="210">&#469;</l:l>
+      <l:l i="210">&#470;</l:l>
+      <l:l i="210">&#471;</l:l>
+      <l:l i="210">&#472;</l:l>
+      <l:l i="210">&#473;</l:l>
+      <l:l i="210">&#474;</l:l>
+      <l:l i="210">&#475;</l:l>
+      <l:l i="210">&#476;</l:l>
+      <l:l i="210">&#532;</l:l>
+      <l:l i="210">&#533;</l:l>
+      <l:l i="210">&#534;</l:l>
+      <l:l i="210">&#535;</l:l>
+      <l:l i="210">&#7794;</l:l>
+      <l:l i="210">&#7795;</l:l>
+      <l:l i="210">&#7796;</l:l>
+      <l:l i="210">&#7797;</l:l>
+      <l:l i="210">&#7798;</l:l>
+      <l:l i="210">&#7799;</l:l>
+      <l:l i="210">&#7800;</l:l>
+      <l:l i="210">&#7801;</l:l>
+      <l:l i="210">&#7802;</l:l>
+      <l:l i="210">&#7803;</l:l>
+      <l:l i="210">&#7908;</l:l>
+      <l:l i="210">&#7909;</l:l>
+      <l:l i="210">&#7910;</l:l>
+      <l:l i="210">&#7911;</l:l>
+      <l:l i="210">&#7912;</l:l>
+      <l:l i="210">&#7913;</l:l>
+      <l:l i="210">&#7914;</l:l>
+      <l:l i="210">&#7915;</l:l>
+      <l:l i="210">&#7916;</l:l>
+      <l:l i="210">&#7917;</l:l>
+      <l:l i="210">&#7918;</l:l>
+      <l:l i="210">&#7919;</l:l>
+      <l:l i="210">&#7920;</l:l>
+      <l:l i="210">&#7921;</l:l>
+      <l:l i="220">V</l:l>
+      <l:l i="220">v</l:l>
+      <l:l i="220">&#434;</l:l>
+      <l:l i="220">&#651;</l:l>
+      <l:l i="220">&#7804;</l:l>
+      <l:l i="220">&#7805;</l:l>
+      <l:l i="220">&#7806;</l:l>
+      <l:l i="220">&#7807;</l:l>
+      <l:l i="230">W</l:l>
+      <l:l i="230">w</l:l>
+      <l:l i="230">&#372;</l:l>
+      <l:l i="230">&#373;</l:l>
+      <l:l i="230">&#7808;</l:l>
+      <l:l i="230">&#7809;</l:l>
+      <l:l i="230">&#7810;</l:l>
+      <l:l i="230">&#7811;</l:l>
+      <l:l i="230">&#7812;</l:l>
+      <l:l i="230">&#7813;</l:l>
+      <l:l i="230">&#7814;</l:l>
+      <l:l i="230">&#7815;</l:l>
+      <l:l i="230">&#7816;</l:l>
+      <l:l i="230">&#7817;</l:l>
+      <l:l i="230">&#7832;</l:l>
+      <l:l i="240">X</l:l>
+      <l:l i="240">x</l:l>
+      <l:l i="240">&#7818;</l:l>
+      <l:l i="240">&#7819;</l:l>
+      <l:l i="240">&#7820;</l:l>
+      <l:l i="240">&#7821;</l:l>
+      <l:l i="250">Y</l:l>
+      <l:l i="250">y</l:l>
+      <l:l i="250">&#221;</l:l>
+      <l:l i="250">&#253;</l:l>
+      <l:l i="250">&#255;</l:l>
+      <l:l i="250">&#376;</l:l>
+      <l:l i="250">&#374;</l:l>
+      <l:l i="250">&#375;</l:l>
+      <l:l i="250">&#435;</l:l>
+      <l:l i="250">&#436;</l:l>
+      <l:l i="250">&#562;</l:l>
+      <l:l i="250">&#563;</l:l>
+      <l:l i="250">&#7822;</l:l>
+      <l:l i="250">&#7823;</l:l>
+      <l:l i="250">&#7833;</l:l>
+      <l:l i="250">&#7922;</l:l>
+      <l:l i="250">&#7923;</l:l>
+      <l:l i="250">&#7924;</l:l>
+      <l:l i="250">&#7925;</l:l>
+      <l:l i="250">&#7926;</l:l>
+      <l:l i="250">&#7927;</l:l>
+      <l:l i="250">&#7928;</l:l>
+      <l:l i="250">&#7929;</l:l>
+      <l:l i="260">Z</l:l>
+      <l:l i="260">z</l:l>
+      <l:l i="260">&#377;</l:l>
+      <l:l i="260">&#378;</l:l>
+      <l:l i="260">&#379;</l:l>
+      <l:l i="260">&#380;</l:l>
+      <l:l i="260">&#381;</l:l>
+      <l:l i="260">&#382;</l:l>
+      <l:l i="260">&#437;</l:l>
+      <l:l i="260">&#438;</l:l>
+      <l:l i="260">&#548;</l:l>
+      <l:l i="260">&#549;</l:l>
+      <l:l i="260">&#656;</l:l>
+      <l:l i="260">&#657;</l:l>
+      <l:l i="260">&#7824;</l:l>
+      <l:l i="260">&#7825;</l:l>
+      <l:l i="260">&#7826;</l:l>
+      <l:l i="260">&#7827;</l:l>
+      <l:l i="260">&#7828;</l:l>
+      <l:l i="260">&#7829;</l:l>
+   </l:letters>
+</l:l10n>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/table.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/table.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/table.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,441 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+                exclude-result-prefixes="doc"
+                version="1.0">
+
+<!-- ********************************************************************
+     $Id: table.xsl,v 1.1.1.1 2004/10/19 21:21:41 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:template name="blank.spans">
+  <xsl:param name="cols" select="1"/>
+  <xsl:if test="$cols &gt; 0">
+    <xsl:text>0:</xsl:text>
+    <xsl:call-template name="blank.spans">
+      <xsl:with-param name="cols" select="$cols - 1"/>
+    </xsl:call-template>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template name="calculate.following.spans">
+  <xsl:param name="colspan" select="1"/>
+  <xsl:param name="spans" select="''"/>
+
+  <xsl:choose>
+    <xsl:when test="$colspan &gt; 0">
+      <xsl:call-template name="calculate.following.spans">
+        <xsl:with-param name="colspan" select="$colspan - 1"/>
+        <xsl:with-param name="spans" select="substring-after($spans,':')"/>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:value-of select="$spans"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="finaltd">
+  <xsl:param name="spans"/>
+  <xsl:param name="col" select="0"/>
+
+  <xsl:if test="$spans != ''">
+    <xsl:choose>
+      <xsl:when test="starts-with($spans,'0:')">
+        <xsl:call-template name="empty.table.cell">
+          <xsl:with-param name="colnum" select="$col"/>
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:otherwise></xsl:otherwise>
+    </xsl:choose>
+
+    <xsl:call-template name="finaltd">
+      <xsl:with-param name="spans" select="substring-after($spans,':')"/>
+      <xsl:with-param name="col" select="$col+1"/>
+    </xsl:call-template>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template name="sfinaltd">
+  <xsl:param name="spans"/>
+
+  <xsl:if test="$spans != ''">
+    <xsl:choose>
+      <xsl:when test="starts-with($spans,'0:')">0:</xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="substring-before($spans,':')-1"/>
+        <xsl:text>:</xsl:text>
+      </xsl:otherwise>
+    </xsl:choose>
+
+    <xsl:call-template name="sfinaltd">
+      <xsl:with-param name="spans" select="substring-after($spans,':')"/>
+    </xsl:call-template>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template name="entry.colnum">
+  <xsl:param name="entry" select="."/>
+
+  <xsl:choose>
+    <xsl:when test="$entry/@spanname">
+      <xsl:variable name="spanname" select="$entry/@spanname"/>
+      <xsl:variable name="spanspec"
+                    select="$entry/ancestor::tgroup/spanspec[@spanname=$spanname]"/>
+      <xsl:variable name="colspec"
+                    select="$entry/ancestor::tgroup/colspec[@colname=$spanspec/@namest]"/>
+      <xsl:call-template name="colspec.colnum">
+        <xsl:with-param name="colspec" select="$colspec"/>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:when test="$entry/@colname">
+      <xsl:variable name="colname" select="$entry/@colname"/>
+      <xsl:variable name="colspec"
+                    select="$entry/ancestor::tgroup/colspec[@colname=$colname]"/>
+      <xsl:call-template name="colspec.colnum">
+        <xsl:with-param name="colspec" select="$colspec"/>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:when test="$entry/@namest">
+      <xsl:variable name="namest" select="$entry/@namest"/>
+      <xsl:variable name="colspec"
+                    select="$entry/ancestor::tgroup/colspec[@colname=$namest]"/>
+      <xsl:call-template name="colspec.colnum">
+        <xsl:with-param name="colspec" select="$colspec"/>
+      </xsl:call-template>
+    </xsl:when>
+    <!-- no idea, return 0 -->
+    <xsl:otherwise>0</xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<doc:template name="entry.colnum" xmlns="">
+<refpurpose>Determine the column number in which a given entry occurs</refpurpose>
+<refdescription>
+<para>If an <sgmltag>entry</sgmltag> has a
+<sgmltag class="attribute">colname</sgmltag> or
+<sgmltag class="attribute">namest</sgmltag> attribute, this template
+will determine the number of the column in which the entry should occur.
+For other <sgmltag>entry</sgmltag>s, nothing is returned.</para>
+</refdescription>
+<refparameter>
+<variablelist>
+<varlistentry><term>entry</term>
+<listitem>
+<para>The <sgmltag>entry</sgmltag>-element which is to be tested.</para>
+</listitem>
+</varlistentry>
+</variablelist>
+</refparameter>
+
+<refreturn>
+<para>This template returns the column number if it can be determined,
+or 0 (the empty string)</para>
+</refreturn>
+</doc:template>
+
+<xsl:template name="colspec.colnum">
+  <xsl:param name="colspec" select="."/>
+  <xsl:choose>
+    <xsl:when test="$colspec/@colnum">
+      <xsl:value-of select="$colspec/@colnum"/>
+    </xsl:when>
+    <xsl:when test="$colspec/preceding-sibling::colspec">
+      <xsl:variable name="prec.colspec.colnum">
+        <xsl:call-template name="colspec.colnum">
+          <xsl:with-param name="colspec"
+                          select="$colspec/preceding-sibling::colspec[1]"/>
+        </xsl:call-template>
+      </xsl:variable>
+      <xsl:value-of select="$prec.colspec.colnum + 1"/>
+    </xsl:when>
+    <xsl:otherwise>1</xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="calculate.colspan">
+  <xsl:param name="entry" select="."/>
+  <xsl:variable name="spanname" select="$entry/@spanname"/>
+  <xsl:variable name="spanspec"
+                select="$entry/ancestor::tgroup/spanspec[@spanname=$spanname]"/>
+
+  <xsl:variable name="namest">
+    <xsl:choose>
+      <xsl:when test="@spanname">
+        <xsl:value-of select="$spanspec/@namest"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$entry/@namest"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:variable name="nameend">
+    <xsl:choose>
+      <xsl:when test="@spanname">
+        <xsl:value-of select="$spanspec/@nameend"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$entry/@nameend"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:variable name="scol">
+    <xsl:call-template name="colspec.colnum">
+      <xsl:with-param name="colspec"
+                      select="$entry/ancestor::tgroup/colspec[@colname=$namest]"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="ecol">
+    <xsl:call-template name="colspec.colnum">
+      <xsl:with-param name="colspec"
+                      select="$entry/ancestor::tgroup/colspec[@colname=$nameend]"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="$namest != '' and $nameend != ''">
+      <xsl:choose>
+        <xsl:when test="$ecol &gt;= $scol">
+          <xsl:value-of select="$ecol - $scol + 1"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="$scol - $ecol + 1"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+    <xsl:otherwise>1</xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="calculate.rowsep">
+  <xsl:param name="entry" select="."/>
+  <xsl:param name="colnum" select="0"/>
+
+  <xsl:call-template name="inherited.table.attribute">
+    <xsl:with-param name="entry" select="$entry"/>
+    <xsl:with-param name="colnum" select="$colnum"/>
+    <xsl:with-param name="attribute" select="'rowsep'"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="calculate.colsep">
+  <xsl:param name="entry" select="."/>
+  <xsl:param name="colnum" select="0"/>
+
+  <xsl:call-template name="inherited.table.attribute">
+    <xsl:with-param name="entry" select="$entry"/>
+    <xsl:with-param name="colnum" select="$colnum"/>
+    <xsl:with-param name="attribute" select="'colsep'"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="inherited.table.attribute">
+  <xsl:param name="entry" select="."/>
+  <xsl:param name="row" select="$entry/ancestor-or-self::row[1]"/>
+  <xsl:param name="colnum" select="0"/>
+  <xsl:param name="attribute" select="'colsep'"/>
+
+  <xsl:variable name="tgroup" select="$row/ancestor::tgroup[1]"/>
+
+  <xsl:variable name="entry.value">
+    <xsl:call-template name="get-attribute">
+      <xsl:with-param name="element" select="$entry"/>
+      <xsl:with-param name="attribute" select="$attribute"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="row.value">
+    <xsl:call-template name="get-attribute">
+      <xsl:with-param name="element" select="$row"/>
+      <xsl:with-param name="attribute" select="$attribute"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="span.value">
+    <xsl:if test="$entry/@spanname">
+      <xsl:variable name="spanname" select="$entry/@spanname"/>
+      <xsl:variable name="spanspec"
+                    select="$tgroup/spanspec[@spanname=$spanname]"/>
+      <xsl:variable name="span.colspec"
+                    select="$tgroup/colspec[@colname=$spanspec/@namest]"/>
+
+      <xsl:variable name="spanspec.value">
+        <xsl:call-template name="get-attribute">
+          <xsl:with-param name="element" select="$spanspec"/>
+          <xsl:with-param name="attribute" select="$attribute"/>
+        </xsl:call-template>
+      </xsl:variable>
+
+      <xsl:variable name="scolspec.value">
+        <xsl:call-template name="get-attribute">
+          <xsl:with-param name="element" select="$span.colspec"/>
+          <xsl:with-param name="attribute" select="$attribute"/>
+        </xsl:call-template>
+      </xsl:variable>
+
+      <xsl:choose>
+        <xsl:when test="$spanspec.value != ''">
+          <xsl:value-of select="$spanspec.value"/>
+        </xsl:when>
+        <xsl:when test="$scolspec.value != ''">
+          <xsl:value-of select="$scolspec.value"/>
+        </xsl:when>
+        <xsl:otherwise></xsl:otherwise>
+      </xsl:choose>
+    </xsl:if>
+  </xsl:variable>
+
+  <xsl:variable name="namest.value">
+    <xsl:if test="$entry/@namest">
+      <xsl:variable name="namest" select="$entry/@namest"/>
+      <xsl:variable name="colspec"
+                    select="$tgroup/colspec[@colname=$namest]"/>
+
+      <xsl:variable name="inner.namest.value">
+        <xsl:call-template name="get-attribute">
+          <xsl:with-param name="element" select="$colspec"/>
+          <xsl:with-param name="attribute" select="$attribute"/>
+        </xsl:call-template>
+      </xsl:variable>
+
+      <xsl:choose>
+        <xsl:when test="$inner.namest.value">
+          <xsl:value-of select="$inner.namest.value"/>
+        </xsl:when>
+        <xsl:otherwise></xsl:otherwise>
+      </xsl:choose>
+    </xsl:if>
+  </xsl:variable>
+
+  <xsl:variable name="tgroup.value">
+    <xsl:call-template name="get-attribute">
+      <xsl:with-param name="element" select="$tgroup"/>
+      <xsl:with-param name="attribute" select="$attribute"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="default.value">
+    <!-- This section used to say that rowsep and colsep have defaults based -->
+    <!-- on the frame setting. Further reflection and closer examination of the -->
+    <!-- CALS spec reveals I was mistaken. The default is "1" for rowsep and colsep. -->
+    <!-- For everything else, the default is the tgroup value -->
+    <xsl:choose>
+      <xsl:when test="$tgroup.value != ''">
+        <xsl:value-of select="$tgroup.value"/>
+      </xsl:when>
+      <xsl:when test="$attribute = 'rowsep'">1</xsl:when>
+      <xsl:when test="$attribute = 'colsep'">1</xsl:when>
+      <xsl:otherwise><!-- empty --></xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="$entry.value != ''">
+      <xsl:value-of select="$entry.value"/>
+    </xsl:when>
+    <xsl:when test="$row.value != ''">
+      <xsl:value-of select="$row.value"/>
+    </xsl:when>
+    <xsl:when test="$span.value != ''">
+      <xsl:value-of select="$span.value"/>
+    </xsl:when>
+    <xsl:when test="$namest.value != ''">
+      <xsl:value-of select="$namest.value"/>
+    </xsl:when>
+    <xsl:when test="$colnum &gt; 0">
+      <xsl:variable name="calc.colvalue">
+        <xsl:call-template name="colnum.colspec">
+          <xsl:with-param name="colnum" select="$colnum"/>
+          <xsl:with-param name="attribute" select="$attribute"/>
+        </xsl:call-template>
+      </xsl:variable>
+      <xsl:choose>
+        <xsl:when test="$calc.colvalue != ''">
+          <xsl:value-of select="$calc.colvalue"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="$default.value"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:value-of select="$default.value"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="colnum.colspec">
+  <xsl:param name="colnum" select="0"/>
+  <xsl:param name="attribute" select="'colname'"/>
+  <xsl:param name="colspecs" select="ancestor::tgroup/colspec"/>
+  <xsl:param name="count" select="1"/>
+
+  <xsl:choose>
+    <xsl:when test="not($colspecs) or $count &gt; $colnum">
+      <!-- nop -->
+    </xsl:when>
+    <xsl:when test="$colspecs[1]/@colnum">
+      <xsl:choose>
+        <xsl:when test="$colspecs[1]/@colnum = $colnum">
+          <xsl:call-template name="get-attribute">
+            <xsl:with-param name="element" select="$colspecs[1]"/>
+            <xsl:with-param name="attribute" select="$attribute"/>
+          </xsl:call-template>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:call-template name="colnum.colspec">
+            <xsl:with-param name="colnum" select="$colnum"/>
+            <xsl:with-param name="attribute" select="$attribute"/>
+            <xsl:with-param name="colspecs"
+                            select="$colspecs[position()&gt;1]"/>
+            <xsl:with-param name="count"
+                            select="$colspecs[1]/@colnum+1"/>
+          </xsl:call-template>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:choose>
+        <xsl:when test="$count = $colnum">
+          <xsl:call-template name="get-attribute">
+            <xsl:with-param name="element" select="$colspecs[1]"/>
+            <xsl:with-param name="attribute" select="$attribute"/>
+          </xsl:call-template>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:call-template name="colnum.colspec">
+            <xsl:with-param name="colnum" select="$colnum"/>
+            <xsl:with-param name="attribute" select="$attribute"/>
+            <xsl:with-param name="colspecs"
+                            select="$colspecs[position()&gt;1]"/>
+            <xsl:with-param name="count" select="$count+1"/>
+          </xsl:call-template>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="get-attribute">
+  <xsl:param name="element" select="."/>
+  <xsl:param name="attribute" select="''"/>
+
+  <xsl:for-each select="$element/@*">
+    <xsl:if test="local-name(.) = $attribute">
+      <xsl:value-of select="."/>
+    </xsl:if>
+  </xsl:for-each>
+</xsl:template>
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/targetdatabase.dtd
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/targetdatabase.dtd	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/targetdatabase.dtd	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,47 @@
+<!-- targetdatabase.dtd -->
+<!-- A DTD for managing cross reference target information -->
+
+<!ELEMENT targetset (targetsetinfo?, sitemap*, document*) >
+
+<!ELEMENT targetsetinfo (#PCDATA) >
+
+<!ELEMENT sitemap (dir) >
+
+<!ELEMENT dir ((dir|document)*) >
+<!ATTLIST dir
+        name      CDATA   #REQUIRED
+>
+
+<!ELEMENT document (div*) >
+<!ATTLIST document
+        targetdoc CDATA   #REQUIRED
+        uri       CDATA   #IMPLIED
+        baseuri   CDATA   #IMPLIED
+        href      CDATA   #IMPLIED
+>
+
+<!ELEMENT div (ttl?, objttl?, xreftext?, page?, (div|obj)*)>
+<!ATTLIST div
+        targetptr  CDATA   #IMPLIED
+        element   CDATA   #IMPLIED
+        name      CDATA   #IMPLIED
+        number    CDATA   #IMPLIED
+        href      CDATA   #IMPLIED
+        lang      CDATA   #IMPLIED
+>
+        
+        
+<!ELEMENT ttl (#PCDATA)>
+<!ELEMENT objttl (#PCDATA)>
+<!ELEMENT xreftext (#PCDATA)>
+<!ELEMENT page (#PCDATA)>
+
+<!ELEMENT obj (ttl?, objttl?, xreftext?, page?)>
+<!ATTLIST obj
+        targetptr  CDATA   #IMPLIED
+        element   CDATA   #IMPLIED
+        name      CDATA   #IMPLIED
+        number    CDATA   #IMPLIED
+        href      CDATA   #IMPLIED
+        lang      CDATA   #IMPLIED
+>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/targets.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/targets.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/targets.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,251 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+                exclude-result-prefixes="doc"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: targets.xsl,v 1.1.1.1 2004/10/19 21:21:41 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<!-- cross reference target collection  -->
+
+<doc:mode mode="collect.targets" xmlns="">
+<refpurpose>Collects information for potential cross reference targets</refpurpose>
+<refdescription>
+<para>Processing the root element in the
+<literal role="mode">collect.targets</literal> mode produces 
+a set of target database elements that can be used by
+the olink mechanism to resolve external cross references.
+The collection process is controlled by the <literal>
+collect.xref.targets</literal> parameter, which can be
+<literal>yes</literal> to collect targets and process
+the document for output, <literal>only</literal> to
+only collect the targets, and <literal>no</literal>
+(default) to not collect the targets and only process the document.
+</para>
+<para>
+A <literal>targets.filename</literal> parameter must be
+specified to receive the output if 
+<literal>collect.xref.targets</literal> is
+set to <literal>yes</literal> so as to
+redirect the target data to a file separate from the
+document output.
+</para>
+</refdescription>
+</doc:mode>
+
+<!-- ============================================================ -->
+
+<xsl:template match="*" mode="collect.targets">
+  <xsl:choose>
+    <xsl:when test="$collect.xref.targets = 'yes' and $targets.filename = ''">
+      <xsl:message>
+        Must specify a $targets.filename parameter when
+        $collect.xref.targets is set to 'yes'.
+        The xref targets were not collected.
+      </xsl:message>
+    </xsl:when> 
+    <xsl:otherwise>
+      <xsl:choose>
+        <xsl:when test="$targets.filename">
+          <xsl:call-template name="write.chunk">
+            <xsl:with-param name="filename" select="$targets.filename"/>
+            <xsl:with-param name="method" select="'xml'"/>
+            <xsl:with-param name="encoding" select="'utf-8'"/>
+            <xsl:with-param name="omit-xml-declaration" select="'yes'"/>
+            <xsl:with-param name="doctype-public" select="''"/>
+            <xsl:with-param name="doctype-system" select="''"/>
+            <xsl:with-param name="indent" select="'yes'"/>
+            <xsl:with-param name="quiet" select="0"/>
+            <xsl:with-param name="content">
+              <xsl:apply-templates select="." mode="olink.mode"/>
+            </xsl:with-param>
+          </xsl:call-template>
+        </xsl:when>
+        <xsl:otherwise>
+          <!-- Else write to standard output -->
+          <xsl:apply-templates select="." mode="olink.mode"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="olink.href.target">
+  <xsl:param name="nd" select="."/>
+
+  <xsl:value-of select="$olink.base.uri"/>
+  <xsl:call-template name="href.target">
+    <xsl:with-param name="obj" select="$nd"/>
+  </xsl:call-template>
+</xsl:template>
+
+<!-- Templates for extracting cross reference information
+     from a document for use in an xref database.
+-->
+
+<xsl:template name="attrs">
+  <xsl:param name="nd" select="."/>
+
+  <xsl:attribute name="element">
+    <xsl:value-of select="local-name(.)"/>
+  </xsl:attribute>
+
+  <xsl:attribute name="href">
+    <xsl:call-template name="olink.href.target">
+      <xsl:with-param name="object" select="$nd"/>
+    </xsl:call-template>
+  </xsl:attribute>
+
+  <xsl:variable name="num">
+    <xsl:apply-templates select="$nd" mode="label.markup">
+      <xsl:with-param name="verbose" select="0"/>
+    </xsl:apply-templates>
+  </xsl:variable>
+
+  <xsl:if test="$num">
+    <xsl:attribute name="number">
+      <xsl:value-of select="$num"/>
+    </xsl:attribute>
+  </xsl:if>
+
+  <xsl:if test="$nd/@id">
+    <xsl:attribute name="targetptr">
+      <xsl:value-of select="$nd/@id"/>
+    </xsl:attribute>
+  </xsl:if>
+
+  <xsl:if test="$nd/@lang">
+    <xsl:attribute name="lang">
+      <xsl:value-of select="$nd/@lang"/>
+    </xsl:attribute>
+  </xsl:if>
+
+</xsl:template>
+
+<xsl:template name="div">
+  <xsl:param name="nd" select="."/>
+
+  <div>
+    <xsl:call-template name="attrs">
+      <xsl:with-param name="nd" select="$nd"/>
+    </xsl:call-template>
+    <ttl>
+      <xsl:apply-templates select="$nd" mode="title.markup"/>
+    </ttl>
+    <xreftext>
+      <xsl:choose>
+        <xsl:when test="$nd/@xreflabel">
+          <xsl:call-template name="xref.xreflabel">
+            <xsl:with-param name="target" select="$nd"/>
+          </xsl:call-template>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:apply-templates select="$nd" mode="xref-to"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xreftext>
+    <xsl:apply-templates mode="olink.mode"/>
+  </div>
+</xsl:template>
+
+<xsl:template name="obj">
+  <xsl:param name="nd" select="."/>
+
+  <obj>
+    <xsl:call-template name="attrs">
+      <xsl:with-param name="nd" select="$nd"/>
+    </xsl:call-template>
+    <ttl>
+      <xsl:apply-templates select="$nd" mode="title.markup">
+        <xsl:with-param name="verbose" select="0"/>
+      </xsl:apply-templates>
+    </ttl>
+    <xreftext>
+      <xsl:choose>
+        <xsl:when test="$nd/@xreflabel">
+          <xsl:call-template name="xref.xreflabel">
+            <xsl:with-param name="target" select="$nd"/>
+          </xsl:call-template>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:apply-templates select="$nd" mode="xref-to">
+            <xsl:with-param name="verbose" select="0"/>
+          </xsl:apply-templates>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xreftext>
+  </obj>
+</xsl:template>
+
+<xsl:template match="text()|processing-instruction()|comment()"
+              mode="olink.mode">
+  <!-- nop -->
+</xsl:template>
+
+<!--
+<xsl:template match="*" mode="olink.mode">
+</xsl:template>
+-->
+
+<xsl:template match="set" mode="olink.mode">
+  <xsl:call-template name="div"/>
+</xsl:template>
+
+<xsl:template match="book" mode="olink.mode">
+  <xsl:call-template name="div"/>
+</xsl:template>
+
+<xsl:template match="preface|chapter|appendix" mode="olink.mode">
+  <xsl:call-template name="div"/>
+</xsl:template>
+
+<xsl:template match="part|reference" mode="olink.mode">
+  <xsl:call-template name="div"/>
+</xsl:template>
+
+<xsl:template match="article" mode="olink.mode">
+  <xsl:call-template name="div"/>
+</xsl:template>
+
+<xsl:template match="refentry" mode="olink.mode">
+  <xsl:call-template name="div"/>
+</xsl:template>
+
+<xsl:template match="section|sect1|sect2|sect3|sect4|sect5" mode="olink.mode">
+  <xsl:call-template name="div"/>
+</xsl:template>
+
+<xsl:template match="refsection|refsect1|refsect2|refsect3" mode="olink.mode">
+  <xsl:call-template name="div"/>
+</xsl:template>
+
+<xsl:template match="figure|example|table" mode="olink.mode">
+  <xsl:call-template name="obj"/>
+</xsl:template>
+
+<xsl:template match="equation[title]" mode="olink.mode">
+  <xsl:call-template name="obj"/>
+</xsl:template>
+
+<xsl:template match="qandaset|qandaentry" mode="olink.mode">
+  <xsl:call-template name="div"/>
+</xsl:template>
+
+<xsl:template match="*" mode="olink.mode">
+  <xsl:if test="@id">
+    <xsl:call-template name="obj"/>
+  </xsl:if> 
+  <xsl:apply-templates mode="olink.mode"/>
+</xsl:template>
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/th.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/th.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/th.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1153 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="th" english-language-name="Thai">
+
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+   <l:gentext key="Abstract" text="&#3610;&#3607;&#3588;&#3633;&#3604;&#3618;&#3656;&#3629;"/>
+   <l:gentext key="abstract" text="&#3610;&#3607;&#3588;&#3633;&#3604;&#3618;&#3656;&#3629;"/>
+   <l:gentext key="Answer" text="&#3605;&#3629;&#3610;:"/>
+   <l:gentext key="answer" text="&#3605;&#3629;&#3610;:"/>
+   <l:gentext key="Appendix" text="&#3616;&#3634;&#3588;&#3612;&#3609;&#3623;&#3585;"/>
+   <l:gentext key="appendix" text="&#3616;&#3634;&#3588;&#3612;&#3609;&#3623;&#3585;"/>
+   <l:gentext key="Article" text="&#3610;&#3607;&#3588;&#3623;&#3634;&#3617;"/>
+   <l:gentext key="article" text="&#3610;&#3607;&#3588;&#3623;&#3634;&#3617;"/>
+   <l:gentext key="Bibliography" text="&#3610;&#3619;&#3619;&#3603;&#3634;&#3609;&#3640;&#3585;&#3619;&#3617;"/>
+   <l:gentext key="bibliography" text="&#3610;&#3619;&#3619;&#3603;&#3634;&#3609;&#3640;&#3585;&#3619;&#3617;"/>
+   <l:gentext key="Book" text="&#3627;&#3609;&#3633;&#3591;&#3626;&#3639;&#3629;"/>
+   <l:gentext key="book" text="&#3627;&#3609;&#3633;&#3591;&#3626;&#3639;&#3629;"/>
+   <l:gentext key="CAUTION" text="&#3588;&#3635;&#3648;&#3605;&#3639;&#3629;&#3609;"/>
+   <l:gentext key="Caution" text="&#3588;&#3635;&#3648;&#3605;&#3639;&#3629;&#3609;"/>
+   <l:gentext key="caution" text="&#3588;&#3635;&#3648;&#3605;&#3639;&#3629;&#3609;"/>
+   <l:gentext key="Chapter" text="&#3610;&#3607;&#3607;&#3637;&#3656;"/>
+   <l:gentext key="chapter" text="&#3610;&#3607;&#3607;&#3637;&#3656;"/>
+   <l:gentext key="Colophon" text="&#3648;&#3610;&#3639;&#3657;&#3629;&#3591;&#3627;&#3621;&#3633;&#3591;"/>
+   <l:gentext key="colophon" text="&#3648;&#3610;&#3639;&#3657;&#3629;&#3591;&#3627;&#3621;&#3633;&#3591;"/>
+   <l:gentext key="Copyright" text="&#3626;&#3591;&#3623;&#3609;&#3626;&#3636;&#3586;&#3626;&#3636;&#3607;&#3608;&#3636;&#3660;"/>
+   <l:gentext key="copyright" text="&#3626;&#3591;&#3623;&#3609;&#3626;&#3636;&#3586;&#3626;&#3636;&#3607;&#3608;&#3636;&#3660;"/>
+   <l:gentext key="Dedication" text="&#3588;&#3635;&#3629;&#3640;&#3607;&#3636;&#3624;"/>
+   <l:gentext key="dedication" text="&#3588;&#3635;&#3629;&#3640;&#3607;&#3636;&#3624;"/>
+   <l:gentext key="Edition" text="&#3593;&#3610;&#3633;&#3610;"/>
+   <l:gentext key="edition" text="&#3593;&#3610;&#3633;&#3610;"/>
+   <l:gentext key="Equation" text="&#3626;&#3617;&#3585;&#3634;&#3619;"/>
+   <l:gentext key="equation" text="&#3626;&#3617;&#3585;&#3634;&#3619;"/>
+   <l:gentext key="Example" text="&#3605;&#3633;&#3623;&#3629;&#3618;&#3656;&#3634;&#3591;"/>
+   <l:gentext key="example" text="&#3605;&#3633;&#3623;&#3629;&#3618;&#3656;&#3634;&#3591;"/>
+   <l:gentext key="Figure" text="&#3619;&#3641;&#3611;"/>
+   <l:gentext key="figure" text="&#3619;&#3641;&#3611;"/>
+   <l:gentext key="Glossary" text="&#3629;&#3616;&#3636;&#3607;&#3634;&#3609;&#3624;&#3633;&#3614;&#3607;&#3660;"/>
+   <l:gentext key="glossary" text="&#3629;&#3616;&#3636;&#3607;&#3634;&#3609;&#3624;&#3633;&#3614;&#3607;&#3660;"/>
+   <l:gentext key="GlossSee" text="&#3604;&#3641;"/>
+   <l:gentext key="glosssee" text="&#3604;&#3641;"/>
+   <l:gentext key="GlossSeeAlso" text="&#3604;&#3641;&#3648;&#3614;&#3636;&#3656;&#3617;&#3648;&#3605;&#3636;&#3617;"/>
+   <l:gentext key="glossseealso" text="&#3604;&#3641;&#3648;&#3614;&#3636;&#3656;&#3617;&#3648;&#3605;&#3636;&#3617;"/>
+   <l:gentext key="IMPORTANT" text="&#3586;&#3657;&#3629;&#3588;&#3623;&#3619;&#3592;&#3635;"/>
+   <l:gentext key="important" text="&#3586;&#3657;&#3629;&#3588;&#3623;&#3619;&#3592;&#3635;"/>
+   <l:gentext key="Important" text="&#3586;&#3657;&#3629;&#3588;&#3623;&#3619;&#3592;&#3635;"/>
+   <l:gentext key="Index" text="&#3604;&#3619;&#3619;&#3594;&#3609;&#3637;"/>
+   <l:gentext key="index" text="&#3604;&#3619;&#3619;&#3594;&#3609;&#3637;"/>
+   <l:gentext key="ISBN" text="ISBN"/>
+   <l:gentext key="isbn" text="ISBN"/>
+   <l:gentext key="LegalNotice" text="&#3586;&#3657;&#3629;&#3612;&#3641;&#3585;&#3614;&#3633;&#3609;&#3605;&#3634;&#3617;&#3585;&#3598;&#3627;&#3617;&#3634;&#3618;"/>
+   <l:gentext key="legalnotice" text="&#3586;&#3657;&#3629;&#3612;&#3641;&#3585;&#3614;&#3633;&#3609;&#3605;&#3634;&#3617;&#3585;&#3598;&#3627;&#3617;&#3634;&#3618;"/>
+   <l:gentext key="MsgAud" text="&#3612;&#3641;&#3657;&#3629;&#3656;&#3634;&#3609;"/>
+   <l:gentext key="msgaud" text="&#3612;&#3641;&#3657;&#3629;&#3656;&#3634;&#3609;"/>
+   <l:gentext key="MsgLevel" text="&#3619;&#3632;&#3604;&#3633;&#3610;"/>
+   <l:gentext key="msglevel" text="&#3619;&#3632;&#3604;&#3633;&#3610;"/>
+   <l:gentext key="MsgOrig" text="&#3607;&#3637;&#3656;&#3617;&#3634;"/>
+   <l:gentext key="msgorig" text="&#3607;&#3637;&#3656;&#3617;&#3634;"/>
+   <l:gentext key="NOTE" text="&#3627;&#3617;&#3634;&#3618;&#3648;&#3627;&#3605;&#3640;"/>
+   <l:gentext key="Note" text="&#3627;&#3617;&#3634;&#3618;&#3648;&#3627;&#3605;&#3640;"/>
+   <l:gentext key="note" text="&#3627;&#3617;&#3634;&#3618;&#3648;&#3627;&#3605;&#3640;"/>
+   <l:gentext key="Part" text="&#3616;&#3634;&#3588;"/>
+   <l:gentext key="part" text="&#3616;&#3634;&#3588;"/>
+   <l:gentext key="Preface" text="&#3588;&#3635;&#3609;&#3635;"/>
+   <l:gentext key="preface" text="&#3588;&#3635;&#3609;&#3635;"/>
+   <l:gentext key="Procedure" text="&#3619;&#3632;&#3648;&#3610;&#3637;&#3618;&#3610;&#3585;&#3634;&#3619;"/>
+   <l:gentext key="procedure" text="&#3619;&#3632;&#3648;&#3610;&#3637;&#3618;&#3610;&#3585;&#3634;&#3619;"/>
+   <l:gentext key="ProductionSet" text="&#3612;&#3621;&#3636;&#3605;"/>
+   <l:gentext key="PubDate" text="Publication Date" lang="en"/>
+   <l:gentext key="pubdate" text="Publication date" lang="en"/>
+   <l:gentext key="Published" text="&#3605;&#3637;&#3614;&#3636;&#3617;&#3614;&#3660;"/>
+   <l:gentext key="published" text="&#3605;&#3637;&#3614;&#3636;&#3617;&#3614;&#3660;"/>
+   <l:gentext key="Qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="Question" text="&#3606;&#3634;&#3617;:"/>
+   <l:gentext key="question" text="&#3606;&#3634;&#3617;:"/>
+   <l:gentext key="RefEntry" text=""/>
+   <l:gentext key="refentry" text=""/>
+   <l:gentext key="Reference" text="&#3627;&#3609;&#3633;&#3591;&#3626;&#3639;&#3629;&#3629;&#3657;&#3634;&#3591;&#3629;&#3636;&#3591;"/>
+   <l:gentext key="reference" text="&#3627;&#3609;&#3633;&#3591;&#3626;&#3639;&#3629;&#3629;&#3657;&#3634;&#3591;&#3629;&#3636;&#3591;"/>
+   <l:gentext key="RefName" text="&#3594;&#3639;&#3656;&#3629;"/>
+   <l:gentext key="refname" text="&#3594;&#3639;&#3656;&#3629;"/>
+   <l:gentext key="RefSection" text=""/>
+   <l:gentext key="refsection" text=""/>
+   <l:gentext key="RefSynopsisDiv" text="&#3626;&#3634;&#3619;&#3632;&#3626;&#3635;&#3588;&#3633;&#3597;"/>
+   <l:gentext key="refsynopsisdiv" text="&#3626;&#3634;&#3619;&#3632;&#3626;&#3635;&#3588;&#3633;&#3597;"/>
+   <l:gentext key="RevHistory" text="&#3610;&#3633;&#3609;&#3607;&#3638;&#3585;&#3619;&#3640;&#3656;&#3609;"/>
+   <l:gentext key="revhistory" text="&#3610;&#3633;&#3609;&#3607;&#3638;&#3585;&#3619;&#3640;&#3656;&#3609;"/>
+   <l:gentext key="revision" text="&#3619;&#3640;&#3656;&#3609;&#3607;&#3637;&#3656;"/>
+   <l:gentext key="Revision" text="&#3619;&#3640;&#3656;&#3609;&#3607;&#3637;&#3656;"/>
+   <l:gentext key="sect1" text="&#3605;&#3629;&#3609;&#3607;&#3637;&#3656;"/>
+   <l:gentext key="sect2" text="&#3605;&#3629;&#3609;&#3607;&#3637;&#3656;"/>
+   <l:gentext key="sect3" text="&#3605;&#3629;&#3609;&#3607;&#3637;&#3656;"/>
+   <l:gentext key="sect4" text="&#3605;&#3629;&#3609;&#3607;&#3637;&#3656;"/>
+   <l:gentext key="sect5" text="&#3605;&#3629;&#3609;&#3607;&#3637;&#3656;"/>
+   <l:gentext key="section" text="&#3605;&#3629;&#3609;&#3607;&#3637;&#3656;"/>
+   <l:gentext key="Section" text="&#3605;&#3629;&#3609;&#3607;&#3637;&#3656;"/>
+   <l:gentext key="see" text="&#3604;&#3641;"/>
+   <l:gentext key="See" text="&#3604;&#3641;"/>
+   <l:gentext key="seealso" text="&#3604;&#3641;&#3648;&#3614;&#3636;&#3656;&#3617;&#3648;&#3605;&#3636;&#3617;"/>
+   <l:gentext key="Seealso" text="&#3604;&#3641;&#3648;&#3614;&#3636;&#3656;&#3617;&#3648;&#3605;&#3636;&#3617;"/>
+   <l:gentext key="SeeAlso" text="&#3604;&#3641;&#3648;&#3614;&#3636;&#3656;&#3617;&#3648;&#3605;&#3636;&#3617;"/>
+   <l:gentext key="set" text="&#3594;&#3640;&#3604;"/>
+   <l:gentext key="Set" text="&#3594;&#3640;&#3604;"/>
+   <l:gentext key="setindex" text="&#3626;&#3634;&#3619;&#3610;&#3633;&#3597;&#3594;&#3640;&#3604;"/>
+   <l:gentext key="SetIndex" text="&#3626;&#3634;&#3619;&#3610;&#3633;&#3597;&#3594;&#3640;&#3604;"/>
+   <l:gentext key="Sidebar" text=""/>
+   <l:gentext key="sidebar" text="sidebar"/>
+   <l:gentext key="step" text="&#3621;&#3635;&#3604;&#3633;&#3610;"/>
+   <l:gentext key="Step" text="&#3621;&#3635;&#3604;&#3633;&#3610;"/>
+   <l:gentext key="Table" text="&#3605;&#3634;&#3619;&#3634;&#3591;"/>
+   <l:gentext key="table" text="&#3605;&#3634;&#3619;&#3634;&#3591;"/>
+   <l:gentext key="tip" text="&#3588;&#3635;&#3649;&#3609;&#3632;&#3609;&#3635;"/>
+   <l:gentext key="TIP" text="&#3588;&#3635;&#3649;&#3609;&#3632;&#3609;&#3635;"/>
+   <l:gentext key="Tip" text="&#3588;&#3635;&#3649;&#3609;&#3632;&#3609;&#3635;"/>
+   <l:gentext key="Warning" text="&#3650;&#3611;&#3619;&#3604;&#3619;&#3632;&#3623;&#3633;&#3591;"/>
+   <l:gentext key="warning" text="&#3650;&#3611;&#3619;&#3604;&#3619;&#3632;&#3623;&#3633;&#3591;"/>
+   <l:gentext key="WARNING" text="&#3650;&#3611;&#3619;&#3604;&#3619;&#3632;&#3623;&#3633;&#3591;"/>
+   <l:gentext key="and" text="&#3649;&#3621;&#3632;"/>
+   <l:gentext key="by" text="&#3650;&#3604;&#3618;"/>
+   <l:gentext key="called" text="called" lang="en"/>
+   <l:gentext key="Edited" text="&#3648;&#3619;&#3637;&#3618;&#3610;&#3648;&#3619;&#3637;&#3618;&#3591;"/>
+   <l:gentext key="edited" text="&#3648;&#3619;&#3637;&#3618;&#3610;&#3648;&#3619;&#3637;&#3618;&#3591;"/>
+   <l:gentext key="Editedby" text="&#3648;&#3619;&#3637;&#3618;&#3610;&#3648;&#3619;&#3637;&#3618;&#3591;&#3650;&#3604;&#3610;"/>
+   <l:gentext key="editedby" text="&#3648;&#3619;&#3637;&#3618;&#3610;&#3648;&#3619;&#3637;&#3618;&#3591;&#3650;&#3604;&#3610;"/>
+   <l:gentext key="in" text="&#3651;&#3609;"/>
+   <l:gentext key="lastlistcomma" text=","/>
+   <l:gentext key="listcomma" text=","/>
+   <l:gentext key="nonexistantelement" text="&#3652;&#3617;&#3656;&#3614;&#3610;&#3626;&#3656;&#3623;&#3609;&#3607;&#3637;&#3656;&#3605;&#3657;&#3629;&#3591;&#3585;&#3634;&#3619;"/>
+   <l:gentext key="notes" text="&#3627;&#3617;&#3634;&#3618;&#3648;&#3627;&#3605;&#3640;"/>
+   <l:gentext key="Notes" text="&#3627;&#3617;&#3634;&#3618;&#3648;&#3627;&#3605;&#3640;"/>
+   <l:gentext key="Pgs" text="&#3627;&#3609;&#3657;&#3634;"/>
+   <l:gentext key="pgs" text="&#3627;&#3609;&#3657;&#3634;"/>
+   <l:gentext key="Revisedby" text="&#3649;&#3585;&#3657;&#3652;&#3586;&#3611;&#3619;&#3633;&#3610;&#3611;&#3619;&#3640;&#3591;&#3650;&#3604;&#3618;: "/>
+   <l:gentext key="revisedby" text="&#3649;&#3585;&#3657;&#3652;&#3586;&#3611;&#3619;&#3633;&#3610;&#3611;&#3619;&#3640;&#3591;&#3650;&#3604;&#3618;: "/>
+   <l:gentext key="TableNotes" text="&#3627;&#3617;&#3634;&#3618;&#3648;&#3627;&#3605;&#3640;"/>
+   <l:gentext key="tablenotes" text="&#3627;&#3617;&#3634;&#3618;&#3648;&#3627;&#3605;&#3640;"/>
+   <l:gentext key="TableofContents" text="&#3626;&#3634;&#3619;&#3610;&#3633;&#3597;"/>
+   <l:gentext key="tableofcontents" text="&#3626;&#3634;&#3619;&#3610;&#3633;&#3597;"/>
+   <l:gentext key="the" text="" lang="en"/>
+   <l:gentext key="unexpectedelementname" text="&#3614;&#3610;&#3626;&#3656;&#3623;&#3609;&#3607;&#3637;&#3656;&#3652;&#3617;&#3656;&#3605;&#3657;&#3629;&#3591;&#3585;&#3634;&#3619;"/>
+   <l:gentext key="unsupported" text="&#3652;&#3617;&#3656;&#3626;&#3609;&#3633;&#3610;&#3626;&#3609;&#3640;&#3609;"/>
+   <l:gentext key="xrefto" text="xref to"/>
+   <l:gentext key="listofequations" text="&#3626;&#3634;&#3619;&#3610;&#3633;&#3597;&#3626;&#3617;&#3585;&#3634;&#3619;"/>
+   <l:gentext key="ListofEquations" text="&#3626;&#3634;&#3619;&#3610;&#3633;&#3597;&#3626;&#3617;&#3585;&#3634;&#3619;"/>
+   <l:gentext key="ListofExamples" text="&#3626;&#3634;&#3619;&#3610;&#3633;&#3597;&#3605;&#3633;&#3623;&#3629;&#3618;&#3656;&#3634;&#3591;"/>
+   <l:gentext key="listofexamples" text="&#3626;&#3634;&#3619;&#3610;&#3633;&#3597;&#3605;&#3633;&#3623;&#3629;&#3618;&#3656;&#3634;&#3591;"/>
+   <l:gentext key="ListofFigures" text="&#3626;&#3634;&#3619;&#3610;&#3633;&#3597;&#3619;&#3641;&#3611;"/>
+   <l:gentext key="listoffigures" text="&#3626;&#3634;&#3619;&#3610;&#3633;&#3597;&#3619;&#3641;&#3611;"/>
+   <l:gentext key="ListofProcedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listofprocedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listoftables" text="&#3626;&#3634;&#3619;&#3610;&#3633;&#3597;&#3605;&#3634;&#3619;&#3634;&#3591;"/>
+   <l:gentext key="ListofTables" text="&#3626;&#3634;&#3619;&#3610;&#3633;&#3597;&#3605;&#3634;&#3619;&#3634;&#3591;"/>
+   <l:gentext key="ListofUnknown" text="&#3626;&#3634;&#3619;&#3610;&#3633;&#3597;&#3629;&#3639;&#3656;&#3609; &#3654;"/>
+   <l:gentext key="listofunknown" text="&#3626;&#3634;&#3619;&#3610;&#3633;&#3597;&#3629;&#3639;&#3656;&#3609; &#3654;"/>
+   <l:gentext key="nav-home" text="&#3627;&#3609;&#3657;&#3634;&#3649;&#3619;&#3585;"/>
+   <l:gentext key="nav-next" text="&#3605;&#3656;&#3629;&#3652;&#3611;"/>
+   <l:gentext key="nav-next-sibling" text="&#3605;&#3656;&#3629;&#3652;&#3611;"/>
+   <l:gentext key="nav-prev" text="&#3585;&#3656;&#3629;&#3609;&#3627;&#3609;&#3657;&#3634;"/>
+   <l:gentext key="nav-prev-sibling" text="&#3585;&#3656;&#3629;&#3609;&#3627;&#3609;&#3657;&#3634;"/>
+   <l:gentext key="nav-up" text="&#3585;&#3621;&#3633;&#3610;"/>
+   <l:gentext key="nav-toc" text="ToC" lang="en"/>
+   <l:gentext key="Draft" text="Draft"/>
+   <l:gentext key="above" text="above"/>
+   <l:gentext key="below" text="below"/>
+   <l:gentext key="sectioncalled" text="&#3605;&#3629;&#3609;&#3609;&#3637;&#3657;&#3648;&#3657;&#3619;&#3637;&#3618;&#3585;&#3623;&#3656;&#3634;"/>
+   <l:gentext key="index symbols" text="&#3626;&#3633;&#3597;&#3621;&#3633;&#3585;&#3625;&#3603;&#3660;"/>
+   <l:gentext key="lowercase.alpha" text="abcdefghijklmnopqrstuvwxyz"/>
+   <l:gentext key="uppercase.alpha" text="ABCDEFGHIJKLMNOPQRSTUVWXYZ"/>
+   <l:dingbat key="startquote" text="&#8220;"/>
+   <l:dingbat key="endquote" text="&#8221;"/>
+   <l:dingbat key="nestedstartquote" text="&#8216;"/>
+   <l:dingbat key="nestedendquote" text="&#8217;"/>
+   <l:dingbat key="singlestartquote" text="&#8216;" lang="en"/>
+   <l:dingbat key="singleendquote" text="&#8217;" lang="en"/>
+   <l:dingbat key="bullet" text="&#8226;"/>
+   <l:gentext key="hyphenation-character" text="-" lang="en"/>
+   <l:gentext key="hyphenation-push-character-count" text="2" lang="en"/>
+   <l:gentext key="hyphenation-remain-character-count" text="2" lang="en"/>
+
+   <l:context name="styles">
+      <l:template name="person-name" text="first-last"/>
+   </l:context>
+
+   <l:context name="title">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="%t"/>
+      <l:template name="appendix" text="&#3616;&#3634;&#3588;&#3612;&#3609;&#3623;&#3585; %n. %t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="biblioentry" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliolist" text="%t" lang="en"/>
+      <l:template name="bibliomixed" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="&#3610;&#3607;&#3607;&#3637;&#3656; %n. %t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="&#3626;&#3617;&#3585;&#3634;&#3619; %n. %t"/>
+      <l:template name="example" text="&#3605;&#3633;&#3623;&#3629;&#3618;&#3656;&#3634;&#3591; %n. %t"/>
+      <l:template name="figure" text="&#3619;&#3641;&#3611; %n. %t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="glosslist" text="%t" lang="en"/>
+      <l:template name="glossentry" text="%t" lang="en"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text=""/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="&#3616;&#3634;&#3588; %n. %t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="procedure.formal" text="&#3619;&#3632;&#3648;&#3610;&#3637;&#3618;&#3610;&#3585;&#3634;&#3619; %n. %t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="productionset.formal" text="&#3612;&#3621;&#3636;&#3605; %n"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="%t"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="%t"/>
+      <l:template name="refentry" text="%t"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsection" text="%t"/>
+      <l:template name="refsect1" text="%t"/>
+      <l:template name="refsect2" text="%t"/>
+      <l:template name="refsect3" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="refsynopsisdivinfo" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="step" text="%t"/>
+      <l:template name="table" text="&#3605;&#3634;&#3619;&#3634;&#3591; %n. %t"/>
+      <l:template name="task" text="%t" lang="en"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text=""/>
+      <l:template name="warning" text="%t"/>
+   </l:context>
+
+   <l:context name="title-unnumbered">
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article/appendix" text="%t" lang="en"/>
+      <l:template name="bridgehead" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="sect1" text="%t"/>
+      <l:template name="sect2" text="%t"/>
+      <l:template name="sect3" text="%t"/>
+      <l:template name="sect4" text="%t"/>
+      <l:template name="sect5" text="%t"/>
+      <l:template name="section" text="%t"/>
+      <l:template name="simplesect" text="%t"/>
+   </l:context>
+
+   <l:context name="title-numbered">
+      <l:template name="appendix" text="&#3616;&#3634;&#3588;&#3612;&#3609;&#3623;&#3585; %n. %t"/>
+      <l:template name="article/appendix" text="%n.&#160;%t" lang="en"/>
+      <l:template name="bridgehead" text="%n. %t"/>
+      <l:template name="chapter" text="&#3610;&#3607;&#3607;&#3637;&#3656; %n. %t"/>
+      <l:template name="sect1" text="%n. %t"/>
+      <l:template name="sect2" text="%n. %t"/>
+      <l:template name="sect3" text="%n. %t"/>
+      <l:template name="sect4" text="%n. %t"/>
+      <l:template name="sect5" text="%n. %t"/>
+      <l:template name="section" text="%n. %t"/>
+      <l:template name="simplesect" text="%t"/>
+   </l:context>
+
+   <l:context name="subtitle">
+      <l:template name="appendix" text="%s"/>
+      <l:template name="article" text="%s"/>
+      <l:template name="bibliodiv" text="%s"/>
+      <l:template name="biblioentry" text="%s"/>
+      <l:template name="bibliography" text="%s"/>
+      <l:template name="bibliomixed" text="%s"/>
+      <l:template name="bibliomset" text="%s"/>
+      <l:template name="biblioset" text="%s"/>
+      <l:template name="book" text="%s"/>
+      <l:template name="chapter" text="%s"/>
+      <l:template name="colophon" text="%s"/>
+      <l:template name="dedication" text="%s"/>
+      <l:template name="glossary" text="%s"/>
+      <l:template name="glossdiv" text="%s"/>
+      <l:template name="index" text="%s"/>
+      <l:template name="indexdiv" text="%s"/>
+      <l:template name="lot" text="%s"/>
+      <l:template name="part" text="%s"/>
+      <l:template name="partintro" text="%s"/>
+      <l:template name="preface" text="%s"/>
+      <l:template name="refentry" text="%s"/>
+      <l:template name="reference" text="%s"/>
+      <l:template name="refsection" text="%s"/>
+      <l:template name="refsect1" text="%s"/>
+      <l:template name="refsect2" text="%s"/>
+      <l:template name="refsect3" text="%s"/>
+      <l:template name="refsynopsisdiv" text="%s"/>
+      <l:template name="sect1" text="%s"/>
+      <l:template name="sect2" text="%s"/>
+      <l:template name="sect3" text="%s"/>
+      <l:template name="sect4" text="%s"/>
+      <l:template name="sect5" text="%s"/>
+      <l:template name="section" text="%s"/>
+      <l:template name="set" text="%s"/>
+      <l:template name="setindex" text="%s"/>
+      <l:template name="sidebar" text="%s"/>
+      <l:template name="simplesect" text="%s"/>
+      <l:template name="toc" text="%s"/>
+   </l:context>
+
+   <l:context name="xref">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="&#3605;&#3629;&#3610;:&#160;%n"/>
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="constraintdef" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="%t"/>
+      <l:template name="example" text="%t"/>
+      <l:template name="figure" text="%t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text="%n"/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="%t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="&#3606;&#3634;&#3617;:&#160;%n"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="&#3606;&#3634;&#3617;:&#160;%n"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="table" text="%t"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="%n"/>
+      <l:template name="warning" text="%t"/>
+      <l:template name="page.citation" text=" [%p]"/>
+      <l:template name="page" text="(page %p)" lang="en"/>
+      <l:template name="pageabbrev" text="(p. %p)" lang="en"/>
+      <l:template name="Page" text="Page %p" lang="en"/>
+      <l:template name="bridgehead" text="&#3605;&#3629;&#3609;&#3609;&#3637;&#3657;&#3648;&#3657;&#3619;&#3637;&#3618;&#3585;&#3623;&#3656;&#3634; &#8220;%t&#8221;"/>
+      <l:template name="refsection" text="&#3605;&#3629;&#3609;&#3609;&#3637;&#3657;&#3648;&#3657;&#3619;&#3637;&#3618;&#3585;&#3623;&#3656;&#3634; &#8220;%t&#8221;"/>
+      <l:template name="refsect1" text="&#3605;&#3629;&#3609;&#3609;&#3637;&#3657;&#3648;&#3657;&#3619;&#3637;&#3618;&#3585;&#3623;&#3656;&#3634; &#8220;%t&#8221;"/>
+      <l:template name="refsect2" text="&#3605;&#3629;&#3609;&#3609;&#3637;&#3657;&#3648;&#3657;&#3619;&#3637;&#3618;&#3585;&#3623;&#3656;&#3634; &#8220;%t&#8221;"/>
+      <l:template name="refsect3" text="&#3605;&#3629;&#3609;&#3609;&#3637;&#3657;&#3648;&#3657;&#3619;&#3637;&#3618;&#3585;&#3623;&#3656;&#3634; &#8220;%t&#8221;"/>
+      <l:template name="sect1" text="&#3605;&#3629;&#3609;&#3609;&#3637;&#3657;&#3648;&#3657;&#3619;&#3637;&#3618;&#3585;&#3623;&#3656;&#3634; &#8220;%t&#8221;"/>
+      <l:template name="sect2" text="&#3605;&#3629;&#3609;&#3609;&#3637;&#3657;&#3648;&#3657;&#3619;&#3637;&#3618;&#3585;&#3623;&#3656;&#3634; &#8220;%t&#8221;"/>
+      <l:template name="sect3" text="&#3605;&#3629;&#3609;&#3609;&#3637;&#3657;&#3648;&#3657;&#3619;&#3637;&#3618;&#3585;&#3623;&#3656;&#3634; &#8220;%t&#8221;"/>
+      <l:template name="sect4" text="&#3605;&#3629;&#3609;&#3609;&#3637;&#3657;&#3648;&#3657;&#3619;&#3637;&#3618;&#3585;&#3623;&#3656;&#3634; &#8220;%t&#8221;"/>
+      <l:template name="sect5" text="&#3605;&#3629;&#3609;&#3609;&#3637;&#3657;&#3648;&#3657;&#3619;&#3637;&#3618;&#3585;&#3623;&#3656;&#3634; &#8220;%t&#8221;"/>
+      <l:template name="section" text="&#3605;&#3629;&#3609;&#3609;&#3637;&#3657;&#3648;&#3657;&#3619;&#3637;&#3618;&#3585;&#3623;&#3656;&#3634; &#8220;%t&#8221;"/>
+      <l:template name="simplesect" text="&#3605;&#3629;&#3609;&#3609;&#3637;&#3657;&#3648;&#3657;&#3619;&#3637;&#3618;&#3585;&#3623;&#3656;&#3634; &#8220;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="xref-number">
+      <l:template name="answer" text="&#3605;&#3629;&#3610;:&#160;%n"/>
+      <l:template name="appendix" text="&#3616;&#3634;&#3588;&#3612;&#3609;&#3623;&#3585;&#160;%n"/>
+      <l:template name="bridgehead" text="&#3605;&#3629;&#3609;&#3607;&#3637;&#3656;&#160;%n"/>
+      <l:template name="chapter" text="&#3610;&#3607;&#3607;&#3637;&#3656;&#160;%n"/>
+      <l:template name="equation" text="&#3626;&#3617;&#3585;&#3634;&#3619;&#160;%n"/>
+      <l:template name="example" text="&#3605;&#3633;&#3623;&#3629;&#3618;&#3656;&#3634;&#3591;&#160;%n"/>
+      <l:template name="figure" text="&#3619;&#3641;&#3611;&#160;%n"/>
+      <l:template name="part" text="&#3616;&#3634;&#3588;&#160;%n"/>
+      <l:template name="procedure" text="&#3619;&#3632;&#3648;&#3610;&#3637;&#3618;&#3610;&#3585;&#3634;&#3619;&#160;%n"/>
+      <l:template name="productionset" text="&#3612;&#3621;&#3636;&#3605;&#160;%n"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n"/>
+      <l:template name="qandaentry" text="&#3606;&#3634;&#3617;:&#160;%n"/>
+      <l:template name="question" text="&#3606;&#3634;&#3617;:&#160;%n"/>
+      <l:template name="sect1" text="&#3605;&#3629;&#3609;&#3607;&#3637;&#3656;&#160;%n"/>
+      <l:template name="sect2" text="&#3605;&#3629;&#3609;&#3607;&#3637;&#3656;&#160;%n"/>
+      <l:template name="sect3" text="&#3605;&#3629;&#3609;&#3607;&#3637;&#3656;&#160;%n"/>
+      <l:template name="sect4" text="&#3605;&#3629;&#3609;&#3607;&#3637;&#3656;&#160;%n"/>
+      <l:template name="sect5" text="&#3605;&#3629;&#3609;&#3607;&#3637;&#3656;&#160;%n"/>
+      <l:template name="section" text="&#3605;&#3629;&#3609;&#3607;&#3637;&#3656;&#160;%n"/>
+      <l:template name="table" text="&#3605;&#3634;&#3619;&#3634;&#3591;&#160;%n"/>
+   </l:context>
+
+   <l:context name="xref-number-and-title">
+      <l:template name="appendix" text="&#3616;&#3634;&#3588;&#3612;&#3609;&#3623;&#3585;&#160;%n, %t"/>
+      <l:template name="bridgehead" text="&#3605;&#3629;&#3609;&#3607;&#3637;&#3656;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="chapter" text="&#3610;&#3607;&#3607;&#3637;&#3656;&#160;%n, %t"/>
+      <l:template name="equation" text="&#3626;&#3617;&#3585;&#3634;&#3619;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="example" text="&#3605;&#3633;&#3623;&#3629;&#3618;&#3656;&#3634;&#3591;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="figure" text="&#3619;&#3641;&#3611;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="part" text="&#3616;&#3634;&#3588;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="procedure" text="&#3619;&#3632;&#3648;&#3610;&#3637;&#3618;&#3610;&#3585;&#3634;&#3619;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="productionset" text="&#3612;&#3621;&#3636;&#3605;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="refsect1" text="&#3605;&#3629;&#3609;&#3609;&#3637;&#3657;&#3648;&#3657;&#3619;&#3637;&#3618;&#3585;&#3623;&#3656;&#3634; &#8220;%t&#8221;"/>
+      <l:template name="refsect2" text="&#3605;&#3629;&#3609;&#3609;&#3637;&#3657;&#3648;&#3657;&#3619;&#3637;&#3618;&#3585;&#3623;&#3656;&#3634; &#8220;%t&#8221;"/>
+      <l:template name="refsect3" text="&#3605;&#3629;&#3609;&#3609;&#3637;&#3657;&#3648;&#3657;&#3619;&#3637;&#3618;&#3585;&#3623;&#3656;&#3634; &#8220;%t&#8221;"/>
+      <l:template name="refsection" text="&#3605;&#3629;&#3609;&#3609;&#3637;&#3657;&#3648;&#3657;&#3619;&#3637;&#3618;&#3585;&#3623;&#3656;&#3634; &#8220;%t&#8221;"/>
+      <l:template name="sect1" text="&#3605;&#3629;&#3609;&#3607;&#3637;&#3656;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect2" text="&#3605;&#3629;&#3609;&#3607;&#3637;&#3656;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect3" text="&#3605;&#3629;&#3609;&#3607;&#3637;&#3656;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect4" text="&#3605;&#3629;&#3609;&#3607;&#3637;&#3656;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect5" text="&#3605;&#3629;&#3609;&#3607;&#3637;&#3656;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="section" text="&#3605;&#3629;&#3609;&#3607;&#3637;&#3656;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="simplesect" text="&#3605;&#3629;&#3609;&#3609;&#3637;&#3657;&#3648;&#3657;&#3619;&#3637;&#3618;&#3585;&#3623;&#3656;&#3634; &#8220;%t&#8221;"/>
+      <l:template name="table" text="&#3605;&#3634;&#3619;&#3634;&#3591;&#160;%n, &#8220;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="authorgroup">
+      <l:template name="sep" text=", "/>
+      <l:template name="sep2" text=" &#3649;&#3621;&#3632; "/>
+      <l:template name="seplast" text=", &#3649;&#3621;&#3632; "/>
+   </l:context>
+
+   <l:context name="glossary">
+      <l:template name="see" text="&#3604;&#3641; "/>
+      <l:template name="seealso" text="&#3604;&#3641;&#3648;&#3614;&#3636;&#3656;&#3617;&#3648;&#3605;&#3636;&#3617; "/>
+   </l:context>
+
+   <l:context name="msgset">
+      <l:template name="MsgAud" text="&#3612;&#3641;&#3657;&#3629;&#3656;&#3634;&#3609;: "/>
+      <l:template name="MsgLevel" text="&#3619;&#3632;&#3604;&#3633;&#3610;: "/>
+      <l:template name="MsgOrig" text="&#3607;&#3637;&#3656;&#3617;&#3634;: "/>
+   </l:context>
+
+   <l:context name="datetime">
+      <l:template name="format" text="m/d/Y" lang="en"/>
+   </l:context>
+
+   <l:context name="datetime-full">
+      <l:template name="January" text="January" lang="en"/>
+      <l:template name="February" text="February" lang="en"/>
+      <l:template name="March" text="March" lang="en"/>
+      <l:template name="April" text="April" lang="en"/>
+      <l:template name="May" text="May" lang="en"/>
+      <l:template name="June" text="June" lang="en"/>
+      <l:template name="July" text="July" lang="en"/>
+      <l:template name="August" text="August" lang="en"/>
+      <l:template name="September" text="September" lang="en"/>
+      <l:template name="October" text="October" lang="en"/>
+      <l:template name="November" text="November" lang="en"/>
+      <l:template name="December" text="December" lang="en"/>
+      <l:template name="Monday" text="Monday" lang="en"/>
+      <l:template name="Tuesday" text="Tuesday" lang="en"/>
+      <l:template name="Wednesday" text="Wednesday" lang="en"/>
+      <l:template name="Thursday" text="Thursday" lang="en"/>
+      <l:template name="Friday" text="Friday" lang="en"/>
+      <l:template name="Saturday" text="Saturday" lang="en"/>
+      <l:template name="Sunday" text="Sunday" lang="en"/>
+   </l:context>
+
+   <l:context name="datetime-abbrev">
+      <l:template name="Jan" text="Jan" lang="en"/>
+      <l:template name="Feb" text="Feb" lang="en"/>
+      <l:template name="Mar" text="Mar" lang="en"/>
+      <l:template name="Apr" text="Apr" lang="en"/>
+      <l:template name="May" text="May" lang="en"/>
+      <l:template name="Jun" text="Jun" lang="en"/>
+      <l:template name="Jul" text="Jul" lang="en"/>
+      <l:template name="Aug" text="Aug" lang="en"/>
+      <l:template name="Sep" text="Sep" lang="en"/>
+      <l:template name="Oct" text="Oct" lang="en"/>
+      <l:template name="Nov" text="Nov" lang="en"/>
+      <l:template name="Dec" text="Dec" lang="en"/>
+      <l:template name="Mon" text="Mon" lang="en"/>
+      <l:template name="Tue" text="Tue" lang="en"/>
+      <l:template name="Wed" text="Wed" lang="en"/>
+      <l:template name="Thu" text="Thu" lang="en"/>
+      <l:template name="Fri" text="Fri" lang="en"/>
+      <l:template name="Sat" text="Sat" lang="en"/>
+      <l:template name="Sun" text="Sun" lang="en"/>
+   </l:context>
+
+   <l:context name="htmlhelp">
+      <l:template name="langcode" text="0x041e Thai"/>
+   </l:context>
+
+   <l:letters lang="en">
+      <l:l i="-1"/>
+      <l:l i="0">Symbols</l:l>
+      <l:l i="10">A</l:l>
+      <l:l i="10">a</l:l>
+      <l:l i="10">&#192;</l:l>
+      <l:l i="10">&#224;</l:l>
+      <l:l i="10">&#193;</l:l>
+      <l:l i="10">&#225;</l:l>
+      <l:l i="10">&#194;</l:l>
+      <l:l i="10">&#226;</l:l>
+      <l:l i="10">&#195;</l:l>
+      <l:l i="10">&#227;</l:l>
+      <l:l i="10">&#196;</l:l>
+      <l:l i="10">&#228;</l:l>
+      <l:l i="10">&#197;</l:l>
+      <l:l i="10">&#229;</l:l>
+      <l:l i="10">&#256;</l:l>
+      <l:l i="10">&#257;</l:l>
+      <l:l i="10">&#258;</l:l>
+      <l:l i="10">&#259;</l:l>
+      <l:l i="10">&#260;</l:l>
+      <l:l i="10">&#261;</l:l>
+      <l:l i="10">&#461;</l:l>
+      <l:l i="10">&#462;</l:l>
+      <l:l i="10">&#478;</l:l>
+      <l:l i="10">&#479;</l:l>
+      <l:l i="10">&#480;</l:l>
+      <l:l i="10">&#481;</l:l>
+      <l:l i="10">&#506;</l:l>
+      <l:l i="10">&#507;</l:l>
+      <l:l i="10">&#512;</l:l>
+      <l:l i="10">&#513;</l:l>
+      <l:l i="10">&#514;</l:l>
+      <l:l i="10">&#515;</l:l>
+      <l:l i="10">&#550;</l:l>
+      <l:l i="10">&#551;</l:l>
+      <l:l i="10">&#7680;</l:l>
+      <l:l i="10">&#7681;</l:l>
+      <l:l i="10">&#7834;</l:l>
+      <l:l i="10">&#7840;</l:l>
+      <l:l i="10">&#7841;</l:l>
+      <l:l i="10">&#7842;</l:l>
+      <l:l i="10">&#7843;</l:l>
+      <l:l i="10">&#7844;</l:l>
+      <l:l i="10">&#7845;</l:l>
+      <l:l i="10">&#7846;</l:l>
+      <l:l i="10">&#7847;</l:l>
+      <l:l i="10">&#7848;</l:l>
+      <l:l i="10">&#7849;</l:l>
+      <l:l i="10">&#7850;</l:l>
+      <l:l i="10">&#7851;</l:l>
+      <l:l i="10">&#7852;</l:l>
+      <l:l i="10">&#7853;</l:l>
+      <l:l i="10">&#7854;</l:l>
+      <l:l i="10">&#7855;</l:l>
+      <l:l i="10">&#7856;</l:l>
+      <l:l i="10">&#7857;</l:l>
+      <l:l i="10">&#7858;</l:l>
+      <l:l i="10">&#7859;</l:l>
+      <l:l i="10">&#7860;</l:l>
+      <l:l i="10">&#7861;</l:l>
+      <l:l i="10">&#7862;</l:l>
+      <l:l i="10">&#7863;</l:l>
+      <l:l i="20">B</l:l>
+      <l:l i="20">b</l:l>
+      <l:l i="20">&#384;</l:l>
+      <l:l i="20">&#385;</l:l>
+      <l:l i="20">&#595;</l:l>
+      <l:l i="20">&#386;</l:l>
+      <l:l i="20">&#387;</l:l>
+      <l:l i="20">&#7682;</l:l>
+      <l:l i="20">&#7683;</l:l>
+      <l:l i="20">&#7684;</l:l>
+      <l:l i="20">&#7685;</l:l>
+      <l:l i="20">&#7686;</l:l>
+      <l:l i="20">&#7687;</l:l>
+      <l:l i="30">C</l:l>
+      <l:l i="30">c</l:l>
+      <l:l i="30">&#199;</l:l>
+      <l:l i="30">&#231;</l:l>
+      <l:l i="30">&#262;</l:l>
+      <l:l i="30">&#263;</l:l>
+      <l:l i="30">&#264;</l:l>
+      <l:l i="30">&#265;</l:l>
+      <l:l i="30">&#266;</l:l>
+      <l:l i="30">&#267;</l:l>
+      <l:l i="30">&#268;</l:l>
+      <l:l i="30">&#269;</l:l>
+      <l:l i="30">&#391;</l:l>
+      <l:l i="30">&#392;</l:l>
+      <l:l i="30">&#597;</l:l>
+      <l:l i="30">&#7688;</l:l>
+      <l:l i="30">&#7689;</l:l>
+      <l:l i="40">D</l:l>
+      <l:l i="40">d</l:l>
+      <l:l i="40">&#270;</l:l>
+      <l:l i="40">&#271;</l:l>
+      <l:l i="40">&#272;</l:l>
+      <l:l i="40">&#273;</l:l>
+      <l:l i="40">&#394;</l:l>
+      <l:l i="40">&#599;</l:l>
+      <l:l i="40">&#395;</l:l>
+      <l:l i="40">&#396;</l:l>
+      <l:l i="40">&#453;</l:l>
+      <l:l i="40">&#498;</l:l>
+      <l:l i="40">&#545;</l:l>
+      <l:l i="40">&#598;</l:l>
+      <l:l i="40">&#7690;</l:l>
+      <l:l i="40">&#7691;</l:l>
+      <l:l i="40">&#7692;</l:l>
+      <l:l i="40">&#7693;</l:l>
+      <l:l i="40">&#7694;</l:l>
+      <l:l i="40">&#7695;</l:l>
+      <l:l i="40">&#7696;</l:l>
+      <l:l i="40">&#7697;</l:l>
+      <l:l i="40">&#7698;</l:l>
+      <l:l i="40">&#7699;</l:l>
+      <l:l i="50">E</l:l>
+      <l:l i="50">e</l:l>
+      <l:l i="50">&#200;</l:l>
+      <l:l i="50">&#232;</l:l>
+      <l:l i="50">&#201;</l:l>
+      <l:l i="50">&#233;</l:l>
+      <l:l i="50">&#202;</l:l>
+      <l:l i="50">&#234;</l:l>
+      <l:l i="50">&#203;</l:l>
+      <l:l i="50">&#235;</l:l>
+      <l:l i="50">&#274;</l:l>
+      <l:l i="50">&#275;</l:l>
+      <l:l i="50">&#276;</l:l>
+      <l:l i="50">&#277;</l:l>
+      <l:l i="50">&#278;</l:l>
+      <l:l i="50">&#279;</l:l>
+      <l:l i="50">&#280;</l:l>
+      <l:l i="50">&#281;</l:l>
+      <l:l i="50">&#282;</l:l>
+      <l:l i="50">&#283;</l:l>
+      <l:l i="50">&#516;</l:l>
+      <l:l i="50">&#517;</l:l>
+      <l:l i="50">&#518;</l:l>
+      <l:l i="50">&#519;</l:l>
+      <l:l i="50">&#552;</l:l>
+      <l:l i="50">&#553;</l:l>
+      <l:l i="50">&#7700;</l:l>
+      <l:l i="50">&#7701;</l:l>
+      <l:l i="50">&#7702;</l:l>
+      <l:l i="50">&#7703;</l:l>
+      <l:l i="50">&#7704;</l:l>
+      <l:l i="50">&#7705;</l:l>
+      <l:l i="50">&#7706;</l:l>
+      <l:l i="50">&#7707;</l:l>
+      <l:l i="50">&#7708;</l:l>
+      <l:l i="50">&#7709;</l:l>
+      <l:l i="50">&#7864;</l:l>
+      <l:l i="50">&#7865;</l:l>
+      <l:l i="50">&#7866;</l:l>
+      <l:l i="50">&#7867;</l:l>
+      <l:l i="50">&#7868;</l:l>
+      <l:l i="50">&#7869;</l:l>
+      <l:l i="50">&#7870;</l:l>
+      <l:l i="50">&#7871;</l:l>
+      <l:l i="50">&#7872;</l:l>
+      <l:l i="50">&#7873;</l:l>
+      <l:l i="50">&#7874;</l:l>
+      <l:l i="50">&#7875;</l:l>
+      <l:l i="50">&#7876;</l:l>
+      <l:l i="50">&#7877;</l:l>
+      <l:l i="50">&#7878;</l:l>
+      <l:l i="50">&#7879;</l:l>
+      <l:l i="60">F</l:l>
+      <l:l i="60">f</l:l>
+      <l:l i="60">&#401;</l:l>
+      <l:l i="60">&#402;</l:l>
+      <l:l i="60">&#7710;</l:l>
+      <l:l i="60">&#7711;</l:l>
+      <l:l i="70">G</l:l>
+      <l:l i="70">g</l:l>
+      <l:l i="70">&#284;</l:l>
+      <l:l i="70">&#285;</l:l>
+      <l:l i="70">&#286;</l:l>
+      <l:l i="70">&#287;</l:l>
+      <l:l i="70">&#288;</l:l>
+      <l:l i="70">&#289;</l:l>
+      <l:l i="70">&#290;</l:l>
+      <l:l i="70">&#291;</l:l>
+      <l:l i="70">&#403;</l:l>
+      <l:l i="70">&#608;</l:l>
+      <l:l i="70">&#484;</l:l>
+      <l:l i="70">&#485;</l:l>
+      <l:l i="70">&#486;</l:l>
+      <l:l i="70">&#487;</l:l>
+      <l:l i="70">&#500;</l:l>
+      <l:l i="70">&#501;</l:l>
+      <l:l i="70">&#7712;</l:l>
+      <l:l i="70">&#7713;</l:l>
+      <l:l i="80">H</l:l>
+      <l:l i="80">h</l:l>
+      <l:l i="80">&#292;</l:l>
+      <l:l i="80">&#293;</l:l>
+      <l:l i="80">&#294;</l:l>
+      <l:l i="80">&#295;</l:l>
+      <l:l i="80">&#542;</l:l>
+      <l:l i="80">&#543;</l:l>
+      <l:l i="80">&#614;</l:l>
+      <l:l i="80">&#7714;</l:l>
+      <l:l i="80">&#7715;</l:l>
+      <l:l i="80">&#7716;</l:l>
+      <l:l i="80">&#7717;</l:l>
+      <l:l i="80">&#7718;</l:l>
+      <l:l i="80">&#7719;</l:l>
+      <l:l i="80">&#7720;</l:l>
+      <l:l i="80">&#7721;</l:l>
+      <l:l i="80">&#7722;</l:l>
+      <l:l i="80">&#7723;</l:l>
+      <l:l i="80">&#7830;</l:l>
+      <l:l i="90">I</l:l>
+      <l:l i="90">i</l:l>
+      <l:l i="90">&#204;</l:l>
+      <l:l i="90">&#236;</l:l>
+      <l:l i="90">&#205;</l:l>
+      <l:l i="90">&#237;</l:l>
+      <l:l i="90">&#206;</l:l>
+      <l:l i="90">&#238;</l:l>
+      <l:l i="90">&#207;</l:l>
+      <l:l i="90">&#239;</l:l>
+      <l:l i="90">&#296;</l:l>
+      <l:l i="90">&#297;</l:l>
+      <l:l i="90">&#298;</l:l>
+      <l:l i="90">&#299;</l:l>
+      <l:l i="90">&#300;</l:l>
+      <l:l i="90">&#301;</l:l>
+      <l:l i="90">&#302;</l:l>
+      <l:l i="90">&#303;</l:l>
+      <l:l i="90">&#304;</l:l>
+      <l:l i="90">&#407;</l:l>
+      <l:l i="90">&#616;</l:l>
+      <l:l i="90">&#463;</l:l>
+      <l:l i="90">&#464;</l:l>
+      <l:l i="90">&#520;</l:l>
+      <l:l i="90">&#521;</l:l>
+      <l:l i="90">&#522;</l:l>
+      <l:l i="90">&#523;</l:l>
+      <l:l i="90">&#7724;</l:l>
+      <l:l i="90">&#7725;</l:l>
+      <l:l i="90">&#7726;</l:l>
+      <l:l i="90">&#7727;</l:l>
+      <l:l i="90">&#7880;</l:l>
+      <l:l i="90">&#7881;</l:l>
+      <l:l i="90">&#7882;</l:l>
+      <l:l i="90">&#7883;</l:l>
+      <l:l i="100">J</l:l>
+      <l:l i="100">j</l:l>
+      <l:l i="100">&#308;</l:l>
+      <l:l i="100">&#309;</l:l>
+      <l:l i="100">&#496;</l:l>
+      <l:l i="100">&#669;</l:l>
+      <l:l i="110">K</l:l>
+      <l:l i="110">k</l:l>
+      <l:l i="110">&#310;</l:l>
+      <l:l i="110">&#311;</l:l>
+      <l:l i="110">&#408;</l:l>
+      <l:l i="110">&#409;</l:l>
+      <l:l i="110">&#488;</l:l>
+      <l:l i="110">&#489;</l:l>
+      <l:l i="110">&#7728;</l:l>
+      <l:l i="110">&#7729;</l:l>
+      <l:l i="110">&#7730;</l:l>
+      <l:l i="110">&#7731;</l:l>
+      <l:l i="110">&#7732;</l:l>
+      <l:l i="110">&#7733;</l:l>
+      <l:l i="120">L</l:l>
+      <l:l i="120">l</l:l>
+      <l:l i="120">&#313;</l:l>
+      <l:l i="120">&#314;</l:l>
+      <l:l i="120">&#315;</l:l>
+      <l:l i="120">&#316;</l:l>
+      <l:l i="120">&#317;</l:l>
+      <l:l i="120">&#318;</l:l>
+      <l:l i="120">&#319;</l:l>
+      <l:l i="120">&#320;</l:l>
+      <l:l i="120">&#321;</l:l>
+      <l:l i="120">&#322;</l:l>
+      <l:l i="120">&#410;</l:l>
+      <l:l i="120">&#456;</l:l>
+      <l:l i="120">&#564;</l:l>
+      <l:l i="120">&#619;</l:l>
+      <l:l i="120">&#620;</l:l>
+      <l:l i="120">&#621;</l:l>
+      <l:l i="120">&#7734;</l:l>
+      <l:l i="120">&#7735;</l:l>
+      <l:l i="120">&#7736;</l:l>
+      <l:l i="120">&#7737;</l:l>
+      <l:l i="120">&#7738;</l:l>
+      <l:l i="120">&#7739;</l:l>
+      <l:l i="120">&#7740;</l:l>
+      <l:l i="120">&#7741;</l:l>
+      <l:l i="130">M</l:l>
+      <l:l i="130">m</l:l>
+      <l:l i="130">&#625;</l:l>
+      <l:l i="130">&#7742;</l:l>
+      <l:l i="130">&#7743;</l:l>
+      <l:l i="130">&#7744;</l:l>
+      <l:l i="130">&#7745;</l:l>
+      <l:l i="130">&#7746;</l:l>
+      <l:l i="130">&#7747;</l:l>
+      <l:l i="140">N</l:l>
+      <l:l i="140">n</l:l>
+      <l:l i="140">&#209;</l:l>
+      <l:l i="140">&#241;</l:l>
+      <l:l i="140">&#323;</l:l>
+      <l:l i="140">&#324;</l:l>
+      <l:l i="140">&#325;</l:l>
+      <l:l i="140">&#326;</l:l>
+      <l:l i="140">&#327;</l:l>
+      <l:l i="140">&#328;</l:l>
+      <l:l i="140">&#413;</l:l>
+      <l:l i="140">&#626;</l:l>
+      <l:l i="140">&#414;</l:l>
+      <l:l i="140">&#544;</l:l>
+      <l:l i="140">&#459;</l:l>
+      <l:l i="140">&#504;</l:l>
+      <l:l i="140">&#505;</l:l>
+      <l:l i="140">&#565;</l:l>
+      <l:l i="140">&#627;</l:l>
+      <l:l i="140">&#7748;</l:l>
+      <l:l i="140">&#7749;</l:l>
+      <l:l i="140">&#7750;</l:l>
+      <l:l i="140">&#7751;</l:l>
+      <l:l i="140">&#7752;</l:l>
+      <l:l i="140">&#7753;</l:l>
+      <l:l i="140">&#7754;</l:l>
+      <l:l i="140">&#7755;</l:l>
+      <l:l i="150">O</l:l>
+      <l:l i="150">o</l:l>
+      <l:l i="150">&#210;</l:l>
+      <l:l i="150">&#242;</l:l>
+      <l:l i="150">&#211;</l:l>
+      <l:l i="150">&#243;</l:l>
+      <l:l i="150">&#212;</l:l>
+      <l:l i="150">&#244;</l:l>
+      <l:l i="150">&#213;</l:l>
+      <l:l i="150">&#245;</l:l>
+      <l:l i="150">&#214;</l:l>
+      <l:l i="150">&#246;</l:l>
+      <l:l i="150">&#216;</l:l>
+      <l:l i="150">&#248;</l:l>
+      <l:l i="150">&#332;</l:l>
+      <l:l i="150">&#333;</l:l>
+      <l:l i="150">&#334;</l:l>
+      <l:l i="150">&#335;</l:l>
+      <l:l i="150">&#336;</l:l>
+      <l:l i="150">&#337;</l:l>
+      <l:l i="150">&#415;</l:l>
+      <l:l i="150">&#416;</l:l>
+      <l:l i="150">&#417;</l:l>
+      <l:l i="150">&#465;</l:l>
+      <l:l i="150">&#466;</l:l>
+      <l:l i="150">&#490;</l:l>
+      <l:l i="150">&#491;</l:l>
+      <l:l i="150">&#492;</l:l>
+      <l:l i="150">&#493;</l:l>
+      <l:l i="150">&#510;</l:l>
+      <l:l i="150">&#511;</l:l>
+      <l:l i="150">&#524;</l:l>
+      <l:l i="150">&#525;</l:l>
+      <l:l i="150">&#526;</l:l>
+      <l:l i="150">&#527;</l:l>
+      <l:l i="150">&#554;</l:l>
+      <l:l i="150">&#555;</l:l>
+      <l:l i="150">&#556;</l:l>
+      <l:l i="150">&#557;</l:l>
+      <l:l i="150">&#558;</l:l>
+      <l:l i="150">&#559;</l:l>
+      <l:l i="150">&#560;</l:l>
+      <l:l i="150">&#561;</l:l>
+      <l:l i="150">&#7756;</l:l>
+      <l:l i="150">&#7757;</l:l>
+      <l:l i="150">&#7758;</l:l>
+      <l:l i="150">&#7759;</l:l>
+      <l:l i="150">&#7760;</l:l>
+      <l:l i="150">&#7761;</l:l>
+      <l:l i="150">&#7762;</l:l>
+      <l:l i="150">&#7763;</l:l>
+      <l:l i="150">&#7884;</l:l>
+      <l:l i="150">&#7885;</l:l>
+      <l:l i="150">&#7886;</l:l>
+      <l:l i="150">&#7887;</l:l>
+      <l:l i="150">&#7888;</l:l>
+      <l:l i="150">&#7889;</l:l>
+      <l:l i="150">&#7890;</l:l>
+      <l:l i="150">&#7891;</l:l>
+      <l:l i="150">&#7892;</l:l>
+      <l:l i="150">&#7893;</l:l>
+      <l:l i="150">&#7894;</l:l>
+      <l:l i="150">&#7895;</l:l>
+      <l:l i="150">&#7896;</l:l>
+      <l:l i="150">&#7897;</l:l>
+      <l:l i="150">&#7898;</l:l>
+      <l:l i="150">&#7899;</l:l>
+      <l:l i="150">&#7900;</l:l>
+      <l:l i="150">&#7901;</l:l>
+      <l:l i="150">&#7902;</l:l>
+      <l:l i="150">&#7903;</l:l>
+      <l:l i="150">&#7904;</l:l>
+      <l:l i="150">&#7905;</l:l>
+      <l:l i="150">&#7906;</l:l>
+      <l:l i="150">&#7907;</l:l>
+      <l:l i="160">P</l:l>
+      <l:l i="160">p</l:l>
+      <l:l i="160">&#420;</l:l>
+      <l:l i="160">&#421;</l:l>
+      <l:l i="160">&#7764;</l:l>
+      <l:l i="160">&#7765;</l:l>
+      <l:l i="160">&#7766;</l:l>
+      <l:l i="160">&#7767;</l:l>
+      <l:l i="170">Q</l:l>
+      <l:l i="170">q</l:l>
+      <l:l i="170">&#672;</l:l>
+      <l:l i="180">R</l:l>
+      <l:l i="180">r</l:l>
+      <l:l i="180">&#340;</l:l>
+      <l:l i="180">&#341;</l:l>
+      <l:l i="180">&#342;</l:l>
+      <l:l i="180">&#343;</l:l>
+      <l:l i="180">&#344;</l:l>
+      <l:l i="180">&#345;</l:l>
+      <l:l i="180">&#528;</l:l>
+      <l:l i="180">&#529;</l:l>
+      <l:l i="180">&#530;</l:l>
+      <l:l i="180">&#531;</l:l>
+      <l:l i="180">&#636;</l:l>
+      <l:l i="180">&#637;</l:l>
+      <l:l i="180">&#638;</l:l>
+      <l:l i="180">&#7768;</l:l>
+      <l:l i="180">&#7769;</l:l>
+      <l:l i="180">&#7770;</l:l>
+      <l:l i="180">&#7771;</l:l>
+      <l:l i="180">&#7772;</l:l>
+      <l:l i="180">&#7773;</l:l>
+      <l:l i="180">&#7774;</l:l>
+      <l:l i="180">&#7775;</l:l>
+      <l:l i="190">S</l:l>
+      <l:l i="190">s</l:l>
+      <l:l i="190">&#346;</l:l>
+      <l:l i="190">&#347;</l:l>
+      <l:l i="190">&#348;</l:l>
+      <l:l i="190">&#349;</l:l>
+      <l:l i="190">&#350;</l:l>
+      <l:l i="190">&#351;</l:l>
+      <l:l i="190">&#352;</l:l>
+      <l:l i="190">&#353;</l:l>
+      <l:l i="190">&#536;</l:l>
+      <l:l i="190">&#537;</l:l>
+      <l:l i="190">&#642;</l:l>
+      <l:l i="190">&#7776;</l:l>
+      <l:l i="190">&#7777;</l:l>
+      <l:l i="190">&#7778;</l:l>
+      <l:l i="190">&#7779;</l:l>
+      <l:l i="190">&#7780;</l:l>
+      <l:l i="190">&#7781;</l:l>
+      <l:l i="190">&#7782;</l:l>
+      <l:l i="190">&#7783;</l:l>
+      <l:l i="190">&#7784;</l:l>
+      <l:l i="190">&#7785;</l:l>
+      <l:l i="200">T</l:l>
+      <l:l i="200">t</l:l>
+      <l:l i="200">&#354;</l:l>
+      <l:l i="200">&#355;</l:l>
+      <l:l i="200">&#356;</l:l>
+      <l:l i="200">&#357;</l:l>
+      <l:l i="200">&#358;</l:l>
+      <l:l i="200">&#359;</l:l>
+      <l:l i="200">&#427;</l:l>
+      <l:l i="200">&#428;</l:l>
+      <l:l i="200">&#429;</l:l>
+      <l:l i="200">&#430;</l:l>
+      <l:l i="200">&#648;</l:l>
+      <l:l i="200">&#538;</l:l>
+      <l:l i="200">&#539;</l:l>
+      <l:l i="200">&#566;</l:l>
+      <l:l i="200">&#7786;</l:l>
+      <l:l i="200">&#7787;</l:l>
+      <l:l i="200">&#7788;</l:l>
+      <l:l i="200">&#7789;</l:l>
+      <l:l i="200">&#7790;</l:l>
+      <l:l i="200">&#7791;</l:l>
+      <l:l i="200">&#7792;</l:l>
+      <l:l i="200">&#7793;</l:l>
+      <l:l i="200">&#7831;</l:l>
+      <l:l i="210">U</l:l>
+      <l:l i="210">u</l:l>
+      <l:l i="210">&#217;</l:l>
+      <l:l i="210">&#249;</l:l>
+      <l:l i="210">&#218;</l:l>
+      <l:l i="210">&#250;</l:l>
+      <l:l i="210">&#219;</l:l>
+      <l:l i="210">&#251;</l:l>
+      <l:l i="210">&#220;</l:l>
+      <l:l i="210">&#252;</l:l>
+      <l:l i="210">&#360;</l:l>
+      <l:l i="210">&#361;</l:l>
+      <l:l i="210">&#362;</l:l>
+      <l:l i="210">&#363;</l:l>
+      <l:l i="210">&#364;</l:l>
+      <l:l i="210">&#365;</l:l>
+      <l:l i="210">&#366;</l:l>
+      <l:l i="210">&#367;</l:l>
+      <l:l i="210">&#368;</l:l>
+      <l:l i="210">&#369;</l:l>
+      <l:l i="210">&#370;</l:l>
+      <l:l i="210">&#371;</l:l>
+      <l:l i="210">&#431;</l:l>
+      <l:l i="210">&#432;</l:l>
+      <l:l i="210">&#467;</l:l>
+      <l:l i="210">&#468;</l:l>
+      <l:l i="210">&#469;</l:l>
+      <l:l i="210">&#470;</l:l>
+      <l:l i="210">&#471;</l:l>
+      <l:l i="210">&#472;</l:l>
+      <l:l i="210">&#473;</l:l>
+      <l:l i="210">&#474;</l:l>
+      <l:l i="210">&#475;</l:l>
+      <l:l i="210">&#476;</l:l>
+      <l:l i="210">&#532;</l:l>
+      <l:l i="210">&#533;</l:l>
+      <l:l i="210">&#534;</l:l>
+      <l:l i="210">&#535;</l:l>
+      <l:l i="210">&#7794;</l:l>
+      <l:l i="210">&#7795;</l:l>
+      <l:l i="210">&#7796;</l:l>
+      <l:l i="210">&#7797;</l:l>
+      <l:l i="210">&#7798;</l:l>
+      <l:l i="210">&#7799;</l:l>
+      <l:l i="210">&#7800;</l:l>
+      <l:l i="210">&#7801;</l:l>
+      <l:l i="210">&#7802;</l:l>
+      <l:l i="210">&#7803;</l:l>
+      <l:l i="210">&#7908;</l:l>
+      <l:l i="210">&#7909;</l:l>
+      <l:l i="210">&#7910;</l:l>
+      <l:l i="210">&#7911;</l:l>
+      <l:l i="210">&#7912;</l:l>
+      <l:l i="210">&#7913;</l:l>
+      <l:l i="210">&#7914;</l:l>
+      <l:l i="210">&#7915;</l:l>
+      <l:l i="210">&#7916;</l:l>
+      <l:l i="210">&#7917;</l:l>
+      <l:l i="210">&#7918;</l:l>
+      <l:l i="210">&#7919;</l:l>
+      <l:l i="210">&#7920;</l:l>
+      <l:l i="210">&#7921;</l:l>
+      <l:l i="220">V</l:l>
+      <l:l i="220">v</l:l>
+      <l:l i="220">&#434;</l:l>
+      <l:l i="220">&#651;</l:l>
+      <l:l i="220">&#7804;</l:l>
+      <l:l i="220">&#7805;</l:l>
+      <l:l i="220">&#7806;</l:l>
+      <l:l i="220">&#7807;</l:l>
+      <l:l i="230">W</l:l>
+      <l:l i="230">w</l:l>
+      <l:l i="230">&#372;</l:l>
+      <l:l i="230">&#373;</l:l>
+      <l:l i="230">&#7808;</l:l>
+      <l:l i="230">&#7809;</l:l>
+      <l:l i="230">&#7810;</l:l>
+      <l:l i="230">&#7811;</l:l>
+      <l:l i="230">&#7812;</l:l>
+      <l:l i="230">&#7813;</l:l>
+      <l:l i="230">&#7814;</l:l>
+      <l:l i="230">&#7815;</l:l>
+      <l:l i="230">&#7816;</l:l>
+      <l:l i="230">&#7817;</l:l>
+      <l:l i="230">&#7832;</l:l>
+      <l:l i="240">X</l:l>
+      <l:l i="240">x</l:l>
+      <l:l i="240">&#7818;</l:l>
+      <l:l i="240">&#7819;</l:l>
+      <l:l i="240">&#7820;</l:l>
+      <l:l i="240">&#7821;</l:l>
+      <l:l i="250">Y</l:l>
+      <l:l i="250">y</l:l>
+      <l:l i="250">&#221;</l:l>
+      <l:l i="250">&#253;</l:l>
+      <l:l i="250">&#255;</l:l>
+      <l:l i="250">&#376;</l:l>
+      <l:l i="250">&#374;</l:l>
+      <l:l i="250">&#375;</l:l>
+      <l:l i="250">&#435;</l:l>
+      <l:l i="250">&#436;</l:l>
+      <l:l i="250">&#562;</l:l>
+      <l:l i="250">&#563;</l:l>
+      <l:l i="250">&#7822;</l:l>
+      <l:l i="250">&#7823;</l:l>
+      <l:l i="250">&#7833;</l:l>
+      <l:l i="250">&#7922;</l:l>
+      <l:l i="250">&#7923;</l:l>
+      <l:l i="250">&#7924;</l:l>
+      <l:l i="250">&#7925;</l:l>
+      <l:l i="250">&#7926;</l:l>
+      <l:l i="250">&#7927;</l:l>
+      <l:l i="250">&#7928;</l:l>
+      <l:l i="250">&#7929;</l:l>
+      <l:l i="260">Z</l:l>
+      <l:l i="260">z</l:l>
+      <l:l i="260">&#377;</l:l>
+      <l:l i="260">&#378;</l:l>
+      <l:l i="260">&#379;</l:l>
+      <l:l i="260">&#380;</l:l>
+      <l:l i="260">&#381;</l:l>
+      <l:l i="260">&#382;</l:l>
+      <l:l i="260">&#437;</l:l>
+      <l:l i="260">&#438;</l:l>
+      <l:l i="260">&#548;</l:l>
+      <l:l i="260">&#549;</l:l>
+      <l:l i="260">&#656;</l:l>
+      <l:l i="260">&#657;</l:l>
+      <l:l i="260">&#7824;</l:l>
+      <l:l i="260">&#7825;</l:l>
+      <l:l i="260">&#7826;</l:l>
+      <l:l i="260">&#7827;</l:l>
+      <l:l i="260">&#7828;</l:l>
+      <l:l i="260">&#7829;</l:l>
+   </l:letters>
+</l:l10n>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/titles.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/titles.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/titles.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,602 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+                exclude-result-prefixes="doc"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: titles.xsl,v 1.1.1.1 2004/10/19 21:21:41 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<!-- title markup -->
+
+<doc:mode mode="title.markup" xmlns="">
+<refpurpose>Provides access to element titles</refpurpose>
+<refdescription>
+<para>Processing an element in the
+<literal role="mode">title.markup</literal> mode produces the
+title of the element. This does not include the label.
+</para>
+</refdescription>
+</doc:mode>
+
+<xsl:template match="*" mode="title.markup">
+  <xsl:param name="allow-anchors" select="0"/>
+  <xsl:param name="verbose" select="1"/>
+
+  <xsl:choose>
+    <xsl:when test="title">
+      <xsl:apply-templates select="title[1]" mode="title.markup">
+        <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
+      </xsl:apply-templates>
+    </xsl:when>
+    <xsl:when test="local-name(.) = 'partintro'">
+      <!-- partintro's don't have titles, use the parent (part or reference)
+           title instead. -->
+      <xsl:apply-templates select="parent::*" mode="title.markup"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:if test="$verbose">
+        <xsl:message>
+          <xsl:text>Request for title of element with no title: </xsl:text>
+          <xsl:value-of select="name(.)"/>
+          <xsl:if test="@id">
+            <xsl:text> (id="</xsl:text>
+            <xsl:value-of select="@id"/>
+            <xsl:text>")</xsl:text>
+          </xsl:if>
+        </xsl:message>
+      </xsl:if>
+      <xsl:text>???TITLE???</xsl:text>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="title" mode="title.markup">
+  <xsl:param name="allow-anchors" select="0"/>
+
+  <xsl:choose>
+    <xsl:when test="$allow-anchors != 0">
+      <xsl:apply-templates/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:apply-templates mode="no.anchor.mode"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- only occurs in HTML Tables! -->
+<xsl:template match="caption" mode="title.markup">
+  <xsl:param name="allow-anchors" select="0"/>
+
+  <xsl:choose>
+    <xsl:when test="$allow-anchors != 0">
+      <xsl:apply-templates/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:apply-templates mode="no.anchor.mode"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="set" mode="title.markup">
+  <xsl:param name="allow-anchors" select="0"/>
+  <xsl:apply-templates select="(setinfo/title|info/title|title)[1]"
+                       mode="title.markup">
+    <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="book" mode="title.markup">
+  <xsl:param name="allow-anchors" select="0"/>
+  <xsl:apply-templates select="(bookinfo/title|info/title|title)[1]"
+                       mode="title.markup">
+    <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="part" mode="title.markup">
+  <xsl:param name="allow-anchors" select="0"/>
+  <xsl:apply-templates select="(partinfo/title|info/title|docinfo/title|title)[1]"
+                       mode="title.markup">
+    <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="preface|chapter|appendix" mode="title.markup">
+  <xsl:param name="allow-anchors" select="0"/>
+
+<!--
+  <xsl:message>
+    <xsl:value-of select="name(.)"/>
+    <xsl:text> </xsl:text>
+    <xsl:value-of select="$allow-anchors"/>
+  </xsl:message>
+-->
+
+  <xsl:variable name="title" select="(docinfo/title
+                                      |info/title
+                                      |prefaceinfo/title
+                                      |chapterinfo/title
+                                      |appendixinfo/title
+                                      |title)[1]"/>
+  <xsl:apply-templates select="$title" mode="title.markup">
+    <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="dedication" mode="title.markup">
+  <xsl:param name="allow-anchors" select="0"/>
+  <xsl:choose>
+    <xsl:when test="title">
+      <xsl:apply-templates select="title" mode="title.markup">
+        <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
+      </xsl:apply-templates>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:call-template name="gentext">
+        <xsl:with-param name="key" select="'Dedication'"/>
+      </xsl:call-template>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="colophon" mode="title.markup">
+  <xsl:param name="allow-anchors" select="0"/>
+  <xsl:choose>
+    <xsl:when test="title">
+      <xsl:apply-templates select="title" mode="title.markup">
+        <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
+      </xsl:apply-templates>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:call-template name="gentext">
+        <xsl:with-param name="key" select="'Colophon'"/>
+      </xsl:call-template>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="article" mode="title.markup">
+  <xsl:param name="allow-anchors" select="0"/>
+  <xsl:variable name="title" select="(artheader/title
+                                      |articleinfo/title
+                                      |info/title
+                                      |title)[1]"/>
+
+  <xsl:apply-templates select="$title" mode="title.markup">
+    <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="reference" mode="title.markup">
+  <xsl:param name="allow-anchors" select="0"/>
+  <xsl:apply-templates select="(referenceinfo/title|docinfo/title|info/title|title)[1]"
+                       mode="title.markup">
+    <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="refentry" mode="title.markup">
+  <xsl:param name="allow-anchors" select="0"/>
+  <xsl:variable name="refmeta" select=".//refmeta"/>
+  <xsl:variable name="refentrytitle" select="$refmeta//refentrytitle"/>
+  <xsl:variable name="refnamediv" select=".//refnamediv"/>
+  <xsl:variable name="refname" select="$refnamediv//refname"/>
+
+  <xsl:variable name="title">
+    <xsl:choose>
+      <xsl:when test="$refentrytitle">
+        <xsl:apply-templates select="$refentrytitle[1]" mode="title.markup"/>
+      </xsl:when>
+      <xsl:when test="$refname">
+        <xsl:apply-templates select="$refname[1]" mode="title.markup"/>
+      </xsl:when>
+      <xsl:otherwise>REFENTRY WITHOUT TITLE???</xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:copy-of select="$title"/>
+</xsl:template>
+
+<xsl:template match="refentrytitle|refname" mode="title.markup">
+  <xsl:param name="allow-anchors" select="0"/>
+  <xsl:choose>
+    <xsl:when test="$allow-anchors != 0">
+      <xsl:apply-templates/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:apply-templates mode="no.anchor.mode"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="section
+                     |sect1|sect2|sect3|sect4|sect5
+                     |refsect1|refsect2|refsect3
+                     |simplesect"
+              mode="title.markup">
+  <xsl:param name="allow-anchors" select="0"/>
+  <xsl:variable name="title" select="(info/title
+		                      |sectioninfo/title
+                                      |sect1info/title
+                                      |sect2info/title
+                                      |sect3info/title
+                                      |sect4info/title
+                                      |sect5info/title
+                                      |refsect1info/title
+                                      |refsect2info/title
+                                      |refsect3info/title
+                                      |title)[1]"/>
+
+  <xsl:apply-templates select="$title" mode="title.markup">
+    <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="bridgehead" mode="title.markup">
+  <xsl:apply-templates mode="title.markup"/>
+</xsl:template>
+
+<xsl:template match="refsynopsisdiv" mode="title.markup">
+  <xsl:param name="allow-anchors" select="0"/>
+  <xsl:choose>
+    <xsl:when test="title">
+      <xsl:apply-templates select="title" mode="title.markup">
+        <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
+      </xsl:apply-templates>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:call-template name="gentext">
+        <xsl:with-param name="key" select="'RefSynopsisDiv'"/>
+      </xsl:call-template>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="bibliography" mode="title.markup">
+  <xsl:param name="allow-anchors" select="0"/>
+  <xsl:variable name="title" select="(bibliographyinfo/title|info/title|title)[1]"/>
+  <xsl:choose>
+    <xsl:when test="$title">
+      <xsl:apply-templates select="$title" mode="title.markup">
+        <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
+      </xsl:apply-templates>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:call-template name="gentext">
+        <xsl:with-param name="key" select="'Bibliography'"/>
+      </xsl:call-template>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="glossary" mode="title.markup">
+  <xsl:param name="allow-anchors" select="0"/>
+  <xsl:variable name="title" select="(glossaryinfo/title|info/title|title)[1]"/>
+  <xsl:choose>
+    <xsl:when test="$title">
+      <xsl:apply-templates select="$title" mode="title.markup">
+        <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
+      </xsl:apply-templates>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:call-template name="gentext.element.name">
+        <xsl:with-param name="element.name" select="name(.)"/>
+      </xsl:call-template>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="glossentry" mode="title.markup">
+  <xsl:param name="allow-anchors" select="0"/>
+  <xsl:apply-templates select="glossterm" mode="title.markup">
+    <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="glossterm" mode="title.markup">
+  <xsl:param name="allow-anchors" select="0"/>
+
+  <xsl:choose>
+    <xsl:when test="$allow-anchors != 0">
+      <xsl:apply-templates/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:apply-templates mode="no.anchor.mode"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="index" mode="title.markup">
+  <xsl:param name="allow-anchors" select="0"/>
+  <xsl:variable name="title" select="(indexinfo/title|info/title|title)[1]"/>
+  <xsl:choose>
+    <xsl:when test="$title">
+      <xsl:apply-templates select="$title" mode="title.markup">
+        <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
+      </xsl:apply-templates>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:call-template name="gentext">
+        <xsl:with-param name="key" select="'Index'"/>
+      </xsl:call-template>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="setindex" mode="title.markup">
+  <xsl:param name="allow-anchors" select="0"/>
+  <xsl:variable name="title" select="(setindexinfo/title|info/title|title)[1]"/>
+  <xsl:choose>
+    <xsl:when test="$title">
+      <xsl:apply-templates select="$title" mode="title.markup">
+        <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
+      </xsl:apply-templates>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:call-template name="gentext">
+        <xsl:with-param name="key" select="'SetIndex'"/>
+      </xsl:call-template>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="figure|example|equation" mode="title.markup">
+  <xsl:param name="allow-anchors" select="0"/>
+  <xsl:apply-templates select="title" mode="title.markup">
+    <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="table" mode="title.markup">
+  <xsl:param name="allow-anchors" select="0"/>
+  <xsl:apply-templates select="title|caption" mode="title.markup">
+    <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="procedure" mode="title.markup">
+  <xsl:param name="allow-anchors" select="0"/>
+  <xsl:apply-templates select="title" mode="title.markup">
+    <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="abstract" mode="title.markup">
+  <xsl:param name="allow-anchors" select="0"/>
+  <xsl:choose>
+    <xsl:when test="title">
+      <xsl:apply-templates select="title" mode="title.markup">
+        <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
+      </xsl:apply-templates>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:call-template name="gentext">
+        <xsl:with-param name="key" select="'Abstract'"/>
+      </xsl:call-template>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="caution|tip|warning|important|note" mode="title.markup">
+  <xsl:param name="allow-anchors" select="0"/>
+  <xsl:variable name="title" select="title[1]"/>
+  <xsl:choose>
+    <xsl:when test="$title">
+      <xsl:apply-templates select="$title" mode="title.markup">
+        <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
+      </xsl:apply-templates>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:call-template name="gentext">
+        <xsl:with-param name="key">
+          <xsl:choose>
+            <xsl:when test="local-name(.)='note'">Note</xsl:when>
+            <xsl:when test="local-name(.)='important'">Important</xsl:when>
+            <xsl:when test="local-name(.)='caution'">Caution</xsl:when>
+            <xsl:when test="local-name(.)='warning'">Warning</xsl:when>
+            <xsl:when test="local-name(.)='tip'">Tip</xsl:when>
+          </xsl:choose>
+        </xsl:with-param>
+      </xsl:call-template>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="question" mode="title.markup">
+  <!-- questions don't have titles -->
+  <xsl:text>Question</xsl:text>
+</xsl:template>
+
+<xsl:template match="answer" mode="title.markup">
+  <!-- answers don't have titles -->
+  <xsl:text>Answer</xsl:text>
+</xsl:template>
+
+<xsl:template match="qandaentry" mode="title.markup">
+  <!-- qandaentrys are represented by the first question in them -->
+  <xsl:text>Question</xsl:text>
+</xsl:template>
+
+<xsl:template match="legalnotice" mode="title.markup">
+  <xsl:param name="allow-anchors" select="0"/>
+  <xsl:choose>
+    <xsl:when test="title">
+      <xsl:apply-templates select="title" mode="title.markup">
+        <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
+      </xsl:apply-templates>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:call-template name="gentext">
+        <xsl:with-param name="key" select="'LegalNotice'"/>
+      </xsl:call-template>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- ============================================================ -->
+
+<xsl:template match="*" mode="titleabbrev.markup">
+  <xsl:param name="allow-anchors" select="0"/>
+  <xsl:param name="verbose" select="1"/>
+
+  <xsl:choose>
+    <xsl:when test="titleabbrev">
+      <xsl:apply-templates select="titleabbrev[1]" mode="title.markup">
+        <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
+      </xsl:apply-templates>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:apply-templates select="." mode="title.markup">
+        <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
+        <xsl:with-param name="verbose" select="$verbose"/>
+      </xsl:apply-templates>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="preface|chapter|appendix" mode="titleabbrev.markup">
+  <xsl:param name="allow-anchors" select="0"/>
+  <xsl:param name="verbose" select="1"/>
+
+  <xsl:variable name="titleabbrev" select="(docinfo/titleabbrev
+                                           |info/titleabbrev
+                                           |prefaceinfo/titleabbrev
+                                           |chapterinfo/titleabbrev
+                                           |appendixinfo/titleabbrev
+                                           |titleabbrev)[1]"/>
+
+  <xsl:choose>
+    <xsl:when test="$titleabbrev">
+      <xsl:apply-templates select="$titleabbrev" mode="title.markup">
+        <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
+      </xsl:apply-templates>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:apply-templates select="." mode="title.markup">
+        <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
+        <xsl:with-param name="verbose" select="$verbose"/>
+      </xsl:apply-templates>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="article" mode="titleabbrev.markup">
+  <xsl:param name="allow-anchors" select="0"/>
+  <xsl:param name="verbose" select="1"/>
+
+  <xsl:variable name="titleabbrev" select="(artheader/titleabbrev
+                                           |articleinfo/titleabbrev
+                                           |info/titleabbrev
+                                           |titleabbrev)[1]"/>
+
+  <xsl:choose>
+    <xsl:when test="$titleabbrev">
+      <xsl:apply-templates select="$titleabbrev" mode="title.markup">
+        <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
+      </xsl:apply-templates>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:apply-templates select="." mode="title.markup">
+        <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
+        <xsl:with-param name="verbose" select="$verbose"/>
+      </xsl:apply-templates>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="section
+                     |sect1|sect2|sect3|sect4|sect5
+                     |refsect1|refsect2|refsect3
+                     |simplesect"
+              mode="titleabbrev.markup">
+  <xsl:param name="allow-anchors" select="0"/>
+  <xsl:param name="verbose" select="1"/>
+
+  <xsl:variable name="titleabbrev" select="(info/titleabbrev
+		                            |sectioninfo/titleabbrev
+		                            |sect1info/titleabbrev
+					    |sect2info/titleabbrev
+					    |sect3info/titleabbrev
+					    |sect4info/titleabbrev
+					    |sect5info/titleabbrev
+					    |refsect1info/titleabbrev
+					    |refsect2info/titleabbrev
+					    |refsect3info/titleabbrev
+					    |titleabbrev)[1]"/>
+
+  <xsl:choose>
+    <xsl:when test="$titleabbrev">
+      <xsl:apply-templates select="$titleabbrev" mode="title.markup">
+        <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
+      </xsl:apply-templates>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:apply-templates select="." mode="title.markup">
+        <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
+        <xsl:with-param name="verbose" select="$verbose"/>
+      </xsl:apply-templates>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="titleabbrev" mode="title.markup">
+  <xsl:param name="allow-anchors" select="0"/>
+
+  <xsl:choose>
+    <xsl:when test="$allow-anchors != 0">
+      <xsl:apply-templates/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:apply-templates mode="no.anchor.mode"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- ============================================================ -->
+
+<xsl:template match="*" mode="no.anchor.mode">
+  <xsl:apply-templates mode="no.anchor.mode"/>
+</xsl:template>
+
+<xsl:template match="footnote" mode="no.anchor.mode">
+  <!-- nop, suppressed -->
+</xsl:template>
+
+<xsl:template match="anchor" mode="no.anchor.mode">
+  <!-- nop, suppressed -->
+</xsl:template>
+
+<xsl:template match="ulink" mode="no.anchor.mode">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="link" mode="no.anchor.mode">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="olink" mode="no.anchor.mode">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="indexterm" mode="no.anchor.mode">
+  <!-- nop, suppressed -->
+</xsl:template>
+
+<xsl:template match="xref" mode="no.anchor.mode">
+  <!-- FIXME: this should generate the text without the link... -->
+</xsl:template>
+
+<!-- ============================================================ -->
+
+</xsl:stylesheet>
+

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/tr.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/tr.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/tr.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,590 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="tr" english-language-name="Turkish">
+
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+   <l:gentext key="Abstract" text="&#214;zet"/>
+   <l:gentext key="abstract" text="&#214;zet"/>
+   <l:gentext key="Answer" text="Cevap:"/>
+   <l:gentext key="answer" text="Cevap:"/>
+   <l:gentext key="Appendix" text="Ek"/>
+   <l:gentext key="appendix" text="ek"/>
+   <l:gentext key="Article" text="Makale"/>
+   <l:gentext key="article" text="Makale"/>
+   <l:gentext key="Bibliography" text="Kaynak&#231;a"/>
+   <l:gentext key="bibliography" text="Kaynak&#231;a"/>
+   <l:gentext key="Book" text="Kitap"/>
+   <l:gentext key="book" text="Kitap"/>
+   <l:gentext key="CAUTION" text="D&#304;KKAT"/>
+   <l:gentext key="Caution" text="Dikkat"/>
+   <l:gentext key="caution" text="Dikkat"/>
+   <l:gentext key="Chapter" text="B&#246;l&#252;m"/>
+   <l:gentext key="chapter" text="b&#246;l&#252;m"/>
+   <l:gentext key="Colophon" text="Kitap hakk&#305;nda"/>
+   <l:gentext key="colophon" text="Kitap hakk&#305;nda"/>
+   <l:gentext key="Copyright" text="Telif Hakk&#305;"/>
+   <l:gentext key="copyright" text="Telif Hakk&#305;"/>
+   <l:gentext key="Dedication" text="&#304;thaf"/>
+   <l:gentext key="dedication" text="&#304;thaf"/>
+   <l:gentext key="Edition" text="Bask&#305;"/>
+   <l:gentext key="edition" text="Bask&#305;"/>
+   <l:gentext key="Equation" text="Denklem"/>
+   <l:gentext key="equation" text="Denklem"/>
+   <l:gentext key="Example" text="&#214;rnek"/>
+   <l:gentext key="example" text="&#214;rnek"/>
+   <l:gentext key="Figure" text="&#350;ekil"/>
+   <l:gentext key="figure" text="&#350;ekil"/>
+   <l:gentext key="Glossary" text="S&#246;zl&#252;k"/>
+   <l:gentext key="glossary" text="S&#246;zl&#252;k"/>
+   <l:gentext key="GlossSee" text="Bkz."/>
+   <l:gentext key="glosssee" text="Bkz."/>
+   <l:gentext key="GlossSeeAlso" text="Bkz."/>
+   <l:gentext key="glossseealso" text="Bkz."/>
+   <l:gentext key="IMPORTANT" text="&#214;NEML&#304;"/>
+   <l:gentext key="important" text="&#214;nemli"/>
+   <l:gentext key="Important" text="&#214;nemli"/>
+   <l:gentext key="Index" text="Dizin"/>
+   <l:gentext key="index" text="Dizin"/>
+   <l:gentext key="ISBN" text="ISBN"/>
+   <l:gentext key="isbn" text="ISBN"/>
+   <l:gentext key="LegalNotice" text="Yasal Uyar&#305;"/>
+   <l:gentext key="legalnotice" text="Yasal Uyar&#305;"/>
+   <l:gentext key="MsgAud" text="Hedef Okuyucu"/>
+   <l:gentext key="msgaud" text="Hedef Okuyucu"/>
+   <l:gentext key="MsgLevel" text="Level"/>
+   <l:gentext key="msglevel" text="D&#252;zey"/>
+   <l:gentext key="MsgOrig" text="D&#252;zey"/>
+   <l:gentext key="msgorig" text="Kaynak"/>
+   <l:gentext key="NOTE" text="NOT"/>
+   <l:gentext key="Note" text="Not"/>
+   <l:gentext key="note" text="Not"/>
+   <l:gentext key="Part" text="K&#305;s&#305;m"/>
+   <l:gentext key="part" text="K&#305;s&#305;m"/>
+   <l:gentext key="Preface" text="&#214;ns&#246;z"/>
+   <l:gentext key="preface" text="&#214;ns&#246;z"/>
+   <l:gentext key="Procedure" text="Y&#246;nerge"/>
+   <l:gentext key="procedure" text="Y&#246;nerge"/>
+   <l:gentext key="ProductionSet" text="Prod&#252;ksiyon"/>
+   <l:gentext key="PubDate" text="Yay&#305;mlanma Tarihi"/>
+   <l:gentext key="pubdate" text="Yay&#305;mlanma Tarihi"/>
+   <l:gentext key="Published" text="Yay&#305;mlanma"/>
+   <l:gentext key="published" text="Yay&#305;mlanma"/>
+   <l:gentext key="Qandadiv" text="S ve C"/>
+   <l:gentext key="qandadiv" text="S ve C"/>
+   <l:gentext key="Question" text="Soru:"/>
+   <l:gentext key="question" text="Soru:"/>
+   <l:gentext key="RefEntry" text=""/>
+   <l:gentext key="refentry" text=""/>
+   <l:gentext key="Reference" text="Referans"/>
+   <l:gentext key="reference" text="Referans"/>
+   <l:gentext key="RefName" text="Referans Ad&#305;"/>
+   <l:gentext key="refname" text="Referans Ad&#305;"/>
+   <l:gentext key="RefSection" text=""/>
+   <l:gentext key="refsection" text=""/>
+   <l:gentext key="RefSynopsisDiv" text="Synopsis"/>
+   <l:gentext key="refsynopsisdiv" text="Synopsis"/>
+   <l:gentext key="RevHistory" text="Bask&#305; Tarih&#231;esi"/>
+   <l:gentext key="revhistory" text="Bask&#305; Tarih&#231;esi"/>
+   <l:gentext key="revision" text="Bask&#305;"/>
+   <l:gentext key="Revision" text="Bask&#305;"/>
+   <l:gentext key="sect1" text="K&#305;s&#305;m"/>
+   <l:gentext key="sect2" text="K&#305;s&#305;m"/>
+   <l:gentext key="sect3" text="K&#305;s&#305;m"/>
+   <l:gentext key="sect4" text="K&#305;s&#305;m"/>
+   <l:gentext key="sect5" text="K&#305;s&#305;m"/>
+   <l:gentext key="section" text="K&#305;s&#305;m"/>
+   <l:gentext key="Section" text="K&#305;s&#305;m"/>
+   <l:gentext key="see" text="Bkz."/>
+   <l:gentext key="See" text="Bkz."/>
+   <l:gentext key="seealso" text="Bkz."/>
+   <l:gentext key="Seealso" text="Bak&#305;n&#305;z"/>
+   <l:gentext key="SeeAlso" text="Bak&#305;n&#305;z"/>
+   <l:gentext key="set" text="Tak&#305;m"/>
+   <l:gentext key="Set" text="Tak&#305;m"/>
+   <l:gentext key="setindex" text="Tak&#305;m Dizini"/>
+   <l:gentext key="SetIndex" text="Tak&#305;m Dizini"/>
+   <l:gentext key="Sidebar" text=""/>
+   <l:gentext key="sidebar" text="sidebar"/>
+   <l:gentext key="step" text="ad&#305;m"/>
+   <l:gentext key="Step" text="Ad&#305;m"/>
+   <l:gentext key="Table" text="Tablo"/>
+   <l:gentext key="table" text="Tablo"/>
+   <l:gentext key="tip" text="&#304;pucu"/>
+   <l:gentext key="TIP" text="&#304;PUCU"/>
+   <l:gentext key="Tip" text="&#304;pucu"/>
+   <l:gentext key="Warning" text="Uyar&#305;"/>
+   <l:gentext key="warning" text="Uyar&#305;"/>
+   <l:gentext key="WARNING" text="UYARI"/>
+   <l:gentext key="and" text="ve"/>
+   <l:gentext key="by" text="by"/>
+   <l:gentext key="called" text="called"/>
+   <l:gentext key="Edited" text="Yay&#305;na haz&#305;rlayan"/>
+   <l:gentext key="edited" text="yay&#305;na haz&#305;rlayan"/>
+   <l:gentext key="Editedby" text="Yay&#305;na haz&#305;rlayan"/>
+   <l:gentext key="editedby" text="yay&#305;na haz&#305;rlayan"/>
+   <l:gentext key="in" text="in"/>
+   <l:gentext key="lastlistcomma" text=","/>
+   <l:gentext key="listcomma" text=","/>
+   <l:gentext key="nonexistantelement" text="varolmayan eleman"/>
+   <l:gentext key="notes" text="Notlar"/>
+   <l:gentext key="Notes" text="Notlar"/>
+   <l:gentext key="Pgs" text="Sayfa"/>
+   <l:gentext key="pgs" text="Sayfa"/>
+   <l:gentext key="Revisedby" text="D&#252;zeltmeler: "/>
+   <l:gentext key="revisedby" text="D&#252;zeltmeler: "/>
+   <l:gentext key="TableNotes" text="Notlar"/>
+   <l:gentext key="tablenotes" text="Notlar"/>
+   <l:gentext key="TableofContents" text="&#304;&#231;indekiler"/>
+   <l:gentext key="tableofcontents" text="&#304;&#231;indekiler"/>
+   <l:gentext key="the" text=""/>
+   <l:gentext key="unexpectedelementname" text="Beklenmeyen eleman ad&#305;"/>
+   <l:gentext key="unsupported" text="desteklenmiyor"/>
+   <l:gentext key="xrefto" text="xref to"/>
+   <l:gentext key="listofequations" text="Denklemler"/>
+   <l:gentext key="ListofEquations" text="Denklemler"/>
+   <l:gentext key="ListofExamples" text="&#214;rnekler"/>
+   <l:gentext key="listofexamples" text="&#214;rnekler"/>
+   <l:gentext key="ListofFigures" text="&#350;ekiller"/>
+   <l:gentext key="listoffigures" text="&#350;ekiller"/>
+   <l:gentext key="ListofProcedures" text="Y&#246;nergeler"/>
+   <l:gentext key="listofprocedures" text="Y&#246;nergeler"/>
+   <l:gentext key="listoftables" text="Tablolar"/>
+   <l:gentext key="ListofTables" text="Tablolar"/>
+   <l:gentext key="ListofUnknown" text="Bilinmeyenler"/>
+   <l:gentext key="listofunknown" text="Bilinmeyenler"/>
+   <l:gentext key="nav-home" text="Ba&#351;lang&#305;&#231;"/>
+   <l:gentext key="nav-next" text="Sonraki"/>
+   <l:gentext key="nav-next-sibling" text="Sonraki B&#246;l&#252;m"/>
+   <l:gentext key="nav-prev" text="&#214;nceki"/>
+   <l:gentext key="nav-prev-sibling" text="&#214;nceki B&#246;l&#252;m"/>
+   <l:gentext key="nav-up" text="Yukar&#305;"/>
+   <l:gentext key="nav-toc" text="&#304;&#231;indekiler"/>
+   <l:gentext key="Draft" text="Taslak"/>
+   <l:gentext key="above" text="&#252;st&#252;nde"/>
+   <l:gentext key="below" text="alt&#305;nda"/>
+   <l:gentext key="sectioncalled" text="the section called"/>
+   <l:gentext key="index symbols" text="Semboller"/>
+   <l:gentext key="lowercase.alpha" text="abc&#231;defg&#287;h&#305;ijklmno&#246;prs&#351;tu&#252;vyz"/>
+   <l:gentext key="uppercase.alpha" text="ABC&#199;DEFG&#286;HI&#304;JKLMNO&#214;PRS&#350;TU&#220;VYZ"/>
+   <l:dingbat key="startquote" text="&#8220;"/>
+   <l:dingbat key="endquote" text="&#8221;"/>
+   <l:dingbat key="nestedstartquote" text="&#8216;"/>
+   <l:dingbat key="nestedendquote" text="&#8217;"/>
+   <l:dingbat key="singlestartquote" text="&#8216;"/>
+   <l:dingbat key="singleendquote" text="&#8217;"/>
+   <l:dingbat key="bullet" text="&#8226;"/>
+   <l:gentext key="hyphenation-character" text="-"/>
+   <l:gentext key="hyphenation-push-character-count" text="3"/>
+   <l:gentext key="hyphenation-remain-character-count" text="2"/>
+
+   <l:context name="styles">
+      <l:template name="person-name" text="first-last"/>
+   </l:context>
+
+   <l:context name="title">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="%t"/>
+      <l:template name="appendix" text="Ek %n. %t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="biblioentry" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliolist" text="%t" lang="en"/>
+      <l:template name="bibliomixed" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="B&#246;l&#252;m %n. %t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="Denklem %n. %t"/>
+      <l:template name="example" text="&#214;rnek %n. %t"/>
+      <l:template name="figure" text="&#350;ekil %n. %t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="glosslist" text="%t" lang="en"/>
+      <l:template name="glossentry" text="%t"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text=""/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="K&#305;s&#305;m %n. %t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="procedure.formal" text="Y&#246;nerge %n. %t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="productionset.formal" text="Prod&#252;ksiyon %n"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="%t"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="%t"/>
+      <l:template name="refentry" text="%t"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsection" text="%t"/>
+      <l:template name="refsect1" text="%t"/>
+      <l:template name="refsect2" text="%t"/>
+      <l:template name="refsect3" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="refsynopsisdivinfo" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="step" text="%t"/>
+      <l:template name="table" text="Tablo %n. %t"/>
+      <l:template name="task" text="%t"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text=""/>
+      <l:template name="warning" text="%t"/>
+   </l:context>
+
+   <l:context name="title-unnumbered">
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article/appendix" text="%t"/>
+      <l:template name="bridgehead" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="sect1" text="%t"/>
+      <l:template name="sect2" text="%t"/>
+      <l:template name="sect3" text="%t"/>
+      <l:template name="sect4" text="%t"/>
+      <l:template name="sect5" text="%t"/>
+      <l:template name="section" text="%t"/>
+      <l:template name="simplesect" text="%t"/>
+   </l:context>
+
+   <l:context name="title-numbered">
+      <l:template name="appendix" text="Ek %n. %t"/>
+      <l:template name="article/appendix" text="%n.&#160;%t"/>
+      <l:template name="bridgehead" text="%n. %t"/>
+      <l:template name="chapter" text="B&#246;l&#252;m %n. %t"/>
+      <l:template name="sect1" text="%n. %t"/>
+      <l:template name="sect2" text="%n. %t"/>
+      <l:template name="sect3" text="%n. %t"/>
+      <l:template name="sect4" text="%n. %t"/>
+      <l:template name="sect5" text="%n. %t"/>
+      <l:template name="section" text="%n. %t"/>
+      <l:template name="simplesect" text="%t"/>
+   </l:context>
+
+   <l:context name="subtitle">
+      <l:template name="appendix" text="%s"/>
+      <l:template name="article" text="%s"/>
+      <l:template name="bibliodiv" text="%s"/>
+      <l:template name="biblioentry" text="%s"/>
+      <l:template name="bibliography" text="%s"/>
+      <l:template name="bibliomixed" text="%s"/>
+      <l:template name="bibliomset" text="%s"/>
+      <l:template name="biblioset" text="%s"/>
+      <l:template name="book" text="%s"/>
+      <l:template name="chapter" text="%s"/>
+      <l:template name="colophon" text="%s"/>
+      <l:template name="dedication" text="%s"/>
+      <l:template name="glossary" text="%s"/>
+      <l:template name="glossdiv" text="%s"/>
+      <l:template name="index" text="%s"/>
+      <l:template name="indexdiv" text="%s"/>
+      <l:template name="lot" text="%s"/>
+      <l:template name="part" text="%s"/>
+      <l:template name="partintro" text="%s"/>
+      <l:template name="preface" text="%s"/>
+      <l:template name="refentry" text="%s"/>
+      <l:template name="reference" text="%s"/>
+      <l:template name="refsection" text="%s"/>
+      <l:template name="refsect1" text="%s"/>
+      <l:template name="refsect2" text="%s"/>
+      <l:template name="refsect3" text="%s"/>
+      <l:template name="refsynopsisdiv" text="%s"/>
+      <l:template name="sect1" text="%s"/>
+      <l:template name="sect2" text="%s"/>
+      <l:template name="sect3" text="%s"/>
+      <l:template name="sect4" text="%s"/>
+      <l:template name="sect5" text="%s"/>
+      <l:template name="section" text="%s"/>
+      <l:template name="set" text="%s"/>
+      <l:template name="setindex" text="%s"/>
+      <l:template name="sidebar" text="%s"/>
+      <l:template name="simplesect" text="%s"/>
+      <l:template name="toc" text="%s"/>
+   </l:context>
+
+   <l:context name="xref">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="Cevap: %n"/>
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="constraintdef" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="%t"/>
+      <l:template name="example" text="%t"/>
+      <l:template name="figure" text="%t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text="%n"/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="%t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="Soru: %n"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="Soru: %n"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="table" text="%t"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="%n"/>
+      <l:template name="warning" text="%t"/>
+      <l:template name="page.citation" text=" [%p]"/>
+      <l:template name="page" text="(sayfa %p)"/>
+      <l:template name="pageabbrev" text="(shf. %p)"/>
+      <l:template name="Page" text="Sayfa %p"/>
+      <l:template name="bridgehead" text=" &#8220;%t&#8221;"/>
+      <l:template name="refsection" text=" &#8220;%t&#8221;"/>
+      <l:template name="refsect1" text=" &#8220;%t&#8221;"/>
+      <l:template name="refsect2" text=" &#8220;%t&#8221;"/>
+      <l:template name="refsect3" text=" &#8220;%t&#8221;"/>
+      <l:template name="sect1" text=" &#8220;%t&#8221;"/>
+      <l:template name="sect2" text=" &#8220;%t&#8221;"/>
+      <l:template name="sect3" text=" &#8220;%t&#8221;"/>
+      <l:template name="sect4" text=" &#8220;%t&#8221;"/>
+      <l:template name="sect5" text=" &#8220;%t&#8221;"/>
+      <l:template name="section" text=" &#8220;%t&#8221;"/>
+      <l:template name="simplesect" text=" &#8220;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="xref-number">
+      <l:template name="answer" text="Cevap:&#160;%n"/>
+      <l:template name="appendix" text="Ek&#160;%n"/>
+      <l:template name="bridgehead" text="K&#305;s&#305;m&#160;%n"/>
+      <l:template name="chapter" text="B&#246;l&#252;m&#160;%n"/>
+      <l:template name="equation" text="Denklem&#160;%n"/>
+      <l:template name="example" text="&#214;rnek&#160;%n"/>
+      <l:template name="figure" text="&#350;ekil&#160;%n"/>
+      <l:template name="part" text="K&#305;s&#305;m&#160;%n"/>
+      <l:template name="procedure" text="Y&#246;nerge&#160;%n"/>
+      <l:template name="productionset" text="Prod&#252;ksiyon&#160;%n"/>
+      <l:template name="qandadiv" text="S ve C&#160;%n"/>
+      <l:template name="qandaentry" text="Soru:&#160;%n"/>
+      <l:template name="question" text="Soru:&#160;%n"/>
+      <l:template name="sect1" text="K&#305;s&#305;m&#160;%n"/>
+      <l:template name="sect2" text="K&#305;s&#305;m&#160;%n"/>
+      <l:template name="sect3" text="K&#305;s&#305;m&#160;%n"/>
+      <l:template name="sect4" text="K&#305;s&#305;m&#160;%n"/>
+      <l:template name="sect5" text="K&#305;s&#305;m&#160;%n"/>
+      <l:template name="section" text="K&#305;s&#305;m&#160;%n"/>
+      <l:template name="table" text="Tablo&#160;%n"/>
+   </l:context>
+
+   <l:context name="xref-number-and-title">
+      <l:template name="appendix" text="Ek&#160;%n, %t"/>
+      <l:template name="bridgehead" text="K&#305;s&#305;m&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="chapter" text="B&#246;l&#252;m&#160;%n, %t"/>
+      <l:template name="equation" text="Denklem&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="example" text="&#214;rnek&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="figure" text="&#350;ekil&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="part" text="K&#305;s&#305;m&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="procedure" text="Y&#246;nerge&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="productionset" text="Prod&#252;ksiyon&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="qandadiv" text="S ve C&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="refsect1" text=" &#8220;%t&#8221;"/>
+      <l:template name="refsect2" text=" &#8220;%t&#8221;"/>
+      <l:template name="refsect3" text=" &#8220;%t&#8221;"/>
+      <l:template name="refsection" text=" &#8220;%t&#8221;"/>
+      <l:template name="sect1" text="K&#305;s&#305;m&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect2" text="K&#305;s&#305;m&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect3" text="K&#305;s&#305;m&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect4" text="K&#305;s&#305;m&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect5" text="K&#305;s&#305;m&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="section" text="K&#305;s&#305;m&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="simplesect" text=" &#8220;%t&#8221;"/>
+      <l:template name="table" text="Tablo&#160;%n, &#8220;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="authorgroup">
+      <l:template name="sep" text=", "/>
+      <l:template name="sep2" text=" ve "/>
+      <l:template name="seplast" text=", ve "/>
+   </l:context>
+
+   <l:context name="glossary">
+      <l:template name="see" text="Bkz. "/>
+      <l:template name="seealso" text="Bkz. "/>
+   </l:context>
+
+   <l:context name="msgset">
+      <l:template name="MsgAud" text="Hedef Okuyucu: "/>
+      <l:template name="MsgLevel" text="Level: "/>
+      <l:template name="MsgOrig" text="D&#252;zey: "/>
+   </l:context>
+
+   <l:context name="datetime">
+      <l:template name="format" text="d/m/Y"/>
+   </l:context>
+
+   <l:context name="datetime-full">
+      <l:template name="January" text="Ocak"/>
+      <l:template name="February" text="&#350;ubat"/>
+      <l:template name="March" text="Mart"/>
+      <l:template name="April" text="Nisan"/>
+      <l:template name="May" text="May&#305;s"/>
+      <l:template name="June" text="Haziran"/>
+      <l:template name="July" text="Temmuz"/>
+      <l:template name="August" text="A&#287;ustos"/>
+      <l:template name="September" text="Eyl&#252;l"/>
+      <l:template name="October" text="Ekim"/>
+      <l:template name="November" text="Kas&#305;m"/>
+      <l:template name="December" text="Aral&#305;k"/>
+      <l:template name="Monday" text="Pazartesi"/>
+      <l:template name="Tuesday" text="Sal&#305;"/>
+      <l:template name="Wednesday" text="&#199;ar&#351;amba"/>
+      <l:template name="Thursday" text="Per&#351;embe"/>
+      <l:template name="Friday" text="Cuma"/>
+      <l:template name="Saturday" text="Cumartesi"/>
+      <l:template name="Sunday" text="Pazar"/>
+   </l:context>
+
+   <l:context name="datetime-abbrev">
+      <l:template name="Jan" text="Oca"/>
+      <l:template name="Feb" text="&#350;ub"/>
+      <l:template name="Mar" text="Mar"/>
+      <l:template name="Apr" text="Nis"/>
+      <l:template name="May" text="May"/>
+      <l:template name="Jun" text="Haz"/>
+      <l:template name="Jul" text="Tem"/>
+      <l:template name="Aug" text="A&#287;u"/>
+      <l:template name="Sep" text="Eyl"/>
+      <l:template name="Oct" text="Eki"/>
+      <l:template name="Nov" text="Kas"/>
+      <l:template name="Dec" text="Ara"/>
+      <l:template name="Mon" text="Pzt"/>
+      <l:template name="Tue" text="Sal"/>
+      <l:template name="Wed" text="&#199;ar"/>
+      <l:template name="Thu" text="Per"/>
+      <l:template name="Fri" text="Cum"/>
+      <l:template name="Sat" text="Cts"/>
+      <l:template name="Sun" text="Paz"/>
+   </l:context>
+
+   <l:context name="htmlhelp">
+      <l:template name="langcode" text="0x041f Turkish"/>
+   </l:context>
+
+   <l:letters>
+      <l:l i="-1"/>
+      <l:l i="0">Semboller</l:l>
+      <l:l i="1">A</l:l>
+      <l:l i="1">a</l:l>
+      <l:l i="2">B</l:l>
+      <l:l i="2">b</l:l>
+      <l:l i="3">C</l:l>
+      <l:l i="3">c</l:l>
+      <l:l i="4">&#199;</l:l>
+      <l:l i="4">&#231;</l:l>
+      <l:l i="5">D</l:l>
+      <l:l i="5">d</l:l>
+      <l:l i="6">E</l:l>
+      <l:l i="6">e</l:l>
+      <l:l i="7">F</l:l>
+      <l:l i="7">f</l:l>
+      <l:l i="8">G</l:l>
+      <l:l i="8">g</l:l>
+      <l:l i="9">&#286;</l:l>
+      <l:l i="9">&#287;</l:l>
+      <l:l i="10">H</l:l>
+      <l:l i="10">h</l:l>
+      <l:l i="11">I</l:l>
+      <l:l i="11">&#305;</l:l>
+      <l:l i="12">&#304;</l:l>
+      <l:l i="12">i</l:l>
+      <l:l i="13">J</l:l>
+      <l:l i="13">j</l:l>
+      <l:l i="14">K</l:l>
+      <l:l i="14">k</l:l>
+      <l:l i="15">L</l:l>
+      <l:l i="15">l</l:l>
+      <l:l i="16">M</l:l>
+      <l:l i="16">m</l:l>
+      <l:l i="17">N</l:l>
+      <l:l i="17">n</l:l>
+      <l:l i="18">O</l:l>
+      <l:l i="18">o</l:l>
+      <l:l i="19">&#214;</l:l>
+      <l:l i="19">&#246;</l:l>
+      <l:l i="20">P</l:l>
+      <l:l i="20">p</l:l>
+      <l:l i="21">R</l:l>
+      <l:l i="21">r</l:l>
+      <l:l i="22">S</l:l>
+      <l:l i="22">s</l:l>
+      <l:l i="23">&#350;</l:l>
+      <l:l i="23">&#351;</l:l>
+      <l:l i="24">T</l:l>
+      <l:l i="24">t</l:l>
+      <l:l i="25">U</l:l>
+      <l:l i="25">u</l:l>
+      <l:l i="26">&#220;</l:l>
+      <l:l i="26">&#252;</l:l>
+      <l:l i="27">V</l:l>
+      <l:l i="27">v</l:l>
+      <l:l i="28">Y</l:l>
+      <l:l i="28">y</l:l>
+      <l:l i="29">Z</l:l>
+      <l:l i="29">z</l:l>
+   </l:letters>
+</l:l10n>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/uk.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/uk.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/uk.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1153 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="uk" english-language-name="Ukranian">
+
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+   <l:gentext key="Abstract" text="&#1040;&#1085;&#1086;&#1090;&#1072;&#1094;&#1110;&#1103;"/>
+   <l:gentext key="abstract" text="&#1040;&#1085;&#1086;&#1090;&#1072;&#1094;&#1110;&#1103;"/>
+   <l:gentext key="Answer" text="&#1042;:"/>
+   <l:gentext key="answer" text="&#1074;:"/>
+   <l:gentext key="Appendix" text="&#1044;&#1086;&#1076;&#1072;&#1090;&#1086;&#1082;"/>
+   <l:gentext key="appendix" text="&#1076;&#1086;&#1076;&#1072;&#1090;&#1086;&#1082;"/>
+   <l:gentext key="Article" text="&#1057;&#1090;&#1072;&#1090;&#1090;&#1103;"/>
+   <l:gentext key="article" text="&#1089;&#1090;&#1072;&#1090;&#1090;&#1103;"/>
+   <l:gentext key="Bibliography" text="&#1051;&#1080;&#1090;&#1077;&#1088;&#1072;&#1090;&#1091;&#1088;&#1072;"/>
+   <l:gentext key="bibliography" text="&#1083;&#1080;&#1090;&#1077;&#1088;&#1072;&#1090;&#1091;&#1088;&#1072;"/>
+   <l:gentext key="Book" text="&#1050;&#1085;&#1080;&#1075;&#1072;"/>
+   <l:gentext key="book" text="&#1082;&#1085;&#1080;&#1075;&#1072;"/>
+   <l:gentext key="CAUTION" text="&#1047;&#1040;&#1057;&#1058;&#1045;&#1056;&#1045;&#1046;&#1045;&#1053;&#1053;&#1071;"/>
+   <l:gentext key="Caution" text="&#1047;&#1072;&#1089;&#1090;&#1077;&#1088;&#1077;&#1078;&#1077;&#1085;&#1085;&#1103;"/>
+   <l:gentext key="caution" text="&#1079;&#1072;&#1089;&#1090;&#1077;&#1088;&#1077;&#1078;&#1077;&#1085;&#1085;&#1103;"/>
+   <l:gentext key="Chapter" text="&#1056;&#1086;&#1079;&#1076;&#1110;&#1083;"/>
+   <l:gentext key="chapter" text="&#1088;&#1086;&#1079;&#1076;&#1110;&#1083;"/>
+   <l:gentext key="Colophon" text="Colophon"/>
+   <l:gentext key="colophon" text="Colophon"/>
+   <l:gentext key="Copyright" text="&#1040;&#1074;&#1090;&#1086;&#1088;&#1089;&#1100;&#1082;&#1077; &#1087;&#1088;&#1072;&#1074;&#1086;"/>
+   <l:gentext key="copyright" text="&#1072;&#1074;&#1090;&#1086;&#1088;&#1089;&#1100;&#1082;&#1077; &#1087;&#1088;&#1072;&#1074;&#1086;"/>
+   <l:gentext key="Dedication" text="&#1055;&#1088;&#1080;&#1089;&#1074;&#1103;&#1095;&#1077;&#1085;&#1085;&#1103;"/>
+   <l:gentext key="dedication" text="&#1087;&#1088;&#1080;&#1089;&#1074;&#1103;&#1095;&#1077;&#1085;&#1085;&#1103;"/>
+   <l:gentext key="Edition" text="&#1042;&#1080;&#1076;&#1072;&#1085;&#1085;&#1103;"/>
+   <l:gentext key="edition" text="&#1074;&#1080;&#1076;&#1072;&#1085;&#1085;&#1103;"/>
+   <l:gentext key="Equation" text="&#1060;&#1086;&#1088;&#1084;&#1091;&#1083;&#1072;"/>
+   <l:gentext key="equation" text="&#1060;&#1086;&#1088;&#1084;&#1091;&#1083;&#1072;"/>
+   <l:gentext key="Example" text="&#1055;&#1088;&#1080;&#1082;&#1083;&#1072;&#1076;"/>
+   <l:gentext key="example" text="&#1087;&#1088;&#1080;&#1082;&#1083;&#1072;&#1076;"/>
+   <l:gentext key="Figure" text="&#1056;&#1080;&#1089;&#1091;&#1085;&#1086;&#1082;"/>
+   <l:gentext key="figure" text="&#1056;&#1080;&#1089;&#1091;&#1085;&#1086;&#1082;"/>
+   <l:gentext key="Glossary" text="&#1043;&#1083;&#1086;&#1089;&#1072;&#1088;&#1110;&#1081;"/>
+   <l:gentext key="glossary" text="&#1075;&#1083;&#1086;&#1089;&#1072;&#1088;&#1110;&#1081;"/>
+   <l:gentext key="GlossSee" text="&#1044;&#1080;&#1074;."/>
+   <l:gentext key="glosssee" text="&#1076;&#1080;&#1074;."/>
+   <l:gentext key="GlossSeeAlso" text="&#1044;&#1080;&#1074;. &#1090;&#1072;&#1082;&#1086;&#1078;"/>
+   <l:gentext key="glossseealso" text="&#1076;&#1080;&#1074;. &#1090;&#1072;&#1082;&#1086;&#1078;"/>
+   <l:gentext key="IMPORTANT" text="&#1042;&#1040;&#1046;&#1051;&#1048;&#1042;&#1054;"/>
+   <l:gentext key="important" text="&#1074;&#1072;&#1078;&#1083;&#1080;&#1074;&#1086;"/>
+   <l:gentext key="Important" text="&#1042;&#1072;&#1078;&#1083;&#1080;&#1074;&#1086;"/>
+   <l:gentext key="Index" text="&#1055;&#1088;&#1077;&#1076;&#1084;&#1077;&#1090;&#1085;&#1099;&#1081; &#1087;&#1086;&#1082;&#1072;&#1078;chcy;&#1080;&#1082;"/>
+   <l:gentext key="index" text="&#1087;&#1088;&#1077;&#1076;&#1084;&#1077;&#1090;&#1085;&#1099;&#1081; &#1087;&#1086;&#1082;&#1072;&#1078;chcy;&#1080;&#1082;"/>
+   <l:gentext key="ISBN" text="ISBN"/>
+   <l:gentext key="isbn" text="ISBN"/>
+   <l:gentext key="LegalNotice" text="&#1055;&#1088;&#1072;&#1074;&#1086;&#1074;&#1072; &#1087;&#1088;&#1080;&#1084;&#1110;&#1090;&#1082;&#1072;"/>
+   <l:gentext key="legalnotice" text="&#1087;&#1088;&#1072;&#1074;&#1086;&#1074;&#1072; &#1087;&#1088;&#1080;&#1084;&#1110;&#1090;&#1082;&#1072;"/>
+   <l:gentext key="MsgAud" text="&#1040;&#1091;&#1076;&#1080;&#1090;&#1086;&#1088;&#1110;&#1103;"/>
+   <l:gentext key="msgaud" text="&#1072;&#1091;&#1076;&#1080;&#1090;&#1086;&#1088;&#1110;&#1103;"/>
+   <l:gentext key="MsgLevel" text="&#1056;&#1110;&#1074;&#1077;&#1085;&#1100;"/>
+   <l:gentext key="msglevel" text="&#1088;&#1110;&#1074;&#1077;&#1085;&#1100;"/>
+   <l:gentext key="MsgOrig" text="&#1044;&#1078;&#1077;&#1088;&#1077;&#1083;&#1086;"/>
+   <l:gentext key="msgorig" text="&#1076;&#1078;&#1077;&#1088;&#1077;&#1083;&#1086;"/>
+   <l:gentext key="NOTE" text="&#1055;&#1056;&#1048;&#1052;&#1030;&#1058;&#1050;&#1040;"/>
+   <l:gentext key="Note" text="&#1055;&#1088;&#1080;&#1084;&#1110;&#1090;&#1082;&#1072;"/>
+   <l:gentext key="note" text="&#1087;&#1088;&#1080;&#1084;&#1110;&#1090;&#1082;&#1072;"/>
+   <l:gentext key="Part" text="&#1063;&#1072;&#1089;&#1090;&#1080;&#1085;&#1072;"/>
+   <l:gentext key="part" text="&#1095;&#1072;&#1089;&#1090;&#1080;&#1085;&#1072;"/>
+   <l:gentext key="Preface" text="&#1055;&#1077;&#1088;&#1077;&#1076;&#1084;&#1086;&#1074;&#1072;"/>
+   <l:gentext key="preface" text="&#1087;&#1077;&#1088;&#1077;&#1076;&#1084;&#1086;&#1074;&#1072;"/>
+   <l:gentext key="Procedure" text="&#1055;&#1088;&#1086;&#1094;&#1077;&#1076;&#1091;&#1088;&#1072;"/>
+   <l:gentext key="procedure" text="&#1055;&#1088;&#1086;&#1094;&#1077;&#1076;&#1091;&#1088;&#1072;"/>
+   <l:gentext key="ProductionSet" text="Production"/>
+   <l:gentext key="PubDate" text="Publication Date" lang="en"/>
+   <l:gentext key="pubdate" text="Publication date" lang="en"/>
+   <l:gentext key="Published" text="&#1054;&#1087;&#1091;&#1073;&#1083;&#1110;&#1082;&#1086;&#1074;&#1072;&#1085;&#1086;"/>
+   <l:gentext key="published" text="&#1086;&#1087;&#1091;&#1073;&#1083;&#1110;&#1082;&#1086;&#1074;&#1072;&#1085;&#1086;"/>
+   <l:gentext key="Qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="Question" text="&#1055;"/>
+   <l:gentext key="question" text="&#1087;"/>
+   <l:gentext key="RefEntry" text=""/>
+   <l:gentext key="refentry" text=""/>
+   <l:gentext key="Reference" text="&#1055;&#1086;&#1089;&#1080;&#1083;&#1072;&#1085;&#1085;&#1103;"/>
+   <l:gentext key="reference" text="&#1087;&#1086;&#1089;&#1080;&#1083;&#1072;&#1085;&#1085;&#1103;"/>
+   <l:gentext key="RefName" text="Name"/>
+   <l:gentext key="refname" text="Name"/>
+   <l:gentext key="RefSection" text=""/>
+   <l:gentext key="refsection" text=""/>
+   <l:gentext key="RefSynopsisDiv" text="&#1050;&#1086;&#1088;&#1086;&#1090;&#1082;&#1080;&#1081; &#1086;&#1075;&#1083;&#1103;&#1076;"/>
+   <l:gentext key="refsynopsisdiv" text="&#1082;&#1086;&#1088;&#1086;&#1090;&#1082;&#1080;&#1081; &#1086;&#1075;&#1083;&#1103;&#1076;"/>
+   <l:gentext key="RevHistory" text="&#1054;&#1087;&#1080;&#1089; zcy;&#1084;&#1110;&#1085;"/>
+   <l:gentext key="revhistory" text="&#1086;&#1087;&#1080;&#1089; zcy;&#1084;&#1110;&#1085;"/>
+   <l:gentext key="revision" text="&#1087;&#1077;&#1088;&#1077;&#1075;&#1083;&#1103;&#1076;"/>
+   <l:gentext key="Revision" text="&#1055;&#1077;&#1088;&#1077;&#1075;&#1083;&#1103;&#1076;"/>
+   <l:gentext key="sect1" text="Section"/>
+   <l:gentext key="sect2" text="Section"/>
+   <l:gentext key="sect3" text="Section"/>
+   <l:gentext key="sect4" text="Section"/>
+   <l:gentext key="sect5" text="Section"/>
+   <l:gentext key="section" text="&#1087;&#1072;&#1088;&#1072;&#1075;&#1088;&#1072;&#1092;"/>
+   <l:gentext key="Section" text="&#1055;&#1072;&#1088;&#1072;&#1075;&#1088;&#1072;&#1092;"/>
+   <l:gentext key="see" text="&#1076;&#1080;&#1074;."/>
+   <l:gentext key="See" text="&#1044;&#1080;&#1074;."/>
+   <l:gentext key="seealso" text="&#1089;&#1080;&#1074;. tcy;&#1072;&#1082;&#1086;&#1078;"/>
+   <l:gentext key="Seealso" text="&#1044;&#1080;&#1074;. tcy;&#1072;&#1082;&#1086;&#1078;"/>
+   <l:gentext key="SeeAlso" text="&#1044;&#1080;&#1074;. tcy;&#1072;&#1082;&#1086;&#1078;"/>
+   <l:gentext key="set" text="&#1074;&#1080;&#1073;&#1110;&#1088;&#1082;&#1072;"/>
+   <l:gentext key="Set" text="&#1042;&#1080;&#1073;&#1110;&#1088;&#1082;&#1072;"/>
+   <l:gentext key="setindex" text="&#1080;&#1085;&#1076;&#1077;&#1082;&#1089; &#1074;&#1080;&#1073;&#1110;&#1088;&#1082;&#1080;"/>
+   <l:gentext key="SetIndex" text="&#1048;&#1085;&#1076;&#1077;&#1082;&#1089; &#1074;&#1080;&#1073;&#1110;&#1088;&#1082;&#1080;"/>
+   <l:gentext key="Sidebar" text="&#1042;&#1099;&#1076;&#1110;&#1083;&#1077;&#1085;&#1085;&#1103;"/>
+   <l:gentext key="sidebar" text="&#1074;&#1099;&#1076;&#1110;&#1083;&#1077;&#1085;&#1085;&#1103;"/>
+   <l:gentext key="step" text="&#1082;&#1088;&#1086;&#1082;"/>
+   <l:gentext key="Step" text="&#1050;&#1088;&#1086;&#1082;"/>
+   <l:gentext key="Table" text="&#1058;&#1072;&#1073;&#1083;&#1080;&#1094;&#1103;"/>
+   <l:gentext key="table" text="&#1090;&#1072;&#1073;&#1083;&#1080;&#1094;&#1103;"/>
+   <l:gentext key="tip" text="&#1087;&#1110;&#1076;&#1082;&#1072;&#1079;&#1082;&#1072;"/>
+   <l:gentext key="TIP" text="&#1055;&#1030;&#1044;&#1050;&#1040;&#1047;&#1050;&#1040;"/>
+   <l:gentext key="Tip" text="&#1055;&#1110;&#1076;&#1082;&#1072;&#1079;&#1082;&#1072;"/>
+   <l:gentext key="Warning" text="&#1047;&#1072;&#1089;&#1090;&#1077;&#1088;&#1077;&#1078;&#1077;&#1085;&#1085;&#1103;"/>
+   <l:gentext key="warning" text="&#1079;&#1072;&#1089;&#1090;&#1077;&#1088;&#1077;&#1078;&#1077;&#1085;&#1085;&#1103;"/>
+   <l:gentext key="WARNING" text="&#1047;&#1040;&#1057;&#1058;&#1045;&#1056;&#1045;&#1046;&#1045;&#1053;&#1053;&#1071;"/>
+   <l:gentext key="and" text="and"/>
+   <l:gentext key="by" text="by"/>
+   <l:gentext key="called" text="called"/>
+   <l:gentext key="Edited" text="&#1055;&#1080;&#1076; &#1088;&#1077;&#1076;&#1072;&#1082;&#1094;&#1110;&#1108;&#1102;"/>
+   <l:gentext key="edited" text="&#1087;&#1080;&#1076; &#1088;&#1077;&#1076;&#1072;&#1082;&#1094;&#1110;&#1108;&#1102;"/>
+   <l:gentext key="Editedby" text="&#1055;&#1080;&#1076; &#1088;&#1077;&#1076;&#1072;&#1082;&#1094;&#1110;&#1108;&#1102;"/>
+   <l:gentext key="editedby" text="&#1087;&#1080;&#1076; &#1088;&#1077;&#1076;&#1072;&#1082;&#1094;&#1110;&#1108;&#1102;"/>
+   <l:gentext key="in" text="&#1074;"/>
+   <l:gentext key="lastlistcomma" text="."/>
+   <l:gentext key="listcomma" text=","/>
+   <l:gentext key="nonexistantelement" text="non-existant element"/>
+   <l:gentext key="notes" text="&#1087;&#1088;&#1080;&#1084;&#1110;&#1090;&#1082;&#1080;"/>
+   <l:gentext key="Notes" text="&#1055;&#1088;&#1080;&#1084;&#1110;&#1090;&#1082;&#1080;"/>
+   <l:gentext key="Pgs" text="&#1057;&#1090;&#1086;&#1088;."/>
+   <l:gentext key="pgs" text="&#1089;&#1090;&#1086;&#1088;."/>
+   <l:gentext key="Revisedby" text="&#1050;&#1086;&#1088;&#1077;&#1082;&#1090;&#1091;&#1088;&#1072;:;"/>
+   <l:gentext key="revisedby" text="&#1082;&#1086;&#1088;&#1077;&#1082;&#1090;&#1091;&#1088;&#1072;:;"/>
+   <l:gentext key="TableNotes" text="&#1055;&#1088;&#1080;&#1084;&#1110;&#1090;&#1082;&#1080;"/>
+   <l:gentext key="tablenotes" text="&#1087;&#1088;&#1080;&#1084;&#1110;&#1090;&#1082;&#1080;"/>
+   <l:gentext key="TableofContents" text="&#1047;&#1084;&#1110;&#1089;&#1090;"/>
+   <l:gentext key="tableofcontents" text="&#1079;&#1084;&#1110;&#1089;&#1090;"/>
+   <l:gentext key="the" text=""/>
+   <l:gentext key="unexpectedelementname" text="unexpected element name"/>
+   <l:gentext key="unsupported" text="unsupported"/>
+   <l:gentext key="xrefto" text="xref to"/>
+   <l:gentext key="listofequations" text="&#1089;&#1087;&#1080;&#1089;&#1086;&#1082; &#1092;&#1086;&#1088;&#1084;&#1091;&#1083;"/>
+   <l:gentext key="ListofEquations" text="&#1057;&#1087;&#1080;&#1089;&#1086;&#1082; &#1092;&#1086;&#1088;&#1084;&#1091;&#1083;"/>
+   <l:gentext key="ListofExamples" text="&#1057;&#1087;&#1080;&#1089;&#1086;&#1082; &#1087;&#1088;&#1080;&#1082;&#1083;&#1072;&#1076;&#1110;&#1074;"/>
+   <l:gentext key="listofexamples" text="&#1089;&#1087;&#1080;&#1089;&#1086;&#1082; &#1087;&#1088;&#1080;&#1082;&#1083;&#1072;&#1076;&#1110;&#1074;"/>
+   <l:gentext key="ListofFigures" text="&#1057;&#1087;&#1080;&#1089;&#1086;&#1082; &#1110;&#1083;&#1102;&#1089;&#1090;&#1088;&#1072;&#1094;&#1110;&#1081;"/>
+   <l:gentext key="listoffigures" text="&#1057;&#1087;&#1080;&#1089;&#1086;&#1082; &#1110;&#1083;&#1102;&#1089;&#1090;&#1088;&#1072;&#1094;&#1110;&#1081;"/>
+   <l:gentext key="ListofProcedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listofprocedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listoftables" text="&#1089;&#1087;&#1080;&#1089;&#1086;&#1082; &#1090;&#1072;&#1073;&#1083;&#1080;&#1094;&#1100;"/>
+   <l:gentext key="ListofTables" text="&#1057;&#1087;&#1080;&#1089;&#1086;&#1082; &#1090;&#1072;&#1073;&#1083;&#1080;&#1094;;&#1100;"/>
+   <l:gentext key="ListofUnknown" text="&#1053;&#1077;&#1074;&#1080;&#1079;&#1085;&#1072;&#1095;&#1077;&#1085;&#1080;&#1081; &#1089;&#1087;&#1080;&#1089;&#1086;&#1082;"/>
+   <l:gentext key="listofunknown" text="&#1085;&#1077;&#1074;&#1080;&#1079;&#1085;&#1072;&#1095;&#1077;&#1085;&#1080;&#1081; &#1089;&#1087;&#1080;&#1089;&#1086;&#1082;"/>
+   <l:gentext key="nav-home" text="&#1055;&#1086;&#1095;&#1072;&#1090;&#1086;&#1082;"/>
+   <l:gentext key="nav-next" text="&#1076;&#1072;&#1083;&#1110;"/>
+   <l:gentext key="nav-next-sibling" text="&#1076;&#1072;&#1083;&#1110; &#1087;&#1086; &#1088;&#1110;&#1074;&#1085;&#1102;"/>
+   <l:gentext key="nav-prev" text="&#1085;&#1072;&#1079;&#1072;&#1076;"/>
+   <l:gentext key="nav-prev-sibling" text="&#1085;&#1072;&#1079;&#1072;&#1076; &#1087;&#1086; &#1088;&#1110;&#1074;&#1085;&#1102;"/>
+   <l:gentext key="nav-up" text="&#1044;&#1086;&#1075;&#1086;&#1088;&#1080;"/>
+   <l:gentext key="nav-toc" text="ToC" lang="en"/>
+   <l:gentext key="Draft" text="Draft"/>
+   <l:gentext key="above" text="above"/>
+   <l:gentext key="below" text="below"/>
+   <l:gentext key="sectioncalled" text="the section called"/>
+   <l:gentext key="index symbols" text="Symbols"/>
+   <l:gentext key="lowercase.alpha" text="abcdefghijklmnopqrstuvwxyz"/>
+   <l:gentext key="uppercase.alpha" text="ABCDEFGHIJKLMNOPQRSTUVWXYZ"/>
+   <l:dingbat key="startquote" text="&#8220;"/>
+   <l:dingbat key="endquote" text="&#8221;"/>
+   <l:dingbat key="nestedstartquote" text="&#8216;"/>
+   <l:dingbat key="nestedendquote" text="&#8217;"/>
+   <l:dingbat key="singlestartquote" text="&#8216;" lang="en"/>
+   <l:dingbat key="singleendquote" text="&#8217;" lang="en"/>
+   <l:dingbat key="bullet" text="&#8226;"/>
+   <l:gentext key="hyphenation-character" text="-" lang="en"/>
+   <l:gentext key="hyphenation-push-character-count" text="2" lang="en"/>
+   <l:gentext key="hyphenation-remain-character-count" text="2" lang="en"/>
+
+   <l:context name="styles">
+      <l:template name="person-name" text="first-last"/>
+   </l:context>
+
+   <l:context name="title">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="%t"/>
+      <l:template name="appendix" text="&#1044;&#1086;&#1076;&#1072;&#1090;&#1086;&#1082; %n. %t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="biblioentry" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliolist" text="%t" lang="en"/>
+      <l:template name="bibliomixed" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="&#1056;&#1086;&#1079;&#1076;&#1110;&#1083; %n. %t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="&#1060;&#1086;&#1088;&#1084;&#1091;&#1083;&#1072; %n. %t"/>
+      <l:template name="example" text="&#1055;&#1088;&#1080;&#1082;&#1083;&#1072;&#1076; %n. %t"/>
+      <l:template name="figure" text="&#1056;&#1080;&#1089;&#1091;&#1085;&#1086;&#1082; %n. %t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="glosslist" text="%t" lang="en"/>
+      <l:template name="glossentry" text="%t" lang="en"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text=""/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="&#1063;&#1072;&#1089;&#1090;&#1080;&#1085;&#1072; %n. %t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="procedure.formal" text="&#1055;&#1088;&#1086;&#1094;&#1077;&#1076;&#1091;&#1088;&#1072;&#160;%n.&#160;%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="productionset.formal" text="Production&#160;%n"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="%t"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="%t"/>
+      <l:template name="refentry" text="%t"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsection" text="%t"/>
+      <l:template name="refsect1" text="%t"/>
+      <l:template name="refsect2" text="%t"/>
+      <l:template name="refsect3" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="refsynopsisdivinfo" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="step" text="%t"/>
+      <l:template name="table" text="&#1058;&#1072;&#1073;&#1083;&#1080;&#1094;&#1103; %n. %t"/>
+      <l:template name="task" text="%t" lang="en"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="" lang="en"/>
+      <l:template name="warning" text="%t"/>
+   </l:context>
+
+   <l:context name="title-unnumbered">
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article/appendix" text="%t" lang="en"/>
+      <l:template name="bridgehead" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="sect1" text="%t"/>
+      <l:template name="sect2" text="%t"/>
+      <l:template name="sect3" text="%t"/>
+      <l:template name="sect4" text="%t"/>
+      <l:template name="sect5" text="%t"/>
+      <l:template name="section" text="%t"/>
+      <l:template name="simplesect" text="%t"/>
+   </l:context>
+
+   <l:context name="title-numbered">
+      <l:template name="appendix" text="&#1044;&#1086;&#1076;&#1072;&#1090;&#1086;&#1082; %n. %t"/>
+      <l:template name="article/appendix" text="%n.&#160;%t" lang="en"/>
+      <l:template name="bridgehead" text="%t"/>
+      <l:template name="chapter" text="&#1056;&#1086;&#1079;&#1076;&#1110;&#1083; %n. %t"/>
+      <l:template name="sect1" text="%n. %t"/>
+      <l:template name="sect2" text="%n. %t"/>
+      <l:template name="sect3" text="%n. %t"/>
+      <l:template name="sect4" text="%n. %t"/>
+      <l:template name="sect5" text="%n. %t"/>
+      <l:template name="section" text="%n. %t"/>
+      <l:template name="simplesect" text="%n. %t"/>
+   </l:context>
+
+   <l:context name="subtitle">
+      <l:template name="appendix" text="%s"/>
+      <l:template name="article" text="%s"/>
+      <l:template name="bibliodiv" text="%s"/>
+      <l:template name="biblioentry" text="%s"/>
+      <l:template name="bibliography" text="%s"/>
+      <l:template name="bibliomixed" text="%s"/>
+      <l:template name="bibliomset" text="%s"/>
+      <l:template name="biblioset" text="%s"/>
+      <l:template name="book" text="%s"/>
+      <l:template name="chapter" text="%s"/>
+      <l:template name="colophon" text="%s"/>
+      <l:template name="dedication" text="%s"/>
+      <l:template name="glossary" text="%s"/>
+      <l:template name="glossdiv" text="%s"/>
+      <l:template name="index" text="%s"/>
+      <l:template name="indexdiv" text="%s"/>
+      <l:template name="lot" text="%s"/>
+      <l:template name="part" text="%s"/>
+      <l:template name="partintro" text="%s"/>
+      <l:template name="preface" text="%s"/>
+      <l:template name="refentry" text="%s"/>
+      <l:template name="reference" text="%s"/>
+      <l:template name="refsection" text="%s"/>
+      <l:template name="refsect1" text="%s"/>
+      <l:template name="refsect2" text="%s"/>
+      <l:template name="refsect3" text="%s"/>
+      <l:template name="refsynopsisdiv" text="%s"/>
+      <l:template name="sect1" text="%s"/>
+      <l:template name="sect2" text="%s"/>
+      <l:template name="sect3" text="%s"/>
+      <l:template name="sect4" text="%s"/>
+      <l:template name="sect5" text="%s"/>
+      <l:template name="section" text="%s"/>
+      <l:template name="set" text="%s"/>
+      <l:template name="setindex" text="%s"/>
+      <l:template name="sidebar" text="%s"/>
+      <l:template name="simplesect" text="%s"/>
+      <l:template name="toc" text="%s"/>
+   </l:context>
+
+   <l:context name="xref">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="&#1042;:&#160;%n"/>
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="constraintdef" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="%t"/>
+      <l:template name="example" text="%t"/>
+      <l:template name="figure" text="%t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text="%n"/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="%t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="&#1055;&#160;%n"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="&#1055;&#160;%n"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="table" text="%t"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="%n"/>
+      <l:template name="warning" text="%t"/>
+      <l:template name="page.citation" text=" [%p]"/>
+      <l:template name="page" text="(page %p)" lang="en"/>
+      <l:template name="pageabbrev" text="(p. %p)" lang="en"/>
+      <l:template name="Page" text="Page %p" lang="en"/>
+      <l:template name="bridgehead" text="&#8220;%t&#8221;"/>
+      <l:template name="refsection" text="&#8220;%t&#8221;"/>
+      <l:template name="refsect1" text="&#8220;%t&#8221;"/>
+      <l:template name="refsect2" text="&#8220;%t&#8221;"/>
+      <l:template name="refsect3" text="&#8220;%t&#8221;"/>
+      <l:template name="sect1" text="&#8220;%t&#8221;"/>
+      <l:template name="sect2" text="&#8220;%t&#8221;"/>
+      <l:template name="sect3" text="&#8220;%t&#8221;"/>
+      <l:template name="sect4" text="&#8220;%t&#8221;"/>
+      <l:template name="sect5" text="&#8220;%t&#8221;"/>
+      <l:template name="section" text="&#8220;%t&#8221;"/>
+      <l:template name="simplesect" text="&#8220;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="xref-number">
+      <l:template name="answer" text="&#1042;:&#160;%n"/>
+      <l:template name="appendix" text="&#1044;&#1086;&#1076;&#1072;&#1090;&#1086;&#1082;&#160;%n"/>
+      <l:template name="bridgehead" text="&#1055;&#1072;&#1088;&#1072;&#1075;&#1088;&#1072;&#1092;&#160;%n"/>
+      <l:template name="chapter" text="&#1056;&#1086;&#1079;&#1076;&#1110;&#1083;&#160;%n"/>
+      <l:template name="equation" text="&#1060;&#1086;&#1088;&#1084;&#1091;&#1083;&#1072;&#160;%n"/>
+      <l:template name="example" text="&#1055;&#1088;&#1080;&#1082;&#1083;&#1072;&#1076;&#160;%n"/>
+      <l:template name="figure" text="&#1056;&#1080;&#1089;&#1091;&#1085;&#1086;&#1082;&#160;%n"/>
+      <l:template name="part" text="&#1063;&#1072;&#1089;&#1090;&#1080;&#1085;&#1072;&#160;%n"/>
+      <l:template name="procedure" text="&#1055;&#1088;&#1086;&#1094;&#1077;&#1076;&#1091;&#1088;&#1072;&#160;%n"/>
+      <l:template name="productionset" text="Production&#160;%n"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n"/>
+      <l:template name="qandaentry" text="&#1055;&#160;%n"/>
+      <l:template name="question" text="&#1055;&#160;%n"/>
+      <l:template name="sect1" text="&#1055;&#1072;&#1088;&#1072;&#1075;&#1088;&#1072;&#1092;&#160;%n"/>
+      <l:template name="sect2" text="&#1055;&#1072;&#1088;&#1072;&#1075;&#1088;&#1072;&#1092;&#160;%n"/>
+      <l:template name="sect3" text="&#1055;&#1072;&#1088;&#1072;&#1075;&#1088;&#1072;&#1092;&#160;%n"/>
+      <l:template name="sect4" text="&#1055;&#1072;&#1088;&#1072;&#1075;&#1088;&#1072;&#1092;&#160;%n"/>
+      <l:template name="sect5" text="&#1055;&#1072;&#1088;&#1072;&#1075;&#1088;&#1072;&#1092;&#160;%n"/>
+      <l:template name="section" text="&#1055;&#1072;&#1088;&#1072;&#1075;&#1088;&#1072;&#1092;&#160;%n"/>
+      <l:template name="table" text="&#1058;&#1072;&#1073;&#1083;&#1080;&#1094;&#1103;&#160;%n"/>
+   </l:context>
+
+   <l:context name="xref-number-and-title">
+      <l:template name="appendix" text="&#1044;&#1086;&#1076;&#1072;&#1090;&#1086;&#1082;&#160;%n, %t"/>
+      <l:template name="bridgehead" text="&#1055;&#1072;&#1088;&#1072;&#1075;&#1088;&#1072;&#1092;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="chapter" text="&#1056;&#1086;&#1079;&#1076;&#1110;&#1083;&#160;%n, %t"/>
+      <l:template name="equation" text="&#1060;&#1086;&#1088;&#1084;&#1091;&#1083;&#1072;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="example" text="&#1055;&#1088;&#1080;&#1082;&#1083;&#1072;&#1076;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="figure" text="&#1056;&#1080;&#1089;&#1091;&#1085;&#1086;&#1082;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="part" text="&#1063;&#1072;&#1089;&#1090;&#1080;&#1085;&#1072;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="procedure" text="&#1055;&#1088;&#1086;&#1094;&#1077;&#1076;&#1091;&#1088;&#1072;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="productionset" text="Production&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="refsect1" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="refsect2" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="refsect3" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="refsection" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="sect1" text="&#1055;&#1072;&#1088;&#1072;&#1075;&#1088;&#1072;&#1092;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect2" text="&#1055;&#1072;&#1088;&#1072;&#1075;&#1088;&#1072;&#1092;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect3" text="&#1055;&#1072;&#1088;&#1072;&#1075;&#1088;&#1072;&#1092;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect4" text="&#1055;&#1072;&#1088;&#1072;&#1075;&#1088;&#1072;&#1092;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect5" text="&#1055;&#1072;&#1088;&#1072;&#1075;&#1088;&#1072;&#1092;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="section" text="&#1055;&#1072;&#1088;&#1072;&#1075;&#1088;&#1072;&#1092;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="simplesect" text="the section called &#8220;%t&#8221;"/>
+      <l:template name="table" text="&#1058;&#1072;&#1073;&#1083;&#1080;&#1094;&#1103;&#160;%n, &#8220;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="authorgroup">
+      <l:template name="sep" text=", "/>
+      <l:template name="sep2" text="  "/>
+      <l:template name="seplast" text=".  "/>
+   </l:context>
+
+   <l:context name="glossary">
+      <l:template name="see" text="&#1044;&#1080;&#1074;. "/>
+      <l:template name="seealso" text="&#1044;&#1080;&#1074;. &#1090;&#1072;&#1082;&#1086;&#1078; "/>
+   </l:context>
+
+   <l:context name="msgset">
+      <l:template name="MsgAud" text="&#1040;&#1091;&#1076;&#1080;&#1090;&#1086;&#1088;&#1110;&#1103;: "/>
+      <l:template name="MsgLevel" text="&#1056;&#1110;&#1074;&#1077;&#1085;&#1100;: "/>
+      <l:template name="MsgOrig" text="&#1044;&#1078;&#1077;&#1088;&#1077;&#1083;&#1086;: "/>
+   </l:context>
+
+   <l:context name="datetime">
+      <l:template name="format" text="m/d/Y" lang="en"/>
+   </l:context>
+
+   <l:context name="datetime-full">
+      <l:template name="January" text="January" lang="en"/>
+      <l:template name="February" text="February" lang="en"/>
+      <l:template name="March" text="March" lang="en"/>
+      <l:template name="April" text="April" lang="en"/>
+      <l:template name="May" text="May" lang="en"/>
+      <l:template name="June" text="June" lang="en"/>
+      <l:template name="July" text="July" lang="en"/>
+      <l:template name="August" text="August" lang="en"/>
+      <l:template name="September" text="September" lang="en"/>
+      <l:template name="October" text="October" lang="en"/>
+      <l:template name="November" text="November" lang="en"/>
+      <l:template name="December" text="December" lang="en"/>
+      <l:template name="Monday" text="Monday" lang="en"/>
+      <l:template name="Tuesday" text="Tuesday" lang="en"/>
+      <l:template name="Wednesday" text="Wednesday" lang="en"/>
+      <l:template name="Thursday" text="Thursday" lang="en"/>
+      <l:template name="Friday" text="Friday" lang="en"/>
+      <l:template name="Saturday" text="Saturday" lang="en"/>
+      <l:template name="Sunday" text="Sunday" lang="en"/>
+   </l:context>
+
+   <l:context name="datetime-abbrev">
+      <l:template name="Jan" text="Jan" lang="en"/>
+      <l:template name="Feb" text="Feb" lang="en"/>
+      <l:template name="Mar" text="Mar" lang="en"/>
+      <l:template name="Apr" text="Apr" lang="en"/>
+      <l:template name="May" text="May" lang="en"/>
+      <l:template name="Jun" text="Jun" lang="en"/>
+      <l:template name="Jul" text="Jul" lang="en"/>
+      <l:template name="Aug" text="Aug" lang="en"/>
+      <l:template name="Sep" text="Sep" lang="en"/>
+      <l:template name="Oct" text="Oct" lang="en"/>
+      <l:template name="Nov" text="Nov" lang="en"/>
+      <l:template name="Dec" text="Dec" lang="en"/>
+      <l:template name="Mon" text="Mon" lang="en"/>
+      <l:template name="Tue" text="Tue" lang="en"/>
+      <l:template name="Wed" text="Wed" lang="en"/>
+      <l:template name="Thu" text="Thu" lang="en"/>
+      <l:template name="Fri" text="Fri" lang="en"/>
+      <l:template name="Sat" text="Sat" lang="en"/>
+      <l:template name="Sun" text="Sun" lang="en"/>
+   </l:context>
+
+   <l:context name="htmlhelp">
+      <l:template name="langcode" text="0x0422 Ukrainian"/>
+   </l:context>
+
+   <l:letters lang="en">
+      <l:l i="-1"/>
+      <l:l i="0">Symbols</l:l>
+      <l:l i="10">A</l:l>
+      <l:l i="10">a</l:l>
+      <l:l i="10">&#192;</l:l>
+      <l:l i="10">&#224;</l:l>
+      <l:l i="10">&#193;</l:l>
+      <l:l i="10">&#225;</l:l>
+      <l:l i="10">&#194;</l:l>
+      <l:l i="10">&#226;</l:l>
+      <l:l i="10">&#195;</l:l>
+      <l:l i="10">&#227;</l:l>
+      <l:l i="10">&#196;</l:l>
+      <l:l i="10">&#228;</l:l>
+      <l:l i="10">&#197;</l:l>
+      <l:l i="10">&#229;</l:l>
+      <l:l i="10">&#256;</l:l>
+      <l:l i="10">&#257;</l:l>
+      <l:l i="10">&#258;</l:l>
+      <l:l i="10">&#259;</l:l>
+      <l:l i="10">&#260;</l:l>
+      <l:l i="10">&#261;</l:l>
+      <l:l i="10">&#461;</l:l>
+      <l:l i="10">&#462;</l:l>
+      <l:l i="10">&#478;</l:l>
+      <l:l i="10">&#479;</l:l>
+      <l:l i="10">&#480;</l:l>
+      <l:l i="10">&#481;</l:l>
+      <l:l i="10">&#506;</l:l>
+      <l:l i="10">&#507;</l:l>
+      <l:l i="10">&#512;</l:l>
+      <l:l i="10">&#513;</l:l>
+      <l:l i="10">&#514;</l:l>
+      <l:l i="10">&#515;</l:l>
+      <l:l i="10">&#550;</l:l>
+      <l:l i="10">&#551;</l:l>
+      <l:l i="10">&#7680;</l:l>
+      <l:l i="10">&#7681;</l:l>
+      <l:l i="10">&#7834;</l:l>
+      <l:l i="10">&#7840;</l:l>
+      <l:l i="10">&#7841;</l:l>
+      <l:l i="10">&#7842;</l:l>
+      <l:l i="10">&#7843;</l:l>
+      <l:l i="10">&#7844;</l:l>
+      <l:l i="10">&#7845;</l:l>
+      <l:l i="10">&#7846;</l:l>
+      <l:l i="10">&#7847;</l:l>
+      <l:l i="10">&#7848;</l:l>
+      <l:l i="10">&#7849;</l:l>
+      <l:l i="10">&#7850;</l:l>
+      <l:l i="10">&#7851;</l:l>
+      <l:l i="10">&#7852;</l:l>
+      <l:l i="10">&#7853;</l:l>
+      <l:l i="10">&#7854;</l:l>
+      <l:l i="10">&#7855;</l:l>
+      <l:l i="10">&#7856;</l:l>
+      <l:l i="10">&#7857;</l:l>
+      <l:l i="10">&#7858;</l:l>
+      <l:l i="10">&#7859;</l:l>
+      <l:l i="10">&#7860;</l:l>
+      <l:l i="10">&#7861;</l:l>
+      <l:l i="10">&#7862;</l:l>
+      <l:l i="10">&#7863;</l:l>
+      <l:l i="20">B</l:l>
+      <l:l i="20">b</l:l>
+      <l:l i="20">&#384;</l:l>
+      <l:l i="20">&#385;</l:l>
+      <l:l i="20">&#595;</l:l>
+      <l:l i="20">&#386;</l:l>
+      <l:l i="20">&#387;</l:l>
+      <l:l i="20">&#7682;</l:l>
+      <l:l i="20">&#7683;</l:l>
+      <l:l i="20">&#7684;</l:l>
+      <l:l i="20">&#7685;</l:l>
+      <l:l i="20">&#7686;</l:l>
+      <l:l i="20">&#7687;</l:l>
+      <l:l i="30">C</l:l>
+      <l:l i="30">c</l:l>
+      <l:l i="30">&#199;</l:l>
+      <l:l i="30">&#231;</l:l>
+      <l:l i="30">&#262;</l:l>
+      <l:l i="30">&#263;</l:l>
+      <l:l i="30">&#264;</l:l>
+      <l:l i="30">&#265;</l:l>
+      <l:l i="30">&#266;</l:l>
+      <l:l i="30">&#267;</l:l>
+      <l:l i="30">&#268;</l:l>
+      <l:l i="30">&#269;</l:l>
+      <l:l i="30">&#391;</l:l>
+      <l:l i="30">&#392;</l:l>
+      <l:l i="30">&#597;</l:l>
+      <l:l i="30">&#7688;</l:l>
+      <l:l i="30">&#7689;</l:l>
+      <l:l i="40">D</l:l>
+      <l:l i="40">d</l:l>
+      <l:l i="40">&#270;</l:l>
+      <l:l i="40">&#271;</l:l>
+      <l:l i="40">&#272;</l:l>
+      <l:l i="40">&#273;</l:l>
+      <l:l i="40">&#394;</l:l>
+      <l:l i="40">&#599;</l:l>
+      <l:l i="40">&#395;</l:l>
+      <l:l i="40">&#396;</l:l>
+      <l:l i="40">&#453;</l:l>
+      <l:l i="40">&#498;</l:l>
+      <l:l i="40">&#545;</l:l>
+      <l:l i="40">&#598;</l:l>
+      <l:l i="40">&#7690;</l:l>
+      <l:l i="40">&#7691;</l:l>
+      <l:l i="40">&#7692;</l:l>
+      <l:l i="40">&#7693;</l:l>
+      <l:l i="40">&#7694;</l:l>
+      <l:l i="40">&#7695;</l:l>
+      <l:l i="40">&#7696;</l:l>
+      <l:l i="40">&#7697;</l:l>
+      <l:l i="40">&#7698;</l:l>
+      <l:l i="40">&#7699;</l:l>
+      <l:l i="50">E</l:l>
+      <l:l i="50">e</l:l>
+      <l:l i="50">&#200;</l:l>
+      <l:l i="50">&#232;</l:l>
+      <l:l i="50">&#201;</l:l>
+      <l:l i="50">&#233;</l:l>
+      <l:l i="50">&#202;</l:l>
+      <l:l i="50">&#234;</l:l>
+      <l:l i="50">&#203;</l:l>
+      <l:l i="50">&#235;</l:l>
+      <l:l i="50">&#274;</l:l>
+      <l:l i="50">&#275;</l:l>
+      <l:l i="50">&#276;</l:l>
+      <l:l i="50">&#277;</l:l>
+      <l:l i="50">&#278;</l:l>
+      <l:l i="50">&#279;</l:l>
+      <l:l i="50">&#280;</l:l>
+      <l:l i="50">&#281;</l:l>
+      <l:l i="50">&#282;</l:l>
+      <l:l i="50">&#283;</l:l>
+      <l:l i="50">&#516;</l:l>
+      <l:l i="50">&#517;</l:l>
+      <l:l i="50">&#518;</l:l>
+      <l:l i="50">&#519;</l:l>
+      <l:l i="50">&#552;</l:l>
+      <l:l i="50">&#553;</l:l>
+      <l:l i="50">&#7700;</l:l>
+      <l:l i="50">&#7701;</l:l>
+      <l:l i="50">&#7702;</l:l>
+      <l:l i="50">&#7703;</l:l>
+      <l:l i="50">&#7704;</l:l>
+      <l:l i="50">&#7705;</l:l>
+      <l:l i="50">&#7706;</l:l>
+      <l:l i="50">&#7707;</l:l>
+      <l:l i="50">&#7708;</l:l>
+      <l:l i="50">&#7709;</l:l>
+      <l:l i="50">&#7864;</l:l>
+      <l:l i="50">&#7865;</l:l>
+      <l:l i="50">&#7866;</l:l>
+      <l:l i="50">&#7867;</l:l>
+      <l:l i="50">&#7868;</l:l>
+      <l:l i="50">&#7869;</l:l>
+      <l:l i="50">&#7870;</l:l>
+      <l:l i="50">&#7871;</l:l>
+      <l:l i="50">&#7872;</l:l>
+      <l:l i="50">&#7873;</l:l>
+      <l:l i="50">&#7874;</l:l>
+      <l:l i="50">&#7875;</l:l>
+      <l:l i="50">&#7876;</l:l>
+      <l:l i="50">&#7877;</l:l>
+      <l:l i="50">&#7878;</l:l>
+      <l:l i="50">&#7879;</l:l>
+      <l:l i="60">F</l:l>
+      <l:l i="60">f</l:l>
+      <l:l i="60">&#401;</l:l>
+      <l:l i="60">&#402;</l:l>
+      <l:l i="60">&#7710;</l:l>
+      <l:l i="60">&#7711;</l:l>
+      <l:l i="70">G</l:l>
+      <l:l i="70">g</l:l>
+      <l:l i="70">&#284;</l:l>
+      <l:l i="70">&#285;</l:l>
+      <l:l i="70">&#286;</l:l>
+      <l:l i="70">&#287;</l:l>
+      <l:l i="70">&#288;</l:l>
+      <l:l i="70">&#289;</l:l>
+      <l:l i="70">&#290;</l:l>
+      <l:l i="70">&#291;</l:l>
+      <l:l i="70">&#403;</l:l>
+      <l:l i="70">&#608;</l:l>
+      <l:l i="70">&#484;</l:l>
+      <l:l i="70">&#485;</l:l>
+      <l:l i="70">&#486;</l:l>
+      <l:l i="70">&#487;</l:l>
+      <l:l i="70">&#500;</l:l>
+      <l:l i="70">&#501;</l:l>
+      <l:l i="70">&#7712;</l:l>
+      <l:l i="70">&#7713;</l:l>
+      <l:l i="80">H</l:l>
+      <l:l i="80">h</l:l>
+      <l:l i="80">&#292;</l:l>
+      <l:l i="80">&#293;</l:l>
+      <l:l i="80">&#294;</l:l>
+      <l:l i="80">&#295;</l:l>
+      <l:l i="80">&#542;</l:l>
+      <l:l i="80">&#543;</l:l>
+      <l:l i="80">&#614;</l:l>
+      <l:l i="80">&#7714;</l:l>
+      <l:l i="80">&#7715;</l:l>
+      <l:l i="80">&#7716;</l:l>
+      <l:l i="80">&#7717;</l:l>
+      <l:l i="80">&#7718;</l:l>
+      <l:l i="80">&#7719;</l:l>
+      <l:l i="80">&#7720;</l:l>
+      <l:l i="80">&#7721;</l:l>
+      <l:l i="80">&#7722;</l:l>
+      <l:l i="80">&#7723;</l:l>
+      <l:l i="80">&#7830;</l:l>
+      <l:l i="90">I</l:l>
+      <l:l i="90">i</l:l>
+      <l:l i="90">&#204;</l:l>
+      <l:l i="90">&#236;</l:l>
+      <l:l i="90">&#205;</l:l>
+      <l:l i="90">&#237;</l:l>
+      <l:l i="90">&#206;</l:l>
+      <l:l i="90">&#238;</l:l>
+      <l:l i="90">&#207;</l:l>
+      <l:l i="90">&#239;</l:l>
+      <l:l i="90">&#296;</l:l>
+      <l:l i="90">&#297;</l:l>
+      <l:l i="90">&#298;</l:l>
+      <l:l i="90">&#299;</l:l>
+      <l:l i="90">&#300;</l:l>
+      <l:l i="90">&#301;</l:l>
+      <l:l i="90">&#302;</l:l>
+      <l:l i="90">&#303;</l:l>
+      <l:l i="90">&#304;</l:l>
+      <l:l i="90">&#407;</l:l>
+      <l:l i="90">&#616;</l:l>
+      <l:l i="90">&#463;</l:l>
+      <l:l i="90">&#464;</l:l>
+      <l:l i="90">&#520;</l:l>
+      <l:l i="90">&#521;</l:l>
+      <l:l i="90">&#522;</l:l>
+      <l:l i="90">&#523;</l:l>
+      <l:l i="90">&#7724;</l:l>
+      <l:l i="90">&#7725;</l:l>
+      <l:l i="90">&#7726;</l:l>
+      <l:l i="90">&#7727;</l:l>
+      <l:l i="90">&#7880;</l:l>
+      <l:l i="90">&#7881;</l:l>
+      <l:l i="90">&#7882;</l:l>
+      <l:l i="90">&#7883;</l:l>
+      <l:l i="100">J</l:l>
+      <l:l i="100">j</l:l>
+      <l:l i="100">&#308;</l:l>
+      <l:l i="100">&#309;</l:l>
+      <l:l i="100">&#496;</l:l>
+      <l:l i="100">&#669;</l:l>
+      <l:l i="110">K</l:l>
+      <l:l i="110">k</l:l>
+      <l:l i="110">&#310;</l:l>
+      <l:l i="110">&#311;</l:l>
+      <l:l i="110">&#408;</l:l>
+      <l:l i="110">&#409;</l:l>
+      <l:l i="110">&#488;</l:l>
+      <l:l i="110">&#489;</l:l>
+      <l:l i="110">&#7728;</l:l>
+      <l:l i="110">&#7729;</l:l>
+      <l:l i="110">&#7730;</l:l>
+      <l:l i="110">&#7731;</l:l>
+      <l:l i="110">&#7732;</l:l>
+      <l:l i="110">&#7733;</l:l>
+      <l:l i="120">L</l:l>
+      <l:l i="120">l</l:l>
+      <l:l i="120">&#313;</l:l>
+      <l:l i="120">&#314;</l:l>
+      <l:l i="120">&#315;</l:l>
+      <l:l i="120">&#316;</l:l>
+      <l:l i="120">&#317;</l:l>
+      <l:l i="120">&#318;</l:l>
+      <l:l i="120">&#319;</l:l>
+      <l:l i="120">&#320;</l:l>
+      <l:l i="120">&#321;</l:l>
+      <l:l i="120">&#322;</l:l>
+      <l:l i="120">&#410;</l:l>
+      <l:l i="120">&#456;</l:l>
+      <l:l i="120">&#564;</l:l>
+      <l:l i="120">&#619;</l:l>
+      <l:l i="120">&#620;</l:l>
+      <l:l i="120">&#621;</l:l>
+      <l:l i="120">&#7734;</l:l>
+      <l:l i="120">&#7735;</l:l>
+      <l:l i="120">&#7736;</l:l>
+      <l:l i="120">&#7737;</l:l>
+      <l:l i="120">&#7738;</l:l>
+      <l:l i="120">&#7739;</l:l>
+      <l:l i="120">&#7740;</l:l>
+      <l:l i="120">&#7741;</l:l>
+      <l:l i="130">M</l:l>
+      <l:l i="130">m</l:l>
+      <l:l i="130">&#625;</l:l>
+      <l:l i="130">&#7742;</l:l>
+      <l:l i="130">&#7743;</l:l>
+      <l:l i="130">&#7744;</l:l>
+      <l:l i="130">&#7745;</l:l>
+      <l:l i="130">&#7746;</l:l>
+      <l:l i="130">&#7747;</l:l>
+      <l:l i="140">N</l:l>
+      <l:l i="140">n</l:l>
+      <l:l i="140">&#209;</l:l>
+      <l:l i="140">&#241;</l:l>
+      <l:l i="140">&#323;</l:l>
+      <l:l i="140">&#324;</l:l>
+      <l:l i="140">&#325;</l:l>
+      <l:l i="140">&#326;</l:l>
+      <l:l i="140">&#327;</l:l>
+      <l:l i="140">&#328;</l:l>
+      <l:l i="140">&#413;</l:l>
+      <l:l i="140">&#626;</l:l>
+      <l:l i="140">&#414;</l:l>
+      <l:l i="140">&#544;</l:l>
+      <l:l i="140">&#459;</l:l>
+      <l:l i="140">&#504;</l:l>
+      <l:l i="140">&#505;</l:l>
+      <l:l i="140">&#565;</l:l>
+      <l:l i="140">&#627;</l:l>
+      <l:l i="140">&#7748;</l:l>
+      <l:l i="140">&#7749;</l:l>
+      <l:l i="140">&#7750;</l:l>
+      <l:l i="140">&#7751;</l:l>
+      <l:l i="140">&#7752;</l:l>
+      <l:l i="140">&#7753;</l:l>
+      <l:l i="140">&#7754;</l:l>
+      <l:l i="140">&#7755;</l:l>
+      <l:l i="150">O</l:l>
+      <l:l i="150">o</l:l>
+      <l:l i="150">&#210;</l:l>
+      <l:l i="150">&#242;</l:l>
+      <l:l i="150">&#211;</l:l>
+      <l:l i="150">&#243;</l:l>
+      <l:l i="150">&#212;</l:l>
+      <l:l i="150">&#244;</l:l>
+      <l:l i="150">&#213;</l:l>
+      <l:l i="150">&#245;</l:l>
+      <l:l i="150">&#214;</l:l>
+      <l:l i="150">&#246;</l:l>
+      <l:l i="150">&#216;</l:l>
+      <l:l i="150">&#248;</l:l>
+      <l:l i="150">&#332;</l:l>
+      <l:l i="150">&#333;</l:l>
+      <l:l i="150">&#334;</l:l>
+      <l:l i="150">&#335;</l:l>
+      <l:l i="150">&#336;</l:l>
+      <l:l i="150">&#337;</l:l>
+      <l:l i="150">&#415;</l:l>
+      <l:l i="150">&#416;</l:l>
+      <l:l i="150">&#417;</l:l>
+      <l:l i="150">&#465;</l:l>
+      <l:l i="150">&#466;</l:l>
+      <l:l i="150">&#490;</l:l>
+      <l:l i="150">&#491;</l:l>
+      <l:l i="150">&#492;</l:l>
+      <l:l i="150">&#493;</l:l>
+      <l:l i="150">&#510;</l:l>
+      <l:l i="150">&#511;</l:l>
+      <l:l i="150">&#524;</l:l>
+      <l:l i="150">&#525;</l:l>
+      <l:l i="150">&#526;</l:l>
+      <l:l i="150">&#527;</l:l>
+      <l:l i="150">&#554;</l:l>
+      <l:l i="150">&#555;</l:l>
+      <l:l i="150">&#556;</l:l>
+      <l:l i="150">&#557;</l:l>
+      <l:l i="150">&#558;</l:l>
+      <l:l i="150">&#559;</l:l>
+      <l:l i="150">&#560;</l:l>
+      <l:l i="150">&#561;</l:l>
+      <l:l i="150">&#7756;</l:l>
+      <l:l i="150">&#7757;</l:l>
+      <l:l i="150">&#7758;</l:l>
+      <l:l i="150">&#7759;</l:l>
+      <l:l i="150">&#7760;</l:l>
+      <l:l i="150">&#7761;</l:l>
+      <l:l i="150">&#7762;</l:l>
+      <l:l i="150">&#7763;</l:l>
+      <l:l i="150">&#7884;</l:l>
+      <l:l i="150">&#7885;</l:l>
+      <l:l i="150">&#7886;</l:l>
+      <l:l i="150">&#7887;</l:l>
+      <l:l i="150">&#7888;</l:l>
+      <l:l i="150">&#7889;</l:l>
+      <l:l i="150">&#7890;</l:l>
+      <l:l i="150">&#7891;</l:l>
+      <l:l i="150">&#7892;</l:l>
+      <l:l i="150">&#7893;</l:l>
+      <l:l i="150">&#7894;</l:l>
+      <l:l i="150">&#7895;</l:l>
+      <l:l i="150">&#7896;</l:l>
+      <l:l i="150">&#7897;</l:l>
+      <l:l i="150">&#7898;</l:l>
+      <l:l i="150">&#7899;</l:l>
+      <l:l i="150">&#7900;</l:l>
+      <l:l i="150">&#7901;</l:l>
+      <l:l i="150">&#7902;</l:l>
+      <l:l i="150">&#7903;</l:l>
+      <l:l i="150">&#7904;</l:l>
+      <l:l i="150">&#7905;</l:l>
+      <l:l i="150">&#7906;</l:l>
+      <l:l i="150">&#7907;</l:l>
+      <l:l i="160">P</l:l>
+      <l:l i="160">p</l:l>
+      <l:l i="160">&#420;</l:l>
+      <l:l i="160">&#421;</l:l>
+      <l:l i="160">&#7764;</l:l>
+      <l:l i="160">&#7765;</l:l>
+      <l:l i="160">&#7766;</l:l>
+      <l:l i="160">&#7767;</l:l>
+      <l:l i="170">Q</l:l>
+      <l:l i="170">q</l:l>
+      <l:l i="170">&#672;</l:l>
+      <l:l i="180">R</l:l>
+      <l:l i="180">r</l:l>
+      <l:l i="180">&#340;</l:l>
+      <l:l i="180">&#341;</l:l>
+      <l:l i="180">&#342;</l:l>
+      <l:l i="180">&#343;</l:l>
+      <l:l i="180">&#344;</l:l>
+      <l:l i="180">&#345;</l:l>
+      <l:l i="180">&#528;</l:l>
+      <l:l i="180">&#529;</l:l>
+      <l:l i="180">&#530;</l:l>
+      <l:l i="180">&#531;</l:l>
+      <l:l i="180">&#636;</l:l>
+      <l:l i="180">&#637;</l:l>
+      <l:l i="180">&#638;</l:l>
+      <l:l i="180">&#7768;</l:l>
+      <l:l i="180">&#7769;</l:l>
+      <l:l i="180">&#7770;</l:l>
+      <l:l i="180">&#7771;</l:l>
+      <l:l i="180">&#7772;</l:l>
+      <l:l i="180">&#7773;</l:l>
+      <l:l i="180">&#7774;</l:l>
+      <l:l i="180">&#7775;</l:l>
+      <l:l i="190">S</l:l>
+      <l:l i="190">s</l:l>
+      <l:l i="190">&#346;</l:l>
+      <l:l i="190">&#347;</l:l>
+      <l:l i="190">&#348;</l:l>
+      <l:l i="190">&#349;</l:l>
+      <l:l i="190">&#350;</l:l>
+      <l:l i="190">&#351;</l:l>
+      <l:l i="190">&#352;</l:l>
+      <l:l i="190">&#353;</l:l>
+      <l:l i="190">&#536;</l:l>
+      <l:l i="190">&#537;</l:l>
+      <l:l i="190">&#642;</l:l>
+      <l:l i="190">&#7776;</l:l>
+      <l:l i="190">&#7777;</l:l>
+      <l:l i="190">&#7778;</l:l>
+      <l:l i="190">&#7779;</l:l>
+      <l:l i="190">&#7780;</l:l>
+      <l:l i="190">&#7781;</l:l>
+      <l:l i="190">&#7782;</l:l>
+      <l:l i="190">&#7783;</l:l>
+      <l:l i="190">&#7784;</l:l>
+      <l:l i="190">&#7785;</l:l>
+      <l:l i="200">T</l:l>
+      <l:l i="200">t</l:l>
+      <l:l i="200">&#354;</l:l>
+      <l:l i="200">&#355;</l:l>
+      <l:l i="200">&#356;</l:l>
+      <l:l i="200">&#357;</l:l>
+      <l:l i="200">&#358;</l:l>
+      <l:l i="200">&#359;</l:l>
+      <l:l i="200">&#427;</l:l>
+      <l:l i="200">&#428;</l:l>
+      <l:l i="200">&#429;</l:l>
+      <l:l i="200">&#430;</l:l>
+      <l:l i="200">&#648;</l:l>
+      <l:l i="200">&#538;</l:l>
+      <l:l i="200">&#539;</l:l>
+      <l:l i="200">&#566;</l:l>
+      <l:l i="200">&#7786;</l:l>
+      <l:l i="200">&#7787;</l:l>
+      <l:l i="200">&#7788;</l:l>
+      <l:l i="200">&#7789;</l:l>
+      <l:l i="200">&#7790;</l:l>
+      <l:l i="200">&#7791;</l:l>
+      <l:l i="200">&#7792;</l:l>
+      <l:l i="200">&#7793;</l:l>
+      <l:l i="200">&#7831;</l:l>
+      <l:l i="210">U</l:l>
+      <l:l i="210">u</l:l>
+      <l:l i="210">&#217;</l:l>
+      <l:l i="210">&#249;</l:l>
+      <l:l i="210">&#218;</l:l>
+      <l:l i="210">&#250;</l:l>
+      <l:l i="210">&#219;</l:l>
+      <l:l i="210">&#251;</l:l>
+      <l:l i="210">&#220;</l:l>
+      <l:l i="210">&#252;</l:l>
+      <l:l i="210">&#360;</l:l>
+      <l:l i="210">&#361;</l:l>
+      <l:l i="210">&#362;</l:l>
+      <l:l i="210">&#363;</l:l>
+      <l:l i="210">&#364;</l:l>
+      <l:l i="210">&#365;</l:l>
+      <l:l i="210">&#366;</l:l>
+      <l:l i="210">&#367;</l:l>
+      <l:l i="210">&#368;</l:l>
+      <l:l i="210">&#369;</l:l>
+      <l:l i="210">&#370;</l:l>
+      <l:l i="210">&#371;</l:l>
+      <l:l i="210">&#431;</l:l>
+      <l:l i="210">&#432;</l:l>
+      <l:l i="210">&#467;</l:l>
+      <l:l i="210">&#468;</l:l>
+      <l:l i="210">&#469;</l:l>
+      <l:l i="210">&#470;</l:l>
+      <l:l i="210">&#471;</l:l>
+      <l:l i="210">&#472;</l:l>
+      <l:l i="210">&#473;</l:l>
+      <l:l i="210">&#474;</l:l>
+      <l:l i="210">&#475;</l:l>
+      <l:l i="210">&#476;</l:l>
+      <l:l i="210">&#532;</l:l>
+      <l:l i="210">&#533;</l:l>
+      <l:l i="210">&#534;</l:l>
+      <l:l i="210">&#535;</l:l>
+      <l:l i="210">&#7794;</l:l>
+      <l:l i="210">&#7795;</l:l>
+      <l:l i="210">&#7796;</l:l>
+      <l:l i="210">&#7797;</l:l>
+      <l:l i="210">&#7798;</l:l>
+      <l:l i="210">&#7799;</l:l>
+      <l:l i="210">&#7800;</l:l>
+      <l:l i="210">&#7801;</l:l>
+      <l:l i="210">&#7802;</l:l>
+      <l:l i="210">&#7803;</l:l>
+      <l:l i="210">&#7908;</l:l>
+      <l:l i="210">&#7909;</l:l>
+      <l:l i="210">&#7910;</l:l>
+      <l:l i="210">&#7911;</l:l>
+      <l:l i="210">&#7912;</l:l>
+      <l:l i="210">&#7913;</l:l>
+      <l:l i="210">&#7914;</l:l>
+      <l:l i="210">&#7915;</l:l>
+      <l:l i="210">&#7916;</l:l>
+      <l:l i="210">&#7917;</l:l>
+      <l:l i="210">&#7918;</l:l>
+      <l:l i="210">&#7919;</l:l>
+      <l:l i="210">&#7920;</l:l>
+      <l:l i="210">&#7921;</l:l>
+      <l:l i="220">V</l:l>
+      <l:l i="220">v</l:l>
+      <l:l i="220">&#434;</l:l>
+      <l:l i="220">&#651;</l:l>
+      <l:l i="220">&#7804;</l:l>
+      <l:l i="220">&#7805;</l:l>
+      <l:l i="220">&#7806;</l:l>
+      <l:l i="220">&#7807;</l:l>
+      <l:l i="230">W</l:l>
+      <l:l i="230">w</l:l>
+      <l:l i="230">&#372;</l:l>
+      <l:l i="230">&#373;</l:l>
+      <l:l i="230">&#7808;</l:l>
+      <l:l i="230">&#7809;</l:l>
+      <l:l i="230">&#7810;</l:l>
+      <l:l i="230">&#7811;</l:l>
+      <l:l i="230">&#7812;</l:l>
+      <l:l i="230">&#7813;</l:l>
+      <l:l i="230">&#7814;</l:l>
+      <l:l i="230">&#7815;</l:l>
+      <l:l i="230">&#7816;</l:l>
+      <l:l i="230">&#7817;</l:l>
+      <l:l i="230">&#7832;</l:l>
+      <l:l i="240">X</l:l>
+      <l:l i="240">x</l:l>
+      <l:l i="240">&#7818;</l:l>
+      <l:l i="240">&#7819;</l:l>
+      <l:l i="240">&#7820;</l:l>
+      <l:l i="240">&#7821;</l:l>
+      <l:l i="250">Y</l:l>
+      <l:l i="250">y</l:l>
+      <l:l i="250">&#221;</l:l>
+      <l:l i="250">&#253;</l:l>
+      <l:l i="250">&#255;</l:l>
+      <l:l i="250">&#376;</l:l>
+      <l:l i="250">&#374;</l:l>
+      <l:l i="250">&#375;</l:l>
+      <l:l i="250">&#435;</l:l>
+      <l:l i="250">&#436;</l:l>
+      <l:l i="250">&#562;</l:l>
+      <l:l i="250">&#563;</l:l>
+      <l:l i="250">&#7822;</l:l>
+      <l:l i="250">&#7823;</l:l>
+      <l:l i="250">&#7833;</l:l>
+      <l:l i="250">&#7922;</l:l>
+      <l:l i="250">&#7923;</l:l>
+      <l:l i="250">&#7924;</l:l>
+      <l:l i="250">&#7925;</l:l>
+      <l:l i="250">&#7926;</l:l>
+      <l:l i="250">&#7927;</l:l>
+      <l:l i="250">&#7928;</l:l>
+      <l:l i="250">&#7929;</l:l>
+      <l:l i="260">Z</l:l>
+      <l:l i="260">z</l:l>
+      <l:l i="260">&#377;</l:l>
+      <l:l i="260">&#378;</l:l>
+      <l:l i="260">&#379;</l:l>
+      <l:l i="260">&#380;</l:l>
+      <l:l i="260">&#381;</l:l>
+      <l:l i="260">&#382;</l:l>
+      <l:l i="260">&#437;</l:l>
+      <l:l i="260">&#438;</l:l>
+      <l:l i="260">&#548;</l:l>
+      <l:l i="260">&#549;</l:l>
+      <l:l i="260">&#656;</l:l>
+      <l:l i="260">&#657;</l:l>
+      <l:l i="260">&#7824;</l:l>
+      <l:l i="260">&#7825;</l:l>
+      <l:l i="260">&#7826;</l:l>
+      <l:l i="260">&#7827;</l:l>
+      <l:l i="260">&#7828;</l:l>
+      <l:l i="260">&#7829;</l:l>
+   </l:letters>
+</l:l10n>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/vi.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/vi.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/vi.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1153 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="vi" english-language-name="Vietnamese">
+
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+   <l:gentext key="Abstract" text="T&#7893;ng quan"/>
+   <l:gentext key="abstract" text="T&#7893;ng quan"/>
+   <l:gentext key="Answer" text="&#272;:"/>
+   <l:gentext key="answer" text="&#272;:"/>
+   <l:gentext key="Appendix" text="Ph&#7909; l&#7909;c"/>
+   <l:gentext key="appendix" text="ph&#7909; l&#7909;c"/>
+   <l:gentext key="Article" text="B&#224;i vi&#7871;t"/>
+   <l:gentext key="article" text="B&#224;i vi&#7871;t"/>
+   <l:gentext key="Bibliography" text="Th&#432; m&#7909;c"/>
+   <l:gentext key="bibliography" text="Th&#432; m&#7909;c"/>
+   <l:gentext key="Book" text="S&#225;ch"/>
+   <l:gentext key="book" text="S&#225;ch"/>
+   <l:gentext key="CAUTION" text="C&#7848;N TH&#7852;N"/>
+   <l:gentext key="Caution" text="C&#7849;n th&#7853;n"/>
+   <l:gentext key="caution" text="C&#7849;n th&#7853;n"/>
+   <l:gentext key="Chapter" text="Ch&#432;&#417;ng"/>
+   <l:gentext key="chapter" text="ch&#432;&#417;ng"/>
+   <l:gentext key="Colophon" text="Colophon"/>
+   <l:gentext key="colophon" text="Colophon"/>
+   <l:gentext key="Copyright" text="B&#7843;n quy&#7873;n"/>
+   <l:gentext key="copyright" text="B&#7843;n quy&#7873;n"/>
+   <l:gentext key="Dedication" text="T&#7863;ng"/>
+   <l:gentext key="dedication" text="T&#7863;ng"/>
+   <l:gentext key="Edition" text="Edition"/>
+   <l:gentext key="edition" text="Edition"/>
+   <l:gentext key="Equation" text="Ph&#432;&#417;ng tr&#236;nh"/>
+   <l:gentext key="equation" text="Ph&#432;&#417;ng tr&#236;nh"/>
+   <l:gentext key="Example" text="V&#237; d&#7909;"/>
+   <l:gentext key="example" text="V&#237; d&#7909;"/>
+   <l:gentext key="Figure" text="H&#236;nh"/>
+   <l:gentext key="figure" text="H&#236;nh"/>
+   <l:gentext key="Glossary" text="Thu&#7853;t ng&#7919;"/>
+   <l:gentext key="glossary" text="Thu&#7853;t ng&#7919;"/>
+   <l:gentext key="GlossSee" text="Xem"/>
+   <l:gentext key="glosssee" text="Xem"/>
+   <l:gentext key="GlossSeeAlso" text="Xem th&#234;m"/>
+   <l:gentext key="glossseealso" text="Xem th&#234;m"/>
+   <l:gentext key="IMPORTANT" text="QUAN TR&#7884;NG"/>
+   <l:gentext key="important" text="Quan tr&#7885;ng"/>
+   <l:gentext key="Important" text="Quan tr&#7885;ng"/>
+   <l:gentext key="Index" text="Ch&#7881; m&#7909;c"/>
+   <l:gentext key="index" text="Ch&#7881; m&#7909;c"/>
+   <l:gentext key="ISBN" text="ISBN"/>
+   <l:gentext key="isbn" text="ISBN"/>
+   <l:gentext key="LegalNotice" text="Legal Notice"/>
+   <l:gentext key="legalnotice" text="Legal Notice"/>
+   <l:gentext key="MsgAud" text="&#272;&#7885;c gi&#7843;"/>
+   <l:gentext key="msgaud" text="&#272;&#7885;c gi&#7843;"/>
+   <l:gentext key="MsgLevel" text="C&#7845;p"/>
+   <l:gentext key="msglevel" text="C&#7845;p"/>
+   <l:gentext key="MsgOrig" text="G&#7889;c"/>
+   <l:gentext key="msgorig" text="G&#7889;c"/>
+   <l:gentext key="NOTE" text="GHI CH&#218;"/>
+   <l:gentext key="Note" text="Ghi ch&#250;"/>
+   <l:gentext key="note" text="Ghi ch&#250;"/>
+   <l:gentext key="Part" text="Ph&#7847;n"/>
+   <l:gentext key="part" text="Ph&#7847;n"/>
+   <l:gentext key="Preface" text="M&#7903; &#273;&#7847;u"/>
+   <l:gentext key="preface" text="M&#7903; &#273;&#7847;u"/>
+   <l:gentext key="Procedure" text="Th&#7911; t&#7909;c"/>
+   <l:gentext key="procedure" text="Th&#7911; t&#7909;c"/>
+   <l:gentext key="ProductionSet" text="S&#7843;n ph&#7849;m"/>
+   <l:gentext key="PubDate" text="Publication Date" lang="en"/>
+   <l:gentext key="pubdate" text="Publication date" lang="en"/>
+   <l:gentext key="Published" text="Xu&#7845;t b&#7843;n"/>
+   <l:gentext key="published" text="Xu&#7845;t b&#7843;n"/>
+   <l:gentext key="Qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="Question" text="H:"/>
+   <l:gentext key="question" text="H:"/>
+   <l:gentext key="RefEntry" text=""/>
+   <l:gentext key="refentry" text=""/>
+   <l:gentext key="Reference" text="Tham kh&#7843;o"/>
+   <l:gentext key="reference" text="Tham kh&#7843;o"/>
+   <l:gentext key="RefName" text="T&#234;n"/>
+   <l:gentext key="refname" text="T&#234;n"/>
+   <l:gentext key="RefSection" text=""/>
+   <l:gentext key="refsection" text=""/>
+   <l:gentext key="RefSynopsisDiv" text="T&#243;m t&#7855;t"/>
+   <l:gentext key="refsynopsisdiv" text="T&#243;m t&#7855;t"/>
+   <l:gentext key="RevHistory" text="Revision History"/>
+   <l:gentext key="revhistory" text="Revision History"/>
+   <l:gentext key="revision" text="B&#7843;n hi&#7879;u ch&#7881;nh"/>
+   <l:gentext key="Revision" text="B&#7843;n hi&#7879;u ch&#7881;nh"/>
+   <l:gentext key="sect1" text="Ph&#7847;n"/>
+   <l:gentext key="sect2" text="Ph&#7847;n"/>
+   <l:gentext key="sect3" text="Ph&#7847;n"/>
+   <l:gentext key="sect4" text="Ph&#7847;n"/>
+   <l:gentext key="sect5" text="Ph&#7847;n"/>
+   <l:gentext key="section" text="Ph&#7847;n"/>
+   <l:gentext key="Section" text="Ph&#7847;n"/>
+   <l:gentext key="see" text="xem"/>
+   <l:gentext key="See" text="See" lang="en"/>
+   <l:gentext key="seealso" text="xem th&#234;m"/>
+   <l:gentext key="Seealso" text="See also" lang="en"/>
+   <l:gentext key="SeeAlso" text="See Also" lang="en"/>
+   <l:gentext key="set" text="&#272;&#7863;t"/>
+   <l:gentext key="Set" text="&#272;&#7863;t"/>
+   <l:gentext key="setindex" text="&#272;&#7863;t ch&#7881; m&#7909;c"/>
+   <l:gentext key="SetIndex" text="&#272;&#7863;t ch&#7881; m&#7909;c"/>
+   <l:gentext key="Sidebar" text=""/>
+   <l:gentext key="sidebar" text="thanh b&#234;n"/>
+   <l:gentext key="step" text="b&#432;&#7899;c"/>
+   <l:gentext key="Step" text="B&#432;&#7899;c"/>
+   <l:gentext key="Table" text="B&#7843;ng"/>
+   <l:gentext key="table" text="B&#7843;ng"/>
+   <l:gentext key="tip" text="M&#7865;o"/>
+   <l:gentext key="TIP" text="M&#7864;O"/>
+   <l:gentext key="Tip" text="M&#7865;o"/>
+   <l:gentext key="Warning" text="C&#7843;nh b&#225;o"/>
+   <l:gentext key="warning" text="C&#7843;nh b&#225;o"/>
+   <l:gentext key="WARNING" text="C&#7842;NH B&#193;O"/>
+   <l:gentext key="and" text="v&#224;"/>
+   <l:gentext key="by" text="b&#7903;i"/>
+   <l:gentext key="called" text="called" lang="en"/>
+   <l:gentext key="Edited" text="&#272;&#432;&#7907;c bi&#234;n so&#7841;n"/>
+   <l:gentext key="edited" text="&#272;&#432;&#7907;c bi&#234;n so&#7841;n"/>
+   <l:gentext key="Editedby" text="&#272;&#432;&#7907;c bi&#234;n so&#7841;n b&#7903;i"/>
+   <l:gentext key="editedby" text="&#272;&#432;&#7907;c bi&#234;n so&#7841;n b&#7903;i"/>
+   <l:gentext key="in" text="trong"/>
+   <l:gentext key="lastlistcomma" text=","/>
+   <l:gentext key="listcomma" text=","/>
+   <l:gentext key="nonexistantelement" text="ph&#7847;n t&#7917; kh&#244;ng c&#243;"/>
+   <l:gentext key="notes" text="Ghi ch&#250;"/>
+   <l:gentext key="Notes" text="Ghi ch&#250;"/>
+   <l:gentext key="Pgs" text="Pgs."/>
+   <l:gentext key="pgs" text="Pgs."/>
+   <l:gentext key="Revisedby" text="Hi&#7879;u ch&#7881;nh b&#7903;i: "/>
+   <l:gentext key="revisedby" text="Hi&#7879;u ch&#7881;nh b&#7903;i: "/>
+   <l:gentext key="TableNotes" text="Ghi ch&#250;"/>
+   <l:gentext key="tablenotes" text="Ghi ch&#250;"/>
+   <l:gentext key="TableofContents" text="M&#7909;c l&#7909;c"/>
+   <l:gentext key="tableofcontents" text="M&#7909;c l&#7909;c"/>
+   <l:gentext key="the" text="" lang="en"/>
+   <l:gentext key="unexpectedelementname" text="T&#234;n ph&#7847;n t&#7917; kh&#244;ng &#273;&#250;ng"/>
+   <l:gentext key="unsupported" text="kh&#244;ng h&#7895; tr&#7907;"/>
+   <l:gentext key="xrefto" text="xref t&#7899;i"/>
+   <l:gentext key="listofequations" text="Danh s&#225;ch Ph&#432;&#417;ng tr&#236;nh"/>
+   <l:gentext key="ListofEquations" text="Danh s&#225;ch Ph&#432;&#417;ng tr&#236;nh"/>
+   <l:gentext key="ListofExamples" text="Danh s&#225;ch V&#237; d&#7909;"/>
+   <l:gentext key="listofexamples" text="Danh s&#225;ch V&#237; d&#7909;"/>
+   <l:gentext key="ListofFigures" text="Danh s&#225;ch H&#236;nh"/>
+   <l:gentext key="listoffigures" text="Danh s&#225;ch H&#236;nh"/>
+   <l:gentext key="ListofProcedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listofprocedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listoftables" text="Danh s&#225;ch B&#7843;ng"/>
+   <l:gentext key="ListofTables" text="Danh s&#225;ch B&#7843;ng"/>
+   <l:gentext key="ListofUnknown" text="Danh s&#225;ch L&#7841;"/>
+   <l:gentext key="listofunknown" text="Danh s&#225;ch L&#7841;"/>
+   <l:gentext key="nav-home" text="&#272;&#7847;u"/>
+   <l:gentext key="nav-next" text="K&#7871; ti&#7871;p"/>
+   <l:gentext key="nav-next-sibling" text="T&#7899;i nhanh"/>
+   <l:gentext key="nav-prev" text="Tr&#432;&#7899;c &#273;&#243;"/>
+   <l:gentext key="nav-prev-sibling" text="L&#249;i nhanh"/>
+   <l:gentext key="nav-up" text="L&#234;n"/>
+   <l:gentext key="nav-toc" text="M&#7909;c l&#7909;c"/>
+   <l:gentext key="Draft" text="B&#7843;n th&#7843;o"/>
+   <l:gentext key="above" text="tr&#234;n"/>
+   <l:gentext key="below" text="d&#432;&#7899;i"/>
+   <l:gentext key="sectioncalled" text="ph&#7847;n"/>
+   <l:gentext key="index symbols" text="K&#253; hi&#7879;u"/>
+   <l:gentext key="lowercase.alpha" text="abcdefghijklmnopqrstuvwxyz"/>
+   <l:gentext key="uppercase.alpha" text="ABCDEFGHIJKLMNOPQRSTUVWXYZ"/>
+   <l:dingbat key="startquote" text="&#8220;"/>
+   <l:dingbat key="endquote" text="&#8221;"/>
+   <l:dingbat key="nestedstartquote" text="&#8216;"/>
+   <l:dingbat key="nestedendquote" text="&#8217;"/>
+   <l:dingbat key="singlestartquote" text="&#8216;" lang="en"/>
+   <l:dingbat key="singleendquote" text="&#8217;" lang="en"/>
+   <l:dingbat key="bullet" text="&#8226;"/>
+   <l:gentext key="hyphenation-character" text="-" lang="en"/>
+   <l:gentext key="hyphenation-push-character-count" text="2" lang="en"/>
+   <l:gentext key="hyphenation-remain-character-count" text="2" lang="en"/>
+
+   <l:context name="styles">
+      <l:template name="person-name" text="last-first"/>
+   </l:context>
+
+   <l:context name="title">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="%t"/>
+      <l:template name="appendix" text="Ph&#7909; l&#7909;c&#160;%n.&#160;%t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="biblioentry" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliolist" text="%t" lang="en"/>
+      <l:template name="bibliomixed" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="Ch&#432;&#417;ng&#160;%n.&#160;%t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="Ph&#432;&#417;ng tr&#236;nh&#160;%n.&#160;%t"/>
+      <l:template name="example" text="V&#237; d&#7909;&#160;%n.&#160;%t"/>
+      <l:template name="figure" text="H&#236;nh&#160;%n.&#160;%t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="glosslist" text="%t" lang="en"/>
+      <l:template name="glossentry" text="%t" lang="en"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text=""/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="Ph&#7847;n&#160;%n.&#160;%t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="procedure.formal" text="Th&#7911; t&#7909;c&#160;%n.&#160;%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="productionset.formal" text="S&#7843;n ph&#7849;m&#160;%n"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="%t"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="%t"/>
+      <l:template name="refentry" text="%t"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsection" text="%t"/>
+      <l:template name="refsect1" text="%t"/>
+      <l:template name="refsect2" text="%t"/>
+      <l:template name="refsect3" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="refsynopsisdivinfo" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="step" text="%t"/>
+      <l:template name="table" text="B&#7843;ng&#160;%n.&#160;%t"/>
+      <l:template name="task" text="%t" lang="en"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text=""/>
+      <l:template name="warning" text="%t"/>
+   </l:context>
+
+   <l:context name="title-unnumbered">
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article/appendix" text="%t" lang="en"/>
+      <l:template name="bridgehead" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="sect1" text="%t"/>
+      <l:template name="sect2" text="%t"/>
+      <l:template name="sect3" text="%t"/>
+      <l:template name="sect4" text="%t"/>
+      <l:template name="sect5" text="%t"/>
+      <l:template name="section" text="%t"/>
+      <l:template name="simplesect" text="%t"/>
+   </l:context>
+
+   <l:context name="title-numbered">
+      <l:template name="appendix" text="Ph&#7909; l&#7909;c&#160;%n.&#160;%t"/>
+      <l:template name="article/appendix" text="%n.&#160;%t" lang="en"/>
+      <l:template name="bridgehead" text="%n.&#160;%t"/>
+      <l:template name="chapter" text="Ch&#432;&#417;ng&#160;%n.&#160;%t"/>
+      <l:template name="sect1" text="%n.&#160;%t"/>
+      <l:template name="sect2" text="%n.&#160;%t"/>
+      <l:template name="sect3" text="%n.&#160;%t"/>
+      <l:template name="sect4" text="%n.&#160;%t"/>
+      <l:template name="sect5" text="%n.&#160;%t"/>
+      <l:template name="section" text="%n.&#160;%t"/>
+      <l:template name="simplesect" text="%t"/>
+   </l:context>
+
+   <l:context name="subtitle">
+      <l:template name="appendix" text="%s"/>
+      <l:template name="article" text="%s"/>
+      <l:template name="bibliodiv" text="%s"/>
+      <l:template name="biblioentry" text="%s"/>
+      <l:template name="bibliography" text="%s"/>
+      <l:template name="bibliomixed" text="%s"/>
+      <l:template name="bibliomset" text="%s"/>
+      <l:template name="biblioset" text="%s"/>
+      <l:template name="book" text="%s"/>
+      <l:template name="chapter" text="%s"/>
+      <l:template name="colophon" text="%s"/>
+      <l:template name="dedication" text="%s"/>
+      <l:template name="glossary" text="%s"/>
+      <l:template name="glossdiv" text="%s"/>
+      <l:template name="index" text="%s"/>
+      <l:template name="indexdiv" text="%s"/>
+      <l:template name="lot" text="%s"/>
+      <l:template name="part" text="%s"/>
+      <l:template name="partintro" text="%s"/>
+      <l:template name="preface" text="%s"/>
+      <l:template name="refentry" text="%s"/>
+      <l:template name="reference" text="%s"/>
+      <l:template name="refsection" text="%s"/>
+      <l:template name="refsect1" text="%s"/>
+      <l:template name="refsect2" text="%s"/>
+      <l:template name="refsect3" text="%s"/>
+      <l:template name="refsynopsisdiv" text="%s"/>
+      <l:template name="sect1" text="%s"/>
+      <l:template name="sect2" text="%s"/>
+      <l:template name="sect3" text="%s"/>
+      <l:template name="sect4" text="%s"/>
+      <l:template name="sect5" text="%s"/>
+      <l:template name="section" text="%s"/>
+      <l:template name="set" text="%s"/>
+      <l:template name="setindex" text="%s"/>
+      <l:template name="sidebar" text="%s"/>
+      <l:template name="simplesect" text="%s"/>
+      <l:template name="toc" text="%s"/>
+   </l:context>
+
+   <l:context name="xref">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="&#272;:&#160;%n"/>
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="constraintdef" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="%t"/>
+      <l:template name="example" text="%t"/>
+      <l:template name="figure" text="%t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text="%n"/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="%t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="H:&#160;%n"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="H:&#160;%n"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="table" text="%t"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="%n"/>
+      <l:template name="warning" text="%t"/>
+      <l:template name="page.citation" text=" [%p]"/>
+      <l:template name="page" text="(page %p)" lang="en"/>
+      <l:template name="pageabbrev" text="(p. %p)" lang="en"/>
+      <l:template name="Page" text="Page %p" lang="en"/>
+      <l:template name="bridgehead" text="ph&#7847;n &#8220;%t&#8221;"/>
+      <l:template name="refsection" text="ph&#7847;n &#8220;%t&#8221;"/>
+      <l:template name="refsect1" text="ph&#7847;n &#8220;%t&#8221;"/>
+      <l:template name="refsect2" text="ph&#7847;n &#8220;%t&#8221;"/>
+      <l:template name="refsect3" text="ph&#7847;n &#8220;%t&#8221;"/>
+      <l:template name="sect1" text="ph&#7847;n &#8220;%t&#8221;"/>
+      <l:template name="sect2" text="ph&#7847;n &#8220;%t&#8221;"/>
+      <l:template name="sect3" text="ph&#7847;n &#8220;%t&#8221;"/>
+      <l:template name="sect4" text="ph&#7847;n &#8220;%t&#8221;"/>
+      <l:template name="sect5" text="ph&#7847;n &#8220;%t&#8221;"/>
+      <l:template name="section" text="ph&#7847;n &#8220;%t&#8221;"/>
+      <l:template name="simplesect" text="ph&#7847;n &#8220;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="xref-number">
+      <l:template name="answer" text="&#272;:&#160;%n"/>
+      <l:template name="appendix" text="Ph&#7909; l&#7909;c&#160;%n"/>
+      <l:template name="bridgehead" text="Ph&#7847;n&#160;%n"/>
+      <l:template name="chapter" text="Ch&#432;&#417;ng&#160;%n"/>
+      <l:template name="equation" text="Ph&#432;&#417;ng tr&#236;nh&#160;%n"/>
+      <l:template name="example" text="V&#237; d&#7909;&#160;%n"/>
+      <l:template name="figure" text="H&#236;nh&#160;%n"/>
+      <l:template name="part" text="Ph&#7847;n&#160;%n"/>
+      <l:template name="procedure" text="Th&#7911; t&#7909;c&#160;%n"/>
+      <l:template name="productionset" text="S&#7843;n ph&#7849;m&#160;%n"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n"/>
+      <l:template name="qandaentry" text="H:&#160;%n"/>
+      <l:template name="question" text="H:&#160;%n"/>
+      <l:template name="sect1" text="Ph&#7847;n&#160;%n"/>
+      <l:template name="sect2" text="Ph&#7847;n&#160;%n"/>
+      <l:template name="sect3" text="Ph&#7847;n&#160;%n"/>
+      <l:template name="sect4" text="Ph&#7847;n&#160;%n"/>
+      <l:template name="sect5" text="Ph&#7847;n&#160;%n"/>
+      <l:template name="section" text="Ph&#7847;n&#160;%n"/>
+      <l:template name="table" text="B&#7843;ng&#160;%n"/>
+   </l:context>
+
+   <l:context name="xref-number-and-title">
+      <l:template name="appendix" text="Ph&#7909; l&#7909;c&#160;%n, %t"/>
+      <l:template name="bridgehead" text="Ph&#7847;n&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="chapter" text="Ch&#432;&#417;ng&#160;%n, %t"/>
+      <l:template name="equation" text="Ph&#432;&#417;ng tr&#236;nh&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="example" text="V&#237; d&#7909;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="figure" text="H&#236;nh&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="part" text="Ph&#7847;n&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="procedure" text="Th&#7911; t&#7909;c&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="productionset" text="S&#7843;n ph&#7849;m&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="refsect1" text="ph&#7847;n &#8220;%t&#8221;"/>
+      <l:template name="refsect2" text="ph&#7847;n &#8220;%t&#8221;"/>
+      <l:template name="refsect3" text="ph&#7847;n &#8220;%t&#8221;"/>
+      <l:template name="refsection" text="ph&#7847;n &#8220;%t&#8221;"/>
+      <l:template name="sect1" text="Ph&#7847;n&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect2" text="Ph&#7847;n&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect3" text="Ph&#7847;n&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect4" text="Ph&#7847;n&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect5" text="Ph&#7847;n&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="section" text="Ph&#7847;n&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="simplesect" text="ph&#7847;n &#8220;%t&#8221;"/>
+      <l:template name="table" text="B&#7843;ng&#160;%n, &#8220;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="authorgroup">
+      <l:template name="sep" text=", "/>
+      <l:template name="sep2" text=" v&#224; "/>
+      <l:template name="seplast" text=", v&#224; "/>
+   </l:context>
+
+   <l:context name="glossary">
+      <l:template name="see" text="Xem "/>
+      <l:template name="seealso" text="Xem th&#234;m "/>
+   </l:context>
+
+   <l:context name="msgset">
+      <l:template name="MsgAud" text="&#272;&#7885;c gi&#7843;: "/>
+      <l:template name="MsgLevel" text="C&#7845;p: "/>
+      <l:template name="MsgOrig" text="G&#7889;c: "/>
+   </l:context>
+
+   <l:context name="datetime">
+      <l:template name="format" text="m/d/Y" lang="en"/>
+   </l:context>
+
+   <l:context name="datetime-full">
+      <l:template name="January" text="January" lang="en"/>
+      <l:template name="February" text="February" lang="en"/>
+      <l:template name="March" text="March" lang="en"/>
+      <l:template name="April" text="April" lang="en"/>
+      <l:template name="May" text="May" lang="en"/>
+      <l:template name="June" text="June" lang="en"/>
+      <l:template name="July" text="July" lang="en"/>
+      <l:template name="August" text="August" lang="en"/>
+      <l:template name="September" text="September" lang="en"/>
+      <l:template name="October" text="October" lang="en"/>
+      <l:template name="November" text="November" lang="en"/>
+      <l:template name="December" text="December" lang="en"/>
+      <l:template name="Monday" text="Monday" lang="en"/>
+      <l:template name="Tuesday" text="Tuesday" lang="en"/>
+      <l:template name="Wednesday" text="Wednesday" lang="en"/>
+      <l:template name="Thursday" text="Thursday" lang="en"/>
+      <l:template name="Friday" text="Friday" lang="en"/>
+      <l:template name="Saturday" text="Saturday" lang="en"/>
+      <l:template name="Sunday" text="Sunday" lang="en"/>
+   </l:context>
+
+   <l:context name="datetime-abbrev">
+      <l:template name="Jan" text="Jan" lang="en"/>
+      <l:template name="Feb" text="Feb" lang="en"/>
+      <l:template name="Mar" text="Mar" lang="en"/>
+      <l:template name="Apr" text="Apr" lang="en"/>
+      <l:template name="May" text="May" lang="en"/>
+      <l:template name="Jun" text="Jun" lang="en"/>
+      <l:template name="Jul" text="Jul" lang="en"/>
+      <l:template name="Aug" text="Aug" lang="en"/>
+      <l:template name="Sep" text="Sep" lang="en"/>
+      <l:template name="Oct" text="Oct" lang="en"/>
+      <l:template name="Nov" text="Nov" lang="en"/>
+      <l:template name="Dec" text="Dec" lang="en"/>
+      <l:template name="Mon" text="Mon" lang="en"/>
+      <l:template name="Tue" text="Tue" lang="en"/>
+      <l:template name="Wed" text="Wed" lang="en"/>
+      <l:template name="Thu" text="Thu" lang="en"/>
+      <l:template name="Fri" text="Fri" lang="en"/>
+      <l:template name="Sat" text="Sat" lang="en"/>
+      <l:template name="Sun" text="Sun" lang="en"/>
+   </l:context>
+
+   <l:context name="htmlhelp">
+      <l:template name="langcode" text="0x242a Vietnamese"/>
+   </l:context>
+
+   <l:letters lang="en">
+      <l:l i="-1"/>
+      <l:l i="0">Symbols</l:l>
+      <l:l i="10">A</l:l>
+      <l:l i="10">a</l:l>
+      <l:l i="10">&#192;</l:l>
+      <l:l i="10">&#224;</l:l>
+      <l:l i="10">&#193;</l:l>
+      <l:l i="10">&#225;</l:l>
+      <l:l i="10">&#194;</l:l>
+      <l:l i="10">&#226;</l:l>
+      <l:l i="10">&#195;</l:l>
+      <l:l i="10">&#227;</l:l>
+      <l:l i="10">&#196;</l:l>
+      <l:l i="10">&#228;</l:l>
+      <l:l i="10">&#197;</l:l>
+      <l:l i="10">&#229;</l:l>
+      <l:l i="10">&#256;</l:l>
+      <l:l i="10">&#257;</l:l>
+      <l:l i="10">&#258;</l:l>
+      <l:l i="10">&#259;</l:l>
+      <l:l i="10">&#260;</l:l>
+      <l:l i="10">&#261;</l:l>
+      <l:l i="10">&#461;</l:l>
+      <l:l i="10">&#462;</l:l>
+      <l:l i="10">&#478;</l:l>
+      <l:l i="10">&#479;</l:l>
+      <l:l i="10">&#480;</l:l>
+      <l:l i="10">&#481;</l:l>
+      <l:l i="10">&#506;</l:l>
+      <l:l i="10">&#507;</l:l>
+      <l:l i="10">&#512;</l:l>
+      <l:l i="10">&#513;</l:l>
+      <l:l i="10">&#514;</l:l>
+      <l:l i="10">&#515;</l:l>
+      <l:l i="10">&#550;</l:l>
+      <l:l i="10">&#551;</l:l>
+      <l:l i="10">&#7680;</l:l>
+      <l:l i="10">&#7681;</l:l>
+      <l:l i="10">&#7834;</l:l>
+      <l:l i="10">&#7840;</l:l>
+      <l:l i="10">&#7841;</l:l>
+      <l:l i="10">&#7842;</l:l>
+      <l:l i="10">&#7843;</l:l>
+      <l:l i="10">&#7844;</l:l>
+      <l:l i="10">&#7845;</l:l>
+      <l:l i="10">&#7846;</l:l>
+      <l:l i="10">&#7847;</l:l>
+      <l:l i="10">&#7848;</l:l>
+      <l:l i="10">&#7849;</l:l>
+      <l:l i="10">&#7850;</l:l>
+      <l:l i="10">&#7851;</l:l>
+      <l:l i="10">&#7852;</l:l>
+      <l:l i="10">&#7853;</l:l>
+      <l:l i="10">&#7854;</l:l>
+      <l:l i="10">&#7855;</l:l>
+      <l:l i="10">&#7856;</l:l>
+      <l:l i="10">&#7857;</l:l>
+      <l:l i="10">&#7858;</l:l>
+      <l:l i="10">&#7859;</l:l>
+      <l:l i="10">&#7860;</l:l>
+      <l:l i="10">&#7861;</l:l>
+      <l:l i="10">&#7862;</l:l>
+      <l:l i="10">&#7863;</l:l>
+      <l:l i="20">B</l:l>
+      <l:l i="20">b</l:l>
+      <l:l i="20">&#384;</l:l>
+      <l:l i="20">&#385;</l:l>
+      <l:l i="20">&#595;</l:l>
+      <l:l i="20">&#386;</l:l>
+      <l:l i="20">&#387;</l:l>
+      <l:l i="20">&#7682;</l:l>
+      <l:l i="20">&#7683;</l:l>
+      <l:l i="20">&#7684;</l:l>
+      <l:l i="20">&#7685;</l:l>
+      <l:l i="20">&#7686;</l:l>
+      <l:l i="20">&#7687;</l:l>
+      <l:l i="30">C</l:l>
+      <l:l i="30">c</l:l>
+      <l:l i="30">&#199;</l:l>
+      <l:l i="30">&#231;</l:l>
+      <l:l i="30">&#262;</l:l>
+      <l:l i="30">&#263;</l:l>
+      <l:l i="30">&#264;</l:l>
+      <l:l i="30">&#265;</l:l>
+      <l:l i="30">&#266;</l:l>
+      <l:l i="30">&#267;</l:l>
+      <l:l i="30">&#268;</l:l>
+      <l:l i="30">&#269;</l:l>
+      <l:l i="30">&#391;</l:l>
+      <l:l i="30">&#392;</l:l>
+      <l:l i="30">&#597;</l:l>
+      <l:l i="30">&#7688;</l:l>
+      <l:l i="30">&#7689;</l:l>
+      <l:l i="40">D</l:l>
+      <l:l i="40">d</l:l>
+      <l:l i="40">&#270;</l:l>
+      <l:l i="40">&#271;</l:l>
+      <l:l i="40">&#272;</l:l>
+      <l:l i="40">&#273;</l:l>
+      <l:l i="40">&#394;</l:l>
+      <l:l i="40">&#599;</l:l>
+      <l:l i="40">&#395;</l:l>
+      <l:l i="40">&#396;</l:l>
+      <l:l i="40">&#453;</l:l>
+      <l:l i="40">&#498;</l:l>
+      <l:l i="40">&#545;</l:l>
+      <l:l i="40">&#598;</l:l>
+      <l:l i="40">&#7690;</l:l>
+      <l:l i="40">&#7691;</l:l>
+      <l:l i="40">&#7692;</l:l>
+      <l:l i="40">&#7693;</l:l>
+      <l:l i="40">&#7694;</l:l>
+      <l:l i="40">&#7695;</l:l>
+      <l:l i="40">&#7696;</l:l>
+      <l:l i="40">&#7697;</l:l>
+      <l:l i="40">&#7698;</l:l>
+      <l:l i="40">&#7699;</l:l>
+      <l:l i="50">E</l:l>
+      <l:l i="50">e</l:l>
+      <l:l i="50">&#200;</l:l>
+      <l:l i="50">&#232;</l:l>
+      <l:l i="50">&#201;</l:l>
+      <l:l i="50">&#233;</l:l>
+      <l:l i="50">&#202;</l:l>
+      <l:l i="50">&#234;</l:l>
+      <l:l i="50">&#203;</l:l>
+      <l:l i="50">&#235;</l:l>
+      <l:l i="50">&#274;</l:l>
+      <l:l i="50">&#275;</l:l>
+      <l:l i="50">&#276;</l:l>
+      <l:l i="50">&#277;</l:l>
+      <l:l i="50">&#278;</l:l>
+      <l:l i="50">&#279;</l:l>
+      <l:l i="50">&#280;</l:l>
+      <l:l i="50">&#281;</l:l>
+      <l:l i="50">&#282;</l:l>
+      <l:l i="50">&#283;</l:l>
+      <l:l i="50">&#516;</l:l>
+      <l:l i="50">&#517;</l:l>
+      <l:l i="50">&#518;</l:l>
+      <l:l i="50">&#519;</l:l>
+      <l:l i="50">&#552;</l:l>
+      <l:l i="50">&#553;</l:l>
+      <l:l i="50">&#7700;</l:l>
+      <l:l i="50">&#7701;</l:l>
+      <l:l i="50">&#7702;</l:l>
+      <l:l i="50">&#7703;</l:l>
+      <l:l i="50">&#7704;</l:l>
+      <l:l i="50">&#7705;</l:l>
+      <l:l i="50">&#7706;</l:l>
+      <l:l i="50">&#7707;</l:l>
+      <l:l i="50">&#7708;</l:l>
+      <l:l i="50">&#7709;</l:l>
+      <l:l i="50">&#7864;</l:l>
+      <l:l i="50">&#7865;</l:l>
+      <l:l i="50">&#7866;</l:l>
+      <l:l i="50">&#7867;</l:l>
+      <l:l i="50">&#7868;</l:l>
+      <l:l i="50">&#7869;</l:l>
+      <l:l i="50">&#7870;</l:l>
+      <l:l i="50">&#7871;</l:l>
+      <l:l i="50">&#7872;</l:l>
+      <l:l i="50">&#7873;</l:l>
+      <l:l i="50">&#7874;</l:l>
+      <l:l i="50">&#7875;</l:l>
+      <l:l i="50">&#7876;</l:l>
+      <l:l i="50">&#7877;</l:l>
+      <l:l i="50">&#7878;</l:l>
+      <l:l i="50">&#7879;</l:l>
+      <l:l i="60">F</l:l>
+      <l:l i="60">f</l:l>
+      <l:l i="60">&#401;</l:l>
+      <l:l i="60">&#402;</l:l>
+      <l:l i="60">&#7710;</l:l>
+      <l:l i="60">&#7711;</l:l>
+      <l:l i="70">G</l:l>
+      <l:l i="70">g</l:l>
+      <l:l i="70">&#284;</l:l>
+      <l:l i="70">&#285;</l:l>
+      <l:l i="70">&#286;</l:l>
+      <l:l i="70">&#287;</l:l>
+      <l:l i="70">&#288;</l:l>
+      <l:l i="70">&#289;</l:l>
+      <l:l i="70">&#290;</l:l>
+      <l:l i="70">&#291;</l:l>
+      <l:l i="70">&#403;</l:l>
+      <l:l i="70">&#608;</l:l>
+      <l:l i="70">&#484;</l:l>
+      <l:l i="70">&#485;</l:l>
+      <l:l i="70">&#486;</l:l>
+      <l:l i="70">&#487;</l:l>
+      <l:l i="70">&#500;</l:l>
+      <l:l i="70">&#501;</l:l>
+      <l:l i="70">&#7712;</l:l>
+      <l:l i="70">&#7713;</l:l>
+      <l:l i="80">H</l:l>
+      <l:l i="80">h</l:l>
+      <l:l i="80">&#292;</l:l>
+      <l:l i="80">&#293;</l:l>
+      <l:l i="80">&#294;</l:l>
+      <l:l i="80">&#295;</l:l>
+      <l:l i="80">&#542;</l:l>
+      <l:l i="80">&#543;</l:l>
+      <l:l i="80">&#614;</l:l>
+      <l:l i="80">&#7714;</l:l>
+      <l:l i="80">&#7715;</l:l>
+      <l:l i="80">&#7716;</l:l>
+      <l:l i="80">&#7717;</l:l>
+      <l:l i="80">&#7718;</l:l>
+      <l:l i="80">&#7719;</l:l>
+      <l:l i="80">&#7720;</l:l>
+      <l:l i="80">&#7721;</l:l>
+      <l:l i="80">&#7722;</l:l>
+      <l:l i="80">&#7723;</l:l>
+      <l:l i="80">&#7830;</l:l>
+      <l:l i="90">I</l:l>
+      <l:l i="90">i</l:l>
+      <l:l i="90">&#204;</l:l>
+      <l:l i="90">&#236;</l:l>
+      <l:l i="90">&#205;</l:l>
+      <l:l i="90">&#237;</l:l>
+      <l:l i="90">&#206;</l:l>
+      <l:l i="90">&#238;</l:l>
+      <l:l i="90">&#207;</l:l>
+      <l:l i="90">&#239;</l:l>
+      <l:l i="90">&#296;</l:l>
+      <l:l i="90">&#297;</l:l>
+      <l:l i="90">&#298;</l:l>
+      <l:l i="90">&#299;</l:l>
+      <l:l i="90">&#300;</l:l>
+      <l:l i="90">&#301;</l:l>
+      <l:l i="90">&#302;</l:l>
+      <l:l i="90">&#303;</l:l>
+      <l:l i="90">&#304;</l:l>
+      <l:l i="90">&#407;</l:l>
+      <l:l i="90">&#616;</l:l>
+      <l:l i="90">&#463;</l:l>
+      <l:l i="90">&#464;</l:l>
+      <l:l i="90">&#520;</l:l>
+      <l:l i="90">&#521;</l:l>
+      <l:l i="90">&#522;</l:l>
+      <l:l i="90">&#523;</l:l>
+      <l:l i="90">&#7724;</l:l>
+      <l:l i="90">&#7725;</l:l>
+      <l:l i="90">&#7726;</l:l>
+      <l:l i="90">&#7727;</l:l>
+      <l:l i="90">&#7880;</l:l>
+      <l:l i="90">&#7881;</l:l>
+      <l:l i="90">&#7882;</l:l>
+      <l:l i="90">&#7883;</l:l>
+      <l:l i="100">J</l:l>
+      <l:l i="100">j</l:l>
+      <l:l i="100">&#308;</l:l>
+      <l:l i="100">&#309;</l:l>
+      <l:l i="100">&#496;</l:l>
+      <l:l i="100">&#669;</l:l>
+      <l:l i="110">K</l:l>
+      <l:l i="110">k</l:l>
+      <l:l i="110">&#310;</l:l>
+      <l:l i="110">&#311;</l:l>
+      <l:l i="110">&#408;</l:l>
+      <l:l i="110">&#409;</l:l>
+      <l:l i="110">&#488;</l:l>
+      <l:l i="110">&#489;</l:l>
+      <l:l i="110">&#7728;</l:l>
+      <l:l i="110">&#7729;</l:l>
+      <l:l i="110">&#7730;</l:l>
+      <l:l i="110">&#7731;</l:l>
+      <l:l i="110">&#7732;</l:l>
+      <l:l i="110">&#7733;</l:l>
+      <l:l i="120">L</l:l>
+      <l:l i="120">l</l:l>
+      <l:l i="120">&#313;</l:l>
+      <l:l i="120">&#314;</l:l>
+      <l:l i="120">&#315;</l:l>
+      <l:l i="120">&#316;</l:l>
+      <l:l i="120">&#317;</l:l>
+      <l:l i="120">&#318;</l:l>
+      <l:l i="120">&#319;</l:l>
+      <l:l i="120">&#320;</l:l>
+      <l:l i="120">&#321;</l:l>
+      <l:l i="120">&#322;</l:l>
+      <l:l i="120">&#410;</l:l>
+      <l:l i="120">&#456;</l:l>
+      <l:l i="120">&#564;</l:l>
+      <l:l i="120">&#619;</l:l>
+      <l:l i="120">&#620;</l:l>
+      <l:l i="120">&#621;</l:l>
+      <l:l i="120">&#7734;</l:l>
+      <l:l i="120">&#7735;</l:l>
+      <l:l i="120">&#7736;</l:l>
+      <l:l i="120">&#7737;</l:l>
+      <l:l i="120">&#7738;</l:l>
+      <l:l i="120">&#7739;</l:l>
+      <l:l i="120">&#7740;</l:l>
+      <l:l i="120">&#7741;</l:l>
+      <l:l i="130">M</l:l>
+      <l:l i="130">m</l:l>
+      <l:l i="130">&#625;</l:l>
+      <l:l i="130">&#7742;</l:l>
+      <l:l i="130">&#7743;</l:l>
+      <l:l i="130">&#7744;</l:l>
+      <l:l i="130">&#7745;</l:l>
+      <l:l i="130">&#7746;</l:l>
+      <l:l i="130">&#7747;</l:l>
+      <l:l i="140">N</l:l>
+      <l:l i="140">n</l:l>
+      <l:l i="140">&#209;</l:l>
+      <l:l i="140">&#241;</l:l>
+      <l:l i="140">&#323;</l:l>
+      <l:l i="140">&#324;</l:l>
+      <l:l i="140">&#325;</l:l>
+      <l:l i="140">&#326;</l:l>
+      <l:l i="140">&#327;</l:l>
+      <l:l i="140">&#328;</l:l>
+      <l:l i="140">&#413;</l:l>
+      <l:l i="140">&#626;</l:l>
+      <l:l i="140">&#414;</l:l>
+      <l:l i="140">&#544;</l:l>
+      <l:l i="140">&#459;</l:l>
+      <l:l i="140">&#504;</l:l>
+      <l:l i="140">&#505;</l:l>
+      <l:l i="140">&#565;</l:l>
+      <l:l i="140">&#627;</l:l>
+      <l:l i="140">&#7748;</l:l>
+      <l:l i="140">&#7749;</l:l>
+      <l:l i="140">&#7750;</l:l>
+      <l:l i="140">&#7751;</l:l>
+      <l:l i="140">&#7752;</l:l>
+      <l:l i="140">&#7753;</l:l>
+      <l:l i="140">&#7754;</l:l>
+      <l:l i="140">&#7755;</l:l>
+      <l:l i="150">O</l:l>
+      <l:l i="150">o</l:l>
+      <l:l i="150">&#210;</l:l>
+      <l:l i="150">&#242;</l:l>
+      <l:l i="150">&#211;</l:l>
+      <l:l i="150">&#243;</l:l>
+      <l:l i="150">&#212;</l:l>
+      <l:l i="150">&#244;</l:l>
+      <l:l i="150">&#213;</l:l>
+      <l:l i="150">&#245;</l:l>
+      <l:l i="150">&#214;</l:l>
+      <l:l i="150">&#246;</l:l>
+      <l:l i="150">&#216;</l:l>
+      <l:l i="150">&#248;</l:l>
+      <l:l i="150">&#332;</l:l>
+      <l:l i="150">&#333;</l:l>
+      <l:l i="150">&#334;</l:l>
+      <l:l i="150">&#335;</l:l>
+      <l:l i="150">&#336;</l:l>
+      <l:l i="150">&#337;</l:l>
+      <l:l i="150">&#415;</l:l>
+      <l:l i="150">&#416;</l:l>
+      <l:l i="150">&#417;</l:l>
+      <l:l i="150">&#465;</l:l>
+      <l:l i="150">&#466;</l:l>
+      <l:l i="150">&#490;</l:l>
+      <l:l i="150">&#491;</l:l>
+      <l:l i="150">&#492;</l:l>
+      <l:l i="150">&#493;</l:l>
+      <l:l i="150">&#510;</l:l>
+      <l:l i="150">&#511;</l:l>
+      <l:l i="150">&#524;</l:l>
+      <l:l i="150">&#525;</l:l>
+      <l:l i="150">&#526;</l:l>
+      <l:l i="150">&#527;</l:l>
+      <l:l i="150">&#554;</l:l>
+      <l:l i="150">&#555;</l:l>
+      <l:l i="150">&#556;</l:l>
+      <l:l i="150">&#557;</l:l>
+      <l:l i="150">&#558;</l:l>
+      <l:l i="150">&#559;</l:l>
+      <l:l i="150">&#560;</l:l>
+      <l:l i="150">&#561;</l:l>
+      <l:l i="150">&#7756;</l:l>
+      <l:l i="150">&#7757;</l:l>
+      <l:l i="150">&#7758;</l:l>
+      <l:l i="150">&#7759;</l:l>
+      <l:l i="150">&#7760;</l:l>
+      <l:l i="150">&#7761;</l:l>
+      <l:l i="150">&#7762;</l:l>
+      <l:l i="150">&#7763;</l:l>
+      <l:l i="150">&#7884;</l:l>
+      <l:l i="150">&#7885;</l:l>
+      <l:l i="150">&#7886;</l:l>
+      <l:l i="150">&#7887;</l:l>
+      <l:l i="150">&#7888;</l:l>
+      <l:l i="150">&#7889;</l:l>
+      <l:l i="150">&#7890;</l:l>
+      <l:l i="150">&#7891;</l:l>
+      <l:l i="150">&#7892;</l:l>
+      <l:l i="150">&#7893;</l:l>
+      <l:l i="150">&#7894;</l:l>
+      <l:l i="150">&#7895;</l:l>
+      <l:l i="150">&#7896;</l:l>
+      <l:l i="150">&#7897;</l:l>
+      <l:l i="150">&#7898;</l:l>
+      <l:l i="150">&#7899;</l:l>
+      <l:l i="150">&#7900;</l:l>
+      <l:l i="150">&#7901;</l:l>
+      <l:l i="150">&#7902;</l:l>
+      <l:l i="150">&#7903;</l:l>
+      <l:l i="150">&#7904;</l:l>
+      <l:l i="150">&#7905;</l:l>
+      <l:l i="150">&#7906;</l:l>
+      <l:l i="150">&#7907;</l:l>
+      <l:l i="160">P</l:l>
+      <l:l i="160">p</l:l>
+      <l:l i="160">&#420;</l:l>
+      <l:l i="160">&#421;</l:l>
+      <l:l i="160">&#7764;</l:l>
+      <l:l i="160">&#7765;</l:l>
+      <l:l i="160">&#7766;</l:l>
+      <l:l i="160">&#7767;</l:l>
+      <l:l i="170">Q</l:l>
+      <l:l i="170">q</l:l>
+      <l:l i="170">&#672;</l:l>
+      <l:l i="180">R</l:l>
+      <l:l i="180">r</l:l>
+      <l:l i="180">&#340;</l:l>
+      <l:l i="180">&#341;</l:l>
+      <l:l i="180">&#342;</l:l>
+      <l:l i="180">&#343;</l:l>
+      <l:l i="180">&#344;</l:l>
+      <l:l i="180">&#345;</l:l>
+      <l:l i="180">&#528;</l:l>
+      <l:l i="180">&#529;</l:l>
+      <l:l i="180">&#530;</l:l>
+      <l:l i="180">&#531;</l:l>
+      <l:l i="180">&#636;</l:l>
+      <l:l i="180">&#637;</l:l>
+      <l:l i="180">&#638;</l:l>
+      <l:l i="180">&#7768;</l:l>
+      <l:l i="180">&#7769;</l:l>
+      <l:l i="180">&#7770;</l:l>
+      <l:l i="180">&#7771;</l:l>
+      <l:l i="180">&#7772;</l:l>
+      <l:l i="180">&#7773;</l:l>
+      <l:l i="180">&#7774;</l:l>
+      <l:l i="180">&#7775;</l:l>
+      <l:l i="190">S</l:l>
+      <l:l i="190">s</l:l>
+      <l:l i="190">&#346;</l:l>
+      <l:l i="190">&#347;</l:l>
+      <l:l i="190">&#348;</l:l>
+      <l:l i="190">&#349;</l:l>
+      <l:l i="190">&#350;</l:l>
+      <l:l i="190">&#351;</l:l>
+      <l:l i="190">&#352;</l:l>
+      <l:l i="190">&#353;</l:l>
+      <l:l i="190">&#536;</l:l>
+      <l:l i="190">&#537;</l:l>
+      <l:l i="190">&#642;</l:l>
+      <l:l i="190">&#7776;</l:l>
+      <l:l i="190">&#7777;</l:l>
+      <l:l i="190">&#7778;</l:l>
+      <l:l i="190">&#7779;</l:l>
+      <l:l i="190">&#7780;</l:l>
+      <l:l i="190">&#7781;</l:l>
+      <l:l i="190">&#7782;</l:l>
+      <l:l i="190">&#7783;</l:l>
+      <l:l i="190">&#7784;</l:l>
+      <l:l i="190">&#7785;</l:l>
+      <l:l i="200">T</l:l>
+      <l:l i="200">t</l:l>
+      <l:l i="200">&#354;</l:l>
+      <l:l i="200">&#355;</l:l>
+      <l:l i="200">&#356;</l:l>
+      <l:l i="200">&#357;</l:l>
+      <l:l i="200">&#358;</l:l>
+      <l:l i="200">&#359;</l:l>
+      <l:l i="200">&#427;</l:l>
+      <l:l i="200">&#428;</l:l>
+      <l:l i="200">&#429;</l:l>
+      <l:l i="200">&#430;</l:l>
+      <l:l i="200">&#648;</l:l>
+      <l:l i="200">&#538;</l:l>
+      <l:l i="200">&#539;</l:l>
+      <l:l i="200">&#566;</l:l>
+      <l:l i="200">&#7786;</l:l>
+      <l:l i="200">&#7787;</l:l>
+      <l:l i="200">&#7788;</l:l>
+      <l:l i="200">&#7789;</l:l>
+      <l:l i="200">&#7790;</l:l>
+      <l:l i="200">&#7791;</l:l>
+      <l:l i="200">&#7792;</l:l>
+      <l:l i="200">&#7793;</l:l>
+      <l:l i="200">&#7831;</l:l>
+      <l:l i="210">U</l:l>
+      <l:l i="210">u</l:l>
+      <l:l i="210">&#217;</l:l>
+      <l:l i="210">&#249;</l:l>
+      <l:l i="210">&#218;</l:l>
+      <l:l i="210">&#250;</l:l>
+      <l:l i="210">&#219;</l:l>
+      <l:l i="210">&#251;</l:l>
+      <l:l i="210">&#220;</l:l>
+      <l:l i="210">&#252;</l:l>
+      <l:l i="210">&#360;</l:l>
+      <l:l i="210">&#361;</l:l>
+      <l:l i="210">&#362;</l:l>
+      <l:l i="210">&#363;</l:l>
+      <l:l i="210">&#364;</l:l>
+      <l:l i="210">&#365;</l:l>
+      <l:l i="210">&#366;</l:l>
+      <l:l i="210">&#367;</l:l>
+      <l:l i="210">&#368;</l:l>
+      <l:l i="210">&#369;</l:l>
+      <l:l i="210">&#370;</l:l>
+      <l:l i="210">&#371;</l:l>
+      <l:l i="210">&#431;</l:l>
+      <l:l i="210">&#432;</l:l>
+      <l:l i="210">&#467;</l:l>
+      <l:l i="210">&#468;</l:l>
+      <l:l i="210">&#469;</l:l>
+      <l:l i="210">&#470;</l:l>
+      <l:l i="210">&#471;</l:l>
+      <l:l i="210">&#472;</l:l>
+      <l:l i="210">&#473;</l:l>
+      <l:l i="210">&#474;</l:l>
+      <l:l i="210">&#475;</l:l>
+      <l:l i="210">&#476;</l:l>
+      <l:l i="210">&#532;</l:l>
+      <l:l i="210">&#533;</l:l>
+      <l:l i="210">&#534;</l:l>
+      <l:l i="210">&#535;</l:l>
+      <l:l i="210">&#7794;</l:l>
+      <l:l i="210">&#7795;</l:l>
+      <l:l i="210">&#7796;</l:l>
+      <l:l i="210">&#7797;</l:l>
+      <l:l i="210">&#7798;</l:l>
+      <l:l i="210">&#7799;</l:l>
+      <l:l i="210">&#7800;</l:l>
+      <l:l i="210">&#7801;</l:l>
+      <l:l i="210">&#7802;</l:l>
+      <l:l i="210">&#7803;</l:l>
+      <l:l i="210">&#7908;</l:l>
+      <l:l i="210">&#7909;</l:l>
+      <l:l i="210">&#7910;</l:l>
+      <l:l i="210">&#7911;</l:l>
+      <l:l i="210">&#7912;</l:l>
+      <l:l i="210">&#7913;</l:l>
+      <l:l i="210">&#7914;</l:l>
+      <l:l i="210">&#7915;</l:l>
+      <l:l i="210">&#7916;</l:l>
+      <l:l i="210">&#7917;</l:l>
+      <l:l i="210">&#7918;</l:l>
+      <l:l i="210">&#7919;</l:l>
+      <l:l i="210">&#7920;</l:l>
+      <l:l i="210">&#7921;</l:l>
+      <l:l i="220">V</l:l>
+      <l:l i="220">v</l:l>
+      <l:l i="220">&#434;</l:l>
+      <l:l i="220">&#651;</l:l>
+      <l:l i="220">&#7804;</l:l>
+      <l:l i="220">&#7805;</l:l>
+      <l:l i="220">&#7806;</l:l>
+      <l:l i="220">&#7807;</l:l>
+      <l:l i="230">W</l:l>
+      <l:l i="230">w</l:l>
+      <l:l i="230">&#372;</l:l>
+      <l:l i="230">&#373;</l:l>
+      <l:l i="230">&#7808;</l:l>
+      <l:l i="230">&#7809;</l:l>
+      <l:l i="230">&#7810;</l:l>
+      <l:l i="230">&#7811;</l:l>
+      <l:l i="230">&#7812;</l:l>
+      <l:l i="230">&#7813;</l:l>
+      <l:l i="230">&#7814;</l:l>
+      <l:l i="230">&#7815;</l:l>
+      <l:l i="230">&#7816;</l:l>
+      <l:l i="230">&#7817;</l:l>
+      <l:l i="230">&#7832;</l:l>
+      <l:l i="240">X</l:l>
+      <l:l i="240">x</l:l>
+      <l:l i="240">&#7818;</l:l>
+      <l:l i="240">&#7819;</l:l>
+      <l:l i="240">&#7820;</l:l>
+      <l:l i="240">&#7821;</l:l>
+      <l:l i="250">Y</l:l>
+      <l:l i="250">y</l:l>
+      <l:l i="250">&#221;</l:l>
+      <l:l i="250">&#253;</l:l>
+      <l:l i="250">&#255;</l:l>
+      <l:l i="250">&#376;</l:l>
+      <l:l i="250">&#374;</l:l>
+      <l:l i="250">&#375;</l:l>
+      <l:l i="250">&#435;</l:l>
+      <l:l i="250">&#436;</l:l>
+      <l:l i="250">&#562;</l:l>
+      <l:l i="250">&#563;</l:l>
+      <l:l i="250">&#7822;</l:l>
+      <l:l i="250">&#7823;</l:l>
+      <l:l i="250">&#7833;</l:l>
+      <l:l i="250">&#7922;</l:l>
+      <l:l i="250">&#7923;</l:l>
+      <l:l i="250">&#7924;</l:l>
+      <l:l i="250">&#7925;</l:l>
+      <l:l i="250">&#7926;</l:l>
+      <l:l i="250">&#7927;</l:l>
+      <l:l i="250">&#7928;</l:l>
+      <l:l i="250">&#7929;</l:l>
+      <l:l i="260">Z</l:l>
+      <l:l i="260">z</l:l>
+      <l:l i="260">&#377;</l:l>
+      <l:l i="260">&#378;</l:l>
+      <l:l i="260">&#379;</l:l>
+      <l:l i="260">&#380;</l:l>
+      <l:l i="260">&#381;</l:l>
+      <l:l i="260">&#382;</l:l>
+      <l:l i="260">&#437;</l:l>
+      <l:l i="260">&#438;</l:l>
+      <l:l i="260">&#548;</l:l>
+      <l:l i="260">&#549;</l:l>
+      <l:l i="260">&#656;</l:l>
+      <l:l i="260">&#657;</l:l>
+      <l:l i="260">&#7824;</l:l>
+      <l:l i="260">&#7825;</l:l>
+      <l:l i="260">&#7826;</l:l>
+      <l:l i="260">&#7827;</l:l>
+      <l:l i="260">&#7828;</l:l>
+      <l:l i="260">&#7829;</l:l>
+   </l:letters>
+</l:l10n>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/xh.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/xh.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/xh.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1153 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="xh" english-language-name="Xhosa">
+
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+   <l:gentext key="Abstract" text="Isiqalo"/>
+   <l:gentext key="abstract" text="Isiqalo"/>
+   <l:gentext key="Answer" text="I:"/>
+   <l:gentext key="answer" text="I:"/>
+   <l:gentext key="Appendix" text="Isivalo"/>
+   <l:gentext key="appendix" text="isivalo"/>
+   <l:gentext key="Article" text="Umba"/>
+   <l:gentext key="article" text="Umba"/>
+   <l:gentext key="Bibliography" text="Ezobunzululwazi"/>
+   <l:gentext key="bibliography" text="Ezobunzululwazi"/>
+   <l:gentext key="Book" text="Incwadi"/>
+   <l:gentext key="book" text="Incwadi"/>
+   <l:gentext key="CAUTION" text="ISILUMKISO"/>
+   <l:gentext key="Caution" text="Isilumkiso"/>
+   <l:gentext key="caution" text="Isilumkiso"/>
+   <l:gentext key="Chapter" text="Isiqendu"/>
+   <l:gentext key="chapter" text="isiqendu"/>
+   <l:gentext key="Colophon" text="Ikolophon"/>
+   <l:gentext key="colophon" text="Ikolophon"/>
+   <l:gentext key="Copyright" text="Ushicilelo olusemthethweni"/>
+   <l:gentext key="copyright" text="Ushicilelo olusemthethweni"/>
+   <l:gentext key="Dedication" text="Ulwaziso"/>
+   <l:gentext key="dedication" text="Ulwaziso"/>
+   <l:gentext key="Edition" text="Uhlelo"/>
+   <l:gentext key="edition" text="Uhlelo"/>
+   <l:gentext key="Equation" text="Ulinganiselo"/>
+   <l:gentext key="equation" text="Ulinganiselo"/>
+   <l:gentext key="Example" text="Umzekelo"/>
+   <l:gentext key="example" text="Umzekelo"/>
+   <l:gentext key="Figure" text="Ulungu"/>
+   <l:gentext key="figure" text="Ulungu"/>
+   <l:gentext key="Glossary" text="Inkcazelo yamagama"/>
+   <l:gentext key="glossary" text="Inkcazelo yamagama"/>
+   <l:gentext key="GlossSee" text="Bona"/>
+   <l:gentext key="glosssee" text="Bona"/>
+   <l:gentext key="GlossSeeAlso" text="Bona Kwakhona"/>
+   <l:gentext key="glossseealso" text="Bona Kwakhona"/>
+   <l:gentext key="IMPORTANT" text="IBALULEKILE"/>
+   <l:gentext key="important" text="Ibalulekile"/>
+   <l:gentext key="Important" text="Ibalulekile"/>
+   <l:gentext key="Index" text="Isalathiso"/>
+   <l:gentext key="index" text="Isalathiso"/>
+   <l:gentext key="ISBN" text="iISBN"/>
+   <l:gentext key="isbn" text="iISBN"/>
+   <l:gentext key="LegalNotice" text="Isaziso Esesimthethweni"/>
+   <l:gentext key="legalnotice" text="Isaziso Esesimthethweni"/>
+   <l:gentext key="MsgAud" text="Ababhali"/>
+   <l:gentext key="msgaud" text="Ababhali"/>
+   <l:gentext key="MsgLevel" text="Umphakamo"/>
+   <l:gentext key="msglevel" text="Umphakamo"/>
+   <l:gentext key="MsgOrig" text="Uqobo"/>
+   <l:gentext key="msgorig" text="Uqobo"/>
+   <l:gentext key="NOTE" text="QAPHELA"/>
+   <l:gentext key="Note" text="Qaphela"/>
+   <l:gentext key="note" text="Qaphela"/>
+   <l:gentext key="Part" text="Inxenye"/>
+   <l:gentext key="part" text="Inxenye"/>
+   <l:gentext key="Preface" text="Isihloko"/>
+   <l:gentext key="preface" text="Isihloko"/>
+   <l:gentext key="Procedure" text="Inkqubo"/>
+   <l:gentext key="procedure" text="Inkqubo"/>
+   <l:gentext key="ProductionSet" text="Imveliso"/>
+   <l:gentext key="PubDate" text="Publication Date" lang="en"/>
+   <l:gentext key="pubdate" text="Publication date" lang="en"/>
+   <l:gentext key="Published" text="Ipapashwe"/>
+   <l:gentext key="published" text="Ipapashwe"/>
+   <l:gentext key="Qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="Question" text="U:"/>
+   <l:gentext key="question" text="U:"/>
+   <l:gentext key="RefEntry" text=""/>
+   <l:gentext key="refentry" text=""/>
+   <l:gentext key="Reference" text="Uthelekiso"/>
+   <l:gentext key="reference" text="Uthelekiso"/>
+   <l:gentext key="RefName" text="Igama lothelekiso"/>
+   <l:gentext key="refname" text="Igama lothelekiso"/>
+   <l:gentext key="RefSection" text=""/>
+   <l:gentext key="refsection" text=""/>
+   <l:gentext key="RefSynopsisDiv" text="Isinopsisi"/>
+   <l:gentext key="refsynopsisdiv" text="Isinopsisi"/>
+   <l:gentext key="RevHistory" text="Imbali yophindo"/>
+   <l:gentext key="revhistory" text="Imbali yophindo"/>
+   <l:gentext key="revision" text="Iphindo"/>
+   <l:gentext key="Revision" text="Iphindo"/>
+   <l:gentext key="sect1" text="Icandelo"/>
+   <l:gentext key="sect2" text="Icandelo"/>
+   <l:gentext key="sect3" text="Icandelo"/>
+   <l:gentext key="sect4" text="Icandelo"/>
+   <l:gentext key="sect5" text="Icandelo"/>
+   <l:gentext key="section" text="Icandelo"/>
+   <l:gentext key="Section" text="Icandelo"/>
+   <l:gentext key="see" text="Bona"/>
+   <l:gentext key="See" text="Bona"/>
+   <l:gentext key="seealso" text="Bona Kwakhona"/>
+   <l:gentext key="Seealso" text="Bona Kwakhona"/>
+   <l:gentext key="SeeAlso" text="Bona Kwakhona"/>
+   <l:gentext key="set" text="Cwangcisa"/>
+   <l:gentext key="Set" text="Cwangcisa"/>
+   <l:gentext key="setindex" text="Cwangcisa Isalathiso"/>
+   <l:gentext key="SetIndex" text="Cwangcisa Isalathiso"/>
+   <l:gentext key="Sidebar" text=""/>
+   <l:gentext key="sidebar" text="ibar esecaleni"/>
+   <l:gentext key="step" text="inqwanqwa"/>
+   <l:gentext key="Step" text="Inqwanqwa"/>
+   <l:gentext key="Table" text="Indlela Yokwenza Imigca"/>
+   <l:gentext key="table" text="Indlela Yokwenza Imigca"/>
+   <l:gentext key="tip" text="Incam"/>
+   <l:gentext key="TIP" text="INCAM"/>
+   <l:gentext key="Tip" text="Incam"/>
+   <l:gentext key="Warning" text="Isilumkiso"/>
+   <l:gentext key="warning" text="Isilumkiso"/>
+   <l:gentext key="WARNING" text="ISILUMKISO"/>
+   <l:gentext key="and" text="no"/>
+   <l:gentext key="by" text="by"/>
+   <l:gentext key="called" text="called" lang="en"/>
+   <l:gentext key="Edited" text="Ihleliwe"/>
+   <l:gentext key="edited" text="Ihleliwe"/>
+   <l:gentext key="Editedby" text="Ihlelwe"/>
+   <l:gentext key="editedby" text="Ihlelwe"/>
+   <l:gentext key="in" text="in"/>
+   <l:gentext key="lastlistcomma" text=", "/>
+   <l:gentext key="listcomma" text=", "/>
+   <l:gentext key="nonexistantelement" text="isiqalelo esingekhayo"/>
+   <l:gentext key="notes" text="Iziqaphelo"/>
+   <l:gentext key="Notes" text="Iziqaphelo"/>
+   <l:gentext key="Pgs" text="Amaphepha"/>
+   <l:gentext key="pgs" text="Amaphepha"/>
+   <l:gentext key="Revisedby" text="Iphindwe ngu: "/>
+   <l:gentext key="revisedby" text="Iphindwe ngu:"/>
+   <l:gentext key="TableNotes" text="Iziqaphelo"/>
+   <l:gentext key="tablenotes" text="Iziqaphelo"/>
+   <l:gentext key="TableofContents" text="Imigca Yemixholo"/>
+   <l:gentext key="tableofcontents" text="Imigca Yemixholo"/>
+   <l:gentext key="the" text="" lang="en"/>
+   <l:gentext key="unexpectedelementname" text="Igama lesiqalelo esingalindelwanga"/>
+   <l:gentext key="unsupported" text="ayixhaswanga"/>
+   <l:gentext key="xrefto" text="thelekiso ku"/>
+   <l:gentext key="listofequations" text="Uluhlu Lemilinganiselo"/>
+   <l:gentext key="ListofEquations" text="Uluhlu Lemilinganiselo"/>
+   <l:gentext key="ListofExamples" text="Uluhlu Lemizekelo"/>
+   <l:gentext key="listofexamples" text="Uluhlu Lemizekelo"/>
+   <l:gentext key="ListofFigures" text="Uluhlu Lamalungu"/>
+   <l:gentext key="listoffigures" text="Uluhlu Lamalungu"/>
+   <l:gentext key="ListofProcedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listofprocedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listoftables" text="Uluhlu Lendlela Yokwenza Imigca"/>
+   <l:gentext key="ListofTables" text="Uluhlu Lendlela Yokwenza Imigca"/>
+   <l:gentext key="ListofUnknown" text="Uluhlu Lokungaziwayo"/>
+   <l:gentext key="listofunknown" text="Uluhlu Lokungaziwayo"/>
+   <l:gentext key="nav-home" text="Ikhaya"/>
+   <l:gentext key="nav-next" text="Elandelayo"/>
+   <l:gentext key="nav-next-sibling" text="Yisa Phambili"/>
+   <l:gentext key="nav-prev" text="Edlulileyo"/>
+   <l:gentext key="nav-prev-sibling" text="Yisa Emva"/>
+   <l:gentext key="nav-up" text="Phezulu"/>
+   <l:gentext key="nav-toc" text="ToC" lang="en"/>
+   <l:gentext key="Draft" text="Draft"/>
+   <l:gentext key="above" text="above"/>
+   <l:gentext key="below" text="below"/>
+   <l:gentext key="sectioncalled" text="icandelo libizwa ngokuba"/>
+   <l:gentext key="index symbols" text="Iimpawu"/>
+   <l:gentext key="lowercase.alpha" text="abcdefghijklmnopqrstuvwxyz"/>
+   <l:gentext key="uppercase.alpha" text="ABCDEFGHIJKLMNOPQRSTUVWXYZ"/>
+   <l:dingbat key="startquote" text="&#8220;"/>
+   <l:dingbat key="endquote" text="&#8221;"/>
+   <l:dingbat key="nestedstartquote" text="&#8216;"/>
+   <l:dingbat key="nestedendquote" text="&#8217;"/>
+   <l:dingbat key="singlestartquote" text="&#8216;" lang="en"/>
+   <l:dingbat key="singleendquote" text="&#8217;" lang="en"/>
+   <l:dingbat key="bullet" text="&#8226;"/>
+   <l:gentext key="hyphenation-character" text="-" lang="en"/>
+   <l:gentext key="hyphenation-push-character-count" text="2" lang="en"/>
+   <l:gentext key="hyphenation-remain-character-count" text="2" lang="en"/>
+
+   <l:context name="styles">
+      <l:template name="person-name" text="first-last"/>
+   </l:context>
+
+   <l:context name="title">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="%t"/>
+      <l:template name="appendix" text="Isivalo %n. %t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="biblioentry" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliolist" text="%t" lang="en"/>
+      <l:template name="bibliomixed" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="Isiqendu %n. %t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="Ulinganiselo %n. %t"/>
+      <l:template name="example" text="Umzekelo %n. %t"/>
+      <l:template name="figure" text="Ulungu %n. %t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="glosslist" text="%t" lang="en"/>
+      <l:template name="glossentry" text="%t" lang="en"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text=""/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="Inxenye %n. %t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="procedure.formal" text="Inkqubo %n. %t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="productionset.formal" text="Imveliso %n"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="%t"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="%t"/>
+      <l:template name="refentry" text="%t"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsection" text="%t"/>
+      <l:template name="refsect1" text="%t"/>
+      <l:template name="refsect2" text="%t"/>
+      <l:template name="refsect3" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="refsynopsisdivinfo" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="step" text="%t"/>
+      <l:template name="table" text="Indlela Yokwenza Imigca %n. %t"/>
+      <l:template name="task" text="%t" lang="en"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text=""/>
+      <l:template name="warning" text="%t"/>
+   </l:context>
+
+   <l:context name="title-unnumbered">
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article/appendix" text="%t" lang="en"/>
+      <l:template name="bridgehead" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="sect1" text="%t"/>
+      <l:template name="sect2" text="%t"/>
+      <l:template name="sect3" text="%t"/>
+      <l:template name="sect4" text="%t"/>
+      <l:template name="sect5" text="%t"/>
+      <l:template name="section" text="%t"/>
+      <l:template name="simplesect" text="%t"/>
+   </l:context>
+
+   <l:context name="title-numbered">
+      <l:template name="appendix" text="Isivalo %n. %t"/>
+      <l:template name="article/appendix" text="%n.&#160;%t" lang="en"/>
+      <l:template name="bridgehead" text="%n. %t"/>
+      <l:template name="chapter" text="Isiqendu %n. %t"/>
+      <l:template name="sect1" text="%n. %t"/>
+      <l:template name="sect2" text="%n. %t"/>
+      <l:template name="sect3" text="%n. %t"/>
+      <l:template name="sect4" text="%n. %t"/>
+      <l:template name="sect5" text="%n. %t"/>
+      <l:template name="section" text="%n. %t"/>
+      <l:template name="simplesect" text="%t"/>
+   </l:context>
+
+   <l:context name="subtitle">
+      <l:template name="appendix" text="%s"/>
+      <l:template name="article" text="%s"/>
+      <l:template name="bibliodiv" text="%s"/>
+      <l:template name="biblioentry" text="%s"/>
+      <l:template name="bibliography" text="%s"/>
+      <l:template name="bibliomixed" text="%s"/>
+      <l:template name="bibliomset" text="%s"/>
+      <l:template name="biblioset" text="%s"/>
+      <l:template name="book" text="%s"/>
+      <l:template name="chapter" text="%s"/>
+      <l:template name="colophon" text="%s"/>
+      <l:template name="dedication" text="%s"/>
+      <l:template name="glossary" text="%s"/>
+      <l:template name="glossdiv" text="%s"/>
+      <l:template name="index" text="%s"/>
+      <l:template name="indexdiv" text="%s"/>
+      <l:template name="lot" text="%s"/>
+      <l:template name="part" text="%s"/>
+      <l:template name="partintro" text="%s"/>
+      <l:template name="preface" text="%s"/>
+      <l:template name="refentry" text="%s"/>
+      <l:template name="reference" text="%s"/>
+      <l:template name="refsection" text="%s"/>
+      <l:template name="refsect1" text="%s"/>
+      <l:template name="refsect2" text="%s"/>
+      <l:template name="refsect3" text="%s"/>
+      <l:template name="refsynopsisdiv" text="%s"/>
+      <l:template name="sect1" text="%s"/>
+      <l:template name="sect2" text="%s"/>
+      <l:template name="sect3" text="%s"/>
+      <l:template name="sect4" text="%s"/>
+      <l:template name="sect5" text="%s"/>
+      <l:template name="section" text="%s"/>
+      <l:template name="set" text="%s"/>
+      <l:template name="setindex" text="%s"/>
+      <l:template name="sidebar" text="%s"/>
+      <l:template name="simplesect" text="%s"/>
+      <l:template name="toc" text="%s"/>
+   </l:context>
+
+   <l:context name="xref">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="I:&#160;%n"/>
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="constraintdef" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="%t"/>
+      <l:template name="example" text="%t"/>
+      <l:template name="figure" text="%t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text="%n"/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="%t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="U:&#160;%n"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="U:&#160;%n"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="table" text="%t"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="%n"/>
+      <l:template name="warning" text="%t"/>
+      <l:template name="page.citation" text=" [%p]"/>
+      <l:template name="page" text="(page %p)" lang="en"/>
+      <l:template name="pageabbrev" text="(p. %p)" lang="en"/>
+      <l:template name="Page" text="Page %p" lang="en"/>
+      <l:template name="bridgehead" text="icandelo libizwa ngokuba &#8220;%t&#8221;"/>
+      <l:template name="refsection" text="icandelo libizwa ngokuba &#8220;%t&#8221;"/>
+      <l:template name="refsect1" text="icandelo libizwa ngokuba &#8220;%t&#8221;"/>
+      <l:template name="refsect2" text="icandelo libizwa ngokuba &#8220;%t&#8221;"/>
+      <l:template name="refsect3" text="icandelo libizwa ngokuba &#8220;%t&#8221;"/>
+      <l:template name="sect1" text="icandelo libizwa ngokuba &#8220;%t&#8221;"/>
+      <l:template name="sect2" text="icandelo libizwa ngokuba &#8220;%t&#8221;"/>
+      <l:template name="sect3" text="icandelo libizwa ngokuba &#8220;%t&#8221;"/>
+      <l:template name="sect4" text="icandelo libizwa ngokuba &#8220;%t&#8221;"/>
+      <l:template name="sect5" text="icandelo libizwa ngokuba &#8220;%t&#8221;"/>
+      <l:template name="section" text="icandelo libizwa ngokuba &#8220;%t&#8221;"/>
+      <l:template name="simplesect" text="icandelo libizwa ngokuba &#8220;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="xref-number">
+      <l:template name="answer" text="I:&#160;%n"/>
+      <l:template name="appendix" text="Isivalo&#160;%n"/>
+      <l:template name="bridgehead" text="Icandelo&#160;%n"/>
+      <l:template name="chapter" text="Isiqendu&#160;%n"/>
+      <l:template name="equation" text="Ulinganiselo&#160;%n"/>
+      <l:template name="example" text="Umzekelo&#160;%n"/>
+      <l:template name="figure" text="Ulungu&#160;%n"/>
+      <l:template name="part" text="Inxenye&#160;%n"/>
+      <l:template name="procedure" text="Inkqubo&#160;%n"/>
+      <l:template name="productionset" text="Imveliso&#160;%n"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n"/>
+      <l:template name="qandaentry" text="U:&#160;%n"/>
+      <l:template name="question" text="U:&#160;%n"/>
+      <l:template name="sect1" text="Icandelo&#160;%n"/>
+      <l:template name="sect2" text="Icandelo&#160;%n"/>
+      <l:template name="sect3" text="Icandelo&#160;%n"/>
+      <l:template name="sect4" text="Icandelo&#160;%n"/>
+      <l:template name="sect5" text="Icandelo&#160;%n"/>
+      <l:template name="section" text="Icandelo&#160;%n"/>
+      <l:template name="table" text="Indlela Yokwenza Imigca&#160;%n"/>
+   </l:context>
+
+   <l:context name="xref-number-and-title">
+      <l:template name="appendix" text="Isivalo&#160;%n, %t"/>
+      <l:template name="bridgehead" text="Icandelo&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="chapter" text="Isiqendu&#160;%n, %t"/>
+      <l:template name="equation" text="Ulinganiselo&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="example" text="Umzekelo&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="figure" text="Ulungu&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="part" text="Inxenye&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="procedure" text="Inkqubo&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="productionset" text="Imveliso&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="refsect1" text="icandelo libizwa ngokuba &#8220;%t&#8221;"/>
+      <l:template name="refsect2" text="icandelo libizwa ngokuba &#8220;%t&#8221;"/>
+      <l:template name="refsect3" text="icandelo libizwa ngokuba &#8220;%t&#8221;"/>
+      <l:template name="refsection" text="icandelo libizwa ngokuba &#8220;%t&#8221;"/>
+      <l:template name="sect1" text="Icandelo&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect2" text="Icandelo&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect3" text="Icandelo&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect4" text="Icandelo&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="sect5" text="Icandelo&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="section" text="Icandelo&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="simplesect" text="icandelo libizwa ngokuba &#8220;%t&#8221;"/>
+      <l:template name="table" text="Indlela Yokwenza Imigca&#160;%n, &#8220;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="authorgroup">
+      <l:template name="sep" text=" no "/>
+      <l:template name="sep2" text=" no "/>
+      <l:template name="seplast" text=" no "/>
+   </l:context>
+
+   <l:context name="glossary">
+      <l:template name="see" text="Bona "/>
+      <l:template name="seealso" text="Bona Kwakhona "/>
+   </l:context>
+
+   <l:context name="msgset">
+      <l:template name="MsgAud" text="Ababhali: "/>
+      <l:template name="MsgLevel" text="Umphakamo: "/>
+      <l:template name="MsgOrig" text="Uqobo: "/>
+   </l:context>
+
+   <l:context name="datetime">
+      <l:template name="format" text="m/d/Y" lang="en"/>
+   </l:context>
+
+   <l:context name="datetime-full">
+      <l:template name="January" text="January" lang="en"/>
+      <l:template name="February" text="February" lang="en"/>
+      <l:template name="March" text="March" lang="en"/>
+      <l:template name="April" text="April" lang="en"/>
+      <l:template name="May" text="May" lang="en"/>
+      <l:template name="June" text="June" lang="en"/>
+      <l:template name="July" text="July" lang="en"/>
+      <l:template name="August" text="August" lang="en"/>
+      <l:template name="September" text="September" lang="en"/>
+      <l:template name="October" text="October" lang="en"/>
+      <l:template name="November" text="November" lang="en"/>
+      <l:template name="December" text="December" lang="en"/>
+      <l:template name="Monday" text="Monday" lang="en"/>
+      <l:template name="Tuesday" text="Tuesday" lang="en"/>
+      <l:template name="Wednesday" text="Wednesday" lang="en"/>
+      <l:template name="Thursday" text="Thursday" lang="en"/>
+      <l:template name="Friday" text="Friday" lang="en"/>
+      <l:template name="Saturday" text="Saturday" lang="en"/>
+      <l:template name="Sunday" text="Sunday" lang="en"/>
+   </l:context>
+
+   <l:context name="datetime-abbrev">
+      <l:template name="Jan" text="Jan" lang="en"/>
+      <l:template name="Feb" text="Feb" lang="en"/>
+      <l:template name="Mar" text="Mar" lang="en"/>
+      <l:template name="Apr" text="Apr" lang="en"/>
+      <l:template name="May" text="May" lang="en"/>
+      <l:template name="Jun" text="Jun" lang="en"/>
+      <l:template name="Jul" text="Jul" lang="en"/>
+      <l:template name="Aug" text="Aug" lang="en"/>
+      <l:template name="Sep" text="Sep" lang="en"/>
+      <l:template name="Oct" text="Oct" lang="en"/>
+      <l:template name="Nov" text="Nov" lang="en"/>
+      <l:template name="Dec" text="Dec" lang="en"/>
+      <l:template name="Mon" text="Mon" lang="en"/>
+      <l:template name="Tue" text="Tue" lang="en"/>
+      <l:template name="Wed" text="Wed" lang="en"/>
+      <l:template name="Thu" text="Thu" lang="en"/>
+      <l:template name="Fri" text="Fri" lang="en"/>
+      <l:template name="Sat" text="Sat" lang="en"/>
+      <l:template name="Sun" text="Sun" lang="en"/>
+   </l:context>
+
+   <l:context name="htmlhelp">
+      <l:template name="langcode" text="0x0409 English (UNITED STATES)" lang="en"/>
+   </l:context>
+
+   <l:letters lang="en">
+      <l:l i="-1"/>
+      <l:l i="0">Symbols</l:l>
+      <l:l i="10">A</l:l>
+      <l:l i="10">a</l:l>
+      <l:l i="10">&#192;</l:l>
+      <l:l i="10">&#224;</l:l>
+      <l:l i="10">&#193;</l:l>
+      <l:l i="10">&#225;</l:l>
+      <l:l i="10">&#194;</l:l>
+      <l:l i="10">&#226;</l:l>
+      <l:l i="10">&#195;</l:l>
+      <l:l i="10">&#227;</l:l>
+      <l:l i="10">&#196;</l:l>
+      <l:l i="10">&#228;</l:l>
+      <l:l i="10">&#197;</l:l>
+      <l:l i="10">&#229;</l:l>
+      <l:l i="10">&#256;</l:l>
+      <l:l i="10">&#257;</l:l>
+      <l:l i="10">&#258;</l:l>
+      <l:l i="10">&#259;</l:l>
+      <l:l i="10">&#260;</l:l>
+      <l:l i="10">&#261;</l:l>
+      <l:l i="10">&#461;</l:l>
+      <l:l i="10">&#462;</l:l>
+      <l:l i="10">&#478;</l:l>
+      <l:l i="10">&#479;</l:l>
+      <l:l i="10">&#480;</l:l>
+      <l:l i="10">&#481;</l:l>
+      <l:l i="10">&#506;</l:l>
+      <l:l i="10">&#507;</l:l>
+      <l:l i="10">&#512;</l:l>
+      <l:l i="10">&#513;</l:l>
+      <l:l i="10">&#514;</l:l>
+      <l:l i="10">&#515;</l:l>
+      <l:l i="10">&#550;</l:l>
+      <l:l i="10">&#551;</l:l>
+      <l:l i="10">&#7680;</l:l>
+      <l:l i="10">&#7681;</l:l>
+      <l:l i="10">&#7834;</l:l>
+      <l:l i="10">&#7840;</l:l>
+      <l:l i="10">&#7841;</l:l>
+      <l:l i="10">&#7842;</l:l>
+      <l:l i="10">&#7843;</l:l>
+      <l:l i="10">&#7844;</l:l>
+      <l:l i="10">&#7845;</l:l>
+      <l:l i="10">&#7846;</l:l>
+      <l:l i="10">&#7847;</l:l>
+      <l:l i="10">&#7848;</l:l>
+      <l:l i="10">&#7849;</l:l>
+      <l:l i="10">&#7850;</l:l>
+      <l:l i="10">&#7851;</l:l>
+      <l:l i="10">&#7852;</l:l>
+      <l:l i="10">&#7853;</l:l>
+      <l:l i="10">&#7854;</l:l>
+      <l:l i="10">&#7855;</l:l>
+      <l:l i="10">&#7856;</l:l>
+      <l:l i="10">&#7857;</l:l>
+      <l:l i="10">&#7858;</l:l>
+      <l:l i="10">&#7859;</l:l>
+      <l:l i="10">&#7860;</l:l>
+      <l:l i="10">&#7861;</l:l>
+      <l:l i="10">&#7862;</l:l>
+      <l:l i="10">&#7863;</l:l>
+      <l:l i="20">B</l:l>
+      <l:l i="20">b</l:l>
+      <l:l i="20">&#384;</l:l>
+      <l:l i="20">&#385;</l:l>
+      <l:l i="20">&#595;</l:l>
+      <l:l i="20">&#386;</l:l>
+      <l:l i="20">&#387;</l:l>
+      <l:l i="20">&#7682;</l:l>
+      <l:l i="20">&#7683;</l:l>
+      <l:l i="20">&#7684;</l:l>
+      <l:l i="20">&#7685;</l:l>
+      <l:l i="20">&#7686;</l:l>
+      <l:l i="20">&#7687;</l:l>
+      <l:l i="30">C</l:l>
+      <l:l i="30">c</l:l>
+      <l:l i="30">&#199;</l:l>
+      <l:l i="30">&#231;</l:l>
+      <l:l i="30">&#262;</l:l>
+      <l:l i="30">&#263;</l:l>
+      <l:l i="30">&#264;</l:l>
+      <l:l i="30">&#265;</l:l>
+      <l:l i="30">&#266;</l:l>
+      <l:l i="30">&#267;</l:l>
+      <l:l i="30">&#268;</l:l>
+      <l:l i="30">&#269;</l:l>
+      <l:l i="30">&#391;</l:l>
+      <l:l i="30">&#392;</l:l>
+      <l:l i="30">&#597;</l:l>
+      <l:l i="30">&#7688;</l:l>
+      <l:l i="30">&#7689;</l:l>
+      <l:l i="40">D</l:l>
+      <l:l i="40">d</l:l>
+      <l:l i="40">&#270;</l:l>
+      <l:l i="40">&#271;</l:l>
+      <l:l i="40">&#272;</l:l>
+      <l:l i="40">&#273;</l:l>
+      <l:l i="40">&#394;</l:l>
+      <l:l i="40">&#599;</l:l>
+      <l:l i="40">&#395;</l:l>
+      <l:l i="40">&#396;</l:l>
+      <l:l i="40">&#453;</l:l>
+      <l:l i="40">&#498;</l:l>
+      <l:l i="40">&#545;</l:l>
+      <l:l i="40">&#598;</l:l>
+      <l:l i="40">&#7690;</l:l>
+      <l:l i="40">&#7691;</l:l>
+      <l:l i="40">&#7692;</l:l>
+      <l:l i="40">&#7693;</l:l>
+      <l:l i="40">&#7694;</l:l>
+      <l:l i="40">&#7695;</l:l>
+      <l:l i="40">&#7696;</l:l>
+      <l:l i="40">&#7697;</l:l>
+      <l:l i="40">&#7698;</l:l>
+      <l:l i="40">&#7699;</l:l>
+      <l:l i="50">E</l:l>
+      <l:l i="50">e</l:l>
+      <l:l i="50">&#200;</l:l>
+      <l:l i="50">&#232;</l:l>
+      <l:l i="50">&#201;</l:l>
+      <l:l i="50">&#233;</l:l>
+      <l:l i="50">&#202;</l:l>
+      <l:l i="50">&#234;</l:l>
+      <l:l i="50">&#203;</l:l>
+      <l:l i="50">&#235;</l:l>
+      <l:l i="50">&#274;</l:l>
+      <l:l i="50">&#275;</l:l>
+      <l:l i="50">&#276;</l:l>
+      <l:l i="50">&#277;</l:l>
+      <l:l i="50">&#278;</l:l>
+      <l:l i="50">&#279;</l:l>
+      <l:l i="50">&#280;</l:l>
+      <l:l i="50">&#281;</l:l>
+      <l:l i="50">&#282;</l:l>
+      <l:l i="50">&#283;</l:l>
+      <l:l i="50">&#516;</l:l>
+      <l:l i="50">&#517;</l:l>
+      <l:l i="50">&#518;</l:l>
+      <l:l i="50">&#519;</l:l>
+      <l:l i="50">&#552;</l:l>
+      <l:l i="50">&#553;</l:l>
+      <l:l i="50">&#7700;</l:l>
+      <l:l i="50">&#7701;</l:l>
+      <l:l i="50">&#7702;</l:l>
+      <l:l i="50">&#7703;</l:l>
+      <l:l i="50">&#7704;</l:l>
+      <l:l i="50">&#7705;</l:l>
+      <l:l i="50">&#7706;</l:l>
+      <l:l i="50">&#7707;</l:l>
+      <l:l i="50">&#7708;</l:l>
+      <l:l i="50">&#7709;</l:l>
+      <l:l i="50">&#7864;</l:l>
+      <l:l i="50">&#7865;</l:l>
+      <l:l i="50">&#7866;</l:l>
+      <l:l i="50">&#7867;</l:l>
+      <l:l i="50">&#7868;</l:l>
+      <l:l i="50">&#7869;</l:l>
+      <l:l i="50">&#7870;</l:l>
+      <l:l i="50">&#7871;</l:l>
+      <l:l i="50">&#7872;</l:l>
+      <l:l i="50">&#7873;</l:l>
+      <l:l i="50">&#7874;</l:l>
+      <l:l i="50">&#7875;</l:l>
+      <l:l i="50">&#7876;</l:l>
+      <l:l i="50">&#7877;</l:l>
+      <l:l i="50">&#7878;</l:l>
+      <l:l i="50">&#7879;</l:l>
+      <l:l i="60">F</l:l>
+      <l:l i="60">f</l:l>
+      <l:l i="60">&#401;</l:l>
+      <l:l i="60">&#402;</l:l>
+      <l:l i="60">&#7710;</l:l>
+      <l:l i="60">&#7711;</l:l>
+      <l:l i="70">G</l:l>
+      <l:l i="70">g</l:l>
+      <l:l i="70">&#284;</l:l>
+      <l:l i="70">&#285;</l:l>
+      <l:l i="70">&#286;</l:l>
+      <l:l i="70">&#287;</l:l>
+      <l:l i="70">&#288;</l:l>
+      <l:l i="70">&#289;</l:l>
+      <l:l i="70">&#290;</l:l>
+      <l:l i="70">&#291;</l:l>
+      <l:l i="70">&#403;</l:l>
+      <l:l i="70">&#608;</l:l>
+      <l:l i="70">&#484;</l:l>
+      <l:l i="70">&#485;</l:l>
+      <l:l i="70">&#486;</l:l>
+      <l:l i="70">&#487;</l:l>
+      <l:l i="70">&#500;</l:l>
+      <l:l i="70">&#501;</l:l>
+      <l:l i="70">&#7712;</l:l>
+      <l:l i="70">&#7713;</l:l>
+      <l:l i="80">H</l:l>
+      <l:l i="80">h</l:l>
+      <l:l i="80">&#292;</l:l>
+      <l:l i="80">&#293;</l:l>
+      <l:l i="80">&#294;</l:l>
+      <l:l i="80">&#295;</l:l>
+      <l:l i="80">&#542;</l:l>
+      <l:l i="80">&#543;</l:l>
+      <l:l i="80">&#614;</l:l>
+      <l:l i="80">&#7714;</l:l>
+      <l:l i="80">&#7715;</l:l>
+      <l:l i="80">&#7716;</l:l>
+      <l:l i="80">&#7717;</l:l>
+      <l:l i="80">&#7718;</l:l>
+      <l:l i="80">&#7719;</l:l>
+      <l:l i="80">&#7720;</l:l>
+      <l:l i="80">&#7721;</l:l>
+      <l:l i="80">&#7722;</l:l>
+      <l:l i="80">&#7723;</l:l>
+      <l:l i="80">&#7830;</l:l>
+      <l:l i="90">I</l:l>
+      <l:l i="90">i</l:l>
+      <l:l i="90">&#204;</l:l>
+      <l:l i="90">&#236;</l:l>
+      <l:l i="90">&#205;</l:l>
+      <l:l i="90">&#237;</l:l>
+      <l:l i="90">&#206;</l:l>
+      <l:l i="90">&#238;</l:l>
+      <l:l i="90">&#207;</l:l>
+      <l:l i="90">&#239;</l:l>
+      <l:l i="90">&#296;</l:l>
+      <l:l i="90">&#297;</l:l>
+      <l:l i="90">&#298;</l:l>
+      <l:l i="90">&#299;</l:l>
+      <l:l i="90">&#300;</l:l>
+      <l:l i="90">&#301;</l:l>
+      <l:l i="90">&#302;</l:l>
+      <l:l i="90">&#303;</l:l>
+      <l:l i="90">&#304;</l:l>
+      <l:l i="90">&#407;</l:l>
+      <l:l i="90">&#616;</l:l>
+      <l:l i="90">&#463;</l:l>
+      <l:l i="90">&#464;</l:l>
+      <l:l i="90">&#520;</l:l>
+      <l:l i="90">&#521;</l:l>
+      <l:l i="90">&#522;</l:l>
+      <l:l i="90">&#523;</l:l>
+      <l:l i="90">&#7724;</l:l>
+      <l:l i="90">&#7725;</l:l>
+      <l:l i="90">&#7726;</l:l>
+      <l:l i="90">&#7727;</l:l>
+      <l:l i="90">&#7880;</l:l>
+      <l:l i="90">&#7881;</l:l>
+      <l:l i="90">&#7882;</l:l>
+      <l:l i="90">&#7883;</l:l>
+      <l:l i="100">J</l:l>
+      <l:l i="100">j</l:l>
+      <l:l i="100">&#308;</l:l>
+      <l:l i="100">&#309;</l:l>
+      <l:l i="100">&#496;</l:l>
+      <l:l i="100">&#669;</l:l>
+      <l:l i="110">K</l:l>
+      <l:l i="110">k</l:l>
+      <l:l i="110">&#310;</l:l>
+      <l:l i="110">&#311;</l:l>
+      <l:l i="110">&#408;</l:l>
+      <l:l i="110">&#409;</l:l>
+      <l:l i="110">&#488;</l:l>
+      <l:l i="110">&#489;</l:l>
+      <l:l i="110">&#7728;</l:l>
+      <l:l i="110">&#7729;</l:l>
+      <l:l i="110">&#7730;</l:l>
+      <l:l i="110">&#7731;</l:l>
+      <l:l i="110">&#7732;</l:l>
+      <l:l i="110">&#7733;</l:l>
+      <l:l i="120">L</l:l>
+      <l:l i="120">l</l:l>
+      <l:l i="120">&#313;</l:l>
+      <l:l i="120">&#314;</l:l>
+      <l:l i="120">&#315;</l:l>
+      <l:l i="120">&#316;</l:l>
+      <l:l i="120">&#317;</l:l>
+      <l:l i="120">&#318;</l:l>
+      <l:l i="120">&#319;</l:l>
+      <l:l i="120">&#320;</l:l>
+      <l:l i="120">&#321;</l:l>
+      <l:l i="120">&#322;</l:l>
+      <l:l i="120">&#410;</l:l>
+      <l:l i="120">&#456;</l:l>
+      <l:l i="120">&#564;</l:l>
+      <l:l i="120">&#619;</l:l>
+      <l:l i="120">&#620;</l:l>
+      <l:l i="120">&#621;</l:l>
+      <l:l i="120">&#7734;</l:l>
+      <l:l i="120">&#7735;</l:l>
+      <l:l i="120">&#7736;</l:l>
+      <l:l i="120">&#7737;</l:l>
+      <l:l i="120">&#7738;</l:l>
+      <l:l i="120">&#7739;</l:l>
+      <l:l i="120">&#7740;</l:l>
+      <l:l i="120">&#7741;</l:l>
+      <l:l i="130">M</l:l>
+      <l:l i="130">m</l:l>
+      <l:l i="130">&#625;</l:l>
+      <l:l i="130">&#7742;</l:l>
+      <l:l i="130">&#7743;</l:l>
+      <l:l i="130">&#7744;</l:l>
+      <l:l i="130">&#7745;</l:l>
+      <l:l i="130">&#7746;</l:l>
+      <l:l i="130">&#7747;</l:l>
+      <l:l i="140">N</l:l>
+      <l:l i="140">n</l:l>
+      <l:l i="140">&#209;</l:l>
+      <l:l i="140">&#241;</l:l>
+      <l:l i="140">&#323;</l:l>
+      <l:l i="140">&#324;</l:l>
+      <l:l i="140">&#325;</l:l>
+      <l:l i="140">&#326;</l:l>
+      <l:l i="140">&#327;</l:l>
+      <l:l i="140">&#328;</l:l>
+      <l:l i="140">&#413;</l:l>
+      <l:l i="140">&#626;</l:l>
+      <l:l i="140">&#414;</l:l>
+      <l:l i="140">&#544;</l:l>
+      <l:l i="140">&#459;</l:l>
+      <l:l i="140">&#504;</l:l>
+      <l:l i="140">&#505;</l:l>
+      <l:l i="140">&#565;</l:l>
+      <l:l i="140">&#627;</l:l>
+      <l:l i="140">&#7748;</l:l>
+      <l:l i="140">&#7749;</l:l>
+      <l:l i="140">&#7750;</l:l>
+      <l:l i="140">&#7751;</l:l>
+      <l:l i="140">&#7752;</l:l>
+      <l:l i="140">&#7753;</l:l>
+      <l:l i="140">&#7754;</l:l>
+      <l:l i="140">&#7755;</l:l>
+      <l:l i="150">O</l:l>
+      <l:l i="150">o</l:l>
+      <l:l i="150">&#210;</l:l>
+      <l:l i="150">&#242;</l:l>
+      <l:l i="150">&#211;</l:l>
+      <l:l i="150">&#243;</l:l>
+      <l:l i="150">&#212;</l:l>
+      <l:l i="150">&#244;</l:l>
+      <l:l i="150">&#213;</l:l>
+      <l:l i="150">&#245;</l:l>
+      <l:l i="150">&#214;</l:l>
+      <l:l i="150">&#246;</l:l>
+      <l:l i="150">&#216;</l:l>
+      <l:l i="150">&#248;</l:l>
+      <l:l i="150">&#332;</l:l>
+      <l:l i="150">&#333;</l:l>
+      <l:l i="150">&#334;</l:l>
+      <l:l i="150">&#335;</l:l>
+      <l:l i="150">&#336;</l:l>
+      <l:l i="150">&#337;</l:l>
+      <l:l i="150">&#415;</l:l>
+      <l:l i="150">&#416;</l:l>
+      <l:l i="150">&#417;</l:l>
+      <l:l i="150">&#465;</l:l>
+      <l:l i="150">&#466;</l:l>
+      <l:l i="150">&#490;</l:l>
+      <l:l i="150">&#491;</l:l>
+      <l:l i="150">&#492;</l:l>
+      <l:l i="150">&#493;</l:l>
+      <l:l i="150">&#510;</l:l>
+      <l:l i="150">&#511;</l:l>
+      <l:l i="150">&#524;</l:l>
+      <l:l i="150">&#525;</l:l>
+      <l:l i="150">&#526;</l:l>
+      <l:l i="150">&#527;</l:l>
+      <l:l i="150">&#554;</l:l>
+      <l:l i="150">&#555;</l:l>
+      <l:l i="150">&#556;</l:l>
+      <l:l i="150">&#557;</l:l>
+      <l:l i="150">&#558;</l:l>
+      <l:l i="150">&#559;</l:l>
+      <l:l i="150">&#560;</l:l>
+      <l:l i="150">&#561;</l:l>
+      <l:l i="150">&#7756;</l:l>
+      <l:l i="150">&#7757;</l:l>
+      <l:l i="150">&#7758;</l:l>
+      <l:l i="150">&#7759;</l:l>
+      <l:l i="150">&#7760;</l:l>
+      <l:l i="150">&#7761;</l:l>
+      <l:l i="150">&#7762;</l:l>
+      <l:l i="150">&#7763;</l:l>
+      <l:l i="150">&#7884;</l:l>
+      <l:l i="150">&#7885;</l:l>
+      <l:l i="150">&#7886;</l:l>
+      <l:l i="150">&#7887;</l:l>
+      <l:l i="150">&#7888;</l:l>
+      <l:l i="150">&#7889;</l:l>
+      <l:l i="150">&#7890;</l:l>
+      <l:l i="150">&#7891;</l:l>
+      <l:l i="150">&#7892;</l:l>
+      <l:l i="150">&#7893;</l:l>
+      <l:l i="150">&#7894;</l:l>
+      <l:l i="150">&#7895;</l:l>
+      <l:l i="150">&#7896;</l:l>
+      <l:l i="150">&#7897;</l:l>
+      <l:l i="150">&#7898;</l:l>
+      <l:l i="150">&#7899;</l:l>
+      <l:l i="150">&#7900;</l:l>
+      <l:l i="150">&#7901;</l:l>
+      <l:l i="150">&#7902;</l:l>
+      <l:l i="150">&#7903;</l:l>
+      <l:l i="150">&#7904;</l:l>
+      <l:l i="150">&#7905;</l:l>
+      <l:l i="150">&#7906;</l:l>
+      <l:l i="150">&#7907;</l:l>
+      <l:l i="160">P</l:l>
+      <l:l i="160">p</l:l>
+      <l:l i="160">&#420;</l:l>
+      <l:l i="160">&#421;</l:l>
+      <l:l i="160">&#7764;</l:l>
+      <l:l i="160">&#7765;</l:l>
+      <l:l i="160">&#7766;</l:l>
+      <l:l i="160">&#7767;</l:l>
+      <l:l i="170">Q</l:l>
+      <l:l i="170">q</l:l>
+      <l:l i="170">&#672;</l:l>
+      <l:l i="180">R</l:l>
+      <l:l i="180">r</l:l>
+      <l:l i="180">&#340;</l:l>
+      <l:l i="180">&#341;</l:l>
+      <l:l i="180">&#342;</l:l>
+      <l:l i="180">&#343;</l:l>
+      <l:l i="180">&#344;</l:l>
+      <l:l i="180">&#345;</l:l>
+      <l:l i="180">&#528;</l:l>
+      <l:l i="180">&#529;</l:l>
+      <l:l i="180">&#530;</l:l>
+      <l:l i="180">&#531;</l:l>
+      <l:l i="180">&#636;</l:l>
+      <l:l i="180">&#637;</l:l>
+      <l:l i="180">&#638;</l:l>
+      <l:l i="180">&#7768;</l:l>
+      <l:l i="180">&#7769;</l:l>
+      <l:l i="180">&#7770;</l:l>
+      <l:l i="180">&#7771;</l:l>
+      <l:l i="180">&#7772;</l:l>
+      <l:l i="180">&#7773;</l:l>
+      <l:l i="180">&#7774;</l:l>
+      <l:l i="180">&#7775;</l:l>
+      <l:l i="190">S</l:l>
+      <l:l i="190">s</l:l>
+      <l:l i="190">&#346;</l:l>
+      <l:l i="190">&#347;</l:l>
+      <l:l i="190">&#348;</l:l>
+      <l:l i="190">&#349;</l:l>
+      <l:l i="190">&#350;</l:l>
+      <l:l i="190">&#351;</l:l>
+      <l:l i="190">&#352;</l:l>
+      <l:l i="190">&#353;</l:l>
+      <l:l i="190">&#536;</l:l>
+      <l:l i="190">&#537;</l:l>
+      <l:l i="190">&#642;</l:l>
+      <l:l i="190">&#7776;</l:l>
+      <l:l i="190">&#7777;</l:l>
+      <l:l i="190">&#7778;</l:l>
+      <l:l i="190">&#7779;</l:l>
+      <l:l i="190">&#7780;</l:l>
+      <l:l i="190">&#7781;</l:l>
+      <l:l i="190">&#7782;</l:l>
+      <l:l i="190">&#7783;</l:l>
+      <l:l i="190">&#7784;</l:l>
+      <l:l i="190">&#7785;</l:l>
+      <l:l i="200">T</l:l>
+      <l:l i="200">t</l:l>
+      <l:l i="200">&#354;</l:l>
+      <l:l i="200">&#355;</l:l>
+      <l:l i="200">&#356;</l:l>
+      <l:l i="200">&#357;</l:l>
+      <l:l i="200">&#358;</l:l>
+      <l:l i="200">&#359;</l:l>
+      <l:l i="200">&#427;</l:l>
+      <l:l i="200">&#428;</l:l>
+      <l:l i="200">&#429;</l:l>
+      <l:l i="200">&#430;</l:l>
+      <l:l i="200">&#648;</l:l>
+      <l:l i="200">&#538;</l:l>
+      <l:l i="200">&#539;</l:l>
+      <l:l i="200">&#566;</l:l>
+      <l:l i="200">&#7786;</l:l>
+      <l:l i="200">&#7787;</l:l>
+      <l:l i="200">&#7788;</l:l>
+      <l:l i="200">&#7789;</l:l>
+      <l:l i="200">&#7790;</l:l>
+      <l:l i="200">&#7791;</l:l>
+      <l:l i="200">&#7792;</l:l>
+      <l:l i="200">&#7793;</l:l>
+      <l:l i="200">&#7831;</l:l>
+      <l:l i="210">U</l:l>
+      <l:l i="210">u</l:l>
+      <l:l i="210">&#217;</l:l>
+      <l:l i="210">&#249;</l:l>
+      <l:l i="210">&#218;</l:l>
+      <l:l i="210">&#250;</l:l>
+      <l:l i="210">&#219;</l:l>
+      <l:l i="210">&#251;</l:l>
+      <l:l i="210">&#220;</l:l>
+      <l:l i="210">&#252;</l:l>
+      <l:l i="210">&#360;</l:l>
+      <l:l i="210">&#361;</l:l>
+      <l:l i="210">&#362;</l:l>
+      <l:l i="210">&#363;</l:l>
+      <l:l i="210">&#364;</l:l>
+      <l:l i="210">&#365;</l:l>
+      <l:l i="210">&#366;</l:l>
+      <l:l i="210">&#367;</l:l>
+      <l:l i="210">&#368;</l:l>
+      <l:l i="210">&#369;</l:l>
+      <l:l i="210">&#370;</l:l>
+      <l:l i="210">&#371;</l:l>
+      <l:l i="210">&#431;</l:l>
+      <l:l i="210">&#432;</l:l>
+      <l:l i="210">&#467;</l:l>
+      <l:l i="210">&#468;</l:l>
+      <l:l i="210">&#469;</l:l>
+      <l:l i="210">&#470;</l:l>
+      <l:l i="210">&#471;</l:l>
+      <l:l i="210">&#472;</l:l>
+      <l:l i="210">&#473;</l:l>
+      <l:l i="210">&#474;</l:l>
+      <l:l i="210">&#475;</l:l>
+      <l:l i="210">&#476;</l:l>
+      <l:l i="210">&#532;</l:l>
+      <l:l i="210">&#533;</l:l>
+      <l:l i="210">&#534;</l:l>
+      <l:l i="210">&#535;</l:l>
+      <l:l i="210">&#7794;</l:l>
+      <l:l i="210">&#7795;</l:l>
+      <l:l i="210">&#7796;</l:l>
+      <l:l i="210">&#7797;</l:l>
+      <l:l i="210">&#7798;</l:l>
+      <l:l i="210">&#7799;</l:l>
+      <l:l i="210">&#7800;</l:l>
+      <l:l i="210">&#7801;</l:l>
+      <l:l i="210">&#7802;</l:l>
+      <l:l i="210">&#7803;</l:l>
+      <l:l i="210">&#7908;</l:l>
+      <l:l i="210">&#7909;</l:l>
+      <l:l i="210">&#7910;</l:l>
+      <l:l i="210">&#7911;</l:l>
+      <l:l i="210">&#7912;</l:l>
+      <l:l i="210">&#7913;</l:l>
+      <l:l i="210">&#7914;</l:l>
+      <l:l i="210">&#7915;</l:l>
+      <l:l i="210">&#7916;</l:l>
+      <l:l i="210">&#7917;</l:l>
+      <l:l i="210">&#7918;</l:l>
+      <l:l i="210">&#7919;</l:l>
+      <l:l i="210">&#7920;</l:l>
+      <l:l i="210">&#7921;</l:l>
+      <l:l i="220">V</l:l>
+      <l:l i="220">v</l:l>
+      <l:l i="220">&#434;</l:l>
+      <l:l i="220">&#651;</l:l>
+      <l:l i="220">&#7804;</l:l>
+      <l:l i="220">&#7805;</l:l>
+      <l:l i="220">&#7806;</l:l>
+      <l:l i="220">&#7807;</l:l>
+      <l:l i="230">W</l:l>
+      <l:l i="230">w</l:l>
+      <l:l i="230">&#372;</l:l>
+      <l:l i="230">&#373;</l:l>
+      <l:l i="230">&#7808;</l:l>
+      <l:l i="230">&#7809;</l:l>
+      <l:l i="230">&#7810;</l:l>
+      <l:l i="230">&#7811;</l:l>
+      <l:l i="230">&#7812;</l:l>
+      <l:l i="230">&#7813;</l:l>
+      <l:l i="230">&#7814;</l:l>
+      <l:l i="230">&#7815;</l:l>
+      <l:l i="230">&#7816;</l:l>
+      <l:l i="230">&#7817;</l:l>
+      <l:l i="230">&#7832;</l:l>
+      <l:l i="240">X</l:l>
+      <l:l i="240">x</l:l>
+      <l:l i="240">&#7818;</l:l>
+      <l:l i="240">&#7819;</l:l>
+      <l:l i="240">&#7820;</l:l>
+      <l:l i="240">&#7821;</l:l>
+      <l:l i="250">Y</l:l>
+      <l:l i="250">y</l:l>
+      <l:l i="250">&#221;</l:l>
+      <l:l i="250">&#253;</l:l>
+      <l:l i="250">&#255;</l:l>
+      <l:l i="250">&#376;</l:l>
+      <l:l i="250">&#374;</l:l>
+      <l:l i="250">&#375;</l:l>
+      <l:l i="250">&#435;</l:l>
+      <l:l i="250">&#436;</l:l>
+      <l:l i="250">&#562;</l:l>
+      <l:l i="250">&#563;</l:l>
+      <l:l i="250">&#7822;</l:l>
+      <l:l i="250">&#7823;</l:l>
+      <l:l i="250">&#7833;</l:l>
+      <l:l i="250">&#7922;</l:l>
+      <l:l i="250">&#7923;</l:l>
+      <l:l i="250">&#7924;</l:l>
+      <l:l i="250">&#7925;</l:l>
+      <l:l i="250">&#7926;</l:l>
+      <l:l i="250">&#7927;</l:l>
+      <l:l i="250">&#7928;</l:l>
+      <l:l i="250">&#7929;</l:l>
+      <l:l i="260">Z</l:l>
+      <l:l i="260">z</l:l>
+      <l:l i="260">&#377;</l:l>
+      <l:l i="260">&#378;</l:l>
+      <l:l i="260">&#379;</l:l>
+      <l:l i="260">&#380;</l:l>
+      <l:l i="260">&#381;</l:l>
+      <l:l i="260">&#382;</l:l>
+      <l:l i="260">&#437;</l:l>
+      <l:l i="260">&#438;</l:l>
+      <l:l i="260">&#548;</l:l>
+      <l:l i="260">&#549;</l:l>
+      <l:l i="260">&#656;</l:l>
+      <l:l i="260">&#657;</l:l>
+      <l:l i="260">&#7824;</l:l>
+      <l:l i="260">&#7825;</l:l>
+      <l:l i="260">&#7826;</l:l>
+      <l:l i="260">&#7827;</l:l>
+      <l:l i="260">&#7828;</l:l>
+      <l:l i="260">&#7829;</l:l>
+   </l:letters>
+</l:l10n>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/zh_cn.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/zh_cn.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/zh_cn.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,584 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="zh_cn" english-language-name="Chinese Simplified">
+
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+   <l:gentext key="Abstract" text="&#25688;&#35201;"/>
+   <l:gentext key="abstract" text="&#25688;&#35201;"/>
+   <l:gentext key="Answer" text="&#31572;&#65306;"/>
+   <l:gentext key="answer" text="&#31572;&#65306;"/>
+   <l:gentext key="Appendix" text="&#38468;&#24405;"/>
+   <l:gentext key="appendix" text="&#38468;&#24405;"/>
+   <l:gentext key="Article" text="&#25991;&#31456;"/>
+   <l:gentext key="article" text="&#25991;&#31456;"/>
+   <l:gentext key="Bibliography" text="&#21442;&#32771;&#20070;&#30446;"/>
+   <l:gentext key="bibliography" text="&#21442;&#32771;&#20070;&#30446;"/>
+   <l:gentext key="Book" text="&#20070;"/>
+   <l:gentext key="book" text="&#20070;"/>
+   <l:gentext key="CAUTION" text="&#23567;&#24515;"/>
+   <l:gentext key="Caution" text="&#23567;&#24515;"/>
+   <l:gentext key="caution" text="&#23567;&#24515;"/>
+   <l:gentext key="Chapter" text="&#31456;"/>
+   <l:gentext key="chapter" text="&#31456;"/>
+   <l:gentext key="Colophon" text="Colophon"/>
+   <l:gentext key="colophon" text="Colophon"/>
+   <l:gentext key="Copyright" text="&#29256;&#26435;"/>
+   <l:gentext key="copyright" text="&#29256;&#26435;"/>
+   <l:gentext key="Dedication" text="&#39064;&#35789;"/>
+   <l:gentext key="dedication" text="&#39064;&#35789;"/>
+   <l:gentext key="Edition" text="&#29256;"/>
+   <l:gentext key="edition" text="&#29256;"/>
+   <l:gentext key="Equation" text="&#20844;&#24335;"/>
+   <l:gentext key="equation" text="&#20844;&#24335;"/>
+   <l:gentext key="Example" text="&#20363;"/>
+   <l:gentext key="example" text="&#20363;"/>
+   <l:gentext key="Figure" text="&#22270;"/>
+   <l:gentext key="figure" text="&#22270;"/>
+   <l:gentext key="Glossary" text="&#26415;&#35821;&#34920;"/>
+   <l:gentext key="glossary" text="&#26415;&#35821;&#34920;"/>
+   <l:gentext key="GlossSee" text="&#35265;"/>
+   <l:gentext key="glosssee" text="&#35265;"/>
+   <l:gentext key="GlossSeeAlso" text="&#21442;&#35265;"/>
+   <l:gentext key="glossseealso" text="&#21442;&#35265;"/>
+   <l:gentext key="IMPORTANT" text="&#37325;&#35201;"/>
+   <l:gentext key="important" text="&#37325;&#35201;"/>
+   <l:gentext key="Important" text="&#37325;&#35201;"/>
+   <l:gentext key="Index" text="&#32034;&#24341;"/>
+   <l:gentext key="index" text="&#32034;&#24341;"/>
+   <l:gentext key="ISBN" text="ISBN"/>
+   <l:gentext key="isbn" text="ISBN"/>
+   <l:gentext key="LegalNotice" text="&#27861;&#24459;&#36890;&#21578;"/>
+   <l:gentext key="legalnotice" text="&#27861;&#24459;&#36890;&#21578;"/>
+   <l:gentext key="MsgAud" text="&#21463;&#20247;"/>
+   <l:gentext key="msgaud" text="&#21463;&#20247;"/>
+   <l:gentext key="MsgLevel" text="&#32423;&#21035;"/>
+   <l:gentext key="msglevel" text="&#32423;&#21035;"/>
+   <l:gentext key="MsgOrig" text="&#20986;&#22788;"/>
+   <l:gentext key="msgorig" text="&#20986;&#22788;"/>
+   <l:gentext key="NOTE" text="&#27880;&#24847;"/>
+   <l:gentext key="Note" text="&#27880;&#24847;"/>
+   <l:gentext key="note" text="&#27880;&#24847;"/>
+   <l:gentext key="Part" text="&#37096;&#20998;"/>
+   <l:gentext key="part" text="&#37096;&#20998;"/>
+   <l:gentext key="Preface" text="&#21069;&#35328;"/>
+   <l:gentext key="preface" text="&#21069;&#35328;"/>
+   <l:gentext key="Procedure" text="&#36807;&#31243;"/>
+   <l:gentext key="procedure" text="&#36807;&#31243;"/>
+   <l:gentext key="ProductionSet" text="Production"/>
+   <l:gentext key="PubDate" text="&#20986;&#29256;&#26085;&#26399;"/>
+   <l:gentext key="pubdate" text="&#20986;&#29256;&#26085;&#26399;"/>
+   <l:gentext key="Published" text="&#20986;&#29256;&#26041;"/>
+   <l:gentext key="published" text="&#20986;&#29256;&#26041;"/>
+   <l:gentext key="Qandadiv" text="&#36136;&#20445;"/>
+   <l:gentext key="qandadiv" text="&#36136;&#20445;"/>
+   <l:gentext key="Question" text="&#38382;&#65306;"/>
+   <l:gentext key="question" text="&#38382;&#65306;"/>
+   <l:gentext key="RefEntry" text=""/>
+   <l:gentext key="refentry" text=""/>
+   <l:gentext key="Reference" text="&#21442;&#32771;"/>
+   <l:gentext key="reference" text="&#21442;&#32771;"/>
+   <l:gentext key="RefName" text="&#21517;&#31216;"/>
+   <l:gentext key="refname" text="&#21517;&#31216;"/>
+   <l:gentext key="RefSection" text=""/>
+   <l:gentext key="refsection" text=""/>
+   <l:gentext key="RefSynopsisDiv" text="&#22823;&#32434;"/>
+   <l:gentext key="refsynopsisdiv" text="&#22823;&#32434;"/>
+   <l:gentext key="RevHistory" text="&#20462;&#35746;&#21382;&#21490;"/>
+   <l:gentext key="revhistory" text="&#20462;&#35746;&#21382;&#21490;"/>
+   <l:gentext key="revision" text="&#20462;&#35746;"/>
+   <l:gentext key="Revision" text="&#20462;&#35746;"/>
+   <l:gentext key="sect1" text="&#33410;"/>
+   <l:gentext key="sect2" text="&#33410;"/>
+   <l:gentext key="sect3" text="&#33410;"/>
+   <l:gentext key="sect4" text="&#33410;"/>
+   <l:gentext key="sect5" text="&#33410;"/>
+   <l:gentext key="section" text="&#33410;"/>
+   <l:gentext key="Section" text="&#33410;"/>
+   <l:gentext key="see" text="&#35265;"/>
+   <l:gentext key="See" text="&#35265;"/>
+   <l:gentext key="seealso" text="&#21442;&#35265;"/>
+   <l:gentext key="Seealso" text="&#21442;&#35265;"/>
+   <l:gentext key="SeeAlso" text="&#21442;&#35265;"/>
+   <l:gentext key="set" text="Set"/>
+   <l:gentext key="Set" text="Set"/>
+   <l:gentext key="setindex" text="Set Index"/>
+   <l:gentext key="SetIndex" text="Set Index"/>
+   <l:gentext key="Sidebar" text=""/>
+   <l:gentext key="sidebar" text="sidebar"/>
+   <l:gentext key="step" text="&#27493;&#39588;"/>
+   <l:gentext key="Step" text="&#27493;&#39588;"/>
+   <l:gentext key="Table" text="&#34920;"/>
+   <l:gentext key="table" text="&#34920;"/>
+   <l:gentext key="tip" text="&#25552;&#31034;"/>
+   <l:gentext key="TIP" text="&#25552;&#31034;"/>
+   <l:gentext key="Tip" text="&#25552;&#31034;"/>
+   <l:gentext key="Warning" text="&#35686;&#21578;"/>
+   <l:gentext key="warning" text="&#35686;&#21578;"/>
+   <l:gentext key="WARNING" text="&#35686;&#21578;"/>
+   <l:gentext key="and" text="&#21644;"/>
+   <l:gentext key="by" text="&#30001;"/>
+   <l:gentext key="called" text="&#31216;&#20026;"/>
+   <l:gentext key="Edited" text="&#32534;&#36753;&#26102;&#38388;"/>
+   <l:gentext key="edited" text="&#32534;&#36753;&#26102;&#38388;"/>
+   <l:gentext key="Editedby" text="&#32534;&#36753;&#32773;"/>
+   <l:gentext key="editedby" text="&#32534;&#36753;&#32773;"/>
+   <l:gentext key="in" text="&#20110;"/>
+   <l:gentext key="lastlistcomma" text=","/>
+   <l:gentext key="listcomma" text="&#12289;"/>
+   <l:gentext key="nonexistantelement" text="&#19981;&#23384;&#22312;&#30340;&#20803;&#32032;"/>
+   <l:gentext key="notes" text="&#22791;&#27880;"/>
+   <l:gentext key="Notes" text="&#22791;&#27880;"/>
+   <l:gentext key="Pgs" text="&#39029;"/>
+   <l:gentext key="pgs" text="&#39029;"/>
+   <l:gentext key="Revisedby" text="&#20462;&#35746;&#32773;&#65306;"/>
+   <l:gentext key="revisedby" text="&#20462;&#35746;&#32773;&#65306;"/>
+   <l:gentext key="TableNotes" text="&#34920;&#27880;"/>
+   <l:gentext key="tablenotes" text="&#34920;&#27880;"/>
+   <l:gentext key="TableofContents" text="&#30446;&#24405;"/>
+   <l:gentext key="tableofcontents" text="&#30446;&#24405;"/>
+   <l:gentext key="the" text=""/>
+   <l:gentext key="unexpectedelementname" text="&#26410;&#39044;&#26399;&#30340;&#21517;&#31216;"/>
+   <l:gentext key="unsupported" text="&#19981;&#25903;&#25345;"/>
+   <l:gentext key="xrefto" text="xref to"/>
+   <l:gentext key="listofequations" text="&#20844;&#24335;&#28165;&#21333;"/>
+   <l:gentext key="ListofEquations" text="&#20844;&#24335;&#28165;&#21333;"/>
+   <l:gentext key="ListofExamples" text="&#33539;&#20363;&#28165;&#21333;"/>
+   <l:gentext key="listofexamples" text="&#33539;&#20363;&#28165;&#21333;"/>
+   <l:gentext key="ListofFigures" text="&#25554;&#22270;&#28165;&#21333;"/>
+   <l:gentext key="listoffigures" text="&#25554;&#22270;&#28165;&#21333;"/>
+   <l:gentext key="ListofProcedures" text="&#36807;&#31243;&#28165;&#21333;"/>
+   <l:gentext key="listofprocedures" text="&#36807;&#31243;&#28165;&#21333;"/>
+   <l:gentext key="listoftables" text="&#34920;&#26684;&#28165;&#21333;"/>
+   <l:gentext key="ListofTables" text="&#34920;&#26684;&#28165;&#21333;"/>
+   <l:gentext key="ListofUnknown" text="&#26410;&#30693;&#28165;&#21333;"/>
+   <l:gentext key="listofunknown" text="&#26410;&#30693;&#28165;&#21333;"/>
+   <l:gentext key="nav-home" text="&#36215;&#22987;&#39029;"/>
+   <l:gentext key="nav-next" text="&#19979;&#19968;&#39029;"/>
+   <l:gentext key="nav-next-sibling" text="&#24555;&#36827;"/>
+   <l:gentext key="nav-prev" text="&#19978;&#19968;&#39029;"/>
+   <l:gentext key="nav-prev-sibling" text="&#24555;&#36864;"/>
+   <l:gentext key="nav-up" text="&#19978;&#19968;&#32423;"/>
+   <l:gentext key="nav-toc" text="&#30446;&#24405;"/>
+   <l:gentext key="Draft" text="&#33609;&#31295;"/>
+   <l:gentext key="above" text="above"/>
+   <l:gentext key="below" text="below"/>
+   <l:gentext key="sectioncalled" text="&#19968;&#33410;"/>
+   <l:gentext key="index symbols" text="&#31526;&#21495;"/>
+   <l:gentext key="lowercase.alpha" text="abcdefghijklmnopqrstuvwxyz"/>
+   <l:gentext key="uppercase.alpha" text="ABCDEFGHIJKLMNOPQRSTUVWXYZ"/>
+   <l:dingbat key="startquote" text="&#8220;"/>
+   <l:dingbat key="endquote" text="&#8221;"/>
+   <l:dingbat key="nestedstartquote" text="&#8216;"/>
+   <l:dingbat key="nestedendquote" text="&#8217;"/>
+   <l:dingbat key="singlestartquote" text="&#8216;"/>
+   <l:dingbat key="singleendquote" text="&#8217;"/>
+   <l:dingbat key="bullet" text="&#183;"/>
+   <l:gentext key="hyphenation-character" text="-"/>
+   <l:gentext key="hyphenation-push-character-count" text="2"/>
+   <l:gentext key="hyphenation-remain-character-count" text="2"/>
+
+   <l:context name="styles">
+      <l:template name="person-name" text="first-last"/>
+   </l:context>
+
+   <l:context name="title">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="%t"/>
+      <l:template name="appendix" text="&#38468;&#24405;&#160;%n.&#160;%t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="biblioentry" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliolist" text="%t"/>
+      <l:template name="bibliomixed" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="&#31532;&#160;%n&#160;&#31456;&#160;%t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="&#20844;&#24335;&#160;%n.&#160;%t"/>
+      <l:template name="example" text="&#20363;&#160;%n.&#160;%t"/>
+      <l:template name="figure" text="&#22270;&#160;%n.&#160;%t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="glosslist" text="%t"/>
+      <l:template name="glossentry" text="%t"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text=""/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="&#31532;&#160;%n&#160;&#37096;&#20998;&#160;%t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="procedure.formal" text="&#36807;&#31243;&#160;%n.&#160;%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="productionset.formal" text="Production&#160;%n"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="%t"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="%t"/>
+      <l:template name="refentry" text="%t"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsection" text="%t"/>
+      <l:template name="refsect1" text="%t"/>
+      <l:template name="refsect2" text="%t"/>
+      <l:template name="refsect3" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="refsynopsisdivinfo" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="step" text="%t"/>
+      <l:template name="table" text="&#34920;&#160;%n.&#160;%t"/>
+      <l:template name="task" text="%t"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text=""/>
+      <l:template name="warning" text="%t"/>
+   </l:context>
+
+   <l:context name="title-unnumbered">
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article/appendix" text="%t"/>
+      <l:template name="bridgehead" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="sect1" text="%t"/>
+      <l:template name="sect2" text="%t"/>
+      <l:template name="sect3" text="%t"/>
+      <l:template name="sect4" text="%t"/>
+      <l:template name="sect5" text="%t"/>
+      <l:template name="section" text="%t"/>
+      <l:template name="simplesect" text="%t"/>
+   </l:context>
+
+   <l:context name="title-numbered">
+      <l:template name="appendix" text="&#38468;&#24405;&#160;%n.&#160;%t"/>
+      <l:template name="article/appendix" text="%n.&#160;%t"/>
+      <l:template name="bridgehead" text="%n.&#160;%t"/>
+      <l:template name="chapter" text="&#31532;&#160;%n&#160;&#31456;&#160;%t"/>
+      <l:template name="sect1" text="%n.&#160;%t"/>
+      <l:template name="sect2" text="%n.&#160;%t"/>
+      <l:template name="sect3" text="%n.&#160;%t"/>
+      <l:template name="sect4" text="%n.&#160;%t"/>
+      <l:template name="sect5" text="%n.&#160;%t"/>
+      <l:template name="section" text="%n.&#160;%t"/>
+      <l:template name="simplesect" text="%t"/>
+   </l:context>
+
+   <l:context name="subtitle">
+      <l:template name="appendix" text="%s"/>
+      <l:template name="article" text="%s"/>
+      <l:template name="bibliodiv" text="%s"/>
+      <l:template name="biblioentry" text="%s"/>
+      <l:template name="bibliography" text="%s"/>
+      <l:template name="bibliomixed" text="%s"/>
+      <l:template name="bibliomset" text="%s"/>
+      <l:template name="biblioset" text="%s"/>
+      <l:template name="book" text="%s"/>
+      <l:template name="chapter" text="%s"/>
+      <l:template name="colophon" text="%s"/>
+      <l:template name="dedication" text="%s"/>
+      <l:template name="glossary" text="%s"/>
+      <l:template name="glossdiv" text="%s"/>
+      <l:template name="index" text="%s"/>
+      <l:template name="indexdiv" text="%s"/>
+      <l:template name="lot" text="%s"/>
+      <l:template name="part" text="%s"/>
+      <l:template name="partintro" text="%s"/>
+      <l:template name="preface" text="%s"/>
+      <l:template name="refentry" text="%s"/>
+      <l:template name="reference" text="%s"/>
+      <l:template name="refsection" text="%s"/>
+      <l:template name="refsect1" text="%s"/>
+      <l:template name="refsect2" text="%s"/>
+      <l:template name="refsect3" text="%s"/>
+      <l:template name="refsynopsisdiv" text="%s"/>
+      <l:template name="sect1" text="%s"/>
+      <l:template name="sect2" text="%s"/>
+      <l:template name="sect3" text="%s"/>
+      <l:template name="sect4" text="%s"/>
+      <l:template name="sect5" text="%s"/>
+      <l:template name="section" text="%s"/>
+      <l:template name="set" text="%s"/>
+      <l:template name="setindex" text="%s"/>
+      <l:template name="sidebar" text="%s"/>
+      <l:template name="simplesect" text="%s"/>
+      <l:template name="toc" text="%s"/>
+   </l:context>
+
+   <l:context name="xref">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="&#31572;&#65306;&#160;%n"/>
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="constraintdef" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="%t"/>
+      <l:template name="example" text="%t"/>
+      <l:template name="figure" text="%t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text="%n"/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="%t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="&#38382;&#65306;&#160;%n"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="&#38382;&#65306;&#160;%n"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="table" text="%t"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="%n"/>
+      <l:template name="warning" text="%t"/>
+      <l:template name="page.citation" text=" [%p]"/>
+      <l:template name="page" text="(&#31532; %p &#39029;)"/>
+      <l:template name="pageabbrev" text="(&#31532; %p &#39029;)"/>
+      <l:template name="Page" text="&#31532; %p &#39029;"/>
+      <l:template name="bridgehead" text="&#8220;%t&#8221;&#19968;&#33410;"/>
+      <l:template name="refsection" text="&#8220;%t&#8221;&#19968;&#33410;"/>
+      <l:template name="refsect1" text="&#8220;%t&#8221;&#19968;&#33410;"/>
+      <l:template name="refsect2" text="&#8220;%t&#8221;&#19968;&#33410;"/>
+      <l:template name="refsect3" text="&#8220;%t&#8221;&#19968;&#33410;"/>
+      <l:template name="sect1" text="&#8220;%t&#8221;&#19968;&#33410;"/>
+      <l:template name="sect2" text="&#8220;%t&#8221;&#19968;&#33410;"/>
+      <l:template name="sect3" text="&#8220;%t&#8221;&#19968;&#33410;"/>
+      <l:template name="sect4" text="&#8220;%t&#8221;&#19968;&#33410;"/>
+      <l:template name="sect5" text="&#8220;%t&#8221;&#19968;&#33410;"/>
+      <l:template name="section" text="&#8220;%t&#8221;&#19968;&#33410;"/>
+      <l:template name="simplesect" text="&#8220;%t&#8221;&#19968;&#33410;"/>
+   </l:context>
+
+   <l:context name="xref-number">
+      <l:template name="answer" text="&#31572;&#65306;&#160;%n"/>
+      <l:template name="appendix" text="&#38468;&#24405;&#160;%n"/>
+      <l:template name="bridgehead" text="&#31532;&#160;%n&#160;&#33410;"/>
+      <l:template name="chapter" text="&#31532;&#160;%n&#160;&#31456;"/>
+      <l:template name="equation" text="&#20844;&#24335;&#160;%n"/>
+      <l:template name="example" text="&#20363;&#160;%n"/>
+      <l:template name="figure" text="&#22270;&#160;%n"/>
+      <l:template name="part" text="&#31532;&#160;%n&#160;&#37096;&#20998;"/>
+      <l:template name="procedure" text="&#36807;&#31243;&#160;%n"/>
+      <l:template name="productionset" text="Production&#160;%n"/>
+      <l:template name="qandadiv" text="&#36136;&#20445;&#160;%n"/>
+      <l:template name="qandaentry" text="&#38382;&#65306;&#160;%n"/>
+      <l:template name="question" text="&#38382;&#65306;&#160;%n"/>
+      <l:template name="sect1" text="&#31532;&#160;%n&#160;&#33410;"/>
+      <l:template name="sect2" text="&#31532;&#160;%n&#160;&#33410;"/>
+      <l:template name="sect3" text="&#31532;&#160;%n&#160;&#33410;"/>
+      <l:template name="sect4" text="&#31532;&#160;%n&#160;&#33410;"/>
+      <l:template name="sect5" text="&#31532;&#160;%n&#160;&#33410;"/>
+      <l:template name="section" text="&#31532;&#160;%n&#160;&#33410;"/>
+      <l:template name="table" text="&#34920;&#160;%n"/>
+   </l:context>
+
+   <l:context name="xref-number-and-title">
+      <l:template name="appendix" text="&#38468;&#24405;&#160;%n, %t"/>
+      <l:template name="bridgehead" text="&#31532;&#160;%n&#160;&#33410; &#8220;%t&#8221;"/>
+      <l:template name="chapter" text="&#31532;&#160;%n&#160;&#31456; %t"/>
+      <l:template name="equation" text="&#20844;&#24335;&#160;%n &#8220;%t&#8221;"/>
+      <l:template name="example" text="&#20363;&#160;%n &#8220;%t&#8221;"/>
+      <l:template name="figure" text="&#22270;&#160;%n &#8220;%t&#8221;"/>
+      <l:template name="part" text="&#31532;&#160;%n&#160;&#37096;&#20998; &#8220;%t&#8221;"/>
+      <l:template name="procedure" text="&#36807;&#31243;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="productionset" text="Production&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="qandadiv" text="&#36136;&#20445;&#160;%n, &#8220;%t&#8221;"/>
+      <l:template name="refsect1" text="&#8220;%t&#8221;&#19968;&#33410;"/>
+      <l:template name="refsect2" text="&#8220;%t&#8221;&#19968;&#33410;"/>
+      <l:template name="refsect3" text="&#8220;%t&#8221;&#19968;&#33410;"/>
+      <l:template name="refsection" text="&#8220;%t&#8221;&#19968;&#33410;"/>
+      <l:template name="sect1" text="&#31532;&#160;%n&#160;&#33410; &#8220;%t&#8221;"/>
+      <l:template name="sect2" text="&#31532;&#160;%n&#160;&#33410; &#8220;%t&#8221;"/>
+      <l:template name="sect3" text="&#31532;&#160;%n&#160;&#33410; &#8220;%t&#8221;"/>
+      <l:template name="sect4" text="&#31532;&#160;%n&#160;&#33410; &#8220;%t&#8221;"/>
+      <l:template name="sect5" text="&#31532;&#160;%n&#160;&#33410; &#8220;%t&#8221;"/>
+      <l:template name="section" text="&#31532;&#160;%n&#160;&#33410; &#8220;%t&#8221;"/>
+      <l:template name="simplesect" text="&#8220;%t&#8221;&#19968;&#33410;"/>
+      <l:template name="table" text="&#34920;&#160;%n &#8220;%t&#8221;"/>
+   </l:context>
+
+   <l:context name="authorgroup">
+      <l:template name="sep" text="&#12289;"/>
+      <l:template name="sep2" text="&#21644;"/>
+      <l:template name="seplast" text="&#21644;"/>
+   </l:context>
+
+   <l:context name="glossary">
+      <l:template name="see" text="&#35265;"/>
+      <l:template name="seealso" text="&#21442;&#35265;"/>
+   </l:context>
+
+   <l:context name="msgset">
+      <l:template name="MsgAud" text="&#21463;&#20247;&#65306;"/>
+      <l:template name="MsgLevel" text="&#32423;&#21035;&#65306;"/>
+      <l:template name="MsgOrig" text="&#20986;&#22788;&#65306;"/>
+   </l:context>
+
+   <l:context name="datetime">
+      <l:template name="format" text="Y-m-d"/>
+   </l:context>
+
+   <l:context name="datetime-full">
+      <l:template name="January" text="&#19968;&#26376;"/>
+      <l:template name="February" text="&#20108;&#26376;"/>
+      <l:template name="March" text="&#19977;&#26376;"/>
+      <l:template name="April" text="&#22235;&#26376;"/>
+      <l:template name="May" text="&#20116;&#26376;"/>
+      <l:template name="June" text="&#20845;&#26376;"/>
+      <l:template name="July" text="&#19971;&#26376;"/>
+      <l:template name="August" text="&#20843;&#26376;"/>
+      <l:template name="September" text="&#20061;&#26376;"/>
+      <l:template name="October" text="&#21313;&#26376;"/>
+      <l:template name="November" text="&#21313;&#19968;&#26376;"/>
+      <l:template name="December" text="&#21313;&#20108;&#26376;"/>
+      <l:template name="Monday" text="&#26143;&#26399;&#19968;"/>
+      <l:template name="Tuesday" text="&#26143;&#26399;&#20108;"/>
+      <l:template name="Wednesday" text="&#26143;&#26399;&#19977;"/>
+      <l:template name="Thursday" text="&#26143;&#26399;&#22235;"/>
+      <l:template name="Friday" text="&#26143;&#26399;&#20116;"/>
+      <l:template name="Saturday" text="&#26143;&#26399;&#20845;"/>
+      <l:template name="Sunday" text="&#26143;&#26399;&#26085;"/>
+   </l:context>
+
+   <l:context name="datetime-abbrev">
+      <l:template name="Jan" text="&#19968;&#26376;"/>
+      <l:template name="Feb" text="&#20108;&#26376;"/>
+      <l:template name="Mar" text="&#19977;&#26376;"/>
+      <l:template name="Apr" text="&#22235;&#26376;"/>
+      <l:template name="May" text="&#20116;&#26376;"/>
+      <l:template name="Jun" text="&#20845;&#26376;"/>
+      <l:template name="Jul" text="&#19971;&#26376;"/>
+      <l:template name="Aug" text="&#20843;&#26376;"/>
+      <l:template name="Sep" text="&#20061;&#26376;"/>
+      <l:template name="Oct" text="&#21313;&#26376;"/>
+      <l:template name="Nov" text="&#21313;&#19968;&#26376;"/>
+      <l:template name="Dec" text="&#21313;&#20108;&#26376;"/>
+      <l:template name="Mon" text="&#21608;&#19968;"/>
+      <l:template name="Tue" text="&#21608;&#20108;"/>
+      <l:template name="Wed" text="&#21608;&#19977;"/>
+      <l:template name="Thu" text="&#21608;&#22235;"/>
+      <l:template name="Fri" text="&#21608;&#20116;"/>
+      <l:template name="Sat" text="&#21608;&#20845;"/>
+      <l:template name="Sun" text="&#21608;&#26085;"/>
+   </l:context>
+
+   <l:context name="htmlhelp">
+      <l:template name="langcode" text="0x0804 Chinese (CHINA)"/>
+   </l:context>
+
+   <l:letters>
+      <l:l i="-1"/>
+      <l:l i="0">&#20854;&#23427;</l:l>
+      <l:l i="10">A</l:l>
+      <l:l i="10">a</l:l>
+      <l:l i="20">B</l:l>
+      <l:l i="20">b</l:l>
+      <l:l i="30">C</l:l>
+      <l:l i="30">c</l:l>
+      <l:l i="40">D</l:l>
+      <l:l i="40">d</l:l>
+      <l:l i="50">E</l:l>
+      <l:l i="50">e</l:l>
+      <l:l i="60">F</l:l>
+      <l:l i="60">f</l:l>
+      <l:l i="70">G</l:l>
+      <l:l i="70">g</l:l>
+      <l:l i="80">H</l:l>
+      <l:l i="80">h</l:l>
+      <l:l i="90">I</l:l>
+      <l:l i="90">i</l:l>
+      <l:l i="100">J</l:l>
+      <l:l i="100">j</l:l>
+      <l:l i="110">K</l:l>
+      <l:l i="110">k</l:l>
+      <l:l i="120">L</l:l>
+      <l:l i="120">l</l:l>
+      <l:l i="130">M</l:l>
+      <l:l i="130">m</l:l>
+      <l:l i="140">N</l:l>
+      <l:l i="140">n</l:l>
+      <l:l i="150">O</l:l>
+      <l:l i="150">o</l:l>
+      <l:l i="160">P</l:l>
+      <l:l i="160">p</l:l>
+      <l:l i="170">Q</l:l>
+      <l:l i="170">q</l:l>
+      <l:l i="180">R</l:l>
+      <l:l i="180">r</l:l>
+      <l:l i="190">S</l:l>
+      <l:l i="190">s</l:l>
+      <l:l i="200">T</l:l>
+      <l:l i="200">t</l:l>
+      <l:l i="210">U</l:l>
+      <l:l i="210">u</l:l>
+      <l:l i="220">V</l:l>
+      <l:l i="220">v</l:l>
+      <l:l i="230">W</l:l>
+      <l:l i="230">w</l:l>
+      <l:l i="240">X</l:l>
+      <l:l i="240">x</l:l>
+      <l:l i="250">Y</l:l>
+      <l:l i="250">y</l:l>
+      <l:l i="260">Z</l:l>
+      <l:l i="260">z</l:l>
+   </l:letters>
+</l:l10n>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/zh_tw.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/zh_tw.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/common/zh_tw.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1153 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="zh_tw" english-language-name="Chinese (Traditional)">
+
+<!-- This file is generated automatically. -->
+<!-- Do not edit this file by hand! -->
+<!-- See http://docbook.sourceforge.net/ -->
+<!-- To update this file: edit the corresponding document at -->
+<!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ -->
+
+   <l:gentext key="Abstract" text="&#25688;&#35201;"/>
+   <l:gentext key="abstract" text="&#25688;&#35201;"/>
+   <l:gentext key="Answer" text="&#31572;&#65306;"/>
+   <l:gentext key="answer" text="&#31572;&#65306;"/>
+   <l:gentext key="Appendix" text="&#38468;&#37636;"/>
+   <l:gentext key="appendix" text="&#38468;&#37636;"/>
+   <l:gentext key="Article" text="&#25991;&#31456;"/>
+   <l:gentext key="article" text="&#25991;&#31456;"/>
+   <l:gentext key="Bibliography" text="&#21443;&#32771;&#25991;&#29563;"/>
+   <l:gentext key="bibliography" text="&#21443;&#32771;&#25991;&#29563;"/>
+   <l:gentext key="Book" text="&#26360;&#30446;"/>
+   <l:gentext key="book" text="&#26360;&#30446;"/>
+   <l:gentext key="CAUTION" text="&#27880;&#24847;"/>
+   <l:gentext key="Caution" text="&#27880;&#24847;"/>
+   <l:gentext key="caution" text="&#27880;&#24847;"/>
+   <l:gentext key="Chapter" text="&#31456;"/>
+   <l:gentext key="chapter" text="&#31456;"/>
+   <l:gentext key="Colophon" text="&#29256;&#26412;&#35352;&#37636;"/>
+   <l:gentext key="colophon" text="&#29256;&#26412;&#35352;&#37636;"/>
+   <l:gentext key="Copyright" text="&#29256;&#27402;"/>
+   <l:gentext key="copyright" text="&#29256;&#27402;"/>
+   <l:gentext key="Dedication" text="&#22857;&#29563;"/>
+   <l:gentext key="dedication" text="&#22857;&#29563;"/>
+   <l:gentext key="Edition" text="&#29256;"/>
+   <l:gentext key="edition" text="&#29256;"/>
+   <l:gentext key="Equation" text="&#26041;&#31243;&#24335;"/>
+   <l:gentext key="equation" text="&#26041;&#31243;&#24335;"/>
+   <l:gentext key="Example" text="&#31684;&#20363;"/>
+   <l:gentext key="example" text="&#31684;&#20363;"/>
+   <l:gentext key="Figure" text="&#22294;&#24418;"/>
+   <l:gentext key="figure" text="&#22294;&#24418;"/>
+   <l:gentext key="Glossary" text="&#23567;&#36781;&#24409;"/>
+   <l:gentext key="glossary" text="&#23567;&#36781;&#24409;"/>
+   <l:gentext key="GlossSee" text="&#21443;&#35211;"/>
+   <l:gentext key="glosssee" text="&#21443;&#35211;"/>
+   <l:gentext key="GlossSeeAlso" text="&#21478;&#21443;&#35211;"/>
+   <l:gentext key="glossseealso" text="&#21478;&#21443;&#35211;"/>
+   <l:gentext key="IMPORTANT" text="&#37325;&#35201;"/>
+   <l:gentext key="important" text="&#37325;&#35201;"/>
+   <l:gentext key="Important" text="&#37325;&#35201;"/>
+   <l:gentext key="Index" text="&#32034;&#24341;"/>
+   <l:gentext key="index" text="&#32034;&#24341;"/>
+   <l:gentext key="ISBN" text="ISBN"/>
+   <l:gentext key="isbn" text="ISBN"/>
+   <l:gentext key="LegalNotice" text="&#27861;&#24459;&#32882;&#26126;"/>
+   <l:gentext key="legalnotice" text="&#27861;&#24459;&#32882;&#26126;"/>
+   <l:gentext key="MsgAud" text="&#35712;&#32773;"/>
+   <l:gentext key="msgaud" text="&#35712;&#32773;"/>
+   <l:gentext key="MsgLevel" text="&#31243;&#24230;"/>
+   <l:gentext key="msglevel" text="&#31243;&#24230;"/>
+   <l:gentext key="MsgOrig" text="&#20986;&#34389;"/>
+   <l:gentext key="msgorig" text="&#20986;&#34389;"/>
+   <l:gentext key="NOTE" text="&#27880;"/>
+   <l:gentext key="Note" text="&#27880;"/>
+   <l:gentext key="note" text="&#27880;"/>
+   <l:gentext key="Part" text="&#37096;"/>
+   <l:gentext key="part" text="&#37096;"/>
+   <l:gentext key="Preface" text="&#24207;&#35328;"/>
+   <l:gentext key="preface" text="&#24207;&#35328;"/>
+   <l:gentext key="Procedure" text="&#36942;&#31243;"/>
+   <l:gentext key="procedure" text="&#36942;&#31243;"/>
+   <l:gentext key="ProductionSet" text="Production"/>
+   <l:gentext key="PubDate" text="Publication Date" lang="en"/>
+   <l:gentext key="pubdate" text="Publication date" lang="en"/>
+   <l:gentext key="Published" text="&#20986;&#29256;"/>
+   <l:gentext key="published" text="&#20986;&#29256;"/>
+   <l:gentext key="Qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="qandadiv" text="Q &amp; A" lang="en"/>
+   <l:gentext key="Question" text="&#21839;&#65306;"/>
+   <l:gentext key="question" text="&#21839;&#65306;"/>
+   <l:gentext key="RefEntry" text="&#21443;&#29031;&#38917;&#30446;"/>
+   <l:gentext key="refentry" text="&#21443;&#29031;&#38917;&#30446;"/>
+   <l:gentext key="Reference" text="&#21443;&#32771;"/>
+   <l:gentext key="reference" text="&#21443;&#32771;"/>
+   <l:gentext key="RefName" text="&#21443;&#32771;&#21517;"/>
+   <l:gentext key="refname" text="&#21443;&#32771;&#21517;"/>
+   <l:gentext key="RefSection" text="&#21443;&#29031;&#31456;&#31680;"/>
+   <l:gentext key="refsection" text="&#21443;&#29031;&#31456;&#31680;"/>
+   <l:gentext key="RefSynopsisDiv" text="&#22823;&#32177;"/>
+   <l:gentext key="refsynopsisdiv" text="&#22823;&#32177;"/>
+   <l:gentext key="RevHistory" text="&#20462;&#35330;&#35352;&#37636;"/>
+   <l:gentext key="revhistory" text="&#20462;&#35330;&#35352;&#37636;"/>
+   <l:gentext key="revision" text="&#20462;&#35330;"/>
+   <l:gentext key="Revision" text="&#20462;&#35330;"/>
+   <l:gentext key="sect1" text="Section"/>
+   <l:gentext key="sect2" text="Section"/>
+   <l:gentext key="sect3" text="Section"/>
+   <l:gentext key="sect4" text="Section"/>
+   <l:gentext key="sect5" text="Section"/>
+   <l:gentext key="section" text="&#31680;"/>
+   <l:gentext key="Section" text="&#31680;"/>
+   <l:gentext key="see" text="&#35211;"/>
+   <l:gentext key="See" text="&#35211;"/>
+   <l:gentext key="seealso" text="&#21478;&#35211;"/>
+   <l:gentext key="Seealso" text="&#21478;&#35211;"/>
+   <l:gentext key="SeeAlso" text="&#21478;&#35211;"/>
+   <l:gentext key="set" text="Set"/>
+   <l:gentext key="Set" text="Set"/>
+   <l:gentext key="setindex" text="Set Index"/>
+   <l:gentext key="SetIndex" text="Set Index"/>
+   <l:gentext key="Sidebar" text=""/>
+   <l:gentext key="sidebar" text="sidebar"/>
+   <l:gentext key="step" text="&#27493;&#39519;"/>
+   <l:gentext key="Step" text="&#27493;&#39519;"/>
+   <l:gentext key="Table" text="&#34920;&#26684;"/>
+   <l:gentext key="table" text="&#34920;&#26684;"/>
+   <l:gentext key="tip" text="&#25552;&#31034;"/>
+   <l:gentext key="TIP" text="&#25552;&#31034;"/>
+   <l:gentext key="Tip" text="&#25552;&#31034;"/>
+   <l:gentext key="Warning" text="&#35686;&#21578;"/>
+   <l:gentext key="warning" text="&#35686;&#21578;"/>
+   <l:gentext key="WARNING" text="&#35686;&#21578;"/>
+   <l:gentext key="and" text="&#19988;"/>
+   <l:gentext key="by" text="&#30001;"/>
+   <l:gentext key="called" text="called" lang="en"/>
+   <l:gentext key="Edited" text="&#32232;&#36655;"/>
+   <l:gentext key="edited" text="&#32232;&#36655;"/>
+   <l:gentext key="Editedby" text="&#32232;&#36655;"/>
+   <l:gentext key="editedby" text="&#32232;&#36655;"/>
+   <l:gentext key="in" text="&#22312;"/>
+   <l:gentext key="lastlistcomma" text=","/>
+   <l:gentext key="listcomma" text=","/>
+   <l:gentext key="nonexistantelement" text="&#19981;&#23384;&#22312;&#30340;&#20803;&#32032;"/>
+   <l:gentext key="notes" text="&#27880;"/>
+   <l:gentext key="Notes" text="&#27880;"/>
+   <l:gentext key="Pgs" text="&#38913;"/>
+   <l:gentext key="pgs" text="&#38913;"/>
+   <l:gentext key="Revisedby" text="&#20462;&#35330;"/>
+   <l:gentext key="revisedby" text="&#20462;&#35330;"/>
+   <l:gentext key="TableNotes" text="&#27880;&#37323;"/>
+   <l:gentext key="tablenotes" text="&#27880;&#37323;"/>
+   <l:gentext key="TableofContents" text="&#20839;&#23481;&#30446;&#37636;"/>
+   <l:gentext key="tableofcontents" text="&#20839;&#23481;&#30446;&#37636;"/>
+   <l:gentext key="the" text="" lang="en"/>
+   <l:gentext key="unexpectedelementname" text="&#38750;&#38928;&#26399;&#30340;&#20803;&#32032;&#21517;"/>
+   <l:gentext key="unsupported" text="&#26410;&#25903;&#25588;"/>
+   <l:gentext key="xrefto" text="&#21443;&#29031;"/>
+   <l:gentext key="listofequations" text="&#20844;&#24335;&#30446;&#37636;"/>
+   <l:gentext key="ListofEquations" text="&#20844;&#24335;&#30446;&#37636;"/>
+   <l:gentext key="ListofExamples" text="&#31684;&#20363;&#30446;&#37636;"/>
+   <l:gentext key="listofexamples" text="&#31684;&#20363;&#30446;&#37636;"/>
+   <l:gentext key="ListofFigures" text="&#38468;&#22294;&#30446;&#37636;"/>
+   <l:gentext key="listoffigures" text="&#38468;&#22294;&#30446;&#37636;"/>
+   <l:gentext key="ListofProcedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listofprocedures" text="List of Procedures" lang="en"/>
+   <l:gentext key="listoftables" text="&#38468;&#34920;&#30446;&#37636;"/>
+   <l:gentext key="ListofTables" text="&#38468;&#34920;&#30446;&#37636;"/>
+   <l:gentext key="ListofUnknown" text="&#20854;&#23427;&#20839;&#23481;&#30446;&#37636;"/>
+   <l:gentext key="listofunknown" text="&#20854;&#23427;&#20839;&#23481;&#30446;&#37636;"/>
+   <l:gentext key="nav-home" text="&#20839;&#23481;"/>
+   <l:gentext key="nav-next" text="&#19979;&#19968;&#38913;"/>
+   <l:gentext key="nav-next-sibling" text="&#24555;&#36895;&#21521;&#24460;"/>
+   <l:gentext key="nav-prev" text="&#21069;&#19968;&#38913;"/>
+   <l:gentext key="nav-prev-sibling" text="&#24555;&#36895;&#21521;&#21069;"/>
+   <l:gentext key="nav-up" text="&#19978;&#19968;&#23652;"/>
+   <l:gentext key="nav-toc" text="ToC" lang="en"/>
+   <l:gentext key="Draft" text="Draft"/>
+   <l:gentext key="above" text="above"/>
+   <l:gentext key="below" text="below"/>
+   <l:gentext key="sectioncalled" text="the section called"/>
+   <l:gentext key="index symbols" text="Symbols"/>
+   <l:gentext key="lowercase.alpha" text="abcdefghijklmnopqrstuvwxyz" lang="en"/>
+   <l:gentext key="uppercase.alpha" text="ABCDEFGHIJKLMNOPQRSTUVWXYZ" lang="en"/>
+   <l:dingbat key="startquote" text="&#34;"/>
+   <l:dingbat key="endquote" text="&#34;"/>
+   <l:dingbat key="nestedstartquote" text="'"/>
+   <l:dingbat key="nestedendquote" text="'"/>
+   <l:dingbat key="singlestartquote" text="&#8216;" lang="en"/>
+   <l:dingbat key="singleendquote" text="&#8217;" lang="en"/>
+   <l:dingbat key="bullet" text="&#8226;"/>
+   <l:gentext key="hyphenation-character" text="-" lang="en"/>
+   <l:gentext key="hyphenation-push-character-count" text="2" lang="en"/>
+   <l:gentext key="hyphenation-remain-character-count" text="2" lang="en"/>
+
+   <l:context name="styles">
+      <l:template name="person-name" text="first-last"/>
+   </l:context>
+
+   <l:context name="title">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="%t"/>
+      <l:template name="appendix" text="&#38468;&#37636; %n. %t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="biblioentry" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliolist" text="%t" lang="en"/>
+      <l:template name="bibliomixed" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="&#31456; %n. %t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="&#26041;&#31243;&#24335; %n. %t"/>
+      <l:template name="example" text="&#31684;&#20363; %n. %t"/>
+      <l:template name="figure" text="&#22294;&#24418; %n. %t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="glosslist" text="%t" lang="en"/>
+      <l:template name="glossentry" text="%t" lang="en"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text=""/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="&#37096; %n. %t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="procedure.formal" text="&#36942;&#31243;&#160;%n.&#160;%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="productionset.formal" text="Production&#160;%n"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="%t"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="%t"/>
+      <l:template name="refentry" text="%t"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsection" text="%t" lang="en"/>
+      <l:template name="refsect1" text="%t"/>
+      <l:template name="refsect2" text="%t"/>
+      <l:template name="refsect3" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="refsynopsisdivinfo" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="step" text="%t"/>
+      <l:template name="table" text="&#34920;&#26684; %n. %t"/>
+      <l:template name="task" text="%t" lang="en"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="" lang="en"/>
+      <l:template name="warning" text="%t"/>
+   </l:context>
+
+   <l:context name="title-unnumbered">
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article/appendix" text="%t" lang="en"/>
+      <l:template name="bridgehead" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="sect1" text="%t"/>
+      <l:template name="sect2" text="%t"/>
+      <l:template name="sect3" text="%t"/>
+      <l:template name="sect4" text="%t"/>
+      <l:template name="sect5" text="%t"/>
+      <l:template name="section" text="%t"/>
+      <l:template name="simplesect" text="%t"/>
+   </l:context>
+
+   <l:context name="title-numbered">
+      <l:template name="appendix" text="&#38468;&#37636; %n. %t"/>
+      <l:template name="article/appendix" text="%n.&#160;%t" lang="en"/>
+      <l:template name="bridgehead" text="%t"/>
+      <l:template name="chapter" text="&#31456; %n. %t"/>
+      <l:template name="sect1" text="%n. %t"/>
+      <l:template name="sect2" text="%n. %t"/>
+      <l:template name="sect3" text="%n. %t"/>
+      <l:template name="sect4" text="%n. %t"/>
+      <l:template name="sect5" text="%n. %t"/>
+      <l:template name="section" text="%n. %t"/>
+      <l:template name="simplesect" text="%n. %t"/>
+   </l:context>
+
+   <l:context name="subtitle">
+      <l:template name="appendix" text="%s"/>
+      <l:template name="article" text="%s"/>
+      <l:template name="bibliodiv" text="%s"/>
+      <l:template name="biblioentry" text="%s"/>
+      <l:template name="bibliography" text="%s"/>
+      <l:template name="bibliomixed" text="%s"/>
+      <l:template name="bibliomset" text="%s"/>
+      <l:template name="biblioset" text="%s"/>
+      <l:template name="book" text="%s"/>
+      <l:template name="chapter" text="%s"/>
+      <l:template name="colophon" text="%s"/>
+      <l:template name="dedication" text="%s"/>
+      <l:template name="glossary" text="%s"/>
+      <l:template name="glossdiv" text="%s"/>
+      <l:template name="index" text="%s"/>
+      <l:template name="indexdiv" text="%s"/>
+      <l:template name="lot" text="%s"/>
+      <l:template name="part" text="%s"/>
+      <l:template name="partintro" text="%s"/>
+      <l:template name="preface" text="%s"/>
+      <l:template name="refentry" text="%s"/>
+      <l:template name="reference" text="%s"/>
+      <l:template name="refsection" text="%s" lang="en"/>
+      <l:template name="refsect1" text="%s"/>
+      <l:template name="refsect2" text="%s"/>
+      <l:template name="refsect3" text="%s"/>
+      <l:template name="refsynopsisdiv" text="%s"/>
+      <l:template name="sect1" text="%s"/>
+      <l:template name="sect2" text="%s"/>
+      <l:template name="sect3" text="%s"/>
+      <l:template name="sect4" text="%s"/>
+      <l:template name="sect5" text="%s"/>
+      <l:template name="section" text="%s"/>
+      <l:template name="set" text="%s"/>
+      <l:template name="setindex" text="%s"/>
+      <l:template name="sidebar" text="%s"/>
+      <l:template name="simplesect" text="%s"/>
+      <l:template name="toc" text="%s"/>
+   </l:context>
+
+   <l:context name="xref">
+      <l:template name="abstract" text="%t"/>
+      <l:template name="answer" text="&#31572;&#65306;&#160;%n"/>
+      <l:template name="appendix" text="%t"/>
+      <l:template name="article" text="%t"/>
+      <l:template name="authorblurb" text="%t"/>
+      <l:template name="bibliodiv" text="%t"/>
+      <l:template name="bibliography" text="%t"/>
+      <l:template name="bibliomset" text="%t"/>
+      <l:template name="biblioset" text="%t"/>
+      <l:template name="blockquote" text="%t"/>
+      <l:template name="book" text="%t"/>
+      <l:template name="calloutlist" text="%t"/>
+      <l:template name="caution" text="%t"/>
+      <l:template name="chapter" text="%t"/>
+      <l:template name="colophon" text="%t"/>
+      <l:template name="constraintdef" text="%t"/>
+      <l:template name="dedication" text="%t"/>
+      <l:template name="equation" text="%t"/>
+      <l:template name="example" text="%t"/>
+      <l:template name="figure" text="%t"/>
+      <l:template name="formalpara" text="%t"/>
+      <l:template name="glossary" text="%t"/>
+      <l:template name="glossdiv" text="%t"/>
+      <l:template name="important" text="%t"/>
+      <l:template name="index" text="%t"/>
+      <l:template name="indexdiv" text="%t"/>
+      <l:template name="itemizedlist" text="%t"/>
+      <l:template name="legalnotice" text="%t"/>
+      <l:template name="listitem" text="%n"/>
+      <l:template name="lot" text="%t"/>
+      <l:template name="msg" text="%t"/>
+      <l:template name="msgexplan" text="%t"/>
+      <l:template name="msgmain" text="%t"/>
+      <l:template name="msgrel" text="%t"/>
+      <l:template name="msgset" text="%t"/>
+      <l:template name="msgsub" text="%t"/>
+      <l:template name="note" text="%t"/>
+      <l:template name="orderedlist" text="%t"/>
+      <l:template name="part" text="%t"/>
+      <l:template name="partintro" text="%t"/>
+      <l:template name="preface" text="%t"/>
+      <l:template name="procedure" text="%t"/>
+      <l:template name="productionset" text="%t"/>
+      <l:template name="qandadiv" text="%t"/>
+      <l:template name="qandaentry" text="&#21839;&#65306;&#160;%n"/>
+      <l:template name="qandaset" text="%t"/>
+      <l:template name="question" text="&#21839;&#65306;&#160;%n"/>
+      <l:template name="reference" text="%t"/>
+      <l:template name="refsynopsisdiv" text="%t"/>
+      <l:template name="segmentedlist" text="%t"/>
+      <l:template name="set" text="%t"/>
+      <l:template name="setindex" text="%t"/>
+      <l:template name="sidebar" text="%t"/>
+      <l:template name="table" text="%t"/>
+      <l:template name="tip" text="%t"/>
+      <l:template name="toc" text="%t"/>
+      <l:template name="variablelist" text="%t"/>
+      <l:template name="varlistentry" text="%n"/>
+      <l:template name="warning" text="%t"/>
+      <l:template name="page.citation" text=" [%p]"/>
+      <l:template name="page" text="(page %p)" lang="en"/>
+      <l:template name="pageabbrev" text="(p. %p)" lang="en"/>
+      <l:template name="Page" text="Page %p" lang="en"/>
+      <l:template name="bridgehead" text="&#34;%t&#34;"/>
+      <l:template name="refsection" text="the section called &#34;%t&#34;" lang="en"/>
+      <l:template name="refsect1" text="&#34;%t&#34;"/>
+      <l:template name="refsect2" text="&#34;%t&#34;"/>
+      <l:template name="refsect3" text="&#34;%t&#34;"/>
+      <l:template name="sect1" text="&#34;%t&#34;"/>
+      <l:template name="sect2" text="&#34;%t&#34;"/>
+      <l:template name="sect3" text="&#34;%t&#34;"/>
+      <l:template name="sect4" text="&#34;%t&#34;"/>
+      <l:template name="sect5" text="&#34;%t&#34;"/>
+      <l:template name="section" text="&#34;%t&#34;"/>
+      <l:template name="simplesect" text="&#34;%t&#34;"/>
+   </l:context>
+
+   <l:context name="xref-number">
+      <l:template name="answer" text="&#31572;&#65306;&#160;%n"/>
+      <l:template name="appendix" text="&#38468;&#37636;&#160;%n"/>
+      <l:template name="bridgehead" text="&#31680;&#160;%n"/>
+      <l:template name="chapter" text="&#31456;&#160;%n"/>
+      <l:template name="equation" text="&#26041;&#31243;&#24335;&#160;%n"/>
+      <l:template name="example" text="&#31684;&#20363;&#160;%n"/>
+      <l:template name="figure" text="&#22294;&#24418;&#160;%n"/>
+      <l:template name="part" text="&#37096;&#160;%n"/>
+      <l:template name="procedure" text="&#36942;&#31243;&#160;%n"/>
+      <l:template name="productionset" text="Production&#160;%n"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n"/>
+      <l:template name="qandaentry" text="&#21839;&#65306;&#160;%n"/>
+      <l:template name="question" text="&#21839;&#65306;&#160;%n"/>
+      <l:template name="sect1" text="&#31680;&#160;%n"/>
+      <l:template name="sect2" text="&#31680;&#160;%n"/>
+      <l:template name="sect3" text="&#31680;&#160;%n"/>
+      <l:template name="sect4" text="&#31680;&#160;%n"/>
+      <l:template name="sect5" text="&#31680;&#160;%n"/>
+      <l:template name="section" text="&#31680;&#160;%n"/>
+      <l:template name="table" text="&#34920;&#26684;&#160;%n"/>
+   </l:context>
+
+   <l:context name="xref-number-and-title">
+      <l:template name="appendix" text="&#38468;&#37636;&#160;%n, %t"/>
+      <l:template name="bridgehead" text="&#31680;&#160;%n, &#34;%t&#34;"/>
+      <l:template name="chapter" text="&#31456;&#160;%n, %t"/>
+      <l:template name="equation" text="&#26041;&#31243;&#24335;&#160;%n, &#34;%t&#34;"/>
+      <l:template name="example" text="&#31684;&#20363;&#160;%n, &#34;%t&#34;"/>
+      <l:template name="figure" text="&#22294;&#24418;&#160;%n, &#34;%t&#34;"/>
+      <l:template name="part" text="&#37096;&#160;%n, &#34;%t&#34;"/>
+      <l:template name="procedure" text="&#36942;&#31243;&#160;%n, &#34;%t&#34;"/>
+      <l:template name="productionset" text="Production&#160;%n, &#34;%t&#34;"/>
+      <l:template name="qandadiv" text="Q &amp; A&#160;%n, &#34;%t&#34;"/>
+      <l:template name="refsect1" text="the section called &#34;%t&#34;"/>
+      <l:template name="refsect2" text="the section called &#34;%t&#34;"/>
+      <l:template name="refsect3" text="the section called &#34;%t&#34;"/>
+      <l:template name="refsection" text="the section called &#34;%t&#34;"/>
+      <l:template name="sect1" text="&#31680;&#160;%n, &#34;%t&#34;"/>
+      <l:template name="sect2" text="&#31680;&#160;%n, &#34;%t&#34;"/>
+      <l:template name="sect3" text="&#31680;&#160;%n, &#34;%t&#34;"/>
+      <l:template name="sect4" text="&#31680;&#160;%n, &#34;%t&#34;"/>
+      <l:template name="sect5" text="&#31680;&#160;%n, &#34;%t&#34;"/>
+      <l:template name="section" text="&#31680;&#160;%n, &#34;%t&#34;"/>
+      <l:template name="simplesect" text="the section called &#34;%t&#34;"/>
+      <l:template name="table" text="&#34920;&#26684;&#160;%n, &#34;%t&#34;"/>
+   </l:context>
+
+   <l:context name="authorgroup">
+      <l:template name="sep" text=", "/>
+      <l:template name="sep2" text=" &#19988; "/>
+      <l:template name="seplast" text=", &#19988; "/>
+   </l:context>
+
+   <l:context name="glossary">
+      <l:template name="see" text="&#21443;&#35211; "/>
+      <l:template name="seealso" text="&#21478;&#21443;&#35211; "/>
+   </l:context>
+
+   <l:context name="msgset">
+      <l:template name="MsgAud" text="&#35712;&#32773;: "/>
+      <l:template name="MsgLevel" text="&#31243;&#24230;: "/>
+      <l:template name="MsgOrig" text="&#20986;&#34389;: "/>
+   </l:context>
+
+   <l:context name="datetime">
+      <l:template name="format" text="m/d/Y" lang="en"/>
+   </l:context>
+
+   <l:context name="datetime-full">
+      <l:template name="January" text="January" lang="en"/>
+      <l:template name="February" text="February" lang="en"/>
+      <l:template name="March" text="March" lang="en"/>
+      <l:template name="April" text="April" lang="en"/>
+      <l:template name="May" text="May" lang="en"/>
+      <l:template name="June" text="June" lang="en"/>
+      <l:template name="July" text="July" lang="en"/>
+      <l:template name="August" text="August" lang="en"/>
+      <l:template name="September" text="September" lang="en"/>
+      <l:template name="October" text="October" lang="en"/>
+      <l:template name="November" text="November" lang="en"/>
+      <l:template name="December" text="December" lang="en"/>
+      <l:template name="Monday" text="Monday" lang="en"/>
+      <l:template name="Tuesday" text="Tuesday" lang="en"/>
+      <l:template name="Wednesday" text="Wednesday" lang="en"/>
+      <l:template name="Thursday" text="Thursday" lang="en"/>
+      <l:template name="Friday" text="Friday" lang="en"/>
+      <l:template name="Saturday" text="Saturday" lang="en"/>
+      <l:template name="Sunday" text="Sunday" lang="en"/>
+   </l:context>
+
+   <l:context name="datetime-abbrev">
+      <l:template name="Jan" text="Jan" lang="en"/>
+      <l:template name="Feb" text="Feb" lang="en"/>
+      <l:template name="Mar" text="Mar" lang="en"/>
+      <l:template name="Apr" text="Apr" lang="en"/>
+      <l:template name="May" text="May" lang="en"/>
+      <l:template name="Jun" text="Jun" lang="en"/>
+      <l:template name="Jul" text="Jul" lang="en"/>
+      <l:template name="Aug" text="Aug" lang="en"/>
+      <l:template name="Sep" text="Sep" lang="en"/>
+      <l:template name="Oct" text="Oct" lang="en"/>
+      <l:template name="Nov" text="Nov" lang="en"/>
+      <l:template name="Dec" text="Dec" lang="en"/>
+      <l:template name="Mon" text="Mon" lang="en"/>
+      <l:template name="Tue" text="Tue" lang="en"/>
+      <l:template name="Wed" text="Wed" lang="en"/>
+      <l:template name="Thu" text="Thu" lang="en"/>
+      <l:template name="Fri" text="Fri" lang="en"/>
+      <l:template name="Sat" text="Sat" lang="en"/>
+      <l:template name="Sun" text="Sun" lang="en"/>
+   </l:context>
+
+   <l:context name="htmlhelp">
+      <l:template name="langcode" text="0x0404 Chinese (TAIWAN)"/>
+   </l:context>
+
+   <l:letters lang="en">
+      <l:l i="-1"/>
+      <l:l i="0">Symbols</l:l>
+      <l:l i="10">A</l:l>
+      <l:l i="10">a</l:l>
+      <l:l i="10">&#192;</l:l>
+      <l:l i="10">&#224;</l:l>
+      <l:l i="10">&#193;</l:l>
+      <l:l i="10">&#225;</l:l>
+      <l:l i="10">&#194;</l:l>
+      <l:l i="10">&#226;</l:l>
+      <l:l i="10">&#195;</l:l>
+      <l:l i="10">&#227;</l:l>
+      <l:l i="10">&#196;</l:l>
+      <l:l i="10">&#228;</l:l>
+      <l:l i="10">&#197;</l:l>
+      <l:l i="10">&#229;</l:l>
+      <l:l i="10">&#256;</l:l>
+      <l:l i="10">&#257;</l:l>
+      <l:l i="10">&#258;</l:l>
+      <l:l i="10">&#259;</l:l>
+      <l:l i="10">&#260;</l:l>
+      <l:l i="10">&#261;</l:l>
+      <l:l i="10">&#461;</l:l>
+      <l:l i="10">&#462;</l:l>
+      <l:l i="10">&#478;</l:l>
+      <l:l i="10">&#479;</l:l>
+      <l:l i="10">&#480;</l:l>
+      <l:l i="10">&#481;</l:l>
+      <l:l i="10">&#506;</l:l>
+      <l:l i="10">&#507;</l:l>
+      <l:l i="10">&#512;</l:l>
+      <l:l i="10">&#513;</l:l>
+      <l:l i="10">&#514;</l:l>
+      <l:l i="10">&#515;</l:l>
+      <l:l i="10">&#550;</l:l>
+      <l:l i="10">&#551;</l:l>
+      <l:l i="10">&#7680;</l:l>
+      <l:l i="10">&#7681;</l:l>
+      <l:l i="10">&#7834;</l:l>
+      <l:l i="10">&#7840;</l:l>
+      <l:l i="10">&#7841;</l:l>
+      <l:l i="10">&#7842;</l:l>
+      <l:l i="10">&#7843;</l:l>
+      <l:l i="10">&#7844;</l:l>
+      <l:l i="10">&#7845;</l:l>
+      <l:l i="10">&#7846;</l:l>
+      <l:l i="10">&#7847;</l:l>
+      <l:l i="10">&#7848;</l:l>
+      <l:l i="10">&#7849;</l:l>
+      <l:l i="10">&#7850;</l:l>
+      <l:l i="10">&#7851;</l:l>
+      <l:l i="10">&#7852;</l:l>
+      <l:l i="10">&#7853;</l:l>
+      <l:l i="10">&#7854;</l:l>
+      <l:l i="10">&#7855;</l:l>
+      <l:l i="10">&#7856;</l:l>
+      <l:l i="10">&#7857;</l:l>
+      <l:l i="10">&#7858;</l:l>
+      <l:l i="10">&#7859;</l:l>
+      <l:l i="10">&#7860;</l:l>
+      <l:l i="10">&#7861;</l:l>
+      <l:l i="10">&#7862;</l:l>
+      <l:l i="10">&#7863;</l:l>
+      <l:l i="20">B</l:l>
+      <l:l i="20">b</l:l>
+      <l:l i="20">&#384;</l:l>
+      <l:l i="20">&#385;</l:l>
+      <l:l i="20">&#595;</l:l>
+      <l:l i="20">&#386;</l:l>
+      <l:l i="20">&#387;</l:l>
+      <l:l i="20">&#7682;</l:l>
+      <l:l i="20">&#7683;</l:l>
+      <l:l i="20">&#7684;</l:l>
+      <l:l i="20">&#7685;</l:l>
+      <l:l i="20">&#7686;</l:l>
+      <l:l i="20">&#7687;</l:l>
+      <l:l i="30">C</l:l>
+      <l:l i="30">c</l:l>
+      <l:l i="30">&#199;</l:l>
+      <l:l i="30">&#231;</l:l>
+      <l:l i="30">&#262;</l:l>
+      <l:l i="30">&#263;</l:l>
+      <l:l i="30">&#264;</l:l>
+      <l:l i="30">&#265;</l:l>
+      <l:l i="30">&#266;</l:l>
+      <l:l i="30">&#267;</l:l>
+      <l:l i="30">&#268;</l:l>
+      <l:l i="30">&#269;</l:l>
+      <l:l i="30">&#391;</l:l>
+      <l:l i="30">&#392;</l:l>
+      <l:l i="30">&#597;</l:l>
+      <l:l i="30">&#7688;</l:l>
+      <l:l i="30">&#7689;</l:l>
+      <l:l i="40">D</l:l>
+      <l:l i="40">d</l:l>
+      <l:l i="40">&#270;</l:l>
+      <l:l i="40">&#271;</l:l>
+      <l:l i="40">&#272;</l:l>
+      <l:l i="40">&#273;</l:l>
+      <l:l i="40">&#394;</l:l>
+      <l:l i="40">&#599;</l:l>
+      <l:l i="40">&#395;</l:l>
+      <l:l i="40">&#396;</l:l>
+      <l:l i="40">&#453;</l:l>
+      <l:l i="40">&#498;</l:l>
+      <l:l i="40">&#545;</l:l>
+      <l:l i="40">&#598;</l:l>
+      <l:l i="40">&#7690;</l:l>
+      <l:l i="40">&#7691;</l:l>
+      <l:l i="40">&#7692;</l:l>
+      <l:l i="40">&#7693;</l:l>
+      <l:l i="40">&#7694;</l:l>
+      <l:l i="40">&#7695;</l:l>
+      <l:l i="40">&#7696;</l:l>
+      <l:l i="40">&#7697;</l:l>
+      <l:l i="40">&#7698;</l:l>
+      <l:l i="40">&#7699;</l:l>
+      <l:l i="50">E</l:l>
+      <l:l i="50">e</l:l>
+      <l:l i="50">&#200;</l:l>
+      <l:l i="50">&#232;</l:l>
+      <l:l i="50">&#201;</l:l>
+      <l:l i="50">&#233;</l:l>
+      <l:l i="50">&#202;</l:l>
+      <l:l i="50">&#234;</l:l>
+      <l:l i="50">&#203;</l:l>
+      <l:l i="50">&#235;</l:l>
+      <l:l i="50">&#274;</l:l>
+      <l:l i="50">&#275;</l:l>
+      <l:l i="50">&#276;</l:l>
+      <l:l i="50">&#277;</l:l>
+      <l:l i="50">&#278;</l:l>
+      <l:l i="50">&#279;</l:l>
+      <l:l i="50">&#280;</l:l>
+      <l:l i="50">&#281;</l:l>
+      <l:l i="50">&#282;</l:l>
+      <l:l i="50">&#283;</l:l>
+      <l:l i="50">&#516;</l:l>
+      <l:l i="50">&#517;</l:l>
+      <l:l i="50">&#518;</l:l>
+      <l:l i="50">&#519;</l:l>
+      <l:l i="50">&#552;</l:l>
+      <l:l i="50">&#553;</l:l>
+      <l:l i="50">&#7700;</l:l>
+      <l:l i="50">&#7701;</l:l>
+      <l:l i="50">&#7702;</l:l>
+      <l:l i="50">&#7703;</l:l>
+      <l:l i="50">&#7704;</l:l>
+      <l:l i="50">&#7705;</l:l>
+      <l:l i="50">&#7706;</l:l>
+      <l:l i="50">&#7707;</l:l>
+      <l:l i="50">&#7708;</l:l>
+      <l:l i="50">&#7709;</l:l>
+      <l:l i="50">&#7864;</l:l>
+      <l:l i="50">&#7865;</l:l>
+      <l:l i="50">&#7866;</l:l>
+      <l:l i="50">&#7867;</l:l>
+      <l:l i="50">&#7868;</l:l>
+      <l:l i="50">&#7869;</l:l>
+      <l:l i="50">&#7870;</l:l>
+      <l:l i="50">&#7871;</l:l>
+      <l:l i="50">&#7872;</l:l>
+      <l:l i="50">&#7873;</l:l>
+      <l:l i="50">&#7874;</l:l>
+      <l:l i="50">&#7875;</l:l>
+      <l:l i="50">&#7876;</l:l>
+      <l:l i="50">&#7877;</l:l>
+      <l:l i="50">&#7878;</l:l>
+      <l:l i="50">&#7879;</l:l>
+      <l:l i="60">F</l:l>
+      <l:l i="60">f</l:l>
+      <l:l i="60">&#401;</l:l>
+      <l:l i="60">&#402;</l:l>
+      <l:l i="60">&#7710;</l:l>
+      <l:l i="60">&#7711;</l:l>
+      <l:l i="70">G</l:l>
+      <l:l i="70">g</l:l>
+      <l:l i="70">&#284;</l:l>
+      <l:l i="70">&#285;</l:l>
+      <l:l i="70">&#286;</l:l>
+      <l:l i="70">&#287;</l:l>
+      <l:l i="70">&#288;</l:l>
+      <l:l i="70">&#289;</l:l>
+      <l:l i="70">&#290;</l:l>
+      <l:l i="70">&#291;</l:l>
+      <l:l i="70">&#403;</l:l>
+      <l:l i="70">&#608;</l:l>
+      <l:l i="70">&#484;</l:l>
+      <l:l i="70">&#485;</l:l>
+      <l:l i="70">&#486;</l:l>
+      <l:l i="70">&#487;</l:l>
+      <l:l i="70">&#500;</l:l>
+      <l:l i="70">&#501;</l:l>
+      <l:l i="70">&#7712;</l:l>
+      <l:l i="70">&#7713;</l:l>
+      <l:l i="80">H</l:l>
+      <l:l i="80">h</l:l>
+      <l:l i="80">&#292;</l:l>
+      <l:l i="80">&#293;</l:l>
+      <l:l i="80">&#294;</l:l>
+      <l:l i="80">&#295;</l:l>
+      <l:l i="80">&#542;</l:l>
+      <l:l i="80">&#543;</l:l>
+      <l:l i="80">&#614;</l:l>
+      <l:l i="80">&#7714;</l:l>
+      <l:l i="80">&#7715;</l:l>
+      <l:l i="80">&#7716;</l:l>
+      <l:l i="80">&#7717;</l:l>
+      <l:l i="80">&#7718;</l:l>
+      <l:l i="80">&#7719;</l:l>
+      <l:l i="80">&#7720;</l:l>
+      <l:l i="80">&#7721;</l:l>
+      <l:l i="80">&#7722;</l:l>
+      <l:l i="80">&#7723;</l:l>
+      <l:l i="80">&#7830;</l:l>
+      <l:l i="90">I</l:l>
+      <l:l i="90">i</l:l>
+      <l:l i="90">&#204;</l:l>
+      <l:l i="90">&#236;</l:l>
+      <l:l i="90">&#205;</l:l>
+      <l:l i="90">&#237;</l:l>
+      <l:l i="90">&#206;</l:l>
+      <l:l i="90">&#238;</l:l>
+      <l:l i="90">&#207;</l:l>
+      <l:l i="90">&#239;</l:l>
+      <l:l i="90">&#296;</l:l>
+      <l:l i="90">&#297;</l:l>
+      <l:l i="90">&#298;</l:l>
+      <l:l i="90">&#299;</l:l>
+      <l:l i="90">&#300;</l:l>
+      <l:l i="90">&#301;</l:l>
+      <l:l i="90">&#302;</l:l>
+      <l:l i="90">&#303;</l:l>
+      <l:l i="90">&#304;</l:l>
+      <l:l i="90">&#407;</l:l>
+      <l:l i="90">&#616;</l:l>
+      <l:l i="90">&#463;</l:l>
+      <l:l i="90">&#464;</l:l>
+      <l:l i="90">&#520;</l:l>
+      <l:l i="90">&#521;</l:l>
+      <l:l i="90">&#522;</l:l>
+      <l:l i="90">&#523;</l:l>
+      <l:l i="90">&#7724;</l:l>
+      <l:l i="90">&#7725;</l:l>
+      <l:l i="90">&#7726;</l:l>
+      <l:l i="90">&#7727;</l:l>
+      <l:l i="90">&#7880;</l:l>
+      <l:l i="90">&#7881;</l:l>
+      <l:l i="90">&#7882;</l:l>
+      <l:l i="90">&#7883;</l:l>
+      <l:l i="100">J</l:l>
+      <l:l i="100">j</l:l>
+      <l:l i="100">&#308;</l:l>
+      <l:l i="100">&#309;</l:l>
+      <l:l i="100">&#496;</l:l>
+      <l:l i="100">&#669;</l:l>
+      <l:l i="110">K</l:l>
+      <l:l i="110">k</l:l>
+      <l:l i="110">&#310;</l:l>
+      <l:l i="110">&#311;</l:l>
+      <l:l i="110">&#408;</l:l>
+      <l:l i="110">&#409;</l:l>
+      <l:l i="110">&#488;</l:l>
+      <l:l i="110">&#489;</l:l>
+      <l:l i="110">&#7728;</l:l>
+      <l:l i="110">&#7729;</l:l>
+      <l:l i="110">&#7730;</l:l>
+      <l:l i="110">&#7731;</l:l>
+      <l:l i="110">&#7732;</l:l>
+      <l:l i="110">&#7733;</l:l>
+      <l:l i="120">L</l:l>
+      <l:l i="120">l</l:l>
+      <l:l i="120">&#313;</l:l>
+      <l:l i="120">&#314;</l:l>
+      <l:l i="120">&#315;</l:l>
+      <l:l i="120">&#316;</l:l>
+      <l:l i="120">&#317;</l:l>
+      <l:l i="120">&#318;</l:l>
+      <l:l i="120">&#319;</l:l>
+      <l:l i="120">&#320;</l:l>
+      <l:l i="120">&#321;</l:l>
+      <l:l i="120">&#322;</l:l>
+      <l:l i="120">&#410;</l:l>
+      <l:l i="120">&#456;</l:l>
+      <l:l i="120">&#564;</l:l>
+      <l:l i="120">&#619;</l:l>
+      <l:l i="120">&#620;</l:l>
+      <l:l i="120">&#621;</l:l>
+      <l:l i="120">&#7734;</l:l>
+      <l:l i="120">&#7735;</l:l>
+      <l:l i="120">&#7736;</l:l>
+      <l:l i="120">&#7737;</l:l>
+      <l:l i="120">&#7738;</l:l>
+      <l:l i="120">&#7739;</l:l>
+      <l:l i="120">&#7740;</l:l>
+      <l:l i="120">&#7741;</l:l>
+      <l:l i="130">M</l:l>
+      <l:l i="130">m</l:l>
+      <l:l i="130">&#625;</l:l>
+      <l:l i="130">&#7742;</l:l>
+      <l:l i="130">&#7743;</l:l>
+      <l:l i="130">&#7744;</l:l>
+      <l:l i="130">&#7745;</l:l>
+      <l:l i="130">&#7746;</l:l>
+      <l:l i="130">&#7747;</l:l>
+      <l:l i="140">N</l:l>
+      <l:l i="140">n</l:l>
+      <l:l i="140">&#209;</l:l>
+      <l:l i="140">&#241;</l:l>
+      <l:l i="140">&#323;</l:l>
+      <l:l i="140">&#324;</l:l>
+      <l:l i="140">&#325;</l:l>
+      <l:l i="140">&#326;</l:l>
+      <l:l i="140">&#327;</l:l>
+      <l:l i="140">&#328;</l:l>
+      <l:l i="140">&#413;</l:l>
+      <l:l i="140">&#626;</l:l>
+      <l:l i="140">&#414;</l:l>
+      <l:l i="140">&#544;</l:l>
+      <l:l i="140">&#459;</l:l>
+      <l:l i="140">&#504;</l:l>
+      <l:l i="140">&#505;</l:l>
+      <l:l i="140">&#565;</l:l>
+      <l:l i="140">&#627;</l:l>
+      <l:l i="140">&#7748;</l:l>
+      <l:l i="140">&#7749;</l:l>
+      <l:l i="140">&#7750;</l:l>
+      <l:l i="140">&#7751;</l:l>
+      <l:l i="140">&#7752;</l:l>
+      <l:l i="140">&#7753;</l:l>
+      <l:l i="140">&#7754;</l:l>
+      <l:l i="140">&#7755;</l:l>
+      <l:l i="150">O</l:l>
+      <l:l i="150">o</l:l>
+      <l:l i="150">&#210;</l:l>
+      <l:l i="150">&#242;</l:l>
+      <l:l i="150">&#211;</l:l>
+      <l:l i="150">&#243;</l:l>
+      <l:l i="150">&#212;</l:l>
+      <l:l i="150">&#244;</l:l>
+      <l:l i="150">&#213;</l:l>
+      <l:l i="150">&#245;</l:l>
+      <l:l i="150">&#214;</l:l>
+      <l:l i="150">&#246;</l:l>
+      <l:l i="150">&#216;</l:l>
+      <l:l i="150">&#248;</l:l>
+      <l:l i="150">&#332;</l:l>
+      <l:l i="150">&#333;</l:l>
+      <l:l i="150">&#334;</l:l>
+      <l:l i="150">&#335;</l:l>
+      <l:l i="150">&#336;</l:l>
+      <l:l i="150">&#337;</l:l>
+      <l:l i="150">&#415;</l:l>
+      <l:l i="150">&#416;</l:l>
+      <l:l i="150">&#417;</l:l>
+      <l:l i="150">&#465;</l:l>
+      <l:l i="150">&#466;</l:l>
+      <l:l i="150">&#490;</l:l>
+      <l:l i="150">&#491;</l:l>
+      <l:l i="150">&#492;</l:l>
+      <l:l i="150">&#493;</l:l>
+      <l:l i="150">&#510;</l:l>
+      <l:l i="150">&#511;</l:l>
+      <l:l i="150">&#524;</l:l>
+      <l:l i="150">&#525;</l:l>
+      <l:l i="150">&#526;</l:l>
+      <l:l i="150">&#527;</l:l>
+      <l:l i="150">&#554;</l:l>
+      <l:l i="150">&#555;</l:l>
+      <l:l i="150">&#556;</l:l>
+      <l:l i="150">&#557;</l:l>
+      <l:l i="150">&#558;</l:l>
+      <l:l i="150">&#559;</l:l>
+      <l:l i="150">&#560;</l:l>
+      <l:l i="150">&#561;</l:l>
+      <l:l i="150">&#7756;</l:l>
+      <l:l i="150">&#7757;</l:l>
+      <l:l i="150">&#7758;</l:l>
+      <l:l i="150">&#7759;</l:l>
+      <l:l i="150">&#7760;</l:l>
+      <l:l i="150">&#7761;</l:l>
+      <l:l i="150">&#7762;</l:l>
+      <l:l i="150">&#7763;</l:l>
+      <l:l i="150">&#7884;</l:l>
+      <l:l i="150">&#7885;</l:l>
+      <l:l i="150">&#7886;</l:l>
+      <l:l i="150">&#7887;</l:l>
+      <l:l i="150">&#7888;</l:l>
+      <l:l i="150">&#7889;</l:l>
+      <l:l i="150">&#7890;</l:l>
+      <l:l i="150">&#7891;</l:l>
+      <l:l i="150">&#7892;</l:l>
+      <l:l i="150">&#7893;</l:l>
+      <l:l i="150">&#7894;</l:l>
+      <l:l i="150">&#7895;</l:l>
+      <l:l i="150">&#7896;</l:l>
+      <l:l i="150">&#7897;</l:l>
+      <l:l i="150">&#7898;</l:l>
+      <l:l i="150">&#7899;</l:l>
+      <l:l i="150">&#7900;</l:l>
+      <l:l i="150">&#7901;</l:l>
+      <l:l i="150">&#7902;</l:l>
+      <l:l i="150">&#7903;</l:l>
+      <l:l i="150">&#7904;</l:l>
+      <l:l i="150">&#7905;</l:l>
+      <l:l i="150">&#7906;</l:l>
+      <l:l i="150">&#7907;</l:l>
+      <l:l i="160">P</l:l>
+      <l:l i="160">p</l:l>
+      <l:l i="160">&#420;</l:l>
+      <l:l i="160">&#421;</l:l>
+      <l:l i="160">&#7764;</l:l>
+      <l:l i="160">&#7765;</l:l>
+      <l:l i="160">&#7766;</l:l>
+      <l:l i="160">&#7767;</l:l>
+      <l:l i="170">Q</l:l>
+      <l:l i="170">q</l:l>
+      <l:l i="170">&#672;</l:l>
+      <l:l i="180">R</l:l>
+      <l:l i="180">r</l:l>
+      <l:l i="180">&#340;</l:l>
+      <l:l i="180">&#341;</l:l>
+      <l:l i="180">&#342;</l:l>
+      <l:l i="180">&#343;</l:l>
+      <l:l i="180">&#344;</l:l>
+      <l:l i="180">&#345;</l:l>
+      <l:l i="180">&#528;</l:l>
+      <l:l i="180">&#529;</l:l>
+      <l:l i="180">&#530;</l:l>
+      <l:l i="180">&#531;</l:l>
+      <l:l i="180">&#636;</l:l>
+      <l:l i="180">&#637;</l:l>
+      <l:l i="180">&#638;</l:l>
+      <l:l i="180">&#7768;</l:l>
+      <l:l i="180">&#7769;</l:l>
+      <l:l i="180">&#7770;</l:l>
+      <l:l i="180">&#7771;</l:l>
+      <l:l i="180">&#7772;</l:l>
+      <l:l i="180">&#7773;</l:l>
+      <l:l i="180">&#7774;</l:l>
+      <l:l i="180">&#7775;</l:l>
+      <l:l i="190">S</l:l>
+      <l:l i="190">s</l:l>
+      <l:l i="190">&#346;</l:l>
+      <l:l i="190">&#347;</l:l>
+      <l:l i="190">&#348;</l:l>
+      <l:l i="190">&#349;</l:l>
+      <l:l i="190">&#350;</l:l>
+      <l:l i="190">&#351;</l:l>
+      <l:l i="190">&#352;</l:l>
+      <l:l i="190">&#353;</l:l>
+      <l:l i="190">&#536;</l:l>
+      <l:l i="190">&#537;</l:l>
+      <l:l i="190">&#642;</l:l>
+      <l:l i="190">&#7776;</l:l>
+      <l:l i="190">&#7777;</l:l>
+      <l:l i="190">&#7778;</l:l>
+      <l:l i="190">&#7779;</l:l>
+      <l:l i="190">&#7780;</l:l>
+      <l:l i="190">&#7781;</l:l>
+      <l:l i="190">&#7782;</l:l>
+      <l:l i="190">&#7783;</l:l>
+      <l:l i="190">&#7784;</l:l>
+      <l:l i="190">&#7785;</l:l>
+      <l:l i="200">T</l:l>
+      <l:l i="200">t</l:l>
+      <l:l i="200">&#354;</l:l>
+      <l:l i="200">&#355;</l:l>
+      <l:l i="200">&#356;</l:l>
+      <l:l i="200">&#357;</l:l>
+      <l:l i="200">&#358;</l:l>
+      <l:l i="200">&#359;</l:l>
+      <l:l i="200">&#427;</l:l>
+      <l:l i="200">&#428;</l:l>
+      <l:l i="200">&#429;</l:l>
+      <l:l i="200">&#430;</l:l>
+      <l:l i="200">&#648;</l:l>
+      <l:l i="200">&#538;</l:l>
+      <l:l i="200">&#539;</l:l>
+      <l:l i="200">&#566;</l:l>
+      <l:l i="200">&#7786;</l:l>
+      <l:l i="200">&#7787;</l:l>
+      <l:l i="200">&#7788;</l:l>
+      <l:l i="200">&#7789;</l:l>
+      <l:l i="200">&#7790;</l:l>
+      <l:l i="200">&#7791;</l:l>
+      <l:l i="200">&#7792;</l:l>
+      <l:l i="200">&#7793;</l:l>
+      <l:l i="200">&#7831;</l:l>
+      <l:l i="210">U</l:l>
+      <l:l i="210">u</l:l>
+      <l:l i="210">&#217;</l:l>
+      <l:l i="210">&#249;</l:l>
+      <l:l i="210">&#218;</l:l>
+      <l:l i="210">&#250;</l:l>
+      <l:l i="210">&#219;</l:l>
+      <l:l i="210">&#251;</l:l>
+      <l:l i="210">&#220;</l:l>
+      <l:l i="210">&#252;</l:l>
+      <l:l i="210">&#360;</l:l>
+      <l:l i="210">&#361;</l:l>
+      <l:l i="210">&#362;</l:l>
+      <l:l i="210">&#363;</l:l>
+      <l:l i="210">&#364;</l:l>
+      <l:l i="210">&#365;</l:l>
+      <l:l i="210">&#366;</l:l>
+      <l:l i="210">&#367;</l:l>
+      <l:l i="210">&#368;</l:l>
+      <l:l i="210">&#369;</l:l>
+      <l:l i="210">&#370;</l:l>
+      <l:l i="210">&#371;</l:l>
+      <l:l i="210">&#431;</l:l>
+      <l:l i="210">&#432;</l:l>
+      <l:l i="210">&#467;</l:l>
+      <l:l i="210">&#468;</l:l>
+      <l:l i="210">&#469;</l:l>
+      <l:l i="210">&#470;</l:l>
+      <l:l i="210">&#471;</l:l>
+      <l:l i="210">&#472;</l:l>
+      <l:l i="210">&#473;</l:l>
+      <l:l i="210">&#474;</l:l>
+      <l:l i="210">&#475;</l:l>
+      <l:l i="210">&#476;</l:l>
+      <l:l i="210">&#532;</l:l>
+      <l:l i="210">&#533;</l:l>
+      <l:l i="210">&#534;</l:l>
+      <l:l i="210">&#535;</l:l>
+      <l:l i="210">&#7794;</l:l>
+      <l:l i="210">&#7795;</l:l>
+      <l:l i="210">&#7796;</l:l>
+      <l:l i="210">&#7797;</l:l>
+      <l:l i="210">&#7798;</l:l>
+      <l:l i="210">&#7799;</l:l>
+      <l:l i="210">&#7800;</l:l>
+      <l:l i="210">&#7801;</l:l>
+      <l:l i="210">&#7802;</l:l>
+      <l:l i="210">&#7803;</l:l>
+      <l:l i="210">&#7908;</l:l>
+      <l:l i="210">&#7909;</l:l>
+      <l:l i="210">&#7910;</l:l>
+      <l:l i="210">&#7911;</l:l>
+      <l:l i="210">&#7912;</l:l>
+      <l:l i="210">&#7913;</l:l>
+      <l:l i="210">&#7914;</l:l>
+      <l:l i="210">&#7915;</l:l>
+      <l:l i="210">&#7916;</l:l>
+      <l:l i="210">&#7917;</l:l>
+      <l:l i="210">&#7918;</l:l>
+      <l:l i="210">&#7919;</l:l>
+      <l:l i="210">&#7920;</l:l>
+      <l:l i="210">&#7921;</l:l>
+      <l:l i="220">V</l:l>
+      <l:l i="220">v</l:l>
+      <l:l i="220">&#434;</l:l>
+      <l:l i="220">&#651;</l:l>
+      <l:l i="220">&#7804;</l:l>
+      <l:l i="220">&#7805;</l:l>
+      <l:l i="220">&#7806;</l:l>
+      <l:l i="220">&#7807;</l:l>
+      <l:l i="230">W</l:l>
+      <l:l i="230">w</l:l>
+      <l:l i="230">&#372;</l:l>
+      <l:l i="230">&#373;</l:l>
+      <l:l i="230">&#7808;</l:l>
+      <l:l i="230">&#7809;</l:l>
+      <l:l i="230">&#7810;</l:l>
+      <l:l i="230">&#7811;</l:l>
+      <l:l i="230">&#7812;</l:l>
+      <l:l i="230">&#7813;</l:l>
+      <l:l i="230">&#7814;</l:l>
+      <l:l i="230">&#7815;</l:l>
+      <l:l i="230">&#7816;</l:l>
+      <l:l i="230">&#7817;</l:l>
+      <l:l i="230">&#7832;</l:l>
+      <l:l i="240">X</l:l>
+      <l:l i="240">x</l:l>
+      <l:l i="240">&#7818;</l:l>
+      <l:l i="240">&#7819;</l:l>
+      <l:l i="240">&#7820;</l:l>
+      <l:l i="240">&#7821;</l:l>
+      <l:l i="250">Y</l:l>
+      <l:l i="250">y</l:l>
+      <l:l i="250">&#221;</l:l>
+      <l:l i="250">&#253;</l:l>
+      <l:l i="250">&#255;</l:l>
+      <l:l i="250">&#376;</l:l>
+      <l:l i="250">&#374;</l:l>
+      <l:l i="250">&#375;</l:l>
+      <l:l i="250">&#435;</l:l>
+      <l:l i="250">&#436;</l:l>
+      <l:l i="250">&#562;</l:l>
+      <l:l i="250">&#563;</l:l>
+      <l:l i="250">&#7822;</l:l>
+      <l:l i="250">&#7823;</l:l>
+      <l:l i="250">&#7833;</l:l>
+      <l:l i="250">&#7922;</l:l>
+      <l:l i="250">&#7923;</l:l>
+      <l:l i="250">&#7924;</l:l>
+      <l:l i="250">&#7925;</l:l>
+      <l:l i="250">&#7926;</l:l>
+      <l:l i="250">&#7927;</l:l>
+      <l:l i="250">&#7928;</l:l>
+      <l:l i="250">&#7929;</l:l>
+      <l:l i="260">Z</l:l>
+      <l:l i="260">z</l:l>
+      <l:l i="260">&#377;</l:l>
+      <l:l i="260">&#378;</l:l>
+      <l:l i="260">&#379;</l:l>
+      <l:l i="260">&#380;</l:l>
+      <l:l i="260">&#381;</l:l>
+      <l:l i="260">&#382;</l:l>
+      <l:l i="260">&#437;</l:l>
+      <l:l i="260">&#438;</l:l>
+      <l:l i="260">&#548;</l:l>
+      <l:l i="260">&#549;</l:l>
+      <l:l i="260">&#656;</l:l>
+      <l:l i="260">&#657;</l:l>
+      <l:l i="260">&#7824;</l:l>
+      <l:l i="260">&#7825;</l:l>
+      <l:l i="260">&#7826;</l:l>
+      <l:l i="260">&#7827;</l:l>
+      <l:l i="260">&#7828;</l:l>
+      <l:l i="260">&#7829;</l:l>
+   </l:letters>
+</l:l10n>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/ChangeLog
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/ChangeLog	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/ChangeLog	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1768 @@
+2004-03-04  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* formal.xsl, table.xsl: Use table.table.properties on tables
+
+	* inline.xsl: Make linked first glossterms italic like all the glossterms
+
+	* param.ent, param.xweb: Added table.table.properties
+
+2004-03-02  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* xep.xsl: Seems that XEP now supports Unicode characters in bookmarks. There is no further need to strip accents from characters.
+
+2004-02-29  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* graphics.xsl: Improved mapping of scalefit attribute to content-width FO property
+
+2004-02-26  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* verbatim.xsl: Bug #875229: add white-space-treatment=preserve
+
+2004-02-11  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* formal.xsl: informal.object template now handles informalequation.
+
+2004-02-06  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* component.xsl: Add force-page-count="no-force" to preface when double.sided
+	is off to prevent extra blank page.
+
+	* component.xsl, division.xsl: Added force-page-count="no-force" when double.sided = 0
+	to prevent extra blank pages.
+
+2004-01-30  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* formal.xsl: calsTable template should use table.properties
+	instead of formal.object.properties.
+
+2004-01-29  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* autotoc.xsl: Use titleabbrev in ToC
+
+	* biblio.xsl: Support 'info' and 'personblurb'
+
+	* docbook.xsl: Support DocBook NG by way of the following hack: if we find an NG document, do an identity transform to throw away the NG namespace and then process the result. Requires exsl:node-set().
+
+	* docbookng.xsl: New file.
+
+	* qandaset.xsl, titlepage.xsl: Support 'info'
+
+2004-01-29  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* titlepage.xsl: Fix for multiple editor elements running together.
+
+2004-01-26  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* pagesetup.xsl, param.ent, param.xweb: Added header.column.widths and footer.column.widths to
+	permit adjustment of the header and footer widths.
+
+2004-01-17  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* xep.xsl: Added 'chapter' to test for adding TOC bookmark.
+
+2004-01-16  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* formal.xsl: Fixed bug in evaluation of @float in figure.
+
+2004-01-13  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* inline.xsl: Inline sequences now output id attribute if found.
+
+2004-01-08  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* biblio.xsl: Initial support for bibliolist
+
+	* table.xsl: Abort if there's no @cols
+
+2003-12-31  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* autoidx-ng.xsl: New file.
+
+2003-12-30  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* biblio.xsl, xref.xsl: Changed document($bibliography.collection)
+	to document($bibliography.collection,.) so it will
+	look in the current directory instead of
+	the stylesheet directory.
+
+	* graphics.xsl: Fixed test for graphic inside inlineequation.
+
+	* xref.xsl: Added refsection to mode="xref-to" to support xref to refsection.
+
+2003-12-16  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* index.xsl, pagesetup.xsl, titlepage.templates.xml: Fixed bug in index title indents when $title.margin.left is
+	non-zero.
+
+2003-12-15  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* sections.xsl: Now marker respects $marker.section.level parameter.
+
+2003-12-10  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* param.ent, param.xweb: Added marker.section.level to control which sections
+	are included in running headers or footers.
+
+2003-12-07  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* component.xsl: Fixed bug #605761 where article/appendix title did not respect
+	the $title.margin.left setting.  Use a new
+	article.appendix.title.properties attribute set.
+
+	* param.ent, param.xweb: Added article.appendix.title.properties to fix bug 605761.
+
+2003-12-05  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* param.ent, param.xweb: Added refentry.pagebreak parameter.
+
+	* refentry.xsl: refnamediv now uses section.level template to compute title level.
+
+	* refentry.xsl: Added $refentry.pagebreak parameter to make page breaks optional.
+
+2003-12-04  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* inline.xsl, param.ent, param.xweb: Support new parameters for superscript/subscript properties
+
+2003-12-02  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* lists.xsl: Processing of listitems now processes and preserves order of comments and PIs.
+
+2003-11-30  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* htmltbl.xsl, task.xsl: Added CVS $Id.
+
+2003-11-25  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* pagesetup.xsl: Remove $title.margin.left from the margin-left calculation
+	when $passivetex.extensions != 0 since it can't do the math.
+
+2003-11-24  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* lists.xsl: Make sure that fo:list-item-body always contains an fo:block
+
+2003-11-23  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* inline.xsl: Support code inline
+
+2003-11-05  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* formal.xsl: Moved id from fo:table to container block in informaltable
+	to eliminate duplicate ids when multiple tgroups used.
+
+2003-11-05  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* graphics.xsl: Added GIF extensions which is supported by FOP
+
+2003-10-28  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* formal.xsl: Add comment about span not working in most FO processor because
+	not on a child of fo:flow.
+
+2003-10-15  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* pagesetup.xsl: Added units to margin-left="0" in header and footer templates.
+
+2003-10-11  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* titlepage.xsl: width property added to revhistory table, with
+	option to use <?dbfo table-width="xx%"?> processing instruction.
+
+2003-10-08  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* pagesetup.xsl: Removed title.margin.left indent for the index-*-draft
+	page masters as well.
+
+2003-10-04  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* autoidx.xsl, index.xsl, param.ent, param.xweb: Significant index terms can get special rendering in XEP
+
+2003-10-03  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* lists.xsl: Support stepalternatives
+
+2003-09-29  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* lists.xsl: Fixed bug in variablelist width calc that was returning zero.
+
+2003-09-28  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* lists.xsl: Bug #779655: fix PIs and comments in segmented lists
+
+2003-09-27  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* block.xsl, qandaset.xsl: Bug #687783: attempt rudimentary support for blockinfo
+
+2003-09-25  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* sections.xsl: call to section.heading now includes empty titleabbrev
+	param unless actual titleabbrev element is present.
+
+2003-09-24  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* param.xweb: Fixed typo.
+
+2003-09-18  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* verbatim.xsl: Added text-align='start' in literallayout when
+	not monospaced.
+
+2003-09-16  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* titlepage.templates.xml: Changed "0" to "0pt" in index margin-left property.
+
+2003-09-12  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* xref.xsl: Add a nonbreaking space before ulink footnote reference.
+
+2003-09-10  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* sections.xsl: Modified template for "section" to handle section.level*.properties
+	attribute sets.
+
+2003-09-09  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* param.ent, param.xweb: Added section.*.properties.
+
+	* sections.xsl: Added section.*.properties to container block for
+	each section level.
+
+2003-09-08  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* lists.xsl: Exclude indexterms from calculation of string length
+	in longest.term template since they are not visible.
+
+2003-09-07  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* docbook.xsl: Remove slides from root.elements; let slides stylesheet override root.elements instead
+
+2003-09-05  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* biblio.xsl: Added "part" to list of parents that require a page-sequence
+	for bibliography.
+
+2003-09-03  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* docbook.xsl: Added slides to the root.elements variable so the slides
+	customization doesn't break.
+
+2003-09-02  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* lists.xsl: Turn off procedure/titleabbrev in regular output.
+	Adjust variablelist termlength from em * 0.50 to em * 0.60
+	so short terms fit better.
+
+2003-08-29  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* inline.xsl: Rudimentary support for @dir
+
+2003-08-29  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* pagesetup.xsl, titlepage.templates.xml: For index, turn off $title.margin.left so the index
+	looks like a normal two-column index.
+
+	* qandaset.xsl: Fixed label-length calculation to match variablelist.
+
+2003-08-28  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* callout.xsl, footnote.xsl, formal.xsl, index.xsl, pagesetup.xsl, param.ent, param.xweb, titlepage.templates.xml, titlepage.xsl, xref.xsl: 
+	Changed body.font.family to body.fontset and
+	title.font.family to title.fontset in font-family property
+	attributes, in order to append symbol.font.family parameter value.
+
+2003-08-27  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* docbook.xsl, formal.xsl, htmltbl.xsl: Rudimentary support for HTML tables
+
+	* docbook.xsl, task.xsl: Support task
+
+	* formal.xsl: Make ugly warnings for HTML tables (not supported yet)
+
+	* inline.xsl: Support uri and orgname in para
+
+	* verbatim.xsl: Support startinglinenumber and continuation on verbatim environments
+
+2003-08-19  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* docbook.xsl: Move root.elements variable to the top level so that other stylesheets (e.g, slides) can override it
+
+	* lists.xsl: The parameter is variablelist.max.termlength not vlist.max.termwidth
+
+	* param.ent, param.xweb: Add qanda.defaultlabel, xref.label-title.separator, xref.label-page.separator, and xref.title-page.separator
+
+2003-08-14  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* component.xsl: Changed span="all" to span="inherit" when pgwide=1 in
+	component.title because span attribute must be on direct
+	child of fo:flow.  This eliminates the error message.
+
+	* docbook.xsl: Root template now makes sure the root element is
+	one of those that generates a page-sequence.
+
+	* lists.xsl: Improved computation of variablelist indents.
+
+	* pagesetup.xsl: Adjusted left margins in page masters to compensate
+	for $title.margin.left.
+
+	* param.ent, param.xweb: Added variablelist.max.termlength parameter to
+	control maximum list indent.
+
+2003-08-07  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* callout.xsl: Fixed bug in callout numbering when <co> inside an inline.
+
+	* component.xsl: Added fotex:bookmark to the separate article/appendix template
+	which didn't generate Passivetex bookmarks.
+
+2003-07-31  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* pagesetup.xsl: Removed fop.extensions=0 condition for draft background image
+	now that FOP 0.20.5 supports background images.
+
+	* qandaset.xsl: Several fixes:
+	  extraneous dot when defaultlabel=qanda.
+	  titleabbrev supported.
+	  fixed qandadiv.autolabel.
+	  changed qanda.defaultlabel from variable to parameter.
+	  fixed answer label
+	  added dbfo label-width.
+	  When label used, calculates term width as for variablelist.
+
+2003-07-25  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* xref.xsl: Support insert.xref.page.number = 1 for backwards compatibility,
+	equivalent to a value of "yes".
+
+	* xref.xsl: Standard page citation now checks for xrefstyle attribute.
+
+2003-07-13  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* callout.xsl: Fixed duplicate id bug in coref.
+
+2003-07-10  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* lists.xsl: Handles titleabbrev on itemizedlist, orderedlist, variablelist.
+
+	* lists.xsl: Now variablelists properly handle preamble text that appears
+	before the first varlistenty.
+
+2003-07-09  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* footnote.xsl: When fop.extensions is on, replace baseline-shift with vertical-align
+	attribute for footnote numbers.
+
+	* inline.xsl: Superscript and subscript now use vertical-align instead of
+	baseline-shift when fop.extensions is set.
+
+2003-06-25  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* block.xsl: Process formalpara/title to variable so can test for last
+	char of any generated text.
+
+2003-06-23  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* param.xweb: Added xml fragment for new qanda.title properties.
+
+2003-06-22  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* graphics.xsl: Added BMP, GIF, and TIFF to supported graphics for FOP,
+	per the FOP documentation.
+
+	* param.ent, param.xweb, qandaset.xsl: Separate qanda set title properties from section heading
+	properties so they can be customized without conflict.
+
+2003-06-21  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* block.xsl: Check for attribution before generating markup for it.
+
+	* index.xsl: Whitespace
+
+	* pagesetup.xsl: Pass pageclass, sequence, and gentext-key to head.sep.rule and foot.sep.rule.
+
+	* pagesetup.xsl, param.ent, param.xweb: Support column gap adjustments
+
+2003-06-19  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* biblio.xsl: Removed duplicate templates for biblioid.
+
+2003-06-10  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* lists.xsl: Added keep-with-next to procedure's step/title so title stays
+	on same page as step text.
+
+2003-06-05  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* table.xsl: Now colwidth="*" generates proportional-column-width(1.00)
+	instead of empty argument.
+
+2003-06-03  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* fop.xsl: Bug #719142: make FOP generate ToCs more generously
+
+2003-05-30  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* glossary.xsl: Fixed vertical spacing between glossterm and glossdef when
+	glossary.as.blocks is set.
+
+2003-05-28  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* sections.xsl: Fixed bridgehead renderas levels to match section level.
+	This was missed when $level parameter was changed to
+	match the section level.
+
+2003-05-20  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* axf.xsl: New file.
+
+2003-05-15  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* autoidx.xsl, autotoc.xsl, component.xsl, division.xsl, docbook.xsl, index.xsl, param.ent, param.xweb, refentry.xsl, sections.xsl: 
+	Added support for AntennaHouse XSL Formatter. You can use axf.extensions=1 setting to generate bookmarks, document info and to merge duplicate page numbers in index.
+
+2003-05-14  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* autoidx.xsl, index.xsl, param.ent, param.xweb: Added support for XEP index extensions. If you set xep.extensions to 1 duplicate page numbers in index will be merged using XEP extension to XSL-FO
+
+2003-05-08  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* param.xweb: Added fragref for admon.textlabel
+
+2003-05-07  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* admon.xsl: Now accepts admon.textlabel parameter to turn off Note, Warning,
+	etc. label.
+
+	* param.ent, param.xweb: Added admon.textlabel parameter to enable turning
+	off Note, Warning, etc.
+
+2003-04-14  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* docbook.xsl: Initial support for timestamp PI. From now you can use <?timestamp format="Y-m-d H:M:S"?> to get current datetime in your document. More features like localization and exctracting date from CVS tag will follow.
+
+2003-04-13  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* table.xsl: A few bug fixes for the colsep/rowsep code
+
+	* xep.xsl: FeatReq #684561: support more XEP metadata
+
+2003-04-12  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* biblio.xsl: Added hyphenation support
+
+	* callout.xsl: Added support for coref
+
+	* component.xsl, division.xsl, glossary.xsl, index.xsl, refentry.xsl, sections.xsl, toc.xsl: 
+	Added support for hyphenation-character, hyphenation-push-character-count, and hyphenation-remain-character-count
+
+	* docbook.xsl: Use root.properties
+
+	* ebnf.xsl: Support ebnf.assignment and ebnf.statement.terminator
+
+	* inline.xsl: Support beginpage (does nothing; see TDG)
+
+	* param.ent, param.xweb: Added root.properties, ebnf.assignment, and ebnf.statement.terminator
+
+	* table.xsl: Support bgcolor PI in table cells; make sure rowsep and colsep don't have any effect on the last row or column
+
+	* titlepage.xsl: Handle othercredit on titlepage a little better
+
+	* xref.xsl: Make page citations into active links
+
+2003-04-07  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* autoidx.xsl: Applied fix from Jeff Beal that
+	fixed the bug that put secondary page numbers on primary entries.
+	Same with tertiary page numbers on secondary entries.
+
+2003-04-01  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* glossary.xsl: Added definition of missing variable $collection
+
+2003-03-26  Michael Smith <xmldoc at users.sourceforge.net>
+
+	* Makefile: wdocbook.xsl obsoleted by w2docbook.xsl, updated globally
+
+2003-03-25  Michael Smith <xmldoc at users.sourceforge.net>
+
+	* Makefile: reverting wdocbook.xsl -> w2docbook.xsl changes
+
+2003-03-24  Michael Smith <xmldoc at users.sourceforge.net>
+
+	* Makefile: wrong filename '../../litprog/wdocbook.xsl' broke build, fixed
+
+2003-03-12  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* footnote.xsl: Make footnote formatting 'normal' even when it occurs in a context that has special formatting
+
+2003-03-02  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* math.xsl: Fixed several errors related to TeX math processing
+
+2003-02-28  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* glossary.xsl: Added warning when $glossary.collection is not blank, but
+	it cannot open the specified file.
+
+2003-02-24  <dcramer at users.sourceforge.net>
+
+	* formal.xsl: Pick up the frame attribute on table and informaltable.
+
+2003-02-19  <dcramer at users.sourceforge.net>
+
+	* index.xsl: indexdiv/title in non-autogenerated indexes are now picked up.
+
+2003-02-17  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* param.ent, param.xweb, param.xweb: Removed component.title.properties
+
+2003-02-10  <dcramer at users.sourceforge.net>
+
+	* glossary.xsl: Added keep-with-next and keep-together to block around glossterm(s) in glossary.as.block template to prevent glossterms being widowed from their glossentries.
+
+2003-02-08  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* glossary.xsl: Fixed bug in glosssee and glossseealso using mode="xref" when
+	should be using mode="xref-to".
+
+2003-01-31  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* biblio.xsl, component.xsl, division.xsl, glossary.xsl, index.xsl, refentry.xsl, sections.xsl: 
+	Move IDs from page-sequences down to titlepage blocks
+
+	* block.xsl, lists.xsl, titlepage.xsl: Use proportional-column-width(1) on more tables
+
+2003-01-30  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* qandaset.xsl: Corrected several references to parameter $qanda.defaultlabel
+	that were missing the "$".
+
+2003-01-28  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* inline.xsl: Check for glossterm.auto.link when linking firstterms; don't output gl. prefix on glossterm links
+
+2003-01-23  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* autotoc.xsl: Fix bugs associated with toc-context parameter in division.toc
+
+	* division.xsl: Generate Part ToCs
+
+	* pagesetup.xsl: Use proportional-column-width() for header/footer tables; suppress relative-align when when using FOP
+
+2003-01-22  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* formal.xsl: Handle alignment correctly when screenshot is used in figure
+
+	* xref.xsl: Format chapter and appendix titles consistently in xrefs
+
+2003-01-21  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* formal.xsl: Attempt to support multiple tgroups (by making multiple tables and placing them right next to each other)
+
+	* lists.xsl: Bug #653344: Output fo:table-columns in simplelist tables
+
+2003-01-20  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* autoidx.xsl, index.xsl: Use titlepage templates for indexdiv title formatting
+
+	* biblio.xsl: Bug #640762: Support new biblioentry elements
+
+	* component.xsl: Use titleabbrev in markers; use titlepage templates for subtitles; delete bogus component.separator template.
+
+	* footnote.xsl: Support {table.}footnote.number.{format,symbols}
+
+	* glossary.xsl: Use titlepage templates for glossdiv formatting; support glossentry.show.acronyms
+
+	* pagesetup.xsl: Suppress draft page-masters when draft.mode=no
+
+	* pagesetup.xsl: Bug #669765: Make blank pages verso not recto
+
+	* param.ent, param.xweb: Support xref.with.number.and.title
+
+	* param.ent, param.xweb: Added {table.}footnote.number.{format,symbols}, glossentry.show.acronym, and ulink.footnote.number.format
+
+	* param.xweb: Fix missing fragref
+
+	* qandaset.xsl: QandASet titles use section.title for convenience. Now they don't output fo:markers for those titles.
+
+	* sections.xsl: Support titleabbrev for running headers/footers; don't force a section ToC for refentrys
+
+	* titlepage.templates.xml: SIGNIFICANT changes to the titlepage template setup. See RELEASE-NOTES.
+
+	* titlepage.xsl: Add property sets for glossdiv, bibliodiv, and indexdiv. Improve formatting of authors.
+
+	* verbatim.xsl: Arrange to use only a single fo:block for shading to avoid a bug in earlier versions of XEP
+
+	* xref.xsl: Change formatting of URL footnotes
+
+	* xref.xsl: Improve formatting of ulink footnotes; provide template to override formatting; use ulink.footnote.number.format; support xref to glossentry
+
+2003-01-17  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* lists.xsl: Output IDs for the first-paras in a listitem
+
+	* pagesetup.xsl: Fix bugs in page numbering when double.sided=1
+
+	* pagesetup.xsl: Remove region-name from region-body on blank pages
+
+	* xref.xsl: Remove duplicated IDs when endterm is used on xref
+
+2003-01-13  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* math.xsl: Added @align value to fo:block containing mediaobject in equation.
+
+2003-01-12  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* autoidx.xsl: Make sure that indexdivs are properly scoped. I've done this by adding a test to suppress the division if it contains no terms. It seems like there might be a better way, but I can't see it just at the moment
+
+2003-01-08  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* xref.xsl: In olink, use document($target.database.document, /) so the
+	olink target database location is relative to the document
+	instead of the stylesheet.
+
+2003-01-06  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* autoidx.xsl, index.xsl: Removed the unnecessary generate-index-from-terms template
+	in favor of generate-index, called with scope parameter.
+
+2003-01-02  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* autoidx.xsl, index.xsl: Rework indexing to avoid XSLT limitation/Saxon bug with context dependencies; finish porting Bob's changes from FO to HTML
+
+	* index.xsl, titlepage.templates.xml, titlepage.xsl: Support setindex (there were all sorts of things wrong with it)
+
+2003-01-01  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* autoidx.xsl, index.xsl: Make index elements always index the book that contains them (if there is one, otherwise the whole document); setindex always indexes the whole document
+
+	* autotoc.xsl, division.xsl, titlepage.templates.xml, titlepage.xsl: 
+	Support List of Procedures
+
+	* formal.xsl: Support separate property sets for figures, examples, equations, tables, and procedures. This way, they can have different border and other formatting properties.
+
+	* graphics.xsl: Support ignore.image.scaling parameter
+
+	* param.ent, param.xweb: New parameters
+
+	* xref.xsl: Use titleabbrev instead of title in xrefs
+
+2002-12-31  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* inline.xsl: Make lineannotations italic
+
+	* pagesetup.xsl: Added blank.page.content template to allow 'This Page Intentionally Left Blank' blank pages.
+
+2002-12-30  <dcramer at users.sourceforge.net>
+
+	* lists.xsl: Fixed spacing problem where step numbers don't line up with the corresponding text.
+
+2002-12-28  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* xref.xsl: Now that xrefstyle is official; make it take priority even when use.role.as.xrefstyle is non-zero.
+
+	* xref.xsl: Make endterm on xref higher priority than xreflabel on the target
+
+2002-12-24  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* division.xsl: Fixes bug #655587 to restart page numbering
+	after a preface.
+
+2002-12-18  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* autoidx.xsl: Changed sort to fold uppercase and lowercase together to fix
+	odd indexdiv sort order.
+
+	* graphics.xsl: Add graphic/@align value to fo:block text-align property
+	since text-align on external-graphic doesn't seem to work.
+
+2002-12-17  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* formal.xsl, graphics.xsl: Changed selection of mediaobject to be more consistent using
+	a separate select.mediaobject.index template. Also added
+	text-align to block containing external-graphic in fo output.
+
+2002-12-17  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* param.xweb: Build fixes.
+
+2002-12-17  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* titlepage.templates.xml: Made list.of.tables specifications the same as other list.of.*.
+
+2002-12-13  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* glossary.xsl: Handles missing otherterm target in glosssee and glosseealso.
+
+	* inline.xsl: Added the author et al special cases similar to
+	the HTML inline.xsl templates.
+
+2002-12-12  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* autoidx.xsl: An index now contains only indexterms within its scope
+	(within its parent element).
+
+	* autotoc.xsl, index.xsl: Make sure $generate.index controls whether the index is processed.
+
+	* formal.xsl: Change formal.object template to pass $placement parameter
+	to formal.object.heading template.
+
+	* lists.xsl: Fixed bug in segmentedlist title when segmentedlist.as.table set.
+
+2002-12-06  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* block.xsl: Fixed epigraph template so it processes all of its allowed
+	children, not just para.
+
+	* graphics.xsl, param.ent, param.xweb: Enabled support for selecting imageobject using the role attribute.
+
+2002-12-04  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* autotoc.xsl, component.xsl, sections.xsl: Added empty component.toc.separator and section.toc.separator templates
+	to provide customization opportunity between toc and first content.
+
+2002-11-29  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* pagesetup.xsl: Don't output a footnote-separator for FOP
+
+2002-11-16  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* biblio.xsl: Support abstract in bibliomixed
+
+	* biblio.xsl, xref.xsl: Support bibliosource; improve numbered bibliography entries and cross-references to them
+
+	* pagesetup.xsl: Added template to create footnote separator rule (if supported by your favorite FO processor)
+
+	* sections.xsl: Use value-of instead of copy-of for fo:marker because I haven't thought of a better way to avoid footnotes in markers which are illegal
+
+2002-11-15  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* admon.xsl: Changed graphical.admonition template from an fo:table
+	to an fo:list-block, so it works in both FOP and XEP.
+
+	* lists.xsl: Fixed two bugs in longest.term template that prevented proper
+	calculation of longest term width in variablelist.
+
+2002-11-15  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* table.xsl: Add support for xsltproc adjustColumnWidths extension
+
+2002-11-14  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* biblio.xsl: Use xreflabel (if it's present) on bibliography entries
+
+	* component.xsl: Don't restart page numbers on the first preface
+
+	* table.xsl: Support entrytbl
+
+2002-11-08  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* pagesetup.xsl: Corrected left and right page margins for even page masters:
+	inner and outer were reversed from what they should have been.
+
+2002-10-31  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* autoidx.xsl: Support spanning index terms (endofrange/startref)
+
+	* lists.xsl: Put para spacing around tabular simplelists
+
+2002-10-21  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* glossary.xsl: Bug #577798: glossentry with multiple glossdefs creates broken FO
+
+	* pagesetup.xsl: Updated header/footer properties to avoid missmatched margins caused by title.margin.left
+
+2002-10-20  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* inline.xsl: Bug #619474: support errortext element
+
+2002-10-19  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* pagesetup.xsl, param.ent, param.xweb: Added property sets to control page header and footer content formatting
+
+2002-10-18  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* param.xweb: Corrected the wording describing the placement of
+	the header and footer in the region-before and
+	region-after to match the diagram and stylesheet changes.
+
+2002-10-17  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* refentry.xsl: Fix bug where refentrys in parts were not in a page sequence
+
+2002-10-11  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* inline.xsl: glossterm and firstterm in text now use italicseq
+	to match the html formatting.
+
+2002-10-09  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* table.xsl: Removed debug code.
+
+2002-10-04  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* autotoc.xsl, sections.xsl: Support optional title on section ToCs. Optional titles for components, books, and sets will be trickier.
+
+	* formal.xsl, param.ent, param.xweb, table.xsl: Made separate parameters for table frame and table cell border properties
+
+2002-10-02  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* lists.xsl: Support continuation of orderedlists and inherited numeration in FO
+
+2002-10-01  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* qandaset.xsl, refentry.xsl, sections.xsl: Changed section.level template to return number that matches
+	the section level (sect1 = 1, etc.), and adjusted templates
+	that use section.level accordingly to produce same output
+	as before.
+
+2002-09-27  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* autoidx.xsl: Bug #496294: don't index endofrangeentries. They're no longer indexed, but they aren't handled quite right yet either, they don't generate ranges
+
+	* autotoc.xsl, sections.xsl: Support section ToCs
+
+	* block.xsl, titlepage.xsl: Bug #582192: support revdescription
+
+	* formal.xsl: Bug #497603: fixed and added default.float.class
+
+	* param.ent, param.xweb: Use new parameters
+
+	* synop.xsl: Fix sbr
+
+2002-09-20  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* docbook.xsl: Add context to error message about a missing template
+
+	* synop.xsl: Bug #605150: process arg correctly even when it's in a group
+
+2002-09-19  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* formal.xsl: Removed 'keep-with-next' from 'formal.title.properties' attribute set now
+	that the stylesheets support the option of putting such
+	titles below the object.  Now the $placement value determines
+	if 'keep-with-next' or 'keep-with-previous' is used in the
+	title block.
+
+2002-09-19  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* xref.xsl: Use fo-external-image (badly named) to wrap url() around external-destinations
+
+2002-09-15  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* table.xsl: Support a PI to rotate table cells
+
+2002-09-08  <dcramer at users.sourceforge.net>
+
+	* lists.xsl: Bug #445750: Adding a keep-together and keep-with-next to the block that wraps terms in a varlistentry to keep terms from being orphaned/widowed when variablelists are formatted as blocks.
+
+2002-09-06  <dcramer at users.sourceforge.net>
+
+	* component.xsl: Changing the mode in the apply-templates from title.markup to object.title.markup so that appendixes in articles can be formatted as specified in the appropriate lang.xml file.
+
+2002-09-05  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* division.xsl: Restart all books on page 1
+
+2002-09-04  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* param.ent, param.xweb: Reference the l10n.* parameters
+
+2002-09-03  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* graphics.xsl: Support textdata in textobject
+
+	* table.xsl: Make sure row-level colsep and rowsep values are 'inherited' onto missing cells
+
+2002-09-01  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* graphics.xsl: Put the url()/no-url() test for external graphics into a named template
+
+	* pagesetup.xsl: Add SVG to the list of XEP graphics formats; use the url()/no-url() named template for draft.watermark.image
+
+2002-08-28  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* table.xsl: Make inherited attributes work for 'missing' table cells
+
+2002-08-26  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* autoidx.xsl: Handle endofrange indexterms properly
+
+	* graphics.xsl: Make graphics formats FO-processor aware; support SVG when FOP is being used
+
+	* pdf2index: Support page ranges (generated by startofrang/endofrange index entries)
+
+2002-08-22  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* autoidx.xsl: Fix serious indexing bug that caused many index terms to be missing from the automatically generated index
+
+2002-08-21  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* autoidx.xsl: Support make.index.markup parameter
+
+	* index.xsl: Support make.index.markup parameter and hand-crafted indexes
+
+	* lists.xsl: Attempt to workaround bug in FOP handling of step content
+
+	* param.ent, param.xweb: Remove unused table.entry.padding parameter; add new make.index.markup parameter
+
+	* pdf2index: New file.
+
+2002-08-20  <dcramer at users.sourceforge.net>
+
+	* block.xsl: Adding missing template for simplemsgentry
+
+2002-08-11  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* pagesetup.xsl: Changed running header/footer rule line dimension from 1px to
+	0.5pt so passivetex doesn't gack.
+
+2002-08-08  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* autotoc.xsl: Fixed toc.line for FOP to align numbers
+	by adding leader-pattern-width property
+	as suggested by Nicolas Nieswandt.  Was able to remove
+	the fop.extensions choose/when structure because
+	it works for all processors.  The numbers in fop
+	align left rather than right, but at least they
+	line up.
+
+2002-07-26  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* pagesetup.xsl: Bob's reworked page header/footer ideas. I think there are still some rough edges.
+
+	* pagesetup.xsl: A little more tweaking to make things equivalent to the old scheme
+
+2002-07-24  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* sections.xsl: Moved <fo:marker> for section heading to be first child
+	of its parent block, per bug #586005 (and the XSL-FO spec).
+
+2002-07-19  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* biblio.xsl, param.ent, param.xweb: Support bibliography.numbered
+
+	* inline.xsl, param.ent, param.xweb: Use monospace.properties for inline monospaced items
+
+	* inline.xsl, param.ent, param.xweb: Support menuchoice.menu.separator and menuchoice.separator
+
+	* param.ent, param.xweb, sections.xsl: Support section.title.levelN.properties to remove hard coding of font sizes in section headings
+
+2002-07-17  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* biblio.xsl: Add keep to bibliodiv titles--they still need more work
+
+	* pagesetup.xsl: Add a touch of padding between the page-footer rule and the footer text
+
+	* table.xsl: Make header entries bold by default
+
+2002-07-16  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* biblio.xsl, component.xsl, division.xsl, glossary.xsl, index.xsl, refentry.xsl, sections.xsl, toc.xsl: 
+	Use basic initial-page-number property instead of extended force-page-count property to get components to start on odd pages in double.sided mode; call format.page.number to set the page number format for all page sequences
+
+	* division.xsl: Don't include equations w/o titles in the LOT for equations
+
+	* pagesetup.xsl: Added foot.empty and page.number.format named templates
+
+2002-07-15  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* pagesetup.xsl: Use named-templates for headers/footers to make customization easier
+
+2002-07-09  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* biblio.xsl: Don't output square brackets if there's no biblioentry label
+
+	* synop.xsl: Bug #573726: fix cmdsynopsisref formatting
+
+2002-07-08  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* autoidx.xsl: Bug #574840: fix bug where some symbol index terms got lost
+
+	* autoidx.xsl: Bug #574841: trim leading and trailing whitespace from primary/secondary/tertiary index terms
+
+	* block.xsl, param.ent, param.xweb: Add sidebar.properties to control presentation of Sidebar elements
+
+	* graphics.xsl: Work-around bug in xsltproc: explicitly cast scale to a number() before comparing it to 1.0
+
+2002-07-07  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* footnote.xsl, formal.xsl: Fix footnotes in table titles
+
+	* lists.xsl: Fix ugly bug: make sure premables to orderedlist and itemizedlist elements are actually formatted
+
+2002-07-06  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* xref.xsl: Added missing parameter to olink.hottext; added missing olink.outline template
+
+2002-07-06  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* xref.xsl: Commented out call to olink.outline for old
+	style olinks, in case Norm wants to add
+	support for them.
+
+	* xref.xsl: Bug fix: move xsl:param in olink template to be first child.
+
+2002-07-05  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* param.ent, param.xweb: Added four parameters to support new stylesheet olink system:
+	target.database.document.xml
+	use.local.olink.style.xml
+	current.docid.xml
+	olink.doctitle.xml
+
+	* xref.xsl: Modified for the new stylesheet olink system.
+	Modfified olink template to support the new
+	targetdoc and targetptr attributes.
+	Loads target database into keys for fast lookup.
+
+2002-07-04  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* block.xsl, xref.xsl: Feature req #525507: support xref to para by using the nearest containing section as the generated text
+
+	* fop.xsl: Patch #530026: suppress whitespace in FOP bookmarks
+
+	* glossary.xsl: Fix page number citation code
+
+2002-07-03  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* division.xsl, index.xsl, pagesetup.xsl, param.ent, param.xweb: 
+	More hacking on page headers and footers: added toggles for rules and headers on blank pages
+
+	* docbook.xsl: Feature Req #502932: added root.messages template for user defined messages
+
+	* pagesetup.xsl: Remove silly debugging message
+
+	* xref.xsl: Support insert.xref.page.number parameter
+
+2002-07-02  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* component.xsl, division.xsl, index.xsl, pagesetup.xsl, param.ent, param.xweb, sections.xsl: 
+	Completely rewrote pagesetup.xsl: more page models, more logical page margin setup
+
+2002-06-29  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* formal.xsl, lists.xsl: Make list/procedure titles use gentext and have consisten formatting
+
+	* table.xsl: Patch #514664: keep-together for table-cell if xep
+
+2002-06-27  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* glossary.xsl, param.ent, param.xweb: Make glossary parameters properly documented parameters; support glossary.as.blocks
+
+2002-06-26  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* table.xsl: Make sure we don't attempt to set the table width more than once if a table has multiple tgroups
+
+2002-06-11  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* autoidx.xsl, fo-patch-for-fop.xsl, fo-rtf.xsl, pagesetup.xsl, titlepage.templates.xml: 
+	Add CVS Ids
+
+	* biblio.xsl: Add spacing before bibliodivs
+
+	* pagesetup.xsl: Put a titlepage at the beginning of the oneside sequence
+
+	* param.ent, param.xweb: Added refentry.title.properties, section.title.properties, and use.role.as.xrefstyle
+
+	* refentry.xsl: Use titlepage system for refentry (refsynopsisdiv, refsect*) titles
+
+	* sections.xsl: Use section.title.properties
+
+	* titlepage.templates.xml: Added refentry titlepage elements; tweaked font sizes and some spacing
+
+	* titlepage.xsl: Fix copyright year formatting; add *.style attribute sets for refentry elements
+
+	* xref.xsl: Experimental support for xrefstyle
+
+2002-06-09  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* index.xsl: Fix bug #496453: make sure comments don't contain illegal chars
+
+2002-06-09  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* lists.xsl: Fixed bug #547163. Paragraph after formal paragraph in listitem gets correct spacing.
+
+	* refentry.xsl: Fixed bug #554159. Added empty template for refentryinfo
+
+2002-06-03  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* Makefile: Added dependencies for profiling stylesheets
+
+2002-06-02  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* lists.xsl: Support title on step in procedure
+
+2002-06-01  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* inline.xsl: Bug #560808 make systemitem formatting consistent
+
+2002-05-23  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* param.ent, param.xweb: Support for SVG in HTML
+
+2002-05-21  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* qandaset.xsl: Output '. ' in some contexts (this is a hack)
+
+2002-05-14  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* footnote.xsl: Format footnotes with format.footnote.mark named template for easy customization
+
+2002-05-13  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* lists.xsl, param.ent, param.xweb: Support spacing=compact on itemizedlist and orderedlist (Bug #501063)
+
+2002-05-12  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* block.xsl: Make sure IDs get generated for blockquote and epigraph
+
+	* formal.xsl, table.xsl: Make border-collapse='collapse' explicitly (that's the only model that works for CALS tables)
+
+	* graphics.xsl: Reworked support for graphic attributes; now support DocBook 4.2CR1 attributes
+
+	* lists.xsl: Bug #511965: add formal.title.properties to calloutlist titles
+
+	* math.xsl: Support MathML by passing it silently through to the FO result
+
+	* sections.xsl: Allow anchors in section titles; improve efforts to prevent page/column breaks immediately after section titles
+
+	* xref.xsl: Support xref to refnamediv and all elements with titles (at least when they have titles)
+
+2002-05-06  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* admon.xsl: Fix url() in admonition graphics
+
+	* callout.xsl: Fix url() in callout graphics
+
+2002-04-30  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* biblio.xsl: Use title.font.family in bibliodiv
+
+2002-04-20  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* param.ent, param.xweb, verbatim.xsl: Support shade.verbatim in FO; stop using vendor test to decide what extension function to call for line numbering
+
+2002-03-28  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* autotoc.xsl: Attempt to fix duplicate-id problem in ToC generation
+
+	* xep.xsl: Make XEP point to ToC pages for books, parts, etc. from PDF bookmarks
+
+2002-03-26  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* lists.xsl: Set maxlength of termlength to 12
+
+	* param.xweb: Documentation fix
+
+2002-03-25  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* component.xsl: Handle prefaceinfo
+
+	* formal.xsl: Handle textobject in tables
+
+	* graphics.xsl: Add template for mediaobjectco
+
+	* inline.xsl: Support personname
+
+	* math.xsl: Handle alt
+
+	* xref.xsl: Support xrefs to editor, othercredit, and personname
+
+2002-03-22  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* titlepage.xsl: Output blocks instead of wrappers around authors
+
+2002-03-21  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* biblio.xsl, titlepage.xsl: Support biblioid
+
+2002-03-20  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* xep.xsl: Don't output a link to the book title if the book has no title
+
+2002-03-19  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* autotoc.xsl: Make sure ToC elements have IDs for links from the PDF ToC
+
+2002-03-18  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* Makefile, component.xsl, division.xsl, fop.xsl, param.ent, param.xweb, xep.xsl: 
+	Replace generate.*.toc and generate.*.lot with single generate.toc parameter.
+
+	* block.xsl: Support RevHistory in content; support AckNo in article
+
+	* fop.xsl, xep.xsl: Don't generate ToC links if there's nothing to go in the ToC
+
+2002-03-15  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* synop.xsl, verbatim.xsl: Support classsynopsis and friends
+
+2002-03-14  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* .cvsignore: Ignore profiling stylesheets
+
+	* admon.xsl, autoidx.xsl, autotoc.xsl, biblio.xsl, block.xsl, callout.xsl, component.xsl, division.xsl, docbook.xsl, ebnf.xsl, fo-patch-for-fop.xsl, fo-rtf.xsl, fo.xsl, footnote.xsl, fop.xsl, formal.xsl, glossary.xsl, graphics.xsl, index.xsl, info.xsl, inline.xsl, keywords.xsl, lists.xsl, math.xsl, pagesetup.xsl, param.ent, param.xweb, passivetex.xsl, pi.xsl, qandaset.xsl, refentry.xsl, sections.xsl, synop.xsl, table.xsl, titlepage.templates.xml, titlepage.xsl, toc.xsl, verbatim.xsl, xep.xsl, xref.xsl: 
+	Whitespace only: change CR/LF back to LF. Norm was a total moron.
+
+	* admon.xsl, autoidx.xsl, autotoc.xsl, biblio.xsl, block.xsl, callout.xsl, component.xsl, division.xsl, docbook.xsl, ebnf.xsl, fo-patch-for-fop.xsl, fo-rtf.xsl, fo.xsl, footnote.xsl, fop.xsl, formal.xsl, glossary.xsl, graphics.xsl, index.xsl, info.xsl, inline.xsl, keywords.xsl, lists.xsl, math.xsl, pagesetup.xsl, param.ent, param.xweb, passivetex.xsl, pi.xsl, qandaset.xsl, refentry.xsl, sections.xsl, synop.xsl, table.xsl, titlepage.templates.xml, titlepage.xsl, toc.xsl, verbatim.xsl, xep.xsl, xref.xsl: 
+	Whitespace changes only: use PC-style CR/LF because Unix clients choke on this far less often than PC clients choke on the reverse. Grrr.
+
+	* docbook.xsl, fo-rtf.xsl, footnote.xsl, formal.xsl: Improve formatting of table footnotes and fix numeration of table/non-table footnotes
+
+	* formal.xsl, lists.xsl, param.ent, param.xweb: Support formal.title.placement
+
+2002-03-13  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* formal.xsl: Fix FO markup for rotated tables
+
+	* inline.xsl: Support other roles on emphasis; support nested emphasis
+
+	* sections.xsl: Give wrapped section titles a hanging indent
+
+	* titlepage.templates.xml: Don't shift the margin on article titles; they're supposed to be centered
+
+	* verbatim.xsl: Don't force verbatim environments to be start aligned; they should inherit the current text alignment
+
+2002-03-11  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* inline.xsl: Fixed bug #522900. Content of <emphasis> is not outputted twice.
+
+2002-03-03  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* param.ent, param.xweb: Added new stylesheet parameters for profiling.
+
+2002-03-01  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* Makefile: First portion of new profiling code. New stylesheet parameters will come later.
+
+2002-03-01  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* autotoc.xsl: Use alternate TOC format for FOP
+
+	* docbook.xsl: Move stylesheet.result.type out of param and put it explicitly in each stylesheet because it has to be different
+
+	* footnote.xsl: Make footnote numbers smaller and superscripted
+
+	* formal.xsl, table.xsl: Improve table border handling
+
+	* graphics.xsl: Support TIFF images
+
+	* graphics.xsl: Handle the case where graphics in inlineequations are inline
+
+	* pagesetup.xsl: Don't put watermarks on FOP; FOP doesn't understand them
+
+	* param.ent, param.xweb: Renamed table.border.padding and removed stylesheet.result.type
+
+2002-02-21  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* math.xsl, param.ent, param.xweb: Better control over delimiters for TeX equations. Added parameter tex.math.delims, when is set to 0, no delimiters (like $ and $$) are output. Same can be done for single equation by <?dbtex delims="no"?>.
+
+2002-02-20  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* formal.xsl: Bug #429331: center figure title if image is centered
+
+	* lists.xsl: Commented out a debugging message
+
+2002-02-11  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* component.xsl, index.xsl, pagesetup.xsl, param.ent, param.xweb, titlepage.templates.xml: 
+	Patch #510996: add support for two-colum indexes
+
+	* inline.xsl: Patch #514007: prevent hyphenation of email addresses
+
+2002-02-07  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* autotoc.xsl: Make title a link
+
+	* docbook.xsl: Reworked FOP outline mode
+
+	* fop.xsl: Reworked outline mode
+
+	* formal.xsl, param.ent, param.xweb: Added informal.object.properties
+
+2002-01-29  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* pagesetup.xsl, param.ent, param.xweb: Support 'draft' watermark
+
+2002-01-28  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* biblio.xsl: Allow bibliography to be a root element
+
+	* formal.xsl: Make landscape tables actually landscape---if your FO processor supports changes to the reference-orientation
+
+	* param.ent, param.xweb, xref.xsl: Provide option to allow URLs to be conditionally hyphenated
+
+2002-01-25  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* table.xsl: Fix bug that caused rowsep and colsep to be ignored on empty cells
+
+2002-01-10  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* fo-patch-for-fop.xsl: Allow the fox: prefix; this isn't the right fix, but it's easy and this file is only a workaround for FOP
+
+	* inline.xsl: Support emphasis role=bold in FO
+
+	* pagesetup.xsl: Set display-alignment on region-before and -after; output warning if the master-references is unrecognized when calculating the page header
+
+	* param.ent, param.xweb: Added documentation about page layout and ulink.footnotes and ulink.show
+
+	* xref.xsl: Use the ulink.show parameter when rendering ulinks
+
+2002-01-09  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* glossary.xsl: Bug fix: don't generate duplicate IDs on glossentrys
+
+2002-01-04  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* glossary.xsl: Make glossary.collection (usually) work when chunking is used; allow the use of glossdivs to be toggled in the document
+
+	* glossary.xsl, inline.xsl, param.ent, param.xweb: First cut at supporting a glossary.collection file
+
+2002-01-03  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* lists.xsl: Rework variablelist formatting; support lists vs. blocks with new parameters and calculate term-width reasonably
+
+	* param.ent, param.xweb: Replace format.variablelist.as.list with variablelist.as.blocks
+
+2002-01-01  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* .cvsignore: Added Makefile.param
+
+	* Makefile.param: Autogenerated
+
+	* block.xsl: Use blockquote.properties
+
+	* lists.xsl: Attempt to support alternate symbols on itemizedlists
+
+	* param.ent, param.xweb: Use new parameters: refentry.generate.title and blockquote.properties
+
+	* refentry.xsl: Improve formatting of reference pages
+
+	* titlepage.xsl: Simplify match pattern; add space in editor formatting
+
+2001-12-15  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* math.xsl: Improved support for TeX math inside equations.
+
+2001-12-06  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* Makefile.param, math.xsl, param.ent, param.xweb: Added support for TeX math in alt element. When using PassiveTeX, TeX equations can be directly passed to TeX. When using HTML, TeX file with code necessary to produce image equivalents of equations is generated.
+
+2001-12-04  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* Makefile: Fix chunking parameter errors
+
+	* Makefile, Makefile.param, param.ent, param.xweb: New parameters; reorganized xweb file; and some checking for consistent param files
+
+	* admon.xsl: Feature #454323: customizable font in admonitions
+
+	* autotoc.xsl: Feature #445713 TOC customization
+
+	* division.xsl: Added set TOC and moved book TOC after dedication
+
+	* docbook.xsl: Features #457872 and #479011 language and line-height
+
+	* glossary.xsl, inline.xsl: Support glossterm.auto.link
+
+	* refentry.xsl, xref.xsl: Feature #481793: support xref to refentry
+
+	* xep.xsl: Add bookmark for TOC
+
+2001-12-02  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* component.xsl: Allow inlines and anchors in titles
+
+2001-12-01  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* autoidx.xsl: Patch #468462: hot page numbers in the index
+
+	* division.xsl: Patch #470480: make part title formatting obey localization rules
+
+	* docbook.xsl, xep.xsl: Make sure bookmarks are never empty
+
+	* formal.xsl, table.xsl: Bug #487576: table/indexterm problems
+
+	* synop.xsl: Patch #462556: Improve func synopsis
+
+	* titlepage.templates.xml: Don't offset margin when using 'center' alignment
+
+	* xep.xsl: Fix bug in TOC title formatting
+
+2001-11-30  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* component.xsl, division.xsl: Bug #451265: page number of first part is wrong
+
+2001-11-29  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* fo-patch-for-fop.xsl: New file.
+
+	* lists.xsl: Patch #478068: procedures with one step
+
+	* lists.xsl: Patch #482482: margin-start should be margin-left
+
+	* xep.xsl: Patch #479140: bookmarks w/xep missing
+
+	* xep.xsl: Patch #479145: top-level bookmarks in xep
+
+	* xep.xsl: Fix it the right way: always test for top-level elements
+
+2001-11-28  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* lists.xsl, param.ent, param.xweb: Support formatting segmented lists as tables
+
+	* pagesetup.xsl: Bug #483364: wrong inner/outer margins
+
+	* param.ent, param.xweb: Added punct.honorific parameter
+
+	* pi.xsl: Use common pi-attribute template
+
+2001-11-21  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* biblio.xsl, component.xsl, division.xsl, glossary.xsl, index.xsl, pagesetup.xsl, refentry.xsl, sections.xsl, toc.xsl: 
+	Updated master-name/master-reference per the XSL 1.0 Recommendation
+
+2001-11-15  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* docbook.xsl, passivetex.xsl: When passivetex.extensions=1 character &#x200b; is inserted between all occurences of --. This stops TeX ligature mechanism which converted all -- to endash and --- to emdash (this is ill especially in source code listings containing XML comments or decrementation operator). Performance cost of evaluating condition for each text node is under 5 %. This shouldn't annoy anyone.
+
+2001-11-12  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* docbook.xsl, ebnf.xsl, footnote.xsl, lists.xsl, synop.xsl, xref.xsl: 
+	Support well-formed documents, use key() instead of id()
+
+2001-11-10  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* formal.xsl: Moved table frame code to a common named template; handle frame=none
+
+	* pagesetup.xsl: Added message if the master-name is unrecognized
+
+2001-11-09  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* param.xweb: Move the obvious ID value from the src:fragment to the refentry in parameter reference pages
+
+2001-11-03  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* biblio.xsl, inline.xsl: Support pubwork=article on citetitle
+
+	* formal.xsl, table.xsl: Table updates
+
+	* synop.xsl: Added block wrapper around paramdef in kr mode
+
+	* xref.xsl: Remove anchor name on anchor; it erroneously duplicates the html anchor template
+
+2001-10-16  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* table.xsl: Table support improvements
+
+2001-10-15  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* inline.xsl: Fix formatting of keycombo
+
+	* param.ent, param.xweb, table.xsl: Fix calculation of rowsep and colsep; added experimental support for table.borders.with.css in HTML; calculation of alignments needs to be added along the same lines
+
+2001-10-14  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* table.xsl: Fixed a number of significant outstanding table problems; I think HTML and FO now format all combinations of spans and missing cells correctly. But the border drawing isn't perfect on FO tables yet.
+
+2001-10-12  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* biblio.xsl: Tweaked bibliography formatting to include the labels
+
+	* block.xsl: Improve formatting of block quotes
+
+	* param.xweb: Fixed bogus attribute name
+
+2001-10-11  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* autoidx.xsl, docbook.xsl, index.xsl: Always use automatic indexing
+
+2001-10-09  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* Makefile: Fix typo
+
+	* titlepage.templates.xml, titlepage.xsl: Make sure authorgroup doesn't output IDs on both recto and verso pages
+
+2001-10-08  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* .cvsignore, Makefile, param.ent, param.xsl, param.xweb: 
+	Removed param.xsl; it's now generated from param.xweb
+
+	* fo.xsl: Added an anchor named template
+
+	* table.xsl: Moved several params to param.xsl; also changed hyphens to periods for consistency
+
+	* titlepage.templates.xml: Made margin-left a parameter so it's easier to tweak along with page.margin.outer
+
+	* titlepage.xsl: Keep section titles together with their sections
+
+	* xref.xsl: Added names to the link templates
+
+2001-09-25  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* param.xsl, titlepage.xsl: Support automatic collation of year ranges in copyright
+
+2001-09-24  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* lists.xsl: Whitespace changes
+
+2001-09-23  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* lists.xsl: Patch #460123, fix for <step>s 2 ff. in <procedure>
+
+2001-09-22  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* xref.xsl: Bug #463033: allow xref to list items (in orderedlists) and varlistentrys
+
+	* xref.xsl: Bug #462830: allow %p in templates
+
+2001-09-09  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* formal.xsl: Added keep-together.within-column
+
+2001-08-29  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* lists.xsl: Fix orderedlist numerations
+
+2001-08-09  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* component.xsl, titlepage.templates.xml, titlepage.xsl: 
+	Support colophon
+
+	* graphics.xsl: Forgot curly braces in AVT for height/width
+
+	* inline.xsl: Remark|comment must be formatted as a block in case it appears at the paragraph-level in a component
+
+2001-08-05  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* callout.xsl, param.xsl: Removed the FormatDingbatCallout classes, they were the same as the FormatUnicodeCallout classes but with a font wrapper. Added a callout.unicode.font parameter to wrap Unicode callouts
+
+2001-08-02  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* xref.xsl: Changed <xref> with endterm to process the children nodes
+	and not just the text by calling a new mode="endterm" template.
+	
+	Also changed <link> to process its endterm if the element content
+	is empty.
+	
+	Also changed the first use of name() to local-name() to
+	match the others in the file and in html/xref.xsl.
+
+2001-08-01  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* graphics.xsl: Use mediaobject.filename to calculate graphic reference
+
+	* inline.xsl: Changed vertical-align to baseline-shift; vertical-align is a shortcut
+
+	* sections.xsl: Added templates to suppress titleabbrev
+
+	* table.xsl: Support table widths
+
+	* titlepage.templates.xml, titlepage.xsl: Present othercredit on titlepages
+
+2001-07-31  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* fop.xsl, xep.xsl: Fixes for PDF bookmarks by Pavel Zampach
+
+2001-07-21  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* block.xsl, param.xsl: Fix title-end punctuation problems on formalparas
+
+2001-07-16  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* table.xsl: Add template for tfoot
+
+	* table.xsl: Process thead/tbody/tfoot in the right order (thead/tfoot/tbody)
+
+2001-07-15  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* graphics.xsl: Fixed graphic height/width calculations
+
+	* table.xsl: Output column number when namest is used
+
+	* titlepage.xsl: Fix duplicate template bug
+
+2001-07-08  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* qandaset.xsl: Improve QandA formatting; make question bold if defaultlabel=none (FR #419315)
+
+	* sections.xsl, xref.xsl: Support xref to bridgehead
+
+2001-07-05  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* lists.xsl, param.xsl: Added format.variablelist.as.list parameter
+
+2001-07-04  <uid48421 at users.sourceforge.net>
+
+	* biblio.xsl, param.xsl, xref.xsl: Support an external bibliography collection
+
+	* docbook.xsl: Turn of indentation
+
+	* fo.xsl, param.xsl: Added dingbat.font.family
+
+	* qandaset.xsl: Bug #426166, fix duplicate id on qandaentry formatting
+
+	* qandaset.xsl, xref.xsl: Bug #429011, fix xref to qandset elements
+
+	* sections.xsl: Removed debugging messages; added prio for section title template
+
+	* titlepage.templates.xml, titlepage.xsl: Remove internal references to *.titlepage.recto.mode and *.titlepage.verso.mode
+
+2001-06-22  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* docbook.xsl, ebnf.xsl: Support EBNF
+
+	* docbook.xsl, xep.xsl: Fix XEP support for pdf bookmarks
+
+	* inline.xsl: Support linkend to glossentry on glossterm
+
+	* param.xsl, xep.xsl: Initial cut at bookmark and info support for RenderX's XEP--doesn't work yet
+
+	* synop.xsl: Support SBR
+
+	* xref.xsl: Support anchor
+
+2001-06-21  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* lists.xsl, param.xsl, xref.xsl: Use common code to calculate step numbers; support xref to procedures and steps; added formal.procedures parameter
+
+2001-06-20  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* refentry.xsl: Bug 434102: fix refentry inside of chapter and fix refsynopsisdiv formatting in both FO and HTML
+
+	* titlepage.xsl, xref.xsl: Use person.name.list to generate author lists; put IDs on authors and author groups if appropriate; support xref to authorgroup
+
+2001-06-19  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* formal.xsl, param.xsl: Fix formatting of formal object titles.
+
+2001-06-15  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* graphics.xsl: Remove file:; why was I doing this?
+
+2001-06-14  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* sections.xsl: Bug fix: section autolabelling wasn't working in division bodies
+
+	* titlepage.templates.xml: Changed text-alignment on centered titles to be 'center' rather than 'justify'
+
+	* xref.xsl: Added anchor template
+
+2001-06-13  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* graphics.xsl, param.xsl: Support Arbortext extensions--at the moment, just to turn off the url() stuff in external graphic references
+
+	* titlepage.xsl: Bug fix: make a single author in an authorgroup work correctly
+
+2001-06-08  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* callout.xsl, inline.xsl, synop.xsl: Fixed some unparameterized references to specific font families
+
+2001-06-04  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* block.xsl: Made blockquote indent more reasonable
+
+	* graphics.xsl: Omit the url() wrapper around external-graphic srcs for FOP and PT
+
+2001-05-23  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* graphics.xsl: Fix dup. template bug with is.graphic.*
+
+	* titlepage.xsl: Add template for publisher
+
+2001-05-21  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* callout.xsl, verbatim.xsl: Move calculation of linenumber.* parameters into the number.rtf.lines template
+
+	* titlepage.templates.xml: Reworked titlepage template processing to support use of more interesting
+	predicates.
+	
+	Note: in previous versions, at most one title, subtitle, or titleabbrev
+	element would be processed for each title page. In the new design, if you
+	have multiple title, subtitle, or titleabbrev elements inside an info
+	wrapper (you shouldn't!), they will all be processed.
+
+2001-05-18  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* sections.xsl: Fix subtitle bug
+
+2001-05-12  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* sections.xsl: Calculate the heading level for bridgeheads
+
+2001-05-04  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* docbook.xsl: Replace hardcoded values on fo:root with parameters
+
+2001-05-03  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* biblio.xsl: Render author names correctly in bibliomixed mode
+
+	* graphics.xsl: Tweak available graphics formats
+
+2001-05-03  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* inline.xsl: Added support for class="xmlpi" and "emptytag".
+	Rendering of attributes is in sync with HTML stylesheet (monospace instead of normal).
+
+2001-05-03  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* param.xsl, verbatim.xsl: Created verbatim and monospace.verbatim property sets
+
+	* table.xsl: Process head/body/foot in the right order
+
+2001-04-26  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* lists.xsl: Improve procedure step/substep enumeration
+
+2001-04-21  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* qandaset.xsl: My first crude attempts at support for qandaset
+
+2001-04-20  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* autoidx.xsl: Remove variable references from key functions; use entities instead.
+
+2001-04-19  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* inline.xsl: Add template for constant
+
+2001-04-17  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* component.xsl, division.xsl: Add templates for partinfo, chapterinfo, and appendixinfo
+
+	* component.xsl, pagesetup.xsl: Use the new gentext scheme for component titles and running headers
+
+	* docbook.xsl: Print warning message when an unhandled tag is encountered
+
+	* docbook.xsl, param.xsl: Move label.from.part parameter into param.xsl; default it to 0 so that chapters and appendixes are numbered monotonically throughout a book by default. Moved param.xsl up in the include list, just for good measure
+
+2001-04-16  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* glossary.xsl: Improve formatting of glossseealso
+
+	* table.xsl: Fix typo: used xsl:param where xsl:variable was required
+
+2001-04-15  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* division.xsl: Use new toc/lot parameters
+
+	* docbook.xsl: Removed unused variable declaration
+
+	* formal.xsl: Fixed typo
+
+	* param.xsl: Added some new parameters
+
+	* toc.xsl: Support DocBook toc markup
+
+2001-04-03  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* callout.xsl: Fix bug 412487, make XSL-generated callout marks honor callout mark parameters
+
+	* param.xsl: Documentation fixes
+
+2001-04-02  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* .cvsignore, Makefile, admon.xsl, autoidx.xsl, autotoc.xsl, biblio.xsl, block.xsl, callout.xsl, component.xsl, division.xsl, docbook.xsl, fo.xsl, footnote.xsl, fop.xsl, formal.xsl, glossary.xsl, graphics.xsl, index.xsl, info.xsl, inline.xsl, keywords.xsl, lists.xsl, math.xsl, pagesetup.xsl, param.xsl, pi.xsl, qandaset.xsl, refentry.xsl, sections.xsl, synop.xsl, table.xsl, titlepage.templates.xml, titlepage.xsl, toc.xsl, verbatim.xsl, xref.xsl: 
+	New file.
+
+	* Makefile: Use the cvstools version of saxon
+

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/admon.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/admon.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/admon.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,130 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: admon.xsl,v 1.1.1.1 2004/10/19 21:21:42 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<xsl:template match="note|important|warning|caution|tip">
+  <xsl:choose>
+    <xsl:when test="$admon.graphics != 0">
+      <xsl:call-template name="graphical.admonition"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:call-template name="nongraphical.admonition"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="admon.graphic.width">
+  <xsl:param name="node" select="."/>
+  <xsl:text>36pt</xsl:text>
+</xsl:template>
+
+<xsl:template name="admon.graphic">
+  <xsl:param name="node" select="."/>
+
+  <xsl:variable name="filename">
+    <xsl:value-of select="$admon.graphics.path"/>
+    <xsl:choose>
+      <xsl:when test="name($node)='note'">note</xsl:when>
+      <xsl:when test="name($node)='warning'">warning</xsl:when>
+      <xsl:when test="name($node)='caution'">caution</xsl:when>
+      <xsl:when test="name($node)='tip'">tip</xsl:when>
+      <xsl:when test="name($node)='important'">important</xsl:when>
+      <xsl:otherwise>note</xsl:otherwise>
+    </xsl:choose>
+    <xsl:value-of select="$admon.graphics.extension"/>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="$passivetex.extensions != 0
+                    or $fop.extensions != 0
+                    or $arbortext.extensions != 0">
+      <xsl:value-of select="$filename"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:text>url(</xsl:text>
+      <xsl:value-of select="$filename"/>
+      <xsl:text>)</xsl:text>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="graphical.admonition">
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+  <xsl:variable name="graphic.width">
+     <xsl:call-template name="admon.graphic.width"/>
+  </xsl:variable>
+
+  <fo:block id="{$id}">
+    <fo:list-block provisional-distance-between-starts="{$graphic.width} + 18pt"
+    		provisional-label-separation="18pt"
+		xsl:use-attribute-sets="list.block.spacing">
+      <fo:list-item>
+          <fo:list-item-label end-indent="label-end()">
+            <fo:block>
+              <fo:external-graphic width="auto" height="auto"
+	      		           content-width="{$graphic.width}" >
+                <xsl:attribute name="src">
+                  <xsl:call-template name="admon.graphic"/>
+                </xsl:attribute>
+              </fo:external-graphic>
+            </fo:block>
+          </fo:list-item-label>
+          <fo:list-item-body start-indent="body-start()">
+            <xsl:if test="$admon.textlabel != 0 or title">
+              <fo:block xsl:use-attribute-sets="admonition.title.properties">
+                <xsl:apply-templates select="." mode="object.title.markup"/>
+              </fo:block>
+            </xsl:if>
+            <fo:block xsl:use-attribute-sets="admonition.properties">
+              <xsl:apply-templates/>
+            </fo:block>
+          </fo:list-item-body>
+      </fo:list-item>
+    </fo:list-block>
+  </fo:block>
+</xsl:template>
+
+<xsl:template name="nongraphical.admonition">
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <fo:block space-before.minimum="0.8em"
+            space-before.optimum="1em"
+            space-before.maximum="1.2em"
+            start-indent="0.25in"
+            end-indent="0.25in"
+            id="{$id}">
+    <xsl:if test="$admon.textlabel != 0 or title">
+      <fo:block keep-with-next='always'
+                xsl:use-attribute-sets="admonition.title.properties">
+         <xsl:apply-templates select="." mode="object.title.markup"/>
+      </fo:block>
+    </xsl:if>
+
+    <fo:block xsl:use-attribute-sets="admonition.properties">
+      <xsl:apply-templates/>
+    </fo:block>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="note/title"></xsl:template>
+<xsl:template match="important/title"></xsl:template>
+<xsl:template match="warning/title"></xsl:template>
+<xsl:template match="caution/title"></xsl:template>
+<xsl:template match="tip/title"></xsl:template>
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/autoidx-ng.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/autoidx-ng.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/autoidx-ng.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,75 @@
+<?xml version="1.0"?>
+<!DOCTYPE xsl:stylesheet [
+
+<!ENTITY lowercase "'abcdefghijklmnopqrstuvwxyz'">
+<!ENTITY uppercase "'ABCDEFGHIJKLMNOPQRSTUVWXYZ'">
+
+<!ENTITY primary   'normalize-space(concat(primary/@sortas, primary[not(@sortas)]))'>
+<!ENTITY secondary 'normalize-space(concat(secondary/@sortas, secondary[not(@sortas)]))'>
+<!ENTITY tertiary  'normalize-space(concat(tertiary/@sortas, tertiary[not(@sortas)]))'>
+
+<!ENTITY sep '" "'>
+<!ENTITY scope 'count(ancestor::node()|$scope) = count(ancestor::node())'>
+]>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                version="1.0"
+                xmlns:func="http://exslt.org/functions"
+                exclude-result-prefixes="i"
+                xmlns:i="urn:cz-kosek:functions:index">
+
+<!-- ********************************************************************
+     $Id: autoidx-ng.xsl,v 1.1.1.1 2004/10/19 21:21:42 juntao Exp $
+     ********************************************************************
+
+     This file is part of the DocBook XSL Stylesheet distribution.
+     See ../README or http://docbook.sf.net/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<xsl:include href="../common/autoidx-ng.xsl"/>
+
+<!-- Modified original code is using index group codes instead of just first letter 
+     to gain better grouping -->
+<xsl:template name="generate-index">
+  <xsl:param name="scope" select="(ancestor::book|/)[last()]"/>
+
+  <xsl:variable name="terms"
+                select="//indexterm[count(.|key('group-code',
+                                                i:group-index(&primary;))[&scope;][1]) = 1
+                                    and not(@class = 'endofrange')]"/>
+
+  <xsl:apply-templates select="$terms" mode="index-div">
+    <xsl:with-param name="scope" select="$scope"/>
+    <xsl:sort select="i:group-index(&primary;)" data-type="number"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="indexterm" mode="index-div">
+  <xsl:param name="scope" select="."/>
+
+  <xsl:variable name="key"
+                select="i:group-index(&primary;)"/>
+
+  <xsl:if test="key('group-code', $key)[&scope;]
+                [count(.|key('primary', &primary;)[&scope;][1]) = 1]">
+    <fo:block>
+      <xsl:call-template name="indexdiv.title">
+        <xsl:with-param name="titlecontent">
+          <xsl:value-of select="i:group-letter($key)"/>
+        </xsl:with-param>
+      </xsl:call-template>
+      <fo:block>
+        <xsl:apply-templates select="key('group-code', $key)[&scope;]
+                                     [count(.|key('primary', &primary;)[&scope;][1])=1]"
+                             mode="index-primary">
+          <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/>
+          <xsl:with-param name="scope" select="$scope"/>
+        </xsl:apply-templates>
+      </fo:block>
+    </fo:block>
+  </xsl:if>
+</xsl:template>
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/autoidx.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/autoidx.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/autoidx.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,898 @@
+<?xml version="1.0"?>
+<!DOCTYPE xsl:stylesheet [
+
+<!ENTITY lowercase "'abcdefghijklmnopqrstuvwxyz'">
+<!ENTITY uppercase "'ABCDEFGHIJKLMNOPQRSTUVWXYZ'">
+
+<!ENTITY primary   'normalize-space(concat(primary/@sortas, primary[not(@sortas)]))'>
+<!ENTITY secondary 'normalize-space(concat(secondary/@sortas, secondary[not(@sortas)]))'>
+<!ENTITY tertiary  'normalize-space(concat(tertiary/@sortas, tertiary[not(@sortas)]))'>
+
+<!ENTITY sep '" "'>
+<!ENTITY scope 'count(ancestor::node()|$scope) = count(ancestor::node())'>
+]>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                xmlns:rx="http://www.renderx.com/XSL/Extensions"
+                xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions"
+                version="1.0">
+
+<!-- ********************************************************************
+     $Id: autoidx.xsl,v 1.1.1.1 2004/10/19 21:21:42 juntao Exp $
+     ********************************************************************
+
+     This file is part of the DocBook XSL Stylesheet distribution.
+     See ../README or http://docbook.sf.net/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- ==================================================================== -->
+<!-- Derived from Jeni Tennison's work in the HTML case -->
+
+<xsl:key name="letter"
+         match="indexterm"
+         use="translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;)"/>
+
+<xsl:key name="primary"
+         match="indexterm"
+         use="&primary;"/>
+
+<xsl:key name="secondary"
+         match="indexterm"
+         use="concat(&primary;, &sep;, &secondary;)"/>
+
+<xsl:key name="tertiary"
+         match="indexterm"
+         use="concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;)"/>
+
+<xsl:key name="endofrange"
+         match="indexterm[@class='endofrange']"
+         use="@startref"/>
+
+<xsl:key name="see-also"
+         match="indexterm[seealso]"
+         use="concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, seealso)"/>
+
+<xsl:key name="see"
+         match="indexterm[see]"
+         use="concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, see)"/>
+
+<xsl:template name="generate-index">
+  <xsl:param name="scope" select="(ancestor::book|/)[last()]"/>
+
+  <xsl:variable name="terms"
+                select="//indexterm[count(.|key('letter',
+                                                translate(substring(&primary;, 1, 1),
+                                                          &lowercase;,
+                                                          &uppercase;))[&scope;][1]) = 1
+                                    and not(@class = 'endofrange')]"/>
+
+  <xsl:variable name="alphabetical"
+                select="$terms[contains(concat(&lowercase;, &uppercase;),
+                                        substring(&primary;, 1, 1))]"/>
+
+  <xsl:variable name="others" select="$terms[not(contains(concat(&lowercase;,
+                                                 &uppercase;),
+                                             substring(&primary;, 1, 1)))]"/>
+  <fo:block>
+    <xsl:if test="$others">
+      <xsl:call-template name="indexdiv.title">
+        <xsl:with-param name="titlecontent">
+          <xsl:call-template name="gentext">
+            <xsl:with-param name="key" select="'index symbols'"/>
+          </xsl:call-template>
+        </xsl:with-param>
+      </xsl:call-template>
+
+      <fo:block>
+        <xsl:apply-templates select="$others[count(.|key('primary',
+                                     &primary;)[&scope;][1]) = 1]"
+                             mode="index-symbol-div">
+          <xsl:with-param name="scope" select="$scope"/>
+          <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/>
+        </xsl:apply-templates>
+      </fo:block>
+    </xsl:if>
+
+    <xsl:apply-templates select="$alphabetical[count(.|key('letter',
+                                 translate(substring(&primary;, 1, 1),
+                                           &lowercase;,&uppercase;))[&scope;][1]) = 1]"
+                         mode="index-div">
+      <xsl:with-param name="scope" select="$scope"/>
+      <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/>
+    </xsl:apply-templates>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="indexterm" mode="index-div">
+  <xsl:param name="scope" select="."/>
+
+  <xsl:variable name="key"
+                select="translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;)"/>
+
+  <xsl:if test="key('letter', $key)[&scope;]
+                [count(.|key('primary', &primary;)[&scope;][1]) = 1]">
+    <fo:block>
+      <xsl:if test="contains(concat(&lowercase;, &uppercase;), $key)">
+        <xsl:call-template name="indexdiv.title">
+          <xsl:with-param name="titlecontent">
+            <xsl:value-of select="translate($key, &lowercase;, &uppercase;)"/>
+          </xsl:with-param>
+        </xsl:call-template>
+      </xsl:if>
+      <fo:block>
+        <xsl:apply-templates select="key('letter', $key)[&scope;]
+                                     [count(.|key('primary', &primary;)[&scope;][1])=1]"
+                             mode="index-primary">
+          <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/>
+          <xsl:with-param name="scope" select="$scope"/>
+        </xsl:apply-templates>
+      </fo:block>
+    </fo:block>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="indexterm" mode="index-symbol-div">
+  <xsl:param name="scope" select="."/>
+
+  <xsl:variable name="key"
+                select="translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;)"/>
+
+  <fo:block>
+    <xsl:apply-templates select="key('letter', $key)[&scope;][count(.|key('primary', &primary;)[&scope;][1]) = 1]"
+                         mode="index-primary">
+      <xsl:with-param name="scope" select="$scope"/>
+      <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/>
+    </xsl:apply-templates>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="indexterm" mode="index-primary">
+  <xsl:param name="scope" select="."/>
+
+  <xsl:variable name="key" select="&primary;"/>
+  <xsl:variable name="refs" select="key('primary', $key)[&scope;]"/>
+  <fo:block>
+    <xsl:if test="$axf.extensions != 0">
+      <xsl:attribute name="axf:suppress-duplicate-page-number">true</xsl:attribute>
+    </xsl:if>
+    <xsl:value-of select="primary"/>
+
+    <xsl:choose>
+      <xsl:when test="$xep.extensions != 0">
+        <xsl:if test="$refs[not(see) and not(seealso) and not(secondary)]">
+          <xsl:text>, </xsl:text>
+          <xsl:variable name="primary" select="primary"/>
+          <xsl:variable name="primary.significant" select="concat(primary, $significant.flag)"/>
+          <rx:page-index>
+            <xsl:if test="$refs[@significance='preferred'][not(see) and not(seealso) and not(secondary)]">
+              <rx:index-item xsl:use-attribute-sets="index.preferred.page.properties xep.index.item.properties"
+                ref-key="{$primary.significant}"/>
+            </xsl:if>
+            <xsl:if test="$refs[not(@significance) or @significance!='preferred'][not(see) and not(seealso) and not(secondary)]">
+              <rx:index-item xsl:use-attribute-sets="xep.index.item.properties"
+                ref-key="{$primary}"/>
+            </xsl:if>
+          </rx:page-index>        
+        </xsl:if>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:variable name="page-number-citations">
+          <xsl:for-each select="$refs[not(see) and not(seealso)
+                                and not(secondary)]">
+            <xsl:apply-templates select="." mode="reference">
+              <xsl:with-param name="scope" select="$scope"/>
+            </xsl:apply-templates>
+          </xsl:for-each>
+        </xsl:variable>
+
+        <xsl:choose>
+          <xsl:when test="$passivetex.extensions != '0'">
+            <fotex:sort xmlns:fotex="http://www.tug.org/fotex">
+              <xsl:copy-of select="$page-number-citations"/>
+            </fotex:sort>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:copy-of select="$page-number-citations"/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:otherwise>
+    </xsl:choose>
+
+    <xsl:if test="$refs[not(secondary)]/*[self::see]">
+      <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &sep;, &sep;, see))[&scope;][1])]"
+                           mode="index-see">
+         <xsl:with-param name="scope" select="$scope"/>
+         <xsl:sort select="translate(see, &lowercase;, &uppercase;)"/>
+      </xsl:apply-templates>
+    </xsl:if>
+
+  </fo:block>
+
+  <xsl:if test="$refs/secondary or $refs[not(secondary)]/*[self::seealso]">
+    <fo:block start-indent="1pc">
+      <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &sep;, &sep;, seealso))[&scope;][1])]"
+                           mode="index-seealso">
+         <xsl:with-param name="scope" select="$scope"/>
+         <xsl:sort select="translate(seealso, &lowercase;, &uppercase;)"/>
+      </xsl:apply-templates>
+      <xsl:apply-templates select="$refs[secondary and count(.|key('secondary', concat($key, &sep;, &secondary;))[&scope;][1]) = 1]"
+                           mode="index-secondary">
+       <xsl:with-param name="scope" select="$scope"/>
+       <xsl:sort select="translate(&secondary;, &lowercase;, &uppercase;)"/>
+      </xsl:apply-templates>
+    </fo:block>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="indexterm" mode="index-secondary">
+  <xsl:param name="scope" select="."/>
+
+  <xsl:variable name="key" select="concat(&primary;, &sep;, &secondary;)"/>
+  <xsl:variable name="refs" select="key('secondary', $key)[&scope;]"/>
+  <fo:block>
+    <xsl:if test="$axf.extensions != 0">
+      <xsl:attribute name="axf:suppress-duplicate-page-number">true</xsl:attribute>
+    </xsl:if>
+    <xsl:value-of select="secondary"/>
+
+    <xsl:choose>
+      <xsl:when test="$xep.extensions != 0">
+        <xsl:if test="$refs[not(see) and not(seealso) and not(tertiary)]">
+          <xsl:text>, </xsl:text>
+          <xsl:variable name="primary" select="primary"/>
+          <xsl:variable name="secondary" select="secondary"/>
+          <xsl:variable name="primary.significant" select="concat(primary, $significant.flag)"/>
+          <rx:page-index>
+            <xsl:if test="$refs[@significance='preferred'][not(see) and not(seealso) and not(tertiary)]">
+              <rx:index-item xsl:use-attribute-sets="index.preferred.page.properties xep.index.item.properties">
+                <xsl:attribute name="ref-key">
+                  <xsl:value-of select="$primary.significant"/>
+                  <xsl:text>, </xsl:text>
+                  <xsl:value-of select="$secondary"/>
+                </xsl:attribute>
+              </rx:index-item>
+            </xsl:if>
+            <xsl:if test="$refs[not(@significance) or @significance!='preferred'][not(see) and not(seealso) and not(tertiary)]">
+              <rx:index-item xsl:use-attribute-sets="xep.index.item.properties">
+                <xsl:attribute name="ref-key">
+                  <xsl:value-of select="$primary"/>
+                  <xsl:text>, </xsl:text>
+                  <xsl:value-of select="$secondary"/>
+                </xsl:attribute>
+              </rx:index-item>
+            </xsl:if>
+          </rx:page-index>
+        </xsl:if>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:variable name="page-number-citations">
+          <xsl:for-each select="$refs[not(see) and not(seealso)
+                                and not(tertiary)]">
+            <xsl:apply-templates select="." mode="reference">
+              <xsl:with-param name="scope" select="$scope"/>
+            </xsl:apply-templates>
+          </xsl:for-each>
+        </xsl:variable>
+
+        <xsl:choose>
+          <xsl:when test="$passivetex.extensions != '0'">
+            <fotex:sort xmlns:fotex="http://www.tug.org/fotex">
+              <xsl:copy-of select="$page-number-citations"/>
+            </fotex:sort>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:copy-of select="$page-number-citations"/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:otherwise>
+    </xsl:choose>
+
+    <xsl:if test="$refs[not(tertiary)]/*[self::see]">
+      <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &secondary;, &sep;, &sep;, see))[&scope;][1])]"
+                           mode="index-see">
+        <xsl:with-param name="scope" select="$scope"/>
+        <xsl:sort select="translate(see, &lowercase;, &uppercase;)"/>
+      </xsl:apply-templates>
+    </xsl:if>
+
+  </fo:block>
+
+  <xsl:if test="$refs/tertiary or $refs[not(tertiary)]/*[self::seealso]">
+    <fo:block start-indent="2pc">
+      <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &secondary;, &sep;, &sep;, seealso))[&scope;][1])]"
+                           mode="index-seealso">
+          <xsl:with-param name="scope" select="$scope"/>
+          <xsl:sort select="translate(seealso, &lowercase;, &uppercase;)"/>
+      </xsl:apply-templates>
+      <xsl:apply-templates select="$refs[tertiary and count(.|key('tertiary', concat($key, &sep;, &tertiary;))[&scope;][1]) = 1]" 
+                           mode="index-tertiary">
+          <xsl:with-param name="scope" select="$scope"/>
+          <xsl:sort select="translate(&tertiary;, &lowercase;, &uppercase;)"/>
+      </xsl:apply-templates>
+    </fo:block>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="indexterm" mode="index-tertiary">
+  <xsl:param name="scope" select="."/>
+  <xsl:variable name="key" select="concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;)"/>
+  <xsl:variable name="refs" select="key('tertiary', $key)[&scope;]"/>
+  <fo:block>
+    <xsl:if test="$axf.extensions != 0">
+      <xsl:attribute name="axf:suppress-duplicate-page-number">true</xsl:attribute>
+    </xsl:if>
+    <xsl:value-of select="tertiary"/>
+
+    <xsl:choose>
+      <xsl:when test="$xep.extensions != 0">
+        <xsl:if test="$refs[not(see) and not(seealso)]">
+          <xsl:text>, </xsl:text>
+          <xsl:variable name="primary" select="primary"/>
+          <xsl:variable name="secondary" select="secondary"/>
+          <xsl:variable name="tertiary" select="tertiary"/>
+          <xsl:variable name="primary.significant" select="concat(primary, $significant.flag)"/>
+          <rx:page-index>
+            <xsl:if test="$refs[@significance='preferred'][not(see) and not(seealso)]">
+              <rx:index-item xsl:use-attribute-sets="index.preferred.page.properties xep.index.item.properties">
+                <xsl:attribute name="ref-key">
+                  <xsl:value-of select="$primary.significant"/>
+                  <xsl:text>, </xsl:text>
+                  <xsl:value-of select="$secondary"/>
+                  <xsl:text>, </xsl:text>
+                  <xsl:value-of select="$tertiary"/>
+                </xsl:attribute>
+              </rx:index-item>
+            </xsl:if>
+            <xsl:if test="$refs[not(@significance) or @significance!='preferred'][not(see) and not(seealso)]">
+              <rx:index-item xsl:use-attribute-sets="xep.index.item.properties">
+                <xsl:attribute name="ref-key">
+                  <xsl:value-of select="$primary"/>
+                  <xsl:text>, </xsl:text>
+                  <xsl:value-of select="$secondary"/>
+                  <xsl:text>, </xsl:text>
+                  <xsl:value-of select="$tertiary"/>
+                </xsl:attribute>
+              </rx:index-item>
+            </xsl:if>
+          </rx:page-index>
+        </xsl:if>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:variable name="page-number-citations">
+          <xsl:for-each select="$refs[not(see) and not(seealso)]">
+            <xsl:apply-templates select="." mode="reference">
+              <xsl:with-param name="scope" select="$scope"/>
+            </xsl:apply-templates>
+          </xsl:for-each>
+        </xsl:variable>
+
+        <xsl:choose>
+          <xsl:when test="$passivetex.extensions != '0'">
+            <fotex:sort xmlns:fotex="http://www.tug.org/fotex">
+              <xsl:copy-of select="$page-number-citations"/>
+            </fotex:sort>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:copy-of select="$page-number-citations"/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:otherwise>
+    </xsl:choose>
+
+    <xsl:if test="$refs/see">
+      <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, see))[&scope;][1])]"
+                           mode="index-see">
+        <xsl:with-param name="scope" select="$scope"/>
+        <xsl:sort select="translate(see, &lowercase;, &uppercase;)"/>
+      </xsl:apply-templates>
+    </xsl:if>
+
+  </fo:block>
+
+  <xsl:if test="$refs/seealso">
+    <fo:block>
+      <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, seealso))[&scope;][1])]"
+                           mode="index-seealso">
+        <xsl:with-param name="scope" select="$scope"/>
+        <xsl:sort select="translate(seealso, &lowercase;, &uppercase;)"/>
+      </xsl:apply-templates>
+    </fo:block>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="indexterm" mode="reference">
+  <xsl:param name="scope" select="."/>
+  <xsl:param name="separator" select="', '"/>
+
+  <xsl:if test="$passivetex.extensions = '0'">
+    <xsl:value-of select="$separator"/>
+  </xsl:if>
+
+  <xsl:choose>
+    <xsl:when test="@zone and string(@zone)">
+      <xsl:call-template name="reference">
+        <xsl:with-param name="zones" select="normalize-space(@zone)"/>
+        <xsl:with-param name="scope" select="$scope"/>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:variable name="id">
+        <xsl:call-template name="object.id"/>
+      </xsl:variable>
+
+      <fo:basic-link internal-destination="{$id}">
+        <fo:page-number-citation ref-id="{$id}"/>
+      </fo:basic-link>
+
+      <xsl:if test="key('endofrange', @id)[&scope;]">
+        <xsl:apply-templates select="key('endofrange', @id)[&scope;][last()]"
+                             mode="reference">
+          <xsl:with-param name="scope" select="$scope"/>
+          <xsl:with-param name="separator" select="'-'"/>
+        </xsl:apply-templates>
+      </xsl:if>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="reference">
+  <xsl:param name="scope" select="."/>
+  <xsl:param name="zones"/>
+
+  <xsl:choose>
+    <xsl:when test="contains($zones, ' ')">
+      <xsl:variable name="zone" select="substring-before($zones, ' ')"/>
+      <xsl:variable name="target" select="key('id', $zone)[&scope;]"/>
+
+      <xsl:variable name="id">
+        <xsl:call-template name="object.id">
+           <xsl:with-param name="object" select="$target[1]"/>
+        </xsl:call-template>
+      </xsl:variable>
+
+      <fo:basic-link internal-destination="{$id}">
+        <fo:page-number-citation ref-id="{$id}"/>
+      </fo:basic-link>
+
+      <xsl:if test="$passivetex.extensions = '0'">
+        <xsl:text>, </xsl:text>
+      </xsl:if>
+      <xsl:call-template name="reference">
+        <xsl:with-param name="zones" select="substring-after($zones, ' ')"/>
+        <xsl:with-param name="scope" select="$scope"/>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:variable name="zone" select="$zones"/>
+      <xsl:variable name="target" select="key('id', $zone)[&scope;]"/>
+
+      <xsl:variable name="id">
+        <xsl:call-template name="object.id">
+          <xsl:with-param name="object" select="$target[1]"/>
+        </xsl:call-template>
+      </xsl:variable>
+
+      <fo:basic-link internal-destination="{$id}">
+        <fo:page-number-citation ref-id="{$id}"/>
+      </fo:basic-link>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="indexterm" mode="index-see">
+   <xsl:param name="scope" select="."/>
+
+   <fo:inline>
+     <xsl:text> (</xsl:text>
+     <xsl:call-template name="gentext">
+       <xsl:with-param name="key" select="'see'"/>
+     </xsl:call-template>
+     <xsl:text> </xsl:text>
+     <xsl:value-of select="see"/>
+     <xsl:text>)</xsl:text>
+   </fo:inline>
+</xsl:template>
+
+<xsl:template match="indexterm" mode="index-seealso">
+   <xsl:param name="scope" select="."/>
+
+   <fo:block>
+     <xsl:text>(</xsl:text>
+     <xsl:call-template name="gentext">
+       <xsl:with-param name="key" select="'seealso'"/>
+     </xsl:call-template>
+     <xsl:text> </xsl:text>
+     <xsl:value-of select="seealso"/>
+     <xsl:text>)</xsl:text>
+   </fo:block>
+</xsl:template>
+
+<!-- ====================================================================== -->
+
+<xsl:template name="generate-index-markup">
+  <xsl:param name="scope" select="(ancestor::book|/)[last()]"/>
+
+  <xsl:variable name="terms" select="$scope//indexterm[count(.|key('letter',
+                                     translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;))[&scope;][1]) = 1]"/>
+  <xsl:variable name="alphabetical"
+                select="$terms[contains(concat(&lowercase;, &uppercase;),
+                                        substring(&primary;, 1, 1))]"/>
+  <xsl:variable name="others" select="$terms[not(contains(concat(&lowercase;,
+                                                 &uppercase;),
+                                             substring(&primary;, 1, 1)))]"/>
+
+  <xsl:text>&lt;index&gt;&#10;</xsl:text>
+  <xsl:if test="$others">
+    <xsl:text>&#10;&lt;indexdiv&gt;&#10;</xsl:text>
+    <xsl:text>&lt;title&gt;</xsl:text>
+    <xsl:call-template name="gentext">
+      <xsl:with-param name="key" select="'index symbols'"/>
+    </xsl:call-template>
+    <xsl:text>&lt;/title&gt;&#10;</xsl:text>
+    <xsl:apply-templates select="$others[count(.|key('primary',
+                                 &primary;)[&scope;][1]) = 1]"
+                         mode="index-symbol-div-markup">
+      <xsl:with-param name="scope" select="$scope"/>
+      <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/>
+    </xsl:apply-templates>
+    <xsl:text>&lt;/indexdiv&gt;&#10;</xsl:text>
+  </xsl:if>
+
+  <xsl:apply-templates select="$alphabetical[count(.|key('letter',
+                               translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;))[&scope;][1]) = 1]"
+                       mode="index-div-markup">
+      <xsl:with-param name="scope" select="$scope"/>
+      <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/>
+  </xsl:apply-templates>
+  <xsl:text>&lt;/index&gt;&#10;</xsl:text>
+</xsl:template>
+
+<xsl:template match="*" mode="index-markup">
+  <xsl:param name="scope" select="."/>
+
+  <xsl:text>&lt;</xsl:text>
+  <xsl:value-of select="name(.)"/>
+  <xsl:text>&gt;&#10;</xsl:text>
+  <xsl:apply-templates mode="index-markup">
+    <xsl:with-param name="scope" select="$scope"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="indexterm" mode="index-div-markup">
+  <xsl:param name="scope" select="."/>
+  <xsl:variable name="key" select="translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;)"/>
+  <xsl:text>&#10;&lt;indexdiv&gt;&#10;</xsl:text>
+  <xsl:text>&lt;title&gt;</xsl:text>
+  <xsl:value-of select="translate($key, &lowercase;, &uppercase;)"/>
+  <xsl:text>&lt;/title&gt;&#10;</xsl:text>
+
+  <xsl:apply-templates select="key('letter', $key)[&scope;][count(.|key('primary', &primary;)[&scope;][1]) = 1]"
+                       mode="index-primary-markup">
+    <xsl:with-param name="scope" select="$scope"/>
+    <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/>
+  </xsl:apply-templates>
+  <xsl:text>&lt;/indexdiv&gt;&#10;</xsl:text>
+</xsl:template>
+
+<xsl:template match="indexterm" mode="index-symbol-div-markup">
+  <xsl:param name="scope" select="."/>
+  <xsl:variable name="key" select="translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;)"/>
+
+  <xsl:apply-templates select="key('letter', $key)[&scope;][count(.|key('primary', &primary;)[&scope;][1]) = 1]"
+                       mode="index-primary-markup">
+    <xsl:with-param name="scope" select="$scope"/>
+    <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="indexterm" mode="index-primary-markup">
+  <xsl:param name="scope" select="."/>
+  <xsl:variable name="key" select="&primary;"/>
+  <xsl:variable name="refs" select="key('primary', $key)[&scope;]"/>
+  <xsl:variable name="pages" select="$refs[not(see) and not(seealso)]"/>
+
+  <xsl:text>&#10;&lt;indexentry&gt;&#10;</xsl:text>
+  <xsl:text>&lt;primaryie&gt;</xsl:text>
+  <xsl:text>&lt;phrase&gt;</xsl:text>
+  <xsl:call-template name="escape-text">
+    <xsl:with-param name="text" select="string(primary)"/>
+  </xsl:call-template>
+  <xsl:text>&lt;/phrase&gt;</xsl:text>
+  <xsl:if test="$pages">,</xsl:if>
+  <xsl:text>&#10;</xsl:text>
+
+  <xsl:for-each select="$pages">
+    <xsl:apply-templates select="." mode="reference-markup">
+      <xsl:with-param name="scope" select="$scope"/>
+    </xsl:apply-templates>
+  </xsl:for-each>
+
+  <xsl:text>&lt;/primaryie&gt;&#10;</xsl:text>
+
+  <xsl:if test="$refs/secondary or $refs[not(secondary)]/*[self::see or self::seealso]">
+    <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &sep;, &sep;, see))[&scope;][1])]"
+                         mode="index-see-markup">
+      <xsl:with-param name="scope" select="$scope"/>
+      <xsl:sort select="translate(see, &lowercase;, &uppercase;)"/>
+    </xsl:apply-templates>
+
+    <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &sep;, &sep;, seealso))[&scope;][1])]"
+                         mode="index-seealso-markup">
+      <xsl:with-param name="scope" select="$scope"/>
+      <xsl:sort select="translate(seealso, &lowercase;, &uppercase;)"/>
+    </xsl:apply-templates>
+
+    <xsl:apply-templates select="$refs[secondary and count(.|key('secondary', concat($key, &sep;, &secondary;))[&scope;][1]) = 1]" 
+                         mode="index-secondary-markup">
+      <xsl:with-param name="scope" select="$scope"/>
+      <xsl:sort select="translate(&secondary;, &lowercase;, &uppercase;)"/>
+    </xsl:apply-templates>
+  </xsl:if>
+  <xsl:text>&lt;/indexentry&gt;&#10;</xsl:text>
+</xsl:template>
+
+<xsl:template match="indexterm" mode="index-secondary-markup">
+  <xsl:param name="scope" select="."/>
+  <xsl:variable name="key" select="concat(&primary;, &sep;, &secondary;)"/>
+  <xsl:variable name="refs" select="key('secondary', $key)[&scope;]"/>
+  <xsl:variable name="pages" select="$refs[not(see) and not(seealso)]"/>
+
+  <xsl:text>&lt;secondaryie&gt;</xsl:text>
+  <xsl:text>&lt;phrase&gt;</xsl:text>
+  <xsl:call-template name="escape-text">
+    <xsl:with-param name="text" select="string(secondary)"/>
+  </xsl:call-template>
+  <xsl:text>&lt;/phrase&gt;</xsl:text>
+  <xsl:if test="$pages">,</xsl:if>
+  <xsl:text>&#10;</xsl:text>
+
+  <xsl:for-each select="$pages">
+    <xsl:apply-templates select="." mode="reference-markup">
+      <xsl:with-param name="scope" select="$scope"/>
+    </xsl:apply-templates>
+  </xsl:for-each>
+
+  <xsl:text>&lt;/secondaryie&gt;&#10;</xsl:text>
+
+  <xsl:if test="$refs/tertiary or $refs[not(tertiary)]/*[self::see or self::seealso]">
+    <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &secondary;, &sep;, &sep;, see))[&scope;][1])]"
+                         mode="index-see-markup">
+      <xsl:with-param name="scope" select="$scope"/>
+      <xsl:sort select="translate(see, &lowercase;, &uppercase;)"/>
+    </xsl:apply-templates>
+    <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &secondary;, &sep;, &sep;, seealso))[&scope;][1])]"
+                         mode="index-seealso-markup">
+      <xsl:with-param name="scope" select="$scope"/>
+      <xsl:sort select="translate(seealso, &lowercase;, &uppercase;)"/>
+    </xsl:apply-templates>
+    <xsl:apply-templates select="$refs[tertiary and count(.|key('tertiary', concat($key, &sep;, &tertiary;))[&scope;][1]) = 1]" 
+                         mode="index-tertiary-markup">
+      <xsl:with-param name="scope" select="$scope"/>
+      <xsl:sort select="translate(&tertiary;, &lowercase;, &uppercase;)"/>
+    </xsl:apply-templates>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="indexterm" mode="index-tertiary-markup">
+  <xsl:param name="scope" select="."/>
+  <xsl:variable name="key" select="concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;)"/>
+  <xsl:variable name="refs" select="key('tertiary', $key)[&scope;]"/>
+  <xsl:variable name="pages" select="$refs[not(see) and not(seealso)]"/>
+
+  <xsl:text>&lt;tertiaryie&gt;</xsl:text>
+  <xsl:text>&lt;phrase&gt;</xsl:text>
+  <xsl:call-template name="escape-text">
+    <xsl:with-param name="text" select="string(tertiary)"/>
+  </xsl:call-template>
+  <xsl:text>&lt;/phrase&gt;</xsl:text>
+  <xsl:if test="$pages">,</xsl:if>
+  <xsl:text>&#10;</xsl:text>
+
+  <xsl:for-each select="$pages">
+    <xsl:apply-templates select="." mode="reference-markup">
+      <xsl:with-param name="scope" select="$scope"/>
+    </xsl:apply-templates>
+  </xsl:for-each>
+
+  <xsl:text>&lt;/tertiaryie&gt;&#10;</xsl:text>
+
+  <xsl:variable name="see" select="$refs/see | $refs/seealso"/>
+  <xsl:if test="$see">
+    <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, see))[&scope;][1])]"
+                         mode="index-see-markup">
+      <xsl:with-param name="scope" select="$scope"/>
+      <xsl:sort select="translate(see, &lowercase;, &uppercase;)"/>
+    </xsl:apply-templates>
+    <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, seealso))[&scope;][1])]"
+                         mode="index-seealso-markup">
+      <xsl:with-param name="scope" select="$scope"/>
+      <xsl:sort select="translate(seealso, &lowercase;, &uppercase;)"/>
+    </xsl:apply-templates>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="indexterm" mode="reference-markup">
+  <xsl:param name="scope" select="."/>
+  <xsl:choose>
+    <xsl:when test="@zone and string(@zone)">
+      <xsl:call-template name="reference-markup">
+        <xsl:with-param name="zones" select="normalize-space(@zone)"/>
+        <xsl:with-param name="scope" select="$scope"/>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:variable name="id">
+        <xsl:call-template name="object.id"/>
+      </xsl:variable>
+
+
+      <xsl:choose>
+        <xsl:when test="@startref and @class='endofrange'">
+          <xsl:text>&lt;phrase role="pageno"&gt;</xsl:text>
+          <xsl:text>&lt;link linkend="</xsl:text>
+          <xsl:value-of select="@startref"/>
+          <xsl:text>"&gt;</xsl:text>
+          <fo:basic-link internal-destination="{@startref}">
+            <fo:page-number-citation ref-id="{@startref}"/>
+            <xsl:text>-</xsl:text>
+            <fo:page-number-citation ref-id="{$id}"/>
+          </fo:basic-link>
+          <xsl:text>&lt;/link&gt;</xsl:text>
+          <xsl:text>&lt;/phrase&gt;&#10;</xsl:text>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:text>&lt;phrase role="pageno"&gt;</xsl:text>
+          <xsl:if test="@id">
+            <xsl:text>&lt;link linkend="</xsl:text>
+            <xsl:value-of select="$id"/>
+            <xsl:text>"&gt;</xsl:text>
+          </xsl:if>
+          <fo:basic-link internal-destination="{$id}">
+            <fo:page-number-citation ref-id="{$id}"/>
+          </fo:basic-link>
+          <xsl:if test="@id">
+            <xsl:text>&lt;/link&gt;</xsl:text>
+          </xsl:if>
+          <xsl:text>&lt;/phrase&gt;&#10;</xsl:text>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="reference-markup">
+  <xsl:param name="scope" select="."/>
+  <xsl:param name="zones"/>
+  <xsl:choose>
+    <xsl:when test="contains($zones, ' ')">
+      <xsl:variable name="zone" select="substring-before($zones, ' ')"/>
+      <xsl:variable name="target" select="key('id', $zone)[&scope;]"/>
+
+      <xsl:variable name="id">
+        <xsl:call-template name="object.id">
+          <xsl:with-param name="object" select="$target[1]"/>
+        </xsl:call-template>
+      </xsl:variable>
+
+      <xsl:text>&lt;phrase fole="pageno"&gt;</xsl:text>
+      <xsl:if test="$target[1]/@id">
+        <xsl:text>&lt;link linkend="</xsl:text>
+        <xsl:value-of select="$id"/>
+        <xsl:text>"&gt;</xsl:text>
+      </xsl:if>
+      <fo:basic-link internal-destination="{$id}">
+        <fo:page-number-citation ref-id="{$id}"/>
+      </fo:basic-link>
+      <xsl:if test="$target[1]/@id">
+        <xsl:text>&lt;/link&gt;</xsl:text>
+      </xsl:if>
+      <xsl:text>&lt;/phrase&gt;&#10;</xsl:text>
+
+      <xsl:call-template name="reference">
+        <xsl:with-param name="zones" select="substring-after($zones, ' ')"/>
+        <xsl:with-param name="scope" select="$scope"/>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:variable name="zone" select="$zones"/>
+      <xsl:variable name="target" select="key('id', $zone)[&scope;]"/>
+
+      <xsl:variable name="id">
+        <xsl:call-template name="object.id">
+          <xsl:with-param name="object" select="$target[1]"/>
+        </xsl:call-template>
+      </xsl:variable>
+
+      <xsl:text>&lt;phrase role="pageno"&gt;</xsl:text>
+      <xsl:if test="$target[1]/@id">
+        <xsl:text>&lt;link linkend="</xsl:text>
+        <xsl:value-of select="$id"/>
+        <xsl:text>"&gt;</xsl:text>
+      </xsl:if>
+      <fo:basic-link internal-destination="{$id}">
+        <fo:page-number-citation ref-id="{$id}"/>
+      </fo:basic-link>
+      <xsl:if test="$target[1]/@id">
+        <xsl:text>&lt;/link&gt;</xsl:text>
+      </xsl:if>
+      <xsl:text>&lt;/phrase&gt;&#10;</xsl:text>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="indexterm" mode="index-see-markup">
+  <xsl:param name="scope" select="."/>
+  <fo:block>
+    <xsl:text>&lt;seeie&gt;</xsl:text>
+    <xsl:text>&lt;phrase&gt;</xsl:text>
+    <xsl:call-template name="escape-text">
+      <xsl:with-param name="text" select="string(see)"/>
+    </xsl:call-template>
+    <xsl:text>&lt;/phrase&gt;</xsl:text>
+    <xsl:text>&lt;/seeie&gt;&#10;</xsl:text>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="indexterm" mode="index-seealso-markup">
+  <xsl:param name="scope" select="."/>
+  <fo:block>
+    <xsl:text>&lt;seealsoie&gt;</xsl:text>
+    <xsl:text>&lt;phrase&gt;</xsl:text>
+    <xsl:call-template name="escape-text">
+      <xsl:with-param name="text" select="string(seealso)"/>
+    </xsl:call-template>
+    <xsl:text>&lt;/phrase&gt;</xsl:text>
+    <xsl:text>&lt;/seealsoie&gt;&#10;</xsl:text>
+  </fo:block>
+</xsl:template>
+
+<xsl:template name="escape-text">
+  <xsl:param name="text" select="''"/>
+
+  <xsl:variable name="ltpos" select="substring-before($text, '&lt;')"/>
+  <xsl:variable name="amppos" select="substring-before($text, '&amp;')"/>
+
+  <xsl:choose>
+    <xsl:when test="contains($text,'&lt;') and contains($text, '&amp;')
+                    and string-length($ltpos) &lt; string-length($amppos)">
+      <xsl:value-of select="$ltpos"/>
+      <xsl:text>&amp;lt;</xsl:text>
+      <xsl:call-template name="escape-text">
+        <xsl:with-param name="text" select="substring-after($text, '&lt;')"/>
+      </xsl:call-template>
+    </xsl:when>
+
+    <xsl:when test="contains($text,'&lt;') and contains($text, '&amp;')
+                    and string-length($amppos) &lt; string-length($ltpos)">
+      <xsl:value-of select="$amppos"/>
+      <xsl:text>&amp;amp;</xsl:text>
+      <xsl:call-template name="escape-text">
+        <xsl:with-param name="text" select="substring-after($text, '&amp;')"/>
+      </xsl:call-template>
+    </xsl:when>
+
+    <xsl:when test="contains($text, '&lt;')">
+      <xsl:value-of select="$ltpos"/>
+      <xsl:text>&amp;lt;</xsl:text>
+      <xsl:call-template name="escape-text">
+        <xsl:with-param name="text" select="substring-after($text, '&lt;')"/>
+      </xsl:call-template>
+    </xsl:when>
+
+    <xsl:when test="contains($text, '&amp;')">
+      <xsl:value-of select="$amppos"/>
+      <xsl:text>&amp;amp;</xsl:text>
+      <xsl:call-template name="escape-text">
+        <xsl:with-param name="text" select="substring-after($text, '&amp;')"/>
+      </xsl:call-template>
+    </xsl:when>
+
+    <xsl:otherwise>
+      <xsl:value-of select="$text"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/autotoc.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/autotoc.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/autotoc.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,541 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: autotoc.xsl,v 1.1.1.1 2004/10/19 21:21:42 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:template name="set.toc">
+  <xsl:param name="toc-context" select="."/>
+
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <xsl:variable name="cid">
+    <xsl:call-template name="object.id">
+      <xsl:with-param name="object" select="$toc-context"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="nodes" select="book|setindex"/>
+
+  <xsl:if test="$nodes">
+    <fo:block id="toc...{$id}"
+              xsl:use-attribute-sets="toc.margin.properties">
+      <xsl:if test="$axf.extensions != 0">
+        <xsl:attribute name="axf:outline-level">1</xsl:attribute>
+        <xsl:attribute name="axf:outline-expand">false</xsl:attribute>
+        <xsl:attribute name="axf:outline-title">
+          <xsl:call-template name="gentext">
+            <xsl:with-param name="key" select="'TableofContents'"/>
+          </xsl:call-template>
+        </xsl:attribute>
+      </xsl:if>
+      <xsl:call-template name="table.of.contents.titlepage"/>
+      <xsl:apply-templates select="$nodes" mode="toc">
+        <xsl:with-param name="toc-context" select="$toc-context"/>
+      </xsl:apply-templates>
+    </fo:block>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template name="division.toc">
+  <xsl:param name="toc-context" select="."/>
+
+  <xsl:variable name="cid">
+    <xsl:call-template name="object.id">
+      <xsl:with-param name="object" select="$toc-context"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="nodes"
+                select="$toc-context/part
+                        |$toc-context/reference
+                        |$toc-context/preface
+                        |$toc-context/chapter
+                        |$toc-context/appendix
+                        |$toc-context/article
+                        |$toc-context/bibliography
+                        |$toc-context/glossary
+                        |$toc-context/index"/>
+
+  <xsl:if test="$nodes">
+    <fo:block id="toc...{$cid}"
+              xsl:use-attribute-sets="toc.margin.properties">
+      <xsl:if test="$axf.extensions != 0">
+        <xsl:attribute name="axf:outline-level">1</xsl:attribute>
+        <xsl:attribute name="axf:outline-expand">false</xsl:attribute>
+        <xsl:attribute name="axf:outline-title">
+          <xsl:call-template name="gentext">
+            <xsl:with-param name="key" select="'TableofContents'"/>
+          </xsl:call-template>
+        </xsl:attribute>
+      </xsl:if>
+      <xsl:call-template name="table.of.contents.titlepage"/>
+      <xsl:apply-templates select="$nodes" mode="toc">
+        <xsl:with-param name="toc-context" select="$toc-context"/>
+      </xsl:apply-templates>
+    </fo:block>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template name="component.toc">
+  <xsl:param name="toc-context" select="."/>
+
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <xsl:variable name="cid">
+    <xsl:call-template name="object.id">
+      <xsl:with-param name="object" select="$toc-context"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="nodes" select="section|sect1|refentry
+                                     |article|bibliography|glossary
+                                     |appendix"/>
+  <xsl:if test="$nodes">
+    <fo:block id="toc...{$id}"
+              xsl:use-attribute-sets="toc.margin.properties">
+      <xsl:call-template name="table.of.contents.titlepage"/>
+      <xsl:apply-templates select="$nodes" mode="toc">
+        <xsl:with-param name="toc-context" select="$toc-context"/>
+      </xsl:apply-templates>
+    </fo:block>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template name="component.toc.separator">
+  <!-- Customize to output something between
+       component.toc and first output -->
+</xsl:template>
+
+<xsl:template name="section.toc">
+  <xsl:param name="toc-context" select="."/>
+  <xsl:param name="toc.title.p" select="true()"/>
+
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <xsl:variable name="cid">
+    <xsl:call-template name="object.id">
+      <xsl:with-param name="object" select="$toc-context"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="nodes"
+                select="section|sect1|sect2|sect3|sect4|sect5|refentry
+                        |bridgehead[$bridgehead.in.toc != 0]"/>
+
+  <xsl:variable name="level">
+    <xsl:call-template name="section.level"/>
+  </xsl:variable>
+
+  <xsl:if test="$nodes">
+    <fo:block id="toc...{$id}"
+              xsl:use-attribute-sets="toc.margin.properties">
+
+      <xsl:if test="$toc.title.p">
+        <xsl:call-template name="section.heading">
+          <xsl:with-param name="level" select="$level + 1"/>
+          <xsl:with-param name="title">
+            <fo:block space-after="0.5em">
+              <xsl:call-template name="gentext">
+                <xsl:with-param name="key" select="'TableofContents'"/>
+              </xsl:call-template>
+            </fo:block>
+          </xsl:with-param>
+        </xsl:call-template>
+      </xsl:if>
+
+      <xsl:apply-templates select="$nodes" mode="toc">
+        <xsl:with-param name="toc-context" select="$toc-context"/>
+      </xsl:apply-templates>
+    </fo:block>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template name="section.toc.separator">
+  <!-- Customize to output something between
+       section.toc and first output -->
+</xsl:template>
+<!-- ==================================================================== -->
+
+<xsl:template name="toc.line">
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <xsl:variable name="label">
+    <xsl:apply-templates select="." mode="label.markup"/>
+  </xsl:variable>
+
+  <fo:block text-align-last="justify"
+            end-indent="{$toc.indent.width}pt"
+            last-line-end-indent="-{$toc.indent.width}pt">
+    <fo:inline keep-with-next.within-line="always">
+      <fo:basic-link internal-destination="{$id}">
+        <xsl:if test="$label != ''">
+          <xsl:copy-of select="$label"/>
+          <xsl:value-of select="$autotoc.label.separator"/>
+        </xsl:if>
+        <xsl:apply-templates select="." mode="titleabbrev.markup"/>
+      </fo:basic-link>
+    </fo:inline>
+    <fo:inline keep-together.within-line="always">
+      <xsl:text> </xsl:text>
+      <fo:leader leader-pattern="dots"
+                 leader-pattern-width="3pt"
+                 leader-alignment="reference-area"
+                 keep-with-next.within-line="always"/>
+      <xsl:text> </xsl:text> 
+      <fo:basic-link internal-destination="{$id}">
+        <fo:page-number-citation ref-id="{$id}"/>
+      </fo:basic-link>
+    </fo:inline>
+  </fo:block>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="book|setindex" mode="toc">
+  <xsl:param name="toc-context" select="."/>
+
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <xsl:variable name="cid">
+    <xsl:call-template name="object.id">
+      <xsl:with-param name="object" select="$toc-context"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:call-template name="toc.line"/>
+
+  <xsl:variable name="nodes" select="glossary|bibliography|preface|chapter
+                                     |reference|part|article|appendix|index"/>
+
+  <xsl:if test="$toc.section.depth &gt; 0 and $nodes">
+    <fo:block id="toc.{$cid}.{$id}"
+              start-indent="{count(ancestor::*)*$toc.indent.width}pt">
+      <xsl:apply-templates select="$nodes" mode="toc">
+        <xsl:with-param name="toc-context" select="$toc-context"/>
+      </xsl:apply-templates>
+    </fo:block>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="part" mode="toc">
+  <xsl:param name="toc-context" select="."/>
+
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <xsl:variable name="cid">
+    <xsl:call-template name="object.id">
+      <xsl:with-param name="object" select="$toc-context"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:call-template name="toc.line"/>
+
+  <xsl:variable name="nodes" select="chapter|appendix|preface|reference"/>
+
+  <xsl:if test="$toc.section.depth &gt; 0 and $nodes">
+    <fo:block id="toc.{$cid}.{$id}"
+              start-indent="{count(ancestor::*)*$toc.indent.width}pt">
+      <xsl:apply-templates select="$nodes" mode="toc">
+        <xsl:with-param name="toc-context" select="$toc-context"/>
+      </xsl:apply-templates>
+    </fo:block>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="reference" mode="toc">
+  <xsl:param name="toc-context" select="."/>
+
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <xsl:variable name="cid">
+    <xsl:call-template name="object.id">
+      <xsl:with-param name="object" select="$toc-context"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:call-template name="toc.line"/>
+
+  <xsl:if test="$toc.section.depth &gt; 0 and refentry">
+    <fo:block id="toc.{$cid}.{$id}"
+              start-indent="{count(ancestor::*)*$toc.indent.width}pt">
+      <xsl:apply-templates select="refentry" mode="toc">
+        <xsl:with-param name="toc-context" select="$toc-context"/>
+      </xsl:apply-templates>
+    </fo:block>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="refentry" mode="toc">
+  <xsl:param name="toc-context" select="."/>
+
+  <xsl:call-template name="toc.line"/>
+</xsl:template>
+
+<xsl:template match="preface|chapter|appendix|article"
+              mode="toc">
+  <xsl:param name="toc-context" select="."/>
+
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <xsl:variable name="cid">
+    <xsl:call-template name="object.id">
+      <xsl:with-param name="object" select="$toc-context"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:call-template name="toc.line"/>
+
+  <xsl:variable name="nodes" select="section|sect1"/>
+
+  <xsl:if test="$toc.section.depth &gt; 0 and $nodes">
+    <fo:block id="toc.{$cid}.{$id}"
+              start-indent="{count(ancestor::*)*$toc.indent.width}pt">
+      <xsl:apply-templates select="$nodes" mode="toc">
+        <xsl:with-param name="toc-context" select="$toc-context"/>
+      </xsl:apply-templates>
+    </fo:block>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="sect1" mode="toc">
+  <xsl:param name="toc-context" select="."/>
+
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <xsl:variable name="cid">
+    <xsl:call-template name="object.id">
+      <xsl:with-param name="object" select="$toc-context"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:call-template name="toc.line"/>
+
+  <xsl:if test="$toc.section.depth &gt; 1 and sect2">
+    <fo:block id="toc.{$cid}.{$id}"
+              start-indent="{count(ancestor::*)*$toc.indent.width}pt">
+      <xsl:apply-templates select="sect2" mode="toc">
+        <xsl:with-param name="toc-context" select="$toc-context"/>
+      </xsl:apply-templates>
+    </fo:block>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="sect2" mode="toc">
+  <xsl:param name="toc-context" select="."/>
+
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <xsl:variable name="cid">
+    <xsl:call-template name="object.id">
+      <xsl:with-param name="object" select="$toc-context"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:call-template name="toc.line"/>
+
+  <xsl:variable name="reldepth"
+                select="count(ancestor::*)-count($toc-context/ancestor::*)"/>
+
+  <xsl:if test="$toc.section.depth &gt; 2 and sect3">
+    <fo:block id="toc.{$cid}.{$id}"
+              start-indent="{$reldepth*$toc.indent.width}pt">
+      <xsl:apply-templates select="sect3" mode="toc">
+        <xsl:with-param name="toc-context" select="$toc-context"/>
+      </xsl:apply-templates>
+    </fo:block>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="sect3" mode="toc">
+  <xsl:param name="toc-context" select="."/>
+
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <xsl:variable name="cid">
+    <xsl:call-template name="object.id">
+      <xsl:with-param name="object" select="$toc-context"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:call-template name="toc.line"/>
+
+  <xsl:variable name="reldepth"
+                select="count(ancestor::*)-count($toc-context/ancestor::*)"/>
+
+  <xsl:if test="$toc.section.depth &gt; 3 and sect4">
+    <fo:block id="toc.{$cid}.{$id}"
+              start-indent="{$reldepth*$toc.indent.width}pt">
+      <xsl:apply-templates select="sect4" mode="toc">
+        <xsl:with-param name="toc-context" select="$toc-context"/>
+      </xsl:apply-templates>
+    </fo:block>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="sect4" mode="toc">
+  <xsl:param name="toc-context" select="."/>
+
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <xsl:variable name="cid">
+    <xsl:call-template name="object.id">
+      <xsl:with-param name="object" select="$toc-context"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:call-template name="toc.line"/>
+
+  <xsl:variable name="reldepth"
+                select="count(ancestor::*)-count($toc-context/ancestor::*)"/>
+
+  <xsl:if test="$toc.section.depth &gt; 4 and sect5">
+    <fo:block id="toc.{$cid}.{$id}"
+              start-indent="{$reldepth*$toc.indent.width}pt">
+      <xsl:apply-templates select="sect5" mode="toc">
+        <xsl:with-param name="toc-context" select="$toc-context"/>
+      </xsl:apply-templates>
+    </fo:block>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="sect5" mode="toc">
+  <xsl:param name="toc-context" select="."/>
+
+  <xsl:call-template name="toc.line"/>
+</xsl:template>
+
+<xsl:template match="section" mode="toc">
+  <xsl:param name="toc-context" select="."/>
+
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <xsl:variable name="cid">
+    <xsl:call-template name="object.id">
+      <xsl:with-param name="object" select="$toc-context"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="depth" select="count(ancestor::section) + 1"/>
+  <xsl:variable name="reldepth"
+                select="count(ancestor::*)-count($toc-context/ancestor::*)"/>
+
+  <xsl:if test="$toc.section.depth &gt;= $depth">
+    <xsl:call-template name="toc.line"/>
+
+    <xsl:if test="$toc.section.depth &gt; $depth and section">
+      <fo:block id="toc.{$cid}.{$id}"
+                start-indent="{$reldepth*$toc.indent.width}pt">
+        <xsl:apply-templates select="section" mode="toc">
+          <xsl:with-param name="toc-context" select="$toc-context"/>
+        </xsl:apply-templates>
+      </fo:block>
+    </xsl:if>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="bibliography|glossary"
+              mode="toc">
+  <xsl:param name="toc-context" select="."/>
+
+  <xsl:call-template name="toc.line"/>
+</xsl:template>
+
+<xsl:template match="index" mode="toc">
+  <xsl:param name="toc-context" select="."/>
+
+  <xsl:if test="* or $generate.index != 0">
+    <xsl:call-template name="toc.line"/>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="title" mode="toc">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="list.of.titles">
+  <xsl:param name="titles" select="'table'"/>
+  <xsl:param name="nodes" select=".//table"/>
+  <xsl:param name="toc-context" select="."/>
+
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <xsl:if test="$nodes">
+    <fo:block id="lot...{$titles}...{$id}">
+      <xsl:choose>
+        <xsl:when test="$titles='table'">
+          <xsl:call-template name="list.of.tables.titlepage"/>
+        </xsl:when>
+        <xsl:when test="$titles='figure'">
+          <xsl:call-template name="list.of.figures.titlepage"/>
+        </xsl:when>
+        <xsl:when test="$titles='equation'">
+          <xsl:call-template name="list.of.equations.titlepage"/>
+        </xsl:when>
+        <xsl:when test="$titles='example'">
+          <xsl:call-template name="list.of.examples.titlepage"/>
+        </xsl:when>
+        <xsl:when test="$titles='procedure'">
+          <xsl:call-template name="list.of.procedures.titlepage"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:call-template name="list.of.unknowns.titlepage"/>
+        </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="$nodes" mode="toc">
+        <xsl:with-param name="toc-context" select="$toc-context"/>
+      </xsl:apply-templates>
+    </fo:block>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="figure|table|example|equation|procedure" mode="toc">
+  <xsl:call-template name="toc.line"/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+</xsl:stylesheet>
+

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/axf.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/axf.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/axf.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,61 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: axf.xsl,v 1.1.1.1 2004/10/19 21:21:42 juntao Exp $
+     ******************************************************************** -->
+
+<xsl:template name="axf-document-information">
+
+    <xsl:if test="//author[1]">
+      <xsl:element name="axf:document-info">
+        <xsl:attribute name="name">author</xsl:attribute>
+        <xsl:attribute name="value">
+          <xsl:call-template name="person.name">
+            <xsl:with-param name="node" select="//author[1]"/>
+          </xsl:call-template>
+        </xsl:attribute>
+      </xsl:element>
+    </xsl:if>
+
+    <xsl:variable name="title">
+      <xsl:apply-templates select="/*[1]" mode="label.markup"/>
+      <xsl:apply-templates select="/*[1]" mode="title.markup"/>
+    </xsl:variable>
+
+    <axf:document-info name="title" value="{$title}"/>
+
+    <xsl:if test="//keyword">
+      <xsl:element name="axf:document-info">
+        <xsl:attribute name="name">keywords</xsl:attribute>
+        <xsl:attribute name="value">
+          <xsl:for-each select="//keyword">
+            <xsl:value-of select="."/>
+            <xsl:if test="position() != last()">
+              <xsl:text>, </xsl:text>
+            </xsl:if>
+          </xsl:for-each>
+        </xsl:attribute>
+      </xsl:element>
+    </xsl:if>
+
+    <xsl:if test="//subjectterm">
+      <xsl:element name="axf:document-info">
+        <xsl:attribute name="name">subject</xsl:attribute>
+        <xsl:attribute name="value">
+          <xsl:for-each select="//subjectterm">
+            <xsl:value-of select="."/>
+            <xsl:if test="position() != last()">
+              <xsl:text>, </xsl:text>
+            </xsl:if>
+          </xsl:for-each>
+        </xsl:attribute>
+      </xsl:element>
+    </xsl:if>
+
+</xsl:template>
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/biblio.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/biblio.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/biblio.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1105 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: biblio.xsl,v 1.1.1.1 2004/10/19 21:21:42 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:template match="bibliography">
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="not(parent::*) or parent::part or parent::book">
+      <xsl:variable name="master-reference">
+        <xsl:call-template name="select.pagemaster"/>
+      </xsl:variable>
+
+      <fo:page-sequence hyphenate="{$hyphenate}"
+                        master-reference="{$master-reference}">
+        <xsl:attribute name="language">
+          <xsl:call-template name="l10n.language"/>
+        </xsl:attribute>
+        <xsl:attribute name="format">
+          <xsl:call-template name="page.number.format"/>
+        </xsl:attribute>
+        <xsl:if test="$double.sided != 0">
+          <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
+        </xsl:if>
+        <xsl:attribute name="hyphenation-character">
+          <xsl:call-template name="gentext">
+            <xsl:with-param name="key" select="'hyphenation-character'"/>
+          </xsl:call-template>
+        </xsl:attribute>
+        <xsl:attribute name="hyphenation-push-character-count">
+          <xsl:call-template name="gentext">
+            <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
+          </xsl:call-template>
+        </xsl:attribute>
+        <xsl:attribute name="hyphenation-remain-character-count">
+          <xsl:call-template name="gentext">
+            <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
+          </xsl:call-template>
+        </xsl:attribute>
+
+        <xsl:apply-templates select="." mode="running.head.mode">
+          <xsl:with-param name="master-reference" select="$master-reference"/>
+        </xsl:apply-templates>
+        <xsl:apply-templates select="." mode="running.foot.mode">
+          <xsl:with-param name="master-reference" select="$master-reference"/>
+        </xsl:apply-templates>
+
+        <fo:flow flow-name="xsl-region-body">
+          <fo:block id="{$id}">
+            <xsl:call-template name="bibliography.titlepage"/>
+          </fo:block>
+          <xsl:apply-templates/>
+        </fo:flow>
+      </fo:page-sequence>
+    </xsl:when>
+    <xsl:otherwise>
+      <fo:block id="{$id}"
+                space-before.minimum="1em"
+                space-before.optimum="1.5em"
+                space-before.maximum="2em">
+        <xsl:call-template name="bibliography.titlepage"/>
+      </fo:block>
+      <xsl:apply-templates/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="bibliography/bibliographyinfo"></xsl:template>
+<xsl:template match="bibliography/title"></xsl:template>
+<xsl:template match="bibliography/subtitle"></xsl:template>
+<xsl:template match="bibliography/titleabbrev"></xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="bibliodiv">
+  <fo:block>
+    <xsl:attribute name="id">
+      <xsl:call-template name="object.id"/>
+    </xsl:attribute>
+    <xsl:call-template name="bibliodiv.titlepage"/>
+    <xsl:apply-templates/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="bibliodiv/title"/>
+<xsl:template match="bibliodiv/subtitle"/>
+<xsl:template match="bibliodiv/titleabbrev"/>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="bibliolist">
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <fo:block id="{$id}"
+	    space-before.minimum="1em"
+	    space-before.optimum="1.5em"
+	    space-before.maximum="2em">
+
+    <xsl:if test="blockinfo/title|info/title|title">
+      <xsl:call-template name="formal.object.heading"/>
+    </xsl:if>
+
+    <xsl:apply-templates select="*[not(self::blockinfo)
+			           and not(self::title)
+				   and not(self::titleabbrev)]"/>
+  </fo:block>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="biblioentry">
+  <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
+  <xsl:choose>
+    <xsl:when test="string(.) = ''">
+      <xsl:variable name="bib" select="document($bibliography.collection,.)"/>
+      <xsl:variable name="entry" select="$bib/bibliography/*[@id=$id][1]"/>
+      <xsl:choose>
+        <xsl:when test="$entry">
+          <xsl:apply-templates select="$entry"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:message>
+            <xsl:text>No bibliography entry: </xsl:text>
+            <xsl:value-of select="$id"/>
+            <xsl:text> found in </xsl:text>
+            <xsl:value-of select="$bibliography.collection"/>
+          </xsl:message>
+          <fo:block id="{$id}" xsl:use-attribute-sets="normal.para.spacing">
+            <xsl:text>Error: no bibliography entry: </xsl:text>
+            <xsl:value-of select="$id"/>
+            <xsl:text> found in </xsl:text>
+            <xsl:value-of select="$bibliography.collection"/>
+          </fo:block>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+    <xsl:otherwise>
+      <fo:block id="{$id}" xsl:use-attribute-sets="normal.para.spacing"
+                start-indent="0.5in" text-indent="-0.5in">
+        <xsl:call-template name="biblioentry.label"/>
+        <xsl:apply-templates mode="bibliography.mode"/>
+      </fo:block>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="bibliomixed">
+  <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
+  <xsl:choose>
+    <xsl:when test="string(.) = ''">
+      <xsl:variable name="bib" select="document($bibliography.collection,.)"/>
+      <xsl:variable name="entry" select="$bib/bibliography/*[@id=$id][1]"/>
+      <xsl:choose>
+        <xsl:when test="$entry">
+          <xsl:apply-templates select="$entry"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:message>
+            <xsl:text>No bibliography entry: </xsl:text>
+            <xsl:value-of select="$id"/>
+            <xsl:text> found in </xsl:text>
+            <xsl:value-of select="$bibliography.collection"/>
+          </xsl:message>
+          <fo:block id="{$id}" xsl:use-attribute-sets="normal.para.spacing">
+            <xsl:text>Error: no bibliography entry: </xsl:text>
+            <xsl:value-of select="$id"/>
+            <xsl:text> found in </xsl:text>
+            <xsl:value-of select="$bibliography.collection"/>
+          </fo:block>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+    <xsl:otherwise>
+      <fo:block id="{$id}" xsl:use-attribute-sets="normal.para.spacing"
+                start-indent="0.5in" text-indent="-0.5in">
+        <xsl:call-template name="biblioentry.label"/>
+        <xsl:apply-templates mode="bibliomixed.mode"/>
+      </fo:block>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="biblioentry.label">
+  <xsl:param name="node" select="."/>
+
+  <xsl:choose>
+    <xsl:when test="$bibliography.numbered != 0">
+      <xsl:text>[</xsl:text>
+      <xsl:number from="bibliography" count="biblioentry|bibliomixed"
+                  level="any" format="1"/>
+      <xsl:text>] </xsl:text>
+    </xsl:when>
+    <xsl:when test="local-name($node/child::*[1]) = 'abbrev'">
+      <xsl:text>[</xsl:text>
+      <xsl:apply-templates select="$node/abbrev[1]"/>
+      <xsl:text>] </xsl:text>
+    </xsl:when>
+    <xsl:when test="$node/@xreflabel">
+      <xsl:text>[</xsl:text>
+      <xsl:value-of select="$node/@xreflabel"/>
+      <xsl:text>] </xsl:text>
+    </xsl:when>
+    <xsl:when test="$node/@id">
+      <xsl:text>[</xsl:text>
+      <xsl:value-of select="$node/@id"/>
+      <xsl:text>] </xsl:text>
+    </xsl:when>
+    <xsl:otherwise><!-- nop --></xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="*" mode="bibliography.mode">
+  <xsl:apply-templates select="."/><!-- try the default mode -->
+</xsl:template>
+
+<xsl:template match="abbrev" mode="bibliography.mode">
+  <xsl:if test="preceding-sibling::*">
+    <fo:inline>
+      <xsl:apply-templates mode="bibliography.mode"/>
+    </fo:inline>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="abstract" mode="bibliography.mode">
+  <!-- suppressed -->
+</xsl:template>
+
+<xsl:template match="address" mode="bibliography.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="affiliation" mode="bibliography.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="shortaffil" mode="bibliography.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="jobtitle" mode="bibliography.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="artheader|articleinfo" mode="bibliography.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="artpagenums" mode="bibliography.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="author" mode="bibliography.mode">
+  <fo:inline>
+    <xsl:call-template name="person.name"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="authorblurb|personblurb" mode="bibliography.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="authorgroup" mode="bibliography.mode">
+  <fo:inline>
+    <xsl:call-template name="person.name.list"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="authorinitials" mode="bibliography.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="bibliomisc" mode="bibliography.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="bibliomset" mode="bibliography.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </fo:inline>
+</xsl:template>
+
+<!-- ================================================== -->
+
+<xsl:template match="biblioset" mode="bibliography.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliography.mode"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="biblioset/title|biblioset/citetitle" 
+              mode="bibliography.mode">
+  <xsl:variable name="relation" select="../@relation"/>
+  <xsl:choose>
+    <xsl:when test="$relation='article' or @pubwork='article'">
+      <xsl:call-template name="gentext.startquote"/>
+      <xsl:apply-templates mode="bibliography.mode"/>
+      <xsl:call-template name="gentext.endquote"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <fo:inline font-style="italic">
+        <xsl:apply-templates/>
+      </fo:inline>
+    </xsl:otherwise>
+  </xsl:choose>
+  <xsl:value-of select="$biblioentry.item.separator"/>
+</xsl:template>
+
+<!-- ================================================== -->
+
+<xsl:template match="bookbiblio" mode="bibliography.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="citetitle" mode="bibliography.mode">
+  <fo:inline>
+    <xsl:choose>
+      <xsl:when test="@pubwork = 'article'">
+        <xsl:call-template name="gentext.startquote"/>
+        <xsl:apply-templates mode="bibliography.mode"/>
+        <xsl:call-template name="gentext.endquote"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <fo:inline font-style="italic">
+          <xsl:apply-templates mode="bibliography.mode"/>
+        </fo:inline>
+      </xsl:otherwise>
+    </xsl:choose>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="collab" mode="bibliography.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="confgroup" mode="bibliography.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="contractnum" mode="bibliography.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="contractsponsor" mode="bibliography.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="contrib" mode="bibliography.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </fo:inline>
+</xsl:template>
+
+<!-- ================================================== -->
+
+<xsl:template match="copyright" mode="bibliography.mode">
+  <fo:inline>
+    <xsl:call-template name="gentext">
+      <xsl:with-param name="key" select="'Copyright'"/>
+    </xsl:call-template>
+    <xsl:call-template name="gentext.space"/>
+    <xsl:call-template name="dingbat">
+      <xsl:with-param name="dingbat">copyright</xsl:with-param>
+    </xsl:call-template>
+    <xsl:call-template name="gentext.space"/>
+    <xsl:apply-templates select="year" mode="bibliography.mode"/>
+    <xsl:if test="holder">
+      <xsl:call-template name="gentext.space"/>
+      <xsl:apply-templates select="holder" mode="bibliography.mode"/>
+    </xsl:if>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="year" mode="bibliography.mode">
+  <xsl:apply-templates/><xsl:text>, </xsl:text>
+</xsl:template>
+
+<xsl:template match="year[position()=last()]" mode="bibliography.mode">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="holder" mode="bibliography.mode">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<!-- ================================================== -->
+
+<xsl:template match="corpauthor" mode="bibliography.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="corpname" mode="bibliography.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="date" mode="bibliography.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="edition" mode="bibliography.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="editor" mode="bibliography.mode">
+  <fo:inline>
+    <xsl:call-template name="person.name"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="firstname" mode="bibliography.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="honorific" mode="bibliography.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="indexterm" mode="bibliography.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="invpartnumber" mode="bibliography.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="isbn" mode="bibliography.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="issn" mode="bibliography.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="issuenum" mode="bibliography.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="lineage" mode="bibliography.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="orgname" mode="bibliography.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="othercredit" mode="bibliography.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="othername" mode="bibliography.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="pagenums" mode="bibliography.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="printhistory" mode="bibliography.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="productname" mode="bibliography.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="productnumber" mode="bibliography.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="pubdate" mode="bibliography.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="publisher" mode="bibliography.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliography.mode"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="publishername" mode="bibliography.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="pubsnumber" mode="bibliography.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="releaseinfo" mode="bibliography.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="revhistory" mode="bibliography.mode">
+  <fo:block>
+    <xsl:apply-templates select="."/> <!-- use normal mode -->
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="seriesinfo" mode="bibliography.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliography.mode"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="seriesvolnums" mode="bibliography.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="bibliography.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="surname" mode="bibliography.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="title" mode="bibliography.mode">
+  <fo:inline>
+    <fo:inline font-style="italic">
+      <xsl:apply-templates mode="bibliography.mode"/>
+    </fo:inline>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="titleabbrev" mode="bibliography.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="volumenum" mode="bibliography.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="orgdiv" mode="bibliography.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="collabname" mode="bibliography.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="confdates" mode="bibliography.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="conftitle" mode="bibliography.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="confnum" mode="bibliography.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="confsponsor" mode="bibliography.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="bibliocoverage|biblioid|bibliorelation|bibliosource"
+              mode="bibliography.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </fo:inline>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="*" mode="bibliomixed.mode">
+  <xsl:apply-templates select="."/><!-- try the default mode -->
+</xsl:template>
+
+<xsl:template match="abbrev" mode="bibliomixed.mode">
+  <xsl:if test="preceding-sibling::*">
+    <fo:inline>
+      <xsl:apply-templates mode="bibliomixed.mode"/>
+    </fo:inline>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="abstract" mode="bibliomixed.mode">
+  <fo:block start-indent="1in">
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="para" mode="bibliomixed.mode">
+  <fo:block>
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="address" mode="bibliomixed.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="affiliation" mode="bibliomixed.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="shortaffil" mode="bibliomixed.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliography.mode"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="jobtitle" mode="bibliomixed.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliography.mode"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="artpagenums" mode="bibliomixed.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="author" mode="bibliomixed.mode">
+  <fo:inline>
+    <xsl:call-template name="person.name"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="authorblurb|personblurb" mode="bibliomixed.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="authorgroup" mode="bibliomixed.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="authorinitials" mode="bibliomixed.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="bibliomisc" mode="bibliomixed.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </fo:inline>
+</xsl:template>
+
+<!-- ================================================== -->
+
+<xsl:template match="bibliomset" mode="bibliomixed.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="bibliomset/title|bibliomset/citetitle" 
+              mode="bibliomixed.mode">
+  <xsl:variable name="relation" select="../@relation"/>
+  <xsl:choose>
+    <xsl:when test="$relation='article' or @pubwork='article'">
+      <xsl:call-template name="gentext.startquote"/>
+      <xsl:apply-templates mode="bibliomixed.mode"/>
+      <xsl:call-template name="gentext.endquote"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <fo:inline font-style="italic">
+        <xsl:apply-templates/>
+      </fo:inline>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- ================================================== -->
+
+<xsl:template match="biblioset" mode="bibliomixed.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="citetitle" mode="bibliomixed.mode">
+  <xsl:choose>
+    <xsl:when test="@pubwork = 'article'">
+      <xsl:call-template name="gentext.startquote"/>
+      <xsl:apply-templates mode="bibliomixed.mode"/>
+      <xsl:call-template name="gentext.endquote"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <fo:inline font-style="italic">
+        <xsl:apply-templates mode="bibliography.mode"/>
+      </fo:inline>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="collab" mode="bibliomixed.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="confgroup" mode="bibliomixed.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="contractnum" mode="bibliomixed.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="contractsponsor" mode="bibliomixed.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="contrib" mode="bibliomixed.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="copyright" mode="bibliomixed.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="corpauthor" mode="bibliomixed.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="corpname" mode="bibliomixed.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="date" mode="bibliomixed.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="edition" mode="bibliomixed.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="editor" mode="bibliomixed.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="firstname" mode="bibliomixed.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="honorific" mode="bibliomixed.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="indexterm" mode="bibliomixed.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="invpartnumber" mode="bibliomixed.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="isbn" mode="bibliomixed.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="issn" mode="bibliomixed.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="issuenum" mode="bibliomixed.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="lineage" mode="bibliomixed.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="orgname" mode="bibliomixed.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="othercredit" mode="bibliomixed.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="othername" mode="bibliomixed.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="pagenums" mode="bibliomixed.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="printhistory" mode="bibliomixed.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="productname" mode="bibliomixed.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="productnumber" mode="bibliomixed.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="pubdate" mode="bibliomixed.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="publisher" mode="bibliomixed.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="publishername" mode="bibliomixed.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="pubsnumber" mode="bibliomixed.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="releaseinfo" mode="bibliomixed.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="revhistory" mode="bibliomixed.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="seriesvolnums" mode="bibliomixed.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="bibliomixed.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="surname" mode="bibliomixed.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="title" mode="bibliomixed.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="titleabbrev" mode="bibliomixed.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="volumenum" mode="bibliomixed.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="bibliocoverage|biblioid|bibliorelation|bibliosource"
+              mode="bibliomixed.mode">
+  <fo:inline>
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </fo:inline>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/block.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/block.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/block.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,348 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: block.xsl,v 1.1.1.1 2004/10/19 21:21:42 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- ==================================================================== -->
+<!-- What should we do about styling blockinfo? -->
+
+<xsl:template match="blockinfo">
+  <!-- suppress -->
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="block.object">
+  <fo:block>
+    <xsl:apply-templates/>
+  </fo:block>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="para">
+  <fo:block xsl:use-attribute-sets="normal.para.spacing">
+    <xsl:call-template name="anchor"/>
+    <xsl:apply-templates/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="simpara">
+  <fo:block xsl:use-attribute-sets="normal.para.spacing">
+    <xsl:apply-templates/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="formalpara">
+  <fo:block xsl:use-attribute-sets="normal.para.spacing">
+    <xsl:apply-templates/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="formalpara/title">
+  <xsl:variable name="titleStr">
+      <xsl:apply-templates/>
+  </xsl:variable>
+  <xsl:variable name="lastChar">
+    <xsl:if test="$titleStr != ''">
+      <xsl:value-of select="substring($titleStr,string-length($titleStr),1)"/>
+    </xsl:if>
+  </xsl:variable>
+
+  <fo:inline font-weight="bold"
+             keep-with-next.within-line="always"
+             padding-end="1em">
+    <xsl:copy-of select="$titleStr"/>
+    <xsl:if test="$lastChar != ''
+                  and not(contains($runinhead.title.end.punct, $lastChar))">
+      <xsl:value-of select="$runinhead.default.title.end.punct"/>
+    </xsl:if>
+    <xsl:text>&#160;</xsl:text>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="formalpara/para">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="blockquote">
+  <fo:block xsl:use-attribute-sets="blockquote.properties">
+    <xsl:call-template name="anchor"/>
+    <fo:block>
+      <xsl:if test="title">
+        <fo:block xsl:use-attribute-sets="formal.title.properties">
+          <xsl:apply-templates select="." mode="object.title.markup"/>
+        </fo:block>
+      </xsl:if>
+      <xsl:apply-templates select="*[local-name(.) != 'title'
+                                   and local-name(.) != 'attribution']"/>
+    </fo:block>
+    <xsl:if test="attribution">
+      <fo:block text-align="right">
+        <!-- mdash -->
+        <xsl:text>&#x2014;</xsl:text>
+        <xsl:apply-templates select="attribution"/>
+      </fo:block>
+    </xsl:if>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="epigraph">
+  <fo:block>
+    <xsl:call-template name="anchor"/>
+    <xsl:apply-templates select="para|simpara|formalpara|literallayout"/>
+    <xsl:if test="attribution">
+      <fo:inline>
+        <xsl:text>--</xsl:text>
+        <xsl:apply-templates select="attribution"/>
+      </fo:inline>
+    </xsl:if>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="attribution">
+  <fo:inline><xsl:apply-templates/></fo:inline>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="sidebar">
+  <fo:block xsl:use-attribute-sets="sidebar.properties">
+    <xsl:if test="./title">
+      <fo:block font-weight="bold"
+                keep-with-next.within-column="always"
+                hyphenate="false">
+        <xsl:apply-templates select="./title" mode="sidebar.title.mode"/>
+      </fo:block>
+    </xsl:if>
+
+    <xsl:apply-templates/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="sidebar/title">
+</xsl:template>
+
+<xsl:template match="sidebar/title" mode="sidebar.title.mode">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="abstract">
+  <fo:block>
+    <xsl:if test="@id">
+      <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
+    </xsl:if>
+    <xsl:call-template name="formal.object.heading">
+      <xsl:with-param name="title">
+        <xsl:apply-templates select="." mode="title.markup"/>
+      </xsl:with-param>
+    </xsl:call-template>
+    <xsl:apply-templates/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="abstract/title">
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="msgset">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="msgentry">
+  <xsl:call-template name="block.object"/>
+</xsl:template>
+
+<xsl:template match="simplemsgentry">
+  <xsl:call-template name="block.object"/>
+</xsl:template>
+
+<xsl:template match="msg">
+  <xsl:call-template name="block.object"/>
+</xsl:template>
+
+<xsl:template match="msgmain">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="msgsub">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="msgrel">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="msgtext">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="msginfo">
+  <xsl:call-template name="block.object"/>
+</xsl:template>
+
+<xsl:template match="msglevel">
+  <fo:block>
+    <fo:inline font-weight="bold"
+               keep-with-next.within-line="always">
+      <xsl:call-template name="gentext.template">
+        <xsl:with-param name="context" select="'msgset'"/>
+        <xsl:with-param name="name" select="'MsgLevel'"/>
+      </xsl:call-template>
+    </fo:inline>
+    <xsl:apply-templates/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="msgorig">
+  <fo:block>
+    <fo:inline font-weight="bold"
+               keep-with-next.within-line="always">
+      <xsl:call-template name="gentext.template">
+        <xsl:with-param name="context" select="'msgset'"/>
+        <xsl:with-param name="name" select="'MsgOrig'"/>
+      </xsl:call-template>
+    </fo:inline>
+    <xsl:apply-templates/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="msgaud">
+  <fo:block>
+    <fo:inline font-weight="bold"
+               keep-with-next.within-line="always">
+      <xsl:call-template name="gentext.template">
+        <xsl:with-param name="context" select="'msgset'"/>
+        <xsl:with-param name="name" select="'MsgAud'"/>
+      </xsl:call-template>
+    </fo:inline>
+    <xsl:apply-templates/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="msgexplan">
+  <xsl:call-template name="block.object"/>
+</xsl:template>
+
+<xsl:template match="msgexplan/title">
+  <fo:block font-weight="bold"
+            keep-with-next.within-column="always"
+            hyphenate="false">
+    <xsl:apply-templates/>
+  </fo:block>
+</xsl:template>
+
+<!-- ==================================================================== -->
+<!-- For better or worse, revhistory is allowed in content... -->
+
+<xsl:template match="revhistory">
+  <fo:table table-layout="fixed">
+    <fo:table-column column-number="1" column-width="proportional-column-width(1)"/>
+    <fo:table-column column-number="2" column-width="proportional-column-width(1)"/>
+    <fo:table-column column-number="3" column-width="proportional-column-width(1)"/>
+    <fo:table-body>
+      <fo:table-row>
+        <fo:table-cell number-columns-spanned="3">
+          <fo:block>
+            <xsl:call-template name="gentext">
+              <xsl:with-param name="key" select="'RevHistory'"/>
+            </xsl:call-template>
+          </fo:block>
+        </fo:table-cell>
+      </fo:table-row>
+      <xsl:apply-templates/>
+    </fo:table-body>
+  </fo:table>
+</xsl:template>
+
+<xsl:template match="revhistory/revision">
+  <xsl:variable name="revnumber" select=".//revnumber"/>
+  <xsl:variable name="revdate"   select=".//date"/>
+  <xsl:variable name="revauthor" select=".//authorinitials"/>
+  <xsl:variable name="revremark" select=".//revremark|.//revdescription"/>
+  <fo:table-row>
+    <fo:table-cell>
+      <fo:block>
+        <xsl:if test="$revnumber">
+          <xsl:call-template name="gentext">
+            <xsl:with-param name="key" select="'Revision'"/>
+          </xsl:call-template>
+          <xsl:call-template name="gentext.space"/>
+          <xsl:apply-templates select="$revnumber[1]"/>
+        </xsl:if>
+      </fo:block>
+    </fo:table-cell>
+    <fo:table-cell>
+      <fo:block>
+        <xsl:apply-templates select="$revdate[1]"/>
+      </fo:block>
+    </fo:table-cell>
+    <fo:table-cell>
+      <fo:block>
+        <xsl:apply-templates select="$revauthor[1]"/>
+      </fo:block>
+    </fo:table-cell>
+  </fo:table-row>
+  <xsl:if test="$revremark">
+    <fo:table-row>
+      <fo:table-cell number-columns-spanned="3">
+        <fo:block>
+          <xsl:apply-templates select="$revremark[1]"/>
+        </fo:block>
+      </fo:table-cell>
+    </fo:table-row>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="revision/revnumber">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="revision/date">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="revision/authorinitials">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="revision/revremark">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="revision/revdescription">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="ackno">
+  <fo:block xsl:use-attribute-sets="normal.para.spacing">
+    <xsl:apply-templates/>
+  </fo:block>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="highlights">
+  <xsl:call-template name="block.object"/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/callout.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/callout.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/callout.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,233 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                xmlns:sverb="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.Verbatim"
+                xmlns:xverb="com.nwalsh.xalan.Verbatim"
+                xmlns:lxslt="http://xml.apache.org/xslt"
+                exclude-result-prefixes="sverb xverb lxslt"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: callout.xsl,v 1.1.1.1 2004/10/19 21:21:42 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<lxslt:component prefix="xverb"
+                 functions="insertCallouts"/>
+
+<xsl:template match="programlistingco|screenco">
+  <xsl:variable name="verbatim" select="programlisting|screen"/>
+  <xsl:variable name="vendor" select="system-property('xsl:vendor')"/>
+
+  <xsl:choose>
+    <xsl:when test="$use.extensions != '0'
+                    and $callouts.extension != '0'">
+      <xsl:variable name="rtf">
+        <xsl:apply-templates select="$verbatim">
+          <xsl:with-param name="suppress-numbers" select="'1'"/>
+        </xsl:apply-templates>
+      </xsl:variable>
+
+      <xsl:variable name="rtf-with-callouts">
+        <xsl:choose>
+          <xsl:when test="contains($vendor, 'SAXON ')">
+            <xsl:copy-of select="sverb:insertCallouts(areaspec,$rtf)"/>
+          </xsl:when>
+          <xsl:when test="contains($vendor, 'Apache Software Foundation')">
+            <xsl:copy-of select="xverb:insertCallouts(areaspec,$rtf)"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:message terminate="yes">
+              <xsl:text>Don't know how to do callouts with </xsl:text>
+              <xsl:value-of select="$vendor"/>
+            </xsl:message>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:variable>
+
+      <xsl:choose>
+        <xsl:when test="$verbatim/@linenumbering = 'numbered'
+                        and $linenumbering.extension != '0'">
+          <xsl:call-template name="number.rtf.lines">
+            <xsl:with-param name="rtf" select="$rtf-with-callouts"/>
+            <xsl:with-param name="pi.context"
+                            select="programlisting|screen"/>
+          </xsl:call-template>
+          <xsl:apply-templates select="calloutlist"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:copy-of select="$rtf-with-callouts"/>
+          <xsl:apply-templates select="calloutlist"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:apply-templates/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="areaspec|areaset|area">
+</xsl:template>
+
+<xsl:template match="areaset" mode="conumber">
+  <xsl:number count="area|areaset" format="1"/>
+</xsl:template>
+
+<xsl:template match="area" mode="conumber">
+  <xsl:number count="area|areaset" format="1"/>
+</xsl:template>
+
+<xsl:template match="co">
+  <fo:inline id="{@id}">
+    <xsl:apply-templates select="." mode="callout-bug"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="coref">
+  <!-- tricky; this relies on the fact that we can process the "co" that's -->
+  <!-- "over there" as if it were "right here" -->
+
+  <xsl:variable name="co" select="key('id', @linkend)"/>
+  <xsl:variable name="id" select="@id"/>
+  <xsl:choose>
+    <xsl:when test="not($co)">
+      <xsl:message>
+        <xsl:text>Error: coref link is broken: </xsl:text>
+        <xsl:value-of select="@linkend"/>
+      </xsl:message>
+    </xsl:when>
+    <xsl:when test="local-name($co) != 'co'">
+      <xsl:message>
+        <xsl:text>Error: coref doesn't point to a co: </xsl:text>
+        <xsl:value-of select="@linkend"/>
+      </xsl:message>
+    </xsl:when>
+    <xsl:otherwise>
+      <fo:inline>
+        <xsl:if test="$id != ''">
+	  <xsl:attribute name="id">
+	    <xsl:value-of select="$id"/>
+	  </xsl:attribute>
+	</xsl:if>
+        <xsl:apply-templates select="$co" mode="callout-bug"/>
+      </fo:inline>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="co" mode="callout-bug">
+  <xsl:call-template name="callout-bug">
+    <xsl:with-param name="conum">
+      <xsl:number count="co"
+                  level="any"
+                  from="programlisting|screen|literallayout|synopsis"
+                  format="1"/>
+    </xsl:with-param>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="callout-bug">
+  <xsl:param name="conum" select='1'/>
+
+  <xsl:choose>
+    <!-- Draw callouts as images -->
+    <xsl:when test="$callout.graphics != '0'
+                    and $conum &lt;= $callout.graphics.number.limit">
+      <xsl:variable name="filename"
+                    select="concat($callout.graphics.path,$conum,$callout.graphics.extension)"/>
+
+      <fo:external-graphic>
+        <xsl:attribute name="src">
+          <xsl:choose>
+            <xsl:when test="$passivetex.extensions != 0
+                            or $fop.extensions != 0
+                            or $arbortext.extensions != 0">
+              <xsl:value-of select="$filename"/>
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:text>url(</xsl:text>
+              <xsl:value-of select="$filename"/>
+              <xsl:text>)</xsl:text>
+            </xsl:otherwise>
+          </xsl:choose>
+        </xsl:attribute>
+      </fo:external-graphic>
+    </xsl:when>
+
+    <xsl:when test="$callout.unicode != 0
+                    and $conum &lt;= $callout.unicode.number.limit">
+      <xsl:variable name="comarkup">
+        <xsl:choose>
+          <xsl:when test="$callout.unicode.start.character = 10102">
+            <xsl:choose>
+              <xsl:when test="$conum = 1">&#10102;</xsl:when>
+              <xsl:when test="$conum = 2">&#10103;</xsl:when>
+              <xsl:when test="$conum = 3">&#10104;</xsl:when>
+              <xsl:when test="$conum = 4">&#10105;</xsl:when>
+              <xsl:when test="$conum = 5">&#10106;</xsl:when>
+              <xsl:when test="$conum = 6">&#10107;</xsl:when>
+              <xsl:when test="$conum = 7">&#10108;</xsl:when>
+              <xsl:when test="$conum = 8">&#10109;</xsl:when>
+              <xsl:when test="$conum = 9">&#10110;</xsl:when>
+              <xsl:when test="$conum = 10">&#10111;</xsl:when>
+            </xsl:choose>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:message>
+              <xsl:text>Don't know how to generate Unicode callouts </xsl:text>
+              <xsl:text>when $callout.unicode.start.character is </xsl:text>
+              <xsl:value-of select="$callout.unicode.start.character"/>
+            </xsl:message>
+            <fo:inline background-color="#404040"
+                       color="white"
+                       padding-top="0.1em"
+                       padding-bottom="0.1em"
+                       padding-start="0.2em"
+                       padding-end="0.2em"
+                       baseline-shift="0.1em"
+                       font-family="{$body.fontset}"
+                       font-weight="bold"
+                       font-size="75%">
+              <xsl:value-of select="$conum"/>
+            </fo:inline>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:variable>
+
+      <xsl:choose>
+        <xsl:when test="$callout.unicode.font != ''">
+          <fo:inline font-family="{$callout.unicode.font}">
+            <xsl:copy-of select="$comarkup"/>
+          </fo:inline>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:copy-of select="$comarkup"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+
+    <!-- Most safe: draw a dark gray square with a white number inside -->
+    <xsl:otherwise>
+      <fo:inline background-color="#404040"
+                 color="white"
+                 padding-top="0.1em"
+                 padding-bottom="0.1em"
+                 padding-start="0.2em"
+                 padding-end="0.2em"
+                 baseline-shift="0.1em"
+                 font-family="{$body.fontset}"
+                 font-weight="bold"
+                 font-size="75%">
+        <xsl:value-of select="$conum"/>
+      </fo:inline>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/component.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/component.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/component.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,620 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: component.xsl,v 1.1.1.1 2004/10/19 21:21:42 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:template name="component.title">
+  <xsl:param name="node" select="."/>
+  <xsl:param name="pagewide" select="0"/>
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id">
+      <xsl:with-param name="object" select="$node"/>
+    </xsl:call-template>
+  </xsl:variable>
+  <xsl:variable name="title">
+    <xsl:apply-templates select="$node" mode="object.title.markup">
+      <xsl:with-param name="allow-anchors" select="1"/>
+    </xsl:apply-templates>
+  </xsl:variable>
+  <xsl:variable name="titleabbrev">
+    <xsl:apply-templates select="$node" mode="titleabbrev.markup"/>
+  </xsl:variable>
+
+  <xsl:if test="$passivetex.extensions != 0">
+    <fotex:bookmark xmlns:fotex="http://www.tug.org/fotex"
+                    fotex-bookmark-level="2"
+                    fotex-bookmark-label="{$id}">
+      <xsl:value-of select="$titleabbrev"/>
+    </fotex:bookmark>
+  </xsl:if>
+
+  <fo:block keep-with-next.within-column="always"
+            space-before.optimum="{$body.font.master}pt"
+            space-before.minimum="{$body.font.master * 0.8}pt"
+            space-before.maximum="{$body.font.master * 1.2}pt"
+            hyphenate="false">
+    <xsl:if test="$pagewide != 0">
+      <!-- Doesn't work to use 'all' here since not a child of fo:flow -->
+      <xsl:attribute name="span">inherit</xsl:attribute>
+    </xsl:if>
+    <xsl:attribute name="hyphenation-character">
+      <xsl:call-template name="gentext">
+        <xsl:with-param name="key" select="'hyphenation-character'"/>
+      </xsl:call-template>
+    </xsl:attribute>
+    <xsl:attribute name="hyphenation-push-character-count">
+      <xsl:call-template name="gentext">
+        <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
+      </xsl:call-template>
+    </xsl:attribute>
+    <xsl:attribute name="hyphenation-remain-character-count">
+      <xsl:call-template name="gentext">
+        <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
+      </xsl:call-template>
+    </xsl:attribute>
+    <xsl:if test="$axf.extensions != 0">
+      <xsl:attribute name="axf:outline-level">
+        <xsl:value-of select="count($node/ancestor::*)"/>
+      </xsl:attribute>
+      <xsl:attribute name="axf:outline-expand">false</xsl:attribute>
+      <xsl:attribute name="axf:outline-title">
+        <xsl:value-of select="$title"/>
+      </xsl:attribute>
+    </xsl:if>
+    <xsl:copy-of select="$title"/>
+  </fo:block>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="dedication" mode="dedication">
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <xsl:variable name="master-reference">
+    <xsl:call-template name="select.pagemaster"/>
+  </xsl:variable>
+
+  <fo:page-sequence hyphenate="{$hyphenate}"
+                    master-reference="{$master-reference}">
+    <xsl:attribute name="language">
+      <xsl:call-template name="l10n.language"/>
+    </xsl:attribute>
+    <xsl:attribute name="format">
+      <xsl:call-template name="page.number.format"/>
+    </xsl:attribute>
+    <xsl:choose>
+      <xsl:when test="not(preceding::chapter
+                          or preceding::preface
+                          or preceding::appendix
+                          or preceding::article
+                          or preceding::dedication
+                          or parent::part
+                          or parent::reference)">
+        <!-- if there is a preceding component or we're in a part, the -->
+        <!-- page numbering will already be adjusted -->
+        <xsl:attribute name="initial-page-number">1</xsl:attribute>
+      </xsl:when>
+      <xsl:when test="$double.sided != 0">
+        <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
+      </xsl:when>
+    </xsl:choose>
+
+    <xsl:if test="$double.sided = 0">
+      <xsl:attribute name="force-page-count">no-force</xsl:attribute>
+    </xsl:if>
+
+    <xsl:attribute name="hyphenation-character">
+      <xsl:call-template name="gentext">
+        <xsl:with-param name="key" select="'hyphenation-character'"/>
+      </xsl:call-template>
+    </xsl:attribute>
+    <xsl:attribute name="hyphenation-push-character-count">
+      <xsl:call-template name="gentext">
+        <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
+      </xsl:call-template>
+    </xsl:attribute>
+    <xsl:attribute name="hyphenation-remain-character-count">
+      <xsl:call-template name="gentext">
+        <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
+      </xsl:call-template>
+    </xsl:attribute>
+
+    <xsl:apply-templates select="." mode="running.head.mode">
+      <xsl:with-param name="master-reference" select="$master-reference"/>
+    </xsl:apply-templates>
+
+    <xsl:apply-templates select="." mode="running.foot.mode">
+      <xsl:with-param name="master-reference" select="$master-reference"/>
+    </xsl:apply-templates>
+
+    <fo:flow flow-name="xsl-region-body">
+      <fo:block id="{$id}">
+        <xsl:call-template name="dedication.titlepage"/>
+      </fo:block>
+      <xsl:apply-templates/>
+    </fo:flow>
+  </fo:page-sequence>
+</xsl:template>
+
+<xsl:template match="dedication"></xsl:template> <!-- see mode="dedication" -->
+<xsl:template match="dedication/docinfo"></xsl:template>
+<xsl:template match="dedication/title"></xsl:template>
+<xsl:template match="dedication/subtitle"></xsl:template>
+<xsl:template match="dedication/titleabbrev"></xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="colophon">
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <xsl:variable name="master-reference">
+    <xsl:call-template name="select.pagemaster"/>
+  </xsl:variable>
+
+  <fo:page-sequence hyphenate="{$hyphenate}"
+                    master-reference="{$master-reference}">
+    <xsl:attribute name="language">
+      <xsl:call-template name="l10n.language"/>
+    </xsl:attribute>
+    <xsl:attribute name="format">
+      <xsl:call-template name="page.number.format"/>
+    </xsl:attribute>
+    <xsl:choose>
+      <xsl:when test="$double.sided != 0">
+        <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:attribute name="force-page-count">no-force</xsl:attribute>
+      </xsl:otherwise>
+    </xsl:choose>
+    <xsl:attribute name="hyphenation-character">
+      <xsl:call-template name="gentext">
+        <xsl:with-param name="key" select="'hyphenation-character'"/>
+      </xsl:call-template>
+    </xsl:attribute>
+    <xsl:attribute name="hyphenation-push-character-count">
+      <xsl:call-template name="gentext">
+        <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
+      </xsl:call-template>
+    </xsl:attribute>
+    <xsl:attribute name="hyphenation-remain-character-count">
+      <xsl:call-template name="gentext">
+        <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
+      </xsl:call-template>
+    </xsl:attribute>
+
+    <xsl:apply-templates select="." mode="running.head.mode">
+      <xsl:with-param name="master-reference" select="$master-reference"/>
+    </xsl:apply-templates>
+
+    <xsl:apply-templates select="." mode="running.foot.mode">
+      <xsl:with-param name="master-reference" select="$master-reference"/>
+    </xsl:apply-templates>
+
+    <fo:flow flow-name="xsl-region-body">
+      <fo:block id="{$id}">
+        <xsl:call-template name="colophon.titlepage"/>
+      </fo:block>
+      <xsl:apply-templates/>
+    </fo:flow>
+  </fo:page-sequence>
+</xsl:template>
+
+<xsl:template match="colophon/title"></xsl:template>
+<xsl:template match="colophon/subtitle"></xsl:template>
+<xsl:template match="colophon/titleabbrev"></xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="preface">
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <xsl:variable name="master-reference">
+    <xsl:call-template name="select.pagemaster"/>
+  </xsl:variable>
+
+  <fo:page-sequence hyphenate="{$hyphenate}"
+                    master-reference="{$master-reference}">
+    <xsl:attribute name="language">
+      <xsl:call-template name="l10n.language"/>
+    </xsl:attribute>
+    <xsl:attribute name="format">
+      <xsl:call-template name="page.number.format"/>
+    </xsl:attribute>
+
+    <!-- Page numbering for a preface doesn't restart; it continues from the ToC -->
+    <xsl:choose>
+      <xsl:when test="$double.sided != 0">
+        <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:attribute name="force-page-count">no-force</xsl:attribute>
+      </xsl:otherwise>
+    </xsl:choose>
+
+    <xsl:attribute name="hyphenation-character">
+      <xsl:call-template name="gentext">
+        <xsl:with-param name="key" select="'hyphenation-character'"/>
+      </xsl:call-template>
+    </xsl:attribute>
+    <xsl:attribute name="hyphenation-push-character-count">
+      <xsl:call-template name="gentext">
+        <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
+      </xsl:call-template>
+    </xsl:attribute>
+    <xsl:attribute name="hyphenation-remain-character-count">
+      <xsl:call-template name="gentext">
+        <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
+      </xsl:call-template>
+    </xsl:attribute>
+
+    <xsl:apply-templates select="." mode="running.head.mode">
+      <xsl:with-param name="master-reference" select="$master-reference"/>
+    </xsl:apply-templates>
+
+    <xsl:apply-templates select="." mode="running.foot.mode">
+      <xsl:with-param name="master-reference" select="$master-reference"/>
+    </xsl:apply-templates>
+
+    <fo:flow flow-name="xsl-region-body">
+      <fo:block id="{$id}">
+        <xsl:call-template name="preface.titlepage"/>
+      </fo:block>
+
+      <xsl:variable name="toc.params">
+        <xsl:call-template name="find.path.params">
+          <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
+        </xsl:call-template>
+      </xsl:variable>
+      <xsl:if test="contains($toc.params, 'toc')">
+        <xsl:call-template name="component.toc"/>
+        <xsl:call-template name="component.toc.separator"/>
+      </xsl:if>
+
+      <xsl:apply-templates/>
+    </fo:flow>
+  </fo:page-sequence>
+</xsl:template>
+
+<xsl:template match="preface/docinfo|prefaceinfo"></xsl:template>
+<xsl:template match="preface/title"></xsl:template>
+<xsl:template match="preface/titleabbrev"></xsl:template>
+<xsl:template match="preface/subtitle"></xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="chapter">
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <xsl:variable name="master-reference">
+    <xsl:call-template name="select.pagemaster"/>
+  </xsl:variable>
+
+  <fo:page-sequence hyphenate="{$hyphenate}"
+                    master-reference="{$master-reference}">
+    <xsl:attribute name="language">
+      <xsl:call-template name="l10n.language"/>
+    </xsl:attribute>
+    <xsl:attribute name="format">
+      <xsl:call-template name="page.number.format"/>
+    </xsl:attribute>
+    <xsl:choose>
+      <xsl:when test="not(preceding::chapter
+                          or preceding::appendix
+                          or preceding::article
+                          or preceding::dedication
+                          or parent::part
+                          or parent::reference)">
+        <!-- if there is a preceding component or we're in a part, the -->
+        <!-- page numbering will already be adjusted -->
+        <xsl:attribute name="initial-page-number">1</xsl:attribute>
+      </xsl:when>
+      <xsl:when test="$double.sided != 0">
+        <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
+      </xsl:when>
+    </xsl:choose>
+
+    <xsl:if test="$double.sided = 0">
+      <xsl:attribute name="force-page-count">no-force</xsl:attribute>
+    </xsl:if>
+
+    <xsl:attribute name="hyphenation-character">
+      <xsl:call-template name="gentext">
+        <xsl:with-param name="key" select="'hyphenation-character'"/>
+      </xsl:call-template>
+    </xsl:attribute>
+    <xsl:attribute name="hyphenation-push-character-count">
+      <xsl:call-template name="gentext">
+        <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
+      </xsl:call-template>
+    </xsl:attribute>
+    <xsl:attribute name="hyphenation-remain-character-count">
+      <xsl:call-template name="gentext">
+        <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
+      </xsl:call-template>
+    </xsl:attribute>
+
+    <xsl:apply-templates select="." mode="running.head.mode">
+      <xsl:with-param name="master-reference" select="$master-reference"/>
+    </xsl:apply-templates>
+
+    <xsl:apply-templates select="." mode="running.foot.mode">
+      <xsl:with-param name="master-reference" select="$master-reference"/>
+    </xsl:apply-templates>
+
+    <fo:flow flow-name="xsl-region-body">
+      <fo:block id="{$id}">
+        <xsl:call-template name="chapter.titlepage"/>
+      </fo:block>
+
+      <xsl:variable name="toc.params">
+        <xsl:call-template name="find.path.params">
+          <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
+        </xsl:call-template>
+      </xsl:variable>
+      <xsl:if test="contains($toc.params, 'toc')">
+        <xsl:call-template name="component.toc"/>
+        <xsl:call-template name="component.toc.separator"/>
+      </xsl:if>
+      <xsl:apply-templates/>
+    </fo:flow>
+  </fo:page-sequence>
+</xsl:template>
+
+<xsl:template match="chapter/docinfo|chapterinfo"></xsl:template>
+<xsl:template match="chapter/title"></xsl:template>
+<xsl:template match="chapter/titleabbrev"></xsl:template>
+<xsl:template match="chapter/subtitle"></xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="appendix">
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <xsl:variable name="master-reference">
+    <xsl:call-template name="select.pagemaster"/>
+  </xsl:variable>
+
+  <fo:page-sequence hyphenate="{$hyphenate}"
+                    master-reference="{$master-reference}">
+    <xsl:attribute name="language">
+      <xsl:call-template name="l10n.language"/>
+    </xsl:attribute>
+    <xsl:attribute name="format">
+      <xsl:call-template name="page.number.format"/>
+    </xsl:attribute>
+    <xsl:choose>
+      <xsl:when test="not(preceding::chapter
+                          or preceding::appendix
+                          or preceding::article
+                          or preceding::dedication
+                          or parent::part
+                          or parent::reference)">
+        <!-- if there is a preceding component or we're in a part, the -->
+        <!-- page numbering will already be adjusted -->
+        <xsl:attribute name="initial-page-number">1</xsl:attribute>
+      </xsl:when>
+      <xsl:when test="$double.sided != 0">
+        <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
+      </xsl:when>
+    </xsl:choose>
+
+    <xsl:if test="$double.sided = 0">
+      <xsl:attribute name="force-page-count">no-force</xsl:attribute>
+    </xsl:if>
+
+    <xsl:attribute name="hyphenation-character">
+      <xsl:call-template name="gentext">
+        <xsl:with-param name="key" select="'hyphenation-character'"/>
+      </xsl:call-template>
+    </xsl:attribute>
+    <xsl:attribute name="hyphenation-push-character-count">
+      <xsl:call-template name="gentext">
+        <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
+      </xsl:call-template>
+    </xsl:attribute>
+    <xsl:attribute name="hyphenation-remain-character-count">
+      <xsl:call-template name="gentext">
+        <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
+      </xsl:call-template>
+    </xsl:attribute>
+
+    <xsl:apply-templates select="." mode="running.head.mode">
+      <xsl:with-param name="master-reference" select="$master-reference"/>
+    </xsl:apply-templates>
+
+    <xsl:apply-templates select="." mode="running.foot.mode">
+      <xsl:with-param name="master-reference" select="$master-reference"/>
+    </xsl:apply-templates>
+
+    <fo:flow flow-name="xsl-region-body">
+      <fo:block id="{$id}">
+        <xsl:call-template name="appendix.titlepage"/>
+      </fo:block>
+
+      <xsl:variable name="toc.params">
+        <xsl:call-template name="find.path.params">
+          <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
+        </xsl:call-template>
+      </xsl:variable>
+
+      <xsl:if test="contains($toc.params, 'toc')">
+        <xsl:call-template name="component.toc"/>
+        <xsl:call-template name="component.toc.separator"/>
+      </xsl:if>
+      <xsl:apply-templates/>
+    </fo:flow>
+  </fo:page-sequence>
+</xsl:template>
+
+<xsl:template match="appendix/docinfo|appendixinfo"></xsl:template>
+<xsl:template match="appendix/title"></xsl:template>
+<xsl:template match="appendix/titleabbrev"></xsl:template>
+<xsl:template match="appendix/subtitle"></xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="article">
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <xsl:variable name="master-reference">
+    <xsl:call-template name="select.pagemaster"/>
+  </xsl:variable>
+
+  <fo:page-sequence hyphenate="{$hyphenate}"
+                    master-reference="{$master-reference}">
+    <xsl:attribute name="language">
+      <xsl:call-template name="l10n.language"/>
+    </xsl:attribute>
+    <xsl:attribute name="format">
+      <xsl:call-template name="page.number.format"/>
+    </xsl:attribute>
+    <xsl:choose>
+      <xsl:when test="not(preceding::chapter
+                          or preceding::preface
+                          or preceding::appendix
+                          or preceding::article
+                          or preceding::dedication
+                          or parent::part
+                          or parent::reference)">
+        <!-- if there is a preceding component or we're in a part, the -->
+        <!-- page numbering will already be adjusted -->
+        <xsl:attribute name="initial-page-number">1</xsl:attribute>
+      </xsl:when>
+      <xsl:when test="$double.sided != 0">
+        <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
+      </xsl:when>
+    </xsl:choose>
+
+    <xsl:if test="$double.sided = 0">
+      <xsl:attribute name="force-page-count">no-force</xsl:attribute>
+    </xsl:if>
+
+    <xsl:attribute name="hyphenation-character">
+      <xsl:call-template name="gentext">
+        <xsl:with-param name="key" select="'hyphenation-character'"/>
+      </xsl:call-template>
+    </xsl:attribute>
+    <xsl:attribute name="hyphenation-push-character-count">
+      <xsl:call-template name="gentext">
+        <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
+      </xsl:call-template>
+    </xsl:attribute>
+    <xsl:attribute name="hyphenation-remain-character-count">
+      <xsl:call-template name="gentext">
+        <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
+      </xsl:call-template>
+    </xsl:attribute>
+
+    <xsl:apply-templates select="." mode="running.head.mode">
+      <xsl:with-param name="master-reference" select="$master-reference"/>
+    </xsl:apply-templates>
+
+    <xsl:apply-templates select="." mode="running.foot.mode">
+      <xsl:with-param name="master-reference" select="$master-reference"/>
+    </xsl:apply-templates>
+
+    <fo:flow flow-name="xsl-region-body">
+      <fo:block id="{$id}">
+        <xsl:call-template name="article.titlepage"/>
+      </fo:block>
+
+      <xsl:variable name="toc.params">
+        <xsl:call-template name="find.path.params">
+          <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
+        </xsl:call-template>
+      </xsl:variable>
+
+      <xsl:if test="contains($toc.params, 'toc')">
+        <xsl:call-template name="component.toc"/>
+        <xsl:call-template name="component.toc.separator"/>
+      </xsl:if>
+      <xsl:apply-templates/>
+    </fo:flow>
+  </fo:page-sequence>
+</xsl:template>
+
+<xsl:template match="article/artheader"></xsl:template>
+<xsl:template match="article/articleinfo"></xsl:template>
+<xsl:template match="article/title"></xsl:template>
+<xsl:template match="article/subtitle"></xsl:template>
+
+<xsl:template match="article/appendix">
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <xsl:variable name="title">
+    <xsl:apply-templates select="." mode="title.markup"/>
+  </xsl:variable>
+
+  <xsl:variable name="titleabbrev">
+    <xsl:apply-templates select="." mode="titleabbrev.markup"/>
+  </xsl:variable>
+
+  <fo:block id='{$id}'>
+    <xsl:if test="$passivetex.extensions != 0">
+      <fotex:bookmark xmlns:fotex="http://www.tug.org/fotex" 
+                      fotex-bookmark-level="{count(ancestor::*)+2}" 
+                      fotex-bookmark-label="{$id}">
+        <xsl:value-of select="$titleabbrev"/>
+      </fotex:bookmark>
+    </xsl:if>
+
+    <xsl:if test="$axf.extensions != 0">
+      <xsl:attribute name="axf:outline-level">
+        <xsl:value-of select="count(ancestor::*)+2"/>
+      </xsl:attribute>
+      <xsl:attribute name="axf:outline-expand">false</xsl:attribute>
+      <xsl:attribute name="axf:outline-title">
+        <xsl:value-of select="$titleabbrev"/>
+      </xsl:attribute>
+    </xsl:if>
+
+    <fo:block xsl:use-attribute-sets="article.appendix.title.properties">
+      <fo:marker marker-class-name="section.head.marker">
+        <xsl:choose>
+          <xsl:when test="$titleabbrev = ''">
+            <xsl:value-of select="$title"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:value-of select="$titleabbrev"/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </fo:marker>
+      <xsl:copy-of select="$title"/>
+    </fo:block>
+
+    <xsl:apply-templates/>
+  </fo:block>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+</xsl:stylesheet>
+

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/division.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/division.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/division.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,809 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: division.xsl,v 1.1.1.1 2004/10/19 21:21:42 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:template name="division.title">
+  <xsl:param name="node" select="."/>
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id">
+      <xsl:with-param name="object" select="$node"/>
+    </xsl:call-template>
+  </xsl:variable>
+  <xsl:variable name="title">
+    <xsl:apply-templates select="$node" mode="object.title.markup"/>
+  </xsl:variable>
+
+  <xsl:if test="$passivetex.extensions != 0">
+    <fotex:bookmark xmlns:fotex="http://www.tug.org/fotex"
+                    fotex-bookmark-level="1"
+                    fotex-bookmark-label="{$id}">
+      <xsl:value-of select="$title"/>
+    </fotex:bookmark>
+  </xsl:if>
+
+  <fo:block keep-with-next.within-column="always"
+            hyphenate="false">
+    <xsl:if test="$axf.extensions != 0">
+      <xsl:attribute name="axf:outline-level">
+        <xsl:choose>
+          <xsl:when test="count($node/ancestor::*) > 0">
+            <xsl:value-of select="count($node/ancestor::*)"/>
+          </xsl:when>
+          <xsl:otherwise>1</xsl:otherwise>
+        </xsl:choose>
+      </xsl:attribute>
+      <xsl:attribute name="axf:outline-expand">false</xsl:attribute>
+      <xsl:attribute name="axf:outline-title">
+        <xsl:value-of select="$title"/>
+      </xsl:attribute>
+    </xsl:if>
+    <xsl:copy-of select="$title"/>
+  </fo:block>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="set">
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <xsl:variable name="preamble"
+                select="*[not(self::book or self::setindex)]"/>
+
+  <xsl:variable name="content" select="book|setindex"/>
+
+  <xsl:variable name="titlepage-master-reference">
+    <xsl:call-template name="select.pagemaster">
+      <xsl:with-param name="pageclass" select="'titlepage'"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="lot-master-reference">
+    <xsl:call-template name="select.pagemaster">
+      <xsl:with-param name="pageclass" select="'lot'"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:if test="$preamble">
+    <fo:page-sequence hyphenate="{$hyphenate}"
+                      master-reference="{$titlepage-master-reference}">
+      <xsl:attribute name="language">
+        <xsl:call-template name="l10n.language"/>
+      </xsl:attribute>
+      <xsl:attribute name="format">
+        <xsl:call-template name="page.number.format"/>
+      </xsl:attribute>
+      <xsl:choose>
+        <xsl:when test="$double.sided != 0">
+          <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:attribute name="force-page-count">no-force</xsl:attribute>
+        </xsl:otherwise>
+      </xsl:choose>
+      <xsl:attribute name="hyphenation-character">
+        <xsl:call-template name="gentext">
+          <xsl:with-param name="key" select="'hyphenation-character'"/>
+        </xsl:call-template>
+      </xsl:attribute>
+      <xsl:attribute name="hyphenation-push-character-count">
+        <xsl:call-template name="gentext">
+          <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
+        </xsl:call-template>
+      </xsl:attribute>
+      <xsl:attribute name="hyphenation-remain-character-count">
+        <xsl:call-template name="gentext">
+          <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
+        </xsl:call-template>
+      </xsl:attribute>
+
+      <xsl:apply-templates select="." mode="running.head.mode">
+        <xsl:with-param name="master-reference" select="$titlepage-master-reference"/>
+      </xsl:apply-templates>
+
+      <xsl:apply-templates select="." mode="running.foot.mode">
+        <xsl:with-param name="master-reference" select="$titlepage-master-reference"/>
+      </xsl:apply-templates>
+
+      <fo:flow flow-name="xsl-region-body">
+        <fo:block id="{$id}">
+          <xsl:call-template name="set.titlepage"/>
+        </fo:block>
+      </fo:flow>
+    </fo:page-sequence>
+  </xsl:if>
+
+  <xsl:variable name="toc.params">
+    <xsl:call-template name="find.path.params">
+      <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:if test="contains($toc.params, 'toc')">
+    <fo:page-sequence hyphenate="{$hyphenate}"
+                      format="i"
+                      master-reference="{$lot-master-reference}">
+      <xsl:attribute name="language">
+        <xsl:call-template name="l10n.language"/>
+      </xsl:attribute>
+      <xsl:attribute name="format">
+        <xsl:call-template name="page.number.format">
+          <xsl:with-param name="element" select="'toc'"/>
+        </xsl:call-template>
+      </xsl:attribute>
+      <xsl:choose>
+        <xsl:when test="$double.sided != 0">
+          <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:attribute name="force-page-count">no-force</xsl:attribute>
+        </xsl:otherwise>
+      </xsl:choose>
+
+      <xsl:attribute name="hyphenation-character">
+        <xsl:call-template name="gentext">
+          <xsl:with-param name="key" select="'hyphenation-character'"/>
+        </xsl:call-template>
+      </xsl:attribute>
+      <xsl:attribute name="hyphenation-push-character-count">
+        <xsl:call-template name="gentext">
+          <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
+        </xsl:call-template>
+      </xsl:attribute>
+      <xsl:attribute name="hyphenation-remain-character-count">
+        <xsl:call-template name="gentext">
+          <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
+        </xsl:call-template>
+      </xsl:attribute>
+
+      <xsl:apply-templates select="." mode="running.head.mode">
+        <xsl:with-param name="master-reference" select="$lot-master-reference"/>
+      </xsl:apply-templates>
+
+      <xsl:apply-templates select="." mode="running.foot.mode">
+        <xsl:with-param name="master-reference" select="$lot-master-reference"/>
+      </xsl:apply-templates>
+
+      <fo:flow flow-name="xsl-region-body">
+        <xsl:call-template name="set.toc"/>
+      </fo:flow>
+    </fo:page-sequence>
+  </xsl:if>
+
+  <xsl:apply-templates select="$content"/>
+</xsl:template>
+
+<xsl:template match="set/setinfo"></xsl:template>
+<xsl:template match="set/title"></xsl:template>
+<xsl:template match="set/subtitle"></xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="book">
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <xsl:variable name="preamble"
+                select="title|subtitle|titleabbrev|bookinfo"/>
+
+  <xsl:variable name="content"
+                select="*[not(self::title or self::subtitle
+                            or self::titleabbrev
+                            or self::bookinfo)]"/>
+
+  <xsl:variable name="titlepage-master-reference">
+    <xsl:call-template name="select.pagemaster">
+      <xsl:with-param name="pageclass" select="'titlepage'"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="lot-master-reference">
+    <xsl:call-template name="select.pagemaster">
+      <xsl:with-param name="pageclass" select="'lot'"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:if test="$preamble">
+    <fo:page-sequence hyphenate="{$hyphenate}"
+                      master-reference="{$titlepage-master-reference}"
+                      initial-page-number="1">
+      <xsl:attribute name="language">
+        <xsl:call-template name="l10n.language"/>
+      </xsl:attribute>
+      <xsl:attribute name="format">
+        <xsl:call-template name="page.number.format"/>
+      </xsl:attribute>
+      <xsl:choose>
+        <xsl:when test="$double.sided != 0">
+          <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:attribute name="force-page-count">no-force</xsl:attribute>
+        </xsl:otherwise>
+      </xsl:choose>
+
+      <xsl:attribute name="hyphenation-character">
+        <xsl:call-template name="gentext">
+          <xsl:with-param name="key" select="'hyphenation-character'"/>
+        </xsl:call-template>
+      </xsl:attribute>
+      <xsl:attribute name="hyphenation-push-character-count">
+        <xsl:call-template name="gentext">
+          <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
+        </xsl:call-template>
+      </xsl:attribute>
+      <xsl:attribute name="hyphenation-remain-character-count">
+        <xsl:call-template name="gentext">
+          <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
+        </xsl:call-template>
+      </xsl:attribute>
+
+      <xsl:apply-templates select="." mode="running.head.mode">
+        <xsl:with-param name="master-reference" select="$titlepage-master-reference"/>
+      </xsl:apply-templates>
+
+      <xsl:apply-templates select="." mode="running.foot.mode">
+        <xsl:with-param name="master-reference" select="$titlepage-master-reference"/>
+      </xsl:apply-templates>
+
+      <fo:flow flow-name="xsl-region-body">
+        <fo:block id="{$id}">
+          <xsl:call-template name="book.titlepage"/>
+        </fo:block>
+      </fo:flow>
+    </fo:page-sequence>
+  </xsl:if>
+
+  <xsl:apply-templates select="dedication" mode="dedication"/>
+
+  <xsl:variable name="toc.params">
+    <xsl:call-template name="find.path.params">
+      <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:if test="contains($toc.params, 'toc')">
+    <fo:page-sequence hyphenate="{$hyphenate}"
+                      format="i"
+                      master-reference="{$lot-master-reference}">
+      <xsl:attribute name="language">
+        <xsl:call-template name="l10n.language"/>
+      </xsl:attribute>
+      <xsl:attribute name="format">
+        <xsl:call-template name="page.number.format">
+          <xsl:with-param name="element" select="'toc'"/>
+        </xsl:call-template>
+      </xsl:attribute>
+      <xsl:choose>
+        <xsl:when test="$double.sided != 0">
+          <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:attribute name="force-page-count">no-force</xsl:attribute>
+        </xsl:otherwise>
+      </xsl:choose>
+
+      <xsl:attribute name="hyphenation-character">
+        <xsl:call-template name="gentext">
+          <xsl:with-param name="key" select="'hyphenation-character'"/>
+        </xsl:call-template>
+      </xsl:attribute>
+      <xsl:attribute name="hyphenation-push-character-count">
+        <xsl:call-template name="gentext">
+          <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
+        </xsl:call-template>
+      </xsl:attribute>
+      <xsl:attribute name="hyphenation-remain-character-count">
+        <xsl:call-template name="gentext">
+          <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
+        </xsl:call-template>
+      </xsl:attribute>
+
+      <xsl:apply-templates select="." mode="running.head.mode">
+        <xsl:with-param name="master-reference" select="$lot-master-reference"/>
+        <xsl:with-param name="gentext-key" select="'TableofContents'"/>
+      </xsl:apply-templates>
+
+      <xsl:apply-templates select="." mode="running.foot.mode">
+        <xsl:with-param name="master-reference" select="$lot-master-reference"/>
+        <xsl:with-param name="gentext-key" select="'TableofContents'"/>
+      </xsl:apply-templates>
+
+      <fo:flow flow-name="xsl-region-body">
+        <xsl:call-template name="division.toc"/>
+      </fo:flow>
+    </fo:page-sequence>
+  </xsl:if>
+
+  <xsl:if test="contains($toc.params,'figure') and .//figure">
+    <fo:page-sequence hyphenate="{$hyphenate}"
+                      format="i"
+                      master-reference="{$lot-master-reference}">
+      <xsl:attribute name="language">
+        <xsl:call-template name="l10n.language"/>
+      </xsl:attribute>
+      <xsl:attribute name="format">
+        <xsl:call-template name="page.number.format">
+          <xsl:with-param name="element" select="'toc'"/>
+        </xsl:call-template>
+      </xsl:attribute>
+      <xsl:choose>
+        <xsl:when test="$double.sided != 0">
+          <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:attribute name="force-page-count">no-force</xsl:attribute>
+        </xsl:otherwise>
+      </xsl:choose>
+
+      <xsl:attribute name="hyphenation-character">
+        <xsl:call-template name="gentext">
+          <xsl:with-param name="key" select="'hyphenation-character'"/>
+        </xsl:call-template>
+      </xsl:attribute>
+      <xsl:attribute name="hyphenation-push-character-count">
+        <xsl:call-template name="gentext">
+          <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
+        </xsl:call-template>
+      </xsl:attribute>
+      <xsl:attribute name="hyphenation-remain-character-count">
+        <xsl:call-template name="gentext">
+          <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
+        </xsl:call-template>
+      </xsl:attribute>
+
+      <xsl:apply-templates select="." mode="running.head.mode">
+        <xsl:with-param name="master-reference" select="$lot-master-reference"/>
+        <xsl:with-param name="gentext-key" select="'ListofFigures'"/>
+      </xsl:apply-templates>
+
+      <xsl:apply-templates select="." mode="running.foot.mode">
+        <xsl:with-param name="master-reference" select="$lot-master-reference"/>
+        <xsl:with-param name="gentext-key" select="'ListofFigures'"/>
+      </xsl:apply-templates>
+
+      <fo:flow flow-name="xsl-region-body">
+        <xsl:call-template name="list.of.titles">
+          <xsl:with-param name="titles" select="'figure'"/>
+          <xsl:with-param name="nodes" select=".//figure"/>
+        </xsl:call-template>
+      </fo:flow>
+    </fo:page-sequence>
+  </xsl:if>
+
+  <xsl:if test="contains($toc.params,'table') and .//table">
+    <fo:page-sequence hyphenate="{$hyphenate}"
+                      format="i"
+                      master-reference="{$lot-master-reference}">
+      <xsl:attribute name="language">
+        <xsl:call-template name="l10n.language"/>
+      </xsl:attribute>
+      <xsl:attribute name="format">
+        <xsl:call-template name="page.number.format">
+          <xsl:with-param name="element" select="'toc'"/>
+        </xsl:call-template>
+      </xsl:attribute>
+      <xsl:choose>
+        <xsl:when test="$double.sided != 0">
+          <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:attribute name="force-page-count">no-force</xsl:attribute>
+        </xsl:otherwise>
+      </xsl:choose>
+
+      <xsl:attribute name="hyphenation-character">
+        <xsl:call-template name="gentext">
+          <xsl:with-param name="key" select="'hyphenation-character'"/>
+        </xsl:call-template>
+      </xsl:attribute>
+      <xsl:attribute name="hyphenation-push-character-count">
+        <xsl:call-template name="gentext">
+          <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
+        </xsl:call-template>
+      </xsl:attribute>
+      <xsl:attribute name="hyphenation-remain-character-count">
+        <xsl:call-template name="gentext">
+          <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
+        </xsl:call-template>
+      </xsl:attribute>
+
+      <xsl:apply-templates select="." mode="running.head.mode">
+        <xsl:with-param name="master-reference" select="$lot-master-reference"/>
+        <xsl:with-param name="gentext-key" select="'ListofTables'"/>
+      </xsl:apply-templates>
+
+      <xsl:apply-templates select="." mode="running.foot.mode">
+        <xsl:with-param name="master-reference" select="$lot-master-reference"/>
+        <xsl:with-param name="gentext-key" select="'ListofTables'"/>
+      </xsl:apply-templates>
+
+      <fo:flow flow-name="xsl-region-body">
+        <xsl:call-template name="list.of.titles">
+          <xsl:with-param name="titles" select="'table'"/>
+          <xsl:with-param name="nodes" select=".//table"/>
+        </xsl:call-template>
+      </fo:flow>
+    </fo:page-sequence>
+  </xsl:if>
+
+  <xsl:if test="contains($toc.params,'example') and .//example">
+    <fo:page-sequence hyphenate="{$hyphenate}"
+                      format="i"
+                      master-reference="{$lot-master-reference}">
+      <xsl:attribute name="language">
+        <xsl:call-template name="l10n.language"/>
+      </xsl:attribute>
+      <xsl:attribute name="format">
+        <xsl:call-template name="page.number.format">
+          <xsl:with-param name="element" select="'toc'"/>
+        </xsl:call-template>
+      </xsl:attribute>
+      <xsl:choose>
+        <xsl:when test="$double.sided != 0">
+          <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:attribute name="force-page-count">no-force</xsl:attribute>
+        </xsl:otherwise>
+      </xsl:choose>
+
+      <xsl:attribute name="hyphenation-character">
+        <xsl:call-template name="gentext">
+          <xsl:with-param name="key" select="'hyphenation-character'"/>
+        </xsl:call-template>
+      </xsl:attribute>
+      <xsl:attribute name="hyphenation-push-character-count">
+        <xsl:call-template name="gentext">
+          <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
+        </xsl:call-template>
+      </xsl:attribute>
+      <xsl:attribute name="hyphenation-remain-character-count">
+        <xsl:call-template name="gentext">
+          <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
+        </xsl:call-template>
+      </xsl:attribute>
+
+      <xsl:apply-templates select="." mode="running.head.mode">
+        <xsl:with-param name="master-reference" select="$lot-master-reference"/>
+        <xsl:with-param name="gentext-key" select="'ListofExamples'"/>
+      </xsl:apply-templates>
+
+      <xsl:apply-templates select="." mode="running.foot.mode">
+        <xsl:with-param name="master-reference" select="$lot-master-reference"/>
+        <xsl:with-param name="gentext-key" select="'ListofExamples'"/>
+      </xsl:apply-templates>
+
+      <fo:flow flow-name="xsl-region-body">
+        <xsl:call-template name="list.of.titles">
+          <xsl:with-param name="titles" select="'example'"/>
+          <xsl:with-param name="nodes" select=".//example"/>
+        </xsl:call-template>
+      </fo:flow>
+    </fo:page-sequence>
+  </xsl:if>
+
+  <xsl:if test="contains($toc.params,'equation') and .//equation">
+    <fo:page-sequence hyphenate="{$hyphenate}"
+                      format="i"
+                      master-reference="{$lot-master-reference}">
+      <xsl:attribute name="language">
+        <xsl:call-template name="l10n.language"/>
+      </xsl:attribute>
+      <xsl:attribute name="format">
+        <xsl:call-template name="page.number.format">
+          <xsl:with-param name="element" select="'toc'"/>
+        </xsl:call-template>
+      </xsl:attribute>
+      <xsl:choose>
+        <xsl:when test="$double.sided != 0">
+          <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:attribute name="force-page-count">no-force</xsl:attribute>
+        </xsl:otherwise>
+      </xsl:choose>
+
+      <xsl:attribute name="hyphenation-character">
+        <xsl:call-template name="gentext">
+          <xsl:with-param name="key" select="'hyphenation-character'"/>
+        </xsl:call-template>
+      </xsl:attribute>
+      <xsl:attribute name="hyphenation-push-character-count">
+        <xsl:call-template name="gentext">
+          <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
+        </xsl:call-template>
+      </xsl:attribute>
+      <xsl:attribute name="hyphenation-remain-character-count">
+        <xsl:call-template name="gentext">
+          <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
+        </xsl:call-template>
+      </xsl:attribute>
+
+      <xsl:apply-templates select="." mode="running.head.mode">
+        <xsl:with-param name="master-reference" select="$lot-master-reference"/>
+        <xsl:with-param name="gentext-key" select="'ListofEquations'"/>
+      </xsl:apply-templates>
+
+      <xsl:apply-templates select="." mode="running.foot.mode">
+        <xsl:with-param name="master-reference" select="$lot-master-reference"/>
+        <xsl:with-param name="gentext-key" select="'ListofEquations'"/>
+      </xsl:apply-templates>
+
+      <fo:flow flow-name="xsl-region-body">
+        <xsl:call-template name="list.of.titles">
+          <xsl:with-param name="titles" select="'equation'"/>
+          <xsl:with-param name="nodes" select=".//equation[title]"/>
+        </xsl:call-template>
+      </fo:flow>
+    </fo:page-sequence>
+  </xsl:if>
+
+  <xsl:if test="contains($toc.params,'procedure') and .//procedure">
+    <fo:page-sequence hyphenate="{$hyphenate}"
+                      format="i"
+                      master-reference="{$lot-master-reference}">
+      <xsl:attribute name="language">
+        <xsl:call-template name="l10n.language"/>
+      </xsl:attribute>
+      <xsl:attribute name="format">
+        <xsl:call-template name="page.number.format">
+          <xsl:with-param name="element" select="'toc'"/>
+        </xsl:call-template>
+      </xsl:attribute>
+      <xsl:choose>
+        <xsl:when test="$double.sided != 0">
+          <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:attribute name="force-page-count">no-force</xsl:attribute>
+        </xsl:otherwise>
+      </xsl:choose>
+
+      <xsl:attribute name="hyphenation-character">
+        <xsl:call-template name="gentext">
+          <xsl:with-param name="key" select="'hyphenation-character'"/>
+        </xsl:call-template>
+      </xsl:attribute>
+      <xsl:attribute name="hyphenation-push-character-count">
+        <xsl:call-template name="gentext">
+          <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
+        </xsl:call-template>
+      </xsl:attribute>
+      <xsl:attribute name="hyphenation-remain-character-count">
+        <xsl:call-template name="gentext">
+          <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
+        </xsl:call-template>
+      </xsl:attribute>
+
+      <xsl:apply-templates select="." mode="running.head.mode">
+        <xsl:with-param name="master-reference" select="$lot-master-reference"/>
+        <xsl:with-param name="gentext-key" select="'ListofProcedures'"/>
+      </xsl:apply-templates>
+
+      <xsl:apply-templates select="." mode="running.foot.mode">
+        <xsl:with-param name="master-reference" select="$lot-master-reference"/>
+        <xsl:with-param name="gentext-key" select="'ListofProcedures'"/>
+      </xsl:apply-templates>
+
+      <fo:flow flow-name="xsl-region-body">
+        <xsl:call-template name="list.of.titles">
+          <xsl:with-param name="titles" select="'procedure'"/>
+          <xsl:with-param name="nodes" select=".//procedure[title]"/>
+        </xsl:call-template>
+      </fo:flow>
+    </fo:page-sequence>
+  </xsl:if>
+
+  <xsl:apply-templates select="$content"/>
+</xsl:template>
+
+<xsl:template match="book/bookinfo"></xsl:template>
+<xsl:template match="book/title"></xsl:template>
+<xsl:template match="book/subtitle"></xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="part">
+  <xsl:if test="not(partintro)">
+    <xsl:apply-templates select="." mode="part.titlepage.mode"/>
+    <xsl:call-template name="generate.part.toc"/>
+  </xsl:if>
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="part" mode="part.titlepage.mode">
+  <!-- done this way to force the context node to be the part -->
+  <xsl:param name="additional.content"/>
+
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <xsl:variable name="titlepage-master-reference">
+    <xsl:call-template name="select.pagemaster">
+      <xsl:with-param name="pageclass" select="'titlepage'"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <fo:page-sequence hyphenate="{$hyphenate}"
+                    master-reference="{$titlepage-master-reference}">
+    <xsl:attribute name="language">
+      <xsl:call-template name="l10n.language"/>
+    </xsl:attribute>
+    <xsl:attribute name="format">
+      <xsl:call-template name="page.number.format"/>
+    </xsl:attribute>
+
+    <xsl:choose>
+      <xsl:when test="not(preceding::chapter)
+                      and not(preceding::part)">
+        <!-- if there is a preceding chapter or part, page numbering will already -->
+        <!-- be adjusted, otherwise restart the page numbers -->
+        <xsl:attribute name="initial-page-number">1</xsl:attribute>
+      </xsl:when>
+      <xsl:when test="$double.sided != 0">
+        <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
+      </xsl:when>
+    </xsl:choose>
+    <xsl:if test="$double.sided = 0">
+      <xsl:attribute name="force-page-count">no-force</xsl:attribute>
+    </xsl:if>
+
+    <xsl:attribute name="hyphenation-character">
+      <xsl:call-template name="gentext">
+        <xsl:with-param name="key" select="'hyphenation-character'"/>
+      </xsl:call-template>
+    </xsl:attribute>
+    <xsl:attribute name="hyphenation-push-character-count">
+      <xsl:call-template name="gentext">
+        <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
+      </xsl:call-template>
+    </xsl:attribute>
+    <xsl:attribute name="hyphenation-remain-character-count">
+      <xsl:call-template name="gentext">
+        <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
+      </xsl:call-template>
+    </xsl:attribute>
+
+    <xsl:apply-templates select="." mode="running.head.mode">
+      <xsl:with-param name="master-reference" select="$titlepage-master-reference"/>
+    </xsl:apply-templates>
+
+    <xsl:apply-templates select="." mode="running.foot.mode">
+      <xsl:with-param name="master-reference" select="$titlepage-master-reference"/>
+    </xsl:apply-templates>
+
+    <fo:flow flow-name="xsl-region-body">
+      <fo:block id="{$id}">
+        <xsl:call-template name="part.titlepage"/>
+      </fo:block>
+      <xsl:copy-of select="$additional.content"/>
+    </fo:flow>
+  </fo:page-sequence>
+</xsl:template>
+
+<xsl:template match="part/docinfo|partinfo"></xsl:template>
+<xsl:template match="part/title"></xsl:template>
+<xsl:template match="part/subtitle"></xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="generate.part.toc">
+  <xsl:param name="part" select="."/>
+
+  <xsl:variable name="lot-master-reference">
+    <xsl:call-template name="select.pagemaster">
+      <xsl:with-param name="pageclass" select="'lot'"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="toc.params">
+    <xsl:call-template name="find.path.params">
+      <xsl:with-param name="node" select="$part"/>
+      <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:if test="contains($toc.params, 'toc')">
+    <fo:page-sequence hyphenate="{$hyphenate}"
+                      master-reference="{$lot-master-reference}">
+      <xsl:attribute name="language">
+        <xsl:call-template name="l10n.language"/>
+      </xsl:attribute>
+      <xsl:attribute name="format">
+        <xsl:call-template name="page.number.format">
+          <xsl:with-param name="element" select="'toc'"/>
+        </xsl:call-template>
+      </xsl:attribute>
+      <xsl:choose>
+        <xsl:when test="$double.sided != 0">
+          <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:attribute name="force-page-count">no-force</xsl:attribute>
+        </xsl:otherwise>
+      </xsl:choose>
+
+      <xsl:attribute name="hyphenation-character">
+        <xsl:call-template name="gentext">
+          <xsl:with-param name="key" select="'hyphenation-character'"/>
+        </xsl:call-template>
+      </xsl:attribute>
+      <xsl:attribute name="hyphenation-push-character-count">
+        <xsl:call-template name="gentext">
+          <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
+        </xsl:call-template>
+      </xsl:attribute>
+      <xsl:attribute name="hyphenation-remain-character-count">
+        <xsl:call-template name="gentext">
+          <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
+        </xsl:call-template>
+      </xsl:attribute>
+
+      <xsl:apply-templates select="$part" mode="running.head.mode">
+        <xsl:with-param name="master-reference" select="$lot-master-reference"/>
+      </xsl:apply-templates>
+
+      <xsl:apply-templates select="$part" mode="running.foot.mode">
+        <xsl:with-param name="master-reference" select="$lot-master-reference"/>
+      </xsl:apply-templates>
+
+      <fo:flow flow-name="xsl-region-body">
+        <xsl:call-template name="division.toc">
+          <xsl:with-param name="toc-context" select="$part"/>
+        </xsl:call-template>
+      </fo:flow>
+    </fo:page-sequence>
+  </xsl:if>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="part/partintro">
+  <xsl:apply-templates select=".." mode="part.titlepage.mode">
+    <xsl:with-param name="additional.content">
+      <xsl:if test="title">
+        <xsl:call-template name="partintro.titlepage"/>
+      </xsl:if>
+      <xsl:apply-templates/>
+    </xsl:with-param>
+  </xsl:apply-templates>
+
+  <xsl:call-template name="generate.part.toc">
+    <xsl:with-param name="part" select=".."/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="partintro/title"></xsl:template>
+<xsl:template match="partintro/subtitle"></xsl:template>
+<xsl:template match="partintro/titleabbrev"></xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="book" mode="division.number">
+  <xsl:number from="set" count="book" format="1."/>
+</xsl:template>
+
+<xsl:template match="part" mode="division.number">
+  <xsl:number from="book" count="part" format="I."/>
+</xsl:template>
+
+</xsl:stylesheet>
+

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/docbook.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/docbook.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/docbook.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,250 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:exsl="http://exslt.org/common"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                exclude-result-prefixes="exsl"
+                version='1.0'>
+
+<!-- It is important to use indent="no" here, otherwise verbatim -->
+<!-- environments get broken by indented tags...at least when the -->
+<!-- callout extension is used...at least with some processors -->
+<xsl:output method="xml" indent="no"/>
+
+<!-- ********************************************************************
+     $Id: docbook.xsl,v 1.1.1.1 2004/10/19 21:21:42 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:include href="../VERSION"/>
+<xsl:include href="param.xsl"/>
+<xsl:include href="../lib/lib.xsl"/>
+<xsl:include href="../common/l10n.xsl"/>
+<xsl:include href="../common/common.xsl"/>
+<xsl:include href="../common/labels.xsl"/>
+<xsl:include href="../common/titles.xsl"/>
+<xsl:include href="../common/subtitles.xsl"/>
+<xsl:include href="../common/gentext.xsl"/>
+<xsl:include href="../common/pi.xsl"/>
+<xsl:include href="autotoc.xsl"/>
+<xsl:include href="autoidx.xsl"/>
+<xsl:include href="lists.xsl"/>
+<xsl:include href="callout.xsl"/>
+<xsl:include href="verbatim.xsl"/>
+<xsl:include href="graphics.xsl"/>
+<xsl:include href="xref.xsl"/>
+<xsl:include href="formal.xsl"/>
+<xsl:include href="table.xsl"/>
+<xsl:include href="htmltbl.xsl"/>
+<xsl:include href="sections.xsl"/>
+<xsl:include href="inline.xsl"/>
+<xsl:include href="footnote.xsl"/>
+<xsl:include href="fo.xsl"/>
+<xsl:include href="fo-rtf.xsl"/>
+<xsl:include href="info.xsl"/>
+<xsl:include href="keywords.xsl"/>
+<xsl:include href="division.xsl"/>
+<xsl:include href="index.xsl"/>
+<xsl:include href="toc.xsl"/>
+<xsl:include href="refentry.xsl"/>
+<xsl:include href="math.xsl"/>
+<xsl:include href="admon.xsl"/>
+<xsl:include href="component.xsl"/>
+<xsl:include href="biblio.xsl"/>
+<xsl:include href="glossary.xsl"/>
+<xsl:include href="block.xsl"/>
+<xsl:include href="task.xsl"/>
+<xsl:include href="qandaset.xsl"/>
+<xsl:include href="synop.xsl"/>
+<xsl:include href="titlepage.xsl"/>
+<xsl:include href="titlepage.templates.xsl"/>
+<xsl:include href="pagesetup.xsl"/>
+<xsl:include href="pi.xsl"/>
+<xsl:include href="ebnf.xsl"/>
+<xsl:include href="docbookng.xsl"/>
+
+<xsl:include href="fop.xsl"/>
+<xsl:include href="passivetex.xsl"/>
+<xsl:include href="xep.xsl"/>
+<xsl:include href="axf.xsl"/>
+
+<xsl:param name="stylesheet.result.type" select="'fo'"/>
+
+<!-- ==================================================================== -->
+
+<xsl:key name="id" match="*" use="@id"/>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="*">
+  <xsl:message>
+    <xsl:value-of select="name(.)"/>
+    <xsl:text> encountered</xsl:text>
+    <xsl:if test="parent::*">
+      <xsl:text> in </xsl:text>
+      <xsl:value-of select="name(parent::*)"/>
+    </xsl:if>
+    <xsl:text>, but no template matches.</xsl:text>
+  </xsl:message>
+  <fo:block color="red">
+    <xsl:text>&lt;</xsl:text>
+    <xsl:value-of select="name(.)"/>
+    <xsl:text>&gt;</xsl:text>
+    <xsl:apply-templates/> 
+    <xsl:text>&lt;/</xsl:text>
+    <xsl:value-of select="name(.)"/>
+    <xsl:text>&gt;</xsl:text>
+  </fo:block>
+</xsl:template>
+
+<!-- Update this list if new root elements supported -->
+<xsl:variable name="root.elements" select="' appendix article bibliography book chapter colophon dedication glossary index part preface refentry reference sect1 section set setindex '"/>
+
+<xsl:template match="/">
+  <xsl:choose>
+    <xsl:when test="function-available('exsl:node-set')
+                    and namespace-uri(*[1]) = 'http://docbook.org/docbook-ng'">
+      <!-- Hack! If someone hands us a DocBook NG document, toss the namespace -->
+      <!-- and continue. Someday we may reverse this logic and add the namespace -->
+      <!-- to documents that don't have one. But not before the whole stylesheet -->
+      <!-- has been converted to use namespaces. i.e., don't hold your breath -->
+      <xsl:variable name="nons">
+	<xsl:apply-templates mode="stripNS"/>
+      </xsl:variable>
+      <xsl:apply-templates select="exsl:node-set($nons)"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:variable name="document.element" select="*[1]"/>
+
+      <xsl:if test="not(contains($root.elements,
+	                         concat(' ', local-name($document.element), ' ')))">
+	<xsl:message terminate="yes">
+	  <xsl:text>ERROR: Document root element for FO output </xsl:text>
+	  <xsl:text>must be one of the following elements:</xsl:text>
+	  <xsl:value-of select="$root.elements"/>
+	</xsl:message>
+      </xsl:if>
+
+      <xsl:call-template name="root.messages"/>
+
+      <xsl:variable name="title">
+	<xsl:choose>
+	  <xsl:when test="$document.element/title[1]">
+	    <xsl:value-of select="$document.element/title[1]"/>
+	  </xsl:when>
+	  <xsl:otherwise>[could not find document title]</xsl:otherwise>
+	</xsl:choose>
+      </xsl:variable>
+      
+      <fo:root xsl:use-attribute-sets="root.properties">
+	<xsl:attribute name="language">
+	  <xsl:call-template name="l10n.language">
+	    <xsl:with-param name="target" select="/*[1]"/>
+	  </xsl:call-template>
+	</xsl:attribute>
+
+	<xsl:if test="$xep.extensions != 0">
+	  <xsl:call-template name="xep-document-information"/>
+	</xsl:if>
+	<xsl:if test="$axf.extensions != 0">
+	  <xsl:call-template name="axf-document-information"/>
+	</xsl:if>
+	<xsl:call-template name="setup.pagemasters"/>
+	<xsl:choose>
+	  <xsl:when test="$rootid != ''">
+	    <xsl:choose>
+	      <xsl:when test="count(key('id',$rootid)) = 0">
+		<xsl:message terminate="yes">
+		  <xsl:text>ID '</xsl:text>
+		  <xsl:value-of select="$rootid"/>
+		  <xsl:text>' not found in document.</xsl:text>
+		</xsl:message>
+	      </xsl:when>
+	      <xsl:otherwise>
+		<xsl:if test="$fop.extensions != 0">
+		  <xsl:apply-templates select="key('id',$rootid)" mode="fop.outline"/>
+		</xsl:if>
+		<xsl:if test="$xep.extensions != 0">
+		  <xsl:variable name="bookmarks">
+		    <xsl:apply-templates select="key('id',$rootid)" mode="xep.outline"/>
+		  </xsl:variable>
+		  <xsl:if test="string($bookmarks) != ''">
+		    <rx:outline xmlns:rx="http://www.renderx.com/XSL/Extensions">
+		      <xsl:copy-of select="$bookmarks"/>
+		    </rx:outline>
+		  </xsl:if>
+		</xsl:if>
+		<xsl:apply-templates select="key('id',$rootid)"/>
+	      </xsl:otherwise>
+	    </xsl:choose>
+	  </xsl:when>
+	  <xsl:otherwise>
+	    <xsl:if test="$fop.extensions != 0">
+	      <xsl:apply-templates mode="fop.outline"/>
+	    </xsl:if>
+	    <xsl:if test="$xep.extensions != 0">
+	      <xsl:variable name="bookmarks">
+		<xsl:apply-templates mode="xep.outline"/>
+	      </xsl:variable>
+	      <xsl:if test="string($bookmarks) != ''">
+		<rx:outline xmlns:rx="http://www.renderx.com/XSL/Extensions">
+		  <xsl:copy-of select="$bookmarks"/>
+		</rx:outline>
+	      </xsl:if>
+	    </xsl:if>
+	    <xsl:apply-templates/>
+	  </xsl:otherwise>
+	</xsl:choose>
+      </fo:root>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="root.messages">
+  <!-- redefine this any way you'd like to output messages -->
+  <!-- DO NOT OUTPUT ANYTHING FROM THIS TEMPLATE -->
+  <xsl:message>
+    <xsl:text>Making </xsl:text>
+    <xsl:value-of select="$page.orientation"/>
+    <xsl:text> pages on </xsl:text>
+    <xsl:value-of select="$paper.type"/>
+    <xsl:text> paper (</xsl:text>
+    <xsl:value-of select="$page.width"/>
+    <xsl:text>x</xsl:text>
+    <xsl:value-of select="$page.height"/>
+    <xsl:text>)</xsl:text>
+  </xsl:message>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="*" mode="stripNS">
+  <xsl:choose>
+    <xsl:when test="namespace-uri(.) = 'http://docbook.org/docbook-ng'">
+      <xsl:element name="{local-name(.)}">
+	<xsl:copy-of select="@*"/>
+	<xsl:apply-templates mode="stripNS"/>
+      </xsl:element>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:copy>
+	<xsl:copy-of select="@*"/>
+	<xsl:apply-templates mode="stripNS"/>
+      </xsl:copy>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="comment()|processing-instruction()|text()" mode="stripNS">
+  <xsl:copy/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/docbookng.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/docbookng.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/docbookng.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,8 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                version='1.0'>
+
+<xsl:template match="info"/>
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/ebnf.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/ebnf.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/ebnf.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,325 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+                exclude-result-prefixes="doc"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: ebnf.xsl,v 1.1.1.1 2004/10/19 21:21:42 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<doc:reference xmlns="">
+<referenceinfo>
+<releaseinfo role="meta">
+$Id: ebnf.xsl,v 1.1.1.1 2004/10/19 21:21:42 juntao Exp $
+</releaseinfo>
+<author><surname>Walsh</surname>
+<firstname>Norman</firstname></author>
+<copyright><year>1999</year><year>2000</year><year>2001</year>
+<holder>Norman Walsh</holder>
+</copyright>
+</referenceinfo>
+<title>HTML EBNF Reference</title>
+
+<partintro>
+<section><title>Introduction</title>
+
+<para>This is technical reference documentation for the DocBook XSL
+Stylesheets; it documents (some of) the parameters, templates, and
+other elements of the stylesheets.</para>
+
+<para>This reference describes the templates and parameters relevant
+to formatting EBNF markup.</para>
+
+<para>This is not intended to be <quote>user</quote> documentation.
+It is provided for developers writing customization layers for the
+stylesheets, and for anyone who's interested in <quote>how it
+works</quote>.</para>
+
+<para>Although I am trying to be thorough, this documentation is known
+to be incomplete. Don't forget to read the source, too :-)</para>
+</section>
+</partintro>
+</doc:reference>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="productionset">
+  <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="title">
+      <fo:block id="{$id}" xsl:use-attribute-sets="formal.object.properties">
+        <xsl:call-template name="formal.object.heading">
+          <xsl:with-param name="placement" select="'before'"/>
+        </xsl:call-template>
+
+        <fo:table table-layout="fixed" width="100%">
+          <fo:table-column column-number="1" column-width="3%"/>
+          <fo:table-column column-number="2" column-width="15%"/>
+          <fo:table-column column-number="3" column-width="5%"/>
+          <fo:table-column column-number="4" column-width="52%"/>
+          <fo:table-column column-number="5" column-width="25%"/>
+          <fo:table-body>
+            <xsl:apply-templates select="production|productionrecap"/>
+          </fo:table-body>
+        </fo:table>
+      </fo:block>
+    </xsl:when>
+    <xsl:otherwise>
+      <fo:table id="{$id}" table-layout="fixed" width="100%">
+        <fo:table-column column-number="1" column-width="3%"/>
+        <fo:table-column column-number="2" column-width="15%"/>
+        <fo:table-column column-number="3" column-width="5%"/>
+        <fo:table-column column-number="4" column-width="52%"/>
+        <fo:table-column column-number="5" column-width="25%"/>
+        <fo:table-body>
+          <xsl:apply-templates select="production|productionrecap"/>
+        </fo:table-body>
+      </fo:table>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="productionset/title">
+  <!-- suppressed -->
+</xsl:template>
+
+<xsl:template match="production">
+  <xsl:param name="recap" select="false()"/>
+  <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
+  <fo:table-row>
+    <fo:table-cell>
+      <fo:block text-align="start">
+        <xsl:text>[</xsl:text>
+        <xsl:number count="production" level="any"/>
+        <xsl:text>]</xsl:text>
+      </fo:block>
+    </fo:table-cell>
+    <fo:table-cell>
+      <fo:block text-align="end">
+        <xsl:choose>
+          <xsl:when test="$recap">
+            <fo:basic-link internal-destination="{$id}"
+                           xsl:use-attribute-sets="xref.properties">
+              <xsl:apply-templates select="lhs"/>
+            </fo:basic-link>
+          </xsl:when>
+          <xsl:otherwise>
+            <fo:wrapper id="{$id}">
+              <xsl:apply-templates select="lhs"/>
+            </fo:wrapper>
+          </xsl:otherwise>
+        </xsl:choose>
+      </fo:block>
+    </fo:table-cell>
+    <fo:table-cell>
+      <fo:block text-align="center">
+        <xsl:copy-of select="$ebnf.assignment"/>
+      </fo:block>
+    </fo:table-cell>
+    <fo:table-cell>
+      <fo:block>
+        <xsl:apply-templates select="rhs"/>
+        <xsl:copy-of select="$ebnf.statement.terminator"/>
+      </fo:block>
+    </fo:table-cell>
+    <fo:table-cell border-start-width="3pt">
+      <fo:block text-align="start">
+        <xsl:choose>
+          <xsl:when test="rhs/lineannotation|constraint">
+            <xsl:apply-templates select="rhs/lineannotation" mode="rhslo"/>
+            <xsl:apply-templates select="constraint"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:text>&#160;</xsl:text>
+          </xsl:otherwise>
+        </xsl:choose>
+      </fo:block>
+    </fo:table-cell>
+  </fo:table-row>
+</xsl:template>
+
+<xsl:template match="productionrecap">
+  <xsl:variable name="targets" select="key('id', at linkend)"/>
+  <xsl:variable name="target" select="$targets[1]"/>
+
+  <xsl:if test="count($targets)=0">
+    <xsl:message>
+      <xsl:text>Error: no ID for productionrecap linkend: </xsl:text>
+      <xsl:value-of select="@linkend"/>
+      <xsl:text>.</xsl:text>
+    </xsl:message>
+  </xsl:if>
+
+  <xsl:if test="count($targets)>1">
+    <xsl:message>
+      <xsl:text>Warning: multiple "IDs" for productionrecap linkend: </xsl:text>
+      <xsl:value-of select="@linkend"/>
+      <xsl:text>.</xsl:text>
+    </xsl:message>
+  </xsl:if>
+
+  <xsl:apply-templates select="$target">
+    <xsl:with-param name="recap" select="true()"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="lhs">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="rhs">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="nonterminal">
+  <xsl:variable name="linkend">
+    <xsl:call-template name="xpointer.idref">
+      <xsl:with-param name="xpointer" select="@def"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:call-template name="check.id.unique">
+    <xsl:with-param name="linkend" select="$linkend"/>
+  </xsl:call-template>
+
+  <xsl:call-template name="check.idref.targets">
+    <xsl:with-param name="linkend" select="$linkend"/>
+    <xsl:with-param name="element-list">production</xsl:with-param>
+  </xsl:call-template>
+
+  <!-- If you don't provide content, you can't point outside this doc. -->
+  <xsl:choose>
+    <xsl:when test="*|text()"><!--nop--></xsl:when>
+    <xsl:otherwise>
+      <xsl:if test="$linkend = ''">
+	<xsl:message>
+	  <xsl:text>Non-terminals with no content must point to </xsl:text>
+	  <xsl:text>production elements in the current document.</xsl:text>
+	</xsl:message>
+	<xsl:message>
+	  <xsl:text>Invalid xpointer for empty nt: </xsl:text>
+	  <xsl:value-of select="@def"/>
+	</xsl:message>
+      </xsl:if>
+    </xsl:otherwise>
+  </xsl:choose>
+
+  <xsl:variable name="href">
+    <xsl:choose>
+      <xsl:when test="$linkend != ''">
+	<xsl:variable name="targets" select="key('id',$linkend)"/>
+	<xsl:variable name="target" select="$targets[1]"/>
+        <xsl:call-template name="object.id">
+          <xsl:with-param name="object" select="$target"/>
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:otherwise>
+	<xsl:value-of select="@def"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <fo:basic-link internal-destination="{$href}"
+                 xsl:use-attribute-sets="xref.properties">
+    <xsl:choose>
+      <xsl:when test="*|text()">
+        <xsl:apply-templates/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:choose>
+          <xsl:when test="$linkend != ''">
+            <xsl:variable name="targets" select="key('id',$linkend)"/>
+            <xsl:variable name="target" select="$targets[1]"/>
+            <xsl:apply-templates select="$target/lhs"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:text>???</xsl:text>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:otherwise>
+    </xsl:choose>
+  </fo:basic-link>
+</xsl:template>
+
+<xsl:template match="rhs/lineannotation">
+  <!--nop-->
+</xsl:template>
+
+<xsl:template match="rhs/lineannotation" mode="rhslo">
+  <xsl:text>/*&#160;</xsl:text>
+  <xsl:apply-templates/>
+  <xsl:text>&#160;*/</xsl:text>
+</xsl:template>
+
+<xsl:template match="constraint">
+  <xsl:call-template name="check.id.unique">
+    <xsl:with-param name="linkend" select="@linkend"/>
+  </xsl:call-template>
+
+  <xsl:call-template name="check.idref.targets">
+    <xsl:with-param name="linkend" select="@linkend"/>
+    <xsl:with-param name="element-list">constraintdef</xsl:with-param>
+  </xsl:call-template>
+
+  <xsl:variable name="href">
+    <xsl:variable name="targets" select="key('id', at linkend)"/>
+    <xsl:variable name="target" select="$targets[1]"/>
+    <xsl:call-template name="object.id">
+      <xsl:with-param name="object" select="$target"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:if test="preceding-sibling::constraint">
+    <fo:inline linefeed-treatment="preserve">&#xA;</fo:inline>
+  </xsl:if>
+  <xsl:text>[&#160;</xsl:text>
+
+  <xsl:choose>
+    <xsl:when test="@role">
+      <xsl:value-of select="@role"/>
+      <xsl:text>: </xsl:text>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:variable name="targets" select="key('id', at linkend)"/>
+      <xsl:variable name="target" select="$targets[1]"/>
+      <xsl:if test="$target/@role">
+	<xsl:value-of select="$target/@role"/>
+	<xsl:text>: </xsl:text>
+      </xsl:if>
+    </xsl:otherwise>
+  </xsl:choose>
+
+  <fo:basic-link internal-destination="{$href}"
+                 xsl:use-attribute-sets="xref.properties">
+    <xsl:variable name="targets" select="key('id', at linkend)"/>
+    <xsl:variable name="target" select="$targets[1]"/>
+    <xsl:apply-templates select="$target" mode="title.markup"/>
+  </fo:basic-link>
+  <xsl:text>&#160;]</xsl:text>
+</xsl:template>
+
+<xsl:template match="constraintdef">
+  <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
+  <fo:block id="{$id}">
+    <xsl:apply-templates/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="constraintdef/title">
+  <fo:block font-weight="bold">
+    <xsl:apply-templates/>
+  </fo:block>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/fo-patch-for-fop.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/fo-patch-for-fop.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/fo-patch-for-fop.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,64 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                xmlns:fox="http://xml.apache.org/fop/extensions"
+                version="1.0">
+
+<!-- ********************************************************************
+     $Id: fo-patch-for-fop.xsl,v 1.1.1.1 2004/10/19 21:21:42 juntao Exp $
+     ********************************************************************
+
+     This file is part of the DocBook XSL Stylesheet distribution.
+     See ../README or http://docbook.sf.net/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<xsl:output method="xml"/>
+
+<xsl:template match="*">
+  <xsl:element name="{name(.)}">
+    <xsl:copy-of select="@*"/>
+    <xsl:apply-templates/>
+  </xsl:element>
+</xsl:template>
+
+<xsl:template match="fo:page-sequence
+                     |fo:single-page-master-reference
+                     |fo:repeatable-page-master-reference
+                     |fo:conditional-page-master-reference">
+  <xsl:element name="{name(.)}">
+    <xsl:for-each select="@*">
+      <xsl:choose>
+        <xsl:when test="name(.) = 'master-reference'">
+          <xsl:attribute name="master-name">
+            <xsl:value-of select="."/>
+          </xsl:attribute>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:attribute name="{name(.)}">
+            <xsl:value-of select="."/>
+          </xsl:attribute>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:for-each>
+    <xsl:apply-templates/>
+  </xsl:element>
+</xsl:template>
+
+<!-- a clever idea that doesn't quite work. fop 0.20.1 doesn't understand % -->
+<!-- and fop 0.20.2 doesn't work for me at all... -->
+<xsl:template match="fo:table-column">
+  <xsl:element name="{name(.)}">
+    <xsl:if test="not(@column-width)">
+      <xsl:attribute name="column-width">
+        <xsl:value-of select="100 div count(../fo:table-column)"/>
+        <xsl:text>%</xsl:text>
+      </xsl:attribute>
+    </xsl:if>
+    <xsl:copy-of select="@*"/>
+    <xsl:apply-templates/>
+  </xsl:element>
+</xsl:template>
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/fo-rtf.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/fo-rtf.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/fo-rtf.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,154 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                xmlns:exsl="http://exslt.org/common"
+                xmlns:set="http://exslt.org/sets"
+                exclude-result-prefixes="exsl set"
+                version="1.0">
+
+<!-- ********************************************************************
+     $Id: fo-rtf.xsl,v 1.1.1.1 2004/10/19 21:21:42 juntao Exp $
+     ********************************************************************
+
+     This file is part of the DocBook XSL Stylesheet distribution.
+     See ../README or http://docbook.sf.net/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- This module contains templates that match against FO nodes. It is used
+     to post-process result tree fragments for some sorts of cleanup.
+     These templates can only ever be fired by a processor that supports
+     exslt:node-set(). -->
+
+<!-- ==================================================================== -->
+
+<!-- insert.fo.fnum mode templates insert a particular RTF at the beginning
+     of the first paragraph in the primary RTF. In fact, they are inserting
+     a footnote-number, so we tinker a few other things too, like spacing and
+     font-sizes. -->
+
+<xsl:template match="/" mode="insert.fo.fnum">
+  <xsl:param name="mark" select="'?'"/>
+  <xsl:apply-templates mode="insert.fo.fnum">
+    <xsl:with-param name="mark" select="$mark"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="*" mode="insert.fo.fnum">
+  <xsl:param name="mark" select="'?'"/>
+  <xsl:copy>
+    <xsl:copy-of select="@*"/>
+    <xsl:apply-templates mode="insert.fo.fnum">
+      <xsl:with-param name="mark" select="$mark"/>
+    </xsl:apply-templates>
+  </xsl:copy>
+</xsl:template>
+
+<xsl:template match="fo:block" mode="insert.fo.fnum">
+  <xsl:param name="mark" select="'?'"/>
+  <xsl:copy>
+    <xsl:for-each select="@*">
+      <xsl:choose>
+        <xsl:when test="starts-with(name(.), 'space-before')"/>
+        <xsl:when test="starts-with(name(.), 'space-after')"/>
+        <xsl:when test="starts-with(name(.), 'font-size')"/>
+        <xsl:otherwise>
+          <xsl:copy-of select="."/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:for-each>
+    <xsl:if test="not(preceding::fo:block)">
+      <xsl:copy-of select="$mark"/>
+    </xsl:if>
+    <xsl:apply-templates mode="insert.fo.fnum">
+      <xsl:with-param name="mark" select="$mark"/>
+    </xsl:apply-templates>
+  </xsl:copy>
+</xsl:template>
+
+<xsl:template match="text()|processing-instruction()|comment()" mode="insert.fo.fnum">
+  <xsl:param name="mark" select="'?'"/>
+  <xsl:copy/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<!-- insert.fo.block mode templates insert a particular RTF at the beginning
+     of the first paragraph in the primary RTF. -->
+
+<xsl:template match="/" mode="insert.fo.block">
+  <xsl:param name="mark" select="'?'"/>
+  <xsl:apply-templates mode="insert.fo.block">
+    <xsl:with-param name="mark" select="$mark"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="*" mode="insert.fo.block">
+  <xsl:param name="mark" select="'?'"/>
+  <xsl:copy>
+    <xsl:copy-of select="@*"/>
+    <xsl:apply-templates mode="insert.fo.block">
+      <xsl:with-param name="mark" select="$mark"/>
+    </xsl:apply-templates>
+  </xsl:copy>
+</xsl:template>
+
+<xsl:template match="fo:block" mode="insert.fo.block">
+  <xsl:param name="mark" select="'?'"/>
+  <xsl:copy>
+    <xsl:copy-of select="@*"/>
+    <xsl:if test="not(preceding::fo:block)">
+      <xsl:copy-of select="$mark"/>
+    </xsl:if>
+    <xsl:apply-templates mode="insert.fo.block">
+      <xsl:with-param name="mark" select="$mark"/>
+    </xsl:apply-templates>
+  </xsl:copy>
+</xsl:template>
+
+<xsl:template match="text()|processing-instruction()|comment()" mode="insert.fo.block">
+  <xsl:param name="mark" select="'?'"/>
+  <xsl:copy/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<!-- insert.fo.text mode templates insert a particular RTF at the beginning
+     of the first text-node in the primary RTF. -->
+
+<xsl:template match="/" mode="insert.fo.text">
+  <xsl:param name="mark" select="'?'"/>
+  <xsl:apply-templates mode="insert.fo.text">
+    <xsl:with-param name="mark" select="$mark"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="*" mode="insert.fo.text">
+  <xsl:param name="mark" select="'?'"/>
+  <xsl:copy>
+    <xsl:copy-of select="@*"/>
+    <xsl:apply-templates mode="insert.fo.text">
+      <xsl:with-param name="mark" select="$mark"/>
+    </xsl:apply-templates>
+  </xsl:copy>
+</xsl:template>
+
+<xsl:template match="text()|processing-instruction()|comment()" mode="insert.fo.text">
+  <xsl:param name="mark" select="'?'"/>
+
+  <xsl:if test="not(preceding::text())">
+    <xsl:copy-of select="$mark"/>
+  </xsl:if>
+
+  <xsl:copy/>
+</xsl:template>
+
+<xsl:template match="processing-instruction()|comment()" mode="insert.fo.text">
+  <xsl:param name="mark" select="'?'"/>
+  <xsl:copy/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/fo.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/fo.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/fo.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,62 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: fo.xsl,v 1.1.1.1 2004/10/19 21:21:42 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<xsl:template name="anchor">
+  <xsl:param name="node" select="."/>
+  <xsl:param name="conditional" select="1"/>
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id">
+      <xsl:with-param name="object" select="$node"/>
+    </xsl:call-template>
+  </xsl:variable>
+  <xsl:if test="$conditional = 0 or $node/@id">
+    <xsl:attribute name="id"><xsl:value-of select="$id"/></xsl:attribute>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template name="dingbat">
+  <xsl:param name="dingbat">bullet</xsl:param>
+  <xsl:variable name="symbol">
+    <xsl:choose>
+      <xsl:when test="$dingbat='bullet'">o</xsl:when>
+      <xsl:when test="$dingbat='copyright'">&#x00A9;</xsl:when>
+      <xsl:when test="$dingbat='trademark'">&#x2122;</xsl:when>
+      <xsl:when test="$dingbat='trade'">&#x2122;</xsl:when>
+      <xsl:when test="$dingbat='registered'">&#x00AE;</xsl:when>
+      <xsl:when test="$dingbat='service'">(SM)</xsl:when>
+      <xsl:when test="$dingbat='ldquo'">"</xsl:when>
+      <xsl:when test="$dingbat='rdquo'">"</xsl:when>
+      <xsl:when test="$dingbat='lsquo'">'</xsl:when>
+      <xsl:when test="$dingbat='rsquo'">'</xsl:when>
+      <xsl:when test="$dingbat='em-dash'">--</xsl:when>
+      <xsl:when test="$dingbat='en-dash'">-</xsl:when>
+      <xsl:otherwise>o</xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="$dingbat.font.family = ''">
+      <xsl:copy-of select="$symbol"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <fo:inline font-family="{$dingbat.font.family}">
+        <xsl:copy-of select="$symbol"/>
+      </fo:inline>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+</xsl:stylesheet>
+

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/footnote.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/footnote.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/footnote.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,184 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                xmlns:exsl="http://exslt.org/common"
+                exclude-result-prefixes="exsl"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: footnote.xsl,v 1.1.1.1 2004/10/19 21:21:42 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<xsl:template name="format.footnote.mark">
+  <xsl:param name="mark" select="'?'"/>
+  <fo:inline font-size="90%">
+    <xsl:choose>
+      <xsl:when test="$fop.extensions != 0">
+        <xsl:attribute name="vertical-align">super</xsl:attribute>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:attribute name="baseline-shift">super</xsl:attribute>
+      </xsl:otherwise>
+    </xsl:choose>
+    <xsl:copy-of select="$mark"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="footnote">
+  <xsl:choose>
+    <xsl:when test="ancestor::tgroup">
+      <xsl:call-template name="format.footnote.mark">
+        <xsl:with-param name="mark">
+          <xsl:apply-templates select="." mode="footnote.number"/>
+        </xsl:with-param>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:otherwise>
+      <fo:footnote>
+        <fo:inline>
+          <xsl:call-template name="format.footnote.mark">
+            <xsl:with-param name="mark">
+              <xsl:apply-templates select="." mode="footnote.number"/>
+            </xsl:with-param>
+          </xsl:call-template>
+        </fo:inline>
+        <fo:footnote-body font-family="{$body.fontset}"
+                          font-size="{$footnote.font.size}"
+                          font-weight="normal"
+                          font-style="normal"
+                          margin-left="0pc">
+          <xsl:apply-templates/>
+        </fo:footnote-body>
+      </fo:footnote>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="footnoteref">
+  <xsl:variable name="footnote" select="key('id', at linkend)"/>
+  <xsl:call-template name="format.footnote.mark">
+    <xsl:with-param name="mark">
+      <xsl:apply-templates select="$footnote" mode="footnote.number"/>
+    </xsl:with-param>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="footnote" mode="footnote.number">
+  <xsl:choose>
+    <xsl:when test="ancestor::tgroup">
+      <xsl:variable name="tfnum">
+        <xsl:number level="any" from="table|informaltable" format="1"/>
+      </xsl:variable>
+
+      <xsl:choose>
+        <xsl:when test="string-length($table.footnote.number.symbols) &gt;= $tfnum">
+          <xsl:value-of select="substring($table.footnote.number.symbols, $tfnum, 1)"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:number level="any" from="tgroup"
+                      format="{$table.footnote.number.format}"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:variable name="pfoot" select="preceding::footnote"/>
+      <xsl:variable name="ptfoot" select="preceding::tgroup//footnote"/>
+      <xsl:variable name="fnum" select="count($pfoot) - count($ptfoot) + 1"/>
+
+      <xsl:choose>
+        <xsl:when test="string-length($footnote.number.symbols) &gt;= $fnum">
+          <xsl:value-of select="substring($footnote.number.symbols, $fnum, 1)"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:number value="$fnum" format="{$footnote.number.format}"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="*" mode="footnote.body.number">
+  <xsl:variable name="footnote.mark">
+    <xsl:call-template name="format.footnote.mark">
+      <xsl:with-param name="mark">
+        <xsl:apply-templates select="ancestor::footnote" mode="footnote.number"/>
+      </xsl:with-param>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="fo">
+    <xsl:apply-templates select="."/>
+  </xsl:variable>
+
+  <xsl:variable name="fo-nodes" select="exsl:node-set($fo)"/>
+
+  <xsl:choose>
+    <xsl:when test="$fo-nodes//fo:block">
+      <xsl:apply-templates select="$fo-nodes" mode="insert.fo.fnum">
+        <xsl:with-param name="mark" select="$footnote.mark"/>
+      </xsl:apply-templates>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:apply-templates select="$fo-nodes" mode="insert.fo.text">
+        <xsl:with-param name="mark" select="$footnote.mark"/>
+      </xsl:apply-templates>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="footnote/para[1]
+                     |footnote/simpara[1]
+                     |footnote/formalpara[1]"
+              priority="2">
+  <!-- this only works if the first thing in a footnote is a para, -->
+  <!-- which is ok, because it usually is. -->
+  <fo:block>
+    <xsl:call-template name="format.footnote.mark">
+      <xsl:with-param name="mark">
+        <xsl:apply-templates select="ancestor::footnote" mode="footnote.number"/>
+      </xsl:with-param>
+    </xsl:call-template>
+    <xsl:apply-templates/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="footnote" name="process.footnote" mode="table.footnote.mode">
+  <xsl:choose>
+    <xsl:when test="local-name(*[1]) = 'para' or local-name(*[1]) = 'simpara'">
+      <fo:block>
+        <xsl:apply-templates/>
+      </fo:block>
+    </xsl:when>
+
+    <xsl:when test="function-available('exsl:node-set')">
+      <fo:block>
+        <xsl:apply-templates select="*[1]" mode="footnote.body.number"/>
+        <xsl:apply-templates select="*[position() &gt; 1]"/>
+      </fo:block>
+    </xsl:when>
+
+    <xsl:otherwise>
+      <xsl:message>
+        <xsl:text>Warning: footnote number may not be generated </xsl:text>
+        <xsl:text>correctly; </xsl:text>
+        <xsl:value-of select="local-name(*[1])"/>
+        <xsl:text> unexpected as first child of footnote.</xsl:text>
+      </xsl:message>
+      <fo:block>
+        <xsl:apply-templates/>
+      </fo:block>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/fop.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/fop.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/fop.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,85 @@
+<?xml version='1.0' encoding="utf-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                xmlns:fox="http://xml.apache.org/fop/extensions"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: fop.xsl,v 1.1.1.1 2004/10/19 21:21:42 juntao Exp $
+     ********************************************************************
+     (c) Stephane Bline Peregrine Systems 2001
+     Driver file to allow pdf bookmarking (based on fop implementation).
+     ******************************************************************** -->
+<!--
+In PDF bookmarks can't be used characters with code>255. This version of file
+translates characters with code>255 back to ASCII.
+
+   Pavel Zampach (zampach at volny.cz)
+-->
+
+<xsl:variable name="a-dia" select=
+"'&#257;&#259;&#261;&#263;&#265;&#267;&#269;&#271;&#273;&#275;&#277;&#279;&#281;&#283;&#339;&#285;&#287;&#289;&#291;&#293;&#295;&#297;&#299;&#301;&#303;&#305;&#309;&#311;&#314;&#316;&#318;&#320;&#322;&#324;&#326;&#328;&#331;&#333;&#335;&#337;&#341;&#343;&#345;&#347;&#349;&#351;&#353;&#355;&#357;&#359;&#361;&#363;&#365;&#367;&#369;&#371;&#373;&#375;&#378;&#380;&#382;&#256;&#258;&#260;&#262;&#264;&#266;&#268;&#270;&#272;&#274;&#276;&#278;&#280;&#282;&#338;&#284;&#286;&#288;&#290;&#292;&#294;&#296;&#298;&#300;&#302;&#304;&#308;&#310;&#313;&#315;&#317;&#319;&#321;&#323;&#325;&#327;&#330;&#332;&#334;&#336;&#340;&#342;&#344;&#346;&#348;&#350;&#352;&#354;&#356;&#358;&#360;&#362;&#364;&#366;&#368;&#370;&#372;&#374;&#376;&#377;&#379;&#381;'"/>
+<xsl:variable name="a-asc" select=
+"'aaaccccddeeeeeegggghhiiiiijklllllnnnnooorrrsssstttuuuuuuwyzzzAAACCCCDDEEEEEEGGGGHHIIIIIJKLLLLLNNNNOOORRRSSSSTTTUUUUUUWYYZZZ'"/>
+
+<xsl:template match="*" mode="fop.outline">
+  <xsl:apply-templates select="*" mode="fop.outline"/>
+</xsl:template>
+
+<xsl:template match="set|book|part|reference|preface|chapter|appendix|article
+                     |glossary|bibliography|index|setindex
+                     |refentry
+                     |sect1|sect2|sect3|sect4|sect5|section"
+              mode="fop.outline">
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+  <xsl:variable name="bookmark-label">
+    <xsl:apply-templates select="." mode="object.title.markup"/>
+  </xsl:variable>
+
+  <!-- Put the root element bookmark at the same level as its children -->
+  <!-- If the object is a set or book, generate a bookmark for the toc -->
+
+  <xsl:choose>
+    <xsl:when test="parent::*">
+      <fox:outline internal-destination="{$id}">
+        <fox:label>
+          <xsl:value-of select="normalize-space(translate($bookmark-label, $a-dia, $a-asc))"/>
+        </fox:label>
+        <xsl:apply-templates select="*" mode="fop.outline"/>
+      </fox:outline>
+    </xsl:when>
+    <xsl:otherwise>
+      <fox:outline internal-destination="{$id}">
+        <fox:label>
+          <xsl:value-of select="normalize-space(translate($bookmark-label, $a-dia, $a-asc))"/>
+        </fox:label>
+      </fox:outline>
+
+      <xsl:variable name="toc.params">
+        <xsl:call-template name="find.path.params">
+          <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
+        </xsl:call-template>
+      </xsl:variable>
+
+      <xsl:if test="contains($toc.params, 'toc')
+                    and (book|part|reference|preface|chapter|appendix|article
+                         |glossary|bibliography|index|setindex
+                         |refentry
+                         |sect1|sect2|sect3|sect4|sect5|section)">
+        <fox:outline internal-destination="toc...{$id}">
+          <fox:label>
+            <xsl:call-template name="gentext">
+              <xsl:with-param name="key" select="'TableofContents'"/>
+            </xsl:call-template>
+          </fox:label>
+        </fox:outline>
+      </xsl:if>
+      <xsl:apply-templates select="*" mode="fop.outline"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+</xsl:stylesheet>
+

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/formal.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/formal.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/formal.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,713 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: formal.xsl,v 1.1.1.1 2004/10/19 21:21:43 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<xsl:template name="formal.object">
+  <xsl:param name="placement" select="'before'"/>
+
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <xsl:variable name="content">
+    <xsl:if test="$placement = 'before'">
+      <xsl:call-template name="formal.object.heading">
+        <xsl:with-param name="placement" select="$placement"/>
+      </xsl:call-template>
+    </xsl:if>
+    <xsl:apply-templates/>
+    <xsl:if test="$placement != 'before'">
+      <xsl:call-template name="formal.object.heading">
+        <xsl:with-param name="placement" select="$placement"/>
+      </xsl:call-template>
+    </xsl:if>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="self::figure">
+      <fo:block id="{$id}"
+                xsl:use-attribute-sets="figure.properties">
+        <xsl:copy-of select="$content"/>
+      </fo:block>
+    </xsl:when>
+    <xsl:when test="self::example">
+      <fo:block id="{$id}"
+                xsl:use-attribute-sets="example.properties">
+        <xsl:copy-of select="$content"/>
+      </fo:block>
+    </xsl:when>
+    <xsl:when test="self::equation">
+      <fo:block id="{$id}"
+                xsl:use-attribute-sets="equation.properties">
+        <xsl:copy-of select="$content"/>
+      </fo:block>
+    </xsl:when>
+    <xsl:when test="self::table">
+      <fo:block id="{$id}"
+                xsl:use-attribute-sets="table.properties">
+        <xsl:copy-of select="$content"/>
+      </fo:block>
+    </xsl:when>
+    <xsl:when test="self::procedure">
+      <fo:block id="{$id}"
+                xsl:use-attribute-sets="procedure.properties">
+        <xsl:copy-of select="$content"/>
+      </fo:block>
+    </xsl:when>
+    <xsl:otherwise>
+      <fo:block id="{$id}"
+                xsl:use-attribute-sets="formal.object.properties">
+        <xsl:copy-of select="$content"/>
+      </fo:block>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="formal.object.heading">
+  <xsl:param name="object" select="."/>
+  <xsl:param name="placement" select="'before'"/>
+
+  <fo:block xsl:use-attribute-sets="formal.title.properties">
+    <xsl:choose>
+      <xsl:when test="$placement = 'before'">
+        <xsl:attribute
+               name="keep-with-next.within-column">always</xsl:attribute>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:attribute
+               name="keep-with-previous.within-column">always</xsl:attribute>
+      </xsl:otherwise>
+    </xsl:choose>
+    <xsl:apply-templates select="$object" mode="object.title.markup">
+      <xsl:with-param name="allow-anchors" select="1"/>
+    </xsl:apply-templates>
+  </fo:block>
+</xsl:template>
+
+<xsl:template name="informal.object">
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="local-name(.) = 'equation' or 
+                    local-name(.) = 'informalequation'">
+      <fo:block id="{$id}"
+                xsl:use-attribute-sets="equation.properties">
+        <xsl:apply-templates/>
+      </fo:block>
+    </xsl:when>
+    <xsl:when test="local-name(.) = 'procedure'">
+      <fo:block id="{$id}"
+                xsl:use-attribute-sets="procedure.properties">
+        <xsl:apply-templates/>
+      </fo:block>
+    </xsl:when>
+    <xsl:otherwise>
+      <fo:block id="{$id}">
+        <xsl:apply-templates/>
+      </fo:block>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="semiformal.object">
+  <xsl:param name="placement" select="'before'"/>
+  <xsl:choose>
+    <xsl:when test="./title">
+      <xsl:call-template name="formal.object">
+        <xsl:with-param name="placement" select="$placement"/>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:call-template name="informal.object"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="figure">
+  <xsl:variable name="param.placement"
+                select="substring-after(normalize-space($formal.title.placement),
+                                        concat(local-name(.), ' '))"/>
+
+  <xsl:variable name="placement">
+    <xsl:choose>
+      <xsl:when test="contains($param.placement, ' ')">
+        <xsl:value-of select="substring-before($param.placement, ' ')"/>
+      </xsl:when>
+      <xsl:when test="$param.placement = ''">before</xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$param.placement"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <!-- Get align value from internal mediaobject -->
+  <xsl:variable name="align">
+    <xsl:if test="mediaobject|mediaobjectco|screenshot|graphic|graphicco">
+      <xsl:variable name="olist" select="mediaobject/imageobject
+                                         |mediaobject/imageobjectco
+                                         |mediaobject/videoobject
+                                         |mediaobject/audioobject
+                                         |mediaobject/textobject
+
+                                         |mediaobjectco/imageobject
+                                         |mediaobjectco/imageobjectco
+                                         |mediaobjectco/videoobject
+                                         |mediaobjectco/audioobject
+                                         |mediaobjectco/textobject
+
+                                         |screenshot/mediaobject/imageobject
+                                         |screenshot/mediaobject/imageobjectco
+                                         |screenshot/mediaobject/videoobject
+                                         |screenshot/mediaobject/audioobject
+                                         |screenshot/mediaobject/textobject
+
+                                         |screenshot/mediaobjectco/imageobject
+                                         |screenshot/mediaobjectco/imageobjectco
+                                         |screenshot/mediaobjectco/videoobject
+                                         |screenshot/mediaobjectco/audioobject
+                                         |screenshot/mediaobjectco/textobject
+
+                                         |graphic
+                                         |graphicco/graphic
+                                         |screenshot/graphic
+                                         |screenshot/graphicco/graphic"/>
+
+      <xsl:variable name="object.index">
+        <xsl:call-template name="select.mediaobject.index">
+          <xsl:with-param name="olist" select="$olist"/>
+          <xsl:with-param name="count" select="1"/>
+        </xsl:call-template>
+      </xsl:variable>
+
+      <xsl:variable name="object" select="$olist[position() = $object.index]"/>
+
+      <xsl:value-of select="$object/imagedata[@align][1]/@align"/>
+    </xsl:if>
+  </xsl:variable>
+
+
+  <xsl:variable name="figure">
+    <xsl:choose>
+      <xsl:when test="$align != ''">
+        <fo:block>
+          <xsl:attribute name="text-align">
+            <xsl:value-of select="$align"/>
+          </xsl:attribute>
+          <xsl:call-template name="formal.object">
+            <xsl:with-param name="placement" select="$placement"/>
+          </xsl:call-template>
+        </fo:block>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:call-template name="formal.object">
+          <xsl:with-param name="placement" select="$placement"/>
+        </xsl:call-template>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="@float and @float != '0'">
+      <fo:float>
+        <xsl:attribute name="float">
+          <xsl:choose>
+            <xsl:when test="@float = '1'">
+              <xsl:value-of select="$default.float.class"/>
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:value-of select="@float"/>
+            </xsl:otherwise>
+          </xsl:choose>
+        </xsl:attribute>
+        <xsl:copy-of select="$figure"/>
+      </fo:float>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:copy-of select="$figure"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="example">
+  <xsl:variable name="param.placement"
+                select="substring-after(normalize-space($formal.title.placement),
+                                        concat(local-name(.), ' '))"/>
+
+  <xsl:variable name="placement">
+    <xsl:choose>
+      <xsl:when test="contains($param.placement, ' ')">
+        <xsl:value-of select="substring-before($param.placement, ' ')"/>
+      </xsl:when>
+      <xsl:when test="$param.placement = ''">before</xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$param.placement"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <!-- Get align value from internal mediaobject -->
+  <xsl:variable name="align">
+    <xsl:if test="mediaobject">
+      <xsl:variable name="olist" select="mediaobject/imageobject
+                     |mediaobject/imageobjectco
+                     |mediaobject/videoobject
+                     |mediaobject/audioobject
+		     |mediaobject/textobject"/>
+
+      <xsl:variable name="object.index">
+        <xsl:call-template name="select.mediaobject.index">
+          <xsl:with-param name="olist" select="$olist"/>
+          <xsl:with-param name="count" select="1"/>
+        </xsl:call-template>
+      </xsl:variable>
+
+      <xsl:variable name="object" select="$olist[position() = $object.index]"/>
+
+      <xsl:value-of select="$object/imagedata[@align][1]/@align"/>
+    </xsl:if>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="$align != ''">
+      <fo:block>
+	  <xsl:attribute name="text-align">
+	    <xsl:value-of select="$align"/>
+	  </xsl:attribute>
+        <xsl:call-template name="formal.object">
+          <xsl:with-param name="placement" select="$placement"/>
+        </xsl:call-template>
+      </fo:block>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:call-template name="formal.object">
+        <xsl:with-param name="placement" select="$placement"/>
+      </xsl:call-template>
+    </xsl:otherwise>
+  </xsl:choose>
+
+</xsl:template>
+
+<xsl:template name="table.frame">
+  <xsl:variable name="frame">
+    <xsl:choose>
+      <xsl:when test="../@frame">
+        <xsl:value-of select="../@frame"/>
+      </xsl:when>
+      <xsl:otherwise>all</xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="$frame='all'">
+      <xsl:attribute name="border-left-style">
+        <xsl:value-of select="$table.frame.border.style"/>
+      </xsl:attribute>
+      <xsl:attribute name="border-right-style">
+        <xsl:value-of select="$table.frame.border.style"/>
+      </xsl:attribute>
+      <xsl:attribute name="border-top-style">
+        <xsl:value-of select="$table.frame.border.style"/>
+      </xsl:attribute>
+      <xsl:attribute name="border-bottom-style">
+        <xsl:value-of select="$table.frame.border.style"/>
+      </xsl:attribute>
+      <xsl:attribute name="border-left-width">
+        <xsl:value-of select="$table.frame.border.thickness"/>
+      </xsl:attribute>
+      <xsl:attribute name="border-right-width">
+        <xsl:value-of select="$table.frame.border.thickness"/>
+      </xsl:attribute>
+      <xsl:attribute name="border-top-width">
+        <xsl:value-of select="$table.frame.border.thickness"/>
+      </xsl:attribute>
+      <xsl:attribute name="border-bottom-width">
+        <xsl:value-of select="$table.frame.border.thickness"/>
+      </xsl:attribute>
+      <xsl:attribute name="border-left-color">
+        <xsl:value-of select="$table.frame.border.color"/>
+      </xsl:attribute>
+      <xsl:attribute name="border-right-color">
+        <xsl:value-of select="$table.frame.border.color"/>
+      </xsl:attribute>
+      <xsl:attribute name="border-top-color">
+        <xsl:value-of select="$table.frame.border.color"/>
+      </xsl:attribute>
+      <xsl:attribute name="border-bottom-color">
+        <xsl:value-of select="$table.frame.border.color"/>
+      </xsl:attribute>
+    </xsl:when>
+    <xsl:when test="$frame='bottom'">
+      <xsl:attribute name="border-left-style">none</xsl:attribute>
+      <xsl:attribute name="border-right-style">none</xsl:attribute>
+      <xsl:attribute name="border-top-style">none</xsl:attribute>
+      <xsl:attribute name="border-bottom-style">
+        <xsl:value-of select="$table.frame.border.style"/>
+      </xsl:attribute>
+      <xsl:attribute name="border-bottom-width">
+        <xsl:value-of select="$table.frame.border.thickness"/>
+      </xsl:attribute>
+      <xsl:attribute name="border-bottom-color">
+        <xsl:value-of select="$table.frame.border.color"/>
+      </xsl:attribute>
+    </xsl:when>
+    <xsl:when test="$frame='sides'">
+      <xsl:attribute name="border-left-style">
+        <xsl:value-of select="$table.frame.border.style"/>
+      </xsl:attribute>
+      <xsl:attribute name="border-right-style">
+        <xsl:value-of select="$table.frame.border.style"/>
+      </xsl:attribute>
+      <xsl:attribute name="border-top-style">none</xsl:attribute>
+      <xsl:attribute name="border-bottom-style">none</xsl:attribute>
+      <xsl:attribute name="border-left-width">
+        <xsl:value-of select="$table.frame.border.thickness"/>
+      </xsl:attribute>
+      <xsl:attribute name="border-right-width">
+        <xsl:value-of select="$table.frame.border.thickness"/>
+      </xsl:attribute>
+      <xsl:attribute name="border-left-color">
+        <xsl:value-of select="$table.frame.border.color"/>
+      </xsl:attribute>
+      <xsl:attribute name="border-right-color">
+        <xsl:value-of select="$table.frame.border.color"/>
+      </xsl:attribute>
+    </xsl:when>
+    <xsl:when test="$frame='top'">
+      <xsl:attribute name="border-left-style">none</xsl:attribute>
+      <xsl:attribute name="border-right-style">none</xsl:attribute>
+      <xsl:attribute name="border-top-style">
+        <xsl:value-of select="$table.frame.border.style"/>
+      </xsl:attribute>
+      <xsl:attribute name="border-bottom-style">none</xsl:attribute>
+      <xsl:attribute name="border-top-width">
+        <xsl:value-of select="$table.frame.border.thickness"/>
+      </xsl:attribute>
+      <xsl:attribute name="border-top-color">
+        <xsl:value-of select="$table.frame.border.color"/>
+      </xsl:attribute>
+    </xsl:when>
+    <xsl:when test="$frame='topbot'">
+      <xsl:attribute name="border-left-style">none</xsl:attribute>
+      <xsl:attribute name="border-right-style">none</xsl:attribute>
+      <xsl:attribute name="border-top-style">
+        <xsl:value-of select="$table.frame.border.style"/>
+      </xsl:attribute>
+      <xsl:attribute name="border-bottom-style">
+        <xsl:value-of select="$table.frame.border.style"/>
+      </xsl:attribute>
+      <xsl:attribute name="border-top-width">
+        <xsl:value-of select="$table.frame.border.thickness"/>
+      </xsl:attribute>
+      <xsl:attribute name="border-bottom-width">
+        <xsl:value-of select="$table.frame.border.thickness"/>
+      </xsl:attribute>
+      <xsl:attribute name="border-top-color">
+        <xsl:value-of select="$table.frame.border.color"/>
+      </xsl:attribute>
+      <xsl:attribute name="border-bottom-color">
+        <xsl:value-of select="$table.frame.border.color"/>
+      </xsl:attribute>
+    </xsl:when>
+    <xsl:when test="$frame='none'">
+      <xsl:attribute name="border-left-style">none</xsl:attribute>
+      <xsl:attribute name="border-right-style">none</xsl:attribute>
+      <xsl:attribute name="border-top-style">none</xsl:attribute>
+      <xsl:attribute name="border-bottom-style">none</xsl:attribute>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:message>
+        <xsl:text>Impossible frame on table: </xsl:text>
+        <xsl:value-of select="$frame"/>
+      </xsl:message>
+      <xsl:attribute name="border-left-style">none</xsl:attribute>
+      <xsl:attribute name="border-right-style">none</xsl:attribute>
+      <xsl:attribute name="border-top-style">none</xsl:attribute>
+      <xsl:attribute name="border-bottom-style">none</xsl:attribute>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="table">
+  <xsl:choose>
+    <xsl:when test="tgroup|mediaobject|graphic">
+      <xsl:call-template name="calsTable"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:apply-templates select="." mode="htmlTable"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="calsTable">
+  <xsl:if test="tgroup/tbody/tr
+                |tgroup/thead/tr
+                |tgroup/tfoot/tr">
+    <xsl:message terminate="yes">Broken table: tr descendent of CALS Table.</xsl:message>
+  </xsl:if>
+
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <xsl:variable name="param.placement"
+                select="substring-after(normalize-space($formal.title.placement),
+                                        concat(local-name(.), ' '))"/>
+
+  <xsl:variable name="placement">
+    <xsl:choose>
+      <xsl:when test="contains($param.placement, ' ')">
+        <xsl:value-of select="substring-before($param.placement, ' ')"/>
+      </xsl:when>
+      <xsl:when test="$param.placement = ''">before</xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$param.placement"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:variable name="table.content">
+    <fo:block id="{$id}"
+              xsl:use-attribute-sets="table.properties">
+
+      <xsl:if test="$placement = 'before'">
+        <xsl:call-template name="formal.object.heading">
+          <xsl:with-param name="placement" select="$placement"/>
+        </xsl:call-template>
+      </xsl:if>
+
+      <xsl:for-each select="tgroup">
+        <xsl:variable name="prop-columns"
+                      select=".//colspec[contains(@colwidth, '*')]"/>
+        <fo:table xsl:use-attribute-sets="table.table.properties">
+          <xsl:call-template name="table.frame"/>
+          <xsl:if test="following-sibling::tgroup">
+            <xsl:attribute name="border-bottom-width">0pt</xsl:attribute>
+            <xsl:attribute name="border-bottom-style">none</xsl:attribute>
+            <xsl:attribute name="padding-bottom">0pt</xsl:attribute>
+            <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
+            <xsl:attribute name="space-after">0pt</xsl:attribute>
+            <xsl:attribute name="space-after.minimum">0pt</xsl:attribute>
+            <xsl:attribute name="space-after.optimum">0pt</xsl:attribute>
+            <xsl:attribute name="space-after.maximum">0pt</xsl:attribute>
+          </xsl:if>
+          <xsl:if test="preceding-sibling::tgroup">
+            <xsl:attribute name="border-top-width">0pt</xsl:attribute>
+            <xsl:attribute name="border-top-style">none</xsl:attribute>
+            <xsl:attribute name="padding-top">0pt</xsl:attribute>
+            <xsl:attribute name="margin-top">0pt</xsl:attribute>
+            <xsl:attribute name="space-before">0pt</xsl:attribute>
+            <xsl:attribute name="space-before.minimum">0pt</xsl:attribute>
+            <xsl:attribute name="space-before.optimum">0pt</xsl:attribute>
+            <xsl:attribute name="space-before.maximum">0pt</xsl:attribute>
+          </xsl:if>
+          <xsl:if test="count($prop-columns) != 0">
+            <xsl:attribute name="table-layout">fixed</xsl:attribute>
+          </xsl:if>
+          <xsl:apply-templates select="."/>
+        </fo:table>
+      </xsl:for-each>
+
+      <xsl:if test="$placement != 'before'">
+        <xsl:call-template name="formal.object.heading">
+          <xsl:with-param name="placement" select="$placement"/>
+        </xsl:call-template>
+      </xsl:if>
+    </fo:block>
+  </xsl:variable>
+
+  <xsl:variable name="footnotes">
+    <xsl:if test="tgroup//footnote">
+      <fo:block font-family="{$body.fontset}"
+                font-size="{$footnote.font.size}"
+                keep-with-previous="always">
+        <xsl:apply-templates select="tgroup//footnote" mode="table.footnote.mode"/>
+      </fo:block>
+    </xsl:if>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="@orient='land'">
+      <fo:block-container reference-orientation="90">
+        <fo:block>
+	  <!-- Such spans won't work in most FO processors since it does
+	       not follow the XSL spec, which says it must appear on
+	       an element that is a direct child of fo:flow.
+	       Some processors relax that requirement, however. -->
+          <xsl:attribute name="span">
+            <xsl:choose>
+              <xsl:when test="@pgwide=1">all</xsl:when>
+              <xsl:otherwise>none</xsl:otherwise>
+            </xsl:choose>
+          </xsl:attribute>
+          <xsl:copy-of select="$table.content"/>
+          <xsl:copy-of select="$footnotes"/>
+        </fo:block>
+      </fo:block-container>
+    </xsl:when>
+    <xsl:otherwise>
+      <fo:block>
+        <xsl:attribute name="span">
+          <xsl:choose>
+            <xsl:when test="@pgwide=1">all</xsl:when>
+            <xsl:otherwise>none</xsl:otherwise>
+          </xsl:choose>
+        </xsl:attribute>
+        <xsl:copy-of select="$table.content"/>
+        <xsl:copy-of select="$footnotes"/>
+      </fo:block>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="equation">
+  <xsl:variable name="param.placement"
+                select="substring-after(normalize-space($formal.title.placement),
+                                        concat(local-name(.), ' '))"/>
+
+  <xsl:variable name="placement">
+    <xsl:choose>
+      <xsl:when test="contains($param.placement, ' ')">
+        <xsl:value-of select="substring-before($param.placement, ' ')"/>
+      </xsl:when>
+      <xsl:when test="$param.placement = ''">before</xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$param.placement"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:call-template name="semiformal.object">
+    <xsl:with-param name="placement" select="$placement"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="figure/title"></xsl:template>
+<xsl:template match="figure/titleabbrev"></xsl:template>
+<xsl:template match="table/title"></xsl:template>
+<xsl:template match="table/titleabbrev"></xsl:template>
+<xsl:template match="table/textobject"></xsl:template>
+<xsl:template match="example/title"></xsl:template>
+<xsl:template match="example/titleabbrev"></xsl:template>
+<xsl:template match="equation/title"></xsl:template>
+<xsl:template match="equation/titleabbrev"></xsl:template>
+
+<xsl:template match="informalfigure">
+  <xsl:call-template name="informal.object"/>
+</xsl:template>
+
+<xsl:template match="informalexample">
+  <xsl:call-template name="informal.object"/>
+</xsl:template>
+
+<xsl:template match="informaltable">
+  <xsl:choose>
+    <xsl:when test="tgroup|mediaobject|graphic">
+      <xsl:call-template name="informalCalsTable"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:apply-templates select="." mode="htmlTable"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="informalCalsTable">
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <xsl:variable name="table.content">
+    <xsl:for-each select="tgroup">
+      <xsl:variable name="prop-columns"
+                    select=".//colspec[contains(@colwidth, '*')]"/>
+      <fo:block xsl:use-attribute-sets="informal.object.properties">
+	<fo:table xsl:use-attribute-sets="table.table.properties">
+	  <xsl:call-template name="table.frame"/>
+	  <xsl:if test="following-sibling::tgroup">
+	    <xsl:attribute name="border-bottom-width">0pt</xsl:attribute>
+	    <xsl:attribute name="border-bottom-style">none</xsl:attribute>
+	    <xsl:attribute name="padding-bottom">0pt</xsl:attribute>
+	    <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
+	    <xsl:attribute name="space-after">0pt</xsl:attribute>
+	    <xsl:attribute name="space-after.minimum">0pt</xsl:attribute>
+	    <xsl:attribute name="space-after.optimum">0pt</xsl:attribute>
+	    <xsl:attribute name="space-after.maximum">0pt</xsl:attribute>
+	  </xsl:if>
+	  <xsl:if test="preceding-sibling::tgroup">
+	    <xsl:attribute name="border-top-width">0pt</xsl:attribute>
+	    <xsl:attribute name="border-top-style">none</xsl:attribute>
+	    <xsl:attribute name="padding-top">0pt</xsl:attribute>
+	    <xsl:attribute name="margin-top">0pt</xsl:attribute>
+	    <xsl:attribute name="space-before">0pt</xsl:attribute>
+	    <xsl:attribute name="space-before.minimum">0pt</xsl:attribute>
+	    <xsl:attribute name="space-before.optimum">0pt</xsl:attribute>
+	    <xsl:attribute name="space-before.maximum">0pt</xsl:attribute>
+	  </xsl:if>
+	  <xsl:if test="count($prop-columns) != 0">
+	    <xsl:attribute name="table-layout">fixed</xsl:attribute>
+	  </xsl:if>
+	  <xsl:apply-templates select="."/>
+	</fo:table>
+      </fo:block>
+    </xsl:for-each>
+  </xsl:variable>
+
+  <xsl:variable name="footnotes">
+    <xsl:if test="tgroup//footnote">
+      <fo:block font-family="{$body.fontset}"
+                font-size="{$footnote.font.size}"
+                keep-with-previous="always">
+        <xsl:apply-templates select="tgroup//footnote" mode="table.footnote.mode"/>
+      </fo:block>
+    </xsl:if>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="@orient='land'">
+      <fo:block-container reference-orientation="90">
+        <fo:block id="{$id}">
+          <xsl:attribute name="span">
+            <xsl:choose>
+              <xsl:when test="@pgwide=1">all</xsl:when>
+              <xsl:otherwise>none</xsl:otherwise>
+            </xsl:choose>
+          </xsl:attribute>
+          <xsl:copy-of select="$table.content"/>
+          <xsl:copy-of select="$footnotes"/>
+        </fo:block>
+      </fo:block-container>
+    </xsl:when>
+    <xsl:otherwise>
+      <fo:block id="{$id}">
+        <xsl:attribute name="span">
+          <xsl:choose>
+            <xsl:when test="@pgwide=1">all</xsl:when>
+            <xsl:otherwise>none</xsl:otherwise>
+          </xsl:choose>
+        </xsl:attribute>
+        <xsl:copy-of select="$table.content"/>
+        <xsl:copy-of select="$footnotes"/>
+      </fo:block>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="informaltable/textobject"></xsl:template>
+
+<xsl:template match="informalequation">
+  <xsl:call-template name="informal.object"/>
+</xsl:template>
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/glossary.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/glossary.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/glossary.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,862 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: glossary.xsl,v 1.1.1.1 2004/10/19 21:21:43 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:template match="glossary">
+  <xsl:call-template name="make-glossary"/>
+</xsl:template>
+
+<xsl:template match="glossdiv/title"/>
+<xsl:template match="glossdiv/subtitle"/>
+<xsl:template match="glossdiv/titleabbrev"/>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="make-glossary">
+  <xsl:param name="divs" select="glossdiv"/>
+  <xsl:param name="entries" select="glossentry"/>
+  <xsl:param name="preamble" select="*[not(self::title
+                                           or self::subtitle
+                                           or self::glossdiv
+                                           or self::glossentry)]"/>
+
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <xsl:variable name="presentation">
+    <xsl:call-template name="dbfo-attribute">
+      <xsl:with-param name="pis"
+                      select="processing-instruction('dbfo')"/>
+      <xsl:with-param name="attribute" select="'glossary-presentation'"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="term-width">
+    <xsl:call-template name="dbfo-attribute">
+      <xsl:with-param name="pis"
+                      select="processing-instruction('dbfo')"/>
+      <xsl:with-param name="attribute" select="'glossterm-width'"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="width">
+    <xsl:choose>
+      <xsl:when test="$term-width = ''">
+        <xsl:value-of select="$glossterm.width"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$term-width"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <fo:block id="{$id}">
+    <xsl:call-template name="glossary.titlepage"/>
+  </fo:block>
+
+  <xsl:if test="$preamble">
+    <xsl:apply-templates select="$preamble"/>
+  </xsl:if>
+
+  <xsl:choose>
+    <xsl:when test="$presentation = 'list'">
+      <xsl:apply-templates select="$divs" mode="glossary.as.list">
+        <xsl:with-param name="width" select="$width"/>
+      </xsl:apply-templates>
+      <xsl:if test="$entries">
+        <fo:list-block provisional-distance-between-starts="{$width}"
+                       provisional-label-separation="{$glossterm.separation}"
+                       xsl:use-attribute-sets="normal.para.spacing">
+          <xsl:apply-templates select="$entries" mode="glossary.as.list"/>
+        </fo:list-block>
+      </xsl:if>
+    </xsl:when>
+    <xsl:when test="$presentation = 'blocks'">
+      <xsl:apply-templates select="$divs" mode="glossary.as.blocks"/>
+      <xsl:apply-templates select="$entries" mode="glossary.as.blocks"/>
+    </xsl:when>
+    <xsl:when test="$glossary.as.blocks != 0">
+      <xsl:apply-templates select="$divs" mode="glossary.as.blocks"/>
+      <xsl:apply-templates select="$entries" mode="glossary.as.blocks"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:apply-templates select="$divs" mode="glossary.as.list">
+        <xsl:with-param name="width" select="$width"/>
+      </xsl:apply-templates>
+      <xsl:if test="$entries">
+        <fo:list-block provisional-distance-between-starts="{$width}"
+                       provisional-label-separation="{$glossterm.separation}"
+                       xsl:use-attribute-sets="normal.para.spacing">
+          <xsl:apply-templates select="$entries" mode="glossary.as.list"/>
+        </fo:list-block>
+      </xsl:if>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="book/glossary|/glossary" priority="2">
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <xsl:variable name="master-reference">
+    <xsl:call-template name="select.pagemaster"/>
+  </xsl:variable>
+
+  <fo:page-sequence hyphenate="{$hyphenate}"
+                    master-reference="{$master-reference}">
+    <xsl:attribute name="language">
+      <xsl:call-template name="l10n.language"/>
+    </xsl:attribute>
+    <xsl:attribute name="format">
+      <xsl:call-template name="page.number.format"/>
+    </xsl:attribute>
+    <xsl:if test="$double.sided != 0">
+      <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
+    </xsl:if>
+
+    <xsl:attribute name="hyphenation-character">
+      <xsl:call-template name="gentext">
+        <xsl:with-param name="key" select="'hyphenation-character'"/>
+      </xsl:call-template>
+    </xsl:attribute>
+    <xsl:attribute name="hyphenation-push-character-count">
+      <xsl:call-template name="gentext">
+        <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
+      </xsl:call-template>
+    </xsl:attribute>
+    <xsl:attribute name="hyphenation-remain-character-count">
+      <xsl:call-template name="gentext">
+        <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
+      </xsl:call-template>
+    </xsl:attribute>
+
+    <xsl:apply-templates select="." mode="running.head.mode">
+      <xsl:with-param name="master-reference" select="$master-reference"/>
+    </xsl:apply-templates>
+    <xsl:apply-templates select="." mode="running.foot.mode">
+      <xsl:with-param name="master-reference" select="$master-reference"/>
+    </xsl:apply-templates>
+
+    <fo:flow flow-name="xsl-region-body">
+      <xsl:call-template name="make-glossary"/>
+    </fo:flow>
+  </fo:page-sequence>
+</xsl:template>
+
+<xsl:template match="glossary/glossaryinfo"></xsl:template>
+<xsl:template match="glossary/title"></xsl:template>
+<xsl:template match="glossary/subtitle"></xsl:template>
+<xsl:template match="glossary/titleabbrev"></xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="glosslist">
+  <xsl:variable name="presentation">
+    <xsl:call-template name="dbfo-attribute">
+      <xsl:with-param name="pis"
+                      select="processing-instruction('dbfo')"/>
+      <xsl:with-param name="attribute" select="'glosslist-presentation'"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="term-width">
+    <xsl:call-template name="dbfo-attribute">
+      <xsl:with-param name="pis"
+                      select="processing-instruction('dbfo')"/>
+      <xsl:with-param name="attribute" select="'glossterm-width'"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="width">
+    <xsl:choose>
+      <xsl:when test="$term-width = ''">
+        <xsl:value-of select="$glossterm.width"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$term-width"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="$presentation = 'list'">
+      <fo:list-block provisional-distance-between-starts="{$width}"
+                     provisional-label-separation="{$glossterm.separation}"
+                     xsl:use-attribute-sets="normal.para.spacing">
+        <xsl:apply-templates mode="glossary.as.list"/>
+      </fo:list-block>
+    </xsl:when>
+    <xsl:when test="$presentation = 'blocks'">
+      <xsl:apply-templates mode="glossary.as.blocks"/>
+    </xsl:when>
+    <xsl:when test="$glosslist.as.blocks != 0">
+      <xsl:apply-templates mode="glossary.as.blocks"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <fo:list-block provisional-distance-between-starts="{$width}"
+                     provisional-label-separation="{$glossterm.separation}"
+                     xsl:use-attribute-sets="normal.para.spacing">
+        <xsl:apply-templates mode="glossary.as.list"/>
+      </fo:list-block>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+<!-- Glossary collection -->
+
+<xsl:template match="glossary[@role='auto']" priority="2">
+  <xsl:variable name="collection" select="document($glossary.collection, .)"/>
+  <xsl:if test="$glossary.collection = ''">
+    <xsl:message>
+      <xsl:text>Warning: processing automatic glossary </xsl:text>
+      <xsl:text>without a glossary.collection file.</xsl:text>
+    </xsl:message>
+  </xsl:if>
+
+  <xsl:if test="not($collection) and $glossary.collection != ''">
+    <xsl:message>
+      <xsl:text>Warning: processing automatic glossary but unable to </xsl:text>
+      <xsl:text>open glossary.collection file '</xsl:text>
+      <xsl:value-of select="$glossary.collection"/>
+      <xsl:text>'</xsl:text>
+    </xsl:message>
+  </xsl:if>
+
+  <xsl:call-template name="make-auto-glossary"/>
+</xsl:template>
+
+<xsl:template name="make-auto-glossary">
+  <xsl:param name="collection" select="document($glossary.collection, .)"/>
+  <xsl:param name="terms" select="//glossterm[not(parent::glossdef)]|//firstterm"/>
+  <xsl:param name="preamble" select="*[not(self::title
+                                           or self::subtitle
+                                           or self::glossdiv
+                                           or self::glossentry)]"/>
+
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <xsl:variable name="presentation">
+    <xsl:call-template name="dbfo-attribute">
+      <xsl:with-param name="pis"
+                      select="processing-instruction('dbfo')"/>
+      <xsl:with-param name="attribute" select="'glossary-presentation'"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="term-width">
+    <xsl:call-template name="dbfo-attribute">
+      <xsl:with-param name="pis"
+                      select="processing-instruction('dbfo')"/>
+      <xsl:with-param name="attribute" select="'glossterm-width'"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="width">
+    <xsl:choose>
+      <xsl:when test="$term-width = ''">
+        <xsl:value-of select="$glossterm.width"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$term-width"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:if test="$glossary.collection = ''">
+    <xsl:message>
+      <xsl:text>Warning: processing automatic glossary </xsl:text>
+      <xsl:text>without a glossary.collection file.</xsl:text>
+    </xsl:message>
+  </xsl:if>
+
+  <fo:block id="{$id}">
+    <xsl:call-template name="glossary.titlepage"/>
+  </fo:block>
+
+  <xsl:if test="$preamble">
+    <xsl:apply-templates select="$preamble"/>
+  </xsl:if>
+
+  <xsl:choose>
+    <xsl:when test="glossdiv and $collection//glossdiv">
+      <xsl:for-each select="$collection//glossdiv">
+        <!-- first see if there are any in this div -->
+        <xsl:variable name="exist.test">
+          <xsl:for-each select="glossentry">
+            <xsl:variable name="cterm" select="glossterm"/>
+            <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
+              <xsl:value-of select="glossterm"/>
+            </xsl:if>
+          </xsl:for-each>
+        </xsl:variable>
+
+        <xsl:if test="$exist.test != ''">
+          <xsl:choose>
+            <xsl:when test="$presentation = 'list'">
+              <xsl:apply-templates select="." mode="auto-glossary-as-list">
+                <xsl:with-param name="width" select="$width"/>
+                <xsl:with-param name="terms" select="$terms"/>
+              </xsl:apply-templates>
+            </xsl:when>
+            <xsl:when test="$presentation = 'blocks'">
+              <xsl:apply-templates select="." mode="auto-glossary-as-blocks">
+                <xsl:with-param name="terms" select="$terms"/>
+              </xsl:apply-templates>
+            </xsl:when>
+            <xsl:when test="$glossary.as.blocks != 0">
+              <xsl:apply-templates select="." mode="auto-glossary-as-blocks">
+                <xsl:with-param name="terms" select="$terms"/>
+              </xsl:apply-templates>
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:apply-templates select="." mode="auto-glossary-as-list">
+                <xsl:with-param name="width" select="$width"/>
+                <xsl:with-param name="terms" select="$terms"/>
+              </xsl:apply-templates>
+            </xsl:otherwise>
+          </xsl:choose>
+        </xsl:if>
+      </xsl:for-each>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:choose>
+        <xsl:when test="$presentation = 'list'">
+          <fo:list-block provisional-distance-between-starts="{$width}"
+                         provisional-label-separation="{$glossterm.separation}"
+                         xsl:use-attribute-sets="normal.para.spacing">
+            <xsl:for-each select="$collection//glossentry">
+              <xsl:variable name="cterm" select="glossterm"/>
+              <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
+                <xsl:apply-templates select="." mode="auto-glossary-as-list"/>
+              </xsl:if>
+            </xsl:for-each>
+          </fo:list-block>
+        </xsl:when>
+        <xsl:when test="$presentation = 'blocks'">
+          <xsl:for-each select="$collection//glossentry">
+            <xsl:variable name="cterm" select="glossterm"/>
+            <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
+              <xsl:apply-templates select="." mode="auto-glossary-as-blocks"/>
+            </xsl:if>
+          </xsl:for-each>
+        </xsl:when>
+        <xsl:when test="$glossary.as.blocks != 0">
+          <xsl:for-each select="$collection//glossentry">
+            <xsl:variable name="cterm" select="glossterm"/>
+            <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
+              <xsl:apply-templates select="." mode="auto-glossary-as-blocks"/>
+            </xsl:if>
+          </xsl:for-each>
+        </xsl:when>
+        <xsl:otherwise>
+          <fo:list-block provisional-distance-between-starts="{$width}"
+                         provisional-label-separation="{$glossterm.separation}"
+                         xsl:use-attribute-sets="normal.para.spacing">
+            <xsl:for-each select="$collection//glossentry">
+              <xsl:variable name="cterm" select="glossterm"/>
+              <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
+                <xsl:apply-templates select="." mode="auto-glossary-as-list"/>
+              </xsl:if>
+            </xsl:for-each>
+          </fo:list-block>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="book/glossary[@role='auto']|/glossary[@role='auto']" priority="2.5">
+  <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
+
+  <xsl:variable name="master-reference">
+    <xsl:call-template name="select.pagemaster"/>
+  </xsl:variable>
+
+  <xsl:if test="$glossary.collection = ''">
+    <xsl:message>
+      <xsl:text>Warning: processing automatic glossary </xsl:text>
+      <xsl:text>without a glossary.collection file.</xsl:text>
+    </xsl:message>
+  </xsl:if>
+
+  <fo:page-sequence hyphenate="{$hyphenate}"
+                    master-reference="{$master-reference}">
+    <xsl:attribute name="language">
+      <xsl:call-template name="l10n.language"/>
+    </xsl:attribute>
+    <xsl:attribute name="format">
+      <xsl:call-template name="page.number.format"/>
+    </xsl:attribute>
+    <xsl:if test="$double.sided != 0">
+      <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
+    </xsl:if>
+
+    <xsl:attribute name="hyphenation-character">
+      <xsl:call-template name="gentext">
+        <xsl:with-param name="key" select="'hyphenation-character'"/>
+      </xsl:call-template>
+    </xsl:attribute>
+    <xsl:attribute name="hyphenation-push-character-count">
+      <xsl:call-template name="gentext">
+        <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
+      </xsl:call-template>
+    </xsl:attribute>
+    <xsl:attribute name="hyphenation-remain-character-count">
+      <xsl:call-template name="gentext">
+        <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
+      </xsl:call-template>
+    </xsl:attribute>
+
+    <xsl:apply-templates select="." mode="running.head.mode">
+      <xsl:with-param name="master-reference" select="$master-reference"/>
+    </xsl:apply-templates>
+    <xsl:apply-templates select="." mode="running.foot.mode">
+      <xsl:with-param name="master-reference" select="$master-reference"/>
+    </xsl:apply-templates>
+
+    <fo:flow flow-name="xsl-region-body">
+      <xsl:call-template name="make-auto-glossary"/>
+    </fo:flow>
+  </fo:page-sequence>
+</xsl:template>
+
+<xsl:template match="glossdiv" mode="auto-glossary-as-list">
+  <xsl:param name="width" select="$glossterm.width"/>
+  <xsl:param name="terms" select="."/>
+
+  <xsl:variable name="preamble"
+                select="*[not(self::title
+                            or self::subtitle
+                            or self::glossentry)]"/>
+
+  <xsl:call-template name="glossdiv.titlepage"/>
+
+  <xsl:apply-templates select="$preamble"/>
+
+  <fo:list-block provisional-distance-between-starts="{$width}"
+                 provisional-label-separation="{$glossterm.separation}"
+                 xsl:use-attribute-sets="normal.para.spacing">
+    <xsl:for-each select="glossentry">
+      <xsl:variable name="cterm" select="glossterm"/>
+      <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
+        <xsl:apply-templates select="." mode="auto-glossary-as-list"/>
+      </xsl:if>
+    </xsl:for-each>
+  </fo:list-block>
+</xsl:template>
+
+<xsl:template match="glossentry" mode="auto-glossary-as-list">
+  <xsl:apply-templates select="." mode="glossary.as.list"/>
+</xsl:template>
+
+<xsl:template match="glossdiv" mode="auto-glossary-as-blocks">
+  <xsl:param name="terms" select="."/>
+
+  <xsl:variable name="preamble"
+                select="*[not(self::title
+                            or self::subtitle
+                            or self::glossentry)]"/>
+
+  <xsl:call-template name="glossdiv.titlepage"/>
+
+  <xsl:apply-templates select="$preamble"/>
+
+  <xsl:for-each select="glossentry">
+    <xsl:variable name="cterm" select="glossterm"/>
+    <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
+      <xsl:apply-templates select="." mode="auto-glossary-as-blocks"/>
+    </xsl:if>
+  </xsl:for-each>
+</xsl:template>
+
+<xsl:template match="glossentry" mode="auto-glossary-as-blocks">
+  <xsl:apply-templates select="." mode="glossary.as.blocks"/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+<!-- Format glossary as a list -->
+
+<xsl:template match="glossdiv" mode="glossary.as.list">
+  <xsl:param name="width" select="$glossterm.width"/>
+
+  <xsl:variable name="entries" select="glossentry"/>
+  <xsl:variable name="preamble"
+                select="*[not(self::title
+                            or self::subtitle
+                            or self::glossentry)]"/>
+
+  <xsl:call-template name="glossdiv.titlepage"/>
+
+  <xsl:apply-templates select="$preamble"/>
+
+  <fo:list-block provisional-distance-between-starts="{$width}"
+                 provisional-label-separation="{$glossterm.separation}"
+                 xsl:use-attribute-sets="normal.para.spacing">
+    <xsl:apply-templates select="$entries" mode="glossary.as.list"/>
+  </fo:list-block>
+</xsl:template>
+
+<!--
+GlossEntry ::=
+  GlossTerm, Acronym?, Abbrev?,
+  (IndexTerm)*,
+  RevHistory?,
+  (GlossSee | GlossDef+)
+-->
+
+<xsl:template match="glossentry" mode="glossary.as.list">
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <fo:list-item xsl:use-attribute-sets="normal.para.spacing">
+    <xsl:call-template name="anchor">
+      <xsl:with-param name="conditional">
+        <xsl:choose>
+          <xsl:when test="$glossterm.auto.link != 0
+                          or $glossary.collection != ''">0</xsl:when>
+          <xsl:otherwise>1</xsl:otherwise>
+        </xsl:choose>
+      </xsl:with-param>
+    </xsl:call-template>
+
+    <fo:list-item-label end-indent="label-end()">
+      <fo:block>
+        <xsl:choose>
+          <xsl:when test="$glossentry.show.acronym = 'primary'">
+            <xsl:choose>
+              <xsl:when test="acronym|abbrev">
+                <xsl:apply-templates select="acronym|abbrev" mode="glossary.as.list"/>
+                <xsl:text> (</xsl:text>
+                <xsl:apply-templates select="glossterm" mode="glossary.as.list"/>
+                <xsl:text>)</xsl:text>
+              </xsl:when>
+              <xsl:otherwise>
+                <xsl:apply-templates select="glossterm" mode="glossary.as.list"/>
+              </xsl:otherwise>
+            </xsl:choose>
+          </xsl:when>
+
+          <xsl:when test="$glossentry.show.acronym = 'yes'">
+            <xsl:apply-templates select="glossterm" mode="glossary.as.list"/>
+
+            <xsl:if test="acronym|abbrev">
+              <xsl:text> (</xsl:text>
+              <xsl:apply-templates select="acronym|abbrev" mode="glossary.as.list"/>
+              <xsl:text>)</xsl:text>
+            </xsl:if>
+          </xsl:when>
+
+          <xsl:otherwise>
+            <xsl:apply-templates select="glossterm" mode="glossary.as.list"/>
+          </xsl:otherwise>
+        </xsl:choose>
+        <xsl:apply-templates select="indexterm"/>
+      </fo:block>
+    </fo:list-item-label>
+
+    <fo:list-item-body start-indent="body-start()">
+      <xsl:apply-templates select="glosssee|glossdef" mode="glossary.as.list"/>
+    </fo:list-item-body>
+  </fo:list-item>
+</xsl:template>
+
+<xsl:template match="glossentry/glossterm" mode="glossary.as.list">
+  <xsl:apply-templates/>
+  <xsl:if test="following-sibling::glossterm">, </xsl:if>
+</xsl:template>
+
+<xsl:template match="glossentry/acronym" mode="glossary.as.list">
+  <xsl:apply-templates/>
+  <xsl:if test="following-sibling::acronym|following-sibling::abbrev">, </xsl:if>
+</xsl:template>
+
+<xsl:template match="glossentry/abbrev" mode="glossary.as.list">
+  <xsl:apply-templates/>
+  <xsl:if test="following-sibling::acronym|following-sibling::abbrev">, </xsl:if>
+</xsl:template>
+
+<xsl:template match="glossentry/revhistory" mode="glossary.as.list">
+</xsl:template>
+
+<xsl:template match="glossentry/glosssee" mode="glossary.as.list">
+  <xsl:variable name="otherterm" select="@otherterm"/>
+  <xsl:variable name="targets" select="//node()[@id=$otherterm]"/>
+  <xsl:variable name="target" select="$targets[1]"/>
+
+  <fo:block>
+    <xsl:call-template name="gentext.template">
+      <xsl:with-param name="context" select="'glossary'"/>
+      <xsl:with-param name="name" select="'see'"/>
+    </xsl:call-template>
+    <xsl:choose>
+      <xsl:when test="$target">
+        <xsl:apply-templates select="$target" mode="xref-to"/>
+      </xsl:when>
+      <xsl:when test="$otherterm != '' and not($target)">
+        <xsl:message>
+          <xsl:text>Warning: glosssee @otherterm reference not found: </xsl:text>
+          <xsl:value-of select="$otherterm"/>
+        </xsl:message>
+        <xsl:apply-templates mode="glossary.as.list"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:apply-templates mode="glossary.as.list"/>
+      </xsl:otherwise>
+    </xsl:choose>
+    <xsl:text>.</xsl:text>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="glossentry/glossdef" mode="glossary.as.list">
+  <xsl:apply-templates select="*[local-name(.) != 'glossseealso']"/>
+  <xsl:if test="glossseealso">
+    <fo:block>
+      <xsl:call-template name="gentext.template">
+        <xsl:with-param name="context" select="'glossary'"/>
+        <xsl:with-param name="name" select="'seealso'"/>
+      </xsl:call-template>
+      <xsl:apply-templates select="glossseealso" mode="glossary.as.list"/>
+    </fo:block>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="glossentry/glossdef/para[1]|glossentry/glossdef/simpara[1]"
+              mode="glossary.as.list">
+  <fo:block>
+    <xsl:apply-templates/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="glossseealso" mode="glossary.as.list">
+  <xsl:variable name="otherterm" select="@otherterm"/>
+  <xsl:variable name="targets" select="//node()[@id=$otherterm]"/>
+  <xsl:variable name="target" select="$targets[1]"/>
+
+  <xsl:choose>
+    <xsl:when test="$target">
+      <xsl:apply-templates select="$target" mode="xref-to"/>
+    </xsl:when>
+    <xsl:when test="$otherterm != '' and not($target)">
+      <xsl:message>
+        <xsl:text>Warning: glossseealso @otherterm reference not found: </xsl:text>
+        <xsl:value-of select="$otherterm"/>
+      </xsl:message>
+      <xsl:apply-templates mode="glossary.as.list"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:apply-templates mode="glossary.as.list"/>
+    </xsl:otherwise>
+  </xsl:choose>
+
+  <xsl:choose>
+    <xsl:when test="position() = last()">
+      <xsl:text>.</xsl:text>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:text>, </xsl:text>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+<!-- Format glossary blocks -->
+
+<xsl:template match="glossdiv" mode="glossary.as.blocks">
+  <xsl:variable name="entries" select="glossentry"/>
+  <xsl:variable name="preamble"
+                select="*[not(self::title
+                            or self::subtitle
+                            or self::glossentry)]"/>
+
+  <xsl:call-template name="glossdiv.titlepage"/>
+
+  <xsl:apply-templates select="$preamble"/>
+
+  <xsl:apply-templates select="$entries" mode="glossary.as.blocks"/>
+</xsl:template>
+
+<!--
+GlossEntry ::=
+  GlossTerm, Acronym?, Abbrev?,
+  (IndexTerm)*,
+  RevHistory?,
+  (GlossSee | GlossDef+)
+-->
+
+<xsl:template match="glossentry" mode="glossary.as.blocks">
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <fo:block xsl:use-attribute-sets="list.item.spacing"
+ 	  keep-with-next.within-column="always" 
+ 	  keep-together.within-column="always">
+    <xsl:call-template name="anchor">
+      <xsl:with-param name="conditional">
+        <xsl:choose>
+          <xsl:when test="$glossterm.auto.link != 0
+                          or $glossary.collection != ''">0</xsl:when>
+          <xsl:otherwise>1</xsl:otherwise>
+        </xsl:choose>
+      </xsl:with-param>
+    </xsl:call-template>
+
+    <xsl:choose>
+      <xsl:when test="$glossentry.show.acronym = 'primary'">
+        <xsl:choose>
+          <xsl:when test="acronym|abbrev">
+            <xsl:apply-templates select="acronym|abbrev" mode="glossary.as.blocks"/>
+            <xsl:text> (</xsl:text>
+            <xsl:apply-templates select="glossterm" mode="glossary.as.blocks"/>
+            <xsl:text>)</xsl:text>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:apply-templates select="glossterm" mode="glossary.as.blocks"/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:when>
+
+      <xsl:when test="$glossentry.show.acronym = 'yes'">
+        <xsl:apply-templates select="glossterm" mode="glossary.as.blocks"/>
+
+        <xsl:if test="acronym|abbrev">
+          <xsl:text> (</xsl:text>
+          <xsl:apply-templates select="acronym|abbrev" mode="glossary.as.blocks"/>
+          <xsl:text>)</xsl:text>
+        </xsl:if>
+      </xsl:when>
+
+      <xsl:otherwise>
+        <xsl:apply-templates select="glossterm" mode="glossary.as.blocks"/>
+      </xsl:otherwise>
+    </xsl:choose>
+
+    <xsl:apply-templates select="indexterm"/>
+  </fo:block>
+
+  <fo:block margin-left="0.25in">
+    <xsl:apply-templates select="glosssee|glossdef" mode="glossary.as.blocks"/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="glossentry/glossterm" mode="glossary.as.blocks">
+  <xsl:apply-templates/>
+  <xsl:if test="following-sibling::glossterm">, </xsl:if>
+</xsl:template>
+
+<xsl:template match="glossentry/acronym" mode="glossary.as.blocks">
+  <xsl:apply-templates/>
+  <xsl:if test="following-sibling::acronym|following-sibling::abbrev">, </xsl:if>
+</xsl:template>
+
+<xsl:template match="glossentry/abbrev" mode="glossary.as.blocks">
+  <xsl:apply-templates/>
+  <xsl:if test="following-sibling::acronym|following-sibling::abbrev">, </xsl:if>
+</xsl:template>
+
+<xsl:template match="glossentry/glosssee" mode="glossary.as.blocks">
+  <xsl:variable name="otherterm" select="@otherterm"/>
+  <xsl:variable name="targets" select="//node()[@id=$otherterm]"/>
+  <xsl:variable name="target" select="$targets[1]"/>
+
+  <xsl:call-template name="gentext.template">
+    <xsl:with-param name="context" select="'glossary'"/>
+    <xsl:with-param name="name" select="'see'"/>
+  </xsl:call-template>
+  <xsl:choose>
+    <xsl:when test="$target">
+      <xsl:apply-templates select="$target" mode="xref-to"/>
+    </xsl:when>
+    <xsl:when test="$otherterm != '' and not($target)">
+      <xsl:message>
+        <xsl:text>Warning: glosssee @otherterm reference not found: </xsl:text>
+        <xsl:value-of select="$otherterm"/>
+      </xsl:message>
+      <xsl:apply-templates mode="glossary.as.blocks"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:apply-templates mode="glossary.as.blocks"/>
+    </xsl:otherwise>
+  </xsl:choose>
+  <xsl:text>.</xsl:text>
+</xsl:template>
+
+<xsl:template match="glossentry/glossdef" mode="glossary.as.blocks">
+  <xsl:apply-templates select="*[local-name(.) != 'glossseealso']"
+                       mode="glossary.as.blocks"/>
+  <xsl:if test="glossseealso">
+    <fo:block>
+      <xsl:call-template name="gentext.template">
+        <xsl:with-param name="context" select="'glossary'"/>
+        <xsl:with-param name="name" select="'seealso'"/>
+      </xsl:call-template>
+      <xsl:apply-templates select="glossseealso" mode="glossary.as.blocks"/>
+    </fo:block>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="glossentry/glossdef/para[1]|glossentry/glossdef/simpara[1]"
+              mode="glossary.as.blocks">
+  <fo:block>
+    <xsl:apply-templates/>
+  </fo:block>
+</xsl:template>
+
+<!-- Handle any other glossdef content normally -->
+<xsl:template match="*" mode="glossary.as.blocks">
+  <xsl:apply-templates select="." />
+</xsl:template>
+
+<xsl:template match="glossseealso" mode="glossary.as.blocks">
+  <xsl:variable name="otherterm" select="@otherterm"/>
+  <xsl:variable name="targets" select="//node()[@id=$otherterm]"/>
+  <xsl:variable name="target" select="$targets[1]"/>
+
+  <xsl:choose>
+    <xsl:when test="$target">
+      <xsl:apply-templates select="$target" mode="xref-to"/>
+    </xsl:when>
+    <xsl:when test="$otherterm != '' and not($target)">
+      <xsl:message>
+        <xsl:text>Warning: glossseealso @otherterm reference not found: </xsl:text>
+        <xsl:value-of select="$otherterm"/>
+      </xsl:message>
+      <xsl:apply-templates mode="glossary.as.blocks"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:apply-templates mode="glossary.as.blocks"/>
+    </xsl:otherwise>
+  </xsl:choose>
+
+  <xsl:choose>
+    <xsl:when test="position() = last()">
+      <xsl:text>.</xsl:text>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:text>, </xsl:text>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/graphics.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/graphics.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/graphics.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,521 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                xmlns:xlink="http://www.w3.org/1999/xlink"
+                xmlns:stext="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.TextFactory"
+                xmlns:xtext="com.nwalsh.xalan.Text"
+                xmlns:lxslt="http://xml.apache.org/xslt"
+                exclude-result-prefixes="xlink stext xtext lxslt"
+                extension-element-prefixes="stext xtext"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: graphics.xsl,v 1.1.1.1 2004/10/19 21:21:43 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     Contributors:
+     Colin Paul Adams, <colin at colina.demon.co.uk>
+     Paul Grosso, <pgrosso at arbortext.com>
+
+     ******************************************************************** -->
+
+<!-- ==================================================================== -->
+<!-- Graphic format tests for the FO backend -->
+
+<xsl:param name="graphic.notations">
+  <!-- n.b. exactly one leading space, one trailing space, and one inter-word space -->
+  <xsl:choose>
+    <xsl:when test="$passivetex.extensions != 0">
+      <xsl:text> PNG PDF JPG JPEG linespecific </xsl:text>
+    </xsl:when>
+    <xsl:when test="$fop.extensions != 0">
+      <xsl:text> BMP GIF TIFF SVG PNG PDF JPG JPEG linespecific </xsl:text>
+    </xsl:when>
+    <xsl:when test="$arbortext.extensions != 0">
+      <xsl:text> PNG PDF JPG JPEG linespecific GIF GIF87a GIF89a TIFF BMP </xsl:text>
+    </xsl:when>
+    <xsl:when test="$xep.extensions != 0">
+      <xsl:text> SVG PNG PDF JPG JPEG linespecific GIF GIF87a GIF89a TIFF BMP </xsl:text>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:text> PNG PDF JPG JPEG linespecific GIF GIF87a GIF89a TIFF BMP </xsl:text>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:param>
+
+<xsl:template name="is.graphic.format">
+  <xsl:param name="format"/>
+  <xsl:if test="contains($graphic.notations, concat(' ',$format,' '))">1</xsl:if>
+</xsl:template>
+
+<xsl:param name="graphic.extensions">
+  <!-- n.b. exactly one leading space, one trailing space, and one inter-word space -->
+  <xsl:choose>
+    <xsl:when test="$passivetex.extensions != 0">
+      <xsl:text> png pdf jpg jpeg </xsl:text>
+    </xsl:when>
+    <xsl:when test="$fop.extensions != 0">
+      <xsl:text> gif svg png pdf jpg jpeg </xsl:text>
+    </xsl:when>
+    <xsl:when test="$arbortext.extensions != 0">
+      <xsl:text> png pdf jpg jpeg gif tif tiff bmp </xsl:text>
+    </xsl:when>
+    <xsl:when test="$xep.extensions != 0">
+      <xsl:text> svg png pdf jpg jpeg gif tif tiff bmp </xsl:text>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:text> png pdf jpg jpeg gif tif tiff bmp </xsl:text>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:param>
+
+<xsl:template name="is.graphic.extension">
+  <xsl:param name="ext"/>
+  <xsl:if test="contains($graphic.extensions, concat(' ', $ext, ' '))">1</xsl:if>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="screenshot">
+  <fo:block>
+    <xsl:apply-templates/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="screeninfo">
+</xsl:template>
+
+<!-- ==================================================================== -->
+<!-- Override these templates for FO -->
+<!-- ==================================================================== -->
+
+<xsl:template name="process.image">
+  <!-- When this template is called, the current node should be  -->
+  <!-- a graphic, inlinegraphic, imagedata, or videodata. All    -->
+  <!-- those elements have the same set of attributes, so we can -->
+  <!-- handle them all in one place.                             -->
+
+  <xsl:variable name="scalefit">
+    <xsl:choose>
+      <xsl:when test="$ignore.image.scaling != 0">0</xsl:when>
+      <xsl:when test="@contentwidth or @contentdepth">0</xsl:when>
+      <xsl:when test="@scale">0</xsl:when>
+      <xsl:when test="@scalefit"><xsl:value-of select="@scalefit"/></xsl:when>
+      <xsl:when test="@width or @depth">1</xsl:when>
+      <xsl:otherwise>0</xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:variable name="scale">
+    <xsl:choose>
+      <xsl:when test="$ignore.image.scaling != 0">0</xsl:when>
+      <xsl:when test="@contentwidth or @contentdepth">1.0</xsl:when>
+      <xsl:when test="@scale">
+        <xsl:value-of select="@scale div 100.0"/>
+      </xsl:when>
+      <xsl:otherwise>1.0</xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:variable name="filename">
+    <xsl:choose>
+      <xsl:when test="local-name(.) = 'graphic'
+                      or local-name(.) = 'inlinegraphic'">
+        <!-- handle legacy graphic and inlinegraphic by new template --> 
+        <xsl:call-template name="mediaobject.filename">
+          <xsl:with-param name="object" select="."/>
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:otherwise>
+        <!-- imagedata, videodata, audiodata -->
+        <xsl:call-template name="mediaobject.filename">
+          <xsl:with-param name="object" select=".."/>
+        </xsl:call-template>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:variable name="bgcolor">
+    <xsl:call-template name="dbfo-attribute">
+      <xsl:with-param name="pis"
+                      select="../processing-instruction('dbfo')"/>
+      <xsl:with-param name="attribute" select="'background-color'"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <fo:external-graphic>
+    <xsl:attribute name="src">
+      <xsl:call-template name="fo-external-image">
+        <xsl:with-param name="filename" select="$filename"/>
+      </xsl:call-template>
+    </xsl:attribute>
+
+    <xsl:attribute name="width">
+      <xsl:choose>
+        <xsl:when test="$ignore.image.scaling != 0">auto</xsl:when>
+        <xsl:when test="contains(@width,'%')">
+          <xsl:value-of select="@width"/>
+        </xsl:when>
+        <xsl:when test="@width">
+          <xsl:call-template name="length-spec">
+            <xsl:with-param name="length" select="@width"/>
+            <xsl:with-param name="default.units" select="'px'"/>
+          </xsl:call-template>
+        </xsl:when>
+        <xsl:otherwise>auto</xsl:otherwise>
+      </xsl:choose>
+    </xsl:attribute>
+
+    <xsl:attribute name="height">
+      <xsl:choose>
+        <xsl:when test="$ignore.image.scaling != 0">auto</xsl:when>
+        <xsl:when test="contains(@depth,'%')">
+          <xsl:value-of select="@depth"/>
+        </xsl:when>
+        <xsl:when test="@depth">
+          <xsl:call-template name="length-spec">
+            <xsl:with-param name="length" select="@depth"/>
+            <xsl:with-param name="default.units" select="'px'"/>
+          </xsl:call-template>
+        </xsl:when>
+        <xsl:otherwise>auto</xsl:otherwise>
+      </xsl:choose>
+    </xsl:attribute>
+
+    <xsl:attribute name="content-width">
+      <xsl:choose>
+        <xsl:when test="$ignore.image.scaling != 0">auto</xsl:when>
+        <xsl:when test="contains(@contentwidth,'%')">
+          <xsl:value-of select="@contentwidth"/>
+        </xsl:when>
+        <xsl:when test="@contentwidth">
+          <xsl:call-template name="length-spec">
+            <xsl:with-param name="length" select="@contentwidth"/>
+            <xsl:with-param name="default.units" select="'px'"/>
+          </xsl:call-template>
+        </xsl:when>
+        <xsl:when test="number($scale) != 1.0">
+          <xsl:value-of select="$scale * 100"/>
+          <xsl:text>%</xsl:text>
+        </xsl:when>
+        <xsl:when test="$scalefit = 1">scale-to-fit</xsl:when>
+        <xsl:otherwise>auto</xsl:otherwise>
+      </xsl:choose>
+    </xsl:attribute>
+
+    <xsl:attribute name="content-height">
+      <xsl:choose>
+        <xsl:when test="$ignore.image.scaling != 0">auto</xsl:when>
+        <xsl:when test="contains(@contentdepth,'%')">
+          <xsl:value-of select="@contentdepth"/>
+        </xsl:when>
+        <xsl:when test="@contentdepth">
+          <xsl:call-template name="length-spec">
+            <xsl:with-param name="length" select="@contentdepth"/>
+            <xsl:with-param name="default.units" select="'px'"/>
+          </xsl:call-template>
+        </xsl:when>
+        <xsl:when test="number($scale) != 1.0">
+          <xsl:value-of select="$scale * 100"/>
+          <xsl:text>%</xsl:text>
+        </xsl:when>
+        <xsl:otherwise>auto</xsl:otherwise>
+      </xsl:choose>
+    </xsl:attribute>
+
+    <xsl:if test="$bgcolor != ''">
+      <xsl:attribute name="background-color">
+        <xsl:value-of select="$bgcolor"/>
+      </xsl:attribute>
+    </xsl:if>
+
+    <xsl:if test="@align">
+      <xsl:attribute name="text-align">
+        <xsl:value-of select="@align"/>
+      </xsl:attribute>
+    </xsl:if>
+
+    <xsl:if test="@valign">
+      <xsl:attribute name="display-align">
+        <xsl:choose>
+          <xsl:when test="@valign = 'top'">before</xsl:when>
+          <xsl:when test="@valign = 'middle'">center</xsl:when>
+          <xsl:when test="@valign = 'bottom'">after</xsl:when>
+          <xsl:otherwise>auto</xsl:otherwise>
+        </xsl:choose>
+      </xsl:attribute>
+    </xsl:if>
+  </fo:external-graphic>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="graphic">
+  <xsl:choose>
+    <xsl:when test="parent::inlineequation">
+      <xsl:call-template name="process.image"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <fo:block>
+        <xsl:if test="@align">
+          <xsl:attribute name="text-align">
+            <xsl:value-of select="@align"/>
+          </xsl:attribute>
+        </xsl:if>
+        <xsl:call-template name="process.image"/>
+      </fo:block>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="inlinegraphic">
+  <xsl:variable name="vendor" select="system-property('xsl:vendor')"/>
+  <xsl:variable name="filename">
+    <xsl:choose>
+      <xsl:when test="@entityref">
+        <xsl:value-of select="unparsed-entity-uri(@entityref)"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="@fileref"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="@format='linespecific'">
+      <xsl:choose>
+        <xsl:when test="$use.extensions != '0'
+                        and $textinsert.extension != '0'">
+          <xsl:choose>
+            <xsl:when test="contains($vendor, 'SAXON')">
+              <stext:insertfile href="{$filename}"/>
+            </xsl:when>
+            <xsl:when test="contains($vendor, 'Apache Software Foundation')">
+              <xtext:insertfile href="{$filename}"/>
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:message terminate="yes">
+                <xsl:text>Don't know how to insert files with </xsl:text>
+                <xsl:value-of select="$vendor"/>
+              </xsl:message>
+            </xsl:otherwise>
+          </xsl:choose>
+        </xsl:when>
+        <xsl:otherwise>
+          <a xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"
+             href="{$filename}"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:call-template name="process.image"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="mediaobject|mediaobjectco">
+
+  <xsl:variable name="olist" select="imageobject|imageobjectco
+                     |videoobject|audioobject
+		     |textobject"/>
+
+  <xsl:variable name="object.index">
+    <xsl:call-template name="select.mediaobject.index">
+      <xsl:with-param name="olist" select="$olist"/>
+      <xsl:with-param name="count" select="1"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="object" select="$olist[position() = $object.index]"/>
+
+  <xsl:variable name="align">
+    <xsl:value-of select="$object/imagedata[@align][1]/@align"/>
+  </xsl:variable>
+
+  <fo:block>
+    <xsl:if test="$align != '' ">
+      <xsl:attribute name="text-align">
+        <xsl:value-of select="$align"/>
+      </xsl:attribute>
+    </xsl:if>
+
+    <xsl:apply-templates select="$object"/>
+    <xsl:apply-templates select="caption"/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="inlinemediaobject">
+  <xsl:call-template name="select.mediaobject"/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="imageobjectco">
+  <xsl:apply-templates select="imageobject"/>
+  <xsl:apply-templates select="calloutlist"/>
+</xsl:template>
+
+<xsl:template match="imageobject">
+  <xsl:choose>
+    <xsl:when test="imagedata">
+      <xsl:apply-templates select="imagedata"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <fo:instream-foreign-object>
+        <xsl:apply-templates mode="copy-all"/>
+      </fo:instream-foreign-object>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="*" mode="copy-all">
+  <xsl:copy>
+    <xsl:for-each select="@*">
+      <xsl:copy/>
+    </xsl:for-each>
+    <xsl:apply-templates mode="copy-all"/>
+  </xsl:copy>
+</xsl:template>
+
+<xsl:template match="text()|comment()|processing-instruction()" mode="copy-all">
+  <xsl:copy/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="imagedata">
+  <xsl:variable name="vendor" select="system-property('xsl:vendor')"/>
+  <xsl:variable name="filename">
+    <xsl:call-template name="mediaobject.filename">
+      <xsl:with-param name="object" select=".."/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="@format='linespecific'">
+      <xsl:choose>
+        <xsl:when test="$use.extensions != '0'
+                        and $textinsert.extension != '0'">
+          <xsl:choose>
+            <xsl:when test="contains($vendor, 'SAXON')">
+              <stext:insertfile href="{$filename}"/>
+            </xsl:when>
+            <xsl:when test="contains($vendor, 'Apache Software Foundation')">
+              <xtext:insertfile href="{$filename}"/>
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:message terminate="yes">
+                <xsl:text>Don't know how to insert files with </xsl:text>
+                <xsl:value-of select="$vendor"/>
+              </xsl:message>
+            </xsl:otherwise>
+          </xsl:choose>
+        </xsl:when>
+        <xsl:otherwise>
+          <a xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"
+             href="{$filename}"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:call-template name="process.image"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="videoobject">
+  <xsl:apply-templates select="videodata"/>
+</xsl:template>
+
+<xsl:template match="videodata">
+  <xsl:call-template name="process.image"/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="audioobject">
+  <xsl:apply-templates select="audiodata"/>
+</xsl:template>
+
+<xsl:template match="audiodata">
+  <xsl:call-template name="process.image"/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="textobject">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="textdata">
+  <xsl:variable name="filename">
+    <xsl:choose>
+      <xsl:when test="@entityref">
+        <xsl:value-of select="unparsed-entity-uri(@entityref)"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="@fileref"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="$use.extensions != '0'
+                    and $textinsert.extension != '0'">
+      <xsl:choose>
+        <xsl:when test="element-available('stext:insertfile')">
+          <stext:insertfile href="{$filename}"/>
+        </xsl:when>
+        <xsl:when test="element-available('xtext:insertfile')">
+          <xtext:insertfile href="{$filename}"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:message terminate="yes">
+            <xsl:text>No insertfile extension available.</xsl:text>
+          </xsl:message>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+    <xsl:otherwise>
+      <a xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"
+         href="{$filename}"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="caption">
+  <fo:block>
+    <xsl:apply-templates/>
+  </fo:block>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="fo-external-image">
+  <xsl:param name="filename"/>
+
+  <xsl:choose>
+    <xsl:when test="$passivetex.extensions != 0
+                    or $fop.extensions != 0
+                    or $arbortext.extensions != 0">
+      <xsl:value-of select="$filename"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:value-of select="concat('url(', $filename, ')')"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/htmltbl.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/htmltbl.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/htmltbl.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,187 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                version="1.0">
+
+<!-- ********************************************************************
+     $Id: htmltbl.xsl,v 1.1.1.1 2004/10/19 21:21:43 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+  <xsl:attribute-set name="th.style">
+    <xsl:attribute name="font-weight">bold</xsl:attribute>
+  </xsl:attribute-set>
+
+  <xsl:template match="table|informaltable" mode="htmlTable">
+    <xsl:if test="tgroup/tbody/row
+                  |tgroup/thead/row
+                  |tgroup/tfoot/row">
+      <xsl:message terminate="yes">Broken table: row descendent of HTML table.</xsl:message>
+    </xsl:if>
+
+    <xsl:variable name="numcols">
+      <xsl:call-template name="widest-html-row">
+        <xsl:with-param name="rows" select=".//tr"/>
+      </xsl:call-template>
+    </xsl:variable>
+
+    <xsl:choose>
+      <xsl:when test="caption">
+        <fo:table-and-caption>
+          <xsl:apply-templates select="caption" mode="htmlTable"/>
+          <fo:table table-layout="fixed">
+            <xsl:attribute name="width">
+              <xsl:choose>
+                <xsl:when test="@width">
+                  <xsl:value-of select="@width"/>
+                </xsl:when>
+                <xsl:otherwise>100%</xsl:otherwise>
+              </xsl:choose>
+            </xsl:attribute>
+            <xsl:call-template name="make-html-table-columns">
+              <xsl:with-param name="count" select="$numcols"/>
+            </xsl:call-template>
+            <xsl:apply-templates select="tbody|thead|tfoot" mode="htmlTable"/>
+          </fo:table>
+        </fo:table-and-caption>
+      </xsl:when>
+      <xsl:otherwise>
+        <fo:table table-layout="fixed">
+          <xsl:attribute name="width">
+            <xsl:choose>
+              <xsl:when test="@width">
+                <xsl:value-of select="@width"/>
+              </xsl:when>
+              <xsl:otherwise>100%</xsl:otherwise>
+            </xsl:choose>
+          </xsl:attribute>
+          <xsl:call-template name="make-html-table-columns">
+            <xsl:with-param name="count" select="$numcols"/>
+          </xsl:call-template>
+          <xsl:apply-templates mode="htmlTable"/>
+        </fo:table>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+  <xsl:template match="caption" mode="htmlTable">
+    <fo:table-caption>
+      <fo:block>
+        <xsl:apply-templates select=".." mode="object.title.markup">
+          <xsl:with-param name="allow-anchors" select="1"/>
+        </xsl:apply-templates>
+      </fo:block>
+    </fo:table-caption>
+  </xsl:template>
+
+  <xsl:template name="widest-html-row">
+    <xsl:param name="rows" select="''"/>
+    <xsl:param name="count" select="0"/>
+    <xsl:choose>
+      <xsl:when test="count($rows) = 0">
+        <xsl:value-of select="$count"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:choose>
+          <xsl:when test="$count &gt; count($rows[1]/*)">
+            <xsl:call-template name="widest-html-row">
+              <xsl:with-param name="rows" select="$rows[position() &gt; 1]"/>
+              <xsl:with-param name="count" select="$count"/>
+            </xsl:call-template>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:call-template name="widest-html-row">
+              <xsl:with-param name="rows" select="$rows[position() &gt; 1]"/>
+              <xsl:with-param name="count" select="count($rows[1]/*)"/>
+            </xsl:call-template>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+  <xsl:template name="make-html-table-columns">
+    <xsl:param name="count" select="0"/>
+    <xsl:param name="number" select="1"/>
+
+    <xsl:choose>
+      <xsl:when test="col|colgroup/col">
+        <xsl:for-each select="col|colgroup/col">
+          <fo:table-column>
+            <xsl:attribute name="column-number">
+              <xsl:number from="table" level="any" format="1"/>
+            </xsl:attribute>
+            <xsl:if test="@width">
+              <xsl:attribute name="column-width">
+                <xsl:value-of select="@width"/>
+              </xsl:attribute>
+            </xsl:if>
+          </fo:table-column>
+        </xsl:for-each>
+      </xsl:when>
+      <xsl:when test="$fop.extensions != 0">
+        <xsl:if test="$number &lt;= $count">
+          <fo:table-column column-number="{$number}"
+                           column-width="{6.5 div $count}in"/>
+          <xsl:call-template name="make-html-table-columns">
+            <xsl:with-param name="count" select="$count"/>
+            <xsl:with-param name="number" select="$number + 1"/>
+          </xsl:call-template>
+        </xsl:if>
+      </xsl:when>
+    </xsl:choose>
+  </xsl:template>
+
+  <xsl:template match="tbody" mode="htmlTable">
+    <fo:table-body border-bottom-width="0.25pt"
+                   border-bottom-style="solid"
+                   border-bottom-color="black">
+      <xsl:apply-templates mode="htmlTable"/>
+    </fo:table-body>
+  </xsl:template>
+
+  <xsl:template match="td" mode="htmlTable">
+    <fo:table-cell>
+      <fo:block>
+        <xsl:apply-templates/>
+      </fo:block>
+    </fo:table-cell>
+  </xsl:template>
+
+  <xsl:template match="tfoot" mode="htmlTable">
+    <fo:table-footer>
+      <xsl:apply-templates mode="htmlTable"/>
+    </fo:table-footer>
+  </xsl:template>
+
+  <xsl:template match="th" mode="htmlTable">
+    <fo:table-cell xsl:use-attribute-sets="th.style">
+      <fo:block>
+        <xsl:apply-templates/>
+      </fo:block>
+    </fo:table-cell>
+  </xsl:template>
+
+  <xsl:template match="thead" mode="htmlTable">
+    <fo:table-header border-bottom-width="0.25pt"
+                     border-bottom-style="solid"
+                     border-bottom-color="black"
+                     font-weight="bold">
+      <xsl:apply-templates mode="htmlTable"/>
+    </fo:table-header>
+  </xsl:template>
+
+  <xsl:template match="tr" mode="htmlTable">
+    <fo:table-row>
+      <xsl:apply-templates mode="htmlTable"/>
+    </fo:table-row>
+  </xsl:template>
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/index.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/index.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/index.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,432 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                xmlns:rx="http://www.renderx.com/XSL/Extensions"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: index.xsl,v 1.1.1.1 2004/10/19 21:21:43 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:template match="index">
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+ <xsl:if test="$generate.index != 0">
+  <xsl:choose>
+    <xsl:when test="$make.index.markup != 0">
+      <fo:block>
+        <xsl:call-template name="generate-index-markup">
+          <xsl:with-param name="scope" select="(ancestor::book|/)[last()]"/>
+        </xsl:call-template>
+      </fo:block>
+    </xsl:when>
+    <xsl:otherwise>
+      <fo:block id="{$id}">
+        <xsl:call-template name="index.titlepage"/>
+      </fo:block>
+      <xsl:apply-templates/>
+      <xsl:if test="count(indexentry) = 0 and count(indexdiv) = 0">
+        <xsl:call-template name="generate-index">
+          <xsl:with-param name="scope" select="(ancestor::book|/)[last()]"/>
+        </xsl:call-template>
+      </xsl:if>
+    </xsl:otherwise>
+  </xsl:choose>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template match="book/index|part/index">
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+ <xsl:if test="$generate.index != 0">
+  <xsl:variable name="master-reference">
+    <xsl:call-template name="select.pagemaster">
+      <xsl:with-param name="pageclass">
+        <xsl:if test="$make.index.markup != 0">body</xsl:if>
+      </xsl:with-param>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <fo:page-sequence hyphenate="{$hyphenate}"
+                    master-reference="{$master-reference}">
+    <xsl:attribute name="language">
+      <xsl:call-template name="l10n.language"/>
+    </xsl:attribute>
+    <xsl:attribute name="format">
+      <xsl:call-template name="page.number.format"/>
+    </xsl:attribute>
+    <xsl:if test="$double.sided != 0">
+      <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
+    </xsl:if>
+
+    <xsl:attribute name="hyphenation-character">
+      <xsl:call-template name="gentext">
+        <xsl:with-param name="key" select="'hyphenation-character'"/>
+      </xsl:call-template>
+    </xsl:attribute>
+    <xsl:attribute name="hyphenation-push-character-count">
+      <xsl:call-template name="gentext">
+        <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
+      </xsl:call-template>
+    </xsl:attribute>
+    <xsl:attribute name="hyphenation-remain-character-count">
+      <xsl:call-template name="gentext">
+        <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
+      </xsl:call-template>
+    </xsl:attribute>
+
+    <xsl:apply-templates select="." mode="running.head.mode">
+      <xsl:with-param name="master-reference" select="$master-reference"/>
+    </xsl:apply-templates>
+    <xsl:apply-templates select="." mode="running.foot.mode">
+      <xsl:with-param name="master-reference" select="$master-reference"/>
+    </xsl:apply-templates>
+
+    <fo:flow flow-name="xsl-region-body">
+      <fo:block id="{$id}">
+        <xsl:call-template name="index.titlepage"/>
+      </fo:block>
+      <xsl:apply-templates/>
+      <xsl:if test="count(indexentry) = 0 and count(indexdiv) = 0">
+
+        <xsl:choose>
+          <xsl:when test="$make.index.markup != 0">
+            <fo:block wrap-option='no-wrap'
+                      white-space-collapse='false'
+                      xsl:use-attribute-sets="monospace.verbatim.properties"
+                      linefeed-treatment="preserve">
+              <xsl:call-template name="generate-index-markup">
+                <xsl:with-param name="scope" select="(ancestor::book|/)[last()]"/>
+              </xsl:call-template>
+            </fo:block>
+          </xsl:when>
+          <xsl:when test="indexentry|indexdiv/indexentry">
+            <xsl:apply-templates/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:call-template name="generate-index">
+              <xsl:with-param name="scope" select="(ancestor::book|/)[last()]"/>
+            </xsl:call-template>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:if>
+    </fo:flow>
+  </fo:page-sequence>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template match="setindex">
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+ <xsl:if test="$generate.index != 0">
+  <xsl:variable name="master-reference">
+    <xsl:call-template name="select.pagemaster">
+      <xsl:with-param name="pageclass">
+        <xsl:choose>
+          <xsl:when test="$make.index.markup != 0">body</xsl:when>
+          <xsl:otherwise>index</xsl:otherwise>
+        </xsl:choose>
+      </xsl:with-param>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <fo:page-sequence hyphenate="{$hyphenate}"
+                    master-reference="{$master-reference}">
+    <xsl:attribute name="language">
+      <xsl:call-template name="l10n.language"/>
+    </xsl:attribute>
+    <xsl:attribute name="format">
+      <xsl:call-template name="page.number.format"/>
+    </xsl:attribute>
+    <xsl:if test="$double.sided != 0">
+      <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
+    </xsl:if>
+
+    <xsl:attribute name="hyphenation-character">
+      <xsl:call-template name="gentext">
+        <xsl:with-param name="key" select="'hyphenation-character'"/>
+      </xsl:call-template>
+    </xsl:attribute>
+    <xsl:attribute name="hyphenation-push-character-count">
+      <xsl:call-template name="gentext">
+        <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
+      </xsl:call-template>
+    </xsl:attribute>
+    <xsl:attribute name="hyphenation-remain-character-count">
+      <xsl:call-template name="gentext">
+        <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
+      </xsl:call-template>
+    </xsl:attribute>
+
+    <xsl:apply-templates select="." mode="running.head.mode">
+      <xsl:with-param name="master-reference" select="$master-reference"/>
+    </xsl:apply-templates>
+    <xsl:apply-templates select="." mode="running.foot.mode">
+      <xsl:with-param name="master-reference" select="$master-reference"/>
+    </xsl:apply-templates>
+
+    <fo:flow flow-name="xsl-region-body">
+      <fo:block id="{$id}">
+        <xsl:call-template name="setindex.titlepage"/>
+      </fo:block>
+      <xsl:apply-templates/>
+      <xsl:if test="count(indexentry) = 0 and count(indexdiv) = 0">
+
+        <xsl:choose>
+          <xsl:when test="$make.index.markup != 0">
+            <fo:block wrap-option='no-wrap'
+                      white-space-collapse='false'
+                      xsl:use-attribute-sets="monospace.verbatim.properties"
+                      linefeed-treatment="preserve">
+              <xsl:call-template name="generate-index-markup">
+                <xsl:with-param name="scope" select="/"/>
+              </xsl:call-template>
+            </fo:block>
+          </xsl:when>
+          <xsl:when test="indexentry|indexdiv/indexentry">
+            <xsl:apply-templates/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:call-template name="generate-index">
+              <xsl:with-param name="scope" select="/"/>
+            </xsl:call-template>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:if>
+    </fo:flow>
+  </fo:page-sequence>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template match="index/title"></xsl:template>
+<xsl:template match="index/subtitle"></xsl:template>
+<xsl:template match="index/titleabbrev"></xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="indexdiv.title">
+  <xsl:param name="title"/>
+  <xsl:param name="titlecontent"/>
+
+  <fo:block margin-left="0pt"
+	    font-size="14.4pt"
+            font-family="{$title.fontset}"
+            font-weight="bold"
+            keep-with-next.within-column="always"
+            space-before.optimum="{$body.font.master}pt"
+            space-before.minimum="{$body.font.master * 0.8}pt"
+            space-before.maximum="{$body.font.master * 1.2}pt">
+    <xsl:choose>
+      <xsl:when test="$title">
+        <xsl:apply-templates select="." mode="object.title.markup">
+          <xsl:with-param name="allow-anchors" select="1"/>
+        </xsl:apply-templates>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:copy-of select="$titlecontent"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="indexdiv">
+  <fo:block>
+    <xsl:call-template name="indexdiv.titlepage"/>
+    <xsl:apply-templates/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="indexdiv/title"/>
+<xsl:template match="indexdiv/subtitle"/>
+<xsl:template match="indexdiv/titleabbrev"/>
+
+<!-- ==================================================================== -->
+
+<!-- Text used for distiguishing between normal and significant entries -->
+<xsl:variable name="significant.flag">.tnacifingis</xsl:variable>
+
+<xsl:template match="indexterm" name="indexterm">
+  <!-- Temporal workaround for bug in AXF -->
+  <xsl:variable name="wrapper.name">
+    <xsl:choose>
+      <xsl:when test="$axf.extensions != 0">fo:block</xsl:when>
+      <xsl:otherwise>fo:wrapper</xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:element name="{$wrapper.name}">
+    <xsl:attribute name="id">
+      <xsl:call-template name="object.id"/>
+    </xsl:attribute>
+    <xsl:choose>
+      <xsl:when test="$xep.extensions != 0">
+        <xsl:attribute name="rx:key">
+          <xsl:value-of select="primary"/>
+          <xsl:if test="@significance='preferred'"><xsl:value-of select="$significant.flag"/></xsl:if>
+          <xsl:if test="secondary">
+            <xsl:text>, </xsl:text>
+            <xsl:value-of select="secondary"/>
+          </xsl:if>
+          <xsl:if test="tertiary">
+            <xsl:text>, </xsl:text>
+            <xsl:value-of select="tertiary"/>
+          </xsl:if>
+        </xsl:attribute>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:comment>
+          <xsl:call-template name="comment-escape-string">
+            <xsl:with-param name="string">
+              <xsl:value-of select="primary"/>
+              <xsl:if test="secondary">
+                <xsl:text>, </xsl:text>
+                <xsl:value-of select="secondary"/>
+              </xsl:if>
+              <xsl:if test="tertiary">
+                <xsl:text>, </xsl:text>
+                <xsl:value-of select="tertiary"/>
+              </xsl:if>
+            </xsl:with-param>
+          </xsl:call-template>
+        </xsl:comment>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:element>
+</xsl:template>
+
+<xsl:template match="indexterm[@class='startofrange']">
+  <xsl:choose>
+    <xsl:when test="$xep.extensions != 0">
+      <rx:begin-index-range>
+        <xsl:attribute name="id">
+          <xsl:value-of select="@id"/>
+        </xsl:attribute>
+        <xsl:attribute name="rx:key">
+          <xsl:value-of select="primary"/>
+          <xsl:if test="@significance='preferred'"><xsl:value-of select="$significant.flag"/></xsl:if>
+          <xsl:if test="secondary">
+            <xsl:text>, </xsl:text>
+            <xsl:value-of select="secondary"/>
+          </xsl:if>
+          <xsl:if test="tertiary">
+            <xsl:text>, </xsl:text>
+            <xsl:value-of select="tertiary"/>
+          </xsl:if>
+        </xsl:attribute>
+      </rx:begin-index-range>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:call-template name="indexterm"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="indexterm[@class='endofrange']">
+  <xsl:choose>
+    <xsl:when test="$xep.extensions != 0">
+      <rx:end-index-range>
+        <xsl:attribute name="ref-id">
+          <xsl:value-of select="@startref"/>
+        </xsl:attribute>
+      </rx:end-index-range>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:call-template name="indexterm"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="indexentry">
+  <fo:block>
+    <!-- don't process 'seeie's from here -->
+    <xsl:apply-templates select="primaryie|secondaryie|tertiaryie|seealsoie"/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="primaryie">
+  <fo:block>
+    <xsl:apply-templates/>
+    <xsl:if test="following-sibling::seeie">
+      <xsl:text> (</xsl:text>
+      <xsl:call-template name="gentext">
+        <xsl:with-param name="key" select="'see'"/>
+      </xsl:call-template>
+      <xsl:text> </xsl:text>
+      <xsl:apply-templates select="following-sibling::seeie"/>
+      <xsl:text>)</xsl:text>
+    </xsl:if>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="secondaryie">
+  <fo:block start-indent="1pc">
+    <xsl:apply-templates/>
+    <xsl:if test="following-sibling::seeie">
+      <xsl:text> (</xsl:text>
+      <xsl:call-template name="gentext">
+        <xsl:with-param name="key" select="'see'"/>
+      </xsl:call-template>
+      <xsl:text> </xsl:text>
+      <xsl:apply-templates select="following-sibling::seeie"/>
+      <xsl:text>)</xsl:text>
+    </xsl:if>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="tertiaryie">
+  <fo:block start-indent="2pc">
+    <xsl:apply-templates/>
+    <xsl:if test="following-sibling::seeie">
+      <xsl:text> (</xsl:text>
+      <xsl:call-template name="gentext">
+        <xsl:with-param name="key" select="'see'"/>
+      </xsl:call-template>
+      <xsl:text> </xsl:text>
+      <xsl:apply-templates select="following-sibling::seeie"/>
+      <xsl:text>)</xsl:text>
+    </xsl:if>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="seeie">
+  <fo:inline>
+    <xsl:apply-templates/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="seealsoie">
+  <fo:block>
+    <xsl:attribute name="start-indent">
+      <xsl:choose>
+        <xsl:when test="preceding-sibling::tertiaryie">3pc</xsl:when>
+        <xsl:when test="preceding-sibling::secondaryie">2pc</xsl:when>
+        <xsl:otherwise>1pc</xsl:otherwise>
+      </xsl:choose>
+    </xsl:attribute>
+    <xsl:text>(</xsl:text>
+    <xsl:call-template name="gentext">
+      <xsl:with-param name="key" select="'seealso'"/>
+    </xsl:call-template>
+    <xsl:text> </xsl:text>
+    <xsl:apply-templates/>
+    <xsl:text>)</xsl:text>
+  </fo:block>
+</xsl:template>
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/info.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/info.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/info.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,34 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: info.xsl,v 1.1.1.1 2004/10/19 21:21:43 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- These templates define the "default behavior" for info
+     elements.  Even if you don't process the *info wrappers,
+     some of these elements are needed because the elements are
+     processed from named templates that are called with modes.
+     Since modes aren't sticky, these rules apply. 
+     (TODO: clarify this comment) -->
+
+<!-- ==================================================================== -->
+<!-- called from named templates in a given mode -->
+
+<xsl:template match="corpauthor">
+  <fo:inline>
+    <xsl:apply-templates/>
+  </fo:inline>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/inline.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/inline.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/inline.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1003 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                xmlns:xlink='http://www.w3.org/1999/xlink'
+                exclude-result-prefixes="xlink"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: inline.xsl,v 1.1.1.1 2004/10/19 21:21:43 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<xsl:template name="simple.xlink">
+  <xsl:param name="node" select="."/>
+  <xsl:param name="content">
+    <xsl:apply-templates/>
+  </xsl:param>
+
+  <xsl:choose>
+    <xsl:when test="$node/@xlink:type='simple' and $node/@xlink:href">
+      <fo:basic-link>
+        <xsl:attribute name="href">
+          <xsl:choose>
+            <!-- if the href starts with # and does not contain an "(" -->
+            <!-- or if the href starts with #xpointer(id(, it's just an ID -->
+            <xsl:when test="starts-with(@xlink:href,'#')
+                            and (not(contains(@xlink:href,'&#40;'))
+                            or starts-with(@xlink:href,'#xpointer&#40;id&#40;'))">
+              <xsl:variable name="idref">
+                <xsl:call-template name="xpointer.idref">
+                  <xsl:with-param name="xpointer" select="@xlink:href"/>
+                </xsl:call-template>
+              </xsl:variable>
+
+              <xsl:variable name="targets" select="key('id',$idref)"/>
+              <xsl:variable name="target" select="$targets[1]"/>
+
+              <xsl:call-template name="check.id.unique">
+                <xsl:with-param name="linkend" select="@linkend"/>
+              </xsl:call-template>
+
+              <xsl:choose>
+                <xsl:when test="count($target) = 0">
+                  <xsl:message>
+                    <xsl:text>XLink to nonexistent id: </xsl:text>
+                    <xsl:value-of select="$idref"/>
+                  </xsl:message>
+                  <xsl:text>???</xsl:text>
+                </xsl:when>
+                <xsl:otherwise>
+                  <xsl:attribute name="internal-destination">
+                    <xsl:value-of select="$target/@id"/>
+                  </xsl:attribute>
+                </xsl:otherwise>
+              </xsl:choose>
+            </xsl:when>
+
+            <!-- otherwise it's a URI -->
+            <xsl:otherwise>
+              <xsl:attribute name="internal-destination">
+                <xsl:value-of select="@xlink.href"/>
+              </xsl:attribute>
+            </xsl:otherwise>
+          </xsl:choose>
+        </xsl:attribute>
+        <xsl:copy-of select="$content"/>
+      </fo:basic-link>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:copy-of select="$content"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="inline.charseq">
+  <xsl:param name="content">
+    <xsl:apply-templates/>
+  </xsl:param>
+
+  <xsl:choose>
+    <xsl:when test="@dir">
+      <fo:inline>
+        <xsl:attribute name="direction">
+          <xsl:choose>
+            <xsl:when test="@dir = 'ltr' or @dir = 'lro'">ltr</xsl:when>
+            <xsl:otherwise>rtl</xsl:otherwise>
+          </xsl:choose>
+        </xsl:attribute>
+        <xsl:copy-of select="$content"/>
+      </fo:inline>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:copy-of select="$content"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="inline.monoseq">
+  <xsl:param name="content">
+    <xsl:apply-templates/>
+  </xsl:param>
+  <fo:inline xsl:use-attribute-sets="monospace.properties">
+    <xsl:if test="@dir">
+      <xsl:attribute name="direction">
+        <xsl:choose>
+          <xsl:when test="@dir = 'ltr' or @dir = 'lro'">ltr</xsl:when>
+          <xsl:otherwise>rtl</xsl:otherwise>
+        </xsl:choose>
+      </xsl:attribute>
+    </xsl:if>
+    <xsl:copy-of select="$content"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template name="inline.boldseq">
+  <xsl:param name="content">
+    <xsl:apply-templates/>
+  </xsl:param>
+  <fo:inline font-weight="bold">
+    <xsl:if test="@dir">
+      <xsl:attribute name="direction">
+        <xsl:choose>
+          <xsl:when test="@dir = 'ltr' or @dir = 'lro'">ltr</xsl:when>
+          <xsl:otherwise>rtl</xsl:otherwise>
+        </xsl:choose>
+      </xsl:attribute>
+    </xsl:if>
+    <xsl:copy-of select="$content"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template name="inline.italicseq">
+  <xsl:param name="content">
+    <xsl:apply-templates/>
+  </xsl:param>
+  <fo:inline font-style="italic">
+    <xsl:if test="@id">
+      <xsl:attribute name="id">
+        <xsl:value-of select="@id"/>
+      </xsl:attribute>
+    </xsl:if>
+    <xsl:if test="@dir">
+      <xsl:attribute name="direction">
+        <xsl:choose>
+          <xsl:when test="@dir = 'ltr' or @dir = 'lro'">ltr</xsl:when>
+          <xsl:otherwise>rtl</xsl:otherwise>
+        </xsl:choose>
+      </xsl:attribute>
+    </xsl:if>
+    <xsl:copy-of select="$content"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template name="inline.boldmonoseq">
+  <xsl:param name="content">
+    <xsl:apply-templates/>
+  </xsl:param>
+  <fo:inline font-weight="bold" xsl:use-attribute-sets="monospace.properties">
+    <xsl:if test="@id">
+      <xsl:attribute name="id">
+        <xsl:value-of select="@id"/>
+      </xsl:attribute>
+    </xsl:if>
+    <xsl:if test="@dir">
+      <xsl:attribute name="direction">
+        <xsl:choose>
+          <xsl:when test="@dir = 'ltr' or @dir = 'lro'">ltr</xsl:when>
+          <xsl:otherwise>rtl</xsl:otherwise>
+        </xsl:choose>
+      </xsl:attribute>
+    </xsl:if>
+    <xsl:copy-of select="$content"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template name="inline.italicmonoseq">
+  <xsl:param name="content">
+    <xsl:apply-templates/>
+  </xsl:param>
+  <fo:inline font-style="italic" xsl:use-attribute-sets="monospace.properties">
+    <xsl:if test="@id">
+      <xsl:attribute name="id">
+        <xsl:value-of select="@id"/>
+      </xsl:attribute>
+    </xsl:if>
+    <xsl:if test="@dir">
+      <xsl:attribute name="direction">
+        <xsl:choose>
+          <xsl:when test="@dir = 'ltr' or @dir = 'lro'">ltr</xsl:when>
+          <xsl:otherwise>rtl</xsl:otherwise>
+        </xsl:choose>
+      </xsl:attribute>
+    </xsl:if>
+    <xsl:copy-of select="$content"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template name="inline.superscriptseq">
+  <xsl:param name="content">
+    <xsl:apply-templates/>
+  </xsl:param>
+
+  <fo:inline xsl:use-attribute-sets="superscript.properties">
+    <xsl:if test="@id">
+      <xsl:attribute name="id">
+        <xsl:value-of select="@id"/>
+      </xsl:attribute>
+    </xsl:if>
+    <xsl:if test="@dir">
+      <xsl:attribute name="direction">
+        <xsl:choose>
+          <xsl:when test="@dir = 'ltr' or @dir = 'lro'">ltr</xsl:when>
+          <xsl:otherwise>rtl</xsl:otherwise>
+        </xsl:choose>
+      </xsl:attribute>
+    </xsl:if>
+    <xsl:choose>
+      <xsl:when test="$fop.extensions != 0">
+        <xsl:attribute name="vertical-align">super</xsl:attribute>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:attribute name="baseline-shift">super</xsl:attribute>
+      </xsl:otherwise>
+    </xsl:choose>
+    <xsl:copy-of select="$content"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template name="inline.subscriptseq">
+  <xsl:param name="content">
+    <xsl:apply-templates/>
+  </xsl:param>
+
+  <fo:inline xsl:use-attribute-sets="subscript.properties">
+    <xsl:if test="@id">
+      <xsl:attribute name="id">
+        <xsl:value-of select="@id"/>
+      </xsl:attribute>
+    </xsl:if>
+    <xsl:if test="@dir">
+      <xsl:attribute name="direction">
+        <xsl:choose>
+          <xsl:when test="@dir = 'ltr' or @dir = 'lro'">ltr</xsl:when>
+          <xsl:otherwise>rtl</xsl:otherwise>
+        </xsl:choose>
+      </xsl:attribute>
+    </xsl:if>
+    <xsl:choose>
+      <xsl:when test="$fop.extensions != 0">
+        <xsl:attribute name="vertical-align">sub</xsl:attribute>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:attribute name="baseline-shift">sub</xsl:attribute>
+      </xsl:otherwise>
+    </xsl:choose>
+    <xsl:copy-of select="$content"/>
+  </fo:inline>
+</xsl:template>
+
+<!-- ==================================================================== -->
+<!-- some special cases -->
+
+<xsl:template match="author">
+  <xsl:call-template name="person.name"/>
+</xsl:template>
+
+<xsl:template match="editor">
+  <xsl:call-template name="person.name"/>
+</xsl:template>
+
+<xsl:template match="othercredit">
+  <xsl:call-template name="person.name"/>
+</xsl:template>
+
+<xsl:template match="authorinitials">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="accel">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="action">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="application">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="classname">
+  <xsl:call-template name="inline.monoseq"/>
+</xsl:template>
+
+<xsl:template match="exceptionname">
+  <xsl:call-template name="inline.monoseq"/>
+</xsl:template>
+
+<xsl:template match="interfacename">
+  <xsl:call-template name="inline.monoseq"/>
+</xsl:template>
+
+<xsl:template match="methodname">
+  <xsl:call-template name="inline.monoseq"/>
+</xsl:template>
+
+<xsl:template match="command">
+  <xsl:call-template name="inline.boldseq"/>
+</xsl:template>
+
+<xsl:template match="computeroutput">
+  <xsl:call-template name="inline.monoseq"/>
+</xsl:template>
+
+<xsl:template match="constant">
+  <xsl:call-template name="inline.monoseq"/>
+</xsl:template>
+
+<xsl:template match="database">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="errorcode">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="errorname">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="errortype">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="errortext">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="envar">
+  <xsl:call-template name="inline.monoseq"/>
+</xsl:template>
+
+<xsl:template match="filename">
+  <xsl:call-template name="inline.monoseq"/>
+</xsl:template>
+
+<xsl:template match="function">
+  <xsl:choose>
+    <xsl:when test="$function.parens != '0'
+                    and (parameter or function or replaceable)">
+      <xsl:variable name="nodes" select="text()|*"/>
+      <xsl:call-template name="inline.monoseq">
+        <xsl:with-param name="content">
+          <xsl:call-template name="simple.xlink">
+            <xsl:with-param name="content">
+              <xsl:apply-templates select="$nodes[1]"/>
+            </xsl:with-param>
+          </xsl:call-template>
+        </xsl:with-param>
+      </xsl:call-template>
+      <xsl:text>(</xsl:text>
+      <xsl:apply-templates select="$nodes[position()>1]"/>
+      <xsl:text>)</xsl:text>
+    </xsl:when>
+    <xsl:otherwise>
+     <xsl:call-template name="inline.monoseq"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="function/parameter" priority="2">
+  <xsl:call-template name="inline.italicmonoseq"/>
+  <xsl:if test="following-sibling::*">
+    <xsl:text>, </xsl:text>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="function/replaceable" priority="2">
+  <xsl:call-template name="inline.italicmonoseq"/>
+  <xsl:if test="following-sibling::*">
+    <xsl:text>, </xsl:text>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="guibutton">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="guiicon">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="guilabel">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="guimenu">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="guimenuitem">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="guisubmenu">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="hardware">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="interface">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="interfacedefinition">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="keycap">
+  <xsl:call-template name="inline.boldseq"/>
+</xsl:template>
+
+<xsl:template match="keycode">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="keysym">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="literal">
+  <xsl:call-template name="inline.monoseq"/>
+</xsl:template>
+
+<xsl:template match="code">
+  <xsl:call-template name="inline.monoseq"/>
+</xsl:template>
+
+<xsl:template match="medialabel">
+  <xsl:call-template name="inline.italicseq"/>
+</xsl:template>
+
+<xsl:template match="shortcut">
+  <xsl:call-template name="inline.boldseq"/>
+</xsl:template>
+
+<xsl:template match="mousebutton">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="option">
+  <xsl:call-template name="inline.monoseq"/>
+</xsl:template>
+
+<xsl:template match="parameter">
+  <xsl:call-template name="inline.italicmonoseq"/>
+</xsl:template>
+
+<xsl:template match="property">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="prompt">
+  <xsl:call-template name="inline.monoseq"/>
+</xsl:template>
+
+<xsl:template match="replaceable">
+  <xsl:call-template name="inline.italicmonoseq"/>
+</xsl:template>
+
+<xsl:template match="returnvalue">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="structfield">
+  <xsl:call-template name="inline.italicmonoseq"/>
+</xsl:template>
+
+<xsl:template match="structname">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="symbol">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="systemitem">
+  <xsl:call-template name="inline.monoseq"/>
+</xsl:template>
+
+<xsl:template match="token">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="type">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="userinput">
+  <xsl:call-template name="inline.boldmonoseq"/>
+</xsl:template>
+
+<xsl:template match="abbrev">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="acronym">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="citerefentry">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="citetitle">
+  <xsl:choose>
+    <xsl:when test="@pubwork = 'article'">
+      <xsl:call-template name="gentext.startquote"/>
+      <xsl:call-template name="inline.charseq"/>
+      <xsl:call-template name="gentext.endquote"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:call-template name="inline.italicseq"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="emphasis">
+  <xsl:variable name="depth">
+    <xsl:call-template name="dot.count">
+      <xsl:with-param name="string"><xsl:number level="multiple"/></xsl:with-param>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="@role='bold'">
+      <xsl:call-template name="inline.boldseq"/>
+    </xsl:when>
+    <xsl:when test="@role='underline'">
+      <fo:inline text-decoration="underline">
+        <xsl:call-template name="inline.charseq"/>
+      </fo:inline>
+    </xsl:when>
+    <xsl:when test="@role='strikethrough'">
+      <fo:inline text-decoration="line-through">
+        <xsl:call-template name="inline.charseq"/>
+      </fo:inline>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:choose>
+        <xsl:when test="$depth mod 2 = 1">
+          <fo:inline font-style="normal">
+            <xsl:apply-templates/>
+          </fo:inline>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:call-template name="inline.italicseq"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="foreignphrase">
+  <xsl:call-template name="inline.italicseq"/>
+</xsl:template>
+
+<xsl:template match="markup">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="phrase">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="quote">
+  <xsl:variable name="depth">
+    <xsl:call-template name="dot.count">
+      <xsl:with-param name="string"><xsl:number level="multiple"/></xsl:with-param>
+    </xsl:call-template>
+  </xsl:variable>
+  <xsl:choose>
+    <xsl:when test="$depth mod 2 = 0">
+      <xsl:call-template name="gentext.startquote"/>
+      <xsl:call-template name="inline.charseq"/>
+      <xsl:call-template name="gentext.endquote"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:call-template name="gentext.nestedstartquote"/>
+      <xsl:call-template name="inline.charseq"/>
+      <xsl:call-template name="gentext.nestedendquote"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="varname">
+  <xsl:call-template name="inline.monoseq"/>
+</xsl:template>
+
+<xsl:template match="wordasword">
+  <xsl:call-template name="inline.italicseq"/>
+</xsl:template>
+
+<xsl:template match="lineannotation">
+  <fo:inline font-style="italic">
+    <xsl:call-template name="inline.charseq"/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="superscript">
+  <xsl:call-template name="inline.superscriptseq"/>
+</xsl:template>
+
+<xsl:template match="subscript">
+  <xsl:call-template name="inline.subscriptseq"/>
+</xsl:template>
+
+<xsl:template match="trademark">
+  <xsl:call-template name="inline.charseq"/>
+  <xsl:if test="@class">
+    <xsl:call-template name="dingbat">
+      <xsl:with-param name="dingbat" select="@class"/>
+    </xsl:call-template>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="firstterm">
+  <xsl:call-template name="glossterm">
+    <xsl:with-param name="firstterm" select="1"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="glossterm" name="glossterm">
+  <xsl:param name="firstterm" select="0"/>
+
+  <xsl:choose>
+    <xsl:when test="($firstterm.only.link = 0 or $firstterm = 1) and @linkend">
+      <fo:basic-link internal-destination="{@linkend}"
+                     xsl:use-attribute-sets="xref.properties">
+        <xsl:call-template name="inline.italicseq"/>
+      </fo:basic-link>
+    </xsl:when>
+
+    <xsl:when test="not(@linkend)
+                    and ($firstterm.only.link = 0 or $firstterm = 1)
+                    and ($glossterm.auto.link != 0)
+                    and $glossary.collection != ''">
+      <xsl:variable name="term">
+        <xsl:choose>
+          <xsl:when test="@baseform"><xsl:value-of select="@baseform"/></xsl:when>
+          <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
+        </xsl:choose>
+      </xsl:variable>
+      <xsl:variable name="cterm"
+           select="(document($glossary.collection,.)//glossentry[glossterm=$term])[1]"/>
+
+      <xsl:choose>
+        <xsl:when test="not($cterm)">
+          <xsl:message>
+            <xsl:text>There's no entry for </xsl:text>
+            <xsl:value-of select="$term"/>
+            <xsl:text> in </xsl:text>
+            <xsl:value-of select="$glossary.collection"/>
+          </xsl:message>
+          <xsl:call-template name="inline.italicseq"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:variable name="id">
+            <xsl:choose>
+              <xsl:when test="$cterm/@id">
+                <xsl:value-of select="$cterm/@id"/>
+              </xsl:when>
+              <xsl:otherwise>
+                <xsl:value-of select="generate-id($cterm)"/>
+              </xsl:otherwise>
+            </xsl:choose>
+          </xsl:variable>
+          <fo:basic-link internal-destination="{$id}"
+                         xsl:use-attribute-sets="xref.properties">
+            <xsl:call-template name="inline.italicseq"/>
+          </fo:basic-link>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+
+    <xsl:when test="not(@linkend)
+                    and ($firstterm.only.link = 0 or $firstterm = 1)
+                    and $glossterm.auto.link != 0">
+      <xsl:variable name="term">
+        <xsl:choose>
+          <xsl:when test="@baseform">
+            <xsl:value-of select="@baseform"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:value-of select="."/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:variable>
+
+      <xsl:variable name="targets"
+                    select="//glossentry[glossterm=$term or glossterm/@baseform=$term]"/>
+
+      <xsl:variable name="target" select="$targets[1]"/>
+
+      <xsl:choose>
+        <xsl:when test="count($targets)=0">
+          <xsl:message>
+            <xsl:text>Error: no glossentry for glossterm: </xsl:text>
+            <xsl:value-of select="."/>
+            <xsl:text>.</xsl:text>
+          </xsl:message>
+          <xsl:call-template name="inline.italicseq"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:variable name="termid">
+            <xsl:call-template name="object.id">
+              <xsl:with-param name="object" select="$target"/>
+            </xsl:call-template>
+          </xsl:variable>
+
+          <fo:basic-link internal-destination="{$termid}"
+                         xsl:use-attribute-sets="xref.properties">
+            <xsl:call-template name="inline.charseq"/>
+          </fo:basic-link>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:call-template name="inline.italicseq"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="sgmltag">
+  <xsl:variable name="class">
+    <xsl:choose>
+      <xsl:when test="@class">
+        <xsl:value-of select="@class"/>
+      </xsl:when>
+      <xsl:otherwise>element</xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="$class='attribute'">
+      <xsl:call-template name="inline.monoseq"/>
+    </xsl:when>
+    <xsl:when test="$class='attvalue'">
+      <xsl:call-template name="inline.monoseq"/>
+    </xsl:when>
+    <xsl:when test="$class='element'">
+      <xsl:call-template name="inline.monoseq"/>
+    </xsl:when>
+    <xsl:when test="$class='endtag'">
+      <xsl:call-template name="inline.monoseq">
+        <xsl:with-param name="content">
+          <xsl:text>&lt;/</xsl:text>
+          <xsl:apply-templates/>
+          <xsl:text>&gt;</xsl:text>
+        </xsl:with-param>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:when test="$class='genentity'">
+      <xsl:call-template name="inline.monoseq">
+        <xsl:with-param name="content">
+          <xsl:text>&amp;</xsl:text>
+          <xsl:apply-templates/>
+          <xsl:text>;</xsl:text>
+        </xsl:with-param>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:when test="$class='numcharref'">
+      <xsl:call-template name="inline.monoseq">
+        <xsl:with-param name="content">
+          <xsl:text>&amp;#</xsl:text>
+          <xsl:apply-templates/>
+          <xsl:text>;</xsl:text>
+        </xsl:with-param>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:when test="$class='paramentity'">
+      <xsl:call-template name="inline.monoseq">
+        <xsl:with-param name="content">
+          <xsl:text>%</xsl:text>
+          <xsl:apply-templates/>
+          <xsl:text>;</xsl:text>
+        </xsl:with-param>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:when test="$class='pi'">
+      <xsl:call-template name="inline.monoseq">
+        <xsl:with-param name="content">
+          <xsl:text>&lt;?</xsl:text>
+          <xsl:apply-templates/>
+          <xsl:text>&gt;</xsl:text>
+        </xsl:with-param>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:when test="$class='xmlpi'">
+      <xsl:call-template name="inline.monoseq">
+        <xsl:with-param name="content">
+          <xsl:text>&lt;?</xsl:text>
+          <xsl:apply-templates/>
+          <xsl:text>?&gt;</xsl:text>
+        </xsl:with-param>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:when test="$class='starttag'">
+      <xsl:call-template name="inline.monoseq">
+        <xsl:with-param name="content">
+          <xsl:text>&lt;</xsl:text>
+          <xsl:apply-templates/>
+          <xsl:text>&gt;</xsl:text>
+        </xsl:with-param>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:when test="$class='emptytag'">
+      <xsl:call-template name="inline.monoseq">
+        <xsl:with-param name="content">
+          <xsl:text>&lt;</xsl:text>
+          <xsl:apply-templates/>
+          <xsl:text>/&gt;</xsl:text>
+        </xsl:with-param>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:when test="$class='sgmlcomment'">
+      <xsl:call-template name="inline.monoseq">
+        <xsl:with-param name="content">
+          <xsl:text>&lt;!--</xsl:text>
+          <xsl:apply-templates/>
+          <xsl:text>--&gt;</xsl:text>
+        </xsl:with-param>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:call-template name="inline.charseq"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="email">
+  <xsl:call-template name="inline.monoseq">
+    <xsl:with-param name="content">
+      <fo:inline keep-together.within-line="always" hyphenate="false">
+        <xsl:text>&lt;</xsl:text>
+        <xsl:apply-templates/>
+        <xsl:text>&gt;</xsl:text>
+      </fo:inline>
+    </xsl:with-param>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="keycombo">
+  <xsl:variable name="action" select="@action"/>
+  <xsl:variable name="joinchar">
+    <xsl:choose>
+      <xsl:when test="$action='seq'"><xsl:text> </xsl:text></xsl:when>
+      <xsl:when test="$action='simul'">+</xsl:when>
+      <xsl:when test="$action='press'">-</xsl:when>
+      <xsl:when test="$action='click'">-</xsl:when>
+      <xsl:when test="$action='double-click'">-</xsl:when>
+      <xsl:when test="$action='other'"></xsl:when>
+      <xsl:otherwise>-</xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+  <xsl:for-each select="*">
+    <xsl:if test="position()>1"><xsl:value-of select="$joinchar"/></xsl:if>
+    <xsl:apply-templates select="."/>
+  </xsl:for-each>
+</xsl:template>
+
+<xsl:template match="orgname">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="uri">
+  <xsl:call-template name="inline.monoseq"/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="menuchoice">
+  <xsl:variable name="shortcut" select="./shortcut"/>
+  <xsl:call-template name="process.menuchoice"/>
+  <xsl:if test="$shortcut">
+    <xsl:text> (</xsl:text>
+    <xsl:apply-templates select="$shortcut"/>
+    <xsl:text>)</xsl:text>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template name="process.menuchoice">
+  <xsl:param name="nodelist" select="guibutton|guiicon|guilabel|guimenu|guimenuitem|guisubmenu|interface"/><!-- not(shortcut) -->
+  <xsl:param name="count" select="1"/>
+
+  <xsl:choose>
+    <xsl:when test="$count>count($nodelist)"></xsl:when>
+    <xsl:when test="$count=1">
+      <xsl:apply-templates select="$nodelist[$count=position()]"/>
+      <xsl:call-template name="process.menuchoice">
+        <xsl:with-param name="nodelist" select="$nodelist"/>
+        <xsl:with-param name="count" select="$count+1"/>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:variable name="node" select="$nodelist[$count=position()]"/>
+      <xsl:choose>
+        <xsl:when test="name($node)='guimenuitem'
+                        or name($node)='guisubmenu'">
+          <xsl:value-of select="$menuchoice.menu.separator"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="$menuchoice.separator"/>
+        </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="$node"/>
+      <xsl:call-template name="process.menuchoice">
+        <xsl:with-param name="nodelist" select="$nodelist"/>
+        <xsl:with-param name="count" select="$count+1"/>
+      </xsl:call-template>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="optional">
+  <xsl:value-of select="$arg.choice.opt.open.str"/>
+  <xsl:call-template name="inline.charseq"/>
+  <xsl:value-of select="$arg.choice.opt.close.str"/>
+</xsl:template>
+
+<xsl:template match="citation">
+  <!-- todo: biblio-citation-check -->
+  <xsl:text>[</xsl:text>
+  <xsl:call-template name="inline.charseq"/>
+  <xsl:text>]</xsl:text>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="comment|remark">
+  <xsl:if test="$show.comments != 0">
+    <fo:block font-style="italic">
+      <xsl:call-template name="inline.charseq"/>
+    </fo:block>
+  </xsl:if>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="productname">
+  <xsl:call-template name="inline.charseq"/>
+  <xsl:if test="@class">
+    <xsl:call-template name="dingbat">
+      <xsl:with-param name="dingbat" select="@class"/>
+    </xsl:call-template>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="productnumber">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="pob|street|city|state|postcode|country|otheraddr">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="phone|fax">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<!-- in Addresses, for example -->
+<xsl:template match="honorific|firstname|surname|lineage|othername">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="personname">
+  <xsl:call-template name="anchor"/>
+  <xsl:call-template name="person.name"/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="beginpage">
+  <!-- does nothing; this *is not* markup to force a page break. -->
+</xsl:template>
+
+</xsl:stylesheet>
+

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/keywords.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/keywords.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/keywords.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,21 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: keywords.xsl,v 1.1.1.1 2004/10/19 21:21:43 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<xsl:template match="keywordset"></xsl:template>
+<xsl:template match="subjectset"></xsl:template>
+
+<!-- ==================================================================== -->
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/lists.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/lists.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/lists.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1024 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: lists.xsl,v 1.1.1.1 2004/10/19 21:21:43 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:template match="itemizedlist">
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <xsl:variable name="label-width">
+    <xsl:call-template name="dbfo-attribute">
+      <xsl:with-param name="pis"
+                      select="processing-instruction('dbfo')"/>
+      <xsl:with-param name="attribute" select="'label-width'"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:if test="title">
+    <xsl:apply-templates select="title" mode="list.title.mode"/>
+  </xsl:if>
+
+  <!-- Preserve order of PIs and comments -->
+  <xsl:apply-templates 
+      select="*[not(self::listitem
+                or self::title
+                or self::titleabbrev)]
+              |comment()[not(preceding-sibling::listitem)]
+              |processing-instruction()[not(preceding-sibling::listitem)]"/>
+
+  <fo:list-block id="{$id}" xsl:use-attribute-sets="list.block.spacing"
+                 provisional-label-separation="0.2em">
+    <xsl:attribute name="provisional-distance-between-starts">
+      <xsl:choose>
+        <xsl:when test="$label-width != ''">
+          <xsl:value-of select="$label-width"/>
+        </xsl:when>
+        <xsl:otherwise>1.5em</xsl:otherwise>
+      </xsl:choose>
+    </xsl:attribute>
+    <xsl:apply-templates 
+          select="listitem
+                  |comment()[preceding-sibling::listitem]
+                  |processing-instruction()[preceding-sibling::listitem]"/>
+  </fo:list-block>
+</xsl:template>
+
+<xsl:template match="itemizedlist/title|orderedlist/title">
+  <!--nop-->
+</xsl:template>
+
+<xsl:template match="variablelist/title" mode="vl.as.list">
+  <!--nop-->
+</xsl:template>
+
+<xsl:template match="variablelist/title" mode="vl.as.blocks">
+  <!--nop-->
+</xsl:template>
+
+<xsl:template match="itemizedlist/titleabbrev|orderedlist/titleabbrev">
+  <!--nop-->
+</xsl:template>
+
+<xsl:template match="procedure/titleabbrev">
+  <!--nop-->
+</xsl:template>
+
+<xsl:template match="variablelist/titleabbrev" mode="vl.as.list">
+  <!--nop-->
+</xsl:template>
+
+<xsl:template match="variablelist/titleabbrev" mode="vl.as.blocks">
+  <!--nop-->
+</xsl:template>
+
+<xsl:template match="itemizedlist/listitem">
+  <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
+
+  <xsl:variable name="itemsymbol">
+    <xsl:call-template name="list.itemsymbol">
+      <xsl:with-param name="node" select="parent::itemizedlist"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="item.contents">
+    <fo:list-item-label end-indent="label-end()">
+      <fo:block>
+        <xsl:choose>
+          <xsl:when test="$itemsymbol='disc'">&#x2022;</xsl:when>
+          <xsl:when test="$itemsymbol='bullet'">&#x2022;</xsl:when>
+          <!-- why do these symbols not work? -->
+          <!--
+          <xsl:when test="$itemsymbol='circle'">&#x2218;</xsl:when>
+          <xsl:when test="$itemsymbol='round'">&#x2218;</xsl:when>
+          <xsl:when test="$itemsymbol='square'">&#x2610;</xsl:when>
+          <xsl:when test="$itemsymbol='box'">&#x2610;</xsl:when>
+          -->
+          <xsl:otherwise>&#x2022;</xsl:otherwise>
+        </xsl:choose>
+      </fo:block>
+    </fo:list-item-label>
+    <fo:list-item-body start-indent="body-start()">
+      <fo:block>
+	<xsl:apply-templates/>
+      </fo:block>
+    </fo:list-item-body>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="parent::*/@spacing = 'compact'">
+      <fo:list-item id="{$id}" xsl:use-attribute-sets="compact.list.item.spacing">
+        <xsl:copy-of select="$item.contents"/>
+      </fo:list-item>
+    </xsl:when>
+    <xsl:otherwise>
+      <fo:list-item id="{$id}" xsl:use-attribute-sets="list.item.spacing">
+        <xsl:copy-of select="$item.contents"/>
+      </fo:list-item>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="orderedlist">
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <xsl:variable name="label-width">
+    <xsl:call-template name="dbfo-attribute">
+      <xsl:with-param name="pis"
+                      select="processing-instruction('dbfo')"/>
+      <xsl:with-param name="attribute" select="'label-width'"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:if test="title">
+    <xsl:apply-templates select="title" mode="list.title.mode"/>
+  </xsl:if>
+
+  <!-- Preserve order of PIs and comments -->
+  <xsl:apply-templates 
+      select="*[not(self::listitem
+                or self::title
+                or self::titleabbrev)]
+              |comment()[not(preceding-sibling::listitem)]
+              |processing-instruction()[not(preceding-sibling::listitem)]"/>
+
+  <fo:list-block id="{$id}" xsl:use-attribute-sets="list.block.spacing"
+                 provisional-label-separation="0.2em">
+    <xsl:attribute name="provisional-distance-between-starts">
+      <xsl:choose>
+        <xsl:when test="$label-width != ''">
+          <xsl:value-of select="$label-width"/>
+        </xsl:when>
+        <xsl:otherwise>2em</xsl:otherwise>
+      </xsl:choose>
+    </xsl:attribute>
+    <xsl:apply-templates 
+          select="listitem
+                  |comment()[preceding-sibling::listitem]
+                  |processing-instruction()[preceding-sibling::listitem]"/>
+  </fo:list-block>
+</xsl:template>
+
+<xsl:template match="orderedlist/listitem" mode="item-number">
+  <xsl:variable name="numeration">
+    <xsl:call-template name="list.numeration">
+      <xsl:with-param name="node" select="parent::orderedlist"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="type">
+    <xsl:choose>
+      <xsl:when test="$numeration='arabic'">1.</xsl:when>
+      <xsl:when test="$numeration='loweralpha'">a.</xsl:when>
+      <xsl:when test="$numeration='lowerroman'">i.</xsl:when>
+      <xsl:when test="$numeration='upperalpha'">A.</xsl:when>
+      <xsl:when test="$numeration='upperroman'">I.</xsl:when>
+      <!-- What!? This should never happen -->
+      <xsl:otherwise>
+        <xsl:message>
+          <xsl:text>Unexpected numeration: </xsl:text>
+          <xsl:value-of select="$numeration"/>
+        </xsl:message>
+        <xsl:value-of select="1."/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:variable name="item-number">
+    <xsl:call-template name="orderedlist-item-number"/>
+  </xsl:variable>
+
+  <xsl:if test="parent::orderedlist/@inheritnum='inherit'
+                and ancestor::listitem[parent::orderedlist]">
+    <xsl:apply-templates select="ancestor::listitem[parent::orderedlist][1]"
+                         mode="item-number"/>
+  </xsl:if>
+
+  <xsl:number value="$item-number" format="{$type}"/>
+</xsl:template>
+
+<xsl:template match="orderedlist/listitem">
+  <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
+
+  <xsl:variable name="item.contents">
+    <fo:list-item-label end-indent="label-end()">
+      <fo:block>
+        <xsl:apply-templates select="." mode="item-number"/>
+      </fo:block>
+    </fo:list-item-label>
+    <fo:list-item-body start-indent="body-start()">
+      <fo:block>
+	<xsl:apply-templates/>
+      </fo:block>
+    </fo:list-item-body>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="parent::*/@spacing = 'compact'">
+      <fo:list-item id="{$id}" xsl:use-attribute-sets="compact.list.item.spacing">
+        <xsl:copy-of select="$item.contents"/>
+      </fo:list-item>
+    </xsl:when>
+    <xsl:otherwise>
+      <fo:list-item id="{$id}" xsl:use-attribute-sets="list.item.spacing">
+        <xsl:copy-of select="$item.contents"/>
+      </fo:list-item>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="listitem/*[1][local-name()='para' or 
+                                   local-name()='simpara' or 
+                                   local-name()='formalpara']
+                     |step/*[1][local-name()='para' or 
+                                   local-name()='simpara' or 
+                                   local-name()='formalpara']
+                     |callout/*[1][local-name()='para' or 
+                                   local-name()='simpara' or 
+                                   local-name()='formalpara']"
+              priority="2">
+  <fo:block>
+    <xsl:call-template name="anchor"/>
+    <xsl:apply-templates/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="variablelist">
+  <xsl:variable name="presentation">
+    <xsl:call-template name="dbfo-attribute">
+      <xsl:with-param name="pis"
+                      select="processing-instruction('dbfo')"/>
+      <xsl:with-param name="attribute" select="'list-presentation'"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="$presentation = 'list'">
+      <xsl:apply-templates select="." mode="vl.as.list"/>
+    </xsl:when>
+    <xsl:when test="$presentation = 'blocks'">
+      <xsl:apply-templates select="." mode="vl.as.blocks"/>
+    </xsl:when>
+    <xsl:when test="$variablelist.as.blocks != 0">
+      <xsl:apply-templates select="." mode="vl.as.blocks"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:apply-templates select="." mode="vl.as.list"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="variablelist" mode="vl.as.list">
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <xsl:variable name="term-width">
+    <xsl:call-template name="dbfo-attribute">
+      <xsl:with-param name="pis"
+                      select="processing-instruction('dbfo')"/>
+      <xsl:with-param name="attribute" select="'term-width'"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="termlength">
+    <xsl:choose>
+      <xsl:when test="$term-width != ''">
+        <xsl:value-of select="$term-width"/>
+      </xsl:when>
+      <xsl:when test="@termlength">
+        <xsl:variable name="termlength.is.number">
+          <xsl:value-of select="@termlength + 0"/>
+        </xsl:variable>
+        <xsl:choose>
+          <xsl:when test="$termlength.is.number = 'NaN'">
+            <!-- if the term length isn't just a number, assume it's a measurement -->
+            <xsl:value-of select="@termlength"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:value-of select="@termlength"/>
+            <xsl:text>em * 0.60</xsl:text>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:call-template name="longest.term">
+          <xsl:with-param name="terms" select="varlistentry/term"/>
+          <xsl:with-param name="maxlength" select="$variablelist.max.termlength"/>
+        </xsl:call-template>
+        <xsl:text>em * 0.60</xsl:text>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+<!--
+  <xsl:message>
+    <xsl:text>term width: </xsl:text>
+    <xsl:value-of select="$termlength"/>
+  </xsl:message>
+-->
+
+  <xsl:variable name="label-separation">1em</xsl:variable>
+
+  <xsl:if test="title">
+    <xsl:apply-templates select="title" mode="list.title.mode"/>
+  </xsl:if>
+
+  <!-- Preserve order of PIs and comments -->
+  <xsl:apply-templates 
+    select="*[not(self::varlistentry
+              or self::title
+              or self::titleabbrev)]
+            |comment()[not(preceding-sibling::varlistentry)]
+            |processing-instruction()[not(preceding-sibling::varlistentry)]"/>
+
+  <fo:list-block id="{$id}"
+                 provisional-distance-between-starts=
+                    "{$termlength}+{$label-separation}"
+                 provisional-label-separation="{$label-separation}"
+                 xsl:use-attribute-sets="list.block.spacing">
+    <xsl:apply-templates mode="vl.as.list"
+      select="varlistentry
+              |comment()[preceding-sibling::varlistentry]
+              |processing-instruction()[preceding-sibling::varlistentry]"/>
+  </fo:list-block>
+</xsl:template>
+
+<xsl:template name="longest.term">
+  <xsl:param name="longest" select="0"/>
+  <xsl:param name="terms" select="."/>
+  <xsl:param name="maxlength" select="-1"/>
+
+  <xsl:choose>
+    <xsl:when test="$longest &gt; $maxlength and $maxlength &gt; 0">
+      <xsl:value-of select="$maxlength"/>
+    </xsl:when>
+    <xsl:when test="not($terms)">
+      <xsl:value-of select="$longest"/>
+    </xsl:when>
+    <xsl:when test="string-length($terms[1]/node()[not(indexterm)]) &gt; $longest">
+      <xsl:call-template name="longest.term">
+        <xsl:with-param name="longest" 
+	    select="string-length($terms[1]/node()[not(indexterm)])"/>
+        <xsl:with-param name="maxlength" select="$maxlength"/>
+        <xsl:with-param name="terms" select="$terms[position() &gt; 1]"/>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:call-template name="longest.term">
+        <xsl:with-param name="longest" select="$longest"/>
+        <xsl:with-param name="maxlength" select="$maxlength"/>
+        <xsl:with-param name="terms" select="$terms[position() &gt; 1]"/>
+      </xsl:call-template>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="varlistentry" mode="vl.as.list">
+  <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
+  <fo:list-item id="{$id}" xsl:use-attribute-sets="list.item.spacing">
+    <fo:list-item-label end-indent="label-end()" text-align="start">
+      <fo:block>
+        <xsl:apply-templates select="term"/>
+      </fo:block>
+    </fo:list-item-label>
+    <fo:list-item-body start-indent="body-start()">
+      <fo:block>
+	<xsl:apply-templates select="listitem"/>
+      </fo:block>
+    </fo:list-item-body>
+  </fo:list-item>
+</xsl:template>
+
+<xsl:template match="variablelist" mode="vl.as.blocks">
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <!-- termlength is irrelevant -->
+
+  <xsl:if test="title">
+    <xsl:apply-templates select="title" mode="list.title.mode"/>
+  </xsl:if>
+
+  <!-- Preserve order of PIs and comments -->
+  <xsl:apply-templates 
+    select="*[not(self::varlistentry
+              or self::title
+              or self::titleabbrev)]
+            |comment()[not(preceding-sibling::varlistentry)]
+            |processing-instruction()[not(preceding-sibling::varlistentry)]"/>
+
+  <fo:block id="{$id}" xsl:use-attribute-sets="list.block.spacing">
+    <xsl:apply-templates mode="vl.as.blocks"
+      select="varlistentry
+              |comment()[preceding-sibling::varlistentry]
+              |processing-instruction()[preceding-sibling::varlistentry]"/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="varlistentry" mode="vl.as.blocks">
+  <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
+
+  <fo:block id="{$id}" xsl:use-attribute-sets="list.item.spacing"  
+      keep-together.within-column="always" 
+      keep-with-next.within-column="always">
+    <xsl:apply-templates select="term"/>
+  </fo:block>
+
+  <fo:block margin-left="0.25in">
+    <xsl:apply-templates select="listitem"/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="varlistentry/term">
+  <fo:inline><xsl:apply-templates/>, </fo:inline>
+</xsl:template>
+
+<xsl:template match="varlistentry/term[position()=last()]" priority="2">
+  <fo:inline><xsl:apply-templates/></fo:inline>
+</xsl:template>
+
+<xsl:template match="varlistentry/listitem">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="title" mode="list.title.mode">
+  <xsl:call-template name="formal.object.heading">
+    <xsl:with-param name="object" select=".."/>
+  </xsl:call-template>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="simplelist">
+  <!-- with no type specified, the default is 'vert' -->
+  <fo:table xsl:use-attribute-sets="normal.para.spacing">
+    <xsl:call-template name="simplelist.table.columns">
+      <xsl:with-param name="cols">
+        <xsl:choose>
+          <xsl:when test="@columns">
+            <xsl:value-of select="@columns"/>
+          </xsl:when>
+          <xsl:otherwise>1</xsl:otherwise>
+        </xsl:choose>
+      </xsl:with-param>
+    </xsl:call-template>
+    <fo:table-body>
+      <xsl:call-template name="simplelist.vert">
+        <xsl:with-param name="cols">
+          <xsl:choose>
+            <xsl:when test="@columns">
+              <xsl:value-of select="@columns"/>
+            </xsl:when>
+            <xsl:otherwise>1</xsl:otherwise>
+          </xsl:choose>
+        </xsl:with-param>
+      </xsl:call-template>
+    </fo:table-body>
+  </fo:table>
+</xsl:template>
+
+<xsl:template match="simplelist[@type='inline']">
+  <fo:inline><xsl:apply-templates/></fo:inline>
+</xsl:template>
+
+<xsl:template match="simplelist[@type='horiz']">
+  <fo:table xsl:use-attribute-sets="normal.para.spacing">
+    <xsl:call-template name="simplelist.table.columns">
+      <xsl:with-param name="cols">
+        <xsl:choose>
+          <xsl:when test="@columns">
+            <xsl:value-of select="@columns"/>
+          </xsl:when>
+          <xsl:otherwise>1</xsl:otherwise>
+        </xsl:choose>
+      </xsl:with-param>
+    </xsl:call-template>
+    <fo:table-body>
+      <xsl:call-template name="simplelist.horiz">
+        <xsl:with-param name="cols">
+          <xsl:choose>
+            <xsl:when test="@columns">
+              <xsl:value-of select="@columns"/>
+            </xsl:when>
+            <xsl:otherwise>1</xsl:otherwise>
+          </xsl:choose>
+        </xsl:with-param>
+      </xsl:call-template>
+    </fo:table-body>
+  </fo:table>
+</xsl:template>
+
+<xsl:template match="simplelist[@type='vert']">
+  <fo:table xsl:use-attribute-sets="normal.para.spacing">
+    <xsl:call-template name="simplelist.table.columns">
+      <xsl:with-param name="cols">
+        <xsl:choose>
+          <xsl:when test="@columns">
+            <xsl:value-of select="@columns"/>
+          </xsl:when>
+          <xsl:otherwise>1</xsl:otherwise>
+        </xsl:choose>
+      </xsl:with-param>
+    </xsl:call-template>
+    <fo:table-body>
+      <xsl:call-template name="simplelist.vert">
+        <xsl:with-param name="cols">
+          <xsl:choose>
+            <xsl:when test="@columns">
+              <xsl:value-of select="@columns"/>
+            </xsl:when>
+            <xsl:otherwise>1</xsl:otherwise>
+          </xsl:choose>
+        </xsl:with-param>
+      </xsl:call-template>
+    </fo:table-body>
+  </fo:table>
+</xsl:template>
+
+<xsl:template name="simplelist.table.columns">
+  <xsl:param name="cols" select="1"/>
+  <xsl:param name="curcol" select="1"/>
+  <fo:table-column column-number="{$curcol}"
+                   column-width="proportional-column-width(1)"/>
+  <xsl:if test="$curcol &lt; $cols">
+    <xsl:call-template name="simplelist.table.columns">
+      <xsl:with-param name="cols" select="$cols"/>
+      <xsl:with-param name="curcol" select="$curcol + 1"/>
+    </xsl:call-template>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template name="simplelist.horiz">
+  <xsl:param name="cols">1</xsl:param>
+  <xsl:param name="cell">1</xsl:param>
+  <xsl:param name="members" select="./member"/>
+
+  <xsl:if test="$cell &lt;= count($members)">
+    <fo:table-row>
+      <xsl:call-template name="simplelist.horiz.row">
+        <xsl:with-param name="cols" select="$cols"/>
+        <xsl:with-param name="cell" select="$cell"/>
+        <xsl:with-param name="members" select="$members"/>
+      </xsl:call-template>
+   </fo:table-row>
+    <xsl:call-template name="simplelist.horiz">
+      <xsl:with-param name="cols" select="$cols"/>
+      <xsl:with-param name="cell" select="$cell + $cols"/>
+      <xsl:with-param name="members" select="$members"/>
+    </xsl:call-template>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template name="simplelist.horiz.row">
+  <xsl:param name="cols">1</xsl:param>
+  <xsl:param name="cell">1</xsl:param>
+  <xsl:param name="members" select="./member"/>
+  <xsl:param name="curcol">1</xsl:param>
+
+  <xsl:if test="$curcol &lt;= $cols">
+    <fo:table-cell>
+      <fo:block>
+        <xsl:if test="$members[position()=$cell]">
+          <xsl:apply-templates select="$members[position()=$cell]"/>
+        </xsl:if>
+      </fo:block>
+    </fo:table-cell>
+    <xsl:call-template name="simplelist.horiz.row">
+      <xsl:with-param name="cols" select="$cols"/>
+      <xsl:with-param name="cell" select="$cell+1"/>
+      <xsl:with-param name="members" select="$members"/>
+      <xsl:with-param name="curcol" select="$curcol+1"/>
+    </xsl:call-template>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template name="simplelist.vert">
+  <xsl:param name="cols">1</xsl:param>
+  <xsl:param name="cell">1</xsl:param>
+  <xsl:param name="members" select="./member"/>
+  <xsl:param name="rows"
+             select="floor((count($members)+$cols - 1) div $cols)"/>
+
+  <xsl:if test="$cell &lt;= $rows">
+    <fo:table-row>
+      <xsl:call-template name="simplelist.vert.row">
+        <xsl:with-param name="cols" select="$cols"/>
+        <xsl:with-param name="rows" select="$rows"/>
+        <xsl:with-param name="cell" select="$cell"/>
+        <xsl:with-param name="members" select="$members"/>
+      </xsl:call-template>
+   </fo:table-row>
+    <xsl:call-template name="simplelist.vert">
+      <xsl:with-param name="cols" select="$cols"/>
+      <xsl:with-param name="cell" select="$cell+1"/>
+      <xsl:with-param name="members" select="$members"/>
+      <xsl:with-param name="rows" select="$rows"/>
+    </xsl:call-template>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template name="simplelist.vert.row">
+  <xsl:param name="cols">1</xsl:param>
+  <xsl:param name="rows">1</xsl:param>
+  <xsl:param name="cell">1</xsl:param>
+  <xsl:param name="members" select="./member"/>
+  <xsl:param name="curcol">1</xsl:param>
+
+  <xsl:if test="$curcol &lt;= $cols">
+    <fo:table-cell>
+      <fo:block>
+        <xsl:if test="$members[position()=$cell]">
+          <xsl:apply-templates select="$members[position()=$cell]"/>
+        </xsl:if>
+      </fo:block>
+    </fo:table-cell>
+    <xsl:call-template name="simplelist.vert.row">
+      <xsl:with-param name="cols" select="$cols"/>
+      <xsl:with-param name="rows" select="$rows"/>
+      <xsl:with-param name="cell" select="$cell+$rows"/>
+      <xsl:with-param name="members" select="$members"/>
+      <xsl:with-param name="curcol" select="$curcol+1"/>
+    </xsl:call-template>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="member">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="simplelist[@type='inline']/member">
+  <xsl:apply-templates/>
+  <xsl:text>, </xsl:text>
+</xsl:template>
+
+<xsl:template match="simplelist[@type='inline']/member[position()=last()]"
+              priority="2">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="procedure">
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <xsl:variable name="param.placement"
+                select="substring-after(normalize-space($formal.title.placement),
+                                        concat(local-name(.), ' '))"/>
+
+  <xsl:variable name="placement">
+    <xsl:choose>
+      <xsl:when test="contains($param.placement, ' ')">
+        <xsl:value-of select="substring-before($param.placement, ' ')"/>
+      </xsl:when>
+      <xsl:when test="$param.placement = ''">before</xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$param.placement"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <!-- Preserve order of PIs and comments -->
+  <xsl:variable name="preamble"
+        select="*[not(self::step
+                  or self::title
+                  or self::titleabbrev)]
+                |comment()[not(preceding-sibling::step)]
+                |processing-instruction()[not(preceding-sibling::step)]"/>
+
+  <xsl:variable name="steps" 
+                select="step
+                        |comment()[preceding-sibling::step]
+                        |processing-instruction()[preceding-sibling::step]"/>
+
+  <fo:block id="{$id}" xsl:use-attribute-sets="list.block.spacing">
+    <xsl:if test="./title and $placement = 'before'">
+      <!-- n.b. gentext code tests for $formal.procedures and may make an "informal" -->
+      <!-- heading even though we called formal.object.heading. odd but true. -->
+      <xsl:call-template name="formal.object.heading"/>
+    </xsl:if>
+
+    <xsl:apply-templates select="$preamble"/>
+
+    <fo:list-block xsl:use-attribute-sets="list.block.spacing"
+                   provisional-distance-between-starts="2em"
+                   provisional-label-separation="0.2em">
+      <xsl:apply-templates select="$steps"/>
+    </fo:list-block>
+
+    <xsl:if test="./title and $placement != 'before'">
+      <!-- n.b. gentext code tests for $formal.procedures and may make an "informal" -->
+      <!-- heading even though we called formal.object.heading. odd but true. -->
+      <xsl:call-template name="formal.object.heading"/>
+    </xsl:if>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="procedure/title">
+</xsl:template>
+
+<xsl:template match="substeps">
+  <fo:list-block xsl:use-attribute-sets="list.block.spacing"
+                 provisional-distance-between-starts="2em"
+                 provisional-label-separation="0.2em">
+    <xsl:apply-templates/>
+  </fo:list-block>
+</xsl:template>
+
+<xsl:template match="procedure/step|substeps/step">
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <fo:list-item xsl:use-attribute-sets="list.item.spacing">
+    <fo:list-item-label end-indent="label-end()">
+      <fo:block id="{$id}">
+        <!-- dwc: fix for one step procedures. Use a bullet if there's no step 2 -->
+        <xsl:choose>
+          <xsl:when test="count(../step) = 1">
+            <xsl:text>&#x2022;</xsl:text>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:apply-templates select="." mode="number">
+              <xsl:with-param name="recursive" select="0"/>
+            </xsl:apply-templates>.
+          </xsl:otherwise>
+        </xsl:choose>
+      </fo:block>
+    </fo:list-item-label>
+    <fo:list-item-body start-indent="body-start()">
+      <fo:block>
+	<xsl:apply-templates/>
+      </fo:block>
+    </fo:list-item-body>
+  </fo:list-item>
+</xsl:template>
+
+<xsl:template match="stepalternatives">
+  <fo:list-block provisional-distance-between-starts="2em"
+		 provisional-label-separation="0.2em">
+    <xsl:apply-templates select="step"/>
+  </fo:list-block>
+</xsl:template>
+
+<xsl:template match="stepalternatives/step">
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <fo:list-item xsl:use-attribute-sets="list.item.spacing">
+    <fo:list-item-label end-indent="label-end()">
+      <fo:block id="{$id}">
+	<xsl:text>&#x2022;</xsl:text>
+      </fo:block>
+    </fo:list-item-label>
+    <fo:list-item-body start-indent="body-start()">
+      <fo:block>
+	<xsl:apply-templates/>
+      </fo:block>
+    </fo:list-item-body>
+  </fo:list-item>
+</xsl:template>
+
+<xsl:template match="step/title">
+  <fo:block font-weight="bold"
+            keep-together.within-column="always" 
+            keep-with-next.within-column="always">
+    <xsl:apply-templates/>
+  </fo:block>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="segmentedlist">
+  <xsl:variable name="presentation">
+    <xsl:call-template name="pi-attribute">
+      <xsl:with-param name="pis"
+                      select="processing-instruction('dbfo')"/>
+      <xsl:with-param name="attribute" select="'list-presentation'"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="$presentation = 'table'">
+      <xsl:apply-templates select="." mode="seglist-table"/>
+    </xsl:when>
+    <xsl:when test="$presentation = 'list'">
+      <xsl:apply-templates/>
+    </xsl:when>
+    <xsl:when test="$segmentedlist.as.table != 0">
+      <xsl:apply-templates select="." mode="seglist-table"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:apply-templates/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="segmentedlist/title">
+  <xsl:apply-templates select="." mode="list.title.mode" />
+</xsl:template>
+
+<xsl:template match="segtitle">
+</xsl:template>
+
+<xsl:template match="segtitle" mode="segtitle-in-seg">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="seglistitem">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="seg">
+  <xsl:variable name="segnum" select="count(preceding-sibling::seg)+1"/>
+  <xsl:variable name="seglist" select="ancestor::segmentedlist"/>
+  <xsl:variable name="segtitles" select="$seglist/segtitle"/>
+
+  <!--
+     Note: segtitle is only going to be the right thing in a well formed
+     SegmentedList.  If there are too many Segs or too few SegTitles,
+     you'll get something odd...maybe an error
+  -->
+
+  <fo:block>
+    <fo:inline font-weight="bold">
+      <xsl:apply-templates select="$segtitles[$segnum=position()]"
+                           mode="segtitle-in-seg"/>
+      <xsl:text>: </xsl:text>
+    </fo:inline>
+    <xsl:apply-templates/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="segmentedlist" mode="seglist-table">
+  <xsl:apply-templates select="title" mode="list.title.mode" />
+  <fo:table>
+    <fo:table-column column-number="1" column-width="proportional-column-width(1)"/>
+    <fo:table-column column-number="2" column-width="proportional-column-width(1)"/>
+    <fo:table-header>
+      <fo:table-row>
+        <xsl:apply-templates select="segtitle" mode="seglist-table"/>
+      </fo:table-row>
+    </fo:table-header>
+    <fo:table-body>
+      <xsl:apply-templates select="seglistitem" mode="seglist-table"/>
+    </fo:table-body>
+  </fo:table>
+</xsl:template>
+
+<xsl:template match="segtitle" mode="seglist-table">
+  <fo:table-cell>
+    <fo:block>
+      <xsl:apply-templates/>
+    </fo:block>
+  </fo:table-cell>
+</xsl:template>
+
+<xsl:template match="seglistitem" mode="seglist-table">
+  <fo:table-row>
+    <xsl:apply-templates mode="seglist-table"/>
+  </fo:table-row>
+</xsl:template>
+
+<xsl:template match="seg" mode="seglist-table">
+  <fo:table-cell>
+    <fo:block>
+      <xsl:apply-templates/>
+    </fo:block>
+  </fo:table-cell>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="calloutlist">
+  <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
+
+  <fo:block id="{$id}">
+    <xsl:if test="title">
+      <xsl:apply-templates select="title" mode="list.title.mode"/>
+    </xsl:if>
+
+    <fo:list-block space-before.optimum="1em"
+                   space-before.minimum="0.8em"
+                   space-before.maximum="1.2em"
+                   provisional-distance-between-starts="2.2em"
+                   provisional-label-separation="0.2em">
+      <xsl:apply-templates/>
+    </fo:list-block>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="calloutlist/title">
+</xsl:template>
+
+<xsl:template match="callout">
+  <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
+  <fo:list-item id="{$id}">
+    <fo:list-item-label end-indent="label-end()">
+      <fo:block>
+        <xsl:call-template name="callout.arearefs">
+          <xsl:with-param name="arearefs" select="@arearefs"/>
+        </xsl:call-template>
+      </fo:block>
+    </fo:list-item-label>
+    <fo:list-item-body start-indent="body-start()">
+      <fo:block>
+	<xsl:apply-templates/>
+      </fo:block>
+    </fo:list-item-body>
+  </fo:list-item>
+</xsl:template>
+
+<xsl:template name="callout.arearefs">
+  <xsl:param name="arearefs"></xsl:param>
+  <xsl:if test="$arearefs!=''">
+    <xsl:choose>
+      <xsl:when test="substring-before($arearefs,' ')=''">
+        <xsl:call-template name="callout.arearef">
+          <xsl:with-param name="arearef" select="$arearefs"/>
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:call-template name="callout.arearef">
+          <xsl:with-param name="arearef"
+                          select="substring-before($arearefs,' ')"/>
+        </xsl:call-template>
+      </xsl:otherwise>
+    </xsl:choose>
+    <xsl:call-template name="callout.arearefs">
+      <xsl:with-param name="arearefs"
+                      select="substring-after($arearefs,' ')"/>
+    </xsl:call-template>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template name="callout.arearef">
+  <xsl:param name="arearef"></xsl:param>
+  <xsl:variable name="targets" select="key('id',$arearef)"/>
+  <xsl:variable name="target" select="$targets[1]"/>
+
+  <xsl:choose>
+    <xsl:when test="count($target)=0">
+      <xsl:value-of select="$arearef"/>
+      <xsl:text>: ???</xsl:text>
+    </xsl:when>
+    <xsl:when test="local-name($target)='co'">
+      <xsl:apply-templates select="$target" mode="callout-bug"/>
+    </xsl:when>
+    <xsl:when test="local-name($target)='areaset'">
+      <xsl:call-template name="callout-bug">
+        <xsl:with-param name="conum">
+          <xsl:apply-templates select="$target" mode="conumber"/>
+        </xsl:with-param>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:when test="local-name($target)='area'">
+      <xsl:choose>
+        <xsl:when test="$target/parent::areaset">
+          <xsl:call-template name="callout-bug">
+            <xsl:with-param name="conum">
+              <xsl:apply-templates select="$target/parent::areaset"
+                                   mode="conumber"/>
+            </xsl:with-param>
+          </xsl:call-template>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:call-template name="callout-bug">
+            <xsl:with-param name="conum">
+              <xsl:apply-templates select="$target" mode="conumber"/>
+            </xsl:with-param>
+          </xsl:call-template>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:text>???</xsl:text>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+</xsl:stylesheet>
+

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/math.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/math.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/math.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,112 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                xmlns:mml="http://www.w3.org/1998/Math/MathML"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: math.xsl,v 1.1.1.1 2004/10/19 21:21:43 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<xsl:template match="inlineequation">
+  <xsl:choose>
+    <xsl:when test="$passivetex.extensions != 0 and $tex.math.in.alt != ''">
+      <xsl:apply-templates select="alt[@role='tex'] | inlinemediaobject/textobject[@role='tex']">
+        <xsl:with-param name="output.delims">
+          <xsl:call-template name="tex.math.output.delims"/>
+        </xsl:with-param>
+      </xsl:apply-templates>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:apply-templates/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="alt">
+</xsl:template>
+
+<!-- "Support" for MathML -->
+
+<xsl:template match="mml:*" xmlns:mml="http://www.w3.org/1998/Math/MathML">
+  <xsl:copy>
+    <xsl:copy-of select="@*"/>
+    <xsl:apply-templates/>
+  </xsl:copy>
+</xsl:template>
+
+<xsl:template match="equation/graphic | informalequation/graphic">
+  <xsl:if test="$passivetex.extensions = 0 or $tex.math.in.alt = ''">
+    <fo:block>
+      <xsl:call-template name="process.image"/>
+    </fo:block>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="inlineequation/alt[@role='tex'] | 
+                     inlineequation/inlinemediaobject/textobject[@role='tex']" priority="1">
+  <xsl:param name="output.delims" select="1"/>
+  <xsl:if test="$passivetex.extensions != 0 and $tex.math.in.alt != ''">
+    <xsl:processing-instruction name="xmltex">
+      <xsl:if test="$output.delims != 0">
+        <xsl:text>$</xsl:text>
+      </xsl:if>
+      <xsl:value-of select="."/>
+      <xsl:if test="$output.delims != 0">
+        <xsl:text>$</xsl:text>
+      </xsl:if>
+    </xsl:processing-instruction>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="equation/alt[@role='tex'] | informalequation/alt[@role='tex'] |
+                     equation/mediaobject/textobject[@role='tex'] |
+                     informalequation/mediaobject/textobject[@role='tex']" priority="1">
+  <xsl:variable name="output.delims">
+    <xsl:call-template name="tex.math.output.delims"/>
+  </xsl:variable>
+  <xsl:if test="$passivetex.extensions != 0 and $tex.math.in.alt != ''">
+    <xsl:processing-instruction name="xmltex">
+      <xsl:if test="$output.delims != 0">
+        <xsl:text>$$</xsl:text>
+      </xsl:if>
+      <xsl:value-of select="."/>
+      <xsl:if test="$output.delims != 0">
+        <xsl:text>$$</xsl:text>
+      </xsl:if>
+    </xsl:processing-instruction>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="alt[@role='tex']">
+  <xsl:if test="$passivetex.extensions != 0 and $tex.math.in.alt != ''">
+    <xsl:message>
+      Your equation is misplaced. It should be in inlineequation, equation or informalequation.
+    </xsl:message>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template name="tex.math.output.delims">
+  <xsl:variable name="pi.delims">
+    <xsl:call-template name="pi-attribute">
+      <xsl:with-param name="pis" select=".//processing-instruction('dbtex')"/>
+      <xsl:with-param name="attribute" select="'delims'"/>
+    </xsl:call-template>
+  </xsl:variable>
+  <xsl:variable name="result">
+    <xsl:choose>
+      <xsl:when test="$pi.delims = 'no'">0</xsl:when>
+      <xsl:when test="$pi.delims = '' and $tex.math.delims = 0">0</xsl:when>
+      <xsl:otherwise>1</xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+  <xsl:value-of select="$result"/>
+</xsl:template>
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/pagesetup.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/pagesetup.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/pagesetup.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1915 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                version="1.0">
+
+<!-- ********************************************************************
+     $Id: pagesetup.xsl,v 1.1.1.1 2004/10/19 21:21:43 juntao Exp $
+     ********************************************************************
+
+     This file is part of the DocBook XSL Stylesheet distribution.
+     See ../README or http://docbook.sf.net/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:param name="body.fontset">
+  <xsl:value-of select="$body.font.family"/>
+  <xsl:if test="$body.font.family != ''
+                and $symbol.font.family  != ''">,</xsl:if>
+    <xsl:value-of select="$symbol.font.family"/>
+</xsl:param>
+
+<xsl:param name="title.fontset">
+  <xsl:value-of select="$title.font.family"/>
+  <xsl:if test="$title.font.family != ''
+                and $symbol.font.family  != ''">,</xsl:if>
+    <xsl:value-of select="$symbol.font.family"/>
+</xsl:param>
+
+<!-- PassiveTeX can't handle the math expression for
+     title.margin.left being negative, so ignore it.
+     margin-left="{$page.margin.outer} - {$title.margin.left}"
+-->
+<xsl:param name="margin.left.outer">
+  <xsl:choose>
+    <xsl:when test="$passivetex.extensions != 0">
+      <xsl:value-of select="$page.margin.outer"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:value-of select="$page.margin.outer"/>
+      <xsl:text> - </xsl:text>
+      <xsl:value-of select="$title.margin.left"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:param>
+
+<xsl:param name="margin.left.inner">
+  <xsl:choose>
+    <xsl:when test="$passivetex.extensions != 0">
+      <xsl:value-of select="$page.margin.inner"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:value-of select="$page.margin.inner"/>
+      <xsl:text> - </xsl:text>
+      <xsl:value-of select="$title.margin.left"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:param>
+
+<xsl:template name="setup.pagemasters">
+  <fo:layout-master-set>
+    <!-- blank pages -->
+    <fo:simple-page-master master-name="blank"
+                           page-width="{$page.width}"
+                           page-height="{$page.height}"
+                           margin-top="{$page.margin.top}"
+                           margin-bottom="{$page.margin.bottom}"
+                           margin-left="{$margin.left.outer}"
+                           margin-right="{$page.margin.inner}">
+      <fo:region-body display-align="center"
+                      margin-bottom="{$body.margin.bottom}"
+                      margin-top="{$body.margin.top}">
+        <xsl:if test="$fop.extensions = 0">
+          <xsl:attribute name="region-name">blank-body</xsl:attribute>
+        </xsl:if>
+      </fo:region-body>
+      <fo:region-before region-name="xsl-region-before-blank"
+                        extent="{$region.before.extent}"
+                        display-align="before"/>
+      <fo:region-after region-name="xsl-region-after-blank"
+                       extent="{$region.after.extent}"
+                        display-align="after"/>
+    </fo:simple-page-master>
+
+    <!-- title pages -->
+    <fo:simple-page-master master-name="titlepage-first"
+                           page-width="{$page.width}"
+                           page-height="{$page.height}"
+                           margin-top="{$page.margin.top}"
+                           margin-bottom="{$page.margin.bottom}"
+                           margin-left="{$margin.left.inner}"
+                           margin-right="{$page.margin.outer}">
+      <fo:region-body margin-bottom="{$body.margin.bottom}"
+                      margin-top="{$body.margin.top}"
+                      column-gap="{$column.gap.titlepage}"
+                      column-count="{$column.count.titlepage}">
+      </fo:region-body>
+      <fo:region-before region-name="xsl-region-before-first"
+                        extent="{$region.before.extent}"
+                        display-align="before"/>
+      <fo:region-after region-name="xsl-region-after-first"
+                       extent="{$region.after.extent}"
+                        display-align="after"/>
+    </fo:simple-page-master>
+
+    <fo:simple-page-master master-name="titlepage-odd"
+                           page-width="{$page.width}"
+                           page-height="{$page.height}"
+                           margin-top="{$page.margin.top}"
+                           margin-bottom="{$page.margin.bottom}"
+                           margin-left="{$margin.left.inner}"
+                           margin-right="{$page.margin.outer}">
+      <fo:region-body margin-bottom="{$body.margin.bottom}"
+                      margin-top="{$body.margin.top}"
+                      column-gap="{$column.gap.titlepage}"
+                      column-count="{$column.count.titlepage}">
+      </fo:region-body>
+      <fo:region-before region-name="xsl-region-before-odd"
+                        extent="{$region.before.extent}"
+                        display-align="before"/>
+      <fo:region-after region-name="xsl-region-after-odd"
+                       extent="{$region.after.extent}"
+                        display-align="after"/>
+    </fo:simple-page-master>
+
+    <fo:simple-page-master master-name="titlepage-even"
+                           page-width="{$page.width}"
+                           page-height="{$page.height}"
+                           margin-top="{$page.margin.top}"
+                           margin-bottom="{$page.margin.bottom}"
+                           margin-left="{$margin.left.outer}"
+                           margin-right="{$page.margin.inner}">
+      <fo:region-body margin-bottom="{$body.margin.bottom}"
+                      margin-top="{$body.margin.top}"
+                      column-gap="{$column.gap.titlepage}"
+                      column-count="{$column.count.titlepage}">
+      </fo:region-body>
+      <fo:region-before region-name="xsl-region-before-even"
+                        extent="{$region.before.extent}"
+                        display-align="before"/>
+      <fo:region-after region-name="xsl-region-after-even"
+                       extent="{$region.after.extent}"
+                        display-align="after"/>
+    </fo:simple-page-master>
+
+    <!-- list-of-title pages -->
+    <fo:simple-page-master master-name="lot-first"
+                           page-width="{$page.width}"
+                           page-height="{$page.height}"
+                           margin-top="{$page.margin.top}"
+                           margin-bottom="{$page.margin.bottom}"
+                           margin-left="{$margin.left.inner}"
+                           margin-right="{$page.margin.outer}">
+      <fo:region-body margin-bottom="{$body.margin.bottom}"
+                      margin-top="{$body.margin.top}"
+                      column-gap="{$column.gap.lot}"
+                      column-count="{$column.count.lot}">
+      </fo:region-body>
+      <fo:region-before region-name="xsl-region-before-first"
+                        extent="{$region.before.extent}"
+                        display-align="before"/>
+      <fo:region-after region-name="xsl-region-after-first"
+                       extent="{$region.after.extent}"
+                       display-align="after"/>
+    </fo:simple-page-master>
+
+    <fo:simple-page-master master-name="lot-odd"
+                           page-width="{$page.width}"
+                           page-height="{$page.height}"
+                           margin-top="{$page.margin.top}"
+                           margin-bottom="{$page.margin.bottom}"
+                           margin-left="{$margin.left.inner}"
+                           margin-right="{$page.margin.outer}">
+      <fo:region-body margin-bottom="{$body.margin.bottom}"
+                      margin-top="{$body.margin.top}"
+                      column-gap="{$column.gap.lot}"
+                      column-count="{$column.count.lot}">
+      </fo:region-body>
+      <fo:region-before region-name="xsl-region-before-odd"
+                        extent="{$region.before.extent}"
+                        display-align="before"/>
+      <fo:region-after region-name="xsl-region-after-odd"
+                       extent="{$region.after.extent}"
+                        display-align="after"/>
+    </fo:simple-page-master>
+
+    <fo:simple-page-master master-name="lot-even"
+                           page-width="{$page.width}"
+                           page-height="{$page.height}"
+                           margin-top="{$page.margin.top}"
+                           margin-bottom="{$page.margin.bottom}"
+                           margin-left="{$margin.left.outer}"
+                           margin-right="{$page.margin.inner}">
+      <fo:region-body margin-bottom="{$body.margin.bottom}"
+                      margin-top="{$body.margin.top}"
+                      column-gap="{$column.gap.lot}"
+                      column-count="{$column.count.lot}">
+      </fo:region-body>
+      <fo:region-before region-name="xsl-region-before-even"
+                        extent="{$region.before.extent}"
+                        display-align="before"/>
+      <fo:region-after region-name="xsl-region-after-even"
+                       extent="{$region.after.extent}"
+                        display-align="after"/>
+    </fo:simple-page-master>
+
+    <!-- frontmatter pages -->
+    <fo:simple-page-master master-name="front-first"
+                           page-width="{$page.width}"
+                           page-height="{$page.height}"
+                           margin-top="{$page.margin.top}"
+                           margin-bottom="{$page.margin.bottom}"
+                           margin-left="{$margin.left.inner}"
+                           margin-right="{$page.margin.outer}">
+      <fo:region-body margin-bottom="{$body.margin.bottom}"
+                      margin-top="{$body.margin.top}"
+                      column-gap="{$column.gap.front}"
+                      column-count="{$column.count.front}">
+      </fo:region-body>
+      <fo:region-before region-name="xsl-region-before-first"
+                        extent="{$region.before.extent}"
+                        display-align="before"/>
+      <fo:region-after region-name="xsl-region-after-first"
+                       extent="{$region.after.extent}"
+                        display-align="after"/>
+    </fo:simple-page-master>
+
+    <fo:simple-page-master master-name="front-odd"
+                           page-width="{$page.width}"
+                           page-height="{$page.height}"
+                           margin-top="{$page.margin.top}"
+                           margin-bottom="{$page.margin.bottom}"
+                           margin-left="{$margin.left.inner}"
+                           margin-right="{$page.margin.outer}">
+      <fo:region-body margin-bottom="{$body.margin.bottom}"
+                      margin-top="{$body.margin.top}"
+                      column-gap="{$column.gap.front}"
+                      column-count="{$column.count.front}">
+      </fo:region-body>
+      <fo:region-before region-name="xsl-region-before-odd"
+                        extent="{$region.before.extent}"
+                        display-align="before"/>
+      <fo:region-after region-name="xsl-region-after-odd"
+                       extent="{$region.after.extent}"
+                        display-align="after"/>
+    </fo:simple-page-master>
+
+    <fo:simple-page-master master-name="front-even"
+                           page-width="{$page.width}"
+                           page-height="{$page.height}"
+                           margin-top="{$page.margin.top}"
+                           margin-bottom="{$page.margin.bottom}"
+                           margin-left="{$margin.left.outer}"
+                           margin-right="{$page.margin.inner}">
+      <fo:region-body margin-bottom="{$body.margin.bottom}"
+                      margin-top="{$body.margin.top}"
+                      column-gap="{$column.gap.front}"
+                      column-count="{$column.count.front}">
+      </fo:region-body>
+      <fo:region-before region-name="xsl-region-before-even"
+                        extent="{$region.before.extent}"
+                        display-align="before"/>
+      <fo:region-after region-name="xsl-region-after-even"
+                       extent="{$region.after.extent}"
+                        display-align="after"/>
+    </fo:simple-page-master>
+
+    <!-- body pages -->
+    <fo:simple-page-master master-name="body-first"
+                           page-width="{$page.width}"
+                           page-height="{$page.height}"
+                           margin-top="{$page.margin.top}"
+                           margin-bottom="{$page.margin.bottom}"
+                           margin-left="{$margin.left.inner}"
+                           margin-right="{$page.margin.outer}">
+      <fo:region-body margin-bottom="{$body.margin.bottom}"
+                      margin-top="{$body.margin.top}"
+                      column-gap="{$column.gap.body}"
+                      column-count="{$column.count.body}">
+      </fo:region-body>
+      <fo:region-before region-name="xsl-region-before-first"
+                        extent="{$region.before.extent}"
+                        display-align="before"/>
+      <fo:region-after region-name="xsl-region-after-first"
+                       extent="{$region.after.extent}"
+                       display-align="after"/>
+    </fo:simple-page-master>
+
+    <fo:simple-page-master master-name="body-odd"
+                           page-width="{$page.width}"
+                           page-height="{$page.height}"
+                           margin-top="{$page.margin.top}"
+                           margin-bottom="{$page.margin.bottom}"
+                           margin-left="{$margin.left.inner}"
+                           margin-right="{$page.margin.outer}">
+      <fo:region-body margin-bottom="{$body.margin.bottom}"
+                      margin-top="{$body.margin.top}"
+                      column-gap="{$column.gap.body}"
+                      column-count="{$column.count.body}">
+      </fo:region-body>
+      <fo:region-before region-name="xsl-region-before-odd"
+                        extent="{$region.before.extent}"
+                        display-align="before"/>
+      <fo:region-after region-name="xsl-region-after-odd"
+                       extent="{$region.after.extent}"
+                       display-align="after"/>
+    </fo:simple-page-master>
+
+    <fo:simple-page-master master-name="body-even"
+                           page-width="{$page.width}"
+                           page-height="{$page.height}"
+                           margin-top="{$page.margin.top}"
+                           margin-bottom="{$page.margin.bottom}"
+                           margin-left="{$margin.left.outer}"
+                           margin-right="{$page.margin.inner}">
+      <fo:region-body margin-bottom="{$body.margin.bottom}"
+                      margin-top="{$body.margin.top}"
+                      column-gap="{$column.gap.body}"
+                      column-count="{$column.count.body}">
+      </fo:region-body>
+      <fo:region-before region-name="xsl-region-before-even"
+                        extent="{$region.before.extent}"
+                        display-align="before"/>
+      <fo:region-after region-name="xsl-region-after-even"
+                       extent="{$region.after.extent}"
+                       display-align="after"/>
+    </fo:simple-page-master>
+
+    <!-- backmatter pages -->
+    <fo:simple-page-master master-name="back-first"
+                           page-width="{$page.width}"
+                           page-height="{$page.height}"
+                           margin-top="{$page.margin.top}"
+                           margin-bottom="{$page.margin.bottom}"
+                           margin-left="{$margin.left.inner}"
+                           margin-right="{$page.margin.outer}">
+      <fo:region-body margin-bottom="{$body.margin.bottom}"
+                      margin-top="{$body.margin.top}"
+                      column-gap="{$column.gap.back}"
+                      column-count="{$column.count.back}">
+      </fo:region-body>
+      <fo:region-before region-name="xsl-region-before-first"
+                        extent="{$region.before.extent}"
+                        display-align="before"/>
+      <fo:region-after region-name="xsl-region-after-first"
+                       extent="{$region.after.extent}"
+                       display-align="after"/>
+    </fo:simple-page-master>
+
+    <fo:simple-page-master master-name="back-odd"
+                           page-width="{$page.width}"
+                           page-height="{$page.height}"
+                           margin-top="{$page.margin.top}"
+                           margin-bottom="{$page.margin.bottom}"
+                           margin-left="{$margin.left.inner}"
+                           margin-right="{$page.margin.outer}">
+      <fo:region-body margin-bottom="{$body.margin.bottom}"
+                      margin-top="{$body.margin.top}"
+                      column-gap="{$column.gap.back}"
+                      column-count="{$column.count.back}">
+      </fo:region-body>
+      <fo:region-before region-name="xsl-region-before-odd"
+                        extent="{$region.before.extent}"
+                        display-align="before"/>
+      <fo:region-after region-name="xsl-region-after-odd"
+                       extent="{$region.after.extent}"
+                       display-align="after"/>
+    </fo:simple-page-master>
+
+    <fo:simple-page-master master-name="back-even"
+                           page-width="{$page.width}"
+                           page-height="{$page.height}"
+                           margin-top="{$page.margin.top}"
+                           margin-bottom="{$page.margin.bottom}"
+                           margin-left="{$margin.left.outer}"
+                           margin-right="{$page.margin.inner}">
+      <fo:region-body margin-bottom="{$body.margin.bottom}"
+                      margin-top="{$body.margin.top}"
+                      column-gap="{$column.gap.back}"
+                      column-count="{$column.count.back}">
+      </fo:region-body>
+      <fo:region-before region-name="xsl-region-before-even"
+                        extent="{$region.before.extent}"
+                        display-align="before"/>
+      <fo:region-after region-name="xsl-region-after-even"
+                       extent="{$region.after.extent}"
+                       display-align="after"/>
+    </fo:simple-page-master>
+
+    <!-- index pages -->
+    <fo:simple-page-master master-name="index-first"
+                           page-width="{$page.width}"
+                           page-height="{$page.height}"
+                           margin-top="{$page.margin.top}"
+                           margin-bottom="{$page.margin.bottom}"
+                           margin-left="{$page.margin.inner}"
+                           margin-right="{$page.margin.outer}">
+      <fo:region-body margin-bottom="{$body.margin.bottom}"
+                      margin-top="{$body.margin.top}"
+                      column-gap="{$column.gap.index}"
+                      column-count="{$column.count.index}">
+      </fo:region-body>
+      <fo:region-before region-name="xsl-region-before-first"
+                        extent="{$region.before.extent}"
+                        display-align="before"/>
+      <fo:region-after region-name="xsl-region-after-first"
+                       extent="{$region.after.extent}"
+                       display-align="after"/>
+    </fo:simple-page-master>
+
+    <fo:simple-page-master master-name="index-odd"
+                           page-width="{$page.width}"
+                           page-height="{$page.height}"
+                           margin-top="{$page.margin.top}"
+                           margin-bottom="{$page.margin.bottom}"
+                           margin-left="{$page.margin.inner}"
+                           margin-right="{$page.margin.outer}">
+      <fo:region-body margin-bottom="{$body.margin.bottom}"
+                      margin-top="{$body.margin.top}"
+                      column-gap="{$column.gap.index}"
+                      column-count="{$column.count.index}">
+      </fo:region-body>
+      <fo:region-before region-name="xsl-region-before-odd"
+                        extent="{$region.before.extent}"
+                        display-align="before"/>
+      <fo:region-after region-name="xsl-region-after-odd"
+                       extent="{$region.after.extent}"
+                       display-align="after"/>
+    </fo:simple-page-master>
+
+    <fo:simple-page-master master-name="index-even"
+                           page-width="{$page.width}"
+                           page-height="{$page.height}"
+                           margin-top="{$page.margin.top}"
+                           margin-bottom="{$page.margin.bottom}"
+                           margin-left="{$page.margin.outer}"
+                           margin-right="{$page.margin.inner}">
+      <fo:region-body margin-bottom="{$body.margin.bottom}"
+                      margin-top="{$body.margin.top}"
+                      column-gap="{$column.gap.index}"
+                      column-count="{$column.count.index}">
+      </fo:region-body>
+      <fo:region-before region-name="xsl-region-before-even"
+                        extent="{$region.before.extent}"
+                        display-align="before"/>
+      <fo:region-after region-name="xsl-region-after-even"
+                       extent="{$region.after.extent}"
+                       display-align="after"/>
+    </fo:simple-page-master>
+
+    <xsl:if test="$draft.mode != 'no'">
+      <!-- draft blank pages -->
+      <fo:simple-page-master master-name="blank-draft"
+                             page-width="{$page.width}"
+                             page-height="{$page.height}"
+                             margin-top="{$page.margin.top}"
+                             margin-bottom="{$page.margin.bottom}"
+                             margin-left="{$margin.left.outer}"
+                             margin-right="{$page.margin.inner}">
+        <fo:region-body margin-bottom="{$body.margin.bottom}"
+                        margin-top="{$body.margin.top}">
+          <xsl:if test="$draft.watermark.image != ''">
+            <xsl:attribute name="background-image">
+              <xsl:call-template name="fo-external-image">
+                <xsl:with-param name="filename" select="$draft.watermark.image"/>
+              </xsl:call-template>
+            </xsl:attribute>
+            <xsl:attribute name="background-attachment">fixed</xsl:attribute>
+            <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
+            <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
+            <xsl:attribute name="background-position-vertical">center</xsl:attribute>
+          </xsl:if>
+        </fo:region-body>
+        <fo:region-before region-name="xsl-region-before-blank"
+                          extent="{$region.before.extent}"
+                          display-align="before"/>
+        <fo:region-after region-name="xsl-region-after-blank"
+                         extent="{$region.after.extent}"
+                         display-align="after"/>
+      </fo:simple-page-master>
+
+      <!-- draft title pages -->
+      <fo:simple-page-master master-name="titlepage-first-draft"
+                             page-width="{$page.width}"
+                             page-height="{$page.height}"
+                             margin-top="{$page.margin.top}"
+                             margin-bottom="{$page.margin.bottom}"
+                             margin-left="{$margin.left.inner}"
+                             margin-right="{$page.margin.outer}">
+        <fo:region-body margin-bottom="{$body.margin.bottom}"
+                        margin-top="{$body.margin.top}"
+                        column-gap="{$column.gap.titlepage}"
+                        column-count="{$column.count.titlepage}">
+          <xsl:if test="$draft.watermark.image != ''">
+            <xsl:attribute name="background-image">
+              <xsl:call-template name="fo-external-image">
+                <xsl:with-param name="filename" select="$draft.watermark.image"/>
+              </xsl:call-template>
+            </xsl:attribute>
+            <xsl:attribute name="background-attachment">fixed</xsl:attribute>
+            <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
+            <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
+            <xsl:attribute name="background-position-vertical">center</xsl:attribute>
+          </xsl:if>
+        </fo:region-body>
+        <fo:region-before region-name="xsl-region-before-first"
+                          extent="{$region.before.extent}"
+                          display-align="before"/>
+        <fo:region-after region-name="xsl-region-after-first"
+                         extent="{$region.after.extent}"
+                         display-align="after"/>
+      </fo:simple-page-master>
+
+      <fo:simple-page-master master-name="titlepage-odd-draft"
+                             page-width="{$page.width}"
+                             page-height="{$page.height}"
+                             margin-top="{$page.margin.top}"
+                             margin-bottom="{$page.margin.bottom}"
+                             margin-left="{$margin.left.inner}"
+                             margin-right="{$page.margin.outer}">
+        <fo:region-body margin-bottom="{$body.margin.bottom}"
+                        margin-top="{$body.margin.top}"
+                        column-gap="{$column.gap.titlepage}"
+                        column-count="{$column.count.titlepage}">
+          <xsl:if test="$draft.watermark.image != ''">
+            <xsl:attribute name="background-image">
+              <xsl:call-template name="fo-external-image">
+                <xsl:with-param name="filename" select="$draft.watermark.image"/>
+              </xsl:call-template>
+            </xsl:attribute>
+            <xsl:attribute name="background-attachment">fixed</xsl:attribute>
+            <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
+            <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
+            <xsl:attribute name="background-position-vertical">center</xsl:attribute>
+          </xsl:if>
+        </fo:region-body>
+        <fo:region-before region-name="xsl-region-before-odd"
+                          extent="{$region.before.extent}"
+                          display-align="before"/>
+        <fo:region-after region-name="xsl-region-after-odd"
+                         extent="{$region.after.extent}"
+                         display-align="after"/>
+      </fo:simple-page-master>
+
+      <fo:simple-page-master master-name="titlepage-even-draft"
+                             page-width="{$page.width}"
+                             page-height="{$page.height}"
+                             margin-top="{$page.margin.top}"
+                             margin-bottom="{$page.margin.bottom}"
+                             margin-left="{$margin.left.outer}"
+                             margin-right="{$page.margin.inner}">
+        <fo:region-body margin-bottom="{$body.margin.bottom}"
+                        margin-top="{$body.margin.top}"
+                        column-gap="{$column.gap.titlepage}"
+                        column-count="{$column.count.titlepage}">
+          <xsl:if test="$draft.watermark.image != ''">
+            <xsl:attribute name="background-image">
+              <xsl:call-template name="fo-external-image">
+                <xsl:with-param name="filename" select="$draft.watermark.image"/>
+              </xsl:call-template>
+            </xsl:attribute>
+            <xsl:attribute name="background-attachment">fixed</xsl:attribute>
+            <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
+            <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
+            <xsl:attribute name="background-position-vertical">center</xsl:attribute>
+          </xsl:if>
+        </fo:region-body>
+        <fo:region-before region-name="xsl-region-before-even"
+                          extent="{$region.before.extent}"
+                          display-align="before"/>
+        <fo:region-after region-name="xsl-region-after-even"
+                         extent="{$region.after.extent}"
+                         display-align="after"/>
+      </fo:simple-page-master>
+
+      <!-- draft list-of-title pages -->
+      <fo:simple-page-master master-name="lot-first-draft"
+                             page-width="{$page.width}"
+                             page-height="{$page.height}"
+                             margin-top="{$page.margin.top}"
+                             margin-bottom="{$page.margin.bottom}"
+                             margin-left="{$margin.left.inner}"
+                             margin-right="{$page.margin.outer}">
+        <fo:region-body margin-bottom="{$body.margin.bottom}"
+                        margin-top="{$body.margin.top}"
+                        column-gap="{$column.gap.lot}"
+                        column-count="{$column.count.lot}">
+          <xsl:if test="$draft.watermark.image != ''">
+            <xsl:attribute name="background-image">
+              <xsl:call-template name="fo-external-image">
+                <xsl:with-param name="filename" select="$draft.watermark.image"/>
+              </xsl:call-template>
+            </xsl:attribute>
+            <xsl:attribute name="background-attachment">fixed</xsl:attribute>
+            <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
+            <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
+            <xsl:attribute name="background-position-vertical">center</xsl:attribute>
+          </xsl:if>
+        </fo:region-body>
+        <fo:region-before region-name="xsl-region-before-first"
+                          extent="{$region.before.extent}"
+                          display-align="before"/>
+        <fo:region-after region-name="xsl-region-after-first"
+                         extent="{$region.after.extent}"
+                         display-align="after"/>
+      </fo:simple-page-master>
+
+      <fo:simple-page-master master-name="lot-odd-draft"
+                             page-width="{$page.width}"
+                             page-height="{$page.height}"
+                             margin-top="{$page.margin.top}"
+                             margin-bottom="{$page.margin.bottom}"
+                             margin-left="{$margin.left.inner}"
+                             margin-right="{$page.margin.outer}">
+        <fo:region-body margin-bottom="{$body.margin.bottom}"
+                        margin-top="{$body.margin.top}"
+                        column-gap="{$column.gap.lot}"
+                        column-count="{$column.count.lot}">
+          <xsl:if test="$draft.watermark.image != ''">
+            <xsl:attribute name="background-image">
+              <xsl:call-template name="fo-external-image">
+                <xsl:with-param name="filename" select="$draft.watermark.image"/>
+              </xsl:call-template>
+            </xsl:attribute>
+            <xsl:attribute name="background-attachment">fixed</xsl:attribute>
+            <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
+            <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
+            <xsl:attribute name="background-position-vertical">center</xsl:attribute>
+          </xsl:if>
+        </fo:region-body>
+        <fo:region-before region-name="xsl-region-before-odd"
+                          extent="{$region.before.extent}"
+                          display-align="before"/>
+        <fo:region-after region-name="xsl-region-after-odd"
+                         extent="{$region.after.extent}"
+                         display-align="after"/>
+      </fo:simple-page-master>
+
+      <fo:simple-page-master master-name="lot-even-draft"
+                             page-width="{$page.width}"
+                             page-height="{$page.height}"
+                             margin-top="{$page.margin.top}"
+                             margin-bottom="{$page.margin.bottom}"
+                             margin-left="{$margin.left.outer}"
+                             margin-right="{$page.margin.inner}">
+        <fo:region-body margin-bottom="{$body.margin.bottom}"
+                        margin-top="{$body.margin.top}"
+                        column-gap="{$column.gap.lot}"
+                        column-count="{$column.count.lot}">
+          <xsl:if test="$draft.watermark.image != ''">
+            <xsl:attribute name="background-image">
+              <xsl:call-template name="fo-external-image">
+                <xsl:with-param name="filename" select="$draft.watermark.image"/>
+              </xsl:call-template>
+            </xsl:attribute>
+            <xsl:attribute name="background-attachment">fixed</xsl:attribute>
+            <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
+            <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
+            <xsl:attribute name="background-position-vertical">center</xsl:attribute>
+          </xsl:if>
+        </fo:region-body>
+        <fo:region-before region-name="xsl-region-before-even"
+                          extent="{$region.before.extent}"
+                          display-align="before"/>
+        <fo:region-after region-name="xsl-region-after-even"
+                         extent="{$region.after.extent}"
+                         display-align="after"/>
+      </fo:simple-page-master>
+
+      <!-- draft frontmatter pages -->
+      <fo:simple-page-master master-name="front-first-draft"
+                             page-width="{$page.width}"
+                             page-height="{$page.height}"
+                             margin-top="{$page.margin.top}"
+                             margin-bottom="{$page.margin.bottom}"
+                             margin-left="{$margin.left.inner}"
+                             margin-right="{$page.margin.outer}">
+        <fo:region-body margin-bottom="{$body.margin.bottom}"
+                        margin-top="{$body.margin.top}"
+                        column-gap="{$column.gap.front}"
+                        column-count="{$column.count.front}">
+          <xsl:if test="$draft.watermark.image != ''">
+            <xsl:attribute name="background-image">
+              <xsl:call-template name="fo-external-image">
+                <xsl:with-param name="filename" select="$draft.watermark.image"/>
+              </xsl:call-template>
+            </xsl:attribute>
+            <xsl:attribute name="background-attachment">fixed</xsl:attribute>
+            <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
+            <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
+            <xsl:attribute name="background-position-vertical">center</xsl:attribute>
+          </xsl:if>
+        </fo:region-body>
+        <fo:region-before region-name="xsl-region-before-first"
+                          extent="{$region.before.extent}"
+                          display-align="before"/>
+        <fo:region-after region-name="xsl-region-after-first"
+                         extent="{$region.after.extent}"
+                         display-align="after"/>
+      </fo:simple-page-master>
+
+      <fo:simple-page-master master-name="front-odd-draft"
+                             page-width="{$page.width}"
+                             page-height="{$page.height}"
+                             margin-top="{$page.margin.top}"
+                             margin-bottom="{$page.margin.bottom}"
+                             margin-left="{$margin.left.inner}"
+                             margin-right="{$page.margin.outer}">
+        <fo:region-body margin-bottom="{$body.margin.bottom}"
+                        margin-top="{$body.margin.top}"
+                        column-gap="{$column.gap.front}"
+                        column-count="{$column.count.front}">
+          <xsl:if test="$draft.watermark.image != ''">
+            <xsl:attribute name="background-image">
+              <xsl:call-template name="fo-external-image">
+                <xsl:with-param name="filename" select="$draft.watermark.image"/>
+              </xsl:call-template>
+            </xsl:attribute>
+            <xsl:attribute name="background-attachment">fixed</xsl:attribute>
+            <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
+            <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
+            <xsl:attribute name="background-position-vertical">center</xsl:attribute>
+          </xsl:if>
+        </fo:region-body>
+        <fo:region-before region-name="xsl-region-before-odd"
+                          extent="{$region.before.extent}"
+                          display-align="before"/>
+        <fo:region-after region-name="xsl-region-after-odd"
+                         extent="{$region.after.extent}"
+                         display-align="after"/>
+      </fo:simple-page-master>
+
+      <fo:simple-page-master master-name="front-even-draft"
+                             page-width="{$page.width}"
+                             page-height="{$page.height}"
+                             margin-top="{$page.margin.top}"
+                             margin-bottom="{$page.margin.bottom}"
+                             margin-left="{$margin.left.outer}"
+                             margin-right="{$page.margin.inner}">
+        <fo:region-body margin-bottom="{$body.margin.bottom}"
+                        margin-top="{$body.margin.top}"
+                        column-gap="{$column.gap.front}"
+                        column-count="{$column.count.front}">
+          <xsl:if test="$draft.watermark.image != ''">
+            <xsl:attribute name="background-image">
+              <xsl:call-template name="fo-external-image">
+                <xsl:with-param name="filename" select="$draft.watermark.image"/>
+              </xsl:call-template>
+            </xsl:attribute>
+            <xsl:attribute name="background-attachment">fixed</xsl:attribute>
+            <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
+            <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
+            <xsl:attribute name="background-position-vertical">center</xsl:attribute>
+          </xsl:if>
+        </fo:region-body>
+        <fo:region-before region-name="xsl-region-before-even"
+                          extent="{$region.before.extent}"
+                          display-align="before"/>
+        <fo:region-after region-name="xsl-region-after-even"
+                         extent="{$region.after.extent}"
+                         display-align="after"/>
+      </fo:simple-page-master>
+
+      <!-- draft body pages -->
+      <fo:simple-page-master master-name="body-first-draft"
+                             page-width="{$page.width}"
+                             page-height="{$page.height}"
+                             margin-top="{$page.margin.top}"
+                             margin-bottom="{$page.margin.bottom}"
+                             margin-left="{$margin.left.inner}"
+                             margin-right="{$page.margin.outer}">
+        <fo:region-body margin-bottom="{$body.margin.bottom}"
+                        margin-top="{$body.margin.top}"
+                        column-gap="{$column.gap.body}"
+                        column-count="{$column.count.body}">
+          <xsl:if test="$draft.watermark.image != ''">
+            <xsl:attribute name="background-image">
+              <xsl:call-template name="fo-external-image">
+                <xsl:with-param name="filename" select="$draft.watermark.image"/>
+              </xsl:call-template>
+            </xsl:attribute>
+            <xsl:attribute name="background-attachment">fixed</xsl:attribute>
+            <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
+            <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
+            <xsl:attribute name="background-position-vertical">center</xsl:attribute>
+          </xsl:if>
+        </fo:region-body>
+        <fo:region-before region-name="xsl-region-before-first"
+                          extent="{$region.before.extent}"
+                          display-align="before"/>
+        <fo:region-after region-name="xsl-region-after-first"
+                         extent="{$region.after.extent}"
+                         display-align="after"/>
+      </fo:simple-page-master>
+
+      <fo:simple-page-master master-name="body-odd-draft"
+                             page-width="{$page.width}"
+                             page-height="{$page.height}"
+                             margin-top="{$page.margin.top}"
+                             margin-bottom="{$page.margin.bottom}"
+                             margin-left="{$margin.left.inner}"
+                             margin-right="{$page.margin.outer}">
+        <fo:region-body margin-bottom="{$body.margin.bottom}"
+                        margin-top="{$body.margin.top}"
+                        column-gap="{$column.gap.body}"
+                        column-count="{$column.count.body}">
+          <xsl:if test="$draft.watermark.image != ''">
+            <xsl:attribute name="background-image">
+              <xsl:call-template name="fo-external-image">
+                <xsl:with-param name="filename" select="$draft.watermark.image"/>
+              </xsl:call-template>
+            </xsl:attribute>
+            <xsl:attribute name="background-attachment">fixed</xsl:attribute>
+            <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
+            <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
+            <xsl:attribute name="background-position-vertical">center</xsl:attribute>
+          </xsl:if>
+        </fo:region-body>
+        <fo:region-before region-name="xsl-region-before-odd"
+                          extent="{$region.before.extent}"
+                          display-align="before"/>
+        <fo:region-after region-name="xsl-region-after-odd"
+                         extent="{$region.after.extent}"
+                         display-align="after"/>
+      </fo:simple-page-master>
+
+      <fo:simple-page-master master-name="body-even-draft"
+                             page-width="{$page.width}"
+                             page-height="{$page.height}"
+                             margin-top="{$page.margin.top}"
+                             margin-bottom="{$page.margin.bottom}"
+                             margin-left="{$margin.left.outer}"
+                             margin-right="{$page.margin.inner}">
+        <fo:region-body margin-bottom="{$body.margin.bottom}"
+                        margin-top="{$body.margin.top}"
+                        column-gap="{$column.gap.body}"
+                        column-count="{$column.count.body}">
+          <xsl:if test="$draft.watermark.image != ''">
+            <xsl:attribute name="background-image">
+              <xsl:call-template name="fo-external-image">
+                <xsl:with-param name="filename" select="$draft.watermark.image"/>
+              </xsl:call-template>
+            </xsl:attribute>
+            <xsl:attribute name="background-attachment">fixed</xsl:attribute>
+            <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
+            <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
+            <xsl:attribute name="background-position-vertical">center</xsl:attribute>
+          </xsl:if>
+        </fo:region-body>
+        <fo:region-before region-name="xsl-region-before-even"
+                          extent="{$region.before.extent}"
+                          display-align="before"/>
+        <fo:region-after region-name="xsl-region-after-even"
+                         extent="{$region.after.extent}"
+                         display-align="after"/>
+      </fo:simple-page-master>
+
+      <!-- draft backmatter pages -->
+      <fo:simple-page-master master-name="back-first-draft"
+                             page-width="{$page.width}"
+                             page-height="{$page.height}"
+                             margin-top="{$page.margin.top}"
+                             margin-bottom="{$page.margin.bottom}"
+                             margin-left="{$margin.left.inner}"
+                             margin-right="{$page.margin.outer}">
+        <fo:region-body margin-bottom="{$body.margin.bottom}"
+                        margin-top="{$body.margin.top}"
+                        column-gap="{$column.gap.back}"
+                        column-count="{$column.count.back}">
+          <xsl:if test="$draft.watermark.image != ''">
+            <xsl:attribute name="background-image">
+              <xsl:call-template name="fo-external-image">
+                <xsl:with-param name="filename" select="$draft.watermark.image"/>
+              </xsl:call-template>
+            </xsl:attribute>
+            <xsl:attribute name="background-attachment">fixed</xsl:attribute>
+            <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
+            <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
+            <xsl:attribute name="background-position-vertical">center</xsl:attribute>
+          </xsl:if>
+        </fo:region-body>
+        <fo:region-before region-name="xsl-region-before-first"
+                          extent="{$region.before.extent}"
+                          display-align="before"/>
+        <fo:region-after region-name="xsl-region-after-first"
+                         extent="{$region.after.extent}"
+                         display-align="after"/>
+      </fo:simple-page-master>
+
+      <fo:simple-page-master master-name="back-odd-draft"
+                             page-width="{$page.width}"
+                             page-height="{$page.height}"
+                             margin-top="{$page.margin.top}"
+                             margin-bottom="{$page.margin.bottom}"
+                             margin-left="{$margin.left.inner}"
+                             margin-right="{$page.margin.outer}">
+        <fo:region-body margin-bottom="{$body.margin.bottom}"
+                        margin-top="{$body.margin.top}"
+                        column-gap="{$column.gap.back}"
+                        column-count="{$column.count.back}">
+          <xsl:if test="$draft.watermark.image != ''">
+            <xsl:attribute name="background-image">
+              <xsl:call-template name="fo-external-image">
+                <xsl:with-param name="filename" select="$draft.watermark.image"/>
+              </xsl:call-template>
+            </xsl:attribute>
+            <xsl:attribute name="background-attachment">fixed</xsl:attribute>
+            <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
+            <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
+            <xsl:attribute name="background-position-vertical">center</xsl:attribute>
+          </xsl:if>
+        </fo:region-body>
+        <fo:region-before region-name="xsl-region-before-odd"
+                          extent="{$region.before.extent}"
+                          display-align="before"/>
+        <fo:region-after region-name="xsl-region-after-odd"
+                         extent="{$region.after.extent}"
+                         display-align="after"/>
+      </fo:simple-page-master>
+
+      <fo:simple-page-master master-name="back-even-draft"
+                             page-width="{$page.width}"
+                             page-height="{$page.height}"
+                             margin-top="{$page.margin.top}"
+                             margin-bottom="{$page.margin.bottom}"
+                             margin-left="{$margin.left.outer}"
+                             margin-right="{$page.margin.inner}">
+        <fo:region-body margin-bottom="{$body.margin.bottom}"
+                        margin-top="{$body.margin.top}"
+                        column-gap="{$column.gap.back}"
+                        column-count="{$column.count.back}">
+          <xsl:if test="$draft.watermark.image != ''">
+            <xsl:attribute name="background-image">
+              <xsl:call-template name="fo-external-image">
+                <xsl:with-param name="filename" select="$draft.watermark.image"/>
+              </xsl:call-template>
+            </xsl:attribute>
+            <xsl:attribute name="background-attachment">fixed</xsl:attribute>
+            <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
+            <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
+            <xsl:attribute name="background-position-vertical">center</xsl:attribute>
+          </xsl:if>
+        </fo:region-body>
+        <fo:region-before region-name="xsl-region-before-even"
+                          extent="{$region.before.extent}"
+                          display-align="before"/>
+        <fo:region-after region-name="xsl-region-after-even"
+                         extent="{$region.after.extent}"
+                         display-align="after"/>
+      </fo:simple-page-master>
+
+      <!-- draft index pages -->
+      <fo:simple-page-master master-name="index-first-draft"
+                             page-width="{$page.width}"
+                             page-height="{$page.height}"
+                             margin-top="{$page.margin.top}"
+                             margin-bottom="{$page.margin.bottom}"
+                             margin-left="{$page.margin.inner}"
+                             margin-right="{$page.margin.outer}">
+        <fo:region-body margin-bottom="{$body.margin.bottom}"
+                        margin-top="{$body.margin.top}"
+                        column-gap="{$column.gap.index}"
+                        column-count="{$column.count.index}">
+          <xsl:if test="$draft.watermark.image != ''">
+            <xsl:attribute name="background-image">
+              <xsl:call-template name="fo-external-image">
+                <xsl:with-param name="filename" select="$draft.watermark.image"/>
+              </xsl:call-template>
+            </xsl:attribute>
+            <xsl:attribute name="background-attachment">fixed</xsl:attribute>
+            <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
+            <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
+            <xsl:attribute name="background-position-vertical">center</xsl:attribute>
+          </xsl:if>
+        </fo:region-body>
+        <fo:region-before region-name="xsl-region-before-first"
+                          extent="{$region.before.extent}"
+                          display-align="before"/>
+        <fo:region-after region-name="xsl-region-after-first"
+                         extent="{$region.after.extent}"
+                         display-align="after"/>
+      </fo:simple-page-master>
+
+      <fo:simple-page-master master-name="index-odd-draft"
+                             page-width="{$page.width}"
+                             page-height="{$page.height}"
+                             margin-top="{$page.margin.top}"
+                             margin-bottom="{$page.margin.bottom}"
+                             margin-left="{$page.margin.inner}"
+                             margin-right="{$page.margin.outer}">
+        <fo:region-body margin-bottom="{$body.margin.bottom}"
+                        margin-top="{$body.margin.top}"
+                        column-gap="{$column.gap.index}"
+                        column-count="{$column.count.index}">
+          <xsl:if test="$draft.watermark.image != ''">
+            <xsl:attribute name="background-image">
+              <xsl:call-template name="fo-external-image">
+                <xsl:with-param name="filename" select="$draft.watermark.image"/>
+              </xsl:call-template>
+            </xsl:attribute>
+            <xsl:attribute name="background-attachment">fixed</xsl:attribute>
+            <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
+            <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
+            <xsl:attribute name="background-position-vertical">center</xsl:attribute>
+          </xsl:if>
+        </fo:region-body>
+        <fo:region-before region-name="xsl-region-before-odd"
+                          extent="{$region.before.extent}"
+                          display-align="before"/>
+        <fo:region-after region-name="xsl-region-after-odd"
+                         extent="{$region.after.extent}"
+                         display-align="after"/>
+      </fo:simple-page-master>
+
+      <fo:simple-page-master master-name="index-even-draft"
+                             page-width="{$page.width}"
+                             page-height="{$page.height}"
+                             margin-top="{$page.margin.top}"
+                             margin-bottom="{$page.margin.bottom}"
+                             margin-right="{$page.margin.inner}"
+                             margin-left="{$page.margin.outer}">
+        <fo:region-body margin-bottom="{$body.margin.bottom}"
+                        margin-top="{$body.margin.top}"
+                        column-gap="{$column.gap.index}"
+                        column-count="{$column.count.index}">
+          <xsl:if test="$draft.watermark.image != ''">
+            <xsl:attribute name="background-image">
+              <xsl:call-template name="fo-external-image">
+                <xsl:with-param name="filename" select="$draft.watermark.image"/>
+              </xsl:call-template>
+            </xsl:attribute>
+            <xsl:attribute name="background-attachment">fixed</xsl:attribute>
+            <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
+            <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
+            <xsl:attribute name="background-position-vertical">center</xsl:attribute>
+          </xsl:if>
+        </fo:region-body>
+        <fo:region-before region-name="xsl-region-before-even"
+                          extent="{$region.before.extent}"
+                          display-align="before"/>
+        <fo:region-after region-name="xsl-region-after-even"
+                         extent="{$region.after.extent}"
+                         display-align="after"/>
+      </fo:simple-page-master>
+    </xsl:if>
+
+    <!-- setup for title page(s) -->
+    <fo:page-sequence-master master-name="titlepage">
+      <fo:repeatable-page-master-alternatives>
+        <fo:conditional-page-master-reference master-reference="blank"
+                                              blank-or-not-blank="blank"/>
+        <fo:conditional-page-master-reference master-reference="titlepage-first"
+                                              page-position="first"/>
+        <fo:conditional-page-master-reference master-reference="titlepage-odd"
+                                              odd-or-even="odd"/>
+        <fo:conditional-page-master-reference master-reference="titlepage-even"
+                                              odd-or-even="even"/>
+      </fo:repeatable-page-master-alternatives>
+    </fo:page-sequence-master>
+
+    <!-- setup for lots -->
+    <fo:page-sequence-master master-name="lot">
+      <fo:repeatable-page-master-alternatives>
+        <fo:conditional-page-master-reference master-reference="blank"
+                                              blank-or-not-blank="blank"/>
+        <fo:conditional-page-master-reference master-reference="lot-first"
+                                              page-position="first"/>
+        <fo:conditional-page-master-reference master-reference="lot-odd"
+                                              odd-or-even="odd"/>
+        <fo:conditional-page-master-reference master-reference="lot-even"
+                                              odd-or-even="even"/>
+      </fo:repeatable-page-master-alternatives>
+    </fo:page-sequence-master>
+
+    <!-- setup front matter -->
+    <fo:page-sequence-master master-name="front">
+      <fo:repeatable-page-master-alternatives>
+        <fo:conditional-page-master-reference master-reference="blank"
+                                              blank-or-not-blank="blank"/>
+        <fo:conditional-page-master-reference master-reference="front-first"
+                                              page-position="first"/>
+        <fo:conditional-page-master-reference master-reference="front-odd"
+                                              odd-or-even="odd"/>
+        <fo:conditional-page-master-reference master-reference="front-even"
+                                              odd-or-even="even"/>
+      </fo:repeatable-page-master-alternatives>
+    </fo:page-sequence-master>
+
+    <!-- setup for body pages -->
+    <fo:page-sequence-master master-name="body">
+      <fo:repeatable-page-master-alternatives>
+        <fo:conditional-page-master-reference master-reference="blank"
+                                              blank-or-not-blank="blank"/>
+        <fo:conditional-page-master-reference master-reference="body-first"
+                                              page-position="first"/>
+        <fo:conditional-page-master-reference master-reference="body-odd"
+                                              odd-or-even="odd"/>
+        <fo:conditional-page-master-reference master-reference="body-even"
+                                              odd-or-even="even"/>
+      </fo:repeatable-page-master-alternatives>
+    </fo:page-sequence-master>
+
+    <!-- setup back matter -->
+    <fo:page-sequence-master master-name="back">
+      <fo:repeatable-page-master-alternatives>
+        <fo:conditional-page-master-reference master-reference="blank"
+                                              blank-or-not-blank="blank"/>
+        <fo:conditional-page-master-reference master-reference="back-first"
+                                              page-position="first"/>
+        <fo:conditional-page-master-reference master-reference="back-odd"
+                                              odd-or-even="odd"/>
+        <fo:conditional-page-master-reference master-reference="back-even"
+                                              odd-or-even="even"/>
+      </fo:repeatable-page-master-alternatives>
+    </fo:page-sequence-master>
+
+    <!-- setup back matter -->
+    <fo:page-sequence-master master-name="index">
+      <fo:repeatable-page-master-alternatives>
+        <fo:conditional-page-master-reference master-reference="blank"
+                                              blank-or-not-blank="blank"/>
+        <fo:conditional-page-master-reference master-reference="index-first"
+                                              page-position="first"/>
+        <fo:conditional-page-master-reference master-reference="index-odd"
+                                              odd-or-even="odd"/>
+        <fo:conditional-page-master-reference master-reference="index-even"
+                                              odd-or-even="even"/>
+      </fo:repeatable-page-master-alternatives>
+    </fo:page-sequence-master>
+
+    <xsl:if test="$draft.mode != 'no'">
+      <!-- setup for draft title page(s) -->
+      <fo:page-sequence-master master-name="titlepage-draft">
+        <fo:repeatable-page-master-alternatives>
+          <fo:conditional-page-master-reference master-reference="blank-draft"
+                                                blank-or-not-blank="blank"/>
+          <fo:conditional-page-master-reference master-reference="titlepage-first-draft"
+                                                page-position="first"/>
+          <fo:conditional-page-master-reference master-reference="titlepage-odd-draft"
+                                                odd-or-even="odd"/>
+          <fo:conditional-page-master-reference master-reference="titlepage-even-draft"
+                                                odd-or-even="even"/>
+        </fo:repeatable-page-master-alternatives>
+      </fo:page-sequence-master>
+
+      <!-- setup for draft lots -->
+      <fo:page-sequence-master master-name="lot-draft">
+        <fo:repeatable-page-master-alternatives>
+          <fo:conditional-page-master-reference master-reference="blank-draft"
+                                                blank-or-not-blank="blank"/>
+          <fo:conditional-page-master-reference master-reference="lot-first-draft"
+                                                page-position="first"/>
+          <fo:conditional-page-master-reference master-reference="lot-odd-draft"
+                                                odd-or-even="odd"/>
+          <fo:conditional-page-master-reference master-reference="lot-even-draft"
+                                                odd-or-even="even"/>
+        </fo:repeatable-page-master-alternatives>
+      </fo:page-sequence-master>
+
+      <!-- setup draft front matter -->
+      <fo:page-sequence-master master-name="front-draft">
+        <fo:repeatable-page-master-alternatives>
+          <fo:conditional-page-master-reference master-reference="blank-draft"
+                                                blank-or-not-blank="blank"/>
+          <fo:conditional-page-master-reference master-reference="front-first-draft"
+                                                page-position="first"/>
+          <fo:conditional-page-master-reference master-reference="front-odd-draft"
+                                                odd-or-even="odd"/>
+          <fo:conditional-page-master-reference master-reference="front-even-draft"
+                                                odd-or-even="even"/>
+        </fo:repeatable-page-master-alternatives>
+      </fo:page-sequence-master>
+
+      <!-- setup for draft body pages -->
+      <fo:page-sequence-master master-name="body-draft">
+        <fo:repeatable-page-master-alternatives>
+          <fo:conditional-page-master-reference master-reference="blank-draft"
+                                                blank-or-not-blank="blank"/>
+          <fo:conditional-page-master-reference master-reference="body-first-draft"
+                                                page-position="first"/>
+          <fo:conditional-page-master-reference master-reference="body-odd-draft"
+                                                odd-or-even="odd"/>
+          <fo:conditional-page-master-reference master-reference="body-even-draft"
+                                                odd-or-even="even"/>
+        </fo:repeatable-page-master-alternatives>
+      </fo:page-sequence-master>
+
+      <!-- setup draft back matter -->
+      <fo:page-sequence-master master-name="back-draft">
+        <fo:repeatable-page-master-alternatives>
+          <fo:conditional-page-master-reference master-reference="blank-draft"
+                                                blank-or-not-blank="blank"/>
+          <fo:conditional-page-master-reference master-reference="back-first-draft"
+                                                page-position="first"/>
+          <fo:conditional-page-master-reference master-reference="back-odd-draft"
+                                                odd-or-even="odd"/>
+          <fo:conditional-page-master-reference master-reference="back-even-draft"
+                                                odd-or-even="even"/>
+        </fo:repeatable-page-master-alternatives>
+      </fo:page-sequence-master>
+
+      <!-- setup draft index pages -->
+      <fo:page-sequence-master master-name="index-draft">
+        <fo:repeatable-page-master-alternatives>
+          <fo:conditional-page-master-reference master-reference="blank-draft"
+                                                blank-or-not-blank="blank"/>
+          <fo:conditional-page-master-reference master-reference="index-first-draft"
+                                                page-position="first"/>
+          <fo:conditional-page-master-reference master-reference="index-odd-draft"
+                                                odd-or-even="odd"/>
+          <fo:conditional-page-master-reference master-reference="index-even-draft"
+                                                odd-or-even="even"/>
+        </fo:repeatable-page-master-alternatives>
+      </fo:page-sequence-master>
+    </xsl:if>
+
+    <xsl:call-template name="user.pagemasters"/>
+
+    </fo:layout-master-set>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="user.pagemasters"/> <!-- intentionally empty -->
+
+<!-- ==================================================================== -->
+
+<xsl:template name="select.pagemaster">
+  <xsl:param name="element" select="local-name(.)"/>
+  <xsl:param name="pageclass" select="''"/>
+
+  <xsl:variable name="pagemaster">
+    <xsl:choose>
+      <xsl:when test="$pageclass != ''">
+        <xsl:value-of select="$pageclass"/>
+      </xsl:when>
+      <xsl:when test="$pageclass = 'lot'">lot</xsl:when>
+      <xsl:when test="$element = 'dedication'">front</xsl:when>
+      <xsl:when test="$element = 'preface'">front</xsl:when>
+      <xsl:when test="$element = 'appendix'">back</xsl:when>
+      <xsl:when test="$element = 'glossary'">back</xsl:when>
+      <xsl:when test="$element = 'bibliography'">back</xsl:when>
+      <xsl:when test="$element = 'index'">index</xsl:when>
+      <xsl:when test="$element = 'colophon'">back</xsl:when>
+      <xsl:otherwise>body</xsl:otherwise>
+    </xsl:choose>
+
+    <xsl:choose>
+      <xsl:when test="$draft.mode = 'yes'">
+        <xsl:text>-draft</xsl:text>
+      </xsl:when>
+      <xsl:when test="$draft.mode = 'no'">
+        <!-- nop -->
+      </xsl:when>
+      <xsl:when test="ancestor-or-self::*[@status][1]/@status = 'draft'">
+        <xsl:text>-draft</xsl:text>
+      </xsl:when>
+      <xsl:otherwise>
+        <!-- nop -->
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:call-template name="select.user.pagemaster">
+    <xsl:with-param name="element" select="$element"/>
+    <xsl:with-param name="pageclass" select="$pageclass"/>
+    <xsl:with-param name="default-pagemaster" select="$pagemaster"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="select.user.pagemaster">
+  <xsl:param name="element"/>
+  <xsl:param name="pageclass"/>
+  <xsl:param name="default-pagemaster"/>
+
+  <!-- by default, return the default. But if you've created your own
+       pagemasters in user.pagemasters, you might want to select one here. -->
+  <xsl:value-of select="$default-pagemaster"/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="head.sep.rule">
+  <xsl:param name="pageclass"/>
+  <xsl:param name="sequence"/>
+  <xsl:param name="gentext-key"/>
+
+  <xsl:if test="$header.rule != 0">
+    <xsl:attribute name="border-bottom-width">0.5pt</xsl:attribute>
+    <xsl:attribute name="border-bottom-style">solid</xsl:attribute>
+    <xsl:attribute name="border-bottom-color">black</xsl:attribute>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template name="foot.sep.rule">
+  <xsl:param name="pageclass"/>
+  <xsl:param name="sequence"/>
+  <xsl:param name="gentext-key"/>
+
+  <xsl:if test="$footer.rule != 0">
+    <xsl:attribute name="border-top-width">0.5pt</xsl:attribute>
+    <xsl:attribute name="border-top-style">solid</xsl:attribute>
+    <xsl:attribute name="border-top-color">black</xsl:attribute>
+  </xsl:if>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="*" mode="running.head.mode">
+  <xsl:param name="master-reference" select="'unknown'"/>
+  <xsl:param name="gentext-key" select="name(.)"/>
+
+  <!-- remove -draft from reference -->
+  <xsl:variable name="pageclass">
+    <xsl:choose>
+      <xsl:when test="contains($master-reference, '-draft')">
+        <xsl:value-of select="substring-before($master-reference, '-draft')"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$master-reference"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <fo:static-content flow-name="xsl-region-before-first">
+    <fo:block xsl:use-attribute-sets="header.content.properties">
+      <xsl:call-template name="header.table">
+        <xsl:with-param name="pageclass" select="$pageclass"/>
+        <xsl:with-param name="sequence" select="'first'"/>
+        <xsl:with-param name="gentext-key" select="$gentext-key"/>
+      </xsl:call-template>
+    </fo:block>
+  </fo:static-content>
+
+  <fo:static-content flow-name="xsl-region-before-odd">
+    <fo:block xsl:use-attribute-sets="header.content.properties">
+      <xsl:call-template name="header.table">
+        <xsl:with-param name="pageclass" select="$pageclass"/>
+        <xsl:with-param name="sequence" select="'odd'"/>
+        <xsl:with-param name="gentext-key" select="$gentext-key"/>
+      </xsl:call-template>
+    </fo:block>
+  </fo:static-content>
+
+  <fo:static-content flow-name="xsl-region-before-even">
+    <fo:block xsl:use-attribute-sets="header.content.properties">
+      <xsl:call-template name="header.table">
+        <xsl:with-param name="pageclass" select="$pageclass"/>
+        <xsl:with-param name="sequence" select="'even'"/>
+        <xsl:with-param name="gentext-key" select="$gentext-key"/>
+      </xsl:call-template>
+    </fo:block>
+  </fo:static-content>
+
+  <fo:static-content flow-name="xsl-region-before-blank">
+    <fo:block xsl:use-attribute-sets="header.content.properties">
+      <xsl:call-template name="header.table">
+        <xsl:with-param name="pageclass" select="$pageclass"/>
+        <xsl:with-param name="sequence" select="'blank'"/>
+        <xsl:with-param name="gentext-key" select="$gentext-key"/>
+      </xsl:call-template>
+    </fo:block>
+  </fo:static-content>
+
+  <xsl:if test="$fop.extensions = 0">
+    <xsl:call-template name="footnote-separator"/>
+    <xsl:call-template name="blank.page.content"/>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template name="footnote-separator">
+  <fo:static-content flow-name="xsl-footnote-separator">
+    <fo:block>
+      <fo:leader color="black" leader-pattern="rule" leader-length="1in"/>
+    </fo:block>
+  </fo:static-content>
+</xsl:template>
+
+<xsl:template name="blank.page.content">
+  <fo:static-content flow-name="blank-body">
+    <fo:block text-align="center"/>
+  </fo:static-content>
+</xsl:template>
+
+<xsl:template name="header.table">
+  <xsl:param name="pageclass" select="''"/>
+  <xsl:param name="sequence" select="''"/>
+  <xsl:param name="gentext-key" select="''"/>
+
+  <!-- default is a single table style for all headers -->
+  <!-- Customize it for different page classes or sequence location -->
+
+  <xsl:choose>
+      <xsl:when test="$pageclass = 'index'">
+          <xsl:attribute name="margin-left">0pt</xsl:attribute>
+      </xsl:when>
+  </xsl:choose>
+
+  <xsl:variable name="column1">
+    <xsl:choose>
+      <xsl:when test="$sequence = 'first' or $sequence = 'odd'">1</xsl:when>
+      <xsl:otherwise>3</xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:variable name="column3">
+    <xsl:choose>
+      <xsl:when test="$sequence = 'first' or $sequence = 'odd'">3</xsl:when>
+      <xsl:otherwise>1</xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:variable name="candidate">
+    <fo:table table-layout="fixed" width="100%">
+      <xsl:call-template name="head.sep.rule">
+        <xsl:with-param name="pageclass" select="$pageclass"/>
+        <xsl:with-param name="sequence" select="$sequence"/>
+        <xsl:with-param name="gentext-key" select="$gentext-key"/>
+      </xsl:call-template>
+
+      <fo:table-column column-number="1">
+        <xsl:attribute name="column-width">
+          <xsl:text>proportional-column-width(</xsl:text>
+          <xsl:call-template name="header.footer.width">
+            <xsl:with-param name="location">header</xsl:with-param>
+            <xsl:with-param name="position" select="$column1"/>
+          </xsl:call-template>
+          <xsl:text>)</xsl:text>
+        </xsl:attribute>
+      </fo:table-column>
+      <fo:table-column column-number="2">
+        <xsl:attribute name="column-width">
+          <xsl:text>proportional-column-width(</xsl:text>
+          <xsl:call-template name="header.footer.width">
+            <xsl:with-param name="location">header</xsl:with-param>
+            <xsl:with-param name="position" select="2"/>
+          </xsl:call-template>
+          <xsl:text>)</xsl:text>
+        </xsl:attribute>
+      </fo:table-column>
+      <fo:table-column column-number="3">
+        <xsl:attribute name="column-width">
+          <xsl:text>proportional-column-width(</xsl:text>
+          <xsl:call-template name="header.footer.width">
+            <xsl:with-param name="location">header</xsl:with-param>
+            <xsl:with-param name="position" select="$column3"/>
+          </xsl:call-template>
+          <xsl:text>)</xsl:text>
+        </xsl:attribute>
+      </fo:table-column>
+
+      <fo:table-body>
+        <fo:table-row height="14pt">
+          <fo:table-cell text-align="left"
+                         display-align="before">
+            <xsl:if test="$fop.extensions = 0">
+              <xsl:attribute name="relative-align">baseline</xsl:attribute>
+            </xsl:if>
+            <fo:block>
+              <xsl:call-template name="header.content">
+                <xsl:with-param name="pageclass" select="$pageclass"/>
+                <xsl:with-param name="sequence" select="$sequence"/>
+                <xsl:with-param name="position" select="'left'"/>
+                <xsl:with-param name="gentext-key" select="$gentext-key"/>
+              </xsl:call-template>
+            </fo:block>
+          </fo:table-cell>
+          <fo:table-cell text-align="center"
+                         display-align="before">
+            <xsl:if test="$fop.extensions = 0">
+              <xsl:attribute name="relative-align">baseline</xsl:attribute>
+            </xsl:if>
+            <fo:block>
+              <xsl:call-template name="header.content">
+                <xsl:with-param name="pageclass" select="$pageclass"/>
+                <xsl:with-param name="sequence" select="$sequence"/>
+                <xsl:with-param name="position" select="'center'"/>
+                <xsl:with-param name="gentext-key" select="$gentext-key"/>
+              </xsl:call-template>
+            </fo:block>
+          </fo:table-cell>
+          <fo:table-cell text-align="right"
+                         display-align="before">
+            <xsl:if test="$fop.extensions = 0">
+              <xsl:attribute name="relative-align">baseline</xsl:attribute>
+            </xsl:if>
+            <fo:block>
+              <xsl:call-template name="header.content">
+                <xsl:with-param name="pageclass" select="$pageclass"/>
+                <xsl:with-param name="sequence" select="$sequence"/>
+                <xsl:with-param name="position" select="'right'"/>
+                <xsl:with-param name="gentext-key" select="$gentext-key"/>
+              </xsl:call-template>
+            </fo:block>
+          </fo:table-cell>
+        </fo:table-row>
+      </fo:table-body>
+    </fo:table>
+  </xsl:variable>
+
+  <!-- Really output a header? -->
+  <xsl:choose>
+    <xsl:when test="$pageclass = 'titlepage' and $gentext-key = 'book'
+                    and $sequence='first'">
+      <!-- no, book titlepages have no headers at all -->
+    </xsl:when>
+    <xsl:when test="$sequence = 'blank' and $headers.on.blank.pages = 0">
+      <!-- no output -->
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:copy-of select="$candidate"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="header.content">
+  <xsl:param name="pageclass" select="''"/>
+  <xsl:param name="sequence" select="''"/>
+  <xsl:param name="position" select="''"/>
+  <xsl:param name="gentext-key" select="''"/>
+
+<!--
+  <fo:block>
+    <xsl:value-of select="$pageclass"/>
+    <xsl:text>, </xsl:text>
+    <xsl:value-of select="$sequence"/>
+    <xsl:text>, </xsl:text>
+    <xsl:value-of select="$position"/>
+    <xsl:text>, </xsl:text>
+    <xsl:value-of select="$gentext-key"/>
+  </fo:block>
+-->
+
+  <fo:block>
+
+    <!-- sequence can be odd, even, first, blank -->
+    <!-- position can be left, center, right -->
+    <xsl:choose>
+      <xsl:when test="$sequence = 'blank'">
+        <!-- nothing -->
+      </xsl:when>
+
+      <xsl:when test="$position='left'">
+        <!-- Same for odd, even, empty, and blank sequences -->
+        <xsl:call-template name="draft.text"/>
+      </xsl:when>
+
+      <xsl:when test="($sequence='odd' or $sequence='even') and $position='center'">
+        <xsl:if test="$pageclass != 'titlepage'">
+          <xsl:choose>
+            <xsl:when test="ancestor::book and ($double.sided != 0)">
+              <fo:retrieve-marker retrieve-class-name="section.head.marker"
+                                  retrieve-position="first-including-carryover"
+                                  retrieve-boundary="page-sequence"/>
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:apply-templates select="." mode="titleabbrev.markup"/>
+            </xsl:otherwise>
+          </xsl:choose>
+        </xsl:if>
+      </xsl:when>
+
+      <xsl:when test="$position='center'">
+        <!-- nothing for empty and blank sequences -->
+      </xsl:when>
+
+      <xsl:when test="$position='right'">
+        <!-- Same for odd, even, empty, and blank sequences -->
+        <xsl:call-template name="draft.text"/>
+      </xsl:when>
+
+      <xsl:when test="$sequence = 'first'">
+        <!-- nothing for first pages -->
+      </xsl:when>
+
+      <xsl:when test="$sequence = 'blank'">
+        <!-- nothing for blank pages -->
+      </xsl:when>
+    </xsl:choose>
+  </fo:block>
+</xsl:template>
+
+<xsl:template name="header.footer.width">
+  <xsl:param name="location" select="'header'"/>
+  <xsl:param name="position" select="1"/>
+
+  <xsl:variable name="width.set">
+    <xsl:choose>
+      <xsl:when test="$location = 'header'">
+        <xsl:value-of select="normalize-space($header.column.widths)"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="normalize-space($footer.column.widths)"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+
+  <xsl:variable name="width">
+    <xsl:choose>
+      <xsl:when test="$position = 1">
+        <xsl:value-of select="substring-before($width.set, ' ')"/>
+      </xsl:when>
+      <xsl:when test="$position = 2">
+        <xsl:value-of select="substring-before(substring-after($width.set, ' '), ' ')"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="substring-after(substring-after($width.set, ' '), ' ')"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <!-- Make sure it is a number -->
+  <xsl:choose>
+    <xsl:when test = "$width = number($width)">
+      <xsl:value-of select="$width"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:message>Error: value in <xsl:value-of select="$location"/>.column.widths at position <xsl:value-of select="$position"/> is not a number.</xsl:message>
+      <xsl:text>1</xsl:text>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="draft.text">
+  <xsl:choose>
+    <xsl:when test="$draft.mode = 'yes'">
+      <xsl:call-template name="gentext">
+        <xsl:with-param name="key" select="'Draft'"/>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:when test="$draft.mode = 'no'">
+      <!-- nop -->
+    </xsl:when>
+    <xsl:when test="ancestor-or-self::*[@status][1]/@status = 'draft'">
+      <xsl:call-template name="gentext">
+        <xsl:with-param name="key" select="'Draft'"/>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:otherwise>
+      <!-- nop -->
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="*" mode="running.foot.mode">
+  <xsl:param name="master-reference" select="'unknown'"/>
+  <xsl:param name="gentext-key" select="name(.)"/>
+
+  <!-- remove -draft from reference -->
+  <xsl:variable name="pageclass">
+    <xsl:choose>
+      <xsl:when test="contains($master-reference, '-draft')">
+        <xsl:value-of select="substring-before($master-reference, '-draft')"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$master-reference"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <fo:static-content flow-name="xsl-region-after-first">
+    <fo:block xsl:use-attribute-sets="footer.content.properties">
+      <xsl:call-template name="footer.table">
+        <xsl:with-param name="pageclass" select="$pageclass"/>
+        <xsl:with-param name="sequence" select="'first'"/>
+        <xsl:with-param name="gentext-key" select="$gentext-key"/>
+      </xsl:call-template>
+    </fo:block>
+  </fo:static-content>
+
+  <fo:static-content flow-name="xsl-region-after-odd">
+    <fo:block xsl:use-attribute-sets="footer.content.properties">
+      <xsl:call-template name="footer.table">
+        <xsl:with-param name="pageclass" select="$pageclass"/>
+        <xsl:with-param name="sequence" select="'odd'"/>
+        <xsl:with-param name="gentext-key" select="$gentext-key"/>
+      </xsl:call-template>
+    </fo:block>
+  </fo:static-content>
+
+  <fo:static-content flow-name="xsl-region-after-even">
+    <fo:block xsl:use-attribute-sets="footer.content.properties">
+      <xsl:call-template name="footer.table">
+        <xsl:with-param name="pageclass" select="$pageclass"/>
+        <xsl:with-param name="sequence" select="'even'"/>
+        <xsl:with-param name="gentext-key" select="$gentext-key"/>
+      </xsl:call-template>
+    </fo:block>
+  </fo:static-content>
+
+  <fo:static-content flow-name="xsl-region-after-blank">
+    <fo:block xsl:use-attribute-sets="footer.content.properties">
+      <xsl:call-template name="footer.table">
+        <xsl:with-param name="pageclass" select="$pageclass"/>
+        <xsl:with-param name="sequence" select="'blank'"/>
+        <xsl:with-param name="gentext-key" select="$gentext-key"/>
+      </xsl:call-template>
+    </fo:block>
+  </fo:static-content>
+</xsl:template>
+
+<xsl:template name="footer.table">
+  <xsl:param name="pageclass" select="''"/>
+  <xsl:param name="sequence" select="''"/>
+  <xsl:param name="gentext-key" select="''"/>
+
+  <!-- default is a single table style for all footers -->
+  <!-- Customize it for different page classes or sequence location -->
+
+  <xsl:choose>
+      <xsl:when test="$pageclass = 'index'">
+          <xsl:attribute name="margin-left">0pt</xsl:attribute>
+      </xsl:when>
+  </xsl:choose>
+
+  <xsl:variable name="column1">
+    <xsl:choose>
+      <xsl:when test="$sequence = 'first' or $sequence = 'odd'">1</xsl:when>
+      <xsl:otherwise>3</xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:variable name="column3">
+    <xsl:choose>
+      <xsl:when test="$sequence = 'first' or $sequence = 'odd'">3</xsl:when>
+      <xsl:otherwise>1</xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:variable name="candidate">
+    <fo:table table-layout="fixed" width="100%">
+      <xsl:call-template name="foot.sep.rule">
+        <xsl:with-param name="pageclass" select="$pageclass"/>
+        <xsl:with-param name="sequence" select="$sequence"/>
+        <xsl:with-param name="gentext-key" select="$gentext-key"/>
+      </xsl:call-template>
+      <fo:table-column column-number="1">
+        <xsl:attribute name="column-width">
+          <xsl:text>proportional-column-width(</xsl:text>
+          <xsl:call-template name="header.footer.width">
+            <xsl:with-param name="location">footer</xsl:with-param>
+            <xsl:with-param name="position" select="$column1"/>
+          </xsl:call-template>
+          <xsl:text>)</xsl:text>
+        </xsl:attribute>
+      </fo:table-column>
+      <fo:table-column column-number="2">
+        <xsl:attribute name="column-width">
+          <xsl:text>proportional-column-width(</xsl:text>
+          <xsl:call-template name="header.footer.width">
+            <xsl:with-param name="location">footer</xsl:with-param>
+            <xsl:with-param name="position" select="2"/>
+          </xsl:call-template>
+          <xsl:text>)</xsl:text>
+        </xsl:attribute>
+      </fo:table-column>
+      <fo:table-column column-number="3">
+        <xsl:attribute name="column-width">
+          <xsl:text>proportional-column-width(</xsl:text>
+          <xsl:call-template name="header.footer.width">
+            <xsl:with-param name="location">footer</xsl:with-param>
+            <xsl:with-param name="position" select="$column3"/>
+          </xsl:call-template>
+          <xsl:text>)</xsl:text>
+        </xsl:attribute>
+      </fo:table-column>
+
+      <fo:table-body>
+        <fo:table-row height="14pt">
+          <fo:table-cell text-align="left"
+                         display-align="after">
+            <xsl:if test="$fop.extensions = 0">
+              <xsl:attribute name="relative-align">baseline</xsl:attribute>
+            </xsl:if>
+            <fo:block>
+              <xsl:call-template name="footer.content">
+                <xsl:with-param name="pageclass" select="$pageclass"/>
+                <xsl:with-param name="sequence" select="$sequence"/>
+                <xsl:with-param name="position" select="'left'"/>
+                <xsl:with-param name="gentext-key" select="$gentext-key"/>
+              </xsl:call-template>
+            </fo:block>
+          </fo:table-cell>
+          <fo:table-cell text-align="center"
+                         display-align="after">
+            <xsl:if test="$fop.extensions = 0">
+              <xsl:attribute name="relative-align">baseline</xsl:attribute>
+            </xsl:if>
+            <fo:block>
+              <xsl:call-template name="footer.content">
+                <xsl:with-param name="pageclass" select="$pageclass"/>
+                <xsl:with-param name="sequence" select="$sequence"/>
+                <xsl:with-param name="position" select="'center'"/>
+                <xsl:with-param name="gentext-key" select="$gentext-key"/>
+              </xsl:call-template>
+            </fo:block>
+          </fo:table-cell>
+          <fo:table-cell text-align="right"
+                         display-align="after">
+            <xsl:if test="$fop.extensions = 0">
+              <xsl:attribute name="relative-align">baseline</xsl:attribute>
+            </xsl:if>
+            <fo:block>
+              <xsl:call-template name="footer.content">
+                <xsl:with-param name="pageclass" select="$pageclass"/>
+                <xsl:with-param name="sequence" select="$sequence"/>
+                <xsl:with-param name="position" select="'right'"/>
+                <xsl:with-param name="gentext-key" select="$gentext-key"/>
+              </xsl:call-template>
+            </fo:block>
+          </fo:table-cell>
+        </fo:table-row>
+      </fo:table-body>
+    </fo:table>
+  </xsl:variable>
+
+  <!-- Really output a footer? -->
+  <xsl:choose>
+    <xsl:when test="$pageclass='titlepage' and $gentext-key='book'
+                    and $sequence='first'">
+      <!-- no, book titlepages have no footers at all -->
+    </xsl:when>
+    <xsl:when test="$sequence = 'blank' and $footers.on.blank.pages = 0">
+      <!-- no output -->
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:copy-of select="$candidate"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="footer.content">
+  <xsl:param name="pageclass" select="''"/>
+  <xsl:param name="sequence" select="''"/>
+  <xsl:param name="position" select="''"/>
+  <xsl:param name="gentext-key" select="''"/>
+
+<!--
+  <fo:block>
+    <xsl:value-of select="$pageclass"/>
+    <xsl:text>, </xsl:text>
+    <xsl:value-of select="$sequence"/>
+    <xsl:text>, </xsl:text>
+    <xsl:value-of select="$position"/>
+    <xsl:text>, </xsl:text>
+    <xsl:value-of select="$gentext-key"/>
+  </fo:block>
+-->
+
+  <fo:block>
+    <!-- pageclass can be front, body, back -->
+    <!-- sequence can be odd, even, first, blank -->
+    <!-- position can be left, center, right -->
+    <xsl:choose>
+      <xsl:when test="$pageclass = 'titlepage'">
+        <!-- nop; no footer on title pages -->
+      </xsl:when>
+
+      <xsl:when test="$double.sided != 0 and $sequence = 'even'
+                      and $position='left'">
+        <fo:page-number/>
+      </xsl:when>
+
+      <xsl:when test="$double.sided != 0 and ($sequence = 'odd' or $sequence = 'first')
+                      and $position='right'">
+        <fo:page-number/>
+      </xsl:when>
+
+      <xsl:when test="$double.sided = 0 and $position='center'">
+        <fo:page-number/>
+      </xsl:when>
+
+      <xsl:when test="$sequence='blank'">
+        <xsl:choose>
+          <xsl:when test="$double.sided != 0 and $position = 'left'">
+            <fo:page-number/>
+          </xsl:when>
+          <xsl:when test="$double.sided = 0 and $position = 'center'">
+            <fo:page-number/>
+          </xsl:when>
+          <xsl:otherwise>
+            <!-- nop -->
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:when>
+
+
+      <xsl:otherwise>
+        <!-- nop -->
+      </xsl:otherwise>
+    </xsl:choose>
+  </fo:block>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="page.number.format">
+  <xsl:param name="element" select="local-name(.)"/>
+
+  <xsl:choose>
+    <xsl:when test="$element = 'toc'">i</xsl:when>
+    <xsl:when test="$element = 'preface'">i</xsl:when>
+    <xsl:when test="$element = 'dedication'">i</xsl:when>
+    <xsl:otherwise>1</xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/param.ent
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/param.ent	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/param.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,238 @@
+<!ENTITY admon.graphics SYSTEM "../params/admon.graphics.xml">
+<!ENTITY admon.graphics.extension SYSTEM "../params/admon.graphics.extension.xml">
+<!ENTITY admon.graphics.path SYSTEM "../params/admon.graphics.path.xml">
+<!ENTITY admon.textlabel SYSTEM "../params/admon.textlabel.xml">
+<!ENTITY admonition.properties SYSTEM "../params/admonition.properties.xml">
+<!ENTITY admonition.title.properties SYSTEM "../params/admonition.title.properties.xml">
+<!ENTITY alignment SYSTEM "../params/alignment.xml">
+<!ENTITY appendix.autolabel SYSTEM "../params/appendix.autolabel.xml">
+<!ENTITY arbortext.extensions SYSTEM "../params/arbortext.extensions.xml">
+<!ENTITY article.appendix.title.properties SYSTEM "../params/article.appendix.title.properties.xml">
+<!ENTITY author.othername.in.middle SYSTEM "../params/author.othername.in.middle.xml">
+<!ENTITY autotoc.label.separator SYSTEM "../params/autotoc.label.separator.xml">
+<!ENTITY axf.extensions SYSTEM "../params/axf.extensions.xml">
+<!ENTITY biblioentry.item.separator SYSTEM "../params/biblioentry.item.separator.xml">
+<!ENTITY bibliography.collection SYSTEM "../params/bibliography.collection.xml">
+<!ENTITY blockquote.properties SYSTEM "../params/blockquote.properties.xml">
+<!ENTITY body.font.family SYSTEM "../params/body.font.family.xml">
+<!ENTITY body.font.master SYSTEM "../params/body.font.master.xml">
+<!ENTITY body.font.size SYSTEM "../params/body.font.size.xml">
+<!ENTITY body.margin.bottom SYSTEM "../params/body.margin.bottom.xml">
+<!ENTITY body.margin.top SYSTEM "../params/body.margin.top.xml">
+<!ENTITY callout.defaultcolumn SYSTEM "../params/callout.defaultcolumn.xml">
+<!ENTITY callout.graphics SYSTEM "../params/callout.graphics.xml">
+<!ENTITY callout.graphics.extension SYSTEM "../params/callout.graphics.extension.xml">
+<!ENTITY callout.graphics.number.limit SYSTEM "../params/callout.graphics.number.limit.xml">
+<!ENTITY callout.graphics.path SYSTEM "../params/callout.graphics.path.xml">
+<!ENTITY callout.unicode SYSTEM "../params/callout.unicode.xml">
+<!ENTITY callout.unicode.font SYSTEM "../params/callout.unicode.font.xml">
+<!ENTITY callout.unicode.number.limit SYSTEM "../params/callout.unicode.number.limit.xml">
+<!ENTITY callout.unicode.start.character SYSTEM "../params/callout.unicode.start.character.xml">
+<!ENTITY callouts.extension SYSTEM "../params/callouts.extension.xml">
+<!ENTITY chapter.autolabel SYSTEM "../params/chapter.autolabel.xml">
+<!ENTITY column.count.back SYSTEM "../params/column.count.back.xml">
+<!ENTITY column.count.body SYSTEM "../params/column.count.body.xml">
+<!ENTITY column.count.front SYSTEM "../params/column.count.front.xml">
+<!ENTITY column.count.index SYSTEM "../params/column.count.index.xml">
+<!ENTITY column.count.lot SYSTEM "../params/column.count.lot.xml">
+<!ENTITY column.count.titlepage SYSTEM "../params/column.count.titlepage.xml">
+<!ENTITY compact.list.item.spacing SYSTEM "../params/compact.list.item.spacing.xml">
+<!ENTITY current.docid SYSTEM "../params/current.docid.xml">
+<!ENTITY default.table.width SYSTEM "../params/default.table.width.xml">
+<!ENTITY default.units SYSTEM "../params/default.units.xml">
+<!ENTITY dingbat.font.family SYSTEM "../params/dingbat.font.family.xml">
+<!ENTITY double.sided SYSTEM "../params/double.sided.xml">
+<!ENTITY draft.mode SYSTEM "../params/draft.mode.xml">
+<!ENTITY draft.watermark.image SYSTEM "../params/draft.watermark.image.xml">
+<!ENTITY firstterm.only.link SYSTEM "../params/firstterm.only.link.xml">
+<!ENTITY footer.rule SYSTEM "../params/footer.rule.xml">
+<!ENTITY footer.column.widths SYSTEM "../params/footer.column.widths.xml">
+<!ENTITY footers.on.blank.pages SYSTEM "../params/footers.on.blank.pages.xml">
+<!ENTITY footnote.font.size SYSTEM "../params/footnote.font.size.xml">
+<!ENTITY fop.extensions SYSTEM "../params/fop.extensions.xml">
+<!ENTITY formal.object.properties SYSTEM "../params/formal.object.properties.xml">
+<!ENTITY formal.procedures SYSTEM "../params/formal.procedures.xml">
+<!ENTITY formal.title.placement SYSTEM "../params/formal.title.placement.xml">
+<!ENTITY formal.title.properties SYSTEM "../params/formal.title.properties.xml">
+<!ENTITY funcsynopsis.decoration SYSTEM "../params/funcsynopsis.decoration.xml">
+<!ENTITY funcsynopsis.style SYSTEM "../params/funcsynopsis.style.xml">
+<!ENTITY function.parens SYSTEM "../params/function.parens.xml">
+<!ENTITY generate.index SYSTEM "../params/generate.index.xml">
+<!ENTITY generate.toc SYSTEM "../params/generate.toc.xml">
+<!ENTITY glossary.as.blocks SYSTEM "../params/glossary.as.blocks.xml">
+<!ENTITY glossary.collection SYSTEM "../params/glossary.collection.xml">
+<!ENTITY glosslist.as.blocks SYSTEM "../params/glosslist.as.blocks.xml">
+<!ENTITY glossterm.auto.link SYSTEM "../params/glossterm.auto.link.xml">
+<!ENTITY glossterm.separation SYSTEM "../params/glossterm.separation.xml">
+<!ENTITY glossterm.width SYSTEM "../params/glossterm.width.xml">
+<!ENTITY graphic.default.extension SYSTEM "../params/graphic.default.extension.xml">
+<!ENTITY header.rule SYSTEM "../params/header.rule.xml">
+<!ENTITY header.column.widths SYSTEM "../params/header.column.widths.xml">
+<!ENTITY headers.on.blank.pages SYSTEM "../params/headers.on.blank.pages.xml">
+<!ENTITY hyphenate SYSTEM "../params/hyphenate.xml">
+<!ENTITY informal.object.properties SYSTEM "../params/informal.object.properties.xml">
+<!ENTITY index.preferred.page.properties SYSTEM "../params/index.preferred.page.properties.xml">
+<!ENTITY insert.xref.page.number SYSTEM "../params/insert.xref.page.number.xml">
+<!ENTITY label.from.part SYSTEM "../params/label.from.part.xml">
+<!ENTITY line-height SYSTEM "../params/line-height.xml">
+<!ENTITY linenumbering.everyNth SYSTEM "../params/linenumbering.everyNth.xml">
+<!ENTITY linenumbering.extension SYSTEM "../params/linenumbering.extension.xml">
+<!ENTITY linenumbering.separator SYSTEM "../params/linenumbering.separator.xml">
+<!ENTITY linenumbering.width SYSTEM "../params/linenumbering.width.xml">
+<!ENTITY list.block.spacing SYSTEM "../params/list.block.spacing.xml">
+<!ENTITY list.item.spacing SYSTEM "../params/list.item.spacing.xml">
+<!ENTITY make.single.year.ranges SYSTEM "../params/make.single.year.ranges.xml">
+<!ENTITY make.year.ranges SYSTEM "../params/make.year.ranges.xml">
+<!ENTITY marker.section.level SYSTEM "../params/marker.section.level.xml">
+<!ENTITY monospace.font.family SYSTEM "../params/monospace.font.family.xml">
+<!ENTITY monospace.verbatim.properties SYSTEM "../params/monospace.verbatim.properties.xml">
+<!ENTITY nominal.table.width SYSTEM "../params/nominal.table.width.xml">
+<!ENTITY normal.para.spacing SYSTEM "../params/normal.para.spacing.xml">
+<!ENTITY olink.doctitle SYSTEM "../params/olink.doctitle.xml">
+<!ENTITY page.height SYSTEM "../params/page.height.xml">
+<!ENTITY page.height.portrait SYSTEM "../params/page.height.portrait.xml">
+<!ENTITY page.margin.bottom SYSTEM "../params/page.margin.bottom.xml">
+<!ENTITY page.margin.inner SYSTEM "../params/page.margin.inner.xml">
+<!ENTITY page.margin.outer SYSTEM "../params/page.margin.outer.xml">
+<!ENTITY page.margin.top SYSTEM "../params/page.margin.top.xml">
+<!ENTITY page.orientation SYSTEM "../params/page.orientation.xml">
+<!ENTITY page.width SYSTEM "../params/page.width.xml">
+<!ENTITY page.width.portrait SYSTEM "../params/page.width.portrait.xml">
+<!ENTITY paper.type SYSTEM "../params/paper.type.xml">
+<!ENTITY part.autolabel SYSTEM "../params/part.autolabel.xml">
+<!ENTITY passivetex.extensions SYSTEM "../params/passivetex.extensions.xml">
+<!ENTITY preface.autolabel SYSTEM "../params/preface.autolabel.xml">
+<!ENTITY preferred.mediaobject.role SYSTEM "../params/preferred.mediaobject.role.xml">
+<!ENTITY process.empty.source.toc SYSTEM "../params/process.empty.source.toc.xml">
+<!ENTITY process.source.toc SYSTEM "../params/process.source.toc.xml">
+<!ENTITY profile.arch SYSTEM "../params/profile.arch.xml">
+<!ENTITY profile.attribute SYSTEM "../params/profile.attribute.xml">
+<!ENTITY profile.condition SYSTEM "../params/profile.condition.xml">
+<!ENTITY profile.conformance SYSTEM "../params/profile.conformance.xml">
+<!ENTITY profile.lang SYSTEM "../params/profile.lang.xml">
+<!ENTITY profile.os SYSTEM "../params/profile.os.xml">
+<!ENTITY profile.revision SYSTEM "../params/profile.revision.xml">
+<!ENTITY profile.revisionflag SYSTEM "../params/profile.revisionflag.xml">
+<!ENTITY profile.role SYSTEM "../params/profile.role.xml">
+<!ENTITY profile.security SYSTEM "../params/profile.security.xml">
+<!ENTITY profile.separator SYSTEM "../params/profile.separator.xml">
+<!ENTITY profile.userlevel SYSTEM "../params/profile.userlevel.xml">
+<!ENTITY profile.value SYSTEM "../params/profile.value.xml">
+<!ENTITY profile.vendor SYSTEM "../params/profile.vendor.xml">
+<!ENTITY punct.honorific SYSTEM "../params/punct.honorific.xml">
+<!ENTITY qanda.inherit.numeration SYSTEM "../params/qanda.inherit.numeration.xml">
+<!ENTITY qandadiv.autolabel SYSTEM "../params/qandadiv.autolabel.xml">
+<!ENTITY refentry.generate.name SYSTEM "../params/refentry.generate.name.xml">
+<!ENTITY refentry.generate.title SYSTEM "../params/refentry.generate.title.xml">
+<!ENTITY refentry.pagebreak SYSTEM "../params/refentry.pagebreak.xml">
+<!ENTITY refentry.title.properties SYSTEM "../params/refentry.title.properties.xml">
+<!ENTITY refentry.xref.manvolnum SYSTEM "../params/refentry.xref.manvolnum.xml">
+<!ENTITY region.after.extent SYSTEM "../params/region.after.extent.xml">
+<!ENTITY region.before.extent SYSTEM "../params/region.before.extent.xml">
+<!ENTITY rootid SYSTEM "../params/rootid.xml">
+<!ENTITY runinhead.default.title.end.punct SYSTEM "../params/runinhead.default.title.end.punct.xml">
+<!ENTITY runinhead.title.end.punct SYSTEM "../params/runinhead.title.end.punct.xml">
+<!ENTITY sans.font.family SYSTEM "../params/sans.font.family.xml">
+<!ENTITY section.autolabel SYSTEM "../params/section.autolabel.xml">
+<!ENTITY section.label.includes.component.label SYSTEM "../params/section.label.includes.component.label.xml">
+<!ENTITY section.title.properties SYSTEM "../params/section.title.properties.xml">
+<!ENTITY segmentedlist.as.table SYSTEM "../params/segmentedlist.as.table.xml">
+<!ENTITY shade.verbatim SYSTEM "../params/shade.verbatim.xml">
+<!ENTITY shade.verbatim.style SYSTEM "../params/shade.verbatim.style.xml">
+<!ENTITY show.comments SYSTEM "../params/show.comments.xml">
+<!ENTITY symbol.font.family SYSTEM "../params/symbol.font.family.xml">
+<!ENTITY table.cell.padding SYSTEM "../params/table.cell.padding.xml">
+<!ENTITY tablecolumns.extension SYSTEM "../params/tablecolumns.extension.xml">
+<!ENTITY target.database.document SYSTEM "../params/target.database.document.xml">
+<!ENTITY tex.math.delims SYSTEM "../params/tex.math.delims.xml">
+<!ENTITY tex.math.in.alt SYSTEM "../params/tex.math.in.alt.xml">
+<!ENTITY textinsert.extension SYSTEM "../params/textinsert.extension.xml">
+<!ENTITY title.font.family SYSTEM "../params/title.font.family.xml">
+<!ENTITY title.margin.left SYSTEM "../params/title.margin.left.xml">
+<!ENTITY toc.indent.width SYSTEM "../params/toc.indent.width.xml">
+<!ENTITY toc.margin.properties SYSTEM "../params/toc.margin.properties.xml">
+<!ENTITY toc.section.depth SYSTEM "../params/toc.section.depth.xml">
+<!ENTITY ulink.footnotes SYSTEM "../params/ulink.footnotes.xml">
+<!ENTITY ulink.hyphenate SYSTEM "../params/ulink.hyphenate.xml">
+<!ENTITY ulink.show SYSTEM "../params/ulink.show.xml">
+<!ENTITY use.extensions SYSTEM "../params/use.extensions.xml">
+<!ENTITY use.local.olink.style SYSTEM "../params/use.local.olink.style.xml">
+<!ENTITY use.role.as.xrefstyle SYSTEM "../params/use.role.as.xrefstyle.xml">
+<!ENTITY use.role.for.mediaobject SYSTEM "../params/use.role.for.mediaobject.xml">
+<!ENTITY use.svg SYSTEM "../params/use.svg.xml">
+<!ENTITY variablelist.as.blocks SYSTEM "../params/variablelist.as.blocks.xml">
+<!ENTITY verbatim.properties SYSTEM "../params/verbatim.properties.xml">
+<!ENTITY xep.extensions SYSTEM "../params/xep.extensions.xml">
+<!ENTITY xep.index.item.properties SYSTEM "../params/xep.index.item.properties.xml">
+<!ENTITY xref.properties SYSTEM "../params/xref.properties.xml">
+<!ENTITY sidebar.properties SYSTEM "../params/sidebar.properties.xml">
+<!ENTITY menuchoice.separator SYSTEM "../params/menuchoice.separator.xml">
+<!ENTITY menuchoice.menu.separator SYSTEM "../params/menuchoice.menu.separator.xml">
+<!ENTITY bibliography.numbered SYSTEM "../params/bibliography.numbered.xml">
+<!ENTITY section.title.level1.properties SYSTEM "../params/section.title.level1.properties.xml">
+<!ENTITY section.title.level2.properties SYSTEM "../params/section.title.level2.properties.xml">
+<!ENTITY section.title.level3.properties SYSTEM "../params/section.title.level3.properties.xml">
+<!ENTITY section.title.level4.properties SYSTEM "../params/section.title.level4.properties.xml">
+<!ENTITY section.title.level5.properties SYSTEM "../params/section.title.level5.properties.xml">
+<!ENTITY section.title.level6.properties SYSTEM "../params/section.title.level6.properties.xml">
+<!ENTITY monospace.properties SYSTEM "../params/monospace.properties.xml">
+<!ENTITY make.index.markup SYSTEM "../params/make.index.markup.xml">
+<!ENTITY l10n.gentext.language SYSTEM "../params/l10n.gentext.language.xml">
+<!ENTITY l10n.gentext.default.language SYSTEM "../params/l10n.gentext.default.language.xml">
+<!ENTITY l10n.gentext.use.xref.language SYSTEM "../params/l10n.gentext.use.xref.language.xml">
+<!ENTITY default.image.width SYSTEM "../params/default.image.width.xml">
+<!ENTITY default.float.class SYSTEM "../params/default.float.class.xml">
+<!ENTITY bridgehead.in.toc SYSTEM "../params/bridgehead.in.toc.xml">
+<!ENTITY generate.section.toc.level SYSTEM "../params/generate.section.toc.level.xml">
+<!ENTITY table.cell.border.color SYSTEM "../params/table.cell.border.color.xml">
+<!ENTITY table.cell.border.style SYSTEM "../params/table.cell.border.style.xml">
+<!ENTITY table.cell.border.thickness SYSTEM "../params/table.cell.border.thickness.xml">
+<!ENTITY table.frame.border.color SYSTEM "../params/table.frame.border.color.xml">
+<!ENTITY table.frame.border.style SYSTEM "../params/table.frame.border.style.xml">
+<!ENTITY table.frame.border.thickness SYSTEM "../params/table.frame.border.thickness.xml">
+<!ENTITY header.content.properties SYSTEM "../params/header.content.properties.xml">
+<!ENTITY footer.content.properties SYSTEM "../params/footer.content.properties.xml">
+<!ENTITY ignore.image.scaling SYSTEM "../params/ignore.image.scaling.xml">
+<!ENTITY figure.properties SYSTEM "../params/figure.properties.xml">
+<!ENTITY example.properties SYSTEM "../params/example.properties.xml">
+<!ENTITY equation.properties SYSTEM "../params/equation.properties.xml">
+<!ENTITY table.properties SYSTEM "../params/table.properties.xml">
+<!ENTITY procedure.properties SYSTEM "../params/procedure.properties.xml">
+<!ENTITY footnote.number.format SYSTEM "../params/footnote.number.format.xml">
+<!ENTITY table.footnote.number.format SYSTEM "../params/table.footnote.number.format.xml">
+<!ENTITY footnote.number.symbols SYSTEM "../params/footnote.number.symbols.xml">
+<!ENTITY table.footnote.number.symbols SYSTEM "../params/table.footnote.number.symbols.xml">
+<!ENTITY glossentry.show.acronym SYSTEM "../params/glossentry.show.acronym.xml">
+<!ENTITY ulink.footnote.number.format SYSTEM "../params/ulink.footnote.number.format.xml">
+<!ENTITY xref.with.number.and.title SYSTEM "../params/xref.with.number.and.title.xml">
+<!ENTITY ebnf.assignment SYSTEM "../params/ebnf.assignment.xml">
+<!ENTITY ebnf.statement.terminator SYSTEM "../params/ebnf.statement.terminator.xml">
+<!ENTITY root.properties SYSTEM "../params/root.properties.xml">
+<!ENTITY column.gap.back SYSTEM "../params/column.gap.back.xml">
+<!ENTITY column.gap.body SYSTEM "../params/column.gap.body.xml">
+<!ENTITY column.gap.front SYSTEM "../params/column.gap.front.xml">
+<!ENTITY column.gap.index SYSTEM "../params/column.gap.index.xml">
+<!ENTITY column.gap.lot SYSTEM "../params/column.gap.lot.xml">
+<!ENTITY column.gap.titlepage SYSTEM "../params/column.gap.titlepage.xml">
+<!ENTITY qanda.title.properties SYSTEM "../params/qanda.title.properties.xml">
+<!ENTITY qanda.title.level1.properties SYSTEM "../params/qanda.title.level1.properties.xml">
+<!ENTITY qanda.title.level2.properties SYSTEM "../params/qanda.title.level2.properties.xml">
+<!ENTITY qanda.title.level3.properties SYSTEM "../params/qanda.title.level3.properties.xml">
+<!ENTITY qanda.title.level4.properties SYSTEM "../params/qanda.title.level4.properties.xml">
+<!ENTITY qanda.title.level5.properties SYSTEM "../params/qanda.title.level5.properties.xml">
+<!ENTITY qanda.title.level6.properties SYSTEM "../params/qanda.title.level6.properties.xml">
+<!ENTITY variablelist.max.termlength SYSTEM "../params/variablelist.max.termlength.xml">
+<!ENTITY qanda.defaultlabel SYSTEM "../params/qanda.defaultlabel.xml">
+<!ENTITY xref.label-title.separator SYSTEM "../params/xref.label-title.separator.xml">
+<!ENTITY xref.label-page.separator SYSTEM "../params/xref.label-page.separator.xml">
+<!ENTITY xref.title-page.separator SYSTEM "../params/xref.title-page.separator.xml">
+<!ENTITY section.properties SYSTEM "../params/section.properties.xml">
+<!ENTITY section.level1.properties SYSTEM "../params/section.level1.properties.xml">
+<!ENTITY section.level2.properties SYSTEM "../params/section.level2.properties.xml">
+<!ENTITY section.level3.properties SYSTEM "../params/section.level3.properties.xml">
+<!ENTITY section.level4.properties SYSTEM "../params/section.level4.properties.xml">
+<!ENTITY section.level5.properties SYSTEM "../params/section.level5.properties.xml">
+<!ENTITY section.level6.properties SYSTEM "../params/section.level6.properties.xml">
+<!ENTITY subscript.properties SYSTEM "../params/subscript.properties.xml">
+<!ENTITY superscript.properties SYSTEM "../params/superscript.properties.xml">
+<!ENTITY table.table.properties SYSTEM "../params/table.table.properties.xml">

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/param.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/param.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/param.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,7564 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE book
+  PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<book>
+<bookinfo>
+<title>FO Parameter Reference</title>
+<releaseinfo role="meta">
+$Id: param.xml,v 1.1.1.1 2004/10/19 21:21:44 juntao Exp $
+</releaseinfo>
+<author>
+  <surname>Walsh</surname>
+  <firstname>Norman</firstname>
+</author>
+<copyright>
+  <year>1999</year>
+  <year>2000</year>
+  <year>2001</year>
+  <holder>Norman Walsh</holder>
+</copyright>
+</bookinfo>
+
+<preface><title>Introduction</title>
+
+<para>This is technical reference documentation for the DocBook XSL
+Stylesheets; it documents (some of) the parameters, templates, and
+other elements of the stylesheets.</para>
+
+<para>This reference describes each of the XSL FO Stylesheet parameters.
+These are the <quote>easily customizable</quote> parts of the stylesheet.
+If you want to specify an alternate value for one or more of these
+parameters, you can do so in a <quote>driver</quote> stylesheet.</para>
+
+<para>For example, if you want to change the <literal moreinfo="none">html.stylesheet</literal>
+to <filename moreinfo="none">reference.css</filename>, you might create a driver
+stylesheet like this:</para>
+
+<programlisting format="linespecific">&lt;xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                version='1.0'&gt;
+
+  &lt;xsl:import href="http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl"/&gt;
+
+  &lt;xsl:param name="html.stylesheet"&gt;reference.css&lt;/xsl:param&gt;
+
+&lt;/xsl:stylesheet&gt;</programlisting>
+
+<para>Naturally, you have to change the
+<sgmltag class="attribute">href</sgmltag> attribute on
+<literal moreinfo="none">&lt;xsl:import&gt;</literal> to point to
+<filename moreinfo="none">docbook.xsl</filename> on your system. (Or
+<filename moreinfo="none">chunk.xsl</filename>, if you're using chunking.)</para>
+
+<para>This is not intended to be <quote>user</quote> documentation.
+It is provided for developers writing customization layers for the
+stylesheets, and for anyone who's interested in <quote>how it
+works</quote>.</para>
+
+<para>Although I am trying to be thorough, this documentation is known
+to be incomplete. Don't forget to read the source, too :-)</para>
+</preface>
+
+<reference><title>Admonitions</title>
+<refentry id="admon.graphics">
+<refmeta>
+<refentrytitle>admon.graphics</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>admon.graphics</refname>
+<refpurpose>Use graphics in admonitions?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="admon.graphics.frag">
+&lt;xsl:param name="admon.graphics" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), admonitions are presented in an alternate style that uses
+a graphic.  Default graphics are provided in the distribution.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="admon.graphics.extension">
+<refmeta>
+<refentrytitle>admon.graphics.extension</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>admon.graphics.extension</refname>
+<refpurpose>Extension for admonition graphics</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="admon.graphics.extension.frag">&lt;xsl:param name="admon.graphics.extension" select="'.png'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Sets the extension to use on admonition graphics.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="admon.graphics.path">
+<refmeta>
+<refentrytitle>admon.graphics.path</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>admon.graphics.path</refname>
+<refpurpose>Path to admonition graphics</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="admon.graphics.path.frag">&lt;xsl:param name="admon.graphics.path"&gt;images/&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Sets the path, probably relative to the directory where the HTML
+files are created, to the admonition graphics.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="admon.textlabel">
+<refmeta>
+<refentrytitle>admon.textlabel</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>admon.textlabel</refname>
+<refpurpose>Use text label in admonitions?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="admon.textlabel.frag">
+&lt;xsl:param name="admon.textlabel" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), admonitions are presented with a generated
+text label such as Note or Warning in the appropriate language.
+If zero, such labels are turned off, but any title child
+of the admonition element are still output.
+The default value is 1.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="admonition.title.properties">
+<refnamediv>
+<refname>admonition.title.properties</refname>
+<refpurpose>To set the style for admonitions titles.</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="admonition.title.properties.frag">
+&lt;xsl:attribute-set name="admonition.title.properties"&gt;
+  &lt;xsl:attribute name="font-size"&gt;14pt&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="font-weight"&gt;bold&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="hyphenate"&gt;false&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="keep-with-next.within-column"&gt;always&lt;/xsl:attribute&gt;
+&lt;/xsl:attribute-set&gt;
+</programlisting>
+</refsynopsisdiv>
+<refsect1><title>Description</title>
+<para>How do you want admonitions titles styled? </para>
+<para>Set the font-size, weight etc to the style required.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="admonition.properties">
+<refnamediv>
+<refname>admonition.properties</refname>
+<refpurpose>To set the style for admonitions.</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="admonition.properties.frag">&lt;xsl:attribute-set name="admonition.properties"&gt;&lt;/xsl:attribute-set&gt;
+</programlisting>
+</refsynopsisdiv>
+<refsect1><title>Description</title>
+<para>How do you want admonitions styled? </para>
+<para>Set the font-size, weight, etc. to the style required</para>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+<reference><title>Callouts</title>
+<refentry id="callout.defaultcolumn">
+<refmeta>
+<refentrytitle>callout.defaultcolumn</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>callout.defaultcolumn</refname>
+<refpurpose>Indicates what column callouts appear in by default</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="callout.defaultcolumn.frag">&lt;xsl:param name="callout.defaultcolumn" select="'60'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If a callout does not identify a column (for example, if it uses
+the <literal moreinfo="none">linerange</literal> <sgmltag class="attribute">unit</sgmltag>),
+it will appear in the default column.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="callout.graphics">
+<refmeta>
+<refentrytitle>callout.graphics</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>callout.graphics</refname>
+<refpurpose>Use graphics for callouts?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="callout.graphics.frag">
+&lt;xsl:param name="callout.graphics" select="'1'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, callouts are presented with graphics (e.g., reverse-video
+circled numbers instead of "(1)", "(2)", etc.).
+Default graphics are provided in the distribution.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="callout.graphics.extension">
+<refmeta>
+<refentrytitle>callout.graphics.extension</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>callout.graphics.extension</refname>
+<refpurpose>Extension for callout graphics</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="callout.graphics.extension.frag">&lt;xsl:param name="callout.graphics.extension" select="'.png'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Sets the extension to use on callout graphics.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="callout.graphics.number.limit">
+<refmeta>
+<refentrytitle>callout.graphics.number.limit</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>callout.graphics.number.limit</refname>
+<refpurpose>Number of the largest callout graphic</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="callout.graphics.number.limit.frag">&lt;xsl:param name="callout.graphics.number.limit" select="'10'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If <parameter moreinfo="none">callout.graphics</parameter>
+is non-zero, graphics are used to represent
+callout numbers. The value of
+<parameter moreinfo="none">callout.graphics.number.limit</parameter>
+is
+the largest number for which a graphic exists. If the callout number
+exceeds this limit, the default presentation "(nnn)" will always
+be used.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="callout.graphics.path">
+<refmeta>
+<refentrytitle>callout.graphics.path</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>callout.graphics.path</refname>
+<refpurpose>Path to callout graphics</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="callout.graphics.path.frag">
+&lt;xsl:param name="callout.graphics.path" select="'images/callouts/'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Sets the path, probably relative to the directory where the HTML
+files are created, to the callout graphics.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="callout.unicode">
+<refmeta>
+<refentrytitle>callout.unicode</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>callout.unicode</refname>
+<refpurpose>Use Unicode characters rather than images for callouts.</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="callout.unicode.frag">&lt;xsl:param name="callout.unicode" select="0"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The stylesheets can use either an image of the numbers one to ten, or the single Unicode character which represents the numeral, in white on a black background. Use this to select the Unicode character option.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="callout.unicode.font">
+<refmeta>
+<refentrytitle>callout.unicode.font</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>callout.unicode.font</refname>
+<refpurpose>Specify a font for Unicode glyphs</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="callout.unicode.font.frag">&lt;xsl:param name="callout.unicode.font" select="'ZapfDingbats'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The name of the font to specify around Unicode callout glyphs.
+If set to the empty string, no font change will occur.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="callout.unicode.number.limit">
+<refmeta>
+<refentrytitle>callout.unicode.number.limit</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>callout.unicode.number.limit</refname>
+<refpurpose>Number of the largest callout graphic</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="callout.unicode.number.limit.frag">&lt;xsl:param name="callout.unicode.number.limit" select="'10'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If <parameter moreinfo="none">callout.unicode</parameter>
+is non-zero, unicode characters are used to represent
+callout numbers. The value of
+<parameter moreinfo="none">callout.unicode.number.limit</parameter>
+is
+the largest number for which a unicode character exists. If the callout number
+exceeds this limit, the default presentation "(nnn)" will always
+be used.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="callout.unicode.start.character">
+<refmeta>
+<refentrytitle>callout.unicode.start.character</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>callout.unicode.start.character</refname>
+<refpurpose>First Unicode character to use, decimal value.</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="callout.unicode.start.character.frag">&lt;xsl:param name="callout.unicode.start.character" select="10102"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If <parameter moreinfo="none">callout.graphics</parameter> is zero and <parameter moreinfo="none">callout.unicode</parameter>
+is non-zero, unicode characters are used to represent
+callout numbers. The value of
+<parameter moreinfo="none">callout.unicode.start.character</parameter>
+is the decimal unicode value used for callout number one. Currently, 
+only 10102 is supported in the stylesheets for this parameter. 
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="callouts.extension">
+<refmeta>
+<refentrytitle>callouts.extension</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>callouts.extension</refname>
+<refpurpose>Enable the callout extension</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="callouts.extension.frag">&lt;xsl:param name="callouts.extension" select="'1'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The callouts extension processes <sgmltag>areaset</sgmltag>
+elements in <sgmltag>ProgramListingCO</sgmltag> and other text-based
+callout elements.
+</para>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+<reference><title>ToC/LoT/Index Generation</title>
+<refentry id="autotoc.label.separator">
+<refmeta>
+<refentrytitle>autotoc.label.separator</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>autotoc.label.separator</refname>
+<refpurpose>Separator between labels and titles in the ToC</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="autotoc.label.separator.frag">&lt;xsl:param name="autotoc.label.separator" select="'. '"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>String to use to seperate labels and title in a table of contents.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="process.empty.source.toc">
+<refmeta>
+<refentrytitle>process.empty.source.toc</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>process.empty.source.toc</refname>
+<refpurpose>FIXME:</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="process.empty.source.toc.frag">&lt;xsl:param name="process.empty.source.toc" select="0"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="process.source.toc">
+<refmeta>
+<refentrytitle>process.source.toc</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>process.source.toc</refname>
+<refpurpose>FIXME:</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="process.source.toc.frag">&lt;xsl:param name="process.source.toc" select="0"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="generate.toc">
+<refmeta>
+<refentrytitle>generate.toc</refentrytitle>
+<refmiscinfo role="type">table</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>generate.toc</refname>
+<refpurpose>Control generation of ToCs and LoTs</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="generate.toc.frag">
+
+&lt;xsl:param name="generate.toc"&gt;
+/appendix toc,title
+article/appendix  nop
+/article  toc,title
+book      toc,title,figure,table,example,equation
+/chapter  toc,title
+part      toc,title
+/preface  toc,title
+qandadiv  toc
+qandaset  toc
+reference toc,title
+/sect1    toc
+/sect2    toc
+/sect3    toc
+/sect4    toc
+/sect5    toc
+/section  toc
+set       toc,title
+&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This parameter has a structured value. It is a table of space-delimited
+path/value pairs. Each path identifies some element in the source document
+using a restricted subset of XPath (only the implicit child axis, no wildcards,
+no predicates). Paths can be either relative or absolute.</para>
+
+<para>When processing a particular element, the stylesheets consult this table to
+determine if a ToC (or LoT(s)) should be generated.</para>
+
+<para>For example, consider the entry:</para>
+
+<screen format="linespecific">book toc,figure</screen>
+
+<para>This indicates that whenever a <sgmltag>book</sgmltag> is formatted, a
+Table Of Contents and a List of Figures should be generated. Similarly,</para>
+
+<screen format="linespecific">/chapter toc</screen>
+
+<para>indicates that whenever a document <emphasis>that has a root
+of</emphasis> <sgmltag>chapter</sgmltag> is formatted, a Table of
+Contents should be generated. The entry <literal moreinfo="none">chapter</literal> would match
+all chapters, but <literal moreinfo="none">/chapter</literal> matches only <sgmltag>chapter</sgmltag>
+document elements.</para>
+
+<para>Generally, the longest match wins. So, for example, if you want to distinguish
+articles in books from articles in parts, you could use these two entries:</para>
+
+<screen format="linespecific">book/article toc,figure
+part/article toc</screen>
+
+<para>Note that an article in a part can never match a <literal moreinfo="none">book/article</literal>,
+so if you want nothing to be generated for articles in parts, you can simply leave
+that rule out.</para>
+
+<para>If you want to leave the rule in, to make it explicit that you're turning
+something off, use the value <quote>nop</quote>. For example, the following
+entry disables ToCs and LoTs for articles:</para>
+
+<screen format="linespecific">article nop</screen>
+
+<para>Do not simply leave the word <quote>article</quote> in the file
+without a matching value. That'd be just begging the silly little
+path/value parser to get confused.</para>
+
+<para>Section ToCs are further controlled by the
+<parameter moreinfo="none">generate.section.toc.level</parameter> parameter.
+For a given section level to have a ToC, it must have both an entry in 
+<parameter moreinfo="none">generate.toc</parameter> and be within the range enabled by
+<parameter moreinfo="none">generate.section.toc.level</parameter>.</para>
+</refsect1>
+</refentry>
+
+<refentry id="generate.index">
+<refmeta>
+<refentrytitle>generate.index</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>generate.index</refname>
+<refpurpose>Do you want an index?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="generate.index.frag">&lt;xsl:param name="generate.index" select="1"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Specify if an index should be generated. </para>
+
+</refsect1>
+</refentry>
+
+<refentry id="make.index.markup">
+<refmeta>
+<refentrytitle>make.index.markup</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>make.index.markup</refname>
+<refpurpose>Generate XML index markup in the index?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="make.index.markup.frag">
+&lt;xsl:param name="make.index.markup" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This parameter enables a very neat trick for getting properly
+merged, collated back-of-the-book indexes. G. Ken Holman suggested
+this trick at Extreme Markup Languages 2002 and I'm indebted to him
+for it.</para>
+
+<para>Jeni Tennison's excellent code in
+<filename moreinfo="none">autoidx.xsl</filename> does a great job of merging and
+sorting <sgmltag>indexterm</sgmltag>s in the document and building a
+back-of-the-book index. However, there's one thing that it cannot
+reasonably be expected to do: merge page numbers into ranges. (I would
+not have thought that it could collate and suppress duplicate page
+numbers, but in fact it appears to manage that task somehow.)</para>
+
+<para>Ken's trick is to produce a document in which the index at the
+back of the book is <quote>displayed</quote> in XML. Because the index
+is generated by the FO processor, all of the page numbers have been resolved.
+It's a bit hard to explain, but what it boils down to is that instead of having
+an index at the back of the book that looks like this:</para>
+
+<blockquote>
+<formalpara><title>A</title>
+<para>ap1, 1, 2, 3</para>
+</formalpara>
+</blockquote>
+
+<para>you get one that looks like this:</para>
+
+<blockquote>
+<programlisting format="linespecific">&lt;indexdiv&gt;A&lt;/indexdiv&gt;
+&lt;indexentry&gt;
+&lt;primaryie&gt;ap1&lt;/primaryie&gt;,
+&lt;phrase role="pageno"&gt;1&lt;/phrase&gt;,
+&lt;phrase role="pageno"&gt;2&lt;/phrase&gt;,
+&lt;phrase role="pageno"&gt;3&lt;/phrase&gt;
+&lt;/indexentry&gt;</programlisting>
+</blockquote>
+
+<para>After building a PDF file with this sort of odd-looking index, you can
+extract the text from the PDF file and the result is a proper index expressed in
+XML.</para>
+
+<para>Now you have data that's amenable to processing and a simple Perl script
+(such as <filename moreinfo="none">fo/pdf2index</filename>) can
+merge page ranges and generate a proper index.</para>
+
+<para>Finally, reformat your original document using this literal index instead of
+an automatically generated one and <quote>bingo</quote>!</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="index.preferred.page.properties">
+<refnamediv>
+<refname>index.preferred.page.properties</refname>
+<refpurpose>Properties used to emphasize page number references for
+significant index terms</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="index.preferred.page.properties.frag">
+&lt;xsl:attribute-set name="index.preferred.page.properties"&gt;
+  &lt;xsl:attribute name="font-weight"&gt;bold&lt;/xsl:attribute&gt;
+&lt;/xsl:attribute-set&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Properties used to emphasize page number references for
+significant index terms (<sgmltag class="attribute">significance</sgmltag>=<sgmltag class="attvalue">preffered</sgmltag>). Currently works only with
+XEP.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="xep.index.item.properties">
+<refnamediv>
+<refname>xep.index.item.properties</refname>
+<refpurpose>Properties associated with XEP index-items</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="xep.index.item.properties.frag">
+&lt;xsl:attribute-set name="xep.index.item.properties"&gt;
+  &lt;xsl:attribute name="merge-subsequent-page-numbers"&gt;true&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="link-back"&gt;true&lt;/xsl:attribute&gt;
+&lt;/xsl:attribute-set&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Properties associated with XEP index-items. For more info see
+the section "Indexes" in
+<ulink url="http://xep.xattic.com/xep/doc/spec.html"/>.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="toc.section.depth">
+<refmeta>
+<refentrytitle>toc.section.depth</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>toc.section.depth</refname>
+<refpurpose>How deep should recursive <sgmltag>section</sgmltag>s appear
+in the TOC?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="toc.section.depth.frag">&lt;xsl:param name="toc.section.depth"&gt;2&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Specifies the depth to which recursive sections should appear in the
+TOC.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="toc.indent.width">
+<refmeta>
+<refentrytitle>toc.indent.width</refentrytitle>
+<refmiscinfo role="type">float</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>toc.indent.width</refname>
+<refpurpose>Amount of indentation for TOC entries</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="toc.indent.width.frag">
+&lt;xsl:param name="toc.indent.width" select="24"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Specifies, in points, the distance by which each level of the
+TOC is indented from its parent.</para>
+
+<para>This value is expressed in points, without
+a unit (in other words, it is a bare number). Using a bare number allows the stylesheet
+to perform calculations that would otherwise have to be performed by the FO processor
+because not all processors support expressions.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="toc.margin.properties">
+<refnamediv>
+<refname>toc.margin.properties</refname>
+<refpurpose>Margin properties used on Tables of Contents</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="toc.margin.properties.frag">
+&lt;xsl:attribute-set name="toc.margin.properties"&gt;
+  &lt;xsl:attribute name="space-before.minimum"&gt;0.5em&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="space-before.optimum"&gt;1em&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="space-before.maximum"&gt;2em&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="space-after.minimum"&gt;0.5em&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="space-after.optimum"&gt;1em&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="space-after.maximum"&gt;2em&lt;/xsl:attribute&gt;
+&lt;/xsl:attribute-set&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+<para>This attribute set is used on Tables of Contents. These attributes are set
+on the wrapper that surrounds the ToC block, not on each individual lines.</para>
+</refsect1>
+</refentry>
+
+<refentry id="bridgehead.in.toc">
+<refmeta>
+<refentrytitle>bridgehead.in.toc</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>bridgehead.in.toc</refname>
+<refpurpose>Should bridgehead elements appear in the TOC?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="bridgehead.in.toc.frag">&lt;xsl:param name="bridgehead.in.toc" select="0"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, bridgeheads appear in the TOC. Note that this option
+is not fully supported and may be removed in a future version of the
+stylesheets.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="generate.section.toc.level">
+<refmeta>
+<refentrytitle>generate.section.toc.level</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>generate.section.toc.level</refname>
+<refpurpose>Control depth of TOC generation in sections</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="generate.section.toc.level.frag">
+&lt;xsl:param name="generate.section.toc.level" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The <parameter moreinfo="none">generate.section.toc.level</parameter> parameter
+controls the depth of section in which TOCs will be generated. Note
+that this is related to, but not the same as
+<parameter moreinfo="none">toc.section.depth</parameter>, which controls the depth to
+which TOC entries will be generated in a given TOC.</para>
+<para>If, for example, <parameter moreinfo="none">generate.section.toc.level</parameter>
+is <literal moreinfo="none">3</literal>, TOCs will be generated in first, second, and third
+level sections, but not in fourth level sections.
+</para>
+
+</refsect1>
+</refentry>
+
+
+
+
+</reference>
+
+<reference><title>Processor Extensions</title>
+<refentry id="arbortext.extensions">
+<refmeta>
+<refentrytitle>arbortext.extensions</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>arbortext.extensions</refname>
+<refpurpose>Enable Arbortext extensions?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="arbortext.extensions.frag">&lt;xsl:param name="arbortext.extensions" select="0"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero,
+<ulink url="http://www.arbortext.com/">Arbortext</ulink>
+extensions will be used.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="axf.extensions">
+<refmeta>
+<refentrytitle>axf.extensions</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>axf.extensions</refname>
+<refpurpose>Enable XSL Formatter extensions?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="axf.extensions.frag">
+&lt;xsl:param name="axf.extensions" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero,
+<ulink url="http://www.antennahouse.com/">XSL Formatter</ulink>
+extensions will be used. XSL Formatter extensions consists of PDF bookmarks,
+document information and better index processing.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="fop.extensions">
+<refmeta>
+<refentrytitle>fop.extensions</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>fop.extensions</refname>
+<refpurpose>Enable FOP extensions?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="fop.extensions.frag">&lt;xsl:param name="fop.extensions" select="0"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero,
+<ulink url="http://xml.apache.org/fop/">FOP</ulink>
+extensions will be used. At present, this consists of PDF bookmarks.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="passivetex.extensions">
+<refmeta>
+<refentrytitle>passivetex.extensions</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>passivetex.extensions</refname>
+<refpurpose>Enable PassiveTeX extensions?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="passivetex.extensions.frag">&lt;xsl:param name="passivetex.extensions" select="0"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero,
+<ulink url="http://users.ox.ac.uk/~rahtz/passivetex/">PassiveTeX</ulink>
+extensions will be used. At present, this consists of PDF bookmarks
+and sorted index terms.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="tex.math.in.alt">
+<refmeta>
+<refentrytitle>tex.math.in.alt</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>tex.math.in.alt</refname>
+<refpurpose>TeX notation used for equations</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="tex.math.in.alt.frag">
+&lt;xsl:param name="tex.math.in.alt" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want type math directly in TeX notation in equations,
+this parameter specifies notation used. Currently are supported two
+values -- <literal moreinfo="none">plain</literal> and <literal moreinfo="none">latex</literal>. Empty
+value means that you are not using TeX math at all.</para>
+
+<para>Preferred way for including TeX alternative of math is inside of
+<sgmltag>textobject</sgmltag> element. Eg.:</para>
+
+<programlisting format="linespecific">&lt;inlineequation&gt;
+&lt;inlinemediaobject&gt;
+&lt;imageobject&gt;
+&lt;imagedata fileref="eq1.gif"/&gt;
+&lt;/imageobject&gt;
+&lt;textobject&gt;&lt;phrase&gt;E=mc squared&lt;/phrase&gt;&lt;/textobject&gt;
+&lt;textobject role="tex"&gt;&lt;phrase&gt;E=mc^2&lt;/phrase&gt;&lt;/textobject&gt;
+&lt;/inlinemediaobject&gt;
+&lt;/inlineequation&gt;</programlisting>
+
+<para>If you are using <sgmltag>graphic</sgmltag> element, you can
+store TeX inside <sgmltag>alt</sgmltag> element:</para>
+
+<programlisting format="linespecific">&lt;inlineequation&gt;
+&lt;alt role="tex"&gt;a^2+b^2=c^2&lt;/alt&gt;
+&lt;graphic fileref="a2b2c2.gif"/&gt;  
+&lt;/inlineequation&gt;</programlisting>
+
+<para>If you want use this feature, you should process your FO with
+PassiveTeX, which only supports TeX math notation. When calling
+stylsheet, don't forget to specify also
+passivetex.extensions=1.</para>
+
+<para>If you want equations in HTML, just process generated file
+<filename moreinfo="none">tex-math-equations.tex</filename> by TeX or LaTeX. Then run
+dvi2bitmap program on result DVI file. You will get images for
+equations in your document.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="tex.math.delims">
+<refmeta>
+<refentrytitle>tex.math.delims</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>tex.math.delims</refname>
+<refpurpose>Should be equations outputed for processing by TeX
+automatically surrounded by math mode delimiters</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="tex.math.delims.frag">
+&lt;xsl:param name="tex.math.delims" select="'1'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>For compatibility with DSSSL based DBTeXMath from Allin Cottrell
+you should set this parameter to 0.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="xep.extensions">
+<refmeta>
+<refentrytitle>xep.extensions</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>xep.extensions</refname>
+<refpurpose>Enable XEP extensions?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="xep.extensions.frag">&lt;xsl:param name="xep.extensions" select="0"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero,
+<ulink url="http://www.renderx.com/">XEP</ulink>
+extensions will be used. XEP extensions consists of PDF bookmarks,
+document information and better index processing.
+</para>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+<reference><title>Stylesheet Extensions</title>
+<refentry id="linenumbering.everyNth">
+<refmeta>
+<refentrytitle>linenumbering.everyNth</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>linenumbering.everyNth</refname>
+<refpurpose>Indicate which lines should be numbered</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="linenumbering.everyNth.frag">&lt;xsl:param name="linenumbering.everyNth" select="'5'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If line numbering is enabled, everyNth line will be numbered.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="linenumbering.extension">
+<refmeta>
+<refentrytitle>linenumbering.extension</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>linenumbering.extension</refname>
+<refpurpose>Enable the line numbering extension</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="linenumbering.extension.frag">&lt;xsl:param name="linenumbering.extension" select="'1'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true, verbatim environments (elements that have the
+format='linespecific' notation attribute: address, literallayout,
+programlisting, screen, synopsis) that specify line numbering will
+have, surprise, line numbers.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="linenumbering.separator">
+<refmeta>
+<refentrytitle>linenumbering.separator</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>linenumbering.separator</refname>
+<refpurpose>Specify a separator between line numbers and lines</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="linenumbering.separator.frag">&lt;xsl:param name="linenumbering.separator" select="' '"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The separator is inserted between line numbers and lines in
+the verbatim environment.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="linenumbering.width">
+<refmeta>
+<refentrytitle>linenumbering.width</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>linenumbering.width</refname>
+<refpurpose>Indicates the width of line numbers</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="linenumbering.width.frag">&lt;xsl:param name="linenumbering.width" select="'3'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If line numbering is enabled, line numbers will appear right
+justified in a field "width" characters wide.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="tablecolumns.extension">
+<refmeta>
+<refentrytitle>tablecolumns.extension</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>tablecolumns.extension</refname>
+<refpurpose>Enable the table columns extension function</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="tablecolumns.extension.frag">&lt;xsl:param name="tablecolumns.extension" select="'1'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The table columns extension function adjusts the widths of table
+columns in the HTML result to more accurately reflect the specifications
+in the CALS table.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="textinsert.extension">
+<refmeta>
+<refentrytitle>textinsert.extension</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>textinsert.extension</refname>
+<refpurpose>Enable the textinsert extension element</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="textinsert.extension.frag">&lt;xsl:param name="textinsert.extension" select="'1'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The textinsert extension element inserts the contents of a
+a file into the result tree (as text).
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="use.extensions">
+<refmeta>
+<refentrytitle>use.extensions</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>use.extensions</refname>
+<refpurpose>Enable extensions</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="use.extensions.frag">&lt;xsl:param name="use.extensions" select="'0'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, extensions may be used. Each extension is
+further controlled by its own parameter. But if
+<parameter moreinfo="none">use.extensions</parameter> is zero, no extensions will
+be used.
+</para>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+<reference><title>Automatic labelling</title>
+<refentry id="appendix.autolabel">
+<refmeta>
+<refentrytitle>appendix.autolabel</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>appendix.autolabel</refname>
+<refpurpose>Are Appendixes automatically enumerated?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="appendix.autolabel.frag">&lt;xsl:param name="appendix.autolabel" select="1"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), unlabeled appendixes will be
+enumerated.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="chapter.autolabel">
+<refmeta>
+<refentrytitle>chapter.autolabel</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>chapter.autolabel</refname>
+<refpurpose>Are chapters automatically enumerated?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="chapter.autolabel.frag">&lt;xsl:param name="chapter.autolabel" select="1"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), unlabeled chapters will be enumerated.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="part.autolabel">
+<refmeta>
+<refentrytitle>part.autolabel</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>part.autolabel</refname>
+<refpurpose>Are parts and references enumerated?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="part.autolabel.frag">&lt;xsl:param name="part.autolabel" select="1"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), unlabeled parts and references will be enumerated.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="preface.autolabel">
+<refmeta>
+<refentrytitle>preface.autolabel</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>preface.autolabel</refname>
+<refpurpose>Are prefaces enumerated?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="preface.autolabel.frag">&lt;xsl:param name="preface.autolabel" select="0"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), unlabeled prefaces will be enumerated.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="section.autolabel">
+<refmeta>
+<refentrytitle>section.autolabel</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>section.autolabel</refname>
+<refpurpose>Are sections enumerated?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="section.autolabel.frag">&lt;xsl:param name="section.autolabel" select="0"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), unlabeled sections will be enumerated.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="section.label.includes.component.label">
+<refmeta>
+<refentrytitle>section.label.includes.component.label</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>section.label.includes.component.label</refname>
+<refpurpose>Do section labels include the component label?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="section.label.includes.component.label.frag">&lt;xsl:param name="section.label.includes.component.label" select="0"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), section labels are prefixed with the label of the
+component that contains them.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="label.from.part">
+<refmeta>
+<refentrytitle>label.from.part</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>label.from.part</refname>
+<refpurpose>Renumber chapters in each part?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="label.from.part.frag">&lt;xsl:param name="label.from.part" select="'0'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If <parameter moreinfo="none">label.from.part</parameter> is non-zero, components
+(<sgmltag>chapter</sgmltag>s, <sgmltag>appendixe</sgmltag>s, etc.)
+will be numbered from 1 in each <sgmltag>part</sgmltag>. Otherwise,
+they will be numbered monotonically throughout each
+<sgmltag>book</sgmltag>.
+</para>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+<reference><title>XSLT Processing</title>
+<refentry id="rootid">
+<refmeta>
+<refentrytitle>rootid</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>rootid</refname>
+<refpurpose>Specify the root element to format</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="rootid.frag">&lt;xsl:param name="rootid" select="''"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If <parameter moreinfo="none">rootid</parameter> is specified, it must be the
+value of an ID that occurs in the document being formatted. The entire
+document will be loaded and parsed, but formatting will begin at the
+element identified, rather than at the root. For example, this allows
+you to process only chapter 4 of a book.</para>
+<para>Because the entire document is available to the processor, automatic
+numbering, cross references, and other dependencies are correctly
+resolved.</para>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+<reference><title>Meta/*Info</title>
+<refentry id="make.single.year.ranges">
+<refmeta>
+<refentrytitle>make.single.year.ranges</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>make.single.year.ranges</refname>
+<refpurpose>Print single-year ranges (e.g., 1998-1999)</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="make.single.year.ranges.frag">&lt;xsl:param name="make.single.year.ranges" select="0"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, year ranges that span a single year will be printed
+in range notation (1998-1999) instead of discrete notation
+(1998, 1999).</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="make.year.ranges">
+<refmeta>
+<refentrytitle>make.year.ranges</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>make.year.ranges</refname>
+<refpurpose>Collate copyright years into ranges?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="make.year.ranges.frag">&lt;xsl:param name="make.year.ranges" select="0"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, copyright years will be collated into ranges.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="author.othername.in.middle">
+<refmeta>
+<refentrytitle>author.othername.in.middle</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>author.othername.in.middle</refname>
+<refpurpose>Is <sgmltag>othername</sgmltag> in <sgmltag>author</sgmltag> a
+middle name?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="author.othername.in.middle.frag">&lt;xsl:param name="author.othername.in.middle" select="1"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), the <sgmltag>othername</sgmltag> of an <sgmltag>author</sgmltag>
+appears between the <sgmltag>firstname</sgmltag> and
+<sgmltag>surname</sgmltag>.  Otherwise, <sgmltag>othername</sgmltag>
+is suppressed.
+</para>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+<reference><title>Reference Pages</title>
+<refentry id="funcsynopsis.decoration">
+<refmeta>
+<refentrytitle>funcsynopsis.decoration</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>funcsynopsis.decoration</refname>
+<refpurpose>Decorate elements of a FuncSynopsis?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="funcsynopsis.decoration.frag">&lt;xsl:param name="funcsynopsis.decoration" select="1"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), elements of the FuncSynopsis will be decorated (e.g. bold or
+italic).  The decoration is controlled by functions that can be redefined
+in a customization layer.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="funcsynopsis.style">
+<refmeta>
+<refentrytitle>funcsynopsis.style</refentrytitle>
+<refmiscinfo role="type">list</refmiscinfo>
+<refmiscinfo role="value">ansi</refmiscinfo>
+<refmiscinfo role="value">kr</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>funcsynopsis.style</refname>
+<refpurpose>What style of 'FuncSynopsis' should be generated?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="funcsynopsis.style.frag">&lt;xsl:param name="funcsynopsis.style"&gt;kr&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If <varname>funcsynopsis.style</varname> is <literal moreinfo="none">ansi</literal>,
+ANSI-style function synopses are generated for a
+<sgmltag>funcsynopsis</sgmltag>, otherwise K&amp;R-style
+function synopses are generated.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="function.parens">
+<refmeta>
+<refentrytitle>function.parens</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>function.parens</refname>
+<refpurpose>Generate parens after a function?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="function.parens.frag">&lt;xsl:param name="function.parens"&gt;0&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If not 0, the formatting of
+a <sgmltag class="starttag">function</sgmltag> element will include
+generated parenthesis.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="refentry.generate.name">
+<refmeta>
+<refentrytitle>refentry.generate.name</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>refentry.generate.name</refname>
+<refpurpose>Output NAME header before 'RefName'(s)?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="refentry.generate.name.frag">&lt;xsl:param name="refentry.generate.name" select="1"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), a "NAME" section title is output before the list
+of 'RefName's. This parameter and
+<parameter moreinfo="none">refentry.generate.title</parameter> are mutually
+exclusive. This means that if you change this parameter to zero, you
+should set <parameter moreinfo="none">refentry.generate.title</parameter> to 1 unless
+you want get quite strange output.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="refentry.generate.title">
+<refmeta>
+<refentrytitle>refentry.generate.title</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>refentry.generate.title</refname>
+<refpurpose>Output title before 'RefName'(s)?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="refentry.generate.title.frag">
+&lt;xsl:param name="refentry.generate.title" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), the reference page title or first name is
+output before the list of 'RefName's. This parameter and
+<parameter moreinfo="none">refentry.generate.name</parameter> are mutually exclusive.
+This means that if you change this parameter to 1, you
+should set <parameter moreinfo="none">refentry.generate.name</parameter> to 0 unless
+you want get quite strange output.</para>
+
+
+</refsect1>
+</refentry>
+
+<refentry id="refentry.pagebreak">
+<refmeta>
+<refentrytitle>refentry.pagebreak</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>refentry.pagebreak</refname>
+<refpurpose>Start each refentry on a new page</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="refentry.pagebreak.frag">&lt;xsl:param name="refentry.pagebreak" select="1"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero (the default), each <sgmltag>refentry</sgmltag>
+element will start on a new page.  If zero, a page
+break will not be generated.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="refentry.title.properties">
+<refmeta>
+<refentrytitle>refentry.title.properties</refentrytitle>
+<refmiscinfo role="type">attribute set</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>refentry.title.properties</refname>
+<refpurpose>Title properties for a refentry title</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="refentry.title.properties.frag">
+&lt;xsl:attribute-set name="refentry.title.properties"&gt;
+  &lt;xsl:attribute name="font-family"&gt;
+    &lt;xsl:value-of select="$title.font.family"&gt;&lt;/xsl:value-of&gt;
+  &lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="font-size"&gt;18pt&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="font-weight"&gt;bold&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="space-after"&gt;1em&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="hyphenate"&gt;false&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="keep-with-next.within-column"&gt;always&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="space-before.minimum"&gt;0.8em&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="space-before.optimum"&gt;1.0em&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="space-before.maximum"&gt;1.2em&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="space-after.optimum"&gt;0.5em&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="space-after.minimum"&gt;0.4em&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="space-after.maximum"&gt;0.6em&lt;/xsl:attribute&gt;
+&lt;/xsl:attribute-set&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Formatting properties applied to refentry titles,
+including refnamediv, refsect1 through 3, and refsection.
+The font size is supplied by the appropriate 
+<parameter moreinfo="none">section.level<replaceable>X</replaceable>.title.properties</parameter>
+attribute-set,
+computed from its location in the section hierarchy.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="refentry.xref.manvolnum">
+<refmeta>
+<refentrytitle>refentry.xref.manvolnum</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>refentry.xref.manvolnum</refname>
+<refpurpose>Output <sgmltag>manvolnum</sgmltag> as part of 
+<sgmltag>refentry</sgmltag> cross-reference?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="refentry.xref.manvolnum.frag">&lt;xsl:param name="refentry.xref.manvolnum" select="1"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>if true (non-zero), the <sgmltag>manvolnum</sgmltag> is used when cross-referencing
+<sgmltag>refentry</sgmltag>s, either with <sgmltag>xref</sgmltag>
+or <sgmltag>citerefentry</sgmltag>.
+</para>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+<reference><title>Tables</title>
+<refentry id="default.table.width">
+<refmeta>
+<refentrytitle>default.table.width</refentrytitle>
+<refmiscinfo role="type">length</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>default.table.width</refname>
+<refpurpose>The default width of tables</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="default.table.width.frag">&lt;xsl:param name="default.table.width" select="''"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If specified, this value will be used for the WIDTH attribute on
+tables that do not specify an alternate width (with the dbhtml processing
+instruction).</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="nominal.table.width">
+<refmeta>
+<refentrytitle>nominal.table.width</refentrytitle>
+<refmiscinfo role="type">length</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>nominal.table.width</refname>
+<refpurpose>The (absolute) nominal width of tables</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="nominal.table.width.frag">&lt;xsl:param name="nominal.table.width" select="'6in'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>In order to convert CALS column widths into HTML column widths, it
+is sometimes necessary to have an absolute table width to use for conversion
+of mixed absolute and relative widths. This value must be an absolute
+length (not a percentag).</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="table.cell.padding">
+<refmeta>
+<refentrytitle>table.cell.padding</refentrytitle>
+<refmiscinfo role="type"/>
+</refmeta>
+<refnamediv>
+<refname>table.cell.padding</refname>
+<refpurpose/>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="table.cell.padding.frag">
+&lt;xsl:attribute-set name="table.cell.padding"&gt;
+  &lt;xsl:attribute name="padding-left"&gt;2pt&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="padding-right"&gt;2pt&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="padding-top"&gt;2pt&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="padding-bottom"&gt;2pt&lt;/xsl:attribute&gt;
+&lt;/xsl:attribute-set&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="table.frame.border.thickness">
+<refmeta>
+<refentrytitle>table.frame.border.thickness</refentrytitle>
+<refmiscinfo role="type"/>
+</refmeta>
+<refnamediv>
+<refname>table.frame.border.thickness</refname>
+<refpurpose>Specifies the thickness of the frame border</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="table.frame.border.thickness.frag">
+&lt;xsl:param name="table.frame.border.thickness" select="'0.5pt'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Specifies the thickness of the border on the table's frame.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="table.frame.border.style">
+<refmeta>
+<refentrytitle>table.frame.border.style</refentrytitle>
+<refmiscinfo role="type"/>
+</refmeta>
+<refnamediv>
+<refname>table.frame.border.style</refname>
+<refpurpose/>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="table.frame.border.style.frag">
+&lt;xsl:param name="table.frame.border.style" select="'solid'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="table.frame.border.color">
+<refmeta>
+<refentrytitle>table.frame.border.color</refentrytitle>
+<refmiscinfo role="type"/>
+</refmeta>
+<refnamediv>
+<refname>table.frame.border.color</refname>
+<refpurpose/>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="table.frame.border.color.frag">
+
+&lt;xsl:param name="table.frame.border.color" select="'black'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="table.cell.border.thickness">
+<refmeta>
+<refentrytitle>table.cell.border.thickness</refentrytitle>
+<refmiscinfo role="type"/>
+</refmeta>
+<refnamediv>
+<refname>table.cell.border.thickness</refname>
+<refpurpose/>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="table.cell.border.thickness.frag">
+&lt;xsl:param name="table.cell.border.thickness" select="'0.5pt'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="table.cell.border.style">
+<refmeta>
+<refentrytitle>table.cell.border.style</refentrytitle>
+<refmiscinfo role="type"/>
+</refmeta>
+<refnamediv>
+<refname>table.cell.border.style</refname>
+<refpurpose/>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="table.cell.border.style.frag">
+&lt;xsl:param name="table.cell.border.style" select="'solid'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="table.cell.border.color">
+<refmeta>
+<refentrytitle>table.cell.border.color</refentrytitle>
+<refmiscinfo role="type"/>
+</refmeta>
+<refnamediv>
+<refname>table.cell.border.color</refname>
+<refpurpose/>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="table.cell.border.color.frag">
+
+&lt;xsl:param name="table.cell.border.color" select="'black'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="table.table.properties">
+<refnamediv>
+<refname>table.table.properties</refname>
+<refpurpose>Properties associated with a table</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="table.table.properties.frag">
+&lt;xsl:attribute-set name="table.table.properties"&gt;
+  &lt;xsl:attribute name="border-before-width.conditionality"&gt;retain&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="border-collapse"&gt;collapse&lt;/xsl:attribute&gt;
+&lt;/xsl:attribute-set&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The styling for tables. This parameter should really
+have been called <literal moreinfo="none">table.properties</literal>, but that parameter
+name was inadvertantly established for the block-level properties
+of the table as a whole.
+</para>
+
+<para>See also <parameter moreinfo="none">table.properties</parameter>.</para>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+<reference><title>Linking</title>
+<refentry id="target.database.document"> 
+<refmeta> 
+<refentrytitle>target.database.document</refentrytitle> 
+<refmiscinfo role="type">uri</refmiscinfo> 
+</refmeta> 
+<refnamediv> 
+<refname>target.database.document</refname> 
+<refpurpose>Name of master database file for resolving
+olinks</refpurpose> 
+</refnamediv> 
+<refsynopsisdiv> <programlisting id="target.database.document.frag">
+&lt;xsl:param name="target.database.document" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting> 
+</refsynopsisdiv> 
+<refsect1>
+<title>Description</title> 
+<para>
+To resolve olinks between documents, the stylesheets use
+a master database document that identifies the  target datafiles for all the documents within the scope
+of the olinks. This parameter value is the URI of 
+the master document to be read during processing to resolve olinks.
+The default value is <filename moreinfo="none">olinkdb.xml</filename>.</para>
+<para>The data structure of the file is defined in the <filename moreinfo="none">targetdatabase.dtd</filename> DTD.  The database file provides the high level elements to record the identifiers, locations, and relationships of documents. The cross reference data for individual documents is generally pulled into the database using system entity references or XIncludes. See also <parameter moreinfo="none">targets.filename</parameter>.
+
+</para> 
+</refsect1> 
+</refentry> 
+
+<refentry id="use.local.olink.style"> 
+<refmeta> 
+<refentrytitle>use.local.olink.style</refentrytitle> 
+<refmiscinfo role="type">boolean</refmiscinfo> 
+</refmeta> 
+<refnamediv> 
+<refname>use.local.olink.style</refname> 
+<refpurpose>Process olinks using xref style of current
+document</refpurpose> 
+</refnamediv> 
+<refsynopsisdiv> <programlisting id="use.local.olink.style.frag">
+&lt;xsl:param name="use.local.olink.style" select="0"&gt;&lt;/xsl:param&gt; </programlisting> 
+</refsynopsisdiv> 
+<refsect1> 
+<title>Description</title> 
+<para>When cross reference data is collected for use by olinks, the data for each potential target includes one field containing a completely assembled cross reference string, as if it were an xref generated in that document. Other fields record the separate title, number, and element name of each target. When an olink is formed to a target from another document, the olink resolves to that preassembled string by default. If the <parameter moreinfo="none">use.local.olink.style</parameter> parameter is set to non-zero, then instead the cross
+reference string is formed again from the target title, number, and
+element name, using the stylesheet processing the targeting document.
+Then olinks will match the xref style in the targeting document
+rather than in the target document. If  both documents are processed
+with the same stylesheet, then the results will be the same.</para> 
+</refsect1> 
+</refentry> 
+
+<refentry id="current.docid"> 
+<refmeta> 
+<refentrytitle>current.docid</refentrytitle> 
+<refmiscinfo role="type">string</refmiscinfo> 
+</refmeta> 
+<refnamediv> 
+<refname>current.docid</refname> 
+<refpurpose>targetdoc identifier for the document being
+processed</refpurpose> 
+</refnamediv> 
+<refsynopsisdiv> <programlisting id="current.docid.frag">
+&lt;xsl:param name="current.docid" select="''"&gt;&lt;/xsl:param&gt; </programlisting> 
+</refsynopsisdiv> 
+<refsect1> 
+<title>Description</title> 
+<para>When olinks between documents are resolved for HTML output, the stylesheet can compute the relative path between the current document and the target document. The stylesheet needs to know the <literal moreinfo="none">targetdoc</literal> identifiers for both documents, as they appear in the <parameter moreinfo="none">target.database.document</parameter> database file. This parameter passes to the stylesheet
+the targetdoc identifier of the current document, since that
+identifier does not appear in the document itself. </para>
+<para>This parameter can also be used for print output. If an olink's  <literal moreinfo="none">targetdoc</literal>  id differs from the <literal moreinfo="none">current.docid</literal>, then the stylesheet can append the target document's title to the generated olink text. That identifies to the reader that the link is to a different document, not the current document. See also <parameter moreinfo="none">olink.doctitle</parameter> to enable that feature.</para> 
+</refsect1> 
+</refentry> 
+
+<refentry id="olink.doctitle"> 
+<refmeta> 
+<refentrytitle>olink.doctitle</refentrytitle> 
+<refmiscinfo role="type">boolean</refmiscinfo> 
+</refmeta> 
+<refnamediv> 
+<refname>olink.doctitle</refname> 
+<refpurpose>show the document title for external olinks?</refpurpose>
+
+</refnamediv> 
+<refsynopsisdiv> <programlisting id="olink.doctitle.frag">
+&lt;xsl:param name="olink.doctitle" select="0"&gt;&lt;/xsl:param&gt; </programlisting> 
+</refsynopsisdiv> 
+<refsect1> 
+<title>Description</title> 
+<para>When olinks between documents are resolved for print output, the generated text may not make it clear that the reference is to another document. It is possible for the stylesheets to append the other document's title to external olinks. For this to happen, two parameters must be set. The <parameter moreinfo="none">olink.doctitle</parameter> parameter should be set to nonzero to enable this
+feature. And you should set the <parameter moreinfo="none">current.docid</parameter> parameter to the document id for the  document currently
+being processed for output.  If an olink's  <literal moreinfo="none">targetdoc</literal>  id differs from the <literal moreinfo="none">current.docid</literal>, then the stylesheet can append the target document's
+title to the generated olink text. </para> 
+</refsect1> 
+</refentry> 
+
+</reference>
+
+<reference><title>QAndASet</title>
+<refentry id="qandadiv.autolabel">
+<refmeta>
+<refentrytitle>qandadiv.autolabel</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>qandadiv.autolabel</refname>
+<refpurpose>Are divisions in QAndASets enumerated?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="qandadiv.autolabel.frag">&lt;xsl:param name="qandadiv.autolabel" select="1"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), unlabeled qandadivs will be enumerated.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="qanda.inherit.numeration">
+<refmeta>
+<refentrytitle>qanda.inherit.numeration</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>qanda.inherit.numeration</refname>
+<refpurpose>Does enumeration of QandASet components inherit the numeration of parent elements?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="qanda.inherit.numeration.frag">&lt;xsl:param name="qanda.inherit.numeration" select="1"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), numbered QandADiv elements and Questions and Answers inherit
+the numeration of the ancestors of the QandASet.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="qanda.defaultlabel">
+<refmeta>
+<refentrytitle>qanda.defaultlabel</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>qanda.defaultlabel</refname>
+<refpurpose>Sets the default for defaultlabel on QandASet.</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="qanda.defaultlabel.frag">&lt;xsl:param name="qanda.defaultlabel"&gt;number&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If no defaultlabel attribute is specified on a QandASet, this
+value is used. It must be one of the legal values for the defaultlabel
+attribute.
+</para>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+<reference><title>Bibliography</title>
+<refentry id="biblioentry.item.separator">
+<refmeta>
+<refentrytitle>biblioentry.item.separator</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>biblioentry.item.separator</refname>
+<refpurpose>Text to separate bibliography entries</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="biblioentry.item.separator.frag">&lt;xsl:param name="biblioentry.item.separator"&gt;. &lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Text to separate bibliography entries
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="bibliography.collection">
+<refmeta>
+<refentrytitle>bibliography.collection</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>bibliography.collection</refname>
+<refpurpose>Name of the bibliography collection file</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="bibliography.collection.frag">&lt;xsl:param name="bibliography.collection" select="'http://docbook.sourceforge.net/release/bibliography/bibliography.xml'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Maintaining bibliography entries across a set of documents is tedious, time
+consuming, and error prone. It makes much more sense, usually, to store all of
+the bibliography entries in a single place and simply <quote>extract</quote>
+the ones you need in each document.</para>
+
+<para>That's the purpose of the
+<parameter moreinfo="none">bibliography.collection</parameter> parameter. To setup a global
+bibliography <quote>database</quote>, follow these steps:</para>
+
+<para>First, create a stand-alone bibliography document that contains all of
+the documents that you wish to reference. Make sure that each bibliography
+entry (whether you use <sgmltag>biblioentry</sgmltag> or <sgmltag>bibliomixed</sgmltag>)
+has an ID.</para>
+
+<para>My global bibliography, <filename moreinfo="none">~/bibliography.xml</filename> begins
+like this:</para>
+
+<informalexample>
+<programlisting format="linespecific">&lt;!DOCTYPE bibliography
+  PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+  "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"&gt;
+&lt;bibliography&gt;&lt;title&gt;References&lt;/title&gt;
+
+&lt;bibliomixed id="xml-rec"&gt;&lt;abbrev&gt;XML 1.0&lt;/abbrev&gt;Tim Bray,
+Jean Paoli, C. M. Sperberg-McQueen, and Eve Maler, editors.
+&lt;citetitle&gt;&lt;ulink url="http://www.w3.org/TR/REC-xml"&gt;Extensible Markup
+Language (XML) 1.0 Second Edition&lt;/ulink&gt;&lt;/citetitle&gt;.
+World Wide Web Consortium, 2000.
+&lt;/bibliomixed&gt;
+
+&lt;bibliomixed id="xml-names"&gt;&lt;abbrev&gt;Namespaces&lt;/abbrev&gt;Tim Bray,
+Dave Hollander,
+and Andrew Layman, editors.
+&lt;citetitle&gt;&lt;ulink url="http://www.w3.org/TR/REC-xml-names/"&gt;Namespaces in
+XML&lt;/ulink&gt;&lt;/citetitle&gt;.
+World Wide Web Consortium, 1999.
+&lt;/bibliomixed&gt;
+
+&lt;!-- ... --&gt;
+&lt;/bibliography&gt;
+</programlisting>
+</informalexample>
+
+<para>When you create a bibliography in your document, simply
+provide <emphasis>empty</emphasis> <sgmltag>bibliomixed</sgmltag>
+entries for each document that you wish to cite. Make sure that these
+elements have the same ID as the corresponding <quote>real</quote>
+entry in your global bibliography.</para>
+
+<para>For example:</para>
+
+<informalexample>
+<programlisting format="linespecific">&lt;bibliography&gt;&lt;title&gt;Bibliography&lt;/title&gt;
+
+&lt;bibliomixed id="xml-rec"/&gt;
+&lt;bibliomixed id="xml-names"/&gt;
+&lt;bibliomixed id="DKnuth86"&gt;Donald E. Knuth. &lt;citetitle&gt;Computers and
+Typesetting: Volume B, TeX: The Program&lt;/citetitle&gt;. Addison-Wesley,
+1986.  ISBN 0-201-13437-3.
+&lt;/bibliomixed&gt;
+&lt;bibliomixed id="relaxng"/&gt;
+
+&lt;/bibliography&gt;</programlisting>
+</informalexample>
+
+<para>Note that it's perfectly acceptable to mix entries from your
+global bibliography with <quote>normal</quote> entries. You can use
+<sgmltag>xref</sgmltag> or other elements to cross-reference your
+bibliography entries in exactly the same way you do now.</para>
+
+<para>Finally, when you are ready to format your document, simply set the
+<parameter moreinfo="none">bibliography.collection</parameter> parameter (in either a
+customization layer or directly through your processor's interface) to
+point to your global bibliography.</para>
+
+<para>The stylesheets will format the bibliography in your document as if
+all of the entries referenced appeared there literally.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="bibliography.numbered">
+<refmeta>
+<refentrytitle>bibliography.numbered</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>bibliography.numbered</refname>
+<refpurpose>Should bibliography entries be numbered?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="bibliography.numbered.frag">
+&lt;xsl:param name="bibliography.numbered" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero bibliography entries will be numbered</para>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+<reference><title>Glossary</title>
+<refentry id="glossterm.auto.link">
+<refmeta>
+<refentrytitle>glossterm.auto.link</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>glossterm.auto.link</refname>
+<refpurpose>Generate links from glossterm to glossentry automaticaly?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="glossterm.auto.link.frag">
+&lt;xsl:param name="glossterm.auto.link" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true, a link will be automatically created from glossterm 
+to glossentry for that glossary term. This is usefull when your
+glossterm names are consistent and you don't want to add links
+manually.</para>
+<para>If there is <sgmltag class="attribute">linkend</sgmltag> on
+<sgmltag>glossterm</sgmltag> then is used instead of autogeneration of
+link.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="firstterm.only.link">
+<refmeta>
+<refentrytitle>firstterm.only.link</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>firstterm.only.link</refname>
+<refpurpose>Does automatic glossterm linking only apply to firstterms?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="firstterm.only.link.frag">
+&lt;xsl:param name="firstterm.only.link" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true, only <sgmltag>firstterm</sgmltag>s will be automatically linked
+to the glossary. If glossary linking is not enabled, this parameter
+has no effect.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="glossary.collection">
+<refmeta>
+<refentrytitle>glossary.collection</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>glossary.collection</refname>
+<refpurpose>Name of the glossary collection file</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="glossary.collection.frag">
+&lt;xsl:param name="glossary.collection" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Glossaries maintained independently across a set of documents
+are likely to become inconsistent unless considerable effort is
+expended to keep them in sync. It makes much more sense, usually, to
+store all of the glossary entries in a single place and simply
+<quote>extract</quote> the ones you need in each document.</para>
+
+<para>That's the purpose of the
+<parameter moreinfo="none">glossary.collection</parameter> parameter. To setup a global
+glossary <quote>database</quote>, follow these steps:</para>
+
+<refsect2><title>Setting Up the Glossary Database</title>
+
+<para>First, create a stand-alone glossary document that contains all of
+the entries that you wish to reference. Make sure that each glossary
+entry has an ID.</para>
+
+<para>Here's an example glossary:</para>
+
+<informalexample>
+<programlisting format="linespecific">
+&lt;?xml version="1.0" encoding="utf-8"?&gt;
+&lt;!DOCTYPE glossary
+  PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+  "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"&gt;
+&lt;glossary&gt;
+&lt;glossaryinfo&gt;
+&lt;editor&gt;&lt;firstname&gt;Eric&lt;/firstname&gt;&lt;surname&gt;Raymond&lt;/surname&gt;&lt;/editor&gt;
+&lt;title&gt;Jargon File 4.2.3 (abridged)&lt;/title&gt;
+&lt;releaseinfo&gt;Just some test data&lt;/releaseinfo&gt;
+&lt;/glossaryinfo&gt;
+
+&lt;glossdiv&gt;&lt;title&gt;0&lt;/title&gt;
+
+&lt;glossentry&gt;
+&lt;glossterm&gt;0&lt;/glossterm&gt;
+&lt;glossdef&gt;
+&lt;para&gt;Numeric zero, as opposed to the letter `O' (the 15th letter of
+the English alphabet). In their unmodified forms they look a lot
+alike, and various kluges invented to make them visually distinct have
+compounded the confusion. If your zero is center-dotted and letter-O
+is not, or if letter-O looks almost rectangular but zero looks more
+like an American football stood on end (or the reverse), you're
+probably looking at a modern character display (though the dotted zero
+seems to have originated as an option on IBM 3270 controllers). If
+your zero is slashed but letter-O is not, you're probably looking at
+an old-style ASCII graphic set descended from the default typewheel on
+the venerable ASR-33 Teletype (Scandinavians, for whom /O is a letter,
+curse this arrangement). (Interestingly, the slashed zero long
+predates computers; Florian Cajori's monumental "A History of
+Mathematical Notations" notes that it was used in the twelfth and
+thirteenth centuries.) If letter-O has a slash across it and the zero
+does not, your display is tuned for a very old convention used at IBM
+and a few other early mainframe makers (Scandinavians curse &lt;emphasis&gt;this&lt;/emphasis&gt;
+arrangement even more, because it means two of their letters collide).
+Some Burroughs/Unisys equipment displays a zero with a &lt;emphasis&gt;reversed&lt;/emphasis&gt;
+slash. Old CDC computers rendered letter O as an unbroken oval and 0
+as an oval broken at upper right and lower left. And yet another
+convention common on early line printers left zero unornamented but
+added a tail or hook to the letter-O so that it resembled an inverted
+Q or cursive capital letter-O (this was endorsed by a draft ANSI
+standard for how to draw ASCII characters, but the final standard
+changed the distinguisher to a tick-mark in the upper-left corner).
+Are we sufficiently confused yet?&lt;/para&gt;
+&lt;/glossdef&gt;
+&lt;/glossentry&gt;
+
+&lt;glossentry&gt;
+&lt;glossterm&gt;1TBS&lt;/glossterm&gt;
+&lt;glossdef&gt;
+&lt;para role="accidence"&gt;
+&lt;phrase role="pronounce"&gt;&lt;/phrase&gt;
+&lt;phrase role="partsofspeach"&gt;n&lt;/phrase&gt;
+&lt;/para&gt;
+&lt;para&gt;The "One True Brace Style"&lt;/para&gt;
+&lt;glossseealso&gt;indent style&lt;/glossseealso&gt;
+&lt;/glossdef&gt;
+&lt;/glossentry&gt;
+
+&lt;!-- ... --&gt;
+
+&lt;/glossdiv&gt;
+
+&lt;!-- ... --&gt;
+
+&lt;/glossary&gt;</programlisting>
+</informalexample>
+
+</refsect2>
+
+<refsect2><title>Marking Up Glossary Terms</title>
+
+<para>That takes care of the glossary database, now you have to get the entries
+into your document. Unlike bibliography entries, which can be empty, creating
+<quote>placeholder</quote> glossary entries would be very tedious. So instead,
+support for <parameter moreinfo="none">glossary.collection</parameter> relies on implicit linking.</para>
+
+<para>In your source document, simply use <sgmltag>firstterm</sgmltag> and
+<sgmltag>glossterm</sgmltag> to identify the terms you wish to have included
+in the glossary. The stylesheets assume that you will either set the
+<sgmltag class="attribute">baseform</sgmltag> attribute correctly, or that the
+content of the element exactly matches a term in your glossary.</para>
+
+<para>If you're using a <parameter moreinfo="none">glossary.collection</parameter>, don't
+make explicit links on the terms in your document.</para>
+
+<para>So, in your document, you might write things like this:</para>
+
+<informalexample>
+<programlisting format="linespecific">&lt;para&gt;This is dummy text, without any real meaning.
+The point is simply to reference glossary terms like &lt;glossterm&gt;0&lt;/glossterm&gt;
+and the &lt;firstterm baseform="1TBS"&gt;One True Brace Style (1TBS)&lt;/firstterm&gt;.
+The &lt;glossterm&gt;1TBS&lt;/glossterm&gt;, as you can probably imagine, is a nearly
+religious issue.&lt;/para&gt;</programlisting>
+</informalexample>
+
+<para>If you set the <parameter moreinfo="none">firstterm.only.link</parameter> parameter,
+only the terms marked with <sgmltag>firstterm</sgmltag> will be links.
+Otherwise, all the terms will be linked.</para>
+
+</refsect2>
+
+<refsect2><title>Marking Up the Glossary</title>
+
+<para>The glossary itself has to be identified for the stylesheets. For lack
+of a better choice, the <sgmltag class="attribute">role</sgmltag> is used.
+To identify the glossary as the target for automatic processing, set
+the role to <quote><literal moreinfo="none">auto</literal></quote>. The title of this
+glossary (and any other information from the <sgmltag>glossaryinfo</sgmltag>
+that's rendered by your stylesheet) will be displayed, but the entries will
+come from the database.
+</para>
+
+<para>Unfortunately, the glossary can't be empty, so you must put in
+at least one <sgmltag>glossentry</sgmltag>. The content of this entry
+is irrelevant, it will not be rendered:</para>
+
+<informalexample>
+<programlisting format="linespecific">&lt;glossary role="auto"&gt;
+&lt;glossentry&gt;
+&lt;glossterm&gt;Irrelevant&lt;/glossterm&gt;
+&lt;glossdef&gt;
+&lt;para&gt;If you can see this, the document was processed incorrectly. Use
+the &lt;parameter&gt;glossary.collection&lt;/parameter&gt; parameter.&lt;/para&gt;
+&lt;/glossdef&gt;
+&lt;/glossentry&gt;
+&lt;/glossary&gt;</programlisting>
+</informalexample>
+
+<para>What about glossary divisions? If your glossary database has glossary
+divisions <emphasis>and</emphasis> your automatic glossary contains at least
+one <sgmltag>glossdiv</sgmltag>, the automic glossary will have divisions.
+If the <sgmltag>glossdiv</sgmltag> is missing from either location, no divisions
+will be rendered.</para>
+
+<para>Glossary entries (and divisions, if appropriate) in the glossary will
+occur in precisely the order they occur in your database.</para>
+
+</refsect2>
+
+<refsect2><title>Formatting the Document</title>
+
+<para>Finally, when you are ready to format your document, simply set the
+<parameter moreinfo="none">glossary.collection</parameter> parameter (in either a
+customization layer or directly through your processor's interface) to
+point to your global glossary.</para>
+
+<para>The stylesheets will format the glossary in your document as if
+all of the entries implicilty referenced appeared there literally.</para>
+</refsect2>
+
+<refsect2><title>Limitations</title>
+
+<para>Glossary cross-references <emphasis>within the glossary</emphasis> are
+not supported. For example, this <emphasis>will not</emphasis> work:</para>
+
+<informalexample>
+<programlisting format="linespecific">&lt;glossentry&gt;
+&lt;glossterm&gt;gloss-1&lt;/glossterm&gt;
+&lt;glossdef&gt;&lt;para&gt;A description that references &lt;glossterm&gt;gloss-2&lt;/glossterm&gt;.&lt;/para&gt;
+&lt;glossseealso&gt;gloss-2&lt;/glossseealso&gt;
+&lt;/glossdef&gt;
+&lt;/glossentry&gt;</programlisting>
+</informalexample>
+
+<para>If you put glossary cross-references in your glossary that way,
+you'll get the cryptic error: <computeroutput moreinfo="none">Warning:
+glossary.collection specified, but there are 0 automatic
+glossaries</computeroutput>.</para>
+
+<para>Instead, you must do two things:</para>
+
+<orderedlist inheritnum="ignore" continuation="restarts">
+<listitem>
+<para>Markup your glossary using <sgmltag>glossseealso</sgmltag>:</para>
+
+<informalexample>
+<programlisting format="linespecific">&lt;glossentry&gt;
+&lt;glossterm&gt;gloss-1&lt;/glossterm&gt;
+&lt;glossdef&gt;&lt;para&gt;A description that references &lt;glossterm&gt;gloss-2&lt;/glossterm&gt;.&lt;/para&gt;
+&lt;glossseealso&gt;gloss-2&lt;/glossseealso&gt;
+&lt;/glossdef&gt;
+&lt;/glossentry&gt;</programlisting>
+</informalexample>
+</listitem>
+
+<listitem>
+<para>Make sure there is at least one <sgmltag>glossterm</sgmltag> reference to
+<glossterm>gloss-2</glossterm> <emphasis>in your document</emphasis>. The
+easiest way to do that is probably within a <sgmltag>remark</sgmltag> in your
+automatic glossary:</para>
+
+<informalexample>
+<programlisting format="linespecific">&lt;glossary role="auto"&gt;
+&lt;remark&gt;Make sure there's a reference to &lt;glossterm&gt;gloss-2&lt;/glossterm&gt;.&lt;/remark&gt;
+&lt;glossentry&gt;
+&lt;glossterm&gt;Irrelevant&lt;/glossterm&gt;
+&lt;glossdef&gt;
+&lt;para&gt;If you can see this, the document was processed incorrectly. Use
+the &lt;parameter&gt;glossary.collection&lt;/parameter&gt; parameter.&lt;/para&gt;
+&lt;/glossdef&gt;
+&lt;/glossentry&gt;
+&lt;/glossary&gt;</programlisting>
+</informalexample>
+</listitem>
+</orderedlist>
+</refsect2>
+
+</refsect1>
+</refentry>
+
+<refentry id="glossterm.separation">
+<refmeta>
+<refentrytitle>glossterm.separation</refentrytitle>
+<refmiscinfo role="type">length</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>glossterm.separation</refname>
+<refpurpose>Separation between glossary terms and descriptions in list mode</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="glossterm.separation.frag">
+&lt;xsl:param name="glossterm.separation" select="'0.25in'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Specifies the separation between glossary terms and descriptions when
+glossarys are presented using lists.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="glossterm.width">
+<refmeta>
+<refentrytitle>glossterm.width</refentrytitle>
+<refmiscinfo role="type">length</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>glossterm.width</refname>
+<refpurpose>Width of glossterm in list presentation mode</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="glossterm.width.frag">
+&lt;xsl:param name="glossterm.width" select="'2in'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This parameter specifies the width reserved for glossary terms when
+a list presentation is used.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="glossary.as.blocks">
+<refmeta>
+<refentrytitle>glossary.as.blocks</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>glossary.as.blocks</refname>
+<refpurpose>Present glossarys using blocks instead of lists?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="glossary.as.blocks.frag">
+&lt;xsl:param name="glossary.as.blocks" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, <sgmltag>glossary</sgmltag>s will be formatted as
+blocks.</para>
+
+<para>If you have long <sgmltag>glossterm</sgmltag>s, proper list
+markup in the FO case may produce unattractive lists. By setting this
+parameter, you can force the stylesheets to produce block markup
+instead of proper lists.</para>
+
+<para>You can override this setting with a processing instruction as the
+child of <sgmltag>glossary</sgmltag>: <sgmltag class="pi">dbfo
+glossary-presentation="blocks"</sgmltag> or <sgmltag class="pi">dbfo
+glossary-presentation="list"</sgmltag></para>
+
+</refsect1>
+</refentry>
+
+<refentry id="glosslist.as.blocks">
+<refmeta>
+<refentrytitle>glosslist.as.blocks</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>glosslist.as.blocks</refname>
+<refpurpose>Use blocks for glosslists?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="glosslist.as.blocks.frag">
+&lt;xsl:param name="glosslist.as.blocks" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>See <parameter moreinfo="none">glossary.as.blocks</parameter>.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="glossentry.show.acronym">
+<refmeta>
+<refentrytitle>glossentry.show.acronym</refentrytitle>
+<refmiscinfo role="type">list</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>glossentry.show.acronym</refname>
+<refpurpose>Display <sgmltag>glossentry</sgmltag> acronyms?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="glossentry.show.acronym.frag">
+&lt;xsl:param name="glossentry.show.acronym" select="'no'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>A setting of <quote>yes</quote> means they should be displayed;
+<quote>no</quote> means they shouldn't. If <quote>primary</quote> is used,
+then they are shown as the primary text for the entry.</para>
+
+<note>
+<para>This setting controls both <sgmltag>acronym</sgmltag> and
+<sgmltag>abbrev</sgmltag> elements in the <sgmltag>glossentry</sgmltag>.</para>
+</note>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+<reference><title>Miscellaneous</title>
+<refentry id="formal.procedures">
+<refmeta>
+<refentrytitle>formal.procedures</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>formal.procedures</refname>
+<refpurpose>Selects formal or informal procedures</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="formal.procedures.frag">
+&lt;xsl:param name="formal.procedures" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Formal procedures are numbered and always have a title.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="formal.title.placement">
+<refmeta>
+<refentrytitle>formal.title.placement</refentrytitle>
+<refmiscinfo role="type"/>
+</refmeta>
+<refnamediv>
+<refname>formal.title.placement</refname>
+<refpurpose/>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="formal.title.placement.frag">
+&lt;xsl:param name="formal.title.placement"&gt;
+figure before
+example before
+equation before
+table before
+procedure before
+task before
+&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Specifies where formal object titles should occur. For each formal object
+type (<sgmltag>figure</sgmltag>,
+<sgmltag>example</sgmltag>,
+<sgmltag>equation</sgmltag>,
+<sgmltag>table</sgmltag>, and <sgmltag>procedure</sgmltag>)
+you can specify either the keyword
+<quote><literal moreinfo="none">before</literal></quote> or
+<quote><literal moreinfo="none">after</literal></quote>.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="runinhead.default.title.end.punct">
+<refmeta>
+<refentrytitle>runinhead.default.title.end.punct</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>runinhead.default.title.end.punct</refname>
+<refpurpose>Default punctuation character on a run-in-head</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="runinhead.default.title.end.punct.frag">&lt;xsl:param name="runinhead.default.title.end.punct" select="'.'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="runinhead.title.end.punct">
+<refmeta>
+<refentrytitle>runinhead.title.end.punct</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>runinhead.title.end.punct</refname>
+<refpurpose>Characters that count as punctuation on a run-in-head</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="runinhead.title.end.punct.frag">&lt;xsl:param name="runinhead.title.end.punct" select="'.!?:'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="show.comments">
+<refmeta>
+<refentrytitle>show.comments</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>show.comments</refname>
+<refpurpose>Display <sgmltag>comment</sgmltag> elements?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="show.comments.frag">&lt;xsl:param name="show.comments"&gt;1&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), comments will be displayed, otherwise they are suppressed.
+Comments here refers to the <sgmltag>comment</sgmltag> element,
+which will be renamed <sgmltag>remark</sgmltag> in DocBook V4.0,
+not XML comments (&lt;-- like this --&gt;) which are unavailable.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="punct.honorific">
+<refmeta>
+<refentrytitle>punct.honorific</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>punct.honorific</refname>
+<refpurpose>Punctuation after an honorific in a personal name.</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="punct.honorific.frag">
+&lt;xsl:param name="punct.honorific" select="'.'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This parameter specifies the punctuation that should be added after an
+honorific in a personal name.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="segmentedlist.as.table">
+<refmeta>
+<refentrytitle>segmentedlist.as.table</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>segmentedlist.as.table</refname>
+<refpurpose>Format segmented lists as tables?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="segmentedlist.as.table.frag">
+&lt;xsl:param name="segmentedlist.as.table" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, <sgmltag>segmentedlist</sgmltag>s will be formatted as
+tables.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="variablelist.as.blocks">
+<refmeta>
+<refentrytitle>variablelist.as.blocks</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>variablelist.as.blocks</refname>
+<refpurpose>Format <sgmltag>variablelist</sgmltag>s lists as blocks?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="variablelist.as.blocks.frag">
+&lt;xsl:param name="variablelist.as.blocks" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, <sgmltag>variablelist</sgmltag>s will be formatted as
+blocks.</para>
+
+<para>If you have long terms, proper list markup in the FO case may produce
+unattractive lists. By setting this parameter, you can force the stylesheets
+to produce block markup instead of proper lists.</para>
+
+<para>You can override this setting with a processing instruction as the
+child of <sgmltag>variablelist</sgmltag>: <sgmltag class="pi">dbfo
+list-presentation="blocks"</sgmltag> or <sgmltag class="pi">dbfo
+list-presentation="list"</sgmltag></para>
+
+<programlisting format="linespecific">  &lt;variablelist&gt;
+        &lt;?dbfo list-presentation="list"?&gt;
+        &lt;varlistentry&gt;
+          &lt;term&gt;list&lt;/term&gt;
+          &lt;listitem&gt;
+                &lt;para&gt;
+                  Formatted as a list even if variablelist.as.blocks is set to 1.
+                &lt;/para&gt;
+          &lt;/listitem&gt;
+        &lt;/varlistentry&gt;
+  &lt;/variablelist&gt;</programlisting>
+</refsect1>
+
+</refentry>
+
+<refentry id="blockquote.properties">
+<refnamediv>
+<refname>blockquote.properties</refname>
+<refpurpose>To set the style for block quotations.</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="blockquote.properties.frag">
+&lt;xsl:attribute-set name="blockquote.properties"&gt;
+&lt;xsl:attribute name="start-indent"&gt;0.5in&lt;/xsl:attribute&gt;
+&lt;xsl:attribute name="end-indent"&gt;0.5in&lt;/xsl:attribute&gt;
+&lt;xsl:attribute name="space-after.minimum"&gt;0.5em&lt;/xsl:attribute&gt;
+&lt;xsl:attribute name="space-after.optimum"&gt;1em&lt;/xsl:attribute&gt;
+&lt;xsl:attribute name="space-after.maximum"&gt;2em&lt;/xsl:attribute&gt;
+&lt;/xsl:attribute-set&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The <parameter moreinfo="none">blockquote.properties</parameter> attribute set specifies
+the formating properties of block quotations.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="ulink.show">
+<refmeta>
+<refentrytitle>ulink.show</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>ulink.show</refname>
+<refpurpose>Display URLs after <sgmltag>ulink</sgmltag>s?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="ulink.show.frag">
+&lt;xsl:param name="ulink.show" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, the URL of each <sgmltag>ULink</sgmltag> will
+appear after the text of the link. If the text of the link and the URL
+are identical, the URL is suppressed.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="ulink.footnotes">
+<refmeta>
+<refentrytitle>ulink.footnotes</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>ulink.footnotes</refname>
+<refpurpose>Generate footnotes for <sgmltag>ULink</sgmltag>s?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="ulink.footnotes.frag">
+&lt;xsl:param name="ulink.footnotes" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, the URL of each <sgmltag>ULink</sgmltag> will
+appear as a footnote.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="ulink.footnote.number.format">
+<refmeta>
+<refentrytitle>ulink.footnote.number.format</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>ulink.footnote.number.format</refname>
+<refpurpose>Identifies the format used for <sgmltag>ulink</sgmltag> footnote numbers</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="ulink.footnote.number.format.frag">
+&lt;xsl:param name="ulink.footnote.number.format" select="'1'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The <parameter moreinfo="none">ulink.footnote.number.format</parameter> specifies the format
+to use for footnote numeration (1, i, I, a, or A).</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="ulink.hyphenate">
+<refmeta>
+<refentrytitle>ulink.hyphenate</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>ulink.hyphenate</refname>
+<refpurpose>Allow URLs to be automatically hyphenated</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="ulink.hyphenate.frag">
+&lt;xsl:param name="ulink.hyphenate" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If not empty, the specified character (or more generally, content) is
+added to URLs after every <quote>/</quote>. If the character specified is a
+Unicode soft hyphen (0x00AD) or Unicode zero-width space (0x200B), some FO
+processors will be able to reasonably hyphenate long URLs.</para>
+
+<para>As of 28 Jan 2002, discretionary hyphens are more widely and correctly
+supported than zero-width spaces for this purpose.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="shade.verbatim">
+<refmeta>
+<refentrytitle>shade.verbatim</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>shade.verbatim</refname>
+<refpurpose>Should verbatim environments be shaded?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="shade.verbatim.frag">&lt;xsl:param name="shade.verbatim" select="0"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="shade.verbatim.style">
+<refmeta>
+<refentrytitle>shade.verbatim.style</refentrytitle>
+<refmiscinfo role="type"/>
+</refmeta>
+<refnamediv>
+<refname>shade.verbatim.style</refname>
+<refpurpose>Properties that specify the style of shaded verbatim listings</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="shade.verbatim.style.frag">
+
+&lt;xsl:attribute-set name="shade.verbatim.style"&gt;
+  &lt;xsl:attribute name="background-color"&gt;#E0E0E0&lt;/xsl:attribute&gt;
+&lt;/xsl:attribute-set&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="use.svg">
+<refmeta>
+<refentrytitle>use.svg</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>use.svg</refname>
+<refpurpose>Allow SVG in the result tree?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="use.svg.frag">
+&lt;xsl:param name="use.svg" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, SVG will be considered an acceptable image format. SVG
+is passed through to the result tree, so correct rendering of the resulting
+diagram depends on the formatter (FO processor or web browser) that is used
+to process the output from the stylesheet.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="use.role.as.xrefstyle">
+<refmeta>
+<refentrytitle>use.role.as.xrefstyle</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>use.role.as.xrefstyle</refname>
+<refpurpose>Use <sgmltag class="attribute">role</sgmltag> attribute for
+<sgmltag class="attribute">xrefstyle</sgmltag> on <sgmltag>xref</sgmltag>?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="use.role.as.xrefstyle.frag">
+&lt;xsl:param name="use.role.as.xrefstyle" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, the <sgmltag class="attribute">role</sgmltag> attribute on
+<sgmltag>xref</sgmltag> will be used to select the cross reference style.
+The <ulink url="http://www.oasis-open.org/docbook/">DocBook
+Technical Committee</ulink> recently added an
+<sgmltag class="attribute">xrefstyle</sgmltag> attribute for this purpose.
+If the <sgmltag class="attribute">xrefstyle</sgmltag> attribute
+is present, <sgmltag class="attribute">role</sgmltag> will be ignored, regardless
+of this setting.</para>
+
+<para>Until an official DocBook release that includes the new
+attribute, this flag allows <sgmltag class="attribute">role</sgmltag>
+to serve that purpose.</para>
+
+</refsect1>
+
+<refsect1><title>Example</title>
+
+<para>The following small stylesheet shows how to configure the stylesheets to make
+use of the cross reference style:</para>
+
+<programlisting format="linespecific">&lt;?xml version="1.0"?&gt;
+&lt;xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                version="1.0"&gt;
+
+&lt;xsl:import href="../xsl/html/docbook.xsl"/&gt;
+
+&lt;xsl:output method="html"/&gt;
+
+&lt;xsl:param name="local.l10n.xml" select="document('')"/&gt;
+&lt;l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0"&gt;
+  &lt;l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="en"&gt;
+   &lt;l:context name="xref"&gt;
+      &lt;l:template name="chapter" style="title" text="Chapter %n, %t"/&gt;
+      &lt;l:template name="chapter" text="Chapter %n"/&gt;
+    &lt;/l:context&gt;
+  &lt;/l:l10n&gt;
+&lt;/l:i18n&gt;
+
+&lt;/xsl:stylesheet&gt;</programlisting>
+
+<para>With this stylesheet, the cross references in the following document:</para>
+
+<programlisting format="linespecific">&lt;?xml version="1.0" encoding="utf-8"?&gt;
+&lt;!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+                  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"&gt;
+&lt;book id="book"&gt;&lt;title&gt;Book&lt;/title&gt;
+
+&lt;preface&gt;
+&lt;title&gt;Preface&lt;/title&gt;
+
+&lt;para&gt;Normal: &lt;xref linkend="ch1"/&gt;.&lt;/para&gt;
+&lt;para&gt;Title: &lt;xref xrefstyle="title" linkend="ch1"/&gt;.&lt;/para&gt;
+
+&lt;/preface&gt;
+
+&lt;chapter id="ch1"&gt;
+&lt;title&gt;First Chapter&lt;/title&gt;
+
+&lt;para&gt;Irrelevant.&lt;/para&gt;
+
+&lt;/chapter&gt;
+&lt;/book&gt;</programlisting>
+
+<para>will appear as:</para>
+
+<informalexample>
+<para>Normal: Chapter 1.</para>
+<para>Title: Chapter 1, <emphasis>First Chapter</emphasis>.</para>
+</informalexample>
+</refsect1>
+
+</refentry>
+
+<refentry id="menuchoice.separator">
+<refmeta>
+<refentrytitle>menuchoice.separator</refentrytitle>
+<refmiscinfo role="type"/>
+</refmeta>
+<refnamediv>
+<refname>menuchoice.separator</refname>
+<refpurpose/>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="menuchoice.separator.frag">
+&lt;xsl:param name="menuchoice.separator" select="'+'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Separator used to connect items of a <sgmltag>menuchoice</sgmltag> other
+than <sgmltag>guimenuitem</sgmltag> and <sgmltag>guisubmenu</sgmltag>. The latter
+elements are linked with <parameter moreinfo="none">menuchoice.menu.separator</parameter>.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="menuchoice.menu.separator">
+<refmeta>
+<refentrytitle>menuchoice.menu.separator</refentrytitle>
+<refmiscinfo role="type"/>
+</refmeta>
+<refnamediv>
+<refname>menuchoice.menu.separator</refname>
+<refpurpose/>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="menuchoice.menu.separator.frag">
+&lt;xsl:param name="menuchoice.menu.separator" select="'-&gt;'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Separator used to connect items of a <sgmltag>menuchoice</sgmltag> with
+<sgmltag>guimenuitem</sgmltag> or <sgmltag>guisubmenu</sgmltag>. Other elements
+are linked with <parameter moreinfo="none">menuchoice.separator</parameter>.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="default.float.class">
+<refmeta>
+<refentrytitle>default.float.class</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>default.float.class</refname>
+<refpurpose>Specifies the default float class</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="default.float.class.frag">
+&lt;xsl:param name="default.float.class" select="'before'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="footnote.number.format">
+<refmeta>
+<refentrytitle>footnote.number.format</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>footnote.number.format</refname>
+<refpurpose>Identifies the format used for footnote numbers</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="footnote.number.format.frag">
+&lt;xsl:param name="footnote.number.format" select="'1'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The <parameter moreinfo="none">footnote.number.format</parameter> specifies the format
+to use for footnote numeration (1, i, I, a, or A).</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="table.footnote.number.format">
+<refmeta>
+<refentrytitle>table.footnote.number.format</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>table.footnote.number.format</refname>
+<refpurpose>Identifies the format used for footnote numbers in tables</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="table.footnote.number.format.frag">
+&lt;xsl:param name="table.footnote.number.format" select="'a'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The <parameter moreinfo="none">table.footnote.number.format</parameter> specifies the format
+to use for footnote numeration (1, i, I, a, or A) in tables.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="footnote.number.symbols">
+<refmeta>
+<refentrytitle>footnote.number.symbols</refentrytitle>
+<refmiscinfo role="type"/>
+</refmeta>
+<refnamediv>
+<refname>footnote.number.symbols</refname>
+<refpurpose/>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="footnote.number.symbols.frag">
+&lt;xsl:param name="footnote.number.symbols" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If <parameter moreinfo="none">footnote.number.symbols</parameter> is not the empty string,
+footnotes will use the characters it contains as footnote symbols. For example,
+<quote>*&amp;#x2020;&amp;#x2021;&amp;#x25CA;&amp;#x2720;</quote> will identify
+footnotes with <quote>*</quote>, <quote>†</quote>, <quote>‡</quote>,
+<quote>◊</quote>, and <quote>✠</quote>. If there are more footnotes
+than symbols, the stylesheets will fall back to numbered footnotes using
+<parameter moreinfo="none">footnote.number.format</parameter>.</para>
+
+<para>The use of symbols for footnotes depends on the ability of your
+processor (or browser) to render the symbols you select. Not all systems are
+capable of displaying the full range of Unicode characters. If the quoted characters
+in the preceding paragraph are not displayed properly, that's a good indicator
+that you may have trouble using those symbols for footnotes.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="table.footnote.number.symbols">
+<refmeta>
+<refentrytitle>table.footnote.number.symbols</refentrytitle>
+<refmiscinfo role="type"/>
+</refmeta>
+<refnamediv>
+<refname>table.footnote.number.symbols</refname>
+<refpurpose/>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="table.footnote.number.symbols.frag">
+&lt;xsl:param name="table.footnote.number.symbols" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If <parameter moreinfo="none">table.footnote.number.symbols</parameter> is not the empty string,
+table footnotes will use the characters it contains as footnote symbols. For example,
+<quote>*&amp;#x2020;&amp;#x2021;&amp;#x25CA;&amp;#x2720;</quote> will identify
+footnotes with <quote>*</quote>, <quote>†</quote>, <quote>‡</quote>,
+<quote>◊</quote>, and <quote>✠</quote>. If there are more footnotes
+than symbols, the stylesheets will fall back to numbered footnotes using
+<parameter moreinfo="none">table.footnote.number.format</parameter>.</para>
+
+<para>The use of symbols for footnotes depends on the ability of your
+processor (or browser) to render the symbols you select. Not all systems are
+capable of displaying the full range of Unicode characters. If the quoted characters
+in the preceding paragraph are not displayed properly, that's a good indicator
+that you may have trouble using those symbols for footnotes.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="xref.with.number.and.title">
+<refmeta>
+<refentrytitle>xref.with.number.and.title</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>xref.with.number.and.title</refname>
+<refpurpose>Use number and title in cross references</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="xref.with.number.and.title.frag">
+&lt;xsl:param name="xref.with.number.and.title" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="superscript.properties">
+<refmeta>
+<refentrytitle>superscript.properties</refentrytitle>
+<refmiscinfo role="type"/>
+</refmeta>
+<refnamediv>
+<refname>superscript.properties</refname>
+<refpurpose>Properties associated with superscripts</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="superscript.properties.frag">
+&lt;xsl:attribute-set name="superscript.properties"&gt;
+  &lt;xsl:attribute name="font-size"&gt;75%&lt;/xsl:attribute&gt;
+&lt;/xsl:attribute-set&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Specifies styling properties for superscripts.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="subscript.properties">
+<refmeta>
+<refentrytitle>subscript.properties</refentrytitle>
+<refmiscinfo role="type"/>
+</refmeta>
+<refnamediv>
+<refname>subscript.properties</refname>
+<refpurpose>Properties associated with subscripts</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="subscript.properties.frag">
+&lt;xsl:attribute-set name="subscript.properties"&gt;
+  &lt;xsl:attribute name="font-size"&gt;75%&lt;/xsl:attribute&gt;
+&lt;/xsl:attribute-set&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Specifies styling properties for subscripts.</para>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+<reference><title>Graphics</title>
+<refentry id="graphic.default.extension">
+<refmeta>
+<refentrytitle>graphic.default.extension</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>graphic.default.extension</refname>
+<refpurpose>Default extension for graphic filenames</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="graphic.default.extension.frag">&lt;xsl:param name="graphic.default.extension"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If a <sgmltag>graphic</sgmltag> or <sgmltag>mediaobject</sgmltag>
+includes a reference to a filename that does not include an extension,
+and the <sgmltag class="attribute">format</sgmltag> attribute is
+<emphasis>unspecified</emphasis>, the default extension will be used.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="default.image.width">
+<refmeta>
+<refentrytitle>default.image.width</refentrytitle>
+<refmiscinfo role="type">length</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>default.image.width</refname>
+<refpurpose>The default width of images</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="default.image.width.frag">
+&lt;xsl:param name="default.image.width" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If specified, this value will be used for the
+<sgmltag class="attribute">width</sgmltag> attribute on
+images that do not specify any
+<ulink url="http://docbook.org/tdg/en/html/imagedata.html#viewport.area">viewport
+dimensions</ulink>.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="preferred.mediaobject.role">
+<refmeta>
+<refentrytitle>preferred.mediaobject.role</refentrytitle>
+</refmeta>
+<refnamediv>
+<refname>preferred.mediaobject.role</refname>
+<refpurpose>Select which mediaobject to use based on
+this value of an object's <sgmltag class="attribute">role</sgmltag> attribute.
+</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="preferred.mediaobject.role.frag">
+&lt;xsl:param name="preferred.mediaobject.role"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>A mediaobject may contain several objects such as imageobjects.
+If the parameter <parameter moreinfo="none">use.role.for.mediaobject</parameter>
+is non-zero, then the <sgmltag class="attribute">role</sgmltag> attribute on
+<sgmltag>imageobject</sgmltag>s and other objects within a <sgmltag>mediaobject</sgmltag> container will be used to select which object will be
+used.  If one of the objects has a role value that matches the
+preferred.mediaobject.role parameter, then it has first
+priority for selection.  If more than one has such a
+role value, the first one is used.
+</para>
+<para>
+See the <parameter moreinfo="none">use.role.for.mediaobject</parameter> parameter
+for the sequence of selection.</para>
+</refsect1>
+</refentry>
+
+<refentry id="use.role.for.mediaobject">
+<refmeta>
+<refentrytitle>use.role.for.mediaobject</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>use.role.for.mediaobject</refname>
+<refpurpose>Use <sgmltag class="attribute">role</sgmltag> attribute 
+value for selecting which of several objects within a mediaobject to use.
+</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="use.role.for.mediaobject.frag">
+&lt;xsl:param name="use.role.for.mediaobject" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, the <sgmltag class="attribute">role</sgmltag> attribute on
+<sgmltag>imageobject</sgmltag>s or other objects within a <sgmltag>mediaobject</sgmltag> container will be used to select which object will be
+used.
+</para>
+<para>
+The order of selection when then parameter is non-zero is:
+</para>
+<orderedlist inheritnum="ignore" continuation="restarts">
+<listitem>
+    <para>If the stylesheet parameter <parameter moreinfo="none">preferred.mediaobject.role</parameter> has a value, then the object whose role equals that value is selected.</para>
+</listitem>
+<listitem>
+<para>Else if an object's role attribute has a value of
+<literal moreinfo="none">html</literal> for HTML processing or
+<literal moreinfo="none">fo</literal> for FO output, then the first
+of such objects is selected.
+</para>
+</listitem>
+<listitem>
+<para>Else the first suitable object is selected.</para>
+</listitem>
+</orderedlist>
+<para>
+If the value of 
+<parameter moreinfo="none">use.role.for.mediaobject</parameter>
+is zero, then role attributes are not considered
+and the first suitable object
+with or without a role value is used.
+</para>
+</refsect1>
+</refentry>
+
+<refentry id="ignore.image.scaling">
+<refmeta>
+<refentrytitle>ignore.image.scaling</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>ignore.image.scaling</refname>
+<refpurpose>Tell the stylesheets to ignore the author's image scaling attributes</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="ignore.image.scaling.frag">
+&lt;xsl:param name="ignore.image.scaling" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, the scaling attributes on graphics and media objects are
+ignored.</para>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+<reference><title>Pagination and General Styles</title>
+<partintro>
+<section><title>Understanding XSL FO Margins</title>
+
+<para>In order for the parameters in this section to make sense, it is useful to
+consider <xref linkend="fig.pagemodel"/>.</para>
+
+<figure id="fig.pagemodel" float="0">
+<mediaobject>
+<imageobject>
+<imagedata fileref="page.png"/>
+</imageobject>
+<textobject><phrase>Figure showing page margins</phrase></textobject>
+<textobject>
+<para>This figure shows the physical page with the various FO page regions
+identified.</para>
+</textobject>
+</mediaobject>
+</figure>
+
+<para>First, let's consider the regions on the page.</para>
+
+<para>The white region is the physical page. Its dimensions are determined by
+the <parameter moreinfo="none">page.height</parameter> and <parameter moreinfo="none">page.width</parameter>
+parameters.</para>
+
+<para>The yellow region is the region-body. The size and placement of
+the region body is constrained by the dimensions labelled in the
+figure.</para>
+
+<para>The pink region at the top of the page is the region-before. The
+darker area inside the region-before is the header text. In XSL, the default
+display alignment for a region is <literal moreinfo="none">before</literal>, but the
+DocBook stylesheets still explicitly make it <literal moreinfo="none">before</literal>. That's
+why the darker area is at the top.</para>
+
+<para>The pink region at the bottom of the page is the region-after.
+The darker area is the footer text. In XSL, the default display
+alignment for a region is <literal moreinfo="none">before</literal>,
+but the DocBook stylesheets explicitly make it
+<literal moreinfo="none">after</literal>. That's why the darker area is at the bottom.</para>
+
+<para>The dimensions in the figure are:</para>
+
+<orderedlist numeration="upperalpha" inheritnum="ignore" continuation="restarts">
+<listitem><para>The page-master margin-top.
+</para></listitem>
+<listitem><para>The region-before extent.
+</para></listitem>
+<listitem><para>The region-body margin-top.
+</para></listitem>
+<listitem><para>The region-after extent.
+</para></listitem>
+<listitem><para>The page-master margin-bottom.
+</para></listitem>
+<listitem><para>The region-body margin-bottom.
+</para></listitem>
+<listitem><para>The sum of the page-master margin-left and the
+region-body margin-left. In DocBook, the region-body margin-left is
+zero by default, so this is simply the page-master region-left.
+</para></listitem>
+<listitem><para>The sum of the page-master margin-right and the
+region-body margin-right. In DocBook, the region-body margin-right is
+zero by default, so this is simply the page-master region-left.
+</para></listitem>
+</orderedlist>
+
+</section>
+</partintro>
+
+<refentry id="page.height">
+<refmeta>
+<refentrytitle>page.height</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>page.height</refname>
+<refpurpose>The height of the physical page</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="page.height.frag">&lt;xsl:param name="page.height"&gt;
+  &lt;xsl:choose&gt;
+    &lt;xsl:when test="$page.orientation = 'portrait'"&gt;
+      &lt;xsl:value-of select="$page.height.portrait"&gt;&lt;/xsl:value-of&gt;
+    &lt;/xsl:when&gt;
+    &lt;xsl:otherwise&gt;
+      &lt;xsl:value-of select="$page.width.portrait"&gt;&lt;/xsl:value-of&gt;
+    &lt;/xsl:otherwise&gt;
+  &lt;/xsl:choose&gt;
+&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The page height is generally calculated from the
+<literal moreinfo="none">paper.type</literal> and
+<literal moreinfo="none">page.orientation</literal>.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="page.height.portrait">
+<refmeta>
+<refentrytitle>page.height.portrait</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>page.height.portrait</refname>
+<refpurpose>Specify the physical size of the long edge of the page</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="page.height.portrait.frag">&lt;xsl:param name="page.height.portrait"&gt;
+  &lt;xsl:choose&gt;
+    &lt;xsl:when test="$paper.type = 'A4landscape'"&gt;210mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'USletter'"&gt;11in&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'USlandscape'"&gt;8.5in&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = '4A0'"&gt;2378mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = '2A0'"&gt;1682mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'A0'"&gt;1189mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'A1'"&gt;841mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'A2'"&gt;594mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'A3'"&gt;420mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'A4'"&gt;297mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'A5'"&gt;210mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'A6'"&gt;148mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'A7'"&gt;105mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'A8'"&gt;74mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'A9'"&gt;52mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'A10'"&gt;37mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'B0'"&gt;1414mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'B1'"&gt;1000mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'B2'"&gt;707mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'B3'"&gt;500mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'B4'"&gt;353mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'B5'"&gt;250mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'B6'"&gt;176mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'B7'"&gt;125mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'B8'"&gt;88mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'B9'"&gt;62mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'B10'"&gt;44mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'C0'"&gt;1297mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'C1'"&gt;917mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'C2'"&gt;648mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'C3'"&gt;458mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'C4'"&gt;324mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'C5'"&gt;229mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'C6'"&gt;162mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'C7'"&gt;114mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'C8'"&gt;81mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'C9'"&gt;57mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'C10'"&gt;40mm&lt;/xsl:when&gt;
+    &lt;xsl:otherwise&gt;11in&lt;/xsl:otherwise&gt;
+  &lt;/xsl:choose&gt;
+&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The portrait page height is the length of the long
+edge of the physical page.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="page.margin.bottom">
+<refmeta>
+<refentrytitle>page.margin.bottom</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>page.margin.bottom</refname>
+<refpurpose>The bottom margin of the page</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="page.margin.bottom.frag">
+&lt;xsl:param name="page.margin.bottom" select="'0.5in'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The bottom page margin is the distance from the bottom of the region-after
+to the physical bottom of the page.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="page.margin.inner">
+<refmeta>
+<refentrytitle>page.margin.inner</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>page.margin.inner</refname>
+<refpurpose>The inner page margin</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="page.margin.inner.frag">&lt;xsl:param name="page.margin.inner"&gt;
+  &lt;xsl:choose&gt;
+    &lt;xsl:when test="$double.sided != 0"&gt;1.25in&lt;/xsl:when&gt;
+    &lt;xsl:otherwise&gt;1in&lt;/xsl:otherwise&gt;
+  &lt;/xsl:choose&gt;
+&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The inner page margin is the distance from binding edge of the
+page to the first column of text. In the left-to-right, top-to-bottom writing
+direction, this is the left margin of recto pages.</para>
+<para>The inner and outer margins are usually the same unless the output
+is double-sided.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="page.margin.outer">
+<refmeta>
+<refentrytitle>page.margin.outer</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>page.margin.outer</refname>
+<refpurpose>The outer page margin</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="page.margin.outer.frag">&lt;xsl:param name="page.margin.outer"&gt;
+  &lt;xsl:choose&gt;
+    &lt;xsl:when test="$double.sided != 0"&gt;0.75in&lt;/xsl:when&gt;
+    &lt;xsl:otherwise&gt;1in&lt;/xsl:otherwise&gt;
+  &lt;/xsl:choose&gt;
+&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The outer page margin is the distance from non-binding edge of the
+page to the last column of text. In the left-to-right, top-to-bottom writing
+direction, this is the right margin of recto pages.</para>
+<para>The inner and outer margins are usually the same unless the output
+is double-sided.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="page.margin.top">
+<refmeta>
+<refentrytitle>page.margin.top</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>page.margin.top</refname>
+<refpurpose>The top margin of the page</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="page.margin.top.frag">
+&lt;xsl:param name="page.margin.top" select="'0.5in'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The top page margin is the distance from the physical top of the
+page to the top of the region-before.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="page.orientation">
+<refmeta>
+<refentrytitle>page.orientation</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>page.orientation</refname>
+<refpurpose>Select the page orientation</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="page.orientation.frag">&lt;xsl:param name="page.orientation" select="'portrait'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>In portrait orientation, the short edge is horizontal; in
+landscape orientation, it is vertical.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="page.width">
+<refmeta>
+<refentrytitle>page.width</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>page.width</refname>
+<refpurpose>The width of the physical page</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="page.width.frag">&lt;xsl:param name="page.width"&gt;
+  &lt;xsl:choose&gt;
+    &lt;xsl:when test="$page.orientation = 'portrait'"&gt;
+      &lt;xsl:value-of select="$page.width.portrait"&gt;&lt;/xsl:value-of&gt;
+    &lt;/xsl:when&gt;
+    &lt;xsl:otherwise&gt;
+      &lt;xsl:value-of select="$page.height.portrait"&gt;&lt;/xsl:value-of&gt;
+    &lt;/xsl:otherwise&gt;
+  &lt;/xsl:choose&gt;
+&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The page width is generally calculated from the
+<literal moreinfo="none">paper.type</literal> and <literal moreinfo="none">page.orientation</literal>.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="page.width.portrait">
+<refmeta>
+<refentrytitle>page.width.portrait</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>page.width.portrait</refname>
+<refpurpose>Specify the physical size of the short edge of the page</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="page.width.portrait.frag">&lt;xsl:param name="page.width.portrait"&gt;
+  &lt;xsl:choose&gt;
+    &lt;xsl:when test="$paper.type = 'USletter'"&gt;8.5in&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = '4A0'"&gt;1682mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = '2A0'"&gt;1189mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'A0'"&gt;841mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'A1'"&gt;594mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'A2'"&gt;420mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'A3'"&gt;297mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'A4'"&gt;210mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'A5'"&gt;148mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'A6'"&gt;105mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'A7'"&gt;74mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'A8'"&gt;52mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'A9'"&gt;37mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'A10'"&gt;26mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'B0'"&gt;1000mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'B1'"&gt;707mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'B2'"&gt;500mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'B3'"&gt;353mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'B4'"&gt;250mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'B5'"&gt;176mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'B6'"&gt;125mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'B7'"&gt;88mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'B8'"&gt;62mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'B9'"&gt;44mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'B10'"&gt;31mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'C0'"&gt;917mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'C1'"&gt;648mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'C2'"&gt;458mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'C3'"&gt;324mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'C4'"&gt;229mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'C5'"&gt;162mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'C6'"&gt;114mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'C7'"&gt;81mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'C8'"&gt;57mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'C9'"&gt;40mm&lt;/xsl:when&gt;
+    &lt;xsl:when test="$paper.type = 'C10'"&gt;28mm&lt;/xsl:when&gt;
+    &lt;xsl:otherwise&gt;8.5in&lt;/xsl:otherwise&gt;
+  &lt;/xsl:choose&gt;
+&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The portrait page width is the length of the short
+edge of the physical page.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="paper.type">
+<refmeta>
+<refentrytitle>paper.type</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>paper.type</refname>
+<refpurpose>Select the paper type</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="paper.type.frag">&lt;xsl:param name="paper.type" select="'USletter'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The paper type is a convenient way to specify the paper size.
+The list of known paper sizes includes USletter and most of the A,
+B, and C sizes. See <literal moreinfo="none">page.width.portrait</literal>, for example.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="double.sided">
+<refmeta>
+<refentrytitle>double.sided</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>double.sided</refname>
+<refpurpose>Is the document to be printed double sided?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="double.sided.frag">
+&lt;xsl:param name="double.sided" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Double-sided documents are printed with a slightly wider margin
+on the binding edge of the page.
+</para>
+<para>FIXME: The current set of parameters does not take writing direction
+into account.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="body.margin.bottom">
+<refmeta>
+<refentrytitle>body.margin.bottom</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>body.margin.bottom</refname>
+<refpurpose>The bottom margin of the body text</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="body.margin.bottom.frag">
+&lt;xsl:param name="body.margin.bottom" select="'0.5in'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The body bottom margin is the distance from the last line of text
+in the page body to the bottom of the region-after.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="body.margin.top">
+<refmeta>
+<refentrytitle>body.margin.top</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>body.margin.top</refname>
+<refpurpose>To specify the size of the top margin of a page</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="body.margin.top.frag">
+&lt;xsl:param name="body.margin.top" select="'0.5in'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The body top margin is the distance from the top of the region-before
+to the first line of text in the page body.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="alignment">
+<refmeta>
+<refentrytitle>alignment</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>alignment</refname>
+<refpurpose>Specify the default text alignment</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="alignment.frag">&lt;xsl:param name="alignment"&gt;justify&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The default text alignment is used for most body text.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="hyphenate">
+<refmeta>
+<refentrytitle>hyphenate</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>hyphenate</refname>
+<refpurpose>Specify hyphenation behavior</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="hyphenate.frag">&lt;xsl:param name="hyphenate"&gt;true&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true, words may be hyphenated. Otherwise, they may not.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="line-height">
+<refmeta>
+<refentrytitle>line-height</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>line-height</refname>
+<refpurpose>Specify the line-height property</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="line-height.frag">
+&lt;xsl:param name="line-height" select="'normal'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Sets the line-height property.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="column.count.back">
+<refmeta>
+<refentrytitle>column.count.back</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>column.count.back</refname>
+<refpurpose>Number of columns on back matter pages</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="column.count.back.frag">
+&lt;xsl:param name="column.count.back" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Number of columns on back matter (appendix, glossary, etc.) pages.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="column.count.body">
+<refmeta>
+<refentrytitle>column.count.body</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>column.count.body</refname>
+<refpurpose>Number of columns on body pages</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="column.count.body.frag">
+&lt;xsl:param name="column.count.body" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Number of columns on body pages.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="column.count.front">
+<refmeta>
+<refentrytitle>column.count.front</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>column.count.front</refname>
+<refpurpose>Number of columns on front matter pages</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="column.count.front.frag">
+&lt;xsl:param name="column.count.front" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Number of columns on front matter (dedication, preface, etc.) pages.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="column.count.index">
+<refmeta>
+<refentrytitle>column.count.index</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>column.count.index</refname>
+<refpurpose>Number of columns on index pages</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="column.count.index.frag">
+&lt;xsl:param name="column.count.index" select="2"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Number of columns on index pages.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="column.count.lot">
+<refmeta>
+<refentrytitle>column.count.lot</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>column.count.lot</refname>
+<refpurpose>Number of columns on a 'List-of-Titles' page</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="column.count.lot.frag">
+&lt;xsl:param name="column.count.lot" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Number of columns on a page sequence containing the Table of Contents,
+List of Figures, etc.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="column.count.titlepage">
+<refmeta>
+<refentrytitle>column.count.titlepage</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>column.count.titlepage</refname>
+<refpurpose>Number of columns on a title page</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="column.count.titlepage.frag">
+&lt;xsl:param name="column.count.titlepage" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Number of columns on a title page</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="column.gap.back">
+<refmeta>
+<refentrytitle>column.gap.back</refentrytitle>
+<refmiscinfo role="type">length</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>column.gap.back</refname>
+<refpurpose>Gap between columns in back matter</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="column.gap.back.frag">
+&lt;xsl:param name="column.gap.back" select="'12pt'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Specifies the gap between columns in back matter (if
+<parameter moreinfo="none">column.count.back</parameter> is greater than one).</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="column.gap.body">
+<refmeta>
+<refentrytitle>column.gap.body</refentrytitle>
+<refmiscinfo role="type">length</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>column.gap.body</refname>
+<refpurpose>Gap between columns in the body</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="column.gap.body.frag">
+&lt;xsl:param name="column.gap.body" select="'12pt'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Specifies the gap between columns in body matter (if
+<parameter moreinfo="none">column.count.body</parameter> is greater than one).</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="column.gap.front">
+<refmeta>
+<refentrytitle>column.gap.front</refentrytitle>
+<refmiscinfo role="type">length</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>column.gap.front</refname>
+<refpurpose>Gap between columns in the front matter</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="column.gap.front.frag">
+&lt;xsl:param name="column.gap.front" select="'12pt'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Specifies the gap between columns in front matter (if
+<parameter moreinfo="none">column.count.front</parameter> is greater than one).</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="column.gap.index">
+<refmeta>
+<refentrytitle>column.gap.index</refentrytitle>
+<refmiscinfo role="type">length</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>column.gap.index</refname>
+<refpurpose>Gap between columns in the index</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="column.gap.index.frag">
+&lt;xsl:param name="column.gap.index" select="'12pt'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Specifies the gap between columns in indexes (if
+<parameter moreinfo="none">column.count.index</parameter> is greater than one).</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="column.gap.lot">
+<refmeta>
+<refentrytitle>column.gap.lot</refentrytitle>
+<refmiscinfo role="type">length</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>column.gap.lot</refname>
+<refpurpose>Gap between columns on a 'List-of-Titles' page</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="column.gap.lot.frag">
+&lt;xsl:param name="column.gap.lot" select="'12pt'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Specifies the gap between columns on 'List-of-Titles' pages (if
+<parameter moreinfo="none">column.count.lot</parameter> is greater than one).</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="column.gap.titlepage">
+<refmeta>
+<refentrytitle>column.gap.titlepage</refentrytitle>
+<refmiscinfo role="type">length</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>column.gap.titlepage</refname>
+<refpurpose>Gap between columns on title pages</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="column.gap.titlepage.frag">
+&lt;xsl:param name="column.gap.titlepage" select="'12pt'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Specifies the gap between columns on title pages (if
+<parameter moreinfo="none">column.count.titlepage</parameter> is greater than one).</para>
+
+
+</refsect1>
+</refentry>
+
+<refentry id="region.after.extent">
+<refmeta>
+<refentrytitle>region.after.extent</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>region.after.extent</refname>
+<refpurpose>Specifies the height of the footer.</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="region.after.extent.frag">
+&lt;xsl:param name="region.after.extent" select="'0.4in'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The region after extent is the height of the area where footers
+are printed.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="region.before.extent">
+<refmeta>
+<refentrytitle>region.before.extent</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>region.before.extent</refname>
+<refpurpose>Specifies the height of the header</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="region.before.extent.frag">
+&lt;xsl:param name="region.before.extent" select="'0.4in'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The region before extent is the height of the area where headers
+are printed.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="default.units">
+<refmeta>
+<refentrytitle>default.units</refentrytitle>
+<refmiscinfo role="type">list</refmiscinfo>
+<refmiscinfo role="value">cm</refmiscinfo>
+<refmiscinfo role="value">mm</refmiscinfo>
+<refmiscinfo role="value">in</refmiscinfo>
+<refmiscinfo role="value">pt</refmiscinfo>
+<refmiscinfo role="value">pc</refmiscinfo>
+<refmiscinfo role="value">px</refmiscinfo>
+<refmiscinfo role="value">em</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>default.units</refname>
+<refpurpose>Default units for an unqualified dimension</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="default.units.frag">&lt;xsl:param name="default.units" select="'pt'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If an unqualified dimension is encountered (for example, in a
+graphic width), the <parameter moreinfo="none">default-units</parameter> will be used for the
+units. Unqualified dimensions are not allowed in XSL Formatting Objects.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="normal.para.spacing">
+<refnamediv>
+<refname>normal.para.spacing</refname>
+<refpurpose>What space do you want between normal paragraphs</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="normal.para.spacing.frag">&lt;xsl:attribute-set name="normal.para.spacing"&gt;
+  &lt;xsl:attribute name="space-before.optimum"&gt;1em&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="space-before.minimum"&gt;0.8em&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="space-before.maximum"&gt;1.2em&lt;/xsl:attribute&gt;
+&lt;/xsl:attribute-set&gt;</programlisting>
+</refsynopsisdiv>
+<refsect1><title>Description</title>
+<para>Specify the spacing required between normal paragraphs</para>
+</refsect1>
+</refentry>
+
+<refentry id="body.font.master">
+<refmeta>
+<refentrytitle>body.font.master</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>body.font.master</refname>
+<refpurpose>Specifies the default point size for body text</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="body.font.master.frag">
+&lt;xsl:param name="body.font.master"&gt;10&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The body font size is specified in two parameters
+(<varname>body.font.master</varname> and <varname>body.font.size</varname>)
+so that math can be performed on the font size by XSLT.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="body.font.size">
+<refmeta>
+<refentrytitle>body.font.size</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>body.font.size</refname>
+<refpurpose>Specifies the default font size for body text</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="body.font.size.frag">&lt;xsl:param name="body.font.size"&gt;
+ &lt;xsl:value-of select="$body.font.master"&gt;&lt;/xsl:value-of&gt;&lt;xsl:text&gt;pt&lt;/xsl:text&gt;
+&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The body font size is specified in two parameters
+(<varname>body.font.master</varname> and <varname>body.font.size</varname>)
+so that math can be performed on the font size by XSLT.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="footnote.font.size">
+<refmeta>
+<refentrytitle>footnote.font.size</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>footnote.font.size</refname>
+<refpurpose>The font size for footnotes</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="footnote.font.size.frag">&lt;xsl:param name="footnote.font.size"&gt;
+ &lt;xsl:value-of select="$body.font.master * 0.8"&gt;&lt;/xsl:value-of&gt;&lt;xsl:text&gt;pt&lt;/xsl:text&gt;
+&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The footnote font size is used for...footnotes!
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="title.margin.left">
+<refmeta>
+<refentrytitle>title.margin.left</refentrytitle>
+<refmiscinfo role="type"/>
+</refmeta>
+<refnamediv>
+<refname>title.margin.left</refname>
+<refpurpose>Adjust the left margin for titles</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="title.margin.left.frag">
+&lt;xsl:param name="title.margin.left"&gt;
+  &lt;xsl:choose&gt;
+    &lt;xsl:when test="$passivetex.extensions != 0"&gt;0pt&lt;/xsl:when&gt;
+    &lt;xsl:otherwise&gt;-4pc&lt;/xsl:otherwise&gt;
+  &lt;/xsl:choose&gt;
+&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This parameter adjusts the left margin for titles,
+effectively leaving the titles at the left
+margin and indenting the body text.
+The default value is -4pc, which means the
+body text is indented 4 picas relative to
+the titles.
+</para>
+<para>
+If you set the value to zero, be sure to still include
+a unit indicator such as <literal moreinfo="none">0pt</literal>, or
+the FO processor will report errors.
+</para>
+<para>
+This parameter is set to 0pt if the
+<parameter moreinfo="none">passivetex.extensions</parameter>
+parameter is nonzero because PassiveTeX cannot handle
+the math expression with negative values 
+used to calculate the indents.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="draft.mode">
+<refmeta>
+<refentrytitle>draft.mode</refentrytitle>
+<refmiscinfo role="type">list</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>draft.mode</refname>
+<refpurpose>Select draft mode</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="draft.mode.frag">
+&lt;xsl:param name="draft.mode" select="'maybe'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Selects draft mode. If <parameter moreinfo="none">draft.mode</parameter> is
+<quote><literal moreinfo="none">yes</literal></quote>, the entire document will be treated
+as a draft. If it is <quote><literal moreinfo="none">no</literal></quote>, the entire document
+will be treated as a final copy. If it is <quote><literal moreinfo="none">maybe</literal></quote>,
+individual sections will be treated as draft or final independently, depending
+on how their <sgmltag class="attribute">status</sgmltag> attribute is set.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="draft.watermark.image">
+<refmeta>
+<refentrytitle>draft.watermark.image</refentrytitle>
+<refmiscinfo role="type">uri</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>draft.watermark.image</refname>
+<refpurpose>The URI of the image to be used for draft watermarks</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="draft.watermark.image.frag">
+&lt;xsl:param name="draft.watermark.image" select="'http://docbook.sourceforge.net/release/images/draft.png'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The image to be used for draft watermarks.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="headers.on.blank.pages">
+<refmeta>
+<refentrytitle>headers.on.blank.pages</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>headers.on.blank.pages</refname>
+<refpurpose>Put headers on blank pages?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="headers.on.blank.pages.frag">
+&lt;xsl:param name="headers.on.blank.pages" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, headers will be placed on blank pages.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="footers.on.blank.pages">
+<refmeta>
+<refentrytitle>footers.on.blank.pages</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>footers.on.blank.pages</refname>
+<refpurpose>Put footers on blank pages?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="footers.on.blank.pages.frag">
+&lt;xsl:param name="footers.on.blank.pages" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, footers will be placed on blank pages.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="header.rule">
+<refmeta>
+<refentrytitle>header.rule</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>header.rule</refname>
+<refpurpose>Rule under headers?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="header.rule.frag">
+&lt;xsl:param name="header.rule" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, a rule will be drawn below the page headers.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="footer.rule">
+<refmeta>
+<refentrytitle>footer.rule</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>footer.rule</refname>
+<refpurpose>Rule over footers?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="footer.rule.frag">
+&lt;xsl:param name="footer.rule" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, a rule will be drawn above the page footers.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="header.column.widths">
+<refmeta>
+<refentrytitle>header.column.widths</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>header.column.widths</refname>
+<refpurpose>Specify relative widths of header areas</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv><programlisting id="header.column.widths.frag">
+&lt;xsl:param name="header.column.widths" select="'1 1 1'"&gt;&lt;/xsl:param&gt;
+</programlisting></refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Page headers in print output use a three column table
+to position text at the left, center, and right side of
+the header on the page.
+This parameter lets you specify the relative sizes of the
+three columns.  The default value is
+"1 1 1".</para>
+
+<para>The parameter value must be three numbers, separated
+by white space. The first number represents the relative
+width of the left header for
+single-sided output, or the inside header for
+double-sided output.  The second number is the relative
+width of the center header.  The third number is the
+relative width of the right header for
+single-sided output, or the outside header for
+double-sided output.
+</para>
+
+<para>The numbers are used to specify the column widths
+for the table that makes up the header area.
+In the FO output, this looks like:
+</para>
+
+<programlisting format="linespecific">
+&lt;fo:table-column column-number="1" 
+    column-width="proportional-column-width(1)"/&gt;
+</programlisting>
+
+<para>
+The <literal moreinfo="none">proportional-column-width()</literal>
+function computes a column width by dividing its
+argument by the total of the arguments for all the columns, and
+then multiplying the result by the width of the whole table
+(assuming all the column specs use the function).
+Its argument can be any positive integer or floating point number.
+Zero is an acceptable value, although some FO processors
+may warn about it, in which case using a very small number might
+be more satisfactory.
+</para>
+
+<para>For example, the value "1 2 1" means the center
+header should have twice the width of the other areas.
+A value of "0 0 1" means the entire header area
+is reserved for the right (or outside) header text.
+Note that to keep the center area centered on
+the page, the left and right values must be
+the same. A specification like "1 2 3" means the
+center area is no longer centered on the page
+since the right area is three times the width of the left area.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="footer.column.widths">
+<refmeta>
+<refentrytitle>footer.column.widths</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>footer.column.widths</refname>
+<refpurpose>Specify relative widths of footer areas</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv><programlisting id="footer.column.widths.frag">
+&lt;xsl:param name="footer.column.widths" select="'1 1 1'"&gt;&lt;/xsl:param&gt;
+</programlisting></refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Page footers in print output use a three column table
+to position text at the left, center, and right side of
+the footer on the page.
+This parameter lets you specify the relative sizes of the
+three columns.  The default value is
+"1 1 1".</para>
+
+<para>The parameter value must be three numbers, separated
+by white space. The first number represents the relative
+width of the left footer for
+single-sided output, or the inside footer for
+double-sided output.  The second number is the relative
+width of the center footer.  The third number is the
+relative width of the right footer for
+single-sided output, or the outside footer for
+double-sided output.
+</para>
+
+<para>The numbers are used to specify the column widths
+for the table that makes up the footer area.
+In the FO output, this looks like:
+</para>
+
+<programlisting format="linespecific">
+&lt;fo:table-column column-number="1" 
+    column-width="proportional-column-width(1)"/&gt;
+</programlisting>
+
+<para>
+The <literal moreinfo="none">proportional-column-width()</literal>
+function computes a column width by dividing its
+argument by the total of the arguments for all the columns, and
+then multiplying the result by the width of the whole table
+(assuming all the column specs use the function).
+Its argument can be any positive integer or floating point number.
+Zero is an acceptable value, although some FO processors
+may warn about it, in which case using a very small number might
+be more satisfactory.
+</para>
+
+<para>For example, the value "1 2 1" means the center
+footer should have twice the width of the other areas.
+A value of "0 0 1" means the entire footer area
+is reserved for the right (or outside) footer text.
+Note that to keep the center area centered on
+the page, the left and right values must be
+the same. A specification like "1 2 3" means the
+center area is no longer centered on the page
+since the right area is three times the width of the left area.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="header.content.properties">
+<refmeta>
+<refentrytitle>header.content.properties</refentrytitle>
+<refmiscinfo role="type"/>
+</refmeta>
+<refnamediv>
+<refname>header.content.properties</refname>
+<refpurpose/>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="header.content.properties.frag">
+&lt;xsl:attribute-set name="header.content.properties"&gt;
+  &lt;xsl:attribute name="font-family"&gt;
+    &lt;xsl:value-of select="$body.fontset"&gt;&lt;/xsl:value-of&gt;
+  &lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="margin-left"&gt;
+    &lt;xsl:value-of select="$title.margin.left"&gt;&lt;/xsl:value-of&gt;
+  &lt;/xsl:attribute&gt;
+&lt;/xsl:attribute-set&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Properties of page header content.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="footer.content.properties">
+<refmeta>
+<refentrytitle>footer.content.properties</refentrytitle>
+<refmiscinfo role="type"/>
+</refmeta>
+<refnamediv>
+<refname>footer.content.properties</refname>
+<refpurpose/>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="footer.content.properties.frag">
+&lt;xsl:attribute-set name="footer.content.properties"&gt;
+  &lt;xsl:attribute name="font-family"&gt;
+    &lt;xsl:value-of select="$body.fontset"&gt;&lt;/xsl:value-of&gt;
+  &lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="margin-left"&gt;
+    &lt;xsl:value-of select="$title.margin.left"&gt;&lt;/xsl:value-of&gt;
+  &lt;/xsl:attribute&gt;
+&lt;/xsl:attribute-set&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Properties of page footer content.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="marker.section.level">
+<refmeta>
+<refentrytitle>marker.section.level</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>marker.section.level</refname>
+<refpurpose>Control depth of sections shown in running headers or footers</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="marker.section.level.frag">
+&lt;xsl:param name="marker.section.level" select="2"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The <parameter moreinfo="none">marker.section.level</parameter> parameter
+controls the depth of section levels that may be displayed
+in running headers and footers.  For example, if the value
+is 2 (the default), then titles from <sgmltag>sect1</sgmltag> and 
+<sgmltag>sect2</sgmltag> or equivalent <sgmltag>section</sgmltag>
+elements are candidates for use in running headers and
+footers.
+</para>
+<para>Each candidate title is marked in the FO output with a
+<sgmltag>&lt;fo:marker marker-class-name="section.head.marker"&gt;</sgmltag>
+element.
+</para>
+<para>In order for such titles to appear in headers
+or footers, the <literal moreinfo="none">header.content</literal>
+or <literal moreinfo="none">footer.content</literal> template
+must be customized to retrieve the marker using
+an output element such as:
+</para>
+<programlisting format="linespecific">
+&lt;fo:retrieve-marker retrieve-class-name="section.head.marker"
+                       retrieve-position="first-including-carryover"
+                       retrieve-boundary="page-sequence"/&gt;
+</programlisting>
+
+
+</refsect1>
+</refentry>
+
+</reference>
+
+<reference><title>Font Families</title>
+<refentry id="body.font.family">
+<refmeta>
+<refentrytitle>body.font.family</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>body.font.family</refname>
+<refpurpose>The default font family for body text</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="body.font.family.frag">
+&lt;xsl:param name="body.font.family" select="'serif'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The body font family is the default font used for text in the page body.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="dingbat.font.family">
+<refmeta>
+<refentrytitle>dingbat.font.family</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>dingbat.font.family</refname>
+<refpurpose>The font family for copyright, quotes, and other symbols</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="dingbat.font.family.frag">
+&lt;xsl:param name="dingbat.font.family" select="'serif'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The dingbat font family is used for dingbats. If it is defined
+as the empty string, no font change is effected around dingbats.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="monospace.font.family">
+<refmeta>
+<refentrytitle>monospace.font.family</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>monospace.font.family</refname>
+<refpurpose>The default font family for monospace environments</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="monospace.font.family.frag">
+&lt;xsl:param name="monospace.font.family" select="'monospace'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The monospace font family is used for verbatim environments
+(program listings, screens, etc.).
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="sans.font.family">
+<refmeta>
+<refentrytitle>sans.font.family</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>sans.font.family</refname>
+<refpurpose>The default sans-serif font family</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="sans.font.family.frag">
+&lt;xsl:param name="sans.font.family" select="'sans-serif'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The default sans-serif font family. At the present, this isn't
+actually used by the stylesheets.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="title.font.family">
+<refmeta>
+<refentrytitle>title.font.family</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>title.font.family</refname>
+<refpurpose>The default font family for titles</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="title.font.family.frag">
+&lt;xsl:param name="title.font.family" select="'sans-serif'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The title font family is used for titles (chapter, section, figure,
+etc.)
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="symbol.font.family">
+<refmeta>
+<refentrytitle>symbol.font.family</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>symbol.font.family</refname>
+<refpurpose>The font families to be searched for symbols outside
+    of the body font</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="symbol.font.family.frag">
+&lt;xsl:param name="symbol.font.family" select="'Symbol,ZapfDingbats'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>A typical body or title font does not contain all
+the character glyphs that DocBook supports.  This parameter
+specifies additional fonts that should be searched for
+special characters not in the normal font.
+These symbol font names are automatically appended
+to the body or title font family name when fonts
+are specified in a 
+<sgmltag class="attribute">font-family</sgmltag>
+property in the FO output.
+</para>
+<para>The symbol font names should be entered as a
+comma-separated list.  The default value is
+<literal moreinfo="none">Symbol,ZapfDingbats</literal>.
+</para>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+<reference><title>Lists</title>
+<refentry id="list.block.spacing">
+<refnamediv>
+<refname>list.block.spacing</refname>
+<refpurpose>What spacing do you want before and after lists?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="list.block.spacing.frag">&lt;xsl:attribute-set name="list.block.spacing"&gt;
+  &lt;xsl:attribute name="space-before.optimum"&gt;1em&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="space-before.minimum"&gt;0.8em&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="space-before.maximum"&gt;1.2em&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="space-after.optimum"&gt;1em&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="space-after.minimum"&gt;0.8em&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="space-after.maximum"&gt;1.2em&lt;/xsl:attribute&gt;
+&lt;/xsl:attribute-set&gt;</programlisting>
+</refsynopsisdiv>
+<refsect1><title>Description</title>
+<para>Specify the spacing required before and after a list. It is necessary to specify the space after a list block because lists can come inside of paras.  </para>
+</refsect1>
+</refentry>
+
+<refentry id="list.item.spacing">
+<refnamediv>
+<refname>list.item.spacing</refname>
+<refpurpose>What space do you want between list items?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="list.item.spacing.frag">&lt;xsl:attribute-set name="list.item.spacing"&gt;
+  &lt;xsl:attribute name="space-before.optimum"&gt;1em&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="space-before.minimum"&gt;0.8em&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="space-before.maximum"&gt;1.2em&lt;/xsl:attribute&gt;
+&lt;/xsl:attribute-set&gt;</programlisting>
+</refsynopsisdiv>
+<refsect1><title>Description</title>
+<para>Specify what spacing you want between each list item.</para>
+</refsect1>
+</refentry>
+
+<refentry id="compact.list.item.spacing">
+<refnamediv>
+<refname>compact.list.item.spacing</refname>
+<refpurpose>What space do you want between list items (when spacing=compact)?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="compact.list.item.spacing.frag">&lt;xsl:attribute-set name="compact.list.item.spacing"&gt;
+  &lt;xsl:attribute name="space-before.optimum"&gt;0em&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="space-before.minimum"&gt;0em&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="space-before.maximum"&gt;0.2em&lt;/xsl:attribute&gt;
+&lt;/xsl:attribute-set&gt;</programlisting>
+</refsynopsisdiv>
+<refsect1><title>Description</title>
+<para>Specify what spacing you want between each list item when
+<sgmltag class="attribute">spacing</sgmltag> is
+<quote><literal moreinfo="none">compact</literal></quote>.</para>
+</refsect1>
+</refentry>
+
+<refentry id="variablelist.max.termlength">
+<refmeta>
+<refentrytitle>variablelist.max.termlength</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>variablelist.max.termlength</refname>
+<refpurpose>Specifies the longest term in variablelists</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="variablelist.max.termlength.frag">
+&lt;xsl:param name="variablelist.max.termlength"&gt;24&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>In variablelists, the <sgmltag>listitem</sgmltag>
+is indented to leave room for the 
+<sgmltag>term</sgmltag> elements. That indent may be computed
+if it is not specified with a <sgmltag class="attribute">termlength</sgmltag>
+attribute on the <sgmltag>variablelist</sgmltag> element.
+</para>
+<para>
+The computation counts characters in the 
+<sgmltag>term</sgmltag> elements in the list
+to find the longest term.  However, some terms are very long
+and would produce extreme indents.  This parameter lets you
+set a maximum character count.  Any terms longer than the maximum
+would line wrap.  The default value is 24.
+</para>
+<para>
+The character counts are converted to physical widths
+by multiplying by 0.50em. There will be some variability
+in how many actual characters fit in the space
+since some characters are wider than others.
+</para>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+<reference><title>Cross References</title>
+<refentry id="insert.xref.page.number">
+<refmeta>
+<refentrytitle>insert.xref.page.number</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>insert.xref.page.number</refname>
+<refpurpose>Turns page numbers in xrefs on and off</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="insert.xref.page.number.frag">
+&lt;xsl:param name="insert.xref.page.number"&gt;no&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The value of this parameter determines if
+cross references (<sgmltag>xref</sgmltag>s) in
+printed output will
+include page number citations.
+It has three possible values.
+</para>
+<variablelist>
+<section>
+<term>no</term>
+<listitem><para>No page number references will be generated.
+</para></listitem>
+</section>
+<section>
+<term>yes</term>
+<listitem><para>Page number references will be generated
+for all <sgmltag>xref</sgmltag> elements.
+The style of page reference may be changed
+if an <sgmltag class="attribute">xrefstyle</sgmltag>
+attribute is used.
+</para></listitem>
+</section>
+<section>
+<term>maybe</term>
+<listitem><para>Page number references will not be generated
+for an <sgmltag>xref</sgmltag> element unless 
+it has an
+<sgmltag class="attribute">xrefstyle</sgmltag>
+attribute whose value specifies a page reference.
+</para></listitem>
+</section>
+</variablelist>
+
+</refsect1>
+</refentry>
+
+<refentry id="xref.properties">
+<refnamediv>
+<refname>xref.properties</refname>
+<refpurpose>Properties associated with cross-reference text</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="xref.properties.frag">
+&lt;xsl:attribute-set name="xref.properties"&gt;
+&lt;/xsl:attribute-set&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This attribute set is used on cross reference text.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="xref.label-title.separator">
+<refmeta>
+<refentrytitle>xref.label-title.separator</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>xref.label-title.separator</refname>
+<refpurpose>Punctuation or space separating label from title in xref</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="xref.label-title.separator.frag">&lt;xsl:param name="xref.label-title.separator"&gt;: &lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>
+This parameter allows you to control the punctuation of certain
+types of generated cross reference text.
+When cross reference text is generated for an 
+<sgmltag class="element">xref</sgmltag> or 
+<sgmltag class="element">olink</sgmltag> element
+using an <sgmltag class="attribute">xrefstyle</sgmltag> attribute
+that makes use of the <literal moreinfo="none">select:</literal> feature,
+and the selected components include both label and title,
+then the value of this parameter is inserted between
+label and title in the output.  
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="xref.label-page.separator">
+<refmeta>
+<refentrytitle>xref.label-page.separator</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>xref.label-page.separator</refname>
+<refpurpose>Punctuation or space separating label from page number in xref</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="xref.label-page.separator.frag">&lt;xsl:param name="xref.label-page.separator"&gt;&lt;xsl:text&gt; &lt;/xsl:text&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>
+This parameter allows you to control the punctuation of certain
+types of generated cross reference text.
+When cross reference text is generated for an 
+<sgmltag class="element">xref</sgmltag> or 
+<sgmltag class="element">olink</sgmltag> element
+using an <sgmltag class="attribute">xrefstyle</sgmltag> attribute
+that makes use of the <literal moreinfo="none">select:</literal> feature,
+and the selected components include both label and page
+but no title,
+then the value of this parameter is inserted between
+label and page number in the output.  
+If a title is included, then other separators are used.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="xref.title-page.separator">
+<refmeta>
+<refentrytitle>xref.title-page.separator</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>xref.title-page.separator</refname>
+<refpurpose>Punctuation or space separating title from page number in xref</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="xref.title-page.separator.frag">&lt;xsl:param name="xref.title-page.separator"&gt;&lt;xsl:text&gt; &lt;/xsl:text&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>
+This parameter allows you to control the punctuation of certain
+types of generated cross reference text.
+When cross reference text is generated for an 
+<sgmltag class="element">xref</sgmltag> or 
+<sgmltag class="element">olink</sgmltag> element
+using an <sgmltag class="attribute">xrefstyle</sgmltag> attribute
+that makes use of the <literal moreinfo="none">select:</literal> feature,
+and the selected components include both title and page number,
+then the value of this parameter is inserted between
+title and page number in the output.  
+</para>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+<reference><title>Property Sets</title>
+<refentry id="formal.object.properties">
+<refnamediv>
+<refname>formal.object.properties</refname>
+<refpurpose>Properties associated with a formal object such as a figure, or other component that has a title</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="formal.object.properties.frag">
+&lt;xsl:attribute-set name="formal.object.properties"&gt;
+  &lt;xsl:attribute name="space-before.minimum"&gt;0.5em&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="space-before.optimum"&gt;1em&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="space-before.maximum"&gt;2em&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="space-after.minimum"&gt;0.5em&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="space-after.optimum"&gt;1em&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="space-after.maximum"&gt;2em&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="keep-together.within-column"&gt;always&lt;/xsl:attribute&gt;
+&lt;/xsl:attribute-set&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The styling for formal objects in docbook. Specify the spacing
+before and after the object.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="formal.title.properties">
+<refnamediv>
+<refname>formal.title.properties</refname>
+<refpurpose>Style the title element of formal object such as a figure.</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="formal.title.properties.frag">
+&lt;xsl:attribute-set name="formal.title.properties" use-attribute-sets="normal.para.spacing"&gt;
+  &lt;xsl:attribute name="font-weight"&gt;bold&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="font-size"&gt;
+    &lt;xsl:value-of select="$body.font.master * 1.2"&gt;&lt;/xsl:value-of&gt;
+    &lt;xsl:text&gt;pt&lt;/xsl:text&gt;
+  &lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="hyphenate"&gt;false&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="space-after.minimum"&gt;0.4em&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="space-after.optimum"&gt;0.6em&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="space-after.maximum"&gt;0.8em&lt;/xsl:attribute&gt;
+&lt;/xsl:attribute-set&gt;
+</programlisting>
+</refsynopsisdiv>
+<refsect1><title>Description</title>
+<para>Specify how the title should be styled. Specify the font size and weight of the title of the formal object.</para>
+</refsect1>
+</refentry>
+
+<refentry id="informal.object.properties">
+<refnamediv>
+<refname>informal.object.properties</refname>
+<refpurpose>Properties associated with a formal object such as a figure, or other component that has a title</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="informal.object.properties.frag">&lt;xsl:attribute-set name="informal.object.properties"&gt;
+  &lt;xsl:attribute name="space-before.minimum"&gt;0.5em&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="space-before.optimum"&gt;1em&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="space-before.maximum"&gt;2em&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="space-after.minimum"&gt;0.5em&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="space-after.optimum"&gt;1em&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="space-after.maximum"&gt;2em&lt;/xsl:attribute&gt;
+&lt;/xsl:attribute-set&gt;</programlisting>
+</refsynopsisdiv>
+<refsect1><title>Description</title>
+<para>The styling for informal objects in docbook. Specify the spacing before and after the object.</para>
+</refsect1>
+</refentry>
+
+<refentry id="monospace.properties">
+<refmeta>
+<refentrytitle>monospace.properties</refentrytitle>
+<refmiscinfo role="type">attribute set</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>monospace.properties</refname>
+<refpurpose>Properties of monospaced content</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="monospace.properties.frag">
+&lt;xsl:attribute-set name="monospace.properties"&gt;
+  &lt;xsl:attribute name="font-family"&gt;
+    &lt;xsl:value-of select="$monospace.font.family"&gt;&lt;/xsl:value-of&gt;
+  &lt;/xsl:attribute&gt;
+&lt;/xsl:attribute-set&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Specifies the font name for monospaced output. This property set
+used to set the font-size as well, but that doesn't work very well
+when different fonts are used (as they are in titles and paragraphs,
+for example).</para>
+
+<para>If you want to set the font-size in a customization layer, it's
+probably going to be more appropriate to set font-size-adjust, if your
+formatter supports it.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="verbatim.properties">
+<refnamediv>
+<refname>verbatim.properties</refname>
+<refpurpose>Properties associated with verbatim text</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="verbatim.properties.frag">
+&lt;xsl:attribute-set name="verbatim.properties"&gt;
+  &lt;xsl:attribute name="space-before.minimum"&gt;0.8em&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="space-before.optimum"&gt;1em&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="space-before.maximum"&gt;1.2em&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="space-after.minimum"&gt;0.8em&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="space-after.optimum"&gt;1em&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="space-after.maximum"&gt;1.2em&lt;/xsl:attribute&gt;
+&lt;/xsl:attribute-set&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+<para>This attribute set is used on all verbatim environments.</para>
+</refsect1>
+
+</refentry>
+
+<refentry id="monospace.verbatim.properties">
+<refnamediv>
+<refname>monospace.verbatim.properties</refname>
+<refpurpose>What font and size do you want for monospaced content?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="monospace.verbatim.properties.frag">
+&lt;xsl:attribute-set name="monospace.verbatim.properties" use-attribute-sets="verbatim.properties monospace.properties"&gt;
+  &lt;xsl:attribute name="text-align"&gt;start&lt;/xsl:attribute&gt;
+&lt;/xsl:attribute-set&gt;
+</programlisting>
+</refsynopsisdiv>
+<refsect1><title>Description</title>
+<para>Specify the font name and size you want for monospaced output</para>
+</refsect1>
+</refentry>
+
+<refentry id="sidebar.properties">
+<refmeta>
+<refentrytitle>sidebar.properties</refentrytitle>
+<refmiscinfo role="type">attribute set</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>sidebar.properties</refname>
+<refpurpose>Attribute set for sidebar properties</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="sidebar.properties.frag">
+&lt;xsl:attribute-set name="sidebar.properties" use-attribute-sets="formal.object.properties"&gt;
+  &lt;xsl:attribute name="border-style"&gt;solid&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="border-width"&gt;1pt&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="border-color"&gt;black&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="background-color"&gt;#DDDDDD&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="padding-left"&gt;12pt&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="padding-right"&gt;12pt&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="padding-top"&gt;6pt&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="padding-bottom"&gt;6pt&lt;/xsl:attribute&gt;
+&lt;!--
+  &lt;xsl:attribute name="margin-left"&gt;12pt&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="margin-right"&gt;12pt&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="margin-top"&gt;6pt&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="margin-bottom"&gt;6pt&lt;/xsl:attribute&gt;
+--&gt;
+&lt;/xsl:attribute-set&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The styling for sidebars.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="section.title.properties">
+<refmeta>
+<refentrytitle>section.title.properties</refentrytitle>
+<refmiscinfo role="type">attribute set</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>section.title.properties</refname>
+<refpurpose>Properties for section titles</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="section.title.properties.frag">
+&lt;xsl:attribute-set name="section.title.properties"&gt;
+  &lt;xsl:attribute name="font-family"&gt;
+    &lt;xsl:value-of select="$title.font.family"&gt;&lt;/xsl:value-of&gt;
+  &lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="font-weight"&gt;bold&lt;/xsl:attribute&gt;
+  &lt;!-- font size is calculated dynamically by section.heading template --&gt;
+  &lt;xsl:attribute name="keep-with-next.within-column"&gt;always&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="space-before.minimum"&gt;0.8em&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="space-before.optimum"&gt;1.0em&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="space-before.maximum"&gt;1.2em&lt;/xsl:attribute&gt;
+&lt;/xsl:attribute-set&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The properties common to all section titles.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="section.title.level1.properties">
+<refmeta>
+<refentrytitle>section.title.level1.properties</refentrytitle>
+<refmiscinfo role="type">attribute set</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>section.title.level1.properties</refname>
+<refpurpose>Properties for level-1 section titles</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="section.title.level1.properties.frag">
+&lt;xsl:attribute-set name="section.title.level1.properties"&gt;
+  &lt;xsl:attribute name="font-size"&gt;
+    &lt;xsl:value-of select="$body.font.master * 2.0736"&gt;&lt;/xsl:value-of&gt;
+    &lt;xsl:text&gt;pt&lt;/xsl:text&gt;
+  &lt;/xsl:attribute&gt;
+&lt;/xsl:attribute-set&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The properties of level-1 section titles.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="section.title.level2.properties">
+<refmeta>
+<refentrytitle>section.title.level2.properties</refentrytitle>
+<refmiscinfo role="type">attribute set</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>section.title.level2.properties</refname>
+<refpurpose>Properties for level-1 section titles</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="section.title.level2.properties.frag">
+&lt;xsl:attribute-set name="section.title.level2.properties"&gt;
+  &lt;xsl:attribute name="font-size"&gt;
+    &lt;xsl:value-of select="$body.font.master * 1.728"&gt;&lt;/xsl:value-of&gt;
+    &lt;xsl:text&gt;pt&lt;/xsl:text&gt;
+  &lt;/xsl:attribute&gt;
+&lt;/xsl:attribute-set&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The properties of level-2 section titles.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="section.title.level3.properties">
+<refmeta>
+<refentrytitle>section.title.level3.properties</refentrytitle>
+<refmiscinfo role="type">attribute set</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>section.title.level3.properties</refname>
+<refpurpose>Properties for level-1 section titles</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="section.title.level3.properties.frag">
+&lt;xsl:attribute-set name="section.title.level3.properties"&gt;
+  &lt;xsl:attribute name="font-size"&gt;
+    &lt;xsl:value-of select="$body.font.master * 1.44"&gt;&lt;/xsl:value-of&gt;
+    &lt;xsl:text&gt;pt&lt;/xsl:text&gt;
+  &lt;/xsl:attribute&gt;
+&lt;/xsl:attribute-set&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The properties of level-3 section titles.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="section.title.level4.properties">
+<refmeta>
+<refentrytitle>section.title.level4.properties</refentrytitle>
+<refmiscinfo role="type">attribute set</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>section.title.level4.properties</refname>
+<refpurpose>Properties for level-1 section titles</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="section.title.level4.properties.frag">
+&lt;xsl:attribute-set name="section.title.level4.properties"&gt;
+  &lt;xsl:attribute name="font-size"&gt;
+    &lt;xsl:value-of select="$body.font.master * 1.2"&gt;&lt;/xsl:value-of&gt;
+    &lt;xsl:text&gt;pt&lt;/xsl:text&gt;
+  &lt;/xsl:attribute&gt;
+&lt;/xsl:attribute-set&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The properties of level-4 section titles.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="section.title.level5.properties">
+<refmeta>
+<refentrytitle>section.title.level5.properties</refentrytitle>
+<refmiscinfo role="type">attribute set</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>section.title.level5.properties</refname>
+<refpurpose>Properties for level-1 section titles</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="section.title.level5.properties.frag">
+&lt;xsl:attribute-set name="section.title.level5.properties"&gt;
+  &lt;xsl:attribute name="font-size"&gt;
+    &lt;xsl:value-of select="$body.font.master"&gt;&lt;/xsl:value-of&gt;
+    &lt;xsl:text&gt;pt&lt;/xsl:text&gt;
+  &lt;/xsl:attribute&gt;
+&lt;/xsl:attribute-set&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The properties of level-5 section titles.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="section.title.level6.properties">
+<refmeta>
+<refentrytitle>section.title.level6.properties</refentrytitle>
+<refmiscinfo role="type">attribute set</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>section.title.level6.properties</refname>
+<refpurpose>Properties for level-1 section titles</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="section.title.level6.properties.frag">
+&lt;xsl:attribute-set name="section.title.level6.properties"&gt;
+  &lt;xsl:attribute name="font-size"&gt;
+    &lt;xsl:value-of select="$body.font.master"&gt;&lt;/xsl:value-of&gt;
+    &lt;xsl:text&gt;pt&lt;/xsl:text&gt;
+  &lt;/xsl:attribute&gt;
+&lt;/xsl:attribute-set&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The properties of level-6 section titles. This property set is actually
+used for all titles below level 5.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="section.properties">
+<refmeta>
+<refentrytitle>section.properties</refentrytitle>
+<refmiscinfo role="type">attribute set</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>section.properties</refname>
+<refpurpose>Properties for all section levels</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="section.properties.frag">
+&lt;xsl:attribute-set name="section.properties"&gt;
+&lt;/xsl:attribute-set&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The properties that apply to the containing
+block of all section levels, and therefore apply to
+the whole section.  
+This attribute set is inherited by the
+more specific attribute sets such as
+<sgmltag>section.level1.properties</sgmltag>.
+The default is empty.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="section.level1.properties">
+<refmeta>
+<refentrytitle>section.level1.properties</refentrytitle>
+<refmiscinfo role="type">attribute set</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>section.level1.properties</refname>
+<refpurpose>Properties for level-1 sections</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="section.level1.properties.frag">
+&lt;xsl:attribute-set name="section.level1.properties" use-attribute-sets="section.properties"&gt;
+&lt;/xsl:attribute-set&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The properties that apply to the containing
+block of a level-1 section, and therefore apply to
+the whole section.  This includes <sgmltag>sect1</sgmltag>
+elements and <sgmltag>section</sgmltag> elements at level 1.
+</para>
+
+<para>For example, you could start each level-1 section on
+a new page by using:</para>
+<programlisting format="linespecific">&lt;xsl:attribute-set name="section.level1.properties"&gt;
+  &lt;xsl:attribute name="break-before"&gt;page&lt;/xsl:attribute&gt;
+&lt;/xsl:attribute-set&gt;
+</programlisting>
+
+<para>This attribute set inherits attributes from the
+general <sgmltag>section.properties</sgmltag> attribute set.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="section.level2.properties">
+<refmeta>
+<refentrytitle>section.level2.properties</refentrytitle>
+<refmiscinfo role="type">attribute set</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>section.level2.properties</refname>
+<refpurpose>Properties for level-2 sections</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="section.level2.properties.frag">
+&lt;xsl:attribute-set name="section.level2.properties" use-attribute-sets="section.properties"&gt;
+&lt;/xsl:attribute-set&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The properties that apply to the containing
+block of a level-2 section, and therefore apply to
+the whole section.  This includes <sgmltag>sect2</sgmltag>
+elements and <sgmltag>section</sgmltag> elements at level 2.
+</para>
+
+<para>For example, you could start each level-2 section on
+a new page by using:</para>
+<programlisting format="linespecific">&lt;xsl:attribute-set name="section.level2.properties"&gt;
+  &lt;xsl:attribute name="break-before"&gt;page&lt;/xsl:attribute&gt;
+&lt;/xsl:attribute-set&gt;
+</programlisting>
+
+<para>This attribute set inherits attributes from the
+general <sgmltag>section.properties</sgmltag> attribute set.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="section.level3.properties">
+<refmeta>
+<refentrytitle>section.level3.properties</refentrytitle>
+<refmiscinfo role="type">attribute set</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>section.level3.properties</refname>
+<refpurpose>Properties for level-3 sections</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="section.level3.properties.frag">
+&lt;xsl:attribute-set name="section.level3.properties" use-attribute-sets="section.properties"&gt;
+&lt;/xsl:attribute-set&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The properties that apply to the containing
+block of a level-3 section, and therefore apply to
+the whole section.  This includes <sgmltag>sect3</sgmltag>
+elements and <sgmltag>section</sgmltag> elements at level 3.
+</para>
+
+<para>For example, you could start each level-3 section on
+a new page by using:</para>
+<programlisting format="linespecific">&lt;xsl:attribute-set name="section.level3.properties"&gt;
+  &lt;xsl:attribute name="break-before"&gt;page&lt;/xsl:attribute&gt;
+&lt;/xsl:attribute-set&gt;
+</programlisting>
+
+<para>This attribute set inherits attributes from the
+general <sgmltag>section.properties</sgmltag> attribute set.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="section.level4.properties">
+<refmeta>
+<refentrytitle>section.level4.properties</refentrytitle>
+<refmiscinfo role="type">attribute set</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>section.level4.properties</refname>
+<refpurpose>Properties for level-4 sections</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="section.level4.properties.frag">
+&lt;xsl:attribute-set name="section.level4.properties" use-attribute-sets="section.properties"&gt;
+&lt;/xsl:attribute-set&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The properties that apply to the containing
+block of a level-4 section, and therefore apply to
+the whole section.  This includes <sgmltag>sect4</sgmltag>
+elements and <sgmltag>section</sgmltag> elements at level 4.
+</para>
+
+<para>For example, you could start each level-4 section on
+a new page by using:</para>
+<programlisting format="linespecific">&lt;xsl:attribute-set name="section.level4.properties"&gt;
+  &lt;xsl:attribute name="break-before"&gt;page&lt;/xsl:attribute&gt;
+&lt;/xsl:attribute-set&gt;
+</programlisting>
+
+<para>This attribute set inherits attributes from the
+general <sgmltag>section.properties</sgmltag> attribute set.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="section.level5.properties">
+<refmeta>
+<refentrytitle>section.level5.properties</refentrytitle>
+<refmiscinfo role="type">attribute set</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>section.level5.properties</refname>
+<refpurpose>Properties for level-5 sections</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="section.level5.properties.frag">
+&lt;xsl:attribute-set name="section.level5.properties" use-attribute-sets="section.properties"&gt;
+&lt;/xsl:attribute-set&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The properties that apply to the containing
+block of a level-5 section, and therefore apply to
+the whole section.  This includes <sgmltag>sect5</sgmltag>
+elements and <sgmltag>section</sgmltag> elements at level 5.
+</para>
+
+<para>For example, you could start each level-5 section on
+a new page by using:</para>
+<programlisting format="linespecific">&lt;xsl:attribute-set name="section.level5.properties"&gt;
+  &lt;xsl:attribute name="break-before"&gt;page&lt;/xsl:attribute&gt;
+&lt;/xsl:attribute-set&gt;
+</programlisting>
+
+<para>This attribute set inherits attributes from the
+general <sgmltag>section.properties</sgmltag> attribute set.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="section.level6.properties">
+<refmeta>
+<refentrytitle>section.level6.properties</refentrytitle>
+<refmiscinfo role="type">attribute set</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>section.level6.properties</refname>
+<refpurpose>Properties for level-6 sections</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="section.level6.properties.frag">
+&lt;xsl:attribute-set name="section.level6.properties" use-attribute-sets="section.properties"&gt;
+&lt;/xsl:attribute-set&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The properties that apply to the containing
+block of a level 6 or lower section, and therefore apply to
+the whole section.  This includes 
+<sgmltag>section</sgmltag> elements at level 6 and lower.
+</para>
+
+<para>For example, you could start each level-6 section on
+a new page by using:</para>
+<programlisting format="linespecific">&lt;xsl:attribute-set name="section.level6.properties"&gt;
+  &lt;xsl:attribute name="break-before"&gt;page&lt;/xsl:attribute&gt;
+&lt;/xsl:attribute-set&gt;
+</programlisting>
+
+<para>This attribute set inherits attributes from the
+general <sgmltag>section.properties</sgmltag> attribute set.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="figure.properties">
+<refnamediv>
+<refname>figure.properties</refname>
+<refpurpose>Properties associated with a figure</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="figure.properties.frag">
+&lt;xsl:attribute-set name="figure.properties" use-attribute-sets="formal.object.properties"&gt;&lt;/xsl:attribute-set&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The styling for figures.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="example.properties">
+<refnamediv>
+<refname>example.properties</refname>
+<refpurpose>Properties associated with a example</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="example.properties.frag">
+&lt;xsl:attribute-set name="example.properties" use-attribute-sets="formal.object.properties"&gt;&lt;/xsl:attribute-set&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The styling for examples.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="equation.properties">
+<refnamediv>
+<refname>equation.properties</refname>
+<refpurpose>Properties associated with a equation</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="equation.properties.frag">
+&lt;xsl:attribute-set name="equation.properties" use-attribute-sets="formal.object.properties"&gt;&lt;/xsl:attribute-set&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The styling for equations.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="table.properties">
+<refnamediv>
+<refname>table.properties</refname>
+<refpurpose>Properties associated with the block surrounding a table</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="table.properties.frag">
+&lt;xsl:attribute-set name="table.properties" use-attribute-sets="formal.object.properties"&gt;&lt;/xsl:attribute-set&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Block styling properties for tables. This parameter should really
+have been called <literal moreinfo="none">table.block.properties</literal> or something
+like that, but we’re leaving it to avoid backwards-compatibility
+problems.</para>
+
+<para>See also <parameter moreinfo="none">table.table.properties</parameter>.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="procedure.properties">
+<refnamediv>
+<refname>procedure.properties</refname>
+<refpurpose>Properties associated with a procedure</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="procedure.properties.frag">
+&lt;xsl:attribute-set name="procedure.properties" use-attribute-sets="formal.object.properties"&gt;&lt;/xsl:attribute-set&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The styling for procedures.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="root.properties">
+<refmeta>
+<refentrytitle>root.properties</refentrytitle>
+<refmiscinfo role="type">attribute set</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>root.properties</refname>
+<refpurpose>The properties of the fo:root element</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="root.properties.frag">
+&lt;xsl:attribute-set name="root.properties"&gt;
+  &lt;xsl:attribute name="font-family"&gt;
+    &lt;xsl:value-of select="$body.fontset"&gt;&lt;/xsl:value-of&gt;
+  &lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="font-size"&gt;
+    &lt;xsl:value-of select="$body.font.size"&gt;&lt;/xsl:value-of&gt;
+  &lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="text-align"&gt;
+    &lt;xsl:value-of select="$alignment"&gt;&lt;/xsl:value-of&gt;
+  &lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="line-height"&gt;
+    &lt;xsl:value-of select="$line-height"&gt;&lt;/xsl:value-of&gt;
+  &lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="font-selection-strategy"&gt;character-by-character&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="line-height-shift-adjustment"&gt;disregard-shifts&lt;/xsl:attribute&gt;
+&lt;/xsl:attribute-set&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This property set is used on the <sgmltag>fo:root</sgmltag> element of
+an FO file. It defines a set of default, global parameters.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="qanda.title.properties">
+<refmeta>
+<refentrytitle>qanda.title.properties</refentrytitle>
+<refmiscinfo role="type">attribute set</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>qanda.title.properties</refname>
+<refpurpose>Properties for qanda set titles</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="qanda.title.properties.frag">
+&lt;xsl:attribute-set name="qanda.title.properties"&gt;
+  &lt;xsl:attribute name="font-family"&gt;
+    &lt;xsl:value-of select="$title.font.family"&gt;&lt;/xsl:value-of&gt;
+  &lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="font-weight"&gt;bold&lt;/xsl:attribute&gt;
+  &lt;!-- font size is calculated dynamically by qanda.heading template --&gt;
+  &lt;xsl:attribute name="keep-with-next.within-column"&gt;always&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="space-before.minimum"&gt;0.8em&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="space-before.optimum"&gt;1.0em&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="space-before.maximum"&gt;1.2em&lt;/xsl:attribute&gt;
+&lt;/xsl:attribute-set&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The properties common to all qanda set titles.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="qanda.title.level1.properties">
+<refmeta>
+<refentrytitle>qanda.title.level1.properties</refentrytitle>
+<refmiscinfo role="type">attribute set</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>qanda.title.level1.properties</refname>
+<refpurpose>Properties for level-1 qanda set titles</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="qanda.title.level1.properties.frag">
+&lt;xsl:attribute-set name="qanda.title.level1.properties"&gt;
+  &lt;xsl:attribute name="font-size"&gt;
+    &lt;xsl:value-of select="$body.font.master * 2.0736"&gt;&lt;/xsl:value-of&gt;
+    &lt;xsl:text&gt;pt&lt;/xsl:text&gt;
+  &lt;/xsl:attribute&gt;
+&lt;/xsl:attribute-set&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The properties of level-1 qanda set titles.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="qanda.title.level2.properties">
+<refmeta>
+<refentrytitle>qanda.title.level2.properties</refentrytitle>
+<refmiscinfo role="type">attribute set</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>qanda.title.level2.properties</refname>
+<refpurpose>Properties for level-2 qanda set titles</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="qanda.title.level2.properties.frag">
+&lt;xsl:attribute-set name="qanda.title.level2.properties"&gt;
+  &lt;xsl:attribute name="font-size"&gt;
+    &lt;xsl:value-of select="$body.font.master * 1.728"&gt;&lt;/xsl:value-of&gt;
+    &lt;xsl:text&gt;pt&lt;/xsl:text&gt;
+  &lt;/xsl:attribute&gt;
+&lt;/xsl:attribute-set&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The properties of level-2 qanda set titles.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="qanda.title.level3.properties">
+<refmeta>
+<refentrytitle>qanda.title.level3.properties</refentrytitle>
+<refmiscinfo role="type">attribute set</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>qanda.title.level3.properties</refname>
+<refpurpose>Properties for level-3 qanda set titles</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="qanda.title.level3.properties.frag">
+&lt;xsl:attribute-set name="qanda.title.level3.properties"&gt;
+  &lt;xsl:attribute name="font-size"&gt;
+    &lt;xsl:value-of select="$body.font.master * 1.44"&gt;&lt;/xsl:value-of&gt;
+    &lt;xsl:text&gt;pt&lt;/xsl:text&gt;
+  &lt;/xsl:attribute&gt;
+&lt;/xsl:attribute-set&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The properties of level-3 qanda set titles.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="qanda.title.level4.properties">
+<refmeta>
+<refentrytitle>qanda.title.level4.properties</refentrytitle>
+<refmiscinfo role="type">attribute set</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>qanda.title.level4.properties</refname>
+<refpurpose>Properties for level-4 qanda set titles</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="qanda.title.level4.properties.frag">
+&lt;xsl:attribute-set name="qanda.title.level4.properties"&gt;
+  &lt;xsl:attribute name="font-size"&gt;
+    &lt;xsl:value-of select="$body.font.master * 1.2"&gt;&lt;/xsl:value-of&gt;
+    &lt;xsl:text&gt;pt&lt;/xsl:text&gt;
+  &lt;/xsl:attribute&gt;
+&lt;/xsl:attribute-set&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The properties of level-4 qanda set titles.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="qanda.title.level5.properties">
+<refmeta>
+<refentrytitle>qanda.title.level5.properties</refentrytitle>
+<refmiscinfo role="type">attribute set</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>qanda.title.level5.properties</refname>
+<refpurpose>Properties for level-5 qanda set titles</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="qanda.title.level5.properties.frag">
+&lt;xsl:attribute-set name="qanda.title.level5.properties"&gt;
+  &lt;xsl:attribute name="font-size"&gt;
+    &lt;xsl:value-of select="$body.font.master"&gt;&lt;/xsl:value-of&gt;
+    &lt;xsl:text&gt;pt&lt;/xsl:text&gt;
+  &lt;/xsl:attribute&gt;
+&lt;/xsl:attribute-set&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The properties of level-5 qanda set titles.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="qanda.title.level6.properties">
+<refmeta>
+<refentrytitle>qanda.title.level6.properties</refentrytitle>
+<refmiscinfo role="type">attribute set</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>qanda.title.level6.properties</refname>
+<refpurpose>Properties for level-6 qanda set titles</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="qanda.title.level6.properties.frag">
+&lt;xsl:attribute-set name="qanda.title.level6.properties"&gt;
+  &lt;xsl:attribute name="font-size"&gt;
+    &lt;xsl:value-of select="$body.font.master"&gt;&lt;/xsl:value-of&gt;
+    &lt;xsl:text&gt;pt&lt;/xsl:text&gt;
+  &lt;/xsl:attribute&gt;
+&lt;/xsl:attribute-set&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The properties of level-6 qanda set titles.
+This property set is actually
+used for all titles below level 5.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="article.appendix.title.properties">
+<refmeta>
+<refentrytitle>article.appendix.title.properties</refentrytitle>
+<refmiscinfo role="type">attribute set</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>article.appendix.title.properties</refname>
+<refpurpose>Properties for appendix titles that appear in an article</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="article.appendix.title.properties.frag">
+&lt;xsl:attribute-set name="article.appendix.title.properties" use-attribute-sets="section.title.properties                          section.title.level1.properties"&gt;
+  &lt;xsl:attribute name="margin-left"&gt;
+    &lt;xsl:value-of select="$title.margin.left"&gt;&lt;/xsl:value-of&gt;
+  &lt;/xsl:attribute&gt;
+&lt;/xsl:attribute-set&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The properties for the title of an appendix that
+appears inside an article.  The default is to use
+the properties of sect1 titles.</para>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+<reference><title>Profiling</title>
+<partintro>
+<para>Following parameters can be used for attribute value based
+profiling of your document. For more info about profiling look at
+<ulink url="http://docbook.sourceforge.net/projects/xsl/doc/tools/profiling.html">http://docbook.sourceforge.net/projects/xsl/doc/tools/profiling.html</ulink>.</para>
+</partintro>
+<refentry id="profile.arch">
+<refmeta>
+<refentrytitle>profile.arch</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>profile.arch</refname>
+<refpurpose>Target profile for <sgmltag class="attribute">arch</sgmltag>
+attribute</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="profile.arch.frag">
+&lt;xsl:param name="profile.arch" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Value of this parameter specifies profiles which should be
+included in the output. You can specify multiple profiles by
+separating them by semicolon. You can change separator character by
+<link linkend="profile.separator"><parameter moreinfo="none">profile.separator</parameter></link>
+parameter.</para>
+
+<para>This parameter has effect only when you are using profiling
+stylesheets (<filename moreinfo="none">profile-docbook.xsl</filename>,
+<filename moreinfo="none">profile-chunk.xsl</filename>, …) instead of normal
+ones (<filename moreinfo="none">docbook.xsl</filename>,
+<filename moreinfo="none">chunk.xsl</filename>, …).</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="profile.condition">
+<refmeta>
+<refentrytitle>profile.condition</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>profile.condition</refname>
+<refpurpose>Target profile for <sgmltag class="attribute">condition</sgmltag>
+attribute</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="profile.condition.frag">
+&lt;xsl:param name="profile.condition" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Value of this parameter specifies profiles which should be
+included in the output. You can specify multiple profiles by
+separating them by semicolon. You can change separator character by
+<link linkend="profile.separator"><parameter moreinfo="none">profile.separator</parameter></link>
+parameter.</para>
+
+<para>This parameter has effect only when you are using profiling
+stylesheets (<filename moreinfo="none">profile-docbook.xsl</filename>,
+<filename moreinfo="none">profile-chunk.xsl</filename>, …) instead of normal
+ones (<filename moreinfo="none">docbook.xsl</filename>,
+<filename moreinfo="none">chunk.xsl</filename>, …).</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="profile.conformance">
+<refmeta>
+<refentrytitle>profile.conformance</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>profile.conformance</refname>
+<refpurpose>Target profile for <sgmltag class="attribute">conformance</sgmltag>
+attribute</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="profile.conformance.frag">
+&lt;xsl:param name="profile.conformance" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Value of this parameter specifies profiles which should be
+included in the output. You can specify multiple profiles by
+separating them by semicolon. You can change separator character by
+<link linkend="profile.separator"><parameter moreinfo="none">profile.separator</parameter></link>
+parameter.</para>
+
+<para>This parameter has effect only when you are using profiling
+stylesheets (<filename moreinfo="none">profile-docbook.xsl</filename>,
+<filename moreinfo="none">profile-chunk.xsl</filename>, …) instead of normal
+ones (<filename moreinfo="none">docbook.xsl</filename>,
+<filename moreinfo="none">chunk.xsl</filename>, …).</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="profile.lang">
+<refmeta>
+<refentrytitle>profile.lang</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>profile.lang</refname>
+<refpurpose>Target profile for <sgmltag class="attribute">lang</sgmltag>
+attribute</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="profile.lang.frag">
+&lt;xsl:param name="profile.lang" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Value of this parameter specifies profiles which should be
+included in the output. You can specify multiple profiles by
+separating them by semicolon. You can change separator character by
+<link linkend="profile.separator"><parameter moreinfo="none">profile.separator</parameter></link>
+parameter.</para>
+
+<para>This parameter has effect only when you are using profiling
+stylesheets (<filename moreinfo="none">profile-docbook.xsl</filename>,
+<filename moreinfo="none">profile-chunk.xsl</filename>, …) instead of normal
+ones (<filename moreinfo="none">docbook.xsl</filename>,
+<filename moreinfo="none">chunk.xsl</filename>, …).</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="profile.os">
+<refmeta>
+<refentrytitle>profile.os</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>profile.os</refname>
+<refpurpose>Target profile for <sgmltag class="attribute">os</sgmltag>
+attribute</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="profile.os.frag">
+&lt;xsl:param name="profile.os" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Value of this parameter specifies profiles which should be
+included in the output. You can specify multiple profiles by
+separating them by semicolon. You can change separator character by
+<link linkend="profile.separator"><parameter moreinfo="none">profile.separator</parameter></link>
+parameter.</para>
+
+<para>This parameter has effect only when you are using profiling
+stylesheets (<filename moreinfo="none">profile-docbook.xsl</filename>,
+<filename moreinfo="none">profile-chunk.xsl</filename>, …) instead of normal
+ones (<filename moreinfo="none">docbook.xsl</filename>,
+<filename moreinfo="none">chunk.xsl</filename>, …).</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="profile.revision">
+<refmeta>
+<refentrytitle>profile.revision</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>profile.revision</refname>
+<refpurpose>Target profile for <sgmltag class="attribute">revision</sgmltag>
+attribute</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="profile.revision.frag">
+&lt;xsl:param name="profile.revision" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Value of this parameter specifies profiles which should be
+included in the output. You can specify multiple profiles by
+separating them by semicolon. You can change separator character by
+<link linkend="profile.separator"><parameter moreinfo="none">profile.separator</parameter></link>
+parameter.</para>
+
+<para>This parameter has effect only when you are using profiling
+stylesheets (<filename moreinfo="none">profile-docbook.xsl</filename>,
+<filename moreinfo="none">profile-chunk.xsl</filename>, …) instead of normal
+ones (<filename moreinfo="none">docbook.xsl</filename>,
+<filename moreinfo="none">chunk.xsl</filename>, …).</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="profile.revisionflag">
+<refmeta>
+<refentrytitle>profile.revisionflag</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>profile.revisionflag</refname>
+<refpurpose>Target profile for <sgmltag class="attribute">revisionflag</sgmltag>
+attribute</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="profile.revisionflag.frag">
+&lt;xsl:param name="profile.revisionflag" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Value of this parameter specifies profiles which should be
+included in the output. You can specify multiple profiles by
+separating them by semicolon. You can change separator character by
+<link linkend="profile.separator"><parameter moreinfo="none">profile.separator</parameter></link>
+parameter.</para>
+
+<para>This parameter has effect only when you are using profiling
+stylesheets (<filename moreinfo="none">profile-docbook.xsl</filename>,
+<filename moreinfo="none">profile-chunk.xsl</filename>, …) instead of normal
+ones (<filename moreinfo="none">docbook.xsl</filename>,
+<filename moreinfo="none">chunk.xsl</filename>, …).</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="profile.role">
+<refmeta>
+<refentrytitle>profile.role</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>profile.role</refname>
+<refpurpose>Target profile for <sgmltag class="attribute">role</sgmltag>
+attribute</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="profile.role.frag">
+&lt;xsl:param name="profile.role" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Value of this parameter specifies profiles which should be
+included in the output. You can specify multiple profiles by
+separating them by semicolon. You can change separator character by
+<link linkend="profile.separator"><parameter moreinfo="none">profile.separator</parameter></link>
+parameter.</para>
+
+<para>This parameter has effect only when you are using profiling
+stylesheets (<filename moreinfo="none">profile-docbook.xsl</filename>,
+<filename moreinfo="none">profile-chunk.xsl</filename>, …) instead of normal
+ones (<filename moreinfo="none">docbook.xsl</filename>,
+<filename moreinfo="none">chunk.xsl</filename>, …).</para>
+
+<warning>
+<para>Note that <sgmltag class="attribute">role</sgmltag> is often
+used for other purposes than profiling. For example it is commonly
+used to get emphasize in bold font:</para>
+
+<programlisting format="linespecific">&lt;emphasis role="bold"&gt;very important&lt;/emphasis&gt;</programlisting>
+
+<para>If you are using <sgmltag class="attribute">role</sgmltag> for
+these purposes do not forget to add values like <literal moreinfo="none">bold</literal> to
+value of this parameter. If you forgot you will get document with
+small pieces missing which are very hard to track.</para>
+
+<para>For this reason it is not recommended to use <sgmltag class="attribute">role</sgmltag> attribute for profiling. You should
+rather use profiling specific attributes like <sgmltag class="attribute">userlevel</sgmltag>, <sgmltag class="attribute">os</sgmltag>, <sgmltag class="attribute">arch</sgmltag>, <sgmltag class="attribute">condition</sgmltag>, etc.</para>
+</warning>
+
+</refsect1>
+</refentry>
+
+<refentry id="profile.security">
+<refmeta>
+<refentrytitle>profile.security</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>profile.security</refname>
+<refpurpose>Target profile for <sgmltag class="attribute">security</sgmltag>
+attribute</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="profile.security.frag">
+&lt;xsl:param name="profile.security" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Value of this parameter specifies profiles which should be
+included in the output. You can specify multiple profiles by
+separating them by semicolon. You can change separator character by
+<link linkend="profile.separator"><parameter moreinfo="none">profile.separator</parameter></link>
+parameter.</para>
+
+<para>This parameter has effect only when you are using profiling
+stylesheets (<filename moreinfo="none">profile-docbook.xsl</filename>,
+<filename moreinfo="none">profile-chunk.xsl</filename>, …) instead of normal
+ones (<filename moreinfo="none">docbook.xsl</filename>,
+<filename moreinfo="none">chunk.xsl</filename>, …).</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="profile.userlevel">
+<refmeta>
+<refentrytitle>profile.userlevel</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>profile.userlevel</refname>
+<refpurpose>Target profile for <sgmltag class="attribute">userlevel</sgmltag>
+attribute</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="profile.userlevel.frag">
+&lt;xsl:param name="profile.userlevel" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Value of this parameter specifies profiles which should be
+included in the output. You can specify multiple profiles by
+separating them by semicolon. You can change separator character by
+<link linkend="profile.separator"><parameter moreinfo="none">profile.separator</parameter></link>
+parameter.</para>
+
+<para>This parameter has effect only when you are using profiling
+stylesheets (<filename moreinfo="none">profile-docbook.xsl</filename>,
+<filename moreinfo="none">profile-chunk.xsl</filename>, …) instead of normal
+ones (<filename moreinfo="none">docbook.xsl</filename>,
+<filename moreinfo="none">chunk.xsl</filename>, …).</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="profile.vendor">
+<refmeta>
+<refentrytitle>profile.vendor</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>profile.vendor</refname>
+<refpurpose>Target profile for <sgmltag class="attribute">vendor</sgmltag>
+attribute</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="profile.vendor.frag">
+&lt;xsl:param name="profile.vendor" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Value of this parameter specifies profiles which should be
+included in the output. You can specify multiple profiles by
+separating them by semicolon. You can change separator character by
+<link linkend="profile.separator"><parameter moreinfo="none">profile.separator</parameter></link>
+parameter.</para>
+
+<para>This parameter has effect only when you are using profiling
+stylesheets (<filename moreinfo="none">profile-docbook.xsl</filename>,
+<filename moreinfo="none">profile-chunk.xsl</filename>, …) instead of normal
+ones (<filename moreinfo="none">docbook.xsl</filename>,
+<filename moreinfo="none">chunk.xsl</filename>, …).</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="profile.attribute">
+<refmeta>
+<refentrytitle>profile.attribute</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>profile.attribute</refname>
+<refpurpose>Name of user-specified profiling attribute</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="profile.attribute.frag">
+&lt;xsl:param name="profile.attribute" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This parameter is used in conjuction with <link linkend="profile.value"><parameter moreinfo="none">profile.value</parameter></link>.</para>
+
+<para>This parameter has effect only when you are using profiling
+stylesheets (<filename moreinfo="none">profile-docbook.xsl</filename>,
+<filename moreinfo="none">profile-chunk.xsl</filename>, …) instead of normal
+ones (<filename moreinfo="none">docbook.xsl</filename>,
+<filename moreinfo="none">chunk.xsl</filename>, …).</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="profile.value">
+<refmeta>
+<refentrytitle>profile.value</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>profile.value</refname>
+<refpurpose>Target profile for user-specified attribute</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="profile.value.frag">
+&lt;xsl:param name="profile.value" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>When you are using this parameter you must also specify name of
+profiling attribute with parameter <link linkend="profile.attribute"><parameter moreinfo="none">profile.attribute</parameter></link>.</para>
+
+<para>Value of this parameter specifies profiles which should be
+included in the output. You can specify multiple profiles by
+separating them by semicolon. You can change separator character by
+<link linkend="profile.separator"><parameter moreinfo="none">profile.separator</parameter></link>
+parameter.</para>
+
+<para>This parameter has effect only when you are using profiling
+stylesheets (<filename moreinfo="none">profile-docbook.xsl</filename>,
+<filename moreinfo="none">profile-chunk.xsl</filename>, …) instead of normal
+ones (<filename moreinfo="none">docbook.xsl</filename>,
+<filename moreinfo="none">chunk.xsl</filename>, …).</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="profile.separator">
+<refmeta>
+<refentrytitle>profile.separator</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>profile.separator</refname>
+<refpurpose>Separator character for compound profile values</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="profile.separator.frag">
+&lt;xsl:param name="profile.separator" select="';'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Separator character for compound profile values.</para>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+<reference><title>Localization</title>
+<refentry id="l10n.gentext.language">
+<refmeta>
+<refentrytitle>l10n.gentext.language</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>l10n.gentext.language</refname>
+<refpurpose>Sets the gentext language</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="l10n.gentext.language.frag">
+&lt;xsl:param name="l10n.gentext.language" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If this parameter is set to any value other than the empty string, its
+value will be used as the value for the language when generating text. Setting
+<parameter moreinfo="none">l10n.gentext.language</parameter> overrides any settings within the
+document being formatted.</para>
+
+<para>It's much more likely that you might want to set the
+<parameter moreinfo="none">l10n.gentext.default.language</parameter> parameter.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="l10n.gentext.default.language">
+<refmeta>
+<refentrytitle>l10n.gentext.default.language</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>l10n.gentext.default.language</refname>
+<refpurpose>Sets the default language for generated text</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="l10n.gentext.default.language.frag">
+&lt;xsl:param name="l10n.gentext.default.language" select="'en'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The value of the <parameter moreinfo="none">l10n.gentext.default.language</parameter>
+parameter is used as the language for generated text if no setting is provided
+in the source document.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="l10n.gentext.use.xref.language">
+<refmeta>
+<refentrytitle>l10n.gentext.use.xref.language</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>l10n.gentext.use.xref.language</refname>
+<refpurpose>Use the language of target when generating cross-reference text?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="l10n.gentext.use.xref.language.frag">
+&lt;xsl:param name="l10n.gentext.use.xref.language" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, the language of the target will be used when
+generating cross reference text. Usually, the <quote>current</quote>
+language is used when generating text (that is, the language of the
+element that contains the cross-reference element). But setting this parameter
+allows the language of the element <emphasis>pointed to</emphasis> to control
+the generated text.</para>
+
+<para>Consider the following example:</para>
+
+<informalexample>
+<programlisting format="linespecific">&lt;para lang="en"&gt;See also &lt;xref linkend="chap3"/&gt;.&lt;/para&gt;
+</programlisting>
+</informalexample>
+
+<para>Suppose that Chapter 3 happens to be written in German.
+If <parameter moreinfo="none">l10n.gentext.use.xref.language</parameter> is non-zero, the
+resulting text will be something like this:</para>
+
+<blockquote>
+<para>See also Kapital 3.</para>
+</blockquote>
+
+<para>Where the more traditional rendering would be:</para>
+
+<blockquote>
+<para>See also Chapter 3.</para>
+</blockquote>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+<reference><title>EBNF</title>
+<refentry id="ebnf.assignment">
+<refmeta>
+<refentrytitle>ebnf.assignment</refentrytitle>
+<refmiscinfo role="type">rtf</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>ebnf.assignment</refname>
+<refpurpose>The EBNF production assignment operator</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="ebnf.assignment.frag">
+
+&lt;xsl:param name="ebnf.assignment"&gt;
+  &lt;fo:inline font-family="{$monospace.font.family}"&gt;
+    &lt;xsl:text&gt;::=&lt;/xsl:text&gt;
+  &lt;/fo:inline&gt;
+&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The <parameter moreinfo="none">ebnf.assignment</parameter> parameter determines what
+text is used to show <quote>assignment</quote> in <sgmltag>production</sgmltag>s
+in <sgmltag>productionset</sgmltag>s.</para>
+
+<para>While <quote><literal moreinfo="none">::=</literal></quote> is common, so are several
+other operators.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="ebnf.statement.terminator">
+<refmeta>
+<refentrytitle>ebnf.statement.terminator</refentrytitle>
+<refmiscinfo role="type">rtf</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>ebnf.statement.terminator</refname>
+<refpurpose>Punctuation that ends an EBNF statement.</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="ebnf.statement.terminator.frag">
+
+&lt;xsl:param name="ebnf.statement.terminator"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The <parameter moreinfo="none">ebnf.statement.terminator</parameter> parameter determines what
+text is used to terminate each <sgmltag>production</sgmltag>
+in <sgmltag>productionset</sgmltag>.</para>
+
+<para>Some notations end each statement with a period.</para>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+
+
+<appendix><title>The Stylesheet</title>
+
+<para>The <filename moreinfo="none">param.xsl</filename> stylesheet is just a wrapper
+around all these parameters.</para>
+
+<programlisting id="top">
+&lt;xsl:stylesheet exclude-result-prefixes="src" version="1.0"&gt;
+
+&lt;!-- This file is generated from param.xweb; do not edit this file! --&gt;
+
+&lt;!-- ********************************************************************
+     $Id: param.xml,v 1.1.1.1 2004/10/19 21:21:44 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** --&gt;
+
+&lt;src:fragref linkend="admon.graphics.extension.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="admon.graphics.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="admon.graphics.path.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="admon.textlabel.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="admonition.properties.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="admonition.title.properties.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="alignment.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="appendix.autolabel.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="arbortext.extensions.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="article.appendix.title.properties.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="author.othername.in.middle.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="autotoc.label.separator.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="axf.extensions.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="biblioentry.item.separator.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="bibliography.collection.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="bibliography.numbered.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="blockquote.properties.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="body.font.family.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="body.font.master.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="body.font.size.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="body.margin.bottom.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="body.margin.top.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="bridgehead.in.toc.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="callout.defaultcolumn.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="callout.graphics.extension.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="callout.graphics.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="callout.graphics.number.limit.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="callout.graphics.path.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="callout.unicode.font.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="callout.unicode.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="callout.unicode.number.limit.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="callout.unicode.start.character.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="callouts.extension.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="chapter.autolabel.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="column.count.back.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="column.count.body.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="column.count.front.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="column.count.index.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="column.count.lot.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="column.count.titlepage.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="column.gap.back.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="column.gap.body.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="column.gap.front.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="column.gap.index.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="column.gap.lot.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="column.gap.titlepage.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="compact.list.item.spacing.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="current.docid.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="default.float.class.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="default.image.width.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="default.table.width.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="default.units.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="dingbat.font.family.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="double.sided.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="draft.mode.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="draft.watermark.image.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="ebnf.assignment.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="ebnf.statement.terminator.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="equation.properties.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="example.properties.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="figure.properties.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="firstterm.only.link.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="footer.content.properties.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="footer.rule.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="footer.column.widths.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="footers.on.blank.pages.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="footnote.font.size.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="footnote.number.format.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="footnote.number.symbols.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="fop.extensions.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="formal.object.properties.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="formal.procedures.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="formal.title.placement.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="formal.title.properties.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="funcsynopsis.decoration.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="funcsynopsis.style.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="function.parens.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="generate.index.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="generate.section.toc.level.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="generate.toc.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="glossary.as.blocks.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="glossary.collection.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="glossentry.show.acronym.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="glosslist.as.blocks.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="glossterm.auto.link.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="glossterm.separation.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="glossterm.width.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="graphic.default.extension.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="header.content.properties.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="header.rule.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="header.column.widths.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="headers.on.blank.pages.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="hyphenate.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="ignore.image.scaling.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="informal.object.properties.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="index.preferred.page.properties.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="insert.xref.page.number.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="l10n.gentext.default.language.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="l10n.gentext.language.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="l10n.gentext.use.xref.language.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="label.from.part.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="line-height.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="linenumbering.everyNth.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="linenumbering.extension.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="linenumbering.separator.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="linenumbering.width.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="list.block.spacing.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="list.item.spacing.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="make.index.markup.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="make.single.year.ranges.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="make.year.ranges.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="marker.section.level.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="menuchoice.menu.separator.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="menuchoice.separator.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="monospace.font.family.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="monospace.properties.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="monospace.verbatim.properties.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="nominal.table.width.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="normal.para.spacing.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="olink.doctitle.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="page.height.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="page.height.portrait.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="page.margin.bottom.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="page.margin.inner.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="page.margin.outer.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="page.margin.top.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="page.orientation.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="page.width.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="page.width.portrait.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="paper.type.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="part.autolabel.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="passivetex.extensions.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="preface.autolabel.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="preferred.mediaobject.role.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="procedure.properties.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="process.empty.source.toc.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="process.source.toc.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="profile.arch.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="profile.attribute.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="profile.condition.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="profile.conformance.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="profile.lang.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="profile.os.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="profile.revision.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="profile.revisionflag.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="profile.role.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="profile.security.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="profile.separator.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="profile.userlevel.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="profile.value.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="profile.vendor.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="punct.honorific.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="qanda.defaultlabel.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="qanda.inherit.numeration.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="qandadiv.autolabel.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="qanda.title.level1.properties.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="qanda.title.level2.properties.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="qanda.title.level3.properties.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="qanda.title.level4.properties.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="qanda.title.level5.properties.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="qanda.title.level6.properties.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="qanda.title.properties.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="refentry.generate.name.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="refentry.generate.title.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="refentry.pagebreak.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="refentry.title.properties.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="refentry.xref.manvolnum.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="region.after.extent.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="region.before.extent.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="root.properties.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="rootid.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="runinhead.default.title.end.punct.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="runinhead.title.end.punct.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="sans.font.family.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="section.autolabel.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="section.label.includes.component.label.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="section.title.level1.properties.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="section.title.level2.properties.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="section.title.level3.properties.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="section.title.level4.properties.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="section.title.level5.properties.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="section.title.level6.properties.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="section.title.properties.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="section.level1.properties.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="section.level2.properties.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="section.level3.properties.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="section.level4.properties.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="section.level5.properties.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="section.level6.properties.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="section.properties.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="segmentedlist.as.table.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="shade.verbatim.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="shade.verbatim.style.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="show.comments.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="sidebar.properties.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="subscript.properties.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="superscript.properties.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="symbol.font.family.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="table.cell.border.color.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="table.cell.border.style.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="table.cell.border.thickness.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="table.cell.padding.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="table.footnote.number.format.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="table.footnote.number.symbols.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="table.frame.border.color.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="table.frame.border.style.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="table.frame.border.thickness.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="table.properties.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="tablecolumns.extension.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="table.table.properties.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="target.database.document.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="tex.math.delims.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="tex.math.in.alt.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="textinsert.extension.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="title.font.family.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="title.margin.left.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="toc.indent.width.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="toc.margin.properties.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="toc.section.depth.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="ulink.footnote.number.format.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="ulink.footnotes.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="ulink.hyphenate.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="ulink.show.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="use.extensions.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="use.local.olink.style.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="use.role.as.xrefstyle.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="use.role.for.mediaobject.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="use.svg.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="variablelist.as.blocks.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="variablelist.max.termlength.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="verbatim.properties.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="xep.extensions.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="xep.index.item.properties.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="xref.label-page.separator.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="xref.label-title.separator.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="xref.properties.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="xref.title-page.separator.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="xref.with.number.and.title.frag"&gt;&lt;/src:fragref&gt;
+
+&lt;/xsl:stylesheet&gt;
+</programlisting>
+
+</appendix>
+
+</book>
\ No newline at end of file

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/param.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/param.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/param.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,653 @@
+<?xml version="1.0" encoding="utf-8"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:src="http://nwalsh.com/xmlns/litprog/fragment" exclude-result-prefixes="src" version="1.0">
+
+<!-- This file is generated from param.xweb; do not edit this file! -->
+
+<!-- ********************************************************************
+     $Id: param.xsl,v 1.1.1.1 2004/10/19 21:21:44 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<xsl:param name="admon.graphics.extension" select="'.png'"/>
+<xsl:param name="admon.graphics" select="0"/>
+<xsl:param name="admon.graphics.path">images/</xsl:param>
+<xsl:param name="admon.textlabel" select="1"/>
+<xsl:attribute-set name="admonition.properties"/>
+<xsl:attribute-set name="admonition.title.properties">
+  <xsl:attribute name="font-size">14pt</xsl:attribute>
+  <xsl:attribute name="font-weight">bold</xsl:attribute>
+  <xsl:attribute name="hyphenate">false</xsl:attribute>
+  <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
+</xsl:attribute-set>
+<xsl:param name="alignment">justify</xsl:param>
+<xsl:param name="appendix.autolabel" select="1"/>
+<xsl:param name="arbortext.extensions" select="0"/>
+<xsl:attribute-set name="article.appendix.title.properties" use-attribute-sets="section.title.properties                          section.title.level1.properties">
+  <xsl:attribute name="margin-left">
+    <xsl:value-of select="$title.margin.left"/>
+  </xsl:attribute>
+</xsl:attribute-set>
+<xsl:param name="author.othername.in.middle" select="1"/>
+<xsl:param name="autotoc.label.separator" select="'. '"/>
+<xsl:param name="axf.extensions" select="0"/>
+<xsl:param name="biblioentry.item.separator">. </xsl:param>
+<xsl:param name="bibliography.collection" select="'http://docbook.sourceforge.net/release/bibliography/bibliography.xml'"/>
+<xsl:param name="bibliography.numbered" select="0"/>
+<xsl:attribute-set name="blockquote.properties">
+<xsl:attribute name="start-indent">0.5in</xsl:attribute>
+<xsl:attribute name="end-indent">0.5in</xsl:attribute>
+<xsl:attribute name="space-after.minimum">0.5em</xsl:attribute>
+<xsl:attribute name="space-after.optimum">1em</xsl:attribute>
+<xsl:attribute name="space-after.maximum">2em</xsl:attribute>
+</xsl:attribute-set>
+<xsl:param name="body.font.family" select="'serif'"/>
+<xsl:param name="body.font.master">10</xsl:param>
+<xsl:param name="body.font.size">
+ <xsl:value-of select="$body.font.master"/><xsl:text>pt</xsl:text>
+</xsl:param>
+<xsl:param name="body.margin.bottom" select="'0.5in'"/>
+<xsl:param name="body.margin.top" select="'0.5in'"/>
+<xsl:param name="bridgehead.in.toc" select="0"/>
+<xsl:param name="callout.defaultcolumn" select="'60'"/>
+<xsl:param name="callout.graphics.extension" select="'.png'"/>
+<xsl:param name="callout.graphics" select="'1'"/>
+<xsl:param name="callout.graphics.number.limit" select="'10'"/>
+<xsl:param name="callout.graphics.path" select="'images/callouts/'"/>
+<xsl:param name="callout.unicode.font" select="'ZapfDingbats'"/>
+<xsl:param name="callout.unicode" select="0"/>
+<xsl:param name="callout.unicode.number.limit" select="'10'"/>
+<xsl:param name="callout.unicode.start.character" select="10102"/>
+<xsl:param name="callouts.extension" select="'1'"/>
+<xsl:param name="chapter.autolabel" select="1"/>
+<xsl:param name="column.count.back" select="1"/>
+<xsl:param name="column.count.body" select="1"/>
+<xsl:param name="column.count.front" select="1"/>
+<xsl:param name="column.count.index" select="2"/>
+<xsl:param name="column.count.lot" select="1"/>
+<xsl:param name="column.count.titlepage" select="1"/>
+<xsl:param name="column.gap.back" select="'12pt'"/>
+<xsl:param name="column.gap.body" select="'12pt'"/>
+<xsl:param name="column.gap.front" select="'12pt'"/>
+<xsl:param name="column.gap.index" select="'12pt'"/>
+<xsl:param name="column.gap.lot" select="'12pt'"/>
+<xsl:param name="column.gap.titlepage" select="'12pt'"/>
+<xsl:attribute-set name="compact.list.item.spacing">
+  <xsl:attribute name="space-before.optimum">0em</xsl:attribute>
+  <xsl:attribute name="space-before.minimum">0em</xsl:attribute>
+  <xsl:attribute name="space-before.maximum">0.2em</xsl:attribute>
+</xsl:attribute-set>
+<xsl:param name="current.docid" select="''"/> 
+<xsl:param name="default.float.class" select="'before'"/>
+<xsl:param name="default.image.width" select="''"/>
+<xsl:param name="default.table.width" select="''"/>
+<xsl:param name="default.units" select="'pt'"/>
+<xsl:param name="dingbat.font.family" select="'serif'"/>
+<xsl:param name="double.sided" select="0"/>
+<xsl:param name="draft.mode" select="'maybe'"/>
+<xsl:param name="draft.watermark.image" select="'http://docbook.sourceforge.net/release/images/draft.png'"/>
+
+<xsl:param xmlns:fo="http://www.w3.org/1999/XSL/Format" name="ebnf.assignment">
+  <fo:inline font-family="{$monospace.font.family}">
+    <xsl:text>::=</xsl:text>
+  </fo:inline>
+</xsl:param>
+
+<xsl:param name="ebnf.statement.terminator"/>
+<xsl:attribute-set name="equation.properties" use-attribute-sets="formal.object.properties"/>
+<xsl:attribute-set name="example.properties" use-attribute-sets="formal.object.properties"/>
+<xsl:attribute-set name="figure.properties" use-attribute-sets="formal.object.properties"/>
+<xsl:param name="firstterm.only.link" select="0"/>
+<xsl:attribute-set name="footer.content.properties">
+  <xsl:attribute name="font-family">
+    <xsl:value-of select="$body.fontset"/>
+  </xsl:attribute>
+  <xsl:attribute name="margin-left">
+    <xsl:value-of select="$title.margin.left"/>
+  </xsl:attribute>
+</xsl:attribute-set>
+<xsl:param name="footer.rule" select="1"/>
+<xsl:param name="footer.column.widths" select="'1 1 1'"/>
+<xsl:param name="footers.on.blank.pages" select="1"/>
+<xsl:param name="footnote.font.size">
+ <xsl:value-of select="$body.font.master * 0.8"/><xsl:text>pt</xsl:text>
+</xsl:param>
+<xsl:param name="footnote.number.format" select="'1'"/>
+<xsl:param name="footnote.number.symbols" select="''"/>
+<xsl:param name="fop.extensions" select="0"/>
+<xsl:attribute-set name="formal.object.properties">
+  <xsl:attribute name="space-before.minimum">0.5em</xsl:attribute>
+  <xsl:attribute name="space-before.optimum">1em</xsl:attribute>
+  <xsl:attribute name="space-before.maximum">2em</xsl:attribute>
+  <xsl:attribute name="space-after.minimum">0.5em</xsl:attribute>
+  <xsl:attribute name="space-after.optimum">1em</xsl:attribute>
+  <xsl:attribute name="space-after.maximum">2em</xsl:attribute>
+  <xsl:attribute name="keep-together.within-column">always</xsl:attribute>
+</xsl:attribute-set>
+<xsl:param name="formal.procedures" select="1"/>
+<xsl:param name="formal.title.placement">
+figure before
+example before
+equation before
+table before
+procedure before
+task before
+</xsl:param>
+<xsl:attribute-set name="formal.title.properties" use-attribute-sets="normal.para.spacing">
+  <xsl:attribute name="font-weight">bold</xsl:attribute>
+  <xsl:attribute name="font-size">
+    <xsl:value-of select="$body.font.master * 1.2"/>
+    <xsl:text>pt</xsl:text>
+  </xsl:attribute>
+  <xsl:attribute name="hyphenate">false</xsl:attribute>
+  <xsl:attribute name="space-after.minimum">0.4em</xsl:attribute>
+  <xsl:attribute name="space-after.optimum">0.6em</xsl:attribute>
+  <xsl:attribute name="space-after.maximum">0.8em</xsl:attribute>
+</xsl:attribute-set>
+<xsl:param name="funcsynopsis.decoration" select="1"/>
+<xsl:param name="funcsynopsis.style">kr</xsl:param>
+<xsl:param name="function.parens">0</xsl:param>
+<xsl:param name="generate.index" select="1"/>
+<xsl:param name="generate.section.toc.level" select="0"/>
+
+<xsl:param name="generate.toc">
+/appendix toc,title
+article/appendix  nop
+/article  toc,title
+book      toc,title,figure,table,example,equation
+/chapter  toc,title
+part      toc,title
+/preface  toc,title
+qandadiv  toc
+qandaset  toc
+reference toc,title
+/sect1    toc
+/sect2    toc
+/sect3    toc
+/sect4    toc
+/sect5    toc
+/section  toc
+set       toc,title
+</xsl:param>
+<xsl:param name="glossary.as.blocks" select="0"/>
+<xsl:param name="glossary.collection" select="''"/>
+<xsl:param name="glossentry.show.acronym" select="'no'"/>
+<xsl:param name="glosslist.as.blocks" select="0"/>
+<xsl:param name="glossterm.auto.link" select="0"/>
+<xsl:param name="glossterm.separation" select="'0.25in'"/>
+<xsl:param name="glossterm.width" select="'2in'"/>
+<xsl:param name="graphic.default.extension"/>
+<xsl:attribute-set name="header.content.properties">
+  <xsl:attribute name="font-family">
+    <xsl:value-of select="$body.fontset"/>
+  </xsl:attribute>
+  <xsl:attribute name="margin-left">
+    <xsl:value-of select="$title.margin.left"/>
+  </xsl:attribute>
+</xsl:attribute-set>
+<xsl:param name="header.rule" select="1"/>
+<xsl:param name="header.column.widths" select="'1 1 1'"/>
+<xsl:param name="headers.on.blank.pages" select="1"/>
+<xsl:param name="hyphenate">true</xsl:param>
+<xsl:param name="ignore.image.scaling" select="0"/>
+<xsl:attribute-set name="informal.object.properties">
+  <xsl:attribute name="space-before.minimum">0.5em</xsl:attribute>
+  <xsl:attribute name="space-before.optimum">1em</xsl:attribute>
+  <xsl:attribute name="space-before.maximum">2em</xsl:attribute>
+  <xsl:attribute name="space-after.minimum">0.5em</xsl:attribute>
+  <xsl:attribute name="space-after.optimum">1em</xsl:attribute>
+  <xsl:attribute name="space-after.maximum">2em</xsl:attribute>
+</xsl:attribute-set>
+<xsl:attribute-set name="index.preferred.page.properties">
+  <xsl:attribute name="font-weight">bold</xsl:attribute>
+</xsl:attribute-set>
+<xsl:param name="insert.xref.page.number">no</xsl:param>
+<xsl:param name="l10n.gentext.default.language" select="'en'"/>
+<xsl:param name="l10n.gentext.language" select="''"/>
+<xsl:param name="l10n.gentext.use.xref.language" select="0"/>
+<xsl:param name="label.from.part" select="'0'"/>
+<xsl:param name="line-height" select="'normal'"/>
+<xsl:param name="linenumbering.everyNth" select="'5'"/>
+<xsl:param name="linenumbering.extension" select="'1'"/>
+<xsl:param name="linenumbering.separator" select="' '"/>
+<xsl:param name="linenumbering.width" select="'3'"/>
+<xsl:attribute-set name="list.block.spacing">
+  <xsl:attribute name="space-before.optimum">1em</xsl:attribute>
+  <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute>
+  <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute>
+  <xsl:attribute name="space-after.optimum">1em</xsl:attribute>
+  <xsl:attribute name="space-after.minimum">0.8em</xsl:attribute>
+  <xsl:attribute name="space-after.maximum">1.2em</xsl:attribute>
+</xsl:attribute-set>
+<xsl:attribute-set name="list.item.spacing">
+  <xsl:attribute name="space-before.optimum">1em</xsl:attribute>
+  <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute>
+  <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute>
+</xsl:attribute-set>
+<xsl:param name="make.index.markup" select="0"/>
+<xsl:param name="make.single.year.ranges" select="0"/>
+<xsl:param name="make.year.ranges" select="0"/>
+<xsl:param name="marker.section.level" select="2"/>
+<xsl:param name="menuchoice.menu.separator" select="'-&gt;'"/>
+<xsl:param name="menuchoice.separator" select="'+'"/>
+<xsl:param name="monospace.font.family" select="'monospace'"/>
+<xsl:attribute-set name="monospace.properties">
+  <xsl:attribute name="font-family">
+    <xsl:value-of select="$monospace.font.family"/>
+  </xsl:attribute>
+</xsl:attribute-set>
+<xsl:attribute-set name="monospace.verbatim.properties" use-attribute-sets="verbatim.properties monospace.properties">
+  <xsl:attribute name="text-align">start</xsl:attribute>
+</xsl:attribute-set>
+<xsl:param name="nominal.table.width" select="'6in'"/>
+<xsl:attribute-set name="normal.para.spacing">
+  <xsl:attribute name="space-before.optimum">1em</xsl:attribute>
+  <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute>
+  <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute>
+</xsl:attribute-set>
+<xsl:param name="olink.doctitle" select="0"/> 
+<xsl:param name="page.height">
+  <xsl:choose>
+    <xsl:when test="$page.orientation = 'portrait'">
+      <xsl:value-of select="$page.height.portrait"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:value-of select="$page.width.portrait"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:param>
+<xsl:param name="page.height.portrait">
+  <xsl:choose>
+    <xsl:when test="$paper.type = 'A4landscape'">210mm</xsl:when>
+    <xsl:when test="$paper.type = 'USletter'">11in</xsl:when>
+    <xsl:when test="$paper.type = 'USlandscape'">8.5in</xsl:when>
+    <xsl:when test="$paper.type = '4A0'">2378mm</xsl:when>
+    <xsl:when test="$paper.type = '2A0'">1682mm</xsl:when>
+    <xsl:when test="$paper.type = 'A0'">1189mm</xsl:when>
+    <xsl:when test="$paper.type = 'A1'">841mm</xsl:when>
+    <xsl:when test="$paper.type = 'A2'">594mm</xsl:when>
+    <xsl:when test="$paper.type = 'A3'">420mm</xsl:when>
+    <xsl:when test="$paper.type = 'A4'">297mm</xsl:when>
+    <xsl:when test="$paper.type = 'A5'">210mm</xsl:when>
+    <xsl:when test="$paper.type = 'A6'">148mm</xsl:when>
+    <xsl:when test="$paper.type = 'A7'">105mm</xsl:when>
+    <xsl:when test="$paper.type = 'A8'">74mm</xsl:when>
+    <xsl:when test="$paper.type = 'A9'">52mm</xsl:when>
+    <xsl:when test="$paper.type = 'A10'">37mm</xsl:when>
+    <xsl:when test="$paper.type = 'B0'">1414mm</xsl:when>
+    <xsl:when test="$paper.type = 'B1'">1000mm</xsl:when>
+    <xsl:when test="$paper.type = 'B2'">707mm</xsl:when>
+    <xsl:when test="$paper.type = 'B3'">500mm</xsl:when>
+    <xsl:when test="$paper.type = 'B4'">353mm</xsl:when>
+    <xsl:when test="$paper.type = 'B5'">250mm</xsl:when>
+    <xsl:when test="$paper.type = 'B6'">176mm</xsl:when>
+    <xsl:when test="$paper.type = 'B7'">125mm</xsl:when>
+    <xsl:when test="$paper.type = 'B8'">88mm</xsl:when>
+    <xsl:when test="$paper.type = 'B9'">62mm</xsl:when>
+    <xsl:when test="$paper.type = 'B10'">44mm</xsl:when>
+    <xsl:when test="$paper.type = 'C0'">1297mm</xsl:when>
+    <xsl:when test="$paper.type = 'C1'">917mm</xsl:when>
+    <xsl:when test="$paper.type = 'C2'">648mm</xsl:when>
+    <xsl:when test="$paper.type = 'C3'">458mm</xsl:when>
+    <xsl:when test="$paper.type = 'C4'">324mm</xsl:when>
+    <xsl:when test="$paper.type = 'C5'">229mm</xsl:when>
+    <xsl:when test="$paper.type = 'C6'">162mm</xsl:when>
+    <xsl:when test="$paper.type = 'C7'">114mm</xsl:when>
+    <xsl:when test="$paper.type = 'C8'">81mm</xsl:when>
+    <xsl:when test="$paper.type = 'C9'">57mm</xsl:when>
+    <xsl:when test="$paper.type = 'C10'">40mm</xsl:when>
+    <xsl:otherwise>11in</xsl:otherwise>
+  </xsl:choose>
+</xsl:param>
+<xsl:param name="page.margin.bottom" select="'0.5in'"/>
+<xsl:param name="page.margin.inner">
+  <xsl:choose>
+    <xsl:when test="$double.sided != 0">1.25in</xsl:when>
+    <xsl:otherwise>1in</xsl:otherwise>
+  </xsl:choose>
+</xsl:param>
+<xsl:param name="page.margin.outer">
+  <xsl:choose>
+    <xsl:when test="$double.sided != 0">0.75in</xsl:when>
+    <xsl:otherwise>1in</xsl:otherwise>
+  </xsl:choose>
+</xsl:param>
+<xsl:param name="page.margin.top" select="'0.5in'"/>
+<xsl:param name="page.orientation" select="'portrait'"/>
+<xsl:param name="page.width">
+  <xsl:choose>
+    <xsl:when test="$page.orientation = 'portrait'">
+      <xsl:value-of select="$page.width.portrait"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:value-of select="$page.height.portrait"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:param>
+<xsl:param name="page.width.portrait">
+  <xsl:choose>
+    <xsl:when test="$paper.type = 'USletter'">8.5in</xsl:when>
+    <xsl:when test="$paper.type = '4A0'">1682mm</xsl:when>
+    <xsl:when test="$paper.type = '2A0'">1189mm</xsl:when>
+    <xsl:when test="$paper.type = 'A0'">841mm</xsl:when>
+    <xsl:when test="$paper.type = 'A1'">594mm</xsl:when>
+    <xsl:when test="$paper.type = 'A2'">420mm</xsl:when>
+    <xsl:when test="$paper.type = 'A3'">297mm</xsl:when>
+    <xsl:when test="$paper.type = 'A4'">210mm</xsl:when>
+    <xsl:when test="$paper.type = 'A5'">148mm</xsl:when>
+    <xsl:when test="$paper.type = 'A6'">105mm</xsl:when>
+    <xsl:when test="$paper.type = 'A7'">74mm</xsl:when>
+    <xsl:when test="$paper.type = 'A8'">52mm</xsl:when>
+    <xsl:when test="$paper.type = 'A9'">37mm</xsl:when>
+    <xsl:when test="$paper.type = 'A10'">26mm</xsl:when>
+    <xsl:when test="$paper.type = 'B0'">1000mm</xsl:when>
+    <xsl:when test="$paper.type = 'B1'">707mm</xsl:when>
+    <xsl:when test="$paper.type = 'B2'">500mm</xsl:when>
+    <xsl:when test="$paper.type = 'B3'">353mm</xsl:when>
+    <xsl:when test="$paper.type = 'B4'">250mm</xsl:when>
+    <xsl:when test="$paper.type = 'B5'">176mm</xsl:when>
+    <xsl:when test="$paper.type = 'B6'">125mm</xsl:when>
+    <xsl:when test="$paper.type = 'B7'">88mm</xsl:when>
+    <xsl:when test="$paper.type = 'B8'">62mm</xsl:when>
+    <xsl:when test="$paper.type = 'B9'">44mm</xsl:when>
+    <xsl:when test="$paper.type = 'B10'">31mm</xsl:when>
+    <xsl:when test="$paper.type = 'C0'">917mm</xsl:when>
+    <xsl:when test="$paper.type = 'C1'">648mm</xsl:when>
+    <xsl:when test="$paper.type = 'C2'">458mm</xsl:when>
+    <xsl:when test="$paper.type = 'C3'">324mm</xsl:when>
+    <xsl:when test="$paper.type = 'C4'">229mm</xsl:when>
+    <xsl:when test="$paper.type = 'C5'">162mm</xsl:when>
+    <xsl:when test="$paper.type = 'C6'">114mm</xsl:when>
+    <xsl:when test="$paper.type = 'C7'">81mm</xsl:when>
+    <xsl:when test="$paper.type = 'C8'">57mm</xsl:when>
+    <xsl:when test="$paper.type = 'C9'">40mm</xsl:when>
+    <xsl:when test="$paper.type = 'C10'">28mm</xsl:when>
+    <xsl:otherwise>8.5in</xsl:otherwise>
+  </xsl:choose>
+</xsl:param>
+<xsl:param name="paper.type" select="'USletter'"/>
+<xsl:param name="part.autolabel" select="1"/>
+<xsl:param name="passivetex.extensions" select="0"/>
+<xsl:param name="preface.autolabel" select="0"/>
+<xsl:param name="preferred.mediaobject.role"/>
+<xsl:attribute-set name="procedure.properties" use-attribute-sets="formal.object.properties"/>
+<xsl:param name="process.empty.source.toc" select="0"/>
+<xsl:param name="process.source.toc" select="0"/>
+<xsl:param name="profile.arch" select="''"/>
+<xsl:param name="profile.attribute" select="''"/>
+<xsl:param name="profile.condition" select="''"/>
+<xsl:param name="profile.conformance" select="''"/>
+<xsl:param name="profile.lang" select="''"/>
+<xsl:param name="profile.os" select="''"/>
+<xsl:param name="profile.revision" select="''"/>
+<xsl:param name="profile.revisionflag" select="''"/>
+<xsl:param name="profile.role" select="''"/>
+<xsl:param name="profile.security" select="''"/>
+<xsl:param name="profile.separator" select="';'"/>
+<xsl:param name="profile.userlevel" select="''"/>
+<xsl:param name="profile.value" select="''"/>
+<xsl:param name="profile.vendor" select="''"/>
+<xsl:param name="punct.honorific" select="'.'"/>
+<xsl:param name="qanda.defaultlabel">number</xsl:param>
+<xsl:param name="qanda.inherit.numeration" select="1"/>
+<xsl:param name="qandadiv.autolabel" select="1"/>
+<xsl:attribute-set name="qanda.title.level1.properties">
+  <xsl:attribute name="font-size">
+    <xsl:value-of select="$body.font.master * 2.0736"/>
+    <xsl:text>pt</xsl:text>
+  </xsl:attribute>
+</xsl:attribute-set>
+<xsl:attribute-set name="qanda.title.level2.properties">
+  <xsl:attribute name="font-size">
+    <xsl:value-of select="$body.font.master * 1.728"/>
+    <xsl:text>pt</xsl:text>
+  </xsl:attribute>
+</xsl:attribute-set>
+<xsl:attribute-set name="qanda.title.level3.properties">
+  <xsl:attribute name="font-size">
+    <xsl:value-of select="$body.font.master * 1.44"/>
+    <xsl:text>pt</xsl:text>
+  </xsl:attribute>
+</xsl:attribute-set>
+<xsl:attribute-set name="qanda.title.level4.properties">
+  <xsl:attribute name="font-size">
+    <xsl:value-of select="$body.font.master * 1.2"/>
+    <xsl:text>pt</xsl:text>
+  </xsl:attribute>
+</xsl:attribute-set>
+<xsl:attribute-set name="qanda.title.level5.properties">
+  <xsl:attribute name="font-size">
+    <xsl:value-of select="$body.font.master"/>
+    <xsl:text>pt</xsl:text>
+  </xsl:attribute>
+</xsl:attribute-set>
+<xsl:attribute-set name="qanda.title.level6.properties">
+  <xsl:attribute name="font-size">
+    <xsl:value-of select="$body.font.master"/>
+    <xsl:text>pt</xsl:text>
+  </xsl:attribute>
+</xsl:attribute-set>
+<xsl:attribute-set name="qanda.title.properties">
+  <xsl:attribute name="font-family">
+    <xsl:value-of select="$title.font.family"/>
+  </xsl:attribute>
+  <xsl:attribute name="font-weight">bold</xsl:attribute>
+  <!-- font size is calculated dynamically by qanda.heading template -->
+  <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
+  <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute>
+  <xsl:attribute name="space-before.optimum">1.0em</xsl:attribute>
+  <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute>
+</xsl:attribute-set>
+<xsl:param name="refentry.generate.name" select="1"/>
+<xsl:param name="refentry.generate.title" select="0"/>
+<xsl:param name="refentry.pagebreak" select="1"/>
+<xsl:attribute-set name="refentry.title.properties">
+  <xsl:attribute name="font-family">
+    <xsl:value-of select="$title.font.family"/>
+  </xsl:attribute>
+  <xsl:attribute name="font-size">18pt</xsl:attribute>
+  <xsl:attribute name="font-weight">bold</xsl:attribute>
+  <xsl:attribute name="space-after">1em</xsl:attribute>
+  <xsl:attribute name="hyphenate">false</xsl:attribute>
+  <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
+  <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute>
+  <xsl:attribute name="space-before.optimum">1.0em</xsl:attribute>
+  <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute>
+  <xsl:attribute name="space-after.optimum">0.5em</xsl:attribute>
+  <xsl:attribute name="space-after.minimum">0.4em</xsl:attribute>
+  <xsl:attribute name="space-after.maximum">0.6em</xsl:attribute>
+</xsl:attribute-set>
+<xsl:param name="refentry.xref.manvolnum" select="1"/>
+<xsl:param name="region.after.extent" select="'0.4in'"/>
+<xsl:param name="region.before.extent" select="'0.4in'"/>
+<xsl:attribute-set name="root.properties">
+  <xsl:attribute name="font-family">
+    <xsl:value-of select="$body.fontset"/>
+  </xsl:attribute>
+  <xsl:attribute name="font-size">
+    <xsl:value-of select="$body.font.size"/>
+  </xsl:attribute>
+  <xsl:attribute name="text-align">
+    <xsl:value-of select="$alignment"/>
+  </xsl:attribute>
+  <xsl:attribute name="line-height">
+    <xsl:value-of select="$line-height"/>
+  </xsl:attribute>
+  <xsl:attribute name="font-selection-strategy">character-by-character</xsl:attribute>
+  <xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
+</xsl:attribute-set>
+<xsl:param name="rootid" select="''"/>
+<xsl:param name="runinhead.default.title.end.punct" select="'.'"/>
+<xsl:param name="runinhead.title.end.punct" select="'.!?:'"/>
+<xsl:param name="sans.font.family" select="'sans-serif'"/>
+<xsl:param name="section.autolabel" select="0"/>
+<xsl:param name="section.label.includes.component.label" select="0"/>
+<xsl:attribute-set name="section.title.level1.properties">
+  <xsl:attribute name="font-size">
+    <xsl:value-of select="$body.font.master * 2.0736"/>
+    <xsl:text>pt</xsl:text>
+  </xsl:attribute>
+</xsl:attribute-set>
+<xsl:attribute-set name="section.title.level2.properties">
+  <xsl:attribute name="font-size">
+    <xsl:value-of select="$body.font.master * 1.728"/>
+    <xsl:text>pt</xsl:text>
+  </xsl:attribute>
+</xsl:attribute-set>
+<xsl:attribute-set name="section.title.level3.properties">
+  <xsl:attribute name="font-size">
+    <xsl:value-of select="$body.font.master * 1.44"/>
+    <xsl:text>pt</xsl:text>
+  </xsl:attribute>
+</xsl:attribute-set>
+<xsl:attribute-set name="section.title.level4.properties">
+  <xsl:attribute name="font-size">
+    <xsl:value-of select="$body.font.master * 1.2"/>
+    <xsl:text>pt</xsl:text>
+  </xsl:attribute>
+</xsl:attribute-set>
+<xsl:attribute-set name="section.title.level5.properties">
+  <xsl:attribute name="font-size">
+    <xsl:value-of select="$body.font.master"/>
+    <xsl:text>pt</xsl:text>
+  </xsl:attribute>
+</xsl:attribute-set>
+<xsl:attribute-set name="section.title.level6.properties">
+  <xsl:attribute name="font-size">
+    <xsl:value-of select="$body.font.master"/>
+    <xsl:text>pt</xsl:text>
+  </xsl:attribute>
+</xsl:attribute-set>
+<xsl:attribute-set name="section.title.properties">
+  <xsl:attribute name="font-family">
+    <xsl:value-of select="$title.font.family"/>
+  </xsl:attribute>
+  <xsl:attribute name="font-weight">bold</xsl:attribute>
+  <!-- font size is calculated dynamically by section.heading template -->
+  <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
+  <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute>
+  <xsl:attribute name="space-before.optimum">1.0em</xsl:attribute>
+  <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute>
+</xsl:attribute-set>
+<xsl:attribute-set name="section.level1.properties" use-attribute-sets="section.properties">
+</xsl:attribute-set>
+<xsl:attribute-set name="section.level2.properties" use-attribute-sets="section.properties">
+</xsl:attribute-set>
+<xsl:attribute-set name="section.level3.properties" use-attribute-sets="section.properties">
+</xsl:attribute-set>
+<xsl:attribute-set name="section.level4.properties" use-attribute-sets="section.properties">
+</xsl:attribute-set>
+<xsl:attribute-set name="section.level5.properties" use-attribute-sets="section.properties">
+</xsl:attribute-set>
+<xsl:attribute-set name="section.level6.properties" use-attribute-sets="section.properties">
+</xsl:attribute-set>
+<xsl:attribute-set name="section.properties">
+</xsl:attribute-set>
+<xsl:param name="segmentedlist.as.table" select="0"/>
+<xsl:param name="shade.verbatim" select="0"/>
+
+<xsl:attribute-set name="shade.verbatim.style">
+  <xsl:attribute name="background-color">#E0E0E0</xsl:attribute>
+</xsl:attribute-set>
+<xsl:param name="show.comments">1</xsl:param>
+<xsl:attribute-set name="sidebar.properties" use-attribute-sets="formal.object.properties">
+  <xsl:attribute name="border-style">solid</xsl:attribute>
+  <xsl:attribute name="border-width">1pt</xsl:attribute>
+  <xsl:attribute name="border-color">black</xsl:attribute>
+  <xsl:attribute name="background-color">#DDDDDD</xsl:attribute>
+  <xsl:attribute name="padding-left">12pt</xsl:attribute>
+  <xsl:attribute name="padding-right">12pt</xsl:attribute>
+  <xsl:attribute name="padding-top">6pt</xsl:attribute>
+  <xsl:attribute name="padding-bottom">6pt</xsl:attribute>
+<!--
+  <xsl:attribute name="margin-left">12pt</xsl:attribute>
+  <xsl:attribute name="margin-right">12pt</xsl:attribute>
+  <xsl:attribute name="margin-top">6pt</xsl:attribute>
+  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
+-->
+</xsl:attribute-set>
+<xsl:attribute-set name="subscript.properties">
+  <xsl:attribute name="font-size">75%</xsl:attribute>
+</xsl:attribute-set>
+<xsl:attribute-set name="superscript.properties">
+  <xsl:attribute name="font-size">75%</xsl:attribute>
+</xsl:attribute-set>
+<xsl:param name="symbol.font.family" select="'Symbol,ZapfDingbats'"/>
+
+<xsl:param name="table.cell.border.color" select="'black'"/>
+<xsl:param name="table.cell.border.style" select="'solid'"/>
+<xsl:param name="table.cell.border.thickness" select="'0.5pt'"/>
+<xsl:attribute-set name="table.cell.padding">
+  <xsl:attribute name="padding-left">2pt</xsl:attribute>
+  <xsl:attribute name="padding-right">2pt</xsl:attribute>
+  <xsl:attribute name="padding-top">2pt</xsl:attribute>
+  <xsl:attribute name="padding-bottom">2pt</xsl:attribute>
+</xsl:attribute-set>
+<xsl:param name="table.footnote.number.format" select="'a'"/>
+<xsl:param name="table.footnote.number.symbols" select="''"/>
+
+<xsl:param name="table.frame.border.color" select="'black'"/>
+<xsl:param name="table.frame.border.style" select="'solid'"/>
+<xsl:param name="table.frame.border.thickness" select="'0.5pt'"/>
+<xsl:attribute-set name="table.properties" use-attribute-sets="formal.object.properties"/>
+<xsl:param name="tablecolumns.extension" select="'1'"/>
+<xsl:attribute-set name="table.table.properties">
+  <xsl:attribute name="border-before-width.conditionality">retain</xsl:attribute>
+  <xsl:attribute name="border-collapse">collapse</xsl:attribute>
+</xsl:attribute-set>
+<xsl:param name="target.database.document" select="''"/>
+<xsl:param name="tex.math.delims" select="'1'"/>
+<xsl:param name="tex.math.in.alt" select="''"/>
+<xsl:param name="textinsert.extension" select="'1'"/>
+<xsl:param name="title.font.family" select="'sans-serif'"/>
+<xsl:param name="title.margin.left">
+  <xsl:choose>
+    <xsl:when test="$passivetex.extensions != 0">0pt</xsl:when>
+    <xsl:otherwise>-4pc</xsl:otherwise>
+  </xsl:choose>
+</xsl:param>
+<xsl:param name="toc.indent.width" select="24"/>
+<xsl:attribute-set name="toc.margin.properties">
+  <xsl:attribute name="space-before.minimum">0.5em</xsl:attribute>
+  <xsl:attribute name="space-before.optimum">1em</xsl:attribute>
+  <xsl:attribute name="space-before.maximum">2em</xsl:attribute>
+  <xsl:attribute name="space-after.minimum">0.5em</xsl:attribute>
+  <xsl:attribute name="space-after.optimum">1em</xsl:attribute>
+  <xsl:attribute name="space-after.maximum">2em</xsl:attribute>
+</xsl:attribute-set>
+<xsl:param name="toc.section.depth">2</xsl:param>
+<xsl:param name="ulink.footnote.number.format" select="'1'"/>
+<xsl:param name="ulink.footnotes" select="0"/>
+<xsl:param name="ulink.hyphenate" select="''"/>
+<xsl:param name="ulink.show" select="1"/>
+<xsl:param name="use.extensions" select="'0'"/>
+<xsl:param name="use.local.olink.style" select="0"/> 
+<xsl:param name="use.role.as.xrefstyle" select="1"/>
+<xsl:param name="use.role.for.mediaobject" select="1"/>
+<xsl:param name="use.svg" select="1"/>
+<xsl:param name="variablelist.as.blocks" select="0"/>
+<xsl:param name="variablelist.max.termlength">24</xsl:param>
+<xsl:attribute-set name="verbatim.properties">
+  <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute>
+  <xsl:attribute name="space-before.optimum">1em</xsl:attribute>
+  <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute>
+  <xsl:attribute name="space-after.minimum">0.8em</xsl:attribute>
+  <xsl:attribute name="space-after.optimum">1em</xsl:attribute>
+  <xsl:attribute name="space-after.maximum">1.2em</xsl:attribute>
+</xsl:attribute-set>
+<xsl:param name="xep.extensions" select="0"/>
+<xsl:attribute-set name="xep.index.item.properties">
+  <xsl:attribute name="merge-subsequent-page-numbers">true</xsl:attribute>
+  <xsl:attribute name="link-back">true</xsl:attribute>
+</xsl:attribute-set>
+<xsl:param name="xref.label-page.separator"><xsl:text> </xsl:text></xsl:param>
+<xsl:param name="xref.label-title.separator">: </xsl:param>
+<xsl:attribute-set name="xref.properties">
+</xsl:attribute-set>
+<xsl:param name="xref.title-page.separator"><xsl:text> </xsl:text></xsl:param>
+<xsl:param name="xref.with.number.and.title" select="1"/>
+
+</xsl:stylesheet>
\ No newline at end of file

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/param.xweb
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/param.xweb	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/param.xweb	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,727 @@
+<!DOCTYPE book [
+<!ENTITY % param.ent SYSTEM "param.ent">
+%param.ent;
+]>
+<book xmlns:src="http://nwalsh.com/xmlns/litprog/fragment"
+      xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<bookinfo>
+<title>FO Parameter Reference</title>
+<releaseinfo role="meta">
+$Id: param.xweb,v 1.1.1.1 2004/10/19 21:21:44 juntao Exp $
+</releaseinfo>
+<author>
+  <surname>Walsh</surname>
+  <firstname>Norman</firstname>
+</author>
+<copyright>
+  <year>1999</year>
+  <year>2000</year>
+  <year>2001</year>
+  <holder>Norman Walsh</holder>
+</copyright>
+</bookinfo>
+
+<preface><title>Introduction</title>
+
+<para>This is technical reference documentation for the DocBook XSL
+Stylesheets; it documents (some of) the parameters, templates, and
+other elements of the stylesheets.</para>
+
+<para>This reference describes each of the XSL FO Stylesheet parameters.
+These are the <quote>easily customizable</quote> parts of the stylesheet.
+If you want to specify an alternate value for one or more of these
+parameters, you can do so in a <quote>driver</quote> stylesheet.</para>
+
+<para>For example, if you want to change the <literal>html.stylesheet</literal>
+to <filename>reference.css</filename>, you might create a driver
+stylesheet like this:</para>
+
+<programlisting><![CDATA[<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                version='1.0'>
+
+  <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl"/>
+
+  <xsl:param name="html.stylesheet">reference.css</xsl:param>
+
+</xsl:stylesheet>]]></programlisting>
+
+<para>Naturally, you have to change the
+<sgmltag class='attribute'>href</sgmltag> attribute on
+<literal>&lt;xsl:import&gt;</literal> to point to
+<filename>docbook.xsl</filename> on your system. (Or
+<filename>chunk.xsl</filename>, if you're using chunking.)</para>
+
+<para>This is not intended to be <quote>user</quote> documentation.
+It is provided for developers writing customization layers for the
+stylesheets, and for anyone who's interested in <quote>how it
+works</quote>.</para>
+
+<para>Although I am trying to be thorough, this documentation is known
+to be incomplete. Don't forget to read the source, too :-)</para>
+</preface>
+
+<reference><title>Admonitions</title>
+&admon.graphics;
+&admon.graphics.extension;
+&admon.graphics.path;
+&admon.textlabel;
+&admonition.title.properties;
+&admonition.properties;
+</reference>
+
+<reference><title>Callouts</title>
+&callout.defaultcolumn;
+&callout.graphics;
+&callout.graphics.extension;
+&callout.graphics.number.limit;
+&callout.graphics.path;
+&callout.unicode;
+&callout.unicode.font;
+&callout.unicode.number.limit;
+&callout.unicode.start.character;
+&callouts.extension;
+</reference>
+
+<reference><title>ToC/LoT/Index Generation</title>
+&autotoc.label.separator;
+&process.empty.source.toc;
+&process.source.toc;
+&generate.toc;
+&generate.index;
+&make.index.markup;
+&index.preferred.page.properties;
+&xep.index.item.properties;
+&toc.section.depth;
+&toc.indent.width;
+&toc.margin.properties;
+&bridgehead.in.toc;
+&generate.section.toc.level;
+
+<!--
+annotate.toc;
+bridgehead.in.toc;
+manual.toc;
+generate.section.toc.level;
+-->
+
+</reference>
+
+<reference><title>Processor Extensions</title>
+&arbortext.extensions;
+&axf.extensions;
+&fop.extensions;
+&passivetex.extensions;
+&tex.math.in.alt;
+&tex.math.delims;
+&xep.extensions;
+</reference>
+
+<reference><title>Stylesheet Extensions</title>
+&linenumbering.everyNth;
+&linenumbering.extension;
+&linenumbering.separator;
+&linenumbering.width;
+&tablecolumns.extension;
+&textinsert.extension;
+&use.extensions;
+</reference>
+
+<reference><title>Automatic labelling</title>
+&appendix.autolabel;
+&chapter.autolabel;
+&part.autolabel;
+&preface.autolabel;
+&section.autolabel;
+&section.label.includes.component.label;
+&label.from.part;
+</reference>
+
+<reference><title>XSLT Processing</title>
+&rootid;
+</reference>
+
+<reference><title>Meta/*Info</title>
+&make.single.year.ranges;
+&make.year.ranges;
+&author.othername.in.middle;
+</reference>
+
+<reference><title>Reference Pages</title>
+&funcsynopsis.decoration;
+&funcsynopsis.style;
+&function.parens;
+&refentry.generate.name;
+&refentry.generate.title;
+&refentry.pagebreak;
+&refentry.title.properties;
+&refentry.xref.manvolnum;
+</reference>
+
+<reference><title>Tables</title>
+&default.table.width;
+&nominal.table.width;
+&table.cell.padding;
+&table.frame.border.thickness;
+&table.frame.border.style;
+&table.frame.border.color;
+&table.cell.border.thickness;
+&table.cell.border.style;
+&table.cell.border.color;
+&table.table.properties;
+</reference>
+
+<reference><title>Linking</title>
+&target.database.document;
+&use.local.olink.style;
+&current.docid;
+&olink.doctitle;
+</reference>
+
+<reference><title>QAndASet</title>
+&qandadiv.autolabel;
+&qanda.inherit.numeration;
+&qanda.defaultlabel;
+</reference>
+
+<reference><title>Bibliography</title>
+&biblioentry.item.separator;
+&bibliography.collection;
+&bibliography.numbered;
+</reference>
+
+<reference><title>Glossary</title>
+&glossterm.auto.link;
+&firstterm.only.link;
+&glossary.collection;
+&glossterm.separation;
+&glossterm.width;
+&glossary.as.blocks;
+&glosslist.as.blocks;
+&glossentry.show.acronym;
+</reference>
+
+<reference><title>Miscellaneous</title>
+&formal.procedures;
+&formal.title.placement;
+&runinhead.default.title.end.punct;
+&runinhead.title.end.punct;
+&show.comments;
+&punct.honorific;
+&segmentedlist.as.table;
+&variablelist.as.blocks;
+&blockquote.properties;
+&ulink.show;
+&ulink.footnotes;
+&ulink.footnote.number.format;
+&ulink.hyphenate;
+&shade.verbatim;
+&shade.verbatim.style;
+&use.svg;
+&use.role.as.xrefstyle;
+&menuchoice.separator;
+&menuchoice.menu.separator;
+&default.float.class;
+&footnote.number.format;
+&table.footnote.number.format;
+&footnote.number.symbols;
+&table.footnote.number.symbols;
+&xref.with.number.and.title;
+&superscript.properties;
+&subscript.properties;
+</reference>
+
+<reference><title>Graphics</title>
+&graphic.default.extension;
+&default.image.width;
+&preferred.mediaobject.role;
+&use.role.for.mediaobject;
+&ignore.image.scaling;
+</reference>
+
+<reference><title>Pagination and General Styles</title>
+<partintro>
+<section><title>Understanding XSL FO Margins</title>
+
+<para>In order for the parameters in this section to make sense, it is useful to
+consider <xref linkend="fig.pagemodel"/>.</para>
+
+<figure id="fig.pagemodel">
+<mediaobject>
+<imageobject>
+<imagedata fileref="page.png"/>
+</imageobject>
+<textobject><phrase>Figure showing page margins</phrase></textobject>
+<textobject>
+<para>This figure shows the physical page with the various FO page regions
+identified.</para>
+</textobject>
+</mediaobject>
+</figure>
+
+<para>First, let's consider the regions on the page.</para>
+
+<para>The white region is the physical page. Its dimensions are determined by
+the <parameter>page.height</parameter> and <parameter>page.width</parameter>
+parameters.</para>
+
+<para>The yellow region is the region-body. The size and placement of
+the region body is constrained by the dimensions labelled in the
+figure.</para>
+
+<para>The pink region at the top of the page is the region-before. The
+darker area inside the region-before is the header text. In XSL, the default
+display alignment for a region is <literal>before</literal>, but the
+DocBook stylesheets still explicitly make it <literal>before</literal>. That's
+why the darker area is at the top.</para>
+
+<para>The pink region at the bottom of the page is the region-after.
+The darker area is the footer text. In XSL, the default display
+alignment for a region is <literal>before</literal>,
+but the DocBook stylesheets explicitly make it
+<literal>after</literal>. That's why the darker area is at the bottom.</para>
+
+<para>The dimensions in the figure are:</para>
+
+<orderedlist numeration="upperalpha">
+<listitem><para>The page-master margin-top.
+</para></listitem>
+<listitem><para>The region-before extent.
+</para></listitem>
+<listitem><para>The region-body margin-top.
+</para></listitem>
+<listitem><para>The region-after extent.
+</para></listitem>
+<listitem><para>The page-master margin-bottom.
+</para></listitem>
+<listitem><para>The region-body margin-bottom.
+</para></listitem>
+<listitem><para>The sum of the page-master margin-left and the
+region-body margin-left. In DocBook, the region-body margin-left is
+zero by default, so this is simply the page-master region-left.
+</para></listitem>
+<listitem><para>The sum of the page-master margin-right and the
+region-body margin-right. In DocBook, the region-body margin-right is
+zero by default, so this is simply the page-master region-left.
+</para></listitem>
+</orderedlist>
+
+</section>
+</partintro>
+
+&page.height;
+&page.height.portrait;
+&page.margin.bottom;
+&page.margin.inner;
+&page.margin.outer;
+&page.margin.top;
+&page.orientation;
+&page.width;
+&page.width.portrait;
+&paper.type;
+&double.sided;
+&body.margin.bottom;
+&body.margin.top;
+&alignment;
+&hyphenate;
+&line-height;
+&column.count.back;
+&column.count.body;
+&column.count.front;
+&column.count.index;
+&column.count.lot;
+&column.count.titlepage;
+&column.gap.back;
+&column.gap.body;
+&column.gap.front;
+&column.gap.index;
+&column.gap.lot;
+&column.gap.titlepage;
+&region.after.extent;
+&region.before.extent;
+&default.units;
+&normal.para.spacing;
+&body.font.master;
+&body.font.size;
+&footnote.font.size;
+&title.margin.left;
+&draft.mode;
+&draft.watermark.image;
+&headers.on.blank.pages;
+&footers.on.blank.pages;
+&header.rule;
+&footer.rule;
+&header.column.widths;
+&footer.column.widths;
+&header.content.properties;
+&footer.content.properties;
+&marker.section.level;
+</reference>
+
+<reference><title>Font Families</title>
+&body.font.family;
+&dingbat.font.family;
+&monospace.font.family;
+&sans.font.family;
+&title.font.family;
+&symbol.font.family;
+</reference>
+
+<reference><title>Lists</title>
+&list.block.spacing;
+&list.item.spacing;
+&compact.list.item.spacing;
+&variablelist.max.termlength;
+</reference>
+
+<reference><title>Cross References</title>
+&insert.xref.page.number;
+&xref.properties;
+&xref.label-title.separator;
+&xref.label-page.separator;
+&xref.title-page.separator;
+</reference>
+
+<reference><title>Property Sets</title>
+&formal.object.properties;
+&formal.title.properties;
+&informal.object.properties;
+&monospace.properties;
+&verbatim.properties;
+&monospace.verbatim.properties;
+&sidebar.properties;
+&section.title.properties;
+&section.title.level1.properties;
+&section.title.level2.properties;
+&section.title.level3.properties;
+&section.title.level4.properties;
+&section.title.level5.properties;
+&section.title.level6.properties;
+&section.properties;
+&section.level1.properties;
+&section.level2.properties;
+&section.level3.properties;
+&section.level4.properties;
+&section.level5.properties;
+&section.level6.properties;
+&figure.properties;
+&example.properties;
+&equation.properties;
+&table.properties;
+&procedure.properties;
+&root.properties;
+&qanda.title.properties;
+&qanda.title.level1.properties;
+&qanda.title.level2.properties;
+&qanda.title.level3.properties;
+&qanda.title.level4.properties;
+&qanda.title.level5.properties;
+&qanda.title.level6.properties;
+&article.appendix.title.properties;
+</reference>
+
+<reference><title>Profiling</title>
+<partintro>
+<para>Following parameters can be used for attribute value based
+profiling of your document. For more info about profiling look at
+<ulink
+url="http://docbook.sourceforge.net/projects/xsl/doc/tools/profiling.html">http://docbook.sourceforge.net/projects/xsl/doc/tools/profiling.html</ulink>.</para>
+</partintro>
+&profile.arch;
+&profile.condition;
+&profile.conformance;
+&profile.lang;
+&profile.os;
+&profile.revision;
+&profile.revisionflag;
+&profile.role;
+&profile.security;
+&profile.userlevel;
+&profile.vendor;
+&profile.attribute;
+&profile.value;
+&profile.separator;
+</reference>
+
+<reference><title>Localization</title>
+&l10n.gentext.language;
+&l10n.gentext.default.language;
+&l10n.gentext.use.xref.language;
+</reference>
+
+<reference><title>EBNF</title>
+&ebnf.assignment;
+&ebnf.statement.terminator;
+</reference>
+
+<!--
+<reference><title></title>
+</reference>
+-->
+
+<appendix><title>The Stylesheet</title>
+
+<para>The <filename>param.xsl</filename> stylesheet is just a wrapper
+around all these parameters.</para>
+
+<src:fragment id="top" mundane-result-prefixes="xsl">
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                exclude-result-prefixes="src"
+                version='1.0'>
+
+<!-- This file is generated from param.xweb; do not edit this file! -->
+
+<!-- ********************************************************************
+     $Id: param.xweb,v 1.1.1.1 2004/10/19 21:21:44 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<src:fragref linkend="admon.graphics.extension.frag"/>
+<src:fragref linkend="admon.graphics.frag"/>
+<src:fragref linkend="admon.graphics.path.frag"/>
+<src:fragref linkend="admon.textlabel.frag"/>
+<src:fragref linkend="admonition.properties.frag"/>
+<src:fragref linkend="admonition.title.properties.frag"/>
+<src:fragref linkend="alignment.frag"/>
+<src:fragref linkend="appendix.autolabel.frag"/>
+<src:fragref linkend="arbortext.extensions.frag"/>
+<src:fragref linkend="article.appendix.title.properties.frag"/>
+<src:fragref linkend="author.othername.in.middle.frag"/>
+<src:fragref linkend="autotoc.label.separator.frag"/>
+<src:fragref linkend="axf.extensions.frag"/>
+<src:fragref linkend="biblioentry.item.separator.frag"/>
+<src:fragref linkend="bibliography.collection.frag"/>
+<src:fragref linkend="bibliography.numbered.frag"/>
+<src:fragref linkend="blockquote.properties.frag"/>
+<src:fragref linkend="body.font.family.frag"/>
+<src:fragref linkend="body.font.master.frag"/>
+<src:fragref linkend="body.font.size.frag"/>
+<src:fragref linkend="body.margin.bottom.frag"/>
+<src:fragref linkend="body.margin.top.frag"/>
+<src:fragref linkend="bridgehead.in.toc.frag"/>
+<src:fragref linkend="callout.defaultcolumn.frag"/>
+<src:fragref linkend="callout.graphics.extension.frag"/>
+<src:fragref linkend="callout.graphics.frag"/>
+<src:fragref linkend="callout.graphics.number.limit.frag"/>
+<src:fragref linkend="callout.graphics.path.frag"/>
+<src:fragref linkend="callout.unicode.font.frag"/>
+<src:fragref linkend="callout.unicode.frag"/>
+<src:fragref linkend="callout.unicode.number.limit.frag"/>
+<src:fragref linkend="callout.unicode.start.character.frag"/>
+<src:fragref linkend="callouts.extension.frag"/>
+<src:fragref linkend="chapter.autolabel.frag"/>
+<src:fragref linkend="column.count.back.frag"/>
+<src:fragref linkend="column.count.body.frag"/>
+<src:fragref linkend="column.count.front.frag"/>
+<src:fragref linkend="column.count.index.frag"/>
+<src:fragref linkend="column.count.lot.frag"/>
+<src:fragref linkend="column.count.titlepage.frag"/>
+<src:fragref linkend="column.gap.back.frag"/>
+<src:fragref linkend="column.gap.body.frag"/>
+<src:fragref linkend="column.gap.front.frag"/>
+<src:fragref linkend="column.gap.index.frag"/>
+<src:fragref linkend="column.gap.lot.frag"/>
+<src:fragref linkend="column.gap.titlepage.frag"/>
+<src:fragref linkend="compact.list.item.spacing.frag"/>
+<src:fragref linkend="current.docid.frag"/>
+<src:fragref linkend="default.float.class.frag"/>
+<src:fragref linkend="default.image.width.frag"/>
+<src:fragref linkend="default.table.width.frag"/>
+<src:fragref linkend="default.units.frag"/>
+<src:fragref linkend="dingbat.font.family.frag"/>
+<src:fragref linkend="double.sided.frag"/>
+<src:fragref linkend="draft.mode.frag"/>
+<src:fragref linkend="draft.watermark.image.frag"/>
+<src:fragref linkend="ebnf.assignment.frag"/>
+<src:fragref linkend="ebnf.statement.terminator.frag"/>
+<src:fragref linkend="equation.properties.frag"/>
+<src:fragref linkend="example.properties.frag"/>
+<src:fragref linkend="figure.properties.frag"/>
+<src:fragref linkend="firstterm.only.link.frag"/>
+<src:fragref linkend="footer.content.properties.frag"/>
+<src:fragref linkend="footer.rule.frag"/>
+<src:fragref linkend="footer.column.widths.frag"/>
+<src:fragref linkend="footers.on.blank.pages.frag"/>
+<src:fragref linkend="footnote.font.size.frag"/>
+<src:fragref linkend="footnote.number.format.frag"/>
+<src:fragref linkend="footnote.number.symbols.frag"/>
+<src:fragref linkend="fop.extensions.frag"/>
+<src:fragref linkend="formal.object.properties.frag"/>
+<src:fragref linkend="formal.procedures.frag"/>
+<src:fragref linkend="formal.title.placement.frag"/>
+<src:fragref linkend="formal.title.properties.frag"/>
+<src:fragref linkend="funcsynopsis.decoration.frag"/>
+<src:fragref linkend="funcsynopsis.style.frag"/>
+<src:fragref linkend="function.parens.frag"/>
+<src:fragref linkend="generate.index.frag"/>
+<src:fragref linkend="generate.section.toc.level.frag"/>
+<src:fragref linkend="generate.toc.frag"/>
+<src:fragref linkend="glossary.as.blocks.frag"/>
+<src:fragref linkend="glossary.collection.frag"/>
+<src:fragref linkend="glossentry.show.acronym.frag"/>
+<src:fragref linkend="glosslist.as.blocks.frag"/>
+<src:fragref linkend="glossterm.auto.link.frag"/>
+<src:fragref linkend="glossterm.separation.frag"/>
+<src:fragref linkend="glossterm.width.frag"/>
+<src:fragref linkend="graphic.default.extension.frag"/>
+<src:fragref linkend="header.content.properties.frag"/>
+<src:fragref linkend="header.rule.frag"/>
+<src:fragref linkend="header.column.widths.frag"/>
+<src:fragref linkend="headers.on.blank.pages.frag"/>
+<src:fragref linkend="hyphenate.frag"/>
+<src:fragref linkend="ignore.image.scaling.frag"/>
+<src:fragref linkend="informal.object.properties.frag"/>
+<src:fragref linkend="index.preferred.page.properties.frag"/>
+<src:fragref linkend="insert.xref.page.number.frag"/>
+<src:fragref linkend="l10n.gentext.default.language.frag"/>
+<src:fragref linkend="l10n.gentext.language.frag"/>
+<src:fragref linkend="l10n.gentext.use.xref.language.frag"/>
+<src:fragref linkend="label.from.part.frag"/>
+<src:fragref linkend="line-height.frag"/>
+<src:fragref linkend="linenumbering.everyNth.frag"/>
+<src:fragref linkend="linenumbering.extension.frag"/>
+<src:fragref linkend="linenumbering.separator.frag"/>
+<src:fragref linkend="linenumbering.width.frag"/>
+<src:fragref linkend="list.block.spacing.frag"/>
+<src:fragref linkend="list.item.spacing.frag"/>
+<src:fragref linkend="make.index.markup.frag"/>
+<src:fragref linkend="make.single.year.ranges.frag"/>
+<src:fragref linkend="make.year.ranges.frag"/>
+<src:fragref linkend="marker.section.level.frag"/>
+<src:fragref linkend="menuchoice.menu.separator.frag"/>
+<src:fragref linkend="menuchoice.separator.frag"/>
+<src:fragref linkend="monospace.font.family.frag"/>
+<src:fragref linkend="monospace.properties.frag"/>
+<src:fragref linkend="monospace.verbatim.properties.frag"/>
+<src:fragref linkend="nominal.table.width.frag"/>
+<src:fragref linkend="normal.para.spacing.frag"/>
+<src:fragref linkend="olink.doctitle.frag"/>
+<src:fragref linkend="page.height.frag"/>
+<src:fragref linkend="page.height.portrait.frag"/>
+<src:fragref linkend="page.margin.bottom.frag"/>
+<src:fragref linkend="page.margin.inner.frag"/>
+<src:fragref linkend="page.margin.outer.frag"/>
+<src:fragref linkend="page.margin.top.frag"/>
+<src:fragref linkend="page.orientation.frag"/>
+<src:fragref linkend="page.width.frag"/>
+<src:fragref linkend="page.width.portrait.frag"/>
+<src:fragref linkend="paper.type.frag"/>
+<src:fragref linkend="part.autolabel.frag"/>
+<src:fragref linkend="passivetex.extensions.frag"/>
+<src:fragref linkend="preface.autolabel.frag"/>
+<src:fragref linkend="preferred.mediaobject.role.frag"/>
+<src:fragref linkend="procedure.properties.frag"/>
+<src:fragref linkend="process.empty.source.toc.frag"/>
+<src:fragref linkend="process.source.toc.frag"/>
+<src:fragref linkend="profile.arch.frag"/>
+<src:fragref linkend="profile.attribute.frag"/>
+<src:fragref linkend="profile.condition.frag"/>
+<src:fragref linkend="profile.conformance.frag"/>
+<src:fragref linkend="profile.lang.frag"/>
+<src:fragref linkend="profile.os.frag"/>
+<src:fragref linkend="profile.revision.frag"/>
+<src:fragref linkend="profile.revisionflag.frag"/>
+<src:fragref linkend="profile.role.frag"/>
+<src:fragref linkend="profile.security.frag"/>
+<src:fragref linkend="profile.separator.frag"/>
+<src:fragref linkend="profile.userlevel.frag"/>
+<src:fragref linkend="profile.value.frag"/>
+<src:fragref linkend="profile.vendor.frag"/>
+<src:fragref linkend="punct.honorific.frag"/>
+<src:fragref linkend="qanda.defaultlabel.frag"/>
+<src:fragref linkend="qanda.inherit.numeration.frag"/>
+<src:fragref linkend="qandadiv.autolabel.frag"/>
+<src:fragref linkend="qanda.title.level1.properties.frag"/>
+<src:fragref linkend="qanda.title.level2.properties.frag"/>
+<src:fragref linkend="qanda.title.level3.properties.frag"/>
+<src:fragref linkend="qanda.title.level4.properties.frag"/>
+<src:fragref linkend="qanda.title.level5.properties.frag"/>
+<src:fragref linkend="qanda.title.level6.properties.frag"/>
+<src:fragref linkend="qanda.title.properties.frag"/>
+<src:fragref linkend="refentry.generate.name.frag"/>
+<src:fragref linkend="refentry.generate.title.frag"/>
+<src:fragref linkend="refentry.pagebreak.frag"/>
+<src:fragref linkend="refentry.title.properties.frag"/>
+<src:fragref linkend="refentry.xref.manvolnum.frag"/>
+<src:fragref linkend="region.after.extent.frag"/>
+<src:fragref linkend="region.before.extent.frag"/>
+<src:fragref linkend="root.properties.frag"/>
+<src:fragref linkend="rootid.frag"/>
+<src:fragref linkend="runinhead.default.title.end.punct.frag"/>
+<src:fragref linkend="runinhead.title.end.punct.frag"/>
+<src:fragref linkend="sans.font.family.frag"/>
+<src:fragref linkend="section.autolabel.frag"/>
+<src:fragref linkend="section.label.includes.component.label.frag"/>
+<src:fragref linkend="section.title.level1.properties.frag"/>
+<src:fragref linkend="section.title.level2.properties.frag"/>
+<src:fragref linkend="section.title.level3.properties.frag"/>
+<src:fragref linkend="section.title.level4.properties.frag"/>
+<src:fragref linkend="section.title.level5.properties.frag"/>
+<src:fragref linkend="section.title.level6.properties.frag"/>
+<src:fragref linkend="section.title.properties.frag"/>
+<src:fragref linkend="section.level1.properties.frag"/>
+<src:fragref linkend="section.level2.properties.frag"/>
+<src:fragref linkend="section.level3.properties.frag"/>
+<src:fragref linkend="section.level4.properties.frag"/>
+<src:fragref linkend="section.level5.properties.frag"/>
+<src:fragref linkend="section.level6.properties.frag"/>
+<src:fragref linkend="section.properties.frag"/>
+<src:fragref linkend="segmentedlist.as.table.frag"/>
+<src:fragref linkend="shade.verbatim.frag"/>
+<src:fragref linkend="shade.verbatim.style.frag"/>
+<src:fragref linkend="show.comments.frag"/>
+<src:fragref linkend="sidebar.properties.frag"/>
+<src:fragref linkend="subscript.properties.frag"/>
+<src:fragref linkend="superscript.properties.frag"/>
+<src:fragref linkend="symbol.font.family.frag"/>
+<src:fragref linkend="table.cell.border.color.frag"/>
+<src:fragref linkend="table.cell.border.style.frag"/>
+<src:fragref linkend="table.cell.border.thickness.frag"/>
+<src:fragref linkend="table.cell.padding.frag"/>
+<src:fragref linkend="table.footnote.number.format.frag"/>
+<src:fragref linkend="table.footnote.number.symbols.frag"/>
+<src:fragref linkend="table.frame.border.color.frag"/>
+<src:fragref linkend="table.frame.border.style.frag"/>
+<src:fragref linkend="table.frame.border.thickness.frag"/>
+<src:fragref linkend="table.properties.frag"/>
+<src:fragref linkend="tablecolumns.extension.frag"/>
+<src:fragref linkend="table.table.properties.frag"/>
+<src:fragref linkend="target.database.document.frag"/>
+<src:fragref linkend="tex.math.delims.frag"/>
+<src:fragref linkend="tex.math.in.alt.frag"/>
+<src:fragref linkend="textinsert.extension.frag"/>
+<src:fragref linkend="title.font.family.frag"/>
+<src:fragref linkend="title.margin.left.frag"/>
+<src:fragref linkend="toc.indent.width.frag"/>
+<src:fragref linkend="toc.margin.properties.frag"/>
+<src:fragref linkend="toc.section.depth.frag"/>
+<src:fragref linkend="ulink.footnote.number.format.frag"/>
+<src:fragref linkend="ulink.footnotes.frag"/>
+<src:fragref linkend="ulink.hyphenate.frag"/>
+<src:fragref linkend="ulink.show.frag"/>
+<src:fragref linkend="use.extensions.frag"/>
+<src:fragref linkend="use.local.olink.style.frag"/>
+<src:fragref linkend="use.role.as.xrefstyle.frag"/>
+<src:fragref linkend="use.role.for.mediaobject.frag"/>
+<src:fragref linkend="use.svg.frag"/>
+<src:fragref linkend="variablelist.as.blocks.frag"/>
+<src:fragref linkend="variablelist.max.termlength.frag"/>
+<src:fragref linkend="verbatim.properties.frag"/>
+<src:fragref linkend="xep.extensions.frag"/>
+<src:fragref linkend="xep.index.item.properties.frag"/>
+<src:fragref linkend="xref.label-page.separator.frag"/>
+<src:fragref linkend="xref.label-title.separator.frag"/>
+<src:fragref linkend="xref.properties.frag"/>
+<src:fragref linkend="xref.title-page.separator.frag"/>
+<src:fragref linkend="xref.with.number.and.title.frag"/>
+
+</xsl:stylesheet>
+</src:fragment>
+
+</appendix>
+
+</book>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/passivetex.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/passivetex.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/passivetex.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,49 @@
+<?xml version='1.0' encoding="utf-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: passivetex.xsl,v 1.1.1.1 2004/10/19 21:21:44 juntao Exp $
+     ********************************************************************
+      This extension stops PassiveTeX from merging subsequent '-' to 
+      dashes. You must set passivetex.extensions to '1' if you want get
+      this functionality.
+     ******************************************************************** -->
+
+<xsl:template match="text()">
+  <xsl:choose>
+    <xsl:when test="$passivetex.extensions != 0">
+      <xsl:call-template name="passivetex.dash.subst">
+        <xsl:with-param name="string" select="."/>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:value-of select="."/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="passivetex.dash.subst">
+  <xsl:param name="string"/>
+
+  <xsl:choose>
+    <xsl:when test="contains($string, '--')">
+      <xsl:variable name="rest">
+        <xsl:call-template name="passivetex.dash.subst">
+          <xsl:with-param name="string"
+                          select="concat('-', substring-after($string, '--'))"/>
+        </xsl:call-template>
+      </xsl:variable>
+      <xsl:value-of select="concat(substring-before($string, '--'),
+                                   '-&#x200b;',
+                                   $rest)"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:value-of select="$string"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+</xsl:stylesheet>
+

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/pdf2index
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/pdf2index	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/pdf2index	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,140 @@
+#!/usr/bin/perl -- # -*- Perl -*-
+
+# this needs some cleanup...
+
+my $PSTOTEXT = "pstotext";
+
+my $pdf = shift @ARGV;
+
+my $index = "";
+my $inindex = 0;
+open (F, "$PSTOTEXT $pdf |");
+while (<F>) {
+    if (/^<\/index/) {
+	$index .= $_;
+	$inindex = 0;
+    }
+    $inindex = 1 if /^<index/;
+
+    if ($inindex) {
+	$index .= $_ if /^\s*</;
+    }
+}
+
+my $cindex = "";
+while ($index =~ /^(.*?)((<phrase role=\"pageno\">.*?<\/phrase>\s*)+)/s) {
+    $cindex .= $1;
+    $_ = $2;
+    $index = $'; # '
+
+    my @pages = m/<phrase role=\"pageno\">.*?<\/phrase>\s*/sg;
+
+    # Expand ranges
+    if ($#pages >= 0) {
+	my @mpages = ();
+	foreach my $page (@pages) {
+	    my $pageno = &pageno($page);
+	    if ($pageno =~ /^([0-9]+)[^0-9]([0-9]+)$/) { # funky -
+		for (my $count = $1; $count <= $2; $count++) {
+		    push (@mpages, "<phrase role=\"$pageno\">$count</phrase>");
+		}
+	    } else {
+		push (@mpages, $page);
+	    }
+	}
+	@pages = sort rangesort @mpages;
+    }
+
+    # Remove duplicates...
+    if ($#pages > 0) {
+	my @mpages = ();
+	my $current = "";
+	foreach my $page (@pages) {
+	    my $pageno = &pageno($page);
+	    if ($pageno ne $current) {
+		push (@mpages, $page);
+		$current = $pageno;
+	    }
+	}
+	@pages = @mpages;
+    }
+
+    # Collapse ranges...
+    if ($#pages > 1) {
+	my @cpages = ();
+	while (@pages) {
+	    my $count = 0;
+	    my $len = &rangelen($count, @pages);
+	    if ($len <= 2) {
+		my $page = shift @pages;
+		push (@cpages, $page);
+	    } else {
+		my $fpage = shift @pages;
+		my $lpage = "";
+		while ($len > 1) {
+		    $lpage = shift @pages;
+		    $len--;
+		}
+		my $fpno = &pageno($fpage);
+		my $lpno = &pageno($lpage);
+		$fpage =~ s/>$fpno</>${fpno}-$lpno</s;
+		push (@cpages, $fpage);
+	    }
+	}
+	@pages = @cpages;
+    }
+
+    my $page = shift @pages;
+    $page =~ s/\s*$//s;
+    $cindex .= $page;
+    while (@pages) {
+	$page = shift @pages;
+	$page =~ s/\s*$//s;
+	$cindex .= ", $page";
+    }
+}
+$cindex .= $index;
+
+print "$cindex\n";
+
+sub pageno {
+    my $page = shift;
+
+    $page =~ s/^<phrase.*?>//;
+    $page =~ s/^<link.*?>//;
+
+    return $1 if $page =~ /^([^<>]+)/;
+    return "?";
+}
+
+sub rangesort {
+    my $apno = &pageno($a);
+    my $bpno = &pageno($b);
+
+    # Make sure roman pages come before arabic ones, otherwise sort them in order
+    return -1 if ($apno !~ /^\d+/ && $bpno =~ /^\d+/);
+    return  1 if ($apno =~ /^\d+/ && $bpno !~ /^\d+/);
+    return $apno cmp $bpno;
+}
+
+sub rangelen {
+    my $count = shift;
+    my @pages = @_;
+    my $len = 1;
+    my $inrange = 1;
+
+    my $current = &pageno($pages[$count]);
+    while ($count < $#pages && $inrange) {
+	$count++;
+	my $next = &pageno($pages[$count]);
+	if ($current + 1 eq $next) {
+	    $current = $next;
+	    $inrange = 1;
+	    $len++;
+	} else {
+	    $inrange = 0;
+	}
+    }
+
+    return $len;
+}

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/pi.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/pi.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/pi.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,162 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: pi.xsl,v 1.1.1.1 2004/10/19 21:21:44 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<xsl:template match="processing-instruction()">
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="dbfo-attribute">
+  <xsl:param name="pis" select="processing-instruction('dbfo')"/>
+  <xsl:param name="attribute">filename</xsl:param>
+
+  <xsl:call-template name="pi-attribute">
+    <xsl:with-param name="pis" select="$pis"/>
+    <xsl:with-param name="attribute" select="$attribute"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="dbfo-filename">
+  <xsl:param name="pis" select="./processing-instruction('dbfo')"/>
+  <xsl:call-template name="dbfo-attribute">
+    <xsl:with-param name="pis" select="$pis"/>
+    <xsl:with-param name="attribute">filename</xsl:with-param>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="dbfo-dir">
+  <xsl:param name="pis" select="./processing-instruction('dbfo')"/>
+  <xsl:call-template name="dbfo-attribute">
+    <xsl:with-param name="pis" select="$pis"/>
+    <xsl:with-param name="attribute">dir</xsl:with-param>
+  </xsl:call-template>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="process.cmdsynopsis.list">
+  <xsl:param name="cmdsynopses"/><!-- empty node list by default -->
+  <xsl:param name="count" select="1"/>
+
+  <xsl:choose>
+    <xsl:when test="$count>count($cmdsynopses)"></xsl:when>
+    <xsl:otherwise>
+      <xsl:variable name="cmdsyn" select="$cmdsynopses[$count]"/>
+
+       <dt>
+       <a>
+         <xsl:attribute name="href">
+           <xsl:call-template name="object.id">
+             <xsl:with-param name="object" select="$cmdsyn"/>
+           </xsl:call-template>
+         </xsl:attribute>
+
+         <xsl:choose>
+           <xsl:when test="$cmdsyn/@xreflabel">
+             <xsl:call-template name="xref.xreflabel">
+               <xsl:with-param name="target" select="$cmdsyn"/>
+             </xsl:call-template>
+           </xsl:when>
+           <xsl:otherwise>
+             <xsl:apply-templates select="$cmdsyn" mode="xref-to">
+               <xsl:with-param name="target" select="$cmdsyn"/>
+             </xsl:apply-templates>
+           </xsl:otherwise>
+         </xsl:choose>
+       </a>
+       </dt>
+
+        <xsl:call-template name="process.cmdsynopsis.list">
+          <xsl:with-param name="cmdsynopses" select="$cmdsynopses"/>
+          <xsl:with-param name="count" select="$count+1"/>
+        </xsl:call-template>
+      </xsl:otherwise>
+    </xsl:choose>
+</xsl:template>
+
+<xsl:template match="processing-instruction('dbcmdlist')">
+  <xsl:variable name="cmdsynopses" select="..//cmdsynopsis"/>
+
+  <xsl:if test="count($cmdsynopses)&lt;1">
+    <xsl:message><xsl:text>No cmdsynopsis elements matched dbcmdlist PI, perhaps it's nested too deep?</xsl:text>
+    </xsl:message>
+  </xsl:if>
+
+  <dl>
+    <xsl:call-template name="process.cmdsynopsis.list">
+      <xsl:with-param name="cmdsynopses" select="$cmdsynopses"/>
+    </xsl:call-template>
+  </dl>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="process.funcsynopsis.list">
+  <xsl:param name="funcsynopses"/><!-- empty node list by default -->
+  <xsl:param name="count" select="1"/>
+
+  <xsl:choose>
+    <xsl:when test="$count>count($funcsynopses)"></xsl:when>
+    <xsl:otherwise>
+      <xsl:variable name="cmdsyn" select="$funcsynopses[$count]"/>
+
+       <dt>
+       <a>
+         <xsl:attribute name="href">
+           <xsl:call-template name="object.id">
+             <xsl:with-param name="object" select="$cmdsyn"/>
+           </xsl:call-template>
+         </xsl:attribute>
+
+         <xsl:choose>
+           <xsl:when test="$cmdsyn/@xreflabel">
+             <xsl:call-template name="xref.xreflabel">
+               <xsl:with-param name="target" select="$cmdsyn"/>
+             </xsl:call-template>
+           </xsl:when>
+           <xsl:otherwise>
+              <xsl:apply-templates select="$cmdsyn" mode="xref-to">
+                <xsl:with-param name="target" select="$cmdsyn"/>
+              </xsl:apply-templates>
+           </xsl:otherwise>
+         </xsl:choose>
+       </a>
+       </dt>
+
+        <xsl:call-template name="process.funcsynopsis.list">
+          <xsl:with-param name="funcsynopses" select="$funcsynopses"/>
+          <xsl:with-param name="count" select="$count+1"/>
+        </xsl:call-template>
+      </xsl:otherwise>
+    </xsl:choose>
+</xsl:template>
+
+<xsl:template match="processing-instruction('dbfunclist')">
+  <xsl:variable name="funcsynopses" select="..//funcsynopsis"/>
+
+  <xsl:if test="count($funcsynopses)&lt;1">
+    <xsl:message><xsl:text>No funcsynopsis elements matched dbfunclist PI, perhaps it's nested too deep?</xsl:text>
+    </xsl:message>
+  </xsl:if>
+
+  <dl>
+    <xsl:call-template name="process.funcsynopsis.list">
+      <xsl:with-param name="funcsynopses" select="$funcsynopses"/>
+    </xsl:call-template>
+  </dl>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/profile-docbook.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/profile-docbook.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/profile-docbook.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,246 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<!--This file was created automatically by xsl2profile-->
+<!--from the DocBook XSL stylesheets. Do not edit this file.-->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:exslt="http://exslt.org/common" exslt:dummy="dummy" extension-element-prefixes="exslt" exclude-result-prefixes="exsl exslt" version="1.0">
+
+<!-- It is important to use indent="no" here, otherwise verbatim -->
+<!-- environments get broken by indented tags...at least when the -->
+<!-- callout extension is used...at least with some processors -->
+<xsl:output method="xml" indent="no"/>
+
+<!-- ********************************************************************
+     $Id: profile-docbook.xsl,v 1.1.1.1 2004/10/19 21:21:44 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:include href="../VERSION"/>
+<xsl:include href="param.xsl"/>
+<xsl:include href="../lib/lib.xsl"/>
+<xsl:include href="../common/l10n.xsl"/>
+<xsl:include href="../common/common.xsl"/>
+<xsl:include href="../common/labels.xsl"/>
+<xsl:include href="../common/titles.xsl"/>
+<xsl:include href="../common/subtitles.xsl"/>
+<xsl:include href="../common/gentext.xsl"/>
+<xsl:include href="../common/pi.xsl"/>
+<xsl:include href="autotoc.xsl"/>
+<xsl:include href="autoidx.xsl"/>
+<xsl:include href="lists.xsl"/>
+<xsl:include href="callout.xsl"/>
+<xsl:include href="verbatim.xsl"/>
+<xsl:include href="graphics.xsl"/>
+<xsl:include href="xref.xsl"/>
+<xsl:include href="formal.xsl"/>
+<xsl:include href="table.xsl"/>
+<xsl:include href="htmltbl.xsl"/>
+<xsl:include href="sections.xsl"/>
+<xsl:include href="inline.xsl"/>
+<xsl:include href="footnote.xsl"/>
+<xsl:include href="fo.xsl"/>
+<xsl:include href="fo-rtf.xsl"/>
+<xsl:include href="info.xsl"/>
+<xsl:include href="keywords.xsl"/>
+<xsl:include href="division.xsl"/>
+<xsl:include href="index.xsl"/>
+<xsl:include href="toc.xsl"/>
+<xsl:include href="refentry.xsl"/>
+<xsl:include href="math.xsl"/>
+<xsl:include href="admon.xsl"/>
+<xsl:include href="component.xsl"/>
+<xsl:include href="biblio.xsl"/>
+<xsl:include href="glossary.xsl"/>
+<xsl:include href="block.xsl"/>
+<xsl:include href="task.xsl"/>
+<xsl:include href="qandaset.xsl"/>
+<xsl:include href="synop.xsl"/>
+<xsl:include href="titlepage.xsl"/>
+<xsl:include href="titlepage.templates.xsl"/>
+<xsl:include href="pagesetup.xsl"/>
+<xsl:include href="pi.xsl"/>
+<xsl:include href="ebnf.xsl"/>
+<xsl:include href="docbookng.xsl"/>
+
+<xsl:include href="fop.xsl"/>
+<xsl:include href="passivetex.xsl"/>
+<xsl:include href="xep.xsl"/>
+<xsl:include href="axf.xsl"/>
+
+<xsl:param name="stylesheet.result.type" select="'fo'"/>
+
+<!-- ==================================================================== -->
+
+<xsl:key name="id" match="*" use="@id"/>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="*">
+  <xsl:message>
+    <xsl:value-of select="name(.)"/>
+    <xsl:text> encountered</xsl:text>
+    <xsl:if test="parent::*">
+      <xsl:text> in </xsl:text>
+      <xsl:value-of select="name(parent::*)"/>
+    </xsl:if>
+    <xsl:text>, but no template matches.</xsl:text>
+  </xsl:message>
+  <fo:block color="red">
+    <xsl:text>&lt;</xsl:text>
+    <xsl:value-of select="name(.)"/>
+    <xsl:text>&gt;</xsl:text>
+    <xsl:apply-templates/> 
+    <xsl:text>&lt;/</xsl:text>
+    <xsl:value-of select="name(.)"/>
+    <xsl:text>&gt;</xsl:text>
+  </fo:block>
+</xsl:template>
+
+<!-- Update this list if new root elements supported -->
+<xsl:variable name="root.elements" select="' appendix article bibliography book chapter colophon dedication glossary index part preface refentry reference sect1 section set setindex '"/>
+
+<xslo:include xmlns:xslo="http://www.w3.org/1999/XSL/Transform" href="../profiling/profile-mode.xsl"/><xsl:template match="/"><xslo:variable xmlns:xslo="http://www.w3.org/1999/XSL/Transform" name="profiled-content"><xslo:apply-templates select="." mode="profile"/></xslo:variable><xslo:variable xmlns:xslo="http://www.w3.org/1999/XSL/Transform" name="profiled-nodes" select="exslt:node-set($profiled-content)"/>
+  <xsl:choose>
+    <xsl:when test="function-available('exsl:node-set')                     and namespace-uri(*[1]) = 'http://docbook.org/docbook-ng'">
+      <!-- Hack! If someone hands us a DocBook NG document, toss the namespace -->
+      <!-- and continue. Someday we may reverse this logic and add the namespace -->
+      <!-- to documents that don't have one. But not before the whole stylesheet -->
+      <!-- has been converted to use namespaces. i.e., don't hold your breath -->
+      <xsl:variable name="nons">
+	<xsl:apply-templates mode="stripNS"/>
+      </xsl:variable>
+      <xsl:apply-templates select="exsl:node-set($nons)"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:variable name="document.element" select="*[1]"/>
+
+      <xsl:if test="not(contains($root.elements,                           concat(' ', local-name($document.element), ' ')))">
+	<xsl:message terminate="yes">
+	  <xsl:text>ERROR: Document root element for FO output </xsl:text>
+	  <xsl:text>must be one of the following elements:</xsl:text>
+	  <xsl:value-of select="$root.elements"/>
+	</xsl:message>
+      </xsl:if>
+
+      <xsl:call-template name="root.messages"/>
+
+      <xsl:variable name="title">
+	<xsl:choose>
+	  <xsl:when test="$document.element/title[1]">
+	    <xsl:value-of select="$document.element/title[1]"/>
+	  </xsl:when>
+	  <xsl:otherwise>[could not find document title]</xsl:otherwise>
+	</xsl:choose>
+      </xsl:variable>
+      
+      <fo:root xsl:use-attribute-sets="root.properties">
+	<xsl:attribute name="language">
+	  <xsl:call-template name="l10n.language">
+	    <xsl:with-param name="target" select="/*[1]"/>
+	  </xsl:call-template>
+	</xsl:attribute>
+
+	<xsl:if test="$xep.extensions != 0">
+	  <xsl:call-template name="xep-document-information"/>
+	</xsl:if>
+	<xsl:if test="$axf.extensions != 0">
+	  <xsl:call-template name="axf-document-information"/>
+	</xsl:if>
+	<xsl:call-template name="setup.pagemasters"/>
+	<xsl:choose>
+	  <xsl:when test="$rootid != ''">
+	    <xsl:choose>
+	      <xsl:when test="count($profiled-nodes//*[@id=$rootid]) = 0">
+		<xsl:message terminate="yes">
+		  <xsl:text>ID '</xsl:text>
+		  <xsl:value-of select="$rootid"/>
+		  <xsl:text>' not found in document.</xsl:text>
+		</xsl:message>
+	      </xsl:when>
+	      <xsl:otherwise>
+		<xsl:if test="$fop.extensions != 0">
+		  <xsl:apply-templates select="$profiled-nodes//*[@id=$rootid]" mode="fop.outline"/>
+		</xsl:if>
+		<xsl:if test="$xep.extensions != 0">
+		  <xsl:variable name="bookmarks">
+		    <xsl:apply-templates select="$profiled-nodes//*[@id=$rootid]" mode="xep.outline"/>
+		  </xsl:variable>
+		  <xsl:if test="string($bookmarks) != ''">
+		    <rx:outline xmlns:rx="http://www.renderx.com/XSL/Extensions">
+		      <xsl:copy-of select="$bookmarks"/>
+		    </rx:outline>
+		  </xsl:if>
+		</xsl:if>
+		<xsl:apply-templates select="$profiled-nodes//*[@id=$rootid]"/>
+	      </xsl:otherwise>
+	    </xsl:choose>
+	  </xsl:when>
+	  <xsl:otherwise>
+	    <xsl:if test="$fop.extensions != 0">
+	      <xsl:apply-templates mode="fop.outline" select="$profiled-nodes/node()"/>
+	    </xsl:if>
+	    <xsl:if test="$xep.extensions != 0">
+	      <xsl:variable name="bookmarks">
+		<xsl:apply-templates mode="xep.outline" select="$profiled-nodes/node()"/>
+	      </xsl:variable>
+	      <xsl:if test="string($bookmarks) != ''">
+		<rx:outline xmlns:rx="http://www.renderx.com/XSL/Extensions">
+		  <xsl:copy-of select="$bookmarks"/>
+		</rx:outline>
+	      </xsl:if>
+	    </xsl:if>
+	    <xsl:apply-templates select="$profiled-nodes/node()"/>
+	  </xsl:otherwise>
+	</xsl:choose>
+      </fo:root>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="root.messages">
+  <!-- redefine this any way you'd like to output messages -->
+  <!-- DO NOT OUTPUT ANYTHING FROM THIS TEMPLATE -->
+  <xsl:message>
+    <xsl:text>Making </xsl:text>
+    <xsl:value-of select="$page.orientation"/>
+    <xsl:text> pages on </xsl:text>
+    <xsl:value-of select="$paper.type"/>
+    <xsl:text> paper (</xsl:text>
+    <xsl:value-of select="$page.width"/>
+    <xsl:text>x</xsl:text>
+    <xsl:value-of select="$page.height"/>
+    <xsl:text>)</xsl:text>
+  </xsl:message>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="*" mode="stripNS">
+  <xsl:choose>
+    <xsl:when test="namespace-uri(.) = 'http://docbook.org/docbook-ng'">
+      <xsl:element name="{local-name(.)}">
+	<xsl:copy-of select="@*"/>
+	<xsl:apply-templates mode="stripNS"/>
+      </xsl:element>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:copy>
+	<xsl:copy-of select="@*"/>
+	<xsl:apply-templates mode="stripNS"/>
+      </xsl:copy>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="comment()|processing-instruction()|text()" mode="stripNS">
+  <xsl:copy/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/qandaset.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/qandaset.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/qandaset.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,355 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: qandaset.xsl,v 1.2 2005/03/16 20:44:25 orb Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:template match="qandaset">
+  <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
+
+  <xsl:variable name="label-width">
+    <xsl:call-template name="dbfo-attribute">
+      <xsl:with-param name="pis"
+                      select="processing-instruction('dbfo')"/>
+      <xsl:with-param name="attribute" select="'label-width'"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="label-length">
+    <xsl:choose>
+      <xsl:when test="$label-width != ''">
+        <xsl:value-of select="$label-width"/>
+      </xsl:when>
+      <xsl:when test="descendant::label">
+        <xsl:call-template name="longest.term">
+          <xsl:with-param name="terms" select="descendant::label"/>
+          <xsl:with-param name="maxlength" select="20"/>
+        </xsl:call-template>
+        <xsl:text>em * 0.50</xsl:text>
+      </xsl:when>
+      <xsl:otherwise>2.5em</xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <fo:block id="{$id}">
+    <xsl:if test="blockinfo/title|info/title|title">
+      <xsl:apply-templates select="(blockinfo/title|info/title|title)[1]"/>
+    </xsl:if>
+
+    <xsl:apply-templates select="*[name(.) != 'title'
+                                 and name(.) != 'titleabbrev'
+                                 and name(.) != 'qandadiv'
+                                 and name(.) != 'qandaentry']"/>
+    <xsl:apply-templates select="qandadiv"/>
+
+    <xsl:if test="qandaentry">
+      <fo:list-block xsl:use-attribute-sets="list.block.spacing"
+                     provisional-label-separation="0.2em">
+	<xsl:attribute name="provisional-distance-between-starts">
+	  <xsl:choose>
+	    <xsl:when test="$label-length != ''">
+	      <xsl:value-of select="$label-length"/>
+	    </xsl:when>
+	    <xsl:otherwise>2.5em</xsl:otherwise>
+	  </xsl:choose>
+	</xsl:attribute>
+        <xsl:apply-templates select="qandaentry"/>
+      </fo:list-block>
+    </xsl:if>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="qandaset/blockinfo/title|qandset/info/title|qandaset/title">
+  <xsl:variable name="enclsect" select="(ancestor::section
+                                        | ancestor::simplesect
+                                        | ancestor::sect5
+                                        | ancestor::sect4
+                                        | ancestor::sect3
+                                        | ancestor::sect2
+                                        | ancestor::sect1
+                                        | ancestor::refsect3
+                                        | ancestor::refsect2
+                                        | ancestor::refsect1)[last()]"/>
+  <xsl:variable name="sectlvl">
+    <xsl:call-template name="section.level">
+      <xsl:with-param name="node" select="$enclsect"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:call-template name="qanda.heading">
+    <xsl:with-param name="level" select="$sectlvl + 1"/>
+    <xsl:with-param name="marker" select="0"/>
+    <xsl:with-param name="title">
+      <xsl:apply-templates/>
+    </xsl:with-param>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="qandaset/blockinfo">
+  <!-- what should this template really do? -->
+  <xsl:apply-templates select="legalnotice" mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="qandadiv">
+  <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
+
+  <xsl:variable name="label-width">
+    <xsl:call-template name="dbfo-attribute">
+      <xsl:with-param name="pis"
+                      select="processing-instruction('dbfo')"/>
+      <xsl:with-param name="attribute" select="'label-width'"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="label-length">
+    <xsl:choose>
+      <xsl:when test="$label-width != ''">
+        <xsl:value-of select="$label-width"/>
+      </xsl:when>
+      <xsl:when test="descendant::label">
+        <xsl:call-template name="longest.term">
+          <xsl:with-param name="terms" select="descendant::label"/>
+          <xsl:with-param name="maxlength" select="20"/>
+        </xsl:call-template>
+        <xsl:text>*0.6em</xsl:text>
+      </xsl:when>
+      <xsl:otherwise>2.5em</xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <fo:block id="{$id}">
+    <xsl:apply-templates select="(blockinfo/title|info/title|title)[1]"/>
+    <xsl:apply-templates select="*[name(.) != 'title'
+                                 and name(.) != 'titleabbrev'
+                                 and name(.) != 'qandadiv'
+                                 and name(.) != 'qandaentry']"/>
+    <fo:block start-indent="{count(ancestor::qandadiv)*2}pc">
+      <xsl:apply-templates select="qandadiv"/>
+
+      <xsl:if test="qandaentry">
+        <fo:list-block xsl:use-attribute-sets="list.block.spacing"
+                       provisional-label-separation="0.2em">
+	  <xsl:attribute name="provisional-distance-between-starts">
+	    <xsl:choose>
+	      <xsl:when test="$label-length != ''">
+	        <xsl:value-of select="$label-length"/>
+	      </xsl:when>
+	      <xsl:otherwise>2.5em</xsl:otherwise>
+	    </xsl:choose>
+	  </xsl:attribute>
+          <xsl:apply-templates select="qandaentry"/>
+        </fo:list-block>
+      </xsl:if>
+    </fo:block>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="qandadiv/blockinfo/title|qandadiv/info/title|qandadiv/title">
+  <xsl:variable name="enclsect" select="(ancestor::section
+                                        | ancestor::simplesect
+                                        | ancestor::sect5
+                                        | ancestor::sect4
+                                        | ancestor::sect3
+                                        | ancestor::sect2
+                                        | ancestor::sect1
+                                        | ancestor::refsect3
+                                        | ancestor::refsect2
+                                        | ancestor::refsect1)[last()]"/>
+  <xsl:variable name="sectlvl">
+    <xsl:call-template name="section.level">
+      <xsl:with-param name="node" select="$enclsect"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:call-template name="qanda.heading">
+    <xsl:with-param name="level"  select="$sectlvl + 1 + count(ancestor::qandadiv)"/>
+    <xsl:with-param name="marker" select="0"/>
+    <xsl:with-param name="title">
+      <xsl:apply-templates select="parent::qandadiv" mode="label.markup"/>
+      <xsl:if test="$qandadiv.autolabel != 0">
+        <xsl:apply-templates select="." mode="intralabel.punctuation"/>
+	<xsl:text> </xsl:text>
+      </xsl:if>
+      <xsl:apply-templates/>
+    </xsl:with-param>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="qandaentry">
+  <xsl:apply-templates/>
+<!--
+  <fo:block>
+    <xsl:if test="@id">
+      <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
+    </xsl:if>
+    <xsl:apply-templates/>
+  </fo:block>
+-->
+</xsl:template>
+
+<xsl:template match="question">
+  <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
+
+  <xsl:variable name="entry.id">
+    <xsl:call-template name="object.id">
+      <xsl:with-param name="object" select="parent::*"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="deflabel">
+    <xsl:choose>
+      <xsl:when test="ancestor-or-self::*[@defaultlabel]">
+        <xsl:value-of select="(ancestor-or-self::*[@defaultlabel])[last()]
+                              /@defaultlabel"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$qanda.defaultlabel"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <fo:list-item id="{$entry.id}" xsl:use-attribute-sets="list.item.spacing">
+    <!-- NR: removed id="{$id}" from the list-item-label since it breaks FOP -->
+    <fo:list-item-label end-indent="label-end()">
+      <xsl:choose>
+        <xsl:when test="$deflabel = 'none'">
+          <fo:block/>
+        </xsl:when>
+        <xsl:otherwise>
+          <fo:block>
+            <xsl:apply-templates select="." mode="label.markup"/>
+	    <xsl:if test="$deflabel = 'number' and not(label)">
+              <xsl:apply-templates select="." mode="intralabel.punctuation"/>
+	    </xsl:if>
+          </fo:block>
+        </xsl:otherwise>
+      </xsl:choose>
+    </fo:list-item-label>
+    <fo:list-item-body start-indent="body-start()">
+      <xsl:choose>
+        <xsl:when test="$deflabel = 'none'">
+          <fo:block font-weight="bold">
+            <xsl:apply-templates select="*[local-name(.)!='label']"/>
+          </fo:block>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:apply-templates select="*[local-name(.)!='label']"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </fo:list-item-body>
+  </fo:list-item>
+</xsl:template>
+
+<xsl:template match="answer">
+  <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
+  <xsl:variable name="entry.id">
+    <xsl:call-template name="object.id">
+      <xsl:with-param name="object" select="parent::*"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="deflabel">
+    <xsl:choose>
+      <xsl:when test="ancestor-or-self::*[@defaultlabel]">
+        <xsl:value-of select="(ancestor-or-self::*[@defaultlabel])[last()]
+                              /@defaultlabel"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$qanda.defaultlabel"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <fo:list-item xsl:use-attribute-sets="list.item.spacing">
+    <!-- NR: removed id="{$id}" from the list-item-label since it breaks FOP -->
+    <fo:list-item-label end-indent="label-end()">
+      <xsl:choose>
+        <xsl:when test="$deflabel = 'none'">
+          <fo:block/>
+        </xsl:when>
+        <xsl:otherwise>
+          <fo:block>
+            <xsl:variable name="answer.label">
+              <xsl:apply-templates select="." mode="label.markup"/>
+            </xsl:variable>
+            <xsl:copy-of select="$answer.label"/>
+          </fo:block>
+        </xsl:otherwise>
+      </xsl:choose>
+    </fo:list-item-label>
+    <fo:list-item-body start-indent="body-start()">
+      <xsl:apply-templates select="*[local-name(.)!='label']"/>
+    </fo:list-item-body>
+  </fo:list-item>
+</xsl:template>
+
+<xsl:template match="label">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template name="qanda.heading">
+  <xsl:param name="level" select="1"/>
+  <xsl:param name="marker" select="0"/>
+  <xsl:param name="title"/>
+  <xsl:param name="titleabbrev"/>
+
+  <fo:block xsl:use-attribute-sets="qanda.title.properties">
+    <xsl:if test="$marker != 0">
+      <fo:marker marker-class-name="section.head.marker">
+        <xsl:choose>
+          <xsl:when test="$titleabbrev = ''">
+            <xsl:value-of select="$title"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:value-of select="$titleabbrev"/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </fo:marker>
+    </xsl:if>
+    <xsl:choose>
+      <xsl:when test="$level=1">
+        <fo:block xsl:use-attribute-sets="qanda.title.level1.properties">
+          <xsl:copy-of select="$title"/>
+        </fo:block>
+      </xsl:when>
+      <xsl:when test="$level=2">
+        <fo:block xsl:use-attribute-sets="qanda.title.level2.properties">
+          <xsl:copy-of select="$title"/>
+        </fo:block>
+      </xsl:when>
+      <xsl:when test="$level=3">
+        <fo:block xsl:use-attribute-sets="qanda.title.level3.properties">
+          <xsl:copy-of select="$title"/>
+        </fo:block>
+      </xsl:when>
+      <xsl:when test="$level=4">
+        <fo:block xsl:use-attribute-sets="qanda.title.level4.properties">
+          <xsl:copy-of select="$title"/>
+        </fo:block>
+      </xsl:when>
+      <xsl:when test="$level=5">
+        <fo:block xsl:use-attribute-sets="qanda.title.level5.properties">
+          <xsl:copy-of select="$title"/>
+        </fo:block>
+      </xsl:when>
+      <xsl:otherwise>
+        <fo:block xsl:use-attribute-sets="qanda.title.level6.properties">
+          <xsl:copy-of select="$title"/>
+        </fo:block>
+      </xsl:otherwise>
+    </xsl:choose>
+  </fo:block>
+</xsl:template>
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/refentry.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/refentry.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/refentry.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,471 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: refentry.xsl,v 1.1.1.1 2004/10/19 21:21:44 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:template match="reference">
+   <xsl:if test="not(partintro)">
+    <xsl:variable name="id">
+      <xsl:call-template name="object.id"/>
+    </xsl:variable>
+    <xsl:variable name="master-reference">
+      <xsl:call-template name="select.pagemaster"/>
+    </xsl:variable>
+
+    <fo:page-sequence hyphenate="{$hyphenate}"
+                      master-reference="{$master-reference}">
+      <xsl:attribute name="language">
+        <xsl:call-template name="l10n.language"/>
+      </xsl:attribute>
+      <xsl:attribute name="format">
+        <xsl:call-template name="page.number.format"/>
+      </xsl:attribute>
+      <xsl:if test="$double.sided != 0">
+        <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
+      </xsl:if>
+
+      <xsl:attribute name="hyphenation-character">
+        <xsl:call-template name="gentext">
+          <xsl:with-param name="key" select="'hyphenation-character'"/>
+        </xsl:call-template>
+      </xsl:attribute>
+      <xsl:attribute name="hyphenation-push-character-count">
+        <xsl:call-template name="gentext">
+          <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
+        </xsl:call-template>
+      </xsl:attribute>
+      <xsl:attribute name="hyphenation-remain-character-count">
+        <xsl:call-template name="gentext">
+          <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
+        </xsl:call-template>
+      </xsl:attribute>
+
+      <xsl:apply-templates select="." mode="running.head.mode">
+        <xsl:with-param name="master-reference" select="$master-reference"/>
+      </xsl:apply-templates>
+      <xsl:apply-templates select="." mode="running.foot.mode">
+        <xsl:with-param name="master-reference" select="$master-reference"/>
+      </xsl:apply-templates>
+
+      <fo:flow flow-name="xsl-region-body">
+        <fo:block id="{$id}">
+          <xsl:call-template name="reference.titlepage"/>
+        </fo:block>
+      </fo:flow>
+    </fo:page-sequence>
+  </xsl:if>
+  <xsl:apply-templates select="partintro|refentry"/>
+</xsl:template>
+
+<xsl:template match="reference" mode="reference.titlepage.mode">
+  <xsl:call-template name="reference.titlepage"/>
+</xsl:template>
+
+<xsl:template match="reference/partintro">
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id">
+      <xsl:with-param name="object" select="ancestor::reference"/>
+    </xsl:call-template>
+  </xsl:variable>
+  <xsl:variable name="master-reference">
+    <xsl:call-template name="select.pagemaster"/>
+  </xsl:variable>
+
+  <fo:page-sequence hyphenate="{$hyphenate}"
+                    master-reference="{$master-reference}">
+    <xsl:attribute name="language">
+      <xsl:call-template name="l10n.language"/>
+    </xsl:attribute>
+    <xsl:attribute name="format">
+      <xsl:call-template name="page.number.format"/>
+    </xsl:attribute>
+    <xsl:if test="$double.sided != 0">
+      <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
+    </xsl:if>
+
+    <xsl:attribute name="hyphenation-character">
+      <xsl:call-template name="gentext">
+        <xsl:with-param name="key" select="'hyphenation-character'"/>
+      </xsl:call-template>
+    </xsl:attribute>
+    <xsl:attribute name="hyphenation-push-character-count">
+      <xsl:call-template name="gentext">
+        <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
+      </xsl:call-template>
+    </xsl:attribute>
+    <xsl:attribute name="hyphenation-remain-character-count">
+      <xsl:call-template name="gentext">
+        <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
+      </xsl:call-template>
+    </xsl:attribute>
+
+    <xsl:apply-templates select="." mode="running.head.mode">
+      <xsl:with-param name="master-reference" select="$master-reference"/>
+    </xsl:apply-templates>
+    <xsl:apply-templates select="." mode="running.foot.mode">
+      <xsl:with-param name="master-reference" select="$master-reference"/>
+    </xsl:apply-templates>
+
+    <fo:flow flow-name="xsl-region-body">
+      <xsl:apply-templates select=".." mode="reference.titlepage.mode"/>
+      <xsl:if test="title">
+        <fo:block id="{$id}">
+          <xsl:call-template name="partintro.titlepage"/>
+        </fo:block>
+      </xsl:if>
+      <xsl:apply-templates/>
+    </fo:flow>
+  </fo:page-sequence>
+</xsl:template>
+
+<xsl:template match="reference/docinfo|refentry/refentryinfo"></xsl:template>
+<xsl:template match="reference/title"></xsl:template>
+<xsl:template match="reference/subtitle"></xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="refentry">
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <xsl:variable name="master-reference">
+    <xsl:call-template name="select.pagemaster"/>
+  </xsl:variable>
+
+  <xsl:variable name="refentry.content">
+    <fo:block id="{$id}">
+      <xsl:apply-templates/>
+    </fo:block>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="not(parent::*) or 
+                    parent::reference or 
+                    parent::part">
+      <!-- make a page sequence -->
+      <fo:page-sequence hyphenate="{$hyphenate}"
+                        master-reference="{$master-reference}">
+        <xsl:attribute name="language">
+          <xsl:call-template name="l10n.language"/>
+        </xsl:attribute>
+        <xsl:attribute name="format">
+          <xsl:call-template name="page.number.format"/>
+        </xsl:attribute>
+        <xsl:if test="$double.sided != 0">
+          <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
+        </xsl:if>
+
+        <xsl:attribute name="hyphenation-character">
+          <xsl:call-template name="gentext">
+            <xsl:with-param name="key" select="'hyphenation-character'"/>
+          </xsl:call-template>
+        </xsl:attribute>
+        <xsl:attribute name="hyphenation-push-character-count">
+          <xsl:call-template name="gentext">
+            <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
+          </xsl:call-template>
+        </xsl:attribute>
+        <xsl:attribute name="hyphenation-remain-character-count">
+          <xsl:call-template name="gentext">
+            <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
+          </xsl:call-template>
+        </xsl:attribute>
+
+        <xsl:apply-templates select="." mode="running.head.mode">
+          <xsl:with-param name="master-reference" select="$master-reference"/>
+        </xsl:apply-templates>
+        <xsl:apply-templates select="." mode="running.foot.mode">
+          <xsl:with-param name="master-reference" select="$master-reference"/>
+        </xsl:apply-templates>
+
+        <fo:flow flow-name="xsl-region-body">
+          <xsl:copy-of select="$refentry.content"/>
+        </fo:flow>
+      </fo:page-sequence>
+    </xsl:when>
+    <xsl:otherwise>
+      <fo:block>
+        <xsl:if test="$refentry.pagebreak != 0">
+          <xsl:attribute name="break-before">page</xsl:attribute>
+        </xsl:if>
+        <xsl:copy-of select="$refentry.content"/>
+      </fo:block>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="refmeta">
+</xsl:template>
+
+<xsl:template match="manvolnum">
+  <xsl:if test="$refentry.xref.manvolnum != 0">
+    <xsl:text>(</xsl:text>
+    <xsl:apply-templates/>
+    <xsl:text>)</xsl:text>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="refmiscinfo">
+</xsl:template>
+
+<xsl:template match="refentrytitle">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="refnamediv">
+  <xsl:variable name="section.level">
+    <xsl:call-template name="refentry.level">
+      <xsl:with-param name="node" select="ancestor::refentry"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="reftitle">
+    <xsl:choose>
+      <xsl:when test="$refentry.generate.name != 0">
+        <xsl:call-template name="gentext">
+          <xsl:with-param name="key" select="'RefName'"/>
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:when test="$refentry.generate.title != 0">
+        <xsl:choose>
+          <xsl:when test="../refmeta/refentrytitle">
+            <xsl:apply-templates select="../refmeta/refentrytitle"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:apply-templates select="refname[1]"/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:when>
+    </xsl:choose>
+  </xsl:variable>
+
+  <!-- xsl:use-attribute-sets takes only a Qname, not a variable -->
+  <fo:block>
+    <xsl:choose>
+      <xsl:when test="$section.level = 1">
+        <fo:block xsl:use-attribute-sets="refentry.title.properties">
+          <fo:block xsl:use-attribute-sets="section.title.level1.properties">
+            <xsl:value-of select="$reftitle"/>
+          </fo:block>
+        </fo:block>
+      </xsl:when>
+      <xsl:when test="$section.level = 2">
+        <fo:block xsl:use-attribute-sets="refentry.title.properties">
+          <fo:block xsl:use-attribute-sets="section.title.level2.properties">
+            <xsl:value-of select="$reftitle"/>
+          </fo:block>
+        </fo:block>
+      </xsl:when>
+      <xsl:when test="$section.level = 3">
+        <fo:block xsl:use-attribute-sets="refentry.title.properties">
+          <fo:block xsl:use-attribute-sets="section.title.level3.properties">
+            <xsl:value-of select="$reftitle"/>
+          </fo:block>
+        </fo:block>
+      </xsl:when>
+      <xsl:when test="$section.level = 4">
+        <fo:block xsl:use-attribute-sets="refentry.title.properties">
+          <fo:block xsl:use-attribute-sets="section.title.level4.properties">
+            <xsl:value-of select="$reftitle"/>
+          </fo:block>
+        </fo:block>
+      </xsl:when>
+      <xsl:when test="$section.level = 5">
+        <fo:block xsl:use-attribute-sets="refentry.title.properties">
+          <fo:block xsl:use-attribute-sets="section.title.level5.properties">
+            <xsl:value-of select="$reftitle"/>
+          </fo:block>
+        </fo:block>
+      </xsl:when>
+      <xsl:otherwise>
+        <fo:block xsl:use-attribute-sets="refentry.title.properties">
+          <fo:block xsl:use-attribute-sets="section.title.level6.properties">
+            <xsl:value-of select="$reftitle"/>
+          </fo:block>
+        </fo:block>
+      </xsl:otherwise>
+    </xsl:choose>
+
+    <fo:block space-after="1em">
+      <xsl:choose>
+        <xsl:when test="../refmeta/refentrytitle">
+          <xsl:apply-templates select="../refmeta/refentrytitle"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:apply-templates select="refname[1]"/>
+        </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="refpurpose"/>
+    </fo:block>
+
+    <fo:block>
+      <xsl:for-each select="refname">
+        <xsl:apply-templates select="."/>
+        <xsl:if test="following-sibling::refname">
+          <xsl:text>, </xsl:text>
+        </xsl:if>
+      </xsl:for-each>
+    </fo:block>
+  </fo:block>
+</xsl:template>
+
+
+<xsl:template match="refname">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="refpurpose">
+  <xsl:text> </xsl:text>
+  <xsl:call-template name="dingbat">
+    <xsl:with-param name="dingbat">em-dash</xsl:with-param>
+  </xsl:call-template>
+  <xsl:text> </xsl:text>
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="refdescriptor">
+  <!-- todo: finish this -->
+</xsl:template>
+
+<xsl:template match="refclass">
+  <fo:block font-weight="bold">
+    <xsl:if test="@role">
+      <xsl:value-of select="@role"/>
+      <xsl:text>: </xsl:text>
+    </xsl:if>
+    <xsl:apply-templates/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="refsynopsisdiv">
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <fo:block id="{$id}">
+    <xsl:call-template name="refsynopsisdiv.titlepage"/>
+    <xsl:apply-templates/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="refsection">
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <fo:block id="{$id}">
+    <xsl:call-template name="refsection.titlepage"/>
+    <xsl:apply-templates/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="refsect1">
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <fo:block id="{$id}">
+    <xsl:call-template name="refsect1.titlepage"/>
+    <xsl:apply-templates/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="refsect2">
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <fo:block id="{$id}">
+    <xsl:call-template name="refsect2.titlepage"/>
+    <xsl:apply-templates/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="refsect3">
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <fo:block id="{$id}">
+    <xsl:call-template name="refsect3.titlepage"/>
+    <xsl:apply-templates/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="refsynopsisdiv/title
+                     |refsection/title
+                     |refsect1/title
+                     |refsect2/title
+                     |refsect3/title">
+  <!-- nop; titlepage.mode instead -->
+</xsl:template>
+
+<xsl:template match="refsynopsisdiv/title
+                     |refsection/title
+                     |refsect1/title
+                     |refsect2/title
+                     |refsect3/title"
+              mode="titlepage.mode"
+              priority="2">
+  <xsl:variable name="section" select="parent::*"/>
+  <fo:block keep-with-next.within-column="always">
+    <xsl:variable name="id">
+      <xsl:call-template name="object.id">
+        <xsl:with-param name="object" select="$section"/>
+      </xsl:call-template>
+    </xsl:variable>
+
+    <xsl:variable name="level">
+      <xsl:call-template name="section.level">
+        <xsl:with-param name="node" select="$section"/>
+      </xsl:call-template>
+    </xsl:variable>
+
+    <xsl:variable name="title">
+      <xsl:apply-templates select="$section" mode="object.title.markup">
+        <xsl:with-param name="allow-anchors" select="1"/>
+      </xsl:apply-templates>
+    </xsl:variable>
+
+    <xsl:if test="$passivetex.extensions != 0">
+      <fotex:bookmark xmlns:fotex="http://www.tug.org/fotex" 
+                      fotex-bookmark-level="{$level + 2}" 
+                      fotex-bookmark-label="{$id}">
+        <xsl:value-of select="$title"/>
+      </fotex:bookmark>
+    </xsl:if>
+
+    <xsl:if test="$axf.extensions != 0">
+      <xsl:attribute name="axf:outline-level">
+        <xsl:value-of select="count(ancestor::*)-1"/>
+      </xsl:attribute>
+      <xsl:attribute name="axf:outline-expand">false</xsl:attribute>
+      <xsl:attribute name="axf:outline-title">
+        <xsl:value-of select="$title"/>
+      </xsl:attribute>
+    </xsl:if>
+
+    <xsl:call-template name="section.heading">
+      <xsl:with-param name="level" select="$level"/>
+      <xsl:with-param name="title" select="$title"/>
+    </xsl:call-template>
+  </fo:block>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/sections.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/sections.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/sections.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,615 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: sections.xsl,v 1.1.1.1 2004/10/19 21:21:44 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:template match="section">
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <xsl:variable name="level">
+    <xsl:call-template name="section.level">
+      <xsl:with-param name="node" select="."/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <!-- xsl:use-attribute-sets takes only a Qname, not a variable -->
+  <xsl:choose>
+    <xsl:when test="$level = 1">
+      <fo:block id="{$id}"
+                xsl:use-attribute-sets="section.level1.properties">
+        <xsl:call-template name="section.content"/>
+      </fo:block>
+    </xsl:when>
+    <xsl:when test="$level = 2">
+      <fo:block id="{$id}"
+                xsl:use-attribute-sets="section.level2.properties">
+        <xsl:call-template name="section.content"/>
+      </fo:block>
+    </xsl:when>
+    <xsl:when test="$level = 3">
+      <fo:block id="{$id}"
+                xsl:use-attribute-sets="section.level3.properties">
+        <xsl:call-template name="section.content"/>
+      </fo:block>
+    </xsl:when>
+    <xsl:when test="$level = 4">
+      <fo:block id="{$id}"
+                xsl:use-attribute-sets="section.level4.properties">
+        <xsl:call-template name="section.content"/>
+      </fo:block>
+    </xsl:when>
+    <xsl:when test="$level = 5">
+      <fo:block id="{$id}"
+                xsl:use-attribute-sets="section.level5.properties">
+        <xsl:call-template name="section.content"/>
+      </fo:block>
+    </xsl:when>
+    <xsl:otherwise>
+      <fo:block id="{$id}"
+                xsl:use-attribute-sets="section.level6.properties">
+        <xsl:call-template name="section.content"/>
+      </fo:block>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="section.content">
+  <xsl:call-template name="section.titlepage"/>
+
+  <xsl:variable name="toc.params">
+    <xsl:call-template name="find.path.params">
+      <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:if test="contains($toc.params, 'toc')
+                and (count(ancestor::section)+1) &lt;= $generate.section.toc.level">
+    <xsl:call-template name="section.toc">
+      <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
+    </xsl:call-template>
+   <xsl:call-template name="section.toc.separator"/>
+  </xsl:if>
+
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="/section">
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id">
+      <xsl:with-param name="object" select="ancestor::reference"/>
+    </xsl:call-template>
+  </xsl:variable>
+  <xsl:variable name="master-reference">
+    <xsl:call-template name="select.pagemaster"/>
+  </xsl:variable>
+
+  <fo:page-sequence hyphenate="{$hyphenate}"
+                    master-reference="{$master-reference}">
+    <xsl:attribute name="language">
+      <xsl:call-template name="l10n.language"/>
+    </xsl:attribute>
+    <xsl:attribute name="format">
+      <xsl:call-template name="page.number.format"/>
+    </xsl:attribute>
+    <xsl:if test="$double.sided != 0">
+      <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
+    </xsl:if>
+
+    <xsl:attribute name="hyphenation-character">
+      <xsl:call-template name="gentext">
+        <xsl:with-param name="key" select="'hyphenation-character'"/>
+      </xsl:call-template>
+    </xsl:attribute>
+    <xsl:attribute name="hyphenation-push-character-count">
+      <xsl:call-template name="gentext">
+        <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
+      </xsl:call-template>
+    </xsl:attribute>
+    <xsl:attribute name="hyphenation-remain-character-count">
+      <xsl:call-template name="gentext">
+        <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
+      </xsl:call-template>
+    </xsl:attribute>
+
+    <xsl:apply-templates select="." mode="running.head.mode">
+      <xsl:with-param name="master-reference" select="$master-reference"/>
+    </xsl:apply-templates>
+    <xsl:apply-templates select="." mode="running.foot.mode">
+      <xsl:with-param name="master-reference" select="$master-reference"/>
+    </xsl:apply-templates>
+
+    <fo:flow flow-name="xsl-region-body">
+      <fo:block id="{$id}" 
+            xsl:use-attribute-sets="section.level1.properties">
+        <xsl:call-template name="section.titlepage"/>
+      </fo:block>
+
+      <xsl:variable name="toc.params">
+        <xsl:call-template name="find.path.params">
+          <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
+        </xsl:call-template>
+      </xsl:variable>
+
+      <xsl:if test="contains($toc.params, 'toc')
+                    and (count(ancestor::section)+1) &lt;= $generate.section.toc.level">
+        <xsl:call-template name="section.toc"/>
+        <xsl:call-template name="section.toc.separator"/>
+      </xsl:if>
+
+      <xsl:apply-templates/>
+   </fo:flow>
+  </fo:page-sequence>
+</xsl:template>
+
+<xsl:template match="section/title
+                     |simplesect/title
+                     |sect1/title
+                     |sect2/title
+                     |sect3/title
+                     |sect4/title
+                     |sect5/title"
+              mode="titlepage.mode"
+              priority="2">
+  <xsl:variable name="section" select="parent::*"/>
+  <fo:block keep-with-next.within-column="always">
+    <xsl:variable name="id">
+      <xsl:call-template name="object.id">
+        <xsl:with-param name="object" select="$section"/>
+      </xsl:call-template>
+    </xsl:variable>
+
+    <xsl:variable name="level">
+      <xsl:call-template name="section.level">
+        <xsl:with-param name="node" select="$section"/>
+      </xsl:call-template>
+    </xsl:variable>
+
+    <xsl:variable name="marker">
+      <xsl:choose>
+        <xsl:when test="$level &lt;= $marker.section.level">1</xsl:when>
+        <xsl:otherwise>0</xsl:otherwise>
+      </xsl:choose>
+    </xsl:variable>
+
+    <xsl:variable name="title">
+      <xsl:apply-templates select="$section" mode="object.title.markup">
+        <xsl:with-param name="allow-anchors" select="1"/>
+      </xsl:apply-templates>
+    </xsl:variable>
+
+    <xsl:variable name="titleabbrev">
+      <xsl:apply-templates select="$section" mode="titleabbrev.markup"/>
+    </xsl:variable>
+
+    <!-- Use for running head only if actual titleabbrev element -->
+    <xsl:variable name="titleabbrev.elem">
+      <xsl:if test="$section/titleabbrev">
+        <xsl:apply-templates select="$section" mode="titleabbrev.markup"/>
+      </xsl:if>
+    </xsl:variable>
+
+    <xsl:if test="$passivetex.extensions != 0">
+      <fotex:bookmark xmlns:fotex="http://www.tug.org/fotex" 
+                      fotex-bookmark-level="{$level + 2}" 
+                      fotex-bookmark-label="{$id}">
+        <xsl:value-of select="$titleabbrev"/>
+      </fotex:bookmark>
+    </xsl:if>
+
+    <xsl:if test="$axf.extensions != 0">
+      <xsl:attribute name="axf:outline-level">
+        <xsl:value-of select="count(ancestor::*)-1"/>
+      </xsl:attribute>
+      <xsl:attribute name="axf:outline-expand">false</xsl:attribute>
+      <xsl:attribute name="axf:outline-title">
+        <xsl:value-of select="$title"/>
+      </xsl:attribute>
+    </xsl:if>
+
+    <xsl:call-template name="section.heading">
+      <xsl:with-param name="level" select="$level"/>
+      <xsl:with-param name="title" select="$title"/>
+      <xsl:with-param name="marker" select="$marker"/>
+      <xsl:with-param name="titleabbrev" select="$titleabbrev.elem"/>
+    </xsl:call-template>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="sect1">
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <fo:block id="{$id}" 
+            xsl:use-attribute-sets="section.level1.properties">
+    <xsl:call-template name="sect1.titlepage"/>
+
+    <xsl:variable name="toc.params">
+      <xsl:call-template name="find.path.params">
+        <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
+      </xsl:call-template>
+    </xsl:variable>
+
+    <xsl:if test="contains($toc.params, 'toc')
+                  and $generate.section.toc.level &gt;= 1">
+      <xsl:call-template name="section.toc"/>
+      <xsl:call-template name="section.toc.separator"/>
+    </xsl:if>
+
+    <xsl:apply-templates/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="/sect1">
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id">
+      <xsl:with-param name="object" select="ancestor::reference"/>
+    </xsl:call-template>
+  </xsl:variable>
+  <xsl:variable name="master-reference">
+    <xsl:call-template name="select.pagemaster"/>
+  </xsl:variable>
+
+  <fo:page-sequence hyphenate="{$hyphenate}"
+                    master-reference="{$master-reference}">
+    <xsl:attribute name="language">
+      <xsl:call-template name="l10n.language"/>
+    </xsl:attribute>
+    <xsl:attribute name="format">
+      <xsl:call-template name="page.number.format"/>
+    </xsl:attribute>
+    <xsl:if test="$double.sided != 0">
+      <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
+    </xsl:if>
+
+    <xsl:attribute name="hyphenation-character">
+      <xsl:call-template name="gentext">
+        <xsl:with-param name="key" select="'hyphenation-character'"/>
+      </xsl:call-template>
+    </xsl:attribute>
+    <xsl:attribute name="hyphenation-push-character-count">
+      <xsl:call-template name="gentext">
+        <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
+      </xsl:call-template>
+    </xsl:attribute>
+    <xsl:attribute name="hyphenation-remain-character-count">
+      <xsl:call-template name="gentext">
+        <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
+      </xsl:call-template>
+    </xsl:attribute>
+
+    <xsl:apply-templates select="." mode="running.head.mode">
+      <xsl:with-param name="master-reference" select="$master-reference"/>
+    </xsl:apply-templates>
+    <xsl:apply-templates select="." mode="running.foot.mode">
+      <xsl:with-param name="master-reference" select="$master-reference"/>
+    </xsl:apply-templates>
+
+    <fo:flow flow-name="xsl-region-body">
+      <fo:block id="{$id}" 
+                xsl:use-attribute-sets="section.level1.properties">
+        <xsl:call-template name="sect1.titlepage"/>
+      </fo:block>
+
+      <xsl:variable name="toc.params">
+        <xsl:call-template name="find.path.params">
+          <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
+        </xsl:call-template>
+      </xsl:variable>
+
+      <xsl:if test="contains($toc.params, 'toc')
+                    and $generate.section.toc.level &gt;= 1">
+        <xsl:call-template name="section.toc"/>
+        <xsl:call-template name="section.toc.separator"/>
+      </xsl:if>
+
+      <xsl:apply-templates/>
+   </fo:flow>
+  </fo:page-sequence>
+</xsl:template>
+
+<xsl:template match="sect2">
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <fo:block id="{$id}" 
+            xsl:use-attribute-sets="section.level2.properties">
+    <xsl:call-template name="sect2.titlepage"/>
+
+    <xsl:variable name="toc.params">
+      <xsl:call-template name="find.path.params">
+        <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
+      </xsl:call-template>
+    </xsl:variable>
+
+    <xsl:if test="contains($toc.params, 'toc')
+                   and $generate.section.toc.level &gt;= 2">
+      <xsl:call-template name="section.toc"/>
+      <xsl:call-template name="section.toc.separator"/>
+    </xsl:if>
+
+    <xsl:apply-templates/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="sect3">
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <fo:block id="{$id}" 
+            xsl:use-attribute-sets="section.level3.properties">
+    <xsl:call-template name="sect3.titlepage"/>
+
+    <xsl:variable name="toc.params">
+      <xsl:call-template name="find.path.params">
+        <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
+      </xsl:call-template>
+    </xsl:variable>
+
+    <xsl:if test="contains($toc.params, 'toc')
+                  and $generate.section.toc.level &gt;= 3">
+      <xsl:call-template name="section.toc"/>
+      <xsl:call-template name="section.toc.separator"/>
+    </xsl:if>
+
+    <xsl:apply-templates/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="sect4">
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <fo:block id="{$id}" 
+            xsl:use-attribute-sets="section.level4.properties">
+    <xsl:call-template name="sect4.titlepage"/>
+
+    <xsl:variable name="toc.params">
+      <xsl:call-template name="find.path.params">
+        <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
+      </xsl:call-template>
+    </xsl:variable>
+
+    <xsl:if test="contains($toc.params, 'toc')
+                  and $generate.section.toc.level &gt;= 4">
+      <xsl:call-template name="section.toc"/>
+      <xsl:call-template name="section.toc.separator"/>
+    </xsl:if>
+
+    <xsl:apply-templates/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="sect5">
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <fo:block id="{$id}" 
+            xsl:use-attribute-sets="section.level5.properties">
+    <xsl:call-template name="sect5.titlepage"/>
+
+    <xsl:variable name="toc.params">
+      <xsl:call-template name="find.path.params">
+        <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
+      </xsl:call-template>
+    </xsl:variable>
+
+    <xsl:if test="contains($toc.params, 'toc')
+                  and $generate.section.toc.level &gt;= 5">
+      <xsl:call-template name="section.toc"/>
+      <xsl:call-template name="section.toc.separator"/>
+    </xsl:if>
+
+    <xsl:apply-templates/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="simplesect">
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <fo:block id="{$id}">
+    <xsl:call-template name="simplesect.titlepage"/>
+    <xsl:apply-templates/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="sectioninfo"></xsl:template>
+<xsl:template match="section/title"></xsl:template>
+<xsl:template match="section/titleabbrev"></xsl:template>
+<xsl:template match="section/subtitle"></xsl:template>
+
+<xsl:template match="sect1info"></xsl:template>
+<xsl:template match="sect1/title"></xsl:template>
+<xsl:template match="sect1/titleabbrev"></xsl:template>
+<xsl:template match="sect1/subtitle"></xsl:template>
+
+<xsl:template match="sect2info"></xsl:template>
+<xsl:template match="sect2/title"></xsl:template>
+<xsl:template match="sect2/titleabbrev"></xsl:template>
+<xsl:template match="sect2/subtitle"></xsl:template>
+
+<xsl:template match="sect3info"></xsl:template>
+<xsl:template match="sect3/title"></xsl:template>
+<xsl:template match="sect3/titleabbrev"></xsl:template>
+<xsl:template match="sect3/subtitle"></xsl:template>
+
+<xsl:template match="sect4info"></xsl:template>
+<xsl:template match="sect4/title"></xsl:template>
+<xsl:template match="sect4/titleabbrev"></xsl:template>
+<xsl:template match="sect4/subtitle"></xsl:template>
+
+<xsl:template match="sect5info"></xsl:template>
+<xsl:template match="sect5/title"></xsl:template>
+<xsl:template match="sect5/titleabbrev"></xsl:template>
+<xsl:template match="sect5/subtitle"></xsl:template>
+
+<xsl:template match="simplesect/title"></xsl:template>
+<xsl:template match="simplesect/titleabbrev"></xsl:template>
+<xsl:template match="simplesect/subtitle"></xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="section.heading">
+  <xsl:param name="level" select="1"/>
+  <xsl:param name="marker" select="1"/>
+  <xsl:param name="title"/>
+  <xsl:param name="titleabbrev"/>
+
+  <fo:block xsl:use-attribute-sets="section.title.properties">
+    <xsl:if test="$marker != 0">
+      <fo:marker marker-class-name="section.head.marker">
+        <xsl:choose>
+          <xsl:when test="$titleabbrev = ''">
+            <xsl:value-of select="$title"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:value-of select="$titleabbrev"/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </fo:marker>
+    </xsl:if>
+    <xsl:choose>
+      <xsl:when test="$level=1">
+        <fo:block xsl:use-attribute-sets="section.title.level1.properties">
+          <xsl:copy-of select="$title"/>
+        </fo:block>
+      </xsl:when>
+      <xsl:when test="$level=2">
+        <fo:block xsl:use-attribute-sets="section.title.level2.properties">
+          <xsl:copy-of select="$title"/>
+        </fo:block>
+      </xsl:when>
+      <xsl:when test="$level=3">
+        <fo:block xsl:use-attribute-sets="section.title.level3.properties">
+          <xsl:copy-of select="$title"/>
+        </fo:block>
+      </xsl:when>
+      <xsl:when test="$level=4">
+        <fo:block xsl:use-attribute-sets="section.title.level4.properties">
+          <xsl:copy-of select="$title"/>
+        </fo:block>
+      </xsl:when>
+      <xsl:when test="$level=5">
+        <fo:block xsl:use-attribute-sets="section.title.level5.properties">
+          <xsl:copy-of select="$title"/>
+        </fo:block>
+      </xsl:when>
+      <xsl:otherwise>
+        <fo:block xsl:use-attribute-sets="section.title.level6.properties">
+          <xsl:copy-of select="$title"/>
+        </fo:block>
+      </xsl:otherwise>
+    </xsl:choose>
+  </fo:block>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="bridgehead">
+  <xsl:variable name="container"
+                select="(ancestor::appendix
+                        |ancestor::article
+                        |ancestor::bibliography
+                        |ancestor::chapter
+                        |ancestor::glossary
+                        |ancestor::glossdiv
+                        |ancestor::index
+                        |ancestor::partintro
+                        |ancestor::preface
+                        |ancestor::refsect1
+                        |ancestor::refsect2
+                        |ancestor::refsect3
+                        |ancestor::sect1
+                        |ancestor::sect2
+                        |ancestor::sect3
+                        |ancestor::sect4
+                        |ancestor::sect5
+                        |ancestor::section
+                        |ancestor::setindex
+                        |ancestor::simplesect)[last()]"/>
+
+  <xsl:variable name="clevel">
+    <xsl:choose>
+      <xsl:when test="local-name($container) = 'appendix'
+                      or local-name($container) = 'chapter'
+                      or local-name($container) = 'article'
+                      or local-name($container) = 'bibliography'
+                      or local-name($container) = 'glossary'
+                      or local-name($container) = 'index'
+                      or local-name($container) = 'partintro'
+                      or local-name($container) = 'preface'
+                      or local-name($container) = 'setindex'">2</xsl:when>
+      <xsl:when test="local-name($container) = 'glossdiv'">
+        <xsl:value-of select="count(ancestor::glossdiv)+2"/>
+      </xsl:when>
+      <xsl:when test="local-name($container) = 'sect1'
+                      or local-name($container) = 'sect2'
+                      or local-name($container) = 'sect3'
+                      or local-name($container) = 'sect4'
+                      or local-name($container) = 'sect5'
+                      or local-name($container) = 'refsect1'
+                      or local-name($container) = 'refsect2'
+                      or local-name($container) = 'refsect3'
+                      or local-name($container) = 'section'
+                      or local-name($container) = 'simplesect'">
+        <xsl:variable name="slevel">
+          <xsl:call-template name="section.level">
+            <xsl:with-param name="node" select="$container"/>
+          </xsl:call-template>
+        </xsl:variable>
+        <xsl:value-of select="$slevel + 1"/>
+      </xsl:when>
+      <xsl:otherwise>2</xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:variable name="level">
+    <xsl:choose>
+      <xsl:when test="@renderas = 'sect1'">1</xsl:when>
+      <xsl:when test="@renderas = 'sect2'">2</xsl:when>
+      <xsl:when test="@renderas = 'sect3'">3</xsl:when>
+      <xsl:when test="@renderas = 'sect4'">4</xsl:when>
+      <xsl:when test="@renderas = 'sect5'">5</xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$clevel"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <fo:block id="{$id}">
+    <xsl:call-template name="section.heading">
+      <xsl:with-param name="level" select="$level"/>
+      <xsl:with-param name="title">
+        <xsl:apply-templates/>
+      </xsl:with-param>
+    </xsl:call-template>
+  </fo:block>
+</xsl:template>
+
+</xsl:stylesheet>
+

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/synop.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/synop.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/synop.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,903 @@
+<?xml version='1.0'?>
+<!DOCTYPE xsl:stylesheet [
+<!ENTITY RE "&#10;">
+<!ENTITY nbsp "&#160;">
+]>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: synop.xsl,v 1.1.1.1 2004/10/19 21:21:44 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<!-- synopsis is in verbatim -->
+
+<!-- ==================================================================== -->
+
+<xsl:template match="cmdsynopsis">
+  <fo:block>
+    <xsl:apply-templates/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="cmdsynopsis/command">
+  <xsl:call-template name="inline.monoseq"/>
+  <xsl:text> </xsl:text>
+</xsl:template>
+
+<xsl:template match="cmdsynopsis/command[1]" priority="2">
+  <xsl:call-template name="inline.monoseq"/>
+  <xsl:text> </xsl:text>
+</xsl:template>
+
+<xsl:template match="group|arg" name="group-or-arg">
+  <xsl:variable name="choice" select="@choice"/>
+  <xsl:variable name="rep" select="@rep"/>
+  <xsl:variable name="sepchar">
+    <xsl:choose>
+      <xsl:when test="ancestor-or-self::*/@sepchar">
+        <xsl:value-of select="ancestor-or-self::*/@sepchar"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:text> </xsl:text>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+  <xsl:if test="position()>1"><xsl:value-of select="$sepchar"/></xsl:if>
+  <xsl:choose>
+    <xsl:when test="$choice='plain'">
+      <xsl:value-of select="$arg.choice.plain.open.str"/>
+    </xsl:when>
+    <xsl:when test="$choice='req'">
+      <xsl:value-of select="$arg.choice.req.open.str"/>
+    </xsl:when>
+    <xsl:when test="$choice='opt'">
+      <xsl:value-of select="$arg.choice.opt.open.str"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:value-of select="$arg.choice.def.open.str"/>
+    </xsl:otherwise>
+  </xsl:choose>
+  <xsl:apply-templates/>
+  <xsl:choose>
+    <xsl:when test="$rep='repeat'">
+      <xsl:value-of select="$arg.rep.repeat.str"/>
+    </xsl:when>
+    <xsl:when test="$rep='norepeat'">
+      <xsl:value-of select="$arg.rep.norepeat.str"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:value-of select="$arg.rep.def.str"/>
+    </xsl:otherwise>
+  </xsl:choose>
+  <xsl:choose>
+    <xsl:when test="$choice='plain'">
+      <xsl:value-of select="$arg.choice.plain.close.str"/>
+    </xsl:when>
+    <xsl:when test="$choice='req'">
+      <xsl:value-of select="$arg.choice.req.close.str"/>
+    </xsl:when>
+    <xsl:when test="$choice='opt'">
+      <xsl:value-of select="$arg.choice.opt.close.str"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:value-of select="$arg.choice.def.close.str"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="group/arg">
+  <xsl:variable name="choice" select="@choice"/>
+  <xsl:variable name="rep" select="@rep"/>
+  <xsl:if test="position()>1"><xsl:value-of select="$arg.or.sep"/></xsl:if>
+  <xsl:call-template name="group-or-arg"/>
+</xsl:template>
+
+<xsl:template match="sbr">
+  <fo:block/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="synopfragmentref">
+  <xsl:variable name="target" select="key('id', at linkend)"/>
+  <xsl:variable name="snum">
+    <xsl:apply-templates select="$target" mode="synopfragment.number"/>
+  </xsl:variable>
+  <fo:inline font-style="italic">
+    <fo:basic-link internal-destination="{@linkend}"
+                   xsl:use-attribute-sets="xref.properties">
+      <xsl:text>(</xsl:text>
+      <xsl:value-of select="$snum"/>
+      <xsl:text>)</xsl:text>
+    </fo:basic-link>
+    <xsl:text>&#160;</xsl:text>
+    <xsl:apply-templates/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="synopfragment" mode="synopfragment.number">
+  <xsl:number format="1"/>
+</xsl:template>
+
+<xsl:template match="synopfragment">
+  <xsl:variable name="snum">
+    <xsl:apply-templates select="." mode="synopfragment.number"/>
+  </xsl:variable>
+  <fo:block>
+    <xsl:text>(</xsl:text>
+    <xsl:value-of select="$snum"/>
+    <xsl:text>)</xsl:text>
+    <xsl:text> </xsl:text>
+    <xsl:apply-templates/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="funcsynopsis">
+  <xsl:call-template name="informal.object"/>
+</xsl:template>
+
+<xsl:template match="funcsynopsisinfo">
+  <fo:block space-after.minimum="0.8em"
+            space-after.optimum="1em"
+            space-after.maximum="1.2em">
+    <xsl:apply-templates/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="funcprototype">
+  <fo:block font-family="{$monospace.font.family}">
+    <xsl:apply-templates/>
+    <xsl:if test="$funcsynopsis.style='kr'">
+      <xsl:apply-templates select="./paramdef" mode="kr-funcsynopsis-mode"/>
+    </xsl:if>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="funcdef">
+  <fo:inline font-family="{$monospace.font.family}">
+    <xsl:apply-templates/>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="funcdef/function">
+  <xsl:choose>
+    <xsl:when test="$funcsynopsis.decoration != 0">
+      <fo:inline font-weight="bold">
+        <xsl:apply-templates/>
+      </fo:inline>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:apply-templates/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="void">
+  <xsl:choose>
+    <xsl:when test="$funcsynopsis.style='ansi'">
+      <xsl:text>(void);</xsl:text>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:text>();</xsl:text>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="varargs">
+  <xsl:text>(...);</xsl:text>
+</xsl:template>
+
+<xsl:template match="paramdef">
+  <xsl:variable name="paramnum">
+    <xsl:number count="paramdef" format="1"/>
+  </xsl:variable>
+  <xsl:if test="$paramnum=1">(</xsl:if>
+  <xsl:choose>
+    <xsl:when test="$funcsynopsis.style='ansi'">
+      <xsl:apply-templates/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:apply-templates select="./parameter"/>
+    </xsl:otherwise>
+  </xsl:choose>
+  <xsl:choose>
+    <xsl:when test="following-sibling::paramdef">
+      <xsl:text>, </xsl:text>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:text>);</xsl:text>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="paramdef/parameter">
+  <xsl:choose>
+    <xsl:when test="$funcsynopsis.decoration != 0">
+      <xsl:apply-templates/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:apply-templates/>
+    </xsl:otherwise>
+  </xsl:choose>
+  <xsl:if test="following-sibling::parameter">
+    <xsl:text>, </xsl:text>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="paramdef" mode="kr-funcsynopsis-mode">
+  <fo:block>
+    <xsl:apply-templates/>
+    <xsl:text>;</xsl:text>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="funcparams">
+  <xsl:text>(</xsl:text>
+  <xsl:apply-templates/>
+  <xsl:text>)</xsl:text>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:variable name="default-classsynopsis-language">java</xsl:variable>
+
+<xsl:template match="classsynopsis
+                     |fieldsynopsis
+                     |methodsynopsis
+                     |constructorsynopsis
+                     |destructorsynopsis">
+  <xsl:param name="language">
+    <xsl:choose>
+      <xsl:when test="@language">
+	<xsl:value-of select="@language"/>
+      </xsl:when>
+      <xsl:otherwise>
+	<xsl:value-of select="$default-classsynopsis-language"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:param>
+
+  <xsl:message>process <xsl:value-of select="name(.)"/> in <xsl:value-of select="$language"/></xsl:message>
+
+  <xsl:choose>
+    <xsl:when test="$language='java'">
+      <xsl:apply-templates select="." mode="java"/>
+    </xsl:when>
+    <xsl:when test="$language='perl'">
+      <xsl:apply-templates select="." mode="perl"/>
+    </xsl:when>
+    <xsl:when test="$language='idl'">
+      <xsl:apply-templates select="." mode="idl"/>
+    </xsl:when>
+    <xsl:when test="$language='cpp'">
+      <xsl:apply-templates select="." mode="cpp"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:message>
+	<xsl:text>Unrecognized language on </xsl:text>
+        <xsl:value-of select="name(.)"/>
+        <xsl:text>: </xsl:text>
+	<xsl:value-of select="$language"/>
+      </xsl:message>
+      <xsl:apply-templates select=".">
+	<xsl:with-param name="language"
+	  select="$default-classsynopsis-language"/>
+      </xsl:apply-templates>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="synop-break">
+  <xsl:if test="parent::classsynopsis
+                or (following-sibling::fieldsynopsis
+                    |following-sibling::methodsynopsis
+                    |following-sibling::constructorsynopsis
+                    |following-sibling::destructorsynopsis)">
+    <fo:inline>&RE;</fo:inline>
+  </xsl:if>
+</xsl:template>
+
+<!-- ===== Java ======================================================== -->
+
+<xsl:template match="classsynopsis" mode="java">
+  <fo:block wrap-option='no-wrap'
+            white-space-collapse='false'
+            linefeed-treatment="preserve"
+            xsl:use-attribute-sets="monospace.verbatim.properties">
+    <xsl:apply-templates select="ooclass[1]" mode="java"/>
+    <xsl:if test="ooclass[position() &gt; 1]">
+      <xsl:text> extends</xsl:text>
+      <xsl:apply-templates select="ooclass[position() &gt; 1]" mode="java"/>
+      <xsl:if test="oointerface|ooexception">
+        <xsl:text>&RE;&nbsp;&nbsp;&nbsp;&nbsp;</xsl:text>
+      </xsl:if>
+    </xsl:if>
+    <xsl:if test="oointerface">
+      <xsl:text>implements</xsl:text>
+      <xsl:apply-templates select="oointerface" mode="java"/>
+      <xsl:if test="ooexception">
+	<xsl:text>&RE;&nbsp;&nbsp;&nbsp;&nbsp;</xsl:text>
+      </xsl:if>
+    </xsl:if>
+    <xsl:if test="ooexception">
+      <xsl:text>throws</xsl:text>
+      <xsl:apply-templates select="ooexception" mode="java"/>
+    </xsl:if>
+    <xsl:text>&nbsp;{&RE;</xsl:text>
+    <xsl:apply-templates select="constructorsynopsis
+                                 |destructorsynopsis
+                                 |fieldsynopsis
+                                 |methodsynopsis
+                                 |classsynopsisinfo" mode="java"/>
+    <xsl:text>}</xsl:text>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="classsynopsisinfo" mode="java">
+  <xsl:apply-templates mode="java"/>
+</xsl:template>
+
+<xsl:template match="ooclass|oointerface|ooexception" mode="java">
+  <xsl:choose>
+    <xsl:when test="position() &gt; 1">
+      <xsl:text>, </xsl:text>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:text> </xsl:text>
+    </xsl:otherwise>
+  </xsl:choose>
+  <xsl:apply-templates mode="java"/>
+</xsl:template>
+
+<xsl:template match="modifier" mode="java">
+  <xsl:apply-templates mode="java"/>
+  <xsl:text>&nbsp;</xsl:text>
+</xsl:template>
+
+<xsl:template match="classname" mode="java">
+  <xsl:if test="name(preceding-sibling::*[1]) = 'classname'">
+    <xsl:text>, </xsl:text>
+  </xsl:if>
+  <xsl:apply-templates mode="java"/>
+</xsl:template>
+
+<xsl:template match="interfacename" mode="java">
+  <xsl:if test="name(preceding-sibling::*[1]) = 'interfacename'">
+    <xsl:text>, </xsl:text>
+  </xsl:if>
+  <xsl:apply-templates mode="java"/>
+</xsl:template>
+
+<xsl:template match="exceptionname" mode="java">
+  <xsl:if test="name(preceding-sibling::*[1]) = 'exceptionname'">
+    <xsl:text>, </xsl:text>
+  </xsl:if>
+  <xsl:apply-templates mode="java"/>
+</xsl:template>
+
+<xsl:template match="fieldsynopsis" mode="java">
+  <fo:block wrap-option='no-wrap'
+            white-space-collapse='false'
+            linefeed-treatment="preserve"
+            xsl:use-attribute-sets="monospace.verbatim.properties">
+    <xsl:text>&nbsp;&nbsp;</xsl:text>
+    <xsl:apply-templates mode="java"/>
+    <xsl:text>;</xsl:text>
+    <xsl:call-template name="synop-break"/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="type" mode="java">
+  <xsl:apply-templates mode="java"/>
+  <xsl:text>&nbsp;</xsl:text>
+</xsl:template>
+
+<xsl:template match="varname" mode="java">
+  <xsl:apply-templates mode="java"/>
+  <xsl:text>&nbsp;</xsl:text>
+</xsl:template>
+
+<xsl:template match="initializer" mode="java">
+  <xsl:text>=&nbsp;</xsl:text>
+  <xsl:apply-templates mode="java"/>
+</xsl:template>
+
+<xsl:template match="void" mode="java">
+  <xsl:text>void&nbsp;</xsl:text>
+</xsl:template>
+
+<xsl:template match="methodname" mode="java">
+  <xsl:apply-templates mode="java"/>
+</xsl:template>
+
+<xsl:template match="methodparam" mode="java">
+  <xsl:param name="indent">0</xsl:param>
+  <xsl:if test="position() &gt; 1">
+    <xsl:text>,&RE;</xsl:text>
+    <xsl:if test="$indent &gt; 0">
+      <xsl:call-template name="copy-string">
+	<xsl:with-param name="string">&nbsp;</xsl:with-param>
+	<xsl:with-param name="count" select="$indent + 1"/>
+      </xsl:call-template>
+    </xsl:if>
+  </xsl:if>
+  <xsl:apply-templates mode="java"/>
+</xsl:template>
+
+<xsl:template match="parameter" mode="java">
+  <xsl:apply-templates mode="java"/>
+</xsl:template>
+
+<xsl:template mode="java"
+  match="constructorsynopsis|destructorsynopsis|methodsynopsis">
+  <xsl:variable name="modifiers" select="modifier"/>
+  <xsl:variable name="notmod" select="*[name(.) != 'modifier']"/>
+  <xsl:variable name="decl">
+    <xsl:text>  </xsl:text>
+    <xsl:apply-templates select="$modifiers" mode="java"/>
+
+    <!-- type -->
+    <xsl:if test="name($notmod[1]) != 'methodname'">
+      <xsl:apply-templates select="$notmod[1]" mode="java"/>
+    </xsl:if>
+
+    <xsl:apply-templates select="methodname" mode="java"/>
+  </xsl:variable>
+
+  <fo:block wrap-option='no-wrap'
+            white-space-collapse='false'
+            linefeed-treatment="preserve"
+            xsl:use-attribute-sets="monospace.verbatim.properties">
+    <xsl:copy-of select="$decl"/>
+    <xsl:text>(</xsl:text>
+    <xsl:apply-templates select="methodparam" mode="java">
+      <xsl:with-param name="indent" select="string-length($decl)"/>
+    </xsl:apply-templates>
+    <xsl:text>)</xsl:text>
+    <xsl:if test="exceptionname">
+      <xsl:text>&RE;&nbsp;&nbsp;&nbsp;&nbsp;throws&nbsp;</xsl:text>
+      <xsl:apply-templates select="exceptionname" mode="java"/>
+    </xsl:if>
+    <xsl:text>;</xsl:text>
+  </fo:block>
+  <xsl:call-template name="synop-break"/>
+</xsl:template>
+
+<!-- ===== C++ ========================================================= -->
+
+<xsl:template match="classsynopsis" mode="cpp">
+  <fo:block wrap-option='no-wrap'
+            white-space-collapse='false'
+            linefeed-treatment="preserve"
+            xsl:use-attribute-sets="monospace.verbatim.properties">
+    <xsl:apply-templates select="ooclass[1]" mode="cpp"/>
+    <xsl:if test="ooclass[position() &gt; 1]">
+      <xsl:text>: </xsl:text>
+      <xsl:apply-templates select="ooclass[position() &gt; 1]" mode="cpp"/>
+      <xsl:if test="oointerface|ooexception">
+	<xsl:text>&RE;&nbsp;&nbsp;&nbsp;&nbsp;</xsl:text>
+      </xsl:if>
+    </xsl:if>
+    <xsl:if test="oointerface">
+      <xsl:text> implements</xsl:text>
+      <xsl:apply-templates select="oointerface" mode="cpp"/>
+      <xsl:if test="ooexception">
+	<xsl:text>&RE;&nbsp;&nbsp;&nbsp;&nbsp;</xsl:text>
+      </xsl:if>
+    </xsl:if>
+    <xsl:if test="ooexception">
+      <xsl:text> throws</xsl:text>
+      <xsl:apply-templates select="ooexception" mode="cpp"/>
+    </xsl:if>
+    <xsl:text>&nbsp;{&RE;</xsl:text>
+    <xsl:apply-templates select="constructorsynopsis
+                                 |destructorsynopsis
+                                 |fieldsynopsis
+                                 |methodsynopsis
+                                 |classsynopsisinfo" mode="cpp"/>
+    <xsl:text>}</xsl:text>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="classsynopsisinfo" mode="cpp">
+  <xsl:apply-templates mode="cpp"/>
+</xsl:template>
+
+<xsl:template match="ooclass|oointerface|ooexception" mode="cpp">
+  <xsl:if test="position() &gt; 1">
+    <xsl:text>, </xsl:text>
+  </xsl:if>
+  <xsl:apply-templates mode="cpp"/>
+</xsl:template>
+
+<xsl:template match="modifier" mode="cpp">
+  <xsl:apply-templates mode="cpp"/>
+  <xsl:text>&nbsp;</xsl:text>
+</xsl:template>
+
+<xsl:template match="classname" mode="cpp">
+  <xsl:if test="name(preceding-sibling::*[1]) = 'classname'">
+    <xsl:text>, </xsl:text>
+  </xsl:if>
+  <xsl:apply-templates mode="cpp"/>
+</xsl:template>
+
+<xsl:template match="interfacename" mode="cpp">
+  <xsl:if test="name(preceding-sibling::*[1]) = 'interfacename'">
+    <xsl:text>, </xsl:text>
+  </xsl:if>
+  <xsl:apply-templates mode="cpp"/>
+</xsl:template>
+
+<xsl:template match="exceptionname" mode="cpp">
+  <xsl:if test="name(preceding-sibling::*[1]) = 'exceptionname'">
+    <xsl:text>, </xsl:text>
+  </xsl:if>
+  <xsl:apply-templates mode="cpp"/>
+</xsl:template>
+
+<xsl:template match="fieldsynopsis" mode="cpp">
+  <fo:block wrap-option='no-wrap'
+            white-space-collapse='false'
+            linefeed-treatment="preserve"
+            xsl:use-attribute-sets="monospace.verbatim.properties">
+    <xsl:text>&nbsp;&nbsp;</xsl:text>
+    <xsl:apply-templates mode="cpp"/>
+    <xsl:text>;</xsl:text>
+  </fo:block>
+  <xsl:call-template name="synop-break"/>
+</xsl:template>
+
+<xsl:template match="type" mode="cpp">
+  <xsl:apply-templates mode="cpp"/>
+  <xsl:text>&nbsp;</xsl:text>
+</xsl:template>
+
+<xsl:template match="varname" mode="cpp">
+  <xsl:apply-templates mode="cpp"/>
+  <xsl:text>&nbsp;</xsl:text>
+</xsl:template>
+
+<xsl:template match="initializer" mode="cpp">
+  <xsl:text>=&nbsp;</xsl:text>
+  <xsl:apply-templates mode="cpp"/>
+</xsl:template>
+
+<xsl:template match="void" mode="cpp">
+  <xsl:text>void&nbsp;</xsl:text>
+</xsl:template>
+
+<xsl:template match="methodname" mode="cpp">
+  <xsl:apply-templates mode="cpp"/>
+</xsl:template>
+
+<xsl:template match="methodparam" mode="cpp">
+  <xsl:if test="position() &gt; 1">
+    <xsl:text>, </xsl:text>
+  </xsl:if>
+  <xsl:apply-templates mode="cpp"/>
+</xsl:template>
+
+<xsl:template match="parameter" mode="cpp">
+  <xsl:apply-templates mode="cpp"/>
+</xsl:template>
+
+<xsl:template mode="cpp"
+  match="constructorsynopsis|destructorsynopsis|methodsynopsis">
+  <xsl:variable name="modifiers" select="modifier"/>
+  <xsl:variable name="notmod" select="*[name(.) != 'modifier']"/>
+
+  <fo:block wrap-option='no-wrap'
+            white-space-collapse='false'
+            linefeed-treatment="preserve"
+            xsl:use-attribute-sets="monospace.verbatim.properties">
+    <xsl:text>  </xsl:text>
+    <xsl:apply-templates select="$modifiers" mode="cpp"/>
+
+    <!-- type -->
+    <xsl:if test="name($notmod[1]) != 'methodname'">
+      <xsl:apply-templates select="$notmod[1]" mode="cpp"/>
+    </xsl:if>
+
+    <xsl:apply-templates select="methodname" mode="cpp"/>
+    <xsl:text>(</xsl:text>
+    <xsl:apply-templates select="methodparam" mode="cpp"/>
+    <xsl:text>)</xsl:text>
+    <xsl:if test="exceptionname">
+      <xsl:text>&RE;&nbsp;&nbsp;&nbsp;&nbsp;throws&nbsp;</xsl:text>
+      <xsl:apply-templates select="exceptionname" mode="cpp"/>
+    </xsl:if>
+    <xsl:text>;</xsl:text>
+  </fo:block>
+  <xsl:call-template name="synop-break"/>
+</xsl:template>
+
+<!-- ===== IDL ========================================================= -->
+
+<xsl:template match="classsynopsis" mode="idl">
+  <fo:block wrap-option='no-wrap'
+            white-space-collapse='false'
+            linefeed-treatment="preserve"
+            xsl:use-attribute-sets="monospace.verbatim.properties">
+    <xsl:text>interface </xsl:text>
+    <xsl:apply-templates select="ooclass[1]" mode="idl"/>
+    <xsl:if test="ooclass[position() &gt; 1]">
+      <xsl:text>: </xsl:text>
+      <xsl:apply-templates select="ooclass[position() &gt; 1]" mode="idl"/>
+      <xsl:if test="oointerface|ooexception">
+	<xsl:text>&RE;&nbsp;&nbsp;&nbsp;&nbsp;</xsl:text>
+      </xsl:if>
+    </xsl:if>
+    <xsl:if test="oointerface">
+      <xsl:text> implements</xsl:text>
+      <xsl:apply-templates select="oointerface" mode="idl"/>
+      <xsl:if test="ooexception">
+	<xsl:text>&RE;&nbsp;&nbsp;&nbsp;&nbsp;</xsl:text>
+      </xsl:if>
+    </xsl:if>
+    <xsl:if test="ooexception">
+      <xsl:text> throws</xsl:text>
+      <xsl:apply-templates select="ooexception" mode="idl"/>
+    </xsl:if>
+    <xsl:text>&nbsp;{&RE;</xsl:text>
+    <xsl:apply-templates select="constructorsynopsis
+                                 |destructorsynopsis
+                                 |fieldsynopsis
+                                 |methodsynopsis
+                                 |classsynopsisinfo" mode="idl"/>
+    <xsl:text>}</xsl:text>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="classsynopsisinfo" mode="idl">
+  <xsl:apply-templates mode="idl"/>
+</xsl:template>
+
+<xsl:template match="ooclass|oointerface|ooexception" mode="idl">
+  <xsl:if test="position() &gt; 1">
+    <xsl:text>, </xsl:text>
+  </xsl:if>
+  <xsl:apply-templates mode="idl"/>
+</xsl:template>
+
+<xsl:template match="modifier" mode="idl">
+  <xsl:apply-templates mode="idl"/>
+  <xsl:text>&nbsp;</xsl:text>
+</xsl:template>
+
+<xsl:template match="classname" mode="idl">
+  <xsl:if test="name(preceding-sibling::*[1]) = 'classname'">
+    <xsl:text>, </xsl:text>
+  </xsl:if>
+  <xsl:apply-templates mode="idl"/>
+</xsl:template>
+
+<xsl:template match="interfacename" mode="idl">
+  <xsl:if test="name(preceding-sibling::*[1]) = 'interfacename'">
+    <xsl:text>, </xsl:text>
+  </xsl:if>
+  <xsl:apply-templates mode="idl"/>
+</xsl:template>
+
+<xsl:template match="exceptionname" mode="idl">
+  <xsl:if test="name(preceding-sibling::*[1]) = 'exceptionname'">
+    <xsl:text>, </xsl:text>
+  </xsl:if>
+  <xsl:apply-templates mode="idl"/>
+</xsl:template>
+
+<xsl:template match="fieldsynopsis" mode="idl">
+  <fo:block wrap-option='no-wrap'
+            white-space-collapse='false'
+            linefeed-treatment="preserve"
+            xsl:use-attribute-sets="monospace.verbatim.properties">
+    <xsl:text>&nbsp;&nbsp;</xsl:text>
+    <xsl:apply-templates mode="idl"/>
+    <xsl:text>;</xsl:text>
+  </fo:block>
+  <xsl:call-template name="synop-break"/>
+</xsl:template>
+
+<xsl:template match="type" mode="idl">
+  <xsl:apply-templates mode="idl"/>
+  <xsl:text>&nbsp;</xsl:text>
+</xsl:template>
+
+<xsl:template match="varname" mode="idl">
+  <xsl:apply-templates mode="idl"/>
+  <xsl:text>&nbsp;</xsl:text>
+</xsl:template>
+
+<xsl:template match="initializer" mode="idl">
+  <xsl:text>=&nbsp;</xsl:text>
+  <xsl:apply-templates mode="idl"/>
+</xsl:template>
+
+<xsl:template match="void" mode="idl">
+  <xsl:text>void&nbsp;</xsl:text>
+</xsl:template>
+
+<xsl:template match="methodname" mode="idl">
+  <xsl:apply-templates mode="idl"/>
+</xsl:template>
+
+<xsl:template match="methodparam" mode="idl">
+  <xsl:if test="position() &gt; 1">
+    <xsl:text>, </xsl:text>
+  </xsl:if>
+  <xsl:apply-templates mode="idl"/>
+</xsl:template>
+
+<xsl:template match="parameter" mode="idl">
+  <xsl:apply-templates mode="idl"/>
+</xsl:template>
+
+<xsl:template mode="idl"
+  match="constructorsynopsis|destructorsynopsis|methodsynopsis">
+  <xsl:variable name="modifiers" select="modifier"/>
+  <xsl:variable name="notmod" select="*[name(.) != 'modifier']"/>
+
+  <fo:block wrap-option='no-wrap'
+            white-space-collapse='false'
+            linefeed-treatment="preserve"
+            xsl:use-attribute-sets="monospace.verbatim.properties">
+    <xsl:text>  </xsl:text>
+    <xsl:apply-templates select="$modifiers" mode="idl"/>
+
+    <!-- type -->
+    <xsl:if test="name($notmod[1]) != 'methodname'">
+      <xsl:apply-templates select="$notmod[1]" mode="idl"/>
+    </xsl:if>
+
+    <xsl:apply-templates select="methodname" mode="idl"/>
+    <xsl:text>(</xsl:text>
+    <xsl:apply-templates select="methodparam" mode="idl"/>
+    <xsl:text>)</xsl:text>
+    <xsl:if test="exceptionname">
+      <xsl:text>&RE;&nbsp;&nbsp;&nbsp;&nbsp;raises(</xsl:text>
+      <xsl:apply-templates select="exceptionname" mode="idl"/>
+      <xsl:text>)</xsl:text>
+    </xsl:if>
+    <xsl:text>;</xsl:text>
+  </fo:block>
+  <xsl:call-template name="synop-break"/>
+</xsl:template>
+
+<!-- ===== Perl ======================================================== -->
+
+<xsl:template match="classsynopsis" mode="perl">
+  <fo:block wrap-option='no-wrap'
+            white-space-collapse='false'
+            linefeed-treatment="preserve"
+            xsl:use-attribute-sets="monospace.verbatim.properties">
+    <xsl:text>package </xsl:text>
+    <xsl:apply-templates select="ooclass[1]" mode="perl"/>
+    <xsl:text>;&RE;</xsl:text>
+
+    <xsl:if test="ooclass[position() &gt; 1]">
+      <xsl:text>@ISA = (</xsl:text>
+      <xsl:apply-templates select="ooclass[position() &gt; 1]" mode="perl"/>
+      <xsl:text>);&RE;</xsl:text>
+    </xsl:if>
+
+    <xsl:apply-templates select="constructorsynopsis
+                                 |destructorsynopsis
+                                 |fieldsynopsis
+                                 |methodsynopsis
+                                 |classsynopsisinfo" mode="perl"/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="classsynopsisinfo" mode="perl">
+  <xsl:apply-templates mode="perl"/>
+</xsl:template>
+
+<xsl:template match="ooclass|oointerface|ooexception" mode="perl">
+  <xsl:if test="position() &gt; 1">
+    <xsl:text>, </xsl:text>
+  </xsl:if>
+  <xsl:apply-templates mode="perl"/>
+</xsl:template>
+
+<xsl:template match="modifier" mode="perl">
+  <xsl:apply-templates mode="perl"/>
+  <xsl:text>&nbsp;</xsl:text>
+</xsl:template>
+
+<xsl:template match="classname" mode="perl">
+  <xsl:if test="name(preceding-sibling::*[1]) = 'classname'">
+    <xsl:text>, </xsl:text>
+  </xsl:if>
+  <xsl:apply-templates mode="perl"/>
+</xsl:template>
+
+<xsl:template match="interfacename" mode="perl">
+  <xsl:if test="name(preceding-sibling::*[1]) = 'interfacename'">
+    <xsl:text>, </xsl:text>
+  </xsl:if>
+  <xsl:apply-templates mode="perl"/>
+</xsl:template>
+
+<xsl:template match="exceptionname" mode="perl">
+  <xsl:if test="name(preceding-sibling::*[1]) = 'exceptionname'">
+    <xsl:text>, </xsl:text>
+  </xsl:if>
+  <xsl:apply-templates mode="perl"/>
+</xsl:template>
+
+<xsl:template match="fieldsynopsis" mode="perl">
+  <fo:block wrap-option='no-wrap'
+            white-space-collapse='false'
+            linefeed-treatment="preserve"
+            xsl:use-attribute-sets="monospace.verbatim.properties">
+    <xsl:text>&nbsp;&nbsp;</xsl:text>
+    <xsl:apply-templates mode="perl"/>
+    <xsl:text>;</xsl:text>
+  </fo:block>
+  <xsl:call-template name="synop-break"/>
+</xsl:template>
+
+<xsl:template match="type" mode="perl">
+  <xsl:apply-templates mode="perl"/>
+  <xsl:text>&nbsp;</xsl:text>
+</xsl:template>
+
+<xsl:template match="varname" mode="perl">
+  <xsl:apply-templates mode="perl"/>
+  <xsl:text>&nbsp;</xsl:text>
+</xsl:template>
+
+<xsl:template match="initializer" mode="perl">
+  <xsl:text>=&nbsp;</xsl:text>
+  <xsl:apply-templates mode="perl"/>
+</xsl:template>
+
+<xsl:template match="void" mode="perl">
+  <xsl:text>void&nbsp;</xsl:text>
+</xsl:template>
+
+<xsl:template match="methodname" mode="perl">
+  <xsl:apply-templates mode="perl"/>
+</xsl:template>
+
+<xsl:template match="methodparam" mode="perl">
+  <xsl:if test="position() &gt; 1">
+    <xsl:text>, </xsl:text>
+  </xsl:if>
+  <xsl:apply-templates mode="perl"/>
+</xsl:template>
+
+<xsl:template match="parameter" mode="perl">
+  <xsl:apply-templates mode="perl"/>
+</xsl:template>
+
+<xsl:template mode="perl"
+  match="constructorsynopsis|destructorsynopsis|methodsynopsis">
+  <xsl:variable name="modifiers" select="modifier"/>
+  <xsl:variable name="notmod" select="*[name(.) != 'modifier']"/>
+
+  <fo:block wrap-option='no-wrap'
+            white-space-collapse='false'
+            linefeed-treatment="preserve"
+            xsl:use-attribute-sets="monospace.verbatim.properties">
+    <xsl:text>sub </xsl:text>
+
+    <xsl:apply-templates select="methodname" mode="perl"/>
+    <xsl:text> { ... };</xsl:text>
+    <xsl:call-template name="synop-break"/>
+  </fo:block>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/table.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/table.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/table.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1044 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                xmlns:stbl="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.Table"
+                xmlns:xtbl="com.nwalsh.xalan.Table"
+                xmlns:lxslt="http://xml.apache.org/xslt"
+                xmlns:ptbl="http://nwalsh.com/xslt/ext/xsltproc/python/Table"
+                exclude-result-prefixes="doc stbl xtbl lxslt ptbl"
+                version='1.0'>
+
+<xsl:include href="../common/table.xsl"/>
+
+<!-- ********************************************************************
+     $Id: table.xsl,v 1.1.1.1 2004/10/19 21:21:44 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<doc:reference xmlns="">
+<referenceinfo>
+<releaseinfo role="meta">
+$Id: table.xsl,v 1.1.1.1 2004/10/19 21:21:44 juntao Exp $
+</releaseinfo>
+<author><surname>Walsh</surname>
+<firstname>Norman</firstname></author>
+<copyright><year>1999</year><year>2000</year>
+<holder>Norman Walsh</holder>
+</copyright>
+</referenceinfo>
+<title>Formatting Object Table Reference</title>
+
+<partintro>
+<section><title>Introduction</title>
+
+<para>This is technical reference documentation for the DocBook XSL
+Stylesheets; it documents (some of) the parameters, templates, and
+other elements of the stylesheets.</para>
+
+<para>This is not intended to be <quote>user</quote> documentation.
+It is provided for developers writing customization layers for the
+stylesheets, and for anyone who's interested in <quote>how it
+works</quote>.</para>
+
+<para>Although I am trying to be thorough, this documentation is known
+to be incomplete. Don't forget to read the source, too :-)</para>
+</section>
+</partintro>
+</doc:reference>
+
+<!-- ==================================================================== -->
+
+<lxslt:component prefix="xtbl"
+                 functions="adjustColumnWidths"/>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="empty.table.cell">
+  <xsl:param name="colnum" select="0"/>
+
+  <xsl:variable name="rowsep">
+    <xsl:choose>
+      <!-- If this is the last row, rowsep never applies. -->
+      <xsl:when test="not(ancestor-or-self::row[1]/following-sibling::row
+                          or ancestor-or-self::thead/following-sibling::tbody
+                          or ancestor-or-self::tbody/preceding-sibling::tfoot)">
+        <xsl:value-of select="0"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:call-template name="inherited.table.attribute">
+          <xsl:with-param name="entry" select="NOT-AN-ELEMENT-NAME"/>
+          <xsl:with-param name="row" select="ancestor-or-self::row[1]"/>
+          <xsl:with-param name="colnum" select="$colnum"/>
+          <xsl:with-param name="attribute" select="'rowsep'"/>
+        </xsl:call-template>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:variable name="colsep">
+    <xsl:choose>
+      <!-- If this is the last column, colsep never applies. -->
+      <xsl:when test="$colnum &gt;= ancestor::tgroup/@cols">0</xsl:when>
+      <xsl:otherwise>
+        <xsl:call-template name="inherited.table.attribute">
+          <xsl:with-param name="entry" select="NOT-AN-ELEMENT-NAME"/>
+          <xsl:with-param name="row" select="ancestor-or-self::row[1]"/>
+          <xsl:with-param name="colnum" select="$colnum"/>
+          <xsl:with-param name="attribute" select="'colsep'"/>
+        </xsl:call-template>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <fo:table-cell text-align="center"
+                 display-align="center"
+                 xsl:use-attribute-sets="table.cell.padding">
+    <xsl:if test="$xep.extensions != 0">
+      <!-- Suggested by RenderX to workaround a bug in their implementation -->
+      <xsl:attribute name="keep-together.within-column">always</xsl:attribute>
+    </xsl:if>
+    <xsl:if test="$rowsep &gt; 0">
+      <xsl:call-template name="border">
+        <xsl:with-param name="side" select="'bottom'"/>
+      </xsl:call-template>
+    </xsl:if>
+
+    <xsl:if test="$colsep &gt; 0 and $colnum &lt; ancestor::tgroup/@cols">
+      <xsl:call-template name="border">
+        <xsl:with-param name="side" select="'right'"/>
+      </xsl:call-template>
+    </xsl:if>
+
+    <!-- fo:table-cell should not be empty -->
+    <fo:block/>
+  </fo:table-cell>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="border">
+  <xsl:param name="side" select="'left'"/>
+
+  <xsl:attribute name="border-{$side}-width">
+    <xsl:value-of select="$table.cell.border.thickness"/>
+  </xsl:attribute>
+  <xsl:attribute name="border-{$side}-style">
+    <xsl:value-of select="$table.cell.border.style"/>
+  </xsl:attribute>
+  <xsl:attribute name="border-{$side}-color">
+    <xsl:value-of select="$table.cell.border.color"/>
+  </xsl:attribute>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="tgroup" name="tgroup">
+  <xsl:if test="not(@cols)">
+    <xsl:message terminate="yes">
+      <xsl:text>Error: CALS tables must specify the number of columns.</xsl:text>
+    </xsl:message>
+  </xsl:if>
+
+  <xsl:variable name="explicit.table.width">
+    <xsl:call-template name="dbfo-attribute">
+      <xsl:with-param name="pis"
+                      select="../processing-instruction('dbfo')"/>
+      <xsl:with-param name="attribute" select="'table-width'"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="table.width">
+    <xsl:choose>
+      <xsl:when test="$explicit.table.width != ''">
+        <xsl:value-of select="$explicit.table.width"/>
+      </xsl:when>
+      <xsl:when test="$default.table.width = ''">
+        <xsl:text>100%</xsl:text>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$default.table.width"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:variable name="colspecs">
+    <xsl:choose>
+      <xsl:when test="$use.extensions != 0
+                      and $tablecolumns.extension != 0">
+        <xsl:call-template name="generate.colgroup.raw">
+          <xsl:with-param name="cols" select="@cols"/>
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:call-template name="generate.colgroup">
+          <xsl:with-param name="cols" select="@cols"/>
+        </xsl:call-template>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:if test="position() = 1">
+    <!-- If this is the first tgroup, output the width attribute for the -->
+    <!-- surrounding fo:table. (If this isn't the first tgroup, trying   -->
+    <!-- to output the attribute will cause an error.)                   -->
+    <xsl:attribute name="width">
+      <xsl:value-of select="$table.width"/>
+    </xsl:attribute>
+  </xsl:if>
+
+  <xsl:choose>
+    <xsl:when test="$use.extensions != 0
+                    and $tablecolumns.extension != 0">
+      <xsl:choose>
+        <xsl:when test="function-available('stbl:adjustColumnWidths')">
+          <xsl:copy-of select="stbl:adjustColumnWidths($colspecs)"/>
+        </xsl:when>
+        <xsl:when test="function-available('xtbl:adjustColumnWidths')">
+          <xsl:copy-of select="xtbl:adjustColumnWidths($colspecs)"/>
+        </xsl:when>
+        <xsl:when test="function-available('ptbl:adjustColumnWidths')">
+          <xsl:copy-of select="ptbl:adjustColumnWidths($colspecs)"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:message terminate="yes">
+            <xsl:text>No adjustColumnWidths function available.</xsl:text>
+          </xsl:message>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:copy-of select="$colspecs"/>
+    </xsl:otherwise>
+  </xsl:choose>
+
+  <xsl:apply-templates select="thead"/>
+  <xsl:apply-templates select="tfoot"/>
+  <xsl:apply-templates select="tbody"/>
+</xsl:template>
+
+<xsl:template match="colspec"></xsl:template>
+
+<xsl:template match="spanspec"></xsl:template>
+
+<xsl:template match="thead">
+  <xsl:variable name="tgroup" select="parent::*"/>
+
+  <fo:table-header>
+    <xsl:apply-templates select="row[1]">
+      <xsl:with-param name="spans">
+        <xsl:call-template name="blank.spans">
+          <xsl:with-param name="cols" select="../@cols"/>
+        </xsl:call-template>
+      </xsl:with-param>
+    </xsl:apply-templates>
+  </fo:table-header>
+</xsl:template>
+
+<xsl:template match="tfoot">
+  <xsl:variable name="tgroup" select="parent::*"/>
+
+  <fo:table-footer>
+    <xsl:apply-templates select="row[1]">
+      <xsl:with-param name="spans">
+        <xsl:call-template name="blank.spans">
+          <xsl:with-param name="cols" select="../@cols"/>
+        </xsl:call-template>
+      </xsl:with-param>
+    </xsl:apply-templates>
+
+  </fo:table-footer>
+</xsl:template>
+
+<xsl:template match="tbody">
+  <xsl:variable name="tgroup" select="parent::*"/>
+
+  <fo:table-body>
+    <xsl:apply-templates select="row[1]">
+      <xsl:with-param name="spans">
+        <xsl:call-template name="blank.spans">
+          <xsl:with-param name="cols" select="../@cols"/>
+        </xsl:call-template>
+      </xsl:with-param>
+    </xsl:apply-templates>
+  </fo:table-body>
+</xsl:template>
+
+<xsl:template match="row">
+  <xsl:param name="spans"/>
+
+  <fo:table-row>
+    <xsl:call-template name="anchor"/>
+
+    <xsl:apply-templates select="(entry|entrytbl)[1]">
+      <xsl:with-param name="spans" select="$spans"/>
+    </xsl:apply-templates>
+  </fo:table-row>
+
+  <xsl:if test="following-sibling::row">
+    <xsl:variable name="nextspans">
+      <xsl:apply-templates select="(entry|entrytbl)[1]" mode="span">
+        <xsl:with-param name="spans" select="$spans"/>
+      </xsl:apply-templates>
+    </xsl:variable>
+
+    <xsl:apply-templates select="following-sibling::row[1]">
+      <xsl:with-param name="spans" select="$nextspans"/>
+    </xsl:apply-templates>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="entry|entrytbl" name="entry">
+  <xsl:param name="col" select="1"/>
+  <xsl:param name="spans"/>
+
+  <xsl:variable name="row" select="parent::row"/>
+  <xsl:variable name="group" select="$row/parent::*[1]"/>
+  <xsl:variable name="frame" select="ancestor::tgroup/parent::*/@frame"/>
+
+  <xsl:variable name="empty.cell" select="count(node()) = 0"/>
+
+  <xsl:variable name="named.colnum">
+    <xsl:call-template name="entry.colnum"/>
+  </xsl:variable>
+
+  <xsl:variable name="entry.colnum">
+    <xsl:choose>
+      <xsl:when test="$named.colnum &gt; 0">
+        <xsl:value-of select="$named.colnum"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$col"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:variable name="entry.colspan">
+    <xsl:choose>
+      <xsl:when test="@spanname or @namest">
+        <xsl:call-template name="calculate.colspan"/>
+      </xsl:when>
+      <xsl:otherwise>1</xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:variable name="following.spans">
+    <xsl:call-template name="calculate.following.spans">
+      <xsl:with-param name="colspan" select="$entry.colspan"/>
+      <xsl:with-param name="spans" select="$spans"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="rowsep">
+    <xsl:choose>
+      <!-- If this is the last row, rowsep never applies. -->
+      <xsl:when test="not(ancestor-or-self::row[1]/following-sibling::row
+                          or ancestor-or-self::thead/following-sibling::tbody
+                          or ancestor-or-self::tbody/preceding-sibling::tfoot)">
+        <xsl:value-of select="0"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:call-template name="inherited.table.attribute">
+          <xsl:with-param name="entry" select="."/>
+          <xsl:with-param name="colnum" select="$entry.colnum"/>
+          <xsl:with-param name="attribute" select="'rowsep'"/>
+        </xsl:call-template>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+<!--
+  <xsl:message><xsl:value-of select="."/>: <xsl:value-of select="$rowsep"/></xsl:message>
+-->
+
+  <xsl:variable name="colsep">
+    <xsl:choose>
+      <!-- If this is the last column, colsep never applies. -->
+      <xsl:when test="$following.spans = ''">0</xsl:when>
+      <xsl:otherwise>
+        <xsl:call-template name="inherited.table.attribute">
+          <xsl:with-param name="entry" select="."/>
+          <xsl:with-param name="colnum" select="$entry.colnum"/>
+          <xsl:with-param name="attribute" select="'colsep'"/>
+        </xsl:call-template>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:variable name="valign">
+    <xsl:call-template name="inherited.table.attribute">
+      <xsl:with-param name="entry" select="."/>
+      <xsl:with-param name="colnum" select="$entry.colnum"/>
+      <xsl:with-param name="attribute" select="'valign'"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="align">
+    <xsl:call-template name="inherited.table.attribute">
+      <xsl:with-param name="entry" select="."/>
+      <xsl:with-param name="colnum" select="$entry.colnum"/>
+      <xsl:with-param name="attribute" select="'align'"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="char">
+    <xsl:call-template name="inherited.table.attribute">
+      <xsl:with-param name="entry" select="."/>
+      <xsl:with-param name="colnum" select="$entry.colnum"/>
+      <xsl:with-param name="attribute" select="'char'"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="charoff">
+    <xsl:call-template name="inherited.table.attribute">
+      <xsl:with-param name="entry" select="."/>
+      <xsl:with-param name="colnum" select="$entry.colnum"/>
+      <xsl:with-param name="attribute" select="'charoff'"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="$spans != '' and not(starts-with($spans,'0:'))">
+      <xsl:call-template name="entry">
+        <xsl:with-param name="col" select="$col+1"/>
+        <xsl:with-param name="spans" select="substring-after($spans,':')"/>
+      </xsl:call-template>
+    </xsl:when>
+
+    <xsl:when test="$entry.colnum &gt; $col">
+      <xsl:call-template name="empty.table.cell">
+        <xsl:with-param name="colnum" select="$col"/>
+      </xsl:call-template>
+      <xsl:call-template name="entry">
+        <xsl:with-param name="col" select="$col+1"/>
+        <xsl:with-param name="spans" select="substring-after($spans,':')"/>
+      </xsl:call-template>
+    </xsl:when>
+
+    <xsl:otherwise>
+      <xsl:variable name="cell.content">
+        <fo:block>
+          <!-- highlight this entry? -->
+          <xsl:if test="ancestor::thead">
+            <xsl:attribute name="font-weight">bold</xsl:attribute>
+          </xsl:if>
+
+          <!-- are we missing any indexterms? -->
+          <xsl:if test="not(preceding-sibling::entry)
+                        and not(parent::row/preceding-sibling::row)">
+            <!-- this is the first entry of the first row -->
+            <xsl:if test="ancestor::thead or
+                          (ancestor::tbody
+                           and not(ancestor::tbody/preceding-sibling::thead
+                                   or ancestor::tbody/preceding-sibling::tbody))">
+              <!-- of the thead or the first tbody -->
+              <xsl:apply-templates select="ancestor::tgroup/preceding-sibling::indexterm"/>
+            </xsl:if>
+          </xsl:if>
+
+          <!--
+          <xsl:text>(</xsl:text>
+          <xsl:value-of select="$rowsep"/>
+          <xsl:text>,</xsl:text>
+          <xsl:value-of select="$colsep"/>
+          <xsl:text>)</xsl:text>
+          -->
+          <xsl:choose>
+            <xsl:when test="$empty.cell">
+              <xsl:text>&#160;</xsl:text>
+            </xsl:when>
+            <xsl:when test="self::entrytbl">
+              <xsl:variable name="prop-columns"
+                            select=".//colspec[contains(@colwidth, '*')]"/>
+              <fo:table xsl:use-attribute-sets="table.table.properties">
+                <xsl:if test="count($prop-columns) != 0">
+                  <xsl:attribute name="table-layout">fixed</xsl:attribute>
+                </xsl:if>
+                <xsl:call-template name="tgroup"/>
+              </fo:table>
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:apply-templates/>
+            </xsl:otherwise>
+          </xsl:choose>
+        </fo:block>
+      </xsl:variable>
+
+      <xsl:variable name="cell-orientation">
+        <xsl:call-template name="dbfo-attribute">
+          <xsl:with-param name="pis"
+                          select="ancestor-or-self::entry/processing-instruction('dbfo')"/>
+          <xsl:with-param name="attribute" select="'orientation'"/>
+        </xsl:call-template>
+      </xsl:variable>
+
+      <xsl:variable name="row-orientation">
+        <xsl:call-template name="dbfo-attribute">
+          <xsl:with-param name="pis"
+                          select="ancestor-or-self::row/processing-instruction('dbfo')"/>
+          <xsl:with-param name="attribute" select="'orientation'"/>
+        </xsl:call-template>
+      </xsl:variable>
+
+      <xsl:variable name="cell-width">
+        <xsl:call-template name="dbfo-attribute">
+          <xsl:with-param name="pis"
+                          select="ancestor-or-self::entry/processing-instruction('dbfo')"/>
+          <xsl:with-param name="attribute" select="'rotated-width'"/>
+        </xsl:call-template>
+      </xsl:variable>
+
+      <xsl:variable name="row-width">
+        <xsl:call-template name="dbfo-attribute">
+          <xsl:with-param name="pis"
+                          select="ancestor-or-self::row/processing-instruction('dbfo')"/>
+          <xsl:with-param name="attribute" select="'rotated-width'"/>
+        </xsl:call-template>
+      </xsl:variable>
+
+      <xsl:variable name="orientation">
+        <xsl:choose>
+          <xsl:when test="$cell-orientation != ''">
+            <xsl:value-of select="$cell-orientation"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:value-of select="$row-orientation"/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:variable>
+
+      <xsl:variable name="rotated-width">
+        <xsl:choose>
+          <xsl:when test="$cell-width != ''">
+            <xsl:value-of select="$cell-width"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:value-of select="$row-width"/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:variable>
+
+      <xsl:variable name="bgcolor">
+        <xsl:call-template name="dbfo-attribute">
+          <xsl:with-param name="pis"
+                          select="ancestor-or-self::entry/processing-instruction('dbfo')"/>
+          <xsl:with-param name="attribute" select="'bgcolor'"/>
+        </xsl:call-template>
+      </xsl:variable>
+
+      <fo:table-cell xsl:use-attribute-sets="table.cell.padding">
+        <xsl:if test="$xep.extensions != 0">
+          <!-- Suggested by RenderX to workaround a bug in their implementation -->
+          <xsl:attribute name="keep-together.within-column">always</xsl:attribute>
+        </xsl:if>
+
+        <xsl:if test="$bgcolor != ''">
+          <xsl:attribute name="background-color">
+            <xsl:value-of select="$bgcolor"/>
+          </xsl:attribute>
+        </xsl:if>
+
+        <xsl:call-template name="anchor"/>
+
+        <xsl:if test="$rowsep &gt; 0">
+          <xsl:call-template name="border">
+            <xsl:with-param name="side" select="'bottom'"/>
+          </xsl:call-template>
+        </xsl:if>
+
+        <xsl:if test="$colsep &gt; 0 and $col &lt; ancestor::tgroup/@cols">
+          <xsl:call-template name="border">
+            <xsl:with-param name="side" select="'right'"/>
+          </xsl:call-template>
+        </xsl:if>
+
+        <xsl:if test="@morerows">
+          <xsl:attribute name="number-rows-spanned">
+            <xsl:value-of select="@morerows+1"/>
+          </xsl:attribute>
+        </xsl:if>
+
+        <xsl:if test="$entry.colspan &gt; 1">
+          <xsl:attribute name="number-columns-spanned">
+            <xsl:value-of select="$entry.colspan"/>
+          </xsl:attribute>
+        </xsl:if>
+
+        <xsl:if test="$valign != ''">
+          <xsl:attribute name="display-align">
+            <xsl:choose>
+              <xsl:when test="$valign='top'">before</xsl:when>
+              <xsl:when test="$valign='middle'">center</xsl:when>
+              <xsl:when test="$valign='bottom'">after</xsl:when>
+              <xsl:otherwise>
+                <xsl:message>
+                  <xsl:text>Unexpected valign value: </xsl:text>
+                  <xsl:value-of select="$valign"/>
+                  <xsl:text>, center used.</xsl:text>
+                </xsl:message>
+                <xsl:text>center</xsl:text>
+              </xsl:otherwise>
+            </xsl:choose>
+          </xsl:attribute>
+        </xsl:if>
+
+        <xsl:if test="$align != ''">
+          <xsl:attribute name="text-align">
+            <xsl:value-of select="$align"/>
+          </xsl:attribute>
+        </xsl:if>
+
+        <xsl:if test="$char != ''">
+          <xsl:attribute name="text-align">
+            <xsl:value-of select="$char"/>
+          </xsl:attribute>
+        </xsl:if>
+
+<!--
+        <xsl:if test="@charoff">
+          <xsl:attribute name="charoff">
+            <xsl:value-of select="@charoff"/>
+          </xsl:attribute>
+        </xsl:if>
+-->
+
+        <xsl:choose>
+          <xsl:when test="$xep.extensions != 0 and $orientation != ''">
+            <fo:block-container reference-orientation="{$orientation}">
+              <xsl:if test="$rotated-width != ''">
+                <xsl:attribute name="width">
+                  <xsl:value-of select="$rotated-width"/>
+                </xsl:attribute>
+              </xsl:if>
+              <xsl:copy-of select="$cell.content"/>
+            </fo:block-container>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:copy-of select="$cell.content"/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </fo:table-cell>
+
+      <xsl:choose>
+        <xsl:when test="following-sibling::entry|following-sibling::entrytbl">
+          <xsl:apply-templates select="(following-sibling::entry
+                                       |following-sibling::entrytbl)[1]">
+            <xsl:with-param name="col" select="$col+$entry.colspan"/>
+            <xsl:with-param name="spans" select="$following.spans"/>
+          </xsl:apply-templates>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:call-template name="finaltd">
+            <xsl:with-param name="spans" select="$following.spans"/>
+            <xsl:with-param name="col" select="$col+$entry.colspan"/>
+          </xsl:call-template>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="entry|entrytbl" name="sentry" mode="span">
+  <xsl:param name="col" select="1"/>
+  <xsl:param name="spans"/>
+
+  <xsl:variable name="entry.colnum">
+    <xsl:call-template name="entry.colnum"/>
+  </xsl:variable>
+
+  <xsl:variable name="entry.colspan">
+    <xsl:choose>
+      <xsl:when test="@spanname or @namest">
+        <xsl:call-template name="calculate.colspan"/>
+      </xsl:when>
+      <xsl:otherwise>1</xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:variable name="following.spans">
+    <xsl:call-template name="calculate.following.spans">
+      <xsl:with-param name="colspan" select="$entry.colspan"/>
+      <xsl:with-param name="spans" select="$spans"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="$spans != '' and not(starts-with($spans,'0:'))">
+      <xsl:value-of select="substring-before($spans,':')-1"/>
+      <xsl:text>:</xsl:text>
+      <xsl:call-template name="sentry">
+        <xsl:with-param name="col" select="$col+1"/>
+        <xsl:with-param name="spans" select="substring-after($spans,':')"/>
+      </xsl:call-template>
+    </xsl:when>
+
+    <xsl:when test="$entry.colnum &gt; $col">
+      <xsl:text>0:</xsl:text>
+      <xsl:call-template name="sentry">
+        <xsl:with-param name="col" select="$col+$entry.colspan"/>
+        <xsl:with-param name="spans" select="$following.spans"/>
+      </xsl:call-template>
+    </xsl:when>
+
+    <xsl:otherwise>
+      <xsl:call-template name="copy-string">
+        <xsl:with-param name="count" select="$entry.colspan"/>
+        <xsl:with-param name="string">
+          <xsl:choose>
+            <xsl:when test="@morerows">
+              <xsl:value-of select="@morerows"/>
+            </xsl:when>
+            <xsl:otherwise>0</xsl:otherwise>
+          </xsl:choose>
+          <xsl:text>:</xsl:text>
+        </xsl:with-param>
+      </xsl:call-template>
+
+      <xsl:choose>
+        <xsl:when test="following-sibling::entry|following-sibling::entrytbl">
+          <xsl:apply-templates select="(following-sibling::entry
+                                       |following-sibling::entrytbl)[1]"
+                               mode="span">
+            <xsl:with-param name="col" select="$col+$entry.colspan"/>
+            <xsl:with-param name="spans" select="$following.spans"/>
+          </xsl:apply-templates>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:call-template name="sfinaltd">
+            <xsl:with-param name="spans" select="$following.spans"/>
+          </xsl:call-template>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="generate.colgroup.raw">
+  <xsl:param name="cols" select="1"/>
+  <xsl:param name="count" select="1"/>
+
+  <xsl:choose>
+    <xsl:when test="$count>$cols"></xsl:when>
+    <xsl:otherwise>
+      <xsl:call-template name="generate.col.raw">
+        <xsl:with-param name="countcol" select="$count"/>
+      </xsl:call-template>
+      <xsl:call-template name="generate.colgroup.raw">
+        <xsl:with-param name="cols" select="$cols"/>
+        <xsl:with-param name="count" select="$count+1"/>
+      </xsl:call-template>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="generate.colgroup">
+  <xsl:param name="cols" select="1"/>
+  <xsl:param name="count" select="1"/>
+
+  <xsl:choose>
+    <xsl:when test="$count>$cols"></xsl:when>
+    <xsl:otherwise>
+      <xsl:call-template name="generate.col">
+        <xsl:with-param name="countcol" select="$count"/>
+      </xsl:call-template>
+      <xsl:call-template name="generate.colgroup">
+        <xsl:with-param name="cols" select="$cols"/>
+        <xsl:with-param name="count" select="$count+1"/>
+      </xsl:call-template>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="generate.col.raw">
+  <!-- generate the table-column for column countcol -->
+  <xsl:param name="countcol">1</xsl:param>
+  <xsl:param name="colspecs" select="./colspec"/>
+  <xsl:param name="count">1</xsl:param>
+  <xsl:param name="colnum">1</xsl:param>
+
+  <xsl:choose>
+    <xsl:when test="$count>count($colspecs)">
+      <fo:table-column column-number="{$countcol}"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:variable name="colspec" select="$colspecs[$count=position()]"/>
+
+      <xsl:variable name="colspec.colnum">
+        <xsl:choose>
+          <xsl:when test="$colspec/@colnum">
+            <xsl:value-of select="$colspec/@colnum"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:value-of select="$colnum"/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:variable>
+
+      <xsl:variable name="colspec.colwidth">
+        <xsl:choose>
+          <xsl:when test="$colspec/@colwidth">
+            <xsl:value-of select="$colspec/@colwidth"/>
+          </xsl:when>
+          <xsl:otherwise>1*</xsl:otherwise>
+        </xsl:choose>
+      </xsl:variable>
+
+      <xsl:choose>
+        <xsl:when test="$colspec.colnum=$countcol">
+          <fo:table-column column-number="{$countcol}">
+            <xsl:attribute name="column-width">
+              <xsl:value-of select="$colspec.colwidth"/>
+            </xsl:attribute>
+          </fo:table-column>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:call-template name="generate.col.raw">
+            <xsl:with-param name="countcol" select="$countcol"/>
+            <xsl:with-param name="colspecs" select="$colspecs"/>
+            <xsl:with-param name="count" select="$count+1"/>
+            <xsl:with-param name="colnum">
+              <xsl:choose>
+                <xsl:when test="$colspec/@colnum">
+                  <xsl:value-of select="$colspec/@colnum + 1"/>
+                </xsl:when>
+                <xsl:otherwise>
+                  <xsl:value-of select="$colnum + 1"/>
+                </xsl:otherwise>
+              </xsl:choose>
+            </xsl:with-param>
+           </xsl:call-template>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="generate.col">
+  <!-- generate the table-column for column countcol -->
+  <xsl:param name="countcol">1</xsl:param>
+  <xsl:param name="colspecs" select="./colspec"/>
+  <xsl:param name="count">1</xsl:param>
+  <xsl:param name="colnum">1</xsl:param>
+
+  <xsl:choose>
+    <xsl:when test="$count>count($colspecs)">
+      <fo:table-column column-number="{$countcol}">
+	<xsl:variable name="colwidth">
+	  <xsl:call-template name="calc.column.width"/>
+	</xsl:variable>
+	<xsl:if test="$colwidth != 'proportional-column-width(1)'">
+	  <xsl:attribute name="column-width">
+	    <xsl:value-of select="$colwidth"/>
+	  </xsl:attribute>
+	</xsl:if>
+      </fo:table-column>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:variable name="colspec" select="$colspecs[$count=position()]"/>
+
+      <xsl:variable name="colspec.colnum">
+        <xsl:choose>
+          <xsl:when test="$colspec/@colnum">
+            <xsl:value-of select="$colspec/@colnum"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:value-of select="$colnum"/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:variable>
+
+      <xsl:variable name="colspec.colwidth">
+        <xsl:choose>
+          <xsl:when test="$colspec/@colwidth">
+            <xsl:value-of select="$colspec/@colwidth"/>
+          </xsl:when>
+          <xsl:otherwise>1*</xsl:otherwise>
+        </xsl:choose>
+      </xsl:variable>
+
+      <xsl:choose>
+        <xsl:when test="$colspec.colnum=$countcol">
+          <fo:table-column column-number="{$countcol}">
+	    <xsl:variable name="colwidth">
+              <xsl:call-template name="calc.column.width">
+                <xsl:with-param name="colwidth">
+                  <xsl:value-of select="$colspec.colwidth"/>
+                </xsl:with-param>
+	      </xsl:call-template>
+	    </xsl:variable>
+	    <xsl:if test="$colwidth != 'proportional-column-width(1)'">
+	      <xsl:attribute name="column-width">
+		<xsl:value-of select="$colwidth"/>
+	      </xsl:attribute>
+	    </xsl:if>
+	  </fo:table-column>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:call-template name="generate.col">
+            <xsl:with-param name="countcol" select="$countcol"/>
+            <xsl:with-param name="colspecs" select="$colspecs"/>
+            <xsl:with-param name="count" select="$count+1"/>
+            <xsl:with-param name="colnum">
+              <xsl:choose>
+                <xsl:when test="$colspec/@colnum">
+                  <xsl:value-of select="$colspec/@colnum + 1"/>
+                </xsl:when>
+                <xsl:otherwise>
+                  <xsl:value-of select="$colnum + 1"/>
+                </xsl:otherwise>
+              </xsl:choose>
+            </xsl:with-param>
+           </xsl:call-template>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<doc:template name="calc.column.width" xmlns="">
+<refpurpose>Calculate an XSL FO table column width specification from a
+CALS table column width specification.</refpurpose>
+
+<refdescription>
+<para>CALS expresses table column widths in the following basic
+forms:</para>
+
+<itemizedlist>
+<listitem>
+<para><emphasis>99.99units</emphasis>, a fixed length specifier.</para>
+</listitem>
+<listitem>
+<para><emphasis>99.99</emphasis>, a fixed length specifier without any units.</para>
+</listitem>
+<listitem>
+<para><emphasis>99.99*</emphasis>, a relative length specifier.</para>
+</listitem>
+<listitem>
+<para><emphasis>99.99*+99.99units</emphasis>, a combination of both.</para>
+</listitem>
+</itemizedlist>
+
+<para>The CALS units are points (pt), picas (pi), centimeters (cm),
+millimeters (mm), and inches (in). These are the same units as XSL,
+except that XSL abbreviates picas "pc" instead of "pi". If a length
+specifier has no units, the CALS default unit (pt) is assumed.</para>
+
+<para>Relative length specifiers are represented in XSL with the
+proportional-column-width() function.</para>
+
+<para>Here are some examples:</para>
+
+<itemizedlist>
+<listitem>
+<para>"36pt" becomes "36pt"</para>
+</listitem>
+<listitem>
+<para>"3pi" becomes "3pc"</para>
+</listitem>
+<listitem>
+<para>"36" becomes "36pt"</para>
+</listitem>
+<listitem>
+<para>"3*" becomes "proportional-column-width(3)"</para>
+</listitem>
+<listitem>
+<para>"3*+2pi" becomes "proportional-column-width(3)+2pc"</para>
+</listitem>
+<listitem>
+<para>"1*+2" becomes "proportional-column-width(1)+2pt"</para>
+</listitem>
+</itemizedlist>
+</refdescription>
+
+<refparameter>
+<variablelist>
+<varlistentry><term>colwidth</term>
+<listitem>
+<para>The CALS column width specification.</para>
+</listitem>
+</varlistentry>
+</variablelist>
+</refparameter>
+
+<refreturn>
+<para>The XSL column width specification.</para>
+</refreturn>
+</doc:template>
+
+<xsl:template name="calc.column.width">
+  <xsl:param name="colwidth">1*</xsl:param>
+
+  <!-- Ok, the colwidth could have any one of the following forms: -->
+  <!--        1*       = proportional width -->
+  <!--         *       = same as 1* -->
+  <!--     1unit       = 1.0 units wide -->
+  <!--         1       = 1pt wide -->
+  <!--  1*+1unit       = proportional width + some fixed width -->
+  <!--      1*+1       = proportional width + some fixed width -->
+
+  <!-- If it has a proportional width, translate it to XSL -->
+  <xsl:if test="contains($colwidth, '*')">
+    <xsl:text>proportional-column-width(</xsl:text>
+    <xsl:choose>
+      <xsl:when test="substring-before($colwidth, '*') != ''"> 
+        <xsl:value-of select="substring-before($colwidth, '*')"/>
+      </xsl:when>
+      <xsl:otherwise>
+         <xsl:text>1.00</xsl:text>
+      </xsl:otherwise>
+    </xsl:choose>
+    <xsl:text>)</xsl:text>
+  </xsl:if>
+
+  <!-- Now grab the non-proportional part of the specification -->
+  <xsl:variable name="width-units">
+    <xsl:choose>
+      <xsl:when test="contains($colwidth, '*')">
+        <xsl:value-of
+             select="normalize-space(substring-after($colwidth, '*'))"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="normalize-space($colwidth)"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <!-- Ok, now the width-units could have any one of the following forms: -->
+  <!--                 = <empty string> -->
+  <!--     1unit       = 1.0 units wide -->
+  <!--         1       = 1pt wide -->
+  <!-- with an optional leading sign -->
+
+  <!-- Grab the width part by blanking out the units part and discarding -->
+  <!-- whitespace. It's not pretty, but it works. -->
+  <xsl:variable name="width"
+       select="normalize-space(translate($width-units,
+                                         '+-0123456789.abcdefghijklmnopqrstuvwxyz',
+                                         '+-0123456789.'))"/>
+
+  <!-- Grab the units part by blanking out the width part and discarding -->
+  <!-- whitespace. It's not pretty, but it works. -->
+  <xsl:variable name="units"
+       select="normalize-space(translate($width-units,
+                                         'abcdefghijklmnopqrstuvwxyz+-0123456789.',
+                                         'abcdefghijklmnopqrstuvwxyz'))"/>
+
+  <!-- Output the width -->
+  <xsl:value-of select="$width"/>
+
+  <!-- Output the units, translated appropriately -->
+  <xsl:choose>
+    <xsl:when test="$units = 'pi'">pc</xsl:when>
+    <xsl:when test="$units = '' and $width != ''">pt</xsl:when>
+    <xsl:otherwise><xsl:value-of select="$units"/></xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/task.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/task.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/task.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,75 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                version="1.0">
+
+<!-- ********************************************************************
+     $Id: task.xsl,v 1.1.1.1 2004/10/19 21:21:44 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:template match="task">
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <xsl:variable name="param.placement"
+                select="substring-after(normalize-space($formal.title.placement),
+                                        concat(local-name(.), ' '))"/>
+
+  <xsl:variable name="placement">
+    <xsl:choose>
+      <xsl:when test="contains($param.placement, ' ')">
+        <xsl:value-of select="substring-before($param.placement, ' ')"/>
+      </xsl:when>
+      <xsl:when test="$param.placement = ''">before</xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$param.placement"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:variable name="preamble"
+                select="*[not(self::title
+                              or self::titleabbrev)]"/>
+
+  <fo:block id="{$id}"
+            xsl:use-attribute-sets="formal.object.properties">
+    <xsl:call-template name="anchor"/>
+
+    <xsl:if test="title and $placement = 'before'">
+      <xsl:call-template name="formal.object.heading"/>
+    </xsl:if>
+
+    <xsl:apply-templates select="$preamble"/>
+
+    <xsl:if test="title and $placement != 'before'">
+      <xsl:call-template name="formal.object.heading"/>
+    </xsl:if>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="task/title">
+  <!-- nop -->
+</xsl:template>
+
+<xsl:template match="tasksummary">
+  <xsl:call-template name="semiformal.object"/>
+</xsl:template>
+
+<xsl:template match="taskprerequisites">
+  <xsl:call-template name="semiformal.object"/>
+</xsl:template>
+
+<xsl:template match="taskrelated">
+  <xsl:call-template name="semiformal.object"/>
+</xsl:template>
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/titlepage.templates.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/titlepage.templates.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/titlepage.templates.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1225 @@
+<!DOCTYPE t:templates [
+<!ENTITY hsize0 "10pt">
+<!ENTITY hsize1 "12pt">
+<!ENTITY hsize2 "14.4pt">
+<!ENTITY hsize3 "17.28pt">
+<!ENTITY hsize4 "20.736pt">
+<!ENTITY hsize5 "24.8832pt">
+<!ENTITY hsize0space "7.5pt"> <!-- 0.75 * hsize0 -->
+<!ENTITY hsize1space "9pt"> <!-- 0.75 * hsize1 -->
+<!ENTITY hsize2space "10.8pt"> <!-- 0.75 * hsize2 -->
+<!ENTITY hsize3space "12.96pt"> <!-- 0.75 * hsize3 -->
+<!ENTITY hsize4space "15.552pt"> <!-- 0.75 * hsize4 -->
+<!ENTITY hsize5space "18.6624pt"> <!-- 0.75 * hsize5 -->
+]>
+<t:templates xmlns:t="http://nwalsh.com/docbook/xsl/template/1.0"
+	     xmlns:param="http://nwalsh.com/docbook/xsl/template/1.0/param"
+             xmlns:fo="http://www.w3.org/1999/XSL/Format"
+             xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<!-- ********************************************************************
+     $Id: titlepage.templates.xml,v 1.1.1.1 2004/10/19 21:21:44 juntao Exp $
+     ********************************************************************
+
+     This file is part of the DocBook XSL Stylesheet distribution.
+     See ../README or http://docbook.sf.net/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<t:titlepage t:element="article" t:wrapper="fo:block"
+             font-family="{$title.fontset}">
+
+  <t:titlepage-content t:side="recto"
+             text-align="center">
+
+    <title t:named-template="component.title"
+	   param:node="ancestor-or-self::article[1]"
+	   keep-with-next="always"
+	   font-size="&hsize5;"
+	   font-weight="bold"/>
+
+    <subtitle/>
+
+    <corpauthor space-before="0.5em"
+                font-size="&hsize2;"/>
+    <authorgroup space-before="0.5em"
+                 font-size="&hsize2;"/>
+    <author space-before="0.5em"
+            font-size="&hsize2;"/>
+
+    <othercredit space-before="0.5em"/>
+    <releaseinfo space-before="0.5em"/>
+    <copyright space-before="0.5em"/>
+    <legalnotice text-align="start"
+                 margin-left="0.5in"
+                 margin-right="0.5in"
+                 font-family="{$body.fontset}"/>
+    <pubdate space-before="0.5em"/>
+    <revision space-before="0.5em"/>
+    <revhistory space-before="0.5em"/>
+    <abstract space-before="0.5em"
+	      text-align="start"
+	      margin-left="0.5in"
+              margin-right="0.5in"
+              font-family="{$body.fontset}"/>
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+<t:titlepage t:element="set" t:wrapper="fo:block">
+  <t:titlepage-content t:side="recto">
+      <title
+	     t:named-template="division.title"
+	     param:node="ancestor-or-self::set[1]"
+	     text-align="center"
+	     font-size="&hsize5;"
+	     space-before="&hsize5space;"
+	     font-weight="bold"
+	     font-family="{$title.fontset}"/>
+    <subtitle
+	      font-family="{$title.fontset}"
+	      text-align="center"/>
+    <corpauthor/>
+    <authorgroup/>
+    <author/>
+    <othercredit/>
+    <releaseinfo/>
+    <copyright/>
+    <legalnotice/>
+    <pubdate/>
+    <revision/>
+    <revhistory/>
+    <abstract/>
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+  <t:titlepage t:element="book" t:wrapper="fo:block">
+    <t:titlepage-content t:side="recto">
+      <title
+	     t:named-template="division.title"
+	     param:node="ancestor-or-self::book[1]"
+	     text-align="center"
+	     font-size="&hsize5;"
+	     space-before="&hsize5space;"
+	     font-weight="bold"
+	     font-family="{$title.fontset}"/>
+      <subtitle
+		text-align="center"
+		font-size="&hsize4;"
+		space-before="&hsize4space;"
+		font-family="{$title.fontset}"/>
+      <corpauthor font-size="&hsize3;"
+		  keep-with-next="always"
+		  space-before="2in"/>
+      <authorgroup space-before="2in"/>
+      <author font-size="&hsize3;"
+	      space-before="&hsize2space;"
+	      keep-with-next="always"/>
+    </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+      <title
+	     t:named-template="book.verso.title"
+	     font-size="&hsize2;"
+	     font-weight="bold"
+	     font-family="{$title.fontset}"/>
+      <corpauthor/>
+      <authorgroup t:named-template="verso.authorgroup"/>
+      <author/>
+      <othercredit/>
+      <pubdate space-before="1em"/>
+      <copyright/>
+      <abstract/>
+      <legalnotice font-size="8pt"/>
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+      <fo:block break-after="page"/>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+      <fo:block break-after="page"/>
+  </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+<t:titlepage t:element="part" t:wrapper="fo:block">
+  <t:titlepage-content t:side="recto">
+      <title
+	     t:named-template="division.title"
+	     param:node="ancestor-or-self::part[1]"
+	     text-align="center"
+	     font-size="&hsize5;"
+	     space-before="&hsize5space;"
+	     font-weight="bold"
+	     font-family="{$title.fontset}"/>
+    <subtitle
+	      text-align="center"
+	      font-size="&hsize4;"
+	      space-before="&hsize4space;"
+	      font-weight='bold'
+	      font-style='italic'
+	      font-family="{$title.fontset}"/>
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<t:titlepage t:element="partintro" t:wrapper="fo:block">
+  <t:titlepage-content t:side="recto">
+    <title
+	   text-align="center"
+	   font-size="&hsize5;"
+	   font-weight="bold"
+	   space-before="1em"
+	   font-family="{$title.fontset}"/>
+    <subtitle
+	      text-align="center"
+	      font-size="&hsize2;"
+	      font-weight="bold"
+	      font-style="italic"
+	      font-family="{$title.fontset}"/>
+    <corpauthor/>
+    <authorgroup/>
+    <author/>
+    <othercredit/>
+    <releaseinfo/>
+    <copyright/>
+    <legalnotice/>
+    <pubdate/>
+    <revision/>
+    <revhistory/>
+    <abstract/>
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+<t:titlepage t:element="reference" t:wrapper="fo:block">
+  <t:titlepage-content t:side="recto">
+      <title
+	     t:named-template="division.title"
+	     param:node="ancestor-or-self::reference[1]"
+	     text-align="center"
+	     font-size="&hsize5;"
+	     space-before="&hsize5space;"
+	     font-weight="bold"
+	     font-family="{$title.fontset}"/>
+    <subtitle
+	      font-family="{$title.fontset}"
+	      text-align="center"/>
+    <corpauthor/>
+    <authorgroup/>
+    <author/>
+    <othercredit/>
+    <releaseinfo/>
+    <copyright/>
+    <legalnotice/>
+    <pubdate/>
+    <revision/>
+    <revhistory/>
+    <abstract/>
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+<t:titlepage t:element="refsynopsisdiv" t:wrapper="fo:block">
+  <t:titlepage-content t:side="recto">
+    <title
+	   font-family="{$title.fontset}"/>
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+<t:titlepage t:element="refsection" t:wrapper="fo:block">
+  <t:titlepage-content t:side="recto">
+    <title
+	   font-family="{$title.fontset}"/>
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+<t:titlepage t:element="refsect1" t:wrapper="fo:block">
+  <t:titlepage-content t:side="recto">
+    <title
+	   font-family="{$title.fontset}"/>
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+<t:titlepage t:element="refsect2" t:wrapper="fo:block">
+  <t:titlepage-content t:side="recto">
+    <title
+	   font-family="{$title.fontset}"/>
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+<t:titlepage t:element="refsect3" t:wrapper="fo:block">
+  <t:titlepage-content t:side="recto">
+    <title
+	   font-family="{$title.fontset}"/>
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+  <t:titlepage t:element="dedication" t:wrapper="fo:block">
+    <t:titlepage-content t:side="recto">
+      <title
+	     t:force="1"
+	     t:named-template="component.title"
+	     param:node="ancestor-or-self::dedication[1]"
+	     margin-left="{$title.margin.left}"
+	     font-size="&hsize5;"
+	     font-family="{$title.fontset}"
+	     font-weight="bold"/>
+      <subtitle
+		font-family="{$title.fontset}"/>
+    </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+  <t:titlepage t:element="preface" t:wrapper="fo:block">
+    <t:titlepage-content t:side="recto">
+      <title
+	     t:force="1"
+	     t:named-template="component.title"
+	     param:node="ancestor-or-self::preface[1]"
+	     margin-left="{$title.margin.left}"
+	     font-size="&hsize5;"
+	     font-family="{$title.fontset}"
+	     font-weight="bold"/>
+      <subtitle
+		font-family="{$title.fontset}"/>
+      <corpauthor/>
+      <authorgroup/>
+      <author/>
+      <othercredit/>
+      <releaseinfo/>
+      <copyright/>
+      <legalnotice/>
+      <pubdate/>
+      <revision/>
+      <revhistory/>
+      <abstract/>
+    </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+  <t:titlepage t:element="chapter" t:wrapper="fo:block"
+               font-family="{$title.fontset}">
+    <t:titlepage-content t:side="recto" margin-left="{$title.margin.left}">
+      <title t:named-template="component.title"
+	     param:node="ancestor-or-self::chapter[1]"
+	     font-size="&hsize5;"
+	     font-weight="bold"/>
+
+      <subtitle space-before="0.5em"
+		font-style="italic"
+		font-size="&hsize2;"
+		font-weight="bold"/>
+
+      <corpauthor  space-before="0.5em"
+	           space-after="0.5em"
+                   font-size="&hsize2;"/>
+
+      <authorgroup space-before="0.5em"
+	           space-after="0.5em"
+                   font-size="&hsize2;"/>
+
+      <author      space-before="0.5em"
+	           space-after="0.5em"
+                   font-size="&hsize2;"/>
+
+      <othercredit/>
+      <releaseinfo/>
+      <copyright/>
+      <legalnotice/>
+      <pubdate/>
+      <revision/>
+      <revhistory/>
+      <abstract/>
+    </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+  <t:titlepage t:element="appendix" t:wrapper="fo:block">
+    <t:titlepage-content t:side="recto">
+      <title
+	     t:named-template="component.title"
+	     param:node="ancestor-or-self::appendix[1]"
+	     margin-left="{$title.margin.left}"
+	     font-size="&hsize5;"
+	     font-weight="bold"
+	     font-family="{$title.fontset}"/>
+      <subtitle
+		font-family="{$title.fontset}"/>
+      <corpauthor/>
+      <authorgroup/>
+      <author/>
+      <othercredit/>
+      <releaseinfo/>
+      <copyright/>
+      <legalnotice/>
+      <pubdate/>
+      <revision/>
+      <revhistory/>
+      <abstract/>
+    </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+<t:titlepage t:element="section" t:wrapper="fo:block">
+  <t:titlepage-content t:side="recto">
+    <title
+	   margin-left="{$title.margin.left}"
+	   font-family="{$title.fontset}"/>
+    <subtitle
+	      font-family="{$title.fontset}"/>
+    <corpauthor/>
+    <authorgroup/>
+    <author/>
+    <othercredit/>
+    <releaseinfo/>
+    <copyright/>
+    <legalnotice/>
+    <pubdate/>
+    <revision/>
+    <revhistory/>
+    <abstract/>
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<t:titlepage t:element="sect1" t:wrapper="fo:block">
+  <t:titlepage-content t:side="recto">
+    <title
+	   margin-left="{$title.margin.left}"
+	   font-family="{$title.fontset}"/>
+    <subtitle
+	      font-family="{$title.fontset}"/>
+    <corpauthor/>
+    <authorgroup/>
+    <author/>
+    <othercredit/>
+    <releaseinfo/>
+    <copyright/>
+    <legalnotice/>
+    <pubdate/>
+    <revision/>
+    <revhistory/>
+    <abstract/>
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<t:titlepage t:element="sect2" t:wrapper="fo:block">
+  <t:titlepage-content t:side="recto">
+    <title
+	   margin-left="{$title.margin.left}"
+	   font-family="{$title.fontset}"/>
+    <subtitle
+	      font-family="{$title.fontset}"/>
+    <corpauthor/>
+    <authorgroup/>
+    <author/>
+    <othercredit/>
+    <releaseinfo/>
+    <copyright/>
+    <legalnotice/>
+    <pubdate/>
+    <revision/>
+    <revhistory/>
+    <abstract/>
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<t:titlepage t:element="sect3" t:wrapper="fo:block">
+  <t:titlepage-content t:side="recto">
+    <title
+	   margin-left="{$title.margin.left}"
+	   font-family="{$title.fontset}"/>
+    <subtitle
+	      font-family="{$title.fontset}"/>
+    <corpauthor/>
+    <authorgroup/>
+    <author/>
+    <othercredit/>
+    <releaseinfo/>
+    <copyright/>
+    <legalnotice/>
+    <pubdate/>
+    <revision/>
+    <revhistory/>
+    <abstract/>
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<t:titlepage t:element="sect4" t:wrapper="fo:block">
+  <t:titlepage-content t:side="recto">
+    <title
+	   margin-left="{$title.margin.left}"
+	   font-family="{$title.fontset}"/>
+    <subtitle
+	      font-family="{$title.fontset}"/>
+    <corpauthor/>
+    <authorgroup/>
+    <author/>
+    <othercredit/>
+    <releaseinfo/>
+    <copyright/>
+    <legalnotice/>
+    <pubdate/>
+    <revision/>
+    <revhistory/>
+    <abstract/>
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<t:titlepage t:element="sect5" t:wrapper="fo:block">
+  <t:titlepage-content t:side="recto">
+    <title
+	   margin-left="{$title.margin.left}"
+	   font-family="{$title.fontset}"/>
+    <subtitle
+	      font-family="{$title.fontset}"/>
+    <corpauthor/>
+    <authorgroup/>
+    <author/>
+    <othercredit/>
+    <releaseinfo/>
+    <copyright/>
+    <legalnotice/>
+    <pubdate/>
+    <revision/>
+    <revhistory/>
+    <abstract/>
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<t:titlepage t:element="simplesect" t:wrapper="fo:block">
+  <t:titlepage-content t:side="recto">
+    <title
+	   margin-left="{$title.margin.left}"
+	   font-family="{$title.fontset}"/>
+    <subtitle
+	      font-family="{$title.fontset}"/>
+    <corpauthor/>
+    <authorgroup/>
+    <author/>
+    <othercredit/>
+    <releaseinfo/>
+    <copyright/>
+    <legalnotice/>
+    <pubdate/>
+    <revision/>
+    <revhistory/>
+    <abstract/>
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+  <t:titlepage t:element="bibliography" t:wrapper="fo:block">
+    <t:titlepage-content t:side="recto">
+      <title
+	     t:force="1"
+	     t:named-template="component.title"
+	     param:node="ancestor-or-self::bibliography[1]"
+	     margin-left="{$title.margin.left}"
+	     font-size="&hsize5;"
+	     font-family="{$title.fontset}"
+	     font-weight="bold"/>
+      <subtitle
+		font-family="{$title.fontset}"/>
+    </t:titlepage-content>
+
+    <t:titlepage-content t:side="verso">
+    </t:titlepage-content>
+
+    <t:titlepage-separator>
+    </t:titlepage-separator>
+
+    <t:titlepage-before t:side="recto">
+    </t:titlepage-before>
+
+    <t:titlepage-before t:side="verso">
+    </t:titlepage-before>
+  </t:titlepage>
+
+<!-- ==================================================================== -->
+
+  <t:titlepage t:element="bibliodiv" t:wrapper="fo:block">
+    <t:titlepage-content t:side="recto">
+      <title t:named-template="component.title"
+	     param:node="ancestor-or-self::bibliodiv[1]"
+	     margin-left="{$title.margin.left}"
+	     font-size="&hsize4;"
+	     font-family="{$title.fontset}"
+	     font-weight="bold"/>
+      <subtitle
+		font-family="{$title.fontset}"/>
+    </t:titlepage-content>
+
+    <t:titlepage-content t:side="verso">
+    </t:titlepage-content>
+
+    <t:titlepage-separator>
+    </t:titlepage-separator>
+
+    <t:titlepage-before t:side="recto">
+    </t:titlepage-before>
+
+    <t:titlepage-before t:side="verso">
+    </t:titlepage-before>
+  </t:titlepage>
+
+<!-- ==================================================================== -->
+
+  <t:titlepage t:element="glossary" t:wrapper="fo:block">
+    <t:titlepage-content t:side="recto">
+      <title
+	     t:force="1"
+	     t:named-template="component.title"
+	     param:node="ancestor-or-self::glossary[1]"
+	     margin-left="{$title.margin.left}"
+	     font-size="&hsize5;"
+	     font-family="{$title.fontset}"
+	     font-weight="bold"/>
+      <subtitle
+		font-family="{$title.fontset}"/>
+    </t:titlepage-content>
+
+    <t:titlepage-content t:side="verso">
+    </t:titlepage-content>
+
+    <t:titlepage-separator>
+    </t:titlepage-separator>
+
+    <t:titlepage-before t:side="recto">
+    </t:titlepage-before>
+
+    <t:titlepage-before t:side="verso">
+    </t:titlepage-before>
+  </t:titlepage>
+
+<!-- ==================================================================== -->
+
+  <t:titlepage t:element="glossdiv" t:wrapper="fo:block">
+    <t:titlepage-content t:side="recto">
+      <title t:named-template="component.title"
+	     param:node="ancestor-or-self::glossdiv[1]"
+	     margin-left="{$title.margin.left}"
+	     font-size="&hsize4;"
+	     font-family="{$title.fontset}"
+	     font-weight="bold"/>
+      <subtitle
+		font-family="{$title.fontset}"/>
+    </t:titlepage-content>
+
+    <t:titlepage-content t:side="verso">
+    </t:titlepage-content>
+
+    <t:titlepage-separator>
+    </t:titlepage-separator>
+
+    <t:titlepage-before t:side="recto">
+    </t:titlepage-before>
+
+    <t:titlepage-before t:side="verso">
+    </t:titlepage-before>
+  </t:titlepage>
+
+<!-- ==================================================================== -->
+
+  <t:titlepage t:element="index" t:wrapper="fo:block">
+    <t:titlepage-content t:side="recto">
+      <title
+	     t:force="1"
+	     t:named-template="component.title"
+	     param:node="ancestor-or-self::index[1]"
+             param:pagewide="1"
+	     margin-left="0pt"
+	     font-size="&hsize5;"
+	     font-family="{$title.fontset}"
+	     font-weight="bold"/>
+      <subtitle
+		font-family="{$title.fontset}"/>
+    </t:titlepage-content>
+
+    <t:titlepage-content t:side="verso">
+    </t:titlepage-content>
+
+    <t:titlepage-separator>
+    </t:titlepage-separator>
+
+    <t:titlepage-before t:side="recto">
+    </t:titlepage-before>
+
+    <t:titlepage-before t:side="verso">
+    </t:titlepage-before>
+  </t:titlepage>
+
+<!-- ==================================================================== -->
+
+  <!-- The indexdiv.title template is used so that manual and -->
+  <!-- automatically generated indexdiv titles get the same -->
+  <!-- formatting. -->
+
+  <t:titlepage t:element="indexdiv" t:wrapper="fo:block">
+    <t:titlepage-content t:side="recto">
+      <title t:force="1"
+	     t:named-template="indexdiv.title"
+	     param:title="title"/>
+      <subtitle
+		font-family="{$title.fontset}"/>
+    </t:titlepage-content>
+
+    <t:titlepage-content t:side="verso">
+    </t:titlepage-content>
+
+    <t:titlepage-separator>
+    </t:titlepage-separator>
+
+    <t:titlepage-before t:side="recto">
+    </t:titlepage-before>
+
+    <t:titlepage-before t:side="verso">
+    </t:titlepage-before>
+  </t:titlepage>
+
+<!-- ==================================================================== -->
+
+  <t:titlepage t:element="setindex" t:wrapper="fo:block">
+    <t:titlepage-content t:side="recto">
+      <title
+	     t:force="1"
+	     t:named-template="component.title"
+	     param:node="ancestor-or-self::setindex[1]"
+             param:pagewide="1"
+	     margin-left="0pt"
+	     font-size="&hsize5;"
+	     font-family="{$title.fontset}"
+	     font-weight="bold"/>
+      <subtitle
+		font-family="{$title.fontset}"/>
+    </t:titlepage-content>
+
+    <t:titlepage-content t:side="verso">
+    </t:titlepage-content>
+
+    <t:titlepage-separator>
+    </t:titlepage-separator>
+
+    <t:titlepage-before t:side="recto">
+    </t:titlepage-before>
+
+    <t:titlepage-before t:side="verso">
+    </t:titlepage-before>
+  </t:titlepage>
+
+<!-- ==================================================================== -->
+
+  <t:titlepage t:element="colophon" t:wrapper="fo:block">
+    <t:titlepage-content t:side="recto">
+      <title
+	     t:force="1"
+	     t:named-template="component.title"
+	     param:node="ancestor-or-self::colophon[1]"
+	     margin-left="{$title.margin.left}"
+	     font-size="&hsize5;"
+	     font-family="{$title.fontset}"
+	     font-weight="bold"/>
+      <subtitle
+		font-family="{$title.fontset}"/>
+    </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+  <t:titlepage t:element="table.of.contents" t:wrapper="fo:block">
+    <t:titlepage-content t:side="recto">
+      <title
+	     t:force="1"
+	     t:named-template="gentext"
+	     param:key="'TableofContents'"
+             space-before.minimum="1em"
+             space-before.optimum="1.5em"
+             space-before.maximum="2em"
+	     space-after="0.5em"
+	     margin-left="{$title.margin.left}"
+	     font-size="&hsize3;"
+	     font-weight="bold"
+	     font-family="{$title.fontset}"/>
+    </t:titlepage-content>
+
+    <t:titlepage-content t:side="verso">
+    </t:titlepage-content>
+
+    <t:titlepage-separator>
+    </t:titlepage-separator>
+
+    <t:titlepage-before t:side="recto">
+    </t:titlepage-before>
+
+    <t:titlepage-before t:side="verso">
+    </t:titlepage-before>
+  </t:titlepage>
+
+  <t:titlepage t:element="list.of.tables" t:wrapper="fo:block">
+    <t:titlepage-content t:side="recto">
+      <title
+	     t:force="1"
+	     t:named-template="gentext"
+	     param:key="'ListofTables'"
+             space-before.minimum="1em"
+             space-before.optimum="1.5em"
+             space-before.maximum="2em"
+	     space-after="0.5em"
+	     margin-left="{$title.margin.left}"
+	     font-size="&hsize3;"
+	     font-weight="bold"
+	     font-family="{$title.fontset}"/>
+    </t:titlepage-content>
+
+    <t:titlepage-content t:side="verso">
+    </t:titlepage-content>
+
+    <t:titlepage-separator>
+    </t:titlepage-separator>
+
+    <t:titlepage-before t:side="recto">
+    </t:titlepage-before>
+
+    <t:titlepage-before t:side="verso">
+    </t:titlepage-before>
+  </t:titlepage>
+
+  <t:titlepage t:element="list.of.figures" t:wrapper="fo:block">
+    <t:titlepage-content t:side="recto">
+      <title
+	     t:force="1"
+	     t:named-template="gentext"
+	     param:key="'ListofFigures'"
+             space-before.minimum="1em"
+             space-before.optimum="1.5em"
+             space-before.maximum="2em"
+	     space-after="0.5em"
+	     margin-left="{$title.margin.left}"
+	     font-size="&hsize3;"
+	     font-weight="bold"
+	     font-family="{$title.fontset}"/>
+    </t:titlepage-content>
+
+    <t:titlepage-content t:side="verso">
+    </t:titlepage-content>
+
+    <t:titlepage-separator>
+    </t:titlepage-separator>
+
+    <t:titlepage-before t:side="recto">
+    </t:titlepage-before>
+
+    <t:titlepage-before t:side="verso">
+    </t:titlepage-before>
+  </t:titlepage>
+
+  <t:titlepage t:element="list.of.examples" t:wrapper="fo:block">
+    <t:titlepage-content t:side="recto">
+      <title
+	     t:force="1"
+	     t:named-template="gentext"
+	     param:key="'ListofExamples'"
+             space-before.minimum="1em"
+             space-before.optimum="1.5em"
+             space-before.maximum="2em"
+	     space-after="0.5em"
+	     margin-left="{$title.margin.left}"
+	     font-size="&hsize3;"
+	     font-weight="bold"
+	     font-family="{$title.fontset}"/>
+    </t:titlepage-content>
+
+    <t:titlepage-content t:side="verso">
+    </t:titlepage-content>
+
+    <t:titlepage-separator>
+    </t:titlepage-separator>
+
+    <t:titlepage-before t:side="recto">
+    </t:titlepage-before>
+
+    <t:titlepage-before t:side="verso">
+    </t:titlepage-before>
+  </t:titlepage>
+
+  <t:titlepage t:element="list.of.equations" t:wrapper="fo:block">
+    <t:titlepage-content t:side="recto">
+      <title
+	     t:force="1"
+	     t:named-template="gentext"
+	     param:key="'ListofEquations'"
+             space-before.minimum="1em"
+             space-before.optimum="1.5em"
+             space-before.maximum="2em"
+	     space-after="0.5em"
+	     margin-left="{$title.margin.left}"
+	     font-size="&hsize3;"
+	     font-weight="bold"
+	     font-family="{$title.fontset}"/>
+    </t:titlepage-content>
+
+    <t:titlepage-content t:side="verso">
+    </t:titlepage-content>
+
+    <t:titlepage-separator>
+    </t:titlepage-separator>
+
+    <t:titlepage-before t:side="recto">
+    </t:titlepage-before>
+
+    <t:titlepage-before t:side="verso">
+    </t:titlepage-before>
+  </t:titlepage>
+
+  <t:titlepage t:element="list.of.procedures" t:wrapper="fo:block">
+    <t:titlepage-content t:side="recto">
+      <title
+	     t:force="1"
+	     t:named-template="gentext"
+	     param:key="'ListofProcedures'"
+             space-before.minimum="1em"
+             space-before.optimum="1.5em"
+             space-before.maximum="2em"
+	     space-after="0.5em"
+	     margin-left="{$title.margin.left}"
+	     font-size="&hsize3;"
+	     font-weight="bold"
+	     font-family="{$title.fontset}"/>
+    </t:titlepage-content>
+
+    <t:titlepage-content t:side="verso">
+    </t:titlepage-content>
+
+    <t:titlepage-separator>
+    </t:titlepage-separator>
+
+    <t:titlepage-before t:side="recto">
+    </t:titlepage-before>
+
+    <t:titlepage-before t:side="verso">
+    </t:titlepage-before>
+  </t:titlepage>
+
+  <t:titlepage t:element="list.of.unknowns" t:wrapper="fo:block">
+    <t:titlepage-content t:side="recto">
+      <title
+	     t:force="1"
+	     t:named-template="gentext"
+	     param:key="'ListofUnknown'"
+             space-before.minimum="1em"
+             space-before.optimum="1.5em"
+             space-before.maximum="2em"
+	     space-after="0.5em"
+	     margin-left="{$title.margin.left}"
+	     font-size="&hsize3;"
+	     font-weight="bold"
+	     font-family="{$title.fontset}"/>
+    </t:titlepage-content>
+
+    <t:titlepage-content t:side="verso">
+    </t:titlepage-content>
+
+    <t:titlepage-separator>
+    </t:titlepage-separator>
+
+    <t:titlepage-before t:side="recto">
+    </t:titlepage-before>
+
+    <t:titlepage-before t:side="verso">
+    </t:titlepage-before>
+  </t:titlepage>
+
+<!-- ==================================================================== -->
+
+</t:templates>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/titlepage.templates.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/titlepage.templates.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/titlepage.templates.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,3958 @@
+<?xml version="1.0" encoding="utf-8"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<!-- This stylesheet was created by template/titlepage.xsl; do not edit it by hand. -->
+
+<xsl:template name="article.titlepage.recto">
+  <xsl:choose>
+    <xsl:when test="articleinfo/title">
+      <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/title"/>
+    </xsl:when>
+    <xsl:when test="artheader/title">
+      <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/title"/>
+    </xsl:when>
+    <xsl:when test="info/title">
+      <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/title"/>
+    </xsl:when>
+    <xsl:when test="title">
+      <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="title"/>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:choose>
+    <xsl:when test="articleinfo/subtitle">
+      <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/subtitle"/>
+    </xsl:when>
+    <xsl:when test="artheader/subtitle">
+      <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/subtitle"/>
+    </xsl:when>
+    <xsl:when test="info/subtitle">
+      <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/subtitle"/>
+    </xsl:when>
+    <xsl:when test="subtitle">
+      <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="subtitle"/>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/corpauthor"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/corpauthor"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/corpauthor"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/authorgroup"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/authorgroup"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/authorgroup"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/author"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/author"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/author"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/othercredit"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/othercredit"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/othercredit"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/releaseinfo"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/releaseinfo"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/releaseinfo"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/copyright"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/copyright"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/copyright"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/legalnotice"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/legalnotice"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/legalnotice"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/pubdate"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/pubdate"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/pubdate"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/revision"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/revision"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/revision"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/revhistory"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/revhistory"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/revhistory"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/abstract"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/abstract"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/abstract"/>
+</xsl:template>
+
+<xsl:template name="article.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="article.titlepage.separator">
+</xsl:template>
+
+<xsl:template name="article.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="article.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="article.titlepage">
+  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" font-family="{$title.fontset}">
+    <fo:block text-align="center">
+    <xsl:call-template name="article.titlepage.before.recto"/>
+    <xsl:call-template name="article.titlepage.recto"/>
+    </fo:block>
+    <fo:block>
+    <xsl:call-template name="article.titlepage.before.verso"/>
+    <xsl:call-template name="article.titlepage.verso"/>
+    </fo:block>
+    <xsl:call-template name="article.titlepage.separator"/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="*" mode="article.titlepage.recto.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="article.titlepage.verso.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="title" mode="article.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" keep-with-next="always" font-size="24.8832pt" font-weight="bold">
+<xsl:call-template name="component.title">
+<xsl:with-param name="node" select="ancestor-or-self::article[1]"/>
+</xsl:call-template>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="article.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style">
+<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="corpauthor" mode="article.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em" font-size="14.4pt">
+<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="authorgroup" mode="article.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em" font-size="14.4pt">
+<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="author" mode="article.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em" font-size="14.4pt">
+<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="othercredit" mode="article.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em">
+<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="releaseinfo" mode="article.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em">
+<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="copyright" mode="article.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em">
+<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="legalnotice" mode="article.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" text-align="start" margin-left="0.5in" margin-right="0.5in" font-family="{$body.fontset}">
+<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="pubdate" mode="article.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em">
+<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="revision" mode="article.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em">
+<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="revhistory" mode="article.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em">
+<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="abstract" mode="article.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em" text-align="start" margin-left="0.5in" margin-right="0.5in" font-family="{$body.fontset}">
+<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template name="set.titlepage.recto">
+  <xsl:choose>
+    <xsl:when test="setinfo/title">
+      <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/title"/>
+    </xsl:when>
+    <xsl:when test="info/title">
+      <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/title"/>
+    </xsl:when>
+    <xsl:when test="title">
+      <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="title"/>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:choose>
+    <xsl:when test="setinfo/subtitle">
+      <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/subtitle"/>
+    </xsl:when>
+    <xsl:when test="info/subtitle">
+      <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/subtitle"/>
+    </xsl:when>
+    <xsl:when test="subtitle">
+      <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="subtitle"/>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/corpauthor"/>
+  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/corpauthor"/>
+  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/authorgroup"/>
+  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/authorgroup"/>
+  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/author"/>
+  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/author"/>
+  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/othercredit"/>
+  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/othercredit"/>
+  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/releaseinfo"/>
+  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/releaseinfo"/>
+  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/copyright"/>
+  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/copyright"/>
+  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/legalnotice"/>
+  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/legalnotice"/>
+  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/pubdate"/>
+  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/pubdate"/>
+  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/revision"/>
+  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/revision"/>
+  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/revhistory"/>
+  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/revhistory"/>
+  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/abstract"/>
+  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/abstract"/>
+</xsl:template>
+
+<xsl:template name="set.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="set.titlepage.separator">
+</xsl:template>
+
+<xsl:template name="set.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="set.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="set.titlepage">
+  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
+    <fo:block>
+    <xsl:call-template name="set.titlepage.before.recto"/>
+    <xsl:call-template name="set.titlepage.recto"/>
+    </fo:block>
+    <fo:block>
+    <xsl:call-template name="set.titlepage.before.verso"/>
+    <xsl:call-template name="set.titlepage.verso"/>
+    </fo:block>
+    <xsl:call-template name="set.titlepage.separator"/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="*" mode="set.titlepage.recto.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="set.titlepage.verso.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="title" mode="set.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style" text-align="center" font-size="24.8832pt" space-before="18.6624pt" font-weight="bold" font-family="{$title.fontset}">
+<xsl:call-template name="division.title">
+<xsl:with-param name="node" select="ancestor-or-self::set[1]"/>
+</xsl:call-template>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="set.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style" font-family="{$title.fontset}" text-align="center">
+<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="corpauthor" mode="set.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
+<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="authorgroup" mode="set.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
+<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="author" mode="set.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
+<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="othercredit" mode="set.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
+<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="releaseinfo" mode="set.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
+<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="copyright" mode="set.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
+<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="legalnotice" mode="set.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
+<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="pubdate" mode="set.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
+<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="revision" mode="set.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
+<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="revhistory" mode="set.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
+<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="abstract" mode="set.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
+<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template name="book.titlepage.recto">
+  <xsl:choose>
+    <xsl:when test="bookinfo/title">
+      <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/title"/>
+    </xsl:when>
+    <xsl:when test="info/title">
+      <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/title"/>
+    </xsl:when>
+    <xsl:when test="title">
+      <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="title"/>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:choose>
+    <xsl:when test="bookinfo/subtitle">
+      <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/subtitle"/>
+    </xsl:when>
+    <xsl:when test="info/subtitle">
+      <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/subtitle"/>
+    </xsl:when>
+    <xsl:when test="subtitle">
+      <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="subtitle"/>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/corpauthor"/>
+  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/corpauthor"/>
+  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/authorgroup"/>
+  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/authorgroup"/>
+  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/author"/>
+  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/author"/>
+</xsl:template>
+
+<xsl:template name="book.titlepage.verso">
+  <xsl:choose>
+    <xsl:when test="bookinfo/title">
+      <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/title"/>
+    </xsl:when>
+    <xsl:when test="info/title">
+      <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/title"/>
+    </xsl:when>
+    <xsl:when test="title">
+      <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="title"/>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/corpauthor"/>
+  <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/corpauthor"/>
+  <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/authorgroup"/>
+  <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/authorgroup"/>
+  <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/author"/>
+  <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/author"/>
+  <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/othercredit"/>
+  <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/othercredit"/>
+  <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/pubdate"/>
+  <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/pubdate"/>
+  <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/copyright"/>
+  <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/copyright"/>
+  <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/abstract"/>
+  <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/abstract"/>
+  <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/legalnotice"/>
+  <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/legalnotice"/>
+</xsl:template>
+
+<xsl:template name="book.titlepage.separator"><fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" break-after="page"/>
+</xsl:template>
+
+<xsl:template name="book.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="book.titlepage.before.verso"><fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" break-after="page"/>
+</xsl:template>
+
+<xsl:template name="book.titlepage">
+  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
+    <fo:block>
+    <xsl:call-template name="book.titlepage.before.recto"/>
+    <xsl:call-template name="book.titlepage.recto"/>
+    </fo:block>
+    <fo:block>
+    <xsl:call-template name="book.titlepage.before.verso"/>
+    <xsl:call-template name="book.titlepage.verso"/>
+    </fo:block>
+    <xsl:call-template name="book.titlepage.separator"/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="*" mode="book.titlepage.recto.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="book.titlepage.verso.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="title" mode="book.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.recto.style" text-align="center" font-size="24.8832pt" space-before="18.6624pt" font-weight="bold" font-family="{$title.fontset}">
+<xsl:call-template name="division.title">
+<xsl:with-param name="node" select="ancestor-or-self::book[1]"/>
+</xsl:call-template>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="book.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.recto.style" text-align="center" font-size="20.736pt" space-before="15.552pt" font-family="{$title.fontset}">
+<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="corpauthor" mode="book.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.recto.style" font-size="17.28pt" keep-with-next="always" space-before="2in">
+<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="authorgroup" mode="book.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.recto.style" space-before="2in">
+<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="author" mode="book.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.recto.style" font-size="17.28pt" space-before="10.8pt" keep-with-next="always">
+<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="title" mode="book.titlepage.verso.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style" font-size="14.4pt" font-weight="bold" font-family="{$title.fontset}">
+<xsl:call-template name="book.verso.title">
+</xsl:call-template>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="corpauthor" mode="book.titlepage.verso.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style">
+<xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="authorgroup" mode="book.titlepage.verso.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style">
+<xsl:call-template name="verso.authorgroup">
+</xsl:call-template>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="author" mode="book.titlepage.verso.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style">
+<xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="othercredit" mode="book.titlepage.verso.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style">
+<xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="pubdate" mode="book.titlepage.verso.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style" space-before="1em">
+<xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="copyright" mode="book.titlepage.verso.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style">
+<xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="abstract" mode="book.titlepage.verso.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style">
+<xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="legalnotice" mode="book.titlepage.verso.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style" font-size="8pt">
+<xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template name="part.titlepage.recto">
+  <xsl:choose>
+    <xsl:when test="partinfo/title">
+      <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/title"/>
+    </xsl:when>
+    <xsl:when test="docinfo/title">
+      <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/title"/>
+    </xsl:when>
+    <xsl:when test="info/title">
+      <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/title"/>
+    </xsl:when>
+    <xsl:when test="title">
+      <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="title"/>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:choose>
+    <xsl:when test="partinfo/subtitle">
+      <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/subtitle"/>
+    </xsl:when>
+    <xsl:when test="docinfo/subtitle">
+      <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
+    </xsl:when>
+    <xsl:when test="info/subtitle">
+      <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/subtitle"/>
+    </xsl:when>
+    <xsl:when test="subtitle">
+      <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="subtitle"/>
+    </xsl:when>
+  </xsl:choose>
+
+</xsl:template>
+
+<xsl:template name="part.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="part.titlepage.separator">
+</xsl:template>
+
+<xsl:template name="part.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="part.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="part.titlepage">
+  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
+    <fo:block>
+    <xsl:call-template name="part.titlepage.before.recto"/>
+    <xsl:call-template name="part.titlepage.recto"/>
+    </fo:block>
+    <fo:block>
+    <xsl:call-template name="part.titlepage.before.verso"/>
+    <xsl:call-template name="part.titlepage.verso"/>
+    </fo:block>
+    <xsl:call-template name="part.titlepage.separator"/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="*" mode="part.titlepage.recto.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="part.titlepage.verso.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="title" mode="part.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="part.titlepage.recto.style" text-align="center" font-size="24.8832pt" space-before="18.6624pt" font-weight="bold" font-family="{$title.fontset}">
+<xsl:call-template name="division.title">
+<xsl:with-param name="node" select="ancestor-or-self::part[1]"/>
+</xsl:call-template>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="part.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="part.titlepage.recto.style" text-align="center" font-size="20.736pt" space-before="15.552pt" font-weight="bold" font-style="italic" font-family="{$title.fontset}">
+<xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template name="partintro.titlepage.recto">
+  <xsl:choose>
+    <xsl:when test="partintroinfo/title">
+      <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/title"/>
+    </xsl:when>
+    <xsl:when test="docinfo/title">
+      <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/title"/>
+    </xsl:when>
+    <xsl:when test="info/title">
+      <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/title"/>
+    </xsl:when>
+    <xsl:when test="title">
+      <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="title"/>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:choose>
+    <xsl:when test="partintroinfo/subtitle">
+      <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/subtitle"/>
+    </xsl:when>
+    <xsl:when test="docinfo/subtitle">
+      <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
+    </xsl:when>
+    <xsl:when test="info/subtitle">
+      <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/subtitle"/>
+    </xsl:when>
+    <xsl:when test="subtitle">
+      <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="subtitle"/>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/corpauthor"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/corpauthor"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/authorgroup"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/authorgroup"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/author"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/author"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/author"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/othercredit"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/othercredit"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/releaseinfo"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/releaseinfo"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/copyright"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/copyright"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/copyright"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/legalnotice"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/legalnotice"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/pubdate"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/pubdate"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/revision"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/revision"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/revision"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/revhistory"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/revhistory"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/abstract"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/abstract"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/abstract"/>
+</xsl:template>
+
+<xsl:template name="partintro.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="partintro.titlepage.separator">
+</xsl:template>
+
+<xsl:template name="partintro.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="partintro.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="partintro.titlepage">
+  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
+    <fo:block>
+    <xsl:call-template name="partintro.titlepage.before.recto"/>
+    <xsl:call-template name="partintro.titlepage.recto"/>
+    </fo:block>
+    <fo:block>
+    <xsl:call-template name="partintro.titlepage.before.verso"/>
+    <xsl:call-template name="partintro.titlepage.verso"/>
+    </fo:block>
+    <xsl:call-template name="partintro.titlepage.separator"/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="*" mode="partintro.titlepage.recto.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="partintro.titlepage.verso.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="title" mode="partintro.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style" text-align="center" font-size="24.8832pt" font-weight="bold" space-before="1em" font-family="{$title.fontset}">
+<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="partintro.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style" text-align="center" font-size="14.4pt" font-weight="bold" font-style="italic" font-family="{$title.fontset}">
+<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="corpauthor" mode="partintro.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
+<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="authorgroup" mode="partintro.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
+<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="author" mode="partintro.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
+<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="othercredit" mode="partintro.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
+<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="releaseinfo" mode="partintro.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
+<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="copyright" mode="partintro.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
+<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="legalnotice" mode="partintro.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
+<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="pubdate" mode="partintro.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
+<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="revision" mode="partintro.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
+<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="revhistory" mode="partintro.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
+<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="abstract" mode="partintro.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
+<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template name="reference.titlepage.recto">
+  <xsl:choose>
+    <xsl:when test="referenceinfo/title">
+      <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/title"/>
+    </xsl:when>
+    <xsl:when test="docinfo/title">
+      <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/title"/>
+    </xsl:when>
+    <xsl:when test="info/title">
+      <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/title"/>
+    </xsl:when>
+    <xsl:when test="title">
+      <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="title"/>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:choose>
+    <xsl:when test="referenceinfo/subtitle">
+      <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/subtitle"/>
+    </xsl:when>
+    <xsl:when test="docinfo/subtitle">
+      <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
+    </xsl:when>
+    <xsl:when test="info/subtitle">
+      <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/subtitle"/>
+    </xsl:when>
+    <xsl:when test="subtitle">
+      <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="subtitle"/>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/corpauthor"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/corpauthor"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/authorgroup"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/authorgroup"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/author"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/author"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/author"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/othercredit"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/othercredit"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/releaseinfo"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/releaseinfo"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/copyright"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/copyright"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/copyright"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/legalnotice"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/legalnotice"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/pubdate"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/pubdate"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/revision"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/revision"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/revision"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/revhistory"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/revhistory"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/abstract"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/abstract"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/abstract"/>
+</xsl:template>
+
+<xsl:template name="reference.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="reference.titlepage.separator">
+</xsl:template>
+
+<xsl:template name="reference.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="reference.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="reference.titlepage">
+  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
+    <fo:block>
+    <xsl:call-template name="reference.titlepage.before.recto"/>
+    <xsl:call-template name="reference.titlepage.recto"/>
+    </fo:block>
+    <fo:block>
+    <xsl:call-template name="reference.titlepage.before.verso"/>
+    <xsl:call-template name="reference.titlepage.verso"/>
+    </fo:block>
+    <xsl:call-template name="reference.titlepage.separator"/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="*" mode="reference.titlepage.recto.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="reference.titlepage.verso.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="title" mode="reference.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style" text-align="center" font-size="24.8832pt" space-before="18.6624pt" font-weight="bold" font-family="{$title.fontset}">
+<xsl:call-template name="division.title">
+<xsl:with-param name="node" select="ancestor-or-self::reference[1]"/>
+</xsl:call-template>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="reference.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style" font-family="{$title.fontset}" text-align="center">
+<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="corpauthor" mode="reference.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
+<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="authorgroup" mode="reference.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
+<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="author" mode="reference.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
+<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="othercredit" mode="reference.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
+<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="releaseinfo" mode="reference.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
+<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="copyright" mode="reference.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
+<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="legalnotice" mode="reference.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
+<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="pubdate" mode="reference.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
+<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="revision" mode="reference.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
+<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="revhistory" mode="reference.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
+<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="abstract" mode="reference.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
+<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template name="refsynopsisdiv.titlepage.recto">
+  <xsl:choose>
+    <xsl:when test="refsynopsisdivinfo/title">
+      <xsl:apply-templates mode="refsynopsisdiv.titlepage.recto.auto.mode" select="refsynopsisdivinfo/title"/>
+    </xsl:when>
+    <xsl:when test="docinfo/title">
+      <xsl:apply-templates mode="refsynopsisdiv.titlepage.recto.auto.mode" select="docinfo/title"/>
+    </xsl:when>
+    <xsl:when test="info/title">
+      <xsl:apply-templates mode="refsynopsisdiv.titlepage.recto.auto.mode" select="info/title"/>
+    </xsl:when>
+    <xsl:when test="title">
+      <xsl:apply-templates mode="refsynopsisdiv.titlepage.recto.auto.mode" select="title"/>
+    </xsl:when>
+  </xsl:choose>
+
+</xsl:template>
+
+<xsl:template name="refsynopsisdiv.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="refsynopsisdiv.titlepage.separator">
+</xsl:template>
+
+<xsl:template name="refsynopsisdiv.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="refsynopsisdiv.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="refsynopsisdiv.titlepage">
+  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
+    <fo:block>
+    <xsl:call-template name="refsynopsisdiv.titlepage.before.recto"/>
+    <xsl:call-template name="refsynopsisdiv.titlepage.recto"/>
+    </fo:block>
+    <fo:block>
+    <xsl:call-template name="refsynopsisdiv.titlepage.before.verso"/>
+    <xsl:call-template name="refsynopsisdiv.titlepage.verso"/>
+    </fo:block>
+    <xsl:call-template name="refsynopsisdiv.titlepage.separator"/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="*" mode="refsynopsisdiv.titlepage.recto.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="refsynopsisdiv.titlepage.verso.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="title" mode="refsynopsisdiv.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="refsynopsisdiv.titlepage.recto.style" font-family="{$title.fontset}">
+<xsl:apply-templates select="." mode="refsynopsisdiv.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template name="refsection.titlepage.recto">
+  <xsl:choose>
+    <xsl:when test="refsectioninfo/title">
+      <xsl:apply-templates mode="refsection.titlepage.recto.auto.mode" select="refsectioninfo/title"/>
+    </xsl:when>
+    <xsl:when test="docinfo/title">
+      <xsl:apply-templates mode="refsection.titlepage.recto.auto.mode" select="docinfo/title"/>
+    </xsl:when>
+    <xsl:when test="info/title">
+      <xsl:apply-templates mode="refsection.titlepage.recto.auto.mode" select="info/title"/>
+    </xsl:when>
+    <xsl:when test="title">
+      <xsl:apply-templates mode="refsection.titlepage.recto.auto.mode" select="title"/>
+    </xsl:when>
+  </xsl:choose>
+
+</xsl:template>
+
+<xsl:template name="refsection.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="refsection.titlepage.separator">
+</xsl:template>
+
+<xsl:template name="refsection.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="refsection.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="refsection.titlepage">
+  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
+    <fo:block>
+    <xsl:call-template name="refsection.titlepage.before.recto"/>
+    <xsl:call-template name="refsection.titlepage.recto"/>
+    </fo:block>
+    <fo:block>
+    <xsl:call-template name="refsection.titlepage.before.verso"/>
+    <xsl:call-template name="refsection.titlepage.verso"/>
+    </fo:block>
+    <xsl:call-template name="refsection.titlepage.separator"/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="*" mode="refsection.titlepage.recto.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="refsection.titlepage.verso.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="title" mode="refsection.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="refsection.titlepage.recto.style" font-family="{$title.fontset}">
+<xsl:apply-templates select="." mode="refsection.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template name="refsect1.titlepage.recto">
+  <xsl:choose>
+    <xsl:when test="refsect1info/title">
+      <xsl:apply-templates mode="refsect1.titlepage.recto.auto.mode" select="refsect1info/title"/>
+    </xsl:when>
+    <xsl:when test="docinfo/title">
+      <xsl:apply-templates mode="refsect1.titlepage.recto.auto.mode" select="docinfo/title"/>
+    </xsl:when>
+    <xsl:when test="info/title">
+      <xsl:apply-templates mode="refsect1.titlepage.recto.auto.mode" select="info/title"/>
+    </xsl:when>
+    <xsl:when test="title">
+      <xsl:apply-templates mode="refsect1.titlepage.recto.auto.mode" select="title"/>
+    </xsl:when>
+  </xsl:choose>
+
+</xsl:template>
+
+<xsl:template name="refsect1.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="refsect1.titlepage.separator">
+</xsl:template>
+
+<xsl:template name="refsect1.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="refsect1.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="refsect1.titlepage">
+  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
+    <fo:block>
+    <xsl:call-template name="refsect1.titlepage.before.recto"/>
+    <xsl:call-template name="refsect1.titlepage.recto"/>
+    </fo:block>
+    <fo:block>
+    <xsl:call-template name="refsect1.titlepage.before.verso"/>
+    <xsl:call-template name="refsect1.titlepage.verso"/>
+    </fo:block>
+    <xsl:call-template name="refsect1.titlepage.separator"/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="*" mode="refsect1.titlepage.recto.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="refsect1.titlepage.verso.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="title" mode="refsect1.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="refsect1.titlepage.recto.style" font-family="{$title.fontset}">
+<xsl:apply-templates select="." mode="refsect1.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template name="refsect2.titlepage.recto">
+  <xsl:choose>
+    <xsl:when test="refsect2info/title">
+      <xsl:apply-templates mode="refsect2.titlepage.recto.auto.mode" select="refsect2info/title"/>
+    </xsl:when>
+    <xsl:when test="docinfo/title">
+      <xsl:apply-templates mode="refsect2.titlepage.recto.auto.mode" select="docinfo/title"/>
+    </xsl:when>
+    <xsl:when test="info/title">
+      <xsl:apply-templates mode="refsect2.titlepage.recto.auto.mode" select="info/title"/>
+    </xsl:when>
+    <xsl:when test="title">
+      <xsl:apply-templates mode="refsect2.titlepage.recto.auto.mode" select="title"/>
+    </xsl:when>
+  </xsl:choose>
+
+</xsl:template>
+
+<xsl:template name="refsect2.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="refsect2.titlepage.separator">
+</xsl:template>
+
+<xsl:template name="refsect2.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="refsect2.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="refsect2.titlepage">
+  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
+    <fo:block>
+    <xsl:call-template name="refsect2.titlepage.before.recto"/>
+    <xsl:call-template name="refsect2.titlepage.recto"/>
+    </fo:block>
+    <fo:block>
+    <xsl:call-template name="refsect2.titlepage.before.verso"/>
+    <xsl:call-template name="refsect2.titlepage.verso"/>
+    </fo:block>
+    <xsl:call-template name="refsect2.titlepage.separator"/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="*" mode="refsect2.titlepage.recto.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="refsect2.titlepage.verso.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="title" mode="refsect2.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="refsect2.titlepage.recto.style" font-family="{$title.fontset}">
+<xsl:apply-templates select="." mode="refsect2.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template name="refsect3.titlepage.recto">
+  <xsl:choose>
+    <xsl:when test="refsect3info/title">
+      <xsl:apply-templates mode="refsect3.titlepage.recto.auto.mode" select="refsect3info/title"/>
+    </xsl:when>
+    <xsl:when test="docinfo/title">
+      <xsl:apply-templates mode="refsect3.titlepage.recto.auto.mode" select="docinfo/title"/>
+    </xsl:when>
+    <xsl:when test="info/title">
+      <xsl:apply-templates mode="refsect3.titlepage.recto.auto.mode" select="info/title"/>
+    </xsl:when>
+    <xsl:when test="title">
+      <xsl:apply-templates mode="refsect3.titlepage.recto.auto.mode" select="title"/>
+    </xsl:when>
+  </xsl:choose>
+
+</xsl:template>
+
+<xsl:template name="refsect3.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="refsect3.titlepage.separator">
+</xsl:template>
+
+<xsl:template name="refsect3.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="refsect3.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="refsect3.titlepage">
+  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
+    <fo:block>
+    <xsl:call-template name="refsect3.titlepage.before.recto"/>
+    <xsl:call-template name="refsect3.titlepage.recto"/>
+    </fo:block>
+    <fo:block>
+    <xsl:call-template name="refsect3.titlepage.before.verso"/>
+    <xsl:call-template name="refsect3.titlepage.verso"/>
+    </fo:block>
+    <xsl:call-template name="refsect3.titlepage.separator"/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="*" mode="refsect3.titlepage.recto.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="refsect3.titlepage.verso.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="title" mode="refsect3.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="refsect3.titlepage.recto.style" font-family="{$title.fontset}">
+<xsl:apply-templates select="." mode="refsect3.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template name="dedication.titlepage.recto">
+  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="dedication.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-family="{$title.fontset}" font-weight="bold">
+<xsl:call-template name="component.title">
+<xsl:with-param name="node" select="ancestor-or-self::dedication[1]"/>
+</xsl:call-template></fo:block>
+  <xsl:choose>
+    <xsl:when test="dedicationinfo/subtitle">
+      <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="dedicationinfo/subtitle"/>
+    </xsl:when>
+    <xsl:when test="docinfo/subtitle">
+      <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
+    </xsl:when>
+    <xsl:when test="info/subtitle">
+      <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="info/subtitle"/>
+    </xsl:when>
+    <xsl:when test="subtitle">
+      <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="subtitle"/>
+    </xsl:when>
+  </xsl:choose>
+
+</xsl:template>
+
+<xsl:template name="dedication.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="dedication.titlepage.separator">
+</xsl:template>
+
+<xsl:template name="dedication.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="dedication.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="dedication.titlepage">
+  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
+    <fo:block>
+    <xsl:call-template name="dedication.titlepage.before.recto"/>
+    <xsl:call-template name="dedication.titlepage.recto"/>
+    </fo:block>
+    <fo:block>
+    <xsl:call-template name="dedication.titlepage.before.verso"/>
+    <xsl:call-template name="dedication.titlepage.verso"/>
+    </fo:block>
+    <xsl:call-template name="dedication.titlepage.separator"/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="*" mode="dedication.titlepage.recto.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="dedication.titlepage.verso.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="dedication.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="dedication.titlepage.recto.style" font-family="{$title.fontset}">
+<xsl:apply-templates select="." mode="dedication.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template name="preface.titlepage.recto">
+  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-family="{$title.fontset}" font-weight="bold">
+<xsl:call-template name="component.title">
+<xsl:with-param name="node" select="ancestor-or-self::preface[1]"/>
+</xsl:call-template></fo:block>
+  <xsl:choose>
+    <xsl:when test="prefaceinfo/subtitle">
+      <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/subtitle"/>
+    </xsl:when>
+    <xsl:when test="docinfo/subtitle">
+      <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
+    </xsl:when>
+    <xsl:when test="info/subtitle">
+      <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/subtitle"/>
+    </xsl:when>
+    <xsl:when test="subtitle">
+      <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="subtitle"/>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/corpauthor"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/corpauthor"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/authorgroup"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/authorgroup"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/author"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/author"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/author"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/othercredit"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/othercredit"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/releaseinfo"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/releaseinfo"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/copyright"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/copyright"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/copyright"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/legalnotice"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/legalnotice"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/pubdate"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/pubdate"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/revision"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/revision"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/revision"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/revhistory"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/revhistory"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/abstract"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/abstract"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/abstract"/>
+</xsl:template>
+
+<xsl:template name="preface.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="preface.titlepage.separator">
+</xsl:template>
+
+<xsl:template name="preface.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="preface.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="preface.titlepage">
+  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
+    <fo:block>
+    <xsl:call-template name="preface.titlepage.before.recto"/>
+    <xsl:call-template name="preface.titlepage.recto"/>
+    </fo:block>
+    <fo:block>
+    <xsl:call-template name="preface.titlepage.before.verso"/>
+    <xsl:call-template name="preface.titlepage.verso"/>
+    </fo:block>
+    <xsl:call-template name="preface.titlepage.separator"/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="*" mode="preface.titlepage.recto.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="preface.titlepage.verso.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="preface.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style" font-family="{$title.fontset}">
+<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="corpauthor" mode="preface.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
+<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="authorgroup" mode="preface.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
+<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="author" mode="preface.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
+<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="othercredit" mode="preface.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
+<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="releaseinfo" mode="preface.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
+<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="copyright" mode="preface.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
+<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="legalnotice" mode="preface.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
+<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="pubdate" mode="preface.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
+<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="revision" mode="preface.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
+<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="revhistory" mode="preface.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
+<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="abstract" mode="preface.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
+<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template name="chapter.titlepage.recto">
+  <xsl:choose>
+    <xsl:when test="chapterinfo/title">
+      <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/title"/>
+    </xsl:when>
+    <xsl:when test="docinfo/title">
+      <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/title"/>
+    </xsl:when>
+    <xsl:when test="info/title">
+      <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/title"/>
+    </xsl:when>
+    <xsl:when test="title">
+      <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="title"/>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:choose>
+    <xsl:when test="chapterinfo/subtitle">
+      <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/subtitle"/>
+    </xsl:when>
+    <xsl:when test="docinfo/subtitle">
+      <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
+    </xsl:when>
+    <xsl:when test="info/subtitle">
+      <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/subtitle"/>
+    </xsl:when>
+    <xsl:when test="subtitle">
+      <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="subtitle"/>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/corpauthor"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/corpauthor"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/authorgroup"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/authorgroup"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/author"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/author"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/author"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/othercredit"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/othercredit"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/releaseinfo"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/releaseinfo"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/copyright"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/copyright"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/copyright"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/legalnotice"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/legalnotice"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/pubdate"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/pubdate"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/revision"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/revision"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/revision"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/revhistory"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/revhistory"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/abstract"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/abstract"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/abstract"/>
+</xsl:template>
+
+<xsl:template name="chapter.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="chapter.titlepage.separator">
+</xsl:template>
+
+<xsl:template name="chapter.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="chapter.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="chapter.titlepage">
+  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" font-family="{$title.fontset}">
+    <fo:block margin-left="{$title.margin.left}">
+    <xsl:call-template name="chapter.titlepage.before.recto"/>
+    <xsl:call-template name="chapter.titlepage.recto"/>
+    </fo:block>
+    <fo:block>
+    <xsl:call-template name="chapter.titlepage.before.verso"/>
+    <xsl:call-template name="chapter.titlepage.verso"/>
+    </fo:block>
+    <xsl:call-template name="chapter.titlepage.separator"/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="*" mode="chapter.titlepage.recto.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="chapter.titlepage.verso.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="title" mode="chapter.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style" font-size="24.8832pt" font-weight="bold">
+<xsl:call-template name="component.title">
+<xsl:with-param name="node" select="ancestor-or-self::chapter[1]"/>
+</xsl:call-template>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="chapter.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style" space-before="0.5em" font-style="italic" font-size="14.4pt" font-weight="bold">
+<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="corpauthor" mode="chapter.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style" space-before="0.5em" space-after="0.5em" font-size="14.4pt">
+<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="authorgroup" mode="chapter.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style" space-before="0.5em" space-after="0.5em" font-size="14.4pt">
+<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="author" mode="chapter.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style" space-before="0.5em" space-after="0.5em" font-size="14.4pt">
+<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="othercredit" mode="chapter.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
+<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="releaseinfo" mode="chapter.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
+<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="copyright" mode="chapter.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
+<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="legalnotice" mode="chapter.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
+<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="pubdate" mode="chapter.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
+<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="revision" mode="chapter.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
+<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="revhistory" mode="chapter.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
+<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="abstract" mode="chapter.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
+<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template name="appendix.titlepage.recto">
+  <xsl:choose>
+    <xsl:when test="appendixinfo/title">
+      <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/title"/>
+    </xsl:when>
+    <xsl:when test="docinfo/title">
+      <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/title"/>
+    </xsl:when>
+    <xsl:when test="info/title">
+      <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/title"/>
+    </xsl:when>
+    <xsl:when test="title">
+      <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="title"/>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:choose>
+    <xsl:when test="appendixinfo/subtitle">
+      <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/subtitle"/>
+    </xsl:when>
+    <xsl:when test="docinfo/subtitle">
+      <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
+    </xsl:when>
+    <xsl:when test="info/subtitle">
+      <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/subtitle"/>
+    </xsl:when>
+    <xsl:when test="subtitle">
+      <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="subtitle"/>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/corpauthor"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/corpauthor"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/authorgroup"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/authorgroup"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/author"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/author"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/author"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/othercredit"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/othercredit"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/releaseinfo"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/releaseinfo"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/copyright"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/copyright"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/copyright"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/legalnotice"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/legalnotice"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/pubdate"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/pubdate"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/revision"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/revision"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/revision"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/revhistory"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/revhistory"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/abstract"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/abstract"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/abstract"/>
+</xsl:template>
+
+<xsl:template name="appendix.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="appendix.titlepage.separator">
+</xsl:template>
+
+<xsl:template name="appendix.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="appendix.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="appendix.titlepage">
+  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
+    <fo:block>
+    <xsl:call-template name="appendix.titlepage.before.recto"/>
+    <xsl:call-template name="appendix.titlepage.recto"/>
+    </fo:block>
+    <fo:block>
+    <xsl:call-template name="appendix.titlepage.before.verso"/>
+    <xsl:call-template name="appendix.titlepage.verso"/>
+    </fo:block>
+    <xsl:call-template name="appendix.titlepage.separator"/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="*" mode="appendix.titlepage.recto.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="appendix.titlepage.verso.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="title" mode="appendix.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-weight="bold" font-family="{$title.fontset}">
+<xsl:call-template name="component.title">
+<xsl:with-param name="node" select="ancestor-or-self::appendix[1]"/>
+</xsl:call-template>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="appendix.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style" font-family="{$title.fontset}">
+<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="corpauthor" mode="appendix.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
+<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="authorgroup" mode="appendix.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
+<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="author" mode="appendix.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
+<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="othercredit" mode="appendix.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
+<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="releaseinfo" mode="appendix.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
+<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="copyright" mode="appendix.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
+<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="legalnotice" mode="appendix.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
+<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="pubdate" mode="appendix.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
+<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="revision" mode="appendix.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
+<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="revhistory" mode="appendix.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
+<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="abstract" mode="appendix.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
+<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template name="section.titlepage.recto">
+  <xsl:choose>
+    <xsl:when test="sectioninfo/title">
+      <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/title"/>
+    </xsl:when>
+    <xsl:when test="info/title">
+      <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/title"/>
+    </xsl:when>
+    <xsl:when test="title">
+      <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="title"/>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:choose>
+    <xsl:when test="sectioninfo/subtitle">
+      <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/subtitle"/>
+    </xsl:when>
+    <xsl:when test="info/subtitle">
+      <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/subtitle"/>
+    </xsl:when>
+    <xsl:when test="subtitle">
+      <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="subtitle"/>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/corpauthor"/>
+  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/corpauthor"/>
+  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/authorgroup"/>
+  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/authorgroup"/>
+  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/author"/>
+  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/author"/>
+  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/othercredit"/>
+  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/othercredit"/>
+  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/releaseinfo"/>
+  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/releaseinfo"/>
+  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/copyright"/>
+  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/copyright"/>
+  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/legalnotice"/>
+  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/legalnotice"/>
+  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/pubdate"/>
+  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/pubdate"/>
+  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/revision"/>
+  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/revision"/>
+  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/revhistory"/>
+  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/revhistory"/>
+  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/abstract"/>
+  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/abstract"/>
+</xsl:template>
+
+<xsl:template name="section.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="section.titlepage.separator">
+</xsl:template>
+
+<xsl:template name="section.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="section.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="section.titlepage">
+  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
+    <fo:block>
+    <xsl:call-template name="section.titlepage.before.recto"/>
+    <xsl:call-template name="section.titlepage.recto"/>
+    </fo:block>
+    <fo:block>
+    <xsl:call-template name="section.titlepage.before.verso"/>
+    <xsl:call-template name="section.titlepage.verso"/>
+    </fo:block>
+    <xsl:call-template name="section.titlepage.separator"/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="*" mode="section.titlepage.recto.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="section.titlepage.verso.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="title" mode="section.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style" margin-left="{$title.margin.left}" font-family="{$title.fontset}">
+<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="section.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style" font-family="{$title.fontset}">
+<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="corpauthor" mode="section.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
+<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="authorgroup" mode="section.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
+<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="author" mode="section.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
+<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="othercredit" mode="section.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
+<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="releaseinfo" mode="section.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
+<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="copyright" mode="section.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
+<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="legalnotice" mode="section.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
+<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="pubdate" mode="section.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
+<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="revision" mode="section.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
+<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="revhistory" mode="section.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
+<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="abstract" mode="section.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
+<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template name="sect1.titlepage.recto">
+  <xsl:choose>
+    <xsl:when test="sect1info/title">
+      <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/title"/>
+    </xsl:when>
+    <xsl:when test="info/title">
+      <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/title"/>
+    </xsl:when>
+    <xsl:when test="title">
+      <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="title"/>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:choose>
+    <xsl:when test="sect1info/subtitle">
+      <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/subtitle"/>
+    </xsl:when>
+    <xsl:when test="info/subtitle">
+      <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/subtitle"/>
+    </xsl:when>
+    <xsl:when test="subtitle">
+      <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="subtitle"/>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/corpauthor"/>
+  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/corpauthor"/>
+  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/authorgroup"/>
+  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/authorgroup"/>
+  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/author"/>
+  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/author"/>
+  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/othercredit"/>
+  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/othercredit"/>
+  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/releaseinfo"/>
+  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/releaseinfo"/>
+  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/copyright"/>
+  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/copyright"/>
+  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/legalnotice"/>
+  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/legalnotice"/>
+  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/pubdate"/>
+  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/pubdate"/>
+  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/revision"/>
+  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/revision"/>
+  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/revhistory"/>
+  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/revhistory"/>
+  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/abstract"/>
+  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/abstract"/>
+</xsl:template>
+
+<xsl:template name="sect1.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="sect1.titlepage.separator">
+</xsl:template>
+
+<xsl:template name="sect1.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="sect1.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="sect1.titlepage">
+  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
+    <fo:block>
+    <xsl:call-template name="sect1.titlepage.before.recto"/>
+    <xsl:call-template name="sect1.titlepage.recto"/>
+    </fo:block>
+    <fo:block>
+    <xsl:call-template name="sect1.titlepage.before.verso"/>
+    <xsl:call-template name="sect1.titlepage.verso"/>
+    </fo:block>
+    <xsl:call-template name="sect1.titlepage.separator"/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="*" mode="sect1.titlepage.recto.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="sect1.titlepage.verso.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="title" mode="sect1.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style" margin-left="{$title.margin.left}" font-family="{$title.fontset}">
+<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="sect1.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style" font-family="{$title.fontset}">
+<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="corpauthor" mode="sect1.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="authorgroup" mode="sect1.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="author" mode="sect1.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="othercredit" mode="sect1.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="releaseinfo" mode="sect1.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="copyright" mode="sect1.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="legalnotice" mode="sect1.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="pubdate" mode="sect1.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="revision" mode="sect1.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="revhistory" mode="sect1.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="abstract" mode="sect1.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template name="sect2.titlepage.recto">
+  <xsl:choose>
+    <xsl:when test="sect2info/title">
+      <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/title"/>
+    </xsl:when>
+    <xsl:when test="info/title">
+      <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/title"/>
+    </xsl:when>
+    <xsl:when test="title">
+      <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="title"/>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:choose>
+    <xsl:when test="sect2info/subtitle">
+      <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/subtitle"/>
+    </xsl:when>
+    <xsl:when test="info/subtitle">
+      <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/subtitle"/>
+    </xsl:when>
+    <xsl:when test="subtitle">
+      <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="subtitle"/>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/corpauthor"/>
+  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/corpauthor"/>
+  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/authorgroup"/>
+  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/authorgroup"/>
+  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/author"/>
+  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/author"/>
+  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/othercredit"/>
+  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/othercredit"/>
+  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/releaseinfo"/>
+  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/releaseinfo"/>
+  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/copyright"/>
+  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/copyright"/>
+  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/legalnotice"/>
+  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/legalnotice"/>
+  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/pubdate"/>
+  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/pubdate"/>
+  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/revision"/>
+  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/revision"/>
+  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/revhistory"/>
+  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/revhistory"/>
+  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/abstract"/>
+  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/abstract"/>
+</xsl:template>
+
+<xsl:template name="sect2.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="sect2.titlepage.separator">
+</xsl:template>
+
+<xsl:template name="sect2.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="sect2.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="sect2.titlepage">
+  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
+    <fo:block>
+    <xsl:call-template name="sect2.titlepage.before.recto"/>
+    <xsl:call-template name="sect2.titlepage.recto"/>
+    </fo:block>
+    <fo:block>
+    <xsl:call-template name="sect2.titlepage.before.verso"/>
+    <xsl:call-template name="sect2.titlepage.verso"/>
+    </fo:block>
+    <xsl:call-template name="sect2.titlepage.separator"/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="*" mode="sect2.titlepage.recto.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="sect2.titlepage.verso.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="title" mode="sect2.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style" margin-left="{$title.margin.left}" font-family="{$title.fontset}">
+<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="sect2.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style" font-family="{$title.fontset}">
+<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="corpauthor" mode="sect2.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="authorgroup" mode="sect2.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="author" mode="sect2.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="othercredit" mode="sect2.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="releaseinfo" mode="sect2.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="copyright" mode="sect2.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="legalnotice" mode="sect2.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="pubdate" mode="sect2.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="revision" mode="sect2.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="revhistory" mode="sect2.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="abstract" mode="sect2.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template name="sect3.titlepage.recto">
+  <xsl:choose>
+    <xsl:when test="sect3info/title">
+      <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/title"/>
+    </xsl:when>
+    <xsl:when test="info/title">
+      <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/title"/>
+    </xsl:when>
+    <xsl:when test="title">
+      <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="title"/>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:choose>
+    <xsl:when test="sect3info/subtitle">
+      <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/subtitle"/>
+    </xsl:when>
+    <xsl:when test="info/subtitle">
+      <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/subtitle"/>
+    </xsl:when>
+    <xsl:when test="subtitle">
+      <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="subtitle"/>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/corpauthor"/>
+  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/corpauthor"/>
+  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/authorgroup"/>
+  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/authorgroup"/>
+  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/author"/>
+  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/author"/>
+  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/othercredit"/>
+  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/othercredit"/>
+  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/releaseinfo"/>
+  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/releaseinfo"/>
+  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/copyright"/>
+  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/copyright"/>
+  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/legalnotice"/>
+  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/legalnotice"/>
+  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/pubdate"/>
+  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/pubdate"/>
+  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/revision"/>
+  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/revision"/>
+  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/revhistory"/>
+  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/revhistory"/>
+  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/abstract"/>
+  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/abstract"/>
+</xsl:template>
+
+<xsl:template name="sect3.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="sect3.titlepage.separator">
+</xsl:template>
+
+<xsl:template name="sect3.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="sect3.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="sect3.titlepage">
+  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
+    <fo:block>
+    <xsl:call-template name="sect3.titlepage.before.recto"/>
+    <xsl:call-template name="sect3.titlepage.recto"/>
+    </fo:block>
+    <fo:block>
+    <xsl:call-template name="sect3.titlepage.before.verso"/>
+    <xsl:call-template name="sect3.titlepage.verso"/>
+    </fo:block>
+    <xsl:call-template name="sect3.titlepage.separator"/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="*" mode="sect3.titlepage.recto.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="sect3.titlepage.verso.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="title" mode="sect3.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style" margin-left="{$title.margin.left}" font-family="{$title.fontset}">
+<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="sect3.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style" font-family="{$title.fontset}">
+<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="corpauthor" mode="sect3.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="authorgroup" mode="sect3.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="author" mode="sect3.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="othercredit" mode="sect3.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="releaseinfo" mode="sect3.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="copyright" mode="sect3.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="legalnotice" mode="sect3.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="pubdate" mode="sect3.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="revision" mode="sect3.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="revhistory" mode="sect3.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="abstract" mode="sect3.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template name="sect4.titlepage.recto">
+  <xsl:choose>
+    <xsl:when test="sect4info/title">
+      <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/title"/>
+    </xsl:when>
+    <xsl:when test="info/title">
+      <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/title"/>
+    </xsl:when>
+    <xsl:when test="title">
+      <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="title"/>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:choose>
+    <xsl:when test="sect4info/subtitle">
+      <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/subtitle"/>
+    </xsl:when>
+    <xsl:when test="info/subtitle">
+      <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/subtitle"/>
+    </xsl:when>
+    <xsl:when test="subtitle">
+      <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="subtitle"/>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/corpauthor"/>
+  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/corpauthor"/>
+  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/authorgroup"/>
+  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/authorgroup"/>
+  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/author"/>
+  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/author"/>
+  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/othercredit"/>
+  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/othercredit"/>
+  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/releaseinfo"/>
+  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/releaseinfo"/>
+  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/copyright"/>
+  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/copyright"/>
+  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/legalnotice"/>
+  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/legalnotice"/>
+  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/pubdate"/>
+  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/pubdate"/>
+  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/revision"/>
+  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/revision"/>
+  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/revhistory"/>
+  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/revhistory"/>
+  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/abstract"/>
+  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/abstract"/>
+</xsl:template>
+
+<xsl:template name="sect4.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="sect4.titlepage.separator">
+</xsl:template>
+
+<xsl:template name="sect4.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="sect4.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="sect4.titlepage">
+  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
+    <fo:block>
+    <xsl:call-template name="sect4.titlepage.before.recto"/>
+    <xsl:call-template name="sect4.titlepage.recto"/>
+    </fo:block>
+    <fo:block>
+    <xsl:call-template name="sect4.titlepage.before.verso"/>
+    <xsl:call-template name="sect4.titlepage.verso"/>
+    </fo:block>
+    <xsl:call-template name="sect4.titlepage.separator"/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="*" mode="sect4.titlepage.recto.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="sect4.titlepage.verso.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="title" mode="sect4.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style" margin-left="{$title.margin.left}" font-family="{$title.fontset}">
+<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="sect4.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style" font-family="{$title.fontset}">
+<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="corpauthor" mode="sect4.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="authorgroup" mode="sect4.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="author" mode="sect4.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="othercredit" mode="sect4.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="releaseinfo" mode="sect4.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="copyright" mode="sect4.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="legalnotice" mode="sect4.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="pubdate" mode="sect4.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="revision" mode="sect4.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="revhistory" mode="sect4.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="abstract" mode="sect4.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template name="sect5.titlepage.recto">
+  <xsl:choose>
+    <xsl:when test="sect5info/title">
+      <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/title"/>
+    </xsl:when>
+    <xsl:when test="info/title">
+      <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/title"/>
+    </xsl:when>
+    <xsl:when test="title">
+      <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="title"/>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:choose>
+    <xsl:when test="sect5info/subtitle">
+      <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/subtitle"/>
+    </xsl:when>
+    <xsl:when test="info/subtitle">
+      <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/subtitle"/>
+    </xsl:when>
+    <xsl:when test="subtitle">
+      <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="subtitle"/>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/corpauthor"/>
+  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/corpauthor"/>
+  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/authorgroup"/>
+  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/authorgroup"/>
+  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/author"/>
+  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/author"/>
+  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/othercredit"/>
+  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/othercredit"/>
+  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/releaseinfo"/>
+  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/releaseinfo"/>
+  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/copyright"/>
+  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/copyright"/>
+  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/legalnotice"/>
+  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/legalnotice"/>
+  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/pubdate"/>
+  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/pubdate"/>
+  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/revision"/>
+  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/revision"/>
+  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/revhistory"/>
+  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/revhistory"/>
+  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/abstract"/>
+  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/abstract"/>
+</xsl:template>
+
+<xsl:template name="sect5.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="sect5.titlepage.separator">
+</xsl:template>
+
+<xsl:template name="sect5.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="sect5.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="sect5.titlepage">
+  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
+    <fo:block>
+    <xsl:call-template name="sect5.titlepage.before.recto"/>
+    <xsl:call-template name="sect5.titlepage.recto"/>
+    </fo:block>
+    <fo:block>
+    <xsl:call-template name="sect5.titlepage.before.verso"/>
+    <xsl:call-template name="sect5.titlepage.verso"/>
+    </fo:block>
+    <xsl:call-template name="sect5.titlepage.separator"/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="*" mode="sect5.titlepage.recto.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="sect5.titlepage.verso.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="title" mode="sect5.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style" margin-left="{$title.margin.left}" font-family="{$title.fontset}">
+<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="sect5.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style" font-family="{$title.fontset}">
+<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="corpauthor" mode="sect5.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="authorgroup" mode="sect5.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="author" mode="sect5.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="othercredit" mode="sect5.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="releaseinfo" mode="sect5.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="copyright" mode="sect5.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="legalnotice" mode="sect5.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="pubdate" mode="sect5.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="revision" mode="sect5.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="revhistory" mode="sect5.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="abstract" mode="sect5.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template name="simplesect.titlepage.recto">
+  <xsl:choose>
+    <xsl:when test="simplesectinfo/title">
+      <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/title"/>
+    </xsl:when>
+    <xsl:when test="docinfo/title">
+      <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/title"/>
+    </xsl:when>
+    <xsl:when test="info/title">
+      <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/title"/>
+    </xsl:when>
+    <xsl:when test="title">
+      <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="title"/>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:choose>
+    <xsl:when test="simplesectinfo/subtitle">
+      <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/subtitle"/>
+    </xsl:when>
+    <xsl:when test="docinfo/subtitle">
+      <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
+    </xsl:when>
+    <xsl:when test="info/subtitle">
+      <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/subtitle"/>
+    </xsl:when>
+    <xsl:when test="subtitle">
+      <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="subtitle"/>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/corpauthor"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/corpauthor"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/authorgroup"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/authorgroup"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/author"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/author"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/author"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/othercredit"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/othercredit"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/releaseinfo"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/releaseinfo"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/copyright"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/copyright"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/copyright"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/legalnotice"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/legalnotice"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/pubdate"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/pubdate"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/revision"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/revision"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/revision"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/revhistory"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/revhistory"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/abstract"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/abstract"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/abstract"/>
+</xsl:template>
+
+<xsl:template name="simplesect.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="simplesect.titlepage.separator">
+</xsl:template>
+
+<xsl:template name="simplesect.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="simplesect.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="simplesect.titlepage">
+  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
+    <fo:block>
+    <xsl:call-template name="simplesect.titlepage.before.recto"/>
+    <xsl:call-template name="simplesect.titlepage.recto"/>
+    </fo:block>
+    <fo:block>
+    <xsl:call-template name="simplesect.titlepage.before.verso"/>
+    <xsl:call-template name="simplesect.titlepage.verso"/>
+    </fo:block>
+    <xsl:call-template name="simplesect.titlepage.separator"/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="*" mode="simplesect.titlepage.recto.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="simplesect.titlepage.verso.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="title" mode="simplesect.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style" margin-left="{$title.margin.left}" font-family="{$title.fontset}">
+<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="simplesect.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style" font-family="{$title.fontset}">
+<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="corpauthor" mode="simplesect.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
+<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="authorgroup" mode="simplesect.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
+<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="author" mode="simplesect.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
+<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="othercredit" mode="simplesect.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
+<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="releaseinfo" mode="simplesect.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
+<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="copyright" mode="simplesect.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
+<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="legalnotice" mode="simplesect.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
+<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="pubdate" mode="simplesect.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
+<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="revision" mode="simplesect.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
+<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="revhistory" mode="simplesect.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
+<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="abstract" mode="simplesect.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
+<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template name="bibliography.titlepage.recto">
+  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="bibliography.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-family="{$title.fontset}" font-weight="bold">
+<xsl:call-template name="component.title">
+<xsl:with-param name="node" select="ancestor-or-self::bibliography[1]"/>
+</xsl:call-template></fo:block>
+  <xsl:choose>
+    <xsl:when test="bibliographyinfo/subtitle">
+      <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="bibliographyinfo/subtitle"/>
+    </xsl:when>
+    <xsl:when test="docinfo/subtitle">
+      <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
+    </xsl:when>
+    <xsl:when test="info/subtitle">
+      <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="info/subtitle"/>
+    </xsl:when>
+    <xsl:when test="subtitle">
+      <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="subtitle"/>
+    </xsl:when>
+  </xsl:choose>
+
+</xsl:template>
+
+<xsl:template name="bibliography.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="bibliography.titlepage.separator">
+</xsl:template>
+
+<xsl:template name="bibliography.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="bibliography.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="bibliography.titlepage">
+  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
+    <fo:block>
+    <xsl:call-template name="bibliography.titlepage.before.recto"/>
+    <xsl:call-template name="bibliography.titlepage.recto"/>
+    </fo:block>
+    <fo:block>
+    <xsl:call-template name="bibliography.titlepage.before.verso"/>
+    <xsl:call-template name="bibliography.titlepage.verso"/>
+    </fo:block>
+    <xsl:call-template name="bibliography.titlepage.separator"/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="*" mode="bibliography.titlepage.recto.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="bibliography.titlepage.verso.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="bibliography.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="bibliography.titlepage.recto.style" font-family="{$title.fontset}">
+<xsl:apply-templates select="." mode="bibliography.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template name="bibliodiv.titlepage.recto">
+  <xsl:choose>
+    <xsl:when test="bibliodivinfo/title">
+      <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="bibliodivinfo/title"/>
+    </xsl:when>
+    <xsl:when test="docinfo/title">
+      <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="docinfo/title"/>
+    </xsl:when>
+    <xsl:when test="info/title">
+      <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="info/title"/>
+    </xsl:when>
+    <xsl:when test="title">
+      <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="title"/>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:choose>
+    <xsl:when test="bibliodivinfo/subtitle">
+      <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="bibliodivinfo/subtitle"/>
+    </xsl:when>
+    <xsl:when test="docinfo/subtitle">
+      <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
+    </xsl:when>
+    <xsl:when test="info/subtitle">
+      <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="info/subtitle"/>
+    </xsl:when>
+    <xsl:when test="subtitle">
+      <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="subtitle"/>
+    </xsl:when>
+  </xsl:choose>
+
+</xsl:template>
+
+<xsl:template name="bibliodiv.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="bibliodiv.titlepage.separator">
+</xsl:template>
+
+<xsl:template name="bibliodiv.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="bibliodiv.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="bibliodiv.titlepage">
+  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
+    <fo:block>
+    <xsl:call-template name="bibliodiv.titlepage.before.recto"/>
+    <xsl:call-template name="bibliodiv.titlepage.recto"/>
+    </fo:block>
+    <fo:block>
+    <xsl:call-template name="bibliodiv.titlepage.before.verso"/>
+    <xsl:call-template name="bibliodiv.titlepage.verso"/>
+    </fo:block>
+    <xsl:call-template name="bibliodiv.titlepage.separator"/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="*" mode="bibliodiv.titlepage.recto.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="bibliodiv.titlepage.verso.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="title" mode="bibliodiv.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="bibliodiv.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="20.736pt" font-family="{$title.fontset}" font-weight="bold">
+<xsl:call-template name="component.title">
+<xsl:with-param name="node" select="ancestor-or-self::bibliodiv[1]"/>
+</xsl:call-template>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="bibliodiv.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="bibliodiv.titlepage.recto.style" font-family="{$title.fontset}">
+<xsl:apply-templates select="." mode="bibliodiv.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template name="glossary.titlepage.recto">
+  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="glossary.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-family="{$title.fontset}" font-weight="bold">
+<xsl:call-template name="component.title">
+<xsl:with-param name="node" select="ancestor-or-self::glossary[1]"/>
+</xsl:call-template></fo:block>
+  <xsl:choose>
+    <xsl:when test="glossaryinfo/subtitle">
+      <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="glossaryinfo/subtitle"/>
+    </xsl:when>
+    <xsl:when test="docinfo/subtitle">
+      <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
+    </xsl:when>
+    <xsl:when test="info/subtitle">
+      <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="info/subtitle"/>
+    </xsl:when>
+    <xsl:when test="subtitle">
+      <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="subtitle"/>
+    </xsl:when>
+  </xsl:choose>
+
+</xsl:template>
+
+<xsl:template name="glossary.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="glossary.titlepage.separator">
+</xsl:template>
+
+<xsl:template name="glossary.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="glossary.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="glossary.titlepage">
+  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
+    <fo:block>
+    <xsl:call-template name="glossary.titlepage.before.recto"/>
+    <xsl:call-template name="glossary.titlepage.recto"/>
+    </fo:block>
+    <fo:block>
+    <xsl:call-template name="glossary.titlepage.before.verso"/>
+    <xsl:call-template name="glossary.titlepage.verso"/>
+    </fo:block>
+    <xsl:call-template name="glossary.titlepage.separator"/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="*" mode="glossary.titlepage.recto.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="glossary.titlepage.verso.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="glossary.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="glossary.titlepage.recto.style" font-family="{$title.fontset}">
+<xsl:apply-templates select="." mode="glossary.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template name="glossdiv.titlepage.recto">
+  <xsl:choose>
+    <xsl:when test="glossdivinfo/title">
+      <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="glossdivinfo/title"/>
+    </xsl:when>
+    <xsl:when test="docinfo/title">
+      <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="docinfo/title"/>
+    </xsl:when>
+    <xsl:when test="info/title">
+      <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="info/title"/>
+    </xsl:when>
+    <xsl:when test="title">
+      <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="title"/>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:choose>
+    <xsl:when test="glossdivinfo/subtitle">
+      <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="glossdivinfo/subtitle"/>
+    </xsl:when>
+    <xsl:when test="docinfo/subtitle">
+      <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
+    </xsl:when>
+    <xsl:when test="info/subtitle">
+      <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="info/subtitle"/>
+    </xsl:when>
+    <xsl:when test="subtitle">
+      <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="subtitle"/>
+    </xsl:when>
+  </xsl:choose>
+
+</xsl:template>
+
+<xsl:template name="glossdiv.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="glossdiv.titlepage.separator">
+</xsl:template>
+
+<xsl:template name="glossdiv.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="glossdiv.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="glossdiv.titlepage">
+  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
+    <fo:block>
+    <xsl:call-template name="glossdiv.titlepage.before.recto"/>
+    <xsl:call-template name="glossdiv.titlepage.recto"/>
+    </fo:block>
+    <fo:block>
+    <xsl:call-template name="glossdiv.titlepage.before.verso"/>
+    <xsl:call-template name="glossdiv.titlepage.verso"/>
+    </fo:block>
+    <xsl:call-template name="glossdiv.titlepage.separator"/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="*" mode="glossdiv.titlepage.recto.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="glossdiv.titlepage.verso.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="title" mode="glossdiv.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="glossdiv.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="20.736pt" font-family="{$title.fontset}" font-weight="bold">
+<xsl:call-template name="component.title">
+<xsl:with-param name="node" select="ancestor-or-self::glossdiv[1]"/>
+</xsl:call-template>
+</fo:block>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="glossdiv.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="glossdiv.titlepage.recto.style" font-family="{$title.fontset}">
+<xsl:apply-templates select="." mode="glossdiv.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template name="index.titlepage.recto">
+  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="index.titlepage.recto.style" margin-left="0pt" font-size="24.8832pt" font-family="{$title.fontset}" font-weight="bold">
+<xsl:call-template name="component.title">
+<xsl:with-param name="node" select="ancestor-or-self::index[1]"/>
+<xsl:with-param name="pagewide" select="1"/>
+</xsl:call-template></fo:block>
+  <xsl:choose>
+    <xsl:when test="indexinfo/subtitle">
+      <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="indexinfo/subtitle"/>
+    </xsl:when>
+    <xsl:when test="docinfo/subtitle">
+      <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
+    </xsl:when>
+    <xsl:when test="info/subtitle">
+      <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="info/subtitle"/>
+    </xsl:when>
+    <xsl:when test="subtitle">
+      <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="subtitle"/>
+    </xsl:when>
+  </xsl:choose>
+
+</xsl:template>
+
+<xsl:template name="index.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="index.titlepage.separator">
+</xsl:template>
+
+<xsl:template name="index.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="index.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="index.titlepage">
+  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
+    <fo:block>
+    <xsl:call-template name="index.titlepage.before.recto"/>
+    <xsl:call-template name="index.titlepage.recto"/>
+    </fo:block>
+    <fo:block>
+    <xsl:call-template name="index.titlepage.before.verso"/>
+    <xsl:call-template name="index.titlepage.verso"/>
+    </fo:block>
+    <xsl:call-template name="index.titlepage.separator"/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="*" mode="index.titlepage.recto.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="index.titlepage.verso.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="index.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="index.titlepage.recto.style" font-family="{$title.fontset}">
+<xsl:apply-templates select="." mode="index.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template name="indexdiv.titlepage.recto">
+  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="indexdiv.titlepage.recto.style">
+<xsl:call-template name="indexdiv.title">
+<xsl:with-param name="title" select="title"/>
+</xsl:call-template></fo:block>
+  <xsl:choose>
+    <xsl:when test="indexdivinfo/subtitle">
+      <xsl:apply-templates mode="indexdiv.titlepage.recto.auto.mode" select="indexdivinfo/subtitle"/>
+    </xsl:when>
+    <xsl:when test="docinfo/subtitle">
+      <xsl:apply-templates mode="indexdiv.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
+    </xsl:when>
+    <xsl:when test="info/subtitle">
+      <xsl:apply-templates mode="indexdiv.titlepage.recto.auto.mode" select="info/subtitle"/>
+    </xsl:when>
+    <xsl:when test="subtitle">
+      <xsl:apply-templates mode="indexdiv.titlepage.recto.auto.mode" select="subtitle"/>
+    </xsl:when>
+  </xsl:choose>
+
+</xsl:template>
+
+<xsl:template name="indexdiv.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="indexdiv.titlepage.separator">
+</xsl:template>
+
+<xsl:template name="indexdiv.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="indexdiv.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="indexdiv.titlepage">
+  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
+    <fo:block>
+    <xsl:call-template name="indexdiv.titlepage.before.recto"/>
+    <xsl:call-template name="indexdiv.titlepage.recto"/>
+    </fo:block>
+    <fo:block>
+    <xsl:call-template name="indexdiv.titlepage.before.verso"/>
+    <xsl:call-template name="indexdiv.titlepage.verso"/>
+    </fo:block>
+    <xsl:call-template name="indexdiv.titlepage.separator"/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="*" mode="indexdiv.titlepage.recto.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="indexdiv.titlepage.verso.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="indexdiv.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="indexdiv.titlepage.recto.style" font-family="{$title.fontset}">
+<xsl:apply-templates select="." mode="indexdiv.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template name="setindex.titlepage.recto">
+  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="setindex.titlepage.recto.style" margin-left="0pt" font-size="24.8832pt" font-family="{$title.fontset}" font-weight="bold">
+<xsl:call-template name="component.title">
+<xsl:with-param name="node" select="ancestor-or-self::setindex[1]"/>
+<xsl:with-param name="pagewide" select="1"/>
+</xsl:call-template></fo:block>
+  <xsl:choose>
+    <xsl:when test="setindexinfo/subtitle">
+      <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="setindexinfo/subtitle"/>
+    </xsl:when>
+    <xsl:when test="docinfo/subtitle">
+      <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
+    </xsl:when>
+    <xsl:when test="info/subtitle">
+      <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="info/subtitle"/>
+    </xsl:when>
+    <xsl:when test="subtitle">
+      <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="subtitle"/>
+    </xsl:when>
+  </xsl:choose>
+
+</xsl:template>
+
+<xsl:template name="setindex.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="setindex.titlepage.separator">
+</xsl:template>
+
+<xsl:template name="setindex.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="setindex.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="setindex.titlepage">
+  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
+    <fo:block>
+    <xsl:call-template name="setindex.titlepage.before.recto"/>
+    <xsl:call-template name="setindex.titlepage.recto"/>
+    </fo:block>
+    <fo:block>
+    <xsl:call-template name="setindex.titlepage.before.verso"/>
+    <xsl:call-template name="setindex.titlepage.verso"/>
+    </fo:block>
+    <xsl:call-template name="setindex.titlepage.separator"/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="*" mode="setindex.titlepage.recto.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="setindex.titlepage.verso.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="setindex.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="setindex.titlepage.recto.style" font-family="{$title.fontset}">
+<xsl:apply-templates select="." mode="setindex.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template name="colophon.titlepage.recto">
+  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="colophon.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-family="{$title.fontset}" font-weight="bold">
+<xsl:call-template name="component.title">
+<xsl:with-param name="node" select="ancestor-or-self::colophon[1]"/>
+</xsl:call-template></fo:block>
+  <xsl:choose>
+    <xsl:when test="colophoninfo/subtitle">
+      <xsl:apply-templates mode="colophon.titlepage.recto.auto.mode" select="colophoninfo/subtitle"/>
+    </xsl:when>
+    <xsl:when test="docinfo/subtitle">
+      <xsl:apply-templates mode="colophon.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
+    </xsl:when>
+    <xsl:when test="info/subtitle">
+      <xsl:apply-templates mode="colophon.titlepage.recto.auto.mode" select="info/subtitle"/>
+    </xsl:when>
+    <xsl:when test="subtitle">
+      <xsl:apply-templates mode="colophon.titlepage.recto.auto.mode" select="subtitle"/>
+    </xsl:when>
+  </xsl:choose>
+
+</xsl:template>
+
+<xsl:template name="colophon.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="colophon.titlepage.separator">
+</xsl:template>
+
+<xsl:template name="colophon.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="colophon.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="colophon.titlepage">
+  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
+    <fo:block>
+    <xsl:call-template name="colophon.titlepage.before.recto"/>
+    <xsl:call-template name="colophon.titlepage.recto"/>
+    </fo:block>
+    <fo:block>
+    <xsl:call-template name="colophon.titlepage.before.verso"/>
+    <xsl:call-template name="colophon.titlepage.verso"/>
+    </fo:block>
+    <xsl:call-template name="colophon.titlepage.separator"/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="*" mode="colophon.titlepage.recto.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="colophon.titlepage.verso.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="colophon.titlepage.recto.auto.mode">
+<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="colophon.titlepage.recto.style" font-family="{$title.fontset}">
+<xsl:apply-templates select="." mode="colophon.titlepage.recto.mode"/>
+</fo:block>
+</xsl:template>
+
+<xsl:template name="table.of.contents.titlepage.recto">
+  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="table.of.contents.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em" space-after="0.5em" margin-left="{$title.margin.left}" font-size="17.28pt" font-weight="bold" font-family="{$title.fontset}">
+<xsl:call-template name="gentext">
+<xsl:with-param name="key" select="'TableofContents'"/>
+</xsl:call-template></fo:block>
+</xsl:template>
+
+<xsl:template name="table.of.contents.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="table.of.contents.titlepage.separator">
+</xsl:template>
+
+<xsl:template name="table.of.contents.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="table.of.contents.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="table.of.contents.titlepage">
+  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
+    <fo:block>
+    <xsl:call-template name="table.of.contents.titlepage.before.recto"/>
+    <xsl:call-template name="table.of.contents.titlepage.recto"/>
+    </fo:block>
+    <fo:block>
+    <xsl:call-template name="table.of.contents.titlepage.before.verso"/>
+    <xsl:call-template name="table.of.contents.titlepage.verso"/>
+    </fo:block>
+    <xsl:call-template name="table.of.contents.titlepage.separator"/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="*" mode="table.of.contents.titlepage.recto.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="table.of.contents.titlepage.verso.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template name="list.of.tables.titlepage.recto">
+  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="list.of.tables.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em" space-after="0.5em" margin-left="{$title.margin.left}" font-size="17.28pt" font-weight="bold" font-family="{$title.fontset}">
+<xsl:call-template name="gentext">
+<xsl:with-param name="key" select="'ListofTables'"/>
+</xsl:call-template></fo:block>
+</xsl:template>
+
+<xsl:template name="list.of.tables.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="list.of.tables.titlepage.separator">
+</xsl:template>
+
+<xsl:template name="list.of.tables.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="list.of.tables.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="list.of.tables.titlepage">
+  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
+    <fo:block>
+    <xsl:call-template name="list.of.tables.titlepage.before.recto"/>
+    <xsl:call-template name="list.of.tables.titlepage.recto"/>
+    </fo:block>
+    <fo:block>
+    <xsl:call-template name="list.of.tables.titlepage.before.verso"/>
+    <xsl:call-template name="list.of.tables.titlepage.verso"/>
+    </fo:block>
+    <xsl:call-template name="list.of.tables.titlepage.separator"/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="*" mode="list.of.tables.titlepage.recto.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="list.of.tables.titlepage.verso.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template name="list.of.figures.titlepage.recto">
+  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="list.of.figures.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em" space-after="0.5em" margin-left="{$title.margin.left}" font-size="17.28pt" font-weight="bold" font-family="{$title.fontset}">
+<xsl:call-template name="gentext">
+<xsl:with-param name="key" select="'ListofFigures'"/>
+</xsl:call-template></fo:block>
+</xsl:template>
+
+<xsl:template name="list.of.figures.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="list.of.figures.titlepage.separator">
+</xsl:template>
+
+<xsl:template name="list.of.figures.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="list.of.figures.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="list.of.figures.titlepage">
+  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
+    <fo:block>
+    <xsl:call-template name="list.of.figures.titlepage.before.recto"/>
+    <xsl:call-template name="list.of.figures.titlepage.recto"/>
+    </fo:block>
+    <fo:block>
+    <xsl:call-template name="list.of.figures.titlepage.before.verso"/>
+    <xsl:call-template name="list.of.figures.titlepage.verso"/>
+    </fo:block>
+    <xsl:call-template name="list.of.figures.titlepage.separator"/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="*" mode="list.of.figures.titlepage.recto.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="list.of.figures.titlepage.verso.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template name="list.of.examples.titlepage.recto">
+  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="list.of.examples.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em" space-after="0.5em" margin-left="{$title.margin.left}" font-size="17.28pt" font-weight="bold" font-family="{$title.fontset}">
+<xsl:call-template name="gentext">
+<xsl:with-param name="key" select="'ListofExamples'"/>
+</xsl:call-template></fo:block>
+</xsl:template>
+
+<xsl:template name="list.of.examples.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="list.of.examples.titlepage.separator">
+</xsl:template>
+
+<xsl:template name="list.of.examples.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="list.of.examples.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="list.of.examples.titlepage">
+  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
+    <fo:block>
+    <xsl:call-template name="list.of.examples.titlepage.before.recto"/>
+    <xsl:call-template name="list.of.examples.titlepage.recto"/>
+    </fo:block>
+    <fo:block>
+    <xsl:call-template name="list.of.examples.titlepage.before.verso"/>
+    <xsl:call-template name="list.of.examples.titlepage.verso"/>
+    </fo:block>
+    <xsl:call-template name="list.of.examples.titlepage.separator"/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="*" mode="list.of.examples.titlepage.recto.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="list.of.examples.titlepage.verso.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template name="list.of.equations.titlepage.recto">
+  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="list.of.equations.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em" space-after="0.5em" margin-left="{$title.margin.left}" font-size="17.28pt" font-weight="bold" font-family="{$title.fontset}">
+<xsl:call-template name="gentext">
+<xsl:with-param name="key" select="'ListofEquations'"/>
+</xsl:call-template></fo:block>
+</xsl:template>
+
+<xsl:template name="list.of.equations.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="list.of.equations.titlepage.separator">
+</xsl:template>
+
+<xsl:template name="list.of.equations.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="list.of.equations.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="list.of.equations.titlepage">
+  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
+    <fo:block>
+    <xsl:call-template name="list.of.equations.titlepage.before.recto"/>
+    <xsl:call-template name="list.of.equations.titlepage.recto"/>
+    </fo:block>
+    <fo:block>
+    <xsl:call-template name="list.of.equations.titlepage.before.verso"/>
+    <xsl:call-template name="list.of.equations.titlepage.verso"/>
+    </fo:block>
+    <xsl:call-template name="list.of.equations.titlepage.separator"/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="*" mode="list.of.equations.titlepage.recto.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="list.of.equations.titlepage.verso.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template name="list.of.procedures.titlepage.recto">
+  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="list.of.procedures.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em" space-after="0.5em" margin-left="{$title.margin.left}" font-size="17.28pt" font-weight="bold" font-family="{$title.fontset}">
+<xsl:call-template name="gentext">
+<xsl:with-param name="key" select="'ListofProcedures'"/>
+</xsl:call-template></fo:block>
+</xsl:template>
+
+<xsl:template name="list.of.procedures.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="list.of.procedures.titlepage.separator">
+</xsl:template>
+
+<xsl:template name="list.of.procedures.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="list.of.procedures.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="list.of.procedures.titlepage">
+  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
+    <fo:block>
+    <xsl:call-template name="list.of.procedures.titlepage.before.recto"/>
+    <xsl:call-template name="list.of.procedures.titlepage.recto"/>
+    </fo:block>
+    <fo:block>
+    <xsl:call-template name="list.of.procedures.titlepage.before.verso"/>
+    <xsl:call-template name="list.of.procedures.titlepage.verso"/>
+    </fo:block>
+    <xsl:call-template name="list.of.procedures.titlepage.separator"/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="*" mode="list.of.procedures.titlepage.recto.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="list.of.procedures.titlepage.verso.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template name="list.of.unknowns.titlepage.recto">
+  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="list.of.unknowns.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em" space-after="0.5em" margin-left="{$title.margin.left}" font-size="17.28pt" font-weight="bold" font-family="{$title.fontset}">
+<xsl:call-template name="gentext">
+<xsl:with-param name="key" select="'ListofUnknown'"/>
+</xsl:call-template></fo:block>
+</xsl:template>
+
+<xsl:template name="list.of.unknowns.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="list.of.unknowns.titlepage.separator">
+</xsl:template>
+
+<xsl:template name="list.of.unknowns.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="list.of.unknowns.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="list.of.unknowns.titlepage">
+  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
+    <fo:block>
+    <xsl:call-template name="list.of.unknowns.titlepage.before.recto"/>
+    <xsl:call-template name="list.of.unknowns.titlepage.recto"/>
+    </fo:block>
+    <fo:block>
+    <xsl:call-template name="list.of.unknowns.titlepage.before.verso"/>
+    <xsl:call-template name="list.of.unknowns.titlepage.verso"/>
+    </fo:block>
+    <xsl:call-template name="list.of.unknowns.titlepage.separator"/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="*" mode="list.of.unknowns.titlepage.recto.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="list.of.unknowns.titlepage.verso.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/titlepage.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/titlepage.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/titlepage.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,724 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: titlepage.xsl,v 1.1.1.1 2004/10/19 21:21:45 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:attribute-set name="book.titlepage.recto.style">
+  <xsl:attribute name="font-family">
+    <xsl:value-of select="$title.fontset"/>
+  </xsl:attribute>
+  <xsl:attribute name="font-weight">bold</xsl:attribute>
+  <xsl:attribute name="font-size">12pt</xsl:attribute>
+  <xsl:attribute name="text-align">center</xsl:attribute>
+</xsl:attribute-set>
+
+<xsl:attribute-set name="book.titlepage.verso.style">
+  <xsl:attribute name="font-size">10pt</xsl:attribute>
+</xsl:attribute-set>
+
+<xsl:attribute-set name="article.titlepage.recto.style"/>
+<xsl:attribute-set name="article.titlepage.verso.style"/>
+
+<xsl:attribute-set name="set.titlepage.recto.style"/>
+<xsl:attribute-set name="set.titlepage.verso.style"/>
+
+<xsl:attribute-set name="part.titlepage.recto.style">
+  <xsl:attribute name="text-align">center</xsl:attribute>
+</xsl:attribute-set>
+
+<xsl:attribute-set name="part.titlepage.verso.style"/>
+
+<xsl:attribute-set name="partintro.titlepage.recto.style"/>
+<xsl:attribute-set name="partintro.titlepage.verso.style"/>
+
+<xsl:attribute-set name="reference.titlepage.recto.style"/>
+<xsl:attribute-set name="reference.titlepage.verso.style"/>
+
+<xsl:attribute-set name="dedication.titlepage.recto.style"/>
+<xsl:attribute-set name="dedication.titlepage.verso.style"/>
+
+<xsl:attribute-set name="preface.titlepage.recto.style"/>
+<xsl:attribute-set name="preface.titlepage.verso.style"/>
+
+<xsl:attribute-set name="chapter.titlepage.recto.style"/>
+<xsl:attribute-set name="chapter.titlepage.verso.style"/>
+
+<xsl:attribute-set name="appendix.titlepage.recto.style"/>
+<xsl:attribute-set name="appendix.titlepage.verso.style"/>
+
+<xsl:attribute-set name="bibliography.titlepage.recto.style"/>
+<xsl:attribute-set name="bibliography.titlepage.verso.style"/>
+
+<xsl:attribute-set name="bibliodiv.titlepage.recto.style"/>
+<xsl:attribute-set name="bibliodiv.titlepage.verso.style"/>
+
+<xsl:attribute-set name="glossary.titlepage.recto.style"/>
+<xsl:attribute-set name="glossary.titlepage.verso.style"/>
+
+<xsl:attribute-set name="glossdiv.titlepage.recto.style"/>
+<xsl:attribute-set name="glossdiv.titlepage.verso.style"/>
+
+<xsl:attribute-set name="index.titlepage.recto.style"/>
+<xsl:attribute-set name="index.titlepage.verso.style"/>
+
+<xsl:attribute-set name="setindex.titlepage.recto.style"/>
+<xsl:attribute-set name="setindex.titlepage.verso.style"/>
+
+<xsl:attribute-set name="indexdiv.titlepage.recto.style"/>
+<xsl:attribute-set name="indexdiv.titlepage.verso.style"/>
+
+<xsl:attribute-set name="colophon.titlepage.recto.style"/>
+<xsl:attribute-set name="colophon.titlepage.verso.style"/>
+
+<xsl:attribute-set name="section.titlepage.recto.style">
+  <xsl:attribute name="keep-together">always</xsl:attribute>
+</xsl:attribute-set>
+
+<xsl:attribute-set name="section.titlepage.verso.style">
+  <xsl:attribute name="keep-together">always</xsl:attribute>
+  <xsl:attribute name="keep-with-next">always</xsl:attribute>
+</xsl:attribute-set>
+
+<xsl:attribute-set name="sect1.titlepage.recto.style"
+                   use-attribute-sets="section.titlepage.recto.style"/>
+<xsl:attribute-set name="sect1.titlepage.verso.style"
+                   use-attribute-sets="section.titlepage.verso.style"/>
+
+<xsl:attribute-set name="sect2.titlepage.recto.style"
+                   use-attribute-sets="section.titlepage.recto.style"/>
+<xsl:attribute-set name="sect2.titlepage.verso.style"
+                   use-attribute-sets="section.titlepage.verso.style"/>
+
+<xsl:attribute-set name="sect3.titlepage.recto.style"
+                   use-attribute-sets="section.titlepage.recto.style"/>
+<xsl:attribute-set name="sect3.titlepage.verso.style"
+                   use-attribute-sets="section.titlepage.verso.style"/>
+
+<xsl:attribute-set name="sect4.titlepage.recto.style"
+                   use-attribute-sets="section.titlepage.recto.style"/>
+<xsl:attribute-set name="sect4.titlepage.verso.style"
+                   use-attribute-sets="section.titlepage.verso.style"/>
+
+<xsl:attribute-set name="sect5.titlepage.recto.style"
+                   use-attribute-sets="section.titlepage.recto.style"/>
+<xsl:attribute-set name="sect5.titlepage.verso.style"
+                   use-attribute-sets="section.titlepage.verso.style"/>
+
+<xsl:attribute-set name="simplesect.titlepage.recto.style"
+                   use-attribute-sets="section.titlepage.recto.style"/>
+<xsl:attribute-set name="simplesect.titlepage.verso.style"
+                   use-attribute-sets="section.titlepage.verso.style"/>
+
+<xsl:attribute-set name="refsynopsisdiv.titlepage.recto.style"
+                   use-attribute-sets="section.titlepage.recto.style"/>
+<xsl:attribute-set name="refsynopsisdiv.titlepage.verso.style"
+                   use-attribute-sets="section.titlepage.verso.style"/>
+
+<xsl:attribute-set name="refsection.titlepage.recto.style"
+                   use-attribute-sets="section.titlepage.recto.style"/>
+<xsl:attribute-set name="refsection.titlepage.verso.style"
+                   use-attribute-sets="section.titlepage.verso.style"/>
+
+<xsl:attribute-set name="refsect1.titlepage.recto.style"
+                   use-attribute-sets="section.titlepage.recto.style"/>
+<xsl:attribute-set name="refsect1.titlepage.verso.style"
+                   use-attribute-sets="section.titlepage.verso.style"/>
+
+<xsl:attribute-set name="refsect2.titlepage.recto.style"
+                   use-attribute-sets="section.titlepage.recto.style"/>
+<xsl:attribute-set name="refsect2.titlepage.verso.style"
+                   use-attribute-sets="section.titlepage.verso.style"/>
+
+<xsl:attribute-set name="refsect3.titlepage.recto.style"
+                   use-attribute-sets="section.titlepage.recto.style"/>
+<xsl:attribute-set name="refsect3.titlepage.verso.style"
+                   use-attribute-sets="section.titlepage.verso.style"/>
+
+<xsl:attribute-set name="table.of.contents.titlepage.recto.style"/>
+<xsl:attribute-set name="table.of.contents.titlepage.verso.style"/>
+
+<xsl:attribute-set name="list.of.tables.titlepage.recto.style"/>
+<xsl:attribute-set name="list.of.tables.contents.titlepage.verso.style"/>
+
+<xsl:attribute-set name="list.of.figures.titlepage.recto.style"/>
+<xsl:attribute-set name="list.of.figures.contents.titlepage.verso.style"/>
+
+<xsl:attribute-set name="list.of.equations.titlepage.recto.style"/>
+<xsl:attribute-set name="list.of.equations.contents.titlepage.verso.style"/>
+
+<xsl:attribute-set name="list.of.examples.titlepage.recto.style"/>
+<xsl:attribute-set name="list.of.examples.contents.titlepage.verso.style"/>
+
+<xsl:attribute-set name="list.of.procedures.titlepage.recto.style"/>
+<xsl:attribute-set name="list.of.procedures.contents.titlepage.verso.style"/>
+
+<xsl:attribute-set name="list.of.unknowns.titlepage.recto.style"/>
+<xsl:attribute-set name="list.of.unknowns.contents.titlepage.verso.style"/>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="*" mode="titlepage.mode">
+  <!-- if an element isn't found in this mode, try the default mode -->
+  <xsl:apply-templates select="."/>
+</xsl:template>
+
+<xsl:template match="abbrev" mode="titlepage.mode">
+  <xsl:apply-templates mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="abstract" mode="titlepage.mode">
+  <fo:block>
+    <xsl:if test="title"> <!-- FIXME: add param for using default title? -->
+      <xsl:call-template name="formal.object.heading">
+        <xsl:with-param name="title">
+          <xsl:apply-templates select="." mode="title.markup"/>
+        </xsl:with-param>
+      </xsl:call-template>
+    </xsl:if>
+    <xsl:apply-templates mode="titlepage.mode"/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="abstract/title" mode="titlepage.mode"/>
+
+<xsl:template match="abstract/title" mode="titlepage.abstract.title.mode">
+  <xsl:apply-templates mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="address" mode="titlepage.mode">
+  <!-- use the normal address handling code -->
+  <xsl:apply-templates select="."/>
+</xsl:template>
+
+<xsl:template match="affiliation" mode="titlepage.mode">
+  <fo:block>
+    <xsl:apply-templates mode="titlepage.mode"/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="artpagenums" mode="titlepage.mode">
+  <xsl:apply-templates mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="author" mode="titlepage.mode">
+  <fo:block>
+    <xsl:call-template name="anchor"/>
+    <xsl:call-template name="person.name"/>
+    <xsl:if test="affiliation/orgname">
+      <xsl:text>, </xsl:text>
+      <xsl:apply-templates select="affiliation/orgname" mode="titlepage.mode"/>
+    </xsl:if>
+    <xsl:if test="email|affiliation/address/email">
+      <xsl:text> </xsl:text>
+      <xsl:apply-templates select="(email|affiliation/address/email)[1]"/>
+    </xsl:if>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="authorblurb" mode="titlepage.mode">
+  <xsl:apply-templates mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="authorgroup" mode="titlepage.mode">
+  <fo:wrapper>
+    <xsl:if test="@id">
+      <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
+    </xsl:if>
+    <xsl:apply-templates mode="titlepage.mode"/>
+  </fo:wrapper>
+</xsl:template>
+
+<xsl:template match="authorinitials" mode="titlepage.mode">
+  <xsl:apply-templates mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="bibliomisc" mode="titlepage.mode">
+  <xsl:apply-templates mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="bibliomset" mode="titlepage.mode">
+  <xsl:apply-templates mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="collab" mode="titlepage.mode">
+  <xsl:apply-templates mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="confgroup" mode="titlepage.mode">
+  <fo:block>
+    <xsl:apply-templates mode="titlepage.mode"/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="confdates" mode="titlepage.mode">
+  <fo:block>
+    <xsl:apply-templates mode="titlepage.mode"/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="conftitle" mode="titlepage.mode">
+  <fo:block>
+    <xsl:apply-templates mode="titlepage.mode"/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="confnum" mode="titlepage.mode">
+  <!-- suppress -->
+</xsl:template>
+
+<xsl:template match="contractnum" mode="titlepage.mode">
+  <xsl:apply-templates mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="contractsponsor" mode="titlepage.mode">
+  <xsl:apply-templates mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="contrib" mode="titlepage.mode">
+  <xsl:apply-templates mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="copyright" mode="titlepage.mode">
+  <xsl:call-template name="gentext">
+    <xsl:with-param name="key" select="'Copyright'"/>
+  </xsl:call-template>
+  <xsl:call-template name="gentext.space"/>
+  <xsl:call-template name="dingbat">
+    <xsl:with-param name="dingbat">copyright</xsl:with-param>
+  </xsl:call-template>
+  <xsl:call-template name="gentext.space"/>
+  <xsl:call-template name="copyright.years">
+    <xsl:with-param name="years" select="year"/>
+    <xsl:with-param name="print.ranges" select="$make.year.ranges"/>
+    <xsl:with-param name="single.year.ranges"
+                    select="$make.single.year.ranges"/>
+  </xsl:call-template>
+  <xsl:call-template name="gentext.space"/>
+  <xsl:apply-templates select="holder" mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="year" mode="titlepage.mode">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="holder" mode="titlepage.mode">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="corpauthor" mode="titlepage.mode">
+  <xsl:apply-templates mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="corpname" mode="titlepage.mode">
+  <xsl:apply-templates mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="date" mode="titlepage.mode">
+  <xsl:apply-templates mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="edition" mode="titlepage.mode">
+  <xsl:apply-templates mode="titlepage.mode"/>
+  <xsl:call-template name="gentext.space"/>
+  <xsl:call-template name="gentext">
+    <xsl:with-param name="key" select="'Edition'"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="editor" mode="titlepage.mode">
+  <!-- The first editor is dealt with in the following template,
+       which in turn displays all editors of the same mode. -->
+</xsl:template>
+
+<xsl:template match="editor[1]" priority="2" mode="titlepage.mode">
+  <xsl:call-template name="gentext.edited.by"/>
+  <xsl:call-template name="gentext.space"/>
+  <xsl:call-template name="person.name.list">
+    <xsl:with-param name="person.list" select="../editor"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="firstname" mode="titlepage.mode">
+  <xsl:apply-templates mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="graphic" mode="titlepage.mode">
+  <!-- use the normal graphic handling code -->
+  <xsl:apply-templates select="."/>
+</xsl:template>
+
+<xsl:template match="honorific" mode="titlepage.mode">
+  <xsl:apply-templates mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="isbn" mode="titlepage.mode">
+  <xsl:apply-templates mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="issn" mode="titlepage.mode">
+  <xsl:apply-templates mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="biblioid" mode="titlepage.mode">
+  <xsl:apply-templates mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="itermset" mode="titlepage.mode">
+  <!-- discard -->
+</xsl:template>
+
+<xsl:template match="invpartnumber" mode="titlepage.mode">
+  <xsl:apply-templates mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="issuenum" mode="titlepage.mode">
+  <xsl:apply-templates mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="jobtitle" mode="titlepage.mode">
+  <fo:block>
+    <xsl:apply-templates mode="titlepage.mode"/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="keywordset" mode="titlepage.mode">
+</xsl:template>
+
+<xsl:template match="legalnotice" mode="titlepage.mode">
+  <fo:block>
+    <xsl:if test="title"> <!-- FIXME: add param for using default title? -->
+    <xsl:call-template name="formal.object.heading">
+        <xsl:with-param name="title">
+          <xsl:apply-templates select="." mode="title.markup"/>
+        </xsl:with-param>
+      </xsl:call-template>
+    </xsl:if>
+    <xsl:apply-templates mode="titlepage.mode"/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="legalnotice/title" mode="titlepage.mode">
+</xsl:template>
+
+<xsl:template match="legalnotice/title" mode="titlepage.legalnotice.title.mode">
+  <xsl:apply-templates mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="lineage" mode="titlepage.mode">
+  <xsl:apply-templates mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="modespec" mode="titlepage.mode">
+  <!-- discard -->
+</xsl:template>
+
+<xsl:template match="orgdiv" mode="titlepage.mode">
+  <xsl:apply-templates mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="orgname" mode="titlepage.mode">
+  <xsl:apply-templates mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="othercredit" mode="titlepage.mode">
+  <xsl:variable name="contrib" select="string(contrib)"/>
+  <xsl:choose>
+    <xsl:when test="contrib">
+      <xsl:if test="not(preceding-sibling::othercredit[string(contrib)=$contrib])">
+        <fo:block>
+          <xsl:apply-templates mode="titlepage.mode" select="contrib"/>
+          <xsl:text>: </xsl:text>
+          <xsl:call-template name="person.name"/>
+          <xsl:apply-templates mode="titlepage.mode" select="affiliation"/>
+          <xsl:apply-templates select="following-sibling::othercredit[string(contrib)=$contrib]" mode="titlepage.othercredits"/>
+        </fo:block>
+      </xsl:if>
+    </xsl:when>
+    <xsl:otherwise>
+      <fo:block><xsl:call-template name="person.name"/></fo:block>
+      <xsl:apply-templates mode="titlepage.mode" select="./affiliation"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="othercredit" mode="titlepage.othercredits">
+  <xsl:text>, </xsl:text>
+  <xsl:call-template name="person.name"/>
+</xsl:template>
+
+<xsl:template match="othername" mode="titlepage.mode">
+  <xsl:apply-templates mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="pagenums" mode="titlepage.mode">
+  <xsl:apply-templates mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="printhistory" mode="titlepage.mode">
+  <xsl:apply-templates mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="productname" mode="titlepage.mode">
+  <xsl:apply-templates mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="productnumber" mode="titlepage.mode">
+  <xsl:apply-templates mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="pubdate" mode="titlepage.mode">
+  <xsl:apply-templates mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="publisher" mode="titlepage.mode">
+  <fo:block>
+    <xsl:apply-templates mode="titlepage.mode"/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="publishername" mode="titlepage.mode">
+  <xsl:apply-templates mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="pubsnumber" mode="titlepage.mode">
+  <xsl:apply-templates mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="releaseinfo" mode="titlepage.mode">
+  <xsl:apply-templates mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="revhistory" mode="titlepage.mode">
+
+  <xsl:variable name="explicit.table.width">
+    <xsl:call-template name="dbfo-attribute">
+      <xsl:with-param name="pis"
+                      select="processing-instruction('dbfo')"/>
+      <xsl:with-param name="attribute" select="'table-width'"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="table.width">
+    <xsl:choose>
+      <xsl:when test="$explicit.table.width != ''">
+        <xsl:value-of select="$explicit.table.width"/>
+      </xsl:when>
+      <xsl:when test="$default.table.width = ''">
+        <xsl:text>100%</xsl:text>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$default.table.width"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <fo:table table-layout="fixed" width="{$table.width}">
+    <fo:table-column column-number="1" column-width="proportional-column-width(1)"/>
+    <fo:table-column column-number="2" column-width="proportional-column-width(1)"/>
+    <fo:table-column column-number="3" column-width="proportional-column-width(1)"/>
+    <fo:table-body>
+      <fo:table-row>
+        <fo:table-cell number-columns-spanned="3">
+          <fo:block>
+            <xsl:call-template name="gentext">
+              <xsl:with-param name="key" select="'RevHistory'"/>
+            </xsl:call-template>
+          </fo:block>
+        </fo:table-cell>
+      </fo:table-row>
+      <xsl:apply-templates mode="titlepage.mode"/>
+    </fo:table-body>
+  </fo:table>
+</xsl:template>
+
+<xsl:template match="revhistory/revision" mode="titlepage.mode">
+  <xsl:variable name="revnumber" select=".//revnumber"/>
+  <xsl:variable name="revdate"   select=".//date"/>
+  <xsl:variable name="revauthor" select=".//authorinitials"/>
+  <xsl:variable name="revremark" select=".//revremark|.//revdescription"/>
+  <fo:table-row>
+    <fo:table-cell>
+      <fo:block>
+        <xsl:if test="$revnumber">
+          <xsl:call-template name="gentext">
+            <xsl:with-param name="key" select="'Revision'"/>
+          </xsl:call-template>
+          <xsl:call-template name="gentext.space"/>
+          <xsl:apply-templates select="$revnumber[1]" mode="titlepage.mode"/>
+        </xsl:if>
+      </fo:block>
+    </fo:table-cell>
+    <fo:table-cell>
+      <fo:block>
+        <xsl:apply-templates select="$revdate[1]" mode="titlepage.mode"/>
+      </fo:block>
+    </fo:table-cell>
+    <fo:table-cell>
+      <fo:block>
+        <xsl:apply-templates select="$revauthor[1]" mode="titlepage.mode"/>
+      </fo:block>
+    </fo:table-cell>
+  </fo:table-row>
+  <xsl:if test="$revremark">
+    <fo:table-row>
+      <fo:table-cell number-columns-spanned="3">
+        <fo:block>
+          <xsl:apply-templates select="$revremark[1]" mode="titlepage.mode"/>
+        </fo:block>
+      </fo:table-cell>
+    </fo:table-row>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="revision/revnumber" mode="titlepage.mode">
+  <xsl:apply-templates mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="revision/date" mode="titlepage.mode">
+  <xsl:apply-templates mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="revision/authorinitials" mode="titlepage.mode">
+  <xsl:apply-templates mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="revision/revremark" mode="titlepage.mode">
+  <xsl:apply-templates mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="revision/revdescription" mode="titlepage.mode">
+  <xsl:apply-templates mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="seriesvolnums" mode="titlepage.mode">
+  <xsl:apply-templates mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="shortaffil" mode="titlepage.mode">
+  <xsl:apply-templates mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="subjectset" mode="titlepage.mode">
+  <!-- discard -->
+</xsl:template>
+
+<xsl:template match="subtitle" mode="titlepage.mode">
+  <xsl:apply-templates mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="surname" mode="titlepage.mode">
+  <xsl:apply-templates mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="title" mode="titlepage.mode">
+  <xsl:apply-templates mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="titleabbrev" mode="titlepage.mode">
+  <xsl:apply-templates mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="volumenum" mode="titlepage.mode">
+  <xsl:apply-templates mode="titlepage.mode"/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+<!-- Book templates -->
+
+<!-- Note: these templates cannot use *.titlepage.recto.mode or
+     *.titlepage.verso.mode. If they do then subsequent use of a custom
+     titlepage.templates.xml file will not work correctly. -->
+
+<!-- book recto -->
+
+<xsl:template match="bookinfo/authorgroup|info/authorgroup"
+	      mode="titlepage.mode" priority="2">
+  <fo:block>
+    <xsl:if test="@id">
+      <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
+    </xsl:if>
+    <xsl:apply-templates mode="titlepage.mode"/>
+  </fo:block>
+</xsl:template>
+
+<!-- book verso -->
+
+<xsl:template name="book.verso.title">
+  <fo:block>
+    <xsl:apply-templates mode="titlepage.mode"/>
+
+    <xsl:if test="following-sibling::subtitle
+                  |following-sibling::info/subtitle
+                  |following-sibling::bookinfo/subtitle">
+      <xsl:text>: </xsl:text>
+
+      <xsl:apply-templates select="(following-sibling::subtitle
+                                   |following-sibling::info/subtitle
+                                   |following-sibling::bookinfo/subtitle)[1]"
+                           mode="book.verso.subtitle.mode"/>
+    </xsl:if>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="book.verso.subtitle.mode">
+  <xsl:apply-templates mode="titlepage.mode"/>
+  <xsl:if test="following-sibling::subtitle">
+    <xsl:text>: </xsl:text>
+    <xsl:apply-templates select="following-sibling::subtitle[1]"
+                         mode="book.verso.subtitle.mode"/>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template name="verso.authorgroup">
+  <fo:block>
+    <xsl:call-template name="gentext">
+      <xsl:with-param name="key" select="'by'"/>
+    </xsl:call-template>
+    <xsl:text> </xsl:text>
+    <xsl:call-template name="person.name.list">
+      <xsl:with-param name="person.list" select="author|corpauthor|editor"/>
+    </xsl:call-template>
+  </fo:block>
+  <xsl:apply-templates select="othercredit" mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="bookinfo/author|info/author"
+	      mode="titlepage.mode" priority="2">
+  <fo:block>
+    <xsl:call-template name="person.name"/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="bookinfo/corpauthor|info/corpauthor"
+	      mode="titlepage.mode" priority="2">
+  <fo:block>
+    <xsl:apply-templates/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="bookinfo/pubdate|info/pubdate"
+	      mode="titlepage.mode" priority="2">
+  <fo:block>
+    <xsl:call-template name="gentext">
+      <xsl:with-param name="key" select="'published'"/>
+    </xsl:call-template>
+    <xsl:text> </xsl:text>
+    <xsl:apply-templates mode="titlepage.mode"/>
+  </fo:block>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/toc.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/toc.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/toc.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,253 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: toc.xsl,v 1.1.1.1 2004/10/19 21:21:45 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<!-- FIXME: in the contexts where <toc> can occur, I think it's always
+     the case that a page-sequence is required. Is that true? -->
+
+<xsl:template match="toc">
+  <xsl:variable name="master-reference">
+    <xsl:call-template name="select.pagemaster"/>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="*">
+      <xsl:if test="$process.source.toc != 0">
+        <!-- if the toc isn't empty, process it -->
+        <fo:page-sequence hyphenate="{$hyphenate}"
+                          master-reference="{$master-reference}">
+          <xsl:attribute name="language">
+            <xsl:call-template name="l10n.language"/>
+          </xsl:attribute>
+          <xsl:attribute name="format">
+            <xsl:call-template name="page.number.format">
+              <xsl:with-param name="element" select="'toc'"/>
+            </xsl:call-template>
+          </xsl:attribute>
+          <xsl:if test="$double.sided != 0">
+            <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
+          </xsl:if>
+
+          <xsl:attribute name="hyphenation-character">
+            <xsl:call-template name="gentext">
+              <xsl:with-param name="key" select="'hyphenation-character'"/>
+            </xsl:call-template>
+          </xsl:attribute>
+          <xsl:attribute name="hyphenation-push-character-count">
+            <xsl:call-template name="gentext">
+              <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
+            </xsl:call-template>
+          </xsl:attribute>
+          <xsl:attribute name="hyphenation-remain-character-count">
+            <xsl:call-template name="gentext">
+              <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
+            </xsl:call-template>
+          </xsl:attribute>
+
+          <xsl:apply-templates select="." mode="running.head.mode">
+            <xsl:with-param name="master-reference" select="$master-reference"/>
+          </xsl:apply-templates>
+          <xsl:apply-templates select="." mode="running.foot.mode">
+            <xsl:with-param name="master-reference" select="$master-reference"/>
+          </xsl:apply-templates>
+
+          <fo:flow flow-name="xsl-region-body">
+            <fo:block xsl:use-attribute-sets="toc.margin.properties">
+              <xsl:call-template name="table.of.contents.titlepage"/>
+              <xsl:apply-templates/>
+            </fo:block>
+          </fo:flow>
+        </fo:page-sequence>
+      </xsl:if>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:if test="$process.empty.source.toc != 0">
+        <fo:page-sequence hyphenate="{$hyphenate}"
+                          master-reference="{$master-reference}">
+          <xsl:attribute name="language">
+            <xsl:call-template name="l10n.language"/>
+          </xsl:attribute>
+          <xsl:attribute name="format">
+            <xsl:call-template name="page.number.format">
+              <xsl:with-param name="element" select="'toc'"/>
+            </xsl:call-template>
+          </xsl:attribute>
+          <xsl:if test="$double.sided != 0">
+            <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
+          </xsl:if>
+
+          <xsl:attribute name="hyphenation-character">
+            <xsl:call-template name="gentext">
+              <xsl:with-param name="key" select="'hyphenation-character'"/>
+            </xsl:call-template>
+          </xsl:attribute>
+          <xsl:attribute name="hyphenation-push-character-count">
+            <xsl:call-template name="gentext">
+              <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
+            </xsl:call-template>
+          </xsl:attribute>
+          <xsl:attribute name="hyphenation-remain-character-count">
+            <xsl:call-template name="gentext">
+              <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
+            </xsl:call-template>
+          </xsl:attribute>
+
+          <xsl:apply-templates select="." mode="running.head.mode">
+            <xsl:with-param name="master-reference" select="$master-reference"/>
+          </xsl:apply-templates>
+          <xsl:apply-templates select="." mode="running.foot.mode">
+            <xsl:with-param name="master-reference" select="$master-reference"/>
+          </xsl:apply-templates>
+
+          <fo:flow flow-name="xsl-region-body">
+            <xsl:choose>
+              <xsl:when test="parent::section
+                              or parent::sect1
+                              or parent::sect2
+                              or parent::sect3
+                              or parent::sect4
+                              or parent::sect5">
+                <xsl:apply-templates select="parent::*"
+                                     mode="toc.for.section"/>
+              </xsl:when>
+              <xsl:when test="parent::article">
+                <xsl:apply-templates select="parent::*"
+                                     mode="toc.for.component"/>
+              </xsl:when>
+              <xsl:when test="parent::book
+                              or parent::part">
+                <xsl:apply-templates select="parent::*"
+                                     mode="toc.for.division"/>
+              </xsl:when>
+              <xsl:when test="parent::set">
+                <xsl:apply-templates select="parent::*"
+                                     mode="toc.for.set"/>
+              </xsl:when>
+              <!-- there aren't any other contexts that allow toc -->
+              <xsl:otherwise>
+                <xsl:message>
+                  <xsl:text>I don't know how to make a TOC in this context!</xsl:text>
+                </xsl:message>
+              </xsl:otherwise>
+            </xsl:choose>
+          </fo:flow>
+        </fo:page-sequence>
+      </xsl:if>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="tocpart|tocchap
+                     |toclevel1|toclevel2|toclevel3|toclevel4|toclevel5">
+  <xsl:apply-templates select="tocentry"/>
+  <xsl:if test="tocchap|toclevel1|toclevel2|toclevel3|toclevel4|toclevel5">
+    <fo:block start-indent="{count(ancestor::*)*2}pc">
+      <xsl:apply-templates select="tocchap|toclevel1|toclevel2|toclevel3|toclevel4|toclevel5"/>
+    </fo:block>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="tocentry|tocfront|tocback">
+  <fo:block text-align-last="justify"
+            end-indent="2pc"
+            last-line-end-indent="-2pc">
+    <fo:inline keep-with-next.within-line="always">
+      <xsl:choose>
+        <xsl:when test="@linkend">
+          <fo:basic-link internal-destination="{@linkend}">
+            <xsl:apply-templates/>
+          </fo:basic-link>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:apply-templates/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </fo:inline>
+
+    <xsl:choose>
+      <xsl:when test="@linkend">
+        <fo:inline keep-together.within-line="always">
+          <xsl:text> </xsl:text>
+          <fo:leader leader-pattern="dots"
+                     keep-with-next.within-line="always"/>
+          <xsl:text> </xsl:text>
+          <fo:basic-link internal-destination="{@linkend}">
+            <xsl:choose>
+              <xsl:when test="@pagenum">
+                <xsl:value-of select="@pagenum"/>
+              </xsl:when>
+              <xsl:otherwise>
+                <fo:page-number-citation ref-id="{@linkend}"/>
+              </xsl:otherwise>
+            </xsl:choose>
+          </fo:basic-link>
+        </fo:inline>
+      </xsl:when>
+      <xsl:when test="@pagenum">
+        <fo:inline keep-together.within-line="always">
+          <xsl:text> </xsl:text>
+          <fo:leader leader-pattern="dots"
+                     keep-with-next.within-line="always"/>
+          <xsl:text> </xsl:text>
+          <xsl:value-of select="@pagenum"/>
+        </fo:inline>
+      </xsl:when>
+      <xsl:otherwise>
+        <!-- just the leaders, what else can I do? -->
+        <fo:inline keep-together.within-line="always">
+          <xsl:text> </xsl:text>
+          <fo:leader leader-pattern="space"
+                     keep-with-next.within-line="always"/>
+        </fo:inline>
+      </xsl:otherwise>
+    </xsl:choose>
+  </fo:block>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="*" mode="toc.for.section">
+<!--
+  <xsl:call-template name="section.toc"/>
+-->
+</xsl:template>
+
+<xsl:template match="*" mode="toc.for.component">
+  <xsl:call-template name="component.toc"/>
+</xsl:template>
+
+<xsl:template match="*" mode="toc.for.section">
+<!--
+  <xsl:call-template name="section.toc"/>
+-->
+</xsl:template>
+
+<xsl:template match="*" mode="toc.for.division">
+  <xsl:call-template name="division.toc"/>
+</xsl:template>
+
+<xsl:template match="*" mode="toc.for.set">
+<!--
+  <xsl:call-template name="set.toc"/>
+-->
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="lot|lotentry">
+</xsl:template>
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/verbatim.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/verbatim.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/verbatim.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,360 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                xmlns:sverb="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.Verbatim"
+                xmlns:xverb="com.nwalsh.xalan.Verbatim"
+                xmlns:lxslt="http://xml.apache.org/xslt"
+                exclude-result-prefixes="sverb xverb lxslt"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: verbatim.xsl,v 1.1.1.1 2004/10/19 21:21:45 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<lxslt:component prefix="xverb"
+                 functions="numberLines"/>
+
+<xsl:template match="programlisting|screen|synopsis">
+  <xsl:param name="suppress-numbers" select="'0'"/>
+  <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
+
+  <xsl:variable name="content">
+    <xsl:choose>
+      <xsl:when test="$suppress-numbers = '0'
+                      and @linenumbering = 'numbered'
+                      and $use.extensions != '0'
+                      and $linenumbering.extension != '0'">
+        <xsl:call-template name="number.rtf.lines">
+          <xsl:with-param name="rtf">
+            <xsl:apply-templates/>
+          </xsl:with-param>
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:apply-templates/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="$shade.verbatim != 0">
+      <fo:block wrap-option='no-wrap'
+                white-space-collapse='false'
+		white-space-treatment='preserve'
+                linefeed-treatment='preserve'
+                xsl:use-attribute-sets="monospace.verbatim.properties shade.verbatim.style">
+
+        <xsl:copy-of select="$content"/>
+      </fo:block>
+    </xsl:when>
+    <xsl:otherwise>
+      <fo:block wrap-option='no-wrap'
+                white-space-collapse='false'
+		white-space-treatment='preserve'
+                linefeed-treatment="preserve"
+                xsl:use-attribute-sets="monospace.verbatim.properties">
+        <xsl:copy-of select="$content"/>
+      </fo:block>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="literallayout">
+  <xsl:param name="suppress-numbers" select="'0'"/>
+
+  <xsl:variable name="content">
+    <xsl:choose>
+      <xsl:when test="$suppress-numbers = '0'
+                      and @linenumbering = 'numbered'
+                      and $use.extensions != '0'
+                      and $linenumbering.extension != '0'">
+        <xsl:call-template name="number.rtf.lines">
+          <xsl:with-param name="rtf">
+            <xsl:apply-templates/>
+          </xsl:with-param>
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:apply-templates/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="@class='monospaced'">
+      <xsl:choose>
+        <xsl:when test="$shade.verbatim != 0">
+          <fo:block wrap-option='no-wrap'
+                    white-space-collapse='false'
+		    white-space-treatment='preserve'
+                    linefeed-treatment="preserve"
+                    xsl:use-attribute-sets="monospace.verbatim.properties shade.verbatim.style">
+
+            <xsl:copy-of select="$content"/>
+          </fo:block>
+        </xsl:when>
+        <xsl:otherwise>
+          <fo:block wrap-option='no-wrap'
+                    white-space-collapse='false'
+		    white-space-treatment='preserve'
+                    linefeed-treatment="preserve"
+                    xsl:use-attribute-sets="monospace.verbatim.properties">
+            <xsl:copy-of select="$content"/>
+          </fo:block>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:choose>
+        <xsl:when test="$shade.verbatim != 0">
+          <fo:block wrap-option='no-wrap'
+                    white-space-collapse='false'
+		    white-space-treatment='preserve'
+                    text-align='start'
+                    linefeed-treatment="preserve"
+                    xsl:use-attribute-sets="verbatim.properties shade.verbatim.style">
+            <xsl:copy-of select="$content"/>
+          </fo:block>
+        </xsl:when>
+        <xsl:otherwise>
+          <fo:block wrap-option='no-wrap'
+                    white-space-collapse='false'
+		    white-space-treatment='preserve'
+                    text-align='start'
+                    linefeed-treatment="preserve"
+                    xsl:use-attribute-sets="verbatim.properties">
+            <xsl:copy-of select="$content"/>
+          </fo:block>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="address">
+  <xsl:param name="suppress-numbers" select="'0'"/>
+
+  <xsl:variable name="content">
+    <xsl:choose>
+      <xsl:when test="$suppress-numbers = '0'
+                      and @linenumbering = 'numbered'
+                      and $use.extensions != '0'
+                      and $linenumbering.extension != '0'">
+        <xsl:call-template name="number.rtf.lines">
+          <xsl:with-param name="rtf">
+            <xsl:apply-templates/>
+          </xsl:with-param>
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:apply-templates/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <fo:block wrap-option='no-wrap'
+            white-space-collapse='false'
+	    white-space-treatment='preserve'
+            linefeed-treatment="preserve"
+            xsl:use-attribute-sets="verbatim.properties">
+    <xsl:copy-of select="$content"/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template name="number.rtf.lines">
+  <xsl:param name="rtf" select="''"/>
+  <xsl:param name="pi.context" select="."/>
+
+  <!-- Save the global values -->
+  <xsl:variable name="global.linenumbering.everyNth"
+                select="$linenumbering.everyNth"/>
+
+  <xsl:variable name="global.linenumbering.separator"
+                select="$linenumbering.separator"/>
+
+  <xsl:variable name="global.linenumbering.width"
+                select="$linenumbering.width"/>
+
+  <!-- Extract the <?dbfo linenumbering.*?> PI values -->
+  <xsl:variable name="pi.linenumbering.everyNth">
+    <xsl:call-template name="dbfo-attribute">
+      <xsl:with-param name="pis"
+                      select="$pi.context/processing-instruction('dbfo')"/>
+      <xsl:with-param name="attribute" select="'linenumbering.everyNth'"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="pi.linenumbering.separator">
+    <xsl:call-template name="dbfo-attribute">
+      <xsl:with-param name="pis"
+                      select="$pi.context/processing-instruction('dbfo')"/>
+      <xsl:with-param name="attribute" select="'linenumbering.separator'"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="pi.linenumbering.width">
+    <xsl:call-template name="dbfo-attribute">
+      <xsl:with-param name="pis"
+                      select="$pi.context/processing-instruction('dbfo')"/>
+      <xsl:with-param name="attribute" select="'linenumbering.width'"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <!-- Construct the 'in-context' values -->
+  <xsl:variable name="linenumbering.everyNth">
+    <xsl:choose>
+      <xsl:when test="$pi.linenumbering.everyNth != ''">
+        <xsl:value-of select="$pi.linenumbering.everyNth"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$global.linenumbering.everyNth"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:variable name="linenumbering.separator">
+    <xsl:choose>
+      <xsl:when test="$pi.linenumbering.separator != ''">
+        <xsl:value-of select="$pi.linenumbering.separator"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$global.linenumbering.separator"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:variable name="linenumbering.width">
+    <xsl:choose>
+      <xsl:when test="$pi.linenumbering.width != ''">
+        <xsl:value-of select="$pi.linenumbering.width"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$global.linenumbering.width"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:variable name="linenumbering.startinglinenumber">
+    <xsl:choose>
+      <xsl:when test="@startinglinenumber">
+        <xsl:value-of select="@startinglinenumber"/>
+      </xsl:when>
+      <xsl:when test="@continuation='continues'">
+        <xsl:variable name="lastLine">
+          <xsl:choose>
+            <xsl:when test="self::programlisting">
+              <xsl:call-template name="lastLineNumber">
+                <xsl:with-param name="listings"
+                     select="preceding::programlisting[@linenumbering='numbered']"/>
+              </xsl:call-template>
+            </xsl:when>
+            <xsl:when test="self::screen">
+              <xsl:call-template name="lastLineNumber">
+                <xsl:with-param name="listings"
+                     select="preceding::screen[@linenumbering='numbered']"/>
+              </xsl:call-template>
+            </xsl:when>
+            <xsl:when test="self::literallayout">
+              <xsl:call-template name="lastLineNumber">
+                <xsl:with-param name="listings"
+                     select="preceding::literallayout[@linenumbering='numbered']"/>
+              </xsl:call-template>
+            </xsl:when>
+            <xsl:when test="self::address">
+              <xsl:call-template name="lastLineNumber">
+                <xsl:with-param name="listings"
+                     select="preceding::address[@linenumbering='numbered']"/>
+              </xsl:call-template>
+            </xsl:when>
+            <xsl:when test="self::synopsis">
+              <xsl:call-template name="lastLineNumber">
+                <xsl:with-param name="listings"
+                     select="preceding::synopsis[@linenumbering='numbered']"/>
+              </xsl:call-template>
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:message>
+                <xsl:text>Unexpected verbatim environment: </xsl:text>
+                <xsl:value-of select="local-name(.)"/>
+              </xsl:message>
+              <xsl:value-of select="0"/>
+            </xsl:otherwise>
+          </xsl:choose>
+        </xsl:variable>
+
+        <xsl:value-of select="$lastLine + 1"/>
+      </xsl:when>
+      <xsl:otherwise>1</xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="function-available('sverb:numberLines')">
+      <xsl:copy-of select="sverb:numberLines($rtf)"/>
+    </xsl:when>
+    <xsl:when test="function-available('xverb:numberLines')">
+      <xsl:copy-of select="xverb:numberLines($rtf)"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:message terminate="yes">
+        <xsl:text>No numberLines function available.</xsl:text>
+      </xsl:message>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- ======================================================================== -->
+
+<xsl:template name="lastLineNumber">
+  <xsl:param name="listings"/>
+  <xsl:param name="number" select="0"/>
+
+  <xsl:variable name="lines">
+    <xsl:call-template name="countLines">
+      <xsl:with-param name="listing" select="string($listings[1])"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="not($listings)">
+      <xsl:value-of select="$number"/>
+    </xsl:when>
+    <xsl:when test="$listings[1]/@startinglinenumber">
+      <xsl:value-of select="$number + $listings[1]/@startinglinenumber + $lines - 1"/>
+    </xsl:when>
+    <xsl:when test="$listings[1]/@continuation='continues'">
+      <xsl:call-template name="lastLineNumber">
+        <xsl:with-param name="listings" select="listings[position() &gt; 1]"/>
+        <xsl:with-param name="number" select="$number + $lines"/>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:value-of select="$lines"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="countLines">
+  <xsl:param name="listing"/>
+  <xsl:param name="count" select="1"/>
+
+  <xsl:choose>
+    <xsl:when test="contains($listing, '&#10;')">
+      <xsl:call-template name="countLines">
+        <xsl:with-param name="listing" select="substring-after($listing, '&#10;')"/>
+        <xsl:with-param name="count" select="$count + 1"/>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:value-of select="$count"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/xep.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/xep.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/xep.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,146 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                xmlns:rx="http://www.renderx.com/XSL/Extensions"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: xep.xsl,v 1.1.1.1 2004/10/19 21:21:45 juntao Exp $
+     ********************************************************************
+     (c) Stephane Bline Peregrine Systems 2001
+     Implementation of xep extensions:
+       * Pdf bookmarks (based on the XEP 2.5 implementation)
+       * Document information (XEP 2.5 meta information extensions)
+     ******************************************************************** -->
+
+<!-- ********************************************************************
+     Document information
+     In PDF bookmarks can't be used characters with code>255. This version of file
+     translates characters with code>255 back to ASCII.
+
+        Pavel Zampach (zampach at volny.cz)
+
+     ********************************************************************-->
+
+<!-- FIXME: Norm, I changed things so that the top-level element (book or set)
+     does not appear in the TOC. Is this the right thing? -->
+
+<xsl:template name="xep-document-information">
+  <rx:meta-info>
+    <xsl:if test="//author[1]">
+      <xsl:element name="rx:meta-field">
+        <xsl:attribute name="name">author</xsl:attribute>
+        <xsl:attribute name="value">
+          <xsl:call-template name="person.name">
+            <xsl:with-param name="node" select="//author[1]"/>
+          </xsl:call-template>
+        </xsl:attribute>
+      </xsl:element>
+    </xsl:if>
+
+    <xsl:variable name="title">
+      <xsl:apply-templates select="/*[1]" mode="label.markup"/>
+      <xsl:apply-templates select="/*[1]" mode="title.markup"/>
+    </xsl:variable>
+
+    <xsl:element name="rx:meta-field">
+      <xsl:attribute name="name">title</xsl:attribute>
+      <xsl:attribute name="value">
+        <xsl:value-of select="$title"/>
+      </xsl:attribute>
+    </xsl:element>
+
+    <xsl:if test="//keyword">
+      <xsl:element name="rx:meta-field">
+        <xsl:attribute name="name">keywords</xsl:attribute>
+        <xsl:attribute name="value">
+          <xsl:for-each select="//keyword">
+            <xsl:value-of select="."/>
+            <xsl:if test="position() != last()">
+              <xsl:text>, </xsl:text>
+            </xsl:if>
+          </xsl:for-each>
+        </xsl:attribute>
+      </xsl:element>
+    </xsl:if>
+
+    <xsl:if test="//subjectterm">
+      <xsl:element name="rx:meta-field">
+        <xsl:attribute name="name">subject</xsl:attribute>
+        <xsl:attribute name="value">
+          <xsl:for-each select="//subjectterm">
+            <xsl:value-of select="."/>
+            <xsl:if test="position() != last()">
+              <xsl:text>, </xsl:text>
+            </xsl:if>
+          </xsl:for-each>
+        </xsl:attribute>
+      </xsl:element>
+    </xsl:if>
+  </rx:meta-info>
+</xsl:template>
+
+<!-- ********************************************************************
+     Pdf bookmarks
+     ******************************************************************** -->
+
+<xsl:template match="*" mode="xep.outline">
+  <xsl:apply-templates select="*" mode="xep.outline"/>
+</xsl:template>
+
+<xsl:template match="set|book|part|reference|preface|chapter|appendix|article
+                     |glossary|bibliography|index|setindex
+                     |refentry
+                     |sect1|sect2|sect3|sect4|sect5|section"
+              mode="xep.outline">
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+  <xsl:variable name="bookmark-label">
+    <xsl:apply-templates select="." mode="object.title.markup"/>
+  </xsl:variable>
+
+  <!-- Put the root element bookmark at the same level as its children -->
+  <!-- If the object is a set or book, generate a bookmark for the toc -->
+
+  <xsl:choose>
+    <xsl:when test="parent::*">
+      <rx:bookmark internal-destination="{$id}">
+        <rx:bookmark-label>
+          <xsl:value-of select="$bookmark-label"/>
+        </rx:bookmark-label>
+        <xsl:apply-templates select="*" mode="xep.outline"/>
+      </rx:bookmark>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:if test="$bookmark-label != ''">
+        <rx:bookmark internal-destination="{$id}">
+          <rx:bookmark-label>
+            <xsl:value-of select="$bookmark-label"/>
+          </rx:bookmark-label>
+        </rx:bookmark>
+      </xsl:if>
+
+      <xsl:variable name="toc.params">
+        <xsl:call-template name="find.path.params">
+          <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
+        </xsl:call-template>
+      </xsl:variable>
+      <xsl:if test="contains($toc.params, 'toc')
+                    and set|book|part|reference|section|sect1|refentry
+                        |article|bibliography|glossary|chapter
+                        |appendix">
+        <rx:bookmark internal-destination="toc...{$id}">
+          <rx:bookmark-label>
+            <xsl:call-template name="gentext">
+              <xsl:with-param name="key" select="'TableofContents'"/>
+            </xsl:call-template>
+          </rx:bookmark-label>
+        </rx:bookmark>
+      </xsl:if>
+      <xsl:apply-templates select="*" mode="xep.outline"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/xref.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/xref.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/fo/xref.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1012 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                xmlns:exsl="http://exslt.org/common"
+                exclude-result-prefixes="exsl"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: xref.xsl,v 1.1.1.1 2004/10/19 21:21:45 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- Create keys for quickly looking up olink targets -->
+<xsl:key name="targetdoc-key" match="document" use="@targetdoc" />
+<xsl:key name="targetptr-key"  match="div|obj"
+         use="concat(ancestor::document/@targetdoc, '/', @targetptr)" />
+
+<!-- ==================================================================== -->
+
+<xsl:template match="anchor">
+  <fo:wrapper id="{@id}"/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="xref" name="xref">
+  <xsl:variable name="targets" select="key('id', at linkend)"/>
+  <xsl:variable name="target" select="$targets[1]"/>
+  <xsl:variable name="refelem" select="local-name($target)"/>
+
+  <xsl:call-template name="check.id.unique">
+    <xsl:with-param name="linkend" select="@linkend"/>
+  </xsl:call-template>
+
+  <xsl:choose>
+    <xsl:when test="$refelem=''">
+      <xsl:message>
+        <xsl:text>XRef to nonexistent id: </xsl:text>
+        <xsl:value-of select="@linkend"/>
+      </xsl:message>
+      <xsl:text>???</xsl:text>
+    </xsl:when>
+
+    <xsl:when test="@endterm">
+      <fo:basic-link internal-destination="{@linkend}"
+                     xsl:use-attribute-sets="xref.properties">
+        <xsl:variable name="etargets" select="key('id', at endterm)"/>
+        <xsl:variable name="etarget" select="$etargets[1]"/>
+        <xsl:choose>
+          <xsl:when test="count($etarget) = 0">
+            <xsl:message>
+              <xsl:value-of select="count($etargets)"/>
+              <xsl:text>Endterm points to nonexistent ID: </xsl:text>
+              <xsl:value-of select="@endterm"/>
+            </xsl:message>
+            <xsl:text>???</xsl:text>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:apply-templates select="$etarget" mode="endterm"/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </fo:basic-link>
+    </xsl:when>
+
+    <xsl:when test="$target/@xreflabel">
+      <fo:basic-link internal-destination="{@linkend}"
+                     xsl:use-attribute-sets="xref.properties">
+        <xsl:call-template name="xref.xreflabel">
+          <xsl:with-param name="target" select="$target"/>
+        </xsl:call-template>
+      </fo:basic-link>
+    </xsl:when>
+
+    <xsl:otherwise>
+      <fo:basic-link internal-destination="{@linkend}"
+                     xsl:use-attribute-sets="xref.properties">
+        <xsl:apply-templates select="$target" mode="xref-to">
+          <xsl:with-param name="referrer" select="."/>
+          <xsl:with-param name="xrefstyle">
+            <xsl:choose>
+              <xsl:when test="@role and not(@xrefstyle) and $use.role.as.xrefstyle != 0">
+                <xsl:value-of select="@role"/>
+              </xsl:when>
+              <xsl:otherwise>
+                <xsl:value-of select="@xrefstyle"/>
+              </xsl:otherwise>
+            </xsl:choose>
+          </xsl:with-param>
+        </xsl:apply-templates>
+      </fo:basic-link>
+    </xsl:otherwise>
+  </xsl:choose>
+
+  <!-- Add standard page reference? -->
+  <xsl:if test="not(starts-with(normalize-space(@xrefstyle), 'select:') != '' 
+                and (contains(@xrefstyle, 'page')
+                     or contains(@xrefstyle, 'Page')))
+                and ( $insert.xref.page.number = 'yes' 
+		   or $insert.xref.page.number = '1')
+                or local-name($target) = 'para'">
+    <fo:basic-link internal-destination="{@linkend}"
+                   xsl:use-attribute-sets="xref.properties">
+      <xsl:apply-templates select="$target" mode="page.citation">
+        <xsl:with-param name="id" select="@linkend"/>
+      </xsl:apply-templates>
+    </fo:basic-link>
+  </xsl:if>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="*" mode="endterm">
+  <!-- Process the children of the endterm element -->
+  <xsl:variable name="endterm">
+    <xsl:apply-templates select="child::node()"/>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="function-available('exsl:node-set')">
+      <xsl:apply-templates select="exsl:node-set($endterm)" mode="remove-ids"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:copy-of select="$endterm"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="*" mode="remove-ids">
+  <xsl:copy>
+    <xsl:for-each select="@*">
+      <xsl:choose>
+        <xsl:when test="name(.) != 'id'">
+          <xsl:copy/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:message>removing <xsl:value-of select="name(.)"/></xsl:message>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:for-each>
+    <xsl:apply-templates mode="remove-ids"/>
+  </xsl:copy>
+</xsl:template>
+
+<!--- ==================================================================== -->
+
+<xsl:template match="*" mode="xref-to">
+  <xsl:param name="referrer"/>
+  <xsl:param name="xrefstyle"/>
+
+  <xsl:message>
+    <xsl:text>Don't know what gentext to create for xref to: "</xsl:text>
+    <xsl:value-of select="name(.)"/>
+    <xsl:text>"</xsl:text>
+  </xsl:message>
+  <xsl:text>???</xsl:text>
+</xsl:template>
+
+<xsl:template match="title" mode="xref-to">
+  <xsl:param name="referrer"/>
+  <xsl:param name="xrefstyle"/>
+
+  <!-- if you xref to a title, xref to the parent... -->
+  <xsl:choose>
+    <!-- FIXME: how reliable is this? -->
+    <xsl:when test="contains(local-name(parent::*), 'info')">
+      <xsl:apply-templates select="parent::*[2]" mode="xref-to">
+        <xsl:with-param name="referrer" select="$referrer"/>
+        <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+      </xsl:apply-templates>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:apply-templates select="parent::*" mode="xref-to">
+        <xsl:with-param name="referrer" select="$referrer"/>
+        <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+      </xsl:apply-templates>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="abstract|article|authorblurb|bibliodiv|bibliomset
+                     |biblioset|blockquote|calloutlist|caution|colophon
+                     |constraintdef|formalpara|glossdiv|important|indexdiv
+                     |itemizedlist|legalnotice|lot|msg|msgexplan|msgmain
+                     |msgrel|msgset|msgsub|note|orderedlist|partintro
+                     |productionset|qandadiv|refsynopsisdiv|segmentedlist
+                     |set|setindex|sidebar|tip|toc|variablelist|warning"
+              mode="xref-to">
+  <xsl:param name="referrer"/>
+  <xsl:param name="xrefstyle"/>
+
+  <!-- catch-all for things with (possibly optional) titles -->
+  <xsl:apply-templates select="." mode="object.xref.markup">
+    <xsl:with-param name="purpose" select="'xref'"/>
+    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+    <xsl:with-param name="referrer" select="$referrer"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="author|editor|othercredit|personname" mode="xref-to">
+  <xsl:param name="referrer"/>
+  <xsl:param name="xrefstyle"/>
+
+  <xsl:call-template name="person.name"/>
+</xsl:template>
+
+<xsl:template match="authorgroup" mode="xref-to">
+  <xsl:param name="referrer"/>
+  <xsl:param name="xrefstyle"/>
+
+  <xsl:call-template name="person.name.list"/>
+</xsl:template>
+
+<xsl:template match="figure|example|table|equation" mode="xref-to">
+  <xsl:param name="referrer"/>
+  <xsl:param name="xrefstyle"/>
+
+  <xsl:apply-templates select="." mode="object.xref.markup">
+    <xsl:with-param name="purpose" select="'xref'"/>
+    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+    <xsl:with-param name="referrer" select="$referrer"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="procedure" mode="xref-to">
+  <xsl:param name="referrer"/>
+  <xsl:param name="xrefstyle"/>
+
+  <xsl:apply-templates select="." mode="object.xref.markup">
+    <xsl:with-param name="purpose" select="'xref'"/>
+    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+    <xsl:with-param name="referrer" select="$referrer"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="cmdsynopsis" mode="xref-to">
+  <xsl:param name="referrer"/>
+  <xsl:param name="xrefstyle"/>
+
+  <xsl:apply-templates select="(.//command)[1]" mode="xref"/>
+</xsl:template>
+
+<xsl:template match="funcsynopsis" mode="xref-to">
+  <xsl:param name="referrer"/>
+  <xsl:param name="xrefstyle"/>
+
+  <xsl:apply-templates select="(.//function)[1]" mode="xref"/>
+</xsl:template>
+
+<xsl:template match="dedication|preface|chapter|appendix" mode="xref-to">
+  <xsl:param name="referrer"/>
+  <xsl:param name="xrefstyle"/>
+
+  <xsl:apply-templates select="." mode="object.xref.markup">
+    <xsl:with-param name="purpose" select="'xref'"/>
+    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+    <xsl:with-param name="referrer" select="$referrer"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="bibliography" mode="xref-to">
+  <xsl:param name="referrer"/>
+  <xsl:param name="xrefstyle"/>
+
+  <xsl:apply-templates select="." mode="object.xref.markup">
+    <xsl:with-param name="purpose" select="'xref'"/>
+    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+    <xsl:with-param name="referrer" select="$referrer"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="biblioentry|bibliomixed" mode="xref-to">
+  <xsl:param name="referrer"/>
+  <xsl:param name="xrefstyle"/>
+
+  <!-- handles both biblioentry and bibliomixed -->
+  <xsl:text>[</xsl:text>
+  <xsl:choose>
+    <xsl:when test="string(.) = ''">
+      <xsl:variable name="bib" select="document($bibliography.collection,.)"/>
+      <xsl:variable name="id" select="@id"/>
+      <xsl:variable name="entry" select="$bib/bibliography/*[@id=$id][1]"/>
+      <xsl:choose>
+        <xsl:when test="$entry">
+          <xsl:choose>
+            <xsl:when test="$bibliography.numbered != 0">
+              <xsl:number from="bibliography" count="biblioentry|bibliomixed"
+                          level="any" format="1"/>
+            </xsl:when>
+            <xsl:when test="local-name($entry/*[1]) = 'abbrev'">
+              <xsl:apply-templates select="$entry/*[1]"/>
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:value-of select="@id"/>
+            </xsl:otherwise>
+          </xsl:choose>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:message>
+            <xsl:text>No bibliography entry: </xsl:text>
+            <xsl:value-of select="$id"/>
+            <xsl:text> found in </xsl:text>
+            <xsl:value-of select="$bibliography.collection"/>
+          </xsl:message>
+          <xsl:value-of select="@id"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:choose>
+        <xsl:when test="$bibliography.numbered != 0">
+          <xsl:number from="bibliography" count="biblioentry|bibliomixed"
+                      level="any" format="1"/>
+        </xsl:when>
+        <xsl:when test="local-name(*[1]) = 'abbrev'">
+          <xsl:apply-templates select="*[1]"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="@id"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:otherwise>
+  </xsl:choose>
+  <xsl:text>]</xsl:text>
+</xsl:template>
+
+<xsl:template match="glossary" mode="xref-to">
+  <xsl:param name="referrer"/>
+  <xsl:param name="xrefstyle"/>
+
+  <xsl:apply-templates select="." mode="object.xref.markup">
+    <xsl:with-param name="purpose" select="'xref'"/>
+    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+    <xsl:with-param name="referrer" select="$referrer"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="glossentry" mode="xref-to">
+  <xsl:choose>
+    <xsl:when test="$glossentry.show.acronym = 'primary'">
+      <xsl:choose>
+        <xsl:when test="acronym|abbrev">
+          <xsl:apply-templates select="(acronym|abbrev)[1]"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:apply-templates select="glossterm[1]" mode="xref-to"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:apply-templates select="glossterm[1]" mode="xref-to"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="glossterm" mode="xref-to">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="index" mode="xref-to">
+  <xsl:param name="referrer"/>
+  <xsl:param name="xrefstyle"/>
+
+  <xsl:apply-templates select="." mode="object.xref.markup">
+    <xsl:with-param name="purpose" select="'xref'"/>
+    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+    <xsl:with-param name="referrer" select="$referrer"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="listitem" mode="xref-to">
+  <xsl:param name="referrer"/>
+  <xsl:param name="xrefstyle"/>
+
+  <xsl:apply-templates select="." mode="object.xref.markup">
+    <xsl:with-param name="purpose" select="'xref'"/>
+    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+    <xsl:with-param name="referrer" select="$referrer"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="section|simplesect
+                     |sect1|sect2|sect3|sect4|sect5
+                     |refsect1|refsect2|refsect3|refsection" mode="xref-to">
+  <xsl:param name="referrer"/>
+  <xsl:param name="xrefstyle"/>
+
+  <xsl:apply-templates select="." mode="object.xref.markup">
+    <xsl:with-param name="purpose" select="'xref'"/>
+    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+    <xsl:with-param name="referrer" select="$referrer"/>
+  </xsl:apply-templates>
+  <!-- What about "in Chapter X"? -->
+</xsl:template>
+
+<xsl:template match="bridgehead" mode="xref-to">
+  <xsl:param name="referrer"/>
+  <xsl:param name="xrefstyle"/>
+
+  <xsl:apply-templates select="." mode="object.xref.markup">
+    <xsl:with-param name="purpose" select="'xref'"/>
+    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+    <xsl:with-param name="referrer" select="$referrer"/>
+  </xsl:apply-templates>
+  <!-- What about "in Chapter X"? -->
+</xsl:template>
+
+<xsl:template match="qandaset" mode="xref-to">
+  <xsl:param name="referrer"/>
+  <xsl:param name="xrefstyle"/>
+
+  <xsl:apply-templates select="." mode="object.xref.markup">
+    <xsl:with-param name="purpose" select="'xref'"/>
+    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+    <xsl:with-param name="referrer" select="$referrer"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="qandadiv" mode="xref-to">
+  <xsl:param name="referrer"/>
+  <xsl:param name="xrefstyle"/>
+
+  <xsl:apply-templates select="." mode="object.xref.markup">
+    <xsl:with-param name="purpose" select="'xref'"/>
+    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+    <xsl:with-param name="referrer" select="$referrer"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="qandaentry" mode="xref-to">
+  <xsl:param name="referrer"/>
+  <xsl:param name="xrefstyle"/>
+
+  <xsl:apply-templates select="question[1]" mode="object.xref.markup">
+    <xsl:with-param name="purpose" select="'xref'"/>
+    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+    <xsl:with-param name="referrer" select="$referrer"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="question|answer" mode="xref-to">
+  <xsl:param name="referrer"/>
+  <xsl:param name="xrefstyle"/>
+
+  <xsl:apply-templates select="." mode="object.xref.markup">
+    <xsl:with-param name="purpose" select="'xref'"/>
+    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+    <xsl:with-param name="referrer" select="$referrer"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="part|reference" mode="xref-to">
+  <xsl:param name="referrer"/>
+  <xsl:param name="xrefstyle"/>
+
+  <xsl:apply-templates select="." mode="object.xref.markup">
+    <xsl:with-param name="purpose" select="'xref'"/>
+    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+    <xsl:with-param name="referrer" select="$referrer"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="refentry" mode="xref-to">
+  <xsl:param name="referrer"/>
+  <xsl:param name="xrefstyle"/>
+
+  <xsl:choose>
+    <xsl:when test="refmeta/refentrytitle">
+      <xsl:apply-templates select="refmeta/refentrytitle"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:apply-templates select="refnamediv/refname[1]"/>
+    </xsl:otherwise>
+  </xsl:choose>
+  <xsl:apply-templates select="refmeta/manvolnum"/>
+</xsl:template>
+
+<xsl:template match="refnamediv" mode="xref-to">
+  <xsl:param name="referrer"/>
+  <xsl:param name="xrefstyle"/>
+
+  <xsl:apply-templates select="refname[1]" mode="xref-to">
+    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+    <xsl:with-param name="referrer" select="$referrer"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="refname" mode="xref-to">
+  <xsl:param name="referrer"/>
+  <xsl:param name="xrefstyle"/>
+
+  <xsl:apply-templates mode="xref-to">
+    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+    <xsl:with-param name="referrer" select="$referrer"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="step" mode="xref-to">
+  <xsl:param name="referrer"/>
+  <xsl:param name="xrefstyle"/>
+
+  <xsl:call-template name="gentext">
+    <xsl:with-param name="key" select="'Step'"/>
+  </xsl:call-template>
+  <xsl:text> </xsl:text>
+  <xsl:apply-templates select="." mode="number"/>
+</xsl:template>
+
+<xsl:template match="varlistentry" mode="xref-to">
+  <xsl:param name="referrer"/>
+  <xsl:param name="xrefstyle"/>
+
+  <xsl:apply-templates select="term[1]" mode="xref-to">
+    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+    <xsl:with-param name="referrer" select="$referrer"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="varlistentry/term" mode="xref-to">
+  <!-- to avoid the comma that will be generated if there are several terms -->
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="co" mode="xref-to">
+  <xsl:param name="referrer"/>
+  <xsl:param name="xrefstyle"/>
+
+  <xsl:apply-templates select="." mode="callout-bug"/>
+</xsl:template>
+
+<xsl:template match="book" mode="xref-to">
+  <xsl:param name="referrer"/>
+  <xsl:param name="xrefstyle"/>
+
+  <xsl:apply-templates select="." mode="object.xref.markup">
+    <xsl:with-param name="purpose" select="'xref'"/>
+    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+    <xsl:with-param name="referrer" select="$referrer"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="para" mode="xref-to">
+  <xsl:param name="referrer"/>
+  <xsl:param name="xrefstyle"/>
+
+  <xsl:variable name="context" select="(ancestor::simplesect
+                                       |ancestor::section
+                                       |ancestor::sect1
+                                       |ancestor::sect2
+                                       |ancestor::sect3
+                                       |ancestor::sect4
+                                       |ancestor::sect5
+                                       |ancestor::refsection
+                                       |ancestor::refsect1
+                                       |ancestor::refsect2
+                                       |ancestor::refsect3
+                                       |ancestor::chapter
+                                       |ancestor::appendix
+                                       |ancestor::preface
+                                       |ancestor::partintro
+                                       |ancestor::dedication
+                                       |ancestor::colophon
+                                       |ancestor::bibliography
+                                       |ancestor::index
+                                       |ancestor::glossary
+                                       |ancestor::glossentry
+                                       |ancestor::listitem
+                                       |ancestor::varlistentry)[last()]"/>
+
+  <xsl:apply-templates select="$context" mode="xref-to"/>
+<!--
+  <xsl:apply-templates select="." mode="object.xref.markup">
+    <xsl:with-param name="purpose" select="'xref'"/>
+    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+    <xsl:with-param name="referrer" select="$referrer"/>
+  </xsl:apply-templates>
+-->
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="link" name="link">
+  <xsl:variable name="targets" select="key('id', at linkend)"/>
+  <xsl:variable name="target" select="$targets[1]"/>
+
+  <xsl:call-template name="check.id.unique">
+    <xsl:with-param name="linkend" select="@linkend"/>
+  </xsl:call-template>
+
+  <fo:basic-link internal-destination="{@linkend}"
+                 xsl:use-attribute-sets="xref.properties">
+    <xsl:choose>
+      <xsl:when test="count(child::node()) &gt; 0">
+        <!-- If it has content, use it -->
+        <xsl:apply-templates/>
+      </xsl:when>
+      <xsl:otherwise>
+        <!-- else look for an endterm -->
+        <xsl:choose>
+          <xsl:when test="@endterm">
+            <xsl:variable name="etargets" select="key('id', at endterm)"/>
+            <xsl:variable name="etarget" select="$etargets[1]"/>
+            <xsl:choose>
+              <xsl:when test="count($etarget) = 0">
+                <xsl:message>
+                  <xsl:value-of select="count($etargets)"/>
+                  <xsl:text>Endterm points to nonexistent ID: </xsl:text>
+                  <xsl:value-of select="@endterm"/>
+                </xsl:message>
+                <xsl:text>???</xsl:text>
+              </xsl:when>
+              <xsl:otherwise>
+                  <xsl:apply-templates select="$etarget" mode="endterm"/>
+              </xsl:otherwise>
+            </xsl:choose>
+          </xsl:when>
+
+          <xsl:otherwise>
+            <xsl:message>
+              <xsl:text>Link element has no content and no Endterm. </xsl:text>
+              <xsl:text>Nothing to show in the link to </xsl:text>
+              <xsl:value-of select="$target"/>
+            </xsl:message>
+            <xsl:text>???</xsl:text>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:otherwise>
+    </xsl:choose>
+  </fo:basic-link>
+</xsl:template>
+
+<xsl:template match="ulink" name="ulink">
+  <fo:basic-link xsl:use-attribute-sets="xref.properties">
+    <xsl:attribute name="external-destination">
+      <xsl:call-template name="fo-external-image">
+        <xsl:with-param name="filename" select="@url"/>
+      </xsl:call-template>
+    </xsl:attribute>
+
+    <xsl:choose>
+      <xsl:when test="count(child::node())=0">
+        <xsl:call-template name="hyphenate-url">
+          <xsl:with-param name="url" select="@url"/>
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:apply-templates/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </fo:basic-link>
+
+  <xsl:if test="count(child::node()) != 0
+                and string(.) != @url
+                and $ulink.show != 0">
+    <!-- yes, show the URI -->
+    <xsl:choose>
+      <xsl:when test="$ulink.footnotes != 0 and not(ancestor::footnote)">
+	<xsl:text>&#xA0;</xsl:text>
+        <fo:footnote>
+          <xsl:call-template name="ulink.footnote.number"/>
+          <fo:footnote-body font-family="{$body.fontset}"
+                            font-size="{$footnote.font.size}">
+            <fo:block>
+              <xsl:call-template name="ulink.footnote.number"/>
+              <xsl:text> </xsl:text>
+              <fo:inline>
+                <xsl:value-of select="@url"/>
+              </fo:inline>
+            </fo:block>
+          </fo:footnote-body>
+        </fo:footnote>
+      </xsl:when>
+      <xsl:otherwise>
+        <fo:inline hyphenate="false">
+          <xsl:text> [</xsl:text>
+          <xsl:call-template name="hyphenate-url">
+            <xsl:with-param name="url" select="@url"/>
+          </xsl:call-template>
+          <xsl:text>]</xsl:text>
+        </fo:inline>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template name="ulink.footnote.number">
+  <fo:inline font-size="90%">
+    <!-- FIXME: this isn't going to be perfect! -->
+    <xsl:text>[</xsl:text>
+    <xsl:number level="any"
+                from="chapter|appendix|preface|article|refentry"
+                format="{$ulink.footnote.number.format}"/>
+    <xsl:text>]</xsl:text>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template name="hyphenate-url">
+  <xsl:param name="url" select="''"/>
+  <xsl:choose>
+    <xsl:when test="$ulink.hyphenate = ''">
+      <xsl:value-of select="$url"/>
+    </xsl:when>
+    <xsl:when test="contains($url, '/')">
+      <xsl:value-of select="substring-before($url, '/')"/>
+      <xsl:text>/</xsl:text>
+      <xsl:copy-of select="$ulink.hyphenate"/>
+      <xsl:call-template name="hyphenate-url">
+        <xsl:with-param name="url" select="substring-after($url, '/')"/>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:value-of select="$url"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+
+<xsl:template match="olink">
+  <xsl:param name="target.database"
+      select="document($target.database.document, /)"/>
+
+  <xsl:variable name="localinfo" select="@localinfo"/>
+
+  <!-- Olink that points to internal id can be a link -->
+  <xsl:variable name="linkend">
+    <xsl:choose>
+      <xsl:when test="@targetdoc and not(@targetptr)" >
+        <xsl:message>Olink missing @targetptr attribute value</xsl:message>
+      </xsl:when>
+      <xsl:when test="not(@targetdoc) and @targetptr" >
+        <xsl:message>Olink missing @targetdoc attribute value</xsl:message>
+      </xsl:when>
+      <xsl:when test="@targetdoc and @targetptr">
+        <xsl:if test="$current.docid = @targetdoc">
+          <xsl:if test="id(@targetptr)">
+            <xsl:value-of select="@targetptr"/>
+          </xsl:if>
+        </xsl:if>
+      </xsl:when>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="$linkend != ''">
+      <fo:basic-link internal-destination="{$linkend}"
+                   xsl:use-attribute-sets="xref.properties">
+        <xsl:call-template name="olink.hottext">
+          <xsl:with-param name="target.database" select="$target.database"/>
+        </xsl:call-template>
+      </fo:basic-link>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:call-template name="olink.hottext">
+        <xsl:with-param name="target.database" select="$target.database"/>
+      </xsl:call-template>
+
+      <!-- Append other document title if appropriate -->
+      <xsl:if test="@targetdoc and @targetptr and $olink.doctitle != 0
+                  and $current.docid != '' and $current.docid != @targetdoc">
+        <xsl:variable name="doctitle">
+          <xsl:variable name="seek.targetdoc" select="@targetdoc"/>
+          <xsl:for-each select="$target.database" >
+            <xsl:value-of select="key('targetdoc-key', $seek.targetdoc)/div[1]/ttl" />
+          </xsl:for-each>
+        </xsl:variable>
+        <xsl:if test="$doctitle != ''">
+          <xsl:text> (</xsl:text><xsl:value-of select="$doctitle"/><xsl:text>)</xsl:text>
+        </xsl:if>
+      </xsl:if>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+
+<xsl:template name="olink.hottext">
+  <xsl:param name="target.database"/>
+
+  <xsl:choose>
+    <!-- If it has elements or text (not just PI or comment) -->
+    <xsl:when test="child::text() or child::*">
+      <xsl:apply-templates/>
+    </xsl:when>
+    <xsl:when test="@targetdoc and @targetptr">
+      <!-- Get the xref text for this record -->
+      <xsl:variable name="seek.targetdoc" select="@targetdoc"/>
+      <xsl:variable name="seek.targetptr" select="@targetptr"/>
+      <xsl:variable name="xref.text" >
+        <xsl:for-each select="$target.database" >
+          <xsl:value-of select="key('targetptr-key', concat($seek.targetdoc, '/', $seek.targetptr))/xreftext"/>
+        </xsl:for-each>
+      </xsl:variable>
+
+      <xsl:choose>
+        <xsl:when test="$use.local.olink.style != 0">
+          <!-- Get the element name and lang for this targetptr -->
+          <xsl:variable name="element" >
+            <xsl:for-each select="$target.database" >
+              <xsl:value-of select="key('targetptr-key', concat($seek.targetdoc, '/', $seek.targetptr))/@element"/>
+            </xsl:for-each>
+          </xsl:variable>
+
+          <xsl:variable name="lang">
+            <xsl:variable name="candidate">
+              <xsl:for-each select="$target.database" >
+                <xsl:value-of select="key('targetptr-key', concat($seek.targetdoc, '/', $seek.targetptr))/@lang"/>
+              </xsl:for-each>
+            </xsl:variable>
+            <xsl:choose>
+              <xsl:when test="$candidate != ''">
+                <xsl:value-of select="$candidate"/>
+              </xsl:when>
+              <xsl:otherwise>
+                <xsl:value-of select="'en'"/>
+              </xsl:otherwise>
+            </xsl:choose>
+          </xsl:variable>
+          <xsl:variable name="template">
+            <xsl:call-template name="gentext.template">
+              <xsl:with-param name="context" select="'title'"/>
+              <xsl:with-param name="name" select="$element"/>
+              <xsl:with-param name="lang" select="$lang"/>
+            </xsl:call-template>
+          </xsl:variable>
+          <xsl:call-template name="substitute-markup">
+            <xsl:with-param name="template" select="$template"/>
+            <xsl:with-param name="title">
+              <xsl:for-each select="$target.database" >
+                <xsl:value-of select="key('targetptr-key', concat($seek.targetdoc, '/', $seek.targetptr))/ttl"/>
+              </xsl:for-each>
+            </xsl:with-param>
+            <xsl:with-param name="label">
+              <xsl:for-each select="$target.database" >
+                <xsl:value-of select="key('targetptr-key', concat($seek.targetdoc, '/', $seek.targetptr))/@number"/>
+              </xsl:for-each>
+            </xsl:with-param>
+          </xsl:call-template>
+        </xsl:when>
+        <xsl:when test="$xref.text !=''">
+          <xsl:value-of select="$xref.text"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:message>Olink error: no generated text for targetdoc/targetptr = <xsl:value-of select="@targetdoc"/>/<xsl:value-of select="@targetptr"/></xsl:message>
+          <xsl:text>????</xsl:text>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:text>????</xsl:text>
+<!--
+      <xsl:call-template name="olink.outline">
+        <xsl:with-param name="outline.base.uri"
+                        select="unparsed-entity-uri(@targetdocent)"/>
+        <xsl:with-param name="localinfo" select="@localinfo"/>
+        <xsl:with-param name="return" select="'xreftext'"/>
+      </xsl:call-template>
+-->
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="olink.outline">
+  <xsl:message terminate="yes">Fatal error: what is this supposed to do?</xsl:message>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="title.xref">
+  <xsl:param name="target" select="."/>
+  <xsl:choose>
+    <xsl:when test="local-name($target) = 'figure'
+                    or local-name($target) = 'example'
+                    or local-name($target) = 'equation'
+                    or local-name($target) = 'table'
+                    or local-name($target) = 'dedication'
+                    or local-name($target) = 'preface'
+                    or local-name($target) = 'bibliography'
+                    or local-name($target) = 'glossary'
+                    or local-name($target) = 'index'
+                    or local-name($target) = 'setindex'
+                    or local-name($target) = 'colophon'">
+      <xsl:call-template name="gentext.startquote"/>
+      <xsl:apply-templates select="$target" mode="title.markup"/>
+      <xsl:call-template name="gentext.endquote"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <fo:inline font-style="italic">
+        <xsl:apply-templates select="$target" mode="title.markup"/>
+      </fo:inline>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="number.xref">
+  <xsl:param name="target" select="."/>
+  <xsl:apply-templates select="$target" mode="label.markup"/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="xref.xreflabel">
+  <!-- called to process an xreflabel...you might use this to make  -->
+  <!-- xreflabels come out in the right font for different targets, -->
+  <!-- for example. -->
+  <xsl:param name="target" select="."/>
+  <xsl:value-of select="$target/@xreflabel"/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="title" mode="xref">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="command" mode="xref">
+  <xsl:call-template name="inline.boldseq"/>
+</xsl:template>
+
+<xsl:template match="function" mode="xref">
+  <xsl:call-template name="inline.monoseq"/>
+</xsl:template>
+
+<xsl:template match="*" mode="page.citation">
+  <xsl:param name="id" select="'???'"/>
+
+  <fo:inline keep-together.within-line="always">
+    <xsl:call-template name="substitute-markup">
+      <xsl:with-param name="template">
+        <xsl:call-template name="gentext.template">
+          <xsl:with-param name="name" select="'page.citation'"/>
+          <xsl:with-param name="context" select="'xref'"/>
+        </xsl:call-template>
+      </xsl:with-param>
+    </xsl:call-template>
+  </fo:inline>
+</xsl:template>
+
+<xsl:template match="*" mode="pagenumber.markup">
+  <fo:page-number-citation ref-id="{@id}"/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="*" mode="insert.title.markup">
+  <xsl:param name="purpose"/>
+  <xsl:param name="xrefstyle"/>
+  <xsl:param name="title"/>
+
+  <xsl:choose>
+    <!-- FIXME: what about the case where titleabbrev is inside the info? -->
+    <xsl:when test="$purpose = 'xref' and titleabbrev">
+      <xsl:apply-templates select="." mode="titleabbrev.markup"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:copy-of select="$title"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="chapter|appendix" mode="insert.title.markup">
+  <xsl:param name="purpose"/>
+  <xsl:param name="xrefstyle"/>
+  <xsl:param name="title"/>
+
+  <xsl:choose>
+    <xsl:when test="$purpose = 'xref'">
+      <fo:inline font-style="italic">
+        <xsl:copy-of select="$title"/>
+      </fo:inline>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:copy-of select="$title"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="*" mode="insert.subtitle.markup">
+  <xsl:param name="purpose"/>
+  <xsl:param name="xrefstyle"/>
+  <xsl:param name="subtitle"/>
+
+  <xsl:copy-of select="$subtitle"/>
+</xsl:template>
+
+<xsl:template match="*" mode="insert.label.markup">
+  <xsl:param name="purpose"/>
+  <xsl:param name="xrefstyle"/>
+  <xsl:param name="label"/>
+
+  <xsl:copy-of select="$label"/>
+</xsl:template>
+
+<xsl:template match="*" mode="insert.pagenumber.markup">
+  <xsl:param name="purpose"/>
+  <xsl:param name="xrefstyle"/>
+  <xsl:param name="pagenumber"/>
+
+  <xsl:copy-of select="$pagenumber"/>
+</xsl:template>
+
+<xsl:template match="*" mode="insert.direction.markup">
+  <xsl:param name="purpose"/>
+  <xsl:param name="xrefstyle"/>
+  <xsl:param name="direction"/>
+
+  <xsl:copy-of select="$direction"/>
+</xsl:template>
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/ChangeLog
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/ChangeLog	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/ChangeLog	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1854 @@
+2004-02-13  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* biblio.xsl, glossary.xsl, index.xsl: Removed obsolete component.title.mode templates.
+
+2004-01-29  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* autotoc.xsl: Use titleabbrev in ToC
+
+	* biblio.xsl: Support info in bibliography mode; support personblurb as an alternative to authorblurb
+
+	* component.xsl: Support 'info'
+
+	* docbook.xsl: Support DocBook NG by way of the following hack: if we find an NG document, do an identity transform to throw away the NG namespace and then process the result. Requires exsl:node-set().
+
+	* docbookng.xsl: New file.
+
+	* inline.xsl: Support 'tag' as a synonym for 'sgmltag'
+
+	* lists.xsl: Make simpara in callout magic; don't output a p inside the li. Sigh.
+
+	* table.xsl: Support bgcolor and class dbhtml PIs on table rows
+
+	* titlepage.xsl: Support personblurb as a synonym for authorblurb
+
+	* xref.xsl: Support xref to personblurb the same way as authorblurb
+
+2004-01-08  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* biblio.xsl: Initial support for bibliolist
+
+	* table.xsl: Abort if there's no @cols
+
+2003-12-31  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* autoidx-ng.xsl: New file.
+
+2003-12-30  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* biblio.xsl, xref.xsl: Changed document($bibliography.collection)
+	to document($bibliography.collection,.) so it will
+	look in the current directory instead of
+	the stylesheet directory.
+
+	* graphics.xsl: Fixed test for graphic inside inlineequation.
+
+	* xref.xsl: Added refsection to mode="xref-to" to support xref to refsection.
+
+2003-12-15  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* chunk-common.xsl: Fix ugly performance problem in footer.navigation (thanks again Guillaume du Bourguet)
+
+2003-12-12  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* inline.xsl: Fix bug [ 841586 ] id-attibute in firstterm prohibits link to glossary.
+
+2003-12-09  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* autotoc.xsl: Omit setindex from TOC if $generate.index = 0
+
+2003-12-05  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* table.xsl: Now colwidth="*" treated as colwidth="1*" for tablecolumns extension.
+
+2003-12-01  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* lists.xsl: Processing of listitems now processes and preserves order of comments and PIs.
+
+2003-11-30  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* autoidx.xsl, changebars.xsl, chunk-code.xsl, chunk-common.xsl, chunk.xsl, chunker.xsl, chunkfast.xsl, chunktoc.xsl, html-rtf.xsl, htmltbl.xsl, maketoc.xsl, manifest.xsl, oldchunker.xsl, onechunk.xsl, profile-chunk.xsl, profile-onechunk.xsl, task.xsl: 
+	Added CVS $Id: ChangeLog,v 1.1.1.1 2004/10/19 21:21:46 juntao Exp $ comments.
+
+2003-11-29  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* Makefile.param, param.ent, param.xweb: Added new HTML Help parameters from patches by W. Borgert
+
+2003-11-25  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* chunk-common.xsl: Experimental fix for some xref linking issues in cases where dbhtml 'dir' is used.
+
+2003-11-24  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* chunk-common.xsl: Fix ugly performance problem with chunking (thanks Guillaume du Bourguet)
+
+	* glossary.xsl: Fix bugs in formatting of glosslist
+
+2003-11-23  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* inline.xsl: Support code inline
+
+2003-11-02  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* chunk-common.xsl: Moved call to user.head.content to just before </head>
+	to give the user the last word.
+
+2003-10-23  <uid50791 at users.sourceforge.net>
+
+	* chunk-code.xsl: Remove index from Next and Previous when
+	$generate.index = 0.
+
+2003-10-03  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* lists.xsl: Support stepalternatives
+
+2003-09-28  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* index.xsl: Handle indexdiv/title properly
+
+	* lists.xsl: Bug #779655: fix PIs and comments in segmented lists
+
+2003-09-27  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* block.xsl, qandaset.xsl: Bug #687783: attempt rudimentary support for blockinfo
+
+2003-09-23  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* Makefile.param, html.xsl, manifest.xsl, param.ent, param.xweb: 
+	Added new parameter manifest.in.base.dir which can be used to place manifest file and also project files for HTML Help and Eclipse Help into base.dir. This improvement also fixes bug (feature) #662955.
+
+2003-08-29  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* autotoc.xsl: Fixed bug in new toc.line template.
+
+	* chunker.xsl: No change, just new timestamp so html2xhtml.xsl will
+	update it when generate the xhtml version.
+
+2003-08-29  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* inline.xsl: Rudimentary support for @dir
+
+2003-08-27  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* docbook.xsl, formal.xsl, htmltbl.xsl, table.xsl: Reorganize code for consistency with FO; check for obviously broken tables
+
+	* docbook.xsl, task.xsl: Support task
+
+	* formal.xsl, table.xsl: Support HTML tables
+
+	* inline.xsl: Support uri
+
+	* verbatim.xsl: Support startinglinenumber and continuation on verbatim environments
+
+2003-08-07  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* callout.xsl: Fixed callout numbering bug when <co> inside an inline.
+
+2003-08-04  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* qandaset.xsl: Fixed logic for turning on qandaset/qandadiv TOCs with
+	generate.toc param or dbhtml toc PI.
+
+2003-08-01  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* titlepage.xsl: Moved email in "author" template to appear after the
+	affiliation.
+
+2003-07-31  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* Makefile.param, param.xweb: Added missing parameter
+
+2003-07-31  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* qandaset.xsl: Fixed extraneous dot when defaultlabel=qanda.
+
+	* qandaset.xsl: Removed extraneous dot from question in autotoc mode as well
+	when defaultlabel=qanda.
+
+2003-07-25  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* param.ent: Added insert.xref.page.number with value of zero to
+	ensure that xrefstyle attributes don't try to generate
+	a page number reference for HTML output.  This parameter
+	does not show up in the HTML doc because it is not
+	to be changed.
+
+	* param.ent, param.xweb: Added xref.label-title.separator, xref.label-page.separator,
+	and xref.title-page.separator parameters to support the
+	xrefstyle select: feature.
+
+2003-07-22  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* Makefile.param, param.ent, param.xweb: Added support for Eclipse Help Platform
+
+	* html.xsl: Moving template to place where it can be reused
+
+2003-07-21  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* autotoc.xsl: Added a toc.line template to handle formatting of each
+	line in a TOC, similar to that in the FO side.
+	Makes customizing HTML toc easier.
+
+2003-07-17  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* graphics.xsl: Image depth calculation was using nominal.image.width
+	when it should have been using nominal.image.depth.
+
+2003-07-10  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* lists.xsl: Added no-op templates for list titleabbrev elements.
+
+2003-07-08  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* maketoc.xsl: Handle refentry with mode="toc" here since refentry mode="toc"
+	in autotoc.xsl does not use subtoc. This fixes bug #743612.
+
+2003-06-25  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* block.xsl: Process formalpara/title to variable so can test for last
+	char of any generated text.
+
+2003-06-23  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* refentry.xsl: Added param conditional="0" to call to 'anchor' template
+	for refsections, so those sections are
+	valid targets for indexterm links as expected by autoidx.xsl.
+
+2003-06-23  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* titlepage.xsl: DocBook 4.2 allows e-mail address inside author element and now is this feature supported also by stylesheets. Not sure whether this solution is the best, but it works.
+
+2003-06-22  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* docbook.xsl, param.ent, param.xweb: Added draft.mode parameter.
+
+	* graphics.xsl: Fix bug #733406: ignore.image.scaling misses contentwidth.
+
+2003-06-22  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* param.xweb: Added fragment for draft.mode
+
+2003-06-21  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* block.xsl: Make attribution a div not a span
+
+	* chunk-code.xsl: Test part/glossary for chunking
+
+	* html-rtf.xsl: Added remove-empty-div mode
+
+2003-06-19  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* autotoc.xsl: Fixed bug 743752 where generate.index=0 and empty index
+	left a dead Index link in the TOC.
+
+	* biblio.xsl: Removed duplicate templates for biblioid.
+
+	* onechunk.xsl, profile-onechunk.xsl: Reset suppress.navigation parameter to 1 to turn off useless nav headers.
+
+2003-05-28  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* sections.xsl: Fixed bridgehead renderas levels to match section level.
+	This was missed when the section levels were corrected
+	a couple of releases back.
+
+2003-05-18  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* .cvsignore: Ignore profile-chunk-code.xsl
+
+2003-05-12  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* Makefile, Makefile.param, profile-chunk.xsl, profile-onechunk.xsl: 
+	Fixed profiling to work with modified chunking code
+
+2003-05-08  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* autotoc.xsl: Support glossary, bibliography, and index in components
+
+	* block.xsl: Use a div for the attribution so that it can be styled better with CSS
+
+	* chunk-code.xsl, chunk.xsl: Refactored chunking code so that customization of chunk algorithm and chunk elements is more practical
+
+	* param.xweb: Added fragref for admon.textlabel
+
+2003-05-07  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* admon.xsl: admon.textlabel turned off still outputs a note's title child.
+
+	* admon.xsl: Added admon.textlabel parameter to enable turning off
+	the text label such as Note, Warning.
+
+	* param.ent, param.xweb: Fixed name bug in admon.textlabel.
+
+2003-04-14  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* Makefile.param, docbook.xsl: Initial support for timestamp PI. From now you can use <?timestamp format="Y-m-d H:M:S"?> to get current datetime in your document. More features like localization and exctracting date from CVS tag will follow.
+
+2003-04-13  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* table.xsl: A few bug fixes for the colsep/rowsep code
+
+2003-04-12  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* callout.xsl: Support coref
+
+	* ebnf.xsl: Support ebnf.assignment and ebnf.statement.terminator
+
+	* graphics.xsl: Support textobject/phrase on inlinemediaobject
+
+	* inline.xsl: Support beginpage (does nothing; see TDG)
+
+	* lists.xsl: Support 'start' PI on ordered lists
+
+	* param.ent, param.xweb: Added ebnf.assignment and ebnf.statement.terminator
+
+	* table.xsl: Support bgcolor (instead of entry-bgcolor) PI in table cells; make sure rowsep and colsep don't have any effect on the last row or column
+
+2003-03-26  Michael Smith <xmldoc at users.sourceforge.net>
+
+	* Makefile: wdocbook.xsl obsoleted by w2docbook.xsl, updated globally
+
+2003-03-25  Michael Smith <xmldoc at users.sourceforge.net>
+
+	* Makefile: reverting wdocbook.xsl -> w2docbook.xsl changes
+
+2003-03-24  Michael Smith <xmldoc at users.sourceforge.net>
+
+	* Makefile: wrong filename '../../litprog/wdocbook.xsl' broke build, fixed
+
+2003-03-20  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* docbook.xsl: Added } to background-image css
+
+2003-02-28  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* glossary.xsl: Added warning when $glossary.collection is not blank, but
+	it cannot open the specified file.
+
+2003-02-26  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* qandaset.xsl: Fixed test of $toc PI to turn on qandaset TOC.
+
+2003-02-21  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* sections.xsl: Added process.chunk.footnotes to sect2 through 5
+	to fix bug of missing footnotes when chunk level
+	greater than 1.
+
+2003-02-17  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* sections.xsl: Support subtitle class on section headings (for subtitles, naturally)
+
+2003-02-08  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* glossary.xsl: Fixed bug in glossary.xsl where glosssee and glossseealso were
+	using mode="xref" instead of mode="xref-to".
+
+2003-02-07  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* Makefile.param, autotoc.xsl, param.ent, param.xweb: Added paramater toc.max.depth which controls maximal depth of ToC as requested by PHP-DOC group.
+
+2003-02-04  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* lists.xsl: Added support for elements between variablelist and first
+	varlistentry since DocBook 4.2 supports that now.
+
+	* lists.xsl: Exempted titleabbrev from preamble processing in lists,
+	and fixed variablelist preamble code to use the same syntax
+	as the other lists.
+
+2003-01-30  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* qandaset.xsl: Corrected several references to parameter $qanda.defaultlabel
+	that were missing the "$".
+
+2003-01-28  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* inline.xsl: Check for glossterm.auto.link when linking firstterms; don't output gl. prefix on glossterm links
+
+2003-01-22  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* graphics.xsl: Fix bugs in presentation of graphic width/height
+
+	* inline.xsl: Add class attributes to inline elements
+
+	* xref.xsl: Format chapter and appendix titles consistently in xrefs
+
+2003-01-20  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* autoidx.xsl: Bug #663331: add article to section entity
+
+	* biblio.xsl: Bug #640762: Support new biblioentry elements
+
+	* chunk-common.xsl: Bug #648473: don't output the html.ext when using dbhtml filenames
+
+	* footnote.xsl: Support {table.}footnote.number.{format,symbols}
+
+	* glossary.xsl: Support glossentry.show.acronym
+
+	* param.ent, param.xweb: Support xref.with.number.and.title
+
+	* param.ent, param.xweb: Added {table.}footnote.number.{format,symbols}, entry.propagates.style, and glossentry.show.acronym
+
+	* sections.xsl: Don't force a ToC for refentrys
+
+	* table.xsl: Support entry.propagates.style
+
+	* titlepage.templates.xml: SIGNIFICANT changes to the titlepage template setup. See RELEASE-NOTES.
+
+	* xref.xsl: Handle xref to glossentry
+
+2003-01-17  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* lists.xsl: Output ul list type only if css.decoration is non-zero
+
+	* xref.xsl: Remove duplicated IDs when endterm is used on xref
+
+2003-01-12  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* autoidx.xsl: Make sure that indexdivs are properly scoped. I've done this by adding a test to suppress the division if it contains no terms. It seems like there might be a better way, but I can't see it just at the moment
+
+2003-01-08  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* xref.xsl: In olink, use document($target.database.document, /) so the
+	olink database location is relative to the document, not
+	the stylesheet.
+
+2003-01-06  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* autoidx.xsl, index.xsl: Removed unnecessary generate-index-from-terms template in
+	favor of generate-index with scope parameter.
+
+2003-01-02  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* autoidx.xsl, index.xsl: Rework indexing to avoid XSLT limitation/Saxon bug with context dependencies; finish porting Bob's changes from FO to HTML
+
+	* index.xsl, titlepage.templates.xml, titlepage.xsl: Support setindex (there were all sorts of things wrong with it)
+
+2003-01-01  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* autoidx.xsl, index.xsl: Make index elements always index the book that contains them (if there is one, otherwise the whole document); setindex always indexes the whole document
+
+	* autotoc.xsl: Support List of Procedures
+
+	* formal.xsl, xref.xsl: Use titleabbrev instead of title in xrefs
+
+	* graphics.xsl: Support ignore.image.scaling parameter; fix bug where 'center' is output for align on img
+
+	* param.ent, param.xweb: New parameters
+
+	* sections.xsl: Don't output section IDs twice when formatting subtitles
+
+2002-12-31  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* callout.xsl: Whitespace
+
+	* graphics.xsl: Support alt text on mediaobjectco
+
+	* inline.xsl: Make lineannotations italic
+
+2002-12-28  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* xref.xsl: Now that xrefstyle is official; make it take priority even when use.role.as.xrefstyle is non-zero.
+
+	* xref.xsl: Make endterm on xref higher priority than xreflabel on the target
+
+2002-12-18  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* autoidx.xsl: Sorts were being done on primary entries, but without
+	folding upper and lower case together.  Now it does the folding.
+
+	* graphics.xsl: Now uses select.mediaobject.index for selecting mediaobject.
+	Also puts align attribute value on <div> as the comment says
+	it should.
+
+2002-12-17  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* Makefile.param: Fixed build problems with new parameters.
+
+2002-12-17  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* math.xsl: Changed selection of mediaobject to be more consistent using
+	a separate select.mediaobject.index template. Also added
+	text-align to block containing external-graphic in fo output.
+
+2002-12-17  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* param.xweb: Fixed build problems with new parameters.
+
+2002-12-13  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* glossary.xsl: Handles missing otherterm targets in glosssee and glossseealso.
+
+2002-12-06  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* block.xsl: Fixed epigraph template to process all the permitted
+	children, not just para.
+
+	* graphics.xsl, param.ent, param.xweb: Enabled selection of imageobject based on role attribute.
+
+2002-12-04  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* autotoc.xsl, component.xsl, sections.xsl: Added component.toc.separator and section.toc.separator as
+	emtpy templates for customization of transition
+	from TOC to first content.
+
+2002-11-29  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* lists.xsl: Make opencircle=circle in itemizedlist marks
+
+2002-11-25  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* sections.xsl: Made subtitles in sections scale to proper heading level.
+
+2002-11-16  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* admon.xsl: Align titles on graphical admonitions
+
+	* biblio.xsl, xref.xsl: Support bibliosource; improve numbered bibliography entries and cross-references to them
+
+2002-11-15  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* table.xsl: Insignificant tweak
+
+2002-11-14  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* biblio.xsl: Use xreflabel (if it's present) on bibliography entries
+
+	* component.xsl: Article appendix titles should be top-level titles
+
+	* refentry.xsl: Handle nested refsections
+
+	* table.xsl: Support entrytbl
+
+	* xref.xsl: Whitespace
+
+2002-11-01  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* inline.xsl: Output anchors for author/editor/othercredit names
+
+	* lists.xsl: Output anchors for simplelist members
+
+2002-10-31  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* autoidx.xsl: Support spanning index terms (endofrange/startref)
+
+2002-10-20  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* inline.xsl: Bug #619474: support errortext element
+
+2002-10-19  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* block.xsl, component.xsl, division.xsl, refentry.xsl, sections.xsl: 
+	Support output of language attribute
+
+	* inline.xsl: Support output of language attribute on foreignphrase and fix bug in glossterm linking
+
+2002-10-09  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* xref.xsl: Fixed bug in lookup of olink database document baseuri
+	attribute for case of no site map.
+
+2002-10-08  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* formal.xsl: Use table 'tabstyle' attribute for div class
+
+2002-10-06  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* chunk-common.xsl: Simplify chunk-element-content; no semantic differences
+
+	* chunk.xsl: Reworked chunking for downstream customization; will break any existing customization layer that changes the chunking algorithm
+
+2002-10-04  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* autotoc.xsl, component.xsl, sections.xsl: Support optional titles on ToCs
+
+	* lists.xsl: Bug #615464: fix typo in compact list spacing
+
+	* param.ent, param.xweb, table.xsl: Made separate parameters for table frame and table cell border properties
+
+	* synop.xsl: Bug #617717: remove spurious hash in anchor name
+
+2002-10-04  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* titlepage.xsl: Fixed bug #618600. Address is now displayed verbatim also on titlepages.
+
+2002-10-02  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* lists.xsl: Support continuation of orderedlists and inherited numeration in FO
+
+2002-10-01  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* sections.xsl: Changed section.level template to return a number that matches
+	the section level (sect1 = 1, etc.), and changed other
+	templates to compensate for the change, so the output
+	should be the same as before.
+
+2002-09-27  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* autoidx.xsl: Bug #496294: don't index endofrangeentries. They're no longer indexed, but they aren't handled quite right yet either, they don't generate ranges
+
+	* autotoc.xsl: Properly support bridgehead.in.toc parameter
+
+	* biblio.xsl: Related to bug #583282: don't duplicate footnotes in bibliographys either
+
+	* block.xsl, titlepage.xsl: Bug #582192: support revdescription and improve effectiveness of html-rtf by extending the number of places where its used
+
+	* component.xsl: Bug #596599: TOC for article/appendix in chunked HTML
+
+	* docbook.xsl: Make sure chunk always returns zero if we're not chunking
+
+	* formal.xsl: Bug #497603: fixed and added default.float.class
+
+	* glossary.xsl: Bug #583282: footnote duplicated in glossary footer
+
+	* graphics.xsl: Bug #516859: added default.image.width
+
+	* index.xsl: Related to bug #583282: don't duplicate footnotes in indexes either
+
+	* param.ent, param.xweb: Use new parameters
+
+	* synop.xsl: Total rework of funcsynopsis code; now supports a 'tabular' presentation style for 'wide' prototypes; see funcsynopsis.tabular.threshold
+
+2002-09-20  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* changebars.xsl: Address Bug #610660: use system.head.content instead of user.head.content; tone down the intensity of the colors a bit
+
+	* chunk-common.xsl: Call system.head.content in html.head
+
+	* docbook.xsl: Add context to error message about a missing template
+
+	* docbook.xsl: Address Bug #610660: Added system.head.content so that stylesheets can output things before the users css.stylesheet (for example). Also added a title parameter to head.content
+
+	* graphics.xsl: Call the *.head.content templates when writing out long description chunks
+
+	* synop.xsl: Bug #605150: process arg correctly even when it's in a group
+
+	* titlepage.xsl: Call the *.head.content templates when writing out legalnotice chunks
+
+	* titlepage.xsl: Bug #607725: make sure legalnoticelink is correct even when chunking to a different html.dir
+
+2002-09-18  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* graphics.xsl: Use CSS to set viewport characteristics if css.decoration is non-zero, use div instead of p for making graphic a block element; make figure titles the default alt text for images in a figure
+
+	* html-rtf.xsl: Handle XHTML RTFs more completely
+
+2002-09-17  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* chunk.xsl: Use local URIs for importing docbook.xsl and chunk-common.xsl
+
+	* qandaset.xsl: Added default table summary to qandaset tables
+
+2002-09-16  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* chunk.xsl, chunkfast.xsl: Attempt to make chunking faster; chunkfast is still experimental
+
+2002-09-15  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* autoidx.xsl: Support indexing in webpages (website DTD). In the long run, this probably isn't a good strategy...
+
+2002-09-06  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* admon.xsl: Output table summary and img alt for graphical admonitions
+
+	* docbook.xsl: Whitespace changes
+
+	* param.ent, param.xweb: Use the new l10n.* parameters
+
+2002-09-04  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* chunk-common.xsl: Ignore dbhtml dir if the section isn't a chunk
+
+	* chunk.xsl: Make sure chunked ToC/LoT goes in the right base.dir
+
+	* component.xsl: Allow generate.toc parameter to control ToC in article/appendixes
+
+	* graphics.xsl: Use the graphicsize.extension parameter
+
+2002-09-03  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* refentry.xsl: Do something reasonable with refsection; this still needs work
+
+	* table.xsl: Make sure row-level colsep and rowsep values are 'inherited' onto missing cells
+
+2002-08-28  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* table.xsl: Make inherited attributes work for 'missing' table cells
+
+2002-08-26  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* chunk.xsl, param.ent, param.xweb: Made chunk.tocs.and.lots a proper parameter
+
+2002-08-25  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* autoidx.xsl: Fixed bug #496281. Refentry is now recognized as target for links from index.
+
+2002-08-22  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* Makefile.param: Index can be alternatively created using HHK file from now. This allows see-also processing and index terms also points to their exact location.
+
+2002-08-22  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* autoidx.xsl: Format see/seealso entries correctly
+
+	* autotoc.xsl, chunk-common.xsl, chunk.xsl, component.xsl, division.xsl: 
+	Rework(ing) ToC/LoT generation to support chunking the ToC/LoT; don't output empty rows in navigation tables
+
+2002-08-22  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* param.ent, param.xweb: Index can be alternatively created using HHK file from now. This allows see-also processing and index terms also points to their exact location.
+
+2002-07-29  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* lists.xsl: Added valign="top" attribute to the <col> element
+	for variablelist term column.  I was getting vertically
+	centered alignment for the term.
+
+2002-07-19  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* biblio.xsl, inline.xsl, param.ent, param.xweb: Support menuchoice.menu.separator, menuchoice.separator, and bibliography.numbered
+
+2002-07-18  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* block.xsl, lists.xsl, param.ent, param.xweb: Added support for para.propagates.style
+
+	* lists.xsl: Use tr.attributes
+
+	* param.ent, param.xweb: Added html.cellpadding and html.cellspacing
+
+	* table.xsl: Added tr.attributes named template (for odd-row coloring and such) and html.cellpadding and html.cellspacing for table defaults
+
+2002-07-16  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* inline.xsl: When emphasis propagates its role attribute as the HTML span class and a role is provided, don't use <em>
+
+2002-07-16  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* xref.xsl: Remove 'article' from the catch-all template match in mode=xref-to
+	because it is already covered in another xref-to template,
+	leading to an ambigious selection of template.
+
+2002-07-10  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* chunker.xsl: Repeat after me: you cannot use xsl:attribute on intruction elements, you cannot use...
+
+	* graphics.xsl: Refactor calls to getWidth() and getDepth() to work around XSLTC bugs
+
+2002-07-09  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* biblio.xsl: Don't output square brackets if there's no biblioentry label
+
+	* synop.xsl: Bug #573726: fix cmdsynopsisref formatting
+
+2002-07-08  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* autoidx.xsl: Bug #574840: fix bug where some symbol index terms got lost
+
+	* autoidx.xsl: Bug #574841: trim leading and trailing whitespace from primary/secondary/tertiary index terms
+
+	* graphics.xsl: Work-around bug in xsltproc: explicitly cast scale to a number() before comparing it to 1.0
+
+	* html-rtf.xsl, verbatim.xsl: Bug #567130: make sure literallayout children don't get lost
+
+2002-07-08  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* xref.xsl: Moved the target.database parameter to be the first
+	child in the olink template.
+
+2002-07-07  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* chunk-common.xsl, chunk.xsl: First tentative stab at getting ToCs and LoTs into separate chunks--does not work
+
+	* footnote.xsl: Fix footnotes in table titles
+
+	* lists.xsl: Fix ugly bug: make sure premables to orderedlist and itemizedlist elements are actually formatted
+
+2002-07-06  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* graphics.xsl: Bug fix for inlinegraphic not being inline.
+	The test for setting $viewport to 0 was
+	  test="inlinegraphic
+	        | ancestor::inlinemediaobject
+	        | ancestor::inlineequation"
+	when it should be:
+	  test="local-name(.) = 'inlinegraphic'
+	        or ancestor::inlinemediaobject
+	        or ancestor::inlineequation"
+	Now inlinegraphics are inline.
+
+	* xref.xsl: Added $verbose parameter to default xref-to template
+	so olink target collection can be quiet for elements
+	that don't have an xref-to.
+	Also fixed a line break in an olink error message.
+
+2002-07-05  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* chunk.xsl: Modified for new stylesheet olink system.
+	Checks the collect.xref.targets parameter and
+	runs the target collection process if selected.
+	Default is to not run the collection process.
+
+	* docbook.xsl: Modified for the new stylesheet olink system.
+	Checks the collect.xref.targets parameter and runs
+	the target data collection process if selected.
+	Default is to not run the collection process.
+
+	* param.ent: Added seven new parameters for the new stylesheet olink system:
+	target.database.document
+	targets.filename
+	collect.xref.targets
+	olink.base.uri
+	use.local.olink.style
+	current.docid
+	olink.doctitle
+
+	* param.ent, param.xweb: Removed references to the chunk.datafile parameter,
+	because Norm removed that parameter due to
+	obsolescence.
+
+	* param.xweb: Added seven parameters for the new stylesheet olink system:
+	target.database.document
+	targets.filename
+	collect.xref.targets
+	olink.base.uri
+	use.local.olink.style
+	current.docid
+	olink.doctitle
+
+	* xref.xsl: Modified to use new stylesheet olinks.
+	Extended the olink template for the new targetdoc and
+	targetptr attributes.
+	Loads the target database into keys for quick lookups.
+
+2002-07-04  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* xref.xsl: Feature req #525507: support xref to para by using the nearest containing section as the generated text
+
+2002-07-03  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* chunk-common.xsl, param.ent, param.xweb: Use header.rule and footer.rule parameters when building page navigation
+
+	* docbook.xsl: Feature Req #502932: added root.messages template for user defined messages
+
+2002-06-29  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* formal.xsl, lists.xsl: Make list/procedure titles use gentext and have consisten formatting
+
+2002-06-28  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* chunk-common.xsl: Fix footnote context error (Felix Rabe)
+
+2002-06-27  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* footnote.xsl: Make sure function-available is used around the node-set extension function
+
+2002-06-27  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* footnote.xsl: Fixed typo
+
+2002-06-27  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* table.xsl: Whitespace
+
+2002-06-26  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* inline.xsl, xref.xsl: Unwrap nested links
+
+	* table.xsl: Rework the CSS table-border properties so that all three don't have to be specified at once
+
+2002-06-16  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* chunker.xsl: Turn off omit-xml-declaration, for what it's worth, in text mode
+
+	* table.xsl: Added PI for cellspacing and cellpadding; also added currently useless Python extension hooks
+
+2002-06-13  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* Makefile.param: Added parameter for disabling HTML output when testing various HTML Help features.
+
+	* Makefile.param: New features. A lot of new features. For HTML Help.
+
+2002-06-13  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* chunker.xsl: Use the new chunking parameters: NOTE WELL: they are described in param.xweb but actually defined in chunker.xsl to make it independent
+
+2002-06-13  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* chunker.xsl: Modified output attributes for text chunks as Saxon doesn't like empty values for them.
+
+2002-06-13  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* html-rtf.xsl: Renamed a template
+
+	* inline.xsl: Changed test condition for xlink: simple links
+
+	* manifest.xsl, math.xsl, param.ent: Use the new chunking parameters: NOTE WELL: they are described in param.xweb but actually defined in chunker.xsl to make it independent
+
+2002-06-13  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* param.ent: Added parameter for disabling HTML output when testing various HTML Help features.
+
+	* param.ent: New features. A lot of new features. For HTML Help.
+
+2002-06-13  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* param.xweb: Use the new chunking parameters: NOTE WELL: they are described in param.xweb but actually defined in chunker.xsl to make it independent
+
+2002-06-13  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* param.xweb: Added parameter for disabling HTML output when testing various HTML Help features.
+
+	* param.xweb: New features. A lot of new features. For HTML Help.
+
+2002-06-12  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* chunk-common.xsl, param.ent, param.xweb: Added new parameters suppress.{footer|header}.navigation for separate control over navigation bar in footer and header.
+
+2002-06-11  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* formal.xsl: Make sure formal objects have an anchor
+
+	* graphics.xsl: Don't put alt on object or embed
+
+	* graphics.xsl: Don't output viewport table if it isn't going to do anything useful
+
+	* graphics.xsl, param.ent, param.xweb: Made new parameters public
+
+	* html-rtf.xsl: Fix list of block elements and support xhtml
+
+	* html-rtf.xsl: When unwrapping; don't produce empty elements if there's no need
+
+	* xref.xsl: Experimental support for xrefstyle
+
+2002-06-09  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* docbook.xsl: Feature req #565822: support multiple html.stylesheets
+
+	* docbook.xsl: Patch #565199: fix quotation marks in draft URL generation in CSS
+
+2002-06-06  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* docbook.xsl: Add support for HTML META name=description from abstract
+
+	* param.ent, param.xweb: New parameters: generate.meata.abstract and use.role.as.xrefstyle
+
+2002-06-03  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* Makefile: Added dependencies for profiling stylesheets
+
+2002-05-23  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* graphics.xsl, param.ent, param.xweb: Support for SVG in HTML
+
+	* html-rtf.xsl: Protect calls to extension functions behind function-available tests
+
+2002-05-21  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* qandaset.xsl: Fix anchors for references to QandAEntrys. Output '. ' in some contexts (this is a hack)
+
+2002-05-17  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* onechunk.xsl: Make TOC (and other internal references) all just fragment identifiers...we're making one chunk after all
+
+2002-05-16  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* autotoc.xsl, html.xsl: Moved href.target to html.xsl; added href.target.uri (which is functionally equivalent to href.target in the non-chunking case)
+
+2002-05-15  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* chunk.xsl, onechunk.xsl: Fix bugs in onechunk---it wasn't working at all
+
+2002-05-14  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* graphics.xsl: Bug #555809: make sure that a longdesc, if written, gets the correct relative URI
+
+2002-05-13  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* chunk-common.xsl: Fix inherited directory naming problems when using dbhtml. Add context to site navigation link calls
+
+	* chunk-common.xsl, param.ent, param.xweb: Add extra LINK elements to the HTML HEAD of chunked output (for enhanced site navigation as per Mozilla 1.0)
+
+	* chunker.xsl: Work around relative filename bug in libxslt
+
+	* pi.xsl: Try to avoid x//y in inherited dbhtml dir settings
+
+2002-05-12  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* block.xsl: Support title on blockquote
+
+	* chunk.xsl: Turn off refentry.separator by default when chunking
+
+	* chunk.xsl: Fix ugly prev/next bug introduced by my attempt to work around Xalan problems
+
+	* graphics.xsl: Reworked support for graphic attributes; now support DocBook 4.2CR1 attributes
+
+	* html.xsl: Remove reference to obsolete using.chunker parameter
+
+	* math.xsl: Support MathML by passing it through unchanged
+
+	* param.ent, param.xweb: Added points.per.em; removed obsolete using.chunker
+
+	* table.xsl: Improve support for table borders drawn with CSS (get the semantics right); add support for entry-bgcolor PI
+
+	* verbatim.xsl: Format literal layout elements correctly when linenumbering
+
+	* xref.xsl: Support xref to refnamediv and all elements with titles (at least when they have titles)
+
+2002-05-10  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* chunk.xsl: Added support for manifest file as requested by Nik in #552945
+
+2002-05-10  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* lists.xsl: Remove reference to obsolete using.chunker parameter
+
+2002-05-10  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* manifest.xsl, param.ent, param.xweb: Added support for manifest file as requested by Nik in #552945
+
+2002-05-10  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* pi.xsl: Remove reference to obsolete using.chunker parameter
+
+2002-05-07  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* chunk.xsl: The call to write.chunk did not have the $chunk.quietly parameter set.
+	I think I failed to commit that change after testing it in Feb.
+
+	* xref.xsl: Added a template for article in mode="xref-to" that is similar
+	to the one for chapter.  Now you can use <xref> with a linkend
+	pointing to an article.
+
+2002-05-06  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* chunk.xsl, onechunk.xsl: Fix bug #551966 applying onechunk to book
+
+2002-04-30  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* chunk.xsl: First attempt to workaround Xalan array-out-of-bounds bug
+
+2002-03-25  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* autotoc.xsl, chunk-common.xsl, pi.xsl: Handle links across dbhtml-specified relative directories correctly
+
+	* formal.xsl: Support longdesc on tables
+
+	* table.xsl: Use the textobject/phrase for the table summary attribute, if one is present
+
+2002-03-24  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* graphics.xsl: Remove style from longdesc link; added support for textdata in textobject
+
+	* inline.xsl: Support personname
+
+	* xref.xsl: Handle xref to editor, othercredit, and personname
+
+2002-03-21  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* biblio.xsl, titlepage.xsl: Support biblioid
+
+2002-03-18  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* Makefile, autotoc.xsl, component.xsl, division.xsl, param.ent, param.xweb, qandaset.xsl, refentry.xsl, sections.xsl: 
+	Replace generate.*.toc and generate.*.lot with single generate.toc parameter.
+
+	* autotoc.xsl: Fix ToC section depth calculation
+
+2002-03-15  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* synop.xsl: Improve appearance of classsynopsis elements
+
+2002-03-14  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* .cvsignore: Ignore profiling stylesheets
+
+	* Makefile: Make profiling onechunk
+
+	* admon.xsl, autoidx.xsl, autotoc.xsl, biblio.xsl, block.xsl, callout.xsl, changebars.xsl, chunk-common.xsl, chunk.xsl, chunker.xsl, chunktoc.xsl, component.xsl, division.xsl, docbook.xsl, ebnf.xsl, footnote.xsl, formal.xsl, glossary.xsl, graphics.xsl, html-rtf.xsl, html.xsl, index.xsl, info.xsl, inline.xsl, keywords.xsl, lists.xsl, maketoc.xsl, math.xsl, oldchunker.xsl, onechunk.xsl, param.ent, param.xweb, pi.xsl, qandaset.xsl, refentry.xsl, sections.xsl, synop.xsl, table.xsl, titlepage.templates.xml, titlepage.xsl, toc.xsl, verbatim.xsl, xref.xsl: 
+	Whitespace only: change CR/LF back to LF. Norm was a total moron.
+
+	* admon.xsl, autoidx.xsl, autotoc.xsl, biblio.xsl, block.xsl, callout.xsl, changebars.xsl, chunk-common.xsl, chunk.xsl, chunker.xsl, chunktoc.xsl, component.xsl, division.xsl, docbook.xsl, ebnf.xsl, footnote.xsl, formal.xsl, glossary.xsl, graphics.xsl, html-rtf.xsl, html.xsl, index.xsl, info.xsl, inline.xsl, keywords.xsl, lists.xsl, maketoc.xsl, math.xsl, oldchunker.xsl, onechunk.xsl, param.ent, param.xweb, pi.xsl, qandaset.xsl, refentry.xsl, sections.xsl, synop.xsl, table.xsl, titlepage.templates.xml, titlepage.xsl, toc.xsl, verbatim.xsl, xref.xsl: 
+	Whitespace changes only: use PC-style CR/LF because Unix clients choke on this far less often than PC clients choke on the reverse. Grrr.
+
+	* block.xsl: Generate anchors before the formal.object.heading, not within it; support formal.title.placement
+
+	* formal.xsl, lists.xsl, param.ent, param.xweb: Support formal.title.placement
+
+	* lists.xsl, titlepage.xsl: Handle revisionflag a little better on copyrights
+
+	* titlepage.xsl: Generate anchors before the formal.object.heading, not within it
+
+2002-03-13  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* footnote.xsl: Fix debugging error
+
+	* footnote.xsl: Numerate footnotes and table footnotes correctly
+
+	* lists.xsl: Bug #516227: segmentedlist/titles
+
+	* refentry.xsl: Process refsynopsisdiv titles in their own template so they don't get default title processing
+
+	* table.xsl: Make tfoot come out before tbody; even in HTML it's supposed to be that way
+
+	* verbatim.xsl: Improve efficiency of make-verbatim; thanks to Paul Grosso, John Dreystadt, et. al.
+
+2002-03-12  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* callout.xsl: Modified match="co" template to use its linkends attribute
+	to form a hotlink to the callout element, forming the
+	two-ways links as described in
+	The Definitive Guide.  At this time, only a single linkend
+	value is supported, since HTML doesn't handle multiply-targeted
+	links.
+
+2002-03-11  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* footnote.xsl: Fixed bug #520995. Removed duplicated footnote numbers.
+
+2002-03-10  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* biblio.xsl: Support the new generate.id.attributes parameter to prevent generating both div ID and a NAME attributes; also suppress revhistory in bibliographies
+
+	* component.xsl, division.xsl, glossary.xsl, index.xsl, param.ent, param.xweb: 
+	Support the new generate.id.attributes parameter to prevent generating both div ID and a NAME attributes
+
+	* inline.xsl: Use em instead of i for emphasis
+
+	* onechunk.xsl: Update onechunk to the new chunking scheme
+
+2002-03-07  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* autotoc.xsl: Modified refentry to use mode=title.markup rather than mode=title
+	so indexterms are not included in the TOC entries for refentry.
+
+2002-03-03  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* Makefile.param, param.ent, param.xweb: Added new stylesheet parameters for profiling.
+
+2002-03-01  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* Makefile, Makefile.param: First portion of new profiling code. New stylesheet parameters will come later.
+
+2002-03-01  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* docbook.xsl: Move stylesheet.result.type out of param and put it explicitly in each stylesheet because it has to be different
+
+	* graphics.xsl: Handle the case where graphics in inlineequations are inline
+
+	* param.ent: Removed stylesheet.result.type reference
+
+	* param.xweb: Added fragref for chunk.quietly
+
+	* titlepage.xsl: Added DIV wrappers to author and authorgroup for CSS styling
+
+2002-02-25  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* chunker.xsl, chunktoc.xsl, graphics.xsl, param.ent, param.xweb, titlepage.xsl: 
+	Added chunk.quietly parameter and altered the calls
+	to write.chunk to set the 'quiet' param to that value.
+
+2002-02-21  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* Makefile.param, math.xsl, param.ent, param.xweb: Better control over delimiters for TeX equations. Added parameter tex.math.delims, when is set to 0, no delimiters (like $ and $$) are output. Same can be done for single equation by <?dbtex delims="no"?>.
+
+2002-02-20  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* autotoc.xsl: Fix toc-depth bug in recursive sections
+
+2002-02-10  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* Makefile.param, param.ent, param.xweb: Added parameter htmlhelp.default.topic for overriding default topic to display.
+
+2002-02-09  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* Makefile.param, param.ent, param.xweb: Added parameter which controls appearance of root element in HTML Help ToC.
+
+2002-02-07  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* autotoc.xsl, chunk-common.xsl, chunk.xsl, chunktoc.xsl, maketoc.xsl, param.ent, param.xweb: 
+	Added experimental manual TOC processing for chunking and TOC generation
+
+	* calc-chunks.xsl, chunk-experimental.xsl, expchunk.xsl: 
+	Deleting old experiments
+
+	* docbook.xsl: Tweaked rendering of 'draft' watermark
+
+2002-02-03  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* Makefile.param, param.ent, param.xweb: Added parameter htmlhelp.title for manual control over HTML Help title. Improved code for automatic extraction of title from document.
+
+2002-01-29  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* docbook.xsl, param.ent, param.xweb: Support 'draft' watermark
+
+2002-01-28  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* biblio.xsl, block.xsl, docbook.xsl, footnote.xsl: Bug #503271: output biblioentry.item.separator after citetitle
+
+	* block.xsl, footnote.xsl, html-rtf.xsl, param.ent, param.xweb: 
+	Added html.cleanup parameter; if non-zero, do some post-processing of RTFs to improve formatting
+
+2002-01-22  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* param.ent, param.xweb: Feature request #507087. Added parameter for controling appearance of icons in HTML Help ToC.
+
+2002-01-21  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* biblio.xsl: Fixed bug #505683. Changed <I> to <i> to make output compatible with XHTML.
+
+2002-01-10  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* graphics.xsl, param.ent, param.xweb: Use the pixels.per.inch parameter
+
+2002-01-09  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* graphics.xsl: Convert graphic widths/depths to pixels
+
+2002-01-08  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* chunk.xsl: Make root.filename supercede use.id.as.filename
+
+	* titlepage.xsl: Added template for confsponsor
+
+2002-01-04  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* glossary.xsl, inline.xsl: Make glossary.collection (usually) work when chunking is used; allow the use of glossdivs to be toggled in the document
+
+	* glossary.xsl, inline.xsl, param.ent, param.xweb: First cut at supporting a glossary.collection file
+
+2002-01-03  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* .cvsignore, Makefile.param: Makefile.param is auto generated
+
+	* lists.xsl, param.ent, param.xweb: Use global parameter variablelist.as.table
+
+2002-01-01  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* changebars.xsl: Fix typo
+
+	* chunker.xsl: Use output.method parameter
+
+	* footnote.xsl: Number footnotes in refentrys individually; add priority to match on first para of a footnote
+
+	* lists.xsl: Improve list formatting
+
+	* param.ent, param.xweb: Added new parameters: make.valid.html, refentry.generate.title, and output.method; removed unused parameter callout.unicode.font
+
+	* refentry.xsl: Improve refentry formatting
+
+	* synop.xsl: Made several synopsis elements inline and reworked the formatting code accordingly
+
+	* titlepage.xsl: Fix formatting of copyright with multiple holders
+
+	* xref.xsl: Added target parameter to link
+
+2001-12-15  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* graphics.xsl, math.xsl: Improved support for TeX math inside equations.
+
+2001-12-06  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* Makefile.param, docbook.xsl, math.xsl, param.ent, param.xweb: 
+	Added support for TeX math in alt element. When using PassiveTeX, TeX equations can be directly passed to TeX. When using HTML, TeX file with code necessary to produce image equivalents of equations is generated.
+
+	* chunk.xsl, chunker.xsl: Template write.text.chunk moved to common place.
+
+2001-12-04  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* Makefile, Makefile.param, chunk.xsl, param.ent, param.xweb: 
+	Fix chunking parameter errors
+
+	* Makefile, Makefile.param, param.ent, param.xweb: Updated parameters and parameter consistency checking
+
+	* changebars.xsl: Feature #481981: support simpara and formalpara in changebars.xsl
+
+	* chunk-experimental.xsl: More hacking
+
+	* chunk.xsl: Feature #477348: support chunk.section.depth (lots and lots of changes here: danger will robinson)
+
+	* xref.xsl: Feature #481793: support xref to refentry
+
+2001-12-02  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* component.xsl: Allow inlines and anchors in titles
+
+2001-12-01  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* changebars.xsl, table.xsl: Bug #472836: @revisionflag and table entries
+
+	* qandaset.xsl: Improve FAQ labeling
+
+2001-11-29  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* lists.xsl: Patch #478068: procedures with one step
+
+2001-11-28  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* lists.xsl, param.ent: Support formatting segmented lists as tables
+
+	* param.ent: Added punct.honorific parameter
+
+2001-11-28  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* param.ent: Added parameter htmlhelp.hhc.section.depth for controlling depth of sections in a TOC in a left pane of HTML Help viewer.
+
+	* param.ent, param.xweb: Added support for automatic generation of map and context files for HTML Help. Topic names and IDs are marked by special PI <?dbhh topicname="..." topicid="..."?>.
+
+2001-11-28  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* param.xweb: Support formatting segmented lists as tables
+
+	* param.xweb: Added punct.honorific parameter
+
+2001-11-28  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* param.xweb: Added parameter htmlhelp.hhc.section.depth for controlling depth of sections in a TOC in a left pane of HTML Help viewer.
+
+2001-11-28  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* pi.xsl: Use common pi-attribute template
+
+2001-11-27  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* lists.xsl: Support tabular presentation of variablelists
+
+	* qandaset.xsl: Format QandASet as a table; there's just no other way to get the formatting right without resorting to absurd hackery
+
+	* refentry.xsl: Fixed typo in refentry separator test
+
+2001-11-18  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* Makefile, glossary.xsl, inline.xsl, param.ent, param.xweb: 
+	Added parameter glossterm.auto.link. When set to 1 links from glossterm to glossentry are created automatically even if there is no linkend attribute on glossterm and id attribute on glossentry.
+
+	* inline.xsl: Baseform attribute is taken into account when autogenerating links for glossterms.
+
+2001-11-15  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* graphics.xsl: Only output a longdesc link if there's actually a longdesc
+
+	* inline.xsl: Support experimental XLink support
+
+2001-11-12  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* chunk-experimental.xsl, chunk.xsl, docbook.xsl, ebnf.xsl, footnote.xsl, inline.xsl, lists.xsl, param.xweb, synop.xsl, toc.xsl, xref.xsl: 
+	Support well-formed documents, use key() instead of id()
+
+	* param.xweb: Added fragref for navig.* params
+
+2001-11-10  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* titlepage.xsl: Fixed formatting of addresses in affiliations in author names
+
+2001-11-09  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* param.xweb: Move the obvious ID value from the src:fragment to the refentry in parameter reference pages
+
+2001-11-06  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* chunk.xsl: Modified header and footer templates to support option
+	to use graphical icons for navigation.
+
+	* param.ent, param.xweb: Added new parameters supporting the option for graphical
+	icons in navigational headers and footers of chunked html.
+
+2001-11-05  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* param.ent: Parameters moved to params subdirectory.
+
+2001-11-05  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* param.ent: Added newline at eof
+
+2001-11-05  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* param.xweb: Parameters moved to params subdirectory.
+
+2001-11-03  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* biblio.xsl, inline.xsl: Support pubwork=article on citetitle
+
+	* xref.xsl: Remove anchor name on anchor; it erroneously duplicates the html anchor template
+
+2001-10-16  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* Makefile, graphics.xsl, param.ent, param.xweb: Support HTML longdesc using textobject content
+
+	* table.xsl: Table support improvements
+
+2001-10-15  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* inline.xsl: Fix formatting of keycombo
+
+	* param.ent, param.xweb, table.xsl: Fix calculation of rowsep and colsep; added experimental support for table.borders.with.css in HTML; calculation of alignments needs to be added along the same lines
+
+2001-10-14  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* table.xsl: Fixed a number of significant outstanding table problems; I think HTML and FO now format all combinations of spans and missing cells correctly. But the border drawing isn't perfect on FO tables yet.
+
+2001-10-12  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* biblio.xsl: Tweaked bibliography formatting to include the labels
+
+	* param.ent, param.xweb: Fixed some missing references
+
+	* xref.xsl: Tweaked cross reference stuff to prevent square brackets on biblio xrefs from being underlined (it just looks ugly)
+
+2001-10-11  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* autoidx.xsl, docbook.xsl: Moved autoidx.xsl (and chunker.xsl) directly into docbook.xsl
+
+	* chunk-common.xsl, chunk.xsl: Moved chunk-common into chunk; there's no need for a separate common file anymore
+
+	* chunker.xsl: Removed some out-of-date comments
+
+	* index.xsl: Removed empty generate-index function; we're now using autoidx all the time
+
+	* titlepage.xsl: Moved support for generate.legalnotice.link directly into titlepage.xsl
+
+2001-10-08  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* param.xweb: Added fragrefs for new params
+
+2001-10-07  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* .cvsignore: Added param.html to ignore list
+
+	* .cvsignore, Makefile, param.ent, param.xsl, param.xweb: 
+	Generate params from an xweb file
+
+	* autotoc.xsl, calc-chunks.xsl, chunk-common.xsl, chunk-experimental.xsl, chunker.xsl, ebnf.xsl: 
+	Removed all top-level parameters; they're now all in param.xsl
+
+2001-10-06  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* callout.xsl: Use function-available to select callout extension function
+
+	* component.xsl: Make component ids unconditional
+
+	* graphics.xsl: Use function-available to select text-insert extension function
+
+	* inline.xsl: Make sure all the variants of sgmltag have a class attribute
+
+	* refentry.xsl: Make anchors unconditional, support a separator between refentrys
+
+	* table.xsl: Use function-available to select extension functions
+
+	* titlepage.templates.xml: Added refentry titlepages, but note that refentrys don't usually have one, they usually begin with the Name section
+
+	* titlepage.xsl: Added refentry.titlepage.{recto,verso}.style properties
+
+	* verbatim.xsl: Use function-available to select verbatim extension function
+
+	* xref.xsl: Added names to the link templates so that they can be called that way
+
+	* xtchunk.xsl, xtchunker.xsl: No point keeping the XT files now that I'm using function-available
+
+2001-09-26  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* admon.xsl, biblio.xsl, block.xsl, callout.xsl, component.xsl, division.xsl, ebnf.xsl, formal.xsl, glossary.xsl, graphics.xsl, html.xsl, index.xsl, inline.xsl, lists.xsl, qandaset.xsl, refentry.xsl, sections.xsl, synop.xsl, table.xsl, verbatim.xsl, xref.xsl: 
+	Bug #464487: use (new) anchor template to consistently generate HTML anchors (usually conditionally, in other words, only for elements that actually have an ID)
+
+2001-09-25  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* chunk-common.xsl: Fix gentext.nav.* templates
+
+	* param.xsl, titlepage.xsl: Support automatic collation of year ranges in copyright
+
+2001-09-24  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* refentry.xsl, synop.xsl: Added some paras to improve spacing
+
+	* verbatim.xsl: Implemented changes suggested by Paul Winder, Sam Brow, and John Dreystadt of Arbortext to make 'make-verbatim' less memory intensive; also added paras to literallayout and address divs for better spacing in NS6
+
+2001-09-22  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* changebars.xsl: sgmltag is an inline
+
+	* chunk-common.xsl: Feature request #439053: support generate.legalnotice.link
+
+	* xref.xsl: Bug #463033: allow xref to list items (in orderedlists) and varlistentrys
+
+	* xref.xsl: Bug #462830: allow %p in templates
+
+2001-09-09  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* onechunk.xsl: New file.
+
+2001-08-29  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* lists.xsl: Fix orderedlist numerations
+
+2001-08-25  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* sections.xsl: Bug #451005: no id anchor for bridgehead
+
+2001-08-14  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* xref.xsl: Display the ID when gentext cannot be created
+
+2001-08-11  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* param.xsl: Removed the '?' from olink resolver parameter because
+	the olink template will add that (or not, depending on
+	how that template is customized).
+
+2001-08-08  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* param.xsl, verbatim.xsl: Support shade.verbatim parameter
+
+2001-08-05  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* param.xsl: Removed the FormatDingbatCallout classes, they were the same as the FormatUnicodeCallout classes but with a font wrapper. Added a callout.unicode.font parameter to wrap Unicode callouts
+
+2001-08-04  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* autotoc.xsl: Add '.' to the autotoc.label.separator; suppress the separator if there is no label
+
+	* chunker.xsl: Added a quiet parameter to suppress the Writing... message
+
+	* refentry.xsl: Don't output anchor for refsect*, the anchor is output as part of the title processing
+
+2001-08-02  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* sections.xsl: Allow anchors in section titles
+
+2001-08-02  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* xref.xsl: Changed <link> to process its endterm if the element content
+	is empty.
+
+2001-08-01  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* component.xsl: Don't calculate ids where they aren't used; don't put ids on divs because anchors will be output in the component title
+
+	* footnote.xsl: Process simpara in footnote; warn if something unexpected turns up in a footnote
+
+	* formal.xsl: Allow anchors in formal object titles
+
+	* graphics.xsl: Output anchors for images that have IDs
+
+	* lists.xsl: Output anchors for list elements with IDs
+
+	* param.xsl: Leave ../ out of graphics paths by default; that doesn't make sense anymore
+
+	* param.xsl, xref.xsl: First crude beginnings of olink support
+
+	* qandaset.xsl: Remove unnecessary spaces
+
+	* titlepage.templates.xml: Don't suppress othercredit on titlepages
+
+	* titlepage.xsl: Handle othercredits on title pages
+
+2001-07-21  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* block.xsl, param.xsl: Fix title-end punctuation problems on formalparas
+
+2001-07-17  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* graphics.xsl: Fixed bug #442160. Parameter graphic.default.extension is now used also for <graphic> and <inlinegraphic> not only for <imagedata>.
+
+2001-07-17  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* xref.xsl: xref element with endterm attribute now uses normal templates
+	to process the children of the element pointed to by the endterm
+	ID. Formerly it just used the built-in template and rendered
+	just the text nodes.
+
+2001-07-16  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* inline.xsl, param.xsl: Added phrase.propagates.style and emphasis.propagates.style: if true, wrap a span around phrase and emphasis elements with the role attribute propagated to the class attribute
+
+2001-07-16  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* sections.xsl: added null templates for section titleabbrev in normal mode
+
+2001-07-16  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* table.xsl: Wrap tbody around table footnotes (so that the HTML table model is not broken)
+
+2001-07-15  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* param.xsl: Make generate.section.toc.level 0 by default
+
+2001-07-10  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* chunk.xsl: Remove extension namespace declarations; they aren't actually used in this module
+
+	* chunker.xsl: Fix EXSLT namespace name for exsl:document element
+
+	* chunker.xsl: Make exsl:document the first choice
+
+	* chunker.xsl, oldchunker.xsl, param.xsl: Move declaration for default.encoding and saxon.character.representation from param.xsl to (old)chunker.xsl so that chunker.xsl can be used by any stylesheet (indepedent of docbook.xsl). Maybe this should get moved to lib...
+
+	* pi.xsl: Irrelevant encoding change
+
+2001-07-09  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* autotoc.xsl: Fixed typo in reference to annotate.toc variable
+
+2001-07-08  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* calc-chunks.xsl, chunk-experimental.xsl: Break chunk calculation and chunking into two tasks; *requires* every chunk to have an ID
+
+	* chunker.xsl: Use element-available function not vendor to find chunking elements
+
+	* exsltchunk.xsl, exsltchunker.xsl: These have been integrated into the regular chunker now that it's based on extension-available()
+
+	* keywords.xsl: Tweaked handling of keywords to avoid multiple templates
+
+	* oldchunker.xsl: New file.
+
+	* qandaset.xsl: Improve QandA formatting; make question bold if defaultlabel=none (FR #419315)
+
+	* xref.xsl: Support xref to bridgehead
+
+2001-07-07  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* param.xsl: Added callout.dingbats parameter (for extension support; not really used in HTML)
+
+2001-07-06  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* chunk-experimental.xsl, expchunk.xsl: New file.
+
+2001-07-05  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* block.xsl: Whitespace
+
+	* block.xsl, lists.xsl: FR #422097, make a listitem containing a single simpara output an li with only inline content
+
+	* chunk-common.xsl: Patch #428987, use the id of the root element if use.id.as.filename is non-zero; also chunk a /section properly
+
+	* chunk-common.xsl: Patch #418401, add accesskey attributes to HTML navigation
+
+	* param.xsl, sections.xsl: Change semantics of generate.section.toc.level; 0 no longer means ignored it now means less than 1 :-)
+
+	* param.xsl, sections.xsl: SR #431040, added generate.section.toc.level parameter to control depth of sections which get a TOC
+
+	* titlepage.xsl: Patch #415865, output contrib for authors and othercontribs
+
+2001-07-04  <uid48421 at users.sourceforge.net>
+
+	* autotoc.xsl: Support annotated TOCs
+
+	* biblio.xsl, param.xsl, xref.xsl: Support an external bibliography collection
+
+	* chunk-common.xsl, docbook.xsl, param.xsl: Bug #418968: replaced body.attrs attribute-set with body.attributes template
+
+	* component.xsl, sections.xsl: Remove internal references to *.titlepage.recto.mode and *.titlepage.verso.mode
+
+	* ebnf.xsl: Minor presentation bug fixes
+
+	* xref.xsl: Bug #429011, fix xref to qandset elements
+
+2001-06-22  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* docbook.xsl, ebnf.xsl: Support EBNF
+
+	* param.xsl: Remove unused parameter: check.idref
+
+2001-06-21  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* lists.xsl, param.xsl, xref.xsl: Use common code to calculate step numbers; support xref to procedures and steps; added formal.procedures parameter
+
+2001-06-20  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* formal.xsl: Generate formal titles correctly
+
+	* graphics.xsl: Don't put span around inlinemediaobject in programlistings or screens (causes problems with line numbering and callouts)
+
+	* refentry.xsl: Bug 434102: fix refentry inside of chapter and fix refsynopsisdiv formatting in both FO and HTML
+
+	* xref.xsl: Support xref to authorgroup
+
+2001-06-18  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* chunk-common.xsl: Reordered erroneous test: only link to top-level sections, even if the first one is a chunk
+
+2001-06-17  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* exsltchunk.xsl, exsltchunker.xsl: New file.
+
+2001-06-15  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* component.xsl: Handle subtitle in articleinfo
+
+2001-06-13  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* chunk-common.xsl: Make sure the root element gets processed correctly so that it generates the right titlepage
+
+	* component.xsl: Don't output ID attributes on DIVs with required titles since they conflict with the NAME attributes on the subsequently output A tags.
+
+	* docbook.xsl: Pass the current node to user.head.content
+
+	* index.xsl: Updated comment
+
+2001-06-07  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* lists.xsl: Things preceding steps in procedure are placed before OL list.
+
+2001-06-04  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* lists.xsl: Fixed typo in compact list support; backed out procedure step changes
+
+	* sections.xsl: Fixed CSS typo; clear: all should be clear: both
+
+2001-06-02  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* lists.xsl: Fixed bug #424926. Things preceding steps in procedure are not placed inside OL list.
+
+2001-05-23  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* component.xsl: Reorganized templates for clarity
+
+	* graphics.xsl: Fix dup. template bug with is.graphic.*
+
+	* titlepage.xsl: Added template for publisher
+
+2001-05-21  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* autotoc.xsl: Make the TOC label/title separator a parameter
+
+	* callout.xsl, verbatim.xsl: Move calculation of linenumber.* parameters into the number.rtf.lines template
+
+	* changebars.xsl: Add link and member as inlines
+
+	* sections.xsl: Refactor the section title code
+
+	* titlepage.templates.xml: Reworked titlepage template processing to support use of more interesting
+	predicates.
+	
+	Note: in previous versions, at most one title, subtitle, or titleabbrev
+	element would be processed for each title page. In the new design, if you
+	have multiple title, subtitle, or titleabbrev elements inside an info
+	wrapper (you shouldn't!), they will all be processed.
+
+2001-05-13  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* param.xsl: Fixed ID typo
+
+	* synop.xsl: Fixed synopfragmentref link (suggested by Philippe Martin)
+
+2001-05-12  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* autotoc.xsl, param.xsl: Mostly failed attempt to add bridgeheads to the automatic TOC; this option is turned off by default and you should leave it that way.
+
+	* sections.xsl: Calculate the heading level for bridgeheads
+
+2001-05-03  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* lists.xsl: Output anchors for procedures and steps
+
+	* table.xsl: Process head/body/foot in the right order
+
+2001-04-29  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* chunk-common.xsl, chunk.xsl, xtchunk.xsl: Automatically make an index when chunking with a processor other than XT
+
+2001-04-26  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* changebars.xsl: Support a few more elements
+
+	* inline.xsl: Make glossterms hot if they're links. And make them italic.
+
+	* lists.xsl: Improve procedure step/substep enumeration
+
+2001-04-24  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* chunk-common.xsl: Fix chunking bug
+
+	* chunk-common.xsl: Feature request 416507: added chunk.sections and chunk.first.sections to provide greater chunking flexibility
+
+	* chunker.xsl: Output ID in message
+
+	* glossary.xsl: Fix bug that caused duplicated glossary entries
+
+	* qandaset.xsl: Bug #418100: fix qandaentry anchors; also fixed formatting bug in questions with indexterms
+
+2001-04-21  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* chunker.xsl: Added parameters for changing output encoding in chunked HTML
+
+2001-04-21  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* inline.xsl: Improve processing of trademarks
+
+2001-04-21  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* param.xsl: Added parameters for changing output encoding in chunked HTML
+
+2001-04-20  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* inline.xsl: Restoring accidentally deleted citetitle template
+
+2001-04-18  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* autoidx.xsl: Fix bug: lowercase and uppercase need to be strings (not element names :-)
+
+	* inline.xsl, param.xsl: Bug #413982, easy support for man page CGI links on citerefentry
+
+2001-04-17  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* docbook.xsl, param.xsl: Move label.from.part parameter into param.xsl; default it to 0 so that chapters and appendixes are numbered monotonically throughout a book by default. Moved param.xsl up in the include list, just for good measure
+
+2001-04-16  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* component.xsl: Fix bug in processing of subtitle content on components
+
+	* glossary.xsl, titlepage.templates.xml: Fix formatting of glossarys--things were really broken
+
+	* xref.xsl: Patches Tracker #415439: support title attribute on HTML anchors associated with xrefs
+
+2001-04-15  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* chunk-common.xsl: Process footnotes correctly when chunking; add summary attribute to navigation tables
+
+	* docbook.xsl: Support inheriting of *info keywords
+
+	* footnote.xsl, sections.xsl: Process footnotes correctly when chunking
+
+	* formal.xsl: Use gentext templates for formal object titles
+
+	* param.xsl: Added new parameters: inherit.keywords, process.source.toc, and process.empty.source.toc; changed the default for spacing.paras to 0
+
+	* table.xsl: Improve support for align attribute on tgroup
+
+	* toc.xsl: Support DocBook toc markup
+
+	* xref.xsl: Make a title attribute on HTML anchors for links to things with titles
+
+2001-04-05  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* table.xsl: Don't translate tgroup align into HTML table align--they don't mean the same thing
+
+	* titlepage.xsl: Suppress titleabbrev on the title page
+
+2001-04-04  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* chunk-common.xsl: Move xsl:message about chunks into the chunker modules
+
+	* chunker.xsl: Support indent and doctype public/system on chunks (for Saxon, anyway, Xalan's multiple-document extension doesn't seem to support this)
+
+	* xtchunker.xsl: Use xsl:choose to support xml, html, and text output methods
+
+2001-04-03  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* callout.xsl: Fix bug 412487, make XSL-generated callout marks honor callout mark parameters
+
+	* chunk-common.xsl: Remove unnecessary xmlns declarations
+
+	* chunker.xsl: Patch to make saxon not produce xml version=1.1 documents
+
+	* param.xsl: Documentation fixes
+
+	* qandaset.xsl: Apply patch 412510 by Jon Willeke, make xref to Question work correctly
+
+	* xref.xsl: Remove unnecessary parameter assignment
+
+2001-04-02  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* .cvsignore, Makefile, admon.xsl, autoidx.xsl, autotoc.xsl, biblio.xsl, block.xsl, callout.xsl, changebars.xsl, chunk-common.xsl, chunk.xsl, chunker.xsl, component.xsl, division.xsl, docbook.xsl, ebnf.xsl, footnote.xsl, formal.xsl, glossary.xsl, graphics.xsl, html.xsl, index.xsl, info.xsl, inline.xsl, keywords.xsl, lists.xsl, math.xsl, param.xsl, pi.xsl, qandaset.xsl, refentry.xsl, sections.xsl, synop.xsl, table.xsl, titlepage.templates.xml, titlepage.xsl, toc.xsl, verbatim.xsl, xref.xsl, xtchunk.xsl, xtchunker.xsl: 
+	New file.
+
+	* Makefile: Use the cvstools version of saxon
+

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/admon.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/admon.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/admon.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,124 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: admon.xsl,v 1.1.1.1 2004/10/19 21:21:45 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<xsl:template name="admon.graphic.width">
+  <xsl:param name="node" select="."/>
+  <xsl:text>25</xsl:text>
+</xsl:template>
+
+<xsl:template match="note|important|warning|caution|tip">
+  <xsl:choose>
+    <xsl:when test="$admon.graphics != 0">
+      <xsl:call-template name="graphical.admonition"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:call-template name="nongraphical.admonition"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="admon.graphic">
+  <xsl:param name="node" select="."/>
+  <xsl:value-of select="$admon.graphics.path"/>
+  <xsl:choose>
+    <xsl:when test="local-name($node)='note'">note</xsl:when>
+    <xsl:when test="local-name($node)='warning'">warning</xsl:when>
+    <xsl:when test="local-name($node)='caution'">caution</xsl:when>
+    <xsl:when test="local-name($node)='tip'">tip</xsl:when>
+    <xsl:when test="local-name($node)='important'">important</xsl:when>
+    <xsl:otherwise>note</xsl:otherwise>
+  </xsl:choose>
+  <xsl:value-of select="$admon.graphics.extension"/>
+</xsl:template>
+
+<xsl:template name="graphical.admonition">
+  <xsl:variable name="admon.type">
+    <xsl:choose>
+      <xsl:when test="local-name(.)='note'">Note</xsl:when>
+      <xsl:when test="local-name(.)='warning'">Warning</xsl:when>
+      <xsl:when test="local-name(.)='caution'">Caution</xsl:when>
+      <xsl:when test="local-name(.)='tip'">Tip</xsl:when>
+      <xsl:when test="local-name(.)='important'">Important</xsl:when>
+      <xsl:otherwise>Note</xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <div class="{name(.)}">
+    <xsl:if test="$admon.style != ''">
+      <xsl:attribute name="style">
+        <xsl:value-of select="$admon.style"/>
+      </xsl:attribute>
+    </xsl:if>
+
+    <table border="0">
+      <xsl:attribute name="summary">
+        <xsl:value-of select="$admon.type"/>
+        <xsl:if test="title">
+          <xsl:text>: </xsl:text>
+          <xsl:value-of select="title"/>
+        </xsl:if>
+      </xsl:attribute>
+      <tr>
+        <td rowspan="2" align="center" valign="top">
+          <xsl:attribute name="width">
+            <xsl:call-template name="admon.graphic.width"/>
+          </xsl:attribute>
+          <img alt="[{$admon.type}]">
+            <xsl:attribute name="src">
+              <xsl:call-template name="admon.graphic"/>
+            </xsl:attribute>
+          </img>
+        </td>
+        <th align="left">
+          <xsl:call-template name="anchor"/>
+          <xsl:if test="$admon.textlabel != 0 or title">
+            <xsl:apply-templates select="." mode="object.title.markup"/>
+          </xsl:if>
+        </th>
+      </tr>
+      <tr>
+        <td colspan="2" align="left" valign="top">
+          <xsl:apply-templates/>
+        </td>
+      </tr>
+    </table>
+  </div>
+</xsl:template>
+
+<xsl:template name="nongraphical.admonition">
+  <div class="{name(.)}">
+    <xsl:if test="$admon.style">
+      <xsl:attribute name="style">
+        <xsl:value-of select="$admon.style"/>
+      </xsl:attribute>
+    </xsl:if>
+
+    <h3 class="title">
+      <xsl:call-template name="anchor"/>
+      <xsl:if test="$admon.textlabel != 0 or title">
+        <xsl:apply-templates select="." mode="object.title.markup"/>
+      </xsl:if>
+    </h3>
+
+    <xsl:apply-templates/>
+  </div>
+</xsl:template>
+
+<xsl:template match="note/title"></xsl:template>
+<xsl:template match="important/title"></xsl:template>
+<xsl:template match="warning/title"></xsl:template>
+<xsl:template match="caution/title"></xsl:template>
+<xsl:template match="tip/title"></xsl:template>
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/autoidx-ng.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/autoidx-ng.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/autoidx-ng.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,75 @@
+<?xml version="1.0"?>
+<!DOCTYPE xsl:stylesheet [
+
+<!ENTITY lowercase "'abcdefghijklmnopqrstuvwxyz'">
+<!ENTITY uppercase "'ABCDEFGHIJKLMNOPQRSTUVWXYZ'">
+
+<!ENTITY primary   'normalize-space(concat(primary/@sortas, primary[not(@sortas)]))'>
+<!ENTITY secondary 'normalize-space(concat(secondary/@sortas, secondary[not(@sortas)]))'>
+<!ENTITY tertiary  'normalize-space(concat(tertiary/@sortas, tertiary[not(@sortas)]))'>
+
+<!ENTITY sep '" "'>
+<!ENTITY scope 'count(ancestor::node()|$scope) = count(ancestor::node())'>
+]>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                version="1.0"
+                xmlns:func="http://exslt.org/functions"
+                exclude-result-prefixes="i"
+                xmlns:i="urn:cz-kosek:functions:index">
+
+<!-- ********************************************************************
+     $Id: autoidx-ng.xsl,v 1.1.1.1 2004/10/19 21:21:45 juntao Exp $
+     ********************************************************************
+
+     This file is part of the DocBook XSL Stylesheet distribution.
+     See ../README or http://docbook.sf.net/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<xsl:include href="../common/autoidx-ng.xsl"/>
+
+<!-- Modified original code is using index group codes instead of just first letter 
+     to gain better grouping -->
+<xsl:template name="generate-index">
+  <xsl:param name="scope" select="(ancestor::book|/)[last()]"/>
+
+  <xsl:variable name="terms"
+                select="//indexterm[count(.|key('group-code',
+                                                i:group-index(&primary;))[&scope;][1]) = 1
+                                    and not(@class = 'endofrange')]"/>
+
+  <div class="index">
+    <xsl:apply-templates select="$terms" mode="index-div">
+      <xsl:with-param name="scope" select="$scope"/>
+      <xsl:sort select="i:group-index(&primary;)" data-type="number"/>
+    </xsl:apply-templates>
+  </div>
+</xsl:template>
+
+<xsl:template match="indexterm" mode="index-div">
+  <xsl:param name="scope" select="."/>
+
+  <xsl:variable name="key"
+                select="i:group-index(&primary;)"/>
+
+  <xsl:if test="key('group-code', $key)[&scope;]
+                [count(.|key('primary', &primary;)[&scope;][1]) = 1]">
+    <div class="indexdiv">
+      <h3>
+        <xsl:value-of select="i:group-letter($key)"/>
+      </h3>
+      <dl>
+        <xsl:apply-templates select="key('group-code', $key)[&scope;]
+                                     [count(.|key('primary', &primary;)[&scope;][1])=1]"
+                             mode="index-primary">
+          <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/>
+          <xsl:with-param name="scope" select="$scope"/>
+        </xsl:apply-templates>
+      </dl>
+    </div>
+  </xsl:if>
+</xsl:template>
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/autoidx.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/autoidx.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/autoidx.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,415 @@
+<?xml version="1.0"?>
+<!DOCTYPE xsl:stylesheet [
+
+<!ENTITY lowercase "'abcdefghijklmnopqrstuvwxyz'">
+<!ENTITY uppercase "'ABCDEFGHIJKLMNOPQRSTUVWXYZ'">
+
+<!ENTITY primary   'normalize-space(concat(primary/@sortas, primary[not(@sortas)]))'>
+<!ENTITY secondary 'normalize-space(concat(secondary/@sortas, secondary[not(@sortas)]))'>
+<!ENTITY tertiary  'normalize-space(concat(tertiary/@sortas, tertiary[not(@sortas)]))'>
+
+<!ENTITY section   '(ancestor-or-self::set
+                     |ancestor-or-self::book
+                     |ancestor-or-self::part
+                     |ancestor-or-self::reference
+                     |ancestor-or-self::partintro
+                     |ancestor-or-self::chapter
+                     |ancestor-or-self::appendix
+                     |ancestor-or-self::preface
+                     |ancestor-or-self::article
+                     |ancestor-or-self::section
+                     |ancestor-or-self::sect1
+                     |ancestor-or-self::sect2
+                     |ancestor-or-self::sect3
+                     |ancestor-or-self::sect4
+                     |ancestor-or-self::sect5
+                     |ancestor-or-self::refentry
+                     |ancestor-or-self::refsect1
+                     |ancestor-or-self::refsect2
+                     |ancestor-or-self::refsect3
+                     |ancestor-or-self::simplesect
+                     |ancestor-or-self::bibliography
+                     |ancestor-or-self::glossary
+                     |ancestor-or-self::index
+                     |ancestor-or-self::webpage)[last()]'>
+
+<!ENTITY section.id 'generate-id(&section;)'>
+<!ENTITY sep '" "'>
+<!ENTITY scope 'count(ancestor::node()|$scope) = count(ancestor::node())'>
+]>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                version="1.0">
+
+<!-- ********************************************************************
+     $Id: autoidx.xsl,v 1.1.1.1 2004/10/19 21:21:45 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- ==================================================================== -->
+<!-- Jeni Tennison gets all the credit for what follows.
+     I think I understand it :-) Anyway, I've hacked it a bit, so the
+     bugs are mine. -->
+
+<xsl:key name="letter"
+         match="indexterm"
+         use="translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;)"/>
+
+<xsl:key name="primary"
+         match="indexterm"
+         use="&primary;"/>
+
+<xsl:key name="secondary"
+         match="indexterm"
+         use="concat(&primary;, &sep;, &secondary;)"/>
+
+<xsl:key name="tertiary"
+         match="indexterm"
+         use="concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;)"/>
+
+<xsl:key name="endofrange"
+         match="indexterm[@class='endofrange']"
+         use="@startref"/>
+
+<xsl:key name="primary-section"
+         match="indexterm[not(secondary) and not(see)]"
+         use="concat(&primary;, &sep;, &section.id;)"/>
+
+<xsl:key name="secondary-section"
+         match="indexterm[not(tertiary) and not(see)]"
+         use="concat(&primary;, &sep;, &secondary;, &sep;, &section.id;)"/>
+
+<xsl:key name="tertiary-section"
+         match="indexterm[not(see)]"
+         use="concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, &section.id;)"/>
+
+<xsl:key name="see-also"
+         match="indexterm[seealso]"
+         use="concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, seealso)"/>
+
+<xsl:key name="see"
+         match="indexterm[see]"
+         use="concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, see)"/>
+
+<xsl:key name="sections" match="*[@id]" use="@id"/>
+
+<xsl:template name="generate-index">
+  <xsl:param name="scope" select="(ancestor::book|/)[last()]"/>
+
+  <xsl:variable name="terms"
+                select="//indexterm[count(.|key('letter',
+                                                translate(substring(&primary;, 1, 1),
+                                                          &lowercase;,
+                                                          &uppercase;))[&scope;][1]) = 1
+                                    and not(@class = 'endofrange')]"/>
+
+  <xsl:variable name="alphabetical"
+                select="$terms[contains(concat(&lowercase;, &uppercase;),
+                                        substring(&primary;, 1, 1))]"/>
+
+  <xsl:variable name="others" select="$terms[not(contains(concat(&lowercase;,
+                                                 &uppercase;),
+                                             substring(&primary;, 1, 1)))]"/>
+  <div class="index">
+    <xsl:if test="$others">
+      <div class="indexdiv">
+        <h3>
+          <xsl:call-template name="gentext">
+            <xsl:with-param name="key" select="'index symbols'"/>
+          </xsl:call-template>
+        </h3>
+        <dl>
+          <xsl:apply-templates select="$others[count(.|key('primary',
+                                       &primary;)[&scope;][1]) = 1]"
+                               mode="index-symbol-div">
+            <xsl:with-param name="scope" select="$scope"/>
+            <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/>
+          </xsl:apply-templates>
+        </dl>
+      </div>
+    </xsl:if>
+
+    <xsl:apply-templates select="$alphabetical[count(.|key('letter',
+                                 translate(substring(&primary;, 1, 1),
+                                           &lowercase;,&uppercase;))[&scope;][1]) = 1]"
+                         mode="index-div">
+      <xsl:with-param name="scope" select="$scope"/>
+      <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/>
+    </xsl:apply-templates>
+  </div>
+</xsl:template>
+
+<xsl:template match="indexterm" mode="index-div">
+  <xsl:param name="scope" select="."/>
+
+  <xsl:variable name="key"
+                select="translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;)"/>
+
+  <!-- Make sure that we don't generate a div if there are no terms in scope -->
+  <xsl:if test="key('letter', $key)[&scope;]
+                [count(.|key('primary', &primary;)[&scope;][1]) = 1]">
+    <div class="indexdiv">
+      <xsl:if test="contains(concat(&lowercase;, &uppercase;), $key)">
+        <h3>
+          <xsl:value-of select="translate($key, &lowercase;, &uppercase;)"/>
+        </h3>
+      </xsl:if>
+      <dl>
+        <xsl:apply-templates select="key('letter', $key)[&scope;]
+                                     [count(.|key('primary', &primary;)[&scope;][1])=1]"
+                             mode="index-primary">
+          <xsl:with-param name="scope" select="$scope"/>
+          <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/>
+        </xsl:apply-templates>
+      </dl>
+    </div>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="indexterm" mode="index-symbol-div">
+  <xsl:param name="scope" select="/"/>
+
+  <xsl:variable name="key" select="translate(substring(&primary;, 1, 1),
+                                             &lowercase;,&uppercase;)"/>
+
+  <xsl:apply-templates select="key('letter', $key)
+                               [count(.|key('primary', &primary;)[&scope;][1]) = 1]"
+                       mode="index-primary">
+    <xsl:with-param name="scope" select="$scope"/>
+    <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="indexterm" mode="index-primary">
+  <xsl:param name="scope" select="."/>
+
+  <xsl:variable name="key" select="&primary;"/>
+  <xsl:variable name="refs" select="key('primary', $key)[&scope;]"/>
+  <dt>
+    <xsl:value-of select="primary"/>
+    <xsl:for-each select="$refs[generate-id() = generate-id(key('primary-section', concat($key, &sep;, &section.id;))[&scope;][1])]">
+      <xsl:apply-templates select="." mode="reference">
+        <xsl:with-param name="scope" select="$scope"/>
+      </xsl:apply-templates>
+    </xsl:for-each>
+
+    <xsl:if test="$refs[not(secondary)]/*[self::see]">
+      <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &sep;, &sep;, see))[&scope;][1])]"
+                           mode="index-see">
+        <xsl:with-param name="scope" select="$scope"/>
+        <xsl:sort select="translate(see, &lowercase;, &uppercase;)"/>
+      </xsl:apply-templates>
+    </xsl:if>
+  </dt>
+  <xsl:if test="$refs/secondary or $refs[not(secondary)]/*[self::seealso]">
+    <dd>
+      <dl>
+        <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &sep;, &sep;, seealso))[&scope;][1])]"
+                             mode="index-seealso">
+          <xsl:with-param name="scope" select="$scope"/>
+          <xsl:sort select="translate(seealso, &lowercase;, &uppercase;)"/>
+        </xsl:apply-templates>
+        <xsl:apply-templates select="$refs[secondary and count(.|key('secondary', concat($key, &sep;, &secondary;))[&scope;][1]) = 1]" 
+                             mode="index-secondary">
+          <xsl:with-param name="scope" select="$scope"/>
+          <xsl:sort select="translate(&secondary;, &lowercase;, &uppercase;)"/>
+        </xsl:apply-templates>
+      </dl>
+    </dd>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="indexterm" mode="index-secondary">
+  <xsl:param name="scope" select="."/>
+
+  <xsl:variable name="key" select="concat(&primary;, &sep;, &secondary;)"/>
+  <xsl:variable name="refs" select="key('secondary', $key)[&scope;]"/>
+  <dt>
+    <xsl:value-of select="secondary"/>
+    <xsl:for-each select="$refs[generate-id() = generate-id(key('secondary-section', concat($key, &sep;, &section.id;))[&scope;][1])]">
+      <xsl:apply-templates select="." mode="reference">
+        <xsl:with-param name="scope" select="$scope"/>
+      </xsl:apply-templates>
+    </xsl:for-each>
+
+    <xsl:if test="$refs[not(tertiary)]/*[self::see]">
+      <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &secondary;, &sep;, &sep;, see))[&scope;][1])]"
+                           mode="index-see">
+        <xsl:with-param name="scope" select="$scope"/>
+        <xsl:sort select="translate(see, &lowercase;, &uppercase;)"/>
+      </xsl:apply-templates>
+    </xsl:if>
+  </dt>
+  <xsl:if test="$refs/tertiary or $refs[not(tertiary)]/*[self::seealso]">
+    <dd>
+      <dl>
+        <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &secondary;, &sep;, &sep;, seealso))[&scope;][1])]"
+                             mode="index-seealso">
+          <xsl:with-param name="scope" select="$scope"/>
+          <xsl:sort select="translate(seealso, &lowercase;, &uppercase;)"/>
+        </xsl:apply-templates>
+        <xsl:apply-templates select="$refs[tertiary and count(.|key('tertiary', concat($key, &sep;, &tertiary;))[&scope;][1]) = 1]" 
+                             mode="index-tertiary">
+          <xsl:with-param name="scope" select="$scope"/>
+          <xsl:sort select="translate(&tertiary;, &lowercase;, &uppercase;)"/>
+        </xsl:apply-templates>
+      </dl>
+    </dd>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="indexterm" mode="index-tertiary">
+  <xsl:param name="scope" select="."/>
+
+  <xsl:variable name="key" select="concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;)"/>
+  <xsl:variable name="refs" select="key('tertiary', $key)[&scope;]"/>
+  <dt>
+    <xsl:value-of select="tertiary"/>
+    <xsl:for-each select="$refs[generate-id() = generate-id(key('tertiary-section', concat($key, &sep;, &section.id;))[&scope;][1])]">
+      <xsl:apply-templates select="." mode="reference">
+        <xsl:with-param name="scope" select="$scope"/>
+      </xsl:apply-templates>
+    </xsl:for-each>
+
+    <xsl:if test="$refs/see">
+      <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, see))[&scope;][1])]"
+                           mode="index-see">
+        <xsl:with-param name="scope" select="$scope"/>
+        <xsl:sort select="translate(see, &lowercase;, &uppercase;)"/>
+      </xsl:apply-templates>
+    </xsl:if>
+  </dt>
+  <xsl:if test="$refs/seealso">
+    <dd>
+      <dl>
+        <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, see))[&scope;][1])]"
+                             mode="index-see">
+          <xsl:with-param name="scope" select="$scope"/>
+          <xsl:sort select="translate(see, &lowercase;, &uppercase;)"/>
+        </xsl:apply-templates>
+        <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, seealso))[&scope;][1])]"
+                             mode="index-seealso">
+          <xsl:with-param name="scope" select="$scope"/>
+	  <xsl:sort select="translate(seealso, &lowercase;, &uppercase;)"/>
+        </xsl:apply-templates>
+      </dl>
+    </dd>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="indexterm" mode="reference">
+  <xsl:param name="scope" select="."/>
+  <xsl:param name="separator" select="', '"/>
+
+  <xsl:value-of select="$separator"/>
+  <xsl:choose>
+    <xsl:when test="@zone and string(@zone)">
+      <xsl:call-template name="reference">
+        <xsl:with-param name="zones" select="normalize-space(@zone)"/>
+          <xsl:with-param name="scope" select="$scope"/>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:otherwise>
+      <a>
+        <xsl:variable name="title">
+          <xsl:apply-templates select="&section;" mode="title.markup"/>
+        </xsl:variable>
+
+        <xsl:attribute name="href">
+          <xsl:call-template name="href.target">
+            <xsl:with-param name="object" select="&section;"/>
+          </xsl:call-template>
+        </xsl:attribute>
+
+        <xsl:value-of select="$title"/> <!-- text only -->
+      </a>
+
+      <xsl:if test="key('endofrange', @id)[&scope;]">
+        <xsl:apply-templates select="key('endofrange', @id)[&scope;][last()]"
+                             mode="reference">
+          <xsl:with-param name="scope" select="$scope"/>
+          <xsl:with-param name="separator" select="'-'"/>
+        </xsl:apply-templates>
+      </xsl:if>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="reference">
+  <xsl:param name="scope" select="."/>
+  <xsl:param name="zones"/>
+
+  <xsl:choose>
+    <xsl:when test="contains($zones, ' ')">
+      <xsl:variable name="zone" select="substring-before($zones, ' ')"/>
+      <xsl:variable name="target" select="key('sections', $zone)[&scope;]"/>
+
+      <a>
+        <xsl:attribute name="href">
+          <xsl:call-template name="href.target">
+            <xsl:with-param name="object" select="$target[1]"/>
+          </xsl:call-template>
+        </xsl:attribute>
+        <xsl:apply-templates select="$target[1]" mode="index-title-content"/>
+      </a>
+      <xsl:text>, </xsl:text>
+      <xsl:call-template name="reference">
+        <xsl:with-param name="zones" select="substring-after($zones, ' ')"/>
+        <xsl:with-param name="scope" select="$scope"/>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:variable name="zone" select="$zones"/>
+      <xsl:variable name="target" select="key('sections', $zone)[&scope;]"/>
+
+      <a>
+        <xsl:attribute name="href">
+          <xsl:call-template name="href.target">
+            <xsl:with-param name="object" select="$target[1]"/>
+          </xsl:call-template>
+        </xsl:attribute>
+        <xsl:apply-templates select="$target[1]" mode="index-title-content"/>
+      </a>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="indexterm" mode="index-see">
+  <xsl:param name="scope" select="."/>
+
+  <xsl:text> (</xsl:text>
+  <xsl:call-template name="gentext">
+    <xsl:with-param name="key" select="'see'"/>
+  </xsl:call-template>
+  <xsl:text> </xsl:text>
+  <xsl:value-of select="see"/>
+  <xsl:text>)</xsl:text>
+</xsl:template>
+
+<xsl:template match="indexterm" mode="index-seealso">
+  <xsl:param name="scope" select="."/>
+
+  <dt>
+  <xsl:text>(</xsl:text>
+  <xsl:call-template name="gentext">
+    <xsl:with-param name="key" select="'seealso'"/>
+  </xsl:call-template>
+  <xsl:text> </xsl:text>
+  <xsl:value-of select="seealso"/>
+  <xsl:text>)</xsl:text>
+  </dt>
+</xsl:template>
+
+<xsl:template match="*" mode="index-title-content">
+  <xsl:variable name="title">
+    <xsl:apply-templates select="&section;" mode="title.markup"/>
+  </xsl:variable>
+
+  <xsl:value-of select="$title"/>
+</xsl:template>
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/autotoc.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/autotoc.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/autotoc.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,575 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: autotoc.xsl,v 1.1.1.1 2004/10/19 21:21:45 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<xsl:variable name="toc.listitem.type">
+  <xsl:choose>
+    <xsl:when test="$toc.list.type = 'dl'">dt</xsl:when>
+    <xsl:otherwise>li</xsl:otherwise>
+  </xsl:choose>
+</xsl:variable>
+
+<!-- this is just hack because dl and ul aren't completely isomorphic -->
+<xsl:variable name="toc.dd.type">
+  <xsl:choose>
+    <xsl:when test="$toc.list.type = 'dl'">dd</xsl:when>
+    <xsl:otherwise></xsl:otherwise>
+  </xsl:choose>
+</xsl:variable>
+
+<xsl:template name="make.toc">
+  <xsl:param name="toc-context" select="."/>
+  <xsl:param name="toc.title.p" select="true()"/>
+  <xsl:param name="nodes" select="/NOT-AN-ELEMENT"/>
+
+  <xsl:variable name="toc.title">
+    <xsl:if test="$toc.title.p">
+      <p>
+        <b>
+          <xsl:call-template name="gentext">
+            <xsl:with-param name="key">TableofContents</xsl:with-param>
+          </xsl:call-template>
+        </b>
+      </p>
+    </xsl:if>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="$manual.toc != ''">
+      <xsl:variable name="id">
+        <xsl:call-template name="object.id"/>
+      </xsl:variable>
+      <xsl:variable name="toc" select="document($manual.toc, .)"/>
+      <xsl:variable name="tocentry" select="$toc//tocentry[@linkend=$id]"/>
+      <xsl:if test="$tocentry and $tocentry/*">
+        <div class="toc">
+          <xsl:copy-of select="$toc.title"/>
+          <xsl:element name="{$toc.list.type}">
+            <xsl:call-template name="manual-toc">
+              <xsl:with-param name="tocentry" select="$tocentry/*[1]"/>
+            </xsl:call-template>
+          </xsl:element>
+        </div>
+      </xsl:if>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:if test="$nodes">
+        <div class="toc">
+          <xsl:copy-of select="$toc.title"/>
+          <xsl:element name="{$toc.list.type}">
+            <xsl:apply-templates select="$nodes" mode="toc">
+              <xsl:with-param name="toc-context" select="$toc-context"/>
+            </xsl:apply-templates>
+          </xsl:element>
+        </div>
+      </xsl:if>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="make.lots">
+  <xsl:param name="toc.params" select="''"/>
+  <xsl:param name="toc"/>
+
+  <xsl:if test="contains($toc.params, 'toc')">
+    <xsl:copy-of select="$toc"/>
+  </xsl:if>
+
+  <xsl:if test="contains($toc.params, 'figure')">
+    <xsl:call-template name="list.of.titles">
+      <xsl:with-param name="titles" select="'figure'"/>
+      <xsl:with-param name="nodes" select=".//figure"/>
+    </xsl:call-template>
+  </xsl:if>
+
+  <xsl:if test="contains($toc.params, 'table')">
+    <xsl:call-template name="list.of.titles">
+      <xsl:with-param name="titles" select="'table'"/>
+      <xsl:with-param name="nodes" select=".//table"/>
+    </xsl:call-template>
+  </xsl:if>
+
+  <xsl:if test="contains($toc.params, 'example')">
+    <xsl:call-template name="list.of.titles">
+      <xsl:with-param name="titles" select="'example'"/>
+      <xsl:with-param name="nodes" select=".//example"/>
+    </xsl:call-template>
+  </xsl:if>
+
+  <xsl:if test="contains($toc.params, 'equation')">
+    <xsl:call-template name="list.of.titles">
+      <xsl:with-param name="titles" select="'equation'"/>
+      <xsl:with-param name="nodes" select=".//equation[title]"/>
+    </xsl:call-template>
+  </xsl:if>
+
+  <xsl:if test="contains($toc.params, 'procedure')">
+    <xsl:call-template name="list.of.titles">
+      <xsl:with-param name="titles" select="'procedure'"/>
+      <xsl:with-param name="nodes" select=".//procedure[title]"/>
+    </xsl:call-template>
+  </xsl:if>
+</xsl:template>
+
+<!-- ====================================================================== -->
+
+<xsl:template name="set.toc">
+  <xsl:param name="toc-context" select="."/>
+
+  <xsl:call-template name="make.toc">
+    <xsl:with-param name="toc-context" select="$toc-context"/>
+    <xsl:with-param name="nodes" select="book|setindex"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="division.toc">
+  <xsl:param name="toc-context" select="."/>
+
+  <xsl:call-template name="make.toc">
+    <xsl:with-param name="toc-context" select="$toc-context"/>
+    <xsl:with-param name="nodes" select="part|reference
+                                         |preface|chapter|appendix
+                                         |article
+                                         |bibliography|glossary|index
+                                         |refentry
+                                         |bridgehead[$bridgehead.in.toc != 0]"/>
+
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="component.toc">
+  <xsl:param name="toc-context" select="."/>
+  <xsl:param name="toc.title.p" select="true()"/>
+
+  <xsl:call-template name="make.toc">
+    <xsl:with-param name="toc-context" select="$toc-context"/>
+    <xsl:with-param name="toc.title.p" select="$toc.title.p"/>
+    <xsl:with-param name="nodes" select="section|sect1|refentry
+                                         |article|bibliography|glossary
+                                         |appendix
+                                         |bridgehead[not(@renderas)
+                                                     and $bridgehead.in.toc != 0]
+                                         |.//bridgehead[@renderas='sect1'
+                                                        and $bridgehead.in.toc != 0]"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="component.toc.separator">
+  <!-- Customize to output something between
+       component.toc and first output -->
+</xsl:template>
+
+<xsl:template name="section.toc">
+  <xsl:param name="toc-context" select="."/>
+  <xsl:param name="toc.title.p" select="true()"/>
+
+  <xsl:call-template name="make.toc">
+    <xsl:with-param name="toc-context" select="$toc-context"/>
+    <xsl:with-param name="toc.title.p" select="$toc.title.p"/>
+    <xsl:with-param name="nodes"
+                    select="section|sect1|sect2|sect3|sect4|sect5|refentry
+                           |bridgehead[$bridgehead.in.toc != 0]"/>
+
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="section.toc.separator">
+  <!-- Customize to output something between
+       section.toc and first output -->
+</xsl:template>
+<!-- ==================================================================== -->
+
+<xsl:template name="subtoc">
+  <xsl:param name="toc-context" select="."/>
+  <xsl:param name="nodes" select="NOT-AN-ELEMENT"/>
+
+  <xsl:variable name="subtoc">
+    <xsl:element name="{$toc.list.type}">
+      <xsl:apply-templates mode="toc" select="$nodes">
+        <xsl:with-param name="toc-context" select="$toc-context"/>
+      </xsl:apply-templates>
+    </xsl:element>
+  </xsl:variable>
+
+  <xsl:variable name="depth">
+    <xsl:choose>
+      <xsl:when test="local-name(.) = 'section'">
+        <xsl:value-of select="count(ancestor::section) + 1"/>
+      </xsl:when>
+      <xsl:when test="local-name(.) = 'sect1'">1</xsl:when>
+      <xsl:when test="local-name(.) = 'sect2'">2</xsl:when>
+      <xsl:when test="local-name(.) = 'sect3'">3</xsl:when>
+      <xsl:when test="local-name(.) = 'sect4'">4</xsl:when>
+      <xsl:when test="local-name(.) = 'sect5'">5</xsl:when>
+      <xsl:when test="local-name(.) = 'refsect1'">1</xsl:when>
+      <xsl:when test="local-name(.) = 'refsect2'">2</xsl:when>
+      <xsl:when test="local-name(.) = 'refsect3'">3</xsl:when>
+      <xsl:when test="local-name(.) = 'simplesect'">
+        <!-- sigh... -->
+        <xsl:choose>
+          <xsl:when test="local-name(..) = 'section'">
+            <xsl:value-of select="count(ancestor::section)"/>
+          </xsl:when>
+          <xsl:when test="local-name(..) = 'sect1'">2</xsl:when>
+          <xsl:when test="local-name(..) = 'sect2'">3</xsl:when>
+          <xsl:when test="local-name(..) = 'sect3'">4</xsl:when>
+          <xsl:when test="local-name(..) = 'sect4'">5</xsl:when>
+          <xsl:when test="local-name(..) = 'sect5'">6</xsl:when>
+          <xsl:when test="local-name(..) = 'refsect1'">2</xsl:when>
+          <xsl:when test="local-name(..) = 'refsect2'">3</xsl:when>
+          <xsl:when test="local-name(..) = 'refsect3'">4</xsl:when>
+          <xsl:otherwise>1</xsl:otherwise>
+        </xsl:choose>
+      </xsl:when>
+      <xsl:otherwise>0</xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:variable name="depth.from.context" select="count(ancestor::*)-count($toc-context/ancestor::*)"/>
+
+  <xsl:variable name="subtoc.list">
+    <xsl:choose>
+      <xsl:when test="$toc.dd.type = ''">
+        <xsl:copy-of select="$subtoc"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:element name="{$toc.dd.type}">
+          <xsl:copy-of select="$subtoc"/>
+        </xsl:element>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:element name="{$toc.listitem.type}">
+    <xsl:call-template name="toc.line">
+      <xsl:with-param name="toc-context" select="$toc-context"/>
+    </xsl:call-template>
+    <xsl:if test="$toc.listitem.type = 'li'
+                  and $toc.section.depth > $depth and count($nodes)&gt;0
+                  and $toc.max.depth > $depth.from.context">
+      <xsl:copy-of select="$subtoc.list"/>
+    </xsl:if>
+  </xsl:element>
+  <xsl:if test="$toc.listitem.type != 'li'
+                and $toc.section.depth > $depth and count($nodes)&gt;0
+                and $toc.max.depth > $depth.from.context">
+    <xsl:copy-of select="$subtoc.list"/>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template name="toc.line">
+  <xsl:param name="toc-context" select="."/>
+  <xsl:param name="depth" select="1"/>
+  <xsl:param name="depth.from.context" select="8"/>
+
+ <span>
+  <xsl:attribute name="class"><xsl:value-of select="local-name(.)"/></xsl:attribute>
+  <a>
+    <xsl:attribute name="href">
+      <xsl:call-template name="href.target">
+        <xsl:with-param name="context" select="$toc-context"/>
+      </xsl:call-template>
+    </xsl:attribute>
+    
+    <xsl:variable name="label">
+      <xsl:apply-templates select="." mode="label.markup"/>
+    </xsl:variable>
+    <xsl:copy-of select="$label"/>
+    <xsl:if test="$label != ''">
+      <xsl:value-of select="$autotoc.label.separator"/>
+    </xsl:if>
+
+    <xsl:apply-templates select="." mode="titleabbrev.markup"/>
+  </a>
+  </span>
+</xsl:template>
+
+<xsl:template match="book" mode="toc">
+  <xsl:param name="toc-context" select="."/>
+
+  <xsl:call-template name="subtoc">
+    <xsl:with-param name="toc-context" select="$toc-context"/>
+    <xsl:with-param name="nodes" select="part|reference
+                                         |preface|chapter|appendix
+                                         |article
+                                         |bibliography|glossary|index
+                                         |refentry
+                                         |bridgehead[$bridgehead.in.toc != 0]"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="setindex" mode="toc">
+  <xsl:param name="toc-context" select="."/>
+
+  <!-- If the setindex tag is not empty, it should be it in the TOC -->
+  <xsl:if test="* or $generate.index != 0">
+    <xsl:call-template name="subtoc">
+      <xsl:with-param name="toc-context" select="$toc-context"/>
+    </xsl:call-template>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="part|reference" mode="toc">
+  <xsl:param name="toc-context" select="."/>
+
+  <xsl:call-template name="subtoc">
+    <xsl:with-param name="toc-context" select="$toc-context"/>
+    <xsl:with-param name="nodes" select="appendix|chapter|article
+                                         |index|glossary|bibliography
+                                         |preface|reference|refentry
+                                         |bridgehead[$bridgehead.in.toc != 0]"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="preface|chapter|appendix|article" mode="toc">
+  <xsl:param name="toc-context" select="."/>
+
+  <xsl:call-template name="subtoc">
+    <xsl:with-param name="toc-context" select="$toc-context"/>
+    <xsl:with-param name="nodes" select="section|sect1|glossary|bibliography|index
+                                         |bridgehead[$bridgehead.in.toc != 0]"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="sect1" mode="toc">
+  <xsl:param name="toc-context" select="."/>
+  <xsl:call-template name="subtoc">
+    <xsl:with-param name="toc-context" select="$toc-context"/>
+    <xsl:with-param name="nodes" select="sect2
+                                         |bridgehead[$bridgehead.in.toc != 0]"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="sect2" mode="toc">
+  <xsl:param name="toc-context" select="."/>
+
+  <xsl:call-template name="subtoc">
+    <xsl:with-param name="toc-context" select="$toc-context"/>
+    <xsl:with-param name="nodes" select="sect3
+                                         |bridgehead[$bridgehead.in.toc != 0]"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="sect3" mode="toc">
+  <xsl:param name="toc-context" select="."/>
+
+  <xsl:call-template name="subtoc">
+    <xsl:with-param name="toc-context" select="$toc-context"/>
+    <xsl:with-param name="nodes" select="sect4
+                                         |bridgehead[$bridgehead.in.toc != 0]"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="sect4" mode="toc">
+  <xsl:param name="toc-context" select="."/>
+
+  <xsl:call-template name="subtoc">
+    <xsl:with-param name="toc-context" select="$toc-context"/>
+    <xsl:with-param name="nodes" select="sect5
+                                         |bridgehead[$bridgehead.in.toc != 0]"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="sect5" mode="toc">
+  <xsl:param name="toc-context" select="."/>
+
+  <xsl:call-template name="subtoc">
+    <xsl:with-param name="toc-context" select="$toc-context"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="section" mode="toc">
+  <xsl:param name="toc-context" select="."/>
+
+  <xsl:call-template name="subtoc">
+    <xsl:with-param name="toc-context" select="$toc-context"/>
+    <xsl:with-param name="nodes" select="section
+                                         |bridgehead[$bridgehead.in.toc != 0]"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="bridgehead" mode="toc">
+  <xsl:param name="toc-context" select="."/>
+
+  <xsl:if test="$bridgehead.in.toc != 0">
+    <xsl:call-template name="subtoc">
+      <xsl:with-param name="toc-context" select="$toc-context"/>
+    </xsl:call-template>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="bibliography|glossary" mode="toc">
+  <xsl:param name="toc-context" select="."/>
+
+  <xsl:call-template name="subtoc">
+    <xsl:with-param name="toc-context" select="$toc-context"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="index" mode="toc">
+  <xsl:param name="toc-context" select="."/>
+
+  <!-- If the index tag is not empty, it should be it in the TOC -->
+  <xsl:if test="* or $generate.index != 0">
+    <xsl:call-template name="subtoc">
+      <xsl:with-param name="toc-context" select="$toc-context"/>
+    </xsl:call-template>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="refentry" mode="toc">
+  <xsl:param name="toc-context" select="."/>
+
+  <xsl:variable name="refmeta" select=".//refmeta"/>
+  <xsl:variable name="refentrytitle" select="$refmeta//refentrytitle"/>
+  <xsl:variable name="refnamediv" select=".//refnamediv"/>
+  <xsl:variable name="refname" select="$refnamediv//refname"/>
+  <xsl:variable name="title">
+    <xsl:choose>
+      <xsl:when test="$refentrytitle">
+        <xsl:apply-templates select="$refentrytitle[1]" mode="titleabbrev.markup"/>
+      </xsl:when>
+      <xsl:when test="$refname">
+        <xsl:apply-templates select="$refname[1]" mode="titleabbrev.markup"/>
+      </xsl:when>
+      <xsl:otherwise></xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:element name="{$toc.listitem.type}">
+    <a>
+      <xsl:attribute name="href">
+        <xsl:call-template name="href.target"/>
+      </xsl:attribute>
+      <xsl:copy-of select="$title"/>
+    </a>
+    <xsl:if test="$annotate.toc != 0">
+      <xsl:text> - </xsl:text>
+      <xsl:value-of select="refnamediv/refpurpose"/>
+    </xsl:if>
+  </xsl:element>
+</xsl:template>
+
+<xsl:template match="title" mode="toc">
+  <xsl:param name="toc-context" select="."/>
+
+  <a>
+    <xsl:attribute name="href">
+      <xsl:call-template name="href.target">
+        <xsl:with-param name="object" select=".."/>
+      </xsl:call-template>
+    </xsl:attribute>
+    <xsl:apply-templates/>
+  </a>
+</xsl:template>
+
+<xsl:template name="manual-toc">
+  <xsl:param name="toc-context" select="."/>
+  <xsl:param name="tocentry"/>
+
+  <!-- be careful, we don't want to change the current document to the other tree! -->
+
+  <xsl:if test="$tocentry">
+    <xsl:variable name="node" select="key('id', $tocentry/@linkend)"/>
+
+    <xsl:element name="{$toc.listitem.type}">
+      <xsl:variable name="label">
+        <xsl:apply-templates select="$node" mode="label.markup"/>
+      </xsl:variable>
+      <xsl:copy-of select="$label"/>
+      <xsl:if test="$label != ''">
+        <xsl:value-of select="$autotoc.label.separator"/>
+      </xsl:if>
+      <a>
+        <xsl:attribute name="href">
+          <xsl:call-template name="href.target">
+            <xsl:with-param name="object" select="$node"/>
+          </xsl:call-template>
+        </xsl:attribute>
+        <xsl:apply-templates select="$node" mode="titleabbrev.markup"/>
+      </a>
+    </xsl:element>
+
+    <xsl:if test="$tocentry/*">
+      <xsl:element name="{$toc.list.type}">
+        <xsl:call-template name="manual-toc">
+          <xsl:with-param name="tocentry" select="$tocentry/*[1]"/>
+        </xsl:call-template>
+      </xsl:element>
+    </xsl:if>
+
+    <xsl:if test="$tocentry/following-sibling::*">
+      <xsl:call-template name="manual-toc">
+        <xsl:with-param name="tocentry" select="$tocentry/following-sibling::*[1]"/>
+      </xsl:call-template>
+    </xsl:if>
+  </xsl:if>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="list.of.titles">
+  <xsl:param name="toc-context" select="."/>
+  <xsl:param name="titles" select="'table'"/>
+  <xsl:param name="nodes" select=".//table"/>
+
+  <xsl:if test="$nodes">
+    <div class="list-of-{$titles}s">
+      <p>
+        <b>
+          <xsl:call-template name="gentext">
+            <xsl:with-param name="key">
+              <xsl:choose>
+                <xsl:when test="$titles='table'">ListofTables</xsl:when>
+                <xsl:when test="$titles='figure'">ListofFigures</xsl:when>
+                <xsl:when test="$titles='equation'">ListofEquations</xsl:when>
+                <xsl:when test="$titles='example'">ListofExamples</xsl:when>
+                <xsl:when test="$titles='procedure'">ListofProcedures</xsl:when>
+                <xsl:otherwise>ListofUnknown</xsl:otherwise>
+              </xsl:choose>
+            </xsl:with-param>
+          </xsl:call-template>
+        </b>
+      </p>
+
+      <xsl:element name="{$toc.list.type}">
+        <xsl:apply-templates select="$nodes" mode="toc">
+          <xsl:with-param name="toc-context" select="$toc-context"/>
+        </xsl:apply-templates>
+      </xsl:element>
+    </div>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="figure|table|example|equation|procedure" mode="toc">
+  <xsl:param name="toc-context" select="."/>
+
+  <xsl:element name="{$toc.listitem.type}">
+    <xsl:variable name="label">
+      <xsl:apply-templates select="." mode="label.markup"/>
+    </xsl:variable>
+    <xsl:copy-of select="$label"/>
+    <xsl:if test="$label != ''">
+      <xsl:value-of select="$autotoc.label.separator"/>
+    </xsl:if>
+    <a>
+      <xsl:attribute name="href">
+        <xsl:call-template name="href.target"/>
+      </xsl:attribute>
+      <xsl:apply-templates select="." mode="titleabbrev.markup"/>
+    </a>
+  </xsl:element>
+</xsl:template>
+
+</xsl:stylesheet>
+

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/biblio.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/biblio.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/biblio.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1046 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: biblio.xsl,v 1.1.1.1 2004/10/19 21:21:45 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:template match="bibliography">
+  <div class="{name(.)}">
+    <xsl:if test="$generate.id.attributes != 0">
+      <xsl:attribute name="id">
+        <xsl:call-template name="object.id"/>
+      </xsl:attribute>
+    </xsl:if>
+
+    <xsl:call-template name="bibliography.titlepage"/>
+
+    <xsl:apply-templates/>
+
+    <xsl:if test="not(parent::article)">
+      <xsl:call-template name="process.footnotes"/>
+    </xsl:if>
+  </div>
+</xsl:template>
+
+<xsl:template match="bibliography/bibliographyinfo"></xsl:template>
+<xsl:template match="bibliography/title"></xsl:template>
+<xsl:template match="bibliography/subtitle"></xsl:template>
+<xsl:template match="bibliography/titleabbrev"></xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="bibliodiv">
+  <div class="{name(.)}">
+    <xsl:apply-templates/>
+  </div>
+</xsl:template>
+
+<xsl:template match="bibliodiv/title">
+  <h3 class="{name(.)}">
+    <xsl:call-template name="anchor">
+      <xsl:with-param name="node" select=".."/>
+    </xsl:call-template>
+    <xsl:apply-templates/>
+  </h3>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="bibliolist">
+  <div class="{name(.)}">
+    <xsl:call-template name="anchor"/>
+    <xsl:if test="blockinfo/title|title">
+      <xsl:call-template name="formal.object.heading"/>
+    </xsl:if>
+    <xsl:apply-templates select="*[not(self::blockinfo)
+			           and not(self::title)
+				   and not(self::titleabbrev)
+			           and not(self::biblioentry)
+				   and not(self::bibliomixed)]"/>
+    <dl>
+      <xsl:apply-templates select="biblioentry|bibliomixed"/>
+    </dl>
+  </div>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="biblioentry">
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="string(.) = ''">
+      <xsl:variable name="bib" select="document($bibliography.collection,.)"/>
+      <xsl:variable name="entry" select="$bib/bibliography/*[@id=$id][1]"/>
+      <xsl:choose>
+        <xsl:when test="$entry">
+          <xsl:apply-templates select="$entry"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:message>
+            <xsl:text>No bibliography entry: </xsl:text>
+            <xsl:value-of select="$id"/>
+            <xsl:text> found in </xsl:text>
+            <xsl:value-of select="$bibliography.collection"/>
+          </xsl:message>
+          <div class="{name(.)}">
+            <xsl:call-template name="anchor"/>
+            <p>
+              <xsl:call-template name="biblioentry.label"/>
+              <xsl:text>Error: no bibliography entry: </xsl:text>
+              <xsl:value-of select="$id"/>
+              <xsl:text> found in </xsl:text>
+              <xsl:value-of select="$bibliography.collection"/>
+            </p>
+          </div>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+    <xsl:otherwise>
+      <div class="{name(.)}">
+        <xsl:call-template name="anchor"/>
+        <p>
+          <xsl:call-template name="biblioentry.label"/>
+          <xsl:apply-templates mode="bibliography.mode"/>
+        </p>
+      </div>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="bibliomixed">
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="string(.) = ''">
+      <xsl:variable name="bib" select="document($bibliography.collection,.)"/>
+      <xsl:variable name="entry" select="$bib/bibliography/*[@id=$id][1]"/>
+      <xsl:choose>
+        <xsl:when test="$entry">
+          <xsl:apply-templates select="$entry"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:message>
+            <xsl:text>No bibliography entry: </xsl:text>
+            <xsl:value-of select="$id"/>
+            <xsl:text> found in </xsl:text>
+            <xsl:value-of select="$bibliography.collection"/>
+          </xsl:message>
+          <div class="{name(.)}">
+            <xsl:call-template name="anchor"/>
+            <p>
+              <xsl:call-template name="biblioentry.label"/>
+              <xsl:text>Error: no bibliography entry: </xsl:text>
+              <xsl:value-of select="$id"/>
+              <xsl:text> found in </xsl:text>
+              <xsl:value-of select="$bibliography.collection"/>
+            </p>
+          </div>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+    <xsl:otherwise>
+      <div class="{name(.)}">
+        <xsl:call-template name="anchor"/>
+        <p class="{name(.)}">
+          <xsl:call-template name="biblioentry.label"/>
+          <xsl:apply-templates mode="bibliomixed.mode"/>
+        </p>
+      </div>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="biblioentry.label">
+  <xsl:param name="node" select="."/>
+
+  <xsl:choose>
+    <xsl:when test="$bibliography.numbered != 0">
+      <xsl:text>[</xsl:text>
+      <xsl:number from="bibliography" count="biblioentry|bibliomixed"
+                  level="any" format="1"/>
+      <xsl:text>] </xsl:text>
+    </xsl:when>
+    <xsl:when test="local-name($node/child::*[1]) = 'abbrev'">
+      <xsl:text>[</xsl:text>
+      <xsl:apply-templates select="$node/abbrev[1]"/>
+      <xsl:text>] </xsl:text>
+    </xsl:when>
+    <xsl:when test="$node/@xreflabel">
+      <xsl:text>[</xsl:text>
+      <xsl:value-of select="$node/@xreflabel"/>
+      <xsl:text>] </xsl:text>
+    </xsl:when>
+    <xsl:when test="$node/@id">
+      <xsl:text>[</xsl:text>
+      <xsl:value-of select="$node/@id"/>
+      <xsl:text>] </xsl:text>
+    </xsl:when>
+    <xsl:otherwise><!-- nop --></xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="*" mode="bibliography.mode">
+  <xsl:apply-templates select="."/><!-- try the default mode -->
+</xsl:template>
+
+<xsl:template match="abbrev" mode="bibliography.mode">
+  <xsl:if test="preceding-sibling::*">
+    <xsl:apply-templates mode="bibliography.mode"/>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="abstract" mode="bibliography.mode">
+  <!-- suppressed -->
+</xsl:template>
+
+<xsl:template match="address" mode="bibliography.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="affiliation" mode="bibliography.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="shortaffil" mode="bibliography.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="jobtitle" mode="bibliography.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="artheader|articleinfo|info" mode="bibliography.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="artpagenums" mode="bibliography.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="author" mode="bibliography.mode">
+  <span class="{name(.)}">
+    <xsl:call-template name="person.name"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="authorblurb|personblurb" mode="bibliography.mode">
+  <!-- suppressed -->
+</xsl:template>
+
+<xsl:template match="authorgroup" mode="bibliography.mode">
+  <span class="{name(.)}">
+    <xsl:call-template name="person.name.list"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="authorinitials" mode="bibliography.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="bibliomisc" mode="bibliography.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="bibliomset" mode="bibliography.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </span>
+</xsl:template>
+
+<!-- ================================================== -->
+
+<xsl:template match="biblioset" mode="bibliography.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliography.mode"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="biblioset/title|biblioset/citetitle" 
+              mode="bibliography.mode">
+  <xsl:variable name="relation" select="../@relation"/>
+  <xsl:choose>
+    <xsl:when test="$relation='article' or @pubwork='article'">
+      <xsl:call-template name="gentext.startquote"/>
+      <xsl:apply-templates/>
+      <xsl:call-template name="gentext.endquote"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <i><xsl:apply-templates/></i>
+    </xsl:otherwise>
+  </xsl:choose>
+  <xsl:value-of select="$biblioentry.item.separator"/>
+</xsl:template>
+
+<!-- ================================================== -->
+
+<xsl:template match="bookbiblio" mode="bibliography.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="citetitle" mode="bibliography.mode">
+  <span class="{name(.)}">
+    <xsl:choose>
+      <xsl:when test="@pubwork = 'article'">
+        <xsl:call-template name="gentext.startquote"/>
+        <xsl:call-template name="inline.charseq"/>
+        <xsl:call-template name="gentext.endquote"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:call-template name="inline.italicseq"/>
+      </xsl:otherwise>
+    </xsl:choose>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="collab" mode="bibliography.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="collabname" mode="bibliography.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="confgroup" mode="bibliography.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="confdates" mode="bibliography.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="conftitle" mode="bibliography.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="confnum" mode="bibliography.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="confsponsor" mode="bibliography.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="contractnum" mode="bibliography.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="contractsponsor" mode="bibliography.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="contrib" mode="bibliography.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </span>
+</xsl:template>
+
+<!-- ================================================== -->
+
+<xsl:template match="copyright" mode="bibliography.mode">
+  <span class="{name(.)}">
+    <xsl:call-template name="gentext">
+      <xsl:with-param name="key" select="'Copyright'"/>
+    </xsl:call-template>
+    <xsl:call-template name="gentext.space"/>
+    <xsl:call-template name="dingbat">
+      <xsl:with-param name="dingbat">copyright</xsl:with-param>
+    </xsl:call-template>
+    <xsl:call-template name="gentext.space"/>
+    <xsl:apply-templates select="year" mode="bibliography.mode"/>
+    <xsl:if test="holder">
+      <xsl:call-template name="gentext.space"/>
+      <xsl:apply-templates select="holder" mode="bibliography.mode"/>
+    </xsl:if>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="year" mode="bibliography.mode">
+  <xsl:apply-templates/><xsl:text>, </xsl:text>
+</xsl:template>
+
+<xsl:template match="year[position()=last()]" mode="bibliography.mode">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="holder" mode="bibliography.mode">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<!-- ================================================== -->
+
+<xsl:template match="corpauthor" mode="bibliography.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="corpname" mode="bibliography.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="date" mode="bibliography.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="edition" mode="bibliography.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="editor" mode="bibliography.mode">
+  <span class="{name(.)}">
+    <xsl:call-template name="person.name"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="firstname" mode="bibliography.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="honorific" mode="bibliography.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="indexterm" mode="bibliography.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="invpartnumber" mode="bibliography.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="isbn" mode="bibliography.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="issn" mode="bibliography.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="issuenum" mode="bibliography.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="lineage" mode="bibliography.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="orgname" mode="bibliography.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="orgdiv" mode="bibliography.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="othercredit" mode="bibliography.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="othername" mode="bibliography.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="pagenums" mode="bibliography.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="printhistory" mode="bibliography.mode">
+  <!-- suppressed -->
+</xsl:template>
+
+<xsl:template match="productname" mode="bibliography.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="productnumber" mode="bibliography.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="pubdate" mode="bibliography.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="publisher" mode="bibliography.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliography.mode"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="publishername" mode="bibliography.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="pubsnumber" mode="bibliography.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="releaseinfo" mode="bibliography.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="revhistory" mode="bibliography.mode">
+  <!-- suppressed; how could this be represented? -->
+</xsl:template>
+
+<xsl:template match="seriesinfo" mode="bibliography.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliography.mode"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="seriesvolnums" mode="bibliography.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="bibliography.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="surname" mode="bibliography.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="title" mode="bibliography.mode">
+  <span class="{name(.)}">
+    <i><xsl:apply-templates mode="bibliography.mode"/></i>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="titleabbrev" mode="bibliography.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="volumenum" mode="bibliography.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="bibliocoverage|biblioid|bibliorelation|bibliosource"
+              mode="bibliography.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliography.mode"/>
+    <xsl:value-of select="$biblioentry.item.separator"/>
+  </span>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="*" mode="bibliomixed.mode">
+  <xsl:apply-templates select="."/><!-- try the default mode -->
+</xsl:template>
+
+<xsl:template match="abbrev" mode="bibliomixed.mode">
+  <xsl:if test="preceding-sibling::*">
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="abstract" mode="bibliomixed.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="address" mode="bibliomixed.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="affiliation" mode="bibliomixed.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="shortaffil" mode="bibliomixed.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="jobtitle" mode="bibliomixed.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="artpagenums" mode="bibliomixed.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="author" mode="bibliomixed.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="authorblurb|personblurb" mode="bibliomixed.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="authorgroup" mode="bibliomixed.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="authorinitials" mode="bibliomixed.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="bibliomisc" mode="bibliomixed.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </span>
+</xsl:template>
+
+<!-- ================================================== -->
+
+<xsl:template match="bibliomset" mode="bibliomixed.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="bibliomset/title|bibliomset/citetitle" 
+              mode="bibliomixed.mode">
+  <xsl:variable name="relation" select="../@relation"/>
+  <xsl:choose>
+    <xsl:when test="$relation='article' or @pubwork='article'">
+      <xsl:call-template name="gentext.startquote"/>
+      <xsl:apply-templates/>
+      <xsl:call-template name="gentext.endquote"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <i><xsl:apply-templates/></i>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- ================================================== -->
+
+<xsl:template match="biblioset" mode="bibliomixed.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="citetitle" mode="bibliomixed.mode">
+  <span class="{name(.)}">
+    <xsl:choose>
+      <xsl:when test="@pubwork = 'article'">
+        <xsl:call-template name="gentext.startquote"/>
+        <xsl:call-template name="inline.charseq"/>
+        <xsl:call-template name="gentext.endquote"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:call-template name="inline.italicseq"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </span>
+</xsl:template>
+
+
+<xsl:template match="collab" mode="bibliomixed.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="confgroup" mode="bibliomixed.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="contractnum" mode="bibliomixed.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="contractsponsor" mode="bibliomixed.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="contrib" mode="bibliomixed.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="copyright" mode="bibliomixed.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="corpauthor" mode="bibliomixed.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="corpname" mode="bibliomixed.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="date" mode="bibliomixed.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="edition" mode="bibliomixed.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="editor" mode="bibliomixed.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="firstname" mode="bibliomixed.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="honorific" mode="bibliomixed.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="indexterm" mode="bibliomixed.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="invpartnumber" mode="bibliomixed.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="isbn" mode="bibliomixed.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="issn" mode="bibliomixed.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="issuenum" mode="bibliomixed.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="lineage" mode="bibliomixed.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="orgname" mode="bibliomixed.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="othercredit" mode="bibliomixed.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="othername" mode="bibliomixed.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="pagenums" mode="bibliomixed.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="printhistory" mode="bibliomixed.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="productname" mode="bibliomixed.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="productnumber" mode="bibliomixed.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="pubdate" mode="bibliomixed.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="publisher" mode="bibliomixed.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="publishername" mode="bibliomixed.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="pubsnumber" mode="bibliomixed.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="releaseinfo" mode="bibliomixed.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="revhistory" mode="bibliomixed.mode">
+  <!-- suppressed; how could this be represented? -->
+</xsl:template>
+
+<xsl:template match="seriesvolnums" mode="bibliomixed.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="bibliomixed.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="surname" mode="bibliomixed.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="title" mode="bibliomixed.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="titleabbrev" mode="bibliomixed.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="volumenum" mode="bibliomixed.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="bibliocoverage|biblioid|bibliorelation|bibliosource"
+              mode="bibliomixed.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="bibliomixed.mode"/>
+  </span>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/block.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/block.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/block.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,426 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: block.xsl,v 1.1.1.1 2004/10/19 21:21:45 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- ==================================================================== -->
+<!-- What should we do about styling blockinfo? -->
+
+<xsl:template match="blockinfo">
+  <!-- suppress -->
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="block.object">
+  <div class="{name(.)}">
+    <xsl:call-template name="anchor"/>
+    <xsl:apply-templates/>
+  </div>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="para">
+  <xsl:call-template name="paragraph">
+    <xsl:with-param name="class">
+      <xsl:if test="@role and $para.propagates.style != 0">
+        <xsl:value-of select="@role"/>
+      </xsl:if>
+    </xsl:with-param>
+    <xsl:with-param name="content">
+      <xsl:if test="position() = 1 and parent::listitem">
+        <xsl:call-template name="anchor">
+          <xsl:with-param name="node" select="parent::listitem"/>
+        </xsl:call-template>
+      </xsl:if>
+
+      <xsl:call-template name="anchor"/>
+      <xsl:apply-templates/>
+    </xsl:with-param>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="paragraph">
+  <xsl:param name="class" select="''"/>
+  <xsl:param name="content"/>
+
+  <xsl:variable name="p">
+    <p>
+      <xsl:if test="$class != ''">
+        <xsl:attribute name="class">
+          <xsl:value-of select="$class"/>
+        </xsl:attribute>
+      </xsl:if>
+      <xsl:copy-of select="$content"/>
+    </p>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="$html.cleanup != 0">
+      <xsl:call-template name="unwrap.p">
+        <xsl:with-param name="p" select="$p"/>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:copy-of select="$p"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="simpara">
+  <!-- see also listitem/simpara in lists.xsl -->
+  <p>
+    <xsl:if test="@role and $para.propagates.style != 0">
+      <xsl:attribute name="class">
+        <xsl:value-of select="@role"/>
+      </xsl:attribute>
+    </xsl:if>
+
+    <xsl:call-template name="anchor"/>
+    <xsl:apply-templates/>
+  </p>
+</xsl:template>
+
+<xsl:template match="formalpara">
+  <xsl:call-template name="paragraph">
+    <xsl:with-param name="class">
+      <xsl:if test="@role and $para.propagates.style != 0">
+        <xsl:value-of select="@role"/>
+      </xsl:if>
+    </xsl:with-param>
+    <xsl:with-param name="content">
+      <xsl:call-template name="anchor"/>
+      <xsl:apply-templates/>
+    </xsl:with-param>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="formalpara/title">
+  <xsl:variable name="titleStr">
+      <xsl:apply-templates/>
+  </xsl:variable>
+  <xsl:variable name="lastChar">
+    <xsl:if test="$titleStr != ''">
+      <xsl:value-of select="substring($titleStr,string-length($titleStr),1)"/>
+    </xsl:if>
+  </xsl:variable>
+
+  <b>
+    <xsl:copy-of select="$titleStr"/>
+    <xsl:if test="$lastChar != ''
+                  and not(contains($runinhead.title.end.punct, $lastChar))">
+      <xsl:value-of select="$runinhead.default.title.end.punct"/>
+    </xsl:if>
+    <xsl:text>&#160;</xsl:text>
+  </b>
+</xsl:template>
+
+<xsl:template match="formalpara/para">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="blockquote">
+  <div class="{local-name(.)}">
+    <xsl:if test="@lang or @xml:lang">
+      <xsl:call-template name="language.attribute"/>
+    </xsl:if>
+    <xsl:call-template name="anchor"/>
+
+    <xsl:choose>
+      <xsl:when test="attribution">
+        <table border="0" width="100%"
+               cellspacing="0" cellpadding="0" class="blockquote"
+               summary="Block quote">
+          <tr>
+            <td width="10%" valign="top">&#160;</td>
+            <td width="80%" valign="top">
+              <xsl:apply-templates select="child::*[local-name(.)!='attribution']"/>
+            </td>
+            <td width="10%" valign="top">&#160;</td>
+          </tr>
+          <tr>
+            <td colspan="2" align="right" valign="top">
+              <xsl:text>--</xsl:text>
+              <xsl:apply-templates select="attribution"/>
+            </td>
+            <td width="10%" valign="top">&#160;</td>
+          </tr>
+        </table>
+      </xsl:when>
+      <xsl:otherwise>
+        <blockquote class="{local-name(.)}">
+          <xsl:apply-templates/>
+        </blockquote>
+      </xsl:otherwise>
+    </xsl:choose>
+  </div>
+</xsl:template>
+
+<xsl:template match="blockquote/title">
+  <div class="blockquote-title">
+    <p>
+      <b>
+        <xsl:apply-templates/>
+      </b>
+    </p>
+  </div>
+</xsl:template>
+
+<xsl:template match="epigraph">
+  <div class="{name(.)}">
+      <xsl:apply-templates select="para|simpara|formalpara|literallayout"/>
+      <xsl:if test="attribution">
+        <div class="attribution">
+          <span>--<xsl:apply-templates select="attribution"/></span>
+        </div>
+      </xsl:if>
+  </div>
+</xsl:template>
+
+<xsl:template match="attribution">
+  <span class="{name(.)}"><xsl:apply-templates/></span>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="sidebar">
+  <div class="{name(.)}">
+    <xsl:call-template name="anchor"/>
+    <xsl:apply-templates/>
+  </div>
+</xsl:template>
+
+<xsl:template match="sidebar/title">
+  <p class="title">
+    <b><xsl:apply-templates/></b>
+  </p>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="abstract">
+  <div class="{name(.)}">
+    <xsl:call-template name="anchor"/>
+    <xsl:call-template name="formal.object.heading">
+      <xsl:with-param name="title">
+        <xsl:apply-templates select="." mode="title.markup">
+          <xsl:with-param name="allow-anchors" select="'1'"/>
+        </xsl:apply-templates>
+      </xsl:with-param>
+    </xsl:call-template>
+    <xsl:apply-templates/>
+  </div>
+</xsl:template>
+
+<xsl:template match="abstract/title">
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="msgset">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="msgentry">
+  <xsl:call-template name="block.object"/>
+</xsl:template>
+
+<xsl:template match="simplemsgentry">
+  <xsl:call-template name="block.object"/>
+</xsl:template>
+
+<xsl:template match="msg">
+  <xsl:call-template name="block.object"/>
+</xsl:template>
+
+<xsl:template match="msgmain">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="msgmain/title">
+  <b><xsl:apply-templates/></b>
+</xsl:template>
+
+<xsl:template match="msgsub">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="msgsub/title">
+  <b><xsl:apply-templates/></b>
+</xsl:template>
+
+<xsl:template match="msgrel">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="msgrel/title">
+  <b><xsl:apply-templates/></b>
+</xsl:template>
+
+<xsl:template match="msgtext">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="msginfo">
+  <xsl:call-template name="block.object"/>
+</xsl:template>
+
+<xsl:template match="msglevel">
+  <p>
+    <b>
+      <xsl:call-template name="gentext.template">
+        <xsl:with-param name="context" select="'msgset'"/>
+        <xsl:with-param name="name" select="'MsgLevel'"/>
+      </xsl:call-template>
+    </b>
+    <xsl:apply-templates/>
+  </p>
+</xsl:template>
+
+<xsl:template match="msgorig">
+  <p>
+    <b>
+      <xsl:call-template name="gentext.template">
+        <xsl:with-param name="context" select="'msgset'"/>
+        <xsl:with-param name="name" select="'MsgOrig'"/>
+      </xsl:call-template>
+    </b>
+    <xsl:apply-templates/>
+  </p>
+</xsl:template>
+
+<xsl:template match="msgaud">
+  <p>
+    <b>
+      <xsl:call-template name="gentext.template">
+        <xsl:with-param name="context" select="'msgset'"/>
+        <xsl:with-param name="name" select="'MsgAud'"/>
+      </xsl:call-template>
+    </b>
+    <xsl:apply-templates/>
+  </p>
+</xsl:template>
+
+<xsl:template match="msgexplan">
+  <xsl:call-template name="block.object"/>
+</xsl:template>
+
+<xsl:template match="msgexplan/title">
+  <p><b><xsl:apply-templates/></b></p>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="revhistory">
+  <div class="{name(.)}">
+    <table border="0" width="100%" summary="Revision history">
+      <tr>
+        <th align="left" valign="top" colspan="3">
+          <b>
+            <xsl:call-template name="gentext">
+              <xsl:with-param name="key" select="'RevHistory'"/>
+            </xsl:call-template>
+          </b>
+        </th>
+      </tr>
+      <xsl:apply-templates/>
+    </table>
+  </div>
+</xsl:template>
+
+<xsl:template match="revhistory/revision">
+  <xsl:variable name="revnumber" select=".//revnumber"/>
+  <xsl:variable name="revdate"   select=".//date"/>
+  <xsl:variable name="revauthor" select=".//authorinitials"/>
+  <xsl:variable name="revremark" select=".//revremark|.//revdescription"/>
+  <tr>
+    <td align="left">
+      <xsl:if test="$revnumber">
+        <xsl:call-template name="gentext">
+          <xsl:with-param name="key" select="'Revision'"/>
+        </xsl:call-template>
+        <xsl:call-template name="gentext.space"/>
+        <xsl:apply-templates select="$revnumber"/>
+      </xsl:if>
+    </td>
+    <td align="left">
+      <xsl:apply-templates select="$revdate"/>
+    </td>
+    <xsl:choose>
+      <xsl:when test="count($revauthor)=0">
+        <td align="left">
+          <xsl:call-template name="dingbat">
+            <xsl:with-param name="dingbat">nbsp</xsl:with-param>
+          </xsl:call-template>
+        </td>
+      </xsl:when>
+      <xsl:otherwise>
+        <td align="left">
+          <xsl:apply-templates select="$revauthor"/>
+        </td>
+      </xsl:otherwise>
+    </xsl:choose>
+  </tr>
+  <xsl:if test="$revremark">
+    <tr>
+      <td align="left" colspan="3">
+        <xsl:apply-templates select="$revremark"/>
+      </td>
+    </tr>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="revision/revnumber">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="revision/date">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="revision/authorinitials">
+  <xsl:text>, </xsl:text>
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="revision/authorinitials[1]" priority="2">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="revision/revremark">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="revision/revdescription">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="ackno">
+  <p class="{name(.)}">
+    <xsl:apply-templates/>
+  </p>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="highlights">
+  <xsl:call-template name="block.object"/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/callout.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/callout.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/callout.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,197 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:sverb="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.Verbatim"
+                xmlns:xverb="com.nwalsh.xalan.Verbatim"
+                xmlns:lxslt="http://xml.apache.org/xslt"
+                exclude-result-prefixes="sverb xverb lxslt"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: callout.xsl,v 1.1.1.1 2004/10/19 21:21:45 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<lxslt:component prefix="xverb"
+                 functions="insertCallouts"/>
+
+<xsl:template match="programlistingco|screenco">
+  <xsl:variable name="verbatim" select="programlisting|screen"/>
+
+  <xsl:choose>
+    <xsl:when test="$use.extensions != '0'
+                    and $callouts.extension != '0'">
+      <xsl:variable name="rtf">
+        <xsl:apply-templates select="$verbatim">
+          <xsl:with-param name="suppress-numbers" select="'1'"/>
+        </xsl:apply-templates>
+      </xsl:variable>
+
+      <xsl:variable name="rtf-with-callouts">
+        <xsl:choose>
+          <xsl:when test="function-available('sverb:insertCallouts')">
+            <xsl:copy-of select="sverb:insertCallouts(areaspec,$rtf)"/>
+          </xsl:when>
+          <xsl:when test="function-available('xverb:insertCallouts')">
+            <xsl:copy-of select="xverb:insertCallouts(areaspec,$rtf)"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:message terminate="yes">
+              <xsl:text>No insertCallouts function is available.</xsl:text>
+            </xsl:message>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:variable>
+
+      <xsl:choose>
+        <xsl:when test="$verbatim/@linenumbering = 'numbered'
+                        and $linenumbering.extension != '0'">
+          <div class="{name(.)}">
+            <xsl:call-template name="number.rtf.lines">
+              <xsl:with-param name="rtf" select="$rtf-with-callouts"/>
+              <xsl:with-param name="pi.context"
+                              select="programlisting|screen"/>
+            </xsl:call-template>
+            <xsl:apply-templates select="calloutlist"/>
+          </div>
+        </xsl:when>
+        <xsl:otherwise>
+          <div class="{name(.)}">
+            <xsl:copy-of select="$rtf-with-callouts"/>
+            <xsl:apply-templates select="calloutlist"/>
+          </div>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+    <xsl:otherwise>
+      <div class="{name(.)}">
+        <xsl:apply-templates/>
+      </div>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="areaspec|areaset|area">
+</xsl:template>
+
+<xsl:template match="areaset" mode="conumber">
+  <xsl:number count="area|areaset" format="1"/>
+</xsl:template>
+
+<xsl:template match="area" mode="conumber">
+  <xsl:number count="area|areaset" format="1"/>
+</xsl:template>
+
+<xsl:template match="co" name="co">
+  <!-- Support a single linkend in HTML -->
+  <xsl:variable name="targets" select="key('id', @linkends)"/>
+  <xsl:variable name="target" select="$targets[1]"/>
+  <xsl:choose>
+    <xsl:when test="$target">
+      <a>
+        <xsl:if test="@id">
+          <xsl:attribute name="name">
+            <xsl:value-of select="@id"/>
+          </xsl:attribute>
+        </xsl:if>
+        <xsl:attribute name="href">
+          <xsl:call-template name="href.target">
+            <xsl:with-param name="object" select="$target"/>
+          </xsl:call-template>
+        </xsl:attribute>
+        <xsl:apply-templates select="." mode="callout-bug"/>
+      </a>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:call-template name="anchor"/>
+      <xsl:apply-templates select="." mode="callout-bug"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="coref">
+  <!-- tricky; this relies on the fact that we can process the "co" that's -->
+  <!-- "over there" as if it were "right here" -->
+
+  <xsl:variable name="co" select="key('id', @linkend)"/>
+  <xsl:choose>
+    <xsl:when test="not($co)">
+      <xsl:message>
+        <xsl:text>Error: coref link is broken: </xsl:text>
+        <xsl:value-of select="@linkend"/>
+      </xsl:message>
+    </xsl:when>
+    <xsl:when test="local-name($co) != 'co'">
+      <xsl:message>
+        <xsl:text>Error: coref doesn't point to a co: </xsl:text>
+        <xsl:value-of select="@linkend"/>
+      </xsl:message>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:apply-templates select="$co"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="co" mode="callout-bug">
+  <xsl:call-template name="callout-bug">
+    <xsl:with-param name="conum">
+      <xsl:number count="co"
+                  level="any"
+                  from="programlisting|screen|literallayout|synopsis"
+                  format="1"/>
+    </xsl:with-param>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="callout-bug">
+  <xsl:param name="conum" select='1'/>
+
+  <xsl:choose>
+    <xsl:when test="$callout.graphics != 0
+                    and $conum &lt;= $callout.graphics.number.limit">
+      <img src="{$callout.graphics.path}{$conum}{$callout.graphics.extension}"
+           alt="{$conum}" border="0"/>
+    </xsl:when>
+    <xsl:when test="$callout.unicode != 0
+                    and $conum &lt;= $callout.unicode.number.limit">
+      <xsl:choose>
+        <xsl:when test="$callout.unicode.start.character = 10102">
+          <xsl:choose>
+            <xsl:when test="$conum = 1">&#10102;</xsl:when>
+            <xsl:when test="$conum = 2">&#10103;</xsl:when>
+            <xsl:when test="$conum = 3">&#10104;</xsl:when>
+            <xsl:when test="$conum = 4">&#10105;</xsl:when>
+            <xsl:when test="$conum = 5">&#10106;</xsl:when>
+            <xsl:when test="$conum = 6">&#10107;</xsl:when>
+            <xsl:when test="$conum = 7">&#10108;</xsl:when>
+            <xsl:when test="$conum = 8">&#10109;</xsl:when>
+            <xsl:when test="$conum = 9">&#10110;</xsl:when>
+            <xsl:when test="$conum = 10">&#10111;</xsl:when>
+          </xsl:choose>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:message>
+            <xsl:text>Don't know how to generate Unicode callouts </xsl:text>
+            <xsl:text>when $callout.unicode.start.character is </xsl:text>
+            <xsl:value-of select="$callout.unicode.start.character"/>
+          </xsl:message>
+          <xsl:text>(</xsl:text>
+          <xsl:value-of select="$conum"/>
+          <xsl:text>)</xsl:text>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:text>(</xsl:text>
+      <xsl:value-of select="$conum"/>
+      <xsl:text>)</xsl:text>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/changebars.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/changebars.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/changebars.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,96 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                version="1.0">
+
+<!-- ********************************************************************
+     $Id: changebars.xsl,v 1.1.1.1 2004/10/19 21:21:45 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- ==================================================================== -->
+<xsl:import href="docbook.xsl"/>
+
+<xsl:param name="show.revisionflag" select="'1'"/>
+
+<xsl:template name="system.head.content">
+<style type="text/css">
+<xsl:text>
+div.added    { background-color: #ffff99; }
+div.deleted  { text-decoration: line-through;
+               background-color: #FF7F7F; }
+div.changed  { background-color: #99ff99; }
+div.off      {  }
+
+span.added   { background-color: #ffff99; }
+span.deleted { text-decoration: line-through;
+               background-color: #FF7F7F; }
+span.changed { background-color: #99ff99; }
+span.off     {  }
+</xsl:text>
+</style>
+</xsl:template>
+
+<xsl:template match="*[@revisionflag]">
+  <xsl:choose>
+    <xsl:when test="local-name(.) = 'para'
+                    or local-name(.) = 'simpara'
+                    or local-name(.) = 'formalpara'
+                    or local-name(.) = 'section'
+                    or local-name(.) = 'sect1'
+                    or local-name(.) = 'sect2'
+                    or local-name(.) = 'sect3'
+                    or local-name(.) = 'sect4'
+                    or local-name(.) = 'sect5'
+                    or local-name(.) = 'chapter'
+                    or local-name(.) = 'preface'
+                    or local-name(.) = 'itemizedlist'
+                    or local-name(.) = 'varlistentry'
+                    or local-name(.) = 'glossary'
+                    or local-name(.) = 'bibliography'
+                    or local-name(.) = 'index'
+                    or local-name(.) = 'appendix'">
+      <div class='{@revisionflag}'>
+	<xsl:apply-imports/>
+      </div>
+    </xsl:when>
+    <xsl:when test="local-name(.) = 'phrase'
+                    or local-name(.) = 'ulink'
+                    or local-name(.) = 'link'
+                    or local-name(.) = 'filename'
+                    or local-name(.) = 'literal'
+                    or local-name(.) = 'member'
+                    or local-name(.) = 'glossterm'
+                    or local-name(.) = 'sgmltag'
+                    or local-name(.) = 'quote'
+                    or local-name(.) = 'emphasis'
+                    or local-name(.) = 'command'
+                    or local-name(.) = 'xref'">
+      <span class='{@revisionflag}'>
+	<xsl:apply-imports/>
+      </span>
+    </xsl:when>
+    <xsl:when test="local-name(.) = 'listitem'
+                    or local-name(.) = 'entry'
+                    or local-name(.) = 'title'">
+      <!-- nop; these are handled directly in the stylesheet -->
+      <xsl:apply-imports/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:message>
+	<xsl:text>Revisionflag on unexpected element: </xsl:text>
+	<xsl:value-of select="local-name(.)"/>
+	<xsl:text> (Assuming block)</xsl:text>
+      </xsl:message>
+      <div class='{@revisionflag}'>
+	<xsl:apply-imports/>
+      </div>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/chunk-code.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/chunk-code.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/chunk-code.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,823 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:exsl="http://exslt.org/common"
+		version="1.0"
+                exclude-result-prefixes="exsl">
+
+<!-- ********************************************************************
+     $Id: chunk-code.xsl,v 1.1.1.1 2004/10/19 21:21:46 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:param name="onechunk" select="0"/>
+<xsl:param name="refentry.separator" select="0"/>
+<xsl:param name="chunk.fast" select="0"/>
+
+<xsl:key name="genid" match="*" use="generate-id()"/>
+
+<!-- ==================================================================== -->
+
+<xsl:variable name="chunk.hierarchy">
+  <xsl:if test="$chunk.fast != 0">
+    <xsl:choose>
+      <xsl:when test="function-available('exsl:node-set')">
+        <xsl:message>Computing chunks...</xsl:message>
+        <xsl:apply-templates select="/*" mode="find.chunks"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:message>
+          <xsl:text>Fast chunking requires exsl:node-set(). </xsl:text>
+          <xsl:text>Using "slow" chunking.</xsl:text>
+        </xsl:message>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:if>
+</xsl:variable>
+
+<xsl:template match="*" mode="find.chunks">
+  <xsl:variable name="chunk">
+    <xsl:call-template name="chunk"/>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="$chunk != 0">
+      <div class="{local-name(.)}" id="{generate-id()}">
+        <xsl:apply-templates select="*" mode="find.chunks"/>
+      </div>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:apply-templates select="*" mode="find.chunks"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="process-chunk-element">
+  <xsl:param name="content">
+    <xsl:apply-imports/>
+  </xsl:param>
+
+  <xsl:choose>
+    <xsl:when test="$chunk.fast != 0 and function-available('exsl:node-set')">
+      <xsl:variable name="chunks" select="exsl:node-set($chunk.hierarchy)//div"/>
+      <xsl:variable name="genid" select="generate-id()"/>
+
+      <xsl:variable name="div" select="$chunks[@id=$genid]"/>
+
+      <xsl:variable name="prevdiv"
+                    select="($div/preceding-sibling::div|$div/preceding::div|$div/parent::div)[last()]"/>
+      <xsl:variable name="prev" select="key('genid', $prevdiv/@id)"/>
+
+      <xsl:variable name="nextdiv"
+                    select="($div/following-sibling::div|$div/following::div|$div/div)[1]"/>
+      <xsl:variable name="next" select="key('genid', $nextdiv/@id)"/>
+
+      <xsl:choose>
+        <xsl:when test="$onechunk != 0 and parent::*">
+          <xsl:copy-of select="$content"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:call-template name="process-chunk">
+            <xsl:with-param name="prev" select="$prev"/>
+            <xsl:with-param name="next" select="$next"/>
+            <xsl:with-param name="content" select="$content"/>
+          </xsl:call-template>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:choose>
+        <xsl:when test="$onechunk != 0 and not(parent::*)">
+          <xsl:call-template name="chunk-all-sections">
+            <xsl:with-param name="content" select="$content"/>
+          </xsl:call-template>
+        </xsl:when>
+        <xsl:when test="$onechunk != 0">
+          <xsl:copy-of select="$content"/>
+        </xsl:when>
+        <xsl:when test="$chunk.first.sections = 0">
+          <xsl:call-template name="chunk-first-section-with-parent">
+            <xsl:with-param name="content" select="$content"/>
+          </xsl:call-template>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:call-template name="chunk-all-sections">
+            <xsl:with-param name="content" select="$content"/>
+          </xsl:call-template>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="process-chunk">
+  <xsl:param name="prev" select="."/>
+  <xsl:param name="next" select="."/>
+  <xsl:param name="content">
+    <xsl:apply-imports/>
+  </xsl:param>
+
+  <xsl:variable name="ischunk">
+    <xsl:call-template name="chunk"/>
+  </xsl:variable>
+
+  <xsl:variable name="chunkfn">
+    <xsl:if test="$ischunk='1'">
+      <xsl:apply-templates mode="chunk-filename" select="."/>
+    </xsl:if>
+  </xsl:variable>
+
+  <xsl:if test="$ischunk='0'">
+    <xsl:message>
+      <xsl:text>Error </xsl:text>
+      <xsl:value-of select="name(.)"/>
+      <xsl:text> is not a chunk!</xsl:text>
+    </xsl:message>
+  </xsl:if>
+
+  <xsl:variable name="filename">
+    <xsl:call-template name="make-relative-filename">
+      <xsl:with-param name="base.dir" select="$base.dir"/>
+      <xsl:with-param name="base.name" select="$chunkfn"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:call-template name="write.chunk">
+    <xsl:with-param name="filename" select="$filename"/>
+    <xsl:with-param name="content">
+      <xsl:call-template name="chunk-element-content">
+        <xsl:with-param name="prev" select="$prev"/>
+        <xsl:with-param name="next" select="$next"/>
+        <xsl:with-param name="content" select="$content"/>
+      </xsl:call-template>
+    </xsl:with-param>
+    <xsl:with-param name="quiet" select="$chunk.quietly"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="chunk-first-section-with-parent">
+  <xsl:param name="content">
+    <xsl:apply-imports/>
+  </xsl:param>
+
+  <!-- These xpath expressions are really hairy. The trick is to pick sections -->
+  <!-- that are not first children and are not the children of first children -->
+
+  <!-- Break these variables into pieces to work around
+       http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6063 -->
+
+  <xsl:variable name="prev-v1"
+     select="(ancestor::sect1[$chunk.section.depth &gt; 0
+                               and preceding-sibling::sect1][1]
+
+             |ancestor::sect2[$chunk.section.depth &gt; 1
+                               and preceding-sibling::sect2
+                               and parent::sect1[preceding-sibling::sect1]][1]
+
+             |ancestor::sect3[$chunk.section.depth &gt; 2
+                               and preceding-sibling::sect3
+                               and parent::sect2[preceding-sibling::sect2]
+                               and ancestor::sect1[preceding-sibling::sect1]][1]
+
+             |ancestor::sect4[$chunk.section.depth &gt; 3
+                               and preceding-sibling::sect4
+                               and parent::sect3[preceding-sibling::sect2]
+                               and ancestor::sect2[preceding-sibling::sect2]
+                               and ancestor::sect1[preceding-sibling::sect1]][1]
+
+             |ancestor::sect5[$chunk.section.depth &gt; 4
+                               and preceding-sibling::sect5
+                               and parent::sect4[preceding-sibling::sect4]
+                               and ancestor::sect3[preceding-sibling::sect3]
+                               and ancestor::sect2[preceding-sibling::sect2]
+                               and ancestor::sect1[preceding-sibling::sect1]][1]
+
+             |ancestor::section[$chunk.section.depth &gt; count(ancestor::section)
+                                and not(ancestor::section[not(preceding-sibling::section)])][1])[last()]"/>
+
+  <xsl:variable name="prev-v2"
+     select="(preceding::sect1[$chunk.section.depth &gt; 0
+                               and preceding-sibling::sect1][1]
+
+             |preceding::sect2[$chunk.section.depth &gt; 1
+                               and preceding-sibling::sect2
+                               and parent::sect1[preceding-sibling::sect1]][1]
+
+             |preceding::sect3[$chunk.section.depth &gt; 2
+                               and preceding-sibling::sect3
+                               and parent::sect2[preceding-sibling::sect2]
+                               and ancestor::sect1[preceding-sibling::sect1]][1]
+
+             |preceding::sect4[$chunk.section.depth &gt; 3
+                               and preceding-sibling::sect4
+                               and parent::sect3[preceding-sibling::sect2]
+                               and ancestor::sect2[preceding-sibling::sect2]
+                               and ancestor::sect1[preceding-sibling::sect1]][1]
+
+             |preceding::sect5[$chunk.section.depth &gt; 4
+                               and preceding-sibling::sect5
+                               and parent::sect4[preceding-sibling::sect4]
+                               and ancestor::sect3[preceding-sibling::sect3]
+                               and ancestor::sect2[preceding-sibling::sect2]
+                               and ancestor::sect1[preceding-sibling::sect1]][1]
+
+             |preceding::section[$chunk.section.depth &gt; count(ancestor::section)
+                                 and preceding-sibling::section
+                                 and not(ancestor::section[not(preceding-sibling::section)])][1])[last()]"/>
+
+  <xsl:variable name="prev"
+    select="(preceding::book[1]
+             |preceding::preface[1]
+             |preceding::chapter[1]
+             |preceding::appendix[1]
+             |preceding::part[1]
+             |preceding::reference[1]
+             |preceding::refentry[1]
+             |preceding::colophon[1]
+             |preceding::article[1]
+             |preceding::bibliography[1]
+             |preceding::glossary[1]
+             |preceding::index[$generate.index != 0][1]
+             |preceding::setindex[$generate.index != 0][1]
+             |ancestor::set
+             |ancestor::book[1]
+             |ancestor::preface[1]
+             |ancestor::chapter[1]
+             |ancestor::appendix[1]
+             |ancestor::part[1]
+             |ancestor::reference[1]
+             |ancestor::article[1]
+             |$prev-v1
+             |$prev-v2)[last()]"/>
+
+  <xsl:variable name="next-v1"
+    select="(following::sect1[$chunk.section.depth &gt; 0
+                               and preceding-sibling::sect1][1]
+
+             |following::sect2[$chunk.section.depth &gt; 1
+                               and preceding-sibling::sect2
+                               and parent::sect1[preceding-sibling::sect1]][1]
+
+             |following::sect3[$chunk.section.depth &gt; 2
+                               and preceding-sibling::sect3
+                               and parent::sect2[preceding-sibling::sect2]
+                               and ancestor::sect1[preceding-sibling::sect1]][1]
+
+             |following::sect4[$chunk.section.depth &gt; 3
+                               and preceding-sibling::sect4
+                               and parent::sect3[preceding-sibling::sect2]
+                               and ancestor::sect2[preceding-sibling::sect2]
+                               and ancestor::sect1[preceding-sibling::sect1]][1]
+
+             |following::sect5[$chunk.section.depth &gt; 4
+                               and preceding-sibling::sect5
+                               and parent::sect4[preceding-sibling::sect4]
+                               and ancestor::sect3[preceding-sibling::sect3]
+                               and ancestor::sect2[preceding-sibling::sect2]
+                               and ancestor::sect1[preceding-sibling::sect1]][1]
+
+             |following::section[$chunk.section.depth &gt; count(ancestor::section)
+                                 and preceding-sibling::section
+                                 and not(ancestor::section[not(preceding-sibling::section)])][1])[1]"/>
+
+  <xsl:variable name="next-v2"
+    select="(descendant::sect1[$chunk.section.depth &gt; 0
+                               and preceding-sibling::sect1][1]
+
+             |descendant::sect2[$chunk.section.depth &gt; 1
+                               and preceding-sibling::sect2
+                               and parent::sect1[preceding-sibling::sect1]][1]
+
+             |descendant::sect3[$chunk.section.depth &gt; 2
+                               and preceding-sibling::sect3
+                               and parent::sect2[preceding-sibling::sect2]
+                               and ancestor::sect1[preceding-sibling::sect1]][1]
+
+             |descendant::sect4[$chunk.section.depth &gt; 3
+                               and preceding-sibling::sect4
+                               and parent::sect3[preceding-sibling::sect2]
+                               and ancestor::sect2[preceding-sibling::sect2]
+                               and ancestor::sect1[preceding-sibling::sect1]][1]
+
+             |descendant::sect5[$chunk.section.depth &gt; 4
+                               and preceding-sibling::sect5
+                               and parent::sect4[preceding-sibling::sect4]
+                               and ancestor::sect3[preceding-sibling::sect3]
+                               and ancestor::sect2[preceding-sibling::sect2]
+                               and ancestor::sect1[preceding-sibling::sect1]][1]
+
+             |descendant::section[$chunk.section.depth &gt; count(ancestor::section)
+                                 and preceding-sibling::section
+                                 and not(ancestor::section[not(preceding-sibling::section)])])[1]"/>
+
+  <xsl:variable name="next"
+    select="(following::book[1]
+             |following::preface[1]
+             |following::chapter[1]
+             |following::appendix[1]
+             |following::part[1]
+             |following::reference[1]
+             |following::refentry[1]
+             |following::colophon[1]
+             |following::bibliography[1]
+             |following::glossary[1]
+             |following::index[$generate.index != 0][1]
+             |following::article[1]
+             |following::setindex[$generate.index != 0][1]
+             |descendant::book[1]
+             |descendant::preface[1]
+             |descendant::chapter[1]
+             |descendant::appendix[1]
+             |descendant::article[1]
+             |descendant::bibliography[1]
+             |descendant::glossary[1]
+             |descendant::index[$generate.index != 0][1]
+             |descendant::colophon[1]
+             |descendant::setindex[$generate.index != 0][1]
+             |descendant::part[1]
+             |descendant::reference[1]
+             |descendant::refentry[1]
+             |$next-v1
+             |$next-v2)[1]"/>
+
+  <xsl:call-template name="process-chunk">
+    <xsl:with-param name="prev" select="$prev"/>
+    <xsl:with-param name="next" select="$next"/>
+    <xsl:with-param name="content" select="$content"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="chunk-all-sections">
+  <xsl:param name="content">
+    <xsl:apply-imports/>
+  </xsl:param>
+
+  <xsl:variable name="prev-v1"
+    select="(preceding::sect1[$chunk.section.depth &gt; 0][1]
+             |preceding::sect2[$chunk.section.depth &gt; 1][1]
+             |preceding::sect3[$chunk.section.depth &gt; 2][1]
+             |preceding::sect4[$chunk.section.depth &gt; 3][1]
+             |preceding::sect5[$chunk.section.depth &gt; 4][1]
+             |preceding::section[$chunk.section.depth &gt; count(ancestor::section)][1])[last()]"/>
+
+  <xsl:variable name="prev-v2"
+    select="(ancestor::sect1[$chunk.section.depth &gt; 0][1]
+             |ancestor::sect2[$chunk.section.depth &gt; 1][1]
+             |ancestor::sect3[$chunk.section.depth &gt; 2][1]
+             |ancestor::sect4[$chunk.section.depth &gt; 3][1]
+             |ancestor::sect5[$chunk.section.depth &gt; 4][1]
+             |ancestor::section[$chunk.section.depth &gt; count(ancestor::section)][1])[last()]"/>
+
+  <xsl:variable name="prev"
+    select="(preceding::book[1]
+             |preceding::preface[1]
+             |preceding::chapter[1]
+             |preceding::appendix[1]
+             |preceding::part[1]
+             |preceding::reference[1]
+             |preceding::refentry[1]
+             |preceding::colophon[1]
+             |preceding::article[1]
+             |preceding::bibliography[1]
+             |preceding::glossary[1]
+             |preceding::index[$generate.index != 0][1]
+             |preceding::setindex[$generate.index != 0][1]
+             |ancestor::set
+             |ancestor::book[1]
+             |ancestor::preface[1]
+             |ancestor::chapter[1]
+             |ancestor::appendix[1]
+             |ancestor::part[1]
+             |ancestor::reference[1]
+             |ancestor::article[1]
+             |$prev-v1
+             |$prev-v2)[last()]"/>
+
+  <xsl:variable name="next-v1"
+    select="(following::sect1[$chunk.section.depth &gt; 0][1]
+             |following::sect2[$chunk.section.depth &gt; 1][1]
+             |following::sect3[$chunk.section.depth &gt; 2][1]
+             |following::sect4[$chunk.section.depth &gt; 3][1]
+             |following::sect5[$chunk.section.depth &gt; 4][1]
+             |following::section[$chunk.section.depth &gt; count(ancestor::section)][1])[1]"/>
+
+  <xsl:variable name="next-v2"
+    select="(descendant::sect1[$chunk.section.depth &gt; 0][1]
+             |descendant::sect2[$chunk.section.depth &gt; 1][1]
+             |descendant::sect3[$chunk.section.depth &gt; 2][1]
+             |descendant::sect4[$chunk.section.depth &gt; 3][1]
+             |descendant::sect5[$chunk.section.depth &gt; 4][1]
+             |descendant::section[$chunk.section.depth 
+                                  &gt; count(ancestor::section)][1])[1]"/>
+
+  <xsl:variable name="next"
+    select="(following::book[1]
+             |following::preface[1]
+             |following::chapter[1]
+             |following::appendix[1]
+             |following::part[1]
+             |following::reference[1]
+             |following::refentry[1]
+             |following::colophon[1]
+             |following::bibliography[1]
+             |following::glossary[1]
+             |following::index[$generate.index != 0][1]
+             |following::article[1]
+             |following::setindex[$generate.index != 0][1]
+             |descendant::book[1]
+             |descendant::preface[1]
+             |descendant::chapter[1]
+             |descendant::appendix[1]
+             |descendant::article[1]
+             |descendant::bibliography[1]
+             |descendant::glossary[1]
+             |descendant::index[$generate.index != 0][1]
+             |descendant::colophon[1]
+             |descendant::setindex[$generate.index != 0][1]
+             |descendant::part[1]
+             |descendant::reference[1]
+             |descendant::refentry[1]
+             |$next-v1
+             |$next-v2)[1]"/>
+
+  <xsl:call-template name="process-chunk">
+    <xsl:with-param name="prev" select="$prev"/>
+    <xsl:with-param name="next" select="$next"/>
+    <xsl:with-param name="content" select="$content"/>
+  </xsl:call-template>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="/">
+  <xsl:choose>
+    <xsl:when test="$rootid != ''">
+      <xsl:choose>
+        <xsl:when test="count(key('id',$rootid)) = 0">
+          <xsl:message terminate="yes">
+            <xsl:text>ID '</xsl:text>
+            <xsl:value-of select="$rootid"/>
+            <xsl:text>' not found in document.</xsl:text>
+          </xsl:message>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:if test="$collect.xref.targets = 'yes' or
+                        $collect.xref.targets = 'only'">
+            <xsl:apply-templates select="key('id', $rootid)"
+                        mode="collect.targets"/>
+          </xsl:if>
+          <xsl:if test="$collect.xref.targets != 'only'">
+            <xsl:apply-templates select="key('id',$rootid)"
+                        mode="process.root"/>
+            <xsl:if test="$tex.math.in.alt != ''">
+              <xsl:apply-templates select="key('id',$rootid)"
+                          mode="collect.tex.math"/>
+            </xsl:if>
+            <xsl:if test="$generate.manifest != 0">
+              <xsl:call-template name="generate.manifest">
+                <xsl:with-param name="node" select="key('id',$rootid)"/>
+              </xsl:call-template>
+            </xsl:if>
+          </xsl:if>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:if test="$collect.xref.targets = 'yes' or
+                    $collect.xref.targets = 'only'">
+        <xsl:apply-templates select="/" mode="collect.targets"/>
+      </xsl:if>
+      <xsl:if test="$collect.xref.targets != 'only'">
+        <xsl:apply-templates select="/" mode="process.root"/>
+        <xsl:if test="$tex.math.in.alt != ''">
+          <xsl:apply-templates select="/" mode="collect.tex.math"/>
+        </xsl:if>
+        <xsl:if test="$generate.manifest != 0">
+          <xsl:call-template name="generate.manifest"/>
+        </xsl:if>
+      </xsl:if>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="*" mode="process.root">
+  <xsl:apply-templates select="."/>
+</xsl:template>
+
+<!-- ====================================================================== -->
+
+<xsl:template match="set|book|part|preface|chapter|appendix
+                     |article
+                     |reference|refentry
+                     |book/glossary|article/glossary|part/glossary
+                     |book/bibliography|article/bibliography
+                     |colophon">
+  <xsl:choose>
+    <xsl:when test="$onechunk != 0 and parent::*">
+      <xsl:apply-imports/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:call-template name="process-chunk-element"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="sect1|sect2|sect3|sect4|sect5|section">
+  <xsl:variable name="ischunk">
+    <xsl:call-template name="chunk"/>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="not(parent::*)">
+      <xsl:call-template name="process-chunk-element"/>
+    </xsl:when>
+    <xsl:when test="$ischunk = 0">
+      <xsl:apply-imports/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:call-template name="process-chunk-element"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="setindex
+                     |book/index
+                     |article/index">
+  <!-- some implementations use completely empty index tags to indicate -->
+  <!-- where an automatically generated index should be inserted. so -->
+  <!-- if the index is completely empty, skip it. -->
+  <xsl:if test="count(*)>0 or $generate.index != '0'">
+    <xsl:call-template name="process-chunk-element"/>
+  </xsl:if>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="make.lots">
+  <xsl:param name="toc.params" select="''"/>
+  <xsl:param name="toc"/>
+
+  <xsl:variable name="lots">
+    <xsl:if test="contains($toc.params, 'toc')">
+      <xsl:copy-of select="$toc"/>
+    </xsl:if>
+
+    <xsl:if test="contains($toc.params, 'figure')">
+      <xsl:call-template name="list.of.titles">
+        <xsl:with-param name="titles" select="'figure'"/>
+        <xsl:with-param name="nodes" select=".//figure"/>
+      </xsl:call-template>
+    </xsl:if>
+
+    <xsl:if test="contains($toc.params, 'table')">
+      <xsl:call-template name="list.of.titles">
+        <xsl:with-param name="titles" select="'table'"/>
+        <xsl:with-param name="nodes" select=".//table"/>
+      </xsl:call-template>
+    </xsl:if>
+
+    <xsl:if test="contains($toc.params, 'example')">
+      <xsl:call-template name="list.of.titles">
+        <xsl:with-param name="titles" select="'example'"/>
+        <xsl:with-param name="nodes" select=".//example"/>
+      </xsl:call-template>
+    </xsl:if>
+
+    <xsl:if test="contains($toc.params, 'equation')">
+      <xsl:call-template name="list.of.titles">
+        <xsl:with-param name="titles" select="'equation'"/>
+        <xsl:with-param name="nodes" select=".//equation[title]"/>
+      </xsl:call-template>
+    </xsl:if>
+  </xsl:variable>
+
+  <xsl:if test="string($lots) != ''">
+    <xsl:choose>
+      <xsl:when test="$chunk.tocs.and.lots != 0 and not(parent::*)">
+        <xsl:call-template name="write.chunk">
+          <xsl:with-param name="filename">
+            <xsl:call-template name="make-relative-filename">
+              <xsl:with-param name="base.dir" select="$base.dir"/>
+              <xsl:with-param name="base.name">
+                <xsl:call-template name="dbhtml-dir"/>
+                <xsl:apply-templates select="." mode="recursive-chunk-filename"/>
+                <xsl:text>-toc</xsl:text>
+                <xsl:value-of select="$html.ext"/>
+              </xsl:with-param>
+            </xsl:call-template>
+          </xsl:with-param>
+          <xsl:with-param name="content">
+            <xsl:call-template name="chunk-element-content">
+              <xsl:with-param name="prev" select="/foo"/>
+              <xsl:with-param name="next" select="/foo"/>
+              <xsl:with-param name="nav.context" select="'toc'"/>
+              <xsl:with-param name="content">
+                <h1>
+                  <xsl:apply-templates select="." mode="object.title.markup"/>
+                </h1>
+                <xsl:copy-of select="$lots"/>
+              </xsl:with-param>
+            </xsl:call-template>
+          </xsl:with-param>
+          <xsl:with-param name="quiet" select="$chunk.quietly"/>
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:copy-of select="$lots"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:if>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="in.other.chunk">
+  <xsl:param name="chunk" select="."/>
+  <xsl:param name="node" select="."/>
+
+  <xsl:variable name="is.chunk">
+    <xsl:call-template name="chunk">
+      <xsl:with-param name="node" select="$node"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+<!--
+  <xsl:message>
+    <xsl:text>in.other.chunk: </xsl:text>
+    <xsl:value-of select="name($chunk)"/>
+    <xsl:text> </xsl:text>
+    <xsl:value-of select="name($node)"/>
+    <xsl:text> </xsl:text>
+    <xsl:value-of select="$chunk = $node"/>
+    <xsl:text> </xsl:text>
+    <xsl:value-of select="$is.chunk"/>
+  </xsl:message>
+-->
+
+  <xsl:choose>
+    <xsl:when test="$chunk = $node">0</xsl:when>
+    <xsl:when test="$is.chunk = 1">1</xsl:when>
+    <xsl:when test="count($node) = 0">0</xsl:when>
+    <xsl:otherwise>
+      <xsl:call-template name="in.other.chunk">
+        <xsl:with-param name="chunk" select="$chunk"/>
+        <xsl:with-param name="node" select="$node/parent::*"/>
+      </xsl:call-template>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="count.footnotes.in.this.chunk">
+  <xsl:param name="node" select="."/>
+  <xsl:param name="footnotes" select="$node//footnote"/>
+  <xsl:param name="count" select="0"/>
+
+<!--
+  <xsl:message>
+    <xsl:text>count.footnotes.in.this.chunk: </xsl:text>
+    <xsl:value-of select="name($node)"/>
+  </xsl:message>
+-->
+
+  <xsl:variable name="in.other.chunk">
+    <xsl:call-template name="in.other.chunk">
+      <xsl:with-param name="chunk" select="$node"/>
+      <xsl:with-param name="node" select="$footnotes[1]"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="count($footnotes) = 0">
+      <xsl:value-of select="$count"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:choose>
+        <xsl:when test="$in.other.chunk != 0">
+          <xsl:call-template name="count.footnotes.in.this.chunk">
+            <xsl:with-param name="node" select="$node"/>
+            <xsl:with-param name="footnotes"
+                            select="$footnotes[position() &gt; 1]"/>
+            <xsl:with-param name="count" select="$count"/>
+          </xsl:call-template>
+        </xsl:when>
+        <xsl:when test="$footnotes[1]/ancestor::table
+                        |$footnotes[1]/ancestor::informaltable">
+          <xsl:call-template name="count.footnotes.in.this.chunk">
+            <xsl:with-param name="node" select="$node"/>
+            <xsl:with-param name="footnotes"
+                            select="$footnotes[position() &gt; 1]"/>
+            <xsl:with-param name="count" select="$count"/>
+          </xsl:call-template>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:call-template name="count.footnotes.in.this.chunk">
+            <xsl:with-param name="node" select="$node"/>
+            <xsl:with-param name="footnotes"
+                            select="$footnotes[position() &gt; 1]"/>
+            <xsl:with-param name="count" select="$count + 1"/>
+          </xsl:call-template>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="process.footnotes.in.this.chunk">
+  <xsl:param name="node" select="."/>
+  <xsl:param name="footnotes" select="$node//footnote"/>
+
+<!--
+  <xsl:message>process.footnotes.in.this.chunk</xsl:message>
+-->
+
+  <xsl:variable name="in.other.chunk">
+    <xsl:call-template name="in.other.chunk">
+      <xsl:with-param name="chunk" select="$node"/>
+      <xsl:with-param name="node" select="$footnotes[1]"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="count($footnotes) = 0">
+      <!-- nop -->
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:choose>
+        <xsl:when test="$in.other.chunk != 0">
+          <xsl:call-template name="process.footnotes.in.this.chunk">
+            <xsl:with-param name="node" select="$node"/>
+            <xsl:with-param name="footnotes"
+                            select="$footnotes[position() &gt; 1]"/>
+          </xsl:call-template>
+        </xsl:when>
+        <xsl:when test="$footnotes[1]/ancestor::table
+                        |$footnotes[1]/ancestor::informaltable">
+          <xsl:call-template name="process.footnotes.in.this.chunk">
+            <xsl:with-param name="node" select="$node"/>
+            <xsl:with-param name="footnotes"
+                            select="$footnotes[position() &gt; 1]"/>
+          </xsl:call-template>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:apply-templates select="$footnotes[1]"
+                               mode="process.footnote.mode"/>
+          <xsl:call-template name="process.footnotes.in.this.chunk">
+            <xsl:with-param name="node" select="$node"/>
+            <xsl:with-param name="footnotes"
+                            select="$footnotes[position() &gt; 1]"/>
+          </xsl:call-template>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="process.footnotes">
+  <xsl:variable name="footnotes" select=".//footnote"/>
+  <xsl:variable name="fcount">
+    <xsl:call-template name="count.footnotes.in.this.chunk">
+      <xsl:with-param name="node" select="."/>
+      <xsl:with-param name="footnotes" select="$footnotes"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+<!--
+  <xsl:message>
+    <xsl:value-of select="name(.)"/>
+    <xsl:text> fcount: </xsl:text>
+    <xsl:value-of select="$fcount"/>
+  </xsl:message>
+-->
+
+  <!-- Only bother to do this if there's at least one non-table footnote -->
+  <xsl:if test="$fcount &gt; 0">
+    <div class="footnotes">
+      <br/>
+      <hr width="100" align="left"/>
+      <xsl:call-template name="process.footnotes.in.this.chunk">
+        <xsl:with-param name="node" select="."/>
+        <xsl:with-param name="footnotes" select="$footnotes"/>
+      </xsl:call-template>
+    </div>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template name="process.chunk.footnotes">
+  <xsl:variable name="is.chunk">
+    <xsl:call-template name="chunk"/>
+  </xsl:variable>
+  <xsl:if test="$is.chunk = 1">
+    <xsl:call-template name="process.footnotes"/>
+  </xsl:if>
+</xsl:template>
+
+<!-- ====================================================================== -->
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/chunk-common.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/chunk-common.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/chunk-common.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1003 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                version="1.0">
+
+<!-- ********************************************************************
+     $Id: chunk-common.xsl,v 1.1.1.1 2004/10/19 21:21:46 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:template name="chunk">
+  <xsl:param name="node" select="."/>
+  <!-- returns 1 if $node is a chunk -->
+
+  <!-- ==================================================================== -->
+  <!-- What's a chunk?
+
+       The root element
+       appendix
+       article
+       bibliography  in article or book
+       book
+       chapter
+       colophon
+       glossary      in article or book
+       index         in article or book
+       part
+       preface
+       refentry
+       reference
+       sect{1,2,3,4,5}  if position()>1 && depth < chunk.section.depth
+       section          if position()>1 && depth < chunk.section.depth
+       set
+       setindex
+                                                                            -->
+  <!-- ==================================================================== -->
+
+<!--
+  <xsl:message>
+    <xsl:text>chunk: </xsl:text>
+    <xsl:value-of select="name($node)"/>
+    <xsl:text>(</xsl:text>
+    <xsl:value-of select="$node/@id"/>
+    <xsl:text>)</xsl:text>
+    <xsl:text> csd: </xsl:text>
+    <xsl:value-of select="$chunk.section.depth"/>
+    <xsl:text> cfs: </xsl:text>
+    <xsl:value-of select="$chunk.first.sections"/>
+    <xsl:text> ps: </xsl:text>
+    <xsl:value-of select="count($node/parent::section)"/>
+    <xsl:text> prs: </xsl:text>
+    <xsl:value-of select="count($node/preceding-sibling::section)"/>
+  </xsl:message>
+-->
+
+  <xsl:choose>
+    <xsl:when test="not($node/parent::*)">1</xsl:when>
+
+    <xsl:when test="local-name($node) = 'sect1'
+                    and $chunk.section.depth &gt;= 1
+                    and ($chunk.first.sections != 0
+                         or count($node/preceding-sibling::sect1) &gt; 0)">
+      <xsl:text>1</xsl:text>
+    </xsl:when>
+    <xsl:when test="local-name($node) = 'sect2'
+                    and $chunk.section.depth &gt;= 2
+                    and ($chunk.first.sections != 0
+                         or count($node/preceding-sibling::sect2) &gt; 0)">
+      <xsl:call-template name="chunk">
+        <xsl:with-param name="node" select="$node/parent::*"/>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:when test="local-name($node) = 'sect3'
+                    and $chunk.section.depth &gt;= 3
+                    and ($chunk.first.sections != 0
+                         or count($node/preceding-sibling::sect3) &gt; 0)">
+      <xsl:call-template name="chunk">
+        <xsl:with-param name="node" select="$node/parent::*"/>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:when test="local-name($node) = 'sect4'
+                    and $chunk.section.depth &gt;= 4
+                    and ($chunk.first.sections != 0
+                         or count($node/preceding-sibling::sect4) &gt; 0)">
+      <xsl:call-template name="chunk">
+        <xsl:with-param name="node" select="$node/parent::*"/>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:when test="local-name($node) = 'sect5'
+                    and $chunk.section.depth &gt;= 5
+                    and ($chunk.first.sections != 0
+                         or count($node/preceding-sibling::sect5) &gt; 0)">
+      <xsl:call-template name="chunk">
+        <xsl:with-param name="node" select="$node/parent::*"/>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:when test="local-name($node) = 'section'
+                    and $chunk.section.depth &gt;= count($node/ancestor::section)+1
+                    and ($chunk.first.sections != 0
+                         or count($node/preceding-sibling::section) &gt; 0)">
+      <xsl:call-template name="chunk">
+        <xsl:with-param name="node" select="$node/parent::*"/>
+      </xsl:call-template>
+    </xsl:when>
+
+    <xsl:when test="name($node)='preface'">1</xsl:when>
+    <xsl:when test="name($node)='chapter'">1</xsl:when>
+    <xsl:when test="name($node)='appendix'">1</xsl:when>
+    <xsl:when test="name($node)='article'">1</xsl:when>
+    <xsl:when test="name($node)='part'">1</xsl:when>
+    <xsl:when test="name($node)='reference'">1</xsl:when>
+    <xsl:when test="name($node)='refentry'">1</xsl:when>
+    <xsl:when test="name($node)='index'
+                    and (name($node/parent::*) = 'article'
+                         or name($node/parent::*) = 'book')">1</xsl:when>
+    <xsl:when test="name($node)='bibliography'
+                    and (name($node/parent::*) = 'article'
+                         or name($node/parent::*) = 'book')">1</xsl:when>
+    <xsl:when test="name($node)='glossary'
+                    and (name($node/parent::*) = 'article'
+                         or name($node/parent::*) = 'book')">1</xsl:when>
+    <xsl:when test="name($node)='colophon'">1</xsl:when>
+    <xsl:when test="name($node)='book'">1</xsl:when>
+    <xsl:when test="name($node)='set'">1</xsl:when>
+    <xsl:when test="name($node)='setindex'">1</xsl:when>
+    <xsl:otherwise>0</xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="*" mode="chunk-filename">
+  <!-- returns the filename of a chunk -->
+  <xsl:variable name="ischunk">
+    <xsl:call-template name="chunk"/>
+  </xsl:variable>
+
+  <xsl:variable name="fn">
+    <xsl:apply-templates select="." mode="recursive-chunk-filename"/>
+  </xsl:variable>
+
+  <!--
+  <xsl:message>
+    <xsl:value-of select="$ischunk"/>
+    <xsl:text> (</xsl:text>
+    <xsl:value-of select="local-name(.)"/>
+    <xsl:text>) </xsl:text>
+    <xsl:value-of select="$fn"/>
+    <xsl:text>, </xsl:text>
+    <xsl:call-template name="dbhtml-dir"/>
+  </xsl:message>
+  -->
+
+  <!-- 2003-11-25 by ndw:
+       The following test used to read test="$ischunk != 0 and $fn != ''"
+       I've removed the ischunk part of the test so that href.to.uri and
+       href.from.uri will be fully qualified even if the source or target
+       isn't a chunk. I *think* that if $fn != '' then it's appropriate
+       to put the directory on the front, even if the element isn't a
+       chunk. I could be wrong. -->
+
+  <xsl:if test="$fn != ''">
+    <xsl:call-template name="dbhtml-dir"/>
+  </xsl:if>
+
+  <xsl:value-of select="$fn"/>
+  <!-- You can't add the html.ext here because dbhtml filename= may already -->
+  <!-- have added it. It really does have to be handled in the recursive template -->
+</xsl:template>
+
+<xsl:template match="*" mode="recursive-chunk-filename">
+  <xsl:param name="recursive" select="false()"/>
+
+  <!-- returns the filename of a chunk -->
+  <xsl:variable name="ischunk">
+    <xsl:call-template name="chunk"/>
+  </xsl:variable>
+
+  <xsl:variable name="dbhtml-filename">
+    <xsl:call-template name="dbhtml-filename"/>
+  </xsl:variable>
+
+  <xsl:variable name="filename">
+    <xsl:choose>
+      <xsl:when test="$dbhtml-filename != ''">
+        <xsl:value-of select="$dbhtml-filename"/>
+      </xsl:when>
+      <!-- if this is the root element, use the root.filename -->
+      <xsl:when test="not(parent::*) and $root.filename != ''">
+        <xsl:value-of select="$root.filename"/>
+        <xsl:value-of select="$html.ext"/>
+      </xsl:when>
+      <!-- if there's no dbhtml filename, and if we're to use IDs as -->
+      <!-- filenames, then use the ID to generate the filename. -->
+      <xsl:when test="@id and $use.id.as.filename != 0">
+        <xsl:value-of select="@id"/>
+        <xsl:value-of select="$html.ext"/>
+      </xsl:when>
+      <xsl:otherwise></xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="$ischunk='0'">
+      <!-- if called on something that isn't a chunk, walk up... -->
+      <xsl:choose>
+        <xsl:when test="count(parent::*)>0">
+          <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
+            <xsl:with-param name="recursive" select="$recursive"/>
+          </xsl:apply-templates>
+        </xsl:when>
+        <!-- unless there is no up, in which case return "" -->
+        <xsl:otherwise></xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+
+    <xsl:when test="not($recursive) and $filename != ''">
+      <!-- if this chunk has an explicit name, use it -->
+      <xsl:value-of select="$filename"/>
+    </xsl:when>
+
+    <xsl:when test="self::set">
+      <xsl:value-of select="$root.filename"/>
+      <xsl:if test="not($recursive)">
+        <xsl:value-of select="$html.ext"/>
+      </xsl:if>
+    </xsl:when>
+
+    <xsl:when test="self::book">
+      <xsl:text>bk</xsl:text>
+      <xsl:number level="any" format="01"/>
+      <xsl:if test="not($recursive)">
+        <xsl:value-of select="$html.ext"/>
+      </xsl:if>
+    </xsl:when>
+
+    <xsl:when test="self::article">
+      <xsl:if test="/set">
+        <!-- in a set, make sure we inherit the right book info... -->
+        <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
+          <xsl:with-param name="recursive" select="true()"/>
+        </xsl:apply-templates>
+      </xsl:if>
+
+      <xsl:text>ar</xsl:text>
+      <xsl:number level="any" format="01" from="book"/>
+      <xsl:if test="not($recursive)">
+        <xsl:value-of select="$html.ext"/>
+      </xsl:if>
+    </xsl:when>
+
+    <xsl:when test="self::preface">
+      <xsl:if test="/set">
+        <!-- in a set, make sure we inherit the right book info... -->
+        <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
+          <xsl:with-param name="recursive" select="true()"/>
+        </xsl:apply-templates>
+      </xsl:if>
+
+      <xsl:text>pr</xsl:text>
+      <xsl:number level="any" format="01" from="book"/>
+      <xsl:if test="not($recursive)">
+        <xsl:value-of select="$html.ext"/>
+      </xsl:if>
+    </xsl:when>
+
+    <xsl:when test="self::chapter">
+      <xsl:if test="/set">
+        <!-- in a set, make sure we inherit the right book info... -->
+        <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
+          <xsl:with-param name="recursive" select="true()"/>
+        </xsl:apply-templates>
+      </xsl:if>
+
+      <xsl:text>ch</xsl:text>
+      <xsl:number level="any" format="01" from="book"/>
+      <xsl:if test="not($recursive)">
+        <xsl:value-of select="$html.ext"/>
+      </xsl:if>
+    </xsl:when>
+
+    <xsl:when test="self::appendix">
+      <xsl:if test="/set">
+        <!-- in a set, make sure we inherit the right book info... -->
+        <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
+          <xsl:with-param name="recursive" select="true()"/>
+        </xsl:apply-templates>
+      </xsl:if>
+
+      <xsl:text>ap</xsl:text>
+      <xsl:number level="any" format="a" from="book"/>
+      <xsl:if test="not($recursive)">
+        <xsl:value-of select="$html.ext"/>
+      </xsl:if>
+    </xsl:when>
+
+    <xsl:when test="self::part">
+      <xsl:choose>
+        <xsl:when test="/set">
+          <!-- in a set, make sure we inherit the right book info... -->
+          <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
+            <xsl:with-param name="recursive" select="true()"/>
+          </xsl:apply-templates>
+        </xsl:when>
+        <xsl:otherwise>
+        </xsl:otherwise>
+      </xsl:choose>
+
+      <xsl:text>pt</xsl:text>
+      <xsl:number level="any" format="01" from="book"/>
+      <xsl:if test="not($recursive)">
+        <xsl:value-of select="$html.ext"/>
+      </xsl:if>
+    </xsl:when>
+
+    <xsl:when test="self::reference">
+      <xsl:choose>
+        <xsl:when test="/set">
+          <!-- in a set, make sure we inherit the right book info... -->
+          <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
+            <xsl:with-param name="recursive" select="true()"/>
+          </xsl:apply-templates>
+        </xsl:when>
+        <xsl:otherwise>
+        </xsl:otherwise>
+      </xsl:choose>
+
+      <xsl:text>rn</xsl:text>
+      <xsl:number level="any" format="01" from="book"/>
+      <xsl:if test="not($recursive)">
+        <xsl:value-of select="$html.ext"/>
+      </xsl:if>
+    </xsl:when>
+
+    <xsl:when test="self::refentry">
+      <xsl:choose>
+        <xsl:when test="parent::reference">
+          <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
+            <xsl:with-param name="recursive" select="true()"/>
+          </xsl:apply-templates>
+        </xsl:when>
+        <xsl:otherwise>
+        </xsl:otherwise>
+      </xsl:choose>
+
+      <xsl:text>re</xsl:text>
+      <xsl:number level="any" format="01" from="book"/>
+      <xsl:if test="not($recursive)">
+        <xsl:value-of select="$html.ext"/>
+      </xsl:if>
+    </xsl:when>
+
+    <xsl:when test="self::colophon">
+      <xsl:choose>
+        <xsl:when test="/set">
+          <!-- in a set, make sure we inherit the right book info... -->
+          <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
+            <xsl:with-param name="recursive" select="true()"/>
+          </xsl:apply-templates>
+        </xsl:when>
+        <xsl:otherwise>
+        </xsl:otherwise>
+      </xsl:choose>
+
+      <xsl:text>co</xsl:text>
+      <xsl:number level="any" format="01" from="book"/>
+      <xsl:if test="not($recursive)">
+        <xsl:value-of select="$html.ext"/>
+      </xsl:if>
+    </xsl:when>
+
+    <xsl:when test="self::sect1
+                    or self::sect2
+                    or self::sect3
+                    or self::sect4
+                    or self::sect5
+                    or self::section">
+      <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
+        <xsl:with-param name="recursive" select="true()"/>
+      </xsl:apply-templates>
+      <xsl:text>s</xsl:text>
+      <xsl:number format="01"/>
+      <xsl:if test="not($recursive)">
+        <xsl:value-of select="$html.ext"/>
+      </xsl:if>
+    </xsl:when>
+
+    <xsl:when test="self::bibliography">
+      <xsl:choose>
+        <xsl:when test="/set">
+          <!-- in a set, make sure we inherit the right book info... -->
+          <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
+            <xsl:with-param name="recursive" select="true()"/>
+          </xsl:apply-templates>
+        </xsl:when>
+        <xsl:otherwise>
+        </xsl:otherwise>
+      </xsl:choose>
+
+      <xsl:text>bi</xsl:text>
+      <xsl:number level="any" format="01" from="book"/>
+      <xsl:if test="not($recursive)">
+        <xsl:value-of select="$html.ext"/>
+      </xsl:if>
+    </xsl:when>
+
+    <xsl:when test="self::glossary">
+      <xsl:choose>
+        <xsl:when test="/set">
+          <!-- in a set, make sure we inherit the right book info... -->
+          <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
+            <xsl:with-param name="recursive" select="true()"/>
+          </xsl:apply-templates>
+        </xsl:when>
+        <xsl:otherwise>
+        </xsl:otherwise>
+      </xsl:choose>
+
+      <xsl:text>go</xsl:text>
+      <xsl:number level="any" format="01" from="book"/>
+      <xsl:if test="not($recursive)">
+        <xsl:value-of select="$html.ext"/>
+      </xsl:if>
+    </xsl:when>
+
+    <xsl:when test="self::index">
+      <xsl:choose>
+        <xsl:when test="/set">
+          <!-- in a set, make sure we inherit the right book info... -->
+          <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
+            <xsl:with-param name="recursive" select="true()"/>
+          </xsl:apply-templates>
+        </xsl:when>
+        <xsl:otherwise>
+        </xsl:otherwise>
+      </xsl:choose>
+
+      <xsl:text>ix</xsl:text>
+      <xsl:number level="any" format="01" from="book"/>
+      <xsl:if test="not($recursive)">
+        <xsl:value-of select="$html.ext"/>
+      </xsl:if>
+    </xsl:when>
+
+    <xsl:when test="self::setindex">
+      <xsl:text>si</xsl:text>
+      <xsl:number level="any" format="01" from="set"/>
+      <xsl:if test="not($recursive)">
+        <xsl:value-of select="$html.ext"/>
+      </xsl:if>
+    </xsl:when>
+
+    <xsl:otherwise>
+      <xsl:text>chunk-filename-error-</xsl:text>
+      <xsl:value-of select="name(.)"/>
+      <xsl:number level="any" format="01" from="set"/>
+      <xsl:if test="not($recursive)">
+        <xsl:value-of select="$html.ext"/>
+      </xsl:if>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="href.target.uri">
+  <xsl:param name="object" select="."/>
+  <xsl:variable name="ischunk">
+    <xsl:call-template name="chunk">
+      <xsl:with-param name="node" select="$object"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:apply-templates mode="chunk-filename" select="$object"/>
+
+  <xsl:if test="$ischunk='0'">
+    <xsl:text>#</xsl:text>
+    <xsl:call-template name="object.id">
+      <xsl:with-param name="object" select="$object"/>
+    </xsl:call-template>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template name="href.target">
+  <xsl:param name="context" select="."/>
+  <xsl:param name="object" select="."/>
+
+  <xsl:variable name="href.to.uri">
+    <xsl:call-template name="href.target.uri">
+      <xsl:with-param name="object" select="$object"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="href.from.uri">
+    <xsl:call-template name="href.target.uri">
+      <xsl:with-param name="object" select="$context"/>
+    </xsl:call-template>
+  </xsl:variable>
+  
+  <!--
+  <xsl:message>href.to.uri: <xsl:value-of select="$href.to.uri"/></xsl:message>
+  <xsl:message>href.from.uri: <xsl:value-of select="$href.from.uri"/></xsl:message>
+  -->
+
+  <xsl:variable name="href.to">
+    <xsl:call-template name="trim.common.uri.paths">
+      <xsl:with-param name="uriA" select="$href.to.uri"/>
+      <xsl:with-param name="uriB" select="$href.from.uri"/>
+      <xsl:with-param name="return" select="'A'"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="href.from">
+    <xsl:call-template name="trim.common.uri.paths">
+      <xsl:with-param name="uriA" select="$href.to.uri"/>
+      <xsl:with-param name="uriB" select="$href.from.uri"/>
+      <xsl:with-param name="return" select="'B'"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="depth">
+    <xsl:call-template name="count.uri.path.depth">
+      <xsl:with-param name="filename" select="$href.from"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="href">
+    <xsl:call-template name="copy-string">
+      <xsl:with-param name="string" select="'../'"/>
+      <xsl:with-param name="count" select="$depth"/>
+    </xsl:call-template>
+    <xsl:value-of select="$href.to"/>
+  </xsl:variable>
+
+  <!--
+  <xsl:message>
+    <xsl:text>In </xsl:text>
+    <xsl:value-of select="name(.)"/>
+    <xsl:text> (</xsl:text>
+    <xsl:value-of select="$href.from"/>
+    <xsl:text>,</xsl:text>
+    <xsl:value-of select="$depth"/>
+    <xsl:text>) </xsl:text>
+    <xsl:value-of select="name($object)"/>
+    <xsl:text> href=</xsl:text>
+    <xsl:value-of select="$href"/>
+  </xsl:message>
+  -->
+
+  <xsl:value-of select="$href"/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="html.head">
+  <xsl:param name="prev" select="/foo"/>
+  <xsl:param name="next" select="/foo"/>
+  <xsl:variable name="this" select="."/>
+  <xsl:variable name="home" select="/*[1]"/>
+  <xsl:variable name="up" select="parent::*"/>
+
+  <head>
+    <xsl:call-template name="system.head.content"/>
+    <xsl:call-template name="head.content"/>
+
+    <xsl:if test="$home">
+      <link rel="home">
+        <xsl:attribute name="href">
+          <xsl:call-template name="href.target">
+            <xsl:with-param name="object" select="$home"/>
+          </xsl:call-template>
+        </xsl:attribute>
+        <xsl:attribute name="title">
+          <xsl:apply-templates select="$home"
+                               mode="object.title.markup.textonly"/>
+        </xsl:attribute>
+      </link>
+    </xsl:if>
+
+    <xsl:if test="$up">
+      <link rel="up">
+        <xsl:attribute name="href">
+          <xsl:call-template name="href.target">
+            <xsl:with-param name="object" select="$up"/>
+          </xsl:call-template>
+        </xsl:attribute>
+        <xsl:attribute name="title">
+          <xsl:apply-templates select="$up" mode="object.title.markup.textonly"/>
+        </xsl:attribute>
+      </link>
+    </xsl:if>
+
+    <xsl:if test="$prev">
+      <link rel="previous">
+        <xsl:attribute name="href">
+          <xsl:call-template name="href.target">
+            <xsl:with-param name="object" select="$prev"/>
+          </xsl:call-template>
+        </xsl:attribute>
+        <xsl:attribute name="title">
+          <xsl:apply-templates select="$prev" mode="object.title.markup.textonly"/>
+        </xsl:attribute>
+      </link>
+    </xsl:if>
+
+    <xsl:if test="$next">
+      <link rel="next">
+        <xsl:attribute name="href">
+          <xsl:call-template name="href.target">
+            <xsl:with-param name="object" select="$next"/>
+          </xsl:call-template>
+        </xsl:attribute>
+        <xsl:attribute name="title">
+          <xsl:apply-templates select="$next" mode="object.title.markup.textonly"/>
+        </xsl:attribute>
+      </link>
+    </xsl:if>
+
+    <xsl:if test="$html.extra.head.links != 0">
+      <xsl:for-each select="//part
+                            |//reference
+                            |//preface
+                            |//chapter
+                            |//article
+                            |//refentry
+                            |//appendix[not(parent::article)]|appendix
+                            |//glossary[not(parent::article)]|glossary
+                            |//index[not(parent::article)]|index">
+        <link rel="{local-name(.)}">
+          <xsl:attribute name="href">
+            <xsl:call-template name="href.target">
+              <xsl:with-param name="context" select="$this"/>
+              <xsl:with-param name="object" select="."/>
+            </xsl:call-template>
+          </xsl:attribute>
+          <xsl:attribute name="title">
+            <xsl:apply-templates select="." mode="object.title.markup.textonly"/>
+          </xsl:attribute>
+        </link>
+      </xsl:for-each>
+
+      <xsl:for-each select="section|sect1|refsection|refsect1">
+        <link>
+          <xsl:attribute name="rel">
+            <xsl:choose>
+              <xsl:when test="local-name($this) = 'section'
+                              or local-name($this) = 'refsection'">
+                <xsl:value-of select="'subsection'"/>
+              </xsl:when>
+              <xsl:otherwise>
+                <xsl:value-of select="'section'"/>
+              </xsl:otherwise>
+            </xsl:choose>
+          </xsl:attribute>
+          <xsl:attribute name="href">
+            <xsl:call-template name="href.target">
+              <xsl:with-param name="context" select="$this"/>
+              <xsl:with-param name="object" select="."/>
+            </xsl:call-template>
+          </xsl:attribute>
+          <xsl:attribute name="title">
+            <xsl:apply-templates select="." mode="object.title.markup.textonly"/>
+          </xsl:attribute>
+        </link>
+      </xsl:for-each>
+
+      <xsl:for-each select="sect2|sect3|sect4|sect5|refsect2|refsect3">
+        <link rel="subsection">
+          <xsl:attribute name="href">
+            <xsl:call-template name="href.target">
+              <xsl:with-param name="context" select="$this"/>
+              <xsl:with-param name="object" select="."/>
+            </xsl:call-template>
+          </xsl:attribute>
+          <xsl:attribute name="title">
+            <xsl:apply-templates select="." mode="object.title.markup.textonly"/>
+          </xsl:attribute>
+        </link>
+      </xsl:for-each>
+    </xsl:if>
+
+    <xsl:call-template name="user.head.content"/>
+  </head>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="header.navigation">
+  <xsl:param name="prev" select="/foo"/>
+  <xsl:param name="next" select="/foo"/>
+  <xsl:param name="nav.context"/>
+
+  <xsl:variable name="home" select="/*[1]"/>
+  <xsl:variable name="up" select="parent::*"/>
+
+  <xsl:variable name="row1" select="$navig.showtitles != 0"/>
+  <xsl:variable name="row2" select="count($prev) &gt; 0
+                                    or (count($up) &gt; 0 
+					and generate-id($up) != generate-id($home)
+                                        and $navig.showtitles != 0)
+                                    or count($next) &gt; 0"/>
+
+  <xsl:if test="$suppress.navigation = '0' and $suppress.header.navigation = '0'">
+    <div class="navheader">
+      <xsl:if test="$row1 or $row2">
+        <table width="100%" summary="Navigation header">
+          <xsl:if test="$row1">
+            <tr>
+              <th colspan="3" align="center">
+                <xsl:apply-templates select="." mode="object.title.markup"/>
+              </th>
+            </tr>
+          </xsl:if>
+
+          <xsl:if test="$row2">
+            <tr>
+              <td width="20%" align="left">
+                <xsl:if test="count($prev)>0">
+                  <a accesskey="p">
+                    <xsl:attribute name="href">
+                      <xsl:call-template name="href.target">
+                        <xsl:with-param name="object" select="$prev"/>
+                      </xsl:call-template>
+                    </xsl:attribute>
+                    <xsl:call-template name="navig.content">
+                      <xsl:with-param name="direction" select="'prev'"/>
+                    </xsl:call-template>
+                  </a>
+                </xsl:if>
+                <xsl:text>&#160;</xsl:text>
+              </td>
+              <th width="60%" align="center">
+                <xsl:choose>
+                  <xsl:when test="count($up) > 0
+				  and generate-id($up) != generate-id($home)
+                                  and $navig.showtitles != 0">
+                    <xsl:apply-templates select="$up" mode="object.title.markup"/>
+                  </xsl:when>
+                  <xsl:otherwise>&#160;</xsl:otherwise>
+                </xsl:choose>
+              </th>
+              <td width="20%" align="right">
+                <xsl:text>&#160;</xsl:text>
+                <xsl:if test="count($next)>0">
+                  <a accesskey="n">
+                    <xsl:attribute name="href">
+                      <xsl:call-template name="href.target">
+                        <xsl:with-param name="object" select="$next"/>
+                      </xsl:call-template>
+                    </xsl:attribute>
+                    <xsl:call-template name="navig.content">
+                      <xsl:with-param name="direction" select="'next'"/>
+                    </xsl:call-template>
+                  </a>
+                </xsl:if>
+              </td>
+            </tr>
+          </xsl:if>
+        </table>
+      </xsl:if>
+      <xsl:if test="$header.rule != 0">
+        <hr/>
+      </xsl:if>
+    </div>
+  </xsl:if>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="footer.navigation">
+  <xsl:param name="prev" select="/foo"/>
+  <xsl:param name="next" select="/foo"/>
+  <xsl:param name="nav.context"/>
+
+  <xsl:variable name="home" select="/*[1]"/>
+  <xsl:variable name="up" select="parent::*"/>
+
+  <xsl:variable name="row1" select="count($prev) &gt; 0
+                                    or count($up) &gt; 0
+                                    or count($next) &gt; 0"/>
+
+  <xsl:variable name="row2" select="($prev and $navig.showtitles != 0)
+                                    or (generate-id($home) != generate-id(.)
+                                        or $nav.context = 'toc')
+                                    or ($chunk.tocs.and.lots != 0
+                                        and $nav.context != 'toc')
+                                    or ($next and $navig.showtitles != 0)"/>
+
+  <xsl:if test="$suppress.navigation = '0' and $suppress.footer.navigation = '0'">
+    <div class="navfooter">
+      <xsl:if test="$footer.rule != 0">
+        <hr/>
+      </xsl:if>
+
+      <xsl:if test="$row1 or $row2">
+        <table width="100%" summary="Navigation footer">
+          <xsl:if test="$row1">
+            <tr>
+              <td width="40%" align="left">
+                <xsl:if test="count($prev)>0">
+                  <a accesskey="p">
+                    <xsl:attribute name="href">
+                      <xsl:call-template name="href.target">
+                        <xsl:with-param name="object" select="$prev"/>
+                      </xsl:call-template>
+                    </xsl:attribute>
+                    <xsl:call-template name="navig.content">
+                      <xsl:with-param name="direction" select="'prev'"/>
+                    </xsl:call-template>
+                  </a>
+                </xsl:if>
+                <xsl:text>&#160;</xsl:text>
+              </td>
+              <td width="20%" align="center">
+                <xsl:choose>
+                  <xsl:when test="count($up)>0">
+                    <a accesskey="u">
+                      <xsl:attribute name="href">
+                        <xsl:call-template name="href.target">
+                          <xsl:with-param name="object" select="$up"/>
+                        </xsl:call-template>
+                      </xsl:attribute>
+                      <xsl:call-template name="navig.content">
+                        <xsl:with-param name="direction" select="'up'"/>
+                      </xsl:call-template>
+                    </a>
+                  </xsl:when>
+                  <xsl:otherwise>&#160;</xsl:otherwise>
+                </xsl:choose>
+              </td>
+              <td width="40%" align="right">
+                <xsl:text>&#160;</xsl:text>
+                <xsl:if test="count($next)>0">
+                  <a accesskey="n">
+                    <xsl:attribute name="href">
+                      <xsl:call-template name="href.target">
+                        <xsl:with-param name="object" select="$next"/>
+                      </xsl:call-template>
+                    </xsl:attribute>
+                    <xsl:call-template name="navig.content">
+                      <xsl:with-param name="direction" select="'next'"/>
+                    </xsl:call-template>
+                  </a>
+                </xsl:if>
+              </td>
+            </tr>
+          </xsl:if>
+
+          <xsl:if test="$row2">
+            <tr>
+              <td width="40%" align="left" valign="top">
+                <xsl:if test="$navig.showtitles != 0">
+                  <xsl:apply-templates select="$prev" mode="object.title.markup"/>
+                </xsl:if>
+                <xsl:text>&#160;</xsl:text>
+              </td>
+              <td width="20%" align="center">
+                <xsl:choose>
+                  <xsl:when test="$home != . or $nav.context = 'toc'">
+                    <a accesskey="h">
+                      <xsl:attribute name="href">
+                        <xsl:call-template name="href.target">
+                          <xsl:with-param name="object" select="$home"/>
+                        </xsl:call-template>
+                      </xsl:attribute>
+                      <xsl:call-template name="navig.content">
+                        <xsl:with-param name="direction" select="'home'"/>
+                      </xsl:call-template>
+                    </a>
+                    <xsl:if test="$chunk.tocs.and.lots != 0 and $nav.context != 'toc'">
+                      <xsl:text>&#160;|&#160;</xsl:text>
+                    </xsl:if>
+                  </xsl:when>
+                  <xsl:otherwise>&#160;</xsl:otherwise>
+                </xsl:choose>
+
+                <xsl:if test="$chunk.tocs.and.lots != 0 and $nav.context != 'toc'">
+                  <a accesskey="t">
+                    <xsl:attribute name="href">
+                      <xsl:apply-templates select="/*[1]"
+                                           mode="recursive-chunk-filename"/>
+                      <xsl:text>-toc</xsl:text>
+                      <xsl:value-of select="$html.ext"/>
+                    </xsl:attribute>
+                    <xsl:call-template name="gentext">
+                      <xsl:with-param name="key" select="'nav-toc'"/>
+                    </xsl:call-template>
+                  </a>
+                </xsl:if>
+              </td>
+              <td width="40%" align="right" valign="top">
+                <xsl:text>&#160;</xsl:text>
+                <xsl:if test="$navig.showtitles != 0">
+                  <xsl:apply-templates select="$next" mode="object.title.markup"/>
+                </xsl:if>
+              </td>
+            </tr>
+          </xsl:if>
+        </table>
+      </xsl:if>
+    </div>
+  </xsl:if>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="navig.content">
+    <xsl:param name="direction" select="next"/>
+    <xsl:variable name="navtext">
+        <xsl:choose>
+	    <xsl:when test="$direction = 'prev'">
+		<xsl:call-template name="gentext.nav.prev"/>
+	    </xsl:when>
+	    <xsl:when test="$direction = 'next'">
+		<xsl:call-template name="gentext.nav.next"/>
+	    </xsl:when>
+	    <xsl:when test="$direction = 'up'">
+		<xsl:call-template name="gentext.nav.up"/>
+	    </xsl:when>
+	    <xsl:when test="$direction = 'home'">
+		<xsl:call-template name="gentext.nav.home"/>
+	    </xsl:when>
+	    <xsl:otherwise>
+		<xsl:text>xxx</xsl:text>
+	    </xsl:otherwise>
+	</xsl:choose>
+    </xsl:variable>
+
+    <xsl:choose>
+	<xsl:when test="$navig.graphics != 0">
+	    <img>
+		<xsl:attribute name="src">
+		    <xsl:value-of select="$navig.graphics.path"/>
+		    <xsl:value-of select="$direction"/>
+		    <xsl:value-of select="$navig.graphics.extension"/>
+		</xsl:attribute>
+		<xsl:attribute name="alt">
+		    <xsl:value-of select="$navtext"/>
+		</xsl:attribute>
+	    </img>
+	</xsl:when>
+	<xsl:otherwise>
+	    <xsl:value-of select="$navtext"/>
+	</xsl:otherwise>
+    </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="processing-instruction('dbhtml')">
+  <!-- nop -->
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="chunk-element-content">
+  <xsl:param name="prev"/>
+  <xsl:param name="next"/>
+  <xsl:param name="nav.context"/>
+  <xsl:param name="content">
+    <xsl:apply-imports/>
+  </xsl:param>
+
+  <html>
+    <xsl:call-template name="html.head">
+      <xsl:with-param name="prev" select="$prev"/>
+      <xsl:with-param name="next" select="$next"/>
+    </xsl:call-template>
+
+    <body>
+      <xsl:call-template name="body.attributes"/>
+      <xsl:call-template name="user.header.navigation"/>
+
+      <xsl:call-template name="header.navigation">
+	<xsl:with-param name="prev" select="$prev"/>
+	<xsl:with-param name="next" select="$next"/>
+	<xsl:with-param name="nav.context" select="$nav.context"/>
+      </xsl:call-template>
+
+      <xsl:call-template name="user.header.content"/>
+
+      <xsl:copy-of select="$content"/>
+
+      <xsl:call-template name="user.footer.content"/>
+
+      <xsl:call-template name="footer.navigation">
+	<xsl:with-param name="prev" select="$prev"/>
+	<xsl:with-param name="next" select="$next"/>
+	<xsl:with-param name="nav.context" select="$nav.context"/>
+      </xsl:call-template>
+
+      <xsl:call-template name="user.footer.navigation"/>
+    </body>
+  </html>
+</xsl:template>
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/chunk.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/chunk.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/chunk.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,40 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:exsl="http://exslt.org/common"
+		version="1.0"
+                exclude-result-prefixes="exsl">
+
+<!-- ********************************************************************
+     $Id: chunk.xsl,v 1.1.1.1 2004/10/19 21:21:46 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:import href="docbook.xsl"/>
+<xsl:import href="chunk-common.xsl"/>
+<xsl:include href="manifest.xsl"/>
+
+<!-- Why is chunk-code now xsl:included?
+
+Suppose you want to customize *both* the chunking algorithm used *and* the
+presentation of some elements that may be chunks. In order to do that, you
+must get the order of imports "just right". The answer is to make your own
+copy of this file, where you replace the initial import of "docbook.xsl"
+with an import of your own base.xsl (that does its own import of docbook.xsl).
+
+Put the templates for changing the presentation of elements in your base.xsl.
+
+Put the templates that control chunking after the include of chunk-code.xsl.
+
+Voila! (Man I hope we can do this better in XSLT 2.0)
+
+-->
+
+<xsl:include href="chunk-code.xsl"/>
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/chunker.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/chunker.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/chunker.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,423 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:saxon="http://icl.com/saxon"
+                xmlns:lxslt="http://xml.apache.org/xslt"
+                xmlns:xalanredirect="org.apache.xalan.xslt.extensions.Redirect"
+                xmlns:exsl="http://exslt.org/common"
+                xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+		version="1.1"
+                exclude-result-prefixes="doc"
+                extension-element-prefixes="saxon xalanredirect lxslt exsl">
+
+<!-- ********************************************************************
+     $Id: chunker.xsl,v 1.1.1.1 2004/10/19 21:21:46 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<!-- This stylesheet works with XSLT implementations that support -->
+<!-- exsl:document, saxon:output, or xalanredirect:write -->
+<!-- Note: Only Saxon 6.4.2 or later is supported. -->
+
+<xsl:param name="chunker.output.method" select="'html'"/>
+<xsl:param name="chunker.output.encoding" select="'ISO-8859-1'"/>
+<xsl:param name="chunker.output.indent" select="'no'"/>
+<xsl:param name="chunker.output.omit-xml-declaration" select="'no'"/>
+<xsl:param name="chunker.output.standalone" select="'no'"/>
+<xsl:param name="chunker.output.doctype-public" select="''"/>
+<xsl:param name="chunker.output.doctype-system" select="''"/>
+<xsl:param name="chunker.output.media-type" select="''"/>
+<xsl:param name="chunker.output.cdata-section-elements" select="''"/>
+
+<xsl:param name="saxon.character.representation" select="'entity;decimal'"/>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="make-relative-filename">
+  <xsl:param name="base.dir" select="'./'"/>
+  <xsl:param name="base.name" select="''"/>
+
+  <xsl:choose>
+    <!-- put Saxon first to work around a bug in libxslt -->
+    <xsl:when test="element-available('saxon:output')">
+      <!-- Saxon doesn't make the chunks relative -->
+      <xsl:value-of select="concat($base.dir,$base.name)"/>
+    </xsl:when>
+    <xsl:when test="element-available('exsl:document')">
+      <!-- EXSL document does make the chunks relative, I think -->
+      <xsl:choose>
+        <xsl:when test="count(parent::*) = 0">
+          <xsl:value-of select="concat($base.dir,$base.name)"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="$base.name"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+    <xsl:when test="element-available('xalanredirect:write')">
+      <!-- Xalan doesn't make the chunks relative -->
+      <xsl:value-of select="concat($base.dir,$base.name)"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:message terminate="yes">
+        <xsl:text>Don't know how to chunk with </xsl:text>
+        <xsl:value-of select="system-property('xsl:vendor')"/>
+      </xsl:message>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="write.chunk">
+  <xsl:param name="filename" select="''"/>
+  <xsl:param name="quiet" select="0"/>
+
+  <xsl:param name="method" select="$chunker.output.method"/>
+  <xsl:param name="encoding" select="$chunker.output.encoding"/>
+  <xsl:param name="indent" select="$chunker.output.indent"/>
+  <xsl:param name="omit-xml-declaration"
+             select="$chunker.output.omit-xml-declaration"/>
+  <xsl:param name="standalone" select="$chunker.output.standalone"/>
+  <xsl:param name="doctype-public" select="$chunker.output.doctype-public"/>
+  <xsl:param name="doctype-system" select="$chunker.output.doctype-system"/>
+  <xsl:param name="media-type" select="$chunker.output.media-type"/>
+  <xsl:param name="cdata-section-elements"
+             select="$chunker.output.cdata-section-elements"/>
+
+  <xsl:param name="content"/>
+
+  <xsl:if test="$quiet = 0">
+    <xsl:message>
+      <xsl:text>Writing </xsl:text>
+      <xsl:value-of select="$filename"/>
+      <xsl:if test="name(.) != ''">
+        <xsl:text> for </xsl:text>
+        <xsl:value-of select="name(.)"/>
+        <xsl:if test="@id">
+          <xsl:text>(</xsl:text>
+          <xsl:value-of select="@id"/>
+          <xsl:text>)</xsl:text>
+        </xsl:if>
+      </xsl:if>
+    </xsl:message>
+  </xsl:if>
+
+  <xsl:choose>
+    <xsl:when test="element-available('exsl:document')">
+      <xsl:choose>
+        <!-- Handle the permutations ... -->
+        <xsl:when test="$media-type != ''">
+          <xsl:choose>
+            <xsl:when test="$doctype-public != '' and $doctype-system != ''">
+              <exsl:document href="{$filename}"
+                             method="{$method}"
+                             encoding="{$encoding}"
+                             indent="{$indent}"
+                             omit-xml-declaration="{$omit-xml-declaration}"
+                             cdata-section-elements="{$cdata-section-elements}"
+                             media-type="{$media-type}"
+                             doctype-public="{$doctype-public}"
+                             doctype-system="{$doctype-system}"
+                             standalone="{$standalone}">
+                <xsl:copy-of select="$content"/>
+              </exsl:document>
+            </xsl:when>
+            <xsl:when test="$doctype-public != '' and $doctype-system = ''">
+              <exsl:document href="{$filename}"
+                             method="{$method}"
+                             encoding="{$encoding}"
+                             indent="{$indent}"
+                             omit-xml-declaration="{$omit-xml-declaration}"
+                             cdata-section-elements="{$cdata-section-elements}"
+                             media-type="{$media-type}"
+                             doctype-public="{$doctype-public}"
+                             standalone="{$standalone}">
+                <xsl:copy-of select="$content"/>
+              </exsl:document>
+            </xsl:when>
+            <xsl:when test="$doctype-public = '' and $doctype-system != ''">
+              <exsl:document href="{$filename}"
+                             method="{$method}"
+                             encoding="{$encoding}"
+                             indent="{$indent}"
+                             omit-xml-declaration="{$omit-xml-declaration}"
+                             cdata-section-elements="{$cdata-section-elements}"
+                             media-type="{$media-type}"
+                             doctype-system="{$doctype-system}"
+                             standalone="{$standalone}">
+                <xsl:copy-of select="$content"/>
+              </exsl:document>
+            </xsl:when>
+            <xsl:otherwise><!-- $doctype-public = '' and $doctype-system = ''"> -->
+              <exsl:document href="{$filename}"
+                             method="{$method}"
+                             encoding="{$encoding}"
+                             indent="{$indent}"
+                             omit-xml-declaration="{$omit-xml-declaration}"
+                             cdata-section-elements="{$cdata-section-elements}"
+                             media-type="{$media-type}"
+                             standalone="{$standalone}">
+                <xsl:copy-of select="$content"/>
+              </exsl:document>
+            </xsl:otherwise>
+          </xsl:choose>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:choose>
+            <xsl:when test="$doctype-public != '' and $doctype-system != ''">
+              <exsl:document href="{$filename}"
+                             method="{$method}"
+                             encoding="{$encoding}"
+                             indent="{$indent}"
+                             omit-xml-declaration="{$omit-xml-declaration}"
+                             cdata-section-elements="{$cdata-section-elements}"
+                             doctype-public="{$doctype-public}"
+                             doctype-system="{$doctype-system}"
+                             standalone="{$standalone}">
+                <xsl:copy-of select="$content"/>
+              </exsl:document>
+            </xsl:when>
+            <xsl:when test="$doctype-public != '' and $doctype-system = ''">
+              <exsl:document href="{$filename}"
+                             method="{$method}"
+                             encoding="{$encoding}"
+                             indent="{$indent}"
+                             omit-xml-declaration="{$omit-xml-declaration}"
+                             cdata-section-elements="{$cdata-section-elements}"
+                             doctype-public="{$doctype-public}"
+                             standalone="{$standalone}">
+                <xsl:copy-of select="$content"/>
+              </exsl:document>
+            </xsl:when>
+            <xsl:when test="$doctype-public = '' and $doctype-system != ''">
+              <exsl:document href="{$filename}"
+                             method="{$method}"
+                             encoding="{$encoding}"
+                             indent="{$indent}"
+                             omit-xml-declaration="{$omit-xml-declaration}"
+                             cdata-section-elements="{$cdata-section-elements}"
+                             doctype-system="{$doctype-system}"
+                             standalone="{$standalone}">
+                <xsl:copy-of select="$content"/>
+              </exsl:document>
+            </xsl:when>
+            <xsl:otherwise><!-- $doctype-public = '' and $doctype-system = ''"> -->
+              <exsl:document href="{$filename}"
+                             method="{$method}"
+                             encoding="{$encoding}"
+                             indent="{$indent}"
+                             omit-xml-declaration="{$omit-xml-declaration}"
+                             cdata-section-elements="{$cdata-section-elements}"
+                             standalone="{$standalone}">
+                <xsl:copy-of select="$content"/>
+              </exsl:document>
+            </xsl:otherwise>
+          </xsl:choose>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+
+    <xsl:when test="element-available('saxon:output')">
+      <xsl:choose>
+        <!-- Handle the permutations ... -->
+        <xsl:when test="$media-type != ''">
+          <xsl:choose>
+            <xsl:when test="$doctype-public != '' and $doctype-system != ''">
+              <saxon:output saxon:character-representation="{$saxon.character.representation}"
+                            href="{$filename}"
+                            method="{$method}"
+                            encoding="{$encoding}"
+                            indent="{$indent}"
+                            omit-xml-declaration="{$omit-xml-declaration}"
+                            cdata-section-elements="{$cdata-section-elements}"
+                            media-type="{$media-type}"
+                            doctype-public="{$doctype-public}"
+                            doctype-system="{$doctype-system}"
+                            standalone="{$standalone}">
+                <xsl:copy-of select="$content"/>
+              </saxon:output>
+            </xsl:when>
+            <xsl:when test="$doctype-public != '' and $doctype-system = ''">
+              <saxon:output saxon:character-representation="{$saxon.character.representation}"
+                            href="{$filename}"
+                            method="{$method}"
+                            encoding="{$encoding}"
+                            indent="{$indent}"
+                            omit-xml-declaration="{$omit-xml-declaration}"
+                            cdata-section-elements="{$cdata-section-elements}"
+                            media-type="{$media-type}"
+                            doctype-public="{$doctype-public}"
+                            standalone="{$standalone}">
+                <xsl:copy-of select="$content"/>
+              </saxon:output>
+            </xsl:when>
+            <xsl:when test="$doctype-public = '' and $doctype-system != ''">
+              <saxon:output saxon:character-representation="{$saxon.character.representation}"
+                            href="{$filename}"
+                            method="{$method}"
+                            encoding="{$encoding}"
+                            indent="{$indent}"
+                            omit-xml-declaration="{$omit-xml-declaration}"
+                            cdata-section-elements="{$cdata-section-elements}"
+                            media-type="{$media-type}"
+                            doctype-system="{$doctype-system}"
+                            standalone="{$standalone}">
+                <xsl:copy-of select="$content"/>
+              </saxon:output>
+            </xsl:when>
+            <xsl:otherwise><!-- $doctype-public = '' and $doctype-system = ''"> -->
+              <saxon:output saxon:character-representation="{$saxon.character.representation}"
+                            href="{$filename}"
+                            method="{$method}"
+                            encoding="{$encoding}"
+                            indent="{$indent}"
+                            omit-xml-declaration="{$omit-xml-declaration}"
+                            cdata-section-elements="{$cdata-section-elements}"
+                            media-type="{$media-type}"
+                            standalone="{$standalone}">
+                <xsl:copy-of select="$content"/>
+              </saxon:output>
+            </xsl:otherwise>
+          </xsl:choose>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:choose>
+            <xsl:when test="$doctype-public != '' and $doctype-system != ''">
+              <saxon:output saxon:character-representation="{$saxon.character.representation}"
+                            href="{$filename}"
+                            method="{$method}"
+                            encoding="{$encoding}"
+                            indent="{$indent}"
+                            omit-xml-declaration="{$omit-xml-declaration}"
+                            cdata-section-elements="{$cdata-section-elements}"
+                            doctype-public="{$doctype-public}"
+                            doctype-system="{$doctype-system}"
+                            standalone="{$standalone}">
+                <xsl:copy-of select="$content"/>
+              </saxon:output>
+            </xsl:when>
+            <xsl:when test="$doctype-public != '' and $doctype-system = ''">
+              <saxon:output saxon:character-representation="{$saxon.character.representation}"
+                            href="{$filename}"
+                            method="{$method}"
+                            encoding="{$encoding}"
+                            indent="{$indent}"
+                            omit-xml-declaration="{$omit-xml-declaration}"
+                            cdata-section-elements="{$cdata-section-elements}"
+                            doctype-public="{$doctype-public}"
+                            standalone="{$standalone}">
+                <xsl:copy-of select="$content"/>
+              </saxon:output>
+            </xsl:when>
+            <xsl:when test="$doctype-public = '' and $doctype-system != ''">
+              <saxon:output saxon:character-representation="{$saxon.character.representation}"
+                            href="{$filename}"
+                            method="{$method}"
+                            encoding="{$encoding}"
+                            indent="{$indent}"
+                            omit-xml-declaration="{$omit-xml-declaration}"
+                            cdata-section-elements="{$cdata-section-elements}"
+                            doctype-system="{$doctype-system}"
+                            standalone="{$standalone}">
+                <xsl:copy-of select="$content"/>
+              </saxon:output>
+            </xsl:when>
+            <xsl:otherwise><!-- $doctype-public = '' and $doctype-system = ''"> -->
+              <saxon:output saxon:character-representation="{$saxon.character.representation}"
+                            href="{$filename}"
+                            method="{$method}"
+                            encoding="{$encoding}"
+                            indent="{$indent}"
+                            omit-xml-declaration="{$omit-xml-declaration}"
+                            cdata-section-elements="{$cdata-section-elements}"
+                            standalone="{$standalone}">
+                <xsl:copy-of select="$content"/>
+              </saxon:output>
+            </xsl:otherwise>
+          </xsl:choose>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+
+    <xsl:when test="element-available('xalanredirect:write')">
+      <!-- Xalan uses xalanredirect -->
+      <xalanredirect:write file="{$filename}">
+        <xsl:copy-of select="$content"/>
+      </xalanredirect:write>
+    </xsl:when>
+
+    <xsl:otherwise>
+      <!-- it doesn't matter since we won't be making chunks... -->
+      <xsl:message terminate="yes">
+        <xsl:text>Can't make chunks with </xsl:text>
+        <xsl:value-of select="system-property('xsl:vendor')"/>
+        <xsl:text>'s processor.</xsl:text>
+      </xsl:message>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="write.chunk.with.doctype">
+  <xsl:param name="filename" select="''"/>
+  <xsl:param name="quiet" select="0"/>
+
+  <xsl:param name="method" select="$chunker.output.method"/>
+  <xsl:param name="encoding" select="$chunker.output.encoding"/>
+  <xsl:param name="indent" select="$chunker.output.indent"/>
+  <xsl:param name="omit-xml-declaration"
+             select="$chunker.output.omit-xml-declaration"/>
+  <xsl:param name="standalone" select="$chunker.output.standalone"/>
+  <xsl:param name="doctype-public" select="$chunker.output.doctype-public"/>
+  <xsl:param name="doctype-system" select="$chunker.output.doctype-system"/>
+  <xsl:param name="media-type" select="$chunker.output.media-type"/>
+  <xsl:param name="cdata-section-elements"
+             select="$chunker.output.cdata-section-elements"/>
+
+  <xsl:param name="content"/>
+
+  <xsl:call-template name="write.chunk">
+    <xsl:with-param name="filename" select="$filename"/>
+    <xsl:with-param name="quiet" select="$quiet"/>
+    <xsl:with-param name="method" select="$method"/>
+    <xsl:with-param name="encoding" select="$encoding"/>
+    <xsl:with-param name="indent" select="$indent"/>
+    <xsl:with-param name="omit-xml-declaration" select="$omit-xml-declaration"/>
+    <xsl:with-param name="standalone" select="$standalone"/>
+    <xsl:with-param name="doctype-public" select="$doctype-public"/>
+    <xsl:with-param name="doctype-system" select="$doctype-system"/>
+    <xsl:with-param name="media-type" select="$media-type"/>
+    <xsl:with-param name="cdata-section-elements" select="$cdata-section-elements"/>
+    <xsl:with-param name="content" select="$content"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="write.text.chunk">
+  <xsl:param name="filename" select="''"/>
+  <xsl:param name="quiet" select="0"/>
+  <xsl:param name="method" select="'text'"/>
+  <xsl:param name="encoding" select="$chunker.output.encoding"/>
+  <xsl:param name="media-type" select="$chunker.output.media-type"/>
+  <xsl:param name="content"/>
+
+  <xsl:call-template name="write.chunk">
+    <xsl:with-param name="filename" select="$filename"/>
+    <xsl:with-param name="quiet" select="$quiet"/>
+    <xsl:with-param name="method" select="$method"/>
+    <xsl:with-param name="encoding" select="$encoding"/>
+    <xsl:with-param name="indent" select="'no'"/>
+    <xsl:with-param name="omit-xml-declaration" select="'no'"/>
+    <xsl:with-param name="standalone" select="'no'"/>
+    <xsl:with-param name="doctype-public"/>
+    <xsl:with-param name="doctype-system"/>
+    <xsl:with-param name="media-type" select="$media-type"/>
+    <xsl:with-param name="cdata-section-elements"/>
+    <xsl:with-param name="content" select="$content"/>
+  </xsl:call-template>
+</xsl:template>
+
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/chunkfast.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/chunkfast.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/chunkfast.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,71 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:exsl="http://exslt.org/common"
+		version="1.0"
+                exclude-result-prefixes="exsl">
+
+<!-- ********************************************************************
+     $Id: chunkfast.xsl,v 1.1.1.1 2004/10/19 21:21:46 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:import href="chunk.xsl"/>
+<xsl:param name="chunk.fast" select="1"/>
+
+<xsl:variable name="chunks" select="exsl:node-set($chunk.hierarchy)//div"/>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="process-chunk-element">
+  <xsl:choose>
+    <xsl:when test="$chunk.fast != 0 and function-available('exsl:node-set')">
+      <xsl:variable name="genid" select="generate-id()"/>
+
+      <xsl:variable name="div" select="$chunks[@id=$genid]"/>
+
+      <xsl:variable name="prevdiv"
+                    select="($div/preceding-sibling::div|$div/preceding::div|$div/parent::div)[last()]"/>
+      <xsl:variable name="prev" select="key('genid', $prevdiv/@id)"/>
+
+      <xsl:variable name="nextdiv"
+                    select="($div/following-sibling::div|$div/following::div|$div/div)[1]"/>
+      <xsl:variable name="next" select="key('genid', $nextdiv/@id)"/>
+
+      <xsl:choose>
+        <xsl:when test="$onechunk != 0 and parent::*">
+          <xsl:apply-imports/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:call-template name="process-chunk">
+            <xsl:with-param name="prev" select="$prev"/>
+            <xsl:with-param name="next" select="$next"/>
+          </xsl:call-template>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:choose>
+        <xsl:when test="$onechunk != 0 and not(parent::*)">
+          <xsl:call-template name="chunk-all-sections"/>
+        </xsl:when>
+        <xsl:when test="$onechunk != 0">
+          <xsl:apply-imports/>
+        </xsl:when>
+        <xsl:when test="$chunk.first.sections = 0">
+          <xsl:call-template name="chunk-first-section-with-parent"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:call-template name="chunk-all-sections"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/chunktoc.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/chunktoc.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/chunktoc.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,243 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+		version="1.0"
+                exclude-result-prefixes="doc">
+
+<!-- ********************************************************************
+     $Id: chunktoc.xsl,v 1.1.1.1 2004/10/19 21:21:46 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:import href="docbook.xsl"/>
+<xsl:import href="chunk-common.xsl"/>
+
+<xsl:template name="chunk">
+  <xsl:param name="node" select="."/>
+  <!-- returns 1 if $node is a chunk -->
+
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id">
+      <xsl:with-param name="object" select="$node"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="chunks" select="document($chunk.toc,$node)"/>
+
+  <xsl:choose>
+    <xsl:when test="$chunks//tocentry[@linkend=$id]">1</xsl:when>
+    <xsl:otherwise>0</xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="*" mode="chunk-filename">
+  <!-- returns the filename of a chunk -->
+
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <xsl:variable name="chunks" select="document($chunk.toc,.)"/>
+
+  <xsl:variable name="chunk" select="$chunks//tocentry[@linkend=$id]"/>
+  <xsl:variable name="filename">
+    <xsl:call-template name="dbhtml-filename">
+      <xsl:with-param name="pis" select="$chunk/processing-instruction('dbhtml')"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="$chunk">
+      <xsl:value-of select="$filename"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:apply-templates select="parent::*" mode="chunk-filename"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="process-chunk">
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <xsl:variable name="chunks" select="document($chunk.toc,.)"/>
+
+  <xsl:variable name="chunk" select="$chunks//tocentry[@linkend=$id]"/>
+  <xsl:variable name="prev-id"
+                select="($chunk/preceding::tocentry
+                         |$chunk/ancestor::tocentry)[last()]/@linkend"/>
+  <xsl:variable name="next-id"
+                select="($chunk/following::tocentry
+                         |$chunk/child::tocentry)[1]/@linkend"/>
+
+  <xsl:variable name="prev" select="key('id',$prev-id)"/>
+  <xsl:variable name="next" select="key('id',$next-id)"/>
+
+  <xsl:variable name="ischunk">
+    <xsl:call-template name="chunk"/>
+  </xsl:variable>
+
+  <xsl:variable name="chunkfn">
+    <xsl:if test="$ischunk='1'">
+      <xsl:apply-templates mode="chunk-filename" select="."/>
+    </xsl:if>
+  </xsl:variable>
+
+  <xsl:variable name="filename">
+    <xsl:call-template name="make-relative-filename">
+      <xsl:with-param name="base.dir" select="$base.dir"/>
+      <xsl:with-param name="base.name" select="$chunkfn"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="$ischunk = 0">
+      <xsl:apply-imports/>
+    </xsl:when>
+
+    <xsl:otherwise>
+      <xsl:call-template name="write.chunk">
+        <xsl:with-param name="filename" select="$filename"/>
+        <xsl:with-param name="content">
+          <xsl:call-template name="chunk-element-content">
+            <xsl:with-param name="prev" select="$prev"/>
+            <xsl:with-param name="next" select="$next"/>
+          </xsl:call-template>
+        </xsl:with-param>
+        <xsl:with-param name="quiet" select="$chunk.quietly"/>
+      </xsl:call-template>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="set">
+  <xsl:call-template name="process-chunk"/>
+</xsl:template>
+
+<xsl:template match="book">
+  <xsl:call-template name="process-chunk"/>
+</xsl:template>
+
+<xsl:template match="book/appendix">
+  <xsl:call-template name="process-chunk"/>
+</xsl:template>
+
+<xsl:template match="book/glossary">
+  <xsl:call-template name="process-chunk"/>
+</xsl:template>
+
+<xsl:template match="book/bibliography">
+  <xsl:call-template name="process-chunk"/>
+</xsl:template>
+
+<xsl:template match="dedication" mode="dedication">
+  <xsl:call-template name="process-chunk"/>
+</xsl:template>
+
+<xsl:template match="preface|chapter">
+  <xsl:call-template name="process-chunk"/>
+</xsl:template>
+
+<xsl:template match="part|reference">
+  <xsl:call-template name="process-chunk"/>
+</xsl:template>
+
+<xsl:template match="refentry">
+  <xsl:call-template name="process-chunk"/>
+</xsl:template>
+
+<xsl:template match="colophon">
+  <xsl:call-template name="process-chunk"/>
+</xsl:template>
+
+<xsl:template match="article">
+  <xsl:call-template name="process-chunk"/>
+</xsl:template>
+
+<xsl:template match="article/appendix">
+  <xsl:call-template name="process-chunk"/>
+</xsl:template>
+
+<xsl:template match="article/glossary">
+  <xsl:call-template name="process-chunk"/>
+</xsl:template>
+
+<xsl:template match="article/bibliography">
+  <xsl:call-template name="process-chunk"/>
+</xsl:template>
+
+<xsl:template match="sect1|sect2|sect3|sect4|sect5|section">
+  <xsl:variable name="ischunk">
+    <xsl:call-template name="chunk"/>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="$ischunk != 0">
+      <xsl:call-template name="process-chunk"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:apply-imports/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="setindex
+                     |book/index
+                     |article/index">
+  <!-- some implementations use completely empty index tags to indicate -->
+  <!-- where an automatically generated index should be inserted. so -->
+  <!-- if the index is completely empty, skip it. -->
+  <xsl:if test="count(*)>0 or $generate.index != '0'">
+    <xsl:call-template name="process-chunk"/>
+  </xsl:if>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="/">
+  <xsl:choose>
+    <xsl:when test="$chunk.toc = ''">
+      <xsl:message terminate="yes">
+        <xsl:text>The chunk.toc file is not set.</xsl:text>
+      </xsl:message>
+    </xsl:when>
+
+    <xsl:when test="$rootid != ''">
+      <xsl:choose>
+        <xsl:when test="count(key('id',$rootid)) = 0">
+          <xsl:message terminate="yes">
+            <xsl:text>ID '</xsl:text>
+            <xsl:value-of select="$rootid"/>
+            <xsl:text>' not found in document.</xsl:text>
+          </xsl:message>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:apply-templates select="key('id',$rootid)"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+
+    <xsl:otherwise>
+      <xsl:apply-templates select="/" mode="process.root"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="*" mode="process.root">
+  <xsl:apply-templates select="."/>
+</xsl:template>
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/component.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/component.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/component.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,404 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: component.xsl,v 1.1.1.1 2004/10/19 21:21:46 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:template name="component.title">
+  <xsl:param name="node" select="."/>
+  <h2 class="title">
+    <xsl:call-template name="anchor">
+      <xsl:with-param name="node" select="$node"/>
+      <xsl:with-param name="conditional" select="0"/>
+    </xsl:call-template>
+    <xsl:apply-templates select="$node" mode="object.title.markup">
+      <xsl:with-param name="allow-anchors" select="1"/>
+    </xsl:apply-templates>
+  </h2>
+</xsl:template>
+
+<xsl:template name="component.subtitle">
+  <xsl:param name="node" select="."/>
+  <xsl:variable name="subtitle"
+                select="($node/docinfo/subtitle
+                        |$node/info/subtitle
+                        |$node/prefaceinfo/subtitle
+                        |$node/chapterinfo/subtitle
+                        |$node/appendixinfo/subtitle
+                        |$node/articleinfo/subtitle
+                        |$node/artheader/subtitle
+                        |$node/subtitle)[1]"/>
+
+  <xsl:if test="$subtitle">
+    <h3 class="subtitle">
+      <i>
+        <xsl:apply-templates select="$node" mode="object.subtitle.markup"/>
+      </i>
+    </h3>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template name="component.separator">
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="dedication" mode="dedication">
+  <div class="{name(.)}">
+    <xsl:call-template name="language.attribute"/>
+    <xsl:call-template name="dedication.titlepage"/>
+    <xsl:apply-templates/>
+    <xsl:call-template name="process.footnotes"/>
+  </div>
+</xsl:template>
+
+<xsl:template match="dedication/title" mode="titlepage.mode" priority="2">
+  <xsl:call-template name="component.title">
+    <xsl:with-param name="node" select="ancestor::dedication[1]"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="dedication/subtitle" mode="titlepage.mode" priority="2">
+  <xsl:call-template name="component.subtitle">
+    <xsl:with-param name="node" select="ancestor::dedication[1]"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="dedication"></xsl:template> <!-- see mode="dedication" -->
+<xsl:template match="dedication/title"></xsl:template>
+<xsl:template match="dedication/subtitle"></xsl:template>
+<xsl:template match="dedication/titleabbrev"></xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="colophon">
+  <div class="{name(.)}">
+    <xsl:call-template name="language.attribute"/>
+    <xsl:if test="$generate.id.attributes != 0">
+      <xsl:attribute name="id">
+        <xsl:call-template name="object.id"/>
+      </xsl:attribute>
+    </xsl:if>
+
+    <xsl:call-template name="component.separator"/>
+    <xsl:call-template name="component.title"/>
+    <xsl:call-template name="component.subtitle"/>
+
+    <xsl:apply-templates/>
+    <xsl:call-template name="process.footnotes"/>
+  </div>
+</xsl:template>
+
+<xsl:template match="colophon/title"></xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="preface">
+  <div class="{name(.)}">
+    <xsl:call-template name="language.attribute"/>
+    <xsl:if test="$generate.id.attributes != 0">
+      <xsl:attribute name="id">
+        <xsl:call-template name="object.id"/>
+      </xsl:attribute>
+    </xsl:if>
+
+    <xsl:call-template name="component.separator"/>
+    <xsl:call-template name="preface.titlepage"/>
+
+    <xsl:variable name="toc.params">
+      <xsl:call-template name="find.path.params">
+        <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
+      </xsl:call-template>
+    </xsl:variable>
+
+    <xsl:if test="contains($toc.params, 'toc')">
+      <xsl:call-template name="component.toc">
+        <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
+      </xsl:call-template>
+      <xsl:call-template name="component.toc.separator"/>
+    </xsl:if>
+    <xsl:apply-templates/>
+    <xsl:call-template name="process.footnotes"/>
+  </div>
+</xsl:template>
+
+<xsl:template match="preface/title" mode="titlepage.mode" priority="2">
+  <xsl:call-template name="component.title">
+    <xsl:with-param name="node" select="ancestor::preface[1]"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="preface/subtitle
+                     |preface/prefaceinfo/subtitle
+                     |preface/info/subtitle
+                     |preface/docinfo/subtitle"
+              mode="titlepage.mode" priority="2">
+  <xsl:call-template name="component.subtitle">
+    <xsl:with-param name="node" select="ancestor::preface[1]"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="preface/docinfo|prefaceinfo"></xsl:template>
+<xsl:template match="preface/title"></xsl:template>
+<xsl:template match="preface/titleabbrev"></xsl:template>
+<xsl:template match="preface/subtitle"></xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="chapter">
+  <div class="{name(.)}">
+    <xsl:call-template name="language.attribute"/>
+    <xsl:if test="$generate.id.attributes != 0">
+      <xsl:attribute name="id">
+        <xsl:call-template name="object.id"/>
+      </xsl:attribute>
+    </xsl:if>
+
+    <xsl:call-template name="component.separator"/>
+    <xsl:call-template name="chapter.titlepage"/>
+
+    <xsl:variable name="toc.params">
+      <xsl:call-template name="find.path.params">
+        <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
+      </xsl:call-template>
+    </xsl:variable>
+    <xsl:if test="contains($toc.params, 'toc')">
+      <xsl:call-template name="component.toc">
+        <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
+      </xsl:call-template>
+      <xsl:call-template name="component.toc.separator"/>
+    </xsl:if>
+    <xsl:apply-templates/>
+    <xsl:call-template name="process.footnotes"/>
+  </div>
+</xsl:template>
+
+<xsl:template match="chapter/title" mode="titlepage.mode" priority="2">
+  <xsl:call-template name="component.title">
+    <xsl:with-param name="node" select="ancestor::chapter[1]"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="chapter/subtitle
+                     |chapter/chapterinfo/subtitle
+                     |chapter/info/subtitle
+                     |chapter/docinfo/subtitle"
+              mode="titlepage.mode" priority="2">
+  <xsl:call-template name="component.subtitle">
+    <xsl:with-param name="node" select="ancestor::chapter[1]"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="chapter/docinfo|chapterinfo"></xsl:template>
+<xsl:template match="chapter/title"></xsl:template>
+<xsl:template match="chapter/titleabbrev"></xsl:template>
+<xsl:template match="chapter/subtitle"></xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="appendix">
+  <xsl:variable name="ischunk">
+    <xsl:call-template name="chunk"/>
+  </xsl:variable>
+
+  <div class="{name(.)}">
+    <xsl:call-template name="language.attribute"/>
+    <xsl:if test="$generate.id.attributes != 0">
+      <xsl:attribute name="id">
+        <xsl:call-template name="object.id"/>
+      </xsl:attribute>
+    </xsl:if>
+
+    <xsl:choose>
+      <xsl:when test="parent::article and $ischunk = 0">
+        <xsl:call-template name="section.heading">
+          <xsl:with-param name="level" select="1"/>
+          <xsl:with-param name="title">
+            <xsl:apply-templates select="." mode="object.title.markup"/>
+          </xsl:with-param>
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:call-template name="component.separator"/>
+        <xsl:call-template name="appendix.titlepage"/>
+      </xsl:otherwise>
+    </xsl:choose>
+
+    <xsl:variable name="toc.params">
+      <xsl:call-template name="find.path.params">
+        <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
+      </xsl:call-template>
+    </xsl:variable>
+
+    <xsl:if test="contains($toc.params, 'toc')">
+      <xsl:call-template name="component.toc">
+        <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
+      </xsl:call-template>
+      <xsl:call-template name="component.toc.separator"/>
+    </xsl:if>
+
+    <xsl:apply-templates/>
+
+    <xsl:if test="not(parent::article) or $ischunk != 0">
+      <xsl:call-template name="process.footnotes"/>
+    </xsl:if>
+  </div>
+</xsl:template>
+
+<xsl:template match="appendix/title" mode="titlepage.mode" priority="2">
+  <xsl:call-template name="component.title">
+    <xsl:with-param name="node" select="ancestor::appendix[1]"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="appendix/subtitle
+                     |appendix/appendixinfo/subtitle
+                     |appendix/info/subtitle
+                     |appendix/docinfo/subtitle"
+              mode="titlepage.mode" priority="2">
+  <xsl:call-template name="component.subtitle">
+    <xsl:with-param name="node" select="ancestor::appendix[1]"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="appendix/docinfo|appendixinfo"></xsl:template>
+<xsl:template match="appendix/title"></xsl:template>
+<xsl:template match="appendix/titleabbrev"></xsl:template>
+<xsl:template match="appendix/subtitle"></xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="dedication" mode="component.number">
+  <xsl:param name="add.space" select="false()"/>
+</xsl:template>
+
+<xsl:template match="preface" mode="component.number">
+  <xsl:param name="add.space" select="false()"/>
+</xsl:template>
+
+<xsl:template match="chapter" mode="component.number">
+  <xsl:param name="add.space" select="false()"/>
+
+  <xsl:choose>
+    <xsl:when test="@label">
+      <xsl:value-of select="@label"/>
+      <xsl:text>.</xsl:text>
+      <xsl:if test="$add.space">
+        <xsl:call-template name="gentext.space"/>
+      </xsl:if>
+    </xsl:when>
+    <xsl:when test="$chapter.autolabel">
+      <xsl:number from="book" count="chapter" format="1."/>
+      <xsl:if test="$add.space">
+        <xsl:call-template name="gentext.space"/>
+      </xsl:if>
+    </xsl:when>
+    <xsl:otherwise></xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="appendix" mode="component.number">
+  <xsl:param name="add.space" select="false()"/>
+
+  <xsl:choose>
+    <xsl:when test="@label">
+      <xsl:value-of select="@label"/>
+      <xsl:text>.</xsl:text>
+      <xsl:if test="$add.space">
+        <xsl:call-template name="gentext.space"/>
+      </xsl:if>
+    </xsl:when>
+    <xsl:when test="$chapter.autolabel">
+      <xsl:number from="book" count="appendix" format="A."/>
+      <xsl:if test="$add.space">
+        <xsl:call-template name="gentext.space"/>
+      </xsl:if>
+    </xsl:when>
+    <xsl:otherwise></xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="article" mode="component.number">
+  <xsl:param name="add.space" select="false()"/>
+</xsl:template>
+
+<xsl:template match="bibliography" mode="component.number">
+  <xsl:param name="add.space" select="false()"/>
+</xsl:template>
+
+<xsl:template match="glossary" mode="component.number">
+  <xsl:param name="add.space" select="false()"/>
+</xsl:template>
+
+<xsl:template match="index" mode="component.number">
+  <xsl:param name="add.space" select="false()"/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="article">
+  <div class="{name(.)}">
+    <xsl:call-template name="language.attribute"/>
+    <xsl:if test="$generate.id.attributes != 0">
+      <xsl:attribute name="id">
+        <xsl:call-template name="object.id"/>
+      </xsl:attribute>
+    </xsl:if>
+
+    <xsl:call-template name="article.titlepage"/>
+
+    <xsl:variable name="toc.params">
+      <xsl:call-template name="find.path.params">
+        <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
+      </xsl:call-template>
+    </xsl:variable>
+
+    <xsl:call-template name="make.lots">
+      <xsl:with-param name="toc.params" select="$toc.params"/>
+      <xsl:with-param name="toc">
+        <xsl:call-template name="component.toc">
+          <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
+        </xsl:call-template>
+      </xsl:with-param>
+    </xsl:call-template>
+
+    <xsl:apply-templates/>
+    <xsl:call-template name="process.footnotes"/>
+  </div>
+</xsl:template>
+
+<xsl:template match="article/title" mode="titlepage.mode" priority="2">
+  <xsl:call-template name="component.title">
+    <xsl:with-param name="node" select="ancestor::article[1]"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="article/subtitle
+                     |article/articleinfo/subtitle
+                     |article/info/subtitle
+                     |article/artheader/subtitle"
+              mode="titlepage.mode" priority="2">
+  <xsl:call-template name="component.subtitle">
+    <xsl:with-param name="node" select="ancestor::article[1]"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="article/artheader|article/articleinfo"></xsl:template>
+<xsl:template match="article/title"></xsl:template>
+<xsl:template match="article/titleabbrev"></xsl:template>
+<xsl:template match="article/subtitle"></xsl:template>
+
+<!-- ==================================================================== -->
+
+</xsl:stylesheet>
+

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/division.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/division.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/division.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,175 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: division.xsl,v 1.1.1.1 2004/10/19 21:21:46 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:template match="set">
+  <div class="{name(.)}">
+    <xsl:call-template name="language.attribute"/>
+    <xsl:if test="$generate.id.attributes != 0">
+      <xsl:attribute name="id">
+        <xsl:call-template name="object.id"/>
+      </xsl:attribute>
+    </xsl:if>
+
+    <xsl:call-template name="set.titlepage"/>
+
+    <xsl:call-template name="make.lots">
+      <xsl:with-param name="toc.params">
+        <xsl:call-template name="find.path.params">
+          <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
+        </xsl:call-template>
+      </xsl:with-param>
+      <xsl:with-param name="toc">
+        <xsl:call-template name="set.toc"/>
+      </xsl:with-param>
+    </xsl:call-template>
+
+    <xsl:apply-templates/>
+  </div>
+</xsl:template>
+
+<xsl:template match="set/setinfo"></xsl:template>
+<xsl:template match="set/title"></xsl:template>
+<xsl:template match="set/titleabbrev"></xsl:template>
+<xsl:template match="set/subtitle"></xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="book">
+  <div class="{name(.)}">
+    <xsl:call-template name="language.attribute"/>
+    <xsl:if test="$generate.id.attributes != 0">
+      <xsl:attribute name="id">
+        <xsl:call-template name="object.id"/>
+      </xsl:attribute>
+    </xsl:if>
+
+    <xsl:call-template name="book.titlepage"/>
+
+    <xsl:apply-templates select="dedication" mode="dedication"/>
+
+    <xsl:call-template name="make.lots">
+      <xsl:with-param name="toc.params">
+        <xsl:call-template name="find.path.params">
+          <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
+        </xsl:call-template>
+      </xsl:with-param>
+      <xsl:with-param name="toc">
+        <xsl:call-template name="division.toc"/>
+      </xsl:with-param>
+    </xsl:call-template>
+
+    <xsl:apply-templates/>
+  </div>
+</xsl:template>
+
+<xsl:template match="book/bookinfo"></xsl:template>
+<xsl:template match="book/title"></xsl:template>
+<xsl:template match="book/titleabbrev"></xsl:template>
+<xsl:template match="book/subtitle"></xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="part">
+  <div class="{name(.)}">
+    <xsl:call-template name="language.attribute"/>
+    <xsl:if test="$generate.id.attributes != 0">
+      <xsl:attribute name="id">
+        <xsl:call-template name="object.id"/>
+      </xsl:attribute>
+    </xsl:if>
+
+    <xsl:call-template name="part.titlepage"/>
+
+    <xsl:variable name="toc.params">
+      <xsl:call-template name="find.path.params">
+        <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
+      </xsl:call-template>
+    </xsl:variable>
+    <xsl:if test="not(partintro) and contains($toc.params, 'toc')">
+      <xsl:call-template name="division.toc"/>
+    </xsl:if>
+    <xsl:apply-templates/>
+  </div>
+</xsl:template>
+
+<xsl:template match="part" mode="make.part.toc">
+  <xsl:call-template name="division.toc"/>
+</xsl:template>
+
+<xsl:template match="reference" mode="make.part.toc">
+  <xsl:call-template name="division.toc"/>
+</xsl:template>
+
+<xsl:template match="part/docinfo"></xsl:template>
+<xsl:template match="part/partinfo"></xsl:template>
+<xsl:template match="part/title"></xsl:template>
+<xsl:template match="part/titleabbrev"></xsl:template>
+<xsl:template match="part/subtitle"></xsl:template>
+
+<xsl:template match="partintro">
+  <div class="{name(.)}">
+    <xsl:call-template name="language.attribute"/>
+    <xsl:if test="$generate.id.attributes != 0">
+      <xsl:attribute name="id">
+        <xsl:call-template name="object.id"/>
+      </xsl:attribute>
+    </xsl:if>
+
+    <xsl:call-template name="partintro.titlepage"/>
+    <xsl:apply-templates/>
+
+    <xsl:variable name="toc.params">
+      <xsl:call-template name="find.path.params">
+        <xsl:with-param name="node" select="parent::*"/>
+        <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
+      </xsl:call-template>
+    </xsl:variable>
+    <xsl:if test="contains($toc.params, 'toc')">
+      <!-- not ancestor::part because partintro appears in reference -->
+      <xsl:apply-templates select="parent::*" mode="make.part.toc"/>
+    </xsl:if>
+    <xsl:call-template name="process.footnotes"/>
+  </div>
+</xsl:template>
+
+<xsl:template match="partintro/title"></xsl:template>
+<xsl:template match="partintro/titleabbrev"></xsl:template>
+<xsl:template match="partintro/subtitle"></xsl:template>
+
+<xsl:template match="partintro/title" mode="partintro.title.mode">
+  <h2>
+    <xsl:apply-templates/>
+  </h2>
+</xsl:template>
+
+<xsl:template match="partintro/subtitle" mode="partintro.title.mode">
+  <h3>
+    <i><xsl:apply-templates/></i>
+  </h3>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="book" mode="division.number">
+  <xsl:number from="set" count="book" format="1."/>
+</xsl:template>
+
+<xsl:template match="part" mode="division.number">
+  <xsl:number from="book" count="part" format="I."/>
+</xsl:template>
+
+</xsl:stylesheet>
+

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/docbook.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/docbook.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/docbook.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,411 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:exsl="http://exslt.org/common"
+                exclude-result-prefixes="exsl"
+                version='1.0'>
+
+<xsl:output method="html"
+            encoding="ISO-8859-1"
+            indent="no"/>
+
+<!-- ********************************************************************
+     $Id: docbook.xsl,v 1.1.1.1 2004/10/19 21:21:46 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:include href="../VERSION"/>
+<xsl:include href="param.xsl"/>
+<xsl:include href="../lib/lib.xsl"/>
+<xsl:include href="../common/l10n.xsl"/>
+<xsl:include href="../common/common.xsl"/>
+<xsl:include href="../common/labels.xsl"/>
+<xsl:include href="../common/titles.xsl"/>
+<xsl:include href="../common/subtitles.xsl"/>
+<xsl:include href="../common/gentext.xsl"/>
+<xsl:include href="../common/targets.xsl"/>
+<xsl:include href="../common/pi.xsl"/>
+<xsl:include href="autotoc.xsl"/>
+<xsl:include href="autoidx.xsl"/>
+<xsl:include href="lists.xsl"/>
+<xsl:include href="callout.xsl"/>
+<xsl:include href="verbatim.xsl"/>
+<xsl:include href="graphics.xsl"/>
+<xsl:include href="xref.xsl"/>
+<xsl:include href="formal.xsl"/>
+<xsl:include href="table.xsl"/>
+<xsl:include href="htmltbl.xsl"/>
+<xsl:include href="sections.xsl"/>
+<xsl:include href="inline.xsl"/>
+<xsl:include href="footnote.xsl"/>
+<xsl:include href="html.xsl"/>
+<xsl:include href="info.xsl"/>
+<xsl:include href="keywords.xsl"/>
+<xsl:include href="division.xsl"/>
+<xsl:include href="toc.xsl"/>
+<xsl:include href="index.xsl"/>
+<xsl:include href="refentry.xsl"/>
+<xsl:include href="math.xsl"/>
+<xsl:include href="admon.xsl"/>
+<xsl:include href="component.xsl"/>
+<xsl:include href="biblio.xsl"/>
+<xsl:include href="glossary.xsl"/>
+<xsl:include href="block.xsl"/>
+<xsl:include href="task.xsl"/>
+<xsl:include href="qandaset.xsl"/>
+<xsl:include href="synop.xsl"/>
+<xsl:include href="titlepage.xsl"/>
+<xsl:include href="titlepage.templates.xsl"/>
+<xsl:include href="pi.xsl"/>
+<xsl:include href="ebnf.xsl"/>
+<xsl:include href="chunker.xsl"/>
+<xsl:include href="html-rtf.xsl"/>
+<xsl:include href="docbookng.xsl"/>
+
+<xsl:param name="stylesheet.result.type" select="'html'"/>
+
+<!-- ==================================================================== -->
+
+<xsl:key name="id" match="*" use="@id"/>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="*">
+  <xsl:message>
+    <xsl:text>No template matches </xsl:text>
+    <xsl:value-of select="name(.)"/>
+    <xsl:if test="parent::*">
+      <xsl:text> in </xsl:text>
+      <xsl:value-of select="name(parent::*)"/>
+    </xsl:if>
+    <xsl:text>.</xsl:text>
+  </xsl:message>
+
+  <font color="red">
+    <xsl:text>&lt;</xsl:text>
+    <xsl:value-of select="name(.)"/>
+    <xsl:text>&gt;</xsl:text>
+    <xsl:apply-templates/>
+    <xsl:text>&lt;/</xsl:text>
+    <xsl:value-of select="name(.)"/>
+    <xsl:text>&gt;</xsl:text>
+  </font>
+</xsl:template>
+
+<xsl:template match="text()">
+  <xsl:value-of select="."/>
+</xsl:template>
+
+<xsl:template name="body.attributes">
+  <xsl:attribute name="bgcolor">white</xsl:attribute>
+  <xsl:attribute name="text">black</xsl:attribute>
+  <xsl:attribute name="link">#0000FF</xsl:attribute>
+  <xsl:attribute name="vlink">#840084</xsl:attribute>
+  <xsl:attribute name="alink">#0000FF</xsl:attribute>
+</xsl:template>
+
+<xsl:template name="head.content">
+  <xsl:param name="node" select="."/>
+  <xsl:param name="title">
+    <xsl:apply-templates select="$node" mode="object.title.markup.textonly"/>
+  </xsl:param>
+
+  <title>
+    <xsl:copy-of select="$title"/>
+  </title>
+
+  <xsl:if test="$html.stylesheet != ''">
+    <xsl:call-template name="output.html.stylesheets">
+      <xsl:with-param name="stylesheets" select="normalize-space($html.stylesheet)"/>
+    </xsl:call-template>
+  </xsl:if>
+
+  <xsl:if test="$link.mailto.url != ''">
+    <link rev="made"
+          href="{$link.mailto.url}"/>
+  </xsl:if>
+
+  <xsl:if test="$html.base != ''">
+    <base href="{$html.base}"/>
+  </xsl:if>
+
+  <meta name="generator" content="DocBook XSL Stylesheets V{$VERSION}"/>
+
+  <xsl:if test="$generate.meta.abstract != 0">
+    <xsl:variable name="info" select="(articleinfo
+                                      |bookinfo
+                                      |prefaceinfo
+                                      |chapterinfo
+                                      |appendixinfo
+                                      |sectioninfo
+                                      |sect1info
+                                      |sect2info
+                                      |sect3info
+                                      |sect4info
+                                      |sect5info
+                                      |referenceinfo
+                                      |refentryinfo
+                                      |partinfo
+                                      |info
+                                      |docinfo)[1]"/>
+    <xsl:if test="$info and $info/abstract">
+      <meta name="description">
+        <xsl:attribute name="content">
+          <xsl:for-each select="$info/abstract[1]/*">
+            <xsl:value-of select="."/>
+            <xsl:if test="position() &lt; last()">
+              <xsl:text> </xsl:text>
+            </xsl:if>
+          </xsl:for-each>
+        </xsl:attribute>
+      </meta>
+    </xsl:if>
+  </xsl:if>
+
+  <xsl:if test="($draft.mode = 'yes' or
+                ($draft.mode = 'maybe' and
+                ancestor-or-self::*[@status][1]/@status = 'draft'))
+                and $draft.watermark.image != ''">
+    <style type="text/css"><xsl:text>
+body { background-image: url('</xsl:text>
+<xsl:value-of select="$draft.watermark.image"/><xsl:text>');
+       background-repeat: no-repeat;
+       background-position: top left;
+       /* The following properties make the watermark "fixed" on the page. */
+       /* I think that's just a bit too distracting for the reader... */
+       /* background-attachment: fixed; */
+       /* background-position: center center; */
+     }</xsl:text>
+    </style>
+  </xsl:if>
+  <xsl:apply-templates select="." mode="head.keywords.content"/>
+</xsl:template>
+
+<xsl:template name="output.html.stylesheets">
+  <xsl:param name="stylesheets" select="''"/>
+
+  <xsl:choose>
+    <xsl:when test="contains($stylesheets, ' ')">
+      <link rel="stylesheet" href="{substring-before($stylesheets, ' ')}">
+        <xsl:if test="$html.stylesheet.type != ''">
+          <xsl:attribute name="type">
+            <xsl:value-of select="$html.stylesheet.type"/>
+          </xsl:attribute>
+        </xsl:if>
+      </link>
+      <xsl:call-template name="output.html.stylesheets">
+        <xsl:with-param name="stylesheets" select="substring-after($stylesheets, ' ')"/>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:when test="$stylesheets != ''">
+      <link rel="stylesheet" href="{$stylesheets}">
+        <xsl:if test="$html.stylesheet.type != ''">
+          <xsl:attribute name="type">
+            <xsl:value-of select="$html.stylesheet.type"/>
+          </xsl:attribute>
+        </xsl:if>
+      </link>
+    </xsl:when>
+  </xsl:choose>
+</xsl:template>
+
+<!-- ============================================================ -->
+
+<xsl:template match="*" mode="head.keywords.content">
+  <xsl:apply-templates select="chapterinfo/keywordset" mode="html.header"/>
+  <xsl:apply-templates select="appendixinfo/keywordset" mode="html.header"/>
+  <xsl:apply-templates select="prefaceinfo/keywordset" mode="html.header"/>
+  <xsl:apply-templates select="bookinfo/keywordset" mode="html.header"/>
+  <xsl:apply-templates select="setinfo/keywordset" mode="html.header"/>
+  <xsl:apply-templates select="articleinfo/keywordset" mode="html.header"/>
+  <xsl:apply-templates select="artheader/keywordset" mode="html.header"/>
+  <xsl:apply-templates select="sect1info/keywordset" mode="html.header"/>
+  <xsl:apply-templates select="sect2info/keywordset" mode="html.header"/>
+  <xsl:apply-templates select="sect3info/keywordset" mode="html.header"/>
+  <xsl:apply-templates select="sect4info/keywordset" mode="html.header"/>
+  <xsl:apply-templates select="sect5info/keywordset" mode="html.header"/>
+  <xsl:apply-templates select="refsect1info/keywordset" mode="html.header"/>
+  <xsl:apply-templates select="refsect2info/keywordset" mode="html.header"/>
+  <xsl:apply-templates select="refsect3info/keywordset" mode="html.header"/>
+  <xsl:apply-templates select="bibliographyinfo/keywordset" mode="html.header"/>
+  <xsl:apply-templates select="glossaryinfo/keywordset" mode="html.header"/>
+  <xsl:apply-templates select="indexinfo/keywordset" mode="html.header"/>
+  <xsl:apply-templates select="refentryinfo/keywordset" mode="html.header"/>
+  <xsl:apply-templates select="partinfo/keywordset" mode="html.header"/>
+  <xsl:apply-templates select="referenceinfo/keywordset" mode="html.header"/>
+  <xsl:apply-templates select="docinfo/keywordset" mode="html.header"/>
+  <xsl:apply-templates select="info/keywordset" mode="html.header"/>
+
+  <xsl:if test="$inherit.keywords != 0
+                and parent::*">
+    <xsl:apply-templates select="parent::*" mode="head.keywords.content"/>
+  </xsl:if>
+</xsl:template>
+
+<!-- ============================================================ -->
+
+<xsl:template name="system.head.content">
+  <xsl:param name="node" select="."/>
+
+  <!-- system.head.content is like user.head.content, except that
+       it is called before head.content. This is important because it
+       means, for example, that <style> elements output by system.head.content
+       have a lower CSS precedence than the users stylesheet. -->
+</xsl:template>
+
+<!-- ============================================================ -->
+
+<xsl:template name="user.head.content">
+  <xsl:param name="node" select="."/>
+</xsl:template>
+
+<xsl:template name="user.header.navigation">
+  <xsl:param name="node" select="."/>
+</xsl:template>
+
+<xsl:template name="user.header.content">
+  <xsl:param name="node" select="."/>
+</xsl:template>
+
+<xsl:template name="user.footer.content">
+  <xsl:param name="node" select="."/>
+</xsl:template>
+
+<xsl:template name="user.footer.navigation">
+  <xsl:param name="node" select="."/>
+</xsl:template>
+
+<xsl:template match="/">
+  <xsl:choose>
+    <xsl:when test="function-available('exsl:node-set')
+                    and namespace-uri(*[1]) = 'http://docbook.org/docbook-ng'">
+      <!-- Hack! If someone hands us a DocBook NG document, toss the namespace -->
+      <!-- and continue. Someday we may reverse this logic and add the namespace -->
+      <!-- to documents that don't have one. But not before the whole stylesheet -->
+      <!-- has been converted to use namespaces. i.e., don't hold your breath -->
+      <xsl:variable name="nons">
+	<xsl:apply-templates mode="stripNS"/>
+      </xsl:variable>
+      <xsl:apply-templates select="exsl:node-set($nons)"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:choose>
+	<xsl:when test="$rootid != ''">
+	  <xsl:choose>
+	    <xsl:when test="count(key('id',$rootid)) = 0">
+	      <xsl:message terminate="yes">
+		<xsl:text>ID '</xsl:text>
+		<xsl:value-of select="$rootid"/>
+		<xsl:text>' not found in document.</xsl:text>
+	      </xsl:message>
+	    </xsl:when>
+	    <xsl:otherwise>
+	      <xsl:if test="$collect.xref.targets = 'yes' or
+		            $collect.xref.targets = 'only'">
+		<xsl:apply-templates select="key('id', $rootid)"
+				     mode="collect.targets"/>
+	      </xsl:if>
+	      <xsl:if test="$collect.xref.targets != 'only'">
+		<xsl:apply-templates select="key('id',$rootid)"
+				     mode="process.root"/>
+		<xsl:if test="$tex.math.in.alt != ''">
+		  <xsl:apply-templates select="key('id',$rootid)"
+				       mode="collect.tex.math"/>
+		</xsl:if>
+	      </xsl:if>
+	    </xsl:otherwise>
+	  </xsl:choose>
+	</xsl:when>
+	<xsl:otherwise>
+	  <xsl:if test="$collect.xref.targets = 'yes' or
+		        $collect.xref.targets = 'only'">
+	    <xsl:apply-templates select="/" mode="collect.targets"/>
+	  </xsl:if>
+	  <xsl:if test="$collect.xref.targets != 'only'">
+	    <xsl:apply-templates select="/" mode="process.root"/>
+	    <xsl:if test="$tex.math.in.alt != ''">
+	      <xsl:apply-templates select="/" mode="collect.tex.math"/>
+	    </xsl:if>
+	  </xsl:if>
+	</xsl:otherwise>
+      </xsl:choose>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="*" mode="process.root">
+  <xsl:variable name="doc" select="self::*"/>
+
+  <xsl:call-template name="root.messages"/>
+
+  <html>
+    <head>
+      <xsl:call-template name="system.head.content">
+        <xsl:with-param name="node" select="$doc"/>
+      </xsl:call-template>
+      <xsl:call-template name="head.content">
+        <xsl:with-param name="node" select="$doc"/>
+      </xsl:call-template>
+      <xsl:call-template name="user.head.content">
+        <xsl:with-param name="node" select="$doc"/>
+      </xsl:call-template>
+    </head>
+    <body>
+      <xsl:call-template name="body.attributes"/>
+      <xsl:call-template name="user.header.content">
+        <xsl:with-param name="node" select="$doc"/>
+      </xsl:call-template>
+      <xsl:apply-templates select="."/>
+      <xsl:call-template name="user.footer.content">
+        <xsl:with-param name="node" select="$doc"/>
+      </xsl:call-template>
+    </body>
+  </html>
+</xsl:template>
+
+<xsl:template name="root.messages">
+  <!-- redefine this any way you'd like to output messages -->
+  <!-- DO NOT OUTPUT ANYTHING FROM THIS TEMPLATE -->
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="chunk">
+  <xsl:param name="node" select="."/>
+
+  <!-- The default is that we are not chunking... -->
+  <xsl:text>0</xsl:text>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="*" mode="stripNS">
+  <xsl:choose>
+    <xsl:when test="namespace-uri(.) = 'http://docbook.org/docbook-ng'">
+      <xsl:element name="{local-name(.)}">
+	<xsl:copy-of select="@*"/>
+	<xsl:apply-templates mode="stripNS"/>
+      </xsl:element>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:copy>
+	<xsl:copy-of select="@*"/>
+	<xsl:apply-templates mode="stripNS"/>
+      </xsl:copy>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="comment()|processing-instruction()|text()" mode="stripNS">
+  <xsl:copy/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/docbookng.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/docbookng.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/docbookng.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,7 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                version='1.0'>
+
+<xsl:template match="info"/>
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/ebnf.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/ebnf.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/ebnf.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,327 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+                exclude-result-prefixes="doc"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: ebnf.xsl,v 1.1.1.1 2004/10/19 21:21:46 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<doc:reference xmlns="">
+<referenceinfo>
+<releaseinfo role="meta">
+$Id: ebnf.xsl,v 1.1.1.1 2004/10/19 21:21:46 juntao Exp $
+</releaseinfo>
+<author><surname>Walsh</surname>
+<firstname>Norman</firstname></author>
+<copyright><year>1999</year><year>2000</year>
+<holder>Norman Walsh</holder>
+</copyright>
+</referenceinfo>
+<title>HTML EBNF Reference</title>
+
+<partintro>
+<section><title>Introduction</title>
+
+<para>This is technical reference documentation for the DocBook XSL
+Stylesheets; it documents (some of) the parameters, templates, and
+other elements of the stylesheets.</para>
+
+<para>This reference describes the templates and parameters relevant
+to formatting EBNF markup.</para>
+
+<para>This is not intended to be <quote>user</quote> documentation.
+It is provided for developers writing customization layers for the
+stylesheets, and for anyone who's interested in <quote>how it
+works</quote>.</para>
+
+<para>Although I am trying to be thorough, this documentation is known
+to be incomplete. Don't forget to read the source, too :-)</para>
+</section>
+</partintro>
+</doc:reference>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="productionset">
+  <table width="100%" cellpadding="5">
+    <xsl:if test="$ebnf.table.bgcolor != ''">
+      <xsl:attribute name="bgcolor">
+	<xsl:value-of select="$ebnf.table.bgcolor"/>
+      </xsl:attribute>
+    </xsl:if>
+    <xsl:if test="$ebnf.table.border != 0">
+      <xsl:attribute name="border">1</xsl:attribute>
+    </xsl:if>
+    <xsl:attribute name="class">
+      <xsl:value-of select="name(.)"/>
+    </xsl:attribute>
+    <xsl:attribute name="summary">
+      <xsl:text>EBNF</xsl:text>
+      <xsl:if test="title">
+	<xsl:text> for </xsl:text>
+	<xsl:value-of select="title"/>
+      </xsl:if>
+    </xsl:attribute>
+
+    <xsl:if test="title">
+      <tr>
+	<th align="left" valign="top" class="{name(.)}">
+	  <xsl:apply-templates select="title"/>
+	</th>
+      </tr>
+    </xsl:if>
+    <tr>
+      <td>
+	<table border="0" width="99%" cellpadding="0">
+	  <xsl:if test="$ebnf.table.bgcolor != ''">
+	    <xsl:attribute name="bgcolor">
+	      <xsl:value-of select="$ebnf.table.bgcolor"/>
+	    </xsl:attribute>
+	  </xsl:if>
+	  <xsl:attribute name="class">
+	    <xsl:value-of select="name(.)"/>
+	  </xsl:attribute>
+	  <xsl:attribute name="summary">EBNF productions</xsl:attribute>
+	  <xsl:apply-templates select="production|productionrecap"/>
+	</table>
+      </td>
+    </tr>
+  </table>
+</xsl:template>
+
+<xsl:template match="productionset/title">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="production">
+  <xsl:param name="recap" select="false()"/>
+  <tr>
+    <td align="left" valign="top" width="3%">
+      <xsl:text>[</xsl:text>
+      <xsl:number count="production" level="any"/>
+      <xsl:text>]</xsl:text>
+    </td>
+    <td align="right" valign="top" width="10%">
+      <xsl:choose>
+	<xsl:when test="$recap">
+	  <a>
+	    <xsl:attribute name="href">
+	      <xsl:call-template name="href.target">
+		<xsl:with-param name="object" select="."/>
+	      </xsl:call-template>
+	    </xsl:attribute>
+	    <xsl:apply-templates select="lhs"/>
+	  </a>
+	</xsl:when>
+	<xsl:otherwise>
+          <xsl:call-template name="anchor"/>
+	  <xsl:apply-templates select="lhs"/>
+	</xsl:otherwise>
+      </xsl:choose>
+    </td>
+    <td valign="top" width="5%" align="center">
+      <xsl:copy-of select="$ebnf.assignment"/>
+    </td>
+    <td valign="top" width="52%">
+      <xsl:apply-templates select="rhs"/>
+      <xsl:copy-of select="$ebnf.statement.terminator"/>
+    </td>
+    <td align="left" valign="top" width="30%">
+      <xsl:choose>
+	<xsl:when test="rhs/lineannotation|constraint">
+          <xsl:apply-templates select="rhs/lineannotation" mode="rhslo"/>
+          <xsl:apply-templates select="constraint"/>
+	</xsl:when>
+	<xsl:otherwise>
+	  <xsl:text>&#160;</xsl:text>
+	</xsl:otherwise>
+      </xsl:choose>
+    </td>
+  </tr>
+</xsl:template>
+
+<xsl:template match="productionrecap">
+  <xsl:variable name="targets" select="key('id', at linkend)"/>
+  <xsl:variable name="target" select="$targets[1]"/>
+
+  <xsl:if test="count($targets)=0">
+    <xsl:message>
+      <xsl:text>Error: no ID for productionrecap linkend: </xsl:text>
+      <xsl:value-of select="@linkend"/>
+      <xsl:text>.</xsl:text>
+    </xsl:message>
+  </xsl:if>
+
+  <xsl:if test="count($targets)>1">
+    <xsl:message>
+      <xsl:text>Warning: multiple "IDs" for productionrecap linkend: </xsl:text>
+      <xsl:value-of select="@linkend"/>
+      <xsl:text>.</xsl:text>
+    </xsl:message>
+  </xsl:if>
+
+  <xsl:apply-templates select="$target">
+    <xsl:with-param name="recap" select="true()"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="lhs">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="rhs">
+  <xsl:apply-templates/>
+  <xsl:if test="following-sibling::rhs">
+    <xsl:text> |</xsl:text>
+    <br/>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="nonterminal">
+  <xsl:variable name="linkend">
+    <xsl:call-template name="xpointer.idref">
+      <xsl:with-param name="xpointer" select="@def"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:call-template name="check.id.unique">
+    <xsl:with-param name="linkend" select="$linkend"/>
+  </xsl:call-template>
+
+  <xsl:call-template name="check.idref.targets">
+    <xsl:with-param name="linkend" select="$linkend"/>
+    <xsl:with-param name="element-list">production</xsl:with-param>
+  </xsl:call-template>
+
+  <!-- If you don't provide content, you can't point outside this doc. -->
+  <xsl:choose>
+    <xsl:when test="*|text()"><!--nop--></xsl:when>
+    <xsl:otherwise>
+      <xsl:if test="$linkend = ''">
+	<xsl:message>
+	  <xsl:text>Non-terminals with no content must point to </xsl:text>
+	  <xsl:text>production elements in the current document.</xsl:text>
+	</xsl:message>
+	<xsl:message>
+	  <xsl:text>Invalid xpointer for empty nt: </xsl:text>
+	  <xsl:value-of select="@def"/>
+	</xsl:message>
+      </xsl:if>
+    </xsl:otherwise>
+  </xsl:choose>
+
+  <xsl:variable name="href">
+    <xsl:choose>
+      <xsl:when test="$linkend != ''">
+	<xsl:variable name="targets" select="key('id',$linkend)"/>
+	<xsl:variable name="target" select="$targets[1]"/>
+	<xsl:call-template name="href.target">
+	  <xsl:with-param name="object" select="$target"/>
+	</xsl:call-template>
+      </xsl:when>
+      <xsl:otherwise>
+	<xsl:value-of select="@def"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <a href="{$href}">
+    <xsl:choose>
+      <xsl:when test="*|text()">
+	<xsl:apply-templates/>
+      </xsl:when>
+      <xsl:otherwise>
+	<xsl:choose>
+	  <xsl:when test="$linkend != ''">
+	    <xsl:variable name="targets" select="key('id',$linkend)"/>
+	    <xsl:variable name="target" select="$targets[1]"/>
+	    <xsl:apply-templates select="$target/lhs"/>
+	  </xsl:when>
+	  <xsl:otherwise>
+	    <xsl:text>???</xsl:text>
+	  </xsl:otherwise>
+	</xsl:choose>
+      </xsl:otherwise>
+    </xsl:choose>
+  </a>
+</xsl:template>
+
+<xsl:template match="rhs/lineannotation">
+  <!--nop-->
+</xsl:template>
+
+<xsl:template match="rhs/lineannotation" mode="rhslo">
+  <xsl:text>/*&#160;</xsl:text>
+  <xsl:apply-templates/>
+  <xsl:text>&#160;*/</xsl:text>
+  <br/>
+</xsl:template>
+
+<xsl:template match="constraint">
+  <xsl:call-template name="check.id.unique">
+    <xsl:with-param name="linkend" select="@linkend"/>
+  </xsl:call-template>
+
+  <xsl:call-template name="check.idref.targets">
+    <xsl:with-param name="linkend" select="@linkend"/>
+    <xsl:with-param name="element-list">constraintdef</xsl:with-param>
+  </xsl:call-template>
+
+  <xsl:variable name="href">
+    <xsl:variable name="targets" select="key('id', at linkend)"/>
+    <xsl:variable name="target" select="$targets[1]"/>
+    <xsl:call-template name="href.target">
+      <xsl:with-param name="object" select="$target"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:text>[&#160;</xsl:text>
+
+  <xsl:choose>
+    <xsl:when test="@role">
+      <xsl:value-of select="@role"/>
+      <xsl:text>: </xsl:text>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:variable name="targets" select="key('id', at linkend)"/>
+      <xsl:variable name="target" select="$targets[1]"/>
+      <xsl:if test="$target/@role">
+	<xsl:value-of select="$target/@role"/>
+	<xsl:text>: </xsl:text>
+      </xsl:if>
+    </xsl:otherwise>
+  </xsl:choose>
+
+  <a href="{$href}">
+    <xsl:variable name="targets" select="key('id', at linkend)"/>
+    <xsl:variable name="target" select="$targets[1]"/>
+    <xsl:apply-templates select="$target" mode="title.markup"/>
+  </a>
+  <xsl:text>&#160;]</xsl:text>
+  <xsl:if test="following-sibling::constraint">
+    <br/>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="constraintdef">
+  <div class="{name(.)}">
+    <xsl:call-template name="anchor"/>
+    <xsl:apply-templates/>
+  </div>
+</xsl:template>
+
+<xsl:template match="constraintdef/title">
+  <p><b><xsl:apply-templates/></b></p>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/footnote.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/footnote.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/footnote.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,263 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:exsl="http://exslt.org/common"
+                exclude-result-prefixes="exsl"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: footnote.xsl,v 1.1.1.1 2004/10/19 21:21:46 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<xsl:template match="footnote">
+  <xsl:variable name="name">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+  <xsl:variable name="href">
+    <xsl:text>#ftn.</xsl:text>
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="ancestor::tgroup">
+      <sup>
+        <xsl:text>[</xsl:text>
+        <a name="{$name}" href="{$href}">
+          <xsl:apply-templates select="." mode="footnote.number"/>
+        </a>
+        <xsl:text>]</xsl:text>
+      </sup>
+    </xsl:when>
+    <xsl:otherwise>
+      <sup>
+        <xsl:text>[</xsl:text>
+        <a name="{$name}" href="{$href}">
+          <xsl:apply-templates select="." mode="footnote.number"/>
+        </a>
+        <xsl:text>]</xsl:text>
+      </sup>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="footnoteref">
+  <xsl:variable name="targets" select="key('id', at linkend)"/>
+  <xsl:variable name="footnote" select="$targets[1]"/>
+  <xsl:variable name="href">
+    <xsl:text>#ftn.</xsl:text>
+    <xsl:call-template name="object.id">
+      <xsl:with-param name="object" select="$footnote"/>
+    </xsl:call-template>
+  </xsl:variable>
+  <sup>
+    <xsl:text>[</xsl:text>
+    <a href="{$href}">
+      <xsl:apply-templates select="$footnote" mode="footnote.number"/>
+    </a>
+    <xsl:text>]</xsl:text>
+  </sup>
+</xsl:template>
+
+<xsl:template match="footnote" mode="footnote.number">
+  <xsl:choose>
+    <xsl:when test="ancestor::tgroup">
+      <xsl:variable name="tfnum">
+        <xsl:number level="any" from="table|informaltable" format="1"/>
+      </xsl:variable>
+
+      <xsl:choose>
+        <xsl:when test="string-length($table.footnote.number.symbols) &gt;= $tfnum">
+          <xsl:value-of select="substring($table.footnote.number.symbols, $tfnum, 1)"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:number level="any" from="tgroup"
+                      format="{$table.footnote.number.format}"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:variable name="pfoot" select="preceding::footnote"/>
+      <xsl:variable name="ptfoot" select="preceding::tgroup//footnote"/>
+      <xsl:variable name="fnum" select="count($pfoot) - count($ptfoot) + 1"/>
+
+      <xsl:choose>
+        <xsl:when test="string-length($footnote.number.symbols) &gt;= $fnum">
+          <xsl:value-of select="substring($footnote.number.symbols, $fnum, 1)"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:number value="$fnum" format="{$footnote.number.format}"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="footnote/para[1]|footnote/simpara[1]" priority="2">
+  <!-- this only works if the first thing in a footnote is a para, -->
+  <!-- which is ok, because it usually is. -->
+  <xsl:variable name="name">
+    <xsl:text>ftn.</xsl:text>
+    <xsl:call-template name="object.id">
+      <xsl:with-param name="object" select="ancestor::footnote"/>
+    </xsl:call-template>
+  </xsl:variable>
+  <xsl:variable name="href">
+    <xsl:text>#</xsl:text>
+    <xsl:call-template name="object.id">
+      <xsl:with-param name="object" select="ancestor::footnote"/>
+    </xsl:call-template>
+  </xsl:variable>
+  <p>
+    <sup>
+      <xsl:text>[</xsl:text>
+      <a name="{$name}" href="{$href}">
+        <xsl:apply-templates select="ancestor::footnote"
+                             mode="footnote.number"/>
+      </a>
+      <xsl:text>] </xsl:text>
+    </sup>
+    <xsl:apply-templates/>
+  </p>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="*" mode="footnote.body.number">
+  <xsl:variable name="name">
+    <xsl:text>ftn.</xsl:text>
+    <xsl:call-template name="object.id">
+      <xsl:with-param name="object" select="ancestor::footnote"/>
+    </xsl:call-template>
+  </xsl:variable>
+  <xsl:variable name="href">
+    <xsl:text>#</xsl:text>
+    <xsl:call-template name="object.id">
+      <xsl:with-param name="object" select="ancestor::footnote"/>
+    </xsl:call-template>
+  </xsl:variable>
+  <xsl:variable name="footnote.mark">
+    <sup>
+      <xsl:text>[</xsl:text>
+      <a name="{$name}" href="{$href}">
+        <xsl:apply-templates select="ancestor::footnote"
+                             mode="footnote.number"/>
+      </a>
+      <xsl:text>] </xsl:text>
+    </sup>
+  </xsl:variable>
+
+  <xsl:variable name="html">
+    <xsl:apply-templates select="."/>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="function-available('exsl:node-set')">
+      <xsl:variable name="html-nodes" select="exsl:node-set($html)"/>
+      <xsl:choose>
+        <xsl:when test="$html-nodes//p">
+          <xsl:apply-templates select="$html-nodes" mode="insert.html.p">
+            <xsl:with-param name="mark" select="$footnote.mark"/>
+          </xsl:apply-templates>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:apply-templates select="$html-nodes" mode="insert.html.text">
+            <xsl:with-param name="mark" select="$footnote.mark"/>
+          </xsl:apply-templates>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:copy-of select="$html"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<!--
+<xsl:template name="count-element-from">
+  <xsl:param name="from" select=".."/>
+  <xsl:param name="to" select="."/>
+  <xsl:param name="count" select="0"/>
+  <xsl:param name="list" select="$from/following::*[name(.)=name($to)]
+                                 |$from/descendant-or-self::*[name(.)=name($to)]"/>
+
+  <xsl:choose>
+    <xsl:when test="not($list)">
+      <xsl:text>-1</xsl:text>
+    </xsl:when>
+    <xsl:when test="$list[1] = $to">
+      <xsl:value-of select="$count + 1"/>
+    </xsl:when>
+    <xsl:otherwise>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+-->
+
+<!-- ==================================================================== -->
+
+<xsl:template name="process.footnotes">
+  <xsl:variable name="footnotes" select=".//footnote"/>
+  <xsl:variable name="table.footnotes"
+                select=".//tgroup//footnote"/>
+
+  <!-- Only bother to do this if there's at least one non-table footnote -->
+  <xsl:if test="count($footnotes)>count($table.footnotes)">
+    <div class="footnotes">
+      <br/>
+      <hr width="100" align="left"/>
+      <xsl:apply-templates select="$footnotes" mode="process.footnote.mode"/>
+    </div>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template name="process.chunk.footnotes">
+  <!-- nop -->
+</xsl:template>
+
+<xsl:template match="footnote" name="process.footnote" mode="process.footnote.mode">
+  <xsl:choose>
+    <xsl:when test="local-name(*[1]) = 'para' or local-name(*[1]) = 'simpara'">
+      <div class="{name(.)}">
+        <xsl:apply-templates/>
+      </div>
+    </xsl:when>
+
+    <xsl:when test="$html.cleanup != 0 and function-available('exsl:node-set')">
+      <div class="{name(.)}">
+        <xsl:apply-templates select="*[1]" mode="footnote.body.number"/>
+        <xsl:apply-templates select="*[position() &gt; 1]"/>
+      </div>
+    </xsl:when>
+
+    <xsl:otherwise>
+      <xsl:message>
+        <xsl:text>Warning: footnote number may not be generated </xsl:text>
+        <xsl:text>correctly; </xsl:text>
+        <xsl:value-of select="local-name(*[1])"/>
+        <xsl:text> unexpected as first child of footnote.</xsl:text>
+      </xsl:message>
+      <div class="{name(.)}">
+        <xsl:apply-templates/>
+      </div>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="tgroup//footnote"
+              mode="process.footnote.mode">
+</xsl:template>
+
+<xsl:template match="footnote" mode="table.footnote.mode">
+  <xsl:call-template name="process.footnote"/>
+</xsl:template>
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/formal.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/formal.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/formal.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,333 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: formal.xsl,v 1.1.1.1 2004/10/19 21:21:46 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<xsl:template name="formal.object">
+  <xsl:param name="placement" select="'before'"/>
+  <xsl:param name="class" select="local-name(.)"/>
+
+  <div class="{$class}">
+    <xsl:call-template name="anchor">
+      <xsl:with-param name="conditional" select="0"/>
+    </xsl:call-template>
+
+    <xsl:choose>
+      <xsl:when test="$placement = 'before'">
+        <xsl:call-template name="formal.object.heading"/>
+        <xsl:apply-templates/>
+
+        <!-- HACK: This doesn't belong inside formal.object; it should be done by -->
+        <!-- the table template, but I want the link to be inside the DIV, so... -->
+        <xsl:if test="local-name(.) = 'table'">
+          <xsl:call-template name="table.longdesc"/>
+        </xsl:if>
+
+        <xsl:if test="$spacing.paras != 0"><p/></xsl:if>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:if test="$spacing.paras != 0"><p/></xsl:if>
+        <xsl:apply-templates/>
+
+        <!-- HACK: This doesn't belong inside formal.object; it should be done by -->
+        <!-- the table template, but I want the link to be inside the DIV, so... -->
+        <xsl:if test="local-name(.) = 'table'">
+          <xsl:call-template name="table.longdesc"/>
+        </xsl:if>
+
+        <xsl:call-template name="formal.object.heading"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </div>
+</xsl:template>
+
+<xsl:template name="formal.object.heading">
+  <xsl:param name="object" select="."/>
+  <p class="title">
+    <b>
+      <xsl:apply-templates select="$object" mode="object.title.markup">
+        <xsl:with-param name="allow-anchors" select="1"/>
+      </xsl:apply-templates>
+    </b>
+  </p>
+</xsl:template>
+
+<xsl:template name="informal.object">
+  <xsl:param name="class" select="local-name(.)"/>
+
+  <div class="{$class}">
+    <xsl:if test="$spacing.paras != 0"><p/></xsl:if>
+    <xsl:call-template name="anchor"/>
+    <xsl:apply-templates/>
+
+    <!-- HACK: This doesn't belong inside formal.object; it should be done by -->
+    <!-- the table template, but I want the link to be inside the DIV, so... -->
+    <xsl:if test="local-name(.) = 'informaltable'">
+      <xsl:call-template name="table.longdesc"/>
+    </xsl:if>
+
+    <xsl:if test="$spacing.paras != 0"><p/></xsl:if>
+  </div>
+</xsl:template>
+
+<xsl:template name="semiformal.object">
+  <xsl:param name="placement" select="'before'"/>
+  <xsl:param name="class" select="local-name(.)"/>
+
+  <xsl:choose>
+    <xsl:when test="title">
+      <xsl:call-template name="formal.object">
+        <xsl:with-param name="placement" select="$placement"/>
+        <xsl:with-param name="class" select="$class"/>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:call-template name="informal.object">
+        <xsl:with-param name="class" select="$class"/>
+      </xsl:call-template>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="figure">
+  <xsl:variable name="param.placement"
+                select="substring-after(normalize-space($formal.title.placement),
+                                        concat(local-name(.), ' '))"/>
+
+  <xsl:variable name="placement">
+    <xsl:choose>
+      <xsl:when test="contains($param.placement, ' ')">
+        <xsl:value-of select="substring-before($param.placement, ' ')"/>
+      </xsl:when>
+      <xsl:when test="$param.placement = ''">before</xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$param.placement"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="@float and @float != 0">
+      <xsl:variable name="float">
+        <xsl:choose>
+          <xsl:when test="@float = 1">
+            <xsl:value-of select="$default.float.class"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:value-of select="@float"/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:variable>
+
+      <div class="figure-float">
+        <xsl:if test="$float = 'left' or $float = 'right'">
+          <xsl:attribute name="style">
+            <xsl:text>float: </xsl:text>
+            <xsl:value-of select="$float"/>
+            <xsl:text>;</xsl:text>
+          </xsl:attribute>
+        </xsl:if>
+        <xsl:call-template name="formal.object">
+          <xsl:with-param name="placement" select="$placement"/>
+        </xsl:call-template>
+      </div>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:call-template name="formal.object">
+        <xsl:with-param name="placement" select="$placement"/>
+      </xsl:call-template>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="table">
+  <xsl:choose>
+    <xsl:when test="tgroup|mediaobject|graphic">
+      <xsl:call-template name="calsTable"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:copy>
+        <xsl:copy-of select="@*"/>
+        <xsl:call-template name="htmlTable"/>
+      </xsl:copy>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="calsTable">
+  <xsl:if test="tgroup/tbody/tr
+                |tgroup/thead/tr
+                |tgroup/tfoot/tr">
+    <xsl:message terminate="yes">Broken table: tr descendent of CALS Table.</xsl:message>
+  </xsl:if>
+
+  <xsl:variable name="param.placement"
+                select="substring-after(normalize-space($formal.title.placement),
+                                        concat(local-name(.), ' '))"/>
+
+  <xsl:variable name="placement">
+    <xsl:choose>
+      <xsl:when test="contains($param.placement, ' ')">
+        <xsl:value-of select="substring-before($param.placement, ' ')"/>
+      </xsl:when>
+      <xsl:when test="$param.placement = ''">before</xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$param.placement"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:call-template name="formal.object">
+    <xsl:with-param name="placement" select="$placement"/>
+    <xsl:with-param name="class">
+      <xsl:choose>
+        <xsl:when test="@tabstyle">
+          <!-- hack, this will only ever occur on table, not example -->
+          <xsl:value-of select="@tabstyle"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="local-name(.)"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:with-param>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="htmlTable">
+  <xsl:if test="tgroup/tbody/row
+                |tgroup/thead/row
+                |tgroup/tfoot/row">
+    <xsl:message terminate="yes">Broken table: row descendent of HTML table.</xsl:message>
+  </xsl:if>
+
+  <xsl:apply-templates mode="htmlTable"/>
+</xsl:template>
+
+<xsl:template match="example">
+  <xsl:variable name="param.placement"
+                select="substring-after(normalize-space($formal.title.placement),
+                                        concat(local-name(.), ' '))"/>
+
+  <xsl:variable name="placement">
+    <xsl:choose>
+      <xsl:when test="contains($param.placement, ' ')">
+        <xsl:value-of select="substring-before($param.placement, ' ')"/>
+      </xsl:when>
+      <xsl:when test="$param.placement = ''">before</xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$param.placement"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:call-template name="formal.object">
+    <xsl:with-param name="placement" select="$placement"/>
+    <xsl:with-param name="class" select="local-name(.)"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="equation">
+  <xsl:variable name="param.placement"
+                select="substring-after(normalize-space($formal.title.placement),
+                                        concat(local-name(.), ' '))"/>
+
+  <xsl:variable name="placement">
+    <xsl:choose>
+      <xsl:when test="contains($param.placement, ' ')">
+        <xsl:value-of select="substring-before($param.placement, ' ')"/>
+      </xsl:when>
+      <xsl:when test="$param.placement = ''">before</xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$param.placement"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:call-template name="semiformal.object">
+    <xsl:with-param name="placement" select="$placement"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="figure/title"></xsl:template>
+<xsl:template match="figure/titleabbrev"></xsl:template>
+<xsl:template match="table/title"></xsl:template>
+<xsl:template match="table/titleabbrev"></xsl:template>
+<xsl:template match="table/textobject"></xsl:template>
+<xsl:template match="example/title"></xsl:template>
+<xsl:template match="example/titleabbrev"></xsl:template>
+<xsl:template match="equation/title"></xsl:template>
+<xsl:template match="equation/titleabbrev"></xsl:template>
+
+<xsl:template match="informalfigure">
+  <xsl:call-template name="informal.object"/>
+</xsl:template>
+
+<xsl:template match="informalexample">
+  <xsl:call-template name="informal.object"/>
+</xsl:template>
+
+<xsl:template match="informaltable">
+  <xsl:choose>
+    <xsl:when test="tgroup|mediaobject|graphic">
+      <xsl:call-template name="informal.object">
+        <xsl:with-param name="class">
+          <xsl:choose>
+            <xsl:when test="@tabstyle">
+              <xsl:value-of select="@tabstyle"/>
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:value-of select="local-name(.)"/>
+            </xsl:otherwise>
+          </xsl:choose>
+        </xsl:with-param>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:otherwise>
+      <table>
+        <xsl:copy-of select="@*"/>
+        <xsl:call-template name="htmlTable"/>
+      </table>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="informaltable/textobject"></xsl:template>
+
+<xsl:template name="table.longdesc">
+  <!-- HACK: This doesn't belong inside formal.objectt; it should be done by -->
+  <!-- the table template, but I want the link to be inside the DIV, so... -->
+  <xsl:variable name="longdesc.uri">
+    <xsl:call-template name="longdesc.uri">
+      <xsl:with-param name="mediaobject" select="."/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="irrelevant">
+    <!-- write.longdesc returns the filename ... -->
+    <xsl:call-template name="write.longdesc">
+      <xsl:with-param name="mediaobject" select="."/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:if test="$html.longdesc != 0 and $html.longdesc.link != 0
+                and textobject[not(phrase)]">
+    <xsl:call-template name="longdesc.link">
+      <xsl:with-param name="longdesc.uri" select="$longdesc.uri"/>
+    </xsl:call-template>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="informalequation">
+  <xsl:call-template name="informal.object"/>
+</xsl:template>
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/glossary.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/glossary.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/glossary.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,359 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: glossary.xsl,v 1.1.1.1 2004/10/19 21:21:46 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:template match="glossary">
+  <div class="{name(.)}">
+    <xsl:if test="$generate.id.attributes != 0">
+      <xsl:attribute name="id">
+        <xsl:call-template name="object.id"/>
+      </xsl:attribute>
+    </xsl:if>
+
+    <xsl:call-template name="glossary.titlepage"/>
+
+    <xsl:choose>
+      <xsl:when test="glossdiv">
+        <xsl:apply-templates select="(glossdiv[1]/preceding-sibling::*)"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:apply-templates select="(glossentry[1]/preceding-sibling::*)"/>
+      </xsl:otherwise>
+    </xsl:choose>
+
+    <xsl:choose>
+      <xsl:when test="glossdiv">
+        <xsl:apply-templates select="glossdiv"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <dl>
+          <xsl:apply-templates select="glossentry"/>
+        </dl>
+      </xsl:otherwise>
+    </xsl:choose>
+
+    <xsl:if test="not(parent::article)">
+      <xsl:call-template name="process.footnotes"/>
+    </xsl:if>
+  </div>
+</xsl:template>
+
+<xsl:template match="glossary/glossaryinfo"></xsl:template>
+<xsl:template match="glossary/title"></xsl:template>
+<xsl:template match="glossary/subtitle"></xsl:template>
+<xsl:template match="glossary/titleabbrev"></xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="glosslist">
+  <div class="{name(.)}">
+    <xsl:call-template name="anchor"/>
+    <xsl:if test="blockinfo/title|title">
+      <xsl:call-template name="formal.object.heading"/>
+    </xsl:if>
+    <dl>
+      <xsl:apply-templates select="glossentry"/>
+    </dl>
+  </div>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="glossdiv">
+  <div class="{name(.)}">
+    <xsl:apply-templates select="(glossentry[1]/preceding-sibling::*)"/>
+
+    <dl>
+      <xsl:apply-templates select="glossentry"/>
+    </dl>
+  </div>
+</xsl:template>
+
+<xsl:template match="glossdiv/title">
+  <h3 class="{name(.)}">
+    <xsl:apply-templates/>
+  </h3>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<!--
+GlossEntry ::=
+  GlossTerm, Acronym?, Abbrev?,
+  (IndexTerm)*,
+  RevHistory?,
+  (GlossSee | GlossDef+)
+-->
+
+<xsl:template match="glossentry">
+  <xsl:choose>
+    <xsl:when test="$glossentry.show.acronym = 'primary'">
+      <dt>
+        <xsl:call-template name="anchor">
+          <xsl:with-param name="conditional">
+            <xsl:choose>
+              <xsl:when test="$glossterm.auto.link != 0">0</xsl:when>
+              <xsl:otherwise>1</xsl:otherwise>
+            </xsl:choose>
+          </xsl:with-param>
+        </xsl:call-template>
+
+        <xsl:choose>
+          <xsl:when test="acronym|abbrev">
+            <xsl:apply-templates select="acronym|abbrev"/>
+            <xsl:text> (</xsl:text>
+            <xsl:apply-templates select="glossterm"/>
+            <xsl:text>)</xsl:text>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:apply-templates select="glossterm"/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </dt>
+    </xsl:when>
+    <xsl:when test="$glossentry.show.acronym = 'yes'">
+      <dt>
+        <xsl:call-template name="anchor">
+          <xsl:with-param name="conditional">
+            <xsl:choose>
+              <xsl:when test="$glossterm.auto.link != 0">0</xsl:when>
+              <xsl:otherwise>1</xsl:otherwise>
+            </xsl:choose>
+          </xsl:with-param>
+        </xsl:call-template>
+
+        <xsl:apply-templates select="glossterm"/>
+
+        <xsl:if test="acronym|abbrev">
+          <xsl:text> (</xsl:text>
+          <xsl:apply-templates select="acronym|abbrev"/>
+          <xsl:text>)</xsl:text>
+        </xsl:if>
+      </dt>
+    </xsl:when>
+    <xsl:otherwise>
+      <dt>
+        <xsl:call-template name="anchor">
+          <xsl:with-param name="conditional">
+            <xsl:choose>
+              <xsl:when test="$glossterm.auto.link != 0">0</xsl:when>
+              <xsl:otherwise>1</xsl:otherwise>
+            </xsl:choose>
+          </xsl:with-param>
+        </xsl:call-template>
+
+        <xsl:apply-templates select="glossterm"/>
+      </dt>
+    </xsl:otherwise>
+  </xsl:choose>
+
+  <xsl:apply-templates select="indexterm|revhistory|glosssee|glossdef"/>
+</xsl:template>
+
+<xsl:template match="glossentry/glossterm">
+  <xsl:apply-templates/>
+  <xsl:if test="following-sibling::glossterm">, </xsl:if>
+</xsl:template>
+
+<xsl:template match="glossentry/acronym">
+  <xsl:apply-templates/>
+  <xsl:if test="following-sibling::acronym|following-sibling::abbrev">, </xsl:if>
+</xsl:template>
+
+<xsl:template match="glossentry/abbrev">
+  <xsl:apply-templates/>
+  <xsl:if test="following-sibling::acronym|following-sibling::abbrev">, </xsl:if>
+</xsl:template>
+
+<xsl:template match="glossentry/revhistory">
+</xsl:template>
+
+<xsl:template match="glossentry/glosssee">
+  <xsl:variable name="otherterm" select="@otherterm"/>
+  <xsl:variable name="targets" select="//node()[@id=$otherterm]"/>
+  <xsl:variable name="target" select="$targets[1]"/>
+
+  <dd>
+    <p>
+      <xsl:call-template name="gentext.template">
+        <xsl:with-param name="context" select="'glossary'"/>
+        <xsl:with-param name="name" select="'see'"/>
+      </xsl:call-template>
+      <xsl:choose>
+        <xsl:when test="$target">
+          <a href="#{@otherterm}">
+            <xsl:apply-templates select="$target" mode="xref-to"/>
+          </a>
+        </xsl:when>
+        <xsl:when test="$otherterm != '' and not($target)">
+          <xsl:message>
+            <xsl:text>Warning: glosssee @otherterm reference not found: </xsl:text>
+            <xsl:value-of select="$otherterm"/>
+          </xsl:message>
+          <xsl:apply-templates/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:apply-templates/>
+        </xsl:otherwise>
+      </xsl:choose>
+      <xsl:text>.</xsl:text>
+    </p>
+  </dd>
+</xsl:template>
+
+<xsl:template match="glossentry/glossdef">
+  <dd>
+    <xsl:apply-templates select="*[local-name(.) != 'glossseealso']"/>
+    <xsl:if test="glossseealso">
+      <p>
+        <xsl:call-template name="gentext.template">
+          <xsl:with-param name="context" select="'glossary'"/>
+          <xsl:with-param name="name" select="'seealso'"/>
+        </xsl:call-template>
+        <xsl:apply-templates select="glossseealso"/>
+      </p>
+    </xsl:if>
+  </dd>
+</xsl:template>
+
+<xsl:template match="glossseealso">
+  <xsl:variable name="otherterm" select="@otherterm"/>
+  <xsl:variable name="targets" select="//node()[@id=$otherterm]"/>
+  <xsl:variable name="target" select="$targets[1]"/>
+
+  <xsl:choose>
+    <xsl:when test="$target">
+      <a href="#{@otherterm}">
+        <xsl:apply-templates select="$target" mode="xref-to"/>
+      </a>
+    </xsl:when>
+    <xsl:when test="$otherterm != '' and not($target)">
+      <xsl:message>
+        <xsl:text>Warning: glossseealso @otherterm reference not found: </xsl:text>
+        <xsl:value-of select="$otherterm"/>
+      </xsl:message>
+      <xsl:apply-templates/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:apply-templates/>
+    </xsl:otherwise>
+  </xsl:choose>
+
+  <xsl:choose>
+    <xsl:when test="position() = last()">
+      <xsl:text>.</xsl:text>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:text>, </xsl:text>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<!-- Glossary collection -->
+
+<xsl:template match="glossary[@role='auto']" priority="2">
+  <xsl:variable name="terms" select="//glossterm[not(parent::glossdef)]|//firstterm"/>
+  <xsl:variable name="collection" select="document($glossary.collection, .)"/>
+
+  <xsl:if test="$glossary.collection = ''">
+    <xsl:message>
+      <xsl:text>Warning: processing automatic glossary </xsl:text>
+      <xsl:text>without a glossary.collection file.</xsl:text>
+    </xsl:message>
+  </xsl:if>
+
+  <xsl:if test="not($collection) and $glossary.collection != ''">
+    <xsl:message>
+      <xsl:text>Warning: processing automatic glossary but unable to </xsl:text>
+      <xsl:text>open glossary.collection file '</xsl:text>
+      <xsl:value-of select="$glossary.collection"/>
+      <xsl:text>'</xsl:text>
+    </xsl:message>
+  </xsl:if>
+
+  <div class="{name(.)}">
+    <xsl:if test="$generate.id.attributes != 0">
+      <xsl:attribute name="id">
+        <xsl:call-template name="object.id"/>
+      </xsl:attribute>
+    </xsl:if>
+
+    <xsl:call-template name="glossary.titlepage"/>
+
+    <xsl:choose>
+      <xsl:when test="glossdiv and $collection//glossdiv">
+        <xsl:for-each select="$collection//glossdiv">
+          <!-- first see if there are any in this div -->
+          <xsl:variable name="exist.test">
+            <xsl:for-each select="glossentry">
+              <xsl:variable name="cterm" select="glossterm"/>
+              <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
+                <xsl:value-of select="glossterm"/>
+              </xsl:if>
+            </xsl:for-each>
+          </xsl:variable>
+
+          <xsl:if test="$exist.test != ''">
+            <xsl:apply-templates select="." mode="auto-glossary">
+              <xsl:with-param name="terms" select="$terms"/>
+            </xsl:apply-templates>
+          </xsl:if>
+        </xsl:for-each>
+      </xsl:when>
+      <xsl:otherwise>
+        <dl>
+          <xsl:for-each select="$collection//glossentry">
+            <xsl:variable name="cterm" select="glossterm"/>
+            <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
+              <xsl:apply-templates select="." mode="auto-glossary"/>
+            </xsl:if>
+          </xsl:for-each>
+        </dl>
+      </xsl:otherwise>
+    </xsl:choose>
+
+    <xsl:if test="not(parent::article)">
+      <xsl:call-template name="process.footnotes"/>
+    </xsl:if>
+  </div>
+</xsl:template>
+
+<xsl:template match="*" mode="auto-glossary">
+  <!-- pop back out to the default mode for most elements -->
+  <xsl:apply-templates select="."/>
+</xsl:template>
+
+<xsl:template match="glossdiv" mode="auto-glossary">
+  <xsl:param name="terms" select="."/>
+
+  <div class="{name(.)}">
+    <xsl:apply-templates select="(glossentry[1]/preceding-sibling::*)"/>
+
+    <dl>
+      <xsl:for-each select="glossentry">
+        <xsl:variable name="cterm" select="glossterm"/>
+        <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
+          <xsl:apply-templates select="." mode="auto-glossary"/>
+        </xsl:if>
+      </xsl:for-each>
+    </dl>
+  </div>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/graphics.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/graphics.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/graphics.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1146 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:xlink="http://www.w3.org/1999/xlink"
+                xmlns:stext="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.TextFactory"
+                xmlns:simg="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.ImageIntrinsics"
+                xmlns:ximg="xaln://com.nwalsh.xalan.ImageIntrinsics"
+                xmlns:xtext="com.nwalsh.xalan.Text"
+                xmlns:lxslt="http://xml.apache.org/xslt"
+                exclude-result-prefixes="xlink stext xtext lxslt simg ximg"
+                extension-element-prefixes="stext xtext"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: graphics.xsl,v 1.1.1.1 2004/10/19 21:21:46 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     Contributors:
+     Colin Paul Adams, <colin at colina.demon.co.uk>
+
+     ******************************************************************** -->
+
+<lxslt:component prefix="xtext" elements="insertfile"/>
+<lxslt:component prefix="ximg" functions="new getWidth getDepth"/>
+
+<!-- ==================================================================== -->
+<!-- Graphic format tests for the HTML backend -->
+
+<xsl:template name="is.graphic.format">
+  <xsl:param name="format"></xsl:param>
+  <xsl:if test="$format = 'SVG'
+                or $format = 'PNG'
+                or $format = 'JPG'
+                or $format = 'JPEG'
+                or $format = 'linespecific'
+                or $format = 'GIF'
+                or $format = 'GIF87a'
+                or $format = 'GIF89a'
+                or $format = 'BMP'">1</xsl:if>
+</xsl:template>
+
+<xsl:template name="is.graphic.extension">
+  <xsl:param name="ext"></xsl:param>
+  <xsl:if test="$ext = 'svg'
+                or $ext = 'png'
+                or $ext = 'jpeg'
+                or $ext = 'jpg'
+                or $ext = 'avi'
+                or $ext = 'mpg'
+                or $ext = 'mpeg'
+                or $ext = 'qt'
+                or $ext = 'gif'
+                or $ext = 'bmp'">1</xsl:if>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="screenshot">
+  <div class="{name(.)}">
+    <xsl:apply-templates/>
+  </div>
+</xsl:template>
+
+<xsl:template match="screeninfo">
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="process.image">
+  <!-- When this template is called, the current node should be  -->
+  <!-- a graphic, inlinegraphic, imagedata, or videodata. All    -->
+  <!-- those elements have the same set of attributes, so we can -->
+  <!-- handle them all in one place.                             -->
+  <xsl:param name="tag" select="'img'"/>
+  <xsl:param name="alt"/>
+  <xsl:param name="longdesc"/>
+
+  <!-- The HTML img element only supports the notion of content-area
+       scaling; it doesn't support the distinction between a
+       content-area and a viewport-area, so we have to make some
+       compromises.
+
+       1. If only the content-area is specified, everything is fine.
+          (If you ask for a three inch image, that's what you'll get.)
+
+       2. If only the viewport-area is provided:
+          - If scalefit=1, treat it as both the content-area and
+            the viewport-area. (If you ask for an image in a five inch
+            area, we'll make the image five inches to fill that area.)
+          - If scalefit=0, ignore the viewport-area specification.
+
+          Note: this is not quite the right semantic and has the additional
+          problem that it can result in anamorphic scaling, which scalefit
+          should never cause.
+
+       3. If both the content-area and the viewport-area is specified
+          on a graphic element, ignore the viewport-area.
+          (If you ask for a three inch image in a five inch area, we'll assume
+           it's better to give you a three inch image in an unspecified area
+           than a five inch image in a five inch area.
+
+       Relative units also cause problems. As a general rule, the stylesheets
+       are operating too early and too loosely coupled with the rendering engine
+       to know things like the current font size or the actual dimensions of
+       an image. Therefore:
+
+       1. We use a fixed size for pixels, $pixels.per.inch
+
+       2. We use a fixed size for "em"s, $points.per.em
+
+       Percentages are problematic. In the following discussion, we speak
+       of width and contentwidth, but the same issues apply to depth and
+       contentdepth
+
+       1. A width of 50% means "half of the available space for the image."
+          That's fine. But note that in HTML, this is a dynamic property and
+          the image size will vary if the browser window is resized.
+
+       2. A contentwidth of 50% means "half of the actual image width". But
+          the stylesheets have no way to assess the image's actual size. Treating
+          this as a width of 50% is one possibility, but it produces behavior
+          (dynamic scaling) that seems entirely out of character with the
+          meaning.
+
+          Instead, the stylesheets define a $nominal.image.width
+          and convert percentages to actual values based on that nominal size.
+
+       Scale can be problematic. Scale applies to the contentwidth, so
+       a scale of 50 when a contentwidth is not specified is analagous to a
+       width of 50%. (If a contentwidth is specified, the scaling factor can
+       be applied to that value and no problem exists.)
+
+       If scale is specified but contentwidth is not supplied, the
+       nominal.image.width is used to calculate a base size
+       for scaling.
+
+       Warning: as a consequence of these decisions, unless the aspect ratio
+       of your image happens to be exactly the same as (nominal width / nominal height),
+       specifying contentwidth="50%" and contentdepth="50%" is NOT going to
+       scale the way you expect (or really, the way it should).
+
+       Don't do that. In fact, a percentage value is not recommended for content
+       size at all. Use scale instead.
+
+       Finally, align and valign are troublesome. Horizontal alignment is now
+       supported by wrapping the image in a <div align="{@align}"> (in block
+       contexts!). I can't think of anything (practical) to do about vertical
+       alignment.
+  -->
+
+  <xsl:variable name="width-units">
+    <xsl:choose>
+      <xsl:when test="$ignore.image.scaling != 0"></xsl:when>
+      <xsl:when test="@width">
+        <xsl:call-template name="length-units">
+          <xsl:with-param name="length" select="@width"/>
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:when test="not(@depth) and $default.image.width != ''">
+        <xsl:call-template name="length-units">
+          <xsl:with-param name="length" select="$default.image.width"/>
+        </xsl:call-template>
+      </xsl:when>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:variable name="width">
+    <xsl:choose>
+      <xsl:when test="$ignore.image.scaling != 0"></xsl:when>
+      <xsl:when test="@width">
+        <xsl:choose>
+          <xsl:when test="$width-units = '%'">
+            <xsl:value-of select="@width"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:call-template name="length-spec">
+              <xsl:with-param name="length" select="@width"/>
+            </xsl:call-template>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:when>
+      <xsl:when test="not(@depth) and $default.image.width != ''">
+        <xsl:value-of select="$default.image.width"/>
+      </xsl:when>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:variable name="scalefit">
+    <xsl:choose>
+      <xsl:when test="$ignore.image.scaling != 0">0</xsl:when>
+      <xsl:when test="@contentwidth or @contentdepth">0</xsl:when>
+      <xsl:when test="@scale">0</xsl:when>
+      <xsl:when test="@scalefit"><xsl:value-of select="@scalefit"/></xsl:when>
+      <xsl:when test="$width != '' or @depth">1</xsl:when>
+      <xsl:otherwise>0</xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:variable name="scale">
+    <xsl:choose>
+      <xsl:when test="$ignore.image.scaling != 0">1.0</xsl:when>
+      <xsl:when test="@contentwidth or @contentdepth">1.0</xsl:when>
+      <xsl:when test="@scale">
+        <xsl:value-of select="@scale div 100.0"/>
+      </xsl:when>
+      <xsl:otherwise>1.0</xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:variable name="filename">
+    <xsl:choose>
+      <xsl:when test="local-name(.) = 'graphic'
+                      or local-name(.) = 'inlinegraphic'">
+        <!-- handle legacy graphic and inlinegraphic by new template --> 
+        <xsl:call-template name="mediaobject.filename">
+          <xsl:with-param name="object" select="."/>
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:otherwise>
+        <!-- imagedata, videodata, audiodata -->
+        <xsl:call-template name="mediaobject.filename">
+          <xsl:with-param name="object" select=".."/>
+        </xsl:call-template>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:variable name="intrinsicwidth">
+    <!-- This funny compound test works around a bug in XSLTC -->
+    <xsl:choose>
+      <xsl:when test="$use.extensions != 0 and $graphicsize.extension != 0">
+        <xsl:choose>
+          <xsl:when test="function-available('simg:getWidth')">
+            <xsl:value-of select="simg:getWidth(simg:new($filename),
+                                                $nominal.image.width)"/>
+          </xsl:when>
+          <xsl:when test="function-available('ximg:getWidth')">
+            <xsl:value-of select="ximg:getWidth(ximg:new($filename),
+                                                $nominal.image.width)"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:value-of select="$nominal.image.width"/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$nominal.image.width"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:variable name="intrinsicdepth">
+    <!-- This funny compound test works around a bug in XSLTC -->
+    <xsl:choose>
+      <xsl:when test="$use.extensions != 0 and $graphicsize.extension != 0">
+        <xsl:choose>
+          <xsl:when test="function-available('simg:getDepth')">
+            <xsl:value-of select="simg:getDepth(simg:new($filename),
+                                                $nominal.image.depth)"/>
+          </xsl:when>
+          <xsl:when test="function-available('ximg:getDepth')">
+            <xsl:value-of select="ximg:getDepth(ximg:new($filename),
+                                                $nominal.image.width)"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:value-of select="$nominal.image.depth"/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$nominal.image.depth"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:variable name="contentwidth">
+    <xsl:choose>
+      <xsl:when test="$ignore.image.scaling != 0"></xsl:when>
+      <xsl:when test="@contentwidth">
+        <xsl:variable name="units">
+          <xsl:call-template name="length-units">
+            <xsl:with-param name="length" select="@contentwidth"/>
+          </xsl:call-template>
+        </xsl:variable>
+
+        <xsl:choose>
+          <xsl:when test="$units = '%'">
+            <xsl:variable name="cmagnitude">
+              <xsl:call-template name="length-magnitude">
+                <xsl:with-param name="length" select="@contentwidth"/>
+              </xsl:call-template>
+            </xsl:variable>
+            <xsl:value-of select="$intrinsicwidth * $cmagnitude div 100.0"/>
+            <xsl:text>px</xsl:text>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:call-template name="length-spec">
+              <xsl:with-param name="length" select="@contentwidth"/>
+            </xsl:call-template>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$intrinsicwidth"/>
+        <xsl:text>px</xsl:text>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:variable name="scaled.contentwidth">
+    <xsl:if test="$contentwidth != ''">
+      <xsl:variable name="cwidth.in.points">
+        <xsl:call-template name="length-in-points">
+          <xsl:with-param name="length" select="$contentwidth"/>
+          <xsl:with-param name="pixels.per.inch" select="$pixels.per.inch"/>
+          <xsl:with-param name="em.size" select="$points.per.em"/>
+        </xsl:call-template>
+      </xsl:variable>
+      <xsl:value-of select="$cwidth.in.points div 72.0 * $pixels.per.inch * $scale"/>
+    </xsl:if>
+  </xsl:variable>
+
+  <xsl:variable name="html.width">
+    <xsl:choose>
+      <xsl:when test="$ignore.image.scaling != 0"></xsl:when>
+      <xsl:when test="$width-units = '%'">
+        <xsl:value-of select="$width"/>
+      </xsl:when>
+      <xsl:when test="$width != ''">
+        <xsl:variable name="width.in.points">
+          <xsl:call-template name="length-in-points">
+            <xsl:with-param name="length" select="$width"/>
+            <xsl:with-param name="pixels.per.inch" select="$pixels.per.inch"/>
+            <xsl:with-param name="em.size" select="$points.per.em"/>
+          </xsl:call-template>
+        </xsl:variable>
+        <xsl:value-of select="round($width.in.points div 72.0 * $pixels.per.inch)"/>
+      </xsl:when>
+      <xsl:otherwise></xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:variable name="contentdepth">
+    <xsl:choose>
+      <xsl:when test="$ignore.image.scaling != 0"></xsl:when>
+      <xsl:when test="@contentdepth">
+        <xsl:variable name="units">
+          <xsl:call-template name="length-units">
+            <xsl:with-param name="length" select="@contentdepth"/>
+          </xsl:call-template>
+        </xsl:variable>
+
+        <xsl:choose>
+          <xsl:when test="$units = '%'">
+            <xsl:variable name="cmagnitude">
+              <xsl:call-template name="length-magnitude">
+                <xsl:with-param name="length" select="@contentdepth"/>
+              </xsl:call-template>
+            </xsl:variable>
+            <xsl:value-of select="$intrinsicdepth * $cmagnitude div 100.0"/>
+            <xsl:text>px</xsl:text>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:call-template name="length-spec">
+              <xsl:with-param name="length" select="@contentdepth"/>
+            </xsl:call-template>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$intrinsicdepth"/>
+        <xsl:text>px</xsl:text>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:variable name="scaled.contentdepth">
+    <xsl:if test="$contentdepth != ''">
+      <xsl:variable name="cdepth.in.points">
+        <xsl:call-template name="length-in-points">
+          <xsl:with-param name="length" select="$contentdepth"/>
+          <xsl:with-param name="pixels.per.inch" select="$pixels.per.inch"/>
+          <xsl:with-param name="em.size" select="$points.per.em"/>
+        </xsl:call-template>
+      </xsl:variable>
+      <xsl:value-of select="$cdepth.in.points div 72.0 * $pixels.per.inch * $scale"/>
+    </xsl:if>
+  </xsl:variable>
+
+  <xsl:variable name="depth-units">
+    <xsl:if test="@depth">
+      <xsl:call-template name="length-units">
+        <xsl:with-param name="length" select="@depth"/>
+      </xsl:call-template>
+    </xsl:if>
+  </xsl:variable>
+
+  <xsl:variable name="depth">
+    <xsl:if test="@depth">
+      <xsl:choose>
+        <xsl:when test="$depth-units = '%'">
+          <xsl:value-of select="@depth"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:call-template name="length-spec">
+            <xsl:with-param name="length" select="@depth"/>
+          </xsl:call-template>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:if>
+  </xsl:variable>
+
+  <xsl:variable name="html.depth">
+    <xsl:choose>
+      <xsl:when test="$ignore.image.scaling != 0"></xsl:when>
+      <xsl:when test="$depth-units = '%'">
+        <xsl:value-of select="$depth"/>
+      </xsl:when>
+      <xsl:when test="@depth and @depth != ''">
+        <xsl:variable name="depth.in.points">
+          <xsl:call-template name="length-in-points">
+            <xsl:with-param name="length" select="$depth"/>
+            <xsl:with-param name="pixels.per.inch" select="$pixels.per.inch"/>
+            <xsl:with-param name="em.size" select="$points.per.em"/>
+          </xsl:call-template>
+        </xsl:variable>
+        <xsl:value-of select="round($depth.in.points div 72.0 * $pixels.per.inch)"/>
+      </xsl:when>
+      <xsl:otherwise></xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:variable name="viewport">
+    <xsl:choose>
+      <xsl:when test="$ignore.image.scaling != 0">0</xsl:when>
+      <xsl:when test="local-name(.) = 'inlinegraphic'
+                      or ancestor::inlinemediaobject
+                      or ancestor::inlineequation">0</xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$make.graphic.viewport"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+<!--
+  <xsl:message>=====================================
+scale: <xsl:value-of select="$scale"/>, <xsl:value-of select="$scalefit"/>
+ at contentwidth <xsl:value-of select="@contentwidth"/>
+$contentwidth <xsl:value-of select="$contentwidth"/>
+scaled.contentwidth: <xsl:value-of select="$scaled.contentwidth"/>
+ at width: <xsl:value-of select="@width"/>
+width: <xsl:value-of select="$width"/>
+html.width: <xsl:value-of select="$html.width"/>
+ at contentdepth <xsl:value-of select="@contentdepth"/>
+$contentdepth <xsl:value-of select="$contentdepth"/>
+scaled.contentdepth: <xsl:value-of select="$scaled.contentdepth"/>
+ at depth: <xsl:value-of select="@depth"/>
+depth: <xsl:value-of select="$depth"/>
+html.depth: <xsl:value-of select="$html.depth"/>
+align: <xsl:value-of select="@align"/>
+valign: <xsl:value-of select="@valign"/></xsl:message>
+-->
+
+  <xsl:variable name="img">
+    <xsl:choose>
+      <xsl:when test="@format = 'SVG'">
+        <object data="{$filename}" type="image/svg+xml">
+          <xsl:call-template name="process.image.attributes">
+            <!--xsl:with-param name="alt" select="$alt"/ there's no alt here-->
+            <xsl:with-param name="html.depth" select="$html.depth"/>
+            <xsl:with-param name="html.width" select="$html.width"/>
+            <xsl:with-param name="longdesc" select="$longdesc"/>
+            <xsl:with-param name="scale" select="$scale"/>
+            <xsl:with-param name="scalefit" select="$scalefit"/>
+            <xsl:with-param name="scaled.contentdepth" select="$scaled.contentdepth"/>
+            <xsl:with-param name="scaled.contentwidth" select="$scaled.contentwidth"/>
+            <xsl:with-param name="viewport" select="$viewport"/>
+          </xsl:call-template>
+          <xsl:if test="@align">
+            <xsl:attribute name="align">
+                <xsl:choose>
+                  <xsl:when test="@align = 'center'">middle</xsl:when>
+                  <xsl:otherwise>
+                    <xsl:value-of select="@align"/>
+                  </xsl:otherwise>
+                </xsl:choose>
+            </xsl:attribute>
+          </xsl:if>
+          <xsl:if test="$use.embed.for.svg != 0">
+            <embed src="{$filename}" type="image/svg+xml">
+              <xsl:call-template name="process.image.attributes">
+                <!--xsl:with-param name="alt" select="$alt"/ there's no alt here -->
+                <xsl:with-param name="html.depth" select="$html.depth"/>
+                <xsl:with-param name="html.width" select="$html.width"/>
+                <xsl:with-param name="longdesc" select="$longdesc"/>
+                <xsl:with-param name="scale" select="$scale"/>
+                <xsl:with-param name="scalefit" select="$scalefit"/>
+                <xsl:with-param name="scaled.contentdepth" select="$scaled.contentdepth"/>
+                <xsl:with-param name="scaled.contentwidth" select="$scaled.contentwidth"/>
+                <xsl:with-param name="viewport" select="$viewport"/>
+              </xsl:call-template>
+            </embed>
+          </xsl:if>
+        </object>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:element name="{$tag}">
+          <xsl:attribute name="src">
+            <xsl:value-of select="$filename"/>
+          </xsl:attribute>
+
+          <xsl:if test="@align">
+            <xsl:attribute name="align">
+              <xsl:choose>
+                <xsl:when test="@align = 'center'">middle</xsl:when>
+                <xsl:otherwise>
+                  <xsl:value-of select="@align"/>
+                </xsl:otherwise>
+              </xsl:choose>
+            </xsl:attribute>
+          </xsl:if>
+
+          <xsl:call-template name="process.image.attributes">
+            <xsl:with-param name="alt">
+              <xsl:choose>
+                <xsl:when test="$alt != ''">
+                  <xsl:copy-of select="$alt"/>
+                </xsl:when>
+                <xsl:when test="ancestor::figure">
+                  <xsl:value-of select="normalize-space(ancestor::figure/title)"/>
+                </xsl:when>
+              </xsl:choose>
+            </xsl:with-param>
+            <xsl:with-param name="html.depth" select="$html.depth"/>
+            <xsl:with-param name="html.width" select="$html.width"/>
+            <xsl:with-param name="longdesc" select="$longdesc"/>
+            <xsl:with-param name="scale" select="$scale"/>
+            <xsl:with-param name="scalefit" select="$scalefit"/>
+            <xsl:with-param name="scaled.contentdepth" select="$scaled.contentdepth"/>
+            <xsl:with-param name="scaled.contentwidth" select="$scaled.contentwidth"/>
+            <xsl:with-param name="viewport" select="$viewport"/>
+          </xsl:call-template>
+        </xsl:element>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+
+  <xsl:variable name="bgcolor">
+    <xsl:call-template name="dbhtml-attribute">
+      <xsl:with-param name="pis"
+                      select="../processing-instruction('dbhtml')"/>
+      <xsl:with-param name="attribute" select="'background-color'"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="use.viewport"
+                select="$viewport != 0
+                        and ($html.width != ''
+                             or ($html.depth != '' and $depth-units != '%')
+                             or $bgcolor != ''
+                             or @valign)"/>
+
+  <xsl:choose>
+    <xsl:when test="$use.viewport">
+      <table border="0" summary="manufactured viewport for HTML img"
+             cellspacing="0" cellpadding="0">
+        <xsl:if test="$html.width != ''">
+          <xsl:attribute name="width">
+            <xsl:value-of select="$html.width"/>
+          </xsl:attribute>
+        </xsl:if>
+        <tr>
+          <xsl:if test="$html.depth != '' and $depth-units != '%'">
+            <!-- don't do this for percentages because browsers get confused -->
+            <xsl:choose>
+              <xsl:when test="$css.decoration != 0">
+                <xsl:attribute name="style">
+                  <xsl:text>height: </xsl:text>
+                  <xsl:value-of select="$html.depth"/>
+                  <xsl:text>px</xsl:text>
+                </xsl:attribute>
+              </xsl:when>
+              <xsl:otherwise>
+                <xsl:attribute name="height">
+                  <xsl:value-of select="$html.depth"/>
+                </xsl:attribute>
+              </xsl:otherwise>
+            </xsl:choose>
+          </xsl:if>
+          <td>
+            <xsl:if test="$bgcolor != ''">
+              <xsl:choose>
+                <xsl:when test="$css.decoration != 0">
+                  <xsl:attribute name="style">
+                    <xsl:text>background-color: </xsl:text>
+                    <xsl:value-of select="$bgcolor"/>
+                  </xsl:attribute>
+                </xsl:when>
+                <xsl:otherwise>
+                  <xsl:attribute name="bgcolor">
+                    <xsl:value-of select="$bgcolor"/>
+                  </xsl:attribute>
+                </xsl:otherwise>
+              </xsl:choose>
+            </xsl:if>
+            <xsl:if test="@align">
+              <xsl:attribute name="align">
+                <xsl:value-of select="@align"/>
+              </xsl:attribute>
+            </xsl:if>
+            <xsl:if test="@valign">
+              <xsl:attribute name="valign">
+                <xsl:value-of select="@valign"/>
+              </xsl:attribute>
+            </xsl:if>
+            <xsl:copy-of select="$img"/>
+          </td>
+        </tr>
+      </table>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:copy-of select="$img"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="process.image.attributes">
+  <xsl:param name="alt"/>
+  <xsl:param name="html.width"/>
+  <xsl:param name="html.depth"/>
+  <xsl:param name="longdesc"/>
+  <xsl:param name="scale"/>
+  <xsl:param name="scalefit"/>
+  <xsl:param name="scaled.contentdepth"/>
+  <xsl:param name="scaled.contentwidth"/>
+  <xsl:param name="viewport"/>
+
+  <xsl:choose>
+    <xsl:when test="@contentwidth or @contentdepth">
+      <!-- ignore @width/@depth, @scale, and @scalefit if specified -->
+      <xsl:if test="@contentwidth">
+        <xsl:attribute name="width">
+          <xsl:value-of select="$scaled.contentwidth"/>
+        </xsl:attribute>
+      </xsl:if>
+      <xsl:if test="@contentdepth">
+        <xsl:attribute name="height">
+          <xsl:value-of select="$scaled.contentdepth"/>
+        </xsl:attribute>
+      </xsl:if>
+    </xsl:when>
+
+    <xsl:when test="number($scale) != 1.0">
+      <!-- scaling is always uniform, so we only have to specify one dimension -->
+      <!-- ignore @scalefit if specified -->
+      <xsl:attribute name="width">
+        <xsl:value-of select="$scaled.contentwidth"/>
+      </xsl:attribute>
+    </xsl:when>
+
+    <xsl:when test="$scalefit != 0">
+      <xsl:choose>
+        <xsl:when test="contains($html.width, '%')">
+          <xsl:choose>
+            <xsl:when test="$viewport != 0">
+              <!-- The *viewport* will be scaled, so use 100% here! -->
+              <xsl:attribute name="width">
+                <xsl:value-of select="'100%'"/>
+              </xsl:attribute>
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:attribute name="width">
+                <xsl:value-of select="$html.width"/>
+              </xsl:attribute>
+            </xsl:otherwise>
+          </xsl:choose>
+        </xsl:when>
+
+        <xsl:when test="contains($html.depth, '%')">
+          <!-- HTML doesn't deal with this case very well...do nothing -->
+        </xsl:when>
+
+        <xsl:when test="$scaled.contentwidth != '' and $html.width != ''
+                        and $scaled.contentdepth != '' and $html.depth != ''">
+          <!-- scalefit should not be anamorphic; figure out which direction -->
+          <!-- has the limiting scale factor and scale in that direction -->
+          <xsl:choose>
+            <xsl:when test="$html.width div $scaled.contentwidth &gt;
+                            $html.depth div $scaled.contentdepth">
+              <xsl:attribute name="height">
+                <xsl:value-of select="$html.depth"/>
+              </xsl:attribute>
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:attribute name="width">
+                <xsl:value-of select="$html.width"/>
+              </xsl:attribute>
+            </xsl:otherwise>
+          </xsl:choose>
+        </xsl:when>
+
+        <xsl:when test="$scaled.contentwidth != '' and $html.width != ''">
+          <xsl:attribute name="width">
+            <xsl:value-of select="$html.width"/>
+          </xsl:attribute>
+        </xsl:when>
+
+        <xsl:when test="$scaled.contentdepth != '' and $html.depth != ''">
+          <xsl:attribute name="height">
+            <xsl:value-of select="$html.depth"/>
+          </xsl:attribute>
+        </xsl:when>
+      </xsl:choose>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:if test="$alt != ''">
+    <xsl:attribute name="alt">
+      <xsl:value-of select="$alt"/>
+    </xsl:attribute>
+  </xsl:if>
+
+  <xsl:if test="$longdesc != ''">
+    <xsl:attribute name="longdesc">
+      <xsl:value-of select="$longdesc"/>
+    </xsl:attribute>
+  </xsl:if>
+
+  <xsl:if test="@align and $viewport = 0">
+    <xsl:attribute name="align">
+      <xsl:choose>
+        <xsl:when test="@align = 'center'">middle</xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="@align"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:attribute>
+  </xsl:if>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="graphic">
+  <xsl:choose>
+    <xsl:when test="parent::inlineequation">
+      <xsl:call-template name="anchor"/>
+      <xsl:call-template name="process.image"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <div>
+        <xsl:if test="@align">
+          <xsl:attribute name="align">
+            <xsl:value-of select="@align"/>
+          </xsl:attribute>
+        </xsl:if>
+        <xsl:call-template name="anchor"/>
+        <xsl:call-template name="process.image"/>
+      </div>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="inlinegraphic">
+  <xsl:variable name="filename">
+    <xsl:choose>
+      <xsl:when test="@entityref">
+        <xsl:value-of select="unparsed-entity-uri(@entityref)"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="@fileref"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:if test="@id">
+    <a name="{@id}"/>
+  </xsl:if>
+
+  <xsl:choose>
+    <xsl:when test="@format='linespecific'">
+      <xsl:choose>
+        <xsl:when test="$use.extensions != '0'
+                        and $textinsert.extension != '0'">
+          <xsl:choose>
+            <xsl:when test="element-available('stext:insertfile')">
+              <stext:insertfile href="{$filename}"/>
+            </xsl:when>
+            <xsl:when test="element-available('xtext:insertfile')">
+              <xtext:insertfile href="{$filename}"/>
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:message terminate="yes">
+                <xsl:text>No insertfile extension available.</xsl:text>
+              </xsl:message>
+            </xsl:otherwise>
+          </xsl:choose>
+        </xsl:when>
+        <xsl:otherwise>
+          <a xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"
+             href="{$filename}"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:call-template name="process.image"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="mediaobject|mediaobjectco">
+
+  <xsl:variable name="olist" select="imageobject|imageobjectco
+                     |videoobject|audioobject
+                     |textobject"/>
+
+  <xsl:variable name="object.index">
+    <xsl:call-template name="select.mediaobject.index">
+      <xsl:with-param name="olist" select="$olist"/>
+      <xsl:with-param name="count" select="1"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="object" select="$olist[position() = $object.index]"/>
+
+  <xsl:variable name="align">
+    <xsl:value-of select="$object/imagedata[@align][1]/@align"/>
+  </xsl:variable>
+
+  <div class="{name(.)}">
+    <xsl:if test="$align != '' ">
+      <xsl:attribute name="align">
+        <xsl:value-of select="$align"/>
+      </xsl:attribute>
+    </xsl:if>
+    <xsl:if test="@id">
+      <a name="{@id}"/>
+    </xsl:if>
+
+    <xsl:apply-templates select="$object"/>
+    <xsl:apply-templates select="caption"/>
+  </div>
+</xsl:template>
+
+<xsl:template match="inlinemediaobject">
+  <span class="{name(.)}">
+    <xsl:if test="@id">
+      <a name="{@id}"/>
+    </xsl:if>
+    <xsl:call-template name="select.mediaobject"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="programlisting/inlinemediaobject
+                     |screen/inlinemediaobject" priority="2">
+  <!-- the additional span causes problems in some cases -->
+  <xsl:call-template name="select.mediaobject"/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="imageobjectco">
+  <xsl:if test="@id">
+    <a name="{@id}"/>
+  </xsl:if>
+  <xsl:apply-templates select="imageobject"/>
+  <xsl:apply-templates select="calloutlist"/>
+</xsl:template>
+
+<xsl:template match="imageobject">
+  <xsl:choose>
+    <xsl:when xmlns:svg="http://www.w3.org/2000/svg"
+              test="svg:*">
+      <xsl:apply-templates/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:apply-templates select="imagedata"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="imagedata">
+  <xsl:variable name="filename">
+    <xsl:call-template name="mediaobject.filename">
+      <xsl:with-param name="object" select=".."/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="@format='linespecific'">
+      <xsl:choose>
+        <xsl:when test="$use.extensions != '0'
+                        and $textinsert.extension != '0'">
+          <xsl:choose>
+            <xsl:when test="element-available('stext:insertfile')">
+              <stext:insertfile href="{$filename}"/>
+            </xsl:when>
+            <xsl:when test="element-available('xtext:insertfile')">
+              <xtext:insertfile href="{$filename}"/>
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:message terminate="yes">
+                <xsl:text>No insertfile extension available.</xsl:text>
+              </xsl:message>
+            </xsl:otherwise>
+          </xsl:choose>
+        </xsl:when>
+        <xsl:otherwise>
+          <a xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"
+             href="{$filename}"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:variable name="longdesc.uri">
+        <xsl:call-template name="longdesc.uri">
+          <xsl:with-param name="mediaobject"
+                          select="ancestor::imageobject/parent::*"/>
+        </xsl:call-template>
+      </xsl:variable>
+
+      <xsl:variable name="phrases"
+                    select="ancestor::mediaobject/textobject[phrase]
+                            |ancestor::inlinemediaobject/textobject[phrase]
+                            |ancestor::mediaobjectco/textobject[phrase]"/>
+
+      <xsl:call-template name="process.image">
+        <xsl:with-param name="alt">
+          <xsl:apply-templates select="$phrases[not(@role) or @role!='tex'][1]"/>
+        </xsl:with-param>
+        <xsl:with-param name="longdesc">
+          <xsl:call-template name="write.longdesc">
+            <xsl:with-param name="mediaobject"
+                            select="ancestor::imageobject/parent::*"/>
+          </xsl:call-template>
+        </xsl:with-param>
+      </xsl:call-template>
+
+      <xsl:if test="$html.longdesc != 0 and $html.longdesc.link != 0
+                    and ancestor::imageobject/parent::*/textobject[not(phrase)]">
+        <xsl:call-template name="longdesc.link">
+          <xsl:with-param name="longdesc.uri" select="$longdesc.uri"/>
+        </xsl:call-template>
+      </xsl:if>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="longdesc.uri">
+  <xsl:param name="mediaobject" select="."/>
+
+  <xsl:if test="$html.longdesc">
+    <xsl:if test="$mediaobject/textobject[not(phrase)]">
+      <xsl:variable name="image-id">
+        <xsl:call-template name="object.id">
+          <xsl:with-param name="object" select="$mediaobject"/>
+        </xsl:call-template>
+      </xsl:variable>
+      <xsl:variable name="dbhtml.dir">
+        <xsl:call-template name="dbhtml-dir"/>
+      </xsl:variable>
+      <xsl:variable name="filename">
+        <xsl:call-template name="make-relative-filename">
+          <xsl:with-param name="base.dir">
+            <xsl:choose>
+              <xsl:when test="$dbhtml.dir != ''">
+                <xsl:value-of select="$dbhtml.dir"/>
+              </xsl:when>
+              <xsl:otherwise>
+                <xsl:value-of select="$base.dir"/>
+              </xsl:otherwise>
+            </xsl:choose>
+          </xsl:with-param>
+          <xsl:with-param name="base.name"
+                          select="concat('ld-',$image-id,$html.ext)"/>
+        </xsl:call-template>
+      </xsl:variable>
+
+      <xsl:value-of select="$filename"/>
+    </xsl:if>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template name="write.longdesc">
+  <xsl:param name="mediaobject" select="."/>
+  <xsl:if test="$html.longdesc != 0 and $mediaobject/textobject[not(phrase)]">
+    <xsl:variable name="filename">
+      <xsl:call-template name="longdesc.uri">
+        <xsl:with-param name="mediaobject" select="$mediaobject"/>
+      </xsl:call-template>
+    </xsl:variable>
+
+    <xsl:value-of select="$filename"/>
+
+    <xsl:call-template name="write.chunk">
+      <xsl:with-param name="filename" select="$filename"/>
+      <xsl:with-param name="quiet" select="$chunk.quietly"/>
+      <xsl:with-param name="content">
+        <html>
+          <head>
+            <xsl:call-template name="system.head.content"/>
+            <xsl:call-template name="head.content">
+              <xsl:with-param name="title" select="'Long Description'"/>
+            </xsl:call-template>
+            <xsl:call-template name="user.head.content"/>
+          </head>
+          <body>
+            <xsl:call-template name="body.attributes"/>
+            <xsl:for-each select="$mediaobject/textobject[not(phrase)]">
+              <xsl:apply-templates select="./*"/>
+            </xsl:for-each>
+          </body>
+        </html>
+      </xsl:with-param>
+    </xsl:call-template>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template name="longdesc.link">
+  <xsl:param name="longdesc.uri" select="''"/>
+
+  <xsl:variable name="this.uri">
+    <xsl:call-template name="make-relative-filename">
+      <xsl:with-param name="base.dir" select="$base.dir"/>
+      <xsl:with-param name="base.name">
+        <xsl:call-template name="href.target.uri"/>
+      </xsl:with-param>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="href.to">
+    <xsl:call-template name="trim.common.uri.paths">
+      <xsl:with-param name="uriA" select="$longdesc.uri"/>
+      <xsl:with-param name="uriB" select="$this.uri"/>
+      <xsl:with-param name="return" select="'A'"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <div class="longdesc-link" align="right">
+    <br clear="all"/>
+    <span class="longdesc-link">
+      <xsl:text>[</xsl:text>
+      <a href="{$href.to}" target="longdesc">D</a>
+      <xsl:text>]</xsl:text>
+    </span>
+  </div>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="videoobject">
+  <xsl:apply-templates select="videodata"/>
+</xsl:template>
+
+<xsl:template match="videodata">
+  <xsl:call-template name="process.image">
+    <xsl:with-param name="tag" select="'embed'"/>
+    <xsl:with-param name="alt">
+      <xsl:apply-templates select="(../../textobject/phrase)[1]"/>
+    </xsl:with-param>
+  </xsl:call-template>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="audioobject">
+  <xsl:apply-templates select="audiodata"/>
+</xsl:template>
+
+<xsl:template match="audiodata">
+  <xsl:call-template name="process.image">
+    <xsl:with-param name="tag" select="'embed'"/>
+    <xsl:with-param name="alt">
+      <xsl:apply-templates select="(../../textobject/phrase)[1]"/>
+    </xsl:with-param>
+  </xsl:call-template>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="textobject">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="textdata">
+  <xsl:variable name="filename">
+    <xsl:choose>
+      <xsl:when test="@entityref">
+        <xsl:value-of select="unparsed-entity-uri(@entityref)"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="@fileref"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="$use.extensions != '0'
+                    and $textinsert.extension != '0'">
+      <xsl:choose>
+        <xsl:when test="element-available('stext:insertfile')">
+          <stext:insertfile href="{$filename}"/>
+        </xsl:when>
+        <xsl:when test="element-available('xtext:insertfile')">
+          <xtext:insertfile href="{$filename}"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:message terminate="yes">
+            <xsl:text>No insertfile extension available.</xsl:text>
+          </xsl:message>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+    <xsl:otherwise>
+      <a xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"
+         href="{$filename}"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="caption">
+  <div class="{name(.)}">
+    <xsl:apply-templates/>
+  </div>
+</xsl:template>
+
+<!-- ==================================================================== -->
+<!-- "Support" for SVG -->
+
+<xsl:template match="svg:*" xmlns:svg="http://www.w3.org/2000/svg">
+  <xsl:copy>
+    <xsl:copy-of select="@*"/>
+    <xsl:apply-templates/>
+  </xsl:copy>
+</xsl:template>
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/html-rtf.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/html-rtf.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/html-rtf.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,335 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:exsl="http://exslt.org/common"
+                xmlns:set="http://exslt.org/sets"
+                exclude-result-prefixes="exsl set"
+                version="1.0">
+
+<!-- ********************************************************************
+     $Id: html-rtf.xsl,v 1.1.1.1 2004/10/19 21:21:46 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<!-- This module contains templates that match against HTML nodes. It is used
+     to post-process result tree fragments for some sorts of cleanup.
+     These templates can only ever be fired by a processor that supports
+     exslt:node-set(). -->
+
+<!-- ==================================================================== -->
+
+<!-- insert.html.p mode templates insert a particular RTF at the beginning
+     of the first paragraph in the primary RTF. -->
+
+<xsl:template match="/" mode="insert.html.p">
+  <xsl:param name="mark" select="'?'"/>
+  <xsl:apply-templates mode="insert.html.p">
+    <xsl:with-param name="mark" select="$mark"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="*" mode="insert.html.p">
+  <xsl:param name="mark" select="'?'"/>
+  <xsl:copy>
+    <xsl:copy-of select="@*"/>
+    <xsl:apply-templates mode="insert.html.p">
+      <xsl:with-param name="mark" select="$mark"/>
+    </xsl:apply-templates>
+  </xsl:copy>
+</xsl:template>
+
+<xsl:template xmlns:html="http://www.w3.org/1999/xhtml"
+              match="html:p|p" mode="insert.html.p">
+  <xsl:param name="mark" select="'?'"/>
+  <xsl:copy>
+    <xsl:copy-of select="@*"/>
+    <xsl:if test="not(preceding::p|preceding::html:p)">
+      <xsl:copy-of select="$mark"/>
+    </xsl:if>
+    <xsl:apply-templates mode="insert.html.p">
+      <xsl:with-param name="mark" select="$mark"/>
+    </xsl:apply-templates>
+  </xsl:copy>
+</xsl:template>
+
+<xsl:template match="text()|processing-instruction()|comment()" mode="insert.html.p">
+  <xsl:param name="mark" select="'?'"/>
+  <xsl:copy/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<!-- insert.html.text mode templates insert a particular RTF at the beginning
+     of the first text-node in the primary RTF. -->
+
+<xsl:template match="/" mode="insert.html.text">
+  <xsl:param name="mark" select="'?'"/>
+  <xsl:apply-templates mode="insert.html.text">
+    <xsl:with-param name="mark" select="$mark"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="*" mode="insert.html.text">
+  <xsl:param name="mark" select="'?'"/>
+  <xsl:copy>
+    <xsl:copy-of select="@*"/>
+    <xsl:apply-templates mode="insert.html.text">
+      <xsl:with-param name="mark" select="$mark"/>
+    </xsl:apply-templates>
+  </xsl:copy>
+</xsl:template>
+
+<xsl:template match="text()|processing-instruction()|comment()" mode="insert.html.text">
+  <xsl:param name="mark" select="'?'"/>
+
+  <xsl:if test="not(preceding::text())">
+    <xsl:copy-of select="$mark"/>
+  </xsl:if>
+
+  <xsl:copy/>
+</xsl:template>
+
+<xsl:template match="processing-instruction()|comment()" mode="insert.html.text">
+  <xsl:param name="mark" select="'?'"/>
+  <xsl:copy/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<!-- unwrap.p mode templates remove blocks from HTML p elements (and
+     other places where blocks aren't allowed) -->
+
+<xsl:template name="unwrap.p">
+  <xsl:param name="p"/>
+  <xsl:choose>
+    <xsl:when test="function-available('exsl:node-set')
+                    and function-available('set:leading')
+                    and function-available('set:trailing')">
+      <xsl:apply-templates select="exsl:node-set($p)" mode="unwrap.p"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:copy-of select="$p"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template xmlns:html="http://www.w3.org/1999/xhtml"
+              match="html:p|p" mode="unwrap.p">
+  <!-- xmlns:html is necessary for the xhtml stylesheet case -->
+  <xsl:variable name="blocks" xmlns:html="http://www.w3.org/1999/xhtml"
+                select="address|blockquote|div|hr|h1|h2|h3|h4|h5|h6
+                        |layer|p|pre|table|dl|menu|ol|ul|form
+                        |html:address|html:blockquote|html:div|html:hr
+                        |html:h1|html:h2|html:h3|html:h4|html:h5|html:h6
+                        |html:layer|html:p|html:pre|html:table|html:dl
+                        |html:menu|html:ol|html:ul|html:form"/>
+  <xsl:choose>
+    <xsl:when test="$blocks">
+      <xsl:call-template name="unwrap.p.nodes">
+        <xsl:with-param name="wrap" select="."/>
+        <xsl:with-param name="first" select="1"/>
+        <xsl:with-param name="nodes" select="node()"/>
+        <xsl:with-param name="blocks" select="$blocks"/>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:copy>
+        <xsl:copy-of select="@*"/>
+        <xsl:apply-templates mode="unwrap.p"/>
+      </xsl:copy>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="*" mode="unwrap.p">
+  <xsl:copy>
+    <xsl:copy-of select="@*"/>
+    <xsl:apply-templates mode="unwrap.p"/>
+  </xsl:copy>
+</xsl:template>
+
+<xsl:template match="text()|processing-instruction()|comment()" mode="unwrap.p">
+  <xsl:copy/>
+</xsl:template>
+
+<xsl:template name="unwrap.p.nodes">
+  <xsl:param name="wrap" select="."/>
+  <xsl:param name="first" select="0"/>
+  <xsl:param name="nodes"/>
+  <xsl:param name="blocks"/>
+  <xsl:variable name="block" select="$blocks[1]"/>
+
+  <!-- This template should never get called if these functions aren't available -->
+  <!-- but this test is still necessary so that processors don't choke on the -->
+  <!-- function calls if they don't support the set: functions -->
+  <xsl:if test="function-available('set:leading')
+                and function-available('set:trailing')">
+    <xsl:choose>
+      <xsl:when test="$blocks">
+        <xsl:variable name="leading" select="set:leading($nodes,$block)"/>
+        <xsl:variable name="trailing" select="set:trailing($nodes,$block)"/>
+
+        <xsl:if test="($wrap/@id and $first = 1) or $leading">
+          <xsl:element name="{local-name($wrap)}" namespace="{namespace-uri($wrap)}">
+            <xsl:for-each select="$wrap/@*">
+              <xsl:if test="$first != 0 or local-name(.) != 'id'">
+                <xsl:copy/>
+              </xsl:if>
+            </xsl:for-each>
+            <xsl:apply-templates select="$leading" mode="unwrap.p"/>
+          </xsl:element>
+        </xsl:if>
+
+        <xsl:apply-templates select="$block" mode="unwrap.p"/>
+
+        <xsl:if test="$trailing">
+          <xsl:call-template name="unwrap.p.nodes">
+            <xsl:with-param name="wrap" select="$wrap"/>
+            <xsl:with-param name="nodes" select="$trailing"/>
+            <xsl:with-param name="blocks" select="$blocks[position() &gt; 1]"/>
+          </xsl:call-template>
+        </xsl:if>
+      </xsl:when>
+
+      <xsl:otherwise>
+        <xsl:if test="($wrap/@id and $first = 1) or $nodes">
+          <xsl:element name="{local-name($wrap)}" namespace="{namespace-uri($wrap)}">
+            <xsl:for-each select="$wrap/@*">
+              <xsl:if test="$first != 0 or local-name(.) != 'id'">
+                <xsl:copy/>
+              </xsl:if>
+            </xsl:for-each>
+            <xsl:apply-templates select="$nodes" mode="unwrap.p"/>
+          </xsl:element>
+        </xsl:if>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:if>
+</xsl:template>
+
+<!-- ==================================================================== -->
+<!-- make.verbatim.mode replaces spaces and newlines -->
+
+<xsl:template match="/" mode="make.verbatim.mode">
+  <xsl:apply-templates mode="make.verbatim.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="make.verbatim.mode">
+  <xsl:copy>
+    <xsl:copy-of select="@*"/>
+    <xsl:apply-templates mode="make.verbatim.mode"/>
+  </xsl:copy>
+</xsl:template>
+
+<xsl:template match="processing-instruction()|comment()" mode="make.verbatim.mode">
+  <xsl:copy/>
+</xsl:template>
+
+<xsl:template match="text()" mode="make.verbatim.mode">
+  <xsl:variable name="text" select="translate(., ' ', '&#160;')"/>
+
+  <xsl:choose>
+    <xsl:when test="not(contains($text, '&#xA;'))">
+      <xsl:value-of select="$text"/>
+    </xsl:when>
+
+    <xsl:otherwise>
+      <xsl:variable name="len" select="string-length($text)"/>
+
+      <xsl:choose>
+        <xsl:when test="$len = 1">
+          <br/><xsl:text>&#xA;</xsl:text>
+        </xsl:when>
+
+        <xsl:otherwise>
+          <xsl:variable name="half" select="$len div 2"/>
+          <xsl:call-template name="make-verbatim-recursive">
+            <xsl:with-param name="text" select="substring($text, 1, $half)"/>
+          </xsl:call-template>
+          <xsl:call-template name="make-verbatim-recursive">
+            <xsl:with-param name="text"
+                            select="substring($text, ($half + 1), $len)"/>
+          </xsl:call-template>
+    	</xsl:otherwise>
+      </xsl:choose>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="make-verbatim-recursive">
+  <xsl:param name="text" select="''"/>
+
+  <xsl:choose>
+    <xsl:when test="not(contains($text, '&#xA;'))">
+      <xsl:value-of select="$text"/>
+    </xsl:when>
+
+    <xsl:otherwise>
+      <xsl:variable name="len" select="string-length($text)"/>
+
+      <xsl:choose>
+        <xsl:when test="$len = 1">
+          <br/><xsl:text>&#xA;</xsl:text>
+        </xsl:when>
+
+        <xsl:otherwise>
+    	  <xsl:variable name="half" select="$len div 2"/>
+          <xsl:call-template name="make-verbatim-recursive">
+    	    <xsl:with-param name="text" select="substring($text, 1, $half)"/>
+    	  </xsl:call-template>
+    	  <xsl:call-template name="make-verbatim-recursive">
+    	    <xsl:with-param name="text"
+    			    select="substring($text, ($half + 1), $len)"/>
+    	  </xsl:call-template>
+    	</xsl:otherwise>
+      </xsl:choose>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<!-- remove.empty.div mode templates remove empty blocks -->
+
+<xsl:template name="remove.empty.div">
+  <xsl:param name="div"/>
+  <xsl:choose>
+    <xsl:when test="function-available('exsl:node-set')">
+      <xsl:apply-templates select="exsl:node-set($div)" mode="remove.empty.div"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:copy-of select="$div"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template xmlns:html="http://www.w3.org/1999/xhtml"
+              match="html:p|p|html:div|div" mode="remove.empty.div">
+  <xsl:if test="node()">
+    <xsl:copy>
+      <xsl:copy-of select="@*"/>
+      <xsl:apply-templates mode="remove.empty.div"/>
+    </xsl:copy>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="*" mode="remove.empty.div">
+  <xsl:copy>
+    <xsl:copy-of select="@*"/>
+    <xsl:apply-templates mode="remove.empty.div"/>
+  </xsl:copy>
+</xsl:template>
+
+<xsl:template match="text()|processing-instruction()|comment()" mode="remove.empty.div">
+  <xsl:copy/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/html.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/html.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/html.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,90 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: html.xsl,v 1.1.1.1 2004/10/19 21:21:46 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<xsl:template name="anchor">
+  <xsl:param name="node" select="."/>
+  <xsl:param name="conditional" select="1"/>
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id">
+      <xsl:with-param name="object" select="$node"/>
+    </xsl:call-template>
+  </xsl:variable>
+  <xsl:if test="$conditional = 0 or $node/@id">
+    <a name="{$id}"/>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template name="href.target.uri">
+  <xsl:param name="context" select="."/>
+  <xsl:param name="object" select="."/>
+  <xsl:text>#</xsl:text>
+  <xsl:call-template name="object.id">
+    <xsl:with-param name="object" select="$object"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="href.target">
+  <xsl:param name="context" select="."/>
+  <xsl:param name="object" select="."/>
+  <xsl:text>#</xsl:text>
+  <xsl:call-template name="object.id">
+    <xsl:with-param name="object" select="$object"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="href.target.with.base.dir">
+  <xsl:param name="object" select="."/>
+  <xsl:if test="$manifest.in.base.dir = 0">
+    <xsl:value-of select="$base.dir"/>
+  </xsl:if>
+  <xsl:call-template name="href.target">
+    <xsl:with-param name="object" select="$object"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="dingbat">
+  <xsl:param name="dingbat">bullet</xsl:param>
+  <xsl:call-template name="dingbat.characters">
+    <xsl:with-param name="dingbat" select="$dingbat"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="dingbat.characters">
+  <!-- now that I'm using the real serializer, all that dingbat malarky -->
+  <!-- isn't necessary anymore... -->
+  <xsl:param name="dingbat">bullet</xsl:param>
+  <xsl:choose>
+    <xsl:when test="$dingbat='bullet'">&#x2022;</xsl:when>
+    <xsl:when test="$dingbat='copyright'">&#x00A9;</xsl:when>
+    <xsl:when test="$dingbat='trademark'">&#x2122;</xsl:when>
+    <xsl:when test="$dingbat='trade'">&#x2122;</xsl:when>
+    <xsl:when test="$dingbat='registered'">&#x00AE;</xsl:when>
+    <xsl:when test="$dingbat='service'">(SM)</xsl:when>
+    <xsl:when test="$dingbat='nbsp'">&#x00A0;</xsl:when>
+    <xsl:when test="$dingbat='ldquo'">&#x201C;</xsl:when>
+    <xsl:when test="$dingbat='rdquo'">&#x201D;</xsl:when>
+    <xsl:when test="$dingbat='lsquo'">&#x2018;</xsl:when>
+    <xsl:when test="$dingbat='rsquo'">&#x2019;</xsl:when>
+    <xsl:when test="$dingbat='em-dash'">&#x2014;</xsl:when>
+    <xsl:when test="$dingbat='mdash'">&#x2014;</xsl:when>
+    <xsl:when test="$dingbat='en-dash'">&#x2013;</xsl:when>
+    <xsl:when test="$dingbat='ndash'">&#x2013;</xsl:when>
+    <xsl:otherwise>
+      <xsl:text>&#x2022;</xsl:text>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+</xsl:stylesheet>
+

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/htmltbl.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/htmltbl.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/htmltbl.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,55 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                version="1.0">
+
+<!-- ********************************************************************
+     $Id: htmltbl.xsl,v 1.1.1.1 2004/10/19 21:21:46 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:template match="colgroup" mode="htmlTable">
+  <xsl:copy>
+    <xsl:copy-of select="@*"/>
+    <xsl:apply-templates mode="htmlTable"/>
+  </xsl:copy>
+</xsl:template>
+
+<xsl:template match="col" mode="htmlTable">
+  <xsl:copy>
+    <xsl:copy-of select="@*"/>
+  </xsl:copy>
+</xsl:template>
+
+<xsl:template match="caption" mode="htmlTable">
+  <xsl:copy>
+    <xsl:copy-of select="@*"/>
+
+    <xsl:apply-templates select=".." mode="object.title.markup">
+      <xsl:with-param name="allow-anchors" select="1"/>
+    </xsl:apply-templates>
+
+  </xsl:copy>
+</xsl:template>
+
+<xsl:template match="thead|tbody|tgroup|tr" mode="htmlTable">
+  <xsl:copy>
+    <xsl:copy-of select="@*"/>
+    <xsl:apply-templates mode="htmlTable"/>
+  </xsl:copy>
+</xsl:template>
+
+<xsl:template match="th|td" mode="htmlTable">
+  <xsl:copy>
+    <xsl:copy-of select="@*"/>
+    <xsl:apply-templates/> <!-- *not* mode=htmlTable -->
+  </xsl:copy>
+</xsl:template>
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/index.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/index.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/index.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,196 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: index.xsl,v 1.1.1.1 2004/10/19 21:21:46 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:template match="index">
+  <!-- some implementations use completely empty index tags to indicate -->
+  <!-- where an automatically generated index should be inserted. so -->
+  <!-- if the index is completely empty, skip it. Unless generate.index -->
+  <!-- is non-zero, in which case, this is where the automatically -->
+  <!-- generated index should go. -->
+
+  <xsl:if test="count(*)>0 or $generate.index != '0'">
+    <div class="{name(.)}">
+      <xsl:if test="$generate.id.attributes != 0">
+        <xsl:attribute name="id">
+          <xsl:call-template name="object.id"/>
+        </xsl:attribute>
+      </xsl:if>
+
+      <xsl:call-template name="index.titlepage"/>
+      <xsl:apply-templates/>
+
+      <xsl:if test="count(indexentry) = 0 and count(indexdiv) = 0">
+        <xsl:call-template name="generate-index">
+          <xsl:with-param name="scope" select="(ancestor::book|/)[last()]"/>
+        </xsl:call-template>
+      </xsl:if>
+
+      <xsl:if test="not(parent::article)">
+        <xsl:call-template name="process.footnotes"/>
+      </xsl:if>
+    </div>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="setindex">
+  <!-- some implementations use completely empty index tags to indicate -->
+  <!-- where an automatically generated index should be inserted. so -->
+  <!-- if the index is completely empty, skip it. Unless generate.index -->
+  <!-- is non-zero, in which case, this is where the automatically -->
+  <!-- generated index should go. -->
+
+  <xsl:if test="count(*)>0 or $generate.index != '0'">
+    <div class="{name(.)}">
+      <xsl:if test="$generate.id.attributes != 0">
+        <xsl:attribute name="id">
+          <xsl:call-template name="object.id"/>
+        </xsl:attribute>
+      </xsl:if>
+
+      <xsl:call-template name="setindex.titlepage"/>
+      <xsl:apply-templates/>
+
+      <xsl:if test="count(indexentry) = 0 and count(indexdiv) = 0">
+        <xsl:call-template name="generate-index">
+          <xsl:with-param name="scope" select="/"/>
+        </xsl:call-template>
+      </xsl:if>
+
+      <xsl:if test="not(parent::article)">
+        <xsl:call-template name="process.footnotes"/>
+      </xsl:if>
+    </div>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="index/title"></xsl:template>
+<xsl:template match="index/subtitle"></xsl:template>
+<xsl:template match="index/titleabbrev"></xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="indexdiv">
+  <div class="{name(.)}">
+    <xsl:if test="$generate.id.attributes != 0">
+      <xsl:attribute name="id">
+        <xsl:call-template name="object.id"/>
+      </xsl:attribute>
+    </xsl:if>
+
+    <xsl:call-template name="anchor"/>
+    <xsl:apply-templates select="*[not(self::indexentry)]"/>
+    <dl>
+      <xsl:apply-templates select="indexentry"/>
+    </dl>
+  </div>
+</xsl:template>
+
+<xsl:template match="indexdiv/title">
+  <h3 class="{name(.)}">
+    <xsl:apply-templates/>
+  </h3>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="indexterm">
+  <!-- this one must have a name, even if it doesn't have an ID -->
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <a class="indexterm" name="{$id}"/>
+</xsl:template>
+
+<xsl:template match="primary|secondary|tertiary|see|seealso">
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="indexentry">
+  <xsl:apply-templates select="primaryie"/>
+</xsl:template>
+
+<xsl:template match="primaryie">
+  <dt>
+    <xsl:apply-templates/>
+  </dt>
+  <xsl:choose>
+    <xsl:when test="following-sibling::secondaryie">
+      <dd>
+        <dl>
+          <xsl:apply-templates select="following-sibling::secondaryie"/>
+        </dl>
+      </dd>
+    </xsl:when>
+    <xsl:when test="following-sibling::seeie
+                    |following-sibling::seealsoie">
+      <dd>
+        <dl>
+          <xsl:apply-templates select="following-sibling::seeie
+                                       |following-sibling::seealsoie"/>
+        </dl>
+      </dd>
+    </xsl:when>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="secondaryie">
+  <dt>
+    <xsl:apply-templates/>
+  </dt>
+  <xsl:choose>
+    <xsl:when test="following-sibling::tertiaryie">
+      <dd>
+        <dl>
+          <xsl:apply-templates select="following-sibling::tertiaryie"/>
+        </dl>
+      </dd>
+    </xsl:when>
+    <xsl:when test="following-sibling::seeie
+                    |following-sibling::seealsoie">
+      <dd>
+        <dl>
+          <xsl:apply-templates select="following-sibling::seeie
+                                       |following-sibling::seealsoie"/>
+        </dl>
+      </dd>
+    </xsl:when>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="tertiaryie">
+  <dt>
+    <xsl:apply-templates/>
+  </dt>
+  <xsl:if test="following-sibling::seeie
+                |following-sibling::seealsoie">
+    <dd>
+      <dl>
+        <xsl:apply-templates select="following-sibling::seeie
+                                     |following-sibling::seealsoie"/>
+      </dl>
+    </dd>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="seeie|seealsoie">
+  <dt>
+    <xsl:apply-templates/>
+  </dt>
+</xsl:template>
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/info.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/info.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/info.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,53 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: info.xsl,v 1.1.1.1 2004/10/19 21:21:46 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- These templates define the "default behavior" for info
+     elements.  Even if you don't process the *info wrappers,
+     some of these elements are needed because the elements are
+     processed from named templates that are called with modes.
+     Since modes aren't sticky, these rules apply. 
+     (TODO: clarify this comment) -->
+
+<!-- ==================================================================== -->
+<!-- called from named templates in a given mode -->
+
+<xsl:template match="corpauthor">
+  <span class="{name(.)}">
+    <xsl:apply-templates/>
+  </span>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="jobtitle">
+  <span class="{name(.)}">
+    <xsl:apply-templates/>
+  </span>
+</xsl:template>
+
+<xsl:template match="orgname">
+  <span class="{name(.)}">
+    <xsl:apply-templates/>
+  </span>
+</xsl:template>
+
+<xsl:template match="orgdiv">
+  <span class="{name(.)}">
+    <xsl:apply-templates/>
+  </span>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/inline.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/inline.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/inline.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1128 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:xlink='http://www.w3.org/1999/xlink'
+                xmlns:suwl="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.UnwrapLinks"
+                exclude-result-prefixes="xlink suwl"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: inline.xsl,v 1.1.1.1 2004/10/19 21:21:46 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<xsl:template name="simple.xlink">
+  <xsl:param name="node" select="."/>
+  <xsl:param name="content">
+    <xsl:apply-templates/>
+  </xsl:param>
+
+  <xsl:variable name="link">
+    <xsl:choose>
+      <xsl:when test="$node/@xlink:href
+                      and (not($node/@xlink:type) or $node/@xlink:type='simple')">
+        <a>
+          <xsl:if test="@xlink.title">
+            <xsl:attribute name="title">
+              <xsl:value-of select="@xlink:title"/>
+            </xsl:attribute>
+          </xsl:if>
+
+          <xsl:attribute name="href">
+            <xsl:choose>
+              <!-- if the href starts with # and does not contain an "(" -->
+              <!-- or if the href starts with #xpointer(id(, it's just an ID -->
+              <xsl:when test="starts-with(@xlink:href,'#')
+                              and (not(contains(@xlink:href,'&#40;'))
+                              or starts-with(@xlink:href,'#xpointer&#40;id&#40;'))">
+                <xsl:variable name="idref">
+                  <xsl:call-template name="xpointer.idref">
+                    <xsl:with-param name="xpointer" select="@xlink:href"/>
+                  </xsl:call-template>
+                </xsl:variable>
+
+                <xsl:variable name="targets" select="key('id',$idref)"/>
+                <xsl:variable name="target" select="$targets[1]"/>
+
+                <xsl:call-template name="check.id.unique">
+                  <xsl:with-param name="linkend" select="@linkend"/>
+                </xsl:call-template>
+
+                <xsl:choose>
+                  <xsl:when test="count($target) = 0">
+                    <xsl:message>
+                      <xsl:text>XLink to nonexistent id: </xsl:text>
+                      <xsl:value-of select="$idref"/>
+                    </xsl:message>
+                    <xsl:text>???</xsl:text>
+                  </xsl:when>
+                  <xsl:otherwise>
+                    <xsl:call-template name="href.target">
+                      <xsl:with-param name="object" select="$target"/>
+                    </xsl:call-template>
+                  </xsl:otherwise>
+                </xsl:choose>
+              </xsl:when>
+
+              <!-- otherwise it's a URI -->
+              <xsl:otherwise>
+                <xsl:value-of select="@xlink:href"/>
+              </xsl:otherwise>
+            </xsl:choose>
+          </xsl:attribute>
+          <xsl:copy-of select="$content"/>
+        </a>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:copy-of select="$content"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="function-available('suwl:unwrapLinks')">
+      <xsl:copy-of select="suwl:unwrapLinks($link)"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:copy-of select="$link"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="inline.charseq">
+  <xsl:param name="content">
+    <xsl:call-template name="anchor"/>
+    <xsl:call-template name="simple.xlink">
+      <xsl:with-param name="content">
+        <xsl:apply-templates/>
+      </xsl:with-param>
+    </xsl:call-template>
+  </xsl:param>
+  <span class="{local-name(.)}">
+    <xsl:if test="@dir">
+      <xsl:attribute name="dir">
+        <xsl:value-of select="@dir"/>
+      </xsl:attribute>
+    </xsl:if>
+    <xsl:copy-of select="$content"/>
+  </span>
+</xsl:template>
+
+<xsl:template name="inline.monoseq">
+  <xsl:param name="content">
+    <xsl:call-template name="anchor"/>
+    <xsl:call-template name="simple.xlink">
+      <xsl:with-param name="content">
+        <xsl:apply-templates/>
+      </xsl:with-param>
+    </xsl:call-template>
+  </xsl:param>
+  <tt class="{local-name(.)}">
+    <xsl:if test="@dir">
+      <xsl:attribute name="dir">
+        <xsl:value-of select="@dir"/>
+      </xsl:attribute>
+    </xsl:if>
+    <xsl:copy-of select="$content"/>
+  </tt>
+</xsl:template>
+
+<xsl:template name="inline.boldseq">
+  <xsl:param name="content">
+    <xsl:call-template name="anchor"/>
+    <xsl:call-template name="simple.xlink">
+      <xsl:with-param name="content">
+        <xsl:apply-templates/>
+      </xsl:with-param>
+    </xsl:call-template>
+  </xsl:param>
+
+  <span>
+    <xsl:if test="@dir">
+      <xsl:attribute name="dir">
+        <xsl:value-of select="@dir"/>
+      </xsl:attribute>
+    </xsl:if>
+
+    <!-- don't put <b> inside figure, example, or table titles -->
+    <xsl:choose>
+      <xsl:when test="local-name(..) = 'title'
+                      and (local-name(../..) = 'figure'
+                      or local-name(../..) = 'example'
+                      or local-name(../..) = 'table')">
+        <xsl:copy-of select="$content"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <b class="{local-name(.)}">
+          <xsl:copy-of select="$content"/>
+        </b>
+      </xsl:otherwise>
+    </xsl:choose>
+  </span>
+</xsl:template>
+
+<xsl:template name="inline.italicseq">
+  <xsl:param name="content">
+    <xsl:call-template name="anchor"/>
+    <xsl:call-template name="simple.xlink">
+      <xsl:with-param name="content">
+        <xsl:apply-templates/>
+      </xsl:with-param>
+    </xsl:call-template>
+  </xsl:param>
+  <i class="{local-name(.)}">
+    <xsl:if test="@dir">
+      <xsl:attribute name="dir">
+        <xsl:value-of select="@dir"/>
+      </xsl:attribute>
+    </xsl:if>
+    <xsl:copy-of select="$content"/>
+  </i>
+</xsl:template>
+
+<xsl:template name="inline.boldmonoseq">
+  <xsl:param name="content">
+    <xsl:call-template name="anchor"/>
+    <xsl:call-template name="simple.xlink">
+      <xsl:with-param name="content">
+        <xsl:apply-templates/>
+      </xsl:with-param>
+    </xsl:call-template>
+  </xsl:param>
+  <!-- don't put <b> inside figure, example, or table titles -->
+  <!-- or other titles that may already be represented with <b>'s. -->
+  <xsl:choose>
+    <xsl:when test="local-name(..) = 'title'
+                    and (local-name(../..) = 'figure'
+                         or local-name(../..) = 'example'
+                         or local-name(../..) = 'table'
+                         or local-name(../..) = 'formalpara')">
+      <tt class="{local-name(.)}">
+        <xsl:if test="@dir">
+          <xsl:attribute name="dir">
+            <xsl:value-of select="@dir"/>
+          </xsl:attribute>
+        </xsl:if>
+        <xsl:copy-of select="$content"/>
+      </tt>
+    </xsl:when>
+    <xsl:otherwise>
+      <b class="{local-name(.)}">
+        <tt>
+          <xsl:if test="@dir">
+            <xsl:attribute name="dir">
+              <xsl:value-of select="@dir"/>
+            </xsl:attribute>
+          </xsl:if>
+          <xsl:copy-of select="$content"/>
+        </tt>
+      </b>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="inline.italicmonoseq">
+  <xsl:param name="content">
+    <xsl:call-template name="anchor"/>
+    <xsl:call-template name="simple.xlink">
+      <xsl:with-param name="content">
+        <xsl:apply-templates/>
+      </xsl:with-param>
+    </xsl:call-template>
+  </xsl:param>
+  <i class="{local-name(.)}">
+    <tt>
+      <xsl:if test="@dir">
+        <xsl:attribute name="dir">
+          <xsl:value-of select="@dir"/>
+        </xsl:attribute>
+      </xsl:if>
+      <xsl:copy-of select="$content"/>
+    </tt>
+  </i>
+</xsl:template>
+
+<xsl:template name="inline.superscriptseq">
+  <xsl:param name="content">
+    <xsl:call-template name="anchor"/>
+    <xsl:call-template name="simple.xlink">
+      <xsl:with-param name="content">
+        <xsl:apply-templates/>
+      </xsl:with-param>
+    </xsl:call-template>
+  </xsl:param>
+  <sup>
+    <xsl:if test="@dir">
+      <xsl:attribute name="dir">
+        <xsl:value-of select="@dir"/>
+      </xsl:attribute>
+    </xsl:if>
+    <xsl:copy-of select="$content"/>
+  </sup>
+</xsl:template>
+
+<xsl:template name="inline.subscriptseq">
+  <xsl:param name="content">
+    <xsl:call-template name="anchor"/>
+    <xsl:call-template name="simple.xlink">
+      <xsl:with-param name="content">
+        <xsl:apply-templates/>
+      </xsl:with-param>
+    </xsl:call-template>
+  </xsl:param>
+  <sub>
+    <xsl:if test="@dir">
+      <xsl:attribute name="dir">
+        <xsl:value-of select="@dir"/>
+      </xsl:attribute>
+    </xsl:if>
+    <xsl:copy-of select="$content"/>
+  </sub>
+</xsl:template>
+
+<!-- ==================================================================== -->
+<!-- some special cases -->
+
+<xsl:template match="author">
+  <span class="{name(.)}">
+    <xsl:call-template name="anchor"/>
+    <xsl:call-template name="person.name"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="editor">
+  <span class="{name(.)}">
+    <xsl:call-template name="anchor"/>
+    <xsl:call-template name="person.name"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="othercredit">
+  <span class="{name(.)}">
+    <xsl:call-template name="anchor"/>
+    <xsl:call-template name="person.name"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="authorinitials">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="accel">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="action">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="application">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="classname">
+  <xsl:call-template name="inline.monoseq"/>
+</xsl:template>
+
+<xsl:template match="exceptionname">
+  <xsl:call-template name="inline.monoseq"/>
+</xsl:template>
+
+<xsl:template match="interfacename">
+  <xsl:call-template name="inline.monoseq"/>
+</xsl:template>
+
+<xsl:template match="methodname">
+  <xsl:call-template name="inline.monoseq"/>
+</xsl:template>
+
+<xsl:template match="command">
+  <xsl:call-template name="inline.boldseq"/>
+</xsl:template>
+
+<xsl:template match="computeroutput">
+  <xsl:call-template name="inline.monoseq"/>
+</xsl:template>
+
+<xsl:template match="constant">
+  <xsl:call-template name="inline.monoseq"/>
+</xsl:template>
+
+<xsl:template match="database">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="errorcode">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="errorname">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="errortype">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="errortext">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="envar">
+  <xsl:call-template name="inline.monoseq"/>
+</xsl:template>
+
+<xsl:template match="filename">
+  <xsl:call-template name="inline.monoseq"/>
+</xsl:template>
+
+<xsl:template match="function">
+  <xsl:choose>
+    <xsl:when test="$function.parens != '0'
+                    and (parameter or function or replaceable)">
+      <xsl:variable name="nodes" select="text()|*"/>
+      <xsl:call-template name="inline.monoseq">
+        <xsl:with-param name="content">
+          <xsl:call-template name="simple.xlink">
+            <xsl:with-param name="content">
+              <xsl:apply-templates select="$nodes[1]"/>
+            </xsl:with-param>
+          </xsl:call-template>
+        </xsl:with-param>
+      </xsl:call-template>
+      <xsl:text>(</xsl:text>
+      <xsl:apply-templates select="$nodes[position()>1]"/>
+      <xsl:text>)</xsl:text>
+    </xsl:when>
+    <xsl:otherwise>
+     <xsl:call-template name="inline.monoseq"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="function/parameter" priority="2">
+  <xsl:call-template name="inline.italicmonoseq"/>
+  <xsl:if test="following-sibling::*">
+    <xsl:text>, </xsl:text>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="function/replaceable" priority="2">
+  <xsl:call-template name="inline.italicmonoseq"/>
+  <xsl:if test="following-sibling::*">
+    <xsl:text>, </xsl:text>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="guibutton">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="guiicon">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="guilabel">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="guimenu">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="guimenuitem">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="guisubmenu">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="hardware">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="interface">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="interfacedefinition">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="keycap">
+  <xsl:call-template name="inline.boldseq"/>
+</xsl:template>
+
+<xsl:template match="keycode">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="keysym">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="literal">
+  <xsl:call-template name="inline.monoseq"/>
+</xsl:template>
+
+<xsl:template match="code">
+  <xsl:call-template name="inline.monoseq"/>
+</xsl:template>
+
+<xsl:template match="medialabel">
+  <xsl:call-template name="inline.italicseq"/>
+</xsl:template>
+
+<xsl:template match="shortcut">
+  <xsl:call-template name="inline.boldseq"/>
+</xsl:template>
+
+<xsl:template match="mousebutton">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="option">
+  <xsl:call-template name="inline.monoseq"/>
+</xsl:template>
+
+<xsl:template match="parameter">
+  <xsl:call-template name="inline.italicmonoseq"/>
+</xsl:template>
+
+<xsl:template match="property">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="prompt">
+  <xsl:call-template name="inline.monoseq"/>
+</xsl:template>
+
+<xsl:template match="replaceable" priority="1">
+  <xsl:call-template name="inline.italicmonoseq"/>
+</xsl:template>
+
+<xsl:template match="returnvalue">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="structfield">
+  <xsl:call-template name="inline.italicmonoseq"/>
+</xsl:template>
+
+<xsl:template match="structname">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="symbol">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="systemitem">
+  <xsl:call-template name="inline.monoseq"/>
+</xsl:template>
+
+<xsl:template match="token">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="type">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="userinput">
+  <xsl:call-template name="inline.boldmonoseq"/>
+</xsl:template>
+
+<xsl:template match="abbrev">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="acronym">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="citerefentry">
+  <xsl:choose>
+    <xsl:when test="$citerefentry.link != '0'">
+      <a>
+        <xsl:attribute name="href">
+          <xsl:call-template name="generate.citerefentry.link"/>
+        </xsl:attribute>
+        <xsl:call-template name="inline.charseq"/>
+      </a>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:call-template name="inline.charseq"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="generate.citerefentry.link">
+  <!-- nop -->
+</xsl:template>
+
+<xsl:template name="x.generate.citerefentry.link">
+  <xsl:text>http://example.com/cgi-bin/man.cgi?</xsl:text>
+  <xsl:value-of select="refentrytitle"/>
+  <xsl:text>(</xsl:text>
+  <xsl:value-of select="manvolnum"/>
+  <xsl:text>)</xsl:text>
+</xsl:template>
+
+<xsl:template match="citetitle">
+  <xsl:choose>
+    <xsl:when test="@pubwork = 'article'">
+      <xsl:call-template name="gentext.startquote"/>
+      <xsl:call-template name="inline.charseq"/>
+      <xsl:call-template name="gentext.endquote"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:call-template name="inline.italicseq"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="emphasis">
+  <span>
+    <xsl:choose>
+      <xsl:when test="@role and $emphasis.propagates.style != 0">
+        <xsl:attribute name="class">
+          <xsl:value-of select="@role"/>
+        </xsl:attribute>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:attribute name="class">
+          <xsl:text>emphasis</xsl:text>
+        </xsl:attribute>
+      </xsl:otherwise>
+    </xsl:choose>
+    <xsl:call-template name="anchor"/>
+
+    <xsl:call-template name="simple.xlink">
+      <xsl:with-param name="content">
+        <xsl:choose>
+          <xsl:when test="@role = 'bold'">
+            <!-- backwards compatibility: make bold into b elements, but -->
+            <!-- don't put bold inside figure, example, or table titles -->
+            <xsl:choose>
+              <xsl:when test="local-name(..) = 'title'
+                              and (local-name(../..) = 'figure'
+                              or local-name(../..) = 'example'
+                              or local-name(../..) = 'table')">
+                <xsl:apply-templates/>
+              </xsl:when>
+              <xsl:otherwise>
+                <b><xsl:apply-templates/></b>
+              </xsl:otherwise>
+            </xsl:choose>
+          </xsl:when>
+          <xsl:when test="@role and $emphasis.propagates.style != 0">
+            <xsl:apply-templates/>
+          </xsl:when>
+          <xsl:otherwise>
+            <em><xsl:apply-templates/></em>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:with-param>
+    </xsl:call-template>
+  </span>
+</xsl:template>
+
+<xsl:template match="foreignphrase">
+  <span class="foreignphrase">
+    <xsl:if test="@lang or @xml:lang">
+      <xsl:call-template name="language.attribute"/>
+    </xsl:if>
+    <xsl:call-template name="inline.italicseq"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="markup">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="phrase">
+  <span>
+    <xsl:if test="@lang or @xml:lang">
+      <xsl:call-template name="language.attribute"/>
+    </xsl:if>
+    <xsl:if test="@role and $phrase.propagates.style != 0">
+      <xsl:attribute name="class">
+        <xsl:value-of select="@role"/>
+      </xsl:attribute>
+    </xsl:if>
+    <xsl:call-template name="anchor"/>
+    <xsl:call-template name="simple.xlink">
+      <xsl:with-param name="content">
+        <xsl:apply-templates/>
+      </xsl:with-param>
+    </xsl:call-template>
+  </span>
+</xsl:template>
+
+<xsl:template match="quote">
+  <xsl:variable name="depth">
+    <xsl:call-template name="dot.count">
+      <xsl:with-param name="string"><xsl:number level="multiple"/></xsl:with-param>
+    </xsl:call-template>
+  </xsl:variable>
+  <xsl:choose>
+    <xsl:when test="$depth mod 2 = 0">
+      <xsl:call-template name="gentext.startquote"/>
+      <xsl:call-template name="inline.charseq"/>
+      <xsl:call-template name="gentext.endquote"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:call-template name="gentext.nestedstartquote"/>
+      <xsl:call-template name="inline.charseq"/>
+      <xsl:call-template name="gentext.nestedendquote"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="varname">
+  <xsl:call-template name="inline.monoseq"/>
+</xsl:template>
+
+<xsl:template match="wordasword">
+  <xsl:call-template name="inline.italicseq"/>
+</xsl:template>
+
+<xsl:template match="lineannotation">
+  <i class="{local-name(.)}">
+    <xsl:call-template name="inline.charseq"/>
+  </i>
+</xsl:template>
+
+<xsl:template match="superscript">
+  <xsl:call-template name="inline.superscriptseq"/>
+</xsl:template>
+
+<xsl:template match="subscript">
+  <xsl:call-template name="inline.subscriptseq"/>
+</xsl:template>
+
+<xsl:template match="trademark">
+  <xsl:call-template name="inline.charseq"/>
+  <xsl:choose>
+    <xsl:when test="@class = 'copyright'
+                    or @class = 'registered'">
+      <xsl:call-template name="dingbat">
+        <xsl:with-param name="dingbat" select="@class"/>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:when test="@class = 'service'">
+      <sup>SM</sup>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:call-template name="dingbat">
+        <xsl:with-param name="dingbat" select="'trademark'"/>
+      </xsl:call-template>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="firstterm">
+  <xsl:call-template name="glossterm">
+    <xsl:with-param name="firstterm" select="1"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="glossterm" name="glossterm">
+  <xsl:param name="firstterm" select="0"/>
+
+  <!-- To avoid extra <a name=""> anchor from inline.italicseq -->
+  <xsl:variable name="content">
+    <xsl:apply-templates/>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="($firstterm.only.link = 0 or $firstterm = 1) and @linkend">
+      <xsl:variable name="targets" select="key('id', at linkend)"/>
+      <xsl:variable name="target" select="$targets[1]"/>
+
+      <xsl:call-template name="check.id.unique">
+        <xsl:with-param name="linkend" select="@linkend"/>
+      </xsl:call-template>
+
+      <a>
+        <xsl:if test="@id">
+          <xsl:attribute name="name">
+            <xsl:value-of select="@id"/>
+          </xsl:attribute>
+        </xsl:if>
+
+        <xsl:attribute name="href">
+          <xsl:call-template name="href.target">
+            <xsl:with-param name="object" select="$target"/>
+          </xsl:call-template>
+        </xsl:attribute>
+
+        <xsl:call-template name="inline.italicseq">
+          <xsl:with-param name="content" select="$content"/>
+        </xsl:call-template>
+      </a>
+    </xsl:when>
+
+    <xsl:when test="not(@linkend)
+                    and ($firstterm.only.link = 0 or $firstterm = 1)
+                    and ($glossterm.auto.link != 0)
+                    and $glossary.collection != ''">
+      <xsl:variable name="term">
+        <xsl:choose>
+          <xsl:when test="@baseform"><xsl:value-of select="@baseform"/></xsl:when>
+          <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
+        </xsl:choose>
+      </xsl:variable>
+
+      <xsl:variable name="cterm"
+           select="(document($glossary.collection,.)//glossentry[glossterm=$term])[1]"/>
+
+      <!-- HACK HACK HACK! But it works... -->
+      <!-- You'd need to do more work if you wanted to chunk on glossdiv, though -->
+
+      <xsl:variable name="glossary" select="//glossary[@role='auto']"/>
+
+      <xsl:if test="count($glossary) != 1">
+        <xsl:message>
+          <xsl:text>Warning: glossary.collection specified, but there are </xsl:text>
+          <xsl:value-of select="count($glossary)"/>
+          <xsl:text> automatic glossaries</xsl:text>
+        </xsl:message>
+      </xsl:if>
+
+      <xsl:variable name="glosschunk">
+        <xsl:call-template name="href.target">
+          <xsl:with-param name="object" select="$glossary"/>
+        </xsl:call-template>
+      </xsl:variable>
+
+      <xsl:variable name="chunkbase">
+        <xsl:choose>
+          <xsl:when test="contains($glosschunk, '#')">
+            <xsl:value-of select="substring-before($glosschunk, '#')"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:value-of select="$glosschunk"/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:variable>
+
+      <xsl:choose>
+        <xsl:when test="not($cterm)">
+          <xsl:message>
+            <xsl:text>There's no entry for </xsl:text>
+            <xsl:value-of select="$term"/>
+            <xsl:text> in </xsl:text>
+            <xsl:value-of select="$glossary.collection"/>
+          </xsl:message>
+          <xsl:call-template name="inline.italicseq"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:variable name="id">
+            <xsl:choose>
+              <xsl:when test="$cterm/@id">
+                <xsl:value-of select="$cterm/@id"/>
+              </xsl:when>
+              <xsl:otherwise>
+                <xsl:value-of select="generate-id($cterm)"/>
+              </xsl:otherwise>
+            </xsl:choose>
+          </xsl:variable>
+          <a href="{$chunkbase}#{$id}">
+            <xsl:call-template name="inline.italicseq">
+              <xsl:with-param name="content" select="$content"/>
+            </xsl:call-template>
+          </a>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+
+    <xsl:when test="not(@linkend)
+                    and ($firstterm.only.link = 0 or $firstterm = 1)
+                    and $glossterm.auto.link != 0">
+      <xsl:variable name="term">
+        <xsl:choose>
+          <xsl:when test="@baseform">
+            <xsl:value-of select="normalize-space(@baseform)"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:value-of select="normalize-space(.)"/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:variable>
+      <xsl:variable name="targets"
+                    select="//glossentry[normalize-space(glossterm)=$term
+                              or normalize-space(glossterm/@baseform)=$term]"/>
+      <xsl:variable name="target" select="$targets[1]"/>
+
+      <xsl:choose>
+        <xsl:when test="count($targets)=0">
+          <xsl:message>
+            <xsl:text>Error: no glossentry for glossterm: </xsl:text>
+            <xsl:value-of select="."/>
+            <xsl:text>.</xsl:text>
+          </xsl:message>
+          <xsl:call-template name="inline.italicseq"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <a>
+            <xsl:if test="@id">
+              <xsl:attribute name="name">
+                <xsl:value-of select="@id"/>
+              </xsl:attribute>
+            </xsl:if>
+
+            <xsl:attribute name="href">
+              <xsl:call-template name="href.target">
+                <xsl:with-param name="object" select="$target"/>
+              </xsl:call-template>
+            </xsl:attribute>
+
+            <xsl:call-template name="inline.italicseq">
+              <xsl:with-param name="content" select="$content"/>
+            </xsl:call-template>
+          </a>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+
+    <xsl:otherwise>
+      <xsl:call-template name="inline.italicseq"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="sgmltag|tag">
+  <xsl:call-template name="format.sgmltag"/>
+</xsl:template>
+
+<xsl:template name="format.sgmltag">
+  <xsl:param name="class">
+    <xsl:choose>
+      <xsl:when test="@class">
+        <xsl:value-of select="@class"/>
+      </xsl:when>
+      <xsl:otherwise>element</xsl:otherwise>
+    </xsl:choose>
+  </xsl:param>
+
+  <tt class="sgmltag-{$class}">
+    <xsl:choose>
+      <xsl:when test="$class='attribute'">
+        <xsl:apply-templates/>
+      </xsl:when>
+      <xsl:when test="$class='attvalue'">
+        <xsl:apply-templates/>
+      </xsl:when>
+      <xsl:when test="$class='element'">
+        <xsl:apply-templates/>
+      </xsl:when>
+      <xsl:when test="$class='endtag'">
+        <xsl:text>&lt;/</xsl:text>
+        <xsl:apply-templates/>
+        <xsl:text>&gt;</xsl:text>
+      </xsl:when>
+      <xsl:when test="$class='genentity'">
+        <xsl:text>&amp;</xsl:text>
+        <xsl:apply-templates/>
+        <xsl:text>;</xsl:text>
+      </xsl:when>
+      <xsl:when test="$class='numcharref'">
+        <xsl:text>&amp;#</xsl:text>
+        <xsl:apply-templates/>
+        <xsl:text>;</xsl:text>
+      </xsl:when>
+      <xsl:when test="$class='paramentity'">
+        <xsl:text>%</xsl:text>
+        <xsl:apply-templates/>
+        <xsl:text>;</xsl:text>
+      </xsl:when>
+      <xsl:when test="$class='pi'">
+        <xsl:text>&lt;?</xsl:text>
+        <xsl:apply-templates/>
+        <xsl:text>&gt;</xsl:text>
+      </xsl:when>
+      <xsl:when test="$class='xmlpi'">
+        <xsl:text>&lt;?</xsl:text>
+        <xsl:apply-templates/>
+        <xsl:text>?&gt;</xsl:text>
+      </xsl:when>
+      <xsl:when test="$class='starttag'">
+        <xsl:text>&lt;</xsl:text>
+        <xsl:apply-templates/>
+        <xsl:text>&gt;</xsl:text>
+      </xsl:when>
+      <xsl:when test="$class='emptytag'">
+        <xsl:text>&lt;</xsl:text>
+        <xsl:apply-templates/>
+        <xsl:text>/&gt;</xsl:text>
+      </xsl:when>
+      <xsl:when test="$class='sgmlcomment'">
+        <xsl:text>&lt;!--</xsl:text>
+        <xsl:apply-templates/>
+        <xsl:text>--&gt;</xsl:text>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:apply-templates/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </tt>
+</xsl:template>
+
+<xsl:template match="email">
+  <xsl:call-template name="inline.monoseq">
+    <xsl:with-param name="content">
+      <xsl:text>&lt;</xsl:text>
+      <a>
+       <xsl:attribute name="href">mailto:<xsl:value-of select="."/></xsl:attribute>
+       <xsl:apply-templates/>
+      </a>
+      <xsl:text>&gt;</xsl:text>
+    </xsl:with-param>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="keycombo">
+  <xsl:variable name="action" select="@action"/>
+  <xsl:variable name="joinchar">
+    <xsl:choose>
+      <xsl:when test="$action='seq'"><xsl:text> </xsl:text></xsl:when>
+      <xsl:when test="$action='simul'">+</xsl:when>
+      <xsl:when test="$action='press'">-</xsl:when>
+      <xsl:when test="$action='click'">-</xsl:when>
+      <xsl:when test="$action='double-click'">-</xsl:when>
+      <xsl:when test="$action='other'"></xsl:when>
+      <xsl:otherwise>-</xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+  <xsl:for-each select="*">
+    <xsl:if test="position()>1"><xsl:value-of select="$joinchar"/></xsl:if>
+    <xsl:apply-templates select="."/>
+  </xsl:for-each>
+</xsl:template>
+
+<xsl:template match="uri">
+  <xsl:call-template name="inline.monoseq"/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="menuchoice">
+  <xsl:variable name="shortcut" select="./shortcut"/>
+  <xsl:call-template name="process.menuchoice"/>
+  <xsl:if test="$shortcut">
+    <xsl:text> (</xsl:text>
+    <xsl:apply-templates select="$shortcut"/>
+    <xsl:text>)</xsl:text>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template name="process.menuchoice">
+  <xsl:param name="nodelist" select="guibutton|guiicon|guilabel|guimenu|guimenuitem|guisubmenu|interface"/><!-- not(shortcut) -->
+  <xsl:param name="count" select="1"/>
+
+  <xsl:choose>
+    <xsl:when test="$count>count($nodelist)"></xsl:when>
+    <xsl:when test="$count=1">
+      <xsl:apply-templates select="$nodelist[$count=position()]"/>
+      <xsl:call-template name="process.menuchoice">
+        <xsl:with-param name="nodelist" select="$nodelist"/>
+        <xsl:with-param name="count" select="$count+1"/>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:variable name="node" select="$nodelist[$count=position()]"/>
+      <xsl:choose>
+        <xsl:when test="name($node)='guimenuitem'
+                        or name($node)='guisubmenu'">
+          <xsl:value-of select="$menuchoice.menu.separator"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="$menuchoice.separator"/>
+        </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="$node"/>
+      <xsl:call-template name="process.menuchoice">
+        <xsl:with-param name="nodelist" select="$nodelist"/>
+        <xsl:with-param name="count" select="$count+1"/>
+      </xsl:call-template>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="optional">
+  <xsl:value-of select="$arg.choice.opt.open.str"/>
+  <xsl:call-template name="inline.charseq"/>
+  <xsl:value-of select="$arg.choice.opt.close.str"/>
+</xsl:template>
+
+<xsl:template match="citation">
+  <!-- todo: biblio-citation-check -->
+  <xsl:text>[</xsl:text>
+  <xsl:call-template name="inline.charseq"/>
+  <xsl:text>]</xsl:text>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="comment|remark">
+  <xsl:if test="$show.comments != 0">
+    <i><xsl:call-template name="inline.charseq"/></i>
+  </xsl:if>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="productname">
+  <xsl:call-template name="inline.charseq"/>
+  <xsl:if test="@class">
+    <xsl:call-template name="dingbat">
+      <xsl:with-param name="dingbat" select="@class"/>
+    </xsl:call-template>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="productnumber">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="pob|street|city|state|postcode|country|otheraddr">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="phone|fax">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<!-- in Addresses, for example -->
+<xsl:template match="honorific|firstname|surname|lineage|othername">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="personname">
+  <xsl:call-template name="anchor"/>
+  <xsl:call-template name="person.name"/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="beginpage">
+  <!-- does nothing; this *is not* markup to force a page break. -->
+</xsl:template>
+
+</xsl:stylesheet>
+

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/keywords.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/keywords.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/keywords.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,35 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: keywords.xsl,v 1.1.1.1 2004/10/19 21:21:46 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<xsl:template match="keywordset"></xsl:template>
+<xsl:template match="subjectset"></xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="keywordset" mode="html.header">
+  <meta name="keywords">
+    <xsl:attribute name="content">
+      <xsl:apply-templates select="keyword" mode="html.header"/>
+    </xsl:attribute>
+  </meta>
+</xsl:template>
+
+<xsl:template match="keyword" mode="html.header">
+  <xsl:apply-templates/>
+  <xsl:if test="following-sibling::keyword">, </xsl:if>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/lists.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/lists.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/lists.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1051 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: lists.xsl,v 1.1.1.1 2004/10/19 21:21:47 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:template match="itemizedlist">
+  <div class="{name(.)}">
+    <xsl:call-template name="anchor"/>
+    <xsl:if test="title">
+      <xsl:call-template name="formal.object.heading"/>
+    </xsl:if>
+
+    <!-- Preserve order of PIs and comments -->
+    <xsl:apply-templates 
+        select="*[not(self::listitem
+                  or self::title
+                  or self::titleabbrev)]
+                |comment()[not(preceding-sibling::listitem)]
+                |processing-instruction()[not(preceding-sibling::listitem)]"/>
+
+    <ul>
+      <xsl:if test="$css.decoration != 0">
+        <xsl:attribute name="type">
+          <xsl:call-template name="list.itemsymbol"/>
+        </xsl:attribute>
+      </xsl:if>
+
+      <xsl:if test="@spacing='compact'">
+        <xsl:attribute name="compact">
+          <xsl:value-of select="@spacing"/>
+        </xsl:attribute>
+      </xsl:if>
+      <xsl:apply-templates 
+            select="listitem
+                    |comment()[preceding-sibling::listitem]
+                    |processing-instruction()[preceding-sibling::listitem]"/>
+    </ul>
+  </div>
+</xsl:template>
+
+<xsl:template match="itemizedlist/title">
+  <!-- nop -->
+</xsl:template>
+
+<xsl:template match="itemizedlist/listitem">
+  <xsl:variable name="mark" select="../@mark"/>
+  <xsl:variable name="override" select="@override"/>
+
+  <xsl:variable name="usemark">
+    <xsl:choose>
+      <xsl:when test="$override != ''">
+        <xsl:value-of select="$override"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$mark"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:variable name="cssmark">
+    <xsl:choose>
+      <xsl:when test="$usemark = 'opencircle'">circle</xsl:when>
+      <xsl:when test="$usemark = 'bullet'">disc</xsl:when>
+      <xsl:when test="$usemark = 'box'">square</xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$usemark"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <li>
+    <xsl:if test="$css.decoration = '1' and $cssmark != ''">
+      <xsl:attribute name="style">
+        <xsl:text>list-style-type: </xsl:text>
+        <xsl:value-of select="$cssmark"/>
+      </xsl:attribute>
+    </xsl:if>
+
+    <!-- we can't just drop the anchor in since some browsers (Opera)
+         get confused about line breaks if we do. So if the first child
+         is a para, assume the para will put in the anchor. Otherwise,
+         put the anchor in anyway. -->
+    <xsl:if test="local-name(child::*[1]) != 'para'">
+      <xsl:call-template name="anchor"/>
+    </xsl:if>
+
+    <xsl:choose>
+      <xsl:when test="$show.revisionflag != 0 and @revisionflag">
+        <div class="{@revisionflag}">
+          <xsl:apply-templates/>
+        </div>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:apply-templates/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </li>
+</xsl:template>
+
+<xsl:template match="orderedlist">
+  <xsl:variable name="pi-start">
+    <xsl:call-template name="dbhtml-attribute">
+      <xsl:with-param name="pis"
+                      select="processing-instruction('dbhtml')"/>
+      <xsl:with-param name="attribute" select="'start'"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="start">
+    <xsl:choose>
+      <xsl:when test="@continuation='continues'">
+        <xsl:call-template name="orderedlist-starting-number"/>
+      </xsl:when>
+      <xsl:when test="$pi-start != ''">
+        <xsl:value-of select="$pi-start"/>
+      </xsl:when>
+      <xsl:otherwise>1</xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:variable name="numeration">
+    <xsl:call-template name="list.numeration"/>
+  </xsl:variable>
+
+  <xsl:variable name="type">
+    <xsl:choose>
+      <xsl:when test="$numeration='arabic'">1</xsl:when>
+      <xsl:when test="$numeration='loweralpha'">a</xsl:when>
+      <xsl:when test="$numeration='lowerroman'">i</xsl:when>
+      <xsl:when test="$numeration='upperalpha'">A</xsl:when>
+      <xsl:when test="$numeration='upperroman'">I</xsl:when>
+      <!-- What!? This should never happen -->
+      <xsl:otherwise>
+        <xsl:message>
+          <xsl:text>Unexpected numeration: </xsl:text>
+          <xsl:value-of select="$numeration"/>
+        </xsl:message>
+        <xsl:value-of select="1"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <div class="{name(.)}">
+    <xsl:call-template name="anchor"/>
+
+    <xsl:if test="title">
+      <xsl:call-template name="formal.object.heading"/>
+    </xsl:if>
+
+    <!-- Preserve order of PIs and comments -->
+    <xsl:apply-templates 
+        select="*[not(self::listitem
+                  or self::title
+                  or self::titleabbrev)]
+                |comment()[not(preceding-sibling::listitem)]
+                |processing-instruction()[not(preceding-sibling::listitem)]"/>
+
+    <ol>
+      <xsl:if test="$start != '1'">
+        <xsl:attribute name="start">
+          <xsl:value-of select="$start"/>
+        </xsl:attribute>
+      </xsl:if>
+      <xsl:if test="$numeration != ''">
+        <xsl:attribute name="type">
+          <xsl:value-of select="$type"/>
+        </xsl:attribute>
+      </xsl:if>
+      <xsl:if test="@spacing='compact'">
+        <xsl:attribute name="compact">
+          <xsl:value-of select="@spacing"/>
+        </xsl:attribute>
+      </xsl:if>
+      <xsl:apply-templates 
+            select="listitem
+                    |comment()[preceding-sibling::listitem]
+                    |processing-instruction()[preceding-sibling::listitem]"/>
+    </ol>
+  </div>
+</xsl:template>
+
+<xsl:template match="orderedlist/title">
+  <!-- nop -->
+</xsl:template>
+
+<xsl:template match="orderedlist/listitem">
+  <li>
+    <xsl:if test="@override">
+      <xsl:attribute name="value">
+        <xsl:value-of select="@override"/>
+      </xsl:attribute>
+    </xsl:if>
+
+    <!-- we can't just drop the anchor in since some browsers (Opera)
+         get confused about line breaks if we do. So if the first child
+         is a para, assume the para will put in the anchor. Otherwise,
+         put the anchor in anyway. -->
+    <xsl:if test="local-name(child::*[1]) != 'para'">
+      <xsl:call-template name="anchor"/>
+    </xsl:if>
+
+    <xsl:choose>
+      <xsl:when test="$show.revisionflag != 0 and @revisionflag">
+        <div class="{@revisionflag}">
+          <xsl:apply-templates/>
+        </div>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:apply-templates/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </li>
+</xsl:template>
+
+<xsl:template match="variablelist">
+  <xsl:variable name="pi-presentation">
+    <xsl:call-template name="dbhtml-attribute">
+      <xsl:with-param name="pis"
+                      select="processing-instruction('dbhtml')"/>
+      <xsl:with-param name="attribute" select="'list-presentation'"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="presentation">
+    <xsl:choose>
+      <xsl:when test="$pi-presentation != ''">
+        <xsl:value-of select="$pi-presentation"/>
+      </xsl:when>
+      <xsl:when test="$variablelist.as.table != 0">
+        <xsl:value-of select="'table'"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="'list'"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:variable name="list-width">
+    <xsl:call-template name="dbhtml-attribute">
+      <xsl:with-param name="pis"
+                      select="processing-instruction('dbhtml')"/>
+      <xsl:with-param name="attribute" select="'list-width'"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="term-width">
+    <xsl:call-template name="dbhtml-attribute">
+      <xsl:with-param name="pis"
+                      select="processing-instruction('dbhtml')"/>
+      <xsl:with-param name="attribute" select="'term-width'"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="table-summary">
+    <xsl:call-template name="dbhtml-attribute">
+      <xsl:with-param name="pis"
+                      select="processing-instruction('dbhtml')"/>
+      <xsl:with-param name="attribute" select="'table-summary'"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <div class="{name(.)}">
+    <xsl:call-template name="anchor"/>
+    <xsl:if test="title">
+      <xsl:call-template name="formal.object.heading"/>
+    </xsl:if>
+
+    <xsl:choose>
+      <xsl:when test="$presentation = 'table'">
+        <!-- Preserve order of PIs and comments -->
+        <xsl:apply-templates 
+          select="*[not(self::varlistentry
+                    or self::title
+                    or self::titleabbrev)]
+                  |comment()[not(preceding-sibling::varlistentry)]
+                  |processing-instruction()[not(preceding-sibling::varlistentry)]"/>
+        <table border="0">
+          <xsl:if test="$list-width != ''">
+            <xsl:attribute name="width">
+              <xsl:value-of select="$list-width"/>
+            </xsl:attribute>
+          </xsl:if>
+          <xsl:if test="$table-summary != ''">
+            <xsl:attribute name="summary">
+              <xsl:value-of select="$table-summary"/>
+            </xsl:attribute>
+          </xsl:if>
+          <col align="left" valign="top">
+            <xsl:if test="$term-width != ''">
+              <xsl:attribute name="width">
+                <xsl:value-of select="$term-width"/>
+              </xsl:attribute>
+            </xsl:if>
+          </col>
+          <tbody>
+            <xsl:apply-templates mode="varlist-table"
+              select="varlistentry
+                      |comment()[preceding-sibling::varlistentry]
+                      |processing-instruction()[preceding-sibling::varlistentry]"/>
+          </tbody>
+        </table>
+      </xsl:when>
+      <xsl:otherwise>
+        <!-- Preserve order of PIs and comments -->
+        <xsl:apply-templates 
+          select="*[not(self::varlistentry
+                    or self::title
+                    or self::titleabbrev)]
+                  |comment()[not(preceding-sibling::varlistentry)]
+                  |processing-instruction()[not(preceding-sibling::varlistentry)]"/>
+        <dl>
+          <xsl:apply-templates 
+              select="varlistentry
+                      |comment()[preceding-sibling::varlistentry]
+                      |processing-instruction()[preceding-sibling::varlistentry]"/>
+        </dl>
+      </xsl:otherwise>
+    </xsl:choose>
+  </div>
+</xsl:template>
+
+<xsl:template match="variablelist/title">
+  <!-- nop -->
+</xsl:template>
+
+<xsl:template match="itemizedlist/titleabbrev|orderedlist/titleabbrev">
+  <!--nop-->
+</xsl:template>
+
+<xsl:template match="variablelist/titleabbrev">
+  <!--nop-->
+</xsl:template>
+
+<xsl:template match="listitem" mode="xref">
+  <xsl:number format="1"/>
+</xsl:template>
+
+<xsl:template match="listitem/simpara" priority="2">
+  <!-- If a listitem contains only a single simpara, don't output
+       the <p> wrapper; this has the effect of creating an li
+       with simple text content. -->
+  <xsl:choose>
+    <xsl:when test="not(preceding-sibling::*)
+                    and not (following-sibling::*)">
+      <xsl:call-template name="anchor"/>
+      <xsl:apply-templates/>
+    </xsl:when>
+    <xsl:otherwise>
+      <p>
+        <xsl:if test="@role and $para.propagates.style != 0">
+          <xsl:attribute name="class">
+            <xsl:value-of select="@role"/>
+          </xsl:attribute>
+        </xsl:if>
+
+        <xsl:call-template name="anchor"/>
+        <xsl:apply-templates/>
+      </p>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="varlistentry">
+  <dt>
+    <xsl:call-template name="anchor"/>
+    <xsl:apply-templates select="term"/>
+  </dt>
+  <dd>
+    <xsl:apply-templates select="listitem"/>
+  </dd>
+</xsl:template>
+
+<xsl:template match="varlistentry" mode="varlist-table">
+  <xsl:variable name="presentation">
+    <xsl:call-template name="dbhtml-attribute">
+      <xsl:with-param name="pis"
+                      select="../processing-instruction('dbhtml')"/>
+      <xsl:with-param name="attribute" select="'term-presentation'"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="separator">
+    <xsl:call-template name="dbhtml-attribute">
+      <xsl:with-param name="pis"
+                      select="../processing-instruction('dbhtml')"/>
+      <xsl:with-param name="attribute" select="'term-separator'"/>
+    </xsl:call-template>
+  </xsl:variable>
+  <tr>
+    <xsl:call-template name="tr.attributes">
+      <xsl:with-param name="rownum">
+        <xsl:number from="variablelist" count="varlistentry"/>
+      </xsl:with-param>
+    </xsl:call-template>
+
+    <td>
+      <xsl:call-template name="anchor"/>
+      <xsl:choose>
+        <xsl:when test="$presentation = 'bold'">
+          <b>
+            <xsl:apply-templates select="term"/>
+            <xsl:value-of select="$separator"/>
+          </b>
+        </xsl:when>
+        <xsl:when test="$presentation = 'italic'">
+          <i>
+            <xsl:apply-templates select="term"/>
+            <xsl:value-of select="$separator"/>
+          </i>
+        </xsl:when>
+        <xsl:when test="$presentation = 'bold-italic'">
+          <b>
+            <i>
+              <xsl:apply-templates select="term"/>
+              <xsl:value-of select="$separator"/>
+            </i>
+          </b>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:apply-templates select="term"/>
+          <xsl:value-of select="$separator"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </td>
+    <td>
+      <xsl:apply-templates select="listitem"/>
+    </td>
+  </tr>
+</xsl:template>
+
+<xsl:template match="varlistentry/term">
+  <span class="term">
+    <xsl:call-template name="anchor"/>
+    <xsl:apply-templates/>
+    <xsl:text>, </xsl:text>
+  </span>
+</xsl:template>
+
+<xsl:template match="varlistentry/term[position()=last()]" priority="2">
+  <span class="term">
+    <xsl:call-template name="anchor"/>
+    <xsl:apply-templates/>
+  </span>
+</xsl:template>
+
+<xsl:template match="varlistentry/listitem">
+  <xsl:choose>
+    <xsl:when test="$show.revisionflag != 0 and @revisionflag">
+      <div class="{@revisionflag}">
+        <xsl:apply-templates/>
+      </div>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:apply-templates/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="simplelist">
+  <!-- with no type specified, the default is 'vert' -->
+  <xsl:call-template name="anchor"/>
+  <table class="simplelist" border="0" summary="Simple list">
+    <xsl:call-template name="simplelist.vert">
+      <xsl:with-param name="cols">
+        <xsl:choose>
+          <xsl:when test="@columns">
+            <xsl:value-of select="@columns"/>
+          </xsl:when>
+          <xsl:otherwise>1</xsl:otherwise>
+        </xsl:choose>
+      </xsl:with-param>
+    </xsl:call-template>
+  </table>
+</xsl:template>
+
+<xsl:template match="simplelist[@type='inline']">
+  <span class="{name(.)}">
+    <xsl:call-template name="anchor"/>
+    <xsl:apply-templates/>
+  </span>
+</xsl:template>
+
+<xsl:template match="simplelist[@type='horiz']">
+  <xsl:call-template name="anchor"/>
+  <table class="simplelist" border="0" summary="Simple list">
+    <xsl:call-template name="simplelist.horiz">
+      <xsl:with-param name="cols">
+        <xsl:choose>
+          <xsl:when test="@columns">
+            <xsl:value-of select="@columns"/>
+          </xsl:when>
+          <xsl:otherwise>1</xsl:otherwise>
+        </xsl:choose>
+      </xsl:with-param>
+    </xsl:call-template>
+  </table>
+</xsl:template>
+
+<xsl:template match="simplelist[@type='vert']">
+  <xsl:call-template name="anchor"/>
+  <table class="simplelist" border="0" summary="Simple list">
+    <xsl:call-template name="simplelist.vert">
+      <xsl:with-param name="cols">
+        <xsl:choose>
+          <xsl:when test="@columns">
+            <xsl:value-of select="@columns"/>
+          </xsl:when>
+          <xsl:otherwise>1</xsl:otherwise>
+        </xsl:choose>
+      </xsl:with-param>
+    </xsl:call-template>
+  </table>
+</xsl:template>
+
+<xsl:template name="simplelist.horiz">
+  <xsl:param name="cols">1</xsl:param>
+  <xsl:param name="cell">1</xsl:param>
+  <xsl:param name="members" select="./member"/>
+
+  <xsl:if test="$cell &lt;= count($members)">
+    <tr>
+      <xsl:call-template name="tr.attributes">
+        <xsl:with-param name="row" select="$members[1]"/>
+        <xsl:with-param name="rownum" select="(($cell - 1) div $cols) + 1"/>
+      </xsl:call-template>
+
+      <xsl:call-template name="simplelist.horiz.row">
+        <xsl:with-param name="cols" select="$cols"/>
+        <xsl:with-param name="cell" select="$cell"/>
+        <xsl:with-param name="members" select="$members"/>
+      </xsl:call-template>
+   </tr>
+    <xsl:call-template name="simplelist.horiz">
+      <xsl:with-param name="cols" select="$cols"/>
+      <xsl:with-param name="cell" select="$cell + $cols"/>
+      <xsl:with-param name="members" select="$members"/>
+    </xsl:call-template>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template name="simplelist.horiz.row">
+  <xsl:param name="cols">1</xsl:param>
+  <xsl:param name="cell">1</xsl:param>
+  <xsl:param name="members" select="./member"/>
+  <xsl:param name="curcol">1</xsl:param>
+
+  <xsl:if test="$curcol &lt;= $cols">
+    <td>
+      <xsl:choose>
+        <xsl:when test="$members[position()=$cell]">
+          <xsl:apply-templates select="$members[position()=$cell]"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:text>&#160;</xsl:text>
+        </xsl:otherwise>
+      </xsl:choose>
+    </td>
+    <xsl:call-template name="simplelist.horiz.row">
+      <xsl:with-param name="cols" select="$cols"/>
+      <xsl:with-param name="cell" select="$cell+1"/>
+      <xsl:with-param name="members" select="$members"/>
+      <xsl:with-param name="curcol" select="$curcol+1"/>
+    </xsl:call-template>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template name="simplelist.vert">
+  <xsl:param name="cols">1</xsl:param>
+  <xsl:param name="cell">1</xsl:param>
+  <xsl:param name="members" select="./member"/>
+  <xsl:param name="rows"
+             select="floor((count($members)+$cols - 1) div $cols)"/>
+
+  <xsl:if test="$cell &lt;= $rows">
+    <tr>
+      <xsl:call-template name="tr.attributes">
+        <xsl:with-param name="row" select="$members[1]"/>
+        <xsl:with-param name="rownum" select="$cell"/>
+      </xsl:call-template>
+
+      <xsl:call-template name="simplelist.vert.row">
+        <xsl:with-param name="cols" select="$cols"/>
+        <xsl:with-param name="rows" select="$rows"/>
+        <xsl:with-param name="cell" select="$cell"/>
+        <xsl:with-param name="members" select="$members"/>
+      </xsl:call-template>
+    </tr>
+    <xsl:call-template name="simplelist.vert">
+      <xsl:with-param name="cols" select="$cols"/>
+      <xsl:with-param name="cell" select="$cell+1"/>
+      <xsl:with-param name="members" select="$members"/>
+      <xsl:with-param name="rows" select="$rows"/>
+    </xsl:call-template>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template name="simplelist.vert.row">
+  <xsl:param name="cols">1</xsl:param>
+  <xsl:param name="rows">1</xsl:param>
+  <xsl:param name="cell">1</xsl:param>
+  <xsl:param name="members" select="./member"/>
+  <xsl:param name="curcol">1</xsl:param>
+
+  <xsl:if test="$curcol &lt;= $cols">
+    <td>
+      <xsl:choose>
+        <xsl:when test="$members[position()=$cell]">
+          <xsl:apply-templates select="$members[position()=$cell]"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:text>&#160;</xsl:text>
+        </xsl:otherwise>
+      </xsl:choose>
+    </td>
+    <xsl:call-template name="simplelist.vert.row">
+      <xsl:with-param name="cols" select="$cols"/>
+      <xsl:with-param name="rows" select="$rows"/>
+      <xsl:with-param name="cell" select="$cell+$rows"/>
+      <xsl:with-param name="members" select="$members"/>
+      <xsl:with-param name="curcol" select="$curcol+1"/>
+    </xsl:call-template>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="member">
+  <xsl:call-template name="anchor"/>
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="simplelist[@type='inline']/member">
+  <xsl:apply-templates/>
+  <xsl:text>, </xsl:text>
+</xsl:template>
+
+<xsl:template match="simplelist[@type='inline']/member[position()=last()]"
+              priority="2">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="procedure">
+  <xsl:variable name="param.placement"
+                select="substring-after(normalize-space($formal.title.placement),
+                                        concat(local-name(.), ' '))"/>
+
+  <xsl:variable name="placement">
+    <xsl:choose>
+      <xsl:when test="contains($param.placement, ' ')">
+        <xsl:value-of select="substring-before($param.placement, ' ')"/>
+      </xsl:when>
+      <xsl:when test="$param.placement = ''">before</xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$param.placement"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <!-- Preserve order of PIs and comments -->
+  <xsl:variable name="preamble"
+        select="*[not(self::step
+                  or self::title
+                  or self::titleabbrev)]
+                |comment()[not(preceding-sibling::step)]
+                |processing-instruction()[not(preceding-sibling::step)]"/>
+
+  <div class="{name(.)}">
+    <xsl:call-template name="anchor"/>
+
+    <xsl:if test="title and $placement = 'before'">
+      <xsl:call-template name="formal.object.heading"/>
+    </xsl:if>
+
+    <xsl:apply-templates select="$preamble"/>
+
+    <xsl:choose>
+      <xsl:when test="count(step) = 1">
+        <ul>
+          <xsl:apply-templates 
+            select="step
+                    |comment()[preceding-sibling::step]
+                    |processing-instruction()[preceding-sibling::step]"/>
+        </ul>
+      </xsl:when>
+      <xsl:otherwise>
+        <ol>
+          <xsl:attribute name="type">
+            <xsl:value-of select="substring($procedure.step.numeration.formats,1,1)"/>
+          </xsl:attribute>
+          <xsl:apply-templates 
+            select="step
+                    |comment()[preceding-sibling::step]
+                    |processing-instruction()[preceding-sibling::step]"/>
+        </ol>
+      </xsl:otherwise>
+    </xsl:choose>
+
+    <xsl:if test="title and $placement != 'before'">
+      <xsl:call-template name="formal.object.heading"/>
+    </xsl:if>
+  </div>
+</xsl:template>
+
+<xsl:template match="procedure/title">
+  <!-- nop -->
+</xsl:template>
+
+<xsl:template match="substeps">
+  <xsl:variable name="numeration">
+    <xsl:call-template name="procedure.step.numeration"/>
+  </xsl:variable>
+
+  <xsl:call-template name="anchor"/>
+
+  <ol type="{$numeration}">
+    <xsl:apply-templates/>
+  </ol>
+</xsl:template>
+
+<xsl:template match="step">
+  <li>
+    <xsl:call-template name="anchor"/>
+    <xsl:apply-templates/>
+  </li>
+</xsl:template>
+
+<xsl:template match="stepalternatives">
+  <xsl:call-template name="anchor"/>
+  <ul>
+    <xsl:apply-templates/>
+  </ul>
+</xsl:template>
+
+<xsl:template match="step/title">
+  <p class="title">
+    <b>
+      <xsl:apply-templates/>
+    </b>
+  </p>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="segmentedlist">
+  <xsl:variable name="presentation">
+    <xsl:call-template name="dbhtml-attribute">
+      <xsl:with-param name="pis"
+                      select="processing-instruction('dbhtml')"/>
+      <xsl:with-param name="attribute" select="'list-presentation'"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <div class="{name(.)}">
+    <xsl:call-template name="anchor"/>
+
+    <xsl:choose>
+      <xsl:when test="$presentation = 'table'">
+        <xsl:apply-templates select="." mode="seglist-table"/>
+      </xsl:when>
+      <xsl:when test="$presentation = 'list'">
+        <xsl:apply-templates/>
+      </xsl:when>
+      <xsl:when test="$segmentedlist.as.table != 0">
+        <xsl:apply-templates select="." mode="seglist-table"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:apply-templates/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </div>
+</xsl:template>
+
+<xsl:template match="segmentedlist/title">
+  <p><b><xsl:apply-templates/></b></p>
+</xsl:template>
+
+<xsl:template match="segtitle">
+</xsl:template>
+
+<xsl:template match="segtitle" mode="segtitle-in-seg">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="seglistitem">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="seg">
+  <xsl:variable name="segnum" select="count(preceding-sibling::seg)+1"/>
+  <xsl:variable name="seglist" select="ancestor::segmentedlist"/>
+  <xsl:variable name="segtitles" select="$seglist/segtitle"/>
+
+  <!--
+     Note: segtitle is only going to be the right thing in a well formed
+     SegmentedList.  If there are too many Segs or too few SegTitles,
+     you'll get something odd...maybe an error
+  -->
+
+  <p>
+    <b>
+      <xsl:apply-templates select="$segtitles[$segnum=position()]"
+                           mode="segtitle-in-seg"/>
+      <xsl:text>: </xsl:text>
+    </b>
+    <xsl:apply-templates/>
+  </p>
+</xsl:template>
+
+<xsl:template match="segmentedlist" mode="seglist-table">
+  <xsl:variable name="table-summary">
+    <xsl:call-template name="dbhtml-attribute">
+      <xsl:with-param name="pis"
+                      select="processing-instruction('dbhtml')"/>
+      <xsl:with-param name="attribute" select="'table-summary'"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="list-width">
+    <xsl:call-template name="dbhtml-attribute">
+      <xsl:with-param name="pis"
+                      select="processing-instruction('dbhtml')"/>
+      <xsl:with-param name="attribute" select="'list-width'"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:apply-templates select="title"/>
+
+  <table border="0">
+    <xsl:if test="$list-width != ''">
+      <xsl:attribute name="width">
+        <xsl:value-of select="$list-width"/>
+      </xsl:attribute>
+    </xsl:if>
+    <xsl:if test="$table-summary != ''">
+      <xsl:attribute name="summary">
+        <xsl:value-of select="$table-summary"/>
+      </xsl:attribute>
+    </xsl:if>
+    <thead>
+      <tr>
+        <xsl:call-template name="tr.attributes">
+          <xsl:with-param name="row" select="segtitle[1]"/>
+          <xsl:with-param name="rownum" select="1"/>
+        </xsl:call-template>
+        <xsl:apply-templates select="segtitle" mode="seglist-table"/>
+      </tr>
+    </thead>
+    <tbody>
+      <xsl:apply-templates select="seglistitem" mode="seglist-table"/>
+    </tbody>
+  </table>
+</xsl:template>
+
+<xsl:template match="segtitle" mode="seglist-table">
+  <th><xsl:apply-templates/></th>
+</xsl:template>
+
+<xsl:template match="seglistitem" mode="seglist-table">
+  <xsl:variable name="seglinum">
+    <xsl:number from="segmentedlist" count="seglistitem"/>
+  </xsl:variable>
+
+  <tr>
+    <xsl:call-template name="tr.attributes">
+      <xsl:with-param name="rownum" select="$seglinum + 1"/>
+    </xsl:call-template>
+    <xsl:apply-templates mode="seglist-table"/>
+  </tr>
+</xsl:template>
+
+<xsl:template match="seg" mode="seglist-table">
+  <td><xsl:apply-templates/></td>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="calloutlist">
+  <div class="{name(.)}">
+    <xsl:call-template name="anchor"/>
+    <xsl:if test="title">
+      <xsl:call-template name="formal.object.heading"/>
+    </xsl:if>
+    <xsl:choose>
+      <xsl:when test="$callout.list.table != 0">
+        <table border="0" summary="Callout list">
+          <xsl:apply-templates/>
+        </table>
+      </xsl:when>
+      <xsl:otherwise>
+        <dl compact="compact"><xsl:apply-templates/></dl>
+      </xsl:otherwise>
+    </xsl:choose>
+  </div>
+</xsl:template>
+
+<xsl:template match="calloutlist/title">
+</xsl:template>
+
+<xsl:template match="callout">
+  <xsl:choose>
+    <xsl:when test="$callout.list.table != 0">
+      <tr>
+        <xsl:call-template name="tr.attributes">
+          <xsl:with-param name="rownum">
+            <xsl:number from="calloutlist" count="callout"/>
+          </xsl:with-param>
+        </xsl:call-template>
+
+        <td width="5%" valign="top" align="left">
+          <xsl:call-template name="anchor"/>
+          <xsl:call-template name="callout.arearefs">
+            <xsl:with-param name="arearefs" select="@arearefs"/>
+          </xsl:call-template>
+        </td>
+        <td valign="top" align="left">
+          <xsl:apply-templates/>
+        </td>
+      </tr>
+    </xsl:when>
+    <xsl:otherwise>
+      <dt>
+        <xsl:call-template name="anchor"/>
+        <xsl:call-template name="callout.arearefs">
+          <xsl:with-param name="arearefs" select="@arearefs"/>
+        </xsl:call-template>
+      </dt>
+      <dd><xsl:apply-templates/></dd>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="callout/simpara" priority="2">
+  <!-- If a callout contains only a single simpara, don't output
+       the <p> wrapper; this has the effect of creating an li
+       with simple text content. -->
+  <xsl:choose>
+    <xsl:when test="not(preceding-sibling::*)
+                    and not (following-sibling::*)">
+      <xsl:call-template name="anchor"/>
+      <xsl:apply-templates/>
+    </xsl:when>
+    <xsl:otherwise>
+      <p>
+        <xsl:if test="@role and $para.propagates.style != 0">
+          <xsl:attribute name="class">
+            <xsl:value-of select="@role"/>
+          </xsl:attribute>
+        </xsl:if>
+
+        <xsl:call-template name="anchor"/>
+        <xsl:apply-templates/>
+      </p>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="callout.arearefs">
+  <xsl:param name="arearefs"></xsl:param>
+  <xsl:if test="$arearefs!=''">
+    <xsl:choose>
+      <xsl:when test="substring-before($arearefs,' ')=''">
+        <xsl:call-template name="callout.arearef">
+          <xsl:with-param name="arearef" select="$arearefs"/>
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:call-template name="callout.arearef">
+          <xsl:with-param name="arearef"
+                          select="substring-before($arearefs,' ')"/>
+        </xsl:call-template>
+      </xsl:otherwise>
+    </xsl:choose>
+    <xsl:call-template name="callout.arearefs">
+      <xsl:with-param name="arearefs"
+                      select="substring-after($arearefs,' ')"/>
+    </xsl:call-template>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template name="callout.arearef">
+  <xsl:param name="arearef"></xsl:param>
+  <xsl:variable name="targets" select="key('id',$arearef)"/>
+  <xsl:variable name="target" select="$targets[1]"/>
+
+  <xsl:call-template name="check.id.unique">
+    <xsl:with-param name="linkend" select="$arearef"/>
+  </xsl:call-template>
+
+  <xsl:choose>
+    <xsl:when test="count($target)=0">
+      <xsl:text>???</xsl:text>
+    </xsl:when>
+    <xsl:when test="local-name($target)='co'">
+      <a>
+        <xsl:attribute name="href">
+          <xsl:text>#</xsl:text>
+          <xsl:value-of select="$arearef"/>
+        </xsl:attribute>
+        <xsl:apply-templates select="$target" mode="callout-bug"/>
+      </a>
+      <xsl:text> </xsl:text>
+    </xsl:when>
+    <xsl:when test="local-name($target)='areaset'">
+      <xsl:call-template name="callout-bug">
+        <xsl:with-param name="conum">
+          <xsl:apply-templates select="$target" mode="conumber"/>
+        </xsl:with-param>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:when test="local-name($target)='area'">
+      <xsl:choose>
+        <xsl:when test="$target/parent::areaset">
+          <xsl:call-template name="callout-bug">
+            <xsl:with-param name="conum">
+              <xsl:apply-templates select="$target/parent::areaset"
+                                   mode="conumber"/>
+            </xsl:with-param>
+          </xsl:call-template>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:call-template name="callout-bug">
+            <xsl:with-param name="conum">
+              <xsl:apply-templates select="$target" mode="conumber"/>
+            </xsl:with-param>
+          </xsl:call-template>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:text>???</xsl:text>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+</xsl:stylesheet>
+

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/maketoc.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/maketoc.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/maketoc.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,83 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+		version="1.0"
+                exclude-result-prefixes="doc">
+
+<!-- ********************************************************************
+     $Id: maketoc.xsl,v 1.1.1.1 2004/10/19 21:21:47 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:import href="docbook.xsl"/>
+<xsl:import href="chunk.xsl"/>
+
+<xsl:output method="xml" indent="no" encoding='utf-8'/>
+
+<xsl:param name="toc.list.type" select="'tocentry'"/>
+
+<!-- refentry in autotoc.xsl does not use subtoc, so must
+     handle it explicitly here. -->
+<xsl:template match="refentry" mode="toc">
+  <xsl:param name="toc-context" select="."/>
+
+  <xsl:call-template name="subtoc">
+    <xsl:with-param name="toc-context" select="$toc-context"/>
+  </xsl:call-template>
+</xsl:template>
+
+
+<xsl:template name="subtoc">
+  <xsl:param name="nodes" select="NOT-AN-ELEMENT"/>
+  <xsl:variable name="filename">
+    <xsl:apply-templates select="." mode="chunk-filename"/>
+  </xsl:variable>
+
+  <xsl:variable name="chunk">
+    <xsl:call-template name="chunk"/>
+  </xsl:variable>
+
+  <xsl:if test="$chunk != 0">
+    <xsl:call-template name="indent-spaces"/>
+    <tocentry linkend="{@id}">
+      <xsl:processing-instruction name="dbhtml">
+        <xsl:text>filename="</xsl:text>
+        <xsl:value-of select="$filename"/>
+        <xsl:text>"</xsl:text>
+      </xsl:processing-instruction>
+      <xsl:text>&#xA;</xsl:text>
+      <xsl:apply-templates mode="toc" select="$nodes"/>
+      <xsl:call-template name="indent-spaces"/>
+    </tocentry>
+    <xsl:text>&#xA;</xsl:text>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template name="indent-spaces">
+  <xsl:param name="node" select="."/>
+  <xsl:text>  </xsl:text>
+  <xsl:if test="$node/parent::*">
+    <xsl:call-template name="indent-spaces">
+      <xsl:with-param name="node" select="$node/parent::*"/>
+    </xsl:call-template>
+  </xsl:if>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="/" priority="-1">
+  <xsl:text>&#xA;</xsl:text>
+  <toc role="chunk-toc">
+    <xsl:text>&#xA;</xsl:text>
+    <xsl:apply-templates select="/" mode="toc"/>
+  </toc>
+  <xsl:text>&#xA;</xsl:text>
+</xsl:template>
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/manifest.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/manifest.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/manifest.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,100 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+		version="1.0"
+                exclude-result-prefixes="doc">
+
+<!-- ********************************************************************
+     $Id: manifest.xsl,v 1.1.1.1 2004/10/19 21:21:47 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:variable name="manifest.base.dir">
+</xsl:variable>
+
+<xsl:template name="generate.manifest">
+  <xsl:param name="node" select="/"/>
+  <xsl:call-template name="write.text.chunk">
+    <xsl:with-param name="filename">
+      <xsl:if test="$manifest.in.base.dir != 0">
+        <xsl:value-of select="$base.dir"/>
+      </xsl:if>
+      <xsl:value-of select="$manifest"/>
+    </xsl:with-param>
+    <xsl:with-param name="method" select="'text'"/>
+    <xsl:with-param name="content">
+      <xsl:apply-templates select="$node" mode="enumerate-files"/>
+    </xsl:with-param>
+    <xsl:with-param name="encoding" select="$chunker.output.encoding"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="set|book|part|preface|chapter|appendix
+                     |article
+                     |reference|refentry
+                     |sect1|sect2|sect3|sect4|sect5
+                     |section
+                     |book/glossary|article/glossary
+                     |book/bibliography|article/bibliography
+                     |book/index|article/index
+                     |colophon"
+              mode="enumerate-files">
+  <xsl:variable name="ischunk"><xsl:call-template name="chunk"/></xsl:variable>
+  <xsl:if test="$ischunk='1'">
+    <xsl:call-template name="make-relative-filename">
+      <xsl:with-param name="base.dir">
+        <xsl:if test="$manifest.in.base.dir = 0">
+          <xsl:value-of select="$base.dir"/>
+        </xsl:if>
+      </xsl:with-param>
+      <xsl:with-param name="base.name">
+        <xsl:apply-templates mode="chunk-filename" select="."/>
+      </xsl:with-param>
+    </xsl:call-template>
+    <xsl:text>&#10;</xsl:text>
+  </xsl:if>
+  <xsl:apply-templates select="*" mode="enumerate-files"/>
+</xsl:template>
+
+<xsl:template match="legalnotice" mode="enumerate-files">
+  <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
+  <xsl:if test="$generate.legalnotice.link != 0">
+    <xsl:call-template name="make-relative-filename">
+      <xsl:with-param name="base.dir">
+        <xsl:if test="$manifest.in.base.dir = 0">
+          <xsl:value-of select="$base.dir"/>
+        </xsl:if>
+      </xsl:with-param>
+      <xsl:with-param name="base.name" select="concat('ln-',$id,$html.ext)"/>
+    </xsl:call-template>
+    <xsl:text>&#10;</xsl:text>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="mediaobject[imageobject] | inlinemediaobject[imageobject]" mode="enumerate-files">
+  <xsl:variable name="longdesc.uri">
+    <xsl:call-template name="longdesc.uri">
+      <xsl:with-param name="mediaobject"
+                      select="."/>
+    </xsl:call-template>
+  </xsl:variable>
+  <xsl:variable name="mediaobject" select="."/>
+
+  <xsl:if test="$html.longdesc != 0 and $mediaobject/textobject[not(phrase)]">
+    <xsl:call-template name="longdesc.uri">
+      <xsl:with-param name="mediaobject" select="$mediaobject"/>
+    </xsl:call-template>
+    <xsl:text>&#10;</xsl:text>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="text()" mode="enumerate-files">
+</xsl:template>
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/math.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/math.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/math.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,262 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: math.xsl,v 1.1.1.1 2004/10/19 21:21:47 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<xsl:template match="inlineequation">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="alt">
+</xsl:template>
+
+<!-- "Support" for MathML -->
+
+<xsl:template match="mml:*" xmlns:mml="http://www.w3.org/1998/Math/MathML">
+  <xsl:copy>
+    <xsl:copy-of select="@*"/>
+    <xsl:apply-templates/>
+  </xsl:copy>
+</xsl:template>
+
+<!-- Support for TeX math in alt -->
+
+<xsl:template match="*" mode="collect.tex.math">
+  <xsl:call-template name="write.text.chunk">
+    <xsl:with-param name="filename" select="$tex.math.file"/>
+    <xsl:with-param name="method" select="'text'"/>
+    <xsl:with-param name="content">
+      <xsl:choose>
+        <xsl:when test="$tex.math.in.alt = 'plain'">
+          <xsl:call-template name="tex.math.plain.head"/>
+          <xsl:apply-templates select="." mode="collect.tex.math.plain"/>
+          <xsl:call-template name="tex.math.plain.tail"/>
+        </xsl:when>
+        <xsl:when test="$tex.math.in.alt = 'latex'">
+          <xsl:call-template name="tex.math.latex.head"/>
+          <xsl:apply-templates select="." mode="collect.tex.math.latex"/>
+          <xsl:call-template name="tex.math.latex.tail"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:message>
+            Unsupported TeX math notation: 
+            <xsl:value-of select="$tex.math.in.alt"/>
+          </xsl:message>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:with-param>
+    <xsl:with-param name="encoding" select="$chunker.output.encoding"/>
+  </xsl:call-template>
+</xsl:template>
+
+<!-- PlainTeX -->
+
+<xsl:template name="tex.math.plain.head">
+  <xsl:text>\nopagenumbers &#xA;</xsl:text>
+</xsl:template>
+
+<xsl:template name="tex.math.plain.tail">
+  <xsl:text>\bye &#xA;</xsl:text>
+</xsl:template>
+
+<xsl:template match="inlineequation" mode="collect.tex.math.plain">
+  <xsl:variable name="filename">
+    <xsl:choose>
+      <xsl:when test="graphic">
+        <xsl:call-template name="mediaobject.filename">
+          <xsl:with-param name="object" select="graphic"/>
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:call-template name="select.mediaobject.filename">
+          <xsl:with-param name="olist" select="inlinemediaobject/*"/>
+        </xsl:call-template>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+  <xsl:variable name="output.delims">
+    <xsl:call-template name="tex.math.output.delims"/>
+  </xsl:variable>
+  <xsl:variable name="tex" select="alt[@role='tex'] | inlinemediaobject/textobject[@role='tex']"/>
+  <xsl:if test="$tex">
+    <xsl:text>\special{dvi2bitmap outputfile </xsl:text>
+    <xsl:value-of select="$filename"/>
+    <xsl:text>} &#xA;</xsl:text>
+    <xsl:if test="$output.delims != 0">
+      <xsl:text>$</xsl:text>
+    </xsl:if>
+    <xsl:value-of select="$tex"/>
+    <xsl:if test="$output.delims != 0">
+      <xsl:text>$ &#xA;</xsl:text>
+    </xsl:if>
+    <xsl:text>\vfill\eject &#xA;</xsl:text>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="equation|informalequation" mode="collect.tex.math.plain">
+  <xsl:variable name="filename">
+    <xsl:choose>
+      <xsl:when test="graphic">
+        <xsl:call-template name="mediaobject.filename">
+          <xsl:with-param name="object" select="graphic"/>
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:call-template name="select.mediaobject.filename">
+          <xsl:with-param name="olist" select="mediaobject/*"/>
+        </xsl:call-template>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+  <xsl:variable name="output.delims">
+    <xsl:call-template name="tex.math.output.delims"/>
+  </xsl:variable>
+  <xsl:variable name="tex" select="alt[@role='tex'] | mediaobject/textobject[@role='tex']"/>
+  <xsl:if test="$tex">
+    <xsl:text>\special{dvi2bitmap outputfile </xsl:text>
+    <xsl:value-of select="$filename"/>
+    <xsl:text>} &#xA;</xsl:text>
+    <xsl:if test="$output.delims != 0">
+      <xsl:text>$$</xsl:text>
+    </xsl:if>
+    <xsl:value-of select="$tex"/>
+    <xsl:if test="$output.delims != 0">
+      <xsl:text>$$ &#xA;</xsl:text>
+    </xsl:if>
+    <xsl:text>\vfill\eject &#xA;</xsl:text>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="text()" mode="collect.tex.math.plain"/>
+
+<!-- LaTeX -->
+
+<xsl:template name="tex.math.latex.head">
+  <xsl:text>\documentclass{article} &#xA;</xsl:text>
+  <xsl:text>\pagestyle{empty} &#xA;</xsl:text>
+  <xsl:text>\begin{document} &#xA;</xsl:text>
+</xsl:template>
+
+<xsl:template name="tex.math.latex.tail">
+  <xsl:text>\end{document} &#xA;</xsl:text>
+</xsl:template>
+
+<xsl:template match="inlineequation" mode="collect.tex.math.latex">
+  <xsl:variable name="filename">
+    <xsl:choose>
+      <xsl:when test="graphic">
+        <xsl:call-template name="mediaobject.filename">
+          <xsl:with-param name="object" select="graphic"/>
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:call-template name="select.mediaobject.filename">
+          <xsl:with-param name="olist" select="inlinemediaobject/*"/>
+        </xsl:call-template>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+  <xsl:variable name="output.delims">
+    <xsl:call-template name="tex.math.output.delims"/>
+  </xsl:variable>
+  <xsl:variable name="tex" select="alt[@role='tex'] | inlinemediaobject/textobject[@role='tex']"/>
+  <xsl:if test="$tex">
+    <xsl:text>\special{dvi2bitmap outputfile </xsl:text>
+    <xsl:value-of select="$filename"/>
+    <xsl:text>} &#xA;</xsl:text>
+    <xsl:if test="$output.delims != 0">  
+      <xsl:text>$</xsl:text>
+    </xsl:if>
+    <xsl:value-of select="$tex"/>
+    <xsl:if test="$output.delims != 0">  
+      <xsl:text>$ &#xA;</xsl:text>
+    </xsl:if>
+    <xsl:text>\newpage &#xA;</xsl:text>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="equation|informalequation" mode="collect.tex.math.latex">
+  <xsl:variable name="filename">
+    <xsl:choose>
+      <xsl:when test="graphic">
+        <xsl:call-template name="mediaobject.filename">
+          <xsl:with-param name="object" select="graphic"/>
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:call-template name="select.mediaobject.filename">
+          <xsl:with-param name="olist" select="mediaobject/*"/>
+        </xsl:call-template>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+  <xsl:variable name="output.delims">
+    <xsl:call-template name="tex.math.output.delims"/>
+  </xsl:variable>
+  <xsl:variable name="tex" select="alt[@role='tex'] | mediaobject/textobject[@role='tex']"/>
+  <xsl:if test="$tex">
+    <xsl:text>\special{dvi2bitmap outputfile </xsl:text>
+    <xsl:value-of select="$filename"/>
+    <xsl:text>} &#xA;</xsl:text>
+    <xsl:if test="$output.delims != 0">
+      <xsl:text>$$</xsl:text>
+    </xsl:if>
+    <xsl:value-of select="$tex"/>
+    <xsl:if test="$output.delims != 0">
+      <xsl:text>$$ &#xA;</xsl:text>
+    </xsl:if>
+    <xsl:text>\newpage &#xA;</xsl:text>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="text()" mode="collect.tex.math.latex"/>
+
+<!-- Extracting image filename from mediaobject and graphic elements -->
+
+<xsl:template name="select.mediaobject.filename">
+  <xsl:param name="olist"
+             select="imageobject|imageobjectco
+                     |videoobject|audioobject|textobject"/>
+
+  <xsl:variable name="mediaobject.index">
+    <xsl:call-template name="select.mediaobject.index">
+      <xsl:with-param name="olist" select="$olist"/>
+      <xsl:with-param name="count" select="1"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:if test="$mediaobject.index != ''">
+    <xsl:call-template name="mediaobject.filename">
+      <xsl:with-param name="object"
+                      select="$olist[position() = $mediaobject.index]"/>
+    </xsl:call-template>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template name="tex.math.output.delims">
+  <xsl:variable name="pi.delims">
+    <xsl:call-template name="pi-attribute">
+      <xsl:with-param name="pis" select=".//processing-instruction('dbtex')"/>
+      <xsl:with-param name="attribute" select="'delims'"/>
+    </xsl:call-template>
+  </xsl:variable>
+  <xsl:variable name="result">
+    <xsl:choose>
+      <xsl:when test="$pi.delims = 'no'">0</xsl:when>
+      <xsl:when test="$pi.delims = '' and $tex.math.delims = 0">0</xsl:when>
+      <xsl:otherwise>1</xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+  <xsl:value-of select="$result"/>
+</xsl:template>
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/oldchunker.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/oldchunker.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/oldchunker.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,202 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:saxon="http://icl.com/saxon"
+                xmlns:lxslt="http://xml.apache.org/xslt"
+                xmlns:xalanredirect="org.apache.xalan.xslt.extensions.Redirect"
+                xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+		version="1.1"
+                exclude-result-prefixes="doc"
+                extension-element-prefixes="saxon xalanredirect lxslt">
+
+<!-- ********************************************************************
+     $Id: oldchunker.xsl,v 1.1.1.1 2004/10/19 21:21:47 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<!-- This stylesheet works with Saxon and Xalan; for XT use xtchunker.xsl -->
+
+<!-- ==================================================================== -->
+
+<xsl:param name="default.encoding" select="'ISO-8859-1'" doc:type='string'/>
+
+<doc:param name="default.encoding" xmlns="">
+<refpurpose>Encoding used in generated HTML pages</refpurpose>
+<refdescription>
+<para>This encoding is used in files generated by chunking stylesheet. Currently
+only Saxon is able to change output encoding.
+</para>
+</refdescription>
+</doc:param>
+
+<!-- ==================================================================== -->
+
+<xsl:param name="saxon.character.representation" select="'entity;decimal'" doc:type='string'/>
+
+<doc:param name="saxon.character.representation" xmlns="">
+<refpurpose>Saxon character representation used in generated HTML pages</refpurpose>
+<refdescription>
+<para>This character representation is used in files generated by chunking stylesheet. If
+you want to suppress entity references for characters with direct representation 
+in default.encoding, set this parameter to value <literal>native</literal>. 
+</para>
+</refdescription>
+</doc:param>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="make-relative-filename">
+  <xsl:param name="base.dir" select="'./'"/>
+  <xsl:param name="base.name" select="''"/>
+
+  <xsl:variable name="vendor" select="system-property('xsl:vendor')"/>
+
+  <xsl:choose>
+    <xsl:when test="contains($vendor, 'SAXON')">
+      <!-- Saxon doesn't make the chunks relative -->
+      <xsl:value-of select="concat($base.dir,$base.name)"/>
+    </xsl:when>
+    <xsl:when test="contains($vendor, 'Apache')">
+      <!-- Xalan doesn't make the chunks relative -->
+      <xsl:value-of select="concat($base.dir,$base.name)"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:message terminate="yes">
+        <xsl:text>Chunking isn't supported with </xsl:text>
+        <xsl:value-of select="$vendor"/>
+      </xsl:message>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="write.chunk">
+  <xsl:param name="filename" select="''"/>
+  <xsl:param name="method" select="'html'"/>
+  <xsl:param name="encoding" select="$default.encoding"/>
+  <xsl:param name="indent" select="'no'"/>
+  <xsl:param name="content" select="''"/>
+
+  <xsl:message>
+    <xsl:text>Writing </xsl:text>
+    <xsl:value-of select="$filename"/>
+    <xsl:if test="name(.) != ''">
+      <xsl:text> for </xsl:text>
+      <xsl:value-of select="name(.)"/>
+      <xsl:if test="@id">
+        <xsl:text>(</xsl:text>
+        <xsl:value-of select="@id"/>
+        <xsl:text>)</xsl:text>
+      </xsl:if>
+    </xsl:if>
+  </xsl:message>
+
+  <xsl:variable name="vendor" select="system-property('xsl:vendor')"/>
+
+  <xsl:choose>
+    <xsl:when test="contains($vendor, 'SAXON 6.2')">
+      <!-- Saxon 6.2.x uses xsl:document -->
+      <xsl:document href="{$filename}"
+                    method="{$method}"
+                    encoding="{$encoding}"
+                    indent="{$indent}"
+                    saxon:character-representation="{$saxon.character.representation}">
+        <xsl:copy-of select="$content"/>
+      </xsl:document>
+    </xsl:when>
+    <xsl:when test="contains($vendor, 'SAXON')">
+      <!-- Saxon uses saxon:output -->
+      <saxon:output file="{$filename}"
+                    href="{$filename}"
+                    method="{$method}"
+                    encoding="{$encoding}"
+                    indent="{$indent}"
+                    saxon:character-representation="{$saxon.character.representation}">
+        <xsl:copy-of select="$content"/>
+      </saxon:output>
+    </xsl:when>
+    <xsl:when test="contains($vendor, 'Apache')">
+      <!-- Xalan uses xalanredirect -->
+      <xalanredirect:write file="{$filename}">
+        <xsl:copy-of select="$content"/>
+      </xalanredirect:write>
+    </xsl:when>
+    <xsl:otherwise>
+      <!-- it doesn't matter since we won't be making chunks... -->
+      <xsl:message terminate="yes">
+        <xsl:text>Can't make chunks with </xsl:text>
+        <xsl:value-of select="$vendor"/>
+        <xsl:text>'s processor.</xsl:text>
+      </xsl:message>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="write.chunk.with.doctype">
+  <xsl:param name="filename" select="''"/>
+  <xsl:param name="method" select="'html'"/>
+  <xsl:param name="encoding" select="$default.encoding"/>
+  <xsl:param name="indent" select="'no'"/>
+  <xsl:param name="doctype-public" select="''"/>
+  <xsl:param name="doctype-system" select="''"/>
+  <xsl:param name="content" select="''"/>
+
+  <xsl:message>
+    <xsl:text>Writing </xsl:text>
+    <xsl:value-of select="$filename"/>
+    <xsl:if test="name(.) != ''">
+      <xsl:text> for </xsl:text>
+      <xsl:value-of select="name(.)"/>
+    </xsl:if>
+  </xsl:message>
+
+  <xsl:variable name="vendor" select="system-property('xsl:vendor')"/>
+
+  <xsl:choose>
+    <xsl:when test="contains($vendor, 'SAXON 6.2')">
+      <!-- Saxon 6.2.x uses xsl:document -->
+      <xsl:document href="{$filename}"
+                    method="{$method}"
+                    encoding="{$encoding}"
+                    indent="{$indent}"
+                    doctype-public="{$doctype-public}"
+                    doctype-system="{$doctype-system}"
+                    saxon:character-representation="{$saxon.character.representation}">
+        <xsl:copy-of select="$content"/>
+      </xsl:document>
+    </xsl:when>
+    <xsl:when test="contains($vendor, 'SAXON')">
+      <!-- Saxon uses saxon:output -->
+      <saxon:output file="{$filename}"
+                    href="{$filename}"
+                    method="{$method}"
+                    encoding="{$encoding}"
+                    indent="{$indent}"
+                    doctype-public="{$doctype-public}"
+                    doctype-system="{$doctype-system}"
+                    saxon:character-representation="{$saxon.character.representation}">
+        <xsl:copy-of select="$content"/>
+      </saxon:output>
+    </xsl:when>
+    <xsl:when test="contains($vendor, 'Apache')">
+      <!-- Xalan uses xalanredirect -->
+      <xalanredirect:write file="{$filename}">
+        <xsl:copy-of select="$content"/>
+      </xalanredirect:write>
+    </xsl:when>
+    <xsl:otherwise>
+      <!-- it doesn't matter since we won't be making chunks... -->
+      <xsl:message terminate="yes">
+        <xsl:text>Can't make chunks with </xsl:text>
+        <xsl:value-of select="$vendor"/>
+        <xsl:text>'s processor.</xsl:text>
+      </xsl:message>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/onechunk.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/onechunk.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/onechunk.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+                version="1.0"
+                exclude-result-prefixes="doc">
+
+<!-- ********************************************************************
+     $Id: onechunk.xsl,v 1.1.1.1 2004/10/19 21:21:47 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:import href="chunk.xsl"/>
+
+<!-- Ok, using the onechunk parameter makes this all work again. -->
+<!-- It does have the disadvantage that it only works for documents that have -->
+<!-- a root element that is considered a chunk by the chunk.xsl stylesheet. -->
+<!-- Ideally, onechunk would let anything be a chunk. But not today. -->
+
+<xsl:param name="onechunk" select="1"/>
+<xsl:param name="suppress.navigation">1</xsl:param>
+
+<xsl:template name="href.target.uri">
+  <xsl:param name="object" select="."/>
+  <xsl:text>#</xsl:text>
+  <xsl:call-template name="object.id">
+    <xsl:with-param name="object" select="$object"/>
+  </xsl:call-template>
+</xsl:template>
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/param.ent
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/param.ent	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/param.ent	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,254 @@
+<!ENTITY admon.graphics SYSTEM "../params/admon.graphics.xml">
+<!ENTITY admon.graphics.extension SYSTEM "../params/admon.graphics.extension.xml">
+<!ENTITY admon.graphics.path SYSTEM "../params/admon.graphics.path.xml">
+<!ENTITY admon.textlabel SYSTEM "../params/admon.textlabel.xml">
+<!ENTITY admon.style SYSTEM "../params/admon.style.xml">
+<!ENTITY annotate.toc SYSTEM "../params/annotate.toc.xml">
+<!ENTITY appendix.autolabel SYSTEM "../params/appendix.autolabel.xml">
+<!ENTITY author.othername.in.middle SYSTEM "../params/author.othername.in.middle.xml">
+<!ENTITY autotoc.label.separator SYSTEM "../params/autotoc.label.separator.xml">
+<!ENTITY base.dir SYSTEM "../params/base.dir.xml">
+<!ENTITY biblioentry.item.separator SYSTEM "../params/biblioentry.item.separator.xml">
+<!ENTITY bibliography.collection SYSTEM "../params/bibliography.collection.xml">
+<!ENTITY bridgehead.in.toc SYSTEM "../params/bridgehead.in.toc.xml">
+<!ENTITY callout.defaultcolumn SYSTEM "../params/callout.defaultcolumn.xml">
+<!ENTITY callout.graphics SYSTEM "../params/callout.graphics.xml">
+<!ENTITY callout.graphics.extension SYSTEM "../params/callout.graphics.extension.xml">
+<!ENTITY callout.graphics.number.limit SYSTEM "../params/callout.graphics.number.limit.xml">
+<!ENTITY callout.graphics.path SYSTEM "../params/callout.graphics.path.xml">
+<!ENTITY callout.list.table SYSTEM "../params/callout.list.table.xml">
+<!ENTITY callout.unicode SYSTEM "../params/callout.unicode.xml">
+<!ENTITY callout.unicode.number.limit SYSTEM "../params/callout.unicode.number.limit.xml">
+<!ENTITY callout.unicode.start.character SYSTEM "../params/callout.unicode.start.character.xml">
+<!ENTITY callouts.extension SYSTEM "../params/callouts.extension.xml">
+<!ENTITY chapter.autolabel SYSTEM "../params/chapter.autolabel.xml">
+<!ENTITY chunk.first.sections SYSTEM "../params/chunk.first.sections.xml">
+<!ENTITY chunk.quietly SYSTEM "../params/chunk.quietly.xml">
+<!ENTITY chunk.section.depth SYSTEM "../params/chunk.section.depth.xml">
+<!ENTITY chunk.toc SYSTEM "../params/chunk.toc.xml">
+<!ENTITY chunker.output.cdata-section-elements SYSTEM "../params/chunker.output.cdata-section-elements.xml">
+<!ENTITY chunker.output.doctype-public SYSTEM "../params/chunker.output.doctype-public.xml">
+<!ENTITY chunker.output.doctype-system SYSTEM "../params/chunker.output.doctype-system.xml">
+<!ENTITY chunker.output.encoding SYSTEM "../params/chunker.output.encoding.xml">
+<!ENTITY chunker.output.indent SYSTEM "../params/chunker.output.indent.xml">
+<!ENTITY chunker.output.media-type SYSTEM "../params/chunker.output.media-type.xml">
+<!ENTITY chunker.output.method SYSTEM "../params/chunker.output.method.xml">
+<!ENTITY chunker.output.omit-xml-declaration SYSTEM "../params/chunker.output.omit-xml-declaration.xml">
+<!ENTITY chunker.output.standalone SYSTEM "../params/chunker.output.standalone.xml">
+<!ENTITY citerefentry.link SYSTEM "../params/citerefentry.link.xml">
+<!ENTITY collect.xref.targets SYSTEM "../params/collect.xref.targets.xml">
+<!ENTITY css.decoration SYSTEM "../params/css.decoration.xml">
+<!ENTITY current.docid SYSTEM "../params/current.docid.xml">
+<!ENTITY default.table.width SYSTEM "../params/default.table.width.xml">
+<!ENTITY draft.mode SYSTEM "../params/draft.mode.xml">
+<!ENTITY draft.watermark.image SYSTEM "../params/draft.watermark.image.xml">
+<!ENTITY ebnf.table.bgcolor SYSTEM "../params/ebnf.table.bgcolor.xml">
+<!ENTITY ebnf.table.border SYSTEM "../params/ebnf.table.border.xml">
+<!ENTITY emphasis.propagates.style SYSTEM "../params/emphasis.propagates.style.xml">
+<!ENTITY firstterm.only.link SYSTEM "../params/firstterm.only.link.xml">
+<!ENTITY footer.rule SYSTEM "../params/footer.rule.xml">
+<!ENTITY formal.procedures SYSTEM "../params/formal.procedures.xml">
+<!ENTITY formal.title.placement SYSTEM "../params/formal.title.placement.xml">
+<!ENTITY funcsynopsis.decoration SYSTEM "../params/funcsynopsis.decoration.xml">
+<!ENTITY funcsynopsis.style SYSTEM "../params/funcsynopsis.style.xml">
+<!ENTITY function.parens SYSTEM "../params/function.parens.xml">
+<!ENTITY generate.id.attributes SYSTEM "../params/generate.id.attributes.xml">
+<!ENTITY generate.index SYSTEM "../params/generate.index.xml">
+<!ENTITY generate.legalnotice.link SYSTEM "../params/generate.legalnotice.link.xml">
+<!ENTITY generate.manifest SYSTEM "../params/generate.manifest.xml">
+<!ENTITY generate.meta.abstract SYSTEM "../params/generate.meta.abstract.xml">
+<!ENTITY generate.section.toc.level SYSTEM "../params/generate.section.toc.level.xml">
+<!ENTITY generate.toc SYSTEM "../params/generate.toc.xml">
+<!ENTITY glossary.collection SYSTEM "../params/glossary.collection.xml">
+<!ENTITY glossterm.auto.link SYSTEM "../params/glossterm.auto.link.xml">
+<!ENTITY graphic.default.extension SYSTEM "../params/graphic.default.extension.xml">
+<!ENTITY header.rule SYSTEM "../params/header.rule.xml">
+<!ENTITY html.base SYSTEM "../params/html.base.xml">
+<!ENTITY html.cleanup SYSTEM "../params/html.cleanup.xml">
+<!ENTITY html.ext SYSTEM "../params/html.ext.xml">
+<!ENTITY html.extra.head.links SYSTEM "../params/html.extra.head.links.xml">
+<!ENTITY html.longdesc SYSTEM "../params/html.longdesc.xml">
+<!ENTITY html.longdesc.link SYSTEM "../params/html.longdesc.link.xml">
+<!ENTITY html.stylesheet SYSTEM "../params/html.stylesheet.xml">
+<!ENTITY html.stylesheet.type SYSTEM "../params/html.stylesheet.type.xml">
+<!ENTITY htmlhelp.alias.file SYSTEM "../params/htmlhelp.alias.file.xml">
+<!ENTITY htmlhelp.autolabel SYSTEM "../params/htmlhelp.autolabel.xml">
+<!ENTITY htmlhelp.button.back SYSTEM "../params/htmlhelp.button.back.xml">
+<!ENTITY htmlhelp.button.forward SYSTEM "../params/htmlhelp.button.forward.xml">
+<!ENTITY htmlhelp.button.hideshow SYSTEM "../params/htmlhelp.button.hideshow.xml">
+<!ENTITY htmlhelp.button.home SYSTEM "../params/htmlhelp.button.home.xml">
+<!ENTITY htmlhelp.button.home.url SYSTEM "../params/htmlhelp.button.home.url.xml">
+<!ENTITY htmlhelp.button.jump1 SYSTEM "../params/htmlhelp.button.jump1.xml">
+<!ENTITY htmlhelp.button.jump1.title SYSTEM "../params/htmlhelp.button.jump1.title.xml">
+<!ENTITY htmlhelp.button.jump1.url SYSTEM "../params/htmlhelp.button.jump1.url.xml">
+<!ENTITY htmlhelp.button.jump2 SYSTEM "../params/htmlhelp.button.jump2.xml">
+<!ENTITY htmlhelp.button.jump2.title SYSTEM "../params/htmlhelp.button.jump2.title.xml">
+<!ENTITY htmlhelp.button.jump2.url SYSTEM "../params/htmlhelp.button.jump2.url.xml">
+<!ENTITY htmlhelp.button.locate SYSTEM "../params/htmlhelp.button.locate.xml">
+<!ENTITY htmlhelp.button.next SYSTEM "../params/htmlhelp.button.next.xml">
+<!ENTITY htmlhelp.button.options SYSTEM "../params/htmlhelp.button.options.xml">
+<!ENTITY htmlhelp.button.prev SYSTEM "../params/htmlhelp.button.prev.xml">
+<!ENTITY htmlhelp.button.print SYSTEM "../params/htmlhelp.button.print.xml">
+<!ENTITY htmlhelp.button.refresh SYSTEM "../params/htmlhelp.button.refresh.xml">
+<!ENTITY htmlhelp.button.stop SYSTEM "../params/htmlhelp.button.stop.xml">
+<!ENTITY htmlhelp.button.zoom SYSTEM "../params/htmlhelp.button.zoom.xml">
+<!ENTITY htmlhelp.chm SYSTEM "../params/htmlhelp.chm.xml">
+<!ENTITY htmlhelp.default.topic SYSTEM "../params/htmlhelp.default.topic.xml">
+<!ENTITY htmlhelp.display.progress SYSTEM "../params/htmlhelp.display.progress.xml">
+<!ENTITY htmlhelp.encoding SYSTEM "../params/htmlhelp.encoding.xml">
+<!ENTITY htmlhelp.enhanced.decompilation SYSTEM "../params/htmlhelp.enhanced.decompilation.xml">
+<!ENTITY htmlhelp.enumerate.images SYSTEM "../params/htmlhelp.enumerate.images.xml">
+<!ENTITY htmlhelp.force.map.and.alias SYSTEM "../params/htmlhelp.force.map.and.alias.xml">
+<!ENTITY htmlhelp.hhc SYSTEM "../params/htmlhelp.hhc.xml">
+<!ENTITY htmlhelp.hhc.binary SYSTEM "../params/htmlhelp.hhc.binary.xml">
+<!ENTITY htmlhelp.hhc.folders.instead.books SYSTEM "../params/htmlhelp.hhc.folders.instead.books.xml">
+<!ENTITY htmlhelp.hhc.section.depth SYSTEM "../params/htmlhelp.hhc.section.depth.xml">
+<!ENTITY htmlhelp.hhc.show.root SYSTEM "../params/htmlhelp.hhc.show.root.xml">
+<!ENTITY htmlhelp.hhc.width SYSTEM "../params/htmlhelp.hhc.width.xml">
+<!ENTITY htmlhelp.hhp.windows SYSTEM "../params/htmlhelp.hhp.windows.xml">
+<!ENTITY htmlhelp.hhk SYSTEM "../params/htmlhelp.hhk.xml">
+<!ENTITY htmlhelp.hhp SYSTEM "../params/htmlhelp.hhp.xml">
+<!ENTITY htmlhelp.hhp.tail SYSTEM "../params/htmlhelp.hhp.tail.xml">
+<!ENTITY htmlhelp.hhp.window SYSTEM "../params/htmlhelp.hhp.window.xml">
+<!ENTITY htmlhelp.map.file SYSTEM "../params/htmlhelp.map.file.xml">
+<!ENTITY htmlhelp.only SYSTEM "../params/htmlhelp.only.xml">
+<!ENTITY htmlhelp.remember.window.position SYSTEM "../params/htmlhelp.remember.window.position.xml">
+<!ENTITY htmlhelp.show.advanced.search SYSTEM "../params/htmlhelp.show.advanced.search.xml">
+<!ENTITY htmlhelp.show.favorities SYSTEM "../params/htmlhelp.show.favorities.xml">
+<!ENTITY htmlhelp.show.menu SYSTEM "../params/htmlhelp.show.menu.xml">
+<!ENTITY htmlhelp.show.toolbar.text SYSTEM "../params/htmlhelp.show.toolbar.text.xml">
+<!ENTITY htmlhelp.title SYSTEM "../params/htmlhelp.title.xml">
+<!ENTITY htmlhelp.use.hhk SYSTEM "../params/htmlhelp.use.hhk.xml">
+<!ENTITY htmlhelp.window.geometry SYSTEM "../params/htmlhelp.window.geometry.xml">
+<!ENTITY inherit.keywords SYSTEM "../params/inherit.keywords.xml">
+<!ENTITY label.from.part SYSTEM "../params/label.from.part.xml">
+<!ENTITY linenumbering.everyNth SYSTEM "../params/linenumbering.everyNth.xml">
+<!ENTITY linenumbering.extension SYSTEM "../params/linenumbering.extension.xml">
+<!ENTITY linenumbering.separator SYSTEM "../params/linenumbering.separator.xml">
+<!ENTITY linenumbering.width SYSTEM "../params/linenumbering.width.xml">
+<!ENTITY link.mailto.url SYSTEM "../params/link.mailto.url.xml">
+<!ENTITY make.graphic.viewport SYSTEM "../params/make.graphic.viewport.xml">
+<!ENTITY make.single.year.ranges SYSTEM "../params/make.single.year.ranges.xml">
+<!ENTITY make.valid.html SYSTEM "../params/make.valid.html.xml">
+<!ENTITY make.year.ranges SYSTEM "../params/make.year.ranges.xml">
+<!ENTITY manifest SYSTEM "../params/manifest.xml">
+<!ENTITY manifest.in.base.dir SYSTEM "../params/manifest.in.base.dir.xml">
+<!ENTITY manual.toc SYSTEM "../params/manual.toc.xml">
+<!ENTITY navig.graphics SYSTEM "../params/navig.graphics.xml">
+<!ENTITY navig.graphics.extension SYSTEM "../params/navig.graphics.extension.xml">
+<!ENTITY navig.graphics.path SYSTEM "../params/navig.graphics.path.xml">
+<!ENTITY navig.showtitles SYSTEM "../params/navig.showtitles.xml">
+<!ENTITY nominal.image.depth SYSTEM "../params/nominal.image.depth.xml">
+<!ENTITY nominal.image.width SYSTEM "../params/nominal.image.width.xml">
+<!ENTITY nominal.table.width SYSTEM "../params/nominal.table.width.xml">
+<!ENTITY olink.base.uri SYSTEM "../params/olink.base.uri.xml">
+<!ENTITY olink.doctitle SYSTEM "../params/olink.doctitle.xml">
+<!ENTITY olink.fragid SYSTEM "../params/olink.fragid.xml">
+<!ENTITY olink.outline.ext SYSTEM "../params/olink.outline.ext.xml">
+<!ENTITY olink.pubid SYSTEM "../params/olink.pubid.xml">
+<!ENTITY olink.resolver SYSTEM "../params/olink.resolver.xml">
+<!ENTITY olink.sysid SYSTEM "../params/olink.sysid.xml">
+<!ENTITY part.autolabel SYSTEM "../params/part.autolabel.xml">
+<!ENTITY phrase.propagates.style SYSTEM "../params/phrase.propagates.style.xml">
+<!ENTITY pixels.per.inch SYSTEM "../params/pixels.per.inch.xml">
+<!ENTITY points.per.em SYSTEM "../params/points.per.em.xml">
+<!ENTITY preface.autolabel SYSTEM "../params/preface.autolabel.xml">
+<!ENTITY preferred.mediaobject.role SYSTEM "../params/preferred.mediaobject.role.xml">
+<!ENTITY process.empty.source.toc SYSTEM "../params/process.empty.source.toc.xml">
+<!ENTITY process.source.toc SYSTEM "../params/process.source.toc.xml">
+<!ENTITY profile.arch SYSTEM "../params/profile.arch.xml">
+<!ENTITY profile.attribute SYSTEM "../params/profile.attribute.xml">
+<!ENTITY profile.condition SYSTEM "../params/profile.condition.xml">
+<!ENTITY profile.conformance SYSTEM "../params/profile.conformance.xml">
+<!ENTITY profile.lang SYSTEM "../params/profile.lang.xml">
+<!ENTITY profile.os SYSTEM "../params/profile.os.xml">
+<!ENTITY profile.revision SYSTEM "../params/profile.revision.xml">
+<!ENTITY profile.revisionflag SYSTEM "../params/profile.revisionflag.xml">
+<!ENTITY profile.role SYSTEM "../params/profile.role.xml">
+<!ENTITY profile.security SYSTEM "../params/profile.security.xml">
+<!ENTITY profile.separator SYSTEM "../params/profile.separator.xml">
+<!ENTITY profile.userlevel SYSTEM "../params/profile.userlevel.xml">
+<!ENTITY profile.value SYSTEM "../params/profile.value.xml">
+<!ENTITY profile.vendor SYSTEM "../params/profile.vendor.xml">
+<!ENTITY punct.honorific SYSTEM "../params/punct.honorific.xml">
+<!ENTITY qanda.defaultlabel SYSTEM "../params/qanda.defaultlabel.xml">
+<!ENTITY qanda.inherit.numeration SYSTEM "../params/qanda.inherit.numeration.xml">
+<!ENTITY qandadiv.autolabel SYSTEM "../params/qandadiv.autolabel.xml">
+<!ENTITY refentry.generate.name SYSTEM "../params/refentry.generate.name.xml">
+<!ENTITY refentry.generate.title SYSTEM "../params/refentry.generate.title.xml">
+<!ENTITY refentry.separator SYSTEM "../params/refentry.separator.xml">
+<!ENTITY refentry.xref.manvolnum SYSTEM "../params/refentry.xref.manvolnum.xml">
+<!ENTITY root.filename SYSTEM "../params/root.filename.xml">
+<!ENTITY rootid SYSTEM "../params/rootid.xml">
+<!ENTITY runinhead.default.title.end.punct SYSTEM "../params/runinhead.default.title.end.punct.xml">
+<!ENTITY runinhead.title.end.punct SYSTEM "../params/runinhead.title.end.punct.xml">
+<!ENTITY saxon.character.representation SYSTEM "../params/saxon.character.representation.xml">
+<!ENTITY section.autolabel SYSTEM "../params/section.autolabel.xml">
+<!ENTITY section.label.includes.component.label SYSTEM "../params/section.label.includes.component.label.xml">
+<!ENTITY segmentedlist.as.table SYSTEM "../params/segmentedlist.as.table.xml">
+<!ENTITY shade.verbatim SYSTEM "../params/shade.verbatim.xml">
+<!ENTITY shade.verbatim.style SYSTEM "../params/shade.verbatim.style.xml">
+<!ENTITY show.comments SYSTEM "../params/show.comments.xml">
+<!ENTITY show.revisionflag SYSTEM "../params/show.revisionflag.xml">
+<!ENTITY spacing.paras SYSTEM "../params/spacing.paras.xml">
+<!ENTITY suppress.footer.navigation SYSTEM "../params/suppress.footer.navigation.xml">
+<!ENTITY suppress.header.navigation SYSTEM "../params/suppress.header.navigation.xml">
+<!ENTITY suppress.navigation SYSTEM "../params/suppress.navigation.xml">
+<!ENTITY table.borders.with.css SYSTEM "../params/table.borders.with.css.xml">
+<!ENTITY tablecolumns.extension SYSTEM "../params/tablecolumns.extension.xml">
+<!ENTITY targets.filename SYSTEM "../params/targets.filename.xml">
+<!ENTITY target.database.document SYSTEM "../params/target.database.document.xml">
+<!ENTITY tex.math.delims SYSTEM "../params/tex.math.delims.xml">
+<!ENTITY tex.math.file SYSTEM "../params/tex.math.file.xml">
+<!ENTITY tex.math.in.alt SYSTEM "../params/tex.math.in.alt.xml">
+<!ENTITY textinsert.extension SYSTEM "../params/textinsert.extension.xml">
+<!ENTITY toc.list.type SYSTEM "../params/toc.list.type.xml">
+<!ENTITY toc.section.depth SYSTEM "../params/toc.section.depth.xml">
+<!ENTITY toc.max.depth SYSTEM "../params/toc.max.depth.xml">
+<!ENTITY ulink.target SYSTEM "../params/ulink.target.xml">
+<!ENTITY use.embed.for.svg SYSTEM "../params/use.embed.for.svg.xml">
+<!ENTITY use.extensions SYSTEM "../params/use.extensions.xml">
+<!ENTITY use.id.as.filename SYSTEM "../params/use.id.as.filename.xml">
+<!ENTITY use.local.olink.style SYSTEM "../params/use.local.olink.style.xml">
+<!ENTITY use.role.as.xrefstyle SYSTEM "../params/use.role.as.xrefstyle.xml">
+<!ENTITY use.role.for.mediaobject SYSTEM "../params/use.role.for.mediaobject.xml">
+<!ENTITY use.svg SYSTEM "../params/use.svg.xml">
+<!ENTITY variablelist.as.table SYSTEM "../params/variablelist.as.table.xml">
+<!ENTITY para.propagates.style SYSTEM "../params/para.propagates.style.xml">
+<!ENTITY html.cellpadding SYSTEM "../params/html.cellpadding.xml">
+<!ENTITY html.cellspacing SYSTEM "../params/html.cellspacing.xml">
+<!ENTITY menuchoice.separator SYSTEM "../params/menuchoice.separator.xml">
+<!ENTITY menuchoice.menu.separator SYSTEM "../params/menuchoice.menu.separator.xml">
+<!ENTITY bibliography.numbered SYSTEM "../params/bibliography.numbered.xml">
+<!ENTITY chunk.tocs.and.lots SYSTEM "../params/chunk.tocs.and.lots.xml">
+<!ENTITY graphicsize.extension SYSTEM "../params/graphicsize.extension.xml">
+<!ENTITY l10n.gentext.language SYSTEM "../params/l10n.gentext.language.xml">
+<!ENTITY l10n.gentext.default.language SYSTEM "../params/l10n.gentext.default.language.xml">
+<!ENTITY l10n.gentext.use.xref.language SYSTEM "../params/l10n.gentext.use.xref.language.xml">
+<!ENTITY default.image.width SYSTEM "../params/default.image.width.xml">
+<!ENTITY default.float.class SYSTEM "../params/default.float.class.xml">
+<!ENTITY funcsynopsis.tabular.threshold SYSTEM "../params/funcsynopsis.tabular.threshold.xml">
+<!ENTITY table.cell.border.color SYSTEM "../params/table.cell.border.color.xml">
+<!ENTITY table.cell.border.style SYSTEM "../params/table.cell.border.style.xml">
+<!ENTITY table.cell.border.thickness SYSTEM "../params/table.cell.border.thickness.xml">
+<!ENTITY table.frame.border.color SYSTEM "../params/table.frame.border.color.xml">
+<!ENTITY table.frame.border.style SYSTEM "../params/table.frame.border.style.xml">
+<!ENTITY table.frame.border.thickness SYSTEM "../params/table.frame.border.thickness.xml">
+<!ENTITY ignore.image.scaling SYSTEM "../params/ignore.image.scaling.xml">
+<!ENTITY footnote.number.format SYSTEM "../params/footnote.number.format.xml">
+<!ENTITY table.footnote.number.format SYSTEM "../params/table.footnote.number.format.xml">
+<!ENTITY footnote.number.symbols SYSTEM "../params/footnote.number.symbols.xml">
+<!ENTITY table.footnote.number.symbols SYSTEM "../params/table.footnote.number.symbols.xml">
+<!ENTITY entry.propagates.style SYSTEM "../params/entry.propagates.style.xml">
+<!ENTITY glossentry.show.acronym SYSTEM "../params/glossentry.show.acronym.xml">
+<!ENTITY xref.with.number.and.title SYSTEM "../params/xref.with.number.and.title.xml">
+<!ENTITY xref.label-title.separator SYSTEM "../params/xref.label-title.separator.xml">
+<!ENTITY xref.label-page.separator SYSTEM "../params/xref.label-page.separator.xml">
+<!ENTITY xref.title-page.separator SYSTEM "../params/xref.title-page.separator.xml">
+<!ENTITY ebnf.assignment SYSTEM "../params/ebnf.assignment.xml">
+<!ENTITY ebnf.statement.terminator SYSTEM "../params/ebnf.statement.terminator.xml">
+<!ENTITY eclipse.autolabel SYSTEM "../params/eclipse.autolabel.xml">
+<!ENTITY eclipse.plugin.name SYSTEM "../params/eclipse.plugin.name.xml">
+<!ENTITY eclipse.plugin.id SYSTEM "../params/eclipse.plugin.id.xml">
+<!ENTITY eclipse.plugin.provider SYSTEM "../params/eclipse.plugin.provider.xml">
+<!ENTITY insert.xref.page.number SYSTEM "../params/insert.xref.page.number.xml">

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/param.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/param.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/param.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,7460 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE book
+  PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<book>
+<bookinfo>
+<title>HTML Parameter Reference</title>
+<releaseinfo role="meta">
+$Id: param.xml,v 1.1.1.1 2004/10/19 21:21:47 juntao Exp $
+</releaseinfo>
+<author>
+  <surname>Walsh</surname>
+  <firstname>Norman</firstname>
+</author>
+<copyright>
+  <year>1999</year>
+  <year>2000</year>
+  <year>2001</year>
+  <holder>Norman Walsh</holder>
+</copyright>
+</bookinfo>
+
+<preface><title>Introduction</title>
+
+<para>This is technical reference documentation for the DocBook XSL
+Stylesheets; it documents (some of) the parameters, templates, and
+other elements of the stylesheets.</para>
+
+<para>This reference describes each of the HTML Stylesheet parameters.
+These are the <quote>easily customizable</quote> parts of the stylesheet.
+If you want to specify an alternate value for one or more of these
+parameters, you can do so in a <quote>driver</quote> stylesheet.</para>
+
+<para>For example, if you want to change the <literal moreinfo="none">html.stylesheet</literal>
+to <filename moreinfo="none">reference.css</filename>, you might create a driver
+stylesheet like this:</para>
+
+<programlisting format="linespecific">&lt;xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                version='1.0'&gt;
+
+  &lt;xsl:import href="http://docbook.sourceforge.net/release/xsl/snapshot/html/docbook.xsl"/&gt;
+
+  &lt;xsl:param name="html.stylesheet"&gt;reference.css&lt;/xsl:param&gt;
+
+&lt;/xsl:stylesheet&gt;</programlisting>
+
+<para>Naturally, you have to change the
+<sgmltag class="attribute">href</sgmltag> attribute on
+<literal moreinfo="none">&lt;xsl:import&gt;</literal> to point to
+<filename moreinfo="none">docbook.xsl</filename> on your system. (Or
+<filename moreinfo="none">chunk.xsl</filename>, if you're using chunking.)</para>
+
+<para>This is not intended to be <quote>user</quote> documentation.
+It is provided for developers writing customization layers for the
+stylesheets, and for anyone who's interested in <quote>how it
+works</quote>.</para>
+
+<para>Although I am trying to be thorough, this documentation is known
+to be incomplete. Don't forget to read the source, too :-)</para>
+</preface>
+
+<reference><title>Admonitions</title>
+<refentry id="admon.graphics.extension">
+<refmeta>
+<refentrytitle>admon.graphics.extension</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>admon.graphics.extension</refname>
+<refpurpose>Extension for admonition graphics</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="admon.graphics.extension.frag">&lt;xsl:param name="admon.graphics.extension" select="'.png'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Sets the extension to use on admonition graphics.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="admon.graphics.path">
+<refmeta>
+<refentrytitle>admon.graphics.path</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>admon.graphics.path</refname>
+<refpurpose>Path to admonition graphics</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="admon.graphics.path.frag">&lt;xsl:param name="admon.graphics.path"&gt;images/&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Sets the path, probably relative to the directory where the HTML
+files are created, to the admonition graphics.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="admon.graphics">
+<refmeta>
+<refentrytitle>admon.graphics</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>admon.graphics</refname>
+<refpurpose>Use graphics in admonitions?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="admon.graphics.frag">
+&lt;xsl:param name="admon.graphics" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), admonitions are presented in an alternate style that uses
+a graphic.  Default graphics are provided in the distribution.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="admon.textlabel">
+<refmeta>
+<refentrytitle>admon.textlabel</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>admon.textlabel</refname>
+<refpurpose>Use text label in admonitions?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="admon.textlabel.frag">
+&lt;xsl:param name="admon.textlabel" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), admonitions are presented with a generated
+text label such as Note or Warning in the appropriate language.
+If zero, such labels are turned off, but any title child
+of the admonition element are still output.
+The default value is 1.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="admon.style">
+<refmeta>
+<refentrytitle>admon.style</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>admon.style</refname>
+<refpurpose>CSS style attributes for admonitions</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="admon.style.frag">&lt;xsl:param name="admon.style"&gt;
+  &lt;xsl:text&gt;margin-left: 0.5in; margin-right: 0.5in;&lt;/xsl:text&gt;
+&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Specifies the value of the <sgmltag class="attribute">STYLE</sgmltag>
+attribute that should be added to admonitions.
+</para>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+<reference><title>Callouts</title>
+<refentry id="callout.defaultcolumn">
+<refmeta>
+<refentrytitle>callout.defaultcolumn</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>callout.defaultcolumn</refname>
+<refpurpose>Indicates what column callouts appear in by default</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="callout.defaultcolumn.frag">&lt;xsl:param name="callout.defaultcolumn" select="'60'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If a callout does not identify a column (for example, if it uses
+the <literal moreinfo="none">linerange</literal> <sgmltag class="attribute">unit</sgmltag>),
+it will appear in the default column.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="callout.graphics.extension">
+<refmeta>
+<refentrytitle>callout.graphics.extension</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>callout.graphics.extension</refname>
+<refpurpose>Extension for callout graphics</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="callout.graphics.extension.frag">&lt;xsl:param name="callout.graphics.extension" select="'.png'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Sets the extension to use on callout graphics.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="callout.graphics.number.limit">
+<refmeta>
+<refentrytitle>callout.graphics.number.limit</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>callout.graphics.number.limit</refname>
+<refpurpose>Number of the largest callout graphic</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="callout.graphics.number.limit.frag">&lt;xsl:param name="callout.graphics.number.limit" select="'10'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If <parameter moreinfo="none">callout.graphics</parameter>
+is non-zero, graphics are used to represent
+callout numbers. The value of
+<parameter moreinfo="none">callout.graphics.number.limit</parameter>
+is
+the largest number for which a graphic exists. If the callout number
+exceeds this limit, the default presentation "(nnn)" will always
+be used.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="callout.graphics.path">
+<refmeta>
+<refentrytitle>callout.graphics.path</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>callout.graphics.path</refname>
+<refpurpose>Path to callout graphics</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="callout.graphics.path.frag">
+&lt;xsl:param name="callout.graphics.path" select="'images/callouts/'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Sets the path, probably relative to the directory where the HTML
+files are created, to the callout graphics.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="callout.graphics">
+<refmeta>
+<refentrytitle>callout.graphics</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>callout.graphics</refname>
+<refpurpose>Use graphics for callouts?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="callout.graphics.frag">
+&lt;xsl:param name="callout.graphics" select="'1'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, callouts are presented with graphics (e.g., reverse-video
+circled numbers instead of "(1)", "(2)", etc.).
+Default graphics are provided in the distribution.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="callout.list.table">
+<refmeta>
+<refentrytitle>callout.list.table</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>callout.list.table</refname>
+<refpurpose>Present callout lists using a table?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="callout.list.table.frag">&lt;xsl:param name="callout.list.table" select="'1'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The default presentation of <sgmltag>CalloutList</sgmltag>s uses
+an HTML <sgmltag>DL</sgmltag>. Some browsers don't align DLs very well
+if <parameter moreinfo="none">callout.graphics</parameter> are used. With this option
+turned on, <sgmltag>CalloutList</sgmltag>s are presented in an HTML
+<sgmltag>TABLE</sgmltag>, which usually results in better alignment
+of the callout number with the callout description.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="callout.unicode.number.limit">
+<refmeta>
+<refentrytitle>callout.unicode.number.limit</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>callout.unicode.number.limit</refname>
+<refpurpose>Number of the largest callout graphic</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="callout.unicode.number.limit.frag">&lt;xsl:param name="callout.unicode.number.limit" select="'10'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If <parameter moreinfo="none">callout.unicode</parameter>
+is non-zero, unicode characters are used to represent
+callout numbers. The value of
+<parameter moreinfo="none">callout.unicode.number.limit</parameter>
+is
+the largest number for which a unicode character exists. If the callout number
+exceeds this limit, the default presentation "(nnn)" will always
+be used.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="callout.unicode.start.character">
+<refmeta>
+<refentrytitle>callout.unicode.start.character</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>callout.unicode.start.character</refname>
+<refpurpose>First Unicode character to use, decimal value.</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="callout.unicode.start.character.frag">&lt;xsl:param name="callout.unicode.start.character" select="10102"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If <parameter moreinfo="none">callout.graphics</parameter> is zero and <parameter moreinfo="none">callout.unicode</parameter>
+is non-zero, unicode characters are used to represent
+callout numbers. The value of
+<parameter moreinfo="none">callout.unicode.start.character</parameter>
+is the decimal unicode value used for callout number one. Currently, 
+only 10102 is supported in the stylesheets for this parameter. 
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="callout.unicode">
+<refmeta>
+<refentrytitle>callout.unicode</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>callout.unicode</refname>
+<refpurpose>Use Unicode characters rather than images for callouts.</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="callout.unicode.frag">&lt;xsl:param name="callout.unicode" select="0"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The stylesheets can use either an image of the numbers one to ten, or the single Unicode character which represents the numeral, in white on a black background. Use this to select the Unicode character option.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="callouts.extension">
+<refmeta>
+<refentrytitle>callouts.extension</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>callouts.extension</refname>
+<refpurpose>Enable the callout extension</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="callouts.extension.frag">&lt;xsl:param name="callouts.extension" select="'1'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The callouts extension processes <sgmltag>areaset</sgmltag>
+elements in <sgmltag>ProgramListingCO</sgmltag> and other text-based
+callout elements.
+</para>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+<reference><title>EBNF</title>
+<refentry id="ebnf.table.bgcolor">
+<refmeta>
+<refentrytitle>ebnf.table.bgcolor</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>ebnf.table.bgcolor</refname>
+<refpurpose>Background color for EBNF tables</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="ebnf.table.bgcolor.frag">&lt;xsl:param name="ebnf.table.bgcolor" select="'#F5DCB3'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Sets the background color for EBNF tables. No <sgmltag>bgcolor</sgmltag>
+attribute is output if <varname>ebnf.table.bgcolor</varname> is set to
+the null string. The default value matches the value used in recent
+online versions of the W3C's XML Spec productions.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="ebnf.table.border">
+<refmeta>
+<refentrytitle>ebnf.table.border</refentrytitle>
+<refmiscinfo role="type"/>
+</refmeta>
+<refnamediv>
+<refname>ebnf.table.border</refname>
+<refpurpose>Selects border on EBNF tables</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="ebnf.table.border.frag">&lt;xsl:param name="ebnf.table.border" select="1"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Selects the border on EBNF tables. If non-zero, the tables have
+borders, otherwise they don't.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="ebnf.assignment">
+<refmeta>
+<refentrytitle>ebnf.assignment</refentrytitle>
+<refmiscinfo role="type">rtf</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>ebnf.assignment</refname>
+<refpurpose>The EBNF production assignment operator</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="ebnf.assignment.frag">
+&lt;xsl:param name="ebnf.assignment"&gt;
+&lt;tt&gt;::=&lt;/tt&gt;
+&lt;/xsl:param&gt;
+
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The <parameter moreinfo="none">ebnf.assignment</parameter> parameter determines what
+text is used to show <quote>assignment</quote> in <sgmltag>production</sgmltag>s
+in <sgmltag>productionset</sgmltag>s.</para>
+
+<para>While <quote><literal moreinfo="none">::=</literal></quote> is common, so are several
+other operators.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="ebnf.statement.terminator">
+<refmeta>
+<refentrytitle>ebnf.statement.terminator</refentrytitle>
+<refmiscinfo role="type">rtf</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>ebnf.statement.terminator</refname>
+<refpurpose>Punctuation that ends an EBNF statement.</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="ebnf.statement.terminator.frag">
+&lt;xsl:param name="ebnf.statement.terminator"&gt;&lt;/xsl:param&gt;
+
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The <parameter moreinfo="none">ebnf.statement.terminator</parameter> parameter determines what
+text is used to terminate each <sgmltag>production</sgmltag>
+in <sgmltag>productionset</sgmltag>.</para>
+
+<para>Some notations end each statement with a period.</para>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+<reference><title>ToC/LoT/Index Generation</title>
+<refentry id="annotate.toc">
+<refmeta>
+<refentrytitle>annotate.toc</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>annotate.toc</refname>
+<refpurpose>Annotate the Table of Contents?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="annotate.toc.frag">&lt;xsl:param name="annotate.toc" select="1"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true, TOCs will be annotated. At present, this just means
+that the <sgmltag>RefPurpose</sgmltag> of <sgmltag>RefEntry</sgmltag>
+TOC entries will be displayed.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="autotoc.label.separator">
+<refmeta>
+<refentrytitle>autotoc.label.separator</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>autotoc.label.separator</refname>
+<refpurpose>Separator between labels and titles in the ToC</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="autotoc.label.separator.frag">&lt;xsl:param name="autotoc.label.separator" select="'. '"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>String to use to seperate labels and title in a table of contents.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="process.source.toc">
+<refmeta>
+<refentrytitle>process.source.toc</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>process.source.toc</refname>
+<refpurpose>FIXME:</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="process.source.toc.frag">&lt;xsl:param name="process.source.toc" select="0"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="process.empty.source.toc">
+<refmeta>
+<refentrytitle>process.empty.source.toc</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>process.empty.source.toc</refname>
+<refpurpose>FIXME:</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="process.empty.source.toc.frag">&lt;xsl:param name="process.empty.source.toc" select="0"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="bridgehead.in.toc">
+<refmeta>
+<refentrytitle>bridgehead.in.toc</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>bridgehead.in.toc</refname>
+<refpurpose>Should bridgehead elements appear in the TOC?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="bridgehead.in.toc.frag">&lt;xsl:param name="bridgehead.in.toc" select="0"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, bridgeheads appear in the TOC. Note that this option
+is not fully supported and may be removed in a future version of the
+stylesheets.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="manual.toc">
+<refmeta>
+<refentrytitle>manual.toc</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>manual.toc</refname>
+<refpurpose>An explicit TOC to be used for the TOC</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="manual.toc.frag">
+&lt;xsl:param name="manual.toc" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The <parameter moreinfo="none">manual.toc</parameter> identifies an explicit TOC that
+will be used for building the printed TOC.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="toc.list.type">
+<refmeta>
+<refentrytitle>toc.list.type</refentrytitle>
+<refmiscinfo role="type">list</refmiscinfo>
+<refmiscinfo role="value">dl</refmiscinfo>
+<refmiscinfo role="value">ul</refmiscinfo>
+<refmiscinfo role="value">ol</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>toc.list.type</refname>
+<refpurpose>Type of HTML list element to use for Tables of Contents</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="toc.list.type.frag">&lt;xsl:param name="toc.list.type"&gt;dl&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>When an automatically generated Table of Contents (or List of Titles)
+is produced, this HTML element will be used to make the list.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="toc.section.depth">
+<refmeta>
+<refentrytitle>toc.section.depth</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>toc.section.depth</refname>
+<refpurpose>How deep should recursive <sgmltag>section</sgmltag>s appear
+in the TOC?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="toc.section.depth.frag">&lt;xsl:param name="toc.section.depth"&gt;2&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Specifies the depth to which recursive sections should appear in the
+TOC.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="toc.max.depth">
+<refmeta>
+<refentrytitle>toc.max.depth</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>toc.max.depth</refname>
+<refpurpose>How maximaly deep should be each TOC?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="toc.max.depth.frag">&lt;xsl:param name="toc.max.depth"&gt;8&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Specifies the maximal depth of TOC on all levels.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="generate.toc">
+<refmeta>
+<refentrytitle>generate.toc</refentrytitle>
+<refmiscinfo role="type">table</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>generate.toc</refname>
+<refpurpose>Control generation of ToCs and LoTs</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="generate.toc.frag">
+&lt;xsl:param name="generate.toc"&gt;
+appendix  toc,title
+article/appendix  nop
+article   toc,title
+book      toc,title,figure,table,example,equation
+chapter   toc,title
+part      toc,title
+preface   toc,title
+qandadiv  toc
+qandaset  toc
+reference toc,title
+sect1     toc
+sect2     toc
+sect3     toc
+sect4     toc
+sect5     toc
+section   toc
+set       toc,title
+&lt;/xsl:param&gt;
+
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This parameter has a structured value. It is a table of space-delimited
+path/value pairs. Each path identifies some element in the source document
+using a restricted subset of XPath (only the implicit child axis, no wildcards,
+no predicates). Paths can be either relative or absolute.</para>
+
+<para>When processing a particular element, the stylesheets consult this table to
+determine if a ToC (or LoT(s)) should be generated.</para>
+
+<para>For example, consider the entry:</para>
+
+<screen format="linespecific">book toc,figure</screen>
+
+<para>This indicates that whenever a <sgmltag>book</sgmltag> is formatted, a
+Table Of Contents and a List of Figures should be generated. Similarly,</para>
+
+<screen format="linespecific">/chapter toc</screen>
+
+<para>indicates that whenever a document <emphasis>that has a root
+of</emphasis> <sgmltag>chapter</sgmltag> is formatted, a Table of
+Contents should be generated. The entry <literal moreinfo="none">chapter</literal> would match
+all chapters, but <literal moreinfo="none">/chapter</literal> matches only <sgmltag>chapter</sgmltag>
+document elements.</para>
+
+<para>Generally, the longest match wins. So, for example, if you want to distinguish
+articles in books from articles in parts, you could use these two entries:</para>
+
+<screen format="linespecific">book/article toc,figure
+part/article toc</screen>
+
+<para>Note that an article in a part can never match a <literal moreinfo="none">book/article</literal>,
+so if you want nothing to be generated for articles in parts, you can simply leave
+that rule out.</para>
+
+<para>If you want to leave the rule in, to make it explicit that you're turning
+something off, use the value <quote>nop</quote>. For example, the following
+entry disables ToCs and LoTs for articles:</para>
+
+<screen format="linespecific">article nop</screen>
+
+<para>Do not simply leave the word <quote>article</quote> in the file
+without a matching value. That'd be just begging the silly little
+path/value parser to get confused.</para>
+
+<para>Section ToCs are further controlled by the
+<parameter moreinfo="none">generate.section.toc.level</parameter> parameter.
+For a given section level to have a ToC, it must have both an entry in 
+<parameter moreinfo="none">generate.toc</parameter> and be within the range enabled by
+<parameter moreinfo="none">generate.section.toc.level</parameter>.</para>
+</refsect1>
+</refentry>
+
+<refentry id="generate.section.toc.level">
+<refmeta>
+<refentrytitle>generate.section.toc.level</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>generate.section.toc.level</refname>
+<refpurpose>Control depth of TOC generation in sections</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="generate.section.toc.level.frag">
+&lt;xsl:param name="generate.section.toc.level" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The <parameter moreinfo="none">generate.section.toc.level</parameter> parameter
+controls the depth of section in which TOCs will be generated. Note
+that this is related to, but not the same as
+<parameter moreinfo="none">toc.section.depth</parameter>, which controls the depth to
+which TOC entries will be generated in a given TOC.</para>
+<para>If, for example, <parameter moreinfo="none">generate.section.toc.level</parameter>
+is <literal moreinfo="none">3</literal>, TOCs will be generated in first, second, and third
+level sections, but not in fourth level sections.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="generate.index">
+<refmeta>
+<refentrytitle>generate.index</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>generate.index</refname>
+<refpurpose>Do you want an index?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="generate.index.frag">&lt;xsl:param name="generate.index" select="1"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Specify if an index should be generated. </para>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+<reference><title>Extensions</title>
+<refentry id="linenumbering.everyNth">
+<refmeta>
+<refentrytitle>linenumbering.everyNth</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>linenumbering.everyNth</refname>
+<refpurpose>Indicate which lines should be numbered</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="linenumbering.everyNth.frag">&lt;xsl:param name="linenumbering.everyNth" select="'5'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If line numbering is enabled, everyNth line will be numbered.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="linenumbering.extension">
+<refmeta>
+<refentrytitle>linenumbering.extension</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>linenumbering.extension</refname>
+<refpurpose>Enable the line numbering extension</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="linenumbering.extension.frag">&lt;xsl:param name="linenumbering.extension" select="'1'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true, verbatim environments (elements that have the
+format='linespecific' notation attribute: address, literallayout,
+programlisting, screen, synopsis) that specify line numbering will
+have, surprise, line numbers.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="linenumbering.separator">
+<refmeta>
+<refentrytitle>linenumbering.separator</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>linenumbering.separator</refname>
+<refpurpose>Specify a separator between line numbers and lines</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="linenumbering.separator.frag">&lt;xsl:param name="linenumbering.separator" select="' '"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The separator is inserted between line numbers and lines in
+the verbatim environment.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="linenumbering.width">
+<refmeta>
+<refentrytitle>linenumbering.width</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>linenumbering.width</refname>
+<refpurpose>Indicates the width of line numbers</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="linenumbering.width.frag">&lt;xsl:param name="linenumbering.width" select="'3'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If line numbering is enabled, line numbers will appear right
+justified in a field "width" characters wide.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="tablecolumns.extension">
+<refmeta>
+<refentrytitle>tablecolumns.extension</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>tablecolumns.extension</refname>
+<refpurpose>Enable the table columns extension function</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="tablecolumns.extension.frag">&lt;xsl:param name="tablecolumns.extension" select="'1'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The table columns extension function adjusts the widths of table
+columns in the HTML result to more accurately reflect the specifications
+in the CALS table.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="textinsert.extension">
+<refmeta>
+<refentrytitle>textinsert.extension</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>textinsert.extension</refname>
+<refpurpose>Enable the textinsert extension element</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="textinsert.extension.frag">&lt;xsl:param name="textinsert.extension" select="'1'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The textinsert extension element inserts the contents of a
+a file into the result tree (as text).
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="graphicsize.extension">
+<refmeta>
+<refentrytitle>graphicsize.extension</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>graphicsize.extension</refname>
+<refpurpose>Enable the getWidth()/getDepth() extension functions</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="graphicsize.extension.frag">
+&lt;xsl:param name="graphicsize.extension" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero (and if <parameter moreinfo="none">use.extensions</parameter> is non-zero
+and if you're using a processor that supports extension functions), the
+<function moreinfo="none">getWidth</function> and <function moreinfo="none">getDepth</function> functions
+will be used to extract image sizes from graphics.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="use.extensions">
+<refmeta>
+<refentrytitle>use.extensions</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>use.extensions</refname>
+<refpurpose>Enable extensions</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="use.extensions.frag">&lt;xsl:param name="use.extensions" select="'0'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, extensions may be used. Each extension is
+further controlled by its own parameter. But if
+<parameter moreinfo="none">use.extensions</parameter> is zero, no extensions will
+be used.
+</para>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+<reference><title>Automatic labelling</title>
+<refentry id="chapter.autolabel">
+<refmeta>
+<refentrytitle>chapter.autolabel</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>chapter.autolabel</refname>
+<refpurpose>Are chapters automatically enumerated?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="chapter.autolabel.frag">&lt;xsl:param name="chapter.autolabel" select="1"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), unlabeled chapters will be enumerated.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="appendix.autolabel">
+<refmeta>
+<refentrytitle>appendix.autolabel</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>appendix.autolabel</refname>
+<refpurpose>Are Appendixes automatically enumerated?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="appendix.autolabel.frag">&lt;xsl:param name="appendix.autolabel" select="1"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), unlabeled appendixes will be
+enumerated.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="part.autolabel">
+<refmeta>
+<refentrytitle>part.autolabel</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>part.autolabel</refname>
+<refpurpose>Are parts and references enumerated?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="part.autolabel.frag">&lt;xsl:param name="part.autolabel" select="1"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), unlabeled parts and references will be enumerated.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="preface.autolabel">
+<refmeta>
+<refentrytitle>preface.autolabel</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>preface.autolabel</refname>
+<refpurpose>Are prefaces enumerated?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="preface.autolabel.frag">&lt;xsl:param name="preface.autolabel" select="0"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), unlabeled prefaces will be enumerated.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="qandadiv.autolabel">
+<refmeta>
+<refentrytitle>qandadiv.autolabel</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>qandadiv.autolabel</refname>
+<refpurpose>Are divisions in QAndASets enumerated?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="qandadiv.autolabel.frag">&lt;xsl:param name="qandadiv.autolabel" select="1"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), unlabeled qandadivs will be enumerated.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="section.autolabel">
+<refmeta>
+<refentrytitle>section.autolabel</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>section.autolabel</refname>
+<refpurpose>Are sections enumerated?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="section.autolabel.frag">&lt;xsl:param name="section.autolabel" select="0"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), unlabeled sections will be enumerated.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="section.label.includes.component.label">
+<refmeta>
+<refentrytitle>section.label.includes.component.label</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>section.label.includes.component.label</refname>
+<refpurpose>Do section labels include the component label?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="section.label.includes.component.label.frag">&lt;xsl:param name="section.label.includes.component.label" select="0"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), section labels are prefixed with the label of the
+component that contains them.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="label.from.part">
+<refmeta>
+<refentrytitle>label.from.part</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>label.from.part</refname>
+<refpurpose>Renumber chapters in each part?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="label.from.part.frag">&lt;xsl:param name="label.from.part" select="'0'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If <parameter moreinfo="none">label.from.part</parameter> is non-zero, components
+(<sgmltag>chapter</sgmltag>s, <sgmltag>appendixe</sgmltag>s, etc.)
+will be numbered from 1 in each <sgmltag>part</sgmltag>. Otherwise,
+they will be numbered monotonically throughout each
+<sgmltag>book</sgmltag>.
+</para>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+
+
+<reference><title>HTML</title>
+<refentry id="html.base">
+<refmeta>
+<refentrytitle>html.base</refentrytitle>
+<refmiscinfo role="type">uri</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>html.base</refname>
+<refpurpose>An HTML base URI</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="html.base.frag">&lt;xsl:param name="html.base"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If html.base is set, it is used for the <sgmltag>BASE</sgmltag>
+element in the <sgmltag>HEAD</sgmltag> of the HTML documents.
+This is useful for dynamically served HTML where the base URI needs
+to be shifted.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="html.stylesheet.type">
+<refmeta>
+<refentrytitle>html.stylesheet.type</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>html.stylesheet.type</refname>
+<refpurpose>The type of the stylesheet used in the generated HTML</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="html.stylesheet.type.frag">&lt;xsl:param name="html.stylesheet.type"&gt;text/css&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The type of the stylesheet to place in the HTML <sgmltag>link</sgmltag> tag.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="html.stylesheet">
+<refmeta>
+<refentrytitle>html.stylesheet</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>html.stylesheet</refname>
+<refpurpose>Name of the stylesheet(s) to use in the generated HTML</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="html.stylesheet.frag">
+&lt;xsl:param name="html.stylesheet" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The <parameter moreinfo="none">html.stylesheet</parameter> parameter is either empty,
+indicating that no stylesheet <sgmltag>LINK</sgmltag> tag should be generated
+in the HTML output, or it is a list of one or more stylesheets.</para>
+
+<para>Multiple stylesheets are space-delimited. If you need to
+reference a stylesheet URI that includes a space, encode it with
+<literal moreinfo="none">%20</literal>. A seprate HTML <sgmltag>LINK</sgmltag> element will
+be generated for each stylesheet in the order they are listed in the
+parameter.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="use.id.as.filename">
+<refmeta>
+<refentrytitle>use.id.as.filename</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>use.id.as.filename</refname>
+<refpurpose>Use ID value of chunk elements as the filename?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="use.id.as.filename.frag">&lt;xsl:param name="use.id.as.filename" select="'0'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If <parameter moreinfo="none">use.id.as.filename</parameter>
+is non-zero, the filename of chunk elements that have IDs will be
+derived from the ID value.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="css.decoration">
+<refmeta>
+<refentrytitle>css.decoration</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>css.decoration</refname>
+<refpurpose>Enable CSS decoration of elements</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="css.decoration.frag">
+&lt;xsl:param name="css.decoration" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>
+If <literal moreinfo="none">css.decoration</literal> is turned on, then HTML elements
+produced by the
+stylesheet may be decorated with STYLE attributes.  For example, the
+LI tags produced for list items may include a fragment of CSS in the
+STYLE attribute which sets the CSS property "list-style-type".
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="spacing.paras">
+<refmeta>
+<refentrytitle>spacing.paras</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>spacing.paras</refname>
+<refpurpose>Insert additional &lt;p&gt; elements for spacing?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="spacing.paras.frag">&lt;xsl:param name="spacing.paras" select="'0'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>When non-zero, additional, empty paragraphs are inserted in
+several contexts (for example, around informal figures), to create a
+more pleasing visual appearance in many browsers.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="emphasis.propagates.style">
+<refmeta>
+<refentrytitle>emphasis.propagates.style</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>emphasis.propagates.style</refname>
+<refpurpose>Pass emphasis role attribute through to HTML?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="emphasis.propagates.style.frag">
+&lt;xsl:param name="emphasis.propagates.style" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true, the role attribute of <sgmltag>emphasis</sgmltag> elements
+will be passed through to the HTML as a class attribute on a
+<sgmltag>span</sgmltag> that surrounds the emphasis.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="para.propagates.style">
+<refmeta>
+<refentrytitle>para.propagates.style</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>para.propagates.style</refname>
+<refpurpose>Pass para role attribute through to HTML?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="para.propagates.style.frag">
+&lt;xsl:param name="para.propagates.style" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true, the role attribute of <sgmltag>para</sgmltag> elements
+will be passed through to the HTML as a class attribute on the
+<sgmltag>p</sgmltag> generated for the paragraph.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="phrase.propagates.style">
+<refmeta>
+<refentrytitle>phrase.propagates.style</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>phrase.propagates.style</refname>
+<refpurpose>Pass phrase role attribute through to HTML?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="phrase.propagates.style.frag">&lt;xsl:param name="phrase.propagates.style" select="1"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true, the role attribute of <sgmltag>phrase</sgmltag> elements
+will be passed through to the HTML as a class attribute on a
+<sgmltag>span</sgmltag> that surrounds the phrase.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="entry.propagates.style">
+<refmeta>
+<refentrytitle>entry.propagates.style</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>entry.propagates.style</refname>
+<refpurpose>Pass entry role attribute through to HTML?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="entry.propagates.style.frag">
+&lt;xsl:param name="entry.propagates.style" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true, the role attribute of <sgmltag>entry</sgmltag> elements
+will be passed through to the HTML as a class attribute on the
+<sgmltag>td</sgmltag> or <sgmltag>th</sgmltag> generated for the table
+cell.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="html.longdesc">
+<refmeta>
+<refentrytitle>html.longdesc</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>html.longdesc</refname>
+<refpurpose>Should longdesc URIs be created?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="html.longdesc.frag">
+&lt;xsl:param name="html.longdesc" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, HTML files will be created for the
+<sgmltag class="attribute">longdesc</sgmltag> attribute. These files
+are created from the <sgmltag>textobject</sgmltag>s in
+<sgmltag>mediaobject</sgmltag>s and
+<sgmltag>inlinemediaobject</sgmltag>.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="html.longdesc.link">
+<refmeta>
+<refentrytitle>html.longdesc.link</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>html.longdesc.link</refname>
+<refpurpose>Should a link to the longdesc be included in the HTML?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="html.longdesc.link.frag">
+&lt;xsl:param name="html.longdesc.link" select="$html.longdesc"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, links will be created to the
+HTML files created for the
+<sgmltag class="attribute">longdesc</sgmltag> attribute. It makes no
+sense to turn enable this option without also enabling the
+<parameter moreinfo="none">$html.longdesc</parameter> parameter.</para>
+
+<para>The <literal moreinfo="none">longdesc.link</literal> named template is called
+to construct the link.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="make.valid.html">
+<refmeta>
+<refentrytitle>make.valid.html</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>make.valid.html</refname>
+<refpurpose>Attempt to make sure the HTML output is valid HTML</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="make.valid.html.frag">
+&lt;xsl:param name="make.valid.html" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If <parameter moreinfo="none">make.valid.html</parameter> is true, the stylesheets take
+extra effort to ensure that the resulting HTML is valid. This may mean that some
+<sgmltag>para</sgmltag> tags are translated into HTML <sgmltag>div</sgmltag>s or
+that other substitutions occur.</para>
+
+<para>This parameter is different from <parameter moreinfo="none">html.cleanup</parameter>
+because it changes the resulting markup; it does not use extension functions
+to manipulate result-tree-fragments and is therefore applicable to any
+XSLT processor.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="html.cleanup">
+<refmeta>
+<refentrytitle>html.cleanup</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>html.cleanup</refname>
+<refpurpose>Attempt to clean up the resulting HTML?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="html.cleanup.frag">
+&lt;xsl:param name="html.cleanup" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, and if the <ulink url="http://www.exslt.org/">EXSLT</ulink>
+extensions are supported by your processor, the resulting HTML will be
+<quote>cleaned up</quote>. This improves the chances that the
+resulting HTML will be valid. It may also improve the formatting of
+some elements.</para>
+
+<para>This parameter is different from <parameter moreinfo="none">make.valid.html</parameter>
+because it uses extension functions to manipulate result-tree-fragments.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="draft.mode">
+<refmeta>
+<refentrytitle>draft.mode</refentrytitle>
+<refmiscinfo role="type">list</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>draft.mode</refname>
+<refpurpose>Select draft mode</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="draft.mode.frag">
+&lt;xsl:param name="draft.mode" select="'maybe'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Selects draft mode. If <parameter moreinfo="none">draft.mode</parameter> is
+<quote><literal moreinfo="none">yes</literal></quote>, the entire document will be treated
+as a draft. If it is <quote><literal moreinfo="none">no</literal></quote>, the entire document
+will be treated as a final copy. If it is <quote><literal moreinfo="none">maybe</literal></quote>,
+individual sections will be treated as draft or final independently, depending
+on how their <sgmltag class="attribute">status</sgmltag> attribute is set.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="draft.watermark.image">
+<refmeta>
+<refentrytitle>draft.watermark.image</refentrytitle>
+<refmiscinfo role="type">uri</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>draft.watermark.image</refname>
+<refpurpose>The URI of the image to be used for draft watermarks</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="draft.watermark.image.frag">
+&lt;xsl:param name="draft.watermark.image" select="'http://docbook.sourceforge.net/release/images/draft.png'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The image to be used for draft watermarks.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="generate.id.attributes">
+<refmeta>
+<refentrytitle>generate.id.attributes</refentrytitle>
+<refmiscinfo role="type"/>
+</refmeta>
+<refnamediv>
+<refname>generate.id.attributes</refname>
+<refpurpose/>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="generate.id.attributes.frag">
+&lt;xsl:param name="generate.id.attributes" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, the HTML stylesheet will generate ID attributes on
+containers. For example, the markup:</para>
+
+<screen format="linespecific">&lt;section id="foo"&gt;&lt;title&gt;Some Title&lt;/title&gt;
+&lt;para&gt;Some para.&lt;/para&gt;
+&lt;/section&gt;</screen>
+
+<para>might produce:</para>
+
+<screen format="linespecific">&lt;div class="section" id="foo"&gt;
+&lt;h2&gt;Some Title&lt;/h2&gt;
+&lt;p&gt;Some para.&lt;/p&gt;
+&lt;/div&gt;</screen>
+
+<para>The alternative is to generate anchors:</para>
+
+<screen format="linespecific">&lt;div class="section"&gt;
+&lt;h2&gt;&lt;a name="foo"&gt;&lt;/a&gt;Some Title&lt;/h2&gt;
+&lt;p&gt;Some para.&lt;/p&gt;
+&lt;/div&gt;</screen>
+
+<para>Because the <sgmltag class="attribute">name</sgmltag> attribute of
+the <sgmltag>a</sgmltag> element and the <sgmltag class="attribute">id</sgmltag>
+attribute of other tags are both of type <quote>ID</quote>, producing both
+generates invalid documents.</para>
+
+<para>As of version 1.50, you can use this switch to control which type of
+identifier is generated. For backwards-compatibility, generating
+<sgmltag>a</sgmltag> anchors is preferred.</para>
+
+<para>Note: at present, this switch is incompletely implemented.
+Disabling ID attributes will suppress them, but enabling ID attributes
+will not suppress the anchors.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="generate.meta.abstract">
+<refmeta>
+<refentrytitle>generate.meta.abstract</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>generate.meta.abstract</refname>
+<refpurpose>Generate HTML <sgmltag>META</sgmltag> element from <sgmltag>abstract</sgmltag>?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="generate.meta.abstract.frag">
+&lt;xsl:param name="generate.meta.abstract" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, document abstracts will be reproduced in the HTML
+<sgmltag>HEAD</sgmltag> with <sgmltag class="starttag">meta name="description" content="..."</sgmltag>.</para>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+<reference><title>XSLT Processing</title>
+<refentry id="rootid">
+<refmeta>
+<refentrytitle>rootid</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>rootid</refname>
+<refpurpose>Specify the root element to format</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="rootid.frag">&lt;xsl:param name="rootid" select="''"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If <parameter moreinfo="none">rootid</parameter> is specified, it must be the
+value of an ID that occurs in the document being formatted. The entire
+document will be loaded and parsed, but formatting will begin at the
+element identified, rather than at the root. For example, this allows
+you to process only chapter 4 of a book.</para>
+<para>Because the entire document is available to the processor, automatic
+numbering, cross references, and other dependencies are correctly
+resolved.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="suppress.navigation">
+<refmeta>
+<refentrytitle>suppress.navigation</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>suppress.navigation</refname>
+<refpurpose>Disable header and footer navigation</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="suppress.navigation.frag">&lt;xsl:param name="suppress.navigation"&gt;0&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>
+If <literal moreinfo="none">suppress.navigation</literal> is turned on, header and
+footer navigation will be suppressed.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="suppress.header.navigation">
+<refmeta>
+<refentrytitle>suppress.header.navigation</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>suppress.header.navigation</refname>
+<refpurpose>Disable header navigation</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="suppress.header.navigation.frag">&lt;xsl:param name="suppress.header.navigation"&gt;0&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>
+If <literal moreinfo="none">suppress.header.navigation</literal> is turned on, header
+navigation will be suppressed.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="suppress.footer.navigation">
+<refmeta>
+<refentrytitle>suppress.footer.navigation</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>suppress.footer.navigation</refname>
+<refpurpose>Disable footer navigation</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="suppress.footer.navigation.frag">&lt;xsl:param name="suppress.footer.navigation"&gt;0&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>
+If <literal moreinfo="none">suppress.footer.navigation</literal> is turned on, footer
+navigation will be suppressed.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="header.rule">
+<refmeta>
+<refentrytitle>header.rule</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>header.rule</refname>
+<refpurpose>Rule under headers?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="header.rule.frag">
+&lt;xsl:param name="header.rule" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, a rule will be drawn below the page headers.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="footer.rule">
+<refmeta>
+<refentrytitle>footer.rule</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>footer.rule</refname>
+<refpurpose>Rule over footers?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="footer.rule.frag">
+&lt;xsl:param name="footer.rule" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, a rule will be drawn above the page footers.</para>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+<reference><title>Meta/*Info</title>
+<refentry id="inherit.keywords">
+<refmeta>
+<refentrytitle>inherit.keywords</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>inherit.keywords</refname>
+<refpurpose>Inherit keywords from ancestor elements?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="inherit.keywords.frag">&lt;xsl:param name="inherit.keywords" select="'1'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If <parameter moreinfo="none">inherit.keywords</parameter>
+is non-zero, the keyword <sgmltag>META</sgmltag> for each HTML
+<sgmltag>HEAD</sgmltag> element will include all of the keywords from
+ancestral elements. Otherwise, only the keywords from the current section
+will be used.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="make.single.year.ranges">
+<refmeta>
+<refentrytitle>make.single.year.ranges</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>make.single.year.ranges</refname>
+<refpurpose>Print single-year ranges (e.g., 1998-1999)</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="make.single.year.ranges.frag">&lt;xsl:param name="make.single.year.ranges" select="0"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, year ranges that span a single year will be printed
+in range notation (1998-1999) instead of discrete notation
+(1998, 1999).</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="make.year.ranges">
+<refmeta>
+<refentrytitle>make.year.ranges</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>make.year.ranges</refname>
+<refpurpose>Collate copyright years into ranges?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="make.year.ranges.frag">&lt;xsl:param name="make.year.ranges" select="0"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, copyright years will be collated into ranges.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="author.othername.in.middle">
+<refmeta>
+<refentrytitle>author.othername.in.middle</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>author.othername.in.middle</refname>
+<refpurpose>Is <sgmltag>othername</sgmltag> in <sgmltag>author</sgmltag> a
+middle name?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="author.othername.in.middle.frag">&lt;xsl:param name="author.othername.in.middle" select="1"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), the <sgmltag>othername</sgmltag> of an <sgmltag>author</sgmltag>
+appears between the <sgmltag>firstname</sgmltag> and
+<sgmltag>surname</sgmltag>.  Otherwise, <sgmltag>othername</sgmltag>
+is suppressed.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="generate.legalnotice.link">
+<refmeta>
+<refentrytitle>generate.legalnotice.link</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>generate.legalnotice.link</refname>
+<refpurpose>TBD</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="generate.legalnotice.link.frag">&lt;xsl:param name="generate.legalnotice.link" select="0"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>TBD</para>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+<reference><title>Reference Pages</title>
+<refentry id="funcsynopsis.decoration">
+<refmeta>
+<refentrytitle>funcsynopsis.decoration</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>funcsynopsis.decoration</refname>
+<refpurpose>Decorate elements of a FuncSynopsis?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="funcsynopsis.decoration.frag">&lt;xsl:param name="funcsynopsis.decoration" select="1"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), elements of the FuncSynopsis will be decorated (e.g. bold or
+italic).  The decoration is controlled by functions that can be redefined
+in a customization layer.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="funcsynopsis.style">
+<refmeta>
+<refentrytitle>funcsynopsis.style</refentrytitle>
+<refmiscinfo role="type">list</refmiscinfo>
+<refmiscinfo role="value">ansi</refmiscinfo>
+<refmiscinfo role="value">kr</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>funcsynopsis.style</refname>
+<refpurpose>What style of 'FuncSynopsis' should be generated?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="funcsynopsis.style.frag">&lt;xsl:param name="funcsynopsis.style"&gt;kr&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If <varname>funcsynopsis.style</varname> is <literal moreinfo="none">ansi</literal>,
+ANSI-style function synopses are generated for a
+<sgmltag>funcsynopsis</sgmltag>, otherwise K&amp;R-style
+function synopses are generated.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="funcsynopsis.tabular.threshold">
+<refmeta>
+<refentrytitle>funcsynopsis.tabular.threshold</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>funcsynopsis.tabular.threshold</refname>
+<refpurpose>Width beyond which a tabular presentation will be used</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="funcsynopsis.tabular.threshold.frag">
+&lt;xsl:param name="funcsynopsis.tabular.threshold" select="40"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If <parameter moreinfo="none">funcsynopsis.tabular.threshold</parameter> is greater than
+zero then if a <sgmltag>funcprototype</sgmltag> is wider than the threshold
+value, it will be presented in a table.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="function.parens">
+<refmeta>
+<refentrytitle>function.parens</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>function.parens</refname>
+<refpurpose>Generate parens after a function?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="function.parens.frag">&lt;xsl:param name="function.parens"&gt;0&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If not 0, the formatting of
+a <sgmltag class="starttag">function</sgmltag> element will include
+generated parenthesis.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="refentry.generate.name">
+<refmeta>
+<refentrytitle>refentry.generate.name</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>refentry.generate.name</refname>
+<refpurpose>Output NAME header before 'RefName'(s)?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="refentry.generate.name.frag">&lt;xsl:param name="refentry.generate.name" select="1"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), a "NAME" section title is output before the list
+of 'RefName's. This parameter and
+<parameter moreinfo="none">refentry.generate.title</parameter> are mutually
+exclusive. This means that if you change this parameter to zero, you
+should set <parameter moreinfo="none">refentry.generate.title</parameter> to 1 unless
+you want get quite strange output.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="refentry.generate.title">
+<refmeta>
+<refentrytitle>refentry.generate.title</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>refentry.generate.title</refname>
+<refpurpose>Output title before 'RefName'(s)?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="refentry.generate.title.frag">
+&lt;xsl:param name="refentry.generate.title" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), the reference page title or first name is
+output before the list of 'RefName's. This parameter and
+<parameter moreinfo="none">refentry.generate.name</parameter> are mutually exclusive.
+This means that if you change this parameter to 1, you
+should set <parameter moreinfo="none">refentry.generate.name</parameter> to 0 unless
+you want get quite strange output.</para>
+
+
+</refsect1>
+</refentry>
+
+<refentry id="refentry.xref.manvolnum">
+<refmeta>
+<refentrytitle>refentry.xref.manvolnum</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>refentry.xref.manvolnum</refname>
+<refpurpose>Output <sgmltag>manvolnum</sgmltag> as part of 
+<sgmltag>refentry</sgmltag> cross-reference?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="refentry.xref.manvolnum.frag">&lt;xsl:param name="refentry.xref.manvolnum" select="1"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>if true (non-zero), the <sgmltag>manvolnum</sgmltag> is used when cross-referencing
+<sgmltag>refentry</sgmltag>s, either with <sgmltag>xref</sgmltag>
+or <sgmltag>citerefentry</sgmltag>.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="citerefentry.link">
+<refmeta>
+<refentrytitle>citerefentry.link</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>citerefentry.link</refname>
+<refpurpose>Generate URL links when cross-referencing RefEntrys?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="citerefentry.link.frag">&lt;xsl:param name="citerefentry.link" select="'0'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true, a web link will be generated, presumably
+to an online man-&gt;HTML gateway. The text of the link is
+generated by the generate.citerefentry.link template.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="refentry.separator">
+<refmeta>
+<refentrytitle>refentry.separator</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>refentry.separator</refname>
+<refpurpose>Generate a separator between consecutive RefEntry elements?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="refentry.separator.frag">&lt;xsl:param name="refentry.separator" select="'1'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true, a separator will be generated between consecutive
+reference pages.
+</para>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+<reference><title>Tables</title>
+<refentry id="default.table.width">
+<refmeta>
+<refentrytitle>default.table.width</refentrytitle>
+<refmiscinfo role="type">length</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>default.table.width</refname>
+<refpurpose>The default width of tables</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="default.table.width.frag">&lt;xsl:param name="default.table.width" select="''"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If specified, this value will be used for the WIDTH attribute on
+tables that do not specify an alternate width (with the dbhtml processing
+instruction).</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="nominal.table.width">
+<refmeta>
+<refentrytitle>nominal.table.width</refentrytitle>
+<refmiscinfo role="type">length</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>nominal.table.width</refname>
+<refpurpose>The (absolute) nominal width of tables</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="nominal.table.width.frag">&lt;xsl:param name="nominal.table.width" select="'6in'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>In order to convert CALS column widths into HTML column widths, it
+is sometimes necessary to have an absolute table width to use for conversion
+of mixed absolute and relative widths. This value must be an absolute
+length (not a percentag).</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="table.borders.with.css">
+<refmeta>
+<refentrytitle>table.borders.with.css</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>table.borders.with.css</refname>
+<refpurpose>Use CSS to specify table, row, and cell borders?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="table.borders.with.css.frag">
+&lt;xsl:param name="table.borders.with.css" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), CSS will be used to draw table borders.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="table.cell.border.style">
+<refmeta>
+<refentrytitle>table.cell.border.style</refentrytitle>
+<refmiscinfo role="type"/>
+</refmeta>
+<refnamediv>
+<refname>table.cell.border.style</refname>
+<refpurpose/>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="table.cell.border.style.frag">
+&lt;xsl:param name="table.cell.border.style" select="'solid'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="table.cell.border.thickness">
+<refmeta>
+<refentrytitle>table.cell.border.thickness</refentrytitle>
+<refmiscinfo role="type"/>
+</refmeta>
+<refnamediv>
+<refname>table.cell.border.thickness</refname>
+<refpurpose/>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="table.cell.border.thickness.frag">
+&lt;xsl:param name="table.cell.border.thickness" select="'0.5pt'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="table.cell.border.color">
+<refmeta>
+<refentrytitle>table.cell.border.color</refentrytitle>
+<refmiscinfo role="type"/>
+</refmeta>
+<refnamediv>
+<refname>table.cell.border.color</refname>
+<refpurpose/>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="table.cell.border.color.frag">
+&lt;xsl:param name="table.cell.border.color" select="''"&gt;&lt;/xsl:param&gt;
+
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="table.frame.border.style">
+<refmeta>
+<refentrytitle>table.frame.border.style</refentrytitle>
+<refmiscinfo role="type"/>
+</refmeta>
+<refnamediv>
+<refname>table.frame.border.style</refname>
+<refpurpose/>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="table.frame.border.style.frag">
+&lt;xsl:param name="table.frame.border.style" select="'solid'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="table.frame.border.thickness">
+<refmeta>
+<refentrytitle>table.frame.border.thickness</refentrytitle>
+<refmiscinfo role="type"/>
+</refmeta>
+<refnamediv>
+<refname>table.frame.border.thickness</refname>
+<refpurpose>Specifies the thickness of the frame border</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="table.frame.border.thickness.frag">
+&lt;xsl:param name="table.frame.border.thickness" select="'0.5pt'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Specifies the thickness of the border on the table's frame.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="table.frame.border.color">
+<refmeta>
+<refentrytitle>table.frame.border.color</refentrytitle>
+<refmiscinfo role="type"/>
+</refmeta>
+<refnamediv>
+<refname>table.frame.border.color</refname>
+<refpurpose/>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="table.frame.border.color.frag">
+&lt;xsl:param name="table.frame.border.color" select="''"&gt;&lt;/xsl:param&gt;
+
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="html.cellspacing">
+<refmeta>
+<refentrytitle>html.cellspacing</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>html.cellspacing</refname>
+<refpurpose>Default value for cellspacing in HTML tables</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="html.cellspacing.frag">
+&lt;xsl:param name="html.cellspacing" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If specified, this value will be used as the default cellspacing value
+in HTML tables.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="html.cellpadding">
+<refmeta>
+<refentrytitle>html.cellpadding</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>html.cellpadding</refname>
+<refpurpose>Default value for cellpadding in HTML tables</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="html.cellpadding.frag">
+&lt;xsl:param name="html.cellpadding" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If specified, this value will be used as the default cellpadding value
+in HTML tables.</para>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+<reference><title>QAndASet</title>
+<refentry id="qanda.defaultlabel">
+<refmeta>
+<refentrytitle>qanda.defaultlabel</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>qanda.defaultlabel</refname>
+<refpurpose>Sets the default for defaultlabel on QandASet.</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="qanda.defaultlabel.frag">&lt;xsl:param name="qanda.defaultlabel"&gt;number&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If no defaultlabel attribute is specified on a QandASet, this
+value is used. It must be one of the legal values for the defaultlabel
+attribute.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="qanda.inherit.numeration">
+<refmeta>
+<refentrytitle>qanda.inherit.numeration</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>qanda.inherit.numeration</refname>
+<refpurpose>Does enumeration of QandASet components inherit the numeration of parent elements?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="qanda.inherit.numeration.frag">&lt;xsl:param name="qanda.inherit.numeration" select="1"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), numbered QandADiv elements and Questions and Answers inherit
+the numeration of the ancestors of the QandASet.
+</para>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+<reference><title>Linking</title>
+<refentry id="target.database.document"> 
+<refmeta> 
+<refentrytitle>target.database.document</refentrytitle> 
+<refmiscinfo role="type">uri</refmiscinfo> 
+</refmeta> 
+<refnamediv> 
+<refname>target.database.document</refname> 
+<refpurpose>Name of master database file for resolving
+olinks</refpurpose> 
+</refnamediv> 
+<refsynopsisdiv> <programlisting id="target.database.document.frag">
+&lt;xsl:param name="target.database.document" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting> 
+</refsynopsisdiv> 
+<refsect1>
+<title>Description</title> 
+<para>
+To resolve olinks between documents, the stylesheets use
+a master database document that identifies the  target datafiles for all the documents within the scope
+of the olinks. This parameter value is the URI of 
+the master document to be read during processing to resolve olinks.
+The default value is <filename moreinfo="none">olinkdb.xml</filename>.</para>
+<para>The data structure of the file is defined in the <filename moreinfo="none">targetdatabase.dtd</filename> DTD.  The database file provides the high level elements to record the identifiers, locations, and relationships of documents. The cross reference data for individual documents is generally pulled into the database using system entity references or XIncludes. See also <parameter moreinfo="none">targets.filename</parameter>.
+
+</para> 
+</refsect1> 
+</refentry> 
+
+<refentry id="targets.filename"> 
+<refmeta> 
+<refentrytitle>targets.filename</refentrytitle> 
+<refmiscinfo role="type">string</refmiscinfo> 
+</refmeta> 
+<refnamediv> 
+<refname>targets.filename</refname> 
+<refpurpose>Name of cross reference targets data file</refpurpose> 
+</refnamediv> 
+<refsynopsisdiv> <programlisting id="targets.filename.frag">
+&lt;xsl:param name="targets.filename" select="'target.db'"&gt;&lt;/xsl:param&gt;
+</programlisting> 
+</refsynopsisdiv> 
+<refsect1>
+<title>Description</title> 
+<para>
+In order to resolve olinks efficiently, the stylesheets can
+generate an external data file containing information about
+all potential cross reference endpoints in a document.
+This parameter lets you change the name of the generated
+file from the default name <filename moreinfo="none">target.db</filename>.
+The name must agree with that used in the target database
+used to resolve olinks during processing.
+See also <parameter moreinfo="none">target.database.document</parameter>.
+</para> 
+</refsect1> 
+</refentry> 
+
+<refentry id="collect.xref.targets"> 
+<refmeta> 
+<refentrytitle>collect.xref.targets</refentrytitle> 
+<refmiscinfo role="type">string</refmiscinfo> 
+</refmeta> 
+<refnamediv> 
+<refname>collect.xref.targets</refname> 
+<refpurpose>Controls whether cross reference data is
+collected</refpurpose> 
+</refnamediv> 
+<refsynopsisdiv> <programlisting id="collect.xref.targets.frag">
+&lt;xsl:param name="collect.xref.targets" select="'no'"&gt;&lt;/xsl:param&gt;
+</programlisting> 
+</refsynopsisdiv> 
+<refsect1> 
+<title>Description</title> 
+<para>
+In order to resolve olinks efficiently, the stylesheets can
+generate an external data file containing information about
+all potential cross reference endpoints in a document.
+This parameter determines whether the collection process is run when the document is processed by the stylesheet. The default value is  <literal moreinfo="none">no</literal>, which means the data file is not generated during processing. The other choices are <literal moreinfo="none">yes</literal>, which means the data file is created and the document is processed for output, and <literal moreinfo="none">only</literal>, which means the data file is created but the document is not processed for output.
+See also <parameter moreinfo="none">targets.filename</parameter>.
+</para> 
+</refsect1> 
+</refentry> 
+
+<refentry id="olink.base.uri"> 
+<refmeta> 
+<refentrytitle>olink.base.uri</refentrytitle> 
+<refmiscinfo role="type">uri</refmiscinfo> 
+</refmeta> 
+<refnamediv> 
+<refname>olink.base.uri</refname> 
+<refpurpose>Base URI used in olink hrefs</refpurpose> 
+</refnamediv> 
+<refsynopsisdiv> <programlisting id="olink.base.uri.frag">
+&lt;xsl:param name="olink.base.uri" select="''"&gt;&lt;/xsl:param&gt; </programlisting> 
+</refsynopsisdiv> 
+<refsect1> 
+<title>Description</title> 
+<para>When cross reference data is collected for resolving olinks, it may be necessary to prepend a base URI to each target's href. This parameter lets you set that base URI when cross reference data is collected. This feature is needed when you want to link to a document that is processed without chunking. The output filename for such a document is not known to the XSL stylesheet; the only target information consists of fragment identifiers such as <literal moreinfo="none">#idref</literal>. To enable the resolution of olinks between documents, you should pass the name of the HTML output file as the value of this parameter. Then the hrefs recorded in the cross reference data collection look like <literal moreinfo="none">outfile.html#idref</literal>, which can  be reached as links from other documents.</para> 
+</refsect1> 
+</refentry> 
+
+<refentry id="use.local.olink.style"> 
+<refmeta> 
+<refentrytitle>use.local.olink.style</refentrytitle> 
+<refmiscinfo role="type">boolean</refmiscinfo> 
+</refmeta> 
+<refnamediv> 
+<refname>use.local.olink.style</refname> 
+<refpurpose>Process olinks using xref style of current
+document</refpurpose> 
+</refnamediv> 
+<refsynopsisdiv> <programlisting id="use.local.olink.style.frag">
+&lt;xsl:param name="use.local.olink.style" select="0"&gt;&lt;/xsl:param&gt; </programlisting> 
+</refsynopsisdiv> 
+<refsect1> 
+<title>Description</title> 
+<para>When cross reference data is collected for use by olinks, the data for each potential target includes one field containing a completely assembled cross reference string, as if it were an xref generated in that document. Other fields record the separate title, number, and element name of each target. When an olink is formed to a target from another document, the olink resolves to that preassembled string by default. If the <parameter moreinfo="none">use.local.olink.style</parameter> parameter is set to non-zero, then instead the cross
+reference string is formed again from the target title, number, and
+element name, using the stylesheet processing the targeting document.
+Then olinks will match the xref style in the targeting document
+rather than in the target document. If  both documents are processed
+with the same stylesheet, then the results will be the same.</para> 
+</refsect1> 
+</refentry> 
+
+<refentry id="current.docid"> 
+<refmeta> 
+<refentrytitle>current.docid</refentrytitle> 
+<refmiscinfo role="type">string</refmiscinfo> 
+</refmeta> 
+<refnamediv> 
+<refname>current.docid</refname> 
+<refpurpose>targetdoc identifier for the document being
+processed</refpurpose> 
+</refnamediv> 
+<refsynopsisdiv> <programlisting id="current.docid.frag">
+&lt;xsl:param name="current.docid" select="''"&gt;&lt;/xsl:param&gt; </programlisting> 
+</refsynopsisdiv> 
+<refsect1> 
+<title>Description</title> 
+<para>When olinks between documents are resolved for HTML output, the stylesheet can compute the relative path between the current document and the target document. The stylesheet needs to know the <literal moreinfo="none">targetdoc</literal> identifiers for both documents, as they appear in the <parameter moreinfo="none">target.database.document</parameter> database file. This parameter passes to the stylesheet
+the targetdoc identifier of the current document, since that
+identifier does not appear in the document itself. </para>
+<para>This parameter can also be used for print output. If an olink's  <literal moreinfo="none">targetdoc</literal>  id differs from the <literal moreinfo="none">current.docid</literal>, then the stylesheet can append the target document's title to the generated olink text. That identifies to the reader that the link is to a different document, not the current document. See also <parameter moreinfo="none">olink.doctitle</parameter> to enable that feature.</para> 
+</refsect1> 
+</refentry> 
+
+<refentry id="olink.doctitle"> 
+<refmeta> 
+<refentrytitle>olink.doctitle</refentrytitle> 
+<refmiscinfo role="type">boolean</refmiscinfo> 
+</refmeta> 
+<refnamediv> 
+<refname>olink.doctitle</refname> 
+<refpurpose>show the document title for external olinks?</refpurpose>
+
+</refnamediv> 
+<refsynopsisdiv> <programlisting id="olink.doctitle.frag">
+&lt;xsl:param name="olink.doctitle" select="0"&gt;&lt;/xsl:param&gt; </programlisting> 
+</refsynopsisdiv> 
+<refsect1> 
+<title>Description</title> 
+<para>When olinks between documents are resolved for print output, the generated text may not make it clear that the reference is to another document. It is possible for the stylesheets to append the other document's title to external olinks. For this to happen, two parameters must be set. The <parameter moreinfo="none">olink.doctitle</parameter> parameter should be set to nonzero to enable this
+feature. And you should set the <parameter moreinfo="none">current.docid</parameter> parameter to the document id for the  document currently
+being processed for output.  If an olink's  <literal moreinfo="none">targetdoc</literal>  id differs from the <literal moreinfo="none">current.docid</literal>, then the stylesheet can append the target document's
+title to the generated olink text. </para> 
+</refsect1> 
+</refentry> 
+
+<refentry id="link.mailto.url">
+<refmeta>
+<refentrytitle>link.mailto.url</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>link.mailto.url</refname>
+<refpurpose>Mailto URL for the LINK REL=made HTML HEAD element</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="link.mailto.url.frag">&lt;xsl:param name="link.mailto.url"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If not the empty string, this address will be used for the
+REL=made <sgmltag>LINK</sgmltag> element in the HTML <sgmltag>HEAD</sgmltag>.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="ulink.target">
+<refmeta>
+<refentrytitle>ulink.target</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>ulink.target</refname>
+<refpurpose>The HTML anchor target for ULinks</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="ulink.target.frag">&lt;xsl:param name="ulink.target" select="'_top'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If <parameter moreinfo="none">ulink.target</parameter> is set, its value will
+be used for the <sgmltag class="attribute">target</sgmltag> attribute
+on anchors generated for <sgmltag>ulink</sgmltag>s.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="olink.fragid">
+<refmeta>
+<refentrytitle>olink.fragid</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>olink.fragid</refname>
+<refpurpose>Names the fragment identifier portion of an OLink resolver query</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="olink.fragid.frag">&lt;xsl:param name="olink.fragid" select="'fragid='"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="olink.outline.ext">
+<refmeta>
+<refentrytitle>olink.outline.ext</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>olink.outline.ext</refname>
+<refpurpose>The extension of OLink outline files</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="olink.outline.ext.frag">&lt;xsl:param name="olink.outline.ext" select="'.olink'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="olink.pubid">
+<refmeta>
+<refentrytitle>olink.pubid</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>olink.pubid</refname>
+<refpurpose>Names the public identifier portion of an OLink resolver query</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="olink.pubid.frag">&lt;xsl:param name="olink.pubid" select="'pubid='"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="olink.sysid">
+<refmeta>
+<refentrytitle>olink.sysid</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>olink.sysid</refname>
+<refpurpose>Names the system identifier portion of an OLink resolver query</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="olink.sysid.frag">&lt;xsl:param name="olink.sysid" select="'sysid='"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="olink.resolver">
+<refmeta>
+<refentrytitle>olink.resolver</refentrytitle>
+<refmiscinfo role="type"/>
+</refmeta>
+<refnamediv>
+<refname>olink.resolver</refname>
+<refpurpose>The root name of the OLink resolver (usually a script)</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="olink.resolver.frag">&lt;xsl:param name="olink.resolver" select="'/cgi-bin/olink'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:</para>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+<reference><title>Bibliography</title>
+<refentry id="biblioentry.item.separator">
+<refmeta>
+<refentrytitle>biblioentry.item.separator</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>biblioentry.item.separator</refname>
+<refpurpose>Text to separate bibliography entries</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="biblioentry.item.separator.frag">&lt;xsl:param name="biblioentry.item.separator"&gt;. &lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Text to separate bibliography entries
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="bibliography.collection">
+<refmeta>
+<refentrytitle>bibliography.collection</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>bibliography.collection</refname>
+<refpurpose>Name of the bibliography collection file</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="bibliography.collection.frag">&lt;xsl:param name="bibliography.collection" select="'http://docbook.sourceforge.net/release/bibliography/bibliography.xml'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Maintaining bibliography entries across a set of documents is tedious, time
+consuming, and error prone. It makes much more sense, usually, to store all of
+the bibliography entries in a single place and simply <quote>extract</quote>
+the ones you need in each document.</para>
+
+<para>That's the purpose of the
+<parameter moreinfo="none">bibliography.collection</parameter> parameter. To setup a global
+bibliography <quote>database</quote>, follow these steps:</para>
+
+<para>First, create a stand-alone bibliography document that contains all of
+the documents that you wish to reference. Make sure that each bibliography
+entry (whether you use <sgmltag>biblioentry</sgmltag> or <sgmltag>bibliomixed</sgmltag>)
+has an ID.</para>
+
+<para>My global bibliography, <filename moreinfo="none">~/bibliography.xml</filename> begins
+like this:</para>
+
+<informalexample>
+<programlisting format="linespecific">&lt;!DOCTYPE bibliography
+  PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+  "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"&gt;
+&lt;bibliography&gt;&lt;title&gt;References&lt;/title&gt;
+
+&lt;bibliomixed id="xml-rec"&gt;&lt;abbrev&gt;XML 1.0&lt;/abbrev&gt;Tim Bray,
+Jean Paoli, C. M. Sperberg-McQueen, and Eve Maler, editors.
+&lt;citetitle&gt;&lt;ulink url="http://www.w3.org/TR/REC-xml"&gt;Extensible Markup
+Language (XML) 1.0 Second Edition&lt;/ulink&gt;&lt;/citetitle&gt;.
+World Wide Web Consortium, 2000.
+&lt;/bibliomixed&gt;
+
+&lt;bibliomixed id="xml-names"&gt;&lt;abbrev&gt;Namespaces&lt;/abbrev&gt;Tim Bray,
+Dave Hollander,
+and Andrew Layman, editors.
+&lt;citetitle&gt;&lt;ulink url="http://www.w3.org/TR/REC-xml-names/"&gt;Namespaces in
+XML&lt;/ulink&gt;&lt;/citetitle&gt;.
+World Wide Web Consortium, 1999.
+&lt;/bibliomixed&gt;
+
+&lt;!-- ... --&gt;
+&lt;/bibliography&gt;
+</programlisting>
+</informalexample>
+
+<para>When you create a bibliography in your document, simply
+provide <emphasis>empty</emphasis> <sgmltag>bibliomixed</sgmltag>
+entries for each document that you wish to cite. Make sure that these
+elements have the same ID as the corresponding <quote>real</quote>
+entry in your global bibliography.</para>
+
+<para>For example:</para>
+
+<informalexample>
+<programlisting format="linespecific">&lt;bibliography&gt;&lt;title&gt;Bibliography&lt;/title&gt;
+
+&lt;bibliomixed id="xml-rec"/&gt;
+&lt;bibliomixed id="xml-names"/&gt;
+&lt;bibliomixed id="DKnuth86"&gt;Donald E. Knuth. &lt;citetitle&gt;Computers and
+Typesetting: Volume B, TeX: The Program&lt;/citetitle&gt;. Addison-Wesley,
+1986.  ISBN 0-201-13437-3.
+&lt;/bibliomixed&gt;
+&lt;bibliomixed id="relaxng"/&gt;
+
+&lt;/bibliography&gt;</programlisting>
+</informalexample>
+
+<para>Note that it's perfectly acceptable to mix entries from your
+global bibliography with <quote>normal</quote> entries. You can use
+<sgmltag>xref</sgmltag> or other elements to cross-reference your
+bibliography entries in exactly the same way you do now.</para>
+
+<para>Finally, when you are ready to format your document, simply set the
+<parameter moreinfo="none">bibliography.collection</parameter> parameter (in either a
+customization layer or directly through your processor's interface) to
+point to your global bibliography.</para>
+
+<para>The stylesheets will format the bibliography in your document as if
+all of the entries referenced appeared there literally.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="bibliography.numbered">
+<refmeta>
+<refentrytitle>bibliography.numbered</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>bibliography.numbered</refname>
+<refpurpose>Should bibliography entries be numbered?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="bibliography.numbered.frag">
+&lt;xsl:param name="bibliography.numbered" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero bibliography entries will be numbered</para>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+<reference><title>Glossary</title>
+<refentry id="glossterm.auto.link">
+<refmeta>
+<refentrytitle>glossterm.auto.link</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>glossterm.auto.link</refname>
+<refpurpose>Generate links from glossterm to glossentry automaticaly?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="glossterm.auto.link.frag">
+&lt;xsl:param name="glossterm.auto.link" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true, a link will be automatically created from glossterm 
+to glossentry for that glossary term. This is usefull when your
+glossterm names are consistent and you don't want to add links
+manually.</para>
+<para>If there is <sgmltag class="attribute">linkend</sgmltag> on
+<sgmltag>glossterm</sgmltag> then is used instead of autogeneration of
+link.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="firstterm.only.link">
+<refmeta>
+<refentrytitle>firstterm.only.link</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>firstterm.only.link</refname>
+<refpurpose>Does automatic glossterm linking only apply to firstterms?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="firstterm.only.link.frag">
+&lt;xsl:param name="firstterm.only.link" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true, only <sgmltag>firstterm</sgmltag>s will be automatically linked
+to the glossary. If glossary linking is not enabled, this parameter
+has no effect.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="glossary.collection">
+<refmeta>
+<refentrytitle>glossary.collection</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>glossary.collection</refname>
+<refpurpose>Name of the glossary collection file</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="glossary.collection.frag">
+&lt;xsl:param name="glossary.collection" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Glossaries maintained independently across a set of documents
+are likely to become inconsistent unless considerable effort is
+expended to keep them in sync. It makes much more sense, usually, to
+store all of the glossary entries in a single place and simply
+<quote>extract</quote> the ones you need in each document.</para>
+
+<para>That's the purpose of the
+<parameter moreinfo="none">glossary.collection</parameter> parameter. To setup a global
+glossary <quote>database</quote>, follow these steps:</para>
+
+<refsect2><title>Setting Up the Glossary Database</title>
+
+<para>First, create a stand-alone glossary document that contains all of
+the entries that you wish to reference. Make sure that each glossary
+entry has an ID.</para>
+
+<para>Here's an example glossary:</para>
+
+<informalexample>
+<programlisting format="linespecific">
+&lt;?xml version="1.0" encoding="utf-8"?&gt;
+&lt;!DOCTYPE glossary
+  PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+  "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"&gt;
+&lt;glossary&gt;
+&lt;glossaryinfo&gt;
+&lt;editor&gt;&lt;firstname&gt;Eric&lt;/firstname&gt;&lt;surname&gt;Raymond&lt;/surname&gt;&lt;/editor&gt;
+&lt;title&gt;Jargon File 4.2.3 (abridged)&lt;/title&gt;
+&lt;releaseinfo&gt;Just some test data&lt;/releaseinfo&gt;
+&lt;/glossaryinfo&gt;
+
+&lt;glossdiv&gt;&lt;title&gt;0&lt;/title&gt;
+
+&lt;glossentry&gt;
+&lt;glossterm&gt;0&lt;/glossterm&gt;
+&lt;glossdef&gt;
+&lt;para&gt;Numeric zero, as opposed to the letter `O' (the 15th letter of
+the English alphabet). In their unmodified forms they look a lot
+alike, and various kluges invented to make them visually distinct have
+compounded the confusion. If your zero is center-dotted and letter-O
+is not, or if letter-O looks almost rectangular but zero looks more
+like an American football stood on end (or the reverse), you're
+probably looking at a modern character display (though the dotted zero
+seems to have originated as an option on IBM 3270 controllers). If
+your zero is slashed but letter-O is not, you're probably looking at
+an old-style ASCII graphic set descended from the default typewheel on
+the venerable ASR-33 Teletype (Scandinavians, for whom /O is a letter,
+curse this arrangement). (Interestingly, the slashed zero long
+predates computers; Florian Cajori's monumental "A History of
+Mathematical Notations" notes that it was used in the twelfth and
+thirteenth centuries.) If letter-O has a slash across it and the zero
+does not, your display is tuned for a very old convention used at IBM
+and a few other early mainframe makers (Scandinavians curse &lt;emphasis&gt;this&lt;/emphasis&gt;
+arrangement even more, because it means two of their letters collide).
+Some Burroughs/Unisys equipment displays a zero with a &lt;emphasis&gt;reversed&lt;/emphasis&gt;
+slash. Old CDC computers rendered letter O as an unbroken oval and 0
+as an oval broken at upper right and lower left. And yet another
+convention common on early line printers left zero unornamented but
+added a tail or hook to the letter-O so that it resembled an inverted
+Q or cursive capital letter-O (this was endorsed by a draft ANSI
+standard for how to draw ASCII characters, but the final standard
+changed the distinguisher to a tick-mark in the upper-left corner).
+Are we sufficiently confused yet?&lt;/para&gt;
+&lt;/glossdef&gt;
+&lt;/glossentry&gt;
+
+&lt;glossentry&gt;
+&lt;glossterm&gt;1TBS&lt;/glossterm&gt;
+&lt;glossdef&gt;
+&lt;para role="accidence"&gt;
+&lt;phrase role="pronounce"&gt;&lt;/phrase&gt;
+&lt;phrase role="partsofspeach"&gt;n&lt;/phrase&gt;
+&lt;/para&gt;
+&lt;para&gt;The "One True Brace Style"&lt;/para&gt;
+&lt;glossseealso&gt;indent style&lt;/glossseealso&gt;
+&lt;/glossdef&gt;
+&lt;/glossentry&gt;
+
+&lt;!-- ... --&gt;
+
+&lt;/glossdiv&gt;
+
+&lt;!-- ... --&gt;
+
+&lt;/glossary&gt;</programlisting>
+</informalexample>
+
+</refsect2>
+
+<refsect2><title>Marking Up Glossary Terms</title>
+
+<para>That takes care of the glossary database, now you have to get the entries
+into your document. Unlike bibliography entries, which can be empty, creating
+<quote>placeholder</quote> glossary entries would be very tedious. So instead,
+support for <parameter moreinfo="none">glossary.collection</parameter> relies on implicit linking.</para>
+
+<para>In your source document, simply use <sgmltag>firstterm</sgmltag> and
+<sgmltag>glossterm</sgmltag> to identify the terms you wish to have included
+in the glossary. The stylesheets assume that you will either set the
+<sgmltag class="attribute">baseform</sgmltag> attribute correctly, or that the
+content of the element exactly matches a term in your glossary.</para>
+
+<para>If you're using a <parameter moreinfo="none">glossary.collection</parameter>, don't
+make explicit links on the terms in your document.</para>
+
+<para>So, in your document, you might write things like this:</para>
+
+<informalexample>
+<programlisting format="linespecific">&lt;para&gt;This is dummy text, without any real meaning.
+The point is simply to reference glossary terms like &lt;glossterm&gt;0&lt;/glossterm&gt;
+and the &lt;firstterm baseform="1TBS"&gt;One True Brace Style (1TBS)&lt;/firstterm&gt;.
+The &lt;glossterm&gt;1TBS&lt;/glossterm&gt;, as you can probably imagine, is a nearly
+religious issue.&lt;/para&gt;</programlisting>
+</informalexample>
+
+<para>If you set the <parameter moreinfo="none">firstterm.only.link</parameter> parameter,
+only the terms marked with <sgmltag>firstterm</sgmltag> will be links.
+Otherwise, all the terms will be linked.</para>
+
+</refsect2>
+
+<refsect2><title>Marking Up the Glossary</title>
+
+<para>The glossary itself has to be identified for the stylesheets. For lack
+of a better choice, the <sgmltag class="attribute">role</sgmltag> is used.
+To identify the glossary as the target for automatic processing, set
+the role to <quote><literal moreinfo="none">auto</literal></quote>. The title of this
+glossary (and any other information from the <sgmltag>glossaryinfo</sgmltag>
+that's rendered by your stylesheet) will be displayed, but the entries will
+come from the database.
+</para>
+
+<para>Unfortunately, the glossary can't be empty, so you must put in
+at least one <sgmltag>glossentry</sgmltag>. The content of this entry
+is irrelevant, it will not be rendered:</para>
+
+<informalexample>
+<programlisting format="linespecific">&lt;glossary role="auto"&gt;
+&lt;glossentry&gt;
+&lt;glossterm&gt;Irrelevant&lt;/glossterm&gt;
+&lt;glossdef&gt;
+&lt;para&gt;If you can see this, the document was processed incorrectly. Use
+the &lt;parameter&gt;glossary.collection&lt;/parameter&gt; parameter.&lt;/para&gt;
+&lt;/glossdef&gt;
+&lt;/glossentry&gt;
+&lt;/glossary&gt;</programlisting>
+</informalexample>
+
+<para>What about glossary divisions? If your glossary database has glossary
+divisions <emphasis>and</emphasis> your automatic glossary contains at least
+one <sgmltag>glossdiv</sgmltag>, the automic glossary will have divisions.
+If the <sgmltag>glossdiv</sgmltag> is missing from either location, no divisions
+will be rendered.</para>
+
+<para>Glossary entries (and divisions, if appropriate) in the glossary will
+occur in precisely the order they occur in your database.</para>
+
+</refsect2>
+
+<refsect2><title>Formatting the Document</title>
+
+<para>Finally, when you are ready to format your document, simply set the
+<parameter moreinfo="none">glossary.collection</parameter> parameter (in either a
+customization layer or directly through your processor's interface) to
+point to your global glossary.</para>
+
+<para>The stylesheets will format the glossary in your document as if
+all of the entries implicilty referenced appeared there literally.</para>
+</refsect2>
+
+<refsect2><title>Limitations</title>
+
+<para>Glossary cross-references <emphasis>within the glossary</emphasis> are
+not supported. For example, this <emphasis>will not</emphasis> work:</para>
+
+<informalexample>
+<programlisting format="linespecific">&lt;glossentry&gt;
+&lt;glossterm&gt;gloss-1&lt;/glossterm&gt;
+&lt;glossdef&gt;&lt;para&gt;A description that references &lt;glossterm&gt;gloss-2&lt;/glossterm&gt;.&lt;/para&gt;
+&lt;glossseealso&gt;gloss-2&lt;/glossseealso&gt;
+&lt;/glossdef&gt;
+&lt;/glossentry&gt;</programlisting>
+</informalexample>
+
+<para>If you put glossary cross-references in your glossary that way,
+you'll get the cryptic error: <computeroutput moreinfo="none">Warning:
+glossary.collection specified, but there are 0 automatic
+glossaries</computeroutput>.</para>
+
+<para>Instead, you must do two things:</para>
+
+<orderedlist inheritnum="ignore" continuation="restarts">
+<listitem>
+<para>Markup your glossary using <sgmltag>glossseealso</sgmltag>:</para>
+
+<informalexample>
+<programlisting format="linespecific">&lt;glossentry&gt;
+&lt;glossterm&gt;gloss-1&lt;/glossterm&gt;
+&lt;glossdef&gt;&lt;para&gt;A description that references &lt;glossterm&gt;gloss-2&lt;/glossterm&gt;.&lt;/para&gt;
+&lt;glossseealso&gt;gloss-2&lt;/glossseealso&gt;
+&lt;/glossdef&gt;
+&lt;/glossentry&gt;</programlisting>
+</informalexample>
+</listitem>
+
+<listitem>
+<para>Make sure there is at least one <sgmltag>glossterm</sgmltag> reference to
+<glossterm>gloss-2</glossterm> <emphasis>in your document</emphasis>. The
+easiest way to do that is probably within a <sgmltag>remark</sgmltag> in your
+automatic glossary:</para>
+
+<informalexample>
+<programlisting format="linespecific">&lt;glossary role="auto"&gt;
+&lt;remark&gt;Make sure there's a reference to &lt;glossterm&gt;gloss-2&lt;/glossterm&gt;.&lt;/remark&gt;
+&lt;glossentry&gt;
+&lt;glossterm&gt;Irrelevant&lt;/glossterm&gt;
+&lt;glossdef&gt;
+&lt;para&gt;If you can see this, the document was processed incorrectly. Use
+the &lt;parameter&gt;glossary.collection&lt;/parameter&gt; parameter.&lt;/para&gt;
+&lt;/glossdef&gt;
+&lt;/glossentry&gt;
+&lt;/glossary&gt;</programlisting>
+</informalexample>
+</listitem>
+</orderedlist>
+</refsect2>
+
+</refsect1>
+</refentry>
+
+<refentry id="glossentry.show.acronym">
+<refmeta>
+<refentrytitle>glossentry.show.acronym</refentrytitle>
+<refmiscinfo role="type">list</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>glossentry.show.acronym</refname>
+<refpurpose>Display <sgmltag>glossentry</sgmltag> acronyms?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="glossentry.show.acronym.frag">
+&lt;xsl:param name="glossentry.show.acronym" select="'no'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>A setting of <quote>yes</quote> means they should be displayed;
+<quote>no</quote> means they shouldn't. If <quote>primary</quote> is used,
+then they are shown as the primary text for the entry.</para>
+
+<note>
+<para>This setting controls both <sgmltag>acronym</sgmltag> and
+<sgmltag>abbrev</sgmltag> elements in the <sgmltag>glossentry</sgmltag>.</para>
+</note>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+<reference><title>Miscellaneous</title>
+<refentry id="formal.procedures">
+<refmeta>
+<refentrytitle>formal.procedures</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>formal.procedures</refname>
+<refpurpose>Selects formal or informal procedures</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="formal.procedures.frag">
+&lt;xsl:param name="formal.procedures" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Formal procedures are numbered and always have a title.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="formal.title.placement">
+<refmeta>
+<refentrytitle>formal.title.placement</refentrytitle>
+<refmiscinfo role="type"/>
+</refmeta>
+<refnamediv>
+<refname>formal.title.placement</refname>
+<refpurpose/>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="formal.title.placement.frag">
+&lt;xsl:param name="formal.title.placement"&gt;
+figure before
+example before
+equation before
+table before
+procedure before
+task before
+&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Specifies where formal object titles should occur. For each formal object
+type (<sgmltag>figure</sgmltag>,
+<sgmltag>example</sgmltag>,
+<sgmltag>equation</sgmltag>,
+<sgmltag>table</sgmltag>, and <sgmltag>procedure</sgmltag>)
+you can specify either the keyword
+<quote><literal moreinfo="none">before</literal></quote> or
+<quote><literal moreinfo="none">after</literal></quote>.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="runinhead.default.title.end.punct">
+<refmeta>
+<refentrytitle>runinhead.default.title.end.punct</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>runinhead.default.title.end.punct</refname>
+<refpurpose>Default punctuation character on a run-in-head</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="runinhead.default.title.end.punct.frag">&lt;xsl:param name="runinhead.default.title.end.punct" select="'.'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="runinhead.title.end.punct">
+<refmeta>
+<refentrytitle>runinhead.title.end.punct</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>runinhead.title.end.punct</refname>
+<refpurpose>Characters that count as punctuation on a run-in-head</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="runinhead.title.end.punct.frag">&lt;xsl:param name="runinhead.title.end.punct" select="'.!?:'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="show.comments">
+<refmeta>
+<refentrytitle>show.comments</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>show.comments</refname>
+<refpurpose>Display <sgmltag>comment</sgmltag> elements?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="show.comments.frag">&lt;xsl:param name="show.comments"&gt;1&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), comments will be displayed, otherwise they are suppressed.
+Comments here refers to the <sgmltag>comment</sgmltag> element,
+which will be renamed <sgmltag>remark</sgmltag> in DocBook V4.0,
+not XML comments (&lt;-- like this --&gt;) which are unavailable.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="show.revisionflag">
+<refmeta>
+<refentrytitle>show.revisionflag</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>show.revisionflag</refname>
+<refpurpose>Enable decoration of elements that have a revisionflag</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="show.revisionflag.frag">&lt;xsl:param name="show.revisionflag"&gt;0&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>
+If <literal moreinfo="none">show.revisionflag</literal> is turned on, then the stylesheets
+may produce additional markup designed to allow a CSS stylesheet to
+highlight elements that have specific revisionflag settings.</para>
+
+<para>The markup inserted will be usually be either a &lt;span&gt; or &lt;div&gt;
+with an appropriate <literal moreinfo="none">class</literal> attribute. (The value of
+the class attribute will be the same as the value of the revisionflag
+attribute). In some contexts, for example tables, where extra markup
+would be structurally illegal, the class attribute will be added to the
+appropriate container element.</para>
+
+<para>In general, the stylesheets only test for revisionflag in contexts
+where an importing stylesheet would have to redefine whole templates.
+Most of the revisionflag processing is expected to be done by another
+stylesheet, for example <filename moreinfo="none">changebars.xsl</filename>.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="shade.verbatim">
+<refmeta>
+<refentrytitle>shade.verbatim</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>shade.verbatim</refname>
+<refpurpose>Should verbatim environments be shaded?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="shade.verbatim.frag">&lt;xsl:param name="shade.verbatim" select="0"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="shade.verbatim.style">
+<refmeta>
+<refentrytitle>shade.verbatim.style</refentrytitle>
+<refmiscinfo role="type"/>
+</refmeta>
+<refnamediv>
+<refname>shade.verbatim.style</refname>
+<refpurpose>Properties that specify the style of shaded verbatim listings</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="shade.verbatim.style.frag">
+&lt;xsl:attribute-set name="shade.verbatim.style"&gt;
+  &lt;xsl:attribute name="border"&gt;0&lt;/xsl:attribute&gt;
+  &lt;xsl:attribute name="bgcolor"&gt;#E0E0E0&lt;/xsl:attribute&gt;
+&lt;/xsl:attribute-set&gt;
+
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="punct.honorific">
+<refmeta>
+<refentrytitle>punct.honorific</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>punct.honorific</refname>
+<refpurpose>Punctuation after an honorific in a personal name.</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="punct.honorific.frag">
+&lt;xsl:param name="punct.honorific" select="'.'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This parameter specifies the punctuation that should be added after an
+honorific in a personal name.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="segmentedlist.as.table">
+<refmeta>
+<refentrytitle>segmentedlist.as.table</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>segmentedlist.as.table</refname>
+<refpurpose>Format segmented lists as tables?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="segmentedlist.as.table.frag">
+&lt;xsl:param name="segmentedlist.as.table" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, <sgmltag>segmentedlist</sgmltag>s will be formatted as
+tables.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="variablelist.as.table">
+<refmeta>
+<refentrytitle>variablelist.as.table</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>variablelist.as.table</refname>
+<refpurpose>Format <sgmltag>variablelist</sgmltag>s as tables?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="variablelist.as.table.frag">
+&lt;xsl:param name="variablelist.as.table" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, <sgmltag>variablelist</sgmltag>s will be formatted as
+tables.</para>
+
+<para>This parameter only applys to the HTML transformations. In the
+FO case, proper list markup is robust enough to handle the formatting.
+But see also <parameter moreinfo="none">variablelist.as.blocks</parameter>.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="tex.math.in.alt">
+<refmeta>
+<refentrytitle>tex.math.in.alt</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>tex.math.in.alt</refname>
+<refpurpose>TeX notation used for equations</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="tex.math.in.alt.frag">
+&lt;xsl:param name="tex.math.in.alt" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want type math directly in TeX notation in equations,
+this parameter specifies notation used. Currently are supported two
+values -- <literal moreinfo="none">plain</literal> and <literal moreinfo="none">latex</literal>. Empty
+value means that you are not using TeX math at all.</para>
+
+<para>Preferred way for including TeX alternative of math is inside of
+<sgmltag>textobject</sgmltag> element. Eg.:</para>
+
+<programlisting format="linespecific">&lt;inlineequation&gt;
+&lt;inlinemediaobject&gt;
+&lt;imageobject&gt;
+&lt;imagedata fileref="eq1.gif"/&gt;
+&lt;/imageobject&gt;
+&lt;textobject&gt;&lt;phrase&gt;E=mc squared&lt;/phrase&gt;&lt;/textobject&gt;
+&lt;textobject role="tex"&gt;&lt;phrase&gt;E=mc^2&lt;/phrase&gt;&lt;/textobject&gt;
+&lt;/inlinemediaobject&gt;
+&lt;/inlineequation&gt;</programlisting>
+
+<para>If you are using <sgmltag>graphic</sgmltag> element, you can
+store TeX inside <sgmltag>alt</sgmltag> element:</para>
+
+<programlisting format="linespecific">&lt;inlineequation&gt;
+&lt;alt role="tex"&gt;a^2+b^2=c^2&lt;/alt&gt;
+&lt;graphic fileref="a2b2c2.gif"/&gt;  
+&lt;/inlineequation&gt;</programlisting>
+
+<para>If you want use this feature, you should process your FO with
+PassiveTeX, which only supports TeX math notation. When calling
+stylsheet, don't forget to specify also
+passivetex.extensions=1.</para>
+
+<para>If you want equations in HTML, just process generated file
+<filename moreinfo="none">tex-math-equations.tex</filename> by TeX or LaTeX. Then run
+dvi2bitmap program on result DVI file. You will get images for
+equations in your document.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="tex.math.file">
+<refmeta>
+<refentrytitle>tex.math.file</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>tex.math.file</refname>
+<refpurpose>Name of temporary file for generating images from equations</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="tex.math.file.frag">
+&lt;xsl:param name="tex.math.file" select="'tex-math-equations.tex'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Name of auxiliary file for TeX equations. This file can be
+processed by dvi2bitmap to get bitmap versions of equations for HTML
+output.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="tex.math.delims">
+<refmeta>
+<refentrytitle>tex.math.delims</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>tex.math.delims</refname>
+<refpurpose>Should be equations outputed for processing by TeX
+automatically surrounded by math mode delimiters</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="tex.math.delims.frag">
+&lt;xsl:param name="tex.math.delims" select="'1'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>For compatibility with DSSSL based DBTeXMath from Allin Cottrell
+you should set this parameter to 0.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="pixels.per.inch">
+<refmeta>
+<refentrytitle>pixels.per.inch</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>pixels.per.inch</refname>
+<refpurpose>How many pixels are there per inch?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="pixels.per.inch.frag">
+&lt;xsl:param name="pixels.per.inch" select="90"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>When lengths are converted to pixels, this value is used to
+determine the size of a pixel. The default value is taken from the
+<ulink url="http://www.w3.org/TR/xsl/slice5.html#pixels">XSL
+Recommendation</ulink>.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="points.per.em">
+<refmeta>
+<refentrytitle>points.per.em</refentrytitle>
+<refmiscinfo role="type">number</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>points.per.em</refname>
+<refpurpose>Specify the nominal size of an em-space in points</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="points.per.em.frag">
+&lt;xsl:param name="points.per.em" select="10"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="use.svg">
+<refmeta>
+<refentrytitle>use.svg</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>use.svg</refname>
+<refpurpose>Allow SVG in the result tree?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="use.svg.frag">
+&lt;xsl:param name="use.svg" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, SVG will be considered an acceptable image format. SVG
+is passed through to the result tree, so correct rendering of the resulting
+diagram depends on the formatter (FO processor or web browser) that is used
+to process the output from the stylesheet.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="use.role.as.xrefstyle">
+<refmeta>
+<refentrytitle>use.role.as.xrefstyle</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>use.role.as.xrefstyle</refname>
+<refpurpose>Use <sgmltag class="attribute">role</sgmltag> attribute for
+<sgmltag class="attribute">xrefstyle</sgmltag> on <sgmltag>xref</sgmltag>?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="use.role.as.xrefstyle.frag">
+&lt;xsl:param name="use.role.as.xrefstyle" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, the <sgmltag class="attribute">role</sgmltag> attribute on
+<sgmltag>xref</sgmltag> will be used to select the cross reference style.
+The <ulink url="http://www.oasis-open.org/docbook/">DocBook
+Technical Committee</ulink> recently added an
+<sgmltag class="attribute">xrefstyle</sgmltag> attribute for this purpose.
+If the <sgmltag class="attribute">xrefstyle</sgmltag> attribute
+is present, <sgmltag class="attribute">role</sgmltag> will be ignored, regardless
+of this setting.</para>
+
+<para>Until an official DocBook release that includes the new
+attribute, this flag allows <sgmltag class="attribute">role</sgmltag>
+to serve that purpose.</para>
+
+</refsect1>
+
+<refsect1><title>Example</title>
+
+<para>The following small stylesheet shows how to configure the stylesheets to make
+use of the cross reference style:</para>
+
+<programlisting format="linespecific">&lt;?xml version="1.0"?&gt;
+&lt;xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                version="1.0"&gt;
+
+&lt;xsl:import href="../xsl/html/docbook.xsl"/&gt;
+
+&lt;xsl:output method="html"/&gt;
+
+&lt;xsl:param name="local.l10n.xml" select="document('')"/&gt;
+&lt;l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0"&gt;
+  &lt;l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="en"&gt;
+   &lt;l:context name="xref"&gt;
+      &lt;l:template name="chapter" style="title" text="Chapter %n, %t"/&gt;
+      &lt;l:template name="chapter" text="Chapter %n"/&gt;
+    &lt;/l:context&gt;
+  &lt;/l:l10n&gt;
+&lt;/l:i18n&gt;
+
+&lt;/xsl:stylesheet&gt;</programlisting>
+
+<para>With this stylesheet, the cross references in the following document:</para>
+
+<programlisting format="linespecific">&lt;?xml version="1.0" encoding="utf-8"?&gt;
+&lt;!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+                  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"&gt;
+&lt;book id="book"&gt;&lt;title&gt;Book&lt;/title&gt;
+
+&lt;preface&gt;
+&lt;title&gt;Preface&lt;/title&gt;
+
+&lt;para&gt;Normal: &lt;xref linkend="ch1"/&gt;.&lt;/para&gt;
+&lt;para&gt;Title: &lt;xref xrefstyle="title" linkend="ch1"/&gt;.&lt;/para&gt;
+
+&lt;/preface&gt;
+
+&lt;chapter id="ch1"&gt;
+&lt;title&gt;First Chapter&lt;/title&gt;
+
+&lt;para&gt;Irrelevant.&lt;/para&gt;
+
+&lt;/chapter&gt;
+&lt;/book&gt;</programlisting>
+
+<para>will appear as:</para>
+
+<informalexample>
+<para>Normal: Chapter 1.</para>
+<para>Title: Chapter 1, <emphasis>First Chapter</emphasis>.</para>
+</informalexample>
+</refsect1>
+
+</refentry>
+
+<refentry id="menuchoice.separator">
+<refmeta>
+<refentrytitle>menuchoice.separator</refentrytitle>
+<refmiscinfo role="type"/>
+</refmeta>
+<refnamediv>
+<refname>menuchoice.separator</refname>
+<refpurpose/>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="menuchoice.separator.frag">
+&lt;xsl:param name="menuchoice.separator" select="'+'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Separator used to connect items of a <sgmltag>menuchoice</sgmltag> other
+than <sgmltag>guimenuitem</sgmltag> and <sgmltag>guisubmenu</sgmltag>. The latter
+elements are linked with <parameter moreinfo="none">menuchoice.menu.separator</parameter>.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="menuchoice.menu.separator">
+<refmeta>
+<refentrytitle>menuchoice.menu.separator</refentrytitle>
+<refmiscinfo role="type"/>
+</refmeta>
+<refnamediv>
+<refname>menuchoice.menu.separator</refname>
+<refpurpose/>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="menuchoice.menu.separator.frag">
+&lt;xsl:param name="menuchoice.menu.separator" select="'-&gt;'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Separator used to connect items of a <sgmltag>menuchoice</sgmltag> with
+<sgmltag>guimenuitem</sgmltag> or <sgmltag>guisubmenu</sgmltag>. Other elements
+are linked with <parameter moreinfo="none">menuchoice.separator</parameter>.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="default.float.class">
+<refmeta>
+<refentrytitle>default.float.class</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>default.float.class</refname>
+<refpurpose>Specifies the default float class</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="default.float.class.frag">
+&lt;xsl:param name="default.float.class" select="'before'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="footnote.number.format">
+<refmeta>
+<refentrytitle>footnote.number.format</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>footnote.number.format</refname>
+<refpurpose>Identifies the format used for footnote numbers</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="footnote.number.format.frag">
+&lt;xsl:param name="footnote.number.format" select="'1'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The <parameter moreinfo="none">footnote.number.format</parameter> specifies the format
+to use for footnote numeration (1, i, I, a, or A).</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="table.footnote.number.format">
+<refmeta>
+<refentrytitle>table.footnote.number.format</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>table.footnote.number.format</refname>
+<refpurpose>Identifies the format used for footnote numbers in tables</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="table.footnote.number.format.frag">
+&lt;xsl:param name="table.footnote.number.format" select="'a'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The <parameter moreinfo="none">table.footnote.number.format</parameter> specifies the format
+to use for footnote numeration (1, i, I, a, or A) in tables.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="footnote.number.symbols">
+<refmeta>
+<refentrytitle>footnote.number.symbols</refentrytitle>
+<refmiscinfo role="type"/>
+</refmeta>
+<refnamediv>
+<refname>footnote.number.symbols</refname>
+<refpurpose/>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="footnote.number.symbols.frag">
+&lt;xsl:param name="footnote.number.symbols" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If <parameter moreinfo="none">footnote.number.symbols</parameter> is not the empty string,
+footnotes will use the characters it contains as footnote symbols. For example,
+<quote>*&amp;#x2020;&amp;#x2021;&amp;#x25CA;&amp;#x2720;</quote> will identify
+footnotes with <quote>*</quote>, <quote>†</quote>, <quote>‡</quote>,
+<quote>◊</quote>, and <quote>✠</quote>. If there are more footnotes
+than symbols, the stylesheets will fall back to numbered footnotes using
+<parameter moreinfo="none">footnote.number.format</parameter>.</para>
+
+<para>The use of symbols for footnotes depends on the ability of your
+processor (or browser) to render the symbols you select. Not all systems are
+capable of displaying the full range of Unicode characters. If the quoted characters
+in the preceding paragraph are not displayed properly, that's a good indicator
+that you may have trouble using those symbols for footnotes.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="table.footnote.number.symbols">
+<refmeta>
+<refentrytitle>table.footnote.number.symbols</refentrytitle>
+<refmiscinfo role="type"/>
+</refmeta>
+<refnamediv>
+<refname>table.footnote.number.symbols</refname>
+<refpurpose/>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="table.footnote.number.symbols.frag">
+&lt;xsl:param name="table.footnote.number.symbols" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If <parameter moreinfo="none">table.footnote.number.symbols</parameter> is not the empty string,
+table footnotes will use the characters it contains as footnote symbols. For example,
+<quote>*&amp;#x2020;&amp;#x2021;&amp;#x25CA;&amp;#x2720;</quote> will identify
+footnotes with <quote>*</quote>, <quote>†</quote>, <quote>‡</quote>,
+<quote>◊</quote>, and <quote>✠</quote>. If there are more footnotes
+than symbols, the stylesheets will fall back to numbered footnotes using
+<parameter moreinfo="none">table.footnote.number.format</parameter>.</para>
+
+<para>The use of symbols for footnotes depends on the ability of your
+processor (or browser) to render the symbols you select. Not all systems are
+capable of displaying the full range of Unicode characters. If the quoted characters
+in the preceding paragraph are not displayed properly, that's a good indicator
+that you may have trouble using those symbols for footnotes.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="xref.with.number.and.title">
+<refmeta>
+<refentrytitle>xref.with.number.and.title</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>xref.with.number.and.title</refname>
+<refpurpose>Use number and title in cross references</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="xref.with.number.and.title.frag">
+&lt;xsl:param name="xref.with.number.and.title" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="xref.label-page.separator">
+<refmeta>
+<refentrytitle>xref.label-page.separator</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>xref.label-page.separator</refname>
+<refpurpose>Punctuation or space separating label from page number in xref</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="xref.label-page.separator.frag">&lt;xsl:param name="xref.label-page.separator"&gt;&lt;xsl:text&gt; &lt;/xsl:text&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>
+This parameter allows you to control the punctuation of certain
+types of generated cross reference text.
+When cross reference text is generated for an 
+<sgmltag class="element">xref</sgmltag> or 
+<sgmltag class="element">olink</sgmltag> element
+using an <sgmltag class="attribute">xrefstyle</sgmltag> attribute
+that makes use of the <literal moreinfo="none">select:</literal> feature,
+and the selected components include both label and page
+but no title,
+then the value of this parameter is inserted between
+label and page number in the output.  
+If a title is included, then other separators are used.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="xref.label-title.separator">
+<refmeta>
+<refentrytitle>xref.label-title.separator</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>xref.label-title.separator</refname>
+<refpurpose>Punctuation or space separating label from title in xref</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="xref.label-title.separator.frag">&lt;xsl:param name="xref.label-title.separator"&gt;: &lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>
+This parameter allows you to control the punctuation of certain
+types of generated cross reference text.
+When cross reference text is generated for an 
+<sgmltag class="element">xref</sgmltag> or 
+<sgmltag class="element">olink</sgmltag> element
+using an <sgmltag class="attribute">xrefstyle</sgmltag> attribute
+that makes use of the <literal moreinfo="none">select:</literal> feature,
+and the selected components include both label and title,
+then the value of this parameter is inserted between
+label and title in the output.  
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="xref.title-page.separator">
+<refmeta>
+<refentrytitle>xref.title-page.separator</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>xref.title-page.separator</refname>
+<refpurpose>Punctuation or space separating title from page number in xref</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="xref.title-page.separator.frag">&lt;xsl:param name="xref.title-page.separator"&gt;&lt;xsl:text&gt; &lt;/xsl:text&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>
+This parameter allows you to control the punctuation of certain
+types of generated cross reference text.
+When cross reference text is generated for an 
+<sgmltag class="element">xref</sgmltag> or 
+<sgmltag class="element">olink</sgmltag> element
+using an <sgmltag class="attribute">xrefstyle</sgmltag> attribute
+that makes use of the <literal moreinfo="none">select:</literal> feature,
+and the selected components include both title and page number,
+then the value of this parameter is inserted between
+title and page number in the output.  
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="insert.xref.page.number">
+<refmeta>
+<refentrytitle>insert.xref.page.number</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>insert.xref.page.number</refname>
+<refpurpose>Turns page numbers in xrefs on and off</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="insert.xref.page.number.frag">
+&lt;xsl:param name="insert.xref.page.number"&gt;no&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The value of this parameter determines if
+cross references (<sgmltag>xref</sgmltag>s) in
+printed output will
+include page number citations.
+It has three possible values.
+</para>
+<variablelist>
+<section>
+<term>no</term>
+<listitem><para>No page number references will be generated.
+</para></listitem>
+</section>
+<section>
+<term>yes</term>
+<listitem><para>Page number references will be generated
+for all <sgmltag>xref</sgmltag> elements.
+The style of page reference may be changed
+if an <sgmltag class="attribute">xrefstyle</sgmltag>
+attribute is used.
+</para></listitem>
+</section>
+<section>
+<term>maybe</term>
+<listitem><para>Page number references will not be generated
+for an <sgmltag>xref</sgmltag> element unless 
+it has an
+<sgmltag class="attribute">xrefstyle</sgmltag>
+attribute whose value specifies a page reference.
+</para></listitem>
+</section>
+</variablelist>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+<reference><title>Graphics</title>
+<refentry id="graphic.default.extension">
+<refmeta>
+<refentrytitle>graphic.default.extension</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>graphic.default.extension</refname>
+<refpurpose>Default extension for graphic filenames</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="graphic.default.extension.frag">&lt;xsl:param name="graphic.default.extension"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If a <sgmltag>graphic</sgmltag> or <sgmltag>mediaobject</sgmltag>
+includes a reference to a filename that does not include an extension,
+and the <sgmltag class="attribute">format</sgmltag> attribute is
+<emphasis>unspecified</emphasis>, the default extension will be used.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="default.image.width">
+<refmeta>
+<refentrytitle>default.image.width</refentrytitle>
+<refmiscinfo role="type">length</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>default.image.width</refname>
+<refpurpose>The default width of images</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="default.image.width.frag">
+&lt;xsl:param name="default.image.width" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If specified, this value will be used for the
+<sgmltag class="attribute">width</sgmltag> attribute on
+images that do not specify any
+<ulink url="http://docbook.org/tdg/en/html/imagedata.html#viewport.area">viewport
+dimensions</ulink>.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="nominal.image.width">
+<refmeta>
+<refentrytitle>nominal.image.width</refentrytitle>
+<refmiscinfo role="type">length</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>nominal.image.width</refname>
+<refpurpose>The nominal image width</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="nominal.image.width.frag">
+&lt;xsl:param name="nominal.image.width" select="6 * $pixels.per.inch"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Graphic widths expressed as a percentage are problematic. In the
+following discussion, we speak of width and contentwidth, but
+the same issues apply to depth and contentdepth.</para>
+
+<para>A width of 50% means "half of the available space for the image."
+That's fine. But note that in HTML, this is a dynamic property and
+the image size will vary if the browser window is resized.</para>
+
+<para>A contentwidth of 50% means "half of the actual image width".
+But what does that mean if the stylesheets cannot assess the image's
+actual size? Treating this as a width of 50% is one possibility, but
+it produces behavior (dynamic scaling) that seems entirely out of
+character with the meaning.</para>
+
+<para>Instead, the stylesheets define a
+<parameter moreinfo="none">nominal.image.width</parameter> and convert percentages to
+actual values based on that nominal size.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="nominal.image.depth">
+<refmeta>
+<refentrytitle>nominal.image.depth</refentrytitle>
+<refmiscinfo role="type">length</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>nominal.image.depth</refname>
+<refpurpose>Nominal image depth</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="nominal.image.depth.frag">
+&lt;xsl:param name="nominal.image.depth" select="4 * $pixels.per.inch"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>See <parameter moreinfo="none">nominal.image.width</parameter>.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="use.embed.for.svg">
+<refmeta>
+<refentrytitle>use.embed.for.svg</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>use.embed.for.svg</refname>
+<refpurpose>Use HTML <sgmltag>embed</sgmltag> for SVG?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="use.embed.for.svg.frag">
+&lt;xsl:param name="use.embed.for.svg" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, an <sgmltag>embed</sgmltag> element will be created for
+SVG figures. An <sgmltag>object</sgmltag> is <emphasis>always</emphasis> created,
+this parameter merely controls whether or not an additional <sgmltag>embed</sgmltag>
+is generated inside the <sgmltag>object</sgmltag>.</para>
+
+<para>On the plus side, this may be more portable among browsers and plug-ins.
+On the minus side, it isn't valid HTML.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="make.graphic.viewport">
+<refmeta>
+<refentrytitle>make.graphic.viewport</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>make.graphic.viewport</refname>
+<refpurpose>Use tables in HTML to make viewports for graphics</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="make.graphic.viewport.frag">
+&lt;xsl:param name="make.graphic.viewport" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The HTML <sgmltag>img</sgmltag> element only supports the notion
+of content-area scaling; it doesn't support the distinction between a
+content-area and a viewport-area, so we have to make some compromises.</para>
+
+<para>If <parameter moreinfo="none">make.graphic.viewport</parameter> is non-zero, a table
+will be used to frame the image. This creates an effective viewport-area.
+</para>
+
+<para>Tables and alignment don't work together, so this parameter is ignored
+if alignment is specified on an image.</para>
+</refsect1>
+</refentry>
+
+<refentry id="preferred.mediaobject.role">
+<refmeta>
+<refentrytitle>preferred.mediaobject.role</refentrytitle>
+</refmeta>
+<refnamediv>
+<refname>preferred.mediaobject.role</refname>
+<refpurpose>Select which mediaobject to use based on
+this value of an object's <sgmltag class="attribute">role</sgmltag> attribute.
+</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="preferred.mediaobject.role.frag">
+&lt;xsl:param name="preferred.mediaobject.role"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>A mediaobject may contain several objects such as imageobjects.
+If the parameter <parameter moreinfo="none">use.role.for.mediaobject</parameter>
+is non-zero, then the <sgmltag class="attribute">role</sgmltag> attribute on
+<sgmltag>imageobject</sgmltag>s and other objects within a <sgmltag>mediaobject</sgmltag> container will be used to select which object will be
+used.  If one of the objects has a role value that matches the
+preferred.mediaobject.role parameter, then it has first
+priority for selection.  If more than one has such a
+role value, the first one is used.
+</para>
+<para>
+See the <parameter moreinfo="none">use.role.for.mediaobject</parameter> parameter
+for the sequence of selection.</para>
+</refsect1>
+</refentry>
+
+<refentry id="use.role.for.mediaobject">
+<refmeta>
+<refentrytitle>use.role.for.mediaobject</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>use.role.for.mediaobject</refname>
+<refpurpose>Use <sgmltag class="attribute">role</sgmltag> attribute 
+value for selecting which of several objects within a mediaobject to use.
+</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="use.role.for.mediaobject.frag">
+&lt;xsl:param name="use.role.for.mediaobject" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, the <sgmltag class="attribute">role</sgmltag> attribute on
+<sgmltag>imageobject</sgmltag>s or other objects within a <sgmltag>mediaobject</sgmltag> container will be used to select which object will be
+used.
+</para>
+<para>
+The order of selection when then parameter is non-zero is:
+</para>
+<orderedlist inheritnum="ignore" continuation="restarts">
+<listitem>
+    <para>If the stylesheet parameter <parameter moreinfo="none">preferred.mediaobject.role</parameter> has a value, then the object whose role equals that value is selected.</para>
+</listitem>
+<listitem>
+<para>Else if an object's role attribute has a value of
+<literal moreinfo="none">html</literal> for HTML processing or
+<literal moreinfo="none">fo</literal> for FO output, then the first
+of such objects is selected.
+</para>
+</listitem>
+<listitem>
+<para>Else the first suitable object is selected.</para>
+</listitem>
+</orderedlist>
+<para>
+If the value of 
+<parameter moreinfo="none">use.role.for.mediaobject</parameter>
+is zero, then role attributes are not considered
+and the first suitable object
+with or without a role value is used.
+</para>
+</refsect1>
+</refentry>
+
+<refentry id="ignore.image.scaling">
+<refmeta>
+<refentrytitle>ignore.image.scaling</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>ignore.image.scaling</refname>
+<refpurpose>Tell the stylesheets to ignore the author's image scaling attributes</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="ignore.image.scaling.frag">
+&lt;xsl:param name="ignore.image.scaling" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, the scaling attributes on graphics and media objects are
+ignored.</para>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+<reference><title>Chunking</title>
+<refentry id="chunker.output.cdata-section-elements">
+<refmeta>
+<refentrytitle>chunker.output.cdata-section-elements</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>chunker.output.cdata-section-elements</refname>
+<refpurpose>List of elements to escape with CDATA sections</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>&lt;xsl:param name="chunker.output.cdata-section-elements" select="''"/&gt;
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This parameter specifies the list of elements that should be escaped
+as CDATA sections by the chunking stylesheet.  Not all processors support
+specification of this parameter.
+</para>
+
+<note>
+<para>This parameter is documented here, but the declaration is actually
+in the <filename moreinfo="none">chunker.xsl</filename> stylesheet module.</para>
+</note>
+
+</refsect1>
+</refentry>
+
+<refentry id="chunker.output.doctype-public">
+<refmeta>
+<refentrytitle>chunker.output.doctype-public</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>chunker.output.doctype-public</refname>
+<refpurpose>Public identifer to use in the document type of generated pages</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>&lt;xsl:param name="chunker.output.doctype-public" select="''"/&gt;
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This parameter specifies the public identifier that should be used by
+the chunking stylesheet in the document type declaration of chunked pages.
+Not all processors support specification of
+this parameter.
+</para>
+
+<note>
+<para>This parameter is documented here, but the declaration is actually
+in the <filename moreinfo="none">chunker.xsl</filename> stylesheet module.</para>
+</note>
+
+</refsect1>
+</refentry>
+
+<refentry id="chunker.output.doctype-system">
+<refmeta>
+<refentrytitle>chunker.output.doctype-system</refentrytitle>
+<refmiscinfo role="type">uri</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>chunker.output.doctype-system</refname>
+<refpurpose>System identifier to use for the document type in generated pages</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>&lt;xsl:param name="chunker.output.doctype-system" select="''"/&gt;
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This parameter specifies the system identifier that should be used by
+the chunking stylesheet in the document type declaration of chunked pages.
+Not all processors support specification of
+this parameter.
+</para>
+
+<note>
+<para>This parameter is documented here, but the declaration is actually
+in the <filename moreinfo="none">chunker.xsl</filename> stylesheet module.</para>
+</note>
+
+</refsect1>
+</refentry>
+
+<refentry id="chunker.output.encoding">
+<refmeta>
+<refentrytitle>chunker.output.encoding</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>chunker.output.encoding</refname>
+<refpurpose>Encoding used in generated pages</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>&lt;xsl:param name="chunker.output.encoding" select="'ISO-8859-1'"/&gt;
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This parameter specifies the encoding to be used in files
+generated by the chunking stylesheet. Not all processors support
+specification of this parameter.
+</para>
+
+<para>This parameter used to be named <literal moreinfo="none">default.encoding</literal>.</para>
+
+<note>
+<para>This parameter is documented here, but the declaration is actually
+in the <filename moreinfo="none">chunker.xsl</filename> stylesheet module.</para>
+</note>
+
+</refsect1>
+</refentry>
+
+<refentry id="chunker.output.indent">
+<refmeta>
+<refentrytitle>chunker.output.indent</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>chunker.output.indent</refname>
+<refpurpose>Specification of indentation on generated pages</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>&lt;xsl:param name="chunker.output.indent" select="'no'"/&gt;
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This parameter specifies the value of the indent
+specification for generated pages. Not all processors support
+specification of this parameter.
+</para>
+
+<note>
+<para>This parameter is documented here, but the declaration is actually
+in the <filename moreinfo="none">chunker.xsl</filename> stylesheet module.</para>
+</note>
+
+</refsect1>
+</refentry>
+
+<refentry id="chunker.output.media-type">
+<refmeta>
+<refentrytitle>chunker.output.media-type</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>chunker.output.media-type</refname>
+<refpurpose>Media type to use in generated pages</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>&lt;xsl:param name="chunker.output.media-type" select="''"/&gt;
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This parameter specifies the media type that should be used by
+the chunking stylesheet. Not all processors support specification of
+this parameter.
+</para>
+
+<note>
+<para>This parameter is documented here, but the declaration is actually
+in the <filename moreinfo="none">chunker.xsl</filename> stylesheet module.</para>
+</note>
+
+</refsect1>
+</refentry>
+
+<refentry id="chunker.output.method">
+<refmeta>
+<refentrytitle>chunker.output.method</refentrytitle>
+<refmiscinfo role="type">list</refmiscinfo>
+<refmiscinfo role="value">html</refmiscinfo>
+<refmiscinfo role="value">xml</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>chunker.output.method</refname>
+<refpurpose>Method used in generated pages</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>&lt;xsl:param name="chunker.output.method" select="'html'"/&gt;
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This parameter specifies the output method to be used in files
+generated by the chunking stylesheet.
+</para>
+
+<para>This parameter used to be named <literal moreinfo="none">output.method</literal>.</para>
+
+<note>
+<para>This parameter is documented here, but the declaration is actually
+in the <filename moreinfo="none">chunker.xsl</filename> stylesheet module.</para>
+</note>
+
+</refsect1>
+</refentry>
+
+<refentry id="chunker.output.omit-xml-declaration">
+<refmeta>
+<refentrytitle>chunker.output.omit-xml-declaration</refentrytitle>
+<refmiscinfo role="type"/>
+</refmeta>
+<refnamediv>
+<refname>chunker.output.omit-xml-declaration</refname>
+<refpurpose>Omit-xml-declaration for generated pages</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>&lt;xsl:param name="chunker.output.omit-xml-declaration" select="'no'"/&gt;
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This parameter specifies the value of the omit-xml-declaration
+specification for generated pages. Not all processors support
+specification of this parameter.
+</para>
+
+<note>
+<para>This parameter is documented here, but the declaration is actually
+in the <filename moreinfo="none">chunker.xsl</filename> stylesheet module.</para>
+</note>
+
+</refsect1>
+</refentry>
+
+<refentry id="chunker.output.standalone">
+<refmeta>
+<refentrytitle>chunker.output.standalone</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>chunker.output.standalone</refname>
+<refpurpose>Standalone declaration for generated pages</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>&lt;xsl:param name="chunker.output.standalone" select="'no'"/&gt;
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This parameter specifies the value of the standalone
+specification for generated pages. Not all processors support
+specification of this parameter.
+</para>
+
+<note>
+<para>This parameter is documented here, but the declaration is actually
+in the <filename moreinfo="none">chunker.xsl</filename> stylesheet module.</para>
+</note>
+
+</refsect1>
+</refentry>
+
+<refentry id="saxon.character.representation">
+<refmeta>
+<refentrytitle>saxon.character.representation</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>saxon.character.representation</refname>
+<refpurpose>Saxon character representation used in generated HTML pages</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>&lt;xsl:param name="saxon.character.representation" select="'entity;decimal'"/&gt;
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This character representation is used in files generated by chunking stylesheet. If
+you want to suppress entity references for characters with direct representation 
+in default.encoding, set this parameter to value <literal moreinfo="none">native</literal>. 
+</para>
+
+<note>
+<para>This parameter is documented here, but the declaration is actually
+in the <filename moreinfo="none">chunker.xsl</filename> stylesheet module.</para>
+</note>
+
+</refsect1>
+</refentry>
+
+<refentry id="html.ext">
+<refmeta>
+<refentrytitle>html.ext</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>html.ext</refname>
+<refpurpose>Identifies the extension of generated HTML files</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="html.ext.frag">
+&lt;xsl:param name="html.ext" select="'.html'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The extension identified by <parameter moreinfo="none">html.ext</parameter> will
+be used as the filename extension for chunks created by this stylesheet.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="html.extra.head.links">
+<refmeta>
+<refentrytitle>html.extra.head.links</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>html.extra.head.links</refname>
+<refpurpose>Toggle extra HTML head link information</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="html.extra.head.links.frag">
+&lt;xsl:param name="html.extra.head.links" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, extra <sgmltag>link</sgmltag> elements will be
+generated in the <sgmltag>head</sgmltag> of chunked HTML files. These
+extra links point to chapters, appendixes, sections, etc. as supported
+by the <quote>Site Navigation Bar</quote> in Mozilla 1.0 (as of CR1, at least).
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="root.filename">
+<refmeta>
+<refentrytitle>root.filename</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>root.filename</refname>
+<refpurpose>Identifies the name of the root HTML file when chunking</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="root.filename.frag">&lt;xsl:param name="root.filename" select="'index'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The <parameter moreinfo="none">root.filename</parameter> is the base filename for
+the chunk created for the root of each document processed.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="base.dir">
+<refmeta>
+<refentrytitle>base.dir</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>base.dir</refname>
+<refpurpose>The base directory of chunks</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="base.dir.frag">&lt;xsl:param name="base.dir" select="''"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If specified, the <literal moreinfo="none">base.dir</literal> identifies
+the output directory for chunks. (If not specified, the output directory
+is system dependent.)</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="generate.manifest">
+  <refmeta>
+    <refentrytitle>generate.manifest</refentrytitle>
+    <refmiscinfo role="type">boolean</refmiscinfo>
+  </refmeta>
+  <refnamediv>
+    <refname>generate.manifest</refname>
+    <refpurpose>Generate a manifest file?</refpurpose>
+  </refnamediv>
+
+  <refsynopsisdiv>
+    <programlisting id="generate.manifest.frag">&lt;xsl:param name="generate.manifest" select="0"&gt;&lt;/xsl:param&gt;</programlisting>
+  </refsynopsisdiv>
+
+  <refsect1><title>Description</title>
+
+    <para>If non-zero, a list of HTML files generated by the
+      stylesheet transformation is written to the file named by
+      the <parameter moreinfo="none">manifest</parameter> parameter.</para>
+
+  </refsect1>
+</refentry>
+
+<refentry id="manifest">
+  <refmeta>
+    <refentrytitle>manifest</refentrytitle>
+    <refmiscinfo role="type">string</refmiscinfo>
+  </refmeta>
+  <refnamediv>
+    <refname>manifest</refname>
+    <refpurpose>Name of manifest file</refpurpose>
+  </refnamediv>
+
+  <refsynopsisdiv>
+    <programlisting id="manifest.frag">&lt;xsl:param name="manifest" select="'HTML.manifest'"&gt;&lt;/xsl:param&gt;</programlisting>
+  </refsynopsisdiv>
+
+  <refsect1><title>Description</title>
+
+    <para>The name of the file to which a manifest is written (if the
+      value of the <parameter moreinfo="none">generate.manifest</parameter> parameter
+      is non-zero).</para>
+
+  </refsect1>
+</refentry>
+
+<refentry id="manifest.in.base.dir">
+<refmeta>
+<refentrytitle>manifest.in.base.dir</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>manifest.in.base.dir</refname>
+<refpurpose>Should be manifest file written in $base.dir?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="manifest.in.base.dir.frag">
+&lt;xsl:param name="manifest.in.base.dir" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero manifest file and project files for HTML Help and
+Eclipse Help are written into <parameter moreinfo="none">base.dir</parameter> instead
+of current directory.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="chunk.toc">
+<refmeta>
+<refentrytitle>chunk.toc</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>chunk.toc</refname>
+<refpurpose>An explicit TOC to be used for chunking</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="chunk.toc.frag">
+&lt;xsl:param name="chunk.toc" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The <parameter moreinfo="none">chunk.toc</parameter> identifies an explicit TOC that
+will be used for chunking. This parameter is only used by the
+<filename moreinfo="none">chunktoc.xsl</filename> stylesheet (and customization layers built
+from it).</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="chunk.tocs.and.lots">
+<refmeta>
+<refentrytitle>chunk.tocs.and.lots</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>chunk.tocs.and.lots</refname>
+<refpurpose>Should ToC and LoTs be in separate chunks?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="chunk.tocs.and.lots.frag">
+&lt;xsl:param name="chunk.tocs.and.lots" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, ToC and LoT (List of Examples, List of Figures, etc.)
+will be put in a separate chunk. At the moment, this chunk is not in the
+normal forward/backward navigation list. Instead, a new link is added to the
+navigation footer.</para>
+
+<para>This feature is still somewhat experimental. Feedback welcome.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="chunk.section.depth">
+<refmeta>
+<refentrytitle>chunk.section.depth</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>chunk.section.depth</refname>
+<refpurpose>Depth to which sections should be chunked</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="chunk.section.depth.frag">
+&lt;xsl:param name="chunk.section.depth" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This parameter sets the depth of section chunking.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="chunk.first.sections">
+<refmeta>
+<refentrytitle>chunk.first.sections</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>chunk.first.sections</refname>
+<refpurpose>Chunk the first top-level section?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="chunk.first.sections.frag">
+&lt;xsl:param name="chunk.first.sections" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, a chunk will be created for the first top-level
+<sgmltag>sect1</sgmltag> or <sgmltag>section</sgmltag> elements in
+each component. Otherwise, that section will be part of the chunk for
+its parent.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="chunk.quietly">
+<refmeta>
+<refentrytitle>chunk.quietly</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>chunk.quietly</refname>
+<refpurpose>Omit the chunked filename messages.</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="chunk.quietly.frag">
+&lt;xsl:param name="chunk.quietly" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If zero (the default), the XSL processor emits a message naming
+each separate chunk filename as it is being output.
+If nonzero, then the messages are suppressed.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="navig.graphics">
+<refmeta>
+<refentrytitle>navig.graphics</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>navig.graphics</refname>
+<refpurpose>Use graphics in navigational headers and footers?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="navig.graphics.frag">&lt;xsl:param name="navig.graphics" select="0"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), the navigational headers and footers in chunked
+HTML are presented in an alternate style that uses
+graphical icons for Next, Previous, Up, and Home.
+Default graphics are provided in the distribution.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="navig.graphics.extension">
+<refmeta>
+<refentrytitle>navig.graphics.extension</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>navig.graphics.extension</refname>
+<refpurpose>Extension for navigational graphics</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="navig.graphics.extension.frag">&lt;xsl:param name="navig.graphics.extension" select="'.gif'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Sets the filename extension to use on navigational graphics used
+in the headers and footers of chunked HTML.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="navig.graphics.path">
+<refmeta>
+<refentrytitle>navig.graphics.path</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>navig.graphics.path</refname>
+<refpurpose>Path to navigational graphics</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="navig.graphics.path.frag">&lt;xsl:param name="navig.graphics.path"&gt;images/&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Sets the path, probably relative to the directory where the HTML
+files are created, to the navigational graphics used in the
+headers and footers of chunked HTML.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="navig.showtitles">
+<refmeta>
+<refentrytitle>navig.showtitles</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>navig.showtitles</refname>
+<refpurpose>Display titles in HTML headers and footers?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="navig.showtitles.frag">&lt;xsl:param name="navig.showtitles"&gt;1&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero),
+the headers and footers of chunked HTML
+display the titles of the next and previous chunks,
+along with the words 'Next' and 'Previous' (or the
+equivalent graphical icons if navig.graphics is true).
+If false (zero), then only the words 'Next' and 'Previous'
+(or the icons) are displayed.
+</para>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+<reference><title>Profiling</title>
+<partintro>
+<para>Following parameters can be used for attribute value based
+profiling of your document. For more info about profiling look at
+<ulink url="http://docbook.sourceforge.net/projects/xsl/doc/tools/profiling.html">http://docbook.sourceforge.net/projects/xsl/doc/tools/profiling.html</ulink>.</para>
+</partintro>
+<refentry id="profile.arch">
+<refmeta>
+<refentrytitle>profile.arch</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>profile.arch</refname>
+<refpurpose>Target profile for <sgmltag class="attribute">arch</sgmltag>
+attribute</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="profile.arch.frag">
+&lt;xsl:param name="profile.arch" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Value of this parameter specifies profiles which should be
+included in the output. You can specify multiple profiles by
+separating them by semicolon. You can change separator character by
+<link linkend="profile.separator"><parameter moreinfo="none">profile.separator</parameter></link>
+parameter.</para>
+
+<para>This parameter has effect only when you are using profiling
+stylesheets (<filename moreinfo="none">profile-docbook.xsl</filename>,
+<filename moreinfo="none">profile-chunk.xsl</filename>, …) instead of normal
+ones (<filename moreinfo="none">docbook.xsl</filename>,
+<filename moreinfo="none">chunk.xsl</filename>, …).</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="profile.condition">
+<refmeta>
+<refentrytitle>profile.condition</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>profile.condition</refname>
+<refpurpose>Target profile for <sgmltag class="attribute">condition</sgmltag>
+attribute</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="profile.condition.frag">
+&lt;xsl:param name="profile.condition" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Value of this parameter specifies profiles which should be
+included in the output. You can specify multiple profiles by
+separating them by semicolon. You can change separator character by
+<link linkend="profile.separator"><parameter moreinfo="none">profile.separator</parameter></link>
+parameter.</para>
+
+<para>This parameter has effect only when you are using profiling
+stylesheets (<filename moreinfo="none">profile-docbook.xsl</filename>,
+<filename moreinfo="none">profile-chunk.xsl</filename>, …) instead of normal
+ones (<filename moreinfo="none">docbook.xsl</filename>,
+<filename moreinfo="none">chunk.xsl</filename>, …).</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="profile.conformance">
+<refmeta>
+<refentrytitle>profile.conformance</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>profile.conformance</refname>
+<refpurpose>Target profile for <sgmltag class="attribute">conformance</sgmltag>
+attribute</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="profile.conformance.frag">
+&lt;xsl:param name="profile.conformance" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Value of this parameter specifies profiles which should be
+included in the output. You can specify multiple profiles by
+separating them by semicolon. You can change separator character by
+<link linkend="profile.separator"><parameter moreinfo="none">profile.separator</parameter></link>
+parameter.</para>
+
+<para>This parameter has effect only when you are using profiling
+stylesheets (<filename moreinfo="none">profile-docbook.xsl</filename>,
+<filename moreinfo="none">profile-chunk.xsl</filename>, …) instead of normal
+ones (<filename moreinfo="none">docbook.xsl</filename>,
+<filename moreinfo="none">chunk.xsl</filename>, …).</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="profile.lang">
+<refmeta>
+<refentrytitle>profile.lang</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>profile.lang</refname>
+<refpurpose>Target profile for <sgmltag class="attribute">lang</sgmltag>
+attribute</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="profile.lang.frag">
+&lt;xsl:param name="profile.lang" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Value of this parameter specifies profiles which should be
+included in the output. You can specify multiple profiles by
+separating them by semicolon. You can change separator character by
+<link linkend="profile.separator"><parameter moreinfo="none">profile.separator</parameter></link>
+parameter.</para>
+
+<para>This parameter has effect only when you are using profiling
+stylesheets (<filename moreinfo="none">profile-docbook.xsl</filename>,
+<filename moreinfo="none">profile-chunk.xsl</filename>, …) instead of normal
+ones (<filename moreinfo="none">docbook.xsl</filename>,
+<filename moreinfo="none">chunk.xsl</filename>, …).</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="profile.os">
+<refmeta>
+<refentrytitle>profile.os</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>profile.os</refname>
+<refpurpose>Target profile for <sgmltag class="attribute">os</sgmltag>
+attribute</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="profile.os.frag">
+&lt;xsl:param name="profile.os" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Value of this parameter specifies profiles which should be
+included in the output. You can specify multiple profiles by
+separating them by semicolon. You can change separator character by
+<link linkend="profile.separator"><parameter moreinfo="none">profile.separator</parameter></link>
+parameter.</para>
+
+<para>This parameter has effect only when you are using profiling
+stylesheets (<filename moreinfo="none">profile-docbook.xsl</filename>,
+<filename moreinfo="none">profile-chunk.xsl</filename>, …) instead of normal
+ones (<filename moreinfo="none">docbook.xsl</filename>,
+<filename moreinfo="none">chunk.xsl</filename>, …).</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="profile.revision">
+<refmeta>
+<refentrytitle>profile.revision</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>profile.revision</refname>
+<refpurpose>Target profile for <sgmltag class="attribute">revision</sgmltag>
+attribute</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="profile.revision.frag">
+&lt;xsl:param name="profile.revision" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Value of this parameter specifies profiles which should be
+included in the output. You can specify multiple profiles by
+separating them by semicolon. You can change separator character by
+<link linkend="profile.separator"><parameter moreinfo="none">profile.separator</parameter></link>
+parameter.</para>
+
+<para>This parameter has effect only when you are using profiling
+stylesheets (<filename moreinfo="none">profile-docbook.xsl</filename>,
+<filename moreinfo="none">profile-chunk.xsl</filename>, …) instead of normal
+ones (<filename moreinfo="none">docbook.xsl</filename>,
+<filename moreinfo="none">chunk.xsl</filename>, …).</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="profile.revisionflag">
+<refmeta>
+<refentrytitle>profile.revisionflag</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>profile.revisionflag</refname>
+<refpurpose>Target profile for <sgmltag class="attribute">revisionflag</sgmltag>
+attribute</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="profile.revisionflag.frag">
+&lt;xsl:param name="profile.revisionflag" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Value of this parameter specifies profiles which should be
+included in the output. You can specify multiple profiles by
+separating them by semicolon. You can change separator character by
+<link linkend="profile.separator"><parameter moreinfo="none">profile.separator</parameter></link>
+parameter.</para>
+
+<para>This parameter has effect only when you are using profiling
+stylesheets (<filename moreinfo="none">profile-docbook.xsl</filename>,
+<filename moreinfo="none">profile-chunk.xsl</filename>, …) instead of normal
+ones (<filename moreinfo="none">docbook.xsl</filename>,
+<filename moreinfo="none">chunk.xsl</filename>, …).</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="profile.role">
+<refmeta>
+<refentrytitle>profile.role</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>profile.role</refname>
+<refpurpose>Target profile for <sgmltag class="attribute">role</sgmltag>
+attribute</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="profile.role.frag">
+&lt;xsl:param name="profile.role" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Value of this parameter specifies profiles which should be
+included in the output. You can specify multiple profiles by
+separating them by semicolon. You can change separator character by
+<link linkend="profile.separator"><parameter moreinfo="none">profile.separator</parameter></link>
+parameter.</para>
+
+<para>This parameter has effect only when you are using profiling
+stylesheets (<filename moreinfo="none">profile-docbook.xsl</filename>,
+<filename moreinfo="none">profile-chunk.xsl</filename>, …) instead of normal
+ones (<filename moreinfo="none">docbook.xsl</filename>,
+<filename moreinfo="none">chunk.xsl</filename>, …).</para>
+
+<warning>
+<para>Note that <sgmltag class="attribute">role</sgmltag> is often
+used for other purposes than profiling. For example it is commonly
+used to get emphasize in bold font:</para>
+
+<programlisting format="linespecific">&lt;emphasis role="bold"&gt;very important&lt;/emphasis&gt;</programlisting>
+
+<para>If you are using <sgmltag class="attribute">role</sgmltag> for
+these purposes do not forget to add values like <literal moreinfo="none">bold</literal> to
+value of this parameter. If you forgot you will get document with
+small pieces missing which are very hard to track.</para>
+
+<para>For this reason it is not recommended to use <sgmltag class="attribute">role</sgmltag> attribute for profiling. You should
+rather use profiling specific attributes like <sgmltag class="attribute">userlevel</sgmltag>, <sgmltag class="attribute">os</sgmltag>, <sgmltag class="attribute">arch</sgmltag>, <sgmltag class="attribute">condition</sgmltag>, etc.</para>
+</warning>
+
+</refsect1>
+</refentry>
+
+<refentry id="profile.security">
+<refmeta>
+<refentrytitle>profile.security</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>profile.security</refname>
+<refpurpose>Target profile for <sgmltag class="attribute">security</sgmltag>
+attribute</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="profile.security.frag">
+&lt;xsl:param name="profile.security" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Value of this parameter specifies profiles which should be
+included in the output. You can specify multiple profiles by
+separating them by semicolon. You can change separator character by
+<link linkend="profile.separator"><parameter moreinfo="none">profile.separator</parameter></link>
+parameter.</para>
+
+<para>This parameter has effect only when you are using profiling
+stylesheets (<filename moreinfo="none">profile-docbook.xsl</filename>,
+<filename moreinfo="none">profile-chunk.xsl</filename>, …) instead of normal
+ones (<filename moreinfo="none">docbook.xsl</filename>,
+<filename moreinfo="none">chunk.xsl</filename>, …).</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="profile.userlevel">
+<refmeta>
+<refentrytitle>profile.userlevel</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>profile.userlevel</refname>
+<refpurpose>Target profile for <sgmltag class="attribute">userlevel</sgmltag>
+attribute</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="profile.userlevel.frag">
+&lt;xsl:param name="profile.userlevel" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Value of this parameter specifies profiles which should be
+included in the output. You can specify multiple profiles by
+separating them by semicolon. You can change separator character by
+<link linkend="profile.separator"><parameter moreinfo="none">profile.separator</parameter></link>
+parameter.</para>
+
+<para>This parameter has effect only when you are using profiling
+stylesheets (<filename moreinfo="none">profile-docbook.xsl</filename>,
+<filename moreinfo="none">profile-chunk.xsl</filename>, …) instead of normal
+ones (<filename moreinfo="none">docbook.xsl</filename>,
+<filename moreinfo="none">chunk.xsl</filename>, …).</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="profile.vendor">
+<refmeta>
+<refentrytitle>profile.vendor</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>profile.vendor</refname>
+<refpurpose>Target profile for <sgmltag class="attribute">vendor</sgmltag>
+attribute</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="profile.vendor.frag">
+&lt;xsl:param name="profile.vendor" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Value of this parameter specifies profiles which should be
+included in the output. You can specify multiple profiles by
+separating them by semicolon. You can change separator character by
+<link linkend="profile.separator"><parameter moreinfo="none">profile.separator</parameter></link>
+parameter.</para>
+
+<para>This parameter has effect only when you are using profiling
+stylesheets (<filename moreinfo="none">profile-docbook.xsl</filename>,
+<filename moreinfo="none">profile-chunk.xsl</filename>, …) instead of normal
+ones (<filename moreinfo="none">docbook.xsl</filename>,
+<filename moreinfo="none">chunk.xsl</filename>, …).</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="profile.attribute">
+<refmeta>
+<refentrytitle>profile.attribute</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>profile.attribute</refname>
+<refpurpose>Name of user-specified profiling attribute</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="profile.attribute.frag">
+&lt;xsl:param name="profile.attribute" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This parameter is used in conjuction with <link linkend="profile.value"><parameter moreinfo="none">profile.value</parameter></link>.</para>
+
+<para>This parameter has effect only when you are using profiling
+stylesheets (<filename moreinfo="none">profile-docbook.xsl</filename>,
+<filename moreinfo="none">profile-chunk.xsl</filename>, …) instead of normal
+ones (<filename moreinfo="none">docbook.xsl</filename>,
+<filename moreinfo="none">chunk.xsl</filename>, …).</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="profile.value">
+<refmeta>
+<refentrytitle>profile.value</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>profile.value</refname>
+<refpurpose>Target profile for user-specified attribute</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="profile.value.frag">
+&lt;xsl:param name="profile.value" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>When you are using this parameter you must also specify name of
+profiling attribute with parameter <link linkend="profile.attribute"><parameter moreinfo="none">profile.attribute</parameter></link>.</para>
+
+<para>Value of this parameter specifies profiles which should be
+included in the output. You can specify multiple profiles by
+separating them by semicolon. You can change separator character by
+<link linkend="profile.separator"><parameter moreinfo="none">profile.separator</parameter></link>
+parameter.</para>
+
+<para>This parameter has effect only when you are using profiling
+stylesheets (<filename moreinfo="none">profile-docbook.xsl</filename>,
+<filename moreinfo="none">profile-chunk.xsl</filename>, …) instead of normal
+ones (<filename moreinfo="none">docbook.xsl</filename>,
+<filename moreinfo="none">chunk.xsl</filename>, …).</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="profile.separator">
+<refmeta>
+<refentrytitle>profile.separator</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>profile.separator</refname>
+<refpurpose>Separator character for compound profile values</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="profile.separator.frag">
+&lt;xsl:param name="profile.separator" select="';'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Separator character for compound profile values.</para>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+<reference><title>HTML Help</title>
+<refentry id="htmlhelp.encoding">
+<refmeta>
+<refentrytitle>htmlhelp.encoding</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.encoding</refname>
+<refpurpose>Character encoding to use in files for HTML Help compiler.</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.encoding.frag">
+&lt;xsl:param name="htmlhelp.encoding" select="'iso-8859-1'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>HTML Help Compiler is not UTF-8 aware, so you should always use
+apropriate single-byte encoding here.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.autolabel">
+<refmeta>
+<refentrytitle>htmlhelp.autolabel</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.autolabel</refname>
+<refpurpose>Should tree-like ToC use autonumbering feature?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.autolabel.frag">
+&lt;xsl:param name="htmlhelp.autolabel" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want to include chapter and section numbers into ToC in
+the left panel, set this parameter to 1.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.chm">
+<refmeta>
+<refentrytitle>htmlhelp.chm</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.chm</refname>
+<refpurpose>Filename of output HTML Help file.</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.chm.frag">
+&lt;xsl:param name="htmlhelp.chm" select="'htmlhelp.chm'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Change this parameter if you want different name of result
+CHM file than htmlhelp.chm.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.default.topic">
+<refmeta>
+<refentrytitle>htmlhelp.default.topic</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.default.topic</refname>
+<refpurpose>Name of file with default topic</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.default.topic.frag">
+&lt;xsl:param name="htmlhelp.default.topic" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Normally first chunk of document is displayed when you open HTML
+Help file. If you want to display another topic, simply set its
+filename by this parameter.</para>
+
+<para>This is useful especially if you don't generate ToC in front of
+your document and you also hide root element in ToC. E.g.:</para>
+
+<programlisting format="linespecific">&lt;xsl:param name="generate.book.toc" select="0"/&gt;
+&lt;xsl:param name="htmlhelp.hhc.show.root" select="0"/&gt;
+&lt;xsl:param name="htmlhelp.default.topic" select="'pr01.html'"/&gt;</programlisting>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.display.progress">
+<refmeta>
+<refentrytitle>htmlhelp.display.progress</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.display.progress</refname>
+<refpurpose>Display compile progress?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.display.progress.frag">
+&lt;xsl:param name="htmlhelp.display.progress" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>You can swith off display of compile progress by setting this
+parameter to 0.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.hhp">
+<refmeta>
+<refentrytitle>htmlhelp.hhp</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.hhp</refname>
+<refpurpose>Filename of project file.</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.hhp.frag">
+&lt;xsl:param name="htmlhelp.hhp" select="'htmlhelp.hhp'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Change this parameter if you want different name of project
+file than htmlhelp.hhp.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.hhc">
+<refmeta>
+<refentrytitle>htmlhelp.hhc</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.hhc</refname>
+<refpurpose>Filename of TOC file.</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.hhc.frag">
+&lt;xsl:param name="htmlhelp.hhc" select="'toc.hhc'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Change this parameter if you want different name of TOC file
+than toc.hhc.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.hhk">
+<refmeta>
+<refentrytitle>htmlhelp.hhk</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.hhk</refname>
+<refpurpose>Filename of index file.</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.hhk.frag">
+&lt;xsl:param name="htmlhelp.hhk" select="'index.hhk'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Change this parameter if you want different name of index file
+than index.hhk.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.hhp.tail">
+<refmeta>
+<refentrytitle>htmlhelp.hhp.tail</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.hhp.tail</refname>
+<refpurpose>Additional content for project file.</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.hhp.tail.frag">
+&lt;xsl:param name="htmlhelp.hhp.tail"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want to include some additional parameters into project file,
+store appropriate part of project file into this parameter.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.hhp.window">
+<refmeta>
+<refentrytitle>htmlhelp.hhp.window</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.hhp.window</refname>
+<refpurpose>Name of default window.</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.hhp.window.frag">
+&lt;xsl:param name="htmlhelp.hhp.window" select="'Main'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Name of default window. If empty no [WINDOWS] section will be
+added to project file.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.hhp.windows'">
+<refmeta>
+<refentrytitle>htmlhelp.hhp.windows</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.hhp.windows</refname>
+<refpurpose>Definition of additional windows</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.hhp.windows.frag">
+&lt;xsl:param name="htmlhelp.hhp.windows"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Content of this parameter is placed at the end of [WINDOWS]
+section of project file. You can use it for defining your own
+addtional windows.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.enhanced.decompilation">
+<refmeta>
+<refentrytitle>htmlhelp.enhanced.decompilation</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.enhanced.decompilation</refname>
+<refpurpose>Allow enhanced decompilation of CHM?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.enhanced.decompilation.frag">
+&lt;xsl:param name="htmlhelp.enhanced.decompilation" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>When set to 1 this parameter enables enhanced decompilation of CHM.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.enumerate.images">
+<refmeta>
+<refentrytitle>htmlhelp.enumerate.images</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.enumerate.images</refname>
+<refpurpose>Should be paths to all used images added to project file?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.enumerate.images.frag">
+&lt;xsl:param name="htmlhelp.enumerate.images" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>You should turn on this flag, if you insert images into your documents 
+as external binary entities or if you are using absolute path in image names.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.force.map.and.alias">
+<refmeta>
+<refentrytitle>htmlhelp.force.map.and.alias</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.force.map.and.alias</refname>
+<refpurpose>Should be [MAP] and [ALIAS] section added to project file unconditionaly?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.force.map.and.alias.frag">
+&lt;xsl:param name="htmlhelp.force.map.and.alias" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>You should turn on this flag, if you have your own
+<filename moreinfo="none">alias.h</filename> and <filename moreinfo="none">contex.h</filename> files
+and you want include reference to them in project file.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.map.file">
+<refmeta>
+<refentrytitle>htmlhelp.map.file</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.map.file</refname>
+<refpurpose>Filename of map file.</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.map.file.frag">
+&lt;xsl:param name="htmlhelp.map.file" select="'context.h'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Change this parameter if you want different name of map file
+than <filename moreinfo="none">context.h</filename>.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.alias.file">
+<refmeta>
+<refentrytitle>htmlhelp.alias.file</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.alias.file</refname>
+<refpurpose>Filename of map file.</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.alias.file.frag">
+&lt;xsl:param name="htmlhelp.alias.file" select="'alias.h'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Change this parameter if you want different name of map file
+than <filename moreinfo="none">alias.h</filename>.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.hhc.section.depth">
+<refmeta>
+<refentrytitle>htmlhelp.hhc.section.depth</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.hhc.section.depth</refname>
+<refpurpose>Depth of TOC for sections in a left pane.</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.hhc.section.depth.frag">
+&lt;xsl:param name="htmlhelp.hhc.section.depth" select="5"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Change this parameter if you want shallower ToC in a left pane
+of HTML Help viewer.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.hhc.show.root">
+<refmeta>
+<refentrytitle>htmlhelp.hhc.show.root</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.hhc.show.root</refname>
+<refpurpose>Should be entry for root element shown in ToC?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.hhc.show.root.frag">
+&lt;xsl:param name="htmlhelp.hhc.show.root" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If set to 0, there will be no entry for root element in
+ToC. This is useful when you want provide user with expanded ToC as
+a default.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.hhc.folders.instead.books">
+<refmeta>
+<refentrytitle>htmlhelp.hhc.folders.instead.books</refentrytitle>
+<refmiscinfo role="type"/>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.hhc.folders.instead.books</refname>
+<refpurpose/>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.hhc.folders.instead.books.frag">
+&lt;xsl:param name="htmlhelp.hhc.folders.instead.books" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This parameter controls whether there should be folder-like
+icons (1) or book-like icons (0) in ToC. If you want to use
+folder-like icons you must swith off binary ToC using
+<parameter moreinfo="none">htmlhelp.hhc.binary</parameter>.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.hhc.binary">
+<refmeta>
+<refentrytitle>htmlhelp.hhc.binary</refentrytitle>
+<refmiscinfo role="type"/>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.hhc.binary</refname>
+<refpurpose/>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.hhc.binary.frag">
+&lt;xsl:param name="htmlhelp.hhc.binary" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This parametr controls whether binary TOC will be generated. You
+must create binary TOC if you want to add Prev/Next buttons to toolbar
+(which is default behaviour). Files with binary TOC can't be merged.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.hhc.width">
+<refmeta>
+<refentrytitle>htmlhelp.hhc.width</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.hhc.width</refname>
+<refpurpose>Width of navigation (ToC) pane</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.hhc.width.frag">
+&lt;xsl:param name="htmlhelp.hhc.width"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This parameter specifies width of ToC pane in pixels.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.title">
+<refmeta>
+<refentrytitle>htmlhelp.title</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.title</refname>
+<refpurpose>Title of HTML Help</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.title.frag">
+&lt;xsl:param name="htmlhelp.title" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Content of this parameter will be used as a title for generated
+HTML Help. If empty, title will be automatically taken from document.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.show.menu">
+<refmeta>
+<refentrytitle>htmlhelp.show.menu</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.show.menu</refname>
+<refpurpose>Should be menu shown?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.show.menu.frag">
+&lt;xsl:param name="htmlhelp.show.menu" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want application menu in your HTML Help file, turn this
+parameter to 1.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.show.toolbar.text'">
+<refmeta>
+<refentrytitle>htmlhelp.show.toolbar.text</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.show.toolbar.text</refname>
+<refpurpose>Show text under toolbar buttons?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.show.toolbar.text.frag">
+&lt;xsl:param name="htmlhelp.show.toolbar.text" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>You can switch off display of texts under toolbar buttons by
+setting this parameter to 0.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.show.advanced.search">
+<refmeta>
+<refentrytitle>htmlhelp.show.advanced.search</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.show.advanced.search</refname>
+<refpurpose>Should be advanced search available?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.show.advanced.search.frag">
+&lt;xsl:param name="htmlhelp.show.advanced.search" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want advanced search features in your help, turn this
+parameter to 1.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.show.favorities">
+<refmeta>
+<refentrytitle>htmlhelp.show.favorities</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.show.favorities</refname>
+<refpurpose>Should be favorities tab shown?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.show.favorities.frag">
+&lt;xsl:param name="htmlhelp.show.favorities" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want favorities tab shown in your help, turn this
+parameter to 1.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.button.hideshow">
+<refmeta>
+<refentrytitle>htmlhelp.button.hideshow</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.button.hideshow</refname>
+<refpurpose>Should be Hide/Show button shown?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.button.hideshow.frag">
+&lt;xsl:param name="htmlhelp.button.hideshow" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want Hide/Show button shown on toolbar, turn this
+parameter to 1.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.button.back">
+<refmeta>
+<refentrytitle>htmlhelp.button.back</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.button.back</refname>
+<refpurpose>Should be Back button shown?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.button.back.frag">
+&lt;xsl:param name="htmlhelp.button.back" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want Back button shown on toolbar, turn this
+parameter to 1.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.button.forward">
+<refmeta>
+<refentrytitle>htmlhelp.button.forward</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.button.forward</refname>
+<refpurpose>Should be Forward button shown?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.button.forward.frag">
+&lt;xsl:param name="htmlhelp.button.forward" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want Forward button shown on toolbar, turn this
+parameter to 1.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.button.stop">
+<refmeta>
+<refentrytitle>htmlhelp.button.stop</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.button.stop</refname>
+<refpurpose>Should be Stop button shown?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.button.stop.frag">
+&lt;xsl:param name="htmlhelp.button.stop" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want Stop button shown on toolbar, turn this
+parameter to 1.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.button.refresh">
+<refmeta>
+<refentrytitle>htmlhelp.button.refresh</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.button.refresh</refname>
+<refpurpose>Should be Refresh button shown?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.button.refresh.frag">
+&lt;xsl:param name="htmlhelp.button.refresh" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want Refresh button shown on toolbar, turn this
+parameter to 1.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.button.home">
+<refmeta>
+<refentrytitle>htmlhelp.button.home</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.button.home</refname>
+<refpurpose>Should be Home button shown?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.button.home.frag">
+&lt;xsl:param name="htmlhelp.button.home" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want Home button shown on toolbar, turn this
+parameter to 1.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.button.home.url">
+<refmeta>
+<refentrytitle>htmlhelp.button.home.url</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.button.home.url</refname>
+<refpurpose>URL address of page accessible by Home button</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.button.home.url.frag">
+&lt;xsl:param name="htmlhelp.button.home.url"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>URL address of page accessible by Home button.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.button.options">
+<refmeta>
+<refentrytitle>htmlhelp.button.options</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.button.options</refname>
+<refpurpose>Should be Options button shown?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.button.options.frag">
+&lt;xsl:param name="htmlhelp.button.options" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want Options button shown on toolbar, turn this
+parameter to 1.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.button.print">
+<refmeta>
+<refentrytitle>htmlhelp.button.print</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.button.print</refname>
+<refpurpose>Should be Print button shown?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.button.print.frag">
+&lt;xsl:param name="htmlhelp.button.print" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want Print button shown on toolbar, turn this
+parameter to 1.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.button.locate">
+<refmeta>
+<refentrytitle>htmlhelp.button.locate</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.button.locate</refname>
+<refpurpose>Should be Locate button shown?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.button.locate.frag">
+&lt;xsl:param name="htmlhelp.button.locate" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want Locate button shown on toolbar, turn this
+parameter to 1.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.button.jump1">
+<refmeta>
+<refentrytitle>htmlhelp.button.jump1</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.button.jump1</refname>
+<refpurpose>Should be Jump1 button shown?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.button.jump1.frag">
+&lt;xsl:param name="htmlhelp.button.jump1" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want Jump1 button shown on toolbar, turn this
+parameter to 1.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.button.jump1.url">
+<refmeta>
+<refentrytitle>htmlhelp.button.jump1.url</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.button.jump1.url</refname>
+<refpurpose>URL address of page accessible by Jump1 button</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.button.jump1.url.frag">
+&lt;xsl:param name="htmlhelp.button.jump1.url"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>URL address of page accessible by Jump1 button.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.button.jump1.title">
+<refmeta>
+<refentrytitle>htmlhelp.button.jump1.title</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.button.jump1.title</refname>
+<refpurpose>Title of Jump1 button</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.button.jump1.title.frag">
+&lt;xsl:param name="htmlhelp.button.jump1.title" select="'User1'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Title of Jump1 button.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.button.jump2">
+<refmeta>
+<refentrytitle>htmlhelp.button.jump2</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.button.jump2</refname>
+<refpurpose>Should be Jump2 button shown?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.button.jump2.frag">
+&lt;xsl:param name="htmlhelp.button.jump2" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want Jump2 button shown on toolbar, turn this
+parameter to 1.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.button.jump2.url">
+<refmeta>
+<refentrytitle>htmlhelp.button.jump2.url</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.button.jump2.url</refname>
+<refpurpose>URL address of page accessible by Jump2 button</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.button.jump2.url.frag">
+&lt;xsl:param name="htmlhelp.button.jump2.url"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>URL address of page accessible by Jump2 button.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.button.jump2.title">
+<refmeta>
+<refentrytitle>htmlhelp.button.jump2.title</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.button.jump2.title</refname>
+<refpurpose>Title of Jump2 button</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.button.jump2.title.frag">
+&lt;xsl:param name="htmlhelp.button.jump2.title" select="'User2'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Title of Jump2 button.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.button.next">
+<refmeta>
+<refentrytitle>htmlhelp.button.next</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.button.next</refname>
+<refpurpose>Should be Next button shown?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.button.next.frag">
+&lt;xsl:param name="htmlhelp.button.next" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want Next button shown on toolbar, turn this
+parameter to 1.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.button.prev">
+<refmeta>
+<refentrytitle>htmlhelp.button.prev</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.button.prev</refname>
+<refpurpose>Should be Prev button shown?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.button.prev.frag">
+&lt;xsl:param name="htmlhelp.button.prev" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want Prev button shown on toolbar, turn this
+parameter to 1.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.button.zoom">
+<refmeta>
+<refentrytitle>htmlhelp.button.zoom</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.button.zoom</refname>
+<refpurpose>Should be Zoom button shown?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.button.zoom.frag">
+&lt;xsl:param name="htmlhelp.button.zoom" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want Zoom button shown on toolbar, turn this
+parameter to 1.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.remember.window.position">
+<refmeta>
+<refentrytitle>htmlhelp.remember.window.position</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.remember.window.position</refname>
+<refpurpose>Remember help window position?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.remember.window.position.frag">
+&lt;xsl:param name="htmlhelp.remember.window.position" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>To remember help window position between starts set this
+parameter to 1.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.window.geometry">
+<refmeta>
+<refentrytitle>htmlhelp.window.geometry</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.window.geometry</refname>
+<refpurpose>Set initial geometry of help window</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.window.geometry.frag">
+&lt;xsl:param name="htmlhelp.window.geometry"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This parameter specifies initial position of help
+window. E.g.</para>
+
+<programlisting format="linespecific">&lt;xsl:param name="htmlhelp.window.geometry"&gt;[160,64,992,704]&lt;/xsl:param&gt;</programlisting>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.use.hhk">
+<refmeta>
+<refentrytitle>htmlhelp.use.hhk</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.use.hhk</refname>
+<refpurpose>Should be index built using HHK file?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.use.hhk.frag">
+&lt;xsl:param name="htmlhelp.use.hhk" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, index is created using HHK file. This provides some
+new features.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.only">
+<refmeta>
+<refentrytitle>htmlhelp.only</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.only</refname>
+<refpurpose>Should be only project files generated?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.only.frag">
+&lt;xsl:param name="htmlhelp.only" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want to play with various HTML Help parameters and you
+don't need to regenerate all HTML files, you can set this parameter to
+1. This setting will not process whole document, only project files
+(hhp, hhc, hhk,...) will be generated.</para>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+<reference><title>Eclipse Help Platform</title>
+<refentry id="eclipse.autolabel">
+<refmeta>
+<refentrytitle>eclipse.autolabel</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>eclipse.autolabel</refname>
+<refpurpose>Should tree-like ToC use autonumbering feature?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="eclipse.autolabel.frag">
+&lt;xsl:param name="eclipse.autolabel" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want to include chapter and section numbers into ToC in
+the left panel, set this parameter to 1.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="eclipse.plugin.name">
+<refmeta>
+<refentrytitle>eclipse.plugin.name</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>eclipse.plugin.name</refname>
+<refpurpose>Eclipse Help plugin name</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="eclipse.plugin.name.frag">
+&lt;xsl:param name="eclipse.plugin.name"&gt;DocBook Online Help Sample&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Eclipse Help plugin name.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="eclipse.plugin.id">
+<refmeta>
+<refentrytitle>eclipse.plugin.id</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>eclipse.plugin.id</refname>
+<refpurpose>Eclipse Help plugin id</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="eclipse.plugin.id.frag">
+&lt;xsl:param name="eclipse.plugin.id"&gt;com.example.help&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Eclipse Help plugin id. You should change this id to something
+unique for each help.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="eclipse.plugin.provider">
+<refmeta>
+<refentrytitle>eclipse.plugin.provider</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>eclipse.plugin.provider</refname>
+<refpurpose>Eclipse Help plugin provider name</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="eclipse.plugin.provider.frag">
+&lt;xsl:param name="eclipse.plugin.provider"&gt;Example provider&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Eclipse Help plugin provider name.</para>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+<reference><title>Localization</title>
+<refentry id="l10n.gentext.language">
+<refmeta>
+<refentrytitle>l10n.gentext.language</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>l10n.gentext.language</refname>
+<refpurpose>Sets the gentext language</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="l10n.gentext.language.frag">
+&lt;xsl:param name="l10n.gentext.language" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If this parameter is set to any value other than the empty string, its
+value will be used as the value for the language when generating text. Setting
+<parameter moreinfo="none">l10n.gentext.language</parameter> overrides any settings within the
+document being formatted.</para>
+
+<para>It's much more likely that you might want to set the
+<parameter moreinfo="none">l10n.gentext.default.language</parameter> parameter.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="l10n.gentext.default.language">
+<refmeta>
+<refentrytitle>l10n.gentext.default.language</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>l10n.gentext.default.language</refname>
+<refpurpose>Sets the default language for generated text</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="l10n.gentext.default.language.frag">
+&lt;xsl:param name="l10n.gentext.default.language" select="'en'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The value of the <parameter moreinfo="none">l10n.gentext.default.language</parameter>
+parameter is used as the language for generated text if no setting is provided
+in the source document.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="l10n.gentext.use.xref.language">
+<refmeta>
+<refentrytitle>l10n.gentext.use.xref.language</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>l10n.gentext.use.xref.language</refname>
+<refpurpose>Use the language of target when generating cross-reference text?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="l10n.gentext.use.xref.language.frag">
+&lt;xsl:param name="l10n.gentext.use.xref.language" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, the language of the target will be used when
+generating cross reference text. Usually, the <quote>current</quote>
+language is used when generating text (that is, the language of the
+element that contains the cross-reference element). But setting this parameter
+allows the language of the element <emphasis>pointed to</emphasis> to control
+the generated text.</para>
+
+<para>Consider the following example:</para>
+
+<informalexample>
+<programlisting format="linespecific">&lt;para lang="en"&gt;See also &lt;xref linkend="chap3"/&gt;.&lt;/para&gt;
+</programlisting>
+</informalexample>
+
+<para>Suppose that Chapter 3 happens to be written in German.
+If <parameter moreinfo="none">l10n.gentext.use.xref.language</parameter> is non-zero, the
+resulting text will be something like this:</para>
+
+<blockquote>
+<para>See also Kapital 3.</para>
+</blockquote>
+
+<para>Where the more traditional rendering would be:</para>
+
+<blockquote>
+<para>See also Chapter 3.</para>
+</blockquote>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+<appendix><title>The Stylesheet</title>
+
+<para>The <filename moreinfo="none">param.xsl</filename> stylesheet is just a wrapper
+around all these parameters.</para>
+
+<programlisting id="top">
+
+&lt;!-- This file is generated from param.xweb; do not edit this file! --&gt;
+
+&lt;xsl:stylesheet exclude-result-prefixes="src" version="1.0"&gt;
+
+&lt;!-- ********************************************************************
+     $Id: param.xml,v 1.1.1.1 2004/10/19 21:21:47 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** --&gt;
+
+&lt;src:fragref linkend="admon.graphics.extension.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="admon.graphics.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="admon.graphics.path.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="admon.style.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="admon.textlabel.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="annotate.toc.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="appendix.autolabel.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="author.othername.in.middle.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="autotoc.label.separator.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="base.dir.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="biblioentry.item.separator.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="bibliography.collection.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="bibliography.numbered.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="bridgehead.in.toc.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="callout.defaultcolumn.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="callout.graphics.extension.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="callout.graphics.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="callout.graphics.number.limit.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="callout.graphics.path.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="callout.list.table.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="callout.unicode.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="callout.unicode.number.limit.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="callout.unicode.start.character.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="callouts.extension.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="chapter.autolabel.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="chunk.first.sections.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="chunk.quietly.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="chunk.section.depth.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="chunk.toc.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="chunk.tocs.and.lots.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="citerefentry.link.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="collect.xref.targets.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="css.decoration.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="current.docid.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="default.float.class.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="default.image.width.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="default.table.width.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="draft.mode.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="draft.watermark.image.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="ebnf.table.bgcolor.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="ebnf.table.border.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="ebnf.assignment.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="ebnf.statement.terminator.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="eclipse.autolabel.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="eclipse.plugin.name.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="eclipse.plugin.id.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="eclipse.plugin.provider.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="emphasis.propagates.style.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="entry.propagates.style.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="firstterm.only.link.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="footer.rule.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="footnote.number.format.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="footnote.number.symbols.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="formal.procedures.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="formal.title.placement.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="funcsynopsis.decoration.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="funcsynopsis.style.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="funcsynopsis.tabular.threshold.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="function.parens.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="generate.id.attributes.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="generate.index.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="generate.legalnotice.link.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="generate.manifest.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="generate.meta.abstract.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="generate.section.toc.level.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="generate.toc.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="glossary.collection.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="glossentry.show.acronym.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="glossterm.auto.link.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="graphic.default.extension.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="graphicsize.extension.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="header.rule.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="html.base.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="html.cellpadding.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="html.cellspacing.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="html.cleanup.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="html.ext.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="html.extra.head.links.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="html.longdesc.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="html.longdesc.link.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="html.stylesheet.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="html.stylesheet.type.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.alias.file.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.autolabel.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.button.back.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.button.forward.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.button.hideshow.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.button.home.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.button.home.url.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.button.jump1.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.button.jump1.title.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.button.jump1.url.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.button.jump2.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.button.jump2.title.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.button.jump2.url.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.button.locate.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.button.next.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.button.options.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.button.prev.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.button.print.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.button.refresh.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.button.stop.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.button.zoom.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.chm.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.default.topic.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.display.progress.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.encoding.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.enhanced.decompilation.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.enumerate.images.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.force.map.and.alias.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.hhc.binary.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.hhc.folders.instead.books.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.hhc.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.hhc.section.depth.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.hhc.show.root.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.hhc.width.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.hhk.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.hhp.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.hhp.tail.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.hhp.window.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.hhp.windows.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.map.file.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.only.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.remember.window.position.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.show.advanced.search.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.show.favorities.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.show.menu.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.show.toolbar.text.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.title.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.use.hhk.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.window.geometry.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="ignore.image.scaling.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="inherit.keywords.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="l10n.gentext.default.language.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="l10n.gentext.language.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="l10n.gentext.use.xref.language.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="label.from.part.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="linenumbering.everyNth.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="linenumbering.extension.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="linenumbering.separator.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="linenumbering.width.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="link.mailto.url.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="make.graphic.viewport.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="make.single.year.ranges.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="make.valid.html.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="make.year.ranges.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="manifest.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="manifest.in.base.dir.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="manual.toc.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="menuchoice.menu.separator.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="menuchoice.separator.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="navig.graphics.extension.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="navig.graphics.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="navig.graphics.path.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="navig.showtitles.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="nominal.image.depth.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="nominal.image.width.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="nominal.table.width.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="olink.base.uri.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="olink.doctitle.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="olink.fragid.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="olink.outline.ext.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="olink.pubid.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="olink.resolver.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="olink.sysid.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="para.propagates.style.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="part.autolabel.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="phrase.propagates.style.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="pixels.per.inch.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="points.per.em.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="preface.autolabel.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="preferred.mediaobject.role.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="process.empty.source.toc.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="process.source.toc.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="profile.arch.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="profile.attribute.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="profile.condition.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="profile.conformance.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="profile.lang.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="profile.os.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="profile.revision.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="profile.revisionflag.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="profile.role.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="profile.security.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="profile.separator.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="profile.userlevel.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="profile.value.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="profile.vendor.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="punct.honorific.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="qanda.defaultlabel.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="qanda.inherit.numeration.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="qandadiv.autolabel.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="refentry.generate.name.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="refentry.generate.title.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="refentry.separator.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="refentry.xref.manvolnum.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="root.filename.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="rootid.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="runinhead.default.title.end.punct.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="runinhead.title.end.punct.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="section.autolabel.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="section.label.includes.component.label.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="segmentedlist.as.table.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="shade.verbatim.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="shade.verbatim.style.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="show.comments.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="show.revisionflag.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="spacing.paras.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="suppress.footer.navigation.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="suppress.header.navigation.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="suppress.navigation.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="table.borders.with.css.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="table.cell.border.color.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="table.cell.border.style.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="table.cell.border.thickness.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="table.footnote.number.format.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="table.footnote.number.symbols.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="table.frame.border.color.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="table.frame.border.style.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="table.frame.border.thickness.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="tablecolumns.extension.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="target.database.document.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="targets.filename.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="tex.math.delims.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="tex.math.file.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="tex.math.in.alt.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="textinsert.extension.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="toc.list.type.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="toc.section.depth.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="toc.max.depth.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="ulink.target.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="use.embed.for.svg.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="use.extensions.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="use.id.as.filename.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="use.local.olink.style.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="use.role.as.xrefstyle.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="use.role.for.mediaobject.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="use.svg.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="variablelist.as.table.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="xref.with.number.and.title.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="xref.label-title.separator.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="xref.label-page.separator.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="xref.title-page.separator.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="insert.xref.page.number.frag"&gt;&lt;/src:fragref&gt;
+
+&lt;/xsl:stylesheet&gt;
+</programlisting>
+
+</appendix>
+
+</book>
\ No newline at end of file

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/param.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/param.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/param.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,299 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- This file is generated from param.xweb; do not edit this file! -->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:src="http://nwalsh.com/xmlns/litprog/fragment" exclude-result-prefixes="src" version="1.0">
+
+<!-- ********************************************************************
+     $Id: param.xsl,v 1.1.1.1 2004/10/19 21:21:48 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<xsl:param name="admon.graphics.extension" select="'.png'"/>
+<xsl:param name="admon.graphics" select="0"/>
+<xsl:param name="admon.graphics.path">images/</xsl:param>
+<xsl:param name="admon.style">
+  <xsl:text>margin-left: 0.5in; margin-right: 0.5in;</xsl:text>
+</xsl:param>
+<xsl:param name="admon.textlabel" select="1"/>
+<xsl:param name="annotate.toc" select="1"/>
+<xsl:param name="appendix.autolabel" select="1"/>
+<xsl:param name="author.othername.in.middle" select="1"/>
+<xsl:param name="autotoc.label.separator" select="'. '"/>
+<xsl:param name="base.dir" select="''"/>
+<xsl:param name="biblioentry.item.separator">. </xsl:param>
+<xsl:param name="bibliography.collection" select="'http://docbook.sourceforge.net/release/bibliography/bibliography.xml'"/>
+<xsl:param name="bibliography.numbered" select="0"/>
+<xsl:param name="bridgehead.in.toc" select="0"/>
+<xsl:param name="callout.defaultcolumn" select="'60'"/>
+<xsl:param name="callout.graphics.extension" select="'.png'"/>
+<xsl:param name="callout.graphics" select="'1'"/>
+<xsl:param name="callout.graphics.number.limit" select="'10'"/>
+<xsl:param name="callout.graphics.path" select="'images/callouts/'"/>
+<xsl:param name="callout.list.table" select="'1'"/>
+<xsl:param name="callout.unicode" select="0"/>
+<xsl:param name="callout.unicode.number.limit" select="'10'"/>
+<xsl:param name="callout.unicode.start.character" select="10102"/>
+<xsl:param name="callouts.extension" select="'1'"/>
+<xsl:param name="chapter.autolabel" select="1"/>
+<xsl:param name="chunk.first.sections" select="0"/>
+<xsl:param name="chunk.quietly" select="0"/>
+<xsl:param name="chunk.section.depth" select="1"/>
+<xsl:param name="chunk.toc" select="''"/>
+<xsl:param name="chunk.tocs.and.lots" select="0"/>
+<xsl:param name="citerefentry.link" select="'0'"/>
+<xsl:param name="collect.xref.targets" select="'no'"/>
+<xsl:param name="css.decoration" select="1"/>
+<xsl:param name="current.docid" select="''"/> 
+<xsl:param name="default.float.class" select="'before'"/>
+<xsl:param name="default.image.width" select="''"/>
+<xsl:param name="default.table.width" select="''"/>
+<xsl:param name="draft.mode" select="'maybe'"/>
+<xsl:param name="draft.watermark.image" select="'http://docbook.sourceforge.net/release/images/draft.png'"/>
+<xsl:param name="ebnf.table.bgcolor" select="'#F5DCB3'"/>
+<xsl:param name="ebnf.table.border" select="1"/>
+<xsl:param name="ebnf.assignment">
+<tt>::=</tt>
+</xsl:param>
+
+<xsl:param name="ebnf.statement.terminator"/>
+
+<xsl:param name="eclipse.autolabel" select="0"/>
+<xsl:param name="eclipse.plugin.name">DocBook Online Help Sample</xsl:param>
+<xsl:param name="eclipse.plugin.id">com.example.help</xsl:param>
+<xsl:param name="eclipse.plugin.provider">Example provider</xsl:param>
+<xsl:param name="emphasis.propagates.style" select="1"/>
+<xsl:param name="entry.propagates.style" select="1"/>
+<xsl:param name="firstterm.only.link" select="0"/>
+<xsl:param name="footer.rule" select="1"/>
+<xsl:param name="footnote.number.format" select="'1'"/>
+<xsl:param name="footnote.number.symbols" select="''"/>
+<xsl:param name="formal.procedures" select="1"/>
+<xsl:param name="formal.title.placement">
+figure before
+example before
+equation before
+table before
+procedure before
+task before
+</xsl:param>
+<xsl:param name="funcsynopsis.decoration" select="1"/>
+<xsl:param name="funcsynopsis.style">kr</xsl:param>
+<xsl:param name="funcsynopsis.tabular.threshold" select="40"/>
+<xsl:param name="function.parens">0</xsl:param>
+<xsl:param name="generate.id.attributes" select="0"/>
+<xsl:param name="generate.index" select="1"/>
+<xsl:param name="generate.legalnotice.link" select="0"/>
+<xsl:param name="generate.manifest" select="0"/>
+<xsl:param name="generate.meta.abstract" select="1"/>
+<xsl:param name="generate.section.toc.level" select="0"/>
+<xsl:param name="generate.toc">
+appendix  toc,title
+article/appendix  nop
+article   toc,title
+book      toc,title,figure,table,example,equation
+chapter   toc,title
+part      toc,title
+preface   toc,title
+qandadiv  toc
+qandaset  toc
+reference toc,title
+sect1     toc
+sect2     toc
+sect3     toc
+sect4     toc
+sect5     toc
+section   toc
+set       toc,title
+</xsl:param>
+
+<xsl:param name="glossary.collection" select="''"/>
+<xsl:param name="glossentry.show.acronym" select="'no'"/>
+<xsl:param name="glossterm.auto.link" select="0"/>
+<xsl:param name="graphic.default.extension"/>
+<xsl:param name="graphicsize.extension" select="1"/>
+<xsl:param name="header.rule" select="1"/>
+<xsl:param name="html.base"/>
+<xsl:param name="html.cellpadding" select="''"/>
+<xsl:param name="html.cellspacing" select="''"/>
+<xsl:param name="html.cleanup" select="1"/>
+<xsl:param name="html.ext" select="'.html'"/>
+<xsl:param name="html.extra.head.links" select="0"/>
+<xsl:param name="html.longdesc" select="1"/>
+<xsl:param name="html.longdesc.link" select="$html.longdesc"/>
+<xsl:param name="html.stylesheet" select="''"/>
+<xsl:param name="html.stylesheet.type">text/css</xsl:param>
+<xsl:param name="htmlhelp.alias.file" select="'alias.h'"/>
+<xsl:param name="htmlhelp.autolabel" select="0"/>
+<xsl:param name="htmlhelp.button.back" select="1"/>
+<xsl:param name="htmlhelp.button.forward" select="0"/>
+<xsl:param name="htmlhelp.button.hideshow" select="1"/>
+<xsl:param name="htmlhelp.button.home" select="0"/>
+<xsl:param name="htmlhelp.button.home.url"/>
+<xsl:param name="htmlhelp.button.jump1" select="0"/>
+<xsl:param name="htmlhelp.button.jump1.title" select="'User1'"/>
+<xsl:param name="htmlhelp.button.jump1.url"/>
+<xsl:param name="htmlhelp.button.jump2" select="0"/>
+<xsl:param name="htmlhelp.button.jump2.title" select="'User2'"/>
+<xsl:param name="htmlhelp.button.jump2.url"/>
+<xsl:param name="htmlhelp.button.locate" select="0"/>
+<xsl:param name="htmlhelp.button.next" select="1"/>
+<xsl:param name="htmlhelp.button.options" select="1"/>
+<xsl:param name="htmlhelp.button.prev" select="1"/>
+<xsl:param name="htmlhelp.button.print" select="1"/>
+<xsl:param name="htmlhelp.button.refresh" select="0"/>
+<xsl:param name="htmlhelp.button.stop" select="0"/>
+<xsl:param name="htmlhelp.button.zoom" select="0"/>
+<xsl:param name="htmlhelp.chm" select="'htmlhelp.chm'"/>
+<xsl:param name="htmlhelp.default.topic" select="''"/>
+<xsl:param name="htmlhelp.display.progress" select="1"/>
+<xsl:param name="htmlhelp.encoding" select="'iso-8859-1'"/>
+<xsl:param name="htmlhelp.enhanced.decompilation" select="0"/>
+<xsl:param name="htmlhelp.enumerate.images" select="0"/>
+<xsl:param name="htmlhelp.force.map.and.alias" select="0"/>
+<xsl:param name="htmlhelp.hhc.binary" select="1"/>
+<xsl:param name="htmlhelp.hhc.folders.instead.books" select="1"/>
+<xsl:param name="htmlhelp.hhc" select="'toc.hhc'"/>
+<xsl:param name="htmlhelp.hhc.section.depth" select="5"/>
+<xsl:param name="htmlhelp.hhc.show.root" select="1"/>
+<xsl:param name="htmlhelp.hhc.width"/>
+<xsl:param name="htmlhelp.hhk" select="'index.hhk'"/>
+<xsl:param name="htmlhelp.hhp" select="'htmlhelp.hhp'"/>
+<xsl:param name="htmlhelp.hhp.tail"/>
+<xsl:param name="htmlhelp.hhp.window" select="'Main'"/>
+<xsl:param name="htmlhelp.hhp.windows"/>
+<xsl:param name="htmlhelp.map.file" select="'context.h'"/>
+<xsl:param name="htmlhelp.only" select="0"/>
+<xsl:param name="htmlhelp.remember.window.position" select="0"/>
+<xsl:param name="htmlhelp.show.advanced.search" select="0"/>
+<xsl:param name="htmlhelp.show.favorities" select="0"/>
+<xsl:param name="htmlhelp.show.menu" select="0"/>
+<xsl:param name="htmlhelp.show.toolbar.text" select="1"/>
+<xsl:param name="htmlhelp.title" select="''"/>
+<xsl:param name="htmlhelp.use.hhk" select="0"/>
+<xsl:param name="htmlhelp.window.geometry"/>
+<xsl:param name="ignore.image.scaling" select="0"/>
+<xsl:param name="inherit.keywords" select="'1'"/>
+<xsl:param name="l10n.gentext.default.language" select="'en'"/>
+<xsl:param name="l10n.gentext.language" select="''"/>
+<xsl:param name="l10n.gentext.use.xref.language" select="0"/>
+<xsl:param name="label.from.part" select="'0'"/>
+<xsl:param name="linenumbering.everyNth" select="'5'"/>
+<xsl:param name="linenumbering.extension" select="'1'"/>
+<xsl:param name="linenumbering.separator" select="' '"/>
+<xsl:param name="linenumbering.width" select="'3'"/>
+<xsl:param name="link.mailto.url"/>
+<xsl:param name="make.graphic.viewport" select="1"/>
+<xsl:param name="make.single.year.ranges" select="0"/>
+<xsl:param name="make.valid.html" select="0"/>
+<xsl:param name="make.year.ranges" select="0"/>
+<xsl:param name="manifest" select="'HTML.manifest'"/>
+<xsl:param name="manifest.in.base.dir" select="0"/>
+<xsl:param name="manual.toc" select="''"/>
+<xsl:param name="menuchoice.menu.separator" select="'-&gt;'"/>
+<xsl:param name="menuchoice.separator" select="'+'"/>
+<xsl:param name="navig.graphics.extension" select="'.gif'"/>
+<xsl:param name="navig.graphics" select="0"/>
+<xsl:param name="navig.graphics.path">images/</xsl:param>
+<xsl:param name="navig.showtitles">1</xsl:param>
+<xsl:param name="nominal.image.depth" select="4 * $pixels.per.inch"/>
+<xsl:param name="nominal.image.width" select="6 * $pixels.per.inch"/>
+<xsl:param name="nominal.table.width" select="'6in'"/>
+<xsl:param name="olink.base.uri" select="''"/> 
+<xsl:param name="olink.doctitle" select="0"/> 
+<xsl:param name="olink.fragid" select="'fragid='"/>
+<xsl:param name="olink.outline.ext" select="'.olink'"/>
+<xsl:param name="olink.pubid" select="'pubid='"/>
+<xsl:param name="olink.resolver" select="'/cgi-bin/olink'"/>
+<xsl:param name="olink.sysid" select="'sysid='"/>
+<xsl:param name="para.propagates.style" select="1"/>
+<xsl:param name="part.autolabel" select="1"/>
+<xsl:param name="phrase.propagates.style" select="1"/>
+<xsl:param name="pixels.per.inch" select="90"/>
+<xsl:param name="points.per.em" select="10"/>
+<xsl:param name="preface.autolabel" select="0"/>
+<xsl:param name="preferred.mediaobject.role"/>
+<xsl:param name="process.empty.source.toc" select="0"/>
+<xsl:param name="process.source.toc" select="0"/>
+<xsl:param name="profile.arch" select="''"/>
+<xsl:param name="profile.attribute" select="''"/>
+<xsl:param name="profile.condition" select="''"/>
+<xsl:param name="profile.conformance" select="''"/>
+<xsl:param name="profile.lang" select="''"/>
+<xsl:param name="profile.os" select="''"/>
+<xsl:param name="profile.revision" select="''"/>
+<xsl:param name="profile.revisionflag" select="''"/>
+<xsl:param name="profile.role" select="''"/>
+<xsl:param name="profile.security" select="''"/>
+<xsl:param name="profile.separator" select="';'"/>
+<xsl:param name="profile.userlevel" select="''"/>
+<xsl:param name="profile.value" select="''"/>
+<xsl:param name="profile.vendor" select="''"/>
+<xsl:param name="punct.honorific" select="'.'"/>
+<xsl:param name="qanda.defaultlabel">number</xsl:param>
+<xsl:param name="qanda.inherit.numeration" select="1"/>
+<xsl:param name="qandadiv.autolabel" select="1"/>
+<xsl:param name="refentry.generate.name" select="1"/>
+<xsl:param name="refentry.generate.title" select="0"/>
+<xsl:param name="refentry.separator" select="'1'"/>
+<xsl:param name="refentry.xref.manvolnum" select="1"/>
+<xsl:param name="root.filename" select="'index'"/>
+<xsl:param name="rootid" select="''"/>
+<xsl:param name="runinhead.default.title.end.punct" select="'.'"/>
+<xsl:param name="runinhead.title.end.punct" select="'.!?:'"/>
+<xsl:param name="section.autolabel" select="0"/>
+<xsl:param name="section.label.includes.component.label" select="0"/>
+<xsl:param name="segmentedlist.as.table" select="0"/>
+<xsl:param name="shade.verbatim" select="0"/>
+<xsl:attribute-set name="shade.verbatim.style">
+  <xsl:attribute name="border">0</xsl:attribute>
+  <xsl:attribute name="bgcolor">#E0E0E0</xsl:attribute>
+</xsl:attribute-set>
+
+<xsl:param name="show.comments">1</xsl:param>
+<xsl:param name="show.revisionflag">0</xsl:param>
+<xsl:param name="spacing.paras" select="'0'"/>
+<xsl:param name="suppress.footer.navigation">0</xsl:param>
+<xsl:param name="suppress.header.navigation">0</xsl:param>
+<xsl:param name="suppress.navigation">0</xsl:param>
+<xsl:param name="table.borders.with.css" select="0"/>
+<xsl:param name="table.cell.border.color" select="''"/>
+
+<xsl:param name="table.cell.border.style" select="'solid'"/>
+<xsl:param name="table.cell.border.thickness" select="'0.5pt'"/>
+<xsl:param name="table.footnote.number.format" select="'a'"/>
+<xsl:param name="table.footnote.number.symbols" select="''"/>
+<xsl:param name="table.frame.border.color" select="''"/>
+
+<xsl:param name="table.frame.border.style" select="'solid'"/>
+<xsl:param name="table.frame.border.thickness" select="'0.5pt'"/>
+<xsl:param name="tablecolumns.extension" select="'1'"/>
+<xsl:param name="target.database.document" select="''"/>
+<xsl:param name="targets.filename" select="'target.db'"/>
+<xsl:param name="tex.math.delims" select="'1'"/>
+<xsl:param name="tex.math.file" select="'tex-math-equations.tex'"/>
+<xsl:param name="tex.math.in.alt" select="''"/>
+<xsl:param name="textinsert.extension" select="'1'"/>
+<xsl:param name="toc.list.type">dl</xsl:param>
+<xsl:param name="toc.section.depth">2</xsl:param>
+<xsl:param name="toc.max.depth">8</xsl:param>
+<xsl:param name="ulink.target" select="'_top'"/>
+<xsl:param name="use.embed.for.svg" select="0"/>
+<xsl:param name="use.extensions" select="'0'"/>
+<xsl:param name="use.id.as.filename" select="'0'"/>
+<xsl:param name="use.local.olink.style" select="0"/> 
+<xsl:param name="use.role.as.xrefstyle" select="1"/>
+<xsl:param name="use.role.for.mediaobject" select="1"/>
+<xsl:param name="use.svg" select="1"/>
+<xsl:param name="variablelist.as.table" select="0"/>
+<xsl:param name="xref.with.number.and.title" select="1"/>
+<xsl:param name="xref.label-title.separator">: </xsl:param>
+<xsl:param name="xref.label-page.separator"><xsl:text> </xsl:text></xsl:param>
+<xsl:param name="xref.title-page.separator"><xsl:text> </xsl:text></xsl:param>
+<xsl:param name="insert.xref.page.number">no</xsl:param>
+
+</xsl:stylesheet>
\ No newline at end of file

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/param.xweb
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/param.xweb	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/param.xweb	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,667 @@
+<!DOCTYPE book [
+<!ENTITY % param.ent SYSTEM "param.ent">
+%param.ent;
+]>
+<book xmlns:src="http://nwalsh.com/xmlns/litprog/fragment"
+      xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<bookinfo>
+<title>HTML Parameter Reference</title>
+<releaseinfo role="meta">
+$Id: param.xweb,v 1.1.1.1 2004/10/19 21:21:48 juntao Exp $
+</releaseinfo>
+<author>
+  <surname>Walsh</surname>
+  <firstname>Norman</firstname>
+</author>
+<copyright>
+  <year>1999</year>
+  <year>2000</year>
+  <year>2001</year>
+  <holder>Norman Walsh</holder>
+</copyright>
+</bookinfo>
+
+<preface><title>Introduction</title>
+
+<para>This is technical reference documentation for the DocBook XSL
+Stylesheets; it documents (some of) the parameters, templates, and
+other elements of the stylesheets.</para>
+
+<para>This reference describes each of the HTML Stylesheet parameters.
+These are the <quote>easily customizable</quote> parts of the stylesheet.
+If you want to specify an alternate value for one or more of these
+parameters, you can do so in a <quote>driver</quote> stylesheet.</para>
+
+<para>For example, if you want to change the <literal>html.stylesheet</literal>
+to <filename>reference.css</filename>, you might create a driver
+stylesheet like this:</para>
+
+<programlisting><![CDATA[<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                version='1.0'>
+
+  <xsl:import href="http://docbook.sourceforge.net/release/xsl/snapshot/html/docbook.xsl"/>
+
+  <xsl:param name="html.stylesheet">reference.css</xsl:param>
+
+</xsl:stylesheet>]]></programlisting>
+
+<para>Naturally, you have to change the
+<sgmltag class='attribute'>href</sgmltag> attribute on
+<literal>&lt;xsl:import&gt;</literal> to point to
+<filename>docbook.xsl</filename> on your system. (Or
+<filename>chunk.xsl</filename>, if you're using chunking.)</para>
+
+<para>This is not intended to be <quote>user</quote> documentation.
+It is provided for developers writing customization layers for the
+stylesheets, and for anyone who's interested in <quote>how it
+works</quote>.</para>
+
+<para>Although I am trying to be thorough, this documentation is known
+to be incomplete. Don't forget to read the source, too :-)</para>
+</preface>
+
+<reference><title>Admonitions</title>
+&admon.graphics.extension;
+&admon.graphics.path;
+&admon.graphics;
+&admon.textlabel;
+&admon.style;
+</reference>
+
+<reference><title>Callouts</title>
+&callout.defaultcolumn;
+&callout.graphics.extension;
+&callout.graphics.number.limit;
+&callout.graphics.path;
+&callout.graphics;
+&callout.list.table;
+&callout.unicode.number.limit;
+&callout.unicode.start.character;
+&callout.unicode;
+&callouts.extension;
+</reference>
+
+<reference><title>EBNF</title>
+&ebnf.table.bgcolor;
+&ebnf.table.border;
+&ebnf.assignment;
+&ebnf.statement.terminator;
+</reference>
+
+<reference><title>ToC/LoT/Index Generation</title>
+&annotate.toc;
+&autotoc.label.separator;
+&process.source.toc;
+&process.empty.source.toc;
+&bridgehead.in.toc;
+&manual.toc;
+&toc.list.type;
+&toc.section.depth;
+&toc.max.depth;
+&generate.toc;
+&generate.section.toc.level;
+&generate.index;
+</reference>
+
+<reference><title>Extensions</title>
+&linenumbering.everyNth;
+&linenumbering.extension;
+&linenumbering.separator;
+&linenumbering.width;
+&tablecolumns.extension;
+&textinsert.extension;
+&graphicsize.extension;
+&use.extensions;
+</reference>
+
+<reference><title>Automatic labelling</title>
+&chapter.autolabel;
+&appendix.autolabel;
+&part.autolabel;
+&preface.autolabel;
+&qandadiv.autolabel;
+&section.autolabel;
+&section.label.includes.component.label;
+&label.from.part;
+</reference>
+
+<!--
+<reference><title></title>
+</reference>
+-->
+
+<reference><title>HTML</title>
+&html.base;
+&html.stylesheet.type;
+&html.stylesheet;
+&use.id.as.filename;
+&css.decoration;
+&spacing.paras;
+&emphasis.propagates.style;
+&para.propagates.style;
+&phrase.propagates.style;
+&entry.propagates.style;
+&html.longdesc;
+&html.longdesc.link;
+&make.valid.html;
+&html.cleanup;
+&draft.mode;
+&draft.watermark.image;
+&generate.id.attributes;
+&generate.meta.abstract;
+</reference>
+
+<reference><title>XSLT Processing</title>
+&rootid;
+&suppress.navigation;
+&suppress.header.navigation;
+&suppress.footer.navigation;
+&header.rule;
+&footer.rule;
+</reference>
+
+<reference><title>Meta/*Info</title>
+&inherit.keywords;
+&make.single.year.ranges;
+&make.year.ranges;
+&author.othername.in.middle;
+&generate.legalnotice.link;
+</reference>
+
+<reference><title>Reference Pages</title>
+&funcsynopsis.decoration;
+&funcsynopsis.style;
+&funcsynopsis.tabular.threshold;
+&function.parens;
+&refentry.generate.name;
+&refentry.generate.title;
+&refentry.xref.manvolnum;
+&citerefentry.link;
+&refentry.separator;
+</reference>
+
+<reference><title>Tables</title>
+&default.table.width;
+&nominal.table.width;
+&table.borders.with.css;
+&table.cell.border.style;
+&table.cell.border.thickness;
+&table.cell.border.color;
+&table.frame.border.style;
+&table.frame.border.thickness;
+&table.frame.border.color;
+&html.cellspacing;
+&html.cellpadding;
+</reference>
+
+<reference><title>QAndASet</title>
+&qanda.defaultlabel;
+&qanda.inherit.numeration;
+</reference>
+
+<reference><title>Linking</title>
+&target.database.document;
+&targets.filename;
+&collect.xref.targets;
+&olink.base.uri;
+&use.local.olink.style;
+&current.docid;
+&olink.doctitle;
+&link.mailto.url;
+&ulink.target;
+&olink.fragid;
+&olink.outline.ext;
+&olink.pubid;
+&olink.sysid;
+&olink.resolver;
+</reference>
+
+<reference><title>Bibliography</title>
+&biblioentry.item.separator;
+&bibliography.collection;
+&bibliography.numbered;
+</reference>
+
+<reference><title>Glossary</title>
+&glossterm.auto.link;
+&firstterm.only.link;
+&glossary.collection;
+&glossentry.show.acronym;
+</reference>
+
+<reference><title>Miscellaneous</title>
+&formal.procedures;
+&formal.title.placement;
+&runinhead.default.title.end.punct;
+&runinhead.title.end.punct;
+&show.comments;
+&show.revisionflag;
+&shade.verbatim;
+&shade.verbatim.style;
+&punct.honorific;
+&segmentedlist.as.table;
+&variablelist.as.table;
+&tex.math.in.alt;
+&tex.math.file;
+&tex.math.delims;
+&pixels.per.inch;
+&points.per.em;
+&use.svg;
+&use.role.as.xrefstyle;
+&menuchoice.separator;
+&menuchoice.menu.separator;
+&default.float.class;
+&footnote.number.format;
+&table.footnote.number.format;
+&footnote.number.symbols;
+&table.footnote.number.symbols;
+&xref.with.number.and.title;
+&xref.label-page.separator;
+&xref.label-title.separator;
+&xref.title-page.separator;
+&insert.xref.page.number;
+</reference>
+
+<reference><title>Graphics</title>
+&graphic.default.extension;
+&default.image.width;
+&nominal.image.width;
+&nominal.image.depth;
+&use.embed.for.svg;
+&make.graphic.viewport;
+&preferred.mediaobject.role;
+&use.role.for.mediaobject;
+&ignore.image.scaling;
+</reference>
+
+<reference><title>Chunking</title>
+&chunker.output.cdata-section-elements;
+&chunker.output.doctype-public;
+&chunker.output.doctype-system;
+&chunker.output.encoding;
+&chunker.output.indent;
+&chunker.output.media-type;
+&chunker.output.method;
+&chunker.output.omit-xml-declaration;
+&chunker.output.standalone;
+&saxon.character.representation;
+&html.ext;
+&html.extra.head.links;
+&root.filename;
+&base.dir;
+&generate.manifest;
+&manifest;
+&manifest.in.base.dir;
+&chunk.toc;
+&chunk.tocs.and.lots;
+&chunk.section.depth;
+&chunk.first.sections;
+&chunk.quietly;
+&navig.graphics;
+&navig.graphics.extension;
+&navig.graphics.path;
+&navig.showtitles;
+</reference>
+
+<reference><title>Profiling</title>
+<partintro>
+<para>Following parameters can be used for attribute value based
+profiling of your document. For more info about profiling look at
+<ulink
+url="http://docbook.sourceforge.net/projects/xsl/doc/tools/profiling.html">http://docbook.sourceforge.net/projects/xsl/doc/tools/profiling.html</ulink>.</para>
+</partintro>
+&profile.arch;
+&profile.condition;
+&profile.conformance;
+&profile.lang;
+&profile.os;
+&profile.revision;
+&profile.revisionflag;
+&profile.role;
+&profile.security;
+&profile.userlevel;
+&profile.vendor;
+&profile.attribute;
+&profile.value;
+&profile.separator;
+</reference>
+
+<reference><title>HTML Help</title>
+&htmlhelp.encoding;
+&htmlhelp.autolabel;
+&htmlhelp.chm;
+&htmlhelp.default.topic;
+&htmlhelp.display.progress;
+&htmlhelp.hhp;
+&htmlhelp.hhc;
+&htmlhelp.hhk;
+&htmlhelp.hhp.tail;
+&htmlhelp.hhp.window;
+&htmlhelp.hhp.windows;
+&htmlhelp.enhanced.decompilation;
+&htmlhelp.enumerate.images;
+&htmlhelp.force.map.and.alias;
+&htmlhelp.map.file;
+&htmlhelp.alias.file;
+&htmlhelp.hhc.section.depth;
+&htmlhelp.hhc.show.root;
+&htmlhelp.hhc.folders.instead.books;
+&htmlhelp.hhc.binary;
+&htmlhelp.hhc.width;
+&htmlhelp.title;
+&htmlhelp.show.menu;
+&htmlhelp.show.toolbar.text;
+&htmlhelp.show.advanced.search;
+&htmlhelp.show.favorities;
+&htmlhelp.button.hideshow;
+&htmlhelp.button.back;
+&htmlhelp.button.forward;
+&htmlhelp.button.stop;
+&htmlhelp.button.refresh;
+&htmlhelp.button.home;
+&htmlhelp.button.home.url;
+&htmlhelp.button.options;
+&htmlhelp.button.print;
+&htmlhelp.button.locate;
+&htmlhelp.button.jump1;
+&htmlhelp.button.jump1.url;
+&htmlhelp.button.jump1.title;
+&htmlhelp.button.jump2;
+&htmlhelp.button.jump2.url;
+&htmlhelp.button.jump2.title;
+&htmlhelp.button.next;
+&htmlhelp.button.prev;
+&htmlhelp.button.zoom;
+&htmlhelp.remember.window.position;
+&htmlhelp.window.geometry;
+&htmlhelp.use.hhk;
+&htmlhelp.only;
+</reference>
+
+<reference><title>Eclipse Help Platform</title>
+&eclipse.autolabel;
+&eclipse.plugin.name;
+&eclipse.plugin.id;
+&eclipse.plugin.provider;
+</reference>
+
+<reference><title>Localization</title>
+&l10n.gentext.language;
+&l10n.gentext.default.language;
+&l10n.gentext.use.xref.language;
+</reference>
+
+<appendix><title>The Stylesheet</title>
+
+<para>The <filename>param.xsl</filename> stylesheet is just a wrapper
+around all these parameters.</para>
+
+<src:fragment id="top" mundane-result-prefixes="xsl">
+
+<!-- This file is generated from param.xweb; do not edit this file! -->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                exclude-result-prefixes="src"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: param.xweb,v 1.1.1.1 2004/10/19 21:21:48 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<src:fragref linkend="admon.graphics.extension.frag"/>
+<src:fragref linkend="admon.graphics.frag"/>
+<src:fragref linkend="admon.graphics.path.frag"/>
+<src:fragref linkend="admon.style.frag"/>
+<src:fragref linkend="admon.textlabel.frag"/>
+<src:fragref linkend="annotate.toc.frag"/>
+<src:fragref linkend="appendix.autolabel.frag"/>
+<src:fragref linkend="author.othername.in.middle.frag"/>
+<src:fragref linkend="autotoc.label.separator.frag"/>
+<src:fragref linkend="base.dir.frag"/>
+<src:fragref linkend="biblioentry.item.separator.frag"/>
+<src:fragref linkend="bibliography.collection.frag"/>
+<src:fragref linkend="bibliography.numbered.frag"/>
+<src:fragref linkend="bridgehead.in.toc.frag"/>
+<src:fragref linkend="callout.defaultcolumn.frag"/>
+<src:fragref linkend="callout.graphics.extension.frag"/>
+<src:fragref linkend="callout.graphics.frag"/>
+<src:fragref linkend="callout.graphics.number.limit.frag"/>
+<src:fragref linkend="callout.graphics.path.frag"/>
+<src:fragref linkend="callout.list.table.frag"/>
+<src:fragref linkend="callout.unicode.frag"/>
+<src:fragref linkend="callout.unicode.number.limit.frag"/>
+<src:fragref linkend="callout.unicode.start.character.frag"/>
+<src:fragref linkend="callouts.extension.frag"/>
+<src:fragref linkend="chapter.autolabel.frag"/>
+<src:fragref linkend="chunk.first.sections.frag"/>
+<src:fragref linkend="chunk.quietly.frag"/>
+<src:fragref linkend="chunk.section.depth.frag"/>
+<src:fragref linkend="chunk.toc.frag"/>
+<src:fragref linkend="chunk.tocs.and.lots.frag"/>
+<src:fragref linkend="citerefentry.link.frag"/>
+<src:fragref linkend="collect.xref.targets.frag"/>
+<src:fragref linkend="css.decoration.frag"/>
+<src:fragref linkend="current.docid.frag"/>
+<src:fragref linkend="default.float.class.frag"/>
+<src:fragref linkend="default.image.width.frag"/>
+<src:fragref linkend="default.table.width.frag"/>
+<src:fragref linkend="draft.mode.frag"/>
+<src:fragref linkend="draft.watermark.image.frag"/>
+<src:fragref linkend="ebnf.table.bgcolor.frag"/>
+<src:fragref linkend="ebnf.table.border.frag"/>
+<src:fragref linkend="ebnf.assignment.frag"/>
+<src:fragref linkend="ebnf.statement.terminator.frag"/>
+<src:fragref linkend="eclipse.autolabel.frag"/>
+<src:fragref linkend="eclipse.plugin.name.frag"/>
+<src:fragref linkend="eclipse.plugin.id.frag"/>
+<src:fragref linkend="eclipse.plugin.provider.frag"/>
+<src:fragref linkend="emphasis.propagates.style.frag"/>
+<src:fragref linkend="entry.propagates.style.frag"/>
+<src:fragref linkend="firstterm.only.link.frag"/>
+<src:fragref linkend="footer.rule.frag"/>
+<src:fragref linkend="footnote.number.format.frag"/>
+<src:fragref linkend="footnote.number.symbols.frag"/>
+<src:fragref linkend="formal.procedures.frag"/>
+<src:fragref linkend="formal.title.placement.frag"/>
+<src:fragref linkend="funcsynopsis.decoration.frag"/>
+<src:fragref linkend="funcsynopsis.style.frag"/>
+<src:fragref linkend="funcsynopsis.tabular.threshold.frag"/>
+<src:fragref linkend="function.parens.frag"/>
+<src:fragref linkend="generate.id.attributes.frag"/>
+<src:fragref linkend="generate.index.frag"/>
+<src:fragref linkend="generate.legalnotice.link.frag"/>
+<src:fragref linkend="generate.manifest.frag"/>
+<src:fragref linkend="generate.meta.abstract.frag"/>
+<src:fragref linkend="generate.section.toc.level.frag"/>
+<src:fragref linkend="generate.toc.frag"/>
+<src:fragref linkend="glossary.collection.frag"/>
+<src:fragref linkend="glossentry.show.acronym.frag"/>
+<src:fragref linkend="glossterm.auto.link.frag"/>
+<src:fragref linkend="graphic.default.extension.frag"/>
+<src:fragref linkend="graphicsize.extension.frag"/>
+<src:fragref linkend="header.rule.frag"/>
+<src:fragref linkend="html.base.frag"/>
+<src:fragref linkend="html.cellpadding.frag"/>
+<src:fragref linkend="html.cellspacing.frag"/>
+<src:fragref linkend="html.cleanup.frag"/>
+<src:fragref linkend="html.ext.frag"/>
+<src:fragref linkend="html.extra.head.links.frag"/>
+<src:fragref linkend="html.longdesc.frag"/>
+<src:fragref linkend="html.longdesc.link.frag"/>
+<src:fragref linkend="html.stylesheet.frag"/>
+<src:fragref linkend="html.stylesheet.type.frag"/>
+<src:fragref linkend="htmlhelp.alias.file.frag"/>
+<src:fragref linkend="htmlhelp.autolabel.frag"/>
+<src:fragref linkend="htmlhelp.button.back.frag"/>
+<src:fragref linkend="htmlhelp.button.forward.frag"/>
+<src:fragref linkend="htmlhelp.button.hideshow.frag"/>
+<src:fragref linkend="htmlhelp.button.home.frag"/>
+<src:fragref linkend="htmlhelp.button.home.url.frag"/>
+<src:fragref linkend="htmlhelp.button.jump1.frag"/>
+<src:fragref linkend="htmlhelp.button.jump1.title.frag"/>
+<src:fragref linkend="htmlhelp.button.jump1.url.frag"/>
+<src:fragref linkend="htmlhelp.button.jump2.frag"/>
+<src:fragref linkend="htmlhelp.button.jump2.title.frag"/>
+<src:fragref linkend="htmlhelp.button.jump2.url.frag"/>
+<src:fragref linkend="htmlhelp.button.locate.frag"/>
+<src:fragref linkend="htmlhelp.button.next.frag"/>
+<src:fragref linkend="htmlhelp.button.options.frag"/>
+<src:fragref linkend="htmlhelp.button.prev.frag"/>
+<src:fragref linkend="htmlhelp.button.print.frag"/>
+<src:fragref linkend="htmlhelp.button.refresh.frag"/>
+<src:fragref linkend="htmlhelp.button.stop.frag"/>
+<src:fragref linkend="htmlhelp.button.zoom.frag"/>
+<src:fragref linkend="htmlhelp.chm.frag"/>
+<src:fragref linkend="htmlhelp.default.topic.frag"/>
+<src:fragref linkend="htmlhelp.display.progress.frag"/>
+<src:fragref linkend="htmlhelp.encoding.frag"/>
+<src:fragref linkend="htmlhelp.enhanced.decompilation.frag"/>
+<src:fragref linkend="htmlhelp.enumerate.images.frag"/>
+<src:fragref linkend="htmlhelp.force.map.and.alias.frag"/>
+<src:fragref linkend="htmlhelp.hhc.binary.frag"/>
+<src:fragref linkend="htmlhelp.hhc.folders.instead.books.frag"/>
+<src:fragref linkend="htmlhelp.hhc.frag"/>
+<src:fragref linkend="htmlhelp.hhc.section.depth.frag"/>
+<src:fragref linkend="htmlhelp.hhc.show.root.frag"/>
+<src:fragref linkend="htmlhelp.hhc.width.frag"/>
+<src:fragref linkend="htmlhelp.hhk.frag"/>
+<src:fragref linkend="htmlhelp.hhp.frag"/>
+<src:fragref linkend="htmlhelp.hhp.tail.frag"/>
+<src:fragref linkend="htmlhelp.hhp.window.frag"/>
+<src:fragref linkend="htmlhelp.hhp.windows.frag"/>
+<src:fragref linkend="htmlhelp.map.file.frag"/>
+<src:fragref linkend="htmlhelp.only.frag"/>
+<src:fragref linkend="htmlhelp.remember.window.position.frag"/>
+<src:fragref linkend="htmlhelp.show.advanced.search.frag"/>
+<src:fragref linkend="htmlhelp.show.favorities.frag"/>
+<src:fragref linkend="htmlhelp.show.menu.frag"/>
+<src:fragref linkend="htmlhelp.show.toolbar.text.frag"/>
+<src:fragref linkend="htmlhelp.title.frag"/>
+<src:fragref linkend="htmlhelp.use.hhk.frag"/>
+<src:fragref linkend="htmlhelp.window.geometry.frag"/>
+<src:fragref linkend="ignore.image.scaling.frag"/>
+<src:fragref linkend="inherit.keywords.frag"/>
+<src:fragref linkend="l10n.gentext.default.language.frag"/>
+<src:fragref linkend="l10n.gentext.language.frag"/>
+<src:fragref linkend="l10n.gentext.use.xref.language.frag"/>
+<src:fragref linkend="label.from.part.frag"/>
+<src:fragref linkend="linenumbering.everyNth.frag"/>
+<src:fragref linkend="linenumbering.extension.frag"/>
+<src:fragref linkend="linenumbering.separator.frag"/>
+<src:fragref linkend="linenumbering.width.frag"/>
+<src:fragref linkend="link.mailto.url.frag"/>
+<src:fragref linkend="make.graphic.viewport.frag"/>
+<src:fragref linkend="make.single.year.ranges.frag"/>
+<src:fragref linkend="make.valid.html.frag"/>
+<src:fragref linkend="make.year.ranges.frag"/>
+<src:fragref linkend="manifest.frag"/>
+<src:fragref linkend="manifest.in.base.dir.frag"/>
+<src:fragref linkend="manual.toc.frag"/>
+<src:fragref linkend="menuchoice.menu.separator.frag"/>
+<src:fragref linkend="menuchoice.separator.frag"/>
+<src:fragref linkend="navig.graphics.extension.frag"/>
+<src:fragref linkend="navig.graphics.frag"/>
+<src:fragref linkend="navig.graphics.path.frag"/>
+<src:fragref linkend="navig.showtitles.frag"/>
+<src:fragref linkend="nominal.image.depth.frag"/>
+<src:fragref linkend="nominal.image.width.frag"/>
+<src:fragref linkend="nominal.table.width.frag"/>
+<src:fragref linkend="olink.base.uri.frag"/>
+<src:fragref linkend="olink.doctitle.frag"/>
+<src:fragref linkend="olink.fragid.frag"/>
+<src:fragref linkend="olink.outline.ext.frag"/>
+<src:fragref linkend="olink.pubid.frag"/>
+<src:fragref linkend="olink.resolver.frag"/>
+<src:fragref linkend="olink.sysid.frag"/>
+<src:fragref linkend="para.propagates.style.frag"/>
+<src:fragref linkend="part.autolabel.frag"/>
+<src:fragref linkend="phrase.propagates.style.frag"/>
+<src:fragref linkend="pixels.per.inch.frag"/>
+<src:fragref linkend="points.per.em.frag"/>
+<src:fragref linkend="preface.autolabel.frag"/>
+<src:fragref linkend="preferred.mediaobject.role.frag"/>
+<src:fragref linkend="process.empty.source.toc.frag"/>
+<src:fragref linkend="process.source.toc.frag"/>
+<src:fragref linkend="profile.arch.frag"/>
+<src:fragref linkend="profile.attribute.frag"/>
+<src:fragref linkend="profile.condition.frag"/>
+<src:fragref linkend="profile.conformance.frag"/>
+<src:fragref linkend="profile.lang.frag"/>
+<src:fragref linkend="profile.os.frag"/>
+<src:fragref linkend="profile.revision.frag"/>
+<src:fragref linkend="profile.revisionflag.frag"/>
+<src:fragref linkend="profile.role.frag"/>
+<src:fragref linkend="profile.security.frag"/>
+<src:fragref linkend="profile.separator.frag"/>
+<src:fragref linkend="profile.userlevel.frag"/>
+<src:fragref linkend="profile.value.frag"/>
+<src:fragref linkend="profile.vendor.frag"/>
+<src:fragref linkend="punct.honorific.frag"/>
+<src:fragref linkend="qanda.defaultlabel.frag"/>
+<src:fragref linkend="qanda.inherit.numeration.frag"/>
+<src:fragref linkend="qandadiv.autolabel.frag"/>
+<src:fragref linkend="refentry.generate.name.frag"/>
+<src:fragref linkend="refentry.generate.title.frag"/>
+<src:fragref linkend="refentry.separator.frag"/>
+<src:fragref linkend="refentry.xref.manvolnum.frag"/>
+<src:fragref linkend="root.filename.frag"/>
+<src:fragref linkend="rootid.frag"/>
+<src:fragref linkend="runinhead.default.title.end.punct.frag"/>
+<src:fragref linkend="runinhead.title.end.punct.frag"/>
+<src:fragref linkend="section.autolabel.frag"/>
+<src:fragref linkend="section.label.includes.component.label.frag"/>
+<src:fragref linkend="segmentedlist.as.table.frag"/>
+<src:fragref linkend="shade.verbatim.frag"/>
+<src:fragref linkend="shade.verbatim.style.frag"/>
+<src:fragref linkend="show.comments.frag"/>
+<src:fragref linkend="show.revisionflag.frag"/>
+<src:fragref linkend="spacing.paras.frag"/>
+<src:fragref linkend="suppress.footer.navigation.frag"/>
+<src:fragref linkend="suppress.header.navigation.frag"/>
+<src:fragref linkend="suppress.navigation.frag"/>
+<src:fragref linkend="table.borders.with.css.frag"/>
+<src:fragref linkend="table.cell.border.color.frag"/>
+<src:fragref linkend="table.cell.border.style.frag"/>
+<src:fragref linkend="table.cell.border.thickness.frag"/>
+<src:fragref linkend="table.footnote.number.format.frag"/>
+<src:fragref linkend="table.footnote.number.symbols.frag"/>
+<src:fragref linkend="table.frame.border.color.frag"/>
+<src:fragref linkend="table.frame.border.style.frag"/>
+<src:fragref linkend="table.frame.border.thickness.frag"/>
+<src:fragref linkend="tablecolumns.extension.frag"/>
+<src:fragref linkend="target.database.document.frag"/>
+<src:fragref linkend="targets.filename.frag"/>
+<src:fragref linkend="tex.math.delims.frag"/>
+<src:fragref linkend="tex.math.file.frag"/>
+<src:fragref linkend="tex.math.in.alt.frag"/>
+<src:fragref linkend="textinsert.extension.frag"/>
+<src:fragref linkend="toc.list.type.frag"/>
+<src:fragref linkend="toc.section.depth.frag"/>
+<src:fragref linkend="toc.max.depth.frag"/>
+<src:fragref linkend="ulink.target.frag"/>
+<src:fragref linkend="use.embed.for.svg.frag"/>
+<src:fragref linkend="use.extensions.frag"/>
+<src:fragref linkend="use.id.as.filename.frag"/>
+<src:fragref linkend="use.local.olink.style.frag"/>
+<src:fragref linkend="use.role.as.xrefstyle.frag"/>
+<src:fragref linkend="use.role.for.mediaobject.frag"/>
+<src:fragref linkend="use.svg.frag"/>
+<src:fragref linkend="variablelist.as.table.frag"/>
+<src:fragref linkend="xref.with.number.and.title.frag"/>
+<src:fragref linkend="xref.label-title.separator.frag"/>
+<src:fragref linkend="xref.label-page.separator.frag"/>
+<src:fragref linkend="xref.title-page.separator.frag"/>
+<src:fragref linkend="insert.xref.page.number.frag"/>
+
+</xsl:stylesheet>
+</src:fragment>
+
+</appendix>
+
+</book>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/pi.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/pi.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/pi.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,207 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: pi.xsl,v 1.1.1.1 2004/10/19 21:21:48 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<xsl:template match="processing-instruction()">
+</xsl:template>
+
+<xsl:template match="processing-instruction('dbhtml')">
+  <!-- nop -->
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="dbhtml-attribute">
+  <xsl:param name="pis" select="processing-instruction('dbhtml')"/>
+  <xsl:param name="attribute">filename</xsl:param>
+
+  <xsl:call-template name="pi-attribute">
+    <xsl:with-param name="pis" select="$pis"/>
+    <xsl:with-param name="attribute" select="$attribute"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="dbhtml-filename">
+  <xsl:param name="pis" select="./processing-instruction('dbhtml')"/>
+  <xsl:call-template name="dbhtml-attribute">
+    <xsl:with-param name="pis" select="$pis"/>
+    <xsl:with-param name="attribute">filename</xsl:with-param>
+  </xsl:call-template>
+</xsl:template>
+
+<!--
+<xsl:template name="dbhtml-dir">
+  <xsl:param name="pis" select="./processing-instruction('dbhtml')"/>
+  <xsl:call-template name="dbhtml-attribute">
+    <xsl:with-param name="pis" select="$pis"/>
+    <xsl:with-param name="attribute">dir</xsl:with-param>
+  </xsl:call-template>
+</xsl:template>
+-->
+
+<xsl:template name="dbhtml-dir">
+  <xsl:param name="context" select="."/>
+
+  <!-- directories are now inherited from previous levels -->
+
+  <xsl:variable name="ppath">
+    <xsl:if test="$context/parent::*">
+      <xsl:call-template name="dbhtml-dir">
+        <xsl:with-param name="context" select="$context/parent::*"/>
+      </xsl:call-template>
+    </xsl:if>
+  </xsl:variable>
+
+  <xsl:variable name="path">
+    <xsl:call-template name="dbhtml-attribute">
+      <xsl:with-param name="pis" select="$context/processing-instruction('dbhtml')"/>
+      <xsl:with-param name="attribute">dir</xsl:with-param>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="$path = ''">
+      <xsl:if test="$ppath != ''">
+        <xsl:value-of select="$ppath"/>
+      </xsl:if>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:if test="$ppath != ''">
+        <xsl:value-of select="$ppath"/>
+        <xsl:if test="substring($ppath, string-length($ppath), 1) != '/'">
+          <xsl:text>/</xsl:text>
+        </xsl:if>
+      </xsl:if>
+      <xsl:value-of select="$path"/>
+      <xsl:text>/</xsl:text>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="process.cmdsynopsis.list">
+  <xsl:param name="cmdsynopses"/><!-- empty node list by default -->
+  <xsl:param name="count" select="1"/>
+
+  <xsl:choose>
+    <xsl:when test="$count>count($cmdsynopses)"></xsl:when>
+    <xsl:otherwise>
+      <xsl:variable name="cmdsyn" select="$cmdsynopses[$count]"/>
+
+       <dt>
+       <a>
+         <xsl:attribute name="href">
+           <xsl:call-template name="object.id">
+             <xsl:with-param name="object" select="$cmdsyn"/>
+           </xsl:call-template>
+         </xsl:attribute>
+
+         <xsl:choose>
+           <xsl:when test="$cmdsyn/@xreflabel">
+             <xsl:call-template name="xref.xreflabel">
+               <xsl:with-param name="target" select="$cmdsyn"/>
+             </xsl:call-template>
+           </xsl:when>
+           <xsl:otherwise>
+             <xsl:apply-templates select="$cmdsyn" mode="xref-to">
+               <xsl:with-param name="target" select="$cmdsyn"/>
+             </xsl:apply-templates>
+           </xsl:otherwise>
+         </xsl:choose>
+       </a>
+       </dt>
+
+        <xsl:call-template name="process.cmdsynopsis.list">
+          <xsl:with-param name="cmdsynopses" select="$cmdsynopses"/>
+          <xsl:with-param name="count" select="$count+1"/>
+        </xsl:call-template>
+      </xsl:otherwise>
+    </xsl:choose>
+</xsl:template>
+
+<xsl:template match="processing-instruction('dbcmdlist')">
+  <xsl:variable name="cmdsynopses" select="..//cmdsynopsis"/>
+
+  <xsl:if test="count($cmdsynopses)&lt;1">
+    <xsl:message><xsl:text>No cmdsynopsis elements matched dbcmdlist PI, perhaps it's nested too deep?</xsl:text>
+    </xsl:message>
+  </xsl:if>
+
+  <dl>
+    <xsl:call-template name="process.cmdsynopsis.list">
+      <xsl:with-param name="cmdsynopses" select="$cmdsynopses"/>
+    </xsl:call-template>
+  </dl>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="process.funcsynopsis.list">
+  <xsl:param name="funcsynopses"/><!-- empty node list by default -->
+  <xsl:param name="count" select="1"/>
+
+  <xsl:choose>
+    <xsl:when test="$count>count($funcsynopses)"></xsl:when>
+    <xsl:otherwise>
+      <xsl:variable name="cmdsyn" select="$funcsynopses[$count]"/>
+
+       <dt>
+       <a>
+         <xsl:attribute name="href">
+           <xsl:call-template name="object.id">
+             <xsl:with-param name="object" select="$cmdsyn"/>
+           </xsl:call-template>
+         </xsl:attribute>
+
+         <xsl:choose>
+           <xsl:when test="$cmdsyn/@xreflabel">
+             <xsl:call-template name="xref.xreflabel">
+               <xsl:with-param name="target" select="$cmdsyn"/>
+             </xsl:call-template>
+           </xsl:when>
+           <xsl:otherwise>
+              <xsl:apply-templates select="$cmdsyn" mode="xref-to">
+                <xsl:with-param name="target" select="$cmdsyn"/>
+              </xsl:apply-templates>
+           </xsl:otherwise>
+         </xsl:choose>
+       </a>
+       </dt>
+
+        <xsl:call-template name="process.funcsynopsis.list">
+          <xsl:with-param name="funcsynopses" select="$funcsynopses"/>
+          <xsl:with-param name="count" select="$count+1"/>
+        </xsl:call-template>
+      </xsl:otherwise>
+    </xsl:choose>
+</xsl:template>
+
+<xsl:template match="processing-instruction('dbfunclist')">
+  <xsl:variable name="funcsynopses" select="..//funcsynopsis"/>
+
+  <xsl:if test="count($funcsynopses)&lt;1">
+    <xsl:message><xsl:text>No funcsynopsis elements matched dbfunclist PI, perhaps it's nested too deep?</xsl:text>
+    </xsl:message>
+  </xsl:if>
+
+  <dl>
+    <xsl:call-template name="process.funcsynopsis.list">
+      <xsl:with-param name="funcsynopses" select="$funcsynopses"/>
+    </xsl:call-template>
+  </dl>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/profile-chunk-code.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/profile-chunk-code.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/profile-chunk-code.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,562 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<!--This file was created automatically by xsl2profile-->
+<!--from the DocBook XSL stylesheets. Do not edit this file.-->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" xmlns:exslt="http://exslt.org/common" exslt:dummy="dummy" extension-element-prefixes="exslt" version="1.0" exclude-result-prefixes="exsl exslt">
+
+<!-- ********************************************************************
+     $Id: profile-chunk-code.xsl,v 1.1.1.1 2004/10/19 21:21:48 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:param name="onechunk" select="0"/>
+<xsl:param name="refentry.separator" select="0"/>
+<xsl:param name="chunk.fast" select="0"/>
+
+<xsl:key name="genid" match="*" use="generate-id()"/>
+
+<!-- ==================================================================== -->
+
+<xsl:variable name="chunk.hierarchy">
+  <xsl:if test="$chunk.fast != 0">
+    <xsl:choose>
+      <xsl:when test="function-available('exsl:node-set')">
+        <xsl:message>Computing chunks...</xsl:message>
+        <xsl:apply-templates select="/*" mode="find.chunks"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:message>
+          <xsl:text>Fast chunking requires exsl:node-set(). </xsl:text>
+          <xsl:text>Using "slow" chunking.</xsl:text>
+        </xsl:message>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:if>
+</xsl:variable>
+
+<xsl:template match="*" mode="find.chunks">
+  <xsl:variable name="chunk">
+    <xsl:call-template name="chunk"/>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="$chunk != 0">
+      <div class="{local-name(.)}" id="{generate-id()}">
+        <xsl:apply-templates select="*" mode="find.chunks"/>
+      </div>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:apply-templates select="*" mode="find.chunks"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="process-chunk-element">
+  <xsl:param name="content">
+    <xsl:apply-imports/>
+  </xsl:param>
+
+  <xsl:choose>
+    <xsl:when test="$chunk.fast != 0 and function-available('exsl:node-set')">
+      <xsl:variable name="chunks" select="exsl:node-set($chunk.hierarchy)//div"/>
+      <xsl:variable name="genid" select="generate-id()"/>
+
+      <xsl:variable name="div" select="$chunks[@id=$genid]"/>
+
+      <xsl:variable name="prevdiv" select="($div/preceding-sibling::div|$div/preceding::div|$div/parent::div)[last()]"/>
+      <xsl:variable name="prev" select="key('genid', $prevdiv/@id)"/>
+
+      <xsl:variable name="nextdiv" select="($div/following-sibling::div|$div/following::div|$div/div)[1]"/>
+      <xsl:variable name="next" select="key('genid', $nextdiv/@id)"/>
+
+      <xsl:choose>
+        <xsl:when test="$onechunk != 0 and parent::*">
+          <xsl:copy-of select="$content"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:call-template name="process-chunk">
+            <xsl:with-param name="prev" select="$prev"/>
+            <xsl:with-param name="next" select="$next"/>
+            <xsl:with-param name="content" select="$content"/>
+          </xsl:call-template>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:choose>
+        <xsl:when test="$onechunk != 0 and not(parent::*)">
+          <xsl:call-template name="chunk-all-sections">
+            <xsl:with-param name="content" select="$content"/>
+          </xsl:call-template>
+        </xsl:when>
+        <xsl:when test="$onechunk != 0">
+          <xsl:copy-of select="$content"/>
+        </xsl:when>
+        <xsl:when test="$chunk.first.sections = 0">
+          <xsl:call-template name="chunk-first-section-with-parent">
+            <xsl:with-param name="content" select="$content"/>
+          </xsl:call-template>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:call-template name="chunk-all-sections">
+            <xsl:with-param name="content" select="$content"/>
+          </xsl:call-template>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="process-chunk">
+  <xsl:param name="prev" select="."/>
+  <xsl:param name="next" select="."/>
+  <xsl:param name="content">
+    <xsl:apply-imports/>
+  </xsl:param>
+
+  <xsl:variable name="ischunk">
+    <xsl:call-template name="chunk"/>
+  </xsl:variable>
+
+  <xsl:variable name="chunkfn">
+    <xsl:if test="$ischunk='1'">
+      <xsl:apply-templates mode="chunk-filename" select="."/>
+    </xsl:if>
+  </xsl:variable>
+
+  <xsl:if test="$ischunk='0'">
+    <xsl:message>
+      <xsl:text>Error </xsl:text>
+      <xsl:value-of select="name(.)"/>
+      <xsl:text> is not a chunk!</xsl:text>
+    </xsl:message>
+  </xsl:if>
+
+  <xsl:variable name="filename">
+    <xsl:call-template name="make-relative-filename">
+      <xsl:with-param name="base.dir" select="$base.dir"/>
+      <xsl:with-param name="base.name" select="$chunkfn"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:call-template name="write.chunk">
+    <xsl:with-param name="filename" select="$filename"/>
+    <xsl:with-param name="content">
+      <xsl:call-template name="chunk-element-content">
+        <xsl:with-param name="prev" select="$prev"/>
+        <xsl:with-param name="next" select="$next"/>
+        <xsl:with-param name="content" select="$content"/>
+      </xsl:call-template>
+    </xsl:with-param>
+    <xsl:with-param name="quiet" select="$chunk.quietly"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="chunk-first-section-with-parent">
+  <xsl:param name="content">
+    <xsl:apply-imports/>
+  </xsl:param>
+
+  <!-- These xpath expressions are really hairy. The trick is to pick sections -->
+  <!-- that are not first children and are not the children of first children -->
+
+  <!-- Break these variables into pieces to work around
+       http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6063 -->
+
+  <xsl:variable name="prev-v1" select="(ancestor::sect1[$chunk.section.depth &gt; 0                                and preceding-sibling::sect1][1]               |ancestor::sect2[$chunk.section.depth &gt; 1                                and preceding-sibling::sect2                                and parent::sect1[preceding-sibling::sect1]][1]               |ancestor::sect3[$chunk.section.depth &gt; 2                                and preceding-sibling::sect3                                and parent::sect2[preceding-sibling::sect2]                                and ancestor::sect1[preceding-sibling::sect1]][1]               |ancestor::sect4[$chunk.section.depth &gt; 3                                and preceding-sibling::sect4                                and parent::sect3[preceding-sibling::sect2]                                and ancestor::sect2[preceding-sibling::sect2]                                and ancestor::sect1[preceding-sibling::sect1]][1]               |!
 ancestor::sect5[$chunk.section.depth &gt; 4                                and preceding-sibling::sect5                                and parent::sect4[preceding-sibling::sect4]                                and ancestor::sect3[preceding-sibling::sect3]                                and ancestor::sect2[preceding-sibling::sect2]                                and ancestor::sect1[preceding-sibling::sect1]][1]               |ancestor::section[$chunk.section.depth &gt; count(ancestor::section)                                 and not(ancestor::section[not(preceding-sibling::section)])][1])[last()]"/>
+
+  <xsl:variable name="prev-v2" select="(preceding::sect1[$chunk.section.depth &gt; 0                                and preceding-sibling::sect1][1]               |preceding::sect2[$chunk.section.depth &gt; 1                                and preceding-sibling::sect2                                and parent::sect1[preceding-sibling::sect1]][1]               |preceding::sect3[$chunk.section.depth &gt; 2                                and preceding-sibling::sect3                                and parent::sect2[preceding-sibling::sect2]                                and ancestor::sect1[preceding-sibling::sect1]][1]               |preceding::sect4[$chunk.section.depth &gt; 3                                and preceding-sibling::sect4                                and parent::sect3[preceding-sibling::sect2]                                and ancestor::sect2[preceding-sibling::sect2]                                and ancestor::sect1[preceding-sibling::sect1]][1]            !
    |preceding::sect5[$chunk.section.depth &gt; 4                                and preceding-sibling::sect5                                and parent::sect4[preceding-sibling::sect4]                                and ancestor::sect3[preceding-sibling::sect3]                                and ancestor::sect2[preceding-sibling::sect2]                                and ancestor::sect1[preceding-sibling::sect1]][1]               |preceding::section[$chunk.section.depth &gt; count(ancestor::section)                                  and preceding-sibling::section                                  and not(ancestor::section[not(preceding-sibling::section)])][1])[last()]"/>
+
+  <xsl:variable name="prev" select="(preceding::book[1]              |preceding::preface[1]              |preceding::chapter[1]              |preceding::appendix[1]              |preceding::part[1]              |preceding::reference[1]              |preceding::refentry[1]              |preceding::colophon[1]              |preceding::article[1]              |preceding::bibliography[1]              |preceding::glossary[1]              |preceding::index[$generate.index != 0][1]              |preceding::setindex[$generate.index != 0][1]              |ancestor::set              |ancestor::book[1]              |ancestor::preface[1]              |ancestor::chapter[1]              |ancestor::appendix[1]              |ancestor::part[1]              |ancestor::reference[1]              |ancestor::article[1]              |$prev-v1              |$prev-v2)[last()]"/>
+
+  <xsl:variable name="next-v1" select="(following::sect1[$chunk.section.depth &gt; 0                                and preceding-sibling::sect1][1]               |following::sect2[$chunk.section.depth &gt; 1                                and preceding-sibling::sect2                                and parent::sect1[preceding-sibling::sect1]][1]               |following::sect3[$chunk.section.depth &gt; 2                                and preceding-sibling::sect3                                and parent::sect2[preceding-sibling::sect2]                                and ancestor::sect1[preceding-sibling::sect1]][1]               |following::sect4[$chunk.section.depth &gt; 3                                and preceding-sibling::sect4                                and parent::sect3[preceding-sibling::sect2]                                and ancestor::sect2[preceding-sibling::sect2]                                and ancestor::sect1[preceding-sibling::sect1]][1]            !
    |following::sect5[$chunk.section.depth &gt; 4                                and preceding-sibling::sect5                                and parent::sect4[preceding-sibling::sect4]                                and ancestor::sect3[preceding-sibling::sect3]                                and ancestor::sect2[preceding-sibling::sect2]                                and ancestor::sect1[preceding-sibling::sect1]][1]               |following::section[$chunk.section.depth &gt; count(ancestor::section)                                  and preceding-sibling::section                                  and not(ancestor::section[not(preceding-sibling::section)])][1])[1]"/>
+
+  <xsl:variable name="next-v2" select="(descendant::sect1[$chunk.section.depth &gt; 0                                and preceding-sibling::sect1][1]               |descendant::sect2[$chunk.section.depth &gt; 1                                and preceding-sibling::sect2                                and parent::sect1[preceding-sibling::sect1]][1]               |descendant::sect3[$chunk.section.depth &gt; 2                                and preceding-sibling::sect3                                and parent::sect2[preceding-sibling::sect2]                                and ancestor::sect1[preceding-sibling::sect1]][1]               |descendant::sect4[$chunk.section.depth &gt; 3                                and preceding-sibling::sect4                                and parent::sect3[preceding-sibling::sect2]                                and ancestor::sect2[preceding-sibling::sect2]                                and ancestor::sect1[preceding-sibling::sect1]][1]        !
        |descendant::sect5[$chunk.section.depth &gt; 4                                and preceding-sibling::sect5                                and parent::sect4[preceding-sibling::sect4]                                and ancestor::sect3[preceding-sibling::sect3]                                and ancestor::sect2[preceding-sibling::sect2]                                and ancestor::sect1[preceding-sibling::sect1]][1]               |descendant::section[$chunk.section.depth &gt; count(ancestor::section)                                  and preceding-sibling::section                                  and not(ancestor::section[not(preceding-sibling::section)])])[1]"/>
+
+  <xsl:variable name="next" select="(following::book[1]              |following::preface[1]              |following::chapter[1]              |following::appendix[1]              |following::part[1]              |following::reference[1]              |following::refentry[1]              |following::colophon[1]              |following::bibliography[1]              |following::glossary[1]              |following::index[$generate.index != 0][1]              |following::article[1]              |following::setindex[$generate.index != 0][1]              |descendant::book[1]              |descendant::preface[1]              |descendant::chapter[1]              |descendant::appendix[1]              |descendant::article[1]              |descendant::bibliography[1]              |descendant::glossary[1]              |descendant::index[$generate.index != 0][1]              |descendant::colophon[1]              |descendant::setindex[$generate.index != 0][1]              |descendant::part[!
 1]              |descendant::reference[1]              |descendant::refentry[1]              |$next-v1              |$next-v2)[1]"/>
+
+  <xsl:call-template name="process-chunk">
+    <xsl:with-param name="prev" select="$prev"/>
+    <xsl:with-param name="next" select="$next"/>
+    <xsl:with-param name="content" select="$content"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="chunk-all-sections">
+  <xsl:param name="content">
+    <xsl:apply-imports/>
+  </xsl:param>
+
+  <xsl:variable name="prev-v1" select="(preceding::sect1[$chunk.section.depth &gt; 0][1]              |preceding::sect2[$chunk.section.depth &gt; 1][1]              |preceding::sect3[$chunk.section.depth &gt; 2][1]              |preceding::sect4[$chunk.section.depth &gt; 3][1]              |preceding::sect5[$chunk.section.depth &gt; 4][1]              |preceding::section[$chunk.section.depth &gt; count(ancestor::section)][1])[last()]"/>
+
+  <xsl:variable name="prev-v2" select="(ancestor::sect1[$chunk.section.depth &gt; 0][1]              |ancestor::sect2[$chunk.section.depth &gt; 1][1]              |ancestor::sect3[$chunk.section.depth &gt; 2][1]              |ancestor::sect4[$chunk.section.depth &gt; 3][1]              |ancestor::sect5[$chunk.section.depth &gt; 4][1]              |ancestor::section[$chunk.section.depth &gt; count(ancestor::section)][1])[last()]"/>
+
+  <xsl:variable name="prev" select="(preceding::book[1]              |preceding::preface[1]              |preceding::chapter[1]              |preceding::appendix[1]              |preceding::part[1]              |preceding::reference[1]              |preceding::refentry[1]              |preceding::colophon[1]              |preceding::article[1]              |preceding::bibliography[1]              |preceding::glossary[1]              |preceding::index[$generate.index != 0][1]              |preceding::setindex[$generate.index != 0][1]              |ancestor::set              |ancestor::book[1]              |ancestor::preface[1]              |ancestor::chapter[1]              |ancestor::appendix[1]              |ancestor::part[1]              |ancestor::reference[1]              |ancestor::article[1]              |$prev-v1              |$prev-v2)[last()]"/>
+
+  <xsl:variable name="next-v1" select="(following::sect1[$chunk.section.depth &gt; 0][1]              |following::sect2[$chunk.section.depth &gt; 1][1]              |following::sect3[$chunk.section.depth &gt; 2][1]              |following::sect4[$chunk.section.depth &gt; 3][1]              |following::sect5[$chunk.section.depth &gt; 4][1]              |following::section[$chunk.section.depth &gt; count(ancestor::section)][1])[1]"/>
+
+  <xsl:variable name="next-v2" select="(descendant::sect1[$chunk.section.depth &gt; 0][1]              |descendant::sect2[$chunk.section.depth &gt; 1][1]              |descendant::sect3[$chunk.section.depth &gt; 2][1]              |descendant::sect4[$chunk.section.depth &gt; 3][1]              |descendant::sect5[$chunk.section.depth &gt; 4][1]              |descendant::section[$chunk.section.depth                                    &gt; count(ancestor::section)][1])[1]"/>
+
+  <xsl:variable name="next" select="(following::book[1]              |following::preface[1]              |following::chapter[1]              |following::appendix[1]              |following::part[1]              |following::reference[1]              |following::refentry[1]              |following::colophon[1]              |following::bibliography[1]              |following::glossary[1]              |following::index[$generate.index != 0][1]              |following::article[1]              |following::setindex[$generate.index != 0][1]              |descendant::book[1]              |descendant::preface[1]              |descendant::chapter[1]              |descendant::appendix[1]              |descendant::article[1]              |descendant::bibliography[1]              |descendant::glossary[1]              |descendant::index[$generate.index != 0][1]              |descendant::colophon[1]              |descendant::setindex[$generate.index != 0][1]              |descendant::part[!
 1]              |descendant::reference[1]              |descendant::refentry[1]              |$next-v1              |$next-v2)[1]"/>
+
+  <xsl:call-template name="process-chunk">
+    <xsl:with-param name="prev" select="$prev"/>
+    <xsl:with-param name="next" select="$next"/>
+    <xsl:with-param name="content" select="$content"/>
+  </xsl:call-template>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xslo:include xmlns:xslo="http://www.w3.org/1999/XSL/Transform" href="../profiling/profile-mode.xsl"/><xsl:template match="/"><xslo:variable xmlns:xslo="http://www.w3.org/1999/XSL/Transform" name="profiled-content"><xslo:apply-templates select="." mode="profile"/></xslo:variable><xslo:variable xmlns:xslo="http://www.w3.org/1999/XSL/Transform" name="profiled-nodes" select="exslt:node-set($profiled-content)"/>
+  <xsl:choose>
+    <xsl:when test="$rootid != ''">
+      <xsl:choose>
+        <xsl:when test="count($profiled-nodes//*[@id=$rootid]) = 0">
+          <xsl:message terminate="yes">
+            <xsl:text>ID '</xsl:text>
+            <xsl:value-of select="$rootid"/>
+            <xsl:text>' not found in document.</xsl:text>
+          </xsl:message>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:if test="$collect.xref.targets = 'yes' or                         $collect.xref.targets = 'only'">
+            <xsl:apply-templates select="key('id', $rootid)" mode="collect.targets"/>
+          </xsl:if>
+          <xsl:if test="$collect.xref.targets != 'only'">
+            <xsl:apply-templates select="$profiled-nodes//*[@id=$rootid]" mode="process.root"/>
+            <xsl:if test="$tex.math.in.alt != ''">
+              <xsl:apply-templates select="$profiled-nodes//*[@id=$rootid]" mode="collect.tex.math"/>
+            </xsl:if>
+            <xsl:if test="$generate.manifest != 0">
+              <xsl:call-template name="generate.manifest">
+                <xsl:with-param name="node" select="key('id',$rootid)"/>
+              </xsl:call-template>
+            </xsl:if>
+          </xsl:if>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:if test="$collect.xref.targets = 'yes' or                     $collect.xref.targets = 'only'">
+        <xsl:apply-templates select="$profiled-nodes" mode="collect.targets"/>
+      </xsl:if>
+      <xsl:if test="$collect.xref.targets != 'only'">
+        <xsl:apply-templates select="$profiled-nodes" mode="process.root"/>
+        <xsl:if test="$tex.math.in.alt != ''">
+          <xsl:apply-templates select="$profiled-nodes" mode="collect.tex.math"/>
+        </xsl:if>
+        <xsl:if test="$generate.manifest != 0">
+          <xsl:call-template name="generate.manifest"/>
+        </xsl:if>
+      </xsl:if>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="*" mode="process.root">
+  <xsl:apply-templates select="."/>
+</xsl:template>
+
+<!-- ====================================================================== -->
+
+<xsl:template match="set|book|part|preface|chapter|appendix                      |article                      |reference|refentry                      |book/glossary|article/glossary|part/glossary                      |book/bibliography|article/bibliography                      |colophon">
+  <xsl:choose>
+    <xsl:when test="$onechunk != 0 and parent::*">
+      <xsl:apply-imports/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:call-template name="process-chunk-element"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="sect1|sect2|sect3|sect4|sect5|section">
+  <xsl:variable name="ischunk">
+    <xsl:call-template name="chunk"/>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="not(parent::*)">
+      <xsl:call-template name="process-chunk-element"/>
+    </xsl:when>
+    <xsl:when test="$ischunk = 0">
+      <xsl:apply-imports/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:call-template name="process-chunk-element"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="setindex                      |book/index                      |article/index">
+  <!-- some implementations use completely empty index tags to indicate -->
+  <!-- where an automatically generated index should be inserted. so -->
+  <!-- if the index is completely empty, skip it. -->
+  <xsl:if test="count(*)&gt;0 or $generate.index != '0'">
+    <xsl:call-template name="process-chunk-element"/>
+  </xsl:if>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="make.lots">
+  <xsl:param name="toc.params" select="''"/>
+  <xsl:param name="toc"/>
+
+  <xsl:variable name="lots">
+    <xsl:if test="contains($toc.params, 'toc')">
+      <xsl:copy-of select="$toc"/>
+    </xsl:if>
+
+    <xsl:if test="contains($toc.params, 'figure')">
+      <xsl:call-template name="list.of.titles">
+        <xsl:with-param name="titles" select="'figure'"/>
+        <xsl:with-param name="nodes" select=".//figure"/>
+      </xsl:call-template>
+    </xsl:if>
+
+    <xsl:if test="contains($toc.params, 'table')">
+      <xsl:call-template name="list.of.titles">
+        <xsl:with-param name="titles" select="'table'"/>
+        <xsl:with-param name="nodes" select=".//table"/>
+      </xsl:call-template>
+    </xsl:if>
+
+    <xsl:if test="contains($toc.params, 'example')">
+      <xsl:call-template name="list.of.titles">
+        <xsl:with-param name="titles" select="'example'"/>
+        <xsl:with-param name="nodes" select=".//example"/>
+      </xsl:call-template>
+    </xsl:if>
+
+    <xsl:if test="contains($toc.params, 'equation')">
+      <xsl:call-template name="list.of.titles">
+        <xsl:with-param name="titles" select="'equation'"/>
+        <xsl:with-param name="nodes" select=".//equation[title]"/>
+      </xsl:call-template>
+    </xsl:if>
+  </xsl:variable>
+
+  <xsl:if test="string($lots) != ''">
+    <xsl:choose>
+      <xsl:when test="$chunk.tocs.and.lots != 0 and not(parent::*)">
+        <xsl:call-template name="write.chunk">
+          <xsl:with-param name="filename">
+            <xsl:call-template name="make-relative-filename">
+              <xsl:with-param name="base.dir" select="$base.dir"/>
+              <xsl:with-param name="base.name">
+                <xsl:call-template name="dbhtml-dir"/>
+                <xsl:apply-templates select="." mode="recursive-chunk-filename"/>
+                <xsl:text>-toc</xsl:text>
+                <xsl:value-of select="$html.ext"/>
+              </xsl:with-param>
+            </xsl:call-template>
+          </xsl:with-param>
+          <xsl:with-param name="content">
+            <xsl:call-template name="chunk-element-content">
+              <xsl:with-param name="prev" select="/foo"/>
+              <xsl:with-param name="next" select="/foo"/>
+              <xsl:with-param name="nav.context" select="'toc'"/>
+              <xsl:with-param name="content">
+                <h1>
+                  <xsl:apply-templates select="." mode="object.title.markup"/>
+                </h1>
+                <xsl:copy-of select="$lots"/>
+              </xsl:with-param>
+            </xsl:call-template>
+          </xsl:with-param>
+          <xsl:with-param name="quiet" select="$chunk.quietly"/>
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:copy-of select="$lots"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:if>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="in.other.chunk">
+  <xsl:param name="chunk" select="."/>
+  <xsl:param name="node" select="."/>
+
+  <xsl:variable name="is.chunk">
+    <xsl:call-template name="chunk">
+      <xsl:with-param name="node" select="$node"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+<!--
+  <xsl:message>
+    <xsl:text>in.other.chunk: </xsl:text>
+    <xsl:value-of select="name($chunk)"/>
+    <xsl:text> </xsl:text>
+    <xsl:value-of select="name($node)"/>
+    <xsl:text> </xsl:text>
+    <xsl:value-of select="$chunk = $node"/>
+    <xsl:text> </xsl:text>
+    <xsl:value-of select="$is.chunk"/>
+  </xsl:message>
+-->
+
+  <xsl:choose>
+    <xsl:when test="$chunk = $node">0</xsl:when>
+    <xsl:when test="$is.chunk = 1">1</xsl:when>
+    <xsl:when test="count($node) = 0">0</xsl:when>
+    <xsl:otherwise>
+      <xsl:call-template name="in.other.chunk">
+        <xsl:with-param name="chunk" select="$chunk"/>
+        <xsl:with-param name="node" select="$node/parent::*"/>
+      </xsl:call-template>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="count.footnotes.in.this.chunk">
+  <xsl:param name="node" select="."/>
+  <xsl:param name="footnotes" select="$node//footnote"/>
+  <xsl:param name="count" select="0"/>
+
+<!--
+  <xsl:message>
+    <xsl:text>count.footnotes.in.this.chunk: </xsl:text>
+    <xsl:value-of select="name($node)"/>
+  </xsl:message>
+-->
+
+  <xsl:variable name="in.other.chunk">
+    <xsl:call-template name="in.other.chunk">
+      <xsl:with-param name="chunk" select="$node"/>
+      <xsl:with-param name="node" select="$footnotes[1]"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="count($footnotes) = 0">
+      <xsl:value-of select="$count"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:choose>
+        <xsl:when test="$in.other.chunk != 0">
+          <xsl:call-template name="count.footnotes.in.this.chunk">
+            <xsl:with-param name="node" select="$node"/>
+            <xsl:with-param name="footnotes" select="$footnotes[position() &gt; 1]"/>
+            <xsl:with-param name="count" select="$count"/>
+          </xsl:call-template>
+        </xsl:when>
+        <xsl:when test="$footnotes[1]/ancestor::table                         |$footnotes[1]/ancestor::informaltable">
+          <xsl:call-template name="count.footnotes.in.this.chunk">
+            <xsl:with-param name="node" select="$node"/>
+            <xsl:with-param name="footnotes" select="$footnotes[position() &gt; 1]"/>
+            <xsl:with-param name="count" select="$count"/>
+          </xsl:call-template>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:call-template name="count.footnotes.in.this.chunk">
+            <xsl:with-param name="node" select="$node"/>
+            <xsl:with-param name="footnotes" select="$footnotes[position() &gt; 1]"/>
+            <xsl:with-param name="count" select="$count + 1"/>
+          </xsl:call-template>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="process.footnotes.in.this.chunk">
+  <xsl:param name="node" select="."/>
+  <xsl:param name="footnotes" select="$node//footnote"/>
+
+<!--
+  <xsl:message>process.footnotes.in.this.chunk</xsl:message>
+-->
+
+  <xsl:variable name="in.other.chunk">
+    <xsl:call-template name="in.other.chunk">
+      <xsl:with-param name="chunk" select="$node"/>
+      <xsl:with-param name="node" select="$footnotes[1]"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="count($footnotes) = 0">
+      <!-- nop -->
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:choose>
+        <xsl:when test="$in.other.chunk != 0">
+          <xsl:call-template name="process.footnotes.in.this.chunk">
+            <xsl:with-param name="node" select="$node"/>
+            <xsl:with-param name="footnotes" select="$footnotes[position() &gt; 1]"/>
+          </xsl:call-template>
+        </xsl:when>
+        <xsl:when test="$footnotes[1]/ancestor::table                         |$footnotes[1]/ancestor::informaltable">
+          <xsl:call-template name="process.footnotes.in.this.chunk">
+            <xsl:with-param name="node" select="$node"/>
+            <xsl:with-param name="footnotes" select="$footnotes[position() &gt; 1]"/>
+          </xsl:call-template>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:apply-templates select="$footnotes[1]" mode="process.footnote.mode"/>
+          <xsl:call-template name="process.footnotes.in.this.chunk">
+            <xsl:with-param name="node" select="$node"/>
+            <xsl:with-param name="footnotes" select="$footnotes[position() &gt; 1]"/>
+          </xsl:call-template>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="process.footnotes">
+  <xsl:variable name="footnotes" select=".//footnote"/>
+  <xsl:variable name="fcount">
+    <xsl:call-template name="count.footnotes.in.this.chunk">
+      <xsl:with-param name="node" select="."/>
+      <xsl:with-param name="footnotes" select="$footnotes"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+<!--
+  <xsl:message>
+    <xsl:value-of select="name(.)"/>
+    <xsl:text> fcount: </xsl:text>
+    <xsl:value-of select="$fcount"/>
+  </xsl:message>
+-->
+
+  <!-- Only bother to do this if there's at least one non-table footnote -->
+  <xsl:if test="$fcount &gt; 0">
+    <div class="footnotes">
+      <br/>
+      <hr width="100" align="left"/>
+      <xsl:call-template name="process.footnotes.in.this.chunk">
+        <xsl:with-param name="node" select="."/>
+        <xsl:with-param name="footnotes" select="$footnotes"/>
+      </xsl:call-template>
+    </div>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template name="process.chunk.footnotes">
+  <xsl:variable name="is.chunk">
+    <xsl:call-template name="chunk"/>
+  </xsl:variable>
+  <xsl:if test="$is.chunk = 1">
+    <xsl:call-template name="process.footnotes"/>
+  </xsl:if>
+</xsl:template>
+
+<!-- ====================================================================== -->
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/profile-chunk.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/profile-chunk.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/profile-chunk.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,40 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:exsl="http://exslt.org/common"
+		version="1.0"
+                exclude-result-prefixes="exsl">
+
+<!-- ********************************************************************
+     $Id: profile-chunk.xsl,v 1.1.1.1 2004/10/19 21:21:48 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:import href="docbook.xsl"/>
+<xsl:import href="chunk-common.xsl"/>
+<xsl:include href="manifest.xsl"/>
+
+<!-- Why is chunk-code now xsl:included?
+
+Suppose you want to customize *both* the chunking algorithm used *and* the
+presentation of some elements that may be chunks. In order to do that, you
+must get the order of imports "just right". The answer is to make your own
+copy of this file, where you replace the initial import of "docbook.xsl"
+with an import of your own base.xsl (that does its own import of docbook.xsl).
+
+Put the templates for changing the presentation of elements in your base.xsl.
+
+Put the templates that control chunking after the include of chunk-code.xsl.
+
+Voila! (Man I hope we can do this better in XSLT 2.0)
+
+-->
+
+<xsl:include href="profile-chunk-code.xsl"/>
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/profile-docbook.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/profile-docbook.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/profile-docbook.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,382 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<!--This file was created automatically by xsl2profile-->
+<!--from the DocBook XSL stylesheets. Do not edit this file.-->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" xmlns:exslt="http://exslt.org/common" exslt:dummy="dummy" extension-element-prefixes="exslt" exclude-result-prefixes="exsl exslt" version="1.0">
+
+<xsl:output method="html" encoding="ISO-8859-1" indent="no"/>
+
+<!-- ********************************************************************
+     $Id: profile-docbook.xsl,v 1.1.1.1 2004/10/19 21:21:48 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:include href="../VERSION"/>
+<xsl:include href="param.xsl"/>
+<xsl:include href="../lib/lib.xsl"/>
+<xsl:include href="../common/l10n.xsl"/>
+<xsl:include href="../common/common.xsl"/>
+<xsl:include href="../common/labels.xsl"/>
+<xsl:include href="../common/titles.xsl"/>
+<xsl:include href="../common/subtitles.xsl"/>
+<xsl:include href="../common/gentext.xsl"/>
+<xsl:include href="../common/targets.xsl"/>
+<xsl:include href="../common/pi.xsl"/>
+<xsl:include href="autotoc.xsl"/>
+<xsl:include href="autoidx.xsl"/>
+<xsl:include href="lists.xsl"/>
+<xsl:include href="callout.xsl"/>
+<xsl:include href="verbatim.xsl"/>
+<xsl:include href="graphics.xsl"/>
+<xsl:include href="xref.xsl"/>
+<xsl:include href="formal.xsl"/>
+<xsl:include href="table.xsl"/>
+<xsl:include href="htmltbl.xsl"/>
+<xsl:include href="sections.xsl"/>
+<xsl:include href="inline.xsl"/>
+<xsl:include href="footnote.xsl"/>
+<xsl:include href="html.xsl"/>
+<xsl:include href="info.xsl"/>
+<xsl:include href="keywords.xsl"/>
+<xsl:include href="division.xsl"/>
+<xsl:include href="toc.xsl"/>
+<xsl:include href="index.xsl"/>
+<xsl:include href="refentry.xsl"/>
+<xsl:include href="math.xsl"/>
+<xsl:include href="admon.xsl"/>
+<xsl:include href="component.xsl"/>
+<xsl:include href="biblio.xsl"/>
+<xsl:include href="glossary.xsl"/>
+<xsl:include href="block.xsl"/>
+<xsl:include href="task.xsl"/>
+<xsl:include href="qandaset.xsl"/>
+<xsl:include href="synop.xsl"/>
+<xsl:include href="titlepage.xsl"/>
+<xsl:include href="titlepage.templates.xsl"/>
+<xsl:include href="pi.xsl"/>
+<xsl:include href="ebnf.xsl"/>
+<xsl:include href="chunker.xsl"/>
+<xsl:include href="html-rtf.xsl"/>
+<xsl:include href="docbookng.xsl"/>
+
+<xsl:param name="stylesheet.result.type" select="'html'"/>
+
+<!-- ==================================================================== -->
+
+<xsl:key name="id" match="*" use="@id"/>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="*">
+  <xsl:message>
+    <xsl:text>No template matches </xsl:text>
+    <xsl:value-of select="name(.)"/>
+    <xsl:if test="parent::*">
+      <xsl:text> in </xsl:text>
+      <xsl:value-of select="name(parent::*)"/>
+    </xsl:if>
+    <xsl:text>.</xsl:text>
+  </xsl:message>
+
+  <font color="red">
+    <xsl:text>&lt;</xsl:text>
+    <xsl:value-of select="name(.)"/>
+    <xsl:text>&gt;</xsl:text>
+    <xsl:apply-templates/>
+    <xsl:text>&lt;/</xsl:text>
+    <xsl:value-of select="name(.)"/>
+    <xsl:text>&gt;</xsl:text>
+  </font>
+</xsl:template>
+
+<xsl:template match="text()">
+  <xsl:value-of select="."/>
+</xsl:template>
+
+<xsl:template name="body.attributes">
+  <xsl:attribute name="bgcolor">white</xsl:attribute>
+  <xsl:attribute name="text">black</xsl:attribute>
+  <xsl:attribute name="link">#0000FF</xsl:attribute>
+  <xsl:attribute name="vlink">#840084</xsl:attribute>
+  <xsl:attribute name="alink">#0000FF</xsl:attribute>
+</xsl:template>
+
+<xsl:template name="head.content">
+  <xsl:param name="node" select="."/>
+  <xsl:param name="title">
+    <xsl:apply-templates select="$node" mode="object.title.markup.textonly"/>
+  </xsl:param>
+
+  <title>
+    <xsl:copy-of select="$title"/>
+  </title>
+
+  <xsl:if test="$html.stylesheet != ''">
+    <xsl:call-template name="output.html.stylesheets">
+      <xsl:with-param name="stylesheets" select="normalize-space($html.stylesheet)"/>
+    </xsl:call-template>
+  </xsl:if>
+
+  <xsl:if test="$link.mailto.url != ''">
+    <link rev="made" href="{$link.mailto.url}"/>
+  </xsl:if>
+
+  <xsl:if test="$html.base != ''">
+    <base href="{$html.base}"/>
+  </xsl:if>
+
+  <meta name="generator" content="DocBook XSL Stylesheets V{$VERSION}"/>
+
+  <xsl:if test="$generate.meta.abstract != 0">
+    <xsl:variable name="info" select="(articleinfo                                       |bookinfo                                       |prefaceinfo                                       |chapterinfo                                       |appendixinfo                                       |sectioninfo                                       |sect1info                                       |sect2info                                       |sect3info                                       |sect4info                                       |sect5info                                       |referenceinfo                                       |refentryinfo                                       |partinfo                                       |info                                       |docinfo)[1]"/>
+    <xsl:if test="$info and $info/abstract">
+      <meta name="description">
+        <xsl:attribute name="content">
+          <xsl:for-each select="$info/abstract[1]/*">
+            <xsl:value-of select="."/>
+            <xsl:if test="position() &lt; last()">
+              <xsl:text> </xsl:text>
+            </xsl:if>
+          </xsl:for-each>
+        </xsl:attribute>
+      </meta>
+    </xsl:if>
+  </xsl:if>
+
+  <xsl:if test="($draft.mode = 'yes' or                 ($draft.mode = 'maybe' and                 ancestor-or-self::*[@status][1]/@status = 'draft'))                 and $draft.watermark.image != ''">
+    <style type="text/css"><xsl:text>
+body { background-image: url('</xsl:text>
+<xsl:value-of select="$draft.watermark.image"/><xsl:text>');
+       background-repeat: no-repeat;
+       background-position: top left;
+       /* The following properties make the watermark "fixed" on the page. */
+       /* I think that's just a bit too distracting for the reader... */
+       /* background-attachment: fixed; */
+       /* background-position: center center; */
+     }</xsl:text>
+    </style>
+  </xsl:if>
+  <xsl:apply-templates select="." mode="head.keywords.content"/>
+</xsl:template>
+
+<xsl:template name="output.html.stylesheets">
+  <xsl:param name="stylesheets" select="''"/>
+
+  <xsl:choose>
+    <xsl:when test="contains($stylesheets, ' ')">
+      <link rel="stylesheet" href="{substring-before($stylesheets, ' ')}">
+        <xsl:if test="$html.stylesheet.type != ''">
+          <xsl:attribute name="type">
+            <xsl:value-of select="$html.stylesheet.type"/>
+          </xsl:attribute>
+        </xsl:if>
+      </link>
+      <xsl:call-template name="output.html.stylesheets">
+        <xsl:with-param name="stylesheets" select="substring-after($stylesheets, ' ')"/>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:when test="$stylesheets != ''">
+      <link rel="stylesheet" href="{$stylesheets}">
+        <xsl:if test="$html.stylesheet.type != ''">
+          <xsl:attribute name="type">
+            <xsl:value-of select="$html.stylesheet.type"/>
+          </xsl:attribute>
+        </xsl:if>
+      </link>
+    </xsl:when>
+  </xsl:choose>
+</xsl:template>
+
+<!-- ============================================================ -->
+
+<xsl:template match="*" mode="head.keywords.content">
+  <xsl:apply-templates select="chapterinfo/keywordset" mode="html.header"/>
+  <xsl:apply-templates select="appendixinfo/keywordset" mode="html.header"/>
+  <xsl:apply-templates select="prefaceinfo/keywordset" mode="html.header"/>
+  <xsl:apply-templates select="bookinfo/keywordset" mode="html.header"/>
+  <xsl:apply-templates select="setinfo/keywordset" mode="html.header"/>
+  <xsl:apply-templates select="articleinfo/keywordset" mode="html.header"/>
+  <xsl:apply-templates select="artheader/keywordset" mode="html.header"/>
+  <xsl:apply-templates select="sect1info/keywordset" mode="html.header"/>
+  <xsl:apply-templates select="sect2info/keywordset" mode="html.header"/>
+  <xsl:apply-templates select="sect3info/keywordset" mode="html.header"/>
+  <xsl:apply-templates select="sect4info/keywordset" mode="html.header"/>
+  <xsl:apply-templates select="sect5info/keywordset" mode="html.header"/>
+  <xsl:apply-templates select="refsect1info/keywordset" mode="html.header"/>
+  <xsl:apply-templates select="refsect2info/keywordset" mode="html.header"/>
+  <xsl:apply-templates select="refsect3info/keywordset" mode="html.header"/>
+  <xsl:apply-templates select="bibliographyinfo/keywordset" mode="html.header"/>
+  <xsl:apply-templates select="glossaryinfo/keywordset" mode="html.header"/>
+  <xsl:apply-templates select="indexinfo/keywordset" mode="html.header"/>
+  <xsl:apply-templates select="refentryinfo/keywordset" mode="html.header"/>
+  <xsl:apply-templates select="partinfo/keywordset" mode="html.header"/>
+  <xsl:apply-templates select="referenceinfo/keywordset" mode="html.header"/>
+  <xsl:apply-templates select="docinfo/keywordset" mode="html.header"/>
+  <xsl:apply-templates select="info/keywordset" mode="html.header"/>
+
+  <xsl:if test="$inherit.keywords != 0                 and parent::*">
+    <xsl:apply-templates select="parent::*" mode="head.keywords.content"/>
+  </xsl:if>
+</xsl:template>
+
+<!-- ============================================================ -->
+
+<xsl:template name="system.head.content">
+  <xsl:param name="node" select="."/>
+
+  <!-- system.head.content is like user.head.content, except that
+       it is called before head.content. This is important because it
+       means, for example, that <style> elements output by system.head.content
+       have a lower CSS precedence than the users stylesheet. -->
+</xsl:template>
+
+<!-- ============================================================ -->
+
+<xsl:template name="user.head.content">
+  <xsl:param name="node" select="."/>
+</xsl:template>
+
+<xsl:template name="user.header.navigation">
+  <xsl:param name="node" select="."/>
+</xsl:template>
+
+<xsl:template name="user.header.content">
+  <xsl:param name="node" select="."/>
+</xsl:template>
+
+<xsl:template name="user.footer.content">
+  <xsl:param name="node" select="."/>
+</xsl:template>
+
+<xsl:template name="user.footer.navigation">
+  <xsl:param name="node" select="."/>
+</xsl:template>
+
+<xslo:include xmlns:xslo="http://www.w3.org/1999/XSL/Transform" href="../profiling/profile-mode.xsl"/><xsl:template match="/"><xslo:variable xmlns:xslo="http://www.w3.org/1999/XSL/Transform" name="profiled-content"><xslo:apply-templates select="." mode="profile"/></xslo:variable><xslo:variable xmlns:xslo="http://www.w3.org/1999/XSL/Transform" name="profiled-nodes" select="exslt:node-set($profiled-content)"/>
+  <xsl:choose>
+    <xsl:when test="function-available('exsl:node-set')                     and namespace-uri(*[1]) = 'http://docbook.org/docbook-ng'">
+      <!-- Hack! If someone hands us a DocBook NG document, toss the namespace -->
+      <!-- and continue. Someday we may reverse this logic and add the namespace -->
+      <!-- to documents that don't have one. But not before the whole stylesheet -->
+      <!-- has been converted to use namespaces. i.e., don't hold your breath -->
+      <xsl:variable name="nons">
+	<xsl:apply-templates mode="stripNS"/>
+      </xsl:variable>
+      <xsl:apply-templates select="exsl:node-set($nons)"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:choose>
+	<xsl:when test="$rootid != ''">
+	  <xsl:choose>
+	    <xsl:when test="count($profiled-nodes//*[@id=$rootid]) = 0">
+	      <xsl:message terminate="yes">
+		<xsl:text>ID '</xsl:text>
+		<xsl:value-of select="$rootid"/>
+		<xsl:text>' not found in document.</xsl:text>
+	      </xsl:message>
+	    </xsl:when>
+	    <xsl:otherwise>
+	      <xsl:if test="$collect.xref.targets = 'yes' or               $collect.xref.targets = 'only'">
+		<xsl:apply-templates select="key('id', $rootid)" mode="collect.targets"/>
+	      </xsl:if>
+	      <xsl:if test="$collect.xref.targets != 'only'">
+		<xsl:apply-templates select="$profiled-nodes//*[@id=$rootid]" mode="process.root"/>
+		<xsl:if test="$tex.math.in.alt != ''">
+		  <xsl:apply-templates select="$profiled-nodes//*[@id=$rootid]" mode="collect.tex.math"/>
+		</xsl:if>
+	      </xsl:if>
+	    </xsl:otherwise>
+	  </xsl:choose>
+	</xsl:when>
+	<xsl:otherwise>
+	  <xsl:if test="$collect.xref.targets = 'yes' or           $collect.xref.targets = 'only'">
+	    <xsl:apply-templates select="$profiled-nodes" mode="collect.targets"/>
+	  </xsl:if>
+	  <xsl:if test="$collect.xref.targets != 'only'">
+	    <xsl:apply-templates select="$profiled-nodes" mode="process.root"/>
+	    <xsl:if test="$tex.math.in.alt != ''">
+	      <xsl:apply-templates select="$profiled-nodes" mode="collect.tex.math"/>
+	    </xsl:if>
+	  </xsl:if>
+	</xsl:otherwise>
+      </xsl:choose>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="*" mode="process.root">
+  <xsl:variable name="doc" select="self::*"/>
+
+  <xsl:call-template name="root.messages"/>
+
+  <html>
+    <head>
+      <xsl:call-template name="system.head.content">
+        <xsl:with-param name="node" select="$doc"/>
+      </xsl:call-template>
+      <xsl:call-template name="head.content">
+        <xsl:with-param name="node" select="$doc"/>
+      </xsl:call-template>
+      <xsl:call-template name="user.head.content">
+        <xsl:with-param name="node" select="$doc"/>
+      </xsl:call-template>
+    </head>
+    <body>
+      <xsl:call-template name="body.attributes"/>
+      <xsl:call-template name="user.header.content">
+        <xsl:with-param name="node" select="$doc"/>
+      </xsl:call-template>
+      <xsl:apply-templates select="."/>
+      <xsl:call-template name="user.footer.content">
+        <xsl:with-param name="node" select="$doc"/>
+      </xsl:call-template>
+    </body>
+  </html>
+</xsl:template>
+
+<xsl:template name="root.messages">
+  <!-- redefine this any way you'd like to output messages -->
+  <!-- DO NOT OUTPUT ANYTHING FROM THIS TEMPLATE -->
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="chunk">
+  <xsl:param name="node" select="."/>
+
+  <!-- The default is that we are not chunking... -->
+  <xsl:text>0</xsl:text>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="*" mode="stripNS">
+  <xsl:choose>
+    <xsl:when test="namespace-uri(.) = 'http://docbook.org/docbook-ng'">
+      <xsl:element name="{local-name(.)}">
+	<xsl:copy-of select="@*"/>
+	<xsl:apply-templates mode="stripNS"/>
+      </xsl:element>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:copy>
+	<xsl:copy-of select="@*"/>
+	<xsl:apply-templates mode="stripNS"/>
+      </xsl:copy>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="comment()|processing-instruction()|text()" mode="stripNS">
+  <xsl:copy/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/profile-onechunk.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/profile-onechunk.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/profile-onechunk.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+                version="1.0"
+                exclude-result-prefixes="doc">
+
+<!-- ********************************************************************
+     $Id: profile-onechunk.xsl,v 1.1.1.1 2004/10/19 21:21:48 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:import href="profile-chunk.xsl"/>
+
+<!-- Ok, using the onechunk parameter makes this all work again. -->
+<!-- It does have the disadvantage that it only works for documents that have -->
+<!-- a root element that is considered a chunk by the chunk.xsl stylesheet. -->
+<!-- Ideally, onechunk would let anything be a chunk. But not today. -->
+
+<xsl:param name="onechunk" select="1"/>
+<xsl:param name="suppress.navigation">1</xsl:param>
+
+<xsl:template name="href.target.uri">
+  <xsl:param name="object" select="."/>
+  <xsl:text>#</xsl:text>
+  <xsl:call-template name="object.id">
+    <xsl:with-param name="object" select="$object"/>
+  </xsl:call-template>
+</xsl:template>
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/qandaset.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/qandaset.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/qandaset.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,360 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+                exclude-result-prefixes="doc"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: qandaset.xsl,v 1.1.1.1 2004/10/19 21:21:48 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:template match="qandaset">
+  <xsl:variable name="title" select="(blockinfo/title|title)[1]"/>
+  <xsl:variable name="preamble" select="*[name(.) != 'title'
+                                          and name(.) != 'titleabbrev'
+                                          and name(.) != 'qandadiv'
+                                          and name(.) != 'qandaentry']"/>
+  <xsl:variable name="label-width">
+    <xsl:call-template name="dbhtml-attribute">
+      <xsl:with-param name="pis"
+                      select="processing-instruction('dbhtml')"/>
+      <xsl:with-param name="attribute" select="'label-width'"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="table-summary">
+    <xsl:call-template name="dbhtml-attribute">
+      <xsl:with-param name="pis"
+                      select="processing-instruction('dbhtml')"/>
+      <xsl:with-param name="attribute" select="'table-summary'"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="cellpadding">
+    <xsl:call-template name="dbhtml-attribute">
+      <xsl:with-param name="pis"
+                      select="processing-instruction('dbhtml')"/>
+      <xsl:with-param name="attribute" select="'cellpadding'"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="cellspacing">
+    <xsl:call-template name="dbhtml-attribute">
+      <xsl:with-param name="pis"
+                      select="processing-instruction('dbhtml')"/>
+      <xsl:with-param name="attribute" select="'cellspacing'"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="toc">
+    <xsl:call-template name="dbhtml-attribute">
+      <xsl:with-param name="pis"
+                      select="processing-instruction('dbhtml')"/>
+      <xsl:with-param name="attribute" select="'toc'"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="toc.params">
+    <xsl:call-template name="find.path.params">
+      <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <div class="{name(.)}">
+    <xsl:apply-templates select="$title"/>
+    <xsl:if test="(contains($toc.params, 'toc') and $toc != '0') or $toc = '1'">
+      <xsl:call-template name="process.qanda.toc"/>
+    </xsl:if>
+    <xsl:apply-templates select="$preamble"/>
+    <table border="0" summary="Q and A Set">
+      <xsl:if test="$table-summary != ''">
+        <xsl:attribute name="summary">
+          <xsl:value-of select="$table-summary"/>
+        </xsl:attribute>
+      </xsl:if>
+
+      <xsl:if test="$cellpadding != ''">
+        <xsl:attribute name="cellpadding">
+          <xsl:value-of select="$cellpadding"/>
+        </xsl:attribute>
+      </xsl:if>
+
+      <xsl:if test="$cellspacing != ''">
+        <xsl:attribute name="cellspacing">
+          <xsl:value-of select="$cellspacing"/>
+        </xsl:attribute>
+      </xsl:if>
+
+      <col align="left">
+        <xsl:attribute name="width">
+          <xsl:choose>
+            <xsl:when test="$label-width != ''">
+              <xsl:value-of select="$label-width"/>
+            </xsl:when>
+            <xsl:otherwise>1%</xsl:otherwise>
+          </xsl:choose>
+        </xsl:attribute>
+      </col>
+      <tbody>
+        <xsl:apply-templates select="qandaentry|qandadiv"/>
+      </tbody>
+    </table>
+  </div>
+</xsl:template>
+
+<xsl:template match="qandaset/blockinfo/title|qandaset/title">
+  <xsl:variable name="qalevel">
+    <xsl:call-template name="qanda.section.level"/>
+  </xsl:variable>
+  <xsl:element name="h{string(number($qalevel)+1)}">
+    <xsl:attribute name="class">
+      <xsl:value-of select="name(.)"/>
+    </xsl:attribute>
+    <xsl:apply-templates/>
+  </xsl:element>
+</xsl:template>
+
+<xsl:template match="qandaset/blockinfo">
+  <!-- what should this template really do? -->
+  <xsl:apply-templates select="legalnotice" mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="qandadiv">
+  <xsl:variable name="preamble" select="*[name(.) != 'title'
+                                          and name(.) != 'titleabbrev'
+                                          and name(.) != 'qandadiv'
+                                          and name(.) != 'qandaentry']"/>
+
+  <xsl:if test="blockinfo/title|title">
+    <tr class="qandadiv">
+      <td align="left" valign="top" colspan="2">
+        <xsl:call-template name="anchor">
+          <xsl:with-param name="conditional" select="0"/>
+        </xsl:call-template>
+        <xsl:apply-templates select="(blockinfo/title|title)[1]"/>
+      </td>
+    </tr>
+  </xsl:if>
+
+  <xsl:variable name="toc">
+    <xsl:call-template name="dbhtml-attribute">
+      <xsl:with-param name="pis"
+                      select="processing-instruction('dbhtml')"/>
+      <xsl:with-param name="attribute" select="'toc'"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="toc.params">
+    <xsl:call-template name="find.path.params">
+      <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:if test="(contains($toc.params, 'toc') and $toc != '0') or $toc = '1'">
+    <tr class="toc" colspan="2">
+      <td align="left" valign="top" colspan="2">
+        <xsl:call-template name="process.qanda.toc"/>
+      </td>
+    </tr>
+  </xsl:if>
+  <xsl:if test="$preamble">
+    <tr class="toc" colspan="2">
+      <td align="left" valign="top" colspan="2">
+        <xsl:apply-templates select="$preamble"/>
+      </td>
+    </tr>
+  </xsl:if>
+  <xsl:apply-templates select="qandadiv|qandaentry"/>
+</xsl:template>
+
+<xsl:template match="qandadiv/blockinfo/title|qandadiv/title">
+  <xsl:variable name="qalevel">
+    <xsl:call-template name="qandadiv.section.level"/>
+  </xsl:variable>
+
+  <xsl:element name="h{string(number($qalevel)+1)}">
+    <xsl:attribute name="class">
+      <xsl:value-of select="name(.)"/>
+    </xsl:attribute>
+    <xsl:call-template name="anchor">
+      <xsl:with-param name="node" select=".."/>
+      <xsl:with-param name="conditional" select="0"/>
+    </xsl:call-template>
+    <xsl:apply-templates select="parent::qandadiv" mode="label.markup"/>
+    <xsl:if test="$qandadiv.autolabel != 0">
+      <xsl:apply-templates select="." mode="intralabel.punctuation"/>
+      <xsl:text> </xsl:text>
+    </xsl:if>
+    <xsl:apply-templates/>
+  </xsl:element>
+</xsl:template>
+
+<xsl:template match="qandaentry">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="question">
+  <xsl:variable name="deflabel">
+    <xsl:choose>
+      <xsl:when test="ancestor-or-self::*[@defaultlabel]">
+        <xsl:value-of select="(ancestor-or-self::*[@defaultlabel])[last()]
+                              /@defaultlabel"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$qanda.defaultlabel"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <tr class="{name(.)}">
+    <td align="left" valign="top">
+      <xsl:call-template name="anchor">
+        <xsl:with-param name="node" select=".."/>
+        <xsl:with-param name="conditional" select="0"/>
+      </xsl:call-template>
+      <xsl:call-template name="anchor">
+        <xsl:with-param name="conditional" select="0"/>
+      </xsl:call-template>
+
+      <b>
+        <xsl:apply-templates select="." mode="label.markup"/>
+        <xsl:if test="$deflabel = 'number' and not(label)">
+          <xsl:apply-templates select="." mode="intralabel.punctuation"/>
+	</xsl:if>
+      </b>
+    </td>
+    <td align="left" valign="top">
+      <xsl:choose>
+        <xsl:when test="$deflabel = 'none' and not(label)">
+          <b><xsl:apply-templates select="*[name(.) != 'label']"/></b>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:apply-templates select="*[name(.) != 'label']"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </td>
+  </tr>
+</xsl:template>
+
+<xsl:template match="answer">
+  <xsl:variable name="deflabel">
+    <xsl:choose>
+      <xsl:when test="ancestor-or-self::*[@defaultlabel]">
+        <xsl:value-of select="(ancestor-or-self::*[@defaultlabel])[last()]
+                              /@defaultlabel"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$qanda.defaultlabel"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <tr class="{name(.)}">
+    <td align="left" valign="top">
+      <xsl:call-template name="anchor"/>
+      <b>
+        <xsl:variable name="answer.label">
+          <xsl:apply-templates select="." mode="label.markup"/>
+        </xsl:variable>
+        <xsl:copy-of select="$answer.label"/>
+      </b>
+    </td>
+    <td align="left" valign="top">
+      <xsl:apply-templates select="*[name(.) != 'label']"/>
+    </td>
+  </tr>
+</xsl:template>
+
+<xsl:template match="label">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="process.qanda.toc">
+  <dl>
+    <xsl:apply-templates select="qandadiv" mode="qandatoc.mode"/>
+    <xsl:apply-templates select="qandaentry" mode="qandatoc.mode"/>
+  </dl>
+</xsl:template>
+
+<xsl:template match="qandadiv" mode="qandatoc.mode">
+  <dt><xsl:apply-templates select="title" mode="qandatoc.mode"/></dt>
+  <dd><xsl:call-template name="process.qanda.toc"/></dd>
+</xsl:template>
+
+<xsl:template match="qandadiv/blockinfo/title|qandadiv/title" mode="qandatoc.mode">
+  <xsl:variable name="qalevel">
+    <xsl:call-template name="qandadiv.section.level"/>
+  </xsl:variable>
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id">
+      <xsl:with-param name="object" select="parent::*"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:apply-templates select="parent::qandadiv" mode="label.markup"/>
+  <xsl:value-of select="$autotoc.label.separator"/>
+  <xsl:text> </xsl:text>
+  <a>
+    <xsl:attribute name="href">
+      <xsl:call-template name="href.target">
+        <xsl:with-param name="object" select="parent::*"/>
+      </xsl:call-template>
+    </xsl:attribute>
+    <xsl:apply-templates/>
+  </a>
+</xsl:template>
+
+<xsl:template match="qandaentry" mode="qandatoc.mode">
+  <xsl:apply-templates select="question" mode="qandatoc.mode"/>
+</xsl:template>
+
+<xsl:template match="question" mode="qandatoc.mode">
+  <xsl:variable name="firstch" select="(*[name(.)!='label'])[1]"/>
+  <xsl:variable name="deflabel">
+    <xsl:choose>
+      <xsl:when test="ancestor-or-self::*[@defaultlabel]">
+        <xsl:value-of select="(ancestor-or-self::*[@defaultlabel])[last()]
+                              /@defaultlabel"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$qanda.defaultlabel"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <dt>
+    <xsl:apply-templates select="." mode="label.markup"/>
+    <xsl:if test="$deflabel = 'number' and not(label)">
+      <xsl:apply-templates select="." mode="intralabel.punctuation"/>
+    </xsl:if>
+    <xsl:text> </xsl:text>
+    <a>
+      <xsl:attribute name="href">
+        <xsl:call-template name="href.target">
+          <xsl:with-param name="object" select=".."/>
+        </xsl:call-template>
+      </xsl:attribute>
+      <xsl:value-of select="$firstch"/>
+    </a>
+  </dt>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="*" mode="no.wrapper.mode">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/refentry.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/refentry.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/refentry.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,257 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: refentry.xsl,v 1.1.1.1 2004/10/19 21:21:48 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:template match="reference">
+  <div class="{name(.)}">
+    <xsl:call-template name="language.attribute"/>
+    <xsl:call-template name="anchor">
+      <xsl:with-param name="conditional" select="0"/>
+    </xsl:call-template>
+    <xsl:call-template name="reference.titlepage"/>
+
+    <xsl:variable name="toc.params">
+      <xsl:call-template name="find.path.params">
+        <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
+      </xsl:call-template>
+    </xsl:variable>
+
+    <xsl:if test="not(partintro) and contains($toc.params, 'toc')">
+      <xsl:call-template name="division.toc"/>
+    </xsl:if>
+    <xsl:apply-templates/>
+  </div>
+</xsl:template>
+
+<xsl:template match="reference" mode="division.number">
+  <xsl:number from="book" count="reference" format="I."/>
+</xsl:template>
+
+<xsl:template match="reference/docinfo"></xsl:template>
+<xsl:template match="reference/referenceinfo"></xsl:template>
+<xsl:template match="reference/title"></xsl:template>
+<xsl:template match="reference/subtitle"></xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="refentry.title">
+  <xsl:param name="node" select="."/>
+  <xsl:variable name="refmeta" select="$node//refmeta"/>
+  <xsl:variable name="refentrytitle" select="$refmeta//refentrytitle"/>
+  <xsl:variable name="refnamediv" select="$node//refnamediv"/>
+  <xsl:variable name="refname" select="$refnamediv//refname"/>
+  <xsl:variable name="title">
+    <xsl:choose>
+      <xsl:when test="$refentrytitle">
+        <xsl:apply-templates select="$refentrytitle[1]" mode="title"/>
+      </xsl:when>
+      <xsl:when test="$refname">
+        <xsl:apply-templates select="$refname[1]" mode="title"/>
+      </xsl:when>
+      <xsl:otherwise></xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <h1 class="title">
+    <xsl:copy-of select="$title"/>
+  </h1>
+</xsl:template>
+
+<xsl:template match="refentry">
+  <div class="{name(.)}">
+    <xsl:call-template name="language.attribute"/>
+    <xsl:if test="$refentry.separator != 0 and preceding-sibling::refentry">
+      <div class="refentry.separator">
+        <hr/>
+      </div>
+    </xsl:if>
+    <xsl:call-template name="anchor">
+      <xsl:with-param name="conditional" select="0"/>
+    </xsl:call-template>
+    <xsl:call-template name="refentry.titlepage"/>
+    <xsl:apply-templates/>
+    <xsl:call-template name="process.footnotes"/>
+  </div>
+</xsl:template>
+
+<xsl:template match="refentry/docinfo|refentry/refentryinfo"></xsl:template>
+
+<xsl:template match="refentrytitle|refname" mode="title">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="refmeta">
+</xsl:template>
+
+<xsl:template match="manvolnum">
+  <xsl:if test="$refentry.xref.manvolnum != 0">
+    <xsl:text>(</xsl:text>
+    <xsl:apply-templates/>
+    <xsl:text>)</xsl:text>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="refmiscinfo">
+</xsl:template>
+
+<xsl:template match="refentrytitle">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="refnamediv">
+  <div class="{name(.)}">
+    <xsl:call-template name="anchor"/>
+    <xsl:choose>
+      <xsl:when test="$refentry.generate.name != 0">
+        <h2>
+          <xsl:call-template name="gentext">
+            <xsl:with-param name="key" select="'RefName'"/>
+          </xsl:call-template>
+        </h2>
+      </xsl:when>
+      <xsl:when test="$refentry.generate.title != 0">
+        <h2>
+          <xsl:choose>
+            <xsl:when test="../refmeta/refentrytitle">
+              <xsl:apply-templates select="../refmeta/refentrytitle"/>
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:apply-templates select="refname[1]"/>
+            </xsl:otherwise>
+          </xsl:choose>
+        </h2>
+      </xsl:when>
+    </xsl:choose>
+    <p>
+      <xsl:apply-templates/>
+    </p>
+  </div>
+</xsl:template>
+
+<xsl:template match="refname">
+  <xsl:apply-templates/>
+  <xsl:if test="following-sibling::refname">
+    <xsl:text>, </xsl:text>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="refpurpose">
+  <xsl:text> </xsl:text>
+  <xsl:call-template name="dingbat">
+    <xsl:with-param name="dingbat">em-dash</xsl:with-param>
+  </xsl:call-template>
+  <xsl:text> </xsl:text>
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="refdescriptor">
+  <!-- todo: finish this -->
+</xsl:template>
+
+<xsl:template match="refclass">
+  <p>
+    <b>
+      <xsl:if test="@role">
+        <xsl:value-of select="@role"/>
+        <xsl:text>: </xsl:text>
+      </xsl:if>
+      <xsl:apply-templates/>
+    </b>
+  </p>
+</xsl:template>
+
+<xsl:template match="refsynopsisdiv">
+  <div class="{name(.)}">
+    <xsl:call-template name="anchor"/>
+    <h2>
+      <xsl:choose>
+        <xsl:when test="refsynopsisdiv/title|title">
+          <xsl:apply-templates select="(refsynopsisdiv/title|title)[1]"
+                               mode="titlepage.mode"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:call-template name="gentext">
+            <xsl:with-param name="key" select="'RefSynopsisDiv'"/>
+          </xsl:call-template>
+        </xsl:otherwise>
+      </xsl:choose>
+    </h2>
+    <xsl:apply-templates/>
+  </div>
+</xsl:template>
+
+<xsl:template match="refsynopsisdivinfo"></xsl:template>
+
+<xsl:template match="refsynopsisdiv/title">
+</xsl:template>
+
+<xsl:template match="refsynopsisdiv/title" mode="titlepage.mode">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="refsection|refsect1|refsect2|refsect3">
+  <div class="{name(.)}">
+    <xsl:call-template name="language.attribute"/>
+    <xsl:call-template name="anchor">
+      <xsl:with-param name="conditional" select="0"/>
+    </xsl:call-template>
+    <xsl:apply-templates/>
+  </div>
+</xsl:template>
+
+<xsl:template match="refsection/title">
+  <!-- the ID is output in the block.object call for refsect1 -->
+  <xsl:variable name="level" select="count(ancestor-or-self::refsection)"/>
+  <xsl:variable name="hlevel">
+    <xsl:choose>
+      <xsl:when test="$level &gt; 5">6</xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$level+1"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+  <xsl:element name="h{$hlevel}">
+    <xsl:apply-templates/>
+  </xsl:element>
+</xsl:template>
+
+<xsl:template match="refsect1/title">
+  <!-- the ID is output in the block.object call for refsect1 -->
+  <h2>
+    <xsl:apply-templates/>
+  </h2>
+</xsl:template>
+
+<xsl:template match="refsect2/title">
+  <!-- the ID is output in the block.object call for refsect2 -->
+  <h3>
+    <xsl:apply-templates/>
+  </h3>
+</xsl:template>
+
+<xsl:template match="refsect3/title">
+  <!-- the ID is output in the block.object call for refsect3 -->
+  <h4>
+    <xsl:apply-templates/>
+  </h4>
+</xsl:template>
+
+<xsl:template match="refsect1info"></xsl:template>
+<xsl:template match="refsect2info"></xsl:template>
+<xsl:template match="refsect3info"></xsl:template>
+
+<!-- ==================================================================== -->
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/sections.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/sections.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/sections.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,435 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: sections.xsl,v 1.1.1.1 2004/10/19 21:21:48 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:template match="section">
+  <xsl:variable name="depth" select="count(ancestor::section)+1"/>
+
+  <div class="{name(.)}">
+    <xsl:call-template name="language.attribute"/>
+    <xsl:call-template name="section.titlepage"/>
+
+    <xsl:variable name="toc.params">
+      <xsl:call-template name="find.path.params">
+        <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
+      </xsl:call-template>
+    </xsl:variable>
+
+    <xsl:if test="contains($toc.params, 'toc')
+                  and $depth &lt;= $generate.section.toc.level">
+      <xsl:call-template name="section.toc">
+        <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
+      </xsl:call-template>
+      <xsl:call-template name="section.toc.separator"/>
+    </xsl:if>
+    <xsl:apply-templates/>
+    <xsl:call-template name="process.chunk.footnotes"/>
+  </div>
+</xsl:template>
+
+<xsl:template name="section.title">
+  <!-- the context node should be the title of a section when called -->
+  <xsl:variable name="section" select="(ancestor::section
+                                        |ancestor::simplesect
+                                        |ancestor::sect1
+                                        |ancestor::sect2
+                                        |ancestor::sect3
+                                        |ancestor::sect4
+                                        |ancestor::sect5)[last()]"/>
+
+  <xsl:variable name="level">
+    <xsl:call-template name="section.level">
+      <xsl:with-param name="node" select="$section"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:call-template name="section.heading">
+    <xsl:with-param name="section" select=".."/>
+    <xsl:with-param name="level" select="$level"/>
+    <xsl:with-param name="title">
+      <xsl:apply-templates select="$section" mode="object.title.markup">
+        <xsl:with-param name="allow-anchors" select="1"/>
+      </xsl:apply-templates>
+    </xsl:with-param>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="section/title" mode="titlepage.mode" priority="2">
+  <xsl:call-template name="section.title"/>
+</xsl:template>
+
+<xsl:template match="sect1">
+  <div class="{name(.)}">
+    <xsl:call-template name="language.attribute"/>
+    <xsl:call-template name="sect1.titlepage"/>
+
+    <xsl:variable name="toc.params">
+      <xsl:call-template name="find.path.params">
+        <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
+      </xsl:call-template>
+    </xsl:variable>
+
+    <xsl:if test="contains($toc.params, 'toc')
+                  and $generate.section.toc.level &gt;= 1">
+      <xsl:call-template name="section.toc">
+        <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
+      </xsl:call-template>
+      <xsl:call-template name="section.toc.separator"/>
+    </xsl:if>
+    <xsl:apply-templates/>
+    <xsl:call-template name="process.chunk.footnotes"/>
+  </div>
+</xsl:template>
+
+<xsl:template match="sect1/title" mode="titlepage.mode" priority="2">
+  <xsl:call-template name="section.title"/>
+</xsl:template>
+
+<xsl:template match="sect2">
+  <div class="{name(.)}">
+    <xsl:call-template name="language.attribute"/>
+    <xsl:call-template name="sect2.titlepage"/>
+
+    <xsl:variable name="toc.params">
+      <xsl:call-template name="find.path.params">
+        <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
+      </xsl:call-template>
+    </xsl:variable>
+
+    <xsl:if test="contains($toc.params, 'toc')
+                  and $generate.section.toc.level &gt;= 2">
+      <xsl:call-template name="section.toc">
+        <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
+      </xsl:call-template>
+      <xsl:call-template name="section.toc.separator"/>
+    </xsl:if>
+    <xsl:apply-templates/>
+    <xsl:call-template name="process.chunk.footnotes"/>
+  </div>
+</xsl:template>
+
+<xsl:template match="sect2/title" mode="titlepage.mode" priority="2">
+  <xsl:call-template name="section.title"/>
+</xsl:template>
+
+<xsl:template match="sect3">
+  <div class="{name(.)}">
+    <xsl:call-template name="language.attribute"/>
+    <xsl:call-template name="sect3.titlepage"/>
+
+    <xsl:variable name="toc.params">
+      <xsl:call-template name="find.path.params">
+        <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
+      </xsl:call-template>
+    </xsl:variable>
+
+    <xsl:if test="contains($toc.params, 'toc')
+                  and $generate.section.toc.level &gt;= 3">
+      <xsl:call-template name="section.toc">
+        <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
+      </xsl:call-template>
+      <xsl:call-template name="section.toc.separator"/>
+    </xsl:if>
+    <xsl:apply-templates/>
+    <xsl:call-template name="process.chunk.footnotes"/>
+  </div>
+</xsl:template>
+
+<xsl:template match="sect3/title" mode="titlepage.mode" priority="2">
+  <xsl:call-template name="section.title"/>
+</xsl:template>
+
+<xsl:template match="sect4">
+  <div class="{name(.)}">
+    <xsl:call-template name="language.attribute"/>
+    <xsl:call-template name="sect4.titlepage"/>
+
+    <xsl:variable name="toc.params">
+      <xsl:call-template name="find.path.params">
+        <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
+      </xsl:call-template>
+    </xsl:variable>
+
+    <xsl:if test="contains($toc.params, 'toc')
+                  and $generate.section.toc.level &gt;= 4">
+      <xsl:call-template name="section.toc">
+        <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
+      </xsl:call-template>
+      <xsl:call-template name="section.toc.separator"/>
+    </xsl:if>
+    <xsl:apply-templates/>
+    <xsl:call-template name="process.chunk.footnotes"/>
+  </div>
+</xsl:template>
+
+<xsl:template match="sect4/title" mode="titlepage.mode" priority="2">
+  <xsl:call-template name="section.title"/>
+</xsl:template>
+
+<xsl:template match="sect5">
+  <div class="{name(.)}">
+    <xsl:call-template name="language.attribute"/>
+    <xsl:call-template name="sect5.titlepage"/>
+
+    <xsl:variable name="toc.params">
+      <xsl:call-template name="find.path.params">
+        <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
+      </xsl:call-template>
+    </xsl:variable>
+
+    <xsl:if test="contains($toc.params, 'toc')
+                  and $generate.section.toc.level &gt;= 5">
+      <xsl:call-template name="section.toc">
+        <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
+      </xsl:call-template>
+      <xsl:call-template name="section.toc.separator"/>
+    </xsl:if>
+    <xsl:apply-templates/>
+    <xsl:call-template name="process.chunk.footnotes"/>
+  </div>
+</xsl:template>
+
+<xsl:template match="sect5/title" mode="titlepage.mode" priority="2">
+  <xsl:call-template name="section.title"/>
+</xsl:template>
+
+<xsl:template match="simplesect">
+  <div class="{name(.)}">
+    <xsl:call-template name="language.attribute"/>
+    <xsl:call-template name="simplesect.titlepage"/>
+    <xsl:apply-templates/>
+  </div>
+</xsl:template>
+
+<xsl:template match="simplesect/title" mode="titlepage.mode" priority="2">
+  <xsl:call-template name="section.title"/>
+</xsl:template>
+
+<xsl:template match="section/title"></xsl:template>
+<xsl:template match="section/titleabbrev"></xsl:template>
+<xsl:template match="section/subtitle"></xsl:template>
+<xsl:template match="sectioninfo"></xsl:template>
+
+<xsl:template match="sect1/title"></xsl:template>
+<xsl:template match="sect1/titleabbrev"></xsl:template>
+<xsl:template match="sect1/subtitle"></xsl:template>
+<xsl:template match="sect1info"></xsl:template>
+
+<xsl:template match="sect2/title"></xsl:template>
+<xsl:template match="sect2/subtitle"></xsl:template>
+<xsl:template match="sect2/titleabbrev"></xsl:template>
+<xsl:template match="sect2info"></xsl:template>
+
+<xsl:template match="sect3/title"></xsl:template>
+<xsl:template match="sect3/subtitle"></xsl:template>
+<xsl:template match="sect3/titleabbrev"></xsl:template>
+<xsl:template match="sect3info"></xsl:template>
+
+<xsl:template match="sect4/title"></xsl:template>
+<xsl:template match="sect4/subtitle"></xsl:template>
+<xsl:template match="sect4/titleabbrev"></xsl:template>
+<xsl:template match="sect4info"></xsl:template>
+
+<xsl:template match="sect5/title"></xsl:template>
+<xsl:template match="sect5/subtitle"></xsl:template>
+<xsl:template match="sect5/titleabbrev"></xsl:template>
+<xsl:template match="sect5info"></xsl:template>
+
+<xsl:template match="simplesect/title"></xsl:template>
+<xsl:template match="simplesect/subtitle"></xsl:template>
+<xsl:template match="simplesect/titleabbrev"></xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="section.heading">
+  <xsl:param name="section" select="."/>
+  <xsl:param name="level" select="1"/>
+  <xsl:param name="allow-anchors" select="1"/>
+  <xsl:param name="title"/>
+  <xsl:param name="class" select="'title'"/>
+
+  <xsl:variable name="id">
+    <xsl:choose>
+      <!-- if title is in an *info wrapper, get the grandparent -->
+      <xsl:when test="contains(local-name(..), 'info')">
+        <xsl:call-template name="object.id">
+          <xsl:with-param name="object" select="../.."/>
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:call-template name="object.id">
+          <xsl:with-param name="object" select=".."/>
+        </xsl:call-template>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <!-- HTML H level is one higher than section level -->
+  <xsl:variable name="hlevel" select="$level + 1"/>
+  <xsl:element name="h{$hlevel}">
+    <xsl:attribute name="class"><xsl:value-of select="$class"/></xsl:attribute>
+    <xsl:if test="$css.decoration != '0'">
+      <xsl:if test="$hlevel&lt;3">
+        <xsl:attribute name="style">clear: both</xsl:attribute>
+      </xsl:if>
+    </xsl:if>
+    <xsl:if test="$allow-anchors != 0">
+      <xsl:call-template name="anchor">
+        <xsl:with-param name="node" select="$section"/>
+        <xsl:with-param name="conditional" select="0"/>
+      </xsl:call-template>
+    </xsl:if>
+    <xsl:copy-of select="$title"/>
+  </xsl:element>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="bridgehead">
+  <xsl:variable name="container"
+                select="(ancestor::appendix
+                        |ancestor::article
+                        |ancestor::bibliography
+                        |ancestor::chapter
+                        |ancestor::glossary
+                        |ancestor::glossdiv
+                        |ancestor::index
+                        |ancestor::partintro
+                        |ancestor::preface
+                        |ancestor::refsect1
+                        |ancestor::refsect2
+                        |ancestor::refsect3
+                        |ancestor::sect1
+                        |ancestor::sect2
+                        |ancestor::sect3
+                        |ancestor::sect4
+                        |ancestor::sect5
+                        |ancestor::section
+                        |ancestor::setindex
+                        |ancestor::simplesect)[last()]"/>
+
+  <xsl:variable name="clevel">
+    <xsl:choose>
+      <xsl:when test="local-name($container) = 'appendix'
+                      or local-name($container) = 'chapter'
+                      or local-name($container) = 'article'
+                      or local-name($container) = 'bibliography'
+                      or local-name($container) = 'glossary'
+                      or local-name($container) = 'index'
+                      or local-name($container) = 'partintro'
+                      or local-name($container) = 'preface'
+                      or local-name($container) = 'setindex'">1</xsl:when>
+      <xsl:when test="local-name($container) = 'glossdiv'">
+        <xsl:value-of select="count(ancestor::glossdiv)+1"/>
+      </xsl:when>
+      <xsl:when test="local-name($container) = 'sect1'
+                      or local-name($container) = 'sect2'
+                      or local-name($container) = 'sect3'
+                      or local-name($container) = 'sect4'
+                      or local-name($container) = 'sect5'
+                      or local-name($container) = 'refsect1'
+                      or local-name($container) = 'refsect2'
+                      or local-name($container) = 'refsect3'
+                      or local-name($container) = 'section'
+                      or local-name($container) = 'simplesect'">
+        <xsl:variable name="slevel">
+          <xsl:call-template name="section.level">
+            <xsl:with-param name="node" select="$container"/>
+          </xsl:call-template>
+        </xsl:variable>
+        <xsl:value-of select="$slevel + 1"/>
+      </xsl:when>
+      <xsl:otherwise>1</xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <!-- HTML H level is one higher than section level -->
+  <xsl:variable name="hlevel">
+    <xsl:choose>
+      <xsl:when test="@renderas = 'sect1'">1</xsl:when>
+      <xsl:when test="@renderas = 'sect2'">2</xsl:when>
+      <xsl:when test="@renderas = 'sect3'">3</xsl:when>
+      <xsl:when test="@renderas = 'sect4'">4</xsl:when>
+      <xsl:when test="@renderas = 'sect5'">5</xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$clevel + 1"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:element name="h{$hlevel}">
+    <xsl:call-template name="anchor">
+      <xsl:with-param name="conditional" select="0"/>
+    </xsl:call-template>
+    <xsl:apply-templates/>
+  </xsl:element>
+</xsl:template>
+
+<xsl:template match="section/subtitle" mode="titlepage.mode" priority="2">
+  <xsl:call-template name="section.subtitle"/>
+</xsl:template>
+
+<xsl:template match="sect1/subtitle" mode="titlepage.mode" priority="2">
+  <xsl:call-template name="section.subtitle"/>
+</xsl:template>
+
+<xsl:template match="sect2/subtitle" mode="titlepage.mode" priority="2">
+  <xsl:call-template name="section.subtitle"/>
+</xsl:template>
+
+<xsl:template match="sect3/subtitle" mode="titlepage.mode" priority="2">
+  <xsl:call-template name="section.subtitle"/>
+</xsl:template>
+
+<xsl:template match="sect4/subtitle" mode="titlepage.mode" priority="2">
+  <xsl:call-template name="section.subtitle"/>
+</xsl:template>
+
+<xsl:template match="sect5/subtitle" mode="titlepage.mode" priority="2">
+  <xsl:call-template name="section.subtitle"/>
+</xsl:template>
+
+<xsl:template name="section.subtitle">
+  <!-- the context node should be the subtitle of a section when called -->
+  <xsl:variable name="section" select="(ancestor::section
+                                        |ancestor::simplesect
+                                        |ancestor::sect1
+                                        |ancestor::sect2
+                                        |ancestor::sect3
+                                        |ancestor::sect4
+                                        |ancestor::sect5)[last()]"/>
+
+  <xsl:variable name="level">
+    <xsl:call-template name="section.level">
+      <xsl:with-param name="node" select="$section"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:call-template name="section.heading">
+    <xsl:with-param name="section" select=".."/>
+    <xsl:with-param name="allow-anchors" select="0"/>
+    <!-- subtitle heading level one higher than section level -->
+    <xsl:with-param name="level" select="$level + 1"/>
+    <xsl:with-param name="class" select="'subtitle'"/>
+    <xsl:with-param name="title">
+      <xsl:apply-templates select="$section" mode="object.subtitle.markup">
+        <xsl:with-param name="allow-anchors" select="0"/>
+      </xsl:apply-templates>
+    </xsl:with-param>
+  </xsl:call-template>
+</xsl:template>
+
+</xsl:stylesheet>
+

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/synop.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/synop.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/synop.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1363 @@
+<?xml version='1.0'?>
+<!DOCTYPE xsl:stylesheet [
+<!ENTITY nbsp "&#160;">
+]>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: synop.xsl,v 1.1.1.1 2004/10/19 21:21:48 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<!-- synopsis is in verbatim -->
+
+<!-- ==================================================================== -->
+
+<xsl:template match="cmdsynopsis">
+  <div class="{name(.)}">
+    <p>
+      <xsl:call-template name="anchor"/>
+      <xsl:apply-templates/>
+    </p>
+  </div>
+</xsl:template>
+
+<xsl:template match="cmdsynopsis/command">
+  <br/>
+  <xsl:call-template name="inline.monoseq"/>
+  <xsl:text> </xsl:text>
+</xsl:template>
+
+<xsl:template match="cmdsynopsis/command[1]" priority="2">
+  <xsl:call-template name="inline.monoseq"/>
+  <xsl:text> </xsl:text>
+</xsl:template>
+
+<xsl:template match="group|arg" name="group-or-arg">
+  <xsl:variable name="choice" select="@choice"/>
+  <xsl:variable name="rep" select="@rep"/>
+  <xsl:variable name="sepchar">
+    <xsl:choose>
+      <xsl:when test="ancestor-or-self::*/@sepchar">
+        <xsl:value-of select="ancestor-or-self::*/@sepchar"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:text> </xsl:text>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+  <xsl:if test="position()>1"><xsl:value-of select="$sepchar"/></xsl:if>
+  <xsl:choose>
+    <xsl:when test="$choice='plain'">
+      <xsl:value-of select="$arg.choice.plain.open.str"/>
+    </xsl:when>
+    <xsl:when test="$choice='req'">
+      <xsl:value-of select="$arg.choice.req.open.str"/>
+    </xsl:when>
+    <xsl:when test="$choice='opt'">
+      <xsl:value-of select="$arg.choice.opt.open.str"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:value-of select="$arg.choice.def.open.str"/>
+    </xsl:otherwise>
+  </xsl:choose>
+  <xsl:apply-templates/>
+  <xsl:choose>
+    <xsl:when test="$rep='repeat'">
+      <xsl:value-of select="$arg.rep.repeat.str"/>
+    </xsl:when>
+    <xsl:when test="$rep='norepeat'">
+      <xsl:value-of select="$arg.rep.norepeat.str"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:value-of select="$arg.rep.def.str"/>
+    </xsl:otherwise>
+  </xsl:choose>
+  <xsl:choose>
+    <xsl:when test="$choice='plain'">
+      <xsl:value-of select="$arg.choice.plain.close.str"/>
+    </xsl:when>
+    <xsl:when test="$choice='req'">
+      <xsl:value-of select="$arg.choice.req.close.str"/>
+    </xsl:when>
+    <xsl:when test="$choice='opt'">
+      <xsl:value-of select="$arg.choice.opt.close.str"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:value-of select="$arg.choice.def.close.str"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="group/arg">
+  <xsl:variable name="choice" select="@choice"/>
+  <xsl:variable name="rep" select="@rep"/>
+  <xsl:if test="position()>1"><xsl:value-of select="$arg.or.sep"/></xsl:if>
+  <xsl:call-template name="group-or-arg"/>
+</xsl:template>
+
+<xsl:template match="sbr">
+  <br/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="synopfragmentref">
+  <xsl:variable name="target" select="key('id', at linkend)"/>
+  <xsl:variable name="snum">
+    <xsl:apply-templates select="$target" mode="synopfragment.number"/>
+  </xsl:variable>
+  <i>
+    <a href="#{@linkend}">
+      <xsl:text>(</xsl:text>
+      <xsl:value-of select="$snum"/>
+      <xsl:text>)</xsl:text>
+    </a>
+    <xsl:text>&#160;</xsl:text>
+    <xsl:apply-templates/>
+  </i>
+</xsl:template>
+
+<xsl:template match="synopfragment" mode="synopfragment.number">
+  <xsl:number format="1"/>
+</xsl:template>
+
+<xsl:template match="synopfragment">
+  <xsl:variable name="snum">
+    <xsl:apply-templates select="." mode="synopfragment.number"/>
+  </xsl:variable>
+  <p>
+    <a name="{@id}">
+      <xsl:text>(</xsl:text>
+      <xsl:value-of select="$snum"/>
+      <xsl:text>)</xsl:text>
+    </a>
+    <xsl:text> </xsl:text>
+    <xsl:apply-templates/>
+  </p>
+</xsl:template>
+
+<xsl:template match="funcsynopsis">
+  <xsl:call-template name="informal.object"/>
+</xsl:template>
+
+<xsl:template match="funcsynopsisinfo">
+  <pre class="{name(.)}"><xsl:apply-templates/></pre>
+</xsl:template>
+
+<!-- ====================================================================== -->
+<!-- funcprototype -->
+<!--
+
+funcprototype ::= (funcdef,
+                   (void|varargs|paramdef+))
+
+funcdef       ::= (#PCDATA|type|replaceable|function)*
+
+paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
+-->
+
+<xsl:template match="funcprototype">
+  <xsl:variable name="html-style">
+    <xsl:call-template name="dbhtml-attribute">
+      <xsl:with-param name="pis"
+                      select="ancestor::funcsynopsis//processing-instruction('dbhtml')"/>
+      <xsl:with-param name="attribute" select="'funcsynopsis-style'"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="style">
+    <xsl:choose>
+      <xsl:when test="$html-style != ''">
+        <xsl:value-of select="$html-style"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$funcsynopsis.style"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:variable name="tabular-p"
+                select="$funcsynopsis.tabular.threshold &gt; 0
+                        and string-length(.) &gt; $funcsynopsis.tabular.threshold"/>
+
+  <xsl:choose>
+    <xsl:when test="$style = 'kr' and $tabular-p">
+      <xsl:apply-templates select="." mode="kr-tabular"/>
+    </xsl:when>
+    <xsl:when test="$style = 'kr'">
+      <xsl:apply-templates select="." mode="kr-nontabular"/>
+    </xsl:when>
+    <xsl:when test="$style = 'ansi' and $tabular-p">
+      <xsl:apply-templates select="." mode="ansi-tabular"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:apply-templates select="." mode="ansi-nontabular"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- ====================================================================== -->
+<!-- funcprototype: kr, non-tabular -->
+
+<xsl:template match="funcprototype" mode="kr-nontabular">
+  <p>
+    <xsl:apply-templates mode="kr-nontabular"/>
+    <xsl:if test="paramdef">
+      <br/>
+      <xsl:apply-templates select="paramdef" mode="kr-funcsynopsis-mode"/>
+    </xsl:if>
+  </p>
+</xsl:template>
+
+<xsl:template match="funcdef" mode="kr-nontabular">
+  <code class="{name(.)}">
+    <xsl:apply-templates mode="kr-nontabular"/>
+    <xsl:text>(</xsl:text>
+  </code>
+</xsl:template>
+
+<xsl:template match="funcdef/function" mode="kr-nontabular">
+  <xsl:choose>
+    <xsl:when test="$funcsynopsis.decoration != 0">
+      <b class="fsfunc"><xsl:apply-templates mode="kr-nontabular"/></b>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:apply-templates mode="kr-nontabular"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="void" mode="kr-nontabular">
+  <code>)</code>
+  <xsl:text>;</xsl:text>
+</xsl:template>
+
+<xsl:template match="varargs" mode="kr-nontabular">
+  <xsl:text>...</xsl:text>
+  <code>)</code>
+  <xsl:text>;</xsl:text>
+</xsl:template>
+
+<xsl:template match="paramdef" mode="kr-nontabular">
+  <xsl:apply-templates select="parameter" mode="kr-nontabular"/>
+  <xsl:choose>
+    <xsl:when test="following-sibling::*">
+      <xsl:text>, </xsl:text>
+    </xsl:when>
+    <xsl:otherwise>
+      <code>)</code>
+      <xsl:text>;</xsl:text>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="paramdef/parameter" mode="kr-nontabular">
+  <xsl:choose>
+    <xsl:when test="$funcsynopsis.decoration != 0">
+      <var class="pdparam">
+        <xsl:apply-templates mode="kr-nontabular"/>
+      </var>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:apply-templates mode="kr-nontabular"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="paramdef" mode="kr-funcsynopsis-mode">
+  <xsl:if test="preceding-sibling::paramdef"><br/></xsl:if>
+  <xsl:apply-templates mode="kr-funcsynopsis-mode"/>
+  <xsl:text>;</xsl:text>
+</xsl:template>
+
+<xsl:template match="type|parameter|funcparams" mode="kr-funcsynopsis-mode">
+  <code>
+    <xsl:apply-templates mode="kr-funcsynopsis-mode"/>
+  </code>
+</xsl:template>
+
+<!-- ====================================================================== -->
+<!-- funcprototype: kr, tabular -->
+
+<xsl:template match="funcprototype" mode="kr-tabular">
+  <table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"
+         style="padding-bottom: 1em">
+    <tr>
+      <td>
+        <xsl:apply-templates select="funcdef" mode="kr-tabular"/>
+      </td>
+      <xsl:apply-templates select="(void|varargs|paramdef)[1]" mode="kr-tabular"/>
+    </tr>
+    <xsl:for-each select="(void|varargs|paramdef)[position() &gt; 1]">
+      <tr>
+        <td>&#160;</td>
+        <xsl:apply-templates select="." mode="kr-tabular"/>
+      </tr>
+    </xsl:for-each>
+  </table>
+  <xsl:if test="paramdef">
+    <table border="0" summary="Function argument synopsis"
+           cellspacing="0" cellpadding="0">
+      <xsl:if test="following-sibling::funcprototype">
+        <xsl:attribute name="style">padding-bottom: 1em</xsl:attribute>
+      </xsl:if>
+      <xsl:apply-templates select="paramdef" mode="kr-tabular-funcsynopsis-mode"/>
+    </table>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="funcdef" mode="kr-tabular">
+  <code class="{name(.)}">
+    <xsl:apply-templates mode="kr-tabular"/>
+    <xsl:text>(</xsl:text>
+  </code>
+</xsl:template>
+
+<xsl:template match="funcdef/function" mode="kr-tabular">
+  <xsl:choose>
+    <xsl:when test="$funcsynopsis.decoration != 0">
+      <b class="fsfunc"><xsl:apply-templates mode="kr-nontabular"/></b>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:apply-templates mode="kr-tabular"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="void" mode="kr-tabular">
+  <td>
+    <code>)</code>
+    <xsl:text>;</xsl:text>
+  </td>
+  <td>&#160;</td>
+</xsl:template>
+
+<xsl:template match="varargs" mode="kr-tabular">
+  <td>
+    <xsl:text>...</xsl:text>
+    <code>)</code>
+    <xsl:text>;</xsl:text>
+  </td>
+  <td>&#160;</td>
+</xsl:template>
+
+<xsl:template match="paramdef" mode="kr-tabular">
+  <td>
+    <xsl:apply-templates select="parameter" mode="kr-tabular"/>
+    <xsl:choose>
+      <xsl:when test="following-sibling::*">
+        <xsl:text>, </xsl:text>
+      </xsl:when>
+      <xsl:otherwise>
+        <code>)</code>
+        <xsl:text>;</xsl:text>
+      </xsl:otherwise>
+    </xsl:choose>
+  </td>
+  <td>&#160;</td>
+</xsl:template>
+
+<xsl:template match="paramdef/parameter" mode="kr-tabular">
+  <xsl:choose>
+    <xsl:when test="$funcsynopsis.decoration != 0">
+      <var class="pdparam">
+        <xsl:apply-templates mode="kr-tabular"/>
+      </var>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:apply-templates mode="kr-tabular"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="paramdef" mode="kr-tabular-funcsynopsis-mode">
+  <tr>
+    <xsl:choose>
+      <xsl:when test="type and funcparams">
+        <td>
+          <xsl:apply-templates select="type" mode="kr-tabular-funcsynopsis-mode"/>
+          <xsl:text>&#160;</xsl:text>
+        </td>
+        <td>
+          <xsl:apply-templates select="type/following-sibling::node()"
+                               mode="kr-tabular-funcsynopsis-mode"/>
+        </td>
+      </xsl:when>
+      <xsl:when test="funcparams">
+        <td colspan="2">
+          <xsl:apply-templates mode="kr-tabular-funcsynopsis-mode"/>
+        </td>
+      </xsl:when>
+      <xsl:otherwise>
+        <td>
+          <xsl:apply-templates select="parameter/preceding-sibling::node()"
+                               mode="kr-tabular-funcsynopsis-mode"/>
+          <xsl:text>&#160;</xsl:text>
+        </td>
+        <td>
+          <xsl:apply-templates select="parameter"
+                               mode="kr-tabular"/>
+          <xsl:apply-templates select="parameter/following-sibling::node()"
+                               mode="kr-tabular-funcsynopsis-mode"/>
+          <xsl:text>;</xsl:text>
+        </td>
+      </xsl:otherwise>
+    </xsl:choose>
+  </tr>
+</xsl:template>
+
+<xsl:template match="paramdef/parameter" mode="kr-tabular-funcsynopsis-mode">
+  <xsl:choose>
+    <xsl:when test="$funcsynopsis.decoration != 0">
+      <var class="pdparam">
+        <xsl:apply-templates mode="kr-tabular-funcsynopsis-mode"/>
+      </var>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:apply-templates mode="kr-tabular-funcsynopsis-mode"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="funcparams" mode="kr-tabular-funcsynopsis-mode">
+  <code>(</code>
+  <xsl:apply-templates mode="kr-tabular-funcsynopsis-mode"/>
+  <code>)</code>
+  <xsl:text>;</xsl:text>
+</xsl:template>
+
+<!-- ====================================================================== -->
+<!-- funcprototype: ansi, non-tabular -->
+
+<xsl:template match="funcprototype" mode="ansi-nontabular">
+  <p>
+    <xsl:apply-templates mode="ansi-nontabular"/>
+  </p>
+</xsl:template>
+
+<xsl:template match="funcdef" mode="ansi-nontabular">
+  <code class="{name(.)}">
+    <xsl:apply-templates mode="ansi-nontabular"/>
+    <xsl:text>(</xsl:text>
+  </code>
+</xsl:template>
+
+<xsl:template match="funcdef/function" mode="ansi-nontabular">
+  <xsl:choose>
+    <xsl:when test="$funcsynopsis.decoration != 0">
+      <b class="fsfunc"><xsl:apply-templates mode="ansi-nontabular"/></b>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:apply-templates mode="ansi-nontabular"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="void" mode="ansi-nontabular">
+  <code>void)</code>
+  <xsl:text>;</xsl:text>
+</xsl:template>
+
+<xsl:template match="varargs" mode="ansi-nontabular">
+  <xsl:text>...</xsl:text>
+  <code>)</code>
+  <xsl:text>;</xsl:text>
+</xsl:template>
+
+<xsl:template match="paramdef" mode="ansi-nontabular">
+  <xsl:apply-templates mode="ansi-nontabular"/>
+  <xsl:choose>
+    <xsl:when test="following-sibling::*">
+      <xsl:text>, </xsl:text>
+    </xsl:when>
+    <xsl:otherwise>
+      <code>)</code>
+      <xsl:text>;</xsl:text>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="paramdef/parameter" mode="ansi-nontabular">
+  <xsl:choose>
+    <xsl:when test="$funcsynopsis.decoration != 0">
+      <var class="pdparam">
+        <xsl:apply-templates mode="ansi-nontabular"/>
+      </var>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:apply-templates mode="ansi-nontabular"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="funcparams" mode="ansi-nontabular">
+  <code>(</code>
+  <xsl:apply-templates mode="ansi-nontabular"/>
+  <code>)</code>
+</xsl:template>
+
+<!-- ====================================================================== -->
+<!-- funcprototype: ansi, tabular -->
+
+<xsl:template match="funcprototype" mode="ansi-tabular">
+  <table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0">
+    <xsl:if test="following-sibling::funcprototype">
+      <xsl:attribute name="style">padding-bottom: 1em</xsl:attribute>
+    </xsl:if>
+    <tr>
+      <td>
+        <xsl:apply-templates select="funcdef" mode="ansi-tabular"/>
+      </td>
+      <xsl:apply-templates select="(void|varargs|paramdef)[1]" mode="ansi-tabular"/>
+    </tr>
+    <xsl:for-each select="(void|varargs|paramdef)[position() &gt; 1]">
+      <tr>
+        <td>&#160;</td>
+        <xsl:apply-templates select="." mode="ansi-tabular"/>
+      </tr>
+    </xsl:for-each>
+  </table>
+</xsl:template>
+
+<xsl:template match="funcdef" mode="ansi-tabular">
+  <code class="{name(.)}">
+    <xsl:apply-templates mode="ansi-tabular"/>
+    <xsl:text>(</xsl:text>
+  </code>
+</xsl:template>
+
+<xsl:template match="funcdef/function" mode="ansi-tabular">
+  <xsl:choose>
+    <xsl:when test="$funcsynopsis.decoration != 0">
+      <b class="fsfunc"><xsl:apply-templates mode="ansi-nontabular"/></b>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:apply-templates mode="kr-tabular"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="void" mode="ansi-tabular">
+  <td>
+    <code>void)</code>
+    <xsl:text>;</xsl:text>
+  </td>
+  <td>&#160;</td>
+</xsl:template>
+
+<xsl:template match="varargs" mode="ansi-tabular">
+  <td>
+    <xsl:text>...</xsl:text>
+    <code>)</code>
+    <xsl:text>;</xsl:text>
+  </td>
+  <td>&#160;</td>
+</xsl:template>
+
+<xsl:template match="paramdef" mode="ansi-tabular">
+  <xsl:choose>
+    <xsl:when test="type and funcparams">
+      <td>
+        <xsl:apply-templates select="type" mode="kr-tabular-funcsynopsis-mode"/>
+        <xsl:text>&#160;</xsl:text>
+      </td>
+      <td>
+        <xsl:apply-templates select="type/following-sibling::node()"
+                             mode="kr-tabular-funcsynopsis-mode"/>
+      </td>
+    </xsl:when>
+    <xsl:otherwise>
+      <td>
+        <xsl:apply-templates select="parameter/preceding-sibling::node()"
+                             mode="ansi-tabular"/>
+        <xsl:text>&#160;</xsl:text>
+      </td>
+      <td>
+        <xsl:apply-templates select="parameter"
+                             mode="ansi-tabular"/>
+        <xsl:apply-templates select="parameter/following-sibling::node()"
+                             mode="ansi-tabular"/>
+        <xsl:choose>
+          <xsl:when test="following-sibling::*">
+            <xsl:text>, </xsl:text>
+          </xsl:when>
+          <xsl:otherwise>
+            <code>)</code>
+            <xsl:text>;</xsl:text>
+          </xsl:otherwise>
+        </xsl:choose>
+      </td>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="paramdef/parameter" mode="ansi-tabular">
+  <xsl:choose>
+    <xsl:when test="$funcsynopsis.decoration != 0">
+      <var class="pdparam">
+        <xsl:apply-templates mode="ansi-tabular"/>
+      </var>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:apply-templates mode="ansi-tabular"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="funcparams" mode="ansi-tabular">
+  <code>(</code>
+  <xsl:apply-templates/>
+  <code>)</code>
+</xsl:template>
+
+<!-- ====================================================================== -->
+
+<xsl:variable name="default-classsynopsis-language">java</xsl:variable>
+
+<xsl:template match="classsynopsis
+                     |fieldsynopsis
+                     |methodsynopsis
+                     |constructorsynopsis
+                     |destructorsynopsis">
+  <xsl:param name="language">
+    <xsl:choose>
+      <xsl:when test="@language">
+	<xsl:value-of select="@language"/>
+      </xsl:when>
+      <xsl:otherwise>
+	<xsl:value-of select="$default-classsynopsis-language"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:param>
+
+  <xsl:choose>
+    <xsl:when test="$language='java'">
+      <xsl:apply-templates select="." mode="java"/>
+    </xsl:when>
+    <xsl:when test="$language='perl'">
+      <xsl:apply-templates select="." mode="perl"/>
+    </xsl:when>
+    <xsl:when test="$language='idl'">
+      <xsl:apply-templates select="." mode="idl"/>
+    </xsl:when>
+    <xsl:when test="$language='cpp'">
+      <xsl:apply-templates select="." mode="cpp"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:message>
+	<xsl:text>Unrecognized language on </xsl:text>
+        <xsl:value-of select="name(.)"/>
+        <xsl:text>: </xsl:text>
+	<xsl:value-of select="$language"/>
+      </xsl:message>
+      <xsl:apply-templates select=".">
+	<xsl:with-param name="language"
+	  select="$default-classsynopsis-language"/>
+      </xsl:apply-templates>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="synop-break">
+  <xsl:if test="parent::classsynopsis
+                or (following-sibling::fieldsynopsis
+                    |following-sibling::methodsynopsis
+                    |following-sibling::constructorsynopsis
+                    |following-sibling::destructorsynopsis)">
+    <br/>
+  </xsl:if>
+</xsl:template>
+
+
+<!-- ===== Java ======================================================== -->
+
+<xsl:template match="classsynopsis" mode="java">
+  <pre class="{name(.)}">
+    <xsl:apply-templates select="ooclass[1]" mode="java"/>
+    <xsl:if test="ooclass[position() &gt; 1]">
+      <xsl:text> extends</xsl:text>
+      <xsl:apply-templates select="ooclass[position() &gt; 1]" mode="java"/>
+      <xsl:if test="oointerface|ooexception">
+        <br/>
+	<xsl:text>&nbsp;&nbsp;&nbsp;&nbsp;</xsl:text>
+      </xsl:if>
+    </xsl:if>
+    <xsl:if test="oointerface">
+      <xsl:text>implements</xsl:text>
+      <xsl:apply-templates select="oointerface" mode="java"/>
+      <xsl:if test="ooexception">
+        <br/>
+	<xsl:text>&nbsp;&nbsp;&nbsp;&nbsp;</xsl:text>
+      </xsl:if>
+    </xsl:if>
+    <xsl:if test="ooexception">
+      <xsl:text>throws</xsl:text>
+      <xsl:apply-templates select="ooexception" mode="java"/>
+    </xsl:if>
+    <xsl:text>&nbsp;{</xsl:text>
+    <br/>
+    <xsl:apply-templates select="constructorsynopsis
+                                 |destructorsynopsis
+                                 |fieldsynopsis
+                                 |methodsynopsis
+                                 |classsynopsisinfo" mode="java"/>
+    <xsl:text>}</xsl:text>
+  </pre>
+</xsl:template>
+
+<xsl:template match="classsynopsisinfo" mode="java">
+  <xsl:apply-templates mode="java"/>
+</xsl:template>
+
+<xsl:template match="ooclass|oointerface|ooexception" mode="java">
+  <xsl:choose>
+    <xsl:when test="position() &gt; 1">
+      <xsl:text>, </xsl:text>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:text> </xsl:text>
+    </xsl:otherwise>
+  </xsl:choose>
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="java"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="modifier" mode="java">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="java"/>
+    <xsl:text>&nbsp;</xsl:text>
+  </span>
+</xsl:template>
+
+<xsl:template match="classname" mode="java">
+  <xsl:if test="name(preceding-sibling::*[1]) = 'classname'">
+    <xsl:text>, </xsl:text>
+  </xsl:if>
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="java"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="interfacename" mode="java">
+  <xsl:if test="name(preceding-sibling::*[1]) = 'interfacename'">
+    <xsl:text>, </xsl:text>
+  </xsl:if>
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="java"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="exceptionname" mode="java">
+  <xsl:if test="name(preceding-sibling::*[1]) = 'exceptionname'">
+    <xsl:text>, </xsl:text>
+  </xsl:if>
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="java"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="fieldsynopsis" mode="java">
+  <code class="{name(.)}">
+    <xsl:if test="parent::classsynopsis">
+      <xsl:text>&nbsp;&nbsp;</xsl:text>
+    </xsl:if>
+    <xsl:apply-templates mode="java"/>
+    <xsl:text>;</xsl:text>
+  </code>
+  <xsl:call-template name="synop-break"/>
+</xsl:template>
+
+<xsl:template match="type" mode="java">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="java"/>
+    <xsl:text>&nbsp;</xsl:text>
+  </span>
+</xsl:template>
+
+<xsl:template match="varname" mode="java">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="java"/>
+    <xsl:text>&nbsp;</xsl:text>
+  </span>
+</xsl:template>
+
+<xsl:template match="initializer" mode="java">
+  <span class="{name(.)}">
+    <xsl:text>=&nbsp;</xsl:text>
+    <xsl:apply-templates mode="java"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="void" mode="java">
+  <span class="{name(.)}">
+    <xsl:text>void&nbsp;</xsl:text>
+  </span>
+</xsl:template>
+
+<xsl:template match="methodname" mode="java">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="java"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="methodparam" mode="java">
+  <xsl:param name="indent">0</xsl:param>
+  <xsl:if test="position() &gt; 1">
+    <xsl:text>,</xsl:text>
+    <br/>
+    <xsl:if test="$indent &gt; 0">
+      <xsl:call-template name="copy-string">
+	<xsl:with-param name="string">&nbsp;</xsl:with-param>
+	<xsl:with-param name="count" select="$indent + 1"/>
+      </xsl:call-template>
+    </xsl:if>
+  </xsl:if>
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="java"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="parameter" mode="java">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="java"/>
+  </span>
+</xsl:template>
+
+<xsl:template mode="java"
+  match="constructorsynopsis|destructorsynopsis|methodsynopsis">
+  <xsl:variable name="modifiers" select="modifier"/>
+  <xsl:variable name="notmod" select="*[name(.) != 'modifier']"/>
+  <xsl:variable name="decl">
+    <xsl:if test="parent::classsynopsis">
+      <xsl:text>&nbsp;&nbsp;</xsl:text>
+    </xsl:if>
+    <xsl:apply-templates select="$modifiers" mode="java"/>
+
+    <!-- type -->
+    <xsl:if test="name($notmod[1]) != 'methodname'">
+      <xsl:apply-templates select="$notmod[1]" mode="java"/>
+    </xsl:if>
+
+    <xsl:apply-templates select="methodname" mode="java"/>
+  </xsl:variable>
+
+  <code class="{name(.)}">
+    <xsl:copy-of select="$decl"/>
+    <xsl:text>(</xsl:text>
+    <xsl:apply-templates select="methodparam" mode="java">
+      <xsl:with-param name="indent" select="string-length($decl)"/>
+    </xsl:apply-templates>
+    <xsl:text>)</xsl:text>
+    <xsl:if test="exceptionname">
+      <br/>
+      <xsl:text>&nbsp;&nbsp;&nbsp;&nbsp;throws&nbsp;</xsl:text>
+      <xsl:apply-templates select="exceptionname" mode="java"/>
+    </xsl:if>
+    <xsl:text>;</xsl:text>
+  </code>
+  <xsl:call-template name="synop-break"/>
+</xsl:template>
+
+<!-- ===== C++ ========================================================= -->
+
+<xsl:template match="classsynopsis" mode="cpp">
+  <pre class="{name(.)}">
+    <xsl:apply-templates select="ooclass[1]" mode="cpp"/>
+    <xsl:if test="ooclass[position() &gt; 1]">
+      <xsl:text>: </xsl:text>
+      <xsl:apply-templates select="ooclass[position() &gt; 1]" mode="cpp"/>
+      <xsl:if test="oointerface|ooexception">
+        <br/>
+	<xsl:text>&nbsp;&nbsp;&nbsp;&nbsp;</xsl:text>
+      </xsl:if>
+    </xsl:if>
+    <xsl:if test="oointerface">
+      <xsl:text> implements</xsl:text>
+      <xsl:apply-templates select="oointerface" mode="cpp"/>
+      <xsl:if test="ooexception">
+        <br/>
+	<xsl:text>&nbsp;&nbsp;&nbsp;&nbsp;</xsl:text>
+      </xsl:if>
+    </xsl:if>
+    <xsl:if test="ooexception">
+      <xsl:text> throws</xsl:text>
+      <xsl:apply-templates select="ooexception" mode="cpp"/>
+    </xsl:if>
+    <xsl:text>&nbsp;{</xsl:text>
+    <br/>
+    <xsl:apply-templates select="constructorsynopsis
+                                 |destructorsynopsis
+                                 |fieldsynopsis
+                                 |methodsynopsis
+                                 |classsynopsisinfo" mode="cpp"/>
+    <xsl:text>}</xsl:text>
+  </pre>
+</xsl:template>
+
+<xsl:template match="classsynopsisinfo" mode="cpp">
+  <xsl:apply-templates mode="cpp"/>
+</xsl:template>
+
+<xsl:template match="ooclass|oointerface|ooexception" mode="cpp">
+  <xsl:if test="position() &gt; 1">
+    <xsl:text>, </xsl:text>
+  </xsl:if>
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="cpp"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="modifier" mode="cpp">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="cpp"/>
+    <xsl:text>&nbsp;</xsl:text>
+  </span>
+</xsl:template>
+
+<xsl:template match="classname" mode="cpp">
+  <xsl:if test="name(preceding-sibling::*[1]) = 'classname'">
+    <xsl:text>, </xsl:text>
+  </xsl:if>
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="cpp"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="interfacename" mode="cpp">
+  <xsl:if test="name(preceding-sibling::*[1]) = 'interfacename'">
+    <xsl:text>, </xsl:text>
+  </xsl:if>
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="cpp"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="exceptionname" mode="cpp">
+  <xsl:if test="name(preceding-sibling::*[1]) = 'exceptionname'">
+    <xsl:text>, </xsl:text>
+  </xsl:if>
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="cpp"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="fieldsynopsis" mode="cpp">
+  <code class="{name(.)}">
+    <xsl:if test="parent::classsynopsis">
+      <xsl:text>&nbsp;&nbsp;</xsl:text>
+    </xsl:if>
+    <xsl:apply-templates mode="cpp"/>
+    <xsl:text>;</xsl:text>
+  </code>
+  <xsl:call-template name="synop-break"/>
+</xsl:template>
+
+<xsl:template match="type" mode="cpp">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="cpp"/>
+    <xsl:text>&nbsp;</xsl:text>
+  </span>
+</xsl:template>
+
+<xsl:template match="varname" mode="cpp">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="cpp"/>
+    <xsl:text>&nbsp;</xsl:text>
+  </span>
+</xsl:template>
+
+<xsl:template match="initializer" mode="cpp">
+  <span class="{name(.)}">
+    <xsl:text>=&nbsp;</xsl:text>
+    <xsl:apply-templates mode="cpp"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="void" mode="cpp">
+  <span class="{name(.)}">
+    <xsl:text>void&nbsp;</xsl:text>
+  </span>
+</xsl:template>
+
+<xsl:template match="methodname" mode="cpp">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="cpp"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="methodparam" mode="cpp">
+  <xsl:if test="position() &gt; 1">
+    <xsl:text>, </xsl:text>
+  </xsl:if>
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="cpp"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="parameter" mode="cpp">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="cpp"/>
+  </span>
+</xsl:template>
+
+<xsl:template mode="cpp"
+  match="constructorsynopsis|destructorsynopsis|methodsynopsis">
+  <xsl:variable name="modifiers" select="modifier"/>
+  <xsl:variable name="notmod" select="*[name(.) != 'modifier']"/>
+
+  <code class="{name(.)}">
+    <xsl:if test="parent::classsynopsis">
+      <xsl:text>&nbsp;&nbsp;</xsl:text>
+    </xsl:if>
+    <xsl:apply-templates select="$modifiers" mode="cpp"/>
+
+    <!-- type -->
+    <xsl:if test="name($notmod[1]) != 'methodname'">
+      <xsl:apply-templates select="$notmod[1]" mode="cpp"/>
+    </xsl:if>
+
+    <xsl:apply-templates select="methodname" mode="cpp"/>
+    <xsl:text>(</xsl:text>
+    <xsl:apply-templates select="methodparam" mode="cpp"/>
+    <xsl:text>)</xsl:text>
+    <xsl:if test="exceptionname">
+      <br/>
+      <xsl:text>&nbsp;&nbsp;&nbsp;&nbsp;throws&nbsp;</xsl:text>
+      <xsl:apply-templates select="exceptionname" mode="cpp"/>
+    </xsl:if>
+    <xsl:text>;</xsl:text>
+  </code>
+  <xsl:call-template name="synop-break"/>
+</xsl:template>
+
+<!-- ===== IDL ========================================================= -->
+
+<xsl:template match="classsynopsis" mode="idl">
+  <pre class="{name(.)}">
+    <xsl:text>interface </xsl:text>
+    <xsl:apply-templates select="ooclass[1]" mode="idl"/>
+    <xsl:if test="ooclass[position() &gt; 1]">
+      <xsl:text>: </xsl:text>
+      <xsl:apply-templates select="ooclass[position() &gt; 1]" mode="idl"/>
+      <xsl:if test="oointerface|ooexception">
+        <br/>
+	<xsl:text>&nbsp;&nbsp;&nbsp;&nbsp;</xsl:text>
+      </xsl:if>
+    </xsl:if>
+    <xsl:if test="oointerface">
+      <xsl:text> implements</xsl:text>
+      <xsl:apply-templates select="oointerface" mode="idl"/>
+      <xsl:if test="ooexception">
+        <br/>
+	<xsl:text>&nbsp;&nbsp;&nbsp;&nbsp;</xsl:text>
+      </xsl:if>
+    </xsl:if>
+    <xsl:if test="ooexception">
+      <xsl:text> throws</xsl:text>
+      <xsl:apply-templates select="ooexception" mode="idl"/>
+    </xsl:if>
+    <xsl:text>&nbsp;{</xsl:text>
+    <br/>
+    <xsl:apply-templates select="constructorsynopsis
+                                 |destructorsynopsis
+                                 |fieldsynopsis
+                                 |methodsynopsis
+                                 |classsynopsisinfo" mode="idl"/>
+    <xsl:text>}</xsl:text>
+  </pre>
+</xsl:template>
+
+<xsl:template match="classsynopsisinfo" mode="idl">
+  <xsl:apply-templates mode="idl"/>
+</xsl:template>
+
+<xsl:template match="ooclass|oointerface|ooexception" mode="idl">
+  <xsl:if test="position() &gt; 1">
+    <xsl:text>, </xsl:text>
+  </xsl:if>
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="idl"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="modifier" mode="idl">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="idl"/>
+    <xsl:text>&nbsp;</xsl:text>
+  </span>
+</xsl:template>
+
+<xsl:template match="classname" mode="idl">
+  <xsl:if test="name(preceding-sibling::*[1]) = 'classname'">
+    <xsl:text>, </xsl:text>
+  </xsl:if>
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="idl"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="interfacename" mode="idl">
+  <xsl:if test="name(preceding-sibling::*[1]) = 'interfacename'">
+    <xsl:text>, </xsl:text>
+  </xsl:if>
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="idl"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="exceptionname" mode="idl">
+  <xsl:if test="name(preceding-sibling::*[1]) = 'exceptionname'">
+    <xsl:text>, </xsl:text>
+  </xsl:if>
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="idl"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="fieldsynopsis" mode="idl">
+  <code class="{name(.)}">
+    <xsl:if test="parent::classsynopsis">
+      <xsl:text>&nbsp;&nbsp;</xsl:text>
+    </xsl:if>
+    <xsl:apply-templates mode="idl"/>
+    <xsl:text>;</xsl:text>
+  </code>
+  <xsl:call-template name="synop-break"/>
+</xsl:template>
+
+<xsl:template match="type" mode="idl">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="idl"/>
+    <xsl:text>&nbsp;</xsl:text>
+  </span>
+</xsl:template>
+
+<xsl:template match="varname" mode="idl">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="idl"/>
+    <xsl:text>&nbsp;</xsl:text>
+  </span>
+</xsl:template>
+
+<xsl:template match="initializer" mode="idl">
+  <span class="{name(.)}">
+    <xsl:text>=&nbsp;</xsl:text>
+    <xsl:apply-templates mode="idl"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="void" mode="idl">
+  <span class="{name(.)}">
+    <xsl:text>void&nbsp;</xsl:text>
+  </span>
+</xsl:template>
+
+<xsl:template match="methodname" mode="idl">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="idl"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="methodparam" mode="idl">
+  <xsl:if test="position() &gt; 1">
+    <xsl:text>, </xsl:text>
+  </xsl:if>
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="idl"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="parameter" mode="idl">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="idl"/>
+  </span>
+</xsl:template>
+
+<xsl:template mode="idl"
+  match="constructorsynopsis|destructorsynopsis|methodsynopsis">
+  <xsl:variable name="modifiers" select="modifier"/>
+  <xsl:variable name="notmod" select="*[name(.) != 'modifier']"/>
+
+  <code class="{name(.)}">
+    <xsl:if test="parent::classsynopsis">
+      <xsl:text>&nbsp;&nbsp;</xsl:text>
+    </xsl:if>
+    <xsl:apply-templates select="$modifiers" mode="idl"/>
+
+    <!-- type -->
+    <xsl:if test="name($notmod[1]) != 'methodname'">
+      <xsl:apply-templates select="$notmod[1]" mode="idl"/>
+    </xsl:if>
+
+    <xsl:apply-templates select="methodname" mode="idl"/>
+    <xsl:text>(</xsl:text>
+    <xsl:apply-templates select="methodparam" mode="idl"/>
+    <xsl:text>)</xsl:text>
+    <xsl:if test="exceptionname">
+      <br/>
+      <xsl:text>&nbsp;&nbsp;&nbsp;&nbsp;raises(</xsl:text>
+      <xsl:apply-templates select="exceptionname" mode="idl"/>
+      <xsl:text>)</xsl:text>
+    </xsl:if>
+    <xsl:text>;</xsl:text>
+  </code>
+  <xsl:call-template name="synop-break"/>
+</xsl:template>
+
+<!-- ===== Perl ======================================================== -->
+
+<xsl:template match="classsynopsis" mode="perl">
+  <pre class="{name(.)}">
+    <xsl:text>package </xsl:text>
+    <xsl:apply-templates select="ooclass[1]" mode="perl"/>
+    <xsl:text>;</xsl:text>
+    <br/>
+
+    <xsl:if test="ooclass[position() &gt; 1]">
+      <xsl:text>@ISA = (</xsl:text>
+      <xsl:apply-templates select="ooclass[position() &gt; 1]" mode="perl"/>
+      <xsl:text>);</xsl:text>
+      <br/>
+    </xsl:if>
+
+    <xsl:apply-templates select="constructorsynopsis
+                                 |destructorsynopsis
+                                 |fieldsynopsis
+                                 |methodsynopsis
+                                 |classsynopsisinfo" mode="perl"/>
+  </pre>
+</xsl:template>
+
+<xsl:template match="classsynopsisinfo" mode="perl">
+  <xsl:apply-templates mode="perl"/>
+</xsl:template>
+
+<xsl:template match="ooclass|oointerface|ooexception" mode="perl">
+  <xsl:if test="position() &gt; 1">
+    <xsl:text>, </xsl:text>
+  </xsl:if>
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="perl"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="modifier" mode="perl">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="perl"/>
+    <xsl:text>&nbsp;</xsl:text>
+  </span>
+</xsl:template>
+
+<xsl:template match="classname" mode="perl">
+  <xsl:if test="name(preceding-sibling::*[1]) = 'classname'">
+    <xsl:text>, </xsl:text>
+  </xsl:if>
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="perl"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="interfacename" mode="perl">
+  <xsl:if test="name(preceding-sibling::*[1]) = 'interfacename'">
+    <xsl:text>, </xsl:text>
+  </xsl:if>
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="perl"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="exceptionname" mode="perl">
+  <xsl:if test="name(preceding-sibling::*[1]) = 'exceptionname'">
+    <xsl:text>, </xsl:text>
+  </xsl:if>
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="perl"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="fieldsynopsis" mode="perl">
+  <code class="{name(.)}">
+    <xsl:if test="parent::classsynopsis">
+      <xsl:text>&nbsp;&nbsp;</xsl:text>
+    </xsl:if>
+    <xsl:apply-templates mode="perl"/>
+    <xsl:text>;</xsl:text>
+  </code>
+  <xsl:call-template name="synop-break"/>
+</xsl:template>
+
+<xsl:template match="type" mode="perl">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="perl"/>
+    <xsl:text>&nbsp;</xsl:text>
+  </span>
+</xsl:template>
+
+<xsl:template match="varname" mode="perl">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="perl"/>
+    <xsl:text>&nbsp;</xsl:text>
+  </span>
+</xsl:template>
+
+<xsl:template match="initializer" mode="perl">
+  <span class="{name(.)}">
+    <xsl:text>=&nbsp;</xsl:text>
+    <xsl:apply-templates mode="perl"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="void" mode="perl">
+  <span class="{name(.)}">
+    <xsl:text>void&nbsp;</xsl:text>
+  </span>
+</xsl:template>
+
+<xsl:template match="methodname" mode="perl">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="perl"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="methodparam" mode="perl">
+  <xsl:if test="position() &gt; 1">
+    <xsl:text>, </xsl:text>
+  </xsl:if>
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="perl"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="parameter" mode="perl">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="perl"/>
+  </span>
+</xsl:template>
+
+<xsl:template mode="perl"
+  match="constructorsynopsis|destructorsynopsis|methodsynopsis">
+  <xsl:variable name="modifiers" select="modifier"/>
+  <xsl:variable name="notmod" select="*[name(.) != 'modifier']"/>
+
+  <code class="{name(.)}">
+    <xsl:text>sub </xsl:text>
+
+    <xsl:apply-templates select="methodname" mode="perl"/>
+    <xsl:text> { ... };</xsl:text>
+  </code>
+  <xsl:call-template name="synop-break"/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/table.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/table.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/table.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1101 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+                xmlns:stbl="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.Table"
+                xmlns:xtbl="com.nwalsh.xalan.Table"
+                xmlns:lxslt="http://xml.apache.org/xslt"
+                xmlns:ptbl="http://nwalsh.com/xslt/ext/xsltproc/python/Table"
+                exclude-result-prefixes="doc stbl xtbl lxslt ptbl"
+                version='1.0'>
+
+<xsl:include href="../common/table.xsl"/>
+
+<!-- ********************************************************************
+     $Id: table.xsl,v 1.1.1.1 2004/10/19 21:21:48 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<lxslt:component prefix="xtbl"
+                 functions="adjustColumnWidths"/>
+
+<xsl:template name="empty.table.cell">
+  <xsl:param name="colnum" select="0"/>
+
+  <xsl:variable name="rowsep">
+    <xsl:choose>
+      <!-- If this is the last row, rowsep never applies. -->
+      <xsl:when test="not(ancestor-or-self::row[1]/following-sibling::row
+                          or ancestor-or-self::thead/following-sibling::tbody
+                          or ancestor-or-self::tbody/preceding-sibling::tfoot)">
+        <xsl:value-of select="0"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:call-template name="inherited.table.attribute">
+          <xsl:with-param name="entry" select="NOT-AN-ELEMENT-NAME"/>
+          <xsl:with-param name="row" select="ancestor-or-self::row[1]"/>
+          <xsl:with-param name="colnum" select="$colnum"/>
+          <xsl:with-param name="attribute" select="'rowsep'"/>
+        </xsl:call-template>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:variable name="colsep">
+    <xsl:choose>
+      <!-- If this is the last column, colsep never applies. -->
+      <xsl:when test="$colnum &gt;= ancestor::tgroup/@cols">0</xsl:when>
+      <xsl:otherwise>
+        <xsl:call-template name="inherited.table.attribute">
+          <xsl:with-param name="entry" select="NOT-AN-ELEMENT-NAME"/>
+          <xsl:with-param name="row" select="ancestor-or-self::row[1]"/>
+          <xsl:with-param name="colnum" select="$colnum"/>
+          <xsl:with-param name="attribute" select="'colsep'"/>
+        </xsl:call-template>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <td class="auto-generated">
+    <xsl:if test="$table.borders.with.css != 0">
+      <xsl:attribute name="style">
+        <xsl:if test="$colsep &gt; 0">
+          <xsl:call-template name="border">
+            <xsl:with-param name="side" select="'right'"/>
+          </xsl:call-template>
+        </xsl:if>
+        <xsl:if test="$rowsep &gt; 0">
+          <xsl:call-template name="border">
+            <xsl:with-param name="side" select="'bottom'"/>
+          </xsl:call-template>
+        </xsl:if>
+      </xsl:attribute>
+    </xsl:if>
+    <xsl:text>&#160;</xsl:text>
+  </td>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="border">
+  <xsl:param name="side" select="'left'"/>
+  <xsl:param name="padding" select="0"/>
+  <xsl:param name="style" select="$table.cell.border.style"/>
+  <xsl:param name="color" select="$table.cell.border.color"/>
+  <xsl:param name="thickness" select="$table.cell.border.thickness"/>
+
+  <!-- Note: Some browsers (mozilla) require at least a width and style. -->
+
+  <xsl:choose>
+    <xsl:when test="($thickness != ''
+                     and $style != ''
+                     and $color != '')
+                    or ($thickness != ''
+                        and $style != '')
+                    or ($thickness != '')">
+      <!-- use the compound property if we can: -->
+      <!-- it saves space and probably works more reliably -->
+      <xsl:text>border-</xsl:text>
+      <xsl:value-of select="$side"/>
+      <xsl:text>: </xsl:text>
+      <xsl:value-of select="$thickness"/>
+      <xsl:text> </xsl:text>
+      <xsl:value-of select="$style"/>
+      <xsl:text> </xsl:text>
+      <xsl:value-of select="$color"/>
+      <xsl:text>; </xsl:text>
+    </xsl:when>
+    <xsl:otherwise>
+      <!-- we need to specify the styles individually -->
+      <xsl:if test="$thickness != ''">
+        <xsl:text>border-</xsl:text>
+        <xsl:value-of select="$side"/>
+        <xsl:text>-width: </xsl:text>
+        <xsl:value-of select="$thickness"/>
+        <xsl:text>; </xsl:text>
+      </xsl:if>
+
+      <xsl:if test="$style != ''">
+        <xsl:text>border-</xsl:text>
+        <xsl:value-of select="$side"/>
+        <xsl:text>-style: </xsl:text>
+        <xsl:value-of select="$style"/>
+        <xsl:text>; </xsl:text>
+      </xsl:if>
+
+      <xsl:if test="$color != ''">
+        <xsl:text>border-</xsl:text>
+        <xsl:value-of select="$side"/>
+        <xsl:text>-color: </xsl:text>
+        <xsl:value-of select="$color"/>
+        <xsl:text>; </xsl:text>
+      </xsl:if>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="tgroup" name="tgroup">
+  <xsl:if test="not(@cols)">
+    <xsl:message terminate="yes">
+      <xsl:text>Error: CALS tables must specify the number of columns.</xsl:text>
+    </xsl:message>
+  </xsl:if>
+
+  <xsl:variable name="summary">
+    <xsl:call-template name="dbhtml-attribute">
+      <xsl:with-param name="pis"
+                      select="processing-instruction('dbhtml')"/>
+      <xsl:with-param name="attribute" select="'table-summary'"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="cellspacing">
+    <xsl:call-template name="dbhtml-attribute">
+      <xsl:with-param name="pis"
+                      select="processing-instruction('dbhtml')"/>
+      <xsl:with-param name="attribute" select="'cellspacing'"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="cellpadding">
+    <xsl:call-template name="dbhtml-attribute">
+      <xsl:with-param name="pis"
+                      select="processing-instruction('dbhtml')[1]"/>
+      <xsl:with-param name="attribute" select="'cellpadding'"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <table>
+    <xsl:choose>
+      <!-- If there's a textobject/phrase for the table summary, use it -->
+      <xsl:when test="../textobject/phrase">
+        <xsl:attribute name="summary">
+          <xsl:value-of select="../textobject/phrase"/>
+        </xsl:attribute>
+      </xsl:when>
+
+      <!-- If there's a <?dbhtml table-summary="foo"?> PI, use it for
+           the HTML table summary attribute -->
+      <xsl:when test="$summary != ''">
+        <xsl:attribute name="summary">
+          <xsl:value-of select="$summary"/>
+        </xsl:attribute>
+      </xsl:when>
+
+      <!-- Otherwise, if there's a title, use that -->
+      <xsl:when test="../title">
+        <xsl:attribute name="summary">
+          <xsl:value-of select="string(../title)"/>
+        </xsl:attribute>
+      </xsl:when>
+
+      <!-- Otherwise, forget the whole idea -->
+      <xsl:otherwise><!-- nevermind --></xsl:otherwise>
+    </xsl:choose>
+
+    <xsl:if test="$cellspacing != '' or $html.cellspacing != ''">
+      <xsl:attribute name="cellspacing">
+        <xsl:choose>
+          <xsl:when test="$cellspacing != ''">
+            <xsl:value-of select="$cellspacing"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:value-of select="$html.cellspacing"/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:attribute>
+    </xsl:if>
+
+    <xsl:if test="$cellpadding != '' or $html.cellpadding != ''">
+      <xsl:attribute name="cellpadding">
+        <xsl:choose>
+          <xsl:when test="$cellpadding != ''">
+            <xsl:value-of select="$cellpadding"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:value-of select="$html.cellpadding"/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:attribute>
+    </xsl:if>
+
+    <xsl:if test="../@pgwide=1">
+      <xsl:attribute name="width">100%</xsl:attribute>
+    </xsl:if>
+
+    <xsl:choose>
+      <xsl:when test="$table.borders.with.css != 0">
+        <xsl:attribute name="border">0</xsl:attribute>
+        <xsl:choose>
+          <xsl:when test="../@frame='all'">
+            <xsl:attribute name="style">
+              <xsl:text>border-collapse: collapse;</xsl:text>
+              <xsl:call-template name="border">
+                <xsl:with-param name="side" select="'top'"/>
+                <xsl:with-param name="style" select="$table.frame.border.style"/>
+                <xsl:with-param name="color" select="$table.frame.border.color"/>
+                <xsl:with-param name="thickness" select="$table.frame.border.thickness"/>
+              </xsl:call-template>
+              <xsl:call-template name="border">
+                <xsl:with-param name="side" select="'bottom'"/>
+                <xsl:with-param name="style" select="$table.frame.border.style"/>
+                <xsl:with-param name="color" select="$table.frame.border.color"/>
+                <xsl:with-param name="thickness" select="$table.frame.border.thickness"/>
+              </xsl:call-template>
+              <xsl:call-template name="border">
+                <xsl:with-param name="side" select="'left'"/>
+                <xsl:with-param name="style" select="$table.frame.border.style"/>
+                <xsl:with-param name="color" select="$table.frame.border.color"/>
+                <xsl:with-param name="thickness" select="$table.frame.border.thickness"/>
+              </xsl:call-template>
+              <xsl:call-template name="border">
+                <xsl:with-param name="side" select="'right'"/>
+                <xsl:with-param name="style" select="$table.frame.border.style"/>
+                <xsl:with-param name="color" select="$table.frame.border.color"/>
+                <xsl:with-param name="thickness" select="$table.frame.border.thickness"/>
+              </xsl:call-template>
+            </xsl:attribute>
+          </xsl:when>
+          <xsl:when test="../@frame='topbot'">
+            <xsl:attribute name="style">
+              <xsl:text>border-collapse: collapse;</xsl:text>
+              <xsl:call-template name="border">
+                <xsl:with-param name="side" select="'top'"/>
+                <xsl:with-param name="style" select="$table.frame.border.style"/>
+                <xsl:with-param name="color" select="$table.frame.border.color"/>
+                <xsl:with-param name="thickness" select="$table.frame.border.thickness"/>
+              </xsl:call-template>
+              <xsl:call-template name="border">
+                <xsl:with-param name="side" select="'bottom'"/>
+                <xsl:with-param name="style" select="$table.frame.border.style"/>
+                <xsl:with-param name="color" select="$table.frame.border.color"/>
+                <xsl:with-param name="thickness" select="$table.frame.border.thickness"/>
+              </xsl:call-template>
+            </xsl:attribute>
+          </xsl:when>
+          <xsl:when test="../@frame='top'">
+            <xsl:attribute name="style">
+              <xsl:text>border-collapse: collapse;</xsl:text>
+              <xsl:call-template name="border">
+                <xsl:with-param name="side" select="'top'"/>
+                <xsl:with-param name="style" select="$table.frame.border.style"/>
+                <xsl:with-param name="color" select="$table.frame.border.color"/>
+                <xsl:with-param name="thickness" select="$table.frame.border.thickness"/>
+              </xsl:call-template>
+            </xsl:attribute>
+          </xsl:when>
+          <xsl:when test="../@frame='bottom'">
+            <xsl:attribute name="style">
+              <xsl:text>border-collapse: collapse;</xsl:text>
+              <xsl:call-template name="border">
+                <xsl:with-param name="side" select="'bottom'"/>
+                <xsl:with-param name="style" select="$table.frame.border.style"/>
+                <xsl:with-param name="color" select="$table.frame.border.color"/>
+                <xsl:with-param name="thickness" select="$table.frame.border.thickness"/>
+              </xsl:call-template>
+            </xsl:attribute>
+          </xsl:when>
+          <xsl:when test="../@frame='sides'">
+            <xsl:attribute name="style">
+              <xsl:text>border-collapse: collapse;</xsl:text>
+              <xsl:call-template name="border">
+                <xsl:with-param name="side" select="'left'"/>
+                <xsl:with-param name="style" select="$table.frame.border.style"/>
+                <xsl:with-param name="color" select="$table.frame.border.color"/>
+                <xsl:with-param name="thickness" select="$table.frame.border.thickness"/>
+              </xsl:call-template>
+              <xsl:call-template name="border">
+                <xsl:with-param name="side" select="'right'"/>
+                <xsl:with-param name="style" select="$table.frame.border.style"/>
+                <xsl:with-param name="color" select="$table.frame.border.color"/>
+                <xsl:with-param name="thickness" select="$table.frame.border.thickness"/>
+              </xsl:call-template>
+            </xsl:attribute>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:attribute name="style">
+              <xsl:text>border-collapse: collapse;</xsl:text>
+            </xsl:attribute>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:when>
+      <xsl:when test="../@frame='none' or local-name(.) = 'entrytbl'">
+        <xsl:attribute name="border">0</xsl:attribute>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:attribute name="border">1</xsl:attribute>
+      </xsl:otherwise>
+    </xsl:choose>
+
+    <xsl:variable name="colgroup">
+      <colgroup>
+        <xsl:call-template name="generate.colgroup">
+          <xsl:with-param name="cols" select="@cols"/>
+        </xsl:call-template>
+      </colgroup>
+    </xsl:variable>
+
+    <xsl:variable name="explicit.table.width">
+      <xsl:call-template name="dbhtml-attribute">
+        <xsl:with-param name="pis"
+                        select="../processing-instruction('dbhtml')[1]"/>
+        <xsl:with-param name="attribute" select="'table-width'"/>
+      </xsl:call-template>
+    </xsl:variable>
+
+    <xsl:variable name="table.width">
+      <xsl:choose>
+        <xsl:when test="$explicit.table.width != ''">
+          <xsl:value-of select="$explicit.table.width"/>
+        </xsl:when>
+        <xsl:when test="$default.table.width = ''">
+          <xsl:text>100%</xsl:text>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="$default.table.width"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:variable>
+
+    <xsl:if test="$default.table.width != ''
+                  or $explicit.table.width != ''">
+      <xsl:attribute name="width">
+        <xsl:choose>
+          <xsl:when test="contains($table.width, '%')">
+            <xsl:value-of select="$table.width"/>
+          </xsl:when>
+          <xsl:when test="$use.extensions != 0
+                          and $tablecolumns.extension != 0">
+            <xsl:choose>
+              <xsl:when test="function-available('stbl:convertLength')">
+                <xsl:value-of select="stbl:convertLength($table.width)"/>
+              </xsl:when>
+              <xsl:when test="function-available('xtbl:convertLength')">
+                <xsl:value-of select="xtbl:convertLength($table.width)"/>
+              </xsl:when>
+              <xsl:otherwise>
+                <xsl:message terminate="yes">
+                  <xsl:text>No convertLength function available.</xsl:text>
+                </xsl:message>
+              </xsl:otherwise>
+            </xsl:choose>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:value-of select="$table.width"/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:attribute>
+    </xsl:if>
+
+    <xsl:choose>
+      <xsl:when test="$use.extensions != 0
+                      and $tablecolumns.extension != 0">
+        <xsl:choose>
+          <xsl:when test="function-available('stbl:adjustColumnWidths')">
+            <xsl:copy-of select="stbl:adjustColumnWidths($colgroup)"/>
+          </xsl:when>
+          <xsl:when test="function-available('xtbl:adjustColumnWidths')">
+            <xsl:copy-of select="xtbl:adjustColumnWidths($colgroup)"/>
+          </xsl:when>
+          <xsl:when test="function-available('ptbl:adjustColumnWidths')">
+            <xsl:copy-of select="ptbl:adjustColumnWidths($colgroup)"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:message terminate="yes">
+              <xsl:text>No adjustColumnWidths function available.</xsl:text>
+            </xsl:message>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:copy-of select="$colgroup"/>
+      </xsl:otherwise>
+    </xsl:choose>
+
+    <xsl:apply-templates select="thead"/>
+    <xsl:apply-templates select="tfoot"/>
+    <xsl:apply-templates select="tbody"/>
+
+    <xsl:if test=".//footnote">
+      <tbody class="footnotes">
+        <tr>
+          <td colspan="{@cols}">
+            <xsl:apply-templates select=".//footnote" mode="table.footnote.mode"/>
+          </td>
+        </tr>
+      </tbody>
+    </xsl:if>
+  </table>
+</xsl:template>
+
+<xsl:template match="tgroup/processing-instruction('dbhtml')">
+  <xsl:variable name="summary">
+    <xsl:call-template name="dbhtml-attribute">
+      <xsl:with-param name="pis" select="."/>
+      <xsl:with-param name="attribute" select="'table-summary'"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <!-- Suppress the table-summary PI -->
+  <xsl:if test="$summary = ''">
+    <xsl:processing-instruction name="dbhtml">
+      <xsl:value-of select="."/>
+    </xsl:processing-instruction>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="colspec"></xsl:template>
+
+<xsl:template match="spanspec"></xsl:template>
+
+<xsl:template match="thead|tfoot">
+  <xsl:element name="{name(.)}">
+    <xsl:if test="@align">
+      <xsl:attribute name="align">
+        <xsl:value-of select="@align"/>
+      </xsl:attribute>
+    </xsl:if>
+    <xsl:if test="@char">
+      <xsl:attribute name="char">
+        <xsl:value-of select="@char"/>
+      </xsl:attribute>
+    </xsl:if>
+    <xsl:if test="@charoff">
+      <xsl:attribute name="charoff">
+        <xsl:value-of select="@charoff"/>
+      </xsl:attribute>
+    </xsl:if>
+    <xsl:if test="@valign">
+      <xsl:attribute name="valign">
+        <xsl:value-of select="@valign"/>
+      </xsl:attribute>
+    </xsl:if>
+
+    <xsl:apply-templates select="row[1]">
+      <xsl:with-param name="spans">
+        <xsl:call-template name="blank.spans">
+          <xsl:with-param name="cols" select="../@cols"/>
+        </xsl:call-template>
+      </xsl:with-param>
+    </xsl:apply-templates>
+
+  </xsl:element>
+</xsl:template>
+
+<xsl:template match="tbody">
+  <tbody>
+    <xsl:if test="@align">
+      <xsl:attribute name="align">
+        <xsl:value-of select="@align"/>
+      </xsl:attribute>
+    </xsl:if>
+    <xsl:if test="@char">
+      <xsl:attribute name="char">
+        <xsl:value-of select="@char"/>
+      </xsl:attribute>
+    </xsl:if>
+    <xsl:if test="@charoff">
+      <xsl:attribute name="charoff">
+        <xsl:value-of select="@charoff"/>
+      </xsl:attribute>
+    </xsl:if>
+    <xsl:if test="@valign">
+      <xsl:attribute name="valign">
+        <xsl:value-of select="@valign"/>
+      </xsl:attribute>
+    </xsl:if>
+
+    <xsl:apply-templates select="row[1]">
+      <xsl:with-param name="spans">
+        <xsl:call-template name="blank.spans">
+          <xsl:with-param name="cols" select="../@cols"/>
+        </xsl:call-template>
+      </xsl:with-param>
+    </xsl:apply-templates>
+
+  </tbody>
+</xsl:template>
+
+<xsl:template match="row">
+  <xsl:param name="spans"/>
+
+  <xsl:variable name="row-height">
+    <xsl:if test="processing-instruction('dbhtml')">
+      <xsl:call-template name="dbhtml-attribute">
+        <xsl:with-param name="pis" select="processing-instruction('dbhtml')"/>
+        <xsl:with-param name="attribute" select="'row-height'"/>
+      </xsl:call-template>
+    </xsl:if>
+  </xsl:variable>
+
+  <xsl:variable name="bgcolor">
+    <xsl:if test="processing-instruction('dbhtml')">
+      <xsl:call-template name="dbhtml-attribute">
+	<xsl:with-param name="pis" select="processing-instruction('dbhtml')"/>
+	<xsl:with-param name="attribute" select="'bgcolor'"/>
+      </xsl:call-template>
+    </xsl:if>
+  </xsl:variable>
+
+  <xsl:variable name="class">
+    <xsl:if test="processing-instruction('dbhtml')">
+      <xsl:call-template name="dbhtml-attribute">
+	<xsl:with-param name="pis" select="processing-instruction('dbhtml')"/>
+	<xsl:with-param name="attribute" select="'class'"/>
+      </xsl:call-template>
+    </xsl:if>
+  </xsl:variable>
+
+  <tr>
+    <xsl:call-template name="tr.attributes">
+      <xsl:with-param name="rownum">
+        <xsl:number from="tgroup" count="row"/>
+      </xsl:with-param>
+    </xsl:call-template>
+
+    <xsl:if test="$row-height != ''">
+      <xsl:attribute name="height">
+        <xsl:value-of select="$row-height"/>
+      </xsl:attribute>
+    </xsl:if>
+
+    <xsl:if test="$bgcolor != ''">
+      <xsl:attribute name="bgcolor">
+        <xsl:value-of select="$bgcolor"/>
+      </xsl:attribute>
+    </xsl:if>
+
+    <xsl:if test="$class != ''">
+      <xsl:attribute name="class">
+        <xsl:value-of select="$class"/>
+      </xsl:attribute>
+    </xsl:if>
+
+    <xsl:if test="$table.borders.with.css != 0">
+      <xsl:if test="@rowsep = 1 and following-sibling::row">
+        <xsl:attribute name="style">
+          <xsl:call-template name="border">
+            <xsl:with-param name="side" select="'bottom'"/>
+          </xsl:call-template>
+        </xsl:attribute>
+      </xsl:if>
+    </xsl:if>
+
+    <xsl:if test="@align">
+      <xsl:attribute name="align">
+        <xsl:value-of select="@align"/>
+      </xsl:attribute>
+    </xsl:if>
+    <xsl:if test="@char">
+      <xsl:attribute name="char">
+        <xsl:value-of select="@char"/>
+      </xsl:attribute>
+    </xsl:if>
+    <xsl:if test="@charoff">
+      <xsl:attribute name="charoff">
+        <xsl:value-of select="@charoff"/>
+      </xsl:attribute>
+    </xsl:if>
+    <xsl:if test="@valign">
+      <xsl:attribute name="valign">
+        <xsl:value-of select="@valign"/>
+      </xsl:attribute>
+    </xsl:if>
+
+    <xsl:apply-templates select="(entry|entrytbl)[1]">
+      <xsl:with-param name="spans" select="$spans"/>
+    </xsl:apply-templates>
+  </tr>
+
+  <xsl:if test="following-sibling::row">
+    <xsl:variable name="nextspans">
+      <xsl:apply-templates select="(entry|entrytbl)[1]" mode="span">
+        <xsl:with-param name="spans" select="$spans"/>
+      </xsl:apply-templates>
+    </xsl:variable>
+
+    <xsl:apply-templates select="following-sibling::row[1]">
+      <xsl:with-param name="spans" select="$nextspans"/>
+    </xsl:apply-templates>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="entry|entrytbl" name="entry">
+  <xsl:param name="col" select="1"/>
+  <xsl:param name="spans"/>
+
+  <xsl:variable name="cellgi">
+    <xsl:choose>
+      <xsl:when test="ancestor::thead">th</xsl:when>
+      <xsl:when test="ancestor::tfoot">th</xsl:when>
+      <xsl:otherwise>td</xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:variable name="empty.cell" select="count(node()) = 0"/>
+
+  <xsl:variable name="named.colnum">
+    <xsl:call-template name="entry.colnum"/>
+  </xsl:variable>
+
+  <xsl:variable name="entry.colnum">
+    <xsl:choose>
+      <xsl:when test="$named.colnum &gt; 0">
+        <xsl:value-of select="$named.colnum"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$col"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:variable name="entry.colspan">
+    <xsl:choose>
+      <xsl:when test="@spanname or @namest">
+        <xsl:call-template name="calculate.colspan"/>
+      </xsl:when>
+      <xsl:otherwise>1</xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:variable name="following.spans">
+    <xsl:call-template name="calculate.following.spans">
+      <xsl:with-param name="colspan" select="$entry.colspan"/>
+      <xsl:with-param name="spans" select="$spans"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="rowsep">
+    <xsl:choose>
+      <!-- If this is the last row, rowsep never applies. -->
+      <xsl:when test="ancestor::entrytbl
+                      and not (ancestor-or-self::row[1]/following-sibling::row)">
+        <xsl:value-of select="0"/>
+      </xsl:when>
+      <xsl:when test="not(ancestor-or-self::row[1]/following-sibling::row
+                          or ancestor-or-self::thead/following-sibling::tbody
+                          or ancestor-or-self::tbody/preceding-sibling::tfoot)">
+        <xsl:value-of select="0"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:call-template name="inherited.table.attribute">
+          <xsl:with-param name="entry" select="."/>
+          <xsl:with-param name="colnum" select="$entry.colnum"/>
+          <xsl:with-param name="attribute" select="'rowsep'"/>
+        </xsl:call-template>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:variable name="colsep">
+    <xsl:choose>
+      <!-- If this is the last column, colsep never applies. -->
+      <xsl:when test="$following.spans = ''">0</xsl:when>
+      <xsl:otherwise>
+        <xsl:call-template name="inherited.table.attribute">
+          <xsl:with-param name="entry" select="."/>
+          <xsl:with-param name="colnum" select="$entry.colnum"/>
+          <xsl:with-param name="attribute" select="'colsep'"/>
+        </xsl:call-template>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:variable name="valign">
+    <xsl:call-template name="inherited.table.attribute">
+      <xsl:with-param name="entry" select="."/>
+      <xsl:with-param name="colnum" select="$entry.colnum"/>
+      <xsl:with-param name="attribute" select="'valign'"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="align">
+    <xsl:call-template name="inherited.table.attribute">
+      <xsl:with-param name="entry" select="."/>
+      <xsl:with-param name="colnum" select="$entry.colnum"/>
+      <xsl:with-param name="attribute" select="'align'"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="char">
+    <xsl:call-template name="inherited.table.attribute">
+      <xsl:with-param name="entry" select="."/>
+      <xsl:with-param name="colnum" select="$entry.colnum"/>
+      <xsl:with-param name="attribute" select="'char'"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="charoff">
+    <xsl:call-template name="inherited.table.attribute">
+      <xsl:with-param name="entry" select="."/>
+      <xsl:with-param name="colnum" select="$entry.colnum"/>
+      <xsl:with-param name="attribute" select="'charoff'"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="$spans != '' and not(starts-with($spans,'0:'))">
+      <xsl:call-template name="entry">
+        <xsl:with-param name="col" select="$col+1"/>
+        <xsl:with-param name="spans" select="substring-after($spans,':')"/>
+      </xsl:call-template>
+    </xsl:when>
+
+    <xsl:when test="$entry.colnum &gt; $col">
+      <xsl:call-template name="empty.table.cell"/>
+      <xsl:call-template name="entry">
+        <xsl:with-param name="col" select="$col+1"/>
+        <xsl:with-param name="spans" select="substring-after($spans,':')"/>
+      </xsl:call-template>
+    </xsl:when>
+
+    <xsl:otherwise>
+      <xsl:variable name="bgcolor">
+        <xsl:if test="processing-instruction('dbhtml')">
+          <xsl:call-template name="dbhtml-attribute">
+            <xsl:with-param name="pis" select="processing-instruction('dbhtml')"/>
+            <xsl:with-param name="attribute" select="'bgcolor'"/>
+          </xsl:call-template>
+        </xsl:if>
+      </xsl:variable>
+
+      <xsl:element name="{$cellgi}">
+        <xsl:if test="$bgcolor != ''">
+          <xsl:attribute name="bgcolor">
+            <xsl:value-of select="$bgcolor"/>
+          </xsl:attribute>
+        </xsl:if>
+
+        <xsl:if test="$entry.propagates.style != 0 and @role">
+          <xsl:attribute name="class">
+            <xsl:value-of select="@role"/>
+          </xsl:attribute>
+        </xsl:if>
+
+        <xsl:if test="$show.revisionflag and @revisionflag">
+          <xsl:attribute name="class">
+            <xsl:value-of select="@revisionflag"/>
+          </xsl:attribute>
+        </xsl:if>
+
+        <xsl:if test="$table.borders.with.css != 0">
+          <xsl:attribute name="style">
+            <xsl:if test="$colsep &gt; 0">
+              <xsl:call-template name="border">
+                <xsl:with-param name="side" select="'right'"/>
+              </xsl:call-template>
+            </xsl:if>
+            <xsl:if test="$rowsep &gt; 0">
+              <xsl:call-template name="border">
+                <xsl:with-param name="side" select="'bottom'"/>
+              </xsl:call-template>
+            </xsl:if>
+          </xsl:attribute>
+        </xsl:if>
+
+        <xsl:if test="@morerows &gt; 0">
+          <xsl:attribute name="rowspan">
+            <xsl:value-of select="1+ at morerows"/>
+          </xsl:attribute>
+        </xsl:if>
+
+        <xsl:if test="$entry.colspan &gt; 1">
+          <xsl:attribute name="colspan">
+            <xsl:value-of select="$entry.colspan"/>
+          </xsl:attribute>
+        </xsl:if>
+
+        <xsl:if test="$align != ''">
+          <xsl:attribute name="align">
+            <xsl:value-of select="$align"/>
+          </xsl:attribute>
+        </xsl:if>
+
+        <xsl:if test="$valign != ''">
+          <xsl:attribute name="valign">
+            <xsl:value-of select="$valign"/>
+          </xsl:attribute>
+        </xsl:if>
+
+        <xsl:if test="$char != ''">
+          <xsl:attribute name="char">
+            <xsl:value-of select="$char"/>
+          </xsl:attribute>
+        </xsl:if>
+
+        <xsl:if test="$charoff != ''">
+          <xsl:attribute name="charoff">
+            <xsl:value-of select="$charoff"/>
+          </xsl:attribute>
+        </xsl:if>
+
+        <xsl:if test="not(preceding-sibling::*) and ancestor::row/@id">
+          <xsl:call-template name="anchor">
+            <xsl:with-param name="node" select="ancestor::row[1]"/>
+          </xsl:call-template>
+        </xsl:if>
+
+        <xsl:call-template name="anchor"/>
+
+        <xsl:choose>
+          <xsl:when test="$empty.cell">
+            <xsl:text>&#160;</xsl:text>
+          </xsl:when>
+          <xsl:when test="self::entrytbl">
+            <xsl:call-template name="tgroup"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:apply-templates/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:element>
+
+      <xsl:choose>
+        <xsl:when test="following-sibling::entry|following-sibling::entrytbl">
+          <xsl:apply-templates select="(following-sibling::entry
+                                       |following-sibling::entrytbl)[1]">
+            <xsl:with-param name="col" select="$col+$entry.colspan"/>
+            <xsl:with-param name="spans" select="$following.spans"/>
+          </xsl:apply-templates>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:call-template name="finaltd">
+            <xsl:with-param name="spans" select="$following.spans"/>
+            <xsl:with-param name="col" select="$col+$entry.colspan"/>
+          </xsl:call-template>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="entry|entrytbl" name="sentry" mode="span">
+  <xsl:param name="col" select="1"/>
+  <xsl:param name="spans"/>
+
+  <xsl:variable name="entry.colnum">
+    <xsl:call-template name="entry.colnum"/>
+  </xsl:variable>
+
+  <xsl:variable name="entry.colspan">
+    <xsl:choose>
+      <xsl:when test="@spanname or @namest">
+        <xsl:call-template name="calculate.colspan"/>
+      </xsl:when>
+      <xsl:otherwise>1</xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:variable name="following.spans">
+    <xsl:call-template name="calculate.following.spans">
+      <xsl:with-param name="colspan" select="$entry.colspan"/>
+      <xsl:with-param name="spans" select="$spans"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="$spans != '' and not(starts-with($spans,'0:'))">
+      <xsl:value-of select="substring-before($spans,':')-1"/>
+      <xsl:text>:</xsl:text>
+      <xsl:call-template name="sentry">
+        <xsl:with-param name="col" select="$col+1"/>
+        <xsl:with-param name="spans" select="substring-after($spans,':')"/>
+      </xsl:call-template>
+    </xsl:when>
+
+    <xsl:when test="$entry.colnum &gt; $col">
+      <xsl:text>0:</xsl:text>
+      <xsl:call-template name="sentry">
+        <xsl:with-param name="col" select="$col+$entry.colspan"/>
+        <xsl:with-param name="spans" select="$following.spans"/>
+      </xsl:call-template>
+    </xsl:when>
+
+    <xsl:otherwise>
+      <xsl:call-template name="copy-string">
+        <xsl:with-param name="count" select="$entry.colspan"/>
+        <xsl:with-param name="string">
+          <xsl:choose>
+            <xsl:when test="@morerows">
+              <xsl:value-of select="@morerows"/>
+            </xsl:when>
+            <xsl:otherwise>0</xsl:otherwise>
+          </xsl:choose>
+          <xsl:text>:</xsl:text>
+        </xsl:with-param>
+      </xsl:call-template>
+
+      <xsl:choose>
+        <xsl:when test="following-sibling::entry|following-sibling::entrytbl">
+          <xsl:apply-templates select="(following-sibling::entry
+                                        |following-sibling::entrytbl)[1]"
+                               mode="span">
+            <xsl:with-param name="col" select="$col+$entry.colspan"/>
+            <xsl:with-param name="spans" select="$following.spans"/>
+          </xsl:apply-templates>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:call-template name="sfinaltd">
+            <xsl:with-param name="spans" select="$following.spans"/>
+          </xsl:call-template>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="generate.colgroup">
+  <xsl:param name="cols" select="1"/>
+  <xsl:param name="count" select="1"/>
+  <xsl:choose>
+    <xsl:when test="$count &gt; $cols"></xsl:when>
+    <xsl:otherwise>
+      <xsl:call-template name="generate.col">
+        <xsl:with-param name="countcol" select="$count"/>
+      </xsl:call-template>
+      <xsl:call-template name="generate.colgroup">
+        <xsl:with-param name="cols" select="$cols"/>
+        <xsl:with-param name="count" select="$count+1"/>
+      </xsl:call-template>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="generate.col">
+  <xsl:param name="countcol">1</xsl:param>
+  <xsl:param name="colspecs" select="./colspec"/>
+  <xsl:param name="count">1</xsl:param>
+  <xsl:param name="colnum">1</xsl:param>
+
+  <xsl:choose>
+    <xsl:when test="$count>count($colspecs)">
+      <col/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:variable name="colspec" select="$colspecs[$count=position()]"/>
+      <xsl:variable name="colspec.colnum">
+        <xsl:choose>
+          <xsl:when test="$colspec/@colnum">
+            <xsl:value-of select="$colspec/@colnum"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:value-of select="$colnum"/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:variable>
+
+      <xsl:choose>
+        <xsl:when test="$colspec.colnum=$countcol">
+          <col>
+            <xsl:if test="$colspec/@colwidth
+                          and $use.extensions != 0
+                          and $tablecolumns.extension != 0">
+              <xsl:attribute name="width">
+	        <xsl:choose>
+		  <xsl:when test="normalize-space($colspec/@colwidth) = '*'">
+                    <xsl:value-of select="'1*'"/>
+		  </xsl:when>
+		  <xsl:otherwise>
+                    <xsl:value-of select="$colspec/@colwidth"/>
+		  </xsl:otherwise>
+		</xsl:choose>
+              </xsl:attribute>
+            </xsl:if>
+
+            <xsl:choose>
+              <xsl:when test="$colspec/@align">
+                <xsl:attribute name="align">
+                  <xsl:value-of select="$colspec/@align"/>
+                </xsl:attribute>
+              </xsl:when>
+              <!-- Suggested by Pavel ZAMPACH <zampach at nemcb.cz> -->
+              <xsl:when test="$colspecs/ancestor::tgroup/@align">
+                <xsl:attribute name="align">
+                  <xsl:value-of select="$colspecs/ancestor::tgroup/@align"/>
+                </xsl:attribute>
+              </xsl:when>
+            </xsl:choose>
+
+            <xsl:if test="$colspec/@char">
+              <xsl:attribute name="char">
+                <xsl:value-of select="$colspec/@char"/>
+              </xsl:attribute>
+            </xsl:if>
+            <xsl:if test="$colspec/@charoff">
+              <xsl:attribute name="charoff">
+                <xsl:value-of select="$colspec/@charoff"/>
+              </xsl:attribute>
+            </xsl:if>
+          </col>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:call-template name="generate.col">
+            <xsl:with-param name="countcol" select="$countcol"/>
+            <xsl:with-param name="colspecs" select="$colspecs"/>
+            <xsl:with-param name="count" select="$count+1"/>
+            <xsl:with-param name="colnum">
+              <xsl:choose>
+                <xsl:when test="$colspec/@colnum">
+                  <xsl:value-of select="$colspec/@colnum + 1"/>
+                </xsl:when>
+                <xsl:otherwise>
+                  <xsl:value-of select="$colnum + 1"/>
+                </xsl:otherwise>
+              </xsl:choose>
+            </xsl:with-param>
+           </xsl:call-template>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="colspec.colwidth">
+  <!-- when this macro is called, the current context must be an entry -->
+  <xsl:param name="colname"></xsl:param>
+  <!-- .. = row, ../.. = thead|tbody, ../../.. = tgroup -->
+  <xsl:param name="colspecs" select="../../../../tgroup/colspec"/>
+  <xsl:param name="count">1</xsl:param>
+  <xsl:choose>
+    <xsl:when test="$count>count($colspecs)"></xsl:when>
+    <xsl:otherwise>
+      <xsl:variable name="colspec" select="$colspecs[$count=position()]"/>
+      <xsl:choose>
+        <xsl:when test="$colspec/@colname=$colname">
+          <xsl:value-of select="$colspec/@colwidth"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:call-template name="colspec.colwidth">
+            <xsl:with-param name="colname" select="$colname"/>
+            <xsl:with-param name="colspecs" select="$colspecs"/>
+            <xsl:with-param name="count" select="$count+1"/>
+          </xsl:call-template>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- ====================================================================== -->
+
+<xsl:template name="tr.attributes">
+  <xsl:param name="row" select="."/>
+  <xsl:param name="rownum" select="0"/>
+
+  <!-- by default, do nothing. But you might want to say:
+
+  <xsl:if test="$rownum mod 2 = 0">
+    <xsl:attribute name="class">oddrow</xsl:attribute>
+  </xsl:if>
+
+  -->
+</xsl:template>
+
+</xsl:stylesheet>
+

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/task.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/task.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/task.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,69 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                version="1.0">
+
+<!-- ********************************************************************
+     $Id: task.xsl,v 1.1.1.1 2004/10/19 21:21:48 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:template match="task">
+  <xsl:variable name="param.placement"
+                select="substring-after(normalize-space($formal.title.placement),
+                                        concat(local-name(.), ' '))"/>
+
+  <xsl:variable name="placement">
+    <xsl:choose>
+      <xsl:when test="contains($param.placement, ' ')">
+        <xsl:value-of select="substring-before($param.placement, ' ')"/>
+      </xsl:when>
+      <xsl:when test="$param.placement = ''">before</xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$param.placement"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:variable name="preamble"
+                select="*[not(self::title
+                              or self::titleabbrev)]"/>
+
+  <div class="{name(.)}">
+    <xsl:call-template name="anchor"/>
+
+    <xsl:if test="title and $placement = 'before'">
+      <xsl:call-template name="formal.object.heading"/>
+    </xsl:if>
+
+    <xsl:apply-templates select="$preamble"/>
+
+    <xsl:if test="title and $placement != 'before'">
+      <xsl:call-template name="formal.object.heading"/>
+    </xsl:if>
+  </div>
+</xsl:template>
+
+<xsl:template match="task/title">
+  <!-- nop -->
+</xsl:template>
+
+<xsl:template match="tasksummary">
+  <xsl:call-template name="semiformal.object"/>
+</xsl:template>
+
+<xsl:template match="taskprerequisites">
+  <xsl:call-template name="semiformal.object"/>
+</xsl:template>
+
+<xsl:template match="taskrelated">
+  <xsl:call-template name="semiformal.object"/>
+</xsl:template>
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/titlepage.templates.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/titlepage.templates.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/titlepage.templates.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,659 @@
+<t:templates xmlns:t="http://nwalsh.com/docbook/xsl/template/1.0"
+	     xmlns:param="http://nwalsh.com/docbook/xsl/template/1.0/param"
+             xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<!-- ==================================================================== -->
+
+<t:titlepage t:element="article" t:wrapper="div" class="titlepage">
+  <t:titlepage-content t:side="recto">
+    <title/>
+    <subtitle/>
+    <corpauthor/>
+    <authorgroup/>
+    <author/>
+    <othercredit/>
+    <releaseinfo/>
+    <copyright/>
+    <legalnotice/>
+    <pubdate/>
+    <revision/>
+    <revhistory/>
+    <abstract/>
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+    <hr/>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+<t:titlepage t:element="set" t:wrapper="div" class="titlepage">
+  <t:titlepage-content t:side="recto">
+    <title/>
+    <subtitle/>
+    <corpauthor/>
+    <authorgroup/>
+    <author/>
+    <othercredit/>
+    <releaseinfo/>
+    <copyright/>
+    <legalnotice/>
+    <pubdate/>
+    <revision/>
+    <revhistory/>
+    <abstract/>
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+    <hr/>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+<t:titlepage t:element="book" t:wrapper="div" class="titlepage">
+  <t:titlepage-content t:side="recto">
+    <title/>
+    <subtitle/>
+    <corpauthor/>
+    <authorgroup/>
+    <author/>
+    <othercredit/>
+    <releaseinfo/>
+    <copyright/>
+    <legalnotice/>
+    <pubdate/>
+    <revision/>
+    <revhistory/>
+    <abstract/>
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+    <hr/>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+<t:titlepage t:element="part" t:wrapper="div" class="titlepage">
+  <t:titlepage-content t:side="recto">
+    <title/>
+    <subtitle/>
+    <corpauthor/>
+    <authorgroup/>
+    <author/>
+    <othercredit/>
+    <releaseinfo/>
+    <copyright/>
+    <legalnotice/>
+    <pubdate/>
+    <revision/>
+    <revhistory/>
+    <abstract/>
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<t:titlepage t:element="partintro" t:wrapper="div">
+  <t:titlepage-content t:side="recto">
+    <title/>
+    <subtitle/>
+    <corpauthor/>
+    <authorgroup/>
+    <author/>
+    <othercredit/>
+    <releaseinfo/>
+    <copyright/>
+    <legalnotice/>
+    <pubdate/>
+    <revision/>
+    <revhistory/>
+    <abstract/>
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+<t:titlepage t:element="reference" t:wrapper="div" class="titlepage">
+  <t:titlepage-content t:side="recto">
+    <title/>
+    <subtitle/>
+    <corpauthor/>
+    <authorgroup/>
+    <author/>
+    <othercredit/>
+    <releaseinfo/>
+    <copyright/>
+    <legalnotice/>
+    <pubdate/>
+    <revision/>
+    <revhistory/>
+    <abstract/>
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+    <hr/>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+<t:titlepage t:element="refentry" t:wrapper="div" class="titlepage">
+  <t:titlepage-content t:side="recto">
+<!-- uncomment this if you want refentry titlepages
+    <title t:force="1"
+	   t:named-template="refentry.title"
+	   param:node="ancestor-or-self::refentry[1]"/>
+-->
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator/>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+  <t:titlepage t:element="dedication" t:wrapper="div" class="titlepage">
+    <t:titlepage-content t:side="recto">
+    <title
+	   t:force="1"
+	   t:named-template="component.title"
+	   param:node="ancestor-or-self::dedication[1]"/>
+    <subtitle/>
+    </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+<t:titlepage t:element="preface" t:wrapper="div" class="titlepage">
+  <t:titlepage-content t:side="recto">
+    <title/>
+    <subtitle/>
+    <corpauthor/>
+    <authorgroup/>
+    <author/>
+    <othercredit/>
+    <releaseinfo/>
+    <copyright/>
+    <legalnotice/>
+    <pubdate/>
+    <revision/>
+    <revhistory/>
+    <abstract/>
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+<t:titlepage t:element="chapter" t:wrapper="div" class="titlepage">
+  <t:titlepage-content t:side="recto">
+    <title/>
+    <subtitle/>
+    <corpauthor/>
+    <authorgroup/>
+    <author/>
+    <othercredit/>
+    <releaseinfo/>
+    <copyright/>
+    <legalnotice/>
+    <pubdate/>
+    <revision/>
+    <revhistory/>
+    <abstract/>
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+<t:titlepage t:element="appendix" t:wrapper="div" class="titlepage">
+  <t:titlepage-content t:side="recto">
+    <title/>
+    <subtitle/>
+    <corpauthor/>
+    <authorgroup/>
+    <author/>
+    <othercredit/>
+    <releaseinfo/>
+    <copyright/>
+    <legalnotice/>
+    <pubdate/>
+    <revision/>
+    <revhistory/>
+    <abstract/>
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+<t:titlepage t:element="section" t:wrapper="div" class="titlepage">
+  <t:titlepage-content t:side="recto">
+    <title/>
+    <subtitle/>
+    <corpauthor/>
+    <authorgroup/>
+    <author/>
+    <othercredit/>
+    <releaseinfo/>
+    <copyright/>
+    <legalnotice/>
+    <pubdate/>
+    <revision/>
+    <revhistory/>
+    <abstract/>
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+    <xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<t:titlepage t:element="sect1" t:wrapper="div" class="titlepage">
+  <t:titlepage-content t:side="recto">
+    <title/>
+    <subtitle/>
+    <corpauthor/>
+    <authorgroup/>
+    <author/>
+    <othercredit/>
+    <releaseinfo/>
+    <copyright/>
+    <legalnotice/>
+    <pubdate/>
+    <revision/>
+    <revhistory/>
+    <abstract/>
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+    <xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<t:titlepage t:element="sect2" t:wrapper="div" class="titlepage">
+  <t:titlepage-content t:side="recto">
+    <title/>
+    <subtitle/>
+    <corpauthor/>
+    <authorgroup/>
+    <author/>
+    <othercredit/>
+    <releaseinfo/>
+    <copyright/>
+    <legalnotice/>
+    <pubdate/>
+    <revision/>
+    <revhistory/>
+    <abstract/>
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+    <xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<t:titlepage t:element="sect3" t:wrapper="div" class="titlepage">
+  <t:titlepage-content t:side="recto">
+    <title/>
+    <subtitle/>
+    <corpauthor/>
+    <authorgroup/>
+    <author/>
+    <othercredit/>
+    <releaseinfo/>
+    <copyright/>
+    <legalnotice/>
+    <pubdate/>
+    <revision/>
+    <revhistory/>
+    <abstract/>
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+    <xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<t:titlepage t:element="sect4" t:wrapper="div" class="titlepage">
+  <t:titlepage-content t:side="recto">
+    <title/>
+    <subtitle/>
+    <corpauthor/>
+    <authorgroup/>
+    <author/>
+    <othercredit/>
+    <releaseinfo/>
+    <copyright/>
+    <legalnotice/>
+    <pubdate/>
+    <revision/>
+    <revhistory/>
+    <abstract/>
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+    <xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<t:titlepage t:element="sect5" t:wrapper="div" class="titlepage">
+  <t:titlepage-content t:side="recto">
+    <title/>
+    <subtitle/>
+    <corpauthor/>
+    <authorgroup/>
+    <author/>
+    <othercredit/>
+    <releaseinfo/>
+    <copyright/>
+    <legalnotice/>
+    <pubdate/>
+    <revision/>
+    <revhistory/>
+    <abstract/>
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+    <xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<t:titlepage t:element="simplesect" t:wrapper="div" class="titlepage">
+  <t:titlepage-content t:side="recto">
+    <title/>
+    <subtitle/>
+    <corpauthor/>
+    <authorgroup/>
+    <author/>
+    <othercredit/>
+    <releaseinfo/>
+    <copyright/>
+    <legalnotice/>
+    <pubdate/>
+    <revision/>
+    <revhistory/>
+    <abstract/>
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+    <xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+<t:titlepage t:element="bibliography" t:wrapper="div" class="titlepage">
+  <t:titlepage-content t:side="recto">
+    <title
+	   t:force="1"
+	   t:named-template="component.title"
+	   param:node="ancestor-or-self::bibliography[1]"/>
+    <subtitle/>
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+<t:titlepage t:element="glossary" t:wrapper="div" class="titlepage">
+  <t:titlepage-content t:side="recto">
+    <title
+	   t:force="1"
+	   t:named-template="component.title"
+	   param:node="ancestor-or-self::glossary[1]"/>
+    <subtitle/>
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+<t:titlepage t:element="index" t:wrapper="div" class="titlepage">
+  <t:titlepage-content t:side="recto">
+    <title
+	   t:force="1"
+	   t:named-template="component.title"
+	   param:node="ancestor-or-self::index[1]"/>
+    <subtitle/>
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+<t:titlepage t:element="setindex" t:wrapper="div" class="titlepage">
+  <t:titlepage-content t:side="recto">
+    <title
+	   t:force="1"
+	   t:named-template="component.title"
+	   param:node="ancestor-or-self::setindex[1]"/>
+    <subtitle/>
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+</t:templates>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/titlepage.templates.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/titlepage.templates.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/titlepage.templates.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,3152 @@
+<?xml version="1.0" encoding="utf-8"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<!-- This stylesheet was created by template/titlepage.xsl; do not edit it by hand. -->
+
+<xsl:template name="article.titlepage.recto">
+  <xsl:choose>
+    <xsl:when test="articleinfo/title">
+      <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/title"/>
+    </xsl:when>
+    <xsl:when test="artheader/title">
+      <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/title"/>
+    </xsl:when>
+    <xsl:when test="info/title">
+      <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/title"/>
+    </xsl:when>
+    <xsl:when test="title">
+      <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="title"/>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:choose>
+    <xsl:when test="articleinfo/subtitle">
+      <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/subtitle"/>
+    </xsl:when>
+    <xsl:when test="artheader/subtitle">
+      <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/subtitle"/>
+    </xsl:when>
+    <xsl:when test="info/subtitle">
+      <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/subtitle"/>
+    </xsl:when>
+    <xsl:when test="subtitle">
+      <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="subtitle"/>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/corpauthor"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/corpauthor"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/corpauthor"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/authorgroup"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/authorgroup"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/authorgroup"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/author"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/author"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/author"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/othercredit"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/othercredit"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/othercredit"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/releaseinfo"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/releaseinfo"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/releaseinfo"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/copyright"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/copyright"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/copyright"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/legalnotice"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/legalnotice"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/legalnotice"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/pubdate"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/pubdate"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/pubdate"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/revision"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/revision"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/revision"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/revhistory"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/revhistory"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/revhistory"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/abstract"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/abstract"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/abstract"/>
+</xsl:template>
+
+<xsl:template name="article.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="article.titlepage.separator"><hr/>
+</xsl:template>
+
+<xsl:template name="article.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="article.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="article.titlepage">
+  <div class="titlepage">
+    <div>
+    <xsl:call-template name="article.titlepage.before.recto"/>
+    <xsl:call-template name="article.titlepage.recto"/>
+    </div>
+    <div>
+    <xsl:call-template name="article.titlepage.before.verso"/>
+    <xsl:call-template name="article.titlepage.verso"/>
+    </div>
+    <xsl:call-template name="article.titlepage.separator"/>
+  </div>
+</xsl:template>
+
+<xsl:template match="*" mode="article.titlepage.recto.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="article.titlepage.verso.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="title" mode="article.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="article.titlepage.recto.style">
+<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="article.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="article.titlepage.recto.style">
+<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="corpauthor" mode="article.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="article.titlepage.recto.style">
+<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="authorgroup" mode="article.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="article.titlepage.recto.style">
+<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="author" mode="article.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="article.titlepage.recto.style">
+<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="othercredit" mode="article.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="article.titlepage.recto.style">
+<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="releaseinfo" mode="article.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="article.titlepage.recto.style">
+<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="copyright" mode="article.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="article.titlepage.recto.style">
+<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="legalnotice" mode="article.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="article.titlepage.recto.style">
+<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="pubdate" mode="article.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="article.titlepage.recto.style">
+<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="revision" mode="article.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="article.titlepage.recto.style">
+<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="revhistory" mode="article.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="article.titlepage.recto.style">
+<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="abstract" mode="article.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="article.titlepage.recto.style">
+<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template name="set.titlepage.recto">
+  <xsl:choose>
+    <xsl:when test="setinfo/title">
+      <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/title"/>
+    </xsl:when>
+    <xsl:when test="info/title">
+      <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/title"/>
+    </xsl:when>
+    <xsl:when test="title">
+      <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="title"/>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:choose>
+    <xsl:when test="setinfo/subtitle">
+      <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/subtitle"/>
+    </xsl:when>
+    <xsl:when test="info/subtitle">
+      <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/subtitle"/>
+    </xsl:when>
+    <xsl:when test="subtitle">
+      <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="subtitle"/>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/corpauthor"/>
+  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/corpauthor"/>
+  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/authorgroup"/>
+  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/authorgroup"/>
+  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/author"/>
+  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/author"/>
+  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/othercredit"/>
+  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/othercredit"/>
+  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/releaseinfo"/>
+  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/releaseinfo"/>
+  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/copyright"/>
+  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/copyright"/>
+  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/legalnotice"/>
+  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/legalnotice"/>
+  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/pubdate"/>
+  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/pubdate"/>
+  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/revision"/>
+  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/revision"/>
+  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/revhistory"/>
+  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/revhistory"/>
+  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/abstract"/>
+  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/abstract"/>
+</xsl:template>
+
+<xsl:template name="set.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="set.titlepage.separator"><hr/>
+</xsl:template>
+
+<xsl:template name="set.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="set.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="set.titlepage">
+  <div class="titlepage">
+    <div>
+    <xsl:call-template name="set.titlepage.before.recto"/>
+    <xsl:call-template name="set.titlepage.recto"/>
+    </div>
+    <div>
+    <xsl:call-template name="set.titlepage.before.verso"/>
+    <xsl:call-template name="set.titlepage.verso"/>
+    </div>
+    <xsl:call-template name="set.titlepage.separator"/>
+  </div>
+</xsl:template>
+
+<xsl:template match="*" mode="set.titlepage.recto.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="set.titlepage.verso.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="title" mode="set.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="set.titlepage.recto.style">
+<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="set.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="set.titlepage.recto.style">
+<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="corpauthor" mode="set.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="set.titlepage.recto.style">
+<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="authorgroup" mode="set.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="set.titlepage.recto.style">
+<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="author" mode="set.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="set.titlepage.recto.style">
+<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="othercredit" mode="set.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="set.titlepage.recto.style">
+<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="releaseinfo" mode="set.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="set.titlepage.recto.style">
+<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="copyright" mode="set.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="set.titlepage.recto.style">
+<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="legalnotice" mode="set.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="set.titlepage.recto.style">
+<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="pubdate" mode="set.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="set.titlepage.recto.style">
+<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="revision" mode="set.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="set.titlepage.recto.style">
+<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="revhistory" mode="set.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="set.titlepage.recto.style">
+<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="abstract" mode="set.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="set.titlepage.recto.style">
+<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template name="book.titlepage.recto">
+  <xsl:choose>
+    <xsl:when test="bookinfo/title">
+      <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/title"/>
+    </xsl:when>
+    <xsl:when test="info/title">
+      <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/title"/>
+    </xsl:when>
+    <xsl:when test="title">
+      <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="title"/>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:choose>
+    <xsl:when test="bookinfo/subtitle">
+      <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/subtitle"/>
+    </xsl:when>
+    <xsl:when test="info/subtitle">
+      <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/subtitle"/>
+    </xsl:when>
+    <xsl:when test="subtitle">
+      <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="subtitle"/>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/corpauthor"/>
+  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/corpauthor"/>
+  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/authorgroup"/>
+  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/authorgroup"/>
+  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/author"/>
+  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/author"/>
+  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/othercredit"/>
+  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/othercredit"/>
+  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/releaseinfo"/>
+  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/releaseinfo"/>
+  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/copyright"/>
+  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/copyright"/>
+  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/legalnotice"/>
+  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/legalnotice"/>
+  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/pubdate"/>
+  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/pubdate"/>
+  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/revision"/>
+  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/revision"/>
+  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/revhistory"/>
+  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/revhistory"/>
+  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/abstract"/>
+  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/abstract"/>
+</xsl:template>
+
+<xsl:template name="book.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="book.titlepage.separator"><hr/>
+</xsl:template>
+
+<xsl:template name="book.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="book.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="book.titlepage">
+  <div class="titlepage">
+    <div>
+    <xsl:call-template name="book.titlepage.before.recto"/>
+    <xsl:call-template name="book.titlepage.recto"/>
+    </div>
+    <div>
+    <xsl:call-template name="book.titlepage.before.verso"/>
+    <xsl:call-template name="book.titlepage.verso"/>
+    </div>
+    <xsl:call-template name="book.titlepage.separator"/>
+  </div>
+</xsl:template>
+
+<xsl:template match="*" mode="book.titlepage.recto.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="book.titlepage.verso.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="title" mode="book.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="book.titlepage.recto.style">
+<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="book.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="book.titlepage.recto.style">
+<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="corpauthor" mode="book.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="book.titlepage.recto.style">
+<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="authorgroup" mode="book.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="book.titlepage.recto.style">
+<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="author" mode="book.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="book.titlepage.recto.style">
+<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="othercredit" mode="book.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="book.titlepage.recto.style">
+<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="releaseinfo" mode="book.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="book.titlepage.recto.style">
+<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="copyright" mode="book.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="book.titlepage.recto.style">
+<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="legalnotice" mode="book.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="book.titlepage.recto.style">
+<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="pubdate" mode="book.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="book.titlepage.recto.style">
+<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="revision" mode="book.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="book.titlepage.recto.style">
+<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="revhistory" mode="book.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="book.titlepage.recto.style">
+<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="abstract" mode="book.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="book.titlepage.recto.style">
+<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template name="part.titlepage.recto">
+  <xsl:choose>
+    <xsl:when test="partinfo/title">
+      <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/title"/>
+    </xsl:when>
+    <xsl:when test="docinfo/title">
+      <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/title"/>
+    </xsl:when>
+    <xsl:when test="info/title">
+      <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/title"/>
+    </xsl:when>
+    <xsl:when test="title">
+      <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="title"/>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:choose>
+    <xsl:when test="partinfo/subtitle">
+      <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/subtitle"/>
+    </xsl:when>
+    <xsl:when test="docinfo/subtitle">
+      <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
+    </xsl:when>
+    <xsl:when test="info/subtitle">
+      <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/subtitle"/>
+    </xsl:when>
+    <xsl:when test="subtitle">
+      <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="subtitle"/>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/corpauthor"/>
+  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
+  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/corpauthor"/>
+  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/authorgroup"/>
+  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
+  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/authorgroup"/>
+  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/author"/>
+  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/author"/>
+  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/author"/>
+  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/othercredit"/>
+  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
+  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/othercredit"/>
+  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/releaseinfo"/>
+  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
+  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/releaseinfo"/>
+  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/copyright"/>
+  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/copyright"/>
+  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/copyright"/>
+  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/legalnotice"/>
+  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
+  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/legalnotice"/>
+  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/pubdate"/>
+  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
+  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/pubdate"/>
+  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/revision"/>
+  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/revision"/>
+  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/revision"/>
+  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/revhistory"/>
+  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
+  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/revhistory"/>
+  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/abstract"/>
+  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/abstract"/>
+  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/abstract"/>
+</xsl:template>
+
+<xsl:template name="part.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="part.titlepage.separator">
+</xsl:template>
+
+<xsl:template name="part.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="part.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="part.titlepage">
+  <div class="titlepage">
+    <div>
+    <xsl:call-template name="part.titlepage.before.recto"/>
+    <xsl:call-template name="part.titlepage.recto"/>
+    </div>
+    <div>
+    <xsl:call-template name="part.titlepage.before.verso"/>
+    <xsl:call-template name="part.titlepage.verso"/>
+    </div>
+    <xsl:call-template name="part.titlepage.separator"/>
+  </div>
+</xsl:template>
+
+<xsl:template match="*" mode="part.titlepage.recto.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="part.titlepage.verso.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="title" mode="part.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="part.titlepage.recto.style">
+<xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="part.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="part.titlepage.recto.style">
+<xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="corpauthor" mode="part.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="part.titlepage.recto.style">
+<xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="authorgroup" mode="part.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="part.titlepage.recto.style">
+<xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="author" mode="part.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="part.titlepage.recto.style">
+<xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="othercredit" mode="part.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="part.titlepage.recto.style">
+<xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="releaseinfo" mode="part.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="part.titlepage.recto.style">
+<xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="copyright" mode="part.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="part.titlepage.recto.style">
+<xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="legalnotice" mode="part.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="part.titlepage.recto.style">
+<xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="pubdate" mode="part.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="part.titlepage.recto.style">
+<xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="revision" mode="part.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="part.titlepage.recto.style">
+<xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="revhistory" mode="part.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="part.titlepage.recto.style">
+<xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="abstract" mode="part.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="part.titlepage.recto.style">
+<xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template name="partintro.titlepage.recto">
+  <xsl:choose>
+    <xsl:when test="partintroinfo/title">
+      <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/title"/>
+    </xsl:when>
+    <xsl:when test="docinfo/title">
+      <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/title"/>
+    </xsl:when>
+    <xsl:when test="info/title">
+      <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/title"/>
+    </xsl:when>
+    <xsl:when test="title">
+      <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="title"/>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:choose>
+    <xsl:when test="partintroinfo/subtitle">
+      <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/subtitle"/>
+    </xsl:when>
+    <xsl:when test="docinfo/subtitle">
+      <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
+    </xsl:when>
+    <xsl:when test="info/subtitle">
+      <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/subtitle"/>
+    </xsl:when>
+    <xsl:when test="subtitle">
+      <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="subtitle"/>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/corpauthor"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/corpauthor"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/authorgroup"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/authorgroup"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/author"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/author"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/author"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/othercredit"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/othercredit"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/releaseinfo"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/releaseinfo"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/copyright"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/copyright"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/copyright"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/legalnotice"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/legalnotice"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/pubdate"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/pubdate"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/revision"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/revision"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/revision"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/revhistory"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/revhistory"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/abstract"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/abstract"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/abstract"/>
+</xsl:template>
+
+<xsl:template name="partintro.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="partintro.titlepage.separator">
+</xsl:template>
+
+<xsl:template name="partintro.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="partintro.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="partintro.titlepage">
+  <div>
+    <div>
+    <xsl:call-template name="partintro.titlepage.before.recto"/>
+    <xsl:call-template name="partintro.titlepage.recto"/>
+    </div>
+    <div>
+    <xsl:call-template name="partintro.titlepage.before.verso"/>
+    <xsl:call-template name="partintro.titlepage.verso"/>
+    </div>
+    <xsl:call-template name="partintro.titlepage.separator"/>
+  </div>
+</xsl:template>
+
+<xsl:template match="*" mode="partintro.titlepage.recto.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="partintro.titlepage.verso.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="title" mode="partintro.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="partintro.titlepage.recto.style">
+<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="partintro.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="partintro.titlepage.recto.style">
+<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="corpauthor" mode="partintro.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="partintro.titlepage.recto.style">
+<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="authorgroup" mode="partintro.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="partintro.titlepage.recto.style">
+<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="author" mode="partintro.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="partintro.titlepage.recto.style">
+<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="othercredit" mode="partintro.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="partintro.titlepage.recto.style">
+<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="releaseinfo" mode="partintro.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="partintro.titlepage.recto.style">
+<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="copyright" mode="partintro.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="partintro.titlepage.recto.style">
+<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="legalnotice" mode="partintro.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="partintro.titlepage.recto.style">
+<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="pubdate" mode="partintro.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="partintro.titlepage.recto.style">
+<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="revision" mode="partintro.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="partintro.titlepage.recto.style">
+<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="revhistory" mode="partintro.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="partintro.titlepage.recto.style">
+<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="abstract" mode="partintro.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="partintro.titlepage.recto.style">
+<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template name="reference.titlepage.recto">
+  <xsl:choose>
+    <xsl:when test="referenceinfo/title">
+      <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/title"/>
+    </xsl:when>
+    <xsl:when test="docinfo/title">
+      <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/title"/>
+    </xsl:when>
+    <xsl:when test="info/title">
+      <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/title"/>
+    </xsl:when>
+    <xsl:when test="title">
+      <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="title"/>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:choose>
+    <xsl:when test="referenceinfo/subtitle">
+      <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/subtitle"/>
+    </xsl:when>
+    <xsl:when test="docinfo/subtitle">
+      <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
+    </xsl:when>
+    <xsl:when test="info/subtitle">
+      <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/subtitle"/>
+    </xsl:when>
+    <xsl:when test="subtitle">
+      <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="subtitle"/>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/corpauthor"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/corpauthor"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/authorgroup"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/authorgroup"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/author"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/author"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/author"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/othercredit"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/othercredit"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/releaseinfo"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/releaseinfo"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/copyright"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/copyright"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/copyright"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/legalnotice"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/legalnotice"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/pubdate"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/pubdate"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/revision"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/revision"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/revision"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/revhistory"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/revhistory"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/abstract"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/abstract"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/abstract"/>
+</xsl:template>
+
+<xsl:template name="reference.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="reference.titlepage.separator"><hr/>
+</xsl:template>
+
+<xsl:template name="reference.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="reference.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="reference.titlepage">
+  <div class="titlepage">
+    <div>
+    <xsl:call-template name="reference.titlepage.before.recto"/>
+    <xsl:call-template name="reference.titlepage.recto"/>
+    </div>
+    <div>
+    <xsl:call-template name="reference.titlepage.before.verso"/>
+    <xsl:call-template name="reference.titlepage.verso"/>
+    </div>
+    <xsl:call-template name="reference.titlepage.separator"/>
+  </div>
+</xsl:template>
+
+<xsl:template match="*" mode="reference.titlepage.recto.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="reference.titlepage.verso.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="title" mode="reference.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="reference.titlepage.recto.style">
+<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="reference.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="reference.titlepage.recto.style">
+<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="corpauthor" mode="reference.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="reference.titlepage.recto.style">
+<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="authorgroup" mode="reference.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="reference.titlepage.recto.style">
+<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="author" mode="reference.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="reference.titlepage.recto.style">
+<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="othercredit" mode="reference.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="reference.titlepage.recto.style">
+<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="releaseinfo" mode="reference.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="reference.titlepage.recto.style">
+<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="copyright" mode="reference.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="reference.titlepage.recto.style">
+<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="legalnotice" mode="reference.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="reference.titlepage.recto.style">
+<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="pubdate" mode="reference.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="reference.titlepage.recto.style">
+<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="revision" mode="reference.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="reference.titlepage.recto.style">
+<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="revhistory" mode="reference.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="reference.titlepage.recto.style">
+<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="abstract" mode="reference.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="reference.titlepage.recto.style">
+<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template name="refentry.titlepage.recto">
+</xsl:template>
+
+<xsl:template name="refentry.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="refentry.titlepage.separator">
+</xsl:template>
+
+<xsl:template name="refentry.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="refentry.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="refentry.titlepage">
+  <div class="titlepage">
+    <div>
+    <xsl:call-template name="refentry.titlepage.before.recto"/>
+    <xsl:call-template name="refentry.titlepage.recto"/>
+    </div>
+    <div>
+    <xsl:call-template name="refentry.titlepage.before.verso"/>
+    <xsl:call-template name="refentry.titlepage.verso"/>
+    </div>
+    <xsl:call-template name="refentry.titlepage.separator"/>
+  </div>
+</xsl:template>
+
+<xsl:template match="*" mode="refentry.titlepage.recto.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="refentry.titlepage.verso.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template name="dedication.titlepage.recto">
+  <div xsl:use-attribute-sets="dedication.titlepage.recto.style">
+<xsl:call-template name="component.title">
+<xsl:with-param name="node" select="ancestor-or-self::dedication[1]"/>
+</xsl:call-template></div>
+  <xsl:choose>
+    <xsl:when test="dedicationinfo/subtitle">
+      <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="dedicationinfo/subtitle"/>
+    </xsl:when>
+    <xsl:when test="docinfo/subtitle">
+      <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
+    </xsl:when>
+    <xsl:when test="info/subtitle">
+      <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="info/subtitle"/>
+    </xsl:when>
+    <xsl:when test="subtitle">
+      <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="subtitle"/>
+    </xsl:when>
+  </xsl:choose>
+
+</xsl:template>
+
+<xsl:template name="dedication.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="dedication.titlepage.separator">
+</xsl:template>
+
+<xsl:template name="dedication.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="dedication.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="dedication.titlepage">
+  <div class="titlepage">
+    <div>
+    <xsl:call-template name="dedication.titlepage.before.recto"/>
+    <xsl:call-template name="dedication.titlepage.recto"/>
+    </div>
+    <div>
+    <xsl:call-template name="dedication.titlepage.before.verso"/>
+    <xsl:call-template name="dedication.titlepage.verso"/>
+    </div>
+    <xsl:call-template name="dedication.titlepage.separator"/>
+  </div>
+</xsl:template>
+
+<xsl:template match="*" mode="dedication.titlepage.recto.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="dedication.titlepage.verso.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="dedication.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="dedication.titlepage.recto.style">
+<xsl:apply-templates select="." mode="dedication.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template name="preface.titlepage.recto">
+  <xsl:choose>
+    <xsl:when test="prefaceinfo/title">
+      <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/title"/>
+    </xsl:when>
+    <xsl:when test="docinfo/title">
+      <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/title"/>
+    </xsl:when>
+    <xsl:when test="info/title">
+      <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/title"/>
+    </xsl:when>
+    <xsl:when test="title">
+      <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="title"/>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:choose>
+    <xsl:when test="prefaceinfo/subtitle">
+      <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/subtitle"/>
+    </xsl:when>
+    <xsl:when test="docinfo/subtitle">
+      <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
+    </xsl:when>
+    <xsl:when test="info/subtitle">
+      <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/subtitle"/>
+    </xsl:when>
+    <xsl:when test="subtitle">
+      <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="subtitle"/>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/corpauthor"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/corpauthor"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/authorgroup"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/authorgroup"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/author"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/author"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/author"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/othercredit"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/othercredit"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/releaseinfo"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/releaseinfo"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/copyright"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/copyright"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/copyright"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/legalnotice"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/legalnotice"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/pubdate"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/pubdate"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/revision"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/revision"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/revision"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/revhistory"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/revhistory"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/abstract"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/abstract"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/abstract"/>
+</xsl:template>
+
+<xsl:template name="preface.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="preface.titlepage.separator">
+</xsl:template>
+
+<xsl:template name="preface.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="preface.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="preface.titlepage">
+  <div class="titlepage">
+    <div>
+    <xsl:call-template name="preface.titlepage.before.recto"/>
+    <xsl:call-template name="preface.titlepage.recto"/>
+    </div>
+    <div>
+    <xsl:call-template name="preface.titlepage.before.verso"/>
+    <xsl:call-template name="preface.titlepage.verso"/>
+    </div>
+    <xsl:call-template name="preface.titlepage.separator"/>
+  </div>
+</xsl:template>
+
+<xsl:template match="*" mode="preface.titlepage.recto.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="preface.titlepage.verso.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="title" mode="preface.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="preface.titlepage.recto.style">
+<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="preface.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="preface.titlepage.recto.style">
+<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="corpauthor" mode="preface.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="preface.titlepage.recto.style">
+<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="authorgroup" mode="preface.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="preface.titlepage.recto.style">
+<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="author" mode="preface.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="preface.titlepage.recto.style">
+<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="othercredit" mode="preface.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="preface.titlepage.recto.style">
+<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="releaseinfo" mode="preface.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="preface.titlepage.recto.style">
+<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="copyright" mode="preface.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="preface.titlepage.recto.style">
+<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="legalnotice" mode="preface.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="preface.titlepage.recto.style">
+<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="pubdate" mode="preface.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="preface.titlepage.recto.style">
+<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="revision" mode="preface.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="preface.titlepage.recto.style">
+<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="revhistory" mode="preface.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="preface.titlepage.recto.style">
+<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="abstract" mode="preface.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="preface.titlepage.recto.style">
+<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template name="chapter.titlepage.recto">
+  <xsl:choose>
+    <xsl:when test="chapterinfo/title">
+      <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/title"/>
+    </xsl:when>
+    <xsl:when test="docinfo/title">
+      <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/title"/>
+    </xsl:when>
+    <xsl:when test="info/title">
+      <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/title"/>
+    </xsl:when>
+    <xsl:when test="title">
+      <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="title"/>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:choose>
+    <xsl:when test="chapterinfo/subtitle">
+      <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/subtitle"/>
+    </xsl:when>
+    <xsl:when test="docinfo/subtitle">
+      <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
+    </xsl:when>
+    <xsl:when test="info/subtitle">
+      <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/subtitle"/>
+    </xsl:when>
+    <xsl:when test="subtitle">
+      <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="subtitle"/>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/corpauthor"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/corpauthor"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/authorgroup"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/authorgroup"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/author"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/author"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/author"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/othercredit"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/othercredit"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/releaseinfo"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/releaseinfo"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/copyright"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/copyright"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/copyright"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/legalnotice"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/legalnotice"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/pubdate"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/pubdate"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/revision"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/revision"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/revision"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/revhistory"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/revhistory"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/abstract"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/abstract"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/abstract"/>
+</xsl:template>
+
+<xsl:template name="chapter.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="chapter.titlepage.separator">
+</xsl:template>
+
+<xsl:template name="chapter.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="chapter.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="chapter.titlepage">
+  <div class="titlepage">
+    <div>
+    <xsl:call-template name="chapter.titlepage.before.recto"/>
+    <xsl:call-template name="chapter.titlepage.recto"/>
+    </div>
+    <div>
+    <xsl:call-template name="chapter.titlepage.before.verso"/>
+    <xsl:call-template name="chapter.titlepage.verso"/>
+    </div>
+    <xsl:call-template name="chapter.titlepage.separator"/>
+  </div>
+</xsl:template>
+
+<xsl:template match="*" mode="chapter.titlepage.recto.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="chapter.titlepage.verso.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="title" mode="chapter.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="chapter.titlepage.recto.style">
+<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="chapter.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="chapter.titlepage.recto.style">
+<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="corpauthor" mode="chapter.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="chapter.titlepage.recto.style">
+<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="authorgroup" mode="chapter.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="chapter.titlepage.recto.style">
+<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="author" mode="chapter.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="chapter.titlepage.recto.style">
+<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="othercredit" mode="chapter.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="chapter.titlepage.recto.style">
+<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="releaseinfo" mode="chapter.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="chapter.titlepage.recto.style">
+<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="copyright" mode="chapter.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="chapter.titlepage.recto.style">
+<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="legalnotice" mode="chapter.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="chapter.titlepage.recto.style">
+<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="pubdate" mode="chapter.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="chapter.titlepage.recto.style">
+<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="revision" mode="chapter.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="chapter.titlepage.recto.style">
+<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="revhistory" mode="chapter.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="chapter.titlepage.recto.style">
+<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="abstract" mode="chapter.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="chapter.titlepage.recto.style">
+<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template name="appendix.titlepage.recto">
+  <xsl:choose>
+    <xsl:when test="appendixinfo/title">
+      <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/title"/>
+    </xsl:when>
+    <xsl:when test="docinfo/title">
+      <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/title"/>
+    </xsl:when>
+    <xsl:when test="info/title">
+      <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/title"/>
+    </xsl:when>
+    <xsl:when test="title">
+      <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="title"/>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:choose>
+    <xsl:when test="appendixinfo/subtitle">
+      <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/subtitle"/>
+    </xsl:when>
+    <xsl:when test="docinfo/subtitle">
+      <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
+    </xsl:when>
+    <xsl:when test="info/subtitle">
+      <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/subtitle"/>
+    </xsl:when>
+    <xsl:when test="subtitle">
+      <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="subtitle"/>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/corpauthor"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/corpauthor"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/authorgroup"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/authorgroup"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/author"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/author"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/author"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/othercredit"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/othercredit"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/releaseinfo"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/releaseinfo"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/copyright"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/copyright"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/copyright"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/legalnotice"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/legalnotice"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/pubdate"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/pubdate"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/revision"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/revision"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/revision"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/revhistory"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/revhistory"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/abstract"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/abstract"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/abstract"/>
+</xsl:template>
+
+<xsl:template name="appendix.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="appendix.titlepage.separator">
+</xsl:template>
+
+<xsl:template name="appendix.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="appendix.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="appendix.titlepage">
+  <div class="titlepage">
+    <div>
+    <xsl:call-template name="appendix.titlepage.before.recto"/>
+    <xsl:call-template name="appendix.titlepage.recto"/>
+    </div>
+    <div>
+    <xsl:call-template name="appendix.titlepage.before.verso"/>
+    <xsl:call-template name="appendix.titlepage.verso"/>
+    </div>
+    <xsl:call-template name="appendix.titlepage.separator"/>
+  </div>
+</xsl:template>
+
+<xsl:template match="*" mode="appendix.titlepage.recto.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="appendix.titlepage.verso.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="title" mode="appendix.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="appendix.titlepage.recto.style">
+<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="appendix.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="appendix.titlepage.recto.style">
+<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="corpauthor" mode="appendix.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="appendix.titlepage.recto.style">
+<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="authorgroup" mode="appendix.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="appendix.titlepage.recto.style">
+<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="author" mode="appendix.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="appendix.titlepage.recto.style">
+<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="othercredit" mode="appendix.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="appendix.titlepage.recto.style">
+<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="releaseinfo" mode="appendix.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="appendix.titlepage.recto.style">
+<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="copyright" mode="appendix.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="appendix.titlepage.recto.style">
+<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="legalnotice" mode="appendix.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="appendix.titlepage.recto.style">
+<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="pubdate" mode="appendix.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="appendix.titlepage.recto.style">
+<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="revision" mode="appendix.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="appendix.titlepage.recto.style">
+<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="revhistory" mode="appendix.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="appendix.titlepage.recto.style">
+<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="abstract" mode="appendix.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="appendix.titlepage.recto.style">
+<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template name="section.titlepage.recto">
+  <xsl:choose>
+    <xsl:when test="sectioninfo/title">
+      <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/title"/>
+    </xsl:when>
+    <xsl:when test="info/title">
+      <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/title"/>
+    </xsl:when>
+    <xsl:when test="title">
+      <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="title"/>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:choose>
+    <xsl:when test="sectioninfo/subtitle">
+      <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/subtitle"/>
+    </xsl:when>
+    <xsl:when test="info/subtitle">
+      <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/subtitle"/>
+    </xsl:when>
+    <xsl:when test="subtitle">
+      <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="subtitle"/>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/corpauthor"/>
+  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/corpauthor"/>
+  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/authorgroup"/>
+  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/authorgroup"/>
+  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/author"/>
+  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/author"/>
+  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/othercredit"/>
+  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/othercredit"/>
+  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/releaseinfo"/>
+  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/releaseinfo"/>
+  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/copyright"/>
+  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/copyright"/>
+  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/legalnotice"/>
+  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/legalnotice"/>
+  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/pubdate"/>
+  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/pubdate"/>
+  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/revision"/>
+  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/revision"/>
+  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/revhistory"/>
+  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/revhistory"/>
+  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/abstract"/>
+  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/abstract"/>
+</xsl:template>
+
+<xsl:template name="section.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="section.titlepage.separator"><xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
+</xsl:template>
+
+<xsl:template name="section.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="section.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="section.titlepage">
+  <div class="titlepage">
+    <div>
+    <xsl:call-template name="section.titlepage.before.recto"/>
+    <xsl:call-template name="section.titlepage.recto"/>
+    </div>
+    <div>
+    <xsl:call-template name="section.titlepage.before.verso"/>
+    <xsl:call-template name="section.titlepage.verso"/>
+    </div>
+    <xsl:call-template name="section.titlepage.separator"/>
+  </div>
+</xsl:template>
+
+<xsl:template match="*" mode="section.titlepage.recto.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="section.titlepage.verso.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="title" mode="section.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="section.titlepage.recto.style">
+<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="section.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="section.titlepage.recto.style">
+<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="corpauthor" mode="section.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="section.titlepage.recto.style">
+<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="authorgroup" mode="section.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="section.titlepage.recto.style">
+<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="author" mode="section.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="section.titlepage.recto.style">
+<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="othercredit" mode="section.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="section.titlepage.recto.style">
+<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="releaseinfo" mode="section.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="section.titlepage.recto.style">
+<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="copyright" mode="section.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="section.titlepage.recto.style">
+<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="legalnotice" mode="section.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="section.titlepage.recto.style">
+<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="pubdate" mode="section.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="section.titlepage.recto.style">
+<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="revision" mode="section.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="section.titlepage.recto.style">
+<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="revhistory" mode="section.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="section.titlepage.recto.style">
+<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="abstract" mode="section.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="section.titlepage.recto.style">
+<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template name="sect1.titlepage.recto">
+  <xsl:choose>
+    <xsl:when test="sect1info/title">
+      <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/title"/>
+    </xsl:when>
+    <xsl:when test="info/title">
+      <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/title"/>
+    </xsl:when>
+    <xsl:when test="title">
+      <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="title"/>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:choose>
+    <xsl:when test="sect1info/subtitle">
+      <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/subtitle"/>
+    </xsl:when>
+    <xsl:when test="info/subtitle">
+      <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/subtitle"/>
+    </xsl:when>
+    <xsl:when test="subtitle">
+      <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="subtitle"/>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/corpauthor"/>
+  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/corpauthor"/>
+  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/authorgroup"/>
+  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/authorgroup"/>
+  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/author"/>
+  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/author"/>
+  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/othercredit"/>
+  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/othercredit"/>
+  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/releaseinfo"/>
+  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/releaseinfo"/>
+  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/copyright"/>
+  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/copyright"/>
+  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/legalnotice"/>
+  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/legalnotice"/>
+  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/pubdate"/>
+  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/pubdate"/>
+  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/revision"/>
+  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/revision"/>
+  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/revhistory"/>
+  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/revhistory"/>
+  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/abstract"/>
+  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/abstract"/>
+</xsl:template>
+
+<xsl:template name="sect1.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="sect1.titlepage.separator"><xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
+</xsl:template>
+
+<xsl:template name="sect1.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="sect1.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="sect1.titlepage">
+  <div class="titlepage">
+    <div>
+    <xsl:call-template name="sect1.titlepage.before.recto"/>
+    <xsl:call-template name="sect1.titlepage.recto"/>
+    </div>
+    <div>
+    <xsl:call-template name="sect1.titlepage.before.verso"/>
+    <xsl:call-template name="sect1.titlepage.verso"/>
+    </div>
+    <xsl:call-template name="sect1.titlepage.separator"/>
+  </div>
+</xsl:template>
+
+<xsl:template match="*" mode="sect1.titlepage.recto.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="sect1.titlepage.verso.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="title" mode="sect1.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect1.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="sect1.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect1.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="corpauthor" mode="sect1.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect1.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="authorgroup" mode="sect1.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect1.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="author" mode="sect1.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect1.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="othercredit" mode="sect1.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect1.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="releaseinfo" mode="sect1.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect1.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="copyright" mode="sect1.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect1.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="legalnotice" mode="sect1.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect1.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="pubdate" mode="sect1.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect1.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="revision" mode="sect1.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect1.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="revhistory" mode="sect1.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect1.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="abstract" mode="sect1.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect1.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template name="sect2.titlepage.recto">
+  <xsl:choose>
+    <xsl:when test="sect2info/title">
+      <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/title"/>
+    </xsl:when>
+    <xsl:when test="info/title">
+      <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/title"/>
+    </xsl:when>
+    <xsl:when test="title">
+      <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="title"/>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:choose>
+    <xsl:when test="sect2info/subtitle">
+      <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/subtitle"/>
+    </xsl:when>
+    <xsl:when test="info/subtitle">
+      <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/subtitle"/>
+    </xsl:when>
+    <xsl:when test="subtitle">
+      <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="subtitle"/>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/corpauthor"/>
+  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/corpauthor"/>
+  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/authorgroup"/>
+  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/authorgroup"/>
+  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/author"/>
+  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/author"/>
+  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/othercredit"/>
+  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/othercredit"/>
+  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/releaseinfo"/>
+  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/releaseinfo"/>
+  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/copyright"/>
+  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/copyright"/>
+  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/legalnotice"/>
+  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/legalnotice"/>
+  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/pubdate"/>
+  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/pubdate"/>
+  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/revision"/>
+  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/revision"/>
+  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/revhistory"/>
+  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/revhistory"/>
+  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/abstract"/>
+  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/abstract"/>
+</xsl:template>
+
+<xsl:template name="sect2.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="sect2.titlepage.separator"><xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
+</xsl:template>
+
+<xsl:template name="sect2.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="sect2.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="sect2.titlepage">
+  <div class="titlepage">
+    <div>
+    <xsl:call-template name="sect2.titlepage.before.recto"/>
+    <xsl:call-template name="sect2.titlepage.recto"/>
+    </div>
+    <div>
+    <xsl:call-template name="sect2.titlepage.before.verso"/>
+    <xsl:call-template name="sect2.titlepage.verso"/>
+    </div>
+    <xsl:call-template name="sect2.titlepage.separator"/>
+  </div>
+</xsl:template>
+
+<xsl:template match="*" mode="sect2.titlepage.recto.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="sect2.titlepage.verso.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="title" mode="sect2.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect2.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="sect2.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect2.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="corpauthor" mode="sect2.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect2.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="authorgroup" mode="sect2.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect2.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="author" mode="sect2.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect2.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="othercredit" mode="sect2.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect2.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="releaseinfo" mode="sect2.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect2.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="copyright" mode="sect2.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect2.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="legalnotice" mode="sect2.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect2.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="pubdate" mode="sect2.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect2.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="revision" mode="sect2.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect2.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="revhistory" mode="sect2.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect2.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="abstract" mode="sect2.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect2.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template name="sect3.titlepage.recto">
+  <xsl:choose>
+    <xsl:when test="sect3info/title">
+      <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/title"/>
+    </xsl:when>
+    <xsl:when test="info/title">
+      <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/title"/>
+    </xsl:when>
+    <xsl:when test="title">
+      <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="title"/>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:choose>
+    <xsl:when test="sect3info/subtitle">
+      <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/subtitle"/>
+    </xsl:when>
+    <xsl:when test="info/subtitle">
+      <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/subtitle"/>
+    </xsl:when>
+    <xsl:when test="subtitle">
+      <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="subtitle"/>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/corpauthor"/>
+  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/corpauthor"/>
+  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/authorgroup"/>
+  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/authorgroup"/>
+  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/author"/>
+  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/author"/>
+  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/othercredit"/>
+  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/othercredit"/>
+  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/releaseinfo"/>
+  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/releaseinfo"/>
+  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/copyright"/>
+  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/copyright"/>
+  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/legalnotice"/>
+  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/legalnotice"/>
+  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/pubdate"/>
+  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/pubdate"/>
+  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/revision"/>
+  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/revision"/>
+  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/revhistory"/>
+  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/revhistory"/>
+  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/abstract"/>
+  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/abstract"/>
+</xsl:template>
+
+<xsl:template name="sect3.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="sect3.titlepage.separator"><xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
+</xsl:template>
+
+<xsl:template name="sect3.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="sect3.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="sect3.titlepage">
+  <div class="titlepage">
+    <div>
+    <xsl:call-template name="sect3.titlepage.before.recto"/>
+    <xsl:call-template name="sect3.titlepage.recto"/>
+    </div>
+    <div>
+    <xsl:call-template name="sect3.titlepage.before.verso"/>
+    <xsl:call-template name="sect3.titlepage.verso"/>
+    </div>
+    <xsl:call-template name="sect3.titlepage.separator"/>
+  </div>
+</xsl:template>
+
+<xsl:template match="*" mode="sect3.titlepage.recto.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="sect3.titlepage.verso.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="title" mode="sect3.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect3.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="sect3.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect3.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="corpauthor" mode="sect3.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect3.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="authorgroup" mode="sect3.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect3.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="author" mode="sect3.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect3.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="othercredit" mode="sect3.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect3.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="releaseinfo" mode="sect3.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect3.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="copyright" mode="sect3.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect3.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="legalnotice" mode="sect3.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect3.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="pubdate" mode="sect3.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect3.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="revision" mode="sect3.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect3.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="revhistory" mode="sect3.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect3.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="abstract" mode="sect3.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect3.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template name="sect4.titlepage.recto">
+  <xsl:choose>
+    <xsl:when test="sect4info/title">
+      <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/title"/>
+    </xsl:when>
+    <xsl:when test="info/title">
+      <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/title"/>
+    </xsl:when>
+    <xsl:when test="title">
+      <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="title"/>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:choose>
+    <xsl:when test="sect4info/subtitle">
+      <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/subtitle"/>
+    </xsl:when>
+    <xsl:when test="info/subtitle">
+      <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/subtitle"/>
+    </xsl:when>
+    <xsl:when test="subtitle">
+      <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="subtitle"/>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/corpauthor"/>
+  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/corpauthor"/>
+  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/authorgroup"/>
+  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/authorgroup"/>
+  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/author"/>
+  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/author"/>
+  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/othercredit"/>
+  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/othercredit"/>
+  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/releaseinfo"/>
+  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/releaseinfo"/>
+  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/copyright"/>
+  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/copyright"/>
+  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/legalnotice"/>
+  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/legalnotice"/>
+  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/pubdate"/>
+  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/pubdate"/>
+  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/revision"/>
+  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/revision"/>
+  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/revhistory"/>
+  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/revhistory"/>
+  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/abstract"/>
+  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/abstract"/>
+</xsl:template>
+
+<xsl:template name="sect4.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="sect4.titlepage.separator"><xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
+</xsl:template>
+
+<xsl:template name="sect4.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="sect4.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="sect4.titlepage">
+  <div class="titlepage">
+    <div>
+    <xsl:call-template name="sect4.titlepage.before.recto"/>
+    <xsl:call-template name="sect4.titlepage.recto"/>
+    </div>
+    <div>
+    <xsl:call-template name="sect4.titlepage.before.verso"/>
+    <xsl:call-template name="sect4.titlepage.verso"/>
+    </div>
+    <xsl:call-template name="sect4.titlepage.separator"/>
+  </div>
+</xsl:template>
+
+<xsl:template match="*" mode="sect4.titlepage.recto.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="sect4.titlepage.verso.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="title" mode="sect4.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect4.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="sect4.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect4.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="corpauthor" mode="sect4.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect4.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="authorgroup" mode="sect4.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect4.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="author" mode="sect4.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect4.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="othercredit" mode="sect4.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect4.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="releaseinfo" mode="sect4.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect4.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="copyright" mode="sect4.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect4.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="legalnotice" mode="sect4.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect4.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="pubdate" mode="sect4.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect4.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="revision" mode="sect4.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect4.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="revhistory" mode="sect4.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect4.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="abstract" mode="sect4.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect4.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template name="sect5.titlepage.recto">
+  <xsl:choose>
+    <xsl:when test="sect5info/title">
+      <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/title"/>
+    </xsl:when>
+    <xsl:when test="info/title">
+      <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/title"/>
+    </xsl:when>
+    <xsl:when test="title">
+      <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="title"/>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:choose>
+    <xsl:when test="sect5info/subtitle">
+      <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/subtitle"/>
+    </xsl:when>
+    <xsl:when test="info/subtitle">
+      <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/subtitle"/>
+    </xsl:when>
+    <xsl:when test="subtitle">
+      <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="subtitle"/>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/corpauthor"/>
+  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/corpauthor"/>
+  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/authorgroup"/>
+  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/authorgroup"/>
+  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/author"/>
+  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/author"/>
+  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/othercredit"/>
+  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/othercredit"/>
+  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/releaseinfo"/>
+  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/releaseinfo"/>
+  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/copyright"/>
+  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/copyright"/>
+  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/legalnotice"/>
+  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/legalnotice"/>
+  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/pubdate"/>
+  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/pubdate"/>
+  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/revision"/>
+  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/revision"/>
+  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/revhistory"/>
+  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/revhistory"/>
+  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/abstract"/>
+  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/abstract"/>
+</xsl:template>
+
+<xsl:template name="sect5.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="sect5.titlepage.separator"><xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
+</xsl:template>
+
+<xsl:template name="sect5.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="sect5.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="sect5.titlepage">
+  <div class="titlepage">
+    <div>
+    <xsl:call-template name="sect5.titlepage.before.recto"/>
+    <xsl:call-template name="sect5.titlepage.recto"/>
+    </div>
+    <div>
+    <xsl:call-template name="sect5.titlepage.before.verso"/>
+    <xsl:call-template name="sect5.titlepage.verso"/>
+    </div>
+    <xsl:call-template name="sect5.titlepage.separator"/>
+  </div>
+</xsl:template>
+
+<xsl:template match="*" mode="sect5.titlepage.recto.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="sect5.titlepage.verso.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="title" mode="sect5.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect5.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="sect5.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect5.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="corpauthor" mode="sect5.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect5.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="authorgroup" mode="sect5.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect5.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="author" mode="sect5.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect5.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="othercredit" mode="sect5.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect5.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="releaseinfo" mode="sect5.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect5.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="copyright" mode="sect5.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect5.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="legalnotice" mode="sect5.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect5.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="pubdate" mode="sect5.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect5.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="revision" mode="sect5.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect5.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="revhistory" mode="sect5.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect5.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="abstract" mode="sect5.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect5.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template name="simplesect.titlepage.recto">
+  <xsl:choose>
+    <xsl:when test="simplesectinfo/title">
+      <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/title"/>
+    </xsl:when>
+    <xsl:when test="docinfo/title">
+      <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/title"/>
+    </xsl:when>
+    <xsl:when test="info/title">
+      <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/title"/>
+    </xsl:when>
+    <xsl:when test="title">
+      <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="title"/>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:choose>
+    <xsl:when test="simplesectinfo/subtitle">
+      <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/subtitle"/>
+    </xsl:when>
+    <xsl:when test="docinfo/subtitle">
+      <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
+    </xsl:when>
+    <xsl:when test="info/subtitle">
+      <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/subtitle"/>
+    </xsl:when>
+    <xsl:when test="subtitle">
+      <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="subtitle"/>
+    </xsl:when>
+  </xsl:choose>
+
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/corpauthor"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/corpauthor"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/authorgroup"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/authorgroup"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/author"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/author"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/author"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/othercredit"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/othercredit"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/releaseinfo"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/releaseinfo"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/copyright"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/copyright"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/copyright"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/legalnotice"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/legalnotice"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/pubdate"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/pubdate"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/revision"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/revision"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/revision"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/revhistory"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/revhistory"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/abstract"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/abstract"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/abstract"/>
+</xsl:template>
+
+<xsl:template name="simplesect.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="simplesect.titlepage.separator"><xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
+</xsl:template>
+
+<xsl:template name="simplesect.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="simplesect.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="simplesect.titlepage">
+  <div class="titlepage">
+    <div>
+    <xsl:call-template name="simplesect.titlepage.before.recto"/>
+    <xsl:call-template name="simplesect.titlepage.recto"/>
+    </div>
+    <div>
+    <xsl:call-template name="simplesect.titlepage.before.verso"/>
+    <xsl:call-template name="simplesect.titlepage.verso"/>
+    </div>
+    <xsl:call-template name="simplesect.titlepage.separator"/>
+  </div>
+</xsl:template>
+
+<xsl:template match="*" mode="simplesect.titlepage.recto.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="simplesect.titlepage.verso.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="title" mode="simplesect.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
+<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="simplesect.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
+<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="corpauthor" mode="simplesect.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
+<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="authorgroup" mode="simplesect.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
+<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="author" mode="simplesect.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
+<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="othercredit" mode="simplesect.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
+<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="releaseinfo" mode="simplesect.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
+<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="copyright" mode="simplesect.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
+<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="legalnotice" mode="simplesect.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
+<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="pubdate" mode="simplesect.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
+<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="revision" mode="simplesect.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
+<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="revhistory" mode="simplesect.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
+<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="abstract" mode="simplesect.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
+<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template name="bibliography.titlepage.recto">
+  <div xsl:use-attribute-sets="bibliography.titlepage.recto.style">
+<xsl:call-template name="component.title">
+<xsl:with-param name="node" select="ancestor-or-self::bibliography[1]"/>
+</xsl:call-template></div>
+  <xsl:choose>
+    <xsl:when test="bibliographyinfo/subtitle">
+      <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="bibliographyinfo/subtitle"/>
+    </xsl:when>
+    <xsl:when test="docinfo/subtitle">
+      <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
+    </xsl:when>
+    <xsl:when test="info/subtitle">
+      <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="info/subtitle"/>
+    </xsl:when>
+    <xsl:when test="subtitle">
+      <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="subtitle"/>
+    </xsl:when>
+  </xsl:choose>
+
+</xsl:template>
+
+<xsl:template name="bibliography.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="bibliography.titlepage.separator">
+</xsl:template>
+
+<xsl:template name="bibliography.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="bibliography.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="bibliography.titlepage">
+  <div class="titlepage">
+    <div>
+    <xsl:call-template name="bibliography.titlepage.before.recto"/>
+    <xsl:call-template name="bibliography.titlepage.recto"/>
+    </div>
+    <div>
+    <xsl:call-template name="bibliography.titlepage.before.verso"/>
+    <xsl:call-template name="bibliography.titlepage.verso"/>
+    </div>
+    <xsl:call-template name="bibliography.titlepage.separator"/>
+  </div>
+</xsl:template>
+
+<xsl:template match="*" mode="bibliography.titlepage.recto.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="bibliography.titlepage.verso.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="bibliography.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="bibliography.titlepage.recto.style">
+<xsl:apply-templates select="." mode="bibliography.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template name="glossary.titlepage.recto">
+  <div xsl:use-attribute-sets="glossary.titlepage.recto.style">
+<xsl:call-template name="component.title">
+<xsl:with-param name="node" select="ancestor-or-self::glossary[1]"/>
+</xsl:call-template></div>
+  <xsl:choose>
+    <xsl:when test="glossaryinfo/subtitle">
+      <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="glossaryinfo/subtitle"/>
+    </xsl:when>
+    <xsl:when test="docinfo/subtitle">
+      <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
+    </xsl:when>
+    <xsl:when test="info/subtitle">
+      <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="info/subtitle"/>
+    </xsl:when>
+    <xsl:when test="subtitle">
+      <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="subtitle"/>
+    </xsl:when>
+  </xsl:choose>
+
+</xsl:template>
+
+<xsl:template name="glossary.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="glossary.titlepage.separator">
+</xsl:template>
+
+<xsl:template name="glossary.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="glossary.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="glossary.titlepage">
+  <div class="titlepage">
+    <div>
+    <xsl:call-template name="glossary.titlepage.before.recto"/>
+    <xsl:call-template name="glossary.titlepage.recto"/>
+    </div>
+    <div>
+    <xsl:call-template name="glossary.titlepage.before.verso"/>
+    <xsl:call-template name="glossary.titlepage.verso"/>
+    </div>
+    <xsl:call-template name="glossary.titlepage.separator"/>
+  </div>
+</xsl:template>
+
+<xsl:template match="*" mode="glossary.titlepage.recto.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="glossary.titlepage.verso.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="glossary.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="glossary.titlepage.recto.style">
+<xsl:apply-templates select="." mode="glossary.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template name="index.titlepage.recto">
+  <div xsl:use-attribute-sets="index.titlepage.recto.style">
+<xsl:call-template name="component.title">
+<xsl:with-param name="node" select="ancestor-or-self::index[1]"/>
+</xsl:call-template></div>
+  <xsl:choose>
+    <xsl:when test="indexinfo/subtitle">
+      <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="indexinfo/subtitle"/>
+    </xsl:when>
+    <xsl:when test="docinfo/subtitle">
+      <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
+    </xsl:when>
+    <xsl:when test="info/subtitle">
+      <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="info/subtitle"/>
+    </xsl:when>
+    <xsl:when test="subtitle">
+      <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="subtitle"/>
+    </xsl:when>
+  </xsl:choose>
+
+</xsl:template>
+
+<xsl:template name="index.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="index.titlepage.separator">
+</xsl:template>
+
+<xsl:template name="index.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="index.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="index.titlepage">
+  <div class="titlepage">
+    <div>
+    <xsl:call-template name="index.titlepage.before.recto"/>
+    <xsl:call-template name="index.titlepage.recto"/>
+    </div>
+    <div>
+    <xsl:call-template name="index.titlepage.before.verso"/>
+    <xsl:call-template name="index.titlepage.verso"/>
+    </div>
+    <xsl:call-template name="index.titlepage.separator"/>
+  </div>
+</xsl:template>
+
+<xsl:template match="*" mode="index.titlepage.recto.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="index.titlepage.verso.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="index.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="index.titlepage.recto.style">
+<xsl:apply-templates select="." mode="index.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template name="setindex.titlepage.recto">
+  <div xsl:use-attribute-sets="setindex.titlepage.recto.style">
+<xsl:call-template name="component.title">
+<xsl:with-param name="node" select="ancestor-or-self::setindex[1]"/>
+</xsl:call-template></div>
+  <xsl:choose>
+    <xsl:when test="setindexinfo/subtitle">
+      <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="setindexinfo/subtitle"/>
+    </xsl:when>
+    <xsl:when test="docinfo/subtitle">
+      <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
+    </xsl:when>
+    <xsl:when test="info/subtitle">
+      <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="info/subtitle"/>
+    </xsl:when>
+    <xsl:when test="subtitle">
+      <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="subtitle"/>
+    </xsl:when>
+  </xsl:choose>
+
+</xsl:template>
+
+<xsl:template name="setindex.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="setindex.titlepage.separator">
+</xsl:template>
+
+<xsl:template name="setindex.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="setindex.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="setindex.titlepage">
+  <div class="titlepage">
+    <div>
+    <xsl:call-template name="setindex.titlepage.before.recto"/>
+    <xsl:call-template name="setindex.titlepage.recto"/>
+    </div>
+    <div>
+    <xsl:call-template name="setindex.titlepage.before.verso"/>
+    <xsl:call-template name="setindex.titlepage.verso"/>
+    </div>
+    <xsl:call-template name="setindex.titlepage.separator"/>
+  </div>
+</xsl:template>
+
+<xsl:template match="*" mode="setindex.titlepage.recto.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="setindex.titlepage.verso.mode">
+  <!-- if an element isn't found in this mode, -->
+  <!-- try the generic titlepage.mode -->
+  <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="setindex.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="setindex.titlepage.recto.style">
+<xsl:apply-templates select="." mode="setindex.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/titlepage.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/titlepage.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/titlepage.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,792 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: titlepage.xsl,v 1.1.1.1 2004/10/19 21:21:48 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:attribute-set name="book.titlepage.recto.style"/>
+<xsl:attribute-set name="book.titlepage.verso.style"/>
+
+<xsl:attribute-set name="article.titlepage.recto.style"/>
+<xsl:attribute-set name="article.titlepage.verso.style"/>
+
+<xsl:attribute-set name="set.titlepage.recto.style"/>
+<xsl:attribute-set name="set.titlepage.verso.style"/>
+
+<xsl:attribute-set name="part.titlepage.recto.style"/>
+<xsl:attribute-set name="part.titlepage.verso.style"/>
+
+<xsl:attribute-set name="partintro.titlepage.recto.style"/>
+<xsl:attribute-set name="partintro.titlepage.verso.style"/>
+
+<xsl:attribute-set name="reference.titlepage.recto.style"/>
+<xsl:attribute-set name="reference.titlepage.verso.style"/>
+
+<xsl:attribute-set name="refentry.titlepage.recto.style"/>
+<xsl:attribute-set name="refentry.titlepage.verso.style"/>
+
+<xsl:attribute-set name="dedication.titlepage.recto.style"/>
+<xsl:attribute-set name="dedication.titlepage.verso.style"/>
+
+<xsl:attribute-set name="preface.titlepage.recto.style"/>
+<xsl:attribute-set name="preface.titlepage.verso.style"/>
+
+<xsl:attribute-set name="chapter.titlepage.recto.style"/>
+<xsl:attribute-set name="chapter.titlepage.verso.style"/>
+
+<xsl:attribute-set name="appendix.titlepage.recto.style"/>
+<xsl:attribute-set name="appendix.titlepage.verso.style"/>
+
+<xsl:attribute-set name="bibliography.titlepage.recto.style"/>
+<xsl:attribute-set name="bibliography.titlepage.verso.style"/>
+
+<xsl:attribute-set name="glossary.titlepage.recto.style"/>
+<xsl:attribute-set name="glossary.titlepage.verso.style"/>
+
+<xsl:attribute-set name="index.titlepage.recto.style"/>
+<xsl:attribute-set name="index.titlepage.verso.style"/>
+
+<xsl:attribute-set name="setindex.titlepage.recto.style"/>
+<xsl:attribute-set name="setindex.titlepage.verso.style"/>
+
+<xsl:attribute-set name="section.titlepage.recto.style"/>
+<xsl:attribute-set name="section.titlepage.verso.style"/>
+
+<xsl:attribute-set name="sect1.titlepage.recto.style"
+                   use-attribute-sets="section.titlepage.recto.style"/>
+<xsl:attribute-set name="sect1.titlepage.verso.style"
+                   use-attribute-sets="section.titlepage.verso.style"/>
+
+<xsl:attribute-set name="sect2.titlepage.recto.style"
+                   use-attribute-sets="section.titlepage.recto.style"/>
+<xsl:attribute-set name="sect2.titlepage.verso.style"
+                   use-attribute-sets="section.titlepage.verso.style"/>
+
+<xsl:attribute-set name="sect3.titlepage.recto.style"
+                   use-attribute-sets="section.titlepage.recto.style"/>
+<xsl:attribute-set name="sect3.titlepage.verso.style"
+                   use-attribute-sets="section.titlepage.verso.style"/>
+
+<xsl:attribute-set name="sect4.titlepage.recto.style"
+                   use-attribute-sets="section.titlepage.recto.style"/>
+<xsl:attribute-set name="sect4.titlepage.verso.style"
+                   use-attribute-sets="section.titlepage.verso.style"/>
+
+<xsl:attribute-set name="sect5.titlepage.recto.style"
+                   use-attribute-sets="section.titlepage.recto.style"/>
+<xsl:attribute-set name="sect5.titlepage.verso.style"
+                   use-attribute-sets="section.titlepage.verso.style"/>
+
+<xsl:attribute-set name="simplesect.titlepage.recto.style"
+                   use-attribute-sets="section.titlepage.recto.style"/>
+<xsl:attribute-set name="simplesect.titlepage.verso.style"
+                   use-attribute-sets="section.titlepage.verso.style"/>
+
+<xsl:attribute-set name="table.of.contents.titlepage.recto.style"/>
+<xsl:attribute-set name="table.of.contents.titlepage.verso.style"/>
+
+<xsl:attribute-set name="list.of.tables.titlepage.recto.style"/>
+<xsl:attribute-set name="list.of.tables.contents.titlepage.verso.style"/>
+
+<xsl:attribute-set name="list.of.figures.titlepage.recto.style"/>
+<xsl:attribute-set name="list.of.figures.contents.titlepage.verso.style"/>
+
+<xsl:attribute-set name="list.of.equations.titlepage.recto.style"/>
+<xsl:attribute-set name="list.of.equations.contents.titlepage.verso.style"/>
+
+<xsl:attribute-set name="list.of.examples.titlepage.recto.style"/>
+<xsl:attribute-set name="list.of.examples.contents.titlepage.verso.style"/>
+
+<xsl:attribute-set name="list.of.unknowns.titlepage.recto.style"/>
+<xsl:attribute-set name="list.of.unknowns.contents.titlepage.verso.style"/>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="*" mode="titlepage.mode">
+  <!-- if an element isn't found in this mode, try the default mode -->
+  <xsl:apply-templates select="."/>
+</xsl:template>
+
+<xsl:template match="abbrev" mode="titlepage.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="titlepage.mode"/>
+    <br/>
+  </span>
+</xsl:template>
+
+<xsl:template match="abstract" mode="titlepage.mode">
+  <div class="{name(.)}">
+    <xsl:call-template name="anchor"/>
+    <xsl:call-template name="formal.object.heading">
+      <xsl:with-param name="title">
+        <xsl:apply-templates select="." mode="title.markup"/>
+      </xsl:with-param>
+    </xsl:call-template>
+    <xsl:apply-templates mode="titlepage.mode"/>
+  </div>
+</xsl:template>
+
+<xsl:template match="abstract/title" mode="titlepage.mode">
+</xsl:template>
+
+<xsl:template match="address" mode="titlepage.mode">
+  <xsl:param name="suppress-numbers" select="'0'"/>
+
+  <xsl:variable name="rtf">
+    <xsl:apply-templates mode="titlepage.mode"/>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="$suppress-numbers = '0'
+                    and @linenumbering = 'numbered'
+                    and $use.extensions != '0'
+                    and $linenumbering.extension != '0'">
+      <div class="{name(.)}">
+        <xsl:call-template name="paragraph">
+          <xsl:with-param name="content">
+            <xsl:call-template name="number.rtf.lines">
+              <xsl:with-param name="rtf" select="$rtf"/>
+            </xsl:call-template>
+          </xsl:with-param>
+        </xsl:call-template>
+      </div>
+    </xsl:when>
+
+    <xsl:otherwise>
+      <div class="{name(.)}">
+        <xsl:call-template name="paragraph">
+          <xsl:with-param name="content">
+            <xsl:call-template name="make-verbatim">
+              <xsl:with-param name="rtf" select="$rtf"/>
+            </xsl:call-template>
+          </xsl:with-param>
+        </xsl:call-template>
+      </div>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="affiliation" mode="titlepage.mode">
+  <div class="{name(.)}">
+    <xsl:apply-templates mode="titlepage.mode"/>
+  </div>
+</xsl:template>
+
+<xsl:template match="artpagenums" mode="titlepage.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="titlepage.mode"/>
+    <br/>
+  </span>
+</xsl:template>
+
+<xsl:template match="author" mode="titlepage.mode">
+  <div class="{name(.)}">
+    <h3 class="{name(.)}"><xsl:call-template name="person.name"/></h3>
+    <xsl:apply-templates mode="titlepage.mode" select="./contrib"/>
+    <xsl:apply-templates mode="titlepage.mode" select="./affiliation"/>
+    <xsl:apply-templates mode="titlepage.mode" select="./email"/>
+  </div>
+</xsl:template>
+
+<xsl:template match="authorblurb|personblurb" mode="titlepage.mode">
+  <div class="{name(.)}">
+    <xsl:apply-templates mode="titlepage.mode"/>
+  </div>
+</xsl:template>
+
+<xsl:template match="authorgroup" mode="titlepage.mode">
+  <div class="{name(.)}">
+    <xsl:apply-templates mode="titlepage.mode"/>
+  </div>
+</xsl:template>
+
+<xsl:template match="authorinitials" mode="titlepage.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="titlepage.mode"/>
+    <br/>
+  </span>
+</xsl:template>
+
+<xsl:template match="bibliomisc" mode="titlepage.mode">
+  <xsl:apply-templates mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="bibliomset" mode="titlepage.mode">
+  <xsl:apply-templates mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="collab" mode="titlepage.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="titlepage.mode"/>
+    <br/>
+  </span>
+</xsl:template>
+
+<xsl:template match="confgroup" mode="titlepage.mode">
+  <div class="{name(.)}">
+    <xsl:apply-templates mode="titlepage.mode"/>
+  </div>
+</xsl:template>
+
+<xsl:template match="confdates" mode="titlepage.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="titlepage.mode"/>
+    <br/>
+  </span>
+</xsl:template>
+
+<xsl:template match="confsponsor" mode="titlepage.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="titlepage.mode"/>
+    <br/>
+  </span>
+</xsl:template>
+
+<xsl:template match="conftitle" mode="titlepage.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="titlepage.mode"/>
+    <br/>
+  </span>
+</xsl:template>
+
+<xsl:template match="confnum" mode="titlepage.mode">
+  <!-- suppress -->
+</xsl:template>
+
+<xsl:template match="contractnum" mode="titlepage.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="titlepage.mode"/>
+    <br/>
+  </span>
+</xsl:template>
+
+<xsl:template match="contractsponsor" mode="titlepage.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="titlepage.mode"/>
+    <br/>
+  </span>
+</xsl:template>
+
+<xsl:template match="contrib" mode="titlepage.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="titlepage.mode"/>
+  </span>
+</xsl:template>
+
+<xsl:template match="copyright" mode="titlepage.mode">
+  <p class="{name(.)}">
+    <xsl:call-template name="gentext">
+      <xsl:with-param name="key" select="'Copyright'"/>
+    </xsl:call-template>
+    <xsl:call-template name="gentext.space"/>
+    <xsl:call-template name="dingbat">
+      <xsl:with-param name="dingbat">copyright</xsl:with-param>
+    </xsl:call-template>
+    <xsl:call-template name="gentext.space"/>
+    <xsl:call-template name="copyright.years">
+      <xsl:with-param name="years" select="year"/>
+      <xsl:with-param name="print.ranges" select="$make.year.ranges"/>
+      <xsl:with-param name="single.year.ranges"
+                      select="$make.single.year.ranges"/>
+    </xsl:call-template>
+    <xsl:call-template name="gentext.space"/>
+    <xsl:apply-templates select="holder" mode="titlepage.mode"/>
+  </p>
+</xsl:template>
+
+<xsl:template match="year" mode="titlepage.mode">
+  <xsl:choose>
+    <xsl:when test="$show.revisionflag != 0 and @revisionflag">
+      <span class="{@revisionflag}">
+        <xsl:apply-templates mode="titlepage.mode"/>
+      </span>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:apply-templates mode="titlepage.mode"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="holder" mode="titlepage.mode">
+  <xsl:choose>
+    <xsl:when test="$show.revisionflag != 0 and @revisionflag">
+      <span class="{@revisionflag}">
+        <xsl:apply-templates mode="titlepage.mode"/>
+      </span>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:apply-templates mode="titlepage.mode"/>
+    </xsl:otherwise>
+  </xsl:choose>
+  <xsl:if test="position() &lt; last()">
+    <xsl:text>, </xsl:text>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="corpauthor" mode="titlepage.mode">
+  <h3 class="{name(.)}">
+    <xsl:apply-templates mode="titlepage.mode"/>
+  </h3>
+</xsl:template>
+
+<xsl:template match="corpname" mode="titlepage.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="titlepage.mode"/>
+    <br/>
+  </span>
+</xsl:template>
+
+<xsl:template match="date" mode="titlepage.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="titlepage.mode"/>
+    <br/>
+  </span>
+</xsl:template>
+
+<xsl:template match="edition" mode="titlepage.mode">
+  <p class="{name(.)}">
+    <xsl:apply-templates mode="titlepage.mode"/>
+    <xsl:call-template name="gentext.space"/>
+    <xsl:call-template name="gentext">
+      <xsl:with-param name="key" select="'Edition'"/>
+    </xsl:call-template>
+  </p>
+</xsl:template>
+
+<xsl:template match="editor" mode="titlepage.mode">
+  <h3 class="{name(.)}"><xsl:call-template name="person.name"/></h3>
+</xsl:template>
+
+<xsl:template match="editor[position()=1]" mode="titlepage.mode">
+  <h4 class="editedby"><xsl:call-template name="gentext.edited.by"/></h4>
+  <h3 class="{name(.)}"><xsl:call-template name="person.name"/></h3>
+</xsl:template>
+
+<xsl:template match="email" mode="titlepage.mode">
+  <!-- use the normal e-mail handling code -->
+  <xsl:apply-templates select="."/>
+</xsl:template>
+
+<xsl:template match="firstname" mode="titlepage.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="titlepage.mode"/>
+    <br/>
+  </span>
+</xsl:template>
+
+<xsl:template match="graphic" mode="titlepage.mode">
+  <!-- use the normal graphic handling code -->
+  <xsl:apply-templates select="."/>
+</xsl:template>
+
+<xsl:template match="honorific" mode="titlepage.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="titlepage.mode"/>
+    <br/>
+  </span>
+</xsl:template>
+
+<xsl:template match="isbn" mode="titlepage.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="titlepage.mode"/>
+    <br/>
+  </span>
+</xsl:template>
+
+<xsl:template match="issn" mode="titlepage.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="titlepage.mode"/>
+    <br/>
+  </span>
+</xsl:template>
+
+<xsl:template match="biblioid" mode="titlepage.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="titlepage.mode"/>
+    <br/>
+  </span>
+</xsl:template>
+
+<xsl:template match="itermset" mode="titlepage.mode">
+</xsl:template>
+
+<xsl:template match="invpartnumber" mode="titlepage.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="titlepage.mode"/>
+    <br/>
+  </span>
+</xsl:template>
+
+<xsl:template match="issuenum" mode="titlepage.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="titlepage.mode"/>
+    <br/>
+  </span>
+</xsl:template>
+
+<xsl:template match="jobtitle" mode="titlepage.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="titlepage.mode"/>
+    <br/>
+  </span>
+</xsl:template>
+
+<xsl:template match="keywordset" mode="titlepage.mode">
+</xsl:template>
+
+<xsl:template match="legalnotice" mode="titlepage.mode">
+  <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
+  <xsl:choose>
+    <xsl:when test="$generate.legalnotice.link != 0">
+      <xsl:variable name="filename">
+        <xsl:call-template name="make-relative-filename">
+          <xsl:with-param name="base.dir" select="$base.dir"/>
+          <xsl:with-param name="base.name" select="concat('ln-',$id,$html.ext)"/>
+        </xsl:call-template>
+      </xsl:variable>
+
+      <xsl:variable name="title">
+        <xsl:apply-templates select="." mode="title.markup"/>
+      </xsl:variable>
+
+      <a href="{concat('ln-',$id,$html.ext)}">
+        <xsl:copy-of select="$title"/>
+      </a>
+
+      <xsl:call-template name="write.chunk">
+        <xsl:with-param name="filename" select="$filename"/>
+        <xsl:with-param name="quiet" select="$chunk.quietly"/>
+        <xsl:with-param name="content">
+          <html>
+            <head>
+              <xsl:call-template name="system.head.content"/>
+              <xsl:call-template name="head.content"/>
+              <xsl:call-template name="user.head.content"/>
+            </head>
+            <body>
+              <xsl:call-template name="body.attributes"/>
+              <div class="{local-name(.)}">
+                <xsl:apply-templates mode="titlepage.mode"/>
+              </div>
+            </body>
+          </html>
+        </xsl:with-param>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:otherwise>
+      <div class="{local-name(.)}">
+        <xsl:apply-templates mode="titlepage.mode"/>
+      </div>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="legalnotice/title" mode="titlepage.mode">
+  <p class="legalnotice-title"><b><xsl:apply-templates/></b></p>
+</xsl:template>
+
+<xsl:template match="lineage" mode="titlepage.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="titlepage.mode"/>
+    <br/>
+  </span>
+</xsl:template>
+
+<xsl:template match="modespec" mode="titlepage.mode">
+</xsl:template>
+
+<xsl:template match="orgdiv" mode="titlepage.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="titlepage.mode"/>
+    <br/>
+  </span>
+</xsl:template>
+
+<xsl:template match="orgname" mode="titlepage.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="titlepage.mode"/>
+    <br/>
+  </span>
+</xsl:template>
+
+<xsl:template match="othercredit" mode="titlepage.mode">
+  <xsl:variable name="contrib" select="string(contrib)"/>
+  <xsl:choose>
+    <xsl:when test="contrib">
+      <xsl:if test="not(preceding-sibling::othercredit[string(contrib)=$contrib])">
+        <xsl:call-template name="paragraph">
+          <xsl:with-param name="class" select="name(.)"/>
+          <xsl:with-param name="content">
+            <xsl:apply-templates mode="titlepage.mode" select="contrib"/>
+            <xsl:text>: </xsl:text>
+            <xsl:call-template name="person.name"/>
+            <xsl:apply-templates mode="titlepage.mode" select="./affiliation"/>
+            <xsl:apply-templates select="following-sibling::othercredit[string(contrib)=$contrib]" mode="titlepage.othercredits"/>
+          </xsl:with-param>
+        </xsl:call-template>
+      </xsl:if>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:call-template name="paragraph">
+        <xsl:with-param name="class" select="name(.)"/>
+        <xsl:with-param name="content">
+          <xsl:call-template name="person.name"/>
+        </xsl:with-param>
+      </xsl:call-template>
+      <xsl:apply-templates mode="titlepage.mode" select="./affiliation"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="othercredit" mode="titlepage.othercredits">
+  <xsl:text>, </xsl:text>
+  <xsl:call-template name="person.name"/>
+</xsl:template>
+
+<xsl:template match="othername" mode="titlepage.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="titlepage.mode"/>
+    <br/>
+  </span>
+</xsl:template>
+
+<xsl:template match="pagenums" mode="titlepage.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="titlepage.mode"/>
+    <br/>
+  </span>
+</xsl:template>
+
+<xsl:template match="printhistory" mode="titlepage.mode">
+  <div class="{name(.)}">
+    <xsl:apply-templates mode="titlepage.mode"/>
+  </div>
+</xsl:template>
+
+<xsl:template match="productname" mode="titlepage.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="titlepage.mode"/>
+    <br/>
+  </span>
+</xsl:template>
+
+<xsl:template match="productnumber" mode="titlepage.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="titlepage.mode"/>
+    <br/>
+  </span>
+</xsl:template>
+
+<xsl:template match="pubdate" mode="titlepage.mode">
+  <xsl:call-template name="paragraph">
+    <xsl:with-param name="class" select="name(.)"/>
+    <xsl:with-param name="content">
+      <xsl:apply-templates mode="titlepage.mode"/>
+    </xsl:with-param>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="publisher" mode="titlepage.mode">
+  <xsl:call-template name="paragraph">
+    <xsl:with-param name="class" select="name(.)"/>
+    <xsl:with-param name="content">
+      <xsl:apply-templates mode="titlepage.mode"/>
+    </xsl:with-param>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="publishername" mode="titlepage.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="titlepage.mode"/>
+    <br/>
+  </span>
+</xsl:template>
+
+<xsl:template match="pubsnumber" mode="titlepage.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="titlepage.mode"/>
+    <br/>
+  </span>
+</xsl:template>
+
+<xsl:template match="releaseinfo" mode="titlepage.mode">
+  <xsl:call-template name="paragraph">
+    <xsl:with-param name="class" select="name(.)"/>
+    <xsl:with-param name="content">
+      <xsl:apply-templates mode="titlepage.mode"/>
+    </xsl:with-param>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="revhistory" mode="titlepage.mode">
+  <xsl:variable name="numcols">
+    <xsl:choose>
+      <xsl:when test="//authorinitials">3</xsl:when>
+      <xsl:otherwise>2</xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <div class="{name(.)}">
+    <table border="1" width="100%" summary="Revision history">
+      <tr>
+        <th align="left" valign="top" colspan="{$numcols}">
+          <b>
+            <xsl:call-template name="gentext">
+              <xsl:with-param name="key" select="'RevHistory'"/>
+            </xsl:call-template>
+          </b>
+        </th>
+      </tr>
+      <xsl:apply-templates mode="titlepage.mode">
+        <xsl:with-param name="numcols" select="$numcols"/>
+      </xsl:apply-templates>
+    </table>
+  </div>
+</xsl:template>
+
+<xsl:template match="revhistory/revision" mode="titlepage.mode">
+  <xsl:param name="numcols" select="'3'"/>
+  <xsl:variable name="revnumber" select=".//revnumber"/>
+  <xsl:variable name="revdate"   select=".//date"/>
+  <xsl:variable name="revauthor" select=".//authorinitials"/>
+  <xsl:variable name="revremark" select=".//revremark|.//revdescription"/>
+  <tr>
+    <td align="left">
+      <xsl:if test="$revnumber">
+        <xsl:call-template name="gentext">
+          <xsl:with-param name="key" select="'Revision'"/>
+        </xsl:call-template>
+        <xsl:call-template name="gentext.space"/>
+        <xsl:apply-templates select="$revnumber[1]" mode="titlepage.mode"/>
+      </xsl:if>
+    </td>
+    <td align="left">
+      <xsl:apply-templates select="$revdate[1]" mode="titlepage.mode"/>
+    </td>
+    <xsl:choose>
+      <xsl:when test="$revauthor">
+        <td align="left">
+          <xsl:apply-templates select="$revauthor[1]" mode="titlepage.mode"/>
+        </td>
+      </xsl:when>
+      <xsl:when test="$numcols &gt; 2">
+        <td>&#160;</td>
+      </xsl:when>
+      <xsl:otherwise></xsl:otherwise>
+    </xsl:choose>
+  </tr>
+  <xsl:if test="$revremark">
+    <tr>
+      <td align="left" colspan="{$numcols}">
+        <xsl:apply-templates select="$revremark[1]" mode="titlepage.mode"/>
+      </td>
+    </tr>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="revision/revnumber" mode="titlepage.mode">
+  <xsl:apply-templates mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="revision/date" mode="titlepage.mode">
+  <xsl:apply-templates mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="revision/authorinitials" mode="titlepage.mode">
+  <xsl:apply-templates mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="revision/revremark" mode="titlepage.mode">
+  <xsl:apply-templates mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="revision/revdescription" mode="titlepage.mode">
+  <xsl:apply-templates mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="seriesvolnums" mode="titlepage.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="titlepage.mode"/>
+    <br/>
+  </span>
+</xsl:template>
+
+<xsl:template match="shortaffil" mode="titlepage.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="titlepage.mode"/>
+    <br/>
+  </span>
+</xsl:template>
+
+<xsl:template match="subjectset" mode="titlepage.mode">
+</xsl:template>
+
+<xsl:template match="subtitle" mode="titlepage.mode">
+  <h2 class="{name(.)}">
+    <xsl:apply-templates mode="titlepage.mode"/>
+  </h2>
+</xsl:template>
+
+<xsl:template match="surname" mode="titlepage.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="titlepage.mode"/>
+    <br/>
+  </span>
+</xsl:template>
+
+<xsl:template match="title" mode="titlepage.mode">
+  <xsl:variable name="id">
+    <xsl:choose>
+      <!-- if title is in an *info wrapper, get the grandparent -->
+      <xsl:when test="contains(local-name(..), 'info')">
+        <xsl:call-template name="object.id">
+          <xsl:with-param name="object" select="../.."/>
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:call-template name="object.id">
+          <xsl:with-param name="object" select=".."/>
+        </xsl:call-template>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <h1 class="{name(.)}">
+    <a name="{$id}"/>
+    <xsl:choose>
+      <xsl:when test="$show.revisionflag != 0 and @revisionflag">
+	<span class="{@revisionflag}">
+	  <xsl:apply-templates mode="titlepage.mode"/>
+	</span>
+      </xsl:when>
+      <xsl:otherwise>
+	<xsl:apply-templates mode="titlepage.mode"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </h1>
+</xsl:template>
+
+<xsl:template match="titleabbrev" mode="titlepage.mode">
+  <!-- nop; title abbreviations don't belong on the title page! -->
+</xsl:template>
+
+<xsl:template match="volumenum" mode="titlepage.mode">
+  <span class="{name(.)}">
+    <xsl:apply-templates mode="titlepage.mode"/>
+    <br/>
+  </span>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/toc.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/toc.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/toc.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,173 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: toc.xsl,v 1.1.1.1 2004/10/19 21:21:48 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:template match="toc">
+  <xsl:choose>
+    <xsl:when test="*">
+      <xsl:if test="$process.source.toc != 0">
+        <!-- if the toc isn't empty, process it -->
+        <xsl:element name="{$toc.list.type}">
+          <xsl:apply-templates/>
+        </xsl:element>
+      </xsl:if>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:if test="$process.empty.source.toc != 0">
+        <xsl:choose>
+          <xsl:when test="parent::section
+                          or parent::sect1
+                          or parent::sect2
+                          or parent::sect3
+                          or parent::sect4
+                          or parent::sect5">
+            <xsl:apply-templates select="parent::*"
+                                 mode="toc.for.section"/>
+          </xsl:when>
+          <xsl:when test="parent::article">
+            <xsl:apply-templates select="parent::*"
+                                 mode="toc.for.component"/>
+          </xsl:when>
+          <xsl:when test="parent::book
+                          or parent::part">
+            <xsl:apply-templates select="parent::*"
+                                 mode="toc.for.division"/>
+          </xsl:when>
+          <xsl:when test="parent::set">
+            <xsl:apply-templates select="parent::*"
+                                 mode="toc.for.set"/>
+          </xsl:when>
+          <!-- there aren't any other contexts that allow toc -->
+          <xsl:otherwise>
+            <xsl:message>
+              <xsl:text>I don't know how to make a TOC in this context!</xsl:text>
+            </xsl:message>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:if>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="tocpart|tocchap
+                     |toclevel1|toclevel2|toclevel3|toclevel4|toclevel5">
+  <xsl:variable name="sub-toc">
+    <xsl:if test="tocchap|toclevel1|toclevel2|toclevel3|toclevel4|toclevel5">
+      <xsl:choose>
+        <xsl:when test="$toc.list.type = 'dl'">
+          <dd>
+            <xsl:element name="{$toc.list.type}">
+              <xsl:apply-templates select="tocchap|toclevel1|toclevel2|toclevel3|toclevel4|toclevel5"/>
+            </xsl:element>
+          </dd>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:element name="{$toc.list.type}">
+            <xsl:apply-templates select="tocchap|toclevel1|toclevel2|toclevel3|toclevel4|toclevel5"/>
+          </xsl:element>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:if>
+  </xsl:variable>
+
+  <xsl:apply-templates select="tocentry[position() != last()]"/>
+
+  <xsl:choose>
+    <xsl:when test="$toc.list.type = 'dl'">
+      <dt>
+        <xsl:apply-templates select="tocentry[position() = last()]"/>
+      </dt>
+      <xsl:copy-of select="$sub-toc"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <li>
+        <xsl:apply-templates select="tocentry[position() = last()]"/>
+        <xsl:copy-of select="$sub-toc"/>
+      </li>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="tocentry|tocfront|tocback">
+  <xsl:choose>
+    <xsl:when test="$toc.list.type = 'dl'">
+      <dt>
+        <xsl:call-template name="tocentry-content"/>
+      </dt>
+    </xsl:when>
+    <xsl:otherwise>
+      <li>
+        <xsl:call-template name="tocentry-content"/>
+      </li>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="tocentry[position() = last()]" priority="2">
+  <xsl:call-template name="tocentry-content"/>
+</xsl:template>
+
+<xsl:template name="tocentry-content">
+  <xsl:variable name="targets" select="key('id', at linkend)"/>
+  <xsl:variable name="target" select="$targets[1]"/>
+
+  <xsl:choose>
+    <xsl:when test="@linkend">
+      <xsl:call-template name="check.id.unique">
+        <xsl:with-param name="linkend" select="@linkend"/>
+      </xsl:call-template>
+      <a>
+        <xsl:attribute name="href">
+          <xsl:call-template name="href.target">
+            <xsl:with-param name="object" select="$target"/>
+          </xsl:call-template>
+        </xsl:attribute>
+        <xsl:apply-templates/>
+      </a>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:apply-templates/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="*" mode="toc.for.section">
+  <xsl:call-template name="section.toc"/>
+</xsl:template>
+
+<xsl:template match="*" mode="toc.for.component">
+  <xsl:call-template name="component.toc"/>
+</xsl:template>
+
+<xsl:template match="*" mode="toc.for.section">
+  <xsl:call-template name="section.toc"/>
+</xsl:template>
+
+<xsl:template match="*" mode="toc.for.division">
+  <xsl:call-template name="division.toc"/>
+</xsl:template>
+
+<xsl:template match="*" mode="toc.for.set">
+  <xsl:call-template name="set.toc"/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="lot|lotentry">
+</xsl:template>
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/verbatim.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/verbatim.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/verbatim.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,382 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:sverb="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.Verbatim"
+                xmlns:xverb="com.nwalsh.xalan.Verbatim"
+                xmlns:lxslt="http://xml.apache.org/xslt"
+                xmlns:exsl="http://exslt.org/common"
+                exclude-result-prefixes="sverb xverb lxslt exsl"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: verbatim.xsl,v 1.1.1.1 2004/10/19 21:21:48 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<lxslt:component prefix="xverb"
+                 functions="numberLines"/>
+
+<xsl:template match="programlisting|screen|synopsis">
+  <xsl:param name="suppress-numbers" select="'0'"/>
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <xsl:call-template name="anchor"/>
+
+  <xsl:variable name="content">
+    <xsl:choose>
+      <xsl:when test="$suppress-numbers = '0'
+                      and @linenumbering = 'numbered'
+                      and $use.extensions != '0'
+                      and $linenumbering.extension != '0'">
+        <xsl:variable name="rtf">
+          <xsl:apply-templates/>
+        </xsl:variable>
+        <pre class="{name(.)}">
+          <xsl:call-template name="number.rtf.lines">
+            <xsl:with-param name="rtf" select="$rtf"/>
+          </xsl:call-template>
+        </pre>
+      </xsl:when>
+      <xsl:otherwise>
+        <pre class="{name(.)}">
+          <xsl:apply-templates/>
+        </pre>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="$shade.verbatim != 0">
+      <table xsl:use-attribute-sets="shade.verbatim.style">
+        <tr>
+          <td>
+            <xsl:copy-of select="$content"/>
+          </td>
+        </tr>
+      </table>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:copy-of select="$content"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="literallayout">
+  <xsl:param name="suppress-numbers" select="'0'"/>
+
+  <xsl:variable name="rtf">
+    <xsl:apply-templates/>
+  </xsl:variable>
+
+  <xsl:variable name="content">
+    <xsl:choose>
+      <xsl:when test="$suppress-numbers = '0'
+                      and @linenumbering = 'numbered'
+                      and $use.extensions != '0'
+                      and $linenumbering.extension != '0'">
+        <xsl:choose>
+          <xsl:when test="@class='monospaced'">
+            <pre class="{name(.)}">
+              <xsl:call-template name="number.rtf.lines">
+                <xsl:with-param name="rtf" select="$rtf"/>
+              </xsl:call-template>
+            </pre>
+          </xsl:when>
+          <xsl:otherwise>
+            <div class="{name(.)}">
+              <p>
+                <xsl:call-template name="number.rtf.lines">
+                  <xsl:with-param name="rtf" select="$rtf"/>
+                </xsl:call-template>
+              </p>
+            </div>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:when>
+
+      <xsl:otherwise>
+        <xsl:choose>
+          <xsl:when test="@class='monospaced'">
+            <pre class="{name(.)}">
+              <xsl:copy-of select="$rtf"/>
+            </pre>
+          </xsl:when>
+          <xsl:otherwise>
+            <div class="{name(.)}">
+              <p>
+                <xsl:call-template name="make-verbatim">
+                  <xsl:with-param name="rtf" select="$rtf"/>
+                </xsl:call-template>
+              </p>
+            </div>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="$shade.verbatim != 0 and @class='monospaced'">
+      <table xsl:use-attribute-sets="shade.verbatim.style">
+        <tr>
+          <td>
+            <xsl:copy-of select="$content"/>
+          </td>
+        </tr>
+      </table>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:copy-of select="$content"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="address">
+  <xsl:param name="suppress-numbers" select="'0'"/>
+
+  <xsl:variable name="rtf">
+    <xsl:apply-templates/>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="$suppress-numbers = '0'
+                    and @linenumbering = 'numbered'
+                    and $use.extensions != '0'
+                    and $linenumbering.extension != '0'">
+      <div class="{name(.)}">
+        <p>
+          <xsl:call-template name="number.rtf.lines">
+            <xsl:with-param name="rtf" select="$rtf"/>
+          </xsl:call-template>
+        </p>
+      </div>
+    </xsl:when>
+
+    <xsl:otherwise>
+      <div class="{name(.)}">
+        <p>
+          <xsl:call-template name="make-verbatim">
+            <xsl:with-param name="rtf" select="$rtf"/>
+          </xsl:call-template>
+        </p>
+      </div>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="number.rtf.lines">
+  <xsl:param name="rtf" select="''"/>
+  <xsl:param name="pi.context" select="."/>
+
+  <!-- Save the global values -->
+  <xsl:variable name="global.linenumbering.everyNth"
+                select="$linenumbering.everyNth"/>
+
+  <xsl:variable name="global.linenumbering.separator"
+                select="$linenumbering.separator"/>
+
+  <xsl:variable name="global.linenumbering.width"
+                select="$linenumbering.width"/>
+
+  <!-- Extract the <?dbhtml linenumbering.*?> PI values -->
+  <xsl:variable name="pi.linenumbering.everyNth">
+    <xsl:call-template name="dbhtml-attribute">
+      <xsl:with-param name="pis"
+                      select="$pi.context/processing-instruction('dbhtml')"/>
+      <xsl:with-param name="attribute" select="'linenumbering.everyNth'"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="pi.linenumbering.separator">
+    <xsl:call-template name="dbhtml-attribute">
+      <xsl:with-param name="pis"
+                      select="$pi.context/processing-instruction('dbhtml')"/>
+      <xsl:with-param name="attribute" select="'linenumbering.separator'"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="pi.linenumbering.width">
+    <xsl:call-template name="dbhtml-attribute">
+      <xsl:with-param name="pis"
+                      select="$pi.context/processing-instruction('dbhtml')"/>
+      <xsl:with-param name="attribute" select="'linenumbering.width'"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <!-- Construct the 'in-context' values -->
+  <xsl:variable name="linenumbering.everyNth">
+    <xsl:choose>
+      <xsl:when test="$pi.linenumbering.everyNth != ''">
+        <xsl:value-of select="$pi.linenumbering.everyNth"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$global.linenumbering.everyNth"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:variable name="linenumbering.separator">
+    <xsl:choose>
+      <xsl:when test="$pi.linenumbering.separator != ''">
+        <xsl:value-of select="$pi.linenumbering.separator"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$global.linenumbering.separator"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:variable name="linenumbering.width">
+    <xsl:choose>
+      <xsl:when test="$pi.linenumbering.width != ''">
+        <xsl:value-of select="$pi.linenumbering.width"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$global.linenumbering.width"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:variable name="linenumbering.startinglinenumber">
+    <xsl:choose>
+      <xsl:when test="@startinglinenumber">
+        <xsl:value-of select="@startinglinenumber"/>
+      </xsl:when>
+      <xsl:when test="@continuation='continues'">
+        <xsl:variable name="lastLine">
+          <xsl:choose>
+            <xsl:when test="self::programlisting">
+              <xsl:call-template name="lastLineNumber">
+                <xsl:with-param name="listings"
+                     select="preceding::programlisting[@linenumbering='numbered']"/>
+              </xsl:call-template>
+            </xsl:when>
+            <xsl:when test="self::screen">
+              <xsl:call-template name="lastLineNumber">
+                <xsl:with-param name="listings"
+                     select="preceding::screen[@linenumbering='numbered']"/>
+              </xsl:call-template>
+            </xsl:when>
+            <xsl:when test="self::literallayout">
+              <xsl:call-template name="lastLineNumber">
+                <xsl:with-param name="listings"
+                     select="preceding::literallayout[@linenumbering='numbered']"/>
+              </xsl:call-template>
+            </xsl:when>
+            <xsl:when test="self::address">
+              <xsl:call-template name="lastLineNumber">
+                <xsl:with-param name="listings"
+                     select="preceding::address[@linenumbering='numbered']"/>
+              </xsl:call-template>
+            </xsl:when>
+            <xsl:when test="self::synopsis">
+              <xsl:call-template name="lastLineNumber">
+                <xsl:with-param name="listings"
+                     select="preceding::synopsis[@linenumbering='numbered']"/>
+              </xsl:call-template>
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:message>
+                <xsl:text>Unexpected verbatim environment: </xsl:text>
+                <xsl:value-of select="local-name(.)"/>
+              </xsl:message>
+              <xsl:value-of select="0"/>
+            </xsl:otherwise>
+          </xsl:choose>
+        </xsl:variable>
+
+        <xsl:value-of select="$lastLine + 1"/>
+      </xsl:when>
+      <xsl:otherwise>1</xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="function-available('sverb:numberLines')">
+      <xsl:copy-of select="sverb:numberLines($rtf)"/>
+    </xsl:when>
+    <xsl:when test="function-available('xverb:numberLines')">
+      <xsl:copy-of select="xverb:numberLines($rtf)"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:message terminate="yes">
+        <xsl:text>No numberLines function available.</xsl:text>
+      </xsl:message>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="make-verbatim">
+  <xsl:param name="rtf"/>
+
+  <!-- I want to make this RTF verbatim. There are two possibilities: either
+       I have access to the exsl:node-set extension function and I can "do it right"
+       or I have to rely on CSS. -->
+
+  <xsl:choose>
+    <xsl:when test="function-available('exsl:node-set')">
+      <xsl:apply-templates select="exsl:node-set($rtf)" mode="make.verbatim.mode"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <span style="white-space: pre;">
+        <xsl:copy-of select="$rtf"/>
+      </span>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- ======================================================================== -->
+
+<xsl:template name="lastLineNumber">
+  <xsl:param name="listings"/>
+  <xsl:param name="number" select="0"/>
+
+  <xsl:variable name="lines">
+    <xsl:call-template name="countLines">
+      <xsl:with-param name="listing" select="string($listings[1])"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="not($listings)">
+      <xsl:value-of select="$number"/>
+    </xsl:when>
+    <xsl:when test="$listings[1]/@startinglinenumber">
+      <xsl:value-of select="$number + $listings[1]/@startinglinenumber + $lines - 1"/>
+    </xsl:when>
+    <xsl:when test="$listings[1]/@continuation='continues'">
+      <xsl:call-template name="lastLineNumber">
+        <xsl:with-param name="listings" select="listings[position() &gt; 1]"/>
+        <xsl:with-param name="number" select="$number + $lines"/>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:value-of select="$lines"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="countLines">
+  <xsl:param name="listing"/>
+  <xsl:param name="count" select="1"/>
+
+  <xsl:choose>
+    <xsl:when test="contains($listing, '&#10;')">
+      <xsl:call-template name="countLines">
+        <xsl:with-param name="listing" select="substring-after($listing, '&#10;')"/>
+        <xsl:with-param name="count" select="$count + 1"/>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:value-of select="$count"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/xref.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/xref.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/html/xref.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1306 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:suwl="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.UnwrapLinks"
+                xmlns:exsl="http://exslt.org/common"
+                exclude-result-prefixes="suwl exsl"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: xref.xsl,v 1.1.1.1 2004/10/19 21:21:48 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<!-- Create keys for quickly looking up olink targets -->
+<xsl:key name="targetdoc-key" match="document" use="@targetdoc" />
+<xsl:key name="targetptr-key"  match="div|obj"
+         use="concat(ancestor::document/@targetdoc, '/', @targetptr)" />
+
+<xsl:template match="anchor">
+  <xsl:call-template name="anchor"/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="xref" name="xref">
+  <xsl:variable name="targets" select="key('id', at linkend)"/>
+  <xsl:variable name="target" select="$targets[1]"/>
+  <xsl:variable name="refelem" select="local-name($target)"/>
+
+  <xsl:call-template name="check.id.unique">
+    <xsl:with-param name="linkend" select="@linkend"/>
+  </xsl:call-template>
+
+  <xsl:call-template name="anchor"/>
+
+  <xsl:choose>
+    <xsl:when test="count($target) = 0">
+      <xsl:message>
+	<xsl:text>XRef to nonexistent id: </xsl:text>
+	<xsl:value-of select="@linkend"/>
+      </xsl:message>
+      <xsl:text>???</xsl:text>
+    </xsl:when>
+
+    <xsl:when test="@endterm">
+      <xsl:variable name="href">
+        <xsl:call-template name="href.target">
+          <xsl:with-param name="object" select="$target"/>
+        </xsl:call-template>
+      </xsl:variable>
+
+      <xsl:variable name="etargets" select="key('id', at endterm)"/>
+      <xsl:variable name="etarget" select="$etargets[1]"/>
+      <xsl:choose>
+        <xsl:when test="count($etarget) = 0">
+          <xsl:message>
+            <xsl:value-of select="count($etargets)"/>
+            <xsl:text>Endterm points to nonexistent ID: </xsl:text>
+            <xsl:value-of select="@endterm"/>
+          </xsl:message>
+          <a href="{$href}">
+            <xsl:text>???</xsl:text>
+          </a>
+        </xsl:when>
+        <xsl:otherwise>
+          <a href="{$href}">
+            <xsl:apply-templates select="$etarget" mode="endterm"/>
+          </a>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+
+    <xsl:when test="$target/@xreflabel">
+      <a>
+        <xsl:attribute name="href">
+          <xsl:call-template name="href.target">
+            <xsl:with-param name="object" select="$target"/>
+          </xsl:call-template>
+        </xsl:attribute>
+        <xsl:call-template name="xref.xreflabel">
+          <xsl:with-param name="target" select="$target"/>
+        </xsl:call-template>
+      </a>
+    </xsl:when>
+
+    <xsl:otherwise>
+      <xsl:variable name="href">
+        <xsl:call-template name="href.target">
+          <xsl:with-param name="object" select="$target"/>
+        </xsl:call-template>
+      </xsl:variable>
+
+      <xsl:apply-templates select="$target" mode="xref-to-prefix"/>
+
+      <a href="{$href}">
+        <xsl:if test="$target/title or $target/*/title">
+          <xsl:attribute name="title">
+            <xsl:apply-templates select="$target" mode="xref-title"/>
+          </xsl:attribute>
+        </xsl:if>
+        <xsl:apply-templates select="$target" mode="xref-to">
+          <xsl:with-param name="referrer" select="."/>
+          <xsl:with-param name="xrefstyle">
+            <xsl:choose>
+              <xsl:when test="@role and not(@xrefstyle) and $use.role.as.xrefstyle != 0">
+                <xsl:value-of select="@role"/>
+              </xsl:when>
+              <xsl:otherwise>
+                <xsl:value-of select="@xrefstyle"/>
+              </xsl:otherwise>
+            </xsl:choose>
+          </xsl:with-param>
+        </xsl:apply-templates>
+      </a>
+
+      <xsl:apply-templates select="$target" mode="xref-to-suffix"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="*" mode="endterm">
+  <!-- Process the children of the endterm element -->
+  <xsl:variable name="endterm">
+    <xsl:apply-templates select="child::node()"/>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="function-available('exsl:node-set')">
+      <xsl:apply-templates select="exsl:node-set($endterm)" mode="remove-ids"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:copy-of select="$endterm"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="*" mode="remove-ids">
+  <xsl:choose>
+    <!-- handle html or xhtml -->
+    <xsl:when test="local-name(.) = 'a'
+                    and (namespace-uri(.) = ''
+                         or namespace-uri(.) = 'http://www.w3.org/1999/xhtml')">
+      <xsl:choose>
+        <xsl:when test="(@name and count(@*) = 1)
+                        or (@id and count(@*) = 1)
+                        or (@id and @name and count(@*) = 2)">
+          <xsl:message>suppress anchor</xsl:message>
+          <!-- suppress the whole thing -->
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:copy>
+            <xsl:for-each select="@*">
+              <xsl:choose>
+                <xsl:when test="name(.) != 'name' and name(.) != 'id'">
+                  <xsl:copy/>
+                </xsl:when>
+                <xsl:otherwise>
+                  <xsl:message>removing <xsl:value-of select="name(.)"/></xsl:message>
+                </xsl:otherwise>
+              </xsl:choose>
+            </xsl:for-each>
+          </xsl:copy>
+          <xsl:apply-templates mode="remove-ids"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:copy>
+        <xsl:for-each select="@*">
+          <xsl:choose>
+            <xsl:when test="name(.) != 'id'">
+              <xsl:copy/>
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:message>removing <xsl:value-of select="name(.)"/></xsl:message>
+            </xsl:otherwise>
+          </xsl:choose>
+        </xsl:for-each>
+        <xsl:apply-templates mode="remove-ids"/>
+      </xsl:copy>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="*" mode="xref-to-prefix"/>
+<xsl:template match="*" mode="xref-to-suffix"/>
+
+<xsl:template match="*" mode="xref-to">
+  <xsl:param name="referrer"/>
+  <xsl:param name="xrefstyle"/>
+  <xsl:param name="verbose" select="1"/>
+
+  <xsl:if test="$verbose">
+    <xsl:message>
+      <xsl:text>Don't know what gentext to create for xref to: "</xsl:text>
+      <xsl:value-of select="name(.)"/>
+      <xsl:text>", ("</xsl:text>
+      <xsl:value-of select="@id"/>
+      <xsl:text>")</xsl:text>
+    </xsl:message>
+  </xsl:if>
+  <xsl:text>???</xsl:text>
+</xsl:template>
+
+<xsl:template match="title" mode="xref-to">
+  <xsl:param name="referrer"/>
+  <xsl:param name="xrefstyle"/>
+
+  <!-- if you xref to a title, xref to the parent... -->
+  <xsl:choose>
+    <!-- FIXME: how reliable is this? -->
+    <xsl:when test="contains(local-name(parent::*), 'info')">
+      <xsl:apply-templates select="parent::*[2]" mode="xref-to">
+        <xsl:with-param name="referrer" select="$referrer"/>
+        <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+      </xsl:apply-templates>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:apply-templates select="parent::*" mode="xref-to">
+        <xsl:with-param name="referrer" select="$referrer"/>
+        <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+      </xsl:apply-templates>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="abstract|authorblurb|personblurb|bibliodiv|bibliomset
+                     |biblioset|blockquote|calloutlist|caution|colophon
+                     |constraintdef|formalpara|glossdiv|important|indexdiv
+                     |itemizedlist|legalnotice|lot|msg|msgexplan|msgmain
+                     |msgrel|msgset|msgsub|note|orderedlist|partintro
+                     |productionset|qandadiv|refsynopsisdiv|segmentedlist
+                     |set|setindex|sidebar|tip|toc|variablelist|warning"
+              mode="xref-to">
+  <xsl:param name="referrer"/>
+  <xsl:param name="xrefstyle"/>
+
+  <!-- catch-all for things with (possibly optional) titles -->
+  <xsl:apply-templates select="." mode="object.xref.markup">
+    <xsl:with-param name="purpose" select="'xref'"/>
+    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+    <xsl:with-param name="referrer" select="$referrer"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="author|editor|othercredit|personname" mode="xref-to">
+  <xsl:param name="referrer"/>
+  <xsl:param name="xrefstyle"/>
+
+  <xsl:call-template name="person.name"/>
+</xsl:template>
+
+<xsl:template match="authorgroup" mode="xref-to">
+  <xsl:param name="referrer"/>
+  <xsl:param name="xrefstyle"/>
+
+  <xsl:call-template name="person.name.list"/>
+</xsl:template>
+
+<xsl:template match="figure|example|table|equation" mode="xref-to">
+  <xsl:param name="referrer"/>
+  <xsl:param name="xrefstyle"/>
+
+  <xsl:apply-templates select="." mode="object.xref.markup">
+    <xsl:with-param name="purpose" select="'xref'"/>
+    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+    <xsl:with-param name="referrer" select="$referrer"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="procedure" mode="xref-to">
+  <xsl:param name="referrer"/>
+  <xsl:param name="xrefstyle"/>
+
+  <xsl:apply-templates select="." mode="object.xref.markup">
+    <xsl:with-param name="purpose" select="'xref'"/>
+    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+    <xsl:with-param name="referrer" select="$referrer"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="cmdsynopsis" mode="xref-to">
+  <xsl:apply-templates select="(.//command)[1]" mode="xref"/>
+</xsl:template>
+
+<xsl:template match="funcsynopsis" mode="xref-to">
+  <xsl:apply-templates select="(.//function)[1]" mode="xref"/>
+</xsl:template>
+
+<xsl:template match="dedication|preface|chapter|appendix|article" mode="xref-to">
+  <xsl:param name="referrer"/>
+  <xsl:param name="xrefstyle"/>
+
+  <xsl:apply-templates select="." mode="object.xref.markup">
+    <xsl:with-param name="purpose" select="'xref'"/>
+    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+    <xsl:with-param name="referrer" select="$referrer"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="bibliography" mode="xref-to">
+  <xsl:param name="referrer"/>
+  <xsl:param name="xrefstyle"/>
+
+  <xsl:apply-templates select="." mode="object.xref.markup">
+    <xsl:with-param name="purpose" select="'xref'"/>
+    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+    <xsl:with-param name="referrer" select="$referrer"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="biblioentry|bibliomixed" mode="xref-to-prefix">
+  <xsl:text>[</xsl:text>
+</xsl:template>
+
+<xsl:template match="biblioentry|bibliomixed" mode="xref-to-suffix">
+  <xsl:text>]</xsl:text>
+</xsl:template>
+
+<xsl:template match="biblioentry|bibliomixed" mode="xref-to">
+  <xsl:param name="referrer"/>
+  <xsl:param name="xrefstyle"/>
+
+  <!-- handles both biblioentry and bibliomixed -->
+  <xsl:choose>
+    <xsl:when test="string(.) = ''">
+      <xsl:variable name="bib" select="document($bibliography.collection,.)"/>
+      <xsl:variable name="id" select="@id"/>
+      <xsl:variable name="entry" select="$bib/bibliography/*[@id=$id][1]"/>
+      <xsl:choose>
+        <xsl:when test="$entry">
+          <xsl:choose>
+            <xsl:when test="$bibliography.numbered != 0">
+              <xsl:number from="bibliography" count="biblioentry|bibliomixed"
+                          level="any" format="1"/>
+            </xsl:when>
+            <xsl:when test="local-name($entry/*[1]) = 'abbrev'">
+              <xsl:apply-templates select="$entry/*[1]"/>
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:value-of select="@id"/>
+            </xsl:otherwise>
+          </xsl:choose>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:message>
+            <xsl:text>No bibliography entry: </xsl:text>
+            <xsl:value-of select="$id"/>
+            <xsl:text> found in </xsl:text>
+            <xsl:value-of select="$bibliography.collection"/>
+          </xsl:message>
+          <xsl:value-of select="@id"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:choose>
+        <xsl:when test="$bibliography.numbered != 0">
+          <xsl:number from="bibliography" count="biblioentry|bibliomixed"
+                      level="any" format="1"/>
+        </xsl:when>
+        <xsl:when test="local-name(*[1]) = 'abbrev'">
+          <xsl:apply-templates select="*[1]"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="@id"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="glossary" mode="xref-to">
+  <xsl:param name="referrer"/>
+  <xsl:param name="xrefstyle"/>
+
+  <xsl:apply-templates select="." mode="object.xref.markup">
+    <xsl:with-param name="purpose" select="'xref'"/>
+    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+    <xsl:with-param name="referrer" select="$referrer"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="glossentry" mode="xref-to">
+  <xsl:choose>
+    <xsl:when test="$glossentry.show.acronym = 'primary'">
+      <xsl:choose>
+        <xsl:when test="acronym|abbrev">
+          <xsl:apply-templates select="(acronym|abbrev)[1]"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:apply-templates select="glossterm[1]" mode="xref-to"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:apply-templates select="glossterm[1]" mode="xref-to"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="glossterm" mode="xref-to">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="index" mode="xref-to">
+  <xsl:param name="referrer"/>
+  <xsl:param name="xrefstyle"/>
+
+  <xsl:apply-templates select="." mode="object.xref.markup">
+    <xsl:with-param name="purpose" select="'xref'"/>
+    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+    <xsl:with-param name="referrer" select="$referrer"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="listitem" mode="xref-to">
+  <xsl:param name="referrer"/>
+  <xsl:param name="xrefstyle"/>
+
+  <xsl:apply-templates select="." mode="object.xref.markup">
+    <xsl:with-param name="purpose" select="'xref'"/>
+    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+    <xsl:with-param name="referrer" select="$referrer"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="section|simplesect
+                     |sect1|sect2|sect3|sect4|sect5
+                     |refsect1|refsect2|refsect3|refsection" mode="xref-to">
+  <xsl:param name="referrer"/>
+  <xsl:param name="xrefstyle"/>
+
+  <xsl:apply-templates select="." mode="object.xref.markup">
+    <xsl:with-param name="purpose" select="'xref'"/>
+    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+    <xsl:with-param name="referrer" select="$referrer"/>
+  </xsl:apply-templates>
+  <!-- FIXME: What about "in Chapter X"? -->
+</xsl:template>
+
+<xsl:template match="bridgehead" mode="xref-to">
+  <xsl:param name="referrer"/>
+  <xsl:param name="xrefstyle"/>
+
+  <xsl:apply-templates select="." mode="object.xref.markup">
+    <xsl:with-param name="purpose" select="'xref'"/>
+    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+    <xsl:with-param name="referrer" select="$referrer"/>
+  </xsl:apply-templates>
+  <!-- FIXME: What about "in Chapter X"? -->
+</xsl:template>
+
+<xsl:template match="qandaset" mode="xref-to">
+  <xsl:param name="referrer"/>
+  <xsl:param name="xrefstyle"/>
+
+  <xsl:apply-templates select="." mode="object.xref.markup">
+    <xsl:with-param name="purpose" select="'xref'"/>
+    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+    <xsl:with-param name="referrer" select="$referrer"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="qandadiv" mode="xref-to">
+  <xsl:param name="referrer"/>
+  <xsl:param name="xrefstyle"/>
+
+  <xsl:apply-templates select="." mode="object.xref.markup">
+    <xsl:with-param name="purpose" select="'xref'"/>
+    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+    <xsl:with-param name="referrer" select="$referrer"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="qandaentry" mode="xref-to">
+  <xsl:param name="referrer"/>
+  <xsl:param name="xrefstyle"/>
+
+  <xsl:apply-templates select="question[1]" mode="object.xref.markup">
+    <xsl:with-param name="purpose" select="'xref'"/>
+    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+    <xsl:with-param name="referrer" select="$referrer"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="question|answer" mode="xref-to">
+  <xsl:param name="referrer"/>
+  <xsl:param name="xrefstyle"/>
+
+  <xsl:apply-templates select="." mode="object.xref.markup">
+    <xsl:with-param name="purpose" select="'xref'"/>
+    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+    <xsl:with-param name="referrer" select="$referrer"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="part|reference" mode="xref-to">
+  <xsl:param name="referrer"/>
+  <xsl:param name="xrefstyle"/>
+
+  <xsl:apply-templates select="." mode="object.xref.markup">
+    <xsl:with-param name="purpose" select="'xref'"/>
+    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+    <xsl:with-param name="referrer" select="$referrer"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="refentry" mode="xref-to">
+  <xsl:param name="referrer"/>
+  <xsl:param name="xrefstyle"/>
+
+  <xsl:choose>
+    <xsl:when test="refmeta/refentrytitle">
+      <xsl:apply-templates select="refmeta/refentrytitle"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:apply-templates select="refnamediv/refname[1]"/>
+    </xsl:otherwise>
+  </xsl:choose>
+  <xsl:apply-templates select="refmeta/manvolnum"/>
+</xsl:template>
+
+<xsl:template match="refnamediv" mode="xref-to">
+  <xsl:param name="referrer"/>
+  <xsl:param name="xrefstyle"/>
+
+  <xsl:apply-templates select="refname[1]" mode="xref-to">
+    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+    <xsl:with-param name="referrer" select="$referrer"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="refname" mode="xref-to">
+  <xsl:param name="referrer"/>
+  <xsl:param name="xrefstyle"/>
+
+  <xsl:apply-templates mode="xref-to"/>
+</xsl:template>
+
+<xsl:template match="step" mode="xref-to">
+  <xsl:param name="referrer"/>
+  <xsl:param name="xrefstyle"/>
+
+  <xsl:call-template name="gentext">
+    <xsl:with-param name="key" select="'Step'"/>
+  </xsl:call-template>
+  <xsl:text> </xsl:text>
+  <xsl:apply-templates select="." mode="number"/>
+</xsl:template>
+
+<xsl:template match="varlistentry" mode="xref-to">
+  <xsl:param name="referrer"/>
+  <xsl:param name="xrefstyle"/>
+
+  <xsl:apply-templates select="term[1]" mode="xref-to">
+    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+    <xsl:with-param name="referrer" select="$referrer"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="varlistentry/term" mode="xref-to">
+  <xsl:param name="referrer"/>
+  <xsl:param name="xrefstyle"/>
+
+  <!-- to avoid the comma that will be generated if there are several terms -->
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="co" mode="xref-to">
+  <xsl:param name="referrer"/>
+  <xsl:param name="xrefstyle"/>
+
+  <xsl:apply-templates select="." mode="callout-bug"/>
+</xsl:template>
+
+<xsl:template match="book" mode="xref-to">
+  <xsl:param name="referrer"/>
+  <xsl:param name="xrefstyle"/>
+
+  <xsl:apply-templates select="." mode="object.xref.markup">
+    <xsl:with-param name="purpose" select="'xref'"/>
+    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+    <xsl:with-param name="referrer" select="$referrer"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="para" mode="xref-to">
+  <xsl:param name="referrer"/>
+  <xsl:param name="xrefstyle"/>
+
+  <xsl:variable name="context" select="(ancestor::simplesect
+                                       |ancestor::section
+                                       |ancestor::sect1
+                                       |ancestor::sect2
+                                       |ancestor::sect3
+                                       |ancestor::sect4
+                                       |ancestor::sect5
+                                       |ancestor::refsection
+                                       |ancestor::refsect1
+                                       |ancestor::refsect2
+                                       |ancestor::refsect3
+                                       |ancestor::chapter
+                                       |ancestor::appendix
+                                       |ancestor::preface
+                                       |ancestor::partintro
+                                       |ancestor::dedication
+                                       |ancestor::colophon
+                                       |ancestor::bibliography
+                                       |ancestor::index
+                                       |ancestor::glossary
+                                       |ancestor::glossentry
+                                       |ancestor::listitem
+                                       |ancestor::varlistentry)[last()]"/>
+
+  <xsl:apply-templates select="$context" mode="xref-to"/>
+<!--
+  <xsl:apply-templates select="." mode="object.xref.markup">
+    <xsl:with-param name="purpose" select="'xref'"/>
+    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+    <xsl:with-param name="referrer" select="$referrer"/>
+  </xsl:apply-templates>
+-->
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="*" mode="xref-title">
+  <xsl:variable name="title">
+    <xsl:apply-templates select="." mode="object.title.markup"/>
+  </xsl:variable>
+
+  <xsl:value-of select="$title"/>
+</xsl:template>
+
+<xsl:template match="author" mode="xref-title">
+  <xsl:variable name="title">
+    <xsl:call-template name="person.name"/>
+  </xsl:variable>
+
+  <xsl:value-of select="$title"/>
+</xsl:template>
+
+<xsl:template match="authorgroup" mode="xref-title">
+  <xsl:variable name="title">
+    <xsl:call-template name="person.name.list"/>
+  </xsl:variable>
+
+  <xsl:value-of select="$title"/>
+</xsl:template>
+
+<xsl:template match="cmdsynopsis" mode="xref-title">
+  <xsl:variable name="title">
+    <xsl:apply-templates select="(.//command)[1]" mode="xref"/>
+  </xsl:variable>
+
+  <xsl:value-of select="$title"/>
+</xsl:template>
+
+<xsl:template match="funcsynopsis" mode="xref-title">
+  <xsl:variable name="title">
+    <xsl:apply-templates select="(.//function)[1]" mode="xref"/>
+  </xsl:variable>
+
+  <xsl:value-of select="$title"/>
+</xsl:template>
+
+<xsl:template match="biblioentry|bibliomixed" mode="xref-title">
+  <!-- handles both biblioentry and bibliomixed -->
+  <xsl:variable name="title">
+    <xsl:text>[</xsl:text>
+    <xsl:choose>
+      <xsl:when test="local-name(*[1]) = 'abbrev'">
+        <xsl:apply-templates select="*[1]"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="@id"/>
+      </xsl:otherwise>
+    </xsl:choose>
+    <xsl:text>]</xsl:text>
+  </xsl:variable>
+
+  <xsl:value-of select="$title"/>
+</xsl:template>
+
+<xsl:template match="step" mode="xref-title">
+  <xsl:call-template name="gentext">
+    <xsl:with-param name="key" select="'Step'"/>
+  </xsl:call-template>
+  <xsl:text> </xsl:text>
+  <xsl:apply-templates select="." mode="number"/>
+</xsl:template>
+
+<xsl:template match="co" mode="xref-title">
+  <xsl:variable name="title">
+    <xsl:apply-templates select="." mode="callout-bug"/>
+  </xsl:variable>
+
+  <xsl:value-of select="$title"/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="link" name="link">
+  <xsl:param name="a.target"/>
+
+  <xsl:variable name="targets" select="key('id', at linkend)"/>
+  <xsl:variable name="target" select="$targets[1]"/>
+
+  <xsl:call-template name="check.id.unique">
+    <xsl:with-param name="linkend" select="@linkend"/>
+  </xsl:call-template>
+
+  <a>
+    <xsl:if test="@id">
+      <xsl:attribute name="name"><xsl:value-of select="@id"/></xsl:attribute>
+    </xsl:if>
+
+    <xsl:if test="$a.target">
+      <xsl:attribute name="target"><xsl:value-of select="$a.target"/></xsl:attribute>
+    </xsl:if>
+
+    <xsl:attribute name="href">
+      <xsl:call-template name="href.target">
+        <xsl:with-param name="object" select="$target"/>
+      </xsl:call-template>
+    </xsl:attribute>
+
+    <!-- FIXME: is there a better way to tell what elements have a title? -->
+    <xsl:if test="local-name($target) = 'book'
+                  or local-name($target) = 'set'
+                  or local-name($target) = 'chapter'
+                  or local-name($target) = 'preface'
+                  or local-name($target) = 'appendix'
+                  or local-name($target) = 'bibliography'
+                  or local-name($target) = 'glossary'
+                  or local-name($target) = 'index'
+                  or local-name($target) = 'part'
+                  or local-name($target) = 'refentry'
+                  or local-name($target) = 'reference'
+                  or local-name($target) = 'example'
+                  or local-name($target) = 'equation'
+                  or local-name($target) = 'table'
+                  or local-name($target) = 'figure'
+                  or local-name($target) = 'simplesect'
+                  or starts-with(local-name($target),'sect')
+                  or starts-with(local-name($target),'refsect')">
+      <xsl:attribute name="title">
+        <xsl:apply-templates select="$target"
+                             mode="object.title.markup.textonly"/>
+      </xsl:attribute>
+    </xsl:if>
+
+    <xsl:choose>
+      <xsl:when test="count(child::node()) &gt; 0">
+        <!-- If it has content, use it -->
+        <xsl:apply-templates/>
+      </xsl:when>
+      <xsl:otherwise>
+        <!-- else look for an endterm -->
+        <xsl:choose>
+          <xsl:when test="@endterm">
+            <xsl:variable name="etargets" select="key('id', at endterm)"/>
+            <xsl:variable name="etarget" select="$etargets[1]"/>
+            <xsl:choose>
+              <xsl:when test="count($etarget) = 0">
+                <xsl:message>
+                  <xsl:value-of select="count($etargets)"/>
+                  <xsl:text>Endterm points to nonexistent ID: </xsl:text>
+                  <xsl:value-of select="@endterm"/>
+                </xsl:message>
+                <xsl:text>???</xsl:text>
+              </xsl:when>
+              <xsl:otherwise>
+                  <xsl:apply-templates select="$etarget" mode="endterm"/>
+              </xsl:otherwise>
+            </xsl:choose>
+          </xsl:when>
+
+          <xsl:otherwise>
+            <xsl:message>
+              <xsl:text>Link element has no content and no Endterm. </xsl:text>
+              <xsl:text>Nothing to show in the link to </xsl:text>
+              <xsl:value-of select="$target"/>
+            </xsl:message>
+            <xsl:text>???</xsl:text>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:otherwise>
+    </xsl:choose>
+  </a>
+</xsl:template>
+
+<xsl:template match="ulink" name="ulink">
+  <xsl:variable name="link">
+    <a>
+      <xsl:if test="@id">
+        <xsl:attribute name="name">
+          <xsl:value-of select="@id"/>
+        </xsl:attribute>
+      </xsl:if>
+      <xsl:attribute name="href"><xsl:value-of select="@url"/></xsl:attribute>
+      <xsl:if test="$ulink.target != ''">
+        <xsl:attribute name="target">
+          <xsl:value-of select="$ulink.target"/>
+        </xsl:attribute>
+      </xsl:if>
+      <xsl:choose>
+        <xsl:when test="count(child::node())=0">
+          <xsl:value-of select="@url"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:apply-templates/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </a>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="function-available('suwl:unwrapLinks')">
+      <xsl:copy-of select="suwl:unwrapLinks($link)"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:copy-of select="$link"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="olink" name="olink">
+  <xsl:param name="target.database" 
+      select="document($target.database.document, /)"/>
+
+  <xsl:call-template name="anchor"/>
+
+  <xsl:variable name="localinfo" select="@localinfo"/>
+
+  <xsl:variable name="href">
+    <xsl:choose>
+      <xsl:when test="@linkmode">
+        <!-- use the linkmode to get the base URI, use localinfo as fragid -->
+        <xsl:variable name="modespec" select="key('id', at linkmode)"/>
+        <xsl:if test="count($modespec) != 1
+                      or local-name($modespec) != 'modespec'">
+          <xsl:message>Warning: olink linkmode pointer is wrong.</xsl:message>
+        </xsl:if>
+        <xsl:value-of select="$modespec"/>
+        <xsl:if test="@localinfo">
+          <xsl:text>#</xsl:text>
+          <xsl:value-of select="@localinfo"/>
+        </xsl:if>
+      </xsl:when>
+      <xsl:when test="@type = 'href'">
+        <xsl:call-template name="olink.outline">
+          <xsl:with-param name="outline.base.uri"
+                          select="unparsed-entity-uri(@targetdocent)"/>
+          <xsl:with-param name="localinfo" select="@localinfo"/>
+          <xsl:with-param name="return" select="'href'"/>
+        </xsl:call-template>
+      </xsl:when>
+      <!-- Olinks resolved by stylesheet and target database -->
+      <xsl:when test="@targetdoc and not(@targetptr)" >
+        <xsl:message>Olink missing @targetptr attribute value</xsl:message>
+      </xsl:when>
+      <xsl:when test="not(@targetdoc) and @targetptr" >
+        <xsl:message>Olink missing @targetdoc attribute value</xsl:message>
+      </xsl:when>
+      <xsl:when test="@targetdoc and @targetptr">
+        <xsl:variable name="seek.targetdoc" select="@targetdoc"/>
+        <xsl:variable name="seek.targetptr" select="@targetptr"/>
+        <xsl:variable name="targetdoc.key" >
+          <xsl:for-each select="$target.database" >
+            <xsl:value-of select="key('targetdoc-key', $seek.targetdoc)/@targetdoc" />
+          </xsl:for-each>
+        </xsl:variable>
+        <xsl:variable name="targetptr.key" >
+          <xsl:for-each select="$target.database" >
+            <xsl:value-of select="key('targetptr-key', concat($seek.targetdoc, '/', $seek.targetptr))/@targetptr" />
+          </xsl:for-each>
+        </xsl:variable>
+<!-- debug
+<xsl:message>seek.targetdoc is <xsl:value-of select="$seek.targetdoc"/></xsl:message>
+<xsl:message>seek.targetptr is <xsl:value-of select="$seek.targetptr"/></xsl:message>
+-->
+        <xsl:choose>
+          <!-- Was the database document parameter not set? -->
+          <xsl:when test="$target.database.document = ''">
+            <xsl:message>
+              <xsl:text>Olinks not processed: must specify a $target.database.document parameter
+              </xsl:text>
+              <xsl:text>when using olinks with targetdoc and targetptr attributes.</xsl:text>
+            </xsl:message>
+          </xsl:when>
+          <!-- Did it not open? Should be a targetset element -->
+          <xsl:when test="not($target.database/targetset)">
+            <xsl:message>Olink error: could not open target database <xsl:value-of select="$target.database.document"/>.  </xsl:message>
+          </xsl:when>
+          <!-- Does it not have this document id? -->
+          <xsl:when test="$targetdoc.key = ''" >
+            <xsl:message>Olink error: document id <xsl:value-of select="$seek.targetdoc"/> not in target database.</xsl:message>
+          </xsl:when>
+
+          <!-- Does this document not have this targetptr? -->
+          <xsl:when test="$targetptr.key = ''" >
+            <!-- Does this document have *any* content? -->
+            <xsl:variable name="document.root">
+              <xsl:for-each select="$target.database" >
+                <xsl:value-of select="key('targetdoc-key', $seek.targetdoc)/div/@element"/>
+              </xsl:for-each>
+            </xsl:variable>
+            <xsl:choose>
+              <xsl:when test="$document.root = ''">
+                <xsl:message>Olink error: could not open data file for document id '<xsl:value-of select="$seek.targetdoc"/>'.</xsl:message>
+              </xsl:when>
+              <xsl:otherwise>
+                <xsl:message>Olink error: targetptr <xsl:value-of select="$seek.targetptr"/> not found in document id <xsl:value-of select="$seek.targetdoc"/>.</xsl:message>
+              </xsl:otherwise>
+            </xsl:choose>
+          </xsl:when>
+
+          <!-- Proceed with good olink syntax -->
+          <xsl:otherwise>
+            
+            <!-- Does the target database use a sitemap? -->
+            <xsl:variable name="use.sitemap">
+              <xsl:for-each select="$target.database" >
+                <xsl:value-of select="key('targetdoc-key', $seek.targetdoc)/parent::dir/@name"/>
+              </xsl:for-each>
+            </xsl:variable>
+            <xsl:variable name="target.href" >
+              <xsl:for-each select="$target.database" >
+                <xsl:value-of select="key('targetptr-key', concat($seek.targetdoc, '/', $seek.targetptr))/@href" />
+
+              </xsl:for-each>
+            </xsl:variable>
+
+            <!-- Get the baseuri for this targetptr -->
+
+            <xsl:variable name="baseuri" >
+              <xsl:choose>
+                <!-- Does the database use a sitemap? -->
+                <xsl:when test="$use.sitemap != ''" >
+                  <xsl:choose>
+                    <!-- Was current.docid parameter set? -->
+                    <xsl:when test="$current.docid != ''">
+                      <xsl:for-each select="$target.database" >
+                        <xsl:call-template name="targetpath" >
+                          <xsl:with-param name="dirnode" select="key('targetdoc-key', $current.docid)/parent::dir"/>
+                          <xsl:with-param name="targetdoc" select="$seek.targetdoc"/>
+                        </xsl:call-template>
+                      </xsl:for-each >
+                    </xsl:when>
+                    <xsl:otherwise>
+                      <xsl:message>Olink warning: cannot compute relative sitemap path without $current.docid parameter</xsl:message>
+                    </xsl:otherwise>
+                  </xsl:choose> 
+                  <!-- In either case, add baseuri from its document entry-->
+                  <xsl:variable name="docbaseuri">
+                    <xsl:for-each select="$target.database" >
+                      <xsl:value-of select="key('targetdoc-key', $seek.targetdoc)/@baseuri" />
+                    </xsl:for-each>
+                  </xsl:variable>
+                  <xsl:if test="$docbaseuri != ''" >
+                    <xsl:value-of select="$docbaseuri"/>
+                  </xsl:if>
+                </xsl:when>
+                <!-- No database sitemap in use -->
+                <xsl:otherwise>
+                  <!-- Just use any baseuri from its document entry -->
+                  <xsl:variable name="docbaseuri">
+                    <xsl:for-each select="$target.database" >
+                      <xsl:value-of select="key('targetdoc-key', $seek.targetdoc)/@baseuri" />
+                    </xsl:for-each>
+                  </xsl:variable>
+                  <xsl:if test="$docbaseuri != ''" >
+                    <xsl:value-of select="$docbaseuri"/>
+                  </xsl:if>
+                </xsl:otherwise>
+              </xsl:choose>
+            </xsl:variable>
+
+            <!-- Form the href information -->
+            <xsl:if test="$baseuri != ''">
+              <xsl:value-of select="$baseuri"/>
+              <xsl:if test="substring($target.href,1,1) != '#'">
+                <!--xsl:text>/</xsl:text-->
+              </xsl:if>
+            </xsl:if>
+            <xsl:value-of select="$target.href"/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$olink.resolver"/>
+        <xsl:text>?</xsl:text>
+        <xsl:value-of select="$olink.sysid"/>
+        <xsl:value-of select="unparsed-entity-uri(@targetdocent)"/>
+        <!-- XSL gives no access to the public identifier (grumble...) -->
+        <xsl:if test="@localinfo">
+          <xsl:text>&amp;</xsl:text>
+          <xsl:value-of select="$olink.fragid"/>
+          <xsl:value-of select="@localinfo"/>
+        </xsl:if>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="$href != ''">
+      <a href="{$href}">
+        <xsl:call-template name="olink.hottext">
+          <xsl:with-param name="target.database" select="$target.database"/>
+        </xsl:call-template>
+      </a>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:call-template name="olink.hottext">
+        <xsl:with-param name="target.database" select="$target.database"/>
+      </xsl:call-template>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="olink.outline">
+  <xsl:param name="outline.base.uri"/>
+  <xsl:param name="localinfo"/>
+  <xsl:param name="return" select="href"/>
+
+  <xsl:variable name="outline-file"
+                select="concat($outline.base.uri,
+                               $olink.outline.ext)"/>
+
+  <xsl:variable name="outline" select="document($outline-file,.)/div"/>
+
+  <xsl:variable name="node-href">
+    <xsl:choose>
+      <xsl:when test="$localinfo != ''">
+        <xsl:variable name="node" select="$outline//*[@id=$localinfo]"/>
+        <xsl:value-of select="$node/@href"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$outline/@href"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:variable name="node-xref">
+    <xsl:choose>
+      <xsl:when test="$localinfo != ''">
+        <xsl:variable name="node" select="$outline//*[@id=$localinfo]"/>
+        <xsl:copy-of select="$node/xref"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$outline/xref"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="$return = 'href'">
+      <xsl:value-of select="$node-href"/>
+    </xsl:when>
+    <xsl:when test="$return = 'xref'">
+      <xsl:value-of select="$node-xref"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:copy-of select="$node-xref"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="olink.hottext">
+  <xsl:param name="target.database"/>
+    <xsl:choose>
+      <!-- If it has elements or text (not just PI or comment) -->
+      <xsl:when test="child::text() or child::*">
+        <xsl:apply-templates/>
+      </xsl:when>
+      <xsl:when test="@targetdoc and @targetptr">
+        <!-- Get the xref text for this record -->
+        <xsl:variable name="seek.targetdoc" select="@targetdoc"/>
+        <xsl:variable name="seek.targetptr" select="@targetptr"/>
+        <xsl:variable name="xref.text" >
+          <xsl:for-each select="$target.database" >
+            <xsl:value-of select="key('targetptr-key', concat($seek.targetdoc, '/', $seek.targetptr))/xreftext" />
+
+          </xsl:for-each>
+        </xsl:variable>
+
+
+        <xsl:choose>
+          <xsl:when test="$use.local.olink.style != 0">
+            <!-- Get the element name and lang for this targetptr -->
+            <xsl:variable name="element" >
+              <xsl:for-each select="$target.database" >
+                <xsl:value-of select="key('targetptr-key', concat($seek.targetdoc, '/', $seek.targetptr))/@element" />
+              </xsl:for-each>
+            </xsl:variable>
+
+            <xsl:variable name="lang">
+              <xsl:variable name="candidate">
+                <xsl:for-each select="$target.database" >
+                  <xsl:value-of select="key('targetptr-key', concat($seek.targetdoc, '/', $seek.targetptr))/@lang" />
+                </xsl:for-each>
+              </xsl:variable>
+              <xsl:choose>
+                <xsl:when test="$candidate != ''">
+                  <xsl:value-of select="$candidate"/>
+                </xsl:when>
+                <xsl:otherwise>
+                  <xsl:value-of select="'en'"/>
+                </xsl:otherwise>
+              </xsl:choose>
+            </xsl:variable>
+            <xsl:variable name="template">
+              <xsl:call-template name="gentext.template">
+                <xsl:with-param name="context" select="'title'"/>
+                <xsl:with-param name="name" select="$element"/>
+                <xsl:with-param name="lang" select="$lang"/>
+              </xsl:call-template>
+            </xsl:variable>
+            <xsl:call-template name="substitute-markup">
+              <xsl:with-param name="template" select="$template"/>
+              <xsl:with-param name="title">
+                <xsl:for-each select="$target.database" >
+                  <xsl:value-of select="key('targetptr-key', concat($seek.targetdoc, '/', $seek.targetptr))/ttl" />
+                </xsl:for-each>
+              </xsl:with-param>
+              <xsl:with-param name="label">
+                <xsl:for-each select="$target.database" >
+                  <xsl:value-of select="key('targetptr-key', concat($seek.targetdoc, '/', $seek.targetptr))/@number" />
+                </xsl:for-each>
+              </xsl:with-param>
+            </xsl:call-template>
+          </xsl:when>
+          <xsl:when test="$xref.text !=''">
+            <xsl:value-of select="$xref.text"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:message>Olink error: no generated text for targetdoc/targetptr = <xsl:value-of select="@targetdoc"/>/<xsl:value-of select="@targetptr"/></xsl:message>
+            <xsl:text>????</xsl:text>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:call-template name="olink.outline">
+          <xsl:with-param name="outline.base.uri"
+                          select="unparsed-entity-uri(@targetdocent)"/>
+          <xsl:with-param name="localinfo" select="@localinfo"/>
+          <xsl:with-param name="return" select="'xreftext'"/>
+        </xsl:call-template>
+      </xsl:otherwise>
+    </xsl:choose>
+</xsl:template>
+
+<xsl:template name="targetpath">
+  <xsl:param name="dirnode" />
+  <xsl:param name="targetdoc" select="''"/>
+
+<!-- 
+<xsl:message>dirnode is <xsl:value-of select="$dirnode/@name"/></xsl:message>
+<xsl:message>targetdoc is <xsl:value-of select="$targetdoc"/></xsl:message>
+-->
+  <!-- recursive template generates path to olink target directory -->
+  <xsl:choose>
+    <!-- Have we arrived at the final path step? -->
+    <xsl:when test="$dirnode/child::document[@targetdoc = $targetdoc]">
+      <!-- We are done -->
+    </xsl:when>
+    <!-- Have we reached the top without a match? -->
+    <xsl:when test="name($dirnode) != 'dir'" >
+        <xsl:message>Olink error: cannot locate targetdoc <xsl:value-of select="$targetdoc"/> in sitemap</xsl:message>
+    </xsl:when>
+    <!-- Is the target in a descendant? -->
+    <xsl:when test="$dirnode/descendant::document/@targetdoc = $targetdoc">
+      <xsl:variable name="step" select="$dirnode/child::dir[descendant::document/@targetdoc = $targetdoc]"/>
+      <xsl:if test = "$step">
+        <xsl:value-of select="$step/@name"/>
+        <xsl:text>/</xsl:text>
+      </xsl:if>
+      <!-- Now recurse with the child -->
+      <xsl:call-template name="targetpath" >
+        <xsl:with-param name="dirnode" select="$step"/>
+        <xsl:with-param name="targetdoc" select="$targetdoc"/>
+      </xsl:call-template>
+    </xsl:when>
+    <!-- Otherwise we need to move up a step -->
+    <xsl:otherwise>
+      <xsl:if test="$dirnode/parent::dir">
+        <xsl:text>../</xsl:text>
+      </xsl:if>
+      <xsl:call-template name="targetpath" >
+        <xsl:with-param name="dirnode" select="$dirnode/parent::*"/>
+        <xsl:with-param name="targetdoc" select="$targetdoc"/>
+      </xsl:call-template>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="xref.xreflabel">
+  <!-- called to process an xreflabel...you might use this to make  -->
+  <!-- xreflabels come out in the right font for different targets, -->
+  <!-- for example. -->
+  <xsl:param name="target" select="."/>
+  <xsl:value-of select="$target/@xreflabel"/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="title" mode="xref">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="command" mode="xref">
+  <xsl:call-template name="inline.boldseq"/>
+</xsl:template>
+
+<xsl:template match="function" mode="xref">
+  <xsl:call-template name="inline.monoseq"/>
+</xsl:template>
+
+<xsl:template match="*" mode="pagenumber.markup">
+  <xsl:message>
+    <xsl:text>Page numbers make no sense in HTML! (Don't use %p in templates)</xsl:text>
+  </xsl:message>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="*" mode="insert.title.markup">
+  <xsl:param name="purpose"/>
+  <xsl:param name="xrefstyle"/>
+  <xsl:param name="title"/>
+
+  <xsl:choose>
+    <!-- FIXME: what about the case where titleabbrev is inside the info? -->
+    <xsl:when test="$purpose = 'xref' and titleabbrev">
+      <xsl:apply-templates select="." mode="titleabbrev.markup"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:copy-of select="$title"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="chapter|appendix" mode="insert.title.markup">
+  <xsl:param name="purpose"/>
+  <xsl:param name="xrefstyle"/>
+  <xsl:param name="title"/>
+
+  <xsl:choose>
+    <xsl:when test="$purpose = 'xref'">
+      <i>
+        <xsl:copy-of select="$title"/>
+      </i>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:copy-of select="$title"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="*" mode="insert.subtitle.markup">
+  <xsl:param name="purpose"/>
+  <xsl:param name="xrefstyle"/>
+  <xsl:param name="subtitle"/>
+
+  <xsl:copy-of select="$subtitle"/>
+</xsl:template>
+
+<xsl:template match="*" mode="insert.label.markup">
+  <xsl:param name="purpose"/>
+  <xsl:param name="xrefstyle"/>
+  <xsl:param name="label"/>
+
+  <xsl:copy-of select="$label"/>
+</xsl:template>
+
+<xsl:template match="*" mode="insert.pagenumber.markup">
+  <xsl:param name="purpose"/>
+  <xsl:param name="xrefstyle"/>
+  <xsl:param name="pagenumber"/>
+
+  <xsl:copy-of select="$pagenumber"/>
+</xsl:template>
+
+<xsl:template match="*" mode="insert.direction.markup">
+  <xsl:param name="purpose"/>
+  <xsl:param name="xrefstyle"/>
+  <xsl:param name="direction"/>
+
+  <xsl:copy-of select="$direction"/>
+</xsl:template>
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/lib/ChangeLog
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/lib/ChangeLog	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/lib/ChangeLog	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,66 @@
+2003-04-05  Adam Di Carlo <adicarlo at users.sourceforge.net>
+
+	* lib.xweb: a pica is 12 points, rather than a sixth of an inch
+
+2003-03-26  Michael Smith <xmldoc at users.sourceforge.net>
+
+	* Makefile: wdocbook.xsl obsoleted by w2docbook.xsl, updated globally
+
+2003-03-25  Michael Smith <xmldoc at users.sourceforge.net>
+
+	* Makefile: reverting wdocbook.xsl -> w2docbook.xsl changes
+
+2003-03-05  Michael Smith <xmldoc at users.sourceforge.net>
+
+	* Makefile: 
+	
+	Wrong filename was breaking build, fixed.
+	
+	  Had ../../litprog/wdocbook.xsl but needed ../../litprog/w2docbook.xsl
+
+2002-09-15  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* lib.xweb: Fix bug where PIs match the suffix of a name instead of the whole name
+
+2002-06-09  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* lib.xweb: Fix bug #496453: make sure comments don't contain illegal chars
+
+2002-05-12  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* lib.xweb: Changed default units to px; added length-in-points template
+
+2002-03-25  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* .cvsignore: Ignore lib.xsl too
+
+	* .cvsignore, Makefile, lib.xsl, lib.xweb: Use Literate XML to generate lib.xsl
+
+	* Makefile: Update documentation build to reflect use of lib.xweb
+
+2002-03-18  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* lib.xsl: Replace generate.*.toc and generate.*.lot with single generate.toc parameter.
+
+2002-03-14  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* lib.xsl: Whitespace only: change CR/LF back to LF. Norm was a total moron.
+
+	* lib.xsl: Whitespace changes only: use PC-style CR/LF because Unix clients choke on this far less often than PC clients choke on the reverse. Grrr.
+
+2002-01-09  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* lib.xsl: Added length-units template to extract units from lengths
+
+2001-11-28  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* lib.xsl: Added pi-attribute template
+
+2001-04-03  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* lib.xsl: Documentation fixes
+
+2001-04-02  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* lib.xsl: New file.
+

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/lib/lib.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/lib/lib.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/lib/lib.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,771 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- This file was generated by weave.xsl version 0.00+. Do not edit! -->
+<!-- See http://sourceforge.net/projects/docbook/ -->
+<!DOCTYPE book
+  PUBLIC "-//DocBook Open Repository//DTD DocBook Literate Programming V0.0//EN" "http://docbook.sourceforge.net/release/litprog/current/dtd/ldocbook.dtd">
+<book xmlns:src="http://nwalsh.com/xmlns/litprog/fragment" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<bookinfo>
+<title>XSL Library Template Reference</title>
+<releaseinfo role="cvs">$Id: lib.xml,v 1.1.1.1 2004/10/19 21:21:48 juntao Exp $
+</releaseinfo>
+<corpauthor>DocBook Open Repository Team</corpauthor>
+<copyright>
+  <year>1999</year>
+  <year>2000</year>
+  <year>2001</year>
+  <year>2002</year>
+  <holder>Norman Walsh</holder>
+</copyright>
+</bookinfo>
+
+<preface><title>Introduction</title>
+
+<para>This is technical reference documentation for the DocBook XSL
+Stylesheets; it documents (some of) the parameters, templates, and
+other elements of the stylesheets.</para>
+
+<para>This is not intended to be <quote>user</quote> documentation.
+It is provided for developers writing customization layers for the
+stylesheets, and for anyone who's interested in <quote>how it
+works</quote>.</para>
+
+<para>Although I am trying to be thorough, this documentation is known
+to be incomplete. Don't forget to read the source, too :-)</para>
+
+</preface>
+
+<reference>
+<title>General Library Templates</title>
+
+<refentry id="dot.count">
+<refnamediv>
+<refname>dot.count</refname>
+<refpurpose>Returns the number of <quote>.</quote> characters in a string</refpurpose>
+</refnamediv>
+
+<refsect1><title>Description</title>
+
+<programlisting format="linespecific"><src:fragment id="dot.count.frag">&lt;xsl:template name="dot.count"&gt;
+  &lt;!-- Returns the number of "." characters in a string --&gt;
+  &lt;xsl:param name="string"/&gt;
+  &lt;xsl:param name="count"
+             select="0"/&gt;
+  &lt;xsl:choose&gt;
+    &lt;xsl:when test="contains($string, '.')"&gt;
+      &lt;xsl:call-template name="dot.count"&gt;
+        &lt;xsl:with-param name="string"
+                        select="substring-after($string, '.')"/&gt;
+        &lt;xsl:with-param name="count"
+                        select="$count+1"/&gt;
+      &lt;/xsl:call-template&gt;
+    &lt;/xsl:when&gt;
+    &lt;xsl:otherwise&gt;
+      &lt;xsl:value-of select="$count"/&gt;
+    &lt;/xsl:otherwise&gt;
+  &lt;/xsl:choose&gt;
+&lt;/xsl:template&gt;</src:fragment></programlisting>
+
+</refsect1>
+</refentry>
+
+<!-- ================================================================== -->
+
+<refentry id="copy-string">
+<refnamediv>
+<refname>copy-string</refname>
+<refpurpose>Returns <quote>count</quote> copies of a string</refpurpose>
+</refnamediv>
+
+<refsect1><title>Description</title>
+
+<programlisting format="linespecific"><src:fragment id="copy-string.frag">&lt;xsl:template name="copy-string"&gt;
+  &lt;!-- returns 'count' copies of 'string' --&gt;
+  &lt;xsl:param name="string"/&gt;
+  &lt;xsl:param name="count"
+             select="0"/&gt;
+  &lt;xsl:param name="result"/&gt;
+
+  &lt;xsl:choose&gt;
+    &lt;xsl:when test="$count&gt;0"&gt;
+      &lt;xsl:call-template name="copy-string"&gt;
+        &lt;xsl:with-param name="string"
+                        select="$string"/&gt;
+        &lt;xsl:with-param name="count"
+                        select="$count - 1"/&gt;
+        &lt;xsl:with-param name="result"&gt;
+          &lt;xsl:value-of select="$result"/&gt;
+          &lt;xsl:value-of select="$string"/&gt;
+        &lt;/xsl:with-param&gt;
+      &lt;/xsl:call-template&gt;
+    &lt;/xsl:when&gt;
+    &lt;xsl:otherwise&gt;
+      &lt;xsl:value-of select="$result"/&gt;
+    &lt;/xsl:otherwise&gt;
+  &lt;/xsl:choose&gt;
+&lt;/xsl:template&gt;</src:fragment></programlisting>
+
+</refsect1>
+</refentry>
+
+<!-- ====================================================================== -->
+
+<refentry id="string.subst">
+<refnamediv>
+<refname>string.subst</refname>
+<refpurpose>Substitute one text string for another in a string</refpurpose>
+</refnamediv>
+
+<refsect1><title>Description</title>
+
+<para>The <function moreinfo="none">string.subst</function> template replaces all
+occurances of <parameter moreinfo="none">target</parameter> in <parameter moreinfo="none">string</parameter>
+with <parameter moreinfo="none">replacement</parameter> and returns the result.
+</para>
+
+<programlisting format="linespecific"><src:fragment id="string.subst.frag">&lt;xsl:template name="string.subst"&gt;
+  &lt;xsl:param name="string"/&gt;
+  &lt;xsl:param name="target"/&gt;
+  &lt;xsl:param name="replacement"/&gt;
+
+  &lt;xsl:choose&gt;
+    &lt;xsl:when test="contains($string, $target)"&gt;
+      &lt;xsl:variable name="rest"&gt;
+        &lt;xsl:call-template name="string.subst"&gt;
+          &lt;xsl:with-param name="string"
+                          select="substring-after($string, $target)"/&gt;
+          &lt;xsl:with-param name="target"
+                          select="$target"/&gt;
+          &lt;xsl:with-param name="replacement"
+                          select="$replacement"/&gt;
+        &lt;/xsl:call-template&gt;
+      &lt;/xsl:variable&gt;
+      &lt;xsl:value-of select="concat(substring-before($string, $target),                                    $replacement,                                    $rest)"/&gt;
+    &lt;/xsl:when&gt;
+    &lt;xsl:otherwise&gt;
+      &lt;xsl:value-of select="$string"/&gt;
+    &lt;/xsl:otherwise&gt;
+  &lt;/xsl:choose&gt;
+&lt;/xsl:template&gt;</src:fragment></programlisting>
+
+</refsect1>
+</refentry>
+
+<!-- ================================================================== -->
+
+<refentry id="xpointer.idref">
+<refnamediv>
+<refname>xpointer.idref</refname>
+<refpurpose>Extract IDREF from an XPointer</refpurpose>
+</refnamediv>
+
+<refsect1><title>Description</title>
+
+<para>The <function moreinfo="none">xpointer.idref</function> template returns the
+ID portion of an XPointer which is a pointer to an ID within the current
+document, or the empty string if it is not.</para>
+<para>In other words, <function moreinfo="none">xpointer.idref</function> returns
+<quote>foo</quote> when passed either <literal moreinfo="none">#foo</literal>
+or <literal moreinfo="none">#xpointer(id('foo'))</literal>, otherwise it returns
+the empty string.</para>
+
+<programlisting format="linespecific"><src:fragment id="xpointer.idref.frag">&lt;xsl:template name="xpointer.idref"&gt;
+  &lt;xsl:param name="xpointer"&gt;http://...&lt;/xsl:param&gt;
+  &lt;xsl:choose&gt;
+    &lt;xsl:when test="starts-with($xpointer, '#xpointer(id(')"&gt;
+      &lt;xsl:variable name="rest"
+                    select="substring-after($xpointer, '#xpointer(id(')"/&gt;
+      &lt;xsl:variable name="quote"
+                    select="substring($rest, 1, 1)"/&gt;
+      &lt;xsl:value-of select="substring-before(substring-after($xpointer, $quote), $quote)"/&gt;
+    &lt;/xsl:when&gt;
+    &lt;xsl:when test="starts-with($xpointer, '#')"&gt;
+      &lt;xsl:value-of select="substring-after($xpointer, '#')"/&gt;
+    &lt;/xsl:when&gt;
+    &lt;!-- otherwise it's a pointer to some other document --&gt;
+  &lt;/xsl:choose&gt;
+&lt;/xsl:template&gt;</src:fragment></programlisting>
+
+</refsect1>
+</refentry>
+
+
+<!-- ================================================================== -->
+
+<refentry id="length-magnitude">
+<refnamediv>
+<refname>length-magnitude</refname>
+<refpurpose>Return the unqualified dimension from a length specification</refpurpose>
+</refnamediv>
+
+<refsect1><title>Description</title>
+
+<para>The <function moreinfo="none">length-magnitude</function> template returns the
+unqualified length ("20" for "20pt") from a dimension.
+</para>
+
+<programlisting format="linespecific"><src:fragment id="length-magnitude.frag">&lt;xsl:template name="length-magnitude"&gt;
+  &lt;xsl:param name="length"
+             select="'0pt'"/&gt;
+
+  &lt;xsl:choose&gt;
+    &lt;xsl:when test="string-length($length) = 0"/&gt;
+    &lt;xsl:when test="substring($length,1,1) = '0'                     or substring($length,1,1) = '1'                     or substring($length,1,1) = '2'                     or substring($length,1,1) = '3'                     or substring($length,1,1) = '4'                     or substring($length,1,1) = '5'                     or substring($length,1,1) = '6'                     or substring($length,1,1) = '7'                     or substring($length,1,1) = '8'                     or substring($length,1,1) = '9'                     or substring($length,1,1) = '.'"&gt;
+      &lt;xsl:value-of select="substring($length,1,1)"/&gt;
+      &lt;xsl:call-template name="length-magnitude"&gt;
+        &lt;xsl:with-param name="length"
+                        select="substring($length,2)"/&gt;
+      &lt;/xsl:call-template&gt;
+    &lt;/xsl:when&gt;
+  &lt;/xsl:choose&gt;
+&lt;/xsl:template&gt;</src:fragment></programlisting>
+
+</refsect1>
+</refentry>
+
+<!-- ================================================================== -->
+
+<refentry id="length-units">
+<refnamediv>
+<refname>length-units</refname>
+<refpurpose>Return the units from a length specification</refpurpose>
+</refnamediv>
+
+<refsect1><title>Description</title>
+
+<para>The <function moreinfo="none">length-units</function> template returns the
+units ("pt" for "20pt") from a length. If no units are supplied on the
+length, the <parameter moreinfo="none">defauilt.units</parameter> are returned.</para>
+
+<programlisting format="linespecific"><src:fragment id="length-units.frag">&lt;xsl:template name="length-units"&gt;
+  &lt;xsl:param name="length"
+             select="'0pt'"/&gt;
+  &lt;xsl:param name="default.units"
+             select="'px'"/&gt;
+  &lt;xsl:variable name="magnitude"&gt;
+    &lt;xsl:call-template name="length-magnitude"&gt;
+      &lt;xsl:with-param name="length"
+                      select="$length"/&gt;
+    &lt;/xsl:call-template&gt;
+  &lt;/xsl:variable&gt;
+
+  &lt;xsl:variable name="units"&gt;
+    &lt;xsl:value-of select="substring($length, string-length($magnitude)+1)"/&gt;
+  &lt;/xsl:variable&gt;
+
+  &lt;xsl:choose&gt;
+    &lt;xsl:when test="$units = ''"&gt;
+      &lt;xsl:value-of select="$default.units"/&gt;
+    &lt;/xsl:when&gt;
+    &lt;xsl:otherwise&gt;
+      &lt;xsl:value-of select="$units"/&gt;
+    &lt;/xsl:otherwise&gt;
+  &lt;/xsl:choose&gt;
+&lt;/xsl:template&gt;</src:fragment></programlisting>
+
+</refsect1>
+</refentry>
+
+<!-- ================================================================== -->
+
+<refentry id="length-spec">
+<refnamediv>
+<refname>length-spec</refname>
+<refpurpose>Return a fully qualified length specification</refpurpose>
+</refnamediv>
+
+<refsect1><title>Description</title>
+
+<para>The <function moreinfo="none">length-spec</function> template returns the
+qualified length from a dimension. If an unqualified length is given,
+the <parameter moreinfo="none">default.units</parameter> will be added to it.
+</para>
+
+<programlisting format="linespecific"><src:fragment id="length-spec.frag">&lt;xsl:template name="length-spec"&gt;
+  &lt;xsl:param name="length"
+             select="'0pt'"/&gt;
+  &lt;xsl:param name="default.units"
+             select="'px'"/&gt;
+
+  &lt;xsl:variable name="magnitude"&gt;
+    &lt;xsl:call-template name="length-magnitude"&gt;
+      &lt;xsl:with-param name="length"
+                      select="$length"/&gt;
+    &lt;/xsl:call-template&gt;
+  &lt;/xsl:variable&gt;
+
+  &lt;xsl:variable name="units"&gt;
+    &lt;xsl:value-of select="substring($length, string-length($magnitude)+1)"/&gt;
+  &lt;/xsl:variable&gt;
+
+  &lt;xsl:value-of select="$magnitude"/&gt;
+  &lt;xsl:choose&gt;
+    &lt;xsl:when test="$units='cm'                     or $units='mm'                     or $units='in'                     or $units='pt'                     or $units='pc'                     or $units='px'                     or $units='em'"&gt;
+      &lt;xsl:value-of select="$units"/&gt;
+    &lt;/xsl:when&gt;
+    &lt;xsl:when test="$units = ''"&gt;
+      &lt;xsl:value-of select="$default.units"/&gt;
+    &lt;/xsl:when&gt;
+    &lt;xsl:otherwise&gt;
+      &lt;xsl:message&gt;
+        &lt;xsl:text&gt;Unrecognized unit of measure: &lt;/xsl:text&gt;
+        &lt;xsl:value-of select="$units"/&gt;
+        &lt;xsl:text&gt;.&lt;/xsl:text&gt;
+      &lt;/xsl:message&gt;
+    &lt;/xsl:otherwise&gt;
+  &lt;/xsl:choose&gt;
+&lt;/xsl:template&gt;</src:fragment></programlisting>
+
+</refsect1>
+</refentry>
+
+<!-- ================================================================== -->
+
+<refentry id="length-in-points">
+<refnamediv>
+<refname>length-in-points</refname>
+<refpurpose>Returns the size, in points, of a specified length</refpurpose>
+</refnamediv>
+
+<refsect1><title>Description</title>
+
+<para>The <function moreinfo="none">length-in-points</function> template converts a length
+specification to points and returns that value as an unqualified
+number.
+</para>
+
+<caution>
+<para>There is no way for the template to infer the size of an
+<literal moreinfo="none">em</literal>. It relies on the default <parameter moreinfo="none">em.size</parameter>
+which is initially <literal moreinfo="none">10</literal> (for 10pt).</para>
+
+<para>Similarly, converting pixesl to points relies on the
+<parameter moreinfo="none">pixels.per.inch</parameter> parameter which is initially
+<literal moreinfo="none">90</literal>.
+</para>
+</caution>
+
+<programlisting format="linespecific"><src:fragment id="length-in-points.frag">&lt;xsl:template name="length-in-points"&gt;
+  &lt;xsl:param name="length"
+             select="'0pt'"/&gt;
+  &lt;xsl:param name="em.size"
+             select="10"/&gt;
+  &lt;xsl:param name="pixels.per.inch"
+             select="90"/&gt;
+
+  &lt;xsl:variable name="magnitude"&gt;
+    &lt;xsl:call-template name="length-magnitude"&gt;
+      &lt;xsl:with-param name="length"
+                      select="$length"/&gt;
+    &lt;/xsl:call-template&gt;
+  &lt;/xsl:variable&gt;
+
+  &lt;xsl:variable name="units"&gt;
+    &lt;xsl:value-of select="substring($length, string-length($magnitude)+1)"/&gt;
+  &lt;/xsl:variable&gt;
+
+  &lt;xsl:choose&gt;
+    &lt;xsl:when test="$units = 'pt'"&gt;
+      &lt;xsl:value-of select="$magnitude"/&gt;
+    &lt;/xsl:when&gt;
+    &lt;xsl:when test="$units = 'cm'"&gt;
+      &lt;xsl:value-of select="$magnitude div 2.54 * 72.0"/&gt;
+    &lt;/xsl:when&gt;
+    &lt;xsl:when test="$units = 'mm'"&gt;
+      &lt;xsl:value-of select="$magnitude div 25.4 * 72.0"/&gt;
+    &lt;/xsl:when&gt;
+    &lt;xsl:when test="$units = 'in'"&gt;
+      &lt;xsl:value-of select="$magnitude * 72.0"/&gt;
+    &lt;/xsl:when&gt;
+    &lt;xsl:when test="$units = 'pc'"&gt;
+      &lt;xsl:value-of select="$magnitude div 6.0 * 72.0"/&gt;
+    &lt;/xsl:when&gt;
+    &lt;xsl:when test="$units = 'px'"&gt;
+      &lt;xsl:value-of select="$magnitude div $pixels.per.inch * 72.0"/&gt;
+    &lt;/xsl:when&gt;
+    &lt;xsl:when test="$units = 'em'"&gt;
+      &lt;xsl:value-of select="$magnitude * $em.size"/&gt;
+    &lt;/xsl:when&gt;
+    &lt;xsl:otherwise&gt;
+      &lt;xsl:message&gt;
+        &lt;xsl:text&gt;Unrecognized unit of measure: &lt;/xsl:text&gt;
+        &lt;xsl:value-of select="$units"/&gt;
+        &lt;xsl:text&gt;.&lt;/xsl:text&gt;
+      &lt;/xsl:message&gt;
+    &lt;/xsl:otherwise&gt;
+  &lt;/xsl:choose&gt;
+&lt;/xsl:template&gt;</src:fragment></programlisting>
+
+</refsect1>
+</refentry>
+
+<!-- ================================================================== -->
+
+<refentry id="pi-attribute">
+<refnamediv>
+<refname>pi-attribute</refname>
+<refpurpose>Extract a pseudo-attribute from a PI</refpurpose>
+</refnamediv>
+
+<refsect1><title>Description</title>
+
+<para>The <function moreinfo="none">pi-attribute</function> template extracts a pseudo-attribute
+from a processing instruction. For example, given the PI
+<quote><literal moreinfo="none">&lt;?foo bar="1" baz='red'?&gt;</literal></quote>,</para>
+<programlisting format="linespecific">&lt;xsl:call-template name="pi-attribute"&gt;
+  &lt;xsl:with-param name="pis" select="processing-instruction('foo')"/&gt;
+  &lt;xsl:with-param name="attribute" select="'baz'"/&gt;
+&lt;/xsl:call-template&gt;</programlisting>
+<para>will return <quote>red</quote>. This template returns the first matching
+attribute that it finds. Presented with processing instructions that
+contain badly formed pseudo-attributes (missing or unbalanced quotes,
+for example), the template may silently return erroneous results.</para>
+
+<programlisting format="linespecific"><src:fragment id="pi-attribute.frag">&lt;xsl:template name="pi-attribute"&gt;
+  &lt;xsl:param name="pis"
+             select="processing-instruction('')"/&gt;
+  &lt;xsl:param name="attribute"&gt;filename&lt;/xsl:param&gt;
+  &lt;xsl:param name="count"&gt;1&lt;/xsl:param&gt;
+
+  &lt;xsl:choose&gt;
+    &lt;xsl:when test="$count&gt;count($pis)"&gt;
+      &lt;!-- not found --&gt;
+    &lt;/xsl:when&gt;
+    &lt;xsl:otherwise&gt;
+      &lt;xsl:variable name="pi"&gt;
+        &lt;xsl:value-of select="$pis[$count]"/&gt;
+      &lt;/xsl:variable&gt;
+      &lt;xsl:choose&gt;
+        &lt;xsl:when test="contains($pi,concat($attribute, '='))"&gt;
+          &lt;xsl:variable name="rest"
+                        select="substring-after($pi,concat($attribute,'='))"/&gt;
+          &lt;xsl:variable name="quote"
+                        select="substring($rest,1,1)"/&gt;
+          &lt;xsl:value-of select="substring-before(substring($rest,2),$quote)"/&gt;
+        &lt;/xsl:when&gt;
+        &lt;xsl:otherwise&gt;
+          &lt;xsl:call-template name="pi-attribute"&gt;
+            &lt;xsl:with-param name="pis"
+                            select="$pis"/&gt;
+            &lt;xsl:with-param name="attribute"
+                            select="$attribute"/&gt;
+            &lt;xsl:with-param name="count"
+                            select="$count + 1"/&gt;
+          &lt;/xsl:call-template&gt;
+        &lt;/xsl:otherwise&gt;
+      &lt;/xsl:choose&gt;
+    &lt;/xsl:otherwise&gt;
+  &lt;/xsl:choose&gt;
+&lt;/xsl:template&gt;</src:fragment></programlisting>
+
+</refsect1>
+</refentry>
+
+<!-- ================================================================== -->
+
+<refentry id="lookup.key">
+<refnamediv>
+<refname>lookup.key</refname>
+<refpurpose>Retrieve the value associated with a particular key in a table</refpurpose>
+</refnamediv>
+
+<refsect1><title>Description</title>
+
+<para>Given a table of space-delimited key/value pairs,
+the <function moreinfo="none">lookup.key</function> template extracts the value associated
+with a particular key.</para>
+
+<programlisting format="linespecific"><src:fragment id="lookup.key.frag">&lt;xsl:template name="lookup.key"&gt;
+  &lt;xsl:param name="key"
+             select="''"/&gt;
+  &lt;xsl:param name="table"
+             select="''"/&gt;
+
+  &lt;xsl:if test="contains($table, ' ')"&gt;
+    &lt;xsl:choose&gt;
+      &lt;xsl:when test="substring-before($table, ' ') = $key"&gt;
+        &lt;xsl:variable name="rest"
+                      select="substring-after($table, ' ')"/&gt;
+        &lt;xsl:choose&gt;
+          &lt;xsl:when test="contains($rest, ' ')"&gt;
+            &lt;xsl:value-of select="substring-before($rest, ' ')"/&gt;
+          &lt;/xsl:when&gt;
+          &lt;xsl:otherwise&gt;
+            &lt;xsl:value-of select="$rest"/&gt;
+          &lt;/xsl:otherwise&gt;
+        &lt;/xsl:choose&gt;
+      &lt;/xsl:when&gt;
+      &lt;xsl:otherwise&gt;
+        &lt;xsl:call-template name="lookup.key"&gt;
+          &lt;xsl:with-param name="key"
+                          select="$key"/&gt;
+          &lt;xsl:with-param name="table"
+                          select="substring-after(substring-after($table,' '), ' ')"/&gt;
+        &lt;/xsl:call-template&gt;
+      &lt;/xsl:otherwise&gt;
+    &lt;/xsl:choose&gt;
+  &lt;/xsl:if&gt;
+&lt;/xsl:template&gt;</src:fragment></programlisting>
+
+</refsect1>
+</refentry>
+
+<!-- ================================================================== -->
+
+<refentry id="xpath.location">
+<refnamediv>
+<refname>xpath.location</refname>
+<refpurpose>Calculate the XPath child-sequence to the current node</refpurpose>
+</refnamediv>
+
+<refsect1><title>Description</title>
+
+<para>The <function moreinfo="none">xpath.location</function> template calculates the
+absolute path from the root of the tree to the current element node.
+</para>
+
+<programlisting format="linespecific"><src:fragment id="xpath.location.frag">&lt;xsl:template name="xpath.location"&gt;
+  &lt;xsl:param name="node"
+             select="."/&gt;
+  &lt;xsl:param name="path"
+             select="''"/&gt;
+
+  &lt;xsl:variable name="next.path"&gt;
+    &lt;xsl:value-of select="local-name($node)"/&gt;
+    &lt;xsl:if test="$path != ''"&gt;/&lt;/xsl:if&gt;
+    &lt;xsl:value-of select="$path"/&gt;
+  &lt;/xsl:variable&gt;
+
+  &lt;xsl:choose&gt;
+    &lt;xsl:when test="$node/parent::*"&gt;
+      &lt;xsl:call-template name="xpath.location"&gt;
+        &lt;xsl:with-param name="node"
+                        select="$node/parent::*"/&gt;
+        &lt;xsl:with-param name="path"
+                        select="$next.path"/&gt;
+      &lt;/xsl:call-template&gt;
+    &lt;/xsl:when&gt;
+    &lt;xsl:otherwise&gt;
+      &lt;xsl:text&gt;/&lt;/xsl:text&gt;
+      &lt;xsl:value-of select="$next.path"/&gt;
+    &lt;/xsl:otherwise&gt;
+  &lt;/xsl:choose&gt;
+&lt;/xsl:template&gt;</src:fragment></programlisting>
+
+</refsect1>
+</refentry>
+
+<!-- ================================================================== -->
+
+<refentry id="comment-escape-string">
+<refnamediv>
+<refname>comment-escape-string</refname>
+<refpurpose>Prepare a string for inclusion in an XML comment</refpurpose>
+</refnamediv>
+
+<refsect1><title>Description</title>
+
+<para>The <function moreinfo="none">comment-escape-string</function> template returns a string
+that has been transformed so that it can safely be output as an XML comment.
+Internal occurrences of "--" will be replaced with "- -" and a leading and/or
+trailing space will be added to the string, if necessary.</para>
+
+<programlisting format="linespecific"><src:fragment id="comment-escape-string">&lt;xsl:template name="comment-escape-string"&gt;
+  &lt;xsl:param name="string"
+             select="''"/&gt;
+
+  &lt;xsl:if test="starts-with($string, '-')"&gt;
+    &lt;xsl:text&gt; &lt;/xsl:text&gt;
+  &lt;/xsl:if&gt;
+
+  &lt;xsl:call-template name="comment-escape-string.recursive"&gt;
+    &lt;xsl:with-param name="string"
+                    select="$string"/&gt;
+  &lt;/xsl:call-template&gt;
+
+  &lt;xsl:if test="substring($string, string-length($string), 1) = '-'"&gt;
+    &lt;xsl:text&gt; &lt;/xsl:text&gt;
+  &lt;/xsl:if&gt;
+&lt;/xsl:template&gt;</src:fragment></programlisting>
+
+</refsect1>
+</refentry>
+
+<refentry id="comment-escape-string.recursive">
+<refnamediv>
+<refname>comment-escape-string.recursive</refname>
+<refpurpose>Internal function used by comment-escape-string</refpurpose>
+</refnamediv>
+
+<refsect1><title>Description</title>
+
+<para>The <function moreinfo="none">comment-escape-string.recursive</function> template is used
+by <function moreinfo="none">comment-escape-string</function>.</para>
+
+<programlisting format="linespecific"><src:fragment id="comment-escape-string.recursive">&lt;xsl:template name="comment-escape-string.recursive"&gt;
+  &lt;xsl:param name="string"
+             select="''"/&gt;
+  &lt;xsl:choose&gt;
+    &lt;xsl:when test="contains($string, '--')"&gt;
+      &lt;xsl:value-of select="substring-before($string, '--')"/&gt;
+      &lt;xsl:value-of select="'- -'"/&gt;
+      &lt;xsl:call-template name="comment-escape-string.recursive"&gt;
+        &lt;xsl:with-param name="string"
+                        select="substring-after($string, '--')"/&gt;
+      &lt;/xsl:call-template&gt;
+    &lt;/xsl:when&gt;
+    &lt;xsl:otherwise&gt;
+      &lt;xsl:value-of select="$string"/&gt;
+    &lt;/xsl:otherwise&gt;
+  &lt;/xsl:choose&gt;
+&lt;/xsl:template&gt;</src:fragment></programlisting>
+</refsect1>
+</refentry>
+
+</reference>
+
+<reference>
+<title>Relative URI Functions</title>
+
+<partintro><title>Introduction</title>
+
+<para>These functions manipulate relative URI references.</para>
+
+<para>The following assumptions must hold true:</para>
+
+<orderedlist inheritnum="ignore" continuation="restarts">
+<listitem>
+<para>All URIs are relative.</para>
+</listitem>
+<listitem>
+<para>No URI contains the <quote><literal moreinfo="none">../</literal></quote> sequence
+which would effectively move <quote>up</quote> the hierarchy.</para>
+</listitem>
+</orderedlist>
+
+<para>If these assumptions do not hold, the results are unpredictable.</para>
+
+</partintro>
+
+<refentry id="count.uri.path.depth">
+<refnamediv>
+<refname>count.uri.path.depth</refname>
+<refpurpose>Count the number of path components in a relative URI</refpurpose>
+</refnamediv>
+
+<refsect1><title>Description</title>
+
+<para>This function counts the number of path components in a relative URI.</para>
+
+<programlisting format="linespecific"><src:fragment id="count.uri.path.depth.frag">&lt;xsl:template name="count.uri.path.depth"&gt;
+  &lt;xsl:param name="filename"
+             select="''"/&gt;
+  &lt;xsl:param name="count"
+             select="0"/&gt;
+
+  &lt;xsl:choose&gt;
+    &lt;xsl:when test="contains($filename, '/')"&gt;
+      &lt;xsl:call-template name="count.uri.path.depth"&gt;
+        &lt;xsl:with-param name="filename"
+                        select="substring-after($filename, '/')"/&gt;
+        &lt;xsl:with-param name="count"
+                        select="$count + 1"/&gt;
+      &lt;/xsl:call-template&gt;
+    &lt;/xsl:when&gt;
+    &lt;xsl:otherwise&gt;
+      &lt;xsl:value-of select="$count"/&gt;
+    &lt;/xsl:otherwise&gt;
+  &lt;/xsl:choose&gt;
+&lt;/xsl:template&gt;</src:fragment></programlisting>
+
+</refsect1>
+</refentry>
+
+<refentry id="trim.common.uri.paths">
+<refnamediv>
+<refname>trim.common.uri.paths</refname>
+<refpurpose>Trim common leading path components from a relative URI</refpurpose>
+</refnamediv>
+
+<refsect1><title>Description</title>
+
+<para>This function trims common leading path components from a relative URI.</para>
+
+<programlisting format="linespecific"><src:fragment id="trim.common.uri.paths.frag">&lt;xsl:template name="trim.common.uri.paths"&gt;
+  &lt;xsl:param name="uriA"
+             select="''"/&gt;
+  &lt;xsl:param name="uriB"
+             select="''"/&gt;
+  &lt;xsl:param name="return"
+             select="'A'"/&gt;
+
+  &lt;xsl:choose&gt;
+    &lt;xsl:when test="contains($uriA, '/') and contains($uriB, '/')                     and substring-before($uriA, '/') = substring-before($uriB, '/')"&gt;
+      &lt;xsl:call-template name="trim.common.uri.paths"&gt;
+        &lt;xsl:with-param name="uriA"
+                        select="substring-after($uriA, '/')"/&gt;
+        &lt;xsl:with-param name="uriB"
+                        select="substring-after($uriB, '/')"/&gt;
+        &lt;xsl:with-param name="return"
+                        select="$return"/&gt;
+      &lt;/xsl:call-template&gt;
+    &lt;/xsl:when&gt;
+    &lt;xsl:otherwise&gt;
+      &lt;xsl:choose&gt;
+        &lt;xsl:when test="$return = 'A'"&gt;
+          &lt;xsl:value-of select="$uriA"/&gt;
+        &lt;/xsl:when&gt;
+        &lt;xsl:otherwise&gt;
+          &lt;xsl:value-of select="$uriB"/&gt;
+        &lt;/xsl:otherwise&gt;
+      &lt;/xsl:choose&gt;
+    &lt;/xsl:otherwise&gt;
+  &lt;/xsl:choose&gt;
+&lt;/xsl:template&gt;</src:fragment></programlisting>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+<appendix><title>The Stylesheet</title>
+
+<para>The <filename moreinfo="none">lib.xsl</filename> stylesheet is just a wrapper
+around these functions.</para>
+
+<src:fragment id="top">
+&lt;!-- ********************************************************************
+     $Id: lib.xml,v 1.1.1.1 2004/10/19 21:21:48 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     This module implements DTD-independent functions
+
+     ******************************************************************** --&gt;
+
+&lt;xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                exclude-result-prefixes="src"
+                version="1.0"&gt;
+
+<src:fragref linkend="dot.count.frag"/>
+<src:fragref linkend="copy-string.frag"/>
+<src:fragref linkend="string.subst.frag"/>
+<src:fragref linkend="xpointer.idref.frag"/>
+<src:fragref linkend="length-magnitude.frag"/>
+<src:fragref linkend="length-units.frag"/>
+<src:fragref linkend="length-spec.frag"/>
+<src:fragref linkend="length-in-points.frag"/>
+<src:fragref linkend="pi-attribute.frag"/>
+<src:fragref linkend="lookup.key.frag"/>
+<src:fragref linkend="xpath.location.frag"/>
+<src:fragref linkend="comment-escape-string"/>
+<src:fragref linkend="comment-escape-string.recursive"/>
+<src:fragref linkend="count.uri.path.depth.frag"/>
+<src:fragref linkend="trim.common.uri.paths.frag"/>
+
+&lt;/xsl:stylesheet&gt;</src:fragment>
+
+</appendix>
+</book>
\ No newline at end of file

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/lib/lib.xsl
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/lib/lib.xsl	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/lib/lib.xsl	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,383 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!-- ********************************************************************
+     $Id: lib.xsl,v 1.1.1.1 2004/10/19 21:21:49 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     This module implements DTD-independent functions
+
+     ******************************************************************** -->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:src="http://nwalsh.com/xmlns/litprog/fragment" exclude-result-prefixes="src" version="1.0">
+
+
+<xsl:template name="dot.count">
+  <!-- Returns the number of "." characters in a string -->
+  <xsl:param name="string"/>
+  <xsl:param name="count" select="0"/>
+  <xsl:choose>
+    <xsl:when test="contains($string, '.')">
+      <xsl:call-template name="dot.count">
+        <xsl:with-param name="string" select="substring-after($string, '.')"/>
+        <xsl:with-param name="count" select="$count+1"/>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:value-of select="$count"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+
+<xsl:template name="copy-string">
+  <!-- returns 'count' copies of 'string' -->
+  <xsl:param name="string"/>
+  <xsl:param name="count" select="0"/>
+  <xsl:param name="result"/>
+
+  <xsl:choose>
+    <xsl:when test="$count&gt;0">
+      <xsl:call-template name="copy-string">
+        <xsl:with-param name="string" select="$string"/>
+        <xsl:with-param name="count" select="$count - 1"/>
+        <xsl:with-param name="result">
+          <xsl:value-of select="$result"/>
+          <xsl:value-of select="$string"/>
+        </xsl:with-param>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:value-of select="$result"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+
+<xsl:template name="string.subst">
+  <xsl:param name="string"/>
+  <xsl:param name="target"/>
+  <xsl:param name="replacement"/>
+
+  <xsl:choose>
+    <xsl:when test="contains($string, $target)">
+      <xsl:variable name="rest">
+        <xsl:call-template name="string.subst">
+          <xsl:with-param name="string" select="substring-after($string, $target)"/>
+          <xsl:with-param name="target" select="$target"/>
+          <xsl:with-param name="replacement" select="$replacement"/>
+        </xsl:call-template>
+      </xsl:variable>
+      <xsl:value-of select="concat(substring-before($string, $target),                                    $replacement,                                    $rest)"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:value-of select="$string"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+
+<xsl:template name="xpointer.idref">
+  <xsl:param name="xpointer">http://...</xsl:param>
+  <xsl:choose>
+    <xsl:when test="starts-with($xpointer, '#xpointer(id(')">
+      <xsl:variable name="rest" select="substring-after($xpointer, '#xpointer(id(')"/>
+      <xsl:variable name="quote" select="substring($rest, 1, 1)"/>
+      <xsl:value-of select="substring-before(substring-after($xpointer, $quote), $quote)"/>
+    </xsl:when>
+    <xsl:when test="starts-with($xpointer, '#')">
+      <xsl:value-of select="substring-after($xpointer, '#')"/>
+    </xsl:when>
+    <!-- otherwise it's a pointer to some other document -->
+  </xsl:choose>
+</xsl:template>
+
+
+<xsl:template name="length-magnitude">
+  <xsl:param name="length" select="'0pt'"/>
+
+  <xsl:choose>
+    <xsl:when test="string-length($length) = 0"/>
+    <xsl:when test="substring($length,1,1) = '0'                     or substring($length,1,1) = '1'                     or substring($length,1,1) = '2'                     or substring($length,1,1) = '3'                     or substring($length,1,1) = '4'                     or substring($length,1,1) = '5'                     or substring($length,1,1) = '6'                     or substring($length,1,1) = '7'                     or substring($length,1,1) = '8'                     or substring($length,1,1) = '9'                     or substring($length,1,1) = '.'">
+      <xsl:value-of select="substring($length,1,1)"/>
+      <xsl:call-template name="length-magnitude">
+        <xsl:with-param name="length" select="substring($length,2)"/>
+      </xsl:call-template>
+    </xsl:when>
+  </xsl:choose>
+</xsl:template>
+
+
+<xsl:template name="length-units">
+  <xsl:param name="length" select="'0pt'"/>
+  <xsl:param name="default.units" select="'px'"/>
+  <xsl:variable name="magnitude">
+    <xsl:call-template name="length-magnitude">
+      <xsl:with-param name="length" select="$length"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="units">
+    <xsl:value-of select="substring($length, string-length($magnitude)+1)"/>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="$units = ''">
+      <xsl:value-of select="$default.units"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:value-of select="$units"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+
+<xsl:template name="length-spec">
+  <xsl:param name="length" select="'0pt'"/>
+  <xsl:param name="default.units" select="'px'"/>
+
+  <xsl:variable name="magnitude">
+    <xsl:call-template name="length-magnitude">
+      <xsl:with-param name="length" select="$length"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="units">
+    <xsl:value-of select="substring($length, string-length($magnitude)+1)"/>
+  </xsl:variable>
+
+  <xsl:value-of select="$magnitude"/>
+  <xsl:choose>
+    <xsl:when test="$units='cm'                     or $units='mm'                     or $units='in'                     or $units='pt'                     or $units='pc'                     or $units='px'                     or $units='em'">
+      <xsl:value-of select="$units"/>
+    </xsl:when>
+    <xsl:when test="$units = ''">
+      <xsl:value-of select="$default.units"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:message>
+        <xsl:text>Unrecognized unit of measure: </xsl:text>
+        <xsl:value-of select="$units"/>
+        <xsl:text>.</xsl:text>
+      </xsl:message>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+
+<xsl:template name="length-in-points">
+  <xsl:param name="length" select="'0pt'"/>
+  <xsl:param name="em.size" select="10"/>
+  <xsl:param name="pixels.per.inch" select="90"/>
+
+  <xsl:variable name="magnitude">
+    <xsl:call-template name="length-magnitude">
+      <xsl:with-param name="length" select="$length"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="units">
+    <xsl:value-of select="substring($length, string-length($magnitude)+1)"/>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="$units = 'pt'">
+      <xsl:value-of select="$magnitude"/>
+    </xsl:when>
+    <xsl:when test="$units = 'cm'">
+      <xsl:value-of select="$magnitude div 2.54 * 72.0"/>
+    </xsl:when>
+    <xsl:when test="$units = 'mm'">
+      <xsl:value-of select="$magnitude div 25.4 * 72.0"/>
+    </xsl:when>
+    <xsl:when test="$units = 'in'">
+      <xsl:value-of select="$magnitude * 72.0"/>
+    </xsl:when>
+    <xsl:when test="$units = 'pc'">
+      <xsl:value-of select="$magnitude div 6.0 * 72.0"/>
+    </xsl:when>
+    <xsl:when test="$units = 'px'">
+      <xsl:value-of select="$magnitude div $pixels.per.inch * 72.0"/>
+    </xsl:when>
+    <xsl:when test="$units = 'em'">
+      <xsl:value-of select="$magnitude * $em.size"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:message>
+        <xsl:text>Unrecognized unit of measure: </xsl:text>
+        <xsl:value-of select="$units"/>
+        <xsl:text>.</xsl:text>
+      </xsl:message>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+
+<xsl:template name="pi-attribute">
+  <xsl:param name="pis" select="processing-instruction('')"/>
+  <xsl:param name="attribute">filename</xsl:param>
+  <xsl:param name="count">1</xsl:param>
+
+  <xsl:choose>
+    <xsl:when test="$count&gt;count($pis)">
+      <!-- not found -->
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:variable name="pi">
+        <xsl:value-of select="$pis[$count]"/>
+      </xsl:variable>
+      <xsl:choose>
+        <xsl:when test="contains($pi,concat($attribute, '='))">
+          <xsl:variable name="rest" select="substring-after($pi,concat($attribute,'='))"/>
+          <xsl:variable name="quote" select="substring($rest,1,1)"/>
+          <xsl:value-of select="substring-before(substring($rest,2),$quote)"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:call-template name="pi-attribute">
+            <xsl:with-param name="pis" select="$pis"/>
+            <xsl:with-param name="attribute" select="$attribute"/>
+            <xsl:with-param name="count" select="$count + 1"/>
+          </xsl:call-template>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+
+<xsl:template name="lookup.key">
+  <xsl:param name="key" select="''"/>
+  <xsl:param name="table" select="''"/>
+
+  <xsl:if test="contains($table, ' ')">
+    <xsl:choose>
+      <xsl:when test="substring-before($table, ' ') = $key">
+        <xsl:variable name="rest" select="substring-after($table, ' ')"/>
+        <xsl:choose>
+          <xsl:when test="contains($rest, ' ')">
+            <xsl:value-of select="substring-before($rest, ' ')"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:value-of select="$rest"/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:call-template name="lookup.key">
+          <xsl:with-param name="key" select="$key"/>
+          <xsl:with-param name="table" select="substring-after(substring-after($table,' '), ' ')"/>
+        </xsl:call-template>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:if>
+</xsl:template>
+
+
+<xsl:template name="xpath.location">
+  <xsl:param name="node" select="."/>
+  <xsl:param name="path" select="''"/>
+
+  <xsl:variable name="next.path">
+    <xsl:value-of select="local-name($node)"/>
+    <xsl:if test="$path != ''">/</xsl:if>
+    <xsl:value-of select="$path"/>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="$node/parent::*">
+      <xsl:call-template name="xpath.location">
+        <xsl:with-param name="node" select="$node/parent::*"/>
+        <xsl:with-param name="path" select="$next.path"/>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:text>/</xsl:text>
+      <xsl:value-of select="$next.path"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+
+<xsl:template name="comment-escape-string">
+  <xsl:param name="string" select="''"/>
+
+  <xsl:if test="starts-with($string, '-')">
+    <xsl:text> </xsl:text>
+  </xsl:if>
+
+  <xsl:call-template name="comment-escape-string.recursive">
+    <xsl:with-param name="string" select="$string"/>
+  </xsl:call-template>
+
+  <xsl:if test="substring($string, string-length($string), 1) = '-'">
+    <xsl:text> </xsl:text>
+  </xsl:if>
+</xsl:template>
+
+
+<xsl:template name="comment-escape-string.recursive">
+  <xsl:param name="string" select="''"/>
+  <xsl:choose>
+    <xsl:when test="contains($string, '--')">
+      <xsl:value-of select="substring-before($string, '--')"/>
+      <xsl:value-of select="'- -'"/>
+      <xsl:call-template name="comment-escape-string.recursive">
+        <xsl:with-param name="string" select="substring-after($string, '--')"/>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:value-of select="$string"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+
+<xsl:template name="count.uri.path.depth">
+  <xsl:param name="filename" select="''"/>
+  <xsl:param name="count" select="0"/>
+
+  <xsl:choose>
+    <xsl:when test="contains($filename, '/')">
+      <xsl:call-template name="count.uri.path.depth">
+        <xsl:with-param name="filename" select="substring-after($filename, '/')"/>
+        <xsl:with-param name="count" select="$count + 1"/>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:value-of select="$count"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+
+<xsl:template name="trim.common.uri.paths">
+  <xsl:param name="uriA" select="''"/>
+  <xsl:param name="uriB" select="''"/>
+  <xsl:param name="return" select="'A'"/>
+
+  <xsl:choose>
+    <xsl:when test="contains($uriA, '/') and contains($uriB, '/')                     and substring-before($uriA, '/') = substring-before($uriB, '/')">
+      <xsl:call-template name="trim.common.uri.paths">
+        <xsl:with-param name="uriA" select="substring-after($uriA, '/')"/>
+        <xsl:with-param name="uriB" select="substring-after($uriB, '/')"/>
+        <xsl:with-param name="return" select="$return"/>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:choose>
+        <xsl:when test="$return = 'A'">
+          <xsl:value-of select="$uriA"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="$uriB"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+
+</xsl:stylesheet>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/lib/lib.xweb
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/lib/lib.xweb	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/lib/lib.xweb	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,769 @@
+<book xmlns:src="http://nwalsh.com/xmlns/litprog/fragment"
+      xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<bookinfo>
+<title>XSL Library Template Reference</title>
+<releaseinfo role="cvs">$Id: lib.xweb,v 1.1.1.1 2004/10/19 21:21:49 juntao Exp $
+</releaseinfo>
+<corpauthor>DocBook Open Repository Team</corpauthor>
+<copyright>
+  <year>1999</year>
+  <year>2000</year>
+  <year>2001</year>
+  <year>2002</year>
+  <holder>Norman Walsh</holder>
+</copyright>
+</bookinfo>
+
+<preface><title>Introduction</title>
+
+<para>This is technical reference documentation for the DocBook XSL
+Stylesheets; it documents (some of) the parameters, templates, and
+other elements of the stylesheets.</para>
+
+<para>This is not intended to be <quote>user</quote> documentation.
+It is provided for developers writing customization layers for the
+stylesheets, and for anyone who's interested in <quote>how it
+works</quote>.</para>
+
+<para>Although I am trying to be thorough, this documentation is known
+to be incomplete. Don't forget to read the source, too :-)</para>
+
+</preface>
+
+<reference>
+<title>General Library Templates</title>
+
+<refentry id="dot.count">
+<refnamediv>
+<refname>dot.count</refname>
+<refpurpose>Returns the number of <quote>.</quote> characters in a string</refpurpose>
+</refnamediv>
+
+<refsect1><title>Description</title>
+
+<programlisting><src:fragment id='dot.count.frag'>
+<xsl:template name="dot.count">
+  <!-- Returns the number of "." characters in a string -->
+  <xsl:param name="string"></xsl:param>
+  <xsl:param name="count" select="0"/>
+  <xsl:choose>
+    <xsl:when test="contains($string, '.')">
+      <xsl:call-template name="dot.count">
+        <xsl:with-param name="string" select="substring-after($string, '.')"/>
+        <xsl:with-param name="count" select="$count+1"/>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:value-of select="$count"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+</src:fragment></programlisting>
+
+</refsect1>
+</refentry>
+
+<!-- ================================================================== -->
+
+<refentry id="copy-string">
+<refnamediv>
+<refname>copy-string</refname>
+<refpurpose>Returns <quote>count</quote> copies of a string</refpurpose>
+</refnamediv>
+
+<refsect1><title>Description</title>
+
+<programlisting><src:fragment id='copy-string.frag'>
+<xsl:template name="copy-string">
+  <!-- returns 'count' copies of 'string' -->
+  <xsl:param name="string"></xsl:param>
+  <xsl:param name="count" select="0"/>
+  <xsl:param name="result"></xsl:param>
+
+  <xsl:choose>
+    <xsl:when test="$count>0">
+      <xsl:call-template name="copy-string">
+        <xsl:with-param name="string" select="$string"/>
+        <xsl:with-param name="count" select="$count - 1"/>
+        <xsl:with-param name="result">
+          <xsl:value-of select="$result"/>
+          <xsl:value-of select="$string"/>
+        </xsl:with-param>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:value-of select="$result"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+</src:fragment></programlisting>
+
+</refsect1>
+</refentry>
+
+<!-- ====================================================================== -->
+
+<refentry id="string.subst">
+<refnamediv>
+<refname>string.subst</refname>
+<refpurpose>Substitute one text string for another in a string</refpurpose>
+</refnamediv>
+
+<refsect1><title>Description</title>
+
+<para>The <function>string.subst</function> template replaces all
+occurances of <parameter>target</parameter> in <parameter>string</parameter>
+with <parameter>replacement</parameter> and returns the result.
+</para>
+
+<programlisting><src:fragment id='string.subst.frag'>
+<xsl:template name="string.subst">
+  <xsl:param name="string"></xsl:param>
+  <xsl:param name="target"></xsl:param>
+  <xsl:param name="replacement"></xsl:param>
+
+  <xsl:choose>
+    <xsl:when test="contains($string, $target)">
+      <xsl:variable name="rest">
+        <xsl:call-template name="string.subst">
+          <xsl:with-param name="string"
+                          select="substring-after($string, $target)"/>
+          <xsl:with-param name="target" select="$target"/>
+          <xsl:with-param name="replacement" select="$replacement"/>
+        </xsl:call-template>
+      </xsl:variable>
+      <xsl:value-of select="concat(substring-before($string, $target),
+                                   $replacement,
+                                   $rest)"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:value-of select="$string"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+</src:fragment></programlisting>
+
+</refsect1>
+</refentry>
+
+<!-- ================================================================== -->
+
+<refentry id="xpointer.idref">
+<refnamediv>
+<refname>xpointer.idref</refname>
+<refpurpose>Extract IDREF from an XPointer</refpurpose>
+</refnamediv>
+
+<refsect1><title>Description</title>
+
+<para>The <function>xpointer.idref</function> template returns the
+ID portion of an XPointer which is a pointer to an ID within the current
+document, or the empty string if it is not.</para>
+<para>In other words, <function>xpointer.idref</function> returns
+<quote>foo</quote> when passed either <literal>#foo</literal>
+or <literal>#xpointer(id('foo'))</literal>, otherwise it returns
+the empty string.</para>
+
+<programlisting><src:fragment id='xpointer.idref.frag'>
+<xsl:template name="xpointer.idref">
+  <xsl:param name="xpointer">http://...</xsl:param>
+  <xsl:choose>
+    <xsl:when test="starts-with($xpointer, '#xpointer(id(')">
+      <xsl:variable name="rest" select="substring-after($xpointer, '#xpointer(id(')"/>
+      <xsl:variable name="quote" select="substring($rest, 1, 1)"/>
+      <xsl:value-of select="substring-before(substring-after($xpointer, $quote), $quote)"/>
+    </xsl:when>
+    <xsl:when test="starts-with($xpointer, '#')">
+      <xsl:value-of select="substring-after($xpointer, '#')"/>
+    </xsl:when>
+    <!-- otherwise it's a pointer to some other document -->
+  </xsl:choose>
+</xsl:template>
+</src:fragment></programlisting>
+
+</refsect1>
+</refentry>
+
+
+<!-- ================================================================== -->
+
+<refentry id="length-magnitude">
+<refnamediv>
+<refname>length-magnitude</refname>
+<refpurpose>Return the unqualified dimension from a length specification</refpurpose>
+</refnamediv>
+
+<refsect1><title>Description</title>
+
+<para>The <function>length-magnitude</function> template returns the
+unqualified length ("20" for "20pt") from a dimension.
+</para>
+
+<programlisting><src:fragment id='length-magnitude.frag'>
+<xsl:template name="length-magnitude">
+  <xsl:param name="length" select="'0pt'"/>
+
+  <xsl:choose>
+    <xsl:when test="string-length($length) = 0"/>
+    <xsl:when test="substring($length,1,1) = '0'
+                    or substring($length,1,1) = '1'
+                    or substring($length,1,1) = '2'
+                    or substring($length,1,1) = '3'
+                    or substring($length,1,1) = '4'
+                    or substring($length,1,1) = '5'
+                    or substring($length,1,1) = '6'
+                    or substring($length,1,1) = '7'
+                    or substring($length,1,1) = '8'
+                    or substring($length,1,1) = '9'
+                    or substring($length,1,1) = '.'">
+      <xsl:value-of select="substring($length,1,1)"/>
+      <xsl:call-template name="length-magnitude">
+        <xsl:with-param name="length" select="substring($length,2)"/>
+      </xsl:call-template>
+    </xsl:when>
+  </xsl:choose>
+</xsl:template>
+</src:fragment></programlisting>
+
+</refsect1>
+</refentry>
+
+<!-- ================================================================== -->
+
+<refentry id="length-units">
+<refnamediv>
+<refname>length-units</refname>
+<refpurpose>Return the units from a length specification</refpurpose>
+</refnamediv>
+
+<refsect1><title>Description</title>
+
+<para>The <function>length-units</function> template returns the
+units ("pt" for "20pt") from a length. If no units are supplied on the
+length, the <parameter>defauilt.units</parameter> are returned.</para>
+
+<programlisting><src:fragment id='length-units.frag'>
+<xsl:template name="length-units">
+  <xsl:param name="length" select="'0pt'"/>
+  <xsl:param name="default.units" select="'px'"/>
+  <xsl:variable name="magnitude">
+    <xsl:call-template name="length-magnitude">
+      <xsl:with-param name="length" select="$length"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="units">
+    <xsl:value-of select="substring($length, string-length($magnitude)+1)"/>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="$units = ''">
+      <xsl:value-of select="$default.units"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:value-of select="$units"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+</src:fragment></programlisting>
+
+</refsect1>
+</refentry>
+
+<!-- ================================================================== -->
+
+<refentry id="length-spec">
+<refnamediv>
+<refname>length-spec</refname>
+<refpurpose>Return a fully qualified length specification</refpurpose>
+</refnamediv>
+
+<refsect1><title>Description</title>
+
+<para>The <function>length-spec</function> template returns the
+qualified length from a dimension. If an unqualified length is given,
+the <parameter>default.units</parameter> will be added to it.
+</para>
+
+<programlisting><src:fragment id='length-spec.frag'>
+<xsl:template name="length-spec">
+  <xsl:param name="length" select="'0pt'"/>
+  <xsl:param name="default.units" select="'px'"/>
+
+  <xsl:variable name="magnitude">
+    <xsl:call-template name="length-magnitude">
+      <xsl:with-param name="length" select="$length"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="units">
+    <xsl:value-of select="substring($length, string-length($magnitude)+1)"/>
+  </xsl:variable>
+
+  <xsl:value-of select="$magnitude"/>
+  <xsl:choose>
+    <xsl:when test="$units='cm'
+                    or $units='mm'
+                    or $units='in'
+                    or $units='pt'
+                    or $units='pc'
+                    or $units='px'
+                    or $units='em'">
+      <xsl:value-of select="$units"/>
+    </xsl:when>
+    <xsl:when test="$units = ''">
+      <xsl:value-of select="$default.units"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:message>
+        <xsl:text>Unrecognized unit of measure: </xsl:text>
+        <xsl:value-of select="$units"/>
+        <xsl:text>.</xsl:text>
+      </xsl:message>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+</src:fragment></programlisting>
+
+</refsect1>
+</refentry>
+
+<!-- ================================================================== -->
+
+<refentry id="length-in-points">
+<refnamediv>
+<refname>length-in-points</refname>
+<refpurpose>Returns the size, in points, of a specified length</refpurpose>
+</refnamediv>
+
+<refsect1><title>Description</title>
+
+<para>The <function>length-in-points</function> template converts a length
+specification to points and returns that value as an unqualified
+number.
+</para>
+
+<caution>
+<para>There is no way for the template to infer the size of an
+<literal>em</literal>. It relies on the default <parameter>em.size</parameter>
+which is initially <literal>10</literal> (for 10pt).</para>
+
+<para>Similarly, converting pixesl to points relies on the
+<parameter>pixels.per.inch</parameter> parameter which is initially
+<literal>90</literal>.
+</para>
+</caution>
+
+<programlisting><src:fragment id='length-in-points.frag'>
+<xsl:template name="length-in-points">
+  <xsl:param name="length" select="'0pt'"/>
+  <xsl:param name="em.size" select="10"/>
+  <xsl:param name="pixels.per.inch" select="90"/>
+
+  <xsl:variable name="magnitude">
+    <xsl:call-template name="length-magnitude">
+      <xsl:with-param name="length" select="$length"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="units">
+    <xsl:value-of select="substring($length, string-length($magnitude)+1)"/>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="$units = 'pt'">
+      <xsl:value-of select="$magnitude"/>
+    </xsl:when>
+    <xsl:when test="$units = 'cm'">
+      <xsl:value-of select="$magnitude div 2.54 * 72.0"/>
+    </xsl:when>
+    <xsl:when test="$units = 'mm'">
+      <xsl:value-of select="$magnitude div 25.4 * 72.0"/>
+    </xsl:when>
+    <xsl:when test="$units = 'in'">
+      <xsl:value-of select="$magnitude * 72.0"/>
+    </xsl:when>
+    <xsl:when test="$units = 'pc'">
+      <xsl:value-of select="$magnitude * 12.0"/>
+    </xsl:when>
+    <xsl:when test="$units = 'px'">
+      <xsl:value-of select="$magnitude div $pixels.per.inch * 72.0"/>
+    </xsl:when>
+    <xsl:when test="$units = 'em'">
+      <xsl:value-of select="$magnitude * $em.size"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:message>
+        <xsl:text>Unrecognized unit of measure: </xsl:text>
+        <xsl:value-of select="$units"/>
+        <xsl:text>.</xsl:text>
+      </xsl:message>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+</src:fragment></programlisting>
+
+</refsect1>
+</refentry>
+
+<!-- ================================================================== -->
+
+<refentry id="pi-attribute">
+<refnamediv>
+<refname>pi-attribute</refname>
+<refpurpose>Extract a pseudo-attribute from a PI</refpurpose>
+</refnamediv>
+
+<refsect1><title>Description</title>
+
+<para>The <function>pi-attribute</function> template extracts a pseudo-attribute
+from a processing instruction. For example, given the PI
+<quote><literal>&lt;?foo bar="1" baz='red'?&gt;</literal></quote>,</para>
+<programlisting><![CDATA[<xsl:call-template name="pi-attribute">
+  <xsl:with-param name="pis" select="processing-instruction('foo')"/>
+  <xsl:with-param name="attribute" select="'baz'"/>
+</xsl:call-template>]]></programlisting>
+<para>will return <quote>red</quote>. This template returns the first matching
+attribute that it finds. Presented with processing instructions that
+contain badly formed pseudo-attributes (missing or unbalanced quotes,
+for example), the template may silently return erroneous results.</para>
+
+<programlisting><src:fragment id='pi-attribute.frag'>
+<xsl:template name="pi-attribute">
+  <xsl:param name="pis" select="processing-instruction('')"/>
+  <xsl:param name="attribute">filename</xsl:param>
+  <xsl:param name="count">1</xsl:param>
+
+  <xsl:choose>
+    <xsl:when test="$count>count($pis)">
+      <!-- not found -->
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:variable name="pi">
+        <xsl:value-of select="$pis[$count]"/>
+      </xsl:variable>
+      <xsl:choose>
+        <xsl:when test="contains($pi,concat(' ', $attribute, '='))">
+          <xsl:variable name="rest" select="substring-after($pi,concat(' ', $attribute,'='))"/>
+          <xsl:variable name="quote" select="substring($rest,1,1)"/>
+          <xsl:value-of select="substring-before(substring($rest,2),$quote)"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:call-template name="pi-attribute">
+            <xsl:with-param name="pis" select="$pis"/>
+            <xsl:with-param name="attribute" select="$attribute"/>
+            <xsl:with-param name="count" select="$count + 1"/>
+          </xsl:call-template>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+</src:fragment></programlisting>
+
+</refsect1>
+</refentry>
+
+<!-- ================================================================== -->
+
+<refentry id="lookup.key">
+<refnamediv>
+<refname>lookup.key</refname>
+<refpurpose>Retrieve the value associated with a particular key in a table</refpurpose>
+</refnamediv>
+
+<refsect1><title>Description</title>
+
+<para>Given a table of space-delimited key/value pairs,
+the <function>lookup.key</function> template extracts the value associated
+with a particular key.</para>
+
+<programlisting><src:fragment id='lookup.key.frag'>
+<xsl:template name="lookup.key">
+  <xsl:param name="key" select="''"/>
+  <xsl:param name="table" select="''"/>
+
+  <xsl:if test="contains($table, ' ')">
+    <xsl:choose>
+      <xsl:when test="substring-before($table, ' ') = $key">
+        <xsl:variable name="rest" select="substring-after($table, ' ')"/>
+        <xsl:choose>
+          <xsl:when test="contains($rest, ' ')">
+            <xsl:value-of select="substring-before($rest, ' ')"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:value-of select="$rest"/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:call-template name="lookup.key">
+          <xsl:with-param name="key" select="$key"/>
+          <xsl:with-param name="table"
+                            select="substring-after(substring-after($table,' '), ' ')"/>
+        </xsl:call-template>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:if>
+</xsl:template>
+</src:fragment></programlisting>
+
+</refsect1>
+</refentry>
+
+<!-- ================================================================== -->
+
+<refentry id="xpath.location">
+<refnamediv>
+<refname>xpath.location</refname>
+<refpurpose>Calculate the XPath child-sequence to the current node</refpurpose>
+</refnamediv>
+
+<refsect1><title>Description</title>
+
+<para>The <function>xpath.location</function> template calculates the
+absolute path from the root of the tree to the current element node.
+</para>
+
+<programlisting><src:fragment id='xpath.location.frag'>
+<xsl:template name="xpath.location">
+  <xsl:param name="node" select="."/>
+  <xsl:param name="path" select="''"/>
+
+  <xsl:variable name="next.path">
+    <xsl:value-of select="local-name($node)"/>
+    <xsl:if test="$path != ''">/</xsl:if>
+    <xsl:value-of select="$path"/>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="$node/parent::*">
+      <xsl:call-template name="xpath.location">
+        <xsl:with-param name="node" select="$node/parent::*"/>
+        <xsl:with-param name="path" select="$next.path"/>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:text>/</xsl:text>
+      <xsl:value-of select="$next.path"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+</src:fragment></programlisting>
+
+</refsect1>
+</refentry>
+
+<!-- ================================================================== -->
+
+<refentry id="comment-escape-string">
+<refnamediv>
+<refname>comment-escape-string</refname>
+<refpurpose>Prepare a string for inclusion in an XML comment</refpurpose>
+</refnamediv>
+
+<refsect1><title>Description</title>
+
+<para>The <function>comment-escape-string</function> template returns a string
+that has been transformed so that it can safely be output as an XML comment.
+Internal occurrences of "--" will be replaced with "- -" and a leading and/or
+trailing space will be added to the string, if necessary.</para>
+
+<programlisting><src:fragment id='comment-escape-string'>
+<xsl:template name="comment-escape-string">
+  <xsl:param name="string" select="''"/>
+
+  <xsl:if test="starts-with($string, '-')">
+    <xsl:text> </xsl:text>
+  </xsl:if>
+
+  <xsl:call-template name="comment-escape-string.recursive">
+    <xsl:with-param name="string" select="$string"/>
+  </xsl:call-template>
+
+  <xsl:if test="substring($string, string-length($string), 1) = '-'">
+    <xsl:text> </xsl:text>
+  </xsl:if>
+</xsl:template>
+</src:fragment></programlisting>
+
+</refsect1>
+</refentry>
+
+<refentry id="comment-escape-string.recursive">
+<refnamediv>
+<refname>comment-escape-string.recursive</refname>
+<refpurpose>Internal function used by comment-escape-string</refpurpose>
+</refnamediv>
+
+<refsect1><title>Description</title>
+
+<para>The <function>comment-escape-string.recursive</function> template is used
+by <function>comment-escape-string</function>.</para>
+
+<programlisting><src:fragment id="comment-escape-string.recursive">
+<xsl:template name="comment-escape-string.recursive">
+  <xsl:param name="string" select="''"/>
+  <xsl:choose>
+    <xsl:when test="contains($string, '--')">
+      <xsl:value-of select="substring-before($string, '--')"/>
+      <xsl:value-of select="'- -'"/>
+      <xsl:call-template name="comment-escape-string.recursive">
+        <xsl:with-param name="string" select="substring-after($string, '--')"/>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:value-of select="$string"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+</src:fragment></programlisting>
+</refsect1>
+</refentry>
+
+</reference>
+
+<reference>
+<title>Relative URI Functions</title>
+
+<partintro><title>Introduction</title>
+
+<para>These functions manipulate relative URI references.</para>
+
+<para>The following assumptions must hold true:</para>
+
+<orderedlist>
+<listitem>
+<para>All URIs are relative.</para>
+</listitem>
+<listitem>
+<para>No URI contains the <quote><literal>../</literal></quote> sequence
+which would effectively move <quote>up</quote> the hierarchy.</para>
+</listitem>
+</orderedlist>
+
+<para>If these assumptions do not hold, the results are unpredictable.</para>
+
+</partintro>
+
+<refentry id="count.uri.path.depth">
+<refnamediv>
+<refname>count.uri.path.depth</refname>
+<refpurpose>Count the number of path components in a relative URI</refpurpose>
+</refnamediv>
+
+<refsect1><title>Description</title>
+
+<para>This function counts the number of path components in a relative URI.</para>
+
+<programlisting><src:fragment id='count.uri.path.depth.frag'>
+<xsl:template name="count.uri.path.depth">
+  <xsl:param name="filename" select="''"/>
+  <xsl:param name="count" select="0"/>
+
+  <xsl:choose>
+    <xsl:when test="contains($filename, '/')">
+      <xsl:call-template name="count.uri.path.depth">
+        <xsl:with-param name="filename" select="substring-after($filename, '/')"/>
+        <xsl:with-param name="count" select="$count + 1"/>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:value-of select="$count"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+</src:fragment></programlisting>
+
+</refsect1>
+</refentry>
+
+<refentry id="trim.common.uri.paths">
+<refnamediv>
+<refname>trim.common.uri.paths</refname>
+<refpurpose>Trim common leading path components from a relative URI</refpurpose>
+</refnamediv>
+
+<refsect1><title>Description</title>
+
+<para>This function trims common leading path components from a relative URI.</para>
+
+<programlisting><src:fragment id='trim.common.uri.paths.frag'>
+<xsl:template name="trim.common.uri.paths">
+  <xsl:param name="uriA" select="''"/>
+  <xsl:param name="uriB" select="''"/>
+  <xsl:param name="return" select="'A'"/>
+
+  <xsl:choose>
+    <xsl:when test="contains($uriA, '/') and contains($uriB, '/')
+                    and substring-before($uriA, '/') = substring-before($uriB, '/')">
+      <xsl:call-template name="trim.common.uri.paths">
+        <xsl:with-param name="uriA" select="substring-after($uriA, '/')"/>
+        <xsl:with-param name="uriB" select="substring-after($uriB, '/')"/>
+        <xsl:with-param name="return" select="$return"/>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:choose>
+        <xsl:when test="$return = 'A'">
+          <xsl:value-of select="$uriA"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="$uriB"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+</src:fragment></programlisting>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+<appendix><title>The Stylesheet</title>
+
+<para>The <filename>lib.xsl</filename> stylesheet is just a wrapper
+around these functions.</para>
+
+<src:fragment id="top" mundane-result-prefixes="xsl">
+
+<!-- ********************************************************************
+     $Id: lib.xweb,v 1.1.1.1 2004/10/19 21:21:49 juntao Exp $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     This module implements DTD-independent functions
+
+     ******************************************************************** -->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:src="http://nwalsh.com/xmlns/litprog/fragment"
+                exclude-result-prefixes="src"
+                version='1.0'>
+
+<src:fragref linkend="dot.count.frag"/>
+<src:fragref linkend="copy-string.frag"/>
+<src:fragref linkend="string.subst.frag"/>
+<src:fragref linkend="xpointer.idref.frag"/>
+<src:fragref linkend="length-magnitude.frag"/>
+<src:fragref linkend="length-units.frag"/>
+<src:fragref linkend="length-spec.frag"/>
+<src:fragref linkend="length-in-points.frag"/>
+<src:fragref linkend="pi-attribute.frag"/>
+<src:fragref linkend="lookup.key.frag"/>
+<src:fragref linkend="xpath.location.frag"/>
+<src:fragref linkend="comment-escape-string"/>
+<src:fragref linkend="comment-escape-string.recursive"/>
+<src:fragref linkend="count.uri.path.depth.frag"/>
+<src:fragref linkend="trim.common.uri.paths.frag"/>
+
+</xsl:stylesheet>
+</src:fragment>
+
+</appendix>
+</book>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/ChangeLog
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/ChangeLog	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/ChangeLog	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,711 @@
+2004-03-04  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* root.properties.xml: Added line-height-shift-adjustment=disregard-shifts to the root properties
+
+	* table.properties.xml: Clarified description pointing to the distinction between table.properties and table.table.properties
+
+	* table.table.properties.xml: New file.
+
+2004-02-13  Michael Smith <xmldoc at users.sourceforge.net>
+
+	* htmlhelp.hhp.windows.xml, htmlhelp.show.toolbar.text.xml: 
+	remove stray single quotes for ID values;
+	was causing generation of invalid filenames & breaking downstream builds
+
+2004-01-31  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* footer.column.widths.xml, header.column.widths.xml: Add quotes to make the parameters strings; '1 1 1' is not a valid number
+
+2004-01-29  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* footer.column.widths.xml, header.column.widths.xml: New file.
+
+2003-12-15  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* article.appendix.title.properties.xml: Fixed typo in use-attribute-sets attribute
+
+	* title.margin.left.xml: Fix typo in parameter end tag
+
+2003-12-10  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* marker.section.level.xml: New file.
+
+2003-12-07  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* article.appendix.title.properties.xml: New file.
+
+2003-12-05  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* refentry.pagebreak.xml: New file.
+
+	* refentry.title.properties.xml: Added space-before properties since page breaks are now optional.
+	Added a description paragraph.
+
+2003-12-04  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* subscript.properties.xml, superscript.properties.xml: 
+	New file.
+
+2003-11-29  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* htmlhelp.display.progress.xml, htmlhelp.enhanced.decompilation.xml, htmlhelp.hhc.width.xml, htmlhelp.hhp.windows.xml, htmlhelp.remember.window.position.xml, htmlhelp.show.toolbar.text.xml, htmlhelp.window.geometry.xml: 
+	New file.
+
+2003-11-25  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* title.margin.left.xml: Set to zero if passivetex.extensions != 0 since PassiveTeX
+	cannot handle the math expression with negative values.
+
+2003-10-04  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* index.preferred.page.properties.xml: New file.
+
+2003-09-28  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* formal.object.properties.xml: Use keep-together.within-column, not keep-together as that's a compound property inherited by fo:inline and other elements with bad effects
+
+2003-09-24  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* xep.index.item.properties.xml: Fixed the ulink reference to xep.
+
+2003-09-23  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* manifest.in.base.dir.xml: New file.
+
+2003-09-10  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* section.level1.properties.xml, section.level2.properties.xml, section.level3.properties.xml, section.level4.properties.xml, section.level5.properties.xml, section.level6.properties.xml: 
+	Add use-attribute-set="section.properties" to each set.
+
+2003-09-09  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* section.level1.properties.xml, section.level2.properties.xml, section.level3.properties.xml, section.level4.properties.xml, section.level5.properties.xml, section.level6.properties.xml: 
+	New file.
+
+	* section.properties.xml: New file.
+
+2003-09-02  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* title.margin.left.xml: Must add unit indicator if set value to zero.
+
+2003-08-29  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* footer.content.properties.xml, header.content.properties.xml: 
+	Changed $body.font.family to $body.fontset to include
+	symbol.font.family fonts in headers and footers.
+
+2003-08-28  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* root.properties.xml: Changed body.font.family to body.fontset and
+	title.font.family to title.fontset in font-family property
+	attributes, in order to append symbol.font.family parameter value.
+
+	* symbol.font.family.xml: New file.
+
+2003-08-27  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* formal.title.placement.xml: Added task
+
+2003-08-14  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* variablelist.max.termlength.xml: New file.
+
+2003-07-25  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* insert.xref.page.number.xml: Changed from a boolean to a string with values yes, no, maybe
+	to support xrefstyle attribute on xrefs.
+
+	* xref.label-page.separator.xml, xref.label-title.separator.xml, xref.title-page.separator.xml: 
+	New file.
+
+2003-07-22  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* eclipse.autolabel.xml, eclipse.plugin.id.xml, eclipse.plugin.name.xml, eclipse.plugin.provider.xml: 
+	New file.
+
+2003-06-22  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* qanda.title.level1.properties.xml, qanda.title.level2.properties.xml, qanda.title.level3.properties.xml, qanda.title.level4.properties.xml, qanda.title.level5.properties.xml, qanda.title.level6.properties.xml, qanda.title.properties.xml: 
+	New file.
+
+2003-06-21  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* column.gap.back.xml, column.gap.body.xml, column.gap.front.xml, column.gap.index.xml, column.gap.lot.xml, column.gap.titlepage.xml: 
+	New file.
+
+	* suppress.footer.navigation.xml, suppress.header.navigation.xml: 
+	Fixed id values
+
+	* use.role.for.mediaobject.xml: Editorial nit.
+
+2003-05-27  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* htmlhelp.hhc.folders.instead.books.xml: Notice of HTML Help limitation.
+
+2003-05-15  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* axf.extensions.xml, xep.extensions.xml: Added support for AntennaHouse XSL Formatter. You can use axf.extensions=1 setting to generate bookmarks, document info and to merge duplicate page numbers in index.
+
+2003-05-14  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* xep.index.item.properties.xml: New file.
+
+2003-05-08  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* formal.object.properties.xml: Keep formal object titles together
+
+2003-05-07  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* admon.textlabel.xml: New file.
+
+	* admon.textlabel.xml: Set default to 1.
+
+	* admon.textlabel.xml: Changed admon.textlabel doc.
+
+2003-04-12  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* ebnf.assignment.xml, ebnf.statement.terminator.xml, root.properties.xml: 
+	New file.
+
+	* generate.section.toc.level.xml: Whitespace
+
+2003-02-14  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* component.title.properties.xml: No longer used; causes confusion. Buh-bye.
+
+2003-02-07  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* toc.max.depth.xml: New file.
+
+2003-01-31  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* footer.content.properties.xml, header.content.properties.xml: 
+	Don't set the margin-right to the title.margin.left. D'Oh.
+
+	* monospace.properties.xml: Remove font-size; it just looks ugly in the general case
+
+2003-01-28  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* glossterm.auto.link.xml: Whitespace
+
+2003-01-20  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* entry.propagates.style.xml: New file.
+
+	* footnote.number.format.xml, footnote.number.symbols.xml, table.footnote.number.format.xml, table.footnote.number.symbols.xml: 
+	New file.
+
+	* glossentry.show.acronym.xml: New file.
+
+	* section.title.level1.properties.xml, section.title.level2.properties.xml, section.title.level3.properties.xml, section.title.level4.properties.xml, section.title.level5.properties.xml, section.title.level6.properties.xml: 
+	Make section title font sizes a function of the body size, not an absolute size. And let's use magsteps while we're at it.
+
+	* ulink.footnote.number.format.xml: New file.
+
+	* ulink.footnotes.xml: It is too implemented. :-)
+
+	* verbatim.properties.xml: Put space below verbatim blocks too.
+
+	* xref.with.number.and.title.xml: New file.
+
+2003-01-17  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* body.font.master.xml, css.decoration.xml, double.sided.xml: 
+	Whitespace
+
+	* formal.title.properties.xml: Make font size 1.2 times the body size, not a fixed 12pt
+
+2003-01-01  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* equation.properties.xml, example.properties.xml, figure.properties.xml, procedure.properties.xml, table.properties.xml: 
+	New file.
+
+	* formal.object.properties.xml: Whitespace and documentation changes
+
+	* ignore.image.scaling.xml: New file.
+
+2002-12-29  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* use.role.as.xrefstyle.xml: Updated documentation; added an example showing how to use xrefstyle in the stylesheets
+
+2002-12-28  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* admonition.properties.xml, admonition.title.properties.xml: 
+	Whitespace and documentation tweaks
+
+2002-12-17  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* preferred.mediaobject.role.xml: Fixed build problems with new parameters.
+
+	* profile.role.xml: Ooops. No DTD, no entites :-(
+
+	* profile.role.xml: Added warning against usage of role attribute for profiling.
+
+2002-12-06  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* preferred.mediaobject.role.xml, use.role.for.mediaobject.xml: 
+	New file.
+
+2002-10-31  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* table.frame.border.thickness.xml, toc.margin.properties.xml, verbatim.properties.xml, xref.properties.xml: 
+	Documentation updates
+
+2002-10-21  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* footer.content.properties.xml, header.content.properties.xml: 
+	Updated header/footer properties to avoid missmatched margins caused by title.margin.left
+
+2002-10-20  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* monospace.properties.xml: Bug #589631: Make monospace font size 0.9em rather than 0.9*body.font.size so that it works in different contexts (like chapter titles
+
+2002-10-19  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* footer.content.properties.xml, header.content.properties.xml: 
+	New file.
+
+2002-10-04  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* generate.toc.xml: Specify titles for ToCs
+
+	* table.border.color.xml, table.border.padding.xml, table.border.style.xml, table.border.thickness.xml, table.cell.border.color.xml, table.cell.border.style.xml, table.cell.border.thickness.xml, table.frame.border.color.xml, table.frame.border.style.xml, table.frame.border.thickness.xml: 
+	Made separate parameters for table frame and table cell border properties
+
+2002-10-01  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* section.title.level1.properties.xml, section.title.level2.properties.xml, section.title.level3.properties.xml, section.title.level4.properties.xml, section.title.level5.properties.xml: 
+	Moved font sizes one level to compensate for change of
+	the section.level template returning a number that
+	matches the section level. The result should be no
+	change in output font sizes for section titles.
+
+2002-09-30  <dcramer at users.sourceforge.net>
+
+	* list.block.spacing.xml: Adding space-after so there will be space after lists within paras (where there's text after the list.
+
+2002-09-27  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* default.float.class.xml: New file.
+
+	* default.image.width.xml: New file.
+
+	* funcsynopsis.tabular.threshold.xml: New file.
+
+2002-09-19  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* formal.title.properties.xml: Removed 'keep-with-next' from 'formal.title.properties' because
+	template now uses $placement value to determine if keep-with-next
+	or keep-with-previous should be used.
+
+2002-09-05  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* monospace.verbatim.properties.xml: Make monospaced verbatim environments text-aligned to the start.
+
+2002-09-04  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* generate.toc.xml: Suppress ToC in article/appendix by default
+
+	* graphicsize.extension.xml, l10n.gentext.default.language.xml, l10n.gentext.language.xml, l10n.gentext.use.xref.language.xml: 
+	New file.
+
+2002-09-01  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* body.font.family.xml, dingbat.font.family.xml, monospace.font.family.xml, sans.font.family.xml, title.font.family.xml: 
+	Roll-back font families to single words
+
+2002-08-26  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* chunk.tocs.and.lots.xml: New file.
+
+	* generate.toc.xml: Fixed typo in parameter reference
+
+2002-08-22  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* htmlhelp.use.hhk.xml: New file.
+
+2002-08-21  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* make.index.markup.xml: Fixed typo
+
+	* make.index.markup.xml: New file.
+
+2002-07-26  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* headers.on.blank.pages.xml: With the new scheme, this should be 1
+
+2002-07-22  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* html.extra.head.links.xml: Changed the default from 1 to 0 because this feature
+	is not supported in all browsers, and because it
+	reduces processing performance by 20-30%.
+
+2002-07-19  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* bibliography.numbered.xml, menuchoice.menu.separator.xml, menuchoice.separator.xml, section.title.level1.properties.xml, section.title.level2.properties.xml, section.title.level3.properties.xml, section.title.level4.properties.xml, section.title.level5.properties.xml, section.title.level6.properties.xml: 
+	New file.
+
+	* monospace.properties.xml, monospace.verbatim.properties.xml: 
+	Split monospaced properties from verbatim properties
+
+	* section.title.properties.xml: Tweaked documentation
+
+2002-07-18  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* html.cellpadding.xml, html.cellspacing.xml: New file.
+
+	* para.propagates.style.xml: New file.
+
+2002-07-17  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* body.margin.bottom.xml, body.margin.top.xml, page.margin.bottom.xml, page.margin.top.xml, region.after.extent.xml, region.before.extent.xml: 
+	Tweak page head/foot margins
+
+2002-07-09  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* glossary.collection.xml: Bug #522017: describe how to make intra-glossary cross references
+
+2002-07-08  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* sidebar.properties.xml: New file.
+
+2002-07-06  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* target.database.document.xml: Changed the default value to empty string to remove
+	error message about trying to open a non-existent file.
+
+	* target.database.document.xml: Changed name of default master data file to olinkdb.xml
+	because it was too similar to targets.db used for
+	the document data files.
+
+2002-07-05  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* collect.xref.targets.xml, current.docid.xml, olink.base.uri.xml, olink.doctitle.xml, target.database.document.xml, targets.filename.xml, use.local.olink.style.xml: 
+	Removed the xml declaration at the top of the new param files
+	as it seems to trouble the parser.
+
+	* collect.xref.targets.xml, current.docid.xml, olink.base.uri.xml, olink.doctitle.xml, target.database.document.xml, targets.filename.xml, use.local.olink.style.xml: 
+	New file.
+
+2002-07-04  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* chunk.datafile.xml: Removed parameter: no longer (never?) used
+
+2002-07-03  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* footer.rule.xml, footers.on.blank.pages.xml, header.rule.xml, headers.on.blank.pages.xml: 
+	New file.
+
+	* insert.xref.page.number.xml: Improve description especially now that it works
+
+2002-07-02  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* column.count.back.xml, column.count.body.xml, column.count.front.xml, column.count.index.xml, column.count.lot.xml, column.count.of.index.xml, column.count.titlepage.xml, column.count.xml, draft.mode.xml: 
+	Completely rewrote pagesetup.xsl: new/changed column count, draft mode, and margin parameters
+
+2002-07-02  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* generate.toc.xml: Added sect1 through sect5, which allows such section ToCs to be
+	controlled by just setting the generate.section.toc.level
+	parameter.
+
+	* generate.toc.xml: Forgot to close my <para> tag.
+
+2002-07-02  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* page.margin.top.xml, region.before.extent.xml: Completely rewrote pagesetup.xsl: new/changed column count, draft mode, and margin parameters
+
+2002-06-29  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* admon.graphics.xml, callout.graphics.path.xml, callout.graphics.xml: 
+	Whitespace
+
+2002-06-27  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* glossary.as.blocks.xml, glosslist.as.blocks.xml, glossterm.separation.xml, glossterm.width.xml: 
+	New file.
+
+2002-06-26  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* table.border.color.xml: Don't set table border color in HTML; allow a top-level CSS stylesheet to set it
+
+2002-06-13  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* chunker.output.cdata-section-elements.xml, chunker.output.doctype-public.xml, chunker.output.doctype-system.xml, chunker.output.encoding.xml, chunker.output.indent.xml, chunker.output.media-type.xml, chunker.output.method.xml, chunker.output.omit-xml-declaration.xml, chunker.output.standalone.xml, default.encoding.xml: 
+	Created a complete and consistent set of chunking parameters
+
+2002-06-13  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* htmlhelp.button.back.xml, htmlhelp.button.forward.xml, htmlhelp.button.hideshow.xml, htmlhelp.button.home.url.xml, htmlhelp.button.home.xml, htmlhelp.button.jump1.title.xml, htmlhelp.button.jump1.url.xml, htmlhelp.button.jump1.xml, htmlhelp.button.jump2.title.xml, htmlhelp.button.jump2.url.xml, htmlhelp.button.jump2.xml, htmlhelp.button.locate.xml, htmlhelp.button.next.xml, htmlhelp.button.options.xml, htmlhelp.button.prev.xml, htmlhelp.button.print.xml, htmlhelp.button.refresh.xml, htmlhelp.button.stop.xml, htmlhelp.button.zoom.xml, htmlhelp.hhc.binary.xml, htmlhelp.hhk.xml, htmlhelp.hhp.window.xml, htmlhelp.show.advanced.search.xml, htmlhelp.show.favorities.xml, htmlhelp.show.menu.xml: 
+	New file.
+
+	* htmlhelp.only.xml: New file.
+
+2002-06-13  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* output.method.xml, saxon.character.representation.xml: 
+	Created a complete and consistent set of chunking parameters
+
+2002-06-12  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* refentry.generate.name.xml, refentry.generate.title.xml: 
+	Clarified explanation so no one else reports bugs like #563473.
+
+	* suppress.footer.navigation.xml, suppress.header.navigation.xml: 
+	New file.
+
+2002-06-11  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* body.font.family.xml, dingbat.font.family.xml, monospace.font.family.xml, sans.font.family.xml, title.font.family.xml: 
+	Add generic fallbacks to font family specifications
+
+	* make.graphic.viewport.xml, nominal.image.depth.xml, nominal.image.width.xml, use.embed.for.svg.xml: 
+	New file.
+
+	* refentry.title.properties.xml, section.title.properties.xml: 
+	New file.
+
+	* use.embed.for.svg.xml: Turn off use.embed.for.svg by default (it generates invalid html)
+
+2002-06-09  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* html.stylesheet.xml: Updated documentation to reflect that html.stylesheet can now take a list of URIs
+
+2002-06-07  <dcramer at users.sourceforge.net>
+
+	* variablelist.as.blocks.xml: Fixing a couple of typos I made
+
+2002-06-06  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* generate.meta.abstract.xml, use.role.as.xrefstyle.xml: 
+	New file.
+
+	* variablelist.as.blocks.xml: Patch 521141: document variablelist pi
+
+2002-05-24  <dcramer at users.sourceforge.net>
+
+	* callout.unicode.number.limit.xml, callout.unicode.start.character.xml: 
+	Updating docs.
+
+2002-05-23  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* use.svg.xml: New file.
+
+2002-05-14  Michael Smith <xmldoc at users.sourceforge.net>
+
+	* generate.manifest.xml, manifest.xml: added descriptions
+
+2002-05-13  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* compact.list.item.spacing.xml: New file.
+
+	* html.extra.head.links.xml: New file.
+
+2002-05-10  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* generate.manifest.xml, manifest.xml: New file.
+
+2002-05-10  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* points.per.em.xml: New file.
+
+	* using.chunker.xml: Obsolete parameter
+
+2002-04-20  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* generate.toc.xml: Improve documentation
+
+	* shade.verbatim.style.xml: Support shade.verbatim in FO; stop using vendor test to decide what extension function to call for line numbering
+
+	* verbatim.properties.xml: Whitespace
+
+2002-03-18  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* emphasis.propagates.style.xml: Whitespace
+
+	* generate.appendix.toc.xml, generate.article.toc.xml, generate.book.equation.lot.xml, generate.book.example.lot.xml, generate.book.figure.lot.xml, generate.book.table.lot.xml, generate.book.toc.xml, generate.chapter.toc.xml, generate.component.toc.xml, generate.division.equation.lot.xml, generate.division.example.lot.xml, generate.division.figure.lot.xml, generate.division.table.lot.xml, generate.division.toc.xml, generate.part.toc.xml, generate.preface.toc.xml, generate.qandadiv.toc.xml, generate.qandaset.toc.xml, generate.reference.toc.xml, generate.section.toc.xml, generate.set.toc.xml, generate.toc.xml: 
+	Replace generate.*.toc and generate.*.lot with single generate.toc parameter.
+
+2002-03-14  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* formal.procedures.xml: Fixed typos
+
+	* formal.title.placement.xml: New file.
+
+2002-03-10  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* generate.id.attributes.xml: New file.
+
+2002-03-03  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* profile.arch.xml, profile.attribute.xml, profile.condition.xml, profile.conformance.xml, profile.lang.xml, profile.os.xml, profile.revision.xml, profile.revisionflag.xml, profile.role.xml, profile.security.xml, profile.separator.xml, profile.userlevel.xml, profile.value.xml, profile.vendor.xml: 
+	New file.
+
+2002-03-01  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* blockquote.properties.xml: Added space-after properties to blockquotes
+
+	* formal.title.properties.xml: Added space-after properties
+
+	* stylesheet.result.type.xml: Move stylesheet.result.type out of param and put it explicitly in each stylesheet because it has to be different
+
+	* table.cell.padding.xml: New file.
+
+	* ulink.hyphenate.xml: Make ulink hyphenation character the empty string by default
+
+2002-02-25  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* chunk.quietly.xml: New file.
+
+2002-02-21  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* tex.math.delims.xml, tex.math.file.xml, tex.math.in.alt.xml: 
+	Better control over delimiters for TeX equations. Added parameter tex.math.delims, when is set to 0, no delimiters (like $ and $$) are output. Same can be done for single equation by <?dbtex delims="no"?>.
+
+2002-02-11  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* column.count.of.index.xml: New file.
+
+2002-02-10  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* htmlhelp.default.topic.xml: New file.
+
+2002-02-09  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* htmlhelp.hhc.show.root.xml: New file.
+
+2002-02-07  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* chunk.toc.xml, manual.toc.xml: New file.
+
+	* informal.object.properties.xml: New file.
+
+2002-02-03  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* htmlhelp.title.xml: New file.
+
+2002-01-29  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* draft.watermark.image.xml: New file.
+
+2002-01-28  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* html.cleanup.xml, make.valid.html.xml: Added html.cleanup parameter; if non-zero, do some post-processing of RTFs to improve formatting
+
+	* ulink.hyphenate.xml: New file.
+
+2002-01-22  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* htmlhelp.hhc.folders.instead.books.xml: New file.
+
+2002-01-10  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* body.margin.bottom.xml, body.margin.top.xml, page.margin.bottom.xml, page.margin.outer.xml, page.margin.top.xml, page.width.xml, region.after.extent.xml, region.before.extent.xml: 
+	Rationalize margins; see new docs in the FO section
+
+	* formal.object.properties.xml: Removed bogus keep
+
+	* pixels.per.inch.xml: New file.
+
+	* ulink.footnotes.xml, ulink.show.xml: New file.
+
+2002-01-06  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* bibliography.collection.xml, glossary.collection.xml: 
+	Added documentation
+
+2002-01-04  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* firstterm.only.link.xml, glossary.collection.xml: New file.
+
+2002-01-03  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* format.variablelist.as.list.xml, variablelist.as.table.xml: 
+	Renamed format.variablelist.as.table to variablelist.as.table
+
+	* variablelist.as.blocks.xml: New file.
+
+	* variablelist.as.table.xml: Fixed doc typos
+
+2002-01-01  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* blockquote.properties.xml, make.valid.html.xml, output.method.xml, refentry.generate.name.xml, refentry.generate.title.xml: 
+	New and updated parameters
+
+2001-12-15  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* tex.math.in.alt.xml: Improved support for TeX math inside equations.
+
+2001-12-06  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* tex.math.file.xml, tex.math.in.alt.xml: New file.
+
+2001-12-04  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* admonition.properties.xml: New file.
+
+	* admonition.title.properties.xml, chunk.first.sections.xml, chunk.section.depth.xml, line-height.xml: 
+	New parameters
+
+	* toc.indent.width.xml: New file.
+
+2001-11-28  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* htmlhelp.alias.file.xml, htmlhelp.force.map.and.alias.xml, htmlhelp.map.file.xml: 
+	New file.
+
+	* htmlhelp.hhc.section.depth.xml: New file.
+
+2001-11-28  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* punct.honorific.xml: New file.
+
+	* segmentedlist.as.table.xml: New file.
+
+2001-11-18  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* glossterm.auto.link.xml: New file.
+
+2001-11-09  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* admon.graphics.extension.xml, admon.graphics.path.xml, admon.graphics.xml, admon.style.xml, admonition.title.properties.xml, alignment.xml, annotate.toc.xml, appendix.autolabel.xml, arbortext.extensions.xml, author.othername.in.middle.xml, autotoc.label.separator.xml, base.dir.xml, biblioentry.item.separator.xml, bibliography.collection.xml, body.font.family.xml, body.font.master.xml, body.font.size.xml, body.margin.bottom.xml, body.margin.top.xml, bridgehead.in.toc.xml, callout.defaultcolumn.xml, callout.graphics.extension.xml, callout.graphics.number.limit.xml, callout.graphics.path.xml, callout.graphics.xml, callout.list.table.xml, callout.unicode.font.xml, callout.unicode.number.limit.xml, callout.unicode.start.character.xml, callout.unicode.xml, callouts.extension.xml, chapter.autolabel.xml, chunk.datafile.xml, chunk.first.sections.xml, chunk.sections.xml, citerefentry.link.xml, column.count.xml, component.title.properties.xml, css.decoration.xml, default.encoding.x!
 ml, default.table.width.xml, default.units.xml, dingbat.font.family.xml, double.sided.xml, ebnf.table.bgcolor.xml, ebnf.table.border.xml, emphasis.propagates.style.xml, footnote.font.size.xml, fop.extensions.xml, formal.object.properties.xml, formal.procedures.xml, formal.title.properties.xml, format.variablelist.as.list.xml, funcsynopsis.decoration.xml, funcsynopsis.style.xml, function.parens.xml, generate.appendix.toc.xml, generate.article.toc.xml, generate.book.equation.lot.xml, generate.book.example.lot.xml, generate.book.figure.lot.xml, generate.book.table.lot.xml, generate.book.toc.xml, generate.chapter.toc.xml, generate.component.toc.xml, generate.division.equation.lot.xml, generate.division.example.lot.xml, generate.division.figure.lot.xml, generate.division.table.lot.xml, generate.division.toc.xml, generate.index.xml, generate.legalnotice.link.xml, generate.part.toc.xml, generate.preface.toc.xml, generate.qandadiv.toc.xml, generate.qandaset.toc.xml, generate.refere!
 nce.toc.xml, generate.section.toc.level.xml, generate.section.toc.xml,
 generate.set.toc.xml, graphic.default.extension.xml, html.base.xml, html.ext.xml, html.longdesc.link.xml, html.longdesc.xml, html.stylesheet.type.xml, html.stylesheet.xml, htmlhelp.autolabel.xml, htmlhelp.chm.xml, htmlhelp.encoding.xml, htmlhelp.enumerate.images.xml, htmlhelp.hhc.xml, htmlhelp.hhp.tail.xml, htmlhelp.hhp.xml, hyphenate.xml, inherit.keywords.xml, insert.xref.page.number.xml, label.from.part.xml, linenumbering.everyNth.xml, linenumbering.extension.xml, linenumbering.separator.xml, linenumbering.width.xml, link.mailto.url.xml, list.block.spacing.xml, list.item.spacing.xml, make.single.year.ranges.xml, make.year.ranges.xml, monospace.font.family.xml, monospace.verbatim.properties.xml, navig.graphics.extension.xml, navig.graphics.path.xml, navig.graphics.xml, navig.showtitles.xml, nominal.table.width.xml, normal.para.spacing.xml, olink.fragid.xml, olink.outline.ext.xml, olink.pubid.xml, olink.resolver.xml, olink.sysid.xml, page.height.portrait.xml, page.height.xm!
 l, page.margin.bottom.xml, page.margin.inner.xml, page.margin.outer.xml, page.margin.top.xml, page.orientation.xml, page.width.portrait.xml, page.width.xml, paper.type.xml, part.autolabel.xml, passivetex.extensions.xml, phrase.propagates.style.xml, preface.autolabel.xml, process.empty.source.toc.xml, process.source.toc.xml, qanda.defaultlabel.xml, qanda.inherit.numeration.xml, qandadiv.autolabel.xml, refentry.generate.name.xml, refentry.separator.xml, refentry.xref.manvolnum.xml, region.after.extent.xml, region.before.extent.xml, root.filename.xml, rootid.xml, runinhead.default.title.end.punct.xml, runinhead.title.end.punct.xml, sans.font.family.xml, saxon.callouts.xml, saxon.character.representation.xml, saxon.linenumbering.xml, saxon.tablecolumns.xml, section.autolabel.xml, section.label.includes.component.label.xml, shade.verbatim.style.xml, shade.verbatim.xml, show.comments.xml, show.revisionflag.xml, spacing.paras.xml, stylesheet.result.type.xml, suppress.navigation.xm!
 l, table.border.color.xml, table.border.padding.xml, table.border.styl
e.xml, table.border.thickness.xml, table.borders.with.css.xml, table.entry.padding.xml, tablecolumns.extension.xml, template.xml, textinsert.extension.xml, title.font.family.xml, title.margin.left.xml, toc.list.type.xml, toc.margin.properties.xml, toc.section.depth.xml, ulink.target.xml, use.extensions.xml, use.id.as.filename.xml, use.id.function.xml, using.chunker.xml, verbatim.properties.xml, xep.extensions.xml, xref.properties.xml: 
+	Move the obvious ID value from the src:fragment to the refentry in parameter reference pages
+
+2001-11-06  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* admonition.title.properties.xml, autotoc.label.separator.xml, body.margin.top.xml, callout.unicode.xml, component.title.properties.xml, formal.object.properties.xml, formal.title.properties.xml, generate.appendix.toc.xml, generate.article.toc.xml, generate.book.equation.lot.xml, generate.book.example.lot.xml, generate.book.figure.lot.xml, generate.book.table.lot.xml, generate.book.toc.xml, generate.chapter.toc.xml, generate.index.xml, generate.part.toc.xml, generate.preface.toc.xml, generate.reference.toc.xml, generate.set.toc.xml, list.block.spacing.xml, list.item.spacing.xml, monospace.verbatim.properties.xml: 
+	Documentation improvements from Dave Pawson
+
+2001-11-06  Robert Stayton <bobstayton at users.sourceforge.net>
+
+	* navig.graphics.extension.xml, navig.graphics.path.xml, navig.graphics.xml, navig.showtitles.xml: 
+	New file.
+
+2001-11-06  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* normal.para.spacing.xml: Documentation improvements from Dave Pawson
+
+2001-11-05  Jirka Kosek <kosek at users.sourceforge.net>
+
+	* htmlhelp.autolabel.xml, htmlhelp.chm.xml, htmlhelp.encoding.xml, htmlhelp.enumerate.images.xml, htmlhelp.hhc.xml, htmlhelp.hhp.tail.xml, htmlhelp.hhp.xml: 
+	New file.
+
+2001-10-16  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* html.longdesc.link.xml, html.longdesc.xml: New file.
+
+2001-10-15  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* table.borders.with.css.xml, table.entry.padding.xml: 
+	New file.
+
+2001-10-08  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* table.border.color.xml, table.border.padding.xml, table.border.style.xml, table.border.thickness.xml, template.xml, title.margin.left.xml: 
+	New params for FOs
+
+2001-10-07  Norman Walsh <nwalsh at users.sourceforge.net>
+
+	* admon.graphics.extension.xml, admon.graphics.path.xml, admon.graphics.xml, admon.style.xml, admonition.title.properties.xml, alignment.xml, annotate.toc.xml, appendix.autolabel.xml, arbortext.extensions.xml, author.othername.in.middle.xml, autotoc.label.separator.xml, base.dir.xml, biblioentry.item.separator.xml, bibliography.collection.xml, body.font.family.xml, body.font.master.xml, body.font.size.xml, body.margin.bottom.xml, body.margin.top.xml, bridgehead.in.toc.xml, callout.defaultcolumn.xml, callout.graphics.extension.xml, callout.graphics.number.limit.xml, callout.graphics.path.xml, callout.graphics.xml, callout.list.table.xml, callout.unicode.font.xml, callout.unicode.number.limit.xml, callout.unicode.start.character.xml, callout.unicode.xml, callouts.extension.xml, chapter.autolabel.xml, chunk.datafile.xml, chunk.first.sections.xml, chunk.sections.xml, citerefentry.link.xml, column.count.xml, component.title.properties.xml, css.decoration.xml, default.encoding.x!
 ml, default.table.width.xml, default.units.xml, dingbat.font.family.xml, double.sided.xml, ebnf.table.bgcolor.xml, ebnf.table.border.xml, emphasis.propagates.style.xml, footnote.font.size.xml, fop.extensions.xml, formal.object.properties.xml, formal.procedures.xml, formal.title.properties.xml, format.variablelist.as.list.xml, funcsynopsis.decoration.xml, funcsynopsis.style.xml, function.parens.xml, generate.appendix.toc.xml, generate.article.toc.xml, generate.book.equation.lot.xml, generate.book.example.lot.xml, generate.book.figure.lot.xml, generate.book.table.lot.xml, generate.book.toc.xml, generate.chapter.toc.xml, generate.component.toc.xml, generate.division.equation.lot.xml, generate.division.example.lot.xml, generate.division.figure.lot.xml, generate.division.table.lot.xml, generate.division.toc.xml, generate.index.xml, generate.legalnotice.link.xml, generate.part.toc.xml, generate.preface.toc.xml, generate.qandadiv.toc.xml, generate.qandaset.toc.xml, generate.refere!
 nce.toc.xml, generate.section.toc.level.xml, generate.section.toc.xml,
 generate.set.toc.xml, graphic.default.extension.xml, html.base.xml, html.ext.xml, html.stylesheet.type.xml, html.stylesheet.xml, hyphenate.xml, inherit.keywords.xml, insert.xref.page.number.xml, label.from.part.xml, linenumbering.everyNth.xml, linenumbering.extension.xml, linenumbering.separator.xml, linenumbering.width.xml, link.mailto.url.xml, list.block.spacing.xml, list.item.spacing.xml, make.single.year.ranges.xml, make.year.ranges.xml, monospace.font.family.xml, monospace.verbatim.properties.xml, nominal.table.width.xml, normal.para.spacing.xml, olink.fragid.xml, olink.outline.ext.xml, olink.pubid.xml, olink.resolver.xml, olink.sysid.xml, page.height.portrait.xml, page.height.xml, page.margin.bottom.xml, page.margin.inner.xml, page.margin.outer.xml, page.margin.top.xml, page.orientation.xml, page.width.portrait.xml, page.width.xml, paper.type.xml, part.autolabel.xml, passivetex.extensions.xml, phrase.propagates.style.xml, preface.autolabel.xml, process.empty.source.to!
 c.xml, process.source.toc.xml, qanda.defaultlabel.xml, qanda.inherit.numeration.xml, qandadiv.autolabel.xml, refentry.generate.name.xml, refentry.separator.xml, refentry.xref.manvolnum.xml, region.after.extent.xml, region.before.extent.xml, root.filename.xml, rootid.xml, runinhead.default.title.end.punct.xml, runinhead.title.end.punct.xml, sans.font.family.xml, saxon.callouts.xml, saxon.character.representation.xml, saxon.linenumbering.xml, saxon.tablecolumns.xml, section.autolabel.xml, section.label.includes.component.label.xml, shade.verbatim.style.xml, shade.verbatim.xml, show.comments.xml, show.revisionflag.xml, spacing.paras.xml, stylesheet.result.type.xml, suppress.navigation.xml, tablecolumns.extension.xml, template.xml, textinsert.extension.xml, title.font.family.xml, toc.list.type.xml, toc.margin.properties.xml, toc.section.depth.xml, ulink.target.xml, use.extensions.xml, use.id.as.filename.xml, use.id.function.xml, using.chunker.xml, verbatim.properties.xml, xep.e!
 xtensions.xml, xref.properties.xml: 
+	New file.
+

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/admon.graphics.extension.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/admon.graphics.extension.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/admon.graphics.extension.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,20 @@
+<refentry id="admon.graphics.extension">
+<refmeta>
+<refentrytitle>admon.graphics.extension</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>admon.graphics.extension</refname>
+<refpurpose>Extension for admonition graphics</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='admon.graphics.extension.frag'><xsl:param name="admon.graphics.extension" select="'.png'"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Sets the extension to use on admonition graphics.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/admon.graphics.path.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/admon.graphics.path.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/admon.graphics.path.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,22 @@
+<refentry id="admon.graphics.path">
+<refmeta>
+<refentrytitle>admon.graphics.path</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>admon.graphics.path</refname>
+<refpurpose>Path to admonition graphics</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='admon.graphics.path.frag'><xsl:param name="admon.graphics.path">images/</xsl:param></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Sets the path, probably relative to the directory where the HTML
+files are created, to the admonition graphics.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/admon.graphics.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/admon.graphics.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/admon.graphics.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,24 @@
+<refentry id="admon.graphics">
+<refmeta>
+<refentrytitle>admon.graphics</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>admon.graphics</refname>
+<refpurpose>Use graphics in admonitions?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='admon.graphics.frag'>
+<xsl:param name="admon.graphics" select="0"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), admonitions are presented in an alternate style that uses
+a graphic.  Default graphics are provided in the distribution.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/admon.style.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/admon.style.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/admon.style.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,24 @@
+<refentry id="admon.style">
+<refmeta>
+<refentrytitle>admon.style</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>admon.style</refname>
+<refpurpose>CSS style attributes for admonitions</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='admon.style.frag'><xsl:param name="admon.style">
+  <xsl:text>margin-left: 0.5in; margin-right: 0.5in;</xsl:text>
+</xsl:param></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Specifies the value of the <sgmltag class="attribute">STYLE</sgmltag>
+attribute that should be added to admonitions.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/admon.textlabel.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/admon.textlabel.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/admon.textlabel.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,27 @@
+<refentry id="admon.textlabel">
+<refmeta>
+<refentrytitle>admon.textlabel</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>admon.textlabel</refname>
+<refpurpose>Use text label in admonitions?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='admon.textlabel.frag'>
+<xsl:param name="admon.textlabel" select="1"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), admonitions are presented with a generated
+text label such as Note or Warning in the appropriate language.
+If zero, such labels are turned off, but any title child
+of the admonition element are still output.
+The default value is 1.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/admonition.properties.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/admonition.properties.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/admonition.properties.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,16 @@
+<refentry id="admonition.properties">
+<refnamediv>
+<refname>admonition.properties</refname>
+<refpurpose>To set the style for admonitions.</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='admonition.properties.frag'><xsl:attribute-set name="admonition.properties"/>
+</src:fragment>
+</refsynopsisdiv>
+<refsect1><title>Description</title>
+<para>How do you want admonitions styled? </para>
+<para>Set the font-size, weight, etc. to the style required</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/admonition.title.properties.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/admonition.title.properties.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/admonition.title.properties.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,22 @@
+<refentry id="admonition.title.properties">
+<refnamediv>
+<refname>admonition.title.properties</refname>
+<refpurpose>To set the style for admonitions titles.</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='admonition.title.properties.frag'>
+<xsl:attribute-set name="admonition.title.properties">
+  <xsl:attribute name="font-size">14pt</xsl:attribute>
+  <xsl:attribute name="font-weight">bold</xsl:attribute>
+  <xsl:attribute name="hyphenate">false</xsl:attribute>
+  <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
+</xsl:attribute-set>
+</src:fragment>
+</refsynopsisdiv>
+<refsect1><title>Description</title>
+<para>How do you want admonitions titles styled? </para>
+<para>Set the font-size, weight etc to the style required.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/alignment.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/alignment.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/alignment.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,21 @@
+<refentry id="alignment">
+<refmeta>
+<refentrytitle>alignment</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>alignment</refname>
+<refpurpose>Specify the default text alignment</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='alignment.frag'><xsl:param name="alignment">justify</xsl:param></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The default text alignment is used for most body text.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/annotate.toc.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/annotate.toc.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/annotate.toc.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="annotate.toc">
+<refmeta>
+<refentrytitle>annotate.toc</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>annotate.toc</refname>
+<refpurpose>Annotate the Table of Contents?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='annotate.toc.frag'><xsl:param name="annotate.toc" select="1"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true, TOCs will be annotated. At present, this just means
+that the <sgmltag>RefPurpose</sgmltag> of <sgmltag>RefEntry</sgmltag>
+TOC entries will be displayed.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/appendix.autolabel.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/appendix.autolabel.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/appendix.autolabel.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,22 @@
+<refentry id="appendix.autolabel">
+<refmeta>
+<refentrytitle>appendix.autolabel</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>appendix.autolabel</refname>
+<refpurpose>Are Appendixes automatically enumerated?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='appendix.autolabel.frag'><xsl:param name="appendix.autolabel" select="1"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), unlabeled appendixes will be
+enumerated.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/arbortext.extensions.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/arbortext.extensions.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/arbortext.extensions.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="arbortext.extensions">
+<refmeta>
+<refentrytitle>arbortext.extensions</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>arbortext.extensions</refname>
+<refpurpose>Enable Arbortext extensions?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='arbortext.extensions.frag'><xsl:param name="arbortext.extensions" select="0"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero,
+<ulink url="http://www.arbortext.com/">Arbortext</ulink>
+extensions will be used.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/article.appendix.title.properties.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/article.appendix.title.properties.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/article.appendix.title.properties.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,30 @@
+<refentry id="article.appendix.title.properties">
+<refmeta>
+<refentrytitle>article.appendix.title.properties</refentrytitle>
+<refmiscinfo role="type">attribute set</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>article.appendix.title.properties</refname>
+<refpurpose>Properties for appendix titles that appear in an article</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='article.appendix.title.properties.frag'>
+<xsl:attribute-set name="article.appendix.title.properties"
+                   use-attribute-sets="section.title.properties
+		                       section.title.level1.properties">
+  <xsl:attribute name="margin-left">
+    <xsl:value-of select="$title.margin.left"/>
+  </xsl:attribute>
+</xsl:attribute-set>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The properties for the title of an appendix that
+appears inside an article.  The default is to use
+the properties of sect1 titles.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/author.othername.in.middle.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/author.othername.in.middle.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/author.othername.in.middle.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,25 @@
+<refentry id="author.othername.in.middle">
+<refmeta>
+<refentrytitle>author.othername.in.middle</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>author.othername.in.middle</refname>
+<refpurpose>Is <sgmltag>othername</sgmltag> in <sgmltag>author</sgmltag> a
+middle name?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='author.othername.in.middle.frag'><xsl:param name="author.othername.in.middle" select="1"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), the <sgmltag>othername</sgmltag> of an <sgmltag>author</sgmltag>
+appears between the <sgmltag>firstname</sgmltag> and
+<sgmltag>surname</sgmltag>.  Otherwise, <sgmltag>othername</sgmltag>
+is suppressed.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/autotoc.label.separator.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/autotoc.label.separator.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/autotoc.label.separator.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,20 @@
+<refentry id="autotoc.label.separator">
+<refmeta>
+<refentrytitle>autotoc.label.separator</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>autotoc.label.separator</refname>
+<refpurpose>Separator between labels and titles in the ToC</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='autotoc.label.separator.frag'><xsl:param name="autotoc.label.separator" select="'. '"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>String to use to seperate labels and title in a table of contents.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/axf.extensions.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/axf.extensions.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/axf.extensions.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,25 @@
+<refentry id="axf.extensions">
+<refmeta>
+<refentrytitle>axf.extensions</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>axf.extensions</refname>
+<refpurpose>Enable XSL Formatter extensions?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='axf.extensions.frag'>
+<xsl:param name="axf.extensions" select="0"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero,
+<ulink url="http://www.antennahouse.com/">XSL Formatter</ulink>
+extensions will be used. XSL Formatter extensions consists of PDF bookmarks,
+document information and better index processing.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/base.dir.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/base.dir.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/base.dir.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,22 @@
+<refentry id="base.dir">
+<refmeta>
+<refentrytitle>base.dir</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>base.dir</refname>
+<refpurpose>The base directory of chunks</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='base.dir.frag'><xsl:param name="base.dir" select="''"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If specified, the <literal>base.dir</literal> identifies
+the output directory for chunks. (If not specified, the output directory
+is system dependent.)</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/biblioentry.item.separator.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/biblioentry.item.separator.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/biblioentry.item.separator.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,21 @@
+<refentry id="biblioentry.item.separator">
+<refmeta>
+<refentrytitle>biblioentry.item.separator</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>biblioentry.item.separator</refname>
+<refpurpose>Text to separate bibliography entries</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='biblioentry.item.separator.frag'><xsl:param name="biblioentry.item.separator">. </xsl:param></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Text to separate bibliography entries
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/bibliography.collection.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/bibliography.collection.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/bibliography.collection.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,96 @@
+<refentry id="bibliography.collection">
+<refmeta>
+<refentrytitle>bibliography.collection</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>bibliography.collection</refname>
+<refpurpose>Name of the bibliography collection file</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='bibliography.collection.frag'><xsl:param name="bibliography.collection" select="'http://docbook.sourceforge.net/release/bibliography/bibliography.xml'"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Maintaining bibliography entries across a set of documents is tedious, time
+consuming, and error prone. It makes much more sense, usually, to store all of
+the bibliography entries in a single place and simply <quote>extract</quote>
+the ones you need in each document.</para>
+
+<para>That's the purpose of the
+<parameter>bibliography.collection</parameter> parameter. To setup a global
+bibliography <quote>database</quote>, follow these steps:</para>
+
+<para>First, create a stand-alone bibliography document that contains all of
+the documents that you wish to reference. Make sure that each bibliography
+entry (whether you use <sgmltag>biblioentry</sgmltag> or <sgmltag>bibliomixed</sgmltag>)
+has an ID.</para>
+
+<para>My global bibliography, <filename>~/bibliography.xml</filename> begins
+like this:</para>
+
+<informalexample>
+<programlisting><![CDATA[<!DOCTYPE bibliography
+  PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+  "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<bibliography><title>References</title>
+
+<bibliomixed id="xml-rec"><abbrev>XML 1.0</abbrev>Tim Bray,
+Jean Paoli, C. M. Sperberg-McQueen, and Eve Maler, editors.
+<citetitle><ulink url="http://www.w3.org/TR/REC-xml">Extensible Markup
+Language (XML) 1.0 Second Edition</ulink></citetitle>.
+World Wide Web Consortium, 2000.
+</bibliomixed>
+
+<bibliomixed id="xml-names"><abbrev>Namespaces</abbrev>Tim Bray,
+Dave Hollander,
+and Andrew Layman, editors.
+<citetitle><ulink url="http://www.w3.org/TR/REC-xml-names/">Namespaces in
+XML</ulink></citetitle>.
+World Wide Web Consortium, 1999.
+</bibliomixed>
+
+<!-- ... -->
+</bibliography>
+]]></programlisting>
+</informalexample>
+
+<para>When you create a bibliography in your document, simply
+provide <emphasis>empty</emphasis> <sgmltag>bibliomixed</sgmltag>
+entries for each document that you wish to cite. Make sure that these
+elements have the same ID as the corresponding <quote>real</quote>
+entry in your global bibliography.</para>
+
+<para>For example:</para>
+
+<informalexample>
+<programlisting><![CDATA[<bibliography><title>Bibliography</title>
+
+<bibliomixed id="xml-rec"/>
+<bibliomixed id="xml-names"/>
+<bibliomixed id="DKnuth86">Donald E. Knuth. <citetitle>Computers and
+Typesetting: Volume B, TeX: The Program</citetitle>. Addison-Wesley,
+1986.  ISBN 0-201-13437-3.
+</bibliomixed>
+<bibliomixed id="relaxng"/>
+
+</bibliography>]]></programlisting>
+</informalexample>
+
+<para>Note that it's perfectly acceptable to mix entries from your
+global bibliography with <quote>normal</quote> entries. You can use
+<sgmltag>xref</sgmltag> or other elements to cross-reference your
+bibliography entries in exactly the same way you do now.</para>
+
+<para>Finally, when you are ready to format your document, simply set the
+<parameter>bibliography.collection</parameter> parameter (in either a
+customization layer or directly through your processor's interface) to
+point to your global bibliography.</para>
+
+<para>The stylesheets will format the bibliography in your document as if
+all of the entries referenced appeared there literally.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/bibliography.numbered.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/bibliography.numbered.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/bibliography.numbered.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,22 @@
+<refentry id="bibliography.numbered">
+<refmeta>
+<refentrytitle>bibliography.numbered</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>bibliography.numbered</refname>
+<refpurpose>Should bibliography entries be numbered?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='bibliography.numbered.frag'>
+<xsl:param name="bibliography.numbered" select="0"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero bibliography entries will be numbered</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/blockquote.properties.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/blockquote.properties.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/blockquote.properties.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,25 @@
+<refentry id="blockquote.properties">
+<refnamediv>
+<refname>blockquote.properties</refname>
+<refpurpose>To set the style for block quotations.</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='blockquote.properties.frag'>
+<xsl:attribute-set name="blockquote.properties">
+<xsl:attribute name="start-indent">0.5in</xsl:attribute>
+<xsl:attribute name="end-indent">0.5in</xsl:attribute>
+<xsl:attribute name="space-after.minimum">0.5em</xsl:attribute>
+<xsl:attribute name="space-after.optimum">1em</xsl:attribute>
+<xsl:attribute name="space-after.maximum">2em</xsl:attribute>
+</xsl:attribute-set>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The <parameter>blockquote.properties</parameter> attribute set specifies
+the formating properties of block quotations.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/body.font.family.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/body.font.family.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/body.font.family.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="body.font.family">
+<refmeta>
+<refentrytitle>body.font.family</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>body.font.family</refname>
+<refpurpose>The default font family for body text</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='body.font.family.frag'>
+<xsl:param name="body.font.family" select="'serif'"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The body font family is the default font used for text in the page body.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/body.font.master.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/body.font.master.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/body.font.master.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,25 @@
+<refentry id="body.font.master">
+<refmeta>
+<refentrytitle>body.font.master</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>body.font.master</refname>
+<refpurpose>Specifies the default point size for body text</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='body.font.master.frag'>
+<xsl:param name="body.font.master">10</xsl:param>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The body font size is specified in two parameters
+(<varname>body.font.master</varname> and <varname>body.font.size</varname>)
+so that math can be performed on the font size by XSLT.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/body.font.size.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/body.font.size.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/body.font.size.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,25 @@
+<refentry id="body.font.size">
+<refmeta>
+<refentrytitle>body.font.size</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>body.font.size</refname>
+<refpurpose>Specifies the default font size for body text</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='body.font.size.frag'><xsl:param name="body.font.size">
+ <xsl:value-of select="$body.font.master"/><xsl:text>pt</xsl:text>
+</xsl:param></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The body font size is specified in two parameters
+(<varname>body.font.master</varname> and <varname>body.font.size</varname>)
+so that math can be performed on the font size by XSLT.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/body.margin.bottom.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/body.margin.bottom.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/body.margin.bottom.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,24 @@
+<refentry id="body.margin.bottom">
+<refmeta>
+<refentrytitle>body.margin.bottom</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>body.margin.bottom</refname>
+<refpurpose>The bottom margin of the body text</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='body.margin.bottom.frag'>
+<xsl:param name="body.margin.bottom" select="'0.5in'"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The body bottom margin is the distance from the last line of text
+in the page body to the bottom of the region-after.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/body.margin.top.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/body.margin.top.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/body.margin.top.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,24 @@
+<refentry id="body.margin.top">
+<refmeta>
+<refentrytitle>body.margin.top</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>body.margin.top</refname>
+<refpurpose>To specify the size of the top margin of a page</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='body.margin.top.frag'>
+<xsl:param name="body.margin.top" select="'0.5in'"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The body top margin is the distance from the top of the region-before
+to the first line of text in the page body.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/bridgehead.in.toc.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/bridgehead.in.toc.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/bridgehead.in.toc.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="bridgehead.in.toc">
+<refmeta>
+<refentrytitle>bridgehead.in.toc</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>bridgehead.in.toc</refname>
+<refpurpose>Should bridgehead elements appear in the TOC?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='bridgehead.in.toc.frag'><xsl:param name="bridgehead.in.toc" select="0"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, bridgeheads appear in the TOC. Note that this option
+is not fully supported and may be removed in a future version of the
+stylesheets.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/callout.defaultcolumn.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/callout.defaultcolumn.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/callout.defaultcolumn.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="callout.defaultcolumn">
+<refmeta>
+<refentrytitle>callout.defaultcolumn</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>callout.defaultcolumn</refname>
+<refpurpose>Indicates what column callouts appear in by default</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='callout.defaultcolumn.frag'><xsl:param name="callout.defaultcolumn" select="'60'"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If a callout does not identify a column (for example, if it uses
+the <literal>linerange</literal> <sgmltag class="attribute">unit</sgmltag>),
+it will appear in the default column.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/callout.graphics.extension.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/callout.graphics.extension.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/callout.graphics.extension.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,20 @@
+<refentry id="callout.graphics.extension">
+<refmeta>
+<refentrytitle>callout.graphics.extension</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>callout.graphics.extension</refname>
+<refpurpose>Extension for callout graphics</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='callout.graphics.extension.frag'><xsl:param name="callout.graphics.extension" select="'.png'"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Sets the extension to use on callout graphics.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/callout.graphics.number.limit.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/callout.graphics.number.limit.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/callout.graphics.number.limit.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,28 @@
+<refentry id="callout.graphics.number.limit">
+<refmeta>
+<refentrytitle>callout.graphics.number.limit</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>callout.graphics.number.limit</refname>
+<refpurpose>Number of the largest callout graphic</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='callout.graphics.number.limit.frag'><xsl:param name="callout.graphics.number.limit" select="'10'"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If <parameter>callout.graphics</parameter>
+is non-zero, graphics are used to represent
+callout numbers. The value of
+<parameter>callout.graphics.number.limit</parameter>
+is
+the largest number for which a graphic exists. If the callout number
+exceeds this limit, the default presentation "(nnn)" will always
+be used.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/callout.graphics.path.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/callout.graphics.path.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/callout.graphics.path.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,24 @@
+<refentry id="callout.graphics.path">
+<refmeta>
+<refentrytitle>callout.graphics.path</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>callout.graphics.path</refname>
+<refpurpose>Path to callout graphics</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='callout.graphics.path.frag'>
+<xsl:param name="callout.graphics.path" select="'images/callouts/'"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Sets the path, probably relative to the directory where the HTML
+files are created, to the callout graphics.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/callout.graphics.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/callout.graphics.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/callout.graphics.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,25 @@
+<refentry id="callout.graphics">
+<refmeta>
+<refentrytitle>callout.graphics</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>callout.graphics</refname>
+<refpurpose>Use graphics for callouts?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='callout.graphics.frag'>
+<xsl:param name="callout.graphics" select="'1'"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, callouts are presented with graphics (e.g., reverse-video
+circled numbers instead of "(1)", "(2)", etc.).
+Default graphics are provided in the distribution.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/callout.list.table.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/callout.list.table.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/callout.list.table.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,25 @@
+<refentry id="callout.list.table">
+<refmeta>
+<refentrytitle>callout.list.table</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>callout.list.table</refname>
+<refpurpose>Present callout lists using a table?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='callout.list.table.frag'><xsl:param name="callout.list.table" select="'1'"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The default presentation of <sgmltag>CalloutList</sgmltag>s uses
+an HTML <sgmltag>DL</sgmltag>. Some browsers don't align DLs very well
+if <parameter>callout.graphics</parameter> are used. With this option
+turned on, <sgmltag>CalloutList</sgmltag>s are presented in an HTML
+<sgmltag>TABLE</sgmltag>, which usually results in better alignment
+of the callout number with the callout description.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/callout.unicode.font.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/callout.unicode.font.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/callout.unicode.font.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,22 @@
+<refentry id="callout.unicode.font">
+<refmeta>
+<refentrytitle>callout.unicode.font</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>callout.unicode.font</refname>
+<refpurpose>Specify a font for Unicode glyphs</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='callout.unicode.font.frag'><xsl:param name="callout.unicode.font" select="'ZapfDingbats'"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The name of the font to specify around Unicode callout glyphs.
+If set to the empty string, no font change will occur.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/callout.unicode.number.limit.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/callout.unicode.number.limit.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/callout.unicode.number.limit.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,28 @@
+<refentry id="callout.unicode.number.limit">
+<refmeta>
+<refentrytitle>callout.unicode.number.limit</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>callout.unicode.number.limit</refname>
+<refpurpose>Number of the largest callout graphic</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='callout.unicode.number.limit.frag'><xsl:param name="callout.unicode.number.limit" select="'10'"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If <parameter>callout.unicode</parameter>
+is non-zero, unicode characters are used to represent
+callout numbers. The value of
+<parameter>callout.unicode.number.limit</parameter>
+is
+the largest number for which a unicode character exists. If the callout number
+exceeds this limit, the default presentation "(nnn)" will always
+be used.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/callout.unicode.start.character.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/callout.unicode.start.character.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/callout.unicode.start.character.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,26 @@
+<refentry id="callout.unicode.start.character">
+<refmeta>
+<refentrytitle>callout.unicode.start.character</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>callout.unicode.start.character</refname>
+<refpurpose>First Unicode character to use, decimal value.</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='callout.unicode.start.character.frag'><xsl:param name="callout.unicode.start.character" select="10102"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If <parameter>callout.graphics</parameter> is zero and <parameter>callout.unicode</parameter>
+is non-zero, unicode characters are used to represent
+callout numbers. The value of
+<parameter>callout.unicode.start.character</parameter>
+is the decimal unicode value used for callout number one. Currently, 
+only 10102 is supported in the stylesheets for this parameter. 
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/callout.unicode.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/callout.unicode.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/callout.unicode.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,21 @@
+<refentry id="callout.unicode">
+<refmeta>
+<refentrytitle>callout.unicode</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>callout.unicode</refname>
+<refpurpose>Use Unicode characters rather than images for callouts.</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='callout.unicode.frag'><xsl:param name="callout.unicode" select="0"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The stylesheets can use either an image of the numbers one to ten, or the single Unicode character which represents the numeral, in white on a black background. Use this to select the Unicode character option.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/callouts.extension.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/callouts.extension.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/callouts.extension.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="callouts.extension">
+<refmeta>
+<refentrytitle>callouts.extension</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>callouts.extension</refname>
+<refpurpose>Enable the callout extension</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='callouts.extension.frag'><xsl:param name="callouts.extension" select="'1'"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The callouts extension processes <sgmltag>areaset</sgmltag>
+elements in <sgmltag>ProgramListingCO</sgmltag> and other text-based
+callout elements.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/chapter.autolabel.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/chapter.autolabel.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/chapter.autolabel.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,21 @@
+<refentry id="chapter.autolabel">
+<refmeta>
+<refentrytitle>chapter.autolabel</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>chapter.autolabel</refname>
+<refpurpose>Are chapters automatically enumerated?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='chapter.autolabel.frag'><xsl:param name="chapter.autolabel" select="1"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), unlabeled chapters will be enumerated.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/chunk.first.sections.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/chunk.first.sections.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/chunk.first.sections.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,26 @@
+<refentry id="chunk.first.sections">
+<refmeta>
+<refentrytitle>chunk.first.sections</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>chunk.first.sections</refname>
+<refpurpose>Chunk the first top-level section?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='chunk.first.sections.frag'>
+<xsl:param name="chunk.first.sections" select="0"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, a chunk will be created for the first top-level
+<sgmltag>sect1</sgmltag> or <sgmltag>section</sgmltag> elements in
+each component. Otherwise, that section will be part of the chunk for
+its parent.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/chunk.quietly.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/chunk.quietly.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/chunk.quietly.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,25 @@
+<refentry id="chunk.quietly">
+<refmeta>
+<refentrytitle>chunk.quietly</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>chunk.quietly</refname>
+<refpurpose>Omit the chunked filename messages.</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='chunk.quietly.frag'>
+<xsl:param name="chunk.quietly" select="0"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If zero (the default), the XSL processor emits a message naming
+each separate chunk filename as it is being output.
+If nonzero, then the messages are suppressed.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/chunk.section.depth.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/chunk.section.depth.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/chunk.section.depth.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,22 @@
+<refentry id="chunk.section.depth">
+<refmeta>
+<refentrytitle>chunk.section.depth</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>chunk.section.depth</refname>
+<refpurpose>Depth to which sections should be chunked</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='chunk.section.depth.frag'>
+<xsl:param name="chunk.section.depth" select="1"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This parameter sets the depth of section chunking.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/chunk.sections.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/chunk.sections.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/chunk.sections.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="chunk.sections">
+<refmeta>
+<refentrytitle>chunk.sections</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>chunk.sections</refname>
+<refpurpose>Should top-level sections be chunks in their own right?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='chunk.sections.frag'><xsl:param name="chunk.sections" select="'1'"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, chunks will be created for top-level
+<sgmltag>sect1</sgmltag> and <sgmltag>section</sgmltag> elements in
+each component.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/chunk.toc.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/chunk.toc.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/chunk.toc.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,25 @@
+<refentry id="chunk.toc">
+<refmeta>
+<refentrytitle>chunk.toc</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>chunk.toc</refname>
+<refpurpose>An explicit TOC to be used for chunking</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='chunk.toc.frag'>
+<xsl:param name="chunk.toc" select="''"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The <parameter>chunk.toc</parameter> identifies an explicit TOC that
+will be used for chunking. This parameter is only used by the
+<filename>chunktoc.xsl</filename> stylesheet (and customization layers built
+from it).</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/chunk.tocs.and.lots.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/chunk.tocs.and.lots.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/chunk.tocs.and.lots.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,27 @@
+<refentry id="chunk.tocs.and.lots">
+<refmeta>
+<refentrytitle>chunk.tocs.and.lots</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>chunk.tocs.and.lots</refname>
+<refpurpose>Should ToC and LoTs be in separate chunks?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='chunk.tocs.and.lots.frag'>
+<xsl:param name="chunk.tocs.and.lots" select="0"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, ToC and LoT (List of Examples, List of Figures, etc.)
+will be put in a separate chunk. At the moment, this chunk is not in the
+normal forward/backward navigation list. Instead, a new link is added to the
+navigation footer.</para>
+
+<para>This feature is still somewhat experimental. Feedback welcome.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/chunker.output.cdata-section-elements.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/chunker.output.cdata-section-elements.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/chunker.output.cdata-section-elements.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,27 @@
+<refentry id="chunker.output.cdata-section-elements">
+<refmeta>
+<refentrytitle>chunker.output.cdata-section-elements</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>chunker.output.cdata-section-elements</refname>
+<refpurpose>List of elements to escape with CDATA sections</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>&lt;xsl:param name="chunker.output.cdata-section-elements" select="''"/>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This parameter specifies the list of elements that should be escaped
+as CDATA sections by the chunking stylesheet.  Not all processors support
+specification of this parameter.
+</para>
+
+<note>
+<para>This parameter is documented here, but the declaration is actually
+in the <filename>chunker.xsl</filename> stylesheet module.</para>
+</note>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/chunker.output.doctype-public.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/chunker.output.doctype-public.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/chunker.output.doctype-public.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,28 @@
+<refentry id="chunker.output.doctype-public">
+<refmeta>
+<refentrytitle>chunker.output.doctype-public</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>chunker.output.doctype-public</refname>
+<refpurpose>Public identifer to use in the document type of generated pages</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>&lt;xsl:param name="chunker.output.doctype-public" select="''"/>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This parameter specifies the public identifier that should be used by
+the chunking stylesheet in the document type declaration of chunked pages.
+Not all processors support specification of
+this parameter.
+</para>
+
+<note>
+<para>This parameter is documented here, but the declaration is actually
+in the <filename>chunker.xsl</filename> stylesheet module.</para>
+</note>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/chunker.output.doctype-system.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/chunker.output.doctype-system.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/chunker.output.doctype-system.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,28 @@
+<refentry id="chunker.output.doctype-system">
+<refmeta>
+<refentrytitle>chunker.output.doctype-system</refentrytitle>
+<refmiscinfo role="type">uri</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>chunker.output.doctype-system</refname>
+<refpurpose>System identifier to use for the document type in generated pages</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>&lt;xsl:param name="chunker.output.doctype-system" select="''"/>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This parameter specifies the system identifier that should be used by
+the chunking stylesheet in the document type declaration of chunked pages.
+Not all processors support specification of
+this parameter.
+</para>
+
+<note>
+<para>This parameter is documented here, but the declaration is actually
+in the <filename>chunker.xsl</filename> stylesheet module.</para>
+</note>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/chunker.output.encoding.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/chunker.output.encoding.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/chunker.output.encoding.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,29 @@
+<refentry id="chunker.output.encoding">
+<refmeta>
+<refentrytitle>chunker.output.encoding</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>chunker.output.encoding</refname>
+<refpurpose>Encoding used in generated pages</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>&lt;xsl:param name="chunker.output.encoding" select="'ISO-8859-1'"/>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This parameter specifies the encoding to be used in files
+generated by the chunking stylesheet. Not all processors support
+specification of this parameter.
+</para>
+
+<para>This parameter used to be named <literal>default.encoding</literal>.</para>
+
+<note>
+<para>This parameter is documented here, but the declaration is actually
+in the <filename>chunker.xsl</filename> stylesheet module.</para>
+</note>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/chunker.output.indent.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/chunker.output.indent.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/chunker.output.indent.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,27 @@
+<refentry id="chunker.output.indent">
+<refmeta>
+<refentrytitle>chunker.output.indent</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>chunker.output.indent</refname>
+<refpurpose>Specification of indentation on generated pages</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>&lt;xsl:param name="chunker.output.indent" select="'no'"/>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This parameter specifies the value of the indent
+specification for generated pages. Not all processors support
+specification of this parameter.
+</para>
+
+<note>
+<para>This parameter is documented here, but the declaration is actually
+in the <filename>chunker.xsl</filename> stylesheet module.</para>
+</note>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/chunker.output.media-type.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/chunker.output.media-type.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/chunker.output.media-type.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,27 @@
+<refentry id="chunker.output.media-type">
+<refmeta>
+<refentrytitle>chunker.output.media-type</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>chunker.output.media-type</refname>
+<refpurpose>Media type to use in generated pages</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>&lt;xsl:param name="chunker.output.media-type" select="''"/>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This parameter specifies the media type that should be used by
+the chunking stylesheet. Not all processors support specification of
+this parameter.
+</para>
+
+<note>
+<para>This parameter is documented here, but the declaration is actually
+in the <filename>chunker.xsl</filename> stylesheet module.</para>
+</note>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/chunker.output.method.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/chunker.output.method.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/chunker.output.method.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,30 @@
+<refentry id="chunker.output.method">
+<refmeta>
+<refentrytitle>chunker.output.method</refentrytitle>
+<refmiscinfo role="type">list</refmiscinfo>
+<refmiscinfo role="value">html</refmiscinfo>
+<refmiscinfo role="value">xml</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>chunker.output.method</refname>
+<refpurpose>Method used in generated pages</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>&lt;xsl:param name="chunker.output.method" select="'html'"/>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This parameter specifies the output method to be used in files
+generated by the chunking stylesheet.
+</para>
+
+<para>This parameter used to be named <literal>output.method</literal>.</para>
+
+<note>
+<para>This parameter is documented here, but the declaration is actually
+in the <filename>chunker.xsl</filename> stylesheet module.</para>
+</note>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/chunker.output.omit-xml-declaration.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/chunker.output.omit-xml-declaration.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/chunker.output.omit-xml-declaration.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,27 @@
+<refentry id="chunker.output.omit-xml-declaration">
+<refmeta>
+<refentrytitle>chunker.output.omit-xml-declaration</refentrytitle>
+<refmiscinfo role="type"></refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>chunker.output.omit-xml-declaration</refname>
+<refpurpose>Omit-xml-declaration for generated pages</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>&lt;xsl:param name="chunker.output.omit-xml-declaration" select="'no'"/>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This parameter specifies the value of the omit-xml-declaration
+specification for generated pages. Not all processors support
+specification of this parameter.
+</para>
+
+<note>
+<para>This parameter is documented here, but the declaration is actually
+in the <filename>chunker.xsl</filename> stylesheet module.</para>
+</note>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/chunker.output.standalone.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/chunker.output.standalone.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/chunker.output.standalone.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,27 @@
+<refentry id="chunker.output.standalone">
+<refmeta>
+<refentrytitle>chunker.output.standalone</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>chunker.output.standalone</refname>
+<refpurpose>Standalone declaration for generated pages</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>&lt;xsl:param name="chunker.output.standalone" select="'no'"/>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This parameter specifies the value of the standalone
+specification for generated pages. Not all processors support
+specification of this parameter.
+</para>
+
+<note>
+<para>This parameter is documented here, but the declaration is actually
+in the <filename>chunker.xsl</filename> stylesheet module.</para>
+</note>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/citerefentry.link.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/citerefentry.link.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/citerefentry.link.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="citerefentry.link">
+<refmeta>
+<refentrytitle>citerefentry.link</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>citerefentry.link</refname>
+<refpurpose>Generate URL links when cross-referencing RefEntrys?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='citerefentry.link.frag'><xsl:param name="citerefentry.link" select="'0'"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true, a web link will be generated, presumably
+to an online man-&gt;HTML gateway. The text of the link is
+generated by the generate.citerefentry.link template.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/collect.xref.targets.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/collect.xref.targets.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/collect.xref.targets.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,25 @@
+<refentry id="collect.xref.targets"> 
+<refmeta> 
+<refentrytitle>collect.xref.targets</refentrytitle> 
+<refmiscinfo role="type">string</refmiscinfo> 
+</refmeta> 
+<refnamediv> 
+<refname>collect.xref.targets</refname> 
+<refpurpose>Controls whether cross reference data is
+collected</refpurpose> 
+</refnamediv> 
+<refsynopsisdiv> <src:fragment id="collect.xref.targets.frag">
+<xsl:param name="collect.xref.targets" select="'no'"/>
+</src:fragment> 
+</refsynopsisdiv> 
+<refsect1> 
+<title>Description</title> 
+<para>
+In order to resolve olinks efficiently, the stylesheets can
+generate an external data file containing information about
+all potential cross reference endpoints in a document.
+This parameter determines whether the collection process is run when the document is processed by the stylesheet. The default value is  <literal>no</literal>, which means the data file is not generated during processing. The other choices are <literal>yes</literal>, which means the data file is created and the document is processed for output, and <literal>only</literal>, which means the data file is created but the document is not processed for output.
+See also <parameter>targets.filename</parameter>.
+</para> 
+</refsect1> 
+</refentry> 

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/column.count.back.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/column.count.back.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/column.count.back.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,22 @@
+<refentry id="column.count.back">
+<refmeta>
+<refentrytitle>column.count.back</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>column.count.back</refname>
+<refpurpose>Number of columns on back matter pages</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='column.count.back.frag'>
+<xsl:param name="column.count.back" select="1"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Number of columns on back matter (appendix, glossary, etc.) pages.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/column.count.body.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/column.count.body.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/column.count.body.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,22 @@
+<refentry id="column.count.body">
+<refmeta>
+<refentrytitle>column.count.body</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>column.count.body</refname>
+<refpurpose>Number of columns on body pages</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='column.count.body.frag'>
+<xsl:param name="column.count.body" select="1"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Number of columns on body pages.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/column.count.front.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/column.count.front.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/column.count.front.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,22 @@
+<refentry id="column.count.front">
+<refmeta>
+<refentrytitle>column.count.front</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>column.count.front</refname>
+<refpurpose>Number of columns on front matter pages</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='column.count.front.frag'>
+<xsl:param name="column.count.front" select="1"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Number of columns on front matter (dedication, preface, etc.) pages.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/column.count.index.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/column.count.index.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/column.count.index.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,22 @@
+<refentry id="column.count.index">
+<refmeta>
+<refentrytitle>column.count.index</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>column.count.index</refname>
+<refpurpose>Number of columns on index pages</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='column.count.index.frag'>
+<xsl:param name="column.count.index" select="2"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Number of columns on index pages.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/column.count.lot.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/column.count.lot.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/column.count.lot.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="column.count.lot">
+<refmeta>
+<refentrytitle>column.count.lot</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>column.count.lot</refname>
+<refpurpose>Number of columns on a 'List-of-Titles' page</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='column.count.lot.frag'>
+<xsl:param name="column.count.lot" select="1"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Number of columns on a page sequence containing the Table of Contents,
+List of Figures, etc.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/column.count.titlepage.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/column.count.titlepage.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/column.count.titlepage.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,22 @@
+<refentry id="column.count.titlepage">
+<refmeta>
+<refentrytitle>column.count.titlepage</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>column.count.titlepage</refname>
+<refpurpose>Number of columns on a title page</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='column.count.titlepage.frag'>
+<xsl:param name="column.count.titlepage" select="1"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Number of columns on a title page</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/column.gap.back.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/column.gap.back.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/column.gap.back.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="column.gap.back">
+<refmeta>
+<refentrytitle>column.gap.back</refentrytitle>
+<refmiscinfo role="type">length</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>column.gap.back</refname>
+<refpurpose>Gap between columns in back matter</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='column.gap.back.frag'>
+<xsl:param name="column.gap.back" select="'12pt'"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Specifies the gap between columns in back matter (if
+<parameter>column.count.back</parameter> is greater than one).</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/column.gap.body.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/column.gap.body.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/column.gap.body.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="column.gap.body">
+<refmeta>
+<refentrytitle>column.gap.body</refentrytitle>
+<refmiscinfo role="type">length</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>column.gap.body</refname>
+<refpurpose>Gap between columns in the body</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='column.gap.body.frag'>
+<xsl:param name="column.gap.body" select="'12pt'"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Specifies the gap between columns in body matter (if
+<parameter>column.count.body</parameter> is greater than one).</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/column.gap.front.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/column.gap.front.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/column.gap.front.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="column.gap.front">
+<refmeta>
+<refentrytitle>column.gap.front</refentrytitle>
+<refmiscinfo role="type">length</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>column.gap.front</refname>
+<refpurpose>Gap between columns in the front matter</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='column.gap.front.frag'>
+<xsl:param name="column.gap.front" select="'12pt'"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Specifies the gap between columns in front matter (if
+<parameter>column.count.front</parameter> is greater than one).</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/column.gap.index.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/column.gap.index.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/column.gap.index.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="column.gap.index">
+<refmeta>
+<refentrytitle>column.gap.index</refentrytitle>
+<refmiscinfo role="type">length</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>column.gap.index</refname>
+<refpurpose>Gap between columns in the index</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='column.gap.index.frag'>
+<xsl:param name="column.gap.index" select="'12pt'"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Specifies the gap between columns in indexes (if
+<parameter>column.count.index</parameter> is greater than one).</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/column.gap.lot.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/column.gap.lot.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/column.gap.lot.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="column.gap.lot">
+<refmeta>
+<refentrytitle>column.gap.lot</refentrytitle>
+<refmiscinfo role="type">length</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>column.gap.lot</refname>
+<refpurpose>Gap between columns on a 'List-of-Titles' page</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='column.gap.lot.frag'>
+<xsl:param name="column.gap.lot" select="'12pt'"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Specifies the gap between columns on 'List-of-Titles' pages (if
+<parameter>column.count.lot</parameter> is greater than one).</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/column.gap.titlepage.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/column.gap.titlepage.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/column.gap.titlepage.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,24 @@
+<refentry id="column.gap.titlepage">
+<refmeta>
+<refentrytitle>column.gap.titlepage</refentrytitle>
+<refmiscinfo role="type">length</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>column.gap.titlepage</refname>
+<refpurpose>Gap between columns on title pages</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='column.gap.titlepage.frag'>
+<xsl:param name="column.gap.titlepage" select="'12pt'"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Specifies the gap between columns on title pages (if
+<parameter>column.count.titlepage</parameter> is greater than one).</para>
+
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/compact.list.item.spacing.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/compact.list.item.spacing.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/compact.list.item.spacing.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,19 @@
+<refentry id="compact.list.item.spacing">
+<refnamediv>
+<refname>compact.list.item.spacing</refname>
+<refpurpose>What space do you want between list items (when spacing=compact)?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='compact.list.item.spacing.frag'><xsl:attribute-set name="compact.list.item.spacing">
+  <xsl:attribute name="space-before.optimum">0em</xsl:attribute>
+  <xsl:attribute name="space-before.minimum">0em</xsl:attribute>
+  <xsl:attribute name="space-before.maximum">0.2em</xsl:attribute>
+</xsl:attribute-set></src:fragment>
+</refsynopsisdiv>
+<refsect1><title>Description</title>
+<para>Specify what spacing you want between each list item when
+<sgmltag class="attribute">spacing</sgmltag> is
+<quote><literal>compact</literal></quote>.</para>
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/css.decoration.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/css.decoration.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/css.decoration.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,28 @@
+<refentry id="css.decoration">
+<refmeta>
+<refentrytitle>css.decoration</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>css.decoration</refname>
+<refpurpose>Enable CSS decoration of elements</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='css.decoration.frag'>
+<xsl:param name="css.decoration" select="1"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>
+If <literal>css.decoration</literal> is turned on, then HTML elements
+produced by the
+stylesheet may be decorated with STYLE attributes.  For example, the
+LI tags produced for list items may include a fragment of CSS in the
+STYLE attribute which sets the CSS property "list-style-type".
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/current.docid.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/current.docid.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/current.docid.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,21 @@
+<refentry id="current.docid"> 
+<refmeta> 
+<refentrytitle>current.docid</refentrytitle> 
+<refmiscinfo role="type">string</refmiscinfo> 
+</refmeta> 
+<refnamediv> 
+<refname>current.docid</refname> 
+<refpurpose>targetdoc identifier for the document being
+processed</refpurpose> 
+</refnamediv> 
+<refsynopsisdiv> <src:fragment id="current.docid.frag">
+<xsl:param name="current.docid" select="''"/> </src:fragment> 
+</refsynopsisdiv> 
+<refsect1> 
+<title>Description</title> 
+<para>When olinks between documents are resolved for HTML output, the stylesheet can compute the relative path between the current document and the target document. The stylesheet needs to know the <literal>targetdoc</literal> identifiers for both documents, as they appear in the <parameter>target.database.document</parameter> database file. This parameter passes to the stylesheet
+the targetdoc identifier of the current document, since that
+identifier does not appear in the document itself. </para>
+<para>This parameter can also be used for print output. If an olink's  <literal>targetdoc</literal>  id differs from the <literal>current.docid</literal>, then the stylesheet can append the target document's title to the generated olink text. That identifies to the reader that the link is to a different document, not the current document. See also <parameter>olink.doctitle</parameter> to enable that feature.</para> 
+</refsect1> 
+</refentry> 

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/default.float.class.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/default.float.class.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/default.float.class.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,22 @@
+<refentry id="default.float.class">
+<refmeta>
+<refentrytitle>default.float.class</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>default.float.class</refname>
+<refpurpose>Specifies the default float class</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='default.float.class.frag'>
+<xsl:param name="default.float.class" select="'before'"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/default.image.width.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/default.image.width.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/default.image.width.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,26 @@
+<refentry id="default.image.width">
+<refmeta>
+<refentrytitle>default.image.width</refentrytitle>
+<refmiscinfo role="type">length</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>default.image.width</refname>
+<refpurpose>The default width of images</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='default.image.width.frag'>
+<xsl:param name="default.image.width" select="''"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If specified, this value will be used for the
+<sgmltag class="attribute">width</sgmltag> attribute on
+images that do not specify any
+<ulink url="http://docbook.org/tdg/en/html/imagedata.html#viewport.area">viewport
+dimensions</ulink>.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/default.table.width.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/default.table.width.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/default.table.width.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,22 @@
+<refentry id="default.table.width">
+<refmeta>
+<refentrytitle>default.table.width</refentrytitle>
+<refmiscinfo role="type">length</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>default.table.width</refname>
+<refpurpose>The default width of tables</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='default.table.width.frag'><xsl:param name="default.table.width" select="''"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If specified, this value will be used for the WIDTH attribute on
+tables that do not specify an alternate width (with the dbhtml processing
+instruction).</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/default.units.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/default.units.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/default.units.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,30 @@
+<refentry id="default.units">
+<refmeta>
+<refentrytitle>default.units</refentrytitle>
+<refmiscinfo role="type">list</refmiscinfo>
+<refmiscinfo role="value">cm</refmiscinfo>
+<refmiscinfo role="value">mm</refmiscinfo>
+<refmiscinfo role="value">in</refmiscinfo>
+<refmiscinfo role="value">pt</refmiscinfo>
+<refmiscinfo role="value">pc</refmiscinfo>
+<refmiscinfo role="value">px</refmiscinfo>
+<refmiscinfo role="value">em</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>default.units</refname>
+<refpurpose>Default units for an unqualified dimension</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='default.units.frag'><xsl:param name="default.units" select="'pt'"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If an unqualified dimension is encountered (for example, in a
+graphic width), the <parameter>default-units</parameter> will be used for the
+units. Unqualified dimensions are not allowed in XSL Formatting Objects.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/dingbat.font.family.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/dingbat.font.family.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/dingbat.font.family.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,24 @@
+<refentry id="dingbat.font.family">
+<refmeta>
+<refentrytitle>dingbat.font.family</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>dingbat.font.family</refname>
+<refpurpose>The font family for copyright, quotes, and other symbols</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='dingbat.font.family.frag'>
+<xsl:param name="dingbat.font.family" select="'serif'"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The dingbat font family is used for dingbats. If it is defined
+as the empty string, no font change is effected around dingbats.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/double.sided.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/double.sided.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/double.sided.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,26 @@
+<refentry id="double.sided">
+<refmeta>
+<refentrytitle>double.sided</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>double.sided</refname>
+<refpurpose>Is the document to be printed double sided?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='double.sided.frag'>
+<xsl:param name="double.sided" select="0"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Double-sided documents are printed with a slightly wider margin
+on the binding edge of the page.
+</para>
+<para>FIXME: The current set of parameters does not take writing direction
+into account.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/draft.mode.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/draft.mode.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/draft.mode.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,28 @@
+<refentry id="draft.mode">
+<refmeta>
+<refentrytitle>draft.mode</refentrytitle>
+<refmiscinfo role="type">list</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>draft.mode</refname>
+<refpurpose>Select draft mode</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='draft.mode.frag'>
+<xsl:param name="draft.mode" select="'maybe'"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Selects draft mode. If <parameter>draft.mode</parameter> is
+<quote><literal>yes</literal></quote>, the entire document will be treated
+as a draft. If it is <quote><literal>no</literal></quote>, the entire document
+will be treated as a final copy. If it is <quote><literal>maybe</literal></quote>,
+individual sections will be treated as draft or final independently, depending
+on how their <sgmltag class="attribute">status</sgmltag> attribute is set.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/draft.watermark.image.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/draft.watermark.image.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/draft.watermark.image.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,22 @@
+<refentry id="draft.watermark.image">
+<refmeta>
+<refentrytitle>draft.watermark.image</refentrytitle>
+<refmiscinfo role="type">uri</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>draft.watermark.image</refname>
+<refpurpose>The URI of the image to be used for draft watermarks</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='draft.watermark.image.frag'>
+<xsl:param name="draft.watermark.image" select="'http://docbook.sourceforge.net/release/images/draft.png'"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The image to be used for draft watermarks.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/ebnf.assignment.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/ebnf.assignment.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/ebnf.assignment.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,35 @@
+<refentry id="ebnf.assignment">
+<refmeta>
+<refentrytitle>ebnf.assignment</refentrytitle>
+<refmiscinfo role="type">rtf</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>ebnf.assignment</refname>
+<refpurpose>The EBNF production assignment operator</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='ebnf.assignment.frag'>
+<xsl:param condition="html" name="ebnf.assignment">
+<tt>::=</tt>
+</xsl:param>
+<xsl:param condition="fo" name="ebnf.assignment"
+           xmlns:fo="http://www.w3.org/1999/XSL/Format">
+  <fo:inline font-family="{$monospace.font.family}">
+    <xsl:text>::=</xsl:text>
+  </fo:inline>
+</xsl:param>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The <parameter>ebnf.assignment</parameter> parameter determines what
+text is used to show <quote>assignment</quote> in <sgmltag>production</sgmltag>s
+in <sgmltag>productionset</sgmltag>s.</para>
+
+<para>While <quote><literal>::=</literal></quote> is common, so are several
+other operators.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/ebnf.statement.terminator.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/ebnf.statement.terminator.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/ebnf.statement.terminator.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,27 @@
+<refentry id="ebnf.statement.terminator">
+<refmeta>
+<refentrytitle>ebnf.statement.terminator</refentrytitle>
+<refmiscinfo role="type">rtf</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>ebnf.statement.terminator</refname>
+<refpurpose>Punctuation that ends an EBNF statement.</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='ebnf.statement.terminator.frag'>
+<xsl:param condition="html" name="ebnf.statement.terminator"/>
+<xsl:param condition="fo" name="ebnf.statement.terminator"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The <parameter>ebnf.statement.terminator</parameter> parameter determines what
+text is used to terminate each <sgmltag>production</sgmltag>
+in <sgmltag>productionset</sgmltag>.</para>
+
+<para>Some notations end each statement with a period.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/ebnf.table.bgcolor.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/ebnf.table.bgcolor.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/ebnf.table.bgcolor.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="ebnf.table.bgcolor">
+<refmeta>
+<refentrytitle>ebnf.table.bgcolor</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>ebnf.table.bgcolor</refname>
+<refpurpose>Background color for EBNF tables</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='ebnf.table.bgcolor.frag'><xsl:param name="ebnf.table.bgcolor" select="'#F5DCB3'"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Sets the background color for EBNF tables. No <sgmltag>bgcolor</sgmltag>
+attribute is output if <varname>ebnf.table.bgcolor</varname> is set to
+the null string. The default value matches the value used in recent
+online versions of the W3C's XML Spec productions.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/ebnf.table.border.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/ebnf.table.border.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/ebnf.table.border.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,21 @@
+<refentry id="ebnf.table.border">
+<refmeta>
+<refentrytitle>ebnf.table.border</refentrytitle>
+<refmiscinfo role="type"></refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>ebnf.table.border</refname>
+<refpurpose>Selects border on EBNF tables</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='ebnf.table.border.frag'><xsl:param name="ebnf.table.border" select="1"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Selects the border on EBNF tables. If non-zero, the tables have
+borders, otherwise they don't.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/eclipse.autolabel.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/eclipse.autolabel.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/eclipse.autolabel.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="eclipse.autolabel">
+<refmeta>
+<refentrytitle>eclipse.autolabel</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>eclipse.autolabel</refname>
+<refpurpose>Should tree-like ToC use autonumbering feature?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='eclipse.autolabel.frag'>
+<xsl:param name="eclipse.autolabel" select="0"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want to include chapter and section numbers into ToC in
+the left panel, set this parameter to 1.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/eclipse.plugin.id.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/eclipse.plugin.id.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/eclipse.plugin.id.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="eclipse.plugin.id">
+<refmeta>
+<refentrytitle>eclipse.plugin.id</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>eclipse.plugin.id</refname>
+<refpurpose>Eclipse Help plugin id</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='eclipse.plugin.id.frag'>
+<xsl:param name="eclipse.plugin.id">com.example.help</xsl:param>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Eclipse Help plugin id. You should change this id to something
+unique for each help.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/eclipse.plugin.name.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/eclipse.plugin.name.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/eclipse.plugin.name.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,22 @@
+<refentry id="eclipse.plugin.name">
+<refmeta>
+<refentrytitle>eclipse.plugin.name</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>eclipse.plugin.name</refname>
+<refpurpose>Eclipse Help plugin name</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='eclipse.plugin.name.frag'>
+<xsl:param name="eclipse.plugin.name">DocBook Online Help Sample</xsl:param>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Eclipse Help plugin name.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/eclipse.plugin.provider.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/eclipse.plugin.provider.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/eclipse.plugin.provider.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,22 @@
+<refentry id="eclipse.plugin.provider">
+<refmeta>
+<refentrytitle>eclipse.plugin.provider</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>eclipse.plugin.provider</refname>
+<refpurpose>Eclipse Help plugin provider name</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='eclipse.plugin.provider.frag'>
+<xsl:param name="eclipse.plugin.provider">Example provider</xsl:param>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Eclipse Help plugin provider name.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/emphasis.propagates.style.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/emphasis.propagates.style.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/emphasis.propagates.style.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,24 @@
+<refentry id="emphasis.propagates.style">
+<refmeta>
+<refentrytitle>emphasis.propagates.style</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>emphasis.propagates.style</refname>
+<refpurpose>Pass emphasis role attribute through to HTML?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='emphasis.propagates.style.frag'>
+<xsl:param name="emphasis.propagates.style" select="1"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true, the role attribute of <sgmltag>emphasis</sgmltag> elements
+will be passed through to the HTML as a class attribute on a
+<sgmltag>span</sgmltag> that surrounds the emphasis.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/entry.propagates.style.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/entry.propagates.style.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/entry.propagates.style.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,25 @@
+<refentry id="entry.propagates.style">
+<refmeta>
+<refentrytitle>entry.propagates.style</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>entry.propagates.style</refname>
+<refpurpose>Pass entry role attribute through to HTML?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='entry.propagates.style.frag'>
+<xsl:param name="entry.propagates.style" select="1"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true, the role attribute of <sgmltag>entry</sgmltag> elements
+will be passed through to the HTML as a class attribute on the
+<sgmltag>td</sgmltag> or <sgmltag>th</sgmltag> generated for the table
+cell.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/equation.properties.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/equation.properties.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/equation.properties.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,18 @@
+<refentry id="equation.properties">
+<refnamediv>
+<refname>equation.properties</refname>
+<refpurpose>Properties associated with a equation</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='equation.properties.frag'>
+<xsl:attribute-set name="equation.properties" use-attribute-sets="formal.object.properties"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The styling for equations.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/example.properties.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/example.properties.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/example.properties.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,18 @@
+<refentry id="example.properties">
+<refnamediv>
+<refname>example.properties</refname>
+<refpurpose>Properties associated with a example</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='example.properties.frag'>
+<xsl:attribute-set name="example.properties" use-attribute-sets="formal.object.properties"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The styling for examples.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/figure.properties.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/figure.properties.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/figure.properties.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,18 @@
+<refentry id="figure.properties">
+<refnamediv>
+<refname>figure.properties</refname>
+<refpurpose>Properties associated with a figure</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='figure.properties.frag'>
+<xsl:attribute-set name="figure.properties" use-attribute-sets="formal.object.properties"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The styling for figures.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/firstterm.only.link.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/firstterm.only.link.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/firstterm.only.link.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,24 @@
+<refentry id="firstterm.only.link">
+<refmeta>
+<refentrytitle>firstterm.only.link</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>firstterm.only.link</refname>
+<refpurpose>Does automatic glossterm linking only apply to firstterms?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='firstterm.only.link.frag'>
+<xsl:param name="firstterm.only.link" select="0"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true, only <sgmltag>firstterm</sgmltag>s will be automatically linked
+to the glossary. If glossary linking is not enabled, this parameter
+has no effect.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/footer.column.widths.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/footer.column.widths.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/footer.column.widths.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,69 @@
+<refentry id="footer.column.widths">
+<refmeta>
+<refentrytitle>footer.column.widths</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>footer.column.widths</refname>
+<refpurpose>Specify relative widths of footer areas</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv><src:fragment id='footer.column.widths.frag'>
+<xsl:param name="footer.column.widths" select="'1 1 1'"/>
+</src:fragment></refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Page footers in print output use a three column table
+to position text at the left, center, and right side of
+the footer on the page.
+This parameter lets you specify the relative sizes of the
+three columns.  The default value is
+"1 1 1".</para>
+
+<para>The parameter value must be three numbers, separated
+by white space. The first number represents the relative
+width of the left footer for
+single-sided output, or the inside footer for
+double-sided output.  The second number is the relative
+width of the center footer.  The third number is the
+relative width of the right footer for
+single-sided output, or the outside footer for
+double-sided output.
+</para>
+
+<para>The numbers are used to specify the column widths
+for the table that makes up the footer area.
+In the FO output, this looks like:
+</para>
+
+<programlisting>
+&lt;fo:table-column column-number="1" 
+    column-width="proportional-column-width(1)"/&gt;
+</programlisting>
+
+<para>
+The <literal>proportional-column-width()</literal>
+function computes a column width by dividing its
+argument by the total of the arguments for all the columns, and
+then multiplying the result by the width of the whole table
+(assuming all the column specs use the function).
+Its argument can be any positive integer or floating point number.
+Zero is an acceptable value, although some FO processors
+may warn about it, in which case using a very small number might
+be more satisfactory.
+</para>
+
+<para>For example, the value "1 2 1" means the center
+footer should have twice the width of the other areas.
+A value of "0 0 1" means the entire footer area
+is reserved for the right (or outside) footer text.
+Note that to keep the center area centered on
+the page, the left and right values must be
+the same. A specification like "1 2 3" means the
+center area is no longer centered on the page
+since the right area is three times the width of the left area.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/footer.content.properties.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/footer.content.properties.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/footer.content.properties.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,29 @@
+<refentry id="footer.content.properties">
+<refmeta>
+<refentrytitle>footer.content.properties</refentrytitle>
+<refmiscinfo role="type"></refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>footer.content.properties</refname>
+<refpurpose></refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='footer.content.properties.frag'>
+<xsl:attribute-set name="footer.content.properties">
+  <xsl:attribute name="font-family">
+    <xsl:value-of select="$body.fontset"/>
+  </xsl:attribute>
+  <xsl:attribute name="margin-left">
+    <xsl:value-of select="$title.margin.left"/>
+  </xsl:attribute>
+</xsl:attribute-set>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Properties of page footer content.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/footer.rule.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/footer.rule.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/footer.rule.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,22 @@
+<refentry id="footer.rule">
+<refmeta>
+<refentrytitle>footer.rule</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>footer.rule</refname>
+<refpurpose>Rule over footers?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='footer.rule.frag'>
+<xsl:param name="footer.rule" select="1"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, a rule will be drawn above the page footers.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/footers.on.blank.pages.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/footers.on.blank.pages.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/footers.on.blank.pages.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,22 @@
+<refentry id="footers.on.blank.pages">
+<refmeta>
+<refentrytitle>footers.on.blank.pages</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>footers.on.blank.pages</refname>
+<refpurpose>Put footers on blank pages?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='footers.on.blank.pages.frag'>
+<xsl:param name="footers.on.blank.pages" select="1"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, footers will be placed on blank pages.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/footnote.font.size.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/footnote.font.size.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/footnote.font.size.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="footnote.font.size">
+<refmeta>
+<refentrytitle>footnote.font.size</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>footnote.font.size</refname>
+<refpurpose>The font size for footnotes</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='footnote.font.size.frag'><xsl:param name="footnote.font.size">
+ <xsl:value-of select="$body.font.master * 0.8"/><xsl:text>pt</xsl:text>
+</xsl:param></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The footnote font size is used for...footnotes!
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/footnote.number.format.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/footnote.number.format.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/footnote.number.format.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="footnote.number.format">
+<refmeta>
+<refentrytitle>footnote.number.format</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>footnote.number.format</refname>
+<refpurpose>Identifies the format used for footnote numbers</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='footnote.number.format.frag'>
+<xsl:param name="footnote.number.format" select="'1'"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The <parameter>footnote.number.format</parameter> specifies the format
+to use for footnote numeration (1, i, I, a, or A).</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/footnote.number.symbols.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/footnote.number.symbols.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/footnote.number.symbols.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,34 @@
+<refentry id="footnote.number.symbols">
+<refmeta>
+<refentrytitle>footnote.number.symbols</refentrytitle>
+<refmiscinfo role="type"></refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>footnote.number.symbols</refname>
+<refpurpose></refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='footnote.number.symbols.frag'>
+<xsl:param name="footnote.number.symbols" select="''"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If <parameter>footnote.number.symbols</parameter> is not the empty string,
+footnotes will use the characters it contains as footnote symbols. For example,
+<quote>*&amp;#x2020;&amp;#x2021;&amp;#x25CA;&amp;#x2720;</quote> will identify
+footnotes with <quote>*</quote>, <quote>&#x2020;</quote>, <quote>&#x2021;</quote>,
+<quote>&#x25CA;</quote>, and <quote>&#x2720;</quote>. If there are more footnotes
+than symbols, the stylesheets will fall back to numbered footnotes using
+<parameter>footnote.number.format</parameter>.</para>
+
+<para>The use of symbols for footnotes depends on the ability of your
+processor (or browser) to render the symbols you select. Not all systems are
+capable of displaying the full range of Unicode characters. If the quoted characters
+in the preceding paragraph are not displayed properly, that's a good indicator
+that you may have trouble using those symbols for footnotes.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/fop.extensions.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/fop.extensions.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/fop.extensions.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="fop.extensions">
+<refmeta>
+<refentrytitle>fop.extensions</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>fop.extensions</refname>
+<refpurpose>Enable FOP extensions?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='fop.extensions.frag'><xsl:param name="fop.extensions" select="0"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero,
+<ulink url="http://xml.apache.org/fop/">FOP</ulink>
+extensions will be used. At present, this consists of PDF bookmarks.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/formal.object.properties.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/formal.object.properties.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/formal.object.properties.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,27 @@
+<refentry id="formal.object.properties">
+<refnamediv>
+<refname>formal.object.properties</refname>
+<refpurpose>Properties associated with a formal object such as a figure, or other component that has a title</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='formal.object.properties.frag'>
+<xsl:attribute-set name="formal.object.properties">
+  <xsl:attribute name="space-before.minimum">0.5em</xsl:attribute>
+  <xsl:attribute name="space-before.optimum">1em</xsl:attribute>
+  <xsl:attribute name="space-before.maximum">2em</xsl:attribute>
+  <xsl:attribute name="space-after.minimum">0.5em</xsl:attribute>
+  <xsl:attribute name="space-after.optimum">1em</xsl:attribute>
+  <xsl:attribute name="space-after.maximum">2em</xsl:attribute>
+  <xsl:attribute name="keep-together.within-column">always</xsl:attribute>
+</xsl:attribute-set>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The styling for formal objects in docbook. Specify the spacing
+before and after the object.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/formal.procedures.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/formal.procedures.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/formal.procedures.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="formal.procedures">
+<refmeta>
+<refentrytitle>formal.procedures</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>formal.procedures</refname>
+<refpurpose>Selects formal or informal procedures</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='formal.procedures.frag'>
+<xsl:param name="formal.procedures" select="1"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Formal procedures are numbered and always have a title.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/formal.title.placement.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/formal.title.placement.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/formal.title.placement.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,36 @@
+<refentry id="formal.title.placement">
+<refmeta>
+<refentrytitle>formal.title.placement</refentrytitle>
+<refmiscinfo role="type"></refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>formal.title.placement</refname>
+<refpurpose></refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='formal.title.placement.frag'>
+<xsl:param name="formal.title.placement">
+figure before
+example before
+equation before
+table before
+procedure before
+task before
+</xsl:param>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Specifies where formal object titles should occur. For each formal object
+type (<sgmltag>figure</sgmltag>,
+<sgmltag>example</sgmltag>,
+<sgmltag>equation</sgmltag>,
+<sgmltag>table</sgmltag>, and <sgmltag>procedure</sgmltag>)
+you can specify either the keyword
+<quote><literal>before</literal></quote> or
+<quote><literal>after</literal></quote>.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/formal.title.properties.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/formal.title.properties.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/formal.title.properties.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,26 @@
+<refentry id="formal.title.properties">
+<refnamediv>
+<refname>formal.title.properties</refname>
+<refpurpose>Style the title element of formal object such as a figure.</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='formal.title.properties.frag'>
+<xsl:attribute-set name="formal.title.properties"
+	           use-attribute-sets="normal.para.spacing">
+  <xsl:attribute name="font-weight">bold</xsl:attribute>
+  <xsl:attribute name="font-size">
+    <xsl:value-of select="$body.font.master * 1.2"/>
+    <xsl:text>pt</xsl:text>
+  </xsl:attribute>
+  <xsl:attribute name="hyphenate">false</xsl:attribute>
+  <xsl:attribute name="space-after.minimum">0.4em</xsl:attribute>
+  <xsl:attribute name="space-after.optimum">0.6em</xsl:attribute>
+  <xsl:attribute name="space-after.maximum">0.8em</xsl:attribute>
+</xsl:attribute-set>
+</src:fragment>
+</refsynopsisdiv>
+<refsect1><title>Description</title>
+<para>Specify how the title should be styled. Specify the font size and weight of the title of the formal object.</para>
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/funcsynopsis.decoration.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/funcsynopsis.decoration.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/funcsynopsis.decoration.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="funcsynopsis.decoration">
+<refmeta>
+<refentrytitle>funcsynopsis.decoration</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>funcsynopsis.decoration</refname>
+<refpurpose>Decorate elements of a FuncSynopsis?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='funcsynopsis.decoration.frag'><xsl:param name="funcsynopsis.decoration" select="1"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), elements of the FuncSynopsis will be decorated (e.g. bold or
+italic).  The decoration is controlled by functions that can be redefined
+in a customization layer.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/funcsynopsis.style.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/funcsynopsis.style.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/funcsynopsis.style.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,26 @@
+<refentry id="funcsynopsis.style">
+<refmeta>
+<refentrytitle>funcsynopsis.style</refentrytitle>
+<refmiscinfo role="type">list</refmiscinfo>
+<refmiscinfo role="value">ansi</refmiscinfo>
+<refmiscinfo role="value">kr</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>funcsynopsis.style</refname>
+<refpurpose>What style of 'FuncSynopsis' should be generated?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='funcsynopsis.style.frag'><xsl:param name="funcsynopsis.style">kr</xsl:param></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If <varname>funcsynopsis.style</varname> is <literal>ansi</literal>,
+ANSI-style function synopses are generated for a
+<sgmltag>funcsynopsis</sgmltag>, otherwise K&amp;R-style
+function synopses are generated.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/funcsynopsis.tabular.threshold.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/funcsynopsis.tabular.threshold.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/funcsynopsis.tabular.threshold.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,24 @@
+<refentry id="funcsynopsis.tabular.threshold">
+<refmeta>
+<refentrytitle>funcsynopsis.tabular.threshold</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>funcsynopsis.tabular.threshold</refname>
+<refpurpose>Width beyond which a tabular presentation will be used</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='funcsynopsis.tabular.threshold.frag'>
+<xsl:param name="funcsynopsis.tabular.threshold" select="40"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If <parameter>funcsynopsis.tabular.threshold</parameter> is greater than
+zero then if a <sgmltag>funcprototype</sgmltag> is wider than the threshold
+value, it will be presented in a table.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/function.parens.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/function.parens.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/function.parens.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="function.parens">
+<refmeta>
+<refentrytitle>function.parens</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>function.parens</refname>
+<refpurpose>Generate parens after a function?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='function.parens.frag'><xsl:param name="function.parens">0</xsl:param></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If not 0, the formatting of
+a <sgmltag class="starttag">function</sgmltag> element will include
+generated parenthesis.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/generate.id.attributes.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/generate.id.attributes.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/generate.id.attributes.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,54 @@
+<refentry id="generate.id.attributes">
+<refmeta>
+<refentrytitle>generate.id.attributes</refentrytitle>
+<refmiscinfo role="type"></refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>generate.id.attributes</refname>
+<refpurpose></refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='generate.id.attributes.frag'>
+<xsl:param name="generate.id.attributes" select="0"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, the HTML stylesheet will generate ID attributes on
+containers. For example, the markup:</para>
+
+<screen><![CDATA[<section id="foo"><title>Some Title</title>
+<para>Some para.</para>
+</section>]]></screen>
+
+<para>might produce:</para>
+
+<screen><![CDATA[<div class="section" id="foo">
+<h2>Some Title</h2>
+<p>Some para.</p>
+</div>]]></screen>
+
+<para>The alternative is to generate anchors:</para>
+
+<screen><![CDATA[<div class="section">
+<h2><a name="foo"></a>Some Title</h2>
+<p>Some para.</p>
+</div>]]></screen>
+
+<para>Because the <sgmltag class="attribute">name</sgmltag> attribute of
+the <sgmltag>a</sgmltag> element and the <sgmltag class="attribute">id</sgmltag>
+attribute of other tags are both of type <quote>ID</quote>, producing both
+generates invalid documents.</para>
+
+<para>As of version 1.50, you can use this switch to control which type of
+identifier is generated. For backwards-compatibility, generating
+<sgmltag>a</sgmltag> anchors is preferred.</para>
+
+<para>Note: at present, this switch is incompletely implemented.
+Disabling ID attributes will suppress them, but enabling ID attributes
+will not suppress the anchors.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/generate.index.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/generate.index.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/generate.index.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,20 @@
+<refentry id="generate.index">
+<refmeta>
+<refentrytitle>generate.index</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>generate.index</refname>
+<refpurpose>Do you want an index?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='generate.index.frag'><xsl:param name="generate.index" select="1"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Specify if an index should be generated. </para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/generate.legalnotice.link.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/generate.legalnotice.link.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/generate.legalnotice.link.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,20 @@
+<refentry id="generate.legalnotice.link">
+<refmeta>
+<refentrytitle>generate.legalnotice.link</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>generate.legalnotice.link</refname>
+<refpurpose>TBD</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='generate.legalnotice.link.frag'><xsl:param name="generate.legalnotice.link" select="0"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>TBD</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/generate.manifest.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/generate.manifest.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/generate.manifest.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="generate.manifest">
+  <refmeta>
+    <refentrytitle>generate.manifest</refentrytitle>
+    <refmiscinfo role="type">boolean</refmiscinfo>
+  </refmeta>
+  <refnamediv>
+    <refname>generate.manifest</refname>
+    <refpurpose>Generate a manifest file?</refpurpose>
+  </refnamediv>
+
+  <refsynopsisdiv>
+    <src:fragment id='generate.manifest.frag'
+      ><xsl:param name="generate.manifest" select="0"/></src:fragment>
+  </refsynopsisdiv>
+
+  <refsect1><title>Description</title>
+
+    <para>If non-zero, a list of HTML files generated by the
+      stylesheet transformation is written to the file named by
+      the <parameter>manifest</parameter> parameter.</para>
+
+  </refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/generate.meta.abstract.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/generate.meta.abstract.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/generate.meta.abstract.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="generate.meta.abstract">
+<refmeta>
+<refentrytitle>generate.meta.abstract</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>generate.meta.abstract</refname>
+<refpurpose>Generate HTML <sgmltag>META</sgmltag> element from <sgmltag>abstract</sgmltag>?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='generate.meta.abstract.frag'>
+<xsl:param name="generate.meta.abstract" select="1"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, document abstracts will be reproduced in the HTML
+<sgmltag>HEAD</sgmltag> with <sgmltag class="starttag">meta name="description" content="..."</sgmltag>.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/generate.section.toc.level.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/generate.section.toc.level.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/generate.section.toc.level.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,30 @@
+<refentry id="generate.section.toc.level">
+<refmeta>
+<refentrytitle>generate.section.toc.level</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>generate.section.toc.level</refname>
+<refpurpose>Control depth of TOC generation in sections</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='generate.section.toc.level.frag'>
+<xsl:param name="generate.section.toc.level" select="0"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The <parameter>generate.section.toc.level</parameter> parameter
+controls the depth of section in which TOCs will be generated. Note
+that this is related to, but not the same as
+<parameter>toc.section.depth</parameter>, which controls the depth to
+which TOC entries will be generated in a given TOC.</para>
+<para>If, for example, <parameter>generate.section.toc.level</parameter>
+is <literal>3</literal>, TOCs will be generated in first, second, and third
+level sections, but not in fourth level sections.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/generate.toc.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/generate.toc.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/generate.toc.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,105 @@
+<refentry id="generate.toc">
+<refmeta>
+<refentrytitle>generate.toc</refentrytitle>
+<refmiscinfo role="type">table</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>generate.toc</refname>
+<refpurpose>Control generation of ToCs and LoTs</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='generate.toc.frag'>
+<xsl:param condition="html" name="generate.toc">
+appendix  toc,title
+article/appendix  nop
+article   toc,title
+book      toc,title,figure,table,example,equation
+chapter   toc,title
+part      toc,title
+preface   toc,title
+qandadiv  toc
+qandaset  toc
+reference toc,title
+sect1     toc
+sect2     toc
+sect3     toc
+sect4     toc
+sect5     toc
+section   toc
+set       toc,title
+</xsl:param>
+<xsl:param condition="fo" name="generate.toc">
+/appendix toc,title
+article/appendix  nop
+/article  toc,title
+book      toc,title,figure,table,example,equation
+/chapter  toc,title
+part      toc,title
+/preface  toc,title
+qandadiv  toc
+qandaset  toc
+reference toc,title
+/sect1    toc
+/sect2    toc
+/sect3    toc
+/sect4    toc
+/sect5    toc
+/section  toc
+set       toc,title
+</xsl:param>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This parameter has a structured value. It is a table of space-delimited
+path/value pairs. Each path identifies some element in the source document
+using a restricted subset of XPath (only the implicit child axis, no wildcards,
+no predicates). Paths can be either relative or absolute.</para>
+
+<para>When processing a particular element, the stylesheets consult this table to
+determine if a ToC (or LoT(s)) should be generated.</para>
+
+<para>For example, consider the entry:</para>
+
+<screen>book toc,figure</screen>
+
+<para>This indicates that whenever a <sgmltag>book</sgmltag> is formatted, a
+Table Of Contents and a List of Figures should be generated. Similarly,</para>
+
+<screen>/chapter toc</screen>
+
+<para>indicates that whenever a document <emphasis>that has a root
+of</emphasis> <sgmltag>chapter</sgmltag> is formatted, a Table of
+Contents should be generated. The entry <literal>chapter</literal> would match
+all chapters, but <literal>/chapter</literal> matches only <sgmltag>chapter</sgmltag>
+document elements.</para>
+
+<para>Generally, the longest match wins. So, for example, if you want to distinguish
+articles in books from articles in parts, you could use these two entries:</para>
+
+<screen>book/article toc,figure
+part/article toc</screen>
+
+<para>Note that an article in a part can never match a <literal>book/article</literal>,
+so if you want nothing to be generated for articles in parts, you can simply leave
+that rule out.</para>
+
+<para>If you want to leave the rule in, to make it explicit that you're turning
+something off, use the value <quote>nop</quote>. For example, the following
+entry disables ToCs and LoTs for articles:</para>
+
+<screen>article nop</screen>
+
+<para>Do not simply leave the word <quote>article</quote> in the file
+without a matching value. That'd be just begging the silly little
+path/value parser to get confused.</para>
+
+<para>Section ToCs are further controlled by the
+<parameter>generate.section.toc.level</parameter> parameter.
+For a given section level to have a ToC, it must have both an entry in 
+<parameter>generate.toc</parameter> and be within the range enabled by
+<parameter>generate.section.toc.level</parameter>.</para>
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/glossary.as.blocks.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/glossary.as.blocks.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/glossary.as.blocks.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,33 @@
+<refentry id="glossary.as.blocks">
+<refmeta>
+<refentrytitle>glossary.as.blocks</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>glossary.as.blocks</refname>
+<refpurpose>Present glossarys using blocks instead of lists?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='glossary.as.blocks.frag'>
+<xsl:param name="glossary.as.blocks" select="0"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, <sgmltag>glossary</sgmltag>s will be formatted as
+blocks.</para>
+
+<para>If you have long <sgmltag>glossterm</sgmltag>s, proper list
+markup in the FO case may produce unattractive lists. By setting this
+parameter, you can force the stylesheets to produce block markup
+instead of proper lists.</para>
+
+<para>You can override this setting with a processing instruction as the
+child of <sgmltag>glossary</sgmltag>: <sgmltag class="pi">dbfo
+glossary-presentation="blocks"</sgmltag> or <sgmltag class="pi">dbfo
+glossary-presentation="list"</sgmltag></para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/glossary.collection.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/glossary.collection.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/glossary.collection.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,247 @@
+<refentry id="glossary.collection">
+<refmeta>
+<refentrytitle>glossary.collection</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>glossary.collection</refname>
+<refpurpose>Name of the glossary collection file</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='glossary.collection.frag'>
+<xsl:param name="glossary.collection" select="''"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Glossaries maintained independently across a set of documents
+are likely to become inconsistent unless considerable effort is
+expended to keep them in sync. It makes much more sense, usually, to
+store all of the glossary entries in a single place and simply
+<quote>extract</quote> the ones you need in each document.</para>
+
+<para>That's the purpose of the
+<parameter>glossary.collection</parameter> parameter. To setup a global
+glossary <quote>database</quote>, follow these steps:</para>
+
+<refsect2><title>Setting Up the Glossary Database</title>
+
+<para>First, create a stand-alone glossary document that contains all of
+the entries that you wish to reference. Make sure that each glossary
+entry has an ID.</para>
+
+<para>Here's an example glossary:</para>
+
+<informalexample>
+<programlisting><![CDATA[
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE glossary
+  PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+  "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<glossary>
+<glossaryinfo>
+<editor><firstname>Eric</firstname><surname>Raymond</surname></editor>
+<title>Jargon File 4.2.3 (abridged)</title>
+<releaseinfo>Just some test data</releaseinfo>
+</glossaryinfo>
+
+<glossdiv><title>0</title>
+
+<glossentry>
+<glossterm>0</glossterm>
+<glossdef>
+<para>Numeric zero, as opposed to the letter `O' (the 15th letter of
+the English alphabet). In their unmodified forms they look a lot
+alike, and various kluges invented to make them visually distinct have
+compounded the confusion. If your zero is center-dotted and letter-O
+is not, or if letter-O looks almost rectangular but zero looks more
+like an American football stood on end (or the reverse), you're
+probably looking at a modern character display (though the dotted zero
+seems to have originated as an option on IBM 3270 controllers). If
+your zero is slashed but letter-O is not, you're probably looking at
+an old-style ASCII graphic set descended from the default typewheel on
+the venerable ASR-33 Teletype (Scandinavians, for whom /O is a letter,
+curse this arrangement). (Interestingly, the slashed zero long
+predates computers; Florian Cajori's monumental "A History of
+Mathematical Notations" notes that it was used in the twelfth and
+thirteenth centuries.) If letter-O has a slash across it and the zero
+does not, your display is tuned for a very old convention used at IBM
+and a few other early mainframe makers (Scandinavians curse <emphasis>this</emphasis>
+arrangement even more, because it means two of their letters collide).
+Some Burroughs/Unisys equipment displays a zero with a <emphasis>reversed</emphasis>
+slash. Old CDC computers rendered letter O as an unbroken oval and 0
+as an oval broken at upper right and lower left. And yet another
+convention common on early line printers left zero unornamented but
+added a tail or hook to the letter-O so that it resembled an inverted
+Q or cursive capital letter-O (this was endorsed by a draft ANSI
+standard for how to draw ASCII characters, but the final standard
+changed the distinguisher to a tick-mark in the upper-left corner).
+Are we sufficiently confused yet?</para>
+</glossdef>
+</glossentry>
+
+<glossentry>
+<glossterm>1TBS</glossterm>
+<glossdef>
+<para role="accidence">
+<phrase role="pronounce"></phrase>
+<phrase role="partsofspeach">n</phrase>
+</para>
+<para>The "One True Brace Style"</para>
+<glossseealso>indent style</glossseealso>
+</glossdef>
+</glossentry>
+
+<!-- ... -->
+
+</glossdiv>
+
+<!-- ... -->
+
+</glossary>]]></programlisting>
+</informalexample>
+
+</refsect2>
+
+<refsect2><title>Marking Up Glossary Terms</title>
+
+<para>That takes care of the glossary database, now you have to get the entries
+into your document. Unlike bibliography entries, which can be empty, creating
+<quote>placeholder</quote> glossary entries would be very tedious. So instead,
+support for <parameter>glossary.collection</parameter> relies on implicit linking.</para>
+
+<para>In your source document, simply use <sgmltag>firstterm</sgmltag> and
+<sgmltag>glossterm</sgmltag> to identify the terms you wish to have included
+in the glossary. The stylesheets assume that you will either set the
+<sgmltag class="attribute">baseform</sgmltag> attribute correctly, or that the
+content of the element exactly matches a term in your glossary.</para>
+
+<para>If you're using a <parameter>glossary.collection</parameter>, don't
+make explicit links on the terms in your document.</para>
+
+<para>So, in your document, you might write things like this:</para>
+
+<informalexample>
+<programlisting><![CDATA[<para>This is dummy text, without any real meaning.
+The point is simply to reference glossary terms like <glossterm>0</glossterm>
+and the <firstterm baseform="1TBS">One True Brace Style (1TBS)</firstterm>.
+The <glossterm>1TBS</glossterm>, as you can probably imagine, is a nearly
+religious issue.</para>]]></programlisting>
+</informalexample>
+
+<para>If you set the <parameter>firstterm.only.link</parameter> parameter,
+only the terms marked with <sgmltag>firstterm</sgmltag> will be links.
+Otherwise, all the terms will be linked.</para>
+
+</refsect2>
+
+<refsect2><title>Marking Up the Glossary</title>
+
+<para>The glossary itself has to be identified for the stylesheets. For lack
+of a better choice, the <sgmltag class="attribute">role</sgmltag> is used.
+To identify the glossary as the target for automatic processing, set
+the role to <quote><literal>auto</literal></quote>. The title of this
+glossary (and any other information from the <sgmltag>glossaryinfo</sgmltag>
+that's rendered by your stylesheet) will be displayed, but the entries will
+come from the database.
+</para>
+
+<para>Unfortunately, the glossary can't be empty, so you must put in
+at least one <sgmltag>glossentry</sgmltag>. The content of this entry
+is irrelevant, it will not be rendered:</para>
+
+<informalexample>
+<programlisting><![CDATA[<glossary role="auto">
+<glossentry>
+<glossterm>Irrelevant</glossterm>
+<glossdef>
+<para>If you can see this, the document was processed incorrectly. Use
+the <parameter>glossary.collection</parameter> parameter.</para>
+</glossdef>
+</glossentry>
+</glossary>]]></programlisting>
+</informalexample>
+
+<para>What about glossary divisions? If your glossary database has glossary
+divisions <emphasis>and</emphasis> your automatic glossary contains at least
+one <sgmltag>glossdiv</sgmltag>, the automic glossary will have divisions.
+If the <sgmltag>glossdiv</sgmltag> is missing from either location, no divisions
+will be rendered.</para>
+
+<para>Glossary entries (and divisions, if appropriate) in the glossary will
+occur in precisely the order they occur in your database.</para>
+
+</refsect2>
+
+<refsect2><title>Formatting the Document</title>
+
+<para>Finally, when you are ready to format your document, simply set the
+<parameter>glossary.collection</parameter> parameter (in either a
+customization layer or directly through your processor's interface) to
+point to your global glossary.</para>
+
+<para>The stylesheets will format the glossary in your document as if
+all of the entries implicilty referenced appeared there literally.</para>
+</refsect2>
+
+<refsect2><title>Limitations</title>
+
+<para>Glossary cross-references <emphasis>within the glossary</emphasis> are
+not supported. For example, this <emphasis>will not</emphasis> work:</para>
+
+<informalexample>
+<programlisting><![CDATA[<glossentry>
+<glossterm>gloss-1</glossterm>
+<glossdef><para>A description that references <glossterm>gloss-2</glossterm>.</para>
+<glossseealso>gloss-2</glossseealso>
+</glossdef>
+</glossentry>]]></programlisting>
+</informalexample>
+
+<para>If you put glossary cross-references in your glossary that way,
+you'll get the cryptic error: <computeroutput>Warning:
+glossary.collection specified, but there are 0 automatic
+glossaries</computeroutput>.</para>
+
+<para>Instead, you must do two things:</para>
+
+<orderedlist>
+<listitem>
+<para>Markup your glossary using <sgmltag>glossseealso</sgmltag>:</para>
+
+<informalexample>
+<programlisting><![CDATA[<glossentry>
+<glossterm>gloss-1</glossterm>
+<glossdef><para>A description that references <glossterm>gloss-2</glossterm>.</para>
+<glossseealso>gloss-2</glossseealso>
+</glossdef>
+</glossentry>]]></programlisting>
+</informalexample>
+</listitem>
+
+<listitem>
+<para>Make sure there is at least one <sgmltag>glossterm</sgmltag> reference to
+<glossterm>gloss-2</glossterm> <emphasis>in your document</emphasis>. The
+easiest way to do that is probably within a <sgmltag>remark</sgmltag> in your
+automatic glossary:</para>
+
+<informalexample>
+<programlisting><![CDATA[<glossary role="auto">
+<remark>Make sure there's a reference to <glossterm>gloss-2</glossterm>.</remark>
+<glossentry>
+<glossterm>Irrelevant</glossterm>
+<glossdef>
+<para>If you can see this, the document was processed incorrectly. Use
+the <parameter>glossary.collection</parameter> parameter.</para>
+</glossdef>
+</glossentry>
+</glossary>]]></programlisting>
+</informalexample>
+</listitem>
+</orderedlist>
+</refsect2>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/glossentry.show.acronym.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/glossentry.show.acronym.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/glossentry.show.acronym.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,29 @@
+<refentry id="glossentry.show.acronym">
+<refmeta>
+<refentrytitle>glossentry.show.acronym</refentrytitle>
+<refmiscinfo role="type">list</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>glossentry.show.acronym</refname>
+<refpurpose>Display <sgmltag>glossentry</sgmltag> acronyms?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='glossentry.show.acronym.frag'>
+<xsl:param name="glossentry.show.acronym" select="'no'"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>A setting of <quote>yes</quote> means they should be displayed;
+<quote>no</quote> means they shouldn't. If <quote>primary</quote> is used,
+then they are shown as the primary text for the entry.</para>
+
+<note>
+<para>This setting controls both <sgmltag>acronym</sgmltag> and
+<sgmltag>abbrev</sgmltag> elements in the <sgmltag>glossentry</sgmltag>.</para>
+</note>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/glosslist.as.blocks.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/glosslist.as.blocks.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/glosslist.as.blocks.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,22 @@
+<refentry id="glosslist.as.blocks">
+<refmeta>
+<refentrytitle>glosslist.as.blocks</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>glosslist.as.blocks</refname>
+<refpurpose>Use blocks for glosslists?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='glosslist.as.blocks.frag'>
+<xsl:param name="glosslist.as.blocks" select="0"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>See <parameter>glossary.as.blocks</parameter>.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/glossterm.auto.link.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/glossterm.auto.link.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/glossterm.auto.link.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,28 @@
+<refentry id="glossterm.auto.link">
+<refmeta>
+<refentrytitle>glossterm.auto.link</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>glossterm.auto.link</refname>
+<refpurpose>Generate links from glossterm to glossentry automaticaly?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='glossterm.auto.link.frag'>
+<xsl:param name="glossterm.auto.link" select="0"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true, a link will be automatically created from glossterm 
+to glossentry for that glossary term. This is usefull when your
+glossterm names are consistent and you don't want to add links
+manually.</para>
+<para>If there is <sgmltag class="attribute">linkend</sgmltag> on
+<sgmltag>glossterm</sgmltag> then is used instead of autogeneration of
+link.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/glossterm.separation.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/glossterm.separation.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/glossterm.separation.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="glossterm.separation">
+<refmeta>
+<refentrytitle>glossterm.separation</refentrytitle>
+<refmiscinfo role="type">length</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>glossterm.separation</refname>
+<refpurpose>Separation between glossary terms and descriptions in list mode</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='glossterm.separation.frag'>
+<xsl:param name="glossterm.separation" select="'0.25in'"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Specifies the separation between glossary terms and descriptions when
+glossarys are presented using lists.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/glossterm.width.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/glossterm.width.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/glossterm.width.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="glossterm.width">
+<refmeta>
+<refentrytitle>glossterm.width</refentrytitle>
+<refmiscinfo role="type">length</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>glossterm.width</refname>
+<refpurpose>Width of glossterm in list presentation mode</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='glossterm.width.frag'>
+<xsl:param name="glossterm.width" select="'2in'"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This parameter specifies the width reserved for glossary terms when
+a list presentation is used.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/graphic.default.extension.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/graphic.default.extension.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/graphic.default.extension.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,24 @@
+<refentry id="graphic.default.extension">
+<refmeta>
+<refentrytitle>graphic.default.extension</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>graphic.default.extension</refname>
+<refpurpose>Default extension for graphic filenames</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='graphic.default.extension.frag'><xsl:param name="graphic.default.extension"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If a <sgmltag>graphic</sgmltag> or <sgmltag>mediaobject</sgmltag>
+includes a reference to a filename that does not include an extension,
+and the <sgmltag class="attribute">format</sgmltag> attribute is
+<emphasis>unspecified</emphasis>, the default extension will be used.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/graphicsize.extension.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/graphicsize.extension.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/graphicsize.extension.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,25 @@
+<refentry id="graphicsize.extension">
+<refmeta>
+<refentrytitle>graphicsize.extension</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>graphicsize.extension</refname>
+<refpurpose>Enable the getWidth()/getDepth() extension functions</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='graphicsize.extension.frag'>
+<xsl:param name="graphicsize.extension" select="1"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero (and if <parameter>use.extensions</parameter> is non-zero
+and if you're using a processor that supports extension functions), the
+<function>getWidth</function> and <function>getDepth</function> functions
+will be used to extract image sizes from graphics.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/header.column.widths.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/header.column.widths.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/header.column.widths.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,69 @@
+<refentry id="header.column.widths">
+<refmeta>
+<refentrytitle>header.column.widths</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>header.column.widths</refname>
+<refpurpose>Specify relative widths of header areas</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv><src:fragment id='header.column.widths.frag'>
+<xsl:param name="header.column.widths" select="'1 1 1'"/>
+</src:fragment></refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Page headers in print output use a three column table
+to position text at the left, center, and right side of
+the header on the page.
+This parameter lets you specify the relative sizes of the
+three columns.  The default value is
+"1 1 1".</para>
+
+<para>The parameter value must be three numbers, separated
+by white space. The first number represents the relative
+width of the left header for
+single-sided output, or the inside header for
+double-sided output.  The second number is the relative
+width of the center header.  The third number is the
+relative width of the right header for
+single-sided output, or the outside header for
+double-sided output.
+</para>
+
+<para>The numbers are used to specify the column widths
+for the table that makes up the header area.
+In the FO output, this looks like:
+</para>
+
+<programlisting>
+&lt;fo:table-column column-number="1" 
+    column-width="proportional-column-width(1)"/&gt;
+</programlisting>
+
+<para>
+The <literal>proportional-column-width()</literal>
+function computes a column width by dividing its
+argument by the total of the arguments for all the columns, and
+then multiplying the result by the width of the whole table
+(assuming all the column specs use the function).
+Its argument can be any positive integer or floating point number.
+Zero is an acceptable value, although some FO processors
+may warn about it, in which case using a very small number might
+be more satisfactory.
+</para>
+
+<para>For example, the value "1 2 1" means the center
+header should have twice the width of the other areas.
+A value of "0 0 1" means the entire header area
+is reserved for the right (or outside) header text.
+Note that to keep the center area centered on
+the page, the left and right values must be
+the same. A specification like "1 2 3" means the
+center area is no longer centered on the page
+since the right area is three times the width of the left area.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/header.content.properties.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/header.content.properties.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/header.content.properties.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,29 @@
+<refentry id="header.content.properties">
+<refmeta>
+<refentrytitle>header.content.properties</refentrytitle>
+<refmiscinfo role="type"></refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>header.content.properties</refname>
+<refpurpose></refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='header.content.properties.frag'>
+<xsl:attribute-set name="header.content.properties">
+  <xsl:attribute name="font-family">
+    <xsl:value-of select="$body.fontset"/>
+  </xsl:attribute>
+  <xsl:attribute name="margin-left">
+    <xsl:value-of select="$title.margin.left"/>
+  </xsl:attribute>
+</xsl:attribute-set>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Properties of page header content.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/header.rule.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/header.rule.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/header.rule.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,22 @@
+<refentry id="header.rule">
+<refmeta>
+<refentrytitle>header.rule</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>header.rule</refname>
+<refpurpose>Rule under headers?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='header.rule.frag'>
+<xsl:param name="header.rule" select="1"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, a rule will be drawn below the page headers.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/headers.on.blank.pages.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/headers.on.blank.pages.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/headers.on.blank.pages.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,22 @@
+<refentry id="headers.on.blank.pages">
+<refmeta>
+<refentrytitle>headers.on.blank.pages</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>headers.on.blank.pages</refname>
+<refpurpose>Put headers on blank pages?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='headers.on.blank.pages.frag'>
+<xsl:param name="headers.on.blank.pages" select="1"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, headers will be placed on blank pages.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/html.base.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/html.base.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/html.base.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="html.base">
+<refmeta>
+<refentrytitle>html.base</refentrytitle>
+<refmiscinfo role="type">uri</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>html.base</refname>
+<refpurpose>An HTML base URI</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='html.base.frag'><xsl:param name="html.base"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If html.base is set, it is used for the <sgmltag>BASE</sgmltag>
+element in the <sgmltag>HEAD</sgmltag> of the HTML documents.
+This is useful for dynamically served HTML where the base URI needs
+to be shifted.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/html.cellpadding.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/html.cellpadding.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/html.cellpadding.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="html.cellpadding">
+<refmeta>
+<refentrytitle>html.cellpadding</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>html.cellpadding</refname>
+<refpurpose>Default value for cellpadding in HTML tables</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='html.cellpadding.frag'>
+<xsl:param name="html.cellpadding" select="''"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If specified, this value will be used as the default cellpadding value
+in HTML tables.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/html.cellspacing.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/html.cellspacing.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/html.cellspacing.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="html.cellspacing">
+<refmeta>
+<refentrytitle>html.cellspacing</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>html.cellspacing</refname>
+<refpurpose>Default value for cellspacing in HTML tables</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='html.cellspacing.frag'>
+<xsl:param name="html.cellspacing" select="''"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If specified, this value will be used as the default cellspacing value
+in HTML tables.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/html.cleanup.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/html.cleanup.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/html.cleanup.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,29 @@
+<refentry id="html.cleanup">
+<refmeta>
+<refentrytitle>html.cleanup</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>html.cleanup</refname>
+<refpurpose>Attempt to clean up the resulting HTML?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='html.cleanup.frag'>
+<xsl:param name="html.cleanup" select="1"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, and if the <ulink url="http://www.exslt.org/">EXSLT</ulink>
+extensions are supported by your processor, the resulting HTML will be
+<quote>cleaned up</quote>. This improves the chances that the
+resulting HTML will be valid. It may also improve the formatting of
+some elements.</para>
+
+<para>This parameter is different from <parameter>make.valid.html</parameter>
+because it uses extension functions to manipulate result-tree-fragments.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/html.ext.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/html.ext.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/html.ext.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,24 @@
+<refentry id="html.ext">
+<refmeta>
+<refentrytitle>html.ext</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>html.ext</refname>
+<refpurpose>Identifies the extension of generated HTML files</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='html.ext.frag'>
+<xsl:param name="html.ext" select="'.html'"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The extension identified by <parameter>html.ext</parameter> will
+be used as the filename extension for chunks created by this stylesheet.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/html.extra.head.links.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/html.extra.head.links.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/html.extra.head.links.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,26 @@
+<refentry id="html.extra.head.links">
+<refmeta>
+<refentrytitle>html.extra.head.links</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>html.extra.head.links</refname>
+<refpurpose>Toggle extra HTML head link information</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='html.extra.head.links.frag'>
+<xsl:param name="html.extra.head.links" select="0"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, extra <sgmltag>link</sgmltag> elements will be
+generated in the <sgmltag>head</sgmltag> of chunked HTML files. These
+extra links point to chapters, appendixes, sections, etc. as supported
+by the <quote>Site Navigation Bar</quote> in Mozilla 1.0 (as of CR1, at least).
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/html.longdesc.link.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/html.longdesc.link.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/html.longdesc.link.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,29 @@
+<refentry id="html.longdesc.link">
+<refmeta>
+<refentrytitle>html.longdesc.link</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>html.longdesc.link</refname>
+<refpurpose>Should a link to the longdesc be included in the HTML?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='html.longdesc.link.frag'>
+<xsl:param name="html.longdesc.link" select="$html.longdesc"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, links will be created to the
+HTML files created for the
+<sgmltag class="attribute">longdesc</sgmltag> attribute. It makes no
+sense to turn enable this option without also enabling the
+<parameter>$html.longdesc</parameter> parameter.</para>
+
+<para>The <literal>longdesc.link</literal> named template is called
+to construct the link.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/html.longdesc.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/html.longdesc.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/html.longdesc.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,27 @@
+<refentry id="html.longdesc">
+<refmeta>
+<refentrytitle>html.longdesc</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>html.longdesc</refname>
+<refpurpose>Should longdesc URIs be created?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='html.longdesc.frag'>
+<xsl:param name="html.longdesc" select="1"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, HTML files will be created for the
+<sgmltag class="attribute">longdesc</sgmltag> attribute. These files
+are created from the <sgmltag>textobject</sgmltag>s in
+<sgmltag>mediaobject</sgmltag>s and
+<sgmltag>inlinemediaobject</sgmltag>.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/html.stylesheet.type.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/html.stylesheet.type.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/html.stylesheet.type.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,21 @@
+<refentry id="html.stylesheet.type">
+<refmeta>
+<refentrytitle>html.stylesheet.type</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>html.stylesheet.type</refname>
+<refpurpose>The type of the stylesheet used in the generated HTML</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='html.stylesheet.type.frag'><xsl:param name="html.stylesheet.type">text/css</xsl:param></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The type of the stylesheet to place in the HTML <sgmltag>link</sgmltag> tag.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/html.stylesheet.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/html.stylesheet.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/html.stylesheet.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,30 @@
+<refentry id="html.stylesheet">
+<refmeta>
+<refentrytitle>html.stylesheet</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>html.stylesheet</refname>
+<refpurpose>Name of the stylesheet(s) to use in the generated HTML</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='html.stylesheet.frag'>
+<xsl:param name="html.stylesheet" select="''"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The <parameter>html.stylesheet</parameter> parameter is either empty,
+indicating that no stylesheet <sgmltag>LINK</sgmltag> tag should be generated
+in the HTML output, or it is a list of one or more stylesheets.</para>
+
+<para>Multiple stylesheets are space-delimited. If you need to
+reference a stylesheet URI that includes a space, encode it with
+<literal>%20</literal>. A seprate HTML <sgmltag>LINK</sgmltag> element will
+be generated for each stylesheet in the order they are listed in the
+parameter.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.alias.file.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.alias.file.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.alias.file.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="htmlhelp.alias.file">
+<refmeta>
+<refentrytitle>htmlhelp.alias.file</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.alias.file</refname>
+<refpurpose>Filename of map file.</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='htmlhelp.alias.file.frag'>
+<xsl:param name="htmlhelp.alias.file" select="'alias.h'"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Change this parameter if you want different name of map file
+than <filename>alias.h</filename>.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.autolabel.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.autolabel.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.autolabel.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="htmlhelp.autolabel">
+<refmeta>
+<refentrytitle>htmlhelp.autolabel</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.autolabel</refname>
+<refpurpose>Should tree-like ToC use autonumbering feature?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='htmlhelp.autolabel.frag'>
+<xsl:param name="htmlhelp.autolabel" select="0"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want to include chapter and section numbers into ToC in
+the left panel, set this parameter to 1.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.back.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.back.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.back.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="htmlhelp.button.back">
+<refmeta>
+<refentrytitle>htmlhelp.button.back</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.button.back</refname>
+<refpurpose>Should be Back button shown?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='htmlhelp.button.back.frag'>
+<xsl:param name="htmlhelp.button.back" select="1"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want Back button shown on toolbar, turn this
+parameter to 1.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.forward.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.forward.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.forward.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="htmlhelp.button.forward">
+<refmeta>
+<refentrytitle>htmlhelp.button.forward</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.button.forward</refname>
+<refpurpose>Should be Forward button shown?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='htmlhelp.button.forward.frag'>
+<xsl:param name="htmlhelp.button.forward" select="0"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want Forward button shown on toolbar, turn this
+parameter to 1.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.hideshow.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.hideshow.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.hideshow.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="htmlhelp.button.hideshow">
+<refmeta>
+<refentrytitle>htmlhelp.button.hideshow</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.button.hideshow</refname>
+<refpurpose>Should be Hide/Show button shown?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='htmlhelp.button.hideshow.frag'>
+<xsl:param name="htmlhelp.button.hideshow" select="1"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want Hide/Show button shown on toolbar, turn this
+parameter to 1.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.home.url.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.home.url.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.home.url.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,22 @@
+<refentry id="htmlhelp.button.home.url">
+<refmeta>
+<refentrytitle>htmlhelp.button.home.url</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.button.home.url</refname>
+<refpurpose>URL address of page accessible by Home button</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='htmlhelp.button.home.url.frag'>
+<xsl:param name="htmlhelp.button.home.url"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>URL address of page accessible by Home button.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.home.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.home.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.home.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="htmlhelp.button.home">
+<refmeta>
+<refentrytitle>htmlhelp.button.home</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.button.home</refname>
+<refpurpose>Should be Home button shown?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='htmlhelp.button.home.frag'>
+<xsl:param name="htmlhelp.button.home" select="0"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want Home button shown on toolbar, turn this
+parameter to 1.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.jump1.title.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.jump1.title.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.jump1.title.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,22 @@
+<refentry id="htmlhelp.button.jump1.title">
+<refmeta>
+<refentrytitle>htmlhelp.button.jump1.title</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.button.jump1.title</refname>
+<refpurpose>Title of Jump1 button</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='htmlhelp.button.jump1.title.frag'>
+<xsl:param name="htmlhelp.button.jump1.title" select="'User1'"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Title of Jump1 button.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.jump1.url.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.jump1.url.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.jump1.url.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,22 @@
+<refentry id="htmlhelp.button.jump1.url">
+<refmeta>
+<refentrytitle>htmlhelp.button.jump1.url</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.button.jump1.url</refname>
+<refpurpose>URL address of page accessible by Jump1 button</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='htmlhelp.button.jump1.url.frag'>
+<xsl:param name="htmlhelp.button.jump1.url"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>URL address of page accessible by Jump1 button.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.jump1.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.jump1.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.jump1.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="htmlhelp.button.jump1">
+<refmeta>
+<refentrytitle>htmlhelp.button.jump1</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.button.jump1</refname>
+<refpurpose>Should be Jump1 button shown?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='htmlhelp.button.jump1.frag'>
+<xsl:param name="htmlhelp.button.jump1" select="0"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want Jump1 button shown on toolbar, turn this
+parameter to 1.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.jump2.title.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.jump2.title.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.jump2.title.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,22 @@
+<refentry id="htmlhelp.button.jump2.title">
+<refmeta>
+<refentrytitle>htmlhelp.button.jump2.title</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.button.jump2.title</refname>
+<refpurpose>Title of Jump2 button</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='htmlhelp.button.jump2.title.frag'>
+<xsl:param name="htmlhelp.button.jump2.title" select="'User2'"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Title of Jump2 button.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.jump2.url.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.jump2.url.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.jump2.url.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,22 @@
+<refentry id="htmlhelp.button.jump2.url">
+<refmeta>
+<refentrytitle>htmlhelp.button.jump2.url</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.button.jump2.url</refname>
+<refpurpose>URL address of page accessible by Jump2 button</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='htmlhelp.button.jump2.url.frag'>
+<xsl:param name="htmlhelp.button.jump2.url"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>URL address of page accessible by Jump2 button.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.jump2.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.jump2.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.jump2.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="htmlhelp.button.jump2">
+<refmeta>
+<refentrytitle>htmlhelp.button.jump2</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.button.jump2</refname>
+<refpurpose>Should be Jump2 button shown?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='htmlhelp.button.jump2.frag'>
+<xsl:param name="htmlhelp.button.jump2" select="0"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want Jump2 button shown on toolbar, turn this
+parameter to 1.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.locate.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.locate.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.locate.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="htmlhelp.button.locate">
+<refmeta>
+<refentrytitle>htmlhelp.button.locate</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.button.locate</refname>
+<refpurpose>Should be Locate button shown?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='htmlhelp.button.locate.frag'>
+<xsl:param name="htmlhelp.button.locate" select="0"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want Locate button shown on toolbar, turn this
+parameter to 1.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.next.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.next.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.next.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="htmlhelp.button.next">
+<refmeta>
+<refentrytitle>htmlhelp.button.next</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.button.next</refname>
+<refpurpose>Should be Next button shown?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='htmlhelp.button.next.frag'>
+<xsl:param name="htmlhelp.button.next" select="1"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want Next button shown on toolbar, turn this
+parameter to 1.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.options.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.options.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.options.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="htmlhelp.button.options">
+<refmeta>
+<refentrytitle>htmlhelp.button.options</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.button.options</refname>
+<refpurpose>Should be Options button shown?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='htmlhelp.button.options.frag'>
+<xsl:param name="htmlhelp.button.options" select="1"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want Options button shown on toolbar, turn this
+parameter to 1.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.prev.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.prev.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.prev.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="htmlhelp.button.prev">
+<refmeta>
+<refentrytitle>htmlhelp.button.prev</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.button.prev</refname>
+<refpurpose>Should be Prev button shown?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='htmlhelp.button.prev.frag'>
+<xsl:param name="htmlhelp.button.prev" select="1"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want Prev button shown on toolbar, turn this
+parameter to 1.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.print.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.print.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.print.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="htmlhelp.button.print">
+<refmeta>
+<refentrytitle>htmlhelp.button.print</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.button.print</refname>
+<refpurpose>Should be Print button shown?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='htmlhelp.button.print.frag'>
+<xsl:param name="htmlhelp.button.print" select="1"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want Print button shown on toolbar, turn this
+parameter to 1.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.refresh.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.refresh.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.refresh.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="htmlhelp.button.refresh">
+<refmeta>
+<refentrytitle>htmlhelp.button.refresh</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.button.refresh</refname>
+<refpurpose>Should be Refresh button shown?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='htmlhelp.button.refresh.frag'>
+<xsl:param name="htmlhelp.button.refresh" select="0"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want Refresh button shown on toolbar, turn this
+parameter to 1.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.stop.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.stop.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.stop.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="htmlhelp.button.stop">
+<refmeta>
+<refentrytitle>htmlhelp.button.stop</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.button.stop</refname>
+<refpurpose>Should be Stop button shown?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='htmlhelp.button.stop.frag'>
+<xsl:param name="htmlhelp.button.stop" select="0"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want Stop button shown on toolbar, turn this
+parameter to 1.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.zoom.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.zoom.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.button.zoom.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="htmlhelp.button.zoom">
+<refmeta>
+<refentrytitle>htmlhelp.button.zoom</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.button.zoom</refname>
+<refpurpose>Should be Zoom button shown?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='htmlhelp.button.zoom.frag'>
+<xsl:param name="htmlhelp.button.zoom" select="0"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want Zoom button shown on toolbar, turn this
+parameter to 1.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.chm.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.chm.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.chm.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="htmlhelp.chm">
+<refmeta>
+<refentrytitle>htmlhelp.chm</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.chm</refname>
+<refpurpose>Filename of output HTML Help file.</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='htmlhelp.chm.frag'>
+<xsl:param name="htmlhelp.chm" select="'htmlhelp.chm'"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Change this parameter if you want different name of result
+CHM file than htmlhelp.chm.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.default.topic.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.default.topic.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.default.topic.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,31 @@
+<refentry id="htmlhelp.default.topic">
+<refmeta>
+<refentrytitle>htmlhelp.default.topic</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.default.topic</refname>
+<refpurpose>Name of file with default topic</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='htmlhelp.default.topic.frag'>
+<xsl:param name="htmlhelp.default.topic" select="''"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Normally first chunk of document is displayed when you open HTML
+Help file. If you want to display another topic, simply set its
+filename by this parameter.</para>
+
+<para>This is useful especially if you don't generate ToC in front of
+your document and you also hide root element in ToC. E.g.:</para>
+
+<programlisting><![CDATA[<xsl:param name="generate.book.toc" select="0"/>
+<xsl:param name="htmlhelp.hhc.show.root" select="0"/>
+<xsl:param name="htmlhelp.default.topic" select="'pr01.html'"/>]]></programlisting>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.display.progress.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.display.progress.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.display.progress.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="htmlhelp.display.progress">
+<refmeta>
+<refentrytitle>htmlhelp.display.progress</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.display.progress</refname>
+<refpurpose>Display compile progress?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='htmlhelp.display.progress.frag'>
+<xsl:param name="htmlhelp.display.progress" select="1"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>You can swith off display of compile progress by setting this
+parameter to 0.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.encoding.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.encoding.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.encoding.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="htmlhelp.encoding">
+<refmeta>
+<refentrytitle>htmlhelp.encoding</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.encoding</refname>
+<refpurpose>Character encoding to use in files for HTML Help compiler.</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='htmlhelp.encoding.frag'>
+<xsl:param name="htmlhelp.encoding" select="'iso-8859-1'"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>HTML Help Compiler is not UTF-8 aware, so you should always use
+apropriate single-byte encoding here.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.enhanced.decompilation.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.enhanced.decompilation.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.enhanced.decompilation.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,22 @@
+<refentry id="htmlhelp.enhanced.decompilation">
+<refmeta>
+<refentrytitle>htmlhelp.enhanced.decompilation</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.enhanced.decompilation</refname>
+<refpurpose>Allow enhanced decompilation of CHM?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='htmlhelp.enhanced.decompilation.frag'>
+<xsl:param name="htmlhelp.enhanced.decompilation" select="0"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>When set to 1 this parameter enables enhanced decompilation of CHM.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.enumerate.images.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.enumerate.images.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.enumerate.images.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="htmlhelp.enumerate.images">
+<refmeta>
+<refentrytitle>htmlhelp.enumerate.images</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.enumerate.images</refname>
+<refpurpose>Should be paths to all used images added to project file?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='htmlhelp.enumerate.images.frag'>
+<xsl:param name="htmlhelp.enumerate.images" select="0"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>You should turn on this flag, if you insert images into your documents 
+as external binary entities or if you are using absolute path in image names.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.force.map.and.alias.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.force.map.and.alias.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.force.map.and.alias.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,24 @@
+<refentry id="htmlhelp.force.map.and.alias">
+<refmeta>
+<refentrytitle>htmlhelp.force.map.and.alias</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.force.map.and.alias</refname>
+<refpurpose>Should be [MAP] and [ALIAS] section added to project file unconditionaly?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='htmlhelp.force.map.and.alias.frag'>
+<xsl:param name="htmlhelp.force.map.and.alias" select="0"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>You should turn on this flag, if you have your own
+<filename>alias.h</filename> and <filename>contex.h</filename> files
+and you want include reference to them in project file.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.hhc.binary.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.hhc.binary.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.hhc.binary.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,24 @@
+<refentry id="htmlhelp.hhc.binary">
+<refmeta>
+<refentrytitle>htmlhelp.hhc.binary</refentrytitle>
+<refmiscinfo role="type"></refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.hhc.binary</refname>
+<refpurpose></refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='htmlhelp.hhc.binary.frag'>
+<xsl:param name="htmlhelp.hhc.binary" select="1"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This parametr controls whether binary TOC will be generated. You
+must create binary TOC if you want to add Prev/Next buttons to toolbar
+(which is default behaviour). Files with binary TOC can't be merged.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.hhc.folders.instead.books.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.hhc.folders.instead.books.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.hhc.folders.instead.books.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,25 @@
+<refentry id="htmlhelp.hhc.folders.instead.books">
+<refmeta>
+<refentrytitle>htmlhelp.hhc.folders.instead.books</refentrytitle>
+<refmiscinfo role="type"></refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.hhc.folders.instead.books</refname>
+<refpurpose></refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='htmlhelp.hhc.folders.instead.books.frag'>
+<xsl:param name="htmlhelp.hhc.folders.instead.books" select="1"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This parameter controls whether there should be folder-like
+icons (1) or book-like icons (0) in ToC. If you want to use
+folder-like icons you must swith off binary ToC using
+<parameter>htmlhelp.hhc.binary</parameter>.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.hhc.section.depth.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.hhc.section.depth.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.hhc.section.depth.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="htmlhelp.hhc.section.depth">
+<refmeta>
+<refentrytitle>htmlhelp.hhc.section.depth</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.hhc.section.depth</refname>
+<refpurpose>Depth of TOC for sections in a left pane.</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='htmlhelp.hhc.section.depth.frag'>
+<xsl:param name="htmlhelp.hhc.section.depth" select="5"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Change this parameter if you want shallower ToC in a left pane
+of HTML Help viewer.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.hhc.show.root.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.hhc.show.root.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.hhc.show.root.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,24 @@
+<refentry id="htmlhelp.hhc.show.root">
+<refmeta>
+<refentrytitle>htmlhelp.hhc.show.root</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.hhc.show.root</refname>
+<refpurpose>Should be entry for root element shown in ToC?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='htmlhelp.hhc.show.root.frag'>
+<xsl:param name="htmlhelp.hhc.show.root" select="1"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If set to 0, there will be no entry for root element in
+ToC. This is useful when you want provide user with expanded ToC as
+a default.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.hhc.width.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.hhc.width.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.hhc.width.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,22 @@
+<refentry id="htmlhelp.hhc.width">
+<refmeta>
+<refentrytitle>htmlhelp.hhc.width</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.hhc.width</refname>
+<refpurpose>Width of navigation (ToC) pane</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='htmlhelp.hhc.width.frag'>
+<xsl:param name="htmlhelp.hhc.width"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This parameter specifies width of ToC pane in pixels.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.hhc.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.hhc.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.hhc.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="htmlhelp.hhc">
+<refmeta>
+<refentrytitle>htmlhelp.hhc</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.hhc</refname>
+<refpurpose>Filename of TOC file.</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='htmlhelp.hhc.frag'>
+<xsl:param name="htmlhelp.hhc" select="'toc.hhc'"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Change this parameter if you want different name of TOC file
+than toc.hhc.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.hhk.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.hhk.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.hhk.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="htmlhelp.hhk">
+<refmeta>
+<refentrytitle>htmlhelp.hhk</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.hhk</refname>
+<refpurpose>Filename of index file.</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='htmlhelp.hhk.frag'>
+<xsl:param name="htmlhelp.hhk" select="'index.hhk'"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Change this parameter if you want different name of index file
+than index.hhk.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.hhp.tail.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.hhp.tail.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.hhp.tail.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="htmlhelp.hhp.tail">
+<refmeta>
+<refentrytitle>htmlhelp.hhp.tail</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.hhp.tail</refname>
+<refpurpose>Additional content for project file.</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='htmlhelp.hhp.tail.frag'>
+<xsl:param name="htmlhelp.hhp.tail"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want to include some additional parameters into project file,
+store appropriate part of project file into this parameter.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.hhp.window.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.hhp.window.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.hhp.window.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="htmlhelp.hhp.window">
+<refmeta>
+<refentrytitle>htmlhelp.hhp.window</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.hhp.window</refname>
+<refpurpose>Name of default window.</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='htmlhelp.hhp.window.frag'>
+<xsl:param name="htmlhelp.hhp.window" select="'Main'"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Name of default window. If empty no [WINDOWS] section will be
+added to project file.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.hhp.windows.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.hhp.windows.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.hhp.windows.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,24 @@
+<refentry id="htmlhelp.hhp.windows">
+<refmeta>
+<refentrytitle>htmlhelp.hhp.windows</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.hhp.windows</refname>
+<refpurpose>Definition of additional windows</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='htmlhelp.hhp.windows.frag'>
+<xsl:param name="htmlhelp.hhp.windows"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Content of this parameter is placed at the end of [WINDOWS]
+section of project file. You can use it for defining your own
+addtional windows.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.hhp.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.hhp.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.hhp.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="htmlhelp.hhp">
+<refmeta>
+<refentrytitle>htmlhelp.hhp</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.hhp</refname>
+<refpurpose>Filename of project file.</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='htmlhelp.hhp.frag'>
+<xsl:param name="htmlhelp.hhp" select="'htmlhelp.hhp'"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Change this parameter if you want different name of project
+file than htmlhelp.hhp.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.map.file.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.map.file.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.map.file.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="htmlhelp.map.file">
+<refmeta>
+<refentrytitle>htmlhelp.map.file</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.map.file</refname>
+<refpurpose>Filename of map file.</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='htmlhelp.map.file.frag'>
+<xsl:param name="htmlhelp.map.file" select="'context.h'"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Change this parameter if you want different name of map file
+than <filename>context.h</filename>.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.only.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.only.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.only.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,25 @@
+<refentry id="htmlhelp.only">
+<refmeta>
+<refentrytitle>htmlhelp.only</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.only</refname>
+<refpurpose>Should be only project files generated?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='htmlhelp.only.frag'>
+<xsl:param name="htmlhelp.only" select="0"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want to play with various HTML Help parameters and you
+don't need to regenerate all HTML files, you can set this parameter to
+1. This setting will not process whole document, only project files
+(hhp, hhc, hhk,...) will be generated.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.remember.window.position.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.remember.window.position.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.remember.window.position.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="htmlhelp.remember.window.position">
+<refmeta>
+<refentrytitle>htmlhelp.remember.window.position</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.remember.window.position</refname>
+<refpurpose>Remember help window position?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='htmlhelp.remember.window.position.frag'>
+<xsl:param name="htmlhelp.remember.window.position" select="0"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>To remember help window position between starts set this
+parameter to 1.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.show.advanced.search.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.show.advanced.search.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.show.advanced.search.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="htmlhelp.show.advanced.search">
+<refmeta>
+<refentrytitle>htmlhelp.show.advanced.search</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.show.advanced.search</refname>
+<refpurpose>Should be advanced search available?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='htmlhelp.show.advanced.search.frag'>
+<xsl:param name="htmlhelp.show.advanced.search" select="0"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want advanced search features in your help, turn this
+parameter to 1.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.show.favorities.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.show.favorities.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.show.favorities.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="htmlhelp.show.favorities">
+<refmeta>
+<refentrytitle>htmlhelp.show.favorities</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.show.favorities</refname>
+<refpurpose>Should be favorities tab shown?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='htmlhelp.show.favorities.frag'>
+<xsl:param name="htmlhelp.show.favorities" select="0"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want favorities tab shown in your help, turn this
+parameter to 1.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.show.menu.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.show.menu.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.show.menu.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="htmlhelp.show.menu">
+<refmeta>
+<refentrytitle>htmlhelp.show.menu</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.show.menu</refname>
+<refpurpose>Should be menu shown?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='htmlhelp.show.menu.frag'>
+<xsl:param name="htmlhelp.show.menu" select="0"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want application menu in your HTML Help file, turn this
+parameter to 1.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.show.toolbar.text.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.show.toolbar.text.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.show.toolbar.text.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="htmlhelp.show.toolbar.text">
+<refmeta>
+<refentrytitle>htmlhelp.show.toolbar.text</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.show.toolbar.text</refname>
+<refpurpose>Show text under toolbar buttons?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='htmlhelp.show.toolbar.text.frag'>
+<xsl:param name="htmlhelp.show.toolbar.text" select="1"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>You can switch off display of texts under toolbar buttons by
+setting this parameter to 0.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.title.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.title.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.title.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="htmlhelp.title">
+<refmeta>
+<refentrytitle>htmlhelp.title</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.title</refname>
+<refpurpose>Title of HTML Help</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='htmlhelp.title.frag'>
+<xsl:param name="htmlhelp.title" select="''"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Content of this parameter will be used as a title for generated
+HTML Help. If empty, title will be automatically taken from document.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.use.hhk.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.use.hhk.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.use.hhk.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="htmlhelp.use.hhk">
+<refmeta>
+<refentrytitle>htmlhelp.use.hhk</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.use.hhk</refname>
+<refpurpose>Should be index built using HHK file?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='htmlhelp.use.hhk.frag'>
+<xsl:param name="htmlhelp.use.hhk" select="0"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, index is created using HHK file. This provides some
+new features.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.window.geometry.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.window.geometry.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/htmlhelp.window.geometry.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,25 @@
+<refentry id="htmlhelp.window.geometry">
+<refmeta>
+<refentrytitle>htmlhelp.window.geometry</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.window.geometry</refname>
+<refpurpose>Set initial geometry of help window</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='htmlhelp.window.geometry.frag'>
+<xsl:param name="htmlhelp.window.geometry"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This parameter specifies initial position of help
+window. E.g.</para>
+
+<programlisting><![CDATA[<xsl:param name="htmlhelp.window.geometry">[160,64,992,704]</xsl:param>]]></programlisting>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/hyphenate.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/hyphenate.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/hyphenate.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,21 @@
+<refentry id="hyphenate">
+<refmeta>
+<refentrytitle>hyphenate</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>hyphenate</refname>
+<refpurpose>Specify hyphenation behavior</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='hyphenate.frag'><xsl:param name="hyphenate">true</xsl:param></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true, words may be hyphenated. Otherwise, they may not.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/ignore.image.scaling.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/ignore.image.scaling.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/ignore.image.scaling.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="ignore.image.scaling">
+<refmeta>
+<refentrytitle>ignore.image.scaling</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>ignore.image.scaling</refname>
+<refpurpose>Tell the stylesheets to ignore the author's image scaling attributes</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='ignore.image.scaling.frag'>
+<xsl:param name="ignore.image.scaling" select="0"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, the scaling attributes on graphics and media objects are
+ignored.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/index.preferred.page.properties.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/index.preferred.page.properties.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/index.preferred.page.properties.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,25 @@
+<refentry id="index.preferred.page.properties">
+<refnamediv>
+<refname>index.preferred.page.properties</refname>
+<refpurpose>Properties used to emphasize page number references for
+significant index terms</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='index.preferred.page.properties.frag'>
+<xsl:attribute-set name="index.preferred.page.properties">
+  <xsl:attribute name="font-weight">bold</xsl:attribute>
+</xsl:attribute-set>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Properties used to emphasize page number references for
+significant index terms (<sgmltag
+class="attribute">significance</sgmltag>=<sgmltag
+class="attvalue">preffered</sgmltag>). Currently works only with
+XEP.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/informal.object.properties.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/informal.object.properties.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/informal.object.properties.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,20 @@
+<refentry id="informal.object.properties">
+<refnamediv>
+<refname>informal.object.properties</refname>
+<refpurpose>Properties associated with a formal object such as a figure, or other component that has a title</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='informal.object.properties.frag'><xsl:attribute-set name="informal.object.properties">
+  <xsl:attribute name="space-before.minimum">0.5em</xsl:attribute>
+  <xsl:attribute name="space-before.optimum">1em</xsl:attribute>
+  <xsl:attribute name="space-before.maximum">2em</xsl:attribute>
+  <xsl:attribute name="space-after.minimum">0.5em</xsl:attribute>
+  <xsl:attribute name="space-after.optimum">1em</xsl:attribute>
+  <xsl:attribute name="space-after.maximum">2em</xsl:attribute>
+</xsl:attribute-set></src:fragment>
+</refsynopsisdiv>
+<refsect1><title>Description</title>
+<para>The styling for informal objects in docbook. Specify the spacing before and after the object.</para>
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/inherit.keywords.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/inherit.keywords.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/inherit.keywords.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,25 @@
+<refentry id="inherit.keywords">
+<refmeta>
+<refentrytitle>inherit.keywords</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>inherit.keywords</refname>
+<refpurpose>Inherit keywords from ancestor elements?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='inherit.keywords.frag'><xsl:param name="inherit.keywords" select="'1'"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If <parameter>inherit.keywords</parameter>
+is non-zero, the keyword <sgmltag>META</sgmltag> for each HTML
+<sgmltag>HEAD</sgmltag> element will include all of the keywords from
+ancestral elements. Otherwise, only the keywords from the current section
+will be used.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/insert.xref.page.number.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/insert.xref.page.number.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/insert.xref.page.number.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,52 @@
+<refentry id="insert.xref.page.number">
+<refmeta>
+<refentrytitle>insert.xref.page.number</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>insert.xref.page.number</refname>
+<refpurpose>Turns page numbers in xrefs on and off</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='insert.xref.page.number.frag'>
+<xsl:param name="insert.xref.page.number">no</xsl:param>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The value of this parameter determines if
+cross references (<sgmltag>xref</sgmltag>s) in
+printed output will
+include page number citations.
+It has three possible values.
+</para>
+<variablelist>
+<section>
+<term>no</term>
+<listitem><para>No page number references will be generated.
+</para></listitem>
+</section>
+<section>
+<term>yes</term>
+<listitem><para>Page number references will be generated
+for all <sgmltag>xref</sgmltag> elements.
+The style of page reference may be changed
+if an <sgmltag class="attribute">xrefstyle</sgmltag>
+attribute is used.
+</para></listitem>
+</section>
+<section>
+<term>maybe</term>
+<listitem><para>Page number references will not be generated
+for an <sgmltag>xref</sgmltag> element unless 
+it has an
+<sgmltag class="attribute">xrefstyle</sgmltag>
+attribute whose value specifies a page reference.
+</para></listitem>
+</section>
+</variablelist>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/l10n.gentext.default.language.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/l10n.gentext.default.language.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/l10n.gentext.default.language.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,24 @@
+<refentry id="l10n.gentext.default.language">
+<refmeta>
+<refentrytitle>l10n.gentext.default.language</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>l10n.gentext.default.language</refname>
+<refpurpose>Sets the default language for generated text</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='l10n.gentext.default.language.frag'>
+<xsl:param name="l10n.gentext.default.language" select="'en'"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The value of the <parameter>l10n.gentext.default.language</parameter>
+parameter is used as the language for generated text if no setting is provided
+in the source document.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/l10n.gentext.language.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/l10n.gentext.language.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/l10n.gentext.language.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,28 @@
+<refentry id="l10n.gentext.language">
+<refmeta>
+<refentrytitle>l10n.gentext.language</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>l10n.gentext.language</refname>
+<refpurpose>Sets the gentext language</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='l10n.gentext.language.frag'>
+<xsl:param name="l10n.gentext.language" select="''"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If this parameter is set to any value other than the empty string, its
+value will be used as the value for the language when generating text. Setting
+<parameter>l10n.gentext.language</parameter> overrides any settings within the
+document being formatted.</para>
+
+<para>It's much more likely that you might want to set the
+<parameter>l10n.gentext.default.language</parameter> parameter.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/l10n.gentext.use.xref.language.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/l10n.gentext.use.xref.language.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/l10n.gentext.use.xref.language.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,48 @@
+<refentry id="l10n.gentext.use.xref.language">
+<refmeta>
+<refentrytitle>l10n.gentext.use.xref.language</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>l10n.gentext.use.xref.language</refname>
+<refpurpose>Use the language of target when generating cross-reference text?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='l10n.gentext.use.xref.language.frag'>
+<xsl:param name="l10n.gentext.use.xref.language" select="0"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, the language of the target will be used when
+generating cross reference text. Usually, the <quote>current</quote>
+language is used when generating text (that is, the language of the
+element that contains the cross-reference element). But setting this parameter
+allows the language of the element <emphasis>pointed to</emphasis> to control
+the generated text.</para>
+
+<para>Consider the following example:</para>
+
+<informalexample>
+<programlisting><![CDATA[<para lang="en">See also <xref linkend="chap3"/>.</para>]]>
+</programlisting>
+</informalexample>
+
+<para>Suppose that Chapter 3 happens to be written in German.
+If <parameter>l10n.gentext.use.xref.language</parameter> is non-zero, the
+resulting text will be something like this:</para>
+
+<blockquote>
+<para>See also Kapital 3.</para>
+</blockquote>
+
+<para>Where the more traditional rendering would be:</para>
+
+<blockquote>
+<para>See also Chapter 3.</para>
+</blockquote>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/label.from.part.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/label.from.part.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/label.from.part.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,25 @@
+<refentry id="label.from.part">
+<refmeta>
+<refentrytitle>label.from.part</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>label.from.part</refname>
+<refpurpose>Renumber chapters in each part?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='label.from.part.frag'><xsl:param name="label.from.part" select="'0'"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If <parameter>label.from.part</parameter> is non-zero, components
+(<sgmltag>chapter</sgmltag>s, <sgmltag>appendixe</sgmltag>s, etc.)
+will be numbered from 1 in each <sgmltag>part</sgmltag>. Otherwise,
+they will be numbered monotonically throughout each
+<sgmltag>book</sgmltag>.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/line-height.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/line-height.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/line-height.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,22 @@
+<refentry id="line-height">
+<refmeta>
+<refentrytitle>line-height</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>line-height</refname>
+<refpurpose>Specify the line-height property</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='line-height.frag'>
+<xsl:param name="line-height" select="'normal'"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Sets the line-height property.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/linenumbering.everyNth.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/linenumbering.everyNth.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/linenumbering.everyNth.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,21 @@
+<refentry id="linenumbering.everyNth">
+<refmeta>
+<refentrytitle>linenumbering.everyNth</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>linenumbering.everyNth</refname>
+<refpurpose>Indicate which lines should be numbered</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='linenumbering.everyNth.frag'><xsl:param name="linenumbering.everyNth" select="'5'"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If line numbering is enabled, everyNth line will be numbered.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/linenumbering.extension.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/linenumbering.extension.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/linenumbering.extension.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,24 @@
+<refentry id="linenumbering.extension">
+<refmeta>
+<refentrytitle>linenumbering.extension</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>linenumbering.extension</refname>
+<refpurpose>Enable the line numbering extension</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='linenumbering.extension.frag'><xsl:param name="linenumbering.extension" select="'1'"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true, verbatim environments (elements that have the
+format='linespecific' notation attribute: address, literallayout,
+programlisting, screen, synopsis) that specify line numbering will
+have, surprise, line numbers.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/linenumbering.separator.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/linenumbering.separator.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/linenumbering.separator.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,22 @@
+<refentry id="linenumbering.separator">
+<refmeta>
+<refentrytitle>linenumbering.separator</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>linenumbering.separator</refname>
+<refpurpose>Specify a separator between line numbers and lines</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='linenumbering.separator.frag'><xsl:param name="linenumbering.separator" select="' '"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The separator is inserted between line numbers and lines in
+the verbatim environment.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/linenumbering.width.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/linenumbering.width.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/linenumbering.width.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,22 @@
+<refentry id="linenumbering.width">
+<refmeta>
+<refentrytitle>linenumbering.width</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>linenumbering.width</refname>
+<refpurpose>Indicates the width of line numbers</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='linenumbering.width.frag'><xsl:param name="linenumbering.width" select="'3'"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If line numbering is enabled, line numbers will appear right
+justified in a field "width" characters wide.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/link.mailto.url.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/link.mailto.url.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/link.mailto.url.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,22 @@
+<refentry id="link.mailto.url">
+<refmeta>
+<refentrytitle>link.mailto.url</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>link.mailto.url</refname>
+<refpurpose>Mailto URL for the LINK REL=made HTML HEAD element</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='link.mailto.url.frag'><xsl:param name="link.mailto.url"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If not the empty string, this address will be used for the
+REL=made <sgmltag>LINK</sgmltag> element in the HTML <sgmltag>HEAD</sgmltag>.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/list.block.spacing.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/list.block.spacing.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/list.block.spacing.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,20 @@
+<refentry id="list.block.spacing">
+<refnamediv>
+<refname>list.block.spacing</refname>
+<refpurpose>What spacing do you want before and after lists?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='list.block.spacing.frag'><xsl:attribute-set name="list.block.spacing">
+  <xsl:attribute name="space-before.optimum">1em</xsl:attribute>
+  <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute>
+  <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute>
+  <xsl:attribute name="space-after.optimum">1em</xsl:attribute>
+  <xsl:attribute name="space-after.minimum">0.8em</xsl:attribute>
+  <xsl:attribute name="space-after.maximum">1.2em</xsl:attribute>
+</xsl:attribute-set></src:fragment>
+</refsynopsisdiv>
+<refsect1><title>Description</title>
+<para>Specify the spacing required before and after a list. It is necessary to specify the space after a list block because lists can come inside of paras.  </para>
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/list.item.spacing.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/list.item.spacing.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/list.item.spacing.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,17 @@
+<refentry id="list.item.spacing">
+<refnamediv>
+<refname>list.item.spacing</refname>
+<refpurpose>What space do you want between list items?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='list.item.spacing.frag'><xsl:attribute-set name="list.item.spacing">
+  <xsl:attribute name="space-before.optimum">1em</xsl:attribute>
+  <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute>
+  <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute>
+</xsl:attribute-set></src:fragment>
+</refsynopsisdiv>
+<refsect1><title>Description</title>
+<para>Specify what spacing you want between each list item.</para>
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/make.graphic.viewport.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/make.graphic.viewport.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/make.graphic.viewport.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,30 @@
+<refentry id="make.graphic.viewport">
+<refmeta>
+<refentrytitle>make.graphic.viewport</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>make.graphic.viewport</refname>
+<refpurpose>Use tables in HTML to make viewports for graphics</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='make.graphic.viewport.frag'>
+<xsl:param name="make.graphic.viewport" select="1"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The HTML <sgmltag>img</sgmltag> element only supports the notion
+of content-area scaling; it doesn't support the distinction between a
+content-area and a viewport-area, so we have to make some compromises.</para>
+
+<para>If <parameter>make.graphic.viewport</parameter> is non-zero, a table
+will be used to frame the image. This creates an effective viewport-area.
+</para>
+
+<para>Tables and alignment don't work together, so this parameter is ignored
+if alignment is specified on an image.</para>
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/make.index.markup.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/make.index.markup.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/make.index.markup.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,68 @@
+<refentry id="make.index.markup">
+<refmeta>
+<refentrytitle>make.index.markup</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>make.index.markup</refname>
+<refpurpose>Generate XML index markup in the index?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='make.index.markup.frag'>
+<xsl:param name="make.index.markup" select="0"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This parameter enables a very neat trick for getting properly
+merged, collated back-of-the-book indexes. G. Ken Holman suggested
+this trick at Extreme Markup Languages 2002 and I'm indebted to him
+for it.</para>
+
+<para>Jeni Tennison's excellent code in
+<filename>autoidx.xsl</filename> does a great job of merging and
+sorting <sgmltag>indexterm</sgmltag>s in the document and building a
+back-of-the-book index. However, there's one thing that it cannot
+reasonably be expected to do: merge page numbers into ranges. (I would
+not have thought that it could collate and suppress duplicate page
+numbers, but in fact it appears to manage that task somehow.)</para>
+
+<para>Ken's trick is to produce a document in which the index at the
+back of the book is <quote>displayed</quote> in XML. Because the index
+is generated by the FO processor, all of the page numbers have been resolved.
+It's a bit hard to explain, but what it boils down to is that instead of having
+an index at the back of the book that looks like this:</para>
+
+<blockquote>
+<formalpara><title>A</title>
+<para>ap1, 1, 2, 3</para>
+</formalpara>
+</blockquote>
+
+<para>you get one that looks like this:</para>
+
+<blockquote>
+<programlisting><![CDATA[<indexdiv>A</indexdiv>
+<indexentry>
+<primaryie>ap1</primaryie>,
+<phrase role="pageno">1</phrase>,
+<phrase role="pageno">2</phrase>,
+<phrase role="pageno">3</phrase>
+</indexentry>]]></programlisting>
+</blockquote>
+
+<para>After building a PDF file with this sort of odd-looking index, you can
+extract the text from the PDF file and the result is a proper index expressed in
+XML.</para>
+
+<para>Now you have data that's amenable to processing and a simple Perl script
+(such as <filename>fo/pdf2index</filename>) can
+merge page ranges and generate a proper index.</para>
+
+<para>Finally, reformat your original document using this literal index instead of
+an automatically generated one and <quote>bingo</quote>!</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/make.single.year.ranges.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/make.single.year.ranges.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/make.single.year.ranges.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,22 @@
+<refentry id="make.single.year.ranges">
+<refmeta>
+<refentrytitle>make.single.year.ranges</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>make.single.year.ranges</refname>
+<refpurpose>Print single-year ranges (e.g., 1998-1999)</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='make.single.year.ranges.frag'><xsl:param name="make.single.year.ranges" select="0"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, year ranges that span a single year will be printed
+in range notation (1998-1999) instead of discrete notation
+(1998, 1999).</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/make.valid.html.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/make.valid.html.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/make.valid.html.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,30 @@
+<refentry id="make.valid.html">
+<refmeta>
+<refentrytitle>make.valid.html</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>make.valid.html</refname>
+<refpurpose>Attempt to make sure the HTML output is valid HTML</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='make.valid.html.frag'>
+<xsl:param name="make.valid.html" select="0"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If <parameter>make.valid.html</parameter> is true, the stylesheets take
+extra effort to ensure that the resulting HTML is valid. This may mean that some
+<sgmltag>para</sgmltag> tags are translated into HTML <sgmltag>div</sgmltag>s or
+that other substitutions occur.</para>
+
+<para>This parameter is different from <parameter>html.cleanup</parameter>
+because it changes the resulting markup; it does not use extension functions
+to manipulate result-tree-fragments and is therefore applicable to any
+XSLT processor.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/make.year.ranges.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/make.year.ranges.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/make.year.ranges.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,20 @@
+<refentry id="make.year.ranges">
+<refmeta>
+<refentrytitle>make.year.ranges</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>make.year.ranges</refname>
+<refpurpose>Collate copyright years into ranges?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='make.year.ranges.frag'><xsl:param name="make.year.ranges" select="0"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, copyright years will be collated into ranges.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/manifest.in.base.dir.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/manifest.in.base.dir.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/manifest.in.base.dir.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,24 @@
+<refentry id="manifest.in.base.dir">
+<refmeta>
+<refentrytitle>manifest.in.base.dir</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>manifest.in.base.dir</refname>
+<refpurpose>Should be manifest file written in $base.dir?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='manifest.in.base.dir.frag'>
+<xsl:param name="manifest.in.base.dir" select="0"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero manifest file and project files for HTML Help and
+Eclipse Help are written into <parameter>base.dir</parameter> instead
+of current directory.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/manifest.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/manifest.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/manifest.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="manifest">
+  <refmeta>
+    <refentrytitle>manifest</refentrytitle>
+    <refmiscinfo role="type">string</refmiscinfo>
+  </refmeta>
+  <refnamediv>
+    <refname>manifest</refname>
+    <refpurpose>Name of manifest file</refpurpose>
+  </refnamediv>
+
+  <refsynopsisdiv>
+    <src:fragment id='manifest.frag'
+      ><xsl:param name="manifest" select="'HTML.manifest'"/></src:fragment>
+  </refsynopsisdiv>
+
+  <refsect1><title>Description</title>
+
+    <para>The name of the file to which a manifest is written (if the
+      value of the <parameter>generate.manifest</parameter> parameter
+      is non-zero).</para>
+
+  </refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/manual.toc.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/manual.toc.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/manual.toc.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,24 @@
+<refentry id="manual.toc">
+<refmeta>
+<refentrytitle>manual.toc</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>manual.toc</refname>
+<refpurpose>An explicit TOC to be used for the TOC</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='manual.toc.frag'>
+<xsl:param name="manual.toc" select="''"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The <parameter>manual.toc</parameter> identifies an explicit TOC that
+will be used for building the printed TOC.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/marker.section.level.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/marker.section.level.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/marker.section.level.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,45 @@
+<refentry id="marker.section.level">
+<refmeta>
+<refentrytitle>marker.section.level</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>marker.section.level</refname>
+<refpurpose>Control depth of sections shown in running headers or footers</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='marker.section.level.frag'>
+<xsl:param name="marker.section.level" select="2"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The <parameter>marker.section.level</parameter> parameter
+controls the depth of section levels that may be displayed
+in running headers and footers.  For example, if the value
+is 2 (the default), then titles from <sgmltag>sect1</sgmltag> and 
+<sgmltag>sect2</sgmltag> or equivalent <sgmltag>section</sgmltag>
+elements are candidates for use in running headers and
+footers.
+</para>
+<para>Each candidate title is marked in the FO output with a
+<sgmltag>&lt;fo:marker marker-class-name="section.head.marker"&gt;</sgmltag>
+element.
+</para>
+<para>In order for such titles to appear in headers
+or footers, the <literal>header.content</literal>
+or <literal>footer.content</literal> template
+must be customized to retrieve the marker using
+an output element such as:
+</para>
+<programlisting>
+&lt;fo:retrieve-marker retrieve-class-name="section.head.marker"
+                       retrieve-position="first-including-carryover"
+                       retrieve-boundary="page-sequence"/&gt;
+</programlisting>
+
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/menuchoice.menu.separator.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/menuchoice.menu.separator.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/menuchoice.menu.separator.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,25 @@
+<refentry id="menuchoice.menu.separator">
+<refmeta>
+<refentrytitle>menuchoice.menu.separator</refentrytitle>
+<refmiscinfo role="type"></refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>menuchoice.menu.separator</refname>
+<refpurpose></refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='menuchoice.menu.separator.frag'>
+<xsl:param name="menuchoice.menu.separator" select="'-&gt;'"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Separator used to connect items of a <sgmltag>menuchoice</sgmltag> with
+<sgmltag>guimenuitem</sgmltag> or <sgmltag>guisubmenu</sgmltag>. Other elements
+are linked with <parameter>menuchoice.separator</parameter>.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/menuchoice.separator.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/menuchoice.separator.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/menuchoice.separator.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,25 @@
+<refentry id="menuchoice.separator">
+<refmeta>
+<refentrytitle>menuchoice.separator</refentrytitle>
+<refmiscinfo role="type"></refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>menuchoice.separator</refname>
+<refpurpose></refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='menuchoice.separator.frag'>
+<xsl:param name="menuchoice.separator" select="'+'"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Separator used to connect items of a <sgmltag>menuchoice</sgmltag> other
+than <sgmltag>guimenuitem</sgmltag> and <sgmltag>guisubmenu</sgmltag>. The latter
+elements are linked with <parameter>menuchoice.menu.separator</parameter>.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/monospace.font.family.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/monospace.font.family.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/monospace.font.family.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,24 @@
+<refentry id="monospace.font.family">
+<refmeta>
+<refentrytitle>monospace.font.family</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>monospace.font.family</refname>
+<refpurpose>The default font family for monospace environments</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='monospace.font.family.frag'>
+<xsl:param name="monospace.font.family" select="'monospace'"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The monospace font family is used for verbatim environments
+(program listings, screens, etc.).
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/monospace.properties.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/monospace.properties.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/monospace.properties.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,33 @@
+<refentry id="monospace.properties">
+<refmeta>
+<refentrytitle>monospace.properties</refentrytitle>
+<refmiscinfo role="type">attribute set</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>monospace.properties</refname>
+<refpurpose>Properties of monospaced content</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='monospace.properties.frag'>
+<xsl:attribute-set name="monospace.properties">
+  <xsl:attribute name="font-family">
+    <xsl:value-of select="$monospace.font.family"/>
+  </xsl:attribute>
+</xsl:attribute-set>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Specifies the font name for monospaced output. This property set
+used to set the font-size as well, but that doesn't work very well
+when different fonts are used (as they are in titles and paragraphs,
+for example).</para>
+
+<para>If you want to set the font-size in a customization layer, it's
+probably going to be more appropriate to set font-size-adjust, if your
+formatter supports it.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/monospace.verbatim.properties.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/monospace.verbatim.properties.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/monospace.verbatim.properties.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,17 @@
+<refentry id="monospace.verbatim.properties">
+<refnamediv>
+<refname>monospace.verbatim.properties</refname>
+<refpurpose>What font and size do you want for monospaced content?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='monospace.verbatim.properties.frag'>
+<xsl:attribute-set name="monospace.verbatim.properties" use-attribute-sets="verbatim.properties monospace.properties">
+  <xsl:attribute name="text-align">start</xsl:attribute>
+</xsl:attribute-set>
+</src:fragment>
+</refsynopsisdiv>
+<refsect1><title>Description</title>
+<para>Specify the font name and size you want for monospaced output</para>
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/navig.graphics.extension.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/navig.graphics.extension.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/navig.graphics.extension.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,21 @@
+<refentry id="navig.graphics.extension">
+<refmeta>
+<refentrytitle>navig.graphics.extension</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>navig.graphics.extension</refname>
+<refpurpose>Extension for navigational graphics</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='navig.graphics.extension.frag'><xsl:param name="navig.graphics.extension" select="'.gif'"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Sets the filename extension to use on navigational graphics used
+in the headers and footers of chunked HTML.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/navig.graphics.path.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/navig.graphics.path.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/navig.graphics.path.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="navig.graphics.path">
+<refmeta>
+<refentrytitle>navig.graphics.path</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>navig.graphics.path</refname>
+<refpurpose>Path to navigational graphics</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='navig.graphics.path.frag'><xsl:param name="navig.graphics.path">images/</xsl:param></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Sets the path, probably relative to the directory where the HTML
+files are created, to the navigational graphics used in the
+headers and footers of chunked HTML.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/navig.graphics.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/navig.graphics.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/navig.graphics.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,24 @@
+<refentry id="navig.graphics">
+<refmeta>
+<refentrytitle>navig.graphics</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>navig.graphics</refname>
+<refpurpose>Use graphics in navigational headers and footers?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='navig.graphics.frag'><xsl:param name="navig.graphics" select="0"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), the navigational headers and footers in chunked
+HTML are presented in an alternate style that uses
+graphical icons for Next, Previous, Up, and Home.
+Default graphics are provided in the distribution.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/navig.showtitles.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/navig.showtitles.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/navig.showtitles.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,27 @@
+<refentry id="navig.showtitles">
+<refmeta>
+<refentrytitle>navig.showtitles</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>navig.showtitles</refname>
+<refpurpose>Display titles in HTML headers and footers?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='navig.showtitles.frag'><xsl:param name="navig.showtitles">1</xsl:param></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero),
+the headers and footers of chunked HTML
+display the titles of the next and previous chunks,
+along with the words 'Next' and 'Previous' (or the
+equivalent graphical icons if navig.graphics is true).
+If false (zero), then only the words 'Next' and 'Previous'
+(or the icons) are displayed.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/nominal.image.depth.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/nominal.image.depth.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/nominal.image.depth.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,22 @@
+<refentry id="nominal.image.depth">
+<refmeta>
+<refentrytitle>nominal.image.depth</refentrytitle>
+<refmiscinfo role="type">length</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>nominal.image.depth</refname>
+<refpurpose>Nominal image depth</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='nominal.image.depth.frag'>
+<xsl:param name="nominal.image.depth" select="4 * $pixels.per.inch"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>See <parameter>nominal.image.width</parameter>.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/nominal.image.width.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/nominal.image.width.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/nominal.image.width.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,38 @@
+<refentry id="nominal.image.width">
+<refmeta>
+<refentrytitle>nominal.image.width</refentrytitle>
+<refmiscinfo role="type">length</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>nominal.image.width</refname>
+<refpurpose>The nominal image width</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='nominal.image.width.frag'>
+<xsl:param name="nominal.image.width" select="6 * $pixels.per.inch"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Graphic widths expressed as a percentage are problematic. In the
+following discussion, we speak of width and contentwidth, but
+the same issues apply to depth and contentdepth.</para>
+
+<para>A width of 50% means "half of the available space for the image."
+That's fine. But note that in HTML, this is a dynamic property and
+the image size will vary if the browser window is resized.</para>
+
+<para>A contentwidth of 50% means "half of the actual image width".
+But what does that mean if the stylesheets cannot assess the image's
+actual size? Treating this as a width of 50% is one possibility, but
+it produces behavior (dynamic scaling) that seems entirely out of
+character with the meaning.</para>
+
+<para>Instead, the stylesheets define a
+<parameter>nominal.image.width</parameter> and convert percentages to
+actual values based on that nominal size.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/nominal.table.width.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/nominal.table.width.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/nominal.table.width.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="nominal.table.width">
+<refmeta>
+<refentrytitle>nominal.table.width</refentrytitle>
+<refmiscinfo role="type">length</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>nominal.table.width</refname>
+<refpurpose>The (absolute) nominal width of tables</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='nominal.table.width.frag'><xsl:param name="nominal.table.width" select="'6in'"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>In order to convert CALS column widths into HTML column widths, it
+is sometimes necessary to have an absolute table width to use for conversion
+of mixed absolute and relative widths. This value must be an absolute
+length (not a percentag).</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/normal.para.spacing.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/normal.para.spacing.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/normal.para.spacing.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,17 @@
+<refentry id="normal.para.spacing">
+<refnamediv>
+<refname>normal.para.spacing</refname>
+<refpurpose>What space do you want between normal paragraphs</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='normal.para.spacing.frag'><xsl:attribute-set name="normal.para.spacing">
+  <xsl:attribute name="space-before.optimum">1em</xsl:attribute>
+  <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute>
+  <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute>
+</xsl:attribute-set></src:fragment>
+</refsynopsisdiv>
+<refsect1><title>Description</title>
+<para>Specify the spacing required between normal paragraphs</para>
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/olink.base.uri.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/olink.base.uri.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/olink.base.uri.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,17 @@
+<refentry id="olink.base.uri"> 
+<refmeta> 
+<refentrytitle>olink.base.uri</refentrytitle> 
+<refmiscinfo role="type">uri</refmiscinfo> 
+</refmeta> 
+<refnamediv> 
+<refname>olink.base.uri</refname> 
+<refpurpose>Base URI used in olink hrefs</refpurpose> 
+</refnamediv> 
+<refsynopsisdiv> <src:fragment id="olink.base.uri.frag">
+<xsl:param name="olink.base.uri" select="''"/> </src:fragment> 
+</refsynopsisdiv> 
+<refsect1> 
+<title>Description</title> 
+<para>When cross reference data is collected for resolving olinks, it may be necessary to prepend a base URI to each target's href. This parameter lets you set that base URI when cross reference data is collected. This feature is needed when you want to link to a document that is processed without chunking. The output filename for such a document is not known to the XSL stylesheet; the only target information consists of fragment identifiers such as <literal>#idref</literal>. To enable the resolution of olinks between documents, you should pass the name of the HTML output file as the value of this parameter. Then the hrefs recorded in the cross reference data collection look like <literal>outfile.html#idref</literal>, which can  be reached as links from other documents.</para> 
+</refsect1> 
+</refentry> 

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/olink.doctitle.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/olink.doctitle.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/olink.doctitle.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,21 @@
+<refentry id="olink.doctitle"> 
+<refmeta> 
+<refentrytitle>olink.doctitle</refentrytitle> 
+<refmiscinfo role="type">boolean</refmiscinfo> 
+</refmeta> 
+<refnamediv> 
+<refname>olink.doctitle</refname> 
+<refpurpose>show the document title for external olinks?</refpurpose>
+
+</refnamediv> 
+<refsynopsisdiv> <src:fragment id="olink.doctitle.frag">
+<xsl:param name="olink.doctitle" select="0"/> </src:fragment> 
+</refsynopsisdiv> 
+<refsect1> 
+<title>Description</title> 
+<para>When olinks between documents are resolved for print output, the generated text may not make it clear that the reference is to another document. It is possible for the stylesheets to append the other document's title to external olinks. For this to happen, two parameters must be set. The <parameter>olink.doctitle</parameter> parameter should be set to nonzero to enable this
+feature. And you should set the <parameter>current.docid</parameter> parameter to the document id for the  document currently
+being processed for output.  If an olink's  <literal>targetdoc</literal>  id differs from the <literal>current.docid</literal>, then the stylesheet can append the target document's
+title to the generated olink text. </para> 
+</refsect1> 
+</refentry> 

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/olink.fragid.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/olink.fragid.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/olink.fragid.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,20 @@
+<refentry id="olink.fragid">
+<refmeta>
+<refentrytitle>olink.fragid</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>olink.fragid</refname>
+<refpurpose>Names the fragment identifier portion of an OLink resolver query</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='olink.fragid.frag'><xsl:param name="olink.fragid" select="'fragid='"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/olink.outline.ext.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/olink.outline.ext.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/olink.outline.ext.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,20 @@
+<refentry id="olink.outline.ext">
+<refmeta>
+<refentrytitle>olink.outline.ext</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>olink.outline.ext</refname>
+<refpurpose>The extension of OLink outline files</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='olink.outline.ext.frag'><xsl:param name="olink.outline.ext" select="'.olink'"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/olink.pubid.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/olink.pubid.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/olink.pubid.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,20 @@
+<refentry id="olink.pubid">
+<refmeta>
+<refentrytitle>olink.pubid</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>olink.pubid</refname>
+<refpurpose>Names the public identifier portion of an OLink resolver query</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='olink.pubid.frag'><xsl:param name="olink.pubid" select="'pubid='"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/olink.resolver.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/olink.resolver.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/olink.resolver.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,20 @@
+<refentry id="olink.resolver">
+<refmeta>
+<refentrytitle>olink.resolver</refentrytitle>
+<refmiscinfo role="type"></refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>olink.resolver</refname>
+<refpurpose>The root name of the OLink resolver (usually a script)</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='olink.resolver.frag'><xsl:param name="olink.resolver" select="'/cgi-bin/olink'"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/olink.sysid.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/olink.sysid.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/olink.sysid.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,20 @@
+<refentry id="olink.sysid">
+<refmeta>
+<refentrytitle>olink.sysid</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>olink.sysid</refname>
+<refpurpose>Names the system identifier portion of an OLink resolver query</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='olink.sysid.frag'><xsl:param name="olink.sysid" select="'sysid='"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/page.height.portrait.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/page.height.portrait.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/page.height.portrait.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,64 @@
+<refentry id="page.height.portrait">
+<refmeta>
+<refentrytitle>page.height.portrait</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>page.height.portrait</refname>
+<refpurpose>Specify the physical size of the long edge of the page</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='page.height.portrait.frag'><xsl:param name="page.height.portrait">
+  <xsl:choose>
+    <xsl:when test="$paper.type = 'A4landscape'">210mm</xsl:when>
+    <xsl:when test="$paper.type = 'USletter'">11in</xsl:when>
+    <xsl:when test="$paper.type = 'USlandscape'">8.5in</xsl:when>
+    <xsl:when test="$paper.type = '4A0'">2378mm</xsl:when>
+    <xsl:when test="$paper.type = '2A0'">1682mm</xsl:when>
+    <xsl:when test="$paper.type = 'A0'">1189mm</xsl:when>
+    <xsl:when test="$paper.type = 'A1'">841mm</xsl:when>
+    <xsl:when test="$paper.type = 'A2'">594mm</xsl:when>
+    <xsl:when test="$paper.type = 'A3'">420mm</xsl:when>
+    <xsl:when test="$paper.type = 'A4'">297mm</xsl:when>
+    <xsl:when test="$paper.type = 'A5'">210mm</xsl:when>
+    <xsl:when test="$paper.type = 'A6'">148mm</xsl:when>
+    <xsl:when test="$paper.type = 'A7'">105mm</xsl:when>
+    <xsl:when test="$paper.type = 'A8'">74mm</xsl:when>
+    <xsl:when test="$paper.type = 'A9'">52mm</xsl:when>
+    <xsl:when test="$paper.type = 'A10'">37mm</xsl:when>
+    <xsl:when test="$paper.type = 'B0'">1414mm</xsl:when>
+    <xsl:when test="$paper.type = 'B1'">1000mm</xsl:when>
+    <xsl:when test="$paper.type = 'B2'">707mm</xsl:when>
+    <xsl:when test="$paper.type = 'B3'">500mm</xsl:when>
+    <xsl:when test="$paper.type = 'B4'">353mm</xsl:when>
+    <xsl:when test="$paper.type = 'B5'">250mm</xsl:when>
+    <xsl:when test="$paper.type = 'B6'">176mm</xsl:when>
+    <xsl:when test="$paper.type = 'B7'">125mm</xsl:when>
+    <xsl:when test="$paper.type = 'B8'">88mm</xsl:when>
+    <xsl:when test="$paper.type = 'B9'">62mm</xsl:when>
+    <xsl:when test="$paper.type = 'B10'">44mm</xsl:when>
+    <xsl:when test="$paper.type = 'C0'">1297mm</xsl:when>
+    <xsl:when test="$paper.type = 'C1'">917mm</xsl:when>
+    <xsl:when test="$paper.type = 'C2'">648mm</xsl:when>
+    <xsl:when test="$paper.type = 'C3'">458mm</xsl:when>
+    <xsl:when test="$paper.type = 'C4'">324mm</xsl:when>
+    <xsl:when test="$paper.type = 'C5'">229mm</xsl:when>
+    <xsl:when test="$paper.type = 'C6'">162mm</xsl:when>
+    <xsl:when test="$paper.type = 'C7'">114mm</xsl:when>
+    <xsl:when test="$paper.type = 'C8'">81mm</xsl:when>
+    <xsl:when test="$paper.type = 'C9'">57mm</xsl:when>
+    <xsl:when test="$paper.type = 'C10'">40mm</xsl:when>
+    <xsl:otherwise>11in</xsl:otherwise>
+  </xsl:choose>
+</xsl:param></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The portrait page height is the length of the long
+edge of the physical page.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/page.height.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/page.height.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/page.height.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,32 @@
+<refentry id="page.height">
+<refmeta>
+<refentrytitle>page.height</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>page.height</refname>
+<refpurpose>The height of the physical page</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='page.height.frag'><xsl:param name="page.height">
+  <xsl:choose>
+    <xsl:when test="$page.orientation = 'portrait'">
+      <xsl:value-of select="$page.height.portrait"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:value-of select="$page.width.portrait"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:param></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The page height is generally calculated from the
+<literal>paper.type</literal> and
+<literal>page.orientation</literal>.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/page.margin.bottom.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/page.margin.bottom.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/page.margin.bottom.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,24 @@
+<refentry id="page.margin.bottom">
+<refmeta>
+<refentrytitle>page.margin.bottom</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>page.margin.bottom</refname>
+<refpurpose>The bottom margin of the page</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='page.margin.bottom.frag'>
+<xsl:param name="page.margin.bottom" select="'0.5in'"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The bottom page margin is the distance from the bottom of the region-after
+to the physical bottom of the page.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/page.margin.inner.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/page.margin.inner.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/page.margin.inner.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,30 @@
+<refentry id="page.margin.inner">
+<refmeta>
+<refentrytitle>page.margin.inner</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>page.margin.inner</refname>
+<refpurpose>The inner page margin</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='page.margin.inner.frag'><xsl:param name="page.margin.inner">
+  <xsl:choose>
+    <xsl:when test="$double.sided != 0">1.25in</xsl:when>
+    <xsl:otherwise>1in</xsl:otherwise>
+  </xsl:choose>
+</xsl:param></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The inner page margin is the distance from binding edge of the
+page to the first column of text. In the left-to-right, top-to-bottom writing
+direction, this is the left margin of recto pages.</para>
+<para>The inner and outer margins are usually the same unless the output
+is double-sided.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/page.margin.outer.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/page.margin.outer.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/page.margin.outer.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,30 @@
+<refentry id="page.margin.outer">
+<refmeta>
+<refentrytitle>page.margin.outer</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>page.margin.outer</refname>
+<refpurpose>The outer page margin</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='page.margin.outer.frag'><xsl:param name="page.margin.outer">
+  <xsl:choose>
+    <xsl:when test="$double.sided != 0">0.75in</xsl:when>
+    <xsl:otherwise>1in</xsl:otherwise>
+  </xsl:choose>
+</xsl:param></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The outer page margin is the distance from non-binding edge of the
+page to the last column of text. In the left-to-right, top-to-bottom writing
+direction, this is the right margin of recto pages.</para>
+<para>The inner and outer margins are usually the same unless the output
+is double-sided.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/page.margin.top.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/page.margin.top.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/page.margin.top.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="page.margin.top">
+<refmeta>
+<refentrytitle>page.margin.top</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>page.margin.top</refname>
+<refpurpose>The top margin of the page</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='page.margin.top.frag'>
+<xsl:param name="page.margin.top" select="'0.5in'"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The top page margin is the distance from the physical top of the
+page to the top of the region-before.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/page.orientation.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/page.orientation.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/page.orientation.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,22 @@
+<refentry id="page.orientation">
+<refmeta>
+<refentrytitle>page.orientation</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>page.orientation</refname>
+<refpurpose>Select the page orientation</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='page.orientation.frag'><xsl:param name="page.orientation" select="'portrait'"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>In portrait orientation, the short edge is horizontal; in
+landscape orientation, it is vertical.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/page.width.portrait.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/page.width.portrait.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/page.width.portrait.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,62 @@
+<refentry id="page.width.portrait">
+<refmeta>
+<refentrytitle>page.width.portrait</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>page.width.portrait</refname>
+<refpurpose>Specify the physical size of the short edge of the page</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='page.width.portrait.frag'><xsl:param name="page.width.portrait">
+  <xsl:choose>
+    <xsl:when test="$paper.type = 'USletter'">8.5in</xsl:when>
+    <xsl:when test="$paper.type = '4A0'">1682mm</xsl:when>
+    <xsl:when test="$paper.type = '2A0'">1189mm</xsl:when>
+    <xsl:when test="$paper.type = 'A0'">841mm</xsl:when>
+    <xsl:when test="$paper.type = 'A1'">594mm</xsl:when>
+    <xsl:when test="$paper.type = 'A2'">420mm</xsl:when>
+    <xsl:when test="$paper.type = 'A3'">297mm</xsl:when>
+    <xsl:when test="$paper.type = 'A4'">210mm</xsl:when>
+    <xsl:when test="$paper.type = 'A5'">148mm</xsl:when>
+    <xsl:when test="$paper.type = 'A6'">105mm</xsl:when>
+    <xsl:when test="$paper.type = 'A7'">74mm</xsl:when>
+    <xsl:when test="$paper.type = 'A8'">52mm</xsl:when>
+    <xsl:when test="$paper.type = 'A9'">37mm</xsl:when>
+    <xsl:when test="$paper.type = 'A10'">26mm</xsl:when>
+    <xsl:when test="$paper.type = 'B0'">1000mm</xsl:when>
+    <xsl:when test="$paper.type = 'B1'">707mm</xsl:when>
+    <xsl:when test="$paper.type = 'B2'">500mm</xsl:when>
+    <xsl:when test="$paper.type = 'B3'">353mm</xsl:when>
+    <xsl:when test="$paper.type = 'B4'">250mm</xsl:when>
+    <xsl:when test="$paper.type = 'B5'">176mm</xsl:when>
+    <xsl:when test="$paper.type = 'B6'">125mm</xsl:when>
+    <xsl:when test="$paper.type = 'B7'">88mm</xsl:when>
+    <xsl:when test="$paper.type = 'B8'">62mm</xsl:when>
+    <xsl:when test="$paper.type = 'B9'">44mm</xsl:when>
+    <xsl:when test="$paper.type = 'B10'">31mm</xsl:when>
+    <xsl:when test="$paper.type = 'C0'">917mm</xsl:when>
+    <xsl:when test="$paper.type = 'C1'">648mm</xsl:when>
+    <xsl:when test="$paper.type = 'C2'">458mm</xsl:when>
+    <xsl:when test="$paper.type = 'C3'">324mm</xsl:when>
+    <xsl:when test="$paper.type = 'C4'">229mm</xsl:when>
+    <xsl:when test="$paper.type = 'C5'">162mm</xsl:when>
+    <xsl:when test="$paper.type = 'C6'">114mm</xsl:when>
+    <xsl:when test="$paper.type = 'C7'">81mm</xsl:when>
+    <xsl:when test="$paper.type = 'C8'">57mm</xsl:when>
+    <xsl:when test="$paper.type = 'C9'">40mm</xsl:when>
+    <xsl:when test="$paper.type = 'C10'">28mm</xsl:when>
+    <xsl:otherwise>8.5in</xsl:otherwise>
+  </xsl:choose>
+</xsl:param></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The portrait page width is the length of the short
+edge of the physical page.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/page.width.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/page.width.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/page.width.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,31 @@
+<refentry id="page.width">
+<refmeta>
+<refentrytitle>page.width</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>page.width</refname>
+<refpurpose>The width of the physical page</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='page.width.frag'><xsl:param name="page.width">
+  <xsl:choose>
+    <xsl:when test="$page.orientation = 'portrait'">
+      <xsl:value-of select="$page.width.portrait"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:value-of select="$page.height.portrait"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:param></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The page width is generally calculated from the
+<literal>paper.type</literal> and <literal>page.orientation</literal>.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/paper.type.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/paper.type.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/paper.type.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="paper.type">
+<refmeta>
+<refentrytitle>paper.type</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>paper.type</refname>
+<refpurpose>Select the paper type</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='paper.type.frag'><xsl:param name="paper.type" select="'USletter'"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The paper type is a convenient way to specify the paper size.
+The list of known paper sizes includes USletter and most of the A,
+B, and C sizes. See <literal>page.width.portrait</literal>, for example.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/para.propagates.style.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/para.propagates.style.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/para.propagates.style.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,24 @@
+<refentry id="para.propagates.style">
+<refmeta>
+<refentrytitle>para.propagates.style</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>para.propagates.style</refname>
+<refpurpose>Pass para role attribute through to HTML?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='para.propagates.style.frag'>
+<xsl:param name="para.propagates.style" select="1"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true, the role attribute of <sgmltag>para</sgmltag> elements
+will be passed through to the HTML as a class attribute on the
+<sgmltag>p</sgmltag> generated for the paragraph.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/part.autolabel.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/part.autolabel.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/part.autolabel.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,21 @@
+<refentry id="part.autolabel">
+<refmeta>
+<refentrytitle>part.autolabel</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>part.autolabel</refname>
+<refpurpose>Are parts and references enumerated?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='part.autolabel.frag'><xsl:param name="part.autolabel" select="1"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), unlabeled parts and references will be enumerated.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/passivetex.extensions.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/passivetex.extensions.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/passivetex.extensions.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,24 @@
+<refentry id="passivetex.extensions">
+<refmeta>
+<refentrytitle>passivetex.extensions</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>passivetex.extensions</refname>
+<refpurpose>Enable PassiveTeX extensions?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='passivetex.extensions.frag'><xsl:param name="passivetex.extensions" select="0"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero,
+<ulink url="http://users.ox.ac.uk/~rahtz/passivetex/">PassiveTeX</ulink>
+extensions will be used. At present, this consists of PDF bookmarks
+and sorted index terms.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/phrase.propagates.style.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/phrase.propagates.style.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/phrase.propagates.style.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,22 @@
+<refentry id="phrase.propagates.style">
+<refmeta>
+<refentrytitle>phrase.propagates.style</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>phrase.propagates.style</refname>
+<refpurpose>Pass phrase role attribute through to HTML?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='phrase.propagates.style.frag'><xsl:param name="phrase.propagates.style" select="1"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true, the role attribute of <sgmltag>phrase</sgmltag> elements
+will be passed through to the HTML as a class attribute on a
+<sgmltag>span</sgmltag> that surrounds the phrase.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/pixels.per.inch.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/pixels.per.inch.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/pixels.per.inch.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,26 @@
+<refentry id="pixels.per.inch">
+<refmeta>
+<refentrytitle>pixels.per.inch</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>pixels.per.inch</refname>
+<refpurpose>How many pixels are there per inch?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='pixels.per.inch.frag'>
+<xsl:param name="pixels.per.inch" select="90"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>When lengths are converted to pixels, this value is used to
+determine the size of a pixel. The default value is taken from the
+<ulink url="http://www.w3.org/TR/xsl/slice5.html#pixels">XSL
+Recommendation</ulink>.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/points.per.em.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/points.per.em.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/points.per.em.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,22 @@
+<refentry id="points.per.em">
+<refmeta>
+<refentrytitle>points.per.em</refentrytitle>
+<refmiscinfo role="type">number</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>points.per.em</refname>
+<refpurpose>Specify the nominal size of an em-space in points</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='points.per.em.frag'>
+<xsl:param name="points.per.em" select="10"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/preface.autolabel.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/preface.autolabel.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/preface.autolabel.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,21 @@
+<refentry id="preface.autolabel">
+<refmeta>
+<refentrytitle>preface.autolabel</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>preface.autolabel</refname>
+<refpurpose>Are prefaces enumerated?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='preface.autolabel.frag'><xsl:param name="preface.autolabel" select="0"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), unlabeled prefaces will be enumerated.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/preferred.mediaobject.role.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/preferred.mediaobject.role.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/preferred.mediaobject.role.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,33 @@
+<refentry id="preferred.mediaobject.role">
+<refmeta>
+<refentrytitle>preferred.mediaobject.role</refentrytitle>
+</refmeta>
+<refnamediv>
+<refname>preferred.mediaobject.role</refname>
+<refpurpose>Select which mediaobject to use based on
+this value of an object's <sgmltag class="attribute">role</sgmltag> attribute.
+</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='preferred.mediaobject.role.frag'>
+<xsl:param name="preferred.mediaobject.role"></xsl:param>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>A mediaobject may contain several objects such as imageobjects.
+If the parameter <parameter>use.role.for.mediaobject</parameter>
+is non-zero, then the <sgmltag class="attribute">role</sgmltag> attribute on
+<sgmltag>imageobject</sgmltag>s and other objects within a <sgmltag>mediaobject</sgmltag> container will be used to select which object will be
+used.  If one of the objects has a role value that matches the
+preferred.mediaobject.role parameter, then it has first
+priority for selection.  If more than one has such a
+role value, the first one is used.
+</para>
+<para>
+See the <parameter>use.role.for.mediaobject</parameter> parameter
+for the sequence of selection.</para>
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/procedure.properties.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/procedure.properties.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/procedure.properties.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,18 @@
+<refentry id="procedure.properties">
+<refnamediv>
+<refname>procedure.properties</refname>
+<refpurpose>Properties associated with a procedure</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='procedure.properties.frag'>
+<xsl:attribute-set name="procedure.properties" use-attribute-sets="formal.object.properties"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The styling for procedures.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/process.empty.source.toc.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/process.empty.source.toc.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/process.empty.source.toc.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,21 @@
+<refentry id="process.empty.source.toc">
+<refmeta>
+<refentrytitle>process.empty.source.toc</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>process.empty.source.toc</refname>
+<refpurpose>FIXME:</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='process.empty.source.toc.frag'><xsl:param name="process.empty.source.toc" select="0"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/process.source.toc.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/process.source.toc.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/process.source.toc.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,21 @@
+<refentry id="process.source.toc">
+<refmeta>
+<refentrytitle>process.source.toc</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>process.source.toc</refname>
+<refpurpose>FIXME:</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='process.source.toc.frag'><xsl:param name="process.source.toc" select="0"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/profile.arch.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/profile.arch.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/profile.arch.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,33 @@
+<refentry id="profile.arch">
+<refmeta>
+<refentrytitle>profile.arch</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>profile.arch</refname>
+<refpurpose>Target profile for <sgmltag class="attribute">arch</sgmltag>
+attribute</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='profile.arch.frag'>
+<xsl:param name="profile.arch" select="''"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Value of this parameter specifies profiles which should be
+included in the output. You can specify multiple profiles by
+separating them by semicolon. You can change separator character by
+<link linkend="profile.separator"><parameter>profile.separator</parameter></link>
+parameter.</para>
+
+<para>This parameter has effect only when you are using profiling
+stylesheets (<filename>profile-docbook.xsl</filename>,
+<filename>profile-chunk.xsl</filename>, &#x2026;) instead of normal
+ones (<filename>docbook.xsl</filename>,
+<filename>chunk.xsl</filename>, &#x2026;).</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/profile.attribute.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/profile.attribute.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/profile.attribute.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,29 @@
+<refentry id="profile.attribute">
+<refmeta>
+<refentrytitle>profile.attribute</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>profile.attribute</refname>
+<refpurpose>Name of user-specified profiling attribute</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='profile.attribute.frag'>
+<xsl:param name="profile.attribute" select="''"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This parameter is used in conjuction with <link
+linkend="profile.value"><parameter>profile.value</parameter></link>.</para>
+
+<para>This parameter has effect only when you are using profiling
+stylesheets (<filename>profile-docbook.xsl</filename>,
+<filename>profile-chunk.xsl</filename>, &#x2026;) instead of normal
+ones (<filename>docbook.xsl</filename>,
+<filename>chunk.xsl</filename>, &#x2026;).</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/profile.condition.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/profile.condition.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/profile.condition.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,33 @@
+<refentry id="profile.condition">
+<refmeta>
+<refentrytitle>profile.condition</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>profile.condition</refname>
+<refpurpose>Target profile for <sgmltag class="attribute">condition</sgmltag>
+attribute</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='profile.condition.frag'>
+<xsl:param name="profile.condition" select="''"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Value of this parameter specifies profiles which should be
+included in the output. You can specify multiple profiles by
+separating them by semicolon. You can change separator character by
+<link linkend="profile.separator"><parameter>profile.separator</parameter></link>
+parameter.</para>
+
+<para>This parameter has effect only when you are using profiling
+stylesheets (<filename>profile-docbook.xsl</filename>,
+<filename>profile-chunk.xsl</filename>, &#x2026;) instead of normal
+ones (<filename>docbook.xsl</filename>,
+<filename>chunk.xsl</filename>, &#x2026;).</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/profile.conformance.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/profile.conformance.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/profile.conformance.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,33 @@
+<refentry id="profile.conformance">
+<refmeta>
+<refentrytitle>profile.conformance</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>profile.conformance</refname>
+<refpurpose>Target profile for <sgmltag class="attribute">conformance</sgmltag>
+attribute</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='profile.conformance.frag'>
+<xsl:param name="profile.conformance" select="''"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Value of this parameter specifies profiles which should be
+included in the output. You can specify multiple profiles by
+separating them by semicolon. You can change separator character by
+<link linkend="profile.separator"><parameter>profile.separator</parameter></link>
+parameter.</para>
+
+<para>This parameter has effect only when you are using profiling
+stylesheets (<filename>profile-docbook.xsl</filename>,
+<filename>profile-chunk.xsl</filename>, &#x2026;) instead of normal
+ones (<filename>docbook.xsl</filename>,
+<filename>chunk.xsl</filename>, &#x2026;).</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/profile.lang.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/profile.lang.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/profile.lang.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,33 @@
+<refentry id="profile.lang">
+<refmeta>
+<refentrytitle>profile.lang</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>profile.lang</refname>
+<refpurpose>Target profile for <sgmltag class="attribute">lang</sgmltag>
+attribute</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='profile.lang.frag'>
+<xsl:param name="profile.lang" select="''"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Value of this parameter specifies profiles which should be
+included in the output. You can specify multiple profiles by
+separating them by semicolon. You can change separator character by
+<link linkend="profile.separator"><parameter>profile.separator</parameter></link>
+parameter.</para>
+
+<para>This parameter has effect only when you are using profiling
+stylesheets (<filename>profile-docbook.xsl</filename>,
+<filename>profile-chunk.xsl</filename>, &#x2026;) instead of normal
+ones (<filename>docbook.xsl</filename>,
+<filename>chunk.xsl</filename>, &#x2026;).</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/profile.os.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/profile.os.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/profile.os.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,33 @@
+<refentry id="profile.os">
+<refmeta>
+<refentrytitle>profile.os</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>profile.os</refname>
+<refpurpose>Target profile for <sgmltag class="attribute">os</sgmltag>
+attribute</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='profile.os.frag'>
+<xsl:param name="profile.os" select="''"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Value of this parameter specifies profiles which should be
+included in the output. You can specify multiple profiles by
+separating them by semicolon. You can change separator character by
+<link linkend="profile.separator"><parameter>profile.separator</parameter></link>
+parameter.</para>
+
+<para>This parameter has effect only when you are using profiling
+stylesheets (<filename>profile-docbook.xsl</filename>,
+<filename>profile-chunk.xsl</filename>, &#x2026;) instead of normal
+ones (<filename>docbook.xsl</filename>,
+<filename>chunk.xsl</filename>, &#x2026;).</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/profile.revision.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/profile.revision.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/profile.revision.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,33 @@
+<refentry id="profile.revision">
+<refmeta>
+<refentrytitle>profile.revision</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>profile.revision</refname>
+<refpurpose>Target profile for <sgmltag class="attribute">revision</sgmltag>
+attribute</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='profile.revision.frag'>
+<xsl:param name="profile.revision" select="''"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Value of this parameter specifies profiles which should be
+included in the output. You can specify multiple profiles by
+separating them by semicolon. You can change separator character by
+<link linkend="profile.separator"><parameter>profile.separator</parameter></link>
+parameter.</para>
+
+<para>This parameter has effect only when you are using profiling
+stylesheets (<filename>profile-docbook.xsl</filename>,
+<filename>profile-chunk.xsl</filename>, &#x2026;) instead of normal
+ones (<filename>docbook.xsl</filename>,
+<filename>chunk.xsl</filename>, &#x2026;).</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/profile.revisionflag.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/profile.revisionflag.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/profile.revisionflag.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,33 @@
+<refentry id="profile.revisionflag">
+<refmeta>
+<refentrytitle>profile.revisionflag</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>profile.revisionflag</refname>
+<refpurpose>Target profile for <sgmltag class="attribute">revisionflag</sgmltag>
+attribute</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='profile.revisionflag.frag'>
+<xsl:param name="profile.revisionflag" select="''"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Value of this parameter specifies profiles which should be
+included in the output. You can specify multiple profiles by
+separating them by semicolon. You can change separator character by
+<link linkend="profile.separator"><parameter>profile.separator</parameter></link>
+parameter.</para>
+
+<para>This parameter has effect only when you are using profiling
+stylesheets (<filename>profile-docbook.xsl</filename>,
+<filename>profile-chunk.xsl</filename>, &#x2026;) instead of normal
+ones (<filename>docbook.xsl</filename>,
+<filename>chunk.xsl</filename>, &#x2026;).</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/profile.role.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/profile.role.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/profile.role.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,54 @@
+<refentry id="profile.role">
+<refmeta>
+<refentrytitle>profile.role</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>profile.role</refname>
+<refpurpose>Target profile for <sgmltag class="attribute">role</sgmltag>
+attribute</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='profile.role.frag'>
+<xsl:param name="profile.role" select="''"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Value of this parameter specifies profiles which should be
+included in the output. You can specify multiple profiles by
+separating them by semicolon. You can change separator character by
+<link linkend="profile.separator"><parameter>profile.separator</parameter></link>
+parameter.</para>
+
+<para>This parameter has effect only when you are using profiling
+stylesheets (<filename>profile-docbook.xsl</filename>,
+<filename>profile-chunk.xsl</filename>, &#x2026;) instead of normal
+ones (<filename>docbook.xsl</filename>,
+<filename>chunk.xsl</filename>, &#x2026;).</para>
+
+<warning>
+<para>Note that <sgmltag class="attribute">role</sgmltag> is often
+used for other purposes than profiling. For example it is commonly
+used to get emphasize in bold font:</para>
+
+<programlisting><![CDATA[<emphasis role="bold">very important</emphasis>]]></programlisting>
+
+<para>If you are using <sgmltag class="attribute">role</sgmltag> for
+these purposes do not forget to add values like <literal>bold</literal> to
+value of this parameter. If you forgot you will get document with
+small pieces missing which are very hard to track.</para>
+
+<para>For this reason it is not recommended to use <sgmltag
+class="attribute">role</sgmltag> attribute for profiling. You should
+rather use profiling specific attributes like <sgmltag
+class="attribute">userlevel</sgmltag>, <sgmltag
+class="attribute">os</sgmltag>, <sgmltag
+class="attribute">arch</sgmltag>, <sgmltag
+class="attribute">condition</sgmltag>, etc.</para>
+</warning>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/profile.security.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/profile.security.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/profile.security.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,33 @@
+<refentry id="profile.security">
+<refmeta>
+<refentrytitle>profile.security</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>profile.security</refname>
+<refpurpose>Target profile for <sgmltag class="attribute">security</sgmltag>
+attribute</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='profile.security.frag'>
+<xsl:param name="profile.security" select="''"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Value of this parameter specifies profiles which should be
+included in the output. You can specify multiple profiles by
+separating them by semicolon. You can change separator character by
+<link linkend="profile.separator"><parameter>profile.separator</parameter></link>
+parameter.</para>
+
+<para>This parameter has effect only when you are using profiling
+stylesheets (<filename>profile-docbook.xsl</filename>,
+<filename>profile-chunk.xsl</filename>, &#x2026;) instead of normal
+ones (<filename>docbook.xsl</filename>,
+<filename>chunk.xsl</filename>, &#x2026;).</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/profile.separator.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/profile.separator.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/profile.separator.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,22 @@
+<refentry id="profile.separator">
+<refmeta>
+<refentrytitle>profile.separator</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>profile.separator</refname>
+<refpurpose>Separator character for compound profile values</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='profile.separator.frag'>
+<xsl:param name="profile.separator" select="';'"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Separator character for compound profile values.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/profile.userlevel.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/profile.userlevel.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/profile.userlevel.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,33 @@
+<refentry id="profile.userlevel">
+<refmeta>
+<refentrytitle>profile.userlevel</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>profile.userlevel</refname>
+<refpurpose>Target profile for <sgmltag class="attribute">userlevel</sgmltag>
+attribute</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='profile.userlevel.frag'>
+<xsl:param name="profile.userlevel" select="''"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Value of this parameter specifies profiles which should be
+included in the output. You can specify multiple profiles by
+separating them by semicolon. You can change separator character by
+<link linkend="profile.separator"><parameter>profile.separator</parameter></link>
+parameter.</para>
+
+<para>This parameter has effect only when you are using profiling
+stylesheets (<filename>profile-docbook.xsl</filename>,
+<filename>profile-chunk.xsl</filename>, &#x2026;) instead of normal
+ones (<filename>docbook.xsl</filename>,
+<filename>chunk.xsl</filename>, &#x2026;).</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/profile.value.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/profile.value.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/profile.value.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,36 @@
+<refentry id="profile.value">
+<refmeta>
+<refentrytitle>profile.value</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>profile.value</refname>
+<refpurpose>Target profile for user-specified attribute</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='profile.value.frag'>
+<xsl:param name="profile.value" select="''"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>When you are using this parameter you must also specify name of
+profiling attribute with parameter <link
+linkend="profile.attribute"><parameter>profile.attribute</parameter></link>.</para>
+
+<para>Value of this parameter specifies profiles which should be
+included in the output. You can specify multiple profiles by
+separating them by semicolon. You can change separator character by
+<link linkend="profile.separator"><parameter>profile.separator</parameter></link>
+parameter.</para>
+
+<para>This parameter has effect only when you are using profiling
+stylesheets (<filename>profile-docbook.xsl</filename>,
+<filename>profile-chunk.xsl</filename>, &#x2026;) instead of normal
+ones (<filename>docbook.xsl</filename>,
+<filename>chunk.xsl</filename>, &#x2026;).</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/profile.vendor.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/profile.vendor.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/profile.vendor.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,33 @@
+<refentry id="profile.vendor">
+<refmeta>
+<refentrytitle>profile.vendor</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>profile.vendor</refname>
+<refpurpose>Target profile for <sgmltag class="attribute">vendor</sgmltag>
+attribute</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='profile.vendor.frag'>
+<xsl:param name="profile.vendor" select="''"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Value of this parameter specifies profiles which should be
+included in the output. You can specify multiple profiles by
+separating them by semicolon. You can change separator character by
+<link linkend="profile.separator"><parameter>profile.separator</parameter></link>
+parameter.</para>
+
+<para>This parameter has effect only when you are using profiling
+stylesheets (<filename>profile-docbook.xsl</filename>,
+<filename>profile-chunk.xsl</filename>, &#x2026;) instead of normal
+ones (<filename>docbook.xsl</filename>,
+<filename>chunk.xsl</filename>, &#x2026;).</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/punct.honorific.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/punct.honorific.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/punct.honorific.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="punct.honorific">
+<refmeta>
+<refentrytitle>punct.honorific</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>punct.honorific</refname>
+<refpurpose>Punctuation after an honorific in a personal name.</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='punct.honorific.frag'>
+<xsl:param name="punct.honorific" select="'.'"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This parameter specifies the punctuation that should be added after an
+honorific in a personal name.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/qanda.defaultlabel.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/qanda.defaultlabel.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/qanda.defaultlabel.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="qanda.defaultlabel">
+<refmeta>
+<refentrytitle>qanda.defaultlabel</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>qanda.defaultlabel</refname>
+<refpurpose>Sets the default for defaultlabel on QandASet.</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='qanda.defaultlabel.frag'><xsl:param name="qanda.defaultlabel">number</xsl:param></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If no defaultlabel attribute is specified on a QandASet, this
+value is used. It must be one of the legal values for the defaultlabel
+attribute.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/qanda.inherit.numeration.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/qanda.inherit.numeration.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/qanda.inherit.numeration.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,22 @@
+<refentry id="qanda.inherit.numeration">
+<refmeta>
+<refentrytitle>qanda.inherit.numeration</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>qanda.inherit.numeration</refname>
+<refpurpose>Does enumeration of QandASet components inherit the numeration of parent elements?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='qanda.inherit.numeration.frag'><xsl:param name="qanda.inherit.numeration" select="1"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), numbered QandADiv elements and Questions and Answers inherit
+the numeration of the ancestors of the QandASet.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/qanda.title.level1.properties.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/qanda.title.level1.properties.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/qanda.title.level1.properties.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,27 @@
+<refentry id="qanda.title.level1.properties">
+<refmeta>
+<refentrytitle>qanda.title.level1.properties</refentrytitle>
+<refmiscinfo role="type">attribute set</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>qanda.title.level1.properties</refname>
+<refpurpose>Properties for level-1 qanda set titles</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='qanda.title.level1.properties.frag'>
+<xsl:attribute-set name="qanda.title.level1.properties">
+  <xsl:attribute name="font-size">
+    <xsl:value-of select="$body.font.master * 2.0736"/>
+    <xsl:text>pt</xsl:text>
+  </xsl:attribute>
+</xsl:attribute-set>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The properties of level-1 qanda set titles.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/qanda.title.level2.properties.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/qanda.title.level2.properties.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/qanda.title.level2.properties.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,27 @@
+<refentry id="qanda.title.level2.properties">
+<refmeta>
+<refentrytitle>qanda.title.level2.properties</refentrytitle>
+<refmiscinfo role="type">attribute set</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>qanda.title.level2.properties</refname>
+<refpurpose>Properties for level-2 qanda set titles</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='qanda.title.level2.properties.frag'>
+<xsl:attribute-set name="qanda.title.level2.properties">
+  <xsl:attribute name="font-size">
+    <xsl:value-of select="$body.font.master * 1.728"/>
+    <xsl:text>pt</xsl:text>
+  </xsl:attribute>
+</xsl:attribute-set>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The properties of level-2 qanda set titles.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/qanda.title.level3.properties.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/qanda.title.level3.properties.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/qanda.title.level3.properties.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,27 @@
+<refentry id="qanda.title.level3.properties">
+<refmeta>
+<refentrytitle>qanda.title.level3.properties</refentrytitle>
+<refmiscinfo role="type">attribute set</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>qanda.title.level3.properties</refname>
+<refpurpose>Properties for level-3 qanda set titles</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='qanda.title.level3.properties.frag'>
+<xsl:attribute-set name="qanda.title.level3.properties">
+  <xsl:attribute name="font-size">
+    <xsl:value-of select="$body.font.master * 1.44"/>
+    <xsl:text>pt</xsl:text>
+  </xsl:attribute>
+</xsl:attribute-set>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The properties of level-3 qanda set titles.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/qanda.title.level4.properties.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/qanda.title.level4.properties.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/qanda.title.level4.properties.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,27 @@
+<refentry id="qanda.title.level4.properties">
+<refmeta>
+<refentrytitle>qanda.title.level4.properties</refentrytitle>
+<refmiscinfo role="type">attribute set</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>qanda.title.level4.properties</refname>
+<refpurpose>Properties for level-4 qanda set titles</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='qanda.title.level4.properties.frag'>
+<xsl:attribute-set name="qanda.title.level4.properties">
+  <xsl:attribute name="font-size">
+    <xsl:value-of select="$body.font.master * 1.2"/>
+    <xsl:text>pt</xsl:text>
+  </xsl:attribute>
+</xsl:attribute-set>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The properties of level-4 qanda set titles.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/qanda.title.level5.properties.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/qanda.title.level5.properties.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/qanda.title.level5.properties.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,27 @@
+<refentry id="qanda.title.level5.properties">
+<refmeta>
+<refentrytitle>qanda.title.level5.properties</refentrytitle>
+<refmiscinfo role="type">attribute set</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>qanda.title.level5.properties</refname>
+<refpurpose>Properties for level-5 qanda set titles</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='qanda.title.level5.properties.frag'>
+<xsl:attribute-set name="qanda.title.level5.properties">
+  <xsl:attribute name="font-size">
+    <xsl:value-of select="$body.font.master"/>
+    <xsl:text>pt</xsl:text>
+  </xsl:attribute>
+</xsl:attribute-set>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The properties of level-5 qanda set titles.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/qanda.title.level6.properties.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/qanda.title.level6.properties.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/qanda.title.level6.properties.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,29 @@
+<refentry id="qanda.title.level6.properties">
+<refmeta>
+<refentrytitle>qanda.title.level6.properties</refentrytitle>
+<refmiscinfo role="type">attribute set</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>qanda.title.level6.properties</refname>
+<refpurpose>Properties for level-6 qanda set titles</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='qanda.title.level6.properties.frag'>
+<xsl:attribute-set name="qanda.title.level6.properties">
+  <xsl:attribute name="font-size">
+    <xsl:value-of select="$body.font.master"/>
+    <xsl:text>pt</xsl:text>
+  </xsl:attribute>
+</xsl:attribute-set>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The properties of level-6 qanda set titles.
+This property set is actually
+used for all titles below level 5.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/qanda.title.properties.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/qanda.title.properties.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/qanda.title.properties.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,32 @@
+<refentry id="qanda.title.properties">
+<refmeta>
+<refentrytitle>qanda.title.properties</refentrytitle>
+<refmiscinfo role="type">attribute set</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>qanda.title.properties</refname>
+<refpurpose>Properties for qanda set titles</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='qanda.title.properties.frag'>
+<xsl:attribute-set name="qanda.title.properties">
+  <xsl:attribute name="font-family">
+    <xsl:value-of select="$title.font.family"/>
+  </xsl:attribute>
+  <xsl:attribute name="font-weight">bold</xsl:attribute>
+  <!-- font size is calculated dynamically by qanda.heading template -->
+  <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
+  <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute>
+  <xsl:attribute name="space-before.optimum">1.0em</xsl:attribute>
+  <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute>
+</xsl:attribute-set>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The properties common to all qanda set titles.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/qandadiv.autolabel.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/qandadiv.autolabel.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/qandadiv.autolabel.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,21 @@
+<refentry id="qandadiv.autolabel">
+<refmeta>
+<refentrytitle>qandadiv.autolabel</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>qandadiv.autolabel</refname>
+<refpurpose>Are divisions in QAndASets enumerated?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='qandadiv.autolabel.frag'><xsl:param name="qandadiv.autolabel" select="1"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), unlabeled qandadivs will be enumerated.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/refentry.generate.name.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/refentry.generate.name.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/refentry.generate.name.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,26 @@
+<refentry id="refentry.generate.name">
+<refmeta>
+<refentrytitle>refentry.generate.name</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>refentry.generate.name</refname>
+<refpurpose>Output NAME header before 'RefName'(s)?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='refentry.generate.name.frag'><xsl:param name="refentry.generate.name" select="1"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), a "NAME" section title is output before the list
+of 'RefName's. This parameter and
+<parameter>refentry.generate.title</parameter> are mutually
+exclusive. This means that if you change this parameter to zero, you
+should set <parameter>refentry.generate.title</parameter> to 1 unless
+you want get quite strange output.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/refentry.generate.title.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/refentry.generate.title.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/refentry.generate.title.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,28 @@
+<refentry id="refentry.generate.title">
+<refmeta>
+<refentrytitle>refentry.generate.title</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>refentry.generate.title</refname>
+<refpurpose>Output title before 'RefName'(s)?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='refentry.generate.title.frag'>
+<xsl:param name="refentry.generate.title" select="0"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), the reference page title or first name is
+output before the list of 'RefName's. This parameter and
+<parameter>refentry.generate.name</parameter> are mutually exclusive.
+This means that if you change this parameter to 1, you
+should set <parameter>refentry.generate.name</parameter> to 0 unless
+you want get quite strange output.</para>
+
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/refentry.pagebreak.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/refentry.pagebreak.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/refentry.pagebreak.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="refentry.pagebreak">
+<refmeta>
+<refentrytitle>refentry.pagebreak</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>refentry.pagebreak</refname>
+<refpurpose>Start each refentry on a new page</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='refentry.pagebreak.frag'><xsl:param name="refentry.pagebreak" select="1"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero (the default), each <sgmltag>refentry</sgmltag>
+element will start on a new page.  If zero, a page
+break will not be generated.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/refentry.separator.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/refentry.separator.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/refentry.separator.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,22 @@
+<refentry id="refentry.separator">
+<refmeta>
+<refentrytitle>refentry.separator</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>refentry.separator</refname>
+<refpurpose>Generate a separator between consecutive RefEntry elements?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='refentry.separator.frag'><xsl:param name="refentry.separator" select="'1'"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true, a separator will be generated between consecutive
+reference pages.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/refentry.title.properties.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/refentry.title.properties.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/refentry.title.properties.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,43 @@
+<refentry id="refentry.title.properties">
+<refmeta>
+<refentrytitle>refentry.title.properties</refentrytitle>
+<refmiscinfo role="type">attribute set</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>refentry.title.properties</refname>
+<refpurpose>Title properties for a refentry title</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='refentry.title.properties.frag'>
+<xsl:attribute-set name="refentry.title.properties">
+  <xsl:attribute name="font-family">
+    <xsl:value-of select="$title.font.family"/>
+  </xsl:attribute>
+  <xsl:attribute name="font-size">18pt</xsl:attribute>
+  <xsl:attribute name="font-weight">bold</xsl:attribute>
+  <xsl:attribute name="space-after">1em</xsl:attribute>
+  <xsl:attribute name="hyphenate">false</xsl:attribute>
+  <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
+  <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute>
+  <xsl:attribute name="space-before.optimum">1.0em</xsl:attribute>
+  <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute>
+  <xsl:attribute name="space-after.optimum">0.5em</xsl:attribute>
+  <xsl:attribute name="space-after.minimum">0.4em</xsl:attribute>
+  <xsl:attribute name="space-after.maximum">0.6em</xsl:attribute>
+</xsl:attribute-set>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Formatting properties applied to refentry titles,
+including refnamediv, refsect1 through 3, and refsection.
+The font size is supplied by the appropriate 
+<parameter>section.level<replaceable>X</replaceable>.title.properties</parameter>
+attribute-set,
+computed from its location in the section hierarchy.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/refentry.xref.manvolnum.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/refentry.xref.manvolnum.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/refentry.xref.manvolnum.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,24 @@
+<refentry id="refentry.xref.manvolnum">
+<refmeta>
+<refentrytitle>refentry.xref.manvolnum</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>refentry.xref.manvolnum</refname>
+<refpurpose>Output <sgmltag>manvolnum</sgmltag> as part of 
+<sgmltag>refentry</sgmltag> cross-reference?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='refentry.xref.manvolnum.frag'><xsl:param name="refentry.xref.manvolnum" select="1"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>if true (non-zero), the <sgmltag>manvolnum</sgmltag> is used when cross-referencing
+<sgmltag>refentry</sgmltag>s, either with <sgmltag>xref</sgmltag>
+or <sgmltag>citerefentry</sgmltag>.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/region.after.extent.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/region.after.extent.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/region.after.extent.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,24 @@
+<refentry id="region.after.extent">
+<refmeta>
+<refentrytitle>region.after.extent</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>region.after.extent</refname>
+<refpurpose>Specifies the height of the footer.</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='region.after.extent.frag'>
+<xsl:param name="region.after.extent" select="'0.4in'"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The region after extent is the height of the area where footers
+are printed.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/region.before.extent.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/region.before.extent.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/region.before.extent.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,24 @@
+<refentry id="region.before.extent">
+<refmeta>
+<refentrytitle>region.before.extent</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>region.before.extent</refname>
+<refpurpose>Specifies the height of the header</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='region.before.extent.frag'>
+<xsl:param name="region.before.extent" select="'0.4in'"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The region before extent is the height of the area where headers
+are printed.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/root.filename.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/root.filename.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/root.filename.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,22 @@
+<refentry id="root.filename">
+<refmeta>
+<refentrytitle>root.filename</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>root.filename</refname>
+<refpurpose>Identifies the name of the root HTML file when chunking</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='root.filename.frag'><xsl:param name="root.filename" select="'index'"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The <parameter>root.filename</parameter> is the base filename for
+the chunk created for the root of each document processed.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/root.properties.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/root.properties.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/root.properties.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,38 @@
+<refentry id="root.properties">
+<refmeta>
+<refentrytitle>root.properties</refentrytitle>
+<refmiscinfo role="type">attribute set</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>root.properties</refname>
+<refpurpose>The properties of the fo:root element</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='root.properties.frag'>
+<xsl:attribute-set name="root.properties">
+  <xsl:attribute name="font-family">
+    <xsl:value-of select="$body.fontset"/>
+  </xsl:attribute>
+  <xsl:attribute name="font-size">
+    <xsl:value-of select="$body.font.size"/>
+  </xsl:attribute>
+  <xsl:attribute name="text-align">
+    <xsl:value-of select="$alignment"/>
+  </xsl:attribute>
+  <xsl:attribute name="line-height">
+    <xsl:value-of select="$line-height"/>
+  </xsl:attribute>
+  <xsl:attribute name="font-selection-strategy">character-by-character</xsl:attribute>
+  <xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
+</xsl:attribute-set>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This property set is used on the <sgmltag>fo:root</sgmltag> element of
+an FO file. It defines a set of default, global parameters.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/rootid.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/rootid.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/rootid.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,27 @@
+<refentry id="rootid">
+<refmeta>
+<refentrytitle>rootid</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>rootid</refname>
+<refpurpose>Specify the root element to format</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='rootid.frag'><xsl:param name="rootid" select="''"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If <parameter>rootid</parameter> is specified, it must be the
+value of an ID that occurs in the document being formatted. The entire
+document will be loaded and parsed, but formatting will begin at the
+element identified, rather than at the root. For example, this allows
+you to process only chapter 4 of a book.</para>
+<para>Because the entire document is available to the processor, automatic
+numbering, cross references, and other dependencies are correctly
+resolved.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/runinhead.default.title.end.punct.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/runinhead.default.title.end.punct.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/runinhead.default.title.end.punct.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,21 @@
+<refentry id="runinhead.default.title.end.punct">
+<refmeta>
+<refentrytitle>runinhead.default.title.end.punct</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>runinhead.default.title.end.punct</refname>
+<refpurpose>Default punctuation character on a run-in-head</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='runinhead.default.title.end.punct.frag'><xsl:param name="runinhead.default.title.end.punct" select="'.'"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/runinhead.title.end.punct.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/runinhead.title.end.punct.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/runinhead.title.end.punct.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,21 @@
+<refentry id="runinhead.title.end.punct">
+<refmeta>
+<refentrytitle>runinhead.title.end.punct</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>runinhead.title.end.punct</refname>
+<refpurpose>Characters that count as punctuation on a run-in-head</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='runinhead.title.end.punct.frag'><xsl:param name="runinhead.title.end.punct" select="'.!?:'"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/sans.font.family.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/sans.font.family.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/sans.font.family.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,24 @@
+<refentry id="sans.font.family">
+<refmeta>
+<refentrytitle>sans.font.family</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>sans.font.family</refname>
+<refpurpose>The default sans-serif font family</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='sans.font.family.frag'>
+<xsl:param name="sans.font.family" select="'sans-serif'"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The default sans-serif font family. At the present, this isn't
+actually used by the stylesheets.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/saxon.callouts.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/saxon.callouts.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/saxon.callouts.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="saxon.callouts">
+<refmeta>
+<refentrytitle>saxon.callouts</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>saxon.callouts</refname>
+<refpurpose>Enable the callout extension</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='saxon.callouts.frag'><xsl:param name="saxon.callouts" select="'1'"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The callouts extension processes <sgmltag>areaset</sgmltag>
+elements in <sgmltag>ProgramListingCO</sgmltag> and other text-based
+callout elements.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/saxon.character.representation.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/saxon.character.representation.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/saxon.character.representation.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,27 @@
+<refentry id="saxon.character.representation">
+<refmeta>
+<refentrytitle>saxon.character.representation</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>saxon.character.representation</refname>
+<refpurpose>Saxon character representation used in generated HTML pages</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>&lt;xsl:param name="saxon.character.representation" select="'entity;decimal'"/>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This character representation is used in files generated by chunking stylesheet. If
+you want to suppress entity references for characters with direct representation 
+in default.encoding, set this parameter to value <literal>native</literal>. 
+</para>
+
+<note>
+<para>This parameter is documented here, but the declaration is actually
+in the <filename>chunker.xsl</filename> stylesheet module.</para>
+</note>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/saxon.linenumbering.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/saxon.linenumbering.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/saxon.linenumbering.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,24 @@
+<refentry id="saxon.linenumbering">
+<refmeta>
+<refentrytitle>saxon.linenumbering</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>saxon.linenumbering</refname>
+<refpurpose>Enable the line numbering extension</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='saxon.linenumbering.frag'><xsl:param name="saxon.linenumbering" select="'1'"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true, verbatim environments (elements that have the
+format='linespecific' notation attribute: address, literallayout,
+programlisting, screen, synopsis) that specify line numbering will
+have, surprise, line numbers.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/saxon.tablecolumns.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/saxon.tablecolumns.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/saxon.tablecolumns.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="saxon.tablecolumns">
+<refmeta>
+<refentrytitle>saxon.tablecolumns</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>saxon.tablecolumns</refname>
+<refpurpose>Enable the table columns extension function</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='saxon.tablecolumns.frag'><xsl:param name="saxon.tablecolumns" select="'1'"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The table columns extension function adjusts the widths of table
+columns in the HTML result to more accurately reflect the specifications
+in the CALS table.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/section.autolabel.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/section.autolabel.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/section.autolabel.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,21 @@
+<refentry id="section.autolabel">
+<refmeta>
+<refentrytitle>section.autolabel</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>section.autolabel</refname>
+<refpurpose>Are sections enumerated?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='section.autolabel.frag'><xsl:param name="section.autolabel" select="0"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), unlabeled sections will be enumerated.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/section.label.includes.component.label.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/section.label.includes.component.label.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/section.label.includes.component.label.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,22 @@
+<refentry id="section.label.includes.component.label">
+<refmeta>
+<refentrytitle>section.label.includes.component.label</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>section.label.includes.component.label</refname>
+<refpurpose>Do section labels include the component label?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='section.label.includes.component.label.frag'><xsl:param name="section.label.includes.component.label" select="0"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), section labels are prefixed with the label of the
+component that contains them.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/section.level1.properties.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/section.level1.properties.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/section.level1.properties.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,39 @@
+<refentry id="section.level1.properties">
+<refmeta>
+<refentrytitle>section.level1.properties</refentrytitle>
+<refmiscinfo role="type">attribute set</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>section.level1.properties</refname>
+<refpurpose>Properties for level-1 sections</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='section.level1.properties.frag'>
+<xsl:attribute-set name="section.level1.properties" 
+                   use-attribute-sets="section.properties">
+</xsl:attribute-set>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The properties that apply to the containing
+block of a level-1 section, and therefore apply to
+the whole section.  This includes <sgmltag>sect1</sgmltag>
+elements and <sgmltag>section</sgmltag> elements at level 1.
+</para>
+
+<para>For example, you could start each level-1 section on
+a new page by using:</para>
+<programlisting>&lt;xsl:attribute-set name="section.level1.properties"&gt;
+  &lt;xsl:attribute name="break-before"&gt;page&lt;/xsl:attribute&gt;
+&lt;/xsl:attribute-set&gt;
+</programlisting>
+
+<para>This attribute set inherits attributes from the
+general <sgmltag>section.properties</sgmltag> attribute set.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/section.level2.properties.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/section.level2.properties.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/section.level2.properties.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,39 @@
+<refentry id="section.level2.properties">
+<refmeta>
+<refentrytitle>section.level2.properties</refentrytitle>
+<refmiscinfo role="type">attribute set</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>section.level2.properties</refname>
+<refpurpose>Properties for level-2 sections</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='section.level2.properties.frag'>
+<xsl:attribute-set name="section.level2.properties"
+                   use-attribute-sets="section.properties">
+</xsl:attribute-set>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The properties that apply to the containing
+block of a level-2 section, and therefore apply to
+the whole section.  This includes <sgmltag>sect2</sgmltag>
+elements and <sgmltag>section</sgmltag> elements at level 2.
+</para>
+
+<para>For example, you could start each level-2 section on
+a new page by using:</para>
+<programlisting>&lt;xsl:attribute-set name="section.level2.properties"&gt;
+  &lt;xsl:attribute name="break-before"&gt;page&lt;/xsl:attribute&gt;
+&lt;/xsl:attribute-set&gt;
+</programlisting>
+
+<para>This attribute set inherits attributes from the
+general <sgmltag>section.properties</sgmltag> attribute set.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/section.level3.properties.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/section.level3.properties.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/section.level3.properties.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,39 @@
+<refentry id="section.level3.properties">
+<refmeta>
+<refentrytitle>section.level3.properties</refentrytitle>
+<refmiscinfo role="type">attribute set</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>section.level3.properties</refname>
+<refpurpose>Properties for level-3 sections</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='section.level3.properties.frag'>
+<xsl:attribute-set name="section.level3.properties"
+                   use-attribute-sets="section.properties">
+</xsl:attribute-set>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The properties that apply to the containing
+block of a level-3 section, and therefore apply to
+the whole section.  This includes <sgmltag>sect3</sgmltag>
+elements and <sgmltag>section</sgmltag> elements at level 3.
+</para>
+
+<para>For example, you could start each level-3 section on
+a new page by using:</para>
+<programlisting>&lt;xsl:attribute-set name="section.level3.properties"&gt;
+  &lt;xsl:attribute name="break-before"&gt;page&lt;/xsl:attribute&gt;
+&lt;/xsl:attribute-set&gt;
+</programlisting>
+
+<para>This attribute set inherits attributes from the
+general <sgmltag>section.properties</sgmltag> attribute set.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/section.level4.properties.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/section.level4.properties.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/section.level4.properties.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,39 @@
+<refentry id="section.level4.properties">
+<refmeta>
+<refentrytitle>section.level4.properties</refentrytitle>
+<refmiscinfo role="type">attribute set</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>section.level4.properties</refname>
+<refpurpose>Properties for level-4 sections</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='section.level4.properties.frag'>
+<xsl:attribute-set name="section.level4.properties"
+                   use-attribute-sets="section.properties">
+</xsl:attribute-set>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The properties that apply to the containing
+block of a level-4 section, and therefore apply to
+the whole section.  This includes <sgmltag>sect4</sgmltag>
+elements and <sgmltag>section</sgmltag> elements at level 4.
+</para>
+
+<para>For example, you could start each level-4 section on
+a new page by using:</para>
+<programlisting>&lt;xsl:attribute-set name="section.level4.properties"&gt;
+  &lt;xsl:attribute name="break-before"&gt;page&lt;/xsl:attribute&gt;
+&lt;/xsl:attribute-set&gt;
+</programlisting>
+
+<para>This attribute set inherits attributes from the
+general <sgmltag>section.properties</sgmltag> attribute set.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/section.level5.properties.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/section.level5.properties.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/section.level5.properties.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,39 @@
+<refentry id="section.level5.properties">
+<refmeta>
+<refentrytitle>section.level5.properties</refentrytitle>
+<refmiscinfo role="type">attribute set</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>section.level5.properties</refname>
+<refpurpose>Properties for level-5 sections</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='section.level5.properties.frag'>
+<xsl:attribute-set name="section.level5.properties"
+                   use-attribute-sets="section.properties">
+</xsl:attribute-set>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The properties that apply to the containing
+block of a level-5 section, and therefore apply to
+the whole section.  This includes <sgmltag>sect5</sgmltag>
+elements and <sgmltag>section</sgmltag> elements at level 5.
+</para>
+
+<para>For example, you could start each level-5 section on
+a new page by using:</para>
+<programlisting>&lt;xsl:attribute-set name="section.level5.properties"&gt;
+  &lt;xsl:attribute name="break-before"&gt;page&lt;/xsl:attribute&gt;
+&lt;/xsl:attribute-set&gt;
+</programlisting>
+
+<para>This attribute set inherits attributes from the
+general <sgmltag>section.properties</sgmltag> attribute set.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/section.level6.properties.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/section.level6.properties.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/section.level6.properties.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,39 @@
+<refentry id="section.level6.properties">
+<refmeta>
+<refentrytitle>section.level6.properties</refentrytitle>
+<refmiscinfo role="type">attribute set</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>section.level6.properties</refname>
+<refpurpose>Properties for level-6 sections</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='section.level6.properties.frag'>
+<xsl:attribute-set name="section.level6.properties"
+                   use-attribute-sets="section.properties">
+</xsl:attribute-set>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The properties that apply to the containing
+block of a level 6 or lower section, and therefore apply to
+the whole section.  This includes 
+<sgmltag>section</sgmltag> elements at level 6 and lower.
+</para>
+
+<para>For example, you could start each level-6 section on
+a new page by using:</para>
+<programlisting>&lt;xsl:attribute-set name="section.level6.properties"&gt;
+  &lt;xsl:attribute name="break-before"&gt;page&lt;/xsl:attribute&gt;
+&lt;/xsl:attribute-set&gt;
+</programlisting>
+
+<para>This attribute set inherits attributes from the
+general <sgmltag>section.properties</sgmltag> attribute set.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/section.properties.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/section.properties.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/section.properties.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,30 @@
+<refentry id="section.properties">
+<refmeta>
+<refentrytitle>section.properties</refentrytitle>
+<refmiscinfo role="type">attribute set</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>section.properties</refname>
+<refpurpose>Properties for all section levels</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='section.properties.frag'>
+<xsl:attribute-set name="section.properties">
+</xsl:attribute-set>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The properties that apply to the containing
+block of all section levels, and therefore apply to
+the whole section.  
+This attribute set is inherited by the
+more specific attribute sets such as
+<sgmltag>section.level1.properties</sgmltag>.
+The default is empty.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/section.title.level1.properties.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/section.title.level1.properties.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/section.title.level1.properties.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,27 @@
+<refentry id="section.title.level1.properties">
+<refmeta>
+<refentrytitle>section.title.level1.properties</refentrytitle>
+<refmiscinfo role="type">attribute set</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>section.title.level1.properties</refname>
+<refpurpose>Properties for level-1 section titles</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='section.title.level1.properties.frag'>
+<xsl:attribute-set name="section.title.level1.properties">
+  <xsl:attribute name="font-size">
+    <xsl:value-of select="$body.font.master * 2.0736"/>
+    <xsl:text>pt</xsl:text>
+  </xsl:attribute>
+</xsl:attribute-set>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The properties of level-1 section titles.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/section.title.level2.properties.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/section.title.level2.properties.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/section.title.level2.properties.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,27 @@
+<refentry id="section.title.level2.properties">
+<refmeta>
+<refentrytitle>section.title.level2.properties</refentrytitle>
+<refmiscinfo role="type">attribute set</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>section.title.level2.properties</refname>
+<refpurpose>Properties for level-1 section titles</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='section.title.level2.properties.frag'>
+<xsl:attribute-set name="section.title.level2.properties">
+  <xsl:attribute name="font-size">
+    <xsl:value-of select="$body.font.master * 1.728"/>
+    <xsl:text>pt</xsl:text>
+  </xsl:attribute>
+</xsl:attribute-set>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The properties of level-2 section titles.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/section.title.level3.properties.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/section.title.level3.properties.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/section.title.level3.properties.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,27 @@
+<refentry id="section.title.level3.properties">
+<refmeta>
+<refentrytitle>section.title.level3.properties</refentrytitle>
+<refmiscinfo role="type">attribute set</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>section.title.level3.properties</refname>
+<refpurpose>Properties for level-1 section titles</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='section.title.level3.properties.frag'>
+<xsl:attribute-set name="section.title.level3.properties">
+  <xsl:attribute name="font-size">
+    <xsl:value-of select="$body.font.master * 1.44"/>
+    <xsl:text>pt</xsl:text>
+  </xsl:attribute>
+</xsl:attribute-set>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The properties of level-3 section titles.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/section.title.level4.properties.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/section.title.level4.properties.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/section.title.level4.properties.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,27 @@
+<refentry id="section.title.level4.properties">
+<refmeta>
+<refentrytitle>section.title.level4.properties</refentrytitle>
+<refmiscinfo role="type">attribute set</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>section.title.level4.properties</refname>
+<refpurpose>Properties for level-1 section titles</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='section.title.level4.properties.frag'>
+<xsl:attribute-set name="section.title.level4.properties">
+  <xsl:attribute name="font-size">
+    <xsl:value-of select="$body.font.master * 1.2"/>
+    <xsl:text>pt</xsl:text>
+  </xsl:attribute>
+</xsl:attribute-set>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The properties of level-4 section titles.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/section.title.level5.properties.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/section.title.level5.properties.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/section.title.level5.properties.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,27 @@
+<refentry id="section.title.level5.properties">
+<refmeta>
+<refentrytitle>section.title.level5.properties</refentrytitle>
+<refmiscinfo role="type">attribute set</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>section.title.level5.properties</refname>
+<refpurpose>Properties for level-1 section titles</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='section.title.level5.properties.frag'>
+<xsl:attribute-set name="section.title.level5.properties">
+  <xsl:attribute name="font-size">
+    <xsl:value-of select="$body.font.master"/>
+    <xsl:text>pt</xsl:text>
+  </xsl:attribute>
+</xsl:attribute-set>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The properties of level-5 section titles.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/section.title.level6.properties.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/section.title.level6.properties.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/section.title.level6.properties.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,28 @@
+<refentry id="section.title.level6.properties">
+<refmeta>
+<refentrytitle>section.title.level6.properties</refentrytitle>
+<refmiscinfo role="type">attribute set</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>section.title.level6.properties</refname>
+<refpurpose>Properties for level-1 section titles</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='section.title.level6.properties.frag'>
+<xsl:attribute-set name="section.title.level6.properties">
+  <xsl:attribute name="font-size">
+    <xsl:value-of select="$body.font.master"/>
+    <xsl:text>pt</xsl:text>
+  </xsl:attribute>
+</xsl:attribute-set>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The properties of level-6 section titles. This property set is actually
+used for all titles below level 5.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/section.title.properties.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/section.title.properties.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/section.title.properties.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,32 @@
+<refentry id="section.title.properties">
+<refmeta>
+<refentrytitle>section.title.properties</refentrytitle>
+<refmiscinfo role="type">attribute set</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>section.title.properties</refname>
+<refpurpose>Properties for section titles</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='section.title.properties.frag'>
+<xsl:attribute-set name="section.title.properties">
+  <xsl:attribute name="font-family">
+    <xsl:value-of select="$title.font.family"/>
+  </xsl:attribute>
+  <xsl:attribute name="font-weight">bold</xsl:attribute>
+  <!-- font size is calculated dynamically by section.heading template -->
+  <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
+  <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute>
+  <xsl:attribute name="space-before.optimum">1.0em</xsl:attribute>
+  <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute>
+</xsl:attribute-set>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The properties common to all section titles.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/segmentedlist.as.table.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/segmentedlist.as.table.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/segmentedlist.as.table.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="segmentedlist.as.table">
+<refmeta>
+<refentrytitle>segmentedlist.as.table</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>segmentedlist.as.table</refname>
+<refpurpose>Format segmented lists as tables?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='segmentedlist.as.table.frag'>
+<xsl:param name="segmentedlist.as.table" select="0"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, <sgmltag>segmentedlist</sgmltag>s will be formatted as
+tables.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/shade.verbatim.style.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/shade.verbatim.style.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/shade.verbatim.style.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,28 @@
+<refentry id="shade.verbatim.style">
+<refmeta>
+<refentrytitle>shade.verbatim.style</refentrytitle>
+<refmiscinfo role="type"></refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>shade.verbatim.style</refname>
+<refpurpose>Properties that specify the style of shaded verbatim listings</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='shade.verbatim.style.frag'>
+<xsl:attribute-set condition="html" name="shade.verbatim.style">
+  <xsl:attribute name="border">0</xsl:attribute>
+  <xsl:attribute name="bgcolor">#E0E0E0</xsl:attribute>
+</xsl:attribute-set>
+<xsl:attribute-set condition="fo" name="shade.verbatim.style">
+  <xsl:attribute name="background-color">#E0E0E0</xsl:attribute>
+</xsl:attribute-set>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/shade.verbatim.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/shade.verbatim.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/shade.verbatim.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,20 @@
+<refentry id="shade.verbatim">
+<refmeta>
+<refentrytitle>shade.verbatim</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>shade.verbatim</refname>
+<refpurpose>Should verbatim environments be shaded?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='shade.verbatim.frag'><xsl:param name="shade.verbatim" select="0"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/show.comments.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/show.comments.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/show.comments.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,24 @@
+<refentry id="show.comments">
+<refmeta>
+<refentrytitle>show.comments</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>show.comments</refname>
+<refpurpose>Display <sgmltag>comment</sgmltag> elements?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='show.comments.frag'><xsl:param name="show.comments">1</xsl:param></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), comments will be displayed, otherwise they are suppressed.
+Comments here refers to the <sgmltag>comment</sgmltag> element,
+which will be renamed <sgmltag>remark</sgmltag> in DocBook V4.0,
+not XML comments (&lt;-- like this --&gt;) which are unavailable.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/show.revisionflag.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/show.revisionflag.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/show.revisionflag.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,35 @@
+<refentry id="show.revisionflag">
+<refmeta>
+<refentrytitle>show.revisionflag</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>show.revisionflag</refname>
+<refpurpose>Enable decoration of elements that have a revisionflag</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='show.revisionflag.frag'><xsl:param name="show.revisionflag">0</xsl:param></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>
+If <literal>show.revisionflag</literal> is turned on, then the stylesheets
+may produce additional markup designed to allow a CSS stylesheet to
+highlight elements that have specific revisionflag settings.</para>
+
+<para>The markup inserted will be usually be either a &lt;span&gt; or &lt;div&gt;
+with an appropriate <literal>class</literal> attribute. (The value of
+the class attribute will be the same as the value of the revisionflag
+attribute). In some contexts, for example tables, where extra markup
+would be structurally illegal, the class attribute will be added to the
+appropriate container element.</para>
+
+<para>In general, the stylesheets only test for revisionflag in contexts
+where an importing stylesheet would have to redefine whole templates.
+Most of the revisionflag processing is expected to be done by another
+stylesheet, for example <filename>changebars.xsl</filename>.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/sidebar.properties.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/sidebar.properties.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/sidebar.properties.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,38 @@
+<refentry id="sidebar.properties">
+<refmeta>
+<refentrytitle>sidebar.properties</refentrytitle>
+<refmiscinfo role="type">attribute set</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>sidebar.properties</refname>
+<refpurpose>Attribute set for sidebar properties</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='sidebar.properties.frag'>
+<xsl:attribute-set name="sidebar.properties"
+                   use-attribute-sets="formal.object.properties">
+  <xsl:attribute name="border-style">solid</xsl:attribute>
+  <xsl:attribute name="border-width">1pt</xsl:attribute>
+  <xsl:attribute name="border-color">black</xsl:attribute>
+  <xsl:attribute name="background-color">#DDDDDD</xsl:attribute>
+  <xsl:attribute name="padding-left">12pt</xsl:attribute>
+  <xsl:attribute name="padding-right">12pt</xsl:attribute>
+  <xsl:attribute name="padding-top">6pt</xsl:attribute>
+  <xsl:attribute name="padding-bottom">6pt</xsl:attribute>
+<!--
+  <xsl:attribute name="margin-left">12pt</xsl:attribute>
+  <xsl:attribute name="margin-right">12pt</xsl:attribute>
+  <xsl:attribute name="margin-top">6pt</xsl:attribute>
+  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
+-->
+</xsl:attribute-set>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The styling for sidebars.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/spacing.paras.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/spacing.paras.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/spacing.paras.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="spacing.paras">
+<refmeta>
+<refentrytitle>spacing.paras</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>spacing.paras</refname>
+<refpurpose>Insert additional &lt;p&gt; elements for spacing?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='spacing.paras.frag'><xsl:param name="spacing.paras" select="'0'"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>When non-zero, additional, empty paragraphs are inserted in
+several contexts (for example, around informal figures), to create a
+more pleasing visual appearance in many browsers.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/subscript.properties.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/subscript.properties.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/subscript.properties.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,24 @@
+<refentry id="subscript.properties">
+<refmeta>
+<refentrytitle>subscript.properties</refentrytitle>
+<refmiscinfo role="type"></refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>subscript.properties</refname>
+<refpurpose>Properties associated with subscripts</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='subscript.properties.frag'>
+<xsl:attribute-set name="subscript.properties">
+  <xsl:attribute name="font-size">75%</xsl:attribute>
+</xsl:attribute-set>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Specifies styling properties for subscripts.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/superscript.properties.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/superscript.properties.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/superscript.properties.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,24 @@
+<refentry id="superscript.properties">
+<refmeta>
+<refentrytitle>superscript.properties</refentrytitle>
+<refmiscinfo role="type"></refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>superscript.properties</refname>
+<refpurpose>Properties associated with superscripts</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='superscript.properties.frag'>
+<xsl:attribute-set name="superscript.properties">
+  <xsl:attribute name="font-size">75%</xsl:attribute>
+</xsl:attribute-set>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Specifies styling properties for superscripts.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/suppress.footer.navigation.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/suppress.footer.navigation.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/suppress.footer.navigation.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,22 @@
+<refentry id="suppress.footer.navigation">
+<refmeta>
+<refentrytitle>suppress.footer.navigation</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>suppress.footer.navigation</refname>
+<refpurpose>Disable footer navigation</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='suppress.footer.navigation.frag'><xsl:param name="suppress.footer.navigation">0</xsl:param></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>
+If <literal>suppress.footer.navigation</literal> is turned on, footer
+navigation will be suppressed.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/suppress.header.navigation.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/suppress.header.navigation.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/suppress.header.navigation.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,22 @@
+<refentry id="suppress.header.navigation">
+<refmeta>
+<refentrytitle>suppress.header.navigation</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>suppress.header.navigation</refname>
+<refpurpose>Disable header navigation</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='suppress.header.navigation.frag'><xsl:param name="suppress.header.navigation">0</xsl:param></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>
+If <literal>suppress.header.navigation</literal> is turned on, header
+navigation will be suppressed.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/suppress.navigation.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/suppress.navigation.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/suppress.navigation.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,22 @@
+<refentry id="suppress.navigation">
+<refmeta>
+<refentrytitle>suppress.navigation</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>suppress.navigation</refname>
+<refpurpose>Disable header and footer navigation</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='suppress.navigation.frag'><xsl:param name="suppress.navigation">0</xsl:param></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>
+If <literal>suppress.navigation</literal> is turned on, header and
+footer navigation will be suppressed.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/symbol.font.family.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/symbol.font.family.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/symbol.font.family.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,36 @@
+<refentry id="symbol.font.family">
+<refmeta>
+<refentrytitle>symbol.font.family</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>symbol.font.family</refname>
+<refpurpose>The font families to be searched for symbols outside
+    of the body font</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='symbol.font.family.frag'>
+<xsl:param name="symbol.font.family" select="'Symbol,ZapfDingbats'"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>A typical body or title font does not contain all
+the character glyphs that DocBook supports.  This parameter
+specifies additional fonts that should be searched for
+special characters not in the normal font.
+These symbol font names are automatically appended
+to the body or title font family name when fonts
+are specified in a 
+<sgmltag class="attribute">font-family</sgmltag>
+property in the FO output.
+</para>
+<para>The symbol font names should be entered as a
+comma-separated list.  The default value is
+<literal>Symbol,ZapfDingbats</literal>.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/table.borders.with.css.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/table.borders.with.css.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/table.borders.with.css.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="table.borders.with.css">
+<refmeta>
+<refentrytitle>table.borders.with.css</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>table.borders.with.css</refname>
+<refpurpose>Use CSS to specify table, row, and cell borders?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='table.borders.with.css.frag'>
+<xsl:param name="table.borders.with.css" select="0"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), CSS will be used to draw table borders.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/table.cell.border.color.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/table.cell.border.color.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/table.cell.border.color.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="table.cell.border.color">
+<refmeta>
+<refentrytitle>table.cell.border.color</refentrytitle>
+<refmiscinfo role="type"></refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>table.cell.border.color</refname>
+<refpurpose></refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='table.cell.border.color.frag'>
+<xsl:param condition="html" name="table.cell.border.color" select="''"/>
+<xsl:param condition="fo" name="table.cell.border.color" select="'black'"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/table.cell.border.style.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/table.cell.border.style.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/table.cell.border.style.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,22 @@
+<refentry id="table.cell.border.style">
+<refmeta>
+<refentrytitle>table.cell.border.style</refentrytitle>
+<refmiscinfo role="type"></refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>table.cell.border.style</refname>
+<refpurpose></refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='table.cell.border.style.frag'>
+<xsl:param name="table.cell.border.style" select="'solid'"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/table.cell.border.thickness.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/table.cell.border.thickness.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/table.cell.border.thickness.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,22 @@
+<refentry id="table.cell.border.thickness">
+<refmeta>
+<refentrytitle>table.cell.border.thickness</refentrytitle>
+<refmiscinfo role="type"></refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>table.cell.border.thickness</refname>
+<refpurpose></refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='table.cell.border.thickness.frag'>
+<xsl:param name="table.cell.border.thickness" select="'0.5pt'"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/table.cell.padding.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/table.cell.padding.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/table.cell.padding.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,27 @@
+<refentry id="table.cell.padding">
+<refmeta>
+<refentrytitle>table.cell.padding</refentrytitle>
+<refmiscinfo role="type"></refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>table.cell.padding</refname>
+<refpurpose></refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='table.cell.padding.frag'>
+<xsl:attribute-set name="table.cell.padding">
+  <xsl:attribute name="padding-left">2pt</xsl:attribute>
+  <xsl:attribute name="padding-right">2pt</xsl:attribute>
+  <xsl:attribute name="padding-top">2pt</xsl:attribute>
+  <xsl:attribute name="padding-bottom">2pt</xsl:attribute>
+</xsl:attribute-set>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/table.entry.padding.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/table.entry.padding.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/table.entry.padding.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,22 @@
+<refentry id="table.entry.padding">
+<refmeta>
+<refentrytitle>table.entry.padding</refentrytitle>
+<refmiscinfo role="type"></refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>table.entry.padding</refname>
+<refpurpose></refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='table.entry.padding.frag'>
+<xsl:param name="table.entry.padding" select="'2pt'"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/table.footnote.number.format.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/table.footnote.number.format.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/table.footnote.number.format.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="table.footnote.number.format">
+<refmeta>
+<refentrytitle>table.footnote.number.format</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>table.footnote.number.format</refname>
+<refpurpose>Identifies the format used for footnote numbers in tables</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='table.footnote.number.format.frag'>
+<xsl:param name="table.footnote.number.format" select="'a'"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The <parameter>table.footnote.number.format</parameter> specifies the format
+to use for footnote numeration (1, i, I, a, or A) in tables.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/table.footnote.number.symbols.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/table.footnote.number.symbols.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/table.footnote.number.symbols.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,34 @@
+<refentry id="table.footnote.number.symbols">
+<refmeta>
+<refentrytitle>table.footnote.number.symbols</refentrytitle>
+<refmiscinfo role="type"></refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>table.footnote.number.symbols</refname>
+<refpurpose></refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='table.footnote.number.symbols.frag'>
+<xsl:param name="table.footnote.number.symbols" select="''"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If <parameter>table.footnote.number.symbols</parameter> is not the empty string,
+table footnotes will use the characters it contains as footnote symbols. For example,
+<quote>*&amp;#x2020;&amp;#x2021;&amp;#x25CA;&amp;#x2720;</quote> will identify
+footnotes with <quote>*</quote>, <quote>&#x2020;</quote>, <quote>&#x2021;</quote>,
+<quote>&#x25CA;</quote>, and <quote>&#x2720;</quote>. If there are more footnotes
+than symbols, the stylesheets will fall back to numbered footnotes using
+<parameter>table.footnote.number.format</parameter>.</para>
+
+<para>The use of symbols for footnotes depends on the ability of your
+processor (or browser) to render the symbols you select. Not all systems are
+capable of displaying the full range of Unicode characters. If the quoted characters
+in the preceding paragraph are not displayed properly, that's a good indicator
+that you may have trouble using those symbols for footnotes.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/table.frame.border.color.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/table.frame.border.color.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/table.frame.border.color.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="table.frame.border.color">
+<refmeta>
+<refentrytitle>table.frame.border.color</refentrytitle>
+<refmiscinfo role="type"></refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>table.frame.border.color</refname>
+<refpurpose></refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='table.frame.border.color.frag'>
+<xsl:param condition="html" name="table.frame.border.color" select="''"/>
+<xsl:param condition="fo" name="table.frame.border.color" select="'black'"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/table.frame.border.style.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/table.frame.border.style.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/table.frame.border.style.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,22 @@
+<refentry id="table.frame.border.style">
+<refmeta>
+<refentrytitle>table.frame.border.style</refentrytitle>
+<refmiscinfo role="type"></refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>table.frame.border.style</refname>
+<refpurpose></refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='table.frame.border.style.frag'>
+<xsl:param name="table.frame.border.style" select="'solid'"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/table.frame.border.thickness.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/table.frame.border.thickness.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/table.frame.border.thickness.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,22 @@
+<refentry id="table.frame.border.thickness">
+<refmeta>
+<refentrytitle>table.frame.border.thickness</refentrytitle>
+<refmiscinfo role="type"></refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>table.frame.border.thickness</refname>
+<refpurpose>Specifies the thickness of the frame border</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='table.frame.border.thickness.frag'>
+<xsl:param name="table.frame.border.thickness" select="'0.5pt'"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Specifies the thickness of the border on the table's frame.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/table.properties.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/table.properties.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/table.properties.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,24 @@
+<refentry id="table.properties">
+<refnamediv>
+<refname>table.properties</refname>
+<refpurpose>Properties associated with the block surrounding a table</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='table.properties.frag'>
+<xsl:attribute-set name="table.properties"
+		   use-attribute-sets="formal.object.properties"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Block styling properties for tables. This parameter should really
+have been called <literal>table.block.properties</literal> or something
+like that, but we’re leaving it to avoid backwards-compatibility
+problems.</para>
+
+<para>See also <parameter>table.table.properties</parameter>.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/table.table.properties.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/table.table.properties.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/table.table.properties.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,27 @@
+<refentry id="table.table.properties">
+<refnamediv>
+<refname>table.table.properties</refname>
+<refpurpose>Properties associated with a table</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='table.table.properties.frag'>
+<xsl:attribute-set name="table.table.properties">
+  <xsl:attribute name="border-before-width.conditionality">retain</xsl:attribute>
+  <xsl:attribute name="border-collapse">collapse</xsl:attribute>
+</xsl:attribute-set>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The styling for tables. This parameter should really
+have been called <literal>table.properties</literal>, but that parameter
+name was inadvertantly established for the block-level properties
+of the table as a whole.
+</para>
+
+<para>See also <parameter>table.properties</parameter>.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/tablecolumns.extension.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/tablecolumns.extension.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/tablecolumns.extension.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="tablecolumns.extension">
+<refmeta>
+<refentrytitle>tablecolumns.extension</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>tablecolumns.extension</refname>
+<refpurpose>Enable the table columns extension function</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='tablecolumns.extension.frag'><xsl:param name="tablecolumns.extension" select="'1'"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The table columns extension function adjusts the widths of table
+columns in the HTML result to more accurately reflect the specifications
+in the CALS table.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/target.database.document.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/target.database.document.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/target.database.document.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,27 @@
+<refentry id="target.database.document"> 
+<refmeta> 
+<refentrytitle>target.database.document</refentrytitle> 
+<refmiscinfo role="type">uri</refmiscinfo> 
+</refmeta> 
+<refnamediv> 
+<refname>target.database.document</refname> 
+<refpurpose>Name of master database file for resolving
+olinks</refpurpose> 
+</refnamediv> 
+<refsynopsisdiv> <src:fragment id="target.database.document.frag">
+<xsl:param name="target.database.document" select="''"/>
+</src:fragment> 
+</refsynopsisdiv> 
+<refsect1>
+<title>Description</title> 
+<para>
+To resolve olinks between documents, the stylesheets use
+a master database document that identifies the  target datafiles for all the documents within the scope
+of the olinks. This parameter value is the URI of 
+the master document to be read during processing to resolve olinks.
+The default value is <filename>olinkdb.xml</filename>.</para>
+<para>The data structure of the file is defined in the <filename>targetdatabase.dtd</filename> DTD.  The database file provides the high level elements to record the identifiers, locations, and relationships of documents. The cross reference data for individual documents is generally pulled into the database using system entity references or XIncludes. See also <parameter>targets.filename</parameter>.
+
+</para> 
+</refsect1> 
+</refentry> 

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/targets.filename.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/targets.filename.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/targets.filename.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,27 @@
+<refentry id="targets.filename"> 
+<refmeta> 
+<refentrytitle>targets.filename</refentrytitle> 
+<refmiscinfo role="type">string</refmiscinfo> 
+</refmeta> 
+<refnamediv> 
+<refname>targets.filename</refname> 
+<refpurpose>Name of cross reference targets data file</refpurpose> 
+</refnamediv> 
+<refsynopsisdiv> <src:fragment id="targets.filename.frag">
+<xsl:param name="targets.filename" select="'target.db'"/>
+</src:fragment> 
+</refsynopsisdiv> 
+<refsect1>
+<title>Description</title> 
+<para>
+In order to resolve olinks efficiently, the stylesheets can
+generate an external data file containing information about
+all potential cross reference endpoints in a document.
+This parameter lets you change the name of the generated
+file from the default name <filename>target.db</filename>.
+The name must agree with that used in the target database
+used to resolve olinks during processing.
+See also <parameter>target.database.document</parameter>.
+</para> 
+</refsect1> 
+</refentry> 

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/template.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/template.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/template.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,22 @@
+<refentry id="[[NAME]]">
+<refmeta>
+<refentrytitle>[[NAME]]</refentrytitle>
+<refmiscinfo role="type"></refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>[[NAME]]</refname>
+<refpurpose></refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='[[NAME]].frag'>
+<xsl:param name="[[NAME]]" select=""/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/tex.math.delims.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/tex.math.delims.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/tex.math.delims.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,24 @@
+<refentry id="tex.math.delims">
+<refmeta>
+<refentrytitle>tex.math.delims</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>tex.math.delims</refname>
+<refpurpose>Should be equations outputed for processing by TeX
+automatically surrounded by math mode delimiters</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='tex.math.delims.frag'>
+<xsl:param name="tex.math.delims" select="'1'"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>For compatibility with DSSSL based DBTeXMath from Allin Cottrell
+you should set this parameter to 0.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/tex.math.file.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/tex.math.file.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/tex.math.file.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,24 @@
+<refentry id="tex.math.file">
+<refmeta>
+<refentrytitle>tex.math.file</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>tex.math.file</refname>
+<refpurpose>Name of temporary file for generating images from equations</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='tex.math.file.frag'>
+<xsl:param name="tex.math.file" select="'tex-math-equations.tex'"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Name of auxiliary file for TeX equations. This file can be
+processed by dvi2bitmap to get bitmap versions of equations for HTML
+output.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/tex.math.in.alt.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/tex.math.in.alt.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/tex.math.in.alt.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,56 @@
+<refentry id="tex.math.in.alt">
+<refmeta>
+<refentrytitle>tex.math.in.alt</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>tex.math.in.alt</refname>
+<refpurpose>TeX notation used for equations</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='tex.math.in.alt.frag'>
+<xsl:param name="tex.math.in.alt" select="''"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want type math directly in TeX notation in equations,
+this parameter specifies notation used. Currently are supported two
+values -- <literal>plain</literal> and <literal>latex</literal>. Empty
+value means that you are not using TeX math at all.</para>
+
+<para>Preferred way for including TeX alternative of math is inside of
+<sgmltag>textobject</sgmltag> element. Eg.:</para>
+
+<programlisting><![CDATA[<inlineequation>
+<inlinemediaobject>
+<imageobject>
+<imagedata fileref="eq1.gif"/>
+</imageobject>
+<textobject><phrase>E=mc squared</phrase></textobject>
+<textobject role="tex"><phrase>E=mc^2</phrase></textobject>
+</inlinemediaobject>
+</inlineequation>]]></programlisting>
+
+<para>If you are using <sgmltag>graphic</sgmltag> element, you can
+store TeX inside <sgmltag>alt</sgmltag> element:</para>
+
+<programlisting><![CDATA[<inlineequation>
+<alt role="tex">a^2+b^2=c^2</alt>
+<graphic fileref="a2b2c2.gif"/>  
+</inlineequation>]]></programlisting>
+
+<para>If you want use this feature, you should process your FO with
+PassiveTeX, which only supports TeX math notation. When calling
+stylsheet, don't forget to specify also
+passivetex.extensions=1.</para>
+
+<para>If you want equations in HTML, just process generated file
+<filename>tex-math-equations.tex</filename> by TeX or LaTeX. Then run
+dvi2bitmap program on result DVI file. You will get images for
+equations in your document.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/textinsert.extension.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/textinsert.extension.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/textinsert.extension.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,22 @@
+<refentry id="textinsert.extension">
+<refmeta>
+<refentrytitle>textinsert.extension</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>textinsert.extension</refname>
+<refpurpose>Enable the textinsert extension element</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='textinsert.extension.frag'><xsl:param name="textinsert.extension" select="'1'"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The textinsert extension element inserts the contents of a
+a file into the result tree (as text).
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/title.font.family.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/title.font.family.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/title.font.family.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,24 @@
+<refentry id="title.font.family">
+<refmeta>
+<refentrytitle>title.font.family</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>title.font.family</refname>
+<refpurpose>The default font family for titles</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='title.font.family.frag'>
+<xsl:param name="title.font.family" select="'sans-serif'"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The title font family is used for titles (chapter, section, figure,
+etc.)
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/title.margin.left.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/title.margin.left.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/title.margin.left.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,45 @@
+<refentry id="title.margin.left">
+<refmeta>
+<refentrytitle>title.margin.left</refentrytitle>
+<refmiscinfo role="type"></refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>title.margin.left</refname>
+<refpurpose>Adjust the left margin for titles</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='title.margin.left.frag'>
+<xsl:param name="title.margin.left">
+  <xsl:choose>
+    <xsl:when test="$passivetex.extensions != 0">0pt</xsl:when>
+    <xsl:otherwise>-4pc</xsl:otherwise>
+  </xsl:choose>
+</xsl:param>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This parameter adjusts the left margin for titles,
+effectively leaving the titles at the left
+margin and indenting the body text.
+The default value is -4pc, which means the
+body text is indented 4 picas relative to
+the titles.
+</para>
+<para>
+If you set the value to zero, be sure to still include
+a unit indicator such as <literal>0pt</literal>, or
+the FO processor will report errors.
+</para>
+<para>
+This parameter is set to 0pt if the
+<parameter>passivetex.extensions</parameter>
+parameter is nonzero because PassiveTeX cannot handle
+the math expression with negative values 
+used to calculate the indents.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/toc.indent.width.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/toc.indent.width.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/toc.indent.width.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,28 @@
+<refentry id="toc.indent.width">
+<refmeta>
+<refentrytitle>toc.indent.width</refentrytitle>
+<refmiscinfo role="type">float</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>toc.indent.width</refname>
+<refpurpose>Amount of indentation for TOC entries</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='toc.indent.width.frag'>
+<xsl:param name="toc.indent.width" select="24"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Specifies, in points, the distance by which each level of the
+TOC is indented from its parent.</para>
+
+<para>This value is expressed in points, without
+a unit (in other words, it is a bare number). Using a bare number allows the stylesheet
+to perform calculations that would otherwise have to be performed by the FO processor
+because not all processors support expressions.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/toc.list.type.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/toc.list.type.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/toc.list.type.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,25 @@
+<refentry id="toc.list.type">
+<refmeta>
+<refentrytitle>toc.list.type</refentrytitle>
+<refmiscinfo role="type">list</refmiscinfo>
+<refmiscinfo role="value">dl</refmiscinfo>
+<refmiscinfo role="value">ul</refmiscinfo>
+<refmiscinfo role="value">ol</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>toc.list.type</refname>
+<refpurpose>Type of HTML list element to use for Tables of Contents</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='toc.list.type.frag'><xsl:param name="toc.list.type">dl</xsl:param></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>When an automatically generated Table of Contents (or List of Titles)
+is produced, this HTML element will be used to make the list.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/toc.margin.properties.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/toc.margin.properties.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/toc.margin.properties.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,24 @@
+<refentry id="toc.margin.properties">
+<refnamediv>
+<refname>toc.margin.properties</refname>
+<refpurpose>Margin properties used on Tables of Contents</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='toc.margin.properties.frag'>
+<xsl:attribute-set name="toc.margin.properties">
+  <xsl:attribute name="space-before.minimum">0.5em</xsl:attribute>
+  <xsl:attribute name="space-before.optimum">1em</xsl:attribute>
+  <xsl:attribute name="space-before.maximum">2em</xsl:attribute>
+  <xsl:attribute name="space-after.minimum">0.5em</xsl:attribute>
+  <xsl:attribute name="space-after.optimum">1em</xsl:attribute>
+  <xsl:attribute name="space-after.maximum">2em</xsl:attribute>
+</xsl:attribute-set>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+<para>This attribute set is used on Tables of Contents. These attributes are set
+on the wrapper that surrounds the ToC block, not on each individual lines.</para>
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/toc.max.depth.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/toc.max.depth.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/toc.max.depth.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,20 @@
+<refentry id="toc.max.depth">
+<refmeta>
+<refentrytitle>toc.max.depth</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>toc.max.depth</refname>
+<refpurpose>How maximaly deep should be each TOC?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='toc.max.depth.frag'><xsl:param name="toc.max.depth">8</xsl:param></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Specifies the maximal depth of TOC on all levels.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/toc.section.depth.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/toc.section.depth.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/toc.section.depth.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="toc.section.depth">
+<refmeta>
+<refentrytitle>toc.section.depth</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>toc.section.depth</refname>
+<refpurpose>How deep should recursive <sgmltag>section</sgmltag>s appear
+in the TOC?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='toc.section.depth.frag'><xsl:param name="toc.section.depth">2</xsl:param></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Specifies the depth to which recursive sections should appear in the
+TOC.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/ulink.footnote.number.format.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/ulink.footnote.number.format.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/ulink.footnote.number.format.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="ulink.footnote.number.format">
+<refmeta>
+<refentrytitle>ulink.footnote.number.format</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>ulink.footnote.number.format</refname>
+<refpurpose>Identifies the format used for <sgmltag>ulink</sgmltag> footnote numbers</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='ulink.footnote.number.format.frag'>
+<xsl:param name="ulink.footnote.number.format" select="'1'"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The <parameter>ulink.footnote.number.format</parameter> specifies the format
+to use for footnote numeration (1, i, I, a, or A).</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/ulink.footnotes.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/ulink.footnotes.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/ulink.footnotes.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,24 @@
+<refentry id="ulink.footnotes">
+<refmeta>
+<refentrytitle>ulink.footnotes</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>ulink.footnotes</refname>
+<refpurpose>Generate footnotes for <sgmltag>ULink</sgmltag>s?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='ulink.footnotes.frag'>
+<xsl:param name="ulink.footnotes" select="0"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, the URL of each <sgmltag>ULink</sgmltag> will
+appear as a footnote.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/ulink.hyphenate.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/ulink.hyphenate.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/ulink.hyphenate.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,28 @@
+<refentry id="ulink.hyphenate">
+<refmeta>
+<refentrytitle>ulink.hyphenate</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>ulink.hyphenate</refname>
+<refpurpose>Allow URLs to be automatically hyphenated</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='ulink.hyphenate.frag'>
+<xsl:param name="ulink.hyphenate" select="''"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If not empty, the specified character (or more generally, content) is
+added to URLs after every <quote>/</quote>. If the character specified is a
+Unicode soft hyphen (0x00AD) or Unicode zero-width space (0x200B), some FO
+processors will be able to reasonably hyphenate long URLs.</para>
+
+<para>As of 28 Jan 2002, discretionary hyphens are more widely and correctly
+supported than zero-width spaces for this purpose.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/ulink.show.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/ulink.show.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/ulink.show.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,24 @@
+<refentry id="ulink.show">
+<refmeta>
+<refentrytitle>ulink.show</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>ulink.show</refname>
+<refpurpose>Display URLs after <sgmltag>ulink</sgmltag>s?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='ulink.show.frag'>
+<xsl:param name="ulink.show" select="1"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, the URL of each <sgmltag>ULink</sgmltag> will
+appear after the text of the link. If the text of the link and the URL
+are identical, the URL is suppressed.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/ulink.target.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/ulink.target.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/ulink.target.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,22 @@
+<refentry id="ulink.target">
+<refmeta>
+<refentrytitle>ulink.target</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>ulink.target</refname>
+<refpurpose>The HTML anchor target for ULinks</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='ulink.target.frag'><xsl:param name="ulink.target" select="'_top'"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If <parameter>ulink.target</parameter> is set, its value will
+be used for the <sgmltag class="attribute">target</sgmltag> attribute
+on anchors generated for <sgmltag>ulink</sgmltag>s.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/use.embed.for.svg.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/use.embed.for.svg.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/use.embed.for.svg.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,28 @@
+<refentry id="use.embed.for.svg">
+<refmeta>
+<refentrytitle>use.embed.for.svg</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>use.embed.for.svg</refname>
+<refpurpose>Use HTML <sgmltag>embed</sgmltag> for SVG?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='use.embed.for.svg.frag'>
+<xsl:param name="use.embed.for.svg" select="0"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, an <sgmltag>embed</sgmltag> element will be created for
+SVG figures. An <sgmltag>object</sgmltag> is <emphasis>always</emphasis> created,
+this parameter merely controls whether or not an additional <sgmltag>embed</sgmltag>
+is generated inside the <sgmltag>object</sgmltag>.</para>
+
+<para>On the plus side, this may be more portable among browsers and plug-ins.
+On the minus side, it isn't valid HTML.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/use.extensions.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/use.extensions.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/use.extensions.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,24 @@
+<refentry id="use.extensions">
+<refmeta>
+<refentrytitle>use.extensions</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>use.extensions</refname>
+<refpurpose>Enable extensions</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='use.extensions.frag'><xsl:param name="use.extensions" select="'0'"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, extensions may be used. Each extension is
+further controlled by its own parameter. But if
+<parameter>use.extensions</parameter> is zero, no extensions will
+be used.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/use.id.as.filename.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/use.id.as.filename.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/use.id.as.filename.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="use.id.as.filename">
+<refmeta>
+<refentrytitle>use.id.as.filename</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>use.id.as.filename</refname>
+<refpurpose>Use ID value of chunk elements as the filename?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='use.id.as.filename.frag'><xsl:param name="use.id.as.filename" select="'0'"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If <parameter>use.id.as.filename</parameter>
+is non-zero, the filename of chunk elements that have IDs will be
+derived from the ID value.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/use.id.function.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/use.id.function.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/use.id.function.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,25 @@
+<refentry id="use.id.function">
+<refmeta>
+<refentrytitle>use.id.function</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>use.id.function</refname>
+<refpurpose>Use the XPath id() function to find link targets?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='use.id.function.frag'><xsl:param name="use.id.function" select="'1'"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If 1, the stylesheets use the <function>id()</function> function
+to find the targets of cross reference elements. This is more
+efficient, but only works if your XSLT processor implements the
+<function>id()</function> function, naturally.</para>
+<para>THIS PARAMETER IS NOT SUPPORTED. IT IS ALWAYS ASSUMED TO BE 1.
+SEE xref.xsl IF YOU NEED TO TURN IT OFF.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/use.local.olink.style.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/use.local.olink.style.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/use.local.olink.style.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="use.local.olink.style"> 
+<refmeta> 
+<refentrytitle>use.local.olink.style</refentrytitle> 
+<refmiscinfo role="type">boolean</refmiscinfo> 
+</refmeta> 
+<refnamediv> 
+<refname>use.local.olink.style</refname> 
+<refpurpose>Process olinks using xref style of current
+document</refpurpose> 
+</refnamediv> 
+<refsynopsisdiv> <src:fragment id="use.local.olink.style.frag">
+<xsl:param name="use.local.olink.style" select="0"/> </src:fragment> 
+</refsynopsisdiv> 
+<refsect1> 
+<title>Description</title> 
+<para>When cross reference data is collected for use by olinks, the data for each potential target includes one field containing a completely assembled cross reference string, as if it were an xref generated in that document. Other fields record the separate title, number, and element name of each target. When an olink is formed to a target from another document, the olink resolves to that preassembled string by default. If the <parameter>use.local.olink.style</parameter> parameter is set to non-zero, then instead the cross
+reference string is formed again from the target title, number, and
+element name, using the stylesheet processing the targeting document.
+Then olinks will match the xref style in the targeting document
+rather than in the target document. If  both documents are processed
+with the same stylesheet, then the results will be the same.</para> 
+</refsect1> 
+</refentry> 

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/use.role.as.xrefstyle.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/use.role.as.xrefstyle.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/use.role.as.xrefstyle.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,91 @@
+<refentry id="use.role.as.xrefstyle">
+<refmeta>
+<refentrytitle>use.role.as.xrefstyle</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>use.role.as.xrefstyle</refname>
+<refpurpose>Use <sgmltag class="attribute">role</sgmltag> attribute for
+<sgmltag class="attribute">xrefstyle</sgmltag> on <sgmltag>xref</sgmltag>?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='use.role.as.xrefstyle.frag'>
+<xsl:param name="use.role.as.xrefstyle" select="1"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, the <sgmltag class="attribute">role</sgmltag> attribute on
+<sgmltag>xref</sgmltag> will be used to select the cross reference style.
+The <ulink url="http://www.oasis-open.org/docbook/">DocBook
+Technical Committee</ulink> recently added an
+<sgmltag class="attribute">xrefstyle</sgmltag> attribute for this purpose.
+If the <sgmltag class="attribute">xrefstyle</sgmltag> attribute
+is present, <sgmltag class="attribute">role</sgmltag> will be ignored, regardless
+of this setting.</para>
+
+<para>Until an official DocBook release that includes the new
+attribute, this flag allows <sgmltag class="attribute">role</sgmltag>
+to serve that purpose.</para>
+
+</refsect1>
+
+<refsect1><title>Example</title>
+
+<para>The following small stylesheet shows how to configure the stylesheets to make
+use of the cross reference style:</para>
+
+<programlisting><![CDATA[<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                version="1.0">
+
+<xsl:import href="../xsl/html/docbook.xsl"/>
+
+<xsl:output method="html"/>
+
+<xsl:param name="local.l10n.xml" select="document('')"/>
+<l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
+  <l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="en">
+   <l:context name="xref">
+      <l:template name="chapter" style="title" text="Chapter %n, %t"/>
+      <l:template name="chapter" text="Chapter %n"/>
+    </l:context>
+  </l:l10n>
+</l:i18n>
+
+</xsl:stylesheet>]]></programlisting>
+
+<para>With this stylesheet, the cross references in the following document:</para>
+
+<programlisting><![CDATA[<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+                  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<book id="book"><title>Book</title>
+
+<preface>
+<title>Preface</title>
+
+<para>Normal: <xref linkend="ch1"/>.</para>
+<para>Title: <xref xrefstyle="title" linkend="ch1"/>.</para>
+
+</preface>
+
+<chapter id="ch1">
+<title>First Chapter</title>
+
+<para>Irrelevant.</para>
+
+</chapter>
+</book>]]></programlisting>
+
+<para>will appear as:</para>
+
+<informalexample>
+<para>Normal: Chapter 1.</para>
+<para>Title: Chapter 1, <emphasis>First Chapter</emphasis>.</para>
+</informalexample>
+</refsect1>
+
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/use.role.for.mediaobject.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/use.role.for.mediaobject.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/use.role.for.mediaobject.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,51 @@
+<refentry id="use.role.for.mediaobject">
+<refmeta>
+<refentrytitle>use.role.for.mediaobject</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>use.role.for.mediaobject</refname>
+<refpurpose>Use <sgmltag class="attribute">role</sgmltag> attribute 
+value for selecting which of several objects within a mediaobject to use.
+</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='use.role.for.mediaobject.frag'>
+<xsl:param name="use.role.for.mediaobject" select="1"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, the <sgmltag class="attribute">role</sgmltag> attribute on
+<sgmltag>imageobject</sgmltag>s or other objects within a <sgmltag>mediaobject</sgmltag> container will be used to select which object will be
+used.
+</para>
+<para>
+The order of selection when then parameter is non-zero is:
+</para>
+<orderedlist>
+<listitem>
+    <para>If the stylesheet parameter <parameter>preferred.mediaobject.role</parameter> has a value, then the object whose role equals that value is selected.</para>
+</listitem>
+<listitem>
+<para>Else if an object's role attribute has a value of
+<literal>html</literal> for HTML processing or
+<literal>fo</literal> for FO output, then the first
+of such objects is selected.
+</para>
+</listitem>
+<listitem>
+<para>Else the first suitable object is selected.</para>
+</listitem>
+</orderedlist>
+<para>
+If the value of 
+<parameter>use.role.for.mediaobject</parameter>
+is zero, then role attributes are not considered
+and the first suitable object
+with or without a role value is used.
+</para>
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/use.svg.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/use.svg.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/use.svg.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,25 @@
+<refentry id="use.svg">
+<refmeta>
+<refentrytitle>use.svg</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>use.svg</refname>
+<refpurpose>Allow SVG in the result tree?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='use.svg.frag'>
+<xsl:param name="use.svg" select="1"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, SVG will be considered an acceptable image format. SVG
+is passed through to the result tree, so correct rendering of the resulting
+diagram depends on the formatter (FO processor or web browser) that is used
+to process the output from the stylesheet.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/variablelist.as.blocks.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/variablelist.as.blocks.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/variablelist.as.blocks.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,44 @@
+<refentry id="variablelist.as.blocks">
+<refmeta>
+<refentrytitle>variablelist.as.blocks</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>variablelist.as.blocks</refname>
+<refpurpose>Format <sgmltag>variablelist</sgmltag>s lists as blocks?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='variablelist.as.blocks.frag'>
+<xsl:param name="variablelist.as.blocks" select="0"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, <sgmltag>variablelist</sgmltag>s will be formatted as
+blocks.</para>
+
+<para>If you have long terms, proper list markup in the FO case may produce
+unattractive lists. By setting this parameter, you can force the stylesheets
+to produce block markup instead of proper lists.</para>
+
+<para>You can override this setting with a processing instruction as the
+child of <sgmltag>variablelist</sgmltag>: <sgmltag class="pi">dbfo
+list-presentation="blocks"</sgmltag> or <sgmltag class="pi">dbfo
+list-presentation="list"</sgmltag></para>
+
+<programlisting><![CDATA[  <variablelist>
+        <?dbfo list-presentation="list"?>
+        <section>
+          <term>list</term>
+          <listitem>
+                <para>
+                  Formatted as a list even if variablelist.as.blocks is set to 1.
+                </para>
+          </listitem>
+        </section>
+  </variablelist>]]></programlisting>
+</refsect1>
+
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/variablelist.as.table.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/variablelist.as.table.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/variablelist.as.table.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,27 @@
+<refentry id="variablelist.as.table">
+<refmeta>
+<refentrytitle>variablelist.as.table</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>variablelist.as.table</refname>
+<refpurpose>Format <sgmltag>variablelist</sgmltag>s as tables?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='variablelist.as.table.frag'>
+<xsl:param name="variablelist.as.table" select="0"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, <sgmltag>variablelist</sgmltag>s will be formatted as
+tables.</para>
+
+<para>This parameter only applys to the HTML transformations. In the
+FO case, proper list markup is robust enough to handle the formatting.
+But see also <parameter>variablelist.as.blocks</parameter>.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/variablelist.max.termlength.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/variablelist.max.termlength.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/variablelist.max.termlength.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,41 @@
+<refentry id="variablelist.max.termlength">
+<refmeta>
+<refentrytitle>variablelist.max.termlength</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>variablelist.max.termlength</refname>
+<refpurpose>Specifies the longest term in variablelists</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='variablelist.max.termlength.frag'>
+<xsl:param name="variablelist.max.termlength">24</xsl:param>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>In variablelists, the <sgmltag>listitem</sgmltag>
+is indented to leave room for the 
+<sgmltag>term</sgmltag> elements. That indent may be computed
+if it is not specified with a <sgmltag class="attribute">termlength</sgmltag>
+attribute on the <sgmltag>variablelist</sgmltag> element.
+</para>
+<para>
+The computation counts characters in the 
+<sgmltag>term</sgmltag> elements in the list
+to find the longest term.  However, some terms are very long
+and would produce extreme indents.  This parameter lets you
+set a maximum character count.  Any terms longer than the maximum
+would line wrap.  The default value is 24.
+</para>
+<para>
+The character counts are converted to physical widths
+by multiplying by 0.50em. There will be some variability
+in how many actual characters fit in the space
+since some characters are wider than others.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/verbatim.properties.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/verbatim.properties.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/verbatim.properties.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+<refentry id="verbatim.properties">
+<refnamediv>
+<refname>verbatim.properties</refname>
+<refpurpose>Properties associated with verbatim text</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='verbatim.properties.frag'>
+<xsl:attribute-set name="verbatim.properties">
+  <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute>
+  <xsl:attribute name="space-before.optimum">1em</xsl:attribute>
+  <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute>
+  <xsl:attribute name="space-after.minimum">0.8em</xsl:attribute>
+  <xsl:attribute name="space-after.optimum">1em</xsl:attribute>
+  <xsl:attribute name="space-after.maximum">1.2em</xsl:attribute>
+</xsl:attribute-set></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+<para>This attribute set is used on all verbatim environments.</para>
+</refsect1>
+
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/xep.extensions.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/xep.extensions.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/xep.extensions.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,24 @@
+<refentry id="xep.extensions">
+<refmeta>
+<refentrytitle>xep.extensions</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>xep.extensions</refname>
+<refpurpose>Enable XEP extensions?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='xep.extensions.frag'><xsl:param name="xep.extensions" select="0"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero,
+<ulink url="http://www.renderx.com/">XEP</ulink>
+extensions will be used. XEP extensions consists of PDF bookmarks,
+document information and better index processing.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/xep.index.item.properties.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/xep.index.item.properties.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/xep.index.item.properties.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,24 @@
+<refentry id="xep.index.item.properties">
+<refnamediv>
+<refname>xep.index.item.properties</refname>
+<refpurpose>Properties associated with XEP index-items</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='xep.index.item.properties.frag'>
+<xsl:attribute-set name="xep.index.item.properties">
+  <xsl:attribute name="merge-subsequent-page-numbers">true</xsl:attribute>
+  <xsl:attribute name="link-back">true</xsl:attribute>
+</xsl:attribute-set>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Properties associated with XEP index-items. For more info see
+the section "Indexes" in
+<ulink
+    url="http://xep.xattic.com/xep/doc/spec.html"/>.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/xref.label-page.separator.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/xref.label-page.separator.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/xref.label-page.separator.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,33 @@
+<refentry id="xref.label-page.separator">
+<refmeta>
+<refentrytitle>xref.label-page.separator</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>xref.label-page.separator</refname>
+<refpurpose>Punctuation or space separating label from page number in xref</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='xref.label-page.separator.frag'><xsl:param name="xref.label-page.separator"><xsl:text> </xsl:text></xsl:param></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>
+This parameter allows you to control the punctuation of certain
+types of generated cross reference text.
+When cross reference text is generated for an 
+<sgmltag class="element">xref</sgmltag> or 
+<sgmltag class="element">olink</sgmltag> element
+using an <sgmltag class="attribute">xrefstyle</sgmltag> attribute
+that makes use of the <literal>select:</literal> feature,
+and the selected components include both label and page
+but no title,
+then the value of this parameter is inserted between
+label and page number in the output.  
+If a title is included, then other separators are used.
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/xref.label-title.separator.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/xref.label-title.separator.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/xref.label-title.separator.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,31 @@
+<refentry id="xref.label-title.separator">
+<refmeta>
+<refentrytitle>xref.label-title.separator</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>xref.label-title.separator</refname>
+<refpurpose>Punctuation or space separating label from title in xref</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='xref.label-title.separator.frag'><xsl:param name="xref.label-title.separator">: </xsl:param></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>
+This parameter allows you to control the punctuation of certain
+types of generated cross reference text.
+When cross reference text is generated for an 
+<sgmltag class="element">xref</sgmltag> or 
+<sgmltag class="element">olink</sgmltag> element
+using an <sgmltag class="attribute">xrefstyle</sgmltag> attribute
+that makes use of the <literal>select:</literal> feature,
+and the selected components include both label and title,
+then the value of this parameter is inserted between
+label and title in the output.  
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/xref.properties.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/xref.properties.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/xref.properties.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,19 @@
+<refentry id="xref.properties">
+<refnamediv>
+<refname>xref.properties</refname>
+<refpurpose>Properties associated with cross-reference text</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='xref.properties.frag'>
+<xsl:attribute-set name="xref.properties">
+</xsl:attribute-set>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This attribute set is used on cross reference text.</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/xref.title-page.separator.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/xref.title-page.separator.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/xref.title-page.separator.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,31 @@
+<refentry id="xref.title-page.separator">
+<refmeta>
+<refentrytitle>xref.title-page.separator</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>xref.title-page.separator</refname>
+<refpurpose>Punctuation or space separating title from page number in xref</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='xref.title-page.separator.frag'><xsl:param name="xref.title-page.separator"><xsl:text> </xsl:text></xsl:param></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>
+This parameter allows you to control the punctuation of certain
+types of generated cross reference text.
+When cross reference text is generated for an 
+<sgmltag class="element">xref</sgmltag> or 
+<sgmltag class="element">olink</sgmltag> element
+using an <sgmltag class="attribute">xrefstyle</sgmltag> attribute
+that makes use of the <literal>select:</literal> feature,
+and the selected components include both title and page number,
+then the value of this parameter is inserted between
+title and page number in the output.  
+</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/xref.with.number.and.title.xml
===================================================================
--- branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/xref.with.number.and.title.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/src/main/resources/support/docbook-xsl/params/xref.with.number.and.title.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,22 @@
+<refentry id="xref.with.number.and.title">
+<refmeta>
+<refentrytitle>xref.with.number.and.title</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>xref.with.number.and.title</refname>
+<refpurpose>Use number and title in cross references</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='xref.with.number.and.title.frag'>
+<xsl:param name="xref.with.number.and.title" select="1"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:</para>
+
+</refsect1>
+</refentry>

Added: branches/refactor1/docs/xslt/support/lib/avalon-framework-cvs-20020806.jar
===================================================================
(Binary files differ)


Property changes on: branches/refactor1/docs/xslt/support/lib/avalon-framework-cvs-20020806.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: branches/refactor1/docs/xslt/support/lib/batik.jar
===================================================================
(Binary files differ)


Property changes on: branches/refactor1/docs/xslt/support/lib/batik.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: branches/refactor1/docs/xslt/support/lib/fop.jar
===================================================================
(Binary files differ)


Property changes on: branches/refactor1/docs/xslt/support/lib/fop.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: branches/refactor1/docs/xslt/support/lib/jai_codec.jar
===================================================================
(Binary files differ)


Property changes on: branches/refactor1/docs/xslt/support/lib/jai_codec.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: branches/refactor1/docs/xslt/support/lib/jai_core.jar
===================================================================
(Binary files differ)


Property changes on: branches/refactor1/docs/xslt/support/lib/jai_core.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: branches/refactor1/docs/xslt/support/lib/rowan-0.1.jar
===================================================================
(Binary files differ)


Property changes on: branches/refactor1/docs/xslt/support/lib/rowan-0.1.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: branches/refactor1/docs/xslt/support/lib/saxon-dbxsl-extensions.jar
===================================================================
(Binary files differ)


Property changes on: branches/refactor1/docs/xslt/support/lib/saxon-dbxsl-extensions.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: branches/refactor1/docs/xslt/support/lib/saxon.jar
===================================================================
(Binary files differ)


Property changes on: branches/refactor1/docs/xslt/support/lib/saxon.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: branches/refactor1/docs/xslt/support.properties
===================================================================
--- branches/refactor1/docs/xslt/support.properties	                        (rev 0)
+++ branches/refactor1/docs/xslt/support.properties	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,2 @@
+#Wed Apr 11 15:30:36 EEST 2007
+ajax4jsf.location=${support.startdir}/../..

Added: branches/refactor1/docs/xslt/support.xml
===================================================================
--- branches/refactor1/docs/xslt/support.xml	                        (rev 0)
+++ branches/refactor1/docs/xslt/support.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,259 @@
+<project name="DocSupport" default="all.doc" basedir=".">
+
+        <dirname property="support.startdir" file="${ant.file.DocSupport}"/>
+
+	<property name="support.basedir" value="${support.startdir}"/>
+
+	<property file="${support.startdir}/support.properties" />
+
+    <!-- Set build directories for all formats. -->
+    <property name="build.dir"             value="${basedir}/build"/>
+
+    <!-- Support files for build process. -->
+    <property name="support.dir"           value="${support.basedir}/support"/>
+    <property name="styles.dir"            value="${support.basedir}/src/main/resources"/>
+
+    <!-- Set DocBook stylesheets. -->
+    <property name="db.style.fopdf"        value="fopdf.xsl"/>
+    <property name="db.style.html"         value="html_chunk.xsl"/>
+    <property name="db.style.htmlsingle"   value="html.xsl"/>
+
+    <property name="maxmem"                value="1024m" />
+
+    <xmlcatalog id="docbook.catalog">
+        <catalogpath path="${support.basedir}/src/main/resources/support/docbook-dtd/catalog.xml" />
+    </xmlcatalog>
+
+
+    <!-- Classpath for the build tools. -->
+    <path id="lib.classpath">
+        <fileset dir="${support.dir}/lib">
+			<include name="**/saxon1.jar" />
+		</fileset>
+		<dirset dir="." />
+		<fileset dir="${support.dir}/lib">
+            <include name="**/*.jar"/>
+			<exclude name="**/saxon1.jar"/>
+        </fileset>
+    </path>
+
+    <!-- ################################################################## -->
+
+    <target name="all.doc" depends="clean">
+        <antcall target="lang.all"><param name="lang" value="en"/></antcall>
+    </target>
+
+    <!-- ################################################################## -->
+
+    <target name="lang.all.bypass.check" unless="lang.all.bypass.disabled">
+       <uptodate property="lang.all.bypass.on" targetfile="${build.dir}/${lang}pdf/${pdf.name}">
+          <srcfiles dir="${support.basedir}" includes="**"/>
+          <srcfiles dir="${basedir}/${lang}" includes="**"/>
+          <srcfiles dir="${basedir}" includes="build.xml"/>
+       </uptodate>
+    </target>
+
+    <target name="lang.all.run" depends="lang.all.bypass.check, lang.all.bypass.message" unless="lang.all.bypass.on">
+       <antcall target="clean"/>
+       <antcall target="lang.all"/>
+    </target>
+    
+    <target name="lang.all.bypass.message" if="lang.all.bypass.on">
+       <echo>Already uptodate: ${build.dir}/${lang}pdf/${pdf.name}</echo>
+       <echo>add -Dlang.all.bypass.disabled=true to force a rebuild</echo>
+    </target>
+
+    <!-- ################################################################## -->
+
+    <target name="lang.dochtml.bypass.check" unless="lang.dochtml.bypass.disabled">
+       <uptodate property="lang.dochtml.bypass.on" targetfile="${build.dir}/${lang}html/index.html">
+          <srcfiles dir="${support.basedir}" includes="**"/>
+          <srcfiles dir="${basedir}/${lang}" includes="**"/>
+          <srcfiles dir="${basedir}" includes="build.xml"/>
+       </uptodate>
+    </target>
+
+    <target name="lang.dochtml.run" depends="lang.dochtml.bypass.check, lang.dochtml.bypass.message" unless="lang.dochtml.bypass.on">
+       <antcall target="clean.dochtml"/>
+       <antcall target="lang.dochtml"/>
+       <antcall target="lang.dochtmlsingle"/>
+    </target>
+    
+    <target name="lang.dochtml.bypass.message" if="lang.dochtml.bypass.on">
+       <echo>Already uptodate: ${build.dir}/${lang}html/index.html</echo>
+       <echo>add -Dlang.dochtml.bypass.disabled=true to force a rebuild</echo>
+    </target>
+
+    <!-- ################################################################## -->
+
+    <target name="clean">
+        <!-- Delete build directory. -->
+        <delete dir="${build.dir}"/>
+    </target>
+
+    <target name="clean.dochtml">
+        <!-- Delete build directory for single html -->
+        <delete dir="${build.dir}/${lang}html"/>
+        <delete dir="${build.dir}/${lang}html_single"/>
+    </target>
+
+	<target name="collect-tld">
+	    <mkdir dir="${basedir}/${lang}/target/generated" />
+		<copy flatten="yes" todir="${basedir}/${lang}/target/generated">
+			<fileset dir="${ajax4jsf.location}">
+				<include name="framework/target/classes/META-INF/*.tld"/> 
+			</fileset>	
+
+		</copy>
+	  <touch>
+	    <fileset dir="${basedir}/${lang}/target/generated">
+			<include name="*.tld" />
+		</fileset>
+	  </touch>
+	</target>
+
+	<!-- - - - - - - - - - - - - - - - - - 
+          target: tld2docbook                      
+         - - - - - - - - - - - - - - - - - -->
+    <target name="tld2docbook" depends="collect-tld">
+		<!--Target must be started for every component in library till 
+		the one tld file for all the components isn't present-->
+    	<xslt classpathref="lib.classpath" style="${styles.dir}/${lang}/f.xsl" basedir="${basedir}/${lang}/target/generated" destdir="${basedir}/${lang}/target/generated">
+			<include name="*.tld"/>
+    		
+    		<mapper type="glob" from="*.tld" to="*.xml" />
+    
+    		<param name="lang" expression="${basedir}/${lang}/src/main/docbook"/>
+    	</xslt>
+		<!--End of the tld process-->
+    </target>
+	
+	
+	
+    <!-- ################################################################## -->
+
+    <target name="lang.all">
+        <antcall target="lang.docpdf"/>
+        <antcall target="lang.dochtml"/>
+        <antcall target="lang.dochtmlsingle"/>
+        <!-- 
+        <antcall target="lang.htmlmisc"/>
+        -->
+    </target>
+
+    <target name="lang.docpdf" depends="tld2docbook">
+        <!-- Copy all the images to the output location, 
+             will be removed later. -->
+        <copy todir="${build.dir}/${lang}/pdf/images">
+            <fileset dir="${basedir}/${lang}/src/main/resources/images">
+                <include name="**/*.png"/>
+                <include name="**/*.svg"/>
+                <include name="**/*.gif"/>
+                <include name="**/*.jpg"/>
+            </fileset>
+        </copy>
+
+        <!-- Create the XSL/FO temporary file. -->
+
+        <java classname="com.icl.saxon.StyleSheet"
+              maxmemory="${maxmem}"
+              fork="true" dir="${basedir}">
+            <classpath refid="lib.classpath"/>
+            <arg value="-o" />
+            <arg value="${build.dir}/${lang}/pdf/docbook_fop.tmp"/>
+            <arg value="${basedir}/${lang}/src/main/docbook/master.xml"/>
+            <arg value="${styles.dir}/${lang}/${db.style.fopdf}"/>
+        </java>
+
+
+<!--
+        <xslt out="${build.dir}/${lang}pdf/docbook_fop.tmp"
+                   in="${basedir}/${lang}/src/main/docbook/master.xml"
+              style="${styles.dir}/${lang}/${db.style.fopdf}">
+            <xmlcatalog refid="docbook.catalog"/>
+        </xslt>
+-->
+        <!-- Create a PDF from the XSL/FO. -->
+        <java classname="org.apache.fop.apps.Fop" 
+	      maxmemory="${maxmem}"
+              fork="true" dir="${basedir}">
+            <classpath refid="lib.classpath"/>
+            <arg value="${build.dir}/${lang}/pdf/docbook_fop.tmp"/>
+            <arg value="${build.dir}/${lang}/pdf/${pdf.name}"/>
+        </java>
+
+        <!-- Delete temporary files. -->
+        <delete file="${build.dir}/${lang}/pdf/docbook_fop.tmp"/>
+        <delete dir="${build.dir}/${lang}/pdf/images"/>
+    </target>
+
+    <target name="lang.dochtml" depends="tld2docbook">
+        <mkdir dir="${build.dir}/${lang}/html/"/>
+
+        <!-- Copy all the images to the output location -->
+        <copy todir="${build.dir}/${lang}/html/images">
+            <fileset dir="${basedir}/${lang}/src/main/resources/images">
+                <include name="**/*.png"/>
+                <include name="**/*.gif"/>
+                <include name="**/*.jpg"/>
+            </fileset>
+        </copy>
+        <copy todir="${build.dir}/${lang}/html/css">
+            <fileset dir="${styles.dir}/${lang}">
+                <include name="**/*.css"/>
+            </fileset>
+        </copy>
+
+        <java classname="com.icl.saxon.StyleSheet"
+              fork="true" dir="${build.dir}/${lang}/html">
+            <classpath refid="lib.classpath"/>
+            <arg value="${basedir}/${lang}/src/main/docbook/master.xml"/>
+            <arg value="${styles.dir}/${lang}/${db.style.html}"/>
+        </java>
+    </target>
+
+    <target name="lang.dochtmlsingle" depends="tld2docbook">
+        <mkdir dir="${build.dir}/${lang}/html_single/"/>
+
+        <!-- Copy all the images to the output location -->
+        <copy todir="${build.dir}/${lang}/html_single/images">
+            <fileset dir="${basedir}/${lang}/src/main/resources/images">
+                <include name="**/*.png"/>
+                <include name="**/*.gif"/>
+                <include name="**/*.jpg"/>
+            </fileset>
+        </copy>
+        <copy todir="${build.dir}/${lang}/html_single/css">
+            <fileset dir="${styles.dir}/${lang}">
+                <include name="**/*.css"/>
+            </fileset>
+        </copy>
+
+        <java classname="com.icl.saxon.StyleSheet" 
+	      fork="true" dir="${basedir}">
+            <classpath refid="lib.classpath"/>
+            <arg value="-o"/>
+            <arg value="${build.dir}/${lang}/html_single/index.html"/>
+            <arg value="${basedir}/${lang}/src/main/docbook/master.xml"/>
+            <arg value="${styles.dir}/${lang}/${db.style.htmlsingle}"/>
+        </java>
+    </target>
+
+    <!-- I do not really like to have external dependency for HTML pages 
+         So, I am not using this task ... -->
+    <target name="lang.htmlmisc" depends="tld2docbook">
+        <!-- Copy images and CSS for HTML documentation, language specific. -->
+        <copy todir="${build.dir}/${lang}/shared/images">
+            <fileset dir="${basedir}/${lang}/images">
+                <include name="**/*.png"/>
+                <include name="**/*.gif"/>
+            </fileset>
+        </copy>
+
+        <copy todir="${build.dir}/${lang}/shared/css">
+            <fileset dir="${styles.dir}/${lang}">
+                <include name="**/*.css"/>
+            </fileset>
+        </copy>
+    </target>
+</project>

Added: branches/refactor1/extensions/gwt/.svnignore
===================================================================
--- branches/refactor1/extensions/gwt/.svnignore	                        (rev 0)
+++ branches/refactor1/extensions/gwt/.svnignore	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1 @@
+target

Added: branches/refactor1/extensions/gwt/pom.xml
===================================================================
--- branches/refactor1/extensions/gwt/pom.xml	                        (rev 0)
+++ branches/refactor1/extensions/gwt/pom.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,164 @@
+<?xml version="1.0"?>
+<project>
+	<parent>
+		<artifactId>master</artifactId>
+		<groupId>org.ajax4jsf</groupId>
+		<version>1.1.2-SNAPSHOT</version>
+	</parent>
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>org.ajax4jsf</groupId>
+	<artifactId>gwtjsf</artifactId>
+	<name>Google web toolkit and JSF integration library</name>
+	<url>https://ajax4jsf.dev.java.net</url>
+	<properties>
+		<jsfVersion>1.2</jsfVersion>
+	</properties>
+
+
+<!-- valiant, but failed, attempt to make GWTShell run under Maven.
+see http://groups.google.com/group/gwt-maven/browse_thread/thread/09885f643c7b4d67/# for painful details. 
+- RobJ 20070619 -->
+
+<!--
+    <profiles>
+        <profile>
+            <id>darwin</id>
+            <activation>
+            <os>
+                <family>mac</family>
+            </os>
+            </activation>
+            <dependencies>
+                <dependency>
+                    <groupId>com.google.gwt</groupId>
+                    <artifactId>gwt-dev-mac</artifactId>
+                    <version>1.4.10</version>
+                </dependency>
+            </dependencies>
+        </profile>
+        <profile>
+            <id>linux</id>
+            <activation>
+            <os>
+                <family>unix</family>
+            </os>
+            </activation>
+            <dependencies>
+                <dependency>
+                    <groupId>com.google.gwt</groupId>
+                    <artifactId>gwt-dev-linux</artifactId>
+                    <version>1.4.10</version>
+                </dependency>
+            </dependencies>
+        </profile>
+        <profile>
+            <id>windows</id>
+            <activation>
+            <os>
+                <family>windows</family>
+            </os>
+            </activation>
+            <dependencies>
+                <dependency>
+                    <groupId>com.google.gwt</groupId>
+                    <artifactId>gwt-dev-linux</artifactId>
+                    <version>1.4.10</version>
+                </dependency>
+            </dependencies>
+        </profile>
+    </profiles> 
+    
+-->	
+	
+    <build>
+
+		<plugins>
+			<plugin>
+				<artifactId>maven-source-plugin</artifactId>
+				<executions>
+					<execution>
+						<id>attach-source</id>
+						<goals>
+							<goal>jar</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
+		</plugins>
+		
+	</build>
+
+	<dependencies>
+
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<version>3.8.1</version>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.ajax4jsf</groupId>
+			<artifactId>ajax4jsf</artifactId>
+			<version>${project.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>com.sun.facelets</groupId>
+			<artifactId>jsf-facelets</artifactId>
+			<version>1.1.11</version>
+		</dependency>
+		
+		<dependency>
+			<groupId>javax.servlet</groupId>
+			<artifactId>servlet-api</artifactId>
+			<version>2.5</version>
+		</dependency>
+		<dependency>
+			<groupId>javax.servlet.jsp</groupId>
+			<artifactId>jsp-api</artifactId>
+			<version>2.1</version>
+		</dependency>
+		<dependency>
+			<groupId>javax.faces</groupId>
+			<artifactId>jsf-api</artifactId>
+			<version>1.2_03</version>
+		</dependency>
+		<dependency>
+			<groupId>javax.faces</groupId>
+			<artifactId>jsf-impl</artifactId>
+			<version>1.2_03</version>
+		</dependency>
+		
+		<dependency>
+			<groupId>javax.el</groupId>
+			<artifactId>el-api</artifactId>
+			<version>1.0</version>
+		</dependency>
+		
+		<dependency>
+			<groupId>com.google.gwt</groupId>
+			<artifactId>gwt-servlet</artifactId>
+			<!-- updated to 1.4.10 - RobJ 20070615 -->
+			<version>1.4.10</version>
+		</dependency>
+		
+		<dependency>
+			<groupId>com.google.gwt</groupId>
+			<artifactId>gwt-user</artifactId>
+			<!-- set to scope=provided to prevent including in WAR, 
+				 as per http://gwt-maven.googlecode.com/svn/docs/maven-googlewebtoolkit2-plugin/index.html 
+			     - RobJ 20070615 -->
+			<scope>provided</scope>
+			<!-- updated to 1.4.10 - RobJ 20070615 -->
+			<version>1.4.10</version>
+		</dependency>
+	</dependencies>
+
+	<repositories>
+		<!-- add gwt-maven repository - RobJ 20070618 -->
+		<repository>
+			<id>gwt-maven</id>
+			<url>http://gwt-maven.googlecode.com/svn/trunk/mavenrepo/</url>
+		</repository>
+	</repositories>
+	
+</project>
\ No newline at end of file

Added: branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/ComponentEntryPoint.java
===================================================================
--- branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/ComponentEntryPoint.java	                        (rev 0)
+++ branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/ComponentEntryPoint.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,352 @@
+/**
+ * 
+ */
+package org.ajax4jsf.gwt.client;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import com.google.gwt.core.client.EntryPoint;
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.user.client.DOM;
+import com.google.gwt.user.client.Element;
+import com.google.gwt.user.client.rpc.ServiceDefTarget;
+import com.google.gwt.user.client.ui.RootPanel;
+import com.google.gwt.user.client.ui.Widget;
+
+/**
+ * Base class for G4JSF components.  Provides infrastructure for hooking module loading, integrating
+ * with JSF state management, handling widget parameters, et al.
+ *
+ * @author shura
+ * @author Rob Jellinghaus
+ */
+public abstract class ComponentEntryPoint implements EntryPoint {
+
+	public static final String GWT_MODULE_NAME_PARAMETER = "x-gwtcallingmodule";
+	private static String viewState;
+
+	/*
+	 * (non-Javadoc)
+	 *
+	 * @see com.google.gwt.core.client.EntryPoint#onModuleLoad()
+	 */
+	public void onModuleLoad() {
+		// Init callback script
+		String jsFunction = "_create_" + GWT.getModuleName().replace('.', '_');
+		initJS(jsFunction);
+		List elements = findElementsForClass(RootPanel.getBodyElement(), GWT
+				.getModuleName());
+		Element viewStateField = DOM.getElementById("javax.faces.ViewState");
+		if (null != viewStateField) {
+			viewState = DOM.getAttribute(viewStateField, "value");
+		}
+		for (Iterator iter = elements.iterator(); iter.hasNext();) {
+			Element element = (Element) iter.next();
+			String id = DOM.getAttribute(element, "id");
+			// got viev state parameter
+			Widget widget = createWidget(id);
+			// RootPanel clear it content - widget can need use it.
+			RootPanel panel = RootPanel.get(id);
+			panel.add(widget);
+		}
+	}
+
+	/**
+	 * Get map of widget parameters. Default data will be stored in hidden span
+	 * element with id as id+":_data" by child elements - title attribute is
+	 * param name, enclosing text - value.
+	 *
+	 * @param id -
+	 *            clientId of JSF component.
+	 * @return map of widget parameters.
+	 */
+	protected Map getWidgetParams(String id) {
+		// Parse parameters.
+		String dataId = id + ":_data";
+		Element dataElement = DOM.getElementById(dataId);
+		Map params = new HashMap();
+		if (null != dataElement) {
+			int childCount = DOM.getChildCount(dataElement);
+			fillParamsMap(dataElement, params, childCount);
+		}
+		return params;
+	}
+
+	/**
+	 * Fill parameters map by data from given element. If data element don't have child elements,
+	 * got content as text, else - put new map with content of recursive same method.
+	 * @param dataElement
+	 * @param params
+	 * @param childCount
+	 */
+	private void fillParamsMap(Element dataElement, Map params, int childCount) {
+		for (int it = 0; it < childCount; it++) {
+			Element data = DOM.getChild(dataElement, it);
+			String key = DOM.getAttribute(data, "title");
+			if (null != key) {
+				int dataChildCount = DOM.getChildCount(data);
+				if (dataChildCount > 0) {
+					// Put data from child elements as new map
+					Map innerData = new HashMap(dataChildCount);
+					fillParamsMap(data,innerData,dataChildCount);
+					params.put(key,innerData);
+				} else {
+					// Simple text value
+					String innerText = DOM.getInnerText(data);
+					params.put(key, innerText);
+				}
+			}
+		}
+	}
+
+    /**
+     * Private cached static map of meta gwt:property values, defined as
+     * (meta name="gwt:property" content="propName=value").
+     */
+    private static Map gwtMetaProperties = null;
+
+    /**
+     * Get a named meta property from the current root panel's head element.
+     * Statically cached for efficiency.  Whoops, what if there are different meta properties
+     * on each page?
+     */
+    public static String getMetaProperty(String propName) {
+        if (gwtMetaProperties == null) {
+            gwtMetaProperties = new HashMap();
+
+            Element bodyElement = RootPanel.getBodyElement();
+            // go up to the parent
+            Element htmlElement = DOM.getParent(bodyElement);
+            // iterate over meta children
+            Element headElement = DOM.getFirstChild(htmlElement);
+
+            int count = DOM.getChildCount(headElement);
+            for (int i = 0; i < count; i++) {
+                Element nextChild = DOM.getChild(headElement, i);
+                if ("meta".equalsIgnoreCase(getElementTagName(nextChild))) {
+                    String nameAttribute = DOM.getAttribute(nextChild, "name");
+                    if ("gwt:property".equals(nameAttribute)) {
+                        String contentAttribute = DOM.getAttribute(nextChild, "content");
+                        if (contentAttribute != null) {
+                            int eqPos = contentAttribute.indexOf("=");
+                            if (eqPos != -1) {
+                                String name = contentAttribute.substring(0, eqPos);
+                                gwtMetaProperties.put(name, contentAttribute.substring(eqPos + 1));
+                            }
+                        }
+                    }
+                }
+            }
+        }
+
+        return (String)gwtMetaProperties.get(propName);
+    }
+
+    /**
+     * Get the tag name of an element.  I can't believe this isn't in the DOM class.
+     */
+    public static native String getElementTagName (Element element) /*-{
+        return element.tagName;
+    }-*/;
+
+    // this doesn't work anymore because document is the cached module document, not the gwt.js
+    // main document.
+        /*-{
+	 // made private in module init function....
+	 //return __gwt_getMetaProperty(name);
+
+      var metas = document.getElementsByTagName("meta");
+      for (var i = 0, n = metas.length; i < n; ++i) {
+        var meta = metas[i];
+        var name = meta.getAttribute("name");
+        if (name) {
+          if (name == "gwt:property") {
+            var content = meta.getAttribute("content");
+            if (content) {
+              var name = content, value = "";
+              var eq = content.indexOf("=");
+              if (eq != -1) {
+                name = content.substring(0, eq);
+                value = content.substring(eq+1);
+              }
+              if (propName == name) {
+                return value;
+              }
+            }
+          }
+        }
+      }
+      return null;
+	 }-*/;
+
+	/**
+	 * Returns a List of Element objects that have the specified CSS class name.
+	 *
+	 * @param element
+	 *            Element to start search from
+	 * @param className
+	 *            name of class to find
+	 */
+	public static List findElementsForClass(Element element, String className) {
+		ArrayList result = new ArrayList();
+		recElementsForClass(result, element, className);
+		return result;
+	}
+
+	/**
+	 * Recursive search dom element and it's children for specified CSS class
+	 * name. helper method for {@link #findElementsForClass(Element, String)}
+	 *
+	 * @param res
+	 * @param element
+	 * @param className
+	 */
+	private static void recElementsForClass(ArrayList res, Element element,
+			String className) {
+		if (isHaveClass(element, className)) {
+			res.add(element);
+		}
+
+		for (int i = 0; i < DOM.getChildCount(element); i++) {
+			Element child = DOM.getChild(element, i);
+			recElementsForClass(res, child, className);
+		}
+	}
+
+	/**
+	 * Check for dom element is have specified ctyle class.
+	 *
+	 * @param element
+	 * @param className
+	 */
+	public static boolean isHaveClass(Element element, String className) {
+		String c = DOM.getAttribute(element, "className");
+
+		if (c != null) {
+			String[] p = c.split(" ");
+
+			for (int x = 0; x < p.length; x++) {
+				if (p[x].equals(className)) {
+					return true;
+				}
+			}
+		}
+		return false;
+	}
+
+	/**
+	 * Append content of given element to widget. Can be used to append content
+	 * of rendered facet or children elements to widget.
+	 *
+	 * @param widget
+	 *            target widget
+	 * @param content
+	 *            element with content for append to widget
+	 */
+	public static void appendContent(Widget widget, Element content) {
+		Element element = widget.getElement();
+		int childCount = DOM.getChildCount(content);
+		for (int i = 0; i < childCount; i++) {
+			Element child = DOM.getChild(content, i);
+			DOM.appendChild(element, child);
+		}
+	}
+
+	/**
+	 * Setup service endpoint to same as page action URL with view state
+	 * parameter.
+	 *
+	 * @param service
+	 */
+	public static void setupServiceEndpoint(ServiceDefTarget service) {
+		String endpoint = getEndpoint();
+		service.setServiceEntryPoint(endpoint);
+	}
+
+	/**
+     * Get service endpoint URL.  Include JSF viewState and GWT module name as URL parameters,
+     * to facilitate JSF dispatching logic in GwtFacesServlet.
+	 */
+	public static String getEndpoint() {
+        String action = getMetaProperty("action");
+        String endpoint = action + "?javax.faces.ViewState="
+				+ viewState + "&x-gwtcallingmodule="+GWT.getModuleName();
+		return endpoint;
+	}
+
+	/**
+	 * Factory method for create and setup JSF service to perform RPC call on
+	 * component instance
+	 *
+	 * @param clientId -
+	 *            identify target component
+	 * @return service stub instance
+	 */
+	public static GwtFacesServiceAsync createFacesService(String clientId) {
+		GwtFacesServiceAsync service = (GwtFacesServiceAsync) GWT
+				.create(GwtFacesService.class);
+		String endpoint = getEndpoint();
+		if (null != clientId) {
+			endpoint = endpoint + "&clientId=" + clientId;
+		}
+		((ServiceDefTarget) service).setServiceEntryPoint(endpoint);
+		return service;
+	}
+
+	/**
+	 * Implementation must owerride this method to create concrete widget.  Note that
+     * the id passed will be the specific id of this type of widget, so if multiple
+     * widgets are implemented in this module, the createWidget method in the
+     * EntryPoint subclass can dispatch on the particular id to instantiate one widget
+     * or the other.
+	 *
+	 * @param id -
+	 *            clientId of JSF component.
+	 */
+	protected abstract Widget createWidget(String id);
+
+	/**
+	 * Create widget from Java-script inline in page ( can be used for re-create
+	 * widgets in Ajax4jsf .
+	 * 
+	 * @param id -
+	 *            IDREF for base widget element.
+	 */
+	public final void appendWidget(String id) {
+		// got viev state parameter
+		Widget widget = createWidget(id);
+		// RootPanel clear it content - widget can need use it.
+		RootPanel panel = RootPanel.get(id);
+		panel.add(widget);
+	}
+
+	/**
+	 * create javaScript funtion for callback creation of widgets in page.
+	 * 
+	 * @param moduleName
+	 */
+	private native void initJS(String moduleName)/*-{
+	 $wnd[moduleName] = function(id){
+	 this. at org.ajax4jsf.gwt.client.ComponentEntryPoint::appendWidget(Ljava/lang/String;)(id);
+	 };
+	 }-*/;
+
+	/**
+	 * @return Returns the viewState.
+	 */
+	public static String getViewState() {
+		return viewState;
+	}
+
+	/**
+	 * @param viewState
+	 *            The viewState to set.
+	 */
+	public static void setViewState(String viewState) {
+		ComponentEntryPoint.viewState = viewState;
+	}
+}

Added: branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/GwtFacesEvent.java
===================================================================
--- branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/GwtFacesEvent.java	                        (rev 0)
+++ branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/GwtFacesEvent.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,34 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.gwt.client;
+
+import com.google.gwt.user.client.rpc.IsSerializable;
+
+/**
+ * Base data class for send events from client-side to components by Google RPC
+ * 
+ * @author shura
+ * 
+ */
+public class GwtFacesEvent implements IsSerializable {
+
+}

Added: branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/GwtFacesException.java
===================================================================
--- branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/GwtFacesException.java	                        (rev 0)
+++ branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/GwtFacesException.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,67 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.gwt.client;
+
+import com.google.gwt.user.client.rpc.IsSerializable;
+
+/**
+ * Gwt event exceptions wrapper for Rpc calls
+ * 
+ * @author shura
+ */
+public class GwtFacesException extends Throwable implements IsSerializable {
+
+	private String _message;
+
+	/**
+	 * 
+	 */
+	public GwtFacesException() {
+		super();
+		// TODO Auto-generated constructor stub
+	}
+
+	/**
+	 * @param message
+	 */
+	public GwtFacesException(String message) {
+		super();
+		_message = message;
+		// TODO Auto-generated constructor stub
+	}
+
+	/**
+	 * @return Returns the message.
+	 */
+	public String getMessage() {
+		return _message;
+	}
+
+	/**
+	 * @param message
+	 *            The message to set.
+	 */
+	public void setMessage(String message) {
+		_message = message;
+	}
+
+}

Added: branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/GwtFacesResult.java
===================================================================
--- branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/GwtFacesResult.java	                        (rev 0)
+++ branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/GwtFacesResult.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,35 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.gwt.client;
+
+import com.google.gwt.user.client.rpc.IsSerializable;
+
+/**
+ * Base superclass for all data returned by google RPC from component after send
+ * event. Used for mark return-type interface in servlet
+ * 
+ * @author shura
+ * 
+ */
+public class GwtFacesResult implements IsSerializable {
+
+}

Added: branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/GwtFacesService.java
===================================================================
--- branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/GwtFacesService.java	                        (rev 0)
+++ branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/GwtFacesService.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,35 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.gwt.client;
+
+import com.google.gwt.user.client.rpc.RemoteService;
+
+/**
+ * @author shura
+ * 
+ */
+public interface GwtFacesService extends RemoteService {
+
+	public GwtFacesResult sendEvent(GwtFacesEvent event)
+			throws GwtFacesException;
+
+}

Added: branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/GwtFacesServiceAsync.java
===================================================================
--- branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/GwtFacesServiceAsync.java	                        (rev 0)
+++ branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/GwtFacesServiceAsync.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,34 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.gwt.client;
+
+import com.google.gwt.user.client.rpc.AsyncCallback;
+
+/**
+ * @author shura
+ * 
+ */
+public interface GwtFacesServiceAsync {
+
+	public void sendEvent(GwtFacesEvent event, AsyncCallback callback);
+
+}

Added: branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/Parameters.java
===================================================================
--- branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/Parameters.java	                        (rev 0)
+++ branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/Parameters.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,91 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.gwt.client;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import com.google.gwt.user.client.DOM;
+import com.google.gwt.user.client.Element;
+
+/**
+ * Class to fill and handle widget parameters.
+ * @author shura
+ * 
+ */
+public class Parameters {
+
+	private Map _params;
+
+
+	public Parameters(String id) {
+		// Parse parameters.
+		String dataId = id + ":_data";
+		Element dataElement = DOM.getElementById(dataId);
+		_params = new HashMap();
+		if (null != dataElement) {
+			int childCount = DOM.getChildCount(dataElement);
+			fillParamsMap(dataElement, _params, childCount);
+		}
+	}
+
+	/**
+	 * Fill parameters map by data from given element. If data element don't
+	 * have child elements, got content as text, else - put new map with content
+	 * of recursive same method.
+	 * 
+	 * @param dataElement
+	 * @param params
+	 * @param childCount
+	 */
+	private void fillParamsMap(Element dataElement, Map params, int childCount) {
+		for (int it = 0; it < childCount; it++) {
+			Element data = DOM.getChild(dataElement, it);
+			String key = DOM.getAttribute(data, "title");
+			if (null != key) {
+				int dataChildCount = DOM.getChildCount(data);
+				if (dataChildCount > 0) {
+					// Put data from child elements as new map
+					Map innerData = new HashMap(dataChildCount);
+					fillParamsMap(data, innerData, dataChildCount);
+					params.put(key, innerData);
+				} else {
+					// Simple text value
+					String innerText = DOM.getInnerText(data);
+					params.put(key, innerText);
+				}
+			}
+		}
+	}
+
+	public String get(String key, String defaultValue) {
+		String value = (String) _params.get(key);
+		if (null == value) {
+			value = defaultValue;
+		}
+		return value;
+	}
+
+	public Object get(String key){
+		return _params.get(key);
+	}
+}

Added: branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/messages/MessageBundle.java
===================================================================
--- branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/messages/MessageBundle.java	                        (rev 0)
+++ branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/messages/MessageBundle.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,90 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.gwt.client.messages;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @author shura
+ *
+ */
+public class MessageBundle {
+
+	private Map _messages ;
+	/**
+	 * 
+	 */
+	public MessageBundle() {
+		_messages = new HashMap();
+	}
+	
+	public MessageBundle(String[][] defaultMessages){
+		this();
+	}
+	
+	public void setDefault(String[][] defaultMessages){
+		for (int i = 0; i < defaultMessages.length; i++) {
+			String[] message = defaultMessages[i];
+			_messages.put(message[0],message[1]);
+		}
+	}
+	
+	public void setMessages(Map messages){
+		_messages.putAll(messages);
+	}
+	
+	/**
+	 * Get localised message for given key. If message not present, return
+	 * key string.
+	 * @param key
+	 * @return
+	 */
+	public String getMessage(String key){
+		String msg = (String) _messages.get(key);
+		if(null == msg){
+			msg=key;
+		}
+		return msg;
+	}
+	
+	/**
+	 * Format message for given key . Works like {@link java.text.MessageFormat}, but
+	 * very simple - only support {n} placeholders, and only with same order as arguments.
+	 * @param key
+	 * @param args
+	 * @return
+	 */
+	public String formatMessage(String key, String[] args){
+		String message = getMessage(key);
+		String[] strings = message.split("\\{.?\\}");
+		String result = "";
+		for (int i = 0; i < strings.length; i++) {
+			result = result + strings[i];
+			if(i < args.length ){
+				result = result + args[i];
+			}
+		}
+		return result;
+	}
+
+}

Added: branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/ui/ElementNotFoundException.java
===================================================================
--- branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/ui/ElementNotFoundException.java	                        (rev 0)
+++ branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/ui/ElementNotFoundException.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,42 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.gwt.client.ui;
+
+/**
+ * @author shura
+ *
+ */
+public class ElementNotFoundException extends RuntimeException {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = -727623352197021218L;
+
+	/**
+	 * @param message
+	 */
+	public ElementNotFoundException(String id) {
+		super("Element with id='"+id+"' not found");
+	}
+
+}

Added: branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/ui/FacetPanel.java
===================================================================
--- branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/ui/FacetPanel.java	                        (rev 0)
+++ branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/ui/FacetPanel.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,47 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.gwt.client.ui;
+
+
+import com.google.gwt.user.client.DOM;
+import com.google.gwt.user.client.Element;
+import com.google.gwt.user.client.ui.HTMLPanel;
+
+/**
+ * Extension of {@link HTMLPanel} for wrap html element with rendered content
+ * of jsf component ( in most cases, will be used with {@link org.ajax4jsf.gwt.jsf.WidgetWithFacetsRenderer} for
+ * wrap rendered facet or children components.
+ * @author shura
+ *
+ */
+public class FacetPanel extends HTMLPanel {
+
+	public FacetPanel(String id) throws ElementNotFoundException {
+		super("");
+        Element e = DOM.getElementById(id);
+        if (e == null) {
+            throw new ElementNotFoundException(id);
+        }
+        setElement(e);
+	}
+
+}

Added: branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/ui/InputHidden.java
===================================================================
--- branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/ui/InputHidden.java	                        (rev 0)
+++ branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/ui/InputHidden.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,74 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.gwt.client.ui;
+
+import com.google.gwt.user.client.DOM;
+import com.google.gwt.user.client.Element;
+import com.google.gwt.user.client.ui.HasText;
+import com.google.gwt.user.client.ui.Widget;
+
+/**
+ * Create widget associated with hidden html input element.
+ * @author shura
+ *
+ */
+public class InputHidden extends InputWidget implements HasText {
+
+	/**
+	 * 
+	 */
+	public InputHidden() {
+		super();
+		Element hidden = DOM.createElement("input");
+		setInputType(hidden,"hidden");
+		setElement(hidden);
+	}
+
+	/**
+	 * Create named hidden input field.
+	 * @param name
+	 */
+	public InputHidden(String name){
+		this();
+		setName(name);
+//		DOM.setAttribute(getElement(),"id",name);
+	}
+
+	/* (non-Javadoc)
+	 * @see com.google.gwt.user.client.ui.HasText#setText(java.lang.String)
+	 */
+	  public String getText() {
+		    return DOM.getAttribute(getElement(), "value");
+		  }
+
+	  public void setText(String text) {
+		    DOM.setAttribute(getElement(), "value", text);
+		  }
+
+	  public String getName() {
+			    return DOM.getAttribute(getElement(), "name");
+			  }
+
+	  public void setName(String name) {
+			    setInputName(getElement(),  name);
+			  }
+}

Added: branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/ui/InputWidget.java
===================================================================
--- branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/ui/InputWidget.java	                        (rev 0)
+++ branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/ui/InputWidget.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,42 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.gwt.client.ui;
+
+import com.google.gwt.user.client.Element;
+import com.google.gwt.user.client.ui.Widget;
+
+/**
+ * Base class for widgets bounded to named input fields.
+ * Due to Internet Explorer limitation, use native code to set name of input element
+ * @author shura
+ *
+ */
+public class InputWidget extends Widget {
+
+	public static native void setInputName(Element input,String name)/*-{
+		input.name=name;
+	}-*/;
+
+	public static native void setInputType(Element input,String type)/*-{
+		input.type=type;
+	}-*/;
+}

Added: branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/ui/JSFButton.java
===================================================================
--- branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/ui/JSFButton.java	                        (rev 0)
+++ branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/ui/JSFButton.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,59 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.gwt.client.ui;
+
+import com.google.gwt.user.client.ui.Button;
+import com.google.gwt.user.client.ui.ClickListener;
+
+/**
+ * Button able to submit Jsf form to client, same as HtmlCommandButton .
+ * @author shura
+ *
+ */
+public class JSFButton extends Button {
+
+	/**
+	 * 
+	 */
+	public JSFButton() {
+		super();
+		// TODO Auto-generated constructor stub
+	}
+
+	/**
+	 * @param html
+	 */
+	public JSFButton(String html) {
+		super(html);
+		// TODO Auto-generated constructor stub
+	}
+
+	/**
+	 * @param html
+	 * @param listener
+	 */
+	public JSFButton(String html, ClickListener listener) {
+		super(html, listener);
+		// TODO Auto-generated constructor stub
+	}
+
+}

Added: branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/ui/JSFHiddenSubmit.java
===================================================================
--- branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/ui/JSFHiddenSubmit.java	                        (rev 0)
+++ branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/ui/JSFHiddenSubmit.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,68 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.gwt.client.ui;
+
+import com.google.gwt.user.client.DOM;
+import com.google.gwt.user.client.Element;
+import com.google.gwt.user.client.ui.Widget;
+
+/**
+ * Class created hidden html submit button for JSF form submission.
+ * @author shura
+ *
+ */
+public class JSFHiddenSubmit extends InputWidget {
+	
+	private String _id;
+
+	/**
+	 * 
+	 */
+	public JSFHiddenSubmit(String id) {
+		super();
+		_id = id;
+		Element button = DOM.createButton();
+		setInputName(button, id);
+		setInputType(button,"submit");
+		setElement(button);
+		setSize("0","0");
+		setVisible(false);
+	}
+
+	public void submit(String data) throws Exception {
+		Element button = getElement();
+		if(!isAttached()){
+			Element componentElement = DOM.getElementById(_id);
+			if(null == componentElement){
+				throw new Exception("submit element must be attached to document");
+			}
+			DOM.appendChild(componentElement,button);
+		}
+		DOM.setAttribute(button,"value",data);
+		click(button);
+	}
+	
+    static native void click(Element button) /*-{
+	    button.click();
+	  }-*/;
+
+}

Added: branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/ui/JSFHyperLink.java
===================================================================
--- branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/ui/JSFHyperLink.java	                        (rev 0)
+++ branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/ui/JSFHyperLink.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,60 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.gwt.client.ui;
+
+import com.google.gwt.user.client.ui.Hyperlink;
+
+/**
+ * Hyperlink able to submit JSF form, same as HtmlCommandLink
+ * @author shura
+ *
+ */
+public class JSFHyperLink extends Hyperlink {
+
+	/**
+	 * 
+	 */
+	public JSFHyperLink() {
+		super();
+		// TODO Auto-generated constructor stub
+	}
+
+	/**
+	 * @param text
+	 * @param asHTML
+	 * @param targetHistoryToken
+	 */
+	public JSFHyperLink(String text, boolean asHTML, String targetHistoryToken) {
+		super(text, asHTML, targetHistoryToken);
+		// TODO Auto-generated constructor stub
+	}
+
+	/**
+	 * @param text
+	 * @param targetHistoryToken
+	 */
+	public JSFHyperLink(String text, String targetHistoryToken) {
+		super(text, targetHistoryToken);
+		// TODO Auto-generated constructor stub
+	}
+
+}

Added: branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/ui/JSFImage.java
===================================================================
--- branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/ui/JSFImage.java	                        (rev 0)
+++ branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/client/ui/JSFImage.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,72 @@
+/**
+ * 
+ */
+package org.ajax4jsf.gwt.client.ui;
+
+import org.ajax4jsf.gwt.client.ComponentEntryPoint;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.user.client.ui.Image;
+
+/**
+ * Version of original {@link com.google.gwt.user.client.ui.Image} widget to load
+ * images in packed to jar images from module public path. This image will work with
+ * same relative url's in hosted mode and as packed component.
+ * @author shura
+ *
+ */
+public class JSFImage extends Image {
+
+	/**
+	 * 
+	 */
+	public JSFImage() {
+		super();
+		// TODO Auto-generated constructor stub
+	}
+	  /**
+	   * Causes the browser to pre-fetch the image at a given URL.
+	   * 
+	   * @param url the URL of the image to be prefetched
+	   */
+	  public static void prefetch(String url) {
+			String base = ComponentEntryPoint.getMetaProperty("base");
+			if(null != base){
+				url=base+GWT.getModuleName()+"/"+url;
+			}
+			Image.prefetch(url);
+	  }
+
+	/**
+	 * @param arg0
+	 */
+	public JSFImage(String arg0) {
+		super(arg0);
+		// TODO Auto-generated constructor stub
+	}
+
+	/* (non-Javadoc)
+	 * @see com.google.gwt.user.client.ui.Image#getUrl()
+	 */
+	public String getUrl() {
+		// TODO Auto-generated method stub
+		String url = super.getUrl();
+		String base = ComponentEntryPoint.getMetaProperty("base");
+		if(null != base){
+			url = url.substring((base+GWT.getModuleName()+"/").length());
+		}
+		return url;
+	}
+
+	/* (non-Javadoc)
+	 * @see com.google.gwt.user.client.ui.Image#setUrl(java.lang.String)
+	 */
+	public void setUrl(String url) {
+		String base = ComponentEntryPoint.getMetaProperty("base");
+		if(null != base){
+			url=base+GWT.getModuleName()+"/"+url;
+		}
+		super.setUrl(url);
+	}
+
+}

Added: branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/BaseWidgetTag.java
===================================================================
--- branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/BaseWidgetTag.java	                        (rev 0)
+++ branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/BaseWidgetTag.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,42 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.gwt.jsf;
+
+import javax.faces.webapp.UIComponentELTag;
+
+/**
+ * @author shura
+ * 
+ */
+public class BaseWidgetTag extends UIComponentELTag {
+
+	public String getComponentType() {
+		// TODO Auto-generated method stub
+		return "org.ajax4jsf.gwt.BaseWidget";
+	}
+
+	public String getRendererType() {
+		// TODO Auto-generated method stub
+		return "org.ajax4jsf.gwt.BaseWidget";
+	}
+
+}

Added: branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/GwtActionEvent.java
===================================================================
--- branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/GwtActionEvent.java	                        (rev 0)
+++ branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/GwtActionEvent.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,49 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.gwt.jsf;
+
+import javax.faces.component.UIComponent;
+import javax.faces.event.ActionEvent;
+
+/**
+ * @author shura
+ *
+ */
+public class GwtActionEvent extends ActionEvent {
+
+	private Object _value;
+	/**
+	 * @param component
+	 */
+	public GwtActionEvent(UIComponent component, Object value) {
+		super(component);
+		_value = value;
+		// TODO Auto-generated constructor stub
+	}
+	/**
+	 * @return Returns the value.
+	 */
+	public Object getValue() {
+		return _value;
+	}
+
+}

Added: branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/GwtActionsRule.java
===================================================================
--- branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/GwtActionsRule.java	                        (rev 0)
+++ branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/GwtActionsRule.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,98 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.gwt.jsf;
+
+import java.lang.reflect.Method;
+
+import javax.el.MethodExpression;
+
+import org.ajax4jsf.gwt.client.GwtFacesEvent;
+import org.ajax4jsf.gwt.client.GwtFacesResult;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.tag.MetaRule;
+import com.sun.facelets.tag.Metadata;
+import com.sun.facelets.tag.MetadataTarget;
+import com.sun.facelets.tag.TagAttribute;
+
+/**
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:56 $
+ *
+ */
+public class GwtActionsRule extends MetaRule {
+
+
+    public final static Class[] GWT_LISTENER_SIG = new Class[] { GwtFacesEvent.class };
+
+
+    public final static class GwtListenerMapper extends Metadata {
+
+        private final TagAttribute attr;
+        
+        private final String name;
+
+        public GwtListenerMapper(String name, TagAttribute attr) {
+            this.attr = attr;
+            // convert attribute name to setter
+            this.name = "set"+name.substring(0,1).toUpperCase()+name.substring(1);
+        }
+
+        public void applyMetadata(FaceletContext ctx, Object instance) {
+			MethodExpression methodExpression = this.attr.getMethodExpression(ctx, GwtFacesResult.class,GwtActionsRule.GWT_LISTENER_SIG);
+        	if (instance instanceof GwtSource) {
+				GwtSource gwtSource = (GwtSource) instance;
+				gwtSource.addGwtListener(new GwtListenerMethodHelper(methodExpression,null));
+			} else {
+        	Class clazz = instance.getClass();
+        	try {
+        		// Find setter method
+				Method setter = clazz.getMethod(name,
+						new Class[] { MethodExpression.class });
+				// Set gwtActionListener method expression
+				setter.invoke(instance, new Object[] { methodExpression });
+			} catch (Exception e) {
+				// TODO: handle exception
+			}
+			}
+        }
+
+    }
+
+    public final static GwtActionsRule instance = new GwtActionsRule();
+
+    public GwtActionsRule() {
+        super();
+    }
+
+    public Metadata applyRule(String name, TagAttribute attribute,
+            MetadataTarget meta) {
+        if (meta.isTargetInstanceOf(GwtComponent.class)) {
+
+            if (name.startsWith("gwt") && name.endsWith("Listener")) {
+                    return new GwtListenerMapper(name,attribute);
+            }
+        }
+        return null;
+    }
+
+}

Added: branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/GwtCallListener.java
===================================================================
--- branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/GwtCallListener.java	                        (rev 0)
+++ branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/GwtCallListener.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+package org.ajax4jsf.gwt.jsf;
+
+import javax.faces.event.PhaseEvent;
+import javax.faces.event.PhaseId;
+import javax.faces.event.PhaseListener;
+
+import com.google.gwt.user.server.rpc.RPCRequest;
+
+public abstract class GwtCallListener implements PhaseListener {
+
+    public void afterPhase(PhaseEvent event) {
+    }
+
+    public void beforePhase(PhaseEvent event) {
+    }
+
+    public abstract String processRequest(RPCRequest call);
+
+    public PhaseId getPhaseId() {
+        return PhaseId.INVOKE_APPLICATION;
+    }
+
+}

Added: branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/GwtComponent.java
===================================================================
--- branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/GwtComponent.java	                        (rev 0)
+++ branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/GwtComponent.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,57 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.gwt.jsf;
+
+import java.util.Map;
+
+import javax.faces.FacesException;
+import javax.faces.context.FacesContext;
+
+import org.ajax4jsf.gwt.client.GwtFacesEvent;
+import org.ajax4jsf.gwt.client.GwtFacesResult;
+
+/**
+ * @author shura
+ * 
+ */
+public interface GwtComponent {
+
+	/**
+	 * @return name of GWT module for component
+	 */
+	public String getModuleName();
+	
+	/**
+	 * Get name of widget in module.
+	 * @return widget name for this component ( or null if not important, in case of only one widget in module )
+	 */
+	public String getWidgetName();
+
+	/**
+	 * For base renderer, create Map<String,String> widget parameters.
+	 * This pagameters can be get by {@link org.ajax4jsf.gwt.client.ComponentEntryPoint#getWidgetParams(String )}
+	 * For more complex cases, developer must create own renderer.
+	 * @return
+	 */
+	public Map getWidgetParameters();
+
+}

Added: branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/GwtComponentHandler.java
===================================================================
--- branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/GwtComponentHandler.java	                        (rev 0)
+++ branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/GwtComponentHandler.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,54 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.gwt.jsf;
+
+import com.sun.facelets.tag.MetaRuleset;
+import com.sun.facelets.tag.jsf.ComponentConfig;
+import com.sun.facelets.tag.jsf.ComponentHandler;
+
+/**
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:51 $
+ *
+ */
+public class GwtComponentHandler extends ComponentHandler {
+
+	/**
+	 * @param config
+	 */
+	public GwtComponentHandler(ComponentConfig config) {
+		super(config);
+		// TODO Auto-generated constructor stub
+	}
+
+	/* (non-Javadoc)
+	 * @see com.sun.facelets.tag.jsf.ComponentHandler#createMetaRuleset(java.lang.Class)
+	 */
+	protected MetaRuleset createMetaRuleset(Class type) {
+		MetaRuleset metaRules = super.createMetaRuleset(type);
+		if (GwtComponent.class.isAssignableFrom(type)) {
+			metaRules.addRule(GwtActionsRule.instance);
+		}
+		return metaRules;
+	}
+
+}

Added: branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/GwtEvent.java
===================================================================
--- branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/GwtEvent.java	                        (rev 0)
+++ branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/GwtEvent.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,63 @@
+/**
+ * 
+ */
+package org.ajax4jsf.gwt.jsf;
+
+import javax.faces.component.UIComponent;
+import javax.faces.event.FacesEvent;
+import javax.faces.event.FacesListener;
+
+import com.google.gwt.user.server.rpc.RPCRequest;
+
+/**
+ * Abstract superclass of GWT events that route GWT calls through JSF.
+ * @author shura
+ */
+public abstract class GwtEvent extends FacesEvent {
+
+    /**
+     * @param source
+     */
+    public GwtEvent(UIComponent source) {
+        super(source);
+    }
+
+    /**
+     * Is the listener appropriate?
+     * @param listener
+     */
+    public boolean isAppropriateListener (FacesListener listener) {
+        if (listener instanceof GwtListener) {
+            GwtListener gwtListener = (GwtListener) listener;
+            return gwtListener.canHandleRequest(getRPCRequest());
+        }
+        return false;
+    }
+
+    /* (non-Javadoc)
+	 * @see javax.faces.event.FacesEvent#processListener(javax.faces.event.FacesListener)
+	 */
+    public void processListener(FacesListener listener) {
+        GwtListener gwtListener = (GwtListener) listener;
+        setCallbackParameter(gwtListener.processRequest(this.getRPCRequest()));
+    }
+
+    /**
+     * Get the GWT serialized response payload.
+     * @return the response payload
+     */
+    public abstract String getResponsePayload();
+
+    /**
+     * Set the response payload.  Called by the handler when it invokes the GWT call on the
+     * proper component.
+     * @param responsePayload the payload to set
+     */
+    public abstract void setCallbackParameter(String responsePayload);
+
+    /**
+     * Get the call that's being routed.
+     */
+    public abstract RPCRequest getRPCRequest();
+
+}

Added: branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/GwtListener.java
===================================================================
--- branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/GwtListener.java	                        (rev 0)
+++ branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/GwtListener.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,27 @@
+/**
+ * 
+ */
+package org.ajax4jsf.gwt.jsf;
+
+import com.google.gwt.user.server.rpc.RPCRequest;
+
+import javax.faces.event.FacesListener;
+
+/**
+ * General listener for GWT event handling.  Restricted to only the original GWTFacesService interface.
+ * @author shura
+ */
+public interface GwtListener extends FacesListener {
+
+    /**
+     * Can this listener handle the given call?
+     */
+    public boolean canHandleRequest (RPCRequest request);
+
+    /**
+     * Process the given call.
+     * @return the encoded GWT response payload
+     */
+    public String processRequest(RPCRequest request);
+	
+}

Added: branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/GwtListenerHandler.java
===================================================================
--- branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/GwtListenerHandler.java	                        (rev 0)
+++ branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/GwtListenerHandler.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,168 @@
+/**
+ * 
+ */
+package org.ajax4jsf.gwt.jsf;
+
+import java.io.IOException;
+
+import javax.el.ELException;
+import javax.el.MethodExpression;
+import javax.el.ValueExpression;
+import javax.faces.FacesException;
+import javax.faces.component.UIComponent;
+
+import org.ajax4jsf.gwt.client.GwtFacesResult;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.FaceletException;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.TagAttributeException;
+import com.sun.facelets.tag.TagConfig;
+import com.sun.facelets.tag.TagException;
+import com.sun.facelets.tag.TagHandler;
+
+/**
+ * Parses the attributes of a gwt:gwtListener tag, and creates the appropriate type of helper components
+ * in the JSF component tree.
+ * <p/>
+ * There are several attributes that can be used with this tag:
+ * <ul>
+ * <li>binding - this is an EL value expression that specifies an object implementing GwtListener;
+ * this object will be invoked to handle the request</li>
+ * <li>method - this is an EL method expression that specifies an object and method that take a
+ * single GwtFacesEvent argument; the GWT class must use GwtFacesService to route an event to this
+ * 'event handler' method</li>
+ * <li>event - the specific class of GwtFacesEvent to be passed to the 'event handler' method;
+ * this attribute must be used with the method attribute</li>
+ * <li>serviceBean - this is an EL value expression that resolves to an object that implements a
+ * GWT service interface; the incoming RPC will be delegated to this object (if it is an RPC on that
+ * object's interface)</li>
+ * <li>type - if no other attributes are defined, this is the class name of a GwtListener class that
+ * will be instantiated (with its no-argument constructor) and used to handle the RPC</li>
+ * </ul>
+ * Note that the binding, method, and serviceBean attributes are exclusive; each gwtListener tag must
+ * have only one of those attributes.  Multiple gwtListener tags may be used to define multiple
+ * listeners.
+ *
+ * @author shura
+ * @author Rob Jellinghaus
+ */
+public class GwtListenerHandler extends TagHandler {
+
+    private Class listenerType;
+    
+    private Class[] signature = GwtActionsRule.GWT_LISTENER_SIG;
+
+    /**
+     * A string literal specifying the type of listener to construct (via no-argument constructor)
+     * if no other attributes are defined on this tag.
+     */
+    private final TagAttribute type;
+
+    /**
+     * An EL value expression that yields a GwtListener instance which should process the request.
+     */
+    private final TagAttribute binding;
+
+    /**
+     * An EL method expression which yields a method that should be passed an instance of
+     * GwtFacesEvent.
+     */
+    private final TagAttribute method;
+
+    /**
+     * The specific subclass of GwtFacesEvent that should be passed to a declared method.
+     */
+    private final TagAttribute event;
+
+    /**
+     * An EL value expression that yields an object which implements a service interface to be
+     * invoked directly by RPC.
+     */
+    private final TagAttribute serviceBean;
+
+    private Class eventType;
+
+    /**
+     * Construct a GwtListenerHandler from the given tag.
+     */
+    public GwtListenerHandler(TagConfig config) {
+		super(config);
+        this.binding = this.getAttribute("binding");
+        this.method = this.getAttribute("method");
+        this.event = this.getAttribute("event");
+        this.type = this.getAttribute("type");
+        this.serviceBean = this.getAttribute("serviceBean");
+        if (type != null) {
+            if (!type.isLiteral()) {
+                throw new TagAttributeException(this.tag, this.type, "Must be literal");
+            }
+            try {
+                this.listenerType = Class.forName(type.getValue());
+            } catch (Exception e) {
+                throw new TagAttributeException(this.tag, this.type, e);
+            }
+        }
+        if (event != null) {
+            if (!event.isLiteral()) {
+                throw new TagAttributeException(this.tag, this.event, "Must be literal");
+            }
+            try {
+                this.eventType = Class.forName(event.getValue());
+            	this.signature = new Class[]{this.eventType};
+            } catch (Exception e) {
+                throw new TagAttributeException(this.tag, this.event, e);
+            }
+        }
+        int numAttrs = (binding == null ? 0 : 1) +
+                (method == null ? 0 : 1) +
+                (serviceBean == null ? 0 : 1);
+        if (numAttrs > 1) {
+            throw new TagException(this.tag,
+                    "Must have only one of 'binding', 'method', 'serviceBean' attributes on single gwtListener; " +
+                            "use multiple gwtListeners instead");
+        }
+	}
+
+	/**
+	 * @see com.sun.facelets.FaceletHandler#apply(com.sun.facelets.FaceletContext, javax.faces.component.UIComponent)
+	 */
+	public void apply(FaceletContext ctx, UIComponent parent)
+			throws IOException, FacesException, FaceletException, ELException {
+        if (parent instanceof GwtSource) {
+            // only process if parent was just created
+            if (parent.getParent() == null) {
+                GwtSource src = (GwtSource) parent;
+                GwtListener listener = null;
+                ValueExpression ve = null;
+                if (this.binding != null) {
+                    ve = this.binding.getValueExpression(ctx,
+                            GwtListener.class);
+                    listener = new GwtListenerHelper(ve);
+                } else if (this.method != null) {
+					MethodExpression me = this.method.getMethodExpression(ctx,GwtFacesResult.class,signature);
+                    listener = new GwtListenerMethodHelper(me,eventType);
+				} else if (this.serviceBean != null) {
+                    // could be any kind of object... we're not particular... yet
+                    ve = this.serviceBean.getValueExpression(ctx, Object.class);
+                    listener = new GwtListenerServiceHelper(ve);
+                }
+                if (listener == null) {
+                    try {
+                        listener = (GwtListener) listenerType.newInstance();
+                    } catch (Exception e) {
+                        throw new TagAttributeException(this.tag, this.type, e.getCause());
+                    }
+                    if (ve != null) {
+                        ve.setValue(ctx, ve);
+                    }
+                }
+                src.addGwtListener(listener);
+            }
+        } else {
+            throw new TagException(this.tag,
+                    "Parent is not of type GwtSource, type is: " + parent);
+        }
+	}
+
+}

Added: branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/GwtListenerHelper.java
===================================================================
--- branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/GwtListenerHelper.java	                        (rev 0)
+++ branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/GwtListenerHelper.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,113 @@
+/**
+ * 
+ */
+package org.ajax4jsf.gwt.jsf;
+
+import java.io.Serializable;
+
+import javax.el.ELContext;
+import javax.el.ValueExpression;
+import javax.faces.component.StateHolder;
+import javax.faces.component.UIComponentBase;
+import javax.faces.context.FacesContext;
+
+import com.google.gwt.user.server.rpc.RPCRequest;
+
+/**
+ * @author shura
+ *
+ */
+public class GwtListenerHelper implements GwtListener, StateHolder {
+
+
+    private ValueExpression _binding;
+
+
+    private boolean _transient = false;
+
+
+    /**
+     *
+     */
+    public GwtListenerHelper() {
+        super();
+        // TODO Auto-generated constructor stub
+    }
+
+    /**
+     * @param binding
+     */
+    public GwtListenerHelper(ValueExpression binding) {
+        super();
+        if (null == binding) {
+            throw new IllegalArgumentException("Binding expression for GwtListener helper must be not null");
+        }
+        _binding = binding;
+    }
+
+    /* (non-Javadoc)
+      * @see org.ajax4jsf.gwt.jsf.GwtListener#isAcceptEvent(org.ajax4jsf.gwt.client.GwtFacesEvent)
+      */
+    public boolean canHandleRequest(RPCRequest request) {
+        ELContext context = FacesContext.getCurrentInstance().getELContext();
+        GwtListener handler = getHandler(context);
+        return handler.canHandleRequest(request);
+    }
+
+    private GwtListener getHandler(ELContext context) {
+        return (GwtListener) _binding.getValue(context);
+    }
+
+    /* (non-Javadoc)
+      * @see org.ajax4jsf.gwt.jsf.GwtListener#processCall(org.ajax4jsf.gwt.jsf.GwtEvent)
+      */
+    public String processRequest(RPCRequest request) {
+        ELContext context = FacesContext.getCurrentInstance().getELContext();
+        GwtListener handler = getHandler(context);
+        return handler.processRequest(request);
+    }
+
+    /* (non-Javadoc)
+      * @see javax.faces.component.StateHolder#restoreState(javax.faces.context.FacesContext, java.lang.Object)
+      */
+    public void restoreState(FacesContext context, Object state) {
+        State helperState = (State) state;
+        _binding = (ValueExpression) UIComponentBase.restoreAttachedState(context,helperState.binding);
+    }
+
+    /* (non-Javadoc)
+      * @see javax.faces.component.StateHolder#saveState(javax.faces.context.FacesContext)
+      */
+    public Object saveState(FacesContext context) {
+        State helperState = new State();
+        helperState.binding = UIComponentBase.saveAttachedState(context,_binding);
+        return helperState;
+    }
+
+    /**
+     * @return Returns the transient.
+     */
+    public boolean isTransient() {
+        return _transient;
+    }
+
+    /**
+     * @param transient1 The transient to set.
+     */
+    public void setTransient(boolean transient1) {
+        _transient = transient1;
+    }
+
+    /**
+     * @author shura
+     *
+     */
+    private static class State implements Serializable {
+
+
+        private Object binding;
+
+
+    }
+
+}

Added: branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/GwtListenerMethodHelper.java
===================================================================
--- branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/GwtListenerMethodHelper.java	                        (rev 0)
+++ branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/GwtListenerMethodHelper.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,165 @@
+/**
+ * 
+ */
+package org.ajax4jsf.gwt.jsf;
+
+import java.io.Serializable;
+
+import javax.el.ELContext;
+import javax.el.MethodExpression;
+import javax.faces.component.StateHolder;
+import javax.faces.component.UIComponentBase;
+import javax.faces.context.FacesContext;
+
+import org.ajax4jsf.gwt.client.GwtFacesEvent;
+import org.ajax4jsf.gwt.client.GwtFacesResult;
+import org.ajax4jsf.gwt.client.GwtFacesService;
+import org.ajax4jsf.gwt.client.GwtFacesException;
+import com.google.gwt.user.server.rpc.RPCRequest;
+import com.google.gwt.user.server.rpc.RPC;
+import com.google.gwt.user.server.rpc.UnexpectedException;
+import com.google.gwt.user.client.rpc.SerializationException;
+
+/**
+ * @author shura
+ *
+ */
+public class GwtListenerMethodHelper implements GwtListener, StateHolder, GwtFacesService {
+
+    private MethodExpression _method;
+
+
+    private Class _eventType ;
+
+    private boolean _transient = false;
+
+
+    /**
+     *
+     */
+    public GwtListenerMethodHelper() {
+        super();
+        // TODO Auto-generated constructor stub
+    }
+
+    /**
+     * @param method
+     * @param listenerType
+     */
+    public GwtListenerMethodHelper(MethodExpression method, Class listenerType) {
+        super();
+        if (null == method) {
+            throw new IllegalArgumentException("Method expression for GwtListener helper must be not null");
+        }
+        _method = method;
+        _eventType = listenerType;
+    }
+
+    /* (non-Javadoc)
+      * @see org.ajax4jsf.gwt.jsf.GwtListener#isAcceptEvent(org.ajax4jsf.gwt.client.GwtFacesEvent)
+      */
+    public boolean canHandleRequest(RPCRequest request) {
+        // Verify that it's a GWTFacesService call.
+        Class gwtFacesServiceClass = GwtFacesService.class;
+        Class requestClass = request.getMethod().getDeclaringClass();
+        // why is this not true here?????
+        if (!gwtFacesServiceClass.equals(requestClass)) {
+            return false;
+        }
+
+        if (!"sendEvent".equals(request.getMethod().getName())) {
+            return false;
+        }
+
+        if (request.getParameters().length != 1) {
+            return false;
+        }
+
+        Object event = request.getParameters()[0];
+
+        if (null != _eventType) {
+            return _eventType.isInstance(event);
+        } else {
+            return true;
+        }
+    }
+
+    /* (non-Javadoc)
+      * @see org.ajax4jsf.gwt.jsf.GwtListener#processCall(org.ajax4jsf.gwt.jsf.GwtEvent)
+      */
+    public String processRequest(RPCRequest request) {
+        // Invoke the call on this helper itself!
+        try {
+            return RPC.invokeAndEncodeResponse(this, request.getMethod(), request.getParameters());
+        } catch (SerializationException e) {
+            throw new RuntimeException("Could not deserialize request", e);
+        }
+    }
+
+
+    /**
+     * (non-Javadoc)
+     * @see javax.faces.component.StateHolder#restoreState(javax.faces.context.FacesContext, java.lang.Object)
+     */
+    public void restoreState(FacesContext context, Object state) {
+        State helperState = (State) state;
+        _method = (MethodExpression) UIComponentBase.restoreAttachedState(context,helperState.method);
+        _eventType = helperState.eventType;
+    }
+
+    /* (non-Javadoc)
+      * @see javax.faces.component.StateHolder#saveState(javax.faces.context.FacesContext)
+      */
+    public Object saveState(FacesContext context) {
+        State helperState = new State();
+        helperState.method = UIComponentBase.saveAttachedState(context,_method);
+        helperState.eventType = this._eventType;
+        return helperState;
+    }
+
+    /**
+     * @return Returns the transient.
+     */
+    public boolean isTransient() {
+        return _transient;
+    }
+
+    /**
+     * @param transient1 The transient to set.
+     */
+    public void setTransient(boolean transient1) {
+        _transient = transient1;
+    }
+
+    /**
+     * Route the event through to the method.
+     * @param event
+     * @return
+     * @throws GwtFacesException
+     */
+    public GwtFacesResult sendEvent(GwtFacesEvent event) throws GwtFacesException {
+        ELContext context = FacesContext.getCurrentInstance().getELContext();
+        return (GwtFacesResult)_method.invoke(context, new Object[]{event});
+    }
+
+    /**
+     * @author shura
+     *
+     */
+    private static class State implements Serializable {
+
+        private Object method;
+
+
+        private Class  eventType ;
+
+    }
+
+    /**
+     * @param eventType The eventType to set.
+     */
+    public void setEventType(Class eventType) {
+        _eventType = eventType;
+    }
+
+}

Added: branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/GwtListenerServiceHelper.java
===================================================================
--- branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/GwtListenerServiceHelper.java	                        (rev 0)
+++ branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/GwtListenerServiceHelper.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,117 @@
+package org.ajax4jsf.gwt.jsf;
+
+import com.google.gwt.user.server.rpc.RPCRequest;
+import com.google.gwt.user.server.rpc.RPC;
+import com.google.gwt.user.client.rpc.SerializationException;
+
+import javax.faces.component.StateHolder;
+import javax.faces.component.UIComponentBase;
+import javax.faces.context.FacesContext;
+import javax.el.ValueExpression;
+import javax.el.ELContext;
+import java.io.Serializable;
+
+/**
+ * GwtListener implementation that wraps a generic service bean.
+ *
+ * @author Rob Jellinghaus
+ */
+public class GwtListenerServiceHelper implements GwtListener, StateHolder {
+
+
+    private ValueExpression serviceBeanExpression;
+
+
+    private boolean _transient = false;
+
+
+    /**
+     * Default constructor; invoked by JSF view restore lifecycle.
+     */
+    public GwtListenerServiceHelper() {
+        super();
+    }
+
+    /**
+     * Constructor; invoked from GwtListenerHandler when constructing gwt:gwtListener tags.
+     * @param serviceBean
+     */
+    public GwtListenerServiceHelper(ValueExpression serviceBean) {
+        super();
+        if (null == serviceBean) {
+            throw new IllegalArgumentException("Binding expression for GwtListener helper must be not null");
+        }
+        this.serviceBeanExpression = serviceBean;
+    }
+
+    /**
+     * Can this service helper handle this request?  Implemented by inspecting the service bean to
+     * determine whether it implements the requested interface.
+     */
+    public boolean canHandleRequest(RPCRequest request) {
+        ELContext context = FacesContext.getCurrentInstance().getELContext();
+        Object serviceBean = getServiceBean(context);
+        Class requestInterface = request.getMethod().getDeclaringClass();
+        boolean interfaceIsSuperclassOf = requestInterface.isAssignableFrom(serviceBean.getClass());
+        return interfaceIsSuperclassOf;
+    }
+
+    private Object getServiceBean(ELContext context) {
+        return serviceBeanExpression.getValue(context);
+    }
+
+    /* (non-Javadoc)
+      * @see org.ajax4jsf.gwt.jsf.GwtListener#processCall(org.ajax4jsf.gwt.jsf.GwtEvent)
+      */
+    public String processRequest(RPCRequest request) {
+        ELContext context = FacesContext.getCurrentInstance().getELContext();
+        Object serviceBean = getServiceBean(context);
+        try {
+            return RPC.invokeAndEncodeResponse(serviceBean, request.getMethod(), request.getParameters());
+        } catch (SerializationException e) {
+            throw new RuntimeException("Couldn't serialize method response", e);
+        }
+    }
+
+    /* (non-Javadoc)
+      * @see javax.faces.component.StateHolder#restoreState(javax.faces.context.FacesContext, java.lang.Object)
+      */
+    public void restoreState(FacesContext context, Object state) {
+        GwtListenerServiceHelper.State helperState = (GwtListenerServiceHelper.State) state;
+        serviceBeanExpression = (ValueExpression) UIComponentBase.restoreAttachedState(context,helperState.binding);
+    }
+
+    /* (non-Javadoc)
+      * @see javax.faces.component.StateHolder#saveState(javax.faces.context.FacesContext)
+      */
+    public Object saveState(FacesContext context) {
+        GwtListenerServiceHelper.State helperState = new GwtListenerServiceHelper.State();
+        helperState.binding = UIComponentBase.saveAttachedState(context,serviceBeanExpression);
+        return helperState;
+    }
+
+    /**
+     * @return Returns the transient.
+     */
+    public boolean isTransient() {
+        return _transient;
+    }
+
+    /**
+     * @param transient1 The transient to set.
+     */
+    public void setTransient(boolean transient1) {
+        _transient = transient1;
+    }
+
+    /**
+     * @author shura
+     *
+     */
+    private static class State implements Serializable {
+
+        private Object binding;
+
+    }
+
+}

Added: branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/GwtPhaseListener.java
===================================================================
--- branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/GwtPhaseListener.java	                        (rev 0)
+++ branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/GwtPhaseListener.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,375 @@
+/**
+ * 
+ */
+package org.ajax4jsf.gwt.jsf;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.StringReader;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import java.util.zip.GZIPOutputStream;
+
+import javax.faces.FacesException;
+import javax.faces.context.ExternalContext;
+import javax.faces.context.FacesContext;
+import javax.faces.event.PhaseEvent;
+import javax.faces.event.PhaseId;
+import javax.faces.event.PhaseListener;
+import javax.servlet.Servlet;
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+
+import org.ajax4jsf.gwt.client.ComponentEntryPoint;
+import org.ajax4jsf.gwt.server.GwtFacesServlet;
+import org.xml.sax.Attributes;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+import org.xml.sax.helpers.DefaultHandler;
+
+/**
+ * Handle GWT requests during the RESTORE_VIEW phase.  Requests coming into the
+ * FacesServlet that begin with "gwt/" will cause straight classpath resource retrieval
+ * ending with responseComplete (in the beforePhase method).  Requests coming in to a
+ * GWT service endpoint URL will get delegated to the appropriate GWT service servlet
+ * (in the afterPhase method).
+ *
+ * @author shura
+ */
+public class GwtPhaseListener implements PhaseListener {
+	
+	private static final Logger _log = Logger.getLogger(GwtPhaseListener.class.getName());
+	
+	public static final String GWT_RESOURCE_PREFIX = "gwt/";
+
+	private static final class WebModuleConfigHandler extends DefaultHandler {
+		private  String _servletClassName = null;
+
+		/* (non-Javadoc)
+		 * @see org.xml.sax.helpers.DefaultHandler#resolveEntity(java.lang.String, java.lang.String)
+		 */
+		public InputSource resolveEntity(String publicId, String systemId) throws IOException, SAXException {
+			// Dummy resolver - disable all entity references
+			return new InputSource(new StringReader(""));
+		}
+
+		/* (non-Javadoc)
+		 * @see org.xml.sax.helpers.DefaultHandler#startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)
+		 */
+		public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
+			// TODO Auto-generated method stub
+			if ("servlet".equals(qName)) {
+				_servletClassName = attributes.getValue("class");
+			}
+		}
+
+		/**
+		 * @return Returns the servletClassName.
+		 */
+		String getServletClassName() {
+			return _servletClassName;
+		}
+	}
+
+	private static final int BUFFER_SIZE = 1024;
+
+	static protected final long DEFAULT_EXPIRE = 1000L * 60L * 60L * 12L;// 12
+																			// Hours
+
+	/**
+	 * Map contain gwt service servlet instances for different modules.
+	 */
+	private Map serviceServlets = Collections.synchronizedMap(new HashMap());
+
+	private Servlet _defaultServiceServlet;
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see javax.faces.event.PhaseListener#afterPhase(javax.faces.event.PhaseEvent)
+	 */
+	public void afterPhase(PhaseEvent event) {
+		// Check for request type - in case of google RPC call, forward to
+		// service servlet.
+		// headerMap must contain x-gwtcallingmodule='module name'
+		// content-type=text/plain; charset=utf-8
+		FacesContext facesContext = event.getFacesContext();
+		ExternalContext externalContext = facesContext.getExternalContext();
+		String requestContentType = externalContext.getRequestContentType();
+		Map requestParameterMap = externalContext.getRequestParameterMap();
+		if (null != requestContentType
+				&& requestContentType.contains("text/plain")) {
+			// GWT module name. Due to differences in browsers and containers, compare with ignore case.
+			String module = (String) requestParameterMap.get(ComponentEntryPoint.GWT_MODULE_NAME_PARAMETER);
+			Servlet servletForModule;
+			if(null != module){
+					servletForModule = getServletForModule(facesContext, module);
+			} else {
+					servletForModule = getDefaultServiceServlet(facesContext);
+			}
+					try {
+						servletForModule.service((ServletRequest) externalContext
+								.getRequest(), (ServletResponse) externalContext
+								.getResponse());
+					} catch (ServletException e) {
+						_log.severe("Servlet exception in GWT service method "+e.getMessage());
+						throw new FacesException(
+								"Servlet exception in GWT service method", e);
+					} catch (IOException e) {
+						_log.severe("IO exception in GWT service method "+e.getMessage());
+						throw new FacesException("IO exception in GWT service method",
+								e);
+					}
+					facesContext.responseComplete();
+		}
+		// Map requestParameterMap = externalContext.getRequestParameterMap();
+	}
+
+	/**
+	 * Get GWT RPC service servlet instance for module
+	 * 
+	 * @param context
+	 * @param moduleName
+	 */
+	private Servlet getServletForModule(FacesContext context, String moduleName) {
+		// First - check for existing instances
+		if (serviceServlets.containsKey(moduleName)) {
+			if (_log.isLoggable(Level.FINE)) {
+				_log.fine("Found existing servlet for module "+moduleName);
+			}
+			return (Servlet) serviceServlets.get(moduleName);
+		}
+		// Second -attempt to read module config and, if in contain servlet
+		// definition -
+		// create instance and store in Map
+		String servletClass = getServletClassForModule(moduleName);
+		if(null != servletClass){
+			Servlet servlet = createServlet(context,servletClass);
+			serviceServlets.put(moduleName,servlet);
+			if (_log.isLoggable(Level.FINE)) {
+				_log.fine("Create new servlet for module "+moduleName+" with class "+servletClass);
+			}
+			return servlet;
+		}
+		// last - return default service servlet
+		Servlet defaultServiceServlet = getDefaultServiceServlet(context);
+		serviceServlets.put(moduleName,defaultServiceServlet);
+		if (_log.isLoggable(Level.FINE)) {
+			_log.fine("Use default servlet for module "+moduleName);
+		}
+		return defaultServiceServlet;
+	}
+
+	private String getServletClassForModule(String moduleName) {
+		ClassLoader classLoader = Thread.currentThread()
+		.getContextClassLoader();
+		String servletClassName = null;
+		// for module foo.bar.Module config file will be placed at foo/bar/Module.gwt.xml
+		String gwtModuleConfigPath = moduleName.replace('.','/')+".gwt.xml";
+		InputStream stream = classLoader.getResourceAsStream(gwtModuleConfigPath);
+		if(null != stream){
+			// We have module confir to read - parce it for servlen name.
+			SAXParserFactory parserFactory = SAXParserFactory.newInstance();
+			try {
+				SAXParser parser = parserFactory.newSAXParser();
+				WebModuleConfigHandler handler = new WebModuleConfigHandler();
+				parser.parse(stream,handler);
+				servletClassName = handler.getServletClassName();
+			} catch (Exception e) {
+				if (_log.isLoggable(Level.WARNING)) {
+					_log.warning("Exception in parsing web module config "+e.getMessage());
+				}
+			}
+		}
+		return servletClassName;
+	}
+
+	/**
+	 * Create and initialize instance for servlet from class
+	 * 
+	 * @param context
+	 * @param className
+	 *            name of servlet class.
+	 */
+	private Servlet createServlet(FacesContext context, String className) {
+		ClassLoader classLoader = Thread.currentThread()
+				.getContextClassLoader();
+		try {
+			Class clazz = classLoader.loadClass(className);
+			Servlet servlet = (Servlet) clazz.newInstance();
+			final ServletContext servletContext = (ServletContext) context.getExternalContext()
+			.getContext();
+			servlet.init(new ServletConfig() {
+
+				public String getServletName() {
+					// TODO Auto-generated method stub
+					return "gwtFacesService";
+				}
+
+				public ServletContext getServletContext() {
+					// TODO Auto-generated method stub
+					return servletContext;
+				}
+
+				public String getInitParameter(String arg0) {
+					// TODO Auto-generated method stub
+					return null;
+				}
+
+				public Enumeration getInitParameterNames() {
+					// TODO Auto-generated method stub
+					return null;
+				}
+			});
+			return servlet;
+		} catch (Exception e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+			throw new FacesException("Error to create gwt service servlet", e);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see javax.faces.event.PhaseListener#beforePhase(javax.faces.event.PhaseEvent)
+	 */
+	public void beforePhase(PhaseEvent event) {
+		// check for script name.
+		FacesContext facesContext = event.getFacesContext();
+		ExternalContext externalContext = facesContext.getExternalContext();
+		String mime = "text/html";
+		String resourceName = null;
+		// assume that mapping have /faces/* prefix
+		String pathInfo = externalContext
+				.getRequestPathInfo();
+		
+		if (null != pathInfo   ) {
+			if(pathInfo.charAt(0) == '/'){
+				pathInfo = pathInfo.substring(1);
+			}
+			if (pathInfo.startsWith(GWT_RESOURCE_PREFIX) ) {
+				resourceName = pathInfo;
+				if (pathInfo.endsWith(".js")) {
+					mime = "text/javascript";
+				} else if (pathInfo.endsWith(".xml")) {
+					// xml with module cache entries
+					mime = "text/xml";
+				} else if (pathInfo.endsWith(".css")) {
+					// xml with module cache entries
+					mime = "text/css";
+				} else if (pathInfo.endsWith(".gif")) {
+					mime = "image/gif";
+				} else if (pathInfo.endsWith(".jpg")
+						|| pathInfo.endsWith(".jpeg")) {
+					mime = "image/jpeg";
+				} else {
+					// normal request - do nothing
+					//				return;
+				}
+				// we have resource - send it.
+				try {
+					HttpServletResponse response = (HttpServletResponse) externalContext.getResponse();
+					ClassLoader loader = Thread.currentThread()
+							.getContextClassLoader();
+					InputStream in = loader.getResourceAsStream("META-INF/"
+							+ resourceName);
+					
+					if (null != in) {
+						OutputStream out = response.getOutputStream();
+						response.setContentType(mime);
+						// Set cachimg/nocaching headers.
+						
+						if (resourceName.endsWith(".nocache.html")) {
+							response.setHeader("Cache-control", "no-cache");
+							response.setHeader("Cache-control", "no-store");
+							response.setHeader("Pragma", "no-cache");
+							response.setIntHeader("Expires", 0);
+						} else if (resourceName.contains(".cache.")){
+							// TODO - send notmodified if request contain If-Modified-Since
+							// ?
+							HttpServletRequest request = (HttpServletRequest) externalContext.getRequest();
+							long ifModifiedSince = request
+								.getDateHeader("If-Modified-Since");
+								if (ifModifiedSince >= 0) {
+									response.setStatus(304);// Not modified
+									in.close();
+									out.close();
+									facesContext.responseComplete();
+									return ;
+								} else {
+									response.setDateHeader("Expires", System
+											.currentTimeMillis()
+											+ DEFAULT_EXPIRE);
+								}
+						}
+						// Set output compression
+						if(mime.contains("text") || mime.contains("xml")){
+						String encoding = (String) externalContext.getRequestHeaderMap().get("Accept-Encoding");
+						if(null != encoding && encoding.contains("gzip")){
+							// TODO - use cache ?
+							response.setHeader("Content-Encoding","gzip");
+							out = new GZIPOutputStream(out,BUFFER_SIZE);
+						}
+						}
+						byte[] buffer = new byte[BUFFER_SIZE];
+						int buffersCount = -1;
+						int length;
+						for (length = in.read(buffer); length > 0; length = in
+								.read(buffer)) {
+							out.write(buffer, 0, length);
+							buffersCount++;
+						}
+						// For cacheable resources, store size.
+						// if(isCacheable()){
+						// setContentLength(buffersCount*BUFFER_SIZE+length);
+						// }
+						in.close();
+						out.flush();
+						out.close();
+					} else {
+						response.sendError(404);
+					}
+				} catch (IOException e) {
+					throw new FacesException("Error then send resource", e);
+				} finally {
+					facesContext.responseComplete();
+				}
+			}
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see javax.faces.event.PhaseListener#getPhaseId()
+	 */
+	public PhaseId getPhaseId() {
+		// TODO Auto-generated method stub
+		return PhaseId.RESTORE_VIEW;
+	}
+
+	/**
+	 * @return Returns the defaultServiceServlet.
+	 */
+	public Servlet getDefaultServiceServlet(FacesContext context) {
+		if (_defaultServiceServlet == null) {
+			_defaultServiceServlet = createServlet(context,
+					GwtFacesServlet.class.getName());
+		}
+		return _defaultServiceServlet;
+	}
+
+}

Added: branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/GwtSource.java
===================================================================
--- branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/GwtSource.java	                        (rev 0)
+++ branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/GwtSource.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,53 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.gwt.jsf;
+
+
+/**
+ * Interface for all components, need to process RPC events from client part.
+ * @author shura
+ *
+ */
+public interface GwtSource {
+	/**
+     * same as for ActionSource, but for GwtListener
+     * 
+     * @see javax.faces.component.ActionSource#addActionListener(javax.faces.event.ActionListener)
+     */
+    public void addGwtListener(GwtListener listener);
+
+    /**
+     * same as for ActionSource, but for GwtListener
+     * 
+     * @see javax.faces.component.ActionSource#getActionListeners()
+     */
+    public GwtListener[] getGwtListeners();
+
+    /**
+     *  same as for ActionSource, but for GwtListener
+     * @see javax.faces.component.ActionSource#removeActionListener(javax.faces.event.ActionListener)
+     */
+    public void removeGwtListener(GwtListener listener);
+
+    
+
+}

Added: branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/GwtUtils.java
===================================================================
--- branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/GwtUtils.java	                        (rev 0)
+++ branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/GwtUtils.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,47 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.gwt.jsf;
+
+import javax.el.ELContext;
+import javax.el.MethodExpression;
+import javax.el.MethodInfo;
+import javax.faces.FacesException;
+import javax.faces.context.FacesContext;
+
+import org.ajax4jsf.gwt.client.GwtFacesEvent;
+import org.ajax4jsf.gwt.client.GwtFacesResult;
+
+/**
+ * @author shura
+ *
+ */
+public class GwtUtils {
+
+	/**
+	 * Not instantiable class - only static methods used.
+	 */
+	private GwtUtils() {
+		super();
+		// TODO Auto-generated constructor stub
+	}
+
+}

Added: branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/PageRenderer.java
===================================================================
--- branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/PageRenderer.java	                        (rev 0)
+++ branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/PageRenderer.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,211 @@
+/**
+ * 
+ */
+package org.ajax4jsf.gwt.jsf;
+
+import java.io.IOException;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Set;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+import javax.faces.render.Renderer;
+
+/**
+ * Render a gwt:page tag.  Scrapes the component tree for GWT components, and adds the
+ * appropriate meta tags to the header.  Also creates the GWT script tag as the last child
+ * of the head, and the history iframe as the first child of the body.
+ * @author shura
+ */
+public class PageRenderer extends Renderer {
+
+    public static final String FACES_SERVLET_PREFIX_PARAM = "org.ajax4jsg.gwt.SCRIPT_PREFIX";
+
+    private static final String RENDERED_FLAG_BASE = "org.ajax4jsf.gwt.rendered.";
+    /*
+      * (non-Javadoc)
+      *
+      * @see javax.faces.render.Renderer#encodeBegin(javax.faces.context.FacesContext,
+      *      javax.faces.component.UIComponent)
+      */
+    public void encodeBegin(FacesContext context, UIComponent component)
+            throws IOException {
+        super.encodeBegin(context, component);
+
+        ResponseWriter writer = context.getResponseWriter();
+        Map attributes = component.getAttributes();
+        writer.startElement("html", component);
+
+        // added by RobJ for Facelets compatibility
+        writer.writeAttribute("xmlns", "http://www.w3.org/1999/xhtml", null);
+
+        writer.startElement("head", component);
+
+        UIComponent head = component.getFacet("head");
+        if (null != head) {
+            head.encodeAll(context);
+        }
+
+        Object title = attributes.get("title");
+        if (null != title) {
+            writer.startElement("title", component);
+            writer.writeText(title, "title");
+            writer.endElement("title");
+        }
+
+        String scriptsBase = getScriptBase(context);
+        writeParameters(context);
+
+        writer.endElement("head");
+        writer.startElement("body", component);
+
+        // Used GWT modules
+        Set modules = findGwtModules(context, component);
+        for (Iterator iter = modules.iterator(); iter.hasNext();) {
+            String moduleName = (String) iter.next();
+            writeModule(context, scriptsBase, moduleName);
+        }
+
+        // Navigation history iframe
+        writeHistoryFrame(context);
+
+    }
+
+    /**
+     * Write the GWT history frame.  Expects to be the first element in the body.
+     * @throws IOException
+     */
+    public static void writeHistoryFrame(FacesContext context) throws IOException {
+        String renderedFlag = RENDERED_FLAG_BASE+"history";
+        Map requestMap = context.getExternalContext().getRequestMap();
+        Object rendered = requestMap.get(renderedFlag);
+        if (rendered == null) {
+            requestMap.put(renderedFlag, Boolean.TRUE);
+            ResponseWriter writer = context.getResponseWriter();
+            writer.startElement("iframe", null);
+            writer.writeAttribute("id", "__gwt_historyFrame", null);
+            writer.writeAttribute("style", "width:0;height:0;border:0", null);
+            writer.endElement("iframe");
+        }
+    }
+
+    /*
+      * (non-Javadoc)
+      *
+      * @see javax.faces.render.Renderer#encodeEnd(javax.faces.context.FacesContext,
+      *      javax.faces.component.UIComponent)
+      */
+    public void encodeEnd(FacesContext context, UIComponent component)
+            throws IOException {
+        super.encodeEnd(context, component);
+        ResponseWriter writer = context.getResponseWriter();
+        writer.endElement("body");
+        writer.endElement("html");
+    }
+
+    private Set findGwtModules(FacesContext context, UIComponent component) {
+        Set found = new HashSet();
+        if (component instanceof GwtComponent) {
+            found.add(((GwtComponent) component).getModuleName());
+        }
+        for (Iterator iter = component.getFacetsAndChildren(); iter.hasNext();) {
+            UIComponent child = (UIComponent) iter.next();
+            found.addAll(findGwtModules(context, child));
+        }
+        return found;
+    }
+
+    /**
+     * Write all necessary GWT properties and parameters as meta tags.
+     * @param context
+     * @throws IOException
+     */
+    public static void writeParameters(FacesContext context) throws IOException{
+        String renderedFlag = RENDERED_FLAG_BASE+"script";
+        Map requestMap = context.getExternalContext().getRequestMap();
+        Object rendered = requestMap.get(renderedFlag);
+        if (rendered == null) {
+            requestMap.put(renderedFlag, Boolean.TRUE);
+            ResponseWriter writer = context.getResponseWriter();
+            String viewId = context.getViewRoot().getViewId();
+            writeGwtProperty(writer, "viewid", viewId);
+            Locale locale = context.getViewRoot().getLocale();
+            writeGwtProperty(writer, "locale", locale.toString());
+            String action = context.getApplication().getViewHandler().getActionURL(
+                    context, viewId);
+            action = context.getExternalContext().encodeActionURL(action);
+            writeGwtProperty(writer, "action", action);
+            String scriptsBase = getScriptBase(context);
+            writeGwtProperty(writer, "base", scriptsBase);
+        }
+    }
+
+    /**
+     * Write the module script tag.  This will load the "selection script" (GWT developer
+     * terminology) for the module.  The path in the script element will be something like
+     * /webappname/faces/gwt/modulename/modulename.nocache.js.
+     */
+    public static void writeModule(FacesContext context, String base,String name) throws IOException{
+        String renderedFlag = RENDERED_FLAG_BASE+name;
+        Map requestMap = context.getExternalContext().getRequestMap();
+        Object rendered = requestMap.get(renderedFlag);
+        if (rendered == null) {
+            requestMap.put(renderedFlag, Boolean.TRUE);
+            ResponseWriter writer = context.getResponseWriter();
+
+            String scriptsBase = getScriptBase(context);
+
+            // Marker script BEFORE the actual script, to work around weird Firefox issue with
+            // adding it from the selection script computeScriptBase function.
+            // Marker script looks like:  <script id="__gwt_marker_demo.gwt.HelloWidget"></script>
+            writer.startElement("script", null);
+            writer.writeAttribute("language", "javascript", null);
+            writer.writeAttribute("id", "__gwt_js_marker_" + name, null);
+            writer.endElement("script");
+
+            // Write the selection script
+            writer.startElement("script", null);
+            writer.writeAttribute("language", "javascript", null);
+            writer.writeAttribute("src", scriptsBase + name + "/" + name + ".nocache.js", null);
+            writer.endElement("script");
+
+
+        }
+    }
+
+    /**
+     * Get the base URL for scripts.  This will in general be something like "/webappname/faces/gwt".
+     * @param context
+     */
+    public static String getScriptBase(FacesContext context) {
+        String resourcesPrefix = context.getExternalContext().getInitParameter(FACES_SERVLET_PREFIX_PARAM);
+        if( null == resourcesPrefix){
+            resourcesPrefix = "/faces/";
+        }
+        String scriptsBase = context.getApplication().getViewHandler().getResourceURL(context,resourcesPrefix+GwtPhaseListener.GWT_RESOURCE_PREFIX);
+        return scriptsBase;
+    }
+
+    /**
+     * Write a GWT meta property.  Meta properties are meta elements with name="gwt:property" and
+     * content="name=value".
+     */
+    private static void writeGwtProperty(ResponseWriter writer, String name, String value) throws IOException{
+        writeMeta(writer, "gwt:property", name+"="+value);
+    }
+
+    /**
+     * Write a meta element directly to the response.
+     */
+    private static void writeMeta(ResponseWriter writer, String name, String content) throws IOException{
+        writer.startElement("meta", null);
+        writer.writeAttribute("name", name, null);
+        writer.writeAttribute("content", content, null);
+        writer.endElement("meta");
+
+    }
+}

Added: branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/PageTag.java
===================================================================
--- branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/PageTag.java	                        (rev 0)
+++ branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/PageTag.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,52 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.gwt.jsf;
+
+import javax.faces.webapp.UIComponentELTag;
+
+/**
+ * @author shura
+ * 
+ */
+public class PageTag extends UIComponentELTag {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see javax.faces.webapp.UIComponentTagBase#getComponentType()
+	 */
+	public String getComponentType() {
+		// TODO Auto-generated method stub
+		return "org.ajax4jsf.gwt.Page";
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see javax.faces.webapp.UIComponentTagBase#getRendererType()
+	 */
+	public String getRendererType() {
+		// TODO Auto-generated method stub
+		return "org.ajax4jsf.gwt.Page";
+	}
+
+}

Added: branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/UIPage.java
===================================================================
--- branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/UIPage.java	                        (rev 0)
+++ branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/UIPage.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,41 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.gwt.jsf;
+
+import javax.faces.component.UIComponentBase;
+
+/**
+ * @author shura
+ * 
+ */
+public class UIPage extends UIComponentBase {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see javax.faces.component.UIComponent#getFamily()
+	 */
+	public String getFamily() {
+		return "org.ajax4jsf.gwt.Page";
+	}
+
+}

Added: branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/UIWidget.java
===================================================================
--- branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/UIWidget.java	                        (rev 0)
+++ branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/UIWidget.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,538 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.gwt.jsf;
+
+import java.io.Serializable;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.ResourceBundle;
+
+import javax.el.ELException;
+import javax.el.MethodExpression;
+import javax.el.ValueExpression;
+import javax.faces.FacesException;
+import javax.faces.component.ActionSource2;
+import javax.faces.component.NamingContainer;
+import javax.faces.component.UICommand;
+import javax.faces.component.UIComponentBase;
+import javax.faces.component.UIInput;
+import javax.faces.component.UIParameter;
+import javax.faces.context.FacesContext;
+import javax.faces.el.MethodBinding;
+import javax.faces.event.AbortProcessingException;
+import javax.faces.event.ActionEvent;
+import javax.faces.event.ActionListener;
+import javax.faces.event.FacesEvent;
+
+/**
+ * Universal component for Google Web toolkit widgets. Can be used as input
+ * component, action component and both.
+ * 
+ * @author shura
+ * 
+ */
+public class UIWidget extends UIInput implements GwtComponent, GwtSource,
+		ActionSource2 {
+
+	public static final String COMPONENT_TYPE = "org.ajax4jsf.gwt.Widget";
+
+	private String _module;
+
+	private String _widget;
+
+	private String _bundleBase;
+
+	private String _bundleName;
+
+	// Html attributes
+	private String _style;
+
+	private String _styleClass;
+
+	private String _layout;
+
+	private String _actionParam = NamingContainer.SEPARATOR_CHAR + "action";
+
+	private String _inputParam = NamingContainer.SEPARATOR_CHAR + "value";
+
+	private UICommand _commandBrige;
+
+	public UIWidget() {
+		_commandBrige = new UICommand();
+		_commandBrige.setParent(this);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see javax.faces.component.UIComponent#getFamily()
+	 */
+	public String getFamily() {
+		return "org.ajax4jsf.gwt.Widget";
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.gwt.jsf.GwtComponent#getModuleName()
+	 */
+	public String getModuleName() {
+		// TODO Auto-generated method stub
+		return _module;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.gwt.jsf.GwtComponent#getWidgetName()
+	 */
+	public String getWidgetName() {
+		// TODO Auto-generated method stub
+		return _widget;
+	}
+
+	/**
+	 * @return the actionParam
+	 */
+	public String getActionParam() {
+		return _actionParam;
+	}
+
+	/**
+	 * @param actionParam
+	 *            the actionParam to set
+	 */
+	public void setActionParam(String actionParam) {
+		_actionParam = actionParam;
+	}
+
+	/**
+	 * @return the bundleBasename
+	 */
+	public String getBundleBase() {
+		if (this._bundleBase != null) {
+			return this._bundleBase;
+		}
+
+		ValueExpression ve = getValueExpression("bundleBase");
+		if (ve != null) {
+			try {
+				return ((String) ve.getValue(getFacesContext().getELContext()));
+			} catch (ELException e) {
+				throw new FacesException(e);
+			}
+		} else {
+			return (this._bundleBase);
+		}
+	}
+
+	/**
+	 * @param bundleBasename
+	 *            the bundleBasename to set
+	 */
+	public void setBundleBase(String bundleBasename) {
+		_bundleBase = bundleBasename;
+	}
+
+	/**
+	 * @return the bundleName
+	 */
+	public String getBundleName() {
+		if (this._bundleName != null) {
+			return this._bundleName;
+		}
+
+		ValueExpression ve = getValueExpression("bundleName");
+		if (ve != null) {
+			try {
+				return ((String) ve.getValue(getFacesContext().getELContext()));
+			} catch (ELException e) {
+				throw new FacesException(e);
+			}
+		} else {
+			return (this._bundleName);
+		}
+	}
+
+	/**
+	 * @param bundleName
+	 *            the bundleName to set
+	 */
+	public void setBundleName(String bundleName) {
+		_bundleName = bundleName;
+	}
+
+	/**
+	 * @return the inputParam
+	 */
+	public String getInputParam() {
+		return _inputParam;
+	}
+
+	/**
+	 * @param inputParam
+	 *            the inputParam to set
+	 */
+	public void setInputParam(String inputParam) {
+		_inputParam = inputParam;
+	}
+
+	/**
+	 * @return the layout
+	 */
+	public String getLayout() {
+		if (this._layout != null) {
+			return this._layout;
+		}
+
+		ValueExpression ve = getValueExpression("layout");
+		if (ve != null) {
+			try {
+				return ((String) ve.getValue(getFacesContext().getELContext()));
+			} catch (ELException e) {
+				throw new FacesException(e);
+			}
+		} else {
+			return (this._layout);
+		}
+	}
+
+	/**
+	 * @param layout
+	 *            the layout to set
+	 */
+	public void setLayout(String layout) {
+		_layout = layout;
+	}
+
+	/**
+	 * @return the style
+	 */
+	public String getStyle() {
+		if (this._style != null) {
+			return this._style;
+		}
+
+		ValueExpression ve = getValueExpression("style");
+		if (ve != null) {
+			try {
+				return ((String) ve.getValue(getFacesContext().getELContext()));
+			} catch (ELException e) {
+				throw new FacesException(e);
+			}
+		} else {
+			return (this._style);
+		}
+	}
+
+	/**
+	 * @param style
+	 *            the style to set
+	 */
+	public void setStyle(String style) {
+		_style = style;
+	}
+
+	/**
+	 * @return the styleClass
+	 */
+	public String getStyleClass() {
+		if (this._styleClass != null) {
+			return this._styleClass;
+		}
+
+		ValueExpression ve = getValueExpression("styleClass");
+		if (ve != null) {
+			try {
+				return ((String) ve.getValue(getFacesContext().getELContext()));
+			} catch (ELException e) {
+				throw new FacesException(e);
+			}
+		} else {
+			return (this._styleClass);
+		}
+	}
+
+	/**
+	 * @param styleClass
+	 *            the styleClass to set
+	 */
+	public void setStyleClass(String styleClass) {
+		_styleClass = styleClass;
+	}
+
+	/**
+	 * @return the module
+	 */
+	public String getModule() {
+		return _module;
+	}
+
+	/**
+	 * @param moduleName
+	 *            the moduleName to set
+	 */
+	public void setModule(String moduleName) {
+		_module = moduleName;
+	}
+
+	/**
+	 * @return the widget
+	 */
+	public String getWidget() {
+		return _widget;
+	}
+
+	/**
+	 * @param widgetName
+	 *            the widgetName to set
+	 */
+	public void setWidget(String widgetName) {
+		_widget = widgetName;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.gwt.jsf.GwtComponent#getWidgetParameters()
+	 */
+	public Map getWidgetParameters() {
+		Map params = new HashMap();
+		String basename = getBundleBase();
+		String bundleName = getBundleName();
+		if (null != basename && null != bundleName) {
+			try {
+				ResourceBundle bundle = ResourceBundle
+						.getBundle(
+								basename,
+								FacesContext.getCurrentInstance().getViewRoot()
+										.getLocale());
+				HashMap messages = new HashMap();
+				for (Enumeration keys = bundle.getKeys(); keys.hasMoreElements();) {
+					String key = (String) keys.nextElement();
+					messages.put(key, bundle.getString(key));
+				}
+				params.put(bundleName, messages);
+			} catch (Exception e) {
+				// message bundle not found
+			}
+
+		}
+		for (Iterator iter = getChildren().iterator(); iter.hasNext();) {
+			Object element = iter.next();
+			if (element instanceof UIParameter) {
+				UIParameter param = (UIParameter) element;
+				params.put(param.getName(), param.getValue());
+			}
+			
+		}
+		return params;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see javax.faces.component.UIInput#restoreState(javax.faces.context.FacesContext,
+	 *      java.lang.Object)
+	 */
+	public void restoreState(FacesContext context, Object state) {
+		WidgetState componentState = (WidgetState) state;
+		super.restoreState(context, componentState.parentState);
+		_module = componentState.moduleName;
+		_widget = componentState.widgetName;
+		_bundleBase = componentState.bundleBasename;
+		_bundleName = componentState.bundleName;
+		_style = componentState.style;
+		_styleClass = componentState.styleClass;
+		_layout = componentState.layout;
+		_commandBrige.restoreState(context, componentState.commandState);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see javax.faces.component.UIInput#saveState(javax.faces.context.FacesContext)
+	 */
+	public Object saveState(FacesContext context) {
+		WidgetState state = new WidgetState();
+		state.parentState = super.saveState(context);
+		state.commandState = _commandBrige.saveState(context);
+		state.moduleName = _module;
+		state.widgetName = _widget;
+		state.bundleBasename = _bundleBase;
+		state.bundleName = _bundleName;
+		state.style = _style;
+		state.styleClass = _styleClass;
+		state.layout = _layout;
+		return state;
+	}
+
+	/**
+	 * Class for keep component state , realised by "snapshot" pattern.
+	 * 
+	 * @author shura
+	 * 
+	 */
+	private static class WidgetState implements Serializable {
+		/**
+		 * 
+		 */
+		private static final long serialVersionUID = 8689558840635652079L;
+
+		private String moduleName;
+
+		private String widgetName;
+
+		private String bundleBasename;
+
+		private String bundleName;
+
+		// Html attributes
+		private String style;
+
+		private String styleClass;
+
+		private String layout;
+
+		private Object commandState;
+
+		private Object parentState;
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see javax.faces.component.UIComponentBase#broadcast(javax.faces.event.FacesEvent)
+	 */
+	public void broadcast(FacesEvent event) throws AbortProcessingException {
+		if (event instanceof ActionEvent) {
+			_commandBrige.broadcast(event);
+		} else {
+			super.broadcast(event);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see javax.faces.component.UIComponentBase#queueEvent(javax.faces.event.FacesEvent)
+	 */
+	public void queueEvent(FacesEvent event) {
+		if (event instanceof ActionEvent) {
+			_commandBrige.queueEvent(event);
+		} else {
+			super.queueEvent(event);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.gwt.jsf.GwtSource#addGwtListener(org.ajax4jsf.gwt.jsf.GwtListener)
+	 */
+	public void addGwtListener(GwtListener listener) {
+		addFacesListener(listener);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.gwt.jsf.GwtSource#getGwtListeners()
+	 */
+	public GwtListener[] getGwtListeners() {
+		return (GwtListener[]) getFacesListeners(GwtListener.class);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.gwt.jsf.GwtSource#removeGwtListener(org.ajax4jsf.gwt.jsf.GwtListener)
+	 */
+	public void removeGwtListener(GwtListener listener) {
+		removeFacesListener(listener);
+	}
+
+	/**
+	 * @return
+	 */
+	public MethodExpression getActionExpression() {
+		return _commandBrige.getActionExpression();
+	}
+
+	/**
+	 * @param action
+	 */
+	public void setActionExpression(MethodExpression action) {
+		_commandBrige.setActionExpression(action);
+
+	}
+
+	public void addActionListener(ActionListener listener) {
+		_commandBrige.addActionListener(listener);
+	}
+
+	public MethodBinding getAction() {
+		return _commandBrige.getAction();
+	}
+
+	public MethodBinding getActionListener() {
+		return _commandBrige.getActionListener();
+	}
+
+	public ActionListener[] getActionListeners() {
+		// TODO Auto-generated method stub
+		return _commandBrige.getActionListeners();
+	}
+
+	public void removeActionListener(ActionListener listener) {
+		_commandBrige.removeActionListener(listener);
+
+	}
+
+	public void setAction(MethodBinding action) {
+		_commandBrige.setAction(action);
+	}
+
+	public void setActionListener(MethodBinding actionListener) {
+		_commandBrige.setActionListener(actionListener);
+	}
+
+	/**
+	 * @return
+	 * @see javax.faces.component.UICommand#isImmediate()
+	 */
+	public boolean isImmediate() {
+		return _commandBrige.isImmediate();
+	}
+
+	/**
+	 * @param immediate
+	 * @see javax.faces.component.UICommand#setImmediate(boolean)
+	 */
+	public void setImmediate(boolean immediate) {
+		_commandBrige.setImmediate(immediate);
+	}
+
+}

Added: branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/WidgetRenderer.java
===================================================================
--- branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/WidgetRenderer.java	                        (rev 0)
+++ branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/WidgetRenderer.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,367 @@
+/**
+ * 
+ */
+package org.ajax4jsf.gwt.jsf;
+
+import java.io.IOException;
+import java.util.Iterator;
+import java.util.Map;
+
+import javax.el.ValueExpression;
+import javax.faces.FacesException;
+import javax.faces.component.ActionSource;
+import javax.faces.component.EditableValueHolder;
+import javax.faces.component.UIComponent;
+import javax.faces.component.ValueHolder;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+import javax.faces.convert.Converter;
+import javax.faces.convert.ConverterException;
+import javax.faces.render.Renderer;
+
+/**
+ * @author shura
+ * 
+ */
+public class WidgetRenderer extends Renderer {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see javax.faces.render.Renderer#decode(javax.faces.context.FacesContext,
+	 *      javax.faces.component.UIComponent)
+	 */
+	public void decode(FacesContext context, UIComponent component) {
+		// TODO Auto-generated method stub
+		super.decode(context, component);
+		String clientId = component.getClientId(context);
+		Map requestParameterMap = context.getExternalContext()
+				.getRequestParameterMap();
+		Object parameter;
+		String paramName;
+		if (component instanceof ActionSource) {
+			if (component instanceof UIWidget) {
+				paramName = clientId + ((UIWidget) component).getActionParam();
+			} else {
+				paramName = clientId;
+			}
+			parameter = requestParameterMap.get(paramName);
+			if (null != parameter) {
+
+				// ActionSource action = (ActionSource) component;
+				component.queueEvent(new GwtActionEvent(component, parameter));
+			}
+		}
+		if (component instanceof EditableValueHolder) {
+			if (component instanceof UIWidget) {
+				paramName = clientId + ((UIWidget) component).getInputParam();
+			} else {
+				paramName = clientId;
+			}
+			parameter = requestParameterMap.get(paramName);
+			if (null != parameter) {
+				EditableValueHolder editable = (EditableValueHolder) component;
+				editable.setSubmittedValue(parameter);
+			}
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see javax.faces.render.Renderer#encodeBegin(javax.faces.context.FacesContext,
+	 *      javax.faces.component.UIComponent)
+	 */
+	public void encodeBegin(FacesContext context, UIComponent component)
+			throws IOException {
+
+		super.encodeBegin(context, component);
+		Map attributes = component.getAttributes();
+		String moduleName;
+		String widgetName;
+		if (component instanceof GwtComponent) {
+			GwtComponent gwt = (GwtComponent) component;
+			moduleName = gwt.getModuleName();
+			widgetName = gwt.getWidgetName();
+		} else {
+			moduleName = (String) attributes.get("moduleName");
+			widgetName = (String) attributes.get("widgetName");
+		}
+		ResponseWriter writer = context.getResponseWriter();
+		// Write script and metas if not rendered before.
+		PageRenderer.writeModule(context, PageRenderer.getScriptBase(context), moduleName);
+		PageRenderer.writeParameters(context);
+		// Base <span> - widget place
+		String element = getElement(component);
+		writer.startElement(element, component);
+		writer.writeAttribute("id", component.getClientId(context), null);
+		StringBuffer htmlClass = new StringBuffer(moduleName);
+		// GWT component module and widget name
+		if (null != widgetName) {
+			htmlClass.append(" ").append(widgetName);
+		}
+		Object styleClass = attributes.get("styleClass");
+		if (null != styleClass) {
+			htmlClass.append(" ").append(styleClass);
+		}
+		if (htmlClass.length() > 0) {
+			writer.writeAttribute("class", htmlClass, "styleClass");
+		}
+		Object style = attributes.get("style");
+		if (null != style) {
+			writer.writeAttribute("style", style, "style");
+		}
+		encodeFacets(writer, context, component, element);
+	}
+
+	/**
+	 * Hoock method for encode all component facets - use in subclass ability to
+	 * encode childrens and facets.
+	 * 
+	 * @param writer
+	 * @param context
+	 * @param component
+	 * @param element
+	 * @throws IOException
+	 */
+	protected void encodeFacets(ResponseWriter writer, FacesContext context,
+			UIComponent component, String element) throws IOException {
+		// Put content encoding here.
+	}
+
+	protected String getElement(UIComponent component) {
+		Object layout = component.getAttributes().get("layout");
+		return "block".equals(layout) ? "div" : "span";
+	}
+
+	/**
+	 * Write in html parameters to create widget. For {@link GwtComponent }
+	 * write html span element with id={@link UIComponent#getClientId(javax.faces.context.FacesContext)}+":_data"
+	 * and for each entry in {@link GwtComponent#getWidgetParameters()} map -
+	 * child span element, with title attribute from key , and text context with
+	 * value.
+	 * 
+	 * @param context
+	 * @param component
+	 * @throws IOException
+	 */
+	protected void writeWidgetParameters(FacesContext context,
+			UIComponent component) throws IOException {
+		// Write widget data.
+		Map widgetParameters = null;
+		if (component instanceof GwtComponent) {
+			GwtComponent gwt = (GwtComponent) component;
+			widgetParameters = gwt.getWidgetParameters();
+		}
+		String valueAsString = getValueAsString(context, component);
+		if (null != widgetParameters || null != valueAsString) {
+			ResponseWriter writer = context.getResponseWriter();
+			writer.startElement("span", component);
+			writer.writeAttribute("id", component.getClientId(context)
+					+ ":_data", null);
+			writer.writeAttribute("style", "display:none;", null);
+			if (null != widgetParameters) {
+				writeParametersMap(widgetParameters, writer);
+			}
+			writeParam(writer, "value", valueAsString);
+			writer.endElement("span");
+		}
+
+	}
+
+	/**
+	 * @param widgetParameters
+	 * @param writer
+	 * @throws IOException
+	 */
+	protected void writeParametersMap(Map widgetParameters,
+			ResponseWriter writer) throws IOException {
+		for (Iterator iter = widgetParameters.keySet().iterator(); iter
+				.hasNext();) {
+			Object key = iter.next();
+			Object paramValue = widgetParameters.get(key);
+			writeParam(writer, key, paramValue);
+		}
+	}
+
+	/**
+	 * @param writer
+	 * @param paramName
+	 * @param paramValue
+	 * @throws IOException
+	 */
+	protected void writeParam(ResponseWriter writer, Object paramName,
+			Object paramValue) throws IOException {
+		if (null != paramValue) {
+			// Write parameter
+			writer.startElement("span", null);
+			writer.writeAttribute("title", paramName, "param_name");
+			if (paramValue instanceof Map) {
+				Map paramMap = (Map) paramValue;
+				writeParametersMap(paramMap, writer);
+			} else {
+				writer.writeText(paramValue, "param_value");
+			}
+			writer.endElement("span");
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see javax.faces.render.Renderer#encodeEnd(javax.faces.context.FacesContext,
+	 *      javax.faces.component.UIComponent)
+	 */
+	public void encodeEnd(FacesContext context, UIComponent component)
+			throws IOException {
+		// TODO Auto-generated method stub
+		super.encodeEnd(context, component);
+		String element = getElement(component);
+		ResponseWriter writer = context.getResponseWriter();
+		// Parameters
+		writeWidgetParameters(context, component);
+		// write state for append RPC calls parameter.
+		context.getApplication().getViewHandler().writeState(context);
+		// TODO - make serialization ?
+		writer.endElement(element);
+	}
+
+	/**
+	 * Return converted value for {@link javax.faces.component.ValueHolder} as
+	 * String, perform nessesary convertions.
+	 * 
+	 * @param context
+	 * @param component
+	 * @return
+	 */
+	public String getValueAsString(FacesContext context, UIComponent component) {
+		// First - get submitted value for input components
+		if (component instanceof EditableValueHolder) {
+			EditableValueHolder input = (EditableValueHolder) component;
+			String submittedValue = (String) input.getSubmittedValue();
+			if (null != submittedValue) {
+				return submittedValue;
+			}
+		}
+		// If no submitted value presented - convert same for UIInput/UIOutput
+		if (component instanceof ValueHolder) {
+			return formatValue(context, component, ((ValueHolder) component)
+					.getValue());
+		} else {
+			return null;
+		}
+	}
+
+	/**
+	 * Convert any object value to string. If component instance of
+	 * {@link ValueHolder } got {@link Converter} for formatting. If not,
+	 * attempt to use converter based on value type.
+	 * 
+	 * @param context
+	 * @param component
+	 * @return
+	 */
+	public String formatValue(FacesContext context, UIComponent component,
+			Object value) {
+		if (value instanceof String) {
+			return (String) value;
+		}
+		Converter converter = null;
+		if (component instanceof ValueHolder) {
+			ValueHolder holder = (ValueHolder) component;
+			converter = holder.getConverter();
+		}
+		if (null == converter && null != value) {
+			try {
+				converter = context.getApplication().createConverter(
+						value.getClass());
+			} catch (FacesException e) {
+				// TODO - log converter exception.
+			}
+		}
+		if (null != value) {
+			if (null == converter) {
+				return value.toString();
+			} else {
+				return converter.getAsString(context, component, value);
+			}
+		}
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see javax.faces.render.Renderer#getConvertedValue(javax.faces.context.FacesContext,
+	 *      javax.faces.component.UIComponent, java.lang.Object)
+	 */
+	public Object getConvertedValue(FacesContext context,
+			UIComponent component, Object submittedValue)
+			throws ConverterException {
+		if (component instanceof EditableValueHolder) {
+			EditableValueHolder valueHolder = (EditableValueHolder) component;
+			return getConvertedUIInputValue(context, valueHolder,
+					(String) submittedValue);
+		}
+		return super.getConvertedValue(context, component, submittedValue);
+	}
+
+	public Object getConvertedUIInputValue(FacesContext facesContext,
+			EditableValueHolder component, String submittedValue)
+			throws ConverterException {
+
+		Object convertedValue = null;
+
+		/*
+		 * if (submittedValue == null) throw new
+		 * NullPointerException("submittedValue");
+		 */
+		if ("".equals(submittedValue)) {
+			return null;
+		}
+		Converter converter = getConverterForProperty(facesContext, component,
+				"value");
+		if (converter != null) {
+			convertedValue = converter.getAsObject(facesContext,
+					(UIComponent) component, submittedValue);
+		} else {
+			convertedValue = submittedValue;
+		}
+
+		return convertedValue;
+
+	}
+
+	/**
+	 * 
+	 * @param facesContext
+	 * @param component
+	 * @param property
+	 * @return converter for specified component attribute
+	 */
+	public Converter getConverterForProperty(FacesContext facesContext,
+			ValueHolder component, String property) {
+		Converter converter = component.getConverter();
+		if (converter == null) {
+			ValueExpression valueBinding = ((UIComponent) component)
+					.getValueExpression(property);
+			if (valueBinding != null) {
+				Class valueType = valueBinding.getType(facesContext
+						.getELContext());
+				if (String.class.equals(valueType)
+						|| Object.class.equals(valueType)) {
+					// No converter needed
+				} else {
+					converter = facesContext.getApplication().createConverter(
+							valueType);
+					if (converter == null) {
+						throw new ConverterException("No converter found for "
+								+ valueType.getName());
+					}
+				}
+			}
+		}
+		return converter;
+	}
+
+}

Added: branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/WidgetWithFacetsRenderer.java
===================================================================
--- branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/WidgetWithFacetsRenderer.java	                        (rev 0)
+++ branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/jsf/WidgetWithFacetsRenderer.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,84 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.gwt.jsf;
+
+import java.io.IOException;
+import java.util.Iterator;
+import java.util.Map;
+
+import javax.faces.component.NamingContainer;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+
+/**
+ * @author shura
+ *
+ */
+public class WidgetWithFacetsRenderer extends WidgetRenderer {
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.gwt.jsf.WidgetRenderer#encodeFacets(javax.faces.context.ResponseWriter, javax.faces.context.FacesContext, javax.faces.component.UIComponent, java.lang.String)
+	 */
+	protected void encodeFacets(ResponseWriter writer, FacesContext context, UIComponent component, String element) throws IOException {
+		String clientId = component.getClientId(context);
+		for (Iterator iter = component.getFacets().entrySet().iterator(); iter.hasNext();) {
+			Map.Entry facet = (Map.Entry) iter.next();
+			String facetName = (String) facet.getKey();
+			UIComponent value = (UIComponent) facet.getValue();
+			writer.startElement(element,value);
+			writer.writeAttribute("id",clientId+NamingContainer.SEPARATOR_CHAR+facetName,null);
+			writer.writeAttribute("style","display:none",null);
+			value.encodeAll(context);
+			writer.endElement(element);
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.render.Renderer#encodeChildren(javax.faces.context.FacesContext, javax.faces.component.UIComponent)
+	 */
+	public void encodeChildren(FacesContext context, UIComponent component) throws IOException {
+		if (component.getChildCount()>0) {
+			String clientId = component.getClientId(context);
+			String element = getElement(component);
+			ResponseWriter writer = context.getResponseWriter();
+			writer.startElement(element, component);
+			writer.writeAttribute("id", clientId
+					+ NamingContainer.SEPARATOR_CHAR + "_children", null);
+			for (Iterator iter = component.getChildren().iterator(); iter.hasNext();) {
+				UIComponent child = (UIComponent) iter.next();
+				child.encodeAll(context);
+			}
+			writer.endElement(element);
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.render.Renderer#getRendersChildren()
+	 */
+	public boolean getRendersChildren() {
+		// TODO Auto-generated method stub
+		return true;
+	}
+
+
+}

Added: branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/server/GwtFacesServlet.java
===================================================================
--- branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/server/GwtFacesServlet.java	                        (rev 0)
+++ branches/refactor1/extensions/gwt/src/main/java/org/ajax4jsf/gwt/server/GwtFacesServlet.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,171 @@
+/**
+ * 
+ */
+package org.ajax4jsf.gwt.server;
+
+import javax.faces.component.ContextCallback;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.event.PhaseListener;
+import javax.faces.lifecycle.Lifecycle;
+import javax.servlet.http.HttpServletRequest;
+
+import org.ajax4jsf.gwt.client.ComponentEntryPoint;
+import org.ajax4jsf.gwt.client.GwtFacesEvent;
+import org.ajax4jsf.gwt.client.GwtFacesService;
+import org.ajax4jsf.gwt.jsf.GwtCallListener;
+import org.ajax4jsf.gwt.jsf.GwtEvent;
+import org.ajax4jsf.gwt.jsf.GwtListener;
+import org.ajax4jsf.gwt.jsf.GwtSource;
+import com.google.gwt.user.server.rpc.RemoteServiceServlet;
+import com.google.gwt.user.server.rpc.UnexpectedException;
+import com.google.gwt.user.server.rpc.RPCRequest;
+import com.google.gwt.user.server.rpc.RPC;
+import com.google.gwt.user.client.rpc.SerializationException;
+
+/**
+ * @author shura
+ * 
+ */
+public class GwtFacesServlet extends RemoteServiceServlet {
+
+    protected Lifecycle lifecycle;
+
+    private static final Class[] CALL_PARAMS = {GwtFacesEvent.class};
+
+
+    /**
+     * Handle the GWT RPC call by looking up the client ID specified in the request, and passing a callback
+     * via JSF to the proper JSF component.
+     */
+    public String processCall (String requestPayload)
+        throws SerializationException {
+        FacesContext facesContext = FacesContext.getCurrentInstance();
+        String clientId;
+        String responsePayload = null;
+        RPCRequest rpcRequest;
+        rpcRequest = RPC.decodeRequest(requestPayload);
+
+        if (null != facesContext) {
+            clientId = (String)facesContext.getExternalContext().getRequestParameterMap().get("clientId");
+
+            if (null != clientId) {
+
+                // Invoke event on target component
+                GwtFacesCallback callback = new GwtFacesCallback(rpcRequest);
+                try {
+                    facesContext.getViewRoot().invokeOnComponent(facesContext,
+                            clientId, callback);
+                } catch (Exception e) {
+                    // Hmm, for now, let's make this be a server-only exception.
+                    throw new UnexpectedException("Error send event to component", e);
+                }
+                responsePayload = callback.getResponsePayload();
+            } else if(null != lifecycle){
+                // Invoke event on registered listeners.
+                PhaseListener[] listeners = lifecycle.getPhaseListeners();
+                for (int i = 0; i < listeners.length; i++) {
+                    PhaseListener listener = listeners[i];
+                    if (listener instanceof GwtCallListener) {
+                        GwtCallListener gwtListener = (GwtCallListener) listener;
+                        responsePayload = gwtListener.processRequest(rpcRequest);
+                    }
+                }
+            }
+        } else {
+            // Non-faces environment, attempt to load stub class for hosted mode
+            HttpServletRequest threadLocalRequest = getThreadLocalRequest();
+            String moduleName = threadLocalRequest.getParameter(ComponentEntryPoint.GWT_MODULE_NAME_PARAMETER);
+            if(null == moduleName){
+                // Hackish here, not sure this will work properly.....
+                throw new SecurityException("Module name not set in request");
+            }
+            // Find latest package delimiter. GWT not allow to use default package - since
+            // always present.
+            int i = moduleName.lastIndexOf('.');
+            // Module class name
+            String className = "Mock" + moduleName.substring(i+1);
+            // Module package name
+            String packageName = moduleName.substring(0,i)+".server.";
+            ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
+            className = packageName+className;
+            Class clazz = null;
+            try {
+                clazz = classLoader.loadClass(className);
+
+                // assume it's looking for GwtFacesService.
+                // TODO: figure out how to tell what it's actually looking for!
+                // (probably just trust the call!?!)
+                GwtFacesService service = (GwtFacesService) clazz.newInstance();
+                // OK so it warns about varargs redundancy here, but what does it want????
+                responsePayload = RPC.invokeAndEncodeResponse(service, rpcRequest.getMethod(), rpcRequest.getParameters());
+            } catch (ClassNotFoundException e) {
+                throw new SecurityException("Could not find requested mock class " + className);
+            } catch (Exception e) {
+                throw new SecurityException("Could not construct mock service class " + clazz);
+            }
+        }
+        return responsePayload;
+    }
+
+    /**
+     * This callback object is passed to ViewRoot.invokeOnComponent() to invoke the RPCCall
+     * on the proper JSF component.
+     */
+    private static class GwtFacesCallback implements ContextCallback {
+        private String responsePayload = null;
+
+        private RPCRequest request;
+
+        /**
+         * Construct a callback for the specified call.
+         */
+        public GwtFacesCallback(RPCRequest request) {
+            super();
+            this.request = request;
+        }
+
+        /**
+         * Called by JSF to invoke the call on the specified target.
+         * @param context
+         * @param target
+         */
+        public void invokeContextCallback(FacesContext context,
+                                          UIComponent target) {
+            if (target instanceof GwtSource) {
+                GwtEvent gwtEvent = new GwtEvent(target){
+
+                    public String getResponsePayload() {
+                        // TODO Auto-generated method stub
+                        return responsePayload;
+                    }
+
+                    public void setCallbackParameter(String callbackParam) {
+                        responsePayload = callbackParam;
+
+                    }
+
+                    public RPCRequest getRPCRequest () {
+                        // TODO Auto-generated method stub
+                        return request;
+                    }
+
+                };
+                target.broadcast(gwtEvent);
+            }
+            if (target instanceof GwtListener) {
+                GwtListener listener = (GwtListener) target;
+                responsePayload = listener.processRequest(request);
+            }
+
+        }
+
+        /**
+         * @return Returns the gwtFacesResult.
+         */
+        public String getResponsePayload() {
+            return responsePayload;
+        }
+
+    }
+}

Added: branches/refactor1/extensions/gwt/src/main/resources/META-INF/faces-config.xml
===================================================================
--- branches/refactor1/extensions/gwt/src/main/resources/META-INF/faces-config.xml	                        (rev 0)
+++ branches/refactor1/extensions/gwt/src/main/resources/META-INF/faces-config.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee"
+              xmlns:xi="http://www.w3.org/2001/XInclude"
+              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
+    <component>
+        <component-type>org.ajax4jsf.gwt.Page</component-type>
+        <component-class>org.ajax4jsf.gwt.jsf.UIPage</component-class>
+    </component>
+    <component>
+        <component-type>org.ajax4jsf.gwt.Widget</component-type>
+        <component-class>org.ajax4jsf.gwt.jsf.UIWidget</component-class>
+    </component>
+    <render-kit>
+        <renderer>
+            <component-family>org.ajax4jsf.gwt.Widget</component-family>
+            <renderer-type>org.ajax4jsf.gwt.Widget</renderer-type>
+            <renderer-class>org.ajax4jsf.gwt.jsf.WidgetRenderer</renderer-class>
+        </renderer>
+        <renderer>
+            <component-family>org.ajax4jsf.gwt.Widget</component-family>
+            <renderer-type>org.ajax4jsf.gwt.WidgetWithFacets</renderer-type>
+            <renderer-class>org.ajax4jsf.gwt.jsf.WidgetWithFacetsRenderer</renderer-class>
+        </renderer>
+        <renderer>
+            <component-family>org.ajax4jsf.gwt.Page</component-family>
+            <renderer-type>org.ajax4jsf.gwt.Page</renderer-type>
+            <renderer-class>org.ajax4jsf.gwt.jsf.PageRenderer</renderer-class>
+        </renderer>
+    </render-kit>
+    <!-- commented out as per Jason DeTiberus -->
+    <!-- All plain G4JSF apps MUST add this in themselves -->
+    <!--
+    <lifecycle>
+     <phase-listener>org.ajax4jsf.gwt.jsf.GwtPhaseListener</phase-listener>
+    </lifecycle>
+    -->
+</faces-config>

Added: branches/refactor1/extensions/gwt/src/main/resources/META-INF/faces-config.xml.l4t
===================================================================
--- branches/refactor1/extensions/gwt/src/main/resources/META-INF/faces-config.xml.l4t	                        (rev 0)
+++ branches/refactor1/extensions/gwt/src/main/resources/META-INF/faces-config.xml.l4t	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<PROCESS ENTITY="JSFProcess"/>

Added: branches/refactor1/extensions/gwt/src/main/resources/META-INF/gwt/history.html
===================================================================
--- branches/refactor1/extensions/gwt/src/main/resources/META-INF/gwt/history.html	                        (rev 0)
+++ branches/refactor1/extensions/gwt/src/main/resources/META-INF/gwt/history.html	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,40 @@
+<html>
+
+<head>
+
+<script>
+
+function hst() {
+
+  var search = location.search;
+
+  var historyToken = '';
+
+  if (location.search.length > 0)
+
+    historyToken = decodeURIComponent(location.search.substring(1));
+
+
+
+  document.getElementById('__historyToken').value = historyToken;
+
+  if (parent.__onHistoryChanged)
+
+    parent.__onHistoryChanged(historyToken);
+
+}
+
+</script></head>
+
+<body onload='hst()'>
+
+
+
+<input type='text' id='__historyToken'>
+
+
+
+</body>
+
+</html>
+

Added: branches/refactor1/extensions/gwt/src/main/resources/META-INF/gwt.taglib.xml
===================================================================
--- branches/refactor1/extensions/gwt/src/main/resources/META-INF/gwt.taglib.xml	                        (rev 0)
+++ branches/refactor1/extensions/gwt/src/main/resources/META-INF/gwt.taglib.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE facelet-taglib PUBLIC
+  "-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN"
+  "http://java.sun.com/dtd/facelet-taglib_1_0.dtd">
+<facelet-taglib xmlns="http://java.sun.com/JSF/Facelet">
+	<namespace>https://ajax4jsf.dev.java.net/gwt</namespace>
+	<!-- Tag for creating base GWT page with nessesary structure -->
+	<tag>
+		<tag-name>page</tag-name>
+		<component>
+			<component-type>org.ajax4jsf.gwt.Page</component-type>
+			<renderer-type>org.ajax4jsf.gwt.Page</renderer-type>
+		</component>
+	</tag>
+	<tag>
+		<tag-name>widget</tag-name>
+		<component>
+			<component-type>org.ajax4jsf.gwt.Widget</component-type>
+			<renderer-type>org.ajax4jsf.gwt.WidgetWithFacets</renderer-type>
+		</component>
+	</tag>
+	<tag>
+		<tag-name>gwtListener</tag-name>
+		<handler-class>org.ajax4jsf.gwt.jsf.GwtListenerHandler</handler-class>
+	</tag>
+</facelet-taglib>
\ No newline at end of file

Added: branches/refactor1/extensions/gwt/src/main/resources/META-INF/gwt.tld
===================================================================
--- branches/refactor1/extensions/gwt/src/main/resources/META-INF/gwt.tld	                        (rev 0)
+++ branches/refactor1/extensions/gwt/src/main/resources/META-INF/gwt.tld	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<taglib version="2.1" xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee web-jsptaglibrary_2_1.xsd">
+ <tlib-version>1.0</tlib-version>
+ <short-name>gwtjsf</short-name>
+ <uri>https://ajax4jsf.dev.java.net/gwtjsf</uri>
+</taglib>

Added: branches/refactor1/extensions/gwt/src/main/resources/META-INF/valid.xml
===================================================================
--- branches/refactor1/extensions/gwt/src/main/resources/META-INF/valid.xml	                        (rev 0)
+++ branches/refactor1/extensions/gwt/src/main/resources/META-INF/valid.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE form-validation PUBLIC "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.1.3//EN"
+                                 "http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd">
+<form-validation/>

Added: branches/refactor1/extensions/gwt/src/main/resources/org/ajax4jsf/gwt/JUnit.gwt.xml
===================================================================
--- branches/refactor1/extensions/gwt/src/main/resources/org/ajax4jsf/gwt/JUnit.gwt.xml	                        (rev 0)
+++ branches/refactor1/extensions/gwt/src/main/resources/org/ajax4jsf/gwt/JUnit.gwt.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module>
+
+   <!-- Inherit the JUnit support -->
+   <inherits name='com.google.gwt.junit.JUnit'/>
+	<source path="client"/>
+</module>

Added: branches/refactor1/extensions/gwt/src/main/resources/org/ajax4jsf/gwt/Jsf.gwt.xml
===================================================================
--- branches/refactor1/extensions/gwt/src/main/resources/org/ajax4jsf/gwt/Jsf.gwt.xml	                        (rev 0)
+++ branches/refactor1/extensions/gwt/src/main/resources/org/ajax4jsf/gwt/Jsf.gwt.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,6 @@
+<module>
+
+	<inherits name='com.google.gwt.user.User'/>
+    <servlet path="/gwtFacesServlet" class="org.ajax4jsf.gwt.server.GwtFacesServlet" />
+
+</module>

Added: branches/refactor1/extensions/gwt/src/test/java/org/ajax4jsf/gwt/TestCase.gwt.xml
===================================================================
--- branches/refactor1/extensions/gwt/src/test/java/org/ajax4jsf/gwt/TestCase.gwt.xml	                        (rev 0)
+++ branches/refactor1/extensions/gwt/src/test/java/org/ajax4jsf/gwt/TestCase.gwt.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module>
+
+   <!-- Inherit the JUnit support -->
+   <inherits name='org.ajax4jsf.gwt.JUnit'/>
+	<source path="client"/>
+</module>

Added: branches/refactor1/extensions/gwt/src/test/java/org/ajax4jsf/gwt/client/EntryPointTestCase.java
===================================================================
--- branches/refactor1/extensions/gwt/src/test/java/org/ajax4jsf/gwt/client/EntryPointTestCase.java	                        (rev 0)
+++ branches/refactor1/extensions/gwt/src/test/java/org/ajax4jsf/gwt/client/EntryPointTestCase.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,60 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.gwt.client;
+
+import com.google.gwt.junit.client.GWTTestCase;
+import com.google.gwt.user.client.DOM;
+import com.google.gwt.user.client.Element;
+
+public class EntryPointTestCase extends GWTTestCase {
+
+	/*
+	 * Test method for 'org.ajax4jsf.gwt.client.ComponentEntryPoint.getProperty(String)'
+	 */
+	public void testGetProperty() {
+
+	}
+
+	/*
+	 * Test method for 'org.ajax4jsf.gwt.client.ComponentEntryPoint.isHaveClass(Element, String)'
+	 */
+	public void testIsHaveClass() {
+		Element element = DOM.createElement("span");
+		DOM.setAttribute(element,"className","foo bar baz");
+		assertTrue(ComponentEntryPoint.isHaveClass(element,"foo"));
+		assertTrue(ComponentEntryPoint.isHaveClass(element,"bar"));
+		assertFalse(ComponentEntryPoint.isHaveClass(element,"xxx"));
+	}
+
+	/*
+	 * Test method for 'org.ajax4jsf.gwt.client.ComponentEntryPoint.createFacesService(String)'
+	 */
+	public void testCreateFacesService() {
+
+	}
+
+	public String getModuleName() {
+		// TODO Auto-generated method stub
+		return "org.ajax4jsf.gwt.TestCase";
+	}
+
+}

Added: branches/refactor1/extensions/portlet/pom.xml
===================================================================
--- branches/refactor1/extensions/portlet/pom.xml	                        (rev 0)
+++ branches/refactor1/extensions/portlet/pom.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,67 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<parent>
+		<artifactId>master</artifactId>
+		<groupId>org.ajax4jsf</groupId>
+		<version>1.1.2-SNAPSHOT</version>
+	</parent>
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>org.ajax4jsf</groupId>
+	<artifactId>a4j-portlet</artifactId>
+	<name>ajax4jsf portlet brige</name>
+	<url>http://labs.jboss.com/wiki/Ajax4jsf/a4j-portlet</url>
+	<dependencies>
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<version>3.8.1</version>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>portlet-api</groupId>
+			<artifactId>portlet-api</artifactId>
+			<version>1.0</version>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>javax.faces</groupId>
+			<artifactId>jsf-api</artifactId>
+			<version>1.2_04</version>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>javax.faces</groupId>
+			<artifactId>jsf-impl</artifactId>
+			<version>1.2_04</version>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>javax.servlet</groupId>
+			<artifactId>servlet-api</artifactId>
+			<version>2.5</version>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>javax.servlet.jsp</groupId>
+			<artifactId>jsp-api</artifactId>
+			<version>2.1</version>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>com.sun.facelets</groupId>
+			<artifactId>jsf-facelets</artifactId>
+			<version>1.1.12</version>
+			<optional>true</optional>
+		</dependency>
+		<dependency>
+			<groupId>org.ajax4jsf</groupId>
+			<artifactId>ajax4jsf</artifactId>
+			<version>1.1.2-SNAPSHOT</version>
+		</dependency>
+		<dependency>
+			<groupId>org.ajax4jsf</groupId>
+			<artifactId>test</artifactId>
+			<version>1.1.2-SNAPSHOT</version>
+			<scope>test</scope>
+		</dependency>
+	</dependencies>
+</project>
\ No newline at end of file

Added: branches/refactor1/extensions/portlet/src/main/java/META-INF/MANIFEST.MF
===================================================================
--- branches/refactor1/extensions/portlet/src/main/java/META-INF/MANIFEST.MF	                        (rev 0)
+++ branches/refactor1/extensions/portlet/src/main/java/META-INF/MANIFEST.MF	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path: 
+

Added: branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/AjaxFacesPortlet.java
===================================================================
--- branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/AjaxFacesPortlet.java	                        (rev 0)
+++ branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/AjaxFacesPortlet.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,338 @@
+/**
+ * 
+ */
+package org.ajax4jsf.portlet;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.Iterator;
+import java.util.Map;
+import javax.faces.FacesException;
+import javax.faces.FactoryFinder;
+import javax.faces.application.FacesMessage;
+import javax.faces.component.UIViewRoot;
+import javax.faces.context.ExternalContext;
+import javax.faces.context.FacesContext;
+import javax.faces.context.FacesContextFactory;
+import javax.faces.lifecycle.Lifecycle;
+import javax.faces.lifecycle.LifecycleFactory;
+import javax.faces.webapp.FacesServlet;
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.GenericPortlet;
+import javax.portlet.PortletConfig;
+import javax.portlet.PortletException;
+import javax.portlet.PortletMode;
+import javax.portlet.PortletRequest;
+import javax.portlet.PortletResponse;
+import javax.portlet.PortletSession;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import org.ajax4jsf.framework.ajax.AjaxContext;
+import org.ajax4jsf.portlet.application.ComponentsLoader;
+import org.ajax4jsf.portlet.application.ComponentsLoaderImpl;
+import org.ajax4jsf.portlet.application.PortletStateHolder;
+import org.ajax4jsf.portlet.application.PortletViewState;
+import org.ajax4jsf.portlet.application.PortletWindowStates;
+import org.ajax4jsf.portlet.context.AbstractExternalContext;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * @author asmirnov
+ * 
+ */
+public class AjaxFacesPortlet extends GenericPortlet {
+    private static final Log log = LogFactory.getLog(AjaxFacesPortlet.class);
+
+    /**
+     * <p>The key used to store/retrive the PortletConfig object.</p>
+     */
+    public static final String PORTLET_CONFIG = "javax.portlet.PortletConfig";
+
+    private Lifecycle lifecycle;
+
+    private FacesContextFactory facesContextFactory;
+    
+    private ComponentsLoader componentLoader;
+
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see javax.portlet.GenericPortlet#init(javax.portlet.PortletConfig)
+         */
+    public void init(PortletConfig config) throws PortletException {
+	super.init(config);
+	try {
+	    if (log.isDebugEnabled()) {
+		log.debug("Start portlet initialisation for "
+			+ config.getPortletName());
+	    }
+	    // get faces lifecycle instance
+	    LifecycleFactory factory = (LifecycleFactory) FactoryFinder
+		    .getFactory(FactoryFinder.LIFECYCLE_FACTORY);
+	    String lifecycleId = config.getPortletContext().getInitParameter(
+		    FacesServlet.LIFECYCLE_ID_ATTR);
+	    if (null == lifecycleId) {
+		lifecycleId = LifecycleFactory.DEFAULT_LIFECYCLE;
+	    }
+	    if (log.isDebugEnabled()) {
+		log.debug("Create instance of a JSF lifecycle " + lifecycleId);
+	    }
+	    this.lifecycle = factory.getLifecycle(lifecycleId);
+	    // get faces context factory instance
+	    this.facesContextFactory = (FacesContextFactory) FactoryFinder
+		    .getFactory(FactoryFinder.FACES_CONTEXT_FACTORY);
+	} catch (FacesException e) {
+	    throw new PortletException("Initialization error", e);
+	}
+	super.init(config);
+	if (log.isDebugEnabled()) {
+	    log.debug("Done portlet initialisation for "
+		    + config.getPortletName());
+	}
+//	getPortletContext().setAttribute(PORTLET_CONFIG, config);
+	// TODO - use only one loader instance.
+	componentLoader = new ComponentsLoaderImpl();
+
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see javax.portlet.GenericPortlet#destroy()
+         */
+    public void destroy() {
+	if (log.isDebugEnabled()) {
+	    log.debug("Destroy portlet " + getPortletConfig().getPortletName());
+	}
+	this.lifecycle = null;
+	this.facesContextFactory = null;
+	super.destroy();
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see javax.portlet.GenericPortlet#processAction(javax.portlet.ActionRequest,
+         *      javax.portlet.ActionResponse)
+         */
+    public void processAction(ActionRequest request, ActionResponse response)
+	    throws PortletException, IOException {
+	if (log.isDebugEnabled()) {
+	    log.debug("Process action in portlet "
+		    + getPortletConfig().getPortletName() + " for mode "
+		    + request.getPortletMode());
+	}
+	FacesContext facesContext = getFacesContext(request, response);
+	try {
+	    setViewId(facesContext);
+	    execute(facesContext);
+	    saveView(facesContext);
+	} catch (Exception e) {
+	    log.error("Error processing execute lifecycle", e);
+	    throw new PortletException("Error processing execute lifecycle ", e);
+	} finally {
+	    facesContext.release();
+	}
+    }
+
+    protected void saveView(FacesContext facesContext) {
+	PortletStateHolder portletStateHolder = PortletStateHolder.getInstance(facesContext);
+	PortletWindowStates states = portletStateHolder.getWindowStates(facesContext);
+	String viewId = facesContext.getViewRoot().getViewId();
+	states.setViewId(viewId);
+	PortletViewState state = states.getState(viewId);
+	state.save(facesContext);	
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see javax.portlet.GenericPortlet#doView(javax.portlet.RenderRequest,
+         *      javax.portlet.RenderResponse)
+         */
+    protected void doView(RenderRequest request, RenderResponse response)
+	    throws PortletException, IOException {
+	if (log.isDebugEnabled()) {
+	    log.debug("Process do view in portlet "
+		    + getPortletConfig().getPortletName());
+	}
+	FacesContext facesContext = getFacesContext(request, response);
+	try {
+	    String contenttype = request.getResponseContentType();
+	    if (contenttype == null) {
+		contenttype = "text/html";
+	    }
+	    String encoding = response.getCharacterEncoding();
+	    if (encoding == null) {
+		encoding = "UTF-8";
+	    }
+	    response.setContentType(contenttype);
+	    PrintWriter writer = response.getWriter();
+	    String namespace = response
+	    				.getNamespace();
+	    // Write anchor for update portlet pages by ajax.
+	    // TODO - configure html element and style/class.
+	    writer.println("<div id='" + namespace + "'>");
+	    // writer.flush();
+	    restoreView(facesContext);
+	    AjaxContext ajaxContext = AjaxContext.getCurrentInstance(facesContext);
+	    ajaxContext.getCommonAjaxParameters().put(AbstractExternalContext.ACTION__PARAMETER, facesContext.getApplication().getViewHandler().getActionURL(facesContext, facesContext.getViewRoot().getViewId()));
+	    ajaxContext.getCommonAjaxParameters().put(AbstractExternalContext.PORTLET_MODE_PARAMETER,request.getPortletMode().toString());
+	    render(facesContext);
+	    writer.println("</div>");
+	    PortletSession portletSession = request.getPortletSession(true);
+	    // Store namespace value in portlet scope session.
+                // ServletContext, in case of ajax requests,
+	    // will restore session prefiv by it's value.
+		portletSession.setAttribute(
+			AbstractExternalContext.NAMESPACE_PARAMETER, namespace);
+		if (log.isDebugEnabled()) {
+		    log.debug("Finish rendering portlet for namespace "+namespace);
+		}
+	    // Disable portlet caching. 
+	    // TODO - detect ajax components on page, static views can be cached.
+		response.setProperty(RenderResponse.EXPIRATION_CACHE, "0");
+	} catch (Exception e) {
+	    log.error("Error processing execute lifecycle", e);
+	    throw new PortletException("Error processing execute lifecycle ", e);
+	} finally {
+	    facesContext.release();
+	}
+    }
+
+    protected void restoreView(FacesContext facesContext) {
+	PortletStateHolder portletStateHolder = PortletStateHolder.getInstance(facesContext);
+	PortletWindowStates states = portletStateHolder.getWindowStates(facesContext);
+	String viewId = states.getViewId();
+	UIViewRoot viewRoot = null;
+	if(null != viewId){
+	    PortletViewState viewState = states.getState(viewId);
+	    viewRoot = viewState.restore(facesContext,getComponentLoader());
+	} else {
+	    viewId = portletStateHolder.getViewId(facesContext);	    
+	}
+	if(null == viewRoot){
+	    viewRoot = facesContext.getApplication().getViewHandler().createView(facesContext, viewId);
+	}
+	facesContext.setViewRoot(viewRoot);
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see javax.portlet.GenericPortlet#doEdit(javax.portlet.RenderRequest,
+         *      javax.portlet.RenderResponse)
+         */
+    protected void doEdit(RenderRequest arg0, RenderResponse arg1)
+	    throws PortletException, IOException {
+	if (log.isDebugEnabled()) {
+	    log.debug("Process do edit in portlet "
+		    + getPortletConfig().getPortletName());
+	}
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see javax.portlet.GenericPortlet#doHelp(javax.portlet.RenderRequest,
+         *      javax.portlet.RenderResponse)
+         */
+    protected void doHelp(RenderRequest arg0, RenderResponse arg1)
+	    throws PortletException, IOException {
+	if (log.isDebugEnabled()) {
+	    log.debug("Process do help in portlet "
+		    + getPortletConfig().getPortletName());
+	}
+    }
+
+    /**
+         * Get currenf JSF lifecycle instance.
+         * 
+         * @return
+         */
+    protected Lifecycle getLifecycle() {
+	return this.lifecycle;
+    }
+
+    /**
+         * Create new faces context instance.
+         * 
+         * @param request
+         * @param response
+         * @return new instance of faces context.
+         */
+    protected FacesContext getFacesContext(PortletRequest request,
+	    PortletResponse response) {
+	return this.facesContextFactory.getFacesContext(getPortletConfig()
+		.getPortletContext(), request, response, getLifecycle());
+    }
+
+    protected void execute(FacesContext context) throws FacesException {
+	getLifecycle().execute(context);
+    }
+
+    protected void render(FacesContext context) throws FacesException {
+	getLifecycle().render(context);
+    }
+
+    protected void setViewId(FacesContext context) {
+	PortletStateHolder portletStateHolder = PortletStateHolder.getInstance(context);
+	String viewId = portletStateHolder.getViewId(context);
+	context.getExternalContext().getRequestMap().put(
+		AbstractExternalContext.VIEW_ID_PARAMETER, viewId);
+	UIViewRoot viewRoot = context.getViewRoot();
+	if (null != viewRoot) {
+		viewRoot.setViewId(viewId);
+	}
+    }
+
+    /**
+         * @param facesContext
+         * @return
+         */
+    public static String getPortletNamespace(FacesContext facesContext) {
+	ExternalContext externalContext = facesContext.getExternalContext();
+	Object response = externalContext.getResponse();
+	String namespace = null;
+	if (response instanceof RenderResponse) {
+	    namespace = ((RenderResponse) response).getNamespace();
+	} else if (null != externalContext.getRequestParameterMap().get(
+		AbstractExternalContext.NAMESPACE_PARAMETER)) {
+	    namespace = (String) externalContext.getRequestParameterMap().get(
+		    AbstractExternalContext.NAMESPACE_PARAMETER);
+	}
+	return namespace;
+    }
+
+    /**
+         * @param facesContext
+         * @return
+         */
+    public static PortletMode getPortletMode(FacesContext facesContext) {
+	ExternalContext externalContext = facesContext.getExternalContext();
+	Object request = externalContext.getRequest();
+	PortletMode mode = null;
+	if (request instanceof PortletRequest) {
+	    mode = ((PortletRequest) request).getPortletMode();
+	} else if (null != externalContext.getRequestParameterMap().get(
+		AbstractExternalContext.PORTLET_MODE_PARAMETER)) {
+	    String modeName = (String) externalContext.getRequestParameterMap().get(
+		    AbstractExternalContext.PORTLET_MODE_PARAMETER);
+	    if(null != modeName){
+		mode = new PortletMode(modeName);
+	    }
+	}
+	return mode;
+    }
+
+    /**
+     * @return the componentLoader
+     */
+    public ComponentsLoader getComponentLoader() {
+	// TODO - share loader instance with a StateManager
+        return componentLoader;
+    }
+}

Added: branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/PortletAjaxContext.java
===================================================================
--- branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/PortletAjaxContext.java	                        (rev 0)
+++ branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/PortletAjaxContext.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,89 @@
+/**
+ * 
+ */
+package org.ajax4jsf.portlet;
+
+import java.util.Map;
+import javax.faces.component.UIViewRoot;
+import javax.faces.context.ExternalContext;
+import javax.faces.context.FacesContext;
+import javax.portlet.PortletContext;
+import javax.portlet.RenderResponse;
+import org.ajax4jsf.framework.ajax.AjaxContext;
+import org.ajax4jsf.framework.util.config.WebXml;
+import org.ajax4jsf.portlet.context.AbstractExternalContext;
+
+/**
+ * @author asmirnov
+ * 
+ */
+public class PortletAjaxContext extends AjaxContext {
+    public String getAjaxActionURL(FacesContext context) {
+	// Check arguments
+	if (null == context) {
+	    throw new NullPointerException(
+		    "Faces context for build AJAX Action URL is null");
+	}
+//	if (context.getExternalContext().getContext() instanceof PortletContext) {
+	    UIViewRoot viewRoot = context.getViewRoot();
+	    if (null == viewRoot) {
+		throw new NullPointerException(
+			"Faces view tree for build AJAX Action URL is null");
+	    }
+	    String viewId = viewRoot.getViewId();
+	    if (null == viewId) {
+		throw new NullPointerException(
+			"View id for build AJAX Action URL is null");
+	    }
+	    if (!viewId.startsWith("/")) {
+		throw new IllegalArgumentException(
+			"Illegal view Id for build AJAX Action URL: " + viewId);
+	    }
+	    ExternalContext externalContext = context.getExternalContext();
+	    WebXml webXml = (WebXml) externalContext.getApplicationMap().get(
+		    WebXml.CONTEXT_ATTRIBUTE);
+	    if (null == webXml) {
+		throw new NullPointerException(
+			"Ajax Filter not properly configured for web application");
+	    }
+	    StringBuffer actionUrl = new StringBuffer(externalContext
+		    .getRequestContextPath());
+	    if (webXml.isPrefixMapping()) {
+		String facesFilterPrefix = webXml.getFacesFilterPrefix();
+		if (facesFilterPrefix.endsWith("/")) {
+		    facesFilterPrefix = facesFilterPrefix.substring(0,facesFilterPrefix.length()-1);
+		}
+		actionUrl.append(facesFilterPrefix).append(viewId);
+	    } else {
+		int dot = viewId.lastIndexOf('.');
+		if (dot < 0) {
+		    actionUrl.append(viewId).append(
+			    webXml.getFacesFilterSuffix());
+		} else {
+		    actionUrl.append(viewId.substring(0, dot)).append(
+			    webXml.getFacesFilterSuffix());
+		}
+	    }
+	    // ViewHandler viewHandler =
+                // context.getApplication().getViewHandler();
+	    // TODO - append optional seam/portlet.. parameters
+	    return externalContext.encodeActionURL(actionUrl.toString());
+//	} else {
+//	    return super.getAjaxActionURL(context);
+//	}
+    }
+
+    public Map getCommonAjaxParameters() {
+	Map map = super.getCommonAjaxParameters();
+	FacesContext facesContext = FacesContext.getCurrentInstance();
+	String namespace = AjaxFacesPortlet.getPortletNamespace(facesContext);
+	if (null != namespace) {
+	    map.put(AbstractExternalContext.NAMESPACE_PARAMETER, namespace);
+	}
+	String actionUrl = (String) facesContext.getExternalContext().getRequestParameterMap().get(AbstractExternalContext.ACTION__PARAMETER);
+	if(null != actionUrl){
+	    map.put(AbstractExternalContext.ACTION__PARAMETER, actionUrl);
+	}
+	return map;
+    }
+}

Added: branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/PortletRequestWrapper.java
===================================================================
--- branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/PortletRequestWrapper.java	                        (rev 0)
+++ branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/PortletRequestWrapper.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,298 @@
+/**
+ * 
+ */
+package org.ajax4jsf.portlet;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.security.Principal;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.Locale;
+import java.util.Map;
+import javax.portlet.PortletRequest;
+import javax.servlet.RequestDispatcher;
+import javax.servlet.ServletInputStream;
+import javax.servlet.http.Cookie;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
+
+/**
+ * Wrap portlet request to simulate servlet environment.
+ * @author asmirnov
+ *
+ */
+public class PortletRequestWrapper implements HttpServletRequest {
+    
+    private PortletRequest wrapped;
+
+    public PortletRequestWrapper(PortletRequest wrapped) {
+	this.wrapped = wrapped;
+    }
+
+    public String getAuthType() {
+	return wrapped.getAuthType();
+    }
+
+    public String getContextPath() {
+	return null;
+    }
+
+    private static final Cookie[] noCookies = {};
+    public Cookie[] getCookies() {
+	return noCookies;
+    }
+
+    public long getDateHeader(String arg0) {
+	return 0;
+    }
+
+    public String getHeader(String arg0) {
+	return null;
+    }
+
+    public Enumeration getHeaderNames() {
+	return Collections.enumeration(Collections.EMPTY_LIST);
+    }
+
+    public Enumeration getHeaders(String arg0) {
+	return Collections.enumeration(Collections.EMPTY_LIST);
+    }
+
+    public int getIntHeader(String arg0) {
+	return 0;
+    }
+
+    public String getMethod() {
+	return "GET";
+    }
+
+    public String getPathInfo() {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    public String getPathTranslated() {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    public String getQueryString() {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    public String getRemoteUser() {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    public String getRequestURI() {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    public StringBuffer getRequestURL() {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    public String getRequestedSessionId() {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    public String getServletPath() {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    public HttpSession getSession() {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    public HttpSession getSession(boolean arg0) {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    public Principal getUserPrincipal() {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    public boolean isRequestedSessionIdFromCookie() {
+	// TODO Auto-generated method stub
+	return false;
+    }
+
+    public boolean isRequestedSessionIdFromURL() {
+	// TODO Auto-generated method stub
+	return false;
+    }
+
+    public boolean isRequestedSessionIdFromUrl() {
+	// TODO Auto-generated method stub
+	return false;
+    }
+
+    public boolean isRequestedSessionIdValid() {
+	// TODO Auto-generated method stub
+	return false;
+    }
+
+    public boolean isUserInRole(String arg0) {
+	// TODO Auto-generated method stub
+	return false;
+    }
+
+    public Object getAttribute(String arg0) {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    public Enumeration getAttributeNames() {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    public String getCharacterEncoding() {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    public int getContentLength() {
+	// TODO Auto-generated method stub
+	return 0;
+    }
+
+    public String getContentType() {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    public ServletInputStream getInputStream() throws IOException {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    public String getLocalAddr() {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    public String getLocalName() {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    public int getLocalPort() {
+	// TODO Auto-generated method stub
+	return 0;
+    }
+
+    public Locale getLocale() {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    public Enumeration getLocales() {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    public String getParameter(String arg0) {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    public Map getParameterMap() {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    public Enumeration getParameterNames() {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    public String[] getParameterValues(String arg0) {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    public String getProtocol() {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    public BufferedReader getReader() throws IOException {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    public String getRealPath(String arg0) {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    public String getRemoteAddr() {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    public String getRemoteHost() {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    public int getRemotePort() {
+	// TODO Auto-generated method stub
+	return 0;
+    }
+
+    public RequestDispatcher getRequestDispatcher(String arg0) {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    public String getScheme() {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    public String getServerName() {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    public int getServerPort() {
+	// TODO Auto-generated method stub
+	return 0;
+    }
+
+    public boolean isSecure() {
+	// TODO Auto-generated method stub
+	return false;
+    }
+
+    public void removeAttribute(String arg0) {
+	// TODO Auto-generated method stub
+	
+    }
+
+    public void setAttribute(String arg0, Object arg1) {
+	// TODO Auto-generated method stub
+	
+    }
+
+    public void setCharacterEncoding(String arg0) throws UnsupportedEncodingException {
+	// TODO Auto-generated method stub
+	
+    }
+    
+    
+    
+}

Added: branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/application/ComponentsLoader.java
===================================================================
--- branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/application/ComponentsLoader.java	                        (rev 0)
+++ branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/application/ComponentsLoader.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,9 @@
+package org.ajax4jsf.portlet.application;
+
+import javax.faces.component.UIComponent;
+
+public interface ComponentsLoader {
+
+    public abstract UIComponent createComponent(String type);
+
+}
\ No newline at end of file

Added: branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/application/ComponentsLoaderImpl.java
===================================================================
--- branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/application/ComponentsLoaderImpl.java	                        (rev 0)
+++ branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/application/ComponentsLoaderImpl.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,81 @@
+/**
+ * 
+ */
+package org.ajax4jsf.portlet.application;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.faces.FacesException;
+import javax.faces.component.UIComponent;
+
+import org.apache.commons.collections.Transformer;
+import org.apache.commons.collections.map.LazyMap;
+
+/**
+ * @author asmirnov
+ * 
+ */
+public class ComponentsLoaderImpl implements Transformer, ComponentsLoader {
+
+    private Map classes;
+
+    private ClassLoader loader;
+
+    public ComponentsLoaderImpl() {
+	classes = Collections.synchronizedMap(LazyMap.decorate(new HashMap(),
+		this));
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see org.ajax4jsf.portlet.application.ComponentsLoader#createComponent(java.lang.String)
+         */
+    public UIComponent createComponent(String type) {
+	// Classes is a lazy Map, new object will be create on the fly.
+	Class componentClass = (Class) classes.get(type);
+	try {
+	    return (UIComponent) componentClass.newInstance();
+	} catch (InstantiationException e) {
+	    throw new FacesException(
+		    "Error on create new instance of the component with class "
+			    + type, e);
+	} catch (IllegalAccessException e) {
+	    throw new FacesException(
+		    "IllegalAccess on attempt to create new instance of the component with class "
+			    + type, e);
+	}
+    }
+
+    public Object transform(Object input) {
+	if (null == input) {
+	    throw new NullPointerException(
+		    "Name for a UIComponent class to restore is null");
+	}
+	ClassLoader loader = getClassLoader();
+	Class componentClass = null;
+	try {
+	    componentClass = loader.loadClass(input.toString());
+	} catch (ClassNotFoundException e) {
+	    throw new FacesException("Can't load class " + input.toString(), e);
+	}
+	return componentClass;
+    }
+
+    /**
+     * lazy create ClassLoader instance.
+         * @return
+         */
+    private ClassLoader getClassLoader() {
+	if (loader == null) {
+	    loader = Thread.currentThread().getContextClassLoader();
+	    if (loader == null) {
+		loader = this.getClass().getClassLoader();
+	    }
+
+	}
+	return loader;
+    }
+}

Added: branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/application/FaceletPortletViewHandler.java
===================================================================
--- branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/application/FaceletPortletViewHandler.java	                        (rev 0)
+++ branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/application/FaceletPortletViewHandler.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,67 @@
+package org.ajax4jsf.portlet.application;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.Writer;
+import javax.faces.FacesException;
+import javax.faces.application.ViewHandler;
+import javax.faces.context.ExternalContext;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+import javax.faces.render.RenderKit;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import com.sun.facelets.FaceletViewHandler;
+
+/**
+ * ViewHandler implementation for Facelets used in Portlets
+ * 
+ */
+public class FaceletPortletViewHandler extends FaceletViewHandler {
+    private static final Writer nullWriter = new Writer() {
+	public void close() throws IOException {
+	    // Do nothing
+	}
+
+	public void flush() throws IOException {
+	    // Do nothing
+	}
+
+	public void write(char[] cbuf, int off, int len) throws IOException {
+	    // Do nothing
+	}
+    };
+
+    public FaceletPortletViewHandler(ViewHandler parent) {
+	super(parent);
+    }
+
+    protected ResponseWriter createResponseWriter(FacesContext context)
+	    throws IOException, FacesException {
+	ResponseWriter writer;
+	ExternalContext extContext = context.getExternalContext();
+	if (extContext.getResponse() instanceof RenderResponse) {
+	    RenderKit renderKit = context.getRenderKit();
+	    RenderRequest request = (RenderRequest) extContext.getRequest();
+	    RenderResponse response = (RenderResponse) extContext.getResponse();
+	    String contenttype = request.getResponseContentType();
+	    if (contenttype == null) {
+		contenttype = "text/html";
+	    }
+	    String encoding = response.getCharacterEncoding();
+	    if (encoding == null) {
+		encoding = "UTF-8";
+	    }
+	    writer = renderKit.createResponseWriter(nullWriter, contenttype,
+		    encoding);
+	    contenttype = writer.getContentType();
+	    // apply them to the response
+	    response.setContentType(contenttype);
+	    // Now, clone with the real writer
+	    writer = writer.cloneWithWriter(response.getWriter());
+	} else {
+	    writer = super.createResponseWriter(context);
+	}
+	return writer;
+    }
+}
\ No newline at end of file

Added: branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/application/PortalStateManager.java
===================================================================
--- branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/application/PortalStateManager.java	                        (rev 0)
+++ branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/application/PortalStateManager.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,72 @@
+/**
+ * 
+ */
+package org.ajax4jsf.portlet.application;
+
+import java.io.IOException;
+import java.util.Map;
+import javax.faces.FactoryFinder;
+import javax.faces.application.StateManager;
+import javax.faces.application.StateManager.SerializedView;
+import javax.faces.component.UIViewRoot;
+import javax.faces.context.ExternalContext;
+import javax.faces.context.FacesContext;
+import javax.faces.render.RenderKit;
+import javax.faces.render.RenderKitFactory;
+import javax.faces.render.ResponseStateManager;
+import org.ajax4jsf.framework.ajax.AjaxStateManager;
+import org.apache.commons.collections.map.LRUMap;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class PortalStateManager extends AjaxStateManager {
+    
+    private static final String VIEW_STATES_MAP = PortalStateManager.class.getName();
+    
+    private ComponentsLoader componentLoader;
+    /**
+     * 
+     */
+    public PortalStateManager(StateManager parentStateManager) {
+	super(parentStateManager);
+	componentLoader = new ComponentsLoaderImpl();
+    }
+
+    /* (non-Javadoc)
+     * @see javax.faces.application.StateManager#restoreView(javax.faces.context.FacesContext, java.lang.String, java.lang.String)
+     */
+    public UIViewRoot restoreView(FacesContext context, String viewId,
+	    String renderKitId) {
+	    UIViewRoot viewRoot = null;
+	if(isSavingStateInClient(context)){
+	    viewRoot = super.restoreView(context, viewId, renderKitId);
+	} else {
+	    PortletStateHolder portletStateHolder = PortletStateHolder.getInstance(context);
+	    PortletWindowStates windowStates = portletStateHolder.getWindowStates(context);
+	    PortletViewState viewState = windowStates.getState(viewId);
+	    viewRoot = viewState.restore(context,componentLoader);
+	}
+	// TODO - implement portal-specific view state.
+	    return viewRoot;
+	
+    }
+    
+    public SerializedView saveSerializedView(FacesContext context) {
+	SerializedView serializedView = null;
+	if(isSavingStateInClient(context)){
+	    serializedView = super.saveSerializedView(context);
+	} else {
+		// TODO - implement portal-specific view state saving.
+	    PortletStateHolder portletStateHolder = PortletStateHolder.getInstance(context);
+	    PortletWindowStates windowStates = portletStateHolder.getWindowStates(context);
+	    String viewId = context.getViewRoot().getViewId();
+	    windowStates.setViewId(viewId);
+	    PortletViewState viewState = windowStates.getState(viewId);
+	    viewState.save(context);
+	}
+	return serializedView;
+    }
+    
+}

Added: branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/application/PortletStateHolder.java
===================================================================
--- branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/application/PortletStateHolder.java	                        (rev 0)
+++ branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/application/PortletStateHolder.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,199 @@
+/**
+ * 
+ */
+package org.ajax4jsf.portlet.application;
+
+import java.io.Serializable;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.faces.FacesException;
+import javax.faces.context.ExternalContext;
+import javax.faces.context.FacesContext;
+import javax.portlet.PortletConfig;
+import javax.portlet.PortletMode;
+import javax.portlet.PortletRequest;
+
+import org.ajax4jsf.portlet.AjaxFacesPortlet;
+import org.ajax4jsf.portlet.context.AbstractExternalContext;
+import org.apache.commons.collections.map.LRUMap;
+
+/**
+ * @author asmirnov
+ * 
+ */
+public class PortletStateHolder implements Serializable {
+    /**
+     * 
+     */
+    private static final long serialVersionUID = 3040262189850562853L;
+
+    private static final String STATE_HOLDER = PortletStateHolder.class
+	    .getName();
+
+    private static final String[] modes = { PortletMode.VIEW.toString(),
+	    PortletMode.EDIT.toString(), PortletMode.HELP.toString() };
+
+    private static final String DEFAULT = "default-";
+    
+    private PortletMode lastMode = PortletMode.VIEW;
+
+    /**
+         * View states for a different portlet modes, Views and serial numbers.
+         */
+    private Map states = new LRUMap();
+
+
+    /**
+         * Private constructor - instance must be stored in the session, and
+         * created on nessesary by factory method.
+         * 
+         * @param context
+         */
+    private PortletStateHolder(FacesContext context) {
+	ExternalContext externalContext = context.getExternalContext();
+	Object request = externalContext.getRequest();
+	if (request instanceof PortletRequest) {
+	    PortletRequest portletRequest = (PortletRequest) request;
+	    lastMode = portletRequest.getPortletMode();
+	}
+    }
+
+    /**
+         * Get instance of portlet states, stored in the session. If no
+         * previsious instance in session, create default value.
+         * 
+         * @param context
+         * @return
+         */
+    public static PortletStateHolder getInstance(FacesContext context) {
+	ExternalContext externalContext = context.getExternalContext();
+	Object session = externalContext.getSession(true);
+	Map sessionMap = externalContext.getSessionMap();
+	PortletStateHolder instance = null;
+	synchronized (session) {
+	    instance = (PortletStateHolder) sessionMap.get(STATE_HOLDER);
+	    if (null == instance) {
+		// Create and store in session new state holder.
+		instance = new PortletStateHolder(context);
+
+		sessionMap.put(STATE_HOLDER, instance);
+	    }
+	}
+	return instance;
+    }
+
+    /**
+     * Calculate viewId for a portlet content.
+     * @param context
+     * @return
+     */
+    public String getViewId(FacesContext context) {
+	String viewId = null;
+	// First - check for a existing viewId.
+	if(null != context.getViewRoot()){
+	    viewId = context.getViewRoot().getViewId();
+	}
+	// Second - find stored viewId for a current state and namespace.
+	if(null == viewId){
+	    viewId = getWindowStates(context).getViewId();
+	}
+	// Third - check a request attribute
+	if(null == viewId){
+	    viewId = (String) context.getExternalContext().getRequestParameterMap().get(AbstractExternalContext.VIEW_ID_PARAMETER);
+	}
+	// If none of above happen, try to get default viewId for a current mode.
+	PortletConfig config = (PortletConfig) context.getExternalContext().getRequestMap().get(AjaxFacesPortlet.PORTLET_CONFIG);
+	if (null == viewId && null != config) {
+		PortletMode portletMode = AjaxFacesPortlet.getPortletMode(context);
+		if(null == portletMode){
+		    portletMode = lastMode;
+		}
+		viewId = config.getInitParameter(DEFAULT+portletMode.toString().toLowerCase());
+	}
+	if(null == viewId){
+	    throw new FacesException("could'n determine portlet view id");
+	}
+	return viewId;
+    }
+    
+    /**
+     * Return class contained saved JSF states for a current window.
+     * @param context
+     * @return
+     */
+    public PortletWindowStates getWindowStates(FacesContext context) {
+	String portletNamespace = AjaxFacesPortlet.getPortletNamespace(context);
+	PortletMode portletMode = AjaxFacesPortlet.getPortletMode(context);
+	if(null == portletMode){
+	    portletMode = lastMode;
+	}
+	StateKey windowKey = new StateKey(portletMode,portletNamespace);
+	PortletWindowStates state = (PortletWindowStates) states.get(windowKey);
+	if(null == state){
+	    state = new PortletWindowStates();
+	    states.put(windowKey, state);
+	}
+	return state;
+    }
+    /**
+         * @author asmirnov
+         * 
+         */
+    private static class StateKey implements Serializable {
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = -1490104706512592990L;
+
+	private PortletMode mode;
+
+	private String namespace;
+
+
+	/**
+         * @param mode
+         * @param namespace
+         */
+	public StateKey(PortletMode mode, String namespace) {
+	    this.mode = mode;
+	    this.namespace = namespace;
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.Object#hashCode()
+	 */
+	public int hashCode() {
+	    final int PRIME = 31;
+	    int result = 1;
+	    result = PRIME * result + ((mode == null) ? 0 : mode.hashCode());
+	    result = PRIME * result + ((namespace == null) ? 0 : namespace.hashCode());
+	    return result;
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.Object#equals(java.lang.Object)
+	 */
+	public boolean equals(Object obj) {
+	    if (this == obj)
+		return true;
+	    if (obj == null)
+		return false;
+	    if (getClass() != obj.getClass())
+		return false;
+	    final StateKey other = (StateKey) obj;
+	    if (mode == null) {
+		if (other.mode != null)
+		    return false;
+	    } else if (!mode.equals(other.mode))
+		return false;
+	    if (namespace == null) {
+		if (other.namespace != null)
+		    return false;
+	    } else if (!namespace.equals(other.namespace))
+		return false;
+	    return true;
+	}
+
+    }
+}

Added: branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/application/PortletViewHandler.java
===================================================================
--- branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/application/PortletViewHandler.java	                        (rev 0)
+++ branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/application/PortletViewHandler.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,70 @@
+/**
+ * 
+ */
+package org.ajax4jsf.portlet.application;
+
+import java.io.IOException;
+import javax.faces.FacesException;
+import javax.faces.application.ViewHandler;
+import javax.faces.component.UIViewRoot;
+import javax.faces.context.ExternalContext;
+import javax.faces.context.FacesContext;
+import javax.portlet.PortletURL;
+import javax.portlet.RenderResponse;
+import org.ajax4jsf.framework.ajax.AjaxContext;
+import org.ajax4jsf.framework.ajax.AjaxViewHandler;
+import org.ajax4jsf.portlet.context.AbstractExternalContext;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class PortletViewHandler extends AjaxViewHandler {
+    /**
+     * @param parent
+     */
+    public PortletViewHandler(ViewHandler parent) {
+	super(parent);
+    }
+    
+    public UIViewRoot createView(FacesContext facesContext, String viewId) {
+        AjaxContext ajaxContext = AjaxContext.getCurrentInstance(facesContext);
+        boolean ajaxRequest = ajaxContext.isAjaxRequest(facesContext);
+        UIViewRoot root = super.createView(facesContext, viewId);
+        if(ajaxRequest && null != ajaxContext.getViewIdHolder()){
+            // Store new viewId for a portlet.
+        }
+        return root;
+    }
+
+    public void renderView(FacesContext context, UIViewRoot root) throws IOException, FacesException {
+        super.renderView(context, root);
+        // Save view to use in portlet rendering phases
+//	PortletViewState state = new PortletViewState();
+//	state.save(context);
+//	context.getExternalContext().getSessionMap().put(
+//		PortletViewState.SAVED_VIEW_ATTRIBUTE, state);
+
+    }
+    
+    public String getActionURL(FacesContext context, String url) {
+        ExternalContext externalContext = context.getExternalContext();
+        String portalActionURL = (String) externalContext.getRequestParameterMap().get(AbstractExternalContext.ACTION__PARAMETER);
+	Object response = externalContext.getResponse();
+	if (response instanceof RenderResponse) {
+	    RenderResponse renderResponse = (RenderResponse) response;
+	    PortletURL portletURL = renderResponse.createActionURL();
+	    portletURL.setParameter(AbstractExternalContext.VIEW_ID_PARAMETER, context.getViewRoot().getViewId());
+	    portletURL.setParameter(AbstractExternalContext.NAMESPACE_PARAMETER, renderResponse.getNamespace());
+	    return portletURL.toString();
+	} else if(null!=portalActionURL){
+	    return portalActionURL;
+	} else {
+	    return super.getActionURL(context, url);
+	}
+    }
+    
+    protected synchronized void fillChain(FacesContext context) {
+        // Do nothing - chain must be filled in AjaxViewHandler
+    }
+}

Added: branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/application/PortletViewState.java
===================================================================
--- branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/application/PortletViewState.java	                        (rev 0)
+++ branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/application/PortletViewState.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,244 @@
+/**
+ * 
+ */
+package org.ajax4jsf.portlet.application;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import javax.faces.FacesException;
+import javax.faces.application.FacesMessage;
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIViewRoot;
+import javax.faces.context.FacesContext;
+import javax.portlet.ActionRequest;
+import javax.portlet.RenderRequest;
+
+/**
+ * @author asmirnov
+ * 
+ */
+public class PortletViewState implements Serializable {
+
+    /**
+         * 
+         */
+    private static final long serialVersionUID = 5630637804542426709L;
+
+    public static final String SAVED_VIEW_ATTRIBUTE = PortletViewState.class
+	    .getName();
+
+    private Map messages = new HashMap();
+
+    private Object treeStructure;
+
+    private Object componentsState;
+
+    private UIViewRoot viewRoot;
+
+    public void save(FacesContext facesContext) {
+	UIViewRoot viewRoot = facesContext.getViewRoot();
+	// setViewRoot(viewRoot);
+	TreeStrutureNode rootNode = new TreeStrutureNode();
+	rootNode.apply(viewRoot);
+	setTreeStructure(rootNode);
+	setComponentsState(viewRoot.processSaveState(facesContext));
+	saveMessages(facesContext);
+	// facesContext.getExternalContext().getSessionMap().put(PortletViewState.SAVED_VIEW_ATTRIBUTE,
+	// this);
+    }
+
+    /**
+         * @param facesContext
+         */
+    public void saveMessages(FacesContext facesContext) {
+	Iterator idsWithMessages = facesContext.getClientIdsWithMessages();
+	while (idsWithMessages.hasNext()) {
+	    String id = (String) idsWithMessages.next();
+	    Iterator messages = facesContext.getMessages(id);
+	    while (messages.hasNext()) {
+		FacesMessage message = (FacesMessage) messages.next();
+		addMessage(id, message);
+	    }
+	}
+    }
+
+    public UIViewRoot restore(FacesContext facesContext,ComponentsLoader loader) {
+	// facesContext.setViewRoot(getViewRoot());
+	TreeStrutureNode structure = (TreeStrutureNode) getTreeStructure();
+	UIViewRoot root = null;
+	if (null != structure) {
+	    root = (UIViewRoot) structure.restore(loader);
+	    root.processRestoreState(facesContext, getComponentsState());
+	    // facesContext.setViewRoot(root);
+	    if (facesContext.getExternalContext().getRequest() instanceof RenderRequest) {
+		restoreMessages(facesContext);
+
+	    }
+
+	}
+	return root;
+    }
+
+    /**
+         * @param facesContext
+         */
+    public void restoreMessages(FacesContext facesContext) {
+	Iterator idsWithMessages = getClientIdsWithMessages();
+	while (idsWithMessages.hasNext()) {
+	    String id = (String) idsWithMessages.next();
+	    Iterator messages = getMessages(id);
+	    while (messages.hasNext()) {
+		FacesMessage message = (FacesMessage) messages.next();
+		facesContext.addMessage(id, message);
+	    }
+	}
+    }
+
+    /**
+         * @return the _messages
+         */
+    public Map getMessages() {
+	return messages;
+    }
+
+    /**
+         * @param _messages
+         *                the _messages to set
+         */
+    public void setMessages(Map _messages) {
+	this.messages = _messages;
+    }
+
+    /**
+         * @return the _viewRoot
+         */
+    public UIViewRoot getViewRoot() {
+	return viewRoot;
+    }
+
+    /**
+         * @param root
+         *                the _viewRoot to set
+         */
+    public void setViewRoot(UIViewRoot root) {
+	viewRoot = root;
+    }
+
+    public void addMessage(String clientId, FacesMessage message) {
+	List list = (List) messages.get(clientId);
+	if (list == null) {
+	    list = new ArrayList();
+	    messages.put(clientId, list);
+	}
+	list.add(message);
+    }
+
+    public Iterator getClientIdsWithMessages() {
+	return (messages.keySet().iterator());
+    }
+
+    public Iterator getMessages(String clientId) {
+	List list = (List) messages.get(clientId);
+	if (list != null) {
+	    return (list.iterator());
+	} else {
+	    return (Collections.EMPTY_LIST.iterator());
+	}
+    }
+
+    /**
+         * @return the componentsState
+         */
+    public Object getComponentsState() {
+	return componentsState;
+    }
+
+    /**
+         * @param componentsState
+         *                the componentsState to set
+         */
+    public void setComponentsState(Object componentsState) {
+	this.componentsState = componentsState;
+    }
+
+    /**
+         * @return the treeStructure
+         */
+    public Object getTreeStructure() {
+	return treeStructure;
+    }
+
+    /**
+         * @param treeStructure
+         *                the treeStructure to set
+         */
+    public void setTreeStructure(Object treeStructure) {
+	this.treeStructure = treeStructure;
+    }
+
+    protected static class TreeStrutureNode implements Serializable {
+	/**
+         * 
+         */
+	private static final long serialVersionUID = -9038742487716977254L;
+
+	private Map facets = new HashMap();
+
+	private List children = new ArrayList();
+
+	private String type;
+
+	private String id;
+
+	public void apply(UIComponent component) {
+	    type = component.getClass().getName();
+	    id = component.getId();
+	    Map componentFacets = component.getFacets();
+	    for (Iterator i = componentFacets.entrySet().iterator(); i
+		    .hasNext();) {
+		Entry element = (Entry) i.next();
+		UIComponent f = (UIComponent) element.getValue();
+		if (!f.isTransient()) {
+		    TreeStrutureNode facet = new TreeStrutureNode();
+		    facet.apply(f);
+		    facets.put(element.getKey(), facet);
+
+		}
+	    }
+	    for (Iterator i = component.getChildren().iterator(); i.hasNext();) {
+		UIComponent child = (UIComponent) i.next();
+		if (!child.isTransient()) {
+		    TreeStrutureNode t = new TreeStrutureNode();
+		    t.apply(child);
+		    children.add(t);
+
+		}
+	    }
+	}
+
+	public UIComponent restore(ComponentsLoader loader) {
+	    UIComponent component;
+		component = loader.createComponent(type);
+		component.setId(id);
+	    for (Iterator i = facets.entrySet().iterator(); i.hasNext();) {
+		Entry element = (Entry) i.next();
+		UIComponent facet = ((TreeStrutureNode) element.getValue())
+			.restore(loader);
+		component.getFacets().put(element.getKey(), facet);
+	    }
+	    for (Iterator i = children.iterator(); i.hasNext();) {
+		TreeStrutureNode node = (TreeStrutureNode) i.next();
+		UIComponent child = node.restore(loader);
+		component.getChildren().add(child);
+	    }
+	    return component;
+	}
+    }
+}

Added: branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/application/PortletWindowStates.java
===================================================================
--- branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/application/PortletWindowStates.java	                        (rev 0)
+++ branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/application/PortletWindowStates.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,52 @@
+/**
+ * 
+ */
+package org.ajax4jsf.portlet.application;
+
+import java.io.Serializable;
+import java.util.Map;
+
+import org.apache.commons.collections.map.LRUMap;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class PortletWindowStates implements Serializable {
+
+    /**
+     * 
+     */
+    private static final long serialVersionUID = 3239697059998528947L;
+
+    private String viewId;
+    
+    private Map viewStates;
+    
+    public PortletWindowStates() {
+	viewStates = new LRUMap();
+    }
+
+    /**
+     * @return the viewId
+     */
+    public String getViewId() {
+        return viewId;
+    }
+
+    /**
+     * @param viewId the viewId to set
+     */
+    public void setViewId(String viewId) {
+        this.viewId = viewId;
+    }
+    
+    public PortletViewState getState(String viewId) {
+	PortletViewState state = (PortletViewState) viewStates.get(viewId);
+	if(null == state){
+	    state = new PortletViewState();
+	    viewStates.put(viewId, state);
+	}
+	return state;
+    }
+}

Added: branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/application/package.html
===================================================================
--- branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/application/package.html	                        (rev 0)
+++ branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/application/package.html	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,10 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Insert title here</title>
+</head>
+<body>
+
+</body>
+</html>
\ No newline at end of file

Added: branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/component/package.html
===================================================================
--- branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/component/package.html	                        (rev 0)
+++ branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/component/package.html	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,10 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Insert title here</title>
+</head>
+<body>
+
+</body>
+</html>
\ No newline at end of file

Added: branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/AbstractExternalContext.java
===================================================================
--- branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/AbstractExternalContext.java	                        (rev 0)
+++ branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/AbstractExternalContext.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,484 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+/*
+
+ * Created on 25.09.2004
+
+ *
+
+ * Copyright 1999-2004 The Apache Software Foundation.
+
+ * 
+
+ * Licensed under the Apache License, Version 2.0 (the "License");
+
+ * you may not use this file except in compliance with the License.
+
+ * You may obtain a copy of the License at
+
+ * 
+
+ *      http://www.apache.org/licenses/LICENSE-2.0
+
+ * 
+
+ * Unless required by applicable law or agreed to in writing, software
+
+ * distributed under the License is distributed on an "AS IS" BASIS,
+
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
+ * See the License for the specific language governing permissions and
+
+ * limitations under the License.
+
+ */
+package org.ajax4jsf.portlet.context;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.security.Principal;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.Iterator;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Set;
+import javax.faces.FacesException;
+import javax.faces.context.ExternalContext;
+import javax.servlet.RequestDispatcher;
+import javax.servlet.Servlet;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+import javax.servlet.ServletResponse;
+
+/**
+ * 
+ * @author shura
+ * 
+ * 
+ * 
+ * Cocoon specific implementation of <code>ExternalContext</code> Use cocoon
+ * 
+ * <code>Context</code> for Implement JSF Servlet specific functions Do not
+ * 
+ * perform redirect - but tell <code>Action</code> for internal pipeline
+ * 
+ * redirect ? or do normal Cocoon redirect Via Http Environment do not dispanch -
+ * 
+ * use Cocoon generator source parametr, but perform generation Full
+ * 
+ * Cocoon-specific realization ;
+ * 
+ * 
+ * 
+ */
+public abstract class AbstractExternalContext extends ExternalContext {
+    
+    /**
+     * Request parameter to store current View Id.
+     */
+    public static final String VIEW_ID_PARAMETER ="org.ajax4jsf.portlet.VIEWID";
+    /**
+     * Name of request parameter to store namsepace of the current portlet instance. 
+     */
+    public static final String NAMESPACE_PARAMETER ="org.ajax4jsf.portlet.NAMESPACE";
+    public static final String ACTION__PARAMETER = "org.ajax4jsf.portlet.ACTION_URL";
+    public static final Object PORTLET_MODE_PARAMETER = "org.ajax4jsf.portlet.MODE";
+    // TODO - optimization.
+    private Map applicationMap;
+
+    private Map initParameterMap;
+
+    private Map requestHeaderMap = null;
+
+    private Map requestHeaderValues;
+
+    private Map requestMap;
+
+    private Map requestParameterMap;
+
+    private Map requestParameterValuesMap;
+
+    private Map sessionMap;
+
+    private Object request;
+
+    private Object response;
+
+    private boolean http;
+
+    private Map actionSettings;
+
+    private Object context;
+    
+
+    /**
+         * 
+         * @param response
+         * 
+         * @param request
+         * 
+         * @param context
+         * 
+         * @param defaultContext -
+         * 
+         * default implementation of <code>ExternalFacesContext</code>.
+         * 
+         */
+    public AbstractExternalContext(Object context, Object request,
+	    Object response) {
+	super();
+	this.context = context;
+	this.request = request;
+	this.response = response;
+    }
+
+    protected abstract String getNamespace();
+    
+    
+    public String encodeNamespace(String name) {
+        
+        return getNamespace()+name;
+    }
+    /*
+         * 
+         * (non-Javadoc)
+         * 
+         * 
+         * 
+         * @see javax.faces.context.ExternalContext#dispatch(java.lang.String)
+         * 
+         */
+    public Map getApplicationMap() {
+	if (this.applicationMap == null) {
+	    this.applicationMap = new ContextAttributesMap() {
+		protected Enumeration getEnumeration() {
+		    return getContextAttributeNames();
+		}
+
+		protected Object getAttribute(String name) {
+		    return getContextAttribute(name);
+		}
+
+		protected void setAttribute(String name, Object value) {
+		    setContextAttribute(name, value);
+		}
+
+		protected void removeAttribute(String name) {
+		    removeContextAttribute(name);
+		}
+	    };
+	}
+	return this.applicationMap;
+    }
+
+    protected abstract void removeContextAttribute(String name);
+
+    protected abstract void setContextAttribute(String name, Object value);
+
+    protected abstract Object getContextAttribute(String name);
+
+    protected abstract Enumeration getContextAttributeNames();
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see javax.faces.context.ExternalContext#getAuthType()
+         */
+    public Object getContext() {
+	return this.context;
+    }
+
+    /**
+         * @param context
+         */
+    public void setContext(Object context) {
+	this.context = context;
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see javax.faces.context.ExternalContext#getInitParameter(java.lang.String)
+         */
+    public Map getInitParameterMap() {
+	if (this.initParameterMap == null) {
+	    this.initParameterMap = new ContextAttributesMap() {
+		protected Object getAttribute(String name) {
+		    return getInitParameter(name);
+		}
+
+		protected void setAttribute(String name, Object value) {
+		    throw new UnsupportedOperationException();
+		}
+
+		protected Enumeration getEnumeration() {
+		    return getInitParametersNames();
+		}
+	    };
+	}
+	return this.initParameterMap;
+    }
+
+    /**
+         * Hoock method for initialization parameters.
+         * 
+         * @return
+         */
+    protected abstract Enumeration getInitParametersNames();
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see javax.faces.context.ExternalContext#getRequest()
+         */
+    public Object getRequest() {
+	return this.request;
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see javax.faces.context.ExternalContext#setRequest(java.lang.Object)
+         */
+    public void setRequest(Object request) {
+	this.request = request;
+    }
+
+    public Map getRequestCookieMap() {
+	// Portlet environment don't have methods to use cookies.
+	return Collections.EMPTY_MAP;
+    }
+
+    /*
+         * 
+         * (non-Javadoc)
+         * 
+         * 
+         * 
+         * @see javax.faces.context.ExternalContext#getRequestHeaderMap()
+         * 
+         */
+    public Map getRequestHeaderMap() {
+	if (this.requestHeaderMap == null) {
+	    this.requestHeaderMap = new ContextAttributesMap() {
+		protected Enumeration getEnumeration() {
+		    return getRequestHeaderNames();
+		}
+
+		protected Object getAttribute(String name) {
+		    return getRequestHeader(name);
+		}
+
+		protected void setAttribute(String name, Object value) {
+		    throw new UnsupportedOperationException();
+		}
+	    };
+	}
+	return this.requestHeaderMap;
+    }
+
+    protected abstract Object getRequestHeader(String name);
+
+    protected abstract Enumeration getRequestHeaderNames();
+
+    public Map getRequestHeaderValuesMap() {
+	// 
+	if (this.requestHeaderValues == null) {
+	    this.requestHeaderValues = new ContextAttributesMap() {
+		protected Enumeration getEnumeration() {
+		    return getRequestHeaderNames();
+		}
+
+		protected Object getAttribute(String name) {
+		    return getRequestHeaderValues(name);
+		}
+
+		protected void setAttribute(String name, Object value) {
+		    throw new UnsupportedOperationException();
+		}
+	    };
+	}
+	return this.requestHeaderValues;
+    }
+
+    protected abstract Object[] getRequestHeaderValues(String name);
+
+    public Map getRequestMap() {
+	if (this.requestMap == null) {
+	    this.requestMap = new ContextAttributesMap() {
+		protected Enumeration getEnumeration() {
+		    return getRequestAttributeNames();
+		}
+
+		protected Object getAttribute(String name) {
+		    return getRequestAttribute(name);
+		}
+
+		protected void setAttribute(String name, Object value) {
+		    setRequestAttribute(name, value);
+		}
+
+		protected void removeAttribute(String name) {
+		    removeRequestAttribute(name);
+		}
+	    };
+	}
+	return this.requestMap;
+    }
+
+    protected abstract void removeRequestAttribute(String name);
+
+    protected abstract void setRequestAttribute(String name, Object value);
+
+    protected abstract Object getRequestAttribute(String name);
+
+    protected abstract Enumeration getRequestAttributeNames();
+
+    public Map getRequestParameterMap() {
+	// 
+	if (this.requestParameterMap == null) {
+	    this.requestParameterMap = new ContextAttributesMap() {
+		protected Enumeration getEnumeration() {
+		    return enumerateRequestParameterNames();
+		}
+
+		protected Object getAttribute(String name) {
+		    return getRequestParameter(name);
+		}
+
+		protected void setAttribute(String name, Object value) {
+		    throw new UnsupportedOperationException();
+		}
+	    };
+	}
+	return this.requestParameterMap;
+    }
+
+    protected abstract Object getRequestParameter(String name);
+
+    protected abstract Enumeration enumerateRequestParameterNames();
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see javax.faces.context.ExternalContext#getRequestParameterNames()
+     * 
+     */
+    public Iterator getRequestParameterNames() {
+	return new EnumerationIterator(enumerateRequestParameterNames());
+    }
+
+    /*
+         * 
+         * (non-Javadoc)
+         * 
+         * 
+         * 
+         * @see javax.faces.context.ExternalContext#getRequestParameterValuesMap()
+         * 
+         */
+    public Map getRequestParameterValuesMap() {
+	if (this.requestParameterValuesMap == null) {
+	    this.requestParameterValuesMap = new ContextAttributesMap() {
+
+		protected Enumeration getEnumeration() {
+		    return enumerateRequestParameterNames();
+		}
+
+		protected Object getAttribute(String name) {
+		    return getRequestParameterValues(name);
+		}
+
+		protected void setAttribute(String name, Object value) {
+		    throw new UnsupportedOperationException();
+		}
+	    };
+	}
+	return this.requestParameterValuesMap;
+    }
+
+    protected abstract  Object getRequestParameterValues(String name);
+
+    /*
+         * 
+         * (non-Javadoc)
+         * 
+         * 
+         * 
+         * @see javax.faces.context.ExternalContext#getResponse()
+         * 
+         */
+    public void setResponse(Object response) {
+	this.response = response;
+    }
+
+    public Object getResponse() {
+	return this.response;
+    }
+
+    /*
+         * 
+         * (non-Javadoc)
+         * 
+         * 
+         * 
+         * @see javax.faces.context.ExternalContext#getSessionMap()
+         * 
+         */
+    public Map getSessionMap() {
+	if (this.sessionMap == null) {
+	    this.sessionMap = new ContextAttributesMap() {
+
+		protected Enumeration getEnumeration() {
+		    return getSessionAttributeNames();
+		}
+
+		protected Object getAttribute(String name) {
+		    return getSessionAttribute(name);
+		}
+
+		protected void setAttribute(String name, Object value) {
+		    setSessionAttribute(name, value);
+		}
+		
+		protected void removeAttribute(String name) {
+		    removeSessionAttribute(name);
+		}
+		
+
+	    };
+	}
+	return this.sessionMap;
+    }
+
+
+    protected abstract void removeSessionAttribute(String name);
+
+    protected abstract void setSessionAttribute(String name, Object value);
+
+    protected abstract Object getSessionAttribute(String name);
+
+    protected abstract Enumeration getSessionAttributeNames();
+}
\ No newline at end of file

Added: branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/ContextAttributesMap.java
===================================================================
--- branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/ContextAttributesMap.java	                        (rev 0)
+++ branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/ContextAttributesMap.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,48 @@
+/**
+ * 
+ */
+package org.ajax4jsf.portlet.context;
+
+/**
+ * Abstract base class for all attributes/sessions/cookies maps in external
+ * contexts.
+ * 
+ * @author asmirnov
+ * 
+ */
+public abstract class ContextAttributesMap extends ContextMap {
+    public Object get(Object key) {
+	if (null == key) {
+	    throw new NullPointerException();
+	}
+	return getAttribute(key.toString());
+    }
+
+    public Object put(Object key, Object value) {
+	if (null == key) {
+	    throw new NullPointerException();
+	}
+	String stringKey = key.toString();
+	Object oldValue = getAttribute(stringKey);
+	setAttribute(stringKey, value);
+	return oldValue;
+    }
+
+    public Object remove(Object key) {
+	if (null == key) {
+	    throw new NullPointerException();
+	}
+	String stringKey = key.toString();
+	Object oldValue = getAttribute(stringKey);
+	removeAttribute(stringKey);
+	return oldValue;
+    }
+
+    protected abstract Object getAttribute(String name);
+
+    protected abstract void setAttribute(String name, Object value);
+
+    protected void removeAttribute(String name) {
+	setAttribute(name, null);
+    }
+}

Added: branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/ContextConcatentedMap.java
===================================================================
--- branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/ContextConcatentedMap.java	                        (rev 0)
+++ branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/ContextConcatentedMap.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,96 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+package org.ajax4jsf.portlet.context;
+
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * 
+ * @author shura
+ * 
+ * 
+ * 
+ * Class for create extended context maps - concatend real parameters map with
+ * 
+ * additional from cocoon sitemap ...
+ * 
+ */
+abstract class ContextConcatentedMap extends ContextMap {
+    private Map extendMap;
+
+    private Set baseSet;
+
+    /**
+         * 
+         * @param extendedMap
+         * 
+         */
+    public ContextConcatentedMap(Map extendedMap) {
+	this.extendMap = extendedMap;
+    }
+
+    /*
+         * 
+         * (non-Javadoc)
+         * 
+         * 
+         * 
+         * @see java.util.Map#entrySet() use lasy creation , since used only in
+         * 
+         * static collection.
+         * 
+         */
+    public Set entrySet() {
+	if (this.baseSet == null) {
+	    this.baseSet = super.entrySet();
+	    this.baseSet.addAll(this.extendMap.entrySet());
+	}
+	return this.baseSet;
+    }
+
+    /*
+         * 
+         * (non-Javadoc)
+         * 
+         * 
+         * 
+         * @see java.util.Map#get(java.lang.Object)
+         * 
+         */
+    public Object get(Object key) {
+	Object result = this.extendMap.get(key);
+	if (null != result) {
+	    return result;
+	} else {
+	    return getBase(key);
+	}
+    }
+
+    /**
+         * 
+         * @param key
+         * 
+         * @return
+         * 
+         */
+    protected abstract Object getBase(Object key);
+}

Added: branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/ContextMap.java
===================================================================
--- branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/ContextMap.java	                        (rev 0)
+++ branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/ContextMap.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,179 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+package org.ajax4jsf.portlet.context;
+
+import java.util.AbstractMap;
+import java.util.AbstractSet;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.Enumeration;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * 
+ * @author shura
+ * 
+ * 
+ * 
+ * Base class for All maps in <code>ExternalContextCocoonImpl</code> get from
+ * 
+ * Sun Jsf-ri
+ * 
+ * 
+ * 
+ */
+abstract class ContextMap extends AbstractMap {
+    private transient volatile Set keySet;
+
+    /*
+         * 
+         * (non-Javadoc)
+         * 
+         * 
+         * 
+         * @see java.util.Map#entrySet()
+         * 
+         */
+    public Set entrySet() {
+	Set entries = new HashSet();
+	for (Enumeration e = getEnumeration(); e.hasMoreElements();) {
+	    String paramName = (String) e.nextElement();
+	    if (isValidParameter(paramName)) {
+		entries.add(new Entry(paramName, get(paramName)));
+	    }
+	}
+	return entries;
+    }
+
+    protected boolean isValidParameter(String paramName) {
+	return true;
+    }
+
+    public Set keySet() {
+	if (this.keySet == null) {
+	    this.keySet = new AbstractSet() {
+		public Iterator iterator() {
+		    return new EnumerationIterator(getEnumeration());
+		}
+
+		public int size() {
+		    Enumeration enumeration = getEnumeration();
+		    int size = 0;
+		    while (enumeration.hasMoreElements()) {
+			size++;
+		    }
+		    ;
+		    return size;
+		}
+	    };
+	}
+	return this.keySet;
+    }
+
+    public Collection values() {
+	return super.values();
+    }
+
+    /**
+         * 
+         * 
+         * 
+         * Template metod - all maps in ExternalFacesContext creates Set from
+         * 
+         * parameters <code>Enumeration</code>
+         * 
+         * 
+         * 
+         * @return enumeration for current map.
+         * 
+         */
+    protected abstract Enumeration getEnumeration();
+
+    // Unsupported by all Maps.
+    public void clear() {
+	throw new UnsupportedOperationException();
+    }
+
+    // Unsupported by all Maps.
+    public void putAll(Map t) {
+	throw new UnsupportedOperationException();
+    }
+
+    // Supported by maps if overridden
+    public Object remove(Object key) {
+	throw new UnsupportedOperationException();
+    }
+
+    static class Entry implements Map.Entry {
+	// immutable Entry
+	private final Object key;
+
+	private final Object value;
+
+	Entry(Object key, Object value) {
+	    this.key = key;
+	    this.value = value;
+	}
+
+	public Object getKey() {
+	    return this.key;
+	}
+
+	public Object getValue() {
+	    return this.value;
+	}
+
+	// No support of setting the value
+	public Object setValue(Object value) {
+	    throw new UnsupportedOperationException();
+	}
+
+	public int hashCode() {
+	    return ((this.key == null ? 0 : this.key.hashCode()) ^ (this.value == null ? 0
+		    : this.value.hashCode()));
+	}
+
+	public boolean equals(Object obj) {
+	    if ((obj == null) || !(obj instanceof Map.Entry)) {
+		return false;
+	    }
+	    Map.Entry input = (Map.Entry) obj;
+	    Object inputKey = input.getKey();
+	    Object inputValue = input.getValue();
+	    if ((inputKey == this.key) || ((inputKey != null) && inputKey.equals(this.key))) {
+		if ((inputValue == this.value)
+			|| ((inputValue != null) && inputValue.equals(this.value))) {
+		    return true;
+		}
+	    }
+	    return false;
+	}
+    }
+
+    public boolean equals(Object obj) {
+	if ((obj == null) || !(obj instanceof ContextMap)) {
+	    return false;
+	}
+	return super.equals(obj);
+    }
+}
\ No newline at end of file

Added: branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/ELContextImpl.java
===================================================================
--- branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/ELContextImpl.java	                        (rev 0)
+++ branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/ELContextImpl.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,106 @@
+/**
+ * 
+ */
+package org.ajax4jsf.portlet.context;
+
+import java.lang.reflect.Method;
+import java.util.HashMap;
+import java.util.Map;
+import javax.el.ELContext;
+import javax.el.ELResolver;
+import javax.el.FunctionMapper;
+import javax.el.ValueExpression;
+import javax.el.VariableMapper;
+
+/**
+ * @author asmirnov
+ * 
+ */
+public class ELContextImpl extends ELContext {
+    /**
+         * @author asmirnov
+         * 
+         */
+    public static final class FunctionMapperImpl extends FunctionMapper {
+	/*
+         * (non-Javadoc)
+         * 
+         * @see javax.el.FunctionMapper#resolveFunction(java.lang.String,
+         *      java.lang.String)
+         */
+	public Method resolveFunction(String arg0, String arg1) {
+	    return null;
+	}
+    }
+
+    /**
+         * @author asmirnov
+         * 
+         */
+    public static final class VariableMapperImpl extends VariableMapper {
+	private Map variables = new HashMap();
+
+	/*
+         * (non-Javadoc)
+         * 
+         * @see javax.el.VariableMapper#resolveVariable(java.lang.String)
+         */
+	public ValueExpression resolveVariable(String name) {
+	    return (ValueExpression) this.variables.get(name);
+	}
+
+	/*
+         * (non-Javadoc)
+         * 
+         * @see javax.el.VariableMapper#setVariable(java.lang.String,
+         *      javax.el.ValueExpression)
+         */
+	public ValueExpression setVariable(String name, ValueExpression variable) {
+	    return (ValueExpression) this.variables.put(name, variable);
+	}
+    }
+
+    private ELResolver resolver;
+
+    private VariableMapper variableMapper = new VariableMapperImpl();
+
+    private FunctionMapper functionMapper = new FunctionMapperImpl();
+
+    public ELContextImpl(ELResolver resolver) {
+	this.resolver = resolver;
+    }
+
+    /**
+         * @return the functionMapper
+         */
+    public FunctionMapper getFunctionMapper() {
+	return this.functionMapper;
+    }
+
+    /**
+         * @param functionMapper
+         *                the functionMapper to set
+         */
+    public void setFunctionMapper(FunctionMapper functionMapper) {
+	this.functionMapper = functionMapper;
+    }
+
+    /**
+         * @return the variableMapper
+         */
+    public VariableMapper getVariableMapper() {
+	return this.variableMapper;
+    }
+
+    /**
+         * @param variableMapper
+         *                the variableMapper to set
+         */
+    public void setVariableMapper(VariableMapper variableMapper) {
+	this.variableMapper = variableMapper;
+    }
+
+    public ELResolver getELResolver() {
+	return this.resolver;
+    }
+}

Added: branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/EnumerationIterator.java
===================================================================
--- branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/EnumerationIterator.java	                        (rev 0)
+++ branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/EnumerationIterator.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,27 @@
+/**
+ * 
+ */
+package org.ajax4jsf.portlet.context;
+
+import java.util.Enumeration;
+import java.util.Iterator;
+
+class EnumerationIterator implements Iterator {
+    public EnumerationIterator(Enumeration enumeration) {
+	this.enumeration = enumeration;
+    }
+
+    private Enumeration enumeration;
+
+    public boolean hasNext() {
+	return this.enumeration.hasMoreElements();
+    }
+
+    public Object next() {
+	return this.enumeration.nextElement();
+    }
+
+    public void remove() {
+	throw new UnsupportedOperationException();
+    }
+}
\ No newline at end of file

Added: branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/FacesContextFactoryImpl.java
===================================================================
--- branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/FacesContextFactoryImpl.java	                        (rev 0)
+++ branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/FacesContextFactoryImpl.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,140 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+/*
+
+ * Created on 25.09.2004
+
+ *
+
+ * Copyright 1999-2004 The Apache Software Foundation.
+
+ * 
+
+ * Licensed under the Apache License, Version 2.0 (the "License");
+
+ * you may not use this file except in compliance with the License.
+
+ * You may obtain a copy of the License at
+
+ * 
+
+ *      http://www.apache.org/licenses/LICENSE-2.0
+
+ * 
+
+ * Unless required by applicable law or agreed to in writing, software
+
+ * distributed under the License is distributed on an "AS IS" BASIS,
+
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
+ * See the License for the specific language governing permissions and
+
+ * limitations under the License.
+
+ */
+package org.ajax4jsf.portlet.context;
+
+import javax.faces.FacesException;
+import javax.faces.context.ExternalContext;
+import javax.faces.context.FacesContext;
+import javax.faces.context.FacesContextFactory;
+import javax.faces.lifecycle.Lifecycle;
+import javax.portlet.PortletContext;
+import javax.portlet.PortletRequest;
+import javax.portlet.PortletResponse;
+import javax.servlet.ServletContext;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * 
+ * @author shura Implementation of <code>FacesContextFactory</code> for
+ *         Portlet
+ * 
+ * Environment Use default factory for create default Faces
+ * 
+ * implementation context and setup wrappers for it.
+ * 
+ * 
+ * 
+ * 
+ * 
+ */
+public class FacesContextFactoryImpl extends FacesContextFactory {
+    /**
+         * 
+         * Hold <code>FacesContextFactory</code> from default implementation.
+         * 
+         */
+//    private FacesContextFactory defaultFacesContextFactory;
+
+
+    /**
+         * 
+         * Create instance of Faces context factory, based on implementation.
+         * 
+         * @param defaultFactory -
+         * 
+         * Factory from JSF implementation.
+         * 
+         */
+    public FacesContextFactoryImpl(/*FacesContextFactory defaultFactory*/) {
+	super();
+//	if (this.defaultFacesContextFactory == null) {
+//	    this.defaultFacesContextFactory = defaultFactory;
+//	}
+    }
+
+    /*
+         * 
+         * (non-Javadoc)
+         * 
+         * 
+         * 
+         * @see javax.faces.context.FacesContextFactory#getFacesContext(java.lang.Object,
+         * 
+         * java.lang.Object, java.lang.Object, javax.faces.lifecycle.Lifecycle)
+         * 
+         */
+    public FacesContext getFacesContext(Object context, Object request,
+	    Object response, Lifecycle lifecycle) throws FacesException {
+	if ((null == context) || (null == request) || (null == response)
+		|| (null == lifecycle)) {
+	    throw new NullPointerException(
+		    "One or more parameters for a faces context instantiation is null");
+	}
+	ExternalContext externalContext;
+	if ((context instanceof PortletContext)
+		&& (request instanceof PortletRequest)
+		&& (response instanceof PortletResponse)) {
+	    externalContext = new PortletContextImpl((PortletContext)context, (PortletRequest)request, (PortletResponse)response);
+	} else if ((context instanceof ServletContext)
+		&& (request instanceof HttpServletRequest)
+		&& (response instanceof HttpServletResponse)) {
+	    externalContext = new ServletContextImpl((ServletContext)context, (HttpServletRequest)request, (HttpServletResponse)response);
+	} else {
+	    throw new FacesException(
+		    "Unsupported environment. Only servlet or portlet is allowed");
+	}
+	return new FacesContextImpl(externalContext, lifecycle);
+    }
+}
\ No newline at end of file

Added: branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/FacesContextImpl.java
===================================================================
--- branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/FacesContextImpl.java	                        (rev 0)
+++ branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/FacesContextImpl.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,374 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+/*
+
+ * Created on 25.09.2004
+
+ *
+
+ * Copyright 1999-2004 The Apache Software Foundation.
+
+ * 
+
+ * Licensed under the Apache License, Version 2.0 (the "License");
+
+ * you may not use this file except in compliance with the License.
+
+ * You may obtain a copy of the License at
+
+ * 
+
+ *      http://www.apache.org/licenses/LICENSE-2.0
+
+ * 
+
+ * Unless required by applicable law or agreed to in writing, software
+
+ * distributed under the License is distributed on an "AS IS" BASIS,
+
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
+ * See the License for the specific language governing permissions and
+
+ * limitations under the License.
+
+ */
+package org.ajax4jsf.portlet.context;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import javax.el.ELContext;
+import javax.faces.FactoryFinder;
+import javax.faces.application.Application;
+import javax.faces.application.ApplicationFactory;
+import javax.faces.application.FacesMessage;
+import javax.faces.application.FacesMessage.Severity;
+import javax.faces.component.UIViewRoot;
+import javax.faces.context.ExternalContext;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseStream;
+import javax.faces.context.ResponseWriter;
+import javax.faces.lifecycle.Lifecycle;
+import javax.faces.render.RenderKit;
+import javax.faces.render.RenderKitFactory;
+
+/**
+ * 
+ * Implementation for <code>FacesContext</code> in Portlet Environment. 
+ * @author shura
+ * 
+ * 
+ */
+public class FacesContextImpl extends FacesContext {
+    
+    private boolean released = true;
+
+    private boolean renderResponse;
+
+    private boolean responseComplete;
+
+    private Application application;
+
+    private UIViewRoot viewRoot;
+
+    private Map messages;
+
+    private ExternalContext externalContext;
+
+    private Lifecycle lifecycle;
+
+    private ResponseWriter responseWriter;
+
+    private ResponseStream responseStream;
+
+    private ELContext elContext;
+
+    public FacesContextImpl(ExternalContext externalContext, Lifecycle lifecycle) {
+	super();
+	setCurrentInstance(this);
+	this.externalContext = externalContext;
+	this.lifecycle = lifecycle;
+	this.released = false;
+    }
+
+    /*
+         * 
+         * (non-Javadoc)
+         * 
+         * 
+         * 
+         * @see org.apache.cocoon.components.faces.context.CocoonFacesContext#getLifecycle()
+         * 
+         */
+    public Lifecycle getLifecycle() {
+	checkReleased();
+	return this.lifecycle;
+    }
+
+    public ELContext getELContext() {
+	checkReleased();
+	if (this.elContext == null) {
+	    Application application = getApplication();
+	    this.elContext = new ELContextImpl(application.getELResolver());
+	    this.elContext.putContext(FacesContext.class, this);
+	    UIViewRoot root = getViewRoot();
+	    if (null != root) {
+		this.elContext.setLocale(root.getLocale());
+	    }
+	}
+	return this.elContext;
+    }
+
+    /*
+         * 
+         * (non-Javadoc)
+         * 
+         * 
+         * 
+         * @see javax.faces.context.FacesContext#getExternalContext()
+         * 
+         */
+    public ExternalContext getExternalContext() {
+	checkReleased();
+	return this.externalContext;
+    }
+
+    /**
+         * 
+         * @param externalContext
+         * 
+         * The externalContext to set.
+         * 
+         */
+    // public void setExternalContext(ExternalContext externalContext) {
+    // this.externalContext = externalContext;
+    // }
+    /*
+         * 
+         * (non-Javadoc)
+         * 
+         * 
+         * 
+         * @see javax.faces.context.FacesContext#getResponseStream()
+         * 
+         */
+    public ResponseStream getResponseStream() {
+	checkReleased();
+	return this.responseStream;
+    }
+
+    /*
+         * 
+         * (non-Javadoc)
+         * 
+         * 
+         * 
+         * @see javax.faces.context.FacesContext#setResponseStream(javax.faces.context.ResponseStream)
+         * 
+         */
+    public void setResponseStream(ResponseStream responseStream) {
+	checkReleased();
+	this.responseStream = responseStream;
+    }
+
+    /*
+         * 
+         * (non-Javadoc)
+         * 
+         * 
+         * 
+         * @see javax.faces.context.FacesContext#getResponseWriter()
+         * 
+         */
+    public ResponseWriter getResponseWriter() {
+	checkReleased();
+	return this.responseWriter;
+    }
+
+    /*
+         * 
+         * (non-Javadoc)
+         * 
+         * 
+         * 
+         * @see javax.faces.context.FacesContext#setResponseWriter(javax.faces.context.ResponseWriter)
+         * 
+         */
+    public void setResponseWriter(ResponseWriter responseWriter) {
+	checkReleased();
+	this.responseWriter = responseWriter;
+    }
+
+    /*
+         * 
+         * (non-Javadoc)
+         * 
+         * 
+         * 
+         * @see javax.faces.context.FacesContext#release()
+         * 
+         */
+    public void release() {
+	// Release this and default instances...
+	this.released = true;
+	FacesContext.setCurrentInstance(null);
+	// defaultContext = null;
+	this.lifecycle = null;
+	this.externalContext = null;
+	this.responseWriter = null;
+	this.application = null;
+	this.viewRoot = null;
+	this.messages = null;
+	this.responseWriter = null;
+    }
+
+    public Application getApplication() {
+	checkReleased();
+	if (this.application == null) {
+	    ApplicationFactory aFactory = (ApplicationFactory) FactoryFinder
+		    .getFactory(FactoryFinder.APPLICATION_FACTORY);
+	    this.application = aFactory.getApplication();
+	}
+	return this.application;
+    }
+
+    public Iterator getClientIdsWithMessages() {
+	checkReleased();
+	if (this.messages == null) {
+	    return Collections.EMPTY_LIST.iterator();
+	} else {
+	    return this.messages.keySet().iterator();
+	}
+    }
+
+    public Severity getMaximumSeverity() {
+	checkReleased();
+	Severity max = null;
+	Iterator messages = getMessages();
+	while (messages.hasNext()) {
+	    FacesMessage msg = (FacesMessage) messages.next();
+	    Severity severity = msg.getSeverity();
+	    if ((null == max) || (max.getOrdinal() < severity.getOrdinal())) {
+		max = severity;
+	    }
+	}
+	return max;
+    }
+
+    public Iterator getMessages() {
+	checkReleased();
+	if (this.messages == null) {
+	    return Collections.EMPTY_LIST.iterator();
+	}
+	List messages = new ArrayList();
+	for (Iterator i = this.messages.values().iterator(); i.hasNext();) {
+	    final List list = (List) i.next();
+	    messages.addAll(list);
+	}
+	if (messages.size() > 0) {
+	    return messages.iterator();
+	}
+	return Collections.EMPTY_LIST.iterator();
+    }
+
+    public Iterator getMessages(String clientID) {
+	checkReleased();
+	if (this.messages != null) {
+	    final List list = (List) this.messages.get(clientID);
+	    if (list != null) {
+		return list.iterator();
+	    }
+	}
+	return Collections.EMPTY_LIST.iterator();
+    }
+
+    public RenderKit getRenderKit() {
+	checkReleased();
+	UIViewRoot viewRoot = getViewRoot();
+	if (viewRoot == null) {
+	    return null;
+	}
+	String renderKitId = viewRoot.getRenderKitId();
+	if (renderKitId == null) {
+	    return null;
+	} else {
+	    RenderKitFactory rkFactory = (RenderKitFactory) FactoryFinder
+		    .getFactory(FactoryFinder.RENDER_KIT_FACTORY);
+	    return rkFactory.getRenderKit(this, renderKitId);
+	}
+    }
+
+    public boolean getRenderResponse() {
+	checkReleased();
+	return this.renderResponse;
+    }
+
+    public boolean getResponseComplete() {
+	checkReleased();
+	return this.responseComplete;
+    }
+
+    public UIViewRoot getViewRoot() {
+	checkReleased();
+	return this.viewRoot;
+    }
+
+    public void setViewRoot(UIViewRoot viewRoot) {
+	checkReleased();
+	this.viewRoot = viewRoot;
+    }
+
+    public void addMessage(String clientID, FacesMessage message) {
+	checkReleased();
+	if (message == null) {
+	    throw new NullPointerException("Message can't be null");
+	}
+	if (this.messages == null) {
+	    this.messages = new HashMap();
+	}
+	List list = (List) this.messages.get(clientID);
+	if (list == null) {
+	    list = new ArrayList();
+	    this.messages.put(clientID, list);
+	}
+	list.add(message);
+    }
+
+    public void renderResponse() {
+	checkReleased();
+	this.renderResponse = true;
+    }
+
+    public void responseComplete() {
+	checkReleased();
+	this.responseComplete = true;
+    }
+
+    private void checkReleased() {
+	if (this.released) {
+	    throw new IllegalStateException("Context is released.");
+	}
+    }
+}
\ No newline at end of file

Added: branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/FacesContextWrapper.java
===================================================================
--- branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/FacesContextWrapper.java	                        (rev 0)
+++ branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/FacesContextWrapper.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,194 @@
+/**
+ * 
+ */
+package org.ajax4jsf.portlet.context;
+
+import java.util.Iterator;
+import javax.el.ELContext;
+import javax.faces.application.Application;
+import javax.faces.application.FacesMessage;
+import javax.faces.application.FacesMessage.Severity;
+import javax.faces.component.UIViewRoot;
+import javax.faces.context.ExternalContext;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseStream;
+import javax.faces.context.ResponseWriter;
+import javax.faces.render.RenderKit;
+
+/**
+ * @author asmirnov
+ * 
+ */
+public class FacesContextWrapper extends FacesContext {
+    private FacesContext _wrapped;
+
+    public FacesContextWrapper(FacesContext _wrapped) {
+	super();
+	this._wrapped = _wrapped;
+	setCurrentInstance(this);
+    }
+
+    /**
+         * @param clientId
+         * @param message
+         * @see javax.faces.context.FacesContext#addMessage(java.lang.String,
+         *      javax.faces.application.FacesMessage)
+         */
+    public void addMessage(String clientId, FacesMessage message) {
+	this._wrapped.addMessage(clientId, message);
+    }
+
+    /**
+         * @return
+         * @see javax.faces.context.FacesContext#getApplication()
+         */
+    public Application getApplication() {
+	return this._wrapped.getApplication();
+    }
+
+    /**
+         * @return
+         * @see javax.faces.context.FacesContext#getClientIdsWithMessages()
+         */
+    public Iterator getClientIdsWithMessages() {
+	return this._wrapped.getClientIdsWithMessages();
+    }
+
+    /**
+         * @return
+         * @see javax.faces.context.FacesContext#getELContext()
+         */
+    public ELContext getELContext() {
+	return this._wrapped.getELContext();
+    }
+
+    /**
+         * @return
+         * @see javax.faces.context.FacesContext#getExternalContext()
+         */
+    public ExternalContext getExternalContext() {
+	return this._wrapped.getExternalContext();
+    }
+
+    /**
+         * @return
+         * @see javax.faces.context.FacesContext#getMaximumSeverity()
+         */
+    public Severity getMaximumSeverity() {
+	return this._wrapped.getMaximumSeverity();
+    }
+
+    /**
+         * @return
+         * @see javax.faces.context.FacesContext#getMessages()
+         */
+    public Iterator getMessages() {
+	return this._wrapped.getMessages();
+    }
+
+    /**
+         * @param clientId
+         * @return
+         * @see javax.faces.context.FacesContext#getMessages(java.lang.String)
+         */
+    public Iterator getMessages(String clientId) {
+	return this._wrapped.getMessages(clientId);
+    }
+
+    /**
+         * @return
+         * @see javax.faces.context.FacesContext#getRenderKit()
+         */
+    public RenderKit getRenderKit() {
+	return this._wrapped.getRenderKit();
+    }
+
+    /**
+         * @return
+         * @see javax.faces.context.FacesContext#getRenderResponse()
+         */
+    public boolean getRenderResponse() {
+	return this._wrapped.getRenderResponse();
+    }
+
+    /**
+         * @return
+         * @see javax.faces.context.FacesContext#getResponseComplete()
+         */
+    public boolean getResponseComplete() {
+	return this._wrapped.getResponseComplete();
+    }
+
+    /**
+         * @return
+         * @see javax.faces.context.FacesContext#getResponseStream()
+         */
+    public ResponseStream getResponseStream() {
+	return this._wrapped.getResponseStream();
+    }
+
+    /**
+         * @return
+         * @see javax.faces.context.FacesContext#getResponseWriter()
+         */
+    public ResponseWriter getResponseWriter() {
+	return this._wrapped.getResponseWriter();
+    }
+
+    /**
+         * @return
+         * @see javax.faces.context.FacesContext#getViewRoot()
+         */
+    public UIViewRoot getViewRoot() {
+	return this._wrapped.getViewRoot();
+    }
+
+    /**
+         * 
+         * @see javax.faces.context.FacesContext#release()
+         */
+    public void release() {
+	this._wrapped.release();
+	this._wrapped = null;
+    }
+
+    /**
+         * 
+         * @see javax.faces.context.FacesContext#renderResponse()
+         */
+    public void renderResponse() {
+	this._wrapped.renderResponse();
+    }
+
+    /**
+         * 
+         * @see javax.faces.context.FacesContext#responseComplete()
+         */
+    public void responseComplete() {
+	this._wrapped.responseComplete();
+    }
+
+    /**
+         * @param responseStream
+         * @see javax.faces.context.FacesContext#setResponseStream(javax.faces.context.ResponseStream)
+         */
+    public void setResponseStream(ResponseStream responseStream) {
+	this._wrapped.setResponseStream(responseStream);
+    }
+
+    /**
+         * @param responseWriter
+         * @see javax.faces.context.FacesContext#setResponseWriter(javax.faces.context.ResponseWriter)
+         */
+    public void setResponseWriter(ResponseWriter responseWriter) {
+	this._wrapped.setResponseWriter(responseWriter);
+    }
+
+    /**
+         * @param root
+         * @see javax.faces.context.FacesContext#setViewRoot(javax.faces.component.UIViewRoot)
+         */
+    public void setViewRoot(UIViewRoot root) {
+	this._wrapped.setViewRoot(root);
+    }
+}

Added: branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/PortletContextImpl.java
===================================================================
--- branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/PortletContextImpl.java	                        (rev 0)
+++ branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/PortletContextImpl.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,267 @@
+/**
+ * 
+ */
+package org.ajax4jsf.portlet.context;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.security.Principal;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Set;
+import javax.faces.FacesException;
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.PortletContext;
+import javax.portlet.PortletException;
+import javax.portlet.PortletRequest;
+import javax.portlet.PortletRequestDispatcher;
+import javax.portlet.PortletResponse;
+import javax.portlet.PortletSession;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+
+/**
+ * @author asmirnov
+ * 
+ */
+public class PortletContextImpl extends AbstractExternalContext {
+    
+    private String namespace;
+
+    public PortletContextImpl(PortletContext context, PortletRequest request,
+	    PortletResponse response) {
+	super(context, request, response);
+    }
+
+    private PortletContext getPortletContext() {
+	return (PortletContext) getContext();
+    }
+
+    private PortletRequest getPortletRequest() {
+	return (PortletRequest) getRequest();
+    }
+
+    private PortletResponse getPortletResponse() {
+	return (PortletResponse) getResponse();
+    }
+
+    public String getInitParameter(String name) {
+	return getPortletContext().getInitParameter(name);
+    }
+
+    protected String getNamespace() {
+	if (null == namespace) {
+	    if (getResponse() instanceof RenderResponse) {
+		namespace = ((RenderResponse) getResponse()).getNamespace();
+	    } else if (null != getRequestParameter(NAMESPACE_PARAMETER)) {
+		namespace = (String) getRequestParameter(NAMESPACE_PARAMETER);
+	    } else {
+		namespace = "";
+	    }
+	}
+	return namespace;
+    }
+
+    public URL getResource(String path) throws MalformedURLException {
+	return getPortletContext().getResource(path);
+    }
+
+    public InputStream getResourceAsStream(String path) {
+	return getPortletContext().getResourceAsStream(path);
+    }
+
+    public Set getResourcePaths(String path) {
+	return getPortletContext().getResourcePaths(path);
+    }
+
+    protected Enumeration enumerateRequestParameterNames() {
+	return getPortletRequest().getParameterNames();
+    }
+
+    protected Object getContextAttribute(String name) {
+	return getPortletContext().getAttribute(name);
+    }
+
+    protected Enumeration getContextAttributeNames() {
+	return getPortletContext().getAttributeNames();
+    }
+
+    protected Enumeration getInitParametersNames() {
+	return getPortletContext().getInitParameterNames();
+    }
+
+    protected Object getRequestAttribute(String name) {
+	return getPortletRequest().getAttribute(name);
+    }
+
+    protected Enumeration getRequestAttributeNames() {
+	return getPortletRequest().getAttributeNames();
+    }
+
+    public Map getRequestParameterValuesMap() {
+	return getPortletRequest().getParameterMap();
+    }
+
+    protected Object getRequestParameterValues(String name) {
+	return getPortletRequest().getParameterValues(name);
+    }
+
+    protected Object getRequestHeader(String name) {
+	return getPortletRequest().getProperty(name);
+    }
+
+    protected Enumeration getRequestHeaderNames() {
+	return getPortletRequest().getPropertyNames();
+    }
+
+    protected Object[] getRequestHeaderValues(String name) {
+	Enumeration properties = getPortletRequest().getProperties(name);
+	List values = new ArrayList();
+	while (properties.hasMoreElements()) {
+	    Object value = (Object) properties.nextElement();
+	    values.add(value);
+	}
+	return values.toArray();
+    }
+
+    protected Object getRequestParameter(String name) {
+	return getPortletRequest().getParameter(name);
+    }
+
+    protected Object getSessionAttribute(String name) {
+	return getPortletRequest().getPortletSession(true).getAttribute(name,PortletSession.PORTLET_SCOPE);
+    }
+
+    protected Enumeration getSessionAttributeNames() {
+	return getPortletRequest().getPortletSession(true).getAttributeNames(PortletSession.PORTLET_SCOPE);
+    }
+
+    protected void removeContextAttribute(String name) {
+	getPortletContext().removeAttribute(name);
+    }
+
+    protected void removeRequestAttribute(String name) {
+	getPortletRequest().removeAttribute(name);
+    }
+
+    protected void removeSessionAttribute(String name) {
+	getPortletRequest().getPortletSession(true).removeAttribute(name,PortletSession.PORTLET_SCOPE);
+    }
+
+    protected void setContextAttribute(String name, Object value) {
+	getPortletContext().setAttribute(name, value);
+    }
+
+    protected void setRequestAttribute(String name, Object value) {
+	getPortletRequest().setAttribute(name, value);
+    }
+
+    protected void setSessionAttribute(String name, Object value) {
+	getPortletRequest().getPortletSession(true).setAttribute(name, value,PortletSession.PORTLET_SCOPE);
+    }
+
+    public void dispatch(String path) throws IOException {
+	if (null == path) {
+	    throw new NullPointerException("Path to new view is null");
+	}
+	if (!(getRequest() instanceof RenderRequest && getResponse() instanceof RenderResponse)) {
+	    throw new IllegalStateException(
+		    "Dispatch to new view not at render phase");
+	}
+	PortletRequestDispatcher dispatcher = getPortletContext()
+		.getRequestDispatcher(path);
+	if (null == dispatcher) {
+	    throw new IllegalStateException(
+		    "Dispatcher for render request is not created");
+	}
+	try {
+	    dispatcher.include((RenderRequest) getRequest(),
+		    (RenderResponse) getResponse());
+	} catch (PortletException e) {
+	    throw new FacesException(e);
+	}
+    }
+
+    public String encodeActionURL(String url) {
+	if (null == url) {
+	    throw new NullPointerException();
+	}
+	return url;
+    }
+
+    public String encodeResourceURL(String url) {
+	return getPortletResponse().encodeURL(url);
+    }
+
+    public String getAuthType() {
+	return getPortletRequest().getAuthType();
+    }
+
+    public String getRemoteUser() {
+	return getPortletRequest().getRemoteUser();
+    }
+
+    public String getRequestContextPath() {
+	return getPortletRequest().getContextPath();
+    }
+
+    public Locale getRequestLocale() {
+	return getPortletRequest().getLocale();
+    }
+
+    public Iterator getRequestLocales() {
+	return new EnumerationIterator(getPortletRequest().getLocales());
+    }
+
+    public String getRequestPathInfo() {
+	String pathInfo = (String) getRequestParameter(VIEW_ID_PARAMETER);
+	if(null== pathInfo){
+	    pathInfo = (String) getRequestAttribute(VIEW_ID_PARAMETER);
+	}
+	return pathInfo;
+    }
+
+    public String getRequestServletPath() {
+	return null;
+    }
+
+    public Object getSession(boolean create) {
+	return getPortletRequest().getPortletSession();
+    }
+
+    public Principal getUserPrincipal() {
+	return getPortletRequest().getUserPrincipal();
+    }
+
+    public boolean isUserInRole(String role) {
+	return getPortletRequest().isUserInRole(role);
+    }
+
+    public void log(String message) {
+	getPortletContext().log(message);
+    }
+
+    public void log(String message, Throwable exception) {
+	getPortletContext().log(message, exception);
+    }
+
+    public void redirect(String url) throws IOException {
+	if (null == url) {
+	    throw new NullPointerException("Path to redirect is null");
+	}
+	if (!(getRequest() instanceof ActionRequest && getResponse() instanceof ActionResponse)) {
+	    throw new IllegalStateException(
+		    "Redirect to new url not at action phase");
+	}
+	((ActionResponse) getResponse()).sendRedirect(url);
+    }
+}

Added: branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/ServletContextImpl.java
===================================================================
--- branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/ServletContextImpl.java	                        (rev 0)
+++ branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/ServletContextImpl.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,307 @@
+/**
+ * 
+ */
+package org.ajax4jsf.portlet.context;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.security.Principal;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.Iterator;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Set;
+import javax.faces.FacesException;
+import javax.faces.context.FacesContext;
+import javax.portlet.PortletSession;
+import javax.portlet.PortletSessionUtil;
+import javax.portlet.RenderResponse;
+import javax.servlet.RequestDispatcher;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * @author asmirnov
+ * 
+ */
+public class ServletContextImpl extends AbstractExternalContext {
+    
+    private static final Log _log = LogFactory.getLog(ServletContextImpl.class);
+    
+    private String namespace;
+
+    /**
+     * @param context
+         * @param request
+         * @param response
+         */
+    public ServletContextImpl(ServletContext context, HttpServletRequest request, HttpServletResponse response) {
+	super(context, request, response);
+    }
+
+    private HttpServletRequest getHttpRequest() {
+	return (HttpServletRequest) getRequest();
+    }
+
+    private ServletContext getServletContext() {
+	return (ServletContext) getContext();
+    }
+
+    private HttpServletResponse getHttpResponse() {
+	return (HttpServletResponse) getResponse();
+    }
+
+    protected String getNamespace() {
+	if (null == namespace) {
+	    Object requestParameter = getRequestParameter(NAMESPACE_PARAMETER);
+	    if (null != requestParameter) {
+		namespace = (String) requestParameter;
+		if (_log.isDebugEnabled()) {
+		    _log.debug("Namespace for a portlet instance is "+namespace);
+		}
+	    } else {
+		throw new FacesException("AJAX call to portlet without namespace parameter");
+	    }
+	}
+	return namespace;
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see javax.faces.context.ExternalContext#getInitParameter(java.lang.String)
+         */
+    public String getInitParameter(String name) {
+	return getServletContext().getInitParameter(name);
+    }
+
+    protected Enumeration getInitParametersNames() {
+	return getServletContext().getInitParameterNames();
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see javax.faces.context.ExternalContext#getResource(java.lang.String)
+         */
+    public URL getResource(String path) throws MalformedURLException {
+	return getServletContext().getResource(path);
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see javax.faces.context.ExternalContext#getResourceAsStream(java.lang.String)
+         */
+    public InputStream getResourceAsStream(String path) {
+	return getServletContext().getResourceAsStream(path);
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see javax.faces.context.ExternalContext#getResourcePaths(java.lang.String)
+         */
+    public Set getResourcePaths(String path) {
+	return getServletContext().getResourcePaths(path);
+    }
+
+    protected Object getContextAttribute(String name) {
+	return getServletContext().getAttribute(name);
+    }
+
+    protected Enumeration getContextAttributeNames() {
+	return getServletContext().getAttributeNames();
+    }
+
+    protected void setContextAttribute(String name, Object value) {
+	getServletContext().setAttribute(name, value);
+    }
+
+    public String getAuthType() {
+	return getHttpRequest().getAuthType();
+    }
+
+    public String getRemoteUser() {
+	return getHttpRequest().getRemoteUser();
+    }
+
+    public String getRequestContextPath() {
+	return getHttpRequest().getContextPath();
+    }
+
+    public String getRequestPathInfo() {
+	return getHttpRequest().getPathInfo();
+    }
+
+    public String getRequestServletPath() {
+	return getHttpRequest().getServletPath();
+    }
+
+    protected Enumeration enumerateRequestParameterNames() {
+	return getHttpRequest().getParameterNames();
+    }
+
+    protected Object getRequestAttribute(String name) {
+	return getHttpRequest().getAttribute(name);
+    }
+
+    protected Enumeration getRequestAttributeNames() {
+	return getHttpRequest().getAttributeNames();
+    }
+
+    protected Object getRequestParameterValues(String name) {
+	return getHttpRequest().getParameterValues(name);
+    }
+
+    protected Object getRequestHeader(String name) {
+	return getHttpRequest().getHeader(name);
+    }
+
+    protected Enumeration getRequestHeaderNames() {
+	return getHttpRequest().getHeaderNames();
+    }
+
+    protected Object[] getRequestHeaderValues(String name) {
+	Enumeration values = getHttpRequest().getHeaders(name);
+	ArrayList valuesList = new ArrayList();
+	while (values.hasMoreElements()) {
+	    valuesList.add(values.nextElement());
+	}
+	return valuesList.toArray();
+    }
+
+    protected Object getRequestParameter(String name) {
+	return getHttpRequest().getParameter(name);
+    }
+    
+    private String sessionPrefix;
+    
+    private String getSessionPrefix(){
+	if (sessionPrefix == null) {
+	    HttpSession session = getHttpRequest().getSession(false);
+	    String namespase = getNamespace();
+	    if(null == namespase || null == session){
+		throw new FacesException("JSF request called without portlet namespace parameter");
+	    }
+	    Enumeration attributeNames = session.getAttributeNames();
+	    while (attributeNames.hasMoreElements() && null == sessionPrefix) {
+		String name = (String) attributeNames.nextElement();
+		Object attribute = session.getAttribute(name);
+		if (PortletSessionUtil.decodeScope(name) == PortletSession.PORTLET_SCOPE
+			&& PortletSessionUtil.decodeAttributeName(name).equals(
+				NAMESPACE_PARAMETER)
+			&& namespase.equals(attribute)) {
+		    sessionPrefix = name.substring(0, name.length()-NAMESPACE_PARAMETER.length());
+		    if (_log.isDebugEnabled()) {
+			_log.debug("Prefix for a PORTLET_SCOPE session attributes: "+sessionPrefix);
+		    }
+		}
+	    }
+	    if(null == sessionPrefix){
+		throw new FacesException("Prefix for attributes in portlet session scope not found");
+	    }
+	}
+	return sessionPrefix;
+    }
+
+    protected Object getSessionAttribute(String name) {
+	return getHttpRequest().getSession(true).getAttribute(getSessionPrefix()+name);
+    }
+
+    protected Enumeration getSessionAttributeNames() {
+	return new SessionAttributesNames(getHttpRequest().getSession(true).getAttributeNames(),getSessionPrefix());
+    }
+
+    protected void removeSessionAttribute(String name) {
+        getHttpRequest().getSession(true).removeAttribute(getSessionPrefix()+name);
+    }
+
+    protected void setSessionAttribute(String name, Object value) {
+        getHttpRequest().getSession(true).setAttribute(getSessionPrefix()+name, value);
+    }
+
+    protected void removeContextAttribute(String name) {
+	getHttpRequest().getSession(true).removeAttribute(name);
+    }
+
+    protected void removeRequestAttribute(String name) {
+	getHttpRequest().removeAttribute(name);
+    }
+
+    protected void setRequestAttribute(String name, Object value) {
+	getHttpRequest().setAttribute(name, value);
+    }
+
+    public void dispatch(String path) throws IOException {
+        RequestDispatcher requestDispatcher = getHttpRequest().getRequestDispatcher(path);
+            if (requestDispatcher == null) {
+                (getHttpResponse()).
+                        sendError(HttpServletResponse.SC_NOT_FOUND);
+                return;
+            }
+            try {
+                requestDispatcher.forward(getHttpRequest(), getHttpResponse());
+            } catch (IOException ioe) {
+                throw ioe;
+            } catch (ServletException se) {
+                throw new FacesException(se);
+            }
+
+    }
+
+    public String encodeActionURL(String url) {
+	return getHttpResponse().encodeURL(url);
+    }
+
+    public String encodeResourceURL(String url) {
+	return getHttpResponse().encodeURL(url);
+    }
+
+    public Locale getRequestLocale() {
+	return getHttpRequest().getLocale();
+    }
+
+    public Iterator getRequestLocales() {
+	return new EnumerationIterator(getHttpRequest().getLocales());
+    }
+
+    public Object getSession(boolean create) {
+	HttpSession session = getHttpRequest().getSession(create);
+	if(null != session){
+	    session = new ServletSessionWrapper(session,getSessionPrefix());
+	}
+	return session;
+    }
+
+    public Principal getUserPrincipal() {
+	return getHttpRequest().getUserPrincipal();
+    }
+
+    public boolean isUserInRole(String role) {
+	return getHttpRequest().isUserInRole(role);
+    }
+
+    public void log(String message) {
+	getServletContext().log(message);
+    }
+
+    public void log(String message, Throwable exception) {
+	getServletContext().log(message, exception);
+    }
+
+    public void redirect(String url) throws IOException {
+	getHttpResponse().sendRedirect(url);
+        FacesContext.getCurrentInstance().responseComplete();
+    }
+}

Added: branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/ServletSessionWrapper.java
===================================================================
--- branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/ServletSessionWrapper.java	                        (rev 0)
+++ branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/ServletSessionWrapper.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,173 @@
+/**
+ * 
+ */
+package org.ajax4jsf.portlet.context;
+
+import java.util.Enumeration;
+import javax.servlet.ServletContext;
+import javax.servlet.http.HttpSession;
+import javax.servlet.http.HttpSessionContext;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class ServletSessionWrapper implements HttpSession {
+    
+    private HttpSession wrapped;
+
+    private String prefix;
+    /**
+     * @param wrapped
+     */
+    public ServletSessionWrapper(HttpSession wrapped,String prefix) {
+	this.wrapped = wrapped;
+	this.prefix = prefix;
+    }
+
+    /**
+     * @param arg0
+     * @return
+     * @see javax.servlet.http.HttpSession#getAttribute(java.lang.String)
+     */
+    public Object getAttribute(String arg0) {
+	return wrapped.getAttribute(prefix+arg0);
+    }
+
+    /**
+     * @return
+     * @see javax.servlet.http.HttpSession#getAttributeNames()
+     */
+    public Enumeration getAttributeNames() {
+	return new SessionAttributesNames(wrapped.getAttributeNames(),prefix);
+    }
+
+    /**
+     * @return
+     * @see javax.servlet.http.HttpSession#getCreationTime()
+     */
+    public long getCreationTime() {
+	return wrapped.getCreationTime();
+    }
+
+    /**
+     * @return
+     * @see javax.servlet.http.HttpSession#getId()
+     */
+    public String getId() {
+	return wrapped.getId();
+    }
+
+    /**
+     * @return
+     * @see javax.servlet.http.HttpSession#getLastAccessedTime()
+     */
+    public long getLastAccessedTime() {
+	return wrapped.getLastAccessedTime();
+    }
+
+    /**
+     * @return
+     * @see javax.servlet.http.HttpSession#getMaxInactiveInterval()
+     */
+    public int getMaxInactiveInterval() {
+	return wrapped.getMaxInactiveInterval();
+    }
+
+    /**
+     * @return
+     * @see javax.servlet.http.HttpSession#getServletContext()
+     */
+    public ServletContext getServletContext() {
+	return wrapped.getServletContext();
+    }
+
+    /**
+     * @return
+     * @deprecated
+     * @see javax.servlet.http.HttpSession#getSessionContext()
+     */
+    public HttpSessionContext getSessionContext() {
+	return wrapped.getSessionContext();
+    }
+
+    /**
+     * @param arg0
+     * @return
+     * @deprecated
+     * @see javax.servlet.http.HttpSession#getValue(java.lang.String)
+     */
+    public Object getValue(String arg0) {
+	return wrapped.getValue(prefix+arg0);
+    }
+
+    /**
+     * @return
+     * @deprecated
+     * @see javax.servlet.http.HttpSession#getValueNames()
+     */
+    public String[] getValueNames() {
+	return wrapped.getValueNames();
+    }
+
+    /**
+     * 
+     * @see javax.servlet.http.HttpSession#invalidate()
+     */
+    public void invalidate() {
+	wrapped.invalidate();
+    }
+
+    /**
+     * @return
+     * @see javax.servlet.http.HttpSession#isNew()
+     */
+    public boolean isNew() {
+	return wrapped.isNew();
+    }
+
+    /**
+     * @param arg0
+     * @param arg1
+     * @deprecated
+     * @see javax.servlet.http.HttpSession#putValue(java.lang.String, java.lang.Object)
+     */
+    public void putValue(String arg0, Object arg1) {
+	wrapped.putValue(prefix+arg0, arg1);
+    }
+
+    /**
+     * @param arg0
+     * @see javax.servlet.http.HttpSession#removeAttribute(java.lang.String)
+     */
+    public void removeAttribute(String arg0) {
+	wrapped.removeAttribute(prefix+arg0);
+    }
+
+    /**
+     * @param arg0
+     * @deprecated
+     * @see javax.servlet.http.HttpSession#removeValue(java.lang.String)
+     */
+    public void removeValue(String arg0) {
+	wrapped.removeValue(prefix+arg0);
+    }
+
+    /**
+     * @param arg0
+     * @param arg1
+     * @see javax.servlet.http.HttpSession#setAttribute(java.lang.String, java.lang.Object)
+     */
+    public void setAttribute(String arg0, Object arg1) {
+	wrapped.setAttribute(prefix+arg0, arg1);
+    }
+
+    /**
+     * @param arg0
+     * @see javax.servlet.http.HttpSession#setMaxInactiveInterval(int)
+     */
+    public void setMaxInactiveInterval(int arg0) {
+	wrapped.setMaxInactiveInterval(arg0);
+    }
+    
+}

Added: branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/SessionAttributesNames.java
===================================================================
--- branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/SessionAttributesNames.java	                        (rev 0)
+++ branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/SessionAttributesNames.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,56 @@
+/**
+ * 
+ */
+package org.ajax4jsf.portlet.context;
+
+import java.util.Enumeration;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class SessionAttributesNames implements Enumeration {
+    
+    private Enumeration names;
+    
+    private String prefix;
+    
+    private Object next;
+    
+    
+    /**
+     * @param names
+     * @param prefix
+     */
+    public SessionAttributesNames(Enumeration names, String prefix) {
+	this.names = names;
+	this.prefix = prefix;
+	setNext();
+    }
+
+    /* (non-Javadoc)
+     * @see java.util.Enumeration#hasMoreElements()
+     */
+    public boolean hasMoreElements() {
+	return null != next;
+    }
+
+    /* (non-Javadoc)
+     * @see java.util.Enumeration#nextElement()
+     */
+    public Object nextElement() {
+	Object nextName = next;
+	setNext();
+	return nextName;
+    }
+    
+    private void setNext(){
+	next = null;
+	while (names.hasMoreElements() && null == next) {
+	    String name = (String) names.nextElement();
+	    if(name.startsWith(prefix)){
+		next = name.substring(0, prefix.length());
+	    }
+	}
+    }
+}

Added: branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/lifecycle/PortletLifecycle.java
===================================================================
--- branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/lifecycle/PortletLifecycle.java	                        (rev 0)
+++ branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/lifecycle/PortletLifecycle.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,90 @@
+/**
+ * 
+ */
+package org.ajax4jsf.portlet.lifecycle;
+
+import javax.faces.FacesException;
+import javax.faces.context.FacesContext;
+import javax.faces.event.PhaseListener;
+import javax.faces.lifecycle.Lifecycle;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class PortletLifecycle {
+    
+    private Lifecycle _defaultLifecycle;
+
+    public PortletLifecycle(Lifecycle lifecycle) {
+	_defaultLifecycle = lifecycle;
+    }
+
+    /**
+     * @param listener
+     * @see javax.faces.lifecycle.Lifecycle#addPhaseListener(javax.faces.event.PhaseListener)
+     */
+    public void addPhaseListener(PhaseListener listener) {
+	_defaultLifecycle.addPhaseListener(listener);
+    }
+
+    /**
+     * @param obj
+     * @return
+     * @see java.lang.Object#equals(java.lang.Object)
+     */
+    public boolean equals(Object obj) {
+	return _defaultLifecycle.equals(obj);
+    }
+
+    /**
+     * @param context
+     * @throws FacesException
+     * @see javax.faces.lifecycle.Lifecycle#execute(javax.faces.context.FacesContext)
+     */
+    public void execute(FacesContext context) throws FacesException {
+	_defaultLifecycle.execute(context);
+    }
+
+    /**
+     * @return
+     * @see javax.faces.lifecycle.Lifecycle#getPhaseListeners()
+     */
+    public PhaseListener[] getPhaseListeners() {
+	return _defaultLifecycle.getPhaseListeners();
+    }
+
+    /**
+     * @return
+     * @see java.lang.Object#hashCode()
+     */
+    public int hashCode() {
+	return _defaultLifecycle.hashCode();
+    }
+
+    /**
+     * @param listener
+     * @see javax.faces.lifecycle.Lifecycle#removePhaseListener(javax.faces.event.PhaseListener)
+     */
+    public void removePhaseListener(PhaseListener listener) {
+	_defaultLifecycle.removePhaseListener(listener);
+    }
+
+    /**
+     * @param context
+     * @throws FacesException
+     * @see javax.faces.lifecycle.Lifecycle#render(javax.faces.context.FacesContext)
+     */
+    public void render(FacesContext context) throws FacesException {
+	_defaultLifecycle.render(context);
+    }
+
+    /**
+     * @return
+     * @see java.lang.Object#toString()
+     */
+    public String toString() {
+	return _defaultLifecycle.toString();
+    }
+    
+}

Added: branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/lifecycle/PortletLifecycleFactory.java
===================================================================
--- branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/lifecycle/PortletLifecycleFactory.java	                        (rev 0)
+++ branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/lifecycle/PortletLifecycleFactory.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,83 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.portlet.lifecycle;
+
+import java.util.Iterator;
+
+import javax.faces.lifecycle.Lifecycle;
+import javax.faces.lifecycle.LifecycleFactory;
+
+/**
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:12 $
+ *
+ */
+public class PortletLifecycleFactory extends LifecycleFactory {
+	
+	private LifecycleFactory _defaultFactory;
+	
+	private PortletLifecycle _defaultLifecycle ;
+	
+//	private Map _lifecycles = new HashMap();
+
+	/**
+	 * @return the debugLifecycle
+	 */
+	private PortletLifecycle getDefaultLifecycle() {
+		if (_defaultLifecycle == null) {
+			_defaultLifecycle = new PortletLifecycle(_defaultFactory.getLifecycle(LifecycleFactory.DEFAULT_LIFECYCLE));			
+		}
+		return _defaultLifecycle;
+	}
+
+	/**
+	 * @param defaultFactory
+	 */
+	public PortletLifecycleFactory(LifecycleFactory defaultFactory) {
+		super();
+		this._defaultFactory = defaultFactory;
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.lifecycle.LifecycleFactory#addLifecycle(java.lang.String, javax.faces.lifecycle.Lifecycle)
+	 */
+	public void addLifecycle(String arg0, Lifecycle arg1) {
+		this._defaultFactory.addLifecycle(arg0, arg1);
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.lifecycle.LifecycleFactory#getLifecycle(java.lang.String)
+	 */
+	public Lifecycle getLifecycle(String lifecycleId) {
+		Lifecycle life;
+		life = this._defaultFactory.getLifecycle(lifecycleId);
+		return life;
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.lifecycle.LifecycleFactory#getLifecycleIds()
+	 */
+	public Iterator getLifecycleIds() {
+		return this._defaultFactory.getLifecycleIds();
+	}
+
+}

Added: branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/lifecycle/package.html
===================================================================
--- branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/lifecycle/package.html	                        (rev 0)
+++ branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/lifecycle/package.html	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,10 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Insert title here</title>
+</head>
+<body>
+
+</body>
+</html>
\ No newline at end of file

Added: branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/package.html
===================================================================
--- branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/package.html	                        (rev 0)
+++ branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/package.html	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,10 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Insert title here</title>
+</head>
+<body>
+
+</body>
+</html>
\ No newline at end of file

Added: branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/renderkit/package.html
===================================================================
--- branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/renderkit/package.html	                        (rev 0)
+++ branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/renderkit/package.html	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,10 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Insert title here</title>
+</head>
+<body>
+
+</body>
+</html>
\ No newline at end of file

Added: branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/renderkit/portlet/PortletAjaxViewRootRenderer.java
===================================================================
--- branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/renderkit/portlet/PortletAjaxViewRootRenderer.java	                        (rev 0)
+++ branches/refactor1/extensions/portlet/src/main/java/org/ajax4jsf/portlet/renderkit/portlet/PortletAjaxViewRootRenderer.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,47 @@
+/**
+ * 
+ */
+package org.ajax4jsf.portlet.renderkit.portlet;
+
+import java.io.IOException;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+import org.ajax4jsf.framework.ajax.AjaxContext;
+import org.ajax4jsf.framework.renderer.AjaxContainerRenderer;
+import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
+import org.ajax4jsf.framework.renderer.AjaxViewRootRenderer;
+import org.ajax4jsf.framework.renderer.RendererUtils.HTML;
+import org.ajax4jsf.portlet.context.AbstractExternalContext;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class PortletAjaxViewRootRenderer extends AjaxViewRootRenderer {
+    protected void doEncodeBegin(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
+        AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context);
+        Object namespace = context.getExternalContext().getRequestParameterMap().get(AbstractExternalContext.NAMESPACE_PARAMETER);
+        Object ajaxRequestParameter = context.getExternalContext().getRequestParameterMap().get(AjaxContainerRenderer.AJAX_PARAMETER_NAME);
+        if(!ajaxContext.isAjaxRequest() && null !=namespace && null != ajaxRequestParameter){
+            // Navigation case, encode portlet window marker
+            writer.startElement(HTML.DIV_ELEM, component);
+            writer.writeAttribute(HTML.id_ATTRIBUTE, namespace, HTML.id_ATTRIBUTE);
+        }
+        super.doEncodeBegin(writer, context, component);
+    }
+    
+    protected void doEncodeEnd(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
+        super.doEncodeEnd(writer, context, component);
+        AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context);
+        Object namespace = context.getExternalContext().getRequestParameterMap().get(AbstractExternalContext.NAMESPACE_PARAMETER);
+        Object ajaxRequestParameter = context.getExternalContext().getRequestParameterMap().get(AjaxContainerRenderer.AJAX_PARAMETER_NAME);
+        if(!ajaxContext.isAjaxRequest() && null !=namespace && null != ajaxRequestParameter){
+            // Navigation case, encode portlet window marker
+            writer.endElement(HTML.DIV_ELEM);
+            ajaxContext.setAjaxRequest(true);
+            ajaxContext.addRenderedArea(namespace.toString());
+            AjaxRendererUtils.encodeAreas(context, component);            
+        }
+    }
+}

Added: branches/refactor1/extensions/portlet/src/main/resources/META-INF/faces-config.xml
===================================================================
--- branches/refactor1/extensions/portlet/src/main/resources/META-INF/faces-config.xml	                        (rev 0)
+++ branches/refactor1/extensions/portlet/src/main/resources/META-INF/faces-config.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
+                              "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
+
+<faces-config>
+    <application>
+        
+    </application>
+    <factory>
+       <faces-context-factory>org.ajax4jsf.portlet.context.FacesContextFactoryImpl</faces-context-factory>
+    </factory>
+
+ <managed-bean>
+  <managed-bean-name>ajaxContext</managed-bean-name>
+  <managed-bean-class>org.ajax4jsf.portlet.PortletAjaxContext</managed-bean-class>
+  <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+
+  <render-kit>
+    
+    <renderer>
+      <description>
+        override the viewroot
+      </description>
+      <component-family>javax.faces.ViewRoot</component-family>
+      <renderer-type>javax.faces.ViewRoot</renderer-type>
+      <renderer-class>org.ajax4jsf.portlet.renderkit.portlet.PortletAjaxViewRootRenderer</renderer-class>
+    </renderer>
+  </render-kit>
+    
+</faces-config>

Added: branches/refactor1/extensions/portlet/src/main/resources/META-INF/faces-config.xml.l4t
===================================================================
--- branches/refactor1/extensions/portlet/src/main/resources/META-INF/faces-config.xml.l4t	                        (rev 0)
+++ branches/refactor1/extensions/portlet/src/main/resources/META-INF/faces-config.xml.l4t	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<PROCESS ENTITY="JSFProcess"/>

Added: branches/refactor1/extensions/portlet/src/test/java/org/ajax4jsf/PortletTest.java
===================================================================
--- branches/refactor1/extensions/portlet/src/test/java/org/ajax4jsf/PortletTest.java	                        (rev 0)
+++ branches/refactor1/extensions/portlet/src/test/java/org/ajax4jsf/PortletTest.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,52 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+/**
+ * Unit test for simple App.
+ */
+public class PortletTest 
+    extends TestCase
+{
+    /**
+     * Create the test case
+     *
+     * @param testName name of the test case
+     */
+    public PortletTest( String testName )
+    {
+        super( testName );
+    }
+
+
+    /**
+     * Rigourous Test :-)
+     */
+    public void testApp()
+    {
+        assertTrue( true );
+    }
+}

Added: branches/refactor1/extensions/portlet/src/test/java/org/ajax4jsf/portlet/AbstractAjax4jsfPortletTestCase.java
===================================================================
--- branches/refactor1/extensions/portlet/src/test/java/org/ajax4jsf/portlet/AbstractAjax4jsfPortletTestCase.java	                        (rev 0)
+++ branches/refactor1/extensions/portlet/src/test/java/org/ajax4jsf/portlet/AbstractAjax4jsfPortletTestCase.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,59 @@
+/**
+ * 
+ */
+package org.ajax4jsf.portlet;
+
+import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class AbstractAjax4jsfPortletTestCase extends AbstractAjax4JsfTestCase {
+
+    protected MockActionRequest actionRequest;
+    protected MockActionResponse actionResponse;
+    protected MockPortletContext portletContext;
+    protected MockRenderRequest renderRequest;
+    protected MockRenderResponse renderResponse;
+
+    public AbstractAjax4jsfPortletTestCase(String name) {
+	super(name);
+    }
+    
+    public void setUp() throws Exception {
+        super.setUp();
+    }
+    
+    public void tearDown() throws Exception {
+        super.tearDown();
+        actionRequest = null;
+        actionResponse = null;
+        renderRequest = null;
+        renderResponse = null;
+        portletContext = null;
+    }
+
+    /**
+     * 
+     */
+    protected void setupActionRequest() {
+        actionRequest = new MockActionRequest();
+	actionResponse = new MockActionResponse();
+	portletContext = new MockPortletContext();
+	externalContext.setRequest(actionRequest);
+        externalContext.setResponse(actionResponse);
+    }
+
+    /**
+     * 
+     */
+    protected void setupRenderRequest() {
+        renderRequest = new MockRenderRequest();
+	renderResponse = new MockRenderResponse();
+	portletContext = new MockPortletContext();
+	externalContext.setRequest(renderRequest);
+        externalContext.setResponse(renderResponse);
+    }
+
+}

Added: branches/refactor1/extensions/portlet/src/test/java/org/ajax4jsf/portlet/MockActionRequest.java
===================================================================
--- branches/refactor1/extensions/portlet/src/test/java/org/ajax4jsf/portlet/MockActionRequest.java	                        (rev 0)
+++ branches/refactor1/extensions/portlet/src/test/java/org/ajax4jsf/portlet/MockActionRequest.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,64 @@
+/**
+ * 
+ */
+package org.ajax4jsf.portlet;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.UnsupportedEncodingException;
+import javax.portlet.ActionRequest;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class MockActionRequest extends MockPortletRequest implements
+	ActionRequest {
+    /* (non-Javadoc)
+     * @see javax.portlet.ActionRequest#getCharacterEncoding()
+     */
+    public String getCharacterEncoding() {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.ActionRequest#getContentLength()
+     */
+    public int getContentLength() {
+	// TODO Auto-generated method stub
+	return 0;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.ActionRequest#getContentType()
+     */
+    public String getContentType() {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.ActionRequest#getPortletInputStream()
+     */
+    public InputStream getPortletInputStream() throws IOException {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.ActionRequest#getReader()
+     */
+    public BufferedReader getReader() {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.ActionRequest#setCharacterEncoding(java.lang.String)
+     */
+    public void setCharacterEncoding(String arg0) {
+	// TODO Auto-generated method stub
+    }
+}

Added: branches/refactor1/extensions/portlet/src/test/java/org/ajax4jsf/portlet/MockActionResponse.java
===================================================================
--- branches/refactor1/extensions/portlet/src/test/java/org/ajax4jsf/portlet/MockActionResponse.java	                        (rev 0)
+++ branches/refactor1/extensions/portlet/src/test/java/org/ajax4jsf/portlet/MockActionResponse.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,61 @@
+/**
+ * 
+ */
+package org.ajax4jsf.portlet;
+
+import java.io.IOException;
+import java.util.Map;
+import javax.portlet.ActionResponse;
+import javax.portlet.PortletMode;
+import javax.portlet.PortletModeException;
+import javax.portlet.WindowState;
+import javax.portlet.WindowStateException;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class MockActionResponse extends MockPortletResponse implements
+	ActionResponse {
+    /* (non-Javadoc)
+     * @see javax.portlet.ActionResponse#sendRedirect(java.lang.String)
+     */
+    public void sendRedirect(String arg0) {
+	// TODO Auto-generated method stub
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.ActionResponse#setPortletMode(javax.portlet.PortletMode)
+     */
+    public void setPortletMode(PortletMode arg0) throws PortletModeException {
+	// TODO Auto-generated method stub
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.ActionResponse#setRenderParameter(java.lang.String, java.lang.String)
+     */
+    public void setRenderParameter(String arg0, String arg1) {
+	// TODO Auto-generated method stub
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.ActionResponse#setRenderParameter(java.lang.String, java.lang.String[])
+     */
+    public void setRenderParameter(String arg0, String[] arg1) {
+	// TODO Auto-generated method stub
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.ActionResponse#setRenderParameters(java.util.Map)
+     */
+    public void setRenderParameters(Map arg0) {
+	// TODO Auto-generated method stub
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.ActionResponse#setWindowState(javax.portlet.WindowState)
+     */
+    public void setWindowState(WindowState arg0) throws WindowStateException {
+	// TODO Auto-generated method stub
+    }
+}

Added: branches/refactor1/extensions/portlet/src/test/java/org/ajax4jsf/portlet/MockPortletContext.java
===================================================================
--- branches/refactor1/extensions/portlet/src/test/java/org/ajax4jsf/portlet/MockPortletContext.java	                        (rev 0)
+++ branches/refactor1/extensions/portlet/src/test/java/org/ajax4jsf/portlet/MockPortletContext.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,171 @@
+/**
+ * 
+ */
+package org.ajax4jsf.portlet;
+
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.Set;
+import javax.portlet.PortletContext;
+import javax.portlet.PortletRequestDispatcher;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class MockPortletContext implements PortletContext {
+    public static final String PORTLET_INIT_VALUE = "portlet_init_value";
+    public static final String INIT_PARAMETER = "init_parameter";
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletContext#getAttribute(java.lang.String)
+     */
+    public Object getAttribute(String arg0) {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletContext#getAttributeNames()
+     */
+    public Enumeration getAttributeNames() {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletContext#getInitParameter(java.lang.String)
+     */
+    public String getInitParameter(String arg0) {
+	if (INIT_PARAMETER.equals(arg0)) {
+	    return PORTLET_INIT_VALUE;
+	}
+	return null;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletContext#getInitParameterNames()
+     */
+    public Enumeration getInitParameterNames() {
+	return Collections.enumeration(Collections.singleton(INIT_PARAMETER));
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletContext#getMajorVersion()
+     */
+    public int getMajorVersion() {
+	// TODO Auto-generated method stub
+	return 0;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletContext#getMimeType(java.lang.String)
+     */
+    public String getMimeType(String arg0) {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletContext#getMinorVersion()
+     */
+    public int getMinorVersion() {
+	// TODO Auto-generated method stub
+	return 0;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletContext#getNamedDispatcher(java.lang.String)
+     */
+    public PortletRequestDispatcher getNamedDispatcher(String arg0) {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletContext#getPortletContextName()
+     */
+    public String getPortletContextName() {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletContext#getRealPath(java.lang.String)
+     */
+    public String getRealPath(String arg0) {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletContext#getRequestDispatcher(java.lang.String)
+     */
+    public PortletRequestDispatcher getRequestDispatcher(String arg0) {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletContext#getResource(java.lang.String)
+     */
+    public URL getResource(String arg0) throws MalformedURLException {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletContext#getResourceAsStream(java.lang.String)
+     */
+    public InputStream getResourceAsStream(String arg0) {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletContext#getResourcePaths(java.lang.String)
+     */
+    public Set getResourcePaths(String arg0) {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletContext#getServerInfo()
+     */
+    public String getServerInfo() {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletContext#log(java.lang.String)
+     */
+    public void log(String arg0) {
+	// TODO Auto-generated method stub
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletContext#log(java.lang.String, java.lang.Throwable)
+     */
+    public void log(String arg0, Throwable arg1) {
+	// TODO Auto-generated method stub
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletContext#removeAttribute(java.lang.String)
+     */
+    public void removeAttribute(String arg0) {
+	// TODO Auto-generated method stub
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletContext#setAttribute(java.lang.String, java.lang.Object)
+     */
+    public void setAttribute(String arg0, Object arg1) {
+	// TODO Auto-generated method stub
+    }
+}

Added: branches/refactor1/extensions/portlet/src/test/java/org/ajax4jsf/portlet/MockPortletRequest.java
===================================================================
--- branches/refactor1/extensions/portlet/src/test/java/org/ajax4jsf/portlet/MockPortletRequest.java	                        (rev 0)
+++ branches/refactor1/extensions/portlet/src/test/java/org/ajax4jsf/portlet/MockPortletRequest.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,307 @@
+/**
+ * 
+ */
+package org.ajax4jsf.portlet;
+
+import java.security.Principal;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Locale;
+import java.util.Map;
+import javax.portlet.PortalContext;
+import javax.portlet.PortletMode;
+import javax.portlet.PortletPreferences;
+import javax.portlet.PortletRequest;
+import javax.portlet.PortletSession;
+import javax.portlet.WindowState;
+
+import org.apache.shale.test.mock.MockHttpServletRequest;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class MockPortletRequest extends MockHttpServletRequest implements PortletRequest {
+    
+    public static final String PARAMETER_VALUE2 = "value2";
+    public static final String PARAMETER_VALUE1 = "value1";
+    public static final String PARAMETER = "parameter";
+    public Map parameters = new HashMap();
+    
+    public MockPortletRequest() {
+	parameters.put(PARAMETER, new String[]{PARAMETER_VALUE1,PARAMETER_VALUE2});
+    }
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletRequest#getAttribute(java.lang.String)
+     */
+    public Object getAttribute(String arg0) {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletRequest#getAttributeNames()
+     */
+    public Enumeration getAttributeNames() {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletRequest#getAuthType()
+     */
+    public String getAuthType() {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletRequest#getContextPath()
+     */
+    public String getContextPath() {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletRequest#getLocale()
+     */
+    public Locale getLocale() {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletRequest#getLocales()
+     */
+    public Enumeration getLocales() {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletRequest#getParameter(java.lang.String)
+     */
+    public String getParameter(String name) {
+	String result = null;
+	String[] vals = (String[]) parameters.get(name);
+	if(null != vals){
+	    result = vals[0];
+	}
+	return result;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletRequest#getParameterMap()
+     */
+    public Map getParameterMap() {
+	return parameters;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletRequest#getParameterNames()
+     */
+    public Enumeration getParameterNames() {
+	return Collections.enumeration(Collections.singleton(PARAMETER));
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletRequest#getParameterValues(java.lang.String)
+     */
+    public String[] getParameterValues(String arg0) {
+	return (String[]) parameters.get(arg0);
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletRequest#getPortalContext()
+     */
+    public PortalContext getPortalContext() {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletRequest#getPortletMode()
+     */
+    public PortletMode getPortletMode() {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletRequest#getPortletSession()
+     */
+    public PortletSession getPortletSession() {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletRequest#getPortletSession(boolean)
+     */
+    public PortletSession getPortletSession(boolean arg0) {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletRequest#getPreferences()
+     */
+    public PortletPreferences getPreferences() {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletRequest#getProperties(java.lang.String)
+     */
+    public Enumeration getProperties(String arg0) {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletRequest#getProperty(java.lang.String)
+     */
+    public String getProperty(String arg0) {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletRequest#getPropertyNames()
+     */
+    public Enumeration getPropertyNames() {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletRequest#getRemoteUser()
+     */
+    public String getRemoteUser() {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletRequest#getRequestedSessionId()
+     */
+    public String getRequestedSessionId() {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletRequest#getResponseContentType()
+     */
+    public String getResponseContentType() {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletRequest#getResponseContentTypes()
+     */
+    public Enumeration getResponseContentTypes() {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletRequest#getScheme()
+     */
+    public String getScheme() {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletRequest#getServerName()
+     */
+    public String getServerName() {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletRequest#getServerPort()
+     */
+    public int getServerPort() {
+	// TODO Auto-generated method stub
+	return 0;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletRequest#getUserPrincipal()
+     */
+    public Principal getUserPrincipal() {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletRequest#getWindowState()
+     */
+    public WindowState getWindowState() {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletRequest#isPortletModeAllowed(javax.portlet.PortletMode)
+     */
+    public boolean isPortletModeAllowed(PortletMode arg0) {
+	// TODO Auto-generated method stub
+	return false;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletRequest#isRequestedSessionIdValid()
+     */
+    public boolean isRequestedSessionIdValid() {
+	// TODO Auto-generated method stub
+	return false;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletRequest#isSecure()
+     */
+    public boolean isSecure() {
+	// TODO Auto-generated method stub
+	return false;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletRequest#isUserInRole(java.lang.String)
+     */
+    public boolean isUserInRole(String arg0) {
+	// TODO Auto-generated method stub
+	return false;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletRequest#isWindowStateAllowed(javax.portlet.WindowState)
+     */
+    public boolean isWindowStateAllowed(WindowState arg0) {
+	// TODO Auto-generated method stub
+	return false;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletRequest#removeAttribute(java.lang.String)
+     */
+    public void removeAttribute(String arg0) {
+	// TODO Auto-generated method stub
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletRequest#setAttribute(java.lang.String, java.lang.Object)
+     */
+    public void setAttribute(String arg0, Object arg1) {
+	// TODO Auto-generated method stub
+    }
+}

Added: branches/refactor1/extensions/portlet/src/test/java/org/ajax4jsf/portlet/MockPortletResponse.java
===================================================================
--- branches/refactor1/extensions/portlet/src/test/java/org/ajax4jsf/portlet/MockPortletResponse.java	                        (rev 0)
+++ branches/refactor1/extensions/portlet/src/test/java/org/ajax4jsf/portlet/MockPortletResponse.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,36 @@
+/**
+ * 
+ */
+package org.ajax4jsf.portlet;
+
+import javax.portlet.PortletResponse;
+
+import org.apache.shale.test.mock.MockHttpServletResponse;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class MockPortletResponse extends MockHttpServletResponse implements PortletResponse {
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletResponse#addProperty(java.lang.String, java.lang.String)
+     */
+    public void addProperty(String arg0, String arg1) {
+	// TODO Auto-generated method stub
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletResponse#encodeURL(java.lang.String)
+     */
+    public String encodeURL(String arg0) {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.PortletResponse#setProperty(java.lang.String, java.lang.String)
+     */
+    public void setProperty(String arg0, String arg1) {
+	// TODO Auto-generated method stub
+    }
+}

Added: branches/refactor1/extensions/portlet/src/test/java/org/ajax4jsf/portlet/MockRenderRequest.java
===================================================================
--- branches/refactor1/extensions/portlet/src/test/java/org/ajax4jsf/portlet/MockRenderRequest.java	                        (rev 0)
+++ branches/refactor1/extensions/portlet/src/test/java/org/ajax4jsf/portlet/MockRenderRequest.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,14 @@
+/**
+ * 
+ */
+package org.ajax4jsf.portlet;
+
+import javax.portlet.RenderRequest;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class MockRenderRequest extends MockPortletRequest implements
+	RenderRequest {
+}

Added: branches/refactor1/extensions/portlet/src/test/java/org/ajax4jsf/portlet/MockRenderResponse.java
===================================================================
--- branches/refactor1/extensions/portlet/src/test/java/org/ajax4jsf/portlet/MockRenderResponse.java	                        (rev 0)
+++ branches/refactor1/extensions/portlet/src/test/java/org/ajax4jsf/portlet/MockRenderResponse.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,140 @@
+/**
+ * 
+ */
+package org.ajax4jsf.portlet;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.PrintWriter;
+import java.util.Locale;
+import javax.portlet.PortletURL;
+import javax.portlet.RenderResponse;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class MockRenderResponse extends MockPortletResponse implements
+	RenderResponse {
+    /* (non-Javadoc)
+     * @see javax.portlet.RenderResponse#createActionURL()
+     */
+    public PortletURL createActionURL() {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.RenderResponse#createRenderURL()
+     */
+    public PortletURL createRenderURL() {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.RenderResponse#flushBuffer()
+     */
+    public void flushBuffer() {
+	// TODO Auto-generated method stub
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.RenderResponse#getBufferSize()
+     */
+    public int getBufferSize() {
+	// TODO Auto-generated method stub
+	return 0;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.RenderResponse#getCharacterEncoding()
+     */
+    public String getCharacterEncoding() {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.RenderResponse#getContentType()
+     */
+    public String getContentType() {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.RenderResponse#getLocale()
+     */
+    public Locale getLocale() {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.RenderResponse#getNamespace()
+     */
+    public String getNamespace() {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.RenderResponse#getPortletOutputStream()
+     */
+    public OutputStream getPortletOutputStream() throws IOException {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.RenderResponse#getWriter()
+     */
+    public PrintWriter getWriter() throws IOException {
+	// TODO Auto-generated method stub
+	return null;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.RenderResponse#isCommitted()
+     */
+    public boolean isCommitted() {
+	// TODO Auto-generated method stub
+	return false;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.RenderResponse#reset()
+     */
+    public void reset() {
+	// TODO Auto-generated method stub
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.RenderResponse#resetBuffer()
+     */
+    public void resetBuffer() {
+	// TODO Auto-generated method stub
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.RenderResponse#setBufferSize(int)
+     */
+    public void setBufferSize(int arg0) {
+	// TODO Auto-generated method stub
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.RenderResponse#setContentType(java.lang.String)
+     */
+    public void setContentType(String arg0) {
+	// TODO Auto-generated method stub
+    }
+
+    /* (non-Javadoc)
+     * @see javax.portlet.RenderResponse#setTitle(java.lang.String)
+     */
+    public void setTitle(String arg0) {
+	// TODO Auto-generated method stub
+    }
+}

Added: branches/refactor1/extensions/portlet/src/test/java/org/ajax4jsf/portlet/application/ComponensLoaderTestCase.java
===================================================================
--- branches/refactor1/extensions/portlet/src/test/java/org/ajax4jsf/portlet/application/ComponensLoaderTestCase.java	                        (rev 0)
+++ branches/refactor1/extensions/portlet/src/test/java/org/ajax4jsf/portlet/application/ComponensLoaderTestCase.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,39 @@
+package org.ajax4jsf.portlet.application;
+
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIInput;
+import javax.faces.component.UIOutput;
+
+import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
+
+public class ComponensLoaderTestCase extends AbstractAjax4JsfTestCase {
+    
+    ComponentsLoaderImpl loader;
+
+    public ComponensLoaderTestCase(String name) {
+	super(name);
+    }
+
+    public void setUp() throws Exception {
+	super.setUp();
+	loader = new ComponentsLoaderImpl();
+    }
+
+    public void tearDown() throws Exception {
+	super.tearDown();
+	loader = null;
+    }
+
+    public final void testCreateComponent() {
+	UIComponent component = loader.createComponent(UIInput.class.getName());	
+	assertSame(UIInput.class, component.getClass());
+	UIComponent component1 = loader.createComponent(UIOutput.class.getName());	
+	assertSame(UIOutput.class, component1.getClass());
+    }
+
+    public final void testTransform() {
+	Object inputClass = loader.transform(UIInput.class.getName());
+	assertSame(UIInput.class, inputClass);
+    }
+
+}

Added: branches/refactor1/extensions/portlet/src/test/java/org/ajax4jsf/portlet/application/PortletViewStateTestCase.java
===================================================================
--- branches/refactor1/extensions/portlet/src/test/java/org/ajax4jsf/portlet/application/PortletViewStateTestCase.java	                        (rev 0)
+++ branches/refactor1/extensions/portlet/src/test/java/org/ajax4jsf/portlet/application/PortletViewStateTestCase.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,89 @@
+package org.ajax4jsf.portlet.application;
+
+import java.util.List;
+import java.util.Map;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.application.FacesMessage.Severity;
+import javax.faces.component.UIInput;
+import javax.faces.component.UIOutput;
+import javax.faces.component.UIViewRoot;
+
+import org.ajax4jsf.portlet.AbstractAjax4jsfPortletTestCase;
+import org.ajax4jsf.portlet.application.PortletViewState.TreeStrutureNode;
+
+import junit.framework.TestCase;
+
+public class PortletViewStateTestCase extends AbstractAjax4jsfPortletTestCase {
+
+    ComponentsLoaderImpl loader;
+    private UIInput input;
+    private UIOutput output;
+    
+    public PortletViewStateTestCase(String name) {
+	super(name);
+    }
+
+    public void setUp() throws Exception {
+	super.setUp();
+    }
+
+    public void tearDown() throws Exception {
+	super.tearDown();
+    }
+
+    public final void testSave() {
+	setupActionRequest();
+	setupTree();
+	PortletViewState state = new PortletViewState();
+	state.save(facesContext);
+	assertNotNull(state.getComponentsState());
+	Object treeStructure = state.getTreeStructure();
+	assertTrue(treeStructure instanceof TreeStrutureNode);
+    }
+
+    /**
+     * 
+     */
+    private void setupTree() {
+	input = new UIInput();
+	input.setId("in");
+	UIViewRoot viewRoot = facesContext.getViewRoot();
+	viewRoot.getChildren().add(input);
+	output = new UIOutput();
+	output.setId("out");
+	viewRoot.getFacets().put("facet",output);
+    }
+
+    public final void testSaveMessages() {
+	setupActionRequest();
+	setupTree();
+	String clientId = input.getClientId(facesContext);
+	FacesMessage facesMessage = new FacesMessage(FacesMessage.SEVERITY_ERROR,"msg","detail");
+	facesContext.addMessage(clientId, facesMessage);
+	PortletViewState state = new PortletViewState();
+	state.saveMessages(facesContext);
+	Map messages = state.getMessages();
+	assertEquals(1, messages.size());
+	List list = (List)messages.get(clientId);
+	assertEquals(1, list.size());
+	assertSame(facesMessage, list.get(0));
+    }
+
+    public final void testRestore() {
+	// TODO - implement test
+    }
+
+    public final void testRestoreMessages() {
+	// TODO - implement test
+    }
+
+    public final void testGetComponentsState() {
+	// TODO - implement test
+    }
+
+    public final void testGetTreeStructure() {
+	// TODO - implement test
+    }
+
+}

Added: branches/refactor1/extensions/portlet/src/test/java/org/ajax4jsf/portlet/context/ContextAttributesMapTest.java
===================================================================
--- branches/refactor1/extensions/portlet/src/test/java/org/ajax4jsf/portlet/context/ContextAttributesMapTest.java	                        (rev 0)
+++ branches/refactor1/extensions/portlet/src/test/java/org/ajax4jsf/portlet/context/ContextAttributesMapTest.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,100 @@
+/**
+ * 
+ */
+package org.ajax4jsf.portlet.context;
+
+import java.util.HashMap;
+import java.util.Map;
+import junit.framework.TestCase;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class ContextAttributesMapTest extends TestCase {
+    
+    private Map backend = new HashMap();
+    /**
+     * @param name
+     */
+    public ContextAttributesMapTest(String name) {
+	super(name);
+    }
+
+    /* (non-Javadoc)
+     * @see junit.framework.TestCase#setUp()
+     */
+    protected void setUp() throws Exception {
+	super.setUp();
+    }
+
+    /* (non-Javadoc)
+     * @see junit.framework.TestCase#tearDown()
+     */
+    protected void tearDown() throws Exception {
+	super.tearDown();
+    }
+
+    /**
+     * Test method for {@link org.ajax4jsf.portlet.context.ContextAttributesMap#remove(java.lang.Object)}.
+     */
+    public final void testRemoveObject() {
+	// fail("Not yet implemented");
+    }
+
+    /**
+     * Test method for {@link org.ajax4jsf.portlet.context.ContextAttributesMap#get(java.lang.Object)}.
+     */
+    public final void testGetObject() {
+	// fail("Not yet implemented");
+    }
+
+    /**
+     * Test method for {@link org.ajax4jsf.portlet.context.ContextAttributesMap#put(java.lang.Object, java.lang.Object)}.
+     */
+    public final void testPutObjectObject() {
+	// fail("Not yet implemented");
+    }
+
+    /**
+     * Test method for {@link org.ajax4jsf.portlet.context.ContextMap#clear()}.
+     */
+    public final void testClear() {
+	// fail("Not yet implemented");
+    }
+
+    /**
+     * Test method for {@link org.ajax4jsf.portlet.context.ContextMap#entrySet()}.
+     */
+    public final void testEntrySet() {
+	// fail("Not yet implemented");
+    }
+
+    /**
+     * Test method for {@link org.ajax4jsf.portlet.context.ContextMap#keySet()}.
+     */
+    public final void testKeySet() {
+	// fail("Not yet implemented");
+    }
+
+    /**
+     * Test method for {@link org.ajax4jsf.portlet.context.ContextMap#values()}.
+     */
+    public final void testValues() {
+	// fail("Not yet implemented");
+    }
+
+    /**
+     * Test method for {@link java.util.AbstractMap#containsValue(java.lang.Object)}.
+     */
+    public final void testContainsValue() {
+	// fail("Not yet implemented");
+    }
+
+    /**
+     * Test method for {@link java.util.AbstractMap#containsKey(java.lang.Object)}.
+     */
+    public final void testContainsKey() {
+	// fail("Not yet implemented");
+    }
+}

Added: branches/refactor1/extensions/portlet/src/test/java/org/ajax4jsf/portlet/context/ContextFactoryTest.java
===================================================================
--- branches/refactor1/extensions/portlet/src/test/java/org/ajax4jsf/portlet/context/ContextFactoryTest.java	                        (rev 0)
+++ branches/refactor1/extensions/portlet/src/test/java/org/ajax4jsf/portlet/context/ContextFactoryTest.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,89 @@
+/**
+ * 
+ */
+package org.ajax4jsf.portlet.context;
+
+import javax.faces.FacesException;
+import javax.faces.context.FacesContext;
+import javax.faces.context.FacesContextFactory;
+import org.ajax4jsf.portlet.MockActionRequest;
+import org.ajax4jsf.portlet.MockActionResponse;
+import org.ajax4jsf.portlet.MockPortletContext;
+import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
+import junit.framework.TestCase;
+
+/**
+ * @author asmirnov
+ * 
+ */
+public class ContextFactoryTest extends AbstractAjax4JsfTestCase {
+    /**
+         * @param arg0
+         */
+    public ContextFactoryTest(String arg0) {
+	super(arg0);
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see junit.framework.TestCase#setUp()
+         */
+    public void setUp() throws Exception {
+	super.setUp();
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see junit.framework.TestCase#tearDown()
+         */
+    public void tearDown() throws Exception {
+	super.tearDown();
+    }
+
+    /**
+         * Test method for
+         * {@link org.ajax4jsf.portlet.context.FacesContextFactoryImpl#FacesContextFactoryImpl(javax.faces.context.FacesContextFactory)}.
+         */
+    public void testFacesContextFactoryImpl() {
+	FacesContextFactoryImpl factory = new FacesContextFactoryImpl();
+	FacesContext context = factory.getFacesContext(servletContext, request,
+		response, lifecycle);
+	assertTrue((context instanceof FacesContextImpl));
+	assertTrue((context.getExternalContext() instanceof ServletContextImpl));
+    }
+
+    /**
+         * Test method for
+         * {@link org.ajax4jsf.portlet.context.FacesContextFactoryImpl#getFacesContext(java.lang.Object, java.lang.Object, java.lang.Object, javax.faces.lifecycle.Lifecycle)}.
+         */
+    public void testGetFacesContextPortlet() {
+	FacesContextFactoryImpl factory = new FacesContextFactoryImpl();
+	MockPortletContext portletContext = new MockPortletContext();
+	MockActionRequest portletRequest = new MockActionRequest();
+	MockActionResponse portletResponse = new MockActionResponse();
+	FacesContext context = factory.getFacesContext(portletContext,
+		portletRequest, portletResponse, lifecycle);
+	assertTrue((context instanceof FacesContextImpl));
+	assertTrue((context.getExternalContext() instanceof PortletContextImpl));
+	assertSame(FacesContext.getCurrentInstance(),context);
+    }
+
+    public void testIllegalEnvironment() throws Exception {
+	FacesContextFactoryImpl factory = new FacesContextFactoryImpl();
+	try {
+	    FacesContext context = factory.getFacesContext(null, request,
+		    response, lifecycle);
+	    assertTrue("null pointer passed", false);
+	} catch (NullPointerException e) {
+	}
+	try {
+	    FacesContext context = factory.getFacesContext(facesContext,
+		    request, response, lifecycle);
+	    assertTrue("illegal context passed", false);
+	} catch (FacesException e) {
+	    // TODO: handle exception
+	}
+    }
+}

Added: branches/refactor1/extensions/portlet/src/test/java/org/ajax4jsf/portlet/context/FacesContextImplTest.java
===================================================================
--- branches/refactor1/extensions/portlet/src/test/java/org/ajax4jsf/portlet/context/FacesContextImplTest.java	                        (rev 0)
+++ branches/refactor1/extensions/portlet/src/test/java/org/ajax4jsf/portlet/context/FacesContextImplTest.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,154 @@
+/**
+ * 
+ */
+package org.ajax4jsf.portlet.context;
+
+import java.util.Iterator;
+import javax.el.ELContext;
+import javax.faces.application.FacesMessage;
+import javax.faces.application.FacesMessage.Severity;
+import javax.faces.context.FacesContext;
+import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class FacesContextImplTest extends AbstractAjax4JsfTestCase {
+    private static final String ID0 = "_id0";
+    protected FacesContextImpl portalFacesContext;
+    protected ServletContextImpl servletContextImpl;
+
+    /**
+     * @param arg0
+     */
+    public FacesContextImplTest(String arg0) {
+	super(arg0);
+    }
+
+    /* (non-Javadoc)
+     * @see org.ajax4jsf.tests.AbstractAjax4JsfTestCase#setUp()
+     */
+    public void setUp() throws Exception {
+	super.setUp();
+	servletContextImpl = new ServletContextImpl(servletContext,request,response);
+	portalFacesContext = new FacesContextImpl(servletContextImpl,lifecycle);
+	
+    }
+
+    /* (non-Javadoc)
+     * @see org.ajax4jsf.tests.AbstractAjax4JsfTestCase#tearDown()
+     */
+    public void tearDown() throws Exception {
+	super.tearDown();
+//	portalFacesContext.release();
+	servletContextImpl = null;
+	portalFacesContext = null;
+    }
+
+    /**
+     * Test method for {@link org.ajax4jsf.portlet.context.FacesContextImpl#release()}.
+     */
+    public void testRelease() {
+	portalFacesContext.release();
+	assertNull(FacesContext.getCurrentInstance());
+	try {
+	    portalFacesContext.getLifecycle();
+	    fail("Context not released");
+	} catch (Exception e) {
+	}
+    }
+
+    /**
+     * Test method for {@link org.ajax4jsf.portlet.context.FacesContextImpl#renderResponse()}.
+     */
+    public void testRenderResponse() {
+	assertFalse(portalFacesContext.getRenderResponse());
+	portalFacesContext.renderResponse();
+	assertTrue(portalFacesContext.getRenderResponse());
+    }
+
+    /**
+     * Test method for {@link org.ajax4jsf.portlet.context.FacesContextImpl#responseComplete()}.
+     */
+    public void testResponseComplete() {
+	assertFalse(portalFacesContext.getResponseComplete());
+	portalFacesContext.responseComplete();
+	assertTrue(portalFacesContext.getResponseComplete());
+    }
+
+    /**
+     * Test method for {@link org.ajax4jsf.portlet.context.FacesContextImpl#getELContext()}.
+     */
+    public void testGetELContext() {
+	ELContext elContext = portalFacesContext.getELContext();
+	assertSame(application.getELResolver(),elContext.getELResolver());
+	assertSame(elContext,portalFacesContext.getELContext());
+    }
+
+    /**
+     * Test method for {@link org.ajax4jsf.portlet.context.FacesContextImpl#getApplication()}.
+     */
+    public void testGetApplication() {
+	assertSame(application,portalFacesContext.getApplication());
+    }
+
+    /**
+     * Test method for {@link org.ajax4jsf.portlet.context.FacesContextImpl#getClientIdsWithMessages()}.
+     */
+    public void testGetClientIdsWithMessages() {
+	portalFacesContext.addMessage(ID0, new FacesMessage());
+	Iterator clientIdsWithMessages = portalFacesContext.getClientIdsWithMessages();
+	assertTrue(clientIdsWithMessages.hasNext());
+	assertEquals(ID0, clientIdsWithMessages.next());
+	assertFalse(clientIdsWithMessages.hasNext());	
+    }
+
+    /**
+     * Test method for {@link org.ajax4jsf.portlet.context.FacesContextImpl#getMaximumSeverity()}.
+     */
+    public void testGetMaximumSeverity() {
+	assertNull(portalFacesContext.getMaximumSeverity());
+	portalFacesContext.addMessage(ID0, new FacesMessage());
+	Severity maximumSeverity = portalFacesContext.getMaximumSeverity();
+	assertEquals(0,maximumSeverity.compareTo(FacesMessage.SEVERITY_INFO));
+	portalFacesContext.addMessage("_id1", new FacesMessage(FacesMessage.SEVERITY_ERROR,"error","error detail"));
+	maximumSeverity = portalFacesContext.getMaximumSeverity();
+	assertEquals(0,maximumSeverity.compareTo(FacesMessage.SEVERITY_ERROR));
+    }
+
+    /**
+     * Test method for {@link org.ajax4jsf.portlet.context.FacesContextImpl#getMessages()}.
+     */
+    public void testGetMessages() {
+	FacesMessage facesMessage = new FacesMessage();
+	portalFacesContext.addMessage(ID0, facesMessage);
+	Iterator messages = portalFacesContext.getMessages();
+	assertTrue(messages.hasNext());
+	assertSame(facesMessage, messages.next());
+	assertFalse(messages.hasNext());	
+    }
+
+    /**
+     * Test method for {@link org.ajax4jsf.portlet.context.FacesContextImpl#getMessages(java.lang.String)}.
+     */
+    public void testGetMessagesString() {
+	FacesMessage facesMessage = new FacesMessage();
+	portalFacesContext.addMessage(ID0, facesMessage);
+	portalFacesContext.addMessage("_id1", new FacesMessage());
+	Iterator messages = portalFacesContext.getMessages(ID0);
+	assertTrue(messages.hasNext());
+	assertSame(facesMessage, messages.next());
+	assertFalse(messages.hasNext());	
+    }
+
+    /**
+     * Test method for {@link org.ajax4jsf.portlet.context.FacesContextImpl#getRenderKit()}.
+     */
+    public void testGetRenderKit() {
+	portalFacesContext.setViewRoot(null);
+	assertNull(portalFacesContext.getRenderKit());
+	portalFacesContext.setViewRoot(facesContext.getViewRoot());
+	assertSame(renderKit, portalFacesContext.getRenderKit());
+    }
+}

Added: branches/refactor1/extensions/portlet/src/test/java/org/ajax4jsf/portlet/context/PortletExternalContextTest.java
===================================================================
--- branches/refactor1/extensions/portlet/src/test/java/org/ajax4jsf/portlet/context/PortletExternalContextTest.java	                        (rev 0)
+++ branches/refactor1/extensions/portlet/src/test/java/org/ajax4jsf/portlet/context/PortletExternalContextTest.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,166 @@
+/**
+ * 
+ */
+package org.ajax4jsf.portlet.context;
+
+import java.util.Map;
+import javax.portlet.PortletResponse;
+import org.ajax4jsf.portlet.MockActionRequest;
+import org.ajax4jsf.portlet.MockActionResponse;
+import org.ajax4jsf.portlet.MockPortletContext;
+import org.ajax4jsf.portlet.MockPortletRequest;
+import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class PortletExternalContextTest extends AbstractAjax4JsfTestCase {
+    private PortletContextImpl portletContextImpl;
+    private FacesContextImpl portalFacesContext;
+    private MockPortletContext portletContext;
+    private MockActionRequest portletRequest;
+    private MockActionResponse portletResponse;
+
+    /**
+     * @param arg0
+     */
+    public PortletExternalContextTest(String arg0) {
+	super(arg0);
+    }
+
+    /* (non-Javadoc)
+     * @see org.ajax4jsf.tests.AbstractAjax4JsfTestCase#setUp()
+     */
+    public void setUp() throws Exception {
+	super.setUp();
+	portletContext=new MockPortletContext();
+	portletRequest = new MockActionRequest();
+	portletResponse = new MockActionResponse();
+	portletContextImpl = new PortletContextImpl(portletContext,portletRequest,portletResponse);
+	portalFacesContext = new FacesContextImpl(portletContextImpl,lifecycle);
+	portalFacesContext.setViewRoot(facesContext.getViewRoot());
+    }
+
+    /* (non-Javadoc)
+     * @see org.ajax4jsf.tests.AbstractAjax4JsfTestCase#tearDown()
+     */
+    public void tearDown() throws Exception {
+	super.tearDown();
+	portletContextImpl = null;
+	portalFacesContext = null;
+	portletContext = null;
+	portletRequest = null;
+	portletResponse = null;
+    }
+
+    /**
+     * Test method for {@link org.ajax4jsf.portlet.context.PortletContextImpl#getRequestParameterValuesMap()}.
+     */
+    public final void testGetRequestParameterValuesMap() {
+	Map requestParameterValuesMap = portalFacesContext.getExternalContext().getRequestParameterValuesMap();
+	assertNotNull(requestParameterValuesMap);
+	assertSame(requestParameterValuesMap, portalFacesContext.getExternalContext().getRequestParameterValuesMap());
+	assertSame(requestParameterValuesMap.get(MockPortletRequest.PARAMETER), portletRequest.getParameterValues(MockPortletRequest.PARAMETER));
+	
+    }
+
+    /**
+     * Test method for {@link org.ajax4jsf.portlet.context.PortletContextImpl#getInitParameter(java.lang.String)}.
+     */
+    public final void testGetInitParameterString() {
+	assertNull(portalFacesContext.getExternalContext().getInitParameter("blabla"));
+	assertSame(MockPortletContext.PORTLET_INIT_VALUE, portalFacesContext.getExternalContext().getInitParameter(MockPortletContext.INIT_PARAMETER));
+    }
+
+    /**
+     * Test method for {@link org.ajax4jsf.portlet.context.PortletContextImpl#getRequestLocales()}.
+     */
+    public final void testGetRequestLocales() {
+	fail("Not yet implemented");
+    }
+
+    /**
+     * Test method for {@link org.ajax4jsf.portlet.context.PortletContextImpl#getSession(boolean)}.
+     */
+    public final void testGetSessionBoolean() {
+	fail("Not yet implemented");
+    }
+
+    /**
+     * Test method for {@link org.ajax4jsf.portlet.context.AbstractExternalContext#getApplicationMap()}.
+     */
+    public final void testGetApplicationMap() {
+	// fail("Not yet implemented");
+    }
+
+    /**
+     * Test method for {@link org.ajax4jsf.portlet.context.AbstractExternalContext#getInitParameterMap()}.
+     */
+    public final void testGetInitParameterMap() {
+	// fail("Not yet implemented");
+    }
+
+    /**
+     * Test method for {@link org.ajax4jsf.portlet.context.AbstractExternalContext#setRequest(java.lang.Object)}.
+     */
+    public final void testSetRequestObject() {
+	// fail("Not yet implemented");
+    }
+
+    /**
+     * Test method for {@link org.ajax4jsf.portlet.context.AbstractExternalContext#getRequestCookieMap()}.
+     */
+    public final void testGetRequestCookieMap() {
+	// fail("Not yet implemented");
+    }
+
+    /**
+     * Test method for {@link org.ajax4jsf.portlet.context.AbstractExternalContext#getRequestHeaderMap()}.
+     */
+    public final void testGetRequestHeaderMap() {
+	// fail("Not yet implemented");
+    }
+
+    /**
+     * Test method for {@link org.ajax4jsf.portlet.context.AbstractExternalContext#getRequestHeaderValuesMap()}.
+     */
+    public final void testGetRequestHeaderValuesMap() {
+	// fail("Not yet implemented");
+    }
+
+    /**
+     * Test method for {@link org.ajax4jsf.portlet.context.AbstractExternalContext#getRequestMap()}.
+     */
+    public final void testGetRequestMap() {
+	// fail("Not yet implemented");
+    }
+
+    /**
+     * Test method for {@link org.ajax4jsf.portlet.context.AbstractExternalContext#getRequestParameterMap()}.
+     */
+    public final void testGetRequestParameterMap() {
+	// fail("Not yet implemented");
+    }
+
+    /**
+     * Test method for {@link org.ajax4jsf.portlet.context.AbstractExternalContext#getRequestParameterNames()}.
+     */
+    public final void testGetRequestParameterNames() {
+	// fail("Not yet implemented");
+    }
+
+    /**
+     * Test method for {@link org.ajax4jsf.portlet.context.AbstractExternalContext#setResponse(java.lang.Object)}.
+     */
+    public final void testSetResponseObject() {
+	// fail("Not yet implemented");
+    }
+
+    /**
+     * Test method for {@link org.ajax4jsf.portlet.context.AbstractExternalContext#getSessionMap()}.
+     */
+    public final void testGetSessionMap() {
+	// fail("Not yet implemented");
+    }
+}

Added: branches/refactor1/extensions/seam/.svnignore
===================================================================
--- branches/refactor1/extensions/seam/.svnignore	                        (rev 0)
+++ branches/refactor1/extensions/seam/.svnignore	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1 @@
+target

Added: branches/refactor1/extensions/seam/pom.xml
===================================================================
--- branches/refactor1/extensions/seam/pom.xml	                        (rev 0)
+++ branches/refactor1/extensions/seam/pom.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,46 @@
+<?xml version="1.0"?><project>
+  <parent>
+    <artifactId>master</artifactId>
+    <groupId>org.ajax4jsf</groupId>
+    <version>1.1.1-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.ajax4jsf</groupId>
+  <artifactId>a4j-seam</artifactId>
+  <name>ajax4jsf and JBOSS Seam compability library</name>
+  <url>https://ajax4jsf.dev.java.net</url>
+	<build>
+		<plugins>
+			<plugin>
+				<artifactId>maven-source-plugin</artifactId>
+				<executions>
+					<execution>
+						<id>attach-source</id>
+						<goals>
+							<goal>jar</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
+
+		</plugins>
+	</build>
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>3.8.1</version>
+      <scope>test</scope>
+    </dependency>
+	<dependency>
+		<groupId>org.ajax4jsf</groupId>
+		<artifactId>ajax4jsf</artifactId>
+		<version>${project.version}</version>
+	</dependency>
+	<dependency>
+		<groupId>jboss</groupId>
+		<artifactId>seam</artifactId>
+		<version>1.1</version>
+	</dependency>
+   </dependencies>
+</project>
\ No newline at end of file

Added: branches/refactor1/extensions/seam/src/main/java/org/ajax4jsf/framework/resource/SeamResourceLifecycle.java
===================================================================
--- branches/refactor1/extensions/seam/src/main/java/org/ajax4jsf/framework/resource/SeamResourceLifecycle.java	                        (rev 0)
+++ branches/refactor1/extensions/seam/src/main/java/org/ajax4jsf/framework/resource/SeamResourceLifecycle.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,73 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.resource;
+
+import java.io.IOException;
+import java.util.Map;
+
+import javax.faces.context.ExternalContext;
+import javax.faces.context.FacesContext;
+import javax.faces.event.PhaseId;
+import javax.servlet.http.HttpSession;
+
+import org.jboss.seam.contexts.ContextAdaptor;
+import org.jboss.seam.contexts.Contexts;
+import org.jboss.seam.contexts.Lifecycle;
+import org.jboss.seam.core.Manager;
+
+/**
+ * @author shura
+ *
+ */
+public class SeamResourceLifecycle extends ResourceLifecycle {
+	
+	@Override
+	public void send(ResourceContext resourceContext, InternetResource resource) throws IOException {
+		FacesContext facesContext = null;
+		if(resource.requireFacesContext()){
+			facesContext = FacesContext.getCurrentInstance();
+		}
+		if(null != facesContext){
+			  ExternalContext externalContext = facesContext.getExternalContext();
+			  Object response = externalContext.getResponse();
+		      HttpSession session = (HttpSession) externalContext.getSession(true);
+		      Lifecycle.setPhaseId(PhaseId.RENDER_RESPONSE);
+//		      Lifecycle.setServletRequest(request);
+		      Lifecycle.beginRequest(externalContext);
+		      Map parameters = externalContext.getRequestParameterMap();
+			  Manager.instance().restoreConversation( parameters );
+		      Lifecycle.resumeConversation(externalContext);
+		      Manager.instance().handleConversationPropagation(parameters);
+		      super.send(resourceContext, resource);
+		      if ( Contexts.isConversationContextActive() )
+		      {
+		         Lifecycle.flushClientConversation();
+		         Manager.instance().storeConversation(ContextAdaptor.getSession(session), response);
+		      }
+		      Lifecycle.endRequest();
+			
+		} else {
+			super.send(resourceContext, resource);
+		}
+	}
+
+}

Added: branches/refactor1/extensions/seam/src/test/java/org/ajax4jsf/AppTest.java
===================================================================
--- branches/refactor1/extensions/seam/src/test/java/org/ajax4jsf/AppTest.java	                        (rev 0)
+++ branches/refactor1/extensions/seam/src/test/java/org/ajax4jsf/AppTest.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,97 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf;
+
+
+
+import junit.framework.Test;
+
+import junit.framework.TestCase;
+
+import junit.framework.TestSuite;
+
+
+
+/**
+
+ * Unit test for simple App.
+
+ */
+
+public class AppTest 
+
+    extends TestCase
+
+{
+
+    /**
+
+     * Create the test case
+
+     *
+
+     * @param testName name of the test case
+
+     */
+
+    public AppTest( String testName )
+
+    {
+
+        super( testName );
+
+    }
+
+
+
+    /**
+
+     * @return the suite of tests being tested
+
+     */
+
+    public static Test suite()
+
+    {
+
+        return new TestSuite( AppTest.class );
+
+    }
+
+
+
+    /**
+
+     * Rigourous Test :-)
+
+     */
+
+    public void testApp()
+
+    {
+
+        assertTrue( true );
+
+    }
+
+}
+

Added: branches/refactor1/extensions/trinidad/.svnignore
===================================================================
--- branches/refactor1/extensions/trinidad/.svnignore	                        (rev 0)
+++ branches/refactor1/extensions/trinidad/.svnignore	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1 @@
+target

Added: branches/refactor1/extensions/trinidad/pom.xml
===================================================================
--- branches/refactor1/extensions/trinidad/pom.xml	                        (rev 0)
+++ branches/refactor1/extensions/trinidad/pom.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,53 @@
+<?xml version="1.0"?><project>
+  <parent>
+    <artifactId>master</artifactId>
+    <groupId>org.ajax4jsf</groupId>
+    <version>1.1.1-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.ajax4jsf</groupId>
+  <artifactId>a4j-trinidad</artifactId>
+  <name>ajax4jsf and MyFaces Trinidad compability library</name>
+  <url>https://ajax4jsf.dev.java.net</url>
+	<build>
+		<plugins>
+			<plugin>
+				<artifactId>maven-source-plugin</artifactId>
+				<executions>
+					<execution>
+						<id>attach-source</id>
+						<goals>
+							<goal>jar</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
+
+		</plugins>
+	</build>
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>3.8.1</version>
+      <scope>test</scope>
+    </dependency>
+	<dependency>
+		<groupId>org.ajax4jsf</groupId>
+		<artifactId>ajax4jsf</artifactId>
+		<version>${project.version}</version>
+	</dependency>
+  	<dependency>
+  	    <groupId>org.apache.myfaces.trinidad</groupId>
+  	    <artifactId>trinidad-api</artifactId>
+  	    <version>incubator-m1-SNAPSHOT</version>
+	</dependency>
+  </dependencies>
+	  <repositories>
+	    <repository>
+	      <id>apache.snapshots</id>
+	      <name>Apache Snapshot Repository</name>
+	      <url>http://people.apache.org/repo/m2-snapshot-repository</url>
+	    </repository>
+	  </repositories>
+</project>
\ No newline at end of file

Added: branches/refactor1/extensions/trinidad/src/main/java/org/ajax4jsf/framework/ajax/TrinidadAjaxContext.java
===================================================================
--- branches/refactor1/extensions/trinidad/src/main/java/org/ajax4jsf/framework/ajax/TrinidadAjaxContext.java	                        (rev 0)
+++ branches/refactor1/extensions/trinidad/src/main/java/org/ajax4jsf/framework/ajax/TrinidadAjaxContext.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,73 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.ajax;
+
+import java.io.IOException;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+
+import org.apache.myfaces.trinidad.render.ExtendedRenderKitService;
+import org.apache.myfaces.trinidad.util.Service;
+
+/**
+ * @author shura
+ *
+ */
+public class TrinidadAjaxContext extends AjaxContext {
+
+	/**
+	 * 
+	 */
+	public TrinidadAjaxContext() {
+		super();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.ajax.AjaxContext#encodeAjaxBegin(javax.faces.context.FacesContext, javax.faces.component.UIComponent)
+	 */
+
+	public void encodeAjaxBegin(FacesContext context, UIComponent component) throws IOException {
+		// create Trinidad Rendering service
+		ExtendedRenderKitService renderKitService = (ExtendedRenderKitService)Service.getRenderKitService(context, ExtendedRenderKitService.class);
+		if(null != renderKitService){
+			renderKitService.encodeBegin(context);
+		}
+		super.encodeAjaxBegin(context, component);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.ajax.AjaxContext#encodeAjaxEnd(javax.faces.context.FacesContext, javax.faces.component.UIComponent)
+	 */
+
+	public void encodeAjaxEnd(FacesContext context, UIComponent component) throws IOException {
+		// create Trinidad Rendering service
+		ExtendedRenderKitService renderKitService = (ExtendedRenderKitService)Service.getRenderKitService(context, ExtendedRenderKitService.class);
+		super.encodeAjaxEnd(context, component);
+		if(null != renderKitService){
+			renderKitService.encodeEnd(context);
+		}
+	}
+	
+	
+
+}

Added: branches/refactor1/extensions/trinidad/src/main/resources/META-INF/MANIFEST.MF
===================================================================
--- branches/refactor1/extensions/trinidad/src/main/resources/META-INF/MANIFEST.MF	                        (rev 0)
+++ branches/refactor1/extensions/trinidad/src/main/resources/META-INF/MANIFEST.MF	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,6 @@
+Manifest-Version: 1.0
+
+Class-Path: 
+
+
+

Added: branches/refactor1/extensions/trinidad/src/main/resources/META-INF/services/org.ajax4jsf.framework.ajax.AjaxContext
===================================================================
--- branches/refactor1/extensions/trinidad/src/main/resources/META-INF/services/org.ajax4jsf.framework.ajax.AjaxContext	                        (rev 0)
+++ branches/refactor1/extensions/trinidad/src/main/resources/META-INF/services/org.ajax4jsf.framework.ajax.AjaxContext	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1 @@
+org.ajax4jsf.framework.ajax.TrinidadAjaxContext

Added: branches/refactor1/extensions/trinidad/src/test/java/org/ajax4jsf/AppTest.java
===================================================================
--- branches/refactor1/extensions/trinidad/src/test/java/org/ajax4jsf/AppTest.java	                        (rev 0)
+++ branches/refactor1/extensions/trinidad/src/test/java/org/ajax4jsf/AppTest.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,97 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf;
+
+
+
+import junit.framework.Test;
+
+import junit.framework.TestCase;
+
+import junit.framework.TestSuite;
+
+
+
+/**
+
+ * Unit test for simple App.
+
+ */
+
+public class AppTest 
+
+    extends TestCase
+
+{
+
+    /**
+
+     * Create the test case
+
+     *
+
+     * @param testName name of the test case
+
+     */
+
+    public AppTest( String testName )
+
+    {
+
+        super( testName );
+
+    }
+
+
+
+    /**
+
+     * @return the suite of tests being tested
+
+     */
+
+    public static Test suite()
+
+    {
+
+        return new TestSuite( AppTest.class );
+
+    }
+
+
+
+    /**
+
+     * Rigourous Test :-)
+
+     */
+
+    public void testApp()
+
+    {
+
+        assertTrue( true );
+
+    }
+
+}
+

Added: branches/refactor1/framework/api/pom.xml
===================================================================
--- branches/refactor1/framework/api/pom.xml	                        (rev 0)
+++ branches/refactor1/framework/api/pom.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,68 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<parent>
+		<artifactId>framework</artifactId>
+		<groupId>org.richfaces</groupId>
+		<version>3.1.0-SNAPSHOT</version>
+	</parent>
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>org.richfaces.framework</groupId>
+	<artifactId>api</artifactId>
+	<name>Java Server Faces AJAX framework API</name>
+	<properties>
+		<jsfVersion>1.1</jsfVersion>
+	</properties>
+	<dependencies>
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<version>3.8.1</version>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>com.sun.facelets</groupId>
+			<artifactId>jsf-facelets</artifactId>
+			<version>1.1.12</version>
+			<optional>true</optional>
+		</dependency>
+		<dependency>
+			<groupId>javax.el</groupId>
+			<artifactId>el-api</artifactId>
+			<version>1.0</version>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>commons-logging</groupId>
+			<artifactId>commons-logging</artifactId>
+			<version>1.0.4</version>
+		</dependency>
+		<dependency>
+			<groupId>commons-beanutils</groupId>
+			<artifactId>commons-beanutils</artifactId>
+			<version>1.7.0</version>
+		</dependency>
+		<dependency>
+			<groupId>commons-collections</groupId>
+			<artifactId>commons-collections</artifactId>
+			<version>3.2</version>
+		</dependency>
+		<dependency>
+			<groupId>javax.servlet</groupId>
+			<artifactId>servlet-api</artifactId>
+			<version>2.5</version>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>javax.servlet.jsp</groupId>
+			<artifactId>jsp-api</artifactId>
+			<version>2.1</version>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>javax.faces</groupId>
+			<artifactId>jsf-api</artifactId>
+			<version>1.2_03</version>
+		</dependency>
+	</dependencies>
+</project>
\ No newline at end of file

Added: branches/refactor1/framework/impl/.svnignore
===================================================================
--- branches/refactor1/framework/impl/.svnignore	                        (rev 0)
+++ branches/refactor1/framework/impl/.svnignore	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1 @@
+target

Added: branches/refactor1/framework/impl/generatescript.xml
===================================================================
--- branches/refactor1/framework/impl/generatescript.xml	                        (rev 0)
+++ branches/refactor1/framework/impl/generatescript.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,127 @@
+<?xml version="1.0"?>
+<!-- ====================================================================== 
+     12.11.2005 23:40:43                                                        
+
+     assemblescripts    
+     Assemble all javaScript library files to one AJAXJSF.js
+                   
+     shura                                                                
+     ====================================================================== -->
+<project name="assemblescripts" default="assembly">
+	<description>
+            Assemble all javaScript library files to one AJAXJSF.js
+    </description>
+
+	<property name="scripts-path" value="org/ajax4jsf/framework/ajax/scripts"></property>
+	<property name="prototype-scripts-path" value="org/ajax4jsf/framework/resource/scripts"></property>
+
+	<property name="target-dir" value="${project.build.directory}/javascript"></property>
+	
+	<property name="scripts.dir"
+	          value="${target-dir}/${scripts-path}"
+	/>
+	<property name="prototype.scripts.dir"
+		          value="${target-dir}/${prototype-scripts-path}"
+		/>
+	<property name="script" value="AJAX.js" />
+	
+	<property name="script.rico" value="rico.js"></property>
+	<property name="script.aculo" value="scriptaculo.js"></property>
+
+	<property name="script.prototype" value="prototype.js"></property>
+
+	<property name="script.imagecache" value="imagecache.js"></property>
+	<property name="script.dnd" value="dnd.js"></property>
+	<property name="script.css-rules" value="css-rules.js"></property>
+	<filelist id="imagecache" dir="${basedir}/src/main/javascript/ajaxjsf" files="imagecache.js"></filelist>
+<!--
+	<filelist id="prototype"
+	          dir="${basedir}/src/main/javascript/prototype"
+	          files="empty.js,base.js,string.js,enumerable.js,array.js,hash.js,range.js"
+	>
+-->	
+	<filelist id="prototype"
+		          dir="${basedir}/src/main/javascript/prototype"
+		          files="prolog.js,prototype1.5.0.js,patches.js,epilog.js"
+		>
+
+	</filelist>
+
+	<filelist id="prototype.extend"
+	          dir="${basedir}/src/main/javascript/prototype"
+		      files="dom.js,form.js,event.js,position.js,patches.js"
+	>
+	</filelist>
+
+	<filelist id="dnd"
+		          dir="${basedir}/src/main/javascript/dnd"
+			      files="prolog.js,dnd.js,dnd-draggable.js,dnd-dropzone.js,epilog.js"
+	>
+	</filelist>
+
+    <filelist id="ajaxjsf" dir="${basedir}/src/main/javascript/ajaxjsf" files="prolog.js,sarissa.js,JSFAJAX.js,log4ajax.js,epilog.js"></filelist>   
+	<!-- ================================= 
+          target: assemble              
+         ================================= -->
+	<target name="assembly"
+	        depends="depends"
+	        description="--> Assemble all javaScript library files to one AJAXJSF.js"
+	>
+		<concat append="false"
+		        binary="false"
+		        destfile="${scripts.dir}/${script}"
+		        fixlastline="yes"
+                eol="unix"         
+		>
+            <filelist refid="ajaxjsf">
+                </filelist>
+			</concat>
+		<concat append="false"
+				        binary="false"
+				        destfile="${scripts.dir}/${script.imagecache}"
+				        fixlastline="yes"
+		                eol="unix"         
+				>
+		            <filelist refid="imagecache"/>
+		</concat>
+		<concat append="false"
+				        binary="false"
+				        destfile="${scripts.dir}/${script.dnd}"
+				        fixlastline="yes"
+		                eol="unix"         
+				>
+		            <filelist refid="dnd"/>
+		</concat>
+		<concat append="false"
+		        binary="false"
+		        destfile="${prototype.scripts.dir}/${script.prototype}"
+		        fixlastline="yes"
+                eol="unix"         
+		>
+        <filelist refid="prototype">
+        </filelist>         
+        <!-- filelist refid="prototype.extend">
+        </filelist -->
+		</concat>
+		<copy todir="${prototype.scripts.dir}" file="${basedir}/src/main/javascript/ajaxjsf/smartposition.js">
+		</copy>
+	</target>
+
+    
+    <!-- ================================= 
+          target: fixeol              
+         ================================= -->
+    <target name="fixeol" depends="depends" description="--> Fix CR/LF in files">
+        <fixcrlf srcdir="${basedir}" includes="*.js" eol="unix">
+        </fixcrlf>
+    </target>
+
+   
+	<!-- - - - - - - - - - - - - - - - - - 
+          target: depends                      
+         - - - - - - - - - - - - - - - - - -->
+	<target name="depends">
+	</target>
+
+</project>
+

Added: branches/refactor1/framework/impl/pom.xml
===================================================================
--- branches/refactor1/framework/impl/pom.xml	                        (rev 0)
+++ branches/refactor1/framework/impl/pom.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,340 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<parent>
+		<artifactId>master</artifactId>
+		<groupId>org.ajax4jsf</groupId>
+		<version>1.1.2-SNAPSHOT</version>
+	</parent>
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>org.ajax4jsf</groupId>
+	<artifactId>ajax4jsf</artifactId>
+	<name>Java Server Faces AJAX framework</name>
+	<url>http://labs.jboss.com/wiki/Ajax4jsf/framework</url>
+	<properties>
+		<jsfVersion>1.1</jsfVersion>
+	</properties>
+	<build>
+		<resources>
+			<resource>
+				<directory>src/main/resources</directory>
+			</resource>
+			<resource>
+				<directory>target/javascript</directory>
+			</resource>
+		</resources>
+		<plugins>
+			<plugin>
+				<groupId>org.ajax4jsf.cdk</groupId>
+				<artifactId>maven-cdk-plugin</artifactId>
+				<version>${project.version}</version>
+				<executions>
+					<execution>
+						<phase>generate-sources</phase>
+						<goals>
+							<goal>generate</goal>
+						</goals>
+					</execution>
+				</executions>
+				<configuration>
+					<library>
+						<prefix>org.ajax4jsf</prefix>
+						<jsfVersion>${jsfVersion}</jsfVersion>
+						<taglib>
+							<uri>
+								https://ajax4jsf.dev.java.net/ajax
+							</uri>
+							<shortName>a4j</shortName>
+						</taglib>
+					</library>
+				</configuration>
+			</plugin>
+			<plugin>
+				<artifactId>maven-antrun-plugin</artifactId>
+				<executions>
+					<execution>
+						<phase>generate-resources</phase>
+						<goals>
+							<goal>run</goal>
+						</goals>
+						<configuration>
+							<tasks>
+								<ant antfile="${basedir}/generatescript.xml" inheritRefs="true">
+									<target name="assembly" />
+									<property name="target-dir" value="${project.build.directory}/javascript">
+									</property>
+								</ant>
+							</tasks>
+							<resourceRoot>
+								${project.build.directory}/javascript
+							</resourceRoot>
+						</configuration>
+					</execution>
+				</executions>
+			</plugin>
+			<plugin>
+				<artifactId>maven-source-plugin</artifactId>
+				<executions>
+					<execution>
+						<id>attach-source</id>
+						<goals>
+							<goal>jar</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
+		</plugins>
+	</build>
+	<reporting>
+		<plugins>
+			<plugin>
+				<groupId>net.sourceforge.maven-taglib</groupId>
+				<artifactId>maven-taglib-plugin</artifactId>
+			</plugin>
+		</plugins>
+	</reporting>
+	<dependencies>
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<version>3.8.1</version>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>opensymphony</groupId>
+			<artifactId>oscache</artifactId>
+			<version>2.3</version>
+			<optional>true</optional>
+		</dependency>
+		<dependency>
+			<groupId>com.sun.facelets</groupId>
+			<artifactId>jsf-facelets</artifactId>
+			<version>1.1.11</version>
+			<optional>true</optional>
+		</dependency>
+		<dependency>
+			<groupId>javax.el</groupId>
+			<artifactId>el-api</artifactId>
+			<version>1.0</version>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>nekohtml</groupId>
+			<artifactId>nekohtml</artifactId>
+			<version>0.9.5</version>
+			<optional>true</optional>
+		</dependency>
+		<dependency>
+			<groupId>net.sf.json-lib</groupId>
+			<artifactId>json-lib</artifactId>
+			<version>0.9</version>
+			<optional>true</optional>
+			<exclusions>
+				<exclusion>
+					<groupId>commons-lang</groupId>
+					<artifactId>commons-lang</artifactId>
+				</exclusion>
+				<exclusion>
+					<groupId>xom</groupId>
+					<artifactId>xom</artifactId>
+				</exclusion>
+			</exclusions>
+		</dependency>
+		<dependency>
+			<groupId>commons-logging</groupId>
+			<artifactId>commons-logging</artifactId>
+			<version>1.0.4</version>
+		</dependency>
+		<dependency>
+			<groupId>log4j</groupId>
+			<artifactId>log4j</artifactId>
+			<version>1.2.14</version>
+			<optional>true</optional>
+		</dependency>
+		<dependency>
+			<groupId>commons-beanutils</groupId>
+			<artifactId>commons-beanutils</artifactId>
+			<version>1.7.0</version>
+		</dependency>
+		<dependency>
+			<groupId>commons-digester</groupId>
+			<artifactId>commons-digester</artifactId>
+			<version>1.8</version>
+		</dependency>
+		<dependency>
+			<groupId>commons-collections</groupId>
+			<artifactId>commons-collections</artifactId>
+			<version>3.2</version>
+		</dependency>
+	</dependencies>
+	<profiles>
+		<profile>
+			<id>jsf1_1</id>
+			<activation>
+				<activeByDefault>true</activeByDefault>
+				<property>
+					<name>jsfVersion</name>
+					<value>1.1</value>
+				</property>
+			</activation>
+			<build>
+				<plugins>
+					<plugin>
+						<groupId>org.apache.maven.plugins</groupId>
+						<artifactId>maven-compiler-plugin</artifactId>
+						<configuration>
+							<source>1.4</source>
+							<target>1.4</target>
+						</configuration>
+					</plugin>
+				</plugins>
+			</build>
+			<dependencies>
+				<dependency>
+					<groupId>javax.servlet</groupId>
+					<artifactId>servlet-api</artifactId>
+					<version>2.4</version>
+					<scope>provided</scope>
+				</dependency>
+				<dependency>
+					<groupId>javax.servlet</groupId>
+					<artifactId>jsp-api</artifactId>
+					<version>2.0</version>
+					<scope>provided</scope>
+				</dependency>
+				<dependency>
+					<groupId>javax.faces</groupId>
+					<artifactId>jsf-api</artifactId>
+					<version>1.1_02</version>
+					<exclusions>
+						<!-- No longer presented in any repo -->
+						<exclusion>
+							<groupId>javax.servlet.jsp</groupId>
+							<artifactId>jsp-api</artifactId>
+						</exclusion>
+						<exclusion>
+							<groupId>javax.servlet.jsp.jstl</groupId>
+							<artifactId>jstl</artifactId>
+						</exclusion>
+					</exclusions>
+				</dependency>
+				<dependency>
+					<groupId>javax.faces</groupId>
+					<artifactId>jsf-impl</artifactId>
+					<version>1.1_02</version>
+					<scope>runtime</scope>
+					<exclusions>
+						<!-- No longer presented in any repo -->
+						<exclusion>
+							<groupId>javax.servlet.jsp</groupId>
+							<artifactId>jsp-api</artifactId>
+						</exclusion>
+						<exclusion>
+							<groupId>javax.servlet.jsp.jstl</groupId>
+							<artifactId>jstl</artifactId>
+						</exclusion>
+					</exclusions>
+				</dependency>
+				<dependency>
+					<groupId>javax.servlet</groupId>
+					<artifactId>jstl</artifactId>
+					<version>1.0</version>
+				</dependency>
+			</dependencies>
+		</profile>
+		<profile>
+			<id>jsf1_2</id>
+			<activation>
+				<property>
+					<name>jsfVersion</name>
+					<value>1.2</value>
+				</property>
+			</activation>
+			<build>
+				<plugins>
+					<plugin>
+						<groupId>org.apache.maven.plugins</groupId>
+						<artifactId>maven-compiler-plugin</artifactId>
+						<version>2.0</version>
+						<configuration>
+							<source>1.5</source>
+							<target>1.5</target>
+						</configuration>
+					</plugin>
+					<!-- append JSF 1.2 related sources -->
+					<plugin>
+						<groupId>org.codehaus.mojo</groupId>
+						<artifactId>
+							build-helper-maven-plugin
+						</artifactId>
+						<executions>
+							<execution>
+								<id>add-source</id>
+								<phase>process-sources</phase>
+								<goals>
+									<goal>add-source</goal>
+								</goals>
+								<configuration>
+									<sources>
+										<source>src/main/jsf12</source>
+									</sources>
+								</configuration>
+							</execution>
+						</executions>
+					</plugin>
+				</plugins>
+			</build>
+			<dependencies>
+				<dependency>
+					<groupId>javax.servlet</groupId>
+					<artifactId>servlet-api</artifactId>
+					<version>2.5</version>
+					<scope>provided</scope>
+				</dependency>
+				<dependency>
+					<groupId>javax.servlet.jsp</groupId>
+					<artifactId>jsp-api</artifactId>
+					<version>2.1</version>
+					<scope>provided</scope>
+				</dependency>
+				<dependency>
+					<groupId>javax.faces</groupId>
+					<artifactId>jsf-api</artifactId>
+					<version>1.2_03</version>
+				</dependency>
+				<dependency>
+					<groupId>javax.faces</groupId>
+					<artifactId>jsf-impl</artifactId>
+					<version>1.2_03</version>
+					<scope>runtime</scope>
+				</dependency>
+			</dependencies>
+		</profile>
+		<profile>
+			<id>assembly</id>
+			<build>
+				<plugins>
+					<plugin>
+						<groupId>net.sourceforge.maven-taglib</groupId>
+						<artifactId>maven-taglib-plugin</artifactId>
+						<configuration>
+							<taglib.src.dir>
+								${project.build.directory}/generated-component/resources/META-INF
+							</taglib.src.dir>
+							<tldDocDir>
+								${project.build.directory}/tlddoc
+							</tldDocDir>
+						</configuration>
+
+						<executions>
+							<execution>
+								<id>attach-javadoc</id>
+								<goals>
+									<goal>taglibdocjar</goal>
+								</goals>
+							</execution>
+						</executions>
+					</plugin>
+				</plugins>
+			</build>
+		</profile>
+	</profiles>
+</project>
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/config/component/actionParameter.xml
===================================================================
--- branches/refactor1/framework/impl/src/main/config/component/actionParameter.xml	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/config/component/actionParameter.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE components 
+        PUBLIC "-//AJAX4JSF//CDK Generator config/EN"
+        "https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" [
+<!ENTITY universal_html_attributes   SYSTEM "html_universal_attributes.xml">	
+]>
+
+<components>
+     	<component>
+		<name>org.ajax4jsf.ajax.ActionParameter</name>
+		<classname>
+			org.ajax4jsf.ajax.html.HtmlActionParameter
+		</classname>
+		<superclass>org.ajax4jsf.ajax.UIActionParameter</superclass>
+		<description>
+			<![CDATA[
+			A combination of the functionality of two JSF tags, <f:actionListener> and <f:param>.
+			At the render phase, it's decoded by parent component (<h:commandLink> or like) as usual.
+			At the process request phase, if the parent component performs an action event, update the value specified in the
+			"assignTo" attribute as its value. If a converter attribute is specified, use it to encode and decode the value to a string
+			stored in the html parameter.
+		]]>
+		</description>
+		<!-- 		<renderer>
+			<name>org.ajax4jsf.components.ActionParam</name>
+			<classname>org.ajax4jsf.renderers.ajax.</classname>
+			</renderer> 
+		-->
+		<tag>
+			<name>actionparam</name>
+			<classname>org.ajax4jsf.taglib.ajax.ActionParam</classname>
+			<superclass>
+				org.ajax4jsf.taglib.html.jsp.ActionParamTag
+			</superclass>
+			<description>
+			<![CDATA[
+				A combination of the functionality of two JSF tags,
+				&lt;f:actionListener&gt;; and &lt;f:param&gt;. At the
+				render phase, it's decoded by parent component
+				(&lt;h:commandLink&gt;; or like) as usual.
+				<br />
+				At the process request phase, if the parent component
+				performs an action event, update the value specified in
+				the "assignTo" attribute as its value.
+				<br />
+				If a converter attribute is specified, use it to encode
+				and decode the value to a string stored in the html
+				parameter.
+				<br />
+				]]>
+			</description>
+		</tag>
+		<taghandler generate="false">
+			<classname>org.ajax4jsf.taglib.html.facelets.ActionParamHandler</classname>
+		</taghandler>
+		&ui_component_attributes;
+		&ui_parameter_attributes;
+		<property>
+			<name>converter</name>
+			<classname>javax.faces.convert.Converter</classname>
+			<description>
+				ID of a converter to be used or a reference to a
+				converter.
+			</description>
+		</property>
+		<property exist="true" el="true" elonly="true">
+			<name>assignTo</name>
+			<classname>java.lang.String</classname>
+			<description>
+				EL expression for updatable bean property. This property
+				will be updated if the parent command component performs
+				an actionEvent.
+			</description>
+		</property>
+		<property>
+			<name>noEscape</name>
+			<classname>boolean</classname>
+			<description>
+				If set to true, the value will not enclosed within
+				single quotes and there will be no escaping of
+				characters. This allows the use of the value as
+				JavaScript code for calculating value on the
+				client-side. This doesn't work with non-AJAX components.
+			</description>
+		</property>
+		<property hidden="true">
+			<name>assignToBinding</name>
+		</property>
+	</component>
+     
+</components>
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/config/component/commandButton.xml
===================================================================
--- branches/refactor1/framework/impl/src/main/config/component/commandButton.xml	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/config/component/commandButton.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE components 
+        PUBLIC "-//AJAX4JSF//CDK Generator config/EN"
+        "https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" [
+<!ENTITY universal_html_attributes   SYSTEM "html_universal_attributes.xml">	
+]>
+
+<components>
+     	<component>
+		<name>org.ajax4jsf.ajax.CommandButton</name>
+		<family>javax.faces.Command</family>
+		<classname>
+			org.ajax4jsf.ajax.html.HtmlAjaxCommandButton
+		</classname>
+		<superclass>org.ajax4jsf.ajax.UIAjaxCommandButton</superclass>
+		<description><![CDATA[
+			Renders an HTML "input" element.
+			<br />
+			During Decoding: Obtains the Map from the
+			"requestParameterMap" property of the ExternalContext. If
+			the value in the Map for the value of the "clientId"
+			property of the component is not null, create a
+			javax.faces.event.ActionEvent around the component, and pass
+			it to the queueEvent() method of the component. If the
+			request is Ajax-performed, add its target IDs of the
+			reRender property to the rendered areas list of the nesting
+			AjaxContainer.
+			<br />
+			During Encoding: Builds an AJAX.Submit JavaScript call for
+			the "onclick" event. Renders the clientId of the component
+			as the value of the "name" attribute. Renders the current
+			value of the component as the value of the "value"
+			attribute. If the "styleClass" attribute is specified,
+			render its value as the value of the "class" attribute.
+			Renders child components inside the HTML "input" element.
+			]]>
+		</description>
+		<displayname>Ajax commandButton</displayname>
+		<icon>icon</icon>
+		<renderer generate="true" override="true">
+			<name>
+				org.ajax4jsf.components.AjaxCommandButtonRenderer
+			</name>
+			<template>org/ajax4jsf/renderkit/html/button.jspx</template>
+			<!-- 
+				<superclass>javax.faces.renderer.Renderer</superclass>
+			-->
+			<description>
+				Performs functions for decoding AJAX requests and
+				building client script for events.
+			</description>
+			<displayname>renderer for Ajax CommandButton</displayname>
+			<icon>icon</icon>
+		</renderer>
+		<tag>
+			<name>commandButton</name>
+			<classname>
+				org.ajax4jsf.taglib.ajax.AjaxCommandButton
+			</classname>
+			<superclass>
+				org.ajax4jsf.framework.taglib.UIComponentTagBase
+			</superclass>
+			<displayname>Ajax CommandButton</displayname>
+			<icon>icon</icon>
+		</tag>
+		<taghandler>
+			<classname>org.ajax4jsf.taglib.html.facelets.AjaxComponentHandler</classname>
+		</taghandler>
+		&ui_command_attributes;
+		&html_universal_attributes;
+		&html_button_attributes;
+		&html_events;
+		&html_control_events;
+		&ajax_component_attributes;
+		<property>
+			<name>image</name>
+			<classname>java.lang.String</classname>
+			<description>
+				<![CDATA[
+			 Absolute or relative URL of the image to be displayed for this button. If specified, this "input" element will be of type "image". Otherwise, it will be of the type specified by the "type" property with a label specified by the "value" property.
+			]]>
+			</description>
+		</property>
+		<property>
+			<name>alt</name>
+			<classname>java.lang.String</classname>
+			<description>
+				<![CDATA[
+			  Alternate textual description of the element rendered by this component.
+			]]>
+			</description>
+		</property>
+		<property>
+			<name>ignoreDupResponses</name>
+			<classname>boolean</classname>
+			<description>If true, unfinished request will be aborted on new event.</description>
+		</property>
+		<property>
+			<name>timeout</name>
+			<classname>int</classname>
+			<description>Timeout ( in ms ) for request.</description>
+		</property>
+		<property>
+			<name>actionExpression</name>
+			<classname>java.lang.String</classname>
+			<description>The action method binding expression.</description>
+		</property>		
+	</component>     
+</components>
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/config/component/commandLink.xml
===================================================================
--- branches/refactor1/framework/impl/src/main/config/component/commandLink.xml	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/config/component/commandLink.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE components 
+        PUBLIC "-//AJAX4JSF//CDK Generator config/EN"
+        "https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" [
+<!ENTITY universal_html_attributes   SYSTEM "html_universal_attributes.xml">	
+]>
+
+<components>
+     	<component>
+		<name>org.ajax4jsf.ajax.CommandLink</name>
+		<family>javax.faces.Command</family>
+		<classname>
+			org.ajax4jsf.ajax.html.HtmlAjaxCommandLink
+		</classname>
+		<superclass>org.ajax4jsf.ajax.UIAjaxCommandLink</superclass>
+		<description><![CDATA[
+			Renders an HTML "a" anchor element that acts like a form
+			submit button when clicked.
+			<br />
+			During Decoding: Obtains the Map from the
+			"requestParameterMap" property of the ExternalContext. If
+			this Map contains non null value for the "clientId" key,
+			creates a javax.faces.event.ActionEvent around the component
+			and passes it to the queueEvent() method of the component.
+			If the request is Ajax-performed, adds its target IDs from
+			the reRender property to the rendered areas list of the
+			nesting AjaxContainer.
+			<br />
+			element for decoding as described above with the parameters
+			of the component. (PARAM_NAME and PARAM_VALUE are the names
+			and values, respectively, of any nested UIParameter
+			children.) The name and the value must be URLEncoded. If the
+			"styleClass" attribute is specified, render its value as the
+			value of the "class" attribute. Render any non-UIParameter
+			children as normal inside of the "a" element. These will
+			appear as the link text.
+			]]>
+		</description>
+		<displayname>Ajax commandLink</displayname>
+		<icon>icon</icon>
+		<renderer generate="true">
+			<name>org.ajax4jsf.components.AjaxCommandLinkRenderer</name>
+			<template>org/ajax4jsf/renderkit/html/link.jspx</template>
+			<!-- 
+				<superclass>javax.faces.renderer.Renderer</superclass>
+			-->
+			<description>
+				Perform functions for decoding AJAX requests and
+				building client script for events.
+			</description>
+			<displayname>renderer for Ajax commandLink</displayname>
+			<icon>icon</icon>
+		</renderer>
+		<tag>
+			<name>commandLink</name>
+			<classname>
+				org.ajax4jsf.taglib.ajax.AjaxCommandLink
+			</classname>
+			<superclass>
+				org.ajax4jsf.framework.taglib.UIComponentTagBase
+			</superclass>
+			<displayname>Ajax commandLink</displayname>
+			<icon>icon</icon>
+		</tag>
+		<taghandler>
+			<classname>org.ajax4jsf.taglib.html.facelets.AjaxComponentHandler</classname>
+		</taghandler>
+		&ui_command_attributes;
+		&html_events;
+		&html_universal_attributes;
+		&html_anchor_attributes;
+		&html_style_attributes;
+		&ajax_component_attributes;
+		<property>
+			<name>ignoreDupResponses</name>
+			<classname>boolean</classname>
+			<description>If true, unfinished request will be aborted on new event.</description>
+		</property>
+		<property>
+			<name>timeout</name>
+			<classname>int</classname>
+			<description>Timeout ( in ms ) for request.</description>
+		</property>
+		<property>
+			<name>actionExpression</name>
+			<classname>java.lang.String</classname>
+			<description>The action method binding expression.</description>
+		</property>			
+	</component>     
+</components>
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/config/component/form.xml
===================================================================
--- branches/refactor1/framework/impl/src/main/config/component/form.xml	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/config/component/form.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,121 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE components 
+        PUBLIC "-//AJAX4JSF//CDK Generator config/EN"
+        "https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" [
+<!ENTITY universal_html_attributes   SYSTEM "html_universal_attributes.xml">	
+]>
+
+<components>
+     	<component generate="true">
+		<name>org.ajax4jsf.Form</name>
+		<family>javax.faces.Form</family>
+		<classname>org.ajax4jsf.ajax.html.AjaxForm</classname>
+		<superclass>org.ajax4jsf.ajax.UIAjaxForm</superclass>
+		<description>
+			<![CDATA[
+		Ajax-related version of html form. Main difference with original component - all hidden fields,
+		nessesary to command links alwais rendered, not depended of rendering links on initial page.
+		]]>
+		</description>
+		<renderer>
+			<name>org.ajax4jsf.FormRenderer</name>
+			<classname>
+				org.ajax4jsf.renderkit.html.AjaxFormRenderer
+			</classname>
+		</renderer>
+		<tag>
+			<name>form</name>
+			<classname>org.ajax4jsf.taglib.ajax.FormTag</classname>
+			<superclass>
+				org.ajax4jsf.framework.taglib.UIComponentTagBase
+			</superclass>
+			<displayname>Ajax-related version of html form</displayname>
+			<icon>icon</icon>
+		</tag>
+		<taghandler>
+			<classname>org.ajax4jsf.taglib.html.facelets.AjaxComponentHandler</classname>
+		</taghandler>
+		&ui_component_attributes;
+		&html_form_attributes;
+		&ajax_component_attributes;
+		<property>
+			<name>ajaxSubmit</name>
+			<classname>boolean</classname>
+			<description>If true, it becomes possible to set AJAX submission way for any components inside	.</description>
+		</property>
+		<property>
+			<name>ignoreDupResponses</name>
+			<classname>boolean</classname>
+			<description>If true, unfinished request will be aborted on new event.</description>
+		</property>
+		<property>
+			<name>timeout</name>
+			<classname>int</classname>
+			<description>Timeout ( in ms ) for request.</description>
+		</property>
+		<property>
+			<name>prependId</name>
+			<classname>java.lang.String</classname>
+			<description>The flag indicating whether or not this form should prepend its id to its descendent id during the clientId generation process. If this flag is not set, the default value is true.</description>
+		</property>		
+		<property disabled="true">
+			<name>submitted</name>
+		</property>
+	</component>
+	<component generate="false">
+		<name>javax.faces.HtmlCommandLink</name>
+		<family>javax.faces.Command</family>
+		<classname>
+			javax.faces.component.html.HtmlCommandLink
+		</classname>
+		<superclass>
+			javax.faces.component.html.HtmlCommandLink
+		</superclass>
+		<description>
+			<![CDATA[
+		Ajax-related version of html commandLink. Single difference with original component - all hidden fields,
+		nessesary to command links alwais rendered, not depended of rendering links on initial page.
+		]]>
+		</description>
+		<renderer>
+			<name>org.ajax4jsf.HtmlCommandLinkRenderer</name>
+			<classname>
+				org.ajax4jsf.renderkit.html.HtmlCommandLinkRenderer
+			</classname>
+		</renderer>
+		<tag>
+			<name>htmlCommandLink</name>
+			<classname>
+				org.ajax4jsf.taglib.ajax.HtmlCommandLinkTag
+			</classname>
+			<superclass>
+				org.ajax4jsf.framework.taglib.UIComponentTagBase
+			</superclass>
+			<displayname>
+				Ajax-related version of html command link
+			</displayname>
+			<icon>icon</icon>
+		</tag>
+		
+		&html_universal_attributes;
+		&ui_command_attributes;
+		&html_anchor_attributes;
+		&html_events;
+		<property>
+			<name>actionExpression</name>
+			<classname>java.lang.String</classname>
+			<description>The action method binding expression.</description>
+		</property>
+		<property>
+        <name>disabled</name>
+        <classname>boolean</classname>
+        <description>When set for a form control, this boolean attribute disables the control for user input.</description>
+    </property> 
+		<property>
+			<name>actionExpression</name>
+			<classname>java.lang.String</classname>
+			<description>The action method binding expression.</description>
+		</property>
+		
+	</component>     
+</components>
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/config/component/function.xml
===================================================================
--- branches/refactor1/framework/impl/src/main/config/component/function.xml	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/config/component/function.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE components 
+        PUBLIC "-//AJAX4JSF//CDK Generator config/EN"
+        "https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" [
+<!ENTITY universal_html_attributes   SYSTEM "html_universal_attributes.xml">	
+]>
+
+<components>
+	<component>
+		<name>org.ajax4jsf.ajax.Function</name>
+		<family>org.ajax4jsf.components.AjaxFunction</family>
+		<classname>org.ajax4jsf.ajax.html.HtmlAjaxFunction</classname>
+		<superclass>org.ajax4jsf.ajax.UIAjaxFunction</superclass>
+		<description>
+		</description>
+		<displayname>Ajax JavaScript Function</displayname>
+		<icon>icon</icon>
+		<renderer generate="true" override="true">
+			<name>org.ajax4jsf.components.AjaxFunctionRenderer</name>
+			<template>org/ajax4jsf/renderkit/html/function.jspx</template>
+			<!-- 
+			<classname>
+				org.ajax4jsf.renderkit.AjaxFunctionRendererBase
+			</classname>
+				<superclass>javax.faces.renderer.Renderer</superclass>
+			-->
+			<description>
+				Perform functions for decoding AJAX requests and
+				building client script for events.
+			</description>
+			<displayname>renderer for Ajax Function</displayname>
+			<icon>icon</icon>
+		</renderer>
+		<tag>
+			<name>jsFunction</name>
+			<classname>org.ajax4jsf.taglib.ajax.AjaxFunction</classname>
+			<superclass>
+				org.ajax4jsf.framework.taglib.UIComponentTagBase
+			</superclass>
+			<!-- 			<superclass>
+				org.ajax4jsf.framework.taglib.UIComponentTagBase
+				</superclass>
+			-->
+			<displayname>Ajax Function</displayname>
+			<icon>icon</icon>
+		</tag>
+		&ui_component_attributes;
+		&ui_command_attributes;
+		&ajax_component_attributes;
+		<property>
+		  <name>name</name>
+			<classname>java.lang.String</classname>
+			<description>
+				Name of generated JavaScript function definition
+			</description>
+		</property>
+		<property disabled="true">
+			<name>value</name>
+			<classname>java.lang.Object</classname>
+		</property>
+		<property>
+			<name>actionExpression</name>
+			<classname>java.lang.String</classname>
+			<description>The action method binding expression.</description>
+		</property>			
+	</component>
+</components>
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/config/component/include.xml
===================================================================
--- branches/refactor1/framework/impl/src/main/config/component/include.xml	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/config/component/include.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE components 
+        PUBLIC "-//AJAX4JSF//CDK Generator config/EN"
+        "https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" [
+<!ENTITY universal_html_attributes   SYSTEM "html_universal_attributes.xml">	
+]>
+
+<components>
+     	<component>
+		<name>org.ajax4jsf.Include</name>
+		<family>javax.faces.Output</family>
+		<classname>org.ajax4jsf.ajax.html.Include</classname>
+		<superclass>org.ajax4jsf.ajax.UIInclude</superclass>
+		<description>
+			<![CDATA[
+		include content of external view. Navigation cases in included file change only viewId of included page,
+		and don't perform navigation in root view.
+		]]>
+		</description>
+		<renderer generate="false" override="false">
+			<name>org.ajax4jsf.components.AjaxIncludeRenderer</name>
+			<classname>
+				org.ajax4jsf.renderkit.html.AjaxIncludeRenderer
+			</classname>
+		</renderer>
+		<tag bodyContent="JSP">
+			<name>include</name>
+			<classname>
+				org.ajax4jsf.taglib.ajax.HtmlIncludeTag
+			</classname>
+			<superclass>org.ajax4jsf.taglib.html.jsp.IncludeTag</superclass>
+			<displayname>include content of external view</displayname>
+			<icon>icon</icon>
+		</tag>
+		<taghandler generate="false">
+			<classname>org.ajax4jsf.taglib.html.facelets.IncludeHandler</classname>
+		</taghandler>
+		&ui_panel_attributes;
+		&html_universal_attributes;
+		&ajax_output_attributes;
+		<property>
+			<name>viewId</name>
+			<classname>java.lang.String</classname>
+			<description>viewId for included page.</description>
+		</property>
+		<property>
+			<name>layout</name>
+			<classname>java.lang.String</classname>
+			<description>
+				<![CDATA[
+			HTML layout for generated markup. Possible values: "block"
+            for generating an HTML &lt;div&gt; element, "inline" for
+            generating an HTML &lt;span&gt; element, and "none" for generating
+            no HTML element. There is a minor exception for the "none" case
+            where a child element has the property "rendered" set to "false".
+            In this case, we create an empty &lt;span&gt; element with same ID
+            as the child element to use as a placeholder for later
+            processing.
+			]]>
+			</description>
+			<defaultvalue>"inline"</defaultvalue>
+		</property>
+		<property>
+			<name>ajaxRendered</name>
+			<classname>boolean</classname>
+			<description>Defines, whether the content of this component must be
+				(or not) included in AJAX response created by parent
+				AJAX Container, even if it is not forced by reRender
+				list of ajax action. Ignored if component marked to
+				output by Ajax action. default false</description>
+		</property>
+		<property>
+			<name>keepTransient</name>
+			<classname>boolean</classname>
+			<description>Flag for mark all child components to non-transient. If
+            true, all children components will be set to non-transient state
+            and keep in saved components tree. For output in self-renderer
+            region all content ( By default, all content in &amp;lt;f:verbatim&amp;gt;
+            tags and non-jsf elements in facelets, marked as transient -
+            since, self-rendered ajax regions don't plain output for ajax
+            processing ).</description>
+		</property>
+	</component>
+     
+</components>
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/config/component/loadBundle.xml
===================================================================
--- branches/refactor1/framework/impl/src/main/config/component/loadBundle.xml	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/config/component/loadBundle.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE components 
+        PUBLIC "-//AJAX4JSF//CDK Generator config/EN"
+        "https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" [
+<!ENTITY universal_html_attributes   SYSTEM "html_universal_attributes.xml">	
+]>
+
+<components>
+     	<component>
+		<name>org.ajax4jsf.ajax.Bundle</name>
+		<family>org.ajax4jsf.Bundle</family>
+		<classname>org.ajax4jsf.ajax.html.AjaxLoadBundle</classname>
+		<superclass>org.ajax4jsf.ajax.UILoadBundle</superclass>
+		<description>
+			<![CDATA[ Load a resource bundle localized for the Locale of the current view, and expose it (as a Map) 
+			in the request attributes of the current request.
+			 In difference of original f:loadBundle tag, stored in components tree and activate on ajax/non ajax responses]]>
+		</description>
+		<tag>
+			<name>loadBundle</name>
+			<classname>org.ajax4jsf.taglib.ajax.LoadBundle</classname>
+			<superclass>
+				org.ajax4jsf.framework.taglib.UIComponentTagBase
+			</superclass>
+			<displayname>
+				Ajax-compatible version of f:loadBundle
+			</displayname>
+			<icon>icon</icon>
+		</tag>
+		&ui_component_attributes;
+		<property>
+			<name>var</name>
+			<classname>java.lang.String</classname>
+			<description>
+				Name of a request scope attribute under which the
+				resource bundle will be exposed as a Map.
+			</description>
+		</property>
+		<property>
+			<name>basename</name>
+			<classname>java.lang.String</classname>
+			<description>
+				Base name of the resource bundle to be loaded.
+			</description>
+		</property>
+	</component>     
+</components>
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/config/component/loadScript.xml
===================================================================
--- branches/refactor1/framework/impl/src/main/config/component/loadScript.xml	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/config/component/loadScript.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN"  "https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" >
+<components>
+	<component>
+		<name>org.ajax4jsf.LoadScript</name>
+		<family>org.ajax4jsf.LoadScript</family>
+		<classname>org.ajax4jsf.ajax.html.HtmlLoadScript</classname>
+		<superclass>org.ajax4jsf.ajax.UIResource</superclass>
+		<description>
+			<![CDATA[
+    ]]>
+		</description>
+		<renderer>
+			<name>org.ajax4jsf.LoadScriptRenderer</name>
+			<classname>org.ajax4jsf.renderkit.LoadResourceRendererBase</classname>
+		</renderer>
+		<tag>
+			<name>loadScript</name>
+			<classname>org.ajax4jsf.taglib.ajax.LoadScriptTag</classname>
+			<superclass>
+				org.ajax4jsf.framework.taglib.HtmlComponentTagBase
+			</superclass>
+		</tag>
+		<!--
+		<taghandler>
+			<classname>org.ajax4jsf.tag.TestHandler</classname>
+		</taghandler>
+		-->
+		&ui_component_attributes;
+		<!--
+		<property>
+			<name>param</name>
+			<classname>java.lang.String</classname>
+			<description>
+			</description>
+			<defaultvalue>"default"</defaultvalue>
+		</property>
+        -->
+		<property required="true">
+			<name>src</name>
+			<classname>java.lang.Object</classname>
+			<description><![CDATA[
+			name of JavaScript resource to load.
+			]]>
+			</description>
+		</property>
+
+	</component>
+</components>

Added: branches/refactor1/framework/impl/src/main/config/component/loadStyle.xml
===================================================================
--- branches/refactor1/framework/impl/src/main/config/component/loadStyle.xml	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/config/component/loadStyle.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN"  "https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" >
+<components>
+	<component>
+		<name>org.ajax4jsf.LoadStyle</name>
+		<family>org.ajax4jsf.LoadStyle</family>
+		<classname>org.ajax4jsf.ajax.html.HtmlLoadStyle</classname>
+		<superclass>org.ajax4jsf.ajax.UIResource</superclass>
+		<description>
+			<![CDATA[
+    ]]>
+		</description>
+		<renderer>
+			<name>org.ajax4jsf.LoadStyleRenderer</name>
+			<classname>org.ajax4jsf.renderkit.LoadResourceRendererBase</classname>
+		</renderer>
+		<tag>
+			<name>loadStyle</name>
+			<classname>org.ajax4jsf.taglib.ajax.LoadStyleTag</classname>
+			<superclass>
+				org.ajax4jsf.framework.taglib.HtmlComponentTagBase
+			</superclass>
+		</tag>
+		<!--
+		<taghandler>
+			<classname>org.ajax4jsf.tag.TestHandler</classname>
+		</taghandler>
+		-->
+		&ui_component_attributes;
+		<property required="true">
+			<name>src</name>
+			<classname>java.lang.Object</classname>
+			<description><![CDATA[
+			name of JavaScript resource to load.
+			]]>
+			</description>
+		</property>
+
+	</component>
+</components>

Added: branches/refactor1/framework/impl/src/main/config/component/log.xml
===================================================================
--- branches/refactor1/framework/impl/src/main/config/component/log.xml	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/config/component/log.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE components 
+        PUBLIC "-//AJAX4JSF//CDK Generator config/EN"
+        "https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" [
+<!ENTITY universal_html_attributes   SYSTEM "html_universal_attributes.xml">	
+]>
+
+<components>
+     	<component>
+		<name>org.ajax4jsf.Log</name>
+		<family>org.ajax4jsf.Log</family>
+		<classname>org.ajax4jsf.ajax.html.AjaxLog</classname>
+		<superclass>org.ajax4jsf.ajax.UIAjaxLog</superclass>
+		<description>
+			<![CDATA[
+		Encode javaScript to open popup window with client-side Log information.
+		]]>
+		</description>
+		<renderer generate="true">
+			<name>org.ajax4jsf.LogRenderer</name>
+			<template>org/ajax4jsf/renderkit/html/log.jspx</template>
+		</renderer>
+		<tag>
+			<name>log</name>
+			<classname>org.ajax4jsf.taglib.ajax.LogTag</classname>
+			<superclass>
+				org.ajax4jsf.framework.taglib.UIComponentTagBase
+			</superclass>
+			<displayname>pop-up window with request log</displayname>
+			<icon>icon</icon>
+		</tag>
+		&ui_component_attributes;
+		<property>
+			<name>hotkey</name>
+			<classname>java.lang.String</classname>
+			<description>
+				Keyboard key for activate ( in combination with
+				CTRL+SHIFT ) log window.
+			</description>
+			<defaultvalue>"L"</defaultvalue>
+		</property>
+		<property>
+			<name>name</name>
+			<classname>java.lang.String</classname>
+			<description>name of pop-up window</description>
+			<defaultvalue>"LogWindow"</defaultvalue>
+		</property>
+		<property>
+			<name>level</name>
+			<classname>java.lang.String</classname>
+			<description>
+				log level, possible values :
+				FATAL,ERROR,WARN,INFO,DEBUG,ALL.
+				Component set level 'ALL' by default.
+			</description>
+			<defaultvalue>"ALL"</defaultvalue>
+		</property>
+		<property>
+			<name>width</name>
+			<classname>java.lang.String</classname>
+			<description>width of pop-up.</description>
+			<defaultvalue>"800"</defaultvalue>
+		</property>
+		<property>
+			<name>height</name>
+			<classname>java.lang.String</classname>
+			<description>height of pop-up</description>
+			<defaultvalue>"600"</defaultvalue>
+		</property>
+		<property>
+			<name>popup</name>
+			<classname>boolean</classname>
+			<description>
+				Render log as popup-window or as div element in page
+			</description>
+			<defaultvalue>true</defaultvalue>
+		</property>
+	</component>     
+</components>
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/config/component/mediaOutput.xml
===================================================================
--- branches/refactor1/framework/impl/src/main/config/component/mediaOutput.xml	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/config/component/mediaOutput.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,169 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE components 
+        PUBLIC "-//AJAX4JSF//CDK Generator config/EN"
+        "https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" [
+<!ENTITY universal_html_attributes   SYSTEM "html_universal_attributes.xml">	
+]>
+
+<components>
+     	<component>
+		<name>org.ajax4jsf.MediaOutput</name>
+		<family>org.ajax4jsf.Resource</family>
+		<classname>org.ajax4jsf.ajax.html.MediaOutput</classname>
+		<superclass>
+			org.ajax4jsf.ajax.resource.UIMediaOutput
+		</superclass>
+		<description>
+			<![CDATA[Class for create any link-type elements to user-generated resources :
+		images, sounds, video, active objects, applets etc.
+		Method specified in "CreateContent" attribute will put the data from Data Bean specified
+		 in "value" attribute to the OutputStream. Important: Data Bean specified in "value" must implement Serializable.
+		]]>
+		</description>
+		<renderer>
+			<name>org.ajax4jsf.MediaOutputRenderer</name>
+			<classname>
+				org.ajax4jsf.renderkit.html.MediaOutputRenderer
+			</classname>
+		</renderer>
+		<tag>
+			<name>mediaOutput</name>
+			<classname>
+				org.ajax4jsf.taglib.ajax.MediaOutputTag
+			</classname>
+			<superclass>
+				org.ajax4jsf.framework.taglib.UIComponentTagBase
+			</superclass>
+			<displayname>Link to user-generated resource</displayname>
+			<icon>icon</icon>
+		</tag>
+		<taghandler generate="false">
+			<classname>org.ajax4jsf.taglib.html.facelets.MediaOutputHandler</classname>
+		</taghandler>
+		&ui_component_attributes;
+		&html_event_handler_attributes;
+		&html_universal_attributes;
+		&html_anchor_attributes;
+		&html_img_attributes;
+		<property>
+			<name>usemap</name>
+			<classname>java.lang.String</classname>
+			<description>use client-side image map</description>
+		</property>
+		<property>
+			<name>ismap</name>
+			<classname>boolean</classname>
+			<description>use server-side image map</description>
+		</property>
+		<property>
+			<name>declare</name>
+			<classname>java.lang.String</classname>
+			<description>
+				declare but don't instantiate flag
+			</description>
+		</property>
+		<property>
+			<name>classid</name>
+			<classname>java.lang.String</classname>
+			<description>identifies an implementation</description>
+		</property>
+		<property>
+			<name>codebase</name>
+			<classname>java.lang.String</classname>
+			<description>
+				base URI for classid, data, archive
+			</description>
+		</property>
+		<property>
+			<name>codetype</name>
+			<classname>java.lang.String</classname>
+			<description>content type for code</description>
+		</property>
+		<property>
+			<name>archive</name>
+			<classname>java.lang.String</classname>
+			<description>space-separated list of URIs</description>
+		</property>
+		<property>
+			<name>standby</name>
+			<classname>java.lang.String</classname>
+			<description>message to show while loading</description>
+		</property>
+		<property>
+			<name>element</name>
+			<classname>java.lang.String</classname>
+			<description>
+				<![CDATA[Name of html element for resource link - may be <a> <img> <object> <applet> <script> or <link> ]]>
+			</description>
+		</property>
+		<property>
+			<name>uriAttribute</name>
+			<classname>java.lang.String</classname>
+			<description>
+				<![CDATA[Name of attribute for resource-link attribute ( 'href' for <a>, 'src' for <img> or <script>, etc ]]>
+			</description>
+		</property>
+
+		<property>
+			<name>mimeType</name>
+			<classname>java.lang.String</classname>
+			<description>
+				Geterated content mime-type for append to response
+				header ( 'image/jpeg' etc )
+			</description>
+		</property>
+		<property>
+			<name>value</name>
+			<description>
+				<![CDATA[
+                Data value calculated at render time and stored in  URI (also as part of cache Key ),
+                at generation time passed to send method. Can be used for update cache at change of  generating
+                conditions, and for creating  beans as "Lightweight" pattern components (request scope).
+                IMPORTANT: Since serialized data stored in URI, avoid using big objects.
+                ]]>
+			</description>
+		</property>
+		<property elonly="true">
+			<name>createContent</name>
+			<classname>javax.faces.el.MethodBinding</classname>
+			<description>
+				<![CDATA[
+        Method call expression to send generated resource to OutputStream. It must have two parameter with a type of java.io.OutputStream 
+        and java.lang.Object ( deserialized value of data attribute )
+          ]]>
+			</description>
+			<methodargs>
+				java.io.OutputStream.class,java.lang.Object.class
+			</methodargs>
+		</property>
+		<property>
+			<name>converter</name>
+			<classname>javax.faces.convert.Converter</classname>
+			<description>
+				ID of a converter to be used or a reference to a
+				converter.
+			</description>
+		</property>
+		<property>
+			<name>cacheable</name>
+			<classname>boolean</classname>
+			<description>If "true", the resource is cached (on the server and the client sides).</description>
+		</property>
+		<property>
+			<name>expires</name>
+			<classname>java.util.Date</classname>
+			<description>The attribute allows to manage caching and defines the period after which a resource is reloaded.</description>
+		</property>
+		<property>
+			<name>session</name>
+			<classname>boolean</classname>
+			<description>If "true", a session for an object generation is restored.</description>
+		</property>
+		<property>
+			<name>lastModified</name>
+			<classname>java.util.Date</classname>
+			<description>The attribute allows to manage caching. A browser can send request with the header "If-Modified-Since" for necessity of object reloading. If time of modification is earlier, then the framework doesn't call generation and return code 304.
+			</description>
+		</property>
+	</component>     
+</components>
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/config/component/outputPanel.xml
===================================================================
--- branches/refactor1/framework/impl/src/main/config/component/outputPanel.xml	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/config/component/outputPanel.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE components 
+        PUBLIC "-//AJAX4JSF//CDK Generator config/EN"
+        "https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" [
+<!ENTITY universal_html_attributes   SYSTEM "html_universal_attributes.xml">	
+]>
+
+<components>
+     	<component>
+		<name>org.ajax4jsf.ajax.OutputPanel</name>
+		<family>javax.faces.Panel</family>
+		<classname>
+			org.ajax4jsf.ajax.html.HtmlAjaxOutputPanel
+		</classname>
+		<superclass>org.ajax4jsf.ajax.UIAjaxOutputPanel</superclass>
+		<description>
+			<![CDATA[
+    	Creates an AJAX-enabled part of the page. For a normal request,
+    render a &amp;lt;span&amp;gt; or &amp;lt;div&amp;gt; HTML element
+    depending on the value of the "layout" attribute, "inline" or "block".
+    (The "id" attribute will be the value of the clientId property.) For an
+    AJAX request, the content of this element is included in the response if
+    the value of the property, "ajaxRendered", is set to true.
+    ]]>
+		</description>
+		<displayname>Ajax panel</displayname>
+		<icon>icon</icon>
+		<renderer generate="false" override="false">
+			<name>org.ajax4jsf.components.AjaxOutputPanelRenderer</name>
+			<classname>
+				org.ajax4jsf.renderkit.html.AjaxOutputPanelRenderer
+			</classname>
+			<!-- 
+				<superclass>javax.faces.renderer.Renderer</superclass>
+			-->
+			<description>
+				Performs functions for decoding AJAX requests and
+				building client script for events.
+			</description>
+			<displayname>renderer for Ajax OutputPanel</displayname>
+			<icon>icon</icon>
+		</renderer>
+		<tag>
+			<name>outputPanel</name>
+			<classname>
+				org.ajax4jsf.taglib.ajax.AjaxOutputPanel
+			</classname>
+			<superclass>
+				org.ajax4jsf.framework.taglib.UIComponentTagBase
+			</superclass>
+			<displayname>Ajax OutputPanel</displayname>
+			<icon>icon</icon>
+		</tag>
+		&ui_panel_attributes;
+		&html_universal_attributes;
+		&html_event_handler_attributes;
+		&ajax_output_attributes;
+		<property>
+			<name>ajaxRendered</name>
+			<classname>boolean</classname>
+			<description>
+				Defines, whether the content of this component must be
+				(or not) included in AJAX response created by parent
+				AJAX Container, even if it is not forced by reRender
+				list of ajax action. Ignored if component marked to
+				output by Ajax action. default false
+			</description>
+			<defaultvalue>false</defaultvalue>
+		</property>
+		<property>
+			<name>layout</name>
+			<classname>java.lang.String</classname>
+			<description>
+				<![CDATA[
+			HTML layout for generated markup. Possible values: "block"
+            for generating an HTML &lt;div&gt; element, "inline" for
+            generating an HTML &lt;span&gt; element, and "none" for generating
+            no HTML element. There is a minor exception for the "none" case
+            where a child element has the property "rendered" set to "false".
+            In this case, we create an empty &lt;span&gt; element with same ID
+            as the child element to use as a placeholder for later
+            processing.
+			]]>
+			</description>
+			<defaultvalue>"inline"</defaultvalue>
+		</property>
+		<property>
+			<name>keepTransient</name>
+			<classname>boolean</classname>
+			<description>
+				<![CDATA[
+				Flag for mark all child components to non-transient. If
+            true, all children components will be set to non-transient state
+            and keep in saved components tree. For output in self-renderer
+            region all content ( By default, all content in &lt;f:verbatim&gt;
+            tags and non-jsf elements in facelets, marked as transient -
+            since, self-rendered ajax regions don't plain output for ajax
+            processing ).
+			]]>
+			</description>
+			<defaultvalue>true</defaultvalue>
+		</property>
+	</component>
+     
+</components>
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/config/component/page.xml
===================================================================
--- branches/refactor1/framework/impl/src/main/config/component/page.xml	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/config/component/page.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE components 
+        PUBLIC "-//AJAX4JSF//CDK Generator config/EN"
+        "https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" [
+<!ENTITY universal_html_attributes   SYSTEM "html_universal_attributes.xml">	
+]>
+
+<components>
+     	<component>
+		<name>org.ajax4jsf.components.Page</name>
+		<family>org.ajax4jsf.components.AjaxRegion</family>
+		<classname>org.ajax4jsf.ajax.html.HtmlPage</classname>
+		<superclass>org.ajax4jsf.ajax.UIAjaxRegion</superclass>
+		<description>
+			This component renders a full HTML page structure. It must
+			be the first (and only) child for the view root (JSP
+			&lt;f:view&gt; tag). No HTML code can be outside of this
+			component. It also has support for processing child
+			components in AJAX requests, just like &lt;a4j:region&gt;.
+			For a normal request, it will render the results of a
+			&lt;script&gt; element with a client-side library at the
+			page's &lt;head&gt;. If this component includes a "head"
+			facet, the facet's content will also be rendered at the
+			&lt;head&gt; element. For an AJAX request, only affected
+			components in the full document structure will be rendered.
+			<br />
+			Here's an example of using it in JSP (jspx version):
+			&lt;jsp:root xmlns:.... &lt;f:view&gt;
+			&lt;a4j:page&gt;&lt;f:facet name="head"&gt; ...
+			&lt;/f:facet&gt; &lt;!-- page content here --&gt;
+			&lt;/a4j:page&gt; &lt;/f:view&gt;&lt;/jsp:root&gt;
+		</description>
+		<displayname>Page</displayname>
+		<icon>icon</icon>
+		<facet>
+			<name>head</name>
+			<description>
+				Content of this facet in HTML head.
+			</description>
+		</facet>
+		<renderer generate="false" override="false">
+			<name>org.ajax4jsf.components.AjaxPageRenderer</name>
+			<classname>
+				org.ajax4jsf.renderkit.html.AjaxPageRenderer
+			</classname>
+			<!-- 
+				<superclass>javax.faces.renderer.Renderer</superclass>
+			-->
+			<description>Renderer for HTML page</description>
+			<displayname>Renderer for HTML page</displayname>
+			<icon>icon</icon>
+		</renderer>
+		<tag>
+			<name>page</name>
+			<classname>org.ajax4jsf.taglib.ajax.AjaxPage</classname>
+			<superclass>
+				org.ajax4jsf.framework.taglib.HtmlComponentTagBase
+			</superclass>
+			<displayname>Ajax Page</displayname>
+			<icon>icon</icon>
+		</tag>
+		&ui_component_attributes;
+		&ajax_region_attributes;
+		&html_universal_attributes;
+		<property hidden="true" existintag="true">
+			<name>renderRegionOnly</name>
+			<classname>boolean</classname>
+			<description>
+				Flag to disable rendering in AJAX responses content
+				outside of active region. If this attribute set to
+				"true" , no one of the components outside of region will
+				be included to AJAX response. If set to "false", search
+				for components to include in response will be performed
+				on all tree. Default "true"
+			</description>
+			<defaultvalue>true</defaultvalue>
+		</property>
+		<property>
+			<name>pageTitle</name>
+			<classname>java.lang.String</classname>
+			<description>
+				String for output as a page title.
+			</description>
+		</property>
+		<property>
+			<name>onload</name>
+			<classname>java.lang.String</classname>
+			<description>
+				JavaScript code to execute on a page load.
+			</description>
+		</property>
+		<property>
+			<name>onunload</name>
+			<classname>java.lang.String</classname>
+			<description>
+				JavaScript code to execute on a page unload.
+			</description>
+		</property>
+		<property>
+			<name>format</name>
+			<classname>java.lang.String</classname>
+			<description>
+				<![CDATA[Page layout format ( html, xhtml, html-transitional, html-3.2 ) for encoding DOCTYPE, namespace and Content-Type definitions]]>
+			</description>
+		</property>
+		<property>
+			<name>contentType</name>
+			<classname>java.lang.String</classname>
+			<description>
+				<![CDATA[Set custom mime content type to response]]>
+			</description>
+		</property>
+		<property>
+			<name>namespace</name>
+			<classname>java.lang.String</classname>
+			<description>
+				<![CDATA[Set html element default namespace]]>
+			</description>
+		</property>
+	</component>
+     
+</components>
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/config/component/poll.xml
===================================================================
--- branches/refactor1/framework/impl/src/main/config/component/poll.xml	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/config/component/poll.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE components 
+        PUBLIC "-//AJAX4JSF//CDK Generator config/EN"
+        "https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" [
+<!ENTITY universal_html_attributes   SYSTEM "html_universal_attributes.xml">	
+]>
+
+<components>
+     	<component>
+		<name>org.ajax4jsf.ajax.Poll</name>
+		<family>org.ajax4jsf.components.AjaxPoll</family>
+		<classname>org.ajax4jsf.ajax.html.AjaxPoll</classname>
+		<superclass>org.ajax4jsf.ajax.UIPoll</superclass>
+		<description>
+			Periodically perform AJAX request to server, to simulate
+			'poll' data.
+			<br />
+		</description>
+		<displayname>Ajax Poll</displayname>
+		<icon>icon</icon>
+		<renderer generate="false" override="false">
+			<name>org.ajax4jsf.components.AjaxPollRenderer</name>
+			<classname>
+				org.ajax4jsf.renderkit.html.AjaxPollRenderer
+			</classname>
+			<!-- 
+				<superclass>javax.faces.renderer.Renderer</superclass>
+			-->
+			<description>
+				Perform functions for decoding AJAX requests and
+				building client script for events.
+			</description>
+			<displayname>renderer for Ajax Poll</displayname>
+			<icon>icon</icon>
+		</renderer>
+		<tag>
+			<name>poll</name>
+			<classname>org.ajax4jsf.taglib.ajax.AjaxPollTag</classname>
+			<superclass>
+				org.ajax4jsf.framework.taglib.UIComponentTagBase
+			</superclass>
+			<displayname>Ajax Poll</displayname>
+			<icon>icon</icon>
+		</tag>
+		<taghandler>
+			<classname>org.ajax4jsf.taglib.html.facelets.AjaxComponentHandler</classname>
+		</taghandler>
+		&ui_component_attributes;
+		&ui_command_attributes;
+		&ajax_component_attributes;
+		<property>
+			<name>actionExpression</name>
+			<classname>java.lang.String</classname>
+			<description>The action method binding expression.</description>
+		</property>			
+		<property>
+			<name>onsubmit</name>
+			<classname>java.lang.String</classname>
+			<description>
+				JavaScript code for call before submission of ajax
+				event
+			</description>
+		</property>
+		<property>
+			<name>interval</name>
+			<classname>int</classname>
+			<description>
+				Interval (in ms) for call poll requests. Default value
+				1000 (1 sec)
+			</description>
+			<defaultvalue>1000</defaultvalue>
+		</property>
+		<property>
+			<name>enabled</name>
+			<classname>boolean</classname>
+			<description>
+				<![CDATA[Enable/disable polling]]>
+			</description>
+			<defaultvalue>true</defaultvalue>
+		</property>
+		<property hidden="true">
+			<name>value</name>
+			<classname>java.lang.Object</classname>
+		</property>
+		<property hidden="true">
+			<name>submitted</name>
+			<classname>boolean</classname>
+		</property>
+		<property hidden="true">
+			<name>requestDelay</name>
+			<classname>int</classname>
+		</property>
+		<property>
+			<name>ignoreDupResponses</name>
+			<classname>boolean</classname>
+			<description>If true, unfinished request will be aborted on new event.</description>
+		</property>
+		<property>
+			<name>timeout</name>
+			<classname>int</classname>
+			<description>Timeout (in ms) for request</description>
+		</property>
+	</component>     
+</components>
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/config/component/portlet.xml
===================================================================
--- branches/refactor1/framework/impl/src/main/config/component/portlet.xml	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/config/component/portlet.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE components 
+        PUBLIC "-//AJAX4JSF//CDK Generator config/EN"
+        "https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" [
+<!ENTITY universal_html_attributes   SYSTEM "html_universal_attributes.xml">	
+]>
+
+<components>
+     	<component>
+		<name>org.ajax4jsf.Portlet</name>
+		<classname>
+			org.ajax4jsf.ajax.html.HtmlPortlet
+		</classname>
+		<superclass>org.ajax4jsf.ajax.UIPortlet</superclass>
+		<description>
+			<![CDATA[
+		]]>
+		</description>
+		<tag>
+			<name>portlet</name>
+			<classname>org.ajax4jsf.taglib.ajax.Portlet</classname>
+			<superclass>
+				org.ajax4jsf.framework.taglib.HtmlComponentTagBase
+			</superclass>
+			<description>
+			<![CDATA[
+				]]>
+			</description>
+		</tag>
+		&ui_component_attributes;
+	</component>
+     
+</components>
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/config/component/push.xml
===================================================================
--- branches/refactor1/framework/impl/src/main/config/component/push.xml	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/config/component/push.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE components 
+        PUBLIC "-//AJAX4JSF//CDK Generator config/EN"
+        "https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" [
+<!ENTITY universal_html_attributes   SYSTEM "html_universal_attributes.xml">	
+]>
+
+<components>
+     	<component>
+		<name>org.ajax4jsf.ajax.Push</name>
+		<family>org.ajax4jsf.components.AjaxPush</family>
+		<classname>org.ajax4jsf.ajax.html.AjaxPush</classname>
+		<superclass>org.ajax4jsf.ajax.UIPush</superclass>
+		<description>
+			Periodically perform AJAX request to server, to simulate
+			'push' data.
+			<br />
+		</description>
+		<displayname>Ajax Push</displayname>
+		<icon>icon</icon>
+		<renderer generate="false" override="false">
+			<name>org.ajax4jsf.components.AjaxPushRenderer</name>
+			<classname>
+				org.ajax4jsf.renderkit.html.AjaxPushRenderer
+			</classname>
+			<!-- 
+				<superclass>javax.faces.renderer.Renderer</superclass>
+			-->
+			<description>
+				Perform functions for decoding AJAX requests and
+				building client script for events.
+			</description>
+			<displayname>renderer for Ajax Push</displayname>
+			<icon>icon</icon>
+		</renderer>
+		<tag>
+			<name>push</name>
+			<classname>org.ajax4jsf.taglib.ajax.AjaxPushTag</classname>
+			<superclass>
+				org.ajax4jsf.framework.taglib.UIComponentTagBase
+			</superclass>
+			<displayname>Ajax Push</displayname>
+			<icon>icon</icon>
+		</tag>
+		<taghandler generate="true">
+			<classname>org.ajax4jsf.taglib.html.facelets.AjaxPushHandler</classname>
+			<superclass>org.ajax4jsf.taglib.html.facelets.AjaxComponentHandler</superclass>
+		</taghandler>
+		&ui_component_attributes;
+		&ui_command_attributes;
+		&ajax_component_attributes;
+	    <property elonly="true"  attachedstate="true">
+        	<name>eventProducer</name>
+        	<classname>javax.faces.el.MethodBinding</classname>
+        	<description>
+            MethodBinding pointing at method accepting  an PushEventListener with return type void.
+            User bean must register this listener and send EventObject to this listener on ready.
+        </description>
+        <methodargs>java.util.EventListener.class</methodargs>
+    </property>
+		<property>
+			<name>actionExpression</name>
+			<classname>java.lang.String</classname>
+			<description>The action method binding expression.</description>
+		</property>
+		<!-- 
+		<property>
+			<name>onsubmit</name>
+			<classname>java.lang.String</classname>
+			<description>
+				JavaScript code for call before submission of ajax
+				event
+			</description>
+		</property>
+		 -->
+		<property>
+			<name>interval</name>
+			<classname>int</classname>
+			<description>
+				Interval (in ms) for call push requests. Default value
+				1000 (1 sec)
+			</description>
+		</property>
+		<property>
+			<name>enabled</name>
+			<classname>boolean</classname>
+			<description>
+				<![CDATA[Enable/disable pushing]]>
+			</description>
+			<defaultvalue>true</defaultvalue>
+		</property>
+		<property hidden="true">
+			<name>value</name>
+			<classname>java.lang.Object</classname>
+		</property>
+		<property hidden="true">
+			<name>submitted</name>
+			<classname>boolean</classname>
+		</property>
+		<property hidden="true">
+			<name>requestDelay</name>
+			<classname>int</classname>
+		</property>
+		<property>
+			<name>ignoreDupResponses</name>
+			<classname>boolean</classname>
+			<description>If true, unfinished request will be aborted on new event.</description>
+		</property>
+		<property>
+			<name>timeout</name>
+			<classname>int</classname>
+			<description>Timeout (in ms) for request</description>
+		</property>
+	</component>     
+</components>
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/config/component/region.xml
===================================================================
--- branches/refactor1/framework/impl/src/main/config/component/region.xml	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/config/component/region.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE components 
+        PUBLIC "-//AJAX4JSF//CDK Generator config/EN"
+        "https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" [
+<!ENTITY universal_html_attributes   SYSTEM "html_universal_attributes.xml">	
+]>
+
+<components>
+     	<component>
+		<name>org.ajax4jsf.ajax.AjaxRegion</name>
+		<family>org.ajax4jsf.components.AjaxRegion</family>
+		<classname>org.ajax4jsf.ajax.html.HtmlAjaxRegion</classname>
+		<superclass>org.ajax4jsf.ajax.UIAjaxRegion</superclass>
+		<description>
+			<![CDATA[Root view for ajax areas on the page. It must either be a 
+			nested tag inside the <body> tag inside of the 
+			<html> tag or, if selfRendered="true", it can be 
+			in any part of the page. Decode: Obtain the Map from the
+			"requestParameterMap" property of the ExternalContext. If
+			the value in Map for the "AJAXREQUEST" is not null, and equals
+			to value of the "clientId" property of the component, set
+			ajaxRequest property to true, create AjaxEvent around the
+			component, and pass it to the queueEvent() method of the
+			component, which must be an instance of AjaxContainer
+			Rendering : On standart JSF request, insert &lt;script&gt;
+			element with link to Ajax client-side javaScript at start
+			tag position. If performed Ajax request, invoke listeners
+			and render only affected to request components. List of
+			clientId of rendered components set as special response
+			headers and hidden &lt;span&gt; html element. With
+			'selfRendered' attribute set as "true", render affected
+			components at Invoke Application phase - produce
+			&lt;html&gt;&lt;body&gt; elements, render affected
+			components and set responseComplete at FacesContext. In this
+			case, JSP page not rendered. Since, Jstl or other JSP tags
+			must not be used inside &lt;a4jx:region&gt; with immediate
+			flag.]]>
+		</description>
+		<displayname>Ajax Region</displayname>
+		<icon>icon</icon>
+		<renderer generate="false" override="false">
+			<name>org.ajax4jsf.components.AjaxRegionRenderer</name>
+			<classname>
+				org.ajax4jsf.renderkit.html.AjaxRegionRenderer
+			</classname>
+			<!-- 
+				<superclass>javax.faces.renderer.Renderer</superclass>
+			-->
+			<description>test renderer description</description>
+			<displayname>renderer for Ajax Region</displayname>
+			<icon>icon</icon>
+		</renderer>
+		<tag>
+			<name>region</name>
+			<classname>org.ajax4jsf.taglib.ajax.AjaxRegion</classname>
+			<superclass>
+				org.ajax4jsf.framework.taglib.HtmlComponentTagBase
+			</superclass>
+			<description>
+				<![CDATA[This tag defines a part of the JSF Tree that is to be decoded on the
+    server side during AJAX request processing]]>
+			</description>
+			<displayname>Ajax Region</displayname>
+			<icon>icon</icon>
+		</tag>
+		&ui_component_attributes;
+		&ajax_region_attributes;
+		<property>
+			<name>renderRegionOnly</name>
+			<classname>boolean</classname>
+			<description>
+				Flag to disable rendering in AJAX responses content
+				outside of active region. If this attribute set to
+				"true" , no one of the components outside of region will
+				be included to AJAX response. If set to "false", search
+				for components to include in response will be performed
+				on all tree. Default "true"
+			</description>
+			<defaultvalue>false</defaultvalue>
+		</property>
+	</component>
+     
+</components>
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/config/component/repeat.xml
===================================================================
--- branches/refactor1/framework/impl/src/main/config/component/repeat.xml	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/config/component/repeat.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE components 
+        PUBLIC "-//AJAX4JSF//CDK Generator config/EN"
+        "https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" [
+<!ENTITY universal_html_attributes   SYSTEM "html_universal_attributes.xml">	
+]>
+
+<components>
+     	<component>
+		<name>org.ajax4jsf.ajax.Repeat</name>
+		<family>javax.faces.Data</family>
+		<classname>org.ajax4jsf.ajax.html.HtmlAjaxRepeat</classname>
+		<superclass>org.ajax4jsf.ajax.repeat.UIRepeat</superclass>
+		<description>
+			<![CDATA[
+    ]]>
+		</description>
+		<displayname>Ajax-enabled repeater</displayname>
+		<icon>icon</icon>
+		<renderer generate="false" override="false">
+			<name>org.ajax4jsf.components.RepeatRenderer</name>
+			<classname>
+				org.ajax4jsf.renderkit.html.RepeatRenderer
+			</classname>
+			<!-- 
+				<superclass>javax.faces.renderer.Renderer</superclass>
+			-->
+			<description></description>
+			<displayname>
+				renderer for Ajax-enabled repeater
+			</displayname>
+			<icon>icon</icon>
+		</renderer>
+		<tag>
+			<name>repeat</name>
+			<classname>org.ajax4jsf.taglib.ajax.AjaxRepeat</classname>
+			<superclass>
+				org.ajax4jsf.framework.taglib.UIComponentTagBase
+			</superclass>
+			<displayname>Ajax-enabled repeater</displayname>
+			<icon>icon</icon>
+		</tag>
+		&ui_data_attributes;
+		&ui_component_attributes;
+		<property>
+			<name>componentState</name>
+			<classname>java.lang.String</classname>
+			<description>It defines EL-binding  for a component state for saving or redefinition.</description>
+		</property>		
+		<property>
+			<name>stateVar</name>
+			<classname>java.lang.String</classname>
+			<description>The attribute  provides access to a component state on the client side.</description>
+		</property>		
+		<property>
+			<name>value</name>
+			<classname>java.lang.String</classname>
+			<description>The current value for this component.</description>
+		</property>
+		<property>
+			<name>ajaxKeys</name>
+			<classname>java.lang.String</classname>
+			<description>This attribute defines strings that are updated after an AJAX request.</description>
+		</property>
+		<property>
+			<name>rowKeyVar</name>
+			<classname>java.lang.String</classname>
+			<description>The attribute  provides access to a row key in a Request scope.</description>
+		</property>
+		<property hidden="true">
+			<name>rowKey</name>
+			<classname>java.lang.String</classname>
+			<description>RowKey is a representation of an identifier for a specific data row.</description>
+		</property>
+
+	</component>     
+</components>
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/config/component/status.xml
===================================================================
--- branches/refactor1/framework/impl/src/main/config/component/status.xml	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/config/component/status.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,172 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE components 
+        PUBLIC "-//AJAX4JSF//CDK Generator config/EN"
+        "https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" [
+<!ENTITY universal_html_attributes   SYSTEM "html_universal_attributes.xml">	
+]>
+
+<components>
+     	<component>
+		<name>org.ajax4jsf.ajax.Status</name>
+		<family>javax.faces.Panel</family>
+		<classname>org.ajax4jsf.ajax.html.HtmlAjaxStatus</classname>
+		<superclass>org.ajax4jsf.ajax.UIAjaxStatus</superclass>
+		<description><![CDATA[
+			Renders area for indicating Ajax request status on the
+			client-side.
+			<br />
+			During Encoding: Creates two "span" elements with id created
+			as clientId of this component or of target AJAX region
+			(pointed to by the "for" property) with appended
+			":status.start" and ":status:stop" strings.
+			<br />
+			"start" span has "display:none" style (hidden). Inside this
+			span, renders the value of the startText/stopText properties
+			or, if they exist, the content of "start" and "stop" facets.
+			<br />
+			On performing an AJAX request, the client-side script
+			changes the visibility of the "start" span and hides "stop".
+			After all requests for this indicator are completed,
+			restores "stop" and hide "start" start[style,styleClass] and
+			stop[style,styleClass] are rendered for spans as style and
+			class atributes, respectivetly.
+			<br />
+			During Encoding: Creates two "span" or "div"(depending on
+			'layout' attribute) elements with id created as clientId of
+			this component or of target AJAX region (pointed to by the
+			"for" property) with appended ":status.start" and
+			":status:stop" strings. "start" element has "display:none"
+			style (hidden). Inside this element, renders the value of
+			the startText/stopText properties or, if they exist, the
+			content of "start" and "stop" facets. On performing an AJAX
+			request, the client-side script changes the visibility of
+			the "start" element and hides "stop". After all requests for
+			this indicator are completed, restores "stop" and hide
+			"start"
+			<br />
+			start[style,styleClass] and stop[style,styleClass] are
+			rendered for spans as style and class atributes,
+			respectivetly.
+			]]>
+		</description>
+		<facet>
+			<name>start</name>
+			<description>
+				The content of this facet will be displayed during a
+				request.
+			</description>
+		</facet>
+		<facet>
+			<name>stop</name>
+			<description>
+				The content of this facet will be displayed after a
+				request is completed.
+			</description>
+		</facet>
+		<renderer>
+			<name>org.ajax4jsf.components.AjaxStatusRenderer</name>
+			<classname>
+				org.ajax4jsf.renderkit.html.AjaxStatusRenderer
+			</classname>
+		</renderer>
+		<tag>
+			<name>status</name>
+			<classname>org.ajax4jsf.taglib.ajax.AjaxStatus</classname>
+			<superclass>
+				org.ajax4jsf.framework.taglib.UIComponentTagBase
+			</superclass>
+		</tag>
+		&ui_panel_attributes;
+		&html_event_handler_attributes;
+		&html_universal_attributes;
+		<property>
+			<name>for</name>
+			<classname>java.lang.String</classname>
+			<description>
+				ID of the AjaxContainer component whose status is
+				indicated (in the format of a
+				javax.faces.UIComopnent.findComponent() call).
+			</description>
+		</property>
+
+		<property>
+			<name>forceId</name>
+			<classname>boolean</classname>
+			<description>
+				If true, render the ID of the component in HTML code
+				without JSF modifications.
+			</description>
+		</property>
+		<property>
+			<name>startText</name>
+			<classname>java.lang.String</classname>
+			<description>
+				Text for display on starting request.
+			</description>
+		</property>
+		<property>
+			<name>stopText</name>
+			<classname>java.lang.String</classname>
+			<description>
+				Text for display on request complete.
+			</description>
+		</property>
+
+		<property>
+			<name>startStyle</name>
+			<classname>java.lang.String</classname>
+			<description>
+				CSS style class for the element displayed on the start
+				of a request.
+			</description>
+		</property>
+		<property>
+			<name>stopStyle</name>
+			<classname>java.lang.String</classname>
+			<description>
+				CSS style for element displayed on request completion.
+			</description>
+		</property>
+
+		<property>
+			<name>layout</name>
+			<classname>java.lang.String</classname>
+			<description>
+				Define visual layout of panel, can be "block" or
+				"inline".
+			</description>
+		</property>
+
+		<property>
+			<name>startStyleClass</name>
+			<classname>java.lang.String</classname>
+			<description>
+				CSS style class for the element displayed on the start
+				of a request.
+			</description>
+		</property>
+		<property>
+			<name>stopStyleClass</name>
+			<classname>java.lang.String</classname>
+			<description>
+				CSS style class for element displayed on request
+			</description>
+		</property>
+		<property>
+			<name>onstart</name>
+			<classname>java.lang.String</classname>
+			<description>
+				JavaScript code, called on the start
+				of a request.
+			</description>
+		</property>
+		<property>
+			<name>onstop</name>
+			<classname>java.lang.String</classname>
+			<description>
+				JavaScript code, called on the stop
+				of a request.
+			</description>
+		</property>
+	</component>     
+</components>
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/config/component/support.xml
===================================================================
--- branches/refactor1/framework/impl/src/main/config/component/support.xml	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/config/component/support.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,130 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE components 
+        PUBLIC "-//AJAX4JSF//CDK Generator config/EN"
+        "https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" [
+<!ENTITY universal_html_attributes   SYSTEM "html_universal_attributes.xml">	
+]>
+
+<components>
+     	<component>
+		<name>org.ajax4jsf.ajax.Support</name>
+		<family>org.ajax4jsf.components.AjaxSupport</family>
+		<classname>org.ajax4jsf.ajax.html.HtmlAjaxSupport</classname>
+		<superclass>org.ajax4jsf.ajax.UIAjaxSupport</superclass>
+		<description>
+			Adds the AJAX functionality for those UIComponent-based
+			componenent that have properties for JavaScript events.
+			<br />
+			During Decoding: If a request is Ajax-performed, obtains the
+			Map from the "requestParameterMap" property of the
+			ExternalContext. If this Map contains non null value for the
+			"clientId" key, creates a javax.faces.event.ActionEvent
+			around the component, passes it to the queueEvent() method
+			of the component, and then appends it's reRender components
+			IDs to a list of rendered areas.
+			<br />
+			During Encoding. Doesn't encode as a component. Instead, it
+			adds ValueBinding for a property of the parent component
+			with the name as a value of its "event" property. As a
+			result, when rendered, the parent component builds
+			JavaScript code for submitting an AJAX request on this
+			event.
+			<br />
+			If the component has child UIParameter components, appends
+			it's name/value as additional request parameters.
+			<br />
+			If a parent component is an instance of UIInput and the
+			ajaxType property is "input", submits the value of the input
+			field, also. In this case, you can submit a single input
+			field outside of UIForm.
+			<br />
+		</description>
+		<displayname>Ajax Support</displayname>
+		<icon>icon</icon>
+		<renderer generate="false" override="false">
+			<name>org.ajax4jsf.components.AjaxSupportRenderer</name>
+			<classname>
+				org.ajax4jsf.renderkit.html.AjaxSupportRenderer
+			</classname>
+			<!-- 
+				<superclass>javax.faces.renderer.Renderer</superclass>
+			-->
+			<description>
+				Perform functions for decoding AJAX requests and
+				building client script for events.
+			</description>
+			<displayname>renderer for Ajax Support</displayname>
+			<icon>icon</icon>
+		</renderer>
+		<tag>
+			<name>support</name>
+			<classname>org.ajax4jsf.taglib.ajax.AjaxSupport</classname>
+			<superclass>
+				org.ajax4jsf.taglib.html.jsp.AjaxSupportTag
+			</superclass>
+			<!-- 			<superclass>
+				org.ajax4jsf.framework.taglib.UIComponentTagBase
+				</superclass>
+			-->
+			<displayname>Ajax Support</displayname>
+			<icon>icon</icon>
+		</tag>
+		<taghandler>
+			<classname>org.ajax4jsf.taglib.html.facelets.AjaxSupportHandler</classname>
+		</taghandler>
+		&ui_component_attributes;
+		&ui_command_attributes;
+		&ajax_component_attributes;
+		<property>
+			<name>actionExpression</name>
+			<classname>java.lang.String</classname>
+			<description>The action method binding expression.</description>
+		</property>			
+		<property>
+			<name>onsubmit</name>
+			<classname>java.lang.String</classname>
+			<description>
+				JavaScript code for call before submission of ajax
+				event
+			</description>
+		</property>
+		<property>
+			<name>event</name>
+			<classname>java.lang.String</classname>
+			<description>
+				Name of JavaScript event property ( onclick, onchange,
+				etc.) of parent component, for which we will build AJAX
+				submission code
+			</description>
+		</property>
+		<property>
+			<name>disableDefault</name>
+			<classname>boolean</classname>
+			<description>
+				<![CDATA[Disable default action for target event ( append "return false;" to javascript )]]>
+			</description>
+			<defaultvalue>false</defaultvalue>
+		</property>
+		<property disabled="true">
+			<name>value</name>
+			<classname>java.lang.Object</classname>
+		</property>
+		<property disabled="true">
+			<name>parentProperties</name>
+		</property>
+		<property>
+			<name>ignoreDupResponses</name>
+			<classname>boolean</classname>
+			<description>
+				If true, unfinished request will be aborted on new event
+			</description>
+		</property>
+		<property>
+			<name>timeout</name>
+			<classname>int</classname>
+			<description>Timeout (in ms) for request</description>
+		</property>
+
+	</component>
+     
+</components>
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/config/faces/original-faces-config.xml
===================================================================
--- branches/refactor1/framework/impl/src/main/config/faces/original-faces-config.xml	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/config/faces/original-faces-config.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,75 @@
+<?xml version="1.0"?>
+<!DOCTYPE faces-config PUBLIC
+  "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
+  "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
+
+
+<faces-config>
+	<factory>
+		<render-kit-factory>org.ajax4jsf.framework.renderer.ChameleonRenderKitFactory</render-kit-factory>
+		<lifecycle-factory>org.ajax4jsf.framework.DebugLifecycleFactory</lifecycle-factory>
+	</factory>
+	<application>
+	<!-- 
+		<variable-resolver>org.ajax4jsf.framework.skin.SkinVariableResolver</variable-resolver>
+		<property-resolver>org.ajax4jsf.framework.skin.SkinPropertyResolver</property-resolver>
+	-->
+		<view-handler>org.ajax4jsf.framework.ajax.AjaxViewHandler</view-handler>
+		<state-manager>org.ajax4jsf.framework.ajax.AjaxStateManager</state-manager>
+	</application>
+  <lifecycle>
+  	<phase-listener>org.ajax4jsf.framework.renderer.AjaxPhaseListener</phase-listener>
+  	<phase-listener>org.ajax4jsf.framework.ajax.InitPhaseListener</phase-listener>
+  </lifecycle>
+    <managed-bean>
+       <managed-bean-name>a4j</managed-bean-name>
+       <managed-bean-class>org.ajax4jsf.framework.skin.VersionBean</managed-bean-class>
+       <managed-bean-scope>application</managed-bean-scope>
+    </managed-bean>
+    <managed-bean>
+       <managed-bean-name>a4jSkin</managed-bean-name>
+       <managed-bean-class>org.ajax4jsf.framework.skin.SkinBean</managed-bean-class>
+       <managed-bean-scope>application</managed-bean-scope>
+    </managed-bean>
+    <!-- 
+    <managed-bean>
+    	<managed-bean-name>ajaxContext</managed-bean-name>
+    	<managed-bean-class>org.ajax4jsf.framework.ajax.AjaxContext</managed-bean-class>
+    	<managed-bean-scope>request</managed-bean-scope>
+    </managed-bean>
+     -->
+    <component>
+
+        <component-type>javax.faces.ViewRoot</component-type>
+        <component-class>org.ajax4jsf.framework.ajax.AjaxViewRoot</component-class>
+
+        <component-extension>
+            <component-family>javax.faces.ViewRoot</component-family>
+        </component-extension>
+
+    </component>
+
+  <render-kit>
+
+    <renderer>
+      <description>
+        override the viewroot
+      </description>
+      <component-family>javax.faces.ViewRoot</component-family>
+      <renderer-type>javax.faces.ViewRoot</renderer-type>
+      <renderer-class>org.ajax4jsf.framework.renderer.AjaxViewRootRenderer</renderer-class>
+    </renderer>
+      <!-- 
+          <renderer>
+          <component-family>javax.faces.Form</component-family>
+          <renderer-type>javax.faces.Form</renderer-type>
+          <renderer-class>org.ajax4jsf.renderkit.html.AjaxFormRenderer</renderer-class>
+      </renderer>
+      <renderer>
+          <component-family>javax.faces.Command</component-family>
+          <renderer-type>javax.faces.Link</renderer-type>
+          <renderer-class>org.ajax4jsf.renderkit.html.HtmlCommandLinkRenderer</renderer-class>
+      </renderer>
+     -->
+   </render-kit>
+</faces-config>

Added: branches/refactor1/framework/impl/src/main/config/faces/original-faces-config.xml.l4t
===================================================================
--- branches/refactor1/framework/impl/src/main/config/faces/original-faces-config.xml.l4t	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/config/faces/original-faces-config.xml.l4t	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<PROCESS ENTITY="JSFProcess"/>

Added: branches/refactor1/framework/impl/src/main/config/resources/resources-config.xml
===================================================================
--- branches/refactor1/framework/impl/src/main/config/resources/resources-config.xml	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/config/resources/resources-config.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<resource-config>
+	<resource class="org.ajax4jsf.framework.ajax.AjaxScript">
+		<name>org.ajax4jsf.framework.ajax.AjaxScript</name>
+	</resource>
+	<resource class="org.ajax4jsf.framework.ajax.AjaxScript">
+		<name>ajax.js</name>
+	</resource>
+	<resource class="org.ajax4jsf.framework.resource.PrototypeScript">
+		<name>prototype.js</name>
+	</resource>
+	<resource class="org.ajax4jsf.dnd.DnDScript">
+		<name>dnd.js</name>
+	</resource>
+	<resource >
+		<name>form.js</name>
+		<path>/org/ajax4jsf/renderkit/html/scripts/form.js</path>
+		<renderer class="org.ajax4jsf.framework.resource.ScriptRenderer"/>
+	</resource>
+	<resource >
+		<name>org/ajax4jsf/renderers/ajax/scripts/form.js</name>
+		<path>/org/ajax4jsf/renderkit/html/scripts/form.js</path>
+		<renderer class="org.ajax4jsf.framework.resource.ScriptRenderer"/>
+	</resource>
+</resource-config>

Added: branches/refactor1/framework/impl/src/main/config/taglib/ajax.taglib.include
===================================================================
--- branches/refactor1/framework/impl/src/main/config/taglib/ajax.taglib.include	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/config/taglib/ajax.taglib.include	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,23 @@
+
+<facelet-taglib>
+ <tag>
+  <tag-name>ajaxListener</tag-name>
+		    <handler-class>
+				org.ajax4jsf.taglib.html.facelets.AjaxListenerHandler
+			</handler-class>
+	
+ </tag>
+ <tag>
+  <tag-name>facet</tag-name>
+		    <handler-class>
+				org.ajax4jsf.taglib.html.facelets.FacetHandler
+			</handler-class>
+	
+ </tag>
+ <tag>
+  <tag-name>keepAlive</tag-name>
+		    <handler-class>
+				org.ajax4jsf.taglib.html.facelets.KeepAliveHandler
+			</handler-class>	
+ </tag>
+</facelet-taglib>
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/config/taglib/ajax.tld.include
===================================================================
--- branches/refactor1/framework/impl/src/main/config/taglib/ajax.tld.include	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/config/taglib/ajax.tld.include	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,73 @@
+<taglib>
+
+	<tag>
+
+		<name>ajaxListener</name>
+
+		<tag-class>org.ajax4jsf.taglib.html.jsp.AjaxListenerTag</tag-class>
+
+		<description>
+
+			This works the same as ActionListener or ValueChangeListener, but for an AJAX container. Add the specified class
+
+			as a listener for AjaxEvent (sent in case of an AJAX request
+
+			for this container).
+
+		</description>
+
+		<attribute>
+
+			<name>type</name>
+
+			<required>true</required>
+
+			<rtexprvalue>false</rtexprvalue>
+
+			<description> Fully qualified Java class name of an AjaxListener to be created and registered.</description>
+
+		</attribute>
+
+	</tag>
+
+	<tag>
+
+		<name>keepAlive</name>
+
+		<tag-class>org.ajax4jsf.taglib.html.jsp.KeepAliveTag</tag-class>
+
+		<description>
+
+			This tag get bean by EL expression '#{'+name+'}' and store bean instance in component tree. After restoring view state, bean is putted to request-scope attributes with name.
+
+			Since, every view will be use own instance of bean for expressions '#{name....}'
+
+		</description>
+
+		<attribute>
+
+			<name>beanName</name>
+
+			<required>true</required>
+
+			<rtexprvalue>false</rtexprvalue>
+
+			<description> name of bean for EL-expressions.</description>
+
+		</attribute>
+
+		<attribute>
+
+			<name>ajaxOnly</name>
+
+			<required>false</required>
+
+			<rtexprvalue>false</rtexprvalue>
+
+			<description> if true, bean value restored in ajax requests only.</description>
+
+		</attribute>
+
+	</tag>
+
+</taglib>
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/META-INF/MANIFEST.MF
===================================================================
--- branches/refactor1/framework/impl/src/main/java/META-INF/MANIFEST.MF	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/META-INF/MANIFEST.MF	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path: 
+

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/FastFilter.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/FastFilter.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/FastFilter.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,27 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf;
+
+public class FastFilter extends
+		org.ajax4jsf.framework.ajax.xmlfilter.NekkoFilter {
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/Filter.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/Filter.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/Filter.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,34 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf;
+
+import org.ajax4jsf.framework.ajax.xmlfilter.TidyFilter;
+
+/**
+ * Proxy for resource/ajax xml parsing filter.
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:58:29 $
+ *
+ */
+public class Filter extends TidyFilter {
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/ForceRender.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/ForceRender.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/ForceRender.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,57 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.ajax;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+
+import org.ajax4jsf.framework.ajax.AjaxContext;
+import org.ajax4jsf.framework.ajax.AjaxEvent;
+import org.ajax4jsf.framework.ajax.AjaxListener;
+import org.ajax4jsf.framework.ajax.AjaxRenderEvent;
+import org.ajax4jsf.framework.ajax.AjaxRenderListener;
+
+/**
+ * @author shura
+ *
+ */
+public class ForceRender implements AjaxListener, AjaxRenderListener {
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.ajax.AjaxListener#processAjax(org.ajax4jsf.framework.ajax.AjaxEvent)
+	 */
+	public void processAjax(AjaxEvent event) {
+		UIComponent component = event.getComponent();
+		AjaxRenderEvent renderEvent = new AjaxRenderEvent(component);
+		renderEvent.setPhaseId(event.getPhaseId());
+		component.queueEvent(renderEvent);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.ajax.AjaxRenderListener#processAjaxRender(org.ajax4jsf.framework.ajax.AjaxRenderEvent)
+	 */
+	public void processAjaxRender(AjaxRenderEvent event) {
+		FacesContext facesContext = FacesContext.getCurrentInstance();
+		AjaxContext.getCurrentInstance(facesContext).renderSubmittedAjaxRegion(facesContext,false);
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/PushEventListener.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/PushEventListener.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/PushEventListener.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,10 @@
+package org.ajax4jsf.ajax;
+
+import java.util.EventListener;
+import java.util.EventObject;
+
+public interface PushEventListener extends EventListener {
+    
+    public void onEvent(EventObject event);
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/PushEventsCounter.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/PushEventsCounter.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/PushEventsCounter.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,32 @@
+package org.ajax4jsf.ajax;
+
+import java.io.Serializable;
+import java.util.EventObject;
+
+public class PushEventsCounter implements PushEventListener,Serializable {
+    
+    /**
+     * 
+     */
+    private static final long serialVersionUID = 4060284352186710009L;
+    private volatile boolean performed = false;
+
+    public void onEvent(EventObject event) {
+	performed = true;
+    }
+
+    /**
+     * @return the performed
+     */
+    public boolean isPerformed() {
+        return performed;
+    }
+
+    /**
+     */
+    public void processed() {
+        this.performed = false;
+    }
+
+    
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/ResourceBundleMap.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/ResourceBundleMap.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/ResourceBundleMap.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,147 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.ajax;
+
+import java.util.Collection;
+import java.util.Map;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+import java.util.Set;
+
+import org.ajax4jsf.framework.util.message.Messages;
+
+/**
+ * Very limited Map decorator to ResourceBundle.
+ * @author shura
+ *
+ */
+public class ResourceBundleMap implements Map {
+	
+	private ResourceBundle _bundle;
+
+	/**
+	 * @param bundle
+	 */
+	public ResourceBundleMap(ResourceBundle bundle) {
+		super();
+		_bundle = bundle;
+	}
+
+	/* (non-Javadoc)
+	 * @see java.util.Map#size()
+	 */
+	public int size() {
+		return 0;
+	}
+
+	/* (non-Javadoc)
+	 * @see java.util.Map#isEmpty()
+	 */
+	public boolean isEmpty() {
+		return false;
+	}
+
+	/* (non-Javadoc)
+	 * @see java.util.Map#containsKey(java.lang.Object)
+	 */
+	public boolean containsKey(Object key) {
+		
+		try {
+			_bundle.getObject(key.toString());
+			return true;
+		} catch (MissingResourceException e) {
+			return false;
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see java.util.Map#containsValue(java.lang.Object)
+	 */
+	public boolean containsValue(Object value) {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	/* (non-Javadoc)
+	 * @see java.util.Map#get(java.lang.Object)
+	 */
+	public Object get(Object key) {
+		try {
+			return _bundle.getObject(key.toString());
+		} catch (MissingResourceException e) {
+			return key;
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see java.util.Map#put(java.lang.Object, java.lang.Object)
+	 */
+	public Object put(Object arg0, Object arg1) {
+		throw new UnsupportedOperationException(Messages.getMessage(Messages.BUNDLE_MAP_NO_PUT_VALUE));	
+	}
+
+	/* (non-Javadoc)
+	 * @see java.util.Map#remove(java.lang.Object)
+	 */
+	public Object remove(Object key) {
+		throw new UnsupportedOperationException(Messages.getMessage(Messages.BUNDLE_MAP_NO_REMOVE_VALUE));	
+	}
+
+	/* (non-Javadoc)
+	 * @see java.util.Map#putAll(java.util.Map)
+	 */
+	public void putAll(Map arg0) {
+		throw new UnsupportedOperationException(Messages.getMessage(Messages.BUNDLE_MAP_NO_PUT_VALUE));	
+	}
+
+	/* (non-Javadoc)
+	 * @see java.util.Map#clear()
+	 */
+	public void clear() {
+		throw new UnsupportedOperationException(Messages.getMessage(Messages.BUNDLE_MAP_NO_REMOVE_VALUE));	
+	}
+
+	/* (non-Javadoc)
+	 * @see java.util.Map#keySet()
+	 */
+	public Set keySet() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see java.util.Map#values()
+	 */
+	public Collection values() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see java.util.Map#entrySet()
+	 */
+	public Set entrySet() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/UIActionParameter.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/UIActionParameter.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/UIActionParameter.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,237 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.ajax;
+
+import javax.faces.FacesException;
+import javax.faces.component.UIComponentBase;
+import javax.faces.component.UIParameter;
+import javax.faces.context.FacesContext;
+import javax.faces.convert.Converter;
+import javax.faces.el.ValueBinding;
+import javax.faces.event.AbortProcessingException;
+import javax.faces.event.ActionEvent;
+import javax.faces.event.ActionListener;
+
+import org.ajax4jsf.framework.ajax.JavaScriptParameter;
+import org.ajax4jsf.framework.util.message.Messages;
+
+/**
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.2 $ $Date: 2007/02/01 15:31:55 $
+ * 
+ */
+public class UIActionParameter extends UIParameter implements ActionListener,
+		JavaScriptParameter {
+
+	public static final String COMPONENT_TYPE = "org.ajax4jsf.components.UIActionParameter";
+
+	/***************************************************************************
+	 * Binding for update on ActionEvent
+	 */
+	private ValueBinding _assignToBinding = null;
+
+	public void setAssignToBinding(ValueBinding propertyBinding) {
+		this._assignToBinding = propertyBinding;
+	}
+
+	public ValueBinding getAssignToBinding() {
+		return _assignToBinding;
+	}
+
+	/** ********************************************************* */
+
+	/***************************************************************************
+	 * Converter for update value with this parameter
+	 */
+	private Converter _converter = null;
+
+	public void setConverter(Converter converter) {
+		this._converter = converter;
+	}
+
+	public Converter getConverter() {
+		return _converter;
+	}
+
+	/** ********************************************************* */
+
+	/***************************************************************************
+	 * Skip quota escaping of parameter value - for substitute JavaScript
+	 * exspression on submit
+	 */
+	private Boolean _noEscape = null;
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.ajax.JavaScriptParameter#setNoEscape(boolean)
+	 */
+	public void setNoEscape(boolean noEscape) {
+		this._noEscape = Boolean.valueOf(noEscape);
+	}
+
+	private static String NO_ESCAPE_ATTR = "noEscape";
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.ajax.JavaScriptParameter#isNoEscape()
+	 */
+	public boolean isNoEscape() {
+		return isValueOrBinding(_noEscape, NO_ESCAPE_ATTR);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see javax.faces.component.UIParameter#getName()
+	 */
+	public String getName() {
+		String name = super.getName();
+		// If name not set - use clientId. be Careful !
+		if (null == name) {
+			name = getClientId(FacesContext.getCurrentInstance());
+		}
+		return name;
+	}
+
+	public Object getValue() {
+		Object value = super.getValue();
+		// TODO - perform conversion if converter is present.
+		if (null != value) {
+			Class type = value.getClass();
+			FacesContext context = getFacesContext();
+			Converter converter = createConverter(context, type);
+			if (null != converter) {
+				value = converter.getAsString(context, this, value);
+
+			}
+
+		}
+		return value;
+	}
+
+	/** ********************************************************* */
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see javax.faces.event.ActionListener#processAction(javax.faces.event.ActionEvent)
+	 */
+	public void processAction(ActionEvent actionEvent)
+			throws AbortProcessingException {
+		FacesContext context = FacesContext.getCurrentInstance();
+		ValueBinding updateBinding = getAssignToBinding();
+		if (updateBinding != null && (!updateBinding.isReadOnly(context))) {
+			Object requestValue = context.getExternalContext()
+					.getRequestParameterMap().get(getName());
+			if (requestValue != null && requestValue instanceof String) {
+				Class type = updateBinding.getType(context);
+				Converter converter = createConverter(context, type);
+				if (null != converter) {
+					requestValue = converter.getAsObject(context, this,
+							(String) requestValue);
+
+				}
+			}
+			if (null != requestValue) {
+				updateBinding.setValue(context, requestValue);
+
+			}
+		}
+	}
+
+	/**
+	 * @param context
+	 * @param type
+	 * @return
+	 * @throws FacesException
+	 */
+	private Converter createConverter(FacesContext context, Class type)
+			throws FacesException {
+		Converter converter = getConverter();
+		if (converter == null && type != null && !type.equals(String.class)
+				&& !type.equals(Object.class)) {
+			try {
+				converter = context.getApplication().createConverter(type);
+			} catch (Exception e) {
+				throw new FacesException(Messages.getMessage(
+						Messages.NO_CONVERTER_REGISTERED, type.getName()), e);
+			}
+		}
+		return converter;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see javax.faces.component.UIComponentBase#restoreState(javax.faces.context.FacesContext)
+	 */
+	public void restoreState(FacesContext context, Object state) {
+		Object values[] = (Object[]) state;
+		super.restoreState(context, values[0]);
+		// restore fields values
+		_assignToBinding = (ValueBinding) UIComponentBase.restoreAttachedState(
+				context, values[1]);
+		_noEscape = (Boolean) values[2];
+		_converter = (Converter) UIComponentBase.restoreAttachedState(context,
+				values[3]);
+		;
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see javax.faces.component.UIComponentBase#saveState(javax.faces.context.FacesContext)
+	 */
+	public Object saveState(FacesContext context) {
+		Object values[] = new Object[4];
+		values[0] = super.saveState(context);
+		// save fields values
+		values[1] = UIComponentBase
+				.saveAttachedState(context, _assignToBinding);
+		values[2] = _noEscape;
+		values[3] = UIComponentBase.saveAttachedState(context, _converter);
+		return ((Object) (values));
+	}
+
+	/**
+	 * @param field -
+	 *            value of field to get.
+	 * @param name -
+	 *            name of field, to get from ValueBinding
+	 * @return boolean value, based on field or valuebinding.
+	 */
+	private boolean isValueOrBinding(Boolean field, String name) {
+		if (null != field) {
+			return field.booleanValue();
+		}
+		ValueBinding vb = getValueBinding(name);
+		if (null != vb) {
+			return ((Boolean) vb.getValue(getFacesContext())).booleanValue();
+		} else {
+			return false;
+		}
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/UIAjaxCommandButton.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/UIAjaxCommandButton.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/UIAjaxCommandButton.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,34 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.ajax;
+
+import org.ajax4jsf.framework.ajax.AjaxActionComponent;
+
+/**
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:58:28 $
+ *
+ */
+public abstract class UIAjaxCommandButton extends AjaxActionComponent {
+	public static final String COMPONENT_TYPE="org.ajax4jsf.ajax.CommandButton";
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/UIAjaxCommandLink.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/UIAjaxCommandLink.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/UIAjaxCommandLink.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,34 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.ajax;
+
+import org.ajax4jsf.framework.ajax.AjaxActionComponent;
+
+/**
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:58:26 $
+ *
+ */
+public abstract class UIAjaxCommandLink extends AjaxActionComponent {
+
+	public static final String COMPONENT_TYPE="org.ajax4jsf.ajax.CommandLink";
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/UIAjaxForm.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/UIAjaxForm.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/UIAjaxForm.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,176 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.ajax;
+
+import java.util.Iterator;
+
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIForm;
+import javax.faces.context.FacesContext;
+import javax.faces.event.AbortProcessingException;
+import javax.faces.event.FacesEvent;
+
+import org.ajax4jsf.framework.ajax.AjaxComponent;
+import org.ajax4jsf.framework.ajax.AjaxContext;
+import org.ajax4jsf.framework.ajax.AjaxEvent;
+import org.ajax4jsf.framework.ajax.AjaxListener;
+import org.ajax4jsf.framework.ajax.AjaxSource;
+import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
+
+
+/**
+ * Quite different from default <code>HtmlForm</code> - process child components
+ * not only for submitted form, but if submitted parent <code>AjaxContainer</code>
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.3 $ $Date: 2007/02/06 16:23:22 $
+ *
+ */
+public abstract class UIAjaxForm extends UIForm implements AjaxComponent, AjaxSource 
+{
+    public static final String COMPONENT_TYPE = "org.ajax4jsf.Form";
+
+    /* (non-Javadoc)
+     * @see javax.faces.component.UIComponent#processDecodes(javax.faces.context.FacesContext)
+     */
+    public void processDecodes(javax.faces.context.FacesContext context)
+    {
+        if (context == null) {
+			throw new NullPointerException("context");
+		}
+        decode(context);
+        if (mustProcessed(context))
+        {
+            for (Iterator it = getFacetsAndChildren(); it.hasNext();)
+            {
+                UIComponent childOrFacet = (UIComponent) it.next();
+                childOrFacet.processDecodes(context);
+            }
+        }
+    }
+
+    
+    /* (non-Javadoc)
+     * @see javax.faces.component.UIComponent#processValidators(javax.faces.context.FacesContext)
+     */
+    public void processValidators(javax.faces.context.FacesContext context)
+    {
+        if (context == null) throw new NullPointerException("context");
+        if (mustProcessed(context))
+        {
+            for (Iterator it = getFacetsAndChildren(); it.hasNext();)
+            {
+                UIComponent childOrFacet = (UIComponent) it.next();
+                childOrFacet.processValidators(context);
+            }
+        }
+    }
+    
+    
+
+    /* (non-Javadoc)
+     * @see javax.faces.component.UIComponent#processUpdates(javax.faces.context.FacesContext)
+     */
+    public void processUpdates(javax.faces.context.FacesContext context)
+    {
+        if (context == null) throw new NullPointerException("context");
+        if (mustProcessed(context))
+        {
+            for (Iterator it = getFacetsAndChildren(); it.hasNext();)
+            {
+                UIComponent childOrFacet = (UIComponent) it.next();
+                childOrFacet.processUpdates(context);
+            }
+        }
+    }
+
+    /**
+     * Test for condition processing decoders/validators/updates
+     * @param context current <code>FacesContext</code>
+     * @return true if submitted parent AjaxContainer or current form.
+     */
+    private boolean mustProcessed(FacesContext context)
+    {
+//        if ( !AjaxContext.getCurrentInstance(context).isAjaxRequest(context)) {
+            if (!isSubmitted() ) {
+                return false;
+            }
+//        }
+        return true;
+    }
+    
+
+	/* (non-Javadoc)
+	 * @see javax.faces.component.UIComponentBase#broadcast(javax.faces.event.FacesEvent)
+	 */
+	public void broadcast(FacesEvent event) throws AbortProcessingException {
+		// perform default
+		super.broadcast(event);
+		if (event instanceof AjaxEvent) {
+			// complete re-Render fields. AjaxEvent deliver before render response.
+			setupReRender();
+		}
+	}
+
+
+	/**
+	 * Template methods for fill set of resions to render in subclasses.
+	 */
+	protected void setupReRender() {
+		FacesContext context = getFacesContext();
+		AjaxContext.getCurrentInstance(context).addRegionsFromComponent(this);
+	}
+
+
+
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.ajax.AjaxSource#addAjaxListener(org.ajax4jsf.framework.ajax.AjaxListener)
+	 */
+	public void addAjaxListener(AjaxListener listener) {
+        addFacesListener(listener);		
+	}
+
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.ajax.AjaxSource#getAjaxListeners()
+	 */
+	public AjaxListener[] getAjaxListeners() {
+        AjaxListener al[] = (AjaxListener [])
+	    getFacesListeners(AjaxListener.class);
+        return (al);
+
+	}
+
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.ajax.AjaxSource#removeAjaxListener(org.ajax4jsf.framework.ajax.AjaxListener)
+	 */
+	public void removeAjaxListener(AjaxListener listener) {
+		removeFacesListener(listener);
+		
+	}
+    
+	public abstract boolean isAjaxSubmit();
+	
+	public abstract void setAjaxSubmit(boolean ajax);
+ 
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/UIAjaxFunction.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/UIAjaxFunction.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/UIAjaxFunction.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,38 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.ajax;
+
+import org.ajax4jsf.framework.ajax.AjaxActionComponent;
+
+/**
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.2 $ $Date: 2007/01/23 20:01:04 $
+ *
+ */
+public abstract class UIAjaxFunction extends AjaxActionComponent {
+
+	public static final String COMPONENT_TYPE="org.ajax4jsf.ajax.Function";
+	
+	public abstract String getName();
+	
+	public abstract void setName(String name);
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/UIAjaxLog.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/UIAjaxLog.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/UIAjaxLog.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,52 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.ajax;
+
+import javax.faces.component.UIComponentBase;
+
+/**
+ * @author shura
+ *
+ */
+public abstract class UIAjaxLog extends UIComponentBase {
+
+	public static final String COMPONENT_TYPE = "org.ajax4jsf.Log";
+	
+	public abstract String getHotkey();
+	
+	public abstract void setHotkey(String newvalue);
+
+	public abstract String getName();
+	public abstract void setName(String newvalue);
+
+	public abstract String getWidth();
+	public abstract void setWidth(String newvalue);
+
+	public abstract String getHeight();
+	public abstract void setHeight(String newvalue);
+	
+	public abstract String getLevel();
+	public abstract void setLevel(String newvalue);
+	
+	public abstract boolean isPopup();
+	public abstract void setPopup(boolean popup);
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/UIAjaxOutputPanel.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/UIAjaxOutputPanel.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/UIAjaxOutputPanel.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,44 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.ajax;
+
+import javax.faces.component.UIPanel;
+
+import org.ajax4jsf.framework.ajax.AjaxOutput;
+
+
+/**
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:58:26 $
+ *
+ */
+public abstract class UIAjaxOutputPanel extends UIPanel implements AjaxOutput {
+	
+    public static final String COMPONENT_TYPE = "org.ajax4jsf.ajax.OutputPanel";
+	/**
+	 * @return
+	 */
+	public abstract String getLayout();
+
+	public abstract void setLayout(String layout);
+	
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/UIAjaxRegion.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/UIAjaxRegion.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/UIAjaxRegion.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,249 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.ajax;
+
+import java.io.IOException;
+import java.util.Collection;
+import java.util.Set;
+
+import javax.faces.FacesException;
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIPanel;
+import javax.faces.component.UIViewRoot;
+import javax.faces.context.FacesContext;
+import javax.faces.el.MethodBinding;
+import javax.faces.event.AbortProcessingException;
+import javax.faces.event.FacesEvent;
+
+import org.ajax4jsf.framework.ajax.AjaxContainer;
+import org.ajax4jsf.framework.ajax.AjaxContext;
+import org.ajax4jsf.framework.ajax.AjaxListener;
+import org.ajax4jsf.framework.ajax.AjaxRegionBrige;
+import org.ajax4jsf.framework.ajax.AjaxViewRoot;
+import org.ajax4jsf.framework.ajax.InvokerCallback;
+import org.ajax4jsf.framework.renderer.AjaxContainerRenderer;
+
+/**
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.3 $ $Date: 2007/02/08 15:02:06 $
+ * 
+ */
+public abstract class UIAjaxRegion extends UIPanel implements AjaxContainer {
+
+	private AjaxRegionBrige brige;
+
+	public static final String COMPONENT_TYPE = "org.ajax4jsf.components.AjaxRegion";
+
+	/**
+	 * 
+	 */
+	public UIAjaxRegion() {
+		brige = new AjaxRegionBrige(this);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see javax.faces.component.UIComponentBase#encodeBegin(javax.faces.context.FacesContext)
+	 */
+//	public void encodeBegin(FacesContext context) throws IOException {
+//		UIViewRoot root = context.getViewRoot();
+//		if (root instanceof AjaxViewRoot) {
+//			((AjaxViewRoot) root).addAjaxRegion(this);
+//		}
+//		super.encodeBegin(context);
+//	}
+
+	private InvokerCallback _ajaxInvoker = new InvokerCallback() {
+
+		public void invoke(FacesContext context, UIComponent component) {
+			try {
+				if (component instanceof AjaxContainer) {
+					AjaxContainer ajax = (AjaxContainer) component;
+					ajax.encodeAjax(context);
+				} else {
+					// Container not found, use Root for encode.
+					encodeAjax(context);
+				}
+			} catch (IOException e) {
+				throw new FacesException(e);
+			}
+		}
+
+		public void invokeRoot(FacesContext context) {
+			try {
+				encodeAjax(context);
+			} catch (IOException e) {
+				throw new FacesException(e);
+			}
+		}
+	};
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see javax.faces.component.UIComponentBase#encodeChildren(javax.faces.context.FacesContext)
+	 */
+	public void encodeChildren(FacesContext context) throws IOException {
+		// If this region is single child of ViewRoot, encode Ajax response for
+		// submitted container.
+		UIViewRoot viewRoot = context.getViewRoot();
+		AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context);
+		if ( (getParent() == viewRoot) && 
+				(viewRoot instanceof AjaxViewRoot) &&
+				((AjaxViewRoot) viewRoot).isHavePage() &&
+				(ajaxContext.isAjaxRequest())) {
+			AjaxContext.invokeOnRegionOrRoot((AjaxViewRoot) viewRoot, context, _ajaxInvoker);
+		} else {
+			super.encodeChildren(context);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.ajax.AjaxViewBrige#broadcast(javax.faces.event.FacesEvent)
+	 */
+	public void broadcast(FacesEvent event) throws AbortProcessingException {
+		super.broadcast(event);
+		brige.broadcast(event);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.ajax.AjaxViewBrige#getAjaxListener()
+	 */
+	public MethodBinding getAjaxListener() {
+		return brige.getAjaxListener();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.ajax.AjaxViewBrige#isImmediate()
+	 */
+	public boolean isImmediate() {
+		return brige.isImmediate();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.ajax.AjaxViewBrige#isSubmitted()
+	 */
+	public boolean isSubmitted() {
+		return brige.isSubmitted();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.ajax.AjaxViewBrige#restoreState(javax.faces.context.FacesContext,
+	 *      java.lang.Object)
+	 */
+	public void restoreState(FacesContext context, Object state) {
+		Object[] mystate = (Object[]) state;
+		super.restoreState(context, mystate[0]);
+		brige.restoreState(context, mystate[1]);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.ajax.AjaxViewBrige#saveState(javax.faces.context.FacesContext)
+	 */
+	public Object saveState(FacesContext context) {
+		Object[] state = new Object[2];
+		state[0] = super.saveState(context);
+		state[1] = brige.saveState(context);
+		return state;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.ajax.AjaxViewBrige#setAjaxListener(javax.faces.el.MethodBinding)
+	 */
+	public void setAjaxListener(MethodBinding ajaxListener) {
+		brige.setAjaxListener(ajaxListener);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.ajax.AjaxViewBrige#setImmediate(boolean)
+	 */
+	public void setImmediate(boolean immediate) {
+		brige.setImmediate(immediate);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.ajax.AjaxViewBrige#setSubmitted(boolean)
+	 */
+	public void setSubmitted(boolean submitted) {
+		brige.setSubmitted(submitted);
+	}
+
+	public void addAjaxListener(AjaxListener listener) {
+		addFacesListener(listener);
+	}
+
+	public AjaxListener[] getAjaxListeners() {
+		return (AjaxListener[]) getFacesListeners(AjaxListener.class);
+	}
+
+	public void removeAjaxListener(AjaxListener listener) {
+		removeFacesListener(listener);
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.ajax.AjaxViewBrige#isSelfRendered()
+	 */
+	public boolean isSelfRendered() {
+		return brige.isSelfRendered();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.ajax.AjaxViewBrige#setSelfRendered(boolean)
+	 */
+	public void setSelfRendered(boolean selfRendered) {
+		brige.setSelfRendered(selfRendered);
+	}
+
+	public void encodeAjax(FacesContext context) throws IOException {
+		String rendererType = getRendererType();
+		if (rendererType != null) {
+			((AjaxContainerRenderer) getRenderer(context)).encodeAjax(context,
+					this);
+		}
+
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/UIAjaxStatus.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/UIAjaxStatus.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/UIAjaxStatus.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,379 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.ajax;
+
+import java.io.Serializable;
+
+import javax.faces.FacesException;
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIComponentBase;
+import javax.faces.context.FacesContext;
+import javax.faces.el.ValueBinding;
+
+import org.ajax4jsf.framework.ajax.AjaxContainer;
+import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
+import org.ajax4jsf.framework.util.message.Messages;
+
+
+/**
+ * 
+ * Component for create request state status area.
+ * can create 2 output text areas ( &lt;span&gt; ) with different text and styles.
+ * if defined "start" or/and "stop" facets, it's use as conttent
+ * for different state.
+ * By default, "start" text/facet rendered with display = none style.
+ * On client side, display style changed for elements on 
+ * start-stop request.
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:58:25 $
+ *
+ */
+public class UIAjaxStatus extends UIComponentBase
+{
+
+    private static final String COMPONENT_FAMILY = "javax.faces.Output";
+    public static final String COMPONENT_TYPE = "org.ajax4jsf.components.AjaxStatus";
+    
+
+    /* (non-Javadoc)
+     * @see javax.faces.component.UIComponent#getFamily()
+     */
+    public String getFamily()
+    {
+        return COMPONENT_FAMILY;
+    }
+    
+    /**
+     * id of form for wich status will displayed
+     */
+    private String _for = null;
+
+    /**
+     *
+     * @param new value of id of form for wich status will displayed to set
+     */
+    public void setFor(String _for)
+    {
+        this._for = _for;
+    }
+
+    /**
+     * @return value or result of valueBinding of id of form for wich status will displayed
+     *
+     */
+    public String getFor()
+    {
+        return (String) getValueOrBinding(_for, "for");
+    }
+    
+    /**
+     * Text to output on start request
+     */
+    private String _startText = null;
+
+    /**
+     * setter method for property
+     * @param new value of Text to output on start request to set
+     */
+    public void setStartText(String startText)
+    {
+        this._startText = startText;
+    }
+
+    /**
+     * @return value or result of valueBinding of Text to output on start request
+     */
+    public String getStartText()
+    {
+        return (String) getValueOrBinding(_startText, "startText");
+    }
+    
+    /**
+     * Text to display on complete request
+     */
+    private String _stopText = null;
+
+    /**
+     * setter method for property
+     * @param new value of Text to display on complete request to set
+     */
+    public void setStopText(String stopText)
+    {
+        this._stopText = stopText;
+    }
+
+    /**
+     * @return value or result of valueBinding of Text to display on complete request
+     */
+    public String getStopText()
+    {
+        return (String) getValueOrBinding(_stopText, "stopText");
+    }
+    /**
+     * Style for display on start request
+     */
+    private String _startStyle = null;
+
+    /**
+     * setter method for property
+     * @param new value of Style for display on start request to set
+     */
+    public void setStartStyle(String startStyle)
+    {
+        this._startStyle = startStyle;
+    }
+
+    /**
+     * @return value or result of valueBinding of Style for display on start request
+     */
+    public String getStartStyle()
+    {
+        return (String) getValueOrBinding(_startStyle, "startStyle");
+    }
+    /**
+     * Style for displaying on complete
+     */
+    private String _stopStyle = null;
+
+    /**
+     * setter method for property
+     * @param new value of Style for displaying on complete to set
+     */
+    public void setStopStyle(String stopStyle)
+    {
+        this._stopStyle = stopStyle;
+    }
+
+    /**
+     * @return value or result of valueBinding of Style for displaying on complete
+     */
+    public String getStopStyle()
+    {
+        return (String) getValueOrBinding(_stopStyle, "stopStyle");
+    }
+    /**
+     * Style class for display on request
+     */
+    private String _startStyleClass = null;
+
+    /**
+     * setter method for property
+     * @param new value of Style class for display on request to set
+     */
+    public void setStartStyleClass(String startStyleClass)
+    {
+        this._startStyleClass = startStyleClass;
+    }
+
+    /**
+     * @return value or result of valueBinding of Style class for display on request
+     */
+    public String getStartStyleClass()
+    {
+        return (String) getValueOrBinding(_startStyleClass, "startStyleClass");
+    }
+    /**
+     * Style class for display on complete request
+     */
+    private String _stopStyleClass = null;
+
+    /**
+     * setter method for property
+     * @param new value of Style class for display on complete request to set
+     */
+    public void setStopStyleClass(String stopStyleClass)
+    {
+        this._stopStyleClass = stopStyleClass;
+    }
+
+    
+    /**
+     * Force id to render in Html as is
+     */
+    private boolean _forceId = false;
+    private boolean _forceIdSet = false;
+
+    /**
+     * setter method for property
+     * @param new value of Force id to render in Html as is to set
+     */
+    public void setForceId(boolean forceId)
+    {
+        this._forceId = forceId;
+        this._forceIdSet = true;
+    }
+
+    /**
+     * @return value or result of valueBinding of Force id to render in Html as is
+     */
+    public boolean isForceId()
+    {
+        return  isValueOrBinding(_forceId, _forceIdSet, "forceId");
+    }
+    
+    
+    
+    
+	private String _clientId = null;
+
+	/* (non-Javadoc)
+	 * @see javax.faces.component.UIComponentBase#getClientId(javax.faces.context.FacesContext)
+	 */
+	public String getClientId(FacesContext context) {
+        if (null == _clientId) {
+			String forValue = getFor();
+			UIComponent container;
+			if (null != forValue) {
+				container = findComponent(forValue);
+				// 'for' attribute must be pointed to real container in view tree
+				if (null == container || !(container instanceof AjaxContainer)) {
+					throw new FacesException(
+							Messages.getMessage(Messages.FOR_TARGETS_NO_AJAX_CONTAINER, getId()));
+				}
+				_clientId = container.getClientId(context) + ":status";
+
+			} else if (isForceId()) {
+				_clientId = getRenderer(context).convertClientId(context,
+						this.getId());
+			} else if (null !=(container = (UIComponent) AjaxRendererUtils.findAjaxContainer(context,this))) {
+				_clientId = container.getClientId(context) + ":status";
+			} else {
+				_clientId = super.getClientId(context);
+			}
+		}
+        return _clientId;
+	}
+
+	
+	/* (non-Javadoc)
+	 * reset clientId for calculate
+	 * @see javax.faces.component.UIComponentBase#setId(java.lang.String)
+	 */
+	public void setId(String arg0) {
+		super.setId(arg0);
+		_clientId = null;
+	}
+
+	/* (non-Javadoc)
+     * @see javax.faces.component.UIComponentBase#restoreState(javax.faces.context.FacesContext, java.lang.Object)
+     */
+    public void restoreState(FacesContext context, Object state)
+    {
+        State myState = (State) state;
+        _for = myState._for;
+        _startText = myState._startText;
+        _stopText = myState._stopText;
+        _startStyle = myState._startStyle;
+        _stopStyle = myState._stopStyle;
+        _startStyleClass = myState._startStyleClass;
+        _stopStyleClass = myState._stopStyleClass;
+        _forceId = myState._forceId;
+        _forceIdSet = myState._forceIdSet;
+        super.restoreState(context, myState.superState);
+    }
+
+    /* (non-Javadoc)
+     * @see javax.faces.component.UIComponentBase#saveState(javax.faces.context.FacesContext)
+     */
+    public Object saveState(FacesContext context)
+    {
+        State state = new State();
+        state._for = _for;
+        state._startText = _startText;
+        state._stopText = _stopText;
+        state._startStyle = _startStyle;
+        state._stopStyle = _stopStyle;
+        state._startStyleClass = _startStyleClass;
+        state._stopStyleClass = _stopStyleClass;
+        state._forceId = _forceId;
+        state._forceIdSet = _forceIdSet;
+        state.superState = super.saveState(context);
+        return state;
+    }
+    
+    /**
+     * @author shura (latest modification by $Author: alexsmirnov $)
+     * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:58:25 $
+     * Memento pattern state class for save-restore component.
+     */
+    public static class State implements Serializable {
+        /**
+         * 
+         */
+        private static final long serialVersionUID = 317266574102385358L;
+        Object superState;
+        String _for;
+        String _startText;
+        String _stopText;
+        String _startStyle;
+        String _stopStyle;
+        String _startStyleClass;
+        String _stopStyleClass;        
+        boolean _forceIdSet;
+        boolean _forceId;
+    }
+
+    /**
+     * @return value or result of valueBinding of Style class for display on complete request
+     */
+    public String getStopStyleClass()
+    {
+        return (String) getValueOrBinding(_stopStyleClass, "stopStyleClass");
+    }
+    
+    /**
+     * @param field - value of field to get.
+     * @param name - name of field, to get from ValueBinding
+     * @return field or value of binding expression.
+     */
+    private Object getValueOrBinding(Object field, String name){
+        if( null != field){
+            return field;
+        }
+        ValueBinding vb = getValueBinding(name);
+        if (null != vb) {
+            return vb.getValue(getFacesContext());
+        } else {
+            return null;
+        }
+
+    }
+    
+    /**
+     * @param field - value of field to get.
+     * @param name - name of field, to get from ValueBinding
+     * @return boolean value, based on field or valuebinding.
+     */
+    private boolean isValueOrBinding(boolean field, boolean fieldSet, String name){
+        if( fieldSet ){
+            return field;
+        }
+        ValueBinding vb = getValueBinding(name);
+        if (null != vb) {
+            return ((Boolean)vb.getValue(getFacesContext())).booleanValue();
+        } else {
+            return false;
+        }
+
+    }
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/UIAjaxSupport.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/UIAjaxSupport.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/UIAjaxSupport.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,233 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.ajax;
+
+import java.io.Serializable;
+
+import javax.faces.FacesException;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.el.ValueBinding;
+
+import org.ajax4jsf.framework.ajax.AjaxActionComponent;
+import org.ajax4jsf.framework.ajax.AjaxSupport;
+import org.ajax4jsf.framework.ajax.EventValueBinding;
+import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
+import org.ajax4jsf.framework.util.message.Messages;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+
+/**
+ * Component for append ajax functions to any control component.
+ * Append action functionality to non-action control,
+ * setup javascript events for parent component,
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.3 $ $Date: 2007/02/12 17:46:52 $
+ *
+ */
+public abstract class UIAjaxSupport extends AjaxActionComponent implements  AjaxSupport
+{
+
+    //~ Static fields/initializers ---------------------------------------------
+
+    public static final String COMPONENT_TYPE = "org.ajax4jsf.ajax.Support";
+    public static final String COMPONENT_FAMILY = "javax.faces.Command";
+    public static final String DEFAULT_RENDERER_TYPE = "org.ajax4jsf.components.AjaxSupportRenderer";
+    public static final String AJAX_SUPPORT_SET = "com.exadel.components.ajax.support.";
+    private static final Log log = LogFactory.getLog(UIAjaxSupport.class);
+
+    /**
+     * Name of JavaScript function, called before submit Ajax request
+	 * description
+	 * @parameter
+	 * @return the acceptClass
+	 */
+	public abstract String getOnsubmit();
+
+	/**
+	 * @param newOnsubmit the value  to set
+	 */
+	public abstract void setOnsubmit(String newOnsubmit);
+    /* (non-Javadoc)
+	 * @see javax.faces.component.UIComponentBase#setValueBinding(java.lang.String, javax.faces.el.ValueBinding)
+	 */
+	public void setValueBinding(String arg0, ValueBinding arg1) {
+		// var - not allowed name. must be literal.
+		if("var".equals(arg0)){
+			throw new FacesException(
+					Messages.getMessage(Messages.VAR_MUST_BE_LITERAL, getClientId(getFacesContext())));
+		}
+		if("event".equals(arg0)){
+			throw new FacesException(
+					Messages.getMessage(Messages.EVENT_MUST_BE_LITERAL, getClientId(getFacesContext())));
+		}
+		super.setValueBinding(arg0, arg1);
+	}
+
+	/**
+     * Create Special <code>ValueBinding</code> for build JavaScrept
+     * event code in parent component from this.
+     * @return <code>EventValueBinding</code> based on properties of current component
+     */
+    private ValueBinding getEventValueBinding()
+    {
+        if (log.isDebugEnabled())
+        {
+            log.debug(Messages.getMessage(Messages.CREATE_JAVASCRIPT_EVENT, getId()));
+        }
+        return new EventValueBinding(this);
+    }
+
+    /**
+     * @return JavaScript eventString. Rebuild on every call, since
+     * can be in loop ( as in dataTable ) with different parameters.
+     */
+    public String getEventString()
+    {
+        StringBuffer buildOnEvent = new StringBuffer();
+        String onsubmit = getOnsubmit();
+        // Insert script to call before submit ajax request.
+        if (null != onsubmit) {
+			buildOnEvent.append(onsubmit).append(";");
+		}
+        // Due to JSF RI 1.1 bug, clear cached clientId
+        setId(getId());
+		buildOnEvent.append(AjaxRendererUtils.buildOnEvent(this, getFacesContext(),
+				                getEvent()));
+		String script = buildOnEvent.toString();
+		return script;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.faces.component.UIComponentBase#decode(javax.faces.context.FacesContext)
+     */
+    public void decode(FacesContext context) {
+        // Due to JSF RI 1.1 bug, clear cached clientId
+        setId(getId());
+    	super.decode(context);
+    }
+    
+    /**
+     * After nornal setting <code>parent</code> property in case of
+     * created component set Ajax properties for parent.
+     * @see javax.faces.component.UIComponentBase#setParent(javax.faces.component.UIComponent)
+     */
+    public void setParent(UIComponent parent)
+    {
+        super.setParent(parent);
+        if (null != parent && parent.getFamily() != null ) {
+			if (log.isDebugEnabled()) {
+				log.debug(Messages.getMessage(Messages.CALLED_SET_PARENT, parent.getClass().getName()));
+			}
+			// TODO If this comopnent configured, set properties for parent component.
+			// NEW created component have parent, restored view - null in My faces.
+			// and SUN RI not call at restore saved view. 
+			// In other case - set in restoreState method.
+			//        if (parent.getParent() != null)
+			{
+				if (log.isDebugEnabled()) {
+					log.debug(Messages.getMessage(Messages.DETECT_NEW_COMPONENT));
+				}
+				setParentProperties(parent);
+
+			}
+		}
+    }
+
+    public void setParentProperties(UIComponent parent) {
+        ValueBinding valueBinding;
+//        Map parentAttributes = parent.getAttributes();
+/*        if (parent instanceof ActionSource && null == getEvent())
+        {
+            log.debug("Set properties for parent as ActionSource");
+            // Translate AJAX properties to parent component.
+            if (_reRender != null)
+            {
+                parentAttributes
+                        .put(AjaxRendererUtils.AJAX_REGIONS_ATTRIBUTE,
+                                _reRender);
+            }
+            else if ((valueBinding = getValueBinding("reRender")) != null)
+            {
+                parent.setValueBinding(
+                        AjaxRendererUtils.AJAX_REGIONS_ATTRIBUTE,
+                        valueBinding);
+            }
+            if (_oncomplete != null)
+            {
+                parentAttributes
+                        .put(AjaxRendererUtils.ONCOMPLETE_ATTR_NAME,
+                                _oncomplete);
+            }
+            else if ((valueBinding = getValueBinding("oncomplete")) != null)
+            {
+                parent.setValueBinding(
+                        AjaxRendererUtils.ONCOMPLETE_ATTR_NAME,
+                        valueBinding);
+            }
+            if (_status != null)
+            {
+                parentAttributes.put(AjaxRendererUtils.STATUS_ATTR_NAME,
+                        _status);
+            }
+            else if ((valueBinding = getValueBinding("status")) != null)
+            {
+                parent.setValueBinding(AjaxRendererUtils.STATUS_ATTR_NAME,
+                        valueBinding);
+            }
+            if (_limitToListSet)
+            {
+                parentAttributes.put(
+                        AjaxRendererUtils.LIMITTOLIST_ATTR_NAME, Boolean
+                                .valueOf(_limitToList));
+            }
+            else if ((valueBinding = getValueBinding("limitToList")) != null)
+            {
+                parent.setValueBinding(
+                        AjaxRendererUtils.LIMITTOLIST_ATTR_NAME,
+                        valueBinding);
+            }
+            // Add Listener for all supported types.
+            AjaxRegionListener listener = new AjaxRegionListener();
+            ((ActionSource) parent).addActionListener(listener);
+        }
+        else*/ if (null != getEvent())
+        {
+            if (log.isDebugEnabled())
+            {
+                log.debug(Messages.getMessage(Messages.SET_VALUE_BINDING_FOR_EVENT, getEvent()));
+            }
+            // for non action/data components, or for non-default events - build listener for this instance. 
+            valueBinding = getEventValueBinding();
+            // test for valid event attribute name.
+            // TODO - test for compability with concrete element.
+            parent.setValueBinding(getEvent(), valueBinding);
+        }
+
+    }
+    
+    protected UIComponent getSingleComponent() {
+        return getParent();
+    }
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/UIInclude.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/UIInclude.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/UIInclude.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,304 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.ajax;
+
+import java.io.Serializable;
+
+import javax.faces.component.NamingContainer;
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIComponentBase;
+import javax.faces.context.FacesContext;
+import javax.faces.el.ValueBinding;
+import javax.faces.event.AbortProcessingException;
+import javax.faces.event.FacesEvent;
+import javax.faces.event.FacesListener;
+import javax.faces.event.PhaseId;
+
+import org.ajax4jsf.framework.ajax.AjaxContext;
+import org.ajax4jsf.framework.ajax.AjaxOutput;
+import org.ajax4jsf.framework.ajax.ViewIdHolder;
+
+/**
+ * @author shura
+ * 
+ */
+public abstract class UIInclude extends UIComponentBase implements
+		ViewIdHolder, NamingContainer, AjaxOutput {
+
+	public static final String COMPONENT_TYPE = "org.ajax4jsf.Include";
+
+	public static final String LAYOUT_NONE ="none";
+	
+	public static final String LAYOUT_BLOCK ="block";
+	public static final String LAYOUT_INLINE ="inline";
+
+	private  boolean wasNavigation = false;
+	
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.ajax.ViewIdHolder#skipNavigation(java.lang.String)
+	 */
+	public boolean skipNavigation(String ViewId) {
+		wasNavigation = true;
+		return true;
+	}
+
+	private String _viewId = null;
+
+	/*
+	 * viewId for included page. Setter for viewId @param viewId - new value
+	 */
+	public void setViewId(String __viewId) {
+		ValueBinding vb = getValueBinding("viewId");
+		FacesContext facesContext = getFacesContext();
+		if (null != vb && (!vb.isReadOnly(facesContext))) {
+			// Change value of viewId in backed bean, if possible.
+			vb.setValue(facesContext, __viewId);
+		} else {
+			this._viewId = __viewId;
+		}
+	}
+
+	/*
+	 * viewId for included page. Getter for viewId @return viewId value from
+	 * local variable or value bindings
+	 */
+	public String getViewId() {
+		if (null != this._viewId) {
+			return this._viewId;
+		}
+		ValueBinding vb = getValueBinding("viewId");
+		if (null != vb) {
+			return (String) vb.getValue(getFacesContext());
+		} else {
+			return null;
+		}
+	}
+	
+	private String _layout = null;
+
+	/**
+	 * @return the layout
+	 */
+	public String getLayout() {
+		if (null != this._layout) {
+			return this._layout;
+		}
+		ValueBinding vb = getValueBinding("layout");
+		if (null != vb) {
+			return (String) vb.getValue(getFacesContext());
+		} else {
+			return null;
+		}
+	}
+
+	/**
+	 * @param layout the layout to set
+	 */
+	public void setLayout(String layout) {
+		_layout = layout;
+	}
+
+	
+	public boolean isAjaxRendered() {
+		return (!LAYOUT_NONE.equals(getLayout())) && wasNavigation;
+	}
+	
+	public void setAjaxRendered(boolean ajaxRendered) {
+		// unsupported		
+	}
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see javax.faces.component.UIComponentBase#broadcast(javax.faces.event.FacesEvent)
+	 */
+	public void broadcast(FacesEvent event) throws AbortProcessingException {
+		if (event instanceof EventWrapper) {
+			FacesEvent wrapped = ((EventWrapper) event).getWrapped();
+			FacesContext context = getFacesContext();
+			ViewIdHolder holder = setupNavigation(context);
+			wrapped.getComponent().broadcast(wrapped);
+			restoreNavigation(context, holder);
+		} else {
+			super.broadcast(event);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see javax.faces.component.UIComponentBase#processDecodes(javax.faces.context.FacesContext)
+	 */
+	public void processDecodes(FacesContext context) {
+		wasNavigation = false;
+		ViewIdHolder holder = setupNavigation(context);
+		super.processDecodes(context);
+		restoreNavigation(context, holder);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see javax.faces.component.UIComponentBase#processUpdates(javax.faces.context.FacesContext)
+	 */
+	public void processUpdates(FacesContext context) {
+		ViewIdHolder holder = setupNavigation(context);
+		super.processUpdates(context);
+		restoreNavigation(context, holder);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see javax.faces.component.UIComponentBase#processValidators(javax.faces.context.FacesContext)
+	 */
+	public void processValidators(FacesContext context) {
+		ViewIdHolder holder = setupNavigation(context);
+		super.processValidators(context);
+		restoreNavigation(context, holder);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see javax.faces.component.UIComponentBase#queueEvent(javax.faces.event.FacesEvent)
+	 */
+	public void queueEvent(FacesEvent event) {
+		EventWrapper wrapper = new EventWrapper(this, event);
+		super.queueEvent(wrapper);
+	}
+
+	
+	/* (non-Javadoc)
+	 * @see javax.faces.component.UIComponentBase#restoreState(javax.faces.context.FacesContext, java.lang.Object)
+	 */
+	public void restoreState(FacesContext context, Object state) {
+		Object[] componentState = (Object[]) state;
+		super.restoreState(context, componentState[0]);
+		this._viewId = (String) componentState[1];
+		this._layout = (String) componentState[2];
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.component.UIComponentBase#saveState(javax.faces.context.FacesContext)
+	 */
+	public Object saveState(FacesContext context) {
+		Object[] componentState = new Object[3];
+		componentState[0] = super.saveState(context);
+		componentState[1] = _viewId;
+		componentState[2] = _layout;
+		return componentState;
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.component.UIComponent#getFamily()
+	 */
+	public String getFamily() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	private ViewIdHolder setupNavigation(FacesContext context) {
+		AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context);
+		ViewIdHolder viewIdHolder = ajaxContext.getViewIdHolder();
+		ajaxContext.setViewIdHolder(this);
+		return viewIdHolder;
+	}
+
+	private void restoreNavigation(FacesContext context, ViewIdHolder viewIdHolder) {
+		AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context);
+		ajaxContext.setViewIdHolder(viewIdHolder);
+//		if (wasNavigation) {
+//			// Clear children to avoid have different components with same id
+//			getChildren().clear();
+//		}
+	}
+
+	private static class EventWrapper extends FacesEvent {
+
+		private FacesEvent wrapped;
+
+		public EventWrapper(UIComponent component, FacesEvent wrapped) {
+			super(component);
+			this.wrapped = wrapped;
+		}
+
+		/**
+		 * @return
+		 * @see javax.faces.event.FacesEvent#getPhaseId()
+		 */
+		public PhaseId getPhaseId() {
+			return wrapped.getPhaseId();
+		}
+
+		/**
+		 * @param listener
+		 * @return
+		 * @see javax.faces.event.FacesEvent#isAppropriateListener(javax.faces.event.FacesListener)
+		 */
+		public boolean isAppropriateListener(FacesListener listener) {
+			return wrapped.isAppropriateListener(listener);
+		}
+
+		/**
+		 * @param listener
+		 * @see javax.faces.event.FacesEvent#processListener(javax.faces.event.FacesListener)
+		 */
+		public void processListener(FacesListener listener) {
+			wrapped.processListener(listener);
+		}
+
+		/**
+		 * 
+		 * @see javax.faces.event.FacesEvent#queue()
+		 */
+		public void queue() {
+			wrapped.queue();
+		}
+
+		/**
+		 * @param phaseId
+		 * @see javax.faces.event.FacesEvent#setPhaseId(javax.faces.event.PhaseId)
+		 */
+		public void setPhaseId(PhaseId phaseId) {
+			wrapped.setPhaseId(phaseId);
+		}
+
+		/**
+		 * @return the wrapped
+		 */
+		public FacesEvent getWrapped() {
+			return wrapped;
+		}
+	}
+
+	/**
+	 * @return the wasNavigation
+	 */
+	public boolean isWasNavigation() {
+		return wasNavigation;
+	}
+
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/UILoadBundle.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/UILoadBundle.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/UILoadBundle.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,127 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.ajax;
+
+import java.io.IOException;
+import java.util.Locale;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+import javax.faces.component.UIComponentBase;
+import javax.faces.component.UIViewRoot;
+import javax.faces.context.FacesContext;
+
+import org.ajax4jsf.framework.util.message.Messages;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * @author shura
+ * 
+ */
+public abstract class UILoadBundle extends UIComponentBase {
+
+	public static final String COMPONENT_FAMILY = "org.ajax4jsf.Bundle";
+	
+	public static final String COMPONENT_TYPE = "org.ajax4jsf.ajax.Bundle";
+	
+	private static final Log _log = LogFactory.getLog(UILoadBundle.class);
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see javax.faces.component.UIComponent#getFamily()
+	 */
+	public String getFamily() {
+		// TODO Auto-generated method stub
+		return COMPONENT_FAMILY;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see javax.faces.component.UIComponentBase#encodeBegin(javax.faces.context.FacesContext)
+	 */
+	public void encodeBegin(FacesContext context) throws IOException {
+		loadBundle(context);
+
+	}
+
+	public void decode(FacesContext context) {
+		loadBundle(context);
+	}
+	/**
+	 * @param context
+	 */
+	public void loadBundle(FacesContext context) {
+	    UIViewRoot viewRoot = context.getViewRoot();
+	    Locale locale = viewRoot.getLocale();
+	    if (locale == null) {
+	    	locale = context.getApplication().getDefaultLocale();
+	    }
+
+	    ResourceBundle bundle;
+	    try {
+	    	bundle = ResourceBundle.getBundle(getBasename(), locale, Thread
+	    			.currentThread().getContextClassLoader());
+	    } catch (MissingResourceException e) {
+	    	_log.error(Messages.getMessage(Messages.COULD_NOT_LOAD_RESOURCE_BUNDLE, getBasename()));
+	    	return;
+	    }
+
+	    context.getExternalContext().getRequestMap().put(getVar(),
+	    		new ResourceBundleMap(bundle));
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see javax.faces.component.UIComponentBase#getRendererType()
+	 */
+	public String getRendererType() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	/**
+	 * @return Returns the basename.
+	 */
+	public abstract String getBasename();
+
+	/**
+	 * @param basename
+	 *            The basename to set.
+	 */
+	public abstract void setBasename(String basename);
+
+	/**
+	 * @return Returns the var.
+	 */
+	public abstract String getVar();
+
+	/**
+	 * @param var
+	 *            The var to set.
+	 */
+	public abstract void setVar(String var);
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/UIPoll.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/UIPoll.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/UIPoll.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,76 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.ajax;
+
+import javax.faces.context.FacesContext;
+
+import org.ajax4jsf.framework.ajax.AjaxActionComponent;
+import org.ajax4jsf.framework.ajax.AjaxContext;
+
+/**
+ * Component for periodically call AJAX events on server ( poll actions )
+ * @author shura
+ *
+ */
+public abstract class UIPoll extends AjaxActionComponent  {
+	
+	public static final String COMPONENT_TYPE="org.ajax4jsf.ajax.Poll";
+	
+
+	private transient boolean _submitted = false;
+
+	/**
+	 * @return the submitted
+	 */
+	public boolean isSubmitted() {
+		return _submitted;
+	}
+
+
+	/**
+	 * @param submitted the submitted to set
+	 */
+	public void setSubmitted(boolean submitted) {
+		_submitted = submitted;
+	}
+
+	/**
+	 * @return time in mc for polling interval.
+	 */
+	public abstract int getInterval();
+	
+	/**
+	 * @param interval time in mc for polling interval.
+	 */
+	public abstract void setInterval(int interval);
+	
+	public abstract boolean isEnabled();
+	
+	public abstract void setEnabled(boolean enable);
+	
+	protected void setupReRender(FacesContext facesContext) {
+		super.setupReRender(facesContext);
+		AjaxContext.getCurrentInstance(facesContext).addComponentToAjaxRender(this);
+	}
+	
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/UIPortlet.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/UIPortlet.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/UIPortlet.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,66 @@
+/**
+ * 
+ */
+package org.ajax4jsf.ajax;
+
+import java.lang.reflect.Method;
+
+import javax.faces.component.NamingContainer;
+import javax.faces.component.UIComponentBase;
+import javax.faces.context.FacesContext;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class UIPortlet extends UIComponentBase implements NamingContainer {
+
+    private static final Log _log = LogFactory.getLog(UIPortlet.class);
+    /**
+     * <p>The standard component type for this component.</p>
+     */
+    public static final String COMPONENT_TYPE = "org.ajax4jsf.Portlet";
+    
+    
+    /**
+     * <p>The standard component family for this component.</p>
+     */
+    public static final String COMPONENT_FAMILY = "org.ajax4jsf.Portlet";
+
+    /* (non-Javadoc)
+     * @see javax.faces.component.UIComponent#getFamily()
+     */
+    public String getFamily() {
+	// TODO Auto-generated method stub
+	return COMPONENT_FAMILY;
+    }
+    
+    private String portletId = null;
+    
+    // ----------------------------------------------------- UIComponent Methods
+    public String getClientId(FacesContext context) {
+        if (portletId == null) {
+            Object response = context.getExternalContext().getResponse();
+            Class portletResponseClass = response.getClass();
+            // Class.forName is used instead of instanceof to account for the case
+            // where the porletPage tag is used in a webapp and portlet.jar is not
+            // in classpath. In that scenario it will prevent ClassNotFoundException.
+            try {
+        	Method method = portletResponseClass.getMethod("getNamespace", new Class[]{});
+                portletId = (String) method.invoke(response, new Object[]{});
+            } catch (Exception e) {
+        	if(_log.isDebugEnabled()){
+        	    _log.debug("Response is not a portlet RenderResponse");
+        	}
+            }
+            if(null == portletId){
+        	return super.getClientId(context);
+            }
+        }
+        return portletId;
+    }
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/UIPush.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/UIPush.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/UIPush.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,111 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.ajax;
+
+import java.io.IOException;
+
+import javax.faces.component.NamingContainer;
+import javax.faces.context.FacesContext;
+import javax.faces.el.MethodBinding;
+import javax.servlet.http.HttpSession;
+
+import org.ajax4jsf.framework.ajax.AjaxActionComponent;
+import org.ajax4jsf.framework.ajax.AjaxContext;
+import org.ajax4jsf.framework.ajax.xmlfilter.PollEventsManager;
+
+/**
+ * Component for periodically call AJAX events on server ( poll actions )
+ * @author shura
+ *
+ */
+public abstract class UIPush extends AjaxActionComponent  {
+	
+	public static final String COMPONENT_TYPE="org.ajax4jsf.ajax.Push";
+	
+
+	private transient boolean _submitted = false;
+
+	/**
+	 * @return the submitted
+	 */
+	public boolean isSubmitted() {
+		return _submitted;
+	}
+
+	public void encodeBegin(FacesContext context) throws IOException {
+	    MethodBinding producer = getEventProducer();
+	    // Subscribe events producer to push status listener.
+	    if(null != producer){
+		producer.invoke(context, new Object[]{getListener(context)});
+	    }
+	    super.encodeBegin(context);
+	}
+	
+	private PushEventsCounter getListener(FacesContext context){
+	    PollEventsManager eventsManeger = (PollEventsManager) context.getExternalContext().getApplicationMap().get(PollEventsManager.EVENTS_MANAGER_KEY);
+	    return eventsManeger.getListener(getListenerId(context));
+	}
+
+	public String getListenerId(FacesContext context){
+	    Object session = context.getExternalContext().getSession(false);
+	    StringBuffer id = new StringBuffer();
+	    if(null != session && session instanceof HttpSession){
+		HttpSession httpSession = (HttpSession) session;
+		id.append(httpSession.getId());
+	    }
+	    id.append(context.getViewRoot().getViewId());
+	    id.append(NamingContainer.SEPARATOR_CHAR);
+	    id.append(getClientId(context));
+	    return id.toString();
+	}
+	/**
+	 * @param submitted the submitted to set
+	 */
+	public void setSubmitted(boolean submitted) {
+		_submitted = submitted;
+	}
+
+	public abstract MethodBinding getEventProducer();
+	
+	public abstract void setEventProducer(MethodBinding producer);
+	/**
+	 * @return time in mc for polling interval.
+	 */
+	public abstract int getInterval();
+	
+	/**
+	 * @param interval time in mc for polling interval.
+	 */
+	public abstract void setInterval(int interval);
+	
+	public abstract boolean isEnabled();
+	
+	public abstract void setEnabled(boolean enable);
+	
+	protected void setupReRender(FacesContext facesContext) {
+		super.setupReRender(facesContext);
+//		AjaxContext.getCurrentInstance(facesContext).addComponentToAjaxRender(this);
+		//getListener(facesContext).processed();
+	}
+	
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/UIResource.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/UIResource.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/UIResource.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,49 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.ajax;
+
+import javax.faces.component.UIComponentBase;
+
+/**
+ * JSF component class
+ *
+ */
+public abstract class UIResource extends UIComponentBase {
+	
+	public static final String COMPONENT_TYPE = "org.ajax4jsf.Resource";
+	
+	public static final String COMPONENT_FAMILY = "org.ajax4jsf.Resource";
+	
+	/**
+	 * Get name of script to load
+	 * @parameter
+	 * @return the acceptClass
+	 */
+	public abstract Object getSrc();
+
+	/**
+	 * @param newSrc the value  to set
+	 */
+	public abstract void setSrc(Object newSrc);
+	
+	
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/AjaxDataEncoder.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/AjaxDataEncoder.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/AjaxDataEncoder.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,43 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.ajax.repeat;
+
+import java.util.Set;
+
+import org.ajax4jsf.framework.ajax.AjaxChildrenEncoder;
+
+/**
+ * Interface for iterable component, allowed for render given set of rows in ajax response.
+ * @author shura
+ *
+ */
+public interface AjaxDataEncoder extends AjaxChildrenEncoder {
+	
+	/**
+	 * @return Set for values of {@link ExtendedDataModel} keys, encoded in ajax response by this component.
+	 */
+	public Set getAjaxKeys();
+	
+	public void setAjaxKeys(Set ajaxKeys);
+	
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/DataComponentState.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/DataComponentState.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/DataComponentState.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,42 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.ajax.repeat;
+
+import javax.faces.component.StateHolder;
+
+/**
+ * Interface for classes keeped current iterable component state, as :
+ * active data objects range
+ * sorting order
+ * tree nodes expanded state
+ * 
+ * @author shura
+ *
+ */
+public interface  DataComponentState {
+
+	/**
+	 * Build used data objects range for iteration.
+	 * @return
+	 */
+	public abstract Range getRange();
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/DataVisitor.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/DataVisitor.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/DataVisitor.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,45 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.ajax.repeat;
+
+import java.io.IOException;
+
+import javax.faces.context.FacesContext;
+
+/**
+ * Interface for classes, able to receive visitor processing calls from ExtendedDataModel
+ * @author shura
+ *
+ */
+public interface DataVisitor {
+	
+	/**
+	 * This method called back ( as visitor ) from {@link ExtendedDataModel#walk(FacesContext, DataVisitor, Range)} for
+	 * each row.
+	 * @param context current JSF context.
+	 * @param rowKey current row key of DataModel 
+	 * @param argument Implementation-specific argument
+	 * @throws IOException
+	 */
+	public void process(FacesContext context,Object rowKey, Object argument) throws IOException;
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/ExtendedDataModel.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/ExtendedDataModel.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/ExtendedDataModel.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,83 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.ajax.repeat;
+
+import java.io.IOException;
+import java.io.Serializable;
+
+import javax.faces.context.FacesContext;
+import javax.faces.model.DataModel;
+
+/**
+ * Extesion for {@link DataModel} , for support complex data structure, like tree, spreadsheet etc
+ * in iterable components.
+ * @author shura
+ *
+ */
+public abstract class ExtendedDataModel extends DataModel {
+	
+	/**
+	 * <p>Instead of simple <code>int</code> for current state selection, this model can use any object for
+	 * select current data. Implementation depend on model, with any restrictions :</p>
+	 * <ol>
+	 * <li> key must be {@link Serializable}.</li>
+	 * <li>{@link Object#toString()} method must return representation compatible with {@link javax.faces.component.UIComponent#getClientId(javax.faces.context.FacesContext)},
+	 * as far as this string will be appended to clientId of iterator component.</li>
+	 * </ol>
+	 * @param key key for select current data, or null for clear selection.
+	 */
+	public abstract void setRowKey(Object key);
+	
+	/**
+	 * @return key for selected data or <code>null</code>
+	 */
+	public abstract Object getRowKey();
+	
+	/**
+	 * Iteration component can support save data for use at decoding/validation/update phases to avoid unnessesary calls to original models,
+	 * for example - to avoid requests to database until all data is validated. 
+	 * @return
+	 */
+	public  SerializableDataModel getSerializableModel(Range range){
+		// By default, model not serializable.
+		return null;
+	}
+	
+	
+	/**
+	 * Iterate over model by "visitor" pattern, for given range
+	 * @param context current JSF context.
+	 * @param visitor instance of {@link DataVisitor}, for process each row.
+	 * @param range Implementation-specific range of data keys.
+	 * @param argument Implementation-specific argument
+	 * @throws IOException 
+	 */
+	public abstract void walk(FacesContext context,DataVisitor visitor,Range range, Object argument) throws IOException;
+	
+	/**
+	 * Create Iterator on all row keys for given range.
+	 * @param range - Implementation-specific range of data keys.
+	 * @return
+	 */
+//	public abstract Iterator dataIterator(Range range);
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/Range.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/Range.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/Range.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,33 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.ajax.repeat;
+
+/**
+ * Marker interface for building iterator over dataModel values. over {@link ExtendedDataModel} elements.
+ * It can be simple min/max values for data table, but also can provide set of expanded/collapsed nodes in tree,
+ * can provide sorting order,
+ * @author shura
+ *
+ */
+public interface Range {
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/RepeatState.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/RepeatState.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/RepeatState.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,81 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.ajax.repeat;
+
+import java.io.Serializable;
+
+import javax.faces.context.FacesContext;
+
+/**
+ * @author shura
+ *
+ */
+public class RepeatState implements DataComponentState,Serializable {
+	
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = -5552520123654180445L;
+
+	private int _rows = -1;
+	
+	private int _first = 0;
+	
+
+	/**
+	 * @return the first
+	 */
+	public int getFirst() {
+		return _first;
+	}
+
+	/**
+	 * @param first the first to set
+	 */
+	public void setFirst(int first) {
+		this._first = first;
+	}
+
+	/**
+	 * @return the rows
+	 */
+	public int getRows() {
+		return _rows;
+	}
+
+	/**
+	 * @param rows the rows to set
+	 */
+	public void setRows(int rows) {
+		this._rows = rows;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.ajax.repeat.DataComponentState#getRange()
+	 */
+	public Range getRange() {
+		// TODO Auto-generated method stub
+		return new SequenceRange(getFirst(),getRows());
+	}
+
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/SequenceDataModel.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/SequenceDataModel.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/SequenceDataModel.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,202 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.ajax.repeat;
+
+import java.io.IOException;
+
+import javax.faces.context.FacesContext;
+import javax.faces.model.DataModel;
+
+/**
+ * @author shura
+ *
+ */
+public class SequenceDataModel extends ExtendedDataModel {
+	
+	private DataModel wrappedModel;
+
+	/**
+	 * @param wrapped
+	 */
+	public SequenceDataModel(DataModel wrapped) {
+		super();
+		this.wrappedModel = wrapped;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.ajax.repeat.ExtendedDataModel#dataIterator(org.ajax4jsf.ajax.repeat.Range)
+	 */
+/*	public Iterator dataIterator(Range range) {
+		final SequenceRange seqRange = (SequenceRange) range;
+		int rows = seqRange.getRows();
+		int rowCount = wrapped.getRowCount();
+		final int firstRow = seqRange.getFirstRow();
+		if(rows > 0){
+			rows += firstRow;
+			if(rowCount >=0){
+				rows = Math.min(rows, rowCount);
+			}
+		} else if(rowCount >=0 ){
+			rows = rowCount;
+		} 
+		final int maxRow = rows;
+		return new Iterator(){
+			
+			int rowIndex = firstRow;
+
+			public boolean hasNext() {
+				// TODO Auto-generated method stub
+				return maxRow < 0 || rowIndex < maxRow;
+			}
+
+			public Object next() {
+				// TODO Auto-generated method stub
+				return new Integer(rowIndex++);
+			}
+
+			public void remove() {
+				throw new IllegalStateException();				
+			}
+			
+		};
+	}
+*/	
+	public void walk(FacesContext context, DataVisitor visitor, Range range, Object argument) throws IOException {
+		final SequenceRange seqRange = (SequenceRange) range;
+		int rows = seqRange.getRows();
+		int rowCount = wrappedModel.getRowCount();
+		int currentRow = seqRange.getFirstRow();
+		if(rows > 0){
+			rows += currentRow;
+			if(rowCount >=0){
+				rows = Math.min(rows, rowCount);
+			}
+		} else if(rowCount >=0 ){
+			rows = rowCount;
+		} else {
+			rows = -1;
+		}
+		while (rows < 0 || currentRow < rows) {
+			wrappedModel.setRowIndex(currentRow);
+			if(wrappedModel.isRowAvailable()){
+				visitor.process(context, new Integer(currentRow), argument);
+			} else {
+				break;
+			}
+			currentRow++;
+		}
+		
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.ajax.repeat.ExtendedDataModel#getRowKey()
+	 */
+	public Object getRowKey() {
+		int index = wrappedModel.getRowIndex();
+		if(index<0){
+			return null;
+		}
+		return new Integer(index);
+	}
+
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.ajax.repeat.ExtendedDataModel#setRowKey(java.lang.Object)
+	 */
+	public void setRowKey(Object key) {
+		if(null == key){
+			wrappedModel.setRowIndex(-1);
+		} else {
+			Integer index = (Integer) key;
+			wrappedModel.setRowIndex(index.intValue());
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.model.DataModel#getRowCount()
+	 */
+	public int getRowCount() {
+		// TODO Auto-generated method stub
+		return wrappedModel.getRowCount();
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.model.DataModel#getRowData()
+	 */
+	public Object getRowData() {
+		// TODO Auto-generated method stub
+		return wrappedModel.getRowData();
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.model.DataModel#getRowIndex()
+	 */
+	public int getRowIndex() {
+		// TODO Auto-generated method stub
+		return wrappedModel.getRowIndex();
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.model.DataModel#getWrappedData()
+	 */
+	public Object getWrappedData() {
+		// TODO Auto-generated method stub
+		return wrappedModel.getWrappedData();
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.model.DataModel#isRowAvailable()
+	 */
+	public boolean isRowAvailable() {
+		// TODO Auto-generated method stub
+		return wrappedModel.isRowAvailable();
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.model.DataModel#setRowIndex(int)
+	 */
+	public void setRowIndex(int rowIndex) {
+		wrappedModel.setRowIndex(rowIndex);
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.model.DataModel#setWrappedData(java.lang.Object)
+	 */
+	public void setWrappedData(Object data) {
+		wrappedModel.setWrappedData(data);
+	}
+
+	/**
+	 * @return the wrappedModel
+	 */
+	protected DataModel getWrappedModel() {
+		return this.wrappedModel;
+	}
+
+	/**
+	 * @param wrappedModel the wrappedModel to set
+	 */
+	protected void setWrappedModel(DataModel wrappedModel) {
+		this.wrappedModel = wrappedModel;
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/SequenceRange.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/SequenceRange.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/SequenceRange.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,58 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.ajax.repeat;
+
+/**
+ * @author shura
+ *
+ */
+public class SequenceRange implements Range {
+	
+	private int firstRow = 0;
+	
+	private int rows = -1;
+
+	/**
+	 * @return the firstRow
+	 */
+	public int getFirstRow() {
+		return firstRow;
+	}
+
+	/**
+	 * @return the rows
+	 */
+	public int getRows() {
+		return rows;
+	}
+
+	/**
+	 * @param firstRow
+	 * @param rows
+	 */
+	public SequenceRange(int firstRow, int rows) {
+		super();
+		this.firstRow = firstRow;
+		this.rows = rows;
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/SerializableDataModel.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/SerializableDataModel.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/SerializableDataModel.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,39 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.ajax.repeat;
+
+import java.io.Serializable;
+
+/**
+ * Serializable version of {@link ExtendedDataModel}, for save lightweight version of data
+ * 
+ * @author shura
+ *
+ */
+public abstract class SerializableDataModel extends ExtendedDataModel implements Serializable {
+
+	/**
+	 * Method called after update all model values. For example, developer can update
+	 * database with new values of modified rows. 
+	 */
+	public abstract void update();
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/UIDataAdaptor.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/UIDataAdaptor.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/UIDataAdaptor.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1321 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.ajax.repeat;
+
+import java.io.IOException;
+import java.io.Serializable;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+
+import javax.faces.FacesException;
+import javax.faces.application.FacesMessage;
+import javax.faces.component.EditableValueHolder;
+import javax.faces.component.NamingContainer;
+import javax.faces.component.StateHolder;
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIData;
+import javax.faces.context.FacesContext;
+import javax.faces.el.ValueBinding;
+import javax.faces.event.AbortProcessingException;
+import javax.faces.event.FacesEvent;
+import javax.faces.event.FacesListener;
+import javax.faces.event.PhaseId;
+import javax.faces.model.DataModel;
+import javax.faces.model.ListDataModel;
+import javax.faces.render.Renderer;
+
+import org.ajax4jsf.framework.renderer.AjaxChildrenRenderer;
+
+/**
+ * Base class for iterable components, like dataTable, Tomahawk dataList,
+ * Facelets repeat, tree etc., with support for partial rendering on AJAX
+ * responces for one or more selected iterations.
+ * 
+ * @author shura
+ * 
+ */
+public abstract class UIDataAdaptor extends UIData implements AjaxDataEncoder {
+
+    /**
+         * 
+         */
+    public static final String COMPONENT_STATE_ATTRIBUTE = "componentState";
+
+    public final static DataModel EMPTY_MODEL = new ListDataModel(
+	    Collections.EMPTY_LIST);
+
+    /**
+         * Base class for visit data model at phases decode, validation and
+         * update model
+         * 
+         * @author shura
+         * 
+         */
+    protected abstract class ComponentVisitor implements DataVisitor {
+
+	public void process(FacesContext context, Object rowKey, Object argument)
+		throws IOException {
+	    setRowKey(context, rowKey);
+	    if (isRowAvailable()) {
+		Iterator childIterator = dataChildren();
+		while (childIterator.hasNext()) {
+		    UIComponent component = (UIComponent) childIterator.next();
+		    processComponent(context, component, argument);
+		}
+
+	    }
+	}
+
+	public abstract void processComponent(FacesContext context,
+		UIComponent c, Object argument) throws IOException;
+
+    }
+
+    /**
+         * Visitor for process decode on children components.
+         */
+    protected ComponentVisitor decodeVisitor = new ComponentVisitor() {
+
+	public void processComponent(FacesContext context, UIComponent c,
+		Object argument) {
+	    c.processDecodes(context);
+	}
+
+    };
+
+    /**
+         * Visitor for process validation phase
+         */
+    protected ComponentVisitor validateVisitor = new ComponentVisitor() {
+
+	public void processComponent(FacesContext context, UIComponent c,
+		Object argument) {
+	    c.processValidators(context);
+	}
+
+    };
+
+    /**
+         * Visitor for process update model phase.
+         */
+    protected ComponentVisitor updateVisitor = new ComponentVisitor() {
+
+	public void processComponent(FacesContext context, UIComponent c,
+		Object argument) {
+	    c.processUpdates(context);
+	}
+
+    };
+
+    /**
+         * Base client id's of this component, for wich invoked encode...
+         * methods. Component will save state and serialisable models for this
+         * keys only.
+         */
+    private Set _encoded;
+
+    /**
+         * Storage for data model instances with different client id's of this
+         * component. In case of child for UIData component, this map will keep
+         * data models for different iterations between phases.
+         */
+    private Map _modelsMap = new HashMap();
+
+    /**
+         * Reference for curent data model
+         */
+    private ExtendedDataModel _currentModel = null;
+
+    /**
+         * States of this component for diferent iterations, same as for models.
+         */
+    private Map _statesMap = new HashMap();
+
+    /**
+         * Reference for current component state.
+         */
+    private DataComponentState _currentState = null;
+
+    /**
+         * Name of EL variable for current component state.
+         */
+    private String _stateVar;
+
+    private String _rowKeyVar;
+
+    /**
+         * Key for current value in model.
+         */
+    private Object _rowKey = null;
+
+    /**
+         * Values of row keys, encoded on ajax response rendering.
+         */
+    private Set _ajaxKeys = null;
+
+    private Object _ajaxRowKey = null;
+
+    private Map _ajaxRowKeysMap = new HashMap();
+
+    /**
+         * Get name of EL variable for component state.
+         * 
+         * @return the varState
+         */
+    public String getStateVar() {
+	return _stateVar;
+    }
+
+    /**
+         * @param varStatus
+         *                the varStatus to set
+         */
+    public void setStateVar(String varStatus) {
+	this._stateVar = varStatus;
+    }
+
+    /**
+         * @return the rowKeyVar
+         */
+    public String getRowKeyVar() {
+	return this._rowKeyVar;
+    }
+
+    /**
+         * @param rowKeyVar
+         *                the rowKeyVar to set
+         */
+    public void setRowKeyVar(String rowKeyVar) {
+	this._rowKeyVar = rowKeyVar;
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see javax.faces.component.UIData#getRowCount()
+         */
+    public int getRowCount() {
+	return getExtendedDataModel().getRowCount();
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see javax.faces.component.UIData#getRowData()
+         */
+    public Object getRowData() {
+	return getExtendedDataModel().getRowData();
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see javax.faces.component.UIData#isRowAvailable()
+         */
+    public boolean isRowAvailable() {
+	return this.getExtendedDataModel().isRowAvailable();
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see javax.faces.component.UIData#setRowIndex(int)
+         */
+    public void setRowIndex(int index) {
+	FacesContext faces = FacesContext.getCurrentInstance();
+	ExtendedDataModel localModel = getExtendedDataModel();
+	// if(key == localModel.getRowIndex()){
+	// return;
+	// }
+	// save child state
+	this.saveChildState(faces);
+	// Set current model row by int, but immediately get value from model.
+	// for compability, complex models must provide values map between
+	// integer and key value.
+	localModel.setRowIndex(index);
+	this._rowKey = localModel.getRowKey();
+	this._clientId = null;
+	boolean rowSelected = this._rowKey != null;
+
+	setupVariable(faces, localModel, rowSelected);
+	// restore child state
+	this.restoreChildState(faces);
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see javax.faces.component.UIData#getRowIndex()
+         */
+    public int getRowIndex() {
+	return getExtendedDataModel().getRowIndex();
+    }
+
+    /**
+         * Same as for int index, but for complex model key.
+         * 
+         * @return
+         */
+    public Object getRowKey() {
+	return this._rowKey;
+    }
+
+    public void setRowKey(Object key) {
+	setRowKey(FacesContext.getCurrentInstance(), key);
+    }
+
+    /**
+         * Setup current roy by key. Perform same functionality as
+         * {@link UIData#setRowIndex(int)}, but for key object - it may be not
+         * only row number in sequence data, but, for example - path to current
+         * node in tree.
+         * 
+         * @param faces -
+         *                current FacesContext
+         * @param key
+         *                new key value.
+         */
+    public void setRowKey(FacesContext faces, Object key) {
+	ExtendedDataModel localModel = getExtendedDataModel();
+	// save child state
+	this.saveChildState(faces);
+	this._rowKey = key;
+	this._clientId = null;
+	localModel.setRowKey(key);
+
+	boolean rowSelected = key != null;
+
+	setupVariable(faces, localModel, rowSelected);
+	// restore child state
+	this.restoreChildState(faces);
+
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see org.ajax4jsf.ajax.repeat.AjaxDataEncoder#getAjaxKeys()
+         */
+    public Set getAjaxKeys() {
+	Set keys = null;
+	if (this._ajaxKeys != null) {
+	    keys = (this._ajaxKeys);
+	} else {
+		ValueBinding vb = getValueBinding("ajaxKeys");
+		if (vb != null) {
+		    keys = (Set) (vb.getValue(getFacesContext()));
+		} else if(null != _ajaxRowKey){
+		    // If none of above exist , use row with submitted AjaxComponent
+		    keys = new HashSet(1);
+		    keys.add(_ajaxRowKey);
+		}
+	}
+	return keys;
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see org.ajax4jsf.ajax.repeat.AjaxDataEncoder#setAjaxKeys(java.util.Set)
+         */
+    public void setAjaxKeys(Set ajaxKeys) {
+	this._ajaxKeys = ajaxKeys;
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see org.ajax4jsf.framework.ajax.AjaxChildrenEncoder#encodeAjaxChild(javax.faces.context.FacesContext,
+         *      java.lang.String, java.util.Set, java.util.Set)
+         */
+    public void encodeAjaxChild(FacesContext context, String path,
+	    final Set ids, final Set renderedAreas) throws IOException {
+	resetDataModel();
+
+	Renderer renderer = getRenderer(context);
+	if (null != renderer && renderer instanceof AjaxChildrenRenderer) {
+	    // If renderer support partial encoding - call them.
+	    AjaxChildrenRenderer childrenRenderer = (AjaxChildrenRenderer) renderer;
+	    childrenRenderer.encodeAjaxChildren(context, this, path, ids,
+		    renderedAreas);
+	} else {
+	    // Use simple ajax children encoding for iterate other keys.
+	    final AjaxChildrenRenderer childrenRenderer = getChildrenRenderer();
+	    final String childrenPath = path + getId() + NamingContainer.SEPARATOR_CHAR;
+	    ComponentVisitor ajaxVisitor = new ComponentVisitor() {
+
+		public void processComponent(FacesContext context,
+			UIComponent c, Object argument) throws IOException {
+		    childrenRenderer.encodeAjaxComponent(context, c, childrenPath,
+			    ids, renderedAreas);
+		}
+
+	    };
+	    Set ajaxKeys = getAjaxKeys();
+	    if (null != ajaxKeys) {
+		captureOrigValue();
+		Object savedKey = getRowKey();
+		setRowKey(context, null);
+		Iterator fixedChildren = fixedChildren();
+		while (fixedChildren.hasNext()) {
+		    UIComponent component = (UIComponent) fixedChildren.next();
+		    ajaxVisitor.processComponent(context, component, null);
+		}
+		for (Iterator iter = ajaxKeys.iterator(); iter.hasNext();) {
+		    Object key = (Object) iter.next();
+		    ajaxVisitor.process(context, key, null);
+		}
+		setRowKey(savedKey);
+		restoreOrigValue();
+	    } else {
+		iterate(context, ajaxVisitor, null);
+	    }
+	}
+    }
+
+    /**
+         * Instance of default renderer in ajax responses.
+         */
+    private AjaxChildrenRenderer _childrenRenderer = null;
+
+    /**
+         * getter for simple {@link AjaxChildrenRenderer} instance in case of
+         * ajax responses. If default renderer not support search of children
+         * for encode in ajax response, component will use this instance by
+         * default.
+         * 
+         * @return
+         */
+    protected AjaxChildrenRenderer getChildrenRenderer() {
+	if (_childrenRenderer == null) {
+	    _childrenRenderer = new AjaxChildrenRenderer() {
+
+		protected Class getComponentClass() {
+		    return UIDataAdaptor.class;
+		}
+
+	    };
+
+	}
+
+	return _childrenRenderer;
+    }
+
+    /**
+         * @return Set of values for clientId's of this component, for wich was
+         *         invoked "encode" methods.
+         */
+    protected Set getEncodedIds() {
+	if (_encoded == null) {
+	    _encoded = new HashSet();
+	}
+
+	return _encoded;
+    }
+
+    /**
+         * Setup EL variable for different iteration. Value of row data and
+         * component state will be put into request scope attributes with names
+         * given by "var" and "varState" bean properties.
+         * 
+         * @param faces
+         *                current faces context
+         * @param localModel
+         * @param rowSelected
+         */
+    protected void setupVariable(FacesContext faces, DataModel localModel,
+	    boolean rowSelected) {
+	Map attrs = faces.getExternalContext().getRequestMap();
+	if (rowSelected && isRowAvailable()) {
+	    // Current row data.
+	    setupVariable(getVar(), attrs, localModel.getRowData());
+	    // Component state variable.
+	    setupVariable(getStateVar(), attrs, getComponentState());
+	    // Row key Data variable.
+	    setupVariable(getRowKeyVar(), attrs, getRowKey());
+
+	} else {
+	    removeVariable(getVar(), attrs);
+	    removeVariable(getStateVar(), attrs);
+	    removeVariable(getRowKeyVar(), attrs);
+	}
+    }
+
+    /**
+         * @param var
+         * @param attrs
+         * @param rowData
+         */
+    private void setupVariable(String var, Map attrs, Object rowData) {
+	if (var != null) {
+	    attrs.put(var, rowData);
+	}
+    }
+
+    /**
+         * @param var
+         * @param attrs
+         * @param rowData
+         */
+    private void removeVariable(String var, Map attrs) {
+	if (var != null) {
+	    attrs.remove(var);
+	}
+    }
+
+    /**
+         * Reset data model. this method must be called twice per request -
+         * before decode phase and before component encoding.
+         */
+    protected void resetDataModel() {
+	this.setExtendedDataModel(null);
+    }
+
+    /**
+         * Set data model. Model value will be stored in Map with key as current
+         * clientId for this component, to keep models between phases for same
+         * iteration in case if this component child for other UIData
+         * 
+         * @param model
+         */
+    protected void setExtendedDataModel(ExtendedDataModel model) {
+	this._currentModel = model;
+	this._modelsMap.put(getBaseClientId(getFacesContext()), model);
+    }
+
+    /**
+         * Get current data model, or create it by {@link #createDataModel()}
+         * method. For different iterations in ancestor UIData ( if present )
+         * will be returned different models.
+         * 
+         * @return current data model.
+         */
+    protected ExtendedDataModel getExtendedDataModel() {
+	if (this._currentModel == null) {
+	    String baseClientId = getBaseClientId(getFacesContext());
+	    ExtendedDataModel model = (ExtendedDataModel) this._modelsMap
+		    .get(baseClientId);
+	    if (null == model) {
+		model = createDataModel();
+		this._modelsMap.put(baseClientId, model);
+	    }
+	    this._currentModel = model;
+	}
+	return this._currentModel;
+    }
+
+    /**
+         * Hook mathod for create data model in concrete implementations.
+         * 
+         * @return
+         */
+    protected abstract ExtendedDataModel createDataModel();
+
+    /**
+         * Set current state ( at most cases, visual representation ) of this
+         * component. Same as for DataModel, component will keep states for
+         * different iterations.
+         * 
+         * @param state
+         */
+    public void setComponentState(DataComponentState state) {
+	this._currentState = state;
+	this._statesMap.put(getBaseClientId(getFacesContext()),
+		this._currentState);
+    }
+
+    /**
+         * @return current state of this component.
+         */
+    public DataComponentState getComponentState() {
+	DataComponentState state = null;
+	if (this._currentState == null) {
+	    // Check for binding state to user bean.
+	    ValueBinding valueBinding = getValueBinding(UIDataAdaptor.COMPONENT_STATE_ATTRIBUTE);
+	    FacesContext facesContext = getFacesContext();
+	    if (null != valueBinding) {
+		state = (DataComponentState) valueBinding
+			.getValue(facesContext);
+		if (null == state) {
+		    // Create default state
+		    state = createComponentState();
+		    if (!valueBinding.isReadOnly(facesContext)) {
+			// Store created state in user bean.
+			valueBinding.setValue(facesContext, state);
+		    }
+		}
+	    } else {
+		// Check for stored state in map for parent iterations
+		String baseClientId = getBaseClientId(facesContext);
+		state = (DataComponentState) this._statesMap.get(baseClientId);
+		if (null == state) {
+		    // Create default component state
+		    state = createComponentState();
+		    this._statesMap.put(baseClientId, state);
+		}
+		this._currentState = state;
+	    }
+	} else {
+	    state = this._currentState;
+	}
+	return state;
+    }
+
+    /**
+         * Hook method for create default state in concrete implementations.
+         * 
+         * @return
+         */
+    protected abstract DataComponentState createComponentState();
+
+    private String _clientId = null;
+
+    public String getClientId(FacesContext faces) {
+	if (null == _clientId) {
+	    StringBuffer id = new StringBuffer(getBaseClientId(faces));
+	    Object rowKey = getRowKey();
+	    if (rowKey != null) {
+		id.append(NamingContainer.SEPARATOR_CHAR).append(
+			rowKey.toString());
+	    }
+	    Renderer renderer;
+	    if (null != (renderer = getRenderer(faces))) {
+		_clientId = renderer.convertClientId(faces, id.toString());
+	    } else {
+		_clientId = id.toString();
+	    }
+
+	}
+	return _clientId;
+    }
+
+    private String _baseClientId = null;
+
+    /**
+         * Get base clietntId of this component ( withowt iteration part )
+         * 
+         * @param faces
+         * @return
+         */
+    public String getBaseClientId(FacesContext faces) {
+	// Return any previously cached client identifier
+	if (_baseClientId == null) {
+
+	    // Search for an ancestor that is a naming container
+	    UIComponent ancestorContainer = this;
+	    StringBuffer parentIds = new StringBuffer();
+	    while (null != (ancestorContainer = ancestorContainer.getParent())) {
+		if (ancestorContainer instanceof NamingContainer) {
+		    parentIds.append(ancestorContainer.getClientId(faces))
+			    .append(NamingContainer.SEPARATOR_CHAR);
+		    break;
+		}
+	    }
+	    String id = getId();
+	    if (null != id) {
+		_baseClientId = parentIds.append(id).toString();
+	    } else {
+		_baseClientId = parentIds.append(
+			faces.getViewRoot().createUniqueId()).toString();
+	    }
+	}
+	return (_baseClientId);
+
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see javax.faces.component.UIComponentBase#setId(java.lang.String)
+         */
+    public void setId(String id) {
+	// If component created by restoring tree or JSP, initial Id is null.
+	boolean haveId = null != super.getId();
+	super.setId(id);
+	_baseClientId = null;
+	_clientId = null;
+	if (haveId) {
+	    // parent UIData ( if present ) will be set same Id at iteration
+	    // -
+	    // we use it for
+	    // switch to different model and state.
+	    String baseClientId = getBaseClientId(getFacesContext());
+	    this._currentState = (DataComponentState) this._statesMap
+		    .get(baseClientId);
+	    this._currentModel = (ExtendedDataModel) this._modelsMap
+		    .get(baseClientId);
+	    if (null != this._currentModel) {
+		this._rowKey = this._currentModel.getRowKey();
+		// restoreChildState();
+	    }
+	    // Restore value for row with submitted AjaxComponent.
+	    this._ajaxRowKey = _ajaxRowKeysMap.get(baseClientId);
+	}
+    }
+
+    private Object origValue;
+
+    /**
+         * Save current state of data variable.
+         */
+    public void captureOrigValue() {
+	captureOrigValue(FacesContext.getCurrentInstance());
+    }
+
+    /**
+         * Save current state of data variable.
+         * 
+         * @param faces
+         *                current faces context
+         */
+    public void captureOrigValue(FacesContext faces) {
+	String var = getVar();
+	if (var != null) {
+	    Map attrs = faces.getExternalContext().getRequestMap();
+	    this.origValue = attrs.get(var);
+	}
+    }
+
+    /**
+         * Restore value of data variable after processing phase.
+         */
+    public void restoreOrigValue() {
+	restoreOrigValue(FacesContext.getCurrentInstance());
+    }
+
+    /**
+         * Restore value of data variable after processing phase.
+         * 
+         * @param faces
+         *                current faces context
+         */
+    public void restoreOrigValue(FacesContext faces) {
+	String var = getVar();
+	if (var != null) {
+	    Map attrs = faces.getExternalContext().getRequestMap();
+	    if (this.origValue != null) {
+		attrs.put(var, this.origValue);
+	    } else {
+		attrs.remove(var);
+	    }
+	}
+    }
+
+    /**
+         * Saved values of {@link EditableValueHolder} fields per iterations.
+         */
+    private Map childState;
+
+    /**
+         * @param faces
+         * @return Saved values of {@link EditableValueHolder} fields per
+         *         iterations.
+         */
+    protected Map getChildState(FacesContext faces) {
+	if (this.childState == null) {
+	    this.childState = new HashMap();
+	}
+	String baseClientId = getBaseClientId(faces);
+	Map currentChildState = (Map) childState.get(baseClientId);
+	if (null == currentChildState) {
+	    currentChildState = new HashMap();
+	    childState.put(baseClientId, currentChildState);
+	}
+	return currentChildState;
+    }
+
+    /**
+         * Save values of {@link EditableValueHolder} fields before change
+         * current row.
+         * 
+         * @param faces
+         */
+    protected void saveChildState(FacesContext faces) {
+
+	Iterator itr = dataChildren();
+	while (itr.hasNext()) {
+	    Map childState = this.getChildState(faces);
+	    this.saveChildState(faces, (UIComponent) itr.next(), childState);
+	}
+    }
+
+    /**
+         * Recursive method for Iterate on children for save
+         * {@link EditableValueHolder} fields states.
+         * 
+         * @param faces
+         * @param c
+         * @param childState
+         */
+    private void saveChildState(FacesContext faces, UIComponent c,
+	    Map childState) {
+
+	if (c instanceof EditableValueHolder && !c.isTransient()) {
+	    String clientId = c.getClientId(faces);
+	    SavedState ss = (SavedState) childState.get(clientId);
+	    if (ss == null) {
+		ss = new SavedState();
+		childState.put(clientId, ss);
+	    }
+	    ss.populate((EditableValueHolder) c);
+	}
+
+	// continue hack
+	Iterator itr = c.getChildren().iterator();
+	while (itr.hasNext()) {
+	    saveChildState(faces, (UIComponent) itr.next(), childState);
+	}
+	itr = c.getFacets().values().iterator();
+	while (itr.hasNext()) {
+	    saveChildState(faces, (UIComponent) itr.next(), childState);
+	}
+    }
+
+    /**
+         * Restore values of {@link EditableValueHolder} fields after change
+         * current row.
+         * 
+         * @param faces
+         */
+    protected void restoreChildState(FacesContext faces) {
+
+	Iterator itr = dataChildren();
+	while (itr.hasNext()) {
+	    Map childState = this.getChildState(faces);
+	    this.restoreChildState(faces, (UIComponent) itr.next(), childState);
+	}
+    }
+
+    /**
+         * Recursive part of
+         * {@link #restoreChildState(FacesContext, UIComponent, Map)}
+         * 
+         * @param faces
+         * @param c
+         * @param childState
+         * 
+         */
+    private void restoreChildState(FacesContext faces, UIComponent c,
+	    Map childState) {
+	// reset id
+	String id = c.getId();
+	c.setId(id);
+
+	// hack
+	if (c instanceof EditableValueHolder) {
+	    EditableValueHolder evh = (EditableValueHolder) c;
+	    String clientId = c.getClientId(faces);
+	    SavedState ss = (SavedState) childState.get(clientId);
+	    if (ss != null) {
+		ss.apply(evh);
+	    } else {
+		NullState.apply(evh);
+	    }
+	}
+
+	// continue hack
+	Iterator itr = c.getChildren().iterator();
+	while (itr.hasNext()) {
+	    restoreChildState(faces, (UIComponent) itr.next(), childState);
+	}
+	itr = c.getFacets().values().iterator();
+	while (itr.hasNext()) {
+	    restoreChildState(faces, (UIComponent) itr.next(), childState);
+	}
+    }
+
+    /**
+         * Check for validation errors on children components. If true, saved
+         * values must be keep on render phase
+         * 
+         * @param context
+         * @return
+         */
+    private boolean keepSaved(FacesContext context) {
+
+	Iterator clientIds = this.getChildState(context).keySet().iterator();
+	while (clientIds.hasNext()) {
+	    String clientId = (String) clientIds.next();
+	    Iterator messages = context.getMessages(clientId);
+	    while (messages.hasNext()) {
+		FacesMessage message = (FacesMessage) messages.next();
+		if (message.getSeverity()
+			.compareTo(FacesMessage.SEVERITY_ERROR) >= 0) {
+		    return (true);
+		}
+	    }
+	}
+	return false;
+    }
+
+    /**
+         * Perform iteration on all children components and all data rows with
+         * given visitor.
+         * 
+         * @param faces
+         * @param visitor
+         */
+    protected void iterate(FacesContext faces, ComponentVisitor visitor,
+	    Object argument) {
+
+	// stop if not rendered
+	if (!this.isRendered()) {
+	    return;
+	}
+	// reset rowIndex
+	this.captureOrigValue(faces);
+	this.setRowKey(faces, null);
+	try {
+	    Iterator fixedChildren = fixedChildren();
+	    while (fixedChildren.hasNext()) {
+		UIComponent component = (UIComponent) fixedChildren.next();
+		visitor.processComponent(faces, component, argument);
+	    }
+
+	    walk(faces, visitor, argument);
+	} catch (Exception e) {
+	    throw new FacesException(e);
+	} finally {
+	    this.setRowKey(faces, null);
+	    this.restoreOrigValue(faces);
+	}
+    }
+
+    /**
+         * Walk ( visit ) this component on all data-avare children for each
+         * row.
+         * 
+         * @param faces
+         * @param visitor
+         * @throws IOException
+         */
+    public void walk(FacesContext faces, DataVisitor visitor, Object argument)
+	    throws IOException {
+	getExtendedDataModel().walk(faces, visitor,
+		getComponentState().getRange(), argument);
+    }
+
+    protected void processDecodes(FacesContext faces, Object argument) {
+	if (!this.isRendered())
+	    return;
+	this.resetComponent(faces);
+	this.iterate(faces, decodeVisitor, argument);
+	this.decode(faces);
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see javax.faces.component.UIData#processDecodes(javax.faces.context.FacesContext)
+         */
+    public void processDecodes(FacesContext faces) {
+	processDecodes(faces, null);
+    }
+
+    /**
+         * Reset per-request fields in component.
+         * 
+         * @param faces
+         * 
+         */
+    protected void resetComponent(FacesContext faces) {
+	// resetDataModel();
+	if (null != this.childState) {
+	    childState.remove(getBaseClientId(faces));
+	}
+	this._encoded = null;
+    }
+
+    protected void processUpdates(FacesContext faces, Object argument) {
+	if (!this.isRendered())
+	    return;
+	this.iterate(faces, updateVisitor, argument);
+	ExtendedDataModel dataModel = getExtendedDataModel();
+	// If no validation errors, update values for serializable model,
+	// restored from view.
+	if (dataModel instanceof SerializableDataModel && (!keepSaved(faces))) {
+	    SerializableDataModel serializableModel = (SerializableDataModel) dataModel;
+	    serializableModel.update();
+	}
+    }
+
+    public void processUpdates(FacesContext faces) {
+	processUpdates(faces, null);
+    }
+
+    protected void processValidators(FacesContext faces, Object argument) {
+	if (!this.isRendered())
+	    return;
+	this.iterate(faces, validateVisitor, argument);
+    }
+
+    public void processValidators(FacesContext faces) {
+	processValidators(faces, null);
+    }
+
+    public void encodeBegin(FacesContext context) throws IOException {
+	resetDataModel();
+	// if(!keepSaved(context)){
+	// childState.remove(getBaseClientId(context));
+	// }
+	// Mark component as used, if parent UIData change own range states not
+	// accessed at
+	// encode phase must be unsaved.
+	getEncodedIds().add(getBaseClientId(context));
+	// getComponentState().setUsed(true);
+	super.encodeBegin(context);
+    }
+
+    /**
+         * This method must create iterator for all non-data avare children of
+         * this component ( header/footer facets for components and columns in
+         * dataTable, facets for tree etc.
+         * 
+         * @return iterator for all components not sensitive for row data.
+         */
+    protected abstract Iterator fixedChildren();
+
+    /**
+         * This method must create iterator for all children components,
+         * processed "per row" It can be children of UIColumn in dataTable,
+         * nodes in tree
+         * 
+         * @return iterator for all components processed per row.
+         */
+    protected abstract Iterator dataChildren();
+
+    private final static SavedState NullState = new SavedState();
+
+    // from RI
+    /**
+         * This class keep values of {@link EditableValueHolder} row-sensitive
+         * fields.
+         * 
+         * @author shura
+         * 
+         */
+    private final static class SavedState implements Serializable {
+
+	private Object submittedValue;
+
+	private static final long serialVersionUID = 2920252657338389849L;
+
+	Object getSubmittedValue() {
+	    return (this.submittedValue);
+	}
+
+	void setSubmittedValue(Object submittedValue) {
+	    this.submittedValue = submittedValue;
+	}
+
+	private boolean valid = true;
+
+	boolean isValid() {
+	    return (this.valid);
+	}
+
+	void setValid(boolean valid) {
+	    this.valid = valid;
+	}
+
+	private Object value;
+
+	Object getValue() {
+	    return (this.value);
+	}
+
+	public void setValue(Object value) {
+	    this.value = value;
+	}
+
+	private boolean localValueSet;
+
+	boolean isLocalValueSet() {
+	    return (this.localValueSet);
+	}
+
+	public void setLocalValueSet(boolean localValueSet) {
+	    this.localValueSet = localValueSet;
+	}
+
+	public String toString() {
+	    return ("submittedValue: " + submittedValue + " value: " + value
+		    + " localValueSet: " + localValueSet);
+	}
+
+	public void populate(EditableValueHolder evh) {
+	    this.value = evh.getLocalValue();
+	    this.valid = evh.isValid();
+	    this.submittedValue = evh.getSubmittedValue();
+	    this.localValueSet = evh.isLocalValueSet();
+	}
+
+	public void apply(EditableValueHolder evh) {
+	    evh.setValue(this.value);
+	    evh.setValid(this.valid);
+	    evh.setSubmittedValue(this.submittedValue);
+	    evh.setLocalValueSet(this.localValueSet);
+	}
+
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see javax.faces.component.UIData#queueEvent(javax.faces.event.FacesEvent)
+         */
+    public void queueEvent(FacesEvent event) {
+	if (event.getComponent() != this) {
+	    event = new IndexedEvent(this, event, getRowKey());
+	}
+	// Send event directly to parent, to avoid wrapping in superclass.
+	UIComponent parent = getParent();
+	if (parent == null) {
+	    throw new IllegalStateException(
+		    "No parent component for queue event");
+	} else {
+	    parent.queueEvent(event);
+	}
+    }
+
+    public void broadcast(FacesEvent event) throws AbortProcessingException {
+
+	if (!(event instanceof IndexedEvent)) {
+	    if (!broadcastLocal(event)) {
+		super.broadcast(event);
+	    }
+	    return;
+	}
+
+	// Set up the correct context and fire our wrapped event
+	IndexedEvent revent = (IndexedEvent) event;
+	Object oldRowKey = getRowKey();
+	FacesContext faces = FacesContext.getCurrentInstance();
+	captureOrigValue(faces);
+	Object eventRowKey = revent.getKey();
+	setRowKey(faces, eventRowKey);
+	FacesEvent rowEvent = revent.getTarget();
+	rowEvent.getComponent().broadcast(rowEvent);
+	// For Ajax events, keep row value.
+	if (!(rowEvent.getPhaseId() == PhaseId.RENDER_RESPONSE)) {
+	    this._ajaxRowKey = eventRowKey;
+	    this._ajaxRowKeysMap.put(getBaseClientId(faces), eventRowKey);
+	}
+	setRowKey(faces, oldRowKey);
+	restoreOrigValue(faces);
+	// }
+	return;
+    }
+
+    /**
+         * Process events targetted for concrete implementation. Hook method
+         * called from {@link #broadcast(FacesEvent)}
+         * 
+         * @param event -
+         *                processed event.
+         * @return true if event processed, false if component must continue
+         *         processing.
+         */
+    protected boolean broadcastLocal(FacesEvent event) {
+	return false;
+    }
+
+    /**
+         * Wrapper for event from child component, with value of current row
+         * key.
+         * 
+         * @author shura
+         * 
+         */
+    protected static final class IndexedEvent extends FacesEvent {
+
+	private static final long serialVersionUID = -8318895390232552385L;
+
+	private final FacesEvent target;
+
+	private final Object key;
+
+	public IndexedEvent(UIDataAdaptor owner, FacesEvent target, Object key) {
+	    super(owner);
+	    this.target = target;
+	    this.key = key;
+	}
+
+	public PhaseId getPhaseId() {
+	    return (this.target.getPhaseId());
+	}
+
+	public void setPhaseId(PhaseId phaseId) {
+	    this.target.setPhaseId(phaseId);
+	}
+
+	public boolean isAppropriateListener(FacesListener listener) {
+	    return this.target.isAppropriateListener(listener);
+	}
+
+	public void processListener(FacesListener listener) {
+	    UIDataAdaptor owner = (UIDataAdaptor) this.getComponent();
+	    Object prevIndex = owner._rowKey;
+	    try {
+		owner.setRowKey(this.key);
+		this.target.processListener(listener);
+	    } finally {
+		owner.setRowKey(prevIndex);
+	    }
+	}
+
+	public Object getKey() {
+	    return key;
+	}
+
+	public FacesEvent getTarget() {
+	    return target;
+	}
+
+    }
+
+    /**
+         * "memento" pattern class for state of component.
+         * 
+         * @author shura
+         * 
+         */
+    private static class DataState implements Serializable {
+
+	/**
+         * 
+         */
+	private static final long serialVersionUID = 17070532L;
+
+	private Object superState;
+
+	private Map componentStates = new HashMap();
+
+	private Set ajaxKeys;
+
+	public String rowKeyVar;
+
+	public String stateVar;
+
+    }
+
+    /**
+         * Serialisable model and component state per iteration of parent
+         * UIData.
+         * 
+         * @author shura
+         * 
+         */
+    private static class PerIdState implements Serializable {
+	/**
+         * 
+         */
+	private static final long serialVersionUID = 9037454770537726418L;
+
+	/**
+         * Flag setted to true if componentState implements StateHolder
+         */
+	private boolean stateInHolder = false;
+
+	/**
+         * Serializable componentState or
+         */
+	private Object componentState;
+
+	private SerializableDataModel model;
+    }
+
+    public void restoreState(FacesContext faces, Object object) {
+	DataState state = (DataState) object;
+	super.restoreState(faces, state.superState);
+	this._ajaxKeys = state.ajaxKeys;
+	this._statesMap = new HashMap();
+	this._rowKeyVar = state.rowKeyVar;
+	this._stateVar = state.stateVar;
+	// Restore serializable models and component states for all rows of
+	// parent UIData ( single if this
+	// component not child of iterable )
+	for (Iterator iter = state.componentStates.entrySet().iterator(); iter
+		.hasNext();) {
+	    Map.Entry stateEntry = (Map.Entry) iter.next();
+	    PerIdState idState = (PerIdState) stateEntry.getValue();
+	    DataComponentState compState;
+	    if (idState.stateInHolder) {
+		// TODO - change RichFaces Tree component, for remove reference
+		// to component from state.
+		compState = createComponentState();
+		((StateHolder) compState).restoreState(faces,
+			idState.componentState);
+	    } else {
+		compState = (DataComponentState) idState.componentState;
+	    }
+	    Object key = stateEntry.getKey();
+	    this._statesMap.put(key, compState);
+	    this._modelsMap.put(key, idState.model);
+	}
+    }
+
+    public Object saveState(FacesContext faces) {
+	DataState state = new DataState();
+	state.superState = super.saveState(faces);
+	state.ajaxKeys = this._ajaxKeys;
+	state.rowKeyVar = this._rowKeyVar;
+	state.stateVar = this._stateVar;
+	Set encodedIds = getEncodedIds();
+	// Save all states of component and data model for all valies of
+	// clientId, encoded in this request.
+	for (Iterator iter = this._statesMap.entrySet().iterator(); iter
+		.hasNext();) {
+	    Map.Entry stateEntry = (Map.Entry) iter.next();
+	    DataComponentState dataComponentState = ((DataComponentState) stateEntry
+		    .getValue());
+	    Object stateKey = stateEntry.getKey();
+	    if (encodedIds.isEmpty() || encodedIds.contains(stateKey)) {
+		PerIdState idState = new PerIdState();
+		idState.model = getExtendedDataModel().getSerializableModel(
+			dataComponentState.getRange());
+		// Save component state , depended if implemented interfaces.
+		if (null == dataComponentState) {
+		    idState.componentState = null;
+		} else if (dataComponentState instanceof Serializable) {
+		    idState.componentState = dataComponentState;
+		} else if (dataComponentState instanceof StateHolder) {
+		    // TODO - change RichFaces Tree component, for remove
+		    // reference to component from state.
+		    // Change this code to reference for saveAttachedState.
+		    idState.componentState = ((StateHolder) dataComponentState)
+			    .saveState(faces);
+		    idState.stateInHolder = true;
+		}
+		if (null != idState.model || null != idState.componentState) {
+		    state.componentStates.put(stateKey, idState);
+		}
+	    }
+	}
+	return state;
+    }
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/UIRepeat.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/UIRepeat.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/UIRepeat.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,136 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.ajax.repeat;
+
+import java.sql.ResultSet;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.faces.context.FacesContext;
+import javax.faces.model.ArrayDataModel;
+import javax.faces.model.DataModel;
+import javax.faces.model.ListDataModel;
+import javax.faces.model.ResultDataModel;
+import javax.faces.model.ResultSetDataModel;
+import javax.faces.model.ScalarDataModel;
+import javax.servlet.jsp.jstl.sql.Result;
+/**
+ * @author shura
+ *
+ */
+public class UIRepeat extends UIDataAdaptor {
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.ajax.repeat.UIDataAdaptor#createComponentState()
+	 */
+	protected DataComponentState createComponentState() {
+		// Create component state based on this instance.
+		return new DataComponentState(){
+
+			public Range getRange() {
+				return new SequenceRange(getFirst(),getRows());
+			}
+
+			public boolean isTransient() {
+				// TODO Auto-generated method stub
+				return false;
+			}
+
+			public void restoreState(FacesContext arg0, Object arg1) {
+				// TODO Auto-generated method stub
+				
+			}
+
+			public Object saveState(FacesContext arg0) {
+				// TODO Auto-generated method stub
+				return null;
+			}
+
+			public void setTransient(boolean arg0) {
+				// TODO Auto-generated method stub
+				
+			}
+		};
+		
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.ajax.repeat.UIDataAdaptor#createDataModel()
+	 */
+	protected ExtendedDataModel createDataModel() {
+		return (ExtendedDataModel) getDataModel();
+	}
+
+	protected DataModel getDataModel(){
+        // Synthesize a DataModel around our current value if possible
+		// TODO - for jsf 1.2 use method from superclass ?
+        Object current = getValue();
+        DataModel model;
+        if (current == null) {
+            model = new SequenceDataModel(new ListDataModel(Collections.EMPTY_LIST));
+        } else if (current instanceof ExtendedDataModel) {
+            model = (DataModel) current;
+        } else if (current instanceof DataModel) {
+            model = new SequenceDataModel((DataModel) current);
+        } else if (current instanceof List) {
+            model = new SequenceDataModel(new ListDataModel((List) current));
+        } else if (Object[].class.isAssignableFrom(current.getClass())) {
+            model = new SequenceDataModel(new ArrayDataModel((Object[]) current));
+        } else if (current instanceof ResultSet) {
+            model = new SequenceDataModel(new ResultSetDataModel((ResultSet) current));
+        } else if (current instanceof Result) {
+            model = new SequenceDataModel(new ResultDataModel((Result) current));
+        } else {
+            model = new SequenceDataModel(new ScalarDataModel(current));
+        }
+	return (model);
+	}
+	
+	protected void setDataModel(DataModel model) {
+		ExtendedDataModel iterableModel;
+		if( null == model){
+			iterableModel = null;
+		} else if (model instanceof ExtendedDataModel) {
+			iterableModel = (ExtendedDataModel) model;			
+		} else {
+			iterableModel = new SequenceDataModel(model);
+		}
+		setExtendedDataModel(iterableModel);
+	}
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.ajax.repeat.UIDataAdaptor#dataChildren()
+	 */
+	protected Iterator dataChildren() {
+		// TODO Auto-generated method stub
+		return getChildren().iterator();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.ajax.repeat.UIDataAdaptor#fixedChildren()
+	 */
+	protected Iterator fixedChildren() {
+		// TODO Auto-generated method stub
+		return getFacets().values().iterator();
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/UISelector.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/UISelector.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/UISelector.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,114 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.ajax.repeat;
+
+import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
+import java.util.Iterator;
+import java.util.Set;
+
+import javax.faces.FacesException;
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIComponentBase;
+import javax.faces.context.FacesContext;
+
+import org.ajax4jsf.framework.renderer.AjaxChildrenRenderer;
+import org.apache.commons.beanutils.PropertyUtils;
+
+/**
+ * Base class for component, performed AJAX encoding on selected values in
+ * iterable components ( UIData, trees etc )
+ * 
+ * @author shura
+ * 
+ */
+public abstract class UISelector extends UIComponentBase implements
+		AjaxDataEncoder {
+
+	private static final AjaxChildrenRenderer childrenRenderer = new AjaxChildrenRenderer() {
+
+		protected Class getComponentClass() {
+			return UISelector.class;
+		}
+
+	};
+
+	/**
+	 * Name of serRow ( or simple ) method for setup current value in iterable
+	 * component
+	 * 
+	 * @parameter
+	 * @return the acceptClass
+	 */
+	public abstract String getIterationProperty();
+
+	/**
+	 * @param newSelectMethod
+	 *            the value to set
+	 */
+	public abstract void setIterationProperty(String newSelectMethod);
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.ajax.AjaxChildrenEncoder#encodeAjaxChild(javax.faces.context.FacesContext,
+	 *      java.lang.String, java.util.Set, java.util.Set)
+	 */
+	public void encodeAjaxChild(FacesContext context, String path, Set ids,
+			Set renderedAreas) throws IOException {
+		if (getChildCount() != 1) {
+			throw new FacesException(
+					"Selector component must have one, and only one, child");
+		}
+		UIComponent child = (UIComponent) getChildren().get(0);
+		Set ajaxKeys = getAjaxKeys();
+		if (null != ajaxKeys) {
+			String iterationProperty = getIterationProperty();
+			try {
+				Object savedKey = PropertyUtils.getProperty(child,
+						iterationProperty);
+				for (Iterator iter = ajaxKeys.iterator(); iter.hasNext();) {
+					Object key = (Object) iter.next();
+					PropertyUtils.setProperty(child, iterationProperty, key);
+					if (true) {
+						childrenRenderer.encodeAjaxChildren(context, this, path,
+								ids, renderedAreas);
+					}
+
+				}
+				PropertyUtils.setProperty(child, iterationProperty, savedKey);
+
+			} catch (IllegalAccessException e) {
+				throw new FacesException(
+				"Illegal access to iteration selection property "+iterationProperty+" on component "+child.getClientId(context),e);
+			} catch (InvocationTargetException e) {
+				throw new FacesException(
+						"Error in iteration selection property "+iterationProperty+" on component "+child.getClientId(context),e.getCause());
+			} catch (NoSuchMethodException e) {
+				throw new FacesException(
+						"No iteration selection property "+iterationProperty+" on component "+child.getClientId(context),e);
+			}
+		}
+
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/dataClasses.png
===================================================================
(Binary files differ)


Property changes on: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/dataClasses.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/package.html
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/package.html	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/package.html	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Insert title here</title>
+</head>
+<body>
+<h1>Base iteration component classes and simple repeater implementations.</h1>
+<p>This package contain extensions for JSF UIData component and model, used in extended iterable components</p>
+<img src="dataClasses.png" alt="Class diagramm">
+<p>Main extensions from UIData</p>
+<ul>
+<li>Use java.lang.Object for row key, instead of simple int. allow use this base class in complex structures like tree</li>
+<li>Keep "visual" state ( output behavior ) of component as separate class. In ordinar UIData it was simple first/rows attributes. In extended iteration
+it can include open/closed tree nodes keys, sorting order, selection state, columns width etc. This class provide Range object for iteration on rows in data model.</li>
+<li>For keep base classes independed from complex data models, iteration on rows data moved from component to model and use "visitor" pattern.</li>
+<li>For ajax responses, UIDataAdaptor component can perform updates on single or limited set of data values.</li>
+</ul>
+</body>
+</html>
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/resource/ResourceComponent.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/resource/ResourceComponent.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/resource/ResourceComponent.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,121 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.ajax.resource;
+
+import java.util.Date;
+
+import javax.faces.el.MethodBinding;
+
+/**
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:58:13 $
+ *
+ */
+public interface ResourceComponent {
+	
+	/**
+	 * Get Mime-type for target .
+	 * @return
+	 */
+	public abstract String getMimeType();
+
+	/**
+	 * Set Mime-type for target .
+	 * @param newvalue
+	 */
+	public abstract void setMimeType(String newvalue);
+	
+
+	/**
+	 * Get Last modified date  for target .
+	 * @return
+	 */
+	public abstract Date getLastModified();
+
+	/**
+	 * Set Last modified for target .
+	 * @param newvalue
+	 */
+	public abstract void setLastModified(Date newvalue);
+	
+	
+	/**
+	 * Get Expiration time for target .
+	 * @return
+	 */
+	public abstract Date getExpires();
+
+	/**
+	 * Set Expiration time for target .
+	 * @param newvalue
+	 */
+	public abstract void setExpires(Date newvalue);
+	
+	
+	/**
+	 * Get caching flag for resource.
+	 * @return
+	 */
+	public abstract boolean isCacheable();
+
+	/**
+	 * Set caching flag for resource.
+	 * @param newvalue
+	 */
+	public abstract void setCacheable(boolean newvalue);
+	
+	/**
+	 * Get session-avare flag for resource.
+	 * @return true if resource depend of client session. If false, no JSESSIONID encoded in URI
+	 */
+	public abstract boolean isSession();
+
+	/**
+	 * Set session-avare flag for resource.
+	 * @param newvalue
+	 */
+	public abstract void setSession(boolean newvalue);
+	
+	/**
+	 * Get Data object, encoded in uri and passed to "send" method for generate resource content.
+	 * @return
+	 */
+	public abstract Object getValue();
+
+	/**
+	 * Set Data object, encoded in uri and passed to "send" method for generate resource content.
+	 * @param newvalue
+	 */
+	public abstract void setValue(Object newvalue);
+	
+	/**
+	 * Get El binding to  method in user bean to send resource. Method will called with two parameters - restored data object and servlet output stream.
+	 * @return
+	 */
+	public abstract MethodBinding getCreateContent();
+
+	/**
+	 * Set El binding to  method in user bean to send resource. Method will called with two parameters - restored data object and servlet output stream.
+	 * @param newvalue
+	 */
+	public abstract void setCreateContent(MethodBinding newvalue);
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/resource/UIMediaOutput.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/resource/UIMediaOutput.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/ajax/resource/UIMediaOutput.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,59 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.ajax.resource;
+
+import javax.faces.component.UIOutput;
+
+/**
+ * @author shura
+ *
+ */
+public abstract class UIMediaOutput extends UIOutput implements ResourceComponent {
+	
+    public static final String COMPONENT_TYPE = "org.ajax4jsf.MMedia";
+
+	/**
+	 * Get URI attribute for resource ( src for images, href for links etc ).
+	 * @return
+	 */
+	public abstract String getUriAttribute();
+
+	/**
+	 * Set URI attribute for resource ( src for images, href for links etc ).
+	 * @param newvalue
+	 */
+	public abstract void setUriAttribute(String newvalue);
+	
+	/**
+	 * Get Element name for rendering ( imj , a , object, applet ).
+	 * @return
+	 */
+	public abstract String getElement();
+
+	/**
+	 * Set Element name for rendering ( imj , a , object, applet ).
+	 * @param newvalue
+	 */
+	public abstract void setElement(String newvalue);
+	
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/cache/Cache.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/cache/Cache.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/cache/Cache.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,180 @@
+package org.ajax4jsf.cache;
+
+import java.util.Collection;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * <p>
+ *    A cache, being a mechanism for efficient temporary storage of objects
+ * for the purpose of improving the overall performance of an application
+ * system, should not be necessary for the application to function correctly,
+ * it only improves the performance.
+ * <p>
+ *    A cache could be scoped, for examples to a JVM, all JVMs on a node, all
+ * nodes in a cluster, etc. Operations that are scoped to a cache such as put
+ * or load would affect all JVMs in the cache.  So the object loaded in 1 JVM
+ * would be equally available to all other JVMs in the cache.
+ * <p>
+ *   Objects are identified in the cache by a key. A key can be any Java
+ * object that implements the equals and  hashcode methods. If the object is
+ * to be distributed or persisted (if supported) it must implement
+ * serializable.
+ * <p/>
+ *   Each object in the cache will have a <code>CacheEntry<code> object associated with
+ * it. This object will encapsulate the metadata associated with the cached
+ * object. Mainly it represents the object statistics.
+ * <p/>
+ *   "CacheStatistics" represents the read-only statistics of the cache,
+ * while "CacheAttributes" represents the user settable attributes of the
+ * cache.
+ */
+public interface Cache
+{
+    /**
+     * Returns true if the cache contains the specified key.  The search is
+     * scoped to the cache. Other caches in the system will not be searched
+     * and a CacheLoader will not be called.
+     * @return true, if the cache contains the specified key.
+     */
+    public boolean containsKey(Object key);
+
+    /**
+     * @return true if the cache contains one or more keys to the specified value.
+     */
+    public boolean containsValue(Object value);
+
+    /**
+     * Returns a set view of the objects currently contained in the cache.
+     * A CacheLoader will not be called. The behavior is unspecified for the
+     * case when an object is remove from the cache while the return set is
+     * being traversed.
+     */
+    public Set entrySet();
+
+    /**
+     * Equality is based on the Set returned by entrySet.  Equal will return
+     * true if the two objects are referencing the same object or
+     * entrySet.equals(((Map)o).entrySet()) returns true.
+     */
+    public boolean equals(Object o);
+
+    /**
+     * @param ht a hashtable which holds a pointer pointing to the
+     * declarative cache description.
+     * @throws CacheException if any error occurs.
+     */
+
+    /**
+     * @return the hash code value for this the cache.
+     */
+    public int hashCode();
+
+    /**
+     * @return true if entrySet().isEmpty() returns true.
+     */
+    public boolean isEmpty();
+
+    /**
+     * Returns a set view of the keys currently contained in the cache.  A
+     * CacheLoader will not be called. The behavior is unspecified for the
+     * case when an object is remove from the cache while the return set is
+     * being traversed.
+     */
+    public Set keySet();
+
+    /**
+     * Copies all of the mappings from the specified map to the cache.  This
+     * would be equivalent to t.entrySet() then iterating through the Set and
+     * calling put with each key value pair.
+     */
+    public void putAll(Map t);
+
+    /**
+     * @return the number of objects in the cache. This should be the same
+     * value as entrySet().size();
+     */
+    public int size();
+
+    /**
+     * @return a collection view of the values contained in the cache.
+     */
+    public Collection values();
+
+    /**
+     * The get method will return, from the cache, the object associated with
+     * the argument "key". If the object is not in the cache, the associated
+     * cache loader will be called. If no loader is associated with the object,
+     * a null is returned.  If a problem is encountered during the retrieving
+     * or loading of the object, an exception (to be defined) will be thrown.
+     * If the "arg" argument is set, the arg object will be passed to the
+     * CacheLoader.load method.  The cache will not dereference the object.
+     * If no "arg" value is provided a null will be passed to the load method.
+     * The storing of null values in the cache is permitted, however, the get
+     * method will not distinguish returning a null stored in the cache and
+     * not finding the object in the cache. In both cases a null is returned.
+     * @throws CacheException 
+     */
+    public Object get(Object key, Object context) throws CacheException;
+
+    /**
+     * The load method provides a means to "pre load" the cache. This method
+     * will, asynchronously, load the specified object into the cache using
+     * the associated cacheloader. If the object already exists in the cache,
+     * no action is taken. If no loader is associated with the object, no object
+     * will be loaded into the cache.  If a problem is encountered during the
+     * retrieving or loading of the object, an exception should
+     * be logged.
+     * If the "arg" argument is set, the arg object will be passed to the
+     * CacheLoader.load method.  The cache will not dereference the object. If
+     * no "arg" value is provided a null will be passed to the load method.
+     * The storing of null values in the cache is permitted, however, the get
+     * method will not distinguish returning a null stored in the cache and not
+     * finding the object in the cache. In both cases a null is returned.
+     */
+    public void load(Object key, Object context) throws CacheException;
+
+    /**
+     * The peek method will return the object associated with "key" if it
+     * currently exists (and is valid) in the cache. If not, a null is
+     * returned.  With "peek" the CacheLoader will not be invoked and other
+     * caches in the system will not be searched.
+     */
+    public Object peek(Object key);
+
+    /**
+     * The put method adds the object "value" to the cache identified by the
+     * object "key".
+     */
+    public Object put(Object key, Object value);
+
+    /**
+     * Returns the CacheEntry object associated with the object identified by
+     * "key". If the object is not in the cache a null is returned.
+     */
+    public CacheEntry getCacheEntry(Object key);
+
+    /**
+     * The remove method will delete the object from the cache including the
+     * key, the associated value and the associated CacheStatistics object.
+     */
+    public Object remove(Object key);
+
+    /**
+     * The clear method will remove all objects from the cache including the
+     * key, the associated value and the associated CacheStatistics object.
+     */
+    public void clear();
+
+    /**
+     * The evict method will remove objects from the cache that are no longer
+     * valid.  Objects where the specified expiration time has been reached.
+     */
+    public void evict();
+
+    /** Add a listener to the list of cache listeners */
+    public void addListener(CacheListener listener);
+
+    /** Remove a listener from the list of cache listeners */
+    public void removeListener(CacheListener listener);
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/cache/CacheConfigurationLoader.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/cache/CacheConfigurationLoader.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/cache/CacheConfigurationLoader.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,33 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.cache;
+
+import java.util.Properties;
+
+/**
+ * @author Nick Belaevski - nbelaevski at exadel.com
+ * created 02.05.2007
+ * 
+ */
+public interface CacheConfigurationLoader {
+	public Properties loadProperties(String name);
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/cache/CacheEntry.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/cache/CacheEntry.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/cache/CacheEntry.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,29 @@
+package org.ajax4jsf.cache;
+
+import java.util.Map;
+
+/**
+ * CacheEntry
+ *
+ * @author Brian Goetz
+ */
+public interface CacheEntry extends Map.Entry {
+
+    int getHits();
+
+    long getLastAccessTime();
+    long getLastUpdateTime();
+    long getCreationTime();
+    long getExpirationTime();
+
+    /**
+     * Returns a version counter.
+     * An implementation may use timestamps for this or an incrementing
+     * number. Timestamps usually have issues with granularity and are harder
+     * to use across clusteres or threads, so an incrementing counter is often safer.
+     */
+    long getVersion();
+
+    boolean isValid();
+    long getCost();
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/cache/CacheException.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/cache/CacheException.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/cache/CacheException.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,43 @@
+package org.ajax4jsf.cache;
+
+
+/**
+ * CacheException is a generic exception, which indicates
+ * a cache error has occurred. All the other cache exceptions are the
+ * subclass of this class. All the methods in the cache package only
+ * throw CacheException or the sub class of it.
+ * <P>
+ *
+ */
+public class CacheException extends Exception
+{
+    /**
+	 * 
+	 */
+	private static final long serialVersionUID = 6712594794189413065L;
+
+	/**
+     * Constructs a new CacheException.
+     */
+    public CacheException()
+    {
+        super();
+    }
+
+    /**
+     * Constructs a new CacheException with a message string.
+     */
+    public CacheException(String s)
+    {
+        super(s);
+    }
+
+    /**
+     * Constructs a CacheException with a message string, and
+     * a base exception
+     */
+    public CacheException(String s, Throwable ex)
+    {
+        super(s, ex);
+    }
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/cache/CacheFactory.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/cache/CacheFactory.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/cache/CacheFactory.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,22 @@
+package org.ajax4jsf.cache;
+
+import java.util.Map;
+
+/**
+ * CacheFactory is a service provider specific interface.
+ * Service provider should implement CacheFactory to provide
+ * the functionality to create a new implementation specific Cache object.
+ */
+public interface CacheFactory
+{
+    /**
+     * creates a new implementation specific Cache object using the env parameters.
+     * @param env implementation specific environment parameters passed to the
+     * CacheFactory.
+     * @param cacheLoader implementation of the {@link CacheLoader} to use
+     * @param cacheConfigurationloader TODO
+     * @return an implementation specific Cache object.
+     * @throws CacheException if any error occurs.
+     */
+    public Cache createCache(Map env, CacheLoader cacheLoader, CacheConfigurationLoader cacheConfigurationloader) throws CacheException;
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/cache/CacheListener.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/cache/CacheListener.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/cache/CacheListener.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,20 @@
+package org.ajax4jsf.cache;
+
+/** Interface describing various events that can happen as elements are added to
+ *  or removed from a cache
+ */
+public interface CacheListener {
+    /** Triggered when a cache mapping is created due to the cache loader being consulted */
+    public void onLoad(Object key);
+
+    /** Triggered when a cache mapping is created due to calling Cache.put() */
+    public void onPut(Object key);
+
+    /** Triggered when a cache mapping is removed due to eviction */
+    public void onEvict(Object key);
+
+    /** Triggered when a cache mapping is removed due to calling Cache.remove() */
+    public void onRemove(Object key);
+
+    public void onClear();
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/cache/CacheLoader.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/cache/CacheLoader.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/cache/CacheLoader.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,24 @@
+package org.ajax4jsf.cache;
+
+
+/**
+ * User should implement this CacheLoader interface to
+ * provide a loader object to load the objects into cache.
+ */
+public interface CacheLoader
+{
+    /**
+     * loads an object. Application writers should implement this
+     * method to customize the loading of cache object. This method is called
+     * by the caching service when the requested object is not in the cache.
+     * <P>
+     *
+     * @param key the key identifying the object being loaded
+     *
+     * @return The object that is to be stored in the cache.
+     * @throws CacheException
+     *
+     */
+    public Object load(Object key, Object context) throws CacheException;
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/cache/CacheManager.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/cache/CacheManager.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/cache/CacheManager.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,127 @@
+package org.ajax4jsf.cache;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * CacheManager is used in J2SE environments for looking up named caches.
+ */
+public class CacheManager {
+    private static final Log log = LogFactory.getLog(CacheManager.class);
+
+    private static final String FACTORY_PROPERTY_NAME = "org.ajax4jsf.cache.CacheFactory";
+    private static final String DEFAULT_FACTORY_NAME = "org.ajax4jsf.cache.LRUMapCacheFactory";
+	public static final String CACHE_MANAGER_FACTORY_CLASS = "org.ajax4jsf.cache.CACHE_MANAGER_FACTORY_CLASS";
+
+    protected static CacheManager instance = new CacheManager();
+
+    // REVIEW brian at quiotix.com
+    // Should this be a HashMap<String, WeakReference<Cache>>?
+    private final Map caches = Collections.synchronizedMap(new HashMap());
+
+    /**
+     * Returns the singleton CacheManager
+     */
+    public static CacheManager getInstance() {
+        return instance;
+    }
+
+    public Cache getCache(String cacheName) {
+        return (Cache) caches.get(cacheName);
+    }
+
+    public void registerCache(String cacheName, Cache cache) {
+        caches.put(cacheName, cache);
+    }
+
+    public CacheFactory getCacheFactory(Map env) throws CacheException {
+        String factoryName = findFactory(FACTORY_PROPERTY_NAME, env);
+        log.info("Selected [" + factoryName + "] cache factory");
+        
+        try {
+            ClassLoader cl = findClassLoader();
+            Class spiClass = Class.forName(factoryName, true, cl);
+            return (CacheFactory) spiClass.newInstance();
+        } catch (ClassNotFoundException cnfe) {
+            throw new CacheException("Could not find class: '" + factoryName + "'");
+        } catch (ClassCastException cce) {
+            throw new CacheException("Class: '" + factoryName + "' does not implement CacheFactory");
+        } catch (InstantiationException ie) {
+            throw new CacheException("Could not instantiate: '" + factoryName + "'");
+        } catch (IllegalAccessException iae) {
+            throw new CacheException("Could not find public default constructor for: '" + factoryName + "'");
+        }
+    }
+
+    private  ClassLoader findClassLoader() {
+        ClassLoader cl = Thread.currentThread().getContextClassLoader();
+        if (cl == null) cl = ClassLoader.getSystemClassLoader();
+        return cl;
+    }
+
+    private  boolean isEmptyString(String s) {
+        return s == null || "".equals(s);
+    }
+
+    String findFactory(String factoryId, Map env) {
+
+        String envFactoryClass = (String) env.get(CACHE_MANAGER_FACTORY_CLASS);
+        if (!isEmptyString(envFactoryClass)) return envFactoryClass;
+        
+        // Use the system property first
+        try {
+            String factoryClass = System.getProperty(factoryId);
+            if (!isEmptyString(factoryClass)) return factoryClass;
+        } catch (SecurityException ignore) {
+        }
+
+        // try to read from $java.home/lib/jcache.properties
+        try {
+            String configFile = System.getProperty("java.home") +
+                    File.separator + "lib" + File.separator + "jcache.properties";
+            File f = new File(configFile);
+            if (f.exists()) {
+                InputStream in = new FileInputStream(f);
+                try {
+                    Properties props = new Properties();
+                    props.load(in);
+                    String factoryClass = props.getProperty(factoryId);
+                    if (!isEmptyString(factoryClass)) return factoryClass;
+                } finally {
+                    in.close();
+                }
+            }
+        } catch (SecurityException ignore) {
+        } catch (IOException ignore) {
+        }
+
+        // try to find services in CLASSPATH
+        try {
+            ClassLoader cl = findClassLoader();
+            InputStream is = cl.getResourceAsStream("META-INF/services/" + factoryId);
+            if (is != null) {
+                BufferedReader r = new BufferedReader(new InputStreamReader(is, "UTF-8"));
+                try {
+                    String factoryName = r.readLine();
+                    if (!isEmptyString(factoryName)) return factoryName;
+                } finally {
+                    r.close();
+                }
+            }
+        } catch (IOException ignore) {
+        }
+
+        return DEFAULT_FACTORY_NAME;
+    }
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/cache/LRUMapCache.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/cache/LRUMapCache.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/cache/LRUMapCache.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,139 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.cache;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.commons.collections.map.LRUMap;
+
+/**
+ * @author Nick - mailto:nbelaevski at exadel.com
+ * created 01.05.2007
+ * 
+ */
+public class LRUMapCache extends LRUMap implements Cache {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 3236528957956574490L;
+	private CacheLoader cacheLoader;
+
+	public LRUMapCache(CacheLoader cacheLoader, int initialSize) {
+		super(initialSize);
+		this.cacheLoader = cacheLoader;
+	}
+
+	public LRUMapCache(CacheLoader cacheLoader) {
+		super();
+		this.cacheLoader = cacheLoader;
+	}
+
+	public void addListener(CacheListener listener) {
+		// TODO Auto-generated method stub
+
+	}
+
+	public void evict() {
+		// TODO Auto-generated method stub
+
+	}
+
+	private Map futures = new HashMap();
+
+	public synchronized Object get(Object key, Object context) throws CacheException {
+
+		try {
+			LRUMapFuture activeFuture = null;
+			LRUMapFuture future = null;
+
+			synchronized (futures) {
+				future = (LRUMapFuture) futures.get(key);
+				if (future == null) {
+					activeFuture = new LRUMapFuture();
+					futures.put(key, activeFuture);
+				}
+
+			}
+
+			if (future != null) {
+				synchronized (future) {
+					future.wait();
+					return future.getResult();
+				}
+			} else {
+				try {
+					if (!containsKey(key)) {
+						load(key, context);
+					}
+
+					Object result = peek(key);
+					activeFuture.setResult(result);
+
+					return result;
+				} finally {
+					synchronized (futures) {
+						this.futures.remove(key);
+
+						synchronized (activeFuture) {
+							activeFuture.notifyAll();
+						}
+					}
+				}
+			}
+
+		} catch (InterruptedException e) {
+			throw new CacheException(e.getMessage(), e);
+		}
+	}
+
+	public CacheEntry getCacheEntry(Object key) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public synchronized void load(Object key, Object context) throws CacheException {
+		put(key, cacheLoader.load(key, context));
+	}
+
+	public synchronized Object peek(Object key) {
+		return this.get(key);
+	}
+
+	public void removeListener(CacheListener listener) {
+		// TODO Auto-generated method stub
+
+	}
+}
+
+class LRUMapFuture {
+	private Object result;
+
+	public Object getResult() {
+		return result;
+	}
+
+	public void setResult(Object result) {
+		this.result = result;
+	}
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/cache/LRUMapCacheFactory.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/cache/LRUMapCacheFactory.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/cache/LRUMapCacheFactory.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,57 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.cache;
+
+import java.util.Map;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+
+/**
+ * @author Nick - mailto:nbelaevski at exadel.com
+ * created 01.05.2007
+ * 
+ */
+public class LRUMapCacheFactory implements CacheFactory {
+
+    private static final Log log = LogFactory.getLog(LRUMapCacheFactory.class);
+
+	public final static String CACHE_SIZE_PARAMETER = "org.ajax4jsf.cache.LRU_MAP_CACHE_SIZE";
+	
+	public Cache createCache(Map env, CacheLoader cacheLoader, CacheConfigurationLoader cacheConfigurationloader)
+			throws CacheException {
+		
+	    log.info("Creating LRUMap cache instance using parameters: " + env);	    
+
+	    String size = (String) env.get(CACHE_SIZE_PARAMETER);
+		if (size == null || size.length() == 0) {
+		    log.info("Creating LRUMap cache instance of default capacity");	    
+			return new LRUMapCache(cacheLoader);
+		} else {
+			int parsedSize = Integer.parseInt(size);
+		    log.info("Creating LRUMap cache instance of " + parsedSize + " items capacity");	    
+			return new LRUMapCache(cacheLoader, parsedSize);
+		}
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/cache/OSCacheCache.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/cache/OSCacheCache.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/cache/OSCacheCache.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,214 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.cache;
+
+import java.util.Collection;
+import java.util.Map;
+import java.util.Set;
+
+
+import com.opensymphony.oscache.base.NeedsRefreshException;
+
+/**
+ * @author Nick - mailto:nbelaevski at exadel.com
+ * created 01.05.2007
+ * 
+ */
+public class OSCacheCache implements Cache {
+
+	private com.opensymphony.oscache.base.Cache cache;
+	private CacheLoader cacheLoader;
+
+	public OSCacheCache(com.opensymphony.oscache.base.Cache cache,
+			CacheLoader cacheLoader) {
+		super();
+		this.cache = cache;
+		this.cacheLoader = cacheLoader;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.cache.Cache#addListener(org.ajax4jsf.framework.resource.cache.CacheListener)
+	 */
+	public void addListener(CacheListener listener) {
+		// TODO Auto-generated method stub
+
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.cache.Cache#clear()
+	 */
+	public void clear() {
+		// TODO Auto-generated method stub
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.cache.Cache#containsKey(java.lang.Object)
+	 */
+	public boolean containsKey(Object key) {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.cache.Cache#containsValue(java.lang.Object)
+	 */
+	public boolean containsValue(Object value) {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.cache.Cache#entrySet()
+	 */
+	public Set entrySet() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.cache.Cache#evict()
+	 */
+	public void evict() {
+		// TODO Auto-generated method stub
+
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.cache.Cache#get(java.lang.Object, java.lang.Object)
+	 */
+	public Object get(Object key, Object context) throws CacheException {
+		String keyString = key.toString();
+
+		try {
+			return cache.getFromCache(keyString);
+		} catch (NeedsRefreshException e) {
+			Object object = cacheLoader.load(key, context);
+			try {
+				cache.putInCache(keyString, object);
+			} catch (Exception e1) {
+				cache.cancelUpdate(keyString);
+				throw new CacheException(e1.getMessage(), e1);
+			}
+			return object;
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.cache.Cache#getCacheEntry(java.lang.Object)
+	 */
+	public CacheEntry getCacheEntry(Object key) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.cache.Cache#isEmpty()
+	 */
+	public boolean isEmpty() {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.cache.Cache#keySet()
+	 */
+	public Set keySet() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.cache.Cache#load(java.lang.Object, java.lang.Object)
+	 */
+	public void load(Object key, Object context) throws CacheException {
+		cacheLoader.load(key, context);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.cache.Cache#peek(java.lang.Object)
+	 */
+	public Object peek(Object key) {
+		String keyString = key.toString();
+
+		try {
+			return cache.getFromCache(keyString);
+		} catch (NeedsRefreshException e) {
+			cache.cancelUpdate(keyString);
+		}
+
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.cache.Cache#put(java.lang.Object, java.lang.Object)
+	 */
+	public Object put(Object key, Object value) {
+		cache.putInCache(key.toString(), value);
+		return value;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.cache.Cache#putAll(java.util.Map)
+	 */
+	public void putAll(Map t) {
+		// TODO Auto-generated method stub
+
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.cache.Cache#remove(java.lang.Object)
+	 */
+	public Object remove(Object key) {
+		String keyString = key.toString();
+
+		try {
+			return this.peek(keyString);
+		} finally {
+			cache.removeEntry(keyString);
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.cache.Cache#removeListener(org.ajax4jsf.framework.resource.cache.CacheListener)
+	 */
+	public void removeListener(CacheListener listener) {
+		// TODO Auto-generated method stub
+
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.cache.Cache#size()
+	 */
+	public int size() {
+		// TODO Auto-generated method stub
+		return 0;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.cache.Cache#values()
+	 */
+	public Collection values() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/cache/OSCacheCacheFactory.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/cache/OSCacheCacheFactory.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/cache/OSCacheCacheFactory.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,56 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.cache;
+
+import java.util.Map;
+import java.util.Properties;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import com.opensymphony.oscache.general.GeneralCacheAdministrator;
+
+/**
+ * @author Nick - mailto:nbelaevski at exadel.com
+ * created 01.05.2007
+ * 
+ */
+public class OSCacheCacheFactory implements CacheFactory {
+
+    private static final Log log = LogFactory.getLog(OSCacheCacheFactory.class);
+
+    /* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.cache.CacheFactory#createCache(java.util.Map, org.ajax4jsf.framework.resource.cache.CacheLoader)
+	 */
+	public Cache createCache(Map env, CacheLoader cacheLoader, CacheConfigurationLoader cacheConfigurationloader)
+			throws CacheException {
+	    // Load our implementation properties
+	    Properties cacheProperties = cacheConfigurationloader.loadProperties("oscache.properties");
+	    cacheProperties.putAll(cacheConfigurationloader.loadProperties("/oscache.properties"));
+	    cacheProperties.putAll(env);
+	    
+	    log.info("Creating OSCache cache instance using parameters: " + cacheProperties);	    
+	    GeneralCacheAdministrator cacheAdministrator = new GeneralCacheAdministrator(cacheProperties);
+		return new OSCacheCache(cacheAdministrator.getCache(), cacheLoader);
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/cache/ServletContextInitMap.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/cache/ServletContextInitMap.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/cache/ServletContextInitMap.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,119 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.cache;
+
+import java.util.AbstractMap;
+import java.util.AbstractSet;
+import java.util.Enumeration;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+
+import javax.servlet.ServletContext;
+
+/**
+ * @author Nick Belaevski - nbelaevski at exadel.com
+ * created 02.05.2007
+ * 
+ */
+public class ServletContextInitMap extends AbstractMap {
+	private ServletContext servletContext;
+	
+	public ServletContextInitMap(ServletContext servletContext) {
+		super();
+		this.servletContext = servletContext;
+	}
+
+	public Set entrySet() {
+		return new AbstractSet() {
+
+			public Iterator iterator() {
+				return new Iterator() {
+					private Enumeration initNames = servletContext.getInitParameterNames();
+					
+					public boolean hasNext() {
+						return initNames.hasMoreElements();
+					}
+
+					public Object next() {
+						String key = (String) initNames.nextElement();
+						String value = servletContext.getInitParameter(key);
+					
+						return new ServletContextInitMapEntry(key, value);
+					}
+
+					public void remove() {
+						throw new UnsupportedOperationException();
+					}
+				
+				};
+			}
+
+			public int size() {
+				int result = 0;
+				Enumeration initNames = servletContext.getInitParameterNames();
+				while (initNames.hasMoreElements()) {
+					result++;
+				}
+
+				return result;
+			}
+			
+			public boolean isEmpty() {
+				return !servletContext.getInitParameterNames().hasMoreElements();
+			}
+		};
+	}
+
+}
+
+class ServletContextInitMapEntry implements Map.Entry {
+
+	private Object key;
+	private Object value;
+	
+	public ServletContextInitMapEntry(Object key, Object value) {
+		super();
+		this.key = key;
+		this.value = value;
+	}
+
+	public ServletContextInitMapEntry(Object key) {
+		super();
+		this.key = key;
+	}
+
+	public Object getKey() {
+		return key;
+	}
+
+	public Object getValue() {
+		return value;
+	}
+
+	public Object setValue(Object value) {
+		Object oldValue = this.value;
+		this.value = value;
+		return oldValue;
+	}
+	
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/dnd/DnDScript.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/dnd/DnDScript.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/dnd/DnDScript.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,46 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.dnd;
+
+import org.ajax4jsf.framework.resource.ClientScript;
+
+/**
+ * @author shura
+ *
+ */
+public class DnDScript extends ClientScript {
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.ClientScript#getJavaScript()
+	 */
+	public String getJavaScript() {
+		return "/org/ajax4jsf/framework/ajax/scripts/dnd.js";
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.ClientScript#isUsePrototype()
+	 */
+	protected boolean isUsePrototype() {
+		return true;
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/dnd/Draggable.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/dnd/Draggable.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/dnd/Draggable.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,108 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.dnd;
+
+import javax.faces.el.MethodBinding;
+
+import org.ajax4jsf.dnd.event.DragListener;
+
+
+/**
+ * Interface for all draggable components. Describe bean properties, implemented by component.
+ * @author shura
+ *
+ */
+public interface Draggable  {
+	
+	/**
+	 * Getter for value parameter, used as key for draggable component.
+	 * @return
+	 */
+	public Object getDragValue();
+	
+	public void setDragValue(Object value); 
+	
+	/**
+	 * Getter for id of component ( instance of {@link UIDragIndicator} ) used for create drag cursor.
+	 * @return
+	 */
+	public String getDragIndicator();
+	
+	/**
+	 * @param dragIndicator - id of cursor component
+	 */
+	public void setDragIndicator(String dragIndicator);
+	
+	
+	/**
+	 * Getter for type of this draggable ( file, mail etc ).
+	 * @return
+	 */
+	public String getDragType();
+	
+	/**
+	 * @param dragType
+	 */
+	public void setDragType(String dragType);
+	
+	/**
+	 * Getter for JavaScript event handler, called before start drag operation.
+	 * If this handler return false, drag operation is cancelled.
+	 * @return javaScript code of event handler.
+	 */
+	public String getOndragstart();
+	
+	/**
+	 * @param dragType
+	 */
+	public void setOndragstart(String ondrag);
+
+	/**
+	 * 
+	 * @return
+	 */
+	public String getOndragend();
+	public void setOndragend(String ondrag);
+
+
+	/**
+	 * Append drag listener to component listeners collection
+	 * @param listener
+	 */
+	public void addDragListener(DragListener listener);
+	
+	/**
+	 * Get array of all Drop Listeners
+	 * @return
+	 */
+	public DragListener[] getDragListeners();
+	
+	/**
+	 * Remove drop listener from component listeners array.
+	 * @param listener
+	 */
+	public void removeDragListener(DragListener listener);
+	
+	public void setDragListener(MethodBinding binding);
+	public MethodBinding getDragListener();
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/dnd/Dropzone.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/dnd/Dropzone.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/dnd/Dropzone.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,101 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.dnd;
+
+import org.ajax4jsf.dnd.event.DropSource;
+
+/**
+ * Base interface for all components, accesible as drop zone.
+ * @author shura
+ *
+ */
+public interface Dropzone extends DropSource {
+	
+	/**
+	 * Getter for dropType's , accepted by this zone.
+	 * @return
+	 */
+	public Object getAcceptedTypes();
+	
+	public void setAcceptedTypes(Object types);
+	
+	/**
+	 * Getter for mapping between drop types and indicator states.
+	 * @return
+	 */
+	public Object getTypeMapping();
+	
+	public void setTypeMapping(Object types);
+	/**
+	 * Getter for JavaScript event handler, called then drag curcor enter in component area.
+	 * If this handler return false, or "declined", drop operation on this component not allowed.
+	 * If handler return true or "allowed" , or any other supported indicator states, drop operation
+	 * is allowed and corresponding indicator state will be displayed.
+	 * @return javaScript code of event handler.
+	 */
+	public String getOndragenter();
+	
+	/**
+	 * @param dragType
+	 */
+	public void setOndragenter(String ondrag);
+
+	/**
+	 * Getter for JavaScript event handler, called before  drag cursor leave component area.
+	 * @return javaScript code of event handler.
+	 */
+	public String getOndragexit();
+	
+	/**
+	 * @param dragType
+	 */
+	public void setOndragexit(String ondrag);
+
+	public Object getDropValue();
+	
+	public void setDropValue(Object o);
+	
+	/**
+	 * Javascript code called before drop event.
+	 * @parameter
+	 * @return the acceptClass
+	 */
+	public abstract String getOndrop();
+
+	/**
+	 * @param newOndrop the value  to set
+	 */
+	public abstract void setOndrop(String newOndrop);
+	
+	/**
+	 *  Javascript handler for event fired on drop even the drop for given type is not available
+	 * @parameter
+	 * @return the acceptClass
+	 */
+	public abstract String getOndropend();
+
+	/**
+	 * @param newname the value  to set
+	 */
+	public abstract void setOndropend(String ondropend);
+	
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/dnd/event/DragEvent.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/dnd/event/DragEvent.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/dnd/event/DragEvent.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,103 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.dnd.event;
+
+import javax.faces.component.UIComponent;
+import javax.faces.event.FacesEvent;
+import javax.faces.event.FacesListener;
+
+import org.ajax4jsf.dnd.Draggable;
+import org.ajax4jsf.dnd.Dropzone;
+
+/**
+ * @author Nick Belaevski - nbelaevski at exadel.com
+ * created 27.12.2006
+ * 
+ */
+public class DragEvent extends FacesEvent {
+
+	private Dropzone dropTarget;
+	private Object acceptedTypes;
+	private Object dropValue;
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 6179268394391836905L;
+
+	public DragEvent(UIComponent uiComponent) {
+		super(uiComponent);
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.event.FacesEvent#isAppropriateListener(javax.faces.event.FacesListener)
+	 */
+	public boolean isAppropriateListener(FacesListener faceslistener) {
+		return faceslistener instanceof DragListener;
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.event.FacesEvent#processListener(javax.faces.event.FacesListener)
+	 */
+	public void processListener(FacesListener faceslistener) {
+		((DragListener) faceslistener).processDrag(this);
+	}
+
+	public Object getDragValue() {
+		return ((Draggable) this.getSource()).getDragValue();
+	}
+
+	public Dropzone getDropTarget() {
+		return dropTarget;
+	}
+	
+	/**
+	 * @see java.util.EventObject#toString()
+	 */
+/*	public String toString() {
+		return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).
+		append("component", getComponent()).append("source", getSource()).append("phaseId", getPhaseId()).
+		append("dragValue", getDragValue()).
+		append("dropTarget", getDropTarget()).
+		append("dropValue", getDropValue()).
+		toString();
+	}
+*/
+	public void setDropTarget(Dropzone dropTarget) {
+		this.dropTarget = dropTarget;
+	}
+
+	public Object getAcceptedTypes() {
+		return acceptedTypes;
+	}
+
+	public void setAcceptedTypes(Object acceptedTypes) {
+		this.acceptedTypes = acceptedTypes;
+	}
+
+	public Object getDropValue() {
+		return dropValue;
+	}
+
+	public void setDropValue(Object dropValue) {
+		this.dropValue = dropValue;
+	}
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/dnd/event/DragListener.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/dnd/event/DragListener.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/dnd/event/DragListener.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,34 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.dnd.event;
+
+import javax.faces.event.FacesListener;
+
+/**
+ * @author Nick Belaevski - nbelaevski at exadel.com
+ * created 27.12.2006
+ * 
+ */
+public interface DragListener extends FacesListener {
+	public void processDrag(DragEvent event);
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/dnd/event/DropEvent.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/dnd/event/DropEvent.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/dnd/event/DropEvent.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,113 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.dnd.event;
+
+import javax.faces.component.UIComponent;
+import javax.faces.event.FacesEvent;
+import javax.faces.event.FacesListener;
+
+import org.ajax4jsf.dnd.Draggable;
+import org.ajax4jsf.dnd.Dropzone;
+
+/**
+ * @author shura
+ *
+ */
+public class DropEvent extends FacesEvent {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1660545054556302746L;
+	
+	private Draggable draggableSource;
+	private String dragType;
+	private Object dragValue;
+	
+	public DropEvent(UIComponent component) {
+		super(component);
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.event.FacesEvent#isAppropriateListener(javax.faces.event.FacesListener)
+	 */
+	public boolean isAppropriateListener(FacesListener listener) {
+		
+		return listener instanceof DropListener;
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.event.FacesEvent#processListener(javax.faces.event.FacesListener)
+	 */
+	public void processListener(FacesListener listener) {
+		if (listener instanceof DropListener) {
+			DropListener dropListener = (DropListener) listener;
+			dropListener.processDrop(this);
+		}
+
+	}
+
+	/**
+	 * @return the dropValue
+	 */
+	public Object getDropValue() {
+		return ((Dropzone) this.getSource()).getDropValue();
+	}
+
+	public Draggable getDraggableSource() {
+		return draggableSource;
+	}
+	
+	/**
+	 * @see java.util.EventObject#toString()
+	 */
+/*	public String toString() {
+		return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).
+			append("component", getComponent()).
+			append("source", getSource()).
+			append("phaseId", getPhaseId()).
+			append("dropValue", getDropValue()).
+			append("draggableSource", getDraggableSource()).
+			append("dragValue", getDragValue()).
+			toString();
+	}
+*/	
+	public void setDraggableSource(Draggable draggableSource) {
+		this.draggableSource = draggableSource;
+	}
+
+	public String getDragType() {
+		return dragType;
+	}
+
+	public void setDragType(String dragType) {
+		this.dragType = dragType;
+	}
+
+	public Object getDragValue() {
+		return dragValue;
+	}
+
+	public void setDragValue(Object dragValue) {
+		this.dragValue = dragValue;
+	}
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/dnd/event/DropListener.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/dnd/event/DropListener.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/dnd/event/DropListener.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,39 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.dnd.event;
+
+import javax.faces.event.FacesListener;
+
+/**
+ * Listener for process Drop events
+ * @author shura
+ *
+ */
+public interface DropListener extends FacesListener {
+	
+	/**
+	 * Process event on Drop for this component.
+	 * @param event
+	 */
+	public void processDrop(DropEvent event);
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/dnd/event/DropListenerBinding.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/dnd/event/DropListenerBinding.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/dnd/event/DropListenerBinding.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,104 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.dnd.event;
+
+import javax.faces.component.StateHolder;
+import javax.faces.component.UIComponentBase;
+import javax.faces.context.FacesContext;
+import javax.faces.el.ValueBinding;
+
+/**
+ * Wrapper for bind DrolListener to EL expression.
+ * @author shura
+ *
+ */
+public class DropListenerBinding implements DropListener, StateHolder {
+
+	private ValueBinding _binding;
+	
+	private String _dragType;
+	
+	private ValueBinding _dragTypeBinding;
+	
+	private boolean _transient = false;
+	
+	public DropListenerBinding() {
+	}
+
+	/**
+	 * @param binding
+	 */
+	public DropListenerBinding(ValueBinding binding) {
+		super();
+		_binding = binding;
+	}
+
+	private DropListener getHandler(FacesContext context) {
+		return (DropListener) _binding.getValue(context);
+	}
+
+	public void processDrop(DropEvent event) {
+		DropListener handler = getHandler(FacesContext.getCurrentInstance());
+		handler.processDrop(event);
+	}
+
+	public boolean isTransient() {
+		// TODO Auto-generated method stub
+		return _transient;
+	}
+
+	public void restoreState(FacesContext context, Object state) {
+		_binding = (ValueBinding) UIComponentBase.restoreAttachedState(context, state);
+
+	}
+
+	public Object saveState(FacesContext context) {
+		return UIComponentBase.saveAttachedState(context, _binding);
+	}
+
+	public void setTransient(boolean newTransientValue) {
+		_transient = newTransientValue;
+
+	}
+
+	/**
+	 * @return the dragType
+	 */
+	public String getDragType() {
+		return _dragType;
+	}
+
+	/**
+	 * @param dragType the dragType to set
+	 */
+	public void setDragType(String dragType) {
+		_dragType = dragType;
+	}
+
+	/**
+	 * @param dragTypeBinding the dragTypeBinding to set
+	 */
+	public void setDragTypeBinding(ValueBinding dragTypeBinding) {
+		_dragTypeBinding = dragTypeBinding;
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/dnd/event/DropSource.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/dnd/event/DropSource.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/dnd/event/DropSource.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,54 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.dnd.event;
+
+import javax.faces.el.MethodBinding;
+
+/**
+ * Interface for component applicable to process drag/drop events.
+ * @author shura
+ *
+ */
+public interface DropSource {
+	
+	/**
+	 * Append drop listener to component listeners collection
+	 * @param listener
+	 */
+	public void addDropListener(DropListener listener);
+	
+	/**
+	 * Get array of all Drop Listeners
+	 * @return
+	 */
+	public DropListener[] getDropListeners();
+	
+	/**
+	 * Remove drop listener from component listeners array.
+	 * @param listener
+	 */
+	public void removeDropListener(DropListener listener);
+	
+	public void setDropListener(MethodBinding binding);
+	public MethodBinding getDropListener();
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/dnd/taglib/DropSourceMetaRule.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/dnd/taglib/DropSourceMetaRule.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/dnd/taglib/DropSourceMetaRule.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,76 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ *  Copyright
+ *      Copyright (c) Exadel,Inc. 2006
+ *      All rights reserved.
+ *  
+ *  History
+ *      $Source: /cvs/ajax4jsf/framework/src/main/java/org/ajax4jsf/dnd/taglib/Attic/DropSourceMetaRule.java,v $
+ *      $Revision: 1.1.2.1 $ 
+ */
+
+package org.ajax4jsf.dnd.taglib;
+
+import javax.faces.el.MethodBinding;
+
+import org.ajax4jsf.dnd.event.DropEvent;
+import org.ajax4jsf.dnd.event.DropSource;
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.tag.MetaRule;
+import com.sun.facelets.tag.Metadata;
+import com.sun.facelets.tag.MetadataTarget;
+import com.sun.facelets.tag.TagAttribute;
+
+/**
+ * @author Maksim Kaszynski
+ *
+ */
+public class DropSourceMetaRule extends MetaRule {
+
+	public static final DropSourceMetaRule INSTANCE = new DropSourceMetaRule();
+	private static final Class [] SIGNATURE = {DropEvent.class};
+	
+	private class DropListenerMetaData extends Metadata {
+		
+		private TagAttribute tagAttribute;
+		
+		public DropListenerMetaData(TagAttribute attribute) {
+			tagAttribute = attribute;
+		}
+		
+		public void applyMetadata(FaceletContext ctx, Object instance) {
+			MethodBinding binding = ctx.getFacesContext().getApplication().createMethodBinding(tagAttribute.getValue(), SIGNATURE);
+			((DropSource) instance).setDropListener(binding);
+		}
+	}
+	
+	
+	public Metadata applyRule(String name, TagAttribute attribute,
+			MetadataTarget meta) {
+		if ("dropListener".equals(name)) {
+			return new DropListenerMetaData(attribute);
+		}
+		return null;
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/DebugLifecycle.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/DebugLifecycle.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/DebugLifecycle.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,170 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework;
+
+import javax.faces.FacesException;
+import javax.faces.context.FacesContext;
+import javax.faces.event.PhaseEvent;
+import javax.faces.event.PhaseId;
+import javax.faces.event.PhaseListener;
+import javax.faces.lifecycle.Lifecycle;
+import javax.faces.lifecycle.LifecycleFactory;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:12 $
+ * 
+ */
+public class DebugLifecycle extends Lifecycle implements PhaseListener{
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = -3247965217553145312L;
+
+	private Lifecycle _default;
+	
+	private static Log _log = LogFactory.getLog(DebugLifecycle.class);
+
+	public static final String DEBUG_LYFECYCLE_ID = "DEBUG";
+
+	public static final String LIFECYCLE_ID_ATTR = "javax.faces.LIFECYCLE_ID";
+
+
+	public static final String PHASE_ID_PARAM = "org.ajax4jsf.CURRENT_PHASE";
+	
+	private static final DebugOutputMaker debugOutput = new DebugOutputMaker();
+
+	/**
+	 * @param default1
+	 */
+	public DebugLifecycle(Lifecycle default1) {
+		super();
+		// TODO Auto-generated constructor stub
+		this._default = default1;
+	}
+
+	/**
+	 * 
+	 */
+	public DebugLifecycle(LifecycleFactory defaultFactory) {
+		super();
+		_default = defaultFactory
+				.getLifecycle(LifecycleFactory.DEFAULT_LIFECYCLE);
+		_default.addPhaseListener(this);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see javax.faces.lifecycle.Lifecycle#addPhaseListener(javax.faces.event.PhaseListener)
+	 */
+	public void addPhaseListener(PhaseListener arg0) {
+		_default.addPhaseListener(arg0);
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see javax.faces.lifecycle.Lifecycle#execute(javax.faces.context.FacesContext)
+	 */
+	public void execute(FacesContext context) throws FacesException {
+		try {
+			_default.execute(context);
+		} catch (Throwable e) {
+//			DebugOutputMaker debugOutput = new DebugOutputMaker();
+			debugOutput.writeErrorMessage(context, e, "execute");
+			context.responseComplete();
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see javax.faces.lifecycle.Lifecycle#getPhaseListeners()
+	 */
+	public PhaseListener[] getPhaseListeners() {
+		// TODO Auto-generated method stub
+		return _default.getPhaseListeners();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see javax.faces.lifecycle.Lifecycle#removePhaseListener(javax.faces.event.PhaseListener)
+	 */
+	public void removePhaseListener(PhaseListener arg0) {
+		_default.removePhaseListener(arg0);
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see javax.faces.lifecycle.Lifecycle#render(javax.faces.context.FacesContext)
+	 */
+	public void render(FacesContext context) throws FacesException {
+		try {
+			_default.render(context);
+		} catch (Throwable e) {
+//			DebugOutputMaker debugOutput = new DebugOutputMaker();
+			debugOutput.writeErrorMessage(context, e, "render");
+			context.responseComplete();
+		}
+	}
+
+
+
+
+	/* (non-Javadoc)
+	 * @see javax.faces.event.PhaseListener#afterPhase(javax.faces.event.PhaseEvent)
+	 */
+	public void afterPhase(PhaseEvent event) {
+		if (_log.isDebugEnabled()) {
+			_log.debug("End phase "+event.getPhaseId().toString());
+		}
+		
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.event.PhaseListener#beforePhase(javax.faces.event.PhaseEvent)
+	 */
+	public void beforePhase(PhaseEvent event) {
+		if (_log.isDebugEnabled()) {
+			_log.debug("Start phase "+event.getPhaseId().toString());
+		}
+		event.getFacesContext().getExternalContext().getRequestMap().put(PHASE_ID_PARAM,event.getPhaseId());
+		
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.event.PhaseListener#getPhaseId()
+	 */
+	public PhaseId getPhaseId() {
+		// TODO Auto-generated method stub
+		return PhaseId.ANY_PHASE;
+	}
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/DebugLifecycleFactory.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/DebugLifecycleFactory.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/DebugLifecycleFactory.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,99 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework;
+
+import java.util.Iterator;
+
+import javax.faces.lifecycle.Lifecycle;
+import javax.faces.lifecycle.LifecycleFactory;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:12 $
+ *
+ */
+public class DebugLifecycleFactory extends LifecycleFactory {
+    
+       private static final Log _log = LogFactory
+	    .getLog(DebugLifecycleFactory.class);
+	
+	private LifecycleFactory _defaultFactory;
+	
+	private DebugLifecycle _debugLifecycle ;
+	
+//	private Map _lifecycles = new HashMap();
+
+	/**
+	 * @return the debugLifecycle
+	 */
+	private DebugLifecycle getDebugLifecycle() {
+		if (_debugLifecycle == null) {
+			_debugLifecycle = new DebugLifecycle(_defaultFactory);			
+		}
+		return _debugLifecycle;
+	}
+
+	/**
+	 * @param defaultFactory
+	 */
+	public DebugLifecycleFactory(LifecycleFactory defaultFactory) {
+		super();
+		this._defaultFactory = defaultFactory;
+		if (_log.isDebugEnabled()) {
+		    _log.debug("Created Lifecycle instance");
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.lifecycle.LifecycleFactory#addLifecycle(java.lang.String, javax.faces.lifecycle.Lifecycle)
+	 */
+	public void addLifecycle(String lifecycleId, Lifecycle lifecycle) {
+		this._defaultFactory.addLifecycle(lifecycleId, lifecycle);
+		if (_log.isDebugEnabled()) {
+		    _log.debug("Added lifecycle with ID "+lifecycleId);
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.lifecycle.LifecycleFactory#getLifecycle(java.lang.String)
+	 */
+	public Lifecycle getLifecycle(String lifecycleId) {
+		Lifecycle life;
+		if(DebugLifecycle.DEBUG_LYFECYCLE_ID.equals(lifecycleId)) {
+			life = getDebugLifecycle();
+		} else {
+			life = this._defaultFactory.getLifecycle(lifecycleId);
+		}
+		return life;
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.lifecycle.LifecycleFactory#getLifecycleIds()
+	 */
+	public Iterator getLifecycleIds() {
+		return this._defaultFactory.getLifecycleIds();
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/DebugOutputMaker.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/DebugOutputMaker.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/DebugOutputMaker.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,465 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework;
+
+import java.beans.PropertyDescriptor;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.SortedMap;
+import java.util.TreeMap;
+
+import javax.faces.FacesException;
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIViewRoot;
+import javax.faces.context.ExternalContext;
+import javax.faces.context.FacesContext;
+import javax.faces.el.MethodBinding;
+import javax.faces.el.ValueBinding;
+import javax.faces.event.PhaseId;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.ajax4jsf.framework.resource.InternetResource;
+import org.ajax4jsf.framework.resource.InternetResourceBuilder;
+import org.ajax4jsf.framework.util.message.Messages;
+import org.apache.commons.beanutils.BeanUtils;
+import org.apache.commons.beanutils.PropertyUtils;
+
+
+/**
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:11 $
+ *
+ */
+public class DebugOutputMaker {
+    private final static String LT = "&lt;";
+    private final static String GT = "&gt;";
+	// Attributes that should not be printed
+	static public final HashSet IGNORE_ATTRIBUTES;
+
+	static {
+		IGNORE_ATTRIBUTES = new HashSet();
+		IGNORE_ATTRIBUTES.add("attributes");
+		IGNORE_ATTRIBUTES.add("children");
+		IGNORE_ATTRIBUTES.add("childCount");
+		IGNORE_ATTRIBUTES.add("class");
+		IGNORE_ATTRIBUTES.add("facets");
+		IGNORE_ATTRIBUTES.add("facetsAndChildren");
+		IGNORE_ATTRIBUTES.add("parent");
+		IGNORE_ATTRIBUTES.add("actionListeners");
+		IGNORE_ATTRIBUTES.add("valueChangeListeners");
+		IGNORE_ATTRIBUTES.add("validators");
+		IGNORE_ATTRIBUTES.add("rowData");
+		IGNORE_ATTRIBUTES.add("javax.faces.webapp.COMPONENT_IDS");
+		IGNORE_ATTRIBUTES.add("javax.faces.webapp.FACET_NAMES");
+		IGNORE_ATTRIBUTES.add("javax.faces.webapp.CURRENT_VIEW_ROOT");
+	}
+	
+	private static final String LOGFILE_PARAM = "org.ajax4jsf.LOGFILE";
+
+	/**
+	 * Output error state for lifecycle.
+	 * 
+	 * @param context
+	 * @param phase
+	 *            TODO
+	 * @param error
+	 * @throws IOException
+	 */
+	public void writeErrorMessage(FacesContext context, Throwable e, String phase)
+			throws FacesException {
+		if (null == context) {
+			throw new FacesException(Messages.getMessage(Messages.FACES_CONTEXT_NOT_CREATED), e);
+		}
+		ExternalContext externalContext = context
+		.getExternalContext();
+		if (null == externalContext) {
+			throw new FacesException(Messages.getMessage(Messages.FACES_CONTEXT_HAS_NOT_EXTERNAL), e);
+		}
+		// debug for http servlet environment, portlets needs other debugger
+		HttpServletResponse response;
+		HttpServletRequest request;
+		try {
+			response = (HttpServletResponse) externalContext
+					.getResponse();
+			request = (HttpServletRequest) externalContext.getRequest();
+			response.setContentType("text/html;charset=UTF-8");
+			// set internal server error status
+			response.setStatus(500);
+		} catch (Exception er) {
+			throw new FacesException(Messages.getMessage(Messages.FACES_CONTEXT_HAS_NOT_RESPONSE), e);
+		}
+		PrintWriter out;
+		try {
+			out = response.getWriter();
+		} catch (IOException e1) {
+			throw new FacesException(e1.getMessage(), e);
+		}
+		UIViewRoot viewRoot = context.getViewRoot();
+		String viewId;
+		if (null != viewRoot) {
+			viewId = viewRoot.getViewId();
+		} else {
+			viewId = request.getRequestURL().toString();
+		}
+		// output html prolog
+		out.println("<html><head><title>" +
+				Messages.getMessage(Messages.ERROR_ON_PAGE, viewId) +
+				"</title></head><body>");
+		// write script
+		writeScriptAndStyle(out);
+		// Header
+		PhaseId facesPhase = (PhaseId) context.getExternalContext().getRequestMap().get(DebugLifecycle.PHASE_ID_PARAM);
+		
+		String errorMessage = 
+			(facesPhase == null) 
+					? Messages.getMessage(Messages.LIFECYCLE_ERROR, viewId, phase)
+					: Messages.getMessage(Messages.LIFECYCLE_ERROR_AT_PHASE, new Object[]{viewId, phase, facesPhase.toString()});
+		out.println("<h1 >");
+		out.println(errorMessage);
+		out.println("</h1>");
+		response.setHeader("Ajax-Error-Message", errorMessage+",\n caused by "+e.getClass().getName()+", with message: "+e.getMessage());
+		// Output exceptions
+		writeExceptionStack(e, out);
+		// Output view tree :
+		if (null != viewRoot) {
+			writeComponentsTree(context, out);
+		} else {
+			out.print("<h2 class=' a4j_debug'> " +
+					Messages.getMessage(Messages.COMPONENT_TREE_NOT_CREATED) +
+					" </h2>");
+		}
+		// Out scope variables
+		writeContextVariables(context, out);
+		// Write log output iframe :
+		writeLog(context, out);
+		// out html tail
+		out.println("</body></html>");
+		out.flush();
+		out.close();
+	}
+	/**
+	 * @param e
+	 * @param out
+	 */
+	public void writeExceptionStack(Throwable e, PrintWriter out) {
+		out.println("<h2 class=\"a4j_debug\">Exceptions: </h2>");
+		Throwable error = e;
+		int errorId = 0;
+		String caused = "exception ";
+		while (null != error) {
+			out.print("<h3 onclick=\"toggle('exception" + errorId + "')\"  class='exception a4j_debug'>");
+			writeToggleMark(out,"exception" + errorId);					
+			out.print( caused + error.getClass().getName() + " : "
+					+ error.getMessage() + "</h3>");
+			out.println("<div id='exception" + errorId
+					+ "' style='display: none;' class='exception'><p>Exception stack :</p><pre>");
+			StackTraceElement[] stackTrace = error.getStackTrace();
+			for (int i = 0; i < stackTrace.length; i++) {
+				out.print("  at " + stackTrace[i].getClassName());
+				out.print("." + stackTrace[i].getMethodName());
+				out.println(" in " + stackTrace[i].getFileName() + " line "
+						+ stackTrace[i].getLineNumber());
+			}
+			// error.printStackTrace(out);
+			out.println("</pre></div>");
+			error = error.getCause();
+			caused = "caused by ";
+			errorId++;
+		}
+	}
+	
+	/**
+	 * @param context
+	 * @param out
+	 */
+	public void writeContextVariables(FacesContext context, PrintWriter out) {
+		out.print("<h2  class=\"a4j_debug\" onclick=\"toggle('variables')\">");
+		writeToggleMark(out,"variables");
+		out.println("Faces variables: </h2><div id='variables' style='display: none;'  class='variables a4j_debug'>");
+		writeVariables(out,context);
+		out.println("</div>");
+	}
+
+	/**
+	 * @param context
+	 * @param out
+	 */
+	public void writeComponentsTree(FacesContext context, PrintWriter out) {
+		out
+				.print("<h2 class=\"a4j_debug\" onclick=\"toggle('tree')\">");
+		writeToggleMark(out,"tree");
+		out.println("Component tree: </h2><div id='tree' style='display: none;'  class='tree a4j_debug'><dl>");
+		writeComponent(context, out, context.getViewRoot(), null);
+		out.println("</dl></div>");
+	}
+	
+	public void writeScriptAndStyle(PrintWriter out) {
+		writeScript(out);
+		writeStyleSheet(out);
+	}
+
+	/**
+	 * @param context
+	 * @param out
+	 * @throws FacesException
+	 */
+	public void writeLog(FacesContext context, PrintWriter out) throws FacesException {
+		String logname = context.getExternalContext().getInitParameter(LOGFILE_PARAM);
+		if (null != logname) {
+			InternetResource logResource = InternetResourceBuilder.getInstance().createResource(this,logname);
+			out.print("<h2 onclick=\"toggle('log')\" class=\"a4j_debug\">");
+			writeToggleMark(out, "log");
+			out
+					.println("Faces log: </h2><div id='log' style='display: none;'  class='log a4j_debug'>");
+			out.print("<iframe name='log' class='log' src='"+logResource.getUri(context,null)+"'><a href='src='"+logResource.getUri(context,null)+"'>Faces log file </a> </iframe>");
+			out.println("</div>");
+		}
+	}
+
+	public void writeToggleMark(PrintWriter out,String id) {
+		out.print("<span style=\"display:none;\" id=\""+id+"_expanded\" >-&nbsp;</span>");
+		out.print("<span style=\"display:inline;\" id=\""+id+"_collapsed\" >+</span>&nbsp;");
+	}
+
+
+	/**
+	 * Out component with properties and it's facets and childrens
+	 * @param context TODO
+	 * @param out
+	 * @param viewRoot
+	 */
+	private void writeComponent(FacesContext context, PrintWriter out,
+			UIComponent component, String facetName) {
+		String clientId = "_tree:"+component.getClientId(context);
+		out.println("<dt onclick=\"toggle('"+clientId+"')\" class='tree'>");
+		writeToggleMark(out,clientId);
+		// out component name
+		if (null != facetName) {
+			out.print("Facet:'" + facetName + "' ");
+		}
+		out.println("<code>" + component.getClass().getName() + "</code> Id:["+component.getId()+"]");
+		out.println("</dt>");
+		out.println("<dd id='"+clientId+"' style='display:none;'   class='tree' ><ul   class='tree'>");
+		// out bean properties
+		try {
+			PropertyDescriptor propertyDescriptors[] = PropertyUtils.getPropertyDescriptors(component);
+			for (int i = 0; i < propertyDescriptors.length; i++) {
+				if (PropertyUtils.isReadable(component,propertyDescriptors[i].getName())) {
+					String name = propertyDescriptors[i].getName();
+					ValueBinding vb = component.getValueBinding(name);
+					if (vb != null) {
+						writeAttribute(out, name, vb.getExpressionString());
+					} else {
+						if (!IGNORE_ATTRIBUTES.contains(name)) {
+							try {
+								String value = BeanUtils.getProperty(component,name);
+								writeAttribute(out, name, value);
+							} catch (Exception e) {
+								writeAttribute(out, name, null);
+							}
+						}
+					}
+				}
+			}
+		} catch (Exception e) {
+			// Do nothing - we in error page.
+		}
+
+		// out bindings
+		// out attributes map
+		for (Iterator it = component.getAttributes().entrySet().iterator(); it
+				.hasNext();) {
+			Map.Entry entry = (Map.Entry) it.next();
+			writeAttribute(out, (String) entry.getKey(), entry.getValue());
+		}
+		// out listeners
+		out.println("</ul></dd>");
+		if (component.getFacetsAndChildren().hasNext()) {
+			out.println("<dd class='tree_childs'><dl class='tree_childs'>");
+			// out childs of this component
+			// facets
+			for (Iterator facetEntry = component.getFacets().entrySet()
+					.iterator(); facetEntry.hasNext();) {
+				Map.Entry entry = (Map.Entry) facetEntry.next();
+				writeComponent(context, out,
+						(UIComponent) entry.getValue(), (String) entry.getKey());
+			}
+			// childs components
+			for (Iterator childIter = component.getChildren().iterator(); childIter
+					.hasNext();) {
+				UIComponent child = (UIComponent) childIter.next();
+				writeComponent(context, out, child, null);
+			}
+			out.println("</dl></dd>");
+		}
+
+	}
+
+	private void writeAttribute(PrintWriter out, String name, Object value) {
+		if (IGNORE_ATTRIBUTES.contains(name))
+			return;
+		if (name.startsWith("javax.faces.webapp.UIComponentTag.")) {
+			name = name
+					.substring("javax.faces.webapp.UIComponentTag.".length());
+		}
+		out.print("<li>");
+		out.print(name);
+		out.print("=\"");
+		if (value != null) {
+			if (value instanceof UIComponent) {
+				out.print("[id:");
+				out.print(((UIComponent) value).getId());
+				out.print(']');
+			} else if (value instanceof MethodBinding) {
+				out.print(((MethodBinding) value).getExpressionString());
+			} else if (value instanceof ValueBinding) {
+				out.print(((ValueBinding) value).getExpressionString());
+			} else {
+				out.print(value.toString());
+			}
+		} else {
+			out.print("NULL");
+		}
+		out.println("\"</li>");
+	}
+
+    private  void writeVariables(PrintWriter out, FacesContext faces)  {
+        ExternalContext ctx = faces.getExternalContext();
+        writeVariables(out, ctx.getRequestParameterMap(), "Request Parameters");
+        writeVariables(out, ctx.getRequestMap(), "Request Attributes");
+        if (ctx.getSession(false) != null) {
+            writeVariables(out, ctx.getSessionMap(), "Session Attributes");
+        }
+        writeVariables(out, ctx.getApplicationMap(), "Application Attributes");
+    }
+    
+    private  void writeVariables(PrintWriter out, Map vars, String caption)  {
+        out.print("<table><caption>");
+        out.print(caption);
+        out.println("</caption><thead><tr><th style=\"width: 10%; \">Name</th><th style=\"width: 90%; \">Value</th></tr></thead><tbody>");
+        boolean written = false;
+        if (!vars.isEmpty()) {
+            SortedMap map = new TreeMap(vars);
+            Map.Entry entry = null;
+            String key = null;
+            for (Iterator itr = map.entrySet().iterator(); itr.hasNext(); ) {
+                entry = (Map.Entry) itr.next();
+                key = entry.getKey().toString();
+                if (key.indexOf('.') == -1) {
+                    out.println("<tr><td>");
+                    out.println(key.replaceAll("<", LT).replaceAll(">", GT));
+                    out.println("</td><td><span class='value'>");
+                    Object value = entry.getValue();
+                    out.println(value.toString().replaceAll("<", LT).replaceAll(">", GT));
+                    out.println("</span>");
+            		try {
+            			PropertyDescriptor propertyDescriptors[] = PropertyUtils.getPropertyDescriptors(value);
+            			if (propertyDescriptors.length>0) {
+                			out.print("<div class='properties'><ul class=\'properties\'>");
+							for (int i = 0; i < propertyDescriptors.length; i++) {
+								String beanPropertyName = propertyDescriptors[i].getName(); 
+								if (PropertyUtils.isReadable(value,beanPropertyName
+										)) {
+			            			out.print("<li class=\'properties\'>");
+			            			out.print(beanPropertyName+" = "+BeanUtils.getProperty(value,beanPropertyName));
+			            			out.print("</li>");
+
+								}
+							}
+	            			out.print("</ul></div>");
+						}
+            		} catch (Exception e) {
+						// TODO: log exception
+					}
+
+                    out.println("</td></tr>");
+                    written = true;
+                }
+            }
+        }
+        if (!written) {
+            out.println("<tr><td colspan=\"2\"><em>None</em></td></tr>");
+        }
+        out.println("</tbody></table>");
+    }
+	/**
+	 * @param out
+	 */
+	private void writeScript(PrintWriter out) {
+		out
+				.println("<script type='text/javascript' language='javascript'>\n"
+						+ "function toggle(id) {\n"
+						+ "var style = document.getElementById(id).style;\n"
+						+ "if ('block' == style.display) {\n"
+						+ "style.display = 'none';\n"
+						+ "document.getElementById(id+'_collapsed').style.display = 'inline';\n"
+						+ "document.getElementById(id+'_expanded').style.display = 'none';\n"
+						+ "} else {\n"
+						+ "style.display = 'block';\n"
+						+ "document.getElementById(id+'_collapsed').style.display = 'none';\n"
+						+ "document.getElementById(id+'_expanded').style.display = 'inline';\n"
+						+ "}\n" + "}\n\n" +
+
+						"</script>");
+	}
+
+	/**
+	 * @param out
+	 */
+	private void writeStyleSheet(PrintWriter out) {
+		out
+				.println("<style type=\'text/css\' >\n" + 
+						"div.a4j_debug, .a4j_debug span, .a4j_debug td, .a4j_debug th, .a4j_debug caption { font-family: Verdana, Arial, Sans-Serif; }\n" + 
+						".a4j_debug li{\n" + 
+						"   list-style-position : inside;\n" + 
+						"}\n" + 
+						"\n" + 
+						".a4j_debug li, .a4j_debug pre { padding: 0; margin: 0;  font-size : 12px;}\n" + 
+						".a4j_debug ul { padding: 0 0 10 0; margin: 0;  font-size : 12px;}\n" + 
+						".a4j_debug h1 { color: #fff; background-color : #a00; font-size : 17px; padding : 7px 10px 10px 10px}\n" + 
+						"h2.a4j_debug , h2.a4j_debug  span { color: #a00;  font-size : 17px; padding : 0px 0px 0px 10px;}\n" + 
+						"h2.a4j_debug  a { text-decoration: none; color: #a00; }\n" + 
+						".exception { color: #000;  font-size : 14px; padding : 0px 0px 0px 10px;}\n" + 
+						".grayBox { padding: 8px; margin: 10px 0; border: 1px solid #CCC; background-color: #f9f9f9;   font-size : 12px; }\n" + 
+						"#error { color: #900; font-weight: bold; font-size: medium; }\n" + 
+						"#trace, #tree, #vars { display: none; }\n" + 
+						".a4j_debug code { font-size: medium;   font-size : 14px;}\n" + 
+						"#tree dl { color: #666; }\n" + 
+						"#tree dd {   font-size : 12px;}\n" + 
+						"#tree dt { border: 1px solid #DDD; padding: 2px 4px 4px 4px; border-left: 2px solid #a00; font-family: \"Courier New\", Courier, mono; font-size: small;   font-size : 12px; margin-top: 2px; margin-bottom: 2px;}\n" + 
+						".uicText { color: #999;  }\n" + 
+						".a4j_debug table { border: 1px solid #CCC; border-collapse: collapse; border-spacing: 0px; width: 100%; text-align: left; }\n" + 
+						".a4j_debug td { border: 1px solid #CCC;    font-size : 12px; vertical-align : top}\n" + 
+						".a4j_debug thead tr th { padding: 2px; color: #030; background-color: #F9F9F9;   font-size : 12px;}\n" + 
+						".a4j_debug tbody tr td { padding: 10px 6px; }\n" + 
+						".a4j_debug table caption { text-align: left; padding: 20 0 5 0; font-size : 12px; font-weight : bold;}\n" + 
+						".value {font-size : 12px; font-weight : bold;}\n" + 
+						"div.log { width: 100%; height: 400px;}\n" + 
+						"iframe.log { width: 99%; height: 99%; border: 1px solid #CCC;}\n" + 
+						"</style>");
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/FacesErrorStateHolder.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/FacesErrorStateHolder.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/FacesErrorStateHolder.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,44 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework;
+
+import javax.faces.component.UIViewRoot;
+
+/**
+ * Hold detailed faces state for Error output.
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:11 $
+ *
+ */
+public interface FacesErrorStateHolder {
+	
+	/**
+	 * @return detailed message about faces state on error in Html format 
+	 */
+	public String getFacesErrorStateMessage();
+	
+	/**
+	 * @return faces view tree at error point. 
+	 */
+	public UIViewRoot getFacesView();
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ViewHandlerWrapper.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ViewHandlerWrapper.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ViewHandlerWrapper.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,172 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework;
+
+import java.io.IOException;
+import java.lang.reflect.Constructor;
+import java.util.Locale;
+
+import javax.faces.FacesException;
+import javax.faces.application.ViewHandler;
+import javax.faces.component.UIViewRoot;
+import javax.faces.context.FacesContext;
+
+import org.ajax4jsf.framework.util.message.Messages;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * Base wrapper for {@link javax.faces.application.ViewHandler} . By default, delegate all
+ * method calls to wrapped handler.
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:12 $
+ *
+ */
+public class ViewHandlerWrapper extends ViewHandler {
+	private static final String HANDLERS = "org.ajax4jsf.VIEW_HANDLERS";
+	
+	private static final Log _log = LogFactory.getLog(ViewHandlerWrapper.class);
+
+	/**
+	 * Wrapped ViewHandler
+	 */
+	protected ViewHandler _handler;
+	
+	private boolean _initialized = false; 
+
+	/**
+	 * @param handler - to wrap.
+	 */
+	public ViewHandlerWrapper(ViewHandler handler) {
+		_handler = handler;
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.application.ViewHandler#calculateLocale(javax.faces.context.FacesContext)
+	 */
+	public Locale calculateLocale(FacesContext context) {
+		fillChain(context);
+		return _handler.calculateLocale(context);
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.application.ViewHandler#calculateRenderKitId(javax.faces.context.FacesContext)
+	 */
+	public String calculateRenderKitId(FacesContext context) {
+		fillChain(context);
+		return _handler.calculateRenderKitId(context);
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.application.ViewHandler#createView(javax.faces.context.FacesContext, java.lang.String)
+	 */
+	public UIViewRoot createView(FacesContext context, String viewId) {
+		fillChain(context);
+		return _handler.createView(context, viewId);
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.application.ViewHandler#getActionURL(javax.faces.context.FacesContext, java.lang.String)
+	 */
+	public String getActionURL(FacesContext context, String url) {
+		fillChain(context);
+		return _handler.getActionURL(context, url);
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.application.ViewHandler#getResourceURL(javax.faces.context.FacesContext, java.lang.String)
+	 */
+	public String getResourceURL(FacesContext context, String url) {
+		fillChain(context);
+		return _handler.getResourceURL(context, url);
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.application.ViewHandler#renderView(javax.faces.context.FacesContext, javax.faces.component.UIViewRoot)
+	 */
+	public void renderView(FacesContext context, UIViewRoot root) throws IOException, FacesException {
+		fillChain(context);
+		_handler.renderView(context, root);
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.application.ViewHandler#restoreView(javax.faces.context.FacesContext, java.lang.String)
+	 */
+	public UIViewRoot restoreView(FacesContext context, String viewId) {
+		fillChain(context);
+		return _handler.restoreView(context, viewId);
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.application.ViewHandler#writeState(javax.faces.context.FacesContext)
+	 */
+	public void writeState(FacesContext context) throws IOException {
+		fillChain(context);
+		_handler.writeState(context);
+	}
+
+	/**
+	 * @return Returns the handler.
+	 */
+	protected ViewHandler getHandler() {
+		return _handler;
+	}
+	
+	/**
+	 * Fill view-handlers chain for alternate handlers.
+	 * @param context
+	 */
+	synchronized protected void fillChain( FacesContext context){
+		if(!_initialized){
+			_initialized = true;
+			String handlers = context.getExternalContext().getInitParameter(HANDLERS);
+			if(null != handlers){
+				ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
+				String[] classes = handlers.split(",");
+				for (int i = 0; i < classes.length; i++) {
+					String handlerClass = classes[i];
+					if (_log.isDebugEnabled()) {
+						_log.debug(Messages.getMessage(Messages.CREATE_ALTERNATE_HANDLER, handlerClass));
+					}
+					try {
+						Class clazz = classLoader.loadClass(handlerClass);
+						try {
+							Constructor constructor = clazz
+									.getConstructor(new Class[] { ViewHandler.class });
+							_handler = (ViewHandler) constructor
+									.newInstance(new Object[] { _handler });
+						} catch (NoSuchMethodException e) {
+							// No constructor with parent class - create simple instance
+							if (_log.isWarnEnabled()) {
+								_log.warn(Messages.getMessage(Messages.ALTERNATE_HANDLER_CONSTRUCTOR_WARNING));
+							}
+							_handler = (ViewHandler) clazz.newInstance();
+						}
+					} catch (Exception e) {
+						_log.error(Messages.getMessage(Messages.VIEW_HANDLER_INSTANTIATION_ERROR), e);
+					}
+				}
+			}
+		}
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxActionComponent.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxActionComponent.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxActionComponent.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,155 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.ajax;
+
+import javax.faces.component.UICommand;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.event.AbortProcessingException;
+import javax.faces.event.ActionEvent;
+import javax.faces.event.FacesEvent;
+import javax.faces.event.PhaseId;
+
+import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
+
+/**
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.3 $ $Date: 2007/02/06 16:23:21 $
+ * 
+ */
+public abstract class AjaxActionComponent extends UICommand implements
+	AjaxComponent, AjaxSource {
+
+    public static final String FOCUS_DATA_ID = "_A4J.AJAX.focus";
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see javax.faces.component.UIComponentBase#broadcast(javax.faces.event.FacesEvent)
+         */
+    public void broadcast(FacesEvent event) throws AbortProcessingException {
+	// Hack - throw exception to AjaxViewRoot, to fix state of all iterable components.
+	if (event instanceof AjaxSingleEvent) {
+	    throw new AjaxSingleException(getSingleComponent());	    
+	}
+	// perform default
+	super.broadcast(event);
+	if (event instanceof AjaxEvent) {
+	    FacesContext context = getFacesContext();
+	    // complete re-Render fields. AjaxEvent deliver before render
+                // response.
+	    setupReRender(context);
+	    // Put data for send in response
+	    Object data = getData();
+	    AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context);
+	    if (null != data) {
+		ajaxContext.setResponseData(data);
+	    }
+	    String focus = getFocus();
+	    if (null != focus) {
+		// search for component in tree.
+		// TODO - use more pourful search, as in h:outputLabel component.
+		UIComponent focusComponent = findComponent(focus);
+		if(null != focusComponent){
+		    focus = focusComponent.getClientId(context);
+		}
+		ajaxContext.getResponseDataMap().put(FOCUS_DATA_ID, focus);
+	    }
+	}
+    }
+
+    /**
+         * Template method with old signature, for backward compability.
+         */
+    protected void setupReRender() {
+    }
+
+    /**
+         * Template methods for fill set of resions to render in subclasses.
+         * 
+         * @param facesContext
+         *                TODO
+         */
+    protected void setupReRender(FacesContext facesContext) {
+	AjaxContext.getCurrentInstance(facesContext).addRegionsFromComponent(
+		this);
+	setupReRender();
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see javax.faces.component.UIComponentBase#queueEvent(javax.faces.event.FacesEvent)
+         */
+    public void queueEvent(FacesEvent event) {
+	if (event instanceof ActionEvent && event.getComponent() == this) {
+	    if (isImmediate()) {
+		event.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
+	    } else if (isBypassUpdates()) {
+		event.setPhaseId(PhaseId.PROCESS_VALIDATIONS);
+	    } else {
+		event.setPhaseId(PhaseId.INVOKE_APPLICATION);
+	    }
+	    getParent().queueEvent(event);
+	    if(isAjaxSingle()){
+		super.queueEvent(new AjaxSingleEvent(this));
+	    }
+	} else {
+	    super.queueEvent(event);
+	}
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see org.ajax4jsf.framework.ajax.AjaxSource#addAjaxListener(org.ajax4jsf.framework.ajax.AjaxListener)
+         */
+    public void addAjaxListener(AjaxListener listener) {
+	addFacesListener(listener);
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see org.ajax4jsf.framework.ajax.AjaxSource#getAjaxListeners()
+         */
+    public AjaxListener[] getAjaxListeners() {
+	AjaxListener al[] = (AjaxListener[]) getFacesListeners(AjaxListener.class);
+	return (al);
+
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see org.ajax4jsf.framework.ajax.AjaxSource#removeAjaxListener(org.ajax4jsf.framework.ajax.AjaxListener)
+         */
+    public void removeAjaxListener(AjaxListener listener) {
+	removeFacesListener(listener);
+
+    }
+    
+    protected UIComponent getSingleComponent(){
+	return this;
+    }
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxActionEvent.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxActionEvent.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxActionEvent.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,48 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.ajax;
+
+import javax.faces.component.UIComponent;
+import javax.faces.event.ActionEvent;
+
+/**
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:34 $
+ *
+ */
+public class AjaxActionEvent extends ActionEvent {
+
+	
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = -5406101936114574903L;
+
+	/**
+	 * @param component
+	 */
+	public AjaxActionEvent(UIComponent component) {
+		super(component);
+		// TODO Auto-generated constructor stub
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxChildrenEncoder.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxChildrenEncoder.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxChildrenEncoder.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,55 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.ajax;
+
+import java.io.IOException;
+import java.util.Set;
+
+import javax.faces.context.FacesContext;
+
+/**
+ * Marker interface for components, have ability to manipulate rendering in case of Ajax responses.
+ * Such as ajax-enabled iterator, menus etc
+ * @author shura
+ *
+ */
+public interface AjaxChildrenEncoder {
+
+    /**
+     * Iterate over all childs of components. If component id contains in list ,
+     * or, if list is empty, compotents is submitted form - render it.
+     * TODO - Instead of calculate full path for every component, build current Path
+     * for componet and send as parameter.
+     * 
+     * @param context -
+     *            current context
+     * @param component -
+     *            curent faces component.
+     * @param ids -
+     *            list of Id to render.
+     * @throws IOException
+     */
+    public void encodeAjaxChild(FacesContext context, 
+            String path,Set ids,Set renderedAreas) throws IOException ;
+
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxComponent.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxComponent.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxComponent.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,194 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.ajax;
+
+
+/**
+ * Base Interface for Ajax-enabled acting components.
+ * TODO - extend <code>ActionSource</code>???
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.2 $ $Date: 2007/01/23 20:01:01 $
+ *
+ */
+public interface AjaxComponent
+{
+	
+	public static final String AJAX_COMPONETT_PARAMETER = AjaxComponent.class.getName()+".parameter";
+
+    /**
+     * setter method for property
+     * @param new value of String, <code>Collection</code> or array of component's Id , updated in case of Ajax request by parent component. to set
+     */
+    public abstract void setReRender(Object targetId);
+
+    /**
+     * @return value or result of valueBinding of String, <code>Collection</code> or array of component's Id , updated in case of Ajax request by parent component.
+     */
+    public abstract Object getReRender();
+
+    /**
+     * setter method for property
+     * @param new value of ajaxType of control component - link or input to set
+     */
+//    public abstract void setAjaxType(String ajaxType);
+
+    /**
+     * @return value or result of valueBinding of ajaxType of control component - link or input
+     */
+//    public abstract String getAjaxType();
+
+    /**
+     * setter method for property
+     * @param new value of Id ( in format of UIComponent.findComponent() call ) of request status indicator  to set
+     */
+    public abstract void setStatus(String status);
+
+    /**
+     * @return value or result of valueBinding of Id ( in format of UIComponent.findComponent() call ) of request status indicator 
+     */
+    public abstract String getStatus();
+
+    /**
+     * setter method for property
+     * @param new value of Name of JavaScript function, called on complete Ajax request to set
+     */
+    public abstract void setOncomplete(String oncomplete);
+
+    /**
+     * @return value or result of valueBinding of Name of JavaScript function, called on complete Ajax request
+     */
+    public abstract String getOncomplete();
+
+    /**
+     * setter method for property
+     * @param new value of custom data translated to oncomplete function by AJAX
+     */
+    public abstract void setData(Object data);
+
+    /**
+     * @return value of custom data for translate to oncomplete function by AJAX
+     */
+    public abstract Object getData();
+
+    /**
+     * setter method for property
+     * @param new value of Submit ( or not ) full form on Ajax action. to set
+     */
+    public abstract void setLimitToList(boolean submitForm);
+
+    /**
+     * @return value or result of valueBinding of Submit ( or not ) full form on Ajax action.
+     */
+    public abstract boolean isLimitToList();
+
+    /**
+     * setter method for property
+     * @param new value of Submit ( or not ) full form on Ajax action. to set
+     */
+    public abstract void setAjaxSingle(boolean single);
+
+    /**
+     * @return value or result of valueBinding of Submit ( or not ) full form on Ajax action.
+     */
+    public abstract boolean isAjaxSingle();
+	
+    /**
+     * Getter for bypassUpdates bean property. Indicate that component must invoke listeners after Process Validators phase
+     * and force render response after it - since no values of components will be updated. Can be used to perform validation of client input
+     * using server-side validators.
+     * @return true if component must force render after validation phase.
+     */
+    public abstract boolean isBypassUpdates();
+    
+    /**
+     * Setter for bypassUpdates bean property.
+     * @param bypass true if component must force render after validation phase.
+     */
+    public abstract void setBypassUpdates(boolean bypass);
+    
+    /**
+	 * Getter for property name of events queue on client side - for avoid to send requests too frequnly ( on key events, for example ), implementation will be generated by
+	 * componnents-generator
+	 * @return property value
+	 */
+	public abstract String getEventsQueue();
+
+	/**
+	 * Setter for flag indicated aborting unfinished ajax requests in queue. 
+	 * @param newvalue - new property value. If true, unfinished request in queue will be aborted on new events.
+	 */
+	public abstract void setIgnoreDupResponses(boolean newvalue);
+	
+	
+    /**
+	 * Getter for property flag indicated aborting unfinished ajax requests in queue.
+	 * componnents-generator
+	 * @return property value
+	 */
+	public abstract boolean isIgnoreDupResponses();
+
+	/**
+	 * Setter for property name of events queue on client side - for avoid to send requests too frequnly ( on key events, for example ), implementation will be generated by
+	 * componnents-generator
+	 * @param newvalue - new property value
+	 */
+	public abstract void setEventsQueue(String newvalue);
+	
+	/**
+	 * Getter for property Delay ( in ms. ) for send ajax request on JavaScript event. In conjunction with events queue can reduce number of requests on keyboard or mouse move events., implementation will be generated by
+	 * componnents-generator
+	 * @return property value
+	 */
+	public abstract int getRequestDelay();
+
+	/**
+	 * Setter for property Delay ( in ms. ) for send ajax request on JavaScript event. In conjunction with events queue can reduce number of requests on keyboard or mouse move events., implementation will be generated by
+	 * componnents-generator
+	 * @param newvalue - new property value
+	 */
+	public abstract void setRequestDelay(int newvalue);
+	
+	/**
+	 * Getter for request timeout 
+	 * @return timeout in ms.
+	 */
+	public abstract int getTimeout();
+	
+	/**
+	 * Setter for request timeout
+	 * @param timeout new value in ms.
+	 */
+	public abstract void setTimeout(int timeout);
+	
+	
+	/**
+	 * Setter for a 'focus' bean property - id of component( or of DOM element ), to set focus after AJAX request.
+	 * @param focus
+	 */
+	public abstract void setFocus(String focus);
+	
+	/**
+	 * @return
+	 */
+	public abstract String getFocus();
+
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxContainer.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxContainer.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxContainer.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,54 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.ajax;
+
+import java.io.IOException;
+
+import javax.faces.context.FacesContext;
+
+
+/**
+ * Extend Ajax-enabled region to support event listeners on Ajax requests.
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:39 $
+ * 
+ */
+public interface AjaxContainer extends AjaxContainerBase, AjaxSource
+{
+
+    /**
+     * Is ajax container must re-render all output from page or only it's children ?
+     * @return true if all ajax-enabled to re-render araes on page must be checked for output.
+     */
+    public abstract boolean isRenderRegionOnly();
+    
+    public abstract void setRenderRegionOnly(boolean reRenderPage);
+
+	/**
+	 * Encode AJAX response from this container ( call encode methods for selected components only )
+	 * @param context
+	 * @throws IOException 
+	 */
+	public void encodeAjax(FacesContext context) throws IOException ;
+
+
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxContainerBase.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxContainerBase.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxContainerBase.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,94 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.ajax;
+
+import java.util.Collection;
+import java.util.Set;
+
+import javax.faces.el.MethodBinding;
+
+/**
+  * Base interface for controller component, managed AJAX Requests.
+ * Component, implemented this interface, must always return <code>true</code> for
+ * <code>javax.faces.component.UIComponent#getRendersChildren()</code> method.
+ * in common, set of components, rendered of current request, maintain by it.
+ * TODO - add capabilites for components, rendered in <code>PhaseListener</code>  
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.2 $ $Date: 2007/02/06 16:23:20 $
+ *
+ */
+public interface AjaxContainerBase {
+    /**
+     * getter for AjaxListener method. Same as for <code>ActionSource</code>
+     * 
+     * @see javax.faces.component.ActionSource#getActionListener()
+     */
+    public MethodBinding getAjaxListener();
+
+    /**
+     * setter for AjaxListener <code>MethodBinding</code>
+     * in case on AjaxRequest, component must call this method in 
+     * <code>PhaseId.APPLY_REQUEST_VALUES</code> or
+     * <code>PhaseId.INVOKE_APPLICATION</code> phases, depend on immediate flag.
+     * 
+     * @see javax.faces.component.ActionSource#setActionListener(javax.faces.el.MethodBinding)
+     */
+    public void setAjaxListener(MethodBinding AjaxListener);
+
+    /**
+     * getter for flag immediate call Listener's on PhaseId.APPLY_REQUEST_VALUES phase.
+     * 
+     * @see javax.faces.component.ActionSource#isImmediate()
+     */
+    public boolean isImmediate();
+
+    /**
+     * getter for render method flag of subview. If true, on AJAX-request component render it children
+     * after {@link com.sun.faces.lifecycle.Phase.INVOKE_APPLICATION } 
+     * @return value of selfRendered flag
+     */
+    public boolean isSelfRendered();
+    
+    /**
+     * setter for self-render flag.
+     * @param selfRendered
+     */
+    public void setSelfRendered(boolean selfRendered);
+    /**
+     * setter for immediate flag.
+     * 
+     * @see javax.faces.component.ActionSource#setImmediate(boolean)
+     */
+    public void setImmediate(boolean immediate);
+
+    public boolean isSubmitted();
+    
+    public void setSubmitted(boolean submitted);
+	
+	/**
+	 * Render AJAX response for this container from stored View.
+	 * @param context
+	 * @throws FacesException
+	 */
+//	public void renderAjaxRegion(FacesContext context) throws FacesException ;
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxContext.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxContext.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxContext.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,806 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.ajax;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.lang.reflect.Method;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Set;
+
+import javax.faces.FacesException;
+import javax.faces.FactoryFinder;
+import javax.faces.application.Application;
+import javax.faces.application.StateManager;
+import javax.faces.application.ViewHandler;
+import javax.faces.application.StateManager.SerializedView;
+import javax.faces.component.NamingContainer;
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIViewRoot;
+import javax.faces.context.ExternalContext;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+import javax.faces.el.VariableResolver;
+import javax.faces.event.AbortProcessingException;
+import javax.faces.render.RenderKit;
+import javax.faces.render.RenderKitFactory;
+import javax.faces.render.Renderer;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+
+import org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter;
+import org.ajax4jsf.framework.ajax.xmlfilter.FilterServletResponseWrapper;
+import org.ajax4jsf.framework.renderer.AjaxContainerRenderer;
+import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
+import org.ajax4jsf.framework.renderer.HeaderResourceProducer;
+import org.ajax4jsf.framework.renderer.RendererUtils.HTML;
+import org.ajax4jsf.framework.skin.Skin;
+import org.ajax4jsf.framework.skin.SkinFactory;
+import org.ajax4jsf.framework.skin.SkinNotFoundException;
+import org.ajax4jsf.framework.util.config.WebXml;
+import org.ajax4jsf.framework.util.message.Messages;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * This class incapsulated
+ * 
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.7 $ $Date: 2007/02/08 19:07:16 $
+ * 
+ */
+public class AjaxContext {
+    /**
+         * Key for keep request state information in request-scope attributes.
+         */
+    public static final String AJAX_CONTEXT_KEY = "ajaxContext";
+
+    public static final String SCRIPTS_PARAMETER = "org.ajax4jsf.framework.HEADER_SCRIPTS";
+
+    public static final String STYLES_PARAMETER = "org.ajax4jsf.framework.HEADER_STYLES";
+
+    public static final String RESOURCES_PROCESSED = "org.ajax4jsf.framework.HEADER_PROCESSED";
+
+    public static final String RESPONSE_DATA_KEY = "_ajax:data";
+
+    private static final Log log = LogFactory.getLog(AjaxContext.class);
+
+    private static ComponentInvoker invoker;
+
+    private static Map contextClasses = new HashMap();
+
+    Set ajaxAreasToRender = new HashSet();
+
+    Set ajaxRenderedAreas = new HashSet();
+
+    boolean ajaxRequest = false;
+
+    boolean ajaxRequestSet = false;
+
+    boolean selfRender = false;
+
+    Integer viewSequence = new Integer(1);
+
+    String submittedRegionClientId = null;
+
+    boolean submittedRegionSet = false;
+
+    ViewIdHolder viewIdHolder = null;
+
+    Map responseDataMap = new HashMap();
+
+    Map commonAjaxParameters = new HashMap();
+
+    static {
+	try {
+	    // Attempt to create JSF1.2 specific invoker.
+	    invoker = new JsfOneOneInvoker();
+	} catch (Exception e) {
+	    invoker = new JsfOneOneInvoker();
+	}
+    }
+
+    /**
+         * Get instance of current AJAX Context. Instance get by
+         * {@link VariableResolver#resolveVariable(FacesContext, String)} for
+         * variable {@link AjaxContext#AJAX_CONTEXT_KEY}
+         * 
+         * @return memento instance for current request
+         */
+    public static AjaxContext getCurrentInstance() {
+	FacesContext context = FacesContext.getCurrentInstance();
+	return getCurrentInstance(context);
+    }
+
+    /**
+         * Get instance of current AJAX Context. Instance get by
+         * {@link VariableResolver#resolveVariable(FacesContext, String)} for
+         * variable {@link AjaxContext#AJAX_CONTEXT_KEY}
+         * 
+         * @param context
+         *                current FacesContext
+         * @return instance of AjaxContext.
+         */
+    public static AjaxContext getCurrentInstance(FacesContext context) {
+	if (null == context) {
+	    throw new NullPointerException("FacesContext is null");
+	}
+	AjaxContext ajaxContext = (AjaxContext) context.getApplication()
+		.getVariableResolver().resolveVariable(context,
+			AJAX_CONTEXT_KEY);
+	if (null == ajaxContext) {
+	    // Create default implementation.
+	    ajaxContext = new AjaxContext();
+	    context.getExternalContext().getRequestMap().put(AJAX_CONTEXT_KEY,
+		    ajaxContext);
+	}
+	return ajaxContext;
+    }
+
+    /**
+         * @param root
+         * @param context
+         * @param callback
+         * @param regionId
+         * @return
+         * @see org.ajax4jsf.framework.ajax.JsfOneOneInvoker#invokeOnComponent(javax.faces.component.UIComponent,
+         *      javax.faces.context.FacesContext,
+         *      org.ajax4jsf.framework.ajax.InvokerCallback, java.lang.String)
+         */
+    public static boolean invokeOnComponent(UIComponent root,
+	    FacesContext context, InvokerCallback callback, String regionId) {
+	return invoker.invokeOnComponent(root, context, callback, regionId);
+    }
+
+    /**
+         * @param viewRoot
+     * @param context
+     * @param callback
+         * @see org.ajax4jsf.framework.ajax.JsfOneOneInvoker#invokeOnRegionOrRoot(org.ajax4jsf.framework.ajax.AjaxViewRoot,
+         *      javax.faces.context.FacesContext,
+         *      org.ajax4jsf.framework.ajax.InvokerCallback)
+         */
+    public static void invokeOnRegionOrRoot(AjaxViewRoot viewRoot,
+	    FacesContext context, InvokerCallback callback) {
+	invoker.invokeOnRegionOrRoot(viewRoot, context, callback);
+    }
+
+    private InvokerCallback _ajaxInvoker = new InvokerCallback() {
+
+	public void invoke(FacesContext context, UIComponent component) {
+	    if (component instanceof AjaxContainer) {
+		AjaxContainer ajax = (AjaxContainer) component;
+		renderAjaxRegion(context, component, true);
+	    } else {
+		// Container not found, use Root for encode.
+		renderAjaxRegion(context, context.getViewRoot(), true);
+	    }
+	}
+
+	public void invokeRoot(FacesContext context) {
+	    renderAjaxRegion(context, context.getViewRoot(), true);
+	}
+
+    };
+
+    public void renderSubmittedAjaxRegion(FacesContext context) {
+	renderSubmittedAjaxRegion(context, true);
+    }
+
+    public void renderSubmittedAjaxRegion(FacesContext context,
+	    final boolean useFilterWriter) {
+	InvokerCallback ajaxInvoker = new InvokerCallback() {
+
+	    public void invoke(FacesContext context, UIComponent component) {
+		if (component instanceof AjaxContainer) {
+		    renderAjaxRegion(context, component, useFilterWriter);
+		} else {
+		    // Container not found, use Root for encode.
+		    renderAjaxRegion(context, context.getViewRoot(),
+			    useFilterWriter);
+		}
+	    }
+
+	    public void invokeRoot(FacesContext context) {
+		renderAjaxRegion(context, context.getViewRoot(),
+			useFilterWriter);
+	    }
+
+	};
+	if (!invokeOnComponent(context.getViewRoot(), context, ajaxInvoker,
+		getSubmittedRegionClientId(context))) {
+	    renderAjaxRegion(context, context.getViewRoot(), useFilterWriter);
+	}
+
+    }
+
+    /**
+         * @param context
+         * @param useFilterWriter
+         *                TODO
+         * @throws AbortProcessingException
+         */
+    public void renderAjaxRegion(FacesContext context, UIComponent component,
+	    boolean useFilterWriter) throws FacesException {
+	if (log.isDebugEnabled()) {
+	    log.debug(Messages.getMessage(Messages.RENDER_AJAX_REQUEST,
+		    component.getId()));
+	}
+	try {
+	    setSelfRender(true);
+	    // create response writer.
+	    ExternalContext extContext = context.getExternalContext();
+	    RenderKit renderKit = context.getRenderKit();
+	    String encoding;
+	    // Depends if we talk about servlets, portlets, ...
+	    if (extContext.getRequest() instanceof ServletRequest) {
+		ServletRequest request = (ServletRequest) extContext
+			.getRequest();
+		ServletResponse response = (ServletResponse) extContext
+			.getResponse();
+		// HACK - bypass MyFaces ( and other ) extensions filter.
+
+		// Setup encoding and content type
+		String contentType = "text/xml";
+		// get the encoding - must be setup by faces context or filter.
+		encoding = request.getCharacterEncoding();
+		if (encoding == null) {
+		    encoding = "UTF-8";
+		}
+		response.setContentType(contentType + ";charset=" + encoding);
+	    } else
+		encoding = "UTF-8";
+
+	    PrintWriter servletWriter;
+	    if (useFilterWriter
+		    && extContext.getRequestMap().containsKey(
+			    BaseFilter.RESPONSE_WRAPPER_ATTRIBUTE)) {
+		// HACK - Special case for MyFaces, since <f:view don't call
+		// encode methods,
+		// encode response as for self-rendered region directly to
+		// filter response wrpper.
+		// to avoid exceptions, inform wrapper to ignore illegal states
+		// for getWriter/Stream.
+		ServletResponse servletResponse = (ServletResponse) extContext
+			.getRequestMap().get(
+				BaseFilter.RESPONSE_WRAPPER_ATTRIBUTE);
+		servletResponse.resetBuffer();
+		servletWriter = servletResponse.getWriter();
+		((FilterServletResponseWrapper) servletResponse)
+			.setUseNullStream(true);
+	    } else {
+		servletWriter = getWriter(extContext);
+	    }
+	    ResponseWriter writer = renderKit.createResponseWriter(
+		    servletWriter, null, encoding);
+	    context.setResponseWriter(writer);
+	    // make response
+	    writer.startDocument();
+	    encodeAjaxBegin(context, component);
+	    component.encodeBegin(context);
+	    ((AjaxContainer) component).encodeAjax(context);
+	    component.encodeEnd(context);
+	    saveViewState(context);
+	    encodeAjaxEnd(context, component);
+	    writer.endDocument();
+	    writer.flush();
+	    writer.close();
+	    servletWriter.close();
+	    // Save tree state.
+	} catch (IOException e) {
+	    throw new FacesException(Messages.getMessage(
+		    Messages.RENDERING_AJAX_REGION_ERROR, component
+			    .getClientId(context)), e);
+	} finally {
+	    context.responseComplete();
+	    // component.setRendererType(defaultRenderer);
+	}
+    }
+
+    /**
+         * Encode declaration for AJAX response. Render &lt;html&gt;&lt;body&gt;
+         * 
+         * @param context
+         * @param component
+         * @throws IOException
+         */
+    public void encodeAjaxBegin(FacesContext context, UIComponent component)
+	    throws IOException {
+	// AjaxContainer ajax = (AjaxContainer) component;
+	ResponseWriter out = context.getResponseWriter();
+	// DebugUtils.traceView("ViewRoot in AJAX Page encode begin");
+	out.startElement(HTML.HTML_ELEMENT, component);
+	// TODO - html attributes. lang - from current locale ?
+	Locale locale = context.getViewRoot().getLocale();
+	out.writeAttribute(HTML.lang_ATTRIBUTE, locale.toString(), "lang");
+	out.startElement(HTML.BODY_ELEMENT, component);
+    }
+
+    /**
+         * End encoding of AJAX response. Render tag with included areas and
+         * close &lt;/body&gt;&lt;/html&gt;
+         * 
+         * @param context
+         * @param component
+         * @throws IOException
+         */
+    public void encodeAjaxEnd(FacesContext context, UIComponent component)
+	    throws IOException {
+	// AjaxContainer ajax = (AjaxContainer) component;
+	ResponseWriter out = context.getResponseWriter();
+	// DebugUtils.traceView("ViewRoot in AJAX Page encode begin");
+	out.endElement(HTML.BODY_ELEMENT);
+	out.endElement(HTML.HTML_ELEMENT);
+    }
+
+    /**
+         * @param context
+         * @param root
+         * @throws FacesException
+         */
+    public void processHeadResources(FacesContext context)
+	    throws FacesException {
+	ExternalContext externalContext = context.getExternalContext();
+	Map requestMap = externalContext.getRequestMap();
+	if (!Boolean.TRUE.equals(requestMap.get(RESOURCES_PROCESSED))) {
+	    if (null != requestMap.get(BaseFilter.RESPONSE_WRAPPER_ATTRIBUTE)) {
+		if (log.isDebugEnabled()) {
+		    log
+			    .debug("Process component tree for collect used scripts and styles");
+		}
+		UIViewRoot root = context.getViewRoot();
+		Set scripts = new LinkedHashSet();
+		Set styles = new LinkedHashSet();
+		RenderKitFactory rkFactory = (RenderKitFactory) FactoryFinder
+			.getFactory(FactoryFinder.RENDER_KIT_FACTORY);
+		RenderKit renderKit = rkFactory.getRenderKit(context, context
+			.getViewRoot().getRenderKitId());
+		processHeadResources(context, root, scripts, styles, renderKit);
+		if (scripts.size() > 0) {
+		    if (log.isDebugEnabled()) {
+			StringBuffer buff = new StringBuffer(
+				"Scripts for insert into head : \n");
+			for (Iterator iter = scripts.iterator(); iter.hasNext();) {
+			    String script = (String) iter.next();
+			    buff.append(script).append("\n");
+			}
+			log.debug(buff.toString());
+		    }
+		    requestMap.put(SCRIPTS_PARAMETER, scripts);
+		}
+		// Set default style sheet for current skin.
+		String styleSheetUri = null;
+		try {
+		    styleSheetUri = (String) SkinFactory.getInstance().getSkin(
+			    context).getParameter(context,
+			    Skin.generalStyleSheet);
+		} catch (SkinNotFoundException e) {
+		    log.warn("Current Skin is not found", e);
+		}
+		if (null != styleSheetUri) {
+		    String resourceURL = context.getApplication()
+			    .getViewHandler().getResourceURL(context,
+				    styleSheetUri);
+		    // TODO - some resources can be non-session aware, we
+		    // must
+		    // skip encoding for this case ?
+		    // But, in common case - static links not need session
+		    // info,
+		    // and dynamic resources perform encodings if nessesary
+		    // resourceURL =
+		    // context.getExternalContext().encodeResourceURL(resourceURL);
+		    styles.add(resourceURL);
+		}
+		if (styles.size() > 0) {
+		    if (log.isDebugEnabled()) {
+			StringBuffer buff = new StringBuffer(
+				"Styles for insert into head : \n");
+			for (Iterator iter = styles.iterator(); iter.hasNext();) {
+			    String style = (String) iter.next();
+			    buff.append(style).append("\n");
+			}
+			log.debug(buff.toString());
+		    }
+		    requestMap.put(STYLES_PARAMETER, styles);
+		}
+		// Mark as processed.
+		requestMap.put(RESOURCES_PROCESSED, Boolean.TRUE);
+	    }
+
+	}
+    }
+
+    /**
+         * Append nessesary scripts and styles from component ( if renderer
+         * implements {@link HeaderResourceProducer}) and recursive process all
+         * facets and childrens.
+         * 
+         * @param context
+         *                TODO
+         * @param root
+         * @param scripts
+         * @param styles
+         * @param renderKit
+         *                TODO
+         */
+    private void processHeadResources(FacesContext context, UIComponent root,
+	    Set scripts, Set styles, RenderKit renderKit) {
+	Renderer renderer = getRenderer(context, root, renderKit);
+	if (null != renderer) {
+	    if (renderer instanceof HeaderResourceProducer) {
+		HeaderResourceProducer producer = (HeaderResourceProducer) renderer;
+		Set set = producer.getHeaderScripts(context, root);
+		if (null != set) {
+		    scripts.addAll(set);
+		}
+		set = producer.getHeaderStyles(context, root);
+		if (null != set) {
+		    styles.addAll(set);
+		}
+	    }
+	}
+	for (Iterator iter = root.getFacets().values().iterator(); iter
+		.hasNext();) {
+	    UIComponent child = (UIComponent) iter.next();
+	    processHeadResources(context, child, scripts, styles, renderKit);
+	}
+	for (Iterator iter = root.getChildren().iterator(); iter.hasNext();) {
+	    UIComponent child = (UIComponent) iter.next();
+	    processHeadResources(context, child, scripts, styles, renderKit);
+	}
+    }
+
+    /**
+         * Find renderer for given component.
+         * 
+         * @param context
+         * @param comp
+         * @param renderKit
+         * @return
+         */
+    private Renderer getRenderer(FacesContext context, UIComponent comp,
+	    RenderKit renderKit) {
+
+	String rendererType = comp.getRendererType();
+	if (rendererType != null) {
+	    return (renderKit.getRenderer(comp.getFamily(), rendererType));
+	} else {
+	    return (null);
+	}
+
+    }
+
+    public void saveViewState(FacesContext context) throws IOException {
+	// TODO - for facelets environment, we need to remove transient
+	// components.
+	try {
+	    Application.class.getMethod("getExpressionFactory", null);
+	} catch (NoSuchMethodException e) {
+	    // JSF 1.1 !
+	}
+	ResponseWriter writer = context.getResponseWriter();
+	StateManager stateManager = context.getApplication().getStateManager();
+	SerializedView serializedView = stateManager
+		.saveSerializedView(context);
+	if (null != serializedView) {
+	    StringWriter bufWriter = new StringWriter();
+	    ResponseWriter cloneWithWriter = writer.cloneWithWriter(bufWriter);
+	    context.setResponseWriter(cloneWithWriter);
+	    stateManager.writeState(context, serializedView);
+	    cloneWithWriter.flush();
+	    if (bufWriter.getBuffer().length() > 0) {
+		context.getExternalContext().getRequestMap().put(
+			AjaxViewHandler.SERIALIZED_STATE_KEY,
+			bufWriter.toString());
+	    }
+	    // Restore original writer.
+	    context.setResponseWriter(writer);
+	}
+    }
+
+    /**
+         * @return Returns the ajaxRequest.
+         */
+    public boolean isAjaxRequest() {
+	return isAjaxRequest(FacesContext.getCurrentInstance());
+    }
+
+    /**
+         * @return Returns the ajaxRequest.
+         */
+    public boolean isAjaxRequest(FacesContext context) {
+	if (!this.ajaxRequestSet) {
+	    ajaxRequest = null != getSubmittedRegionClientId(context);
+	    ajaxRequestSet = true;
+	}
+	return ajaxRequest;
+    }
+
+    /**
+         * @param ajaxRequest
+         *                The ajaxRequest to set.
+         */
+    public void setAjaxRequest(boolean ajaxRequest) {
+	this.ajaxRequest = ajaxRequest;
+	this.ajaxRequestSet = true;
+    }
+
+    /**
+         * @return Returns the ajaxAreasToRender.
+         */
+    public Set getAjaxAreasToRender() {
+	return this.ajaxAreasToRender;
+    }
+
+    /**
+         * Add affected regions's ID to ajaxView component.
+         * 
+         * @param component
+         */
+    public void addRegionsFromComponent(UIComponent component) {
+	// First step - find parent ajax view
+	Set ajaxRegions = AjaxRendererUtils.getAjaxAreas(component);
+	// if (ajaxRegions == null){
+	// FacesContext context = FacesContext.getCurrentInstance();
+	// ajaxRegions = AjaxRendererUtils.getAbsoluteId(context,component);
+	// }
+	if (log.isDebugEnabled()) {
+	    log.debug(Messages.getMessage(Messages.INVOKE_AJAX_REGION_LISTENER,
+		    component.getId()));
+	}
+	if (ajaxRegions != null) {
+	    for (Iterator iter = ajaxRegions.iterator(); iter.hasNext();) {
+		String id = iter.next().toString();
+		ajaxAreasToRender.add(convertId(component, id));
+	    }
+	}
+    }
+
+    public void addComponentToAjaxRender(UIComponent component) {
+	this.ajaxAreasToRender.add(AjaxRendererUtils.getAbsoluteId(component));
+    }
+
+    public void addComponentToAjaxRender(UIComponent base, String id) {
+	this.ajaxAreasToRender.add(convertId(base, id));
+    }
+
+    /**
+         * Test for relative id of target components. Attempt convert to
+         * absolute. For use as argument for
+         * {@link UIComponent#findComponent(java.lang.String)}
+         * 
+         * @param component
+         * @param id
+         * @return
+         */
+    private String convertId(UIComponent component, String id) {
+	if (id.charAt(0) == NamingContainer.SEPARATOR_CHAR) {
+	    return id;
+	}
+	if (null == component) {
+	    throw new NullPointerException(
+		    "Base component for search re-rendered compnnent is null");
+	}
+	UIComponent target = null;
+	UIComponent parent = component;
+	UIComponent root = component;
+	while (null == target && null != parent) {
+	    target = parent.findComponent(id);
+	    root = parent;
+	    parent = parent.getParent();
+	}
+	if (null == target) {
+	    target = findUIComponentBelow(root, id);
+	}
+	if (null != target) {
+	    return AjaxRendererUtils.getAbsoluteId(target);
+	}
+	log.warn("Target component for id "+id+" not found");
+	return id;
+    }
+
+    private UIComponent findUIComponentBelow(UIComponent root,
+	    String id) {
+
+	UIComponent target = null;
+	for (Iterator iter = root.getFacetsAndChildren(); iter.hasNext();) {
+	    UIComponent child = (UIComponent) iter.next();
+	    if (child instanceof NamingContainer) {
+		try {
+		    target = child.findComponent(id);
+		} catch (IllegalArgumentException iae) {
+		    continue;
+		}
+	    }
+	    if (target == null) {
+		if (child.getChildCount() > 0) {
+		    target = findUIComponentBelow(child, id);
+		}
+	    }
+
+	    if (target != null) {
+		break;
+	    }
+	    
+	}
+	return target;
+    }
+
+    /**
+         * @return Returns the ajaxRenderedAreas.
+         */
+    public Set getAjaxRenderedAreas() {
+	return ajaxRenderedAreas;
+    }
+
+    public void addRenderedArea(String id) {
+	ajaxRenderedAreas.add(id);
+    }
+
+    public boolean removeRenderedArea(String id) {
+	return ajaxRenderedAreas.remove(id);
+    }
+
+    /**
+         * @return Returns the submittedClientId.
+         */
+    public String getSubmittedRegionClientId(FacesContext context) {
+	if (!this.submittedRegionSet) {
+	    this.submittedRegionClientId = (String) context
+		    .getExternalContext().getRequestParameterMap().get(
+			    AjaxContainerRenderer.AJAX_PARAMETER_NAME);
+	    this.submittedRegionSet = true;
+	    if (!this.ajaxRequestSet) {
+		setAjaxRequest(this.submittedRegionClientId != null);
+	    }
+	}
+	return this.submittedRegionClientId;
+    }
+
+    /**
+         * @param submittedClientId
+         *                The submittedClientId to set.
+         */
+    public void setSubmittedRegionClientId(String submittedClientId) {
+	this.submittedRegionClientId = submittedClientId;
+	this.submittedRegionSet = true;
+    }
+
+    /**
+         * @return Returns the selfRender.
+         */
+    public boolean isSelfRender() {
+	return selfRender;
+    }
+
+    /**
+         * @param selfRender
+         *                The selfRender to set.
+         */
+    public void setSelfRender(boolean selfRender) {
+	this.selfRender = selfRender;
+    }
+
+    /**
+         * @return the vievIdHolder
+         */
+    public ViewIdHolder getViewIdHolder() {
+	return viewIdHolder;
+    }
+
+    /**
+         * @param viewIdHolder
+         *                the vievIdHolder to set
+         */
+    public void setViewIdHolder(ViewIdHolder viewIdHolder) {
+	this.viewIdHolder = viewIdHolder;
+    }
+
+    /**
+         * @return the responseData
+         */
+    public Object getResponseData() {
+	return responseDataMap.get(RESPONSE_DATA_KEY);
+    }
+
+    /**
+         * @param responseData
+         *                the responseData to set
+         */
+    public void setResponseData(Object responseData) {
+	this.responseDataMap.put(RESPONSE_DATA_KEY, responseData);
+    }
+
+    /**
+         * @return the responseDataMap
+         */
+    public Map getResponseDataMap() {
+	return responseDataMap;
+    }
+
+    /**
+         * Gives back the writer of a Response object.
+         * 
+         * @param extContext
+         *                The external context.
+         * @return The writer of the response.
+         * @throws FacesException
+         *                 If the response object has no getWriter() method.
+         */
+    protected PrintWriter getWriter(ExternalContext extContext)
+	    throws FacesException {
+	PrintWriter writer = null;
+	Object response = extContext.getResponse();
+	try {
+	    Method gW = response.getClass()
+		    .getMethod("getWriter", new Class[0]);
+	    writer = (PrintWriter) gW.invoke(response, new Object[0]);
+	} catch (Exception e) {
+	    throw new FacesException(e);
+	}
+	return writer;
+    }
+
+    public String getAjaxActionURL() {
+	return getAjaxActionURL(FacesContext.getCurrentInstance());
+    }
+
+    public String getAjaxActionURL(FacesContext context) {
+	// Check arguments
+	if (null == context) {
+	    throw new NullPointerException(
+		    "Faces context for build AJAX Action URL is null");
+	}
+	UIViewRoot viewRoot = context.getViewRoot();
+	if (null == viewRoot) {
+	    throw new NullPointerException(
+		    "Faces view tree for build AJAX Action URL is null");
+	}
+	String viewId = viewRoot.getViewId();
+	if (null == viewId) {
+	    throw new NullPointerException(
+		    "View id for build AJAX Action URL is null");
+	}
+	if (!viewId.startsWith("/")) {
+	    throw new IllegalArgumentException(
+		    "Illegal view Id for build AJAX Action URL: " + viewId);
+	}
+	ViewHandler viewHandler = context.getApplication().getViewHandler();
+	return context.getExternalContext().encodeActionURL(
+		viewHandler.getActionURL(context, viewId));
+    }
+
+    /**
+         * @return the commonAjaxParameters
+         */
+    public Map getCommonAjaxParameters() {
+	return commonAjaxParameters;
+    }
+
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxEvent.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxEvent.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxEvent.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,69 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.ajax;
+
+import javax.faces.component.UIComponent;
+import javax.faces.event.FacesEvent;
+import javax.faces.event.FacesListener;
+import javax.faces.event.PhaseId;
+
+/**
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:33 $
+ * 
+ * Event for send by <code>AjaxContainer</code> in case of Ajax Request.
+ * Used for build set of id's to render at current request, perform special render etc. 
+ */
+public class AjaxEvent extends FacesEvent {
+
+    /**
+     * 
+     */
+    private static final long serialVersionUID = -5624716710738446159L;
+
+    /**
+     * @param component
+     */
+    public AjaxEvent(UIComponent component) {
+        super(component);
+        setPhaseId(PhaseId.RENDER_RESPONSE);
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see javax.faces.event.FacesEvent#isAppropriateListener(javax.faces.event.FacesListener)
+     */
+    public boolean isAppropriateListener(FacesListener listener) {
+        return (listener instanceof AjaxListener);
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see javax.faces.event.FacesEvent#processListener(javax.faces.event.FacesListener)
+     */
+    public void processListener(FacesListener listener) {
+        ((AjaxListener) listener).processAjax(this);
+    }
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxInputComponent.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxInputComponent.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxInputComponent.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,79 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.ajax;
+
+import javax.faces.component.EditableValueHolder;
+import javax.faces.component.UIInput;
+import javax.faces.context.FacesContext;
+import javax.faces.event.AbortProcessingException;
+import javax.faces.event.ActionEvent;
+import javax.faces.event.FacesEvent;
+import javax.faces.event.PhaseId;
+
+import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
+
+
+/**
+ * Base class for all AJAX-enabled Input components
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.2 $ $Date: 2007/02/06 16:23:21 $
+ *
+ */
+public abstract class AjaxInputComponent extends UIInput implements AjaxComponent,EditableValueHolder {
+
+	/* (non-Javadoc)
+	 * @see javax.faces.component.UIComponentBase#broadcast(javax.faces.event.FacesEvent)
+	 */
+	public void broadcast(FacesEvent event) throws AbortProcessingException {
+		// perform default
+		super.broadcast(event);
+		if (event instanceof AjaxEvent) {
+			// complete re-Render fields. AjaxEvent deliver before render response.
+			setupReRender();
+		}
+	}
+	/**
+	 * Template methods for fill set of resions to render in subclasses.
+	 */
+	protected void setupReRender() {
+		FacesContext context = getFacesContext();
+		AjaxContext.getCurrentInstance(context).addRegionsFromComponent(this);
+		
+	}
+	/* (non-Javadoc)
+	 * @see javax.faces.component.UIComponentBase#queueEvent(javax.faces.event.FacesEvent)
+	 */
+	public void queueEvent(FacesEvent event) {
+		if (event instanceof ActionEvent && event.getComponent()==this) {
+			if (isImmediate()) {
+				event.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
+			}  else if (isBypassUpdates()) {
+				event.setPhaseId(PhaseId.PROCESS_VALIDATIONS);
+			}else {
+				event.setPhaseId(PhaseId.INVOKE_APPLICATION);
+			}
+		}
+		super.queueEvent(event);
+	}
+    
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxListener.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxListener.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxListener.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,40 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.ajax;
+
+import javax.faces.event.FacesListener;
+
+/**
+ * Base interface for all listeners, capable for receive <code>AjaxEvent</code>
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:36 $
+ */
+public interface AjaxListener extends FacesListener {
+
+    public static final Class[] AJAX_LISTENER_ARGS = { AjaxEvent.class };
+
+    /**
+     * @param event - to process
+     */
+    void processAjax(AjaxEvent event);
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxListenerHelper.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxListenerHelper.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxListenerHelper.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,117 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.ajax;
+
+import java.io.Serializable;
+
+import javax.faces.component.StateHolder;
+import javax.faces.component.UIComponentBase;
+import javax.faces.context.FacesContext;
+import javax.faces.el.ValueBinding;
+
+/**
+ * Helper class to keep reference to listener binded as EL-expression.
+ * @author shura
+ *
+ */
+public class AjaxListenerHelper implements AjaxListener,StateHolder {
+	
+	
+	private ValueBinding _binding;
+	
+	
+	private boolean _transient = false;
+
+	
+	/**
+	 * 
+	 */
+	public AjaxListenerHelper() {
+		super();
+		// TODO Auto-generated constructor stub
+	}
+
+	/**
+	 * @param binding
+	 */
+	public AjaxListenerHelper(ValueBinding binding) {
+		super();
+		if (null == binding) {
+			throw new IllegalArgumentException("Binding expression for AjaxListener helper must be not null");
+		}
+		_binding = binding;
+	}
+
+	private AjaxListener getHandler(FacesContext context) {
+		return (AjaxListener) _binding.getValue(context);
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.component.StateHolder#restoreState(javax.faces.context.FacesContext, java.lang.Object)
+	 */
+	public void restoreState(FacesContext context, Object state) {
+		State helperState = (State) state;
+		_binding = (ValueBinding) UIComponentBase.restoreAttachedState(context,helperState.binding);
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.component.StateHolder#saveState(javax.faces.context.FacesContext)
+	 */
+	public Object saveState(FacesContext context) {
+		State helperState = new State();
+		helperState.binding = UIComponentBase.saveAttachedState(context,_binding);
+		return helperState;
+	}
+
+	/**
+	 * @return Returns the transient.
+	 */
+	public boolean isTransient() {
+		return _transient;
+	}
+
+	/**
+	 * @param transient1 The transient to set.
+	 */
+	public void setTransient(boolean transient1) {
+		_transient = transient1;
+	}
+	
+	/**
+	 * @author shura
+	 *
+	 */
+	private static class State implements Serializable {
+		
+		
+		private Object binding;
+		
+
+	}
+
+	public void processAjax(AjaxEvent event) {
+		FacesContext context = FacesContext.getCurrentInstance();
+		AjaxListener handler = getHandler(context);
+		handler.processAjax(event);
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxOutput.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxOutput.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxOutput.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,55 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.ajax;
+
+/**
+ * Marker interface for all JSF components, encoded ( or not ) on rendering
+ * Ajax request , depend on it self properties ( such as messages, help or like components )
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:39 $
+ *
+ */
+public interface AjaxOutput {
+	/**
+	 * getter for ajax-rendered flag property.
+	 * @return
+	 */
+	public boolean isAjaxRendered();
+	/**
+	 * Setter for ajax rendered property.
+	 * @param ajaxRendered
+	 */
+	public void setAjaxRendered(boolean ajaxRendered);
+	
+	/**
+	 * getter for ajax-rendered flag property.
+	 * @return
+	 */
+	public boolean isKeepTransient();
+	/**
+	 * Setter for ajax rendered property.
+	 * @param ajaxRendered
+	 */
+	public void setKeepTransient(boolean ajaxRendered);
+	
+	
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxRegionBrige.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxRegionBrige.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxRegionBrige.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,363 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.ajax;
+
+import java.io.IOException;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.Set;
+
+import javax.faces.FacesException;
+import javax.faces.application.Application;
+import javax.faces.component.StateHolder;
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIComponentBase;
+import javax.faces.context.FacesContext;
+import javax.faces.el.MethodBinding;
+import javax.faces.el.ValueBinding;
+import javax.faces.event.AbortProcessingException;
+import javax.faces.event.FacesEvent;
+import javax.faces.event.PhaseId;
+
+import org.ajax4jsf.framework.util.message.Messages;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+
+/**
+ * @author shura
+ * 
+ * Brige design pattern for any UIComponent append support ajax partial rendering. For AJAX request, apply
+ * ActionListeniers, construct list of components for render - by direct setting
+ * from Listenier or Components bean methods. 
+ * For use in concrete component, in constructor must be instantiated to class field as :
+ * private AjaxRegionBrige brige;
+ * ....
+ * Constructor(){ 
+ * brige = new AjaxRegionBrige(this);
+ * }.
+ * And delegate all brige public methods. 
+ * @See <code>AJAXConatiner</code> interface , or from configuration - by
+ *      <ajax:forupdate>jsp tag's of this or nested components, or from all
+ *      <code>UIForm</code> components instances with <code>isSubmitted</code>
+ *      set to <code>true</code>
+ *  
+ */
+public class AjaxRegionBrige  implements AjaxContainerBase, StateHolder{
+
+
+    // Private Fields
+    private static final Log log = LogFactory.getLog(AjaxRegionBrige.class);
+
+    /**
+     * Listener for call on Ajax Requests
+     */
+    private MethodBinding ajaxListener = null;
+
+    /**
+     * Flag for immediate call listeners 
+     */
+    private boolean immediate = false;
+    private boolean immediateSet = false;
+
+    private boolean selfRendered = false;
+    private boolean selfRenderedSet = false;
+
+
+
+    private boolean transientFlag = false;
+    
+    private UIComponent component ;
+    
+    private boolean submitted = false;
+    
+
+    // Interface implementation
+
+    /**
+	 * @param component
+	 */
+	public AjaxRegionBrige(UIComponent component) {
+		this.component = component;
+	}
+
+	/*
+     * (non-Javadoc)
+     * 
+     * @see org.ajax4jsf.components.custom.ajax.AjaxContainer#getAjaxListener()
+     */
+    public MethodBinding getAjaxListener() {
+        return this.ajaxListener;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see ogr.apache.myfaces.custom.ajax.AjaxContainer#setAjaxListener(javax.faces.el.MethodBinding)
+     */
+    public void setAjaxListener(MethodBinding ajaxListener) {
+        // 
+        if (log.isDebugEnabled())
+        {
+            log.debug(Messages.getMessage(Messages.SET_AJAX_LISTENER, ajaxListener.getExpressionString()));
+        }
+        this.ajaxListener = ajaxListener;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see ogr.apache.myfaces.custom.ajax.AjaxContainer#isImmediate()
+     */
+    public boolean isImmediate() {
+        if (this.immediateSet) {
+            return (this.immediate);
+        }
+        ValueBinding vb = component.getValueBinding("immediate");
+        if (vb != null) {
+            return (Boolean.TRUE.equals(vb.getValue(FacesContext.getCurrentInstance())));
+        } else {
+            return (this.immediate);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see ogr.apache.myfaces.custom.ajax.AjaxContainer#setImmediate(boolean)
+     */
+    public void setImmediate(boolean immediate) {
+        if (immediate != this.immediate) {
+            this.immediate = immediate;
+        }
+        this.immediateSet = true;
+
+    }
+
+    /* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.ajax.AjaxContainer#isSelfRendered()
+	 */
+	public boolean isSelfRendered() {
+        if (this.selfRenderedSet) {
+            return (this.selfRendered);
+        }
+        ValueBinding vb = component.getValueBinding("selfRendered");
+        if (vb != null) {
+            return (Boolean.TRUE.equals(vb.getValue(FacesContext.getCurrentInstance())));
+        } else {
+            return (this.selfRendered);
+        }
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.ajax.AjaxContainer#setSelfRendered(boolean)
+	 */
+	public void setSelfRendered(boolean selfRendered) {
+		this.selfRendered = selfRendered;
+		this.selfRenderedSet = true;
+	}
+
+	/**
+     * @return Returns the submitted.
+     */
+    public boolean isSubmitted()
+    {
+    	// TODO - more correct check for submitted state 
+        return this.submitted;
+    }
+
+    /**
+	     * @param submitted The submitted to set.
+	     */
+	    public void setSubmitted(boolean submitted)
+	    {
+	        // Important - decoder must set submitted AFTER setAjaxRequest !!!
+	        if (log.isDebugEnabled() && submitted  && (!isSubmitted())) {
+	            log.debug(Messages.getMessage(Messages.SUBMITTED_AJAX_REQUEST));
+	        }
+	        this.submitted = submitted;
+	    }
+
+	/**
+	     * <p>
+	     * In addition to to the default {@link UIComponent#broadcast}processing,
+	     * pass the {@link AjaxEvent}being broadcast to the method referenced by
+	     * <code>AjaxListener</code> (if any), and to the default
+	     * {@link AjaxListener}registered on the {@link Application}.
+	     * </p>
+	     * 
+	     * @param event
+	     *            {@link FacesEvent}to be broadcast
+	     * 
+	     * @exception AbortProcessingException
+	     *                Signal the JavaServer Faces implementation that no further
+	     *                processing on the current event should be performed
+	     * @exception IllegalArgumentException
+	     *                if the implementation class of this {@link FacesEvent}is
+	     *                not supported by this component
+	     * @exception NullPointerException
+	     *                if <code>event</code> is <code>null</code>
+	     */
+	    public void broadcast(FacesEvent event) throws AbortProcessingException {
+	
+	        // Perform standard superclass processing
+//	        component.broadcast(event);
+	
+	        if (event instanceof AjaxEvent) {
+	            if (log.isDebugEnabled())
+	            {
+	                log.debug(Messages.getMessage(Messages.SEND_EVENT_TO_AJAX_LISTENER, component.getId()));
+	            }
+	
+	            // Notify the specified action listener method (if any)
+	            MethodBinding mb = getAjaxListener();
+	            if (mb != null) {
+		            FacesContext context = FacesContext.getCurrentInstance();
+	                mb.invoke(context, new Object[] { event });
+	            }
+	            // TODO - perform special rendering, withowt RENDER_VIEW phase.
+	            if(isSelfRendered()) {
+	                // queue new event to end of queue to perform child elements
+	            	// events.
+		            if (log.isDebugEnabled())
+		            {
+		                log.debug("Queue AjaxRenderEvent for self-render of  AjaxContainer with Id "
+		                        + component.getId());
+		            }
+		            FacesEvent renderEvent = new AjaxRenderEvent(component);
+		            renderEvent.setPhaseId(event.getPhaseId());
+	            	component.queueEvent(renderEvent);
+	            }
+	        }
+	        if (event instanceof AjaxRenderEvent) {
+	        		FacesContext context = FacesContext.getCurrentInstance();
+	                AjaxContext.getCurrentInstance(context).renderAjaxRegion(context, component, false);
+	            }
+	        }
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see javax.faces.component.StateHolder#restoreState(javax.faces.context.FacesContext,
+	 *      java.lang.Object)
+	 */
+	public void restoreState(FacesContext context, Object state) {
+	    if (log.isDebugEnabled()) {
+			log.debug(Messages.getMessage(Messages.RESTORE_AJAX_COMPONENT_STATE, component.getId()));
+		}
+	    Object values[] = (Object[]) state;
+//	    super.restoreState(context, values[0]);
+	    this.immediate = ((Boolean) values[0]).booleanValue();
+	    this.immediateSet = ((Boolean) values[1]).booleanValue();
+	    this.ajaxListener = (MethodBinding) UIComponentBase.restoreAttachedState(context, values[2]);
+	    this.selfRendered = ((Boolean) values[3]).booleanValue();
+	    this.selfRenderedSet = ((Boolean) values[4]).booleanValue();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see javax.faces.component.StateHolder#saveState(javax.faces.context.FacesContext)
+	 */
+	public Object saveState(FacesContext context) {
+	    // 
+	    if (log.isDebugEnabled()) {
+			log.debug(Messages.getMessage(Messages.SAVE_AJAX_COMPONENT_STATE, component.getId()));
+		}
+	    Object[] values = new Object[5];
+//	    values[0] = super.saveState(context);
+	    values[0] = Boolean.valueOf(immediate);
+	    values[1] = Boolean.valueOf(immediateSet);
+	    values[2] = UIComponentBase.saveAttachedState(context, ajaxListener);
+	    values[3] = Boolean.valueOf(selfRendered);
+	    values[4] = Boolean.valueOf(selfRenderedSet);
+	    return values;
+	}
+
+/*	public void processDecodes(javax.faces.context.FacesContext context)
+    {
+        if (context == null) throw new NullPointerException("context");
+        // due SUN ri design, clear current sattus.
+        if(! component.isRendered()) return;
+        if(log.isDebugEnabled()){
+            log.debug("Process decodes of AjaxContainer with Id "+component.getId());
+        }
+        component.decode(context);
+        // If it is AJAX request for different area - skip decoding childs.
+        if (isAjaxRequest()&& !isSubmitted()){
+            if(log.isDebugEnabled()){
+                log.debug("Skip Decoders for childrens of AjaxContainer with Id "+component.getId());
+            }
+        	return;
+        }
+        for (Iterator it = component.getFacetsAndChildren(); it.hasNext(); )
+        {
+            UIComponent childOrFacet = (UIComponent)it.next();
+            childOrFacet.processDecodes(context);
+        }
+    }
+
+    public void processValidators(javax.faces.context.FacesContext context)
+    {
+        if (context == null) throw new NullPointerException("context");
+        if(! component.isRendered()) return;
+        if (isAjaxRequest()&& !isSubmitted()){
+            if(log.isDebugEnabled()){
+                log.debug("Skip Validators for childrens of AjaxContainer with Id "+component.getId());
+            }
+        	return;
+        }
+        
+        for (Iterator it = component.getFacetsAndChildren(); it.hasNext(); )
+        {
+            UIComponent childOrFacet = (UIComponent)it.next();
+            childOrFacet.processValidators(context);
+        }
+    }
+
+    public void processUpdates(javax.faces.context.FacesContext context)
+    {
+        if (context == null) throw new NullPointerException("context");
+        if(! component.isRendered()) return;
+        if (isAjaxRequest()&& !isSubmitted()){
+            if(log.isDebugEnabled()){
+                log.debug("Skip updates for childrens of AjaxContainer with Id "+component.getId());
+            }
+        	return;
+        }
+        for (Iterator it = component.getFacetsAndChildren(); it.hasNext(); )
+        {
+            UIComponent childOrFacet = (UIComponent)it.next();
+            childOrFacet.processUpdates(context);
+        }
+    }
+*/    
+    public boolean isTransient() {
+		return transientFlag;
+	}
+
+	public void setTransient(boolean transientFlag) {
+		this.transientFlag = transientFlag;
+	}
+	
+	}
+    

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxRenderEvent.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxRenderEvent.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxRenderEvent.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,65 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.ajax;
+
+import javax.faces.component.UIComponent;
+import javax.faces.event.FacesEvent;
+import javax.faces.event.FacesListener;
+
+/**
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:41 $
+ *
+ */
+public class AjaxRenderEvent extends FacesEvent {
+
+	/**
+	 * @param component
+	 */
+	public AjaxRenderEvent(UIComponent component) {
+		super(component);
+	}
+
+	public boolean isAppropriateListener(FacesListener listener) {
+		// TODO Auto-generated method stub
+		return listener instanceof AjaxRenderListener;
+	}
+
+	public void processListener(FacesListener listener) {
+		if (listener instanceof AjaxRenderListener) {
+			AjaxRenderListener renderListener = (AjaxRenderListener) listener;
+			renderListener.processAjaxRender(this);
+		}
+		
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.event.FacesEvent#getPhaseId()
+	 */
+//	public PhaseId getPhaseId() {
+//		// TODO Auto-generated method stub
+//		return PhaseId.INVOKE_APPLICATION;
+//	}
+	
+	
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxRenderListener.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxRenderListener.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxRenderListener.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,34 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.ajax;
+
+import javax.faces.event.FacesListener;
+
+/**
+ * @author shura
+ *
+ */
+public interface AjaxRenderListener extends FacesListener {
+	
+	public void processAjaxRender(AjaxRenderEvent event);
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxScript.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxScript.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxScript.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,58 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.ajax;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import org.ajax4jsf.framework.resource.ClientScript;
+
+/**
+ * Resource for AJAX client-side script. Render one time per page.
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:33 $
+ *
+ */
+public class AjaxScript extends ClientScript {
+    
+        private static final Log _log = LogFactory.getLog(AjaxScript.class);
+
+	/**
+	 * Set JavaScript renderer and modification time to application-startup time.
+	 */
+	public AjaxScript() {
+		super();
+	if (_log.isDebugEnabled()) {
+	    _log.debug("AjaxScript() - Created instance of AjaxScript resource"); //$NON-NLS-1$
+	}
+	}
+	
+
+	/**
+	 * @return Returns the javaScript.
+	 */
+	public String getJavaScript() {
+		return "scripts/AJAX.js";
+	}
+
+	
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxSingleEvent.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxSingleEvent.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxSingleEvent.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,40 @@
+/**
+ * 
+ */
+package org.ajax4jsf.framework.ajax;
+
+import javax.faces.component.UIComponent;
+import javax.faces.event.FacesEvent;
+import javax.faces.event.FacesListener;
+import javax.faces.event.PhaseId;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class AjaxSingleEvent extends FacesEvent {
+
+    /**
+     * @param arg0
+     */
+    public AjaxSingleEvent(UIComponent arg0) {
+	super(arg0);
+    }
+
+    /* (non-Javadoc)
+     * @see javax.faces.event.FacesEvent#isAppropriateListener(javax.faces.event.FacesListener)
+     */
+    public boolean isAppropriateListener(FacesListener arg0) {
+	return false;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.faces.event.FacesEvent#processListener(javax.faces.event.FacesListener)
+     */
+    public void processListener(FacesListener arg0) {
+    }
+
+    public PhaseId getPhaseId() {
+        return PhaseId.APPLY_REQUEST_VALUES;
+    }
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxSingleException.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxSingleException.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxSingleException.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,31 @@
+/**
+ * 
+ */
+package org.ajax4jsf.framework.ajax;
+
+import javax.faces.component.UIComponent;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class AjaxSingleException extends RuntimeException {
+    
+    private UIComponent component;
+
+    /**
+     * @param component
+     */
+    public AjaxSingleException(UIComponent componemt) {
+//	super();
+	this.component = componemt;
+    }
+
+    /**
+     * @return the component
+     */
+    public UIComponent getComponent() {
+        return component;
+    }
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxSource.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxSource.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxSource.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,51 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.ajax;
+
+/**
+ * Interface for all components capable to process {@link org.ajax4jsf.framework.ajax.AjaxEvent}'s
+ * @author shura
+ *
+ */
+public interface AjaxSource {
+	/**
+     * same as for ActionSource, but for AjaxListener
+     * 
+     * @see javax.faces.component.ActionSource#addActionListener(javax.faces.event.ActionListener)
+     */
+    public void addAjaxListener(AjaxListener listener);
+
+    /**
+     * same as for ActionSource, but for AjaxListener
+     * 
+     * @see javax.faces.component.ActionSource#getActionListeners()
+     */
+    public AjaxListener[] getAjaxListeners();
+
+    /**
+     *  same as for ActionSource, but for AjaxListener
+     * @see javax.faces.component.ActionSource#removeActionListener(javax.faces.event.ActionListener)
+     */
+    public void removeAjaxListener(AjaxListener listener);
+
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxStateManager.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxStateManager.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxStateManager.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,102 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.ajax;
+
+import java.io.IOException;
+
+import javax.faces.application.StateManager;
+import javax.faces.component.UIViewRoot;
+import javax.faces.context.FacesContext;
+
+import org.ajax4jsf.framework.renderer.AjaxPhaseListener;
+
+/**
+ * @author shura
+ *
+ */
+public class AjaxStateManager extends StateManager {
+	
+	private StateManager parent;
+
+	/**
+	 * @param parent
+	 */
+	public AjaxStateManager(StateManager parent) {
+		super();
+		this.parent = parent;
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.application.StateManager#getComponentStateToSave(javax.faces.context.FacesContext)
+	 */
+	protected Object getComponentStateToSave(FacesContext context) {
+		throw new UnsupportedOperationException();
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.application.StateManager#getTreeStructureToSave(javax.faces.context.FacesContext)
+	 */
+	protected Object getTreeStructureToSave(FacesContext context) {
+		throw new UnsupportedOperationException();
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.application.StateManager#restoreComponentState(javax.faces.context.FacesContext, javax.faces.component.UIViewRoot, java.lang.String)
+	 */
+	protected void restoreComponentState(FacesContext context,
+			UIViewRoot viewRoot, String renderKitId) {
+		throw new UnsupportedOperationException();
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.application.StateManager#restoreTreeStructure(javax.faces.context.FacesContext, java.lang.String, java.lang.String)
+	 */
+	protected UIViewRoot restoreTreeStructure(FacesContext context,
+			String viewId, String renderKitId) {
+		throw new UnsupportedOperationException();
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.application.StateManager#restoreView(javax.faces.context.FacesContext, java.lang.String, java.lang.String)
+	 */
+	public UIViewRoot restoreView(FacesContext context, String viewId,
+			String renderKitId) {
+		return parent.restoreView(context, viewId, renderKitId);
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.application.StateManager#saveSerializedView(javax.faces.context.FacesContext)
+	 */
+	public SerializedView saveSerializedView(FacesContext context) {		
+		return parent.saveSerializedView(context);
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.application.StateManager#writeState(javax.faces.context.FacesContext, javax.faces.application.StateManager.SerializedView)
+	 */
+	public void writeState(FacesContext context, SerializedView state)
+			throws IOException {
+		parent.writeState(context, state);
+		context.getExternalContext().getRequestMap().put(AjaxPhaseListener.VIEW_STATE_SAVED_PARAM, Boolean.TRUE);
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxSupport.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxSupport.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxSupport.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,71 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.ajax;
+
+import javax.faces.component.UIComponent;
+
+/**
+ * Version of {@link org.ajax4jsf.framework.ajax.AjaxComponent} for append
+ * Ajax functions for non-ajax components
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:34 $
+ *
+ */
+public interface AjaxSupport extends AjaxComponent {
+
+    /**
+     * @return JavaScript eventString. Rebuild on every call, since
+     * can be in loop ( as in dataTable ) with different parameters.
+     */
+    public String getEventString();
+    /**
+     * setter method for property
+     * @param new value of Name of event property of parent component for build JavaScript AJAX.Submit call to set
+     */
+    public abstract void setEvent(String event);
+
+    /**
+     * @return value or result of valueBinding of Name of event property of parent component for build JavaScript AJAX.Submit call
+     */
+    public abstract String getEvent();
+
+
+    /**
+	 * Getter for property If true, disable default action for target event ( encode 'return false' to JavaScript ), implementation will be generated by
+	 * componnents-generator
+	 * @return property value
+	 */
+	public abstract boolean isDisableDefault();
+
+	/**
+	 * Setter for property If true, disable default action for target event ( encode 'return false' to JavaScript ), implementation will be generated by
+	 * componnents-generator
+	 * @param newvalue - new property value
+	 */
+	public abstract void setDisableDefault(boolean newvalue);
+	
+	/**
+	 * Set property for JavaScrept event generated by this component.
+	 * @param parent
+	 */
+	public void setParentProperties(UIComponent parent);
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxValidationActionEvent.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxValidationActionEvent.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxValidationActionEvent.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,59 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.ajax;
+
+import javax.faces.component.UIComponent;
+import javax.faces.event.ActionEvent;
+import javax.faces.event.PhaseId;
+
+/**
+ * Action event - always assigned to {@link javax.faces.event.PhaseId#PROCESS_VALIDATIONS} phase
+ * for bypass change phase in components , setPhaseId method do nothing.
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:37 $
+ *
+ */
+public class AjaxValidationActionEvent extends ActionEvent {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 941784856915815112L;
+
+	/**
+	 * @param component
+	 */
+	public AjaxValidationActionEvent(UIComponent component) {
+		super(component);
+		// TODO Auto-generated constructor stub
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.event.FacesEvent#getPhaseId()
+	 */
+	public PhaseId getPhaseId() {
+		// TODO Auto-generated method stub
+		return PhaseId.PROCESS_VALIDATIONS;
+	}
+
+	
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxViewHandler.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxViewHandler.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxViewHandler.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,277 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.ajax;
+
+import java.io.IOException;
+import java.util.Map;
+
+import javax.faces.FacesException;
+import javax.faces.application.ViewHandler;
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIViewRoot;
+import javax.faces.context.ExternalContext;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+import javax.servlet.http.HttpServletResponse;
+
+import org.ajax4jsf.framework.ViewHandlerWrapper;
+import org.ajax4jsf.framework.renderer.AjaxContainerRenderer;
+import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
+import org.ajax4jsf.framework.renderer.RendererUtils.HTML;
+import org.ajax4jsf.framework.resource.InternetResource;
+import org.ajax4jsf.framework.resource.InternetResourceBuilder;
+import org.ajax4jsf.framework.util.message.Messages;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.5 $ $Date: 2007/02/08 15:02:04 $
+ * 
+ */
+public class AjaxViewHandler extends ViewHandlerWrapper {
+
+	public static final String STATE_MARKER_KEY = "org.ajax4jsf.view.state";
+
+	public static final String SERIALIZED_STATE_KEY = "org.ajax4jsf.view.serializedstate";
+
+	private static final Log _log = LogFactory.getLog(AjaxViewHandler.class);
+
+	private static final String REDIRECTED = "org.ajax4jsf.view.REDIRECTED";
+
+	/**
+	 * @param parent
+	 */
+	public AjaxViewHandler(ViewHandler parent) {
+		super(parent);
+		if (_log.isDebugEnabled()) {
+		    _log.debug("Create instance of Ajax ViewHandler");
+		}
+	}
+
+	/*
+	 * (non-Javadoc) For creating ViewRoot by Application Instead of new . Not
+	 * nessesary for MyFaces ( simple copy from it ) or RI 1.2
+	 * 
+	 * @see javax.faces.application.ViewHandler#createView(javax.faces.context.FacesContext,
+	 *      java.lang.String)
+	 */
+	public UIViewRoot createView(FacesContext facesContext, String viewId) {
+		AjaxContext ajaxContext = AjaxContext.getCurrentInstance(facesContext);
+		// Check for simple keep new ViewId in navigation cases.
+		ViewIdHolder viewIdHolder = ajaxContext.getViewIdHolder();
+		UIViewRoot riRoot;
+		if (null != viewIdHolder && viewIdHolder.skipNavigation(viewId)) {
+			viewIdHolder.setViewId(viewId);
+			riRoot = facesContext.getViewRoot();
+		} else {
+			UIViewRoot root = super.createView(facesContext, viewId);
+			// TODO -setup render-kit where instead of Listener ?
+			if (null == root || root instanceof AjaxViewRoot) {
+				riRoot = root;
+			} else {
+				// HACK - since only RI 1.1 use new for create ViewRoot instead
+				// of Application.createComponent,
+				// we can use it as flag for custom creation.
+				riRoot = (UIViewRoot) facesContext.getApplication().createComponent(UIViewRoot.COMPONENT_TYPE);
+				// fill properties from default.
+				riRoot.setViewId(root.getViewId());
+				riRoot.setLocale(root.getLocale());
+				String renderKitId = root.getRenderKitId();
+				// Fix facelets bug - for debug requests renderKitId is null !
+				if (null == renderKitId) {
+					renderKitId = calculateRenderKitId(facesContext);
+				}
+				riRoot.setRenderKitId(renderKitId);
+			}
+			if (ajaxContext.isAjaxRequest(facesContext)) {
+				// Remove ajax status - for navigation states, full page will be
+				// send.
+				ajaxContext.setAjaxRequest(false);
+			}
+		}
+		return riRoot;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.ViewHandlerWrapper#writeState(javax.faces.context.FacesContext)
+	 */
+	public void writeState(FacesContext context) throws IOException {
+		AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context);
+		if (ajaxContext.isAjaxRequest(context)) {
+			// TODO - detect case of JSF 1.1 + JSP. for all other we need own
+			// state marker for
+			// self-rendered regions only.
+			// write marker html element - input field. Will be parsed in filter
+			// and
+			// replaced with real state.
+			ResponseWriter writer = context.getResponseWriter();
+			writer.startElement(HTML.SPAN_ELEM, null);
+			writer.writeAttribute(HTML.id_ATTRIBUTE, STATE_MARKER_KEY, null);
+			writer.writeAttribute(HTML.NAME_ATTRIBUTE, STATE_MARKER_KEY, null);
+//			writer.writeAttribute("style", "display:none;", null);
+			if (!ajaxContext.isSelfRender()) {
+				super.writeState(context);
+			}
+			writer.endElement(HTML.SPAN_ELEM);
+		} else {
+			super.writeState(context);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.ViewHandlerWrapper#restoreView(javax.faces.context.FacesContext,
+	 *      java.lang.String)
+	 */
+	public UIViewRoot restoreView(FacesContext context, String viewId) {
+		UIViewRoot viewRoot = super.restoreView(context, viewId);
+		ExternalContext externalContext = context.getExternalContext();
+		Map requestParameterMap = externalContext.getRequestParameterMap();
+		Map requestMap = externalContext.getRequestMap();
+		if (null == viewRoot) {
+			if (requestParameterMap
+					.containsKey(AjaxContainerRenderer.AJAX_PARAMETER_NAME)
+					&& !requestMap.containsKey(REDIRECTED)) {
+				// New view created for AJAX request - indicate session
+				// expiration.
+				// We need send special response to client and suggest reload
+				// page.
+				String actionURL = getActionURL(context, viewId);
+				// To avoid double call to redirect, if we have more then one
+				// handler in chain.
+				requestMap.put(REDIRECTED, Boolean.TRUE);
+				if (_log.isDebugEnabled()) {
+					_log
+							.debug("Detect session expiration in AJAX request - view don't restored, action URL is "
+									+ actionURL);
+				}
+				try {
+					Object response = externalContext.getResponse();
+					if (response instanceof HttpServletResponse) {
+						HttpServletResponse httpResponse = (HttpServletResponse) response;
+						// TODO - get locale from request ?
+						httpResponse.setHeader("Ajax-Expired", Messages
+								.getMessage(Messages.AJAX_VIEW_EXPIRED));
+					}
+					actionURL = externalContext.encodeActionURL(actionURL);
+					externalContext.redirect(actionURL);
+					context.responseComplete();
+				} catch (IOException e) {
+					throw new FacesException(
+							"Error on redirect for reload expired page", e);
+				}
+			}
+		}
+		return viewRoot;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.ViewHandlerWrapper#getResourceURL(javax.faces.context.FacesContext,
+	 *      java.lang.String)
+	 */
+	public String getResourceURL(FacesContext context, String url) {
+		String resourceURL;
+		if (url.startsWith(InternetResource.RESOURCE_URI_PREFIX)) {
+			InternetResource resource = InternetResourceBuilder
+					.getInstance()
+					.createResource(
+							null,
+							url
+									.substring(InternetResource.RESOURCE_URI_PREFIX_LENGTH));
+			resourceURL = resource.getUri(context, null);
+		} else {
+			resourceURL = super.getResourceURL(context, url);
+		}
+		return resourceURL;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.ViewHandlerWrapper#renderView(javax.faces.context.FacesContext,
+	 *      javax.faces.component.UIViewRoot)
+	 */
+	public void renderView(FacesContext context, UIViewRoot root)
+			throws IOException, FacesException {
+		AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context);
+		// Broadcast Ajax events before rendering, to setup areas to update.
+		if (root instanceof AjaxViewRoot) {
+			AjaxViewRoot ajaxRoot = (AjaxViewRoot) root;
+			Map requestMap = context.getExternalContext().getRequestMap();
+			// broadcast ajax events before render response.
+			if (ajaxContext.isAjaxRequest(context)
+					&& null == requestMap
+							.get(AjaxRendererUtils.AJAX_AREAS_RENDERED)) {
+				processAjaxEvents(context, ajaxRoot);
+			}
+			if (!context.getResponseComplete()) {
+				super.renderView(context, root);
+				if (ajaxContext.isAjaxRequest(context)
+						&& null == requestMap
+								.get(AjaxRendererUtils.AJAX_AREAS_RENDERED)) {
+					// HACK for MyFaces ( <f:view> tag not call renderers )
+					if (_log.isDebugEnabled()) {
+						_log
+								.debug(Messages
+										.getMessage(Messages.AJAX_RESPONSE_NOT_RENDERED_INFO));
+					}
+						ajaxContext.setSelfRender(true);
+						//ServletResponse response = (ServletResponse) context
+						//		.getExternalContext().getResponse();
+						Object response = (Object) context
+							.getExternalContext().getResponse();
+						try {
+							response.getClass().getDeclaredMethod("reset",
+									new Class[0]).invoke(response, new Object[0]);
+							//response.reset();
+						} catch (Exception e) {
+							// Do nothing - we will use directly and reset
+							// wrapper
+						}
+						ajaxContext.renderSubmittedAjaxRegion(context,true);
+					}
+			}
+		} else {
+			super.renderView(context, root);
+		}
+		ajaxContext.processHeadResources(context);
+	}
+
+	/**
+	 * @param context
+	 * @param ajaxRoot
+	 */
+	private void processAjaxEvents(FacesContext context, AjaxViewRoot ajaxRoot) {
+		// First - process reRender from active components.
+		if (_log.isDebugEnabled()) {
+			_log.debug(Messages.getMessage(Messages.PROCESS_AJAX_EVENTS_INFO));
+		}
+		ajaxRoot.broadcastAjaxEvents(context);
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxViewRoot.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxViewRoot.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxViewRoot.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,562 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.ajax;
+
+import java.io.IOException;
+
+import javax.faces.FacesException;
+import javax.faces.component.NamingContainer;
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIViewRoot;
+import javax.faces.context.FacesContext;
+import javax.faces.el.MethodBinding;
+import javax.faces.event.AbortProcessingException;
+import javax.faces.event.FacesEvent;
+import javax.faces.event.PhaseId;
+
+import org.ajax4jsf.framework.renderer.AjaxContainerRenderer;
+import org.ajax4jsf.framework.util.message.Messages;
+import org.apache.commons.collections.Buffer;
+import org.apache.commons.collections.BufferUnderflowException;
+import org.apache.commons.collections.UnboundedFifoBuffer;
+
+/**
+ * Custom ViewRoot for support render parts of tree for Ajax requests. Main
+ * difference from default ViewRoot - store events queue and unique id counter
+ * in request-scope variables. In common realisation, store request-scope
+ * variables in component produce errors in case of concurrent requests to same
+ * view.
+ * 
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.4 $ $Date: 2007/02/28 17:01:01 $
+ * 
+ */
+public class AjaxViewRoot extends UIViewRoot implements AjaxContainer {
+
+    public static final String ROOT_ID = "_viewRoot";
+
+    private AjaxRegionBrige _brige;
+
+    /**
+         * 
+         */
+    public AjaxViewRoot() {
+	super();
+	super.setId(ROOT_ID);
+	_brige = new AjaxRegionBrige(this);
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see javax.faces.component.UIComponentBase#getId()
+         */
+    // public String getId() {
+    // return ROOT_ID;
+    // }
+    public String getRendererType() {
+	return (COMPONENT_FAMILY);
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see org.ajax4jsf.framework.ajax.AjaxViewBrige#broadcast(javax.faces.event.FacesEvent)
+         */
+    public void broadcast(FacesEvent event) throws AbortProcessingException {
+	super.broadcast(event);
+	getBrige().broadcast(event);
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see org.ajax4jsf.framework.ajax.AjaxViewBrige#getAjaxListener()
+         */
+    public MethodBinding getAjaxListener() {
+	return getBrige().getAjaxListener();
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see org.ajax4jsf.framework.ajax.AjaxViewBrige#isImmediate()
+         */
+    public boolean isImmediate() {
+	return getBrige().isImmediate();
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see org.ajax4jsf.framework.ajax.AjaxViewBrige#isSubmitted()
+         */
+    public boolean isSubmitted() {
+	return getBrige().isSubmitted();
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see javax.faces.component.UIComponent#queueEvent(javax.faces.event.FacesEvent)
+         */
+    public void queueEvent(FacesEvent event) {
+	if (event == null)
+	    throw new NullPointerException(Messages
+		    .getMessage(Messages.NULL_EVENT_SUBMITTED_ERROR));
+	if (event.getPhaseId().compareTo(PhaseId.RENDER_RESPONSE) == 0) {
+	    // HACK - Special case - Ajax Events to RenderResponse phase
+	    // queue.
+	    // in future, with JSF 1.2 it must be done by invokeOnComponent
+	    // method.
+	    // In 1.1 , events to RENDER_RESPONSE phase not used.
+	    getAjaxEventsQueue(getFacesContext()).add(event);
+	} else {
+	    getEventsQueue(getFacesContext(), event.getPhaseId()).add(event);
+	}
+    }
+
+    /**
+         * Broadcast events for specified Phase
+         * 
+         * @param context
+         * @param phaseId -
+         *                phase, for wich events must be processed.
+         */
+    void broadcastEvents(FacesContext context, PhaseId phaseId) {
+	Buffer[] events = getEvents(context);
+	Buffer anyPhaseEvents = events[PhaseId.ANY_PHASE.getOrdinal()];
+	Buffer phaseEvents = events[phaseId.getOrdinal()];
+	if (phaseEvents.isEmpty() && anyPhaseEvents.isEmpty())
+	    return;
+	// FacesEvent event = null;
+	boolean haveAnyPhaseEvents = !anyPhaseEvents.isEmpty();
+	boolean havePhaseEvents = !phaseEvents.isEmpty();
+	do {
+	    // ANY_PHASE first
+	    processEvents(anyPhaseEvents, haveAnyPhaseEvents);
+
+	    processEvents(phaseEvents, havePhaseEvents);
+	    // Events can queued in other events processing
+	    haveAnyPhaseEvents = !anyPhaseEvents.isEmpty();
+	    havePhaseEvents = !phaseEvents.isEmpty();
+	} while (haveAnyPhaseEvents || havePhaseEvents);
+	if (context.getRenderResponse() || context.getResponseComplete()) {
+	    clearEvents(context);
+	}
+
+    }
+
+    /**
+         * @param phaseEventsQueue
+         * @param havePhaseEvents
+         */
+    public void processEvents(Buffer phaseEventsQueue, boolean havePhaseEvents) {
+	FacesEvent event;
+	while (havePhaseEvents) {
+	    try {
+		event = (FacesEvent) phaseEventsQueue.remove();
+		UIComponent source = event.getComponent();
+		try {
+		    source.broadcast(event);
+		} catch (AbortProcessingException e) {
+		    // abort event processing
+		    // Page 3-30 of JSF 1.1 spec: "Throw an
+		    // AbortProcessingException, to tell the JSF
+		    // implementation
+		    // that no further broadcast of this event, or any
+		    // further
+		    // events, should take place."
+		    // clearEvents();
+		    // return;
+		}
+	    } catch (BufferUnderflowException e) {
+		havePhaseEvents = false;
+	    }
+	}
+    }
+
+    public void broadcastAjaxEvents(FacesContext context) {
+	Buffer queue = getAjaxEventsQueue(context);
+	processEvents(queue, !queue.isEmpty());
+    }
+
+    private Buffer[] events;
+
+    private Buffer ajaxEvents = new UnboundedFifoBuffer();
+
+    /**
+         * Use FIFO buffers for hold Faces Events. Hold this buffers in Request
+         * scope parameters for support any concurrent requests for same
+         * component tree ( since RI hold component tree in session ).
+         * 
+         * @param context
+         * @param phase
+         * @return
+         */
+    protected Buffer getEventsQueue(FacesContext context, PhaseId phase) {
+	return getEvents(context)[phase.getOrdinal()];
+    }
+
+    /**
+         * @return
+         */
+    protected Buffer[] getEvents(FacesContext context) {
+	if (events == null) {
+	    clearEvents(context);
+	}
+	return events;
+    }
+
+    /**
+         * Special Fifo Buffer for ajax events to Render Responce phase.
+         * 
+         * @param context
+         * @return
+         */
+    protected Buffer getAjaxEventsQueue(FacesContext context) {
+
+	return ajaxEvents;
+    }
+
+    public void clearEvents(FacesContext context) {
+	int len;
+	events = new Buffer[len = PhaseId.VALUES.size()];
+	for (int i = 0; i < len; i++) {
+	    events[i] = new UnboundedFifoBuffer();
+	}
+    }
+
+    private InvokerCallback _decodeInvoker = new InvokerCallback() {
+
+	public void invoke(FacesContext context, UIComponent component) {
+	    component.processDecodes(context);
+	}
+
+	public void invokeRoot(FacesContext context) {
+	    AjaxViewRoot.super.processDecodes(context);
+	}
+
+    };
+
+    private UIComponent singleComponent = null;
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see org.ajax4jsf.framework.ajax.AjaxViewBrige#processDecodes(javax.faces.context.FacesContext)
+         */
+    public void processDecodes(FacesContext context) {
+	if (context == null)
+	    throw new NullPointerException("context");
+	singleComponent = null;
+	AjaxContext.invokeOnRegionOrRoot(this, context, _decodeInvoker);
+	try {
+	    broadcastEvents(context, PhaseId.APPLY_REQUEST_VALUES);
+	} catch (AjaxSingleException e) {
+	    singleComponent = e.getComponent();
+	}
+    }
+
+    private InvokerCallback _updatesInvoker = new InvokerCallback() {
+
+	public void invoke(FacesContext context, UIComponent component) {
+	    component.processUpdates(context);
+	}
+
+	public void invokeRoot(FacesContext context) {
+	    AjaxViewRoot.super.processUpdates(context);
+	}
+
+    };
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see org.ajax4jsf.framework.ajax.AjaxViewBrige#processUpdates(javax.faces.context.FacesContext)
+         */
+    public void processUpdates(FacesContext context) {
+	if (context == null)
+	    throw new NullPointerException("context");
+	if (null == singleComponent) {
+	    AjaxContext.invokeOnRegionOrRoot(this, context, _updatesInvoker);
+	} else {
+	    singleComponent.processUpdates(context);
+	}
+	broadcastEvents(context, PhaseId.UPDATE_MODEL_VALUES);
+    }
+
+    private InvokerCallback _validatorsInvoker = new InvokerCallback() {
+
+	public void invoke(FacesContext context, UIComponent component) {
+	    component.processValidators(context);
+	}
+
+	public void invokeRoot(FacesContext context) {
+	    AjaxViewRoot.super.processValidators(context);
+	}
+
+    };
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see org.ajax4jsf.framework.ajax.AjaxViewBrige#processValidators(javax.faces.context.FacesContext)
+         */
+    public void processValidators(FacesContext context) {
+	if (context == null)
+	    throw new NullPointerException("context");
+	if (null == singleComponent) {
+	    AjaxContext.invokeOnRegionOrRoot(this, context, _validatorsInvoker);
+	} else {
+	    singleComponent.processValidators(context);
+	}
+	broadcastEvents(context, PhaseId.PROCESS_VALIDATIONS);
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see javax.faces.component.UIViewRoot#processApplication(javax.faces.context.FacesContext)
+         */
+    public void processApplication(FacesContext context) {
+	if (context == null)
+	    throw new NullPointerException("context");
+	// UIComponent component = getSubmittedRegion(context);
+	// TODO - process JSF 1.2 listeners
+	broadcastEvents(context, PhaseId.INVOKE_APPLICATION);
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see javax.faces.component.UIViewRoot#encodeBegin(javax.faces.context.FacesContext)
+         */
+    // public void encodeBegin(FacesContext context) throws IOException {
+    // UIComponent submittedComponent = getSubmittedRegion(context);
+    // if(null == submittedComponent){
+    // super.encodeBegin(context);
+    // } else {
+    // submittedComponent.encodeBegin(context);
+    // }
+    // }
+    private InvokerCallback _ajaxInvoker = new InvokerCallback() {
+
+	public void invoke(FacesContext context, UIComponent component) {
+	    try {
+		if (component instanceof AjaxContainer) {
+		    AjaxContainer ajax = (AjaxContainer) component;
+		    ajax.encodeAjax(context);
+		} else {
+		    // Container not found, use Root for encode.
+		    encodeAjax(context);
+		}
+	    } catch (IOException e) {
+		throw new FacesException(e);
+	    }
+	}
+
+	public void invokeRoot(FacesContext context) {
+	    try {
+		encodeAjax(context);
+	    } catch (IOException e) {
+		throw new FacesException(e);
+	    }
+	}
+
+    };
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see javax.faces.component.UIComponentBase#encodeChildren(javax.faces.context.FacesContext)
+         */
+    public void encodeChildren(FacesContext context) throws IOException {
+	if (!isHavePage()
+		&& AjaxContext.getCurrentInstance(context).isAjaxRequest(
+			context)) {
+	    AjaxContext.invokeOnRegionOrRoot(this, context, _ajaxInvoker);
+	} else {
+	    super.encodeChildren(context);
+	}
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see javax.faces.component.UIComponentBase#encodeEnd(javax.faces.context.FacesContext)
+         */
+    // public void encodeEnd(FacesContext context) throws IOException {
+    // UIComponent submittedComponent = getSubmittedRegion(context);
+    // if (null == submittedComponent) {
+    // super.encodeEnd(context);
+    // } else {
+    // submittedComponent.encodeEnd(context);
+    // }
+    // }
+    public void restoreState(FacesContext context, Object state) {
+	Object[] mystate = (Object[]) state;
+	super.restoreState(context, mystate[0]);
+	getBrige().restoreState(context, mystate[1]);
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see org.ajax4jsf.framework.ajax.AjaxViewBrige#saveState(javax.faces.context.FacesContext)
+         */
+    public Object saveState(FacesContext context) {
+	Object[] state = new Object[2];
+	state[0] = super.saveState(context);
+	state[1] = getBrige().saveState(context);
+	return state;
+    }
+
+    public String getViewId() {
+	ViewIdHolder viewIdHolder = AjaxContext.getCurrentInstance()
+		.getViewIdHolder();
+	String viewId;
+	if (null != viewIdHolder) {
+	    viewId = viewIdHolder.getViewId();
+	} else {
+	    viewId = super.getViewId();
+	}
+	return viewId;
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see org.ajax4jsf.framework.ajax.AjaxViewBrige#setAjaxListener(javax.faces.el.MethodBinding)
+         */
+    public void setAjaxListener(MethodBinding ajaxListener) {
+	getBrige().setAjaxListener(ajaxListener);
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see org.ajax4jsf.framework.ajax.AjaxViewBrige#setImmediate(boolean)
+         */
+    public void setImmediate(boolean immediate) {
+	getBrige().setImmediate(immediate);
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see org.ajax4jsf.framework.ajax.AjaxViewBrige#setSubmitted(boolean)
+         */
+    public void setSubmitted(boolean submitted) {
+	getBrige().setSubmitted(submitted);
+    }
+
+    public void addAjaxListener(AjaxListener listener) {
+	addFacesListener(listener);
+    }
+
+    public AjaxListener[] getAjaxListeners() {
+	return (AjaxListener[]) getFacesListeners(AjaxListener.class);
+    }
+
+    public void removeAjaxListener(AjaxListener listener) {
+	removeFacesListener(listener);
+
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see org.ajax4jsf.framework.ajax.AjaxViewBrige#isSelfRendered()
+         */
+    public boolean isSelfRendered() {
+	return false;// _brige.isSelfRendered();
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see org.ajax4jsf.framework.ajax.AjaxViewBrige#setSelfRendered(boolean)
+         */
+    public void setSelfRendered(boolean selfRendered) {
+	// _brige.setSelfRendered(selfRendered);
+    }
+
+    /**
+         * Check for AjaxContainer component in childreh. This is workaround for
+         * MyFaces JSP tag implementation, not called any encode... methods in
+         * <f:view> tag. If only one AjaxContainer present as children for
+         * viewRoot, decoding methods delegated to them.
+         * 
+         * @return Returns the havePage.
+         */
+    public boolean isHavePage() {
+	return (getChildCount() == 1 && getChildren().get(0) instanceof AjaxContainer);
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see javax.faces.component.UIComponentBase#getRendersChildren()
+         */
+    public boolean getRendersChildren() {
+	FacesContext context = FacesContext.getCurrentInstance();
+	// For non Ajax request, view root not render children
+	if (!AjaxContext.getCurrentInstance(context).isAjaxRequest(context)) {
+	    return false;
+	}
+	// Also, if have page component as clild - delegate rendering of
+	// children to it.
+	if (isHavePage()) {
+	    return false;
+	}
+	// Ajax Request. Control all output.
+	return true;
+    }
+
+    public boolean isRenderRegionOnly() {
+	// for viewroot it not applicable.
+	return false;
+    }
+
+    public void setRenderRegionOnly(boolean reRenderPage) {
+	// TODO Auto-generated method stub
+
+    }
+
+    public void encodeAjax(FacesContext context) throws IOException {
+	String rendererType = getRendererType();
+	if (rendererType != null) {
+	    ((AjaxContainerRenderer) getRenderer(context)).encodeAjax(context,
+		    this);
+	}
+
+    }
+
+    /**
+         * @return the brige
+         */
+    protected AjaxRegionBrige getBrige() {
+	return _brige;
+    }
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/ComponentInvoker.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/ComponentInvoker.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/ComponentInvoker.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,55 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.ajax;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+
+/**
+ * Interface for call lifecycle methods on component with known clientId
+ * For JSF 1.2 implementation must use invokeOnComponent method, for JSF 1.1 use
+ * simple recursion on view tree ( not compatible with UIData components )
+ * @author shura
+ *
+ */
+public interface ComponentInvoker {
+
+	/**
+	 * Invoke method on active AjaxContainer component, or on viewRoot, if none.
+	 * @param viewRoot
+	 * @param context
+	 * @param callback
+	 */
+	public abstract void invokeOnRegionOrRoot(AjaxViewRoot viewRoot,
+			FacesContext context, InvokerCallback callback);
+
+	/**
+	 * Recursive call for all children for search component with same clientId as target region
+	 * @param viewRoot
+	 * @param context
+	 * @param callback
+	 * @param regionId
+	 */
+	public abstract boolean invokeOnComponent(UIComponent root,
+			FacesContext context, InvokerCallback callback, String regionId);
+
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/EventValueBinding.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/EventValueBinding.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/EventValueBinding.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,206 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.ajax;
+
+import javax.faces.component.StateHolder;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.el.EvaluationException;
+import javax.faces.el.PropertyNotFoundException;
+import javax.faces.el.ValueBinding;
+
+import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
+import org.ajax4jsf.framework.util.message.Messages;
+
+/**
+ * Inner class for build event string for parent component.
+ * 
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:38 $ Disadvantages -
+ *          not rebuild event string setted as EL expression. TODO - save
+ *          expressions for build event string at render phase.
+ */
+public class EventValueBinding extends ValueBinding implements StateHolder {
+
+    /**
+         * 
+         */
+    private static final long serialVersionUID = -6583167387542332290L;
+
+    private String _componentId;
+
+    /**
+         * current update component. transient since saved state as component.
+         */
+    transient private AjaxSupport _component = null;
+
+    /**
+         * Default constructor for restoreState.
+         */
+    public EventValueBinding() {
+
+    }
+
+    /**
+         * Constructor for build from AjaxComponent.
+         * 
+         * @param update
+         */
+    public EventValueBinding(AjaxSupport update) {
+	_component = update;
+	// _componentId = string;
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see javax.faces.el.ValueBinding#getType(javax.faces.context.FacesContext)
+         */
+    public Class getType(FacesContext facesContext) throws EvaluationException,
+	    PropertyNotFoundException {
+
+	return String.class;
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see javax.faces.el.ValueBinding#getValue(javax.faces.context.FacesContext)
+         */
+    public Object getValue(FacesContext facesContext)
+	    throws EvaluationException, PropertyNotFoundException {
+	if (((UIComponent) getComponent(facesContext)).isRendered()) {
+	    return getComponent(facesContext).getEventString();
+
+	} else {
+	    return null;
+	}
+    }
+
+    private AjaxSupport getComponent(FacesContext facesContext)
+	    throws EvaluationException {
+
+	if (_component == null) {
+	    UIComponent uiComponent = facesContext.getViewRoot().findComponent(
+		    _componentId);
+	    if (null != uiComponent && uiComponent instanceof AjaxComponent) {
+		_component = (AjaxSupport) uiComponent;
+	    } else {
+		throw new EvaluationException(Messages.getMessage(
+			Messages.COMPONENT_NOT_FOUND, _componentId));
+	    }
+
+	}
+
+	return _component;
+    }
+
+    /**
+         * @param component
+         *                the component to set
+         */
+    public void setComponent(AjaxSupport component) {
+	_component = component;
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see javax.faces.el.ValueBinding#isReadOnly(javax.faces.context.FacesContext)
+         */
+    public boolean isReadOnly(FacesContext facesContext)
+	    throws EvaluationException, PropertyNotFoundException {
+	// TODO Auto-generated method stub
+	return true;
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see javax.faces.el.ValueBinding#setValue(javax.faces.context.FacesContext,
+         *      java.lang.Object)
+         */
+    public void setValue(FacesContext facesContext, Object value)
+	    throws EvaluationException, PropertyNotFoundException {
+	throw new EvaluationException(Messages
+		.getMessage(Messages.EVENT_IS_READ_ONLY));
+
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see javax.faces.component.StateHolder#saveState(javax.faces.context.FacesContext)
+         */
+    public Object saveState(FacesContext context) {
+	if (null == _component) {
+	    return _componentId;
+	} else {
+	    return AjaxRendererUtils
+		    .getAbsoluteId((UIComponent) getComponent(context));
+	}
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see javax.faces.component.StateHolder#restoreState(javax.faces.context.FacesContext,
+         *      java.lang.Object)
+         */
+    public void restoreState(FacesContext context, Object state) {
+	// TODO Auto-generated method stub
+	_componentId = (String) state;
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see javax.faces.component.StateHolder#isTransient()
+         */
+    public boolean isTransient() {
+	// TODO Auto-generated method stub
+	return false;
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see javax.faces.component.StateHolder#setTransient(boolean)
+         */
+    public void setTransient(boolean newTransientValue) {
+	// TODO Auto-generated method stub
+
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see javax.faces.el.ValueBinding#getExpressionString()
+         */
+    public String getExpressionString() {
+	// FacesContext context = FacesContext.getCurrentInstance();
+	// UIComponent component = (UIComponent) getComponent(context);
+	// return "#{ajaxSupport["+component.getClientId(context)+"]}";
+	return null;
+    }
+
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/ImageCacheScript.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/ImageCacheScript.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/ImageCacheScript.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,55 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.ajax;
+
+import org.ajax4jsf.framework.resource.ClientScript;
+
+/**
+ * Resource for Drag ' Drop client javascript
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:33 $
+ *
+ */
+public class ImageCacheScript extends ClientScript {
+
+	
+	
+	/**
+	 * 
+	 */
+	public ImageCacheScript() {
+		super();
+		usePrototype=true;
+//		setRenderer(new ScriptRenderer());
+//		setLastModified(new Date(InternetResourceBuilder.getInstance().getStartTime()));
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.ajax.ClientScript#getJavaScript()
+	 */
+	public String getJavaScript() {
+		// TODO Auto-generated method stub
+		return "scripts/imagecache.js";
+	}
+
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/InitPhaseListener.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/InitPhaseListener.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/InitPhaseListener.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,106 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.ajax;
+
+import java.util.Iterator;
+
+import javax.faces.FactoryFinder;
+import javax.faces.application.Application;
+import javax.faces.application.StateManager;
+import javax.faces.application.ViewHandler;
+import javax.faces.context.FacesContext;
+import javax.faces.event.PhaseEvent;
+import javax.faces.event.PhaseId;
+import javax.faces.event.PhaseListener;
+import javax.faces.lifecycle.Lifecycle;
+import javax.faces.lifecycle.LifecycleFactory;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * One time called listener, for initialize framework at first request.
+ * @author shura
+ *
+ */
+public class InitPhaseListener implements PhaseListener {
+	
+	private boolean removed= false;
+	private boolean initialized = false;
+	
+	private static final Log log = LogFactory.getLog(InitPhaseListener.class);
+
+	/* (non-Javadoc)
+	 * @see javax.faces.event.PhaseListener#afterPhase(javax.faces.event.PhaseEvent)
+	 */
+	public synchronized void afterPhase(PhaseEvent event) {
+        if (!removed) {
+        	if(log.isDebugEnabled()){
+        		log.debug("Remove init phase listener from factories");
+        	}
+            LifecycleFactory factory = (LifecycleFactory)
+                  FactoryFinder.getFactory(FactoryFinder.LIFECYCLE_FACTORY);
+            for(Iterator iter = factory.getLifecycleIds(); iter.hasNext(); ) {
+                Lifecycle lifecycle = factory.getLifecycle((String) iter.next());
+                lifecycle.removePhaseListener(this);
+            }
+            removed = true;
+        }
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.event.PhaseListener#beforePhase(javax.faces.event.PhaseEvent)
+	 */
+	public synchronized void beforePhase(PhaseEvent event) {
+		if(!initialized){
+			if(log.isDebugEnabled()){
+				log.debug("Perform additional framework initialization on first request");
+			}
+			FacesContext facesContext = event.getFacesContext();
+			Application application = facesContext.getApplication();
+			StateManager stateManager = application.getStateManager();
+			if(! (stateManager instanceof AjaxStateManager)){
+				if(log.isDebugEnabled()){
+					log.debug("Set AjaxStateManager on top of chain");
+				}
+				application.setStateManager(new AjaxStateManager(stateManager));
+			}
+			ViewHandler viewHandler = application.getViewHandler();
+			if (!(viewHandler instanceof AjaxViewHandler)) {
+				if(log.isDebugEnabled()){
+					log.debug("Set AjaxViewHandler on top of chain");
+				}
+				application.setViewHandler(new AjaxViewHandler(viewHandler));
+			}
+			initialized = true;
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.event.PhaseListener#getPhaseId()
+	 */
+	public PhaseId getPhaseId() {
+		// TODO Auto-generated method stub
+		return PhaseId.ANY_PHASE;
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/InvokerCallback.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/InvokerCallback.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/InvokerCallback.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,48 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.ajax;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+
+/**
+ * Callback Interface 
+ * for invoke lifecycle methods ( processDecodes, processValidators ... encodeEnd ).
+ * @author shura
+ *
+ */
+public interface InvokerCallback {
+	
+	/**
+	 * Process method on given component.
+	 * @param context
+	 * @param component
+	 */
+	public void invoke(FacesContext context, UIComponent component);
+
+	/**
+	 * Default processing on UIVewRoot
+	 * @param context
+	 */
+	public void invokeRoot(FacesContext context);
+	
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/JavaScriptParameter.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/JavaScriptParameter.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/JavaScriptParameter.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,37 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.ajax;
+
+/**
+ * Interface for extend {@link javax.faces.component.UIParameter} component by
+ * handling isertion parameters into JavaScript code as references, not string literals.
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:40 $
+ *
+ */
+public interface JavaScriptParameter {
+
+	public void setNoEscape(boolean noEscape);
+
+	public boolean isNoEscape();
+
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/JsfOneOneInvoker.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/JsfOneOneInvoker.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/JsfOneOneInvoker.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,87 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.ajax;
+
+import java.util.Iterator;
+
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIViewRoot;
+import javax.faces.context.FacesContext;
+
+/**
+ * @author shura
+ *
+ */
+public class JsfOneOneInvoker implements ComponentInvoker {
+	
+	
+	/**
+	 * 
+	 */
+	public JsfOneOneInvoker() {
+		// TODO Auto-generated constructor stub
+	}
+	
+	
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.ajax.AjaxInvoker#invokeOnRegionOrRoot(org.ajax4jsf.framework.ajax.AjaxViewRoot, javax.faces.context.FacesContext, org.ajax4jsf.framework.ajax.InvokerCallback, javax.faces.event.PhaseId)
+	 */
+	public void invokeOnRegionOrRoot(AjaxViewRoot viewRoot, FacesContext context, InvokerCallback callback) {
+		AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context);
+		String submittedRegionClientId = ajaxContext.getSubmittedRegionClientId(context);
+		if(null == submittedRegionClientId || viewRoot.getId().equals(submittedRegionClientId)){
+			// This is a not AJAX request, or active region is root.
+			callback.invokeRoot(context);
+		} else {
+			if(!invokeOnComponent(viewRoot, context, callback, submittedRegionClientId)){
+				// Region not found - perform default actions.
+				// TODO - log errors.
+				callback.invokeRoot(context);
+			}
+		}
+
+	}
+	
+	public void invokeOnRegion(FacesContext context, InvokerCallback callback, String regionId) {
+		UIViewRoot viewRoot = context.getViewRoot();
+		invokeOnComponent(viewRoot,context,callback,regionId);
+	}
+	
+	
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.ajax.AjaxInvoker#invokeOnComponent(javax.faces.component.UIComponent, javax.faces.context.FacesContext, org.ajax4jsf.framework.ajax.InvokerCallback, java.lang.String)
+	 */
+	public boolean invokeOnComponent(UIComponent root, FacesContext context, InvokerCallback callback, String regionId) {
+		if(regionId.equals(root.getClientId(context))){
+			callback.invoke(context, root);
+			return true;
+		}
+		for (Iterator iter = root.getFacetsAndChildren(); iter.hasNext();) {
+			UIComponent child = (UIComponent) iter.next();
+			if(invokeOnComponent(child, context, callback, regionId)){
+				return true;
+			}
+		}
+		return false;
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/ViewIdHolder.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/ViewIdHolder.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/ViewIdHolder.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,37 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.ajax;
+
+/**
+ * Interface to skip navigation cases in ViewHandler and , instead, store new ViewId.
+ * @author shura
+ *
+ */
+public interface ViewIdHolder {
+	
+	public boolean skipNavigation(String ViewId);
+	
+	public String getViewId();
+	
+	public void setViewId(String newViewId);
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/package.html
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/package.html	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/package.html	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=Cp1251"/>
+<title>Package description for AJAX components</title>
+</head>
+<body>
+</body>
+</html>

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/BaseFilter.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/BaseFilter.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/BaseFilter.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,389 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.ajax.xmlfilter;
+
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.util.Date;
+import java.util.Enumeration;
+
+import javax.faces.application.ViewHandler;
+import javax.servlet.Filter;
+import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+
+import org.ajax4jsf.ajax.PushEventsCounter;
+import org.ajax4jsf.cache.Cache;
+import org.ajax4jsf.framework.renderer.AjaxContainerRenderer;
+import org.ajax4jsf.framework.resource.InternetResourceService;
+import org.ajax4jsf.framework.util.message.Messages;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * Base class for request processing filters, with convert Htmp content to XML
+ * for ajax requests, and serve request to application off-page resources
+ * 
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:58:21 $
+ * 
+ */
+public abstract class BaseFilter implements Filter {
+
+    public static final String AJAX_PUSH_KEY_HEADER = "Ajax-Push-Key";
+
+    private static final Log log = LogFactory.getLog(BaseFilter.class);
+
+    public static final boolean DEBUG = true;
+
+    private FilterConfig filterConfig;
+
+    private static final String FUNCTION_NAME_PARAMETER = "function";
+
+    private String function = "alert('Data received');JSHttpRequest.dataReady";
+
+    private String attributesNames;
+
+    private boolean rewriteid = false;
+
+    public static final String REWRITEID_PARAMETER = "rewriteid";
+
+    public static final String STYLESHEET_PARAMETER = "xsl";
+
+    public static final String ABSOLUTE_TAGS_PARAMETER = "absolute-attributes";
+
+    // private WebXml webXml;
+    // private String xsl;
+    // private Templates xslTemplates;
+    /**
+         * 
+         */
+    private static final long serialVersionUID = -2295534611886142935L;
+
+    public static final String DATA_PARAMETER = "DATA";
+
+    public static final String DEFAULT_SERVLET_PATH = "/resource";
+
+    public static final String RENDERER_PREFIX = "/renderer";
+
+    public static final String CACHEABLE_PREFIX = "/cache";
+
+    // private static final Pattern rendererPattern =
+    // Pattern.compile(RENDERER_PREFIX+"/([^/]+)/([^/]+)/([^/]+)/(.*)");
+    // private static final Pattern builderPattern =
+    // Pattern.compile(CACHEABLE_PREFIX+"/(.*)");
+    public static final String FILTER_PERFORMED = "com.exade.vcp.Filter.done";
+
+    public static final String RESPONSE_WRAPPER_ATTRIBUTE = "com.exade.vcp.Filter.ResponseWrapper";
+
+    protected BaseXMLFilter xmlFilter = null;
+
+    protected InternetResourceService resourceService = null;
+
+    protected PollEventsManager eventsManager;
+
+    /**
+         * Initialize the filter.
+         */
+    public void init(FilterConfig config) throws ServletException {
+	if (log.isDebugEnabled()) {
+	    log.debug("Init ajax4jsf filter with nane: "
+		    + config.getFilterName());
+	    Enumeration parameterNames = config.getInitParameterNames();
+	    StringBuffer parameters = new StringBuffer("Init parameters :\n");
+	    while (parameterNames.hasMoreElements()) {
+		String name = (String) parameterNames.nextElement();
+		parameters.append(name).append(" : '").append(
+			config.getInitParameter(name)).append('\n');
+	    }
+	    log.debug(parameters);
+	    // log.debug("Stack Trace", new Exception());
+	}
+	// Save config
+	filterConfig = config;
+	setFunction((String) nz(filterConfig
+		.getInitParameter(FUNCTION_NAME_PARAMETER), getFunction()));
+	setAttributesNames(filterConfig
+		.getInitParameter(ABSOLUTE_TAGS_PARAMETER));
+	xmlFilter.init(config);
+	if ("true".equalsIgnoreCase(filterConfig
+		.getInitParameter(REWRITEID_PARAMETER))) {
+	    this.setRewriteid(true);
+	}
+
+	String prefix = filterConfig.getServletContext().getRealPath("/");
+	String file = filterConfig.getInitParameter("log4j-init-file");
+	// if the log4j-init-file is not set, then no point in trying
+	if (file != null) {
+	    Log4JConfigurator log4jconfig = new Log4JConfigurator(prefix);
+	    log4jconfig.doConfigure(file);
+	}
+	resourceService = new InternetResourceService();
+	// Caching initialization.
+	resourceService.init(filterConfig);
+	eventsManager = new PollEventsManager();
+	eventsManager.init(filterConfig.getServletContext());
+    }
+
+    /**
+         * @param httpServletRequest
+         * @throws UnsupportedEncodingException
+         */
+    protected void setupRequestEncoding(HttpServletRequest httpServletRequest)
+	    throws UnsupportedEncodingException {
+	String contentType = httpServletRequest.getHeader("Content-Type");
+
+	String characterEncoding = lookupCharacterEncoding(contentType);
+
+	if (characterEncoding == null) {
+	    HttpSession session = httpServletRequest.getSession(false);
+
+	    if (session != null) {
+		characterEncoding = (String) session
+			.getAttribute(ViewHandler.CHARACTER_ENCODING_KEY);
+	    }
+
+	    if (characterEncoding != null) {
+		httpServletRequest.setCharacterEncoding(characterEncoding);
+	    }
+	}
+    }
+
+    /**
+         * Detect request encoding from Content-Type header
+         * 
+         * @param contentType
+         * @return - charset, if present.
+         */
+    private String lookupCharacterEncoding(String contentType) {
+	String characterEncoding = null;
+
+	if (contentType != null) {
+	    int charsetFind = contentType.indexOf("charset=");
+	    if (charsetFind != -1) {
+		if (charsetFind == 0) {
+		    // charset at beginning of Content-Type, curious
+		    characterEncoding = contentType.substring(8);
+		} else {
+		    char charBefore = contentType.charAt(charsetFind - 1);
+		    if (charBefore == ';' || Character.isWhitespace(charBefore)) {
+			// Correct charset after mime type
+			characterEncoding = contentType
+				.substring(charsetFind + 8);
+		    }
+		}
+		if (log.isDebugEnabled())
+		    log.debug(Messages.getMessage(
+			    Messages.CONTENT_TYPE_ENCODING, characterEncoding));
+	    } else {
+		if (log.isDebugEnabled())
+		    log.debug(Messages.getMessage(
+			    Messages.CONTENT_TYPE_NO_ENCODING, contentType));
+	    }
+	}
+	return characterEncoding;
+    }
+
+    /**
+         * @param initParameter
+         * @param function2
+         * @return
+         */
+    private Object nz(Object param, Object def) {
+	return param != null ? param : def;
+    }
+
+    /**
+         * Execute the filter.
+         */
+    public void doFilter(ServletRequest request, ServletResponse response,
+	    FilterChain chain) throws IOException, ServletException {
+	long startTimeMills = 0;
+	// Detect case of request - normal, AJAX, AJAX - JavaScript
+	// TODO - detect first processing in filter.
+	HttpServletRequest httpServletRequest = (HttpServletRequest) request;
+	HttpServletResponse httpServletResponse = (HttpServletResponse) response;
+	if (log.isDebugEnabled()) {
+	    startTimeMills = System.currentTimeMillis();
+	    log.debug(Messages.getMessage(Messages.FILTER_START_INFO, new Date(
+		    startTimeMills), httpServletRequest.getRequestURI()));
+	}
+
+	if (request.getAttribute(FILTER_PERFORMED) != Boolean.TRUE) {
+	    // mark - and not processing same request twice.
+	    request.setAttribute(FILTER_PERFORMED, Boolean.TRUE);
+	    String ajaxPushHeader = httpServletRequest.getHeader(AJAX_PUSH_KEY_HEADER);
+	    // check for a push check request.
+	    if (httpServletRequest.getMethod().equals("HEAD")
+		    && null != ajaxPushHeader) {
+			PushEventsCounter listener = eventsManager.getListener(ajaxPushHeader);
+			if(listener.isPerformed()){
+			    listener.processed();
+			    httpServletResponse.setStatus(200);
+			    if (log.isDebugEnabled()) {
+				log.debug("Occurs event for a id "+ajaxPushHeader);
+			    }
+			} else {
+			    // Response code - 'No content'
+			    httpServletResponse.setStatus(204);			    
+			    if (log.isDebugEnabled()) {
+				log.debug("No event for a id "+ajaxPushHeader);
+			    }
+			}
+	    } else
+	    // check for resource request
+	    if (!getResourceService().serviceResource(httpServletRequest,
+		    httpServletResponse)) {
+		// Not request to resource - perform filtering.
+		// first stage - detect/set encoding of request. Same as in
+		// Myfaces External Context.
+		setupRequestEncoding(httpServletRequest);
+		// check ajax request parameter
+		// TODO - check for JSF page.
+		if (true) {
+		    if (log.isDebugEnabled()) {
+			log.debug(Messages
+				.getMessage(Messages.FILTER_XML_OUTPUT));
+		    }
+
+		    // Execute the rest of the filter chain, including the
+		    // JSP
+		    xmlFilter.doXmlFilter(chain, httpServletRequest,
+			    httpServletResponse);
+		} else {
+		    // normal request, execute chain ...
+		    if (log.isDebugEnabled()) {
+			log.debug(Messages
+				.getMessage(Messages.FILTER_NO_XML_CHAIN));
+		    }
+		    chain.doFilter(request, response);
+
+		}
+	    }
+	} else {
+	    if (log.isDebugEnabled()) {
+		log.debug(Messages.getMessage(Messages.FILTER_NO_XML_CHAIN_2));
+	    }
+	    chain.doFilter(request, response);
+
+	}
+	if (log.isDebugEnabled()) {
+	    startTimeMills = System.currentTimeMillis() - startTimeMills;
+	    log.debug(Messages.getMessage(Messages.FILTER_STOP_INFO, ""
+		    + startTimeMills, httpServletRequest.getRequestURI()));
+	}
+    }
+
+    /**
+         * @param request
+         * @return
+         */
+    protected boolean isAjaxRequest(ServletRequest request) {
+	try {
+	    return null != request
+		    .getParameter(AjaxContainerRenderer.AJAX_PARAMETER_NAME);
+	} catch (Exception e) {
+	    // OCJ 10 - throw exception for static resources.
+	    return false;
+	}
+    }
+
+    /**
+         * Destroy the filter.
+         */
+    public void destroy() {
+    }
+
+    /**
+         * @return Returns the servletContext.
+         */
+    ServletContext getServletContext() {
+	return filterConfig.getServletContext();
+    }
+
+    /**
+         * @return the resourceService
+         * @throws ServletException
+         */
+    protected synchronized InternetResourceService getResourceService()
+	    throws ServletException {
+	// if (resourceService == null) {
+	// resourceService = new InternetResourceService();
+	// // Caching initialization.
+	// resourceService.init(filterConfig);
+	//
+	// }
+	return resourceService;
+    }
+
+    /**
+         * @param function
+         *                The function to set.
+         */
+    protected void setFunction(String function) {
+	this.function = function;
+    }
+
+    /**
+         * @return Returns the function.
+         */
+    protected String getFunction() {
+	return function;
+    }
+
+    /**
+         * @param rewriteid
+         *                The rewriteid to set.
+         */
+    protected void setRewriteid(boolean rewriteid) {
+	this.rewriteid = rewriteid;
+    }
+
+    /**
+         * @return Returns the rewriteid.
+         */
+    protected boolean isRewriteid() {
+	return rewriteid;
+    }
+
+    /**
+         * @param attributesNames
+         *                The attributesNames to set.
+         */
+    protected void setAttributesNames(String attributesNames) {
+	this.attributesNames = attributesNames;
+    }
+
+    /**
+         * @return Returns the attributesNames.
+         */
+    protected String getAttributesNames() {
+	return attributesNames;
+    }
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/BaseXMLFilter.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/BaseXMLFilter.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/BaseXMLFilter.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,416 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.ajax.xmlfilter;
+
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.io.UnsupportedEncodingException;
+import java.io.Writer;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+
+import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletException;
+import javax.servlet.ServletOutputStream;
+import javax.servlet.ServletRequest;
+import javax.servlet.http.Cookie;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.ajax4jsf.framework.ajax.AjaxContext;
+import org.ajax4jsf.framework.ajax.AjaxViewHandler;
+import org.ajax4jsf.framework.renderer.AjaxContainerRenderer;
+import org.ajax4jsf.framework.util.message.Messages;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+public abstract class BaseXMLFilter {
+    private static final Log log = LogFactory.getLog(BaseXMLFilter.class);
+
+    public static final String RESPONSE_WRAPPER_ATTRIBUTE = "com.exade.vcp.Filter.ResponseWrapper";
+
+    private String mimetype = "text/xml";
+
+    private String publicid = "-//W3C//DTD XHTML 1.0 Transitional//EN";
+
+    private String systemid = "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";
+
+    private String namespace = "http://www.w3.org/1999/xhtml";
+
+    private static final String MIME_TYPE_PARAMETER = "mime-type";
+
+    private static final String PUBLICID_PARAMETER = "publicid";
+
+    private static final String SYSTEMID_PARAMETER = "systemid";
+
+    private static final String NAMESPACE_PARAMETER = "namespace";
+
+    private boolean forcexml = false;
+
+    private static final String FORCEXML_PARAMETER = "forceparser";
+
+    public BaseFilter filter;
+
+    public void setFilter(BaseFilter filter) {
+	this.filter = filter;
+    }
+
+    public void init(FilterConfig config) throws ServletException {
+	if (log.isDebugEnabled()) {
+	    log.debug("init XML filter service with class "
+		    + this.getClass().getName());
+	}
+	if ("false".equalsIgnoreCase(config
+		.getInitParameter(FORCEXML_PARAMETER))) {
+	    this.forcexml = false;
+	}
+	if ("true"
+		.equalsIgnoreCase(config.getInitParameter(FORCEXML_PARAMETER))) {
+	    this.forcexml = true;
+	}
+	setMimetype((String) nz(config.getInitParameter(MIME_TYPE_PARAMETER),
+		"text/xml"));
+	setPublicid((String) nz(config.getInitParameter(PUBLICID_PARAMETER),
+		getPublicid()));
+	setSystemid((String) nz(config.getInitParameter(SYSTEMID_PARAMETER),
+		getSystemid()));
+	setNamespace((String) nz(config.getInitParameter(NAMESPACE_PARAMETER),
+		getNamespace()));
+    }
+
+    /**
+         * Perform filter chain with xml parsing and transformation. Subclasses
+         * must implement concrete HTML to XML parsing, nesseasary
+         * transformations and serialization.
+         * 
+         * @param chain
+         * @param httpServletRequest
+         * @param httpServletResponse
+         * @throws ServletException
+         * @throws IOException
+         */
+    protected void doXmlFilter(FilterChain chain, HttpServletRequest request,
+	    final HttpServletResponse response) throws IOException,
+	    ServletException {
+	if (log.isDebugEnabled()) {
+	    log.debug("XML filter service start processing request");
+	}
+	FilterServletResponseWrapper servletResponseWrapper = getWrapper(response);
+	// HACK - to avoid MyFaces <f:view> incompabilites and bypass
+        // intermediaty filters
+	// in chain, self-rendered region write directly to wrapper stored in
+        // request-scope attribute.
+	request
+		.setAttribute(RESPONSE_WRAPPER_ATTRIBUTE,
+			servletResponseWrapper);
+	chain.doFilter(request, servletResponseWrapper);
+	HtmlParser parser = null;
+	// setup response
+	// Redirect in AJAX request - convert to special response recognized by
+        // client.
+	String redirectLocation = servletResponseWrapper.getRedirectLocation();
+	String characterEncoding = servletResponseWrapper
+		.getCharacterEncoding();
+	Writer output;
+	if (null != redirectLocation) {
+	    if (isAjaxRequest(request)) {
+		// Special handling of redirect - client-side script must
+		// Check for response and perform redirect by window.location
+		if (log.isDebugEnabled()) {
+		    log.debug("Create AJAX redirect response to url: "
+			    + redirectLocation);
+		}
+		response.reset();
+		// Keep cookies.
+		for (Iterator iter = servletResponseWrapper.getCookies().iterator(); iter.hasNext();) {
+		    Cookie cookie = (Cookie) iter.next();
+		    response.addCookie(cookie);
+		}
+		// Copy response headers
+		Map headers = servletResponseWrapper.getHeaders();
+		for (Iterator iter = headers.entrySet().iterator(); iter
+			.hasNext();) {
+		    Map.Entry header = (Map.Entry) iter.next();
+		    response.setHeader((String) header.getKey(),
+			    (String) header.getValue());
+		}
+		response.setHeader(AjaxContainerRenderer.AJAX_FLAG_HEADER,
+			"redirect");
+		// Not caching AJAX request
+		response.setHeader("Cache-Control",
+			"no-cache, must-revalidate, max_age=0, no-store");
+		response.setHeader("Expires", "0");
+		response.setHeader("Pragma", "no-cache");
+		response.setContentType(getMimetype() + ";charset=UTF-8");
+		response.setHeader(AjaxContainerRenderer.AJAX_LOCATION_HEADER,
+			redirectLocation);
+		output = createResponseWriter(response, "UTF-8");
+		// For buggy XmlHttpRequest realisations repeat headers in
+                // <meta>
+		output.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+			+ "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head>"
+			+ "<meta name=\""
+			+ AjaxContainerRenderer.AJAX_FLAG_HEADER
+			+ "\" content=\"redirect\" />" + "<meta name=\""
+			+ AjaxContainerRenderer.AJAX_LOCATION_HEADER
+			+ "\" content=\"" + redirectLocation + "\" />"
+			+ "</head></html>");
+		output.flush();
+		response.flushBuffer();
+	    } else {
+		response.sendRedirect(redirectLocation);
+	    }
+	    return;
+	} else if ("true".equals(servletResponseWrapper.getHeaders().get(
+		AjaxContainerRenderer.AJAX_FLAG_HEADER))) {
+	    if (log.isDebugEnabled()) {
+		log
+			.debug("Process response to well-formed XML for AJAX XMLHttpRequest parser");
+	    }
+	    // Not caching AJAX request
+	    response.setHeader("Cache-Control",
+		    "no-cache, must-revalidate, max_age=0, no-store");
+	    response.setHeader("Expires", "0");
+	    response.setHeader("Pragma", "no-cache");
+	    // response.setCharacterEncoding(servletResponseWrapper
+	    // .getCharacterEncoding()); //
+                // JSContentHandler.DEFAULT_ENCODING);
+	    // Set the content-type. For AJAX responses default encoding -
+                // UTF8.
+	    // TODO - for null encoding, setup only Output encoding for
+                // filter ?
+	    String outputEncoding = "UTF-8";
+	    String contentType = getMimetype() + ";charset=" + outputEncoding;
+	    response.setContentType(contentType);
+	    parser = getParser(getMimetype(), true);
+	    if (null == parser) {
+		throw new ServletException(Messages.getMessage(
+			Messages.PARSER_NOT_INSTANTIATED_ERROR, contentType));
+	    }
+	    output = createResponseWriter(response, outputEncoding);
+	    parser.setDoctype(getPublicid());
+	    parser.setInputEncoding(characterEncoding);
+	    parser.setOutputEncoding(outputEncoding);
+	    parser.setViewState((String) request
+		    .getAttribute(AjaxViewHandler.SERIALIZED_STATE_KEY));
+	} else {
+	    // setup conversion reules for output contentType, send directly
+                // if content not
+	    // supported by tidy.
+	    String contentType = servletResponseWrapper.getContentType();
+	    if (log.isDebugEnabled()) {
+		log.debug("create HTML/XML parser for content type: "
+			+ contentType);
+	    }
+	    // if(contentType == null){
+	    // contentType = request.getContentType();
+	    // }
+	    if (contentType != null) {
+		if (contentType.indexOf("charset") < 0
+			&& null != characterEncoding) {
+		    contentType += ";charset=" + characterEncoding;
+		}
+		parser = getParser(contentType, false);
+		response.setContentType(contentType);
+	    }
+	    // null or unsupported content type
+	    if (null == parser) {
+		if (log.isDebugEnabled()) {
+		    log
+			    .debug("Parser not have support for the such content type, send response as-is");
+		}
+		try {
+		    if (servletResponseWrapper.isUseWriter()) {
+			output = createResponseWriter(response,
+				characterEncoding);
+			servletResponseWrapper.sendContent(output);
+		    } else if (servletResponseWrapper.isUseStream()) {
+			ServletOutputStream out = response.getOutputStream();
+			servletResponseWrapper.sendContent(out);
+		    }
+		} finally {
+		    // reuseWrapper(servletResponseWrapper);
+		}
+		return;
+	    }
+	    output = createResponseWriter(response, characterEncoding);
+
+	    parser.setInputEncoding(characterEncoding);
+	    parser.setOutputEncoding(characterEncoding);
+	}
+
+	try {
+	    // Setup scripts and styles
+	    parser.setScripts((Set) request
+		    .getAttribute(AjaxContext.SCRIPTS_PARAMETER));
+	    parser.setStyles((Set) request
+		    .getAttribute(AjaxContext.STYLES_PARAMETER));
+	    // Process parsing.
+	    long startTimeMills = System.currentTimeMillis();
+	    servletResponseWrapper.parseContent(output, parser);
+	    if (log.isDebugEnabled()) {
+		startTimeMills = System.currentTimeMillis() - startTimeMills;
+		log.debug(Messages.getMessage(Messages.PARSING_TIME_INFO, ""
+			+ startTimeMills));
+	    }
+	} catch (Exception e) {
+	    throw new ServletException(Messages
+		    .getMessage(Messages.JTIDY_PARSING_ERROR), e);
+	} finally {
+	    reuseParser(parser);
+	}
+    }
+
+    /**
+         * @param response
+         * @return
+         * @throws ServletException
+         */
+    protected FilterServletResponseWrapper getWrapper(
+	    HttpServletResponse response) throws ServletException {
+	return new FilterServletResponseWrapper(response);
+    }
+
+    /**
+         * @param request
+         * @return
+         */
+    protected boolean isAjaxRequest(ServletRequest request) {
+	try {
+	    return null != request
+		    .getParameter(AjaxContainerRenderer.AJAX_PARAMETER_NAME);
+	} catch (Exception e) {
+	    // OCJ 10 - throw exception for static resources.
+	    return false;
+	}
+    }
+
+    /**
+         * @param response
+         * @param characterEncoding
+         * @return
+         * @throws IOException
+         * @throws UnsupportedEncodingException
+         */
+    private Writer createResponseWriter(final HttpServletResponse response,
+	    String characterEncoding) throws IOException,
+	    UnsupportedEncodingException {
+	Writer output;
+	try {
+	    output = response.getWriter();
+	} catch (IllegalStateException e) {
+	    if (null != characterEncoding) {
+		output = new OutputStreamWriter(response.getOutputStream(),
+			characterEncoding);
+	    } else {
+		output = new OutputStreamWriter(response.getOutputStream());
+	    }
+	}
+	return output;
+    }
+
+    protected abstract void reuseParser(HtmlParser parser);
+
+    protected abstract HtmlParser getParser(String mimetype, boolean isAjax);
+
+    /**
+         * @param publicid
+         *                The publicid to set.
+         */
+    protected void setPublicid(String publicid) {
+	this.publicid = publicid;
+    }
+
+    /**
+         * @return Returns the publicid.
+         */
+    public String getPublicid() {
+	return publicid;
+    }
+
+    /**
+         * @param systemid
+         *                The systemid to set.
+         */
+    protected void setSystemid(String systemid) {
+	this.systemid = systemid;
+    }
+
+    /**
+         * @return Returns the systemid.
+         */
+    public String getSystemid() {
+	return systemid;
+    }
+
+    /**
+         * @param namespace
+         *                The namespace to set.
+         */
+    protected void setNamespace(String namespace) {
+	this.namespace = namespace;
+    }
+
+    /**
+         * @return Returns the namespace.
+         */
+    public String getNamespace() {
+	return namespace;
+    }
+
+    /**
+         * @param mimetype
+         *                The mimetype to set.
+         */
+    protected void setMimetype(String mimetype) {
+	this.mimetype = mimetype;
+    }
+
+    /**
+         * @return Returns the mimetype.
+         */
+    protected String getMimetype() {
+	return mimetype;
+    }
+
+    /**
+         * @return Returns the forcexml.
+         */
+    public boolean isForcexml() {
+	return this.forcexml;
+    }
+
+    /**
+         * @param forcexml
+         *                The forcexml to set.
+         */
+    protected void setForcexml(boolean forcexml) {
+	this.forcexml = forcexml;
+    }
+
+    private Object nz(Object param, Object def) {
+	return param != null ? param : def;
+    }
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/CacheContent.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/CacheContent.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/CacheContent.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,277 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.ajax.xmlfilter;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.PrintWriter;
+import java.io.Serializable;
+import java.io.Writer;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import javax.servlet.ServletOutputStream;
+import javax.servlet.http.HttpServletResponse;
+
+import org.ajax4jsf.io.FastBufferOutputStream;
+import org.ajax4jsf.io.FastBufferWriter;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:58:20 $
+ * 
+ */
+public class CacheContent implements Serializable {
+    /**
+         * 
+         */
+    private static final long serialVersionUID = 8120940486890871177L;
+    
+    private static final Log _log = LogFactory.getLog(CacheContent.class);
+
+    // private transient ByteArrayOutputStream outputStream ;
+    private transient FastBufferOutputStream outputStream;
+
+    private transient FastBufferWriter stringOutputWriter;
+
+    private transient PrintWriter servletWriter;
+
+    private transient ServletOutputStream servletStream;
+
+    // content to send.
+    private byte[] content = null;
+
+    private String writerContent = null;
+
+    boolean filledOutputStream = false;
+
+    boolean filledOutputWriter = false;
+
+    private Map headers = new HashMap();
+
+    private String contentType;
+
+    /**
+         * Send saved content to http responce
+         * 
+         * @param response
+         * @throws IOException
+         */
+    public void send(HttpServletResponse response) throws IOException {
+	if (filledOutputStream) {
+	    OutputStream out = response.getOutputStream();
+	    if (content != null) {
+		out.write(content);
+	    } else {
+		this.outputStream.writeTo(out);
+	    }
+	    // out.flush();
+	    // out.close();
+	} else if (filledOutputWriter) {
+	    Writer out = response.getWriter();
+	    if (null != writerContent) {
+		out.write(writerContent);
+	    } else {
+		stringOutputWriter.writeTo(out);
+	    }
+	    // out.flush();
+	    // out.close();
+	}
+    }
+
+    /**
+         * Send saved headers to http responce.
+         * 
+         * @param response
+         */
+    public void sendHeaders(HttpServletResponse response) {
+	for (Iterator iter = headers.entrySet().iterator(); iter.hasNext();) {
+	    Map.Entry element = (Map.Entry) iter.next();
+	    String header = (String) element.getKey();
+	    Object headerValue = element.getValue();
+	    try {
+		if (headerValue instanceof Long) {
+		    Long time = (Long) headerValue;
+		    response.setDateHeader(header, time.longValue());
+		} else if (headerValue instanceof Integer) {
+		    Integer value = (Integer) headerValue;
+		    response.setIntHeader(header, value.intValue());
+		} else {
+		    response.setHeader(header, (String) headerValue);
+		}
+
+	    } catch (Exception e) {
+		_log.error("Error set response header "+header+"for value "+headerValue, e);
+	    } 
+	    // set real content-length.
+	    // / if (null != content) {
+	    if (filledOutputStream) {
+		// / response.setIntHeader("Content-Length", content.length);
+		response.setIntHeader("Content-Length", outputStream
+			.getLength());
+	    } // TODO - calculate content-lenght for writer ?
+	    if (null != contentType) {
+		response.setContentType(this.contentType);
+	    }
+	}
+    }
+
+    public void setDateHeader(String name, long value) {
+	// Expires not stored in cache - must be re-calculated for every
+        // response.
+	if (!"Expires".equals(name)) {
+	    headers.put(name, new Long(value));
+	}
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see org.ajax4jsf.framework.resource.ResourceContext#setHeader(java.lang.String,
+         *      java.lang.String)
+         */
+    public void setHeader(String name, String value) {
+	headers.put(name, value);
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see org.ajax4jsf.framework.resource.ResourceContext#setIntHeader(java.lang.String,
+         *      int)
+         */
+    public void setIntHeader(String name, int value) {
+	headers.put(name, new Integer(value));
+    }
+
+    /**
+         * Create UNIX command 'tee' like stream - send all data to servlet
+         * 
+         * @param responseStream
+         * @return
+         */
+    public OutputStream getOutputStream() {
+	if (null == servletStream) {
+	    outputStream = new FastBufferOutputStream(1024);
+	    servletStream = new ServletOutputStream() {
+
+		/*
+                 * (non-Javadoc)
+                 * 
+                 * @see java.io.OutputStream#close()
+                 */
+		public void close() throws IOException {
+		    filledOutputStream = true;
+		    // / content = outputStream.toByteArray();
+		    content = null;
+		}
+
+		/*
+                 * (non-Javadoc)
+                 * 
+                 * @see java.io.OutputStream#flush()
+                 */
+		public void flush() throws IOException {
+		}
+
+		/*
+                 * (non-Javadoc)
+                 * 
+                 * @see java.io.OutputStream#write(byte[], int, int)
+                 */
+		public void write(byte[] b, int off, int len)
+			throws IOException {
+		    outputStream.write(b, off, len);
+		}
+
+		/*
+                 * (non-Javadoc)
+                 * 
+                 * @see java.io.OutputStream#write(byte[])
+                 */
+		public void write(byte[] b) throws IOException {
+		    outputStream.write(b);
+		}
+
+		public void write(int b) throws IOException {
+		    outputStream.write(b);
+		}
+
+	    };
+	}
+	return servletStream;
+    }
+
+    public PrintWriter getWriter() {
+	if (null == servletWriter) {
+	    stringOutputWriter = new FastBufferWriter(1024);
+	    Writer out = new Writer() {
+
+		public void write(char[] cbuf, int off, int len)
+			throws IOException {
+		    stringOutputWriter.write(cbuf, off, len);
+		}
+
+		public void flush() throws IOException {
+		}
+
+		public void close() throws IOException {
+		    // / writerContent = stringOutputWriter.toString();
+		    filledOutputWriter = true;
+		    writerContent = null;
+		}
+
+	    };
+	    servletWriter = new PrintWriter(out);
+	}
+	return servletWriter;
+    }
+
+    public void setContentType(String contentType) {
+	this.contentType = contentType;
+
+    }
+
+    /**
+         * @return Returns the contentType.
+         */
+    public String getContentType() {
+	return contentType;
+    }
+
+    private void writeObject(java.io.ObjectOutputStream s) throws IOException {
+	if (filledOutputStream) {
+	    if (outputStream != null) {
+		content = outputStream.toByteArray();
+	    }
+	} else if (filledOutputWriter) {
+	    if (stringOutputWriter != null) {
+		char[] cs = stringOutputWriter.toCharArray();
+		writerContent = new String(cs);
+	    }
+	}
+	s.defaultWriteObject();
+    }
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/FilterServletResponseWrapper.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/FilterServletResponseWrapper.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/FilterServletResponseWrapper.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,653 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is XML RenderKit for JSF.
+ *
+ * The Initial Developer of the Original Code is
+ * Orbeon, Inc (info at orbeon.com)
+ * Portions created by the Initial Developer are Copyright (C) 2002
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ */
+package org.ajax4jsf.framework.ajax.xmlfilter;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.PrintWriter;
+import java.io.Reader;
+import java.io.UnsupportedEncodingException;
+import java.io.Writer;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+
+import javax.servlet.ServletOutputStream;
+import javax.servlet.http.Cookie;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpServletResponseWrapper;
+
+import org.ajax4jsf.framework.util.message.Messages;
+import org.ajax4jsf.io.FastBufferInputStream;
+import org.ajax4jsf.io.FastBufferOutputStream;
+import org.ajax4jsf.io.FastBufferReader;
+import org.ajax4jsf.io.FastBufferWriter;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.xml.sax.InputSource;
+
+/**
+ * Base wrapper save JSF page response, for parse to XML with different parsers
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:58:17 $
+ *
+ */
+public class FilterServletResponseWrapper extends HttpServletResponseWrapper {
+	
+	private static  final Log log = LogFactory.getLog(FilterServletResponseWrapper.class);
+
+    public static final String DEFAULT_ENCODING = "UTF-8";
+
+
+    protected FastBufferOutputStream byteStream = null;
+    private ServletOutputStream servletOutputStream;
+    private boolean useStream = false;
+
+    private FastBufferWriter stringWriter;
+    private PrintWriter printWriter;
+    private boolean useWriter = false;
+
+    private String contentType;
+    
+    private String charterEncoding = null;
+
+    private HashMap headers = new HashMap();
+    
+    private int bufferSize = 2048;
+    
+    private int contentLength = Integer.MIN_VALUE;
+    
+    private String redirectLocation = null;
+    
+    private boolean useNullStream = false;
+    
+    private List cookies = new ArrayList();
+
+    public FilterServletResponseWrapper(HttpServletResponse response) {
+        super(response);
+    }
+
+    /**
+     * Convert saved context to stream for parsing
+     * @return stream from saved content
+     */
+    public InputStream getContentAsStream() {
+    	int length = 0;
+    	FastBufferInputStream result = null;    	
+        String encoding = this.getCharacterEncoding() ;
+///        byte[] content;
+        if (isUseStream()) {
+        	try {
+				servletOutputStream.flush();
+			} catch (IOException ex) {
+				log.warn(Messages.getMessage(Messages.FLUSH_BUFFERED_STREAM_ERROR), ex);
+			}
+///			content = byteStream.toByteArray();			
+			result = new FastBufferInputStream(byteStream);			
+        } else if (isUseWriter()) {
+			printWriter.flush();
+			printWriter.close();
+			length = stringWriter.getLength();
+///			String stringContent = stringWriter.toString();
+			try {
+				FastBufferOutputStream stream = stringWriter.convertToOutputStream(encoding);
+				result = new FastBufferInputStream(stream);
+///				content = stringContent.getBytes(encoding);
+			} catch (UnsupportedEncodingException e) {
+				// TODO Auto-generated catch block
+				log.warn(Messages.getMessage(Messages.UNSUPPORTED_ENCODING_WARNING));
+				FastBufferOutputStream stream = stringWriter.convertToOutputStream();
+				result = new FastBufferInputStream(stream);
+///				content = stringContent.getBytes();
+			}
+		} else  {
+            if (log.isDebugEnabled()) {
+            log.debug(Messages.getMessage(Messages.NO_WRITER_CALLED_INFO));
+            }
+            return null;
+        }   	
+///            if (content.length > 0) {
+                if (length > 0) {
+                if (log.isDebugEnabled()) {
+                    log.debug(Messages.getMessage(Messages.PARSE_XML_DOCUMENT_INFO));
+//                    try {
+//						log.debug(new String(content, encoding));
+//					} catch (UnsupportedEncodingException e) {
+//					}
+                }
+            }
+                return result;
+///            return new ByteArrayInputStream(content);
+    }
+    
+    /**
+     * Convert saved context to stream for parsing
+     * @return stream from saved content
+     */
+    public Reader getContentAsReader() {
+    	FastBufferReader result = null;    	
+        String encoding = this.getCharacterEncoding() ;
+///        String content;
+        if (isUseWriter()) {
+			printWriter.flush();
+			printWriter.close();
+			result = new FastBufferReader(stringWriter);
+///			content = stringWriter.toString();
+		} else if (isUseStream()) {
+        	try {
+				servletOutputStream.flush();
+			} catch (IOException ex) {
+				log.warn(Messages.getMessage(Messages.FLUSH_BUFFERED_STREAM_ERROR), ex);
+			}
+			try {
+				FastBufferWriter writer = byteStream.convertToWriter(encoding);
+				result = new FastBufferReader(writer);
+///				content = byteStream.toString(encoding);
+			} catch (UnsupportedEncodingException e) {
+				log.warn(Messages.getMessage(Messages.UNSUPPORTED_ENCODING_WARNING_2), e);
+				FastBufferWriter writer = byteStream.convertToWriter();
+				result = new FastBufferReader(writer);
+///				content = byteStream.toString();
+			}
+        } else  {
+            if (log.isDebugEnabled()) {
+                log.debug(Messages.getMessage(Messages.NO_WRITER_CALLED_INFO));
+                }
+                return null;
+        }   	
+//            if (content.length() > 0) {
+//                if (log.isDebugEnabled()) {
+//                    log.debug("XML document to parse in filter, return as Reader: ");
+//						log.debug(content);
+//                }
+//            }
+///            return new StringReader(content);
+        return result;
+    }
+    
+    public PrintWriter getWriter() throws IOException {
+    	if (useStream) {
+			throw new IllegalStateException(Messages.getMessage(Messages.NO_WRITER_POSSIBLE_ERROR));
+		}
+        if (printWriter == null) {
+            printWriter = new PrintWriter(new ServletStringWriter());
+        }
+        if(log.isDebugEnabled()) {
+        	log.debug(Messages.getMessage(Messages.CREATE_WRITER_INFO));
+        }
+        useWriter = true;
+        return printWriter;
+    }
+
+    public ServletOutputStream getOutputStream() throws IOException {
+    	if (useWriter) {
+    		if (isUseNullStream()) {
+				return new NullServletOutputStream();
+			}
+			throw new IllegalStateException(Messages.getMessage(Messages.NO_STREAM_POSSIBLE_ERROR));
+		}
+        if (servletOutputStream == null) {
+//            byteStream = new ByteArrayOutputStream();
+            servletOutputStream = new ByteArrayServletOutputStream();
+        }
+        if(log.isDebugEnabled()) {
+        	log.debug(Messages.getMessage(Messages.CREATE_STREAM_INFO));
+        }
+        useStream = true;
+        return servletOutputStream;
+    }
+
+
+    public class ByteArrayServletOutputStream extends ServletOutputStream {
+    	
+    	private boolean opened = true;
+
+        /* (non-Javadoc)
+		 * @see java.io.OutputStream#close()
+		 */
+		public void close() throws IOException {
+			flush();
+			opened=false;
+		}
+		
+
+		/* (non-Javadoc)
+		 * @see java.io.OutputStream#write(byte[])
+		 */
+		public void write(byte[] b) throws IOException {
+			// TODO Auto-generated method stub
+			if (opened) {
+				byteStream.write(b);
+			}
+		}
+
+
+		public ByteArrayServletOutputStream() {
+            byteStream = new FastBufferOutputStream(bufferSize);
+        }
+
+        public void write(int b) throws IOException {
+            if (opened) {
+				byteStream.write(b);
+			}
+        }
+
+		/* (non-Javadoc)
+		 * @see java.io.OutputStream#write(byte[], int, int)
+		 */
+		public void write(byte[] b, int off, int len) throws IOException {
+			if (opened) {
+				byteStream.write(b, off, len);
+			}
+		}
+    }
+    
+    public static  class NullServletOutputStream extends ServletOutputStream {
+
+    	
+		/* (non-Javadoc)
+		 * @see java.io.OutputStream#write(byte[], int, int)
+		 */
+		public void write(byte[] b, int off, int len) throws IOException {
+			// this-is null stream, do nothing !
+		}
+
+		/* (non-Javadoc)
+		 * @see java.io.OutputStream#write(byte[])
+		 */
+		public void write(byte[] b) throws IOException {
+			// this-is null stream, do nothing !
+		}
+
+		public void write(int b) throws IOException {
+			// this-is null stream, do nothing !
+			
+		}
+    	
+    }
+    
+    public class ServletStringWriter extends Writer {
+
+    	private boolean opened = true;
+
+    	public ServletStringWriter() {
+			super();
+			stringWriter = new FastBufferWriter(bufferSize); 
+		}
+
+		public void write(char[] cbuf, int off, int len) throws IOException {
+			if (opened) {
+				stringWriter.write(cbuf, off, len); 
+			}			
+		}
+
+		/* (non-Javadoc)
+		 * @see java.io.Writer#write(char[])
+		 */
+		public void write(char[] cbuf) throws IOException {
+			// TODO Auto-generated method stub
+			if (opened) {
+				stringWriter.write(cbuf);
+			}
+		}
+
+		/* (non-Javadoc)
+		 * @see java.io.Writer#write(int)
+		 */
+		public void write(int c) throws IOException {
+			// TODO Auto-generated method stub
+			if (opened) {
+				stringWriter.write(c);
+			}
+		}
+
+		public void flush() throws IOException {
+			stringWriter.flush();
+		}
+		
+		public void close() throws IOException {
+			stringWriter.close();
+			opened = false;
+		}
+    	
+    }
+
+//    public boolean isCommitted() {
+//	    // NOTE: What makes sense here?
+//	    return false;
+//	}
+
+	/**
+     * Return a charset from a content-type.
+     */
+    public static String getContentTypeCharset(String contentType) {
+        if (contentType == null)
+            return null;
+        int semicolumnIndex = contentType.indexOf(";");
+        if (semicolumnIndex == -1)
+            return null;
+        int charsetIndex = contentType.indexOf("charset=", semicolumnIndex);
+        if (charsetIndex == -1)
+            return null;
+        // FIXME: There may be other attributes after charset, right?
+        String afterCharset = contentType.substring(charsetIndex + 8);
+        afterCharset = afterCharset.replace('"', ' ');
+        return afterCharset.trim();
+    }
+    /* (non-Javadoc)
+     * @see javax.servlet.http.HttpServletResponse#addHeader(java.lang.String, java.lang.String)
+     */
+    public void addHeader(String name, String value) {
+    	if("Content-Type".equals(name)){
+    		setContentType(value);
+    	} else {
+    		this.headers.put(name,value);
+    		super.addHeader(name, value);
+    	}
+    }
+    /* (non-Javadoc)
+     * @see javax.servlet.http.HttpServletResponse#setHeader(java.lang.String, java.lang.String)
+     */
+    public void setHeader(String name, String value) {
+    	// HACK - weblogic do not use setContentType, instead directly set header !
+    	if("Content-Type".equals(name)){
+    		setContentType(value);
+    	} else {
+    		this.headers.put(name,value);
+    		super.setHeader(name, value);
+    	}
+    }
+    
+    public Map getHeaders(){
+        return this.headers;
+    }
+    /* (non-Javadoc)
+     * @see javax.servlet.ServletResponse#getCharacterEncoding()
+     */
+    public String getCharacterEncoding() {
+//        return this.charterEncoding;
+         if (null != this.charterEncoding) {
+			return this.charterEncoding;
+		} else {
+		 // For cases of implicit setting
+         return super.getCharacterEncoding();
+		}
+    }
+    /* (non-Javadoc)
+     * @see javax.servlet.ServletResponse#setCharacterEncoding(java.lang.String)
+     */
+    public void setCharacterEncoding(String charset) {
+        this.charterEncoding = charset;
+        //super.setCharacterEncoding(charset);
+    }
+    public void setContentType(String type) {
+        String contentTypeCharset = getContentTypeCharset(type);
+		if (null != contentTypeCharset) {
+			this.charterEncoding = contentTypeCharset;
+		}
+        this.contentType = type;
+//        super.setContentType(type);
+    }
+    public void setLocale(Locale loc) {
+        super.setLocale(loc);
+    }
+
+    public String getContentType() {
+		return contentType;
+	}
+    
+	/**
+	 * Send buffered content directly to output stream.
+	 * @param outputStream
+	 * @throws IOException 
+	 */
+	public void sendContent(ServletOutputStream outputStream) throws IOException {
+		if(getContentLength() >0 ){
+			super.setContentLength(getContentLength());
+		}
+        if (isUseWriter()) {
+			printWriter.flush();
+			printWriter.close();
+			stringWriter.printTo(outputStream);
+///			outputStream.print(stringWriter.toString());
+		} else if (isUseStream()) {
+        	try {
+				servletOutputStream.flush();
+			} catch (IOException ex) {
+				log.warn(Messages.getMessage(Messages.FLUSH_BUFFERED_STREAM_ERROR), ex);
+			}
+        	byteStream.writeTo(outputStream);
+        }
+	}
+
+	/**
+	 * Send buffered content directly to output stream.
+	 * @param outputStream
+	 * @throws IOException 
+	 */
+	public void sendContent(Writer output) throws IOException {
+		if(getContentLength() >0 ){
+			super.setContentLength(getContentLength());
+		}
+        if (isUseWriter()) {
+			printWriter.flush();
+			printWriter.close();
+			stringWriter.writeTo(output);
+///			outputStream.print(stringWriter.toString());
+		} else if (isUseStream()) {
+        	try {
+				servletOutputStream.flush();
+			} catch (IOException ex) {
+				log.warn(Messages.getMessage(Messages.FLUSH_BUFFERED_STREAM_ERROR), ex);
+			}
+        	byteStream.writeTo(output,getCharacterEncoding());
+        }
+	}
+	/**
+	 * @return Returns the useStream.
+	 */
+	public boolean isUseStream() {
+		return this.useStream;
+	}
+
+	/**
+	 * @return Returns the useWriter.
+	 */
+	public boolean isUseWriter() {
+		return this.useWriter;
+	}
+
+	/**
+	 * @return
+	 * @throws RuntimeException
+	 */
+	public InputSource getContentAsInputSource() throws RuntimeException {
+		// Create InputSource
+		InputSource inputSource = null;
+		String encoding = this.getCharacterEncoding() ;
+		if(isUseWriter()) {
+			inputSource = new InputSource(getContentAsReader());
+		} else if(isUseStream()) {
+		inputSource = new InputSource(getContentAsStream());
+		        if (encoding != null)
+		            inputSource.setEncoding(encoding);
+		} else {
+            if (log.isDebugEnabled()) {
+                log.debug(Messages.getMessage(Messages.NO_WRITER_CALLED_INFO));
+                }
+                return null;
+		}
+		return inputSource;
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.servlet.ServletResponseWrapper#flushBuffer()
+	 */
+	public void flushBuffer() throws IOException {
+		if(isUseStream()){
+			servletOutputStream.flush();
+		} else if(isUseWriter()){
+			printWriter.flush();
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.servlet.ServletResponseWrapper#getBufferSize()
+	 */
+	public int getBufferSize() {
+		// TODO Auto-generated method stub
+		return bufferSize;
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.servlet.ServletResponseWrapper#resetBuffer()
+	 */
+	public void resetBuffer() {
+		this.printWriter = null;
+		this.stringWriter = null;
+		this.servletOutputStream = null;
+		this.byteStream = null;
+		this.useStream = false;
+		this.useWriter = false;
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.servlet.ServletResponseWrapper#setBufferSize(int)
+	 */
+	public void setBufferSize(int arg0) {
+		// TODO Auto-generated method stub
+		bufferSize = arg0;
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.servlet.ServletResponseWrapper#reset()
+	 */
+	public void reset() {
+		// TODO Auto-generated method stub
+		this.resetBuffer();
+		this.headers = new HashMap();
+		this.contentType=null;
+		this.charterEncoding=null;
+		super.reset();
+	}
+
+	/**
+	 * @return Returns the contentLength.
+	 */
+	public int getContentLength() {
+		return contentLength;
+	}
+
+	/**
+	 * @param contentLength The contentLength to set.
+	 */
+	public void setContentLength(int contentLength) {
+		this.contentLength = contentLength;
+	}
+
+	/**
+	 * Parse saved content to output stream ( and store as Dom Document tree )
+	 * @param out stream to send parsed content, if null - only build dom tree.
+	 * @return parsed document as dom tree.
+	 * @throws IOException 
+	 */
+	public void parseContent(Writer out,HtmlParser parser) throws IOException {
+		parser.setInputEncoding(getCharacterEncoding());
+		if (isUseWriter()) {
+			parser.parseHtml(getContentAsReader(),out);
+		} else if(isUseStream()){
+			parser.parseHtml(getContentAsStream(),out);
+		}
+	}
+
+	public void sendRedirect(String arg0) throws IOException {
+		// TODO Auto-generated method stub
+		this.redirectLocation = arg0;
+	}
+
+	public String getRedirectLocation() {
+		return redirectLocation;
+	}
+
+	/**
+	 * @return the useNullStream
+	 */
+	public boolean isUseNullStream() {
+		return useNullStream;
+	}
+
+	/**
+	 * @param useNullStream the useNullStream to set
+	 */
+	public void setUseNullStream(boolean useNullStream) {
+		this.useNullStream = useNullStream;
+	}
+	
+	
+	
+	public void addCookie(Cookie cookie) {
+	    cookies.add(cookie);
+	    super.addCookie(cookie);
+	}
+	
+	public Collection getCookies() {
+	    return cookies;
+	}
+	
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/HtmlParser.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/HtmlParser.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/HtmlParser.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,69 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.ajax.xmlfilter;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Reader;
+import java.io.Writer;
+import java.util.Set;
+
+public interface HtmlParser {
+
+	public abstract void parseHtml(InputStream input, Writer output)
+			throws IOException;
+
+	public abstract void parseHtml(Reader input, Writer output)
+	throws IOException;
+	/**
+	 * @param encoding
+	 */
+	public abstract void setInputEncoding(String encoding);
+
+	/**
+	 * @param encoding
+	 */
+	public abstract void setOutputEncoding(String encoding);
+	/**
+	 * Setup, must tidy move style etc. elements to head or not.
+	 * @param move
+	 */
+	public abstract void setMoveElements(boolean move);
+
+	/**
+	 * @param scripts The scripts to set.
+	 */
+	public abstract void setScripts(Set scripts);
+
+	/**
+	 * @param styles The styles to set.
+	 */
+	public abstract void setStyles(Set styles);
+
+	public abstract void setDoctype(String doctype);
+
+	/**
+	 * @param viewState The viewState to set.
+	 */
+	public abstract void setViewState(String viewState);
+
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/Log4JConfigurator.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/Log4JConfigurator.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/Log4JConfigurator.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,75 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.ajax.xmlfilter;
+
+import java.util.Properties;
+
+import org.ajax4jsf.framework.util.message.Messages;
+import org.apache.log4j.LogManager;
+import org.apache.log4j.helpers.LogLog;
+import org.apache.log4j.helpers.OptionConverter;
+import org.apache.log4j.xml.DOMConfigurator;
+
+/**
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:58:18 $
+ *
+ */
+class Log4JConfigurator {
+	private static final String CONTEXT_ROOT_VARIABLE = "context-root";
+	private Properties props = new Properties();
+	private String prefix;
+	
+	DOMConfigurator domConfig;
+	
+	void doConfigure(String file){
+		domConfig.doConfigure(prefix + file, LogManager.getLoggerRepository());
+	}
+
+
+	/**
+	 * @param prefix
+	 */
+	public Log4JConfigurator(String prefix) {
+		this.prefix = prefix;
+		props.setProperty(CONTEXT_ROOT_VARIABLE, prefix);
+		domConfig = new DOMConfigurator() {
+
+			/*
+			 * (non-Javadoc)
+			 * 
+			 * @see org.apache.log4j.xml.DOMConfigurator#subst(java.lang.String)
+			 *      append context-related properties for variable
+			 *      substitution.
+			 */
+			protected String subst(String value) {
+				try {
+					return OptionConverter.substVars(value, props);
+				} catch (IllegalArgumentException e) {
+					LogLog.warn(Messages.getMessage(Messages.VARIABLE_SUBSTITUTION_WARNING), e);
+					return value;
+				}
+			};
+
+		};
+		}
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/NekkoFilter.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/NekkoFilter.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/NekkoFilter.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,50 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.ajax.xmlfilter;
+
+import org.ajax4jsf.framework.ajax.xmlfilter.nekko.NekkoXMLFilter;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+
+/**
+ * This class implements a simple Servlet filter that convert basic html
+ * output of JSF to valid XML or JavaScript, for parsing different versions
+ * of XmlHttpRequest's on client side.
+  */
+public class NekkoFilter extends BaseFilter implements javax.servlet.Filter {
+	static final Log log = LogFactory.getLog(NekkoFilter.class);
+	
+	/**
+	 * 
+	 */
+	public NekkoFilter() {
+		super();
+		// default - not force
+//		setForcexml(false);
+		xmlFilter = new NekkoXMLFilter();
+		xmlFilter.setFilter(this);
+	}
+
+} 
+
+

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/PollEventsManager.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/PollEventsManager.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/PollEventsManager.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,64 @@
+/**
+ * 
+ */
+package org.ajax4jsf.framework.ajax.xmlfilter;
+
+import java.io.Serializable;
+import java.util.Map;
+import java.util.Properties;
+
+import javax.faces.FacesException;
+import javax.servlet.ServletContext;
+
+import org.ajax4jsf.ajax.PushEventsCounter;
+import org.ajax4jsf.cache.Cache;
+import org.ajax4jsf.cache.CacheConfigurationLoader;
+import org.ajax4jsf.cache.CacheException;
+import org.ajax4jsf.cache.CacheFactory;
+import org.ajax4jsf.cache.CacheLoader;
+import org.ajax4jsf.cache.CacheManager;
+import org.ajax4jsf.cache.ServletContextInitMap;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class PollEventsManager implements Serializable, CacheLoader, CacheConfigurationLoader {
+
+    public static final String EVENTS_MANAGER_KEY=PollEventsManager.class.getName();
+
+    private Cache cache;
+    
+    public void init(ServletContext servletContext) {
+	    try {
+		CacheManager cacheManager = CacheManager.getInstance();
+		Map env = new ServletContextInitMap(servletContext);
+		CacheFactory cacheFactory = cacheManager.getCacheFactory(env);
+		this.cache = cacheFactory.createCache(env, this, this);
+		servletContext.setAttribute(EVENTS_MANAGER_KEY, this);
+	} catch (CacheException e) {
+		throw new FacesException(e.getMessage(), e);
+	}
+
+    }
+    
+    public PushEventsCounter getListener(String key){
+	if(null == cache){
+	    throw new FacesException("Poll events manager not initialized");	    
+	}
+	try {
+	    return (PushEventsCounter) cache.get(key, null);
+	} catch (CacheException e) {
+	    throw new FacesException("error get push events listener for key "+key,e);
+	}
+    }
+
+    public Object load(Object key, Object context) throws CacheException {
+	// TODO Auto-generated method stub
+	return new PushEventsCounter();
+    }
+
+    public Properties loadProperties(String name) {
+	return new Properties();
+    }
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/ServletStreamWriter.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/ServletStreamWriter.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/ServletStreamWriter.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,111 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.ajax.xmlfilter;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.servlet.ServletOutputStream;
+
+/**
+ * HACK - for case if servlet response already use Writer, create wrapper to stream -
+ * since most of serializers use outputStream. In future, must be replaced by Dual serialization
+ * capabilites.
+ * @author shura
+ *
+ */
+final class ServletStreamWriter extends ServletOutputStream {
+	
+	private PrintWriter _writer;
+	
+	private byte[] buff = new byte[1024];
+	
+	private int point = 0;
+
+	private String _charset;
+
+	/**
+	 * @param writer
+	 * @param charset
+	 */
+	public ServletStreamWriter(PrintWriter writer, String charset) {
+		super();
+		// TODO Auto-generated constructor stub
+		_writer = writer;
+		_charset = charset;
+	}
+
+	public ServletStreamWriter(PrintWriter writer) {
+		this._writer = writer;
+	}
+
+	public void write(int b) throws IOException {
+		buff[point++]=(byte) b;
+		if(point==buff.length){
+			point = 0;
+			String string = null==_charset?new String(buff):new String(buff,_charset);
+			_writer.write(string);
+		}
+	}
+
+	/**
+	 * @return Returns the charset.
+	 */
+	public String getCharset() {
+		return _charset;
+	}
+
+	/**
+	 * @param charset The charset to set.
+	 */
+	public void setCharset(String charset) {
+		_charset = charset;
+	}
+
+	/* (non-Javadoc)
+	 * @see java.io.OutputStream#close()
+	 */
+	public void close() throws IOException {
+		this.flush();
+		super.close();
+	}
+
+	/* (non-Javadoc)
+	 * @see java.io.OutputStream#flush()
+	 */
+	public void flush() throws IOException {
+		if(point>0){
+			String string = null==_charset?new String(buff,0,point):new String(buff,0,point,_charset);
+			_writer.write(string);
+			point = 0;			
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see java.io.OutputStream#write(byte[], int, int)
+	 */
+	public void write(byte[] b, int off, int len) throws IOException {
+		this.flush();
+		String string = null==_charset?new String(b,off,len):new String(b,off,len,_charset);
+		_writer.write(string);
+	}
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/TidyFilter.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/TidyFilter.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/TidyFilter.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,44 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.ajax.xmlfilter;
+
+import org.ajax4jsf.framework.ajax.xmlfilter.tidy.TidyXMLFilter;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+
+/**
+ * Convert Html Output to XML using Jtidy.
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:58:20 $
+ */
+public class TidyFilter extends BaseFilter {
+	static final Log log = LogFactory.getLog(TidyFilter.class);
+	
+	public TidyFilter() {
+		// For Tidy, publicId can be pre-defined omit | auto | strict | loose | ignore | [fpi]
+		xmlFilter = new TidyXMLFilter();
+		xmlFilter.setFilter(this);
+		xmlFilter.setPublicid("omit");		
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/XMLResponseWriterState.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/XMLResponseWriterState.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/XMLResponseWriterState.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,134 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.ajax.xmlfilter;
+
+import java.io.IOException;
+
+import javax.faces.component.UIComponent;
+
+import org.ajax4jsf.framework.util.message.Messages;
+
+/**
+ * @author shura Class to implement state pattern for
+ *         <code>ResponceWriter</code> Real states must extend this. By
+ *         default, block any events, ignore output.
+ *  
+ */
+class XMLResponseWriterState {
+    // private ResponseWriter writer;
+    /**
+     * @throws java.io.IOException
+     */
+	private static final String ILLEGAL_METOD_STATE = Messages.getMessage(Messages.ILLEGAL_METHOD_STATE);
+	
+    void endDocument() throws IOException {
+        throw new IOException(ILLEGAL_METOD_STATE);
+    }
+
+    /**
+     * @param name
+     * @throws java.io.IOException
+     */
+    void endElement(String name) throws IOException {
+        throw new IOException(ILLEGAL_METOD_STATE);
+    }
+
+    /**
+     * @throws java.io.IOException
+     */
+    void startDocument() throws IOException {
+        throw new IOException(ILLEGAL_METOD_STATE);
+    }
+
+    /**
+     * @param name
+     * @param component
+     * @throws java.io.IOException
+     */
+    void startElement(String name, UIComponent component) throws IOException {
+        throw new IOException(ILLEGAL_METOD_STATE);
+    }
+
+    /**
+     * @param name
+     * @param value
+     * @param property
+     * @throws java.io.IOException
+     */
+    void writeAttribute(String name, Object value, String property)
+            throws IOException {
+        throw new IOException(ILLEGAL_METOD_STATE);
+    }
+
+    /**
+     * @param comment
+     * @throws java.io.IOException
+     */
+    void writeComment(Object comment) throws IOException {
+        throw new IOException(ILLEGAL_METOD_STATE);
+    }
+
+    /**
+     * @param text
+     * @param off
+     * @param len
+     * @throws java.io.IOException
+     */
+    void writeText(char[] text, int off, int len) throws IOException {
+        throw new IOException(ILLEGAL_METOD_STATE);
+    }
+
+    /**
+     * @param text
+     * @param property
+     * @throws java.io.IOException
+     */
+    void writeText(Object text, String property) throws IOException {
+        throw new IOException(ILLEGAL_METOD_STATE);
+    }
+
+    /**
+     * @param name
+     * @param value
+     * @param property
+     * @throws java.io.IOException
+     */
+    void writeURIAttribute(String name, Object value, String property)
+            throws IOException {
+        throw new IOException(ILLEGAL_METOD_STATE);
+    }
+
+    /**
+     * 
+     * Main hook for realise <code>Writer</code>. In document writed as
+     * comment, outside of document do nothing ....
+     * 
+     * @param cbuf
+     * @param off
+     * @param len
+     * @throws IOException
+     */
+    void write(char[] cbuf, int off, int len) throws IOException {
+        // DO NOTHING
+
+    }
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/nekko/HtmlCorrectionFilter.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/nekko/HtmlCorrectionFilter.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/nekko/HtmlCorrectionFilter.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,166 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.ajax.xmlfilter.nekko;
+
+import org.apache.xerces.util.XMLAttributesImpl;
+import org.apache.xerces.xni.Augmentations;
+import org.apache.xerces.xni.QName;
+import org.apache.xerces.xni.XMLAttributes;
+import org.apache.xerces.xni.XNIException;
+import org.apache.xerces.xni.parser.XMLComponentManager;
+import org.apache.xerces.xni.parser.XMLConfigurationException;
+import org.cyberneko.html.HTMLAugmentations;
+import org.cyberneko.html.filters.DefaultFilter;
+
+/**
+ * Fix common DHTML incompabilites for html - insert ommited tbody tag in tables.
+ * @author shura
+ *
+ */
+public class HtmlCorrectionFilter extends DefaultFilter{
+	
+	private HtmlCorrectionState _state;
+	
+
+	/**
+	 * 
+	 */
+	public HtmlCorrectionFilter() {
+		super();
+		_state = new BaseHtmlCorrectionState(null);
+	}
+	
+	public void reset(XMLComponentManager componentManager)
+	        throws XMLConfigurationException {
+	    super.reset(componentManager);
+	    _state = new BaseHtmlCorrectionState(null);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.cyberneko.html.filters.DefaultFilter#endElement(org.apache.xerces.xni.QName, org.apache.xerces.xni.Augmentations)
+	 */
+	public void endElement(QName element, Augmentations augs) throws XNIException {
+		_state.endElement(element,augs);
+		super.endElement(element, augs);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.cyberneko.html.filters.DefaultFilter#startElement(org.apache.xerces.xni.QName, org.apache.xerces.xni.XMLAttributes, org.apache.xerces.xni.Augmentations)
+	 */
+	public void startElement(QName element, XMLAttributes attributes, Augmentations augs) throws XNIException {
+		_state.startElement(element,attributes,augs);
+		super.startElement(element, attributes, augs);
+	}
+	
+	 void insertStartElement(String name, QName base) {
+	        QName element = createQName(name, base);
+		XMLAttributes attrs = new XMLAttributesImpl();
+		Augmentations augs = new HTMLAugmentations();
+		super.startElement(element,attrs,augs);
+	}
+
+	/**
+	 * @param name
+	 * @param base
+	 * @return
+	 */
+	private QName createQName(String name, QName base) {
+	    String prefix = base.prefix;
+	    String rawname = null != prefix && (!"".equals(prefix))? prefix+':'+name:name; 
+	    QName element = new QName(prefix,name,rawname,base.uri);
+	    return element;
+	}
+	
+	
+	 void  insertEndElement(String name, QName base) {
+	        QName element = createQName(name, base);
+		Augmentations augs = new HTMLAugmentations();
+		super.endElement(element,augs);
+	}
+	
+	private class BaseHtmlCorrectionState implements HtmlCorrectionState {
+		private int depth = 0;
+		private HtmlCorrectionState previsiosState;
+		/**
+		 * @param previsiosState
+		 */
+		public BaseHtmlCorrectionState(HtmlCorrectionState previsiosState) {
+			super();
+			// TODO Auto-generated constructor stub
+			this.previsiosState = previsiosState;
+		}
+		public void endElement(QName element, Augmentations augs) throws XNIException {
+			depth--;
+			if(depth<0 && previsiosState != null){
+				_state = previsiosState;
+			}
+		}
+		
+		public void startElement(QName element, XMLAttributes attributes, Augmentations augs) throws XNIException {
+			if(element.rawname.equalsIgnoreCase("table")){
+				_state = new TableHtmlCorrectionState(this);
+			} else {
+			    depth++;
+			}
+		}
+		
+	
+	}
+	private class TableHtmlCorrectionState implements HtmlCorrectionState {
+		private int depth = 0;
+		private boolean inTbody = false;
+		private HtmlCorrectionState previsiosState;
+		/**
+		 * @param previsiosState
+		 */
+		public TableHtmlCorrectionState(HtmlCorrectionState previsiosState) {
+			super();
+			// TODO Auto-generated constructor stub
+			this.previsiosState = previsiosState;
+		}
+		
+		public void endElement(QName element, Augmentations augs) throws XNIException {
+				if (inTbody) {
+					insertEndElement("tbody", element);
+				}
+				_state = previsiosState;
+		}
+		
+		public void startElement(QName element, XMLAttributes attributes, Augmentations augs) throws XNIException {
+			if(element.rawname.equalsIgnoreCase("tr")){
+				if(!inTbody){
+					inTbody = true;
+					insertStartElement("tbody", element);
+				}
+			} else {
+				if (inTbody) {
+					insertEndElement("tbody", element);
+					inTbody = false;
+				}
+			}
+			_state = new BaseHtmlCorrectionState(this);
+		}
+		
+	
+	}
+
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/nekko/HtmlCorrectionState.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/nekko/HtmlCorrectionState.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/nekko/HtmlCorrectionState.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,33 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.ajax.xmlfilter.nekko;
+
+import org.apache.xerces.xni.Augmentations;
+import org.apache.xerces.xni.QName;
+import org.apache.xerces.xni.XMLAttributes;
+import org.apache.xerces.xni.XNIException;
+
+public interface HtmlCorrectionState {
+	
+	public void endElement(QName element, Augmentations augs) throws XNIException;
+	public void startElement(QName element, XMLAttributes attributes, Augmentations augs) throws XNIException;
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/nekko/NekkoParser.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/nekko/NekkoParser.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/nekko/NekkoParser.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,644 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.ajax.xmlfilter.nekko;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.PrintWriter;
+import java.io.Reader;
+import java.io.StringReader;
+import java.util.Iterator;
+import java.util.Properties;
+import java.util.Set;
+
+import javax.servlet.ServletException;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.ajax4jsf.framework.ajax.AjaxViewHandler;
+import org.ajax4jsf.framework.ajax.xmlfilter.HtmlParser;
+import org.ajax4jsf.xml.serializer.Method;
+import org.ajax4jsf.xml.serializer.OutputPropertiesFactory;
+import org.ajax4jsf.xml.serializer.Serializer;
+import org.ajax4jsf.xml.serializer.SerializerFactory;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.html.dom.HTMLDocumentImpl;
+import org.apache.xerces.parsers.AbstractSAXParser;
+import org.apache.xerces.util.XMLAttributesImpl;
+import org.apache.xerces.xni.Augmentations;
+import org.apache.xerces.xni.QName;
+import org.apache.xerces.xni.XMLAttributes;
+import org.apache.xerces.xni.XMLString;
+import org.apache.xerces.xni.XNIException;
+import org.apache.xerces.xni.parser.XMLComponentManager;
+import org.apache.xerces.xni.parser.XMLConfigurationException;
+import org.apache.xerces.xni.parser.XMLDocumentFilter;
+import org.cyberneko.html.HTMLAugmentations;
+import org.cyberneko.html.HTMLConfiguration;
+import org.cyberneko.html.filters.DefaultFilter;
+import org.cyberneko.html.filters.ElementRemover;
+import org.cyberneko.html.filters.Purifier;
+import org.cyberneko.html.filters.Writer;
+import org.cyberneko.html.parsers.DOMFragmentParser;
+import org.w3c.dom.Document;
+import org.w3c.dom.DocumentFragment;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+/**
+ * @author shura
+ *
+ */
+public class NekkoParser  implements HtmlParser {
+
+	private static final Log _log = LogFactory.getLog(NekkoParser.class);
+	
+	private HtmlSAXParser _parser;
+	
+//	private HtmlWriter _writer= new HtmlWriter();
+	
+	private ElementRemover remover = new ElementRemover();
+	
+	private XMLDocumentFilter[] _filters = { new ViewStateFilter()/*,remover */, new HtmlCorrectionFilter(), new Purifier() /*, _writer*/ };
+
+	private DOMFragmentParser viewStateParser ;//= new DOMFragmentParser();
+
+	private Document viewStateDocument ;//= new HTMLDocumentImpl();
+
+	private DocumentFragment fragment = null;
+
+	private Set _scripts;
+	
+	private Set _styles;
+	
+	private String _viewState;
+	
+	private String _encoding;
+
+	private Serializer _serializer;
+
+	private String _publicId = "-//W3C//DTD XHTML 1.0 Transitional//EN";
+	private String _systemid = "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";
+	private String _namespace = "http://www.w3.org/1999/xhtml";
+
+	private String _outputEncoding;
+	/**
+	 * 
+	 */
+	public NekkoParser() {
+		_parser=new HtmlSAXParser(getHtmlConfig());
+		Properties properties = OutputPropertiesFactory.getDefaultMethodProperties(Method.XHTML);
+//		properties.put("encoding",_encoding);
+		_serializer = SerializerFactory.getSerializer(properties);
+//		serializer.setOutputStream(output);
+//		_parser.setContentHandler(serializer.asContentHandler());
+		viewStateParser = new DOMFragmentParser();
+		// Set parser features
+		try {
+			viewStateParser.setProperty(
+					"http://cyberneko.org/html/properties/names/elems",
+					"lower");
+		viewStateParser.setProperty(
+				"http://cyberneko.org/html/properties/names/attrs",
+				"lower");
+		} catch (SAXException e) {
+			_log.error("Exception in DOM parser configuration", e);
+		}		
+		try {
+			// Create Document Builder Factory
+			DocumentBuilderFactory docFactory = DocumentBuilderFactory
+			.newInstance();
+			// Create Document Builder
+			DocumentBuilder docBuilder = docFactory.newDocumentBuilder();
+			viewStateDocument = docBuilder.newDocument();
+		} catch (ParserConfigurationException e) {
+			viewStateDocument = new HTMLDocumentImpl();
+			_log.error("Error on create DOM Document by JAXP, use Xerxes implementation. Check JAXP configuration ",e);
+		}
+//		viewStateDocument = new HTMLDocumentImpl();
+		remover.removeElement("style");
+	}
+	
+	/**
+	 * Reset parser state
+	 */
+	public void reset(){
+		_scripts=null;
+		_styles=null;
+		_viewState=null;
+		_parser.reset();
+		_serializer.reset();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.ajax.xmlfilter.HtmlParser#parseHtml(java.io.InputStream, java.io.OutputStream)
+	 */
+	public void parseHtml(InputStream input, java.io.Writer output)
+			throws IOException {
+		InputSource src = new InputSource(input);
+		parseSAXSource(src,output);
+	}
+
+	private void parseSAXSource(InputSource src, java.io.Writer output) throws IOException {
+//		PrintWriter printWriter = null;
+		fragment = null;
+		if(null != _viewState){
+			fragment = viewStateDocument.createDocumentFragment();
+			try {
+				viewStateParser.parse(new InputSource(new StringReader(
+						_viewState)), fragment);
+			} catch (Exception e) {
+				fragment = null;
+			}
+			// TODO - parse view state to DOM Fragment.
+		}
+		try {
+			_parser.setProperty("http://cyberneko.org/html/properties/default-encoding",
+													_encoding);
+			Properties properties = _serializer.getOutputFormat();
+			properties.put("encoding",_outputEncoding);
+			_serializer.setOutputFormat(properties);
+			_serializer.setWriter(output);
+//			_serializer.setOutputStream(new OutputStream(){
+//
+//				public void write(int b) throws IOException {
+//					// TODO Auto-generated method stub
+//					
+//				}});
+			_parser.setContentHandler(_serializer.asContentHandler());
+//			printWriter = new PrintWriter(output);
+//			_writer.setWriter(printWriter);
+//			_writer.setEncoding(_encoding);
+			_parser.parse(src);
+		} catch (SAXException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		} finally {
+//			_writer.setWriter(null);
+//			if(null != printWriter){
+//				printWriter.flush();
+//				printWriter.close();
+//			}
+			
+		}
+		
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.ajax.xmlfilter.HtmlParser#parseHtml(java.io.Reader, java.io.OutputStream)
+	 */
+	public void parseHtml(Reader input, java.io.Writer output) throws IOException {
+		InputSource src = new InputSource(input);
+		parseSAXSource(src,output);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.ajax.xmlfilter.HtmlParser#setEncoding(java.lang.String)
+	 */
+	public void setInputEncoding(String encoding) {
+		_encoding = encoding;
+	}
+
+	public void setOutputEncoding(String encoding) {
+		_outputEncoding = encoding;
+	}
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.ajax.xmlfilter.HtmlParser#setMoveElements(boolean)
+	 */
+	public void setMoveElements(boolean move) {
+		// TODO Auto-generated method stub
+
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.ajax.xmlfilter.HtmlParser#setScripts(java.util.Set)
+	 */
+	public void setScripts(Set scripts) {
+		_scripts = scripts;
+
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.ajax.xmlfilter.HtmlParser#setStyles(java.util.Set)
+	 */
+	public void setStyles(Set styles) {
+		_styles = styles;
+
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.ajax.xmlfilter.HtmlParser#setDoctype(java.lang.String)
+	 */
+	public void setDoctype(String doctype) {
+		this._publicId = doctype;
+
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.ajax.xmlfilter.HtmlParser#setViewState(java.lang.String)
+	 */
+	public void setViewState(String viewState) {
+		_viewState = viewState;
+
+	}
+	
+	private  static class HtmlSAXParser extends AbstractSAXParser {
+		/** Default constructor. 
+		 * @throws ServletException */
+		public HtmlSAXParser(HTMLConfiguration config)  {
+		    super(config);
+		    
+		    }
+	}
+	
+	private class ViewStateFilter extends DefaultFilter{
+		private boolean haveHtml = false;
+		private boolean haveHead = false;
+		private boolean headParsed = false;
+		private int stateMarkerLevel = -1;
+
+
+
+		/* (non-Javadoc)
+		 * @see org.cyberneko.html.filters.DefaultFilter#reset(org.apache.xerces.xni.parser.XMLComponentManager)
+		 */
+		public void reset(XMLComponentManager componentManager) throws XMLConfigurationException {
+			haveHead = false;
+			haveHtml = false;
+			headParsed = false;
+			stateMarkerLevel = -1;
+			super.reset(componentManager);
+		}
+
+
+		/* (non-Javadoc)
+		 * @see org.cyberneko.html.filters.DefaultFilter#startElement(org.apache.xerces.xni.QName, org.apache.xerces.xni.XMLAttributes, org.apache.xerces.xni.Augmentations)
+		 */
+		public void startElement(QName element, XMLAttributes attributes, Augmentations augs) throws XNIException {
+			if(stateMarkerLevel >=0){
+				stateMarkerLevel++;
+				if(null != fragment){
+					return;
+				}
+			}
+			if (!headParsed) {
+				if("html".equalsIgnoreCase(element.rawname)){
+					haveHtml = true;
+				} else if("head".equalsIgnoreCase(element.rawname)){
+					haveHead = true;
+					super.startElement(element, attributes, augs);
+					insertResources();
+					return;
+				} else {
+					if(!haveHtml){
+						insertStartElement("html");
+					}
+					insertStartElement("head");
+					insertResources();
+					insertEndElement("head");
+				}
+
+			}
+			if(isStateMarker(element, attributes)){
+				stateMarkerLevel = 0;
+				return;
+			};
+			super.startElement(element, attributes, augs);
+		}
+
+
+		/* (non-Javadoc)
+		 * @see org.cyberneko.html.filters.DefaultFilter#characters(org.apache.xerces.xni.XMLString, org.apache.xerces.xni.Augmentations)
+		 */
+		public void characters(XMLString text, Augmentations augs) throws XNIException {
+			if(stateMarkerLevel >=0){
+				if(null != fragment){
+					return;
+				}
+			}
+			super.characters(text, augs);
+		}
+
+
+		/* (non-Javadoc)
+		 * @see org.cyberneko.html.filters.DefaultFilter#endElement(org.apache.xerces.xni.QName, org.apache.xerces.xni.Augmentations)
+		 */
+		public void endElement(QName element, Augmentations augs) throws XNIException {
+			if(stateMarkerLevel >=0){
+				stateMarkerLevel--;
+				if(null != fragment || stateMarkerLevel == -1){
+					return;
+				}
+			}
+			super.endElement(element, augs);
+		}
+
+
+		private void insertResources() {
+			headParsed = true;
+			if(null != _styles){
+				for (Iterator iter = _styles.iterator(); iter.hasNext();) {
+					String style = (String) iter.next();
+					QName element = new QName(null,"link","link",null);
+					XMLAttributes attrs = new XMLAttributesImpl();
+					attrs.addAttribute(new QName(null,"href","href",null), "CDATA", style);
+					attrs.addAttribute(new QName(null,"type","type",null), "CDATA", "text/css");
+					attrs.addAttribute(new QName(null,"rel","rel",null), "CDATA", "stylesheet");
+					Augmentations augs = new HTMLAugmentations();
+					super.emptyElement(element,attrs,augs);
+				}
+			}
+			if(null != _scripts){
+				for (Iterator iter = _scripts.iterator(); iter.hasNext();) {
+					String script = (String) iter.next();
+					QName element = new QName(null,"script","script",null);
+					XMLAttributes attrs = new XMLAttributesImpl();
+					attrs.addAttribute(new QName(null,"src","src",null), "CDATA", script);
+					attrs.addAttribute(new QName(null,"type","type",null), "CDATA", "text/javascript");
+					Augmentations augs = new HTMLAugmentations();
+					super.startElement(element,attrs,augs);
+					super.endElement(element, augs);
+				}
+			}
+			
+		}
+
+
+		/* (non-Javadoc)
+		 * @see org.cyberneko.html.filters.DefaultFilter#emptyElement(org.apache.xerces.xni.QName, org.apache.xerces.xni.XMLAttributes, org.apache.xerces.xni.Augmentations)
+		 */
+		public void emptyElement(QName name, XMLAttributes attributes, Augmentations augmentation) throws XNIException {
+			if(stateMarkerLevel >=0){
+				if(null != fragment){
+					return;
+				}
+			}
+			if (!headParsed) {
+				if("head".equalsIgnoreCase(name.rawname)){
+					haveHead = true;
+					super.startElement(name, attributes, augmentation);
+					insertResources();
+					insertEndElement(name.rawname);
+					return;
+				}
+			}
+			if(isStateMarker(name, attributes)){
+				return;
+			};
+			super.emptyElement(name, attributes, augmentation);
+		}
+
+
+		/**
+		 * @param name
+		 * @param attributes
+		 */
+		private boolean isStateMarker(QName name, XMLAttributes attributes) {
+			if(name.rawname.equalsIgnoreCase("span") && AjaxViewHandler.STATE_MARKER_KEY.equals(attributes.getValue("id"))){
+				// STATE marker element - out real content.
+				if(null != fragment){
+					try {
+						_serializer.asDOMSerializer().serialize(fragment);
+					} catch (IOException e) {
+						// Break output.
+					}
+				}
+				return true;
+			}
+			return false;
+		}
+			
+		 void insertStartElement(String name) {
+				QName element = new QName(null,name,name,null);
+				XMLAttributes attrs = new XMLAttributesImpl();
+				Augmentations augs = new HTMLAugmentations();
+				super.startElement(element,attrs,augs);
+			}
+			
+			
+			 void  insertEndElement(String name) {
+				QName element = new QName(null,name,name,null);
+//				XMLAttributes attrs = new XMLAttributesImpl();
+				Augmentations augs = new HTMLAugmentations();
+				super.endElement(element,augs);
+			}
+
+
+			/* (non-Javadoc)
+			 * @see org.cyberneko.html.filters.DefaultFilter#endDocument(org.apache.xerces.xni.Augmentations)
+			 */
+			public void endDocument(Augmentations augs) throws XNIException {
+				if (!haveHtml) {
+					insertEndElement("html");
+				}
+				super.endDocument(augs);
+			}
+			 
+			 
+
+	}
+
+	private  static class HtmlWriter extends Writer {
+
+		/**
+		 * 
+		 */
+		public HtmlWriter() {
+			super();
+			fEncoding = "UTF-8";
+		}
+		
+		public void setEncoding(String encoding){
+			this.fEncoding = encoding;
+		}
+		
+		public void setWriter( PrintWriter writer){
+			this.fPrinter = writer;
+		}
+
+		/* (non-Javadoc)
+		 * @see org.cyberneko.html.filters.Writer#emptyElement(org.apache.xerces.xni.QName, org.apache.xerces.xni.XMLAttributes, org.apache.xerces.xni.Augmentations)
+		 */
+		public void emptyElement(QName element, XMLAttributes attributes, Augmentations augs) throws XNIException {
+			// TODO Auto-generated method stub
+			super.emptyElement(element, attributes, augs);
+			printEndElement(element);
+		}
+
+		/* (non-Javadoc)
+		 * @see org.cyberneko.html.filters.DefaultFilter#endCDATA(org.apache.xerces.xni.Augmentations)
+		 */
+		public void endCDATA(Augmentations augs) throws XNIException {
+			// TODO Auto-generated method stub
+			super.endCDATA(augs);
+		}
+
+		/* (non-Javadoc)
+		 * @see org.cyberneko.html.filters.DefaultFilter#startCDATA(org.apache.xerces.xni.Augmentations)
+		 */
+		public void startCDATA(Augmentations augs) throws XNIException {
+			// TODO Auto-generated method stub
+			super.startCDATA(augs);
+		}
+
+		/* (non-Javadoc)
+		 * @see org.cyberneko.html.filters.DefaultFilter#textDecl(java.lang.String, java.lang.String, org.apache.xerces.xni.Augmentations)
+		 */
+		public void textDecl(String version, String encoding, Augmentations augs) throws XNIException {
+			// TODO Auto-generated method stub
+			super.textDecl(version, encoding, augs);
+		}
+
+		/* (non-Javadoc)
+		 * @see org.cyberneko.html.filters.DefaultFilter#xmlDecl(java.lang.String, java.lang.String, java.lang.String, org.apache.xerces.xni.Augmentations)
+		 */
+		public void xmlDecl(String version, String encoding, String standalone, Augmentations augs) throws XNIException {
+			// TODO Auto-generated method stub
+			super.xmlDecl(version, encoding, standalone, augs);
+		}
+		
+		
+	}
+	/**
+			 * Factory method for create and configure HTML parser configuration.
+			 * Create configuration for use in parsing, set nessesary features and properties
+		     * @return
+		     * @throws ServletException
+		     */
+		    protected HTMLConfiguration getHtmlConfig()  {
+		       HTMLConfiguration _config = new HTMLConfiguration();
+		       try {
+				if (this.getPublicid() != null || this.getSystemid() != null) {
+					_config.setFeature(
+							"http://cyberneko.org/html/features/insert-doctype",
+							true);
+					_config.setFeature(
+							"http://cyberneko.org/html/features/override-doctype",
+							true);
+				}
+				if (this.getPublicid() != null) {
+					_config.setProperty(
+							"http://cyberneko.org/html/properties/doctype/pubid",
+							getPublicid());
+		
+				}
+				if (this.getSystemid() != null) {
+					_config.setProperty(
+							"http://cyberneko.org/html/properties/doctype/sysid",
+							getSystemid());
+		
+				}
+				if (this.getNamespace() != null) {
+					_config.setFeature(
+							"http://xml.org/sax/features/namespaces",
+							true);
+					_config.setFeature(
+							"http://cyberneko.org/html/features/override-namespaces",
+							true);
+					_config.setFeature(
+							"http://cyberneko.org/html/features/insert-namespaces",
+							true);
+					_config.setProperty(
+							"http://cyberneko.org/html/properties/namespaces-uri",
+							getNamespace());
+		
+				}
+					//            config
+					//                    .setFeature(
+					//                            "http://cyberneko.org/html/features/balance-tags/ignore-outside-content",
+					//                            true);
+					_config
+							.setFeature(
+									"http://cyberneko.org/html/features/scanner/cdata-sections",
+									true);
+					_config
+							.setFeature(
+									"http://cyberneko.org/html/features/scanner/script/strip-comment-delims",
+									true);
+					_config
+							.setFeature(
+									"http://cyberneko.org/html/features/scanner/style/strip-comment-delims",
+									true);
+					_config.setFeature(
+							"http://cyberneko.org/html/features/insert-doctype",
+							true);
+					_config.setFeature(
+							"http://cyberneko.org/html/features/insert-namespaces",
+							true);
+					//  
+					// Set properties http://cyberneko.org/html/features/insert-namespaces  
+		//				_config
+		//						.setProperty(
+		//								"http://cyberneko.org/html/properties/default-encoding",
+		//								encoding);
+					_config.setProperty(
+							"http://cyberneko.org/html/properties/names/elems",
+							"lower");
+					_config.setProperty(
+							"http://cyberneko.org/html/properties/names/attrs",
+							"lower");
+					_config.setProperty("http://cyberneko.org/html/properties/filters", _filters);
+				} catch (XMLConfigurationException e) {
+//					throw new ServletException("error set Neko feature ", e);
+				}
+		        return _config;
+		    }
+
+		private String getNamespace() {
+			// TODO Auto-generated method stub
+			return this._namespace;
+		}
+
+		private String getSystemid() {
+			// TODO Auto-generated method stub
+			return this._systemid;
+		}
+
+		private String getPublicid() {
+			// TODO Auto-generated method stub
+			return this._publicId;
+		}
+
+		/**
+		 * @param namespace The namespace to set.
+		 */
+		public void setNamespace(String namespace) {
+			_namespace = namespace;
+		}
+
+		/**
+		 * @param publicId The publicId to set.
+		 */
+		public void setPublicId(String publicId) {
+			_publicId = publicId;
+		}
+
+		/**
+		 * @param systemid The systemid to set.
+		 */
+		public void setSystemid(String systemid) {
+			_systemid = systemid;
+		}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/nekko/NekkoXMLFilter.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/nekko/NekkoXMLFilter.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/nekko/NekkoXMLFilter.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,108 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.ajax.xmlfilter.nekko;
+
+import java.util.EmptyStackException;
+
+import javax.servlet.ServletException;
+
+import org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter;
+import org.ajax4jsf.framework.ajax.xmlfilter.HtmlParser;
+import org.ajax4jsf.io.parser.FastHtmlParser;
+import org.apache.commons.collections.ArrayStack;
+
+public class NekkoXMLFilter extends BaseXMLFilter {
+	private static final int STACK_SIZE = 100;
+	private static ArrayStack _xhtmlParsersPool = new ArrayStack(STACK_SIZE);
+	
+	public NekkoXMLFilter() {}
+
+	protected HtmlParser getParser(String mimetype, boolean isAjax) {
+		HtmlParser parser = null;
+		if( isAjax ){
+			parser = getXmlParser();
+		} else if (mimetype.startsWith("text/html") || mimetype.startsWith("application/xhtml+xml")) {
+			parser = new FastHtmlParser();
+		} else {
+			return null;
+		}
+//		parser.setEncoding(characterEncoding);
+		return parser;
+	}
+
+	/**
+     * Peturn parser to pool
+	 * @param parser
+	 */
+	protected void reuseParser(HtmlParser parser) {
+		if (null != parser) {
+			if (parser instanceof NekkoParser ) {
+					synchronized (_xhtmlParsersPool) {
+						if (_xhtmlParsersPool.size() < STACK_SIZE) {
+							((NekkoParser) parser).reset();
+							_xhtmlParsersPool.push(parser);
+						}
+					
+				}
+			} 
+		}		
+	}
+
+    /**
+     * Factory method for create parsing object - contain chain of parsing,
+     * transformation and serialization of response output
+     * @param string Encodings for parser
+	 * @return
+     * @throws ServletException 
+	 */
+	protected HtmlParser getXmlParser()  {
+		// TODO make pool of parsers-transformers.
+		NekkoParser parser ;
+		try {
+			synchronized (_xhtmlParsersPool) {
+				parser = (NekkoParser) _xhtmlParsersPool.pop();
+			}
+		} catch (EmptyStackException e) {
+			parser = new NekkoParser();
+			parser.setPublicId(getPublicid());
+			parser.setSystemid(getSystemid());
+			parser.setNamespace(getNamespace());
+			// If tidy not handle all requests, disable reorganising of html
+//			parser.setMoveElements(isForcexml());
+		}
+		// TODO - set header scripts/styles filter.
+		return parser;
+	}
+
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter#getWrapper(javax.servlet.http.HttpServletResponse)
+	 */
+//	protected FilterServletResponseWrapper getWrapper(HttpServletResponse response) throws ServletException {
+//		// TODO Auto-generated method stub
+//		NekkoHtmlServletResponseWrapper wrapper = new NekkoHtmlServletResponseWrapper(response);
+//		// TODO - create pool of parsers.
+//		wrapper.setParser(getParser());
+//		return wrapper;
+//	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/tidy/TidyParser.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/tidy/TidyParser.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/tidy/TidyParser.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,398 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.ajax.xmlfilter.tidy;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.PrintWriter;
+import java.io.Reader;
+import java.io.Writer;
+import java.util.Iterator;
+import java.util.Properties;
+import java.util.Set;
+
+import org.ajax4jsf.framework.ajax.AjaxViewHandler;
+import org.ajax4jsf.framework.ajax.xmlfilter.HtmlParser;
+import org.ajax4jsf.framework.util.message.Messages;
+import org.ajax4jsf.org.w3c.tidy.Lexer;
+import org.ajax4jsf.org.w3c.tidy.Node;
+import org.ajax4jsf.org.w3c.tidy.Tidy;
+import org.ajax4jsf.org.w3c.tidy.TidyMessage;
+import org.ajax4jsf.org.w3c.tidy.TidyMessageListener;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+
+/**
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:59:17 $
+ * 
+ */
+public class TidyParser implements TidyMessageListener, HtmlParser {
+
+	private static final Log log = LogFactory.getLog(TidyParser.class);
+
+	private Tidy tidy;
+
+	private Set _scripts;
+
+	private Set _styles;
+
+	private String _viewState;
+
+	private String _encoding;
+
+	private String _outputEncoding;
+
+	private static final String[] _htmlTypes = { "text/html" };
+
+	private static final String[] _xmlTypes = { "text/xml" };// "text/xml"};
+
+	private static final String[] _xhtmlTypes = { "application/xhtml+xml" };
+
+	private static final String TIDY_MARK = "[TIDY_MESSAGE]";
+
+	/**
+	 * 
+	 */
+	public TidyParser(Properties props) {
+		tidy = new Tidy();
+		tidy.setConfigurationFromProps(props);
+		// tidy.setConfigurationFromProps(getProperties("tidy.properties"));
+		PrintWriter errout = new PrintWriter(new ErrorWriter());
+		tidy.setErrout(errout);
+		tidy.setForceOutput(true);
+		tidy.setHideEndTags(false);
+		tidy.setMessageListener(this);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.ajax.xmlfilter.HtmlParser#parseHtml(java.lang.Object,
+	 *      java.io.OutputStream)
+	 */
+	public Document parseHtmlByTidy(Object input, Writer output)
+			throws IOException {
+		Document document = tidy.parseDOM(input, null);
+		if (null != document) {
+			Element documentElement = document.getDocumentElement();
+			if (null != documentElement) {
+				// Replace state elements with real stored.
+
+				NodeList inputs = documentElement.getElementsByTagName("span");
+				for (int i = 0; i < inputs.getLength(); i++) {
+					Element node = (Element) inputs.item(i);
+					if (AjaxViewHandler.STATE_MARKER_KEY.equals(node
+							.getAttribute("id"))
+							&& AjaxViewHandler.STATE_MARKER_KEY.equals(node
+									.getAttribute("name"))) {
+						// State marker - replace with real.
+						org.w3c.dom.Node parentNode = node.getParentNode();
+						if (null != _viewState) {
+							parentNode.replaceChild(document
+									.createCDATASection(_viewState), node);
+						} else {
+							// Remove marker element, but keep it content.
+							if (node.hasChildNodes()) {
+								org.w3c.dom.Node nextSibling = node
+										.getNextSibling();
+								NodeList childNodes = node.getChildNodes();
+								// Copy all nodes by temporary array ( since
+								// moving nodes in iteration
+								// modify NodeList with side effects.
+								org.w3c.dom.Node[] childArray = new org.w3c.dom.Node[childNodes
+										.getLength()];
+								for (int j = 0; j < childArray.length; j++) {
+									childArray[j] = childNodes.item(j);
+								}
+								for (int j = 0; j < childArray.length; j++) {
+									parentNode.insertBefore(childArray[j],
+											nextSibling);
+								}
+							}
+							parentNode.removeChild(node);
+						}
+					}
+				}
+
+				// Inserts scripts and styles to head.
+				if (null != _scripts || null != _styles || null != _viewState) {
+					// find head
+					org.w3c.dom.Node head = documentElement
+							.getElementsByTagName("head").item(0);
+					// Insert empty if not found
+					if (null == head) {
+						head = document.createElement("head");
+						documentElement.insertBefore(head, documentElement
+								.getFirstChild());
+					}
+					NodeList headChildren = head.getChildNodes();
+					org.w3c.dom.Node child = null;
+					for (int i = 0; i < headChildren.getLength(); i++) {
+						child = headChildren.item(i);
+						if (child instanceof Element) {
+							String nodeName = ((Element) child).getNodeName();
+							if (!("title".equalsIgnoreCase(nodeName) || "base"
+									.equalsIgnoreCase(nodeName))) {
+								break;
+							}
+						}
+						child = null;
+					}
+					if (null != _styles) {
+						for (Iterator iter = _styles.iterator(); iter.hasNext();) {
+							String url = (String) iter.next();
+							Element style = document.createElement("link");
+							style.setAttribute("type", "text/css");
+							style.setAttribute("rel", "stylesheet");
+							style.setAttribute("href", url);
+							head.insertBefore(style, child);
+						}
+					}
+					// Scripts
+					if (null != _scripts) {
+						for (Iterator iter = _scripts.iterator(); iter
+								.hasNext();) {
+							String url = (String) iter.next();
+							Element script = document.createElement("script");
+
+							script.setAttribute("type", "text/javascript");
+							// script.setAttribute("defer", "defer");
+							script.setAttribute("src", url);
+							// script.appendChild(document.createTextNode(""));
+							head.insertBefore(script, child);
+						}
+					}
+				}
+			}
+			if (null != output) {
+				tidy.pprint(document, output);
+			}
+		}
+		return document;
+	}
+
+	public void parseHtml(InputStream input, Writer output) throws IOException {
+		this.parseHtmlByTidy(input, output);
+
+	}
+
+	public void parseHtml(Reader input, Writer output) throws IOException {
+		this.parseHtmlByTidy(input, output);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.w3c.tidy.TidyMessageListener#messageReceived(org.w3c.tidy.TidyMessage)
+	 */
+	public void messageReceived(TidyMessage message) {
+		// TODO record messages for output.
+		// TODO change signature for receive current node and append message in
+		// tree.
+		if (log.isDebugEnabled()) {
+			log.debug(Messages.getMessage(Messages.MESSAGE_PARSING_INFO,
+					message.getMessage()));
+		}
+		// TODO - configurable output for reeors in page.
+		if (false) {
+			Lexer lexer = message.getLexer();
+			Node element = message.getElement();
+			if (null == element) {
+				element = lexer.getLastNode();
+			} else if ("style".equalsIgnoreCase(element.getElement())
+					|| "script".equalsIgnoreCase(element.getElement())) {
+				element = lexer.getLastNode();
+			}
+			// Insert comment about error.
+			if (null != element) {
+				String messageText = message.getMessage();
+				byte[] msg = (TIDY_MARK + messageText + TIDY_MARK).getBytes();
+				Node comment = lexer.newNode(Node.COMMENT_TAG, msg, 0,
+						msg.length);
+				// TODO - detect style or script elements - not allow comment in
+				// it.
+				element.insertNodeAtEnd(comment);
+			}
+		}
+	}
+
+	/**
+	 * 'null' writer for discard errors - since processed in message listener
+	 * 
+	 * @author shura (latest modification by $Author: alexsmirnov $)
+	 * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:59:17 $
+	 * 
+	 */
+	private static class ErrorWriter extends Writer {
+
+		/*
+		 * (non-Javadoc)
+		 * 
+		 * @see java.io.Writer#write(char[], int, int)
+		 */
+		public void write(char[] cbuf, int off, int len) throws IOException {
+			// do nothing
+		}
+
+		/*
+		 * (non-Javadoc)
+		 * 
+		 * @see java.io.Writer#flush()
+		 */
+		public void flush() throws IOException {
+			// do nothing
+		}
+
+		/*
+		 * (non-Javadoc)
+		 * 
+		 * @see java.io.Writer#close()
+		 */
+		public void close() throws IOException {
+			// do nothing
+		}
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.ajax.xmlfilter.HtmlParser#setEncoding(java.lang.String)
+	 */
+	public void setInputEncoding(String encoding) {
+		if (null != encoding) {
+			this._encoding = encoding;
+			if (null != encoding) {
+				this.tidy.setInputEncoding(encoding);
+			}
+			// this.tidy.setOutputEncoding(encoding);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.ajax.xmlfilter.HtmlParser#setEncoding(java.lang.String)
+	 */
+	public void setOutputEncoding(String encoding) {
+		if (null != encoding) {
+			this._outputEncoding = encoding;
+			// this.tidy.setInputEncoding(encoding);
+			if (null != encoding) {
+				this.tidy.setOutputEncoding(encoding);
+			}
+		}
+	}
+
+	/**
+	 * Setup properly tidy output for given mime type. return {@link false } if
+	 * this type not supported by tidy.
+	 * 
+	 * @param mimeType
+	 * @return
+	 */
+	public boolean setMime(String mimeType) {
+		if (null != mimeType) {
+			for (int i = 0; i < _htmlTypes.length; i++) {
+				String mime = _htmlTypes[i];
+				if (mimeType.startsWith(mime)) {
+					// setup html output
+					tidy.setXHTML(false);
+					tidy.setXmlOut(false);
+					// TODO - auto doctype ?
+					return true;
+				}
+			}
+			for (int i = 0; i < _xhtmlTypes.length; i++) {
+				String mime = _xhtmlTypes[i];
+				if (mimeType.startsWith(mime)) {
+					// setup xhtml output
+					tidy.setXHTML(true);
+					tidy.setXmlOut(false);
+					return true;
+				}
+			}
+			for (int i = 0; i < _xmlTypes.length; i++) {
+				String mime = _xmlTypes[i];
+				if (mimeType.startsWith(mime)) {
+					// setup html output
+					tidy.setXHTML(true);
+					tidy.setXmlOut(true);
+					tidy.setXmlPi(true);
+					tidy.setEscapeCdata(false);
+					tidy.setNumEntities(true);
+					return true;
+				}
+			}
+		}
+		return false;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.ajax.xmlfilter.HtmlParser#setMoveElements(boolean)
+	 */
+	public void setMoveElements(boolean move) {
+		tidy.setMoveElements(move);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.ajax.xmlfilter.HtmlParser#setScripts(java.util.Set)
+	 */
+	public void setScripts(Set scripts) {
+		this._scripts = scripts;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.ajax.xmlfilter.HtmlParser#setStyles(java.util.Set)
+	 */
+	public void setStyles(Set styles) {
+		this._styles = styles;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.ajax.xmlfilter.HtmlParser#setDoctype(java.lang.String)
+	 */
+	public void setDoctype(String doctype) {
+		tidy.setDocType(doctype);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.ajax.xmlfilter.HtmlParser#setViewState(java.lang.String)
+	 */
+	public void setViewState(String viewState) {
+		_viewState = viewState;
+	}
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/tidy/TidyXMLFilter.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/tidy/TidyXMLFilter.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/tidy/TidyXMLFilter.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,123 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.ajax.xmlfilter.tidy;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Properties;
+
+import org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter;
+import org.ajax4jsf.framework.ajax.xmlfilter.HtmlParser;
+import org.ajax4jsf.framework.util.message.Messages;
+import org.ajax4jsf.io.parser.FastHtmlParser;
+import org.apache.commons.collections.ArrayStack;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+public class TidyXMLFilter extends BaseXMLFilter {
+	static final Log log = LogFactory.getLog(TidyXMLFilter.class);
+	private Properties _tidyProperties;
+	private static final int STACK_SIZE = 100;
+
+	/**
+	 * Stack for handle parsers pool - to avoid instantiane on each request.
+	 */
+	private ArrayStack _parsersPool = new ArrayStack(STACK_SIZE);	
+
+	public TidyXMLFilter() {}
+
+	/**
+     * Peturn parser to pool
+	 * @param parser
+	 */
+	protected void reuseParser(HtmlParser parser) {
+//		synchronized (_parsersPool) {
+//			if (_parsersPool.size()<STACK_SIZE) {
+//				if (log.isDebugEnabled()) {
+//					log.debug("Push JTidy parser to pool");
+//				}
+//				_parsersPool.push(parser);
+//			}
+//		}		
+	}
+
+    /**
+     * Factory method for create parsing object - contain chain of parsing,
+     * transformation and serialization of response output
+     * @param string Encodings for parser
+     * @return
+	 */
+	protected HtmlParser getParser(String mime, boolean isAjax) {
+		// For non-ajax, parse only html types !
+			if (isAjax || mime.startsWith("text/html") || mime.startsWith("application/xhtml+xml")) {
+				if(isAjax || isForcexml()){
+				TidyParser parser ;
+				parser = new TidyParser(getTidyProperties());
+				// If tidy not handle all requests, disable reorganising of html
+				parser.setMoveElements(isForcexml());
+				// Setup configuration.
+				if (parser.setMime(mime)) {
+					//			parser.setEncoding(encoding);
+					if (log.isDebugEnabled()) {
+						log.debug(Messages.getMessage(Messages.CREATE_JTIDY_INFO));
+					}
+					return parser;
+				}
+				} else {
+					return new FastHtmlParser();
+				}
+			}
+		return null;
+	}
+	
+    private Properties getTidyProperties() {
+		if (null == _tidyProperties) {
+			_tidyProperties = new Properties();
+			InputStream props = null;
+			try {
+				props = TidyXMLFilter.class.getResourceAsStream("tidy.properties");
+				if (null != props) {
+					_tidyProperties.load(props);
+				}
+				// Second part - user-defined properties.
+				props = Thread.currentThread().getContextClassLoader().getResourceAsStream("tidy.properties");
+				if (null != props) {
+					_tidyProperties.load(props);
+				}				
+			} catch (IOException e) {
+				// TODO Auto-generated catch block
+				log.warn(Messages.getMessage(Messages.READING_TIDY_PROPERTIES_ERROR), e);
+			} finally {
+				if(null != props){
+					try {
+						props.close();
+					} catch (IOException e) {
+						// can be ignored
+					}
+				}
+			}
+		}
+		return _tidyProperties;
+		
+	}	
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/AJAXDataSerializer.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/AJAXDataSerializer.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/AJAXDataSerializer.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,45 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.renderer;
+
+import net.sf.json.JSONSerializer;
+
+import org.ajax4jsf.framework.util.javascript.ScriptUtils;
+
+/**
+ * @author shura
+ * 
+ */
+public class AJAXDataSerializer {
+
+	public static final String SERVICE = AJAXDataSerializer.class.getName();
+
+	public String asString(Object data) {
+		StringBuffer result = new StringBuffer();
+		if(null != data){
+			result.append("<![CDATA[ ");
+			result.append(ScriptUtils.toScript(data));
+			result.append(" ]]>");
+		}
+		return result.toString();
+	}
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/AjaxChildrenRenderer.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/AjaxChildrenRenderer.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/AjaxChildrenRenderer.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,205 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.renderer;
+
+import java.io.IOException;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
+import javax.faces.component.NamingContainer;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+
+import org.ajax4jsf.ajax.UILoadBundle;
+import org.ajax4jsf.framework.ajax.AjaxChildrenEncoder;
+import org.ajax4jsf.framework.ajax.AjaxOutput;
+import org.ajax4jsf.framework.util.message.Messages;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * @author shura
+ *
+ */
+public abstract class AjaxChildrenRenderer extends AjaxComponentRendererBase {
+	
+	public static final Log log = LogFactory.getLog(AjaxChildrenRenderer.class);
+
+	public static final String[] SPECIAL_COMPONENTS_TYPES = {
+				UILoadBundle.COMPONENT_TYPE, "org.apache.myfaces.AliasBean",
+				"org.apache.myfaces.AliasBeansScope" };
+	private static final String SPECIAL_TYPES_PARAMETER = "org.ajax4jsf.CONTROL_COMPONENTS";
+
+	/**
+	 * Iterate over all childs of components. If component id contains in list ,
+	 * or, if list is empty, compotents is submitted form - render it. TODO -
+	 * Instead of calculate full path for every component, build current Path
+	 * for componet and send as parameter.
+	 * 
+	 * @param context -
+	 *            current context
+	 * @param component -
+	 *            curent faces component.
+	 * @param ids -
+	 *            list of Id to render.
+	 * @throws IOException
+	 * @deprecated Use {@link #encodeAjaxChildren(FacesContext,UIComponent,String,Set,Set)} instead
+	 */
+	public void encodeAjaxChild(FacesContext context, UIComponent component, String path, Set ids, Set renderedAreas) throws IOException {
+	    encodeAjaxChildren(context, component, path, ids, renderedAreas);
+	}
+
+	/**
+	 * Iterate over all childs of components. If component id contains in list ,
+	 * or, if list is empty, compotents is submitted form - render it. TODO -
+	 * Instead of calculate full path for every component, build current Path
+	 * for componet and send as parameter.
+	 * 
+	 * @param context -
+	 *            current context
+	 * @param component -
+	 *            curent faces component.
+	 * @param ids -
+	 *            list of Id to render.
+	 * @throws IOException
+	 */
+	public void encodeAjaxChildren(FacesContext context, UIComponent component, String path, Set ids, Set renderedAreas) throws IOException {
+		if (log.isDebugEnabled()) {
+			log.debug(Messages.getMessage(Messages.ENCODE_CHILD_AJAX_INFO,
+					path, component.getId()));
+		}
+		String currentPath = path;
+		if (component instanceof NamingContainer) {
+			currentPath += component.getId() + NamingContainer.SEPARATOR_CHAR;
+		}
+		for (Iterator it = component.getFacetsAndChildren(); it.hasNext();) {
+			UIComponent element = (UIComponent) it.next();
+			encodeAjaxComponent(context, element, currentPath, ids, renderedAreas);
+		}
+	}
+
+	/**
+	 * @param context
+	 * @param component
+	 * @param currentPath
+	 * @param ids
+	 * @param renderedAreas
+	 * @throws IOException
+	 */
+	public void encodeAjaxComponent(FacesContext context, UIComponent component, String currentPath, Set ids, Set renderedAreas) throws IOException {
+	    if (component.isRendered()) { // skip not-rendered components.
+	    	boolean found = false;
+	    	if (!ids.isEmpty()) {
+	    		// list for rendering may contains absolute id ( best ),
+	    		// component Id or client ID
+	    		String elementId = component.getId();
+	    		String absoluteId = currentPath + elementId;
+	    		// String clientId = element.getClientId(context);
+	    		if (ids.contains(absoluteId) || ids.contains(elementId)) {
+	    			if (log.isDebugEnabled()) {
+	    				log
+	    						.debug(Messages.getMessage(
+	    								Messages.RENDER_AJAX_AREA_INFO,
+	    								absoluteId));
+	    			}
+	    			// renderChild(context, element);
+	    			found = true;
+	    		}
+	    	}
+	    	if (!found && component instanceof AjaxOutput) {
+	    		if (((AjaxOutput) component).isAjaxRendered()) {
+	    			// renderChild(context, element);
+	    			found = true;
+	    		}
+
+	    	}
+
+	    	if (!found) {
+	    		if (component instanceof AjaxChildrenEncoder) {
+	    			((AjaxChildrenEncoder) component).encodeAjaxChild(
+	    					context, currentPath, ids, renderedAreas);
+	    		} else {
+	    			// Special case - for control components, not produced
+	    			// html code - such as message bundles loaders,
+	    			// MyFaces aliases etc. we call encodeBegin/end methods
+	    			// even if components not in rendered areas.
+	    			boolean special = isSpecialElement(context, component);
+	    			if (special) {
+	    				component.encodeBegin(context);
+	    			}
+	    			encodeAjaxChildren(context, component, currentPath, ids,
+	    					renderedAreas);
+	    			if (special) {
+	    				component.encodeEnd(context);
+	    			}
+
+	    		}
+	    	} else {
+	    		renderedAreas.add(component.getClientId(context));
+	    		renderChild(context, component);
+	    	}
+	    }
+	}
+
+	private Set _specialComponentTypes = null;
+
+	/**
+	 * Detect component as special control case - such as messages bundle
+	 * loader, alias bean components etc. Type of component get by reflection
+	 * from static field COMPONENT_TYPE
+	 * 
+	 * @param context
+	 * @param component
+	 * @return true if encode methods must be called for this component even in
+	 *         not-rendered parts.
+	 */
+	private boolean isSpecialElement(FacesContext context, UIComponent component) {
+		if (_specialComponentTypes == null) {
+			_specialComponentTypes = new HashSet(10);
+			for (int i = 0; i < SPECIAL_COMPONENTS_TYPES.length; i++) {
+				_specialComponentTypes.add(SPECIAL_COMPONENTS_TYPES[i]);
+			}
+			String special = context.getExternalContext().getInitParameter(
+					SPECIAL_TYPES_PARAMETER);
+			if (null != special) {
+				String[] split = special.split(",");
+				for (int i = 0; i < split.length; i++) {
+					_specialComponentTypes.add(split[i]);
+				}
+			}
+		}
+		boolean result;
+		try {
+			String componentType = (String) component.getClass().getField(
+					"COMPONENT_TYPE").get(null);
+			result = _specialComponentTypes.contains(componentType);
+		} catch (Exception e) {
+			// exception occurs if component not have accesible COMPONENT_TYPE
+			// constant
+			// we assume that component not in special types.
+			result = false;
+		}
+		return result;
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/AjaxComponentRendererBase.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/AjaxComponentRendererBase.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/AjaxComponentRendererBase.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,92 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.renderer;
+
+import org.ajax4jsf.framework.ajax.AjaxScript;
+import org.ajax4jsf.framework.resource.InternetResource;
+
+
+/**
+ * Base class for all Ajax enabled components. Perform common task -
+ * output javasript for component.
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:58:49 $
+ *
+ */
+public abstract class AjaxComponentRendererBase extends HeaderResourcesRendererBase implements HeaderResourceProducer {
+
+//	private InternetResource ajaxScript = getResource("/com/exadel/vcp/framework/ajax/scripts/AJAX.js");
+	private static final String AJAX_SCRIPT = AjaxScript.class.getName();
+	
+	private InternetResource[] scripts = null;
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.HeaderResourceProducer#getHeaderScripts(javax.faces.context.FacesContext)
+	 */
+//	public LinkedHashSet getHeaderScripts(FacesContext context, UIComponent component) {
+//		LinkedHashSet scripts = new LinkedHashSet() ; // Collections.singleton(ajaxScript.getUri(context, null));
+//		scripts.add(ajaxScript.getUri(context, component));
+//		String[] additionalScripts = getAdditionalScripts();
+//		if (null != additionalScripts) {
+//			for (int i = 0; i < additionalScripts.length; i++) {
+//				String resource = additionalScripts[i];
+//				scripts.add(getResource(resource).getUri(context, component));
+//			}
+//		}
+//		return scripts;
+//	}
+	
+	
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.HeaderResourcesRendererBase#getScripts()
+	 */
+	protected  InternetResource[] getScripts() {
+		// Lazy create
+		if (scripts == null) {
+			InternetResource[] additionalScripts = getAdditionalScripts();
+			// Custom scripts
+			if (null != additionalScripts) {
+				scripts = new InternetResource[additionalScripts.length+1];
+				System.arraycopy(additionalScripts,0,scripts,1,additionalScripts.length);
+			} else {
+				scripts = new InternetResource[1];				
+			}
+			// Ajax script
+			scripts[0] = getResource(AJAX_SCRIPT);			
+		}
+
+		return scripts;
+	}
+
+
+
+	/**
+	 * Hoock method for append custom ajax scripts 
+	 * @return
+	 */
+	protected InternetResource[] getAdditionalScripts() {
+		return null;
+	}
+
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/AjaxContainerRenderer.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/AjaxContainerRenderer.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/AjaxContainerRenderer.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,169 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.renderer;
+
+import java.io.IOException;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Set;
+
+import javax.faces.component.NamingContainer;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+
+import org.ajax4jsf.framework.ajax.AjaxContainer;
+import org.ajax4jsf.framework.ajax.AjaxContext;
+import org.ajax4jsf.framework.ajax.AjaxEvent;
+import org.ajax4jsf.framework.renderer.RendererUtils.HTML;
+import org.ajax4jsf.framework.util.message.Messages;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * Base renderer for all AJAX - subview components.
+ * 
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.3 $ $Date: 2007/02/08 15:02:02 $
+ * 
+ */
+public class AjaxContainerRenderer extends AjaxChildrenRenderer {
+
+	public static final String AJAX_PARAMETER_NAME = "AJAXREQUEST";
+
+	public static final String AJAX_JSF_SCRIPT = "AJAX.js";
+
+	public static final String SARISSA_SCRIPT = "sarissa.js";
+
+	public static final String JSDOM_SCRIPT = "JSDOM_sarissa.js";
+
+	public static final String AJAX_VIEW_STATE_TAG = "span";
+
+	public static final String AJAX_VIEW_STATE_ID = "ajax-update-ids";
+
+	public static final String AJAX_RESULT_GROUP_TAG = "meta";
+
+	public static final String AJAX_RESULT_GROUP_ATTR = "content";
+
+	public static final String AJAX_RESULT_STYLE = "display: none";
+
+	public static final String AJAX_UPDATE_HEADER = "Ajax-Update-Ids";
+
+	static final Log log = LogFactory
+			.getLog(AjaxContainerRenderer.class);
+
+	public static final String AJAX_FLAG_HEADER = "Ajax-Response";
+
+	public static final String AJAX_LOCATION_HEADER = "Location";
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.renderer.RendererBase#getComponentClass()
+	 */
+	protected Class getComponentClass() {
+		// TODO Auto-generated method stub
+		return AjaxContainer.class;
+	}
+
+	/**
+	 * 
+	 * 
+	 * @see javax.faces.component.UIComponent#encodeChildren(javax.faces.context.FacesContext)
+	 *      Since main function of component - render subset of components, for
+	 *      update on page,don't delegate this for renderer.
+	 * 
+	 */
+	public void encodeChildren(FacesContext context, UIComponent component)
+			throws IOException {
+		// Normal request - render all ...
+		log.debug(Messages.getMessage(Messages.RENDER_CHILDREN_NON_AJAX_INFO));
+		renderChildren(context, component);
+	}
+
+	/**
+	 * @param context
+	 * @param component
+	 * @throws IOException
+	 */
+	public void encodeAjax(FacesContext context, UIComponent component)
+			throws IOException {
+		UIComponent root ;
+		// Iterate over all childrens, render it if nessesary...
+		log.debug(Messages.getMessage(Messages.RENDER_CHILDREN_AJAX_INFO));
+		AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context);
+		Set ids = ajaxContext.getAjaxAreasToRender();
+		Set renderedAreas = ajaxContext.getAjaxRenderedAreas();
+		if (((AjaxContainer) component).isRenderRegionOnly()) {
+			root = component;
+		} else {
+			root = context.getViewRoot();			
+		}
+		String path = AjaxRendererUtils.getAbsoluteId(root);
+		// if(! (component instanceof NamingContainer)){
+		path = path.substring(0, path
+				.lastIndexOf(NamingContainer.SEPARATOR_CHAR) + 1);
+		encodeAjaxComponent(context, root, path, ids, renderedAreas);
+		// Write information about encoded areas after submission.
+		AjaxRendererUtils.encodeAreas(context, component);
+	}
+
+	
+	
+	/*
+	 * always return true, since component must maintain set of rendered
+	 * components.
+	 * 
+	 * @see javax.faces.component.UIComponent#getRendersChildren()
+	 */
+	public boolean getRendersChildren() {
+		return true;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.renderer.RendererBase#doDecode(javax.faces.context.FacesContext,
+	 *      javax.faces.component.UIComponent)
+	 */
+	protected void doDecode(FacesContext context, UIComponent component) {
+		String clientId = component.getClientId(context);
+		Map paramMap = context.getExternalContext().getRequestParameterMap();
+		if (log.isDebugEnabled()) {
+			log.debug(Messages.getMessage(
+					Messages.DECODE_AJAX_REQUEST_STATUS_INFO, clientId));
+			log.debug(Messages.getMessage(Messages.REQUEST_PARAMETERS_MAP,
+					paramMap.toString()));
+		}
+		Object ajaxParameter = paramMap.get(AJAX_PARAMETER_NAME);
+		AjaxContainer ajaxContainer = (AjaxContainer) component;
+		if (null != ajaxParameter && ajaxParameter.equals(clientId)) {
+				ajaxContainer.setSubmitted(true);
+				AjaxEvent event = new AjaxEvent(component);
+				component.queueEvent(event);
+		} else {
+			ajaxContainer.setSubmitted(false);
+		}
+
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/AjaxPhaseListener.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/AjaxPhaseListener.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/AjaxPhaseListener.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,169 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.renderer;
+
+import java.io.IOException;
+import java.util.Iterator;
+import java.util.Map;
+
+import javax.faces.FacesException;
+import javax.faces.component.UIViewRoot;
+import javax.faces.context.FacesContext;
+import javax.faces.event.PhaseEvent;
+import javax.faces.event.PhaseId;
+import javax.faces.event.PhaseListener;
+
+import org.ajax4jsf.framework.ajax.AjaxContext;
+import org.ajax4jsf.framework.skin.SkinFactory;
+import org.ajax4jsf.framework.util.message.Messages;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * Listener for act before Render phase to set RenderKit Id for current skin.
+ * 
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.3 $ $Date: 2007/02/06 16:23:19 $
+ * 
+ */
+public class AjaxPhaseListener implements PhaseListener {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = -4087936963051339868L;
+
+	public static final String VIEW_BEAN_PREFIX = "org.ajax4jsf.viewbean:";
+	
+	public static final String VIEW_STATE_SAVED_PARAM = "org.ajax4jsf.VIEW_STATE_SAVED"; 
+
+	private static final Log log = LogFactory
+			.getLog(AjaxPhaseListener.class);
+
+	public static final String AJAX_BEAN_PREFIX = "org.ajax4jsf.ajaxviewbean:";
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see javax.faces.event.PhaseListener#afterPhase(javax.faces.event.PhaseEvent)
+	 */
+	public void afterPhase(PhaseEvent event) {
+		PhaseId phaseId = event.getPhaseId();
+		if(log.isDebugEnabled()){
+			log.debug("Process after phase "+phaseId.toString());
+		}
+		FacesContext context = event.getFacesContext();
+		Map requestMap = context.getExternalContext().getRequestMap();
+		AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context);
+		if (phaseId == PhaseId.RENDER_RESPONSE) {
+			if (ajaxContext.isAjaxRequest()) {
+				// JSF RI 1.1 hack - view state not saved in <f:view> tag.
+				if(null == requestMap.get(VIEW_STATE_SAVED_PARAM)){
+					try {
+						ajaxContext.saveViewState(context);
+					} catch (IOException e) {
+						throw new FacesException(e);
+					}
+				}
+			}
+//			ajaxContext.processHeadResources(context);
+		} else if (phaseId == PhaseId.RESTORE_VIEW) {
+
+			UIViewRoot viewRoot = context.getViewRoot();
+			if(null != viewRoot){
+			boolean isAjax = ajaxContext.isAjaxRequest();
+			Map attributes = viewRoot.getAttributes();
+			for (Iterator it = attributes.keySet().iterator(); it.hasNext();) {
+				Object key =  it.next();
+				if (key instanceof String) {
+					String stringKey = (String) key;
+					if(stringKey.startsWith(VIEW_BEAN_PREFIX)){
+						requestMap.put(stringKey.substring(VIEW_BEAN_PREFIX.length()), attributes.get(key));
+					} else if(isAjax && stringKey.startsWith(AJAX_BEAN_PREFIX)){
+						requestMap.put(stringKey.substring(AJAX_BEAN_PREFIX.length()), attributes.get(key));
+					}
+
+				}
+			}
+			}
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see javax.faces.event.PhaseListener#beforePhase(javax.faces.event.PhaseEvent)
+	 */
+	public void beforePhase(PhaseEvent event) {
+		PhaseId phaseId = event.getPhaseId();
+		if(log.isDebugEnabled()){
+			log.debug("Process before phase "+phaseId.toString());
+		}
+		FacesContext context = event.getFacesContext();
+		if (phaseId == PhaseId.RENDER_RESPONSE) {
+			// Clear ViewId replacement, to avoid incorrect rendering of forms URI.
+			AjaxContext.getCurrentInstance(context).setViewIdHolder(null);
+			
+			UIViewRoot root = context.getViewRoot();
+			log.debug(Messages.getMessage(
+					Messages.ENTER_BEFORE_RENDER_VIEW_PHASE, root.getViewId(),
+					root.getRenderKitId()));
+
+			// TODO - create special skin-config.xml configuration.
+			String renderKitId = null;
+			try {
+				renderKitId = SkinFactory.getInstance().getSkin(context)
+						.getRenderKitId(context);
+			} catch (Exception e) {
+				log.error("Exception on get current Skin ", e);
+			}
+			if (null != renderKitId) {
+				log.debug(Messages.getMessage(Messages.SET_RENDER_KIT_ID_INFO,
+						renderKitId));
+				root.setRenderKitId(renderKitId);
+			}
+		} else if (phaseId == PhaseId.RESTORE_VIEW) {
+
+		}
+	}
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see javax.faces.event.PhaseListener#getPhaseId()
+	 */
+	public PhaseId getPhaseId() {
+		return PhaseId.ANY_PHASE;
+	}
+
+	protected boolean isValueReference(String value) {
+		if (value == null)
+			throw new NullPointerException("value");
+
+		int start = value.indexOf("#{");
+		if (start < 0)
+			return false;
+
+		int end = value.lastIndexOf('}');
+		return (end >= 0 && start < end);
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/AjaxRendererUtils.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/AjaxRendererUtils.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/AjaxRendererUtils.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,936 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.renderer;
+
+import java.io.IOException;
+import java.lang.reflect.Method;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Set;
+
+import javax.faces.application.ViewHandler;
+import javax.faces.component.ActionSource;
+import javax.faces.component.EditableValueHolder;
+import javax.faces.component.NamingContainer;
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIForm;
+import javax.faces.component.UIParameter;
+import javax.faces.component.UIViewRoot;
+import javax.faces.context.ExternalContext;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+import javax.servlet.http.HttpServletResponse;
+
+import org.ajax4jsf.ajax.UILoadBundle;
+import org.ajax4jsf.framework.ajax.AjaxComponent;
+import org.ajax4jsf.framework.ajax.AjaxContainer;
+import org.ajax4jsf.framework.ajax.AjaxContext;
+import org.ajax4jsf.framework.ajax.AjaxSupport;
+import org.ajax4jsf.framework.ajax.AjaxViewRoot;
+import org.ajax4jsf.framework.ajax.JavaScriptParameter;
+import org.ajax4jsf.framework.renderer.RendererUtils.HTML;
+import org.ajax4jsf.framework.util.ServicesUtils;
+import org.ajax4jsf.framework.util.javascript.JSFunction;
+import org.ajax4jsf.framework.util.javascript.JSFunctionDefinition;
+import org.ajax4jsf.framework.util.javascript.JSReference;
+import org.ajax4jsf.framework.util.message.Messages;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * @author shura
+ * 
+ * Some utilites for render AJAX components.
+ */
+public class AjaxRendererUtils {
+
+	/**
+	 * Name Javasript function for submit AJAX request
+	 */
+	public static final String AJAX_FUNCTION_NAME = "A4J.AJAX.Submit";
+
+	/**
+	 * Attribute for keep clientId of status component
+	 */
+	public static final String STATUS_ATTR_NAME = "status";
+
+	/**
+	 * Attribute for keep JavaScript funtion name for call after complete
+	 * request.
+	 */
+	public static final String ONCOMPLETE_ATTR_NAME = "oncomplete";
+
+	/**
+	 * Attribute to keep
+	 */
+	public static final String LIMITTOLIST_ATTR_NAME = "limitToList";
+
+	private static Log log = LogFactory.getLog(AjaxRendererUtils.class);
+
+	public static final String AJAX_REGIONS_ATTRIBUTE = "reRender";
+
+	private static final Class OBJECT_ARRAY_CLASS = (new Object[0]).getClass();
+
+	public static final String SEQUENCE_PARAM = "jsf_sequence";
+
+	private static final String VALUE_ATTR = "value";
+
+	public static final String AJAX_AREAS_RENDERED = "org.ajax4jsf.areas.rendered";
+
+	private static final String AJAX_SINGLE_ATTR = "ajaxSingle";
+
+	public static final String AJAX_QUEUE_ATTR = "eventsQueue";
+
+	public static final String AJAX_DELAY_ATTR = "requestDelay";
+
+	private static final Object AJAX_ABORT_ATTR = "ignoreDupResponses";
+
+	/**
+	 * Static class - protect constructor TODO - make as subclass of chameleon
+	 * RendererUtils.
+	 * 
+	 */
+	private AjaxRendererUtils() {
+
+	}
+
+	/**
+	 * Build JavaScript onclick event for given component
+	 * 
+	 * @param uiComponent -
+	 *            component for build event
+	 * @param facesContext
+	 * @return <code>StringBuffer</code> with Javascript code
+	 */
+	public static StringBuffer buildOnClick(UIComponent uiComponent,
+			FacesContext facesContext) {
+		return buildOnEvent(uiComponent, facesContext, HTML.onclick_ATTRIBUTE);
+	}
+
+	/**
+	 * Build JavaScript event for component
+	 * 
+	 * @param uiComponent -
+	 *            component for build event
+	 * @param facesContext
+	 * @param eventName -
+	 *            name of event
+	 * @return <code>StringBuffer</code> with Javascript code TODO - for
+	 *         key-based events build list of supported keys
+	 */
+	public static StringBuffer buildOnEvent(UIComponent uiComponent,
+			FacesContext facesContext, String eventName) {
+		StringBuffer onEvent = new StringBuffer();
+		if (null != eventName) {
+			String commandOnEvent = (String) uiComponent.getAttributes().get(
+					eventName);
+			if (commandOnEvent != null) {
+				onEvent.append(commandOnEvent);
+				onEvent.append(';');
+			}
+		}
+		JSFunction ajaxFunction = buildAjaxFunction(uiComponent, facesContext);
+		// Create formal parameter for non-input elements ???
+		// Link Control pseudo-object
+		// Options map. Possible options for function call :
+		// control - name of form control for submit.
+		// name - name for link control \
+		// value - value of control. - possible replace by parameters ?
+		// single true/false - submit all form or only one control.
+		// affected - array of element's ID for update on responce.
+		// oncomplete - function for call after complete request.
+		// status - id of request status component.
+		// parameters - map of parameters name/value for append on request.
+		// TODO
+		// sync true/false - run script in sync mode.
+		// ..........
+		ajaxFunction.addParameter(buildEventOptions(facesContext, uiComponent));
+
+		// appendAjaxSubmitParameters(facesContext, uiComponent, onEvent);
+		ajaxFunction.appendScript(onEvent);
+		if (uiComponent instanceof AjaxSupport) {
+			AjaxSupport support = (AjaxSupport) uiComponent;
+			if (support.isDisableDefault()) {
+				onEvent.append("; return false;");
+			}
+		}
+		log.debug(Messages.getMessage(Messages.BUILD_ONCLICK_INFO, uiComponent
+				.getId(), onEvent.toString()));
+		return onEvent;
+
+	}
+
+	/**
+	 * @param facesContext
+	 * @param uiComponent
+	 * @return
+	 */
+	public static Map buildEventOptions(FacesContext facesContext,
+			UIComponent uiComponent) {
+		String clientId = uiComponent.getClientId(facesContext);
+		Map componentAttributes = uiComponent.getAttributes();
+		Map options = new HashMap();
+		Map parameters = new HashMap();
+		// UIForm form = getNestingForm(uiComponent);
+		// "input" - if assigned to html input element.
+		boolean input = (uiComponent instanceof AjaxSupport && uiComponent
+				.getParent() instanceof EditableValueHolder)
+				|| uiComponent instanceof EditableValueHolder;
+		// Action component - button etc.
+		boolean action = (uiComponent instanceof AjaxSupport && uiComponent
+				.getParent() instanceof ActionSource)
+				|| uiComponent instanceof ActionSource;
+		// TODO - disable ( or not ? ) submission of action for disabled default
+		// ?
+		// if ( action && uiComponent instanceof AjaxSupport) {
+		// AjaxSupport support = (AjaxSupport) uiComponent;
+		// if (support.isDisableDefault()) {
+		// action = false;
+		// }
+		// }
+
+		boolean ajaxSingle = Boolean.TRUE.equals(componentAttributes
+				.get(AJAX_SINGLE_ATTR));
+		// For input components in single mode or without form submit input
+		// control )
+		if (ajaxSingle && input) { // || action
+			// TODO - inside form, put reference :
+			// document.forms['form'].controls['control']
+			options.put("control", JSReference.THIS);
+		}
+		// Control value for submit
+		String controlName;
+		Object controlValue;
+		// TODO - make compatible with JSF RI/MyFaces ? use submittedValue ( if
+		// any ) for UIInput, converted value for ValueHolder.
+		controlName = clientId;
+		controlValue = clientId;
+		parameters.put(controlName, controlValue);
+		// Move processing of a 'single' attribute to a server-side.
+//		if (ajaxSingle) {
+//			options.put("single", JSReference.TRUE);
+//		}
+		AjaxContext ajaxContext = AjaxContext.getCurrentInstance(facesContext);
+		// Setup action URL. For portlet environment, it will be different from
+		// page.
+		options.put("actionUrl", ajaxContext.getAjaxActionURL(facesContext));
+		// Add application-wide Ajax parameters
+		parameters.putAll(ajaxContext.getCommonAjaxParameters());
+		// add child parameters
+		for (Iterator it = uiComponent.getChildren().iterator(); it.hasNext();) {
+			UIComponent child = (UIComponent) it.next();
+			if (child instanceof UIParameter) {
+				String name = ((UIParameter) child).getName();
+				Object value = ((UIParameter) child).getValue();
+				if (null == name) {
+					throw new IllegalArgumentException(Messages.getMessage(
+							Messages.UNNAMED_PARAMETER_ERROR, uiComponent
+									.getClientId(facesContext)));
+				}
+				boolean escape = true;
+				if (child instanceof JavaScriptParameter) {
+					JavaScriptParameter actionParam = (JavaScriptParameter) child;
+					escape = !actionParam.isNoEscape();
+				}
+				if (escape) {
+					parameters.put(name, value);
+				} else {
+					parameters.put(name, new JSReference(value.toString()));
+					// if(it.hasNext()){onEvent.append(',');};
+					// renderAjaxLinkParameter( name,
+					// value, onClick, jsForm, nestingForm);
+				}
+			}
+		}
+		if (!parameters.isEmpty()) {
+			options.put("parameters", parameters);
+		}
+		// parameter to render only current list of areas.
+		if (isAjaxLimitToList(uiComponent)) {
+			Set ajaxAreas = getAjaxAreas(uiComponent);
+			Set areasIds = new HashSet();
+			if (null != ajaxAreas) {
+				for (Iterator iter = ajaxAreas.iterator(); iter.hasNext();) {
+					String id = (String) iter.next();
+					UIComponent comp = uiComponent.findComponent(id);
+					if (null != comp) {
+						areasIds.add(comp.getClientId(facesContext));
+					} else {
+						areasIds.add(id);
+					}
+				}
+			}
+			options.put("affected", areasIds);
+		}
+		String oncomplete = getAjaxOncomplete(uiComponent);
+		if (null != oncomplete) {
+			JSFunctionDefinition function = new JSFunctionDefinition();
+			function.addParameter("request");
+			function.addParameter("event");
+			function.addParameter("data");
+			function.addToBody(oncomplete);
+
+			options.put("oncomplete", function);
+		}
+		String status = getAjaxStatus(uiComponent);
+		if (null != status) {
+			options.put("status", status);
+		}
+		String queue = (String) componentAttributes.get(AJAX_QUEUE_ATTR);
+		Integer requestDelay = (Integer) componentAttributes
+				.get(AJAX_DELAY_ATTR);
+		if (null != requestDelay && requestDelay.intValue() > 0) {
+			options.put(AJAX_DELAY_ATTR, requestDelay);
+			if (null == queue) {
+				queue = clientId;
+			}
+		}
+		Boolean ignoreDupResponses = (Boolean) componentAttributes
+				.get(AJAX_ABORT_ATTR);
+		if (null != ignoreDupResponses && ignoreDupResponses.booleanValue()) {
+			options.put(AJAX_ABORT_ATTR, JSReference.TRUE);
+			if (null == queue) {
+				queue = clientId;
+			}
+		}
+		if (null != queue) {
+			options.put(AJAX_QUEUE_ATTR, queue);
+		}
+		// request timeout.
+		Integer timeout = (Integer) componentAttributes.get("timeout");
+		if (null != timeout && timeout.intValue() > 0) {
+			options.put("timeout", timeout);
+		}
+		// Encoding for requests
+		String encoding = (String) componentAttributes.get("encoding");
+		if (null != encoding) {
+			options.put("encoding", encoding);
+		}
+		return options;
+	}
+
+	/**
+	 * Create call to Ajax Submit function with first two parameters
+	 * 
+	 * @param uiComponent
+	 * @param facesContext
+	 * @param functionName
+	 *            TODO
+	 * @return
+	 */
+	public static JSFunction buildAjaxFunction(UIComponent uiComponent,
+			FacesContext facesContext) {
+		JSFunction ajaxFunction = buildAjaxFunction(uiComponent, facesContext,
+				AJAX_FUNCTION_NAME);
+		// client-side script must have reference to event-enabled object.
+		ajaxFunction.addParameter(new JSReference("event"));
+		return ajaxFunction;
+	}
+
+	/**
+	 * Create call to Ajax Submit function with first two parameters
+	 * 
+	 * @param uiComponent
+	 * @param facesContext
+	 * @param functionName
+	 *            TODO
+	 * @return
+	 */
+	public static JSFunction buildAjaxFunction(UIComponent uiComponent,
+			FacesContext facesContext, String functionName) {
+		JSFunction ajaxFunction = new JSFunction(functionName);
+		UIComponent nestingContainer = (UIComponent) findAjaxContainer(
+				facesContext, uiComponent);
+		ajaxFunction.addParameter(nestingContainer.getClientId(facesContext));
+		// build form name or ActionUrl for script
+		UIComponent nestingForm = getNestingForm(uiComponent);
+		if (null == nestingForm) {
+			ajaxFunction.addParameter(JSReference.NULL);
+		} else {
+			ajaxFunction.addParameter(nestingForm.getClientId(facesContext));
+		}
+		return ajaxFunction;
+	}
+
+	/**
+	 * Append common parameters ( array of affected areas, status area id, on
+	 * complete function ) to JavaScript event string.
+	 * 
+	 * @param uiComponent
+	 * @param onClick -
+	 *            buffer with JavaScript code eg... AJAX.Submit(form,this
+	 */
+	// public static void appendAjaxSubmitParameters(FacesContext facesContext,
+	// UIComponent uiComponent, StringBuffer onClick)
+	// {
+	// Set ajaxAreas = getAjaxAreas(uiComponent);
+	// onClick.append(',');
+	// // parameter to render only current list of areas.
+	// if (isAjaxLimitToList(uiComponent) && ajaxAreas != null &&
+	// ajaxAreas.size() > 0)
+	// {
+	// onClick.append('[');
+	// Iterator areas = ajaxAreas.iterator();
+	// boolean first = true;
+	// while (areas.hasNext())
+	// {
+	// String element = (String) areas.next();
+	// UIComponent component = uiComponent.findComponent(element);
+	// if (null != component)
+	// {
+	// if (!first)
+	// {
+	// onClick.append(',');
+	// }
+	// else
+	// {
+	// first = false;
+	// }
+	// onClick.append('\'');
+	// onClick.append(component.getClientId(facesContext));
+	// onClick.append('\'');
+	// }
+	// }
+	// onClick.append("]");
+	// }
+	// else
+	// {
+	// onClick.append("null");
+	// }
+	// // insert id of request status element.
+	// onClick.append(',');
+	// String status = getAjaxStatus(uiComponent);
+	// if (null != status)
+	// {
+	// onClick.append('\'').append(status).append('\'');
+	// }
+	// else
+	// {
+	// onClick.append("null");
+	// }
+	// // insert function name for call after completed request
+	// onClick.append(',');
+	// String oncomplete = getAjaxOncomplete(uiComponent);
+	// if (null != oncomplete)
+	// {
+	// onClick.append(oncomplete);
+	// }
+	// else
+	// {
+	// onClick.append("null");
+	// }
+	//
+	// }
+	/**
+	 * Get list of clientId's for given component
+	 * 
+	 * @param uiComponent
+	 * @return List of areas Id's , updated by this component.
+	 */
+	public static Set getAjaxAreas(UIComponent uiComponent) {
+		Object areas;
+		if (uiComponent instanceof AjaxComponent) {
+			areas = ((AjaxComponent) uiComponent).getReRender();
+
+		} else {
+			areas = uiComponent.getAttributes().get(
+					AjaxRendererUtils.AJAX_REGIONS_ATTRIBUTE);
+		}
+		return asSet(areas);
+	}
+
+	/**
+	 * Convert parameter ( Collection, List, array, String, comma-separated
+	 * String ) to list of srings. TODO - when move to JDK 5, change to
+	 * List&lt;String&gt;
+	 * 
+	 * @param valueToSet -
+	 *            obect for convert to List.
+	 * @return - list of strings.
+	 */
+	public static Set asSet(Object valueToSet) {
+
+		if (null != valueToSet) {
+			// Simplest case - set.
+			if (valueToSet instanceof Set) {
+				return (Set) valueToSet;
+			}
+			// Other collections.
+			else if (valueToSet instanceof Collection) {
+				return new HashSet((Collection) valueToSet);
+			}
+			// Array
+			else if (OBJECT_ARRAY_CLASS.isAssignableFrom(valueToSet.getClass())) {
+				return new HashSet(Arrays.asList((Object[]) valueToSet));
+			}
+			// Tokenize string.
+			else if (valueToSet instanceof String) {
+				String areasString = (String) valueToSet;
+				if (areasString.indexOf(",") > 0) {
+					return new HashSet(Arrays.asList(areasString.trim().split(
+							"(\\s)*,(\\s)*")));
+				} else {
+					Set areasSet = new HashSet(5);
+					areasSet.add(areasString.trim());
+					return areasSet;
+				}
+
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * Get status area Id for given component.
+	 * 
+	 * @param component
+	 * @return clientId of status area, or <code>null</code>
+	 */
+	public static String getAjaxStatus(UIComponent component) {
+		String statusId;
+		if (component instanceof AjaxComponent) {
+			statusId = ((AjaxComponent) component).getStatus();
+
+		} else {
+			statusId = (String) component.getAttributes().get(STATUS_ATTR_NAME);
+		}
+		if (null != statusId) {
+			UIComponent status = null;
+			UIComponent currentParent = component;
+			try {
+				// Check the naming container of the current
+				// component for component identified by
+				// 'forComponent'
+				while (currentParent != null) {
+					// If the current component is a NamingContainer,
+					// see if it contains what we're looking for.
+					status = currentParent.findComponent(statusId);
+					if (status != null)
+						break;
+					// if not, start checking further up in the view
+					currentParent = currentParent.getParent();
+				}
+			} catch (Exception e) {
+				// ignore - log the warning
+			}
+			if (null != status) {
+				statusId = status
+						.getClientId(FacesContext.getCurrentInstance());
+			} else {
+				log.warn(Messages.getMessage(
+						Messages.AJAX_STATUS_COMPONENT_NOT_FOWND_WARNING,
+						component.getId()));
+			}
+		}
+		return statusId;
+	}
+
+	/**
+	 * Get function name for call on completed ajax request.
+	 * 
+	 * @param component
+	 *            for wich calculate function name
+	 * @return name of JavaScript function or <code>null</code>
+	 */
+	public static String getAjaxOncomplete(UIComponent component) {
+		if (component instanceof AjaxComponent) {
+			return ((AjaxComponent) component).getOncomplete();
+
+		}
+		return (String) component.getAttributes().get(ONCOMPLETE_ATTR_NAME);
+	}
+
+	/**
+	 * Calculate, must be component render only given areas, or all sended from
+	 * server.
+	 * 
+	 * @param component
+	 * @return <code>true</code> if client must render ONLY given areas.
+	 */
+	public static boolean isAjaxLimitToList(UIComponent component) {
+		boolean result = false;
+		if (component instanceof AjaxComponent) {
+			result = ((AjaxComponent) component).isLimitToList();
+
+		} else {
+			try {
+				result = ((Boolean) component.getAttributes().get(
+						LIMITTOLIST_ATTR_NAME)).booleanValue();
+			} catch (NullPointerException e) {
+				// NullPointer - ignore ...
+			} catch (ClassCastException e1) {
+				// not Boolean - false ...
+			}
+		}
+		return result;
+	}
+
+	/**
+	 * Replacement for buggy in MyFaces <code>RendererUtils</code>
+	 * 
+	 * @param component
+	 * @return
+	 */
+	public static String getAbsoluteId(UIComponent component) {
+		if (component == null)
+			throw new NullPointerException(Messages
+					.getMessage(Messages.COMPONENT_NULL_ERROR_2));
+
+		StringBuffer idBuf = new StringBuffer();
+
+		idBuf.append(component.getId());
+
+		UIComponent parent = component;
+
+		while ((parent = parent.getParent()) != null) {
+			if (parent instanceof NamingContainer) {
+				idBuf.insert(0, NamingContainer.SEPARATOR_CHAR);
+				idBuf.insert(0, parent.getId());
+			}
+		}
+		idBuf.insert(0, NamingContainer.SEPARATOR_CHAR);
+		log.debug(Messages.getMessage(Messages.CALCULATE_COMPONENT_ID_INFO,
+				component.getId(), idBuf.toString()));
+		return idBuf.toString();
+	}
+
+	/**
+	 * Find nested form for given component
+	 * 
+	 * @param component
+	 * @return nested <code>UIForm</code> component, or <code>null</code>
+	 */
+	public static UIComponent getNestingForm(UIComponent component) {
+		UIComponent parent = component;
+		// Search enclosed UIForm or ADF UIXForm component
+		while (parent != null
+				&& !(parent instanceof UIForm)
+				&& !("org.apache.myfaces.trinidad.Form".equals(parent
+						.getFamily()))
+				&& !("oracle.adf.Form".equals(parent.getFamily()))) {
+			parent = parent.getParent();
+		}
+
+		return parent;
+	}
+
+	protected static String getAjaxActionUrl(FacesContext facesContext) {
+	    	return AjaxContext.getCurrentInstance(facesContext).getAjaxActionURL(facesContext);
+	}
+
+	/**
+	 * @param facesContext
+	 * @param uiComponent
+	 * @return
+	 */
+	public static org.ajax4jsf.framework.ajax.AjaxContainer findAjaxContainer(
+			FacesContext facesContext, UIComponent uiComponent) {
+		UIComponent parent = uiComponent.getParent();
+		while (parent != null
+				&& !(parent instanceof org.ajax4jsf.framework.ajax.AjaxContainer)) {
+			parent = parent.getParent();
+		}
+
+		org.ajax4jsf.framework.ajax.AjaxContainer nestingContainer = null;
+		if (parent != null) {
+			// link is nested inside a form
+			nestingContainer = (org.ajax4jsf.framework.ajax.AjaxContainer) parent;
+		} else if (facesContext.getViewRoot() instanceof AjaxViewRoot) {
+			nestingContainer = (AjaxContainer) facesContext.getViewRoot();
+		}
+		return nestingContainer;
+	}
+
+	/**
+	 * For Myfaces, get current viev sequence.
+	 * 
+	 * @param facescontext
+	 * @return
+	 */
+	private static Integer getViewSequence(FacesContext facescontext) {
+		Map map = facescontext.getExternalContext().getRequestMap();
+		Integer sequence = (Integer) map.get(SEQUENCE_PARAM);
+		if (sequence == null) {
+			sequence = new Integer(1);
+			map.put(SEQUENCE_PARAM, sequence);
+		}
+		return sequence;
+	}
+
+	/**
+	 * Encode rendered areas as special HTML tag ( span in current release )
+	 * 
+	 * @param context
+	 * @param component
+	 * @throws IOException
+	 */
+	public static void encodeAreas(FacesContext context,
+			UIComponent component) throws IOException {
+		AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context);
+		ExternalContext externalContext = context.getExternalContext();
+		Map requestMap = externalContext.getRequestMap();
+		Set rendered = ajaxContext.getAjaxRenderedAreas();
+		StringBuffer senderString = new StringBuffer();
+		// write special area for list of rendered elements. Client-side
+		// Java
+		// Script
+		// read this structure for update areas of DOM tree.
+		ResponseWriter out = context.getResponseWriter();
+		// Create <span> element to keep list rendered aread ( in title
+		// attribute )
+		// More right will create special namespace for such
+		// information,
+		// but I want to keep simple html ( xhtml ) document - on case
+		// I have troubles with microsoft XMLHTTP validations.
+		out
+				.startElement(AjaxContainerRenderer.AJAX_RESULT_GROUP_TAG,
+						component);
+		out.writeAttribute(HTML.NAME_ATTRIBUTE,
+				AjaxContainerRenderer.AJAX_UPDATE_HEADER, null);
+		for (Iterator it = rendered.iterator(); it.hasNext();) {
+			String id = (String) it.next();
+			// out.startElement(AJAX_RESULT_TAG, component);
+			// out.writeText(id,null);
+			// out.endElement(AJAX_RESULT_TAG);
+			senderString.append(id);
+			if (it.hasNext()) {
+				senderString.append(',');
+			}
+		}
+		out.writeAttribute(AjaxContainerRenderer.AJAX_RESULT_GROUP_ATTR,
+				senderString, null);
+		out.endElement(AjaxContainerRenderer.AJAX_RESULT_GROUP_TAG);
+		// For sequences and client-saved states.
+
+		out.startElement(AjaxContainerRenderer.AJAX_VIEW_STATE_TAG, component);
+		out.writeAttribute(HTML.id_ATTRIBUTE,
+				AjaxContainerRenderer.AJAX_VIEW_STATE_ID, null);
+		writeState(context);
+		out.endElement(AjaxContainerRenderer.AJAX_VIEW_STATE_TAG);
+		// Write rendered flag to html <meta>
+		out
+				.startElement(AjaxContainerRenderer.AJAX_RESULT_GROUP_TAG,
+						component);
+		out.writeAttribute(HTML.id_ATTRIBUTE,
+				AjaxContainerRenderer.AJAX_FLAG_HEADER, null);
+		out.writeAttribute(HTML.NAME_ATTRIBUTE,
+				AjaxContainerRenderer.AJAX_FLAG_HEADER, null);
+		out.writeAttribute(AjaxContainerRenderer.AJAX_RESULT_GROUP_ATTR,
+				"true", null);
+		out.endElement(AjaxContainerRenderer.AJAX_RESULT_GROUP_TAG);
+		// set response header with list of rendered ID's
+		Object response = externalContext.getResponse();
+		// Use reflection for send responce headers - we can get
+		// different responces classes
+		// for different environment ( portal, cocoon etc )
+		if (response instanceof HttpServletResponse) {
+			HttpServletResponse httpResponse = (HttpServletResponse) response;
+			httpResponse.setHeader(AjaxContainerRenderer.AJAX_UPDATE_HEADER,
+					senderString.toString());
+			httpResponse.setHeader(AjaxContainerRenderer.AJAX_FLAG_HEADER,
+					"true");
+		} else {
+			try {
+				Method setHeadergMethod = response.getClass()
+						.getMethod("setHeader",
+								new Class[] { String.class, String.class });
+				setHeadergMethod.invoke(response, new Object[] {
+						AjaxContainerRenderer.AJAX_UPDATE_HEADER,
+						senderString.toString() });
+				setHeadergMethod.invoke(response, new Object[] {
+						AjaxContainerRenderer.AJAX_FLAG_HEADER, "true" });
+			} catch (Exception e) {
+				log
+						.error(Messages
+								.getMessage(Messages.DETECTING_ENCODING_DISABLED_ERROR));
+				log.error(Messages.getMessage(
+						Messages.OBTAIN_RESPONSE_SET_HEADER_ERROR, e));
+			}
+		}
+		Map responseDataMap = ajaxContext.getResponseDataMap();
+		// Get data serializer instance
+		AJAXDataSerializer serializer = (AJAXDataSerializer) ServicesUtils
+				.getServiceInstance(AJAXDataSerializer.SERVICE);
+		// Put data to JavaScript handlers, inside <span> elements.
+		for (Iterator dataIterator = responseDataMap.keySet().iterator(); dataIterator
+				.hasNext();) {
+			Object dataKey = dataIterator.next();
+			out.startElement(HTML.SPAN_ELEM, component);
+			out.writeAttribute(HTML.id_ATTRIBUTE, dataKey, null);
+			String dataString = serializer.asString(responseDataMap
+					.get(dataKey));
+			out.write(dataString);
+			out.endElement(HTML.SPAN_ELEM);
+		}
+		// For self-rendered case, we use own methods for replace stateKey by
+		// real value
+		// in XML filter.
+		// if(ajaxContext.isSelfRender()){
+		// saveViewState(context, out);
+		// }
+		requestMap.put(AJAX_AREAS_RENDERED, "true");
+	}
+
+	/**
+	 * Write state saving markers to context, include MyFaces view sequence.
+	 * 
+	 * @param context
+	 * @throws IOException
+	 */
+	public static void writeState(FacesContext context) throws IOException {
+		if (!context.getApplication().getStateManager().isSavingStateInClient(
+				context)) {
+			ResponseWriter writer = context.getResponseWriter();
+			// MyFaces-specific view sequence attribute
+			writer.startElement(HTML.INPUT_ELEM, null);
+			writer.writeAttribute(HTML.TYPE_ATTR, HTML.INPUT_TYPE_HIDDEN, null);
+			writer.writeAttribute(HTML.NAME_ATTRIBUTE,
+					AjaxRendererUtils.SEQUENCE_PARAM, null);
+			writer.writeAttribute(HTML.value_ATTRIBUTE, AjaxRendererUtils
+					.getViewSequence(context), null);
+			writer.endElement(HTML.INPUT_ELEM);
+		}
+		context.getApplication().getViewHandler().writeState(context);
+	}
+
+	/**
+	 * Encode declaration for AJAX response. Render &lt;html&gt;&lt;body&gt;
+	 * 
+	 * @param context
+	 * @param component
+	 * @throws IOException
+	 */
+	public static void encodeAjaxBegin(FacesContext context,
+			UIComponent component) throws IOException {
+		// AjaxContainer ajax = (AjaxContainer) component;
+		ResponseWriter out = context.getResponseWriter();
+		// DebugUtils.traceView("ViewRoot in AJAX Page encode begin");
+		out.startElement("html", component);
+		// TODO - html attributes. lang - from current locale ?
+		Locale locale = context.getViewRoot().getLocale();
+		out.writeAttribute(HTML.lang_ATTRIBUTE, locale.toString(), "lang");
+		out.startElement("body", component);
+	}
+
+	/**
+	 * End encoding of AJAX response. Render tag with included areas and close
+	 * &lt;/body&gt;&lt;/html&gt;
+	 * 
+	 * @param context
+	 * @param component
+	 * @throws IOException
+	 */
+	public static void encodeAjaxEnd(FacesContext context, UIComponent component)
+			throws IOException {
+		// AjaxContainer ajax = (AjaxContainer) component;
+		ResponseWriter out = context.getResponseWriter();
+		// DebugUtils.traceView("ViewRoot in AJAX Page encode begin");
+
+		encodeAreas(context, component);
+			out.endElement("body");
+			out.endElement("html");
+	}
+
+	/**
+	 * Find all instances of {@link UILoadBundle} in view tree and load bundles
+	 * to request-scope map.
+	 * 
+	 * @param context
+	 * @throws IOException
+	 */
+	public static void loadBundles(FacesContext context) {
+		// TODO - performanse improove - don't seek by all components tree.
+		loadBundles(context, context.getViewRoot());
+
+	}
+
+	/**
+	 * Recursive helper for {@link #loadBundles(FacesContext)}
+	 * 
+	 * @param context
+	 * @param component
+	 * @throws IOException
+	 */
+	private static void loadBundles(FacesContext context, UIComponent component) {
+		// Iterate over cildrens
+		for (Iterator iter = component.getChildren().iterator(); iter.hasNext();) {
+			UIComponent child = (UIComponent) iter.next();
+			loadCildBundles(context, child);
+		}
+		// Iterate over facets
+		for (Iterator iter = component.getFacets().values().iterator(); iter
+				.hasNext();) {
+			UIComponent child = (UIComponent) iter.next();
+			loadCildBundles(context, child);
+		}
+	}
+
+	/**
+	 * @param context
+	 * @param child
+	 */
+	private static void loadCildBundles(FacesContext context, UIComponent child) {
+		if (child instanceof UILoadBundle) {
+			try {
+				child.encodeBegin(context);
+			} catch (IOException e) {
+				// DO nothing - really, LoadBundle don't can throw exceptions.
+			}
+		} else {
+			loadBundles(context, child);
+		}
+	}
+
+	/**
+	 * @param facesContext
+	 * @return
+	 */
+	public static boolean isAjaxRequest(FacesContext facesContext) {
+		
+		return AjaxContext.getCurrentInstance(facesContext).isAjaxRequest(facesContext);
+	}
+
+	/**
+	 * @param facesContext
+	 * @param component
+	 * @param id
+	 */
+	public static void addRegionByName(FacesContext facesContext, UIComponent component, String id) {
+
+		AjaxContext.getCurrentInstance(facesContext).addComponentToAjaxRender(component, id);
+	}
+	/**
+	 * @param facesContext
+	 * @param component
+	 * @param id
+	 */
+	public static void addRegionsFromComponent(UIComponent component, FacesContext facesContext) {
+
+		AjaxContext.getCurrentInstance(facesContext).addRegionsFromComponent(component);
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/AjaxViewRootRenderer.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/AjaxViewRootRenderer.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/AjaxViewRootRenderer.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,115 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.renderer;
+
+import java.io.IOException;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+
+import org.ajax4jsf.framework.ajax.AjaxContext;
+import org.ajax4jsf.framework.ajax.AjaxViewRoot;
+import org.ajax4jsf.framework.resource.InternetResource;
+
+/**
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.3 $ $Date: 2007/02/08 15:02:03 $
+ * 
+ */
+public class AjaxViewRootRenderer extends AjaxContainerRenderer {
+
+
+	
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.renderer.AjaxComponentRendererBase#getScripts()
+	 */
+	protected InternetResource[] getScripts() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.renderer.RendererBase#doDecode(javax.faces.context.FacesContext,
+	 *      javax.faces.component.UIComponent)
+	 */
+//	protected void doDecode(FacesContext context, UIComponent component) {
+//		AjaxViewRoot root = (AjaxViewRoot) component;
+//		if(root.isSubmitted()) {
+//			// Find submitted ajax region.
+//			String ajaxId = (String) context.getExternalContext().getRequestParameterMap().get(AJAX_PARAMETER_NAME);
+//			String ajaxRegion = root.getAjaxRegionId(ajaxId);
+//			if(null != ajaxRegion){
+//				root.setSubmittedRegion(ajaxRegion);
+//			}
+//		}
+//	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.renderer.AjaxContainerRenderer#getComponentClass()
+	 */
+	protected Class getComponentClass() {
+		return AjaxViewRoot.class;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.renderer.RendererBase#doEncodeEnd(javax.faces.context.ResponseWriter,
+	 *      javax.faces.context.FacesContext, javax.faces.component.UIComponent)
+	 */
+//	protected void doEncodeEnd(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
+//        UIComponent submittedComponent = ((AjaxViewRoot) component).getSubmittedRegion(context);
+//        if (null == submittedComponent) {
+//    		super.doEncodeEnd(writer,context,component);
+//		} else {
+//			submittedComponent.encodeEnd(context);
+//		}
+//	}
+
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.renderer.RendererBase#doEncodeBegin(javax.faces.context.ResponseWriter,
+	 *      javax.faces.context.FacesContext, javax.faces.component.UIComponent)
+	 */
+//	protected void doEncodeBegin(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
+//		// Reset instance of submitted region
+//		AjaxViewRoot ajaxViewRoot = ((AjaxViewRoot) component);
+//		ajaxViewRoot.resetSubmittedRegionInstance();
+//        UIComponent submittedComponent = ajaxViewRoot.getSubmittedRegion(context);
+//        if (null == submittedComponent) {
+//    		super.doEncodeBegin(writer, context, component);
+//		} else {
+//			submittedComponent.encodeBegin(context);
+//		}
+//	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/ChameleonRenderKit.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/ChameleonRenderKit.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/ChameleonRenderKit.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,40 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.renderer;
+
+import javax.faces.render.RenderKit;
+
+/**
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:58:55 $
+ *
+ */
+public interface ChameleonRenderKit {
+
+
+
+	/**
+	 * @param renderKit
+	 */
+	void setDefaultRenderKit(RenderKit renderKit);
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/ChameleonRenderKitFactory.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/ChameleonRenderKitFactory.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/ChameleonRenderKitFactory.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,131 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.renderer;
+
+import java.util.Iterator;
+
+import javax.faces.FactoryFinder;
+import javax.faces.application.ApplicationFactory;
+import javax.faces.context.FacesContext;
+import javax.faces.render.RenderKit;
+import javax.faces.render.RenderKitFactory;
+
+import org.ajax4jsf.framework.resource.InternetResourceBuilder;
+import org.ajax4jsf.framework.util.message.Messages;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:58:50 $
+ * 
+ */
+public class ChameleonRenderKitFactory extends RenderKitFactory {
+    RenderKitFactory defaultFactory;
+
+    // private static final String AJAX_BASE_RENDER_KIT_PARAMETER =
+        // "AJAX_BASE_RENDERKIT_ID";
+    // private static final String AJAX_RENDER_KIT_PARAMETER =
+        // "AJAX_RENDER_KIT_ID";
+
+    private static final Log _log = LogFactory
+	    .getLog(ChameleonRenderKitFactory.class);
+
+    /**
+         * @param defaultFactory
+         */
+    public ChameleonRenderKitFactory(RenderKitFactory defaultFactory) {
+	if (_log.isDebugEnabled()) {
+	    _log.debug("ChameleonRenderKitFactory(RenderKitFactory) - Chameleon RenderKit factory instantiated"); //$NON-NLS-1$
+	}
+	this.defaultFactory = defaultFactory;
+	// Init resources builder before use.
+	InternetResourceBuilder.getInstance().init();
+    }
+
+    /**
+         * @param renderKitId
+         * @param renderKit
+         */
+    public void addRenderKit(String renderKitId, RenderKit renderKit) {
+	if (_log.isDebugEnabled()) {
+	    _log.debug("addRenderKit(String, RenderKit) - Added RenderKit with id - renderKitId=" + renderKitId); //$NON-NLS-1$
+	}
+	if (renderKit instanceof ChameleonRenderKit) {
+	    // ChameleonRenderKit chameleonRenderKit = (ChameleonRenderKit)
+                // renderKit;
+	    // chameleonRenderKit.setConfiguration(ConfigurationFactory.getRendererConfigurationInstance(renderKitId))
+                // ;
+	}
+	defaultFactory.addRenderKit(renderKitId, renderKit);
+    }
+
+    /**
+         * @param context
+         * @param renderKitId
+         * @return
+         */
+    public RenderKit getRenderKit(FacesContext context, String renderKitId) {
+	RenderKit renderKit = defaultFactory.getRenderKit(context, renderKitId);
+	if (renderKit instanceof ChameleonRenderKit) {
+	    if (_log.isDebugEnabled()) {
+		_log.debug(Messages
+			.getMessage(Messages.REQUEST_CHAMELEON_RENDER_KIT_INFO,
+				renderKitId));
+	    }
+	    String baseRenderKitId = null;
+	    // TODO - get DefaultRenderKitId from ViewHandler ?
+	    try {
+		// IN JSF-RI verifications, context may be null !
+		if (null != context) {
+		    baseRenderKitId = context.getApplication()
+			    .getDefaultRenderKitId();
+		} else {
+		    ApplicationFactory appFactory = (ApplicationFactory) FactoryFinder
+			    .getFactory(FactoryFinder.APPLICATION_FACTORY);
+		    baseRenderKitId = appFactory.getApplication()
+			    .getDefaultRenderKitId();
+		}
+	    } catch (Exception e) {
+		_log.warn(Messages
+			.getMessage(Messages.GET_DEFAULT_RENDER_KIT_ERROR), e);
+	    }
+	    if (baseRenderKitId == null) {
+		baseRenderKitId = RenderKitFactory.HTML_BASIC_RENDER_KIT;
+	    }
+	    if (_log.isDebugEnabled()) {
+		_log.debug(Messages.getMessage(
+			Messages.DEFAULT_RENDER_KIT_INFO, baseRenderKitId));
+	    }
+	    ((ChameleonRenderKit) renderKit).setDefaultRenderKit(defaultFactory
+		    .getRenderKit(context, baseRenderKitId));
+	}
+	return renderKit;
+    }
+
+    /**
+         * @return
+         */
+    public Iterator getRenderKitIds() {
+	return defaultFactory.getRenderKitIds();
+    }
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/ChameleonRenderKitImpl.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/ChameleonRenderKitImpl.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/ChameleonRenderKitImpl.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,163 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.renderer;
+
+import java.io.OutputStream;
+import java.io.Writer;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.faces.FactoryFinder;
+import javax.faces.application.ApplicationFactory;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseStream;
+import javax.faces.context.ResponseWriter;
+import javax.faces.render.RenderKit;
+import javax.faces.render.RenderKitFactory;
+import javax.faces.render.Renderer;
+import javax.faces.render.ResponseStateManager;
+
+/**
+ * Wrapper for default applikation render kit. Only can append any
+ * custom renderers , all other methods delegate to default render kit.
+ * 
+ * @see javax.faces.render.RenderKit 
+ * @author shura
+ *
+ */
+public class ChameleonRenderKitImpl extends RenderKit implements ChameleonRenderKit {
+    
+    private RenderKit defaultRenderKit = null;
+    public static final String RENDER_KIT_ID = "AJAX_HTML_BASIC";
+
+    private Map renderers;
+
+
+    //~ Constructors -------------------------------------------------------------------------------
+
+    public ChameleonRenderKitImpl()
+    {
+        renderers = new HashMap();
+    }
+
+    //~ Methods ------------------------------------------------------------------------------------
+
+    private String key(String componentFamily, String rendererType)
+    {
+        return componentFamily + "." + rendererType;
+    }    
+    /**
+     * @param family
+     * @param rendererType
+     * @param renderer
+     */
+    public void addRenderer(String family, String rendererType,
+            Renderer renderer) {
+    	if (renderer instanceof ChameleonRenderer) {
+			ChameleonRenderer chameleonRenderer = (ChameleonRenderer) renderer;
+//			chameleonRenderer.setConfiguration(getConfiguration().getRendererConfiguration(family,rendererType));
+			
+		}
+        renderers.put(key(family, rendererType), renderer);
+    }
+    /**
+     * @param writer
+     * @param contentTypeList
+     * @param characterEncoding
+     * @return
+     */
+    public ResponseWriter createResponseWriter(Writer writer,
+            String contentTypeList, String characterEncoding) {
+        return getDefaultRenderKit().createResponseWriter(writer, contentTypeList,
+                characterEncoding);
+    }
+    /**
+     * @param family
+     * @param rendererType
+     * @return
+     */
+    public Renderer getRenderer(String family, String rendererType) {
+        Renderer renderer = (Renderer) renderers.get(key(family, rendererType));
+        if (renderer != null) {
+            return renderer;
+        }
+        return getDefaultRenderKit().getRenderer(family, rendererType);
+    }
+    /**
+     * @return
+     */
+    public ResponseStateManager getResponseStateManager() {
+        return getDefaultRenderKit().getResponseStateManager();
+    }
+    
+    
+    /* (non-Javadoc)
+     * @see javax.faces.render.RenderKit#createResponseStream(java.io.OutputStream)
+     */
+    public ResponseStream createResponseStream(OutputStream out)
+    {
+        return getDefaultRenderKit().createResponseStream(out);
+    }
+
+    /**
+     * TODO - create own implementation for @see javax.faces.component.UIViewRoot ,
+     * and get default renderKitId as value, setted at creation time.
+     * in this case, we can substitute concrete renderKit even if it pointed
+     * as value for <f:view> tag on 1.2 specification.
+     * @return Returns the defaultRenderer.
+     */
+    protected RenderKit getDefaultRenderKit() {
+        if (defaultRenderKit == null)
+        {
+        	String defaultRenderkitId = null;
+        	FacesContext context = null;
+            RenderKitFactory rdf = (RenderKitFactory) FactoryFinder.getFactory(FactoryFinder.RENDER_KIT_FACTORY);
+            try {
+				context = FacesContext.getCurrentInstance();
+            	// IN JSF-RI verifications, context may be null !
+            	if(null != context) {
+				defaultRenderkitId = context.getApplication()
+						.getDefaultRenderKitId();
+            	} else {
+                	ApplicationFactory appFactory =(ApplicationFactory) FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY);
+                	defaultRenderkitId = appFactory.getApplication().getDefaultRenderKitId();
+				}
+			} catch (Exception e) {
+				// TODO: handle exception
+			}
+            if(defaultRenderkitId == null ){
+                defaultRenderkitId = RenderKitFactory.HTML_BASIC_RENDER_KIT;
+            }
+            defaultRenderKit = rdf.getRenderKit(context, defaultRenderkitId);
+            
+        }
+
+        return defaultRenderKit;
+    }
+
+	public void setDefaultRenderKit(RenderKit renderKit) {
+		// TODO Auto-generated method stub
+        this.defaultRenderKit = renderKit;
+		
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/ChameleonRenderer.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/ChameleonRenderer.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/ChameleonRenderer.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,37 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.renderer;
+
+import org.ajax4jsf.framework.resource.ResourceProduser;
+
+
+/**
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:58:50 $
+ *
+ */
+public interface ChameleonRenderer extends ResourceProduser{
+	
+
+	
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/ComponentRendererBase.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/ComponentRendererBase.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/ComponentRendererBase.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,108 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.renderer;
+
+import java.util.HashMap;
+import java.util.Stack;
+
+import javax.faces.component.UIComponent;
+
+
+
+/**
+ * Components Base Renderer for all chameleon Skin's and components.
+ * At most, make all common procedures and realise concrete work in "template" methods. 
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:58:52 $
+ *
+ */
+public abstract class ComponentRendererBase extends RendererBase{
+	
+	/**
+	 * logger for common cases. 
+	 */
+	protected static final String COMPONENT_RENDERER_BASE = ComponentRendererBase.class.getName();
+
+
+	public ComponentVariables  getVariables(UIComponent component) {
+		HashMap components;
+		Stack stackComponentsVariables;		
+		ComponentVariables variables;
+		
+		
+		
+		components = (HashMap)component.getAttributes().get( COMPONENT_RENDERER_BASE );
+		
+		if ( components == null ) {
+			components = new HashMap();
+			component.getAttributes().put( COMPONENT_RENDERER_BASE, components );
+		}
+
+		stackComponentsVariables = (Stack)components.get( this.getClass().getName() );
+
+		if ( stackComponentsVariables == null ) {
+			stackComponentsVariables = new Stack();
+			components.put( COMPONENT_RENDERER_BASE, stackComponentsVariables );	
+		}
+
+		if ( stackComponentsVariables.empty() ) {
+			variables = new ComponentVariables();
+			stackComponentsVariables.push( variables );
+		} else {
+			variables = (ComponentVariables)stackComponentsVariables.peek();
+		}
+
+		return variables;
+	}
+
+	public void removeVariables(UIComponent component) {
+	        HashMap components;
+                Stack stackComponentsVariables;
+                ComponentVariables variables;
+
+
+
+                components = (HashMap)component.getAttributes().get( COMPONENT_RENDERER_BASE );
+
+                if ( components != null ) {
+	
+        	        stackComponentsVariables = (Stack)component.getAttributes().get( this.getClass().getName() );
+
+                	if ( stackComponentsVariables != null ) {
+                		if ( !stackComponentsVariables.empty() ) {
+                			stackComponentsVariables.pop();
+				}
+				
+				if ( stackComponentsVariables.empty()  ) {
+					components.remove( this.getClass().getName() );
+				}
+			}
+
+			if ( components.isEmpty()  ) {
+                                component.getAttributes().remove( COMPONENT_RENDERER_BASE  );
+                        }
+				
+					
+                } 
+
+	}
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/ComponentUtils.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/ComponentUtils.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/ComponentUtils.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,134 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.renderer;
+
+import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
+
+import javax.faces.FacesException;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+import javax.faces.el.MethodNotFoundException;
+
+import org.ajax4jsf.framework.util.message.Messages;
+import org.apache.commons.beanutils.MethodUtils;
+
+/**
+ * 	Utils for working with tempates
+ *  @author ayukhovich at exadel.com (latest modification by $Author: alexsmirnov $)
+ *  @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:58:52 $
+ */
+public class ComponentUtils {
+	private final static String UTILS_PREFIX = "util.";
+	/**
+	 * 
+	 * @param className
+	 * @param functionName
+	 * @param parameters
+	 * @return
+	 */
+	public static Object callFunction( FacesContext context, UIComponent component, RendererBase renderer, String functionName, Object[] parameters ) {
+
+		Object returnObject = null;
+		
+		int sizeParameters = 0;
+		int sizeArrayParameters = 2;
+		if ( parameters != null ) {
+			sizeParameters = parameters.length;
+			sizeArrayParameters = 3;
+		}
+		
+		Object[][] arrayParameters = new Object[sizeArrayParameters][];
+		arrayParameters[0] = new Object[sizeParameters+2];
+		arrayParameters[1] = new Object[sizeParameters+1];
+		
+		if ( sizeParameters != 0 ) {
+			arrayParameters[2] = new Object[sizeParameters];
+		}
+		
+		arrayParameters[0][0] = context;
+		arrayParameters[0][1] = component;
+		arrayParameters[1][0] = component;
+		
+		if ( parameters != null ) {
+			for (int iParameter=0;iParameter<parameters.length;iParameter++) {
+				arrayParameters[0][iParameter+2] = parameters;
+				arrayParameters[1][iParameter+1] = parameters;
+				arrayParameters[2][iParameter] = parameters;
+			}
+		}
+		
+		String methodName;
+		Object object;
+		if(functionName.startsWith(UTILS_PREFIX)){
+			methodName = functionName.substring(UTILS_PREFIX.length());			
+			object = renderer.getUtils();
+		} else {
+			object = renderer;
+			methodName = functionName;			
+		}
+
+
+		returnObject = invokeMethod(object, methodName, arrayParameters );
+	
+		return returnObject;
+	}
+
+	/**
+	 * Invoke a named method whose parameter type matches the object type.
+	 * @param objects - invoke method on this object
+	 * @param methodName - get method with this name
+	 * @param arrayParameters - use these arguments - treat null as empty array
+	 * @return
+	 */
+	private static Object invokeMethod(Object object, String methodName, Object[][] arrayParameters) {
+		
+		try {
+			for (int iParameter = 0; iParameter < arrayParameters.length; iParameter++) {
+				try {
+					return MethodUtils.invokeMethod(object, methodName, arrayParameters[iParameter]);
+				} catch (NoSuchMethodException e) {
+					continue;
+				}
+			}
+		} catch (InvocationTargetException e) {
+			throw new FacesException(Messages.getMessage(Messages.METHOD_CALL_ERROR_2b, methodName, e.getCause().getMessage()), e);
+		} catch (IllegalAccessException e) {
+			throw new FacesException(Messages.getMessage(Messages.METHOD_CALL_ERROR_4b, methodName, e.getMessage()), e);
+		}
+		throw new MethodNotFoundException(Messages.getMessage(Messages.METHOD_CALL_ERROR_6b, methodName, object));
+	}
+	
+	/**
+	 * Write html-attribute
+	 * @param writer
+	 * @param attribute
+	 * @param value
+	 * @throws IOException
+	 */
+	public static void writeAttribute(ResponseWriter writer, String attribute, Object value ) throws IOException {
+		if ( (value != null) && (value.toString().length()!=0) ) {
+			writer.writeAttribute(attribute, value.toString(), attribute );
+		}
+	}
+}	

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/ComponentVariables.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/ComponentVariables.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/ComponentVariables.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,93 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.renderer;
+
+import java.io.IOException;
+import java.io.Serializable;
+import java.util.HashMap;
+
+/**
+ * 	storing tempates variables
+ *  @author ayukhovich at exadel.com (latest modification by $Author: alexsmirnov $)
+ *  @version $Revision: 1.1.2.2 $ $Date: 2007/02/28 17:01:01 $
+ */
+public class ComponentVariables implements Serializable {
+	
+	private transient HashMap variablesMap = new HashMap();
+	
+	/**
+	 * setting variable 
+	 * @param variableName
+	 * @param variable
+	 */
+	public void setVariable(final String variableName, final Object variable ) {
+		variablesMap.put(variableName, variable);	
+	}
+	
+	/**
+	 * 
+	 * @param variableName
+	 * @return
+	 */
+	public Object getVariable(final String variableName ) {
+		return variablesMap.get(variableName);
+	}
+	
+	
+	/**
+	 *
+	 * @param variableName
+	 * @param addValue
+	 */
+	public void addValueToVariable(final String variableName, final Object addValue) {
+		Object variable = getVariable(variableName);
+		if ( variable == null )
+			return;
+		
+		if (variable instanceof Integer) {
+			addToValue( variableName,(Integer) variable,  addValue);
+		}
+	}
+	
+	/**
+	 * 
+	 * @param variableName
+	 * @param variable
+	 * @param addValue
+	 */
+	protected void addToValue(final String variableName, Integer variable, final Object addValue ) {
+		Integer retultValue;
+		if ( addValue instanceof Integer )	{
+			Integer intAddValue =(Integer)addValue; 
+			retultValue = new Integer(variable.intValue() + intAddValue.intValue());
+		} else {
+			retultValue = variable;
+		}
+		
+		setVariable(variableName, retultValue);
+	}
+	
+	private void readObject(java.io.ObjectInputStream in)
+    throws IOException, ClassNotFoundException{
+		variablesMap = new HashMap();
+	}
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/ComponentsVariableResolver.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/ComponentsVariableResolver.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/ComponentsVariableResolver.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,62 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.renderer;
+
+import javax.faces.component.UIComponent;
+
+/**
+ * Resolve component variables
+ * 
+ * @author ayukhovich at exadel.com (latest modification by $Author:
+ *         alexeyyukhovich $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:58:53 $
+ */
+public class ComponentsVariableResolver {
+	private static String COMPONENTS_VARIABLE_RESOLVER = ComponentsVariableResolver.class
+			.getName();
+
+	private static String getAttributeName(RendererBase renderer) {
+		return COMPONENTS_VARIABLE_RESOLVER + ":" + (renderer != null ? renderer.getClass().getName() : null);
+	}
+	
+	public static ComponentVariables getVariables(RendererBase renderer,
+			UIComponent component) {
+		ComponentVariables variables;
+
+		String attributeName = getAttributeName(renderer);
+		
+		variables = (ComponentVariables) component.getAttributes().get(attributeName);
+
+		if (variables == null) {
+			variables = new ComponentVariables();
+		
+			component.getAttributes().put(attributeName, variables);
+		}
+
+		return variables;
+	}
+
+	public static void removeVariables(RendererBase renderer,
+			UIComponent component) {
+		component.getAttributes().remove(getAttributeName(renderer));
+	}
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/HeaderResourceProducer.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/HeaderResourceProducer.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/HeaderResourceProducer.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,55 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.renderer;
+
+import java.util.LinkedHashSet;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+
+/**
+ * Interface for renderers, for wich nessesary insert script or style resource in header.
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:58:50 $
+ *
+ */
+public interface HeaderResourceProducer {
+	
+	/**
+	 * Return set of strings with URI's of nessesary scripts.
+	 * Use linked set to preserve insertion order
+	 * @param context - current faces context.
+	 * @param component TODO
+	 * @return - set of URI's or null
+	 */
+	public LinkedHashSet getHeaderScripts(FacesContext context, UIComponent component);
+
+	/**
+	 * Return set of strings with URI's of nessesary CSS styles.
+	 * Use linked set to preserve insertion order.
+	 * @param context - current faces context.
+	 * @param component TODO
+	 * @return - set of URI's or null
+	 */
+	public LinkedHashSet getHeaderStyles(FacesContext context, UIComponent component);
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/HeaderResourcesRendererBase.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/HeaderResourcesRendererBase.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/HeaderResourcesRendererBase.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,136 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.renderer;
+
+import java.io.IOException;
+import java.util.LinkedHashSet;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+
+import org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter;
+import org.ajax4jsf.framework.resource.InternetResource;
+
+/**
+ * Base renderer for components used JavaScripts and Styles in header. In real
+ * class override getScripts or/and getStyles methods
+ * 
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:58:51 $
+ * 
+ */
+public abstract class HeaderResourcesRendererBase extends RendererBase
+		implements HeaderResourceProducer {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.renderer.HeaderResourceProducer#getHeaderScripts(javax.faces.context.FacesContext)
+	 */
+	public  LinkedHashSet getHeaderScripts(FacesContext context,
+			UIComponent component) {
+		return getUrisSet(context, getScripts(), component);
+	}
+
+	/**
+	 * Hoock method to return array of scripts resources to store in head.
+	 * 
+	 * @return
+	 */
+	protected InternetResource[] getScripts() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.renderer.HeaderResourceProducer#getHeaderStyles(javax.faces.context.FacesContext)
+	 */
+	public  LinkedHashSet getHeaderStyles(FacesContext context,
+			UIComponent component) {
+		return getUrisSet(context, getStyles(), component);
+	}
+
+	/**
+	 * Hoock method to return array of styles resources to store in head
+	 * 
+	 * @return
+	 */
+	protected InternetResource[] getStyles() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	/**
+	 * @param context
+	 * @param resources
+	 * @param component
+	 *            TODO
+	 * @return
+	 */
+	private LinkedHashSet getUrisSet(FacesContext context,
+			InternetResource[] resources, UIComponent component) {
+		if (null != resources) {
+			LinkedHashSet uris = new LinkedHashSet(); // Collections.singleton(ajaxScript.getUri(context,
+														// null));
+			for (int i = 0; i < resources.length; i++) {
+				InternetResource resource = resources[i];
+				uris.add(resource.getUri(context, component));
+			}
+			return uris;
+		}
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.renderer.RendererBase#preEncodeBegin(javax.faces.context.FacesContext,
+	 *      javax.faces.component.UIComponent)
+	 */
+	protected void preEncodeBegin(FacesContext context, UIComponent component)
+			throws IOException {
+		if ((null == context.getExternalContext().getRequestMap().get(
+				BaseFilter.RESPONSE_WRAPPER_ATTRIBUTE))
+				/*&& (!AjaxRendererUtils.isAjaxRequest(context))*/) {
+			// Filter not used - encode scripts and CSS before component.
+			encodeResourcesArray(context, component, getScripts());
+			encodeResourcesArray(context, component, getStyles());
+		}
+	}
+
+	/**
+	 * @param context
+	 * @param component
+	 * @param scripts
+	 * @throws IOException
+	 */
+	protected void encodeResourcesArray(FacesContext context, UIComponent component, InternetResource[] scripts) throws IOException {
+		if (scripts != null) {
+			for (int i = 0; i < scripts.length; i++) {
+				scripts[i].encode(context,component);
+			}
+		}
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/JSONDataSerializer.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/JSONDataSerializer.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/JSONDataSerializer.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,45 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.renderer;
+
+import net.sf.json.JSONSerializer;
+
+/**
+ * @author shura
+ *
+ */
+public class JSONDataSerializer extends AJAXDataSerializer {
+	
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.AJAXDataSerializer#asString(java.lang.Object)
+	 */
+	public String asString(Object data) {
+		StringBuffer result = new StringBuffer();
+		if(null != data){
+			result.append("<![CDATA[ ");
+			result.append(JSONSerializer.toJSON(data));
+			result.append(" ]]>");
+		}
+		return result.toString();
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/PrototypeBasedRendererBase.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/PrototypeBasedRendererBase.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/PrototypeBasedRendererBase.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,65 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.renderer;
+
+import java.util.LinkedHashSet;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+
+import org.ajax4jsf.framework.resource.InternetResource;
+import org.ajax4jsf.framework.resource.PrototypeScript;
+
+
+/**
+ * @author Maksim Kaszynski
+ *
+ */
+public abstract class PrototypeBasedRendererBase extends RendererBase implements HeaderResourceProducer{
+
+	protected static final String[] EMPTY_ARRAY = {};
+	private InternetResource prototypeScript = getResource(PrototypeScript.class.getName());
+	
+	public LinkedHashSet getHeaderScripts(FacesContext context, UIComponent component) {
+		LinkedHashSet scripts = new LinkedHashSet() ; // Collections.singleton(ajaxScript.getUri(context, null));
+		scripts.add(prototypeScript.getUri(context, null));
+		String[] additionalScripts = getAdditionalScripts();
+		for (int i = 0; i < additionalScripts.length; i++) {
+			String resource = additionalScripts[i];
+			scripts.add(getResource(resource).getUri(context, null));
+		}
+		return scripts;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.HeaderResourceProducer#getHeaderStyles(javax.faces.context.FacesContext)
+	 */
+	public LinkedHashSet getHeaderStyles(FacesContext context, UIComponent component) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	protected String[] getAdditionalScripts() {
+		return EMPTY_ARRAY;
+	}
+	
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/RendererBase.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/RendererBase.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/RendererBase.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,289 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.renderer;
+
+import java.io.IOException;
+import java.util.Iterator;
+
+import javax.faces.FacesException;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+import javax.faces.render.Renderer;
+
+import org.ajax4jsf.framework.resource.InternetResource;
+import org.ajax4jsf.framework.resource.InternetResourceBuilder;
+import org.ajax4jsf.framework.resource.ResourceNotFoundException;
+import org.ajax4jsf.framework.skin.Skin;
+import org.ajax4jsf.framework.skin.SkinFactory;
+import org.ajax4jsf.framework.util.message.Messages;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+
+/**
+ * Base Renderer for all chameleon Skin's and components.
+ * At most, make all common procedures and realise concrete work in "template" methods. 
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:58:51 $
+ *
+ */
+public abstract class RendererBase extends Renderer implements
+		ChameleonRenderer {
+	
+	/**
+	 * logger for common cases. 
+	 */
+	protected static final String JAVASCRIPT_NAMESPACE = "Exadel";
+	private static final Log log = LogFactory.getLog(RendererBase.class);
+	private static final RendererUtils utils = new RendererUtils();
+
+	private SkinFactory skinFactory = null;
+	private InternetResourceBuilder resourceBuilder = null;
+	/* (non-Javadoc)
+	 * @see javax.faces.render.Renderer#decode(javax.faces.context.FacesContext, javax.faces.component.UIComponent)
+	 */
+	public void decode(FacesContext context, UIComponent component) {
+		// Test for correct parameters.
+        if (context == null) throw new NullPointerException(Messages.getMessage(Messages.CONTEXT_NULL_ERROR, "decode"));
+        if (component == null) throw new NullPointerException(Messages.getMessage(Messages.COMPONENT_NULL_ERROR, "decode"));
+        if (! getComponentClass().isInstance(component)) throw new IllegalArgumentException(Messages.getMessage(Messages.COMPONENT_CLASS_ERROR, "", getComponentClass().getName()));
+        if(log.isDebugEnabled()){
+        	log.debug(Messages.getMessage(Messages.START_DECODING_COMPONENT_INFO, component.getClientId(context), component.getClass().getName()));
+        }		
+		preDecode(context,component);
+        // TODO - create set od common decoders ( UIInput, ActionSource etc. ) for process decoding.
+        if (component.isRendered()) {
+			doDecode(context, component);
+		}
+	}
+
+	protected void preDecode(FacesContext context, UIComponent component)   {
+	}
+
+	protected void preEncodeBegin(FacesContext context, UIComponent component) throws IOException  {
+		
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.render.Renderer#encodeBegin(javax.faces.context.FacesContext, javax.faces.component.UIComponent)
+	 */
+	public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
+		// Test for correct parameters.
+        if (context == null) throw new NullPointerException(Messages.getMessage(Messages.CONTEXT_NULL_ERROR, "encodeBegin"));
+        if (component == null) throw new NullPointerException(Messages.getMessage(Messages.COMPONENT_NULL_ERROR, "encodeBegin"));
+        if (! getComponentClass().isInstance(component)) throw new IllegalArgumentException(Messages.getMessage(Messages.COMPONENT_CLASS_ERROR, component.getClientId(context), getComponentClass().getName()));
+        if(log.isDebugEnabled()){
+        	log.debug(Messages.getMessage(Messages.START_ENCODING_COMPONENT_INFO, component.getClientId(context), component.getClass().getName()));
+        }
+		preEncodeBegin(context,component);
+        if (component.isRendered()) {
+			ResponseWriter writer = context.getResponseWriter();
+			doEncodeBegin(writer, context, component);
+		}
+	}
+	
+	
+
+	/* (non-Javadoc)
+	 * @see javax.faces.render.Renderer#encodeChildren(javax.faces.context.FacesContext, javax.faces.component.UIComponent)
+	 */
+	public void encodeChildren(FacesContext context, UIComponent component) throws IOException {
+		// Test for correct parameters.
+        if (context == null) throw new NullPointerException(Messages.getMessage(Messages.CONTEXT_NULL_ERROR, "encodeBegin"));
+        if (component == null) throw new NullPointerException(Messages.getMessage(Messages.COMPONENT_NULL_ERROR, "encodeBegin"));
+        if (! getComponentClass().isInstance(component)) throw new IllegalArgumentException(Messages.getMessage(Messages.COMPONENT_CLASS_ERROR, component.getClientId(context), getComponentClass().getName()));
+        if(log.isDebugEnabled()){
+        	log.debug(Messages.getMessage(Messages.CHILDREN_ENCODING_COMPONENT_INFO, component.getClientId(context), component.getClass().getName()));
+        }
+		preEncodeBegin(context,component);
+        if (component.isRendered()) {
+			ResponseWriter writer = context.getResponseWriter();
+			doEncodeChildren(writer, context, component);
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.render.Renderer#encodeEnd(javax.faces.context.FacesContext, javax.faces.component.UIComponent)
+	 */
+	public void encodeEnd(FacesContext context, UIComponent component) throws IOException {
+		// Test for correct parameters.
+        if (context == null) throw new NullPointerException(Messages.getMessage(Messages.CONTEXT_NULL_ERROR, "encodeEnd"));
+        if (component == null) throw new NullPointerException(Messages.getMessage(Messages.COMPONENT_NULL_ERROR, "encodeEnd"));
+        if (! getComponentClass().isInstance(component)) throw new IllegalArgumentException(Messages.getMessage(Messages.COMPONENT_CLASS_ERROR, component.getClientId(context), getComponentClass().getName()));
+        if (component.isRendered()) {
+			ResponseWriter writer = context.getResponseWriter();
+			doEncodeEnd(writer, context, component);
+		}
+        if(log.isDebugEnabled()){
+        	log.debug(Messages.getMessage(Messages.FINISH_ENCODING_COMPONENT_INFO, component.getClientId(context), component.getClass().getName()));
+        }
+	}
+
+	/**
+	 * Base stub method for produce internet resource ( image, script ... )
+	 * since resources must be implemented in "lightweight" pattern, it instances
+	 * put in internal map to caching.
+	 * @param resourceURI - relative ( to renderer class ) uri to resource in jar or
+	 * key for generate ( in Java2D , for example ). 
+	 * @return - resource instance for this uri.
+	 * @throws ResourceNotFoundException - if reqested resource not instantiated.
+	 */
+	public InternetResource getResource(String resourceURI ) throws FacesException {
+		return getResourceBuilder().createResource(this,resourceURI);
+	}
+
+	private InternetResourceBuilder getResourceBuilder(){
+		if (resourceBuilder == null) {
+			resourceBuilder = InternetResourceBuilder.getInstance();
+			
+		}
+
+		return resourceBuilder;
+	}
+	//==========================================================
+	// Protected common methods - for all Renderer's
+	
+	/**
+	 * Calculate current Skin for rendering.
+	 * @param context - current {@link FacesContext }
+	 * @return
+	 */
+	protected Skin	getSkin(FacesContext context) {
+		if (skinFactory == null) {
+			skinFactory = SkinFactory.getInstance();
+			
+		}
+
+		return skinFactory.getSkin(context);
+	}
+	
+	
+	/**
+	 * Due to big number of common utility methods, base renderer divide to 2 classes - renderer and utils.
+	 * since use static methods of utility class breack object paradigm, we use getter for concrete util instance.
+	 * Developer can override any utility metod in 2 stages :
+	 * 1) Create subclass of {@link RendererUtils} and override utility method.
+	 * 2) Override this method for return instance of such subclass.
+	 * 
+	 * @return Returns the utils.
+	 */
+	public RendererUtils getUtils() {
+		return utils;
+	}
+
+
+	/**
+	 * Get base component slass , targetted for this renderer. Used for check arguments in decode/encode.
+	 * @return
+	 */
+	protected abstract Class getComponentClass();
+
+
+	/**
+	 * Template method for custom decoding of concrete renderer.
+	 * All parameters checking if performed in original {@see decode } method.
+	 * @param context
+	 * @param component
+	 */
+	protected void doDecode(FacesContext context, UIComponent component) {
+		
+	}
+
+	/**
+	 * Template method for custom start encoding of concrete renderer.
+	 * All parameters checking and writer is performed in original {@link encodeBegin } method.
+	 * @param writer
+	 * @param context
+	 * @param component
+	 */
+	protected void doEncodeBegin(ResponseWriter writer,FacesContext context, UIComponent component) throws IOException {
+		
+	}
+	/**
+	 * @param writer
+	 * @param context
+	 * @param component
+	 */
+	protected void doEncodeChildren(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException  {
+		// Hook method, must be overriden in renderers with special children processing
+	}
+
+	/**
+	 * Template method for custom finish encoding of concrete renderer.
+	 * All parameters checking and writer is performed in original {@link encodeEnd } method.
+	 * @param writer
+	 * @param context
+	 * @param component
+	 * @throws IOException 
+	 */
+	protected void doEncodeEnd(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
+		
+	}
+	/**
+	 * Append new resource to renderer cache.
+	 * @param key
+	 * @param resource
+	 */
+	protected void addResource(String key, InternetResource resource) {
+		getResourceBuilder().addResource(key,resource);
+	}
+
+    /**
+     * Render all children for given component.
+     * @param facesContext
+     * @param component
+     * @throws IOException
+     */
+    public void renderChildren(FacesContext facesContext,
+			UIComponent component) throws IOException {
+		if (component.getChildCount() > 0) {
+			for (Iterator it = component.getChildren().iterator(); it.hasNext();) {
+				UIComponent child = (UIComponent) it.next();
+				renderChild(facesContext, child);
+			}
+		}
+	}
+
+
+	/**
+	 * Render one component and it childrens
+	 * @param facesContext
+	 * @param child
+	 * @throws IOException
+	 */
+	public void renderChild(FacesContext facesContext, UIComponent child)
+			throws IOException {
+		if (!child.isRendered()) {
+			return;
+		}
+
+		child.encodeBegin(facesContext);
+		if (child.getRendersChildren()) {
+			child.encodeChildren(facesContext);
+		} else {
+			renderChildren(facesContext, child);
+		}
+		child.encodeEnd(facesContext);
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/RendererUtils.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/RendererUtils.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/RendererUtils.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,803 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.renderer;
+
+import java.awt.Dimension;
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.faces.FacesException;
+import javax.faces.application.ViewHandler;
+import javax.faces.component.EditableValueHolder;
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIForm;
+import javax.faces.component.UIViewRoot;
+import javax.faces.component.ValueHolder;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+import javax.faces.convert.Converter;
+
+import org.ajax4jsf.framework.renderer.compiler.TemplateContext;
+import org.ajax4jsf.framework.resource.InternetResource;
+import org.ajax4jsf.framework.resource.Java2Dresource;
+import org.ajax4jsf.framework.util.HtmlDimensions;
+import org.ajax4jsf.framework.util.message.Messages;
+
+
+/**
+ * Util class for common render operations - render passthru html attributes,
+ * iterate over child components etc.
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.6 $ $Date: 2007/02/08 19:07:16 $
+ *
+ */
+public class RendererUtils {
+	
+	public static final String DUMMY_FORM_ID = ":_form";
+	/**
+	 * Substitutions for components properies names and HTML attributes names.
+	 */
+	private static Map substitutions = new HashMap();
+
+	static {
+		substitutions.put(HTML.class_ATTRIBUTE,"styleClass");
+		Arrays.sort(HTML.PASS_THRU);
+		Arrays.sort(HTML.PASS_THRU_BOOLEAN);
+		Arrays.sort(HTML.PASS_THRU_URI);
+	}
+	/**
+	 * Common HTML elements and attributes names.
+	 * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+	 * @version $Revision: 1.1.2.6 $ $Date: 2007/02/08 19:07:16 $
+	 *
+	 */
+	public interface HTML {
+		// elements
+		public static final String BUTTON = "button";
+		// attributes
+		public static final String id_ATTRIBUTE = "id";
+		public static final String class_ATTRIBUTE = "class";
+//		public static final String STYLE_ATTRIBUTE = "style";
+//	    public static final String dir_ATTRIBUTE   = "dir";
+//	    public static final String lang_ATTRIBUTE  = "lang";
+//	    public static final String title_ATTRIBUTE = "title";
+	    public static final String accesskey_ATTRIBUTE = "accesskey";
+	    public static final String alt_ATTRIBUTE = "alt";
+	    public static final String cols_ATTRIBUTE = "cols";
+
+		public static final String height_ATTRIBUTE = "height";
+
+		public static final String lang_ATTRIBUTE = "lang";
+
+		public static final String longdesc_ATTRIBUTE = "longdesc";
+
+		public static final String maxlength_ATTRIBUTE = "maxlength";
+
+		public static final String onblur_ATTRIBUTE = "onblur";
+
+		public static final String onchange_ATTRIBUTE = "onchange";
+
+		public static final String onclick_ATTRIBUTE = "onclick";
+
+		public static final String ondblclick_ATTRIBUTE = "ondblclick";
+
+		public static final String onfocus_ATTRIBUTE = "onfocus";
+
+		public static final String onkeydown_ATTRIBUTE = "onkeydown";
+
+		public static final String onkeypress_ATTRIBUTE = "onkeypress";
+
+		public static final String onkeyup_ATTRIBUTE = "onkeyup";
+
+		public static final String onload_ATTRIBUTE = "onload";
+
+		public static final String onmousedown_ATTRIBUTE = "onmousedown";
+
+		public static final String onmousemove_ATTRIBUTE = "onmousemove";
+
+		public static final String onmouseout_ATTRIBUTE = "onmouseout";
+
+		public static final String onmouseover_ATTRIBUTE = "onmouseover";
+
+		public static final String onmouseup_ATTRIBUTE = "onmouseup";
+
+		public static final String onreset_ATTRIBUTE = "onreset";
+
+		public static final String onselect_ATTRIBUTE = "onselect";
+
+		//	    public static final String onsubmit_ATTRIBUTE = "onsubmit";
+	    public static final String onunload_ATTRIBUTE = "onunload";
+
+		public static final String rows_ATTRIBUTE = "rows";
+
+		public static final String size_ATTRIBUTE = "size";
+
+		public static final String tabindex_ATTRIBUTE = "tabindex";
+
+		public static final String title_ATTRIBUTE = "title";
+
+		public static final String style_ATTRIBUTE = "style";
+
+		public static final String align_ATTRIBUTE = "align";
+
+		public static final String width_ATTRIBUTE = "width";
+
+		public static final String dir_ATTRIBUTE = "dir";
+
+		public static final String rules_ATTRIBUTE = "rules";
+
+		public static final String frame_ATTRIBUTE = "frame";
+
+		public static final String border_ATTRIBUTE = "border";
+
+		public static final String cellspacing_ATTRIBUTE = "cellspacing";
+
+		public static final String cellpadding_ATTRIBUTE = "cellpadding";
+
+		public static final String summary_ATTRIBUTE = "summary";
+
+		public static final String bgcolor_ATTRIBUTE = "bgcolor";
+
+		public static final String usemap_ATTRIBUTE = "usemap";
+
+		public static final String enctype_ATTRIBUTE = "enctype";
+
+		public static final String accept_charset_ATTRIBUTE = "accept-charset";
+
+		public static final String accept_ATTRIBUTE = "accept";
+
+		public static final String target_ATTRIBUTE = "target";
+
+		public static final String onsubmit_ATTRIBUTE = "onsubmit";
+
+		public static final String readonly_ATTRIBUTE = "readonly";
+
+		public static final String nowrap_ATTRIBUTE = "nowrap";
+
+		//public static final String onreset_ATTRIBUTE = "onreset"; 
+	    // attributes sets.
+		public static final String[] PASS_THRU = {
+//			DIR_ATTRIBUTE,
+//			LANG_ATTRIBUTE,
+//			STYLE_ATTRIBUTE,
+//			TITLE_ATTRIBUTE
+			"accesskey",
+			"alt",
+			"cols",
+			"height",
+			"lang",
+			"longdesc",
+			"maxlength",
+			"onblur",
+			"onchange",
+			"onclick",
+			"ondblclick",
+			"onfocus",
+			"onkeydown",
+			"onkeypress",
+			"onkeyup",
+			"onload",
+			"onmousedown",
+			"onmousemove",
+			"onmouseout",
+			"onmouseover",
+			"onmouseup",
+			"onreset",
+			"onselect",
+			"onsubmit",
+			"onunload",
+			"rows",
+			"size",
+			"tabindex",
+			"title",
+			"width",
+			"dir",
+			"rules",
+			"frame",
+			"border",
+			"cellspacing",
+			"cellpadding",
+			"summary",
+			"bgcolor",
+			"usemap",
+			"enctype",
+			"accept-charset",
+			"accept",
+			"target",
+			"charset",
+			"coords",
+			"hreflang",
+			"rel",
+			"rev",
+			"shape",
+	        "disabled",
+	        "readonly",
+	        "ismap"			
+
+		};
+		
+		/**
+		 * HTML attributes allowed boolean-values only 
+		 */
+		public static final String[] PASS_THRU_BOOLEAN = {
+	        "disabled",
+	        "declare",
+	        "readonly",
+	        "compact",
+	        "ismap",
+	        "selected",
+	        "checked",
+	        "nowrap",
+	        "noresize",
+	        "nohref",
+	        "noshade",
+	        "multiple"
+		};
+		
+		
+		/**
+		 * all HTML attributes with URI value. 
+		 */
+		public static final String[] PASS_THRU_URI = {
+	        "usemap",
+	        "background",
+	        "codebase",
+	        "cite",
+	        "data",
+	        "classid",
+	        "href",
+	        "longdesc",
+	        "profile",
+	        "src"
+		};
+
+		public static final String[] PASS_THRU_STYLES = {
+	        "style",
+	        "class",
+		};
+
+		public static final String SPAN_ELEM = "span";
+		public static final String DIV_ELEM = "div";
+		public static final String SCRIPT_ELEM = "script";
+		public static final String STYLE_CLASS_ATTR = "styleClass";
+		public static final String DISABLED_ATTR = "disabled";
+		public static final String TYPE_ATTR = "type";
+		public static final String CHARSET_ATTR = "charset";
+		public static final String COORDS_ATTR = "coords";
+		public static final String HREFLANG_ATTR = "hreflang";
+		public static final String REL_ATTR = "rel";
+		public static final String REV_ATTR = "rev";
+		public static final String SHAPE_ATTR = "shape";
+		public static final String title_ELEM = "title";
+		public static final String FORM_ELEMENT = "form";
+		public static final String NAME_ATTRIBUTE = "name";
+		public static final String METHOD_ATTRIBUTE = "method";
+		public static final String ACTION_ATTRIBUTE = "action";
+		public static final String INPUT_ELEM = "input";
+		public static final Object INPUT_TYPE_HIDDEN = "hidden";
+		public static final String value_ATTRIBUTE = "value";
+		public static final String td_ELEM = "td";
+		public static final String th_ELEM = "th";
+		public static final String valign_ATTRIBUTE = "valign";
+		public static final String a_ELEMENT = "a";
+		public static final String HTML_ELEMENT = "html";
+		public static final String BODY_ELEMENT = "body";
+		public static final String TR_ELEMENT = "tr";
+		public static final String CAPTION_ELEMENT = "caption";
+		public static final String THEAD_ELEMENT = "thead";
+		public static final String TFOOT_ELEMENT = "tfoot";
+	}
+
+	/**
+	 * Encode id attribute with clientId component property 
+	 * @param context
+	 * @param component
+	 * @throws IOException
+	 */
+	public void encodeId(FacesContext context, UIComponent component) throws IOException {
+		encodeId(context,component,HTML.id_ATTRIBUTE);
+	}
+	
+	/**
+	 * Encode clientId to custom attribute ( for example, to control name )
+	 * @param context
+	 * @param component
+	 * @param attribute
+	 * @throws IOException
+	 */
+	public void encodeId(FacesContext context,UIComponent component, String attribute) throws IOException {
+		String clientId = null;
+		try {
+			clientId = component.getClientId(context);
+		} catch(Exception e) {
+			//just ignore if clientId wasn't inited yet
+		}
+		if (null != clientId) {
+			context.getResponseWriter().writeAttribute(attribute,
+					clientId,
+					(String) getComponentAttributeName(attribute)); 
+		}
+	}
+	/**
+	 * Encode id attribute with clientId component property.
+	 * Encoded only if id not auto generated.  
+	 * @param context
+	 * @param component
+	 * @throws IOException
+	 */
+	public void encodeCustomId(FacesContext context, UIComponent component) throws IOException {
+		if(component.getId() != null && !component.getId().startsWith(UIViewRoot.UNIQUE_ID_PREFIX)){
+			context.getResponseWriter().writeAttribute(HTML.id_ATTRIBUTE,component.getClientId(context),HTML.id_ATTRIBUTE);
+		}
+	}
+	
+	/**
+	 * Encode common pass-thru html attributes.
+	 * @param context
+	 * @param component
+	 * @throws IOException
+	 */
+	public void encodePassThru(FacesContext context, UIComponent component) throws IOException {
+		encodeAttributesFromArray(context,component,HTML.PASS_THRU);
+	}
+	
+	/**
+	 * Encode pass-through attributes except specified ones
+	 * @param context
+	 * @param component
+	 * @param exclusions
+	 * @throws IOException
+	 */
+	public void encodePassThruWithExclusions(FacesContext context, UIComponent component,String exclusions) throws IOException{
+		if (null != exclusions) {
+			String[] exclusionsArray = exclusions.split(",");
+			encodePassThruWithExclusionsArray(context,component,exclusionsArray);
+		}
+	}
+
+	public void encodePassThruWithExclusionsArray(FacesContext context, UIComponent component,String[] exclusions) throws IOException {
+		ResponseWriter writer = context.getResponseWriter();
+		Map attributes = component.getAttributes();
+		Arrays.sort(exclusions);
+		for (int i = 0; i < HTML.PASS_THRU.length; i++) {
+			String attribute = HTML.PASS_THRU[i];
+			if(Arrays.binarySearch(exclusions, attribute) < 0){
+				encodePassThruAttribute(context, attributes, writer, attribute);
+			}
+		}
+	}
+
+	/**
+	 * Encode one pass-thru attribute, with plain/boolean/url value, got from properly component attribute.
+	 * @param context
+	 * @param component
+	 * @param writer
+	 * @param attribute
+	 * @throws IOException
+	 */
+	public void encodePassThruAttribute(FacesContext context, Map attributes, ResponseWriter writer, String attribute) throws IOException {
+		Object value = attributeValue(attribute,attributes.get(getComponentAttributeName(attribute)));
+		if (null != value && shouldRenderAttribute(value)) {
+			if(Arrays.binarySearch(HTML.PASS_THRU_URI, attribute)>=0){
+				String url = context.getApplication().getViewHandler().getResourceURL(context, value.toString());
+				url = context.getExternalContext().encodeResourceURL(url);
+				writer.writeURIAttribute(attribute,url,attribute);
+			} else {
+				writer.writeAttribute(attribute,value,attribute);
+			}
+		}
+	}
+
+	
+	public void encodeAttributesFromArray(FacesContext context, UIComponent component,String[] attrs) throws IOException {
+		ResponseWriter writer = context.getResponseWriter();
+		Map attributes = component.getAttributes();
+		for (int i = 0; i < attrs.length; i++) {
+			String attribute = attrs[i];
+			encodePassThruAttribute(context, attributes, writer, attribute);
+		}
+	}
+
+	
+	/**
+	 * Encode attributes given by comma-separated string list.
+	 * @param context current JSF context
+	 * @param component for with render attributes values
+	 * @param attrs comma separated list of attributes
+	 * @throws IOException
+	 */
+	public void encodeAttributes(FacesContext context, UIComponent component,String attrs) throws IOException {
+		if (null != attrs) {
+			String[] attrsArray = attrs.split(",");
+			encodeAttributesFromArray(context,component,attrsArray);
+		}
+	}
+	/**
+	 * @param context
+	 * @param component
+	 * @param string
+	 * @param string2
+	 * @throws IOException 
+	 */
+	public void encodeAttribute(FacesContext context, UIComponent component, Object property, String attributeName) throws IOException {
+		ResponseWriter writer = context.getResponseWriter();
+		Object value = component.getAttributes().get(property);
+		if (shouldRenderAttribute(value)) {
+			writer.writeAttribute(attributeName,value,property.toString());
+		}
+		
+	}
+
+	public void encodeAttribute(FacesContext context, UIComponent component,String attribute) throws IOException {
+		encodeAttribute(context,component,getComponentAttributeName(attribute),attribute);
+	}
+	/**
+	 * Write html-attribute
+	 * @param writer
+	 * @param attribute
+	 * @param value
+	 * @throws IOException
+	 */
+	public  void writeAttribute(ResponseWriter writer, String attribute, Object value ) throws IOException {
+		if ( shouldRenderAttribute(value) ) {
+			writer.writeAttribute(attribute, value.toString(), attribute );
+		}
+	}
+
+    /**
+     * @return true if and only if the argument
+     *         <code>attributeVal</code> is an instance of a wrapper for a
+     *         primitive type and its value is equal to the default value for
+     *         that type as given in the spec.
+     */
+
+    public  boolean shouldRenderAttribute(Object attributeVal) {
+    	if(null == attributeVal){
+    		return false;
+    	} else if (attributeVal instanceof Boolean &&
+            ((Boolean) attributeVal).booleanValue() ==
+            Boolean.FALSE.booleanValue()) {
+            return false;
+        } else if(attributeVal.toString().length() == 0){
+			return false;
+		} else return isValidProperty(attributeVal);
+    }
+	
+	
+	/**
+	 * Test for valid value of property. by default, for non-setted properties with Java primitive types of
+	 * JSF component return appropriate MIN_VALUE .
+	 * @param property - value of property returned from {@link UIComponent#getAttributes()}
+	 * @return true for setted property, false otherthise.
+	 */
+	public boolean isValidProperty(Object property) {
+		if (null == property) {
+			return false;
+		} else if (property instanceof Integer
+				&& ((Integer) property).intValue() == Integer.MIN_VALUE) {
+			return false;
+		} else if (property instanceof Double
+				&& ((Double) property).doubleValue() == Double.MIN_VALUE) {
+			return false;
+		} else if (property instanceof Character
+				&& ((Character) property).charValue() == Character.MIN_VALUE) {
+			return false;
+		} else if (property instanceof Float
+				&& ((Float) property).floatValue() == Float.MIN_VALUE) {
+			return false;
+		} else if (property instanceof Short
+				&& ((Short) property).shortValue() == Short.MIN_VALUE) {
+			return false;
+		} else if (property instanceof Byte
+				&& ((Byte) property).byteValue() == Byte.MIN_VALUE) {
+			return false;
+		} else if (property instanceof Long
+				&& ((Long) property).longValue() == Long.MIN_VALUE) {
+			return false;
+		}
+		return true;
+	}
+
+	/**
+	 * Convert HTML attribute name to component property name.
+	 * 
+	 * @param key
+	 * @return
+	 */
+	protected Object getComponentAttributeName(Object key) {
+		Object converted = substitutions.get(key);
+		if (null==converted) {
+			return key;
+		} else {
+			return converted;
+		}
+	}
+
+	/**
+	 * Convert attribute value to proper object. For known html boolean attributes return name
+	 * for true value, otherthise - null. For non-boolean attributes return same value.
+	 * @param name attribute name.
+	 * @param value
+	 * @return
+	 */
+	protected Object attributeValue(String name, Object value){
+		if (null != value && Arrays.binarySearch(HTML.PASS_THRU_BOOLEAN,name)>=0) {
+			boolean checked = false;
+			if (value instanceof Boolean) {
+				checked = ((Boolean) value).booleanValue();				
+			} else  {
+				if( ! (value instanceof String) ){
+					value = value.toString();
+				}
+				checked = (new Boolean((String) value)).booleanValue();
+			}
+			return checked?name:null;
+		} else {
+			return value;
+		}
+	}
+	
+	
+	/**
+	 * Get boolean value of logical attribute
+	 * @param component 
+	 * @param name attribute name
+	 * @return true if attribute is equals  Boolean.TRUE or String "true" , false otherwise.
+	 */
+	public boolean isBooleanAttribute(UIComponent component, String name){
+		Object attrValue = component.getAttributes().get(name);
+		boolean result = false;
+		if(null != attrValue){
+			if(attrValue instanceof String ){
+				result = "true".equalsIgnoreCase((String) attrValue);
+			} else {
+				result = Boolean.TRUE.equals(attrValue);
+			}
+		}
+		return result;
+	}
+	
+	/**
+	 * Return converted value for {@link javax.faces.component.ValueHolder} as String,
+	 * perform nessesary convertions.
+	 * @param context
+	 * @param component
+	 * @return
+	 */
+	public String getValueAsString(FacesContext context, UIComponent component) {
+		// First - get submitted value for input components
+		if (component instanceof EditableValueHolder) {
+			EditableValueHolder input = (EditableValueHolder) component;
+			String submittedValue = (String) input.getSubmittedValue();
+			if(null != submittedValue) {
+				return submittedValue;
+			}
+		}
+		// If no submitted value presented - convert same for UIInput/UIOutput
+		if (component instanceof ValueHolder) {
+			return formatValue(context, component, ((ValueHolder) component).getValue() );
+		} else {
+			throw new IllegalArgumentException(Messages.getMessage(Messages.CONVERTING_NON_VALUE_HOLDER_COMPONENT_ERROR, component.getId()));
+		}
+	}
+
+	/**
+	 * Convert any object value to string. If component instance of {@link ValueHolder } got {@link Converter} for formatting.
+	 * If not, attempt to use converter based on value type.
+	 * @param context
+	 * @param component
+	 * @return
+	 */
+	public String formatValue(FacesContext context, UIComponent component,Object value) {
+		if(value instanceof String) {
+			return (String) value;
+		}
+		Converter converter = null;
+		if (component instanceof ValueHolder) {
+			ValueHolder holder = (ValueHolder) component;
+			converter = holder.getConverter();
+		}
+		if(null == converter && null != value ) {
+			try {
+				converter = context.getApplication().createConverter(
+						value.getClass());
+			} catch (FacesException e) {
+				// TODO - log converter exception.
+			}
+		}
+		if(null == converter) {
+			if(null != value) {
+				return value.toString();
+			}
+		} else {
+			return converter.getAsString(context, component, value);
+		}
+		return "";
+	}
+	
+	public void encodeDimensions(FacesContext context, UIComponent component, InternetResource resource) throws IOException {
+		if (resource instanceof Java2Dresource) {
+			Java2Dresource j2d = (Java2Dresource) resource;
+			Dimension dim = j2d.getDimensions(context, component);
+			ResponseWriter writer = context.getResponseWriter();
+			writer.writeAttribute("width", String.valueOf(dim.width), "width");
+			writer.writeAttribute("height", String.valueOf(dim.height), "height");
+		}
+	}
+	public String encodePx(String value){
+		return HtmlDimensions.formatPx(HtmlDimensions.decode(value));
+	}
+	/**
+	 * formats given value to 
+	 * @param value
+	 * @param pattern
+	 * @return
+	 */
+	public String encodePctOrPx(String value){
+		if(value.indexOf('%') > 0){
+			return value;
+		} else {
+			return encodePx(value);
+		}
+	}
+	
+    /**
+     * Find nested form for given component
+     * @param component
+     * @return nested <code>UIForm</code> component, or <code>null</code>
+     */
+    public  UIForm getNestingForm(FacesContext context,UIComponent component)
+    {
+        UIComponent parent = component.getParent();
+        while (parent != null && !(parent instanceof UIForm))
+        {
+            parent = parent.getParent();
+        }
+
+        UIForm nestingForm = null;
+        if (parent != null)
+        {
+            //link is nested inside a form
+            nestingForm = (UIForm) parent;
+        }
+        return nestingForm;
+    }
+
+	/**
+	 * @param context
+	 * @param component
+	 * @return
+	 * @throws IOException 
+	 */
+	public void encodeBeginFormIfNessesary(FacesContext context, UIComponent component) throws IOException {
+		UIForm form = getNestingForm(context, component);
+		if(null == form) {
+	        ResponseWriter writer = context.getResponseWriter();
+	        String clientId = component.getClientId(context)+DUMMY_FORM_ID;
+	        encodeBeginForm(context, component, writer, clientId);
+//	        writer.writeAttribute(HTML.style_ATTRIBUTE, "margin:0; padding:0;", null);
+		}
+	}
+
+	/**
+	 * @param context
+	 * @param component
+	 * @param writer
+	 * @param clientId
+	 * @throws IOException
+	 */
+	public void encodeBeginForm(FacesContext context, UIComponent component, ResponseWriter writer, String clientId) throws IOException {
+		String actionURL = getActionUrl(context);
+		String encodeActionURL = context.getExternalContext().encodeActionURL(actionURL);
+
+		writer.startElement(HTML.FORM_ELEMENT, component);
+		writer.writeAttribute(HTML.id_ATTRIBUTE, clientId, null);
+		writer.writeAttribute(HTML.NAME_ATTRIBUTE, clientId, null);
+		writer.writeAttribute(HTML.METHOD_ATTRIBUTE, "post", null);
+        writer.writeAttribute(HTML.style_ATTRIBUTE, "margin:0; padding:0;", null);
+		writer.writeURIAttribute(HTML.ACTION_ATTRIBUTE,
+		                         encodeActionURL,
+		                         "action");
+	}
+
+	/**
+	 * @param context
+	 * @param component
+	 * @throws IOException 
+	 */
+	public void encodeEndFormIfNessesary(FacesContext context, UIComponent component) throws IOException {
+		UIForm form = getNestingForm(context, component);
+		if(null == form) {
+        	ResponseWriter writer = context.getResponseWriter();
+			// TODO - hidden form parameters ?
+	        encodeEndForm(context, writer);
+		}
+	}
+
+	/**
+	 * @param context
+	 * @param writer
+	 * @throws IOException
+	 */
+	public void encodeEndForm(FacesContext context, ResponseWriter writer) throws IOException {
+		AjaxRendererUtils.writeState(context);
+		writer.endElement(HTML.FORM_ELEMENT);
+	}
+
+    /**
+     * @param facesContext
+     * @return String A String representing the action URL
+     */
+    public String getActionUrl(FacesContext facesContext)
+    {
+        ViewHandler viewHandler = facesContext.getApplication().getViewHandler();
+        String viewId = facesContext.getViewRoot().getViewId();
+        return viewHandler.getActionURL(facesContext, viewId);
+    }
+    /**
+     * 
+     * @param context
+     * @param value
+     * @return URL of target resource (src, href, etc)
+     */
+    public String encodeResourceURL(TemplateContext context, Object value){
+    	if(value == null){
+    		return "";
+    	}
+    	FacesContext facesContext = context.getFacesContext();
+    	value = facesContext.getApplication().getViewHandler().getResourceURL(facesContext, value.toString());
+    	return facesContext.getExternalContext().encodeResourceURL((String)value);
+    }
+    /**
+     * Simplified version of {@link encodeId}
+     * @param context
+     * @param component
+     * @return client id of current component
+     */
+    public String clientId(FacesContext context, UIComponent component){
+    	String clientId = "";
+    	try {
+			clientId = component.getClientId(context);
+		} catch (Exception e) {
+			//just ignore
+		}
+		return clientId;
+    }
+
+	/**
+	 * Wtrie JavaScript with start/end elements and type.
+	 * @param context
+	 * @param tab
+	 * @param string
+	 */
+
+	public void writeScript(FacesContext context, UIComponent component, Object script) throws IOException {
+		ResponseWriter writer = context.getResponseWriter();
+		writer.startElement(HTML.SCRIPT_ELEM,component);
+		writer.writeAttribute(HTML.TYPE_ATTR,"text/javascript","type");
+		writer.writeText(script,null);
+		writer.endElement(HTML.SCRIPT_ELEM);
+	}
+
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/AttributeElement.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/AttributeElement.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/AttributeElement.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,122 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.renderer.compiler;
+
+import java.io.IOException;
+
+import javax.faces.FacesException;
+
+import org.ajax4jsf.framework.util.message.Messages;
+import org.xml.sax.SAXException;
+
+/**
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:44 $
+ *
+ */
+public class AttributeElement extends ElementBase {
+
+	private String name;
+	private boolean mandatory = true;
+	
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.compiler.RootElement#encode(javax.faces.render.Renderer, javax.faces.context.FacesContext, javax.faces.component.UIComponent)
+	 */
+	public void encode(TemplateContext context) throws IOException {
+		String attributeValue = getString(context);
+		if(attributeValue.length()>0 || isMandatory()){
+			context.getWriter().writeAttribute(getName(),attributeValue,null);
+		}
+	}
+	
+	
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.compiler.ElementBase#encode(org.ajax4jsf.framework.renderer.compiler.TemplateContext, java.lang.String)
+	 */
+	public void encode(TemplateContext context, String breakPoint) throws IOException {
+		throw new FacesException(Messages.getMessage(Messages.BREAKPOINTS_UNSUPPORTED_INSIDE_ATTRIBUTE_ERROR, getName(), context.getComponent().getId()));
+	}
+
+
+	/**
+	 * @return Returns the name.
+	 */
+	public String getName() {
+		return name;
+	}
+	/**
+	 * @param name The name to set.
+	 */
+	public void setName(String name) {
+		this.name = name;
+	}
+	/**
+	 * @return Returns the notNull.
+	 */
+	public boolean isMandatory() {
+		return mandatory;
+	}
+	/**
+	 * Alias ( due to typo error ) for Mandatory property.
+	 * @param notNull The notNull to set.
+	 */
+	public void setMantadory(boolean notNull) {
+		this.mandatory = notNull;
+	}
+
+	/**
+	 * @param notNull The notNull to set.
+	 */
+	public void setMandatory(boolean notNull) {
+		this.mandatory = notNull;
+	}
+
+	public String getTag() {
+		return HtmlCompiler.NS_PREFIX+HtmlCompiler.ATTRIBUTE_TAG;
+	}
+
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.compiler.ElementBase#setParent(org.ajax4jsf.framework.renderer.compiler.PreparedTemplate)
+	 */
+	public void setParent(PreparedTemplate parent) throws SAXException {		
+		super.setParent(parent);
+		if (getName()==null) {
+			throw new SAXException(Messages.getMessage(Messages.NO_NAME_ATTRIBUTE_ERROR, getTag()));
+		}
+	}
+
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.compiler.ElementBase#getAllowedClasses()
+	 */
+	protected Class[] getAllowedClasses() {
+		// TODO Auto-generated method stub
+		return new Class[]{
+				MethodCallElement.class,
+				TextElement.class,
+				ResourceElement.class,
+				ClassElement.class				
+		};
+	}
+	
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/BreakException.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/BreakException.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/BreakException.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,52 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.renderer.compiler;
+
+import javax.faces.FacesException;
+
+/**
+ * Exception for process part of template.
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:42 $
+ *
+ */
+public class BreakException extends FacesException {
+
+	private String _name;
+	/**
+	 * @param name 
+	 * 
+	 */
+	public BreakException(String name) {
+		super();
+		_name=name;
+	}
+	/**
+	 * @return Returns the name.
+	 */
+	public String getName() {
+		return _name;
+	}
+
+
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/BreakPoint.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/BreakPoint.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/BreakPoint.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,138 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.renderer.compiler;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+
+import org.ajax4jsf.framework.renderer.RendererBase;
+import org.ajax4jsf.framework.util.message.Messages;
+import org.xml.sax.SAXException;
+
+
+/**
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:45 $
+ *
+ */
+public class BreakPoint implements PreparedTemplate {
+	
+	private List childrens = new ArrayList();
+
+	private PreparedTemplate _parent;
+	private String name;
+
+	/**
+	 * @return Returns the name.
+	 */
+	public String getName() {
+		return name;
+	}
+
+	/**
+	 * @param name The name to set.
+	 */
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.compiler.PreparedTemplate#encode(org.ajax4jsf.framework.renderer.RendererBase, javax.faces.context.FacesContext, javax.faces.component.UIComponent)
+	 */
+	public void encode(RendererBase renderer, FacesContext context,
+			UIComponent component) throws IOException {
+		throw new BreakException(getName());
+
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.compiler.PreparedTemplate#encode(org.ajax4jsf.framework.renderer.compiler.TemplateContext)
+	 */
+	public void encode(TemplateContext context) throws IOException {
+		throw new BreakException(getName());
+
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.compiler.PreparedTemplate#encode(org.ajax4jsf.framework.renderer.compiler.TemplateContext, java.lang.String)
+	 */
+	public void encode(TemplateContext context, String breakPoint)
+			throws IOException {
+		if (!getName().equals(breakPoint)) {
+			throw new BreakException(getName());
+		} else if(getChildren().size()>0){
+			// encode all childrens of this breakpoint.
+			for (Iterator iter = getChildren().iterator(); iter.hasNext();) {
+				PreparedTemplate element = (PreparedTemplate) iter.next();
+				element.encode(context);
+			}
+			// after childrens, break encoding.
+			throw new BreakException(getName());
+		}
+		// if no childrens - continue encoding.
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.compiler.PreparedTemplate#getChildren()
+	 */
+	public List getChildren() {
+		// breakpoint - empty element
+		return childrens;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.compiler.PreparedTemplate#addChild(org.ajax4jsf.framework.renderer.compiler.PreparedTemplate)
+	 */
+	public void addChild(PreparedTemplate child) throws SAXException {
+		child.setParent(this);
+		childrens.add(child);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.compiler.PreparedTemplate#setParent(org.ajax4jsf.framework.renderer.compiler.PreparedTemplate)
+	 */
+	public void setParent(PreparedTemplate parent) throws SAXException {
+		if (getName()==null) {
+			throw new SAXException(Messages.getMessage(Messages.NO_NAME_ATTRIBUTE_ERROR, getTag()));
+		}
+		this._parent = parent;
+		if (parent instanceof ElementBase) {
+			((ElementBase) parent).addBreakPoint(getName());
+		}
+	}
+
+	public String getTag() {
+		return HtmlCompiler.NS_PREFIX+HtmlCompiler.BREAK_TAG;
+	}
+
+	public Object getValue(TemplateContext context) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/ChildElement.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/ChildElement.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/ChildElement.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,70 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.renderer.compiler;
+
+import java.io.IOException;
+
+import javax.faces.FacesException;
+import javax.faces.component.UIComponent;
+
+import org.ajax4jsf.framework.util.message.Messages;
+
+/**
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:43 $
+ *
+ */
+public class ChildElement extends ElementBase {
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.compiler.ElementBase#encode(org.ajax4jsf.framework.renderer.compiler.TemplateContext, java.lang.String)
+	 */
+	public void encode(TemplateContext context, String breakPoint) throws IOException {
+		throw new FacesException(Messages.getMessage(Messages.BREAKPOINTS_UNSUPPORTED_ERROR_3));
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.compiler.ElementBase#encode(org.ajax4jsf.framework.renderer.compiler.TemplateContext)
+	 */
+	public void encode(TemplateContext context) throws IOException {
+		UIComponent child = (UIComponent) context.getParameter(ChildrensElement.CURRENT_CHILD);
+		if(null == child){
+			child = (UIComponent) getValue(context);
+		}
+		if(null !=child && child.isRendered()){
+			context.getRenderer().renderChild(context.getFacesContext(),child);
+		}
+	}
+
+	public String getTag() {
+		return HtmlCompiler.NS_UTIL_PREFIX+HtmlCompiler.CHILD_TAG;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.compiler.ElementBase#getAllowedClasses()
+	 */
+	protected Class[] getAllowedClasses() {
+		// child elements not allowed
+		return new Class[]{};
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/ChildrensElement.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/ChildrensElement.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/ChildrensElement.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,154 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.renderer.compiler;
+
+import java.io.IOException;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Iterator;
+
+import javax.faces.FacesException;
+import javax.faces.component.UIComponent;
+
+import org.ajax4jsf.framework.util.message.Messages;
+
+/**
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:49 $
+ * 
+ */
+public class ChildrensElement extends ElementBase {
+	public static final String CURRENT_CHILD = "child_to_render";
+
+	private String iteratorName;
+	
+	
+	public String getIteratorName() {
+		return iteratorName;
+	}
+
+	public void setIteratorName(String iteratorVar) {
+		this.iteratorName = iteratorVar;
+		
+	}
+
+	public class IteratorWrapper implements Iterator{
+		private Iterator iterator;
+		private int index = -1;
+		
+		public IteratorWrapper(Iterator iterator) {
+			this.iterator = iterator;
+		}
+		public Iterator getIterator() {
+			return iterator;
+		}
+		public boolean hasNext() {
+			return iterator.hasNext();
+		}
+		public Object next() {
+			Object o = iterator.next();
+			index++;
+			return o;
+		}
+		public void remove() {
+			iterator.remove();
+		}
+		public boolean isLast(){
+			return !iterator.hasNext();
+		}
+		public int getIndex() {
+			return index;
+		}
+	}
+	
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.renderer.compiler.ElementBase#encode(org.ajax4jsf.framework.renderer.compiler.TemplateContext)
+	 */
+	public void encode(TemplateContext context) throws IOException {
+		UIComponent stored = (UIComponent) context.getParameter(CURRENT_CHILD);
+//		Collection children = context.getComponent().getChildren();
+		IteratorWrapper iter =new IteratorWrapper(Collections.EMPTY_LIST.iterator());
+		Object value = getValue(context);
+		if(value != null){
+			if (value instanceof UIComponent) {
+				UIComponent comp = (UIComponent) value;
+				iter = new IteratorWrapper(comp.getChildren().iterator());
+			} else if (value instanceof Collection) {
+				iter = new IteratorWrapper( ((Collection) value).iterator() );
+			} else if (value instanceof String) {
+				String componentId = (String) value;
+				UIComponent comp = context.getComponent().findComponent(componentId);
+				if (null != comp) {
+					iter = new IteratorWrapper(comp.getChildren().iterator());
+				}
+			} else if (value instanceof Iterator) {
+				iter = new IteratorWrapper((Iterator) value);
+			}
+		} else {
+			iter = new IteratorWrapper(context.getComponent().getChildren().iterator());
+		}
+		// For all childrens, iterate over template.
+//		IteratorWrapper iter = new IteratorWrapper(children.iterator());
+		if(iteratorName != null){
+			context.putParameter(iteratorName, iter);
+		}
+		while (iter.hasNext()) {
+			UIComponent child = (UIComponent) iter.next();
+
+			if ( child.isRendered()) {
+				if (getChildren().size()>0) {
+					// Store facet to render in <u:child> element.
+					// TODO - create new templatecontext with current iteration component ?
+					context.putParameter(CURRENT_CHILD, child);
+					// In fact, render all childrens.
+					super.encode(context);
+				} else {
+					// empty element - render children as-is
+					context.getRenderer().renderChild(context.getFacesContext(),child);					
+				}
+			}
+		}
+		if(iteratorName != null){
+			context.removeParameter(iteratorName);
+		}
+		if (null != stored) {
+			context.putParameter(CURRENT_CHILD, stored);
+		} else {
+			context.removeParameter(CURRENT_CHILD);
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.compiler.ElementBase#encode(org.ajax4jsf.framework.renderer.compiler.TemplateContext, java.lang.String)
+	 */
+	public void encode(TemplateContext context, String breakPoint) throws IOException {
+		// TODO Auto-generated method stub
+		throw new FacesException(Messages.getMessage(Messages.BREAKPOINTS_UNSUPPORTED_ERROR_2));
+	}
+
+	public String getTag() {
+		return HtmlCompiler.NS_UTIL_PREFIX+HtmlCompiler.CHILDREN_TAG;
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/ClassElement.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/ClassElement.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/ClassElement.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,148 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.renderer.compiler;
+
+import java.io.IOException;
+import java.util.Iterator;
+
+import javax.faces.FacesException;
+
+import org.ajax4jsf.framework.util.message.Messages;
+import org.ajax4jsf.framework.util.style.CSSFormat;
+import org.xml.sax.SAXException;
+
+/**
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:43 $
+ * 
+ */
+public class ClassElement extends ElementBase {
+
+	private String _name;
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.renderer.compiler.ElementBase#encode(org.ajax4jsf.framework.renderer.compiler.TemplateContext,
+	 *      java.lang.String)
+	 */
+	public void encode(TemplateContext context, String breakPoint)
+			throws IOException {
+		encode(context);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.renderer.compiler.ElementBase#encode(org.ajax4jsf.framework.renderer.compiler.TemplateContext)
+	 */
+	public void encode(TemplateContext context) throws IOException {
+		context.getWriter().writeText(getString(context), null);
+	}
+
+	/**
+	 * @return Returns the name.
+	 */
+	public String getName() {
+		return _name;
+	}
+
+	/**
+	 * @param name
+	 *            The name to set.
+	 */
+	public void setName(String name) {
+		_name = name;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.renderer.compiler.ElementBase#getString(org.ajax4jsf.framework.renderer.compiler.TemplateContext)
+	 */
+	public String getString(TemplateContext context) throws FacesException {
+		if (null == getName()) {
+			throw new FacesException(Messages
+					.getMessage(Messages.STYLE_ATTRIBUTE_ERROR));
+		}
+		String stringOrDefault = valueGetter.getStringOrDefault(context);
+		StringBuffer string = new StringBuffer();
+		string.append(stringOrDefault);
+		for (Iterator iter = getChildren().iterator(); iter.hasNext();) {
+			Object element = iter.next();
+			if (element instanceof ElementBase) {
+				ElementBase stringElement = (ElementBase) element;
+				String str = stringElement.getString(context);
+				if (str.length() > 0) {
+					string.append(" ");
+					boolean isUrl = element instanceof ResourceElement;
+					if (isUrl) {
+						string.append(CSSFormat.url(str));
+					} else {
+						string.append(str);
+					}
+				}
+			}
+		}
+		if (string.length() > 0) {
+			string.insert(0, ":").insert(0, getName()).append(";");
+			return string.toString();
+		} else {
+			return "";
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.renderer.compiler.PreparedTemplate#getTag()
+	 */
+	public String getTag() {
+		// TODO Auto-generated method stub
+		return HtmlCompiler.NS_PREFIX + HtmlCompiler.STYLE_TAG;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.renderer.compiler.ElementBase#setParent(org.ajax4jsf.framework.renderer.compiler.PreparedTemplate)
+	 */
+	public void setParent(PreparedTemplate parent) throws SAXException {
+		super.setParent(parent);
+		if (getName() == null) {
+			throw new SAXException(Messages.getMessage(
+					Messages.NO_NAME_ATTRIBUTE_ERROR, getTag()));
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.renderer.compiler.ElementBase#getAllowedClasses()
+	 */
+	protected Class[] getAllowedClasses() {
+		// TODO Auto-generated method stub
+		return new Class[] { MethodCallElement.class, TextElement.class,
+				ResourceElement.class };
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/ElementBase.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/ElementBase.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/ElementBase.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,438 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.renderer.compiler;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import javax.faces.FacesException;
+import javax.faces.FactoryFinder;
+import javax.faces.application.Application;
+import javax.faces.application.ApplicationFactory;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.el.ValueBinding;
+
+import org.ajax4jsf.framework.renderer.RendererBase;
+import org.ajax4jsf.framework.skin.SkinFactory;
+import org.ajax4jsf.framework.util.message.Messages;
+import org.apache.commons.beanutils.MethodUtils;
+import org.xml.sax.SAXException;
+
+
+/**
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:44 $
+ *
+ */
+public abstract class ElementBase implements PreparedTemplate {
+
+	private List childrens = new ArrayList();
+	private Map breaks = new HashMap();
+	
+	protected ValueGetter valueGetter = new ValueGetter();
+	private Object _value = null;
+	private Object _default = null;
+	private Object _context = null;
+	private String _property = null;
+	private String _skin ;
+//	private String _skinConfiguration ;
+	private String _call = null;
+	private PreparedTemplate parent;
+	private ValueBinding _valueBinding;
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.compiler.CompiledXML#encode(javax.faces.render.Renderer, javax.faces.context.FacesContext, javax.faces.component.UIComponent)
+	 */
+	public void encode(RendererBase renderer, FacesContext context,
+			UIComponent component) throws IOException {
+		encode(new TemplateContext(renderer,context,component));
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.compiler.PreparedTemplate#encode(org.ajax4jsf.framework.renderer.compiler.TemplateContext, java.lang.String)
+	 */
+	public void encode(TemplateContext context, String breakPoint) throws IOException {
+		if (breaks.containsKey(breakPoint)) {
+			// start after last breakpoint.
+			int start = ((Integer)breaks.get(breakPoint)).intValue();
+			Iterator iter = getChildren().listIterator(start);
+			((PreparedTemplate) iter.next()).encode(context,breakPoint);
+			// perform childrens - other not contain this breakpoint !
+			while ( iter.hasNext()) {
+				PreparedTemplate element = (PreparedTemplate) iter.next();
+				element.encode(context);
+			}
+			encodeEnd(context);
+		} else {
+			throw new FacesException(Messages.getMessage(Messages.BREAKPOINT_NOT_REGISTERED_ERROR, breakPoint));
+		}
+		
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.compiler.PreparedTemplate#encode(org.ajax4jsf.framework.renderer.compiler.TemplateContext)
+	 */
+	public void encode(TemplateContext context) throws IOException {
+		// perform childrens.
+		encodeBegin(context);
+		for (Iterator iter = getChildren().iterator(); iter.hasNext();) {
+			PreparedTemplate element = (PreparedTemplate) iter.next();
+			element.encode(context);
+		}
+		encodeEnd(context);
+	}
+
+	protected void encodeBegin(TemplateContext context) throws IOException {
+		
+	}
+	
+	protected void encodeEnd(TemplateContext context) throws IOException {
+		
+	}
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.compiler.CompiledXML#getChildren()
+	 */
+	public List getChildren() {
+		// TODO Auto-generated method stub
+		return childrens;
+	}
+
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.compiler.CompiledXML#addChild(org.ajax4jsf.framework.renderer.compiler.CompiledXML)
+	 */
+	public void addChild(PreparedTemplate child) throws SAXException {
+		Class[] allowedClasses = getAllowedClasses();
+		for (int i = 0; i < allowedClasses.length; i++) {
+			if(allowedClasses[i].isInstance(child)){
+				child.setParent(this);
+				getChildren().add(child);
+				return;
+			}
+		}
+		// element don't allowed as child for this.
+		throw new SAXException(Messages.getMessage(Messages.CHILD_NOT_ALLOWED_ERROR, child.getTag(), getTag()));
+	}
+
+	/**
+	 * 
+	 * @return array of classes, allowed as childs for this element.
+	 */
+	protected Class[] getAllowedClasses(){
+		return new Class[]{PreparedTemplate.class};
+	}
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.compiler.PreparedTemplate#setParent(org.ajax4jsf.framework.renderer.compiler.PreparedTemplate)
+	 */
+	public void setParent(PreparedTemplate parent) throws SAXException {
+		this.parent = parent;
+		// Translate all registered breakpoints to parent
+		if (parent instanceof ElementBase ) {
+			for (Iterator iter = breaks.keySet().iterator(); iter.hasNext();) {
+				((ElementBase) parent).addBreakPoint((String) iter.next());				
+			}
+		}
+	}
+	
+	public void addBreakPoint(String name){
+		Integer num = new Integer(getChildren().size());
+		breaks.put(name,num);
+//		if (null != parent && parent instanceof ElementBase) {
+//			((ElementBase) parent).addBreakPoint(name);
+//		}
+	}
+	
+	
+
+	/* (non-Javadoc)
+	 * Build this class name with childrens.
+	 * @see java.lang.Object#toString()
+	 */
+	public String toString() {
+		// 
+		StringBuffer buf = new StringBuffer(this.getClass().getName());
+		buf.append(" [\n");
+		for (Iterator iter = getChildren().iterator(); iter.hasNext();) {
+			Object child = (Object) iter.next();
+			buf.append("    ").append(child.toString()).append(" ;\n");
+		}
+		buf.append("]\n");
+		return buf.toString();
+	}
+
+	/**
+	 * @return Returns the value. If is EL expression valueBinding - evaluate in.
+	 */
+	public Object getValue(TemplateContext context) {
+		return valueGetter.getValue(context);
+	}
+
+	public String getString(TemplateContext context) throws FacesException {
+		StringBuffer string = new StringBuffer();
+		string.append(valueGetter.getStringOrDefault(context));
+		for (Iterator iter = getChildren().iterator(); iter.hasNext();) {
+			Object element = iter.next();
+			if (element instanceof ElementBase) {
+				ElementBase stringElement = (ElementBase) element;
+				string.append(stringElement.getString(context));
+			}
+		}
+		return string.toString();
+	}
+	/**
+	 * @param value The value to set. if EL-expression ( #{...} ) - compile it.
+	 */
+	public void setValue(Object value) {
+		if (value instanceof String) {
+			String stringValue = (String) value;
+			if(isValueReference(stringValue)){
+				_value = value;
+				try {
+					Application app = ((ApplicationFactory)FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY)).getApplication();
+					_valueBinding = app.createValueBinding(stringValue);
+				} catch (Exception e) {
+					// Do nothing - create at first call 
+				}
+				this.valueGetter = new ValueGetter(){
+
+					public /* (non-Javadoc)
+					 * @see org.ajax4jsf.framework.renderer.compiler.RootElement.ValueGetter#getValue(javax.faces.context.FacesContext, javax.faces.component.UIComponent)
+					 */
+					Object getValue(TemplateContext context) {
+						// TODO Auto-generated method stub
+						if(null==_valueBinding) {
+							Application  app = context.getFacesContext().getApplication();
+							_valueBinding = app.createValueBinding((String) _value);							
+						}
+						return _valueBinding.getValue(context.getFacesContext());
+					}
+					
+				};
+				return;
+			}
+		}
+		this._value = value;
+		this.valueGetter = new ValueGetter(){
+
+			public /* (non-Javadoc)
+			 * @see org.ajax4jsf.framework.renderer.compiler.RootElement.ValueGetter#getValue(javax.faces.context.FacesContext, javax.faces.component.UIComponent)
+			 */
+			Object getValue(TemplateContext context) {
+				// TODO Auto-generated method stub
+				return _value;
+			}
+			
+		};
+	}
+
+	/**
+	 * @return Returns the default.
+	 */
+	public Object getDefault() {
+		return _default;
+	}
+
+	/**
+	 * @param default1 The default to set.
+	 */
+	public void setDefault(Object default1) {
+		_default = default1;
+	}
+
+	/**
+	 * @param property The property to set.
+	 */
+	public void setProperty(String property) {
+		_property = property;
+		valueGetter = new ValueGetter(){
+
+			/* (non-Javadoc)
+			 * @see org.ajax4jsf.framework.renderer.compiler.RootElement.ValueGetter#getValue(javax.faces.context.FacesContext, javax.faces.component.UIComponent)
+			 */
+			Object getValue(TemplateContext context) {
+				Object value = context.getComponent().getAttributes().get(_property);
+				if (context.getRenderer().getUtils().isValidProperty(value)) {
+					return value; 
+				} else {
+					return null;
+				}
+			}
+			
+		};
+	}
+
+	/**
+	 * @param skin The skin to set.
+	 */
+	public void setSkin(String skin) {
+		_skin = skin;
+//		if( null == _skinConfiguration ){
+			// Only Skin parameter is used.
+		valueGetter = new ValueGetter(){
+
+			/* (non-Javadoc)
+			 * @see org.ajax4jsf.framework.renderer.compiler.RootElement.ValueGetter#getValue(javax.faces.context.FacesContext, javax.faces.component.UIComponent)
+			 */
+			Object getValue(TemplateContext context) {
+				FacesContext facesContext = context.getFacesContext();
+				Object parameter = SkinFactory.getInstance().getSkin(facesContext).getParameter(facesContext,_skin,_default);
+				return parameter;
+			}
+			
+		};
+//		} else {
+//			valueGetter = new ConfigurationAndSkinValueGetter();			
+//		}
+	}
+
+	/**
+	 * Set name of skin parameter in "mandatory" list ( default value for fine-tuning parameter ).
+	 * @param mandatorySkin
+	 */
+//	public void setSkinConfiguration(String mandatorySkin) {
+//		_skinConfiguration = mandatorySkin;
+//		if(null == _skin){
+//			valueGetter =  new ConfigurationValueGetter();
+//		} else {
+//			valueGetter = new ConfigurationAndSkinValueGetter();
+//		}
+//	}
+
+	/**
+	 * @param context The context to set.
+	 */
+	public void setContext(Object context) {
+		_context = context;
+		//System.out.println("CTX:"  + context);
+		valueGetter = new ValueGetter(){
+
+			/* (non-Javadoc)
+			 * @see org.ajax4jsf.framework.renderer.compiler.RootElement.ValueGetter#getValue(javax.faces.context.FacesContext, javax.faces.component.UIComponent)
+			 */
+			Object getValue(TemplateContext context) {
+				// TODO Auto-generated method stub
+				return context.getParameter(_context);
+			}
+			
+		};
+	}
+
+	/**
+	 * @param call The call to set.
+	 */
+	public void setCall(String call) {
+		this._call = call;
+		valueGetter = new ValueGetter(){
+
+			/* (non-Javadoc)
+			 * @see org.ajax4jsf.framework.renderer.compiler.RootElement.ValueGetter#getValue(javax.faces.context.FacesContext, javax.faces.component.UIComponent)
+			 */
+			Object getValue(TemplateContext context) {
+				try {
+					return MethodUtils.invokeMethod(context
+							.getRenderer(), _call, new Object[]{context});
+				} catch (Exception e) {
+					throw new FacesException(Messages.getMessage(Messages.INVOKE_RENDERER_METHOD_ERROR, this.getClass().getName()), e);
+				}
+			}
+			
+		};
+	}
+
+	/**
+	 * Get EL-enabled value. Return same string, if not el-expression.
+	 * Otherthise, return parsed and evaluated expression.
+	 * @param context - current Faces Context.
+	 * @param value - string to parse.
+	 * @return - interpreted el or unmodified value.
+	 */
+	protected boolean isValueReference( String value) {
+		if (value == null)
+			return false;
+
+		int start = value.indexOf("#{");
+		if (start >= 0) {
+			int end = value.lastIndexOf('}');
+			if (end >= 0 && start < end) {
+				return true;
+			}
+		}
+		return false;
+	}
+
+//	private final class ConfigurationValueGetter extends ValueGetter {
+//		/* (non-Javadoc)
+//		 * @see org.ajax4jsf.framework.renderer.compiler.RootElement.ValueGetter#getValue(javax.faces.context.FacesContext, javax.faces.component.UIComponent)
+//		 */
+//		Object getValue(TemplateContext context) {
+//			FacesContext facesContext = context.getFacesContext();
+//			Object parameter = SkinFactory.getInstance().getSkinConfiguration(facesContext).getParameter(facesContext,_skinConfiguration);
+//			if(null == parameter){
+//				parameter = _default;
+//			}
+//			return parameter;
+//		}
+//	}
+//
+//	private final class ConfigurationAndSkinValueGetter extends ValueGetter {
+//		/* (non-Javadoc)
+//		 * @see org.ajax4jsf.framework.renderer.compiler.RootElement.ValueGetter#getValue(javax.faces.context.FacesContext, javax.faces.component.UIComponent)
+//		 */
+//		Object getValue(TemplateContext context) {
+//			FacesContext facesContext = context.getFacesContext();
+//			return SkinFactory.getInstance().getSkinConfiguration(facesContext).getParameter(facesContext,_skinConfiguration,_skin,_default);
+//		}
+//	}
+	
+	
+	protected class ValueGetter {
+		Object getValue(TemplateContext context) {
+			return null;
+		}
+		
+		Object getValueOrDefault(TemplateContext context){
+			Object result = getValue(context);
+			if (null == result) {
+				result = getDefault();
+			}
+			return result;
+		}
+		
+		String getStringOrDefault(TemplateContext context){
+			Object result = getValue(context);
+			if (null == result || result.toString().length()==0) {
+				result = getDefault();
+				if (null == result) {
+					result = "";
+				}
+			}
+			return result.toString();
+			
+		}
+	}
+	
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/FacetElement.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/FacetElement.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/FacetElement.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,88 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.renderer.compiler;
+
+import java.io.IOException;
+
+import javax.faces.FacesException;
+import javax.faces.component.UIComponent;
+
+import org.ajax4jsf.framework.util.message.Messages;
+
+/**
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:48 $
+ *
+ */
+public class FacetElement extends ElementBase {
+
+	public static final String CURRENT_FACET = "child_to_render";
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.compiler.ElementBase#encode(org.ajax4jsf.framework.renderer.compiler.TemplateContext)
+	 */
+	public void encode(TemplateContext context) throws IOException {
+		String facetName = getValue(context).toString();
+		if (null == facetName) {
+			throw new FacesException(Messages.getMessage(Messages.NO_FACET_NAME_ATTRIBUTE, getTag()));
+		}
+		UIComponent stored = (UIComponent) context
+			.getParameter(CURRENT_FACET);
+		// if inside childrens loop - render facet from current iteration component.
+		// TODO - use cloned context
+		UIComponent facet = null == stored?context.getComponent().getFacet(facetName):stored.getFacet(facetName);		
+		if (null != facet && facet.isRendered()) {
+			if (getChildren().size()>0) {
+				// Store facet to render in <u:child> element.
+				// TODO - use cloned context.
+				context.putParameter(CURRENT_FACET, facet);
+				// In fact, render all childrens.
+				super.encode(context);
+				if (null != stored) {
+					context.putParameter(CURRENT_FACET, stored);
+				} else {
+					context.removeParameter(CURRENT_FACET);
+				}
+			} else {
+				// empty element - render facet as-is.
+				context.getRenderer().renderChild(context.getFacesContext(),facet);
+			}
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.compiler.ElementBase#encode(org.ajax4jsf.framework.renderer.compiler.TemplateContext, java.lang.String)
+	 */
+	public void encode(TemplateContext context, String breakPoint) throws IOException {
+		// TODO Auto-generated method stub
+		throw new FacesException(Messages.getMessage(Messages.BREAKPOINTS_UNSUPPORTED_ERROR, getValue(context)));
+	}
+	
+	public void setName(Object name) {
+		setValue(name);
+	}
+
+	public String getTag() {
+		return HtmlCompiler.NS_UTIL_PREFIX+HtmlCompiler.FACET_TAG;
+	}
+	
+	
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/HtmlCompiler.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/HtmlCompiler.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/HtmlCompiler.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,422 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.renderer.compiler;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Reader;
+import java.io.StringReader;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.faces.FacesException;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+
+import org.ajax4jsf.framework.renderer.RendererBase;
+import org.ajax4jsf.framework.util.message.Messages;
+import org.apache.commons.digester.Digester;
+import org.apache.commons.digester.Rule;
+import org.apache.commons.digester.RulesBase;
+import org.apache.commons.digester.SetNextRule;
+import org.apache.commons.digester.SetPropertiesRule;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.xml.sax.SAXException;
+import org.xml.sax.SAXParseException;
+import org.xml.sax.helpers.LocatorImpl;
+
+
+/**
+ * Compiler for XML string or stream for creation of {@link javax.faces.render.Renderer} internal
+ * interpretator. Use Apache Digitester for parse .
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:48 $
+ *
+ */
+public class HtmlCompiler {
+	
+	public static final String NS_PREFIX = "f:";
+	public static final String NS_UTIL_PREFIX = "u:";
+	public static final String ROOT_TAG = "template";
+	public static final String CALL_TAG = "call";
+	public static final String VALUE_CALL_TAG = "valueCall";
+	public static final String CALL_PARAM_TAG = "parameter";
+	public static final String VERBATUM_TAG = "verbatim";
+	public static final String BREAK_TAG = "break";
+	public static final String FACET_TAG = "insertFacet";
+	public static final String CHILDREN_TAG = "insertChildren";
+	public static final String IF_TAG = "if";
+	public static final String CHILD_TAG = "insertChild";
+	public static final String STYLE_TAG = "style";
+	public static final String CHILD_METHOD = "addChild";
+	public static final String RESOURCE_TAG = "resource";
+	public static final String ATTRIBUTE_TAG = "attribute";
+	public static final String CHILD_PARAM_METHOD = "addParameter";
+	public static final String ANY_PARENT = "*/";
+	public static final String SELECTOR_TAG = "selector";
+	
+
+	private static final Log log = LogFactory.getLog(HtmlCompiler.class);
+	
+	private Digester digestr = new Digester();
+	
+	
+	/**
+	 * Constructor with initialisation.
+	 */
+	public HtmlCompiler(){
+		WithDefaultsRulesWrapper rules = new WithDefaultsRulesWrapper(new RulesBase());
+		// Add default rules to process plain tags.
+	    rules.addDefault(new PlainElementCreateRule());
+	    rules.addDefault(new SetNextRule(CHILD_METHOD));
+	    digestr.setDocumentLocator(new LocatorImpl());
+	    digestr.setRules(rules);
+	    digestr.setValidating(false);
+	    digestr.setNamespaceAware(false);
+	    digestr.setUseContextClassLoader(true);
+	    // Concrete renderer method call rules.
+	    setCustomRules(digestr);
+	}
+
+	/**
+	 * Build custom rules for parse special tags and attributes.
+	 * For most tags, value can be in next forms ( for resource, preffixed with f: ):
+	 * <ul>
+	 * <li><b>value</b> as string or EL-expression</li>
+	 * <li><b>property</b> name for property of current component</li>
+	 * <li><b>skin</b> name for property of current skin</li>
+	 * <li><b>context</b> name for property of {@link TemplateContext} for trmplate encoding</li>
+	 * <li><b>default</b> use as value if main property <code>null</code></li>
+	 * </ul>
+	 * Supported :
+	 * <ul>
+	 * <li>Call renderer or utils method &lt;f:call name='xxx'  /&gt;</li>
+	 * <li>Call  method parameter &lt;f:parameter name='xxx'  (value='....' | property='style' | skin='paramName' | context='propertyName ) /&gt;</li>
+	 * <li>Encode plain text &lt;f:verbatim [value='....' | property='style' | skin='paramName' | context='propertyName ] &gt;Some Text&lt;/f:text&gt;</li>
+	 * <li>Encode as text in HTML CSS parameter format &lt;u:style name='background' (value='....' | property='style' | skin='paramName' | context='propertyName )/&gt;</li>
+	 * <li>Get and encode resource &lt;f:resource f:key='images/spacer.gif' [ ... any attributes ... ] /&gt;</li>
+	 * <li>Encode custom attribute &lt;f:attribute name='style' (value='....' | property='style' | skin='paramName' | context='propertyName )  [endorsed='true'] /&gt;</li>
+	 * <li>Template breakpoint &lt;f:break name='xxxxx'  /&gt;</li>
+	 * <li>Encode named facet &lt;u:facet ( name='head  | property='style' | skin='paramName' | context='propertyName )' /&gt;</li>
+	 * <li>Encode children components for current &lt;u:children /&gt;</li>
+	 * <li>Encode one child component for enclosed u:facet or u:children  &lt;u:child /'&gt;</li>
+	 * </ul>
+	 * @param digestr
+	 */
+	protected void setCustomRules( Digester digestr){
+		// Root element. not instantiate - already set by compile method.
+		String pattern = NS_PREFIX+ROOT_TAG;
+		digestr.addSetProperties(pattern);
+		// call renderer method <f:call methodName='xxx' [methodParam='yyy'] />
+		pattern = ANY_PARENT+NS_PREFIX+CALL_TAG;
+		digestr.addObjectCreate(pattern,MethodCallElement.class);
+		digestr.addSetNext(pattern,CHILD_METHOD);
+		digestr.addSetProperties(pattern);
+		// for value of parent call renderer method <f:valueCall methodName='xxx' [methodParam='yyy'] />
+		pattern = ANY_PARENT+NS_PREFIX+VALUE_CALL_TAG;
+		digestr.addObjectCreate(pattern,ValueMethodCallElement.class);
+		digestr.addSetNext(pattern,CHILD_METHOD);
+		digestr.addSetProperties(pattern);
+		// call parameter <f:parapeter methodName='xxx' [methodParam='yyy'] />		
+//		pattern = ANY_PARENT+NS_PREFIX+CALL_TAG+"/"+NS_PREFIX+CALL_PARAM_TAG;
+		pattern = ANY_PARENT+NS_PREFIX+CALL_PARAM_TAG;
+		digestr.addObjectCreate(pattern,MethodParameterElement.class);
+		digestr.addSetNext(pattern,CHILD_PARAM_METHOD);
+		digestr.addSetProperties(pattern);
+		// Encode plain text <f:text>Some Text</f:text>
+		pattern = ANY_PARENT+NS_PREFIX+VERBATUM_TAG;
+		digestr.addObjectCreate(pattern,TextElement.class);
+		digestr.addSetNext(pattern,CHILD_METHOD);
+		digestr.addSetProperties(pattern);
+		digestr.addBeanPropertySetter(pattern,"text");
+		// resource <f:resource f:key='images/spacer.gif' [f:data='...'] [ ... any attributes ... ] />
+		pattern =ANY_PARENT+NS_PREFIX+RESOURCE_TAG;
+		digestr.addObjectCreate(pattern,ResourceElement.class);
+		digestr.addSetNext(pattern,CHILD_METHOD);
+		{
+		Rule rule = new PutAttributesRule(digestr,new String[]{NS_PREFIX+"key",NS_PREFIX+"property",NS_PREFIX+"skin",NS_PREFIX+"context"});
+		digestr.addRule(pattern,rule);
+		}
+		{
+		SetPropertiesRule rule = new SetPropertiesRule(new String[]{NS_PREFIX+"key",NS_PREFIX+"property",NS_PREFIX+"skin",NS_PREFIX+"context"},new String[]{"value","property","skin","context"});		
+		digestr.addRule(pattern,rule);
+		}
+		// custom attribute <f:attribute name='style' (value='....' | property='style' | skin='paramName' | call='methodName' | utilCall='methodName') [notNull='true'] />
+		pattern = ANY_PARENT+NS_PREFIX+ATTRIBUTE_TAG;
+		digestr.addObjectCreate(pattern,AttributeElement.class);
+		digestr.addSetNext(pattern,CHILD_METHOD);
+		digestr.addSetProperties(pattern);
+		// component clientId <f:id [f:required='true'] />
+		// breakpoint <f:break name="name">
+		pattern = ANY_PARENT+NS_PREFIX+BREAK_TAG;
+		digestr.addObjectCreate(pattern,BreakPoint.class);
+		digestr.addSetProperties(pattern);
+		digestr.addSetNext(pattern,CHILD_METHOD);
+		// conditional rendering  <f:if then="true">
+		pattern = ANY_PARENT+NS_PREFIX+IF_TAG;
+		digestr.addObjectCreate(pattern,IfElement.class);
+		digestr.addSetProperties(pattern);
+		digestr.addSetNext(pattern,CHILD_METHOD);
+		// facet <u:insertFacet name="name">
+		pattern = ANY_PARENT+NS_UTIL_PREFIX+FACET_TAG;
+		digestr.addObjectCreate(pattern,FacetElement.class);
+		digestr.addSetProperties(pattern);
+		digestr.addSetNext(pattern,CHILD_METHOD);
+		
+		// childrens <u:insertChildren>
+		pattern = ANY_PARENT+NS_UTIL_PREFIX+CHILDREN_TAG;
+		digestr.addObjectCreate(pattern,ChildrensElement.class);
+		digestr.addSetNext(pattern,CHILD_METHOD);
+//		{
+//			Rule rule = new PutAttributesRule(digestr,new String[]{NS_PREFIX+"key",NS_PREFIX+"property",NS_PREFIX+"skin",NS_PREFIX+"context"});
+//			digestr.addRule(pattern,rule);
+//			}
+			{
+			SetPropertiesRule rule = new SetPropertiesRule(new String[]{NS_PREFIX+"key",NS_PREFIX+"property",NS_PREFIX+"skin",NS_PREFIX+"context"},new String[]{"value","property","skin","context"});		
+			digestr.addRule(pattern,rule);
+			}
+
+
+		
+		// style(sheet) property <u:style>
+		pattern = ANY_PARENT+NS_UTIL_PREFIX+STYLE_TAG;
+		digestr.addObjectCreate(pattern,ClassElement.class);
+		digestr.addSetProperties(pattern);
+		digestr.addSetNext(pattern,CHILD_METHOD);
+		// breakpoint <f:break name="name">
+		pattern = ANY_PARENT+NS_UTIL_PREFIX+CHILD_TAG;
+		digestr.addObjectCreate(pattern,ChildElement.class);
+		digestr.addSetProperties(pattern);
+		digestr.addSetNext(pattern,CHILD_METHOD);
+		
+		//Selector element <u:selector></u:selector>
+		pattern = ANY_PARENT+NS_UTIL_PREFIX+SELECTOR_TAG;
+		digestr.addObjectCreate(pattern,SelectorElement.class);
+		digestr.addSetProperties(pattern);
+		digestr.addSetNext(pattern,CHILD_METHOD);
+	}
+	
+	
+	/**
+	 * Compile template for XML from simple string.
+	 * @param xml - String with template code
+	 * @return compiled template, ready for rendering.
+	 */
+	public PreparedTemplate compile(String xml){
+		Reader input = new StringReader(xml);
+		return compile(input);
+	}
+	
+	/**
+	 * Compile set of templates at time. Templates gets from resources in
+	 * classpath relative to base class. Used for initialisation set of templates in {@link RendererBase} subclasses constructor
+	 * @param base - base class for resources paths
+	 * @param templates - array with templates names.
+	 * @return {@link Map } , with keys - templates name, value - compiled template.
+	 */
+	public Map compileResources(Class base,String[] templates) {
+		Map result = new HashMap(templates.length);
+		for (int i = 0; i < templates.length; i++) {
+			String template = templates[i];
+			result.put(template,compileResource(base,template));
+		}
+		return result;
+	}
+	/**
+	 * Compile XML from resource in classpath. Resource always readed
+	 * as UTF-8 text , to avoid xml declarations.
+	 * @param base - class of base object.
+	 * @param resource - path to resource ( if not start with / , relative to base object )
+	 * @return compiled XML, or Exception-generated stub, if parsing error occurs.
+	 */
+	public static PreparedTemplate compileResource(Class base, String resource)  {
+		String path;
+		if (resource.startsWith("/")) {
+			path = base.getPackage().getName().replace('.','/')+resource;
+		} else {
+			path = base.getPackage().getName().replace('.','/')+"/"+resource;
+		}
+		return compileResource(path);
+	}
+	
+	
+	/**
+	 * Compile XML from resource in classpath. Resource always readed
+	 * as UTF-8 text , to avoid xml declarations.
+	 * @param resource - absolute path to resource
+	 * @return compiled XML, or Exception-generated stub, if parsing error occurs.
+	 */
+	public static PreparedTemplate compileResource(String resource)  {
+		HtmlCompiler compiler = new HtmlCompiler();
+		ClassLoader loader = Thread.currentThread().getContextClassLoader();
+		InputStream input = loader.getResourceAsStream(resource);
+		// Since parsing exceptions handled by compiler, we can not check parameter.
+		PreparedTemplate compile = compiler.compile(input, resource);
+		if(null != input){
+			try {
+				input.close();
+			} catch (IOException e) {
+				// can be ignored
+			}
+		}
+		return compile;
+	}
+	
+	public PreparedTemplate compile(Reader input){
+		// By default - empty result. we not throw any exceptions in compile phase -
+		// since it can be in static class initialization.
+		PreparedTemplate result = null;
+		try {
+			digestr.clear();
+			digestr.push(new RootElement());
+			result = (PreparedTemplate) digestr.parse(input);
+		} catch (SAXParseException e) {
+//			TODO - locate compilation error. How get name ?
+			String errorstr = Messages.getMessage(Messages.PARSING_TEMPLATE_ERROR, new Object[]{"" + e.getLineNumber(), "" + e.getColumnNumber(), e.toString()});
+//			errorstr.append(digestr.getDocumentLocator().getLineNumber()).append(" and position ").append(digestr.getDocumentLocator().getColumnNumber());
+			log.error(errorstr, e);
+			result = new CompiledError(errorstr.toString(),e);
+		} catch (IOException e) {
+			String errorstr = Messages.getMessage(Messages.TEMPLATE_IO_ERROR, e.toString());
+			log.error(errorstr, e);
+			result = new CompiledError(errorstr.toString(),e);
+		} catch (SAXException e) {
+			String errorstr = Messages.getMessage(Messages.PARSING_TEMPLATE_ERROR_2, e.toString());
+			log.error(errorstr, e);
+			result = new CompiledError(errorstr.toString(),e);
+		} 
+		return result;
+	}
+	
+	/**
+	 * Compile input {@link InputStream} to {@link PreparedTemplate} - set of Java classes to encode as JSF output.
+	 * @param input stream with template XML text.
+	 * @param sourcename ( optional ) name of resource, for debug purposes.
+	 * @return compiled template.
+	 */
+	public PreparedTemplate compile(InputStream input, String sourcename){
+		// By default - empty result. we not throw any exceptions in compile phase -
+		// since it can be in static class initialization.
+		PreparedTemplate result = null;
+		try {
+			if (log.isDebugEnabled()) {
+				log.debug(Messages.getMessage(Messages.START_COMPILE_TEMPLATE_INFO, sourcename));
+			}
+			digestr.clear();
+			RootElement root = new RootElement();
+			root.setTemplateName(sourcename);
+			digestr.push(root);
+			result = (PreparedTemplate) digestr.parse(input);
+		} catch (SAXParseException e) {
+//			TODO - locate compilation error. How get name ?
+			String errorstr = Messages.getMessage(Messages.PARSING_TEMPLATE_ERROR_a, new Object[]{sourcename, "" + e.getLineNumber(), "" + e.getColumnNumber(), e.toString()});
+//			errorstr.append(digestr.getDocumentLocator().getLineNumber()).append(" and position ").append(digestr.getDocumentLocator().getColumnNumber());
+			log.error(errorstr, e);
+			result = new CompiledError(errorstr.toString(),e);
+		} catch (IOException e) {
+			String errorstr = Messages.getMessage(Messages.TEMPLATE_IO_ERROR_a, sourcename, e.toString());
+			log.error(errorstr, e);
+			result = new CompiledError(errorstr.toString(),e);
+		} catch (SAXException e) {
+			String errorstr = Messages.getMessage(Messages.PARSING_TEMPLATE_ERROR_2a, sourcename, e.toString());
+			log.error(errorstr, e);
+			result = new CompiledError(errorstr.toString(),e);
+		} 
+		if (log.isDebugEnabled()) {
+			log.debug(Messages.getMessage(Messages.FINISH_COMPILE_TEMPLATE_INFO, sourcename));
+		}
+		return result;
+	}
+
+	/**
+	 * Incapsulate parsing - compilation errors to throw at encoding.
+	 * Allow static / constructor initialisation, all errors will be
+	 * see in page at request time. For debugging purposes. 
+	 * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+	 * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:48 $
+	 *
+	 */
+	private static class CompiledError implements PreparedTemplate {
+		private Exception cause = null;
+		private String message = Messages.getMessage(Messages.TEMPLATE_NOT_COMPILED_ERROR);
+
+		/**
+		 * @param cause
+		 * @param message
+		 */
+		public CompiledError(String message,Exception cause) {
+			super();
+			this.cause = cause;
+			this.message = message;
+		}
+
+		/**
+		 * @param cause
+		 */
+		CompiledError(Exception cause) {
+			this.cause = cause;
+		}
+
+		public void encode(RendererBase renderer, FacesContext context, UIComponent component) throws IOException {
+			// TODO - concrete compilation error.
+			throw new FacesException(message,cause);
+		}
+
+		public List getChildren() {
+			return Collections.EMPTY_LIST;
+		}
+
+		public void addChild(PreparedTemplate child) throws SAXException {
+			// DO Nothing.
+			throw new SAXException(Messages.getMessage(Messages.NO_CHILD_ALLOWED));
+		}
+
+		public void encode(TemplateContext context) throws IOException {
+			throw new FacesException(message,cause);
+			
+		}
+
+		public void encode(TemplateContext context, String breakPoint) throws IOException {
+			throw new FacesException(message,cause);
+			
+		}
+
+		public void setParent(PreparedTemplate parent) {
+			// DO Nothing.
+		}
+
+		public String getTag() {
+			// TODO Auto-generated method stub
+			return "f:error";
+		}
+
+		public Object getValue(TemplateContext context) {
+			// error don't have value
+			return null;
+		}
+		
+	};
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/IfElement.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/IfElement.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/IfElement.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,66 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.renderer.compiler;
+
+import java.io.IOException;
+
+/**
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:46 $
+ *
+ */
+public class IfElement extends ElementBase {
+
+	
+	
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.compiler.ElementBase#encode(org.ajax4jsf.framework.renderer.compiler.TemplateContext, java.lang.String)
+	 */
+	public void encode(TemplateContext context, String breakPoint) throws IOException {
+		// Condition will not contain breakpoints.
+		encode(context);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.compiler.ElementBase#encode(org.ajax4jsf.framework.renderer.compiler.TemplateContext)
+	 */
+	public void encode(TemplateContext context) throws IOException {
+		Object condition = getValue(context);
+		if (null != condition) {
+			if ( (!(condition instanceof Boolean)) || ((Boolean)condition).booleanValue()) {
+				super.encode(context);
+			}
+		}
+	}
+
+	public void setWhen(String condition){
+		setValue(condition);
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.compiler.PreparedTemplate#getTag()
+	 */
+	public String getTag() {
+		return HtmlCompiler.NS_PREFIX+HtmlCompiler.IF_TAG;
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/MethodCallElement.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/MethodCallElement.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/MethodCallElement.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,505 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.renderer.compiler;
+
+import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.faces.FacesException;
+import javax.faces.el.MethodNotFoundException;
+
+import org.ajax4jsf.framework.util.message.Messages;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.xml.sax.SAXException;
+
+
+/**
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:47 $
+ *
+ */
+public  class MethodCallElement extends ElementBase {
+
+	public static final String UTILS_PREFIX = "utils.";
+	
+	static final Log _log = LogFactory.getLog(MethodCallElement.class);
+
+	private String _name = null;
+	
+	private List parameters = new ArrayList();
+	
+	private Invoker invoker = new Invoker();
+	
+	private MethodCacheState state = new MethodCacheState();
+	
+	
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.compiler.CompiledXML#encode(javax.faces.render.Renderer, javax.faces.context.FacesContext, javax.faces.component.UIComponent)
+	 */
+	public void encode(TemplateContext context ) throws IOException {
+			getValue(context);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.compiler.ElementBase#encode(org.ajax4jsf.framework.renderer.compiler.TemplateContext, java.lang.String)
+	 */
+	public void encode(TemplateContext context, String breakPoint) throws IOException {
+		// Text not contain breakpoints.
+		encode(context);
+	}
+	
+	
+	public Object getValue(TemplateContext context) throws FacesException {
+		// prepare method params. we attempt to call 3 signatures :
+		// a) name(FacesContext,UIComponent [, param0...])
+		// b) name(TempalateContext [,param0...])
+		// c) name([param0...])
+		state.init(parameters);
+		Object[] values = state.computeParameterValues(context);
+		
+		InvokeData data = null;
+		synchronized (state) {
+			state.update(context, values, invoker);
+			data = invoker.invokeMethod(context, state);
+		}
+		return invoker.invokeMethod(data);
+		// perform childrens.
+		// super.encode(renderer,context,component);
+	}
+
+
+
+	public void addParameter(MethodParameterElement parameter){
+		parameters.add(parameter);
+	}
+	/**
+	 * @return Returns the methodName.
+	 */
+	public String getName() {
+		return _name;
+	}
+
+	/**
+	 * @param methodName The methodName to set.
+	 */
+	public void setName(String methodName) {
+		if(methodName.startsWith(UTILS_PREFIX)){
+			this._name = methodName.substring(UTILS_PREFIX.length());
+			this.invoker = getRendererUtilsInvoker(_name);
+		} else if(methodName.indexOf('.') >= 0) {
+			this._name = methodName;
+			this.invoker = getStaticInvoker(_name);
+		} else {
+			this._name = methodName;
+			this.invoker = getRendererInvoker(_name);
+		}
+	}
+
+	static Map staticInvokers = new HashMap();
+	
+	public StaticInvoker getStaticInvoker(String methodName) {
+		StaticInvoker invoker = (StaticInvoker)staticInvokers.get(methodName);
+		if(invoker == null) {
+			invoker = new StaticInvoker(methodName);
+			staticInvokers.put(methodName, invoker);
+		}
+		return invoker;		
+	}
+
+	static Map rendererInvokers = new HashMap();
+	
+	public RendererInvoker getRendererInvoker(String methodName) {
+		RendererInvoker invoker = (RendererInvoker)rendererInvokers.get(methodName);
+		if(invoker == null) {
+			invoker = new RendererInvoker(false, methodName);
+			rendererInvokers.put(methodName, invoker);
+		}
+		return invoker;
+	}
+	
+	static Map utilsInvokers = new HashMap();
+
+	public RendererInvoker getRendererUtilsInvoker(String methodName) {
+		RendererInvoker invoker = (RendererInvoker)utilsInvokers.get(methodName);
+		if(invoker == null) {
+			invoker = new RendererInvoker(true, methodName);
+			utilsInvokers.put(methodName, invoker);
+		}
+		return invoker;
+	}
+	
+	public String getTag() {
+		return HtmlCompiler.NS_PREFIX+HtmlCompiler.CALL_TAG;
+	}
+
+	
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.compiler.ElementBase#setParent(org.ajax4jsf.framework.renderer.compiler.PreparedTemplate)
+	 */
+	public void setParent(PreparedTemplate parent) throws SAXException {		
+		super.setParent(parent);
+		if (getName()==null) {
+			throw new SAXException(Messages.getMessage(Messages.NO_NAME_ATTRIBUTE_ERROR, getTag()));
+		}
+	}
+
+	
+/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.compiler.ElementBase#getString(org.ajax4jsf.framework.renderer.compiler.TemplateContext)
+	 */
+	public String getString(TemplateContext context) throws FacesException {
+		Object result = getValue(context);
+		if (null == result || result.toString().length()==0) {
+				result = "";
+		}
+		return result.toString();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.compiler.ElementBase#getAllowedClasses()
+	 */
+	protected Class[] getAllowedClasses() {
+		// TODO Auto-generated method stub
+		return new Class[]{
+				MethodParameterElement.class,
+				ResourceElement.class
+		};
+	}
+
+}
+
+class InvokeData {
+	TemplateContext context;
+	Method method;
+	Object object;
+	Object[] arguments;
+	InvokeData(TemplateContext context, Method method, Object object, Object[] arguments) {
+		this.context = context;
+		this.method = method;
+		this.object = object;
+		this.arguments = (Object[]) arguments.clone();
+	}
+}
+
+class Invoker {
+	String methodName;
+
+	InvokeData invokeMethod(TemplateContext context, MethodCacheState state) {
+		throw new FacesException(Messages.getMessage(Messages.RENDERER_METHOD_NOT_SET_ERROR));
+	}
+
+	void handleInvocationTargetException(TemplateContext context, InvocationTargetException e) {}
+	void handleIllegalAccessException(TemplateContext context, IllegalAccessException e) {}
+	void handleMethodNotFoundException(TemplateContext context) throws MethodNotFoundException {}
+
+	InvokeData invokeMethod(TemplateContext context, Map methods, Class cls, Object object, MethodCacheState state) {
+		Method method = provideMethod(methods, cls, object, state);
+		return new InvokeData(context, method, object, state.current.arguments);
+	}
+	
+	Object invokeMethod(InvokeData data) {
+		if(data.method != null) {
+			try {
+				return data.method.invoke(data.object, data.arguments);
+			} catch (InvocationTargetException e) {
+				handleInvocationTargetException(data.context, e);
+			} catch (IllegalAccessException e) {
+				handleIllegalAccessException(data.context, e);
+			}
+		}
+		handleMethodNotFoundException(data.context);
+		return null;
+	}
+	
+	public Class getInvokedClass(TemplateContext context) {
+		return null;
+	}
+	
+	private Method provideMethod(Map methods, Class cls, Object object, MethodCacheState state) {
+		if(state.method != null) return state.method;
+
+		if(methods.size() > 0) {
+			for (int i = 0; i < state.signatures.length; i++) {
+				state.method = (Method)methods.get(getClassesKey(state.signatures[i].arguments));
+				if(state.method != null) {
+					state.current = state.signatures[i];
+					return state.method;
+				}
+			}
+		}
+		
+		if(cls == null && object != null) cls = object.getClass();
+		Method[] ms = cls.getMethods();
+		for (int m = 0; m < ms.length; m++) {
+			if(!ms[m].getName().equals(methodName)) continue;
+			if(object == null && !Modifier.isStatic(ms[m].getModifiers())) continue;
+			Class[] cs = ms[m].getParameterTypes();
+			Signature s = getMatchingArguments(cs, state.signatures);
+			if(s == null) continue;
+			state.current = s;
+			state.method = ms[m];
+			methods.put(getClassesKey(s.arguments), ms[m]);
+			return state.method;
+		}
+
+		return null;
+	}
+
+	private String getClassesKey(Object[] args) {
+		StringBuffer sb = new StringBuffer();
+		for (int i = 0; i < args.length; i++) {
+			String dk = args[i] == null ? "null" : args[i].getClass().getName();
+			sb.append(";").append(dk);
+		}
+		return sb.toString();
+	}
+	
+	private Signature getMatchingArguments(Class[] cs, Signature[] sgs) {
+		for (int i = 0; i < sgs.length; i++) {
+			if(isMatching(cs, sgs[i].arguments)) return sgs[i];
+		}
+		return null;
+	}
+
+	static boolean isMatching(Class[] cs, Object[] args) {
+		if(cs.length != args.length) return false;
+		for (int i = 0; i < cs.length; i++) {
+			if(args[i] != null && !cs[i].isAssignableFrom(args[i].getClass())) return false;
+		}
+		return true;
+	}
+}
+
+class RendererInvoker extends Invoker {
+	boolean utils = false;
+	Map renderers = new HashMap();
+	
+	public RendererInvoker(boolean utils, String methodName) {
+		this.utils = utils;
+		this.methodName = methodName;
+	}
+
+	public Class getInvokedClass(TemplateContext context) {
+		Object object = getInvokedObject(context);
+		return (object != null) ? object.getClass() : null;
+	}
+	
+	private Object getInvokedObject(TemplateContext context) {
+		if(utils) {
+			return context.getRenderer().getUtils();
+		} else {
+			return context.getRenderer();
+		}
+	}
+	
+	InvokeData invokeMethod(TemplateContext context, MethodCacheState state) {
+		Object object = getInvokedObject(context);
+		Map methods = getMethods(object);
+		return invokeMethod(context, methods, null, object, state);
+	}
+	
+	private Map getMethods(Object object) {
+		if(object == null) return null;
+		Map methods = (Map)renderers.get(object);
+		if(methods == null) {
+			methods = new HashMap();
+			renderers.put(object, methods);
+		}
+		return methods;
+	}
+
+	void handleInvocationTargetException(TemplateContext context, InvocationTargetException e) {
+		String logMessage = (utils) 
+			? Messages.getMessage(Messages.METHOD_CALL_ERROR_1, methodName, context.getComponent().getId())
+			: Messages.getMessage(Messages.METHOD_CALL_ERROR_1a, methodName, context.getComponent().getId());
+		String excMessage = (utils)
+			? Messages.getMessage(Messages.METHOD_CALL_ERROR_2, new Object[]{methodName, context.getComponent().getId(), e.getCause().getMessage()})
+			: Messages.getMessage(Messages.METHOD_CALL_ERROR_2a, new Object[]{methodName, context.getComponent().getId(), e.getCause().getMessage()});
+		MethodCallElement._log.error(logMessage, e);
+		throw new FacesException(excMessage, e);
+	}
+	void handleIllegalAccessException(TemplateContext context, IllegalAccessException e) {
+		String logMessage = (utils) 
+			? Messages.getMessage(Messages.getMessage(Messages.METHOD_CALL_ERROR_3, methodName, context.getComponent().getId()))
+			: Messages.getMessage(Messages.getMessage(Messages.METHOD_CALL_ERROR_3a, methodName, context.getComponent().getId()));
+		String excMessage = (utils)
+			? Messages.getMessage(Messages.getMessage(Messages.METHOD_CALL_ERROR_4, new Object[]{methodName, context.getComponent().getId(), e.getCause().getMessage()}))
+			: Messages.getMessage(Messages.getMessage(Messages.METHOD_CALL_ERROR_4a, new Object[]{methodName, context.getComponent().getId(), e.getCause().getMessage()}));
+		MethodCallElement._log.error(logMessage, e);
+		throw new FacesException(excMessage, e);
+	}
+	
+	void handleMethodNotFoundException(TemplateContext context) throws MethodNotFoundException {
+		String logMessage = (utils) 
+			? Messages.getMessage(Messages.getMessage(Messages.METHOD_CALL_ERROR_5, methodName, context.getComponent().getId()))
+			: Messages.getMessage(Messages.getMessage(Messages.METHOD_CALL_ERROR_5a, methodName, context.getComponent().getId()));
+		String excMessage = (utils)
+			? Messages.getMessage(Messages.getMessage(Messages.METHOD_CALL_ERROR_6, methodName))
+			: Messages.getMessage(Messages.getMessage(Messages.METHOD_CALL_ERROR_6a, methodName));
+			MethodCallElement._log.error(logMessage);
+		throw new FacesException(excMessage);
+	}
+}
+
+class StaticInvoker extends Invoker {
+	String className;
+	Class cls;
+	Map methods = new HashMap();
+	
+	StaticInvoker(String methodName) {
+		this.methodName = methodName;
+		int i = methodName.lastIndexOf('.');
+		className = methodName.substring(0, i);
+		this.methodName = methodName.substring(i + 1);
+		try {
+			cls = Thread.currentThread().getContextClassLoader().loadClass(className);
+		} catch (ClassNotFoundException e) {
+			//ignore, throw exception when invoking
+		}
+	}
+
+	InvokeData invokeMethod(TemplateContext context, MethodCacheState state) {
+		if(cls == null) throw new FacesException(className, new ClassNotFoundException(className));
+		return invokeMethod(context, methods, cls, null, state);
+	}
+
+	void handleInvocationTargetException(TemplateContext context, InvocationTargetException e) {
+		MethodCallElement._log.error(Messages.getMessage(Messages.METHOD_CALL_ERROR_1a, methodName, context.getComponent().getId()), e);
+		throw new FacesException(Messages.getMessage(Messages.METHOD_CALL_ERROR_2a, new Object[]{methodName, context.getComponent().getId(), e.getCause().getMessage()}), e);
+	}
+	void handleIllegalAccessException(TemplateContext context, IllegalAccessException e) {
+		MethodCallElement._log.error(Messages.getMessage(Messages.METHOD_CALL_ERROR_3a, methodName, context.getComponent().getId()), e);
+		throw new FacesException(Messages.getMessage(Messages.METHOD_CALL_ERROR_4a, new Object[]{methodName, context.getComponent().getId(), e.getCause().getMessage()}), e);
+	}		
+	void handleMethodNotFoundException(TemplateContext context) throws MethodNotFoundException {
+		MethodCallElement._log.error(Messages.getMessage(Messages.METHOD_CALL_ERROR_5a, methodName, context.getComponent().getId()));
+		throw new MethodNotFoundException(Messages.getMessage(Messages.METHOD_CALL_ERROR_6a, methodName));
+	}
+}
+
+class MethodCacheState {
+	private MethodParameterElement[] elements;
+	private Class[] parameterClasses;
+	private Object[] parameterValues;
+	private Class lastCallingClass = null;
+	public Method method;
+	public Signature current;
+	public Signature[] signatures;
+	
+	public void init(List parameters) {
+		if(elements != null) return;
+		synchronized (this) {
+			if(elements != null) return;
+			int size = parameters.size();
+			parameterClasses = new Class[size];
+			parameterValues = new Object[size];
+			signatures = new Signature[3];
+			signatures[0] = new Signature2(size);
+			signatures[1] = new Signature1(size);
+			signatures[2] = new Signature0(size);		
+			elements = (MethodParameterElement[])parameters.toArray(new MethodParameterElement[0]);
+		}
+	}
+	
+	public Object[] computeParameterValues(TemplateContext context) {
+		Object[] ps = new Object[elements.length];
+		for (int i = 0; i < elements.length; i++) {
+			ps[i] = elements[i].valueGetter.getValueOrDefault(context);
+		}
+		return ps;
+	}
+	
+	public void update(TemplateContext context, Object[] values, Invoker invoker) {
+		boolean changed = false;
+		for (int i = 0; i < elements.length; i++) {
+			Object parametr = values[i];
+			Class c = (parametr == null) ? null : parametr.getClass();
+			if(c != parameterClasses[i]) {
+				parameterClasses[i] = c;
+				changed = true;
+			}
+			parameterValues[i] = parametr;			
+		}
+		if(method != null && !changed && lastCallingClass != invoker.getInvokedClass(context)) {
+			lastCallingClass = invoker.getInvokedClass(context);
+			changed = true;
+		}
+		if(changed || current == null) {
+			for (int i = 0; i < signatures.length; i++) {
+				signatures[i].update(context, parameterValues);
+			}
+			method = null;
+			current = null;
+		} else {
+			current.update(context, parameterValues);
+		}
+	}	
+	
+}
+
+abstract class Signature {
+	Object[] arguments;	
+
+	Signature() {}
+
+	void update(TemplateContext context, Object[] parameters) {}
+}
+
+class Signature0 extends Signature {
+	Signature0(int size) {
+		arguments = new Object[size];
+	}
+
+	void update(TemplateContext context, Object[] parameters) {
+		System.arraycopy(parameters, 0, arguments, 0, parameters.length);
+	}
+	
+}
+
+class Signature1 extends Signature {
+	Signature1(int size) {
+		arguments = new Object[size + 1];
+	}
+	void update(TemplateContext context, Object[] parameters) {
+		arguments[0] = context;
+		System.arraycopy(parameters, 0, arguments, 1, parameters.length);
+	}
+	
+}
+
+class Signature2 extends Signature {
+	Signature2(int size) {
+		arguments = new Object[size + 2];
+	}
+	void update(TemplateContext context, Object[] parameters) {
+		arguments[0] = context.getFacesContext();
+		arguments[1] = context.getComponent();
+		System.arraycopy(parameters, 0, arguments, 2, parameters.length);
+	}	
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/MethodParameterElement.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/MethodParameterElement.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/MethodParameterElement.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,99 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.renderer.compiler;
+
+import java.io.IOException;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+
+import org.ajax4jsf.framework.renderer.RendererBase;
+import org.xml.sax.SAXException;
+
+
+public class MethodParameterElement extends ElementBase {
+
+	/**
+	 * 
+	 */
+	public MethodParameterElement() {
+		// TODO Auto-generated constructor stub
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.compiler.RootElement#encode(javax.faces.render.Renderer, javax.faces.context.FacesContext, javax.faces.component.UIComponent)
+	 */
+	public void encode(RendererBase renderer, FacesContext context, UIComponent component) throws IOException {
+		// DO Nothing !
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.compiler.ElementBase#encode(org.ajax4jsf.framework.renderer.compiler.TemplateContext, java.lang.String)
+	 */
+	public void encode(TemplateContext context, String breakPoint) throws IOException {
+		// DO Nothing !
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.compiler.ElementBase#encode(org.ajax4jsf.framework.renderer.compiler.TemplateContext)
+	 */
+	public void encode(TemplateContext context) throws IOException {
+		// DO Nothing !
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.compiler.ElementBase#addChild(org.ajax4jsf.framework.renderer.compiler.PreparedTemplate)
+	 */
+	public void addChild(PreparedTemplate child) throws SAXException {
+		// TODO Auto-generated method stub
+		super.addChild(child);
+		if (child instanceof ResourceElement) {
+			final ResourceElement res = (ResourceElement) child;
+			this.valueGetter = new ValueGetter(){
+
+				/* (non-Javadoc)
+				 * @see org.ajax4jsf.framework.renderer.compiler.ElementBase.ValueGetter#getValue(org.ajax4jsf.framework.renderer.compiler.TemplateContext)
+				 */
+				Object getValue(TemplateContext context) {
+					return context.getRenderer().getResource(res.getValue(context).toString());
+				}
+				
+			};
+		}
+	}
+
+	public String getTag() {
+		// TODO Auto-generated method stub
+		return HtmlCompiler.NS_PREFIX+HtmlCompiler.CALL_PARAM_TAG;
+	}
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.compiler.ElementBase#getAllowedClasses()
+	 */
+	protected Class[] getAllowedClasses() {
+		// TODO Auto-generated method stub
+		return new Class[]{
+				ResourceElement.class
+		};
+	}
+
+	
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/PlainElement.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/PlainElement.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/PlainElement.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,157 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.renderer.compiler;
+
+import java.io.IOException;
+
+import javax.faces.context.ResponseWriter;
+
+import org.xml.sax.Attributes;
+
+/**
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:49 $
+ *
+ */
+public class PlainElement extends ElementBase {
+
+
+	private String namespace = "";
+	private String tag = null;
+	
+	private String[][] attrs = null;
+	
+	private boolean encodeStart = true;
+
+	private boolean encodeEnd = true;
+	/**
+	 * @param attrs
+	 */
+	public PlainElement(String namespace, String tag, Attributes attrs) {
+		// Set modifable attributes implementation to ability of
+		// modifications.
+		this.attrs = new String[attrs.getLength()][2];
+		this.namespace = namespace;
+		this.tag = tag;
+		int currentAttribute = 0;
+		// remove non-passed attributes, parse special.
+		for (int i = 0; i < attrs.getLength(); i++) {
+			String qName = attrs.getQName(i); 
+			String value = attrs.getValue(i);
+			if (qName.equals(HtmlCompiler.NS_PREFIX+"start")) {
+				this.encodeStart = "true".equals(value);
+			} else if (qName.equals(HtmlCompiler.NS_PREFIX+"end")) {
+				this.encodeEnd = "true".equals(value);
+			} else {
+				this.attrs[currentAttribute][0]=qName;
+				this.attrs[currentAttribute++][1]=value;
+			}
+			
+		}
+		// squize array if nessesary.
+		if (currentAttribute < attrs.getLength()) {
+			String[][] newattrs = new String[currentAttribute][2];
+			System.arraycopy(this.attrs,0,newattrs,0,currentAttribute);
+			this.attrs = newattrs;
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.compiler.CompiledXML#encode(javax.faces.render.Renderer, javax.faces.context.FacesContext, javax.faces.component.UIComponent)
+	 */
+	public void encodeBegin(TemplateContext context) throws IOException {
+		ResponseWriter writer = context.getWriter();
+		if (this.encodeStart) {
+			writer.startElement(getTag(), context.getComponent());
+			// write attributes
+			for (int i = 0; i < attrs.length; i++) {
+				writer.writeAttribute(attrs[i][0], attrs[i][1], null);
+			}
+		}
+	}
+
+	public void encodeEnd(TemplateContext context) throws IOException {
+		ResponseWriter writer = context.getWriter();
+
+		if (this.encodeEnd) {
+			writer.endElement(getTag());
+		}
+
+	}
+
+	/**
+	 * @return Returns the tag.
+	 */
+	public String getTag() {
+		return tag;
+	}
+
+	/**
+	 * @param tag The tag to set.
+	 */
+	public void setTag(String tag) {
+		this.tag = tag;
+	}
+
+	/**
+	 * @return Returns the attrs.
+	 */
+	public String[][] getAttrs() {
+		return attrs;
+	}
+
+	/**
+	 * @return Returns the encodeEnd.
+	 */
+	public boolean isEncodeEnd() {
+		return encodeEnd;
+	}
+
+	/**
+	 * @param encodeEnd The encodeEnd to set.
+	 */
+	public void setEncodeEnd(boolean encodeEnd) {
+		this.encodeEnd = encodeEnd;
+	}
+
+	/**
+	 * @return Returns the encodeStart.
+	 */
+	public boolean isEncodeStart() {
+		return encodeStart;
+	}
+
+	/**
+	 * @param encodeStart The encodeStart to set.
+	 */
+	public void setEncodeStart(boolean encodeStart) {
+		this.encodeStart = encodeStart;
+	}
+
+	/**
+	 * @return Returns the namespace.
+	 */
+	public String getNamespace() {
+		return namespace;
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/PlainElementCreateRule.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/PlainElementCreateRule.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/PlainElementCreateRule.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,64 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.renderer.compiler;
+
+import org.ajax4jsf.framework.util.message.Messages;
+import org.apache.commons.digester.Rule;
+import org.xml.sax.Attributes;
+import org.xml.sax.SAXException;
+
+/**
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:47 $
+ *
+ */
+public class PlainElementCreateRule extends Rule {
+
+	/* (non-Javadoc)
+	 * @see org.apache.commons.digester.Rule#begin(java.lang.String, java.lang.String, org.xml.sax.Attributes)
+	 */
+	public void begin(String namespace, String name, Attributes attrs) throws Exception {
+		if (name.startsWith(HtmlCompiler.NS_PREFIX)) {
+			throw new SAXException(Messages.getMessage(Messages.NAMESPACE_NOT_RECOGNIZED_ERROR, name));
+		}
+		digester.push(new PlainElement(namespace,name,attrs));
+	}
+
+	/* (non-Javadoc)
+	 * @see org.apache.commons.digester.Rule#body(java.lang.String, java.lang.String, java.lang.String)
+	 */
+	public void body(String arg0, String arg1, String arg2) throws Exception {
+		// TODO Auto-generated method stub
+		
+	}
+
+	/* (non-Javadoc)
+	 * @see org.apache.commons.digester.Rule#end(java.lang.String, java.lang.String)
+	 */
+	public void end(String arg0, String arg1) throws Exception {
+		// TODO Auto-generated method stub
+		digester.pop();
+	}
+	
+	
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/PreparedTemplate.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/PreparedTemplate.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/PreparedTemplate.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,87 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.renderer.compiler;
+
+import java.io.IOException;
+import java.util.List;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+
+import org.ajax4jsf.framework.renderer.RendererBase;
+import org.xml.sax.SAXException;
+
+
+/**
+ * Public interface for compiled XML rendered template.
+ * {@link javax.faces.render.Renderer} must simple call xml.encode(this,context,component); 
+ * for produce {@link javax.faces.context.ResponseWriter} events.
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:49 $
+ *
+ */
+public interface PreparedTemplate {
+	
+	/**
+	 * Encode this XML component. May be simple send element and attributes,
+	 * call specified Renderer or RendererUtils method etc. Can encode children
+	 * elements ( if exist ).
+	 * @param renderer
+	 * @param context
+	 * @param component
+	 * @throws IOException
+	 */
+	public void encode(RendererBase renderer, FacesContext context, UIComponent component) throws IOException;
+	
+	public void encode(TemplateContext context) throws IOException;
+
+	public void encode(TemplateContext context,String breakPoint) throws IOException;
+	/**
+	 * @return List of childrens of this component.
+	 */
+	public List getChildren();
+	
+	/**
+	 * Append child element to current.
+	 * @param child
+	 * @throws SAXException 
+	 */
+	public void addChild(PreparedTemplate child) throws SAXException;
+	
+	/**
+	 * Set parent element in compiled tree for template.
+	 * @param parent
+	 * @throws SAXException 
+	 */
+	public void setParent(PreparedTemplate parent) throws SAXException;
+	
+	/**
+	 * @return tag name for element.
+	 */
+	public String getTag();
+
+	/**
+	 * @return Returns the value. If is EL expression valueBinding - evaluate in.
+	 */
+	public Object getValue(TemplateContext context);
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/PutAttributesRule.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/PutAttributesRule.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/PutAttributesRule.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,92 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.renderer.compiler;
+
+import java.lang.reflect.Method;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.apache.commons.digester.Digester;
+import org.apache.commons.digester.Rule;
+import org.xml.sax.Attributes;
+
+/**
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:46 $
+ *
+ */
+public class PutAttributesRule extends Rule {
+
+	private List toSkip = Collections.EMPTY_LIST;
+	private String methodName = "put";
+	/**
+	 * @param digestr
+	 * @param toSkip
+	 */
+	public PutAttributesRule(Digester digestr, String[] toSkip) {
+		// TODO Auto-generated constructor stub
+		this.digester = digestr;
+//		Arrays.asList(toSkip);
+		this.toSkip = Arrays.asList(toSkip);
+	}
+
+	/**
+	 * @param digestr
+	 * @param methodName
+	 */
+	public PutAttributesRule(Digester digestr, String methodName) {
+		// TODO Auto-generated constructor stub
+		this.digester = digestr;
+//		Arrays.asList(toSkip);
+		this.methodName = methodName;
+	}
+	
+	/**
+	 * @param digestr
+	 * @param methodName
+	 * @param toSkip
+	 */
+	public PutAttributesRule(Digester digestr, String methodName, String[] toSkip) {
+		// TODO Auto-generated constructor stub
+		this.digester = digestr;
+		this.methodName = methodName;
+		this.toSkip = Arrays.asList(toSkip);
+	}
+	/* (non-Javadoc)
+	 * @see org.apache.commons.digester.Rule#begin(java.lang.String, java.lang.String, org.xml.sax.Attributes)
+	 */
+	public void begin(String namespace, String element, Attributes attrs) throws Exception {
+		Object top = digester.peek();
+		if(null != top){
+			Method put = top.getClass().getDeclaredMethod(methodName,new Class[]{Object.class,Object.class});
+			for (int i = 0; i < attrs.getLength(); i++) {
+				String qName = attrs.getQName(i);
+				String value = attrs.getValue(i);
+				if (!toSkip.contains(qName)) {
+					put.invoke(top,new Object[]{qName,value});
+				}
+			}
+		}
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/ResourceElement.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/ResourceElement.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/ResourceElement.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,105 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.renderer.compiler;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.faces.FacesException;
+
+import org.ajax4jsf.framework.renderer.RendererBase;
+import org.ajax4jsf.framework.resource.InternetResource;
+import org.ajax4jsf.framework.resource.InternetResourceBuilder;
+
+
+/**
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:43 $
+ *
+ */
+public class ResourceElement extends ElementBase {
+
+	private Map attrs = new HashMap();
+	/* (non-Javadoc)
+	 * @see java.util.Map#put(java.lang.Object, java.lang.Object)
+	 */
+	public Object put(Object key, Object value) {
+		return attrs.put(key, value);
+	}
+
+	/* (non-Javadoc)
+	 * @see java.util.Map#get(java.lang.Object)
+	 */
+	public Object get(Object key) {
+		return attrs.get(key);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.compiler.RootElement#encode(javax.faces.render.Renderer, javax.faces.context.FacesContext, javax.faces.component.UIComponent)
+	 */
+	public void encodeBegin(TemplateContext context) throws IOException {
+		InternetResource resource = findResource(context);
+		if(null !=resource){
+			resource.encodeBegin(context.getFacesContext(),context.getComponent(),attrs);
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.compiler.RootElement#encode(javax.faces.render.Renderer, javax.faces.context.FacesContext, javax.faces.component.UIComponent)
+	 */
+	public void encodeEnd(TemplateContext context) throws IOException {
+		InternetResource resource = findResource(context);
+		if(null !=resource){
+			resource.encodeEnd(context.getFacesContext(),context.getComponent());
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.compiler.RootElement#getString(javax.faces.render.Renderer, javax.faces.context.FacesContext, javax.faces.component.UIComponent)
+	 */
+	public String getString(TemplateContext context) throws FacesException {
+		InternetResource resource = findResource(context);
+		if(null !=resource){
+			return resource.getUri(context.getFacesContext(),context.getComponent());
+		}
+		return "";
+	}
+
+	private InternetResource findResource(TemplateContext context) {
+		InternetResource resource;
+		String path = (String) getValue(context);
+		RendererBase renderer = context.getRenderer();
+		if (renderer != null)  {
+			resource = renderer.getResource(path);
+		} else {
+			resource = InternetResourceBuilder.getInstance().createResource(null, path);
+		}
+		
+		return resource;
+	}
+	
+	public String getTag() {
+		return HtmlCompiler.NS_PREFIX+HtmlCompiler.RESOURCE_TAG;
+	}
+	
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/RootElement.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/RootElement.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/RootElement.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,92 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.renderer.compiler;
+
+import java.io.IOException;
+
+import org.ajax4jsf.framework.util.message.Messages;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:45 $
+ *
+ */
+public class RootElement extends ElementBase {
+	private static final Log log = LogFactory.getLog(RootElement.class);
+
+	private String templateName="unset";
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.compiler.ElementBase#encode(org.ajax4jsf.framework.renderer.compiler.TemplateContext, java.lang.String)
+	 */
+	public void encode(TemplateContext context, String breakPoint) throws IOException {
+		if (log.isDebugEnabled()) {
+			log.debug(Messages.getMessage(Messages.ENCODE_COMPILED_TEMPLATE_INFO, getTemplateName(), breakPoint));
+		}
+		try {
+			super.encode(context, breakPoint);
+		} catch (BreakException e) {
+			// encoding terminated by break
+			if (log.isDebugEnabled()) {
+				log.debug(Messages.getMessage(Messages.ENCODING_TEMPLATE_TERMINATED_INFO, getTemplateName(), e.getName()));
+			}
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.compiler.ElementBase#encode(org.ajax4jsf.framework.renderer.compiler.TemplateContext)
+	 */
+	public void encode(TemplateContext context) throws IOException {
+		if (log.isDebugEnabled()) {
+			log.debug(Messages.getMessage(Messages.ENCODE_COMPILED_TEMPLATE_INFO2, getTemplateName()));
+		}
+		try {
+			super.encode(context);
+		} catch (BreakException e) {
+			// encoding terminated by break
+			if (log.isDebugEnabled()) {
+				log.debug(Messages.getMessage(Messages.ENCODING_TEMPLATE_TERMINATED_INFO, getTemplateName(), e.getName()));
+			}
+		}
+	}
+
+	public String getTag() {
+		// TODO Auto-generated method stub
+		return HtmlCompiler.NS_PREFIX+HtmlCompiler.ROOT_TAG;
+	}
+
+	/**
+	 * @return Returns the templateName.
+	 */
+	public String getTemplateName() {
+		return templateName;
+	}
+
+	/**
+	 * @param templateName The templateName to set.
+	 */
+	public void setTemplateName(String templateName) {
+		this.templateName = templateName;
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/SelectorElement.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/SelectorElement.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/SelectorElement.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,87 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.renderer.compiler;
+
+import java.io.IOException;
+
+import org.ajax4jsf.framework.util.message.Messages;
+import org.xml.sax.SAXException;
+
+/**
+ * @author Maksim Kaszynski (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:46 $
+ * CSS selector tag.
+ * Works this way
+ * <code>
+ * 	<u:selector name=".X">
+ * 		a bunch of <u:style>
+ * 	</u:selector>
+ * </code>
+ * renders like this
+ * <code>
+ * 	.X{
+ * 		styles...
+ * 	}
+ * </code>
+ *
+ */
+public class SelectorElement extends ElementBase {
+
+	private String name ;
+	
+	protected void encodeBegin(TemplateContext context) throws IOException {
+		context.getWriter().write("\n" + getName() + "{\n");
+	}
+	
+	protected void encodeEnd(TemplateContext context) throws IOException {
+		context.getWriter().write("}");
+	}
+
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.compiler.PreparedTemplate#getTag()
+	 */
+	public String getTag() {
+		// TODO Auto-generated method stub
+		return HtmlCompiler.NS_PREFIX+HtmlCompiler.SELECTOR_TAG;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.compiler.ElementBase#setParent(org.ajax4jsf.framework.renderer.compiler.PreparedTemplate)
+	 */
+	public void setParent(PreparedTemplate parent) throws SAXException {		
+		super.setParent(parent);
+		if (getName()==null) {
+			throw new SAXException(Messages.getMessage(Messages.NO_NAME_ATTRIBUTE_ERROR, getTag()));
+		}
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+	
+	
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/TemplateContext.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/TemplateContext.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/TemplateContext.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,108 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.renderer.compiler;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+
+import org.ajax4jsf.framework.renderer.RendererBase;
+
+
+/**
+ * Incapsulate all current parameters for encoding template.
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:48 $
+ *
+ */
+public class TemplateContext {
+	FacesContext facesContext;
+	RendererBase renderer;
+	UIComponent component;
+	Map parameters = new HashMap();
+	/**
+	 * @param renderer
+	 * @param facesContext
+	 * @param component
+	 */
+	public TemplateContext(RendererBase renderer, FacesContext facesContext, UIComponent component) {
+		// TODO Auto-generated constructor stub
+		this.facesContext = facesContext;
+		this.renderer = renderer;
+		this.component = component;
+	}
+	/**
+	 * @return Returns the component.
+	 */
+	public UIComponent getComponent() {
+		return component;
+	}
+	/**
+	 * @return Returns the facesContext.
+	 */
+	public FacesContext getFacesContext() {
+		return facesContext;
+	}
+	/**
+	 * @return Returns the renderer.
+	 */
+	public RendererBase getRenderer() {
+		return renderer;
+	}
+	
+	public void putParameter(Object key,Object value) {
+		parameters.put(key,value);
+	}
+	
+	public Object getParameter(Object key) {
+		return parameters.get(key);
+	}
+	public void removeParameter(Object key) {
+		parameters.remove(key);
+		
+	}
+	public ResponseWriter getWriter() {
+		return facesContext.getResponseWriter();
+	}
+
+	/**
+	 * Create copy of this context for other child component.
+	 * Used in iterations and facets for render template on current child
+	 * @param child - component for template
+	 * @return - new copy of component, with same parameters.
+	 */
+	public TemplateContext clone(UIComponent child){
+		TemplateContext cloned = new TemplateContext(this.renderer,this.facesContext,child);
+		cloned.parameters.putAll(this.parameters);
+		return cloned;
+	}
+	
+	/**
+	 * Return a mutable Map representing the parameters associated wth this TemplateContext
+	 */
+	public Map getParameters() {
+		return parameters; 
+	}
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/TextElement.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/TextElement.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/TextElement.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,123 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.renderer.compiler;
+
+import java.io.IOException;
+
+import javax.faces.FacesException;
+
+/**
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:44 $
+ *
+ */
+public class TextElement extends ElementBase {
+	
+	private String text = null;
+	
+	private boolean escape = false;
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.compiler.RootElement#encode(javax.faces.render.Renderer, javax.faces.context.FacesContext, javax.faces.component.UIComponent)
+	 */
+	public void encode(TemplateContext context) throws IOException {
+		// TODO Auto-generated method stub
+		String textValue = getString(context);
+		
+		if (isEscape()) {
+			context.getWriter().writeText(textValue, null);
+		} else {
+			context.getWriter().write(textValue.toString());
+		}
+	}
+
+	
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.compiler.ElementBase#encode(org.ajax4jsf.framework.renderer.compiler.TemplateContext, java.lang.String)
+	 */
+	public void encode(TemplateContext context, String breakPoint) throws IOException {
+		// Text not contain breakpoints.
+		encode(context);
+	}
+
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.compiler.ElementBase#getString(org.ajax4jsf.framework.renderer.compiler.TemplateContext)
+	 */
+	public String getString(TemplateContext context) throws FacesException {
+		
+		String textValue = super.getString(context);
+		// If value not set - return element body.
+		if (textValue.length()==0 && null != getText()) {
+			textValue = getText();
+		} 
+		return textValue;
+	}
+
+
+	/**
+	 * @return Returns the text.
+	 */
+	public String getText() {
+		return text;
+	}
+
+	/**
+	 * @param text The text to set.
+	 */
+	public void setText(String text) {
+		this.text = text;
+	}
+
+	/**
+	 * @return Returns the escape.
+	 */
+	public boolean isEscape() {
+		return escape;
+	}
+
+	/**
+	 * @param escape The escape to set.
+	 */
+	public void setEscape(boolean escape) {
+		this.escape = escape;
+	}
+
+
+	public String getTag() {
+		return HtmlCompiler.NS_PREFIX+HtmlCompiler.VERBATUM_TAG;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.compiler.ElementBase#getAllowedClasses()
+	 */
+	protected Class[] getAllowedClasses() {
+		// TODO Auto-generated method stub
+		return new Class[]{
+				MethodCallElement.class,
+				ResourceElement.class,
+				ClassElement.class				
+		};
+	}
+
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/ValueMethodCallElement.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/ValueMethodCallElement.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/ValueMethodCallElement.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,68 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.renderer.compiler;
+
+import java.io.IOException;
+
+import org.xml.sax.SAXException;
+
+/**
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:45 $
+ *
+ */
+public class ValueMethodCallElement extends MethodCallElement {
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.compiler.MethodCallElement#encode(org.ajax4jsf.framework.renderer.compiler.TemplateContext)
+	 */
+	public void encode(TemplateContext context) throws IOException {
+		// do nothing
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.compiler.MethodCallElement#setParent(org.ajax4jsf.framework.renderer.compiler.PreparedTemplate)
+	 */
+	public void setParent(PreparedTemplate parent) throws SAXException {
+		// TODO Auto-generated method stub
+		super.setParent(parent);
+		if (parent instanceof ElementBase) {
+			ElementBase base = (ElementBase) parent;
+			base.valueGetter = new ElementBase.ValueGetter(){
+				/* (non-Javadoc)
+				 * @see org.ajax4jsf.framework.renderer.compiler.ElementBase.ValueGetter#getValue(org.ajax4jsf.framework.renderer.compiler.TemplateContext)
+				 */
+				Object getValue(TemplateContext context) {
+					// TODO Auto-generated method stub
+					return ValueMethodCallElement.this.getValue(context);
+				}
+			};
+		}
+	}
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.compiler.PreparedTemplate#getTag()
+	 */
+	public String getTag() {
+		return HtmlCompiler.NS_PREFIX+HtmlCompiler.VALUE_CALL_TAG;
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/WithDefaultsRulesWrapper.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/WithDefaultsRulesWrapper.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/WithDefaultsRulesWrapper.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,190 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/* $Id: WithDefaultsRulesWrapper.java,v 1.1.2.1 2007/01/09 18:57:42 alexsmirnov Exp $
+ *
+ * Copyright 2003-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */ 
+
+package org.ajax4jsf.framework.renderer.compiler;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.ajax4jsf.framework.util.message.Messages;
+import org.apache.commons.digester.Digester;
+import org.apache.commons.digester.Rule;
+import org.apache.commons.digester.Rules;
+
+/**
+ * <h2>Imported from digitester 1.7 , since JSF RI used version 1.5 by default.</h2>
+ * <p><code>Rules</code> <em>Decorator</em> that returns default rules 
+ * when no matches are returned by the wrapped implementation.</p>
+ *
+ * <p>This allows default <code>Rule</code> instances to be added to any 
+ * existing <code>Rules</code> implementation. These default <code>Rule</code> 
+ * instances will be returned for any match for which the wrapped 
+ * implementation does not return any matches.</p>
+ * <p> For example,
+ * <pre>
+ *   Rule alpha;
+ *   ...
+ *   WithDefaultsRulesWrapper rules = new WithDefaultsRulesWrapper(new BaseRules());
+ *   rules.addDefault(alpha);
+ *   ...
+ *   digester.setRules(rules);
+ *   ...
+ * </pre>
+ * when a pattern does not match any other rule, then rule alpha will be called.
+ * </p>
+ * <p><code>WithDefaultsRulesWrapper</code> follows the <em>Decorator</em> pattern.</p>
+ *
+ * @since 1.6
+ */
+
+public class WithDefaultsRulesWrapper implements Rules {
+
+    // --------------------------------------------------------- Fields
+    
+    /** The Rules implementation that this class wraps. */
+    private Rules wrappedRules;
+    /** Rules to be fired when the wrapped implementations returns none. */
+    private List defaultRules = new ArrayList();
+    /** All rules (preserves order in which they were originally added) */
+    private List allRules = new ArrayList();
+    
+    // --------------------------------------------------------- Constructor
+    
+    /** 
+     * Base constructor.
+     *
+     * @param wrappedRules the wrapped <code>Rules</code> implementation, not null
+     * @throws IllegalArgumentException when <code>wrappedRules</code> is null
+     */
+    public WithDefaultsRulesWrapper(Rules wrappedRules) {
+        if (wrappedRules == null) {
+            throw new IllegalArgumentException(Messages.getMessage(Messages.WRAPPED_RULES_NULL_ERROR));
+        }
+        this.wrappedRules = wrappedRules;
+    }
+
+    // --------------------------------------------------------- Properties
+    
+    /** Gets digester using these Rules */
+    public Digester getDigester() {
+        return wrappedRules.getDigester();
+    }
+    
+    /** Sets digeseter using these Rules */
+    public void setDigester(Digester digester) {
+        wrappedRules.setDigester(digester);
+        Iterator it = defaultRules.iterator();
+        while (it.hasNext()) {
+            Rule rule = (Rule) it.next();
+            rule.setDigester(digester);
+        }
+    }
+    
+    /** Gets namespace to apply to Rule's added */
+    public String getNamespaceURI() {
+        return wrappedRules.getNamespaceURI();
+    }
+    
+    /** Sets namespace to apply to Rule's added subsequently */
+    public void setNamespaceURI(String namespaceURI) {
+        wrappedRules.setNamespaceURI(namespaceURI);
+    }
+    
+    /** Gets Rule's which will be fired when the wrapped implementation returns no matches */
+    public List getDefaults() {
+        return defaultRules;
+    }
+    
+    // --------------------------------------------------------- Public Methods
+    
+    public List match(String pattern) {
+        return match("", pattern);
+    }
+    
+    /**
+     * Return list of rules matching given pattern.
+     * If wrapped implementation returns any matches return those.
+     * Otherwise, return default matches.
+     */
+    public List match(String namespaceURI, String pattern) {
+        List matches = wrappedRules.match(namespaceURI, pattern);
+        if (matches ==  null || matches.isEmpty()) {
+            // a little bit of defensive programming
+            return new ArrayList(defaultRules);
+        }
+        // otherwise
+        return matches;
+    }
+    
+    /** Adds a rule to be fired when wrapped implementation returns no matches */
+    public void addDefault(Rule rule) {
+        // set up rule
+        if (wrappedRules.getDigester() != null) {
+            rule.setDigester(wrappedRules.getDigester());
+        }
+        
+        if (wrappedRules.getNamespaceURI() != null) {
+            rule.setNamespaceURI(wrappedRules.getNamespaceURI());
+        }
+        
+        defaultRules.add(rule);
+        allRules.add(rule);
+    }
+    
+    /** Gets all rules */
+    public List rules() {
+        return allRules;
+    }
+    
+    /** Clears all Rule's */
+    public void clear() {
+        wrappedRules.clear();
+        allRules.clear();
+        defaultRules.clear();
+    }
+    
+    /** 
+     * Adds a Rule to be fired on given pattern.
+     * Pattern matching is delegated to wrapped implementation.
+     */
+    public void add(String pattern, Rule rule) {
+        wrappedRules.add(pattern, rule);
+        allRules.add(rule);
+    }
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/package.html
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/package.html	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/compiler/package.html	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,10 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Insert title here</title>
+</head>
+<body>
+
+</body>
+</html>
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/BaseResourceRenderer.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/BaseResourceRenderer.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/BaseResourceRenderer.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,172 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.resource;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.Map;
+
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+
+import org.ajax4jsf.framework.util.message.Messages;
+
+/**
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:07 $
+ * 
+ */
+public abstract class BaseResourceRenderer implements ResourceRenderer {
+
+	public void encode(InternetResource resource, FacesContext context,
+			Object data) throws IOException {
+		this.encodeBegin(resource, context, data, Collections.EMPTY_MAP);
+		this.encodeEnd(resource, context, data);
+	}
+
+	public void encode(InternetResource resource, FacesContext context,
+			Object data, Map attributes) throws IOException {
+		this.encodeBegin(resource, context, data, attributes);
+		this.encodeEnd(resource, context, data);
+	}
+
+	public void encodeBegin(InternetResource resource, FacesContext context,
+			Object data, Map attributes) throws IOException {
+		if (null != getTag()) {
+			ResponseWriter writer = context.getResponseWriter();
+			writer.startElement(getTag(), null);
+			String attrs[][] = getCommonAttrs();
+			if (null != getHrefAttr()) {
+				writer.writeAttribute(getHrefAttr(), resource.getUri(context,
+						data), null);
+			}
+			if (null != attrs) {
+				for (int i = 0; i < attrs.length; i++) {
+					writer.writeAttribute(attrs[i][0], attrs[i][1], null);
+				}
+			}
+			for (Iterator iter = attributes.entrySet().iterator(); iter
+					.hasNext();) {
+				Map.Entry attr = (Map.Entry) iter.next();
+				writer.writeAttribute(attr.getKey().toString(),
+						attr.getValue(), null);
+			}
+		}
+		this.customEncode(resource, context, data);
+	}
+
+	public void encodeEnd(InternetResource resource, FacesContext context,
+			Object data) throws IOException {
+		if (null != getTag()) {
+			ResponseWriter writer = context.getResponseWriter();
+			writer.endElement(getTag());
+
+		}
+	}
+
+	/**
+	 * Template method for customaize encoding for component. can insert size
+	 * etc. attributes, child tags etc.
+	 * 
+	 * @param resource
+	 * @param context
+	 * @param component
+	 * @throws IOException
+	 */
+	protected void customEncode(InternetResource resource,
+			FacesContext context, Object data) throws IOException {
+		// TODO if concrete renderer need
+
+	}
+
+	protected abstract String getTag();
+
+	protected abstract String getHrefAttr();
+
+	protected abstract String[][] getCommonAttrs();
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.resource.ResourceRenderer#send(org.ajax4jsf.framework.resource.InternetResource,
+	 *      org.ajax4jsf.framework.resource.ResourceContext)
+	 */
+	public int send(InternetResource base, ResourceContext context)
+			throws IOException {
+		InputStream in = base.getResourceAsStream(context);
+		OutputStream out = context.getOutputStream();
+		if (null == in) {
+			String message = Messages.getMessage(
+					Messages.NO_INPUT_STREAM_ERROR, base.getKey());
+			throw new IOException(message);
+		}
+		int total = sendStream(in, out);
+
+		return total;
+	}
+
+	/**
+	 * @param in
+	 * @param out
+	 * @return
+	 * @throws IOException
+	 */
+	protected int sendStream(InputStream in, OutputStream out)
+			throws IOException {
+		int total = 0;
+		byte[] buffer = new byte[InternetResourceBase.BUFFER_SIZE];
+		int length;
+		try {
+			for (length = in.read(buffer); length > 0; length = in.read(buffer)) {
+				out.write(buffer, 0, length);
+				total += length;
+			}
+		} finally {
+			in.close();
+			out.flush();
+			out.close();
+		}
+		return total;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.resource.ResourceRenderer#requireFacesContext()
+	 */
+	public boolean requireFacesContext() {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	public Object getData(InternetResource base, FacesContext context,
+			Object data) {
+		// By default, resource dot't provide any data. Can be used in
+		// Template-based or other
+		// configurable resources ( like weblets configuration ).
+		return null;
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/CacheKey.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/CacheKey.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/CacheKey.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,41 @@
+/**
+ * 
+ */
+package org.ajax4jsf.framework.resource;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * @author Nick - mailto:nbelaevski at exadel.com
+ * created 01.05.2007
+ * 
+ */
+public class CacheKey {
+	private Object resourceData;
+	private HttpServletRequest request;
+    private HttpServletResponse response;
+    private InternetResource resource;
+	public CacheKey(Object resourceData,
+			HttpServletRequest request, HttpServletResponse response,
+			InternetResource resource) {
+		super();
+		this.resourceData = resourceData;
+		this.request = request;
+		this.response = response;
+		this.resource = resource;
+	}
+	public Object getResourceData() {
+		return resourceData;
+	}
+	public HttpServletRequest getRequest() {
+		return request;
+	}
+	public HttpServletResponse getResponse() {
+		return response;
+	}
+	public InternetResource getResource() {
+		return resource;
+	}
+	
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/CachedResourceContext.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/CachedResourceContext.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/CachedResourceContext.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,152 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.resource;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.PrintWriter;
+
+import org.ajax4jsf.framework.ajax.xmlfilter.CacheContent;
+
+
+/**
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:56:59 $
+ *
+ */
+public class CachedResourceContext extends ResourceContext {
+	private ResourceContext parent;
+	private CacheContent content;
+
+	/**
+	 * @param parent
+	 */
+	public CachedResourceContext(ResourceContext parent) {
+		this.setCacheEnabled(true);
+		this.parent = parent;
+		this.content = new CacheContent();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.ResourceContext#getOutputStream()
+	 */
+	public OutputStream getOutputStream() throws IOException {
+		return content.getOutputStream();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.ResourceContext#getPathInfo()
+	 */
+	public String getPathInfo() {
+		return this.parent.getPathInfo();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.ResourceContext#getQueryString()
+	 */
+	public String getQueryString() {
+		return this.parent.getQueryString();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.ResourceContext#getRequestParameter(java.lang.String)
+	 */
+	public String getRequestParameter(String data_parameter) {
+		return this.parent.getRequestParameter(data_parameter);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.ResourceContext#getResourceAsStream(java.lang.String)
+	 */
+	public InputStream getResourceAsStream(String path) {
+		return this.parent.getResourceAsStream(path);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.ResourceContext#getSessionAttribute(java.lang.String)
+	 */
+	public Object getSessionAttribute(String name) {
+		return this.parent.getSessionAttribute(name);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.ResourceContext#setDateHeader(java.lang.String, long)
+	 */
+	public void setDateHeader(String name, long value) {
+		this.content.setDateHeader(name,value);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.ResourceContext#setHeader(java.lang.String, java.lang.String)
+	 */
+	public void setHeader(String name, String value) {
+		this.content.setHeader(name,value);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.ResourceContext#setIntHeader(java.lang.String, int)
+	 */
+	public void setIntHeader(String name, int value) {
+		this.content.setIntHeader(name,value);
+	}
+
+	/**
+	 * @return Returns the content.
+	 */
+	CacheContent getContent() {
+		return this.content;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.ResourceContext#getWriter()
+	 */
+	public PrintWriter getWriter() throws IOException {
+		return content.getWriter();
+	}
+
+	public void setContentType(String contentType) {
+		this.content.setContentType(contentType);
+	}
+
+	public Object getResourceData() {
+		return parent.getResourceData();
+	}
+
+	public void setResourceData(Object codec) {
+		parent.setResourceData(codec);
+		
+	}
+	
+	public String getInitParameter(String name) {
+		return parent.getInitParameter(name);
+	}
+
+	public String getServletPath() {
+		return parent.getServletPath();
+	}
+	
+	public void release() {
+		super.release();
+	}
+	
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/ClientScript.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/ClientScript.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/ClientScript.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,177 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.resource;
+
+import java.io.IOException;
+import java.util.Date;
+import java.util.Map;
+
+import javax.faces.context.FacesContext;
+
+import org.ajax4jsf.framework.util.message.Messages;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+
+/**
+ * Resource for AJAX client-side script. Render one time per page.
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.3 $ $Date: 2007/01/26 14:15:18 $
+ *
+ */
+public abstract class ClientScript extends JarResource {
+
+	private static final Log log = LogFactory.getLog(ClientScript.class);
+	
+	protected boolean usePrototype = false;
+	/**
+	 * Set JavaScript renderer and modification time to application-startup time.
+	 */
+	public ClientScript() {
+		super();
+		setRenderer(new ScriptRenderer());
+		InternetResourceBuilder resourceBuilder = InternetResourceBuilder.getInstance();
+		String key = this.getClass().getName();
+		try {
+			// Search already registered resource for this class.
+			InternetResource resource = resourceBuilder.getResource(key);
+			this.setKey(resource.getKey());
+		} catch(ResourceNotFoundException ex){
+			// If script not registered, append it to builder.
+			setLastModified(new Date(resourceBuilder.getStartTime()));
+			resourceBuilder.addResource(key,this);
+		}
+		String script ;
+		if (getJavaScript().startsWith("/")) {
+			// remove lead / for classloader covention.
+			script = getJavaScript().substring(1);
+		} else {
+			script = this.getClass().getPackage().getName().replace('.', '/')+"/"
+			+ getJavaScript();			
+		}
+		setPath(script);
+	}
+	
+	
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.InternetResourceBase#getLastModified()
+	 */
+	public Date getLastModified(ResourceContext resourceContext) {
+
+		if (isCacheable(null)) {
+			return super.getLastModified(resourceContext);
+		} else {
+			return new Date(System.currentTimeMillis()+1000L);
+		}
+	}
+
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.InternetResourceBase#isCacheable()
+	 */
+	public boolean isCacheable(ResourceContext resourceContext) {
+		return true;
+	}
+
+	/**
+	 * @return Returns the javaScript.
+	 */
+	public abstract String getJavaScript();
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.InternetResourceBase#encode(javax.faces.context.FacesContext, java.lang.Object, java.util.Map)
+	 */
+	public void encode(FacesContext context, Object data, Map attributes) throws IOException {
+		if (isNotAjaxRequest(context)) {
+			encodePrototype(context);
+			super.encode(context, data, attributes);
+		} else if (log.isDebugEnabled()) {
+			log.debug(Messages.getMessage(Messages.SKIP_ENCODING_HTML_INFO, getKey()));
+		}
+
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.InternetResourceBase#encodeBegin(javax.faces.context.FacesContext, java.lang.Object, java.util.Map)
+	 */
+	public void encodeBegin(FacesContext context, Object component, Map attrs) throws IOException {
+		if (isNotAjaxRequest(context)) {
+			encodePrototype(context);
+			super.encodeBegin(context, component, attrs);
+		} else if (log.isDebugEnabled()) {
+			log.debug(Messages.getMessage(Messages.SKIP_ENCODE_BEGIN_HTML_INFO, getKey()));
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.InternetResourceBase#encodeEnd(javax.faces.context.FacesContext, java.lang.Object)
+	 */
+	public void encodeEnd(FacesContext context, Object component) throws IOException {
+		if (isNotAjaxRequest(context)) {
+			super.encodeEnd(context, component);
+		} else if (log.isDebugEnabled()) {
+			log.debug(Messages.getMessage(Messages.SKIP_ENCODE_END_HTML_INFO, getKey()));
+		}
+	}
+	
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.InternetResourceBase#encode(javax.faces.context.FacesContext, java.lang.Object)
+	 */
+	public void encode(FacesContext context, Object data) throws IOException {
+		if (isNotAjaxRequest(context)) {
+			encodePrototype(context);
+			super.encode(context, data);
+		}else if (log.isDebugEnabled()) {
+			log.debug(Messages.getMessage(Messages.SKIP_ENCODING_HTML_INFO, getKey()));
+		}
+	}
+
+	/**
+	 * @return Returns the usePrototype.
+	 */
+	protected boolean isUsePrototype() {
+		return usePrototype;
+	}
+
+
+	private boolean isNotAjaxRequest(FacesContext context){
+		return true;//! AjaxRendererUtils.isAjaxRequest(context);
+	}
+	
+	private void encodePrototype(FacesContext context) throws  IOException{
+		if (isUsePrototype()) {
+			InternetResourceBuilder.getInstance().createResource(null,PrototypeScript.class.getName()).encode(context,null);
+		}
+
+	}
+
+
+	/**
+	 * @param usePrototype the usePrototype to set
+	 */
+	public void setUsePrototype(boolean usePrototype) {
+		this.usePrototype = usePrototype;
+	}
+	
+	
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/FacesResourceContext.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/FacesResourceContext.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/FacesResourceContext.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,221 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.resource;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.PrintWriter;
+import java.lang.reflect.Method;
+
+import javax.faces.FacesException;
+import javax.faces.context.ExternalContext;
+import javax.faces.context.FacesContext;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * @author asmirnov at exadel.com (latest modification by $Author: nick_belaevski $)
+ * @version $Revision: 1.1.2.2 $ $Date: 2007/01/11 16:52:14 $
+ * 
+ */
+public class FacesResourceContext extends ResourceContext {
+
+    FacesContext facesContext;
+
+    ExternalContext externalContext;
+
+    HttpServletResponse response;
+
+    /**
+         * @param facesContext
+         */
+    public FacesResourceContext(FacesContext facesContext) {
+
+	this.facesContext = facesContext;
+	this.externalContext = facesContext.getExternalContext();
+	Object facesResponse = externalContext.getResponse();
+	if (facesResponse instanceof HttpServletResponse) {
+	    this.response = (HttpServletResponse) facesResponse;
+	}
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see org.ajax4jsf.framework.resource.ResourceContext#setHeader(java.lang.String,
+         *      java.lang.String)
+         */
+    public void setHeader(String name, String value) {
+	if (null != response) {
+	    response.setHeader(name, value);
+
+	}
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see org.ajax4jsf.framework.resource.ResourceContext#setIntHeader(java.lang.String,
+         *      int)
+         */
+    public void setIntHeader(String name, int value) {
+	if (null != response) {
+	    response.setIntHeader(name, value);
+
+	}
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see org.ajax4jsf.framework.resource.ResourceContext#setDateHeader(java.lang.String,
+         *      long)
+         */
+    public void setDateHeader(String name, long value) {
+	if (null != response) {
+	    response.setDateHeader(name, value);
+
+	}
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see org.ajax4jsf.framework.resource.ResourceContext#getOutputStream()
+         */
+    public OutputStream getOutputStream() throws IOException {
+	if (null != response) {
+	    return response.getOutputStream();
+
+	} else {
+	    // May be non-servlet (Portlet?) environment. Try to use reflection
+		OutputStream stream = null;
+		Object response = externalContext.getResponse();
+		try {
+		    Method gW = response.getClass()
+			    .getMethod("getOutputStream", new Class[0]);
+		    stream = (OutputStream) gW.invoke(response, new Object[0]);
+		} catch (Exception e) {
+		    throw new FacesException(e);
+		}
+		return stream;
+	    
+	}
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see org.ajax4jsf.framework.resource.ResourceContext#getWriter()
+         */
+    public PrintWriter getWriter() throws IOException {
+	if (null != response) {
+	    return response.getWriter();
+
+	} else {
+	    // May be non-servlet (Portlet?) environment. Try to use reflection
+		PrintWriter writer = null;
+		Object response = externalContext.getResponse();
+		try {
+		    Method gW = response.getClass()
+			    .getMethod("getWriter", new Class[0]);
+		    writer = (PrintWriter) gW.invoke(response, new Object[0]);
+		} catch (Exception e) {
+		    throw new FacesException(e);
+		}
+		return writer;
+	    
+	}
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see org.ajax4jsf.framework.resource.ResourceContext#getQueryString()
+         */
+    public String getQueryString() {
+	return ((HttpServletRequest) externalContext.getRequest())
+		.getQueryString();
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see org.ajax4jsf.framework.resource.ResourceContext#getPathInfo()
+         */
+    public String getPathInfo() {
+	return externalContext.getRequestPathInfo();
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see org.ajax4jsf.framework.resource.ResourceContext#getSessionAttribute(java.lang.String)
+         */
+    public Object getSessionAttribute(String name) {
+	return externalContext.getSessionMap().get(name);
+    }
+
+    public InputStream getResourceAsStream(String path) {
+
+	return externalContext.getResourceAsStream(path);
+    }
+
+    public String getRequestParameter(String data_parameter) {
+
+	return (String) externalContext.getRequestParameterMap().get(
+		data_parameter);
+    }
+
+    public void setContentType(String contentType) {
+	response.setContentType(contentType);
+
+    }
+
+    public String getInitParameter(String name) {
+	// TODO Auto-generated method stub
+	return externalContext.getInitParameter(name);
+    }
+
+    public String getServletPath() {
+	// TODO Auto-generated method stub
+	return externalContext.getRequestServletPath();
+    }
+
+    public void release() {
+	super.release();
+	externalContext = null;
+	response = null;
+	facesContext.release();
+    }
+
+    // added by nick 11.01.2007 - getters for contexts added
+    public FacesContext getFacesContext() {
+	return facesContext;
+    }
+
+    public ExternalContext getExternalContext() {
+	return externalContext;
+    }
+    // by nick
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/GifRenderer.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/GifRenderer.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/GifRenderer.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,68 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.resource;
+
+import java.awt.image.BufferedImage;
+import java.awt.image.RenderedImage;
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import org.ajax4jsf.framework.util.image.GIFEncoder;
+
+/**
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:01 $
+ * 
+ */
+public class GifRenderer extends ImageRenderer {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.resource.ResourceRenderer#getContentType()
+	 */
+	public String getContentType() {
+		// TODO Auto-generated method stub
+		return "image/gif";
+	}
+
+	public void sendImage(ResourceContext context, RenderedImage image)
+			throws IOException {
+		// ImageIO.write(image,"gif",context.getOutputStream());
+		GIFEncoder encoder = new GIFEncoder();
+		DataOutputStream out = new DataOutputStream(context.getOutputStream());
+		try {
+			encoder.encode((BufferedImage) image, out);
+			out.flush();
+			out.close();
+
+		} catch (Exception e) {
+			// IE can unexpected close connection
+		}
+	}
+
+	public int getImageType() {
+		// TODO Auto-generated method stub
+		return BufferedImage.TYPE_INT_ARGB;
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/HTMLRenderer.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/HTMLRenderer.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/HTMLRenderer.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,85 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.resource;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import javax.faces.context.FacesContext;
+
+/**
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:03 $
+ *
+ */
+public class HTMLRenderer extends BaseResourceRenderer {
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.BaseResourceRenderer#getTag()
+	 */
+	protected String getTag() {
+		// TODO Auto-generated method stub
+		return "span";
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.BaseResourceRenderer#getHrefAttr()
+	 */
+	protected String getHrefAttr() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.BaseResourceRenderer#getCommonAttrs()
+	 */
+	protected String[][] getCommonAttrs() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.ResourceRenderer#getContentType()
+	 */
+	public String getContentType() {
+		// TODO Auto-generated method stub
+		return "text/html";
+	}
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.BaseResourceRenderer#customEncode(org.ajax4jsf.framework.resource.InternetResource, javax.faces.context.FacesContext, java.lang.Object)
+	 */
+	protected void customEncode(InternetResource resource, FacesContext context, Object data) throws IOException {
+		// Encode style in page - read from resource.
+		ResourceContext resourceContext = new FacesResourceContext(context);
+		InputStream in = resource.getResourceAsStream(resourceContext);
+		StringBuffer buff = new StringBuffer();
+		int input;
+		while((input = in.read())>0){
+			buff.append((char)input);
+		}
+		in.close();
+		//  MyFaces & RI have different beahvior for style element, in RI best use writeComment ?
+		// TODO - detect page content type ?
+		context.getResponseWriter().writeText(buff,resource.getKey());
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/ImageRenderer.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/ImageRenderer.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/ImageRenderer.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,98 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.resource;
+
+import java.awt.Dimension;
+import java.awt.image.BufferedImage;
+import java.awt.image.RenderedImage;
+import java.io.IOException;
+
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+
+
+/**
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:06 $
+ *
+ */
+public abstract class ImageRenderer extends BaseResourceRenderer {
+
+	private static final String _tag = "img";
+	private static final String _hrefAttr = "src";
+	private static final String[][] _commonAttrs = {
+			
+	};
+	/**
+	 * @return Returns the commonAttrs.
+	 */
+	protected String[][] getCommonAttrs() {
+		return null ; //_commonAttrs;
+	}
+
+	/**
+	 * @return Returns the hrefAttr.
+	 */
+	protected String getHrefAttr() {
+		return _hrefAttr;
+	}
+
+	/**
+	 * @return Returns the tag.
+	 */
+	protected String getTag() {
+		return _tag;
+	}
+
+	/**
+	 * Send {@link BufferedImage} to response in concrete format (GIF,Jpeg,PNG)
+	 * @param context - current faces context.
+	 * @param image - imaje to send
+	 */
+	public abstract void sendImage(ResourceContext context,RenderedImage image) throws IOException;
+	
+	/**
+	 * @return type of image for create {@link BufferedImage}
+	 */
+	public abstract int getImageType();
+	
+	/**
+	 * Create blank {@link BufferedImage} for paint.
+	 * Type of image determined by current renderer.
+	 * @param width
+	 * @param height
+	 * @return new image
+	 */
+	public BufferedImage createImage(int width,int height){
+		return new BufferedImage(width,height,getImageType());	
+	}
+	
+	protected void customEncode(InternetResource resource, FacesContext context, Object data) throws IOException {
+		if (resource instanceof Java2Dresource) {
+			Java2Dresource j2d = (Java2Dresource) resource;
+			Dimension dim = j2d.getDimensions(context, data);
+			ResponseWriter writer = context.getResponseWriter();
+			writer.writeAttribute("width", String.valueOf(dim.width), "width");
+			writer.writeAttribute("height", String.valueOf(dim.height), "height");
+		}
+	}
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/InternetResource.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/InternetResource.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/InternetResource.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,192 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.resource;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Date;
+import java.util.Map;
+
+import javax.faces.context.FacesContext;
+
+/**
+ * Interface for work with off-page internet resources ( images, scripts, styles etc. )
+ * All instances must work in two phases - render page ( application set HTML code and attributes to reference resource )
+ * and in concrete request to resource body.
+ * For best performance, preffer to  realise it as "lightweght" pattern.
+ *  
+ * @author asmirnov at exadel.com (latest modification by $Author: nick_belaevski $)
+ * @version $Revision: 1.1.2.2 $ $Date: 2007/01/11 16:52:15 $
+ *
+ */
+public interface InternetResource {
+
+	public static final String ENCODE_URI_PARAMETER = "org.ajax4jsf.ENCRYPT_RESOURCE_DATA";
+	public static final String ENCODE_PASS_PARAMETER = "org.ajax4jsf.ENCRYPT_PASSWORD";
+	public static final String CODEC_ATTR = "org.ajax4jsf.framework.resource.CODEC";
+	
+	public static final String RESOURCE_PROTOCOL = "resource";
+	public static final String RESOURCE_URI_PREFIX = "resource://";
+	public static final int RESOURCE_URI_PREFIX_LENGTH = RESOURCE_URI_PREFIX.length();
+	public static final String DATA_SEPARATOR = "/DATA/";
+	static public final long DEFAULT_EXPIRE = 1000L * 60L * 60L * 24L;// 1 day
+
+	/**
+	 * @param resourceContext current {@link ResourceContext}
+	 * @return Returns the contentLength.
+	 */
+	public int getContentLength(ResourceContext resourceContext);
+
+	/**
+	 * @param resourceContext current {@link ResourceContext}
+	 * @return Returns the expired.
+	 */
+	public Date getExpired(ResourceContext resourceContext);
+
+	/**
+	 * @param resourceContext current {@link ResourceContext}
+	 * @return Returns the lastModified.
+	 */
+	public Date getLastModified(ResourceContext resourceContext);
+
+	/**
+	 * @param resourceContext current {@link ResourceContext}
+	 * @return Returns the cacheable.
+	 */
+	public boolean isCacheable(ResourceContext resourceContext);
+
+	/**
+	 * @param resourceContext current {@link ResourceContext}
+	 * @return Returns the mimeType.
+	 */
+	public String getContentType(ResourceContext resourceContext);
+
+	/**
+	 * @param context TODO
+	 * @return input stream with resource
+	 */
+	public InputStream getResourceAsStream(ResourceContext context);
+	
+	/**
+	 * @return string with URI for get resource from  page.
+	 */
+	public String getUri(FacesContext context, Object data);
+
+
+	
+	/**
+	 * Encode resource as Markup .
+	 * @param context
+	 * @param data
+	 * @throws IOException 
+	 */
+	public void encode(FacesContext context, Object data) throws IOException;
+
+	/**
+	 * Encode resource as Markup with custom attributes  .
+	 * @param context
+	 * @param data
+	 * @param attributes 
+	 * @throws IOException 
+	 */
+	public void encode(FacesContext context, Object data,Map attributes) throws IOException;
+
+	/**
+	 * Encode start tag, attributes and body (  for inline script or style )
+	 * @param context
+	 * @param component
+	 * @param attrs
+	 * @throws IOException
+	 */
+	public void encodeBegin(FacesContext context, Object component, Map attrs) throws IOException;
+
+	/**
+	 * Encode closed tag.
+	 * @param context
+	 * @param component
+	 * @throws IOException
+	 */
+	public void encodeEnd(FacesContext context, Object component) throws IOException;
+
+	/**
+	 * Send incapsulated resource to client by {@link ResourceContext} .
+	 * @param context
+	 */
+	public void send(ResourceContext context) throws IOException;
+
+	/**
+	 * Set response headers based on resource properties ( mime type etc )
+	 * TODO - send via {@link FacesContext } ??? 
+	 * @param response
+	 */
+	public void sendHeaders(ResourceContext response);
+	
+	/**
+	 * Custom properties for resource ( image size etc. )
+	 * @param key
+	 * @return property value, or null if not set.
+	 */
+	public Object getProperty(Object key);
+	
+	/**
+	 * Set new value for custom property.
+	 * @param key
+	 * @param value
+	 */
+	void setProperty(Object key,Object value);
+
+
+	/**
+	 * Set concrete renderer ( for brige pattern ). In renderer, incapsulate encoding functions,
+	 * content type, resource encoding.
+	 * @param renderer
+	 */
+	public void setRenderer(ResourceRenderer renderer);
+	
+	/**
+	 * @return true, if resource must be rendered in faces request cicle.
+	 */
+	public boolean requireFacesContext();
+
+	/**
+	 * Flag for check session-dependencies for resource. In application-wide case,
+	 * resource URL not prepared by context.getExternalContext().encodeResourceURL(resourceURL)
+	 * and used application-wide cache for store.
+	 * @return
+	 */
+	public boolean isSessionAware();
+	
+	void setKey(String key);
+	
+	String getKey();
+
+	public abstract ResourceRenderer getRenderer(ResourceContext resourceContext);
+
+	public abstract void setSessionAware(boolean sessionAware);
+
+	public abstract void setCacheable(boolean cacheable);
+
+	public abstract void setLastModified(Date lastModified);
+
+	public abstract void setExpired(Date expired);
+
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/InternetResourceBase.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/InternetResourceBase.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/InternetResourceBase.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,425 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.resource;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.faces.context.FacesContext;
+
+import org.ajax4jsf.framework.util.message.Messages;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * Base class for all Html page resources - images, scripts, styles etc. Realise
+ * as "brige" pattern - different subclasses for different resource source
+ * (static,jar,soft generator ) and customaized with differernt renderers for
+ * image, script, style ( linked ir inline ). must operate with different
+ * sources - application context, classpath, software generator.
+ * 
+ * @author shura (latest modification by $Author: nick_belaevski $)
+ * @version $Revision: 1.1.2.2 $ $Date: 2007/01/11 16:52:15 $
+ * 
+ */
+public abstract class InternetResourceBase implements InternetResource {
+
+	private static final Log log = LogFactory
+			.getLog(InternetResourceBase.class);
+
+	static final int BUFFER_SIZE = 1024;
+
+	// Hours
+
+	private int contentLength = -1;
+
+	private Date lastModified;
+
+	private Date expired;
+
+	private boolean cacheable = true;
+
+	private boolean sessionAware = true;
+
+	private ResourceRenderer renderer = null;
+
+	private Map customProperties = new HashMap();
+
+	private String key;
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.chameleon.resource.InternetResource#getContentLength()
+	 */
+	public int getContentLength(ResourceContext resourceContext) {
+		return contentLength;
+	}
+
+	/**
+	 * @param contentLength
+	 *            The contentLength to set.
+	 */
+	protected void setContentLength(int contentLength) {
+		this.contentLength = contentLength;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.chameleon.resource.InternetResource#getExpired()
+	 */
+	public Date getExpired(ResourceContext resourceContext) {
+		return expired;
+	}
+
+	/**
+	 * @param expired
+	 *            The expired to set.
+	 */
+	public void setExpired(Date expired) {
+		this.expired = expired;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.chameleon.resource.InternetResource#getLastModified()
+	 */
+	public Date getLastModified(ResourceContext resourceContext) {
+
+		if (null != lastModified) {
+			return lastModified;
+		} else {
+			return new Date(System.currentTimeMillis());
+		}
+	}
+
+	/**
+	 * @param lastModified
+	 *            The lastModified to set.
+	 */
+	public void setLastModified(Date lastModified) {
+		this.lastModified = lastModified;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.chameleon.resource.InternetResource#isCacheable()
+	 */
+	public boolean isCacheable(ResourceContext resourceContext) {
+		return cacheable;
+	}
+
+	/**
+	 * @param cacheable
+	 *            The cacheable to set.
+	 */
+	public void setCacheable(boolean cacheable) {
+		this.cacheable = cacheable;
+	}
+
+	/**
+	 * @return Returns the sessionAware.
+	 */
+	public boolean isSessionAware() {
+		return requireFacesContext();
+	}
+
+	/**
+	 * @param sessionAware
+	 *            The sessionAware to set.
+	 */
+	public void setSessionAware(boolean sessionAware) {
+		this.sessionAware = sessionAware;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.chameleon.resource.InternetResource#getContentType()
+	 */
+	public String getContentType(ResourceContext resourceContext) {
+		return getRenderer(null).getContentType();
+	}
+
+	/**
+	 * @return Returns the renderer.
+	 */
+	public ResourceRenderer getRenderer(ResourceContext resourceContext) {
+		return renderer;
+	}
+
+	/**
+	 * @param renderer
+	 *            The renderer to set.
+	 */
+	public void setRenderer(ResourceRenderer renderer) {
+		this.renderer = renderer;
+	}
+
+	/**
+	 * Key for wich resource registered in resource builder.
+	 * 
+	 * @return Returns the key.
+	 */
+	public String getKey() {
+		return key;
+	}
+
+	/**
+	 * Set registration key ( by {@link InternetResourceBuilder} for this
+	 * resource.
+	 * 
+	 * @param key
+	 *            The key to set.
+	 */
+	public void setKey(String key) {
+		this.key = key;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.resource.InternetResource#getUri(javax.faces.context.FacesContext,
+	 *      java.lang.Object)
+	 */
+	public String getUri(final FacesContext context, Object data) {
+		return InternetResourceBuilder.getInstance().getUri(this, context,
+				getDataToStore(context, data));
+	}
+
+	/**
+	 * Template method to construct resource-specific data ( to store in
+	 * resource URI ). If resource must store any data in session or other
+	 * cache, it must be done here. Since lightweight realisation, information
+	 * for restore such data muct be returned by this method.
+	 * 
+	 * @param context -
+	 *            current faces context.
+	 * @param data -
+	 *            data for build information, usually current
+	 *            {@link javax.faces.component.UIComponent}
+	 * @return - any {@link java.io.Serializable} object, or null.
+	 */
+	protected Object getDataToStore(FacesContext context, Object data) {
+		return getRenderer(null).getData(this, context, data);
+	}
+
+	/**
+	 * Restore data object from resource URI request parameter ( same object as
+	 * returned in getDataToStore method )
+	 * 
+	 * @param context
+	 * @return restored data, or null.
+	 */
+	protected Object restoreData(ResourceContext context) {
+
+		Object data = context.getResourceData();
+		if (data instanceof byte[]) {
+			byte[] objectArray = (byte[]) data;
+			data = deserializeData(objectArray);
+		}
+		return data;
+
+	}
+
+	/**
+	 * Deserialize parameters object from byte array. By default, used Java
+	 * de-serialisation from ObjectOutputStream , but implementations can
+	 * override this method ( togewer with getDataToStore ) for implement short
+	 * version.
+	 * 
+	 * @param objectArray
+	 * @return
+	 * @throws IOException
+	 * @throws ClassNotFoundException
+	 */
+	protected Object deserializeData(byte[] objectArray) {
+		return objectArray;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.chameleon.resource.InternetResource#getResourceAsStream()
+	 */
+	public InputStream getResourceAsStream(ResourceContext context) {
+		throw new UnsupportedOperationException(Messages.getMessage(
+				Messages.METHOD_NOT_IMPLEMENTED, "getResourceAsStream"));
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.resource.InternetResource#getProperty(java.lang.Object)
+	 */
+	public Object getProperty(Object key) {
+		// TODO Auto-generated method stub
+		return customProperties.get(key);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.resource.InternetResource#setProperty(java.lang.Object,
+	 *      java.lang.Object)
+	 */
+	public void setProperty(Object key, Object value) {
+		customProperties.put(key, value);
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.resource.InternetResource#encode(javax.faces.context.FacesContext,
+	 *      javax.faces.component.UIComponent)
+	 */
+	public void encode(FacesContext context, Object data) throws IOException {
+		if (log.isDebugEnabled()) {
+			log.debug(Messages.getMessage(Messages.ENCODE_HTML_INFO, getKey()));
+		}
+		getRenderer(null).encode(this, context, data);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.resource.InternetResource#encode(javax.faces.context.FacesContext,
+	 *      java.lang.Object, java.util.Map)
+	 */
+	public void encode(FacesContext context, Object data, Map attributes)
+			throws IOException {
+		if (log.isDebugEnabled()) {
+			log.debug(Messages.getMessage(Messages.ENCODE_HTML_INFO_2,
+					getKey(), attributes));
+		}
+		getRenderer(null).encodeBegin(this, context, data, attributes);
+		getRenderer(null).encodeEnd(this, context, data);
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.resource.InternetResource#encodeBegin(javax.faces.context.FacesContext,
+	 *      javax.faces.component.UIComponent, java.util.Map)
+	 */
+	public void encodeBegin(FacesContext context, Object component, Map attrs)
+			throws IOException {
+		if (log.isDebugEnabled()) {
+			log.debug(Messages.getMessage(Messages.ENCODE_BEGIN_HTML_INFO,
+					getKey(), attrs));
+		}
+		getRenderer(null).encodeBegin(this, context, component, attrs);
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.resource.InternetResource#encodeEnd(javax.faces.context.FacesContext,
+	 *      javax.faces.component.UIComponent, java.util.Map)
+	 */
+	public void encodeEnd(FacesContext context, Object component)
+			throws IOException {
+		if (log.isDebugEnabled()) {
+			log.debug(Messages.getMessage(Messages.ENCODE_END_HTML_INFO,
+					getKey()));
+		}
+		getRenderer(null).encodeEnd(this, context, component);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.resource.InternetResource#send(javax.faces.context.FacesContext,
+	 *      java.lang.Object)
+	 */
+	public void send(ResourceContext context) throws IOException {
+		if (log.isDebugEnabled()) {
+			log
+					.debug(Messages.getMessage(Messages.SEND_CONTENT_INFO,
+							getKey()));
+		}
+		int total = getRenderer(null).send(this, context);
+		// For cacheable resources, store size.
+		if (isCacheable(null)) {
+			setContentLength(total);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.chameleon.resource.InternetResource#sendHeaders(javax.servlet.http.HttpServletResponse)
+	 */
+	public void sendHeaders(ResourceContext context) {
+		boolean cached = context.isCacheEnabled() && isCacheable(null);
+		if (log.isDebugEnabled()) {
+			log.debug(Messages.getMessage(Messages.SET_RESPONSE_HEADERS_INFO,
+					getKey()));
+		}
+		// context.setHeader("Content-Type",getContentType());
+		context.setContentType(getContentType(null));
+		if (getContentLength(context) > 0) {
+			context.setIntHeader("Content-Length", getContentLength(context));
+		} else {
+			// context.setHeader("Transfer-Encoding", "chunked");
+		}
+		Date lastModified = getLastModified(context);
+		if (lastModified != null) {
+			context.setDateHeader("Last-Modified", lastModified.getTime());
+		}
+		if (cached) {
+			Date expired = getExpired(context);
+			if (expired != null) {
+				context.setDateHeader("Expires", expired.getTime());
+			} else {
+				context.setDateHeader("Expires", System.currentTimeMillis()
+						+ DEFAULT_EXPIRE);
+				context.setHeader("Cache-control", "max-age="
+						+ (DEFAULT_EXPIRE / 1000));
+			}
+		} else {
+			context.setHeader("Cache-control", "max-age=0, no-store, no-cache");
+			context.setHeader("Pragma", "no-cache");
+			context.setIntHeader("Expires", 0);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.resource.InternetResource#requireFacesContext()
+	 */
+	public boolean requireFacesContext() {
+		// by default, send data in ordinary Http request.
+		return getRenderer(null).requireFacesContext();
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/InternetResourceBuilder.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/InternetResourceBuilder.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/InternetResourceBuilder.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,175 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.resource;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.faces.FacesException;
+import javax.faces.context.FacesContext;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+public abstract class InternetResourceBuilder {
+
+    private static final Log log = LogFactory.getLog(InternetResourceBuilder.class);
+
+    /**
+         * Get application start time for check resources modification time.
+         * 
+         * @return application start time in msec's
+         */
+    public abstract long getStartTime();
+
+    /**
+         * @param cacheable
+         * @param session
+         * @param mime
+         * @return
+         * @throws FacesException
+         */
+    public abstract InternetResource createUserResource(boolean cacheable,
+	    boolean session, String mime) throws FacesException;
+
+    /**
+         * @param key
+         * @param resource
+         */
+    public abstract void addResource(String key, InternetResource resource);
+
+    /**
+         * @param path
+         * @return
+         * @throws ResourceNotFoundException
+         */
+    public abstract InternetResource getResource(String path)
+	    throws ResourceNotFoundException;
+
+    /**
+         * @param key
+         * @return
+         */
+    public abstract Object getResourceDataForKey(String key);
+
+    /**
+         * @param key
+         * @return
+         * @throws ResourceNotFoundException
+         */
+    public abstract InternetResource getResourceForKey(String key)
+	    throws ResourceNotFoundException;
+
+    /**
+         * @param resource
+         * @param context
+         * @param storeData
+         * @return
+         */
+    public abstract String getUri(InternetResource resource,
+	    FacesContext context, Object storeData);
+
+    /**
+         * @param base
+         * @param path
+         * @return
+         * @throws FacesException
+         */
+    public abstract InternetResource createResource(Object base, String path)
+	    throws FacesException;
+
+    /**
+         * @throws ServletException
+         */
+    public abstract void init()
+	    throws FacesException;
+
+    /**
+         * static instance variable.
+         */
+    private static Map instances = Collections.synchronizedMap(new HashMap());
+
+    /**
+         * Get ( or create if nessesary ) instance of builder for current
+         * loader. check content of file
+         * META-INF/services/org.ajax4jsf.framework.resource.InternetResourceBuilder
+         * for name of class to instantiate, othrthise create
+         * {@link ResourceBuilderImpl} instance.
+         * 
+         * @return current builder instance.
+         */
+    public static InternetResourceBuilder getInstance() {
+	ClassLoader loader = Thread.currentThread().getContextClassLoader();
+	InternetResourceBuilder instance = (InternetResourceBuilder) instances
+		.get(loader);
+	if (null == instance) {
+	    try {
+		String resource = "META-INF/services/"
+			+ InternetResourceBuilder.class.getName();
+		InputStream in = loader.getResourceAsStream(resource);
+		BufferedReader reader = new BufferedReader(
+			new InputStreamReader(in));
+		String serviceClassName = reader.readLine();
+		reader.close();
+		Class builderClass = loader.loadClass(serviceClassName);
+		instance = (InternetResourceBuilder) builderClass.newInstance();
+		if (log.isDebugEnabled()) {
+		    log.debug("Create instance of InternetBuilder from class "
+			    + serviceClassName);
+		}
+	    } catch (Exception e) {
+		if (log.isDebugEnabled()) {
+		    log
+			    .debug("Create default implementation instance of InternetBuilder");
+		}
+		instance = new ResourceBuilderImpl();
+	    }
+	    instances.put(loader, instance);
+	}
+	if(log.isDebugEnabled()){
+	    log.debug("Return instance of internet resource builder "+instance.toString());
+	}
+	return instance;
+    }
+
+    /**
+         * Package-wide method for reset instance in Junit tests.
+         * 
+         * @param instance
+         */
+    public static void setInstance(InternetResourceBuilder instance) {
+	ClassLoader loader = Thread.currentThread().getContextClassLoader();
+	instances.put(loader, instance);
+    }
+
+    public InternetResourceBuilder() {
+	super();
+    }
+
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/InternetResourceService.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/InternetResourceService.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/InternetResourceService.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,381 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.resource;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Date;
+import java.util.Map;
+import java.util.Properties;
+
+import javax.faces.FacesException;
+import javax.faces.FactoryFinder;
+import javax.faces.context.FacesContext;
+import javax.faces.context.FacesContextFactory;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.ajax4jsf.cache.Cache;
+import org.ajax4jsf.cache.CacheConfigurationLoader;
+import org.ajax4jsf.cache.CacheException;
+import org.ajax4jsf.cache.CacheFactory;
+import org.ajax4jsf.cache.CacheLoader;
+import org.ajax4jsf.cache.CacheManager;
+import org.ajax4jsf.cache.ServletContextInitMap;
+import org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter;
+import org.ajax4jsf.framework.ajax.xmlfilter.CacheContent;
+import org.ajax4jsf.framework.util.config.WebXml;
+import org.ajax4jsf.framework.util.message.Messages;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+
+public class InternetResourceService implements CacheLoader, CacheConfigurationLoader {
+    private static final Log log = LogFactory
+	    .getLog(InternetResourceService.class);
+
+    static final String ENABLE_CACHING_PARAMETER = "enable-cache";
+
+    private static final String RESOURCE_LIFECYCLE_PARAMETER = "org.ajax4jsf.RESOURCE_LIFECYCLE";
+
+    private FilterConfig filterConfig;
+
+    private boolean cacheEnabled = true;
+
+    private Cache cache = null;
+    
+    //private ServletCacheAdministrator cacheAdmin;
+
+    private FacesContextFactory contextFactory;
+
+    // private RenderKitFactory renderKitFactory;
+    private String lifecycleClass;
+
+    private ResourceLifecycle lifecycle;
+
+    private InternetResourceBuilder resourceBuilder;
+    
+    private WebXml webXml;
+
+    public InternetResourceService() {
+    }
+
+    public void setCacheEnabled(boolean b) {
+	cacheEnabled = b;
+    }
+
+    public void init(FilterConfig config) throws ServletException {
+	filterConfig = config;
+	ServletContext servletContext = config.getServletContext();
+	if ("false".equalsIgnoreCase(config
+		.getInitParameter(ENABLE_CACHING_PARAMETER))) {
+	    setCacheEnabled(false);
+	    // this.cacheEnabled = false;
+	    //this.cacheAdmin = null;
+	} else {
+	    //this.cacheAdmin = ServletCacheAdministrator.getInstance(
+		//    servletContext, cacheProperties);
+	    try {
+			CacheManager cacheManager = CacheManager.getInstance();
+			Map env = new ServletContextInitMap(servletContext);
+			CacheFactory cacheFactory = cacheManager.getCacheFactory(env);
+			this.cache = cacheFactory.createCache(env, this, this);
+		} catch (CacheException e) {
+			throw new FacesException(e.getMessage(), e);
+		}
+	}
+	// Create Resource-specific Faces Lifecycle instance.
+	lifecycleClass = servletContext
+		.getInitParameter(RESOURCE_LIFECYCLE_PARAMETER);
+	if (lifecycleClass != null) {
+	    ClassLoader classLoader = Thread.currentThread()
+		    .getContextClassLoader();
+	    try {
+		Class clazz = classLoader.loadClass(lifecycleClass);
+		lifecycle = (ResourceLifecycle) clazz.newInstance();
+	    } catch (Exception e) {
+		throw new FacesException(
+			"Error create instance of resource Lifecycle "
+				+ lifecycleClass, e);
+	    }
+	} else {
+	    lifecycle = new ResourceLifecycle();
+	}
+	webXml = new WebXml();
+	webXml.init(servletContext,filterConfig.getFilterName());
+	if (log.isDebugEnabled()) {
+	    log.debug("Resources service initialized");
+	}
+    }
+
+    public boolean serviceResource(HttpServletRequest httpServletRequest,
+	    HttpServletResponse httpServletResponse) throws ServletException,
+	    IOException {
+	String resourceKey = webXml
+		.getFacesResourceKey(httpServletRequest);
+	if (null != resourceKey) {
+	    serviceResource(resourceKey, httpServletRequest,
+		    httpServletResponse);
+	    return true;
+	}
+	return false;
+    }
+
+    public void serviceResource(String resourceKey, HttpServletRequest request,
+	    HttpServletResponse response) throws ServletException, IOException {
+	InternetResource resource;// getInternetResource(request);
+	try {
+	    resource = getResourceBuilder().getResourceForKey(resourceKey);
+	} catch (ResourceNotFoundException e) {
+	    throw new ServletException(e);
+	}
+	Object resourceDataForKey = getResourceBuilder()
+		.getResourceDataForKey(resourceKey);
+	if (resource.isCacheable(null) && this.cacheEnabled) {
+	    // Test for client request modification time.
+	    try {
+		long ifModifiedSince = request
+			.getDateHeader("If-Modified-Since");
+		if (ifModifiedSince >= 0) {
+		    // Test for modification. 1000 ms due to round
+                        // modification
+		    // time to seconds.
+		    long lastModified = resource.getLastModified(null)
+			    .getTime() - 1000;
+		    if (lastModified <= ifModifiedSince) {
+			response.setStatus(304);
+			return;
+		    }
+		}
+	    } catch (IllegalArgumentException e) {
+		log
+			.warn(
+				Messages
+					.getMessage(Messages.PARSING_IF_MODIFIED_SINCE_WARNING),
+				e);
+	    }
+	    String cacheKey = resourceKey;// + "?" +
+                                                // request.getQueryString();
+	    // TODO - select session/application scope.
+	    //Cache cache = cacheAdmin.getAppScopeCache(getServletContext());
+//	    try {
+		// TODO - use last modified/expires time
+		
+	    CacheKey key = new CacheKey(resourceDataForKey, request, response, resource);
+	    
+	    CacheContent content;
+		try {
+			content = (CacheContent) cache
+				.get(cacheKey, key);
+			if (log.isDebugEnabled()) {
+			    log.debug(Messages.getMessage(
+				    Messages.GET_CONTENT_FROM_CACHE_INFO, cacheKey));
+			}
+			content.sendHeaders(response);
+			// Correct expires date for resource.
+			Date expired = resource.getExpired(null);
+			if (expired != null) {
+			    response.setDateHeader("Expires", expired.getTime());
+			} else {
+			    response.setDateHeader("Expires", System
+				    .currentTimeMillis()
+				    + InternetResource.DEFAULT_EXPIRE);
+			}
+			if (!request.getMethod().equals("HEAD")) {
+			    content.send(response);
+			}/*
+		    } catch (NeedsRefreshException e) {
+			try {
+			    if (log.isDebugEnabled()) {
+				log.debug(Messages.getMessage(
+					Messages.CONTENT_NOT_FOUND_ERROR, cacheKey));
+			    }
+			    CachedResourceContext context = (CachedResourceContext) sendResource(
+				    resource, request, response, resourceDataForKey);
+			    // TODO - set refresh interval ?
+			    cache.put(cacheKey, context.getContent());
+			} catch (Exception ex) {
+			    //cache.cancelUpdate(cacheKey);
+			    log.error(
+				    Messages.getMessage(Messages.SEND_RESOURCE_ERROR),
+				    ex);
+			    throw new ServletException(Messages.getMessage(
+				    Messages.SEND_RESOURCE_ERROR_2, ex.getMessage()),
+				    ex);
+			}
+		    }*/
+		} catch (CacheException e) {
+		    log.error(
+				    Messages.getMessage(Messages.SEND_RESOURCE_ERROR),
+				    e);
+			    throw new ServletException(Messages.getMessage(
+				    Messages.SEND_RESOURCE_ERROR_2, e.getMessage()),
+				    e);
+		}
+	} else {
+	    sendResource(resource, request, response, resourceDataForKey);
+	}
+    }
+
+    /**
+         * @param resource
+         * @param request
+         * @param response
+         * @throws IOException
+         */
+    protected ResourceContext sendResource(InternetResource resource,
+	    HttpServletRequest request, HttpServletResponse response,
+	    Object data) throws IOException {
+	ResourceContext resourceContext = getResourceContext(resource, request,
+		response);
+	resourceContext.setResourceData(data);
+	getLifecycle().send(resourceContext, resource);
+	resourceContext.release();
+	return resourceContext;
+    }
+
+    /**
+         * @param resource
+         * @param request
+         * @param response
+         * @return
+         * @throws ServletException
+         * @throws FacesException
+         */
+    protected ResourceContext getResourceContext(InternetResource resource,
+	    HttpServletRequest request, HttpServletResponse response)
+	    throws FacesException {
+	FacesContext facesContext = null;
+	ResourceContext resourceContext;
+	if (resource.requireFacesContext()) {
+	    facesContext = getFacesContext(request, response);
+	    resourceContext = new FacesResourceContext(facesContext);
+	} else {
+	    resourceContext = new ServletResourceContext(getServletContext(),
+		    request, response);
+	}
+	if (resource.isCacheable(null) && this.cacheEnabled) {
+	    resourceContext = new CachedResourceContext(resourceContext);
+	}
+	return resourceContext;
+    }
+
+    /**
+         * Get properties file from classpath
+         * 
+         * @param name
+         * @return
+         */
+    protected Properties getProperties(String name) {
+	Properties properties = new Properties();
+	InputStream props = BaseFilter.class.getResourceAsStream(name);
+	if (null != props) {
+	    try {
+		properties.load(props);
+	    } catch (IOException e) {
+		// TODO Auto-generated catch block
+		log.warn(Messages.getMessage(Messages.READING_PROPERTIES_ERROR,
+			name), e);
+	    } finally {
+		try {
+		    props.close();
+		} catch (IOException e) {
+		    // Can be ignored
+		}
+	    }
+	}
+	return properties;
+
+    }
+
+    /**
+         * @return Returns the servletContext.
+         */
+    protected ServletContext getServletContext() {
+	return filterConfig.getServletContext();
+    }
+
+    /**
+         * @return the lifecycle
+         * @throws ServletException
+         */
+    protected ResourceLifecycle getLifecycle() throws FacesException {
+	return lifecycle;
+    }
+
+    /**
+         * @return the contextFactory
+         */
+    protected synchronized FacesContextFactory getContextFactory() {
+	if (contextFactory == null) {
+		contextFactory = (FacesContextFactory) FactoryFinder
+		.getFactory(FactoryFinder.FACES_CONTEXT_FACTORY);
+	}
+
+	return contextFactory;
+    }
+
+    protected FacesContext getFacesContext(ServletRequest request,
+	    ServletResponse response) throws FacesException {
+	return getContextFactory().getFacesContext(getServletContext(),
+		request, response, getLifecycle());
+    }
+
+    /**
+         * @return the resourceBuilder
+         */
+    protected InternetResourceBuilder getResourceBuilder() {
+	if (resourceBuilder == null) {
+		// Create resource builder for this filter.
+		resourceBuilder = InternetResourceBuilder.getInstance();
+	}
+	return resourceBuilder;
+    }
+
+	public Object load(Object key, Object context) throws CacheException {
+		CacheKey cacheKey = (CacheKey) context;
+		
+		CachedResourceContext resourceContext = (CachedResourceContext) getResourceContext(cacheKey.getResource(), cacheKey.getRequest(),
+				cacheKey.getResponse());
+			resourceContext.setResourceData(cacheKey.getResourceData());
+			try {
+				getLifecycle().send(resourceContext, cacheKey.getResource());
+			} catch (IOException e) {
+				throw new CacheException(e.getMessage(), e);
+			}
+			resourceContext.release();
+
+		    // TODO - set refresh interval ?
+		    //cache.put(cacheKey, resourceContext.getContent());
+		return resourceContext.getContent();
+	}
+
+	public Properties loadProperties(String name) {
+		return getProperties(name);
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/JarResource.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/JarResource.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/JarResource.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,71 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.resource;
+
+import java.io.InputStream;
+
+
+/**
+ * Class stoped all resources in application classpath.
+ * TODO - set last midified & expired values.
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:00 $
+ *
+ */
+public class JarResource extends InternetResourceBase {
+	
+	/**
+	 * Default place for all static resources in Jar.
+	 * to avoid access to any class in application, only allowed subpackages for
+	 * META-INF/resources
+	 */
+	public static final String RESOURCES_ROOT="META-INF/resources";
+
+	private String path;
+	
+	public JarResource(){
+		
+	}
+
+	public JarResource(String path) {
+		this.path = path;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.InternetResourceBase#getResourceAsStream(javax.faces.context.FacesContext, java.lang.Object)
+	 */
+	public InputStream getResourceAsStream(ResourceContext context) {
+		ClassLoader loader = Thread.currentThread().getContextClassLoader();
+		return loader.getResourceAsStream(path);
+	}
+
+	public String getPath() {
+		return path;
+	}
+
+	public void setPath(String path) {
+		this.path = path;
+	}
+
+
+	
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/Java2Dresource.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/Java2Dresource.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/Java2Dresource.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,134 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.resource;
+
+import java.awt.Dimension;
+import java.awt.Graphics2D;
+import java.awt.image.BufferedImage;
+import java.awt.image.RenderedImage;
+import java.io.IOException;
+import java.io.InputStream;
+
+import javax.faces.FacesException;
+import javax.faces.context.FacesContext;
+
+import org.ajax4jsf.framework.util.message.Messages;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.3 $ $Date: 2007/02/01 15:31:57 $
+ * 
+ */
+public class Java2Dresource extends InternetResourceBase {
+	private static final Log log = LogFactory.getLog(Java2Dresource.class);
+
+	/**
+	 * Primary calculation of image dimensions - used when HTML code is
+	 * generated to render IMG's width and height Subclasses should override
+	 * this method to provide correct sizes of rendered images
+	 * 
+	 * @param facesContext
+	 * @return dimensions of the image to be displayed on page
+	 */
+	public Dimension getDimensions(FacesContext facesContext, Object data) {
+		return new Dimension(1, 1);
+	}
+
+	/**
+	 * Secondary calculation is used basically by {@link getImage} method
+	 * 
+	 * @param resourceContext
+	 * @return
+	 */
+	protected Dimension getDimensions(ResourceContext resourceContext) {
+		return new Dimension(1, 1);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.resource.InternetResourceBase#getResourceAsStream(javax.faces.context.FacesContext,
+	 *      java.lang.Object)
+	 */
+	public InputStream getResourceAsStream(ResourceContext context) {
+		// TODO Auto-generated method stub
+		return super.getResourceAsStream(context);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.resource.InternetResourceBase#send(javax.faces.context.FacesContext,
+	 *      java.lang.Object)
+	 */
+	public void send(ResourceContext context) throws IOException {
+		ImageRenderer renderer = (ImageRenderer) getRenderer(null);
+		try {
+			RenderedImage image = getImage(context);
+			if (null != image) {
+				renderer.sendImage(context, image);
+
+			}
+		} catch (Exception e) {
+			throw new FacesException(Messages
+					.getMessage(Messages.SEND_IMAGE_ERROR_2), e);
+		}
+	}
+
+	/**
+	 * Create {@link RenderedImage} for send to client. can be used as Java2d or
+	 * Java Advanced Imaging.
+	 * 
+	 * @param context
+	 * @return image to send.
+	 */
+	protected RenderedImage getImage(ResourceContext context) {
+		ImageRenderer renderer = (ImageRenderer) getRenderer(null);
+		Dimension imageDimensions = getDimensions(context);
+		BufferedImage image = null;
+		if (imageDimensions.getHeight() > 0.0
+				&& imageDimensions.getWidth() > 0.0) {
+			image = renderer.createImage(imageDimensions.width,
+					imageDimensions.height);
+			Graphics2D graphics = image.createGraphics();
+			paint(context, graphics);
+			graphics.dispose();
+
+		}
+		return image;
+	}
+
+	/**
+	 * Template method for create image as Applet-like paint.
+	 * 
+	 * @param context -
+	 *            current resource context.
+	 * @param graphics2D -
+	 *            graphics to paint.
+	 */
+	protected void paint(ResourceContext context, Graphics2D graphics2D) {
+		// TODO Auto-generated method stub
+
+	}
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/JpegRenderer.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/JpegRenderer.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/JpegRenderer.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,64 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.resource;
+
+import java.awt.image.BufferedImage;
+import java.awt.image.RenderedImage;
+import java.io.IOException;
+import java.io.OutputStream;
+
+import javax.imageio.ImageIO;
+
+
+/**
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:03 $
+ *
+ */
+public class JpegRenderer extends ImageRenderer {
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.ResourceRenderer#getContentType()
+	 */
+	public String getContentType() {
+		// TODO Auto-generated method stub
+		return "image/jpeg";
+	}
+
+	public void sendImage(ResourceContext context, RenderedImage image) throws IOException {
+		OutputStream outputStream = context.getOutputStream();
+		try {
+			ImageIO.write(image, "jpeg", outputStream);
+			outputStream.flush();
+			outputStream.close();
+
+		} catch (Exception e) {
+			// IE can  unexpected close connection 
+		}
+	}
+
+	public int getImageType() {
+		// TODO Auto-generated method stub
+		return BufferedImage.TYPE_INT_RGB;
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/LogfileRenderer.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/LogfileRenderer.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/LogfileRenderer.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,85 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.resource;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import javax.faces.context.FacesContext;
+
+/**
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:02 $
+ *
+ */
+public class LogfileRenderer extends BaseResourceRenderer {
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.BaseResourceRenderer#getTag()
+	 */
+	protected String getTag() {
+		// TODO Auto-generated method stub
+		return "pre";
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.BaseResourceRenderer#getHrefAttr()
+	 */
+	protected String getHrefAttr() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.BaseResourceRenderer#getCommonAttrs()
+	 */
+	protected String[][] getCommonAttrs() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.ResourceRenderer#getContentType()
+	 */
+	public String getContentType() {
+		// TODO Auto-generated method stub
+		return "text/plain";
+	}
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.BaseResourceRenderer#customEncode(org.ajax4jsf.framework.resource.InternetResource, javax.faces.context.FacesContext, java.lang.Object)
+	 */
+	protected void customEncode(InternetResource resource, FacesContext context, Object data) throws IOException {
+		// Encode style in page - read from resource.
+		ResourceContext resourceContext = new FacesResourceContext(context);
+		InputStream in = resource.getResourceAsStream(resourceContext);
+		StringBuffer buff = new StringBuffer();
+		int input;
+		while((input = in.read())>0){
+			buff.append((char)input);
+		}
+		in.close();
+		//  MyFaces & RI have different beahvior for style element, in RI best use writeComment ?
+		// TODO - detect page content type ?
+		context.getResponseWriter().writeText(buff,resource.getKey());
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/MimeRenderer.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/MimeRenderer.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/MimeRenderer.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,66 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.resource;
+
+
+/**
+ * @author Nick Belaevski - nbelaevski at exadel.com
+ * created 20.11.2006
+ * 
+ */
+public class MimeRenderer extends BaseResourceRenderer {
+	
+	private String contentType = null;
+	
+	public MimeRenderer() {
+		
+	}
+	
+	public MimeRenderer(String contentType) {
+		super();
+		this.contentType = contentType;
+	}
+
+	public String getContentType() {
+		return this.contentType;
+	}
+
+	public void setContentType(String contentType) {
+		this.contentType = contentType;
+	}
+	
+	
+
+	protected String getTag() {
+		return null;
+	}
+
+	protected String[][] getCommonAttrs() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	protected String getHrefAttr() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/OneTimeRenderer.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/OneTimeRenderer.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/OneTimeRenderer.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,79 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.resource;
+
+import java.io.IOException;
+import java.util.Map;
+
+import javax.faces.context.FacesContext;
+
+import org.ajax4jsf.framework.util.message.Messages;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * Base class for resources, rendered only one time in page ( JavaScript, CSS )
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:02 $
+ *
+ */
+public abstract class OneTimeRenderer extends BaseResourceRenderer {
+
+	private static final Log log = LogFactory.getLog(OneTimeRenderer.class);
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.BaseResourceRenderer#encodeBegin(org.ajax4jsf.framework.resource.InternetResource, javax.faces.context.FacesContext, java.lang.Object, java.util.Map)
+	 */
+	public void encodeBegin(InternetResource resource, FacesContext context, Object data, Map attributes) throws IOException {
+		
+		if (!isRendered(resource,context)) {
+			super.encodeBegin(resource, context, data, attributes);
+		} else if (log.isDebugEnabled()) {
+			log.debug(Messages.getMessage(Messages.SKIP_ENCODE_BEGIN_HTML_INFO_2, resource.getKey()));
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.BaseResourceRenderer#encodeEnd(org.ajax4jsf.framework.resource.InternetResource, javax.faces.context.FacesContext, java.lang.Object)
+	 */
+	public void encodeEnd(InternetResource resource, FacesContext context, Object data) throws IOException {
+		// TODO Auto-generated method stub
+		if (!isRendered(resource,context)) {
+			super.encodeEnd(resource, context, data);
+			context.getExternalContext().getRequestMap().put(resource.getKey(),Boolean.TRUE);
+			if (log.isDebugEnabled()) {
+					log.debug(Messages.getMessage(Messages.MARK_AS_RENDERED_INFO, resource.getKey()));
+			}
+		} else if (log.isDebugEnabled()) {
+			log.debug(Messages.getMessage(Messages.SKIP_ENCODE_END_HTML_INFO_2, resource.getKey()));
+		}
+	}
+
+	/**
+	 * Detect for resource rendered status. For cacheable, show key parameter in request Map.
+	 * @param resource
+	 * @param context
+	 * @return - true, if resource already rendered.
+	 */
+	private boolean isRendered(InternetResource resource, FacesContext context){
+		return  null != context.getExternalContext().getRequestMap().get(resource.getKey()); // resource.isCacheable() &&
+	}
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/Png8Renderer.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/Png8Renderer.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/Png8Renderer.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,123 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.resource;
+
+import java.awt.image.BufferedImage;
+import java.awt.image.IndexColorModel;
+import java.awt.image.RenderedImage;
+import java.io.IOException;
+import java.io.OutputStream;
+
+import javax.imageio.ImageIO;
+
+/**
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:04 $
+ * 
+ */
+public class Png8Renderer extends ImageRenderer {
+
+	/**
+	 * Default web safe colors color model
+	 */
+	public static IndexColorModel webColorModel;
+
+	// Build web safe 6x6x6 cube color model.
+	static {
+		byte[] webLevels = { 0, 51, 102, (byte) 153, (byte) 204, (byte) 255 };
+		byte[] r = new byte[256];
+		byte[] g = new byte[256];
+		byte[] b = new byte[256];
+		r[0] = g[0] = b[0] = 0;
+		for (int i = 0; i < webLevels.length; i++) {
+			for (int j = 0; j < webLevels.length; j++) {
+				for (int k = 0; k < webLevels.length; k++) {
+					int colorNum = i * webLevels.length * webLevels.length + j
+							* webLevels.length + k + 1;
+					r[colorNum] = webLevels[i];
+					g[colorNum] = webLevels[j];
+					b[colorNum] = webLevels[k];
+				}
+			}
+		}
+		webColorModel = new IndexColorModel(8, webLevels.length
+				* webLevels.length * webLevels.length + 1, r, g, b, 0);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.resource.ImageRenderer#sendImage(org.ajax4jsf.framework.resource.ResourceContext,
+	 *      java.awt.image.RenderedImage)
+	 */
+	public void sendImage(ResourceContext context, RenderedImage image)
+			throws IOException {
+		OutputStream outputStream = context.getOutputStream();
+		// PNGEncodeParam param = new PNGEncodeParam.Palette();
+		// param.setBitDepth(8);
+		// param.setInterlacing(true);
+		// String[] encoders = ImageCodec.getEncoderNames(image,null);
+		// ImageEncoder encoder =
+		// ImageCodec.createImageEncoder("png",context.getOutputStream(),param);
+		// encoder.encode(image);
+		try {
+			ImageIO.write(image, "png", outputStream);
+			outputStream.flush();
+			outputStream.close();
+
+		} catch (Exception e) {
+			// IE can unexpected close connection
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.resource.ImageRenderer#getImageType()
+	 */
+	public int getImageType() {
+		return BufferedImage.TYPE_BYTE_INDEXED;
+		// return BufferedImage.TYPE_INT_ARGB;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.resource.ImageRenderer#createImage(int, int)
+	 */
+	public BufferedImage createImage(int width, int height) {
+
+		// return new BufferedImage(width,height,getImageType());//,colorModel);
+		return new BufferedImage(width, height, getImageType(), webColorModel);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.resource.ResourceRenderer#getContentType()
+	 */
+	public String getContentType() {
+		// TODO Auto-generated method stub
+		return "image/png";
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/PngRenderer.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/PngRenderer.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/PngRenderer.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,61 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.resource;
+
+import java.awt.image.BufferedImage;
+import java.awt.image.RenderedImage;
+import java.io.IOException;
+import java.io.OutputStream;
+
+import javax.imageio.ImageIO;
+
+/**
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:05 $
+ * 
+ */
+public class PngRenderer extends ImageRenderer {
+
+	public void sendImage(ResourceContext context, RenderedImage image)
+			throws IOException {
+		OutputStream outputStream = context.getOutputStream();
+		try {
+			ImageIO.write(image, "png", outputStream);
+			outputStream.flush();
+			outputStream.close();
+
+		} catch (Exception e) {
+			// IE can unexpected close connection
+		}
+	}
+
+	public String getContentType() {
+		// TODO Auto-generated method stub
+		return "image/png";
+	}
+
+	public int getImageType() {
+		// TODO Auto-generated method stub
+		return BufferedImage.TYPE_INT_ARGB;
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/PrototypeScript.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/PrototypeScript.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/PrototypeScript.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,36 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.resource;
+
+
+/**
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:56:59 $
+ *
+ */
+public class PrototypeScript extends ClientScript {
+
+	public String getJavaScript() {
+		return "scripts/prototype.js";
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/ResourceBuilderImpl.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/ResourceBuilderImpl.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/ResourceBuilderImpl.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,585 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.resource;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.io.StreamCorruptedException;
+import java.io.StringReader;
+import java.net.URL;
+import java.util.Collections;
+import java.util.Date;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.zip.Deflater;
+import java.util.zip.Inflater;
+
+import javax.faces.FacesException;
+import javax.faces.context.FacesContext;
+import javax.imageio.ImageIO;
+import javax.servlet.ServletContext;
+
+import org.ajax4jsf.framework.util.base64.Codec;
+import org.ajax4jsf.framework.util.config.WebXml;
+import org.ajax4jsf.framework.util.message.Messages;
+import org.apache.commons.digester.Digester;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.xml.sax.EntityResolver;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+/**
+ * Produce instances of InternetResource's for any types - jar resource, dynamic
+ * created image, component-incapsulated etc. Realised as singleton class to
+ * support cache, configuration etc.
+ * 
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:56:58 $
+ * 
+ */
+public class ResourceBuilderImpl extends InternetResourceBuilder {
+
+    private static final Log log = LogFactory.getLog(ResourceBuilderImpl.class);
+
+    private static final String DATA_SEPARATOR = "/DATA/";
+
+    private static Map renderers;
+
+    private static ResourceRenderer defaultRenderer = new MimeRenderer(null);
+
+    /**
+         * keep resources instances . TODO - put this map to application-scope
+         * attribute, for support clastering environment.
+         */
+    private Map resources = Collections.synchronizedMap(new HashMap());
+
+    private long _startTime;
+
+    private Codec codec;
+
+    static {
+	renderers = new HashMap();
+	// append known renderers for extentions.
+	renderers.put(".gif", new GifRenderer());
+	ResourceRenderer renderer = new JpegRenderer();
+	renderers.put(".jpeg", renderer);
+	renderers.put(".jpg", renderer);
+	renderers.put(".png", new PngRenderer());
+	renderers.put(".js", new ScriptRenderer());
+	renderers.put(".css", new StyleRenderer());
+	renderers.put(".log", new LogfileRenderer());
+	renderers.put(".html", new HTMLRenderer());
+	renderers.put(".xhtml", new MimeRenderer("application/xhtml+xml"));
+	renderers.put(".xml", new MimeRenderer("text/xml"));
+	renderers.put(".xcss", new TemplateCSSRenderer());
+	// renderers.put(".htc",new BehaviorRenderer());
+	// set in-memory caching ImageIO
+	ImageIO.setUseCache(false);
+
+    }
+
+    public WebXml getWebXml(FacesContext context) {
+	WebXml webXml = (WebXml) context.getExternalContext().getApplicationMap().get(WebXml.CONTEXT_ATTRIBUTE);
+	if (null == webXml) {
+	    throw new FacesException(
+		    "Resources framework is not initialised, check web.xml for Filter configuration");
+	}
+	return webXml;
+    }
+
+    public ResourceBuilderImpl() {
+	super();
+	_startTime = System.currentTimeMillis();
+	codec = new Codec();
+    }
+
+    /**
+         * @throws FacesException
+         */
+    protected void registerResources() throws FacesException {
+        try {
+            ClassLoader loader = Thread.currentThread().getContextClassLoader();
+            Enumeration e = loader
+        	    .getResources("META-INF/resources-config.xml");
+            while (e.hasMoreElements()) {
+        	URL resource = (URL) e.nextElement();
+        	registerConfig(resource);
+            }
+        } catch (IOException e) {
+            throw new FacesException(e);
+        }
+    }
+
+    private void registerConfig(URL resourceConfig) {
+	try {
+	    if (log.isDebugEnabled()) {
+		log.debug("Process resources configuration file "+resourceConfig.toExternalForm());
+	    }
+	    
+	    InputStream in = resourceConfig.openStream();
+	    try {
+		Digester digester = new Digester();
+		digester.setValidating(false);
+		digester.setEntityResolver(new EntityResolver() {
+		    // Dummi resolver - alvays do nothing
+		    public InputSource resolveEntity(String publicId,
+			    String systemId) throws SAXException, IOException {
+			return new InputSource(new StringReader(""));
+		    }
+		});
+		digester.setNamespaceAware(false);
+		digester.setUseContextClassLoader(true);
+		digester.push(this);
+		digester.addObjectCreate("resource-config/resource", "class",
+			JarResource.class);
+		digester.addObjectCreate("resource-config/resource/renderer",
+			"class", HTMLRenderer.class);
+		digester.addCallMethod(
+			"resource-config/resource/renderer/content-type",
+			"setContentType", 0);
+		digester.addSetNext("resource-config/resource/renderer",
+			"setRenderer", ResourceRenderer.class.getName());
+		digester.addCallMethod("resource-config/resource/name",
+			"setKey", 0);
+		digester.addCallMethod("resource-config/resource/path",
+			"setPath", 0);
+		digester.addCallMethod("resource-config/resource/cacheable",
+			"setCacheable", 0);
+		digester.addCallMethod(
+			"resource-config/resource/session-aware",
+			"setSessionAware", 0);
+		digester.addCallMethod("resource-config/resource/property",
+			"setProperty", 2);
+		digester.addCallParam("resource-config/resource/property/name",
+			0);
+		digester.addCallParam(
+			"resource-config/resource/property/value", 1);
+		digester.addCallMethod("resource-config/resource/content-type",
+			"setContentType", 0);
+		digester.addSetNext("resource-config/resource", "addResource",
+			InternetResource.class.getName());
+		digester.parse(in);
+	    } finally {
+		in.close();
+	    }
+	} catch (IOException e) {
+	    throw new FacesException(e);
+	} catch (SAXException e) {
+	    throw new FacesException(e);
+	}
+    }
+
+    /**
+         */
+    public void init()
+	    throws FacesException {
+	// TODO - mace codec configurable.
+	registerResources();
+    }
+
+    /**
+         * Base point for creating resource. Must detect type and build
+         * appropriate instance. Currently - make static resource for ordinary
+         * request, or instance of class.
+         * 
+         * @param base
+         *                base object for resource ( resourcess in classpath
+         *                will be get relative to it package )
+         * @param path
+         *                key - path to resource, resource class name etc.
+         * @return
+         * @throws FacesException
+         */
+    public InternetResource createResource(Object base, String path)
+	    throws FacesException {
+	// TODO - detect type of resource ( for example, resources location path
+        // in Skin
+	try {
+	    return getResource(path);
+	} catch (ResourceNotFoundException e) {
+	    try {
+		return getResource(buildKey(base, path));
+	    } catch (ResourceNotFoundException e1) {
+		if (log.isDebugEnabled()) {
+		    log.debug(Messages.getMessage(Messages.BUILD_RESOURCE_INFO,
+			    path));
+		}
+	    }
+	}
+	// path - is class name ?
+	InternetResource res;
+	try {
+	    Class resourceClass = Class.forName(path);
+	    res = createDynamicResource(path, resourceClass);
+	} catch (Exception e) {
+	    try {
+		res = createJarResource(base, path);
+	    } catch (ResourceNotFoundException ex) {
+		res = createStaticResource(path);
+	    }
+	    // TODO - if resource not found, create static ?
+	}
+	return res;
+    }
+
+    private String buildKey(Object base, String path) {
+	if (path.startsWith("/")) {
+	    return path.substring(1);
+	}
+	if (null == base) {
+	    return path;
+	}
+	StringBuffer packageName = new StringBuffer(base.getClass()
+		.getPackage().getName().replace('.', '/'));
+	return packageName.append("/").append(path).toString();
+    }
+
+    public String getUri(InternetResource resource, FacesContext context,
+	    Object storeData) {
+	StringBuffer uri = new StringBuffer();// ResourceServlet.DEFAULT_SERVLET_PATH).append("/");
+	uri.append(resource.getKey());
+	// append serialized data as Base-64 encoded request string.
+	if (storeData != null) {
+	    try {
+		byte[] objectData;
+		if (!(storeData instanceof byte[])) {
+		    ByteArrayOutputStream dataSteram = new ByteArrayOutputStream(
+			    1024);
+		    ObjectOutputStream objStream = new ObjectOutputStream(
+			    dataSteram);
+		    objStream.writeObject(storeData);
+		    objStream.flush();
+		    objStream.close();
+		    dataSteram.close();
+		    objectData = dataSteram.toByteArray();
+		} else {
+		    objectData = (byte[]) storeData;
+		}
+		uri.append(DATA_SEPARATOR);
+		byte[] dataArray = encrypt(objectData);
+		uri.append(new String(dataArray, "ISO-8859-1"));
+
+		// / byte[] objectData = dataSteram.toByteArray();
+		// / uri.append("?").append(new
+		// String(Base64.encodeBase64(objectData),
+		// / "ISO-8859-1"));
+	    } catch (Exception e) {
+		// Ignore errors, log it
+		log.error(Messages
+			.getMessage(Messages.QUERY_STRING_BUILDING_ERROR), e);
+	    }
+	}
+	String resourceURL = getWebXml(context).getFacesResourceURL(context,
+		uri.toString());// context.getApplication().getViewHandler().getResourceURL(context,uri.toString());
+	if (resource.isSessionAware()) {
+	    resourceURL = context.getExternalContext().encodeResourceURL(
+		    resourceURL);
+	}
+	if (log.isDebugEnabled()) {
+	    log.debug(Messages.getMessage(Messages.BUILD_RESOURCE_URI_INFO,
+		    resource.getKey(), resourceURL));
+	}
+	return resourceURL;// context.getExternalContext().encodeResourceURL(resourceURL);
+
+    }
+
+    /**
+         * @param key
+         * @return
+         */
+    public InternetResource getResourceForKey(String key)
+	    throws ResourceNotFoundException {
+
+	int data = key.indexOf(DATA_SEPARATOR);
+	if (data >= 0) {
+	    key = key.substring(0, data);
+	}
+	return getResource(key);
+    }
+
+    public Object getResourceDataForKey(String key) {
+	Object data = null;
+	String dataString = null;
+	int dataStart = key.indexOf(DATA_SEPARATOR);
+	if (dataStart >= 0) {
+	    dataString = key.substring(dataStart + DATA_SEPARATOR.length());
+	}
+	if (log.isDebugEnabled()) {
+	    log.debug(Messages.getMessage(
+		    Messages.RESTORE_DATA_FROM_RESOURCE_URI_INFO, key,
+		    dataString));
+	}
+	if (dataString != null) {
+	    // dataString =
+	    // dataString.substring(dataStart+ResourceServlet.DATA_PARAMETER.length()+1);
+	    byte[] objectArray = null;
+	    try {
+		byte[] dataArray = dataString.getBytes("ISO-8859-1");
+		objectArray = decrypt(dataArray);
+
+		ObjectInputStream in = new ObjectInputStream(
+			new ByteArrayInputStream(objectArray));
+		data = in.readObject();
+	    } catch (StreamCorruptedException e) {
+		data = objectArray;
+	    } catch (IOException e) {
+		log.error(Messages
+			.getMessage(Messages.DESERIALIZE_DATA_INPUT_ERROR), e);
+	    } catch (ClassNotFoundException e) {
+		log.error(Messages
+			.getMessage(Messages.DATA_CLASS_NOT_FOUND_ERROR), e);
+	    }
+	}
+	return data;
+    }
+
+    public InternetResource getResource(String path)
+	    throws ResourceNotFoundException {
+
+	InternetResource internetResource = (InternetResource) resources
+		.get(path);
+	if (null == internetResource) {
+	    throw new ResourceNotFoundException("Resource not registered : "
+		    + path);
+	} else {
+	    return internetResource;
+	}
+    }
+
+    public void addResource(InternetResource resource) {
+	resources.put(resource.getKey(), resource);
+    	ResourceRenderer renderer = resource.getRenderer(null);
+    	if (renderer == null) {
+    		setRenderer(resource, resource.getKey());
+    	}
+    }
+
+    public void addResource(String key, InternetResource resource) {
+	resources.put(key, resource);
+	resource.setKey(key);
+	// TODO - set renderer ?
+    }
+
+//    public String getFacesResourceKey(HttpServletRequest request) {
+//	return getWebXml(context).getFacesResourceKey(request);
+//    }
+
+    public String getFacesResourceURL(FacesContext context, String Url) {
+	return getWebXml(context).getFacesResourceURL(context, Url);
+    }
+
+    /**
+         * Build resource for link to static context in webapp.
+         * 
+         * @param path
+         * @return
+         * @throws FacesException
+         */
+    protected InternetResource createStaticResource(String path)
+	    throws ResourceNotFoundException, FacesException {
+	FacesContext context = FacesContext.getCurrentInstance();
+	if (null != context) {
+	    if (context.getExternalContext().getContext() instanceof ServletContext) {
+		ServletContext servletContext = (ServletContext) context
+			.getExternalContext().getContext();
+		InputStream in = servletContext.getResourceAsStream(path);
+		if (null != in) {
+		    InternetResourceBase res = new StaticResource(path);
+		    setRenderer(res, path);
+		    res.setLastModified(new Date(getStartTime()));
+		    addResource(path, res);
+		    try {
+			in.close();
+		    } catch (IOException e) {
+		    }
+		    return res;
+		}
+	    }
+	}
+	throw new ResourceNotFoundException(Messages.getMessage(
+		Messages.STATIC_RESOURCE_NOT_FOUND_ERROR, path));
+    }
+
+    private void setRenderer(InternetResource res, String path)
+	    throws FacesException {
+	int lastPoint = path.lastIndexOf('.');
+	if (lastPoint > 0) {
+	    String ext = path.substring(lastPoint);
+	    ResourceRenderer resourceRenderer = (ResourceRenderer) renderers
+		    .get(ext);
+	    if (null != resourceRenderer) {
+		res.setRenderer(resourceRenderer);
+	    } else {
+		if (log.isDebugEnabled()) {
+		    log.debug(Messages.getMessage(
+			    Messages.NO_RESOURCE_REGISTERED_ERROR_2, path,
+			    renderers.keySet()));
+		}
+
+		// String mimeType = servletContext.getMimeType(path);
+		res.setRenderer(defaultRenderer);
+	    }
+	}
+    }
+
+    /**
+         * Create resurce to send from classpath relative to base class.
+         * 
+         * @param base
+         * @param path
+         * @return
+         * @throws FacesException
+         */
+    protected InternetResource createJarResource(Object base, String path)
+	    throws ResourceNotFoundException, FacesException {
+	String key = buildKey(base, path);
+	ClassLoader loader = Thread.currentThread().getContextClassLoader();
+	if (null != loader.getResource(key)) {
+	    JarResource res = new JarResource(key);
+	    setRenderer(res, path);
+	    res.setLastModified(new Date(getStartTime()));
+	    addResource(key, res);
+	    return res;
+	} else {
+	    throw new ResourceNotFoundException(Messages.getMessage(
+		    Messages.NO_RESOURCE_EXISTS_ERROR, key));
+	}
+
+    }
+
+    /**
+         * Create resource by instatiate given class.
+         * 
+         * @param path
+         * @param instatiate
+         * @return
+         */
+    protected InternetResource createDynamicResource(String path,
+	    Class instatiate) throws ResourceNotFoundException {
+	if (InternetResource.class.isAssignableFrom(instatiate)) {
+	    InternetResource resource;
+	    try {
+		resource = (InternetResource) instatiate.newInstance();
+		addResource(path, resource);
+	    } catch (Exception e) {
+		String message = Messages.getMessage(
+			Messages.INSTANTIATE_RESOURCE_ERROR, instatiate
+				.toString());
+		log.error(message, e);
+		throw new ResourceNotFoundException(message, e);
+	    }
+	    return resource;
+	}
+	throw new FacesException(Messages
+		.getMessage(Messages.INSTANTIATE_CLASS_ERROR));
+    }
+
+    /**
+         * Create resource by instatiate {@link UserResource} class with given
+         * properties ( or got from cache ).
+         * 
+         * @param cacheable
+         * @param session
+         * @param mime
+         * @return
+         * @throws FacesException
+         */
+    public InternetResource createUserResource(boolean cacheable,
+	    boolean session, String mime) throws FacesException {
+	String path = getUserResourceKey(cacheable, session, mime);
+	InternetResource userResource;
+	try {
+	    userResource = getResource(path);
+	} catch (ResourceNotFoundException e) {
+	    userResource = new UserResource(cacheable, session, mime);
+	    addResource(path, userResource);
+	}
+	return userResource;
+    }
+
+    /**
+         * Generate resource key for user-generated resource with given
+         * properties.
+         * 
+         * @param cacheable
+         * @param session
+         * @param mime
+         * @return
+         */
+    private String getUserResourceKey(boolean cacheable, boolean session,
+	    String mime) {
+	StringBuffer pathBuffer = new StringBuffer(UserResource.class.getName());
+	pathBuffer.append(cacheable ? "/c" : "/n");
+	pathBuffer.append(session ? "/s" : "/n");
+	if (null != mime) {
+	    pathBuffer.append('/').append(mime.hashCode());
+	}
+	String path = pathBuffer.toString();
+	return path;
+    }
+
+    /**
+         * @return Returns the startTime for application.
+         */
+    public long getStartTime() {
+	return _startTime;
+    }
+
+    protected byte[] encrypt(byte[] src) {
+	try {
+	    Deflater compressor = new Deflater(Deflater.BEST_SPEED);
+	    byte[] compressed = new byte[src.length + 100];
+	    compressor.setInput(src);
+	    compressor.finish();
+	    int totalOut = compressor.deflate(compressed);
+	    byte[] zipsrc = new byte[totalOut];
+	    System.arraycopy(compressed, 0, zipsrc, 0, totalOut);
+	    compressor.end();
+	    return codec.encode(zipsrc);
+	} catch (Exception e) {
+	    throw new FacesException("Error encode resource data", e);
+	}
+    }
+
+    protected byte[] decrypt(byte[] src) {
+	try {
+	    byte[] zipsrc = codec.decode(src);
+	    Inflater decompressor = new Inflater();
+	    byte[] uncompressed = new byte[zipsrc.length * 5];
+	    decompressor.setInput(zipsrc);
+	    int totalOut = decompressor.inflate(uncompressed);
+	    byte[] out = new byte[totalOut];
+	    System.arraycopy(uncompressed, 0, out, 0, totalOut);
+	    decompressor.end();
+	    return out;
+	} catch (Exception e) {
+	    throw new FacesException("Error decode resource data", e);
+	}
+    }
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/ResourceContext.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/ResourceContext.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/ResourceContext.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,145 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.resource;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.PrintWriter;
+
+/**
+ * Abstraction context class for rendering resource ( image, script, style )
+ * can be work in 2 variants - for simple ServletRequest and as JSF context encapsulation.
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:56:57 $
+ *
+ */
+public abstract class ResourceContext  {
+	
+	private boolean cacheEnabled = false;
+	private Object resourceData;
+	// response headers
+	/**
+	 * Delegate to {@link javax.servlet.ServletResponse} setHeader
+	 * @param name name of header
+	 * @param value new value
+	 */
+	public abstract void setHeader(String name, String value);
+	
+	/**
+	 * Delegate to {@link javax.servlet.ServletResponse} setHeader
+	 * @param name name of header
+	 * @param value new value
+	 */
+	public abstract void setIntHeader(String name, int value);
+
+	/**
+	 * Delegate to {@link javax.servlet.ServletResponse} setHeader
+	 * @param name name of header
+	 * @param value new value
+	 */
+	public abstract void setDateHeader(String name, long value);
+	
+	/**
+	 * @return
+	 * @throws IOException 
+	 */
+	public abstract OutputStream getOutputStream() throws IOException;
+	
+	/**
+	 * @return
+	 */
+	public abstract String getQueryString();
+	
+	/**
+	 * @return
+	 */
+	public abstract String getPathInfo();
+	
+	/**
+	 * @return
+	 */
+	public abstract String getServletPath();
+	
+	/**
+	 * Get session attribute for given name. session not created
+	 * @param name attribute name
+	 * @return value for attribute, or null.
+	 */
+	public abstract Object getSessionAttribute(String name);
+
+	public abstract InputStream getResourceAsStream(String path);
+
+	/**
+	 * Get request parameter for given name.
+	 * @param data_parameter
+	 * @return
+	 */
+	public abstract String getRequestParameter(String data_parameter);
+
+	/**
+	 * @return Returns the cacheEnabled.
+	 */
+	public boolean isCacheEnabled() {
+		return this.cacheEnabled;
+	}
+
+	/**
+	 * @param cacheEnabled The cacheEnabled to set.
+	 */
+	public void setCacheEnabled(boolean cacheEnabled) {
+		this.cacheEnabled = cacheEnabled;
+	}
+
+	/**
+	 * get output writer for send response.
+	 * @return
+	 */
+	public abstract PrintWriter getWriter() throws IOException;
+
+	/**
+	 * Setup response content type as {@see javax.servlet.ServletResponse#setContentType(java.lang.String)}
+	 * @param contentType
+	 */
+	public abstract void setContentType(String contentType);
+	
+	public abstract String getInitParameter(String name);
+
+	public Object getResourceData() {
+		// TODO Auto-generated method stub
+		return resourceData;
+	}
+
+	public void setResourceData(Object data) {
+		resourceData = data;
+		
+	}
+	
+	/**
+	 * Release any data used by this context.
+	 * Close buffers used by cached context, release FacesContext, if exist.
+	 */
+	public void release() {
+		
+	}
+	
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/ResourceLifecycle.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/ResourceLifecycle.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/ResourceLifecycle.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,89 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.resource;
+
+import java.io.IOException;
+
+import javax.faces.FacesException;
+import javax.faces.context.FacesContext;
+import javax.faces.event.PhaseListener;
+import javax.faces.lifecycle.Lifecycle;
+
+/**
+ * Lifecycle for simulate faces request processing for resource.
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:56:56 $
+ *
+ */
+public class ResourceLifecycle extends Lifecycle {
+
+	/* (non-Javadoc)
+	 * @see javax.faces.lifecycle.Lifecycle#addPhaseListener(javax.faces.event.PhaseListener)
+	 */
+	public void addPhaseListener(PhaseListener arg0) {
+		// TODO Auto-generated method stub
+
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.lifecycle.Lifecycle#execute(javax.faces.context.FacesContext)
+	 */
+	public void execute(FacesContext arg0) throws FacesException {
+		// TODO Auto-generated method stub
+
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.lifecycle.Lifecycle#getPhaseListeners()
+	 */
+	public PhaseListener[] getPhaseListeners() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.lifecycle.Lifecycle#removePhaseListener(javax.faces.event.PhaseListener)
+	 */
+	public void removePhaseListener(PhaseListener arg0) {
+		// TODO Auto-generated method stub
+
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.lifecycle.Lifecycle#render(javax.faces.context.FacesContext)
+	 */
+	public void render(FacesContext arg0) throws FacesException {
+		// TODO Auto-generated method stub
+
+	}
+	
+	/**
+	 * @param context
+	 * @param resource
+	 * @throws IOException 
+	 */
+	public void send(ResourceContext resourceContext, InternetResource resource) throws IOException{
+		resource.sendHeaders(resourceContext);
+		resource.send(resourceContext);
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/ResourceNotFoundException.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/ResourceNotFoundException.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/ResourceNotFoundException.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,67 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.resource;
+
+import javax.faces.FacesException;
+
+/**
+ * Exception for throw in case of illegal creation of resource ( not existed file etc. )
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:08 $
+ *
+ */
+public class ResourceNotFoundException extends FacesException {
+
+	/**
+	 * 
+	 */
+	public ResourceNotFoundException() {
+		super();
+		// TODO Auto-generated constructor stub
+	}
+
+	/**
+	 * @param arg0
+	 */
+	public ResourceNotFoundException(String arg0) {
+		super(arg0);
+		// TODO Auto-generated constructor stub
+	}
+
+	/**
+	 * @param arg0
+	 */
+	public ResourceNotFoundException(Throwable arg0) {
+		super(arg0);
+		// TODO Auto-generated constructor stub
+	}
+
+	/**
+	 * @param arg0
+	 * @param arg1
+	 */
+	public ResourceNotFoundException(String arg0, Throwable arg1) {
+		super(arg0, arg1);
+		// TODO Auto-generated constructor stub
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/ResourceProduser.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/ResourceProduser.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/ResourceProduser.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,38 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.resource;
+
+
+/**
+ * Interface for all Renderers ( or other classes ? ) for
+ * generate internet resources.
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:56:56 $
+ *
+ */
+public interface ResourceProduser {
+	/**
+	 * @param path - local path to internet resource.
+	 * @return resource instance
+	 */
+	public InternetResource getResource( String path) throws ResourceNotFoundException;
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/ResourceRenderer.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/ResourceRenderer.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/ResourceRenderer.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,82 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.resource;
+
+import java.io.IOException;
+import java.util.Map;
+
+import javax.faces.context.FacesContext;
+
+/**
+ * "Brige" for concrete resource types - images, scripts, styles.
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:07 $
+ *
+ */
+public interface ResourceRenderer {
+	
+	/**
+	 * @return content type ( image/jpeg , text/javascript etc. ) for given type.
+	 */
+	String getContentType();
+
+	/**
+	 * Encode concrete HTML element for resource. 
+	 * @param context
+	 * @param data
+	 * @throws IOException 
+	 */
+	void encode(InternetResource resource, FacesContext context, Object data) throws IOException;
+
+	/**
+	 * Encode concrete HTML element for resource. 
+	 * @param context
+	 * @param data
+	 * @throws IOException 
+	 */
+	void encode(InternetResource resource, FacesContext context, Object data, Map attributes) throws IOException;
+
+	void encodeBegin(InternetResource base, FacesContext context, Object data, Map attributes) throws IOException;
+
+	void encodeEnd(InternetResource base, FacesContext context, Object data) throws IOException;
+	
+	/**
+	 * @return true, if resource must be rendered in faces request cicle.
+	 */
+	public boolean requireFacesContext();
+
+	/**
+	 * Send incapsulated resource to client by {@link ResourceContext} .
+	 * Perform any conversions, nessesary for this resources ( template interpretations, JavaScript conversions etc )
+	 * @param context
+	 * @return TODO
+	 */
+	public int send(InternetResource base,ResourceContext context) throws IOException;
+
+	/**
+	 * Get data to build URI for given resource. Can be any Serialisable object,
+	 * @param base TODO
+	 * @return data for Store in URI/ Cache key.
+	 */
+	public Object getData(InternetResource base, FacesContext context, Object data);
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/ScriptRenderer.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/ScriptRenderer.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/ScriptRenderer.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,148 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.resource;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+
+import org.ajax4jsf.framework.util.javascript.JSMin;
+import org.ajax4jsf.framework.util.message.Messages;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:04 $
+ *
+ */
+public class ScriptRenderer extends OneTimeRenderer {
+
+	private static final String COMPRESS_SCRIPTS_PARAMETER = "org.ajax4jsf.COMPRESS_SCRIPT";
+	
+	private static final Log _log = LogFactory.getLog(ScriptRenderer.class);
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.BaseResourceRenderer#getTag()
+	 */
+	protected String getTag() {
+		// TODO Auto-generated method stub
+		return "script";
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.BaseResourceRenderer#getHrefAttr()
+	 */
+	protected String getHrefAttr() {
+		// TODO Auto-generated method stub
+		return "src";
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.BaseResourceRenderer#getCommonAttrs()
+	 */
+	protected String[][] getCommonAttrs() {
+		// TODO Auto-generated method stub
+		return new String[][]{{"type",getContentType()}};
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.ResourceRenderer#getContentType()
+	 */
+	public String getContentType() {
+		// TODO - use configurable encoding ?
+		return "text/javascript";
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.BaseResourceRenderer#send(org.ajax4jsf.framework.resource.InternetResource, org.ajax4jsf.framework.resource.ResourceContext)
+	 */
+	public int send(InternetResource base, ResourceContext context) throws IOException {
+		InputStream in = base.getResourceAsStream(context);
+		if (null == in) {
+			String message = Messages.getMessage(
+					Messages.NO_INPUT_STREAM_ERROR, base.getKey());
+			throw new IOException(message);
+		}
+		OutputStream out = context.getOutputStream();
+		// Compress JavaScript output by JSMin ( true by default )
+		if( ! "false".equalsIgnoreCase(context.getInitParameter(COMPRESS_SCRIPTS_PARAMETER))){
+			CountingOutputStream countingStream = new CountingOutputStream(out);
+			JSMin jsmin = new JSMin(in,countingStream);
+			try {
+				jsmin.jsmin();
+			} catch (Exception e) {
+				_log.error("Error send script to client for resource "+base.getKey(), e);
+			} finally {
+				in.close();
+				countingStream.flush();
+				countingStream.close();
+			}
+			int written = countingStream.getWritten();
+			if(_log.isDebugEnabled()){
+				_log.debug("Send "+written+" bytes to client for JavaScript resource "+base.getKey());
+			}
+			return written;
+		} else {
+			return sendStream(in, out);
+		}
+	}
+
+	
+}
+
+class CountingOutputStream extends OutputStream {
+	private OutputStream outputStream;
+	private int written = 0;
+	
+	CountingOutputStream(OutputStream outputStream) {
+		super();
+		this.outputStream = outputStream;
+	}
+
+	public void close() throws IOException {
+		outputStream.close();
+	}
+
+	public void flush() throws IOException {
+		outputStream.flush();
+	}
+
+	public void write(byte[] b, int off, int len) throws IOException {
+		outputStream.write(b, off, len);
+		written += len;
+	}
+
+	public void write(byte[] b) throws IOException {
+		outputStream.write(b);
+		written += b.length;
+	}
+
+	public void write(int b) throws IOException {
+		outputStream.write(b);
+		written++;
+	}
+
+	int getWritten() {
+		return written;
+	}
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/ServletResourceContext.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/ServletResourceContext.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/ServletResourceContext.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,141 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.resource;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.PrintWriter;
+
+import javax.servlet.ServletContext;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+
+/**
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:01 $
+ *
+ */
+public class ServletResourceContext extends ResourceContext {
+	
+	private ServletContext context;
+	private HttpServletRequest request;
+	
+	private HttpServletResponse response;
+
+	/**
+	 * @param request
+	 * @param response
+	 */
+	public ServletResourceContext(ServletContext context, HttpServletRequest request, HttpServletResponse response) {
+		this.context = context;
+		this.request = request;
+		this.response = response;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.ResourceContext#setHeader(java.lang.String, java.lang.String)
+	 */
+	public void setHeader(String name, String value) {
+		response.setHeader(name,value);
+
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.ResourceContext#setIntHeader(java.lang.String, int)
+	 */
+	public void setIntHeader(String name, int value) {
+		response.setIntHeader(name,value);
+
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.ResourceContext#setDateHeader(java.lang.String, long)
+	 */
+	public void setDateHeader(String name, long value) {
+		response.setDateHeader(name,value);
+
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.ResourceContext#getOutputStream()
+	 */
+	public OutputStream getOutputStream() throws IOException {
+		// TODO Auto-generated method stub
+		return response.getOutputStream();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.ResourceContext#getQueryString()
+	 */
+	public String getQueryString() {
+		return request.getQueryString();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.ResourceContext#getPathInfo()
+	 */
+	public String getPathInfo() {
+		return request.getPathInfo();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.ResourceContext#getSessionAttribute(java.lang.String)
+	 */
+	public Object getSessionAttribute(String name) {
+		return request.getSession(false).getAttribute(name);
+	}
+
+	public InputStream getResourceAsStream(String path) {
+		// TODO Auto-generated method stub
+		return context.getResourceAsStream(path);
+	}
+
+	public String getRequestParameter(String data_parameter) {
+		// TODO Auto-generated method stub
+		return request.getParameter(data_parameter);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.ResourceContext#getWriter()
+	 */
+	public PrintWriter getWriter() throws IOException {
+		// TODO Auto-generated method stub
+		return response.getWriter();
+	}
+
+	public void setContentType(String contentType) {
+		response.setContentType(contentType);		
+	}
+
+	public String getInitParameter(String name) {
+		// TODO Auto-generated method stub
+		return context.getInitParameter(name);
+	}
+
+	public String getServletPath() {
+		// TODO Auto-generated method stub
+		return request.getServletPath();
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/SmartPositionScript.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/SmartPositionScript.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/SmartPositionScript.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,43 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.resource;
+
+/**
+ * @author Maksim Kaszynski
+ *
+ */
+public class SmartPositionScript extends ClientScript {
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.ClientScript#getJavaScript()
+	 */
+	public String getJavaScript() {
+		// TODO Auto-generated method stub
+		return "scripts/smartposition.js";
+	}
+
+	protected boolean isUsePrototype() {
+		
+		return true;
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/StaticResource.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/StaticResource.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/StaticResource.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,101 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.resource;
+
+import java.io.InputStream;
+
+import javax.faces.context.FacesContext;
+
+/**
+ * @author asmirnov at exadel.com (latest modification by $Author: nick_belaevski $)
+ * @version $Revision: 1.1.2.2 $ $Date: 2007/01/11 16:52:14 $
+ *
+ */
+public class StaticResource extends InternetResourceBase {
+	
+	private String path;
+	private byte[] resourceData = null;
+	
+	/**
+	 * 
+	 */
+	public StaticResource() {
+		super();
+	}
+
+
+
+	public StaticResource(String path){
+		this.path = path;
+		setCacheable(true);
+	}
+
+
+	
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.InternetResourceBase#getResourceAsStream(javax.faces.context.FacesContext, javax.faces.component.UIComponent)
+	 */
+	public InputStream getResourceAsStream(ResourceContext context) {
+		return context.getResourceAsStream(path);
+	}
+
+
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.InternetResourceBase#isCacheable()
+	 */
+	public boolean isCacheable(ResourceContext resourceContext) {
+		return true;
+	}
+
+
+
+	public String getUri(FacesContext context, Object data) {
+		// perform all encodings, suitable for JSF specification.
+		String src = context.getApplication().getViewHandler().getResourceURL(context,path);		
+		return context.getExternalContext().encodeResourceURL(src);
+	}
+
+	public void encode(FacesContext context, Object data) {
+		// TODO Auto-generated method stub
+
+	}
+
+
+
+	/**
+	 * @return the path
+	 */
+	public String getPath() {
+		return path;
+	}
+
+
+
+	/**
+	 * @param path the path to set
+	 */
+	public void setPath(String path) {
+		this.path = path;
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/StyleRenderer.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/StyleRenderer.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/StyleRenderer.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,82 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.resource;
+
+
+/**
+ * Render style element with content in page. Warning - not use for head link element,
+ * it must be rendered separate.
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:56:58 $
+ *
+ */
+public class StyleRenderer extends OneTimeRenderer {
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.BaseResourceRenderer#getTag()
+	 */
+	protected String getTag() {
+		return "link";
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.BaseResourceRenderer#getHrefAttr()
+	 */
+	protected String getHrefAttr() {
+		return "href";
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.BaseResourceRenderer#getCommonAttrs()
+	 */
+	protected String[][] getCommonAttrs() {
+		return new String[][]{{"type","text/css"},{"rel","stylesheet"}};
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.ResourceRenderer#getContentType()
+	 */
+	public String getContentType() {
+		// TODO use configurable encoding ?
+		return "text/css";
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.BaseResourceRenderer#customEncode(org.ajax4jsf.framework.resource.InternetResource, javax.faces.context.FacesContext, java.lang.Object)
+	 */
+	/*
+	protected void customEncode(InternetResource resource, FacesContext context, Object data) throws IOException {
+		// Encode style in page - read from resource.
+		ResourceContext resourceContext = new FacesResourceContext(context);
+		InputStream in = resource.getResourceAsStream(resourceContext);
+		StringBuffer buff = new StringBuffer();
+		int input;
+		while((input = in.read())>0){
+			buff.append((char)input);
+		}
+		in.close();
+		//  MyFaces & RI have different beahvior for style element, in RI best use writeComment ?
+		// TODO - detect page content type ?
+		context.getResponseWriter().writeText(buff,resource.getKey());
+	}
+*/
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/TemplateCSSRenderer.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/TemplateCSSRenderer.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/TemplateCSSRenderer.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,135 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.resource;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.nio.ByteBuffer;
+
+import javax.faces.FacesException;
+import javax.faces.FactoryFinder;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+import javax.faces.render.RenderKit;
+import javax.faces.render.RenderKitFactory;
+
+import org.ajax4jsf.framework.renderer.RendererBase;
+import org.ajax4jsf.framework.renderer.compiler.HtmlCompiler;
+import org.ajax4jsf.framework.renderer.compiler.PreparedTemplate;
+import org.ajax4jsf.framework.renderer.compiler.TemplateContext;
+import org.ajax4jsf.framework.skin.SkinFactory;
+
+/**
+ * @author shura
+ *
+ */
+public class TemplateCSSRenderer extends StyleRenderer {
+	
+	private static final String COMPILED_TEMPLATE_PROPERTY = "compiled-template";
+
+	private RendererBase renderer = new RendererBase() {
+
+		protected Class getComponentClass() {
+			// TODO Auto-generated method stub
+			return UIComponent.class;
+		}
+		
+	};
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.BaseResourceRenderer#send(org.ajax4jsf.framework.resource.InternetResource, org.ajax4jsf.framework.resource.ResourceContext)
+	 */
+	public int send(InternetResource base, ResourceContext context) throws IOException {
+		PreparedTemplate template = null;
+		template = getTemplate(base, context);
+		FacesContext facesContext = FacesContext.getCurrentInstance();
+		if(null != facesContext) {
+			// Create responseWriter.
+			String defaultRenderKitId = facesContext.getApplication().getDefaultRenderKitId();
+			if (null == defaultRenderKitId) {
+				defaultRenderKitId = RenderKitFactory.HTML_BASIC_RENDER_KIT;
+			}
+			RenderKitFactory renderKitFactory = (RenderKitFactory) FactoryFinder.getFactory(FactoryFinder.RENDER_KIT_FACTORY);
+			RenderKit renderKit = renderKitFactory.getRenderKit(facesContext,defaultRenderKitId);
+			// TODO - handle response encoding 
+			ResponseWriter responseWriter = renderKit.createResponseWriter(context.getWriter(),null,"UTF-8");
+			facesContext.setResponseWriter(responseWriter);
+			responseWriter.startDocument();
+			// TODO - parameters and mock renderer/component ?
+			// for first time, this template only allow skin or faces variables interaction
+			template.encode(renderer,facesContext,null);
+			responseWriter.endDocument();
+			responseWriter.flush();
+			responseWriter.close();
+		} else {
+			throw new FacesException("FacesContext for resource from template "+base.getKey()+" is null");
+		}
+		return 0;
+	}
+
+	/**
+	 * @param base
+	 * @param context
+	 * @return
+	 * @throws IOException
+	 */
+	public PreparedTemplate getTemplate(InternetResource base, ResourceContext context) throws IOException {
+		PreparedTemplate template;
+		//		if(base.isCacheable()){
+					template = (PreparedTemplate) base.getProperty(COMPILED_TEMPLATE_PROPERTY);
+		//		}
+				if(null == template){
+					HtmlCompiler compiler = new HtmlCompiler();
+					InputStream resourceAsStream = base.getResourceAsStream(context);
+					template = compiler.compile(resourceAsStream, base.getKey());
+					base.setProperty(COMPILED_TEMPLATE_PROPERTY, template);
+					resourceAsStream.close();
+				}
+		return template;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.BaseResourceRenderer#requireFacesContext()
+	 */
+	public boolean requireFacesContext() {
+		return true;
+	}
+
+	public Object getData(InternetResource base, FacesContext context, Object data) {
+		ResourceContext resourceContext = new FacesResourceContext(context);
+		PreparedTemplate template;
+		try {
+			template = getTemplate(base, resourceContext);
+		} catch (IOException e) {
+			return null;
+		}
+		UIComponent component = (UIComponent) (data instanceof UIComponent ? data:null);
+		TemplateContext templateContext = new TemplateContext(null,context,component);
+		Object value = template.getValue(templateContext);
+		if(null == value){
+			int hashCode = SkinFactory.getInstance().getSkin(context).hashCode(context);
+			value = ByteBuffer.allocate(4).putInt(hashCode).array();
+		}
+		return value;
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/TemplateCSSResource.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/TemplateCSSResource.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/TemplateCSSResource.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,290 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.resource;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Date;
+import java.util.Map;
+
+import javax.faces.FacesException;
+import javax.faces.context.FacesContext;
+
+
+/**
+ * Class for create and send resources from template ( at most, used for CSS files )
+ * @author shura (latest modification by $Author: nick_belaevski $)
+ * @version $Revision: 1.1.2.2 $ $Date: 2007/01/11 16:52:14 $
+ *
+ */
+public class TemplateCSSResource implements InternetResource {
+	 
+	private String templateName;
+	private InternetResource _resource;
+	private static TemplateCSSRenderer templateCSSRenderer = new TemplateCSSRenderer();
+
+	public TemplateCSSResource(){
+		
+	}
+	/**
+	 * @param templateName
+	 */
+	public TemplateCSSResource(String templateName) {
+		super();
+		setPath(templateName);
+	}
+	/**
+	 * @param templateName
+	 * @throws FacesException
+	 */
+	public void setPath(String templateName) throws FacesException {
+		// remove leaded / - as need for ClassLoader.getResource call.
+		this.templateName = templateName.startsWith("/")?templateName.substring(1):templateName;
+		// Self-register resource in system.
+		_resource = InternetResourceBuilder.getInstance().createResource(null,this.templateName);
+		_resource.setRenderer(templateCSSRenderer);
+		try {
+			// Attempt to compile template at init time. Due to client-side caching,
+			// without registering resources requests can be not call rendering template.
+			templateCSSRenderer.getTemplate(_resource, null);
+		} catch (Exception e) {
+			// Do nothing - template will be compiled at rendering time.
+			// TODO log error.
+		}
+	}
+
+	/**
+	 * @param context
+	 * @param data
+	 * @param attributes
+	 * @throws IOException
+	 * @see org.ajax4jsf.framework.resource.InternetResource#encode(javax.faces.context.FacesContext, java.lang.Object, java.util.Map)
+	 */
+	public void encode(FacesContext context, Object data, Map attributes) throws IOException {
+		_resource.encode(context, data, attributes);
+	}
+
+	/**
+	 * @param context
+	 * @param data
+	 * @throws IOException
+	 * @see org.ajax4jsf.framework.resource.InternetResource#encode(javax.faces.context.FacesContext, java.lang.Object)
+	 */
+	public void encode(FacesContext context, Object data) throws IOException {
+		_resource.encode(context, data);
+	}
+
+	/**
+	 * @param context
+	 * @param component
+	 * @param attrs
+	 * @throws IOException
+	 * @see org.ajax4jsf.framework.resource.InternetResource#encodeBegin(javax.faces.context.FacesContext, java.lang.Object, java.util.Map)
+	 */
+	public void encodeBegin(FacesContext context, Object component, Map attrs) throws IOException {
+		_resource.encodeBegin(context, component, attrs);
+	}
+
+	/**
+	 * @param context
+	 * @param component
+	 * @throws IOException
+	 * @see org.ajax4jsf.framework.resource.InternetResource#encodeEnd(javax.faces.context.FacesContext, java.lang.Object)
+	 */
+	public void encodeEnd(FacesContext context, Object component) throws IOException {
+		_resource.encodeEnd(context, component);
+	}
+
+	/**
+	 * @return
+	 * @see org.ajax4jsf.framework.resource.InternetResource#getContentLength(ResourceContext)
+	 */
+	public int getContentLength(ResourceContext resourceContext) {
+		return _resource.getContentLength(resourceContext);
+	}
+
+	/**
+	 * @return
+	 * @see org.ajax4jsf.framework.resource.InternetResource#getContentType(ResourceContext)
+	 */
+	public String getContentType(ResourceContext resourceContext) {
+		return _resource.getContentType(null);
+	}
+
+	/**
+	 * @return
+	 * @see org.ajax4jsf.framework.resource.InternetResource#getExpired(ResourceContext)
+	 */
+	public Date getExpired(ResourceContext resourceContext) {
+		return _resource.getExpired(null);
+	}
+
+	/**
+	 * @return
+	 * @see org.ajax4jsf.framework.resource.InternetResource#getKey()
+	 */
+	public String getKey() {
+		return _resource.getKey();
+	}
+
+	/**
+	 * @return
+	 * @see org.ajax4jsf.framework.resource.InternetResource#getLastModified(ResourceContext)
+	 */
+	public Date getLastModified(ResourceContext resourceContext) {
+		return _resource.getLastModified(null);
+	}
+
+	/**
+	 * @param key
+	 * @return
+	 * @see org.ajax4jsf.framework.resource.InternetResource#getProperty(java.lang.Object)
+	 */
+	public Object getProperty(Object key) {
+		return _resource.getProperty(key);
+	}
+
+	/**
+	 * @param context
+	 * @return
+	 * @see org.ajax4jsf.framework.resource.InternetResource#getResourceAsStream(org.ajax4jsf.framework.resource.ResourceContext)
+	 */
+	public InputStream getResourceAsStream(ResourceContext context) {
+		return _resource.getResourceAsStream(context);
+	}
+
+	/**
+	 * @param context
+	 * @param data
+	 * @return
+	 * @see org.ajax4jsf.framework.resource.InternetResource#getUri(javax.faces.context.FacesContext, java.lang.Object)
+	 */
+	public String getUri(FacesContext context, Object data) {
+		return _resource.getUri(context, data);
+	}
+
+	/**
+	 * @return
+	 * @see org.ajax4jsf.framework.resource.InternetResource#isCacheable(ResourceContext)
+	 */
+	public boolean isCacheable(ResourceContext resourceContext) {
+		return _resource.isCacheable(null);
+	}
+
+	/**
+	 * @return
+	 * @see org.ajax4jsf.framework.resource.InternetResource#isSessionAware()
+	 */
+	public boolean isSessionAware() {
+		return _resource.isSessionAware();
+	}
+
+	/**
+	 * @return
+	 * @see org.ajax4jsf.framework.resource.InternetResource#requireFacesContext()
+	 */
+	public boolean requireFacesContext() {
+		return _resource.requireFacesContext();
+	}
+
+	/**
+	 * @param context
+	 * @throws IOException
+	 * @see org.ajax4jsf.framework.resource.InternetResource#send(org.ajax4jsf.framework.resource.ResourceContext)
+	 */
+	public void send(ResourceContext context) throws IOException {
+		_resource.send(context);
+	}
+
+	/**
+	 * @param response
+	 * @see org.ajax4jsf.framework.resource.InternetResource#sendHeaders(org.ajax4jsf.framework.resource.ResourceContext)
+	 */
+	public void sendHeaders(ResourceContext response) {
+		_resource.sendHeaders(response);
+	}
+
+	/**
+	 * @param key
+	 * @see org.ajax4jsf.framework.resource.InternetResource#setKey(java.lang.String)
+	 */
+	public void setKey(String key) {
+		_resource.setKey(key);
+	}
+
+	/**
+	 * @param key
+	 * @param value
+	 * @see org.ajax4jsf.framework.resource.InternetResource#setProperty(java.lang.Object, java.lang.Object)
+	 */
+	public void setProperty(Object key, Object value) {
+		_resource.setProperty(key, value);
+	}
+
+	/**
+	 * @param renderer
+	 * @see org.ajax4jsf.framework.resource.InternetResource#setRenderer(org.ajax4jsf.framework.resource.ResourceRenderer)
+	 */
+	public void setRenderer(ResourceRenderer renderer) {
+		_resource.setRenderer(renderer);
+	}
+
+	/**
+	 * @return
+	 * @see org.ajax4jsf.framework.resource.InternetResource#getRenderer(ResourceContext)
+	 */
+	public ResourceRenderer getRenderer(ResourceContext resourceContext) {
+		return _resource.getRenderer(null);
+	}
+
+	/**
+	 * @param cacheable
+	 * @see org.ajax4jsf.framework.resource.InternetResource#setCacheable(boolean)
+	 */
+	public void setCacheable(boolean cacheable) {
+		_resource.setCacheable(cacheable);
+	}
+
+	/**
+	 * @param expired
+	 * @see org.ajax4jsf.framework.resource.InternetResource#setExpired(java.util.Date)
+	 */
+	public void setExpired(Date expired) {
+		_resource.setExpired(expired);
+	}
+
+	/**
+	 * @param lastModified
+	 * @see org.ajax4jsf.framework.resource.InternetResource#setLastModified(java.util.Date)
+	 */
+	public void setLastModified(Date lastModified) {
+		_resource.setLastModified(lastModified);
+	}
+
+	/**
+	 * @param sessionAware
+	 * @see org.ajax4jsf.framework.resource.InternetResource#setSessionAware(boolean)
+	 */
+	public void setSessionAware(boolean sessionAware) {
+		_resource.setSessionAware(sessionAware);
+	}
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/UserResource.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/UserResource.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/UserResource.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,137 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.resource;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.Serializable;
+import java.util.Date;
+
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIComponentBase;
+import javax.faces.context.FacesContext;
+import javax.faces.el.MethodBinding;
+import javax.faces.el.ValueBinding;
+
+import org.ajax4jsf.ajax.resource.ResourceComponent;
+
+/**
+ * @author shura
+ *
+ */
+public class UserResource extends InternetResourceBase {
+
+	private String contentType;
+	/**
+	 * 
+	 */
+	public UserResource(boolean cacheable, boolean session, String mime) {
+		super();		
+		setCacheable(cacheable);
+		setSessionAware(session);
+		setContentType(mime);
+	}
+	/**
+	 * @return Returns the contentType.
+	 */
+	public String getContentType(ResourceContext resourceContext) {
+		return contentType;
+	}
+	/**
+	 * @param contentType The contentType to set.
+	 */
+	public void setContentType(String contentType) {
+		this.contentType = contentType;
+	}
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.InternetResourceBase#getDataToStore(javax.faces.context.FacesContext, java.lang.Object)
+	 */
+	public Object getDataToStore(FacesContext context, Object data) {
+		UriData dataToStore = null;
+		if (data instanceof ResourceComponent) {
+			ResourceComponent resource = (ResourceComponent) data;
+			dataToStore = new UriData();
+			dataToStore.value = resource.getValue();
+			dataToStore.createContent = UIComponentBase.saveAttachedState(context,resource.getCreateContent());
+			if (data instanceof UIComponent) {
+				UIComponent component = (UIComponent) data;
+				ValueBinding expires = component.getValueBinding("expires");
+				if (null != expires) {
+					dataToStore.expires = UIComponentBase.saveAttachedState(context,expires);
+				}
+				ValueBinding lastModified = component.getValueBinding("lastModified");
+				if (null != lastModified) {
+					dataToStore.modified = UIComponentBase.saveAttachedState(context,lastModified);
+				}
+			}
+		}
+		return dataToStore;
+	}
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.InternetResourceBase#send(org.ajax4jsf.framework.resource.ResourceContext)
+	 */
+	public void send(ResourceContext context) throws IOException {
+		UriData data = (UriData) restoreData(context);
+		FacesContext facesContext = FacesContext.getCurrentInstance();
+		if (null != data && null != facesContext ) {
+			// Send headers
+			if(data.expires != null){
+				ValueBinding binding = (ValueBinding) UIComponentBase.restoreAttachedState(facesContext,data.expires);
+				Date expires = (Date) binding.getValue(facesContext);
+				context.setDateHeader("Expires",expires.getTime());
+			}
+			if(data.modified != null){
+				ValueBinding binding = (ValueBinding) UIComponentBase.restoreAttachedState(facesContext,data.modified);
+				Date modified = (Date) binding.getValue(facesContext);
+				context.setDateHeader("Last-Modified",modified.getTime());
+			}
+			// Send content
+			OutputStream out = context.getOutputStream();
+			MethodBinding send = (MethodBinding) UIComponentBase.restoreAttachedState(facesContext,data.createContent);
+			send.invoke(facesContext,new Object[]{out,data.value});
+		}
+	}
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.resource.InternetResourceBase#requireFacesContext()
+	 */
+	public boolean requireFacesContext() {
+		// TODO Auto-generated method stub
+		return true;
+	}
+	
+	public static class UriData implements Serializable {
+
+		/**
+		 * 
+		 */
+		private static final long serialVersionUID = 1258987L;
+		
+		private Object value;
+		
+		private Object createContent;
+		
+		private Object expires;
+		
+		private Object modified;
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/cached/CachedResourceBuilder.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/cached/CachedResourceBuilder.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/cached/CachedResourceBuilder.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,199 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.resource.cached;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Properties;
+
+import javax.faces.FacesException;
+import javax.faces.context.FacesContext;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+
+import org.ajax4jsf.framework.resource.InternetResource;
+import org.ajax4jsf.framework.resource.ResourceBuilderImpl;
+import org.ajax4jsf.framework.resource.ResourceNotFoundException;
+import org.ajax4jsf.framework.util.message.Messages;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * @author shura
+ * 
+ */
+public class CachedResourceBuilder extends ResourceBuilderImpl {
+
+    private static final Log log = LogFactory
+	    .getLog(CachedResourceBuilder.class);
+
+    private static final int DEFAULT_CAPACITY = 10000;
+
+    private long counter = 0;
+
+    private DualLRUMap cache;
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see org.ajax4jsf.framework.resource.ResourceBuilderImpl#decrypt(byte[])
+         */
+    protected byte[] decrypt(byte[] data) {
+	// dummy - data not send via internet.
+	return data;
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see org.ajax4jsf.framework.resource.ResourceBuilderImpl#encrypt(byte[])
+         */
+    protected byte[] encrypt(byte[] data) {
+	// dummy - data not send via internet.
+	return data;
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see org.ajax4jsf.framework.resource.ResourceBuilderImpl#getResourceDataForKey(java.lang.String)
+         */
+    public Object getResourceDataForKey(String key) {
+	ResourceBean bean = (ResourceBean) cache.get(key);
+	if (null == bean) {
+	    throw new ResourceNotFoundException("Resource for key " + key
+		    + "not present in cache");
+	}
+	return bean.getData();
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see org.ajax4jsf.framework.resource.ResourceBuilderImpl#getResourceForKey(java.lang.String)
+         */
+    public InternetResource getResourceForKey(String key)
+	    throws ResourceNotFoundException {
+	ResourceBean bean = (ResourceBean) cache.get(key);
+	if (null == bean) {
+	    throw new ResourceNotFoundException("Resource for key " + key
+		    + "not present in cache");
+	}
+	return super.getResourceForKey(bean.getKey());
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see org.ajax4jsf.framework.resource.ResourceBuilderImpl#getUri(org.ajax4jsf.framework.resource.InternetResource,
+         *      javax.faces.context.FacesContext, java.lang.Object)
+         */
+    public String getUri(InternetResource resource, FacesContext facesContext,
+	    Object data) {
+	ResourceBean bean;
+	if (null == data) {
+	    bean = new ResourceBean(resource.getKey());
+	} else {
+	    if (data instanceof byte[]) {
+		// Special case for simple bytes array data.
+		bean = new ResourceBytesDataBean(resource.getKey(),
+			(byte[]) data);
+	    } else {
+		bean = new ResourceDataBean(resource.getKey(), data);
+	    }
+	}
+	String key = (String) cache.getKey(bean);
+	if (null == key) {
+	    synchronized (this) {
+		counter++;
+		key = bean.hashCode() + "c" + counter;
+	    }
+	    cache.put(key, bean);
+	} else {
+	    // Refresh LRU
+	    cache.get(key);
+	}
+	String resourceURL = getFacesResourceURL(facesContext, key);
+	if (resource.isSessionAware()) {
+	    resourceURL = facesContext.getExternalContext().encodeResourceURL(
+		    resourceURL);
+	}
+	if (log.isDebugEnabled()) {
+	    log.debug(Messages.getMessage(Messages.BUILD_RESOURCE_URI_INFO,
+		    resource.getKey(), resourceURL));
+	}
+	return resourceURL;// context.getExternalContext().encodeResourceURL(resourceURL);
+    }
+
+    /*
+         * (non-Javadoc)
+         * 
+         * @see org.ajax4jsf.framework.resource.ResourceBuilderImpl#init(javax.servlet.ServletContext,
+         *      java.lang.String)
+         */
+    public void init()
+	    throws FacesException {
+	super.init();
+	// Create cache manager.
+	Properties properties = getProperties("cache.properties");
+	int capacity = DEFAULT_CAPACITY;
+	String capacityString = properties.getProperty("cache.capacity");
+	if (null != capacityString) {
+	    try {
+		capacity = Integer.parseInt(capacityString);
+	    } catch (NumberFormatException e) {
+		log.warn("Error parsing value of parameters cache capacity, use default value "+DEFAULT_CAPACITY, e);
+	    }
+	}
+	cache = new DualLRUMap(capacity);
+	counter = getStartTime() - 1158760000000L;
+    }
+
+    /**
+         * Get properties file from classpath
+         * 
+         * @param name
+         * @return
+         */
+    protected Properties getProperties(String name) {
+	Properties properties = new Properties();
+	InputStream props = CachedResourceBuilder.class
+		.getResourceAsStream(name);
+	if (null != props) {
+	    try {
+		properties.load(props);
+	    } catch (IOException e) {
+		// TODO Auto-generated catch block
+		log.warn(Messages.getMessage(Messages.READING_PROPERTIES_ERROR,
+			name), e);
+	    } finally {
+		try {
+		    props.close();
+		} catch (IOException e) {
+		    // Can be ignored
+		}
+	    }
+	}
+	return properties;
+
+    }
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/cached/DualLRUMap.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/cached/DualLRUMap.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/cached/DualLRUMap.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,78 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.resource.cached;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.commons.collections.LRUMap;
+
+class DualLRUMap extends LRUMap {
+	
+	private Map reverseMap ;
+
+	public DualLRUMap(int size) {
+		super(size);
+		reverseMap = new HashMap(size);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.apache.commons.collections.LRUMap#processRemovedLRU(java.lang.Object, java.lang.Object)
+	 */
+	protected void processRemovedLRU(Object key, Object value) {
+		synchronized (this) {
+		super.processRemovedLRU(key, value);
+		reverseMap.remove(value);
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.apache.commons.collections.LRUMap#put(java.lang.Object, java.lang.Object)
+	 */
+	public Object put(Object key, Object value) {
+		synchronized (this) {
+			reverseMap.put(value, key);
+			return super.put(key, value);				
+		}
+	}
+	
+	public Object getKey(Object value){
+		synchronized (this) {
+		Object key = reverseMap.get(value);
+		if(!containsKey(key)){
+			reverseMap.remove(value);
+			key = null;
+		}
+		return key;
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.apache.commons.collections.LRUMap#get(java.lang.Object)
+	 */
+	public Object get(Object key) {
+		synchronized (this) {
+		return super.get(key);
+		}
+	}
+	
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/cached/ResourceBean.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/cached/ResourceBean.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/cached/ResourceBean.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,71 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.resource.cached;
+
+import java.io.Serializable;
+
+/**
+ * @author shura
+ *
+ */
+public class ResourceBean  implements Serializable {
+	
+	private String key;
+
+	/**
+	 * @return the key
+	 */
+	public String getKey() {
+		return key;
+	}
+	
+	public Object getData(){
+		return null;
+	}
+
+	public ResourceBean(String key) {
+		super();
+		this.key = key;
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.Object#equals(java.lang.Object)
+	 */
+	public boolean equals(Object obj) {
+		if (null != obj && obj instanceof ResourceBean) {
+			ResourceBean bean = (ResourceBean) obj;
+			return key.equals(bean.getKey()) && bean.getData() == null;
+		};
+		return false;
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.Object#hashCode()
+	 */
+	public int hashCode() {
+		// TODO Auto-generated method stub
+		return key.hashCode();
+	}
+	
+	
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/cached/ResourceBytesDataBean.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/cached/ResourceBytesDataBean.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/cached/ResourceBytesDataBean.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,65 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.resource.cached;
+
+import java.util.Arrays;
+
+/**
+ * @author shura
+ *
+ */
+public class ResourceBytesDataBean extends ResourceBean {
+	
+	private byte[] data;
+	
+	ResourceBytesDataBean(String key, byte[] data){
+		super(key);
+		this.data = data;
+	}
+	
+	public Object getData() {
+		return data;
+	}
+	/* (non-Javadoc)
+	 * @see com.exadel.vcp.resource.ResourceBean#equals(java.lang.Object)
+	 */
+	public boolean equals(Object obj) {
+		if (null != obj && obj instanceof ResourceBytesDataBean) {
+			ResourceBytesDataBean bean = (ResourceBytesDataBean) obj;
+			byte[] beanData = (byte[]) bean.getData();
+			return getKey().equals(bean.getKey()) && Arrays.equals(data, beanData);
+		};
+		return false;
+	}
+
+	/* (non-Javadoc)
+	 * @see com.exadel.vcp.resource.ResourceBean#hashCode()
+	 */
+	public int hashCode() {
+		int hash = super.hashCode();
+		for (int i = 0; i < data.length; i++) {
+			hash = hash*32+data[i];
+		}
+		return hash;
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/cached/ResourceDataBean.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/cached/ResourceDataBean.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/cached/ResourceDataBean.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,64 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.resource.cached;
+
+
+/**
+ * @author shura
+ *
+ */
+public class ResourceDataBean extends ResourceBean{
+	
+	private Object data;
+	
+	public ResourceDataBean(String key, Object data){
+		super(key);
+		this.data = data;
+	}
+
+	/* (non-Javadoc)
+	 * @see com.exadel.vcp.resource.ResourceBean#equals(java.lang.Object)
+	 */
+	public boolean equals(Object obj) {
+		if (null != obj && obj instanceof ResourceBean) {
+			ResourceBean bean = (ResourceBean) obj;
+			return getKey().equals(bean.getKey()) && data.equals(bean.getData());
+		};
+		return false;
+	}
+
+	/* (non-Javadoc)
+	 * @see com.exadel.vcp.resource.ResourceBean#getData()
+	 */
+	public Object getData() {
+		return data;
+	}
+
+	/* (non-Javadoc)
+	 * @see com.exadel.vcp.resource.ResourceBean#hashCode()
+	 */
+	public int hashCode() {
+		// TODO Auto-generated method stub
+		return super.hashCode()*32+data.hashCode();
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/cached/cache.properties
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/cached/cache.properties	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/cached/cache.properties	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,42 @@
+cache.memory true
+cache.capacity 100000
+cache.key=com.exadel.vcp.resourceCache
+
+cache.use.host.domain.in.key true
+
+
+# CACHE UNLIMITED DISK
+# Use unlimited disk cache or not. The default value is false, which means
+# the disk cache will be limited in size to the value specified by cache.capacity.
+#
+# cache.unlimited.disk=false
+
+
+# JMS CLUSTER PROPERTIES
+#
+# Configuration properties for JMS clustering. See the clustering documentation
+# for more information on these settings.
+#
+#cache.cluster.jms.topic.factory=java:comp/env/jms/TopicConnectionFactory
+#cache.cluster.jms.topic.name=java:comp/env/jms/OSCacheTopic
+#cache.cluster.jms.node.name=node1
+
+
+# JAVAGROUPS CLUSTER PROPERTIES
+#
+# Configuration properites for the JavaGroups clustering. Only one of these
+# should be specified. Default values (as shown below) will be used if niether
+# property is set. See the clustering documentation and the JavaGroups project
+# (www.javagroups.com) for more information on these settings.
+#
+#cache.cluster.properties=UDP(mcast_addr=231.12.21.132;mcast_port=45566;ip_ttl=32;\
+#mcast_send_buf_size=150000;mcast_recv_buf_size=80000):\
+#PING(timeout=2000;num_initial_members=3):\
+#MERGE2(min_interval=5000;max_interval=10000):\
+#FD_SOCK:VERIFY_SUSPECT(timeout=1500):\
+#pbcast.NAKACK(gc_lag=50;retransmit_timeout=300,600,1200,2400,4800;max_xmit_size=8192):\
+#UNICAST(timeout=300,600,1200,2400):\
+#pbcast.STABLE(desired_avg_gossip=20000):\
+#FRAG(frag_size=8096;down_thread=false;up_thread=false):\
+#pbcast.GMS(join_timeout=5000;join_retry_timeout=2000;shun=false;print_local_addr=true)
+#cache.cluster.multicast.ip=231.12.21.132

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/package.html
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/package.html	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/resource/package.html	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,34 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+
+
+  
+  
+  <meta content="text/html; charset=Windows-1251" http-equiv="content-type">
+
+
+  
+  
+  <title>Internet Resources</title>
+</head>
+
+
+<body>
+
+
+<h1>Package for manipulate page resources ( images, scripts, styles,
+applets etc ) at Java Server Faces render Phase and at request phase of
+concrete resource.</h1>
+
+Note: The resource framework implements the Lightweight design patter. 
+Therefore, the resource classes should not contain data depends of 
+the particular request. The data is taken from the {@link javax.context.FacesContext}
+and {@link javax.component.UIComponent}, that is passed as a parameter
+when html is generated.
+For passing the data with URI, the {@link InternetResourceBase} class
+has getDataToSave method. It is invoked when the generation is taken place.
+The returned object is serialized. Then, restoreData method de-serialize it back.
+The {@link InternetResourceBuilder} class controls this process. 
+</body>
+</html>

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/skin/DummySkinConfiguration.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/skin/DummySkinConfiguration.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/skin/DummySkinConfiguration.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,68 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.skin;
+
+import javax.faces.context.FacesContext;
+
+/**
+ * @author shura
+ *
+ */
+public class DummySkinConfiguration implements SkinConfiguration {
+	
+	private Skin _skin;
+
+	/**
+	 * @param skin
+	 */
+	public DummySkinConfiguration(Skin skin) {
+		super();
+		_skin = skin;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.skin.SkinConfiguration#containsParameter(java.lang.String)
+	 */
+	public boolean containsParameter(String name) {
+		return _skin.containsProperty(name);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.skin.SkinConfiguration#getParameter(javax.faces.context.FacesContext, java.lang.String)
+	 */
+	public Object getParameter(FacesContext context, String name) {
+		return _skin.getParameter(context, name);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.skin.SkinConfiguration#getParameter(javax.faces.context.FacesContext, java.lang.String, java.lang.String, java.lang.Object)
+	 */
+	public Object getParameter(FacesContext context, String name,
+			String skinName, Object defaultValue) {
+		Object parameter = _skin.getParameter(context, name);
+		if(null == parameter){
+			parameter = defaultValue;
+		}
+		return parameter;
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/skin/Skin.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/skin/Skin.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/skin/Skin.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,324 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.skin;
+
+import javax.faces.context.FacesContext;
+
+/**
+ * Main interface for configurable parameters.
+ * 
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:59:43 $
+ * 
+ */
+public interface Skin {
+	// parameters names constants
+
+//	 parameters names constants
+	
+	/**
+	 * used for define url with general CSS file for current skin.
+	 */
+	public static final String generalStyleSheet = "generalStyleSheet";
+
+	/**
+	 * used for defining a header background color in the panel, a tabpanel active tab 
+	 * background color, a bar background color for ddmenu, tables background color, 
+	 * buttons background color. Default value #1D7DB3.               
+	 */
+	public static final String headerBackgroundColor = "headerBackgroundColor";
+
+	/**
+	 * used for defining color of the titles of the top level of the menu, the panel header
+	 * color, the table header color, color of the title of the active tab in the tabpanel,
+	 * color of the title on the buttons. Default value #FFFFFF. 
+	 */
+	public static final String headTextColor = "headTextColor";
+
+	/**
+	 * used for defining the background color of the bar under the header in the panel and 
+	 * the tabpanel, color of the border for the top level of the ddmenu, background 
+	 * highlight color of the selected item in the dropdown list boxes of the ddmenu, 
+	 * background color of the footer in the tables, color of the text for the inactive and 
+	 * disabled tab in the tabpanel, color of the border of the buttons. Default value 
+	 * #BFD7E4.
+	 */
+	public static final String selectBackgroundColor = "selectBackgroundColor";
+
+	/**
+	 * used for defining the background color of the basic area of the panel and tabpanels,
+	 * background color of the dropdown list boxes of ddmenu. Default value #BFD7E4.
+	 */
+	public static final String generalBackgroundColor = "generalBackgroundColor";
+
+	/**
+	 * used for defining color of the basic text, color of the text in the dropdown list 
+	 * boxes of ddmenu, color of the right and top borders for the controls like text, 
+	 * textArea, secret. Default value #000000.
+	 */
+	public static final String generalTextColor = "generalTextColor";
+
+	/**
+	 * used for defining shadow background color of the panels, color of the bottom and right
+	 * borders for the dropdown list box in ddmenu. Default value #AFB1B2.
+	 */
+	public static final String shadowBackgroundColor = "shadowBackgroundColor";
+
+	/**
+	 * used for defining the seamlessness of the tip shadow. Default value 2.
+	 */
+	public static final String shadowOpacity = "shadowOpacity";
+
+	/**
+	 * used for defining  tables border color, color of the bottom and left controls like 
+	 * text, textArea, secret, color of the top and left borders for the dropdown list box in
+	 * the ddmenu. Default value #CCCCCC.
+	 */
+	public static final String tableBorderColor = "tableBorderColor";
+
+	/**
+	 * used for defining tables and controls background color. Default value #FFFFFF.
+	 */
+	public static final String tableBackgroundColor = "tableBackgroundColor";
+
+	/**
+	 * Font size for the displaying panels headers and top level of the ddmenu. Default 
+	 * value 12px.
+	 */
+	public static final String headerSizeFont = "headerSizeFont";
+
+	/**
+	 * Font name for the displaying panels headers and top level of the ddmenu.Default value
+	 * Arial, Verdana.
+	 */
+	public static final String headerFamilyFont = "headerFamilyFont";
+
+	/**
+	 * Font size for displaying tab titles. Default value 11px.
+	 */
+	public static final String tabSizeFont = "tabSizeFont";
+
+	/**
+	 * Font name for displaying tab titles. Default value Arial, Verdana.
+	 * 
+	 */
+	public static final String tabFamilyFont = "tabFamilyFont";
+
+	/**
+	 * Rounding-off radius of the tabs corners. Default value 5px.
+	 */
+	public static final String tabRadiusCorner = "tabRadiusCorner";
+
+	/**
+	 * Font size for displaying buttons titles. Default value 11px.
+	 */
+	public static final String buttonSizeFont = "buttonSizeFont";
+
+	/**
+	 * Font name for displaying buttons titles. Default value Arial, Verdana.
+	 */
+	public static final String buttonFamilyFont = "buttonFamilyFont";
+
+	/**
+	 * Rounding-off radius of the buttons corners. Default value 13px.
+	 * 
+	 */
+	public static final String buttonRadiusCorner = "buttonRadiusCorner";
+
+	/**
+	 * Rounding-off radius of the panels corners. Default value 5px.
+	 */
+	public static final String panelRadiusCorner = "panelRadiusCorner";
+
+	/**
+	 * Style of the text displaying on the button. Default value normal.
+	 * 
+	 */
+	public static final String buttonStyleFont = "buttonStyleFont";
+
+	/**
+	 * Depth of the text displaying on the button. Default value bold.
+	 */
+	public static final String buttonWeightFont = "buttonWeightFont";
+
+	/**
+	 * Style of the text displaying on the active (selected) tabs.Default value normal.
+	 */
+	public static final String activetabStyleFont = "activetabStyleFont";
+
+	/**
+	 * Depth of the text displaying on the active (selected) tabs.Default value bold.
+	 */
+	public static final String activetabWeightFont = "activetabWeightFont";
+
+	/**
+	 * Style of of the text displaying on the inactive (unselected) tabs. Default value 
+	 * normal.
+	 */
+	public static final String tabStyleFont = "tabStyleFont";
+
+	/**
+	 * Depth of the text displaying on the inactive (unselected) tabs.Default value normal.
+	 */
+	public static final String tabWeightFont = "tabWeightFont";
+
+	/**
+	 * Style of the text displaying on the disabled tabs.Default value normal.
+	 */
+	public static final String disabledTabStyleFont = "disabledTabStyleFont";
+
+	/**
+	 * Depth of the text displaying on the disabled tabs.Default value normal.
+	 */
+	public static final String disabledTabWeightFont = "disabledTabWeightFont";
+	
+	/**
+	 * Color for selected checkbox or selectOneRadio.
+	 */
+	public static final String selectControlColor  = "selectControlColor";
+	
+	/**
+	 * Responsible for the borders color of the radiobutton and checkbox and color of light
+	 * part of the fields and text area border. Default value #B0B0B0.
+	 */
+	public static final String controlBorderColor  = "controlBorderColor";
+
+	/**
+	 * Parameter responsible for 3D Look of panels and buttons.
+	 */
+	
+	public static final String interfaceLevel3D = "interfaceLevel3D";
+
+	/**
+	 * defines the layout of the tabs in the panel. Possible values Top. Left. Bottom, Right.
+	 * Default value ???. 
+	 */
+	public static final String preferableTabPosition = "preferableTabPosition";
+	
+	/**
+	 * defines the variant of text writing. Values - Hor (horisontal position), Vert 
+	 * (vertical position - letters are arranged into column), VertCW (vertical
+	 * position with text rotation anticlockwise). Default value Hor.
+	 */
+	public static final String preferableTabTextOrientation = "preferableTabTextOrientation";
+	/**
+	 * text aligning in the tabs with the fixed tab length (hight). Values Left, Center,Right
+	 * for the horizontal oriented tabs, values Top, center, Bottom - for vertical oriented 
+	 * tabs. Default value center.
+	 */
+	
+
+	public static final String preferableTabTextDirection  = "preferableTabTextDirection";
+
+	
+	/**
+	 * 
+	 */
+	public static final String overAllBackground = "overAllBackground";
+	/**
+	 * 
+	 */
+	public static final String generalLinkColor = "generalLinkColor";
+
+	public static final String panelTextColor = "panelTextColor";
+	
+	// Preferable parameters
+	/**
+	 * Preferable parameters names for skin ( in common, for Preferable.Name
+	 * parameter will PreferableName )
+	 * 
+	 * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+	 * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:59:43 $
+	 * 
+	 */
+
+	public interface Preferable {
+		/**
+		 * 
+		 */
+		public static final String dataSizeFont = "preferableDataSizeFont";
+
+		/**
+		 * 
+		 */
+		public static final String dataFamilyFont = "preferableDataFamilyFont";
+
+		/**
+		 * 
+		 */
+		public static final String panelBodyPadding = "preferablePanelBodyPadding";
+
+		/**
+		 * 
+		 */
+		public static final String headerWeightFont = "preferableHeaderWeightFont";
+
+	}
+
+	/**
+	 * Get Rener Kit name for this skin.
+	 * 
+	 * @param context -
+	 *            {@link FacesContext } for current request. need for
+	 *            {@link javax.faces.el.ValueBinding} evaluation.
+	 * @return RenderKitId for this skin, or <code>null</code> for default.
+	 */
+	public String getRenderKitId(FacesContext context);
+
+	/**
+	 * Get value for configuration parameter. If parameter set as EL-expression,
+	 * calculate it value.
+	 * 
+	 * @param context -
+	 *            {@link FacesContext } for current request.
+	 * @param name
+	 *            name of paremeter.
+	 * @return value of parameter in config, or null
+	 */
+	public Object getParameter(FacesContext context, String name);
+	
+	/**
+	 * Get value for configuration parameter. If parameter set as EL-expression,
+	 * calculate it value.
+	 * 
+	 * @param context -
+	 *            {@link FacesContext } for current request.
+	 * @param name
+	 *            name of paremeter.
+	 * @param defaultValue - default value if parameter not present in Skin
+	 * @return value of parameter in config, or null
+	 */
+	public Object getParameter(FacesContext context, String name, Object defaultValue);
+
+	/**
+	 * @param name
+	 * @return
+	 */
+	public boolean containsProperty(String name);
+	
+	/**
+	 * Calculate unique ( as possible ) code to identity this skin instance. Used for generate hash key in skin-depended resources
+	 * @param context
+	 * @return
+	 */
+	public int hashCode(FacesContext context);
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/skin/SkinBean.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/skin/SkinBean.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/skin/SkinBean.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,136 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.skin;
+
+import java.nio.ByteBuffer;
+import java.util.AbstractMap;
+import java.util.Collections;
+import java.util.Set;
+
+import javax.faces.context.FacesContext;
+
+/**
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:59:40 $
+ *
+ */
+public class SkinBean extends AbstractMap implements Skin {
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.skin.Skin#hashCode(javax.faces.context.FacesContext)
+	 */
+	public int hashCode(FacesContext context) {
+		// TODO Auto-generated method stub
+		return getSkin().hashCode(context);
+	}
+	
+	
+	
+
+	/* (non-Javadoc)
+	 * @see java.util.AbstractMap#entrySet()
+	 */
+	public Set entrySet() {
+		// TODO Auto-generated method stub
+		return Collections.EMPTY_SET;
+	}
+
+	/* (non-Javadoc)
+	 * @see java.util.AbstractMap#containsKey(java.lang.Object)
+	 */
+	public boolean containsKey(Object key) {
+		if(null == key) {
+			return false;
+		}
+		return getSkin().containsProperty(key.toString());
+	}
+
+	/* (non-Javadoc)
+	 * @see java.util.AbstractMap#get(java.lang.Object)
+	 */
+	public Object get(Object key) {
+		if(null == key) {
+			return null;
+		}
+		return getSkin().getParameter(FacesContext.getCurrentInstance(),key.toString());
+	}
+
+	private Skin getSkin() {
+		FacesContext context = FacesContext.getCurrentInstance();
+		return SkinFactory.getInstance().getSkin(context);
+	}
+
+	/* (non-Javadoc)
+	 * @see java.util.AbstractMap#toString()
+	 */
+	public String toString() {
+		return getSkin().toString();
+	}
+
+	/* (non-Javadoc)
+	 * @see java.util.AbstractMap#isEmpty()
+	 */
+	public boolean isEmpty() {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.skin.Skin#getRenderKitId(javax.faces.context.FacesContext)
+	 */
+	public String getRenderKitId(FacesContext context) {
+		return getSkin().getRenderKitId(context);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.skin.Skin#getParameter(javax.faces.context.FacesContext, java.lang.String)
+	 */
+	public Object getParameter(FacesContext context, String name) {
+		return getSkin().getParameter(context,name);
+	}
+
+	
+	public Object getParameter(FacesContext context, String name, Object defaultValue) {
+		
+		return getSkin().getParameter(context, name, defaultValue);
+	}
+
+
+
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.skin.Skin#containsProperty(java.lang.String)
+	 */
+	public boolean containsProperty(String name) {
+		return getSkin().containsProperty(name);
+	}
+	
+	/* Static methods for manipulate skins */
+	
+	public static Object skinHashCode(){
+		FacesContext context = FacesContext.getCurrentInstance();
+		int hashCode = SkinFactory.getInstance().getSkin(context).hashCode(context);
+		byte[] bs = ByteBuffer.allocate(4).putInt(hashCode).array();
+		return bs;
+	}
+	
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/skin/SkinConfiguration.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/skin/SkinConfiguration.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/skin/SkinConfiguration.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,70 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.skin;
+
+import javax.faces.context.FacesContext;
+
+/**
+ * Fine tuning parameters for components configuration.
+ * For any skin, calculation of concrete component parameners done by special "configuration",
+ * pointed as special skin parameter ( or by default configuration ).
+ * Work like "transformation" of limited set Skin parameters to fine-grained individual component
+ * parameters.
+ * @author shura
+ *
+ */
+public interface SkinConfiguration {
+
+	/**
+	 * Get value for configuration parameter. If parameter set as EL-expression,
+	 * calculate it value.
+	 * 
+	 * @param context -
+	 *            {@link FacesContext } for current request.
+	 * @param name
+	 *            name of paremeter.
+	 * @return value of parameter in config, or null
+	 */
+	public Object getParameter(FacesContext context, String name);
+	
+	/**
+	 * Get value for skin parameter, for build extensible ( mandatory/fine tuning ) with three-stage checks :
+	 * <ul>
+	 * <li>first, check value for parameter with given name. If value not null, return it</li>
+	 * <li>second, got parameter value from skin by skinName key. If not null, return it.</li>
+	 * <li>if both above parameters is null, return default value.</li>
+	 * </ul> 
+	 * @param context - Current JSF context.
+	 * @param name - name of parameter.
+	 * @param skinName - name of according ( default ) parameter i Skin for same purpose. may be <code>null</code>.
+	 * @param defaultValue - default parameter value.
+	 * @return - value of parameter.
+	 */
+	public Object getParameter(FacesContext context, String name,String skinName, Object defaultValue);
+	/**
+	 * Test for present parameter for given name.
+	 * @param name of parameter to test
+	 * @return true if parameter present in configuration.
+	 */
+	public boolean containsParameter(String name);
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/skin/SkinFactory.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/skin/SkinFactory.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/skin/SkinFactory.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,179 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.skin;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.lang.reflect.Constructor;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.faces.context.FacesContext;
+
+import org.ajax4jsf.framework.util.message.Messages;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * Base factory class ( implement Singleton design pattern ). Produce self
+ * instance to build current skin configuration. At present, realised as lazy
+ * creation factory. TODO - select point to initialize.
+ * 
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:59:43 $
+ * 
+ */
+public abstract class SkinFactory {
+
+	/**
+	 * static instance variable.
+	 */
+	private static Map instances = Collections.synchronizedMap(new HashMap());
+
+	private static final Log log = LogFactory.getLog(SkinFactory.class);
+
+
+	public static void reset() {
+		instances = Collections.synchronizedMap(new HashMap());
+	}
+
+	/**
+	 * Initialize skin factory. TODO - make call from init() method of any
+	 * servlet or custom faces element method ??? If exist resource
+	 * META-INF/services/org.ajax4jsf.framework.skin.SkinFactory , create
+	 * instance of class by name from first line of this file. If such class
+	 * have constructor with {@link SkinFactory} parameter, instantiate it with
+	 * instance of default factory ( as usual in JSF ). If any error occurs in
+	 * instantiate custom factory, return default.
+	 */
+	public static final SkinFactory getInstance() {
+	    ClassLoader loader = Thread.currentThread().getContextClassLoader();
+	    SkinFactory instance = (SkinFactory) instances.get(loader);
+			if (instance == null) {
+				// Pluggable factories.
+				InputStream input = null; // loader.getResourceAsStream(SERVICE_RESOURCE);
+				input = loader.getResourceAsStream(SERVICE_RESOURCE);
+				// have services file.
+				if (input != null) {
+					try {
+						BufferedReader reader = new BufferedReader(
+								new InputStreamReader(input));
+						String factoryClassName = reader.readLine();
+						if (log.isDebugEnabled()) {
+							log.debug(Messages.getMessage(
+									Messages.SET_SKIN_FACTORY_INFO,
+									factoryClassName));
+						}
+						Class clazz = Class.forName(factoryClassName);
+						try {
+							// try construct factory chain.
+							Constructor factoryConstructor = clazz
+									.getConstructor(new Class[] { SkinFactory.class });
+							instance = (SkinFactory) factoryConstructor
+									.newInstance(new Object[] { instance });
+						} catch (NoSuchMethodException e) {
+							// no chain constructor - attempt default.
+							instance = (SkinFactory) clazz.newInstance();
+						}
+					} catch (Exception e) {
+						log
+								.warn(
+										Messages
+												.getMessage(Messages.CREATING_SKIN_FACTORY_ERROR),
+										e);
+					} finally {
+						try {
+							input.close();
+						} catch (IOException e) {
+							// can be ignored
+						}
+
+					}
+				}
+				if (instance == null) {
+					instance = new SkinFactoryImpl();
+				}
+			instances.put(loader, instance);	
+			}
+
+		return instance;
+	}
+
+	/**
+	 * Get default {@link Skin} implementation.
+	 * @param context
+	 * @return
+	 */
+	public abstract Skin getDefaultSkin(FacesContext context);
+	
+	/**
+	 * Get current {@link Skin} implementation.
+	 * @param context
+	 * @return
+	 */
+	public abstract Skin getSkin(FacesContext context);
+	
+//	public abstract SkinConfiguration getSkinConfiguration(FacesContext context);
+	
+	
+	
+	/**
+	 * Get EL-enabled value. Return same string, if not el-expression.
+	 * Otherthise, return parsed and evaluated expression.
+	 * 
+	 * @param context -
+	 *            current Faces Context.
+	 * @param value -
+	 *            string to parse.
+	 * @return - interpreted el or unmodified value.
+	 */
+	protected static boolean isValueReference(String value) {
+		if (value == null)
+			return false;
+
+		int start = value.indexOf("#{");
+		if (start >= 0) {
+			int end = value.lastIndexOf('}');
+			if (end >= 0 && start < end) {
+				return true;
+			}
+		}
+		return false;
+	}
+	/**
+	 * Resource Uri for file with name of class for application-wide SkinFactory same as SPI definitions for common Java SAX, Jsf etc. factories
+	 */
+	public static final String SERVICE_RESOURCE = "META-INF/services/" + SkinFactory.class.getName();
+
+	/**
+	 * Name of web application init parameter for current skin . Can be simple
+	 * String for non-modified name, or EL-expression for calculate current
+	 * skin. If EL evaluated to <code>String</code> - used as skin name, if to
+	 * instance of {@link Skin } - used this instance. by default -
+	 * "org.exadel.chameleon.SKIN"
+	 */
+	public static final String SKIN_PARAMETER = "org.ajax4jsf.SKIN";
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/skin/SkinFactoryImpl.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/skin/SkinFactoryImpl.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/skin/SkinFactoryImpl.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,302 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.skin;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+import javax.faces.FacesException;
+import javax.faces.FactoryFinder;
+import javax.faces.application.Application;
+import javax.faces.application.ApplicationFactory;
+import javax.faces.context.FacesContext;
+import javax.faces.el.ReferenceSyntaxException;
+import javax.faces.el.ValueBinding;
+
+import org.ajax4jsf.framework.util.message.Messages;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * Implementation of {@link SkinFactory} with building skins from properties files.
+ * @author shura
+ *
+ */
+public class SkinFactoryImpl extends SkinFactory {
+
+	/**
+	 * Name of web application init parameter for current default
+	 * {@link javax.faces.render.RenderKit } interaction. by default -
+	 * org.exadel.chameleon.RENDERKIT_DEFINITION . TODO Possible Values
+	 */
+	public static final String RENDER_KIT_PARAMETER = "org.ajax4jsf.RENDERKIT_DEFINITION";
+
+	/**
+	 * Resource Uri for properties file with default values of skin parameters.
+	 */
+	private static final String DEFAULT_SKIN_PROPERTIES_RESOURCE = "META-INF/skins/DEFAULT.skin.properties";
+
+	private static final String DEFAULT_CONFIGURATION_RESOURCE = "META-INF/skins/DEFAULT.configuration.properties";
+	/**
+	 * Name of default skin . "DEFAULT" in this realisation.
+	 */
+	private static final String DEFAULT_SKIN_NAME = "DEFAULT";
+
+	/**
+	 * Path in jar to pre-defined vendor and custom user-defined skins
+	 * definitions. in this realisation "META-INF/skins/" for vendor , "" -
+	 * user-defined.
+	 */
+	private static final String[] SKINS_PATHS = { "META-INF/skins/%s.skin.properties", "%s.skin.properties" };
+	private static final String[] DEFAULT_SKIN_PATHS = { DEFAULT_SKIN_PROPERTIES_RESOURCE };
+
+	private static final String[] CONFIGURATIONS_PATHS = { "META-INF/skins/%s.configuration.properties", "%s.configuration.properties" };
+	private static final String[] DEFAULT_CONFIGURATION_PATHS = { "META-INF/skins/DEFAULT.configuration.properties" };
+	
+	private Map skins = Collections.synchronizedMap(new HashMap());
+	private Properties defaultSkinProperties = null;
+	private String skinName = null;
+	private ValueBinding skinBinding = null;
+	private static final Log log = LogFactory.getLog(SkinFactoryImpl.class);
+
+	protected Skin getSkinByName(Object currentSkinOrName) {
+		if (null == currentSkinOrName) {
+			throw new SkinNotFoundException(Messages
+					.getMessage(Messages.NULL_SKIN_NAME_ERROR));
+		}
+		// user binding return skin instance.
+		if (currentSkinOrName instanceof Skin) {
+			return (Skin) currentSkinOrName;
+		}
+		String currentSkinName = currentSkinOrName.toString();
+		Skin currentSkin = (Skin) skins.get(currentSkinName);
+		// LAZY creation for skins, since, in case of EL expressions
+		// for skin name, we don't can know all names of existing skins.
+		if (currentSkin == null) {
+			if (log.isDebugEnabled()) {
+				log.debug(Messages.getMessage(Messages.CREATE_SKIN_INFO,
+						currentSkinName));
+			}
+			currentSkin = buildSkin(currentSkinName, getDefaultSkinProperties());
+			skins.put(currentSkinName, currentSkin);
+		}
+	
+		return currentSkin;
+	}
+
+	public Skin getDefaultSkin(FacesContext context) {
+		return getSkinByName(DEFAULT_SKIN_NAME);
+	}
+	
+	public Skin getSkin(FacesContext context) {
+		// TODO - cache skin for current thread ? or for current Faces Lifecycle
+		// Phase ?
+		Object currentSkinOrName = getSkinOrName(context);
+		return getSkinByName(currentSkinOrName);
+	}
+
+	protected Properties getDefaultSkinProperties() {
+		if (defaultSkinProperties == null) {
+			defaultSkinProperties = loadDefaultProperties(DEFAULT_SKIN_PROPERTIES_RESOURCE);
+		}
+		return defaultSkinProperties;
+	}
+
+	/**
+	 * 
+	 */
+	private Properties loadDefaultProperties(String path) {
+		ClassLoader loader = Thread.currentThread().getContextClassLoader();
+		Properties defaultProperties = new Properties();
+		try {
+			Enumeration properties = loader
+					.getResources(path);
+			while (properties.hasMoreElements()) {
+				URL url = (URL) properties.nextElement();
+				InputStream propertyStream = null;
+				try {
+					propertyStream = url.openStream();
+					defaultProperties.load(propertyStream);
+				} catch (IOException e) {
+					// DO Nothing...
+					log.info(Messages.getMessage(
+							Messages.DEFAULT_PROPERTIES_NOT_FOUND_ERROR,
+							path), e);
+					continue;
+				} finally {
+					if (null != propertyStream) {
+						propertyStream.close();
+					}
+				}
+			}
+		} catch (IOException e) {
+			log.info(Messages.getMessage(
+					Messages.DEFAULT_PROPERTIES_NOT_FOUND_ERROR,
+					path), e);
+		}
+		return defaultProperties;
+	}
+
+	/**
+	 * Calculate name for current skin. For EL init parameter store value
+	 * binding for speed calculations.
+	 * 
+	 * @param context
+	 * @return name of currens skin from init parameter ( "DEFAULT" if no
+	 *         parameter ) or {@link Skin } as result of evaluation EL
+	 *         expression.
+	 */
+	protected Object getSkinOrName(FacesContext context) {
+		// Detect skin name
+		synchronized (this) {
+			if (skinName == null && skinBinding == null) {
+				String currentSkinName = context.getExternalContext()
+						.getInitParameter(SKIN_PARAMETER);
+				if (currentSkinName == null) {
+					// not set - usr default.
+					return DEFAULT_SKIN_NAME;
+				}
+				if (SkinFactory.isValueReference(currentSkinName)) {
+					// For EL expression as skin name
+					skinBinding = context.getApplication().createValueBinding(
+							currentSkinName);
+				} else {
+					skinName = currentSkinName;
+				}
+			}
+			// }
+		}
+		if (skinBinding != null) {
+			return skinBinding.getValue(context);
+		} else {
+			return skinName;
+		}
+	}
+
+	/**
+	 * Factory method for build skin from properties files. for given skin name,
+	 * search in classpath all resources with name 'name'.skin.properties and
+	 * append in content to default properties. First, get it from
+	 * META-INF/skins/ , next - from root package. for any place search order
+	 * determined by {@link java.lang.ClassLoader } realisation.
+	 * 
+	 * @param name
+	 *            name for builded skin.
+	 * @param defaultProperties
+	 * @return skin instance for current name
+	 * @throws SkinNotFoundException -
+	 *             if no skin properies found for name.
+	 */
+	protected Skin buildSkin(String name, Properties defaultProperties) throws SkinNotFoundException {
+		Map skinParams = loadProperties(name, defaultProperties,SKINS_PATHS);
+		return new SkinImpl(skinParams);
+	}
+
+	/**
+	 * @param name
+	 * @param defaultProperties
+	 * @return
+	 * @throws SkinNotFoundException
+	 * @throws FacesException
+	 * @throws ReferenceSyntaxException
+	 */
+	protected Map loadProperties(String name, Properties defaultProperties,String[] paths) throws SkinNotFoundException, FacesException, ReferenceSyntaxException {
+		ClassLoader loader = Thread.currentThread().getContextClassLoader();
+		// Get properties for concrete skin.
+		Properties skinProperties = new Properties(defaultProperties);
+		int loadedPropertiesCount = 0;
+		for (int i = 0; i < paths.length; i++) {
+			try {
+				String skinPropertiesLocation = paths[i].replaceAll("%s", name);
+				Enumeration properties = loader
+						.getResources(skinPropertiesLocation);
+				while (properties.hasMoreElements()) {
+					URL url = (URL) properties.nextElement();
+					InputStream propertyStream = null;
+					try {
+						propertyStream = url.openStream();
+						skinProperties.load(propertyStream);
+						loadedPropertiesCount++;
+					} catch (IOException e) {
+						log.warn(Messages
+								.getMessage(Messages.SKIN_PROPERTIES_IO_ERROR),
+								e);
+						continue;
+					} finally {
+						if (null != propertyStream) {
+							propertyStream.close();
+						}
+					}
+				}
+			} catch (IOException e) {
+				// Do nothing - we can only log error, and continue to load next
+				// property.
+				if (log.isInfoEnabled()) {
+					log.info(Messages
+							.getMessage(Messages.SKIN_PROPERTIES_IO_ERROR), e);
+				}
+			}
+		}
+		// TODO - read skin from property file in WEB-INF directory.
+		if (loadedPropertiesCount == 0) {
+			throw new SkinNotFoundException(Messages.getMessage(
+					Messages.SKIN_NOT_FOUND_ERROR, name));
+		}
+		// replace all EL-expressions by prepared ValueBinding ?
+		ApplicationFactory factory = (ApplicationFactory) FactoryFinder
+				.getFactory(FactoryFinder.APPLICATION_FACTORY);
+		Application app = factory.getApplication();
+		Map skinParams = new HashMap();
+		for (Enumeration e = skinProperties.propertyNames(); e
+				.hasMoreElements();) {
+			String propertyName = (String) e.nextElement();
+			String property = skinProperties.getProperty(propertyName);
+			if (null != property) {
+				int count = 0;
+				while ( property.startsWith("&")) {
+					property = skinProperties
+							.getProperty(property.substring(1));
+					if(null == property){
+						throw new FacesException(Messages.getMessage(Messages.SKIN_ILLEGAL_REFERENCE,propertyName));						
+					}
+					if(count++>1000){
+						throw new FacesException(Messages.getMessage(Messages.SKIN_CYCLIC_REFERENCE,propertyName));
+					}
+				}
+				if (SkinFactory.isValueReference(property)) {
+					skinParams.put(propertyName, app
+							.createValueBinding(property));
+				} else {
+					skinParams.put(propertyName, property);
+				}
+			}
+		}
+		return skinParams;
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/skin/SkinImpl.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/skin/SkinImpl.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/skin/SkinImpl.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,136 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.skin;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import javax.faces.context.FacesContext;
+import javax.faces.el.ValueBinding;
+
+/**
+ * Singleton ( in respect as collection of different skins ) for produce
+ * instances properties for all used skins.
+ * 
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:59:41 $
+ * 
+ */
+public class SkinImpl implements Skin {
+
+
+	public static final String RENDER_KIT_PARAMETER = "render.kit";
+	
+	public static final String REQUEST_HASH_CODE_PARAMETER = "org.ajax4jsf.skin.HASH_CODE"; 
+
+	private Map skinParams = new HashMap();
+	
+
+	/**
+	 * Skin can instantiate only by factory method.
+	 * 
+	 * @param skinName
+	 */
+	SkinImpl(Map properties) {
+		skinParams = properties;
+	}
+
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.skin.Skin#getRenderKitId(javax.faces.context.FacesContext)
+	 */
+	public String getRenderKitId(FacesContext context) {
+		return (String) getValueReference(context,skinParams.get(RENDER_KIT_PARAMETER));
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.skin.Skin#getParameter(javax.faces.context.FacesContext, java.lang.String)
+	 */
+	public Object getParameter(FacesContext context, String name) {
+		return getValueReference(context,skinParams.get(name));
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.skin.Skin#getParameter(javax.faces.context.FacesContext, java.lang.String, java.lang.String, java.lang.Object)
+	 */
+	public Object getParameter(FacesContext context, String name,  Object defaultValue) {
+		Object value = getValueReference(context, skinParams.get(name));
+		if(null == value){
+			value = defaultValue;
+		}
+		return value;
+	}
+	
+	
+	/**
+	 * Calculate concrete value for property - if it stored as @see ValueBinding ,
+	 * return interpreted value.
+	 * @param context
+	 * @param property
+	 * @return
+	 */
+	private Object getValueReference(FacesContext context, Object property) {
+		if (property instanceof ValueBinding) {
+			ValueBinding value = (ValueBinding) property;
+			return value.getValue(context);
+		}
+		return property;
+	}
+
+
+	public String toString() {
+		return skinParams.toString();
+	}
+
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.skin.Skin#containsProperty(java.lang.String)
+	 */
+	public boolean containsProperty(String name) {
+		// TODO Auto-generated method stub
+		return skinParams.containsKey(name);
+	}
+
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.skin.Skin#hashCode(javax.faces.context.FacesContext)
+	 */
+	public int hashCode(FacesContext context) {
+		Integer requestCode = (Integer) context.getExternalContext().getRequestMap().get(REQUEST_HASH_CODE_PARAMETER);
+		if(null == requestCode){
+			int hash = 0;
+			for (Iterator iter = skinParams.keySet().iterator(); iter.hasNext();) {
+				String key = (String) iter.next();
+				Object parameter = getParameter(context,key);
+				hash = 31*hash + (parameter != null ? parameter.hashCode() : 0);
+			}
+			requestCode = new Integer(hash);
+			// store hash for this skin as request-skope parameter - not calculate on next calls for same request
+			context.getExternalContext().getRequestMap().put(REQUEST_HASH_CODE_PARAMETER,requestCode);
+		}
+		return requestCode.intValue();
+	}
+	
+	
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/skin/SkinNotFoundException.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/skin/SkinNotFoundException.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/skin/SkinNotFoundException.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,48 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.skin;
+
+import javax.faces.FacesException;
+
+public class SkinNotFoundException extends FacesException {
+
+	public SkinNotFoundException() {
+		super();
+		// TODO Auto-generated constructor stub
+	}
+
+	public SkinNotFoundException(String arg0) {
+		super(arg0);
+		// TODO Auto-generated constructor stub
+	}
+
+	public SkinNotFoundException(Throwable arg0) {
+		super(arg0);
+		// TODO Auto-generated constructor stub
+	}
+
+	public SkinNotFoundException(String arg0, Throwable arg1) {
+		super(arg0, arg1);
+		// TODO Auto-generated constructor stub
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/skin/SkinPropertyResolver.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/skin/SkinPropertyResolver.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/skin/SkinPropertyResolver.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,152 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.skin;
+
+import javax.faces.context.FacesContext;
+import javax.faces.el.EvaluationException;
+import javax.faces.el.PropertyNotFoundException;
+import javax.faces.el.PropertyResolver;
+
+import org.ajax4jsf.framework.util.message.Messages;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * Resolve Skin propertyes.
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:59:41 $
+ *
+ */
+public class SkinPropertyResolver extends PropertyResolver {
+	
+	private static final Log log = LogFactory.getLog(SkinPropertyResolver.class);
+	private PropertyResolver parent = null;
+
+	/**
+	 * @param parent
+	 */
+	public SkinPropertyResolver(PropertyResolver parent) {
+		this.parent = parent;
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.el.PropertyResolver#getType(java.lang.Object, int)
+	 */
+	public Class getType(Object base, int index) throws EvaluationException, PropertyNotFoundException {
+		if (base instanceof Skin) {
+			if(log.isDebugEnabled()){
+				log.debug(Messages.getMessage(Messages.ACESSING_SKIN_PROPERTY_AS_ARRAY_ERROR));
+			}
+			return null;
+		}
+		return parent.getType(base, index);
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.el.PropertyResolver#getType(java.lang.Object, java.lang.Object)
+	 */
+	public Class getType(Object base, Object property) throws EvaluationException, PropertyNotFoundException {
+		if (base instanceof Skin) {
+			Skin skin = (Skin) base;
+			if(property instanceof String){
+				return skin.getParameter(FacesContext.getCurrentInstance(),(String) property).getClass();
+			}
+			if(log.isDebugEnabled()){
+				log.debug(Messages.getMessage(Messages.ACESSING_SKIN_PROPERTY_ERROR));
+			}
+			return null;
+		}
+		return parent.getType(base, property);
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.el.PropertyResolver#getValue(java.lang.Object, int)
+	 */
+	public Object getValue(Object base, int index) throws EvaluationException, PropertyNotFoundException {
+		if (base instanceof Skin) {
+			if(log.isDebugEnabled()){
+				log.debug(Messages.getMessage(Messages.ACESSING_SKIN_PROPERTY_AS_ARRAY_ERROR));
+			}
+			return null;
+		}
+		return parent.getValue(base, index);
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.el.PropertyResolver#getValue(java.lang.Object, java.lang.Object)
+	 */
+	public Object getValue(Object base, Object property) throws EvaluationException, PropertyNotFoundException {
+		if (base instanceof Skin) {
+			Skin skin = (Skin) base;
+			if(property instanceof String){
+				return skin.getParameter(FacesContext.getCurrentInstance(),(String) property);
+			}
+			if(log.isDebugEnabled()){
+				log.debug(Messages.getMessage(Messages.ACESSING_SKIN_PROPERTY_ERROR));
+			}
+			return null;
+		}
+		return parent.getValue(base, property);
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.el.PropertyResolver#isReadOnly(java.lang.Object, int)
+	 */
+	public boolean isReadOnly(Object base, int arg1) throws EvaluationException, PropertyNotFoundException {
+		if (base instanceof Skin) {
+			return true;
+		}
+		return parent.isReadOnly(base, arg1);
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.el.PropertyResolver#isReadOnly(java.lang.Object, java.lang.Object)
+	 */
+	public boolean isReadOnly(Object base, Object arg1) throws EvaluationException, PropertyNotFoundException {
+		if (base instanceof Skin) {
+			return true;
+		}
+		return parent.isReadOnly(base, arg1);
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.el.PropertyResolver#setValue(java.lang.Object, int, java.lang.Object)
+	 */
+	public void setValue(Object base, int index, Object value) throws EvaluationException, PropertyNotFoundException {
+		if (base instanceof Skin) {
+			throw new EvaluationException(Messages.getMessage(Messages.SKIN_PROPERTIES_READ_ONLY_ERROR));
+		}
+		parent.setValue(base, index, value);
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.el.PropertyResolver#setValue(java.lang.Object, java.lang.Object, java.lang.Object)
+	 */
+	public void setValue(Object base, Object property, Object value) throws EvaluationException, PropertyNotFoundException {
+		if (base instanceof Skin) {
+			throw new EvaluationException(Messages.getMessage(Messages.SKIN_PROPERTIES_READ_ONLY_ERROR));
+		}
+		parent.setValue(base, property, value);
+	}
+
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/skin/SkinVariableResolver.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/skin/SkinVariableResolver.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/skin/SkinVariableResolver.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,68 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.skin;
+
+import javax.faces.context.FacesContext;
+import javax.faces.el.EvaluationException;
+import javax.faces.el.VariableResolver;
+
+/**
+ * Resolve current skin as EL Variable. e.g. #{chameleonSkin['color'] } #{chameleonSkin.color}
+ * must be evaluated as Skin.getProperty(context,"color");
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:59:41 $
+ *
+ */
+public class SkinVariableResolver extends VariableResolver {
+
+
+	public static final String SKIN_VARIABLE_NAME = "vcpSkin";
+
+	public static final String CHAMELEON_VARIABLE_NAME = "vcp";
+
+	private VariableResolver parent = null;
+
+	public SkinVariableResolver(VariableResolver parent){
+		this.parent = parent;
+	}
+	/* (non-Javadoc)
+	 * @see javax.faces.el.VariableResolver#resolveVariable(javax.faces.context.FacesContext, java.lang.String)
+	 */
+	public Object resolveVariable(FacesContext context, String name)
+			throws EvaluationException {
+		
+		// TODO: Why do we need this?
+		if(SKIN_VARIABLE_NAME.equals(name)){
+			return SkinFactory.getInstance().getSkin(context);
+		} else if(CHAMELEON_VARIABLE_NAME.equals(name)){
+			return new VersionBean();
+		}
+		if (parent!=null) {
+			Object ret = null;
+			ret = parent.resolveVariable(context,name);
+			return ret;
+		} else {
+			return null;
+		}
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/skin/VersionBean.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/skin/VersionBean.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/skin/VersionBean.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,93 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.skin;
+
+/**
+ * Vendor and version information for A4J project
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:59:40 $
+ *
+ */
+public class VersionBean {
+	public static final String VENDOR = "ajax4jsf.dev.java.net";
+	public static final int MAJOR_VERSION = 1;
+	public static final int MINOR_VERSION = 0;
+	public static final String PROJECT_NAME = "Ajax4Jsf";
+	
+	/**
+	 * Revision version, must be auto modified by CVS 
+	 */
+	
+	public static final String REVISION = ".5 , CVS $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:59:40 $";//$Revision: 1.1.2.1 $ $Date: 2007/01/09 18:59:40 $";
+	public static final Version _version = new Version();
+	
+	public String getVendor() {
+		return VENDOR;
+	}
+	
+	public Object getVersion() {
+		return _version;
+	}
+
+	public String getProjectName() {
+		return PROJECT_NAME;
+	}
+	
+	/**
+	 * Class for incapsulate version info.
+	 * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+	 * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:59:40 $
+	 *
+	 */
+	private static class Version {
+		
+		public static final String _versionInfo = "v."+MAJOR_VERSION+"."+MINOR_VERSION+"."+REVISION;
+
+		public int getMajor() {
+			return MAJOR_VERSION;
+		}
+
+		public int getMinor() {
+			return MINOR_VERSION;
+		}
+		
+		public String getRevision() {
+			return REVISION;
+		}
+/* (non-Javadoc)
+		 * @see java.lang.Object#toString()
+		 */
+		public String toString() {
+			return _versionInfo;
+		}
+		
+	}
+
+
+	/* (non-Javadoc)
+	 * @see java.lang.Object#toString()
+	 */
+	public String toString() {
+		// TODO Auto-generated method stub
+		return getProjectName() + " by "+getVendor()+", version "+getVersion().toString();
+	}
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/skin/package.html
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/skin/package.html	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/skin/package.html	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,10 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Insert title here</title>
+</head>
+<body>
+
+</body>
+</html>
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/taglib/HtmlComponentTagBase.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/taglib/HtmlComponentTagBase.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/taglib/HtmlComponentTagBase.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,171 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.taglib;
+
+import javax.faces.component.UIComponent;
+
+import org.ajax4jsf.framework.renderer.RendererUtils.HTML;
+
+
+/**
+ * Base tag for all components with common Html attributes.
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:59:55 $
+ *
+ */
+public abstract class HtmlComponentTagBase extends UIComponentTagBase {
+    //HTML universal attributes
+    private String _dir;
+    private String _lang;
+    private String _style;
+    private String _styleClass;
+    private String _title;
+
+    //HTML event handler attributes
+    private String _onclick;
+    private String _ondblclick;
+    private String _onkeydown;
+    private String _onkeypress;
+    private String _onkeyup;
+    private String _onmousedown;
+    private String _onmousemove;
+    private String _onmouseout;
+    private String _onmouseover;
+    private String _onmouseup;
+
+    public void release() {
+        super.release();
+
+        _dir=null;
+        _lang=null;
+        _style=null;
+        _styleClass=null;
+        _title=null;
+        _onclick=null;
+        _ondblclick=null;
+        _onkeydown=null;
+        _onkeypress=null;
+        _onkeyup=null;
+        _onmousedown=null;
+        _onmousemove=null;
+        _onmouseout=null;
+        _onmouseover=null;
+        _onmouseup=null;
+
+    }
+
+    protected void setProperties(UIComponent component)
+    {
+        super.setProperties(component);
+        setStringProperty(component, HTML.dir_ATTRIBUTE, _dir);
+        setStringProperty(component, HTML.lang_ATTRIBUTE, _lang);
+        setStringProperty(component, HTML.style_ATTRIBUTE, _style);
+        setStringProperty(component, HTML.title_ATTRIBUTE, _title);
+        setStringProperty(component, HTML.STYLE_CLASS_ATTR, _styleClass);
+        setStringProperty(component, HTML.onclick_ATTRIBUTE, _onclick);
+        setStringProperty(component, HTML.ondblclick_ATTRIBUTE, _ondblclick);
+        setStringProperty(component, HTML.onmousedown_ATTRIBUTE, _onmousedown);
+        setStringProperty(component, HTML.onmouseup_ATTRIBUTE, _onmouseup);
+        setStringProperty(component, HTML.onmouseover_ATTRIBUTE, _onmouseover);
+        setStringProperty(component, HTML.onmousemove_ATTRIBUTE, _onmousemove);
+        setStringProperty(component, HTML.onmouseout_ATTRIBUTE, _onmouseout);
+        setStringProperty(component, HTML.onkeypress_ATTRIBUTE, _onkeypress);
+        setStringProperty(component, HTML.onkeydown_ATTRIBUTE, _onkeydown);
+        setStringProperty(component, HTML.onkeyup_ATTRIBUTE, _onkeyup);
+    }
+
+    public void setStyleClass(String styleClass)
+    {
+        _styleClass = styleClass;
+    }
+
+    public void setDir(String dir)
+    {
+        _dir = dir;
+    }
+
+    public void setLang(String lang)
+    {
+        _lang = lang;
+    }
+
+    public void setStyle(String style)
+    {
+        _style = style;
+    }
+
+    public void setTitle(String title)
+    {
+        _title = title;
+    }
+
+    public void setOnclick(String onclick)
+    {
+        _onclick = onclick;
+    }
+
+    public void setOndblclick(String ondblclick)
+    {
+        _ondblclick = ondblclick;
+    }
+
+    public void setOnmousedown(String onmousedown)
+    {
+        _onmousedown = onmousedown;
+    }
+
+    public void setOnmouseup(String onmouseup)
+    {
+        _onmouseup = onmouseup;
+    }
+
+    public void setOnmouseover(String onmouseover)
+    {
+        _onmouseover = onmouseover;
+    }
+
+    public void setOnmousemove(String onmousemove)
+    {
+        _onmousemove = onmousemove;
+    }
+
+    public void setOnmouseout(String onmouseout)
+    {
+        _onmouseout = onmouseout;
+    }
+
+    public void setOnkeypress(String onkeypress)
+    {
+        _onkeypress = onkeypress;
+    }
+
+    public void setOnkeydown(String onkeydown)
+    {
+        _onkeydown = onkeydown;
+    }
+
+    public void setOnkeyup(String onkeyup)
+    {
+        _onkeyup = onkeyup;
+    }
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/taglib/SimpleActionMethodBinding.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/taglib/SimpleActionMethodBinding.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/taglib/SimpleActionMethodBinding.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,93 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.taglib;
+
+import javax.faces.component.StateHolder;
+import javax.faces.context.FacesContext;
+import javax.faces.el.EvaluationException;
+import javax.faces.el.MethodBinding;
+import javax.faces.el.MethodNotFoundException;
+
+/**
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:59:56 $
+ *
+ */
+/**
+ * Simple method binding for constant action outcome.
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:59:56 $
+ *
+ */
+public class SimpleActionMethodBinding extends MethodBinding implements StateHolder {
+	// private static final Log log =
+	// LogFactory.getLog(SimpleActionMethodBinding.class);
+
+	private String _outcome;
+
+	public SimpleActionMethodBinding(String outcome) {
+		_outcome = outcome;
+	}
+
+	public Object invoke(FacesContext facescontext, Object aobj[])
+			throws EvaluationException, MethodNotFoundException {
+		return _outcome;
+	}
+
+	public Class getType(FacesContext facescontext)
+			throws MethodNotFoundException {
+		return String.class;
+	}
+
+	// ~ StateHolder support
+	// ----------------------------------------------------------------------------
+
+	private boolean _transient = false;
+
+	/**
+	 * Empty constructor, so that new instances can be created when restoring
+	 * state.
+	 */
+	public SimpleActionMethodBinding() {
+		_outcome = null;
+	}
+
+	public Object saveState(FacesContext facescontext) {
+		return _outcome;
+	}
+
+	public void restoreState(FacesContext facescontext, Object obj) {
+		_outcome = (String) obj;
+	}
+
+	public boolean isTransient() {
+		return _transient;
+	}
+
+	public void setTransient(boolean flag) {
+		_transient = flag;
+	}
+
+	public String toString() {
+		return _outcome;
+	}
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/taglib/UIComponentBodyTagBase.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/taglib/UIComponentBodyTagBase.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/taglib/UIComponentBodyTagBase.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,382 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.taglib;
+
+import javax.faces.component.ActionSource;
+import javax.faces.component.EditableValueHolder;
+import javax.faces.component.UICommand;
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIGraphic;
+import javax.faces.component.UIParameter;
+import javax.faces.component.UISelectBoolean;
+import javax.faces.component.ValueHolder;
+import javax.faces.context.FacesContext;
+import javax.faces.convert.Converter;
+import javax.faces.el.MethodBinding;
+import javax.faces.el.ValueBinding;
+import javax.faces.event.ActionEvent;
+import javax.faces.event.ValueChangeEvent;
+import javax.faces.webapp.UIComponentBodyTag;
+
+import org.ajax4jsf.framework.util.message.Messages;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * Base class with utility functions for all JSF tags. Get from apache MyFaces
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:59:55 $
+ *
+ */
+public abstract class UIComponentBodyTagBase extends UIComponentBodyTag {
+
+    //Special UIComponent attributes (ValueHolder, ConvertibleValueHolder)
+    private String _value;
+    private String _converter;
+    //attributes id, rendered and binding are handled by UIComponentTag
+
+    /**
+	 * @param converter The converter to set.
+	 */
+	public void setConverter(String converter) {
+		_converter = converter;
+	}
+
+	/**
+	 * @param value The value to set.
+	 */
+	public void setValue(String value) {
+		_value = value;
+	}
+
+	public void release() {
+        super.release();
+
+        _value=null;
+        _converter=null;
+    }
+
+    protected void setProperties(UIComponent component)
+    {
+        super.setProperties(component);
+
+
+        //rendererType already handled by UIComponentTag
+
+        setValueProperty(component, _value);
+        setConverterProperty(component, _converter);
+    }
+
+    // sub class helpers
+    private static final Log log = LogFactory.getLog(UIComponentBodyTagBase.class);
+
+    private static final Class[] VALIDATOR_ARGS = {FacesContext.class,
+                                                   UIComponent.class,
+                                                   Object.class};
+    private static final Class[] ACTION_LISTENER_ARGS = {ActionEvent.class};
+    private static final Class[] VALUE_LISTENER_ARGS = {ValueChangeEvent.class};
+
+    protected void setCharterProperty(UIComponent component, String propName, String value)
+    {
+        if (value != null)
+        {
+            if (isValueReference(value))
+            {
+                ValueBinding vb = getFacesContext().getApplication().createValueBinding(value);
+                component.setValueBinding(propName, vb);
+            }
+            else
+            {
+                //FIXME: should use converter maybe?
+                component.getAttributes().put(propName, new Character(value.charAt(0)));
+            }
+        }
+    }
+    protected void setIntegerProperty(UIComponent component, String propName, String value)
+    {
+        if (value != null)
+        {
+            if (isValueReference(value))
+            {
+                ValueBinding vb = getFacesContext().getApplication().createValueBinding(value);
+                component.setValueBinding(propName, vb);
+            }
+            else
+            {
+                //FIXME: should use converter maybe?
+                component.getAttributes().put(propName, Integer.valueOf(value));
+            }
+        }
+    }
+
+    protected void setLongProperty(UIComponent component, String propName, String value)
+    {
+        if (value != null)
+        {
+            if (isValueReference(value))
+            {
+                ValueBinding vb = getFacesContext().getApplication().createValueBinding(value);
+                component.setValueBinding(propName, vb);
+            }
+            else
+            {
+                //FIXME: should use converter maybe?
+                component.getAttributes().put(propName, Long.valueOf(value));
+            }
+        }
+    }
+
+    protected void setFloatProperty(UIComponent component, String propName, String value)
+    {
+        if (value != null)
+        {
+            if (isValueReference(value))
+            {
+                ValueBinding vb = getFacesContext().getApplication().createValueBinding(value);
+                component.setValueBinding(propName, vb);
+            }
+            else
+            {
+                //FIXME: should use converter maybe?
+                component.getAttributes().put(propName, Float.valueOf(value));
+            }
+        }
+    }
+    protected void setDoubleProperty(UIComponent component, String propName, String value)
+    {
+        if (value != null)
+        {
+            if (isValueReference(value))
+            {
+                ValueBinding vb = getFacesContext().getApplication().createValueBinding(value);
+                component.setValueBinding(propName, vb);
+            }
+            else
+            {
+                //FIXME: should use converter maybe?
+                component.getAttributes().put(propName, Double.valueOf(value));
+            }
+        }
+    }
+    
+    protected void setStringProperty(UIComponent component, String propName, String value)
+    {
+        if (value != null)
+        {
+            if (isValueReference(value))
+            {
+                ValueBinding vb = getFacesContext().getApplication().createValueBinding(value);
+                component.setValueBinding(propName, vb);
+            }
+            else
+            {
+                //TODO: Warning if component has no such property (with reflection)
+                component.getAttributes().put(propName, value);
+            }
+        }
+    }
+
+    protected void setBooleanProperty(UIComponent component, String propName, String value)
+    {
+        if (value != null)
+        {
+            if (isValueReference(value))
+            {
+                ValueBinding vb = getFacesContext().getApplication().createValueBinding(value);
+                component.setValueBinding(propName, vb);
+            }
+            else
+            {
+                //TODO: More sophisticated way to convert boolean value (yes/no, 1/0, on/off, etc.)
+                component.getAttributes().put(propName, Boolean.valueOf(value));
+            }
+        }
+    }
+
+    protected void setValueProperty(UIComponent component, String value)
+    {
+        if (value != null)
+        {
+            if (isValueReference(value))
+            {
+                ValueBinding vb = getFacesContext().getApplication().createValueBinding(value);
+                component.setValueBinding("value", vb);
+            }
+            else if (component instanceof UICommand)
+            {
+                ((UICommand)component).setValue(value);
+            }
+            else if (component instanceof UIParameter)
+            {
+                ((UIParameter)component).setValue(value);
+            }
+            else if (component instanceof UISelectBoolean)
+            {
+                ((UISelectBoolean)component).setValue(Boolean.valueOf(value));
+            }
+            else if (component instanceof UIGraphic)
+            {
+                ((UIGraphic)component).setValue(value);
+            }
+            //Since many input components are ValueHolders the special components
+            //must come first, ValueHolder is the last resort.
+            else if (component instanceof ValueHolder)
+            {
+                ((ValueHolder)component).setValue(value);
+            }
+            else
+            {
+                log.error(Messages.getMessage(Messages.NO_VALUE_HOLDER_ERROR, component.getClass().getName()));
+            }
+        }
+    }
+
+    protected void setConverterProperty(UIComponent component, String value)
+    {
+        if (value != null)
+        {
+            if (component instanceof ValueHolder)
+            {
+                if (isValueReference(value))
+                {
+                    ValueBinding vb = getFacesContext().getApplication().createValueBinding(value);
+                    component.setValueBinding("converter", vb);
+                }
+                else
+                {
+                    FacesContext facesContext = FacesContext.getCurrentInstance();
+                    Converter converter = facesContext.getApplication().createConverter(value);
+                    ((ValueHolder)component).setConverter(converter);
+                }
+            }
+            else
+            {
+                log.error(Messages.getMessage(Messages.NO_VALUE_HOLDER_ERROR, component.getClass().getName()));
+            }
+        }
+    }
+
+    protected void setValidatorProperty(UIComponent component, String validator)
+    {
+        if (validator != null)
+        {
+            if (!(component instanceof EditableValueHolder))
+            {
+                throw new IllegalArgumentException(Messages.getMessage(Messages.NO_EDITABLE_VALUE_HOLDER_ERROR, component.getId()));
+            }
+            if (isValueReference(validator))
+            {
+                MethodBinding mb = getFacesContext().getApplication().createMethodBinding(validator,
+                                                                                VALIDATOR_ARGS);
+                ((EditableValueHolder)component).setValidator(mb);
+            }
+            else
+            {
+                log.error(Messages.getMessage(Messages.INVALID_VALIDATION_EXPRESSION, component.getId(), validator));
+            }
+        }
+    }
+
+    protected void setActionProperty(UIComponent component, String action)
+    {
+        if (action != null)
+        {
+            if (!(component instanceof ActionSource))
+            {
+                throw new IllegalArgumentException(Messages.getMessage(Messages.NO_ACTION_SOURCE_ERROR, component.getClientId(getFacesContext())));
+            }
+            MethodBinding mb;
+            if (isValueReference(action))
+            {
+                mb = getFacesContext().getApplication().createMethodBinding(action, null);
+            }
+            else
+            {
+                mb = new SimpleActionMethodBinding(action);
+            }
+            ((ActionSource)component).setAction(mb);
+        }
+    }
+
+    protected void setActionListenerProperty(UIComponent component, String actionListener)
+    {
+        if (actionListener != null)
+        {
+            if (!(component instanceof ActionSource))
+            {
+                throw new IllegalArgumentException(Messages.getMessage(Messages.NO_ACTION_SOURCE_ERROR, component.getClientId(getFacesContext())));
+            }
+            if (isValueReference(actionListener))
+            {
+                MethodBinding mb = getFacesContext().getApplication().createMethodBinding(actionListener,
+                                                                                ACTION_LISTENER_ARGS);
+                ((ActionSource)component).setActionListener(mb);
+            }
+            else
+            {
+                log.error(Messages.getMessage(Messages.INVALID_ACTION_LISTENER, component.getClientId(getFacesContext()), actionListener));
+            }
+        }
+    }
+
+    protected void setValueChangedListenerProperty(UIComponent component, String valueChangedListener)
+    {
+        if (valueChangedListener != null)
+        {
+            if (!(component instanceof EditableValueHolder))
+            {
+                throw new IllegalArgumentException(Messages.getMessage(Messages.NO_EDITABLE_VALUE_HOLDER_ERROR, component.getClientId(getFacesContext())));
+            }
+            if (isValueReference(valueChangedListener))
+            {
+                MethodBinding mb = getFacesContext().getApplication().createMethodBinding(valueChangedListener,
+                                                                                VALUE_LISTENER_ARGS);
+                ((EditableValueHolder)component).setValueChangeListener(mb);
+            }
+            else
+            {
+                log.error(Messages.getMessage(Messages.INVALID_VALUE_CHANGE_LISTENER, component.getClientId(getFacesContext()), valueChangedListener));
+            }
+        }
+    }
+
+    protected void setValueBinding(UIComponent component,
+                                   String propName,
+                                   String value)
+    {
+        if (value != null)
+        {
+            if (isValueReference(value))
+            {
+                ValueBinding vb = getFacesContext().getApplication().createValueBinding(value);
+                component.setValueBinding(propName, vb);
+            }
+            else
+            {
+                throw new IllegalArgumentException(Messages.getMessage(Messages.NO_VALUE_REFERENCE_ERROR, new Object[]{component.getId(), propName, value}));
+            }
+        }
+    }
+
+
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/taglib/UIComponentTagBase.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/taglib/UIComponentTagBase.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/taglib/UIComponentTagBase.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,383 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.taglib;
+
+import javax.faces.component.ActionSource;
+import javax.faces.component.EditableValueHolder;
+import javax.faces.component.UICommand;
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIGraphic;
+import javax.faces.component.UIParameter;
+import javax.faces.component.UISelectBoolean;
+import javax.faces.component.ValueHolder;
+import javax.faces.context.FacesContext;
+import javax.faces.convert.Converter;
+import javax.faces.el.MethodBinding;
+import javax.faces.el.ValueBinding;
+import javax.faces.event.ActionEvent;
+import javax.faces.event.ValueChangeEvent;
+import javax.faces.webapp.UIComponentTag;
+
+import org.ajax4jsf.framework.util.message.Messages;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * Base class with utility functions for all JSF tags. Get from apache MyFaces
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:59:55 $
+ *
+ */
+public abstract class UIComponentTagBase extends UIComponentTag {
+
+    //Special UIComponent attributes (ValueHolder, ConvertibleValueHolder)
+    private String _value;
+    private String _converter;
+    //attributes id, rendered and binding are handled by UIComponentTag
+
+    /**
+	 * @param converter The converter to set.
+	 */
+	public void setConverter(String converter) {
+		_converter = converter;
+	}
+
+	/**
+	 * @param value The value to set.
+	 */
+	public void setValue(String value) {
+		_value = value;
+	}
+
+	public void release() {
+        super.release();
+
+        _value=null;
+        _converter=null;
+    }
+
+    protected void setProperties(UIComponent component)
+    {
+        super.setProperties(component);
+
+
+        //rendererType already handled by UIComponentTag
+
+        setValueProperty(component, _value);
+        setConverterProperty(component, _converter);
+    }
+
+    // sub class helpers
+    private static final Log log = LogFactory.getLog(UIComponentTagBase.class);
+
+    private static final Class[] VALIDATOR_ARGS = {FacesContext.class,
+                                                   UIComponent.class,
+                                                   Object.class};
+    private static final Class[] ACTION_LISTENER_ARGS = {ActionEvent.class};
+    private static final Class[] VALUE_LISTENER_ARGS = {ValueChangeEvent.class};
+
+    protected void setCharterProperty(UIComponent component, String propName, String value)
+    {
+        if (value != null)
+        {
+            if (isValueReference(value))
+            {
+                ValueBinding vb = getFacesContext().getApplication().createValueBinding(value);
+                component.setValueBinding(propName, vb);
+            }
+            else
+            {
+                //FIXME: should use converter maybe?
+                component.getAttributes().put(propName, new Character(value.charAt(0)));
+            }
+        }
+    }
+    protected void setIntegerProperty(UIComponent component, String propName, String value)
+    {
+        if (value != null)
+        {
+            if (isValueReference(value))
+            {
+                ValueBinding vb = getFacesContext().getApplication().createValueBinding(value);
+                component.setValueBinding(propName, vb);
+            }
+            else
+            {
+                //FIXME: should use converter maybe?
+                component.getAttributes().put(propName, Integer.valueOf(value));
+            }
+        }
+    }
+
+    protected void setLongProperty(UIComponent component, String propName, String value)
+    {
+        if (value != null)
+        {
+            if (isValueReference(value))
+            {
+                ValueBinding vb = getFacesContext().getApplication().createValueBinding(value);
+                component.setValueBinding(propName, vb);
+            }
+            else
+            {
+                //FIXME: should use converter maybe?
+                component.getAttributes().put(propName, Long.valueOf(value));
+            }
+        }
+    }
+
+    protected void setFloatProperty(UIComponent component, String propName, String value)
+    {
+        if (value != null)
+        {
+            if (isValueReference(value))
+            {
+                ValueBinding vb = getFacesContext().getApplication().createValueBinding(value);
+                component.setValueBinding(propName, vb);
+            }
+            else
+            {
+                //FIXME: should use converter maybe?
+                component.getAttributes().put(propName, Float.valueOf(value));
+            }
+        }
+    }
+    protected void setDoubleProperty(UIComponent component, String propName, String value)
+    {
+        if (value != null)
+        {
+            if (isValueReference(value))
+            {
+                ValueBinding vb = getFacesContext().getApplication().createValueBinding(value);
+                component.setValueBinding(propName, vb);
+            }
+            else
+            {
+                //FIXME: should use converter maybe?
+                component.getAttributes().put(propName, Double.valueOf(value));
+            }
+        }
+    }
+    
+    protected void setStringProperty(UIComponent component, String propName, String value)
+    {
+        if (value != null)
+        {
+            if (isValueReference(value))
+            {
+                ValueBinding vb = getFacesContext().getApplication().createValueBinding(value);
+                component.setValueBinding(propName, vb);
+            }
+            else
+            {
+                //TODO: Warning if component has no such property (with reflection)
+                component.getAttributes().put(propName, value);
+            }
+        }
+    }
+
+    protected void setBooleanProperty(UIComponent component, String propName, String value)
+    {
+        if (value != null)
+        {
+            if (isValueReference(value))
+            {
+                ValueBinding vb = getFacesContext().getApplication().createValueBinding(value);
+                component.setValueBinding(propName, vb);
+            }
+            else
+            {
+                //TODO: More sophisticated way to convert boolean value (yes/no, 1/0, on/off, etc.)
+                component.getAttributes().put(propName, Boolean.valueOf(value));
+            }
+        }
+    }
+
+    protected void setValueProperty(UIComponent component, String value)
+    {
+        if (value != null)
+        {
+            if (isValueReference(value))
+            {
+                ValueBinding vb = getFacesContext().getApplication().createValueBinding(value);
+                component.setValueBinding("value", vb);
+            }
+            else if (component instanceof UICommand)
+            {
+                ((UICommand)component).setValue(value);
+            }
+            else if (component instanceof UIParameter)
+            {
+                ((UIParameter)component).setValue(value);
+            }
+            else if (component instanceof UISelectBoolean)
+            {
+                ((UISelectBoolean)component).setValue(Boolean.valueOf(value));
+            }
+            else if (component instanceof UIGraphic)
+            {
+                ((UIGraphic)component).setValue(value);
+            }
+            //Since many input components are ValueHolders the special components
+            //must come first, ValueHolder is the last resort.
+            else if (component instanceof ValueHolder)
+            {
+                ((ValueHolder)component).setValue(value);
+            }
+            else
+            {
+            	component.getAttributes().put("value", value);
+            }
+        }
+    }
+
+    protected void setConverterProperty(UIComponent component, String value)
+    {
+        if (value != null)
+        {
+            if (component instanceof ValueHolder)
+            {
+                if (isValueReference(value))
+                {
+                    ValueBinding vb = getFacesContext().getApplication().createValueBinding(value);
+                    component.setValueBinding("converter", vb);
+                }
+                else
+                {
+                    FacesContext facesContext = FacesContext.getCurrentInstance();
+                    Converter converter = facesContext.getApplication().createConverter(value);
+                    ((ValueHolder)component).setConverter(converter);
+                }
+            }
+            else
+            {
+                log.error(Messages.getMessage(Messages.NO_VALUE_HOLDER_ERROR, component.getClass().getName()));
+            }
+        }
+    }
+
+    protected void setValidatorProperty(UIComponent component, String validator)
+    {
+        if (validator != null)
+        {
+            if (!(component instanceof EditableValueHolder))
+            {
+                throw new IllegalArgumentException(Messages.getMessage(Messages.NO_EDITABLE_VALUE_HOLDER_ERROR, component.getId()));
+            }
+            if (isValueReference(validator))
+            {
+                MethodBinding mb = getFacesContext().getApplication().createMethodBinding(validator,
+                                                                                VALIDATOR_ARGS);
+                ((EditableValueHolder)component).setValidator(mb);
+            }
+            else
+            {
+                log.error(Messages.getMessage(Messages.INVALID_VALIDATION_EXPRESSION, component.getId(), validator));
+            }
+        }
+    }
+
+    protected void setActionProperty(UIComponent component, String action)
+    {
+        if (action != null)
+        {
+            if (!(component instanceof ActionSource))
+            {
+                throw new IllegalArgumentException(Messages.getMessage(Messages.NO_ACTION_SOURCE_ERROR, component.getClientId(getFacesContext())));
+            }
+            MethodBinding mb;
+            if (isValueReference(action))
+            {
+                mb = getFacesContext().getApplication().createMethodBinding(action, null);
+            }
+            else
+            {
+                mb = new SimpleActionMethodBinding(action);
+            }
+            ((ActionSource)component).setAction(mb);
+        }
+    }
+
+    protected void setActionListenerProperty(UIComponent component, String actionListener)
+    {
+        if (actionListener != null)
+        {
+            if (!(component instanceof ActionSource))
+            {
+                throw new IllegalArgumentException(Messages.getMessage(Messages.NO_ACTION_SOURCE_ERROR, component.getClientId(getFacesContext())));
+            }
+            if (isValueReference(actionListener))
+            {
+                MethodBinding mb = getFacesContext().getApplication().createMethodBinding(actionListener,
+                                                                                ACTION_LISTENER_ARGS);
+                ((ActionSource)component).setActionListener(mb);
+            }
+            else
+            {
+                log.error(Messages.getMessage(Messages.INVALID_ACTION_LISTENER, component.getClientId(getFacesContext()), actionListener));
+            }
+        }
+    }
+
+    protected void setValueChangedListenerProperty(UIComponent component, String valueChangedListener)
+    {
+        if (valueChangedListener != null)
+        {
+            if (!(component instanceof EditableValueHolder))
+            {
+                throw new IllegalArgumentException(Messages.getMessage(Messages.NO_EDITABLE_VALUE_HOLDER_ERROR, component.getClientId(getFacesContext())));
+            }
+            if (isValueReference(valueChangedListener))
+            {
+                MethodBinding mb = getFacesContext().getApplication().createMethodBinding(valueChangedListener,
+                                                                                VALUE_LISTENER_ARGS);
+                ((EditableValueHolder)component).setValueChangeListener(mb);
+            }
+            else
+            {
+                log.error(Messages.getMessage(Messages.INVALID_VALUE_CHANGE_LISTENER, component.getClientId(getFacesContext()), valueChangedListener));
+            }
+        }
+    }
+
+    protected void setValueBinding(UIComponent component,
+                                   String propName,
+                                   String value)
+    {
+        if (value != null)
+        {
+            if (isValueReference(value))
+            {
+                ValueBinding vb = getFacesContext().getApplication().createValueBinding(value);
+                component.setValueBinding(propName, vb);
+            }
+            else
+            {
+                throw new IllegalArgumentException(Messages.getMessage(Messages.NO_VALUE_REFERENCE_ERROR, new Object[]{component.getId(), propName, value}));
+            }
+        }
+    }
+
+
+
+}
+

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/GifEncoder.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/GifEncoder.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/GifEncoder.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,566 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.util;
+
+import java.awt.Image;
+import java.awt.image.ColorModel;
+import java.awt.image.IndexColorModel;
+import java.awt.image.PixelGrabber;
+import java.io.IOException;
+import java.io.OutputStream;
+
+import org.ajax4jsf.framework.util.message.Messages;
+
+/**  GifEncoder - writes out an image as a GIF.
+ *
+ * Transparency handling and variable bit size courtesy of Jack Palevich.
+ *
+ * Copyright (C) 1996 by Jef Poskanzer <jef at acme.com>.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * Visit the ACME Labs Java page for up-to-date versions of this and other
+ * fine Java utilities: http://www.acme.com/java/
+ */
+
+public class GifEncoder {
+
+	private boolean interlace = false;
+
+	private int width, height;
+
+	private byte[] pixels;
+
+	private byte[] r, g, b; // the color look-up table
+
+	private int pixelIndex;
+
+	private int numPixels;
+
+	private int transparentPixel = -1; // hpm
+
+	/**
+	 *  Constructs a new GifEncoder. 
+	 * @param width	The image width.
+	 * @param height	The image height.
+	 * @param pixels	The pixel data.
+	 * @param r		The red look-up table.
+	 * @param g		The green look-up table.
+	 * @param b		The blue look-up table.
+	 */
+	public GifEncoder(int width, int height, byte[] pixels, byte[] r, byte[] g,	byte[] b) {
+		this.width = width;
+		this.height = height;
+		this.pixels = pixels;
+		this.r = r;
+		this.g = g;
+		this.b = b;
+		interlace = false;
+		pixelIndex = 0;
+		numPixels = width * height;
+	}
+
+	/** Constructs a new GifEncoder using an 8-bit AWT Image.
+	 The image is assumed to be fully loaded. */
+	public GifEncoder(Image img) {
+		width = img.getWidth(null);
+		height = img.getHeight(null);
+		pixels = new byte[width * height];
+		PixelGrabber pg = new PixelGrabber(img, 0, 0, width, height, false);
+		try {
+			pg.grabPixels();
+		} catch (InterruptedException e) {
+			System.err.println(e);
+		}
+		ColorModel cm = pg.getColorModel();
+		if (cm instanceof IndexColorModel) {
+			pixels = (byte[]) (pg.getPixels());
+			// hpm
+			IndexColorModel icm = (IndexColorModel) cm;
+			setTransparentPixel(icm.getTransparentPixel());
+		} else
+			throw new IllegalArgumentException(Messages.getMessage(Messages.IMAGE_ERROR));
+		IndexColorModel m = (IndexColorModel) cm;
+		int mapSize = m.getMapSize();
+		r = new byte[mapSize];
+		g = new byte[mapSize];
+		b = new byte[mapSize];
+		m.getReds(r);
+		m.getGreens(g);
+		m.getBlues(b);
+		interlace = false;
+		pixelIndex = 0;
+		numPixels = width * height;
+	}
+
+	/** Saves the image as a GIF file. */
+	public void write(OutputStream out) throws IOException {
+		// Figure out how many bits to use.
+		int numColors = r.length;
+		int BitsPerPixel;
+		if (numColors <= 2)
+			BitsPerPixel = 1;
+		else if (numColors <= 4)
+			BitsPerPixel = 2;
+		else if (numColors <= 16)
+			BitsPerPixel = 4;
+		else
+			BitsPerPixel = 8;
+
+		int ColorMapSize = 1 << BitsPerPixel;
+		byte[] reds = new byte[ColorMapSize];
+		byte[] grns = new byte[ColorMapSize];
+		byte[] blus = new byte[ColorMapSize];
+		for (int i = 0; i < numColors; i++) {
+			reds[i] = r[i];
+			grns[i] = g[i];
+			blus[i] = b[i];
+		}
+
+		// hpm
+		GIFEncode(out, width, height, interlace, (byte) 0, getTransparentPixel(), BitsPerPixel, reds, grns, blus);
+	}
+
+	// hpm
+	public void setTransparentPixel(int pixel) {
+		transparentPixel = pixel;
+	}
+
+	// hpm
+	public int getTransparentPixel() {
+		return transparentPixel;
+	}
+
+	static void writeString(OutputStream out, String str) throws IOException {
+		byte[] buf = str.getBytes();
+		out.write(buf);
+	}
+
+	// Adapted from ppmtogif, which is based on GIFENCOD by David
+	// Rowley <mgardi at watdscu.waterloo.edu>.  Lempel-Zim compression
+	// based on "compress".
+
+	int Width, Height;
+
+	boolean Interlace;
+
+	void GIFEncode(OutputStream outs, int Width, int Height, boolean Interlace,
+			byte Background, int Transparent, int BitsPerPixel, byte[] Red,
+			byte[] Green, byte[] Blue) throws IOException {
+		byte B;
+		int LeftOfs, TopOfs;
+		int ColorMapSize;
+		int InitCodeSize;
+		int i;
+
+		this.Width = Width;
+		this.Height = Height;
+		this.Interlace = Interlace;
+		ColorMapSize = 1 << BitsPerPixel;
+		LeftOfs = TopOfs = 0;
+
+		// The initial code size
+		if (BitsPerPixel <= 1)
+			InitCodeSize = 2;
+		else
+			InitCodeSize = BitsPerPixel;
+
+		// Write the Magic header
+		writeString(outs, "GIF89a");
+
+		// Write out the screen width and height
+		Putword(Width, outs);
+		Putword(Height, outs);
+
+		// Indicate that there is a global colour map
+		B = (byte) 0x80; // Yes, there is a color map
+		// OR in the resolution
+		B |= (byte) ((8 - 1) << 4);
+		// Not sorted
+		// OR in the Bits per Pixel
+		B |= (byte) ((BitsPerPixel - 1));
+
+		// Write it out
+		Putbyte(B, outs);
+
+		// Write out the Background colour
+		Putbyte(Background, outs);
+
+		// Pixel aspect ratio - 1:1.
+		//Putbyte( (byte) 49, outs );
+		// Java's GIF reader currently has a bug, if the aspect ratio byte is
+		// not zero it throws an ImageFormatException.  It doesn't know that
+		// 49 means a 1:1 aspect ratio.  Well, whatever, zero works with all
+		// the other decoders I've tried so it probably doesn't hurt.
+		Putbyte((byte) 0, outs);
+
+		// Write out the Global Colour Map
+		for (i = 0; i < ColorMapSize; ++i) {
+			Putbyte(Red[i], outs);
+			Putbyte(Green[i], outs);
+			Putbyte(Blue[i], outs);
+		}
+
+		// Write out extension for transparent colour index, if necessary.
+		if (Transparent != -1) {
+			Putbyte((byte) '!', outs);
+			Putbyte((byte) 0xf9, outs);
+			Putbyte((byte) 4, outs);
+			Putbyte((byte) 1, outs);
+			Putbyte((byte) 0, outs);
+			Putbyte((byte) 0, outs);
+			Putbyte((byte) Transparent, outs);
+			Putbyte((byte) 0, outs);
+		}
+
+		// Write an Image separator
+		Putbyte((byte) ',', outs);
+
+		// Write the Image header
+		Putword(LeftOfs, outs);
+		Putword(TopOfs, outs);
+		Putword(Width, outs);
+		Putword(Height, outs);
+
+		// Write out whether or not the image is interlaced
+		if (Interlace)
+			Putbyte((byte) 0x40, outs);
+		else
+			Putbyte((byte) 0x00, outs);
+
+		// Write out the initial code size
+		Putbyte((byte) InitCodeSize, outs);
+
+		// Go and actually compress the data
+		compress(InitCodeSize + 1, outs);
+
+		// Write out a Zero-length packet (to end the series)
+		Putbyte((byte) 0, outs);
+
+		// Write the GIF file terminator
+		Putbyte((byte) ';', outs);
+	}
+
+	static final int EOF = -1;
+
+	// Return the next pixel from the image
+	int GIFNextPixel() throws IOException {
+		if (pixelIndex == numPixels)
+			return EOF;
+		else
+			return ((byte[]) pixels)[pixelIndex++] & 0xff;
+	}
+
+	// Write out a word to the GIF file
+	void Putword(int w, OutputStream outs) throws IOException {
+		Putbyte((byte) (w & 0xff), outs);
+		Putbyte((byte) ((w >> 8) & 0xff), outs);
+	}
+
+	// Write out a byte to the GIF file
+	void Putbyte(byte b, OutputStream outs) throws IOException {
+		outs.write(b);
+	}
+
+	// GIFCOMPR.C       - GIF Image compression routines
+	//
+	// Lempel-Ziv compression based on 'compress'.  GIF modifications by
+	// David Rowley (mgardi at watdcsu.waterloo.edu)
+
+	// General DEFINEs
+
+	static final int BITS = 12;
+
+	static final int HSIZE = 5003; // 80% occupancy
+
+	// GIF Image compression - modified 'compress'
+	//
+	// Based on: compress.c - File compression ala IEEE Computer, June 1984.
+	//
+	// By Authors:  Spencer W. Thomas      (decvax!harpo!utah-cs!utah-gr!thomas)
+	//              Jim McKie              (decvax!mcvax!jim)
+	//              Steve Davies           (decvax!vax135!petsd!peora!srd)
+	//              Ken Turkowski          (decvax!decwrl!turtlevax!ken)
+	//              James A. Woods         (decvax!ihnp4!ames!jaw)
+	//              Joe Orost              (decvax!vax135!petsd!joe)
+
+	int n_bits; // number of bits/code
+
+	int maxbits = BITS; // user settable max # bits/code
+
+	int maxcode; // maximum code, given n_bits
+
+	int maxmaxcode = 1 << BITS; // should NEVER generate this code
+
+	final int MAXCODE(int n_bits) {
+		return (1 << n_bits) - 1;
+	}
+
+	int[] htab = new int[HSIZE];
+
+	int[] codetab = new int[HSIZE];
+
+	int hsize = HSIZE; // for dynamic table sizing
+
+	int free_ent = 0; // first unused entry
+
+	// block compression parameters -- after all codes are used up,
+	// and compression rate changes, start over.
+	boolean clear_flg = false;
+
+	// Algorithm:  use open addressing double hashing (no chaining) on the
+	// prefix code / next character combination.  We do a variant of Knuth's
+	// algorithm D (vol. 3, sec. 6.4) along with G. Knott's relatively-prime
+	// secondary probe.  Here, the modular division first probe is gives way
+	// to a faster exclusive-or manipulation.  Also do block compression with
+	// an adaptive reset, whereby the code table is cleared when the compression
+	// ratio decreases, but after the table fills.  The variable-length output
+	// codes are re-sized at this point, and a special CLEAR code is generated
+	// for the decompressor.  Late addition:  construct the table according to
+	// file size for noticeable speed improvement on small files.  Please direct
+	// questions about this implementation to ames!jaw.
+
+	int g_init_bits;
+
+	int ClearCode;
+
+	int EOFCode;
+
+	void compress(int init_bits, OutputStream outs) throws IOException {
+		int fcode;
+		int i /* = 0 */;
+		int c;
+		int ent;
+		int disp;
+		int hsize_reg;
+		int hshift;
+
+		// Set up the globals:  g_init_bits - initial number of bits
+		g_init_bits = init_bits;
+
+		// Set up the necessary values
+		clear_flg = false;
+		n_bits = g_init_bits;
+		maxcode = MAXCODE(n_bits);
+
+		ClearCode = 1 << (init_bits - 1);
+		EOFCode = ClearCode + 1;
+		free_ent = ClearCode + 2;
+
+		char_init();
+
+		ent = GIFNextPixel();
+
+		hshift = 0;
+		for (fcode = hsize; fcode < 65536; fcode *= 2)
+			++hshift;
+		hshift = 8 - hshift; // set hash code range bound
+
+		hsize_reg = hsize;
+		cl_hash(hsize_reg); // clear hash table
+
+		output(ClearCode, outs);
+
+		outer_loop: while ((c = GIFNextPixel()) != EOF) {
+			fcode = (c << maxbits) + ent;
+			i = (c << hshift) ^ ent; // xor hashing
+
+			if (htab[i] == fcode) {
+				ent = codetab[i];
+				continue;
+			} else if (htab[i] >= 0) // non-empty slot
+			{
+				disp = hsize_reg - i; // secondary hash (after G. Knott)
+				if (i == 0)
+					disp = 1;
+				do {
+					if ((i -= disp) < 0)
+						i += hsize_reg;
+
+					if (htab[i] == fcode) {
+						ent = codetab[i];
+						continue outer_loop;
+					}
+				} while (htab[i] >= 0);
+			}
+			output(ent, outs);
+			ent = c;
+			if (free_ent < maxmaxcode) {
+				codetab[i] = free_ent++; // code -> hashtable
+				htab[i] = fcode;
+			} else
+				cl_block(outs);
+		}
+		// Put out the final code.
+		output(ent, outs);
+		output(EOFCode, outs);
+	}
+
+	// output
+	//
+	// Output the given code.
+	// Inputs:
+	//      code:   A n_bits-bit integer.  If == -1, then EOF.  This assumes
+	//              that n_bits =< wordsize - 1.
+	// Outputs:
+	//      Outputs code to the file.
+	// Assumptions:
+	//      Chars are 8 bits long.
+	// Algorithm:
+	//      Maintain a BITS character long buffer (so that 8 codes will
+	// fit in it exactly).  Use the VAX insv instruction to insert each
+	// code in turn.  When the buffer fills up empty it and start over.
+
+	int cur_accum = 0;
+
+	int cur_bits = 0;
+
+	int masks[] = { 0x0000, 0x0001, 0x0003, 0x0007, 0x000F, 0x001F, 0x003F,
+			0x007F, 0x00FF, 0x01FF, 0x03FF, 0x07FF, 0x0FFF, 0x1FFF, 0x3FFF,
+			0x7FFF, 0xFFFF };
+
+	void output(int code, OutputStream outs) throws IOException {
+		cur_accum &= masks[cur_bits];
+
+		if (cur_bits > 0)
+			cur_accum |= (code << cur_bits);
+		else
+			cur_accum = code;
+
+		cur_bits += n_bits;
+
+		while (cur_bits >= 8) {
+			char_out((byte) (cur_accum & 0xff), outs);
+			cur_accum >>= 8;
+			cur_bits -= 8;
+		}
+
+		// If the next entry is going to be too big for the code size,
+		// then increase it, if possible.
+		if (free_ent > maxcode || clear_flg) {
+			if (clear_flg) {
+				maxcode = MAXCODE(n_bits = g_init_bits);
+				clear_flg = false;
+			} else {
+				++n_bits;
+				if (n_bits == maxbits)
+					maxcode = maxmaxcode;
+				else
+					maxcode = MAXCODE(n_bits);
+			}
+		}
+
+		if (code == EOFCode) {
+			// At EOF, write the rest of the buffer.
+			while (cur_bits > 0) {
+				char_out((byte) (cur_accum & 0xff), outs);
+				cur_accum >>= 8;
+				cur_bits -= 8;
+			}
+
+			flush_char(outs);
+		}
+	}
+
+	// Clear out the hash table
+
+	// table clear for block compress
+	void cl_block(OutputStream outs) throws IOException {
+		cl_hash(hsize);
+		free_ent = ClearCode + 2;
+		clear_flg = true;
+
+		output(ClearCode, outs);
+	}
+
+	// reset code table
+	void cl_hash(int hsize) {
+		for (int i = 0; i < hsize; ++i)
+			htab[i] = -1;
+	}
+
+	// GIF Specific routines
+
+	// Number of characters so far in this 'packet'
+	int a_count;
+
+	// Set up the 'byte output' routine
+	void char_init() {
+		a_count = 0;
+	}
+
+	// Define the storage for the packet accumulator
+	byte[] accum = new byte[256];
+
+	// Add a character to the end of the current packet, and if it is 254
+	// characters, flush the packet to disk.
+	void char_out(byte c, OutputStream outs) throws IOException {
+		accum[a_count++] = c;
+		if (a_count >= 254)
+			flush_char(outs);
+	}
+
+	// Flush the packet to disk, and reset the accumulator
+	void flush_char(OutputStream outs) throws IOException {
+		if (a_count > 0) {
+			outs.write(a_count);
+			outs.write(accum, 0, a_count);
+			a_count = 0;
+		}
+	}
+
+}
+
+class GifEncoderHashitem {
+	public int rgb;
+	public int count;
+	public int index;
+	public boolean isTransparent;
+
+	public GifEncoderHashitem(int rgb, int count, int index,
+			boolean isTransparent) {
+		this.rgb = rgb;
+		this.count = count;
+		this.index = index;
+		this.isTransparent = isTransparent;
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/HtmlColor.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/HtmlColor.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/HtmlColor.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,90 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.util;
+
+import java.awt.Color;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.ajax4jsf.framework.util.message.Messages;
+
+/**
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:59:16 $
+ *
+ */
+public class HtmlColor {
+	private static Map colorNames;
+	
+	static {
+		// color names.
+		colorNames = new HashMap();
+	    colorNames.put("black", new Color(0x000000));
+		colorNames.put("green", new Color(0x008000));
+		colorNames.put("silver", new Color(0xC0C0C0));
+		colorNames.put("lime", new Color(0x00FF00));
+		colorNames.put("gray", new Color(0x808080));
+		colorNames.put("olive", new Color(0x808000));
+		colorNames.put("white", new Color(0xFFFFFF));
+		colorNames.put("yellow", new Color(0xFFFF00));
+		colorNames.put("maroon", new Color(0x800000));
+		colorNames.put("navy", new Color(0x000080));
+		colorNames.put("red", new Color(0xFF0000));
+		colorNames.put("blue", new Color(0x0000FF));
+		colorNames.put("purple", new Color(0x800080));
+		colorNames.put("teal", new Color(0x008080));
+		colorNames.put("fuchsia", new Color(0xFF00FF));
+		colorNames.put("aqua", new Color(0x00FFFF));
+	}
+
+	/**
+	 * Decode HTML-attribute style of color to {@link Color}
+	 * @param color - color name or #RRGGBB string
+	 * @return - color for this value.
+	 */
+	public static Color decode(String color){
+		if(null == color) {
+			throw new IllegalArgumentException(Messages.getMessage(Messages.NULL_COLOR_PARAMETER_ERROR));
+		}
+		Color c = (Color) colorNames.get(color.trim().toLowerCase());
+		if (null == c) {
+			try {
+				c = Color.decode(color.trim());
+			} catch (NumberFormatException e) {
+				throw new IllegalArgumentException(Messages.getMessage(Messages.DECODE_COLOR_PARAMETER_ERROR, color, e.getMessage()));
+			}
+		}
+		return c;
+	}
+	
+	public static Integer integerValue(String color){
+		return new Integer(decode(color).getRGB());
+	}
+	
+	public static String encodeRGB(Color color){
+		if(null == color) {
+			throw new IllegalArgumentException(Messages.getMessage(Messages.NULL_COLOR_PARAMETER_ERROR_2));
+		}
+		return "#" + Integer.toHexString(color.getRGB()).substring(2).toUpperCase();
+	}
+	
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/HtmlDimensions.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/HtmlDimensions.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/HtmlDimensions.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,80 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.util;
+
+import java.text.DecimalFormat;
+import java.text.NumberFormat;
+import java.text.ParseException;
+import java.util.regex.Pattern;
+
+import org.ajax4jsf.framework.util.message.Messages;
+
+public class HtmlDimensions {
+	
+	private static final Pattern PATTERN_NUMERIC = Pattern.compile("^[+-]?\\d+(\\.\\d+)?$");
+	private static final Pattern PATTERN_PX = Pattern.compile("^[+-]?\\d+(\\.\\d+)?px$");
+	private static final Pattern PATTERN_PCT = Pattern.compile("^[+-]?\\d+(\\.\\d+)?%$");
+	
+	private static final NumberFormat numericFormat = new DecimalFormat();
+	private static final DecimalFormat pxFormat = new DecimalFormat();
+	private static final NumberFormat pctFormat = NumberFormat.getPercentInstance();
+	
+	static{
+		pxFormat.setPositiveSuffix("px");
+		pxFormat.setNegativeSuffix("px");
+	}
+	public static Double decode(String size){
+		// TODO - handle px,ex,pt enc suffixes.
+		double d = 0;
+		try {
+			if(size != null){
+				if(PATTERN_NUMERIC.matcher(size).matches()){
+					synchronized(numericFormat){
+						d = numericFormat.parse(size).doubleValue();
+					}
+				} else if(PATTERN_PX.matcher(size).matches()){
+					synchronized (pxFormat) {
+						d = pxFormat.parse(size).doubleValue();
+					}
+				} else if(PATTERN_PCT.matcher(size).matches()){
+					synchronized (pctFormat) {
+						d = pctFormat.parse(size).doubleValue();
+					}
+				}
+			}
+		} catch (ParseException e) {
+			throw new IllegalArgumentException(Messages.getMessage(Messages.DECODE_PARAMETER_ERROR, new Object[]{"size", size, e.getMessage()}));
+		}
+		return new Double(d);
+	}
+	
+	public static String formatPx(Double value){
+		return (value.intValue() + "px");
+	}
+	public static String formatPct(Double value){
+		String v = "";
+		synchronized (pctFormat) {
+			v = pctFormat.format(value.doubleValue());
+		}
+		return v;
+	}
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/InputUtils.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/InputUtils.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/InputUtils.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,55 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.util;
+
+import java.io.Serializable;
+
+import javax.faces.component.UIComponent;
+
+/**
+ * @author Maksim Kaszynski
+ * @author Manfred Geiler
+ *
+ */
+public class InputUtils {
+
+    public static final String EMPTY_STRING = new String();
+    public static final Object NOTHING = new Serializable() {};
+	
+    public static boolean isTrue(Object obj)
+    {
+        if(!(obj instanceof Boolean))
+            return false;
+
+        return ((Boolean) obj).booleanValue();
+    }
+
+    public static boolean isDisabled(UIComponent component)
+    {
+        return isTrue(component.getAttributes().get("disabled"));
+    }
+    public static boolean isReadOnly(UIComponent component)
+    {
+        return isTrue(component.getAttributes().get("readonly"));
+    }
+    
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/SelectUtils.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/SelectUtils.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/SelectUtils.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,291 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.util;
+
+import java.lang.reflect.Array;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import javax.faces.FacesException;
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIInput;
+import javax.faces.component.UIOutput;
+import javax.faces.component.UISelectItem;
+import javax.faces.component.UISelectItems;
+import javax.faces.component.UISelectMany;
+import javax.faces.context.FacesContext;
+import javax.faces.convert.Converter;
+import javax.faces.convert.ConverterException;
+import javax.faces.el.ValueBinding;
+import javax.faces.model.SelectItem;
+
+import org.ajax4jsf.framework.util.message.Messages;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * @author Maksim Kaszynski
+ *
+ */
+public class SelectUtils {
+	
+	private static final Log log = LogFactory.getLog(SelectUtils.class);
+	
+	/**
+	 * Gathers all select items from specified component's children
+	 * @param context
+	 * @param component
+	 * @return list of {@link SelectItems} taken from f:selectItem and f:selectItems
+	 */
+	public static List getSelectItems(FacesContext context, UIComponent component) {
+        ArrayList list = new ArrayList();
+		Iterator kids = component.getChildren().iterator();
+		while (kids.hasNext()) {
+			UIComponent kid = (UIComponent) kids.next();
+			if (kid instanceof UISelectItem) {
+				Object value = ((UISelectItem) kid).getValue();
+				if (value == null) {
+					UISelectItem item = (UISelectItem) kid;
+					list.add(new SelectItem(item.getItemValue(), item.getItemLabel(), item.getItemDescription(), item.isItemDisabled()));
+				} else if (value instanceof SelectItem) {
+					list.add(value);
+				} else {
+					String valueClass = (value != null ? "'" + value.getClass().getName() + "'" : "");
+					throw new IllegalArgumentException(Messages.getMessage(Messages.INVALID_ATTRIBUTE_VALUE, valueClass, "<selectItem>"));
+				}
+			} else if (kid instanceof UISelectItems && null != context) {
+				Object value = ((UISelectItems) kid).getValue();
+				if (value instanceof SelectItem) {
+					list.add(value);
+				} else if (value instanceof SelectItem[]) {
+					SelectItem items[] = (SelectItem[]) value;
+					for (int i = 0; i < items.length; i++) {
+						list.add(items[i]);
+					}
+				} else if (value instanceof Collection) {
+					Iterator elements = ((Collection) value).iterator();
+					while (elements.hasNext()) {
+						list.add(elements.next());
+					}
+				} else if (value instanceof Map) {
+					Iterator keys = ((Map) value).keySet().iterator();
+					while (keys.hasNext()) {
+						Object key = keys.next();
+						if (key == null) {
+							continue;
+						}
+						Object val = ((Map) value).get(key);
+						if (val == null) {
+							continue;
+						}
+						list.add(new SelectItem(val.toString(), key.toString(),
+								null));
+					}
+				} else {
+					String valueClass = (value != null ? "'" + value.getClass().getName() + "'" : "");
+					throw new IllegalArgumentException(Messages.getMessage(Messages.INVALID_ATTRIBUTE_VALUE, valueClass, "<selectItems>"));
+				}
+			}
+		}
+        return list;
+
+	}
+	
+	/**
+	 * Converts UISelectMany submitted value to converted value
+	 * 
+	 * @author Manfred Geiler
+	 * @param facesContext
+	 * @param component
+	 * @param submittedValue
+	 * @return
+	 * @throws ConverterException
+	 */
+	public static Object getConvertedUISelectManyValue(
+			FacesContext facesContext, UISelectMany component,
+			String[] submittedValue) throws ConverterException {
+		// Attention!
+		// This code is duplicated in jsfapi component package.
+		// If you change something here please do the same in the other class!
+
+		if (submittedValue == null)
+			throw new NullPointerException("submittedValue");
+
+		ValueBinding vb = component.getValueBinding("value");
+		Class valueType = null;
+		Class arrayComponentType = null;
+		if (vb != null) {
+			valueType = vb.getType(facesContext);
+			if (valueType != null && valueType.isArray()) {
+				arrayComponentType = valueType.getComponentType();
+			}
+		}
+
+		Converter converter = component.getConverter();
+		if (converter == null) {
+			if (valueType == null) {
+				// No converter, and no idea of expected type
+				// --> return the submitted String array
+				return submittedValue;
+			}
+
+			if (List.class.isAssignableFrom(valueType)) {
+				// expected type is a List
+				// --> according to javadoc of UISelectMany we assume that the
+				// element type
+				// is java.lang.String, and copy the String array to a new List
+				int len = submittedValue.length;
+				List lst = new ArrayList(len);
+				for (int i = 0; i < len; i++) {
+					lst.add(submittedValue[i]);
+				}
+				return lst;
+			}
+
+			if (arrayComponentType == null) {
+				throw new IllegalArgumentException(Messages.getMessage(Messages.VALUE_BINDING_TYPE_ERROR));
+			}
+
+			if (String.class.equals(arrayComponentType))
+				return submittedValue; // No conversion needed for String type
+			if (Object.class.equals(arrayComponentType))
+				return submittedValue; // No conversion for Object class
+
+			try {
+				converter = facesContext.getApplication().createConverter(
+						arrayComponentType);
+			} catch (FacesException e) {
+				log.error(Messages.getMessage(Messages.NO_CONVERTER_FOUND_ERROR, arrayComponentType.getName()), e);
+				return submittedValue;
+			}
+		}
+
+		// Now, we have a converter...
+		if (valueType == null) {
+			// ...but have no idea of expected type
+			// --> so let's convert it to an Object array
+			int len = submittedValue.length;
+			Object[] convertedValues = (Object[]) Array.newInstance(
+					arrayComponentType == null ? Object.class
+							: arrayComponentType, len);
+			for (int i = 0; i < len; i++) {
+				convertedValues[i] = converter.getAsObject(facesContext,
+						component, submittedValue[i]);
+			}
+			return convertedValues;
+		}
+
+		if (List.class.isAssignableFrom(valueType)) {
+			// Curious case: According to specs we should assume, that the
+			// element type
+			// of this List is java.lang.String. But there is a Converter set
+			// for this
+			// component. Because the user must know what he is doing, we will
+			// convert the values.
+			int len = submittedValue.length;
+			List lst = new ArrayList(len);
+			for (int i = 0; i < len; i++) {
+				lst.add(converter.getAsObject(facesContext, component,
+						submittedValue[i]));
+			}
+			return lst;
+		}
+
+		if (arrayComponentType == null) {
+			throw new IllegalArgumentException(Messages.getMessage(Messages.VALUE_BINDING_TYPE_ERROR));
+		}
+
+		if (arrayComponentType.isPrimitive()) {
+			// primitive array
+			int len = submittedValue.length;
+			Object convertedValues = Array.newInstance(arrayComponentType, len);
+			for (int i = 0; i < len; i++) {
+				Array.set(convertedValues, i, converter.getAsObject(
+						facesContext, component, submittedValue[i]));
+			}
+			return convertedValues;
+		} else {
+			// Object array
+			int len = submittedValue.length;
+			ArrayList convertedValues = new ArrayList(len);
+			for (int i = 0; i < len; i++) {
+				convertedValues.add(i, converter.getAsObject(facesContext,
+						component, submittedValue[i]));
+			}
+			return convertedValues.toArray((Object[]) Array.newInstance(
+					arrayComponentType, len));
+		}
+	}
+
+	public static Object getConvertedUIInputValue(
+			FacesContext facesContext, UIInput component,
+			String submittedValue) throws ConverterException{
+
+		Object convertedValue = null;
+		
+		/*
+		if (submittedValue == null)
+			throw new NullPointerException("submittedValue");
+		*/
+		if(InputUtils.EMPTY_STRING.equals(submittedValue)){
+			return null;
+		}
+		Converter converter = getConverterForProperty(facesContext, component, "value");
+		if(converter != null){
+			convertedValue = converter.getAsObject(facesContext, component, submittedValue);
+		} else {
+			convertedValue = submittedValue;
+		}
+		
+		return convertedValue;
+
+	}
+	/**
+	 * 
+	 * @param facesContext
+	 * @param component
+	 * @param property
+	 * @return converter for specified component attribute
+	 */
+	public static Converter getConverterForProperty(FacesContext facesContext, UIOutput component, String property){
+		Converter converter = component.getConverter();
+		if(converter == null){
+			ValueBinding valueBinding = component.getValueBinding(property);
+			if(valueBinding != null){
+				Class valueType = valueBinding.getType(facesContext);
+				if(valueType == null || String.class.equals(valueType) || Object.class.equals(valueType)){
+					//No converter needed
+				} else {
+					converter = facesContext.getApplication().createConverter(valueType);
+					if(converter == null){
+						throw new ConverterException(Messages.getMessage(Messages.NO_CONVERTER_FOUND_ERROR, valueType.getName()));
+					}
+				}
+			}
+		} 
+		return converter;
+	}
+	
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/ServicesUtils.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/ServicesUtils.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/ServicesUtils.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,151 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.util;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.faces.FacesException;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * @author shura
+ * 
+ */
+public class ServicesUtils {
+
+	private static final Log log = LogFactory.getLog(ServicesUtils.class);
+
+	private static Map _services = Collections.synchronizedMap(new HashMap());
+
+	private static Map _instances = Collections.synchronizedMap(new HashMap());
+	/**
+	 * 
+	 */
+	private ServicesUtils() {
+		// This is a static utility class.
+	}
+
+	/**
+	 * @param name
+	 * @return
+	 * @throws ClassNotFoundException
+	 */
+	public static Class getService(String name) throws ClassNotFoundException {
+		Map contextClasses = (Map) _services.get(name);
+		if (null == contextClasses) {
+			contextClasses = Collections.synchronizedMap(new HashMap());
+			_services.put(name, contextClasses);
+		}
+		ClassLoader loader = Thread.currentThread().getContextClassLoader();
+		Class serviceClass = (Class) contextClasses.get(loader);
+		if (null == serviceClass) {
+			serviceClass = loadServiceClass(loader, name);
+			contextClasses.put(loader, serviceClass);
+		}
+		return serviceClass;
+	}
+
+	/**
+	 * Get per-context instance for service.
+	 * @param name - name ( default classname ) for service.
+	 * @return current instance for this service.
+	 * @throws ClassNotFoundException
+	 */
+	public static Object getServiceInstance(String name)  {
+		Map contextInstances = (Map) _instances.get(name);
+		if (null == contextInstances) {
+			contextInstances = Collections.synchronizedMap(new HashMap());
+			_instances.put(name, contextInstances);
+		}
+		ClassLoader loader = Thread.currentThread().getContextClassLoader();
+		Object serviceInstance = contextInstances.get(loader);
+		if (null == serviceInstance) {
+			try{
+			Class serviceClass = loadServiceClass(loader, name);
+			serviceInstance = serviceClass.newInstance();
+			} catch (Exception e) {
+				throw new FacesException("Error create instance for service "+name,e);
+			}
+			contextInstances.put(loader, serviceInstance);
+		}
+		return serviceInstance;
+	}
+	
+	
+	/**
+	 * @param loader
+	 * @param name
+	 * @return
+	 * @throws ClassNotFoundException
+	 */
+	public static Class loadServiceClass(ClassLoader loader, String name) throws ClassNotFoundException {
+		Class serviceClass;
+		try {
+			String resource = "META-INF/services/" + name;
+			InputStream in = loader.getResourceAsStream(resource);
+			BufferedReader reader = new BufferedReader(
+					new InputStreamReader(in));
+			String serviceClassName = reader.readLine();
+			reader.close();
+			serviceClass = loadClass(loader, serviceClassName);
+			if (log.isDebugEnabled()) {
+				log.debug("Class for service "+name+ " set to "+ serviceClassName);
+			}
+		} catch (Exception e) {
+			serviceClass = loadClass(loader, name);
+			if (log.isDebugEnabled()) {
+				log
+						.debug("Service class set to default implementation "+name);
+			}
+		}
+		return serviceClass;
+	}
+
+	/**
+	 * @param loader
+	 * @param name
+	 * @return
+	 * @throws ClassNotFoundException
+	 */
+	public static Class loadClass(ClassLoader loader, String name)
+			throws ClassNotFoundException {
+		Class clazz;
+		try {
+			clazz = loader.loadClass(name);
+		} catch (ClassNotFoundException e) {
+			if (log.isWarnEnabled()) {
+				log.warn("Class " + name + "not found by Context Classloader");
+			}
+			// Try internal library classloader.
+			clazz = ServicesUtils.class.getClassLoader().loadClass(name);
+		}
+		return clazz;
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/base64/Base64.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/base64/Base64.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/base64/Base64.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,542 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */ 
+
+package org.ajax4jsf.framework.util.base64;
+
+import org.ajax4jsf.framework.util.message.Messages;
+
+
+/**
+ * Provides Base64 encoding and decoding as defined by RFC 2045.
+ * 
+ * <p>This class implements section <cite>6.8. Base64 Content-Transfer-Encoding</cite> 
+ * from RFC 2045 <cite>Multipurpose Internet Mail Extensions (MIME) Part One: 
+ * Format of Internet Message Bodies</cite> by Freed and Borenstein.</p> 
+ *
+ * @see <a href="http://www.ietf.org/rfc/rfc2045.txt">RFC 2045</a>
+ * @author Apache Software Foundation
+ * @since 1.0-dev
+ * @version $Id: Base64.java,v 1.1.2.1 2007/01/09 18:59:11 alexsmirnov Exp $
+ */
+public class Base64 implements BinaryEncoder, BinaryDecoder {
+
+    /**
+     * Chunk size per RFC 2045 section 6.8.
+     * 
+     * <p>The {@value} character limit does not count the trailing CRLF, but counts 
+     * all other characters, including any equal signs.</p>
+     * 
+     * @see <a href="http://www.ietf.org/rfc/rfc2045.txt">RFC 2045 section 6.8</a>
+     */
+    static final int CHUNK_SIZE = 76;
+
+    /**
+     * Chunk separator per RFC 2045 section 2.1.
+     * 
+     * @see <a href="http://www.ietf.org/rfc/rfc2045.txt">RFC 2045 section 2.1</a>
+     */
+    static final byte[] CHUNK_SEPARATOR = "\r\n".getBytes();
+
+    /**
+     * The base length.
+     */
+    static final int BASELENGTH = 255;
+
+    /**
+     * Lookup length.
+     */
+    static final int LOOKUPLENGTH = 64;
+
+    /**
+     * Used to calculate the number of bits in a byte.
+     */
+    static final int EIGHTBIT = 8;
+
+    /**
+     * Used when encoding something which has fewer than 24 bits.
+     */
+    static final int SIXTEENBIT = 16;
+
+    /**
+     * Used to determine how many bits data contains.
+     */
+    static final int TWENTYFOURBITGROUP = 24;
+
+    /**
+     * Used to get the number of Quadruples.
+     */
+    static final int FOURBYTE = 4;
+
+    /**
+     * Used to test the sign of a byte.
+     */
+    static final int SIGN = -128;
+    
+    /**
+     * Byte used to pad output.
+     */
+    static final byte PAD = (byte) '=';
+
+    // Create arrays to hold the base64 characters and a 
+    // lookup for base64 chars
+    private static byte[] base64Alphabet = new byte[BASELENGTH];
+    private static byte[] lookUpBase64Alphabet = new byte[LOOKUPLENGTH];
+
+    // Populating the lookup and character arrays
+    static {
+        for (int i = 0; i < BASELENGTH; i++) {
+            base64Alphabet[i] = (byte) -1;
+        }
+        for (int i = 'Z'; i >= 'A'; i--) {
+            base64Alphabet[i] = (byte) (i - 'A');
+        }
+        for (int i = 'z'; i >= 'a'; i--) {
+            base64Alphabet[i] = (byte) (i - 'a' + 26);
+        }
+        for (int i = '9'; i >= '0'; i--) {
+            base64Alphabet[i] = (byte) (i - '0' + 52);
+        }
+
+        base64Alphabet['+'] = 62;
+        base64Alphabet['/'] = 63;
+
+        for (int i = 0; i <= 25; i++) {
+            lookUpBase64Alphabet[i] = (byte) ('A' + i);
+        }
+
+        for (int i = 26, j = 0; i <= 51; i++, j++) {
+            lookUpBase64Alphabet[i] = (byte) ('a' + j);
+        }
+
+        for (int i = 52, j = 0; i <= 61; i++, j++) {
+            lookUpBase64Alphabet[i] = (byte) ('0' + j);
+        }
+
+        lookUpBase64Alphabet[62] = (byte) '+';
+        lookUpBase64Alphabet[63] = (byte) '/';
+    }
+
+    private static boolean isBase64(byte octect) {
+        if (octect == PAD) {
+            return true;
+        } else if (base64Alphabet[octect] == -1) {
+            return false;
+        } else {
+            return true;
+        }
+    }
+
+    /**
+     * Tests a given byte array to see if it contains
+     * only valid characters within the Base64 alphabet.
+     *
+     * @param arrayOctect byte array to test
+     * @return true if all bytes are valid characters in the Base64
+     *         alphabet or if the byte array is empty; false, otherwise
+     */
+    public static boolean isArrayByteBase64(byte[] arrayOctect) {
+
+        arrayOctect = discardWhitespace(arrayOctect);
+
+        int length = arrayOctect.length;
+        if (length == 0) {
+            // shouldn't a 0 length array be valid base64 data?
+            // return false;
+            return true;
+        }
+        for (int i = 0; i < length; i++) {
+            if (!isBase64(arrayOctect[i])) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    /**
+     * Encodes binary data using the base64 algorithm but
+     * does not chunk the output.
+     *
+     * @param binaryData binary data to encode
+     * @return Base64 characters
+     */
+    public static byte[] encodeBase64(byte[] binaryData) {
+        return encodeBase64(binaryData, false);
+    }
+
+    /**
+     * Encodes binary data using the base64 algorithm and chunks
+     * the encoded output into 76 character blocks
+     *
+     * @param binaryData binary data to encode
+     * @return Base64 characters chunked in 76 character blocks
+     */
+    public static byte[] encodeBase64Chunked(byte[] binaryData) {
+        return encodeBase64(binaryData, true);
+    }
+
+
+    /**
+     * Decodes an Object using the base64 algorithm.  This method
+     * is provided in order to satisfy the requirements of the
+     * Decoder interface, and will throw a DecoderException if the
+     * supplied object is not of type byte[].
+     *
+     * @param pObject Object to decode
+     * @return An object (of type byte[]) containing the 
+     *         binary data which corresponds to the byte[] supplied.
+     * @throws DecoderException if the parameter supplied is not
+     *                          of type byte[]
+     */
+    public Object decode(Object pObject) throws DecoderException {
+        if (!(pObject instanceof byte[])) {
+            throw new DecoderException(Messages.getMessage(Messages.NO_BYTE_ARRAY_ERROR));
+        }
+        return decode((byte[]) pObject);
+    }
+
+    /**
+     * Decodes a byte[] containing containing
+     * characters in the Base64 alphabet.
+     *
+     * @param pArray A byte array containing Base64 character data
+     * @return a byte array containing binary data
+     */
+    public byte[] decode(byte[] pArray) {
+        return decodeBase64(pArray);
+    }
+
+    /**
+     * Encodes binary data using the base64 algorithm, optionally
+     * chunking the output into 76 character blocks.
+     *
+     * @param binaryData Array containing binary data to encode.
+     * @param isChunked if isChunked is true this encoder will chunk
+     *                  the base64 output into 76 character blocks
+     * @return Base64-encoded data.
+     */
+    public static byte[] encodeBase64(byte[] binaryData, boolean isChunked) {
+        int lengthDataBits = binaryData.length * EIGHTBIT;
+        int fewerThan24bits = lengthDataBits % TWENTYFOURBITGROUP;
+        int numberTriplets = lengthDataBits / TWENTYFOURBITGROUP;
+        byte encodedData[] = null;
+        int encodedDataLength = 0;
+        int nbrChunks = 0;
+
+        if (fewerThan24bits != 0) {
+            //data not divisible by 24 bit
+            encodedDataLength = (numberTriplets + 1) * 4;
+        } else {
+            // 16 or 8 bit
+            encodedDataLength = numberTriplets * 4;
+        }
+
+        // If the output is to be "chunked" into 76 character sections, 
+        // for compliance with RFC 2045 MIME, then it is important to 
+        // allow for extra length to account for the separator(s)
+        if (isChunked) {
+
+            nbrChunks =
+                (CHUNK_SEPARATOR.length == 0 ? 0 : (int) Math.ceil((float) encodedDataLength / CHUNK_SIZE));
+            encodedDataLength += nbrChunks * CHUNK_SEPARATOR.length;
+        }
+
+        encodedData = new byte[encodedDataLength];
+
+        byte k = 0, l = 0, b1 = 0, b2 = 0, b3 = 0;
+
+        int encodedIndex = 0;
+        int dataIndex = 0;
+        int i = 0;
+        int nextSeparatorIndex = CHUNK_SIZE;
+        int chunksSoFar = 0;
+
+        //log.debug("number of triplets = " + numberTriplets);
+        for (i = 0; i < numberTriplets; i++) {
+            dataIndex = i * 3;
+            b1 = binaryData[dataIndex];
+            b2 = binaryData[dataIndex + 1];
+            b3 = binaryData[dataIndex + 2];
+
+            //log.debug("b1= " + b1 +", b2= " + b2 + ", b3= " + b3);
+
+            l = (byte) (b2 & 0x0f);
+            k = (byte) (b1 & 0x03);
+
+            byte val1 =
+                ((b1 & SIGN) == 0) ? (byte) (b1 >> 2) : (byte) ((b1) >> 2 ^ 0xc0);
+            byte val2 =
+                ((b2 & SIGN) == 0) ? (byte) (b2 >> 4) : (byte) ((b2) >> 4 ^ 0xf0);
+            byte val3 =
+                ((b3 & SIGN) == 0) ? (byte) (b3 >> 6) : (byte) ((b3) >> 6 ^ 0xfc);
+
+            encodedData[encodedIndex] = lookUpBase64Alphabet[val1];
+            //log.debug( "val2 = " + val2 );
+            //log.debug( "k4   = " + (k<<4) );
+            //log.debug(  "vak  = " + (val2 | (k<<4)) );
+            encodedData[encodedIndex + 1] =
+                lookUpBase64Alphabet[val2 | (k << 4)];
+            encodedData[encodedIndex + 2] =
+                lookUpBase64Alphabet[(l << 2) | val3];
+            encodedData[encodedIndex + 3] = lookUpBase64Alphabet[b3 & 0x3f];
+
+            encodedIndex += 4;
+
+            // If we are chunking, let's put a chunk separator down.
+            if (isChunked) {
+                // this assumes that CHUNK_SIZE % 4 == 0
+                if (encodedIndex == nextSeparatorIndex) {
+                    System.arraycopy(
+                        CHUNK_SEPARATOR,
+                        0,
+                        encodedData,
+                        encodedIndex,
+                        CHUNK_SEPARATOR.length);
+                    chunksSoFar++;
+                    nextSeparatorIndex =
+                        (CHUNK_SIZE * (chunksSoFar + 1)) + 
+                        (chunksSoFar * CHUNK_SEPARATOR.length);
+                    encodedIndex += CHUNK_SEPARATOR.length;
+                }
+            }
+        }
+
+        // form integral number of 6-bit groups
+        dataIndex = i * 3;
+
+        if (fewerThan24bits == EIGHTBIT) {
+            b1 = binaryData[dataIndex];
+            k = (byte) (b1 & 0x03);
+            //log.debug("b1=" + b1);
+            //log.debug("b1<<2 = " + (b1>>2) );
+            byte val1 =
+                ((b1 & SIGN) == 0) ? (byte) (b1 >> 2) : (byte) ((b1) >> 2 ^ 0xc0);
+            encodedData[encodedIndex] = lookUpBase64Alphabet[val1];
+            encodedData[encodedIndex + 1] = lookUpBase64Alphabet[k << 4];
+            encodedData[encodedIndex + 2] = PAD;
+            encodedData[encodedIndex + 3] = PAD;
+        } else if (fewerThan24bits == SIXTEENBIT) {
+
+            b1 = binaryData[dataIndex];
+            b2 = binaryData[dataIndex + 1];
+            l = (byte) (b2 & 0x0f);
+            k = (byte) (b1 & 0x03);
+
+            byte val1 =
+                ((b1 & SIGN) == 0) ? (byte) (b1 >> 2) : (byte) ((b1) >> 2 ^ 0xc0);
+            byte val2 =
+                ((b2 & SIGN) == 0) ? (byte) (b2 >> 4) : (byte) ((b2) >> 4 ^ 0xf0);
+
+            encodedData[encodedIndex] = lookUpBase64Alphabet[val1];
+            encodedData[encodedIndex + 1] =
+                lookUpBase64Alphabet[val2 | (k << 4)];
+            encodedData[encodedIndex + 2] = lookUpBase64Alphabet[l << 2];
+            encodedData[encodedIndex + 3] = PAD;
+        }
+
+        if (isChunked) {
+            // we also add a separator to the end of the final chunk.
+            if (chunksSoFar < nbrChunks) {
+                System.arraycopy(
+                    CHUNK_SEPARATOR,
+                    0,
+                    encodedData,
+                    encodedDataLength - CHUNK_SEPARATOR.length,
+                    CHUNK_SEPARATOR.length);
+            }
+        }
+
+        return encodedData;
+    }
+
+    /**
+     * Decodes Base64 data into octects
+     *
+     * @param base64Data Byte array containing Base64 data
+     * @return Array containing decoded data.
+     */
+    public static byte[] decodeBase64(byte[] base64Data) {
+        // RFC 2045 requires that we discard ALL non-Base64 characters
+        base64Data = discardNonBase64(base64Data);
+
+        // handle the edge case, so we don't have to worry about it later
+        if (base64Data.length == 0) {
+            return new byte[0];
+        }
+
+        int numberQuadruple = base64Data.length / FOURBYTE;
+        byte decodedData[] = null;
+        byte b1 = 0, b2 = 0, b3 = 0, b4 = 0, marker0 = 0, marker1 = 0;
+
+        // Throw away anything not in base64Data
+
+        int encodedIndex = 0;
+        int dataIndex = 0;
+        {
+            // this sizes the output array properly - rlw
+            int lastData = base64Data.length;
+            // ignore the '=' padding
+            while (base64Data[lastData - 1] == PAD) {
+                if (--lastData == 0) {
+                    return new byte[0];
+                }
+            }
+            decodedData = new byte[lastData - numberQuadruple];
+        }
+        
+        for (int i = 0; i < numberQuadruple; i++) {
+            dataIndex = i * 4;
+            marker0 = base64Data[dataIndex + 2];
+            marker1 = base64Data[dataIndex + 3];
+            
+            b1 = base64Alphabet[base64Data[dataIndex]];
+            b2 = base64Alphabet[base64Data[dataIndex + 1]];
+            
+            if (marker0 != PAD && marker1 != PAD) {
+                //No PAD e.g 3cQl
+                b3 = base64Alphabet[marker0];
+                b4 = base64Alphabet[marker1];
+                
+                decodedData[encodedIndex] = (byte) (b1 << 2 | b2 >> 4);
+                decodedData[encodedIndex + 1] =
+                    (byte) (((b2 & 0xf) << 4) | ((b3 >> 2) & 0xf));
+                decodedData[encodedIndex + 2] = (byte) (b3 << 6 | b4);
+            } else if (marker0 == PAD) {
+                //Two PAD e.g. 3c[Pad][Pad]
+                decodedData[encodedIndex] = (byte) (b1 << 2 | b2 >> 4);
+            } else if (marker1 == PAD) {
+                //One PAD e.g. 3cQ[Pad]
+                b3 = base64Alphabet[marker0];
+                
+                decodedData[encodedIndex] = (byte) (b1 << 2 | b2 >> 4);
+                decodedData[encodedIndex + 1] =
+                    (byte) (((b2 & 0xf) << 4) | ((b3 >> 2) & 0xf));
+            }
+            encodedIndex += 3;
+        }
+        return decodedData;
+    }
+    
+    /**
+     * Discards any whitespace from a base-64 encoded block.
+     *
+     * @param data The base-64 encoded data to discard the whitespace
+     * from.
+     * @return The data, less whitespace (see RFC 2045).
+     */
+    static byte[] discardWhitespace(byte[] data) {
+        byte groomedData[] = new byte[data.length];
+        int bytesCopied = 0;
+        
+        for (int i = 0; i < data.length; i++) {
+            switch (data[i]) {
+            case (byte) ' ' :
+            case (byte) '\n' :
+            case (byte) '\r' :
+            case (byte) '\t' :
+                    break;
+            default:
+                    groomedData[bytesCopied++] = data[i];
+            }
+        }
+
+        byte packedData[] = new byte[bytesCopied];
+
+        System.arraycopy(groomedData, 0, packedData, 0, bytesCopied);
+
+        return packedData;
+    }
+
+    /**
+     * Discards any characters outside of the base64 alphabet, per
+     * the requirements on page 25 of RFC 2045 - "Any characters
+     * outside of the base64 alphabet are to be ignored in base64
+     * encoded data."
+     *
+     * @param data The base-64 encoded data to groom
+     * @return The data, less non-base64 characters (see RFC 2045).
+     */
+    static byte[] discardNonBase64(byte[] data) {
+        byte groomedData[] = new byte[data.length];
+        int bytesCopied = 0;
+
+        for (int i = 0; i < data.length; i++) {
+            if (isBase64(data[i])) {
+                groomedData[bytesCopied++] = data[i];
+            }
+        }
+
+        byte packedData[] = new byte[bytesCopied];
+
+        System.arraycopy(groomedData, 0, packedData, 0, bytesCopied);
+
+        return packedData;
+    }
+
+
+    // Implementation of the Encoder Interface
+
+    /**
+     * Encodes an Object using the base64 algorithm.  This method
+     * is provided in order to satisfy the requirements of the
+     * Encoder interface, and will throw an EncoderException if the
+     * supplied object is not of type byte[].
+     *
+     * @param pObject Object to encode
+     * @return An object (of type byte[]) containing the 
+     *         base64 encoded data which corresponds to the byte[] supplied.
+     * @throws EncoderException if the parameter supplied is not
+     *                          of type byte[]
+     */
+    public Object encode(Object pObject) throws EncoderException {
+        if (!(pObject instanceof byte[])) {
+            throw new EncoderException(Messages.getMessage(Messages.NO_BYTE_ARRAY_ERROR));
+        }
+        return encode((byte[]) pObject);
+    }
+
+    /**
+     * Encodes a byte[] containing binary data, into a byte[] containing
+     * characters in the Base64 alphabet.
+     *
+     * @param pArray a byte array containing binary data
+     * @return A byte array containing only Base64 character data
+     */
+    public byte[] encode(byte[] pArray) {
+        return encodeBase64(pArray, false);
+    }
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/base64/BinaryDecoder.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/base64/BinaryDecoder.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/base64/BinaryDecoder.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,62 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */ 
+
+package org.ajax4jsf.framework.util.base64;
+
+/**
+ * Defines common decoding methods for byte array decoders.
+ *
+ * @author Apache Software Foundation
+ * @version $Id: BinaryDecoder.java,v 1.1.2.1 2007/01/09 18:59:12 alexsmirnov Exp $
+ */
+public interface BinaryDecoder extends Decoder {
+
+    /**
+     * Decodes a byte array and returns the results as a byte array. 
+     *
+     * @param pArray A byte array which has been encoded with the
+     *      appropriate encoder
+     * 
+     * @return a byte array that contains decoded content
+     * 
+     * @throws DecoderException A decoder exception is thrown
+     *          if a Decoder encounters a failure condition during
+     *          the decode process.
+     */
+    byte[] decode(byte[] pArray) throws DecoderException;
+}  
+

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/base64/BinaryEncoder.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/base64/BinaryEncoder.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/base64/BinaryEncoder.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,62 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */ 
+
+package org.ajax4jsf.framework.util.base64;
+
+/**
+ * Defines common encoding methods for byte array encoders.
+ * 
+ * @author Apache Software Foundation
+ * @version $Id: BinaryEncoder.java,v 1.1.2.1 2007/01/09 18:59:13 alexsmirnov Exp $
+ */
+public interface BinaryEncoder extends Encoder {
+    
+    /**
+     * Encodes a byte array and return the encoded data
+     * as a byte array.
+     * 
+     * @param pArray Data to be encoded
+     *
+     * @return A byte array containing the encoded data
+     * 
+     * @throws EncoderException thrown if the Encoder
+     *      encounters a failure condition during the
+     *      encoding process.
+     */
+    byte[] encode(byte[] pArray) throws EncoderException;
+}  
+

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/base64/Codec.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/base64/Codec.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/base64/Codec.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,138 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.util.base64;
+
+import java.io.UnsupportedEncodingException;
+import java.security.InvalidKeyException;
+import java.security.NoSuchAlgorithmException;
+import java.security.spec.InvalidKeySpecException;
+import java.security.spec.KeySpec;
+
+import javax.crypto.Cipher;
+import javax.crypto.NoSuchPaddingException;
+import javax.crypto.SecretKey;
+import javax.crypto.SecretKeyFactory;
+import javax.crypto.spec.DESKeySpec;
+import javax.faces.FacesException;
+
+/**
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:59:10 $
+ *
+ */
+public class Codec {
+
+	private Cipher e = null;
+	private Cipher d = null;
+	
+
+	/**
+	 * 
+	 */
+	public Codec() {
+	}
+
+	/**
+	 * 
+	 */
+	public Codec( String p ) throws Exception {
+		 setPassword(p);
+	}
+
+	/**
+	 * @param p
+	 * @throws InvalidKeyException
+	 * @throws UnsupportedEncodingException
+	 * @throws InvalidKeySpecException
+	 * @throws NoSuchAlgorithmException
+	 * @throws NoSuchPaddingException
+	 */
+	public void setPassword(String p) throws FacesException {
+	    byte[] s = {
+	                (byte)0xA9, (byte)0x9B, (byte)0xC8, (byte)0x32,
+	                (byte)0x56, (byte)0x34, (byte)0xE3, (byte)0x03
+	            };
+         try {
+	    	KeySpec keySpec = new DESKeySpec(p.getBytes("UTF8"));
+	    	SecretKey key = SecretKeyFactory.getInstance("DES")
+	    			.generateSecret(keySpec);
+	    	e = Cipher.getInstance(key.getAlgorithm());
+	    	d = Cipher.getInstance(key.getAlgorithm());
+
+	    	// Prepare the parameters to the cipthers
+//			AlgorithmParameterSpec paramSpec = new IvParameterSpec(s);
+
+	    	e.init(Cipher.ENCRYPT_MODE, key);
+	    	d.init(Cipher.DECRYPT_MODE, key);
+		} catch (Exception e) {
+			throw new FacesException("Error set encryption key",e);
+		}
+	}
+
+	public String decode(String str) throws Exception {
+			byte[] src = str.getBytes("UTF8");
+			byte[] utf8 = decode(src);
+			// Decode using utf-8
+			return new String(utf8, "UTF8");
+	}
+	public String encode(String str) throws Exception {
+//        try {
+		    
+			byte[] src = str.getBytes("UTF8");
+//			int len = (src.length/8+1)*8;
+//			byte[] block = new byte[len];
+//			Arrays.fill(block,0,len,(byte)0x20);
+//			System.arraycopy(src,0,block,0,src.length);
+
+			// Decrypt
+			byte[] utf8 = encode(src);
+
+			// Decode using utf-8
+			return new String(utf8, "UTF8");
+//		} catch (Exception e) {
+//			// TODO: handle exception
+//			return null;
+//		}
+	}
+	
+	public byte[] decode(byte[] src) throws Exception {
+		byte[] dec = URL64Codec.decodeBase64(src);
+		// Decrypt
+		if (null != d) {
+			return d.doFinal(dec);
+		} else {
+			return dec;
+		}
+	}
+
+	public byte[] encode(byte[] src) throws Exception {
+		byte[] dec;
+		if(null != e){
+			dec = e.doFinal(src);
+		} else {
+			dec = src;
+		}
+		// Decrypt
+		return URL64Codec.encodeBase64(dec);
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/base64/Decoder.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/base64/Decoder.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/base64/Decoder.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,75 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */ 
+
+package org.ajax4jsf.framework.util.base64;
+
+/**
+ * <p>Provides the highest level of abstraction for Decoders.
+ * This is the sister interface of {@link Encoder}.  All
+ * Decoders implement this common generic interface.</p>
+ * 
+ * <p>Allows a user to pass a generic Object to any Decoder 
+ * implementation in the codec package.</p>
+ * 
+ * <p>One of the two interfaces at the center of the codec package.</p>
+ * 
+ * @author Apache Software Foundation
+ * @version $Id: Decoder.java,v 1.1.2.1 2007/01/09 18:59:14 alexsmirnov Exp $
+ */
+public interface Decoder {
+
+    /**
+     * Decodes an "encoded" Object and returns a "decoded"
+     * Object.  Note that the implementation of this
+     * interface will try to cast the Object parameter
+     * to the specific type expected by a particular Decoder
+     * implementation.  If a {@link java.lang.ClassCastException} occurs
+     * this decode method will throw a DecoderException.
+     * 
+     * @param pObject an object to "decode"
+     * 
+     * @return a 'decoded" object
+     * 
+     * @throws DecoderException a decoder exception can
+     * be thrown for any number of reasons.  Some good
+     * candidates are that the parameter passed to this
+     * method is null, a param cannot be cast to the
+     * appropriate type for a specific encoder.
+     */
+    Object decode(Object pObject) throws DecoderException;
+}  
+

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/base64/DecoderException.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/base64/DecoderException.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/base64/DecoderException.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,58 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */ 
+
+package org.ajax4jsf.framework.util.base64;
+
+/**
+ * Thrown when a Decoder has encountered a failure condition during a decode. 
+ * 
+ * @author Apache Software Foundation
+ * @version $Id: DecoderException.java,v 1.1.2.1 2007/01/09 18:59:13 alexsmirnov Exp $
+ */
+public class DecoderException extends Exception {
+
+    /**
+     * Creates a DecoderException
+     * 
+     * @param pMessage A message with meaning to a human
+     */
+    public DecoderException(String pMessage) {
+        super(pMessage);
+    }
+
+}  
+

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/base64/Encoder.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/base64/Encoder.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/base64/Encoder.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,66 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */ 
+
+package org.ajax4jsf.framework.util.base64;
+
+/**
+ * <p>Provides the highest level of abstraction for Encoders.
+ * This is the sister interface of {@link Decoder}.  Every implementation of
+ * Encoder provides this common generic interface whic allows a user to pass a 
+ * generic Object to any Encoder implementation in the codec package.</p>
+ *
+ * @author Apache Software Foundation
+ * @version $Id: Encoder.java,v 1.1.2.1 2007/01/09 18:59:12 alexsmirnov Exp $
+ */
+public interface Encoder {
+    
+    /**
+     * Encodes an "Object" and returns the encoded content 
+     * as an Object.  The Objects here may just be <code>byte[]</code>
+     * or <code>String</code>s depending on the implementation used.
+     *   
+     * @param pObject An object ot encode
+     * 
+     * @return An "encoded" Object
+     * 
+     * @throws EncoderException an encoder exception is
+     *  thrown if the encoder experiences a failure
+     *  condition during the encoding process.
+     */
+    Object encode(Object pObject) throws EncoderException;
+}  
+

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/base64/EncoderException.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/base64/EncoderException.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/base64/EncoderException.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,60 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */ 
+
+package org.ajax4jsf.framework.util.base64;
+
+/**
+ * Thrown when there is a failure condition during the encoding process.  This
+ * exception is thrown when an Encoder encounters a encoding specific exception
+ * such as invalid data, inability to calculate a checksum, characters outside of the 
+ * expected range.
+ * 
+ * @author Apache Software Foundation
+ * @version $Id: EncoderException.java,v 1.1.2.1 2007/01/09 18:59:12 alexsmirnov Exp $
+ */
+public class EncoderException extends Exception {
+
+    /**
+     * Creates a new instance of this exception with an useful message.
+     * 
+     * @param pMessage a useful message relating to the encoder specific error.
+     */
+    public EncoderException(String pMessage) {
+        super(pMessage);
+    }
+}  
+

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/base64/URL64Codec.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/base64/URL64Codec.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/base64/URL64Codec.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,542 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */ 
+
+package org.ajax4jsf.framework.util.base64;
+
+import org.ajax4jsf.framework.util.message.Messages;
+
+
+/**
+ * Provides Base64 encoding and decoding like defined by RFC 2045, but with little difference :
+ * chars '=' '+' and '/' , incorrectly processed in URL by any browsers, replaced by '_' '-' '.', 
+ * 
+ *
+ * @see <a href="http://www.ietf.org/rfc/rfc2045.txt">RFC 2045</a>
+ * @author Apache Software Foundation
+ * @since 1.0-dev
+ * @version $Id: URL64Codec.java,v 1.1.2.1 2007/01/09 18:59:11 alexsmirnov Exp $
+ */
+public class URL64Codec implements BinaryEncoder, BinaryDecoder {
+
+    /**
+     * Chunk size per RFC 2045 section 6.8.
+     * 
+     * <p>The {@value} character limit does not count the trailing CRLF, but counts 
+     * all other characters, including any equal signs.</p>
+     * 
+     * @see <a href="http://www.ietf.org/rfc/rfc2045.txt">RFC 2045 section 6.8</a>
+     */
+    static final int CHUNK_SIZE = 76;
+
+    /**
+     * Chunk separator per RFC 2045 section 2.1.
+     * 
+     * @see <a href="http://www.ietf.org/rfc/rfc2045.txt">RFC 2045 section 2.1</a>
+     */
+    static final byte[] CHUNK_SEPARATOR = "\r\n".getBytes();
+
+    /**
+     * The base length.
+     */
+    static final int BASELENGTH = 255;
+
+    /**
+     * Lookup length.
+     */
+    static final int LOOKUPLENGTH = 64;
+
+    /**
+     * Used to calculate the number of bits in a byte.
+     */
+    static final int EIGHTBIT = 8;
+
+    /**
+     * Used when encoding something which has fewer than 24 bits.
+     */
+    static final int SIXTEENBIT = 16;
+
+    /**
+     * Used to determine how many bits data contains.
+     */
+    static final int TWENTYFOURBITGROUP = 24;
+
+    /**
+     * Used to get the number of Quadruples.
+     */
+    static final int FOURBYTE = 4;
+
+    /**
+     * Used to test the sign of a byte.
+     */
+    static final int SIGN = -128;
+    
+    /**
+     * Byte used to pad output. instesd of '=' in base64, used '_'
+     */
+    static final byte PAD = (byte) '_';
+
+    // Create arrays to hold the base64 characters and a 
+    // lookup for base64 chars
+    private static byte[] base64Alphabet = new byte[BASELENGTH];
+    private static byte[] lookUpBase64Alphabet = new byte[LOOKUPLENGTH];
+
+    // Populating the lookup and character arrays
+    static {
+        for (int i = 0; i < BASELENGTH; i++) {
+            base64Alphabet[i] = (byte) -1;
+        }
+        for (int i = 'Z'; i >= 'A'; i--) {
+            base64Alphabet[i] = (byte) (i - 'A');
+        }
+        for (int i = 'z'; i >= 'a'; i--) {
+            base64Alphabet[i] = (byte) (i - 'a' + 26);
+        }
+        for (int i = '9'; i >= '0'; i--) {
+            base64Alphabet[i] = (byte) (i - '0' + 52);
+        }
+
+        // To compatible with URL format, change '+' and '/' to :
+        base64Alphabet['-'] = 62;
+        base64Alphabet['.'] = 63;
+
+        for (int i = 0; i <= 25; i++) {
+            lookUpBase64Alphabet[i] = (byte) ('A' + i);
+        }
+
+        for (int i = 26, j = 0; i <= 51; i++, j++) {
+            lookUpBase64Alphabet[i] = (byte) ('a' + j);
+        }
+
+        for (int i = 52, j = 0; i <= 61; i++, j++) {
+            lookUpBase64Alphabet[i] = (byte) ('0' + j);
+        }
+
+        // To compatible with URL format, change '+' and '/' to :
+        lookUpBase64Alphabet[62] = (byte) '-';
+        lookUpBase64Alphabet[63] = (byte) '.';
+    }
+
+    private static boolean isBase64(byte octect) {
+        if (octect == PAD) {
+            return true;
+        } else if (base64Alphabet[octect] == -1) {
+            return false;
+        } else {
+            return true;
+        }
+    }
+
+    /**
+     * Tests a given byte array to see if it contains
+     * only valid characters within the Base64 alphabet.
+     *
+     * @param arrayOctect byte array to test
+     * @return true if all bytes are valid characters in the Base64
+     *         alphabet or if the byte array is empty; false, otherwise
+     */
+    public static boolean isArrayByteBase64(byte[] arrayOctect) {
+
+        arrayOctect = discardWhitespace(arrayOctect);
+
+        int length = arrayOctect.length;
+        if (length == 0) {
+            // shouldn't a 0 length array be valid base64 data?
+            // return false;
+            return true;
+        }
+        for (int i = 0; i < length; i++) {
+            if (!isBase64(arrayOctect[i])) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    /**
+     * Encodes binary data using the base64 algorithm but
+     * does not chunk the output.
+     *
+     * @param binaryData binary data to encode
+     * @return Base64 characters
+     */
+    public static byte[] encodeBase64(byte[] binaryData) {
+        return encodeBase64(binaryData, false);
+    }
+
+    /**
+     * Encodes binary data using the base64 algorithm and chunks
+     * the encoded output into 76 character blocks
+     *
+     * @param binaryData binary data to encode
+     * @return Base64 characters chunked in 76 character blocks
+     */
+    public static byte[] encodeBase64Chunked(byte[] binaryData) {
+        return encodeBase64(binaryData, true);
+    }
+
+
+    /**
+     * Decodes an Object using the base64 algorithm.  This method
+     * is provided in order to satisfy the requirements of the
+     * Decoder interface, and will throw a DecoderException if the
+     * supplied object is not of type byte[].
+     *
+     * @param pObject Object to decode
+     * @return An object (of type byte[]) containing the 
+     *         binary data which corresponds to the byte[] supplied.
+     * @throws DecoderException if the parameter supplied is not
+     *                          of type byte[]
+     */
+    public Object decode(Object pObject) throws DecoderException {
+        if (!(pObject instanceof byte[])) {
+            throw new DecoderException(Messages.getMessage(Messages.NO_BYTE_ARRAY_ERROR));
+        }
+        return decode((byte[]) pObject);
+    }
+
+    /**
+     * Decodes a byte[] containing containing
+     * characters in the Base64 alphabet.
+     *
+     * @param pArray A byte array containing Base64 character data
+     * @return a byte array containing binary data
+     */
+    public byte[] decode(byte[] pArray) {
+        return decodeBase64(pArray);
+    }
+
+    /**
+     * Encodes binary data using the base64 algorithm, optionally
+     * chunking the output into 76 character blocks.
+     *
+     * @param binaryData Array containing binary data to encode.
+     * @param isChunked if isChunked is true this encoder will chunk
+     *                  the base64 output into 76 character blocks
+     * @return Base64-encoded data.
+     */
+    public static byte[] encodeBase64(byte[] binaryData, boolean isChunked) {
+        int lengthDataBits = binaryData.length * EIGHTBIT;
+        int fewerThan24bits = lengthDataBits % TWENTYFOURBITGROUP;
+        int numberTriplets = lengthDataBits / TWENTYFOURBITGROUP;
+        byte encodedData[] = null;
+        int encodedDataLength = 0;
+        int nbrChunks = 0;
+
+        if (fewerThan24bits != 0) {
+            //data not divisible by 24 bit
+            encodedDataLength = (numberTriplets + 1) * 4;
+        } else {
+            // 16 or 8 bit
+            encodedDataLength = numberTriplets * 4;
+        }
+
+        // If the output is to be "chunked" into 76 character sections, 
+        // for compliance with RFC 2045 MIME, then it is important to 
+        // allow for extra length to account for the separator(s)
+        if (isChunked) {
+
+            nbrChunks =
+                (CHUNK_SEPARATOR.length == 0 ? 0 : (int) Math.ceil((float) encodedDataLength / CHUNK_SIZE));
+            encodedDataLength += nbrChunks * CHUNK_SEPARATOR.length;
+        }
+
+        encodedData = new byte[encodedDataLength];
+
+        byte k = 0, l = 0, b1 = 0, b2 = 0, b3 = 0;
+
+        int encodedIndex = 0;
+        int dataIndex = 0;
+        int i = 0;
+        int nextSeparatorIndex = CHUNK_SIZE;
+        int chunksSoFar = 0;
+
+        //log.debug("number of triplets = " + numberTriplets);
+        for (i = 0; i < numberTriplets; i++) {
+            dataIndex = i * 3;
+            b1 = binaryData[dataIndex];
+            b2 = binaryData[dataIndex + 1];
+            b3 = binaryData[dataIndex + 2];
+
+            //log.debug("b1= " + b1 +", b2= " + b2 + ", b3= " + b3);
+
+            l = (byte) (b2 & 0x0f);
+            k = (byte) (b1 & 0x03);
+
+            byte val1 =
+                ((b1 & SIGN) == 0) ? (byte) (b1 >> 2) : (byte) ((b1) >> 2 ^ 0xc0);
+            byte val2 =
+                ((b2 & SIGN) == 0) ? (byte) (b2 >> 4) : (byte) ((b2) >> 4 ^ 0xf0);
+            byte val3 =
+                ((b3 & SIGN) == 0) ? (byte) (b3 >> 6) : (byte) ((b3) >> 6 ^ 0xfc);
+
+            encodedData[encodedIndex] = lookUpBase64Alphabet[val1];
+            //log.debug( "val2 = " + val2 );
+            //log.debug( "k4   = " + (k<<4) );
+            //log.debug(  "vak  = " + (val2 | (k<<4)) );
+            encodedData[encodedIndex + 1] =
+                lookUpBase64Alphabet[val2 | (k << 4)];
+            encodedData[encodedIndex + 2] =
+                lookUpBase64Alphabet[(l << 2) | val3];
+            encodedData[encodedIndex + 3] = lookUpBase64Alphabet[b3 & 0x3f];
+
+            encodedIndex += 4;
+
+            // If we are chunking, let's put a chunk separator down.
+            if (isChunked) {
+                // this assumes that CHUNK_SIZE % 4 == 0
+                if (encodedIndex == nextSeparatorIndex) {
+                    System.arraycopy(
+                        CHUNK_SEPARATOR,
+                        0,
+                        encodedData,
+                        encodedIndex,
+                        CHUNK_SEPARATOR.length);
+                    chunksSoFar++;
+                    nextSeparatorIndex =
+                        (CHUNK_SIZE * (chunksSoFar + 1)) + 
+                        (chunksSoFar * CHUNK_SEPARATOR.length);
+                    encodedIndex += CHUNK_SEPARATOR.length;
+                }
+            }
+        }
+
+        // form integral number of 6-bit groups
+        dataIndex = i * 3;
+
+        if (fewerThan24bits == EIGHTBIT) {
+            b1 = binaryData[dataIndex];
+            k = (byte) (b1 & 0x03);
+            //log.debug("b1=" + b1);
+            //log.debug("b1<<2 = " + (b1>>2) );
+            byte val1 =
+                ((b1 & SIGN) == 0) ? (byte) (b1 >> 2) : (byte) ((b1) >> 2 ^ 0xc0);
+            encodedData[encodedIndex] = lookUpBase64Alphabet[val1];
+            encodedData[encodedIndex + 1] = lookUpBase64Alphabet[k << 4];
+            encodedData[encodedIndex + 2] = PAD;
+            encodedData[encodedIndex + 3] = PAD;
+        } else if (fewerThan24bits == SIXTEENBIT) {
+
+            b1 = binaryData[dataIndex];
+            b2 = binaryData[dataIndex + 1];
+            l = (byte) (b2 & 0x0f);
+            k = (byte) (b1 & 0x03);
+
+            byte val1 =
+                ((b1 & SIGN) == 0) ? (byte) (b1 >> 2) : (byte) ((b1) >> 2 ^ 0xc0);
+            byte val2 =
+                ((b2 & SIGN) == 0) ? (byte) (b2 >> 4) : (byte) ((b2) >> 4 ^ 0xf0);
+
+            encodedData[encodedIndex] = lookUpBase64Alphabet[val1];
+            encodedData[encodedIndex + 1] =
+                lookUpBase64Alphabet[val2 | (k << 4)];
+            encodedData[encodedIndex + 2] = lookUpBase64Alphabet[l << 2];
+            encodedData[encodedIndex + 3] = PAD;
+        }
+
+        if (isChunked) {
+            // we also add a separator to the end of the final chunk.
+            if (chunksSoFar < nbrChunks) {
+                System.arraycopy(
+                    CHUNK_SEPARATOR,
+                    0,
+                    encodedData,
+                    encodedDataLength - CHUNK_SEPARATOR.length,
+                    CHUNK_SEPARATOR.length);
+            }
+        }
+
+        return encodedData;
+    }
+
+    /**
+     * Decodes Base64 data into octects
+     *
+     * @param base64Data Byte array containing Base64 data
+     * @return Array containing decoded data.
+     */
+    public static byte[] decodeBase64(byte[] base64Data) {
+        // RFC 2045 requires that we discard ALL non-Base64 characters
+        base64Data = discardNonBase64(base64Data);
+
+        // handle the edge case, so we don't have to worry about it later
+        if (base64Data.length == 0) {
+            return new byte[0];
+        }
+
+        int numberQuadruple = base64Data.length / FOURBYTE;
+        byte decodedData[] = null;
+        byte b1 = 0, b2 = 0, b3 = 0, b4 = 0, marker0 = 0, marker1 = 0;
+
+        // Throw away anything not in base64Data
+
+        int encodedIndex = 0;
+        int dataIndex = 0;
+        {
+            // this sizes the output array properly - rlw
+            int lastData = base64Data.length;
+            // ignore the '=' padding
+            while (base64Data[lastData - 1] == PAD) {
+                if (--lastData == 0) {
+                    return new byte[0];
+                }
+            }
+            decodedData = new byte[lastData - numberQuadruple];
+        }
+        
+        for (int i = 0; i < numberQuadruple; i++) {
+            dataIndex = i * 4;
+            marker0 = base64Data[dataIndex + 2];
+            marker1 = base64Data[dataIndex + 3];
+            
+            b1 = base64Alphabet[base64Data[dataIndex]];
+            b2 = base64Alphabet[base64Data[dataIndex + 1]];
+            
+            if (marker0 != PAD && marker1 != PAD) {
+                //No PAD e.g 3cQl
+                b3 = base64Alphabet[marker0];
+                b4 = base64Alphabet[marker1];
+                
+                decodedData[encodedIndex] = (byte) (b1 << 2 | b2 >> 4);
+                decodedData[encodedIndex + 1] =
+                    (byte) (((b2 & 0xf) << 4) | ((b3 >> 2) & 0xf));
+                decodedData[encodedIndex + 2] = (byte) (b3 << 6 | b4);
+            } else if (marker0 == PAD) {
+                //Two PAD e.g. 3c[Pad][Pad]
+                decodedData[encodedIndex] = (byte) (b1 << 2 | b2 >> 4);
+            } else if (marker1 == PAD) {
+                //One PAD e.g. 3cQ[Pad]
+                b3 = base64Alphabet[marker0];
+                
+                decodedData[encodedIndex] = (byte) (b1 << 2 | b2 >> 4);
+                decodedData[encodedIndex + 1] =
+                    (byte) (((b2 & 0xf) << 4) | ((b3 >> 2) & 0xf));
+            }
+            encodedIndex += 3;
+        }
+        return decodedData;
+    }
+    
+    /**
+     * Discards any whitespace from a base-64 encoded block.
+     *
+     * @param data The base-64 encoded data to discard the whitespace
+     * from.
+     * @return The data, less whitespace (see RFC 2045).
+     */
+    static byte[] discardWhitespace(byte[] data) {
+        byte groomedData[] = new byte[data.length];
+        int bytesCopied = 0;
+        
+        for (int i = 0; i < data.length; i++) {
+            switch (data[i]) {
+            case (byte) ' ' :
+            case (byte) '\n' :
+            case (byte) '\r' :
+            case (byte) '\t' :
+                    break;
+            default:
+                    groomedData[bytesCopied++] = data[i];
+            }
+        }
+
+        byte packedData[] = new byte[bytesCopied];
+
+        System.arraycopy(groomedData, 0, packedData, 0, bytesCopied);
+
+        return packedData;
+    }
+
+    /**
+     * Discards any characters outside of the base64 alphabet, per
+     * the requirements on page 25 of RFC 2045 - "Any characters
+     * outside of the base64 alphabet are to be ignored in base64
+     * encoded data."
+     *
+     * @param data The base-64 encoded data to groom
+     * @return The data, less non-base64 characters (see RFC 2045).
+     */
+    static byte[] discardNonBase64(byte[] data) {
+        byte groomedData[] = new byte[data.length];
+        int bytesCopied = 0;
+
+        for (int i = 0; i < data.length; i++) {
+            if (isBase64(data[i])) {
+                groomedData[bytesCopied++] = data[i];
+            }
+        }
+
+        byte packedData[] = new byte[bytesCopied];
+
+        System.arraycopy(groomedData, 0, packedData, 0, bytesCopied);
+
+        return packedData;
+    }
+
+
+    // Implementation of the Encoder Interface
+
+    /**
+     * Encodes an Object using the base64 algorithm.  This method
+     * is provided in order to satisfy the requirements of the
+     * Encoder interface, and will throw an EncoderException if the
+     * supplied object is not of type byte[].
+     *
+     * @param pObject Object to encode
+     * @return An object (of type byte[]) containing the 
+     *         base64 encoded data which corresponds to the byte[] supplied.
+     * @throws EncoderException if the parameter supplied is not
+     *                          of type byte[]
+     */
+    public Object encode(Object pObject) throws EncoderException {
+        if (!(pObject instanceof byte[])) {
+            throw new EncoderException(Messages.getMessage(Messages.NO_BYTE_ARRAY_ERROR));
+        }
+        return encode((byte[]) pObject);
+    }
+
+    /**
+     * Encodes a byte[] containing binary data, into a byte[] containing
+     * characters in the Base64 alphabet.
+     *
+     * @param pArray a byte array containing binary data
+     * @return A byte array containing only Base64 character data
+     */
+    public byte[] encode(byte[] pArray) {
+        return encodeBase64(pArray, false);
+    }
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/base64/URLCodec.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/base64/URLCodec.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/base64/URLCodec.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,499 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+
+ * Copyright 2001-2004 The Apache Software Foundation.
+
+ * 
+
+ * Licensed under the Apache License, Version 2.0 (the "License");
+
+ * you may not use this file except in compliance with the License.
+
+ * You may obtain a copy of the License at
+
+ * 
+
+ *      http://www.apache.org/licenses/LICENSE-2.0
+
+ * 
+
+ * Unless required by applicable law or agreed to in writing, software
+
+ * distributed under the License is distributed on an "AS IS" BASIS,
+
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
+ * See the License for the specific language governing permissions and
+
+ * limitations under the License.
+
+ */ 
+
+
+
+package org.ajax4jsf.framework.util.base64;
+
+
+
+import java.io.ByteArrayOutputStream;
+
+import java.util.BitSet;
+
+
+
+/**
+
+ * <p>Implements the 'www-form-urlencoded' encoding scheme, 
+
+ * also misleadingly known as URL encoding.</p>
+
+ *  
+
+ * <p>For more detailed information please refer to 
+
+ * <a href="http://www.w3.org/TR/html4/interact/forms.html#h-17.13.4.1">
+
+ * Chapter 17.13.4 'Form content types'</a> of the 
+
+ * <a href="http://www.w3.org/TR/html4/">HTML 4.01 Specification<a></p>
+
+ * 
+
+ * <p> 
+
+ * This codec is meant to be a replacement for standard Java classes
+
+ * {@link java.net.URLEncoder} and {@link java.net.URLDecoder} 
+
+ * on older Java platforms, as these classes in Java versions below 
+
+ * 1.4 rely on the platform's default charset encoding.
+
+ * </p>
+
+ * 
+
+ * @author Apache Software Foundation
+
+ * @since 1.2
+
+ * @version $Id: URLCodec.java,v 1.1.2.1 2007/01/09 18:59:14 alexsmirnov Exp $
+
+ */
+
+public class URLCodec implements BinaryEncoder, BinaryDecoder {
+
+    
+
+    protected static byte ESCAPE_CHAR = '%';
+
+    /**
+
+     * BitSet of www-form-url safe characters.
+
+     */
+
+    protected static final BitSet WWW_FORM_URL = new BitSet(256);
+
+    
+
+    // Static initializer for www_form_url
+
+    static {
+
+        // alpha characters
+
+        for (int i = 'a'; i <= 'z'; i++) {
+
+            WWW_FORM_URL.set(i);
+
+        }
+
+        for (int i = 'A'; i <= 'Z'; i++) {
+
+            WWW_FORM_URL.set(i);
+
+        }
+
+        // numeric characters
+
+        for (int i = '0'; i <= '9'; i++) {
+
+            WWW_FORM_URL.set(i);
+
+        }
+
+        // special chars
+
+        WWW_FORM_URL.set('-');
+
+        WWW_FORM_URL.set('_');
+
+        WWW_FORM_URL.set('.');
+
+        WWW_FORM_URL.set('*');
+
+        // blank to be replaced with +
+
+        WWW_FORM_URL.set(' ');
+
+    }
+
+
+
+
+
+    /**
+
+     * Default constructor.
+
+     */
+
+    public URLCodec() {
+
+        super();
+
+    }
+
+
+
+    public static final byte[] encodeUrl( byte[] bytes) 
+
+    {
+
+    	return encodeUrl(WWW_FORM_URL, bytes);
+
+    }
+
+    /**
+
+     * Encodes an array of bytes into an array of URL safe 7-bit 
+
+     * characters. Unsafe characters are escaped.
+
+     *
+
+     * @param urlsafe bitset of characters deemed URL safe
+
+     * @param bytes array of bytes to convert to URL safe characters
+
+     * @return array of bytes containing URL safe characters
+
+     */
+
+    public static final byte[] encodeUrl(BitSet urlsafe, byte[] bytes) 
+
+    {
+
+        if (bytes == null) {
+
+            return null;
+
+        }
+
+        if (urlsafe == null) {
+
+            urlsafe = WWW_FORM_URL;
+
+        }
+
+        
+
+        ByteArrayOutputStream buffer = new ByteArrayOutputStream(); 
+
+        for (int i = 0; i < bytes.length; i++) {
+
+            int b = bytes[i];
+
+            if (b < 0) {
+
+                b = 256 + b;
+
+            }
+
+            if (urlsafe.get(b)) {
+
+                if (b == ' ') {
+
+                    b = '+';
+
+                }
+
+                buffer.write(b);
+
+            } else {
+
+                buffer.write('%');
+
+                char hex1 = Character.toUpperCase(
+
+                  Character.forDigit((b >> 4) & 0xF, 16));
+
+                char hex2 = Character.toUpperCase(
+
+                  Character.forDigit(b & 0xF, 16));
+
+                buffer.write(hex1);
+
+                buffer.write(hex2);
+
+            }
+
+        }
+
+        return buffer.toByteArray(); 
+
+    }
+
+
+
+
+
+    /**
+
+     * Decodes an array of URL safe 7-bit characters into an array of 
+
+     * original bytes. Escaped characters are converted back to their 
+
+     * original representation.
+
+     *
+
+     * @param bytes array of URL safe characters
+
+     * @return array of original bytes 
+
+     * @throws DecoderException Thrown if URL decoding is unsuccessful
+
+     */
+
+    public static final byte[] decodeUrl(byte[] bytes) 
+
+         throws DecoderException
+
+    {
+
+        if (bytes == null) {
+
+            return null;
+
+        }
+
+        ByteArrayOutputStream buffer = new ByteArrayOutputStream(); 
+
+        for (int i = 0; i < bytes.length; i++) {
+
+            int b = bytes[i];
+
+            if (b == '+') {
+
+                buffer.write(' ');
+
+            } else if (b == '%') {
+
+                try {
+
+                    int u = Character.digit((char)bytes[++i], 16);
+
+                    int l = Character.digit((char)bytes[++i], 16);
+
+                    if (u == -1 || l == -1) {
+
+                        throw new DecoderException("Invalid URL encoding");
+
+                    }
+
+                    buffer.write((char)((u << 4) + l));
+
+                } catch(ArrayIndexOutOfBoundsException e) {
+
+                    throw new DecoderException("Invalid URL encoding");
+
+                }
+
+            } else {
+
+                buffer.write(b);
+
+            }
+
+        }
+
+        return buffer.toByteArray(); 
+
+    }
+
+
+
+
+
+    /**
+
+     * Encodes an array of bytes into an array of URL safe 7-bit 
+
+     * characters. Unsafe characters are escaped.
+
+     *
+
+     * @param bytes array of bytes to convert to URL safe characters
+
+     * @return array of bytes containing URL safe characters
+
+     */
+
+    public byte[] encode(byte[] bytes) {
+
+        return encodeUrl(WWW_FORM_URL, bytes);
+
+    }
+
+
+
+
+
+    /**
+
+     * Decodes an array of URL safe 7-bit characters into an array of 
+
+     * original bytes. Escaped characters are converted back to their 
+
+     * original representation.
+
+     *
+
+     * @param bytes array of URL safe characters
+
+     * @return array of original bytes 
+
+     * @throws DecoderException Thrown if URL decoding is unsuccessful
+
+     */
+
+    public byte[] decode(byte[] bytes) throws DecoderException {
+
+        return decodeUrl(bytes);
+
+    }
+
+
+
+
+
+    /**
+
+     * Encodes an object into its URL safe form. Unsafe characters are 
+
+     * escaped.
+
+     *
+
+     * @param pObject string to convert to a URL safe form
+
+     * @return URL safe object
+
+     * @throws EncoderException Thrown if URL encoding is not 
+
+     *                          applicable to objects of this type or
+
+     *                          if encoding is unsuccessful
+
+     */
+
+    public Object encode(Object pObject) throws EncoderException {
+
+        if (pObject == null) {
+
+            return null;
+
+        } else if (pObject instanceof byte[]) {
+
+            return encode((byte[])pObject);
+
+        } else if (pObject instanceof String) {
+
+            return encode((String)pObject);
+
+        } else {
+
+            throw new EncoderException("Objects of type " +
+
+                pObject.getClass().getName() + " cannot be URL encoded"); 
+
+              
+
+        }
+
+    }
+
+
+
+    /**
+
+     * Decodes a URL safe object into its original form. Escaped 
+
+     * characters are converted back to their original representation.
+
+     *
+
+     * @param pObject URL safe object to convert into its original form
+
+     * @return original object 
+
+     * @throws DecoderException Thrown if URL decoding is not 
+
+     *                          applicable to objects of this type
+
+     *                          if decoding is unsuccessful
+
+     */
+
+    public Object decode(Object pObject) throws DecoderException {
+
+        if (pObject == null) {
+
+            return null;
+
+        } else if (pObject instanceof byte[]) {
+
+            return decode((byte[])pObject);
+
+        } else if (pObject instanceof String) {
+
+            return decode((String)pObject);
+
+        } else {
+
+            throw new DecoderException("Objects of type " +
+
+                pObject.getClass().getName() + " cannot be URL decoded"); 
+
+              
+
+        }
+
+    }
+
+
+
+}
+

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/command/CommandScript.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/command/CommandScript.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/command/CommandScript.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,37 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.util.command;
+
+import org.ajax4jsf.framework.resource.ClientScript;
+
+public class CommandScript extends ClientScript {
+
+	
+	public String getJavaScript() {
+		return "command.js";
+	}
+
+	protected boolean isUsePrototype() {
+		return true;
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/command/CommandScriptBuilder.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/command/CommandScriptBuilder.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/command/CommandScriptBuilder.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,162 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.util.command;
+
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import javax.faces.component.UICommand;
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIParameter;
+
+import org.ajax4jsf.framework.renderer.RendererUtils.HTML;
+import org.ajax4jsf.framework.resource.ClientScript;
+import org.ajax4jsf.framework.util.InputUtils;
+import org.ajax4jsf.framework.util.javascript.JSFunction;
+import org.ajax4jsf.framework.util.javascript.JSReference;
+import org.ajax4jsf.framework.util.javascript.ScriptString;
+/**
+ * Utility class to build command links, buttons etc.
+ * Introduces correct parameter escaping
+ * @author Maksim Kaszynski
+ *
+ */
+public class CommandScriptBuilder {
+	public static final ClientScript SCRIPT = new CommandScript();
+
+	private static final ScriptString JSR_EVENT =  new JSReference("(event || window.event)");
+	
+	private boolean checkActionAndListener = true;
+	private StringBuffer codeAfter = new StringBuffer();
+	private StringBuffer codeBefore = new StringBuffer();
+	private UICommand component;
+	private Map parameters;
+	private String target;
+	private boolean useOriginalOnclick = true;
+	
+	public CommandScriptBuilder(UICommand command) {
+		this.component = command;
+		collectParams();
+	}
+	
+	public void addCodeAfter(String codeAfter) {
+		this.codeAfter.append(codeAfter);
+	}
+	
+	public void addCodeBefore(String codeBefore) {
+		this.codeBefore.append(codeBefore);
+	}
+	
+	public void addParameter(String name, Object value) {
+		if (parameters == null) {
+			parameters = new LinkedHashMap();
+		}
+		parameters.put(name, value);
+	}
+	
+	
+	
+	private void addParameter(UIParameter parameter) {
+		addParameter(parameter.getName(), parameter.getValue());
+	}
+
+	private void collectParams () {
+		for (Iterator iter = component.getChildren().iterator(); iter.hasNext();) {
+			UIComponent kid = (UIComponent) iter.next();
+			if (kid instanceof UIParameter) {
+				addParameter((UIParameter) kid);
+			}
+		}
+		
+	}
+
+	public StringBuffer getScript() {
+		StringBuffer script = new StringBuffer();
+		
+		script.append(codeBefore).append(";");
+		
+		if (useOriginalOnclick) {
+			Object onclick = component.getAttributes().get(HTML.onclick_ATTRIBUTE);
+			
+			if (onclick != null) {
+				script.append(onclick).append(";");
+			}
+		}
+		
+		
+		if (shouldGenerateAction()) {
+			JSFunction function = new JSFunction("new A4J_Command");
+			function.addParameter(JSR_EVENT);
+			function.addParameter(parameters);
+			function.addParameter(target);
+			
+			function.appendScript(script);
+			script.append(";");
+		}
+		
+		
+		script.append(codeAfter).append(";");
+		
+		return script;
+	}
+
+	public String getTarget() {
+		return target;
+	}
+	
+	private boolean hasActionOrListenerSet() {
+		return (component.getAction() != null) || (component.getActionListener() != null);
+	}
+	
+	public boolean isCheckActionAndListener() {
+		return checkActionAndListener;
+	}
+	
+	public boolean isUseOriginalOnclick() {
+		return useOriginalOnclick;
+	}
+	
+	public void setCheckActionAndListener(boolean checkActionAndListener) {
+		this.checkActionAndListener = checkActionAndListener;
+	}
+
+	public void setTarget(String target) {
+		this.target = target;
+	}
+	
+	public void setUseOriginalOnclick(boolean useOriginalOnclick) {
+		this.useOriginalOnclick = useOriginalOnclick;
+	}
+	
+	private boolean shouldGenerateAction() {
+		
+		return (!InputUtils.isDisabled(component)) && (checkActionAndListener ? hasActionOrListenerSet() : true);
+		
+	}
+	
+	public String toString() {
+		return getScript().toString();
+	}
+	
+	
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/config/FilterBean.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/config/FilterBean.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/config/FilterBean.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,109 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.util.config;
+
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:58:58 $
+ *
+ */
+public class FilterBean {
+	private String _filterName;
+	private String _filterClass;
+	private String _displayName;
+	private String _description;
+	private Set _filterMappings = new HashSet();
+	private Set _servlets = new HashSet();
+
+	/**
+	 * @return Returns the description.
+	 */
+	public String getDescription() {
+		return _description;
+	}
+	/**
+	 * @param description The description to set.
+	 */
+	public void setDescription(String description) {
+		_description = description;
+	}
+	/**
+	 * @return Returns the displayName.
+	 */
+	public String getDisplayName() {
+		return _displayName;
+	}
+	/**
+	 * @param displayName The displayName to set.
+	 */
+	public void setDisplayName(String displayName) {
+		_displayName = displayName;
+	}
+	/**
+	 * @return Returns the servletClass.
+	 */
+	public String getFilterClass() {
+		return _filterClass;
+	}
+	/**
+	 * @param servletClass The servletClass to set.
+	 */
+	public void setFilterClass(String servletClass) {
+		_filterClass = servletClass;
+	}
+	/**
+	 * @return Returns the servletName.
+	 */
+	public String getFilterName() {
+		return _filterName;
+	}
+	/**
+	 * @param servletName The servletName to set.
+	 */
+	public void setFilterName(String servletName) {
+		_filterName = servletName.trim();
+	}
+	/* (non-Javadoc)
+	 * @see java.util.Map#keySet()
+	 */
+	public Set getMappings() {
+		return _filterMappings;
+	}
+	/* (non-Javadoc)
+	 * @see java.util.Map#put(java.lang.Object, java.lang.Object)
+	 */
+	void addMapping(String mapping) {
+		_filterMappings.add(mapping);
+	}
+	
+	public void addServlet(String servlet) {
+		_servlets.add(servlet.trim());
+		
+	}
+	public Set getServlets() {
+		return _servlets;
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/config/ServletBean.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/config/ServletBean.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/config/ServletBean.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,100 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.util.config;
+
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:58:59 $
+ *
+ */
+public class ServletBean {
+	private String _servletName;
+	private String _servletClass;
+	private String _displayName;
+	private String _description;
+	private Set _servletMappings = new HashSet();
+	/**
+	 * @return Returns the description.
+	 */
+	public String getDescription() {
+		return _description;
+	}
+	/**
+	 * @param description The description to set.
+	 */
+	public void setDescription(String description) {
+		_description = description;
+	}
+	/**
+	 * @return Returns the displayName.
+	 */
+	public String getDisplayName() {
+		return _displayName;
+	}
+	/**
+	 * @param displayName The displayName to set.
+	 */
+	public void setDisplayName(String displayName) {
+		_displayName = displayName;
+	}
+	/**
+	 * @return Returns the servletClass.
+	 */
+	public String getServletClass() {
+		return _servletClass;
+	}
+	/**
+	 * @param servletClass The servletClass to set.
+	 */
+	public void setServletClass(String servletClass) {
+		_servletClass = servletClass;
+	}
+	/**
+	 * @return Returns the servletName.
+	 */
+	public String getServletName() {
+		return _servletName;
+	}
+	/**
+	 * @param servletName The servletName to set.
+	 */
+	public void setServletName(String servletName) {
+		_servletName = servletName.trim();
+	}
+	/* (non-Javadoc)
+	 * @see java.util.Map#keySet()
+	 */
+	public Set getMappings() {
+		return _servletMappings;
+	}
+	/* (non-Javadoc)
+	 * @see java.util.Map#put(java.lang.Object, java.lang.Object)
+	 */
+	void addMapping(String mapping) {
+		_servletMappings.add(mapping);
+	}
+
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/config/WebXml.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/config/WebXml.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/config/WebXml.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,433 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.util.config;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Serializable;
+import java.io.StringReader;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+
+import javax.faces.context.FacesContext;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+
+import org.ajax4jsf.framework.util.message.Messages;
+import org.apache.commons.digester.Digester;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.xml.sax.EntityResolver;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+import org.xml.sax.helpers.LocatorImpl;
+
+/**
+ * Parse at startup application web.xml and store servlet and filter mappings.
+ * at runtime, used for convert resource key to uri, and vice versa.
+ * 
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:58:59 $
+ * 
+ */
+public class WebXml implements Serializable {
+
+	public static final String CONTEXT_ATTRIBUTE = WebXml.class.getName();
+
+	/**
+     * 
+     */
+    private static final long serialVersionUID = -9042908418843695017L;
+
+	private static final Log _log = LogFactory.getLog(WebXml.class);
+
+	static final String WEB_XML = "/WEB-INF/web.xml";
+	
+
+	public static final String RESOURCE_URI_PREFIX = "a4j.res/";
+
+	static final String RESOURCE_URI_PREFIX_WITH_SLASH = "/"
+			+ RESOURCE_URI_PREFIX;
+
+	/**
+	 * Prefix for Resourse-Ajax filter, in common must be same as for
+	 * {@link javax.faces.webapp.FacesServlet}
+	 */
+	private String _facesFilterPrefix = null;
+
+	/**
+	 * Suffix for Resource-Ajax filter , in common must be same as for
+	 * {@link javax.faces.webapp.FacesServlet}
+	 */
+	private String _facesFilterSuffix = null;
+
+	private boolean _prefixMapping = false;
+
+	private String _filterName;
+
+	private Map _servlets = new HashMap();
+
+	private Map _filters = new HashMap();
+
+	/**
+	 * Prefix for resources handled by Chameleon framework.
+	 */
+	private String _resourcePrefix = RESOURCE_URI_PREFIX_WITH_SLASH;
+
+
+	/**
+	 * Parse application web.xml configuration and detect mapping for resources
+	 * and logs.
+	 * @param context
+	 * @param filterName
+	 * @throws ServletException
+	 */
+	public void init(ServletContext context, String filterName) throws ServletException {
+	    InputStream webXml = context.getResourceAsStream(WEB_XML);
+	    if (null == webXml) {
+	    	throw new ServletException(Messages.getMessage(
+	    			Messages.GET_RESOURCE_AS_STREAM_ERROR, WEB_XML));
+	    }
+	    Digester dig = new Digester();
+	    dig.setDocumentLocator(new LocatorImpl());
+	    // Disable xml validations at all - web.xml already validated by
+	    // container
+	    dig.setValidating(false);
+	    dig.setEntityResolver(new EntityResolver() {
+	    	// Dummi resolver - alvays do nothing
+	    	public InputSource resolveEntity(String publicId, String systemId)
+	    			throws SAXException, IOException {
+	    		return new InputSource(new StringReader(""));
+	    	}
+
+	    });
+	    dig.setNamespaceAware(false);
+	    // dig.setUseContextClassLoader(true);
+	    dig.setClassLoader(this.getClass().getClassLoader());
+	    // Parsing rules.
+	    // Servlets.
+	    String path = "web-app/servlet";
+	    dig.addObjectCreate(path, ServletBean.class);
+	    dig.addBeanPropertySetter(path + "/servlet-name", "servletName");
+	    dig.addBeanPropertySetter(path + "/servlet-class", "servletClass");
+	    dig.addBeanPropertySetter(path + "/display-name", "displayName");
+	    dig.addBeanPropertySetter(path + "/description");
+	    dig.addSetNext(path, "addServlet");
+	    // Filters
+	    path = "web-app/filter";
+	    dig.addObjectCreate(path, FilterBean.class);
+	    dig.addBeanPropertySetter(path + "/filter-name", "filterName");
+	    dig.addBeanPropertySetter(path + "/filter-class", "filterClass");
+	    dig.addBeanPropertySetter(path + "/display-name", "displayName");
+	    dig.addBeanPropertySetter(path + "/description");
+	    dig.addSetNext(path, "addFilter");
+	    // Servlet mappings
+	    path = "web-app/servlet-mapping";
+	    dig.addCallMethod(path, "addServletMapping", 2);
+	    dig.addCallParam(path + "/servlet-name", 0);
+	    dig.addCallParam(path + "/url-pattern", 1);
+	    // Filter mappings
+	    // TODO - parse dispatcher.
+	    path = "web-app/filter-mapping";
+	    dig.addCallMethod(path, "addFilterMapping", 3);
+	    dig.addCallParam(path + "/filter-name", 0);
+	    dig.addCallParam(path + "/url-pattern", 1);
+	    dig.addCallParam(path + "/servlet-name", 2);
+	    dig.push(this);
+	    try {
+	    	dig.parse(webXml);
+	    	this.setFilterName(filterName);
+	    	// Store Instance to context attribute.
+	    	context.setAttribute(CONTEXT_ATTRIBUTE,this);
+	    } catch (IOException e) {
+	    	String message = Messages
+	    			.getMessage(Messages.PARSING_WEB_XML_IO_ERROR);
+	    	_log.error(message, e);
+	    	throw new ServletException(message, e);
+	    } catch (SAXException e) {
+	    	String message = Messages
+	    			.getMessage(Messages.PARSING_WEB_XML_SAX_ERROR);
+	    	_log.error(message, e);
+	    	throw new ServletException(message, e);
+	    } finally {
+	    	try {
+	    		webXml.close();
+	    	} catch (IOException e) {
+	    		// this exception don't affect any aspects of work and can be
+	    		// ignored.
+	    	}
+	    }
+	}
+
+	public void addServlet(ServletBean bean) {
+		String name = bean.getServletName();
+		if (null != name) {
+			_servlets.put(name, bean);
+		}
+	}
+
+	public void addFilter(FilterBean bean) {
+		String name = bean.getFilterName();
+		if (null != name) {
+			_filters.put(name, bean);
+		}
+
+	}
+
+	public void addServletMapping(String servletName, String mapping) {
+		ServletBean servletBean = (ServletBean) _servlets.get(servletName);
+		if (null != servletBean) {
+			(servletBean).addMapping(mapping);
+		}
+	}
+
+	public void addFilterMapping(String filterName, String mapping,
+			String servlet) {
+		FilterBean filterBean = (FilterBean) _filters.get(filterName);
+		if (null != filterBean) {
+			if (null != mapping) {
+				(filterBean).addMapping(mapping);
+			}
+			if (null != servlet) {
+				(filterBean).addServlet(servlet);
+			}
+		}
+	}
+
+	/**
+	 * Convert {@link org.ajax4jsf.framework.resource.InternetResource } key to
+	 * real URL for handle by chameleon filter, depend of mapping in WEB.XML .
+	 * For prefix or * mapping, prepend servlet prefix and default Resource
+	 * prefix to key. For suffix mapping, prepend with resource prefix and
+	 * append default faces suffix to URL ( before request param ). After
+	 * conversion, call
+	 * {@link javax.faces.application.ViewHandler#getResourceURL(javax.faces.context.FacesContext, java.lang.String)}
+	 * and
+	 * {@link javax.faces.context.ExternalContext#encodeResourceURL(java.lang.String)} .
+	 * 
+	 * @param context
+	 * @param Url
+	 * @return
+	 */
+	public String getFacesResourceURL(FacesContext context, String Url) {
+		StringBuffer buf = new StringBuffer();
+		buf.append(getResourcePrefix()).append(Url);
+		// Insert suffix mapping
+		if (isPrefixMapping()) {
+			buf.insert(0, getFacesFilterPrefix());
+		} else {
+			int index;
+			if ((index = buf.indexOf("?")) >= 0) {
+				buf.insert(index, getFacesFilterSuffix());
+			} else {
+				buf.append(getFacesFilterSuffix());
+			}
+		}
+		String resourceURL = context.getApplication().getViewHandler()
+				.getResourceURL(context, buf.toString());
+		return resourceURL;
+
+	}
+
+	/**
+	 * Detect request to resource and extract key from request
+	 * 
+	 * @param request
+	 *            current http request
+	 * @return resource key, or null for ordinary faces request.
+	 */
+	public String getFacesResourceKey(HttpServletRequest request) {
+		String resourcePath = request.getRequestURI().substring(
+				request.getContextPath().length());// isPrefixMapping()?request.getPathInfo():request.getServletPath();
+		// Remove JSESSIONID - for expired sessions it will merged to path.
+		int jsesionidStart;
+		if ((jsesionidStart = resourcePath.lastIndexOf(";jsessionid")) >= 0) {
+			resourcePath = resourcePath.substring(0, jsesionidStart);
+		}
+		if (isPrefixMapping()) {
+			if (resourcePath.startsWith(getFacesFilterPrefix()
+					+ getResourcePrefix())) {
+				return resourcePath.substring(getFacesFilterPrefix().length()
+						+ getResourcePrefix().length());
+			}
+		} else if (resourcePath.startsWith(getResourcePrefix())) {
+			return resourcePath.substring(getResourcePrefix().length(),
+					resourcePath.length() - getFacesFilterSuffix().length());
+		}
+		return null;
+	}
+
+	/**
+	 * Detect request to {@link javax.faces.webapp.FacesServlet}
+	 * 
+	 * @param request
+	 * @return true if request parsed to JSF.
+	 */
+	public boolean isFacesRequest(HttpServletRequest request) {
+		// String resourcePath =
+		// request.getRequestURI().substring(request.getContextPath().length());//isPrefixMapping()?request.getPathInfo():request.getServletPath();
+		// if(isPrefixMapping() ) {
+		// if (resourcePath.startsWith(getFacesFilterPrefix())) {
+		// return true;
+		// }
+		// } else if (resourcePath.endsWith(getFacesFilterSuffix())) {
+		// return true;
+		// }
+		// return false;
+		return true;
+	}
+
+	/**
+	 * @return Returns the facesFilterPrefix.
+	 */
+	public String getFacesFilterPrefix() {
+		return _facesFilterPrefix;
+	}
+
+	/**
+	 * @param facesFilterPrefix
+	 *            The facesFilterPrefix to set.
+	 */
+	void setFacesFilterPrefix(String facesFilterPrefix) {
+		_facesFilterPrefix = facesFilterPrefix;
+	}
+
+	/**
+	 * @return Returns the facesFilterSuffix.
+	 */
+	public String getFacesFilterSuffix() {
+		return _facesFilterSuffix;
+	}
+
+	/**
+	 * @param facesFilterSuffix
+	 *            The facesFilterSuffix to set.
+	 */
+	void setFacesFilterSuffix(String facesFilterSuffix) {
+		_facesFilterSuffix = facesFilterSuffix;
+	}
+
+	/**
+	 * @return Returns the resourcePrefix.
+	 */
+	public String getResourcePrefix() {
+		return _resourcePrefix;
+	}
+
+	/**
+	 * @param resourcePrefix
+	 *            The resourcePrefix to set.
+	 */
+	void setResourcePrefix(String resourcePrefix) {
+		_resourcePrefix = resourcePrefix;
+	}
+
+	/**
+	 * @return Returns the filterName.
+	 */
+	public String getFilterName() {
+		return _filterName;
+	}
+
+	/**
+	 * After parsing web.xml set chameleon filter name, for wich we must
+	 * calculate mappings for resources, logs etc.
+	 * 
+	 * @param filterName
+	 *            The filterName to set.
+	 */
+	void setFilterName(String filterName) {
+		if (null == filterName) {
+			_log.warn(Messages.getMessage(Messages.NULL_FILTER_NAME_WARNING));
+			return;
+		}
+		_filterName = filterName.trim();
+		// get config for this filter
+		FilterBean filter = (FilterBean) _filters.get(_filterName);
+		if (null == filter) {
+			_log.warn(Messages.getMessage(Messages.FILTER_NOT_FOUND_ERROR,
+					_filterName));
+			throw new IllegalStateException(Messages.getMessage(
+					Messages.FILTER_NOT_FOUND_ERROR, filterName));
+		}
+		// find faces servlet
+		checkMapping(filter.getMappings());
+		// Filter mapped only to servlet.
+		if (_facesFilterPrefix == null && _facesFilterSuffix == null) {
+			for (Iterator sevlets = filter.getServlets().iterator(); sevlets
+					.hasNext()
+					&& _facesFilterPrefix == null && _facesFilterSuffix == null;) {
+				String servletname = (String) sevlets.next();
+				ServletBean servlet = (ServletBean) _servlets.get(servletname);
+				if (null != servlet) {
+					checkMapping(servlet.getMappings());
+				}
+			}
+		}
+		if (null != _facesFilterPrefix) {
+			_prefixMapping = true;
+			if (_facesFilterPrefix.endsWith("/")) {
+				setResourcePrefix(RESOURCE_URI_PREFIX);
+			} else {
+				setResourcePrefix(RESOURCE_URI_PREFIX_WITH_SLASH);
+			}
+		} else if (null != _facesFilterSuffix) {
+			_prefixMapping = false;
+			setResourcePrefix(RESOURCE_URI_PREFIX_WITH_SLASH);
+		} else {
+			throw new IllegalStateException(Messages.getMessage(
+					Messages.NO_PREFIX_OR_SUFFIX_IN_FILTER_MAPPING_ERROR,
+					filterName));
+		}
+	}
+
+	private void checkMapping(Set mappings) {
+		if (null != mappings) {
+			for (Iterator iter = mappings.iterator(); iter.hasNext();) {
+				String mapping = (String) iter.next();
+				// first test - for prefix, like /xxx/*
+				// TODO - select correct dispatcher.
+				if (mapping.endsWith("*")) {
+					setFacesFilterPrefix(mapping.substring(0,
+							mapping.length() - 1));
+					break;
+				} else
+				// test for suffix mapping, eg *.xxx
+				if (mapping.startsWith("*")) {
+					setFacesFilterSuffix(mapping.substring(1));
+				} else {
+					// Fixed mapping - do not use it.
+				}
+			}
+		}
+	}
+
+	/**
+	 * @return Returns the prefixMapping.
+	 */
+	public boolean isPrefixMapping() {
+		return _prefixMapping;
+	}
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/DiffusionFilterOp.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/DiffusionFilterOp.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/DiffusionFilterOp.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,268 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Helma License Notice
+ *
+ * The contents of this file are subject to the Helma License
+ * Version 2.0 (the "License"). You may not use this file except in
+ * compliance with the License. A copy of the License is available at
+ * http://adele.helma.org/download/helma/license.txt
+ *
+ * Copyright 1998-2003 Helma Software. All Rights Reserved.
+ *
+ * $RCSfile: DiffusionFilterOp.java,v $
+ * $Author: alexsmirnov $
+ * $Revision: 1.1.2.1 $
+ * $Date: 2007/01/09 18:59:06 $
+ */
+
+/*
+ * Code from com.jhlabs.image.DiffusionFilter, Java Image Processing
+ * Copyright (C) Jerry Huxtable 1998
+ * http://www.jhlabs.com/ip/
+ * 
+ * Conversion to a BufferedImageOp inspired by:
+ * http://www.peter-cockerell.net:8080/java/FloydSteinberg/FloydSteinbergFilterOp.java
+ * 
+ */
+
+package org.ajax4jsf.framework.util.image;
+
+import java.awt.RenderingHints;
+import java.awt.geom.Point2D;
+import java.awt.geom.Rectangle2D;
+import java.awt.image.BufferedImage;
+import java.awt.image.BufferedImageOp;
+import java.awt.image.ColorModel;
+import java.awt.image.DataBufferByte;
+import java.awt.image.DataBufferInt;
+import java.awt.image.IndexColorModel;
+
+import org.ajax4jsf.framework.util.message.Messages;
+
+public class DiffusionFilterOp implements BufferedImageOp {
+	
+	protected final static int[] diffusionMatrix = {
+		 0, 0, 0,
+		 0, 0, 7,
+		 3, 5, 1,
+	};
+
+	private int[] matrix;
+    private int sum;
+    private boolean serpentine = true;
+    private int[] colorMap;
+
+    /**
+     * Construct a DiffusionFilter
+     */
+    public DiffusionFilterOp() {
+        setMatrix(diffusionMatrix);
+    }
+
+    /**
+     * Set whether to use a serpentine pattern for return or not. This can reduce 'avalanche' artifacts in the output.
+     * @param serpentine true to use serpentine pattern
+     */
+    public void setSerpentine(boolean serpentine) {
+        this.serpentine = serpentine;
+    }
+
+    /**
+     * Return the serpentine setting
+     * @return the current setting
+     */
+    public boolean getSerpentine() {
+        return serpentine;
+    }
+
+    public void setMatrix(int[] matrix) {
+        this.matrix = matrix;
+        sum = 0;
+        for (int i = 0; i < matrix.length; i++)
+            sum += matrix[i];
+    }
+
+    public int[] getMatrix() {
+        return matrix;
+    }
+
+    /**
+     * Do the filter operation
+     * 
+     * @param src The source BufferedImage. Can be any type.
+     * @param dst The destination image. If not null, must be of type TYPE_BYTE_INDEXED
+     * @return A dithered version of src in a BufferedImage of type TYPE_BYTE_INDEXED
+     */
+    public BufferedImage filter(BufferedImage src, BufferedImage dst) {
+
+        // If there's no dest. create one
+        if (dst == null)
+            dst = createCompatibleDestImage(src, null);
+
+        // Otherwise check that the provided dest is an indexed image
+        else if (dst.getType() != BufferedImage.TYPE_BYTE_INDEXED) {
+            throw new IllegalArgumentException(Messages.getMessage(Messages.BUFFER_TYPE_ERROR));
+        }
+
+        DataBufferByte dstBuffer = (DataBufferByte) dst.getRaster().getDataBuffer();
+        byte dstData[] = dstBuffer.getData();
+
+        // Other things to test are pixel bit strides, scanline stride and transfer type
+        // Same goes for the source image
+
+        IndexColorModel icm = (IndexColorModel) dst.getColorModel();
+        colorMap = new int[icm.getMapSize()];
+        icm.getRGBs(colorMap);
+
+        int width = src.getWidth();
+        int height = src.getHeight();
+
+        DataBufferInt srcBuffer = (DataBufferInt) src.getRaster().getDataBuffer();
+        int srcData[] = srcBuffer.getData();
+
+        // This is the offset into the buffer of the current source pixel
+        int index = 0;
+
+        // Loop through each pixel
+        for (int y = 0; y < height; y++) {
+            boolean reverse = serpentine && (y & 1) == 1;
+            int direction;
+            if (reverse) {
+                index = y * width + width - 1;
+                direction = -1;
+            } else {
+                index = y * width;
+                direction = 1;
+            }
+            for (int x = 0; x < width; x++) {
+                int rgb1 = srcData[index];
+                int a1 = (rgb1 >> 24) & 0xff;
+                int r1 = (rgb1 >> 16) & 0xff;
+                int g1 = (rgb1 >> 8) & 0xff;
+                int b1 = rgb1 & 0xff;
+
+                int idx = findIndex(r1, g1, b1, a1);
+                dstData[index] = (byte) idx;
+
+                int rgb2 = colorMap[idx];
+                int a2 = (rgb2 >> 24) & 0xff;
+                int r2 = (rgb2 >> 16) & 0xff;
+                int g2 = (rgb2 >> 8) & 0xff;
+                int b2 = rgb2 & 0xff;
+
+                int er = r1 - r2;
+                int eg = g1 - g2;
+                int eb = b1 - b2;
+                int ea = a1 - a2;
+
+                for (int i = -1; i <= 1; i++) {
+                    int iy = i + y;
+                    if (0 <= iy && iy < height) {
+                        for (int j = -1; j <= 1; j++) {
+                            int jx = j + x;
+                            if (0 <= jx && jx < width) {
+                                int w;
+                                if (reverse)
+                                    w = matrix[(i + 1) * 3 - j + 1];
+                                else
+                                    w = matrix[(i + 1) * 3 + j + 1];
+                                if (w != 0) {
+                                    int k = reverse ? index - j : index + j;
+                                    rgb1 = srcData[k];
+                                    a1 = ((rgb1 >> 24) & 0xff) + ea * w / sum;
+                                    r1 = ((rgb1 >> 16) & 0xff) + er * w / sum;
+                                    g1 = ((rgb1 >> 8) & 0xff) + eg * w / sum;
+                                    b1 = (rgb1 & 0xff) + eb * w / sum;
+
+                                    srcData[k] = ((clamp(a1) << 24) | clamp(r1) << 16)
+                                        | (clamp(g1) << 8) | clamp(b1);
+                                }
+                            }
+                        }
+                    }
+                }
+                index += direction;
+            }
+        }
+
+        return dst;
+    }
+
+    private static int clamp(int c) {
+        if (c < 0)
+            return 0;
+        if (c > 255)
+            return 255;
+        return c;
+    }
+
+    int findIndex(int r1, int g1, int b1, int a1)
+        throws ArrayIndexOutOfBoundsException {
+        int idx = 0;
+        long dist = Long.MAX_VALUE;
+        for (int i = 0; i < colorMap.length; i++) {
+            int rgb2 = colorMap[i];
+            int a2 = (rgb2 >> 24) & 0xff;
+            int r2 = (rgb2 >> 16) & 0xff;
+            int g2 = (rgb2 >> 8) & 0xff;
+            int b2 = rgb2 & 0xff;
+
+            int da = a1 - a2;
+            int dr = r1 - r2;
+            int dg = g1 - g2;
+            int db = b1 - b2;
+
+            long newdist = da * da + dr * dr + dg * dg + db * db;
+            if (newdist < dist) {
+                idx = i;
+                dist = newdist;
+            }
+        }
+        return idx;
+    }
+
+    // This always returns an indexed image
+    public BufferedImage createCompatibleDestImage(BufferedImage src,
+        ColorModel destCM) {
+        return new BufferedImage(src.getWidth(), src.getHeight(),
+            BufferedImage.TYPE_BYTE_INDEXED);
+    }
+
+    // There are no rendering hints
+    public RenderingHints getRenderingHints() {
+        return null;
+    }
+
+    // No transformation, so return the source point
+    public Point2D getPoint2D(Point2D srcPt, Point2D dstPt) {
+        if (dstPt == null)
+            dstPt = new Point2D.Float();
+        dstPt.setLocation(srcPt.getX(), srcPt.getY());
+        return dstPt;
+    }
+
+    // No transformation, so return the source bounds
+    public Rectangle2D getBounds2D(BufferedImage src) {
+        return src.getRaster().getBounds();
+    }
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/GIFEncoder.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/GIFEncoder.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/GIFEncoder.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,554 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Helma License Notice
+ *
+ * The contents of this file are subject to the Helma License
+ * Version 2.0 (the "License"). You may not use this file except in
+ * compliance with the License. A copy of the License is available at
+ * http://adele.helma.org/download/helma/license.txt
+ *
+ * Copyright 1998-2003 Helma Software. All Rights Reserved.
+ *
+ * $RCSfile: GIFEncoder.java,v $
+ * $Author: alexsmirnov $
+ * $Revision: 1.1.2.1 $
+ * $Date: 2007/01/09 18:59:03 $
+ */
+
+/*
+ * The GIF encoding routines are based on the Acme libary
+ *
+ * The following addaptions and extensions were added by Joerg Lehni:
+ * 
+ * - encode now directly works on BufferedImage objects, the ImageEncoder
+ *   and ImageConsumer oriented frameworks has been removed.
+ * - Only BufferedImages with IndexColorModel are taken, so no more
+ *   palette optimization with IntHashtable objects are necessary. If the
+ *   BufferedImage is in wrong format, helma.image.Quantizie is used to
+ *   convert it into a index based image.
+ * - This version is much less space consuming as it only takes one sample
+ *   row of the rastered image at a time into memory during compression.
+ * - The overall time for color reduction and gif compression should
+ *   therefore be greatly reduced.
+ *
+ * Acme Disclaimer:
+ *
+ * Transparency handling and variable bit size courtesy of Jack Palevich.
+ *
+ * Copyright (C)1996,1998 by Jef Poskanzer <jef at acme.com>. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * Visit the ACME Labs Java page for up-to-date versions of this and other
+ * fine Java utilities: http://www.acme.com/java/
+ *
+ * GifEncoder is adapted from ppmtogif, which is based on GIFENCOD by David
+ * Rowley <mgardi at watdscu.waterloo.edu>.  Lempel-Zim compression
+ * based on "compress".
+ *
+ */
+
+package org.ajax4jsf.framework.util.image;
+
+import java.awt.image.BufferedImage;
+import java.awt.image.IndexColorModel;
+import java.awt.image.Raster;
+import java.io.DataOutput;
+import java.io.IOException;
+
+public class GIFEncoder {
+    private boolean interlace = false;
+
+    private int width, height;
+    private Raster raster;
+    // DataOutput is used for compatibility with ImageIO (see helma.image.imageio.gif.GIFImageWriter)
+    // otherwise, OutputStream would make much more sense here:
+    private DataOutput out;
+
+    private int curx, cury;
+    private int countdown;
+    private int pass;
+    private int[] row;
+
+    public void encode(BufferedImage bi, DataOutput out) throws IOException {
+        encode(bi, out, false, null);
+    }
+
+    public void encode(BufferedImage bi, DataOutput out, boolean interlace,
+        String comment) throws IOException {
+        this.out = out;
+        this.interlace = interlace;
+
+        // make sure it's index colors:
+        if (bi.getType() != BufferedImage.TYPE_BYTE_INDEXED)
+            bi = Quantize.process(bi, 256, false, true);
+
+        raster = bi.getRaster();
+
+        width = bi.getWidth();
+        height = bi.getHeight();
+
+        int numPixels = width * height;
+
+        IndexColorModel icm = (IndexColorModel) bi.getColorModel();
+        int transparentIndex = icm.getTransparentPixel();
+        int numColors = icm.getMapSize();
+
+        // Figure out how many bits to use.
+        int bitsPerPixel;
+        if (numColors <= 2)
+            bitsPerPixel = 1;
+        else if (numColors <= 4)
+            bitsPerPixel = 2;
+        else if (numColors <= 16)
+            bitsPerPixel = 4;
+        else
+            bitsPerPixel = 8;
+
+        int initCodeSize;
+
+        // Calculate number of bits we are expecting
+        countdown = numPixels;
+
+        // Indicate which pass we are on (if interlace)
+        pass = 0;
+
+        // The initial code size
+        if (bitsPerPixel <= 1)
+            initCodeSize = 2;
+        else
+            initCodeSize = bitsPerPixel;
+
+        // Set up the current x and y position
+        curx = 0;
+        cury = 0;
+        row = new int[width];
+
+        // Write the Magic header
+        writeString("GIF89a");
+
+        // Write out the screen width and height
+        writeWord(width);
+        writeWord(height);
+
+        // Indicate that there is a global colour map
+        byte flags = (byte) 0x80; // Yes, there is a color map
+        // OR in the resolution
+        flags |= (byte) ((8 - 1) << 4);
+        // Not sorted
+        // OR in the Bits per Pixel
+        flags |= (byte) ((bitsPerPixel - 1));
+        // Write it out
+        out.write(flags);
+
+        // Write out the Background colour
+        out.write((byte) 0);
+
+        // Pixel aspect ratio - 1:1.
+        //out.write((byte) 49);
+        // Java's GIF reader currently has a bug, if the aspect ratio byte is
+        // not zero it throws an ImageFormatException.  It doesn't know that
+        // 49 means a 1:1 aspect ratio.  Well, whatever, zero works with all
+        // the other decoders I've tried so it probably doesn't hurt.
+        out.write((byte) 0);
+
+        // Write out the Global Colour Map
+        // Turn colors into colormap entries.
+        int mapSize = 1 << bitsPerPixel;
+        byte[] reds = new byte[mapSize], greens = new byte[mapSize], blues = new byte[mapSize];
+        icm.getReds(reds);
+        icm.getGreens(greens);
+        icm.getBlues(blues);
+
+        for (int i = 0; i < mapSize; ++i) {
+            out.write(reds[i]);
+            out.write(greens[i]);
+            out.write(blues[i]);
+        }
+
+        // Write out extension for transparent colour index, if necessary.
+        if (transparentIndex != -1) {
+            out.write((byte) '!');
+            out.write((byte) 0xf9);
+            out.write((byte) 4);
+            out.write((byte) 1);
+            out.write((byte) 0);
+            out.write((byte) 0);
+            out.write((byte) transparentIndex);
+            out.write((byte) 0);
+        }
+
+        // Write an Image separator
+        out.write((byte) ',');
+
+        // Write the Image header
+        writeWord(0); // leftOfs
+        writeWord(0); // topOfs
+        writeWord(width);
+        writeWord(height);
+
+        // Write out whether or not the image is interlaced
+        if (interlace)
+            out.write((byte) 0x40);
+        else
+            out.write((byte) 0x00);
+
+        // Write out the initial code size
+        out.write((byte) initCodeSize);
+
+        // Go and actually compress the data
+        compress(initCodeSize + 1);
+
+        // Write out a Zero-length packet (to end the series)
+        out.write((byte) 0);
+
+        // Write out the comment
+        if (comment != null && comment.length() > 0) {
+            out.write((byte) 0x21);
+            out.write((byte) 0xFE);
+            out.write((byte) comment.length());
+            writeString(comment);
+            out.write((byte) 0);
+        }
+
+        // Write the GIF file terminator
+        out.write((byte) ';');
+    }
+
+    // Return the next pixel from the image
+    int getNextPixel() throws IOException {
+        if (countdown == 0)
+            return -1;
+
+        --countdown;
+
+        if (curx == 0)
+            row = raster.getSamples(0, cury, width, 1, 0, row);
+        int index = row[curx];
+
+        // Bump the current X position
+        ++curx;
+
+        // If we are at the end of a scan line, set curx back to the beginning
+        // If we are interlaced, bump the cury to the appropriate spot,
+        // otherwise, just increment it.
+        if (curx == width) {
+            curx = 0;
+
+            if (!interlace) {
+                ++cury;
+            } else {
+                switch (pass) {
+                case 0:
+                    cury += 8;
+                    if (cury >= height) {
+                        ++pass;
+                        cury = 4;
+                    }
+                    break;
+
+                case 1:
+                    cury += 8;
+                    if (cury >= height) {
+                        ++pass;
+                        cury = 2;
+                    }
+                    break;
+
+                case 2:
+                    cury += 4;
+                    if (cury >= height) {
+                        ++pass;
+                        cury = 1;
+                    }
+                    break;
+
+                case 3:
+                    cury += 2;
+                    break;
+                }
+            }
+        }
+        return index;
+    }
+
+    void writeString(String str) throws IOException {
+        byte[] buf = str.getBytes();
+        out.write(buf);
+    }
+
+    // Write out a word to the GIF file
+    void writeWord(int w) throws IOException {
+        out.write((byte) (w & 0xff));
+        out.write((byte) ((w >> 8) & 0xff));
+    }
+
+    // GIFCOMPR.C       - GIF Image compression routines
+    //
+    // Lempel-Ziv compression based on 'compress'.  GIF modifications by
+    // David Rowley (mgardi at watdcsu.waterloo.edu)
+
+    // General DEFINEs
+
+    static final int BITS = 12;
+
+    static final int HASH_SIZE = 5003; // 80% occupancy
+
+    // GIF Image compression - modified 'compress'
+    //
+    // Based on: compress.c - File compression ala IEEE Computer, June 1984.
+    //
+    // By Authors:  Spencer W. Thomas      (decvax!harpo!utah-cs!utah-gr!thomas)
+    //              Jim McKie              (decvax!mcvax!jim)
+    //              Steve Davies           (decvax!vax135!petsd!peora!srd)
+    //              Ken Turkowski          (decvax!decwrl!turtlevax!ken)
+    //              James A. Woods         (decvax!ihnp4!ames!jaw)
+    //              Joe Orost              (decvax!vax135!petsd!joe)
+
+    private int numBits; // number of bits/code
+    private int maxBits = BITS; // user settable max # bits/code
+    private int maxCode; // maximum code, given numBits
+    private int maxMaxCode = 1 << BITS; // should NEVER generate this code
+
+    final int getMaxCode(int numBits) {
+        return (1 << numBits) - 1;
+    }
+
+    private int[] hashTable = new int[HASH_SIZE];
+    private int[] codeTable = new int[HASH_SIZE];
+
+    private int freeEntry = 0; // first unused entry
+
+    // block compression parameters -- after all codes are used up,
+    // and compression rate changes, start over.
+    private boolean clearFlag = false;
+
+    // Algorithm:  use open addressing double hashing (no chaining) on the
+    // prefix code / next character combination.  We do a variant of Knuth's
+    // algorithm D (vol. 3, sec. 6.4) along with G. Knott's relatively-prime
+    // secondary probe.  Here, the modular division first probe is gives way
+    // to a faster exclusive-or manipulation.  Also do block compression with
+    // an adaptive reset, whereby the code table is cleared when the compression
+    // ratio decreases, but after the table fills.  The variable-length output
+    // codes are re-sized at this point, and a special CLEAR code is generated
+    // for the decompressor.  Late addition:  construct the table according to
+    // file size for noticeable speed improvement on small files.  Please direct
+    // questions about this implementation to ames!jaw.
+
+    private int initBits;
+
+    private int clearCode;
+    private int EOFCode;
+
+    void compress(int initBits) throws IOException {
+        // Set up the globals:  initBits - initial number of bits
+        this.initBits = initBits;
+
+        // Set up the necessary values
+        clearFlag = false;
+        numBits = initBits;
+        maxCode = getMaxCode(numBits);
+
+        clearCode = 1 << (initBits - 1);
+        EOFCode = clearCode + 1;
+        freeEntry = clearCode + 2;
+
+        charInit();
+
+        int ent = getNextPixel();
+
+        int hashShift = 0;
+        for (int fcode = HASH_SIZE; fcode < 65536; fcode *= 2)
+            ++hashShift;
+        hashShift = 8 - hashShift; // set hash code range bound
+
+        clearHash(); // clear hash table
+
+        output(clearCode);
+
+        int c;
+        outerLoop: while ((c = getNextPixel()) != -1) {
+            int fcode = (c << maxBits) + ent;
+            int i = (c << hashShift) ^ ent; // xor hashing
+
+            if (hashTable[i] == fcode) {
+                ent = codeTable[i];
+                continue;
+            } else if (hashTable[i] >= 0) { // non-empty slot
+                int disp = HASH_SIZE - i; // secondary hash (after G. Knott)
+                if (i == 0)
+                    disp = 1;
+                do {
+                    if ((i -= disp) < 0)
+                        i += HASH_SIZE;
+
+                    if (hashTable[i] == fcode) {
+                        ent = codeTable[i];
+                        continue outerLoop;
+                    }
+                } while (hashTable[i] >= 0);
+            }
+            output(ent);
+            ent = c;
+            if (freeEntry < maxMaxCode) {
+                codeTable[i] = freeEntry++; // code -> hashtable
+                hashTable[i] = fcode;
+            } else
+                clearBlock();
+        }
+        // Put out the final code.
+        output(ent);
+        output(EOFCode);
+    }
+
+    // output
+    //
+    // Output the given code.
+    // Inputs:
+    //      code:   A numBits-bit integer.  If == -1, then EOF.  This assumes
+    //              that numBits =< wordsize - 1.
+    // Outputs:
+    //      Outputs code to the file.
+    // Assumptions:
+    //      Chars are 8 bits long.
+    // Algorithm:
+    //      Maintain a BITS character long buffer (so that 8 codes will
+    // fit in it exactly).  Use the VAX insv instruction to insert each
+    // code in turn.  When the buffer fills up empty it and start over.
+
+    int curAccum = 0;
+    int curBits = 0;
+
+    int masks[] = { 0x0000, 0x0001, 0x0003, 0x0007, 0x000F, 0x001F, 0x003F,
+            0x007F, 0x00FF, 0x01FF, 0x03FF, 0x07FF, 0x0FFF, 0x1FFF, 0x3FFF,
+            0x7FFF, 0xFFFF };
+
+    void output(int code) throws IOException {
+        curAccum &= masks[curBits];
+
+        if (curBits > 0)
+            curAccum |= (code << curBits);
+        else
+            curAccum = code;
+
+        curBits += numBits;
+
+        while (curBits >= 8) {
+            charOut((byte) (curAccum & 0xff));
+            curAccum >>= 8;
+            curBits -= 8;
+        }
+
+        // If the next entry is going to be too big for the code size,
+        // then increase it, if possible.
+        if (freeEntry > maxCode || clearFlag) {
+            if (clearFlag) {
+                maxCode = getMaxCode(numBits = initBits);
+                clearFlag = false;
+            } else {
+                ++numBits;
+                if (numBits == maxBits)
+                    maxCode = maxMaxCode;
+                else
+                    maxCode = getMaxCode(numBits);
+            }
+        }
+
+        if (code == EOFCode) {
+            // At EOF, write the rest of the buffer.
+            while (curBits > 0) {
+                charOut((byte) (curAccum & 0xff));
+                curAccum >>= 8;
+                curBits -= 8;
+            }
+
+            charFlush();
+        }
+    }
+
+    // Clear out the hash table
+
+    // table clear for block compress
+    void clearBlock() throws IOException {
+        clearHash();
+        freeEntry = clearCode + 2;
+        clearFlag = true;
+
+        output(clearCode);
+    }
+
+    // reset code table
+    void clearHash() {
+        for (int i = 0; i < HASH_SIZE; ++i)
+            hashTable[i] = -1;
+    }
+
+    // GIF Specific routines
+
+    // Number of characters so far in this 'packet'
+    private int a_count;
+
+    // Set up the 'byte output' routine
+    void charInit() {
+        a_count = 0;
+    }
+
+    // Define the storage for the packet accumulator
+    private byte[] accum = new byte[256];
+
+    // Add a character to the end of the current packet, and if it is 254
+    // characters, flush the packet to disk.
+    void charOut(byte c) throws IOException {
+        accum[a_count++] = c;
+        if (a_count >= 254)
+            charFlush();
+    }
+
+    // Flush the packet to disk, and reset the accumulator
+    void charFlush() throws IOException {
+        if (a_count > 0) {
+            out.write(a_count);
+            out.write(accum, 0, a_count);
+            a_count = 0;
+        }
+    }
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/ImageFilterOp.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/ImageFilterOp.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/ImageFilterOp.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,287 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Helma License Notice
+ * 
+ * The contents of this file are subject to the Helma License Version 2.0 (the
+ * "License"). You may not use this file except in compliance with the License.
+ * A copy of the License is available at
+ * http://adele.helma.org/download/helma/license.txt
+ * 
+ * Copyright 1998-2003 Helma Software. All Rights Reserved.
+ * 
+ * $RCSfile: ImageFilterOp.java,v $
+ * $Author: alexsmirnov $
+ * $Revision: 1.1.2.1 $
+ * $Date: 2007/01/09 18:59:04 $
+ */
+
+/**
+ * This class does pretty much the opposite of java.awt.image.BufferedImageFilter:
+ * It wraps an ImageFilter in a BufferedImageOp
+ * Optimizations have been added, like the ignoring of color models 
+ * and the assumption of INT_RGB type for destination buffers in 
+ * order to speed things up by almost a factor of 4.
+ */
+
+package org.ajax4jsf.framework.util.image;
+
+import java.awt.AlphaComposite;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.awt.geom.Point2D;
+import java.awt.geom.Rectangle2D;
+import java.awt.image.BufferedImage;
+import java.awt.image.BufferedImageOp;
+import java.awt.image.ColorModel;
+import java.awt.image.DataBufferInt;
+import java.awt.image.ImageConsumer;
+import java.awt.image.ImageFilter;
+import java.util.Hashtable;
+
+public class ImageFilterOp implements BufferedImageOp {
+    ImageFilter filter;
+    
+    /**
+     * Construct a ImageFilterOp
+     */
+    public ImageFilterOp(ImageFilter filter) {
+        this.filter = filter;
+    }
+
+    /**
+     * Do the filter operation
+     * 
+     * @param src The source BufferedImage. Can be any type.
+     * @param dst The destination image. If not null, must be of type
+     * TYPE_INT_RGB, TYPE_INT_ARGB or TYPE_INT_ARGB_PRE
+     * @return the filtered image
+     */
+    public BufferedImage filter(BufferedImage src, BufferedImage dst) {
+        int width = src.getWidth();
+        int height = src.getHeight();
+        
+        BufferedImageConsumer consumer = new BufferedImageConsumer(dst);
+
+        ImageFilter fltr = filter.getFilterInstance(consumer);
+        fltr.setDimensions(width, height);
+        
+        /*
+        ColorModel cm = src.getColorModel();
+        if (cm.getPixelSize() == 8) {
+            // byte. indexed or gray:
+            WritableRaster raster = src.getRaster();
+            byte pixels[] = new byte[width];
+            // calculate scanline by scanline in order to safe memory.
+            // It also seems to run faster like that
+            for (int y = 0; y < height; y++) {
+                raster.getDataElements(0, y, width, 1, pixels);
+                fltr.setPixels(0, y, width, 1, cm, pixels, 0, width);
+            }
+        } else {
+            // integer, use the simple rgb mode:
+            WritableRaster raster = src.getRaster();
+            int pixels[] = new int[width];
+            // calculate scanline by scanline in order to safe memory.
+            // It also seems to run faster like that
+            for (int y = 0; y < height; y++) {
+                raster.getDataElements(0, y, width, 1, pixels);
+                fltr.setPixels(0, y, width, 1, cm, pixels, 0, width);
+            }
+        }
+        */
+
+        // allways work in integer mode. this is more effective, and most
+        // filters convert to integer internally anyhow
+        ColorModel cm = new SimpleColorModel();
+
+        // create a BufferedImage of only 1 pixel height for fetching the rows of the image in the correct format (ARGB)
+        // This speeds up things by more than factor 2, compared to the standard BufferedImage.getRGB solution,
+        // which is supposed to be fast too. This is probably the case because drawing to BufferedImages uses 
+        // very optimized code which may even be hardware accelerated.
+        BufferedImage row = new BufferedImage(width, 1, BufferedImage.TYPE_INT_ARGB);
+        Graphics2D g2d = row.createGraphics();
+        int pixels[] = ((DataBufferInt)row.getRaster().getDataBuffer()).getData();
+
+        // make sure alpha values do not add up for each row:
+        g2d.setComposite(AlphaComposite.Src);
+        // calculate scanline by scanline in order to safe memory.
+        // It also seems to run faster like that
+        for (int y = 0; y < height; y++) {
+            g2d.drawImage(src, null, 0, -y); 
+            // now pixels contains the rgb values of the row y!
+            // filter this row now:
+            fltr.setPixels(0, y, width, 1, cm, pixels, 0, width);
+        }
+        g2d.dispose();
+
+        // the consumer now contains the filtered image, return it.
+        return consumer.getImage();
+    }
+
+    public BufferedImage createCompatibleDestImage(BufferedImage src, ColorModel destCM) {
+        return null;
+    }
+
+    public RenderingHints getRenderingHints() {
+        return null;
+    }
+
+    public Point2D getPoint2D(Point2D srcPt, Point2D dstPt) {
+        return null;
+    }
+
+    public Rectangle2D getBounds2D(BufferedImage src) {
+        return null;
+    }
+    
+    /**
+     * This is a dummy ColorModel that does nothing else than returning an
+     * unchanged rgb value in getRGB, getRed, getGreen, getBlue, getAlpha.
+     * This speeds up things for BufferedImages by at least a factor 1.5!
+     */
+    class SimpleColorModel extends ColorModel {
+        public SimpleColorModel() {
+            this(32);
+        }
+        
+        public SimpleColorModel(int bits) {
+            super(bits);
+        }
+        
+        public int getRGB(int rgb) {
+            // this is the part that speeds up most.
+            // java.awt.image.ColorModel would return the same value, but with
+            // 4 function calls and a lot of shifts and ors per color!
+            return rgb;
+        }
+
+        public int getAlpha(int pixel) {
+            return pixel  >> 24;
+        }
+
+        public int getRed(int pixel) {
+            return (pixel >> 16) & 0xff;
+        }
+
+        public int getGreen(int pixel) {
+            return (pixel >>  8) & 0xff;
+        }
+
+        public int getBlue(int pixel) {
+            return pixel & 0xff;
+        }
+    }
+    
+    /**
+     * This is a dummy ImageConsumser that does nothing else than writing
+     * The resulting rows from the ImageFilter into the image
+     * If the image was not specified in the constructor, setDimensions
+     * creates it with the given dimensions.
+     */
+    class BufferedImageConsumer implements ImageConsumer {
+        BufferedImage image;
+        BufferedImage compatible;
+        int width;
+        int height;
+        boolean first = true;
+        
+        /*
+         * Constructor with no compatible image. if image is null, setDimensions
+         * will create a default INT_ARGB image of the size defined by the filter.
+         */
+        public BufferedImageConsumer(BufferedImage image) {
+            this(image, null);
+        }
+        
+        /*
+         * Constructor with a compatible image. if image is null, setDimensions
+         * will create a compatible image of the size defined by the filter.
+         */
+        public BufferedImageConsumer(BufferedImage image, BufferedImage compatible) {
+            this.image = image;
+            this.compatible = compatible;
+        }
+        
+        public BufferedImage getImage() {
+            return image;
+        }
+
+        public void setDimensions(int w, int h) {
+            if (image == null) {
+                if (compatible != null) {
+                    // create a compatible image with the new dimensions:
+                    image = new BufferedImage(
+                        compatible.getColorModel(),
+                        compatible.getRaster().createCompatibleWritableRaster(w, h),
+                        compatible.isAlphaPremultiplied(),
+                        null
+                    );
+                } else {
+                    // assume standard format:
+                    image = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB);
+                }
+            }
+            width = image.getWidth();
+            height = image.getHeight();
+        }
+
+        public void setPixels(int x, int y, int w, int h, ColorModel model, int[] pixels, int off, int scansize) {
+            // Cropping may be necessary: It's possible that the size of the 
+            // specified destination image is not the same as the size the 
+            // ImageFilter would produce!
+            if (x < width && y < height) {
+                if (x + w > width)
+                    w = width - x;
+                if (y + h > height)
+                    h = height - y;
+                
+                if (w > 0 && h > 0)
+                    image.setRGB(x, y, w, h, pixels, off, scansize);
+            }
+        }
+
+        public void setPixels(int x, int y, int w, int h, ColorModel model, byte[] pixels, int off, int scansize) {
+            if (x < width && y < height) {
+                if (x + w > width)
+                    w = width - x;
+                if (y + h > height)
+                    h = height - y;
+
+                if (w > 0 && h > 0)
+                    image.getRaster().setDataElements(x, y, w, h, pixels);
+            }
+        }
+
+        public void setProperties(Hashtable props) {
+        }
+
+        public void setColorModel(ColorModel model) {
+        }
+
+        public void setHints(int hintflags) {
+        }
+
+        public void imageComplete(int status) {
+        }
+    }
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/ImageGenerator.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/ImageGenerator.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/ImageGenerator.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,232 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Helma License Notice
+ *
+ * The contents of this file are subject to the Helma License
+ * Version 2.0 (the "License"). You may not use this file except in
+ * compliance with the License. A copy of the License is available at
+ * http://adele.helma.org/download/helma/license.txt
+ *
+ * Copyright 1998-2003 Helma Software. All Rights Reserved.
+ *
+ * $RCSfile: ImageGenerator.java,v $
+ * $Author: alexsmirnov $
+ * $Revision: 1.1.2.1 $
+ * $Date: 2007/01/09 18:59:06 $
+ */
+
+package org.ajax4jsf.framework.util.image;
+
+import java.awt.Image;
+import java.awt.Toolkit;
+import java.awt.image.BufferedImage;
+import java.awt.image.BufferedImageOp;
+import java.awt.image.ImageFilter;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.ajax4jsf.framework.util.message.Messages;
+
+/**
+ * Factory class for generating Image objects from various sources.
+ *  
+ */
+public abstract class ImageGenerator {
+    protected static ImageGenerator generator = null;
+
+    /**
+     * Returns an ImageGenerator singleton, creating it if necessary. If the JIMI
+     * package is installed, an instance of {@link helma.image.jimi.JimiGenerator JimiGenerator}
+     * will be returned. Otherwise, if the javax.imageio package is available,
+     * an instance of {@link helma.image.imageio.ImageIOGenerator ImageIOGenerator}
+     * is returned. Additionally, the class of the ImageGenerator implementation
+     * to be used can be set using the <code>imageGenerator</code> property in either
+     * the app.properties or server.properties file.
+     *
+     * @return a new ImageGenerator instance
+     */
+    public static ImageGenerator getInstance() {
+        if (generator == null) {
+            // first see wether an image wrapper class was specified in
+            // server.properties:
+            String className = null;
+//            if (Server.getServer() != null) {
+//                className = Server.getServer().getProperty("imageGenerator");
+//            }
+
+            Class generatorClass = null;
+            if (className == null) {
+                // if no class is defined, try the default ones:
+                try {
+                    Class.forName("com.sun.jimi.core.Jimi");
+                    // if we're still here, JimiWrapper can be used
+                    className = "helma.image.jimi.JimiGenerator";
+                } catch (ClassNotFoundException e1) {
+                    try {
+                        Class.forName("javax.imageio.ImageIO");
+                        // if we're still here, ImageIOWrapper can be used
+                        className = "org.ajax4jsf.framework.util.image.imageio.ImageIOGenerator";
+                    } catch (ClassNotFoundException e2) {
+                    }
+                }
+            }
+            // now let's get the generator class and create an instance:
+            try {
+                generatorClass = Class.forName(className);
+            } catch (ClassNotFoundException e) {
+                throw new RuntimeException(Messages.getMessage(Messages.IMAGE_GENERATOR_CLASS_NOT_FOUND, className));
+            }
+            try {
+                generator = (ImageGenerator)generatorClass.newInstance();
+            } catch (Exception e) {
+                throw new RuntimeException(Messages.getMessage(Messages.CREATING_IMAGE_GENERATOR_ERROR, className));
+            }
+        }
+        return generator;
+    }
+
+    /**
+     * @param w ...
+     * @param h ...
+     * 
+     * @return ...
+     */
+    public ImageWrapper createImage(int w, int h) {
+        BufferedImage img = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB);
+        return new ImageWrapper(img, w, h, this);
+    }
+
+    /**
+     * @param src ...
+     * 
+     * @return ...
+     * @throws IOException
+     */
+    public ImageWrapper createImage(byte[] src) throws IOException {
+        Image img = read(src);
+        return img != null ? new ImageWrapper(img, this) : null;
+    }
+    
+    /**
+     * @param filenamne ...
+     * 
+     * @return ...
+     * @throws IOException
+     */
+    public ImageWrapper createImage(String filenamne)
+        throws IOException {
+        Image img = read(filenamne);
+        return img != null ? new ImageWrapper(img, this) : null;
+    }
+
+    /**
+     * @param url ...
+     * 
+     * @return ...
+     * @throws MalformedURLException
+     * @throws IOException
+     */
+    public ImageWrapper createImage(URL url)
+        throws MalformedURLException, IOException {
+        Image img = read(url);
+        return img != null ? new ImageWrapper(img, this) : null;
+    }
+
+    /**
+     * @param iw ...
+     * @param filter ...
+     * 
+     * @return ...
+     */
+    public ImageWrapper createImage(ImageWrapper iw, ImageFilter filter) {
+        // use the ImagFilterOp wrapper for ImageFilters that works directly
+        // on BufferedImages. The filtering is much faster like that.
+        // Attention: needs testing with all the filters!
+        
+        return createImage(iw, new ImageFilterOp(filter));
+//        Image img = ImageWaiter.waitForImage(
+//            Toolkit.getDefaultToolkit().createImage(
+//                new FilteredImageSource(iw.getSource(), filter)));
+//        return img != null ? new ImageWrapper(img, this) : null;
+    }
+
+    /**
+     * @param iw ...
+     * @param imageOp ...
+     * 
+     * @return ...
+     */
+    public ImageWrapper createImage(ImageWrapper iw, BufferedImageOp imageOp) {
+        Image img = imageOp.filter(iw.getBufferedImage(), null);
+        return img != null ? new ImageWrapper(img, this) : null;
+    }
+
+    /**
+     * @param filename the filename of the image to create
+     * 
+     * @return the newly created image
+     * @throws IOException
+     */
+    public Image read(String filename) throws IOException {
+        return ImageWaiter.waitForImage(
+            Toolkit.getDefaultToolkit().createImage(filename)
+        );
+    }
+
+    /**
+     * @param url the URL the filename of the image to create
+     * 
+     * @return the newly created image
+     * @throws IOException
+     */
+    public Image read(URL url) throws IOException {
+        return ImageWaiter.waitForImage(
+            Toolkit.getDefaultToolkit().createImage(url)
+        );
+    }
+
+    /**
+     * @param src the data of the image to create
+     * 
+     * @return the newly created image
+     * @throws IOException
+     */
+    public Image read(byte[] src) throws IOException {
+        return ImageWaiter.waitForImage(
+            Toolkit.getDefaultToolkit().createImage(src)
+        );
+    }
+
+    /**
+     * Saves the image. Image format is deduced from filename.
+     * 
+     * @param wrapper
+     * @param filename
+     * @param quality
+     * @param alpha
+     * @throws IOException
+     */
+    public abstract void write(ImageWrapper wrapper, String filename,
+        float quality, boolean alpha) throws IOException;
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/ImageInfo.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/ImageInfo.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/ImageInfo.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1309 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * ImageInfo.java
+ *
+ * Version 1.5
+ *
+ * A Java class to determine image width, height and color depth for
+ * a number of image file formats.
+ *
+ * Written by Marco Schmidt 
+ * <http://www.geocities.com/marcoschmidt.geo/contact.html>.
+ *
+ * Contributed to the Public Domain.
+ *
+ * Last modification 2004-02-29
+ */
+
+package org.ajax4jsf.framework.util.image;
+
+import java.io.DataInput;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.Vector;
+
+import org.ajax4jsf.framework.util.message.Messages;
+
+/**
+ * Get file format, image resolution, number of bits per pixel and optionally 
+ * number of images, comments and physical resolution from 
+ * JPEG, GIF, BMP, PCX, PNG, IFF, RAS, PBM, PGM, PPM, PSD and SWF files 
+ * (or input streams).
+ * <p>
+ * Use the class like this:
+ * <pre>
+ * ImageInfo ii = new ImageInfo();
+ * ii.setInput(in); // in can be InputStream or RandomAccessFile
+ * ii.setDetermineImageNumber(true); // default is false
+ * ii.setCollectComments(true); // default is false
+ * if (!ii.check()) {
+ *   System.err.println("Not a supported image file format.");
+ *   return;
+ * }
+ * System.out.println(ii.getFormatName() + ", " + ii.getMimeType() + 
+ *   ", " + ii.getWidth() + " x " + ii.getHeight() + " pixels, " + 
+ *   ii.getBitsPerPixel() + " bits per pixel, " + ii.getNumberOfImages() +
+ *   " image(s), " + ii.getNumberOfComments() + " comment(s).");
+ *  // there are other properties, check out the API documentation
+ * </pre>
+ * You can also use this class as a command line program.
+ * Call it with a number of image file names and URLs as parameters:
+ * <pre>
+ *   java ImageInfo *.jpg *.png *.gif http://somesite.tld/image.jpg
+ * </pre>
+ * or call it without parameters and pipe data to it:
+ * <pre>
+ *   java ImageInfo &lt; image.jpg  
+ * </pre>
+ * <p>
+ * Known limitations:
+ * <ul>
+ * <li>When the determination of the number of images is turned off, GIF bits 
+ *  per pixel are only read from the global header.
+ *  For some GIFs, local palettes change this to a typically larger
+ *  value. To be certain to get the correct color depth, call
+ *  setDetermineImageNumber(true) before calling check().
+ *  The complete scan over the GIF file will take additional time.</li>
+ * <li>Transparency information is not included in the bits per pixel count.
+ *  Actually, it was my decision not to include those bits, so it's a feature! ;-)</li>
+ * </ul>
+ * <p>
+ * Requirements:
+ * <ul>
+ * <li>Java 1.1 or higher</li>
+ * </ul>
+ * <p>
+ * The latest version can be found at <a href="http://www.geocities.com/marcoschmidt.geo/image-info.html">http://www.geocities.com/marcoschmidt.geo/image-info.html</a>.
+ * <p>
+ * Written by <a href="http://www.geocities.com/marcoschmidt.geo/contact.html">Marco Schmidt</a>.
+ * <p>
+ * This class is contributed to the Public Domain.
+ * Use it at your own risk.
+ * <p>
+ * Last modification 2004-02-29.
+ * <p>
+ * History:
+ * <ul>
+ * <li><strong>2001-08-24</strong> Initial version.</li>
+ * <li><strong>2001-10-13</strong> Added support for the file formats BMP and PCX.</li>
+ * <li><strong>2001-10-16</strong> Fixed bug in read(int[], int, int) that returned
+ * <li><strong>2002-01-22</strong> Added support for file formats Amiga IFF and Sun Raster (RAS).</li>
+ * <li><strong>2002-01-24</strong> Added support for file formats Portable Bitmap / Graymap / Pixmap (PBM, PGM, PPM) and Adobe Photoshop (PSD).
+ *   Added new method getMimeType() to return the MIME type associated with a particular file format.</li>
+ * <li><strong>2002-03-15</strong> Added support to recognize number of images in file. Only works with GIF.
+ *   Use {@link #setDetermineImageNumber} with <code>true</code> as argument to identify animated GIFs
+ *   ({@link #getNumberOfImages()} will return a value larger than <code>1</code>).</li>
+ * <li><strong>2002-04-10</strong> Fixed a bug in the feature 'determine number of images in animated GIF' introduced with version 1.1.
+ *   Thanks to Marcelo P. Lima for sending in the bug report. 
+ *   Released as 1.1.1.</li>
+ * <li><strong>2002-04-18</strong> Added {@link #setCollectComments(boolean)}. 
+ *  That new method lets the user specify whether textual comments are to be  
+ *  stored in an internal list when encountered in an input image file / stream.
+ *  Added two methods to return the physical width and height of the image in dpi: 
+ *   {@link #getPhysicalWidthDpi()} and {@link #getPhysicalHeightDpi()}.
+ *  If the physical resolution could not be retrieved, these methods return <code>-1</code>.
+ *  </li>
+ * <li><strong>2002-04-23</strong> Added support for the new properties physical resolution and
+ *   comments for some formats. Released as 1.2.</li>
+ * <li><strong>2002-06-17</strong> Added support for SWF, sent in by Michael Aird.
+ *  Changed checkJpeg() so that other APP markers than APP0 will not lead to a failure anymore.
+ *  Released as 1.3.</li>
+ * <li><strong>2003-07-28</strong> Bug fix - skip method now takes return values into consideration.
+ *  Less bytes than necessary may have been skipped, leading to flaws in the retrieved information in some cases.
+ *  Thanks to Bernard Bernstein for pointing that out.
+ *  Released as 1.4.</li>
+ * <li><strong>2004-02-29</strong> Added support for recognizing progressive JPEG and
+ *  interlaced PNG and GIF. A new method {@link #isProgressive()} returns whether ImageInfo
+ *  has found that the storage type is progressive (or interlaced). 
+ *  Thanks to Joe Germuska for suggesting the feature.
+ *  Bug fix: BMP physical resolution is now correctly determined.
+ *  Released as 1.5.</li>
+ * </ul>
+ */
+public class ImageInfo {
+	/**
+	 * Return value of {@link #getFormat()} for JPEG streams.
+	 * ImageInfo can extract physical resolution and comments
+	 * from JPEGs (only from APP0 headers).
+	 * Only one image can be stored in a file.
+	 * It is determined whether the JPEG stream is progressive 
+	 * (see {@link #isProgressive()}).
+	 */
+	public static final int FORMAT_JPEG = 0;
+
+	/**
+	 * Return value of {@link #getFormat()} for GIF streams.
+	 * ImageInfo can extract comments from GIFs and count the number
+	 * of images (GIFs with more than one image are animations).
+	 * If you know of a place where GIFs store the physical resolution
+	 * of an image, please
+	 * <a href="http://www.geocities.com/marcoschmidt.geo/contact.html">send me a mail</a>!
+	 * It is determined whether the GIF stream is interlaced (see {@link #isProgressive()}).
+	 */
+	public static final int FORMAT_GIF = 1;
+
+	/**
+	 * Return value of {@link #getFormat()} for PNG streams.
+	 * PNG only supports one image per file.
+	 * Both physical resolution and comments can be stored with PNG,
+	 * but ImageInfo is currently not able to extract those.
+	 * It is determined whether the PNG stream is interlaced (see {@link #isProgressive()}).
+	 */
+	public static final int FORMAT_PNG = 2;
+
+	/**
+	 * Return value of {@link #getFormat()} for BMP streams.
+	 * BMP only supports one image per file.
+	 * BMP does not allow for comments.
+	 * The physical resolution can be stored.
+	 */
+	public static final int FORMAT_BMP = 3;
+
+	/**
+	 * Return value of {@link #getFormat()} for PCX streams.
+	 * PCX does not allow for comments or more than one image per file.
+	 * However, the physical resolution can be stored.
+	 */
+	public static final int FORMAT_PCX = 4;
+
+	/**
+	 * Return value of {@link #getFormat()} for IFF streams.
+	 */
+	public static final int FORMAT_IFF = 5;
+
+	/**
+	 * Return value of {@link #getFormat()} for RAS streams.
+	 * Sun Raster allows for one image per file only and is not able to
+	 * store physical resolution or comments.
+	 */
+	public static final int FORMAT_RAS = 6;
+
+	/** Return value of {@link #getFormat()} for PBM streams. */
+	public static final int FORMAT_PBM = 7;
+
+	/** Return value of {@link #getFormat()} for PGM streams. */
+	public static final int FORMAT_PGM = 8;
+
+	/** Return value of {@link #getFormat()} for PPM streams. */
+	public static final int FORMAT_PPM = 9;
+
+	/** Return value of {@link #getFormat()} for PSD streams. */
+	public static final int FORMAT_PSD = 10;
+
+	/** Return value of {@link #getFormat()} for SWF (Shockwave) streams. */
+	public static final int FORMAT_SWF = 11;
+
+	public static final int COLOR_TYPE_UNKNOWN = -1;
+	public static final int COLOR_TYPE_TRUECOLOR_RGB = 0;
+	public static final int COLOR_TYPE_PALETTED = 1;
+	public static final int COLOR_TYPE_GRAYSCALE= 2;
+	public static final int COLOR_TYPE_BLACK_AND_WHITE = 3;
+
+	/**
+	 * The names of all supported file formats.
+	 * The FORMAT_xyz int constants can be used as index values for
+	 * this array.
+	 */
+	private static final String[] FORMAT_NAMES =
+		{"JPEG", "GIF", "PNG", "BMP", "PCX", 
+		 "IFF", "RAS", "PBM", "PGM", "PPM", 
+		 "PSD", "SWF"};
+
+	/**
+	 * The names of the MIME types for all supported file formats.
+	 * The FORMAT_xyz int constants can be used as index values for
+	 * this array.
+	 */
+	private static final String[] MIME_TYPE_STRINGS =
+		{"image/jpeg", "image/gif", "image/png", "image/bmp", "image/pcx", 
+		 "image/iff", "image/ras", "image/x-portable-bitmap", "image/x-portable-graymap", "image/x-portable-pixmap", 
+		 "image/psd", "application/x-shockwave-flash"};
+
+	private int width;
+	private int height;
+	private int bitsPerPixel;
+	private int colorType = COLOR_TYPE_UNKNOWN;
+	private boolean progressive;
+	private int format;
+	private InputStream in;
+	private DataInput din;
+	private boolean collectComments = true;
+	private Vector comments;
+	private boolean determineNumberOfImages;
+	private int numberOfImages;
+	private int physicalHeightDpi;
+	private int physicalWidthDpi;
+	private int bitBuf;
+	private int bitPos;
+
+	private void addComment(String s) {
+		if (comments == null) {
+			comments = new Vector();
+		}
+		comments.addElement(s);
+	}
+
+	/**
+	 * Call this method after you have provided an input stream or file
+	 * using {@link #setInput(InputStream)} or {@link #setInput(DataInput)}.
+	 * If true is returned, the file format was known and information
+	 * on the file's content can be retrieved using the various getXyz methods.
+	 * @return if information could be retrieved from input
+	 */
+	public boolean check() {
+		format = -1;
+		width = -1;
+		height = -1;
+		bitsPerPixel = -1;
+		numberOfImages = 1;
+		physicalHeightDpi = -1;
+		physicalWidthDpi = -1;
+		comments = null;
+		try {
+			int b1 = read() & 0xff;
+			int b2 = read() & 0xff;
+			if (b1 == 0x47 && b2 == 0x49) {
+				return checkGif();
+			}
+			else
+			if (b1 == 0x89 && b2 == 0x50) {
+				return checkPng();
+			}
+			else
+			if (b1 == 0xff && b2 == 0xd8) {
+				return checkJpeg();
+			}
+			else
+			if (b1 == 0x42 && b2 == 0x4d) {
+				return checkBmp();
+			}
+			else
+			if (b1 == 0x0a && b2 < 0x06) {
+				return checkPcx();
+			}
+			else
+			if (b1 == 0x46 && b2 == 0x4f) {
+				return checkIff();
+			}
+			else
+			if (b1 == 0x59 && b2 == 0xa6) {
+				return checkRas();
+			}
+			else
+			if (b1 == 0x50 && b2 >= 0x31 && b2 <= 0x36) {
+				return checkPnm(b2 - '0');
+			}
+			else
+			if (b1 == 0x38 && b2 == 0x42) {
+				return checkPsd();
+			}
+			else
+			if (b1 == 0x46 && b2 == 0x57) {
+				return checkSwf();
+			}
+			else {
+				return false;
+			}
+		} catch (IOException ioe) {
+			return false;
+		}
+	}
+
+	private boolean checkBmp() throws IOException {
+		byte[] a = new byte[44];
+		if (read(a) != a.length) {
+			return false;
+		}
+		width = getIntLittleEndian(a, 16);
+		height = getIntLittleEndian(a, 20);
+		if (width < 1 || height < 1) {
+			return false;
+		}
+		bitsPerPixel = getShortLittleEndian(a, 26);
+		if (bitsPerPixel != 1 && bitsPerPixel != 4 &&
+		    bitsPerPixel != 8 && bitsPerPixel != 16 &&
+		    bitsPerPixel != 24 && bitsPerPixel != 32) {
+		    return false;
+		}
+		int x = (int)(getIntLittleEndian(a, 36) * 0.0254);
+		if (x > 0) {
+			setPhysicalWidthDpi(x);
+		}
+		int y = (int)(getIntLittleEndian(a, 40) * 0.0254);
+		if (y > 0) {
+			setPhysicalHeightDpi(y);
+		}
+		format = FORMAT_BMP;
+		return true;
+	}
+
+	private boolean checkGif() throws IOException {
+		final byte[] GIF_MAGIC_87A = {0x46, 0x38, 0x37, 0x61};
+		final byte[] GIF_MAGIC_89A = {0x46, 0x38, 0x39, 0x61};
+		byte[] a = new byte[11]; // 4 from the GIF signature + 7 from the global header
+		if (read(a) != 11) {
+			return false;
+		}
+		if ((!equals(a, 0, GIF_MAGIC_89A, 0, 4)) &&
+			(!equals(a, 0, GIF_MAGIC_87A, 0, 4))) {
+			return false;
+		}
+		format = FORMAT_GIF;
+		width = getShortLittleEndian(a, 4);
+		height = getShortLittleEndian(a, 6);
+		int flags = a[8] & 0xff;
+		bitsPerPixel = ((flags >> 4) & 0x07) + 1;
+		progressive = (flags & 0x02) != 0;
+		if (!determineNumberOfImages) {
+			return true;
+		}
+		// skip global color palette
+		if ((flags & 0x80) != 0) {
+			int tableSize = (1 << ((flags & 7) + 1)) * 3;
+			skip(tableSize);
+		}
+		numberOfImages = 0;
+		int blockType;
+		do
+		{
+			blockType = read();
+			switch(blockType)
+			{
+				case(0x2c): // image separator
+				{
+					if (read(a, 0, 9) != 9) {
+						return false;
+					}
+					flags = a[8] & 0xff;
+					int localBitsPerPixel = (flags & 0x07) + 1;
+					if (localBitsPerPixel > bitsPerPixel) {
+						bitsPerPixel = localBitsPerPixel;
+					}
+					if ((flags & 0x80) != 0) {
+						skip((1 << localBitsPerPixel) * 3);
+					}
+					skip(1); // initial code length
+					int n;
+					do
+					{
+						n = read();
+						if (n > 0) {
+							skip(n);
+						}
+						else
+						if (n == -1) {
+							return false;
+						}
+					}
+					while (n > 0);
+					numberOfImages++;
+					break;
+				}
+				case(0x21): // extension
+				{
+					int extensionType = read();
+					if (collectComments && extensionType == 0xfe) {
+						StringBuffer sb = new StringBuffer();
+						int n;
+						do
+						{
+							n = read();
+							if (n == -1) {
+								return false;
+							}
+							if (n > 0) {
+								for (int i = 0; i < n; i++) {
+									int ch = read();
+									if (ch == -1) {
+										return false;
+									}
+									sb.append((char)ch);
+								}
+							}
+						}
+						while (n > 0);
+					} else {
+						int n;
+						do
+						{
+							n = read();
+							if (n > 0) {
+								skip(n);
+							}
+							else
+							if (n == -1) {
+								return false;
+							}
+						}
+						while (n > 0);
+					}
+					break;
+				}
+				case(0x3b): // end of file
+				{
+					break;
+				}
+				default:
+				{
+					return false;
+				}
+			}
+		}
+		while (blockType != 0x3b);
+		return true;
+	}
+
+	private boolean checkIff() throws IOException {
+		byte[] a = new byte[10];
+		// read remaining 2 bytes of file id, 4 bytes file size 
+		// and 4 bytes IFF subformat
+		if (read(a, 0, 10) != 10) {
+			return false;
+		}
+		final byte[] IFF_RM = {0x52, 0x4d};
+		if (!equals(a, 0, IFF_RM, 0, 2)) {
+			return false;
+		}
+		int type = getIntBigEndian(a, 6);
+		if (type != 0x494c424d && // type must be ILBM...
+		    type != 0x50424d20) { // ...or PBM
+		    return false;
+		}
+		// loop chunks to find BMHD chunk
+		do {
+			if (read(a, 0, 8) != 8) {
+				return false;
+			}
+			int chunkId = getIntBigEndian(a, 0);
+			int size = getIntBigEndian(a, 4);
+			if ((size & 1) == 1) {
+				size++;
+			}
+			if (chunkId == 0x424d4844) { // BMHD chunk
+				if (read(a, 0, 9) != 9) {
+					return false;
+				}
+				format = FORMAT_IFF;
+				width = getShortBigEndian(a, 0);
+				height = getShortBigEndian(a, 2);
+				bitsPerPixel = a[8] & 0xff;
+				return (width > 0 && height > 0 && bitsPerPixel > 0 && bitsPerPixel < 33);
+			} else {
+				skip(size);
+			}
+		} while (true);
+	}
+
+	private boolean checkJpeg() throws IOException {
+		byte[] data = new byte[12];
+		while (true) {
+			if (read(data, 0, 4) != 4) {
+				return false;
+			}
+			int marker = getShortBigEndian(data, 0);
+			int size = getShortBigEndian(data, 2);
+			if ((marker & 0xff00) != 0xff00) {
+				return false; // not a valid marker
+			}
+			if (marker == 0xffe0) { // APPx 
+				if (size < 14) {
+					return false; // APPx header must be >= 14 bytes
+				}
+				if (read(data, 0, 12) != 12) {
+					return false;
+				}
+				final byte[] APP0_ID = {0x4a, 0x46, 0x49, 0x46, 0x00};
+				if (equals(APP0_ID, 0, data, 0, 5)) {
+					//System.out.println("data 7=" + data[7]);
+					if (data[7] == 1) {
+						setPhysicalWidthDpi(getShortBigEndian(data, 8));
+						setPhysicalHeightDpi(getShortBigEndian(data, 10));
+					}
+					else
+					if (data[7] == 2) {
+						int x = getShortBigEndian(data, 8);
+						int y = getShortBigEndian(data, 10);
+						setPhysicalWidthDpi((int)(x * 2.54f));
+						setPhysicalHeightDpi((int)(y * 2.54f));
+					}
+				}
+				skip(size - 14);
+			}
+			else
+			if (collectComments && size > 2 && marker == 0xfffe) { // comment
+				size -= 2;
+				byte[] chars = new byte[size];
+				if (read(chars, 0, size) != size) {
+					return false;
+				}
+				String comment = new String(chars, "iso-8859-1");
+				comment = comment.trim();
+				addComment(comment);
+			}
+			else
+			if (marker >= 0xffc0 && marker <= 0xffcf && marker != 0xffc4 && marker != 0xffc8) {
+				if (read(data, 0, 6) != 6) {
+					return false;
+				}
+				format = FORMAT_JPEG;
+				bitsPerPixel = (data[0] & 0xff) * (data[5] & 0xff);
+				progressive = marker == 0xffc2 || marker == 0xffc6 ||
+					marker == 0xffca || marker == 0xffce;
+				width = getShortBigEndian(data, 3);
+				height = getShortBigEndian(data, 1);
+				return true;
+			} else {
+				skip(size - 2);
+			}
+		}
+	}
+
+	private boolean checkPcx() throws IOException {
+		byte[] a = new byte[64];
+		if (read(a) != a.length) {
+			return false;
+		}
+		if (a[0] != 1) { // encoding, 1=RLE is only valid value
+			return false;
+		}
+		// width / height
+		int x1 = getShortLittleEndian(a, 2);
+		int y1 = getShortLittleEndian(a, 4);
+		int x2 = getShortLittleEndian(a, 6);
+		int y2 = getShortLittleEndian(a, 8);
+		if (x1 < 0 || x2 < x1 || y1 < 0 || y2 < y1) {
+			return false;
+		}
+		width = x2 - x1 + 1;
+		height = y2 - y1 + 1;
+		// color depth
+		int bits = a[1];
+		int planes = a[63];
+		if (planes == 1 &&
+		    (bits == 1 || bits == 2 || bits == 4 || bits == 8)) {
+			// paletted
+			bitsPerPixel = bits;
+		} else
+		if (planes == 3 && bits == 8) {
+			// RGB truecolor
+			bitsPerPixel = 24;
+		} else {
+			return false;
+		}
+		setPhysicalWidthDpi(getShortLittleEndian(a, 10));
+		setPhysicalHeightDpi(getShortLittleEndian(a, 10));
+		format = FORMAT_PCX;
+		return true;
+	}
+
+	private boolean checkPng() throws IOException {
+		final byte[] PNG_MAGIC = {0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a};
+		byte[] a = new byte[27];
+		if (read(a) != 27) {
+			return false;
+		}
+		if (!equals(a, 0, PNG_MAGIC, 0, 6)) {
+			return false;
+		}
+		format = FORMAT_PNG;
+		width = getIntBigEndian(a, 14);
+		height = getIntBigEndian(a, 18);
+		bitsPerPixel = a[22] & 0xff;
+		int colorType = a[23] & 0xff;
+		if (colorType == 2 || colorType == 6) {
+			bitsPerPixel *= 3;
+		}
+		progressive = (a[26] & 0xff) != 0;
+		return true;
+	}
+
+	private boolean checkPnm(int id) throws IOException {
+		if (id < 1 || id > 6) {
+			return false;
+		}
+		final int[] PNM_FORMATS = {FORMAT_PBM, FORMAT_PGM, FORMAT_PPM};
+		format = PNM_FORMATS[(id - 1) % 3];
+		boolean hasPixelResolution = false;
+		String s;
+		while (true)
+		{
+			s = readLine();
+			if (s != null) {
+				s = s.trim();
+			}
+			if (s == null || s.length() < 1) {
+				continue;
+			}
+			if (s.charAt(0) == '#') { // comment
+				if (collectComments && s.length() > 1) {
+					addComment(s.substring(1));
+				}
+				continue;
+			}
+			if (!hasPixelResolution) { // split "343 966" into width=343, height=966
+				int spaceIndex = s.indexOf(' ');
+				if (spaceIndex == -1) {
+					return false;
+				}
+				String widthString = s.substring(0, spaceIndex);
+				spaceIndex = s.lastIndexOf(' ');
+				if (spaceIndex == -1) {
+					return false;
+				}
+				String heightString = s.substring(spaceIndex + 1);
+				try {
+					width = Integer.parseInt(widthString);
+					height = Integer.parseInt(heightString);
+				} catch (NumberFormatException nfe) {
+					return false;
+				}
+				if (width < 1 || height < 1) {
+					return false;
+				}
+				if (format == FORMAT_PBM) {
+					bitsPerPixel = 1;
+					return true;
+				}
+				hasPixelResolution = true;
+			}
+			else
+			{
+				int maxSample;
+				try {
+					maxSample = Integer.parseInt(s);
+				} catch (NumberFormatException nfe) {
+					return false;
+				}
+				if (maxSample < 0) {
+					return false;
+				}
+				for (int i = 0; i < 25; i++) {
+					if (maxSample < (1 << (i + 1))) {
+						bitsPerPixel = i + 1;
+						if (format == FORMAT_PPM) {
+							bitsPerPixel *= 3;
+						}
+						return true;
+					}
+				}
+				return false;
+			}
+		}
+	}
+
+	private boolean checkPsd() throws IOException {
+		byte[] a = new byte[24];
+		if (read(a) != a.length) {
+			return false;
+		}
+		final byte[] PSD_MAGIC = {0x50, 0x53};
+		if (!equals(a, 0, PSD_MAGIC, 0, 2)) {
+			return false;
+		}
+		format = FORMAT_PSD;
+		width = getIntBigEndian(a, 16);
+		height = getIntBigEndian(a, 12);
+		int channels = getShortBigEndian(a, 10);
+		int depth = getShortBigEndian(a, 20);
+		bitsPerPixel = channels * depth;
+		return (width > 0 && height > 0 && bitsPerPixel > 0 && bitsPerPixel <= 64);
+	}
+
+	private boolean checkRas() throws IOException {
+		byte[] a = new byte[14];
+		if (read(a) != a.length) {
+			return false;
+		}
+		final byte[] RAS_MAGIC = {0x6a, (byte)0x95};
+		if (!equals(a, 0, RAS_MAGIC, 0, 2)) {
+			return false;
+		}
+		format = FORMAT_RAS;
+		width = getIntBigEndian(a, 2);
+		height = getIntBigEndian(a, 6);
+		bitsPerPixel = getIntBigEndian(a, 10);
+		return (width > 0 && height > 0 && bitsPerPixel > 0 && bitsPerPixel <= 24);
+	}
+
+	// Written by Michael Aird.
+	private boolean checkSwf() throws IOException {
+		//get rid of the last byte of the signature, the byte of the version and 4 bytes of the size
+		byte[] a = new byte[6];
+		if (read(a) != a.length) {
+			return false;
+		}
+		format = FORMAT_SWF;
+		int bitSize = (int)readUBits( 5 );
+		int minX = (int)readSBits( bitSize );
+		int maxX = (int)readSBits( bitSize );
+		int minY = (int)readSBits( bitSize );
+		int maxY = (int)readSBits( bitSize );
+		width = maxX/20; //cause we're in twips
+		height = maxY/20;  //cause we're in twips
+		setPhysicalWidthDpi(72);
+		setPhysicalHeightDpi(72);
+		return (width > 0 && height > 0);
+	}
+
+	/**
+	 * Run over String list, return false iff at least one of the arguments
+	 * equals <code>-c</code>.
+	 */
+	private static boolean determineVerbosity(String[] args) {
+		if (args != null && args.length > 0) {
+			for (int i = 0; i < args.length; i++) {
+				if ("-c".equals(args[i])) {
+					return false;
+				}
+			}
+		}
+		return true;
+	}
+
+	private boolean equals(byte[] a1, int offs1, byte[] a2, int offs2, int num) {
+		while (num-- > 0) {
+			if (a1[offs1++] != a2[offs2++]) {
+				return false;
+			}
+		}
+		return true;
+	}
+
+	/** 
+	 * If {@link #check()} was successful, returns the image's number of bits per pixel.
+	 * Does not include transparency information like the alpha channel.
+	 * @return number of bits per image pixel
+	 */
+	public int getBitsPerPixel() {
+		return bitsPerPixel;
+	}
+
+	/**
+	 * Returns the index'th comment retrieved from the image.
+	 * @throws IllegalArgumentException if index is smaller than 0 or larger than or equal
+	 * to the number of comments retrieved
+	 * @see #getNumberOfComments
+	 */
+	public String getComment(int index) {
+		if (comments == null || index < 0 || index >= comments.size()) {
+			throw new IllegalArgumentException(Messages.getMessage(Messages.INVALID_COMMENT_INDEX, "" + index));
+		}
+		return (String)comments.elementAt(index);
+	}
+
+	/**
+	 * If {@link #check()} was successful, returns the image format as one
+	 * of the FORMAT_xyz constants from this class.
+	 * Use {@link #getFormatName()} to get a textual description of the file format.
+	 * @return file format as a FORMAT_xyz constant
+	 */
+	public int getFormat() {
+		return format;
+	}
+
+	/**
+	 * If {@link #check()} was successful, returns the image format's name.
+	 * Use {@link #getFormat()} to get a unique number.
+	 * @return file format name
+	 */
+	public String getFormatName() {
+		if (format >= 0 && format < FORMAT_NAMES.length) {
+			return FORMAT_NAMES[format];
+		} else {
+			return "?";
+		}
+	}
+
+	/** 
+	 * If {@link #check()} was successful, returns one the image's vertical
+	 * resolution in pixels.
+	 * @return image height in pixels
+	 */
+	public int getHeight() {
+		return height;
+	}
+
+	private int getIntBigEndian(byte[] a, int offs) {
+		return
+			(a[offs] & 0xff) << 24 | 
+			(a[offs + 1] & 0xff) << 16 | 
+			(a[offs + 2] & 0xff) << 8 | 
+			a[offs + 3] & 0xff;
+	}
+
+	private int getIntLittleEndian(byte[] a, int offs) {
+		return
+			(a[offs + 3] & 0xff) << 24 | 
+			(a[offs + 2] & 0xff) << 16 | 
+			(a[offs + 1] & 0xff) << 8 | 
+			a[offs] & 0xff;
+	}
+
+	/** 
+	 * If {@link #check()} was successful, returns a String with the
+	 * MIME type of the format.
+	 * @return MIME type, e.g. <code>image/jpeg</code>
+	 */
+	public String getMimeType() {
+		if (format >= 0 && format < MIME_TYPE_STRINGS.length) {
+			if (format == FORMAT_JPEG && progressive)
+			{
+				return "image/pjpeg";
+			}
+			return MIME_TYPE_STRINGS[format];
+		} else {
+			return null;
+		}
+	}
+
+	/**
+	 * If {@link #check()} was successful and {@link #setCollectComments(boolean)} was called with
+	 * <code>true</code> as argument, returns the number of comments retrieved 
+	 * from the input image stream / file.
+	 * Any number &gt;= 0 and smaller than this number of comments is then a
+	 * valid argument for the {@link #getComment(int)} method.
+	 * @return number of comments retrieved from input image
+	 */
+	public int getNumberOfComments()
+	{
+		if (comments == null) {
+			return 0;
+		} else {
+			return comments.size();
+		}
+	}
+
+	/**
+	 * Returns the number of images in the examined file.
+	 * Assumes that <code>setDetermineImageNumber(true);</code> was called before
+	 * a successful call to {@link #check()}.
+	 * This value can currently be only different from <code>1</code> for GIF images.
+	 * @return number of images in file
+	 */
+	public int getNumberOfImages()
+	{
+		return numberOfImages;
+	}
+
+	/**
+	 * Returns the physical height of this image in dots per inch (dpi).
+	 * Assumes that {@link #check()} was successful.
+	 * Returns <code>-1</code> on failure.
+	 * @return physical height (in dpi)
+	 * @see #getPhysicalWidthDpi()
+	 * @see #getPhysicalHeightInch()
+	 */
+	public int getPhysicalHeightDpi() {
+		return physicalHeightDpi;
+	}
+
+	/**
+	 * If {@link #check()} was successful, returns the physical width of this image in dpi (dots per inch)
+	 * or -1 if no value could be found.
+	 * @return physical height (in dpi)
+	 * @see #getPhysicalHeightDpi()
+	 * @see #getPhysicalWidthDpi()
+	 * @see #getPhysicalWidthInch()
+	 */
+	public float getPhysicalHeightInch() {
+		int h = getHeight();
+		int ph = getPhysicalHeightDpi();
+		if (h > 0 && ph > 0) {
+			return ((float)h) / ((float)ph);
+		} else {
+			return -1.0f;
+		}
+	}
+
+	/**
+	 * If {@link #check()} was successful, returns the physical width of this image in dpi (dots per inch)
+	 * or -1 if no value could be found.
+	 * @return physical width (in dpi)
+	 * @see #getPhysicalHeightDpi()
+	 * @see #getPhysicalWidthInch()
+	 * @see #getPhysicalHeightInch()
+	 */
+	public int getPhysicalWidthDpi() {
+		return physicalWidthDpi;
+	}
+
+	/**
+	 * Returns the physical width of an image in inches, or
+	 * <code>-1.0f</code> if width information is not available.
+	 * Assumes that {@link #check} has been called successfully.
+	 * @return physical width in inches or <code>-1.0f</code> on failure
+	 * @see #getPhysicalWidthDpi
+	 * @see #getPhysicalHeightInch
+	 */
+	public float getPhysicalWidthInch() {
+		int w = getWidth();
+		int pw = getPhysicalWidthDpi();
+		if (w > 0 && pw > 0) {
+			return ((float)w) / ((float)pw);
+		} else {
+			return -1.0f;
+		}
+	}
+
+	private int getShortBigEndian(byte[] a, int offs) {
+		return
+			(a[offs] & 0xff) << 8 | 
+			(a[offs + 1] & 0xff);
+	}
+
+	private int getShortLittleEndian(byte[] a, int offs) {
+		return (a[offs] & 0xff) | (a[offs + 1] & 0xff) << 8;
+	}
+
+	/** 
+	 * If {@link #check()} was successful, returns one the image's horizontal
+	 * resolution in pixels.
+	 * @return image width in pixels
+	 */
+	public int getWidth() {
+		return width;
+	}
+
+	/**
+	 * Returns whether the image is stored in a progressive (also called: interlaced) way.
+	 * @return true for progressive/interlaced, false otherwise
+	 */
+	public boolean isProgressive()
+	{
+		return progressive;
+	}
+
+	/**
+	 * To use this class as a command line application, give it either 
+	 * some file names as parameters (information on them will be
+	 * printed to standard output, one line per file) or call
+	 * it with no parameters. It will then check data given to it
+	 * via standard input.
+	 * @param args the program arguments which must be file names
+	 */
+	public static void main(String[] args) {
+		ImageInfo imageInfo = new ImageInfo();
+		imageInfo.setDetermineImageNumber(true);
+		boolean verbose = determineVerbosity(args);
+		if (args.length == 0) {
+			run(null, System.in, imageInfo, verbose);
+		} else {
+			int index = 0;
+			while (index < args.length) {
+				InputStream in = null;
+				try {
+					String name = args[index++];
+					System.out.print(name + ";");
+					if (name.startsWith("http://")) {
+						in = new URL(name).openConnection().getInputStream();
+					} else {
+						in = new FileInputStream(name);
+					}
+					run(name, in, imageInfo, verbose);
+					in.close();
+				} catch (Exception e) {
+					System.out.println(e);
+					try {
+						in.close();
+					} catch (Exception ee) {
+					}
+				}
+			}
+		}
+	}
+
+	private static void print(String sourceName, ImageInfo ii, boolean verbose) {
+		if (verbose) {
+			printVerbose(sourceName, ii);
+		} else {
+			printCompact(sourceName, ii);
+		}
+	}
+
+	private static void printCompact(String sourceName, ImageInfo imageInfo) {
+		System.out.println(
+			imageInfo.getFormatName() + ";" +
+			imageInfo.getMimeType() + ";" +
+			imageInfo.getWidth() + ";" +
+			imageInfo.getHeight() + ";" +
+			imageInfo.getBitsPerPixel() + ";" +
+			imageInfo.getNumberOfImages() + ";" +
+			imageInfo.getPhysicalWidthDpi() + ";" +
+			imageInfo.getPhysicalHeightDpi() + ";" +
+			imageInfo.getPhysicalWidthInch() + ";" +
+			imageInfo.getPhysicalHeightInch() + ";" +
+			imageInfo.isProgressive()
+		);
+	}
+
+	private static void printLine(int indentLevels, String text, float value, float minValidValue) {
+		if (value < minValidValue) {
+			return;
+		}
+		printLine(indentLevels, text, Float.toString(value));
+	}
+
+	private static void printLine(int indentLevels, String text, int value, int minValidValue) {
+		if (value >= minValidValue) {
+			printLine(indentLevels, text, Integer.toString(value));
+		}
+	}
+
+	private static void printLine(int indentLevels, String text, String value) {
+		if (value == null || value.length() == 0) {
+			return;
+		}
+		while (indentLevels-- > 0) {
+			System.out.print("\t");
+		}
+		if (text != null && text.length() > 0) {
+			System.out.print(text);
+			System.out.print(" ");
+		}
+		System.out.println(value);
+	}
+
+	private static void printVerbose(String sourceName, ImageInfo ii) {
+		printLine(0, null, sourceName);
+		printLine(1, "File format: ", ii.getFormatName());
+		printLine(1, "MIME type: ", ii.getMimeType());
+		printLine(1, "Width (pixels): ", ii.getWidth(), 1);
+		printLine(1, "Height (pixels): ", ii.getHeight(), 1);
+		printLine(1, "Bits per pixel: ", ii.getBitsPerPixel(), 1);
+		printLine(1, "Progressive: ", Boolean.toString(ii.isProgressive()));
+		printLine(1, "Number of images: ", ii.getNumberOfImages(), 1);
+		printLine(1, "Physical width (dpi): ", ii.getPhysicalWidthDpi(), 1);
+		printLine(1, "Physical height (dpi): ", ii.getPhysicalHeightDpi(), 1);
+		printLine(1, "Physical width (inches): ", ii.getPhysicalWidthInch(), 1.0f);
+		printLine(1, "Physical height (inches): ", ii.getPhysicalHeightInch(), 1.0f);
+		int numComments = ii.getNumberOfComments();
+		printLine(1, "Number of textual comments: ", numComments, 1);
+		if (numComments > 0) {
+			for (int i = 0; i < numComments; i++) {
+				printLine(2, null, ii.getComment(i));
+			}
+		}
+	}
+
+	private int read() throws IOException {
+		if (in != null) {
+			return in.read();
+		} else {
+			return din.readByte();
+		}
+	}
+
+	private int read(byte[] a) throws IOException {
+		if (in != null) {
+			return in.read(a);
+		} else {
+			din.readFully(a);
+			return a.length;
+		}
+	}
+
+	private int read(byte[] a, int offset, int num) throws IOException {
+		if (in != null) {
+			return in.read(a, offset, num);
+		} else {
+			din.readFully(a, offset, num);
+			return num;
+		}
+	}
+
+	private String readLine() throws IOException {
+		return readLine(new StringBuffer());
+	}
+
+	private String readLine(StringBuffer sb) throws IOException {
+		boolean finished;
+		do {
+			int value = read();
+			finished = (value == -1 || value == 10);
+			if (!finished) {
+				sb.append((char)value);
+			}
+		} while (!finished);
+		return sb.toString();
+	}
+
+	private long readUBits( int numBits ) throws IOException
+	{
+		if (numBits == 0) {
+			return 0;
+		}
+		int bitsLeft = numBits;
+		long result = 0;
+		if (bitPos == 0) { //no value in the buffer - read a byte
+			if (in != null) {
+				bitBuf = in.read();
+			} else {
+				bitBuf = din.readByte();
+			}
+			bitPos = 8;
+		}
+        
+	    while( true )
+        {
+            int shift = bitsLeft - bitPos;
+            if( shift > 0 )
+            {
+                // Consume the entire buffer
+                result |= bitBuf << shift;
+                bitsLeft -= bitPos;
+
+                // Get the next byte from the input stream
+                if (in != null) {
+                  bitBuf = in.read();
+                } else {
+                  bitBuf = din.readByte();
+                }
+                bitPos = 8;
+            }
+            else
+            {
+             	// Consume a portion of the buffer
+                result |= bitBuf >> -shift;
+                bitPos -= bitsLeft;
+                bitBuf &= 0xff >> (8 - bitPos);	// mask off the consumed bits
+
+                return result;
+            }
+        }        
+    }
+    
+        /**
+     * Read a signed value from the given number of bits
+     */
+    private int readSBits( int numBits ) throws IOException
+    {
+        // Get the number as an unsigned value.
+        long uBits = readUBits( numBits );
+
+        // Is the number negative?
+        if( ( uBits & (1L << (numBits - 1))) != 0 )
+        {
+            // Yes. Extend the sign.
+            uBits |= -1L << numBits;
+        }
+
+        return (int)uBits;        
+    }  
+   
+	private void synchBits()
+	{
+		bitBuf = 0;
+		bitPos = 0;
+	}
+
+	private String readLine(int firstChar) throws IOException {
+		StringBuffer result = new StringBuffer();
+		result.append((char)firstChar);
+		return readLine(result);
+	}
+
+	private static void run(String sourceName, InputStream in, ImageInfo imageInfo, boolean verbose) {
+		imageInfo.setInput(in);
+		imageInfo.setDetermineImageNumber(false);
+		imageInfo.setCollectComments(verbose);
+		if (imageInfo.check()) {
+			print(sourceName, imageInfo, verbose);
+		}
+	}
+
+	/**
+	 * Specify whether textual comments are supposed to be extracted from input.
+	 * Default is <code>false</code>.
+	 * If enabled, comments will be added to an internal list.
+	 * @param newValue if <code>true</code>, this class will read comments
+	 * @see #getNumberOfComments
+	 * @see #getComment
+	 */
+	public void setCollectComments(boolean newValue)
+	{
+		collectComments = newValue;
+	}
+
+	/**
+	 * Specify whether the number of images in a file is to be
+	 * determined - default is <code>false</code>.
+	 * This is a special option because some file formats require running over
+	 * the entire file to find out the number of images, a rather time-consuming
+	 * task.
+	 * Not all file formats support more than one image.
+	 * If this method is called with <code>true</code> as argument,
+	 * the actual number of images can be queried via 
+	 * {@link #getNumberOfImages()} after a successful call to
+	 * {@link #check()}.
+	 * @param newValue will the number of images be determined?
+	 * @see #getNumberOfImages
+	 */
+	public void setDetermineImageNumber(boolean newValue)
+	{
+		determineNumberOfImages = newValue;
+	}
+
+	/**
+	 * Set the input stream to the argument stream (or file). 
+	 * Note that {@link java.io.RandomAccessFile} implements
+	 * {@link java.io.DataInput}.
+	 * @param dataInput the input stream to read from
+	 */
+	public void setInput(DataInput dataInput) {
+		din = dataInput;
+		in = null;
+	}
+
+	/**
+	 * Set the input stream to the argument stream (or file).
+	 * @param inputStream the input stream to read from
+	 */
+	public void setInput(InputStream inputStream) {
+		in = inputStream;
+		din = null;
+	}
+
+	private void setPhysicalHeightDpi(int newValue) {
+		physicalWidthDpi = newValue;
+	}
+
+	private void setPhysicalWidthDpi(int newValue) {
+		physicalHeightDpi = newValue;
+	}
+
+	private void skip(int num) throws IOException {
+		while (num > 0) {
+			long result;
+			if (in != null) {
+				result = in.skip(num);
+			} else {
+				result = din.skipBytes(num);
+			}
+			if (result > 0) {
+				num -= result;
+			}
+		}
+	}
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/ImageWaiter.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/ImageWaiter.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/ImageWaiter.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,133 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Helma License Notice
+ *
+ * The contents of this file are subject to the Helma License
+ * Version 2.0 (the "License"). You may not use this file except in
+ * compliance with the License. A copy of the License is available at
+ * http://adele.helma.org/download/helma/license.txt
+ *
+ * Copyright 1998-2003 Helma Software. All Rights Reserved.
+ *
+ * $RCSfile: ImageWaiter.java,v $
+ * $Author: alexsmirnov $
+ * $Revision: 1.1.2.1 $
+ * $Date: 2007/01/09 18:59:07 $
+ */
+
+package org.ajax4jsf.framework.util.image;
+
+import java.awt.Image;
+import java.awt.image.ImageObserver;
+
+import org.ajax4jsf.framework.util.message.Messages;
+
+/**
+ * The ImageWaiter will only be used like this:
+ * image = ImageWaiter.waitForImage(image);
+ */
+public class ImageWaiter implements ImageObserver {
+    Image image;
+    int width;
+    int height;
+    boolean waiting;
+    boolean firstFrameLoaded;
+
+    private ImageWaiter(Image image) {
+        this.image = image;
+        waiting = true;
+        firstFrameLoaded = false;
+    }
+        
+    public static Image waitForImage(Image image) {
+        ImageWaiter waiter = new ImageWaiter(image);
+        try {
+            waiter.waitForImage();
+        } finally {
+            waiter.done();
+        }
+        return waiter.width == -1 || waiter.height == -1 ? null : image;
+    }
+
+    private synchronized void waitForImage() {
+        width = image.getWidth(this);
+        height = image.getHeight(this);
+
+        if (width == -1 || height == -1) {
+            try {
+                wait(45000);
+            } catch (InterruptedException x) {
+                waiting = false;
+                return;
+            } finally {
+                waiting = false;
+            }
+        }
+
+        // if width and height haven't been set, throw tantrum
+        if (width == -1 || height == -1) {
+            throw new RuntimeException(Messages.getMessage(Messages.LOADING_IMAGE_ERROR));
+        }
+    }
+
+    private synchronized void done() {
+        waiting = false;
+        notifyAll();
+    }
+
+    public synchronized boolean imageUpdate(Image img, int infoflags, int x,
+        int y, int w, int h) {
+        // check if there was an error
+        if (!waiting || (infoflags & ERROR) > 0 || (infoflags & ABORT) > 0) {
+            // we either timed out or there was an error.
+            notifyAll();
+
+            return false;
+        }
+
+        if ((infoflags & WIDTH) > 0 || (infoflags & HEIGHT) > 0) {
+            if ((infoflags & WIDTH) > 0) {
+                width = w;
+            }
+
+            if ((infoflags & HEIGHT) > 0) {
+                height = h;
+            }
+
+            if (width > -1 && h > -1 && firstFrameLoaded) {
+                notifyAll();
+
+                return false;
+            }
+        }
+
+        if ((infoflags & ALLBITS) > 0 || (infoflags & FRAMEBITS) > 0) {
+            firstFrameLoaded = true;
+            notifyAll();
+
+            return false;
+        }
+
+        return true;
+    }
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/ImageWrapper.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/ImageWrapper.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/ImageWrapper.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,531 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Helma License Notice
+ *
+ * The contents of this file are subject to the Helma License
+ * Version 2.0 (the "License"). You may not use this file except in
+ * compliance with the License. A copy of the License is available at
+ * http://adele.helma.org/download/helma/license.txt
+ *
+ * Copyright 1998-2003 Helma Software. All Rights Reserved.
+ *
+ * $RCSfile: ImageWrapper.java,v $
+ * $Author: alexsmirnov $
+ * $Revision: 1.1.2.1 $
+ * $Date: 2007/01/09 18:59:05 $
+ */
+
+/*
+ * A few explanations:
+ * 
+ * - this.image is either an AWT Image or a BufferedImage.
+ *   It depends on the ImageGenerator in what form the Image initially is.
+ *   (the ImageIO implementation only uses BufferedImages for example.)
+ * 
+ *   As soon as some action that needs the graphics object is performed and the  
+ *   image is still in AWT format, it is converted to a BufferedImage
+ * 
+ *   Any internal function that performs graphical actions needs to call
+ *   getGraphics, never rely on this.graphics being set correctly!
+ * 
+ * - ImageWrapper objects are created and safed by the ImageGenerator class
+ *   all different implementations of Imaging functionallity are implemented
+ *   as a ImageGenerator extending class.
+ * 
+ */
+
+package org.ajax4jsf.framework.util.image;
+
+import java.awt.Color;
+import java.awt.Font;
+import java.awt.Graphics;
+import java.awt.Graphics2D;
+import java.awt.Image;
+import java.awt.RenderingHints;
+import java.awt.geom.AffineTransform;
+import java.awt.image.AreaAveragingScaleFilter;
+import java.awt.image.BufferedImage;
+import java.awt.image.ColorModel;
+import java.awt.image.ImageProducer;
+import java.awt.image.IndexColorModel;
+import java.io.IOException;
+
+import org.ajax4jsf.framework.util.message.Messages;
+
+/**
+ * Abstract base class for Image Wrappers.
+ */
+public class ImageWrapper {
+    protected Image image;
+    protected int width;
+    protected int height;
+    protected ImageGenerator generator;
+    private Graphics2D graphics;
+
+    /**
+     * Creates a new ImageWrapper object.
+     * 
+     * @param image ...
+     * @param width ...
+     * @param height ...
+     */
+    public ImageWrapper(Image image, int width, int height,
+        ImageGenerator generator) {
+        this.image = image;
+        this.width = width;
+        this.height = height;
+        this.generator = generator;
+        // graphics are turned off by default. getGraphics activates it if necessary.
+        this.graphics = null;
+    }
+    
+    public ImageWrapper(Image image, ImageGenerator generator) {
+        this(image, image.getWidth(null), image.getHeight(null), generator);
+    }
+
+    /**
+     * Converts the internal image object to a BufferedImage (if it's not
+     * already) and returns it. this is necessary as not all images are of type
+     * BufferedImage. e.g. images loaded from a resource with the Toolkit are
+     * not. By using getBufferedImage, images are only converted to a
+     * getBufferedImage when this is actually needed, which is better than
+     * storing images as BufferedImage in general.
+     * 
+     * @return the Image object as a BufferedImage
+     */
+    public BufferedImage getBufferedImage() {
+        if (!(image instanceof BufferedImage)) {
+            BufferedImage buffered = new BufferedImage(width, height,
+                BufferedImage.TYPE_INT_ARGB);
+            buffered.createGraphics().drawImage(image, 0, 0, null);
+            setImage(buffered);
+        }
+        return (BufferedImage)image;
+    }
+
+    /**
+     * Returns the Graphics object to directly paint to this Image. Converts the 
+     * internal image to a BufferedImage if necessary.
+     * 
+     * @return the Graphics object for drawing into this image
+     */
+    public Graphics getGraphics() {
+        if (graphics == null) {
+            // make sure the image is a BufferedImage and then create a graphics object
+            BufferedImage img = getBufferedImage();
+            graphics = img.createGraphics();
+        }
+        return graphics;
+    }
+    
+    /**
+     * Sets the internal image and clears the stored graphics object.
+     * Any code that is changing the internal image should do it through this function
+     * to make sure getGraphcis() returns a valid graphics object the next time it is called.
+     */
+    protected void setImage(Image image) {
+        this.image = image;
+        graphics = null;
+    }
+
+    /**
+     * Creates and returns a copy of this image.
+     * 
+     * @return a clone of this image.
+     */
+    public Object clone() {
+        ImageWrapper wrapper = generator.createImage(this.width,
+            this.height);
+        wrapper.getGraphics().drawImage(image, 0, 0, null);
+        return wrapper;
+    }
+
+    /**
+     * Returns the Image object represented by this ImageWrapper.
+     * 
+     * @return the image object
+     */
+    public Image getImage() {
+        return image;
+    }
+
+    /**
+     * Returns the ImageProducer of the wrapped image
+     * 
+     * @return the images's ImageProducer
+     */
+    public ImageProducer getSource() {
+        return image.getSource();
+    }
+
+    /**
+     * Dispose the Graphics context and null out the image.
+     */
+    public void dispose() {
+        image = null;
+        if (graphics != null) {
+            graphics.dispose();
+            graphics = null;
+        }
+    }
+
+    /**
+     * Set the font used to write on this image.
+     */
+    public void setFont(String name, int style, int size) {
+        getGraphics().setFont(new Font(name, style, size));
+    }
+
+    /**
+     * Sets the color used to write/paint to this image.
+     * 
+     * @param red ...
+     * @param green ...
+     * @param blue ...
+     */
+    public void setColor(int red, int green, int blue) {
+        getGraphics().setColor(new Color(red, green, blue));
+    }
+
+    /**
+     * Sets the color used to write/paint to this image.
+     * 
+     * @param color ...
+     */
+    public void setColor(int color) {
+        getGraphics().setColor(new Color(color));
+    }
+
+    /**
+     * Sets the color used to write/paint to this image.
+     * 
+     * @param color ...
+     */
+    public void setColor(Color color) {
+        getGraphics().setColor(color);
+    }
+
+    /**
+     * Sets the color used to write/paint to this image.
+     * 
+     * @param color ...
+     */
+    public void setColor(String color) {
+        getGraphics().setColor(Color.decode(color));
+    }
+    /**
+     * Draws a string to this image at the given coordinates.
+     * 
+     * @param str ...
+     * @param x ...
+     * @param y ...
+     */
+    public void drawString(String str, int x, int y) {
+        getGraphics().drawString(str, x, y);
+    }
+
+    /**
+     * Draws a line to this image from x1/y1 to x2/y2.
+     * 
+     * @param x1 ...
+     * @param y1 ...
+     * @param x2 ...
+     * @param y2 ...
+     */
+    public void drawLine(int x1, int y1, int x2, int y2) {
+        getGraphics().drawLine(x1, y1, x2, y2);
+    }
+
+    /**
+     * Draws a rectangle to this image.
+     * 
+     * @param x ...
+     * @param y ...
+     * @param w ...
+     * @param h ...
+     */
+    public void drawRect(int x, int y, int w, int h) {
+        getGraphics().drawRect(x, y, w, h);
+    }
+
+    /**
+     * Draws another image to this image.
+     * 
+     * @param filename ...
+     * @param x ...
+     * @param y ...
+     */
+    public void drawImage(String filename, int x, int y) 
+        throws IOException {
+        Image img = generator.read(filename);
+        if (img != null)
+            getGraphics().drawImage(img, x, y, null);
+    }
+
+    /**
+     * Draws another image to this image.
+     * 
+     * @param filename ...
+     * @param x ...
+     * @param y ...
+     */
+    public void drawImage(ImageWrapper image, int x, int y) 
+        throws IOException {
+        getGraphics().drawImage(image.getImage(), x, y, null);
+    }
+
+    /**
+     * Draws a filled rectangle to this image.
+     * 
+     * @param x ...
+     * @param y ...
+     * @param w ...
+     * @param h ...
+     */
+    public void fillRect(int x, int y, int w, int h) {
+        getGraphics().fillRect(x, y, w, h);
+    }
+
+    /**
+     * Returns the width of this image.
+     * 
+     * @return the width of this image
+     */
+    public int getWidth() {
+        return width;
+    }
+
+    /**
+     * Returns the height of this image.
+     * 
+     * @return the height of this image
+     */
+    public int getHeight() {
+        return height;
+    }
+
+    /**
+     * Crops the image.
+     * 
+     * @param x ...
+     * @param y ...
+     * @param w ...
+     * @param h ...
+     */
+    public void crop(int x, int y, int w, int h) {
+        // do not use the CropFilter any longer:
+        if (image instanceof BufferedImage) {
+            // BufferedImages define their own function for cropping:
+            setImage(((BufferedImage)image).getSubimage(x, y, w, h));
+        } else {
+            // The internal image will be a BufferedImage after this.
+            // Simply create it with the cropped dimensions and draw the image into it:
+            BufferedImage buffered = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB);
+            Graphics2D g2d = buffered.createGraphics();
+            g2d.drawImage(image, -x, -y, null);
+            g2d.dispose();
+            setImage(buffered);
+        }
+    }
+    
+    /**
+     * resizes the image using the Graphics2D approach
+     */
+    protected BufferedImage resize(int w, int h, boolean smooth) {
+        BufferedImage buffered = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB);
+        Graphics2D g2d = buffered.createGraphics();
+
+        g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION, 
+            smooth ? RenderingHints.VALUE_INTERPOLATION_BICUBIC :
+                RenderingHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR
+        );
+
+        g2d.setRenderingHint(RenderingHints.KEY_RENDERING, 
+            smooth ? RenderingHints.VALUE_RENDER_QUALITY :
+                RenderingHints.VALUE_RENDER_SPEED
+        );
+
+        AffineTransform at = AffineTransform.getScaleInstance(
+            (double) w / width,
+            (double) h / height
+        );
+        g2d.drawImage(image, at, null);
+        g2d.dispose();
+        return buffered;
+    }
+
+    /**
+     * Resize the image
+     * 
+     * @param w ...
+     * @param h ...
+     */
+
+    public void resize(int w, int h) {
+        double factor = Math.max(
+            (double) w / width,
+            (double) h / height
+        );
+        // if the image is scaled, used the Graphcis2D method, otherwise use AWT:
+        if (factor > 1f) {
+            // scalie it with the Graphics2D approach for supperiour quality.
+            setImage(resize(w, h, true));
+        } else {
+            // Area averaging has the best results for shrinking of images:
+
+            // as getScaledInstance is asynchronous, the ImageWaiter is needed here too:
+            // Image scaled = ImageWaiter.waitForImage(image.getScaledInstance(w, h, Image.SCALE_AREA_AVERAGING));
+            // if (scaled == null)
+            //     throw new RuntimeException("Image cannot be resized.");
+            
+            // this version is up to 4 times faster than getScaledInstance:
+            ImageFilterOp filter = new ImageFilterOp(new AreaAveragingScaleFilter(w, h));
+            setImage(filter.filter(getBufferedImage(), null));
+        }
+        width = w;
+        height = h;
+    }
+
+    /**
+     * Resize the image, using a fast and cheap algorithm
+     * 
+     * @param w ...
+     * @param h ...
+     */
+    public void resizeFast(int w, int h) {
+        image = resize(w, h, false);
+        width = w;
+        height = h;
+   }
+
+    /**
+     * Reduces the colors used in the image. Necessary before saving as GIF.
+     * 
+     * @param colors colors the number of colors to use, usually <= 256.
+     */
+    public void reduceColors(int colors) {
+        reduceColors(colors, false);
+    }
+
+    /**
+     * Reduces the colors used in the image. Necessary before saving as GIF.
+     * 
+     * @param colors colors the number of colors to use, usually <= 256.
+     * @param dither ...
+     */
+    public void reduceColors(int colors, boolean dither) {
+        reduceColors(colors, dither, true);
+    }
+
+    /**
+     * Reduce the colors used in this image. Useful and necessary before saving
+     * the image as GIF file.
+     * 
+     * @param colors the number of colors to use, usually <= 256.
+     * @param dither ...
+     * @param alphaToBitmask ...
+     */
+
+    public void reduceColors(int colors, boolean dither, boolean alphaToBitmask) {
+        setImage(Quantize.process(getBufferedImage(), colors, dither,
+            alphaToBitmask));
+    }
+
+    /**
+     * Save the image. Image format is deduced from filename.
+     * 
+     * @param filename ...
+     * @throws IOException
+     */
+    public void saveAs(String filename)
+        throws IOException {
+        saveAs(filename, -1f, false); // -1 means default quality
+    }
+
+    /**
+     * Saves the image. Image format is deduced from filename.
+     * 
+     * @param filename ...
+     * @param quality ...
+     * @throws IOException
+     */
+    public void saveAs(String filename, float quality)
+        throws IOException {
+        saveAs(filename, quality, false);
+    }
+
+    /**
+     * Saves the image. Image format is deduced from filename.
+     * 
+     * @param filename ...
+     * @param quality ...
+     * @param alpha ...
+     * @throws IOException
+     */
+    public void saveAs(String filename, float quality, boolean alpha)
+        throws IOException {
+        generator.write(this, filename, quality, alpha);
+    }
+    
+    /**
+     * Sets the palette index of the transparent color for Images with an
+     * IndexColorModel. This can be used together with
+     * {@link helma.image.ImageWrapper#getPixel}.
+     */
+    public void setTransparentPixel(int trans)  {
+        BufferedImage bi = this.getBufferedImage();
+        ColorModel cm = bi.getColorModel();
+        if (!(cm instanceof IndexColorModel))
+            throw new RuntimeException(Messages.getMessage(Messages.NOT_INDEXED_IMAGE_ERROR));
+        IndexColorModel icm = (IndexColorModel) cm;
+        int mapSize = icm.getMapSize();
+        byte reds[] = new byte[mapSize];
+        byte greens[] = new byte[mapSize];
+        byte blues[] = new byte[mapSize];
+        icm.getReds(reds);
+        icm.getGreens(greens);
+        icm.getBlues(blues);
+        // create the new IndexColorModel with the changed transparentPixel:
+        icm = new IndexColorModel(icm.getPixelSize(), mapSize, reds, greens,
+            blues, trans);
+        // create a new BufferedImage with the new IndexColorModel and the old
+        // raster:
+        setImage(new BufferedImage(icm, bi.getRaster(), false, null));
+    }
+
+    /**
+     * Returns the pixel at x, y. If the image is indexed, it returns the
+     * palette index, otherwise the rgb code of the color is returned.
+     * 
+     * @param x the x coordinate of the pixel
+     * @param y the y coordinate of the pixel
+     * @return the pixel at x, y
+     */
+    public int getPixel(int x, int y) {
+        BufferedImage bi = this.getBufferedImage();
+        if (bi.getColorModel() instanceof IndexColorModel)
+            return bi.getRaster().getSample(x, y, 0);
+        else
+            return bi.getRGB(x, y);
+    }
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/IndexImage.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/IndexImage.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/IndexImage.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,886 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+
+   Copyright 2002-2003  The Apache Software Foundation 
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
+ */
+package org.ajax4jsf.framework.util.image;
+
+import java.awt.Graphics2D;
+import java.awt.Point;
+import java.awt.Rectangle;
+import java.awt.RenderingHints;
+import java.awt.image.BufferedImage;
+import java.awt.image.ColorModel;
+import java.awt.image.DataBuffer;
+import java.awt.image.DataBufferInt;
+import java.awt.image.IndexColorModel;
+import java.awt.image.MultiPixelPackedSampleModel;
+import java.awt.image.Raster;
+import java.awt.image.SampleModel;
+import java.awt.image.SinglePixelPackedSampleModel;
+import java.awt.image.WritableRaster;
+import java.util.Iterator;
+import java.util.Vector;
+
+/**
+ * This implements an adaptive pallete generator to reduce images to a
+ * specified number of colors.
+ *
+ * Ideally this would also support a better dither option than just 
+ * the JDK's pattern dither.
+ *
+ * @author <a href="mailto:deweese at apache.org">Thomas DeWeese</a>
+ * @author <a href="mailto:jun at oop-reserch.com">Jun Inamori</a>
+ * @version $Id: IndexImage.java,v 1.1.2.1 2007/01/09 18:59:03 alexsmirnov Exp $ */
+public class IndexImage{
+
+    /**
+     * Used to track a color and the number of pixels of that colors
+     */
+    private static class Counter {
+        public int val;
+        public int count=1;
+        public Counter(int val) {  this.val = val; }
+        public boolean add(int val) {
+            // See if the value matches us...
+            if (this.val != val)
+                return false;
+            count++;
+            return true;
+        }
+    }
+
+    /**
+     * Used to define a cube of the colorspace.  The cube can be split
+     * approximagely in half to generate two cubes.  
+     */
+    private static class Cube {
+        int []min={0, 0, 0}, max={255,255,255};
+
+        boolean done = false;
+        
+        Vector []colors = null;
+        int count=0;
+        static final int RED = 0;
+        static final int GRN = 1;
+        static final int BLU = 2;
+
+        /**
+         * Define a new cube.
+         * @param colors contains the 3D color histogram to be subdivided
+         * @param count the total number of pixels in the 3D histogram.
+         */
+        public Cube(Vector []colors, int count) {
+            this.colors = colors;
+            this.count = count;
+        }
+
+        /**
+         * If this returns true then the cube can not be subdivided any
+         * further
+         */
+        public boolean isDone() { return done; }
+        /**
+         * Splits the cube into two parts.  This cube is
+         * changed to be one half and the returned cube is the other half.
+         * This tries to pick the right channel to split on.
+         */
+        public Cube split() {
+            int dr = max[0]-min[0]+1;
+            int dg = max[1]-min[1]+1;
+            int db = max[2]-min[2]+1;
+            int c0, c1, splitChannel;
+
+            // Figure out which axis is the longest and split along
+            // that axis (this tries to keep cubes square-ish).
+            if (dr >= dg) {
+                c0 = GRN;
+                if (dr >= db) { splitChannel = RED; c1=BLU; }
+                else          { splitChannel = BLU; c1=RED; }
+            } else if (dg >= db) {
+                splitChannel = GRN;
+                c0=RED;
+                c1=BLU;
+            } else {
+                splitChannel = BLU;
+                c0=RED;
+                c1=GRN;
+            }
+
+            Cube ret;
+            ret = splitChannel(splitChannel, c0, c1);
+            if (ret != null ) return ret;
+
+            ret = splitChannel(c0, splitChannel, c1);
+            if (ret != null ) return ret;
+
+            ret = splitChannel(c1, splitChannel, c0);
+            if (ret != null) return ret;
+            
+            done = true;
+            return null;
+        }
+
+        /**
+         * Splits the image according to the parameters.  It tries
+         * to find a location where half the pixels are on one side
+         * and half the pixels are on the other.
+         */
+        public Cube splitChannel(int splitChannel, int c0, int c1) {
+            if (min[splitChannel] == max[splitChannel]) return null;
+            
+            int splitSh4 = (2-splitChannel)*4;
+            int c0Sh4    = (2-c0)*4;
+            int c1Sh4    = (2-c1)*4;
+
+            int half = count/2;
+            // Each entry is the number of pixels that have that value
+            // in the split channel within the cube (so pixels
+            // that have that value in the split channel aren't counted
+            // if they are outside the cube in the other color channels.
+            int counts [] = new int[256];
+            int tcount = 0;
+
+            // System.out.println("Cube: [" + 
+            //                    min[0] + "-" + max[0] + "] [" +
+            //                    min[1] + "-" + max[1] + "] [" +
+            //                    min[2] + "-" + max[2] + "]");
+
+            int [] minIdx = {min[0]>>4, min[1]>>4, min[2]>>4};
+            int [] maxIdx = {max[0]>>4, max[1]>>4, max[2]>>4};
+            int minR=min[0], minG=min[1], minB=min[2];
+            int maxR=max[0], maxG=max[1], maxB=max[2];
+            int val = 0;
+            int [] vals = {0, 0, 0};
+            for (int i=minIdx[splitChannel]; i<=maxIdx[splitChannel]; i++) {
+                int idx1 = i<<splitSh4;
+                for (int j=minIdx[c0]; j<=maxIdx[c0]; j++) {
+                    int idx2 = idx1 | (j<<c0Sh4);
+                    for (int k=minIdx[c1]; k<=maxIdx[c1]; k++) {
+                        int idx = idx2 | (k<<c1Sh4);
+                        Vector v = colors[idx];
+                        if (v==null) continue;
+                        Iterator itr = v.iterator();
+                        Counter c;
+                        while (itr.hasNext()) {
+                            c = (Counter)itr.next();
+                            val = c.val;
+                            vals[0] = (val&0xFF0000)>>16;
+                            vals[1] = (val&0xFF00)>>8;
+                            vals[2] = (val&0xFF);
+                            if (((vals[0] >= minR) && (vals[0] <= maxR))&&
+                                ((vals[1] >= minG) && (vals[1] <= maxG))&&
+                                ((vals[2] >= minB) && (vals[2] <= maxB))) {
+                                // The val lies within this cube so count it.
+                                counts[vals[splitChannel]] += c.count;
+                                tcount += c.count;
+                            }
+                        }
+                    }
+                }
+                // We've found the half way point.  Note that the
+                // rest of counts is not filled out.
+                if (tcount >= half) break;
+            }
+
+            tcount=0;
+            int lastAdd=-1;
+            // These indicate what the top value for the low cube and
+            // the low value of the high cube should be in the split channel
+            // (they may not be one off if there are 'dead' spots in the
+            // counts array.
+            int splitLo=min[splitChannel], splitHi=max[splitChannel];
+            for (int i=min[splitChannel]; i<=max[splitChannel]; i++) {
+                int c = counts[i];
+                if (c == 0) {
+                    // No counts below this so move up bottom of cube.
+                    if ((tcount == 0) && (i < max[splitChannel]))
+                        this.min[splitChannel] = i+1;
+                    continue;
+                }
+
+                if (tcount+c < half) {
+                    lastAdd = i;
+                    tcount+=c;
+                    continue;
+                }
+                if ((half-tcount) <= ((tcount+c)-half)) {
+                    // Then lastAdd is a better top idx for this then i.
+                    if (lastAdd == -1) {
+                        // No lower place to break.
+                        if (c == this.count) {
+                            // All pixels are at this value so make min/max
+                            // reflect that.
+                            this.max[splitChannel] = i;
+                            return null; // no split to make.
+                        } else {
+                            // There are values about this one so
+                            // split above.
+                            splitLo = i;
+                            splitHi = i+1;
+                            break;
+                        }
+                    }
+                    splitLo = lastAdd;
+                    splitHi = i;
+                } else {
+                    if (i == this.max[splitChannel]) {
+                        if ( c == this.count) {
+                            // would move min up but that should
+                            // have happened already.
+                            return null; // no split to make.
+                        } else {
+                            // Would like to break between i and i+1
+                            // but no i+1 so use lastAdd and i;
+                            splitLo = lastAdd;
+                            splitHi = i;
+                            break;
+                        }
+                    }
+                    // Include c in counts
+                    tcount += c;
+                    splitLo = i;
+                    splitHi = i+1;
+                }
+                break;
+            }
+
+            // System.out.println("Split: " + splitChannel + "@" 
+            //                    + splitLo + "-"+splitHi + 
+            //                    " Count: " + tcount  + " of " + count +
+            //                    " LA: " + lastAdd);
+
+            // Create the new cube and update everone's bounds & counts.
+            Cube ret = new Cube(colors, tcount);
+            this.count = this.count-tcount;
+            ret.min[splitChannel] = this.min[splitChannel];
+            ret.max[splitChannel] = splitLo;
+            this.min[splitChannel] = splitHi;
+            ret.min[c0] = this.min[c0];
+            ret.max[c0] = this.max[c0];
+            ret.min[c1] = this.min[c1];
+            ret.max[c1] = this.max[c1];
+            return ret;
+        }
+
+        /**
+         * Returns the average color for this cube
+         */
+        public int averageColor() {
+            if (this.count == 0) return 0;
+
+            float red=0, grn=0, blu=0;
+
+            int minR=min[0], minG=min[1], minB=min[2];
+            int maxR=max[0], maxG=max[1], maxB=max[2];
+            int [] minIdx = {minR>>4, minG>>4, minB>>4};
+            int [] maxIdx = {maxR>>4, maxG>>4, maxB>>4};
+            int val, ired, igrn, iblu;
+            float weight;
+            for (int i=minIdx[0]; i<=maxIdx[0]; i++) {
+                int idx1 = i<<8;
+                for (int j=minIdx[1]; j<=maxIdx[1]; j++) {
+                    int idx2 = idx1 | (j<<4);
+                    for (int k=minIdx[2]; k<=maxIdx[2]; k++) {
+                        int idx = idx2 | k;
+                        Vector v = colors[idx];
+                        if (v==null) continue;
+                        Iterator itr = v.iterator();
+                        Counter c;
+                        while (itr.hasNext()) {
+                            c = (Counter)itr.next();
+                            val = c.val;
+                            ired = (val&0xFF0000)>>16;
+                            igrn = (val&0x00FF00)>>8;
+                            iblu = (val&0x0000FF);
+                            if (((ired >= minR) && (ired <= maxR))&&
+                                ((igrn >= minG) && (igrn <= maxG))&&
+                                ((iblu >= minB) && (iblu <= maxB))) {
+                                weight = (c.count/(float)this.count);
+                                red += (ired*weight);
+                                grn += (igrn*weight);
+                                blu += (iblu*weight);
+                            }
+                        }
+                    }
+                }
+            }
+            // System.out.println("RGB: [" + red + ", " + 
+            //                    grn + ", " + blu + "]");
+            return (((int)(red+0.5))<<16 |
+                    ((int)(grn+0.5))<<8  | 
+                    ((int)(blu+0.5)));
+        }
+    }
+
+    /**
+     * Converts the input image (must be TYPE_INT_RGB or
+     * TYPE_INT_ARGB) to an indexed image.  Generating an adaptive
+     * palette with number of colors specified.
+     * @param bi the image to be processed.
+     * @param nColors number of colors in the palette
+     */
+    static public BufferedImage getIndexedImage
+        (BufferedImage bi, int nColors) {
+        int w=bi.getWidth();
+        int h=bi.getHeight();
+
+        // Using 4 bits from RG & B.
+        Vector [] colors = new Vector[1<<12]; 
+
+        int rgb=0;
+        for(int i_w=0; i_w<w; i_w++){
+            for(int i_h=0; i_h<h; i_h++){
+                rgb=(bi.getRGB(i_w,i_h) & 0xFFFFFF);
+                // Get index from high four bits of each component.
+                int idx = (((rgb&0xF00000)>>> 12) |
+                           ((rgb&0x00F000)>>>  8) |
+                           ((rgb&0x0000F0)>>>  4));
+
+                    // Get the 'hash vector' for that key.
+                Vector v = colors[idx];
+                if (v == null) {
+                    // No colors in this bin yet so create vector and
+                    // add color.
+                    v = new Vector();
+                    v.add(new Counter(rgb));
+                    colors[idx] = v;
+                } else {
+                    // find our color in the bin or create a counter for it.
+                    Iterator i = v.iterator();
+                    while (true) {
+                        if (i.hasNext()) {
+                            // try adding our color to each counter...
+                            if (((Counter)i.next()).add(rgb)) break;
+                        } else {
+                            v.add(new Counter(rgb));
+                            break;
+                        }
+                    }
+                }
+            }
+        }
+
+        int nCubes=1;
+        int fCube=0;
+        Cube [] cubes = new Cube[nColors];
+        cubes[0] = new Cube(colors, w*h);
+        
+        while (nCubes < nColors) {
+            while (cubes[fCube].isDone()) {
+                fCube++;
+                if (fCube == nCubes) break;
+            }
+            if (fCube == nCubes) break;
+            Cube c = cubes[fCube];
+            Cube nc = c.split();
+            if (nc != null) {
+                if (nc.count > c.count) {
+                    Cube tmp = c; c= nc; nc = tmp;
+                }
+                int j = fCube;
+                int cnt = c.count;
+                for (int i=fCube+1; i<nCubes; i++) {
+                    if (cubes[i].count < cnt) 
+                        break;
+                    cubes[j++] = cubes[i];
+                }
+                cubes[j++] = c;
+
+                cnt = nc.count;
+                while (j<nCubes) {
+                    if (cubes[j].count < cnt) 
+                        break;
+                    j++;
+                }
+                for (int i=nCubes; i>j; i--)
+                    cubes[i] = cubes[i-1];
+                cubes[j++] = nc;
+                nCubes++;
+            }
+        }
+
+        byte [] r = new byte[nCubes];
+        byte [] g = new byte[nCubes]; 
+        byte [] b = new byte[nCubes]; 
+        for (int i=0; i<nCubes; i++) {
+            int val = cubes[i].averageColor();
+            r[i] = (byte)((val>>16)&0xFF);
+            g[i] = (byte)((val>> 8)&0xFF);
+            b[i] = (byte)((val    )&0xFF);
+
+            // System.out.println("Color [" + i + "]: #" + 
+            //                    (((val>>16)<16)?"0":"") +
+            //                    Integer.toHexString(val));
+        }
+        BufferedImage indexed;
+
+
+        // The JDK doesn't seem to dither the image correctly if I go
+        // below 8bits per pixel.  So I dither to an 8bit pallete
+        // image that only has nCubes colors.  Then I copy the data to
+        // a lower bit depth image that I return.
+        IndexColorModel icm=new IndexColorModel(8,nCubes,r,g,b);
+        indexed =new BufferedImage
+            (w, h, BufferedImage.TYPE_BYTE_INDEXED, icm);
+        Graphics2D g2d=indexed.createGraphics();
+        g2d.setRenderingHint
+            (RenderingHints.KEY_DITHERING,
+             RenderingHints.VALUE_DITHER_ENABLE);
+        g2d.drawImage(bi, 0, 0, null);
+        g2d.dispose();
+
+
+        int bits;
+        for (bits=1; bits <=8; bits++) {
+            if ((1<<bits) >= nCubes) break;
+        }
+        // System.out.println("Bits: " + bits + " Cubes: " + nCubes);
+
+        if (bits > 4)
+            // 8 bit image we are done...
+            return indexed;
+
+        // Create our low bit depth image...
+        if (bits ==3) bits = 4;
+        ColorModel cm=new IndexColorModel(bits,nCubes,r,g,b);
+        SampleModel sm = new MultiPixelPackedSampleModel
+            (DataBuffer.TYPE_BYTE, w, h, bits);
+        WritableRaster ras = Raster.createWritableRaster
+            (sm, new Point(0,0));
+
+        // Copy the data to the low bitdepth image.
+        bi = indexed;
+        indexed = new BufferedImage(cm, ras, 
+                                    bi.isAlphaPremultiplied(), null);
+        copyData(bi, indexed);
+        return indexed;
+    }
+    
+    /**
+     * An internal optimized version of copyData designed to work on
+     * Integer packed data with a SinglePixelPackedSampleModel.  Only
+     * the region of overlap between src and dst is copied.
+     *
+     * Calls to this should be preflighted with is_INT_PACK_Data
+     * on both src and dest (requireAlpha can be false).
+     *
+     * @param src The source of the data
+     * @param dst The destination for the data.
+     */
+    public static void copyData_INT_PACK(Raster src, WritableRaster dst) {
+        // System.out.println("Fast copyData");
+        int x0 = dst.getMinX();
+        if (x0 < src.getMinX()) x0 = src.getMinX();
+
+        int y0 = dst.getMinY();
+        if (y0 < src.getMinY()) y0 = src.getMinY();
+
+        int x1 = dst.getMinX()+dst.getWidth()-1;
+        if (x1 > src.getMinX()+src.getWidth()-1)
+            x1 = src.getMinX()+src.getWidth()-1;
+
+        int y1 = dst.getMinY()+dst.getHeight()-1;
+        if (y1 > src.getMinY()+src.getHeight()-1)
+            y1 = src.getMinY()+src.getHeight()-1;
+
+        int width  = x1-x0+1;
+        int height = y1-y0+1;
+
+        SinglePixelPackedSampleModel srcSPPSM;
+        srcSPPSM = (SinglePixelPackedSampleModel)src.getSampleModel();
+
+        final int     srcScanStride = srcSPPSM.getScanlineStride();
+        DataBufferInt srcDB         = (DataBufferInt)src.getDataBuffer();
+        final int []  srcPixels     = srcDB.getBankData()[0];
+        final int     srcBase =
+            (srcDB.getOffset() +
+             srcSPPSM.getOffset(x0-src.getSampleModelTranslateX(),
+                                y0-src.getSampleModelTranslateY()));
+
+
+        SinglePixelPackedSampleModel dstSPPSM;
+        dstSPPSM = (SinglePixelPackedSampleModel)dst.getSampleModel();
+
+        final int     dstScanStride = dstSPPSM.getScanlineStride();
+        DataBufferInt dstDB         = (DataBufferInt)dst.getDataBuffer();
+        final int []  dstPixels     = dstDB.getBankData()[0];
+        final int     dstBase =
+            (dstDB.getOffset() +
+             dstSPPSM.getOffset(x0-dst.getSampleModelTranslateX(),
+                                y0-dst.getSampleModelTranslateY()));
+
+        if ((srcScanStride == dstScanStride) &&
+            (srcScanStride == width)) {
+            // System.out.println("VERY Fast copyData");
+
+            System.arraycopy(srcPixels, srcBase, dstPixels, dstBase,
+                             width*height);
+        } else if (width > 128) {
+            int srcSP = srcBase;
+            int dstSP = dstBase;
+            for (int y=0; y<height; y++) {
+                System.arraycopy(srcPixels, srcSP, dstPixels, dstSP, width);
+                srcSP += srcScanStride;
+                dstSP += dstScanStride;
+            }
+        } else {
+            for (int y=0; y<height; y++) {
+                int srcSP = srcBase+y*srcScanStride;
+                int dstSP = dstBase+y*dstScanStride;
+                for (int x=0; x<width; x++)
+                    dstPixels[dstSP++] = srcPixels[srcSP++];
+            }
+        }
+    }
+
+    public static void copyData_FALLBACK(Raster src, WritableRaster dst) {
+        // System.out.println("Fallback copyData");
+
+        int x0 = dst.getMinX();
+        if (x0 < src.getMinX()) x0 = src.getMinX();
+
+        int y0 = dst.getMinY();
+        if (y0 < src.getMinY()) y0 = src.getMinY();
+
+        int x1 = dst.getMinX()+dst.getWidth()-1;
+        if (x1 > src.getMinX()+src.getWidth()-1)
+            x1 = src.getMinX()+src.getWidth()-1;
+
+        int y1 = dst.getMinY()+dst.getHeight()-1;
+        if (y1 > src.getMinY()+src.getHeight()-1)
+            y1 = src.getMinY()+src.getHeight()-1;
+
+        int width  = x1-x0+1;
+        int [] data = null;
+
+        for (int y = y0; y <= y1 ; y++)  {
+            data = src.getPixels(x0,y,width,1,data);
+            dst.setPixels       (x0,y,width,1,data);
+        }
+    }
+
+    /**
+     * Copies data from one raster to another. Only the region of
+     * overlap between src and dst is copied.  <tt>Src</tt> and
+     * <tt>Dst</tt> must have compatible SampleModels.
+     *
+     * @param src The source of the data
+     * @param dst The destination for the data.
+     */
+    public static void copyData(Raster src, WritableRaster dst) {
+        if (is_INT_PACK_Data(src.getSampleModel(), false) &&
+            is_INT_PACK_Data(dst.getSampleModel(), false)) {
+            copyData_INT_PACK(src, dst);
+            return;
+        }
+
+        copyData_FALLBACK(src, dst);
+    }
+
+    /**
+     * Copies data from one bufferedImage to another paying attention
+     * to the state of AlphaPreMultiplied.
+     *
+     * @param src The source
+     * @param dst The destination
+     */
+    public static void
+        copyData(BufferedImage src, BufferedImage dst) {
+        Rectangle srcRect = new Rectangle(0, 0,
+                                          src.getWidth(), src.getHeight());
+        copyData(src, srcRect, dst, new Point(0,0));
+    }
+
+
+    /**
+     * Copies data from one bufferedImage to another paying attention
+     * to the state of AlphaPreMultiplied.
+     *
+     * @param src The source
+     * @param srcRect The Rectangle of source data to be copied
+     * @param dst The destination
+     * @param destP The Place for the upper left corner of srcRect in dst.
+     */
+    public static void
+        copyData(BufferedImage src, Rectangle srcRect,
+                 BufferedImage dst, Point destP) {
+
+       /*
+        if (srcCS != dstCS)
+            throw new IllegalArgumentException
+                ("Images must be in the same ColorSpace in order "+
+                 "to copy Data between them");
+        */
+        boolean srcAlpha = src.getColorModel().hasAlpha();
+        boolean dstAlpha = dst.getColorModel().hasAlpha();
+
+        // System.out.println("Src has: " + srcAlpha +
+        //                    " is: " + src.isAlphaPremultiplied());
+        //
+        // System.out.println("Dst has: " + dstAlpha +
+        //                    " is: " + dst.isAlphaPremultiplied());
+
+        if (srcAlpha == dstAlpha)
+            if ((srcAlpha == false) ||
+                (src.isAlphaPremultiplied() == dst.isAlphaPremultiplied())) {
+                // They match one another so just copy everything...
+                copyData(src.getRaster(), dst.getRaster());
+                return;
+            }
+
+        // System.out.println("Using Slow CopyData");
+
+        int [] pixel = null;
+        Raster         srcR  = src.getRaster();
+        WritableRaster dstR  = dst.getRaster();
+        int            bands = dstR.getNumBands();
+
+        int dx = destP.x-srcRect.x;
+        int dy = destP.y-srcRect.y;
+
+        int w  = srcRect.width;
+        int x0 = srcRect.x;
+        int y0 = srcRect.y;
+        int y1 = y0+srcRect.height-1;
+
+        if (!srcAlpha) {
+            // Src has no alpha dest does so set alpha to 1.0 everywhere.
+            // System.out.println("Add Alpha");
+            int [] oPix = new int[bands*w];
+            int out = (w*bands)-1; // The 2 skips alpha channel
+            while(out >= 0) {
+                // Fill alpha channel with 255's
+                oPix[out] = 255;
+                out -= bands;
+            }
+
+            int b, in;
+            for (int y=y0; y<=y1; y++) {
+                pixel = srcR.getPixels(x0,y,w,1,pixel);
+                in  = w*(bands-1)-1;
+                out = (w*bands)-2; // The 2 skips alpha channel on last pix
+                switch (bands) {
+                case 4:
+                    while(in >= 0) {
+                        oPix[out--] = pixel[in--];
+                        oPix[out--] = pixel[in--];
+                        oPix[out--] = pixel[in--];
+                        out--;
+                    }
+                    break;
+                default:
+                    while(in >= 0) {
+                        for (b=0; b<bands-1; b++)
+                            oPix[out--] = pixel[in--];
+                        out--;
+                    }
+                }
+                dstR.setPixels(x0+dx, y+dy, w, 1, oPix);
+            }
+        } else if (dstAlpha && dst.isAlphaPremultiplied()) {
+            // Src and dest have Alpha but we need to multiply it for dst.
+            // System.out.println("Mult Case");
+            int a, b, alpha, in, fpNorm = (1<<24)/255, pt5 = 1<<23;
+            for (int y=y0; y<=y1; y++) {
+                pixel = srcR.getPixels(x0,y,w,1,pixel);
+                in=bands*w-1;
+                switch (bands) {
+                case 4:
+                    while(in >= 0) {
+                        a = pixel[in];
+                        if (a == 255)
+                            in -= 4;
+                        else {
+                            in--;
+                            alpha = fpNorm*a;
+                            pixel[in] = (pixel[in]*alpha+pt5)>>>24; in--;
+                            pixel[in] = (pixel[in]*alpha+pt5)>>>24; in--;
+                            pixel[in] = (pixel[in]*alpha+pt5)>>>24; in--;
+                        }
+                    }
+                    break;
+                default:
+                    while(in >= 0) {
+                        a = pixel[in];
+                        if (a == 255)
+                            in -= bands;
+                        else {
+                            in--;
+                            alpha = fpNorm*a;
+                            for (b=0; b<bands-1; b++) {
+                                pixel[in] = (pixel[in]*alpha+pt5)>>>24;
+                                in--;
+                            }
+                        }
+                    }
+                }
+                dstR.setPixels(x0+dx, y+dy, w, 1, pixel);
+            }
+        } else if (dstAlpha && !dst.isAlphaPremultiplied()) {
+            // Src and dest have Alpha but we need to divide it out for dst.
+            // System.out.println("Div Case");
+            int a, b, ialpha, in, fpNorm = 0x00FF0000, pt5 = 1<<15;
+            for (int y=y0; y<=y1; y++) {
+                pixel = srcR.getPixels(x0,y,w,1,pixel);
+                in=(bands*w)-1;
+                switch(bands) {
+                case 4:
+                    while(in >= 0) {
+                        a = pixel[in];
+                        if ((a <= 0) || (a >= 255))
+                            in -= 4;
+                        else {
+                            in--;
+                            ialpha = fpNorm/a;
+                            pixel[in] = (pixel[in]*ialpha+pt5)>>>16; in--;
+                            pixel[in] = (pixel[in]*ialpha+pt5)>>>16; in--;
+                            pixel[in] = (pixel[in]*ialpha+pt5)>>>16; in--;
+                        }
+                    }
+                    break;
+                default:
+                    while(in >= 0) {
+                        a = pixel[in];
+                        if ((a <= 0) || (a >= 255))
+                            in -= bands;
+                        else {
+                            in--;
+                            ialpha = fpNorm/a;
+                            for (b=0; b<bands-1; b++) {
+                                pixel[in] = (pixel[in]*ialpha+pt5)>>>16;
+                                in--;
+                            }
+                        }
+                    }
+                }
+                dstR.setPixels(x0+dx, y+dy, w, 1, pixel);
+            }
+        } else if (src.isAlphaPremultiplied()) {
+            int [] oPix = new int[bands*w];
+            // Src has alpha dest does not so unpremult and store...
+            // System.out.println("Remove Alpha, Div Case");
+            int a, b, ialpha, in, out, fpNorm = 0x00FF0000, pt5 = 1<<15;
+            for (int y=y0; y<=y1; y++) {
+                pixel = srcR.getPixels(x0,y,w,1,pixel);
+                in  = (bands+1)*w -1;
+                out = (bands*w)-1;
+                while(in >= 0) {
+                    a = pixel[in]; in--;
+                    if (a > 0) {
+                        if (a < 255) {
+                            ialpha = fpNorm/a;
+                            for (b=0; b<bands; b++)
+                                oPix[out--] = (pixel[in--]*ialpha+pt5)>>>16;
+                        } else
+                            for (b=0; b<bands; b++)
+                                oPix[out--] = pixel[in--];
+                    } else {
+                        in -= bands;
+                        for (b=0; b<bands; b++)
+                            oPix[out--] = 255;
+                    }
+                }
+                dstR.setPixels(x0+dx, y+dy, w, 1, oPix);
+            }
+        } else {
+            // Src has unpremult alpha, dest does not have alpha,
+            // just copy the color channels over.
+            Rectangle dstRect = new Rectangle(destP.x, destP.y,
+                                              srcRect.width, srcRect.height);
+            for (int b=0; b<bands; b++)
+                copyBand(srcR, srcRect, b,
+                         dstR, dstRect, b);
+        }
+    }
+
+    public static void copyBand(Raster         src, int srcBand,
+                                WritableRaster dst, int dstBand) {
+
+        Rectangle sR   = src.getBounds();
+        Rectangle dR   = dst.getBounds();
+        Rectangle cpR  = sR.intersection(dR);
+
+        copyBand(src, cpR, srcBand, dst, cpR, dstBand);
+    }
+
+    public static void copyBand(Raster         src, Rectangle sR, int sBand,
+                                WritableRaster dst, Rectangle dR, int dBand) {
+        int dy = dR.y -sR.y;
+        int dx = dR.x -sR.x;
+        sR = sR.intersection(src.getBounds());
+        dR = dR.intersection(dst.getBounds());
+        int width, height;
+        if (dR.width  < sR.width)  width  = dR.width;
+        else                       width  = sR.width;
+        if (dR.height < sR.height) height = dR.height;
+        else                       height = sR.height;
+
+        int x = sR.x+dx;
+        int [] samples = null;
+        for (int y=sR.y; y< sR.y+height; y++) {
+            samples = src.getSamples(sR.x, y, width, 1, sBand, samples);
+            dst.setSamples(x, y+dy, width, 1, dBand, samples);
+        }
+    }
+
+    public static boolean is_INT_PACK_Data(SampleModel sm,
+            boolean requireAlpha) {
+// Check ColorModel is of type DirectColorModel
+if(!(sm instanceof SinglePixelPackedSampleModel)) return false;
+
+// Check transfer type
+if(sm.getDataType() != DataBuffer.TYPE_INT)       return false;
+
+SinglePixelPackedSampleModel sppsm;
+sppsm = (SinglePixelPackedSampleModel)sm;
+
+int [] masks = sppsm.getBitMasks();
+if (masks.length == 3) {
+if (requireAlpha) return false;
+} else if (masks.length != 4)
+return false;
+
+if(masks[0] != 0x00ff0000) return false;
+if(masks[1] != 0x0000ff00) return false;
+if(masks[2] != 0x000000ff) return false;
+if ((masks.length == 4) &&
+(masks[3] != 0xff000000)) return false;
+
+return true;
+}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/Quantize.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/Quantize.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/Quantize.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,840 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Helma License Notice
+ *
+ * The contents of this file are subject to the Helma License
+ * Version 2.0 (the "License"). You may not use this file except in
+ * compliance with the License. A copy of the License is available at
+ * http://adele.helma.org/download/helma/license.txt
+ *
+ * Copyright 1998-2003 Helma Software. All Rights Reserved.
+ *
+ * $RCSfile: Quantize.java,v $
+ * $Author: alexsmirnov $
+ * $Revision: 1.1.2.1 $
+ * $Date: 2007/01/09 18:59:05 $
+ */
+
+package org.ajax4jsf.framework.util.image;
+
+import java.awt.image.BufferedImage;
+import java.awt.image.DataBufferByte;
+import java.awt.image.DataBufferInt;
+import java.awt.image.IndexColorModel;
+
+/*
+ * @(#)Quantize.java    0.90 9/19/00 Adam Doppelt
+ * 
+ * Modifications by Joerg Lehni:
+ * 
+ * - Support for alpha-channels.
+ * - Returns a BufferedImage of TYPE_BYTE_INDEXED with a IndexColorModel.
+ * - Dithering of images through helma.image.DiffusionFilterOp by setting
+ *   the dither parameter to true.
+ * - Support for a transparent color, which is correctly rendered by GIFEncoder.
+ *   All pixels with alpha < 0x80 are converted to this color when the parameter
+ *   alphaToBitmask is set to true.
+ * - Removed the SQUARES lookup tables as multiplications of integer values
+ *   shouldn't take more than one clock nowadays anyhow.
+ */
+
+/**
+ * An efficient color quantization algorithm, adapted from the C++
+ * implementation quantize.c in <a
+ * href="http://www.imagemagick.org/">ImageMagick</a>. The pixels for
+ * an image are placed into an oct tree. The oct tree is reduced in
+ * size, and the pixels from the original image are reassigned to the
+ * nodes in the reduced tree.<p>
+ *
+ * Here is the copyright notice from ImageMagick:
+ * 
+ * <pre>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%  Permission is hereby granted, free of charge, to any person obtaining a    %
+%  copy of this software and associated documentation files ("ImageMagick"),  %
+%  to deal in ImageMagick without restriction, including without limitation   %
+%  the rights to use, copy, modify, merge, publish, distribute, sublicense,   %
+%  and/or sell copies of ImageMagick, and to permit persons to whom the       %
+%  ImageMagick is furnished to do so, subject to the following conditions:    %
+%                                                                             %
+%  The above copyright notice and this permission notice shall be included in %
+%  all copies or substantial portions of ImageMagick.                         %
+%                                                                             %
+%  The software is provided "as is", without warranty of any kind, express or %
+%  implied, including but not limited to the warranties of merchantability,   %
+%  fitness for a particular purpose and noninfringement.  In no event shall   %
+%  E. I. du Pont de Nemours and Company be liable for any claim, damages or   %
+%  other liability, whether in an action of contract, tort or otherwise,      %
+%  arising from, out of or in connection with ImageMagick or the use or other %
+%  dealings in ImageMagick.                                                   %
+%                                                                             %
+%  Except as contained in this notice, the name of the E. I. du Pont de       %
+%  Nemours and Company shall not be used in advertising or otherwise to       %
+%  promote the sale, use or other dealings in ImageMagick without prior       %
+%  written authorization from the E. I. du Pont de Nemours and Company.       %
+%                                                                             %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+</pre>
+ *
+ *
+ * @version 0.90 19 Sep 2000
+ * @author <a href="http://www.gurge.com/amd/">Adam Doppelt</a>
+ */
+public class Quantize {
+
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%                                                                             %
+%                                                                             %
+%                                                                             %
+%           QQQ   U   U   AAA   N   N  TTTTT  IIIII   ZZZZZ  EEEEE            %
+%          Q   Q  U   U  A   A  NN  N    T      I        ZZ  E                %
+%          Q   Q  U   U  AAAAA  N N N    T      I      ZZZ   EEEEE            %
+%          Q  QQ  U   U  A   A  N  NN    T      I     ZZ     E                %
+%           QQQQ   UUU   A   A  N   N    T    IIIII   ZZZZZ  EEEEE            %
+%                                                                             %
+%                                                                             %
+%              Reduce the Number of Unique Colors in an Image                 %
+%                                                                             %
+%                                                                             %
+%                           Software Design                                   %
+%                             John Cristy                                     %
+%                              July 1992                                      %
+%                                                                             %
+%                                                                             %
+%  Copyright 1998 E. I. du Pont de Nemours and Company                        %
+%                                                                             %
+%  Permission is hereby granted, free of charge, to any person obtaining a    %
+%  copy of this software and associated documentation files ("ImageMagick"),  %
+%  to deal in ImageMagick without restriction, including without limitation   %
+%  the rights to use, copy, modify, merge, publish, distribute, sublicense,   %
+%  and/or sell copies of ImageMagick, and to permit persons to whom the       %
+%  ImageMagick is furnished to do so, subject to the following conditions:    %
+%                                                                             %
+%  The above copyright notice and this permission notice shall be included in %
+%  all copies or substantial portions of ImageMagick.                         %
+%                                                                             %
+%  The software is provided "as is", without warranty of any kind, express or %
+%  implied, including but not limited to the warranties of merchantability,   %
+%  fitness for a particular purpose and noninfringement.  In no event shall   %
+%  E. I. du Pont de Nemours and Company be liable for any claim, damages or   %
+%  other liability, whether in an action of contract, tort or otherwise,      %
+%  arising from, out of or in connection with ImageMagick or the use or other %
+%  dealings in ImageMagick.                                                   %
+%                                                                             %
+%  Except as contained in this notice, the name of the E. I. du Pont de       %
+%  Nemours and Company shall not be used in advertising or otherwise to       %
+%  promote the sale, use or other dealings in ImageMagick without prior       %
+%  written authorization from the E. I. du Pont de Nemours and Company.       %
+%                                                                             %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+%  Realism in computer graphics typically requires using 24 bits/pixel to
+%  generate an image. Yet many graphic display devices do not contain
+%  the amount of memory necessary to match the spatial and color
+%  resolution of the human eye. The QUANTIZE program takes a 24 bit
+%  image and reduces the number of colors so it can be displayed on
+%  raster device with less bits per pixel. In most instances, the
+%  quantized image closely resembles the original reference image.
+%
+%  A reduction of colors in an image is also desirable for image
+%  transmission and real-time animation.
+%
+%  Function Quantize takes a standard RGB or monochrome images and quantizes
+%  them down to some fixed number of colors.
+%
+%  For purposes of color allocation, an image is a set of n pixels, where
+%  each pixel is a point in RGB space. RGB space is a 3-dimensional
+%  vector space, and each pixel, pi, is defined by an ordered triple of
+%  red, green, and blue coordinates, (ri, gi, bi).
+%
+%  Each primary color component (red, green, or blue) represents an
+%  intensity which varies linearly from 0 to a maximum value, cmax, which
+%  corresponds to full saturation of that color. Color allocation is
+%  defined over a domain consisting of the cube in RGB space with
+%  opposite vertices at (0,0,0) and (cmax,cmax,cmax). QUANTIZE requires
+%  cmax = 255.
+%
+%  The algorithm maps this domain onto a tree in which each node
+%  represents a cube within that domain. In the following discussion
+%  these cubes are defined by the coordinate of two opposite vertices:
+%  The vertex nearest the origin in RGB space and the vertex farthest
+%  from the origin.
+%
+%  The tree's root node represents the the entire domain, (0,0,0) through
+%  (cmax,cmax,cmax). Each lower level in the tree is generated by
+%  subdividing one node's cube into eight smaller cubes of equal size.
+%  This corresponds to bisecting the parent cube with planes passing
+%  through the midpoints of each edge.
+%
+%  The basic algorithm operates in three phases: Classification,
+%  Reduction, and Assignment. Classification builds a color
+%  description tree for the image. Reduction collapses the tree until
+%  the number it represents, at most, the number of colors desired in the
+%  output image. Assignment defines the output image's color map and
+%  sets each pixel's color by reclassification in the reduced tree.
+%  Our goal is to minimize the numerical discrepancies between the original
+%  colors and quantized colors (quantization error).
+%
+%  Classification begins by initializing a color description tree of
+%  sufficient depth to represent each possible input color in a leaf.
+%  However, it is impractical to generate a fully-formed color
+%  description tree in the classification phase for realistic values of
+%  cmax. If colors components in the input image are quantized to k-bit
+%  precision, so that cmax= 2k-1, the tree would need k levels below the
+%  root node to allow representing each possible input color in a leaf.
+%  This becomes prohibitive because the tree's total number of nodes is
+%  1 + sum(i=1,k,8k).
+%
+%  A complete tree would require 19,173,961 nodes for k = 8, cmax = 255.
+%  Therefore, to avoid building a fully populated tree, QUANTIZE: (1)
+%  Initializes data structures for nodes only as they are needed;  (2)
+%  Chooses a maximum depth for the tree as a function of the desired
+%  number of colors in the output image (currently log2(colorMap size)).
+%
+%  For each pixel in the input image, classification scans downward from
+%  the root of the color description tree. At each level of the tree it
+%  identifies the single node which represents a cube in RGB space
+%  containing the pixel's color. It updates the following data for each
+%  such node:
+%
+%    n1: Number of pixels whose color is contained in the RGB cube
+%    which this node represents;
+%
+%    n2: Number of pixels whose color is not represented in a node at
+%    lower depth in the tree;  initially,  n2 = 0 for all nodes except
+%    leaves of the tree.
+%
+%    Sr, Sg, Sb: Sums of the red, green, and blue component values for
+%    all pixels not classified at a lower depth. The combination of
+%    these sums and n2  will ultimately characterize the mean color of a
+%    set of pixels represented by this node.
+%
+%    E: The distance squared in RGB space between each pixel contained
+%    within a node and the nodes' center. This represents the quantization
+%    error for a node.
+%
+%  Reduction repeatedly prunes the tree until the number of nodes with
+%  n2 > 0 is less than or equal to the maximum number of colors allowed
+%  in the output image. On any given iteration over the tree, it selects
+%  those nodes whose E count is minimal for pruning and merges their
+%  color statistics upward. It uses a pruning threshold, Ep, to govern
+%  node selection as follows:
+%
+%    Ep = 0
+%    while number of nodes with (n2 > 0) > required maximum number of colors
+%      prune all nodes such that E <= Ep
+%      Set Ep to minimum E in remaining nodes
+%
+%  This has the effect of minimizing any quantization error when merging
+%  two nodes together.
+%
+%  When a node to be pruned has offspring, the pruning procedure invokes
+%  itself recursively in order to prune the tree from the leaves upward.
+%  n2,  Sr, Sg,  and  Sb in a node being pruned are always added to the
+%  corresponding data in that node's parent. This retains the pruned
+%  node's color characteristics for later averaging.
+%
+%  For each node, n2 pixels exist for which that node represents the
+%  smallest volume in RGB space containing those pixel's colors. When n2
+%  > 0 the node will uniquely define a color in the output image. At the
+%  beginning of reduction,  n2 = 0  for all nodes except a the leaves of
+%  the tree which represent colors present in the input image.
+%
+%  The other pixel count, n1, indicates the total number of colors
+%  within the cubic volume which the node represents. This includes n1 -
+%  n2  pixels whose colors should be defined by nodes at a lower level in
+%  the tree.
+%
+%  Assignment generates the output image from the pruned tree. The
+%  outpu				t image consists of two parts: (1)  A color map, which is an
+%  array of color descriptions (RGB triples) for each color present in
+%  the output image;  (2)  A pixel array, which represents each pixel as
+%  an index into the color map array.
+%
+%  First, the assignment phase makes one pass over the pruned color
+%  description tree to establish the image's color map. For each node
+%  with n2  > 0, it divides Sr, Sg, and Sb by n2 . This produces the
+%  mean color of all pixels that classify no lower than this node. Each
+%  of these colors becomes an entry in the color map.
+%
+%  Finally,  the assignment phase reclassifies each pixel in the pruned
+%  tree to identify the deepest node containing the pixel's color. The
+%  pixel's value in the pixel array becomes the index of this node's mean
+%  color in the color map.
+%
+%  With the permission of USC Information Sciences Institute, 4676 Admiralty
+%  Way, Marina del Rey, California  90292, this code was adapted from module
+%  ALCOLS written by Paul Raveling.
+%
+%  The names of ISI and USC are not used in advertising or publicity
+%  pertaining to distribution of the software without prior specific
+%  written permission from ISI.
+%
+*/
+    
+    final static boolean QUICK = false;
+
+    final static int MAX_RGB = 255;
+    final static int MAX_NODES = 266817;
+    final static int MAX_TREE_DEPTH = 8;
+    final static int MAX_CHILDREN = 16;
+
+    /**
+     * Reduce the image to the given number of colors. The pixels are reduced in
+     * place.
+     * 
+     * @return The new color palette.
+     */
+    public static BufferedImage process(BufferedImage source, int maxColors,
+        boolean dither, boolean alphaToBitmask) {
+        int type = source.getType();
+        int[] pixels;
+        // try to get the direct pixels of the BufferedImage
+        // this works for images of type INT_RGB, INT_ARGB and INT_ARGB_PRE
+        // for all others, a new array with rgb pixels is created!
+        if (type == BufferedImage.TYPE_INT_RGB
+            || type == BufferedImage.TYPE_INT_ARGB
+            || type == BufferedImage.TYPE_INT_ARGB_PRE) {
+            pixels = ((DataBufferInt) source.getRaster().getDataBuffer()).getData();
+        } else {
+            pixels = source.getRGB(0, 0, source.getWidth(), source.getHeight(), null, 0, source.getWidth());
+        }
+        Cube cube = new Cube(source, pixels, maxColors, dither, alphaToBitmask);
+        cube.classification();
+        cube.reduction();
+        return cube.assignment();
+    }
+
+    static class Cube {
+        BufferedImage source;
+        int[] pixels;
+        int maxColors;
+        byte colorMap[][];
+
+        Node root;
+        int depth;
+
+        boolean dither;
+        boolean alphaToBitmask;
+        boolean addTransparency;
+        // firstColor is set to 1 when when addTransparency is true!
+        int firstColor = 0;
+
+        // counter for the number of colors in the cube. this gets
+        // recalculated often.
+        int numColors;
+
+        // counter for the number of nodes in the tree
+        int numNodes;
+
+        Cube(BufferedImage source, int[] pixels, int maxColors, boolean dither,
+            boolean alphaToBitmask) {
+            this.source = source;
+            this.pixels = pixels;
+            this.maxColors = maxColors;
+            this.dither = dither;
+            this.alphaToBitmask = alphaToBitmask;
+
+            int i = maxColors;
+            // tree_depth = log maxColors
+            //                 4
+            for (depth = 1; i != 0; depth++) {
+                i /= 4;
+            }
+            if (depth > 1) {
+                --depth;
+            }
+            if (depth > MAX_TREE_DEPTH) {
+                depth = MAX_TREE_DEPTH;
+            } else if (depth < 2) {
+                depth = 2;
+            }
+
+            root = new Node(this);
+        }
+
+        /*
+         * Procedure Classification begins by initializing a color description
+         * tree of sufficient depth to represent each possible input color in a
+         * leaf. However, it is impractical to generate a fully-formed color
+         * description tree in the classification phase for realistic values of
+         * cmax. If colors components in the input image are quantized to k-bit
+         * precision, so that cmax= 2k-1, the tree would need k levels below the
+         * root node to allow representing each possible input color in a leaf.
+         * This becomes prohibitive because the tree's total number of nodes is
+         * 1 + sum(i=1,k,8k).
+         * 
+         * A complete tree would require 19,173,961 nodes for k = 8, cmax = 255.
+         * Therefore, to avoid building a fully populated tree, QUANTIZE: (1)
+         * Initializes data structures for nodes only as they are needed; (2)
+         * Chooses a maximum depth for the tree as a function of the desired
+         * number of colors in the output image (currently log2(colorMap size)).
+         * 
+         * For each pixel in the input image, classification scans downward from
+         * the root of the color description tree. At each level of the tree it
+         * identifies the single node which represents a cube in RGB space
+         * containing It updates the following data for each such node:
+         * 
+         * numPixels : Number of pixels whose color is contained in the RGB cube
+         * which this node represents;
+         * 
+         * unique : Number of pixels whose color is not represented in a node at
+         * lower depth in the tree; initially, n2 = 0 for all nodes except
+         * leaves of the tree.
+         * 
+         * totalRed/green/blue : Sums of the red, green, and blue component
+         * values for all pixels not classified at a lower depth. The
+         * combination of these sums and n2 will ultimately characterize the
+         * mean color of a set of pixels represented by this node.
+         */
+        void classification() {
+            addTransparency = false;
+            firstColor = 0;
+            for (int i = 0; i < pixels.length; i++) {
+                int pixel = pixels[i];
+                int red = (pixel >> 16) & 0xff;
+                int green = (pixel >> 8) & 0xff;
+                int blue = (pixel >> 0) & 0xff;
+                int alpha = (pixel >> 24) & 0xff;
+                if (alphaToBitmask)
+                    alpha = alpha < 0x80 ? 0 : 0xff;
+
+                if (alpha > 0) {
+                    // a hard limit on the number of nodes in the tree
+                    if (numNodes > MAX_NODES) {
+                        //	System.out.println("pruning");
+                        root.pruneLevel();
+                        --depth;
+                    }
+
+                    // walk the tree to depth, increasing the
+                    // numPixels count for each node
+                    Node node = root;
+                    for (int level = 1; level <= depth; ++level) {
+                        int id = (((red > node.midRed ? 1 : 0) << 0)
+                            | ((green > node.midGreen ? 1 : 0) << 1)
+                            | ((blue > node.midBlue ? 1 : 0) << 2) | ((alpha > node.midAlpha ? 1
+                            : 0) << 3));
+                        if (node.children[id] == null) {
+                            node = new Node(node, id, level);
+                        } else {
+                           node = node.children[id];
+                        }
+                        node.numPixels++;
+                    }
+
+                    ++node.unique;
+                    node.totalRed += red;
+                    node.totalGreen += green;
+                    node.totalBlue += blue;
+                    node.totalAlpha += alpha;
+                } else if (!addTransparency) {
+                    addTransparency = true;
+                    numColors++;
+                    firstColor = 1; // start at 1 as 0 will be the transparent
+                                    // color
+                }
+            }
+        }
+
+        /*
+         * reduction repeatedly prunes the tree until the number of nodes with
+         * unique > 0 is less than or equal to the maximum number of colors
+         * allowed in the output image.
+         * 
+         * When a node to be pruned has offspring, the pruning procedure invokes
+         * itself recursively in order to prune the tree from the leaves upward.
+         * The statistics of the node being pruned are always added to the
+         * corresponding data in that node's parent. This retains the pruned
+         * node's color characteristics for later averaging.
+         */
+        void reduction() {
+            int threshold = 1;
+            while (numColors > maxColors) {
+                numColors = firstColor;
+                threshold = root.reduce(threshold, Integer.MAX_VALUE);
+            }
+        }
+
+        /**
+         * The result of a closest color search.
+         */
+        static class Search {
+            int distance;
+            int colorIndex;
+        }
+
+        /*
+         * Procedure assignment generates the output image from the pruned tree.
+         * The output image consists of two parts: (1) A color map, which is an
+         * array of color descriptions (RGB triples) for each color present in
+         * the output image; (2) A pixel array, which represents each pixel as
+         * an index into the color map array.
+         * 
+         * First, the assignment phase makes one pass over the pruned color
+         * description tree to establish the image's color map. For each node
+         * with n2 > 0, it divides Sr, Sg, and Sb by n2. This produces the mean
+         * color of all pixels that classify no lower than this node. Each of
+         * these colors becomes an entry in the color map.
+         * 
+         * Finally, the assignment phase reclassifies each pixel in the pruned
+         * tree to identify the deepest node containing the pixel's color. The
+         * pixel's value in the pixel array becomes the index of this node's
+         * mean color in the color map.
+         */
+        BufferedImage assignment() {
+            colorMap = new byte[4][numColors];
+
+            if (addTransparency) {
+                // if a transparency color is added, firstColor was set to 1,
+                // so color 0 can be used for this
+                colorMap[0][0] = 0;
+                colorMap[1][0] = 0;
+                colorMap[2][0] = 0;
+                colorMap[3][0] = 0;
+            }
+            numColors = firstColor;
+            root.mapColors();
+
+            // determine bit depth for palette
+            int depth;
+            for (depth = 1; depth <= 8; depth++)
+                if ((1 << depth) >= numColors)
+                    break;
+
+            // create the right color model, depending on transparency settings:
+            IndexColorModel icm;
+            if (alphaToBitmask) {
+                if (addTransparency)
+                    icm = new IndexColorModel(depth, numColors, colorMap[0],
+                        colorMap[1], colorMap[2], 0);
+                else
+                    icm = new IndexColorModel(depth, numColors, colorMap[0],
+                        colorMap[1], colorMap[2]);
+            } else {
+                icm = new IndexColorModel(depth, numColors, colorMap[0],
+                    colorMap[1], colorMap[2], colorMap[3]);
+            }
+            // create the indexed BufferedImage:
+            BufferedImage dest = new BufferedImage(source.getWidth(),
+                source.getHeight(), BufferedImage.TYPE_BYTE_INDEXED, icm);
+
+            boolean firstOut = true;
+            if (dither)
+                new DiffusionFilterOp().filter(source, dest);
+            else {
+                Search search = new Search();
+                // convert to indexed color
+                byte[] dst = ((DataBufferByte) dest.getRaster().getDataBuffer()).getData();
+
+                for (int i = 0; i < pixels.length; i++) {
+                    int pixel = pixels[i];
+                    int red = (pixel >> 16) & 0xff;
+                    int green = (pixel >> 8) & 0xff;
+                    int blue = (pixel >> 0) & 0xff;
+                    int alpha = (pixel >> 24) & 0xff;
+
+                    if (alphaToBitmask)
+                        alpha = alpha < 128 ? 0 : 0xff;
+                    
+                    // this is super weird: on some systems, transparent pixels are
+                    // not calculated correctly if the following block is taken out.
+                    // the bug is very strange, isn't related to the code (compiler error?)
+                    // but doesn't allways happen. as soon as it does, though, it doesn't
+                    // seem to want to go away.
+                    // This happened at various times on my two different debian systems
+                    // and i never found out how to really fix it. the following line seems to
+                    // prevent it from happening, but i wonder wether there's a better way
+                    // to fix it. 
+                    // it looks as if the command forces alpha to take on correct values.
+                    // Until now I only knew of effects like that in quantum mechanics...
+                    if (i == 0) {
+                        String fix = "" + alpha;
+                    }
+
+                    if (alpha == 0 && addTransparency) {
+                        dst[i] = 0; // transparency color is at 0
+                    } else {
+                        // walk the tree to find the cube containing that color
+                        Node node = root;
+                        for (;;) {
+                            int id = (((red > node.midRed ? 1 : 0) << 0)
+                                | ((green > node.midGreen ? 1 : 0) << 1)
+                                | ((blue > node.midBlue ? 1 : 0) << 2) | ((alpha > node.midAlpha ? 1
+                                : 0) << 3));
+                            if (node.children[id] == null) {
+                                break;
+                            }
+                            node = node.children[id];
+                        }
+
+                        if (QUICK) {
+                            // if QUICK is set, just use that
+                            // node. Strictly speaking, this isn't
+                            // necessarily best match.
+                            dst[i] = (byte) node.colorIndex;
+                        } else {
+                            // Find the closest color.
+                            search.distance = Integer.MAX_VALUE;
+                            node.parent.closestColor(red, green, blue, alpha,
+                                search);
+                            dst[i] = (byte) search.colorIndex;
+                        }
+                    }
+                }
+            }
+            return dest;
+        }
+
+        /**
+         * A single Node in the tree.
+         */
+        static class Node {
+            Cube cube;
+
+            // parent node
+            Node parent;
+
+            // children nodes
+            Node children[];
+            int numChildren;
+
+            // our index within our parent
+            int id;
+            // our level within the tree
+            int level;
+            // our color midpoint
+            int midRed;
+            int midGreen;
+            int midBlue;
+            int midAlpha;
+
+            // the pixel count for this node and all children
+            int numPixels;
+
+            // the pixel count for this node
+            int unique;
+            // the sum of all pixels contained in this node
+            int totalRed;
+            int totalGreen;
+            int totalBlue;
+            int totalAlpha;
+
+            // used to build the colorMap
+            int colorIndex;
+
+            Node(Cube cube) {
+                this.cube = cube;
+                this.parent = this;
+                this.children = new Node[MAX_CHILDREN];
+                this.id = 0;
+                this.level = 0;
+
+                this.numPixels = Integer.MAX_VALUE;
+
+                this.midRed = (MAX_RGB + 1) >> 1;
+                this.midGreen = (MAX_RGB + 1) >> 1;
+                this.midBlue = (MAX_RGB + 1) >> 1;
+                this.midAlpha = (MAX_RGB + 1) >> 1;
+            }
+
+            Node(Node parent, int id, int level) {
+                this.cube = parent.cube;
+                this.parent = parent;
+                this.children = new Node[MAX_CHILDREN];
+                this.id = id;
+                this.level = level;
+
+                // add to the cube
+                ++cube.numNodes;
+                if (level == cube.depth) {
+                    ++cube.numColors;
+                }
+
+                // add to the parent
+                ++parent.numChildren;
+                parent.children[id] = this;
+
+                // figure out our midpoint
+                int bi = (1 << (MAX_TREE_DEPTH - level)) >> 1;
+                midRed = parent.midRed + ((id & 1) > 0 ? bi : -bi);
+                midGreen = parent.midGreen + ((id & 2) > 0 ? bi : -bi);
+                midBlue = parent.midBlue + ((id & 4) > 0 ? bi : -bi);
+                midAlpha = parent.midAlpha + ((id & 8) > 0 ? bi : -bi);
+            }
+
+            /**
+             * Remove this children node, and make sure our parent absorbs our
+             * pixel statistics.
+             */
+            void pruneChild() {
+                --parent.numChildren;
+                parent.unique += unique;
+                parent.totalRed += totalRed;
+                parent.totalGreen += totalGreen;
+                parent.totalBlue += totalBlue;
+                parent.totalAlpha += totalAlpha;
+                parent.children[id] = null;
+                --cube.numNodes;
+                cube = null;
+                parent = null;
+            }
+
+            /**
+             * Prune the lowest layer of the tree.
+             */
+            void pruneLevel() {
+                if (numChildren != 0) {
+                    for (int id = 0; id < MAX_CHILDREN; id++) {
+                        if (children[id] != null) {
+                            children[id].pruneLevel();
+                        }
+                    }
+                }
+                if (level == cube.depth) {
+                    pruneChild();
+                }
+            }
+
+            /**
+             * Remove any nodes that have fewer than threshold pixels. Also, as
+             * long as we're walking the tree: - figure out the color with the
+             * fewest pixels - recalculate the total number of colors in the
+             * tree
+             */
+            int reduce(int threshold, int nextThreshold) {
+                if (numChildren != 0) {
+                    for (int id = 0; id < MAX_CHILDREN; id++) {
+                        if (children[id] != null) {
+                            nextThreshold = children[id].reduce(threshold,
+                                nextThreshold);
+                        }
+                    }
+                }
+                if (numPixels <= threshold) {
+                    pruneChild();
+                } else {
+                    if (unique != 0) {
+                        cube.numColors++;
+                    }
+                    if (numPixels < nextThreshold) {
+                        nextThreshold = numPixels;
+                    }
+                }
+                return nextThreshold;
+            }
+
+            /*
+             * mapColors traverses the color cube tree and notes each colorMap
+             * entry. A colorMap entry is any node in the color cube tree where
+             * the number of unique colors is not zero.
+             */
+            void mapColors() {
+                if (numChildren != 0) {
+                    for (int id = 0; id < MAX_CHILDREN; id++) {
+                        if (children[id] != null) {
+                            children[id].mapColors();
+                        }
+                    }
+                }
+                if (unique != 0) {
+                    int add = unique >> 1;
+                    cube.colorMap[0][cube.numColors] = (byte) ((totalRed + add) / unique);
+                    cube.colorMap[1][cube.numColors] = (byte) ((totalGreen + add) / unique);
+                    cube.colorMap[2][cube.numColors] = (byte) ((totalBlue + add) / unique);
+                    cube.colorMap[3][cube.numColors] = (byte) ((totalAlpha + add) / unique);
+                    colorIndex = cube.numColors++;
+                }
+            }
+
+            /*
+             * ClosestColor traverses the color cube tree at a particular node
+             * and determines which colorMap entry best represents the input
+             * color.
+             */
+            void closestColor(int red, int green, int blue, int alpha,
+                Search search) {
+                if (numChildren != 0) {
+                    for (int id = 0; id < MAX_CHILDREN; id++) {
+                        if (children[id] != null) {
+                            children[id].closestColor(red, green, blue, alpha,
+                                search);
+                        }
+                    }
+                }
+
+                if (unique != 0) {
+                    int distance = distance(
+                        cube.colorMap[0][colorIndex] & 0xff,
+                        cube.colorMap[1][colorIndex] & 0xff,
+                        cube.colorMap[2][colorIndex] & 0xff,
+                        cube.colorMap[3][colorIndex] & 0xff, red, green, blue,
+                        alpha);
+                    if (distance < search.distance) {
+                        search.distance = distance;
+                        search.colorIndex = colorIndex;
+                    }
+                }
+            }
+
+            /**
+             * Figure out the distance between this node and som color.
+             */
+            final static int distance(int r1, int g1, int b1, int a1, int r2,
+                int g2, int b2, int a2) {
+                int da = a1 - a2;
+                int dr = r1 - r2;
+                int dg = g1 - g2;
+                int db = b1 - b2;
+
+                return da * da + dr * dr + dg * dg + db * db;
+//                return (SQUARES[r1 - r2 + MAX_RGB] +
+//                     SQUARES[g1 - g2 + MAX_RGB] +
+//                     SQUARES[b1 - b2 + MAX_RGB] +
+//                     SQUARES[a1 - a2 + MAX_RGB]);
+            }
+
+            public String toString() {
+                StringBuffer buf = new StringBuffer();
+                if (parent == this) {
+                    buf.append("root");
+                } else {
+                    buf.append("node");
+                }
+                buf.append(' ');
+                buf.append(level);
+                buf.append(" [");
+                buf.append(midRed);
+                buf.append(',');
+                buf.append(midGreen);
+                buf.append(',');
+                buf.append(midBlue);
+                buf.append(',');
+                buf.append(midAlpha);
+                buf.append(']');
+                return new String(buf);
+            }
+        }
+    }
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/RoundGradientContext.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/RoundGradientContext.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/RoundGradientContext.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,77 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.util.image;
+
+import java.awt.Color;
+import java.awt.PaintContext;
+import java.awt.geom.Point2D;
+import java.awt.image.ColorModel;
+import java.awt.image.Raster;
+import java.awt.image.WritableRaster;
+/**
+ * 
+ * TODO: provide English Comments
+ * 
+ *
+ */
+public class RoundGradientContext implements PaintContext {
+  protected Point2D mPoint;
+  protected Point2D mRadius;
+  protected Color mC1, mC2;
+  public RoundGradientContext(Point2D p, Color c1, Point2D r, Color c2) {
+    mPoint = p;
+    mC1 = c1;
+    mRadius = r;
+    mC2 = c2;
+  }
+  public void dispose() {}
+  public ColorModel getColorModel() { return ColorModel.getRGBdefault(); }
+ /* The get-Raster() method iterates over each point in the requested rectangle,
+      calculating the distance from the center point.
+      It calculates a weighting factor, from 0.0 to 1.0, based on the ratio of this
+      distance and the radius. */
+  public Raster getRaster(int x, int y, int w, int h) {
+    WritableRaster raster =
+        getColorModel().createCompatibleWritableRaster(w, h);
+    int[] data = new int[w * h * 4]; //k=4, 
+     double radius   = mRadius.distance(0, 0);
+    for (int j = 0; j < h; j++) {
+      for (int i = 0; i < w; i++) {
+        double distance = mPoint.distance(x + i, y + j);
+       
+        double ratio    = distance/radius;
+        if (ratio > 1.0){
+          ratio = 1.0;
+        }//if
+        int base = (j * w + i) * 4;
+        //it simply uses the weighting factor to linearly interpolate between the center color and the background color
+        data[base] = (int)(mC1.getRed()       + ratio * (mC2.getRed() - mC1.getRed()));
+        data[base + 1] = (int)(mC1.getGreen() + ratio * (mC2.getGreen() - mC1.getGreen()));
+        data[base + 2] = (int)(mC1.getBlue()  + ratio * (mC2.getBlue()  - mC1.getBlue()));
+        data[base + 3] = (int)(mC1.getAlpha() + ratio * (mC2.getAlpha() - mC1.getAlpha()));
+      }
+    }
+    
+    raster.setPixels(0, 0, w, h, data);
+    return raster;
+  }
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/RoundGradientPaint.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/RoundGradientPaint.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/RoundGradientPaint.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,58 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.util.image;
+
+import java.awt.Color;
+import java.awt.Paint;
+import java.awt.PaintContext;
+import java.awt.Rectangle;
+import java.awt.RenderingHints;
+import java.awt.geom.AffineTransform;
+import java.awt.geom.Point2D;
+import java.awt.geom.Rectangle2D;
+import java.awt.image.ColorModel;
+
+import org.ajax4jsf.framework.util.message.Messages;
+public class RoundGradientPaint implements Paint {
+  protected Point2D mPoint;
+  protected Point2D mRadius;
+  protected Color mPointColor, mBackgroundColor;
+  public RoundGradientPaint(double x, double y, Color pointColor,
+    Point2D radius, Color backgroundColor) {
+    if (radius.distance(0, 0) <= 0) throw new IllegalArgumentException(Messages.getMessage(Messages.INVALID_RADIUS));
+    mPoint = new Point2D.Double(x, y);
+    mPointColor = pointColor;
+    mRadius = radius;
+    mBackgroundColor = backgroundColor;
+  }
+  public PaintContext createContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds,
+                                    AffineTransform xform, RenderingHints hints) {
+    Point2D transformedPoint = xform.transform(mPoint, null);
+    Point2D transformedRadius = xform.deltaTransform(mRadius, null);
+    return new RoundGradientContext(transformedPoint, mPointColor, transformedRadius, mBackgroundColor);
+  }
+  public int getTransparency() {
+    int a1 = mPointColor.getAlpha();
+    int a2 = mBackgroundColor.getAlpha();
+    return (((a1 & a2) == 0xff) ? OPAQUE : TRANSLUCENT);
+  }
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/SimpleGIFEncoder.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/SimpleGIFEncoder.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/SimpleGIFEncoder.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,499 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.util.image;
+
+import java.awt.AWTException;
+import java.awt.Image;
+import java.awt.image.PixelGrabber;
+import java.io.IOException;
+import java.io.OutputStream;
+
+import org.ajax4jsf.framework.util.message.Messages;
+
+/**
+ * GIFEncoder is a class which takes an image and saves it to a stream
+ * using the GIF file format (<A
+ * HREF="http://www.dcs.ed.ac.uk/%7Emxr/gfx/">Graphics Interchange
+ * Format</A>). A GIFEncoder
+ * is constructed with either an AWT Image (which must be fully
+ * loaded) or a set of RGB arrays. The image can be written out with a
+ * call to <CODE>Write</CODE>.<P>
+ *
+ * Three caveats:
+ * <UL>
+ *   <LI>GIFEncoder will convert the image to indexed color upon
+ *   construction. This will take some time, depending on the size of
+ *   the image. Also, actually writing the image out (Write) will take
+ *   time.<P>
+ *
+ *   <LI>The image cannot have more than 256 colors, since GIF is an 8
+ *   bit format. For a 24 bit to 8 bit quantization algorithm, see
+ *   Graphics Gems II III.2 by Xialoin Wu. Or check out his <A
+ *   HREF="http://www.csd.uwo.ca/faculty/wu/cq.c">C source</A>.<P>
+ *
+ *   <LI>Since the image must be completely loaded into memory,
+ *   GIFEncoder may have problems with large images. Attempting to
+ *   encode an image which will not fit into memory will probably
+ *   result in the following exception:<P>
+ *   <CODE>java.awt.AWTException: Grabber returned false: 192</CODE><P>
+ * </UL><P>
+ *
+ * GIFEncoder is based upon gifsave.c, which was written and released
+ * by:<P>
+ * <CENTER>
+ *                                  Sverre H. Huseby<BR>
+ *                                   Bjoelsengt. 17<BR>
+ *                                     N-0468 Oslo<BR>
+ *                                       Norway<P>
+ *
+ *                                 Phone: +47 2 230539<BR>
+ *                                 sverrehu at ifi.uio.no<P>
+ * </CENTER>
+ * @version 0.90 21 Apr 1996
+ * @author <A HREF="http://www.cs.brown.edu/people/amd/">Adam Doppelt</A> */
+public class SimpleGIFEncoder {
+    short width_, height_;
+    int numColors_;
+    byte pixels_[], colors_[];
+
+    ScreenDescriptor sd_;
+    ImageDescriptor id_;
+
+/**
+ * Construct a GIFEncoder. The constructor will convert the image to
+ * an indexed color array. <B>This may take some time.</B><P>
+ *
+ * @param image The image to encode. The image <B>must</B> be
+ * completely loaded.
+ * @exception AWTException Will be thrown if the pixel grab fails. This
+ * can happen if Java runs out of memory. It may also indicate that the image
+ * contains more than 256 colors.
+ * */
+    public SimpleGIFEncoder(Image image) throws AWTException {
+        width_ = (short)image.getWidth(null);
+        height_ = (short)image.getHeight(null);
+
+        int values[] = new int[width_ * height_];
+        PixelGrabber grabber = new PixelGrabber(
+            image, 0, 0, width_, height_, values, 0, width_);
+
+        try {
+            if(grabber.grabPixels() != true)
+                throw new AWTException(Messages.getMessage(Messages.GRABBER_ERROR, "" + grabber.status()));
+        }
+        catch (InterruptedException e) {
+        }
+
+        byte r[][] = new byte[width_][height_];
+        byte g[][] = new byte[width_][height_];
+        byte b[][] = new byte[width_][height_];
+        int index = 0;
+        for (int y = 0; y < height_; ++y)
+            for (int x = 0; x < width_; ++x) {
+                r[x][y] = (byte)((values[index] >> 16) & 0xFF);
+                g[x][y] = (byte)((values[index] >> 8) & 0xFF);
+                b[x][y] = (byte)((values[index]) & 0xFF);
+                ++index;
+            }
+        ToIndexedColor(r, g, b);
+    }
+
+/**
+ * Construct a GIFEncoder. The constructor will convert the image to
+ * an indexed color array. <B>This may take some time.</B><P>
+ *
+ * Each array stores intensity values for the image. In other words,
+ * r[x][y] refers to the red intensity of the pixel at column x, row
+ * y.<P>
+ *
+ * @param r An array containing the red intensity values.
+ * @param g An array containing the green intensity values.
+ * @param b An array containing the blue intensity values.
+ *
+ * @exception AWTException Will be thrown if the image contains more than
+ * 256 colors.
+ * */
+    public SimpleGIFEncoder(byte r[][], byte g[][], byte b[][]) throws AWTException {
+        width_ = (short)(r.length);
+        height_ = (short)(r[0].length);
+
+        ToIndexedColor(r, g, b);
+    }
+
+/**
+ * Writes the image out to a stream in the GIF file format. This will
+ * be a single GIF87a image, non-interlaced, with no background color.
+ * <B>This may take some time.</B><P>
+ *
+ * @param output The stream to output to. This should probably be a
+ * buffered stream.
+ *
+ * @exception IOException Will be thrown if a write operation fails.
+ * */
+    public void Write(OutputStream output) throws IOException {
+        BitUtils.WriteString(output, "GIF87a");
+
+        ScreenDescriptor sd = new ScreenDescriptor(width_, height_,
+                                                   numColors_);
+        sd.Write(output);
+
+        output.write(colors_, 0, colors_.length);
+
+        ImageDescriptor id = new ImageDescriptor(width_, height_, ',');
+        id.Write(output);
+
+        byte codesize = BitUtils.BitsNeeded(numColors_);
+        if (codesize == 1)
+            ++codesize;
+        output.write(codesize);
+
+        LZWCompressor.LZWCompress(output, codesize, pixels_);
+        output.write(0);
+
+        id = new ImageDescriptor((byte)0, (byte)0, ';');
+        id.Write(output);
+        output.flush();
+    }
+
+    void ToIndexedColor(byte r[][], byte g[][],
+                        byte b[][]) throws AWTException {
+        pixels_ = new byte[width_ * height_];
+        colors_ = new byte[256 * 3];
+        int colornum = 0;
+        for (int x = 0; x < width_; ++x) {
+            for (int y = 0; y < height_; ++y) {
+                int search;
+                for (search = 0; search < colornum; ++search)
+                    if (colors_[search * 3]     == r[x][y] &&
+                        colors_[search * 3 + 1] == g[x][y] &&
+                        colors_[search * 3 + 2] == b[x][y])
+                        break;
+
+                if (search > 255)
+                    throw new AWTException(Messages.getMessage(Messages.TOOMANY_COLORS_ERROR));
+
+                pixels_[y * width_ + x] = (byte)search;
+
+                if (search == colornum) {
+                    colors_[search * 3]     = r[x][y];
+                    colors_[search * 3 + 1] = g[x][y];
+                    colors_[search * 3 + 2] = b[x][y];
+                    ++colornum;
+                }
+            }
+        }
+        numColors_ = 1 << BitUtils.BitsNeeded(colornum);
+        byte copy[] = new byte[numColors_ * 3];
+        System.arraycopy(colors_, 0, copy, 0, numColors_ * 3);
+        colors_ = copy;
+    }
+
+}
+
+class BitFile {
+    OutputStream output_;
+    byte buffer_[];
+    int index_, bitsLeft_;
+
+    public BitFile(OutputStream output) {
+        output_ = output;
+        buffer_ = new byte[256];
+        index_ = 0;
+        bitsLeft_ = 8;
+    }
+
+    public void Flush() throws IOException {
+        int numBytes = index_ + (bitsLeft_ == 8 ? 0 : 1);
+        if (numBytes > 0) {
+            output_.write(numBytes);
+            output_.write(buffer_, 0, numBytes);
+            buffer_[0] = 0;
+            index_ = 0;
+            bitsLeft_ = 8;
+        }
+    }
+
+    public void WriteBits(int bits, int numbits) throws IOException {
+        int bitsWritten = 0;
+        int numBytes = 255;
+        do {
+            if ((index_ == 254 && bitsLeft_ == 0) || index_ > 254) {
+                output_.write(numBytes);
+                output_.write(buffer_, 0, numBytes);
+
+                buffer_[0] = 0;
+                index_ = 0;
+                bitsLeft_ = 8;
+            }
+
+            if (numbits <= bitsLeft_) {
+                buffer_[index_] |= (bits & ((1 << numbits) - 1)) <<
+                    (8 - bitsLeft_);
+                bitsWritten += numbits;
+                bitsLeft_ -= numbits;
+                numbits = 0;
+            }
+            else {
+                buffer_[index_] |= (bits & ((1 << bitsLeft_) - 1)) <<
+                    (8 - bitsLeft_);
+                bitsWritten += bitsLeft_;
+                bits >>= bitsLeft_;
+                numbits -= bitsLeft_;
+                buffer_[++index_] = 0;
+                bitsLeft_ = 8;
+            }
+        } while (numbits != 0);
+    }
+}
+
+class LZWStringTable {
+    private final static int RES_CODES = 2;
+    private final static short HASH_FREE = (short)0xFFFF;
+    private final static short NEXT_FIRST = (short)0xFFFF;
+    private final static int MAXBITS = 12;
+    private final static int MAXSTR = (1 << MAXBITS);
+    private final static short HASHSIZE = 9973;
+    private final static short HASHSTEP = 2039;
+
+    byte strChr_[];
+    short strNxt_[];
+    short strHsh_[];
+    short numStrings_;
+
+    public LZWStringTable() {
+        strChr_ = new byte[MAXSTR];
+        strNxt_ = new short[MAXSTR];
+        strHsh_ = new short[HASHSIZE];
+    }
+
+    public int AddCharString(short index, byte b) {
+        int hshidx;
+
+        if (numStrings_ >= MAXSTR)
+            return 0xFFFF;
+
+        hshidx = Hash(index, b);
+        while (strHsh_[hshidx] != HASH_FREE)
+            hshidx = (hshidx + HASHSTEP) % HASHSIZE;
+
+        strHsh_[hshidx] = numStrings_;
+        strChr_[numStrings_] = b;
+        strNxt_[numStrings_] = (index != HASH_FREE) ? index : NEXT_FIRST;
+
+        return numStrings_++;
+    }
+
+    public short FindCharString(short index, byte b) {
+        int hshidx, nxtidx;
+
+        if (index == HASH_FREE)
+            return b;
+
+        hshidx = Hash(index, b);
+        while ((nxtidx = strHsh_[hshidx]) != HASH_FREE) {
+            if (strNxt_[nxtidx] == index && strChr_[nxtidx] == b)
+                return (short)nxtidx;
+            hshidx = (hshidx + HASHSTEP) % HASHSIZE;
+        }
+
+        return (short)0xFFFF;
+    }
+
+    public void ClearTable(int codesize) {
+        numStrings_ = 0;
+
+        for (int q = 0; q < HASHSIZE; q++) {
+            strHsh_[q] = HASH_FREE;
+        }
+
+        int w = (1 << codesize) + RES_CODES;
+        for (int q = 0; q < w; q++)
+            AddCharString((short)0xFFFF, (byte)q);
+    }
+
+    static public int Hash(short index, byte lastbyte) {
+        return ((int)((short)(lastbyte << 8) ^ index) & 0xFFFF) % HASHSIZE;
+    }
+}
+
+class LZWCompressor {
+
+    public static void LZWCompress(OutputStream output, int codesize,
+                                   byte toCompress[]) throws IOException {
+        byte c;
+        short index;
+        int clearcode, endofinfo, numbits, limit, errcode;
+        short prefix = (short)0xFFFF;
+
+        BitFile bitFile = new BitFile(output);
+        LZWStringTable strings = new LZWStringTable();
+
+        clearcode = 1 << codesize;
+        endofinfo = clearcode + 1;
+
+        numbits = codesize + 1;
+        limit = (1 << numbits) - 1;
+
+        strings.ClearTable(codesize);
+        bitFile.WriteBits(clearcode, numbits);
+
+        for (int loop = 0; loop < toCompress.length; ++loop) {
+            c = toCompress[loop];
+            if ((index = strings.FindCharString(prefix, c)) != -1)
+                prefix = index;
+            else {
+                bitFile.WriteBits(prefix, numbits);
+                if (strings.AddCharString(prefix, c) > limit) {
+                    if (++numbits > 12) {
+                        bitFile.WriteBits(clearcode, numbits - 1);
+                        strings.ClearTable(codesize);
+                        numbits = codesize + 1;
+                    }
+                    limit = (1 << numbits) - 1;
+                }
+
+                prefix = (short)((short)c & 0xFF);
+            }
+        }
+
+        if (prefix != -1)
+            bitFile.WriteBits(prefix, numbits);
+
+        bitFile.WriteBits(endofinfo, numbits);
+        bitFile.Flush();
+    }
+}
+
+class ScreenDescriptor {
+    public short localScreenWidth_, localScreenHeight_;
+    private byte byte_;
+    public byte backgroundColorIndex_, pixelAspectRatio_;
+
+    public ScreenDescriptor(short width, short height, int numColors) {
+        localScreenWidth_ = width;
+        localScreenHeight_ = height;
+        SetGlobalColorTableSize((byte)(BitUtils.BitsNeeded(numColors) - 1));
+        SetGlobalColorTableFlag((byte)1);
+        SetSortFlag((byte)0);
+        SetColorResolution((byte)7);
+        backgroundColorIndex_ = 0;
+        pixelAspectRatio_ = 0;
+    }
+
+    public void Write(OutputStream output) throws IOException {
+        BitUtils.WriteWord(output, localScreenWidth_);
+        BitUtils.WriteWord(output, localScreenHeight_);
+        output.write(byte_);
+        output.write(backgroundColorIndex_);
+        output.write(pixelAspectRatio_);
+    }
+
+    public void SetGlobalColorTableSize(byte num) {
+        byte_ |= (num & 7);
+    }
+
+    public void SetSortFlag(byte num) {
+        byte_ |= (num & 1) << 3;
+    }
+
+    public void SetColorResolution(byte num) {
+        byte_ |= (num & 7) << 4;
+    }
+
+    public void SetGlobalColorTableFlag(byte num) {
+        byte_ |= (num & 1) << 7;
+    }
+}
+
+class ImageDescriptor {
+    public byte separator_;
+    public short leftPosition_, topPosition_, width_, height_;
+    private byte byte_;
+
+    public ImageDescriptor(short width, short height, char separator) {
+        separator_ = (byte)separator;
+        leftPosition_ = 0;
+        topPosition_ = 0;
+        width_ = width;
+        height_ = height;
+        SetLocalColorTableSize((byte)0);
+        SetReserved((byte)0);
+        SetSortFlag((byte)0);
+        SetInterlaceFlag((byte)0);
+        SetLocalColorTableFlag((byte)0);
+    }
+
+    public void Write(OutputStream output) throws IOException {
+        output.write(separator_);
+        BitUtils.WriteWord(output, leftPosition_);
+        BitUtils.WriteWord(output, topPosition_);
+        BitUtils.WriteWord(output, width_);
+        BitUtils.WriteWord(output, height_);
+        output.write(byte_);
+    }
+
+    public void SetLocalColorTableSize(byte num) {
+        byte_ |= (num & 7);
+    }
+
+    public void SetReserved(byte num) {
+        byte_ |= (num & 3) << 3;
+    }
+
+    public void SetSortFlag(byte num) {
+        byte_ |= (num & 1) << 5;
+    }
+
+    public void SetInterlaceFlag(byte num) {
+        byte_ |= (num & 1) << 6;
+    }
+
+    public void SetLocalColorTableFlag(byte num) {
+        byte_ |= (num & 1) << 7;
+    }
+}
+
+class BitUtils {
+    public static byte BitsNeeded(int n) {
+        byte ret = 1;
+
+        if (n-- == 0)
+            return 0;
+
+        while ((n >>= 1) != 0)
+            ++ret;
+
+        return ret;
+    }
+
+    public static void WriteWord(OutputStream output,
+                                 short w) throws IOException {
+        output.write(w & 0xFF);
+        output.write((w >> 8) & 0xFF);
+    }
+
+    static void WriteString(OutputStream output,
+                            String string) throws IOException {
+        for (int loop = 0; loop < string.length(); ++loop)
+            output.write((byte)(string.charAt(loop)));
+    }
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/imageio/ImageIOGenerator.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/imageio/ImageIOGenerator.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/imageio/ImageIOGenerator.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,175 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Helma License Notice
+ *
+ * The contents of this file are subject to the Helma License
+ * Version 2.0 (the "License"). You may not use this file except in
+ * compliance with the License. A copy of the License is available at
+ * http://adele.helma.org/download/helma/license.txt
+ *
+ * Copyright 1998-2003 Helma Software. All Rights Reserved.
+ *
+ * $RCSfile: ImageIOGenerator.java,v $
+ * $Author: alexsmirnov $
+ * $Revision: 1.1.2.1 $
+ * $Date: 2007/01/09 19:00:17 $
+ */
+
+/*
+ * ImageIOGenerator defines it's own functions for reading from various
+ * resources. These return BufferedImages, therefore all the images
+ * are from the beginning in that format when working with ImageIO
+ */
+
+package org.ajax4jsf.framework.util.image.imageio;
+
+import java.awt.Image;
+import java.awt.image.BufferedImage;
+import java.awt.image.DirectColorModel;
+import java.awt.image.WritableRaster;
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
+import java.util.Iterator;
+
+import javax.imageio.IIOImage;
+import javax.imageio.ImageIO;
+import javax.imageio.ImageWriteParam;
+import javax.imageio.ImageWriter;
+import javax.imageio.stream.ImageOutputStream;
+
+import org.ajax4jsf.framework.util.image.ImageGenerator;
+import org.ajax4jsf.framework.util.image.ImageWrapper;
+
+
+
+/**
+ * A wrapper for an image that uses the ImageIO Framework.
+ */
+public class ImageIOGenerator extends ImageGenerator {
+    /**
+     * @param filename the filename of the image to create
+     *
+     * @return the newly created image
+     * @throws IOException
+     */
+    public Image read(String filename)
+    throws IOException {
+        return ImageIO.read(new File(filename));
+    }
+    
+    /**
+     * @param url the URL the filename of the image to create
+     *
+     * @return the newly created image
+     * @throws IOException
+     */
+    public Image read(URL url)
+    throws IOException {
+        return ImageIO.read(url);
+    }
+    
+    /**
+     * @param src the data of the image to create
+     *
+     * @return the newly created image
+     * @throws IOException
+     */
+    public Image read(byte[] src)
+    throws IOException {
+        return ImageIO.read(new ByteArrayInputStream(src));
+    }
+
+    /**
+     * Saves the image. Image format is deduced from filename.
+     *
+     * @param filename ...
+     * @param quality ...
+     * @param alpha ...
+     * @throws IOException
+     * @see helma.image.ImageGenerator#write(helma.image.ImageWrapper, java.lang.String, float, boolean)
+     */
+    public void write(ImageWrapper wrapper, String filename, float quality, boolean alpha) throws IOException {
+        int pos = filename.lastIndexOf('.');
+        if (pos != -1) {
+            String extension = filename.substring(pos + 1,
+                filename.length()).toLowerCase();
+
+            // Find a writer for that file extensions
+            ImageWriter writer = null;
+            Iterator iter = ImageIO.getImageWritersByFormatName(extension);
+            if (iter.hasNext())
+                writer = (ImageWriter) iter.next();
+            if (writer != null) {
+                ImageOutputStream ios = null;
+                try {
+                    BufferedImage bi = wrapper.getBufferedImage();
+                    // Prepare output file
+                    File file = new File(filename);
+                    if (file.exists())
+                        file.delete();
+                    ios = ImageIO.createImageOutputStream(file);
+                    writer.setOutput(ios);
+                    // Set some parameters
+                    ImageWriteParam param = writer.getDefaultWriteParam();
+                    if (param.canWriteCompressed() &&
+                        quality >= 0.0 && quality <= 1.0) {
+                        param.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
+                        param.setCompressionQuality(quality);
+                    }
+                    if (param.canWriteProgressive())
+                        param.setProgressiveMode(ImageWriteParam.MODE_DISABLED);
+                    // if bi has type ARGB and alpha is false, we have to tell the writer to not use the alpha channel:
+                    // this is especially needed for jpeg files where imageio seems to produce wrong jpeg files right now...
+                    if (bi.getType() == BufferedImage.TYPE_INT_ARGB
+                        && !alpha) {
+                        // create a new BufferedImage that uses a WritableRaster of bi, with all the bands except the alpha band:
+                        WritableRaster raster = bi.getRaster();
+                        WritableRaster newRaster = raster.createWritableChild(
+                            0, 0, wrapper.getWidth(), wrapper.getHeight(),
+                            0, 0, new int[] {0, 1, 2 }
+                        );
+                        // create a ColorModel that represents the one of the ARGB except the alpha channel:
+                        DirectColorModel cm = (DirectColorModel) bi.getColorModel();
+                        DirectColorModel newCM = new DirectColorModel(
+                            cm.getPixelSize(), cm.getRedMask(),
+                            cm.getGreenMask(), cm.getBlueMask());
+                        // now create the new buffer that is used ot write the image:
+                        BufferedImage rgbBuffer = new BufferedImage(newCM,
+                            newRaster, false, null);
+                        writer.write(null, new IIOImage(rgbBuffer, null,
+                            null), param);
+                    } else {
+                        writer.write(null, new IIOImage(bi, null, null),
+                            param);
+                    }
+                } finally {
+                    if (ios != null)
+                        ios.close();
+                    writer.dispose();
+                }
+            }
+        }
+}
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/imageio/gif/GIFImageWriteParam.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/imageio/gif/GIFImageWriteParam.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/imageio/gif/GIFImageWriteParam.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,63 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Helma License Notice
+ *
+ * The contents of this file are subject to the Helma License
+ * Version 2.0 (the "License"). You may not use this file except in
+ * compliance with the License. A copy of the License is available at
+ * http://adele.helma.org/download/helma/license.txt
+ *
+ * Copyright 1998-2003 Helma Software. All Rights Reserved.
+ *
+ * $RCSfile: GIFImageWriteParam.java,v $
+ * $Author: alexsmirnov $
+ * $Revision: 1.1.2.1 $
+ * $Date: 2007/01/09 18:58:03 $
+ */
+
+/*
+ * The imageio integration is inspired by the package org.freehep.graphicsio.gif
+ */
+
+package org.ajax4jsf.framework.util.image.imageio.gif;
+
+import java.util.Locale;
+import java.util.Properties;
+
+import javax.imageio.ImageWriteParam;
+
+public class GIFImageWriteParam extends ImageWriteParam {
+
+    private boolean quantizeColors;
+    private String quantizeMode;
+
+    public GIFImageWriteParam(Locale locale) {
+        super(locale);
+        canWriteProgressive = true;
+        progressiveMode = MODE_DEFAULT;
+    }
+
+    public ImageWriteParam getWriteParam(Properties properties) {
+        return this;
+    }
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/imageio/gif/GIFImageWriter.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/imageio/gif/GIFImageWriter.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/imageio/gif/GIFImageWriter.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,113 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Helma License Notice
+ *
+ * The contents of this file are subject to the Helma License
+ * Version 2.0 (the "License"). You may not use this file except in
+ * compliance with the License. A copy of the License is available at
+ * http://adele.helma.org/download/helma/license.txt
+ *
+ * Copyright 1998-2003 Helma Software. All Rights Reserved.
+ *
+ * $RCSfile: GIFImageWriter.java,v $
+ * $Author: alexsmirnov $
+ * $Revision: 1.1.2.1 $
+ * $Date: 2007/01/09 18:58:03 $
+ */
+
+/*
+ * The imageio integration is inspired by the package org.freehep.graphicsio.gif
+ */
+
+package org.ajax4jsf.framework.util.image.imageio.gif;
+
+import java.awt.image.BufferedImage;
+import java.awt.image.RenderedImage;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import javax.imageio.IIOImage;
+import javax.imageio.ImageTypeSpecifier;
+import javax.imageio.ImageWriteParam;
+import javax.imageio.ImageWriter;
+import javax.imageio.metadata.IIOMetadata;
+
+import org.ajax4jsf.framework.util.image.GIFEncoder;
+import org.ajax4jsf.framework.util.message.Messages;
+
+
+public class GIFImageWriter extends ImageWriter {
+    GIFEncoder encoder;
+
+    public GIFImageWriter(GIFImageWriterSpi originatingProvider) {
+        super(originatingProvider);
+        encoder = new GIFEncoder();
+    }
+
+    public void write(IIOMetadata streamMetadata, IIOImage image,
+        ImageWriteParam param) throws IOException {
+        if (image == null)
+            throw new IllegalArgumentException("image == null");
+
+        if (image.hasRaster())
+            throw new UnsupportedOperationException(Messages.getMessage(Messages.CANNOT_WRITE_RASTERS));
+
+        Object output = getOutput();
+        if (output == null)
+            throw new IllegalStateException(Messages.getMessage(Messages.NULL_OUTPUT_ERROR));
+
+        if (param == null)
+            param = getDefaultWriteParam();
+
+        RenderedImage ri = image.getRenderedImage();
+        if (!(ri instanceof BufferedImage))
+            throw new IOException(Messages.getMessage(Messages.IMAGE_NOT_BUFFERED_ERROR));
+        if (!(output instanceof DataOutput))
+            throw new IOException(Messages.getMessage(Messages.NOT_DATA_OUTPUT_ERROR));
+        encoder.encode((BufferedImage) ri, (DataOutput) output,
+            param.getProgressiveMode() != ImageWriteParam.MODE_DISABLED, null);
+    }
+
+    public IIOMetadata convertStreamMetadata(IIOMetadata inData,
+        ImageWriteParam param) {
+        return null;
+    }
+
+    public IIOMetadata convertImageMetadata(IIOMetadata inData,
+        ImageTypeSpecifier imageType, ImageWriteParam param) {
+        return null;
+    }
+
+    public IIOMetadata getDefaultImageMetadata(ImageTypeSpecifier imageType,
+        ImageWriteParam param) {
+        return null;
+    }
+
+    public IIOMetadata getDefaultStreamMetadata(ImageWriteParam param) {
+        return null;
+    }
+
+    public ImageWriteParam getDefaultWriteParam() {
+        return new GIFImageWriteParam(getLocale());
+    }
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/imageio/gif/GIFImageWriterSpi.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/imageio/gif/GIFImageWriterSpi.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/image/imageio/gif/GIFImageWriterSpi.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,81 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Helma License Notice
+ *
+ * The contents of this file are subject to the Helma License
+ * Version 2.0 (the "License"). You may not use this file except in
+ * compliance with the License. A copy of the License is available at
+ * http://adele.helma.org/download/helma/license.txt
+ *
+ * Copyright 1998-2003 Helma Software. All Rights Reserved.
+ *
+ * $RCSfile: GIFImageWriterSpi.java,v $
+ * $Author: alexsmirnov $
+ * $Revision: 1.1.2.1 $
+ * $Date: 2007/01/09 18:58:02 $
+ */
+
+/*
+ * The imageio integration is inspired by the package org.freehep.graphicsio.gif
+ */
+
+package org.ajax4jsf.framework.util.image.imageio.gif;
+
+import java.io.IOException;
+import java.util.Locale;
+
+import javax.imageio.ImageTypeSpecifier;
+import javax.imageio.ImageWriter;
+import javax.imageio.spi.ImageWriterSpi;
+
+public class GIFImageWriterSpi extends ImageWriterSpi {
+	
+    public GIFImageWriterSpi() {
+        super(
+            "Helma Object Publisher, http://helma.org/",
+            "1.0",
+            new String[] {"gif", "GIF"},
+            new String[] {"gif", "GIF"},
+            new String[] {"image/gif", "image/x-gif"},
+            "helma.image.imageio.gif.GIFImageWriter",
+            STANDARD_OUTPUT_TYPE,
+            null,
+            false, null, null, null, null,
+            false, null, null, null, null
+        );
+    }
+
+    public String getDescription(Locale locale) {
+        return "Graphics Interchange Format";
+    }
+
+    public ImageWriter createWriterInstance(Object extension)
+        throws IOException {
+        return new GIFImageWriter(this);
+    }
+
+    public boolean canEncodeImage(ImageTypeSpecifier type) {
+        // FIXME handle # colors
+        return true;
+    }
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/javascript/AjaxSubmitFunction.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/javascript/AjaxSubmitFunction.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/javascript/AjaxSubmitFunction.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,99 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.util.javascript;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.faces.component.UIComponent;
+
+import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * @author shura
+ *
+ */
+public class AjaxSubmitFunction extends JSFunction {
+	
+	/**
+	 * Name Javasript function for submit AJAX request
+	 */
+	public static final String AJAX_FUNCTION_NAME = "A4J.AJAX.Submit";
+
+	/**
+	 * Attribute for keep clientId of status component
+	 */
+	public static final String STATUS_ATTR_NAME = "status";
+
+	/**
+	 * Attribute for keep JavaScript funtion name for call after complete
+	 * request.
+	 */
+	public static final String ONCOMPLETE_ATTR_NAME = "oncomplete";
+
+	/**
+	 * Attribute to keep
+	 */
+	public static final String LIMITTOLIST_ATTR_NAME = "limitToList";
+
+	private static Log log = LogFactory.getLog(AjaxRendererUtils.class);
+
+	public static final String AJAX_REGIONS_ATTRIBUTE = "reRender";
+
+	private static final Class OBJECT_ARRAY_CLASS = (new Object[0]).getClass();
+
+	private UIComponent component;
+	
+	private Map options = new HashMap();
+	
+	private Map requestParameters = new HashMap();
+
+	/**
+	 * 
+	 */
+	public AjaxSubmitFunction(UIComponent component) {
+		this(component,AJAX_FUNCTION_NAME);
+	}
+	/**
+	 * @param name
+	 */
+	public AjaxSubmitFunction(UIComponent component,String name) {
+		super(name);
+		this.component = component;
+		// Fill parameters and options values.
+	}
+	/**
+	 * @return the options
+	 */
+	public Map getOptions() {
+		return this.options;
+	}
+	/**
+	 * @return the requestParameters
+	 */
+	public Map getRequestParameters() {
+		return this.requestParameters;
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/javascript/JSEncoder.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/javascript/JSEncoder.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/javascript/JSEncoder.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,119 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.util.javascript;
+
+/**
+ * @author shura
+ * Encode chars as JavaScript sequences
+ */
+public class JSEncoder {
+    private char APOSTROPHE[] = { '\\', '\'' };
+
+    private static final char ENCODE_HEX[] = "0123456789ABCDEF".toCharArray();
+
+    private static final char ENCODE_APOS[] = "\\'".toCharArray();
+
+    private static final char ENCODE_QUOT[] = "\\\"".toCharArray();
+
+    private static final char ENCODE_CR[] = "\\r".toCharArray();
+
+    private static final char ENCODE_LF[] = "\\n".toCharArray();
+
+    private static final char ENCODE_FF[] = "\\f".toCharArray();
+
+    private static final char ENCODE_TAB[] = "\\t".toCharArray();
+
+    private static final char ENCODE_BS[] = "\\\\".toCharArray();
+
+    private static final char ENCODE_ESC[] = "\\e".toCharArray();
+
+    /**
+     * Create a new instance of this <code>XMLEncoder</code>.
+     */
+    public JSEncoder() {
+    }
+
+    /**
+     * Return true or false wether this encoding can encode the specified
+     * character or not.
+     * <p>
+     * This method will return true for the following character range: <br />
+     * <code>
+     *   <nobr>#x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD]</nobr>
+     * </code>
+     * </p>
+     * 
+     * @see <a href="http://www.w3.org/TR/REC-xml#charsets">W3C XML 1.0 </a>
+     */
+    public boolean compile(char c) {
+
+        if ((c == 0x09) || // [\t]
+                (c == 0x0a) || // [\n]
+                (c == 0x0d) || // [\r](c == 0x22) || // ["]
+                (c == 0x22) || // ["]
+                (c == 0x27) || // [']
+                (c == 0x5c) || // [\]
+                (c == 0x03) || // [esc]
+                (c == ']') || // ] - to avoid conflicts in CDATA
+                (c < 0x20) || // See <http://www.w3.org/TR/REC-xml#charsets>
+                ((c > 0xd7ff) && (c < 0xe000)) || (c > 0xfffd)|| (c > 0xff)) {
+            return (false);
+        }
+
+        return (true);
+    }
+
+    /**
+     * Return an array of characters representing the encoding for the specified
+     * character.
+     */
+    public char[] encode(char c) {
+        switch (c) {
+        case 0x03:
+            return (ENCODE_FF); // (>) [&gt;]
+        case 0x09:
+            return (ENCODE_TAB); // (>) [&gt;]
+        case 0x0a:
+            return (ENCODE_LF); // (>) [&gt;]
+        case 0x0d:
+            return (ENCODE_CR); // (>) [&gt;]
+        case 0x22:
+            return (ENCODE_QUOT); // (") [&quot;]
+        case 0x27:
+            return (ENCODE_APOS); // (') [&apos;]
+        case 0x5c:
+            return (ENCODE_BS); // (<) [&lt;]
+        default: {
+            if (c > 0xff) {
+                char ret[] = { '\\', 'u', ENCODE_HEX[c >> 0xc & 0xf],
+                        ENCODE_HEX[c >> 0x8 & 0xf], ENCODE_HEX[c >> 0x4 & 0xf],
+                        ENCODE_HEX[c & 0xf] };
+                return (ret);
+            }
+            char ret[] = { '\\', 'x', ENCODE_HEX[c >> 0x4 & 0xf],
+                    ENCODE_HEX[c & 0xf] };
+            return (ret);
+        }
+        }
+    }
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/javascript/JSFunction.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/javascript/JSFunction.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/javascript/JSFunction.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,104 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.util.javascript;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.3 $ $Date: 2007/02/06 16:23:26 $
+ * 
+ */
+public class JSFunction extends ScriptStringBase implements ScriptString {
+
+	private String name;
+
+	private List parameters = null;
+
+	/**
+	 * @param name
+	 */
+	public JSFunction(String name) {
+		// TODO Auto-generated constructor stub
+		this.name = name;
+	}
+
+	/**
+	 * @param name
+	 * @param parameters
+	 */
+	public JSFunction(String name, List parameters) {
+		// TODO Auto-generated constructor stub
+		this.name = name;
+		this.parameters = parameters;
+	}
+
+	/**
+	 * @param name
+	 * @param parameters
+	 */
+	public JSFunction(String name, Object parameter) {
+		// TODO Auto-generated constructor stub
+		this.name = name;
+		this.parameters = new ArrayList(1);
+		this.parameters.add(parameter);
+	}
+
+	public JSFunction addParameter(Object parameter) {
+		getParameters().add(parameter);
+		return this;
+	}
+
+	public void appendScript(StringBuffer functionString) {
+		functionString.append(name).append('(');
+		boolean first = true;
+		List parameters = getParameters();
+		if (null != parameters) {
+			for (Iterator param = parameters.iterator(); param.hasNext();) {
+				Object element = param.next();
+				if (!first) {
+					functionString.append(',');
+				}
+				if (null != element) {
+					functionString.append(ScriptUtils.toScript(element));
+				} else {
+					functionString.append("null");
+				}
+				first = false;
+			}
+
+		}
+		functionString.append(")");
+	}
+
+	/**
+	 * @return the parameters
+	 */
+	public List getParameters() {
+		if (this.parameters == null) {
+			this.parameters = new ArrayList();
+		}
+		return this.parameters;
+	}
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/javascript/JSFunctionDefinition.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/javascript/JSFunctionDefinition.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/javascript/JSFunctionDefinition.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,112 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.util.javascript;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.2 $ $Date: 2007/01/24 13:22:31 $
+ *
+ */
+public class JSFunctionDefinition extends ScriptStringBase implements ScriptString
+{
+
+
+    
+    private List parameters = new ArrayList();
+    
+    private StringBuffer body = new StringBuffer();
+    
+    private String name ;
+
+
+	public JSFunctionDefinition(){
+    }
+
+    public JSFunctionDefinition( List parameters)
+    {
+
+        this.parameters = parameters;
+    }
+
+    /**
+     * @param body
+     * @param parameters
+     */
+    public JSFunctionDefinition( Object parameter)
+    {
+        this.parameters.add(parameter);
+    }
+
+
+    public JSFunctionDefinition addParameter(Object parameter)
+    {
+        this.parameters.add(parameter);
+        return this;
+    }
+    
+    public JSFunctionDefinition addToBody(Object body)
+    {
+        this.body.append(body);
+        return this;
+    }
+    /* (non-Javadoc)
+     * @see org.ajax4jsf.components.renderkit.scriptutils.ScriptString#appendScript(java.lang.StringBuffer)
+     */
+    public void appendScript(StringBuffer functionString)
+    {
+    	functionString.append("function");
+    	if(null != name){
+    		functionString.append(" ").append(name);
+    	}
+    	functionString.append("(");
+        boolean first = true;
+        for (Iterator param = parameters.iterator(); param.hasNext();)
+        {
+            Object element =  param.next();
+            if(!first){
+                functionString.append(',');
+            }
+            functionString.append(element.toString());
+            first = false;
+        }
+        functionString.append("){").append(body).append("}");
+    }
+
+	/**
+	 * @return the name
+	 */
+	public String getName() {
+		return this.name;
+	}
+
+	/**
+	 * @param name the name to set
+	 */
+	public void setName(String name) {
+		this.name = name;
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/javascript/JSMin.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/javascript/JSMin.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/javascript/JSMin.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,327 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * JSMin.java 2006-02-13
+ * 
+ * Copyright (c) 2006 John Reilly (www.inconspicuous.org)
+ * 
+ * This work is a translation from C to Java of jsmin.c published by
+ * Douglas Crockford.  Permission is hereby granted to use the Java 
+ * version under the same conditions as the jsmin.c on which it is
+ * based.  
+ * 
+ * 
+ * 
+ * 
+ * jsmin.c 2003-04-21
+ * 
+ * Copyright (c) 2002 Douglas Crockford (www.crockford.com)
+ * 
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ * 
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ * 
+ * The Software shall be used for Good, not Evil.
+ * 
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+package org.ajax4jsf.framework.util.javascript;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.PushbackInputStream;
+
+
+
+
+public class JSMin {
+	private static final int EOF = -1;
+
+	private PushbackInputStream in;
+	private OutputStream out;
+
+	private int theA;
+	private int theB;
+	
+	public JSMin(InputStream in, OutputStream out) {
+		this.in = new PushbackInputStream(in);
+		this.out = out;
+	}
+
+	/**
+	 * isAlphanum -- return true if the character is a letter, digit,
+	 * underscore, dollar sign, or non-ASCII character.
+	 */
+	static boolean isAlphanum(int c) {
+		return ( (c >= 'a' && c <= 'z') || 
+				 (c >= '0' && c <= '9') || 
+				 (c >= 'A' && c <= 'Z') || 
+				 c == '_' || 
+				 c == '$' || 
+				 c == '\\' || 
+				 c > 126);
+	}
+
+	/**
+	 * get -- return the next character from stdin. Watch out for lookahead. If
+	 * the character is a control character, translate it to a space or
+	 * linefeed.
+	 */
+	int get() throws IOException {
+		int c = in.read();
+
+		if (c >= ' ' || c == '\n' || c == EOF) {
+			return c;
+		}
+
+		if (c == '\r') {
+			return '\n';
+		}
+		
+		return ' ';
+	}
+
+	
+	
+	/**
+	 * Get the next character without getting it.
+	 */
+	int peek() throws IOException {
+		int lookaheadChar = in.read();
+		in.unread(lookaheadChar);
+		return lookaheadChar;
+	}
+
+	/**
+	 * next -- get the next character, excluding comments. peek() is used to see
+	 * if a '/' is followed by a '/' or '*'.
+	 */
+	int next() throws IOException, UnterminatedCommentException {
+		int c = get();
+		if (c == '/') {
+			switch (peek()) {
+			case '/':
+				for (;;) {
+					c = get();
+					if (c <= '\n') {
+						return c;
+					}
+				}
+
+			case '*':
+				get();
+				for (;;) {
+					switch (get()) {
+					case '*':
+						if (peek() == '/') {
+							get();
+							return ' ';
+						}
+						break;
+					case EOF:
+						throw new UnterminatedCommentException();
+					}
+				}
+
+			default:
+				return c;
+			}
+
+		}
+		return c;
+	}
+
+	/**
+	 * action -- do something! What you do is determined by the argument: 1
+	 * Output A. Copy B to A. Get the next B. 2 Copy B to A. Get the next B.
+	 * (Delete A). 3 Get the next B. (Delete B). action treats a string as a
+	 * single character. Wow! action recognizes a regular expression if it is
+	 * preceded by ( or , or =.
+	 */
+
+	void action(int d) throws IOException, UnterminatedRegExpLiteralException,
+			UnterminatedCommentException, UnterminatedStringLiteralException {
+		switch (d) {
+		case 1:
+			out.write(theA);
+		case 2:
+			theA = theB;
+
+			if (theA == '\'' || theA == '"') {
+				for (;;) {
+					out.write(theA);
+					theA = get();
+					if (theA == theB) {
+						break;
+					}
+					if (theA <= '\n') {
+						throw new UnterminatedStringLiteralException();
+					}
+					if (theA == '\\') {
+						out.write(theA);
+						theA = get();
+					}
+				}
+			}
+			
+		case 3:
+			theB = next();
+			if (theB == '/' && (theA == '(' || theA == ',' || theA == '=')) {
+				out.write(theA);
+				out.write(theB);
+				for (;;) {
+					theA = get();
+					if (theA == '/') {
+						break;
+					} else if (theA == '\\') {
+						out.write(theA);
+						theA = get();
+					} else if (theA <= '\n') {
+						throw new UnterminatedRegExpLiteralException();
+					}
+					out.write(theA);
+				}
+				theB = next();
+			}
+		}
+	}
+
+	/**
+	 * jsmin -- Copy the input to the output, deleting the characters which are
+	 * insignificant to JavaScript. Comments will be removed. Tabs will be
+	 * replaced with spaces. Carriage returns will be replaced with linefeeds.
+	 * Most spaces and linefeeds will be removed.
+	 */
+	public void jsmin() throws IOException, UnterminatedRegExpLiteralException, UnterminatedCommentException, UnterminatedStringLiteralException{
+		theA = '\n';
+		action(3);
+		while (theA != EOF) {
+			switch (theA) {
+			case ' ':
+				if (isAlphanum(theB)) {
+					action(1);
+				} else {
+					action(2);
+				}
+				break;
+			case '\n':
+				switch (theB) {
+				case '{':
+				case '[':
+				case '(':
+				case '+':
+				case '-':
+					action(1);
+					break;
+				case ' ':
+					action(3);
+					break;
+				default:
+					if (isAlphanum(theB)) {
+						action(1);
+					} else {
+						action(2);
+					}
+				}
+				break;
+			default:
+				switch (theB) {
+				case ' ':
+					if (isAlphanum(theA)) {
+						action(1);
+						break;
+					}
+					action(3);
+					break;
+				case '\n':
+					switch (theA) {
+					case '}':
+					case ']':
+					case ')':
+					case '+':
+					case '-':
+					case '"':
+					case '\'':
+						action(1);
+						break;
+					default:
+						if (isAlphanum(theA)) {
+							action(1);
+						} else {
+							action(3);
+						}
+					}
+					break;
+				default:
+					action(1);
+					break;
+				}
+			}
+		}
+		out.flush();
+	}
+
+	class UnterminatedCommentException extends Exception {
+	}
+
+	class UnterminatedStringLiteralException extends Exception {
+	}
+
+	class UnterminatedRegExpLiteralException extends Exception {
+	}
+
+	public static void main(String arg[]) {
+		try {
+			JSMin jsmin = new JSMin(new FileInputStream(arg[0]), System.out);
+			jsmin.jsmin();
+		} catch (FileNotFoundException e) {
+			e.printStackTrace();
+		} catch (ArrayIndexOutOfBoundsException e) {
+			e.printStackTrace();			
+		} catch (IOException e) {
+			e.printStackTrace();
+		} catch (UnterminatedRegExpLiteralException e) {
+			e.printStackTrace();
+		} catch (UnterminatedCommentException e) {
+			e.printStackTrace();
+		} catch (UnterminatedStringLiteralException e) {
+			e.printStackTrace();
+		}
+	}
+
+
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/javascript/JSObject.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/javascript/JSObject.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/javascript/JSObject.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,69 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.util.javascript;
+
+import java.util.List;
+
+/**
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:58:30 $
+ *
+ */
+public class JSObject extends JSFunction
+{
+
+    /**
+     * @param name
+     */
+    public JSObject(String name)
+    {
+        super(name);
+        // TODO Auto-generated constructor stub
+    }
+
+    /**
+     * @param name
+     * @param parameters
+     */
+    public JSObject(String name, List parameters)
+    {
+        super(name, parameters);
+        // TODO Auto-generated constructor stub
+    }
+
+    /**
+     * @param name
+     * @param parameter
+     */
+    public JSObject(String name, Object parameter)
+    {
+        super(name, parameter);
+        // TODO Auto-generated constructor stub
+    }
+
+    public void appendScript(StringBuffer functionString)
+    {
+        functionString.append("new ");
+        super.appendScript(functionString);
+    }
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/javascript/JSReference.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/javascript/JSReference.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/javascript/JSReference.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,70 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.util.javascript;
+
+/**
+ * Create reference to JavaScript variable with optional index.
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:58:30 $
+ *
+ */
+public class JSReference extends ScriptStringBase {
+	
+	public static final JSReference THIS = new JSReference("this");
+
+	public static final JSReference TRUE = new JSReference("true");
+	public static final JSReference FALSE = new JSReference("false");
+	public static final JSReference NULL = new JSReference("null");
+
+	private String name;
+	private Object index=null;
+	
+	/**
+	 * @param name
+	 */
+	public JSReference(String name) {
+		// TODO Auto-generated constructor stub
+		this.name = name;
+	}
+
+	/**
+	 * @param name
+	 * @param index
+	 */
+	public JSReference(String name, Object index) {
+		// TODO Auto-generated constructor stub
+		this.name = name;
+		this.index = index;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.util.javascript.ScriptString#appendScript(java.lang.StringBuffer)
+	 */
+	public void appendScript(StringBuffer functionString) {
+		functionString.append(name);
+		if (null != index) {
+			functionString.append("[").append(ScriptUtils.toScript(index)).append("]");
+		}
+
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/javascript/ScriptString.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/javascript/ScriptString.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/javascript/ScriptString.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,44 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.util.javascript;
+
+
+/**
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:58:32 $
+ *
+ */
+public interface ScriptString
+{
+
+    /**
+     * Return object content as JavaScript String.
+     * @return
+     */
+    public abstract String toScript(); 
+
+    /**
+     * Append JavaScript code to @link StringBuffer
+     * @param functionString
+     */
+    public void appendScript(StringBuffer functionString);
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/javascript/ScriptStringBase.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/javascript/ScriptStringBase.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/javascript/ScriptStringBase.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,50 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.util.javascript;
+
+/**
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.2 $ $Date: 2007/01/26 10:38:52 $
+ *
+ */
+public abstract class ScriptStringBase implements ScriptString
+{
+
+
+
+
+
+    public String toScript()
+    {
+        StringBuffer functionString = new StringBuffer();
+        appendScript(functionString);
+        return functionString.toString();
+    }
+    
+    /* (non-Javadoc)
+     * @see java.lang.Object#toString()
+     */
+    public String toString() {
+    	return toScript();
+    }
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/javascript/ScriptUtils.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/javascript/ScriptUtils.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/javascript/ScriptUtils.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,156 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.util.javascript;
+
+import java.beans.PropertyDescriptor;
+import java.lang.reflect.Array;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.Map;
+
+import javax.faces.FacesException;
+
+import org.apache.commons.beanutils.PropertyUtils;
+
+/**
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.3 $ $Date: 2007/01/24 13:22:31 $
+ * 
+ */
+public class ScriptUtils {
+
+	/**
+	 * This is utility class, don't instantiate.
+	 */
+	private ScriptUtils() {
+
+	}
+
+	/**
+	 * Convert any Java Object to JavaScript representation ( as possible ).
+	 * @param obj
+	 * @return
+	 */
+	public static String toScript(Object obj) {
+		if (null == obj) {
+			return "null";
+		} else if (obj instanceof ScriptString) {
+			return ((ScriptString) obj).toScript();
+		} else if (obj.getClass().isArray()) {
+			StringBuffer ret = new StringBuffer("[");
+			boolean first = true;
+			for (int i = 0; i < Array.getLength(obj); i++) {
+				Object element = Array.get(obj, i);
+				if (!first) {
+					ret.append(',');
+				}
+				ret.append(toScript(element));
+				first = false;
+			}
+			return ret.append("] ").toString();
+		} else if (obj instanceof Collection) {
+			// Collections put as JavaScript array.
+			Collection collection = (Collection) obj;
+			StringBuffer ret = new StringBuffer("[");
+			boolean first = true;
+			for (Iterator iter = collection.iterator(); iter.hasNext();) {
+				Object element = iter.next();
+				if (!first) {
+					ret.append(',');
+				}
+				ret.append(toScript(element));
+				first = false;
+			}
+			return ret.append("] ").toString();
+		} else if (obj instanceof Map) {
+			// Maps put as JavaScript hash.
+			Map map = (Map) obj;
+
+			StringBuffer ret = new StringBuffer("{");
+			boolean first = true;
+			for (Iterator iter = map.keySet().iterator(); iter.hasNext();) {
+				Object key = (Object) iter.next();
+				if (!first) {
+					ret.append(',');
+				}
+				addEncodedString(ret, key);
+				ret.append(":");
+				ret.append(toScript(map.get(key)));
+				first = false;
+			}
+			return ret.append("} ").toString();
+		} else if (obj instanceof Number || obj instanceof Boolean) {
+			// numbers and boolean put as-is, without conversion
+			return obj.toString();
+		} else if (obj instanceof String) {
+			// all other put as encoded strings.
+			StringBuffer ret = new StringBuffer();
+			addEncodedString(ret, obj);
+			return ret.toString();
+		}
+		// All other objects threaded as Java Beans.
+		try {
+			StringBuffer ret = new StringBuffer("{");
+			PropertyDescriptor[] propertyDescriptors = PropertyUtils
+					.getPropertyDescriptors(obj);
+			boolean first = true;
+			for (int i = 0; i < propertyDescriptors.length; i++) {
+				PropertyDescriptor propertyDescriptor = propertyDescriptors[i];
+				String key = propertyDescriptor.getName();
+				if ("class".equals(key)) {
+					continue;
+				}
+				if (!first) {
+					ret.append(',');
+				}
+				addEncodedString(ret, key);
+				ret.append(":");
+				ret.append(toScript(PropertyUtils.getProperty(obj, key)));
+				first = false;
+			}
+			return ret.append("} ").toString();
+		} catch (Exception e) {
+			throw new FacesException(
+					"Error in conversion Java Object to JavaScript", e);
+		}
+	}
+
+	public static void addEncodedString(StringBuffer buff, Object obj) {
+		buff.append("'");
+		addEncoded(buff, obj);
+		buff.append("'");
+
+	}
+
+	public static void addEncoded(StringBuffer buff, Object obj) {
+		JSEncoder encoder = new JSEncoder();
+		char chars[] = obj.toString().toCharArray();
+		for (int i = 0; i < chars.length; i++) {
+			char c = chars[i];
+			if (!encoder.compile(c)) {
+				buff.append(encoder.encode(c));
+			} else {
+				buff.append(c);
+			}
+		}
+	}
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/message/Messages.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/message/Messages.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/message/Messages.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,312 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.util.message;
+
+import java.text.MessageFormat;
+import java.util.ResourceBundle;
+
+public class Messages {
+	private static final String BUNDLE_NAME = "org.ajax4jsf.framework.util.message.messages";
+	static ResourceBundle bundle = ResourceBundle.getBundle(BUNDLE_NAME);
+	
+	public static final String getMessage(String name) {
+		String value = bundle.getString(name);
+		return value == null ? "%" + name + "%" : bundle.getString(name);
+	}
+	
+	public static final String getMessage(String name, Object param) {
+		String pattern = bundle.getString(name);
+		if(pattern == null) return "%" + name + "%";
+		return MessageFormat.format(pattern, new Object[]{param});
+	}
+	
+	public static final String getMessage(String name, Object param1, Object param2) {
+		String pattern = bundle.getString(name);
+		if(pattern == null) return "%" + name + "%";
+		return MessageFormat.format(pattern, new Object[]{param1, param2});
+	}
+	
+	public static final String getMessage(String name, Object[] params) {
+		String pattern = bundle.getString(name);
+		if(pattern == null) return "%" + name + "%";
+		return MessageFormat.format(pattern, params);
+	}
+	
+	public static final String BUNDLE_MAP_NO_PUT_VALUE = "BUNDLE_MAP_NO_PUT_VALUE";
+	public static final String BUNDLE_MAP_NO_REMOVE_VALUE = "BUNDLE_MAP_NO_REMOVE_VALUE";	
+	public static final String NO_CONVERTER_REGISTERED = "NO_CONVERTER_REGISTERED";
+	public static final String FOR_TARGETS_NO_AJAX_CONTAINER = "FOR_TARGETS_NO_AJAX_CONTAINER";
+	public static final String VAR_MUST_BE_LITERAL = "VAR_MUST_BE_LITERAL";
+	public static final String EVENT_MUST_BE_LITERAL = "EVENT_MUST_BE_LITERAL";
+	public static final String CREATE_JAVASCRIPT_EVENT = "CREATE_JAVASCRIPT_EVENT";
+	public static final String CALLED_SET_PARENT = "CALLED_SET_PARENT";
+	public static final String DETECT_NEW_COMPONENT = "DETECT_NEW_COMPONENT";
+	public static final String SET_VALUE_BINDING_FOR_EVENT = "SET_VALUE_BINDING_FOR_EVENT";
+	public static final String COULD_NOT_LOAD_RESOURCE_BUNDLE = "COULD_NOT_LOAD_RESOURCE_BUNDLE";
+	public static final String FACES_CONTEXT_NOT_CREATED = "FACES_CONTEXT_NOT_CREATED";
+	public static final String FACES_CONTEXT_HAS_NOT_EXTERNAL = "FACES_CONTEXT_HAS_NOT_EXTERNAL";
+	public static final String FACES_CONTEXT_HAS_NOT_RESPONSE = "FACES_CONTEXT_HAS_NOT_RESPONSE";
+	public static final String CREATE_ALTERNATE_HANDLER = "CREATE_ALTERNATE_HANDLER";
+	public static final String ALTERNATE_HANDLER_CONSTRUCTOR_WARNING = "ALTERNATE_HANDLER_CONSTRUCTOR_WARNING";
+	public static final String VIEW_HANDLER_INSTANTIATION_ERROR = "VIEW_HANDLER_INSTANTIATION_ERROR";
+	public static final String ERROR_ON_PAGE = "ERROR_ON_PAGE";
+	public static final String LIFECYCLE_ERROR = "LIFECYCLE_ERROR";
+	public static final String LIFECYCLE_ERROR_AT_PHASE = "LIFECYCLE_ERROR_AT_PHASE";
+	public static final String COMPONENT_TREE_NOT_CREATED = "COMPONENT_TREE_NOT_CREATED";
+	public static final String SET_AJAX_LISTENER = "SET_AJAX_LISTENER";
+	public static final String ADD_AJAX_AREA = "ADD_AJAX_AREA";
+	public static final String ADD_AJAX_AREAS = "ADD_AJAX_AREAS";
+	public static final String SET_AJAX_REQUEST = "SET_AJAX_REQUEST";
+	public static final String SUBMITTED_AJAX_REQUEST = "SUBMITTED_AJAX_REQUEST";
+	public static final String SEND_EVENT_TO_AJAX_LISTENER = "SEND_EVENT_TO_AJAX_LISTENER";
+	public static final String RENDER_AJAX_REQUEST = "RENDER_AJAX_REQUEST";
+	public static final String RENDERING_AJAX_REGION_ERROR = "RENDERING_AJAX_REGION_ERROR";
+	public static final String RESTORE_AJAX_COMPONENT_STATE = "RESTORE_AJAX_COMPONENT_STATE";
+	public static final String SAVE_AJAX_COMPONENT_STATE = "SAVE_AJAX_COMPONENT_STATE";
+	public static final String CREATE_AJAX_AREAS_SET_TO_RENDER = "CREATE_AJAX_AREAS_SET_TO_RENDER";
+	public static final String ARGUMENT_IS_NOT_AJAX_REGION_ERROR = "ARGUMENT_IS_NOT_AJAX_REGION_ERROR";
+	public static final String NULL_EVENT_SUBMITTED_ERROR = "NULL_EVENT_SUBMITTED_ERROR";
+	public static final String CONTENT_TYPE_ENCODING = "CONTENT_TYPE_ENCODING";
+	public static final String CONTENT_TYPE_NO_ENCODING = "CONTENT_TYPE_NO_ENCODING";
+	public static final String FILTER_START_INFO = "FILTER_START_INFO";
+	public static final String FILTER_XML_OUTPUT = "FILTER_XML_OUTPUT";
+	public static final String FILTER_NO_XML_CHAIN = "FILTER_NO_XML_CHAIN";
+	public static final String FILTER_NO_XML_CHAIN_2 = "FILTER_NO_XML_CHAIN_2";
+	public static final String FILTER_STOP_INFO = "FILTER_STOP_INFO";
+	public static final String PARSER_NOT_INSTANTIATED_ERROR = "PARSER_NOT_INSTANTIATED_ERROR";
+	public static final String PARSING_TIME_INFO = "PARSING_TIME_INFO";
+	public static final String JTIDY_PARSING_ERROR = "JTIDY_PARSING_ERROR";
+	public static final String COMPONENT_NOT_FOUND = "COMPONENT_NOT_FOUND";
+	public static final String EVENT_IS_READ_ONLY = "EVENT_IS_READ_ONLY";
+	public static final String FLUSH_BUFFERED_STREAM_ERROR = "FLUSH_BUFFERED_STREAM_ERROR";
+	public static final String UNSUPPORTED_ENCODING_WARNING = "UNSUPPORTED_ENCODING_WARNING";
+	public static final String UNSUPPORTED_ENCODING_WARNING_2 = "UNSUPPORTED_ENCODING_WARNING_2";
+	public static final String NO_WRITER_CALLED_INFO = "NO_WRITER_CALLED_INFO";
+	public static final String PARSE_XML_DOCUMENT_INFO = "PARSE_XML_DOCUMENT_INFO";
+	public static final String NO_WRITER_POSSIBLE_ERROR = "NO_WRITER_POSSIBLE_ERROR";
+	public static final String CREATE_WRITER_INFO = "CREATE_WRITER_INFO";
+	public static final String NO_STREAM_POSSIBLE_ERROR = "NO_STREAM_POSSIBLE_ERROR";
+	public static final String CREATE_STREAM_INFO = "CREATE_STREAM_INFO";
+	public static final String OPEN_CLOSE_TAGS_DO_NOT_MATCH_ERROR = "OPEN_CLOSE_TAGS_DO_NOT_MATCH_ERROR";
+	public static final String VARIABLE_SUBSTITUTION_WARNING = "VARIABLE_SUBSTITUTION_WARNING";
+	public static final String START_DOCUMENT_SAX_EXCEPTION = "START_DOCUMENT_SAX_EXCEPTION";
+	public static final String COMMENT_SAX_EXCEPTION = "COMMENT_SAX_EXCEPTION";
+	public static final String END_ELEMENT_SAX_EXCEPTION = "END_ELEMENT_SAX_EXCEPTION";
+	public static final String END_DOCUMENT_SAX_EXCEPTION = "END_DOCUMENT_SAX_EXCEPTION";
+	public static final String START_ELEMENT_SAX_EXCEPTION = "START_ELEMENT_SAX_EXCEPTION";
+	public static final String TEXT_SAX_EXCEPTION = "TEXT_SAX_EXCEPTION";
+	public static final String MESSAGE_PARSING_INFO = "MESSAGE_PARSING_INFO";
+	public static final String CREATE_JTIDY_INFO = "CREATE_JTIDY_INFO";
+	public static final String READING_TIDY_PROPERTIES_ERROR = "READING_TIDY_PROPERTIES_ERROR";
+	public static final String ILLEGAL_METHOD_STATE = "ILLEGAL_METHOD_STATE";
+	public static final String WRAPPED_RULES_NULL_ERROR = "WRAPPED_RULES_NULL_ERROR";
+	public static final String NO_NAME_ATTRIBUTE_ERROR = "NO_NAME_ATTRIBUTE_ERROR";
+	public static final String ENCODE_COMPILED_TEMPLATE_INFO = "ENCODE_COMPILED_TEMPLATE_INFO";
+	public static final String ENCODING_TEMPLATE_TERMINATED_INFO = "ENCODING_TEMPLATE_TERMINATED_INFO";
+	public static final String ENCODE_COMPILED_TEMPLATE_INFO2 = "ENCODE_COMPILED_TEMPLATE_INFO2";
+	public static final String CONVERTING_NON_VALUE_HOLDER_COMPONENT_ERROR = "CONVERTING_NON_VALUE_HOLDER_COMPONENT_ERROR";
+	public static final String COMPONENT_CLASS_ERROR = "COMPONENT_CLASS_ERROR";
+	public static final String CONTEXT_NULL_ERROR = "CONTEXT_NULL_ERROR";
+	public static final String COMPONENT_NULL_ERROR = "COMPONENT_NULL_ERROR";
+	public static final String START_DECODING_COMPONENT_INFO = "START_DECODING_COMPONENT_INFO";
+	public static final String START_ENCODING_COMPONENT_INFO = "START_ENCODING_COMPONENT_INFO";
+	public static final String CHILDREN_ENCODING_COMPONENT_INFO = "CHILDREN_ENCODING_COMPONENT_INFO";
+	public static final String FINISH_ENCODING_COMPONENT_INFO = "FINISH_ENCODING_COMPONENT_INFO";
+	public static final String NAMESPACE_NOT_RECOGNIZED_ERROR = "NAMESPACE_NOT_RECOGNIZED_ERROR";
+	public static final String RENDERER_METHOD_NOT_SET_ERROR = "RENDERER_METHOD_NOT_SET_ERROR";
+	public static final String METHOD_CALL_ERROR_1 = "METHOD_CALL_ERROR_1";
+	public static final String METHOD_CALL_ERROR_2 = "METHOD_CALL_ERROR_2";
+	public static final String METHOD_CALL_ERROR_3 = "METHOD_CALL_ERROR_3";
+	public static final String METHOD_CALL_ERROR_4 = "METHOD_CALL_ERROR_4";
+	public static final String METHOD_CALL_ERROR_5 = "METHOD_CALL_ERROR_5";
+	public static final String METHOD_CALL_ERROR_6 = "METHOD_CALL_ERROR_6";
+	public static final String METHOD_CALL_ERROR_1a = "METHOD_CALL_ERROR_1a";
+	public static final String METHOD_CALL_ERROR_2a = "METHOD_CALL_ERROR_2a";
+	public static final String METHOD_CALL_ERROR_3a = "METHOD_CALL_ERROR_3a";
+	public static final String METHOD_CALL_ERROR_4a = "METHOD_CALL_ERROR_4a";
+	public static final String METHOD_CALL_ERROR_5a = "METHOD_CALL_ERROR_5a";
+	public static final String METHOD_CALL_ERROR_6a = "METHOD_CALL_ERROR_6a";
+	public static final String PARSING_TEMPLATE_ERROR = "PARSING_TEMPLATE_ERROR";
+	public static final String TEMPLATE_IO_ERROR = "TEMPLATE_IO_ERROR";
+	public static final String PARSING_TEMPLATE_ERROR_2 = "PARSING_TEMPLATE_ERROR_2";
+	public static final String START_COMPILE_TEMPLATE_INFO = "START_COMPILE_TEMPLATE_INFO";
+	public static final String PARSING_TEMPLATE_ERROR_a = "PARSING_TEMPLATE_ERROR_a";
+	public static final String TEMPLATE_IO_ERROR_a = "TEMPLATE_IO_ERROR_a";
+	public static final String PARSING_TEMPLATE_ERROR_2a = "PARSING_TEMPLATE_ERROR_2a";
+	public static final String FINISH_COMPILE_TEMPLATE_INFO = "FINISH_COMPILE_TEMPLATE_INFO";
+	public static final String TEMPLATE_NOT_COMPILED_ERROR = "TEMPLATE_NOT_COMPILED_ERROR";
+	public static final String NO_CHILD_ALLOWED = "NO_CHILD_ALLOWED";
+	public static final String NO_FACET_NAME_ATTRIBUTE = "NO_FACET_NAME_ATTRIBUTE";
+	public static final String BREAKPOINTS_UNSUPPORTED_ERROR = "BREAKPOINTS_UNSUPPORTED_ERROR";
+	public static final String BREAKPOINT_NOT_REGISTERED_ERROR = "BREAKPOINT_NOT_REGISTERED_ERROR";
+	public static final String CHILD_NOT_ALLOWED_ERROR = "CHILD_NOT_ALLOWED_ERROR";
+	public static final String INVOKE_RENDERER_METHOD_ERROR = "INVOKE_RENDERER_METHOD_ERROR";
+	public static final String METHOD_CALL_ERROR_2b = "METHOD_CALL_ERROR_2b";
+	public static final String METHOD_CALL_ERROR_4b = "METHOD_CALL_ERROR_4b";
+	public static final String METHOD_CALL_ERROR_6b = "METHOD_CALL_ERROR_6b";
+	public static final String STYLE_ATTRIBUTE_ERROR = "STYLE_ATTRIBUTE_ERROR";
+	public static final String BREAKPOINTS_UNSUPPORTED_ERROR_2 = "BREAKPOINTS_UNSUPPORTED_ERROR_2";
+	public static final String BREAKPOINTS_UNSUPPORTED_ERROR_3 = "BREAKPOINTS_UNSUPPORTED_ERROR_3";
+	public static final String REQUEST_CHAMELEON_RENDER_KIT_INFO = "REQUEST_CHAMELEON_RENDER_KIT_INFO";
+	public static final String GET_DEFAULT_RENDER_KIT_ERROR = "GET_DEFAULT_RENDER_KIT_ERROR";
+	public static final String DEFAULT_RENDER_KIT_INFO = "DEFAULT_RENDER_KIT_INFO";
+	public static final String AJAX_RESPONSE_NOT_RENDERED_INFO = "AJAX_RESPONSE_NOT_RENDERED_INFO";
+	public static final String ENTER_BEFORE_RENDER_VIEW_PHASE = "ENTER_BEFORE_RENDER_VIEW_PHASE";
+	public static final String SET_RENDER_KIT_ID_INFO = "SET_RENDER_KIT_ID_INFO";
+	public static final String PROCESS_AJAX_EVENTS_INFO = "PROCESS_AJAX_EVENTS_INFO";
+	public static final String DELEGATE_AJAX_PROCESSING_INFO = "DELEGATE_AJAX_PROCESSING_INFO";
+	public static final String BREAKPOINTS_UNSUPPORTED_INSIDE_ATTRIBUTE_ERROR = "BREAKPOINTS_UNSUPPORTED_INSIDE_ATTRIBUTE_ERROR";
+	public static final String BUILD_ONCLICK_INFO = "BUILD_ONCLICK_INFO";
+	public static final String UNNAMED_PARAMETER_ERROR = "UNNAMED_PARAMETER_ERROR";
+	public static final String AJAX_STATUS_COMPONENT_NOT_FOWND_WARNING = "AJAX_STATUS_COMPONENT_NOT_FOWND_WARNING";
+	public static final String COMPONENT_NULL_ERROR_2 = "COMPONENT_NULL_ERROR_2";
+	public static final String CALCULATE_COMPONENT_ID_INFO = "CALCULATE_COMPONENT_ID_INFO";
+	public static final String DETECTING_ENCODING_DISABLED_ERROR = "DETECTING_ENCODING_DISABLED_ERROR";
+	public static final String OBTAIN_RESPONSE_SET_HEADER_ERROR = "OBTAIN_RESPONSE_SET_HEADER_ERROR";
+	public static final String INVOKE_AJAX_REGION_LISTENER = "INVOKE_AJAX_REGION_LISTENER";
+	public static final String APPENDING_AJAX_REGION_TO_NON_AJAX_CONTAINER_WARNING = "APPENDING_AJAX_REGION_TO_NON_AJAX_CONTAINER_WARNING";
+	public static final String RENDER_CHILDREN_NON_AJAX_INFO = "RENDER_CHILDREN_NON_AJAX_INFO";
+	public static final String RENDER_CHILDREN_AJAX_INFO = "RENDER_CHILDREN_AJAX_INFO";
+	public static final String ENCODE_CHILD_AJAX_INFO = "ENCODE_CHILD_AJAX_INFO";
+	public static final String RENDER_AJAX_AREA_INFO = "RENDER_AJAX_AREA_INFO";
+	public static final String DECODE_AJAX_REQUEST_STATUS_INFO = "DECODE_AJAX_REQUEST_STATUS_INFO";
+	public static final String REQUEST_PARAMETERS_MAP = "REQUEST_PARAMETERS_MAP";
+	public static final String SET_MYFACES_SEQUENCE_INFO = "SET_MYFACES_SEQUENCE_INFO";
+	public static final String SKIP_ENCODING_HTML_INFO = "SKIP_ENCODING_HTML_INFO";
+	public static final String SKIP_ENCODE_BEGIN_HTML_INFO = "SKIP_ENCODE_BEGIN_HTML_INFO";
+	public static final String SKIP_ENCODE_END_HTML_INFO = "SKIP_ENCODE_END_HTML_INFO";
+	public static final String QUERY_STRING_BUILDING_ERROR = "QUERY_STRING_BUILDING_ERROR";
+	public static final String BUILD_RESOURCE_URI_INFO = "BUILD_RESOURCE_URI_INFO";
+	public static final String RESTORE_DATA_FROM_RESOURCE_URI_INFO = "RESTORE_DATA_FROM_RESOURCE_URI_INFO";
+	public static final String DESERIALIZE_DATA_INPUT_ERROR = "DESERIALIZE_DATA_INPUT_ERROR";
+	public static final String DATA_CLASS_NOT_FOUND_ERROR = "DATA_CLASS_NOT_FOUND_ERROR";
+	public static final String METHOD_NOT_IMPLEMENTED = "METHOD_NOT_IMPLEMENTED";
+	public static final String ENCODE_HTML_INFO = "ENCODE_HTML_INFO";
+	public static final String ENCODE_HTML_INFO_2 = "ENCODE_HTML_INFO_2";
+	public static final String ENCODE_BEGIN_HTML_INFO = "ENCODE_BEGIN_HTML_INFO";
+	public static final String ENCODE_END_HTML_INFO = "ENCODE_END_HTML_INFO";
+	public static final String SEND_CONTENT_INFO = "SEND_CONTENT_INFO";
+	public static final String NO_INPUT_STREAM_ERROR = "NO_INPUT_STREAM_ERROR";
+	public static final String SET_RESPONSE_HEADERS_INFO = "SET_RESPONSE_HEADERS_INFO";
+	public static final String BUILD_RESOURCE_INFO = "BUILD_RESOURCE_INFO";
+	public static final String NO_RESOURCE_REGISTERED_ERROR = "NO_RESOURCE_REGISTERED_ERROR";
+	public static final String NO_RESOURCE_REGISTERED_ERROR_2 = "NO_RESOURCE_REGISTERED_ERROR_2";
+	public static final String NO_RESOURCE_EXISTS_ERROR = "NO_RESOURCE_EXISTS_ERROR";
+	public static final String INSTANTIATE_RESOURCE_ERROR = "INSTANTIATE_RESOURCE_ERROR";
+	public static final String INSTANTIATE_CLASS_ERROR = "INSTANTIATE_CLASS_ERROR";
+	public static final String STATIC_RESOURCE_NOT_FOUND_ERROR = "STATIC_RESOURCE_NOT_FOUND_ERROR";
+	public static final String PARSING_IF_MODIFIED_SINCE_WARNING = "PARSING_IF_MODIFIED_SINCE_WARNING";
+	public static final String GET_CONTENT_FROM_CACHE_INFO = "GET_CONTENT_FROM_CACHE_INFO";
+	public static final String CONTENT_NOT_FOUND_ERROR = "CONTENT_NOT_FOUND_ERROR";
+	public static final String SEND_RESOURCE_ERROR = "SEND_RESOURCE_ERROR";
+	public static final String SEND_RESOURCE_ERROR_2 = "SEND_RESOURCE_ERROR_2";
+	public static final String READING_PROPERTIES_ERROR = "READING_PROPERTIES_ERROR";
+	public static final String SEND_IMAGE_ERROR = "SEND_IMAGE_ERROR";
+	public static final String SEND_IMAGE_ERROR_2 = "SEND_IMAGE_ERROR_2";
+	public static final String SKIP_ENCODE_BEGIN_HTML_INFO_2 = "SKIP_ENCODE_BEGIN_HTML_INFO_2";
+	public static final String MARK_AS_RENDERED_INFO = "MARK_AS_RENDERED_INFO";
+	public static final String SKIP_ENCODE_END_HTML_INFO_2 = "SKIP_ENCODE_END_HTML_INFO_2";
+	public static final String VARIABLE_SUBSTITUTION_ERROR = "VARIABLE_SUBSTITUTION_ERROR";
+	public static final String SET_SKIN_FACTORY_INFO = "SET_SKIN_FACTORY_INFO";
+	public static final String CREATING_SKIN_FACTORY_ERROR = "CREATING_SKIN_FACTORY_ERROR";
+	public static final String NULL_SKIN_NAME_ERROR = "NULL_SKIN_NAME_ERROR";
+	public static final String CREATE_SKIN_INFO = "CREATE_SKIN_INFO";
+	public static final String DEFAULT_PROPERTIES_NOT_FOUND_ERROR = "DEFAULT_PROPERTIES_NOT_FOUND_ERROR";
+	public static final String SKIN_PROPERTIES_IO_ERROR = "SKIN_PROPERTIES_IO_ERROR";
+	public static final String SKIN_NOT_FOUND_ERROR = "SKIN_NOT_FOUND_ERROR";
+	public static final String ACESSING_SKIN_PROPERTY_AS_ARRAY_ERROR = "ACESSING_SKIN_PROPERTY_AS_ARRAY_ERROR";
+	public static final String ACESSING_SKIN_PROPERTY_ERROR = "ACESSING_SKIN_PROPERTY_ERROR";
+	public static final String SKIN_PROPERTIES_READ_ONLY_ERROR = "SKIN_PROPERTIES_READ_ONLY_ERROR";
+	public static final String NO_VALUE_HOLDER_ERROR = "NO_VALUE_HOLDER_ERROR";
+	public static final String NO_EDITABLE_VALUE_HOLDER_ERROR = "NO_EDITABLE_VALUE_HOLDER_ERROR";
+	public static final String INVALID_VALIDATION_EXPRESSION = "INVALID_VALIDATION_EXPRESSION";
+	public static final String NO_ACTION_SOURCE_ERROR = "NO_ACTION_SOURCE_ERROR";
+	public static final String INVALID_ACTION_LISTENER = "INVALID_ACTION_LISTENER";
+	public static final String INVALID_VALUE_CHANGE_LISTENER = "INVALID_VALUE_CHANGE_LISTENER";
+	public static final String NO_VALUE_REFERENCE_ERROR = "NO_VALUE_REFERENCE_ERROR";
+	public static final String NO_BYTE_ARRAY_ERROR = "NO_BYTE_ARRAY_ERROR";
+	public static final String BUFFER_TYPE_ERROR = "BUFFER_TYPE_ERROR";
+	public static final String IMAGE_ERROR = "IMAGE_ERROR";
+	public static final String CANNOT_WRITE_RASTERS = "CANNOT_WRITE_RASTERS";
+	public static final String NULL_OUTPUT_ERROR = "NULL_OUTPUT_ERROR";
+	public static final String IMAGE_NOT_BUFFERED_ERROR = "IMAGE_NOT_BUFFERED_ERROR";
+	public static final String NOT_DATA_OUTPUT_ERROR = "NOT_DATA_OUTPUT_ERROR";
+	public static final String NULL_COLOR_PARAMETER_ERROR = "NULL_COLOR_PARAMETER_ERROR";
+	public static final String DECODE_COLOR_PARAMETER_ERROR = "DECODE_COLOR_PARAMETER_ERROR";
+	public static final String NULL_COLOR_PARAMETER_ERROR_2 = "NULL_COLOR_PARAMETER_ERROR_2";
+	public static final String DECODE_PARAMETER_ERROR = "DECODE_PARAMETER_ERROR";
+	public static final String IMAGE_GENERATOR_CLASS_NOT_FOUND = "IMAGE_GENERATOR_CLASS_NOT_FOUND";
+	public static final String CREATING_IMAGE_GENERATOR_ERROR = "CREATING_IMAGE_GENERATOR_ERROR";
+	public static final String INVALID_COMMENT_INDEX = "INVALID_COMMENT_INDEX";
+	public static final String LOADING_IMAGE_ERROR = "LOADING_IMAGE_ERROR";
+	public static final String NOT_INDEXED_IMAGE_ERROR = "NOT_INDEXED_IMAGE_ERROR";
+	public static final String INVALID_RADIUS = "INVALID_RADIUS";
+	public static final String INVALID_ATTRIBUTE_VALUE = "INVALID_ATTRIBUTE_VALUE";
+	public static final String VALUE_BINDING_TYPE_ERROR = "VALUE_BINDING_TYPE_ERROR";
+	public static final String NO_CONVERTER_FOUND_ERROR = "NO_CONVERTER_FOUND_ERROR";
+	public static final String GRABBER_ERROR = "GRABBER_ERROR";
+	public static final String TOOMANY_COLORS_ERROR = "TOOMANY_COLORS_ERROR";
+	public static final String GET_RESOURCE_AS_STREAM_ERROR = "GET_RESOURCE_AS_STREAM_ERROR";
+	public static final String PARSING_WEB_XML_IO_ERROR = "PARSING_WEB_XML_IO_ERROR";
+	public static final String PARSING_WEB_XML_SAX_ERROR = "PARSING_WEB_XML_SAX_ERROR";
+	public static final String NULL_FILTER_NAME_WARNING = "NULL_FILTER_NAME_WARNING";
+	public static final String FILTER_NOT_FOUND_ERROR = "FILTER_NOT_FOUND_ERROR";
+	public static final String FILTER_NOT_CONFIGURED_ERROR = "FILTER_NOT_CONFIGURED_ERROR";
+	public static final String NO_PREFIX_OR_SUFFIX_IN_FILTER_MAPPING_ERROR = "NO_PREFIX_OR_SUFFIX_IN_FILTER_MAPPING_ERROR";
+	public static final String CONFIG_INITIALIZATION_ERROR = "CONFIG_INITIALIZATION_ERROR";
+	public static final String FIELD_READING_ERROR = "FIELD_READING_ERROR";
+	public static final String CONFIG_INITIALIZATION_ERROR_2 = "CONFIG_INITIALIZATION_ERROR_2";
+	public static final String DOM_METHOD_NOT_SUPPORTED = "DOM_METHOD_NOT_SUPPORTED";
+	public static final String METHOD_NOT_SUPPORTED = "METHOD_NOT_SUPPORTED";
+	public static final String NAMED_ITEM_NOT_FOUND_ERROR = "NAMED_ITEM_NOT_FOUND_ERROR";
+	public static final String AJAX_SUPPORT_REQUEST_PARAMETER_INFO = "AJAX_SUPPORT_REQUEST_PARAMETER_INFO";
+	public static final String COMMAND_LINK_SUBMIT_INFO = "COMMAND_LINK_SUBMIT_INFO";
+	public static final String COMMAND_LINK_NOT_IN_FORM_WARNING = "COMMAND_LINK_NOT_IN_FORM_WARNING";
+	public static final String MUST_BE_EXPRESSION_ERROR = "MUST_BE_EXPRESSION_ERROR";
+	public static final String NOT_PARENT_AJAX_CONTAINER_ERROR = "NOT_PARENT_AJAX_CONTAINER_ERROR";
+	public static final String MUST_BE_LITERAL_ERROR = "MUST_BE_LITERAL_ERROR";
+	public static final String FACET_TAG_MANY_CHILDREN_ERROR = "FACET_TAG_MANY_CHILDREN_ERROR";
+	public static final String NO_UI_COMPONENT_TAG_ANCESTOR_ERROR = "NO_UI_COMPONENT_TAG_ANCESTOR_ERROR";
+	public static final String NO_VALUE_REFERENCE_ERROR_2 = "NO_VALUE_REFERENCE_ERROR_2";
+	public static final String NULL_TYPE_ATTRIBUTE_ERROR = "NULL_TYPE_ATTRIBUTE_ERROR";
+	public static final String NULL_ATTRIBUTE_ERROR = "NULL_ATTRIBUTE_ERROR";
+	public static final String AJAX_VIEW_EXPIRED = "AJAX_VIEW_EXPIRED";
+	public static final String SKIN_CYCLIC_REFERENCE = "SKIN_CYCLIC_REFERENCE";
+	public static final String SKIN_ILLEGAL_REFERENCE = "SKIN_ILLEGAL_REFERENCE";
+	public static final String NAME_MUST_BE_LITERAL = "NAME_MUST_BE_LITERAL";
+    public static final String INSTANTIATE_LISTENER_ERROR = "INSTANTIATE_LISTENER_ERROR";
+	public static final String NOT_AJAX_CONTAINER_ERROR = "NOT_AJAX_CONTAINER_ERROR";
+	public static final String INVALID_EXPRESSION = "INVALID_EXPRESSION";
+	public static final String NOT_INSTANCE_OF_ERROR = "NOT_INSTANCE_OF_ERROR";
+	public static final String UNSUPPORTED_ENCODING_ERROR = "UNSUPPORTED_ENCODING_ERROR";
+	public static final String UNSUPPORTED_INPUT_SOURCE_ERROR = "UNSUPPORTED_INPUT_SOURCE_ERROR";
+	public static final String STRING_CONVERSION_ERROR = "STRING_CONVERSION_ERROR";
+	public static final String UTF_CONVERSION_ERROR = "UTF_CONVERSION_ERROR";
+	public static final String READ_ONLY_NODE_ERROR = "READ_ONLY_NODE_ERROR";
+	public static final String NOT_PARENT_AJAX_COMPONENT_ERROR = "NOT_PARENT_AJAX_COMPONENT_ERROR";
+	
+	public static void main(String[] args) {
+		String m = getMessage(INVALID_ATTRIBUTE_VALUE, "A", "B");
+		System.out.println(m);
+	}
+	
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/style/CSSFormat.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/style/CSSFormat.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/style/CSSFormat.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,134 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.util.style;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+/**
+ * Simple utility class for CSS style formatting
+ * Current version isn't thread-safe and doesn't provide any validation
+ * 
+ * Usage is simle
+ * <code>
+ * 	CSSFormat format = new CSSFormat();
+ * 	format.add("background-position", "top left");
+ * 	format.addURL("background-image", "/images/corner.gif");
+ * 	responseWriter.writeAttribute("style", format, null);
+ * </code>
+ * 
+ * @author Maksim Kaszynski
+ *
+ */
+public class CSSFormat {
+
+	
+	/**
+	 * Surrounds given URL with <code>url()</code>
+	 * @param url
+	 * @return
+	 */
+	public static String url(String url){
+		StringBuffer buf = new StringBuffer(url.length() + 7);
+		//escape url according to http://www.w3.org/TR/REC-CSS1#url
+		buf.append("url(").append(url.replaceAll("([\\)\\(\\s,\'\"])", "\\\\$1")).append(")");
+		return buf.toString();
+	}
+	/**
+	 * Formats property-value pair in CSS fashion
+	 * @param property
+	 * @param value
+	 * @return
+	 */
+	public static String propertyValue(String property, String value){
+		return formatPropertyValue(property, value);
+	}
+	
+	private static String formatPropertyValue(Object property, Object value){
+		StringBuffer buf = new StringBuffer();
+		buf.append(property).append(": ").append(value).append(";");
+		return buf.toString();
+	}
+	
+	private Map properties;
+	/**
+	 * Constructs an empty CSSFormat object
+	 */
+	public CSSFormat() {
+		properties = new HashMap();
+	}
+	/**
+	 * Constructs CSSFormat object 
+	 * and fills it with given parameters
+	 * @param property
+	 * @param value
+	 */
+	public CSSFormat(String property, String value){
+		properties = new HashMap(3);
+		add(property, value);
+		
+	}
+	/**
+	 * Adds property. If such property already exists, 
+	 * its value is replaced with new one
+	 * @param property
+	 * @param value
+	 * @return itself
+	 */
+	public CSSFormat add(String property, String value){
+		properties.put(property, value);
+		return this;
+	}
+	/**
+	 * adds a property with URL value
+	 * given value is wrapped in <code>url()</code> clause
+	 * @param property
+	 * @param url
+	 * @return itself
+	 */
+	public CSSFormat addURL(String property, String url){
+		properties.put(property, url(url));
+		return this;
+	}
+	/**
+	 * Concatenates all properties with their values to produce single-line CSS output 
+	 */
+	public String toString() {
+		return concatenate(null);
+	}
+	/**
+	 * Concatenates all properties with their values to produce CSS output
+	 * @param separator - custom string to be inserted between properties
+	 * @return
+	 */
+	public String concatenate(String separator){
+		StringBuffer output = new StringBuffer();
+		for(Iterator iter = properties.entrySet().iterator(); iter.hasNext();){
+			Map.Entry entry = (Map.Entry) iter.next();
+			output.append(formatPropertyValue(entry.getKey(), entry.getValue()));
+			if(separator != null && iter.hasNext()){
+				output.append(separator);
+			}
+		}
+		return output.toString();
+	}
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/style/CSSSelector.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/style/CSSSelector.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/style/CSSSelector.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,50 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.util.style;
+
+/**
+ * @author Maksim Kaszynski
+ *
+ */
+public class CSSSelector {
+	private StringBuffer selectorBuffer;
+	public CSSSelector() {
+		selectorBuffer = new StringBuffer();
+	}
+	public CSSSelector(String selector){
+		this();
+		selectorBuffer.append(selector);
+	}
+	
+	public CSSSelector addSelector(String selector){
+		if(selector != null){
+			if(selectorBuffer.length() > 0){
+				selectorBuffer.append(' ');
+			}
+			selectorBuffer.append(selector);
+		}
+		return this;
+	}
+	public String toString() {
+		return selectorBuffer.toString();
+	}
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/style/FontFamily.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/style/FontFamily.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/framework/util/style/FontFamily.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,69 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.util.style;
+
+import java.awt.Font;
+import java.awt.GraphicsEnvironment;
+import java.util.Arrays;
+import java.util.StringTokenizer;
+
+/**
+ * @author Maksim Kaszynski
+ *
+ */
+public class FontFamily {
+	public static final String CSS_SANS_SERIF = "SANS-SERIF";
+	public static final String JAVA_SANS_SERIF = "SANSSERIF";
+	public static final String CSS_MONOSPACED = "MONOSPACE";
+	public static final String JAVA_MONOSPACED = "MONOSPACED";
+	
+	private static final String[] fontFamilies = GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames();
+	static{
+		for (int i = 0; i < fontFamilies.length; i++) {
+			fontFamilies[i] = fontFamilies[i].toUpperCase();
+			//System.out.println(fontFamilies[i]);
+		}
+		Arrays.sort(fontFamilies);
+	}
+	
+	public static Font getFont(String fontFamily, int style, int size){
+		String fontUsed = null;
+		StringTokenizer tokenizer = new StringTokenizer(fontFamily, ",");
+		while(tokenizer.hasMoreElements()){
+			String fontName = tokenizer.nextToken().trim().toUpperCase();
+			if(fontName.equals(CSS_SANS_SERIF)){
+				fontName = JAVA_SANS_SERIF;
+			} else if(fontName.equals(CSS_MONOSPACED)){
+				fontName = JAVA_MONOSPACED;
+			}
+			
+			if(Arrays.binarySearch(fontFamilies, fontName) >= 0){
+				fontUsed = fontName;
+			}
+		}
+		if(fontUsed == null){
+			fontUsed = JAVA_SANS_SERIF;
+		}
+		Font f = new Font(fontUsed, style, size);
+		return f;
+	}
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/ByteBuffer.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/ByteBuffer.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/ByteBuffer.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,208 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.io;
+
+import java.io.UnsupportedEncodingException;
+
+/**
+ * A single link in chain of byte arrays. 
+ * @author glory
+ */
+public class ByteBuffer {
+	private ByteBuffer prev;
+	private ByteBuffer next;
+
+	/**
+	 * Stored bytes
+	 */
+	private byte[] bytes;
+
+	/**
+	 * Length of byte array.
+	 */
+	private int cacheSize;
+
+	/**
+	 * Number of bytes stored in the array.
+	 */
+	private int usedSize;
+
+	/**
+	 * Creates instance of ByteBuffer with byte array of required length.
+	 * @param cacheSize length of byte array
+	 */	
+	public ByteBuffer(int cacheSize) {
+		bytes = new byte[cacheSize];
+		this.cacheSize = cacheSize;
+		usedSize = 0;
+	}
+	
+	/**
+	 * Creates instance of ByteBuffer already filled by bytes.
+	 * @param bytes
+	 */
+	public ByteBuffer(byte[] bytes) {
+		this.bytes = bytes;
+		usedSize = bytes.length;
+		cacheSize = usedSize;
+	}
+
+	/**
+	 * Appends byte to array if there are unfilled positions in it.
+	 * Otherwize creates next link in the chain, and appends the byte to it.
+	 * @param c
+	 * @return instance of ByteBuffer to which byte was appended.
+	 */	
+	public ByteBuffer append(byte c) {
+		if(next != null) {
+			return next.append(c);
+		}
+		if(usedSize < cacheSize) {
+			bytes[usedSize] = c;
+			usedSize++;
+			return this;
+		} else {
+			next = new ByteBuffer(cacheSize * 2);
+			next.prev = this;
+			return next.append(c);
+		}
+	}
+
+	/**
+	 * Appends segment of a byte array to array if there are unfilled positions in it.
+	 * Otherwize creates next link in the chain, and appends data to it.
+	 * @param c
+	 * @return instance of ByteBuffer to which byte array was appended.
+	 */	
+	public ByteBuffer append(byte[] bs, int off, int len) {
+		if(next != null) {
+			return append(bs, off, len);
+		}
+		if(len + usedSize <= cacheSize) {
+			System.arraycopy(bs, off, bytes, usedSize, len);
+			usedSize += len;
+			return this;
+		}
+		int av = cacheSize - usedSize;
+		if(av > 0) {
+			System.arraycopy(bs, off, bytes, usedSize, av);
+			usedSize += av;
+			off += av;
+			len -= av;
+		}
+		next = new ByteBuffer(cacheSize * 2);
+		next.prev = this;
+		return next.append(bs, off, len);
+	}
+
+	/**
+	 * Returns stored byte array.
+	 * @return stored byte array
+	 */	
+	public byte[] getBytes() {
+		return bytes;
+	}
+	
+	/**
+	 * Returns byte at index. No check is fulfilled to provide high speed.
+	 * @param index
+	 * @return
+	 */
+	public byte getByteAt(int index) {
+		return bytes[index];
+	}
+	
+	/**
+	 * Returns actual number of byte stored in this link.
+	 * @return
+	 */	
+	public int getUsedSize() {
+		return usedSize;
+	}
+	
+	/**
+	 * Returns capacity of this link.
+	 * @return
+	 */	
+	public int getCacheSize() {
+		return cacheSize;
+	}
+	
+	/**
+	 * Returns total number of bytes stored in this link and all its predecessors. 
+	 * @return
+	 */	
+	public int getTotalSize() {
+		return (prev == null) ? usedSize : prev.getTotalSize() + usedSize;
+	}
+	
+	/**
+	 * Returns the previous link in the chain.
+	 * @return
+	 */	
+	public ByteBuffer getPrevious() {
+		return prev;
+	}
+	
+	/**
+	 * Returns the next link in the chain.
+	 * @return
+	 */	
+	public ByteBuffer getNext() {
+		return next;
+	}
+	
+	/**
+	 * Sets the next link in the chain.
+	 * @param b
+	 */	
+	public void setNext(ByteBuffer b) {
+		next = b;
+		if(b != null) b.prev = this;
+	}
+	
+	/**
+	 * Transforms this instance to instance of CharBuffer (a link of chain of char arrays).
+	 * @param encoding
+	 * @return link of chain of char arrays
+	 * @throws UnsupportedEncodingException
+	 */
+	public CharBuffer toCharBuffer(String encoding) throws UnsupportedEncodingException {
+		String s;
+		if (null != encoding) {
+			s = new String(bytes, 0, usedSize, encoding);
+		} else {
+			s = new String(bytes, 0, usedSize);			
+		}
+		return new CharBuffer(s.toCharArray());
+	}
+
+	/**
+	 * Transforms this instance to instance of CharBuffer (a link of chain of char arrays).
+	 * @return link of chain of char arrays
+	 */
+	public CharBuffer toCharBuffer() {
+		String s = new String(bytes, 0, usedSize);
+		return new CharBuffer(s.toCharArray());
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/CharBuffer.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/CharBuffer.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/CharBuffer.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,203 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.io;
+
+import java.io.UnsupportedEncodingException;
+
+/**
+ * A single link in chain of char arrays. 
+ * @author glory
+ */
+public class CharBuffer {
+	private CharBuffer prev;
+	private CharBuffer next;
+	
+	/**
+	 * Stored characters
+	 */
+	private char[] chars;
+	
+	/**
+	 * Length of char array.
+	 */
+	private int cacheSize;
+	
+	/**
+	 * number of characters stored in the array.
+	 */
+	private int usedSize;
+	
+	/**
+	 * Creates instance of CharBuffer with char array of required length.
+	 * @param cacheSize length of char array
+	 */	
+	public CharBuffer(int cacheSize) {
+		this.cacheSize = cacheSize;
+		chars = new char[cacheSize];
+		usedSize = 0;
+	}
+	
+	/**
+	 * Creates instance of CharBuffer already filled by chars.
+	 * @param bytes
+	 */
+	public CharBuffer(char[] chars) {
+		this.chars = chars;
+		usedSize = chars.length;
+		cacheSize = usedSize;
+	}
+	
+	/**
+	 * Appends character to array chars if there are unfilled positions in it.
+	 * Otherwize creates next link in the chain, and appends the character to it.
+	 * @param c
+	 * @return instance of CharBuffer to which character was appended.
+	 */	
+	public CharBuffer append(char c) {
+		if(next != null) {
+			return next.append(c);
+		}
+		if(usedSize < cacheSize) {
+			chars[usedSize] = c;
+			usedSize++;
+			return this;
+		} else {
+			next = new CharBuffer(cacheSize * 2);
+			next.prev = this;
+			return next.append(c);
+		}
+	}
+	
+	/**
+	 * Appends segment of a char array to array if there are unfilled positions in it.
+	 * Otherwize creates next link in the chain, and appends data to it.
+	 * @param c
+	 * @return instance of CharBuffer to which char array was appended.
+	 */	
+	public CharBuffer append(char[] cs, int off, int len) {
+		if(next != null) {
+			return append(cs, off, len);
+		}
+		if(len + usedSize <= cacheSize) {
+			System.arraycopy(cs, off, chars, usedSize, len);
+			usedSize += len;
+			return this;
+		}
+		int av = cacheSize - usedSize;
+		if(av > 0) {
+			System.arraycopy(cs, off, chars, usedSize, av);
+			usedSize += av;
+			off += av;
+			len -= av;
+		}
+		next = new CharBuffer(cacheSize * 2);
+		next.prev = this;
+		return next.append(cs, off, len);
+	}
+
+	/**
+	 * Returns stored char array.
+	 * @return stored char array
+	 */	
+	public char[] getChars() {
+		return chars;
+	}
+
+	/**
+	 * Returns character at index. No check is fulfilled to provide high speed.
+	 * @param index
+	 * @return
+	 */
+	public char getCharAt(int index) {
+		return chars[index];
+	}
+	
+	/**
+	 * Returns actual number of characters stored in this link.
+	 * @return
+	 */	
+	public int getUsedSize() {
+		return usedSize;
+	}
+	
+	/**
+	 * Returns capacity of this link.
+	 * @return
+	 */	
+	public int getCacheSize() {
+		return cacheSize;
+	}
+	
+	/**
+	 * Returns total number of characters stored in this link and all its predecessors. 
+	 * @return
+	 */	
+	public int getTotalSize() {
+		return (prev == null) ? usedSize : prev.getTotalSize() + usedSize;
+	}
+	
+	/**
+	 * Returns the previous link in the chain.
+	 * @return
+	 */	
+	public CharBuffer getPrevious() {
+		return prev;
+	}
+	
+	/**
+	 * Returns the next link in the chain.
+	 * @return
+	 */	
+	public CharBuffer getNext() {
+		return next;
+	}
+	
+	/**
+	 * Sets the next link in the chain.
+	 * @param b
+	 */	
+	public void setNext(CharBuffer b) {
+		next = b;
+		if(b != null) b.prev = this;
+	}
+
+	/**
+	 * Transforms this instance to instance of ByteBuffer (a link of chain of byte arrays).
+	 * @param encoding
+	 * @return link of chain of byte arrays
+	 * @throws UnsupportedEncodingException
+	 */
+	public ByteBuffer toByteBuffer(String encoding) throws UnsupportedEncodingException {
+		byte[] bs = new String(chars, 0, usedSize).getBytes(encoding);
+		return new ByteBuffer(bs);
+	}
+
+	/**
+	 * Transforms this instance to instance of ByteBuffer (a link of chain of byte arrays).
+	 * @return link of chain of byte arrays
+	 */
+	public ByteBuffer toByteBuffer() {
+		byte[] bs = new String(chars, 0, usedSize).getBytes();
+		return new ByteBuffer(bs);
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/FastBufferInputStream.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/FastBufferInputStream.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/FastBufferInputStream.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,201 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.io;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+/**
+ * Class for reading from a byte array chain.
+ * 
+ * @author glory
+ *
+ */
+public class FastBufferInputStream extends InputStream {
+	/**
+	 * The first link in the chain of char arrays.
+	 */
+	ByteBuffer firstLink;
+	
+	/**
+	 * Currently read link.
+	 */
+	ByteBuffer current;
+	
+	/**
+	 * Position of next byte in current link.
+	 */
+	int index;
+	
+	int mark;
+	
+	/**
+	 * Creates instance of FastBufferInputStream.
+	 * @param stream
+	 */	
+	public FastBufferInputStream(FastBufferOutputStream stream) {
+		this.firstLink = stream.getFirstBuffer();
+		current = stream.getFirstBuffer();
+		index = 0;
+		mark = 0;
+	}
+	
+	/**
+	 * @see java.io.InputStream.read()
+	 */
+	public int read() throws IOException {
+		if(current == null) return -1;
+		if(current.getUsedSize() <= index) {
+			current = current.getNext();
+			if(current == null) return -1;
+			index = 0;
+		}
+		byte c = current.getByteAt(index);
+		index++;
+		return c;
+	}
+
+	/**
+	 * @see java.io.InputStream.read(byte b[])
+	 */
+	public int read(byte b[]) throws IOException {
+		if (b == null) {
+			throw new NullPointerException();
+		}
+		if(current == null) return -1;
+		int off = 0;
+		int len = b.length;
+		int actuallyRead = 0;
+		while(current != null && len > 0) {
+			int av = current.getUsedSize() - index;
+			if(av <= 0) {
+				current = current.getNext();
+				index = 0;
+				continue;
+			}
+			if(av > len) av = len;
+			System.arraycopy(current.getBytes(), index, b, off, av);
+			index += av;
+			off += av;
+			actuallyRead += av;
+			len -= av;
+		}
+		return actuallyRead == 0 ? -1 : actuallyRead;
+	}
+
+	/**
+	 * @see java.io.InputStream.read(byte b[], int off, int len)
+	 */
+	public int read(byte[] b, int off, int len) throws IOException {
+		if (b == null) {
+			throw new NullPointerException();
+		} else if ((off < 0) || (off > b.length) || (len < 0) ||
+				((off + len) > b.length) || ((off + len) < 0)) {
+			throw new IndexOutOfBoundsException();
+		} else if (len == 0) {
+			return 0;
+		}
+		if(current == null) return -1;
+
+		int actuallyRead = 0;
+		while(current != null && len > 0) {
+			int av = current.getUsedSize() - index;
+			if(av <= 0) {
+				current = current.getNext();
+				index = 0;
+				continue;
+			}
+			if(av > len) av = len;
+			System.arraycopy(current.getBytes(), index, b, off, av);
+			index += av;
+			off += av;
+			actuallyRead += av;
+			len -= av;
+		}
+		return actuallyRead == 0 ? -1 : actuallyRead;
+	}
+
+	/**
+	 * @see java.io.InputStream.available()
+	 */
+	public int available() throws IOException {
+		if(current == null) return 0;
+		ByteBuffer b = current;
+		int result = -index;
+		while(b != null) {
+			result += b.getUsedSize();
+			b = b.getNext();
+		}
+		return result;
+	}
+
+	/**
+	 * @see java.io.InputStream.mark()
+	 */
+	public void mark(int readAheadLimit) {
+		if(current == null) {
+			mark = 0;
+		} else {
+			mark = index;
+			ByteBuffer b = current.getPrevious();
+			if(b != null) mark += b.getTotalSize();
+		}
+	}
+	
+	/**
+	 * @see java.io.InputStream.reset()
+	 */
+	public void reset() {
+		if(current == null) current = firstLink;
+		int m = 0;
+		while(current != null && current.getUsedSize() + m <= mark) {
+			m += current.getUsedSize();
+			current = current.getNext();
+		}
+		if(current != null) {
+			index = mark - m;
+		}
+	}
+
+	/**
+	 * @see java.io.InputStream.skip()
+	 */
+	public long skip(long n) throws IOException {
+		long skipped = 0;
+		while(n > 0) {
+			if(current == null) return 0;
+			if(current.getUsedSize() - index <= n) {
+				index += n;
+				skipped += n;
+				break;
+			} else {
+				int dn = current.getUsedSize() - index;
+				skipped += dn;
+				n -= dn;
+				current = current.getNext();
+				index = 0;
+			}
+		}
+		return skipped;
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/FastBufferOutputStream.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/FastBufferOutputStream.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/FastBufferOutputStream.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,207 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.io;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.UnsupportedEncodingException;
+import java.io.Writer;
+
+/**
+ * Class for writing to chain of byte arrays extending OutputStream.
+ *  
+ * @author glory
+ *
+ */
+public class FastBufferOutputStream extends OutputStream {
+	/**
+	 * The beginning of the chain of byte arrays.
+	 */
+	ByteBuffer firstBuffer;
+	
+	/**
+	 * Currently filled link of the chain of byte arrays.
+	 */
+	ByteBuffer lastBuffer;
+	
+	/**
+	 * Total number of written bytes.
+	 */	
+	int length;
+	
+	/**
+	 * Creates instance of default initial capacity.
+	 */	
+	public FastBufferOutputStream() {
+		this(256);
+	}
+
+	/**
+	 * Creates instance with required initial capacity.
+	 * @param initialSize
+	 */
+	public FastBufferOutputStream(int initialSize) {
+		this(new ByteBuffer(initialSize));
+	}
+	
+	/**
+	 * Creates instance for an already existing chain of byte arrays.
+	 * @param firstBuffer
+	 */	
+	public FastBufferOutputStream(ByteBuffer firstBuffer) {
+		this.firstBuffer = firstBuffer;
+		this.lastBuffer = firstBuffer;
+	}
+	
+	/**
+	 * @see java.io.OutputStream.write(int c)
+	 */
+	public void write(int c) throws IOException {
+		lastBuffer = lastBuffer.append((byte)c);
+		length++;
+	}
+
+	/**
+	 * @see java.io.OutputStream.write(byte b[])
+	 */
+    public void write(byte b[]) throws IOException {
+    	if (b == null) {
+    		throw new NullPointerException();
+    	}
+    	int limit = b.length;
+    	length += limit;
+    	lastBuffer = lastBuffer.append(b, 0, limit);
+    }
+
+	/**
+	 * @see java.io.OutputStream.write(byte[] b, int off, int len)
+	 */
+    public void write(byte[] b, int off, int len) throws IOException {
+    	if (b == null) {
+    		throw new NullPointerException();
+    	} else if ((off < 0) || (off > b.length) || (len < 0) ||
+    			((off + len) > b.length) || ((off + len) < 0)) {
+    		throw new IndexOutOfBoundsException();
+    	} else if (len == 0) {
+    		return;
+    	}
+    	lastBuffer = lastBuffer.append(b, off, len);
+    	length += len;
+	}
+    
+    /**
+     * Returns the total number of written bytes.
+     * @return
+     */
+	public int getLength() {
+		return length;
+	}
+	
+	/**
+	 * Returns the first link of the chain of byte arrays.
+	 * @return
+	 */	
+	public ByteBuffer getFirstBuffer() {
+		return firstBuffer;
+	}
+	
+	public byte[] toByteArray() {
+		ByteBuffer b = getFirstBuffer();
+		if(b == null) return new byte[0];
+		ByteBuffer l = b;
+		while(l.getNext() != null) l = l.getNext();
+		byte[] result = new byte[l.getTotalSize()];
+		int index = 0;
+		while(b != null) {
+			int s = b.getUsedSize();
+			System.arraycopy(b.getBytes(), 0, result, index, s);
+			index += s;
+			b = b.getNext();
+		}		
+		return result;
+	}
+
+	/**
+	 * Writes all data written up to the moment to out.
+	 * @param out
+	 * @throws IOException
+	 */
+	public void writeTo(OutputStream out) throws IOException {
+		ByteBuffer b = getFirstBuffer();
+		while(b != null) {
+			out.write(b.getBytes(), 0, b.getUsedSize());
+			b = b.getNext();
+		}
+	}
+
+	/**
+	 * Writes all data written up to the moment to out.
+	 * @param out
+	 * @throws IOException
+	 */
+	public void writeTo(Writer out,String encoding) throws IOException {
+		ByteBuffer b = getFirstBuffer();
+		while(b != null) {
+			CharBuffer c = b.toCharBuffer(encoding);
+			out.write(c.getChars(), 0, c.getUsedSize());
+			b = b.getNext();
+		}
+	}
+	/**
+     * Returns instance of FastBufferWriter containing all data written to this output stream.
+	 * @param encoding
+	 * @return
+	 * @throws UnsupportedEncodingException
+	 */
+	public FastBufferWriter convertToWriter(String encoding) throws UnsupportedEncodingException {
+		ByteBuffer c = firstBuffer;
+		CharBuffer first = c.toCharBuffer(encoding);
+		CharBuffer b = first;
+		while(c != null) {
+			c = c.getNext();
+			if(c == null) break;
+			CharBuffer n = c.toCharBuffer(encoding);
+			b.setNext(n);
+			b = n;
+		}
+		return new FastBufferWriter(first);
+	}
+	
+	/**
+     * Returns instance of FastBufferWriter containing all data written to this output stream.
+	 * @return
+	 */
+	public FastBufferWriter convertToWriter() {
+		ByteBuffer c = firstBuffer;
+		CharBuffer first = c.toCharBuffer();
+		CharBuffer b = first;
+		while(c != null) {
+			c = c.getNext();
+			if(c == null) break;
+			CharBuffer n = c.toCharBuffer();
+			b.setNext(n);
+			b = n;
+		}
+		return new FastBufferWriter(first);
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/FastBufferReader.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/FastBufferReader.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/FastBufferReader.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,141 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.io;
+
+import java.io.IOException;
+import java.io.Reader;
+import java.io.Writer;
+
+/**
+ * Class for reading from a char array chain.
+ * 
+ * @author glory
+ *
+ */
+public class FastBufferReader extends Reader {
+	/**
+	 * The first link in the chain of char arrays.
+	 */
+	CharBuffer firstLink;
+
+	/**
+	 * Currently read link.
+	 */
+	CharBuffer current;
+
+	/**
+	 * Position of next char in current link.
+	 */
+	int index;
+	
+	/**
+	 * Creates instance for given writer.
+	 * @param writer
+	 */	
+	public FastBufferReader(FastBufferWriter writer) {
+		firstLink = writer.getFirstBuffer();
+		current = firstLink;
+		index = 0;
+	}
+
+	public void close() throws IOException {
+	}
+	
+	/**
+	 * @see java.io.Reader.read()
+	 */
+	public int read() throws IOException {
+		if(current == null) return -1;
+		if(current.getUsedSize() <= index) {
+			current = current.getNext();
+			if(current == null) return -1;
+			index = 0;
+		}
+		char c = current.getCharAt(index);
+		index++;
+		return c;
+	}
+
+	/**
+	 * @see java.io.Reader.read(char[] cbuf, int off, int len)
+	 */
+	public int read(char[] cbuf, int off, int len) throws IOException {
+        if ((off < 0) || (off > cbuf.length) || (len < 0) ||
+                ((off + len) > cbuf.length) || ((off + len) < 0)) {
+                throw new IndexOutOfBoundsException();
+            } else if (len == 0) {
+                return 0;
+            }
+        if(current == null) return -1;
+		int actuallyRead = 0;
+		while(current != null && len > 0) {
+			int av = current.getUsedSize() - index;
+			if(av <= 0) {
+				current = current.getNext();
+				index = 0;
+				continue;
+			}
+			if(av > len) av = len;
+			System.arraycopy(current.getChars(), index, cbuf, off, av);
+			index += av;
+			off += av;
+			actuallyRead += av;
+			len -= av;
+		}
+		return actuallyRead == 0 ? -1 : actuallyRead;
+	}
+	
+	/**
+	 * Returns the number of chars that may be read from this storage.
+	 * @return
+	 * @throws IOException
+	 */
+	public int available() throws IOException {
+		if(current == null) return 0;
+		CharBuffer b = current;
+		int result = -index;
+		while(b != null) {
+			result += b.getUsedSize();
+			b = b.getNext();
+		}
+		return result;
+	}
+	
+	/** Writes rest of data written up to the moment to out.
+	 * @param out
+	 * @throws IOException
+	 */
+	public void writeTo(Writer writer) throws IOException {
+		if(current == null) return ;
+		if(current.getUsedSize() > index) {
+			writer.write(current.getChars(), index, current.getUsedSize()-index);
+			current = current.getNext();
+		}
+		while(current != null) {
+			writer.write(current.getChars(), 0, current.getUsedSize());
+			current = current.getNext();
+		}
+		index = 0;
+	}
+
+	
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/FastBufferWriter.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/FastBufferWriter.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/FastBufferWriter.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,216 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.io;
+
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.io.Writer;
+
+import javax.servlet.ServletOutputStream;
+
+/**
+ * Class for writing to chain of char arrays extending Writer.
+ *  
+ * @author glory
+ *
+ */
+public class FastBufferWriter extends Writer {
+	/**
+	 * The beginning of the chain of char arrays.
+	 */
+	CharBuffer firstBuffer;
+
+	/**
+	 * Currently filled link of the chain of char arrays.
+	 */
+	CharBuffer lastBuffer;
+	
+	/**
+	 * Total number of written chars.
+	 */	
+	int length;
+	
+	/**
+	 * Creates instance of default initial capacity.
+	 */	
+	public FastBufferWriter() {
+		this(256);
+	}
+	
+	/**
+	 * Creates instance with required initial capacity.
+	 * @param initialSize
+	 */
+	public FastBufferWriter(int initialSize) {
+		this(new CharBuffer(initialSize));
+	}
+	
+	/**
+	 * Creates instance for an already existing chain of char arrays.
+	 * @param firstBuffer
+	 */	
+	public FastBufferWriter(CharBuffer firstBuffer) {
+		this.firstBuffer = firstBuffer;
+		lastBuffer = firstBuffer;
+	}
+	
+	/**
+	 * @see java.io.Writer.write(int c)
+	 */
+	public void write(int c) throws IOException {
+		lastBuffer = lastBuffer.append((char)c);
+	}
+
+	/**
+	 * @see java.io.Writer.write(char cbuf[])
+	 */
+	public void write(char cbuf[]) throws IOException {
+    	if(cbuf == null) {
+    		throw new NullPointerException();
+    	}
+
+    	lastBuffer = lastBuffer.append(cbuf, 0, cbuf.length);
+    	length += cbuf.length;
+    	
+	}
+
+	/**
+	 * @see java.io.Writer.write(char cbuf[], int off, int len)
+	 */
+    public void write(char[] cbuf, int off, int len) throws IOException {
+    	if(cbuf == null) {
+    		throw new NullPointerException();
+    	}
+		if ((off < 0) || (off > cbuf.length) || (len < 0) ||
+				((off + len) > cbuf.length) || ((off + len) < 0)) {
+				throw new IndexOutOfBoundsException();
+		} else if (len == 0) {
+			return;
+		}
+    	lastBuffer = lastBuffer.append(cbuf, off, len);
+    	length += len;
+
+	}
+	
+    /**
+     * Returns the total number of written chars.
+     * @return
+     */
+	public int getLength() {
+		return length;
+	}
+	
+	/**
+	 * Returns the first link of the chain of char arrays.
+	 * @return
+	 */	
+	public CharBuffer getFirstBuffer() {
+		return firstBuffer;
+	}
+
+	public void close() throws IOException {
+	}
+
+	public void flush() throws IOException {
+	}
+
+	/**
+	 * Writes all data written up to the moment to string buffer.
+	 * @param out
+	 * @throws IOException
+	 */
+	public char[] toCharArray() {
+		CharBuffer b = firstBuffer;
+		if(b == null) return new char[0];
+		CharBuffer l = b;
+		while(l.getNext() != null) l = l.getNext();
+		char[] result = new char[l.getTotalSize()];
+		int index = 0;
+		while(b != null) {
+			int s = b.getUsedSize();
+			System.arraycopy(b.getChars(), 0, result, index, s);
+			index += s;
+			b = b.getNext();
+		}		
+		return result;
+	}
+
+	/**
+	 * Writes all data written up to the moment to out.
+	 * @param out
+	 * @throws IOException
+	 */
+	public void writeTo(Writer writer) throws IOException {
+		CharBuffer b = firstBuffer;
+		while(b != null) {
+			writer.write(b.getChars(), 0, b.getUsedSize());
+			b = b.getNext();
+		}
+	}
+	
+	public void printTo(ServletOutputStream outputStream) throws IOException {
+		CharBuffer b = firstBuffer;
+		while(b != null) {
+			outputStream.print(new String(b.getChars()));
+			b = b.getNext();
+		}
+	}
+
+	/**
+     * Returns instance of FastBufferOutputStream containing all data written to this writer.
+	 * @param encoding
+	 * @return
+	 * @throws UnsupportedEncodingException
+	 */
+	public FastBufferOutputStream convertToOutputStream(String encoding) throws UnsupportedEncodingException {
+		CharBuffer c = firstBuffer;
+		ByteBuffer first = c.toByteBuffer(encoding);
+		ByteBuffer b = first;
+		while(c != null) {
+			c = c.getNext();
+			if(c == null) break;
+			ByteBuffer n = c.toByteBuffer(encoding);
+			b.setNext(n);
+			b = n;
+		}
+		return new FastBufferOutputStream(first);
+	}
+
+	/**
+     * Returns instance of FastBufferOutputStream containing all data written to this writer.
+	 * @return
+	 */
+	public FastBufferOutputStream convertToOutputStream() {
+		CharBuffer c = firstBuffer;
+		ByteBuffer first = c.toByteBuffer();
+		ByteBuffer b = first;
+		while(c != null) {
+			c = c.getNext();
+			if(c == null) break;
+			ByteBuffer n = c.toByteBuffer();
+			b.setNext(n);
+			b = n;
+		}
+		return new FastBufferOutputStream(first);
+	}
+	
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/Test.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/Test.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/Test.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,231 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.io;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.StringReader;
+import java.io.StringWriter;
+
+public class Test {
+	static int ARRAY_LENGTH = 27;
+	static int READ_OFF = 4;
+	static int READ_LENGTH = 22;
+	
+	static boolean BUILD_STRING = false;
+	static boolean OUT_STRING = true;
+	
+	static void testStreams() throws IOException {
+		String s = "This is a senseless text to test streams.\n";
+		for (int i = 0; i < 10; i++) s = s + s; //repeated 16 times 
+		byte[] bytes = s.getBytes();
+		
+		FastBufferOutputStream output = new FastBufferOutputStream(16);
+		//write it several times.
+		for (int i = 0; i < 4; i++) output.write(bytes);
+		//write it one more time by one byte
+		for (int i = 0; i < bytes.length; i++) {
+			output.write(bytes[i]);
+		}
+		FastBufferInputStream input = new FastBufferInputStream(output);
+		StringBuffer sb = new StringBuffer();
+		//use for reading unconvenient array length.
+		byte[] bs = new byte[ARRAY_LENGTH];
+		int l = 0;
+		while((l = input.read(bs, READ_OFF, READ_LENGTH)) >= 0) {
+			if(BUILD_STRING) sb.append(new String(bs, READ_OFF, l));
+		}
+		if(BUILD_STRING && OUT_STRING) {
+			System.out.println(sb);
+			System.out.println("Length=" + output.getLength());
+		}
+	}
+	
+	static void testStandardStreams() throws IOException {
+		String s = "This is a senseless text to test streams.\n";
+		for (int i = 0; i < 10; i++) s = s + s; //repeated 16 times 
+		byte[] bytes = s.getBytes();
+		
+		ByteArrayOutputStream output = new ByteArrayOutputStream(16);
+		//write it several times.
+		for (int i = 0; i < 4; i++) output.write(bytes);
+		//write it one more time by one byte
+		for (int i = 0; i < bytes.length; i++) {
+			output.write(bytes[i]);
+		}
+		ByteArrayInputStream input = new ByteArrayInputStream(output.toByteArray());
+		StringBuffer sb = new StringBuffer();
+		//use for reading unconvenient array length.
+		byte[] bs = new byte[ARRAY_LENGTH];
+		int l = 0;
+		while((l = input.read(bs, READ_OFF, READ_LENGTH)) >= 0) {
+			if(BUILD_STRING) sb.append(new String(bs, READ_OFF, l));
+		}
+		if(BUILD_STRING && OUT_STRING) System.out.println(sb);
+	}
+
+
+	static void testReaders() throws IOException {
+		String s = "This is a senseless text to test readers.\n";
+		for (int i = 0; i < 10; i++) s = s + s; //repeated 16 times 
+		char[] bytes = s.toCharArray();
+		
+		FastBufferWriter output = new FastBufferWriter(16);
+		//write it several times.
+		for (int i = 0; i < 4; i++) output.write(bytes);
+		//write it one more time by one byte
+		for (int i = 0; i < bytes.length; i++) {
+			output.write(bytes[i]);
+		}
+		FastBufferReader input = new FastBufferReader(output);
+		StringBuffer sb = new StringBuffer();
+		//use for reading unconvenient array length.
+		char[] bs = new char[ARRAY_LENGTH];
+		int l = 0;
+		while((l = input.read(bs, READ_OFF, READ_LENGTH)) >= 0) {
+			if(BUILD_STRING) sb.append(new String(bs, READ_OFF, l));
+		}
+		if(BUILD_STRING && OUT_STRING) System.out.println(sb);
+	}
+
+	static void testStandardReaders() throws IOException {
+		String s = "This is a senseless text to test readers.\n";
+		for (int i = 0; i < 10; i++) s = s + s; //repeated 16 times 
+		char[] bytes = s.toCharArray();
+		
+		StringWriter output = new StringWriter(16);
+		//write it several times.
+		for (int i = 0; i < 4; i++) output.write(bytes);
+		//write it one more time by one byte
+		for (int i = 0; i < bytes.length; i++) {
+			output.write(bytes[i]);
+		}
+		StringReader input = new StringReader(output.toString());
+		StringBuffer sb = new StringBuffer();
+		//use for reading unconvenient array length.
+		char[] bs = new char[ARRAY_LENGTH];
+		int l = 0;
+		while((l = input.read(bs, READ_OFF, READ_LENGTH)) >= 0) {
+			if(BUILD_STRING) sb.append(new String(bs, READ_OFF, l));
+		}
+		if(BUILD_STRING && OUT_STRING) System.out.println(sb);
+	}
+
+	static void testTransitionFromWriterToStream() throws IOException {
+		String s = "This is a senseless text to test transform from writer to stream.\n";
+		for (int i = 0; i < 10; i++) s = s + s; //repeated 16 times 
+		char[] bytes = s.toCharArray();
+		
+		FastBufferWriter output = new FastBufferWriter(16);
+		//write it several times.
+		for (int i = 0; i < 4; i++) output.write(bytes);
+		//write it one more time by one byte
+		for (int i = 0; i < bytes.length; i++) {
+			output.write(bytes[i]);
+		}
+		FastBufferOutputStream output2 = output.convertToOutputStream("UTF-8");
+		FastBufferInputStream input = new FastBufferInputStream(output2);
+		StringBuffer sb = new StringBuffer();
+		//use for reading unconvenient array length.
+		byte[] bs = new byte[ARRAY_LENGTH];
+		int l = 0;
+		while((l = input.read(bs, READ_OFF, READ_LENGTH)) >= 0) {
+			if(BUILD_STRING) sb.append(new String(bs, READ_OFF, l));
+		}
+		if(BUILD_STRING && OUT_STRING) System.out.println(sb);
+	}
+
+	static void testStandardTransitionFromWriterToStream() throws IOException {
+		String s = "This is a senseless text to test transform from writer to stream.\n";
+		for (int i = 0; i < 10; i++) s = s + s; //repeated 16 times 
+		char[] bytes = s.toCharArray();
+		
+		StringWriter output = new StringWriter(16);
+		//write it several times.
+		for (int i = 0; i < 4; i++) output.write(bytes);
+		//write it one more time by one byte
+		for (int i = 0; i < bytes.length; i++) {
+			output.write(bytes[i]);
+		}
+		String str = output.toString();
+		ByteArrayInputStream input = new ByteArrayInputStream(str.getBytes());
+		StringBuffer sb = new StringBuffer();
+		//use for reading unconvenient array length.
+		byte[] bs = new byte[ARRAY_LENGTH];
+		int l = 0;
+		while((l = input.read(bs, READ_OFF, READ_LENGTH)) >= 0) {
+			if(BUILD_STRING) sb.append(new String(bs, READ_OFF, l));
+		}
+		if(BUILD_STRING && OUT_STRING) System.out.println(sb);
+	}
+
+	static void testTransitionFromStreamToWriter() throws IOException {
+		String s = "This is a senseless text to test transform from stream to writer.\n";
+		for (int i = 0; i < 10; i++) s = s + s; //repeated 16 times 
+		byte[] bytes = s.getBytes();
+		
+		FastBufferOutputStream output = new FastBufferOutputStream(16);
+		//write it several times.
+		for (int i = 0; i < 4; i++) output.write(bytes);
+		//write it one more time by one byte
+		for (int i = 0; i < bytes.length; i++) {
+			output.write(bytes[i]);
+		}
+		FastBufferWriter output2 = output.convertToWriter("UTF-8");
+		FastBufferReader input = new FastBufferReader(output2);
+		StringBuffer sb = new StringBuffer();
+		//use for reading unconvenient array length.
+		char[] bs = new char[ARRAY_LENGTH];
+		int l = 0;
+		while((l = input.read(bs, READ_OFF, READ_LENGTH)) >= 0) {
+			if(BUILD_STRING) sb.append(new String(bs, READ_OFF, l));
+		}
+		if(BUILD_STRING && OUT_STRING) System.out.println(sb);
+	}
+	/**
+	 * @param args
+	 */
+	public static void main(String[] args) {
+		long t = System.currentTimeMillis();
+		try {
+			for (int i = 0; i < 10; i++) {
+//			testStreams();
+//			testStandardStreams();
+
+//			testReaders();
+//				testStandardReaders();
+				
+//			testTransitionFromWriterToStream();
+			testStandardTransitionFromWriterToStream();
+			
+//			testTransitionFromStreamToWriter();
+			}
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+		long dt = System.currentTimeMillis() - t;
+		System.out.println(dt);
+
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/parser/AnyCharState.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/parser/AnyCharState.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/parser/AnyCharState.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,30 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.io.parser;
+
+public class AnyCharState extends ParserState {
+
+	boolean isAcceptChar(char c, ParsingContext context) {
+		return true;
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/parser/BlankState.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/parser/BlankState.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/parser/BlankState.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,31 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.io.parser;
+
+public class BlankState extends ParserState {
+
+	boolean isAcceptChar(char c, ParsingContext context) {
+		// TODO Auto-generated method stub
+		return Character.isSpaceChar(c);
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/parser/BufferedAnyCharState.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/parser/BufferedAnyCharState.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/parser/BufferedAnyCharState.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,39 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.io.parser;
+
+import java.io.IOException;
+
+/**
+ * @author shura
+ *
+ */
+public class BufferedAnyCharState extends AnyCharState {
+    /* (non-Javadoc)
+	 * @see org.ajax4jsf.io.parser.ParserState#send(char, org.ajax4jsf.io.parser.ParsingContext)
+	 */
+	void send(char c, ParsingContext context) throws IOException {
+		
+		context.putChar(c);
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/parser/BufferedBlankState.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/parser/BufferedBlankState.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/parser/BufferedBlankState.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,39 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.io.parser;
+
+import java.io.IOException;
+
+/**
+ * @author shura
+ *
+ */
+public class BufferedBlankState extends BlankState {
+    /* (non-Javadoc)
+	 * @see org.ajax4jsf.io.parser.ParserState#send(char, org.ajax4jsf.io.parser.ParsingContext)
+	 */
+	void send(char c, ParsingContext context) throws IOException {
+		
+		context.putChar(c);
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/parser/BufferedSingleCharState.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/parser/BufferedSingleCharState.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/parser/BufferedSingleCharState.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,47 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.io.parser;
+
+import java.io.IOException;
+
+/**
+ * @author shura
+ *
+ */
+public class BufferedSingleCharState extends SingleCharState {
+
+	/**
+	 * @param c
+	 */
+	public BufferedSingleCharState(char c) {
+		super(c);
+		// TODO Auto-generated constructor stub
+	}
+    /* (non-Javadoc)
+	 * @see org.ajax4jsf.io.parser.ParserState#send(char, org.ajax4jsf.io.parser.ParsingContext)
+	 */
+	void send(char c, ParsingContext context) throws IOException {
+		
+		context.putChar(c);
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/parser/BufferedStringState.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/parser/BufferedStringState.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/parser/BufferedStringState.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,48 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.io.parser;
+
+import java.io.IOException;
+
+/**
+ * @author shura
+ *
+ */
+public class BufferedStringState extends StringState {
+
+	/**
+	 * @param toCompare
+	 * @param reachedState
+	 */
+	public BufferedStringState(String toCompare, ParserState reachedState) {
+		super(toCompare, reachedState);
+		// TODO Auto-generated constructor stub
+	}
+    /* (non-Javadoc)
+	 * @see org.ajax4jsf.io.parser.ParserState#send(char, org.ajax4jsf.io.parser.ParsingContext)
+	 */
+	void send(char c, ParsingContext context) throws IOException {
+		
+		context.putChar(c);
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/parser/FastHtmlParser.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/parser/FastHtmlParser.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/parser/FastHtmlParser.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,255 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.io.parser;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.io.Writer;
+import java.lang.reflect.Field;
+import java.util.Iterator;
+import java.util.Set;
+
+import org.ajax4jsf.framework.ajax.xmlfilter.HtmlParser;
+import org.ajax4jsf.io.FastBufferReader;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * Simplified and fast HTML parsed - for find insertion point of <html><head>
+ * there can be inserted <script><style> and <meta> tags.
+ * 
+ * @author shura
+ * 
+ */
+public class FastHtmlParser implements HtmlParser {
+
+	private static final Log log = LogFactory.getLog(FastHtmlParser.class);
+
+	private Set scripts;
+
+	private Set styles;
+
+	private String encoding;
+
+	private String doctype;
+
+	private String viewState;
+
+	public void parse(Reader in, Writer out) throws IOException {
+		boolean haveHtml = false;
+		boolean haveHead = false;
+		boolean closingElement = false;
+		if (null != scripts || null != styles) {
+			ParsingStateManager stateManager = ParsingStateManager
+					.getInstance();
+			ParserState state = stateManager.getInitialState();
+			ParsingContext context = new ParsingContext(out);
+			char c;
+			while ((c = (char) in.read()) > 0) {
+				state = state.getNextState(c, context);
+				if (log.isDebugEnabled()) {
+					// Find state name.
+					Class stateMgrClass = stateManager.getClass();
+					Field[] fields = stateMgrClass.getDeclaredFields();
+					for (int i = 0; i < fields.length; i++) {
+						Field field = fields[i];
+						try {
+							if (field.get(stateManager) == state) {
+								log
+										.debug("Parser reached state is StateManager."
+												+ field.getName());
+								break;
+							}
+						} catch (Exception e) {
+							// ignore ...
+						}
+					}
+				}
+				state.send(c, context);
+				if (state == stateManager.LT) {
+					closingElement = false;
+				} else if (state == stateManager.CLOSINGELEMENT) {
+					closingElement = true;
+				} else if (state == stateManager.ENDELEMENT) {
+					if (context.getLastMatched() == stateManager.HTML) {
+						haveHtml = true;
+						context.send();
+						if (log.isDebugEnabled()) {
+							log.debug("Found <html> element");
+						}
+					} else if (context.getLastMatched() == stateManager.HEAD) {
+						haveHead = true;
+						if (log.isDebugEnabled()) {
+							log.debug("Found <head> element");
+						}
+						if (closingElement) {
+							writeToHead(out, haveHtml, haveHead);
+							break;
+						} else {
+							context.send();							
+						}
+					} else if (context.getLastMatched() == stateManager.TITLE) {
+						context.send();
+						haveHead = true;
+						haveHtml = true;
+						if (log.isDebugEnabled()) {
+							log.debug("Found <title> element");
+						}
+					} else if (context.getLastMatched() == stateManager.BASE) {
+						context.send();
+						haveHead = true;
+						haveHtml = true;
+						if (log.isDebugEnabled()) {
+							log.debug("Found <base> element");
+						}
+					} else {
+						if (log.isDebugEnabled()) {
+							log
+									.debug("non <html> or <head><title>|<base> element");
+						}
+						writeToHead(out, haveHtml, haveHead);
+						break;
+					}
+				} else if (state == stateManager.ELEMENT) {
+					writeToHead(out, haveHtml, haveHead);
+					break;
+				}
+			}
+			context.send();
+		} else {
+			haveHtml = true;
+		}
+		// Send rest of input.
+		if (in instanceof FastBufferReader) {
+			FastBufferReader fastIn = (FastBufferReader) in;
+			fastIn.writeTo(out);
+
+		} else {
+			char[] buffer = new char[1024];
+			int buffersCount = -1;
+			int length;
+			for (length = in.read(buffer); length > 0; length = in.read(buffer)) {
+				out.write(buffer, 0, length);
+				buffersCount++;
+			}
+		}
+		if (!haveHtml) {
+			out.write("</html>");
+		}
+
+	}
+
+	private void writeToHead(Writer out, boolean haveHtml, boolean haveHead)
+			throws IOException {
+		if (!haveHead && !haveHtml) {
+			out.write("<html>");
+		}
+		if (!haveHead) {
+			out.write("<head>");
+		}
+		if (null != styles) {
+			for (Iterator iter = styles.iterator(); iter.hasNext();) {
+				String style = (String) iter.next();
+				out.write("<link rel='stylesheet'  type='text/css' href='");
+				out.write(style);
+				out.write("' />");
+			}
+		}
+		if (null != scripts) {
+			for (Iterator iter = scripts.iterator(); iter.hasNext();) {
+				String script = (String) iter.next();
+				out.write("<script type='text/javascript' src='");
+				out.write(script);
+				out.write("'></script>");
+			}
+		}
+		if (!haveHead) {
+			out.write("</head>");
+		}
+
+	}
+
+	/**
+	 * @return Returns the scripts.
+	 */
+	public Set getScripts() {
+		return scripts;
+	}
+
+	/**
+	 * @param scripts
+	 *            The scripts to set.
+	 */
+	public void setScripts(Set scripts) {
+		this.scripts = scripts;
+	}
+
+	/**
+	 * @return Returns the styles.
+	 */
+	public Set getStyles() {
+		return styles;
+	}
+
+	/**
+	 * @param styles
+	 *            The styles to set.
+	 */
+	public void setStyles(Set styles) {
+		this.styles = styles;
+	}
+
+	public void parseHtml(InputStream input, Writer output) throws IOException {
+		parse(new InputStreamReader(input, encoding), output);
+
+	}
+
+	public void parseHtml(Reader input, Writer output) throws IOException {
+		parse(input, output);
+
+	}
+
+	public void setInputEncoding(String encoding) {
+		this.encoding = encoding;
+
+	}
+
+	public void setOutputEncoding(String encoding) {
+		// TODO Auto-generated method stub
+
+	}
+
+	public void setMoveElements(boolean move) {
+	}
+
+	public void setDoctype(String doctype) {
+		this.doctype = doctype;
+
+	}
+
+	public void setViewState(String viewState) {
+		this.viewState = viewState;
+
+	}
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/parser/KeywordCharState.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/parser/KeywordCharState.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/parser/KeywordCharState.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,51 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.io.parser;
+
+import java.io.IOException;
+
+/**
+ * @author shura
+ *
+ */
+public class KeywordCharState extends SingleCharState {
+
+	public KeywordCharState(char c) {
+		super(c);
+		// TODO Auto-generated constructor stub
+	}
+
+    boolean isAcceptChar(char c, ParsingContext context) {
+		// TODO Auto-generated method stub
+		return Character.toLowerCase(c) == _c;
+	}
+ 
+    /* (non-Javadoc)
+	 * @see org.ajax4jsf.io.parser.ParserState#send(char, org.ajax4jsf.io.parser.ParsingContext)
+	 */
+	void send(char c, ParsingContext context) throws IOException {
+		
+		context.putChar(c);
+	}
+
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/parser/KeywordState.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/parser/KeywordState.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/parser/KeywordState.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,64 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.io.parser;
+
+import java.io.IOException;
+
+public class KeywordState extends StringState {
+	
+
+	/**
+	 * @param toCompare
+	 * @param reachedState
+	 */
+	public KeywordState(String toCompare, ParserState reachedState) {
+		super(toCompare, reachedState);
+		// TODO Auto-generated constructor stub
+	}
+
+	boolean isAcceptChar(char c, ParsingContext context) {
+		boolean matched = false;
+		int currentStatePosition = context.getCurrentStatePosition();
+		if(currentStatePosition<string.length){
+			matched = Character.toLowerCase(c)==string[currentStatePosition];
+		}
+		if(matched){
+			context.incCurrentStatePosition();
+			context.setLastMatched(this);
+		}
+		else {
+			context.setCurrentStatePosition(0);
+			context.setLastMatched(null);
+		}
+		return matched;
+	}
+
+    /* (non-Javadoc)
+	 * @see org.ajax4jsf.io.parser.ParserState#send(char, org.ajax4jsf.io.parser.ParsingContext)
+	 */
+	void send(char c, ParsingContext context) throws IOException {
+		
+		context.putChar(c);
+	}
+
+	
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/parser/ParserState.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/parser/ParserState.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/parser/ParserState.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,65 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.io.parser;
+
+import java.io.IOException;
+
+/**
+ * Interface for curent parsing state in {@link org.ajax4jsf.io.parser.FastHtmlParser}
+ * @author shura
+ *
+ */
+public abstract class ParserState {
+	
+	/**
+	 * Array of states allowed to transition from this state.
+	 */
+	ParserState nextStates[]={};
+
+	ParserState getNextState(char c,ParsingContext context){
+		for (int i = 0; i < nextStates.length; i++) {
+			ParserState parserState = nextStates[i];
+			if(parserState.isAcceptChar(c,context)){
+				return parserState;
+			}
+		}
+		return context.getBaseState();
+	}
+	
+	/**
+	 * Ask parser for allowed this state for given char.
+	 * @param c
+	 * @param context
+	 * @return
+	 */
+	abstract boolean isAcceptChar(char c, ParsingContext context);
+	
+	/**
+	 * Send current char or buffer content to output stream.
+	 * @return
+	 * @throws IOException 
+	 */
+	 void send(char c, ParsingContext context) throws IOException{
+		 context.send(c);
+	 }
+	 
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/parser/ParsingContext.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/parser/ParsingContext.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/parser/ParsingContext.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,159 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.io.parser;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.Writer;
+import java.util.Stack;
+
+/**
+ * Context to keep current parsing state.
+ * @author shura
+ *
+ */
+public class ParsingContext {
+	
+	private int _currentStatePosition=0;
+	
+	private StringBuffer buff = new StringBuffer(64);
+	
+	private ParserState baseState;
+	
+	private Stack parsersStack = new Stack();
+	
+	private OutputStream _stream;
+	
+	private Writer _writer;
+
+    private KeywordState _lastMatched;
+
+	
+	/**
+	 * @param stream
+	 */
+	public ParsingContext(OutputStream stream) {
+		super();
+		// TODO Auto-generated constructor stub
+		_stream = stream;
+	}
+
+	/**
+	 * @param writer
+	 */
+	public ParsingContext(Writer writer) {
+		super();
+		// TODO Auto-generated constructor stub
+		_writer = writer;
+	}
+
+	/**
+	 * @return Returns the baseState.
+	 */
+	public ParserState getBaseState() {
+		return baseState;
+	}
+
+	/**
+	 * @param baseState The baseState to set.
+	 */
+	public void setBaseState(ParserState baseState) {
+		this.baseState = baseState;
+	}
+	
+	public void pushState(ParserState baseState){
+		parsersStack.push(this.baseState);
+		this.baseState = baseState;
+	}
+	
+	public ParserState popState(){
+		baseState = (ParserState) parsersStack.pop();
+		return baseState;
+	}
+
+	/**
+	 * @return Returns the currentStatePosition.
+	 */
+	public int getCurrentStatePosition() {
+		return _currentStatePosition;
+	}
+	/**
+	 * @return Returns the currentStatePosition.
+	 */
+	public int incCurrentStatePosition() {
+		return _currentStatePosition++;
+	}
+
+	/**
+	 * @param currentStatePosition The currentStatePosition to set.
+	 */
+	public void setCurrentStatePosition(int currentStatePosition) {
+		_currentStatePosition = currentStatePosition;
+	}
+	
+	public void putChar(char c){
+		buff.append(c);
+	}
+	
+	private void sendBuffer(Writer out) throws IOException {
+		out.write(buff.toString());
+		buff.setLength(0);
+	}
+
+	private void sendBuffer(OutputStream out) throws IOException {
+		for (int i = 0; i < buff.length(); i++) {
+			out.write(buff.charAt(i));
+		}
+		buff.setLength(0);
+	}
+	
+	public void send() throws IOException {
+		if(null != _writer){
+			sendBuffer(_writer);
+		} else {
+			sendBuffer(_stream);
+		}
+	}
+
+	public void send(char c) throws IOException {
+		if(buff.length()>0){
+			send();
+		}
+		if(null != _writer){
+			_writer.write(c);
+		} else {
+			_stream.write(c);
+		}
+	}
+
+    public void setLastMatched(KeywordState state) {
+		this._lastMatched = state;
+		
+	}
+
+    /**
+	 * @return Returns the _lastMatched.
+	 */
+	public KeywordState getLastMatched() {
+		return _lastMatched;
+	}
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/parser/ParsingStateManager.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/parser/ParsingStateManager.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/parser/ParsingStateManager.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,175 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.io.parser;
+
+
+public class ParsingStateManager {
+	
+	 ParserState DOCUMENT = new AnyCharState();
+	
+	 ParserState LT = new BufferedSingleCharState('<');
+
+	 ParserState ENDELEMENT = new BufferedSingleCharState('>');
+
+	 ParserState CLOSINGELEMENT = new BufferedSingleCharState('/');
+
+	ParserState EXCLAM = new SingleCharState('!');
+	
+
+	ParserState DOCTYPE = new AnyCharState();
+
+	ParserState DOCTYPESTART = new StringState("DOCTYPE",DOCTYPE);
+
+	ParserState DOCTYPEEND = new SingleCharState('>');
+
+	ParserState COMMENT = new AnyCharState();
+
+	ParserState COMMENTSTART = new StringState("--",COMMENT);
+	
+	
+	ParserState COMMENTEND = new StringState("-->",DOCUMENT);
+
+	ParserState CDATA = new AnyCharState();
+
+	ParserState CDATASTART = new StringState("[CDATA[",CDATA);
+	
+	ParserState CDATAEND = new StringState("]]>",DOCUMENT);
+
+	ParserState PISTART = new SingleCharState('?');
+	
+	ParserState PI = new AnyCharState();
+
+	ParserState PIEND = new StringState("?>",DOCUMENT);
+	
+	ParserState ELEMENT = new XmlIdentifierState();
+	
+	ParserState INELEMENT = new BufferedBlankState();
+
+	ParserState INELEMENTCONTENT = new BufferedAnyCharState();
+
+	ParserState LT_ELEMENT = new BufferedSingleCharState('<');
+	
+	ParserState EXCLAM_ELEMENT = new BufferedSingleCharState('!');
+	
+
+	ParserState COMMENT_ELEMENT = new BufferedAnyCharState();
+	
+	ParserState COMMENTSTART_ELEMENT = new BufferedStringState("--",COMMENT_ELEMENT);
+	
+	ParserState COMMENTEND_ELEMENT = new BufferedStringState("-->",INELEMENTCONTENT);
+
+	ParserState CDATA_ELEMENT = new BufferedAnyCharState();
+
+	ParserState CDATASTART_ELEMENT = new BufferedStringState("[CDATA[",CDATA_ELEMENT);
+	
+	ParserState CDATAEND_ELEMENT = new BufferedStringState("]]>",INELEMENTCONTENT);
+
+	ParserState PISTART_ELEMENT = new BufferedSingleCharState('?');
+	
+	ParserState PI_ELEMENT = new BufferedAnyCharState();
+
+	ParserState PIEND_ELEMENT = new BufferedStringState("?>",INELEMENTCONTENT);
+	
+    ParserState H = new KeywordCharState('h');
+	 
+	// Head stuff
+	
+	ParserState HEAD = new KeywordState("ead",ELEMENT);
+
+	ParserState TITLE = new KeywordState("title",ELEMENT);
+
+	ParserState BASE = new KeywordState("base",ELEMENT);
+	
+	// Html content
+
+	ParserState HTML = new KeywordState("tml",ELEMENT);
+
+	private static ParsingStateManager _instance=new ParsingStateManager();
+	/**
+	 * 
+	 */
+	private ParsingStateManager() {
+		// Inicialize parsing states
+		DOCUMENT.nextStates = new ParserState[]{LT,DOCUMENT};
+		// after < possible ! & / or start element 
+		LT.nextStates = new ParserState[]{EXCLAM,PISTART,CLOSINGELEMENT,H,TITLE,BASE,ELEMENT,DOCUMENT};
+		//
+		EXCLAM.nextStates = new ParserState[]{COMMENTSTART,CDATASTART,DOCTYPESTART,DOCUMENT};
+		// doctype declaration
+		DOCTYPESTART.nextStates = new ParserState[]{DOCTYPESTART,DOCUMENT};
+		DOCTYPE.nextStates = new ParserState[]{DOCTYPEEND,DOCTYPE};
+		DOCTYPEEND.nextStates = new ParserState[]{LT,DOCUMENT};
+		// cdata section
+		CDATASTART.nextStates = new ParserState[]{LT,DOCUMENT};
+		CDATA.nextStates = new ParserState[]{CDATAEND,CDATA};
+		CDATAEND.nextStates = new ParserState[]{CDATA};
+		//
+		COMMENTSTART.nextStates = new ParserState[]{LT,DOCUMENT};
+		COMMENT.nextStates = new ParserState[]{COMMENTEND,COMMENT};
+		COMMENTEND.nextStates = new ParserState[]{COMMENT};
+		//
+		PISTART.nextStates = new ParserState[]{PIEND,PI};
+		PI.nextStates = new ParserState[]{PIEND,PI};
+		PIEND.nextStates = new ParserState[]{PI};
+		// Any element or closing element.
+		CLOSINGELEMENT.nextStates = new ParserState[]{H,TITLE,BASE,ELEMENT,LT,DOCUMENT};
+		ELEMENT.nextStates = new ParserState[]{ELEMENT,INELEMENT,ENDELEMENT,LT_ELEMENT};
+		INELEMENT.nextStates = new ParserState[]{ENDELEMENT,INELEMENT,LT_ELEMENT,INELEMENTCONTENT};
+		INELEMENTCONTENT.nextStates = new ParserState[]{LT_ELEMENT,ENDELEMENT,INELEMENTCONTENT};
+		LT_ELEMENT.nextStates = new ParserState[]{EXCLAM_ELEMENT,PISTART_ELEMENT,INELEMENTCONTENT};
+		//
+		EXCLAM_ELEMENT.nextStates = new ParserState[]{COMMENTSTART_ELEMENT,CDATASTART_ELEMENT,INELEMENTCONTENT};
+		// cdata section
+		CDATASTART_ELEMENT.nextStates = new ParserState[]{CDATASTART_ELEMENT,INELEMENTCONTENT};
+		CDATA_ELEMENT.nextStates = new ParserState[]{CDATAEND_ELEMENT,CDATA_ELEMENT};
+		CDATAEND_ELEMENT.nextStates = new ParserState[]{CDATAEND_ELEMENT,CDATA_ELEMENT};
+		//
+		COMMENTSTART_ELEMENT.nextStates = new ParserState[]{COMMENTEND_ELEMENT,COMMENT_ELEMENT,INELEMENTCONTENT};
+		COMMENT_ELEMENT.nextStates = new ParserState[]{COMMENTEND_ELEMENT,COMMENT_ELEMENT};
+		COMMENTEND_ELEMENT.nextStates = new ParserState[]{COMMENTEND_ELEMENT,COMMENT_ELEMENT};
+		//
+		PISTART_ELEMENT.nextStates = new ParserState[]{PIEND_ELEMENT,PI_ELEMENT,INELEMENTCONTENT};
+		PI_ELEMENT.nextStates = new ParserState[]{PIEND_ELEMENT,PI_ELEMENT};
+		PIEND_ELEMENT.nextStates = new ParserState[]{PIEND_ELEMENT,PI_ELEMENT};
+		
+		ENDELEMENT.nextStates = new ParserState[]{LT,DOCUMENT};
+
+		H.nextStates = new ParserState[]{HEAD,HTML,ENDELEMENT,INELEMENT,ELEMENT,LT,DOCUMENT};
+		HEAD.nextStates = new ParserState[]{HEAD,ENDELEMENT,INELEMENT,ELEMENT};
+		HTML.nextStates = new ParserState[]{HTML,ENDELEMENT,INELEMENT,ELEMENT};
+		TITLE.nextStates = new ParserState[]{TITLE,ENDELEMENT,INELEMENT,ELEMENT};
+		BASE.nextStates = new ParserState[]{BASE,ENDELEMENT,INELEMENT,ELEMENT};
+	}
+	/**
+	 * @return Returns the instance.
+	 */
+	public static ParsingStateManager getInstance() {
+		return _instance;
+//		return new ParsingStateManager();
+	}
+	
+	public ParserState getInitialState(){
+		return DOCUMENT;
+	}
+	
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/parser/SingleCharState.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/parser/SingleCharState.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/parser/SingleCharState.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,44 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.io.parser;
+
+public class SingleCharState extends ParserState {
+	
+	protected char _c;
+
+	
+	/**
+	 * @param c
+	 */
+	public SingleCharState(char c) {
+		super();
+		// TODO Auto-generated constructor stub
+		_c = c;
+	}
+
+
+	boolean isAcceptChar(char c, ParsingContext context) {
+		// TODO Auto-generated method stub
+		return c == _c;
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/parser/StringState.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/parser/StringState.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/parser/StringState.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,68 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.io.parser;
+
+public class StringState extends ParserState {
+	
+	protected char[] string;
+	
+	private ParserState reachedState;
+	
+	StringState(String toCompare, ParserState reachedState){
+		super();
+		this.string = toCompare.toCharArray();
+		this.reachedState = reachedState;
+	}
+
+	
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.io.parser.ParserState#getNextState(char, org.ajax4jsf.io.parser.ParsingContext)
+	 */
+	ParserState getNextState(char c, ParsingContext context) {
+		if (context.getCurrentStatePosition()==string.length) {
+			// String matched - switch to reached state
+			context.setCurrentStatePosition(0);
+			return this.reachedState.getNextState(c,context);
+		} else if(isAcceptChar(c,context)){
+			// Continue reaching.
+			return this;
+		}
+		return super.getNextState(c, context);
+	}
+
+
+	boolean isAcceptChar(char c, ParsingContext context) {
+		boolean matched = false;
+		int currentStatePosition = context.getCurrentStatePosition();
+		if(currentStatePosition<string.length){
+			matched = c==string[currentStatePosition];
+		}
+		if(matched){
+			context.incCurrentStatePosition(); 
+		}
+		else {
+			context.setCurrentStatePosition(0);
+		}
+		return matched;
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/parser/XmlIdentifierState.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/parser/XmlIdentifierState.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/io/parser/XmlIdentifierState.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,40 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.io.parser;
+
+import java.io.IOException;
+
+public class XmlIdentifierState extends ParserState {
+
+	boolean isAcceptChar(char c, ParsingContext context) {
+		// TODO Auto-generated method stub
+		return Character.isJavaIdentifierPart(c);
+	}
+    /* (non-Javadoc)
+	 * @see org.ajax4jsf.io.parser.ParserState#send(char, org.ajax4jsf.io.parser.ParsingContext)
+	 */
+	void send(char c, ParsingContext context) throws IOException {
+		
+		context.putChar(c);
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/Anchor.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/Anchor.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/Anchor.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,101 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ *  Java HTML Tidy - JTidy
+ *  HTML parser and pretty printer
+ *
+ *  Copyright (c) 1998-2000 World Wide Web Consortium (Massachusetts
+ *  Institute of Technology, Institut National de Recherche en
+ *  Informatique et en Automatique, Keio University). All Rights
+ *  Reserved.
+ *
+ *  Contributing Author(s):
+ *
+ *     Dave Raggett <dsr at w3.org>
+ *     Andy Quick <ac.quick at sympatico.ca> (translation to Java)
+ *     Gary L Peskin <garyp at firstech.com> (Java development)
+ *     Sami Lempinen <sami at lempinen.net> (release management)
+ *     Fabrizio Giustina <fgiust at users.sourceforge.net>
+ *
+ *  The contributing author(s) would like to thank all those who
+ *  helped with testing, bug fixes, and patience.  This wouldn't
+ *  have been possible without all of you.
+ *
+ *  COPYRIGHT NOTICE:
+ * 
+ *  This software and documentation is provided "as is," and
+ *  the copyright holders and contributing author(s) make no
+ *  representations or warranties, express or implied, including
+ *  but not limited to, warranties of merchantability or fitness
+ *  for any particular purpose or that the use of the software or
+ *  documentation will not infringe any third party patents,
+ *  copyrights, trademarks or other rights. 
+ *
+ *  The copyright holders and contributing author(s) will not be
+ *  liable for any direct, indirect, special or consequential damages
+ *  arising out of any use of the software or documentation, even if
+ *  advised of the possibility of such damage.
+ *
+ *  Permission is hereby granted to use, copy, modify, and distribute
+ *  this source code, or portions hereof, documentation and executables,
+ *  for any purpose, without fee, subject to the following restrictions:
+ *
+ *  1. The origin of this source code must not be misrepresented.
+ *  2. Altered versions must be plainly marked as such and must
+ *     not be misrepresented as being the original source.
+ *  3. This Copyright notice may not be removed or altered from any
+ *     source or altered source distribution.
+ * 
+ *  The copyright holders and contributing author(s) specifically
+ *  permit, without fee, and encourage the use of this source code
+ *  as a component for supporting the Hypertext Markup Language in
+ *  commercial products. If you use this source code in a product,
+ *  acknowledgment is not required but would be appreciated.
+ *
+ */
+package org.ajax4jsf.org.w3c.tidy;
+
+/**
+ * Anchor/node Linked list.
+ * @author hoehrmann
+ * @author Fabrizio Giustina
+ * @version $Revision: 1.1.2.1 $ ($Author: alexsmirnov $)
+ */
+public class Anchor
+{
+
+    /**
+     * Anchor name.
+     */
+    protected String name;
+
+    /**
+     * Next anchor.
+     */
+    protected Anchor next;
+
+    /**
+     * linked node.
+     */
+    protected Node node;
+
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/AttVal.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/AttVal.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/AttVal.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,444 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ *  Java HTML Tidy - JTidy
+ *  HTML parser and pretty printer
+ *
+ *  Copyright (c) 1998-2000 World Wide Web Consortium (Massachusetts
+ *  Institute of Technology, Institut National de Recherche en
+ *  Informatique et en Automatique, Keio University). All Rights
+ *  Reserved.
+ *
+ *  Contributing Author(s):
+ *
+ *     Dave Raggett <dsr at w3.org>
+ *     Andy Quick <ac.quick at sympatico.ca> (translation to Java)
+ *     Gary L Peskin <garyp at firstech.com> (Java development)
+ *     Sami Lempinen <sami at lempinen.net> (release management)
+ *     Fabrizio Giustina <fgiust at users.sourceforge.net>
+ *
+ *  The contributing author(s) would like to thank all those who
+ *  helped with testing, bug fixes, and patience.  This wouldn't
+ *  have been possible without all of you.
+ *
+ *  COPYRIGHT NOTICE:
+ * 
+ *  This software and documentation is provided "as is," and
+ *  the copyright holders and contributing author(s) make no
+ *  representations or warranties, express or implied, including
+ *  but not limited to, warranties of merchantability or fitness
+ *  for any particular purpose or that the use of the software or
+ *  documentation will not infringe any third party patents,
+ *  copyrights, trademarks or other rights. 
+ *
+ *  The copyright holders and contributing author(s) will not be
+ *  liable for any direct, indirect, special or consequential damages
+ *  arising out of any use of the software or documentation, even if
+ *  advised of the possibility of such damage.
+ *
+ *  Permission is hereby granted to use, copy, modify, and distribute
+ *  this source code, or portions hereof, documentation and executables,
+ *  for any purpose, without fee, subject to the following restrictions:
+ *
+ *  1. The origin of this source code must not be misrepresented.
+ *  2. Altered versions must be plainly marked as such and must
+ *     not be misrepresented as being the original source.
+ *  3. This Copyright notice may not be removed or altered from any
+ *     source or altered source distribution.
+ * 
+ *  The copyright holders and contributing author(s) specifically
+ *  permit, without fee, and encourage the use of this source code
+ *  as a component for supporting the Hypertext Markup Language in
+ *  commercial products. If you use this source code in a product,
+ *  acknowledgment is not required but would be appreciated.
+ *
+ */
+package org.ajax4jsf.org.w3c.tidy;
+
+import org.w3c.dom.Attr;
+
+
+/**
+ * Attribute/Value linked list node.
+ * @author Dave Raggett <a href="mailto:dsr at w3.org">dsr at w3.org </a>
+ * @author Andy Quick <a href="mailto:ac.quick at sympatico.ca">ac.quick at sympatico.ca </a> (translation to Java)
+ * @author Fabrizio Giustina
+ * @version $Revision: 1.1.2.1 $ ($Author: alexsmirnov $)
+ */
+public class AttVal extends Object implements Cloneable
+{
+
+    /**
+     * next AttVal.
+     */
+    protected AttVal next;
+
+    /**
+     * Attribute definition.
+     */
+    protected Attribute dict;
+
+    /**
+     * Asp node.
+     */
+    protected Node asp;
+
+    /**
+     * Php node.
+     */
+    protected Node php;
+
+    /**
+     * Delimiter (" or ').
+     */
+    protected int delim;
+
+    /**
+     * Attribute name.
+     */
+    protected String attribute;
+
+    /**
+     * Attribute value.
+     */
+    protected String value;
+
+    /**
+     * DOM adapter.
+     */
+    protected Attr adapter;
+
+    /**
+     * Instantiates a new empty AttVal.
+     */
+    public AttVal()
+    {
+        super();
+    }
+
+    /**
+     * Instantiates a new AttVal.
+     * @param next next linked AttVal
+     * @param dict Attribute from dictionary
+     * @param delim delimitator for attribute value
+     * @param attribute attribute name
+     * @param value attribute value
+     */
+    public AttVal(AttVal next, Attribute dict, int delim, String attribute, String value)
+    {
+        this.next = next;
+        this.dict = dict;
+        this.delim = delim;
+        this.attribute = attribute;
+        this.value = value;
+    }
+
+    /**
+     * Instantiates a new AttVal.
+     * @param next next linked AttVal
+     * @param dict Attribute from dictionary
+     * @param asp contained asp node
+     * @param php contained php node
+     * @param delim delimitator for attribute value
+     * @param attribute attribute name
+     * @param value attribute value
+     */
+    public AttVal(AttVal next, Attribute dict, Node asp, Node php, int delim, String attribute, String value)
+    {
+        this.next = next;
+        this.dict = dict;
+        this.asp = asp;
+        this.php = php;
+        this.delim = delim;
+        this.attribute = attribute;
+        this.value = value;
+    }
+
+    /**
+     * @see java.lang.Object#clone()
+     */
+    protected Object clone()
+    {
+        AttVal av = null;
+        try
+        {
+            av = (AttVal) super.clone();
+        }
+        catch (CloneNotSupportedException e)
+        {
+            // should never happen
+        }
+
+        if (this.next != null)
+        {
+            av.next = (AttVal) this.next.clone();
+        }
+        if (this.asp != null)
+        {
+            av.asp = (Node) this.asp.clone();
+        }
+        if (this.php != null)
+        {
+            av.php = (Node) this.php.clone();
+        }
+
+        return av;
+    }
+
+    /**
+     * Is this a boolean attribute.
+     * @return <code>true</code> if this is a boolean attribute
+     */
+    public boolean isBoolAttribute()
+    {
+        Attribute attr = this.dict;
+        if (attr != null)
+        {
+            if (attr.getAttrchk() == AttrCheckImpl.BOOL)
+            {
+                return true;
+            }
+        }
+
+        return false;
+    }
+
+    /**
+     * Check the attribute value for uppercase letters (only if the value should be lowercase, required for literal
+     * values in xhtml).
+     * @param lexer Lexer
+     * @param node Node which contains this attribute
+     */
+    void checkLowerCaseAttrValue(Lexer lexer, Node node)
+    {
+        if (this.value == null)
+        {
+            return;
+        }
+
+        String lowercase = this.value.toLowerCase();
+
+        if (!this.value.equals(lowercase))
+        {
+            if (lexer.isvoyager)
+            {
+                lexer.report.attrError(lexer, node, this, Report.ATTR_VALUE_NOT_LCASE);
+            }
+
+            if (lexer.isvoyager || lexer.configuration.lowerLiterals)
+            {
+                this.value = lowercase;
+            }
+        }
+    }
+
+    /**
+     * Check attribute name/value and report errors.
+     * @param lexer Lexer
+     * @param node node which contains this attribute
+     * @return Attribute
+     */
+    public Attribute checkAttribute(Lexer lexer, Node node)
+    {
+        TagTable tt = lexer.configuration.tt;
+
+        Attribute attr = this.dict;
+
+        // ignore unknown attributes for proprietary elements
+        if (attr != null)
+        {
+
+            // if attribute looks like <foo/> check XML is ok
+            if (TidyUtils.toBoolean(attr.getVersions() & Dict.VERS_XML))
+            {
+                if (!(lexer.configuration.xmlTags || lexer.configuration.xmlOut))
+                {
+                    lexer.report.attrError(lexer, node, this, Report.XML_ATTRIBUTE_VALUE);
+                }
+            }
+            // title first appeared in HTML 4.0 except for a/link
+            else if (attr != AttributeTable.attrTitle || !(node.tag == tt.tagA || node.tag == tt.tagLink))
+            {
+                lexer.constrainVersion(attr.getVersions());
+            }
+
+            if (attr.getAttrchk() != null)
+            {
+                attr.getAttrchk().check(lexer, node, this);
+            }
+            else if (TidyUtils.toBoolean(this.dict.getVersions() & Dict.VERS_PROPRIETARY))
+            {
+                lexer.report.attrError(lexer, node, this, Report.PROPRIETARY_ATTRIBUTE);
+            }
+
+        }
+        else if (!lexer.configuration.xmlTags
+            && !(node.tag == null)
+            && this.asp == null
+            && !(node.tag != null && (TidyUtils.toBoolean(node.tag.versions & Dict.VERS_PROPRIETARY))))
+        {
+            lexer.report.attrError(lexer, node, this, Report.UNKNOWN_ATTRIBUTE);
+        }
+
+        return attr;
+    }
+
+    /**
+     * Return the org.w3c.dom.Attr adapter.
+     * @return org.w3c.dom.Attr adapter
+     */
+    protected org.w3c.dom.Attr getAdapter()
+    {
+        if (this.adapter == null)
+        {
+            this.adapter = new DOMAttrImpl(this);
+        }
+        return this.adapter;
+    }
+
+    /**
+     * Getter for <code>asp</code>.
+     * @return Returns the asp.
+     */
+    public Node getAsp()
+    {
+        return this.asp;
+    }
+
+    /**
+     * Setter for <code>asp</code>.
+     * @param asp The asp to set.
+     */
+    public void setAsp(Node asp)
+    {
+        this.asp = asp;
+    }
+
+    /**
+     * Getter for <code>attribute</code>.
+     * @return Returns the attribute.
+     */
+    public String getAttribute()
+    {
+        return this.attribute;
+    }
+
+    /**
+     * Setter for <code>attribute</code>.
+     * @param attribute The attribute to set.
+     */
+    public void setAttribute(String attribute)
+    {
+        this.attribute = attribute;
+    }
+
+    /**
+     * Getter for <code>delim</code>.
+     * @return Returns the delim.
+     */
+    public int getDelim()
+    {
+        return this.delim;
+    }
+
+    /**
+     * Setter for <code>delim</code>.
+     * @param delim The delim to set.
+     */
+    public void setDelim(int delim)
+    {
+        this.delim = delim;
+    }
+
+    /**
+     * Getter for <code>dict</code>.
+     * @return Returns the dict.
+     */
+    public Attribute getDict()
+    {
+        return this.dict;
+    }
+
+    /**
+     * Setter for <code>dict</code>.
+     * @param dict The dict to set.
+     */
+    public void setDict(Attribute dict)
+    {
+        this.dict = dict;
+    }
+
+    /**
+     * Getter for <code>next</code>.
+     * @return Returns the next.
+     */
+    public AttVal getNext()
+    {
+        return this.next;
+    }
+
+    /**
+     * Setter for <code>next</code>.
+     * @param next The next to set.
+     */
+    public void setNext(AttVal next)
+    {
+        this.next = next;
+    }
+
+    /**
+     * Getter for <code>php</code>.
+     * @return Returns the php.
+     */
+    public Node getPhp()
+    {
+        return this.php;
+    }
+
+    /**
+     * Setter for <code>php</code>.
+     * @param php The php to set.
+     */
+    public void setPhp(Node php)
+    {
+        this.php = php;
+    }
+
+    /**
+     * Getter for <code>value</code>.
+     * @return Returns the value.
+     */
+    public String getValue()
+    {
+        return this.value;
+    }
+
+    /**
+     * Setter for <code>value</code>.
+     * @param value The value to set.
+     */
+    public void setValue(String value)
+    {
+        this.value = value;
+    }
+
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/AttrCheck.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/AttrCheck.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/AttrCheck.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,95 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ *  Java HTML Tidy - JTidy
+ *  HTML parser and pretty printer
+ *
+ *  Copyright (c) 1998-2000 World Wide Web Consortium (Massachusetts
+ *  Institute of Technology, Institut National de Recherche en
+ *  Informatique et en Automatique, Keio University). All Rights
+ *  Reserved.
+ *
+ *  Contributing Author(s):
+ *
+ *     Dave Raggett <dsr at w3.org>
+ *     Andy Quick <ac.quick at sympatico.ca> (translation to Java)
+ *     Gary L Peskin <garyp at firstech.com> (Java development)
+ *     Sami Lempinen <sami at lempinen.net> (release management)
+ *     Fabrizio Giustina <fgiust at users.sourceforge.net>
+ *
+ *  The contributing author(s) would like to thank all those who
+ *  helped with testing, bug fixes, and patience.  This wouldn't
+ *  have been possible without all of you.
+ *
+ *  COPYRIGHT NOTICE:
+ * 
+ *  This software and documentation is provided "as is," and
+ *  the copyright holders and contributing author(s) make no
+ *  representations or warranties, express or implied, including
+ *  but not limited to, warranties of merchantability or fitness
+ *  for any particular purpose or that the use of the software or
+ *  documentation will not infringe any third party patents,
+ *  copyrights, trademarks or other rights. 
+ *
+ *  The copyright holders and contributing author(s) will not be
+ *  liable for any direct, indirect, special or consequential damages
+ *  arising out of any use of the software or documentation, even if
+ *  advised of the possibility of such damage.
+ *
+ *  Permission is hereby granted to use, copy, modify, and distribute
+ *  this source code, or portions hereof, documentation and executables,
+ *  for any purpose, without fee, subject to the following restrictions:
+ *
+ *  1. The origin of this source code must not be misrepresented.
+ *  2. Altered versions must be plainly marked as such and must
+ *     not be misrepresented as being the original source.
+ *  3. This Copyright notice may not be removed or altered from any
+ *     source or altered source distribution.
+ * 
+ *  The copyright holders and contributing author(s) specifically
+ *  permit, without fee, and encourage the use of this source code
+ *  as a component for supporting the Hypertext Markup Language in
+ *  commercial products. If you use this source code in a product,
+ *  acknowledgment is not required but would be appreciated.
+ *
+ */
+package org.ajax4jsf.org.w3c.tidy;
+
+/**
+ * Check attribute values.
+ * @author Dave Raggett <a href="mailto:dsr at w3.org">dsr at w3.org </a>
+ * @author Andy Quick <a href="mailto:ac.quick at sympatico.ca">ac.quick at sympatico.ca </a> (translation to Java)
+ * @author Fabrizio Giustina
+ * @version $Revision: 1.1.2.1 $ ($Author: alexsmirnov $)
+ */
+public interface AttrCheck
+{
+
+    /**
+     * Check the value of an attribute.
+     * @param lexer Lexer
+     * @param node current Node
+     * @param attval attribute value
+     */
+    void check(Lexer lexer, Node node, AttVal attval);
+
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/AttrCheckImpl.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/AttrCheckImpl.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/AttrCheckImpl.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1125 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ *  Java HTML Tidy - JTidy
+ *  HTML parser and pretty printer
+ *
+ *  Copyright (c) 1998-2000 World Wide Web Consortium (Massachusetts
+ *  Institute of Technology, Institut National de Recherche en
+ *  Informatique et en Automatique, Keio University). All Rights
+ *  Reserved.
+ *
+ *  Contributing Author(s):
+ *
+ *     Dave Raggett <dsr at w3.org>
+ *     Andy Quick <ac.quick at sympatico.ca> (translation to Java)
+ *     Gary L Peskin <garyp at firstech.com> (Java development)
+ *     Sami Lempinen <sami at lempinen.net> (release management)
+ *     Fabrizio Giustina <fgiust at users.sourceforge.net>
+ *
+ *  The contributing author(s) would like to thank all those who
+ *  helped with testing, bug fixes, and patience.  This wouldn't
+ *  have been possible without all of you.
+ *
+ *  COPYRIGHT NOTICE:
+ * 
+ *  This software and documentation is provided "as is," and
+ *  the copyright holders and contributing author(s) make no
+ *  representations or warranties, express or implied, including
+ *  but not limited to, warranties of merchantability or fitness
+ *  for any particular purpose or that the use of the software or
+ *  documentation will not infringe any third party patents,
+ *  copyrights, trademarks or other rights. 
+ *
+ *  The copyright holders and contributing author(s) will not be
+ *  liable for any direct, indirect, special or consequential damages
+ *  arising out of any use of the software or documentation, even if
+ *  advised of the possibility of such damage.
+ *
+ *  Permission is hereby granted to use, copy, modify, and distribute
+ *  this source code, or portions hereof, documentation and executables,
+ *  for any purpose, without fee, subject to the following restrictions:
+ *
+ *  1. The origin of this source code must not be misrepresented.
+ *  2. Altered versions must be plainly marked as such and must
+ *     not be misrepresented as being the original source.
+ *  3. This Copyright notice may not be removed or altered from any
+ *     source or altered source distribution.
+ * 
+ *  The copyright holders and contributing author(s) specifically
+ *  permit, without fee, and encourage the use of this source code
+ *  as a component for supporting the Hypertext Markup Language in
+ *  commercial products. If you use this source code in a product,
+ *  acknowledgment is not required but would be appreciated.
+ *
+ */
+package org.ajax4jsf.org.w3c.tidy;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+
+/**
+ * Check attribute values implementations.
+ * @author Dave Raggett <a href="mailto:dsr at w3.org">dsr at w3.org </a>
+ * @author Andy Quick <a href="mailto:ac.quick at sympatico.ca">ac.quick at sympatico.ca </a> (translation to Java)
+ * @author Fabrizio Giustina
+ * @version $Revision: 1.1.2.1 $ ($Author: alexsmirnov $)
+ */
+public final class AttrCheckImpl
+{
+
+    /**
+     * checker for URLs.
+     */
+    public static final AttrCheck URL = new CheckUrl();
+
+    /**
+     * checker for scripts.
+     */
+    public static final AttrCheck SCRIPT = new CheckScript();
+
+    /**
+     * checker for "name" attribute.
+     */
+    public static final AttrCheck NAME = new CheckName();
+
+    /**
+     * checker for ids.
+     */
+    public static final AttrCheck ID = new CheckId();
+
+    /**
+     * checker for "align" attribute.
+     */
+    public static final AttrCheck ALIGN = new CheckAlign();
+
+    /**
+     * checker for "valign" attribute.
+     */
+    public static final AttrCheck VALIGN = new CheckValign();
+
+    /**
+     * checker for boolean attributes.
+     */
+    public static final AttrCheck BOOL = new CheckBool();
+
+    /**
+     * checker for "lenght" attribute.
+     */
+    public static final AttrCheck LENGTH = new CheckLength();
+
+    /**
+     * checker for "target" attribute.
+     */
+    public static final AttrCheck TARGET = new CheckTarget();
+
+    /**
+     * checker for "submit" attribute.
+     */
+    public static final AttrCheck FSUBMIT = new CheckFsubmit();
+
+    /**
+     * checker for "clear" attribute.
+     */
+    public static final AttrCheck CLEAR = new CheckClear();
+
+    /**
+     * checker for "shape" attribute.
+     */
+    public static final AttrCheck SHAPE = new CheckShape();
+
+    /**
+     * checker for "number" attribute.
+     */
+    public static final AttrCheck NUMBER = new CheckNumber();
+
+    /**
+     * checker for "scope" attribute.
+     */
+    public static final AttrCheck SCOPE = new CheckScope();
+
+    /**
+     * checker for "color" attribute.
+     */
+    public static final AttrCheck COLOR = new CheckColor();
+
+    /**
+     * checker for "vtype" attribute.
+     */
+    public static final AttrCheck VTYPE = new CheckVType();
+
+    /**
+     * checker for "scroll" attribute.
+     */
+    public static final AttrCheck SCROLL = new CheckScroll();
+
+    /**
+     * checker for "dir" attribute.
+     */
+    public static final AttrCheck TEXTDIR = new CheckTextDir();
+
+    /**
+     * checker for "lang" and "xml:lang" attributes.
+     */
+    public static final AttrCheck LANG = new CheckLang();
+
+    /**
+     * checker for text attributes. Actually null (no validation).
+     */
+    public static final AttrCheck TEXT = null;
+
+    /**
+     * checker for "charset" attribute. Actually null (no validation).
+     */
+    public static final AttrCheck CHARSET = null;
+
+    /**
+     * checker for "type" attribute. Actually null (no validation).
+     */
+    public static final AttrCheck TYPE = null;
+
+    /**
+     * checker for attributes that can contain a single character. Actually null (no validation).
+     */
+    public static final AttrCheck CHARACTER = null;
+
+    /**
+     * checker for attributes which contain a list of urls. Actually null (no validation).
+     */
+    public static final AttrCheck URLS = null;
+
+    /**
+     * checker for "cols" attribute. Actually null (no validation).
+     */
+    public static final AttrCheck COLS = null;
+
+    /**
+     * checker for "coords" attribute. Actually null (no validation).
+     */
+    public static final AttrCheck COORDS = null;
+
+    /**
+     * checker for attributes containing dates. Actually null (no validation).
+     */
+    public static final AttrCheck DATE = null;
+
+    /**
+     * checker for attributes referencng an id. Actually null (no validation).
+     */
+    public static final AttrCheck IDREF = null;
+
+    /**
+     * checker for table "frame" attribute. Actually null (no validation).
+     */
+    public static final AttrCheck TFRAME = null;
+
+    /**
+     * checker for "frameborder" attribute. Actually null (no validation).
+     */
+    public static final AttrCheck FBORDER = null;
+
+    /**
+     * checker for "media" attribute. Actually null (no validation).
+     */
+    public static final AttrCheck MEDIA = null;
+
+    /**
+     * checker for "rel" and "rev" attributes. Actually null (no validation).
+     */
+    public static final AttrCheck LINKTYPES = null;
+
+    /**
+     * checker for table "rules" attribute. Actually null (no validation).
+     */
+    public static final AttrCheck TRULES = null;
+
+    /**
+     * utility class, don't instantiate.
+     */
+    private AttrCheckImpl()
+    {
+        // empty private constructor
+    }
+
+    /**
+     * AttrCheck implementation for checking URLs.
+     */
+    public static class CheckUrl implements AttrCheck
+    {
+
+        /**
+         * @see AttrCheck#check(Lexer, Node, AttVal)
+         */
+        public void check(Lexer lexer, Node node, AttVal attval)
+        {
+            char c;
+            StringBuffer dest;
+            boolean escapeFound = false;
+            boolean backslashFound = false;
+            int i = 0;
+
+            if (attval.value == null)
+            {
+                lexer.report.attrError(lexer, node, attval, Report.MISSING_ATTR_VALUE);
+                return;
+            }
+
+            String p = attval.value;
+
+            for (i = 0; i < p.length(); ++i)
+            {
+                c = p.charAt(i);
+                // find \
+                if (c == '\\')
+                {
+                    backslashFound = true;
+                }
+                // find non-ascii chars
+                else if ((c > 0x7e) || (c <= 0x20) || (c == '<') || (c == '>'))
+                {
+                    escapeFound = true;
+                }
+            }
+
+            // backslashes found, fix them
+            if (lexer.configuration.fixBackslash && backslashFound)
+            {
+                attval.value = attval.value.replace('\\', '/');
+                p = attval.value;
+            }
+
+            // non-ascii chars found, fix them
+            if (lexer.configuration.fixUri && escapeFound)
+            {
+                dest = new StringBuffer();
+
+                for (i = 0; i < p.length(); ++i)
+                {
+                    c = p.charAt(i);
+                    if ((c > 0x7e) || (c <= 0x20) || (c == '<') || (c == '>'))
+                    {
+                        dest.append('%');
+                        dest.append(Integer.toHexString(c).toUpperCase());
+                    }
+                    else
+                    {
+                        dest.append(c);
+                    }
+                }
+
+                attval.value = dest.toString();
+            }
+            if (backslashFound)
+            {
+                if (lexer.configuration.fixBackslash)
+                {
+                    lexer.report.attrError(lexer, node, attval, Report.FIXED_BACKSLASH);
+                }
+                else
+                {
+                    lexer.report.attrError(lexer, node, attval, Report.BACKSLASH_IN_URI);
+                }
+            }
+            if (escapeFound)
+            {
+                if (lexer.configuration.fixUri)
+                {
+                    lexer.report.attrError(lexer, node, attval, Report.ESCAPED_ILLEGAL_URI);
+                }
+                else
+                {
+                    lexer.report.attrError(lexer, node, attval, Report.ILLEGAL_URI_REFERENCE);
+                }
+
+                lexer.badChars |= Report.INVALID_URI;
+            }
+
+        }
+    }
+
+    /**
+     * AttrCheck implementation for checking scripts.
+     */
+    public static class CheckScript implements AttrCheck
+    {
+
+        /**
+         * @see AttrCheck#check(Lexer, Node, AttVal)
+         */
+        public void check(Lexer lexer, Node node, AttVal attval)
+        {
+            // not implemented
+        }
+
+    }
+
+    /**
+     * AttrCheck implementation for checking the "align" attribute.
+     */
+    public static class CheckAlign implements AttrCheck
+    {
+
+        /**
+         * valid values for this attribute.
+         */
+        private static final String[] VALID_VALUES = new String[]{"left", "center", "right", "justify"};
+
+        /**
+         * @see AttrCheck#check(Lexer, Node, AttVal)
+         */
+        public void check(Lexer lexer, Node node, AttVal attval)
+        {
+            // IMG, OBJECT, APPLET and EMBED use align for vertical position
+            if (node.tag != null && ((node.tag.model & Dict.CM_IMG) != 0))
+            {
+                VALIGN.check(lexer, node, attval);
+                return;
+            }
+
+            if (attval.value == null)
+            {
+                lexer.report.attrError(lexer, node, attval, Report.MISSING_ATTR_VALUE);
+                return;
+            }
+
+            attval.checkLowerCaseAttrValue(lexer, node);
+
+            if (!TidyUtils.isInValuesIgnoreCase(VALID_VALUES, attval.value))
+            {
+                lexer.report.attrError(lexer, node, attval, Report.BAD_ATTRIBUTE_VALUE);
+            }
+        }
+
+    }
+
+    /**
+     * AttrCheck implementation for checking the "valign" attribute.
+     */
+    public static class CheckValign implements AttrCheck
+    {
+
+        /**
+         * valid values for this attribute.
+         */
+        private static final String[] VALID_VALUES = new String[]{"top", "middle", "bottom", "baseline"};
+
+        /**
+         * valid values for this attribute (only for img tag).
+         */
+        private static final String[] VALID_VALUES_IMG = new String[]{"left", "right"};
+
+        /**
+         * proprietary values for this attribute.
+         */
+        private static final String[] VALID_VALUES_PROPRIETARY = new String[]{
+            "texttop",
+            "absmiddle",
+            "absbottom",
+            "textbottom"};
+
+        /**
+         * @see AttrCheck#check(Lexer, Node, AttVal)
+         */
+        public void check(Lexer lexer, Node node, AttVal attval)
+        {
+            String value;
+
+            if (attval.value == null)
+            {
+                lexer.report.attrError(lexer, node, attval, Report.MISSING_ATTR_VALUE);
+                return;
+            }
+
+            attval.checkLowerCaseAttrValue(lexer, node);
+
+            value = attval.value;
+
+            if (TidyUtils.isInValuesIgnoreCase(VALID_VALUES, value))
+            {
+                // all is fine
+                return;
+            }
+
+            if (TidyUtils.isInValuesIgnoreCase(VALID_VALUES_IMG, value))
+            {
+                if (!(node.tag != null && ((node.tag.model & Dict.CM_IMG) != 0)))
+                {
+                    lexer.report.attrError(lexer, node, attval, Report.BAD_ATTRIBUTE_VALUE);
+                }
+            }
+            else if (TidyUtils.isInValuesIgnoreCase(VALID_VALUES_PROPRIETARY, value))
+            {
+                lexer.constrainVersion(Dict.VERS_PROPRIETARY);
+                lexer.report.attrError(lexer, node, attval, Report.PROPRIETARY_ATTR_VALUE);
+            }
+            else
+            {
+                lexer.report.attrError(lexer, node, attval, Report.BAD_ATTRIBUTE_VALUE);
+            }
+        }
+
+    }
+
+    /**
+     * AttrCheck implementation for checking boolean attributes.
+     */
+    public static class CheckBool implements AttrCheck
+    {
+
+        /**
+         * @see AttrCheck#check(Lexer, Node, AttVal)
+         */
+        public void check(Lexer lexer, Node node, AttVal attval)
+        {
+            if (attval.value == null)
+            {
+                return;
+            }
+
+            attval.checkLowerCaseAttrValue(lexer, node);
+        }
+
+    }
+
+    /**
+     * AttrCheck implementation for checking the "length" attribute.
+     */
+    public static class CheckLength implements AttrCheck
+    {
+
+        /**
+         * @see AttrCheck#check(Lexer, Node, AttVal)
+         */
+        public void check(Lexer lexer, Node node, AttVal attval)
+        {
+
+            if (attval.value == null)
+            {
+                lexer.report.attrError(lexer, node, attval, Report.MISSING_ATTR_VALUE);
+                return;
+            }
+
+            // don't check for <col width=...> and <colgroup width=...>
+            if ("width".equalsIgnoreCase(attval.attribute)
+                && (node.tag == lexer.configuration.tt.tagCol || node.tag == lexer.configuration.tt.tagColgroup))
+            {
+                return;
+            }
+
+            String p = attval.value;
+
+            if (p.length() == 0 || (!Character.isDigit(p.charAt(0)) && !('%' == p.charAt(0))))
+            {
+                lexer.report.attrError(lexer, node, attval, Report.BAD_ATTRIBUTE_VALUE);
+            }
+            else
+            {
+
+                TagTable tt = lexer.configuration.tt;
+
+                for (int j = 1; j < p.length(); j++)
+                {
+                    // elements th and td must not use percentages
+                    if ((!Character.isDigit(p.charAt(j)) && (node.tag == tt.tagTd || node.tag == tt.tagTh))
+                        || (!Character.isDigit(p.charAt(j)) && p.charAt(j) != '%'))
+                    {
+                        lexer.report.attrError(lexer, node, attval, Report.BAD_ATTRIBUTE_VALUE);
+                        break;
+                    }
+                }
+            }
+        }
+    }
+
+    /**
+     * AttrCheck implementation for checking the "target" attribute.
+     */
+    public static class CheckTarget implements AttrCheck
+    {
+
+        /**
+         * valid values for this attribute.
+         */
+        private static final String[] VALID_VALUES = new String[]{"_blank", "_self", "_parent", "_top"};
+
+        /**
+         * @see AttrCheck#check(Lexer, Node, AttVal)
+         */
+        public void check(Lexer lexer, Node node, AttVal attval)
+        {
+
+            // No target attribute in strict HTML versions
+            lexer.constrainVersion(~Dict.VERS_HTML40_STRICT);
+
+            if (attval.value == null || attval.value.length() == 0)
+            {
+                lexer.report.attrError(lexer, node, attval, Report.MISSING_ATTR_VALUE);
+                return;
+            }
+
+            String value = attval.value;
+
+            // target names must begin with A-Za-z ...
+            if (Character.isLetter(value.charAt(0)))
+            {
+                return;
+            }
+
+            // or be one of _blank, _self, _parent and _top
+            if (!TidyUtils.isInValuesIgnoreCase(VALID_VALUES, value))
+            {
+                lexer.report.attrError(lexer, node, attval, Report.BAD_ATTRIBUTE_VALUE);
+            }
+
+        }
+    }
+
+    /**
+     * AttrCheck implementation for checking the "submit" attribute.
+     */
+    public static class CheckFsubmit implements AttrCheck
+    {
+
+        /**
+         * valid values for this attribute.
+         */
+        private static final String[] VALID_VALUES = new String[]{"get", "post"};
+
+        /**
+         * @see AttrCheck#check(Lexer, Node, AttVal)
+         */
+        public void check(Lexer lexer, Node node, AttVal attval)
+        {
+            if (attval.value == null)
+            {
+                lexer.report.attrError(lexer, node, attval, Report.MISSING_ATTR_VALUE);
+                return;
+            }
+
+            attval.checkLowerCaseAttrValue(lexer, node);
+
+            if (!TidyUtils.isInValuesIgnoreCase(VALID_VALUES, attval.value))
+            {
+                lexer.report.attrError(lexer, node, attval, Report.BAD_ATTRIBUTE_VALUE);
+            }
+        }
+    }
+
+    /**
+     * AttrCheck implementation for checking the "clear" attribute.
+     */
+    public static class CheckClear implements AttrCheck
+    {
+
+        /**
+         * valid values for this attribute.
+         */
+        private static final String[] VALID_VALUES = new String[]{"none", "left", "right", "all"};
+
+        /**
+         * @see AttrCheck#check(Lexer, Node, AttVal)
+         */
+        public void check(Lexer lexer, Node node, AttVal attval)
+        {
+            if (attval.value == null)
+            {
+                lexer.report.attrError(lexer, node, attval, Report.MISSING_ATTR_VALUE);
+                attval.value = VALID_VALUES[0];
+                return;
+            }
+
+            attval.checkLowerCaseAttrValue(lexer, node);
+
+            if (!TidyUtils.isInValuesIgnoreCase(VALID_VALUES, attval.value))
+            {
+                lexer.report.attrError(lexer, node, attval, Report.BAD_ATTRIBUTE_VALUE);
+            }
+
+        }
+    }
+
+    /**
+     * AttrCheck implementation for checking the "shape" attribute.
+     */
+    public static class CheckShape implements AttrCheck
+    {
+
+        /**
+         * valid values for this attribute.
+         */
+        private static final String[] VALID_VALUES = new String[]{"rect", "default", "circle", "poly"};
+
+        /**
+         * @see AttrCheck#check(Lexer, Node, AttVal)
+         */
+        public void check(Lexer lexer, Node node, AttVal attval)
+        {
+            if (attval.value == null)
+            {
+                lexer.report.attrError(lexer, node, attval, Report.MISSING_ATTR_VALUE);
+                return;
+            }
+
+            attval.checkLowerCaseAttrValue(lexer, node);
+
+            if (!TidyUtils.isInValuesIgnoreCase(VALID_VALUES, attval.value))
+            {
+                lexer.report.attrError(lexer, node, attval, Report.BAD_ATTRIBUTE_VALUE);
+            }
+
+        }
+    }
+
+    /**
+     * AttrCheck implementation for checking Scope.
+     */
+    public static class CheckScope implements AttrCheck
+    {
+
+        /**
+         * valid values for this attribute.
+         */
+        private static final String[] VALID_VALUES = new String[]{"row", "rowgroup", "col", "colgroup"};
+
+        /**
+         * @see AttrCheck#check(Lexer, Node, AttVal)
+         */
+        public void check(Lexer lexer, Node node, AttVal attval)
+        {
+
+            if (attval.value == null)
+            {
+                lexer.report.attrError(lexer, node, attval, Report.MISSING_ATTR_VALUE);
+                return;
+            }
+
+            attval.checkLowerCaseAttrValue(lexer, node);
+
+            if (!TidyUtils.isInValuesIgnoreCase(VALID_VALUES, attval.value))
+            {
+                lexer.report.attrError(lexer, node, attval, Report.BAD_ATTRIBUTE_VALUE);
+            }
+        }
+    }
+
+    /**
+     * AttrCheck implementation for checking numbers.
+     */
+    public static class CheckNumber implements AttrCheck
+    {
+
+        /**
+         * @see AttrCheck#check(Lexer, Node, AttVal)
+         */
+        public void check(Lexer lexer, Node node, AttVal attval)
+        {
+
+            if (attval.value == null)
+            {
+                lexer.report.attrError(lexer, node, attval, Report.MISSING_ATTR_VALUE);
+                return;
+            }
+
+            // don't check <frameset cols=... rows=...>
+            if (("cols".equalsIgnoreCase(attval.attribute) || "rows".equalsIgnoreCase(attval.attribute))
+                && node.tag == lexer.configuration.tt.tagFrameset)
+            {
+                return;
+            }
+
+            String value = attval.value;
+
+            int j = 0;
+
+            // font size may be preceded by + or -
+            if (node.tag == lexer.configuration.tt.tagFont && (value.startsWith("+") || value.startsWith("-")))
+            {
+                ++j;
+            }
+
+            for (; j < value.length(); j++)
+            {
+                char p = value.charAt(j);
+                if (!Character.isDigit(p))
+                {
+                    lexer.report.attrError(lexer, node, attval, Report.BAD_ATTRIBUTE_VALUE);
+                    break;
+                }
+            }
+        }
+    }
+
+    /**
+     * AttrCheck implementation for checking ids.
+     */
+    public static class CheckId implements AttrCheck
+    {
+
+        /**
+         * @see AttrCheck#check(Lexer, Node, AttVal)
+         */
+        public void check(Lexer lexer, Node node, AttVal attval)
+        {
+            Node old;
+
+            if (attval.value == null || attval.value.length() == 0)
+            {
+                lexer.report.attrError(lexer, node, attval, Report.MISSING_ATTR_VALUE);
+                return;
+            }
+
+            String p = attval.value;
+            char s = p.charAt(0);
+
+            if (p.length() == 0 || !( Character.isLetter( s ) || s=='_' ))
+            {
+                if (lexer.isvoyager && (TidyUtils.isXMLLetter(s) || s == ':'))
+                {
+                    lexer.report.attrError(lexer, node, attval, Report.XML_ID_SYNTAX);
+                }
+                else
+                {
+                    lexer.report.attrError(lexer, node, attval, Report.BAD_ATTRIBUTE_VALUE);
+                }
+            }
+            else
+            {
+
+                for (int j = 1; j < p.length(); j++)
+                {
+                    s = p.charAt(j);
+
+                    if (!TidyUtils.isNamechar(s))
+                    {
+                        if (lexer.isvoyager && TidyUtils.isXMLNamechar(s))
+                        {
+                            lexer.report.attrError(lexer, node, attval, Report.XML_ID_SYNTAX);
+                        }
+                        else
+                        {
+                            lexer.report.attrError(lexer, node, attval, Report.BAD_ATTRIBUTE_VALUE);
+                        }
+                        break;
+                    }
+                }
+            }
+
+            if (((old = lexer.configuration.tt.getNodeByAnchor(attval.value)) != null) && old != node)
+            {
+                lexer.report.attrError(lexer, node, attval, Report.ANCHOR_NOT_UNIQUE);
+            }
+            else
+            {
+                lexer.configuration.tt.anchorList = lexer.configuration.tt.addAnchor(attval.value, node);
+            }
+        }
+
+    }
+
+    /**
+     * AttrCheck implementation for checking the "name" attribute.
+     */
+    public static class CheckName implements AttrCheck
+    {
+
+        /**
+         * @see AttrCheck#check(Lexer, Node, AttVal)
+         */
+        public void check(Lexer lexer, Node node, AttVal attval)
+        {
+            Node old;
+
+            if (attval.value == null)
+            {
+                lexer.report.attrError(lexer, node, attval, Report.MISSING_ATTR_VALUE);
+                return;
+            }
+            else if (lexer.configuration.tt.isAnchorElement(node))
+            {
+                lexer.constrainVersion(~Dict.VERS_XHTML11);
+
+                if (((old = lexer.configuration.tt.getNodeByAnchor(attval.value)) != null) && old != node)
+                {
+                    lexer.report.attrError(lexer, node, attval, Report.ANCHOR_NOT_UNIQUE);
+                }
+                else
+                {
+                    lexer.configuration.tt.anchorList = lexer.configuration.tt.addAnchor(attval.value, node);
+                }
+            }
+        }
+
+    }
+
+    /**
+     * AttrCheck implementation for checking colors.
+     */
+    public static class CheckColor implements AttrCheck
+    {
+
+        /**
+         * valid html colors.
+         */
+        private static final Map COLORS = new HashMap();
+
+        static
+        {
+            COLORS.put("black", "#000000");
+            COLORS.put("green", "#008000");
+            COLORS.put("silver", "#C0C0C0");
+            COLORS.put("lime", "#00FF00");
+            COLORS.put("gray", "#808080");
+            COLORS.put("olive", "#808000");
+            COLORS.put("white", "#FFFFFF");
+            COLORS.put("yellow", "#FFFF00");
+            COLORS.put("maroon", "#800000");
+            COLORS.put("navy", "#000080");
+            COLORS.put("red", "#FF0000");
+            COLORS.put("blue", "#0000FF");
+            COLORS.put("purple", "#800080");
+            COLORS.put("teal", "#008080");
+            COLORS.put("fuchsia", "#FF00FF");
+            COLORS.put("aqua", "#00FFFF");
+        }
+
+        /**
+         * @see AttrCheck#check(Lexer, Node, AttVal)
+         */
+        public void check(Lexer lexer, Node node, AttVal attval)
+        {
+            boolean hexUppercase = true;
+            boolean invalid = false;
+            boolean found = false;
+
+            if (attval.value == null || attval.value.length() == 0)
+            {
+                lexer.report.attrError(lexer, node, attval, Report.MISSING_ATTR_VALUE);
+                return;
+            }
+
+            String given = attval.value;
+
+            Iterator colorIter = COLORS.entrySet().iterator();
+
+            while (colorIter.hasNext())
+            {
+                Map.Entry color = (Map.Entry) colorIter.next();
+
+                if (given.charAt(0) == '#')
+                {
+                    if (given.length() != 7)
+                    {
+                        lexer.report.attrError(lexer, node, attval, Report.BAD_ATTRIBUTE_VALUE);
+                        invalid = true;
+                        break;
+                    }
+                    else if (given.equalsIgnoreCase((String) color.getValue()))
+                    {
+                        if (lexer.configuration.replaceColor)
+                        {
+                            attval.value = (String) color.getKey();
+                        }
+                        found = true;
+                        break;
+                    }
+                }
+                else if (TidyUtils.isLetter(given.charAt(0)))
+                {
+                    if (given.equalsIgnoreCase((String) color.getKey()))
+                    {
+                        if (lexer.configuration.replaceColor)
+                        {
+                            attval.value = (String) color.getKey();
+                        }
+                        found = true;
+                        break;
+                    }
+                }
+                else
+                {
+
+                    lexer.report.attrError(lexer, node, attval, Report.BAD_ATTRIBUTE_VALUE);
+
+                    invalid = true;
+                    break;
+                }
+            }
+            if (!found && !invalid)
+            {
+                if (given.charAt(0) == '#')
+                {
+                    // check if valid hex digits and letters
+
+                    for (int i = 1; i < 7; ++i)
+                    {
+                        if (!TidyUtils.isDigit(given.charAt(i))
+                            && ("abcdef".indexOf(Character.toLowerCase(given.charAt(i))) == -1))
+                        {
+                            lexer.report.attrError(lexer, node, attval, Report.BAD_ATTRIBUTE_VALUE);
+                            invalid = true;
+                            break;
+                        }
+                    }
+                    // convert hex letters to uppercase
+                    if (!invalid && hexUppercase)
+                    {
+                        for (int i = 1; i < 7; ++i)
+                        {
+                            attval.value = given.toUpperCase();
+                        }
+                    }
+                }
+
+                else
+                {
+                    // we could search for more colors and mark the file as HTML Proprietary, but I don't thinks
+                    // it's worth the effort, so values not in HTML 4.01 are invalid
+                    lexer.report.attrError(lexer, node, attval, Report.BAD_ATTRIBUTE_VALUE);
+                    invalid = true;
+                }
+            }
+        }
+    }
+
+    /**
+     * AttrCheck implementation for checking valuetype.
+     */
+    public static class CheckVType implements AttrCheck
+    {
+
+        /**
+         * valid values for this attribute.
+         */
+        private static final String[] VALID_VALUES = new String[]{"data", "object", "ref"};
+
+        /**
+         * @see AttrCheck#check(Lexer, Node, AttVal)
+         */
+        public void check(Lexer lexer, Node node, AttVal attval)
+        {
+            if (attval.value == null)
+            {
+                lexer.report.attrError(lexer, node, attval, Report.MISSING_ATTR_VALUE);
+                return;
+            }
+
+            attval.checkLowerCaseAttrValue(lexer, node);
+
+            if (!TidyUtils.isInValuesIgnoreCase(VALID_VALUES, attval.value))
+            {
+                lexer.report.attrError(lexer, node, attval, Report.BAD_ATTRIBUTE_VALUE);
+            }
+        }
+    }
+
+    /**
+     * AttrCheck implementation for checking scroll.
+     */
+    public static class CheckScroll implements AttrCheck
+    {
+
+        /**
+         * valid values for this attribute.
+         */
+        private static final String[] VALID_VALUES = new String[]{"no", "yes", "auto"};
+
+        /**
+         * @see AttrCheck#check(Lexer, Node, AttVal)
+         */
+        public void check(Lexer lexer, Node node, AttVal attval)
+        {
+
+            if (attval.value == null)
+            {
+                lexer.report.attrError(lexer, node, attval, Report.MISSING_ATTR_VALUE);
+                return;
+            }
+
+            attval.checkLowerCaseAttrValue(lexer, node);
+
+            if (!TidyUtils.isInValuesIgnoreCase(VALID_VALUES, attval.value))
+            {
+                lexer.report.attrError(lexer, node, attval, Report.BAD_ATTRIBUTE_VALUE);
+            }
+        }
+    }
+
+    /**
+     * AttrCheck implementation for checking dir.
+     */
+    public static class CheckTextDir implements AttrCheck
+    {
+
+        /**
+         * valid values for this attribute.
+         */
+        private static final String[] VALID_VALUES = new String[]{"rtl", "ltr"};
+
+        /**
+         * @see AttrCheck#check(Lexer, Node, AttVal)
+         */
+        public void check(Lexer lexer, Node node, AttVal attval)
+        {
+
+            if (attval.value == null)
+            {
+                lexer.report.attrError(lexer, node, attval, Report.MISSING_ATTR_VALUE);
+                return;
+            }
+
+            attval.checkLowerCaseAttrValue(lexer, node);
+
+            if (!TidyUtils.isInValuesIgnoreCase(VALID_VALUES, attval.value))
+            {
+                lexer.report.attrError(lexer, node, attval, Report.BAD_ATTRIBUTE_VALUE);
+            }
+        }
+    }
+
+    /**
+     * AttrCheck implementation for checking lang and xml:lang.
+     */
+    public static class CheckLang implements AttrCheck
+    {
+
+        /**
+         * @see AttrCheck#check(Lexer, Node, AttVal)
+         */
+        public void check(Lexer lexer, Node node, AttVal attval)
+        {
+
+            if ("lang".equals(attval.attribute))
+            {
+                lexer.constrainVersion(~Dict.VERS_XHTML11);
+            }
+
+            if (attval.value == null)
+            {
+                lexer.report.attrError(lexer, node, attval, Report.MISSING_ATTR_VALUE);
+                return;
+            }
+        }
+    }
+
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/Attribute.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/Attribute.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/Attribute.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,189 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ *  Java HTML Tidy - JTidy
+ *  HTML parser and pretty printer
+ *
+ *  Copyright (c) 1998-2000 World Wide Web Consortium (Massachusetts
+ *  Institute of Technology, Institut National de Recherche en
+ *  Informatique et en Automatique, Keio University). All Rights
+ *  Reserved.
+ *
+ *  Contributing Author(s):
+ *
+ *     Dave Raggett <dsr at w3.org>
+ *     Andy Quick <ac.quick at sympatico.ca> (translation to Java)
+ *     Gary L Peskin <garyp at firstech.com> (Java development)
+ *     Sami Lempinen <sami at lempinen.net> (release management)
+ *     Fabrizio Giustina <fgiust at users.sourceforge.net>
+ *
+ *  The contributing author(s) would like to thank all those who
+ *  helped with testing, bug fixes, and patience.  This wouldn't
+ *  have been possible without all of you.
+ *
+ *  COPYRIGHT NOTICE:
+ * 
+ *  This software and documentation is provided "as is," and
+ *  the copyright holders and contributing author(s) make no
+ *  representations or warranties, express or implied, including
+ *  but not limited to, warranties of merchantability or fitness
+ *  for any particular purpose or that the use of the software or
+ *  documentation will not infringe any third party patents,
+ *  copyrights, trademarks or other rights. 
+ *
+ *  The copyright holders and contributing author(s) will not be
+ *  liable for any direct, indirect, special or consequential damages
+ *  arising out of any use of the software or documentation, even if
+ *  advised of the possibility of such damage.
+ *
+ *  Permission is hereby granted to use, copy, modify, and distribute
+ *  this source code, or portions hereof, documentation and executables,
+ *  for any purpose, without fee, subject to the following restrictions:
+ *
+ *  1. The origin of this source code must not be misrepresented.
+ *  2. Altered versions must be plainly marked as such and must
+ *     not be misrepresented as being the original source.
+ *  3. This Copyright notice may not be removed or altered from any
+ *     source or altered source distribution.
+ * 
+ *  The copyright holders and contributing author(s) specifically
+ *  permit, without fee, and encourage the use of this source code
+ *  as a component for supporting the Hypertext Markup Language in
+ *  commercial products. If you use this source code in a product,
+ *  acknowledgment is not required but would be appreciated.
+ *
+ */
+package org.ajax4jsf.org.w3c.tidy;
+
+/**
+ * HTML attribute.
+ * @author Dave Raggett <a href="mailto:dsr at w3.org">dsr at w3.org </a>
+ * @author Andy Quick <a href="mailto:ac.quick at sympatico.ca">ac.quick at sympatico.ca </a> (translation to Java)
+ * @author Fabrizio Giustina
+ * @version $Revision: 1.1.2.1 $ ($Author: alexsmirnov $)
+ */
+public class Attribute
+{
+
+    /**
+     * attribute name.
+     */
+    private String name;
+
+    /**
+     * don't wrap attribute.
+     */
+    private boolean nowrap;
+
+    /**
+     * unmodifiable attribute?
+     */
+    private boolean literal;
+
+    /**
+     * html versions for this attribute.
+     */
+    private short versions;
+
+    /**
+     * checker for the attribute.
+     */
+    private AttrCheck attrchk;
+
+    /**
+     * Instantiates a new Attribute.
+     * @param attributeName attribute name
+     * @param htmlVersions versions in which this attribute is supported
+     * @param check AttrCheck instance
+     */
+    public Attribute(String attributeName, short htmlVersions, AttrCheck check)
+    {
+        this.name = attributeName;
+        this.versions = htmlVersions;
+        this.attrchk = check;
+    }
+
+    /**
+     * Is this a literal (unmodifiable) attribute?
+     * @param isLiteral boolean <code>true</code> for a literal attribute
+     */
+    public void setLiteral(boolean isLiteral)
+    {
+        this.literal = isLiteral;
+    }
+
+    /**
+     * Don't wrap this attribute?
+     * @param isNowrap boolean <code>true</code>= don't wrap
+     */
+    public void setNowrap(boolean isNowrap)
+    {
+        this.nowrap = isNowrap;
+    }
+
+    /**
+     * Returns the checker for this attribute.
+     * @return instance of AttrCheck.
+     */
+    public AttrCheck getAttrchk()
+    {
+        return this.attrchk;
+    }
+
+    /**
+     * Is this a literal (unmodifiable) attribute?
+     * @return <code>true</code> for a literal attribute
+     */
+    public boolean isLiteral()
+    {
+        return this.literal;
+    }
+
+    /**
+     * Returns the attribute name.
+     * @return attribute name.
+     */
+    public String getName()
+    {
+        return this.name;
+    }
+
+    /**
+     * Don't wrap this attribute?
+     * @return <code>true</code>= don't wrap
+     */
+    public boolean isNowrap()
+    {
+        return this.nowrap;
+    }
+
+    /**
+     * Returns the html versions in which this attribute is supported.
+     * @return html versions for this attribute.
+     * @see Dict
+     */
+    public short getVersions()
+    {
+        return this.versions;
+    }
+
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/AttributeTable.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/AttributeTable.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/AttributeTable.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,485 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ *  Java HTML Tidy - JTidy
+ *  HTML parser and pretty printer
+ *
+ *  Copyright (c) 1998-2000 World Wide Web Consortium (Massachusetts
+ *  Institute of Technology, Institut National de Recherche en
+ *  Informatique et en Automatique, Keio University). All Rights
+ *  Reserved.
+ *
+ *  Contributing Author(s):
+ *
+ *     Dave Raggett <dsr at w3.org>
+ *     Andy Quick <ac.quick at sympatico.ca> (translation to Java)
+ *     Gary L Peskin <garyp at firstech.com> (Java development)
+ *     Sami Lempinen <sami at lempinen.net> (release management)
+ *     Fabrizio Giustina <fgiust at users.sourceforge.net>
+ *
+ *  The contributing author(s) would like to thank all those who
+ *  helped with testing, bug fixes, and patience.  This wouldn't
+ *  have been possible without all of you.
+ *
+ *  COPYRIGHT NOTICE:
+ * 
+ *  This software and documentation is provided "as is," and
+ *  the copyright holders and contributing author(s) make no
+ *  representations or warranties, express or implied, including
+ *  but not limited to, warranties of merchantability or fitness
+ *  for any particular purpose or that the use of the software or
+ *  documentation will not infringe any third party patents,
+ *  copyrights, trademarks or other rights. 
+ *
+ *  The copyright holders and contributing author(s) will not be
+ *  liable for any direct, indirect, special or consequential damages
+ *  arising out of any use of the software or documentation, even if
+ *  advised of the possibility of such damage.
+ *
+ *  Permission is hereby granted to use, copy, modify, and distribute
+ *  this source code, or portions hereof, documentation and executables,
+ *  for any purpose, without fee, subject to the following restrictions:
+ *
+ *  1. The origin of this source code must not be misrepresented.
+ *  2. Altered versions must be plainly marked as such and must
+ *     not be misrepresented as being the original source.
+ *  3. This Copyright notice may not be removed or altered from any
+ *     source or altered source distribution.
+ * 
+ *  The copyright holders and contributing author(s) specifically
+ *  permit, without fee, and encourage the use of this source code
+ *  as a component for supporting the Hypertext Markup Language in
+ *  commercial products. If you use this source code in a product,
+ *  acknowledgment is not required but would be appreciated.
+ *
+ */
+package org.ajax4jsf.org.w3c.tidy;
+
+import java.util.Hashtable;
+import java.util.Map;
+
+
+/**
+ * HTML attribute hash table.
+ * @author Dave Raggett <a href="mailto:dsr at w3.org">dsr at w3.org </a>
+ * @author Andy Quick <a href="mailto:ac.quick at sympatico.ca">ac.quick at sympatico.ca </a> (translation to Java)
+ * @author Fabrizio Giustina
+ * @version $Revision: 1.1.2.1 $ ($Author: alexsmirnov $)
+ */
+public class AttributeTable
+{
+
+    /**
+     * href attribute.
+     */
+    protected static Attribute attrHref;
+
+    /**
+     * src attribute.
+     */
+    protected static Attribute attrSrc;
+
+    /**
+     * id attribute.
+     */
+    protected static Attribute attrId;
+
+    /**
+     * name attribute.
+     */
+    protected static Attribute attrName;
+
+    /**
+     * summary attribute.
+     */
+    protected static Attribute attrSummary;
+
+    /**
+     * alt attribute.
+     */
+    protected static Attribute attrAlt;
+
+    /**
+     * logdesc attribute.
+     */
+    protected static Attribute attrLongdesc;
+
+    /**
+     * usemap attribute.
+     */
+    protected static Attribute attrUsemap;
+
+    /**
+     * ismap attribute.
+     */
+    protected static Attribute attrIsmap;
+
+    /**
+     * language attribute.
+     */
+    protected static Attribute attrLanguage;
+
+    /**
+     * type attribute.
+     */
+    protected static Attribute attrType;
+
+    /**
+     * title attribute.
+     */
+    protected static Attribute attrTitle;
+
+    /**
+     * xmlns attribute.
+     */
+    protected static Attribute attrXmlns;
+
+    /**
+     * value attribute.
+     */
+    protected static Attribute attrValue;
+
+    /**
+     * content attribute.
+     */
+    protected static Attribute attrContent;
+
+    /**
+     * datafld attribute.
+     */
+    protected static Attribute attrDatafld;
+
+    /**
+     * width attribute.
+     */
+    protected static Attribute attrWidth;
+
+    /**
+     * height attribute.
+     */
+    protected static Attribute attrHeight;
+
+    /**
+     * attribute table instance.
+     */
+    private static AttributeTable defaultAttributeTable;
+
+    /**
+     * all the known attributes.
+     */
+    private static final Attribute[] ATTRS = {
+        new Attribute("abbr", Dict.VERS_HTML40, AttrCheckImpl.TEXT),
+        new Attribute("accept-charset", Dict.VERS_HTML40, AttrCheckImpl.CHARSET),
+        new Attribute("accept", Dict.VERS_ALL, AttrCheckImpl.TYPE),
+        new Attribute("accesskey", Dict.VERS_HTML40, AttrCheckImpl.CHARACTER),
+        new Attribute("action", Dict.VERS_ALL, AttrCheckImpl.URL),
+        new Attribute("add_date", Dict.VERS_NETSCAPE, AttrCheckImpl.TEXT), // A
+        new Attribute("align", Dict.VERS_ALL, AttrCheckImpl.ALIGN), // set varies with element
+        new Attribute("alink", Dict.VERS_LOOSE, AttrCheckImpl.COLOR),
+        new Attribute("alt", Dict.VERS_ALL, AttrCheckImpl.TEXT),
+        new Attribute("archive", Dict.VERS_HTML40, AttrCheckImpl.URLS), // space or comma separated list
+        new Attribute("axis", Dict.VERS_HTML40, AttrCheckImpl.TEXT),
+        new Attribute("background", Dict.VERS_LOOSE, AttrCheckImpl.URL),
+        new Attribute("bgcolor", Dict.VERS_LOOSE, AttrCheckImpl.COLOR),
+        new Attribute("bgproperties", Dict.VERS_PROPRIETARY, AttrCheckImpl.TEXT), // BODY "fixed" fixes background
+        new Attribute("border", Dict.VERS_ALL, AttrCheckImpl.BOOL), // like LENGTH + "border"
+        new Attribute("bordercolor", Dict.VERS_MICROSOFT, AttrCheckImpl.COLOR), // used on TABLE
+        new Attribute("bottommargin", Dict.VERS_MICROSOFT, AttrCheckImpl.NUMBER), // used on BODY
+        new Attribute("cellpadding", Dict.VERS_FROM32, AttrCheckImpl.LENGTH), // % or pixel values
+        new Attribute("cellspacing", Dict.VERS_FROM32, AttrCheckImpl.LENGTH),
+        new Attribute("char", Dict.VERS_HTML40, AttrCheckImpl.CHARACTER),
+        new Attribute("charoff", Dict.VERS_HTML40, AttrCheckImpl.LENGTH),
+        new Attribute("charset", Dict.VERS_HTML40, AttrCheckImpl.CHARSET),
+        new Attribute("checked", Dict.VERS_ALL, AttrCheckImpl.BOOL), // i.e. "checked" or absent
+        new Attribute("cite", Dict.VERS_HTML40, AttrCheckImpl.URL),
+        new Attribute("class", Dict.VERS_HTML40, AttrCheckImpl.TEXT),
+        new Attribute("classid", Dict.VERS_HTML40, AttrCheckImpl.URL),
+        new Attribute("clear", Dict.VERS_LOOSE, AttrCheckImpl.CLEAR), // BR: left, right, all
+        new Attribute("code", Dict.VERS_LOOSE, AttrCheckImpl.TEXT), // APPLET
+        new Attribute("codebase", Dict.VERS_HTML40, AttrCheckImpl.URL), // OBJECT
+        new Attribute("codetype", Dict.VERS_HTML40, AttrCheckImpl.TYPE), // OBJECT
+        new Attribute("color", Dict.VERS_LOOSE, AttrCheckImpl.COLOR), // BASEFONT, FONT
+        new Attribute("cols", Dict.VERS_IFRAME, AttrCheckImpl.COLS), // TABLE & FRAMESET
+        new Attribute("colspan", Dict.VERS_FROM32, AttrCheckImpl.NUMBER),
+        new Attribute("compact", Dict.VERS_ALL, AttrCheckImpl.BOOL), // lists
+        new Attribute("content", Dict.VERS_ALL, AttrCheckImpl.TEXT), // META
+        new Attribute("coords", Dict.VERS_FROM32, AttrCheckImpl.COORDS), // AREA, A
+        new Attribute("data", Dict.VERS_HTML40, AttrCheckImpl.URL), // OBJECT
+        new Attribute("datafld", Dict.VERS_MICROSOFT, AttrCheckImpl.TEXT), // used on DIV, IMG
+        new Attribute("dataformatas", Dict.VERS_MICROSOFT, AttrCheckImpl.TEXT), // used on DIV, IMG
+        new Attribute("datapagesize", Dict.VERS_MICROSOFT, AttrCheckImpl.NUMBER), // used on DIV, IMG
+        new Attribute("datasrc", Dict.VERS_MICROSOFT, AttrCheckImpl.URL), // used on TABLE
+        new Attribute("datetime", Dict.VERS_HTML40, AttrCheckImpl.DATE), // INS, DEL
+        new Attribute("declare", Dict.VERS_HTML40, AttrCheckImpl.BOOL), // OBJECT
+        new Attribute("defer", Dict.VERS_HTML40, AttrCheckImpl.BOOL), // SCRIPT
+        new Attribute("dir", Dict.VERS_HTML40, AttrCheckImpl.TEXTDIR), // ltr or rtl
+        new Attribute("disabled", Dict.VERS_HTML40, AttrCheckImpl.BOOL), // form fields
+        new Attribute("enctype", Dict.VERS_ALL, AttrCheckImpl.TYPE), // FORM
+        new Attribute("face", Dict.VERS_LOOSE, AttrCheckImpl.TEXT), // BASEFONT, FONT
+        new Attribute("for", Dict.VERS_HTML40, AttrCheckImpl.IDREF), // LABEL
+        new Attribute("frame", Dict.VERS_HTML40, AttrCheckImpl.TFRAME), // TABLE
+        new Attribute("frameborder", (short) (Dict.VERS_FRAMESET | Dict.VERS_IFRAME), AttrCheckImpl.FBORDER), // 0 or 1
+        new Attribute("framespacing", Dict.VERS_PROPRIETARY, AttrCheckImpl.NUMBER), // pixel value
+        new Attribute("gridx", Dict.VERS_PROPRIETARY, AttrCheckImpl.NUMBER), // TABLE Adobe golive
+        new Attribute("gridy", Dict.VERS_PROPRIETARY, AttrCheckImpl.NUMBER), // TABLE Adobe golive
+        new Attribute("headers", Dict.VERS_HTML40, AttrCheckImpl.IDREF), // table cells
+        new Attribute("height", Dict.VERS_ALL, AttrCheckImpl.LENGTH), // pixels only for TH/TD
+        new Attribute("href", Dict.VERS_ALL, AttrCheckImpl.URL), // A, AREA, LINK and BASE
+        new Attribute("hreflang", Dict.VERS_HTML40, AttrCheckImpl.LANG), // A, LINK
+        new Attribute("hspace", Dict.VERS_ALL, AttrCheckImpl.NUMBER), // APPLET, IMG, OBJECT
+        new Attribute("http-equiv", Dict.VERS_ALL, AttrCheckImpl.TEXT), // META
+        new Attribute("id", Dict.VERS_HTML40, AttrCheckImpl.ID),
+        new Attribute("ismap", Dict.VERS_ALL, AttrCheckImpl.BOOL), // IMG
+        new Attribute("label", Dict.VERS_HTML40, AttrCheckImpl.TEXT), // OPT, OPTGROUP
+        new Attribute("lang", Dict.VERS_HTML40, AttrCheckImpl.LANG),
+        new Attribute("language", Dict.VERS_LOOSE, AttrCheckImpl.TEXT), // SCRIPT
+        new Attribute("last_modified", Dict.VERS_NETSCAPE, AttrCheckImpl.TEXT), // A
+        new Attribute("last_visit", Dict.VERS_NETSCAPE, AttrCheckImpl.TEXT), // A
+        new Attribute("leftmargin", Dict.VERS_MICROSOFT, AttrCheckImpl.NUMBER), // used on BODY
+        new Attribute("link", Dict.VERS_LOOSE, AttrCheckImpl.COLOR), // BODY
+        new Attribute("longdesc", Dict.VERS_HTML40, AttrCheckImpl.URL), // IMG
+        new Attribute("lowsrc", Dict.VERS_PROPRIETARY, AttrCheckImpl.URL), // IMG
+        new Attribute("marginheight", Dict.VERS_IFRAME, AttrCheckImpl.NUMBER), // FRAME, IFRAME, BODY
+        new Attribute("marginwidth", Dict.VERS_IFRAME, AttrCheckImpl.NUMBER), // ditto
+        new Attribute("maxlength", Dict.VERS_ALL, AttrCheckImpl.NUMBER), // INPUT
+        new Attribute("media", Dict.VERS_HTML40, AttrCheckImpl.MEDIA), // STYLE, LINK
+        new Attribute("method", Dict.VERS_ALL, AttrCheckImpl.FSUBMIT), // FORM: get or post
+        new Attribute("multiple", Dict.VERS_ALL, AttrCheckImpl.BOOL), // SELECT
+        new Attribute("name", Dict.VERS_ALL, AttrCheckImpl.NAME),
+        new Attribute("nohref", Dict.VERS_FROM32, AttrCheckImpl.BOOL), // AREA
+        new Attribute("noresize", Dict.VERS_FRAMESET, AttrCheckImpl.BOOL), // FRAME
+        new Attribute("noshade", Dict.VERS_LOOSE, AttrCheckImpl.BOOL), // HR
+        new Attribute("nowrap", Dict.VERS_LOOSE, AttrCheckImpl.BOOL), // table cells
+        new Attribute("object", Dict.VERS_HTML40_LOOSE, AttrCheckImpl.TEXT), // APPLET
+        new Attribute("onblur", Dict.VERS_EVENTS, AttrCheckImpl.SCRIPT), // event
+        new Attribute("onchange", Dict.VERS_EVENTS, AttrCheckImpl.SCRIPT), // event
+        new Attribute("onclick", Dict.VERS_EVENTS, AttrCheckImpl.SCRIPT), // event
+        new Attribute("ondblclick", Dict.VERS_EVENTS, AttrCheckImpl.SCRIPT), // event
+        new Attribute("onkeydown", Dict.VERS_EVENTS, AttrCheckImpl.SCRIPT), // event
+        new Attribute("onkeypress", Dict.VERS_EVENTS, AttrCheckImpl.SCRIPT), // event
+        new Attribute("onkeyup", Dict.VERS_EVENTS, AttrCheckImpl.SCRIPT), // event
+        new Attribute("onload", Dict.VERS_EVENTS, AttrCheckImpl.SCRIPT), // event
+        new Attribute("onmousedown", Dict.VERS_EVENTS, AttrCheckImpl.SCRIPT), // event
+        new Attribute("onmousemove", Dict.VERS_EVENTS, AttrCheckImpl.SCRIPT), // event
+        new Attribute("onmouseout", Dict.VERS_EVENTS, AttrCheckImpl.SCRIPT), // event
+        new Attribute("onmouseover", Dict.VERS_EVENTS, AttrCheckImpl.SCRIPT), // event
+        new Attribute("onmouseup", Dict.VERS_EVENTS, AttrCheckImpl.SCRIPT), // event
+        new Attribute("onsubmit", Dict.VERS_EVENTS, AttrCheckImpl.SCRIPT), // event
+        new Attribute("onreset", Dict.VERS_EVENTS, AttrCheckImpl.SCRIPT), // event
+        new Attribute("onselect", Dict.VERS_EVENTS, AttrCheckImpl.SCRIPT), // event
+        new Attribute("onunload", Dict.VERS_EVENTS, AttrCheckImpl.SCRIPT), // event
+        new Attribute("onfocus", Dict.VERS_EVENTS, AttrCheckImpl.SCRIPT), // event
+        new Attribute("onafterupdate", Dict.VERS_MICROSOFT, AttrCheckImpl.SCRIPT), // form fields
+        new Attribute("onbeforeupdate", Dict.VERS_MICROSOFT, AttrCheckImpl.SCRIPT), // form fields
+        new Attribute("onerrorupdate", Dict.VERS_MICROSOFT, AttrCheckImpl.SCRIPT), // form fields
+        new Attribute("onrowenter", Dict.VERS_MICROSOFT, AttrCheckImpl.SCRIPT), // form fields
+        new Attribute("onrowexit", Dict.VERS_MICROSOFT, AttrCheckImpl.SCRIPT), // form fields
+        new Attribute("onbeforeunload", Dict.VERS_MICROSOFT, AttrCheckImpl.SCRIPT), // form fields
+        new Attribute("ondatasetchanged", Dict.VERS_MICROSOFT, AttrCheckImpl.SCRIPT), // object, applet
+        new Attribute("ondataavailable", Dict.VERS_MICROSOFT, AttrCheckImpl.SCRIPT), // object, applet
+        new Attribute("ondatasetcomplete", Dict.VERS_MICROSOFT, AttrCheckImpl.SCRIPT), // object, applet
+        new Attribute("profile", Dict.VERS_HTML40, AttrCheckImpl.URL), // HEAD
+        new Attribute("prompt", Dict.VERS_LOOSE, AttrCheckImpl.TEXT), // ISINDEX
+        new Attribute("readonly", Dict.VERS_HTML40, AttrCheckImpl.BOOL), // form fields
+        new Attribute("rel", Dict.VERS_ALL, AttrCheckImpl.LINKTYPES), // A, LINK
+        new Attribute("rev", Dict.VERS_ALL, AttrCheckImpl.LINKTYPES), // A, LINK
+        new Attribute("rightmargin", Dict.VERS_MICROSOFT, AttrCheckImpl.NUMBER), // used on BODY
+        new Attribute("rows", Dict.VERS_ALL, AttrCheckImpl.NUMBER), // TEXTAREA
+        new Attribute("rowspan", Dict.VERS_ALL, AttrCheckImpl.NUMBER), // table cells
+        new Attribute("rules", Dict.VERS_HTML40, AttrCheckImpl.TRULES), // TABLE
+        new Attribute("scheme", Dict.VERS_HTML40, AttrCheckImpl.TEXT), // META
+        new Attribute("scope", Dict.VERS_HTML40, AttrCheckImpl.SCOPE), // table cells
+        new Attribute("scrolling", Dict.VERS_IFRAME, AttrCheckImpl.SCROLL), // yes, no or auto
+        new Attribute("selected", Dict.VERS_ALL, AttrCheckImpl.BOOL), // OPTION
+        new Attribute("shape", Dict.VERS_FROM32, AttrCheckImpl.SHAPE), // AREA, A
+        new Attribute("showgrid", Dict.VERS_PROPRIETARY, AttrCheckImpl.BOOL), // TABLE Adobe golive
+        new Attribute("showgridx", Dict.VERS_PROPRIETARY, AttrCheckImpl.BOOL), // TABLE Adobe golive
+        new Attribute("showgridy", Dict.VERS_PROPRIETARY, AttrCheckImpl.BOOL), // TABLE Adobe golive
+        new Attribute("size", Dict.VERS_LOOSE, AttrCheckImpl.NUMBER), // HR, FONT, BASEFONT, SELECT
+        new Attribute("span", Dict.VERS_HTML40, AttrCheckImpl.NUMBER), // COL, COLGROUP
+        new Attribute("src", Dict.VERS_ALL, AttrCheckImpl.URL), // IMG, FRAME, IFRAME
+        new Attribute("standby", Dict.VERS_HTML40, AttrCheckImpl.TEXT), // OBJECT
+        new Attribute("start", Dict.VERS_ALL, AttrCheckImpl.NUMBER), // OL
+        new Attribute("style", Dict.VERS_HTML40, AttrCheckImpl.TEXT),
+        new Attribute("summary", Dict.VERS_HTML40, AttrCheckImpl.TEXT), // TABLE
+        new Attribute("tabindex", Dict.VERS_HTML40, AttrCheckImpl.NUMBER), // fields, OBJECT and A
+        new Attribute("target", Dict.VERS_HTML40, AttrCheckImpl.TARGET), // names a frame/window
+        new Attribute("text", Dict.VERS_LOOSE, AttrCheckImpl.COLOR), // BODY
+        new Attribute("title", Dict.VERS_HTML40, AttrCheckImpl.TEXT), // text tool tip
+        new Attribute("topmargin", Dict.VERS_MICROSOFT, AttrCheckImpl.NUMBER), // used on BODY
+        new Attribute("type", Dict.VERS_FROM32, AttrCheckImpl.TYPE), // also used by SPACER
+        new Attribute("usemap", Dict.VERS_ALL, AttrCheckImpl.BOOL), // things with images
+        new Attribute("valign", Dict.VERS_FROM32, AttrCheckImpl.VALIGN),
+        new Attribute("value", Dict.VERS_ALL, AttrCheckImpl.TEXT), // OPTION, PARAM
+        new Attribute("valuetype", Dict.VERS_HTML40, AttrCheckImpl.VTYPE), // PARAM: data, ref, object
+        new Attribute("version", Dict.VERS_ALL, AttrCheckImpl.TEXT), // HTML
+        new Attribute("vlink", Dict.VERS_LOOSE, AttrCheckImpl.COLOR), // BODY
+        new Attribute("vspace", Dict.VERS_LOOSE, AttrCheckImpl.NUMBER), // IMG, OBJECT, APPLET
+        new Attribute("width", Dict.VERS_ALL, AttrCheckImpl.LENGTH), // pixels only for TD/TH
+        new Attribute("wrap", Dict.VERS_NETSCAPE, AttrCheckImpl.TEXT), // textarea
+        new Attribute("xml:lang", Dict.VERS_XML, AttrCheckImpl.TEXT), // XML language
+        new Attribute("xml:space", Dict.VERS_XML, AttrCheckImpl.TEXT), // XML language
+        new Attribute("xmlns", Dict.VERS_ALL, AttrCheckImpl.TEXT), // name space
+        new Attribute("rbspan", Dict.VERS_XHTML11, AttrCheckImpl.NUMBER), // ruby markup
+    };
+
+    /**
+     * Map containing all the installed attributes.
+     */
+    private Map attributeHashtable = new Hashtable();
+
+    /**
+     * lookup an installed Attribute.
+     * @param name attribute name
+     * @return Attribute or null if the attribute is not found
+     */
+    public Attribute lookup(String name)
+    {
+        return (Attribute) this.attributeHashtable.get(name);
+    }
+
+    /**
+     * installs a new Attribute.
+     * @param attr Atribute
+     * @return installed Attribute
+     */
+    public Attribute install(Attribute attr)
+    {
+        return (Attribute) this.attributeHashtable.put(attr.getName(), attr);
+    }
+
+    /**
+     * public method for finding attribute definition by name.
+     * @param attval AttVal instance
+     * @return Attribute with name = attval.name
+     */
+    public Attribute findAttribute(AttVal attval)
+    {
+        Attribute np;
+
+        if (attval.attribute != null)
+        {
+            np = lookup(attval.attribute);
+            return np;
+        }
+
+        return null;
+    }
+
+    /**
+     * Does the given attibute contains an url?
+     * @param attrname attribute name
+     * @return <code>true</code> if the given attribute is expected to contain an URL
+     */
+    public boolean isUrl(String attrname)
+    {
+        Attribute np;
+
+        np = lookup(attrname);
+        return (np != null && np.getAttrchk() == AttrCheckImpl.URL);
+    }
+
+    /**
+     * Does the given attibute contains a script?
+     * @param attrname attribute name
+     * @return <code>true</code> if the given attribute is expected to contain a script
+     */
+    public boolean isScript(String attrname)
+    {
+        Attribute np;
+
+        np = lookup(attrname);
+        return (np != null && np.getAttrchk() == AttrCheckImpl.SCRIPT);
+    }
+
+    /**
+     * Does the given attibute contains a literal attribute?
+     * @param attrname attribute name
+     * @return <code>true</code> if the given attribute is expected to contain a literal attribute
+     */
+    public boolean isLiteralAttribute(String attrname)
+    {
+        Attribute np;
+
+        np = lookup(attrname);
+        return (np != null && np.isLiteral());
+    }
+
+    /**
+     * Declare a new literal attribute.
+     * @param name atribute name
+     */
+    public void declareLiteralAttrib(String name)
+    {
+        // Henry Zrepa reports that some folk are using embed with script attributes where newlines are signficant.
+        // These
+        // need to be declared and handled specially!
+        Attribute attrib = lookup(name);
+
+        if (attrib == null)
+        {
+            attrib = install(new Attribute(name, Dict.VERS_PROPRIETARY, null));
+        }
+
+        attrib.setLiteral(true);
+    }
+
+    /**
+     * Returns the default attribute table instance.
+     * @return AttributeTable instance
+     */
+    public static AttributeTable getDefaultAttributeTable()
+    {
+        if (defaultAttributeTable == null)
+        {
+            defaultAttributeTable = new AttributeTable();
+            for (int i = 0; i < ATTRS.length; i++)
+            {
+                defaultAttributeTable.install(ATTRS[i]);
+            }
+            attrHref = defaultAttributeTable.lookup("href");
+            attrSrc = defaultAttributeTable.lookup("src");
+            attrId = defaultAttributeTable.lookup("id");
+            attrName = defaultAttributeTable.lookup("name");
+            attrSummary = defaultAttributeTable.lookup("summary");
+            attrAlt = defaultAttributeTable.lookup("alt");
+            attrLongdesc = defaultAttributeTable.lookup("longdesc");
+            attrUsemap = defaultAttributeTable.lookup("usemap");
+            attrIsmap = defaultAttributeTable.lookup("ismap");
+            attrLanguage = defaultAttributeTable.lookup("language");
+            attrType = defaultAttributeTable.lookup("type");
+            attrTitle = defaultAttributeTable.lookup("title");
+            attrXmlns = defaultAttributeTable.lookup("xmlns");
+            attrValue = defaultAttributeTable.lookup("value");
+            attrContent = defaultAttributeTable.lookup("content");
+            attrDatafld = defaultAttributeTable.lookup("datafld");
+            attrWidth = defaultAttributeTable.lookup("width");
+            attrHeight = defaultAttributeTable.lookup("height");
+
+            attrAlt.setNowrap(true);
+            attrValue.setNowrap(true);
+            attrContent.setNowrap(true);
+        }
+        return defaultAttributeTable;
+    }
+
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/Clean.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/Clean.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/Clean.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,2422 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ *  Java HTML Tidy - JTidy
+ *  HTML parser and pretty printer
+ *
+ *  Copyright (c) 1998-2000 World Wide Web Consortium (Massachusetts
+ *  Institute of Technology, Institut National de Recherche en
+ *  Informatique et en Automatique, Keio University). All Rights
+ *  Reserved.
+ *
+ *  Contributing Author(s):
+ *
+ *     Dave Raggett <dsr at w3.org>
+ *     Andy Quick <ac.quick at sympatico.ca> (translation to Java)
+ *     Gary L Peskin <garyp at firstech.com> (Java development)
+ *     Sami Lempinen <sami at lempinen.net> (release management)
+ *     Fabrizio Giustina <fgiust at users.sourceforge.net>
+ *
+ *  The contributing author(s) would like to thank all those who
+ *  helped with testing, bug fixes, and patience.  This wouldn't
+ *  have been possible without all of you.
+ *
+ *  COPYRIGHT NOTICE:
+ * 
+ *  This software and documentation is provided "as is," and
+ *  the copyright holders and contributing author(s) make no
+ *  representations or warranties, express or implied, including
+ *  but not limited to, warranties of merchantability or fitness
+ *  for any particular purpose or that the use of the software or
+ *  documentation will not infringe any third party patents,
+ *  copyrights, trademarks or other rights. 
+ *
+ *  The copyright holders and contributing author(s) will not be
+ *  liable for any direct, indirect, special or consequential damages
+ *  arising out of any use of the software or documentation, even if
+ *  advised of the possibility of such damage.
+ *
+ *  Permission is hereby granted to use, copy, modify, and distribute
+ *  this source code, or portions hereof, documentation and executables,
+ *  for any purpose, without fee, subject to the following restrictions:
+ *
+ *  1. The origin of this source code must not be misrepresented.
+ *  2. Altered versions must be plainly marked as such and must
+ *     not be misrepresented as being the original source.
+ *  3. This Copyright notice may not be removed or altered from any
+ *     source or altered source distribution.
+ * 
+ *  The copyright holders and contributing author(s) specifically
+ *  permit, without fee, and encourage the use of this source code
+ *  as a component for supporting the Hypertext Markup Language in
+ *  commercial products. If you use this source code in a product,
+ *  acknowledgment is not required but would be appreciated.
+ *
+ */
+package org.ajax4jsf.org.w3c.tidy;
+
+/**
+ * Clean up misuse of presentation markup. Filters from other formats such as Microsoft Word often make excessive use of
+ * presentation markup such as font tags, B, I, and the align attribute. By applying a set of production rules, it is
+ * straight forward to transform this to use CSS. Some rules replace some of the children of an element by style
+ * properties on the element, e.g.
+ * <p>
+ * <b>... </b>
+ * </p>.
+ * <p style="font-weight: bold">
+ * ...
+ * </p>
+ * Such rules are applied to the element's content and then to the element itself until none of the rules more apply.
+ * Having applied all the rules to an element, it will have a style attribute with one or more properties. Other rules
+ * strip the element they apply to, replacing it by style properties on the contents, e.g. <dir>
+ * <li>
+ * <p>
+ * ...</li>
+ * </dir>.
+ * <p style="margin-left 1em">
+ * ... These rules are applied to an element before processing its content and replace the current element by the first
+ * element in the exposed content. After applying both sets of rules, you can replace the style attribute by a class
+ * value and style rule in the document head. To support this, an association of styles and class names is built. A
+ * naive approach is to rely on string matching to test when two property lists are the same. A better approach would be
+ * to first sort the properties before matching.
+ * @author Dave Raggett <a href="mailto:dsr at w3.org">dsr at w3.org </a>
+ * @author Andy Quick <a href="mailto:ac.quick at sympatico.ca">ac.quick at sympatico.ca </a> (translation to Java)
+ * @author Fabrizio Giustina
+ * @version $Revision: 1.1.2.1 $ ($Author: alexsmirnov $)
+ */
+public class Clean
+{
+
+    /**
+     * sequential number for generated css classes.
+     */
+    private int classNum = 1;
+
+    /**
+     * Tag table.
+     */
+    private TagTable tt;
+
+    /**
+     * Instantiates a new Clean.
+     * @param tagTable tag table instance
+     */
+    public Clean(TagTable tagTable)
+    {
+        this.tt = tagTable;
+    }
+
+    /**
+     * Insert a css style property.
+     * @param props StyleProp instance
+     * @param name property name
+     * @param value property value
+     * @return StyleProp containin the given property
+     */
+    private StyleProp insertProperty(StyleProp props, String name, String value)
+    {
+        StyleProp first, prev, prop;
+        int cmp;
+
+        prev = null;
+        first = props;
+
+        while (props != null)
+        {
+            cmp = props.name.compareTo(name);
+
+            if (cmp == 0)
+            {
+                // this property is already defined, ignore new value
+                return first;
+            }
+
+            if (cmp > 0) // props.name > name
+            {
+                // insert before this
+
+                prop = new StyleProp(name, value, props);
+
+                if (prev != null)
+                {
+                    prev.next = prop;
+                }
+                else
+                {
+                    first = prop;
+                }
+
+                return first;
+            }
+
+            prev = props;
+            props = props.next;
+        }
+
+        prop = new StyleProp(name, value, null);
+
+        if (prev != null)
+        {
+            prev.next = prop;
+        }
+        else
+        {
+            first = prop;
+        }
+
+        return first;
+    }
+
+    /**
+     * Create sorted linked list of properties from style string.
+     * @param prop StyleProp
+     * @param style style string
+     * @return StyleProp with given style
+     */
+    private StyleProp createProps(StyleProp prop, String style)
+    {
+        int nameEnd;
+        int valueEnd;
+        int valueStart = 0;
+        int nameStart = 0;
+        boolean more;
+
+        nameStart = 0;
+        while (nameStart < style.length())
+        {
+            while (nameStart < style.length() && style.charAt(nameStart) == ' ')
+            {
+                ++nameStart;
+            }
+
+            nameEnd = nameStart;
+
+            while (nameEnd < style.length())
+            {
+                if (style.charAt(nameEnd) == ':')
+                {
+                    valueStart = nameEnd + 1;
+                    break;
+                }
+
+                ++nameEnd;
+            }
+
+            if (nameEnd >= style.length() || style.charAt(nameEnd) != ':')
+            {
+                break;
+            }
+
+            while (valueStart < style.length() && style.charAt(valueStart) == ' ')
+            {
+                ++valueStart;
+            }
+
+            valueEnd = valueStart;
+            more = false;
+
+            while (valueEnd < style.length())
+            {
+                if (style.charAt(valueEnd) == ';')
+                {
+                    more = true;
+                    break;
+                }
+
+                ++valueEnd;
+            }
+
+            prop = insertProperty(prop, style.substring(nameStart, nameEnd), style.substring(valueStart, valueEnd));
+
+            if (more)
+            {
+                nameStart = valueEnd + 1;
+                continue;
+            }
+
+            break;
+        }
+
+        return prop;
+    }
+
+    /**
+     * Create a css property.
+     * @param props StyleProp
+     * @return css property as String
+     */
+    private String createPropString(StyleProp props)
+    {
+        String style = "";
+        int len;
+        StyleProp prop;
+
+        // compute length
+        for (len = 0, prop = props; prop != null; prop = prop.next)
+        {
+            len += prop.name.length() + 2;
+            len += prop.value.length() + 2;
+        }
+
+        for (prop = props; prop != null; prop = prop.next)
+        {
+            style = style.concat(prop.name);
+            style = style.concat(": ");
+
+            style = style.concat(prop.value);
+
+            if (prop.next == null)
+            {
+                break;
+            }
+
+            style = style.concat("; ");
+        }
+
+        return style;
+    }
+
+    /**
+     * Creates a string with merged properties.
+     * @param style css style
+     * @param property css properties
+     * @return merged string
+     */
+    private String addProperty(String style, String property)
+    {
+        StyleProp prop;
+
+        prop = createProps(null, style);
+        prop = createProps(prop, property);
+        style = createPropString(prop);
+        return style;
+    }
+
+    /**
+     * Generates a new css class name.
+     * @param lexer Lexer
+     * @param tag Tag
+     * @return generated css class
+     */
+    private String gensymClass(Lexer lexer, String tag)
+    {
+        String str;
+
+        str = lexer.configuration.cssPrefix == null ? lexer.configuration.cssPrefix + this.classNum : "c"
+            + this.classNum;
+        this.classNum++;
+        return str;
+    }
+
+    /**
+     * Finds a css style.
+     * @param lexer Lexer
+     * @param tag tag name
+     * @param properties css properties
+     * @return style string
+     */
+    private String findStyle(Lexer lexer, String tag, String properties)
+    {
+        Style style;
+
+        for (style = lexer.styles; style != null; style = style.next)
+        {
+            if (style.tag.equals(tag) && style.properties.equals(properties))
+            {
+                return style.tagClass;
+            }
+        }
+
+        style = new Style(tag, gensymClass(lexer, tag), properties, lexer.styles);
+        lexer.styles = style;
+        return style.tagClass;
+    }
+
+    /**
+     * Find style attribute in node, and replace it by corresponding class attribute. Search for class in style
+     * dictionary otherwise gensym new class and add to dictionary. Assumes that node doesn't have a class attribute.
+     * @param lexer Lexer
+     * @param node node with a style attribute
+     */
+    private void style2Rule(Lexer lexer, Node node)
+    {
+        AttVal styleattr, classattr;
+        String classname;
+
+        styleattr = node.getAttrByName("style");
+
+        if (styleattr != null)
+        {
+            classname = findStyle(lexer, node.element, styleattr.value);
+            classattr = node.getAttrByName("class");
+
+            // if there already is a class attribute then append class name after a space
+
+            if (classattr != null)
+            {
+                classattr.value = classattr.value + " " + classname;
+                node.removeAttribute(styleattr);
+            }
+            else
+            {
+                // reuse style attribute for class attribute
+                styleattr.attribute = "class";
+                styleattr.value = classname;
+            }
+        }
+    }
+
+    /**
+     * Adds a css rule for color.
+     * @param lexer Lexer
+     * @param selector css selector
+     * @param color color value
+     */
+    private void addColorRule(Lexer lexer, String selector, String color)
+    {
+        if (color != null)
+        {
+            lexer.addStringLiteral(selector);
+            lexer.addStringLiteral(" { color: ");
+            lexer.addStringLiteral(color);
+            lexer.addStringLiteral(" }\n");
+        }
+    }
+
+    /**
+     * Move presentation attribs from body to style element.
+     * 
+     * <pre>
+     * background="foo" . body { background-image: url(foo) }
+     * bgcolor="foo" . body { background-color: foo }
+     * text="foo" . body { color: foo }
+     * link="foo" . :link { color: foo }
+     * vlink="foo" . :visited { color: foo }
+     * alink="foo" . :active { color: foo }
+     * </pre>
+     * 
+     * @param lexer Lexer
+     * @param body body node
+     */
+    private void cleanBodyAttrs(Lexer lexer, Node body)
+    {
+        AttVal attr;
+        String bgurl = null;
+        String bgcolor = null;
+        String color = null;
+
+        attr = body.getAttrByName("background");
+
+        if (attr != null)
+        {
+            bgurl = attr.value;
+            attr.value = null;
+            body.removeAttribute(attr);
+        }
+
+        attr = body.getAttrByName("bgcolor");
+
+        if (attr != null)
+        {
+            bgcolor = attr.value;
+            attr.value = null;
+            body.removeAttribute(attr);
+        }
+
+        attr = body.getAttrByName("text");
+
+        if (attr != null)
+        {
+            color = attr.value;
+            attr.value = null;
+            body.removeAttribute(attr);
+        }
+
+        if (bgurl != null || bgcolor != null || color != null)
+        {
+            lexer.addStringLiteral(" body {\n");
+
+            if (bgurl != null)
+            {
+                lexer.addStringLiteral("  background-image: url(");
+                lexer.addStringLiteral(bgurl);
+                lexer.addStringLiteral(");\n");
+            }
+
+            if (bgcolor != null)
+            {
+                lexer.addStringLiteral("  background-color: ");
+                lexer.addStringLiteral(bgcolor);
+                lexer.addStringLiteral(";\n");
+            }
+
+            if (color != null)
+            {
+                lexer.addStringLiteral("  color: ");
+                lexer.addStringLiteral(color);
+                lexer.addStringLiteral(";\n");
+            }
+
+            lexer.addStringLiteral(" }\n");
+        }
+
+        attr = body.getAttrByName("link");
+
+        if (attr != null)
+        {
+            addColorRule(lexer, " :link", attr.value);
+            body.removeAttribute(attr);
+        }
+
+        attr = body.getAttrByName("vlink");
+
+        if (attr != null)
+        {
+            addColorRule(lexer, " :visited", attr.value);
+            body.removeAttribute(attr);
+        }
+
+        attr = body.getAttrByName("alink");
+
+        if (attr != null)
+        {
+            addColorRule(lexer, " :active", attr.value);
+            body.removeAttribute(attr);
+        }
+    }
+
+    /**
+     * Check deprecated attributes in body tag.
+     * @param lexer Lexer
+     * @param doc document root node
+     * @return <code>true</code> is the body doesn't contain deprecated attributes, false otherwise.
+     */
+    private boolean niceBody(Lexer lexer, Node doc)
+    {
+        Node body = doc.findBody(lexer.configuration.tt);
+
+        if (body != null)
+        {
+            if (body.getAttrByName("background") != null
+                || body.getAttrByName("bgcolor") != null
+                || body.getAttrByName("text") != null
+                || body.getAttrByName("link") != null
+                || body.getAttrByName("vlink") != null
+                || body.getAttrByName("alink") != null)
+            {
+                lexer.badLayout |= Report.USING_BODY;
+                return false;
+            }
+        }
+
+        return true;
+    }
+
+    /**
+     * Create style element using rules from dictionary.
+     * @param lexer Lexer
+     * @param doc root node
+     */
+    private void createStyleElement(Lexer lexer, Node doc)
+    {
+        Node node, head, body;
+        Style style;
+        AttVal av;
+
+        if (lexer.styles == null && niceBody(lexer, doc))
+        {
+            return;
+        }
+
+        node = lexer.newNode(Node.START_TAG, null, 0, 0, "style");
+        node.implicit = true;
+
+        // insert type attribute
+        av = new AttVal(null, null, '"', "type", "text/css");
+        av.dict = AttributeTable.getDefaultAttributeTable().findAttribute(av);
+        node.attributes = av;
+
+        body = doc.findBody(lexer.configuration.tt);
+
+        lexer.txtstart = lexer.lexsize;
+
+        if (body != null)
+        {
+            cleanBodyAttrs(lexer, body);
+        }
+
+        for (style = lexer.styles; style != null; style = style.next)
+        {
+            lexer.addCharToLexer(' ');
+            lexer.addStringLiteral(style.tag);
+            lexer.addCharToLexer('.');
+            lexer.addStringLiteral(style.tagClass);
+            lexer.addCharToLexer(' ');
+            lexer.addCharToLexer('{');
+            lexer.addStringLiteral(style.properties);
+            lexer.addCharToLexer('}');
+            lexer.addCharToLexer('\n');
+        }
+
+        lexer.txtend = lexer.lexsize;
+
+        node.insertNodeAtEnd(lexer.newNode(Node.TEXT_NODE, lexer.lexbuf, lexer.txtstart, lexer.txtend));
+
+        // now insert style element into document head doc is root node. search its children for html node the head
+        // node should be first child of html node
+
+        head = doc.findHEAD(lexer.configuration.tt);
+
+        if (head != null)
+        {
+            head.insertNodeAtEnd(node);
+        }
+    }
+
+    /**
+     * Ensure bidirectional links are consistent.
+     * @param node root node
+     */
+    private void fixNodeLinks(Node node)
+    {
+        Node child;
+
+        if (node.prev != null)
+        {
+            node.prev.next = node;
+        }
+        else
+        {
+            node.parent.content = node;
+        }
+
+        if (node.next != null)
+        {
+            node.next.prev = node;
+        }
+        else
+        {
+            node.parent.last = node;
+        }
+
+        for (child = node.content; child != null; child = child.next)
+        {
+            child.parent = node;
+        }
+    }
+
+    /**
+     * Used to strip child of node when the node has one and only one child.
+     * @param node parent node
+     */
+    private void stripOnlyChild(Node node)
+    {
+        Node child;
+
+        child = node.content;
+        node.content = child.content;
+        node.last = child.last;
+        child.content = null;
+
+        for (child = node.content; child != null; child = child.next)
+        {
+            child.parent = node;
+        }
+    }
+
+    /**
+     * Used to strip font start and end tags.
+     * @param element original node
+     * @param pnode passed in as array to allow modification. pnode[0] will contain the final node
+     * @todo remove the pnode parameter and make it a return value
+     */
+    private void discardContainer(Node element, Node[] pnode)
+    {
+        Node node;
+        Node parent = element.parent;
+
+        if (element.content != null)
+        {
+            element.last.next = element.next;
+
+            if (element.next != null)
+            {
+                element.next.prev = element.last;
+                element.last.next = element.next;
+            }
+            else
+            {
+                parent.last = element.last;
+            }
+
+            if (element.prev != null)
+            {
+                element.content.prev = element.prev;
+                element.prev.next = element.content;
+            }
+            else
+            {
+                parent.content = element.content;
+            }
+
+            for (node = element.content; node != null; node = node.next)
+            {
+                node.parent = parent;
+            }
+
+            pnode[0] = element.content;
+        }
+        else
+        {
+            if (element.next != null)
+            {
+                element.next.prev = element.prev;
+            }
+            else
+            {
+                parent.last = element.prev;
+            }
+
+            if (element.prev != null)
+            {
+                element.prev.next = element.next;
+            }
+            else
+            {
+                parent.content = element.next;
+            }
+
+            pnode[0] = element.next;
+        }
+
+        element.next = null;
+        element.content = null;
+    }
+
+    /**
+     * Add style property to element, creating style attribute as needed and adding ; delimiter.
+     * @param node node
+     * @param property property added to node
+     */
+    private void addStyleProperty(Node node, String property)
+    {
+        AttVal av;
+
+        for (av = node.attributes; av != null; av = av.next)
+        {
+            if (av.attribute.equals("style"))
+            {
+                break;
+            }
+        }
+
+        // if style attribute already exists then insert property
+
+        if (av != null)
+        {
+            String s;
+
+            s = addProperty(av.value, property);
+            av.value = s;
+        }
+        else
+        {
+            // else create new style attribute
+            av = new AttVal(node.attributes, null, '"', "style", property);
+            av.dict = AttributeTable.getDefaultAttributeTable().findAttribute(av);
+            node.attributes = av;
+        }
+    }
+
+    /**
+     * Create new string that consists of the combined style properties in s1 and s2. To merge property lists, we build
+     * a linked list of property/values and insert properties into the list in order, merging values for the same
+     * property name.
+     * @param s1 first property
+     * @param s2 second property
+     * @return merged properties
+     */
+    private String mergeProperties(String s1, String s2)
+    {
+        String s;
+        StyleProp prop;
+
+        prop = createProps(null, s1);
+        prop = createProps(prop, s2);
+        s = createPropString(prop);
+        return s;
+    }
+
+    /**
+     * Merge class attributes from 2 nodes.
+     * @param node Node
+     * @param child Child node
+     */
+    private void mergeClasses(Node node, Node child)
+    {
+        AttVal av;
+        String s1, s2, names;
+
+        for (s2 = null, av = child.attributes; av != null; av = av.next)
+        {
+            if ("class".equals(av.attribute))
+            {
+                s2 = av.value;
+                break;
+            }
+        }
+
+        for (s1 = null, av = node.attributes; av != null; av = av.next)
+        {
+            if ("class".equals(av.attribute))
+            {
+                s1 = av.value;
+                break;
+            }
+        }
+
+        if (s1 != null)
+        {
+            if (s2 != null) // merge class names from both
+            {
+                names = s1 + ' ' + s2;
+                av.value = names;
+            }
+        }
+        else if (s2 != null) // copy class names from child
+        {
+            av = new AttVal(node.attributes, null, '"', "class", s2);
+            av.dict = AttributeTable.getDefaultAttributeTable().findAttribute(av);
+            node.attributes = av;
+        }
+    }
+
+    /**
+     * Merge style from 2 nodes.
+     * @param node Node
+     * @param child Child node
+     */
+    private void mergeStyles(Node node, Node child)
+    {
+        AttVal av;
+        String s1, s2, style;
+
+        // the child may have a class attribute used for attaching styles, if so the class name needs to be copied to
+        // node's class
+        mergeClasses(node, child);
+
+        for (s2 = null, av = child.attributes; av != null; av = av.next)
+        {
+            if (av.attribute.equals("style"))
+            {
+                s2 = av.value;
+                break;
+            }
+        }
+
+        for (s1 = null, av = node.attributes; av != null; av = av.next)
+        {
+            if (av.attribute.equals("style"))
+            {
+                s1 = av.value;
+                break;
+            }
+        }
+
+        if (s1 != null)
+        {
+            if (s2 != null) // merge styles from both
+            {
+                style = mergeProperties(s1, s2);
+                av.value = style;
+            }
+        }
+        else if (s2 != null) // copy style of child
+        {
+            av = new AttVal(node.attributes, null, '"', "style", s2);
+            av.dict = AttributeTable.getDefaultAttributeTable().findAttribute(av);
+            node.attributes = av;
+        }
+    }
+
+    /**
+     * Map a % font size to a named font size.
+     * @param size size in %
+     * @return font size name
+     */
+    private String fontSize2Name(String size)
+    {
+        String[] sizes = {"60%", "70%", "80%", null, "120%", "150%", "200%"};
+        String buf;
+
+        if (size.length() > 0 && '0' <= size.charAt(0) && size.charAt(0) <= '6')
+        {
+            int n = size.charAt(0) - '0';
+            return sizes[n];
+        }
+
+        if (size.length() > 0 && size.charAt(0) == '-')
+        {
+            if (size.length() > 1 && '0' <= size.charAt(1) && size.charAt(1) <= '6')
+            {
+                int n = size.charAt(1) - '0';
+                double x;
+
+                for (x = 1.0; n > 0; --n)
+                {
+                    x *= 0.8;
+                }
+
+                x *= 100.0;
+                buf = "" + (int) x + "%";
+
+                return buf;
+            }
+
+            return "smaller"; /* "70%"; */
+        }
+
+        if (size.length() > 1 && '0' <= size.charAt(1) && size.charAt(1) <= '6')
+        {
+            int n = size.charAt(1) - '0';
+            double x;
+
+            for (x = 1.0; n > 0; --n)
+            {
+                x *= 1.2;
+            }
+
+            x *= 100.0;
+            buf = "" + (int) x + "%";
+
+            return buf;
+        }
+
+        return "larger"; /* "140%" */
+    }
+
+    /**
+     * Adds a font-family style.
+     * @param node Node
+     * @param face font face
+     */
+    private void addFontFace(Node node, String face)
+    {
+        addStyleProperty(node, "font-family: " + face);
+    }
+
+    /**
+     * Adds a font size style.
+     * @param node Node
+     * @param size font size
+     */
+    private void addFontSize(Node node, String size)
+    {
+        String value;
+
+        if (size.equals("6") && node.tag == this.tt.tagP)
+        {
+            node.element = "h1";
+            this.tt.findTag(node);
+            return;
+        }
+
+        if (size.equals("5") && node.tag == this.tt.tagP)
+        {
+            node.element = "h2";
+            this.tt.findTag(node);
+            return;
+        }
+
+        if (size.equals("4") && node.tag == this.tt.tagP)
+        {
+            node.element = "h3";
+            this.tt.findTag(node);
+            return;
+        }
+
+        value = fontSize2Name(size);
+
+        if (value != null)
+        {
+            addStyleProperty(node, "font-size: " + value);
+        }
+    }
+
+    /**
+     * Adds a font color style.
+     * @param node Node
+     * @param color color value
+     */
+    private void addFontColor(Node node, String color)
+    {
+        addStyleProperty(node, "color: " + color);
+    }
+
+    /**
+     * Adds an align style.
+     * @param node Node
+     * @param align align value
+     */
+    private void addAlign(Node node, String align)
+    {
+        // force alignment value to lower case
+        addStyleProperty(node, "text-align: " + align.toLowerCase());
+    }
+
+    /**
+     * Add style properties to node corresponding to the font face, size and color attributes.
+     * @param node font tag
+     * @param av attribute list for node
+     */
+    private void addFontStyles(Node node, AttVal av)
+    {
+        while (av != null)
+        {
+            if (av.attribute.equals("face"))
+            {
+                addFontFace(node, av.value);
+            }
+            else if (av.attribute.equals("size"))
+            {
+                addFontSize(node, av.value);
+            }
+            else if (av.attribute.equals("color"))
+            {
+                addFontColor(node, av.value);
+            }
+
+            av = av.next;
+        }
+    }
+
+    /**
+     * Symptom: <code>&lt;p align=center></code>. Action: <code>&lt;p style="text-align: center"></code>.
+     * @param lexer Lexer
+     * @param node node with center attribute. Will be modified to use css style.
+     */
+    private void textAlign(Lexer lexer, Node node)
+    {
+        AttVal av, prev;
+
+        prev = null;
+
+        for (av = node.attributes; av != null; av = av.next)
+        {
+            if (av.attribute.equals("align"))
+            {
+                if (prev != null)
+                {
+                    prev.next = av.next;
+                }
+                else
+                {
+                    node.attributes = av.next;
+                }
+
+                if (av.value != null)
+                {
+                    addAlign(node, av.value);
+                }
+
+                break;
+            }
+
+            prev = av;
+        }
+    }
+
+    /**
+     * Symptom: <code>&lt;dir>&lt;li></code> where <code>&lt;li></code> is only child. Action: coerce
+     * <code>&lt;dir> &lt;li></code> to <code>&lt;div></code> with indent. The clean up rules use the pnode argument
+     * to return the next node when the original node has been deleted.
+     * @param lexer Lexer
+     * @param node dir tag
+     * @return <code>true</code> if a dir tag has been coerced to a div
+     */
+    private boolean dir2Div(Lexer lexer, Node node)
+    {
+        Node child;
+
+        if (node.tag == this.tt.tagDir || node.tag == this.tt.tagUl || node.tag == this.tt.tagOl)
+        {
+            child = node.content;
+
+            if (child == null)
+            {
+                return false;
+            }
+
+            // check child has no peers
+            if (child.next != null)
+            {
+                return false;
+            }
+
+            if (child.tag != this.tt.tagLi)
+            {
+                return false;
+            }
+
+            if (!child.implicit)
+            {
+                return false;
+            }
+
+            // coerce dir to div
+            node.tag = this.tt.tagDiv;
+            node.element = "div";
+            addStyleProperty(node, "margin-left: 2em");
+            stripOnlyChild(node);
+            return true;
+        }
+
+        return false;
+    }
+
+    /**
+     * Symptom:
+     * 
+     * <pre>
+     * &lt;center>
+     * </pre>.
+     * <p>
+     * Action: replace <code>&lt;center></code> by <code>&lt;div style="text-align: center"></code>
+     * </p>
+     * @param lexer Lexer
+     * @param node center tag
+     * @param pnode pnode[0] is the same as node, passed in as an array to allow modification
+     * @return <code>true</code> if a center tag has been replaced by a div
+     */
+    private boolean center2Div(Lexer lexer, Node node, Node[] pnode)
+    {
+        if (node.tag == this.tt.tagCenter)
+        {
+            if (lexer.configuration.dropFontTags)
+            {
+                if (node.content != null)
+                {
+                    Node last = node.last;
+                    Node parent = node.parent;
+
+                    discardContainer(node, pnode);
+
+                    node = lexer.inferredTag("br");
+
+                    if (last.next != null)
+                    {
+                        last.next.prev = node;
+                    }
+
+                    node.next = last.next;
+                    last.next = node;
+                    node.prev = last;
+
+                    if (parent.last == last)
+                    {
+                        parent.last = node;
+                    }
+
+                    node.parent = parent;
+                }
+                else
+                {
+                    Node prev = node.prev;
+                    Node next = node.next;
+                    Node parent = node.parent;
+                    discardContainer(node, pnode);
+
+                    node = lexer.inferredTag("br");
+                    node.next = next;
+                    node.prev = prev;
+                    node.parent = parent;
+
+                    if (next != null)
+                    {
+                        next.prev = node;
+                    }
+                    else
+                    {
+                        parent.last = node;
+                    }
+
+                    if (prev != null)
+                    {
+                        prev.next = node;
+                    }
+                    else
+                    {
+                        parent.content = node;
+                    }
+                }
+
+                return true;
+            }
+            node.tag = this.tt.tagDiv;
+            node.element = "div";
+            addStyleProperty(node, "text-align: center");
+            return true;
+        }
+
+        return false;
+    }
+
+    /**
+     * Symptom: <code>&lt;div>&lt;div>...&lt;/div>&lt;/div></code> Action: merge the two divs. This is useful after
+     * nested &lt;dir>s used by Word for indenting have been converted to &lt;div>s.
+     * @param lexer Lexer
+     * @param node first div
+     * @return true if the divs have been merged
+     */
+    private boolean mergeDivs(Lexer lexer, Node node)
+    {
+        Node child;
+
+        if (node.tag != this.tt.tagDiv)
+        {
+            return false;
+        }
+
+        child = node.content;
+
+        if (child == null)
+        {
+            return false;
+        }
+
+        if (child.tag != this.tt.tagDiv)
+        {
+            return false;
+        }
+
+        if (child.next != null)
+        {
+            return false;
+        }
+
+        mergeStyles(node, child);
+        stripOnlyChild(node);
+        return true;
+    }
+
+    /**
+     * Symptom:
+     * <ul>
+     * <li>
+     * <ul>
+     * ...
+     * </ul>
+     * </li>
+     * </ul>
+     * Action: discard outer list.
+     * @param lexer Lexer
+     * @param node Node
+     * @param pnode passed in as array to allow modifications.
+     * @return <code>true</code> if nested lists have been found and replaced
+     */
+    private boolean nestedList(Lexer lexer, Node node, Node[] pnode)
+    {
+        Node child, list;
+
+        if (node.tag == this.tt.tagUl || node.tag == this.tt.tagOl)
+        {
+            child = node.content;
+
+            if (child == null)
+            {
+                return false;
+            }
+
+            // check child has no peers
+
+            if (child.next != null)
+            {
+                return false;
+            }
+
+            list = child.content;
+
+            if (list == null)
+            {
+                return false;
+            }
+
+            if (list.tag != node.tag)
+            {
+                return false;
+            }
+
+            pnode[0] = list; // Set node to resume iteration
+
+            // move inner list node into position of outer node
+            list.prev = node.prev;
+            list.next = node.next;
+            list.parent = node.parent;
+            fixNodeLinks(list);
+
+            // get rid of outer ul and its li
+            // XXX: Are we leaking the child node? -creitzel 7 Jun, 01
+            child.content = null;
+            node.content = null;
+            node.next = null;
+            node = null;
+
+            // If prev node was a list the chances are this node should be appended to that list. Word has no way of
+            // recognizing nested lists and just uses indents
+            if (list.prev != null)
+            {
+                if (list.prev.tag == this.tt.tagUl || list.prev.tag == this.tt.tagOl)
+                {
+
+                    node = list;
+                    list = node.prev;
+
+                    list.next = node.next;
+
+                    if (list.next != null)
+                    {
+                        list.next.prev = list;
+                    }
+
+                    child = list.last; /* <li> */
+
+                    node.parent = child;
+                    node.next = null;
+                    node.prev = child.last;
+                    fixNodeLinks(node);
+                    cleanNode(lexer, node);
+                }
+            }
+
+            return true;
+        }
+
+        return false;
+    }
+
+    /**
+     * Symptom: the only child of a block-level element is a presentation element such as B, I or FONT. Action: add
+     * style "font-weight: bold" to the block and strip the &lt;b>element, leaving its children. example:
+     * 
+     * <pre>
+     * &lt;p>
+     * &lt;b>&lt;font face="Arial" size="6">Draft Recommended Practice&lt;/font>&lt;/b>
+     * &lt;/p>
+     * </pre>
+     * 
+     * becomes:
+     * 
+     * <pre>
+     * &lt;p style="font-weight: bold; font-family: Arial; font-size: 6">
+     * Draft Recommended Practice
+     * &lt;/p>
+     * </pre>
+     * 
+     * <p>
+     * This code also replaces the align attribute by a style attribute. However, to avoid CSS problems with Navigator
+     * 4, this isn't done for the elements: caption, tr and table
+     * </p>
+     * @param lexer Lexer
+     * @param node parent node
+     * @return <code>true</code> if the child node has been removed
+     */
+    private boolean blockStyle(Lexer lexer, Node node)
+    {
+        Node child;
+
+        if ((node.tag.model & (Dict.CM_BLOCK | Dict.CM_LIST | Dict.CM_DEFLIST | Dict.CM_TABLE)) != 0)
+        {
+            if (node.tag != this.tt.tagTable && node.tag != this.tt.tagTr && node.tag != this.tt.tagLi)
+            {
+                // check for align attribute
+                if (node.tag != this.tt.tagCaption)
+                {
+                    textAlign(lexer, node);
+                }
+
+                child = node.content;
+
+                if (child == null)
+                {
+                    return false;
+                }
+
+                // check child has no peers
+                if (child.next != null)
+                {
+                    return false;
+                }
+
+                if (child.tag == this.tt.tagB)
+                {
+                    mergeStyles(node, child);
+                    addStyleProperty(node, "font-weight: bold");
+                    stripOnlyChild(node);
+                    return true;
+                }
+
+                if (child.tag == this.tt.tagI)
+                {
+                    mergeStyles(node, child);
+                    addStyleProperty(node, "font-style: italic");
+                    stripOnlyChild(node);
+                    return true;
+                }
+
+                if (child.tag == this.tt.tagFont)
+                {
+                    mergeStyles(node, child);
+                    addFontStyles(node, child.attributes);
+                    stripOnlyChild(node);
+                    return true;
+                }
+            }
+        }
+
+        return false;
+    }
+
+    /**
+     * If the node has only one b, i, or font child remove the child node and add the appropriate style attributes to
+     * parent.
+     * @param lexer Lexer
+     * @param node parent node
+     * @param pnode passed as an array to allow modifications
+     * @return <code>true</code> if child node has been stripped, replaced by style attributes.
+     */
+    private boolean inlineStyle(Lexer lexer, Node node, Node[] pnode)
+    {
+        Node child;
+
+        if (node.tag != this.tt.tagFont && (node.tag.model & (Dict.CM_INLINE | Dict.CM_ROW)) != 0)
+        {
+            child = node.content;
+
+            if (child == null)
+            {
+                return false;
+            }
+
+            // check child has no peers
+            if (child.next != null)
+            {
+                return false;
+            }
+
+            if (child.tag == this.tt.tagB && lexer.configuration.logicalEmphasis)
+            {
+                mergeStyles(node, child);
+                addStyleProperty(node, "font-weight: bold");
+                stripOnlyChild(node);
+                return true;
+            }
+
+            if (child.tag == this.tt.tagI && lexer.configuration.logicalEmphasis)
+            {
+                mergeStyles(node, child);
+                addStyleProperty(node, "font-style: italic");
+                stripOnlyChild(node);
+                return true;
+            }
+
+            if (child.tag == this.tt.tagFont)
+            {
+                mergeStyles(node, child);
+                addFontStyles(node, child.attributes);
+                stripOnlyChild(node);
+                return true;
+            }
+        }
+
+        return false;
+    }
+
+    /**
+     * Replace font elements by span elements, deleting the font element's attributes and replacing them by a single
+     * style attribute.
+     * @param lexer Lexer
+     * @param node font tag
+     * @param pnode passed as an array to allow modifications
+     * @return <code>true</code> if a font tag has been dropped and replaced by style attributes
+     */
+    private boolean font2Span(Lexer lexer, Node node, Node[] pnode)
+    {
+        AttVal av, style, next;
+
+        if (node.tag == this.tt.tagFont)
+        {
+            if (lexer.configuration.dropFontTags)
+            {
+                discardContainer(node, pnode);
+                return false;
+            }
+
+            // if FONT is only child of parent element then leave alone
+            if (node.parent.content == node && node.next == null)
+            {
+                return false;
+            }
+
+            addFontStyles(node, node.attributes);
+
+            // extract style attribute and free the rest
+            av = node.attributes;
+            style = null;
+
+            while (av != null)
+            {
+                next = av.next;
+
+                if (av.attribute.equals("style"))
+                {
+                    av.next = null;
+                    style = av;
+                }
+
+                av = next;
+            }
+
+            node.attributes = style;
+
+            node.tag = this.tt.tagSpan;
+            node.element = "span";
+
+            return true;
+        }
+
+        return false;
+    }
+
+    /**
+     * Applies all matching rules to a node.
+     * @param lexer Lexer
+     * @param node original node
+     * @return cleaned up node
+     */
+    private Node cleanNode(Lexer lexer, Node node)
+    {
+        Node next = null;
+        Node[] o = new Node[1];
+        boolean b = false;
+
+        for (next = node; node != null && node.isElement(); node = next)
+        {
+            o[0] = next;
+
+            b = dir2Div(lexer, node);
+            next = o[0];
+            if (b)
+            {
+                continue;
+            }
+
+            // Special case: true result means that arg node and its parent no longer exist.
+            // So we must jump back up the CreateStyleProperties() call stack until we have a valid node reference.
+            b = nestedList(lexer, node, o);
+            next = o[0];
+            if (b)
+            {
+                return next;
+            }
+
+            b = center2Div(lexer, node, o);
+            next = o[0];
+            if (b)
+            {
+                continue;
+            }
+
+            b = mergeDivs(lexer, node);
+            next = o[0];
+            if (b)
+            {
+                continue;
+            }
+
+            b = blockStyle(lexer, node);
+            next = o[0];
+            if (b)
+            {
+                continue;
+            }
+
+            b = inlineStyle(lexer, node, o);
+            next = o[0];
+            if (b)
+            {
+                continue;
+            }
+
+            b = font2Span(lexer, node, o);
+            next = o[0];
+            if (b)
+            {
+                continue;
+            }
+
+            break;
+        }
+
+        return next;
+    }
+
+    /**
+     * Special case: if the current node is destroyed by CleanNode() lower in the tree, this node and its parent no
+     * longer exist. So we must jump back up the CreateStyleProperties() call stack until we have a valid node
+     * reference.
+     * @param lexer Lexer
+     * @param node Node
+     * @param prepl passed in as array to allow modifications
+     * @return cleaned Node
+     */
+    private Node createStyleProperties(Lexer lexer, Node node, Node[] prepl)
+    {
+        Node child;
+
+        if (node.content != null)
+        {
+            Node[] repl = new Node[1];
+            repl[0] = node;
+            for (child = node.content; child != null; child = child.next)
+            {
+                child = createStyleProperties(lexer, child, repl);
+                if (repl[0] != node)
+                {
+                    return repl[0];
+                }
+            }
+        }
+
+        return cleanNode(lexer, node);
+    }
+
+    /**
+     * Find style attribute in node content, and replace it by corresponding class attribute.
+     * @param lexer Lexer
+     * @param node parent node
+     */
+    private void defineStyleRules(Lexer lexer, Node node)
+    {
+        Node child;
+
+        if (node.content != null)
+        {
+            child = node.content;
+            while (child != null)
+            {
+                defineStyleRules(lexer, child);
+                child = child.next;
+            }
+        }
+
+        style2Rule(lexer, node);
+    }
+
+    /**
+     * Clean an html tree.
+     * @param lexer Lexer
+     * @param doc root node
+     */
+    public void cleanTree(Lexer lexer, Node doc)
+    {
+        Node[] repl = new Node[1];
+        repl[0] = doc;
+        doc = createStyleProperties(lexer, doc, repl);
+
+        if (!lexer.configuration.makeClean)
+        {
+            defineStyleRules(lexer, doc);
+            createStyleElement(lexer, doc);
+        }
+    }
+
+    /**
+     * simplifies <b><b>... </b> ... </b> etc.
+     * @param node root Node
+     */
+    public void nestedEmphasis(Node node)
+    {
+        Node[] o = new Node[1];
+        Node next;
+
+        while (node != null)
+        {
+            next = node.next;
+
+            if ((node.tag == this.tt.tagB || node.tag == this.tt.tagI)
+                && node.parent != null
+                && node.parent.tag == node.tag)
+            {
+                // strip redundant inner element
+                o[0] = next;
+                discardContainer(node, o);
+                next = o[0];
+                node = next;
+                continue;
+            }
+
+            if (node.content != null)
+            {
+                nestedEmphasis(node.content);
+            }
+
+            node = next;
+        }
+    }
+
+    /**
+     * Replace i by em and b by strong.
+     * @param node root Node
+     */
+    public void emFromI(Node node)
+    {
+        while (node != null)
+        {
+            if (node.tag == this.tt.tagI)
+            {
+                node.element = this.tt.tagEm.name;
+                node.tag = this.tt.tagEm;
+            }
+            else if (node.tag == this.tt.tagB)
+            {
+                node.element = this.tt.tagStrong.name;
+                node.tag = this.tt.tagStrong;
+            }
+
+            if (node.content != null)
+            {
+                emFromI(node.content);
+            }
+
+            node = node.next;
+        }
+    }
+
+    /**
+     * Some people use dir or ul without an li to indent the content. The pattern to look for is a list with a single
+     * implicit li. This is recursively replaced by an implicit blockquote.
+     * @param node root Node
+     */
+    public void list2BQ(Node node)
+    {
+        while (node != null)
+        {
+            if (node.content != null)
+            {
+                list2BQ(node.content);
+            }
+
+            if (node.tag != null
+                && node.tag.getParser() == ParserImpl.LIST
+                && node.hasOneChild()
+                && node.content.implicit)
+            {
+                stripOnlyChild(node);
+                node.element = this.tt.tagBlockquote.name;
+                node.tag = this.tt.tagBlockquote;
+                node.implicit = true;
+            }
+
+            node = node.next;
+        }
+    }
+
+    /**
+     * Replace implicit blockquote by div with an indent taking care to reduce nested blockquotes to a single div with
+     * the indent set to match the nesting depth.
+     * @param node root Node
+     */
+    public void bQ2Div(Node node)
+    {
+        int indent;
+        String indentBuf;
+        AttVal attval;
+
+        while (node != null)
+        {
+            if (node.tag == this.tt.tagBlockquote && node.implicit)
+            {
+                indent = 1;
+
+                while (node.hasOneChild() && node.content.tag == this.tt.tagBlockquote && node.implicit)
+                {
+                    ++indent;
+                    stripOnlyChild(node);
+                }
+
+                if (node.content != null)
+                {
+                    bQ2Div(node.content);
+                }
+
+                indentBuf = "margin-left: " + (new Integer(2 * indent)).toString() + "em";
+
+                node.element = this.tt.tagDiv.name;
+                node.tag = this.tt.tagDiv;
+
+                attval = node.getAttrByName("style");
+
+                if (attval != null && attval.value != null)
+                {
+                    attval.value = indentBuf + "; " + attval.value;
+                }
+                else
+                {
+                    node.addAttribute("style", indentBuf);
+                }
+            }
+            else if (node.content != null)
+            {
+                bQ2Div(node.content);
+            }
+
+            node = node.next;
+        }
+    }
+
+    /**
+     * Find the enclosing table cell for the given node.
+     * @param node Node
+     * @return enclosing cell node
+     */
+    Node findEnclosingCell(Node node)
+    {
+        Node check;
+
+        for (check = node; check != null; check = check.parent)
+        {
+            if (check.tag == tt.tagTd)
+            {
+                return check;
+            }
+        }
+        return null;
+    }
+
+    /**
+     * node is <code>&lt;![if ...]&gt;</code> prune up to <code>&lt;![endif]&gt;</code>.
+     * @param lexer Lexer
+     * @param node Node
+     * @return cleaned up Node
+     */
+    public Node pruneSection(Lexer lexer, Node node)
+    {
+        for (;;)
+        {
+
+            // FG: commented out - don't add &nbsp; to empty cells
+
+            // if ((Lexer.getString(node.textarray, node.start, 21)).equals("if !supportEmptyParas"))
+            // {
+            //     Node cell = findEnclosingCell(node);
+            //     if (cell != null)
+            //     {
+            //         // Need to put &nbsp; into cell so it doesn't look weird
+            //         char onesixty[] = {(char) 160, (char) 0};
+            //         Node nbsp = lexer.newLiteralTextNode(lexer, onesixty);
+            //         Node.insertNodeBeforeElement(node, nbsp);
+            //      }
+            //  }
+
+            // discard node and returns next
+            node = Node.discardElement(node);
+
+            if (node == null)
+            {
+                return null;
+            }
+
+            if (node.type == Node.SECTION_TAG)
+            {
+                if ((TidyUtils.getString(node.textarray, node.start, 2)).equals("if"))
+                {
+                    node = pruneSection(lexer, node);
+                    continue;
+                }
+
+                if ((TidyUtils.getString(node.textarray, node.start, 5)).equals("endif"))
+                {
+                    node = Node.discardElement(node);
+                    break;
+                }
+            }
+        }
+
+        return node;
+    }
+
+    /**
+     * Drop if/endif sections inserted by word2000.
+     * @param lexer Lexer
+     * @param node Node root node
+     */
+    public void dropSections(Lexer lexer, Node node)
+    {
+        while (node != null)
+        {
+            if (node.type == Node.SECTION_TAG)
+            {
+                // prune up to matching endif
+                if ((TidyUtils.getString(node.textarray, node.start, 2)).equals("if")
+                    && (!(TidyUtils.getString(node.textarray, node.start, 7)).equals("if !vml"))) // #444394 - fix 13
+                // Sep 01
+                {
+                    node = pruneSection(lexer, node);
+                    continue;
+                }
+
+                // discard others as well
+                node = Node.discardElement(node);
+                continue;
+            }
+
+            if (node.content != null)
+            {
+                dropSections(lexer, node.content);
+            }
+
+            node = node.next;
+        }
+    }
+
+    /**
+     * Remove word2000 attributes from node.
+     * @param node node to cleanup
+     */
+    public void purgeWord2000Attributes(Node node)
+    {
+        AttVal attr = null;
+        AttVal next = null;
+        AttVal prev = null;
+
+        for (attr = node.attributes; attr != null; attr = next)
+        {
+            next = attr.next;
+
+            // special check for class="Code" denoting pre text
+            // Pass thru user defined styles as HTML class names
+            if (attr.attribute != null && attr.value != null && attr.attribute.equals("class"))
+            {
+                if (attr.value.equals("Code") || !attr.value.startsWith("Mso"))
+                {
+                    prev = attr;
+                    continue;
+                }
+            }
+
+            if (attr.attribute != null
+                && (attr.attribute.equals("class")
+                    || attr.attribute.equals("style")
+                    || attr.attribute.equals("lang")
+                    || attr.attribute.startsWith("x:") || ((attr.attribute.equals("height") || attr.attribute
+                    .equals("width")) && //
+                (node.tag == this.tt.tagTd || node.tag == this.tt.tagTr || node.tag == this.tt.tagTh))))
+            {
+                if (prev != null)
+                {
+                    prev.next = next;
+                }
+                else
+                {
+                    node.attributes = next;
+                }
+
+            }
+            else
+            {
+                prev = attr;
+            }
+        }
+    }
+
+    /**
+     * Word2000 uses span excessively, so we strip span out.
+     * @param lexer Lexer
+     * @param span Node span
+     * @return cleaned node
+     */
+    public Node stripSpan(Lexer lexer, Node span)
+    {
+        Node node;
+        Node prev = null;
+        Node content;
+
+        // deal with span elements that have content by splicing the content in place of the span after having
+        // processed it
+
+        cleanWord2000(lexer, span.content);
+        content = span.content;
+
+        if (span.prev != null)
+        {
+            prev = span.prev;
+        }
+        else if (content != null)
+        {
+            node = content;
+            content = content.next;
+            node.removeNode();
+            Node.insertNodeBeforeElement(span, node);
+            prev = node;
+        }
+
+        while (content != null)
+        {
+            node = content;
+            content = content.next;
+            node.removeNode();
+            prev.insertNodeAfterElement(node);
+            prev = node;
+        }
+
+        if (span.next == null)
+        {
+            span.parent.last = prev;
+        }
+
+        node = span.next;
+        span.content = null;
+        Node.discardElement(span);
+        return node;
+    }
+
+    /**
+     * Map non-breaking spaces to regular spaces.
+     * @param lexer Lexer
+     * @param node Node
+     */
+    private void normalizeSpaces(Lexer lexer, Node node)
+    {
+        while (node != null)
+        {
+            if (node.content != null)
+            {
+                normalizeSpaces(lexer, node.content);
+            }
+
+            if (node.type == Node.TEXT_NODE)
+            {
+                int i;
+                int[] c = new int[1];
+                int p = node.start;
+
+                for (i = node.start; i < node.end; ++i)
+                {
+                    c[0] = node.textarray[i];
+
+                    // look for UTF-8 multibyte character
+                    if (c[0] > 0x7F)
+                    {
+                        i += PPrint.getUTF8(node.textarray, i, c);
+                    }
+
+                    if (c[0] == 160)
+                    {
+                        c[0] = ' ';
+                    }
+
+                    p = PPrint.putUTF8(node.textarray, p, c[0]);
+                }
+            }
+
+            node = node.next;
+        }
+    }
+
+    /**
+     * Used to hunt for hidden preformatted sections.
+     * @param node checked node
+     * @return <code>true</code> if the node has a "margin-top: 0" or "margin-bottom: 0" style
+     */
+    boolean noMargins(Node node)
+    {
+        AttVal attval = node.getAttrByName("style");
+
+        if (attval == null || attval.value == null)
+        {
+            return false;
+        }
+
+        // search for substring "margin-top: 0"
+        if (attval.value.indexOf("margin-top: 0") == -1)
+        {
+            return false;
+        }
+
+        // search for substring "margin-top: 0"
+        if (attval.value.indexOf("margin-bottom: 0") == -1)
+        {
+            return false;
+        }
+
+        return true;
+    }
+
+    /**
+     * Does element have a single space as its content?
+     * @param lexer Lexer
+     * @param node checked node
+     * @return <code>true</code> if the element has a single space as its content
+     */
+    boolean singleSpace(Lexer lexer, Node node)
+    {
+        if (node.content != null)
+        {
+            node = node.content;
+
+            if (node.next != null)
+            {
+                return false;
+            }
+
+            if (node.type != Node.TEXT_NODE)
+            {
+                return false;
+            }
+
+            if (((node.end - node.start) == 1) && lexer.lexbuf[node.start] == ' ')
+            {
+                return true;
+            }
+
+            if ((node.end - node.start) == 2)
+            {
+                int[] c = new int[1];
+
+                PPrint.getUTF8(lexer.lexbuf, node.start, c);
+
+                if (c[0] == 160)
+                {
+                    return true;
+                }
+            }
+        }
+
+        return false;
+    }
+
+    /**
+     * This is a major clean up to strip out all the extra stuff you get when you save as web page from Word 2000. It
+     * doesn't yet know what to do with VML tags, but these will appear as errors unless you declare them as new tags,
+     * such as o:p which needs to be declared as inline.
+     * @param lexer Lexer
+     * @param node node to clean up
+     */
+    public void cleanWord2000(Lexer lexer, Node node)
+    {
+        // used to a list from a sequence of bulletted p's
+        Node list = null;
+
+        while (node != null)
+        {
+
+            // get rid of Word's xmlns attributes
+            if (node.tag == tt.tagHtml)
+            {
+                // check that it's a Word 2000 document
+                if ((node.getAttrByName("xmlns:o") == null))
+                {
+                    return;
+                }
+                lexer.configuration.tt.freeAttrs(node);
+            }
+
+            // fix up preformatted sections by looking for a sequence of paragraphs with zero top/bottom margin
+            if (node.tag == tt.tagP)
+            {
+                if (noMargins(node))
+                {
+                    Node pre;
+                    Node next;
+                    Node.coerceNode(lexer, node, tt.tagPre);
+
+                    purgeWord2000Attributes(node);
+
+                    if (node.content != null)
+                    {
+                        cleanWord2000(lexer, node.content);
+                    }
+
+                    pre = node;
+                    node = node.next;
+
+                    // continue to strip p's
+                    while (node.tag == tt.tagP && noMargins(node))
+                    {
+                        next = node.next;
+                        node.removeNode();
+                        pre.insertNodeAtEnd(lexer.newLineNode());
+                        pre.insertNodeAtEnd(node);
+                        stripSpan(lexer, node);
+                        node = next;
+                    }
+
+                    if (node == null)
+                    {
+                        break;
+                    }
+                }
+            }
+
+            if (node.tag != null && TidyUtils.toBoolean(node.tag.model & Dict.CM_BLOCK) && singleSpace(lexer, node))
+            {
+                node = stripSpan(lexer, node);
+                continue;
+            }
+
+            // discard Word's style verbiage
+            if (node.tag == this.tt.tagStyle || node.tag == this.tt.tagMeta || node.type == Node.COMMENT_TAG)
+            {
+                node = Node.discardElement(node);
+                continue;
+            }
+
+            // strip out all span and font tags Word scatters so liberally!
+            if (node.tag == this.tt.tagSpan || node.tag == this.tt.tagFont)
+            {
+                node = stripSpan(lexer, node);
+                continue;
+            }
+
+            if (node.tag == this.tt.tagLink)
+            {
+                AttVal attr = node.getAttrByName("rel");
+
+                if (attr != null && attr.value != null && attr.value.equals("File-List"))
+                {
+                    node = Node.discardElement(node);
+                    continue;
+                }
+            }
+
+            // discard empty paragraphs
+            if (node.content == null && node.tag == this.tt.tagP)
+            {
+                node = Node.discardElement(node);
+                continue;
+            }
+
+            if (node.tag == this.tt.tagP)
+            {
+                AttVal attr = node.getAttrByName("class");
+                AttVal atrStyle = node.getAttrByName("style");
+
+                // (JES) Sometimes Word marks a list item with the following hokie syntax
+                // <p class="MsoNormal" style="...;mso-list:l1 level1 lfo1;
+                // translate these into <li>
+
+                // map sequence of <p class="MsoListBullet"> to <ul> ... </ul>
+                // map <p class="MsoListNumber"> to <ol>...</ol>
+                if (attr != null
+                    && attr.value != null
+                    && ((attr.value.equals("MsoListBullet") || attr.value.equals("MsoListNumber")) //
+                    || (atrStyle != null && (atrStyle.value.indexOf("mso-list:") != -1)))) // 463066 - fix by Joel
+                // Shafer 19 Sep 01
+                {
+                    Dict listType = tt.tagUl;
+
+                    if (attr.value.equals("MsoListNumber"))
+                    {
+                        listType = tt.tagOl;
+                    }
+
+                    Node.coerceNode(lexer, node, this.tt.tagLi);
+
+                    if (list == null || list.tag != listType)
+                    {
+                        list = lexer.inferredTag(listType.name);
+                        Node.insertNodeBeforeElement(node, list);
+                    }
+
+                    purgeWord2000Attributes(node);
+
+                    if (node.content != null)
+                    {
+                        cleanWord2000(lexer, node.content);
+                    }
+
+                    // remove node and append to contents of list
+                    node.removeNode();
+                    list.insertNodeAtEnd(node);
+                    node = list;
+                }
+                // map sequence of <p class="Code"> to <pre> ... </pre>
+                else if (attr != null && attr.value != null && attr.value.equals("Code"))
+                {
+                    Node br = lexer.newLineNode();
+                    normalizeSpaces(lexer, node);
+
+                    if (list == null || list.tag != this.tt.tagPre)
+                    {
+                        list = lexer.inferredTag("pre");
+                        Node.insertNodeBeforeElement(node, list);
+                    }
+
+                    // remove node and append to contents of list
+                    node.removeNode();
+                    list.insertNodeAtEnd(node);
+                    stripSpan(lexer, node);
+                    list.insertNodeAtEnd(br);
+                    node = list.next;
+                }
+                else
+                {
+                    list = null;
+                }
+            }
+            else
+            {
+                list = null;
+            }
+
+            // strip out style and class attributes
+            if (node.type == Node.START_TAG || node.type == Node.START_END_TAG)
+            {
+                purgeWord2000Attributes(node);
+            }
+
+            if (node.content != null)
+            {
+                cleanWord2000(lexer, node.content);
+            }
+
+            node = node.next;
+        }
+    }
+
+    /**
+     * Check if the current document is a converted Word document.
+     * @param root root Node
+     * @return <code>true</code> if the document has been geenrated by Microsoft Word.
+     */
+    public boolean isWord2000(Node root)
+    {
+        AttVal attval;
+        Node node;
+        Node head;
+        Node html = root.findHTML(this.tt);
+
+        if (html != null && html.getAttrByName("xmlns:o") != null)
+        {
+            return true;
+        }
+
+        // search for <meta name="GENERATOR" content="Microsoft ...">
+        head = root.findHEAD(tt);
+
+        if (head != null)
+        {
+            for (node = head.content; node != null; node = node.next)
+            {
+                if (node.tag != tt.tagMeta)
+                {
+                    continue;
+                }
+
+                attval = node.getAttrByName("name");
+
+                if (attval == null || attval.value == null)
+                {
+                    continue;
+                }
+
+                if (!"generator".equals(attval.value))
+                {
+                    continue;
+                }
+
+                attval = node.getAttrByName("content");
+
+                if (attval == null || attval.value == null)
+                {
+                    continue;
+                }
+
+                if (attval.value.indexOf("Microsoft") != -1)
+                {
+                    return true;
+                }
+            }
+        }
+
+        return false;
+    }
+
+    /**
+     * Where appropriate move object elements from head to body.
+     * @param lexer Lexer
+     * @param html html node
+     */
+    static void bumpObject(Lexer lexer, Node html)
+    {
+        if (html == null)
+        {
+            return;
+        }
+
+        Node node, next, head = null, body = null;
+        TagTable tt = lexer.configuration.tt;
+        for (node = html.content; node != null; node = node.next)
+        {
+            if (node.tag == tt.tagHead)
+            {
+                head = node;
+            }
+
+            if (node.tag == tt.tagBody)
+            {
+                body = node;
+            }
+        }
+
+        if (head != null && body != null)
+        {
+            for (node = head.content; node != null; node = next)
+            {
+                next = node.next;
+
+                if (node.tag == tt.tagObject)
+                {
+                    Node child;
+                    boolean bump = false;
+
+                    for (child = node.content; child != null; child = child.next)
+                    {
+                        // bump to body unless content is param
+                        if ((child.type == Node.TEXT_NODE && !node.isBlank(lexer)) || child.tag != tt.tagParam)
+                        {
+                            bump = true;
+                            break;
+                        }
+                    }
+
+                    if (bump)
+                    {
+                        node.removeNode();
+                        body.insertNodeAtStart(node);
+                    }
+                }
+            }
+        }
+    }
+
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/Configuration.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/Configuration.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/Configuration.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1280 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ *  Java HTML Tidy - JTidy
+ *  HTML parser and pretty printer
+ *
+ *  Copyright (c) 1998-2000 World Wide Web Consortium (Massachusetts
+ *  Institute of Technology, Institut National de Recherche en
+ *  Informatique et en Automatique, Keio University). All Rights
+ *  Reserved.
+ *
+ *  Contributing Author(s):
+ *
+ *     Dave Raggett <dsr at w3.org>
+ *     Andy Quick <ac.quick at sympatico.ca> (translation to Java)
+ *     Gary L Peskin <garyp at firstech.com> (Java development)
+ *     Sami Lempinen <sami at lempinen.net> (release management)
+ *     Fabrizio Giustina <fgiust at users.sourceforge.net>
+ *
+ *  The contributing author(s) would like to thank all those who
+ *  helped with testing, bug fixes, and patience.  This wouldn't
+ *  have been possible without all of you.
+ *
+ *  COPYRIGHT NOTICE:
+ * 
+ *  This software and documentation is provided "as is," and
+ *  the copyright holders and contributing author(s) make no
+ *  representations or warranties, express or implied, including
+ *  but not limited to, warranties of merchantability or fitness
+ *  for any particular purpose or that the use of the software or
+ *  documentation will not infringe any third party patents,
+ *  copyrights, trademarks or other rights. 
+ *
+ *  The copyright holders and contributing author(s) will not be
+ *  liable for any direct, indirect, special or consequential damages
+ *  arising out of any use of the software or documentation, even if
+ *  advised of the possibility of such damage.
+ *
+ *  Permission is hereby granted to use, copy, modify, and distribute
+ *  this source code, or portions hereof, documentation and executables,
+ *  for any purpose, without fee, subject to the following restrictions:
+ *
+ *  1. The origin of this source code must not be misrepresented.
+ *  2. Altered versions must be plainly marked as such and must
+ *     not be misrepresented as being the original source.
+ *  3. This Copyright notice may not be removed or altered from any
+ *     source or altered source distribution.
+ * 
+ *  The copyright holders and contributing author(s) specifically
+ *  permit, without fee, and encourage the use of this source code
+ *  as a component for supporting the Hypertext Markup Language in
+ *  commercial products. If you use this source code in a product,
+ *  acknowledgment is not required but would be appreciated.
+ *
+ */
+package org.ajax4jsf.org.w3c.tidy;
+
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.Serializable;
+import java.io.Writer;
+import java.lang.reflect.Field;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+
+import org.ajax4jsf.framework.util.message.Messages;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+
+/**
+ * Read configuration file and manage configuration properties. Configuration files associate a property name with a
+ * value. The format is that of a Java .properties file.
+ * @author Dave Raggett <a href="mailto:dsr at w3.org">dsr at w3.org </a>
+ * @author Andy Quick <a href="mailto:ac.quick at sympatico.ca">ac.quick at sympatico.ca </a> (translation to Java)
+ * @author Fabrizio Giustina
+ * @version $Revision: 1.1.2.1 $ ($Author: alexsmirnov $)
+ */
+public class Configuration implements Serializable
+{
+
+	private static final Log log = LogFactory.getLog(Configuration.class);
+	
+    /**
+     * character encoding = RAW.
+     * @deprecated use <code>Tidy.setRawOut(true)</code> for raw output
+     */
+    public static final int RAW = 0;
+
+    /**
+     * character encoding = ASCII.
+     * @deprecated
+     */
+    public static final int ASCII = 1;
+
+    /**
+     * character encoding = LATIN1.
+     * @deprecated
+     */
+    public static final int LATIN1 = 2;
+
+    /**
+     * character encoding = UTF8.
+     * @deprecated
+     */
+    public static final int UTF8 = 3;
+
+    /**
+     * character encoding = ISO2022.
+     * @deprecated
+     */
+    public static final int ISO2022 = 4;
+
+    /**
+     * character encoding = MACROMAN.
+     * @deprecated
+     */
+    public static final int MACROMAN = 5;
+
+    /**
+     * character encoding = UTF16LE.
+     * @deprecated
+     */
+    public static final int UTF16LE = 6;
+
+    /**
+     * character encoding = UTF16BE.
+     * @deprecated
+     */
+    public static final int UTF16BE = 7;
+
+    /**
+     * character encoding = UTF16.
+     * @deprecated
+     */
+    public static final int UTF16 = 8;
+
+    /**
+     * character encoding = WIN1252.
+     * @deprecated
+     */
+    public static final int WIN1252 = 9;
+
+    /**
+     * character encoding = BIG5.
+     * @deprecated
+     */
+    public static final int BIG5 = 10;
+
+    /**
+     * character encoding = SHIFTJIS.
+     * @deprecated
+     */
+    public static final int SHIFTJIS = 11;
+
+    /**
+     * Convert from deprecated tidy encoding constant to standard java encoding name.
+     */
+    private final String[] ENCODING_NAMES = new String[]{
+        "raw", // rawOut, it will not be mapped to a java encoding
+        "ASCII",
+        "ISO8859_1",
+        "UTF8",
+        "JIS",
+        "MacRoman",
+        "UnicodeLittle",
+        "UnicodeBig",
+        "Unicode",
+        "Cp1252",
+        "Big5",
+        "SJIS"};
+
+    /**
+     * treatment of doctype: omit.
+     * @todo should be an enumeration DocTypeMode
+     */
+    public static final int DOCTYPE_OMIT = 0;
+
+    /**
+     * treatment of doctype: auto.
+     */
+    public static final int DOCTYPE_AUTO = 1;
+
+    /**
+     * treatment of doctype: strict.
+     */
+    public static final int DOCTYPE_STRICT = 2;
+
+    /**
+     * treatment of doctype: loose.
+     */
+    public static final int DOCTYPE_LOOSE = 3;
+
+    /**
+     * treatment of doctype: user.
+     */
+    public static final int DOCTYPE_USER = 4;
+
+    /**
+     * treatment of doctype: ignore doctype ( keep existing, if any ).
+     */
+    public static final int DOCTYPE_IGNORE = 5;
+    /**
+     * Keep last duplicate attribute.
+     * @todo should be an enumeration DupAttrMode
+     */
+    public static final int KEEP_LAST = 0;
+
+    /**
+     * Keep first duplicate attribute.
+     */
+    public static final int KEEP_FIRST = 1;
+
+    /**
+     * Map containg all the valid configuration options and the related parser. Tag entry contains String(option
+     * name)-Flag instance.
+     */
+    private static final Map OPTIONS = new HashMap();
+
+    /**
+     * serial version UID for this class.
+     */
+    private static final long serialVersionUID = -4955155037138560842L;
+
+    static
+    {
+        addConfigOption(new Flag("indent-spaces", "spaces", ParsePropertyImpl.INT));
+        addConfigOption(new Flag("wrap", "wraplen", ParsePropertyImpl.INT));
+        addConfigOption(new Flag("show-errors", "showErrors", ParsePropertyImpl.INT));
+        addConfigOption(new Flag("tab-size", "tabsize", ParsePropertyImpl.INT));
+
+        addConfigOption(new Flag("wrap-attributes", "wrapAttVals", ParsePropertyImpl.BOOL));
+        addConfigOption(new Flag("wrap-script-literals", "wrapScriptlets", ParsePropertyImpl.BOOL));
+        addConfigOption(new Flag("wrap-sections", "wrapSection", ParsePropertyImpl.BOOL));
+        addConfigOption(new Flag("wrap-asp", "wrapAsp", ParsePropertyImpl.BOOL));
+        addConfigOption(new Flag("wrap-jste", "wrapJste", ParsePropertyImpl.BOOL));
+        addConfigOption(new Flag("wrap-php", "wrapPhp", ParsePropertyImpl.BOOL));
+        addConfigOption(new Flag("literal-attributes", "literalAttribs", ParsePropertyImpl.BOOL));
+        addConfigOption(new Flag("show-body-only", "bodyOnly", ParsePropertyImpl.BOOL));
+        addConfigOption(new Flag("fix-uri", "fixUri", ParsePropertyImpl.BOOL));
+        addConfigOption(new Flag("lower-literals", "lowerLiterals", ParsePropertyImpl.BOOL));
+        addConfigOption(new Flag("hide-comments", "hideComments", ParsePropertyImpl.BOOL));
+        addConfigOption(new Flag("indent-cdata", "indentCdata", ParsePropertyImpl.BOOL));
+        addConfigOption(new Flag("force-output", "forceOutput", ParsePropertyImpl.BOOL));
+        addConfigOption(new Flag("ascii-chars", "asciiChars", ParsePropertyImpl.BOOL));
+        addConfigOption(new Flag("join-classes", "joinClasses", ParsePropertyImpl.BOOL));
+        addConfigOption(new Flag("join-styles", "joinStyles", ParsePropertyImpl.BOOL));
+        addConfigOption(new Flag("escape-cdata", "escapeCdata", ParsePropertyImpl.BOOL));
+        addConfigOption(new Flag("replace-color", "replaceColor", ParsePropertyImpl.BOOL));
+        addConfigOption(new Flag("quiet", "quiet", ParsePropertyImpl.BOOL));
+        addConfigOption(new Flag("tidy-mark", "tidyMark", ParsePropertyImpl.BOOL));
+        addConfigOption(new Flag("indent-attributes", "indentAttributes", ParsePropertyImpl.BOOL));
+        addConfigOption(new Flag("hide-endtags", "hideEndTags", ParsePropertyImpl.BOOL));
+        addConfigOption(new Flag("input-xml", "xmlTags", ParsePropertyImpl.BOOL));
+        addConfigOption(new Flag("output-xml", "xmlOut", ParsePropertyImpl.BOOL));
+        addConfigOption(new Flag("output-html", "htmlOut", ParsePropertyImpl.BOOL));
+        addConfigOption(new Flag("output-xhtml", "xHTML", ParsePropertyImpl.BOOL));
+        addConfigOption(new Flag("add-xml-pi", "xmlPi", ParsePropertyImpl.BOOL));
+        addConfigOption(new Flag("add-xml-decl", "xmlPi", ParsePropertyImpl.BOOL));
+        addConfigOption(new Flag("assume-xml-procins", "xmlPIs", ParsePropertyImpl.BOOL));
+        addConfigOption(new Flag("uppercase-tags", "upperCaseTags", ParsePropertyImpl.BOOL));
+        addConfigOption(new Flag("uppercase-attributes", "upperCaseAttrs", ParsePropertyImpl.BOOL));
+        addConfigOption(new Flag("bare", "makeBare", ParsePropertyImpl.BOOL));
+        addConfigOption(new Flag("clean", "makeClean", ParsePropertyImpl.BOOL));
+        addConfigOption(new Flag("logical-emphasis", "logicalEmphasis", ParsePropertyImpl.BOOL));
+        addConfigOption(new Flag("word-2000", "word2000", ParsePropertyImpl.BOOL));
+        addConfigOption(new Flag("drop-empty-paras", "dropEmptyParas", ParsePropertyImpl.BOOL));
+        addConfigOption(new Flag("drop-font-tags", "dropFontTags", ParsePropertyImpl.BOOL));
+        addConfigOption(new Flag("drop-proprietary-attributes", "dropProprietaryAttributes", ParsePropertyImpl.BOOL));
+        addConfigOption(new Flag("enclose-text", "encloseBodyText", ParsePropertyImpl.BOOL));
+        addConfigOption(new Flag("enclose-block-text", "encloseBlockText", ParsePropertyImpl.BOOL));
+        addConfigOption(new Flag("add-xml-space", "xmlSpace", ParsePropertyImpl.BOOL));
+        addConfigOption(new Flag("fix-bad-comments", "fixComments", ParsePropertyImpl.BOOL));
+        addConfigOption(new Flag("split", "burstSlides", ParsePropertyImpl.BOOL));
+        addConfigOption(new Flag("break-before-br", "breakBeforeBR", ParsePropertyImpl.BOOL));
+        addConfigOption(new Flag("numeric-entities", "numEntities", ParsePropertyImpl.BOOL));
+        addConfigOption(new Flag("quote-marks", "quoteMarks", ParsePropertyImpl.BOOL));
+        addConfigOption(new Flag("quote-nbsp", "quoteNbsp", ParsePropertyImpl.BOOL));
+        addConfigOption(new Flag("quote-ampersand", "quoteAmpersand", ParsePropertyImpl.BOOL));
+        addConfigOption(new Flag("write-back", "writeback", ParsePropertyImpl.BOOL));
+        addConfigOption(new Flag("keep-time", "keepFileTimes", ParsePropertyImpl.BOOL));
+        addConfigOption(new Flag("show-warnings", "showWarnings", ParsePropertyImpl.BOOL));
+        addConfigOption(new Flag("ncr", "ncr", ParsePropertyImpl.BOOL));
+        addConfigOption(new Flag("fix-backslash", "fixBackslash", ParsePropertyImpl.BOOL));
+        addConfigOption(new Flag("gnu-emacs", "emacs", ParsePropertyImpl.BOOL));
+        addConfigOption(new Flag("only-errors", "onlyErrors", ParsePropertyImpl.BOOL));
+        addConfigOption(new Flag("output-raw", "rawOut", ParsePropertyImpl.BOOL));
+        addConfigOption(new Flag("trim-empty-elements", "trimEmpty", ParsePropertyImpl.BOOL));
+        addConfigOption(new Flag("move-elements", "moveElements", ParsePropertyImpl.BOOL));
+        addConfigOption(new Flag("smart-indent", "smartIndent", ParsePropertyImpl.BOOL));
+
+        addConfigOption(new Flag("markup", "onlyErrors", ParsePropertyImpl.INVBOOL));
+
+        addConfigOption(new Flag("char-encoding", null, ParsePropertyImpl.CHAR_ENCODING));
+        addConfigOption(new Flag("input-encoding", null, ParsePropertyImpl.CHAR_ENCODING));
+        addConfigOption(new Flag("output-encoding", null, ParsePropertyImpl.CHAR_ENCODING));
+
+        addConfigOption(new Flag("error-file", "errfile", ParsePropertyImpl.NAME));
+        addConfigOption(new Flag("slide-style", "slidestyle", ParsePropertyImpl.NAME));
+        addConfigOption(new Flag("language", "language", ParsePropertyImpl.NAME));
+
+        addConfigOption(new Flag("new-inline-tags", null, ParsePropertyImpl.TAGNAMES));
+        addConfigOption(new Flag("new-blocklevel-tags", null, ParsePropertyImpl.TAGNAMES));
+        addConfigOption(new Flag("new-empty-tags", null, ParsePropertyImpl.TAGNAMES));
+        addConfigOption(new Flag("new-pre-tags", null, ParsePropertyImpl.TAGNAMES));
+
+        addConfigOption(new Flag("doctype", "docTypeStr", ParsePropertyImpl.DOCTYPE));
+
+        addConfigOption(new Flag("repeated-attributes", "duplicateAttrs", ParsePropertyImpl.REPEATED_ATTRIBUTES));
+
+        addConfigOption(new Flag("alt-text", "altText", ParsePropertyImpl.STRING));
+
+        addConfigOption(new Flag("indent", "indentContent", ParsePropertyImpl.INDENT));
+
+        addConfigOption(new Flag("css-prefix", "cssPrefix", ParsePropertyImpl.CSS1SELECTOR));
+
+        addConfigOption(new Flag("newline", null, ParsePropertyImpl.NEWLINE));
+    }
+
+    /**
+     * default indentation.
+     */
+    protected int spaces = 2;
+
+    /**
+     * default wrap margin (68).
+     */
+    protected int wraplen = 68;
+
+    /**
+     * default tab size (8).
+     */
+    protected int tabsize = 8;
+
+    /**
+     * see doctype property.
+     */
+    protected int docTypeMode = DOCTYPE_AUTO;
+
+    /**
+     * Keep first or last duplicate attribute.
+     */
+    protected int duplicateAttrs = KEEP_LAST;
+
+    /**
+     * default text for alt attribute.
+     */
+    protected String altText;
+
+    /**
+     * style sheet for slides.
+     * @deprecated does nothing
+     */
+    protected String slidestyle;
+
+    /**
+     * RJ language property.
+     */
+    protected String language; // #431953
+
+    /**
+     * user specified doctype.
+     */
+    protected String docTypeStr;
+
+    /**
+     * file name to write errors to.
+     */
+    protected String errfile;
+
+    /**
+     * if true then output tidied markup.
+     */
+    protected boolean writeback;
+
+    /**
+     * if true normal output is suppressed.
+     */
+    protected boolean onlyErrors;
+
+    /**
+     * however errors are always shown.
+     */
+    protected boolean showWarnings = true;
+
+    /**
+     * no 'Parsing X', guessed DTD or summary.
+     */
+    protected boolean quiet;
+
+    /**
+     * indent content of appropriate tags.
+     */
+    protected boolean indentContent;
+
+    /**
+     * does text/block level content effect indentation.
+     */
+    protected boolean smartIndent;
+
+    /**
+     * suppress optional end tags.
+     */
+    protected boolean hideEndTags;
+
+    /**
+     * treat input as XML.
+     */
+    protected boolean xmlTags;
+
+    /**
+     * create output as XML.
+     */
+    protected boolean xmlOut;
+
+    /**
+     * output extensible HTML.
+     */
+    protected boolean xHTML;
+
+    /**
+     * output plain-old HTML, even for XHTML input. Yes means set explicitly.
+     */
+    protected boolean htmlOut;
+
+    /**
+     * add <code>&lt;?xml?&gt;</code> for XML docs.
+     */
+    protected boolean xmlPi;
+
+    /**
+     * output tags in upper not lower case.
+     */
+    protected boolean upperCaseTags;
+
+    /**
+     * output attributes in upper not lower case.
+     */
+    protected boolean upperCaseAttrs;
+
+    /**
+     * remove presentational clutter.
+     */
+    protected boolean makeClean;
+
+    /**
+     * Make bare HTML: remove Microsoft cruft.
+     */
+    protected boolean makeBare;
+
+    /**
+     * replace i by em and b by strong.
+     */
+    protected boolean logicalEmphasis;
+
+    /**
+     * discard presentation tags.
+     */
+    protected boolean dropFontTags;
+
+    /**
+     * discard proprietary attributes.
+     */
+    protected boolean dropProprietaryAttributes;
+
+    /**
+     * discard empty p elements.
+     */
+    protected boolean dropEmptyParas = true;
+
+    /**
+     * fix comments with adjacent hyphens.
+     */
+    protected boolean fixComments = true;
+
+    /**
+     * trim empty elements.
+     */
+    protected boolean trimEmpty = true;
+
+    /**
+     * o/p newline before br or not?
+     */
+    protected boolean breakBeforeBR;
+
+    /**
+     * create slides on each h2 element.
+     */
+    protected boolean burstSlides;
+
+    /**
+     * use numeric entities.
+     */
+    protected boolean numEntities;
+
+    /**
+     * output " marks as &quot;.
+     */
+    protected boolean quoteMarks;
+
+    /**
+     * output non-breaking space as entity.
+     */
+    protected boolean quoteNbsp = true;
+
+    /**
+     * output naked ampersand as &amp;.
+     */
+    protected boolean quoteAmpersand = true;
+
+    /**
+     * wrap within attribute values.
+     */
+    protected boolean wrapAttVals;
+
+    /**
+     * wrap within JavaScript string literals.
+     */
+    protected boolean wrapScriptlets;
+
+    /**
+     * wrap within CDATA section tags.
+     */
+    protected boolean wrapSection = true;
+
+    /**
+     * wrap within ASP pseudo elements.
+     */
+    protected boolean wrapAsp = true;
+
+    /**
+     * wrap within JSTE pseudo elements.
+     */
+    protected boolean wrapJste = true;
+
+    /**
+     * wrap within PHP pseudo elements.
+     */
+    protected boolean wrapPhp = true;
+
+    /**
+     * fix URLs by replacing \ with /.
+     */
+    protected boolean fixBackslash = true;
+
+    /**
+     * newline+indent before each attribute.
+     */
+    protected boolean indentAttributes;
+
+    /**
+     * If set to yes PIs must end with <code>?&gt;</code>.
+     */
+    protected boolean xmlPIs;
+
+    /**
+     * if set to yes adds xml:space attr as needed.
+     */
+    protected boolean xmlSpace;
+
+    /**
+     * if yes text at body is wrapped in p's.
+     */
+    protected boolean encloseBodyText;
+
+    /**
+     * if yes text in blocks is wrapped in p's.
+     */
+    protected boolean encloseBlockText;
+
+    /**
+     * if yes last modied time is preserved.
+     */
+    protected boolean keepFileTimes = true;
+
+    /**
+     * draconian cleaning for Word2000.
+     */
+    protected boolean word2000;
+
+    /**
+     * add meta element indicating tidied doc.
+     */
+    protected boolean tidyMark = true;
+
+    /**
+     * if true format error output for GNU Emacs.
+     */
+    protected boolean emacs;
+
+    /**
+     * if true attributes may use newlines.
+     */
+    protected boolean literalAttribs;
+
+    /**
+     * output BODY content only.
+     */
+    protected boolean bodyOnly;
+
+    /**
+     * properly escape URLs.
+     */
+    protected boolean fixUri = true;
+
+    /**
+     * folds known attribute values to lower case.
+     */
+    protected boolean lowerLiterals = true;
+
+    /**
+     * replace hex color attribute values with names.
+     */
+    protected boolean replaceColor;
+
+    /**
+     * hides all (real) comments in output.
+     */
+    protected boolean hideComments;
+
+    /**
+     * indent CDATA sections.
+     */
+    protected boolean indentCdata;
+
+    /**
+     * output document even if errors were found.
+     */
+    protected boolean forceOutput;
+
+    /**
+     * number of errors to put out.
+     */
+    protected int showErrors = 6;
+
+    /**
+     * convert quotes and dashes to nearest ASCII char.
+     */
+    protected boolean asciiChars = true;
+
+    /**
+     * join multiple class attributes.
+     */
+    protected boolean joinClasses;
+
+    /**
+     * join multiple style attributes.
+     */
+    protected boolean joinStyles = true;
+
+    /**
+     * replace CDATA sections with escaped text.
+     */
+    protected boolean escapeCdata = true;
+
+    
+    /**
+     * Move elements ( style to head, to body, reformat tables )
+     */
+    protected boolean moveElements = true;
+    /**
+     * allow numeric character references.
+     */
+    protected boolean ncr = true; // #431953
+
+    /**
+     * CSS class naming for -clean option.
+     */
+    protected String cssPrefix;
+
+    /**
+     * char encoding used when replacing illegal SGML chars, regardless of specified encoding.
+     */
+    protected int replacementCharEncoding = WIN1252; // by default
+
+    /**
+     * TagTable associated with this Configuration.
+     */
+    protected TagTable tt;
+
+    /**
+     * Report instance. Used for messages.
+     */
+    protected Report report;
+
+    /**
+     * track what types of tags user has defined to eliminate unnecessary searches.
+     */
+    protected int definedTags;
+
+    /**
+     * bytes for the newline marker.
+     */
+    protected char[] newline = (System.getProperty("line.separator")).toCharArray();
+
+    /**
+     * Input character encoding (defaults to LATIN1).
+     */
+    private int inCharEncoding = LATIN1;
+
+    /**
+     * Input character encoding (defaults to "ISO8859_1").
+     */
+    private String inCharEncodingName = "ISO8859_1";
+
+    /**
+     * Output character encoding (defaults to ASCII).
+     */
+    private int outCharEncoding = ASCII;
+
+    /**
+     * Output character encoding (defaults to "ASCII").
+     */
+    private String outCharEncodingName = "ASCII";
+
+    /**
+     * Avoid mapping values > 127 to entities.
+     */
+    protected boolean rawOut;
+
+    /**
+     * configuration properties.
+     */
+    private transient Properties properties = new Properties();
+
+    /**
+     * Instantiates a new Configuration. This method should be called by Tidy only.
+     * @param report Report instance
+     */
+    protected Configuration(Report report)
+    {
+        this.report = report;
+    }
+
+    /**
+     * adds a config option to the map.
+     * @param flag configuration options added
+     */
+    private static void addConfigOption(Flag flag)
+    {
+        OPTIONS.put(flag.getName(), flag);
+    }
+
+    /**
+     * adds configuration Properties.
+     * @param p Properties
+     */
+    public void addProps(Properties p)
+    {
+        Enumeration propEnum = p.propertyNames();
+        while (propEnum.hasMoreElements())
+        {
+            String key = (String) propEnum.nextElement();
+            String value = p.getProperty(key);
+            properties.put(key, value);
+        }
+        parseProps();
+    }
+
+    /**
+     * Parses a property file.
+     * @param filename file name
+     */
+    public void parseFile(String filename)
+    {
+    	FileInputStream input = null;
+        try
+        {
+        	input = new FileInputStream(filename);
+            properties.load(input);
+        }
+        catch (IOException e)
+        {
+            log.error(filename + " " + e.toString());
+            return;
+        } finally {
+        	if(input != null) {
+        		try {
+        			input.close();
+        		} catch (IOException e1) {
+        			//ignore
+        		}
+        	}
+        }
+        parseProps();
+    }
+
+    /**
+     * Is the given String a valid configuration flag?
+     * @param name configuration parameter name
+     * @return <code>true</code> if the given String is a valid config option
+     */
+    public static boolean isKnownOption(String name)
+    {
+        return name != null && OPTIONS.containsKey(name);
+    }
+
+    /**
+     * Parses the configuration properties file.
+     */
+    private void parseProps()
+    {
+        Iterator iterator = properties.keySet().iterator();
+
+        while (iterator.hasNext())
+        {
+            String key = (String) iterator.next();
+            Flag flag = (Flag) OPTIONS.get(key);
+            if (flag == null)
+            {
+                report.unknownOption(key);
+                continue;
+            }
+
+            String stringValue = properties.getProperty(key);
+            Object value = flag.getParser().parse(stringValue, key, this);
+            if (flag.getLocation() != null)
+            {
+                try
+                {
+                    flag.getLocation().set(this, value);
+                }
+                catch (IllegalArgumentException e)
+                {
+                    throw new RuntimeException(
+                    	Messages.getMessage(Messages.CONFIG_INITIALIZATION_ERROR, new Object[]{"IllegalArgumentException", key, value, e.getMessage()}));
+                }
+                catch (IllegalAccessException e)
+                {
+                    throw new RuntimeException(
+                        	Messages.getMessage(Messages.CONFIG_INITIALIZATION_ERROR, new Object[]{"IllegalAccessException", key, value, e.getMessage()}));
+                }
+            }
+        }
+    }
+
+    /**
+     * Ensure that config is self consistent.
+     */
+    public void adjust()
+    {
+        if (encloseBlockText)
+        {
+            encloseBodyText = true;
+        }
+
+        // avoid the need to set IndentContent when SmartIndent is set
+        if (smartIndent)
+        {
+            indentContent = true;
+        }
+
+        // disable wrapping
+        if (wraplen == 0)
+        {
+            wraplen = 0x7FFFFFFF;
+        }
+
+        // Word 2000 needs o:p to be declared as inline
+        if (word2000)
+        {
+            definedTags |= Dict.TAGTYPE_INLINE;
+            tt.defineTag(Dict.TAGTYPE_INLINE, "o:p");
+        }
+
+        // #480701 disable XHTML output flag if both output-xhtml and xml are set
+        if (xmlTags)
+        {
+            xHTML = false;
+        }
+
+        // XHTML is written in lower case
+        if (xHTML)
+        {
+            xmlOut = true;
+            upperCaseTags = false;
+            upperCaseAttrs = false;
+        }
+
+        // if XML in, then XML out
+        if (xmlTags)
+        {
+            xmlOut = true;
+            xmlPIs = true;
+        }
+
+        // #427837 - fix by Dave Raggett 02 Jun 01
+        // generate <?xml version="1.0" encoding="iso-8859-1"?> if the output character encoding is Latin-1 etc.
+        if (getOutCharEncoding() != UTF8 && getOutCharEncoding() != ASCII && xmlOut)
+        {
+            xmlPi = true;
+        }
+
+        // XML requires end tags
+        if (xmlOut)
+        {
+            quoteAmpersand = true;
+            hideEndTags = false;
+        }
+    }
+
+    /**
+     * prints available configuration options.
+     * @param errout where to write
+     * @param showActualConfiguration print actual configuration values
+     */
+    void printConfigOptions(Writer errout, boolean showActualConfiguration)
+    {
+        String pad = "                                                                               ";
+        try
+        {
+            errout.write("\nConfiguration File Settings:\n\n");
+
+            if (showActualConfiguration)
+            {
+                errout.write("Name                        Type       Current Value\n");
+            }
+            else
+            {
+                errout.write("Name                        Type       Allowable values\n");
+            }
+
+            errout.write("=========================== =========  ========================================\n");
+
+            Flag configItem;
+
+            // sort configuration options
+            List values = new ArrayList(OPTIONS.values());
+            Collections.sort(values);
+
+            Iterator iterator = values.iterator();
+
+            while (iterator.hasNext())
+            {
+                configItem = (Flag) iterator.next();
+
+                errout.write(configItem.getName());
+                errout.write(pad, 0, 28 - configItem.getName().length());
+
+                errout.write(configItem.getParser().getType());
+                errout.write(pad, 0, 11 - configItem.getParser().getType().length());
+
+                if (showActualConfiguration)
+                {
+                    Field field = configItem.getLocation();
+                    Object actualValue = null;
+
+                    if (field != null)
+                    {
+                        try
+                        {
+                            actualValue = field.get(this);
+                        }
+                        catch (IllegalArgumentException e1)
+                        {
+                            // should never happen
+                            throw new RuntimeException(
+                            		Messages.getMessage(Messages.FIELD_READING_ERROR, "IllegalArgumentException", field.getName()));
+                        }
+                        catch (IllegalAccessException e1)
+                        {
+                            // should never happen
+                            throw new RuntimeException(
+                            		Messages.getMessage(Messages.FIELD_READING_ERROR, "IllegalAccessException", field.getName()));
+                        }
+                    }
+
+                    errout.write(configItem.getParser().getFriendlyName(configItem.getName(), actualValue, this));
+                }
+                else
+                {
+                    errout.write(configItem.getParser().getOptionValues());
+                }
+
+                errout.write("\n");
+
+            }
+            errout.flush();
+        }
+        catch (IOException e)
+        {
+            throw new RuntimeException(e.getMessage());
+        }
+
+    }
+
+    /**
+     * A configuration option.
+     */
+    static class Flag implements Comparable
+    {
+
+        /**
+         * option name.
+         */
+        private String name;
+
+        /**
+         * field name.
+         */
+        private String fieldName;
+
+        /**
+         * Field where the evaluated value is saved.
+         */
+        private Field location;
+
+        /**
+         * Parser for the configuration property.
+         */
+        private ParseProperty parser;
+
+        /**
+         * Instantiates a new Flag.
+         * @param name option name
+         * @param fieldName field name (can be null)
+         * @param parser parser for property
+         */
+        Flag(String name, String fieldName, ParseProperty parser)
+        {
+
+            this.fieldName = fieldName;
+            this.name = name;
+            this.parser = parser;
+        }
+
+        /**
+         * Getter for <code>location</code>.
+         * @return Returns the location.
+         */
+        public Field getLocation()
+        {
+            // lazy initialization to speed up loading
+            if (fieldName != null && this.location == null)
+            {
+                try
+                {
+                    this.location = Configuration.class.getDeclaredField(fieldName);
+                }
+                catch (NoSuchFieldException e)
+                {
+                    throw new RuntimeException(Messages.getMessage(Messages.CONFIG_INITIALIZATION_ERROR_2, "NoSuchFieldException", fieldName));
+                }
+                catch (SecurityException e)
+                {
+                    throw new RuntimeException(Messages.getMessage(Messages.CONFIG_INITIALIZATION_ERROR_2, "SecurityException", fieldName) + ": " + e.getMessage());
+                }
+            }
+
+            return this.location;
+        }
+
+        /**
+         * Getter for <code>name</code>.
+         * @return Returns the name.
+         */
+        public String getName()
+        {
+            return this.name;
+        }
+
+        /**
+         * Getter for <code>parser</code>.
+         * @return Returns the parser.
+         */
+        public ParseProperty getParser()
+        {
+            return this.parser;
+        }
+
+        /**
+         * @see java.lang.Object#equals(java.lang.Object)
+         */
+        public boolean equals(Object obj)
+        {
+            return this.name.equals(((Flag) obj).name);
+        }
+
+        /**
+         * @see java.lang.Object#hashCode()
+         */
+        public int hashCode()
+        {
+            // returning the hashCode of String, to be consistent with equals and compareTo
+            return this.name.hashCode();
+        }
+
+        /**
+         * @see java.lang.Comparable#compareTo(java.lang.Object)
+         */
+        public int compareTo(Object o)
+        {
+            return this.name.compareTo(((Flag) o).name);
+        }
+
+    }
+
+    /**
+     * Getter for <code>inCharEncoding</code>.
+     * @return Returns the inCharEncoding.
+     * @deprecated use getInCharEncodingName()
+     */
+    protected int getInCharEncoding()
+    {
+        return this.inCharEncoding;
+    }
+
+    /**
+     * Setter for <code>inCharEncoding</code>.
+     * @param encoding The inCharEncoding to set.
+     * @deprecated use setInCharEncodingName(String)
+     */
+    protected void setInCharEncoding(int encoding)
+    {
+        if (encoding == RAW)
+        {
+            rawOut = true;
+        }
+        else
+        {
+            rawOut = false;
+            this.inCharEncoding = encoding;
+        }
+    }
+
+    /**
+     * Getter for <code>inCharEncodingName</code>.
+     * @return Returns the inCharEncodingName.
+     */
+    protected String getInCharEncodingName()
+    {
+        return this.inCharEncodingName;
+    }
+
+    /**
+     * Setter for <code>inCharEncodingName</code>.
+     * @param encoding The inCharEncodingName to set.
+     */
+    protected void setInCharEncodingName(String encoding)
+    {
+        String javaEncoding = EncodingNameMapper.toJava(encoding);
+        if (javaEncoding != null)
+        {
+            this.inCharEncodingName = javaEncoding;
+            this.inCharEncoding = convertCharEncoding(javaEncoding);
+        }
+    }
+
+    /**
+     * Getter for <code>outCharEncoding</code>.
+     * @return Returns the outCharEncoding.
+     * @deprecated use getOutCharEncodingName()
+     */
+    protected int getOutCharEncoding()
+    {
+        return this.outCharEncoding;
+    }
+
+    /**
+     * Setter for <code>outCharEncoding</code>.
+     * @param encoding The outCharEncoding to set.
+     * @deprecated use setOutCharEncodingName(String)
+     */
+    protected void setOutCharEncoding(int encoding)
+    {
+        switch (encoding)
+        {
+            case RAW :
+                this.rawOut = true;
+                break;
+
+            case MACROMAN :
+            case WIN1252 :
+                this.rawOut = false;
+                this.outCharEncoding = ASCII;
+                break;
+
+            default :
+                this.rawOut = false;
+                this.outCharEncoding = encoding;
+                break;
+        }
+    }
+
+    /**
+     * Getter for <code>outCharEncodingName</code>.
+     * @return Returns the outCharEncodingName.
+     */
+    protected String getOutCharEncodingName()
+    {
+        return this.outCharEncodingName;
+    }
+
+    /**
+     * Setter for <code>outCharEncodingName</code>.
+     * @param encoding The outCharEncodingName to set.
+     */
+    protected void setOutCharEncodingName(String encoding)
+    {
+        String javaEncoding = EncodingNameMapper.toJava(encoding);
+        if (javaEncoding != null)
+        {
+            this.outCharEncodingName = javaEncoding;
+            this.outCharEncoding = convertCharEncoding(javaEncoding);
+        }
+    }
+
+    /**
+     * Setter for <code>inOutCharEncodingName</code>.
+     * @param encoding The CharEncodingName to set.
+     */
+    protected void setInOutEncodingName(String encoding)
+    {
+        setInCharEncodingName(encoding);
+        setOutCharEncodingName(encoding);
+    }
+
+    /**
+     * Convert a char encoding from the deprecated tidy constant to a standard java encoding name.
+     * @param code encoding code
+     * @return encoding name
+     */
+    protected String convertCharEncoding(int code)
+    {
+        if (code != 0 && code < ENCODING_NAMES.length)
+        {
+            return ENCODING_NAMES[code];
+        }
+        return null;
+    }
+
+    /**
+     * Convert a char encoding from a standard java encoding name to the deprecated tidy constant.
+     * @param name encoding name
+     * @return encoding code
+     */
+    protected int convertCharEncoding(String name)
+    {
+        if (name == null)
+        {
+            return -1;
+        }
+
+        for (int j = 1; j < ENCODING_NAMES.length; j++)
+        {
+            if (name.equals(ENCODING_NAMES[j]))
+            {
+                return j;
+            }
+        }
+
+        return -1;
+    }
+
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/DOMAttrImpl.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/DOMAttrImpl.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/DOMAttrImpl.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,354 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ *  Java HTML Tidy - JTidy
+ *  HTML parser and pretty printer
+ *
+ *  Copyright (c) 1998-2000 World Wide Web Consortium (Massachusetts
+ *  Institute of Technology, Institut National de Recherche en
+ *  Informatique et en Automatique, Keio University). All Rights
+ *  Reserved.
+ *
+ *  Contributing Author(s):
+ *
+ *     Dave Raggett <dsr at w3.org>
+ *     Andy Quick <ac.quick at sympatico.ca> (translation to Java)
+ *     Gary L Peskin <garyp at firstech.com> (Java development)
+ *     Sami Lempinen <sami at lempinen.net> (release management)
+ *     Fabrizio Giustina <fgiust at users.sourceforge.net>
+ *
+ *  The contributing author(s) would like to thank all those who
+ *  helped with testing, bug fixes, and patience.  This wouldn't
+ *  have been possible without all of you.
+ *
+ *  COPYRIGHT NOTICE:
+ * 
+ *  This software and documentation is provided "as is," and
+ *  the copyright holders and contributing author(s) make no
+ *  representations or warranties, express or implied, including
+ *  but not limited to, warranties of merchantability or fitness
+ *  for any particular purpose or that the use of the software or
+ *  documentation will not infringe any third party patents,
+ *  copyrights, trademarks or other rights. 
+ *
+ *  The copyright holders and contributing author(s) will not be
+ *  liable for any direct, indirect, special or consequential damages
+ *  arising out of any use of the software or documentation, even if
+ *  advised of the possibility of such damage.
+ *
+ *  Permission is hereby granted to use, copy, modify, and distribute
+ *  this source code, or portions hereof, documentation and executables,
+ *  for any purpose, without fee, subject to the following restrictions:
+ *
+ *  1. The origin of this source code must not be misrepresented.
+ *  2. Altered versions must be plainly marked as such and must
+ *     not be misrepresented as being the original source.
+ *  3. This Copyright notice may not be removed or altered from any
+ *     source or altered source distribution.
+ * 
+ *  The copyright holders and contributing author(s) specifically
+ *  permit, without fee, and encourage the use of this source code
+ *  as a component for supporting the Hypertext Markup Language in
+ *  commercial products. If you use this source code in a product,
+ *  acknowledgment is not required but would be appreciated.
+ *
+ */
+package org.ajax4jsf.org.w3c.tidy;
+
+import org.ajax4jsf.framework.util.message.Messages;
+import org.w3c.dom.DOMException;
+import org.w3c.dom.TypeInfo;
+
+
+/**
+ * Tidy implementation of org.w3c.dom.DOMAttrImpl.
+ * @author Dave Raggett <a href="mailto:dsr at w3.org">dsr at w3.org </a>
+ * @author Andy Quick <a href="mailto:ac.quick at sympatico.ca">ac.quick at sympatico.ca </a> (translation to Java)
+ * @author Fabrizio Giustina
+ * @version $Revision: 1.1.2.1 $ ($Author: alexsmirnov $)
+ */
+public class DOMAttrImpl extends DOMNodeImpl implements org.w3c.dom.Attr, Cloneable
+{
+
+    /**
+     * wrapped org.w3c.tidy.AttVal.
+     */
+    protected AttVal avAdaptee;
+
+    /**
+     * instantiates a new DOMAttrImpl which wraps the given AttVal.
+     * @param adaptee wrapped AttVal
+     */
+    protected DOMAttrImpl(AttVal adaptee)
+    {
+        super(null); // must override all methods of DOMNodeImpl
+        this.avAdaptee = adaptee;
+    }
+
+    /**
+     * @see org.w3c.dom.Node#getNodeValue()
+     */
+    public String getNodeValue() throws DOMException
+    {
+        return getValue();
+    }
+
+    /**
+     * @see org.w3c.dom.Node#setNodeValue(java.lang.String)
+     */
+    public void setNodeValue(String nodeValue) throws DOMException
+    {
+        setValue(nodeValue);
+    }
+
+    /**
+     * @see org.w3c.dom.Node#getNodeName()
+     */
+    public String getNodeName()
+    {
+        return getName();
+    }
+
+    /**
+     * @see org.w3c.dom.Node#getNodeType()
+     */
+    public short getNodeType()
+    {
+        return org.w3c.dom.Node.ATTRIBUTE_NODE;
+    }
+
+    /**
+     * @see org.w3c.dom.Attr#getName
+     */
+    public String getName()
+    {
+        return avAdaptee.attribute;
+    }
+
+    /**
+     * @see org.w3c.dom.Attr#getSpecified
+     */
+    public boolean getSpecified()
+    {
+        return avAdaptee.value != null;
+    }
+
+    /**
+     * @see org.w3c.dom.Attr#getValue
+     */
+    public String getValue()
+    {
+        // Thanks to Brett Knights brett at knightsofthenet.com for this fix.
+        return (avAdaptee.value == null) ? avAdaptee.attribute : avAdaptee.value;
+    }
+
+    /**
+     * @see org.w3c.dom.Attr#setValue(java.lang.String)
+     */
+    public void setValue(String value)
+    {
+        avAdaptee.value = value;
+    }
+
+    /**
+     * @see org.w3c.dom.Node#getParentNode()
+     */
+    public org.w3c.dom.Node getParentNode()
+    {
+        // Attr.getParentNode() should always return null
+        // http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-637646024
+        return null;
+    }
+
+    /**
+     * @todo DOM level 2 getChildNodes() Not implemented. Returns an empty NodeList.
+     * @see org.w3c.dom.Node#getChildNodes()
+     */
+    public org.w3c.dom.NodeList getChildNodes()
+    {
+        // Calling getChildNodes on a DOM Attr node does return the children of the Attr, which are the text and
+        // EntityReference nodes that make up the Attr's content.
+        return new DOMNodeListImpl(null);
+    }
+
+    /**
+     * @todo DOM level 2 getFirstChild() Not implemented. Returns null.
+     * @see org.w3c.dom.Node#getFirstChild()
+     */
+    public org.w3c.dom.Node getFirstChild()
+    {
+        return null;
+    }
+
+    /**
+     * @todo DOM level 2 getLastChild() Not implemented. Returns null.
+     * @see org.w3c.dom.Node#getLastChild()
+     */
+    public org.w3c.dom.Node getLastChild()
+    {
+        return null;
+    }
+
+    /**
+     * @see org.w3c.dom.Node#getPreviousSibling()
+     */
+    public org.w3c.dom.Node getPreviousSibling()
+    {
+        // Attr.getPreviousSibling() should always return null
+        return null;
+    }
+
+    /**
+     * @see org.w3c.dom.Node#getNextSibling()
+     */
+    public org.w3c.dom.Node getNextSibling()
+    {
+        // Attr.getNextSibling() should always return null
+        return null;
+    }
+
+    /**
+     * @see org.w3c.dom.Node#getAttributes()
+     */
+    public org.w3c.dom.NamedNodeMap getAttributes()
+    {
+        return null;
+    }
+
+    /**
+     * @todo DOM level 2 getOwnerDocument() Not implemented. Returns null.
+     * @see org.w3c.dom.Node#getOwnerDocument()
+     */
+    public org.w3c.dom.Document getOwnerDocument()
+    {
+        return null;
+    }
+
+    /**
+     * Not supported.
+     * @see org.w3c.dom.Node#insertBefore(org.w3c.dom.Node, org.w3c.dom.Node)
+     */
+    public org.w3c.dom.Node insertBefore(org.w3c.dom.Node newChild, org.w3c.dom.Node refChild) throws DOMException
+    {
+        throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, Messages.getMessage(Messages.DOM_METHOD_NOT_SUPPORTED));
+    }
+
+    /**
+     * Not supported.
+     * @see org.w3c.dom.Node#replaceChild(org.w3c.dom.Node, org.w3c.dom.Node)
+     */
+    public org.w3c.dom.Node replaceChild(org.w3c.dom.Node newChild, org.w3c.dom.Node oldChild) throws DOMException
+    {
+        throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, Messages.getMessage(Messages.DOM_METHOD_NOT_SUPPORTED));
+    }
+
+    /**
+     * Not supported.
+     * @see org.w3c.dom.Node#removeChild(org.w3c.dom.Node)
+     */
+    public org.w3c.dom.Node removeChild(org.w3c.dom.Node oldChild) throws DOMException
+    {
+        throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, Messages.getMessage(Messages.DOM_METHOD_NOT_SUPPORTED));
+    }
+
+    /**
+     * Not supported.
+     * @see org.w3c.dom.Node#appendChild(org.w3c.dom.Node)
+     */
+    public org.w3c.dom.Node appendChild(org.w3c.dom.Node newChild) throws DOMException
+    {
+        throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, Messages.getMessage(Messages.DOM_METHOD_NOT_SUPPORTED));
+    }
+
+    /**
+     * @see org.w3c.dom.Node#hasChildNodes()
+     */
+    public boolean hasChildNodes()
+    {
+        return false;
+    }
+
+    /**
+     * @see org.w3c.dom.Node#cloneNode(boolean)
+     */
+    public org.w3c.dom.Node cloneNode(boolean deep)
+    {
+        // http://java.sun.com/j2se/1.5.0/docs/api/index.html?org/w3c/dom/Attr.html
+        // Cloning an Attr always clones its children, since they represent its value, no matter whether this is a deep
+        // clone or not.
+        return (org.w3c.dom.Node) clone();
+    }
+
+    /**
+     * @todo DOM level 2 getOwnerElement() Not implemented. Returns null.
+     * @see org.w3c.dom.Attr#getOwnerElement()
+     */
+    public org.w3c.dom.Element getOwnerElement()
+    {
+        return null;
+    }
+
+    /**
+     * @todo DOM level 3 getSchemaTypeInfo() Not implemented. Returns null.
+     * @see org.w3c.dom.Attr#getSchemaTypeInfo()
+     */
+/*    public TypeInfo getSchemaTypeInfo()
+    {
+        return null;
+    }
+*/
+    /**
+     * @see org.w3c.dom.Attr#isId()
+     */
+    public boolean isId()
+    {
+        return "id".equals(this.avAdaptee.getAttribute());
+    }
+
+    /**
+     * @see java.lang.Object#clone()
+     */
+    protected Object clone()
+    {
+        DOMAttrImpl clone;
+        try
+        {
+            clone = (DOMAttrImpl) super.clone();
+        }
+        catch (CloneNotSupportedException e)
+        {
+            // should never happen
+            throw new RuntimeException("Clone not supported");
+        }
+        clone.avAdaptee = (AttVal) this.avAdaptee.clone();
+        return clone;
+    }
+
+	/* (non-Javadoc)
+	 * @see org.w3c.dom.Attr#getSchemaTypeInfo()
+	 */
+	public TypeInfo getSchemaTypeInfo() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/DOMAttrMapImpl.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/DOMAttrMapImpl.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/DOMAttrMapImpl.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,243 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ *  Java HTML Tidy - JTidy
+ *  HTML parser and pretty printer
+ *
+ *  Copyright (c) 1998-2000 World Wide Web Consortium (Massachusetts
+ *  Institute of Technology, Institut National de Recherche en
+ *  Informatique et en Automatique, Keio University). All Rights
+ *  Reserved.
+ *
+ *  Contributing Author(s):
+ *
+ *     Dave Raggett <dsr at w3.org>
+ *     Andy Quick <ac.quick at sympatico.ca> (translation to Java)
+ *     Gary L Peskin <garyp at firstech.com> (Java development)
+ *     Sami Lempinen <sami at lempinen.net> (release management)
+ *     Fabrizio Giustina <fgiust at users.sourceforge.net>
+ *
+ *  The contributing author(s) would like to thank all those who
+ *  helped with testing, bug fixes, and patience.  This wouldn't
+ *  have been possible without all of you.
+ *
+ *  COPYRIGHT NOTICE:
+ * 
+ *  This software and documentation is provided "as is," and
+ *  the copyright holders and contributing author(s) make no
+ *  representations or warranties, express or implied, including
+ *  but not limited to, warranties of merchantability or fitness
+ *  for any particular purpose or that the use of the software or
+ *  documentation will not infringe any third party patents,
+ *  copyrights, trademarks or other rights. 
+ *
+ *  The copyright holders and contributing author(s) will not be
+ *  liable for any direct, indirect, special or consequential damages
+ *  arising out of any use of the software or documentation, even if
+ *  advised of the possibility of such damage.
+ *
+ *  Permission is hereby granted to use, copy, modify, and distribute
+ *  this source code, or portions hereof, documentation and executables,
+ *  for any purpose, without fee, subject to the following restrictions:
+ *
+ *  1. The origin of this source code must not be misrepresented.
+ *  2. Altered versions must be plainly marked as such and must
+ *     not be misrepresented as being the original source.
+ *  3. This Copyright notice may not be removed or altered from any
+ *     source or altered source distribution.
+ * 
+ *  The copyright holders and contributing author(s) specifically
+ *  permit, without fee, and encourage the use of this source code
+ *  as a component for supporting the Hypertext Markup Language in
+ *  commercial products. If you use this source code in a product,
+ *  acknowledgment is not required but would be appreciated.
+ *
+ */
+package org.ajax4jsf.org.w3c.tidy;
+
+import org.ajax4jsf.framework.util.message.Messages;
+import org.w3c.dom.DOMException;
+
+
+/**
+ * Tidy implementation of org.w3c.dom.NamedNodeMap.
+ * @author Dave Raggett <a href="mailto:dsr at w3.org">dsr at w3.org </a>
+ * @author Andy Quick <a href="mailto:ac.quick at sympatico.ca">ac.quick at sympatico.ca </a> (translation to Java)
+ * @author Fabrizio Giustina
+ * @version $Revision: 1.1.2.1 $ ($Author: alexsmirnov $)
+ */
+public class DOMAttrMapImpl implements org.w3c.dom.NamedNodeMap
+{
+
+    /**
+     * wrapped org.w3c.tidy.AttVal.
+     */
+    private AttVal first;
+
+    /**
+     * instantiates a new DOMAttrMapImpl for the given AttVal.
+     * @param firstAttVal wrapped AttVal
+     */
+    protected DOMAttrMapImpl(AttVal firstAttVal)
+    {
+        this.first = firstAttVal;
+    }
+
+    /**
+     * @see org.w3c.dom.NamedNodeMap#getNamedItem(java.lang.String)
+     */
+    public org.w3c.dom.Node getNamedItem(String name)
+    {
+        AttVal att = this.first;
+        while (att != null)
+        {
+            if (att.attribute.equals(name))
+            {
+                break;
+            }
+            att = att.next;
+        }
+        if (att != null)
+        {
+            return att.getAdapter();
+        }
+
+        return null;
+    }
+
+    /**
+     * @see org.w3c.dom.NamedNodeMap#item
+     */
+    public org.w3c.dom.Node item(int index)
+    {
+        int i = 0;
+        AttVal att = this.first;
+        while (att != null)
+        {
+            if (i >= index)
+            {
+                break;
+            }
+            i++;
+            att = att.next;
+        }
+        if (att != null)
+        {
+            return att.getAdapter();
+        }
+
+        return null;
+    }
+
+    /**
+     * @see org.w3c.dom.NamedNodeMap#getLength
+     */
+    public int getLength()
+    {
+        int len = 0;
+        AttVal att = this.first;
+        while (att != null)
+        {
+            len++;
+            att = att.next;
+        }
+        return len;
+    }
+
+    /**
+     * @todo DOM level 2 setNamedItem() Not implemented. Throws NOT_SUPPORTED_ERR.
+     * @see org.w3c.dom.NamedNodeMap#setNamedItem
+     */
+    public org.w3c.dom.Node setNamedItem(org.w3c.dom.Node arg) throws DOMException
+    {
+        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, Messages.getMessage(Messages.DOM_METHOD_NOT_SUPPORTED));
+    }
+
+    /**
+     * @see org.w3c.dom.NamedNodeMap#removeNamedItem
+     */
+    public org.w3c.dom.Node removeNamedItem(String name) throws DOMException
+    {
+        AttVal att = this.first;
+        AttVal previous = null;
+
+        while (att != null)
+        {
+            if (att.attribute.equals(name))
+            {
+                if (previous == null)
+                {
+                    this.first = att.getNext();
+                }
+                else
+                {
+                    previous.setNext(att.getNext());
+                }
+
+                break;
+            }
+            previous = att;
+            att = att.next;
+        }
+
+        if (att != null)
+        {
+            return att.getAdapter();
+        }
+
+        throw new DOMException(DOMException.NOT_FOUND_ERR, Messages.getMessage(Messages.NAMED_ITEM_NOT_FOUND_ERROR, name));
+    }
+
+    /**
+     * Not supported, returns <code>DOMException.NOT_SUPPORTED_ERR</code>.
+     * @see org.w3c.dom.NamedNodeMap#getNamedItemNS(java.lang.String, java.lang.String)
+     */
+    public org.w3c.dom.Node getNamedItemNS(String namespaceURI, String localName)
+    {
+        // NOT_SUPPORTED_ERR: May be raised if the implementation does not support the feature "XML" and the language
+        // exposed through the Document does not support XML Namespaces (such as HTML 4.01).
+        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, Messages.getMessage(Messages.DOM_METHOD_NOT_SUPPORTED));
+    }
+
+    /**
+     * Not supported, returns <code>DOMException.NOT_SUPPORTED_ERR</code>.
+     * @see org.w3c.dom.NamedNodeMap#setNamedItemNS(org.w3c.dom.Node)
+     */
+    public org.w3c.dom.Node setNamedItemNS(org.w3c.dom.Node arg) throws org.w3c.dom.DOMException
+    {
+        // NOT_SUPPORTED_ERR: May be raised if the implementation does not support the feature "XML" and the language
+        // exposed through the Document does not support XML Namespaces (such as HTML 4.01).
+        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, Messages.getMessage(Messages.DOM_METHOD_NOT_SUPPORTED));
+    }
+
+    /**
+     * Not supported, returns <code>DOMException.NOT_SUPPORTED_ERR</code>.
+     * @see org.w3c.dom.NamedNodeMap#removeNamedItemNS(java.lang.String, java.lang.String)
+     */
+    public org.w3c.dom.Node removeNamedItemNS(String namespaceURI, String localName) throws org.w3c.dom.DOMException
+    {
+        // NOT_SUPPORTED_ERR: May be raised if the implementation does not support the feature "XML" and the language
+        // exposed through the Document does not support XML Namespaces (such as HTML 4.01).
+        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, Messages.getMessage(Messages.DOM_METHOD_NOT_SUPPORTED));
+    }
+
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/DOMCDATASectionImpl.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/DOMCDATASectionImpl.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/DOMCDATASectionImpl.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,111 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ *  Java HTML Tidy - JTidy
+ *  HTML parser and pretty printer
+ *
+ *  Copyright (c) 1998-2000 World Wide Web Consortium (Massachusetts
+ *  Institute of Technology, Institut National de Recherche en
+ *  Informatique et en Automatique, Keio University). All Rights
+ *  Reserved.
+ *
+ *  Contributing Author(s):
+ *
+ *     Dave Raggett <dsr at w3.org>
+ *     Andy Quick <ac.quick at sympatico.ca> (translation to Java)
+ *     Gary L Peskin <garyp at firstech.com> (Java development)
+ *     Sami Lempinen <sami at lempinen.net> (release management)
+ *     Fabrizio Giustina <fgiust at users.sourceforge.net>
+ *
+ *  The contributing author(s) would like to thank all those who
+ *  helped with testing, bug fixes, and patience.  This wouldn't
+ *  have been possible without all of you.
+ *
+ *  COPYRIGHT NOTICE:
+ * 
+ *  This software and documentation is provided "as is," and
+ *  the copyright holders and contributing author(s) make no
+ *  representations or warranties, express or implied, including
+ *  but not limited to, warranties of merchantability or fitness
+ *  for any particular purpose or that the use of the software or
+ *  documentation will not infringe any third party patents,
+ *  copyrights, trademarks or other rights. 
+ *
+ *  The copyright holders and contributing author(s) will not be
+ *  liable for any direct, indirect, special or consequential damages
+ *  arising out of any use of the software or documentation, even if
+ *  advised of the possibility of such damage.
+ *
+ *  Permission is hereby granted to use, copy, modify, and distribute
+ *  this source code, or portions hereof, documentation and executables,
+ *  for any purpose, without fee, subject to the following restrictions:
+ *
+ *  1. The origin of this source code must not be misrepresented.
+ *  2. Altered versions must be plainly marked as such and must
+ *     not be misrepresented as being the original source.
+ *  3. This Copyright notice may not be removed or altered from any
+ *     source or altered source distribution.
+ * 
+ *  The copyright holders and contributing author(s) specifically
+ *  permit, without fee, and encourage the use of this source code
+ *  as a component for supporting the Hypertext Markup Language in
+ *  commercial products. If you use this source code in a product,
+ *  acknowledgment is not required but would be appreciated.
+ *
+ */
+package org.ajax4jsf.org.w3c.tidy;
+
+/**
+ * Tidy implementation of org.w3c.dom.CDATASection.
+ * @author Dave Raggett <a href="mailto:dsr at w3.org">dsr at w3.org </a>
+ * @author Andy Quick <a href="mailto:ac.quick at sympatico.ca">ac.quick at sympatico.ca </a> (translation to Java)
+ * @author Fabrizio Giustina
+ * @version $Revision: 1.1.2.1 $ ($Author: alexsmirnov $)
+ */
+public class DOMCDATASectionImpl extends DOMTextImpl implements org.w3c.dom.CDATASection
+{
+
+    /**
+     * Instantiates a new DOMCDATASectionImpl which wraps the given Node.
+     * @param adaptee wrapped node.
+     */
+    protected DOMCDATASectionImpl(Node adaptee)
+    {
+        super(adaptee);
+    }
+
+    /**
+     * @see org.w3c.dom.Node#getNodeName
+     */
+    public String getNodeName()
+    {
+        return "#cdata-section";
+    }
+
+    /**
+     * @see org.w3c.dom.Node#getNodeType
+     */
+    public short getNodeType()
+    {
+        return org.w3c.dom.Node.CDATA_SECTION_NODE;
+    }
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/DOMCharacterDataImpl.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/DOMCharacterDataImpl.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/DOMCharacterDataImpl.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,198 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ *  Java HTML Tidy - JTidy
+ *  HTML parser and pretty printer
+ *
+ *  Copyright (c) 1998-2000 World Wide Web Consortium (Massachusetts
+ *  Institute of Technology, Institut National de Recherche en
+ *  Informatique et en Automatique, Keio University). All Rights
+ *  Reserved.
+ *
+ *  Contributing Author(s):
+ *
+ *     Dave Raggett <dsr at w3.org>
+ *     Andy Quick <ac.quick at sympatico.ca> (translation to Java)
+ *     Gary L Peskin <garyp at firstech.com> (Java development)
+ *     Sami Lempinen <sami at lempinen.net> (release management)
+ *     Fabrizio Giustina <fgiust at users.sourceforge.net>
+ *
+ *  The contributing author(s) would like to thank all those who
+ *  helped with testing, bug fixes, and patience.  This wouldn't
+ *  have been possible without all of you.
+ *
+ *  COPYRIGHT NOTICE:
+ * 
+ *  This software and documentation is provided "as is," and
+ *  the copyright holders and contributing author(s) make no
+ *  representations or warranties, express or implied, including
+ *  but not limited to, warranties of merchantability or fitness
+ *  for any particular purpose or that the use of the software or
+ *  documentation will not infringe any third party patents,
+ *  copyrights, trademarks or other rights. 
+ *
+ *  The copyright holders and contributing author(s) will not be
+ *  liable for any direct, indirect, special or consequential damages
+ *  arising out of any use of the software or documentation, even if
+ *  advised of the possibility of such damage.
+ *
+ *  Permission is hereby granted to use, copy, modify, and distribute
+ *  this source code, or portions hereof, documentation and executables,
+ *  for any purpose, without fee, subject to the following restrictions:
+ *
+ *  1. The origin of this source code must not be misrepresented.
+ *  2. Altered versions must be plainly marked as such and must
+ *     not be misrepresented as being the original source.
+ *  3. This Copyright notice may not be removed or altered from any
+ *     source or altered source distribution.
+ * 
+ *  The copyright holders and contributing author(s) specifically
+ *  permit, without fee, and encourage the use of this source code
+ *  as a component for supporting the Hypertext Markup Language in
+ *  commercial products. If you use this source code in a product,
+ *  acknowledgment is not required but would be appreciated.
+ *
+ */
+package org.ajax4jsf.org.w3c.tidy;
+
+import org.w3c.dom.DOMException;
+
+
+/**
+ * Tidy implementation of org.w3c.dom.CharacterData.
+ * @author Dave Raggett <a href="mailto:dsr at w3.org">dsr at w3.org </a>
+ * @author Andy Quick <a href="mailto:ac.quick at sympatico.ca">ac.quick at sympatico.ca </a> (translation to Java)
+ * @author Fabrizio Giustina
+ * @version $Revision: 1.1.2.1 $ ($Author: alexsmirnov $)
+ */
+public class DOMCharacterDataImpl extends DOMNodeImpl implements org.w3c.dom.CharacterData
+{
+
+    /**
+     * Instantiates a new DOMCharacterDataImpl which wraps the given Node.
+     * @param adaptee wrapped node.
+     */
+    protected DOMCharacterDataImpl(Node adaptee)
+    {
+        super(adaptee);
+    }
+
+    /**
+     * @see org.w3c.dom.CharacterData#getData
+     */
+    public String getData() throws DOMException
+    {
+        return getNodeValue();
+    }
+
+    /**
+     * @see org.w3c.dom.CharacterData#getLength
+     */
+    public int getLength()
+    {
+        int len = 0;
+        if (adaptee.textarray != null && adaptee.start < adaptee.end)
+        {
+            len = adaptee.end - adaptee.start;
+        }
+        return len;
+    }
+
+    /**
+     * @see org.w3c.dom.CharacterData#substringData
+     */
+    public String substringData(int offset, int count) throws DOMException
+    {
+        int len;
+        String value = null;
+        if (count < 0)
+        {
+            throw new DOMException(DOMException.INDEX_SIZE_ERR, "Invalid length");
+        }
+        if (adaptee.textarray != null && adaptee.start < adaptee.end)
+        {
+            if (adaptee.start + offset >= adaptee.end)
+            {
+                throw new DOMException(DOMException.INDEX_SIZE_ERR, "Invalid offset");
+            }
+            len = count;
+            if (adaptee.start + offset + len - 1 >= adaptee.end)
+            {
+                len = adaptee.end - adaptee.start - offset;
+            }
+
+            value = TidyUtils.getString(adaptee.textarray, adaptee.start + offset, len);
+        }
+        return value;
+    }
+
+    /**
+     * Not supported.
+     * @see org.w3c.dom.CharacterData#setData
+     */
+    public void setData(String data) throws DOMException
+    {
+        // NOT SUPPORTED
+        throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, "Not supported");
+    }
+
+    /**
+     * Not supported.
+     * @see org.w3c.dom.CharacterData#appendData
+     */
+    public void appendData(String arg) throws DOMException
+    {
+        // NOT SUPPORTED
+        throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, "Not supported");
+    }
+
+    /**
+     * Not supported.
+     * @see org.w3c.dom.CharacterData#insertData
+     */
+    public void insertData(int offset, String arg) throws DOMException
+    {
+        // NOT SUPPORTED
+        throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, "Not supported");
+    }
+
+    /**
+     * Not supported.
+     * @see org.w3c.dom.CharacterData#deleteData
+     */
+    public void deleteData(int offset, int count) throws DOMException
+    {
+        // NOT SUPPORTED
+        throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, "Not supported");
+    }
+
+    /**
+     * Not supported.
+     * @see org.w3c.dom.CharacterData#replaceData
+     */
+    public void replaceData(int offset, int count, String arg) throws DOMException
+    {
+        // NOT SUPPORTED
+        throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, "Not supported");
+    }
+
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/DOMCommentImpl.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/DOMCommentImpl.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/DOMCommentImpl.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,112 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ *  Java HTML Tidy - JTidy
+ *  HTML parser and pretty printer
+ *
+ *  Copyright (c) 1998-2000 World Wide Web Consortium (Massachusetts
+ *  Institute of Technology, Institut National de Recherche en
+ *  Informatique et en Automatique, Keio University). All Rights
+ *  Reserved.
+ *
+ *  Contributing Author(s):
+ *
+ *     Dave Raggett <dsr at w3.org>
+ *     Andy Quick <ac.quick at sympatico.ca> (translation to Java)
+ *     Gary L Peskin <garyp at firstech.com> (Java development)
+ *     Sami Lempinen <sami at lempinen.net> (release management)
+ *     Fabrizio Giustina <fgiust at users.sourceforge.net>
+ *
+ *  The contributing author(s) would like to thank all those who
+ *  helped with testing, bug fixes, and patience.  This wouldn't
+ *  have been possible without all of you.
+ *
+ *  COPYRIGHT NOTICE:
+ * 
+ *  This software and documentation is provided "as is," and
+ *  the copyright holders and contributing author(s) make no
+ *  representations or warranties, express or implied, including
+ *  but not limited to, warranties of merchantability or fitness
+ *  for any particular purpose or that the use of the software or
+ *  documentation will not infringe any third party patents,
+ *  copyrights, trademarks or other rights. 
+ *
+ *  The copyright holders and contributing author(s) will not be
+ *  liable for any direct, indirect, special or consequential damages
+ *  arising out of any use of the software or documentation, even if
+ *  advised of the possibility of such damage.
+ *
+ *  Permission is hereby granted to use, copy, modify, and distribute
+ *  this source code, or portions hereof, documentation and executables,
+ *  for any purpose, without fee, subject to the following restrictions:
+ *
+ *  1. The origin of this source code must not be misrepresented.
+ *  2. Altered versions must be plainly marked as such and must
+ *     not be misrepresented as being the original source.
+ *  3. This Copyright notice may not be removed or altered from any
+ *     source or altered source distribution.
+ * 
+ *  The copyright holders and contributing author(s) specifically
+ *  permit, without fee, and encourage the use of this source code
+ *  as a component for supporting the Hypertext Markup Language in
+ *  commercial products. If you use this source code in a product,
+ *  acknowledgment is not required but would be appreciated.
+ *
+ */
+package org.ajax4jsf.org.w3c.tidy;
+
+/**
+ * Tidy implementation of org.w3c.dom.Comment.
+ * @author Dave Raggett <a href="mailto:dsr at w3.org">dsr at w3.org </a>
+ * @author Andy Quick <a href="mailto:ac.quick at sympatico.ca">ac.quick at sympatico.ca </a> (translation to Java)
+ * @author Fabrizio Giustina
+ * @version $Revision: 1.1.2.1 $ ($Author: alexsmirnov $)
+ */
+public class DOMCommentImpl extends DOMCharacterDataImpl implements org.w3c.dom.Comment
+{
+
+    /**
+     * Instantiates a new DOMCommentImpl which wraps the given Node.
+     * @param adaptee wrapped node.
+     */
+    protected DOMCommentImpl(Node adaptee)
+    {
+        super(adaptee);
+    }
+
+    /**
+     * @see org.w3c.dom.Node#getNodeName
+     */
+    public String getNodeName()
+    {
+        return "#comment";
+    }
+
+    /**
+     * @see org.w3c.dom.Node#getNodeType
+     */
+    public short getNodeType()
+    {
+        return org.w3c.dom.Node.COMMENT_NODE;
+    }
+
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/DOMDocumentImpl.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/DOMDocumentImpl.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/DOMDocumentImpl.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,481 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ *  Java HTML Tidy - JTidy
+ *  HTML parser and pretty printer
+ *
+ *  Copyright (c) 1998-2000 World Wide Web Consortium (Massachusetts
+ *  Institute of Technology, Institut National de Recherche en
+ *  Informatique et en Automatique, Keio University). All Rights
+ *  Reserved.
+ *
+ *  Contributing Author(s):
+ *
+ *     Dave Raggett <dsr at w3.org>
+ *     Andy Quick <ac.quick at sympatico.ca> (translation to Java)
+ *     Gary L Peskin <garyp at firstech.com> (Java development)
+ *     Sami Lempinen <sami at lempinen.net> (release management)
+ *     Fabrizio Giustina <fgiust at users.sourceforge.net>
+ *
+ *  The contributing author(s) would like to thank all those who
+ *  helped with testing, bug fixes, and patience.  This wouldn't
+ *  have been possible without all of you.
+ *
+ *  COPYRIGHT NOTICE:
+ * 
+ *  This software and documentation is provided "as is," and
+ *  the copyright holders and contributing author(s) make no
+ *  representations or warranties, express or implied, including
+ *  but not limited to, warranties of merchantability or fitness
+ *  for any particular purpose or that the use of the software or
+ *  documentation will not infringe any third party patents,
+ *  copyrights, trademarks or other rights. 
+ *
+ *  The copyright holders and contributing author(s) will not be
+ *  liable for any direct, indirect, special or consequential damages
+ *  arising out of any use of the software or documentation, even if
+ *  advised of the possibility of such damage.
+ *
+ *  Permission is hereby granted to use, copy, modify, and distribute
+ *  this source code, or portions hereof, documentation and executables,
+ *  for any purpose, without fee, subject to the following restrictions:
+ *
+ *  1. The origin of this source code must not be misrepresented.
+ *  2. Altered versions must be plainly marked as such and must
+ *     not be misrepresented as being the original source.
+ *  3. This Copyright notice may not be removed or altered from any
+ *     source or altered source distribution.
+ * 
+ *  The copyright holders and contributing author(s) specifically
+ *  permit, without fee, and encourage the use of this source code
+ *  as a component for supporting the Hypertext Markup Language in
+ *  commercial products. If you use this source code in a product,
+ *  acknowledgment is not required but would be appreciated.
+ *
+ */
+package org.ajax4jsf.org.w3c.tidy;
+
+import org.ajax4jsf.framework.util.message.Messages;
+import org.w3c.dom.DOMConfiguration;
+import org.w3c.dom.DOMException;
+
+
+/**
+ * DOMDocumentImpl.
+ * @author Dave Raggett <a href="mailto:dsr at w3.org">dsr at w3.org </a>
+ * @author Andy Quick <a href="mailto:ac.quick at sympatico.ca">ac.quick at sympatico.ca </a> (translation to Java)
+ * @author Fabrizio Giustina
+ * @version $Revision: 1.1.2.1 $ ($Author: alexsmirnov $)
+ */
+public class DOMDocumentImpl extends DOMNodeImpl implements org.w3c.dom.Document
+{
+
+    /**
+     * A DOM Document has its own TagTable.
+     */
+    private TagTable tt;
+
+    /**
+     * Instantiates a new Dom document with a default tag table.
+     * @param adaptee tidy Node
+     */
+    protected DOMDocumentImpl(Node adaptee)
+    {
+        super(adaptee);
+        this.tt = new TagTable();
+    }
+
+    /**
+     * @see org.w3c.dom.Node#getNodeName
+     */
+    public String getNodeName()
+    {
+        return "#document";
+    }
+
+    /**
+     * @see org.w3c.dom.Node#getNodeType
+     */
+    public short getNodeType()
+    {
+        return org.w3c.dom.Node.DOCUMENT_NODE;
+    }
+
+    /**
+     * @see org.w3c.dom.Document#getDoctype
+     */
+    public org.w3c.dom.DocumentType getDoctype()
+    {
+        Node node = this.adaptee.content;
+        while (node != null)
+        {
+            if (node.type == Node.DOCTYPE_TAG)
+            {
+                break;
+            }
+            node = node.next;
+        }
+        if (node != null)
+        {
+            return (org.w3c.dom.DocumentType) node.getAdapter();
+        }
+
+        return null;
+    }
+
+    /**
+     * @todo DOM level 2 getImplementation() Not implemented. Throws NOT_SUPPORTED_ERR.
+     * @see org.w3c.dom.Document#getImplementation
+     */
+    public org.w3c.dom.DOMImplementation getImplementation()
+    {
+        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, Messages.getMessage(Messages.DOM_METHOD_NOT_SUPPORTED));
+    }
+
+    /**
+     * @see org.w3c.dom.Document#getDocumentElement
+     */
+    public org.w3c.dom.Element getDocumentElement()
+    {
+        Node node = this.adaptee.content;
+        while (node != null)
+        {
+            if (node.type == Node.START_TAG || node.type == Node.START_END_TAG)
+            {
+                break;
+            }
+            node = node.next;
+        }
+        if (node != null)
+        {
+            return (org.w3c.dom.Element) node.getAdapter();
+        }
+
+        return null;
+    }
+
+    /**
+     * @see org.w3c.dom.Document#createElement
+     */
+    public org.w3c.dom.Element createElement(String tagName) throws DOMException
+    {
+        Node node = new Node(Node.START_END_TAG, null, 0, 0, tagName, this.tt);
+        if (node != null)
+        {
+            if (node.tag == null) // Fix Bug 121206
+            {
+                node.tag = TagTable.XML_TAGS;
+            }
+            return (org.w3c.dom.Element) node.getAdapter();
+        }
+
+        return null;
+    }
+
+    /**
+     * @todo DOM level 2 createDocumentFragment() Not implemented. Throws NOT_SUPPORTED_ERR.
+     * @see org.w3c.dom.Document#createDocumentFragment
+     */
+    public org.w3c.dom.DocumentFragment createDocumentFragment()
+    {
+        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, Messages.getMessage(Messages.DOM_METHOD_NOT_SUPPORTED));
+    }
+
+    /**
+     * @see org.w3c.dom.Document#createTextNode
+     */
+    public org.w3c.dom.Text createTextNode(String data)
+    {
+        byte[] textarray = TidyUtils.getBytes(data);
+        Node node = new Node(Node.TEXT_NODE, textarray, 0, textarray.length);
+        if (node != null)
+        {
+            return (org.w3c.dom.Text) node.getAdapter();
+        }
+
+        return null;
+    }
+
+    /**
+     * @see org.w3c.dom.Document#createComment
+     */
+    public org.w3c.dom.Comment createComment(String data)
+    {
+        byte[] textarray = TidyUtils.getBytes(data);
+        Node node = new Node(Node.COMMENT_TAG, textarray, 0, textarray.length);
+        if (node != null)
+        {
+            return (org.w3c.dom.Comment) node.getAdapter();
+        }
+
+        return null;
+    }
+
+    /**
+     * @todo DOM level 2 createCDATASection() Not supported. Throws NOT_SUPPORTED_ERR.
+     * @see org.w3c.dom.Document#createCDATASection
+     */
+    public org.w3c.dom.CDATASection createCDATASection(String data) throws DOMException
+    {
+        // NOT_SUPPORTED_ERR: Raised if this document is an HTML document.
+//        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "HTML document");
+    	// HACK - create raw section, do not escape xml symbols.
+        byte[] textarray = TidyUtils.getBytes(data);
+        Node node = new Node(Node.CDATA_TEXT, textarray, 0, textarray.length);
+        if (node != null)
+        {
+            return (org.w3c.dom.CDATASection) node.getAdapter();
+        }
+
+        return null;
+    }
+
+    /**
+     * @todo DOM level 2 createProcessingInstruction() Not supported. Throws NOT_SUPPORTED_ERR.
+     * @see org.w3c.dom.Document#createProcessingInstruction
+     */
+    public org.w3c.dom.ProcessingInstruction createProcessingInstruction(String target, String data)
+        throws DOMException
+    {
+        // NOT_SUPPORTED_ERR: Raised if this document is an HTML document.
+        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "HTML document");
+    }
+
+    /**
+     * @see org.w3c.dom.Document#createAttribute
+     */
+    public org.w3c.dom.Attr createAttribute(String name) throws DOMException
+    {
+        AttVal av = new AttVal(null, null, '"', name, null);
+        if (av != null)
+        {
+            av.dict = AttributeTable.getDefaultAttributeTable().findAttribute(av);
+            return av.getAdapter();
+        }
+
+        return null;
+    }
+
+    /**
+     * @todo DOM level 2 createEntityReference() Not supported. Throws NOT_SUPPORTED_ERR.
+     * @see org.w3c.dom.Document#createEntityReference
+     */
+    public org.w3c.dom.EntityReference createEntityReference(String name) throws DOMException
+    {
+        // NOT_SUPPORTED_ERR: Raised if this document is an HTML document
+        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, Messages.getMessage(Messages.METHOD_NOT_SUPPORTED, "createEntityReference"));
+    }
+
+    /**
+     * @see org.w3c.dom.Document#getElementsByTagName
+     */
+    public org.w3c.dom.NodeList getElementsByTagName(String tagname)
+    {
+        return new DOMNodeListByTagNameImpl(this.adaptee, tagname);
+    }
+
+    /**
+     * @todo DOM level 2 importNode() Not supported. Throws NOT_SUPPORTED_ERR.
+     * @see org.w3c.dom.Document#importNode(org.w3c.dom.Node, boolean)
+     */
+    public org.w3c.dom.Node importNode(org.w3c.dom.Node importedNode, boolean deep) throws org.w3c.dom.DOMException
+    {
+        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, Messages.getMessage(Messages.METHOD_NOT_SUPPORTED, "importNode"));
+    }
+
+    /**
+     * @todo DOM level 2 createAttributeNS() Not supported. Throws NOT_SUPPORTED_ERR.
+     * @see org.w3c.dom.Document#createAttributeNS(java.lang.String, java.lang.String)
+     */
+    public org.w3c.dom.Attr createAttributeNS(String namespaceURI, String qualifiedName)
+        throws org.w3c.dom.DOMException
+    {
+        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, Messages.getMessage(Messages.METHOD_NOT_SUPPORTED, "createAttributeNS"));
+    }
+
+    /**
+     * @todo DOM level 2 createElementNS() Not supported. Throws NOT_SUPPORTED_ERR.
+     * @see org.w3c.dom.Document#createElementNS(java.lang.String, java.lang.String)
+     */
+    public org.w3c.dom.Element createElementNS(String namespaceURI, String qualifiedName)
+        throws org.w3c.dom.DOMException
+    {
+        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, Messages.getMessage(Messages.METHOD_NOT_SUPPORTED, "createElementNS"));
+    }
+
+    /**
+     * @todo DOM level 2 getElementsByTagNameNS() Not supported. Throws NOT_SUPPORTED_ERR.
+     * @see org.w3c.dom.Document#getElementsByTagNameNS(java.lang.String, java.lang.String)
+     */
+    public org.w3c.dom.NodeList getElementsByTagNameNS(String namespaceURI, String localName)
+    {
+        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, Messages.getMessage(Messages.METHOD_NOT_SUPPORTED, "getElementsByTagNameNS"));
+    }
+
+    /**
+     * @todo DOM level 2 getElementById() Not implemented. Returns null.
+     * @see org.w3c.dom.Document#getElementById(java.lang.String)
+     */
+    public org.w3c.dom.Element getElementById(String elementId)
+    {
+        return null;
+    }
+
+    /**
+     * @todo DOM level 3 adoptNode() Not implemented.
+     * @see org.w3c.dom.Document#adoptNode(org.w3c.dom.Node)
+     */
+    public org.w3c.dom.Node adoptNode(org.w3c.dom.Node source) throws DOMException
+    {
+        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, Messages.getMessage(Messages.DOM_METHOD_NOT_SUPPORTED));
+    }
+
+    /**
+     * @todo DOM level 3 getDocumentURI() Not implemented. Returns null.
+     * @see org.w3c.dom.Document#getDocumentURI()
+     */
+    public String getDocumentURI()
+    {
+        return null;
+    }
+
+    /**
+     * @todo DOM level 3 getDomConfig() Not implemented. Returns null.
+     * @see org.w3c.dom.Document#getDomConfig()
+     */
+/*    public DOMConfiguration getDomConfig()
+    {
+        return null;
+    }
+*/
+    /**
+     * @todo DOM level 3 getInputEncoding() Not implemented. Returns null.
+     * @see org.w3c.dom.Document#getInputEncoding()
+     */
+    public String getInputEncoding()
+    {
+        return null;
+    }
+
+    /**
+     * @todo DOM level 3 getStrictErrorChecking() Not implemented. Returns true.
+     * @see org.w3c.dom.Document#getStrictErrorChecking()
+     */
+    public boolean getStrictErrorChecking()
+    {
+        return true;
+    }
+
+    /**
+     * @todo DOM level 3 getXmlEncoding() Not implemented. Returns null.
+     * @see org.w3c.dom.Document#getXmlEncoding()
+     */
+    public String getXmlEncoding()
+    {
+        return null;
+    }
+
+    /**
+     * @todo DOM level 3 getXmlStandalone() Not implemented. Returns false.
+     * @see org.w3c.dom.Document#getXmlStandalone()
+     */
+    public boolean getXmlStandalone()
+    {
+        return false;
+    }
+
+    /**
+     * @todo DOM level 3 getXmlVersion() Not implemented. Always returns "1.0".
+     * @see org.w3c.dom.Document#getXmlVersion()
+     */
+    public String getXmlVersion()
+    {
+        // An attribute specifying, as part of the XML declaration, the version number of this document. If there is no
+        // declaration and if this document supports the "XML" feature, the value is "1.0"
+        return "1.0";
+    }
+
+    /**
+     * @todo DOM level 3 normalizeDocument() Not implemented. Do nothing.
+     * @see org.w3c.dom.Document#normalizeDocument()
+     */
+    public void normalizeDocument()
+    {
+        // do nothing
+    }
+
+    /**
+     * @todo DOM level 3 renameNode() Not implemented. Throws NOT_SUPPORTED_ERR.
+     * @see org.w3c.dom.Document#renameNode(org.w3c.dom.Node, java.lang.String, java.lang.String)
+     */
+    public org.w3c.dom.Node renameNode(org.w3c.dom.Node n, String namespaceURI, String qualifiedName)
+        throws DOMException
+    {
+        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, Messages.getMessage(Messages.DOM_METHOD_NOT_SUPPORTED));
+    }
+
+    /**
+     * @todo DOM level 3 setDocumentURI() Not implemented. Do nothing.
+     * @see org.w3c.dom.Document#setDocumentURI(java.lang.String)
+     */
+    public void setDocumentURI(String documentURI)
+    {
+        // do nothing
+    }
+
+    /**
+     * @todo DOM level 3 setStrictErrorChecking() Not implemented. Do nothing.
+     * @see org.w3c.dom.Document#setStrictErrorChecking(boolean)
+     */
+    public void setStrictErrorChecking(boolean strictErrorChecking)
+    {
+        // do nothing
+    }
+
+    /**
+     * @todo DOM level 3 setXmlStandalone() Not implemented. Do nothing.
+     * @see org.w3c.dom.Document#setXmlStandalone(boolean)
+     */
+    public void setXmlStandalone(boolean xmlStandalone) throws DOMException
+    {
+        // do nothing
+    }
+
+    /**
+     * @todo DOM level 3 setXmlVersion() Not implemented. Do nothing.
+     * @see org.w3c.dom.Document#setXmlVersion(java.lang.String)
+     */
+    public void setXmlVersion(String xmlVersion) throws DOMException
+    {
+        // do nothing
+    }
+
+	/* (non-Javadoc)
+	 * @see org.w3c.dom.Document#getDomConfig()
+	 */
+	public DOMConfiguration getDomConfig() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/DOMDocumentTypeImpl.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/DOMDocumentTypeImpl.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/DOMDocumentTypeImpl.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,175 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ *  Java HTML Tidy - JTidy
+ *  HTML parser and pretty printer
+ *
+ *  Copyright (c) 1998-2000 World Wide Web Consortium (Massachusetts
+ *  Institute of Technology, Institut National de Recherche en
+ *  Informatique et en Automatique, Keio University). All Rights
+ *  Reserved.
+ *
+ *  Contributing Author(s):
+ *
+ *     Dave Raggett <dsr at w3.org>
+ *     Andy Quick <ac.quick at sympatico.ca> (translation to Java)
+ *     Gary L Peskin <garyp at firstech.com> (Java development)
+ *     Sami Lempinen <sami at lempinen.net> (release management)
+ *     Fabrizio Giustina <fgiust at users.sourceforge.net>
+ *
+ *  The contributing author(s) would like to thank all those who
+ *  helped with testing, bug fixes, and patience.  This wouldn't
+ *  have been possible without all of you.
+ *
+ *  COPYRIGHT NOTICE:
+ * 
+ *  This software and documentation is provided "as is," and
+ *  the copyright holders and contributing author(s) make no
+ *  representations or warranties, express or implied, including
+ *  but not limited to, warranties of merchantability or fitness
+ *  for any particular purpose or that the use of the software or
+ *  documentation will not infringe any third party patents,
+ *  copyrights, trademarks or other rights. 
+ *
+ *  The copyright holders and contributing author(s) will not be
+ *  liable for any direct, indirect, special or consequential damages
+ *  arising out of any use of the software or documentation, even if
+ *  advised of the possibility of such damage.
+ *
+ *  Permission is hereby granted to use, copy, modify, and distribute
+ *  this source code, or portions hereof, documentation and executables,
+ *  for any purpose, without fee, subject to the following restrictions:
+ *
+ *  1. The origin of this source code must not be misrepresented.
+ *  2. Altered versions must be plainly marked as such and must
+ *     not be misrepresented as being the original source.
+ *  3. This Copyright notice may not be removed or altered from any
+ *     source or altered source distribution.
+ * 
+ *  The copyright holders and contributing author(s) specifically
+ *  permit, without fee, and encourage the use of this source code
+ *  as a component for supporting the Hypertext Markup Language in
+ *  commercial products. If you use this source code in a product,
+ *  acknowledgment is not required but would be appreciated.
+ *
+ */
+
+package org.ajax4jsf.org.w3c.tidy;
+
+/**
+ * DOMDocumentTypeImpl.
+ * @author Dave Raggett <a href="mailto:dsr at w3.org">dsr at w3.org </a>
+ * @author Andy Quick <a href="mailto:ac.quick at sympatico.ca">ac.quick at sympatico.ca </a> (translation to Java)
+ * @author Fabrizio Giustina
+ * @version $Revision: 1.1.2.1 $ ($Author: alexsmirnov $)
+ */
+public class DOMDocumentTypeImpl extends DOMNodeImpl implements org.w3c.dom.DocumentType
+{
+
+    /**
+     * Instantiates a new DOM document type.
+     * @param adaptee Tidy Node
+     */
+    protected DOMDocumentTypeImpl(Node adaptee)
+    {
+        super(adaptee);
+    }
+
+    /**
+     * @see org.w3c.dom.Node#getNodeType
+     */
+    public short getNodeType()
+    {
+        return org.w3c.dom.Node.DOCUMENT_TYPE_NODE;
+    }
+
+    /**
+     * @see org.w3c.dom.Node#getNodeName
+     */
+    public String getNodeName()
+    {
+        return getName();
+    }
+
+    /**
+     * @see org.w3c.dom.DocumentType#getName
+     */
+    public String getName()
+    {
+        String value = null;
+        if (adaptee.type == Node.DOCTYPE_TAG)
+        {
+
+            if (adaptee.textarray != null && adaptee.start < adaptee.end)
+            {
+                value = TidyUtils.getString(adaptee.textarray, adaptee.start, adaptee.end - adaptee.start);
+            }
+        }
+        return value;
+    }
+
+    /**
+     * @todo DOM level 2 getEntities() Not implemented. Returns null.
+     * @see org.w3c.dom.DocumentType#getEntities()
+     */
+    public org.w3c.dom.NamedNodeMap getEntities()
+    {
+        return null;
+    }
+
+    /**
+     * @todo DOM level 2 getNotations() Not implemented. Returns null.
+     * @see org.w3c.dom.DocumentType#getNotations()
+     */
+    public org.w3c.dom.NamedNodeMap getNotations()
+    {
+        return null;
+    }
+
+    /**
+     * @todo DOM level 2 getPublicId() Not implemented. Returns null.
+     * @see org.w3c.dom.DocumentType#getPublicId()
+     */
+    public String getPublicId()
+    {
+        return null;
+    }
+
+    /**
+     * @todo DOM level 2 getSystemId() Not implemented. Returns null.
+     * @see org.w3c.dom.DocumentType#getSystemId()
+     */
+    public String getSystemId()
+    {
+        return null;
+    }
+
+    /**
+     * @todo DOM level 2 getInternalSubset() Not implemented. Returns null.
+     * @see org.w3c.dom.DocumentType#getInternalSubset()
+     */
+    public String getInternalSubset()
+    {
+        return null;
+    }
+
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/DOMElementImpl.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/DOMElementImpl.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/DOMElementImpl.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,469 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ *  Java HTML Tidy - JTidy
+ *  HTML parser and pretty printer
+ *
+ *  Copyright (c) 1998-2000 World Wide Web Consortium (Massachusetts
+ *  Institute of Technology, Institut National de Recherche en
+ *  Informatique et en Automatique, Keio University). All Rights
+ *  Reserved.
+ *
+ *  Contributing Author(s):
+ *
+ *     Dave Raggett <dsr at w3.org>
+ *     Andy Quick <ac.quick at sympatico.ca> (translation to Java)
+ *     Gary L Peskin <garyp at firstech.com> (Java development)
+ *     Sami Lempinen <sami at lempinen.net> (release management)
+ *     Fabrizio Giustina <fgiust at users.sourceforge.net>
+ *
+ *  The contributing author(s) would like to thank all those who
+ *  helped with testing, bug fixes, and patience.  This wouldn't
+ *  have been possible without all of you.
+ *
+ *  COPYRIGHT NOTICE:
+ * 
+ *  This software and documentation is provided "as is," and
+ *  the copyright holders and contributing author(s) make no
+ *  representations or warranties, express or implied, including
+ *  but not limited to, warranties of merchantability or fitness
+ *  for any particular purpose or that the use of the software or
+ *  documentation will not infringe any third party patents,
+ *  copyrights, trademarks or other rights. 
+ *
+ *  The copyright holders and contributing author(s) will not be
+ *  liable for any direct, indirect, special or consequential damages
+ *  arising out of any use of the software or documentation, even if
+ *  advised of the possibility of such damage.
+ *
+ *  Permission is hereby granted to use, copy, modify, and distribute
+ *  this source code, or portions hereof, documentation and executables,
+ *  for any purpose, without fee, subject to the following restrictions:
+ *
+ *  1. The origin of this source code must not be misrepresented.
+ *  2. Altered versions must be plainly marked as such and must
+ *     not be misrepresented as being the original source.
+ *  3. This Copyright notice may not be removed or altered from any
+ *     source or altered source distribution.
+ * 
+ *  The copyright holders and contributing author(s) specifically
+ *  permit, without fee, and encourage the use of this source code
+ *  as a component for supporting the Hypertext Markup Language in
+ *  commercial products. If you use this source code in a product,
+ *  acknowledgment is not required but would be appreciated.
+ *
+ */
+package org.ajax4jsf.org.w3c.tidy;
+
+import org.ajax4jsf.framework.util.message.Messages;
+import org.w3c.dom.Attr;
+import org.w3c.dom.DOMException;
+import org.w3c.dom.TypeInfo;
+
+
+/**
+ * DOMElementImpl.
+ * @author Dave Raggett <a href="mailto:dsr at w3.org">dsr at w3.org </a>
+ * @author Andy Quick <a href="mailto:ac.quick at sympatico.ca">ac.quick at sympatico.ca </a> (translation to Java)
+ * @author Fabrizio Giustina
+ * @version $Revision: 1.1.2.1 $ ($Author: alexsmirnov $)
+ */
+public class DOMElementImpl extends DOMNodeImpl implements org.w3c.dom.Element
+{
+
+    /**
+     * Instantiates a new DOM element.
+     * @param adaptee Tidy Node.
+     */
+    protected DOMElementImpl(Node adaptee)
+    {
+        super(adaptee);
+    }
+
+    /**
+     * @see org.w3c.dom.Node#getNodeType
+     */
+    public short getNodeType()
+    {
+        return org.w3c.dom.Node.ELEMENT_NODE;
+    }
+
+    /**
+     * @see org.w3c.dom.Element#getTagName
+     */
+    public String getTagName()
+    {
+        return super.getNodeName();
+    }
+
+    /**
+     * @see org.w3c.dom.Element#getAttribute(java.lang.String)
+     */
+    public String getAttribute(String name)
+    {
+        if (this.adaptee == null)
+        {
+            return null;
+        }
+
+        AttVal att = this.adaptee.attributes;
+        while (att != null)
+        {
+            if (att.attribute.equals(name))
+            {
+                break;
+            }
+            att = att.next;
+        }
+        if (att != null)
+        {
+            return att.value;
+        }
+
+        return "";
+    }
+
+    /**
+     * @see org.w3c.dom.Element#setAttribute(java.lang.String, java.lang.String)
+     */
+    public void setAttribute(String name, String value) throws DOMException
+    {
+        if (this.adaptee == null)
+        {
+            return;
+        }
+
+        AttVal att = this.adaptee.attributes;
+        while (att != null)
+        {
+            if (att.attribute.equals(name))
+            {
+                break;
+            }
+            att = att.next;
+        }
+        if (att != null)
+        {
+            att.value = value;
+        }
+        else
+        {
+            att = new AttVal(null, null, '"', name, value);
+            att.dict = AttributeTable.getDefaultAttributeTable().findAttribute(att);
+            if (this.adaptee.attributes == null)
+            {
+                this.adaptee.attributes = att;
+            }
+            else
+            {
+                att.next = this.adaptee.attributes;
+                this.adaptee.attributes = att;
+            }
+        }
+    }
+
+    /**
+     * @see org.w3c.dom.Element#removeAttribute(java.lang.String)
+     */
+    public void removeAttribute(String name) throws DOMException
+    {
+        if (this.adaptee == null)
+        {
+            return;
+        }
+
+        AttVal att = this.adaptee.attributes;
+        AttVal pre = null;
+        while (att != null)
+        {
+            if (att.attribute.equals(name))
+            {
+                break;
+            }
+            pre = att;
+            att = att.next;
+        }
+        if (att != null)
+        {
+            if (pre == null)
+            {
+                this.adaptee.attributes = att.next;
+            }
+            else
+            {
+                pre.next = att.next;
+            }
+        }
+    }
+
+    /**
+     * @see org.w3c.dom.Element#getAttributeNode(java.lang.String)
+     */
+    public org.w3c.dom.Attr getAttributeNode(String name)
+    {
+        if (this.adaptee == null)
+        {
+            return null;
+        }
+
+        AttVal att = this.adaptee.attributes;
+        while (att != null)
+        {
+            if (att.attribute.equals(name))
+            {
+                break;
+            }
+            att = att.next;
+        }
+        if (att != null)
+        {
+            return att.getAdapter();
+        }
+
+        return null;
+    }
+
+    /**
+     * @see org.w3c.dom.Element#setAttributeNode(org.w3c.dom.Attr)
+     */
+    public org.w3c.dom.Attr setAttributeNode(org.w3c.dom.Attr newAttr) throws DOMException
+    {
+        if (newAttr == null)
+        {
+            return null;
+        }
+        if (!(newAttr instanceof DOMAttrImpl))
+        {
+            throw new DOMException(DOMException.WRONG_DOCUMENT_ERR, Messages.getMessage(Messages.NOT_INSTANCE_OF_ERROR, "newAttr", "DOMAttrImpl"));
+        }
+
+        DOMAttrImpl newatt = (DOMAttrImpl) newAttr;
+        String name = newatt.avAdaptee.attribute;
+        org.w3c.dom.Attr result = null;
+
+        AttVal att = this.adaptee.attributes;
+        while (att != null)
+        {
+            if (att.attribute.equals(name))
+            {
+                break;
+            }
+            att = att.next;
+        }
+        if (att != null)
+        {
+            result = att.getAdapter();
+            att.adapter = newAttr;
+        }
+        else
+        {
+            if (this.adaptee.attributes == null)
+            {
+                this.adaptee.attributes = newatt.avAdaptee;
+            }
+            else
+            {
+                newatt.avAdaptee.next = this.adaptee.attributes;
+                this.adaptee.attributes = newatt.avAdaptee;
+            }
+        }
+        return result;
+    }
+
+    /**
+     * @see org.w3c.dom.Element#removeAttributeNode(org.w3c.dom.Attr)
+     */
+    public org.w3c.dom.Attr removeAttributeNode(org.w3c.dom.Attr oldAttr) throws DOMException
+    {
+        if (oldAttr == null)
+        {
+            return null;
+        }
+
+        org.w3c.dom.Attr result = null;
+        AttVal att = this.adaptee.attributes;
+        AttVal pre = null;
+        while (att != null)
+        {
+            if (att.getAdapter() == oldAttr)
+            {
+                break;
+            }
+            pre = att;
+            att = att.next;
+        }
+        if (att != null)
+        {
+            if (pre == null)
+            {
+                this.adaptee.attributes = att.next;
+            }
+            else
+            {
+                pre.next = att.next;
+            }
+            result = oldAttr;
+        }
+        else
+        {
+            throw new DOMException(DOMException.NOT_FOUND_ERR, "oldAttr not found");
+        }
+        return result;
+    }
+
+    /**
+     * @see org.w3c.dom.Element#getElementsByTagName(java.lang.String)
+     */
+    public org.w3c.dom.NodeList getElementsByTagName(String name)
+    {
+        return new DOMNodeListByTagNameImpl(this.adaptee, name);
+    }
+
+    /**
+     * @todo DOM level 2 getOwnerDocument() Not supported. Do nothing.
+     * @see org.w3c.dom.Element#normalize
+     */
+    public void normalize()
+    {
+        // do nothing
+    }
+
+    /**
+     * @todo DOM level 2 getAttributeNS() Not supported. Throws NOT_SUPPORTED_ERR.
+     * @see org.w3c.dom.Element#getAttributeNS(java.lang.String, java.lang.String)
+     */
+    public String getAttributeNS(String namespaceURI, String localName)
+    {
+        // DOMException - NOT_SUPPORTED_ERR: May be raised if the implementation does not support the feature "XML" and
+        // the language exposed through the Document does not support XML Namespaces (such as HTML 4.01).
+        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, Messages.getMessage(Messages.DOM_METHOD_NOT_SUPPORTED));
+    }
+
+    /**
+     * @todo DOM level 2 setAttributeNS() Not supported. Throws NOT_SUPPORTED_ERR.
+     * @see org.w3c.dom.Element#setAttributeNS(java.lang.String, java.lang.String, java.lang.String)
+     */
+    public void setAttributeNS(String namespaceURI, String qualifiedName, String value) throws org.w3c.dom.DOMException
+    {
+        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, Messages.getMessage(Messages.DOM_METHOD_NOT_SUPPORTED));
+    }
+
+    /**
+     * @todo DOM level 2 removeAttributeNS() Not supported. Throws NOT_SUPPORTED_ERR.
+     * @see org.w3c.dom.Element#removeAttributeNS(java.lang.String, java.lang.String)
+     */
+    public void removeAttributeNS(String namespaceURI, String localName) throws org.w3c.dom.DOMException
+    {
+        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, Messages.getMessage(Messages.DOM_METHOD_NOT_SUPPORTED));
+    }
+
+    /**
+     * @todo DOM level 2 getAttributeNodeNS() Not supported. Throws NOT_SUPPORTED_ERR.
+     * @see org.w3c.dom.Element#getAttributeNodeNS(java.lang.String, java.lang.String)
+     */
+    public org.w3c.dom.Attr getAttributeNodeNS(String namespaceURI, String localName)
+    {
+        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, Messages.getMessage(Messages.DOM_METHOD_NOT_SUPPORTED));
+    }
+
+    /**
+     * @todo DOM level 2 setAttributeNodeNS() Not supported. Throws NOT_SUPPORTED_ERR.
+     * @see org.w3c.dom.Element#setAttributeNodeNS(org.w3c.dom.Attr)
+     */
+    public org.w3c.dom.Attr setAttributeNodeNS(org.w3c.dom.Attr newAttr) throws org.w3c.dom.DOMException
+    {
+        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, Messages.getMessage(Messages.DOM_METHOD_NOT_SUPPORTED));
+    }
+
+    /**
+     * @todo DOM level 2 getElementsByTagNameNS() Not supported. Throws NOT_SUPPORTED_ERR.
+     * @see org.w3c.dom.Element#getElementsByTagNameNS(java.lang.String, java.lang.String)
+     */
+    public org.w3c.dom.NodeList getElementsByTagNameNS(String namespaceURI, String localName)
+    {
+        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, Messages.getMessage(Messages.DOM_METHOD_NOT_SUPPORTED));
+    }
+
+    /**
+     * @todo DOM level 2 hasAttribute() Not supported. Returns false.
+     * @see org.w3c.dom.Element#hasAttribute(java.lang.String)
+     */
+    public boolean hasAttribute(String name)
+    {
+        return false;
+    }
+
+    /**
+     * @todo DOM level 2 hasAttribute() Not supported. Returns false.
+     * @see org.w3c.dom.Element#hasAttributeNS(java.lang.String, java.lang.String)
+     */
+    public boolean hasAttributeNS(String namespaceURI, String localName)
+    {
+        return false;
+    }
+
+    /**
+     * @todo DOM level 3 getSchemaTypeInfo() Not supported. Returns null.
+     * @see org.w3c.dom.Element#getSchemaTypeInfo()
+     */
+/*    public TypeInfo getSchemaTypeInfo()
+    {
+        return null;
+    }
+*/
+    /**
+     * @todo DOM level 3 setIdAttribute() Not supported. Throws NOT_SUPPORTED_ERR.
+     * @see org.w3c.dom.Element#setIdAttribute(java.lang.String, boolean)
+     */
+    public void setIdAttribute(String name, boolean isId) throws DOMException
+    {
+        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, Messages.getMessage(Messages.DOM_METHOD_NOT_SUPPORTED));
+    }
+
+    /**
+     * @todo DOM level 3 setIdAttributeNode() Not supported. Throws NOT_SUPPORTED_ERR.
+     * @see org.w3c.dom.Element#setIdAttributeNode(org.w3c.dom.Attr, boolean)
+     */
+    public void setIdAttributeNode(Attr idAttr, boolean isId) throws DOMException
+    {
+        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, Messages.getMessage(Messages.DOM_METHOD_NOT_SUPPORTED));
+    }
+
+    /**
+     * @todo DOM level 3 setIdAttributeNS() Not supported. Throws NOT_SUPPORTED_ERR.
+     * @see org.w3c.dom.Element#setIdAttributeNS(java.lang.String, java.lang.String, boolean)
+     */
+    public void setIdAttributeNS(String namespaceURI, String localName, boolean isId) throws DOMException
+    {
+        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, Messages.getMessage(Messages.DOM_METHOD_NOT_SUPPORTED));
+    }
+
+	/* (non-Javadoc)
+	 * @see org.w3c.dom.Element#getSchemaTypeInfo()
+	 */
+	public TypeInfo getSchemaTypeInfo() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/DOMNodeImpl.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/DOMNodeImpl.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/DOMNodeImpl.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,713 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ *  Java HTML Tidy - JTidy
+ *  HTML parser and pretty printer
+ *
+ *  Copyright (c) 1998-2000 World Wide Web Consortium (Massachusetts
+ *  Institute of Technology, Institut National de Recherche en
+ *  Informatique et en Automatique, Keio University). All Rights
+ *  Reserved.
+ *
+ *  Contributing Author(s):
+ *
+ *     Dave Raggett <dsr at w3.org>
+ *     Andy Quick <ac.quick at sympatico.ca> (translation to Java)
+ *     Gary L Peskin <garyp at firstech.com> (Java development)
+ *     Sami Lempinen <sami at lempinen.net> (release management)
+ *     Fabrizio Giustina <fgiust at users.sourceforge.net>
+ *
+ *  The contributing author(s) would like to thank all those who
+ *  helped with testing, bug fixes, and patience.  This wouldn't
+ *  have been possible without all of you.
+ *
+ *  COPYRIGHT NOTICE:
+ * 
+ *  This software and documentation is provided "as is," and
+ *  the copyright holders and contributing author(s) make no
+ *  representations or warranties, express or implied, including
+ *  but not limited to, warranties of merchantability or fitness
+ *  for any particular purpose or that the use of the software or
+ *  documentation will not infringe any third party patents,
+ *  copyrights, trademarks or other rights. 
+ *
+ *  The copyright holders and contributing author(s) will not be
+ *  liable for any direct, indirect, special or consequential damages
+ *  arising out of any use of the software or documentation, even if
+ *  advised of the possibility of such damage.
+ *
+ *  Permission is hereby granted to use, copy, modify, and distribute
+ *  this source code, or portions hereof, documentation and executables,
+ *  for any purpose, without fee, subject to the following restrictions:
+ *
+ *  1. The origin of this source code must not be misrepresented.
+ *  2. Altered versions must be plainly marked as such and must
+ *     not be misrepresented as being the original source.
+ *  3. This Copyright notice may not be removed or altered from any
+ *     source or altered source distribution.
+ * 
+ *  The copyright holders and contributing author(s) specifically
+ *  permit, without fee, and encourage the use of this source code
+ *  as a component for supporting the Hypertext Markup Language in
+ *  commercial products. If you use this source code in a product,
+ *  acknowledgment is not required but would be appreciated.
+ *
+ */
+
+package org.ajax4jsf.org.w3c.tidy;
+
+import org.ajax4jsf.framework.util.message.Messages;
+import org.w3c.dom.DOMException;
+import org.w3c.dom.UserDataHandler;
+
+
+/**
+ * DOMNodeImpl.
+ * @author Dave Raggett <a href="mailto:dsr at w3.org">dsr at w3.org </a>
+ * @author Andy Quick <a href="mailto:ac.quick at sympatico.ca">ac.quick at sympatico.ca </a> (translation to Java)
+ * @author Fabrizio Giustina
+ * @version $Revision: 1.1.2.1 $ ($Author: alexsmirnov $)
+ */
+public class DOMNodeImpl implements org.w3c.dom.Node
+{
+
+    /**
+     * Wrapped tidy node.
+     */
+    protected Node adaptee;
+
+    /**
+     * Intantiates a new DOM node.
+     * @param adaptee wrapped Tidy node
+     */
+    protected DOMNodeImpl(Node adaptee)
+    {
+        this.adaptee = adaptee;
+    }
+
+    /**
+     * @see org.w3c.dom.Node#getNodeValue
+     */
+    public String getNodeValue()
+    {
+        String value = ""; // BAK 10/10/2000 replaced null
+        if (adaptee.type == Node.TEXT_NODE
+            || adaptee.type == Node.CDATA_TAG
+            || adaptee.type == Node.COMMENT_TAG
+            || adaptee.type == Node.CDATA_TEXT
+            || adaptee.type == Node.PROC_INS_TAG)
+        {
+
+            if (adaptee.textarray != null && adaptee.start < adaptee.end)
+            {
+                value = TidyUtils.getString(adaptee.textarray, adaptee.start, adaptee.end - adaptee.start);
+            }
+        }
+        return value;
+    }
+
+    /**
+     * @see org.w3c.dom.Node#setNodeValue
+     */
+    public void setNodeValue(String nodeValue)
+    {
+        if (adaptee.type == Node.TEXT_NODE
+            || adaptee.type == Node.CDATA_TAG
+            || adaptee.type == Node.COMMENT_TAG
+            || adaptee.type == Node.CDATA_TEXT
+            || adaptee.type == Node.PROC_INS_TAG)
+        {
+            byte[] textarray = TidyUtils.getBytes(nodeValue);
+            adaptee.textarray = textarray;
+            adaptee.start = 0;
+            adaptee.end = textarray.length;
+        }
+    }
+
+    /**
+     * @see org.w3c.dom.Node#getNodeName
+     */
+    public String getNodeName()
+    {
+        return adaptee.element;
+    }
+
+    /**
+     * @see org.w3c.dom.Node#getNodeType
+     */
+    public short getNodeType()
+    {
+        short result = -1;
+        switch (adaptee.type)
+        {
+            case Node.ROOT_NODE :
+                result = org.w3c.dom.Node.DOCUMENT_NODE;
+                break;
+            case Node.DOCTYPE_TAG :
+                result = org.w3c.dom.Node.DOCUMENT_TYPE_NODE;
+                break;
+            case Node.COMMENT_TAG :
+                result = org.w3c.dom.Node.COMMENT_NODE;
+                break;
+            case Node.PROC_INS_TAG :
+                result = org.w3c.dom.Node.PROCESSING_INSTRUCTION_NODE;
+                break;
+            case Node.TEXT_NODE :
+                result = org.w3c.dom.Node.TEXT_NODE;
+                break;
+            case Node.CDATA_TEXT :
+            case Node.CDATA_TAG :
+                result = org.w3c.dom.Node.CDATA_SECTION_NODE;
+                break;
+            case Node.START_TAG :
+            case Node.START_END_TAG :
+                result = org.w3c.dom.Node.ELEMENT_NODE;
+                break;
+        }
+        return result;
+    }
+
+    /**
+     * @see org.w3c.dom.Node#getParentNode
+     */
+    public org.w3c.dom.Node getParentNode()
+    {
+        // Attributes are not children in the DOM, and do not have parents
+        if (adaptee.parent != null)
+        {
+            return adaptee.parent.getAdapter();
+        }
+        return null;
+    }
+
+    /**
+     * @see org.w3c.dom.Node#getChildNodes
+     */
+    public org.w3c.dom.NodeList getChildNodes()
+    {
+        return new DOMNodeListImpl(adaptee);
+    }
+
+    /**
+     * @see org.w3c.dom.Node#getFirstChild
+     */
+    public org.w3c.dom.Node getFirstChild()
+    {
+        if (adaptee.content != null)
+        {
+            return adaptee.content.getAdapter();
+        }
+        return null;
+    }
+
+    /**
+     * @see org.w3c.dom.Node#getLastChild
+     */
+    public org.w3c.dom.Node getLastChild()
+    {
+        if (adaptee.last != null)
+        {
+            return adaptee.last.getAdapter();
+        }
+        return null;
+    }
+
+    /**
+     * @see org.w3c.dom.Node#getPreviousSibling
+     */
+    public org.w3c.dom.Node getPreviousSibling()
+    {
+        if (adaptee.prev != null)
+        {
+            return adaptee.prev.getAdapter();
+        }
+        return null;
+    }
+
+    /**
+     * @see org.w3c.dom.Node#getNextSibling
+     */
+    public org.w3c.dom.Node getNextSibling()
+    {
+        if (adaptee.next != null)
+        {
+            return adaptee.next.getAdapter();
+        }
+        return null;
+    }
+
+    /**
+     * @see org.w3c.dom.Node#getAttributes
+     */
+    public org.w3c.dom.NamedNodeMap getAttributes()
+    {
+        return new DOMAttrMapImpl(adaptee.attributes);
+    }
+
+    /**
+     * @see org.w3c.dom.Node#getOwnerDocument
+     */
+    public org.w3c.dom.Document getOwnerDocument()
+    {
+        Node node = this.adaptee;
+        if (node != null && node.type == Node.ROOT_NODE)
+        {
+            return null;
+        }
+
+        while (node != null && node.type != Node.ROOT_NODE)
+        {
+            node = node.parent;
+        }
+
+        if (node != null)
+        {
+            return (org.w3c.dom.Document) node.getAdapter();
+        }
+        return null;
+    }
+
+    /**
+     * @see org.w3c.dom.Node#insertBefore
+     */
+    public org.w3c.dom.Node insertBefore(org.w3c.dom.Node newChild, org.w3c.dom.Node refChild)
+    {
+        // TODO - handle newChild already in tree
+
+        if (newChild == null)
+        {
+            return null;
+        }
+        if (!(newChild instanceof DOMNodeImpl))
+        {
+            throw new DOMException(DOMException.WRONG_DOCUMENT_ERR, Messages.getMessage(Messages.NOT_INSTANCE_OF_ERROR, "newChild", "DOMNodeImpl"));
+        }
+        DOMNodeImpl newCh = (DOMNodeImpl) newChild;
+
+        if (this.adaptee.type == Node.ROOT_NODE)
+        {
+            if (newCh.adaptee.type != Node.DOCTYPE_TAG && newCh.adaptee.type != Node.PROC_INS_TAG)
+            {
+                throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, "newChild cannot be a child of this node");
+            }
+        }
+        else if (this.adaptee.type == Node.START_TAG)
+        {
+            if (newCh.adaptee.type != Node.START_TAG
+                && newCh.adaptee.type != Node.START_END_TAG
+                && newCh.adaptee.type != Node.COMMENT_TAG
+                && newCh.adaptee.type != Node.TEXT_NODE
+                && newCh.adaptee.type != Node.CDATA_TEXT
+                && newCh.adaptee.type != Node.CDATA_TAG)
+            {
+                throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, "newChild cannot be a child of this node");
+            }
+        }
+        if (refChild == null)
+        {
+            this.adaptee.insertNodeAtEnd(newCh.adaptee);
+            if (this.adaptee.type == Node.START_END_TAG)
+            {
+                this.adaptee.setType(Node.START_TAG);
+            }
+        }
+        else
+        {
+            Node ref = this.adaptee.content;
+            while (ref != null)
+            {
+                if (ref.getAdapter() == refChild)
+                {
+                    break;
+                }
+                ref = ref.next;
+            }
+            if (ref == null)
+            {
+                throw new DOMException(DOMException.NOT_FOUND_ERR, "refChild not found");
+            }
+            Node.insertNodeBeforeElement(ref, newCh.adaptee);
+        }
+        return newChild;
+    }
+
+    /**
+     * @see org.w3c.dom.Node#replaceChild
+     */
+    public org.w3c.dom.Node replaceChild(org.w3c.dom.Node newChild, org.w3c.dom.Node oldChild)
+    {
+        // TODO - handle newChild already in tree
+
+        if (newChild == null)
+        {
+            return null;
+        }
+        if (!(newChild instanceof DOMNodeImpl))
+        {
+            throw new DOMException(DOMException.WRONG_DOCUMENT_ERR, Messages.getMessage(Messages.NOT_INSTANCE_OF_ERROR, "newChild", "DOMNodeImpl"));
+        }
+        DOMNodeImpl newCh = (DOMNodeImpl) newChild;
+
+        if (this.adaptee.type == Node.ROOT_NODE)
+        {
+            if (newCh.adaptee.type != Node.DOCTYPE_TAG && newCh.adaptee.type != Node.PROC_INS_TAG)
+            {
+                throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, "newChild cannot be a child of this node");
+            }
+        }
+        else if (this.adaptee.type == Node.START_TAG)
+        {
+            if (newCh.adaptee.type != Node.START_TAG
+                && newCh.adaptee.type != Node.START_END_TAG
+                && newCh.adaptee.type != Node.COMMENT_TAG
+                && newCh.adaptee.type != Node.TEXT_NODE
+                && newCh.adaptee.type != Node.CDATA_TEXT
+                && newCh.adaptee.type != Node.CDATA_TAG)
+            {
+                throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, "newChild cannot be a child of this node");
+            }
+        }
+        if (oldChild == null)
+        {
+            throw new DOMException(DOMException.NOT_FOUND_ERR, "oldChild not found");
+        }
+
+        Node n;
+        Node ref = this.adaptee.content;
+        while (ref != null)
+        {
+            if (ref.getAdapter() == oldChild)
+            {
+                break;
+            }
+            ref = ref.next;
+        }
+        if (ref == null)
+        {
+            throw new DOMException(DOMException.NOT_FOUND_ERR, "oldChild not found");
+        }
+        newCh.adaptee.next = ref.next;
+        newCh.adaptee.prev = ref.prev;
+        newCh.adaptee.last = ref.last;
+        newCh.adaptee.parent = ref.parent;
+        newCh.adaptee.content = ref.content;
+        if (ref.parent != null)
+        {
+            if (ref.parent.content == ref)
+            {
+                ref.parent.content = newCh.adaptee;
+            }
+            if (ref.parent.last == ref)
+            {
+                ref.parent.last = newCh.adaptee;
+            }
+        }
+        if (ref.prev != null)
+        {
+            ref.prev.next = newCh.adaptee;
+        }
+        if (ref.next != null)
+        {
+            ref.next.prev = newCh.adaptee;
+        }
+        for (n = ref.content; n != null; n = n.next)
+        {
+            if (n.parent == ref)
+            {
+                n.parent = newCh.adaptee;
+            }
+        }
+
+        return oldChild;
+    }
+
+    /**
+     * @see org.w3c.dom.Node#removeChild
+     */
+    public org.w3c.dom.Node removeChild(org.w3c.dom.Node oldChild)
+    {
+        if (oldChild == null)
+        {
+            return null;
+        }
+
+        Node ref = this.adaptee.content;
+        while (ref != null)
+        {
+            if (ref.getAdapter() == oldChild)
+            {
+                break;
+            }
+            ref = ref.next;
+        }
+        if (ref == null)
+        {
+            throw new DOMException(DOMException.NOT_FOUND_ERR, "refChild not found");
+        }
+        Node.discardElement(ref);
+
+        if (this.adaptee.content == null && this.adaptee.type == Node.START_TAG)
+        {
+            this.adaptee.setType(Node.START_END_TAG);
+        }
+
+        return oldChild;
+    }
+
+    /**
+     * @see org.w3c.dom.Node#appendChild
+     */
+    public org.w3c.dom.Node appendChild(org.w3c.dom.Node newChild)
+    {
+        // TODO - handle newChild already in tree
+
+        if (newChild == null)
+        {
+            return null;
+        }
+        if (!(newChild instanceof DOMNodeImpl))
+        {
+            throw new DOMException(DOMException.WRONG_DOCUMENT_ERR, Messages.getMessage(Messages.NOT_INSTANCE_OF_ERROR, "newChild", "DOMNodeImpl"));
+        }
+        DOMNodeImpl newCh = (DOMNodeImpl) newChild;
+
+        if (this.adaptee.type == Node.ROOT_NODE)
+        {
+            if (newCh.adaptee.type != Node.DOCTYPE_TAG && newCh.adaptee.type != Node.PROC_INS_TAG)
+            {
+                throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, "newChild cannot be a child of this node");
+            }
+        }
+        else if (this.adaptee.type == Node.START_TAG)
+        {
+            if (newCh.adaptee.type != Node.START_TAG
+                && newCh.adaptee.type != Node.START_END_TAG
+                && newCh.adaptee.type != Node.COMMENT_TAG
+                && newCh.adaptee.type != Node.TEXT_NODE
+                && newCh.adaptee.type != Node.CDATA_TEXT
+                && newCh.adaptee.type != Node.CDATA_TAG)
+            {
+                throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, "newChild cannot be a child of this node");
+            }
+        }
+        this.adaptee.insertNodeAtEnd(newCh.adaptee);
+
+        if (this.adaptee.type == Node.START_END_TAG)
+        {
+            this.adaptee.setType(Node.START_TAG);
+        }
+
+        return newChild;
+    }
+
+    /**
+     * @see org.w3c.dom.Node#hasChildNodes
+     */
+    public boolean hasChildNodes()
+    {
+        return (adaptee.content != null);
+    }
+
+    /**
+     * @see org.w3c.dom.Node#cloneNode(boolean)
+     */
+    public org.w3c.dom.Node cloneNode(boolean deep)
+    {
+        Node node = adaptee.cloneNode(deep);
+        node.parent = null;
+        return node.getAdapter();
+    }
+
+    /**
+     * Do nothing: text nodes in html documents are important and jtidy already removes useless text during parsing.
+     * @see org.w3c.dom.Node#normalize()
+     */
+    public void normalize()
+    {
+        // do nothing
+    }
+
+    /**
+     * DOM2 - not implemented.
+     * @see #isSupported(java.lang.String, java.lang.String)
+     */
+    public boolean supports(String feature, String version)
+    {
+        return isSupported(feature, version);
+    }
+
+    /**
+     * @see org.w3c.dom.Node#getNamespaceURI()
+     */
+    public String getNamespaceURI()
+    {
+        return null;
+    }
+
+    /**
+     * @see org.w3c.dom.Node#getPrefix()
+     */
+    public String getPrefix()
+    {
+        return null;
+    }
+
+    /**
+     * @see org.w3c.dom.Node#setPrefix(java.lang.String)
+     */
+    public void setPrefix(String prefix) throws DOMException
+    {
+        // The namespace prefix of this node, or null if it is unspecified. When it is defined to be null, setting it
+        // has no effect, including if the node is read-only.
+        // do nothing
+    }
+
+    /**
+     * @see org.w3c.dom.Node#getLocalName()
+     */
+    public String getLocalName()
+    {
+        return getNodeName();
+    }
+
+    /**
+     * @see org.w3c.dom.Node#isSupported(java.lang.String, java.lang.String)
+     */
+    public boolean isSupported(String feature, String version)
+    {
+        return false;
+    }
+
+    /**
+     * @see org.w3c.dom.Node#hasAttributes
+     */
+    public boolean hasAttributes()
+    {
+        // contributed by dlp at users.sourceforge.net
+        return this.adaptee.attributes != null;
+    }
+
+    /**
+     * @todo DOM level 3 compareDocumentPosition() Not implemented.
+     * @see org.w3c.dom.Node#compareDocumentPosition(org.w3c.dom.Node)
+     */
+    public short compareDocumentPosition(org.w3c.dom.Node other) throws DOMException
+    {
+        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, Messages.getMessage(Messages.DOM_METHOD_NOT_SUPPORTED));
+    }
+
+    /**
+     * @todo DOM level 3 getBaseURI() Not implemented. Returns null.
+     * @see org.w3c.dom.Node#getBaseURI()
+     */
+    public String getBaseURI()
+    {
+        return null;
+    }
+
+    /**
+     * @todo DOM level 3 getFeature() Not implemented. Returns null.
+     * @see org.w3c.dom.Node#getFeature(java.lang.String, java.lang.String)
+     */
+    public Object getFeature(String feature, String version)
+    {
+        return null;
+    }
+
+    /**
+     * @todo DOM level 3 getTextContent() Not implemented. Returns null.
+     * @see org.w3c.dom.Node#getTextContent()
+     */
+    public String getTextContent() throws DOMException
+    {
+        return null;
+    }
+
+    /**
+     * @todo DOM level 3 getUserData() Not implemented. Returns null.
+     * @see org.w3c.dom.Node#getUserData(java.lang.String)
+     */
+    public Object getUserData(String key)
+    {
+        return null;
+    }
+
+    /**
+     * @see org.w3c.dom.Node#isDefaultNamespace(java.lang.String)
+     */
+    public boolean isDefaultNamespace(String namespaceURI)
+    {
+        return false;
+    }
+
+    /**
+     * @todo DOM level 3 isEqualNode() Not implemented. Returns false.
+     * @see org.w3c.dom.Node#isEqualNode(org.w3c.dom.Node)
+     */
+    public boolean isEqualNode(org.w3c.dom.Node arg)
+    {
+        return false;
+    }
+
+    /**
+     * @todo DOM level 3 isSameNode() Not implemented. Returns false.
+     * @see org.w3c.dom.Node#isSameNode(org.w3c.dom.Node)
+     */
+    public boolean isSameNode(org.w3c.dom.Node other)
+    {
+        return false;
+    }
+
+    /**
+     * @see org.w3c.dom.Node#lookupNamespaceURI(java.lang.String)
+     */
+    public String lookupNamespaceURI(String prefix)
+    {
+        return null;
+    }
+
+    /**
+     * @see org.w3c.dom.Node#lookupPrefix(java.lang.String)
+     */
+    public String lookupPrefix(String namespaceURI)
+    {
+        return null;
+    }
+
+    /**
+     * @todo DOM level 3 setTextContent() Not implemented. Throws NO_MODIFICATION_ALLOWED_ERR
+     * @see org.w3c.dom.Node#setTextContent(java.lang.String)
+     */
+    public void setTextContent(String textContent) throws DOMException
+    {
+        throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, "Node is read only");
+    }
+
+    /**
+     * @todo DOM level 3 setUserData() Not implemented. Returns null.
+     * @see org.w3c.dom.Node#setUserData(java.lang.String, java.lang.Object, org.w3c.dom.UserDataHandler)
+     */
+    public Object setUserData(String key, Object data, UserDataHandler handler)
+    {
+        return null;
+    }
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/DOMNodeListByTagNameImpl.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/DOMNodeListByTagNameImpl.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/DOMNodeListByTagNameImpl.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,185 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ *  Java HTML Tidy - JTidy
+ *  HTML parser and pretty printer
+ *
+ *  Copyright (c) 1998-2000 World Wide Web Consortium (Massachusetts
+ *  Institute of Technology, Institut National de Recherche en
+ *  Informatique et en Automatique, Keio University). All Rights
+ *  Reserved.
+ *
+ *  Contributing Author(s):
+ *
+ *     Dave Raggett <dsr at w3.org>
+ *     Andy Quick <ac.quick at sympatico.ca> (translation to Java)
+ *     Gary L Peskin <garyp at firstech.com> (Java development)
+ *     Sami Lempinen <sami at lempinen.net> (release management)
+ *     Fabrizio Giustina <fgiust at users.sourceforge.net>
+ *
+ *  The contributing author(s) would like to thank all those who
+ *  helped with testing, bug fixes, and patience.  This wouldn't
+ *  have been possible without all of you.
+ *
+ *  COPYRIGHT NOTICE:
+ * 
+ *  This software and documentation is provided "as is," and
+ *  the copyright holders and contributing author(s) make no
+ *  representations or warranties, express or implied, including
+ *  but not limited to, warranties of merchantability or fitness
+ *  for any particular purpose or that the use of the software or
+ *  documentation will not infringe any third party patents,
+ *  copyrights, trademarks or other rights. 
+ *
+ *  The copyright holders and contributing author(s) will not be
+ *  liable for any direct, indirect, special or consequential damages
+ *  arising out of any use of the software or documentation, even if
+ *  advised of the possibility of such damage.
+ *
+ *  Permission is hereby granted to use, copy, modify, and distribute
+ *  this source code, or portions hereof, documentation and executables,
+ *  for any purpose, without fee, subject to the following restrictions:
+ *
+ *  1. The origin of this source code must not be misrepresented.
+ *  2. Altered versions must be plainly marked as such and must
+ *     not be misrepresented as being the original source.
+ *  3. This Copyright notice may not be removed or altered from any
+ *     source or altered source distribution.
+ * 
+ *  The copyright holders and contributing author(s) specifically
+ *  permit, without fee, and encourage the use of this source code
+ *  as a component for supporting the Hypertext Markup Language in
+ *  commercial products. If you use this source code in a product,
+ *  acknowledgment is not required but would be appreciated.
+ *
+ */
+
+package org.ajax4jsf.org.w3c.tidy;
+
+/**
+ * DOMNodeListByTagNameImpl. The items in the <code>NodeList</code> are accessible via an integral index, starting
+ * from 0.
+ * @author Dave Raggett <a href="mailto:dsr at w3.org">dsr at w3.org </a>
+ * @author Andy Quick <a href="mailto:ac.quick at sympatico.ca">ac.quick at sympatico.ca </a> (translation to Java)
+ * @author Fabrizio Giustina
+ * @version $Revision: 1.1.2.1 $ ($Author: alexsmirnov $)
+ */
+public class DOMNodeListByTagNameImpl implements org.w3c.dom.NodeList
+{
+
+    /**
+     * First node.
+     */
+    private Node first;
+
+    /**
+     * Tag name.
+     */
+    private String tagName;
+
+    /**
+     * Current index.
+     */
+    private int currIndex;
+
+    /**
+     * Max index (number of nodes).
+     */
+    private int maxIndex;
+
+    /**
+     * Current node.
+     */
+    private Node currNode;
+
+    /**
+     * Instantiates a new DOMNodeListByTagName.
+     * @param first first node.
+     * @param tagName tag name
+     */
+    protected DOMNodeListByTagNameImpl(Node first, String tagName)
+    {
+        this.first = first;
+        this.tagName = tagName;
+    }
+
+    /**
+     * @see org.w3c.dom.NodeList#item
+     */
+    public org.w3c.dom.Node item(int index)
+    {
+        currIndex = 0;
+        maxIndex = index;
+        preTraverse(first);
+
+        if (currIndex > maxIndex && currNode != null)
+        {
+            return currNode.getAdapter();
+        }
+
+        return null;
+    }
+
+    /**
+     * @see org.w3c.dom.NodeList#getLength
+     */
+    public int getLength()
+    {
+        currIndex = 0;
+        maxIndex = Integer.MAX_VALUE;
+        preTraverse(first);
+        return currIndex;
+    }
+
+    /**
+     * Traverse the node list.
+     * @param node Node
+     */
+    protected void preTraverse(Node node)
+    {
+        if (node == null)
+        {
+            return;
+        }
+
+        if (node.type == Node.START_TAG || node.type == Node.START_END_TAG)
+        {
+            if (currIndex <= maxIndex && (tagName.equals("*") || tagName.equals(node.element)))
+            {
+                currIndex += 1;
+                currNode = node;
+            }
+        }
+        if (currIndex > maxIndex)
+        {
+            return;
+        }
+
+        node = node.content;
+        while (node != null)
+        {
+            preTraverse(node);
+            node = node.next;
+        }
+    }
+
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/DOMNodeListImpl.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/DOMNodeListImpl.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/DOMNodeListImpl.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,150 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ *  Java HTML Tidy - JTidy
+ *  HTML parser and pretty printer
+ *
+ *  Copyright (c) 1998-2000 World Wide Web Consortium (Massachusetts
+ *  Institute of Technology, Institut National de Recherche en
+ *  Informatique et en Automatique, Keio University). All Rights
+ *  Reserved.
+ *
+ *  Contributing Author(s):
+ *
+ *     Dave Raggett <dsr at w3.org>
+ *     Andy Quick <ac.quick at sympatico.ca> (translation to Java)
+ *     Gary L Peskin <garyp at firstech.com> (Java development)
+ *     Sami Lempinen <sami at lempinen.net> (release management)
+ *     Fabrizio Giustina <fgiust at users.sourceforge.net>
+ *
+ *  The contributing author(s) would like to thank all those who
+ *  helped with testing, bug fixes, and patience.  This wouldn't
+ *  have been possible without all of you.
+ *
+ *  COPYRIGHT NOTICE:
+ * 
+ *  This software and documentation is provided "as is," and
+ *  the copyright holders and contributing author(s) make no
+ *  representations or warranties, express or implied, including
+ *  but not limited to, warranties of merchantability or fitness
+ *  for any particular purpose or that the use of the software or
+ *  documentation will not infringe any third party patents,
+ *  copyrights, trademarks or other rights. 
+ *
+ *  The copyright holders and contributing author(s) will not be
+ *  liable for any direct, indirect, special or consequential damages
+ *  arising out of any use of the software or documentation, even if
+ *  advised of the possibility of such damage.
+ *
+ *  Permission is hereby granted to use, copy, modify, and distribute
+ *  this source code, or portions hereof, documentation and executables,
+ *  for any purpose, without fee, subject to the following restrictions:
+ *
+ *  1. The origin of this source code must not be misrepresented.
+ *  2. Altered versions must be plainly marked as such and must
+ *     not be misrepresented as being the original source.
+ *  3. This Copyright notice may not be removed or altered from any
+ *     source or altered source distribution.
+ * 
+ *  The copyright holders and contributing author(s) specifically
+ *  permit, without fee, and encourage the use of this source code
+ *  as a component for supporting the Hypertext Markup Language in
+ *  commercial products. If you use this source code in a product,
+ *  acknowledgment is not required but would be appreciated.
+ *
+ */
+package org.ajax4jsf.org.w3c.tidy;
+
+/**
+ * DOMNodeListImpl. The items in the <code>NodeList</code> are accessible via an integral index, starting from 0.
+ * @author Dave Raggett <a href="mailto:dsr at w3.org">dsr at w3.org </a>
+ * @author Andy Quick <a href="mailto:ac.quick at sympatico.ca">ac.quick at sympatico.ca </a> (translation to Java)
+ * @author Fabrizio Giustina
+ * @version $Revision: 1.1.2.1 $ ($Author: alexsmirnov $)
+ */
+public class DOMNodeListImpl implements org.w3c.dom.NodeList
+{
+
+    /**
+     * Parent Node.
+     */
+    private Node parent;
+
+    /**
+     * Instantiates a new DOM node list.
+     * @param parent parent Node
+     */
+    protected DOMNodeListImpl(Node parent)
+    {
+        this.parent = parent;
+    }
+
+    /**
+     * @see org.w3c.dom.NodeList#item(int)
+     */
+    public org.w3c.dom.Node item(int index)
+    {
+        if (parent == null)
+        {
+            return null;
+        }
+
+        int i = 0;
+        Node node = this.parent.content;
+        while (node != null)
+        {
+            if (i >= index)
+            {
+                break;
+            }
+            i++;
+            node = node.next;
+        }
+        if (node != null)
+        {
+            return node.getAdapter();
+        }
+
+        return null;
+    }
+
+    /**
+     * @see org.w3c.dom.NodeList#getLength
+     */
+    public int getLength()
+    {
+        if (parent == null)
+        {
+            return 0;
+        }
+
+        int len = 0;
+        Node node = this.parent.content;
+        while (node != null)
+        {
+            len++;
+            node = node.next;
+        }
+        return len;
+    }
+
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/DOMProcessingInstructionImpl.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/DOMProcessingInstructionImpl.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/DOMProcessingInstructionImpl.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,133 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ *  Java HTML Tidy - JTidy
+ *  HTML parser and pretty printer
+ *
+ *  Copyright (c) 1998-2000 World Wide Web Consortium (Massachusetts
+ *  Institute of Technology, Institut National de Recherche en
+ *  Informatique et en Automatique, Keio University). All Rights
+ *  Reserved.
+ *
+ *  Contributing Author(s):
+ *
+ *     Dave Raggett <dsr at w3.org>
+ *     Andy Quick <ac.quick at sympatico.ca> (translation to Java)
+ *     Gary L Peskin <garyp at firstech.com> (Java development)
+ *     Sami Lempinen <sami at lempinen.net> (release management)
+ *     Fabrizio Giustina <fgiust at users.sourceforge.net>
+ *
+ *  The contributing author(s) would like to thank all those who
+ *  helped with testing, bug fixes, and patience.  This wouldn't
+ *  have been possible without all of you.
+ *
+ *  COPYRIGHT NOTICE:
+ * 
+ *  This software and documentation is provided "as is," and
+ *  the copyright holders and contributing author(s) make no
+ *  representations or warranties, express or implied, including
+ *  but not limited to, warranties of merchantability or fitness
+ *  for any particular purpose or that the use of the software or
+ *  documentation will not infringe any third party patents,
+ *  copyrights, trademarks or other rights. 
+ *
+ *  The copyright holders and contributing author(s) will not be
+ *  liable for any direct, indirect, special or consequential damages
+ *  arising out of any use of the software or documentation, even if
+ *  advised of the possibility of such damage.
+ *
+ *  Permission is hereby granted to use, copy, modify, and distribute
+ *  this source code, or portions hereof, documentation and executables,
+ *  for any purpose, without fee, subject to the following restrictions:
+ *
+ *  1. The origin of this source code must not be misrepresented.
+ *  2. Altered versions must be plainly marked as such and must
+ *     not be misrepresented as being the original source.
+ *  3. This Copyright notice may not be removed or altered from any
+ *     source or altered source distribution.
+ * 
+ *  The copyright holders and contributing author(s) specifically
+ *  permit, without fee, and encourage the use of this source code
+ *  as a component for supporting the Hypertext Markup Language in
+ *  commercial products. If you use this source code in a product,
+ *  acknowledgment is not required but would be appreciated.
+ *
+ */
+package org.ajax4jsf.org.w3c.tidy;
+
+import org.ajax4jsf.framework.util.message.Messages;
+import org.w3c.dom.DOMException;
+
+
+/**
+ * DOMProcessingInstructionImpl.
+ * @author Dave Raggett <a href="mailto:dsr at w3.org">dsr at w3.org </a>
+ * @author Andy Quick <a href="mailto:ac.quick at sympatico.ca">ac.quick at sympatico.ca </a> (translation to Java)
+ * @author Fabrizio Giustina
+ * @version $Revision: 1.1.2.1 $ ($Author: alexsmirnov $)
+ */
+public class DOMProcessingInstructionImpl extends DOMNodeImpl implements org.w3c.dom.ProcessingInstruction
+{
+
+    /**
+     * Instantiates a new DOM processing instruction.
+     * @param adaptee wrapped Tidy node
+     */
+    protected DOMProcessingInstructionImpl(Node adaptee)
+    {
+        super(adaptee);
+    }
+
+    /**
+     * @see org.w3c.dom.Node#getNodeType
+     */
+    public short getNodeType()
+    {
+        return org.w3c.dom.Node.PROCESSING_INSTRUCTION_NODE;
+    }
+
+    /**
+     * @todo DOM level 2 getTarget() Not implemented. Returns null.
+     * @see org.w3c.dom.ProcessingInstruction#getTarget
+     */
+    public String getTarget()
+    {
+        return null;
+    }
+
+    /**
+     * @see org.w3c.dom.ProcessingInstruction#getData
+     */
+    public String getData()
+    {
+        return getNodeValue();
+    }
+
+    /**
+     * @see org.w3c.dom.ProcessingInstruction#setData(java.lang.String)
+     */
+    public void setData(String data) throws DOMException
+    {
+        throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, Messages.getMessage(Messages.READ_ONLY_NODE_ERROR));
+    }
+
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/DOMTextImpl.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/DOMTextImpl.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/DOMTextImpl.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,152 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ *  Java HTML Tidy - JTidy
+ *  HTML parser and pretty printer
+ *
+ *  Copyright (c) 1998-2000 World Wide Web Consortium (Massachusetts
+ *  Institute of Technology, Institut National de Recherche en
+ *  Informatique et en Automatique, Keio University). All Rights
+ *  Reserved.
+ *
+ *  Contributing Author(s):
+ *
+ *     Dave Raggett <dsr at w3.org>
+ *     Andy Quick <ac.quick at sympatico.ca> (translation to Java)
+ *     Gary L Peskin <garyp at firstech.com> (Java development)
+ *     Sami Lempinen <sami at lempinen.net> (release management)
+ *     Fabrizio Giustina <fgiust at users.sourceforge.net>
+ *
+ *  The contributing author(s) would like to thank all those who
+ *  helped with testing, bug fixes, and patience.  This wouldn't
+ *  have been possible without all of you.
+ *
+ *  COPYRIGHT NOTICE:
+ * 
+ *  This software and documentation is provided "as is," and
+ *  the copyright holders and contributing author(s) make no
+ *  representations or warranties, express or implied, including
+ *  but not limited to, warranties of merchantability or fitness
+ *  for any particular purpose or that the use of the software or
+ *  documentation will not infringe any third party patents,
+ *  copyrights, trademarks or other rights. 
+ *
+ *  The copyright holders and contributing author(s) will not be
+ *  liable for any direct, indirect, special or consequential damages
+ *  arising out of any use of the software or documentation, even if
+ *  advised of the possibility of such damage.
+ *
+ *  Permission is hereby granted to use, copy, modify, and distribute
+ *  this source code, or portions hereof, documentation and executables,
+ *  for any purpose, without fee, subject to the following restrictions:
+ *
+ *  1. The origin of this source code must not be misrepresented.
+ *  2. Altered versions must be plainly marked as such and must
+ *     not be misrepresented as being the original source.
+ *  3. This Copyright notice may not be removed or altered from any
+ *     source or altered source distribution.
+ * 
+ *  The copyright holders and contributing author(s) specifically
+ *  permit, without fee, and encourage the use of this source code
+ *  as a component for supporting the Hypertext Markup Language in
+ *  commercial products. If you use this source code in a product,
+ *  acknowledgment is not required but would be appreciated.
+ *
+ */
+package org.ajax4jsf.org.w3c.tidy;
+
+import org.ajax4jsf.framework.util.message.Messages;
+import org.w3c.dom.DOMException;
+import org.w3c.dom.Text;
+
+
+/**
+ * DOMTextImpl.
+ * @author Dave Raggett <a href="mailto:dsr at w3.org">dsr at w3.org </a>
+ * @author Andy Quick <a href="mailto:ac.quick at sympatico.ca">ac.quick at sympatico.ca </a> (translation to Java)
+ * @author Fabrizio Giustina
+ * @version $Revision: 1.1.2.1 $ ($Author: alexsmirnov $)
+ */
+public class DOMTextImpl extends DOMCharacterDataImpl implements org.w3c.dom.Text
+{
+
+    /**
+     * Instantiates a new DOM text node.
+     * @param adaptee wrapped Tidy node
+     */
+    protected DOMTextImpl(Node adaptee)
+    {
+        super(adaptee);
+    }
+
+    /**
+     * @see org.w3c.dom.Node#getNodeName
+     */
+    public String getNodeName()
+    {
+        return "#text";
+    }
+
+    /**
+     * @see org.w3c.dom.Node#getNodeType
+     */
+    public short getNodeType()
+    {
+        return org.w3c.dom.Node.TEXT_NODE;
+    }
+
+    /**
+     * @todo DOM level 2 splitText() Not supported. Throws NO_MODIFICATION_ALLOWED_ERR.
+     * @see org.w3c.dom.Text#splitText(int)
+     */
+    public org.w3c.dom.Text splitText(int offset) throws DOMException
+    {
+        throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, Messages.getMessage(Messages.DOM_METHOD_NOT_SUPPORTED));
+    }
+
+    /**
+     * @todo DOM level 3 getWholeText() Not implemented. Returns null.
+     * @see org.w3c.dom.Text#getWholeText()
+     */
+    public String getWholeText()
+    {
+        return null;
+    }
+
+    /**
+     * @todo DOM level 3 isElementContentWhitespace() Not implemented. Returns false.
+     * @see org.w3c.dom.Text#isElementContentWhitespace()
+     */
+    public boolean isElementContentWhitespace()
+    {
+        return false;
+    }
+
+    /**
+     * @todo DOM level 3 replaceWholeText() Not implemented. Returns the same node.
+     * @see org.w3c.dom.Text#isElementContentWhitespace()
+     */
+    public Text replaceWholeText(String content) throws DOMException
+    {
+        return this;
+    }
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/Dict.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/Dict.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/Dict.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,427 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ *  Java HTML Tidy - JTidy
+ *  HTML parser and pretty printer
+ *
+ *  Copyright (c) 1998-2000 World Wide Web Consortium (Massachusetts
+ *  Institute of Technology, Institut National de Recherche en
+ *  Informatique et en Automatique, Keio University). All Rights
+ *  Reserved.
+ *
+ *  Contributing Author(s):
+ *
+ *     Dave Raggett <dsr at w3.org>
+ *     Andy Quick <ac.quick at sympatico.ca> (translation to Java)
+ *     Gary L Peskin <garyp at firstech.com> (Java development)
+ *     Sami Lempinen <sami at lempinen.net> (release management)
+ *     Fabrizio Giustina <fgiust at users.sourceforge.net>
+ *
+ *  The contributing author(s) would like to thank all those who
+ *  helped with testing, bug fixes, and patience.  This wouldn't
+ *  have been possible without all of you.
+ *
+ *  COPYRIGHT NOTICE:
+ * 
+ *  This software and documentation is provided "as is," and
+ *  the copyright holders and contributing author(s) make no
+ *  representations or warranties, express or implied, including
+ *  but not limited to, warranties of merchantability or fitness
+ *  for any particular purpose or that the use of the software or
+ *  documentation will not infringe any third party patents,
+ *  copyrights, trademarks or other rights. 
+ *
+ *  The copyright holders and contributing author(s) will not be
+ *  liable for any direct, indirect, special or consequential damages
+ *  arising out of any use of the software or documentation, even if
+ *  advised of the possibility of such damage.
+ *
+ *  Permission is hereby granted to use, copy, modify, and distribute
+ *  this source code, or portions hereof, documentation and executables,
+ *  for any purpose, without fee, subject to the following restrictions:
+ *
+ *  1. The origin of this source code must not be misrepresented.
+ *  2. Altered versions must be plainly marked as such and must
+ *     not be misrepresented as being the original source.
+ *  3. This Copyright notice may not be removed or altered from any
+ *     source or altered source distribution.
+ * 
+ *  The copyright holders and contributing author(s) specifically
+ *  permit, without fee, and encourage the use of this source code
+ *  as a component for supporting the Hypertext Markup Language in
+ *  commercial products. If you use this source code in a product,
+ *  acknowledgment is not required but would be appreciated.
+ *
+ */
+package org.ajax4jsf.org.w3c.tidy;
+
+/**
+ * Tag dictionary node. If the document uses just HTML 2.0 tags and attributes described it as HTML 2.0 Similarly for
+ * HTML 3.2 and the 3 flavors of HTML 4.0. If there are proprietary tags and attributes then describe it as HTML
+ * Proprietary. If it includes the xml-lang or xmlns attributes but is otherwise HTML 2.0, 3.2 or 4.0 then describe it
+ * as one of the flavors of Voyager (strict, loose or frameset).
+ * @author Dave Raggett <a href="mailto:dsr at w3.org">dsr at w3.org </a>
+ * @author Andy Quick <a href="mailto:ac.quick at sympatico.ca">ac.quick at sympatico.ca </a> (translation to Java)
+ * @author Fabrizio Giustina
+ * @version $Revision: 1.1.2.1 $ ($Author: alexsmirnov $)
+ */
+public class Dict
+{
+
+    /**
+     * Content model: unknown.
+     */
+    public static final int CM_UNKNOWN = 0;
+
+    /**
+     * Content model: empty.
+     */
+    public static final int CM_EMPTY = (1 << 0);
+
+    /**
+     * Content model: html.
+     */
+    public static final int CM_HTML = (1 << 1);
+
+    /**
+     * Content model: head.
+     */
+    public static final int CM_HEAD = (1 << 2);
+
+    /**
+     * Content model: block.
+     */
+    public static final int CM_BLOCK = (1 << 3);
+
+    /**
+     * Content model: inline.
+     */
+    public static final int CM_INLINE = (1 << 4);
+
+    /**
+     * Content model: list.
+     */
+    public static final int CM_LIST = (1 << 5);
+
+    /**
+     * Content model: definition list.
+     */
+    public static final int CM_DEFLIST = (1 << 6);
+
+    /**
+     * Content model: table.
+     */
+    public static final int CM_TABLE = (1 << 7);
+
+    /**
+     * Content model: rowgroup.
+     */
+    public static final int CM_ROWGRP = (1 << 8);
+
+    /**
+     * Content model: row.
+     */
+    public static final int CM_ROW = (1 << 9);
+
+    /**
+     * Content model: field.
+     */
+    public static final int CM_FIELD = (1 << 10);
+
+    /**
+     * Content model: object.
+     */
+    public static final int CM_OBJECT = (1 << 11);
+
+    /**
+     * Content model: param.
+     */
+    public static final int CM_PARAM = (1 << 12);
+
+    /**
+     * Content model: frames.
+     */
+    public static final int CM_FRAMES = (1 << 13);
+
+    /**
+     * Content model: heading.
+     */
+    public static final int CM_HEADING = (1 << 14);
+
+    /**
+     * Content model: opt.
+     */
+    public static final int CM_OPT = (1 << 15);
+
+    /**
+     * Content model: img.
+     */
+    public static final int CM_IMG = (1 << 16);
+
+    /**
+     * Content model: mixed.
+     */
+    public static final int CM_MIXED = (1 << 17);
+
+    /**
+     * Content model: no indent.
+     */
+    public static final int CM_NO_INDENT = (1 << 18);
+
+    /**
+     * Content model: obsolete.
+     */
+    public static final int CM_OBSOLETE = (1 << 19);
+
+    /**
+     * Content model: new.
+     */
+    public static final int CM_NEW = (1 << 20);
+
+    /**
+     * Content model: omitst.
+     */
+    public static final int CM_OMITST = (1 << 21);
+
+    /**
+     * Version: unknown.
+     */
+    public static final short VERS_UNKNOWN = 0;
+
+    /**
+     * Version: html 2.0.
+     */
+    public static final short VERS_HTML20 = 1;
+
+    /**
+     * Version: html 3.2.
+     */
+    public static final short VERS_HTML32 = 2;
+
+    /**
+     * Version: html 4.0 strict.
+     */
+    public static final short VERS_HTML40_STRICT = 4;
+
+    /**
+     * Version: html 4.0 transitional.
+     */
+    public static final short VERS_HTML40_LOOSE = 8;
+
+    /**
+     * Version: html 4.0 frameset.
+     */
+    public static final short VERS_FRAMESET = 16;
+
+    /**
+     * Version: xml.
+     */
+    public static final short VERS_XML = 32;
+
+    /**
+     * Version: netscape.
+     */
+    public static final short VERS_NETSCAPE = 64;
+
+    /**
+     * Version: microsoft.
+     */
+    public static final short VERS_MICROSOFT = 128;
+
+    /**
+     * Version: sun.
+     */
+    public static final short VERS_SUN = 256;
+
+    /**
+     * Version: malformed.
+     */
+    public static final short VERS_MALFORMED = 512;
+
+    /**
+     * Version: xhtml 1.1.
+     */
+    public static final short VERS_XHTML11 = 1024;
+
+    /**
+     * Version: xhtml basic.
+     */
+    public static final short VERS_BASIC = 2048;
+
+    /**
+     * all tags and attributes are ok in proprietary version of HTML.
+     */
+    public static final short VERS_PROPRIETARY = (VERS_NETSCAPE | VERS_MICROSOFT | VERS_SUN);
+
+    /**
+     * tags/attrs in HTML4 but not in earlier version.
+     */
+    public static final short VERS_HTML40 = (VERS_HTML40_STRICT | VERS_HTML40_LOOSE | VERS_FRAMESET);
+
+    /**
+     * tags/attrs which are in all versions of HTML except strict.
+     */
+    public static final short VERS_LOOSE = (VERS_HTML32 | VERS_HTML40_LOOSE | VERS_FRAMESET);
+
+    /**
+     * tags/attrs in HTML 4 loose and frameset.
+     */
+    public static final short VERS_IFRAME = (VERS_HTML40_LOOSE | VERS_FRAMESET);
+
+    /**
+     * tags/attrs in all versions from HTML 3.2 onwards.
+     */
+    public static final short VERS_FROM32 = (VERS_HTML40_STRICT | VERS_LOOSE);
+
+    /**
+     * versions with on... attributes.
+     */
+    public static final short VERS_EVENTS = (VERS_HTML40 | VERS_XHTML11);
+
+    /**
+     * tags/attrs in any version.
+     */
+    public static final short VERS_ALL = (VERS_HTML20 | VERS_HTML32 | VERS_HTML40 | VERS_XHTML11 | VERS_BASIC);
+
+    /**
+     * types of tags that the user can define: empty tag.
+     */
+    public static final short TAGTYPE_EMPTY = 1;
+
+    /**
+     * types of tags that the user can define: inline tag.
+     */
+    public static final short TAGTYPE_INLINE = 2;
+
+    /**
+     * types of tags that the user can define: block tag.
+     */
+    public static final short TAGTYPE_BLOCK = 4;
+
+    /**
+     * types of tags that the user can define: pre tag.
+     */
+    public static final short TAGTYPE_PRE = 8;
+
+    /**
+     * Tag name.
+     */
+    protected String name;
+
+    /**
+     * Version in which this tag is defined.
+     */
+    protected short versions;
+
+    /**
+     * model (CM_* constants).
+     */
+    protected int model;
+
+    /**
+     * Parser for this tag.
+     */
+    private Parser parser;
+
+    /**
+     * Validator for this tag.
+     */
+    private TagCheck chkattrs;
+
+    /**
+     * Instantiates a new Tag definition.
+     * @param name tag name
+     * @param versions version in which this tag is defined
+     * @param model model (CM_* constants)
+     * @param parser parser for this tag
+     * @param chkattrs validator for this tag (can be null)
+     */
+    public Dict(String name, short versions, int model, Parser parser, TagCheck chkattrs)
+    {
+        this.name = name;
+        this.versions = versions;
+        this.model = model;
+        this.parser = parser;
+        this.chkattrs = chkattrs;
+    }
+
+    /**
+     * Getter for <code>chkattrs</code>.
+     * @return Returns the chkattrs.
+     */
+    public TagCheck getChkattrs()
+    {
+        return this.chkattrs;
+    }
+
+    /**
+     * Getter for <code>model</code>.
+     * @return Returns the model.
+     */
+    public int getModel()
+    {
+        return this.model;
+    }
+
+    /**
+     * Getter for <code>name</code>.
+     * @return Returns the name.
+     */
+    public String getName()
+    {
+        return this.name;
+    }
+
+    /**
+     * Getter for <code>parser</code>.
+     * @return Returns the parser.
+     */
+    public Parser getParser()
+    {
+        return this.parser;
+    }
+
+    /**
+     * Setter for <code>chkattrs</code>.
+     * @param chkattrs The chkattrs to set.
+     */
+    public void setChkattrs(TagCheck chkattrs)
+    {
+        this.chkattrs = chkattrs;
+    }
+    /**
+     * Getter for <code>versions</code>.
+     * @return Returns the versions.
+     */
+    public short getVersions()
+    {
+        return this.versions;
+    }
+    /**
+     * Setter for <code>parser</code>.
+     * @param parser The parser to set.
+     */
+    public void setParser(Parser parser)
+    {
+        this.parser = parser;
+    }
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/EncodingNameMapper.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/EncodingNameMapper.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/EncodingNameMapper.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,377 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ *  Java HTML Tidy - JTidy
+ *  HTML parser and pretty printer
+ *
+ *  Copyright (c) 1998-2000 World Wide Web Consortium (Massachusetts
+ *  Institute of Technology, Institut National de Recherche en
+ *  Informatique et en Automatique, Keio University). All Rights
+ *  Reserved.
+ *
+ *  Contributing Author(s):
+ *
+ *     Dave Raggett <dsr at w3.org>
+ *     Andy Quick <ac.quick at sympatico.ca> (translation to Java)
+ *     Gary L Peskin <garyp at firstech.com> (Java development)
+ *     Sami Lempinen <sami at lempinen.net> (release management)
+ *     Fabrizio Giustina <fgiust at users.sourceforge.net>
+ *
+ *  The contributing author(s) would like to thank all those who
+ *  helped with testing, bug fixes, and patience.  This wouldn't
+ *  have been possible without all of you.
+ *
+ *  COPYRIGHT NOTICE:
+ * 
+ *  This software and documentation is provided "as is," and
+ *  the copyright holders and contributing author(s) make no
+ *  representations or warranties, express or implied, including
+ *  but not limited to, warranties of merchantability or fitness
+ *  for any particular purpose or that the use of the software or
+ *  documentation will not infringe any third party patents,
+ *  copyrights, trademarks or other rights. 
+ *
+ *  The copyright holders and contributing author(s) will not be
+ *  liable for any direct, indirect, special or consequential damages
+ *  arising out of any use of the software or documentation, even if
+ *  advised of the possibility of such damage.
+ *
+ *  Permission is hereby granted to use, copy, modify, and distribute
+ *  this source code, or portions hereof, documentation and executables,
+ *  for any purpose, without fee, subject to the following restrictions:
+ *
+ *  1. The origin of this source code must not be misrepresented.
+ *  2. Altered versions must be plainly marked as such and must
+ *     not be misrepresented as being the original source.
+ *  3. This Copyright notice may not be removed or altered from any
+ *     source or altered source distribution.
+ * 
+ *  The copyright holders and contributing author(s) specifically
+ *  permit, without fee, and encourage the use of this source code
+ *  as a component for supporting the Hypertext Markup Language in
+ *  commercial products. If you use this source code in a product,
+ *  acknowledgment is not required but would be appreciated.
+ *
+ */
+package org.ajax4jsf.org.w3c.tidy;
+
+import java.util.HashMap;
+import java.util.Map;
+
+
+/**
+ * Maps between Java and IANA character encoding names. Also handles encoding alias used in tidy c.
+ * @author Fabrizio Giustina
+ * @version $Revision: 1.1.2.1 $ ($Author: alexsmirnov $)
+ * @see http://www.iana.org/assignments/character-sets
+ */
+public abstract class EncodingNameMapper
+{
+
+    /**
+     * Map containing uppercase alias - {standard iana, standard java}.
+     */
+    private static Map encodingNameMap = new HashMap();
+
+    static
+    {
+        encodingNameMap.put("ISO-8859-1", new String[]{"ISO-8859-1", "ISO8859_1"});
+        encodingNameMap.put("ISO8859_1", new String[]{"ISO-8859-1", "ISO8859_1"});
+        encodingNameMap.put("ISO-IR-100", new String[]{"ISO-8859-1", "ISO8859_1"});
+        encodingNameMap.put("LATIN1", new String[]{"ISO-8859-1", "ISO8859_1"});
+        encodingNameMap.put("CSISOLATIN1", new String[]{"ISO-8859-1", "ISO8859_1"});
+        encodingNameMap.put("L1", new String[]{"ISO-8859-1", "ISO8859_1"});
+        encodingNameMap.put("819", new String[]{"ISO-8859-1", "ISO8859_1"});
+
+        encodingNameMap.put("US-ASCII", new String[]{"US-ASCII", "ASCII"});
+        encodingNameMap.put("ASCII", new String[]{"US-ASCII", "ASCII"});
+        encodingNameMap.put("ISO-IR-6", new String[]{"US-ASCII", "ASCII"});
+        encodingNameMap.put("CSASCII", new String[]{"US-ASCII", "ASCII"});
+        encodingNameMap.put("ISO646-US", new String[]{"US-ASCII", "ASCII"});
+        encodingNameMap.put("US", new String[]{"US-ASCII", "ASCII"});
+        encodingNameMap.put("367", new String[]{"US-ASCII", "ASCII"});
+
+        encodingNameMap.put("UTF-8", new String[]{"UTF-8", "UTF8"});
+        encodingNameMap.put("UTF8", new String[]{"UTF-8", "UTF8"});
+        encodingNameMap.put("UTF-16", new String[]{"UTF-16", "Unicode"});
+        encodingNameMap.put("UNICODE", new String[]{"UTF-16", "Unicode"});
+        encodingNameMap.put("UTF16", new String[]{"UTF-16", "Unicode"});
+        encodingNameMap.put("UTF16", new String[]{"UTF-16", "Unicode"}); // tidy
+
+        encodingNameMap.put("UTF-16BE", new String[]{"UTF-16BE", "UnicodeBig"});
+        encodingNameMap.put("UNICODEBIG", new String[]{"UTF-16BE", "UnicodeBig"});
+        encodingNameMap.put("UTF16-BE", new String[]{"UTF-16BE", "UnicodeBig"});
+        encodingNameMap.put("UTF-16LE", new String[]{"UTF-16LE", "UnicodeLittle"});
+        encodingNameMap.put("UNICODELITTLE", new String[]{"UTF-16LE", "UnicodeLittle"});
+        encodingNameMap.put("UTF16-LE", new String[]{"UTF-16LE", "UnicodeLittle"});
+        encodingNameMap.put("UTF16BE", new String[]{"UTF-16BE", "UnicodeBig"}); // tidy
+        encodingNameMap.put("UTF16LE", new String[]{"UTF-16LE", "UnicodeLittle"}); // tidy
+
+        encodingNameMap.put("BIG5", new String[]{"BIG5", "Big5"});
+        encodingNameMap.put("CSBIG5", new String[]{"BIG5", "Big5"});
+
+        encodingNameMap.put("SJIS", new String[]{"SHIFT_JIS", "SJIS"});
+        encodingNameMap.put("SHIFT_JIS", new String[]{"SHIFT_JIS", "SJIS"});
+        encodingNameMap.put("CSSHIFTJIS", new String[]{"CSSHIFTJIS", "SJIS"});
+        encodingNameMap.put("MS_KANJI", new String[]{"MS_KANJI", "SJIS"});
+        encodingNameMap.put("SHIFTJIS", new String[]{"SHIFT_JIS", "SJIS"}); // tidy
+
+        encodingNameMap.put("JIS", new String[]{"ISO-2022-JP", "JIS"});
+        encodingNameMap.put("ISO-2022-JP", new String[]{"ISO-2022-JP", "JIS"});
+        encodingNameMap.put("CSISO2022JP", new String[]{"CSISO2022JP", "JIS"});
+        encodingNameMap.put("ISO2022", new String[]{"ISO-2022-JP", "JIS"}); // tidy
+
+        encodingNameMap.put("ISO2022KR", new String[]{"ISO-2022-KR", "ISO2022KR"});
+        encodingNameMap.put("ISO-2022-KR", new String[]{"ISO-2022-KR", "ISO2022KR"});
+        encodingNameMap.put("CSISO2022KR", new String[]{"CSISO2022KR", "ISO2022KR"});
+        encodingNameMap.put("ISO-2022-CN", new String[]{"ISO-2022-CN", "ISO2022CN"});
+        encodingNameMap.put("ISO2022CN", new String[]{"ISO-2022-CN", "ISO2022CN"});
+
+        encodingNameMap.put("MACROMAN", new String[]{"macintosh", "MacRoman"}); // tidy
+        encodingNameMap.put("MACINTOSH", new String[]{"macintosh", "MacRoman"});
+        encodingNameMap.put("MACINTOSH ROMAN", new String[]{"macintosh", "MacRoman"});
+
+        encodingNameMap.put("37", new String[]{"IBM037", "CP037"});
+        encodingNameMap.put("273", new String[]{"IBM273", "CP273"});
+        encodingNameMap.put("277", new String[]{"IBM277", "CP277"});
+        encodingNameMap.put("278", new String[]{"IBM278", "CP278"});
+        encodingNameMap.put("280", new String[]{"IBM280", "CP280"});
+        encodingNameMap.put("284", new String[]{"IBM284", "CP284"});
+        encodingNameMap.put("285", new String[]{"IBM285", "CP285"});
+        encodingNameMap.put("290", new String[]{"IBM290", "CP290"});
+        encodingNameMap.put("297", new String[]{"IBM297", "CP297"});
+        encodingNameMap.put("420", new String[]{"IBM420", "CP420"});
+        encodingNameMap.put("424", new String[]{"IBM424", "CP424"});
+        encodingNameMap.put("437", new String[]{"IBM437", "CP437"});
+        encodingNameMap.put("500", new String[]{"IBM500", "CP500"});
+        encodingNameMap.put("775", new String[]{"IBM775", "CP775"});
+        encodingNameMap.put("850", new String[]{"IBM850", "CP850"});
+        encodingNameMap.put("852", new String[]{"IBM852", "CP852"});
+        encodingNameMap.put("CSPCP852", new String[]{"IBM852", "CP852"});
+        encodingNameMap.put("855", new String[]{"IBM855", "CP855"});
+        encodingNameMap.put("857", new String[]{"IBM857", "CP857"});
+        encodingNameMap.put("858", new String[]{"IBM00858", "Cp858"});
+        encodingNameMap.put("0858", new String[]{"IBM00858", "Cp858"});
+        encodingNameMap.put("860", new String[]{"IBM860", "CP860"});
+        encodingNameMap.put("861", new String[]{"IBM861", "CP861"});
+        encodingNameMap.put("IS", new String[]{"IBM861", "CP861"});
+        encodingNameMap.put("862", new String[]{"IBM862", "CP862"});
+        encodingNameMap.put("863", new String[]{"IBM863", "CP863"});
+        encodingNameMap.put("864", new String[]{"IBM864", "CP864"});
+        encodingNameMap.put("865", new String[]{"IBM865", "CP865"});
+        encodingNameMap.put("866", new String[]{"IBM866", "CP866"});
+        encodingNameMap.put("868", new String[]{"IBM868", "CP868"});
+        encodingNameMap.put("AR", new String[]{"IBM868", "CP868"});
+        encodingNameMap.put("869", new String[]{"IBM869", "CP869"});
+        encodingNameMap.put("GR", new String[]{"IBM869", "CP869"});
+        encodingNameMap.put("870", new String[]{"IBM870", "CP870"});
+        encodingNameMap.put("871", new String[]{"IBM871", "CP871"});
+        encodingNameMap.put("EBCDIC-CP-IS", new String[]{"IBM871", "CP871"});
+        encodingNameMap.put("918", new String[]{"CP918", "CP918"});
+        encodingNameMap.put("924", new String[]{"IBM00924", "CP924"});
+        encodingNameMap.put("0924", new String[]{"IBM00924", "CP924"});
+        encodingNameMap.put("1026", new String[]{"IBM1026", "CP1026"});
+        encodingNameMap.put("1047", new String[]{"IBM1047", "Cp1047"});
+        encodingNameMap.put("1140", new String[]{"IBM01140", "Cp1140"});
+        encodingNameMap.put("1141", new String[]{"IBM01141", "Cp1141"});
+        encodingNameMap.put("1142", new String[]{"IBM01142", "Cp1142"});
+        encodingNameMap.put("1143", new String[]{"IBM01143", "Cp1143"});
+        encodingNameMap.put("1144", new String[]{"IBM01144", "Cp1144"});
+        encodingNameMap.put("1145", new String[]{"IBM01145", "Cp1145"});
+        encodingNameMap.put("1146", new String[]{"IBM01146", "Cp1146"});
+        encodingNameMap.put("1147", new String[]{"IBM01147", "Cp1147"});
+        encodingNameMap.put("1148", new String[]{"IBM01148", "Cp1148"});
+        encodingNameMap.put("1149", new String[]{"IBM01149", "Cp1149"});
+        encodingNameMap.put("1250", new String[]{"WINDOWS-1250", "Cp1250"});
+        encodingNameMap.put("1251", new String[]{"WINDOWS-1251", "Cp1251"});
+        encodingNameMap.put("1252", new String[]{"WINDOWS-1252", "Cp1252"});
+        encodingNameMap.put("WIN1252", new String[]{"WINDOWS-1252", "Cp1252"}); // tidy
+        encodingNameMap.put("1253", new String[]{"WINDOWS-1253", "Cp1253"});
+        encodingNameMap.put("1254", new String[]{"WINDOWS-1254", "Cp1254"});
+        encodingNameMap.put("1255", new String[]{"WINDOWS-1255", "Cp1255"});
+        encodingNameMap.put("1256", new String[]{"WINDOWS-1256", "Cp1256"});
+        encodingNameMap.put("1257", new String[]{"WINDOWS-1257", "Cp1257"});
+        encodingNameMap.put("1258", new String[]{"WINDOWS-1258", "Cp1258"});
+
+        encodingNameMap.put("EUC-JP", new String[]{"EUC-JP", "EUCJIS"});
+        encodingNameMap.put("EUCJIS", new String[]{"EUC-JP", "EUCJIS"});
+        encodingNameMap.put("EUC-KR", new String[]{"EUC-KR", "KSC5601"});
+        encodingNameMap.put("KSC5601", new String[]{"EUC-KR", "KSC5601"});
+        encodingNameMap.put("GB2312", new String[]{"GB2312", "GB2312"});
+        encodingNameMap.put("CSGB2312", new String[]{"GB2312", "GB2312"});
+        encodingNameMap.put("X0201", new String[]{"X0201", "JIS0201"});
+        encodingNameMap.put("JIS0201", new String[]{"X0201", "JIS0201"});
+        encodingNameMap.put("X0208", new String[]{"X0208", "JIS0208"});
+        encodingNameMap.put("JIS0208", new String[]{"X0208", "JIS0208"});
+        encodingNameMap.put("ISO-IR-87", new String[]{"ISO-IR-87", "JIS0208"});
+        encodingNameMap.put("JIS0208", new String[]{"ISO-IR-87", "JIS0208"});
+        encodingNameMap.put("X0212", new String[]{"X0212", "JIS0212"});
+        encodingNameMap.put("JIS0212", new String[]{"X0212", "JIS0212"});
+        encodingNameMap.put("ISO-IR-159", new String[]{"X0212", "JIS0212"});
+        encodingNameMap.put("GB18030", new String[]{"GB18030", "GB18030"});
+
+        encodingNameMap.put("936", new String[]{"GBK", "GBK"});
+        encodingNameMap.put("MS936", new String[]{"GBK", "GBK"});
+
+        encodingNameMap.put("MS932", new String[]{"WINDOWS-31J", "MS932"});
+        encodingNameMap.put("WINDOWS-31J", new String[]{"WINDOWS-31J", "MS932"});
+        encodingNameMap.put("CSWINDOWS31J", new String[]{"WINDOWS-31J", "MS932"});
+        encodingNameMap.put("TIS-620", new String[]{"TIS-620", "TIS620"});
+        encodingNameMap.put("TIS620", new String[]{"TIS-620", "TIS620"});
+
+        encodingNameMap.put("ISO-8859-2", new String[]{"ISO-8859-2", "ISO8859_2"});
+        encodingNameMap.put("ISO8859_2", new String[]{"ISO-8859-2", "ISO8859_2"});
+        encodingNameMap.put("ISO-IR-101", new String[]{"ISO-8859-2", "ISO8859_2"});
+        encodingNameMap.put("LATIN2", new String[]{"ISO-8859-2", "ISO8859_2"});
+        encodingNameMap.put("L2", new String[]{"ISO-8859-2", "ISO8859_2"});
+
+        encodingNameMap.put("ISO-8859-3", new String[]{"ISO-8859-3", "ISO8859_3"});
+        encodingNameMap.put("ISO8859_3", new String[]{"ISO-8859-3", "ISO8859_3"});
+        encodingNameMap.put("ISO-IR-109", new String[]{"ISO-8859-3", "ISO8859_3"});
+        encodingNameMap.put("LATIN3", new String[]{"ISO-8859-3", "ISO8859_3"});
+        encodingNameMap.put("L3", new String[]{"ISO-8859-3", "ISO8859_3"});
+
+        encodingNameMap.put("ISO-8859-4", new String[]{"ISO-8859-4", "ISO8859_4"});
+        encodingNameMap.put("ISO8859_4", new String[]{"ISO-8859-4", "ISO8859_4"});
+        encodingNameMap.put("ISO-IR-110", new String[]{"ISO-8859-4", "ISO8859_4"});
+        encodingNameMap.put("ISO-IR-110", new String[]{"ISO-8859-4", "ISO8859_4"});
+        encodingNameMap.put("L4", new String[]{"ISO-8859-4", "ISO8859_4"});
+
+        encodingNameMap.put("ISO-8859-5", new String[]{"ISO-8859-5", "ISO8859_5"});
+        encodingNameMap.put("ISO8859_5", new String[]{"ISO-8859-5", "ISO8859_5"});
+        encodingNameMap.put("ISO-IR-144", new String[]{"ISO-8859-5", "ISO8859_5"});
+        encodingNameMap.put("CYRILLIC", new String[]{"ISO-8859-5", "ISO8859_5"});
+
+        encodingNameMap.put("ISO-8859-6", new String[]{"ISO-8859-6", "ISO8859_6"});
+        encodingNameMap.put("ISO8859_6", new String[]{"ISO-8859-6", "ISO8859_6"});
+        encodingNameMap.put("ISO-IR-127", new String[]{"ISO-8859-6", "ISO8859_6"});
+        encodingNameMap.put("ARABIC", new String[]{"ISO-8859-6", "ISO8859_6"});
+
+        encodingNameMap.put("ISO-8859-7", new String[]{"ISO-8859-7", "ISO8859_7"});
+        encodingNameMap.put("ISO8859_7", new String[]{"ISO-8859-7", "ISO8859_7"});
+        encodingNameMap.put("ISO-IR-126", new String[]{"ISO-8859-7", "ISO8859_7"});
+        encodingNameMap.put("GREEK", new String[]{"ISO-8859-7", "ISO8859_7"});
+
+        encodingNameMap.put("ISO-8859-8", new String[]{"ISO-8859-8", "ISO8859_8"});
+        encodingNameMap.put("ISO8859_8", new String[]{"ISO-8859-8", "ISO8859_8"});
+        encodingNameMap.put("ISO-8859-8-I", new String[]{"ISO-8859-8", "ISO8859_8"});
+        encodingNameMap.put("ISO-IR-138", new String[]{"ISO-8859-8", "ISO8859_8"});
+        encodingNameMap.put("HEBREW", new String[]{"ISO-8859-8", "ISO8859_8"});
+
+        encodingNameMap.put("ISO-8859-9", new String[]{"ISO-8859-9", "ISO8859_8"});
+        encodingNameMap.put("ISO8859_8", new String[]{"ISO-8859-9", "ISO8859_8"});
+        encodingNameMap.put("CSISOLATINHEBREW", new String[]{"ISO-8859-9", "ISO8859_9"});
+        encodingNameMap.put("ISO-IR-148", new String[]{"ISO-8859-9", "ISO8859_9"});
+        encodingNameMap.put("LATIN5", new String[]{"ISO-8859-9", "ISO8859_9"});
+        encodingNameMap.put("CSISOLATIN5", new String[]{"ISO-8859-9", "ISO8859_9"});
+        encodingNameMap.put("L5", new String[]{"ISO-8859-9", "ISO8859_9"});
+
+        encodingNameMap.put("ISO-8859-15", new String[]{"ISO-8859-15", "ISO8859_15"});
+        encodingNameMap.put("ISO8859_15", new String[]{"ISO-8859-15", "ISO8859_15"});
+
+        encodingNameMap.put("KOI8-R", new String[]{"KOI8-R", "KOI8_R"});
+        encodingNameMap.put("KOI8_R", new String[]{"CSKOI8R", "KOI8_R"});
+        encodingNameMap.put("CSKOI8R", new String[]{"CSKOI8R", "KOI8_R"});
+    }
+
+    /**
+     * Convert a Java character encoding name to its IANA equivalent.
+     * @param encoding java encoding name or alias
+     * @return iana equivalent or null if no match is found.
+     */
+    public static String toIana(String encoding)
+    {
+        if (encoding == null)
+        {
+            return null;
+        }
+
+        String[] values = (String[]) encodingNameMap.get(handlecommonAlias(encoding));
+        if (values != null)
+        {
+            return values[0];
+        }
+
+        return null;
+    }
+
+    /**
+     * "Fix" the name for common alias to reduce the number of entries needed in the hashmap. It actually removes CSIBM,
+     * CCSID, IBM-, IBM0, CP-0, IBM, CP0, CP-, CP, WINDOWS- prefixes from given name.
+     * @param encoding encoding name
+     * @return "fixed" encoding.
+     */
+    private static String handlecommonAlias(String encoding)
+    {
+        String key = encoding.toUpperCase();
+
+        // handle common alias
+        if (key.startsWith("CSIBM") || key.startsWith("CCSID"))
+        {
+            key = key.substring(5);
+        }
+        else if (key.startsWith("IBM-") || key.startsWith("IBM0") || key.startsWith("CP-0"))
+        {
+            key = key.substring(4);
+        }
+        else if (key.startsWith("IBM") || key.startsWith("CP0") || key.startsWith("CP-"))
+        {
+            key = key.substring(3);
+        }
+        else if (key.startsWith("CP"))
+        {
+            key = key.substring(2);
+        }
+        else if (key.startsWith("WINDOWS-"))
+        {
+            key = key.substring(8);
+        }
+        else if (key.startsWith("ISO_"))
+        {
+            key = "ISO-" + key.substring(4);
+        }
+
+        return key;
+    }
+
+    /**
+     * Converts an encoding name to the standard java name. Handles IANA names, legacy names used in tidy and different
+     * java encoding alias. See http://www.iana.org/assignments/character-sets.
+     * @param encoding IANA encoding name or alias
+     * @return java equivalent or null if no match is found.
+     */
+    public static String toJava(String encoding)
+    {
+        if (encoding == null)
+        {
+            return null;
+        }
+
+        String[] values = (String[]) encodingNameMap.get(handlecommonAlias(encoding));
+        if (values != null)
+        {
+            return values[1];
+        }
+
+        return null;
+    }
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/EncodingUtils.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/EncodingUtils.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/EncodingUtils.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1028 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ *  Java HTML Tidy - JTidy
+ *  HTML parser and pretty printer
+ *
+ *  Copyright (c) 1998-2000 World Wide Web Consortium (Massachusetts
+ *  Institute of Technology, Institut National de Recherche en
+ *  Informatique et en Automatique, Keio University). All Rights
+ *  Reserved.
+ *
+ *  Contributing Author(s):
+ *
+ *     Dave Raggett <dsr at w3.org>
+ *     Andy Quick <ac.quick at sympatico.ca> (translation to Java)
+ *     Gary L Peskin <garyp at firstech.com> (Java development)
+ *     Sami Lempinen <sami at lempinen.net> (release management)
+ *     Fabrizio Giustina <fgiust at users.sourceforge.net>
+ *
+ *  The contributing author(s) would like to thank all those who
+ *  helped with testing, bug fixes, and patience.  This wouldn't
+ *  have been possible without all of you.
+ *
+ *  COPYRIGHT NOTICE:
+ * 
+ *  This software and documentation is provided "as is," and
+ *  the copyright holders and contributing author(s) make no
+ *  representations or warranties, express or implied, including
+ *  but not limited to, warranties of merchantability or fitness
+ *  for any particular purpose or that the use of the software or
+ *  documentation will not infringe any third party patents,
+ *  copyrights, trademarks or other rights. 
+ *
+ *  The copyright holders and contributing author(s) will not be
+ *  liable for any direct, indirect, special or consequential damages
+ *  arising out of any use of the software or documentation, even if
+ *  advised of the possibility of such damage.
+ *
+ *  Permission is hereby granted to use, copy, modify, and distribute
+ *  this source code, or portions hereof, documentation and executables,
+ *  for any purpose, without fee, subject to the following restrictions:
+ *
+ *  1. The origin of this source code must not be misrepresented.
+ *  2. Altered versions must be plainly marked as such and must
+ *     not be misrepresented as being the original source.
+ *  3. This Copyright notice may not be removed or altered from any
+ *     source or altered source distribution.
+ * 
+ *  The copyright holders and contributing author(s) specifically
+ *  permit, without fee, and encourage the use of this source code
+ *  as a component for supporting the Hypertext Markup Language in
+ *  commercial products. If you use this source code in a product,
+ *  acknowledgment is not required but would be appreciated.
+ *
+ */
+package org.ajax4jsf.org.w3c.tidy;
+
+/**
+ * @author Fabrizio Giustina
+ * @version $Revision: 1.1.2.1 $ ($Author: alexsmirnov $)
+ */
+public final class EncodingUtils
+{
+
+    /**
+     * the big-endian (default) UNICODE BOM.
+     */
+    public static final int UNICODE_BOM_BE = 0xFEFF;
+
+    /**
+     * the default (big-endian) UNICODE BOM.
+     */
+    public static final int UNICODE_BOM = UNICODE_BOM_BE;
+
+    /**
+     * the little-endian UNICODE BOM.
+     */
+    public static final int UNICODE_BOM_LE = 0xFFFE;
+
+    /**
+     * the UTF-8 UNICODE BOM.
+     */
+    public static final int UNICODE_BOM_UTF8 = 0xEFBBBF;
+
+    /**
+     * states for ISO 2022 A document in ISO-2022 based encoding uses some ESC sequences called "designator" to switch
+     * character sets. The designators defined and used in ISO-2022-JP are: "ESC" + "(" + ? for ISO646 variants "ESC" +
+     * "$" + ? and "ESC" + "$" + "(" + ? for multibyte character sets. State ASCII.
+     */
+    public static final int FSM_ASCII = 0;
+
+    /**
+     * state ESC.
+     */
+    public static final int FSM_ESC = 1;
+
+    /**
+     * state ESCD.
+     */
+    public static final int FSM_ESCD = 2;
+
+    /**
+     * state ESCDP.
+     */
+    public static final int FSM_ESCDP = 3;
+
+    /**
+     * state ESCP.
+     */
+    public static final int FSM_ESCP = 4;
+
+    /**
+     * state NONASCII.
+     */
+    public static final int FSM_NONASCII = 5;
+
+    /**
+     * Max UTF-88 valid char value.
+     */
+    public static final int MAX_UTF8_FROM_UCS4 = 0x10FFFF;
+
+    /**
+     * Max UTF-16 value.
+     */
+    public static final int MAX_UTF16_FROM_UCS4 = 0x10FFFF;
+
+    /**
+     * utf16 low surrogate.
+     */
+    public static final int LOW_UTF16_SURROGATE = 0xD800;
+
+    /**
+     * UTF-16 surrogates begin.
+     */
+    public static final int UTF16_SURROGATES_BEGIN = 0x10000;
+
+    /**
+     * UTF-16 surrogate pair areas: low surrogates begin.
+     */
+    public static final int UTF16_LOW_SURROGATE_BEGIN = 0xD800;
+
+    /**
+     * UTF-16 surrogate pair areas: low surrogates end.
+     */
+    public static final int UTF16_LOW_SURROGATE_END = 0xDBFF;
+
+    /**
+     * UTF-16 surrogate pair areas: high surrogates begin.
+     */
+    public static final int UTF16_HIGH_SURROGATE_BEGIN = 0xDC00;
+
+    /**
+     * UTF-16 surrogate pair areas: high surrogates end.
+     */
+    public static final int UTF16_HIGH_SURROGATE_END = 0xDFFF;
+
+    /**
+     * UTF-16 high surrogate.
+     */
+    public static final int HIGH_UTF16_SURROGATE = 0xDFFF;
+
+    /**
+     * UTF-8 bye swap: invalid char.
+     */
+    private static final int UTF8_BYTE_SWAP_NOT_A_CHAR = 0xFFFE;
+
+    /**
+     * UTF-8 invalid char.
+     */
+    private static final int UTF8_NOT_A_CHAR = 0xFFFF;
+
+    /**
+     * Mapping for Windows Western character set (128-159) to Unicode.
+     */
+    private static final int[] WIN2UNICODE = {
+        0x20AC,
+        0x0000,
+        0x201A,
+        0x0192,
+        0x201E,
+        0x2026,
+        0x2020,
+        0x2021,
+        0x02C6,
+        0x2030,
+        0x0160,
+        0x2039,
+        0x0152,
+        0x0000,
+        0x017D,
+        0x0000,
+        0x0000,
+        0x2018,
+        0x2019,
+        0x201C,
+        0x201D,
+        0x2022,
+        0x2013,
+        0x2014,
+        0x02DC,
+        0x2122,
+        0x0161,
+        0x203A,
+        0x0153,
+        0x0000,
+        0x017E,
+        0x0178};
+
+    /**
+     * John Love-Jensen contributed this table for mapping MacRoman character set to Unicode.
+     */
+    private static final int[] MAC2UNICODE = { // modified to only need chars 128-255/U+0080-U+00FF Terry T 19 Aug 01
+        // x7F = DEL
+        0x00C4,
+        0x00C5,
+        0x00C7,
+        0x00C9,
+        0x00D1,
+        0x00D6,
+        0x00DC,
+        0x00E1,
+        0x00E0,
+        0x00E2,
+        0x00E4,
+        0x00E3,
+        0x00E5,
+        0x00E7,
+        0x00E9,
+        0x00E8,
+        0x00EA,
+        0x00EB,
+        0x00ED,
+        0x00EC,
+        0x00EE,
+        0x00EF,
+        0x00F1,
+        0x00F3,
+        0x00F2,
+        0x00F4,
+        0x00F6,
+        0x00F5,
+        0x00FA,
+        0x00F9,
+        0x00FB,
+        0x00FC,
+        0x2020,
+        0x00B0,
+        0x00A2,
+        0x00A3,
+        0x00A7,
+        0x2022,
+        0x00B6,
+        0x00DF,
+        0x00AE,
+        0x00A9,
+        0x2122,
+        0x00B4,
+        0x00A8,
+        0x2260,
+        0x00C6,
+        0x00D8,
+        0x221E,
+        0x00B1,
+        0x2264,
+        0x2265,
+        0x00A5,
+        0x00B5,
+        0x2202,
+        0x2211,
+        // =BD U+2126 OHM SIGN
+        0x220F,
+        0x03C0,
+        0x222B,
+        0x00AA,
+        0x00BA,
+        0x03A9,
+        0x00E6,
+        0x00F8,
+        0x00BF,
+        0x00A1,
+        0x00AC,
+        0x221A,
+        0x0192,
+        0x2248,
+        0x2206,
+        0x00AB,
+        0x00BB,
+        0x2026,
+        0x00A0,
+        0x00C0,
+        0x00C3,
+        0x00D5,
+        0x0152,
+        0x0153,
+        0x2013,
+        0x2014,
+        0x201C,
+        0x201D,
+        0x2018,
+        0x2019,
+        0x00F7,
+        0x25CA,
+        // =DB U+00A4 CURRENCY SIGN
+        0x00FF,
+        0x0178,
+        0x2044,
+        0x20AC,
+        0x2039,
+        0x203A,
+        0xFB01,
+        0xFB02,
+        0x2021,
+        0x00B7,
+        0x201A,
+        0x201E,
+        0x2030,
+        0x00C2,
+        0x00CA,
+        0x00C1,
+        0x00CB,
+        0x00C8,
+        0x00CD,
+        0x00CE,
+        0x00CF,
+        0x00CC,
+        0x00D3,
+        0x00D4,
+        // xF0 = Apple Logo
+        // =F0 U+2665 BLACK HEART SUIT
+        0xF8FF,
+        0x00D2,
+        0x00DA,
+        0x00DB,
+        0x00D9,
+        0x0131,
+        0x02C6,
+        0x02DC,
+        0x00AF,
+        0x02D8,
+        0x02D9,
+        0x02DA,
+        0x00B8,
+        0x02DD,
+        0x02DB,
+        0x02C7};
+
+    /**
+     * table to map symbol font characters to Unicode; undefined characters are mapped to 0x0000 and characters without
+     * any unicode equivalent are mapped to '?'. Is this appropriate?
+     */
+    private static final int[] SYMBOL2UNICODE = {
+        0x0000,
+        0x0001,
+        0x0002,
+        0x0003,
+        0x0004,
+        0x0005,
+        0x0006,
+        0x0007,
+        0x0008,
+        0x0009,
+        0x000A,
+        0x000B,
+        0x000C,
+        0x000D,
+        0x000E,
+        0x000F,
+
+        0x0010,
+        0x0011,
+        0x0012,
+        0x0013,
+        0x0014,
+        0x0015,
+        0x0016,
+        0x0017,
+        0x0018,
+        0x0019,
+        0x001A,
+        0x001B,
+        0x001C,
+        0x001D,
+        0x001E,
+        0x001F,
+
+        0x0020,
+        0x0021,
+        0x2200,
+        0x0023,
+        0x2203,
+        0x0025,
+        0x0026,
+        0x220D,
+        0x0028,
+        0x0029,
+        0x2217,
+        0x002B,
+        0x002C,
+        0x2212,
+        0x002E,
+        0x002F,
+
+        0x0030,
+        0x0031,
+        0x0032,
+        0x0033,
+        0x0034,
+        0x0035,
+        0x0036,
+        0x0037,
+        0x0038,
+        0x0039,
+        0x003A,
+        0x003B,
+        0x003C,
+        0x003D,
+        0x003E,
+        0x003F,
+
+        0x2245,
+        0x0391,
+        0x0392,
+        0x03A7,
+        0x0394,
+        0x0395,
+        0x03A6,
+        0x0393,
+        0x0397,
+        0x0399,
+        0x03D1,
+        0x039A,
+        0x039B,
+        0x039C,
+        0x039D,
+        0x039F,
+
+        0x03A0,
+        0x0398,
+        0x03A1,
+        0x03A3,
+        0x03A4,
+        0x03A5,
+        0x03C2,
+        0x03A9,
+        0x039E,
+        0x03A8,
+        0x0396,
+        0x005B,
+        0x2234,
+        0x005D,
+        0x22A5,
+        0x005F,
+
+        0x00AF,
+        0x03B1,
+        0x03B2,
+        0x03C7,
+        0x03B4,
+        0x03B5,
+        0x03C6,
+        0x03B3,
+        0x03B7,
+        0x03B9,
+        0x03D5,
+        0x03BA,
+        0x03BB,
+        0x03BC,
+        0x03BD,
+        0x03BF,
+
+        0x03C0,
+        0x03B8,
+        0x03C1,
+        0x03C3,
+        0x03C4,
+        0x03C5,
+        0x03D6,
+        0x03C9,
+        0x03BE,
+        0x03C8,
+        0x03B6,
+        0x007B,
+        0x007C,
+        0x007D,
+        0x223C,
+        0x003F,
+
+        0x0000,
+        0x0000,
+        0x0000,
+        0x0000,
+        0x0000,
+        0x0000,
+        0x0000,
+        0x0000,
+        0x0000,
+        0x0000,
+        0x0000,
+        0x0000,
+        0x0000,
+        0x0000,
+        0x0000,
+        0x0000,
+
+        0x0000,
+        0x0000,
+        0x0000,
+        0x0000,
+        0x0000,
+        0x0000,
+        0x0000,
+        0x0000,
+        0x0000,
+        0x0000,
+        0x0000,
+        0x0000,
+        0x0000,
+        0x0000,
+        0x0000,
+        0x0000,
+
+        0x00A0,
+        0x03D2,
+        0x2032,
+        0x2264,
+        0x2044,
+        0x221E,
+        0x0192,
+        0x2663,
+        0x2666,
+        0x2665,
+        0x2660,
+        0x2194,
+        0x2190,
+        0x2191,
+        0x2192,
+        0x2193,
+
+        0x00B0,
+        0x00B1,
+        0x2033,
+        0x2265,
+        0x00D7,
+        0x221D,
+        0x2202,
+        0x00B7,
+        0x00F7,
+        0x2260,
+        0x2261,
+        0x2248,
+        0x2026,
+        0x003F,
+        0x003F,
+        0x21B5,
+
+        0x2135,
+        0x2111,
+        0x211C,
+        0x2118,
+        0x2297,
+        0x2295,
+        0x2205,
+        0x2229,
+        0x222A,
+        0x2283,
+        0x2287,
+        0x2284,
+        0x2282,
+        0x2286,
+        0x2208,
+        0x2209,
+
+        0x2220,
+        0x2207,
+        0x00AE,
+        0x00A9,
+        0x2122,
+        0x220F,
+        0x221A,
+        0x22C5,
+        0x00AC,
+        0x2227,
+        0x2228,
+        0x21D4,
+        0x21D0,
+        0x21D1,
+        0x21D2,
+        0x21D3,
+
+        0x25CA,
+        0x2329,
+        0x00AE,
+        0x00A9,
+        0x2122,
+        0x2211,
+        0x003F,
+        0x003F,
+        0x003F,
+        0x003F,
+        0x003F,
+        0x003F,
+        0x003F,
+        0x003F,
+        0x003F,
+        0x003F,
+
+        0x20AC,
+        0x232A,
+        0x222B,
+        0x2320,
+        0x003F,
+        0x2321,
+        0x003F,
+        0x003F,
+        0x003F,
+        0x003F,
+        0x003F,
+        0x003F,
+        0x003F,
+        0x003F,
+        0x003F,
+        0x003F};
+
+    /**
+     * Array of valid UTF8 sequences.
+     */
+    private static final ValidUTF8Sequence[] VALID_UTF8 = {
+        new ValidUTF8Sequence(0x0000, 0x007F, 1, new char[]{0x00, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}),
+        new ValidUTF8Sequence(0x0080, 0x07FF, 2, new char[]{0xC2, 0xDF, 0x80, 0xBF, 0x00, 0x00, 0x00, 0x00}),
+        new ValidUTF8Sequence(0x0800, 0x0FFF, 3, new char[]{0xE0, 0xE0, 0xA0, 0xBF, 0x80, 0xBF, 0x00, 0x00}),
+        new ValidUTF8Sequence(0x1000, 0xFFFF, 3, new char[]{0xE1, 0xEF, 0x80, 0xBF, 0x80, 0xBF, 0x00, 0x00}),
+        new ValidUTF8Sequence(0x10000, 0x3FFFF, 4, new char[]{0xF0, 0xF0, 0x90, 0xBF, 0x80, 0xBF, 0x80, 0xBF}),
+        new ValidUTF8Sequence(0x40000, 0xFFFFF, 4, new char[]{0xF1, 0xF3, 0x80, 0xBF, 0x80, 0xBF, 0x80, 0xBF}),
+        new ValidUTF8Sequence(0x100000, 0x10FFFF, 4, new char[]{0xF4, 0xF4, 0x80, 0x8F, 0x80, 0xBF, 0x80, 0xBF})};
+
+    /**
+     * number of valid utf8 sequances.
+     */
+    private static final int NUM_UTF8_SEQUENCES = VALID_UTF8.length;
+
+    /**
+     * Offset for utf8 sequences.
+     */
+    private static final int[] OFFSET_UTF8_SEQUENCES = {0, // 1 byte
+        1, // 2 bytes
+        2, // 3 bytes
+        4, // 4 bytes
+        NUM_UTF8_SEQUENCES}; // must be last
+
+    /**
+     * don't instantiate.
+     */
+    private EncodingUtils()
+    {
+        // unused
+    }
+
+    /**
+     * Function for conversion from Windows-1252 to Unicode.
+     * @param c char to decode
+     * @return decoded char
+     */
+    protected static int decodeWin1252(int c)
+    {
+        return WIN2UNICODE[c - 128];
+    }
+
+    /**
+     * Function to convert from MacRoman to Unicode.
+     * @param c char to decode
+     * @return decoded char
+     */
+    protected static int decodeMacRoman(int c)
+    {
+        if (127 < c)
+        {
+            c = MAC2UNICODE[c - 128];
+        }
+        return c;
+    }
+
+    /**
+     * Function to convert from Symbol Font chars to Unicode.
+     * @param c char to decode
+     * @return decoded char
+     */
+    static int decodeSymbolFont(int c)
+    {
+        if (c > 255)
+        {
+            return c;
+        }
+
+        return SYMBOL2UNICODE[c];
+    }
+
+    /**
+     * Decodes an array of bytes to a char.
+     * @param c will contain the decoded char
+     * @param firstByte first input byte
+     * @param successorBytes array containing successor bytes (can be null if a getter is provided).
+     * @param getter callback used to get new bytes if successorBytes doesn't contain enough bytes
+     * @param count will contain the number of bytes read
+     * @param startInSuccessorBytesArray starting offset for bytes in successorBytes
+     * @return <code>true</code> if error
+     */
+    static boolean decodeUTF8BytesToChar(int[] c, int firstByte, byte[] successorBytes, GetBytes getter, int[] count,
+        int startInSuccessorBytesArray)
+    {
+        byte[] buf = new byte[10];
+
+        int ch = 0;
+        int n = 0;
+        int i, bytes = 0;
+        boolean hasError = false;
+
+        if (successorBytes.length != 0)
+        {
+            buf = successorBytes;
+        }
+
+        // special check if we have been passed an EOF char
+        if (firstByte == StreamIn.END_OF_STREAM) //uint
+        {
+            // at present
+            c[0] = firstByte;
+            count[0] = 1;
+            return false;
+        }
+
+        ch = TidyUtils.toUnsigned(firstByte); // first byte is passed in separately
+
+        if (ch <= 0x7F) // 0XXX XXXX one byte
+        {
+            n = ch;
+            bytes = 1;
+        }
+        else if ((ch & 0xE0) == 0xC0) /* 110X XXXX two bytes */
+        {
+            n = ch & 31;
+            bytes = 2;
+        }
+        else if ((ch & 0xF0) == 0xE0) /* 1110 XXXX three bytes */
+        {
+            n = ch & 15;
+            bytes = 3;
+        }
+        else if ((ch & 0xF8) == 0xF0) /* 1111 0XXX four bytes */
+        {
+            n = ch & 7;
+            bytes = 4;
+        }
+        else if ((ch & 0xFC) == 0xF8) /* 1111 10XX five bytes */
+        {
+            n = ch & 3;
+            bytes = 5;
+            hasError = true;
+        }
+        else if ((ch & 0xFE) == 0xFC) /* 1111 110X six bytes */
+        {
+            n = ch & 1;
+            bytes = 6;
+            hasError = true;
+        }
+        else
+        {
+            // not a valid first byte of a UTF-8 sequence
+            n = ch;
+            bytes = 1;
+            hasError = true;
+        }
+
+        for (i = 1; i < bytes; ++i)
+        {
+            int[] tempCount = new int[1]; // no. of additional bytes to get
+
+            // successor bytes should have the form 10XX XXXX
+            if (getter != null && (bytes - i > 0))
+            {
+                tempCount[0] = 1; // to simplify things, get 1 byte at a time
+                int[] buftocopy = new int[]{buf[startInSuccessorBytesArray + i - 1]};
+
+                getter.doGet(buftocopy, tempCount, false);
+                //readRawBytesFromStream(buftocopy, tempCount, false);
+                if (tempCount[0] <= 0) // EOF
+                {
+                    hasError = true;
+                    bytes = i;
+                    break;
+                }
+            }
+
+            if ((buf[startInSuccessorBytesArray + i - 1] & 0xC0) != 0x80)
+            {
+                // illegal successor byte value
+                hasError = true;
+                bytes = i;
+                if (getter != null)
+                {
+                    int[] buftocopy = new int[]{buf[startInSuccessorBytesArray + i - 1]};
+                    tempCount[0] = 1; // to simplify things, unget 1 byte at a time
+                    getter.doGet(buftocopy, tempCount, true);
+                }
+                break;
+            }
+
+            n = (n << 6) | (buf[startInSuccessorBytesArray + i - 1] & 0x3F);
+        }
+
+        if (!hasError && ((n == UTF8_BYTE_SWAP_NOT_A_CHAR) || (n == UTF8_NOT_A_CHAR)))
+        {
+            hasError = true;
+        }
+
+        if (!hasError && (n > MAX_UTF8_FROM_UCS4))
+        {
+            hasError = true;
+        }
+
+        if (!hasError && (n >= UTF16_LOW_SURROGATE_BEGIN) && (n <= UTF16_HIGH_SURROGATE_END))
+        {
+            // unpaired surrogates not allowed
+            hasError = true;
+        }
+
+        if (!hasError)
+        {
+            int lo = OFFSET_UTF8_SEQUENCES[bytes - 1];
+            int hi = OFFSET_UTF8_SEQUENCES[bytes] - 1;
+
+            // check for overlong sequences
+            if ((n < VALID_UTF8[lo].lowChar) || (n > VALID_UTF8[hi].highChar))
+            {
+                hasError = true;
+            }
+            else
+            {
+                hasError = true; // assume error until proven otherwise
+
+                for (i = lo; i <= hi; i++)
+                {
+                    int tempCount;
+                    char theByte; //unsigned
+
+                    for (tempCount = 0; tempCount < bytes; tempCount++)
+                    {
+                        if (!TidyUtils.toBoolean(tempCount))
+                        {
+                            theByte = (char) firstByte;
+                        }
+                        else
+                        {
+                            theByte = (char) buf[startInSuccessorBytesArray + tempCount - 1];
+                        }
+                        if ((theByte >= VALID_UTF8[i].validBytes[(tempCount * 2)])
+                            && (theByte <= VALID_UTF8[i].validBytes[(tempCount * 2) + 1]))
+                        {
+                            hasError = false;
+                        }
+                        if (hasError)
+                        {
+                            break;
+                        }
+                    }
+                }
+            }
+        }
+
+        count[0] = bytes;
+
+        c[0] = n;
+
+        // n = 0xFFFD;
+        // replacement char - do this in the caller
+        return hasError;
+
+    }
+
+    /**
+     * Encode a char to an array of bytes.
+     * @param c char to encode
+     * @param encodebuf will contain the decoded bytes
+     * @param putter if not null it will be called to write bytes to out
+     * @param count number of bytes written
+     * @return <code>false</code>= ok, <code>true</code>= error
+     */
+    static boolean encodeCharToUTF8Bytes(int c, byte[] encodebuf, PutBytes putter, int[] count)
+    {
+        int bytes = 0;
+
+        byte[] buf = new byte[10];
+
+        if (encodebuf != null)
+        {
+            buf = encodebuf;
+        }
+
+        boolean hasError = false;
+
+        if (c <= 0x7F) // 0XXX XXXX one byte
+        {
+            buf[0] = (byte) c;
+            bytes = 1;
+        }
+        else if (c <= 0x7FF) // 110X XXXX two bytes
+        {
+            buf[0] = (byte) (0xC0 | (c >> 6));
+            buf[1] = (byte) (0x80 | (c & 0x3F));
+            bytes = 2;
+        }
+        else if (c <= 0xFFFF) // 1110 XXXX three bytes
+        {
+            buf[0] = (byte) (0xE0 | (c >> 12));
+            buf[1] = (byte) (0x80 | ((c >> 6) & 0x3F));
+            buf[2] = (byte) (0x80 | (c & 0x3F));
+            bytes = 3;
+            if ((c == UTF8_BYTE_SWAP_NOT_A_CHAR) || (c == UTF8_NOT_A_CHAR))
+            {
+                hasError = true;
+            }
+            else if ((c >= UTF16_LOW_SURROGATE_BEGIN) && (c <= UTF16_HIGH_SURROGATE_END))
+            {
+                // unpaired surrogates not allowed
+                hasError = true;
+            }
+        }
+        else if (c <= 0x1FFFFF) // 1111 0XXX four bytes
+        {
+            buf[0] = (byte) (0xF0 | (c >> 18));
+            buf[1] = (byte) (0x80 | ((c >> 12) & 0x3F));
+            buf[2] = (byte) (0x80 | ((c >> 6) & 0x3F));
+            buf[3] = (byte) (0x80 | (c & 0x3F));
+            bytes = 4;
+            if (c > MAX_UTF8_FROM_UCS4)
+            {
+                hasError = true;
+            }
+        }
+        else if (c <= 0x3FFFFFF) // 1111 10XX five bytes
+        {
+            buf[0] = (byte) (0xF8 | (c >> 24));
+            buf[1] = (byte) (0x80 | (c >> 18));
+            buf[2] = (byte) (0x80 | ((c >> 12) & 0x3F));
+            buf[3] = (byte) (0x80 | ((c >> 6) & 0x3F));
+            buf[4] = (byte) (0x80 | (c & 0x3F));
+            bytes = 5;
+            hasError = true;
+        }
+        else if (c <= 0x7FFFFFFF) // 1111 110X six bytes
+        {
+            buf[0] = (byte) (0xFC | (c >> 30));
+            buf[1] = (byte) (0x80 | ((c >> 24) & 0x3F));
+            buf[2] = (byte) (0x80 | ((c >> 18) & 0x3F));
+            buf[3] = (byte) (0x80 | ((c >> 12) & 0x3F));
+            buf[4] = (byte) (0x80 | ((c >> 6) & 0x3F));
+            buf[5] = (byte) (0x80 | (c & 0x3F));
+            bytes = 6;
+            hasError = true;
+        }
+        else
+        {
+            hasError = true;
+        }
+
+        if (!hasError && putter != null) // don't output invalid UTF-8 byte sequence to a stream
+        {
+            int[] tempCount = new int[]{bytes};
+            putter.doPut(buf, tempCount);
+
+            if (tempCount[0] < bytes)
+            {
+                hasError = true;
+            }
+        }
+
+        count[0] = bytes;
+        return hasError;
+    }
+
+    /**
+     * Getter callback: called to retrieve 1 or more additional UTF-8 bytes. The Getter callback can also unget if
+     * necessary to re-synchronize the input stream.
+     */
+    static interface GetBytes
+    {
+
+        /**
+         * Get one or more byte.
+         * @param buf will contain the bytes.
+         * @param count number of bytes actually stored in "buf". &lt;= 0 if error or EOF
+         * @param unget unget bytes?
+         */
+        void doGet(int[] buf, int[] count, boolean unget);
+    }
+
+    /**
+     * Putter callbacks: called to store 1 or more additional UTF-8 bytes.
+     */
+    static interface PutBytes
+    {
+
+        /**
+         * Store one or more byte.
+         * @param buf will contain the bytes.
+         * @param count number of bytes actually stored in "buf". &lt;= 0 if error or EOF
+         */
+        void doPut(byte[] buf, int[] count);
+    }
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/Entity.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/Entity.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/Entity.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,125 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ *  Java HTML Tidy - JTidy
+ *  HTML parser and pretty printer
+ *
+ *  Copyright (c) 1998-2000 World Wide Web Consortium (Massachusetts
+ *  Institute of Technology, Institut National de Recherche en
+ *  Informatique et en Automatique, Keio University). All Rights
+ *  Reserved.
+ *
+ *  Contributing Author(s):
+ *
+ *     Dave Raggett <dsr at w3.org>
+ *     Andy Quick <ac.quick at sympatico.ca> (translation to Java)
+ *     Gary L Peskin <garyp at firstech.com> (Java development)
+ *     Sami Lempinen <sami at lempinen.net> (release management)
+ *     Fabrizio Giustina <fgiust at users.sourceforge.net>
+ *
+ *  The contributing author(s) would like to thank all those who
+ *  helped with testing, bug fixes, and patience.  This wouldn't
+ *  have been possible without all of you.
+ *
+ *  COPYRIGHT NOTICE:
+ * 
+ *  This software and documentation is provided "as is," and
+ *  the copyright holders and contributing author(s) make no
+ *  representations or warranties, express or implied, including
+ *  but not limited to, warranties of merchantability or fitness
+ *  for any particular purpose or that the use of the software or
+ *  documentation will not infringe any third party patents,
+ *  copyrights, trademarks or other rights. 
+ *
+ *  The copyright holders and contributing author(s) will not be
+ *  liable for any direct, indirect, special or consequential damages
+ *  arising out of any use of the software or documentation, even if
+ *  advised of the possibility of such damage.
+ *
+ *  Permission is hereby granted to use, copy, modify, and distribute
+ *  this source code, or portions hereof, documentation and executables,
+ *  for any purpose, without fee, subject to the following restrictions:
+ *
+ *  1. The origin of this source code must not be misrepresented.
+ *  2. Altered versions must be plainly marked as such and must
+ *     not be misrepresented as being the original source.
+ *  3. This Copyright notice may not be removed or altered from any
+ *     source or altered source distribution.
+ * 
+ *  The copyright holders and contributing author(s) specifically
+ *  permit, without fee, and encourage the use of this source code
+ *  as a component for supporting the Hypertext Markup Language in
+ *  commercial products. If you use this source code in a product,
+ *  acknowledgment is not required but would be appreciated.
+ *
+ */
+package org.ajax4jsf.org.w3c.tidy;
+
+/**
+ * HTML ISO entity.
+ * @author Dave Raggett <a href="mailto:dsr at w3.org">dsr at w3.org </a>
+ * @author Andy Quick <a href="mailto:ac.quick at sympatico.ca">ac.quick at sympatico.ca </a> (translation to Java)
+ * @author Fabrizio Giustina
+ * @version $Revision: 1.1.2.1 $ ($Author: alexsmirnov $)
+ */
+public class Entity
+{
+
+    /**
+     * entity name.
+     */
+    private String name;
+
+    /**
+     * entity code.
+     */
+    private short code;
+
+    /**
+     * instantiates a new entity.
+     * @param name entity name
+     * @param code entity code (will be casted to short)
+     */
+    public Entity(String name, int code)
+    {
+        this.name = name;
+        this.code = (short) code;
+    }
+
+    /**
+     * Getter for <code>code</code>.
+     * @return Returns the code.
+     */
+    public short getCode()
+    {
+        return this.code;
+    }
+
+    /**
+     * Getter for <code>name</code>.
+     * @return Returns the name.
+     */
+    public String getName()
+    {
+        return this.name;
+    }
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/EntityTable.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/EntityTable.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/EntityTable.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,476 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ *  Java HTML Tidy - JTidy
+ *  HTML parser and pretty printer
+ *
+ *  Copyright (c) 1998-2000 World Wide Web Consortium (Massachusetts
+ *  Institute of Technology, Institut National de Recherche en
+ *  Informatique et en Automatique, Keio University). All Rights
+ *  Reserved.
+ *
+ *  Contributing Author(s):
+ *
+ *     Dave Raggett <dsr at w3.org>
+ *     Andy Quick <ac.quick at sympatico.ca> (translation to Java)
+ *     Gary L Peskin <garyp at firstech.com> (Java development)
+ *     Sami Lempinen <sami at lempinen.net> (release management)
+ *     Fabrizio Giustina <fgiust at users.sourceforge.net>
+ *
+ *  The contributing author(s) would like to thank all those who
+ *  helped with testing, bug fixes, and patience.  This wouldn't
+ *  have been possible without all of you.
+ *
+ *  COPYRIGHT NOTICE:
+ * 
+ *  This software and documentation is provided "as is," and
+ *  the copyright holders and contributing author(s) make no
+ *  representations or warranties, express or implied, including
+ *  but not limited to, warranties of merchantability or fitness
+ *  for any particular purpose or that the use of the software or
+ *  documentation will not infringe any third party patents,
+ *  copyrights, trademarks or other rights. 
+ *
+ *  The copyright holders and contributing author(s) will not be
+ *  liable for any direct, indirect, special or consequential damages
+ *  arising out of any use of the software or documentation, even if
+ *  advised of the possibility of such damage.
+ *
+ *  Permission is hereby granted to use, copy, modify, and distribute
+ *  this source code, or portions hereof, documentation and executables,
+ *  for any purpose, without fee, subject to the following restrictions:
+ *
+ *  1. The origin of this source code must not be misrepresented.
+ *  2. Altered versions must be plainly marked as such and must
+ *     not be misrepresented as being the original source.
+ *  3. This Copyright notice may not be removed or altered from any
+ *     source or altered source distribution.
+ * 
+ *  The copyright holders and contributing author(s) specifically
+ *  permit, without fee, and encourage the use of this source code
+ *  as a component for supporting the Hypertext Markup Language in
+ *  commercial products. If you use this source code in a product,
+ *  acknowledgment is not required but would be appreciated.
+ *
+ */
+package org.ajax4jsf.org.w3c.tidy;
+
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.Map;
+
+
+/**
+ * Entity hash table.
+ * @author Dave Raggett <a href="mailto:dsr at w3.org">dsr at w3.org </a>
+ * @author Andy Quick <a href="mailto:ac.quick at sympatico.ca">ac.quick at sympatico.ca </a> (translation to Java)
+ * @author Fabrizio Giustina
+ * @version $Revision: 1.1.2.1 $ ($Author: alexsmirnov $)
+ */
+public final class EntityTable
+{
+
+    /**
+     * the default entity table.
+     */
+    private static EntityTable defaultEntityTable;
+
+    /**
+     * Known entities.
+     */
+    private static Entity[] entities = {
+        new Entity("nbsp", 160),
+        new Entity("iexcl", 161),
+        new Entity("cent", 162),
+        new Entity("pound", 163),
+        new Entity("curren", 164),
+        new Entity("yen", 165),
+        new Entity("brvbar", 166),
+        new Entity("sect", 167),
+        new Entity("uml", 168),
+        new Entity("copy", 169),
+        new Entity("ordf", 170),
+        new Entity("laquo", 171),
+        new Entity("not", 172),
+        new Entity("shy", 173),
+        new Entity("reg", 174),
+        new Entity("macr", 175),
+        new Entity("deg", 176),
+        new Entity("plusmn", 177),
+        new Entity("sup2", 178),
+        new Entity("sup3", 179),
+        new Entity("acute", 180),
+        new Entity("micro", 181),
+        new Entity("para", 182),
+        new Entity("middot", 183),
+        new Entity("cedil", 184),
+        new Entity("sup1", 185),
+        new Entity("ordm", 186),
+        new Entity("raquo", 187),
+        new Entity("frac14", 188),
+        new Entity("frac12", 189),
+        new Entity("frac34", 190),
+        new Entity("iquest", 191),
+        new Entity("Agrave", 192),
+        new Entity("Aacute", 193),
+        new Entity("Acirc", 194),
+        new Entity("Atilde", 195),
+        new Entity("Auml", 196),
+        new Entity("Aring", 197),
+        new Entity("AElig", 198),
+        new Entity("Ccedil", 199),
+        new Entity("Egrave", 200),
+        new Entity("Eacute", 201),
+        new Entity("Ecirc", 202),
+        new Entity("Euml", 203),
+        new Entity("Igrave", 204),
+        new Entity("Iacute", 205),
+        new Entity("Icirc", 206),
+        new Entity("Iuml", 207),
+        new Entity("ETH", 208),
+        new Entity("Ntilde", 209),
+        new Entity("Ograve", 210),
+        new Entity("Oacute", 211),
+        new Entity("Ocirc", 212),
+        new Entity("Otilde", 213),
+        new Entity("Ouml", 214),
+        new Entity("times", 215),
+        new Entity("Oslash", 216),
+        new Entity("Ugrave", 217),
+        new Entity("Uacute", 218),
+        new Entity("Ucirc", 219),
+        new Entity("Uuml", 220),
+        new Entity("Yacute", 221),
+        new Entity("THORN", 222),
+        new Entity("szlig", 223),
+        new Entity("agrave", 224),
+        new Entity("aacute", 225),
+        new Entity("acirc", 226),
+        new Entity("atilde", 227),
+        new Entity("auml", 228),
+        new Entity("aring", 229),
+        new Entity("aelig", 230),
+        new Entity("ccedil", 231),
+        new Entity("egrave", 232),
+        new Entity("eacute", 233),
+        new Entity("ecirc", 234),
+        new Entity("euml", 235),
+        new Entity("igrave", 236),
+        new Entity("iacute", 237),
+        new Entity("icirc", 238),
+        new Entity("iuml", 239),
+        new Entity("eth", 240),
+        new Entity("ntilde", 241),
+        new Entity("ograve", 242),
+        new Entity("oacute", 243),
+        new Entity("ocirc", 244),
+        new Entity("otilde", 245),
+        new Entity("ouml", 246),
+        new Entity("divide", 247),
+        new Entity("oslash", 248),
+        new Entity("ugrave", 249),
+        new Entity("uacute", 250),
+        new Entity("ucirc", 251),
+        new Entity("uuml", 252),
+        new Entity("yacute", 253),
+        new Entity("thorn", 254),
+        new Entity("yuml", 255),
+        new Entity("fnof", 402),
+        new Entity("Alpha", 913),
+        new Entity("Beta", 914),
+        new Entity("Gamma", 915),
+        new Entity("Delta", 916),
+        new Entity("Epsilon", 917),
+        new Entity("Zeta", 918),
+        new Entity("Eta", 919),
+        new Entity("Theta", 920),
+        new Entity("Iota", 921),
+        new Entity("Kappa", 922),
+        new Entity("Lambda", 923),
+        new Entity("Mu", 924),
+        new Entity("Nu", 925),
+        new Entity("Xi", 926),
+        new Entity("Omicron", 927),
+        new Entity("Pi", 928),
+        new Entity("Rho", 929),
+        new Entity("Sigma", 931),
+        new Entity("Tau", 932),
+        new Entity("Upsilon", 933),
+        new Entity("Phi", 934),
+        new Entity("Chi", 935),
+        new Entity("Psi", 936),
+        new Entity("Omega", 937),
+        new Entity("alpha", 945),
+        new Entity("beta", 946),
+        new Entity("gamma", 947),
+        new Entity("delta", 948),
+        new Entity("epsilon", 949),
+        new Entity("zeta", 950),
+        new Entity("eta", 951),
+        new Entity("theta", 952),
+        new Entity("iota", 953),
+        new Entity("kappa", 954),
+        new Entity("lambda", 955),
+        new Entity("mu", 956),
+        new Entity("nu", 957),
+        new Entity("xi", 958),
+        new Entity("omicron", 959),
+        new Entity("pi", 960),
+        new Entity("rho", 961),
+        new Entity("sigmaf", 962),
+        new Entity("sigma", 963),
+        new Entity("tau", 964),
+        new Entity("upsilon", 965),
+        new Entity("phi", 966),
+        new Entity("chi", 967),
+        new Entity("psi", 968),
+        new Entity("omega", 969),
+        new Entity("thetasym", 977),
+        new Entity("upsih", 978),
+        new Entity("piv", 982),
+        new Entity("bull", 8226),
+        new Entity("hellip", 8230),
+        new Entity("prime", 8242),
+        new Entity("Prime", 8243),
+        new Entity("oline", 8254),
+        new Entity("frasl", 8260),
+        new Entity("weierp", 8472),
+        new Entity("image", 8465),
+        new Entity("real", 8476),
+        new Entity("trade", 8482),
+        new Entity("alefsym", 8501),
+        new Entity("larr", 8592),
+        new Entity("uarr", 8593),
+        new Entity("rarr", 8594),
+        new Entity("darr", 8595),
+        new Entity("harr", 8596),
+        new Entity("crarr", 8629),
+        new Entity("lArr", 8656),
+        new Entity("uArr", 8657),
+        new Entity("rArr", 8658),
+        new Entity("dArr", 8659),
+        new Entity("hArr", 8660),
+        new Entity("forall", 8704),
+        new Entity("part", 8706),
+        new Entity("exist", 8707),
+        new Entity("empty", 8709),
+        new Entity("nabla", 8711),
+        new Entity("isin", 8712),
+        new Entity("notin", 8713),
+        new Entity("ni", 8715),
+        new Entity("prod", 8719),
+        new Entity("sum", 8721),
+        new Entity("minus", 8722),
+        new Entity("lowast", 8727),
+        new Entity("radic", 8730),
+        new Entity("prop", 8733),
+        new Entity("infin", 8734),
+        new Entity("ang", 8736),
+        new Entity("and", 8743),
+        new Entity("or", 8744),
+        new Entity("cap", 8745),
+        new Entity("cup", 8746),
+        new Entity("int", 8747),
+        new Entity("there4", 8756),
+        new Entity("sim", 8764),
+        new Entity("cong", 8773),
+        new Entity("asymp", 8776),
+        new Entity("ne", 8800),
+        new Entity("equiv", 8801),
+        new Entity("le", 8804),
+        new Entity("ge", 8805),
+        new Entity("sub", 8834),
+        new Entity("sup", 8835),
+        new Entity("nsub", 8836),
+        new Entity("sube", 8838),
+        new Entity("supe", 8839),
+        new Entity("oplus", 8853),
+        new Entity("otimes", 8855),
+        new Entity("perp", 8869),
+        new Entity("sdot", 8901),
+        new Entity("lceil", 8968),
+        new Entity("rceil", 8969),
+        new Entity("lfloor", 8970),
+        new Entity("rfloor", 8971),
+        new Entity("lang", 9001),
+        new Entity("rang", 9002),
+        new Entity("loz", 9674),
+        new Entity("spades", 9824),
+        new Entity("clubs", 9827),
+        new Entity("hearts", 9829),
+        new Entity("diams", 9830),
+        new Entity("quot", 34),
+        new Entity("amp", 38),
+        new Entity("lt", 60),
+        new Entity("gt", 62),
+        new Entity("OElig", 338),
+        new Entity("oelig", 339),
+        new Entity("Scaron", 352),
+        new Entity("scaron", 353),
+        new Entity("Yuml", 376),
+        new Entity("circ", 710),
+        new Entity("tilde", 732),
+        new Entity("ensp", 8194),
+        new Entity("emsp", 8195),
+        new Entity("thinsp", 8201),
+        new Entity("zwnj", 8204),
+        new Entity("zwj", 8205),
+        new Entity("lrm", 8206),
+        new Entity("rlm", 8207),
+        new Entity("ndash", 8211),
+        new Entity("mdash", 8212),
+        new Entity("lsquo", 8216),
+        new Entity("rsquo", 8217),
+        new Entity("sbquo", 8218),
+        new Entity("ldquo", 8220),
+        new Entity("rdquo", 8221),
+        new Entity("bdquo", 8222),
+        new Entity("dagger", 8224),
+        new Entity("Dagger", 8225),
+        new Entity("permil", 8240),
+        new Entity("lsaquo", 8249),
+        new Entity("rsaquo", 8250),
+        new Entity("euro", 8364)};
+
+    /**
+     * Entity map.
+     */
+    private Map entityHashtable = new Hashtable();
+
+    /**
+     * use getDefaultEntityTable to get an entity table instance.
+     */
+    private EntityTable()
+    {
+        super();
+    }
+
+    /**
+     * installs an entity.
+     * @param ent entity
+     * @return installed Entity
+     */
+    private Entity install(Entity ent)
+    {
+        return (Entity) this.entityHashtable.put(ent.getName(), ent);
+    }
+
+    /**
+     * Lookup an entity by its name.
+     * @param name entity name
+     * @return entity
+     */
+    public Entity lookup(String name)
+    {
+        return (Entity) this.entityHashtable.get(name);
+    }
+
+    /**
+     * Returns the entity code for the given entity name.
+     * @param name entity name
+     * @return entity code or 0 for unknown entity names
+     */
+    public int entityCode(String name)
+    {
+        // entity starting with "&" returns zero on error.
+        int c;
+
+        if (name.length() <= 1)
+        {
+            return 0;
+        }
+
+        // numeric entitity: name = "&#" followed by number
+        if (name.charAt(1) == '#')
+        {
+            c = 0; // zero on missing/bad number
+
+            // 'x' prefix denotes hexadecimal number format
+            try
+            {
+                if (name.length() >= 4 && name.charAt(2) == 'x')
+                {
+                    c = Integer.parseInt(name.substring(3), 16);
+                }
+                else if (name.length() >= 3)
+                {
+                    c = Integer.parseInt(name.substring(2));
+                }
+            }
+            catch (NumberFormatException e)
+            {
+                // ignore
+            }
+
+            return c;
+        }
+
+        // Named entity: name ="&" followed by a name
+        Entity ent = lookup(name.substring(1));
+        if (ent != null)
+        {
+            return ent.getCode();
+        }
+
+        return 0; // zero signifies unknown entity name
+    }
+
+    /**
+     * Returns the entity name for the given entity code.
+     * @param code entity code
+     * @return entity name or null for unknown entity codes
+     */
+    public String entityName(short code)
+    {
+        String name = null;
+        Entity ent;
+        Iterator en = this.entityHashtable.values().iterator();
+        while (en.hasNext())
+        {
+            ent = (Entity) en.next();
+            if (ent.getCode() == code)
+            {
+                name = ent.getName();
+                break;
+            }
+        }
+        return name;
+    }
+
+    /**
+     * Returns the default entity table instance.
+     * @return entity table instance
+     */
+    public static EntityTable getDefaultEntityTable()
+    {
+        if (defaultEntityTable == null)
+        {
+            defaultEntityTable = new EntityTable();
+            for (int i = 0; i < entities.length; i++)
+            {
+                defaultEntityTable.install(entities[i]);
+            }
+        }
+        return defaultEntityTable;
+    }
+
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/IStack.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/IStack.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/IStack.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,113 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ *  Java HTML Tidy - JTidy
+ *  HTML parser and pretty printer
+ *
+ *  Copyright (c) 1998-2000 World Wide Web Consortium (Massachusetts
+ *  Institute of Technology, Institut National de Recherche en
+ *  Informatique et en Automatique, Keio University). All Rights
+ *  Reserved.
+ *
+ *  Contributing Author(s):
+ *
+ *     Dave Raggett <dsr at w3.org>
+ *     Andy Quick <ac.quick at sympatico.ca> (translation to Java)
+ *     Gary L Peskin <garyp at firstech.com> (Java development)
+ *     Sami Lempinen <sami at lempinen.net> (release management)
+ *     Fabrizio Giustina <fgiust at users.sourceforge.net>
+ *
+ *  The contributing author(s) would like to thank all those who
+ *  helped with testing, bug fixes, and patience.  This wouldn't
+ *  have been possible without all of you.
+ *
+ *  COPYRIGHT NOTICE:
+ * 
+ *  This software and documentation is provided "as is," and
+ *  the copyright holders and contributing author(s) make no
+ *  representations or warranties, express or implied, including
+ *  but not limited to, warranties of merchantability or fitness
+ *  for any particular purpose or that the use of the software or
+ *  documentation will not infringe any third party patents,
+ *  copyrights, trademarks or other rights. 
+ *
+ *  The copyright holders and contributing author(s) will not be
+ *  liable for any direct, indirect, special or consequential damages
+ *  arising out of any use of the software or documentation, even if
+ *  advised of the possibility of such damage.
+ *
+ *  Permission is hereby granted to use, copy, modify, and distribute
+ *  this source code, or portions hereof, documentation and executables,
+ *  for any purpose, without fee, subject to the following restrictions:
+ *
+ *  1. The origin of this source code must not be misrepresented.
+ *  2. Altered versions must be plainly marked as such and must
+ *     not be misrepresented as being the original source.
+ *  3. This Copyright notice may not be removed or altered from any
+ *     source or altered source distribution.
+ * 
+ *  The copyright holders and contributing author(s) specifically
+ *  permit, without fee, and encourage the use of this source code
+ *  as a component for supporting the Hypertext Markup Language in
+ *  commercial products. If you use this source code in a product,
+ *  acknowledgment is not required but would be appreciated.
+ *
+ */
+package org.ajax4jsf.org.w3c.tidy;
+
+/**
+ * Inline stack node.
+ * <p>
+ * Mosaic handles inlines via a separate stack from other elements We duplicate this to recover from inline markup
+ * errors such as: &lt;i>italic text &lt;p> more italic text&lt;/b> normal text which for compatibility with Mosaic is
+ * mapped to: &lt;i>italic text&lt;/i> &lt;p> &lt;i>more italic text&lt;/i> normal text Note that any inline end tag
+ * pop's the effect of the current inline start tag, so that&lt;/b> pop's &lt;i>in the above example.
+ * </p>
+ * @author Dave Raggett <a href="mailto:dsr at w3.org">dsr at w3.org </a>
+ * @author Andy Quick <a href="mailto:ac.quick at sympatico.ca">ac.quick at sympatico.ca </a> (translation to Java)
+ * @author Fabrizio Giustina
+ * @version $Revision: 1.1.2.1 $ ($Author: alexsmirnov $)
+ */
+public class IStack
+{
+
+    /**
+     * Next element in the stack.
+     */
+    protected IStack next;
+
+    /**
+     * tag's dictionary definition.
+     */
+    protected Dict tag;
+
+    /**
+     * name (null for text nodes).
+     */
+    protected String element;
+
+    /**
+     * Attributes.
+     */
+    protected AttVal attributes;
+
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/Lexer.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/Lexer.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/Lexer.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,4137 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ *  Java HTML Tidy - JTidy
+ *  HTML parser and pretty printer
+ *
+ *  Copyright (c) 1998-2000 World Wide Web Consortium (Massachusetts
+ *  Institute of Technology, Institut National de Recherche en
+ *  Informatique et en Automatique, Keio University). All Rights
+ *  Reserved.
+ *
+ *  Contributing Author(s):
+ *
+ *     Dave Raggett <dsr at w3.org>
+ *     Andy Quick <ac.quick at sympatico.ca> (translation to Java)
+ *     Gary L Peskin <garyp at firstech.com> (Java development)
+ *     Sami Lempinen <sami at lempinen.net> (release management)
+ *     Fabrizio Giustina <fgiust at users.sourceforge.net>
+ *
+ *  The contributing author(s) would like to thank all those who
+ *  helped with testing, bug fixes, and patience.  This wouldn't
+ *  have been possible without all of you.
+ *
+ *  COPYRIGHT NOTICE:
+ *
+ *  This software and documentation is provided "as is," and
+ *  the copyright holders and contributing author(s) make no
+ *  representations or warranties, express or implied, including
+ *  but not limited to, warranties of merchantability or fitness
+ *  for any particular purpose or that the use of the software or
+ *  documentation will not infringe any third party patents,
+ *  copyrights, trademarks or other rights.
+ *
+ *  The copyright holders and contributing author(s) will not be
+ *  liable for any direct, indirect, special or consequential damages
+ *  arising out of any use of the software or documentation, even if
+ *  advised of the possibility of such damage.
+ *
+ *  Permission is hereby granted to use, copy, modify, and distribute
+ *  this source code, or portions hereof, documentation and executables,
+ *  for any purpose, without fee, subject to the following restrictions:
+ *
+ *  1. The origin of this source code must not be misrepresented.
+ *  2. Altered versions must be plainly marked as such and must
+ *     not be misrepresented as being the original source.
+ *  3. This Copyright notice may not be removed or altered from any
+ *     source or altered source distribution.
+ *
+ *  The copyright holders and contributing author(s) specifically
+ *  permit, without fee, and encourage the use of this source code
+ *  as a component for supporting the Hypertext Markup Language in
+ *  commercial products. If you use this source code in a product,
+ *  acknowledgment is not required but would be appreciated.
+ *
+ */
+package org.ajax4jsf.org.w3c.tidy;
+
+import java.io.PrintWriter;
+import java.util.List;
+import java.util.Stack;
+import java.util.Vector;
+
+
+/**
+ * Lexer for html parser.
+ * <p>
+ * Given a file stream fp it returns a sequence of tokens. GetToken(fp) gets the next token UngetToken(fp) provides one
+ * level undo The tags include an attribute list: - linked list of attribute/value nodes - each node has 2
+ * null-terminated strings. - entities are replaced in attribute values white space is compacted if not in preformatted
+ * mode If not in preformatted mode then leading white space is discarded and subsequent white space sequences compacted
+ * to single space chars. If XmlTags is no then Tag names are folded to upper case and attribute names to lower case.
+ * Not yet done: - Doctype subset and marked sections
+ * </p>
+ * @author Dave Raggett <a href="mailto:dsr at w3.org">dsr at w3.org </a>
+ * @author Andy Quick <a href="mailto:ac.quick at sympatico.ca">ac.quick at sympatico.ca </a> (translation to Java)
+ * @author Fabrizio Giustina
+ * @version $Revision: 1.1.2.1 $ ($Author: alexsmirnov $)
+ */
+public class Lexer
+{
+
+    /**
+     * state: ignore whitespace.
+     */
+    public static final short IGNORE_WHITESPACE = 0;
+
+    /**
+     * state: mixed content.
+     */
+    public static final short MIXED_CONTENT = 1;
+
+    /**
+     * state: preformatted.
+     */
+    public static final short PREFORMATTED = 2;
+
+    /**
+     * state: ignore markup.
+     */
+    public static final short IGNORE_MARKUP = 3;
+
+    /**
+     * URI for XHTML 1.0 transitional DTD.
+     */
+    private static final String VOYAGER_LOOSE = "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";
+
+    /**
+     * URI for XHTML 1.0 strict DTD.
+     */
+    private static final String VOYAGER_STRICT = "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";
+
+    /**
+     * URI for XHTML 1.0 frameset DTD.
+     */
+    private static final String VOYAGER_FRAMESET = "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd";
+
+    /**
+     * URI for XHTML 1.1.
+     */
+    private static final String VOYAGER_11 = "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd";
+
+    /**
+     * URI for XHTML Basic 1.0.
+     */
+    // private static final String VOYAGER_BASIC = "http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd";
+    /**
+     * xhtml namespace.
+     */
+    private static final String XHTML_NAMESPACE = "http://www.w3.org/1999/xhtml";
+
+    /**
+     * lists all the known versions.
+     */
+    private static final Lexer.W3CVersionInfo[] W3CVERSION = {
+        new W3CVersionInfo("HTML 4.01", "XHTML 1.0 Strict", VOYAGER_STRICT, Dict.VERS_HTML40_STRICT),
+        new W3CVersionInfo("HTML 4.01 Transitional", "XHTML 1.0 Transitional", VOYAGER_LOOSE, Dict.VERS_HTML40_LOOSE),
+        new W3CVersionInfo("HTML 4.01 Frameset", "XHTML 1.0 Frameset", VOYAGER_FRAMESET, Dict.VERS_FRAMESET),
+        new W3CVersionInfo("HTML 4.0", "XHTML 1.0 Strict", VOYAGER_STRICT, Dict.VERS_HTML40_STRICT),
+        new W3CVersionInfo("HTML 4.0 Transitional", "XHTML 1.0 Transitional", VOYAGER_LOOSE, Dict.VERS_HTML40_LOOSE),
+        new W3CVersionInfo("HTML 4.0 Frameset", "XHTML 1.0 Frameset", VOYAGER_FRAMESET, Dict.VERS_FRAMESET),
+        new W3CVersionInfo("HTML 3.2", "XHTML 1.0 Transitional", VOYAGER_LOOSE, Dict.VERS_HTML32),
+        new W3CVersionInfo("HTML 3.2 Final", "XHTML 1.0 Transitional", VOYAGER_LOOSE, Dict.VERS_HTML32),
+        new W3CVersionInfo("HTML 3.2 Draft", "XHTML 1.0 Transitional", VOYAGER_LOOSE, Dict.VERS_HTML32),
+        new W3CVersionInfo("HTML 2.0", "XHTML 1.0 Strict", VOYAGER_STRICT, Dict.VERS_HTML20),
+        new W3CVersionInfo("HTML 4.01", "XHTML 1.1", VOYAGER_STRICT, Dict.VERS_XHTML11)};
+
+    /**
+     * getToken state: content.
+     */
+    private static final short LEX_CONTENT = 0;
+
+    /**
+     * getToken state: gt.
+     */
+    private static final short LEX_GT = 1;
+
+    /**
+     * getToken state: endtag.
+     */
+    private static final short LEX_ENDTAG = 2;
+
+    /**
+     * getToken state: start tag.
+     */
+    private static final short LEX_STARTTAG = 3;
+
+    /**
+     * getToken state: comment.
+     */
+    private static final short LEX_COMMENT = 4;
+
+    /**
+     * getToken state: doctype.
+     */
+    private static final short LEX_DOCTYPE = 5;
+
+    /**
+     * getToken state: procinstr.
+     */
+    private static final short LEX_PROCINSTR = 6;
+
+    /**
+     * getToken state: cdata.
+     */
+    private static final short LEX_CDATA = 8;
+
+    /**
+     * getToken state: section.
+     */
+    private static final short LEX_SECTION = 9;
+
+    /**
+     * getToken state: asp.
+     */
+    private static final short LEX_ASP = 10;
+
+    /**
+     * getToken state: jste.
+     */
+    private static final short LEX_JSTE = 11;
+
+    /**
+     * getToken state: php.
+     */
+    private static final short LEX_PHP = 12;
+
+    /**
+     * getToken state: xml declaration.
+     */
+    private static final short LEX_XMLDECL = 13;
+
+    /**
+     * file stream.
+     */
+    protected StreamIn in;
+
+    /**
+     * error output stream.
+     */
+    protected PrintWriter errout;
+
+    /**
+     * for accessibility errors.
+     */
+    protected short badAccess;
+
+    /**
+     * for bad style errors.
+     */
+    protected short badLayout;
+
+    /**
+     * for bad char encodings.
+     */
+    protected short badChars;
+
+    /**
+     * for mismatched/mispositioned form tags.
+     */
+    protected short badForm;
+
+    /**
+     * count of warnings in this document.
+     */
+    protected short warnings;
+
+    /**
+     * count of errors.
+     */
+    protected short errors;
+
+    /**
+     * lines seen.
+     */
+    protected int lines;
+
+    /**
+     * at start of current token.
+     */
+    protected int columns;
+
+    /**
+     * used to collapse contiguous white space.
+     */
+    protected boolean waswhite;
+
+    /**
+     * true after token has been pushed back.
+     */
+    protected boolean pushed;
+
+    /**
+     * when space is moved after end tag.
+     */
+    protected boolean insertspace;
+
+    /**
+     * Netscape compatibility.
+     */
+    protected boolean excludeBlocks;
+
+    /**
+     * true if moved out of table.
+     */
+    protected boolean exiled;
+
+    /**
+     * true if xmlns attribute on html element.
+     */
+    protected boolean isvoyager;
+
+    /**
+     * bit vector of HTML versions.
+     */
+    protected short versions;
+
+    /**
+     * version as given by doctype (if any).
+     */
+    protected int doctype;
+
+    /**
+     * set if html or PUBLIC is missing.
+     */
+    protected boolean badDoctype;
+
+    /**
+     * start of current node.
+     */
+    protected int txtstart;
+
+    /**
+     * end of current node.
+     */
+    protected int txtend;
+
+    /**
+     * state of lexer's finite state machine.
+     */
+    protected short state;
+
+    /**
+     * current node.
+     */
+    protected Node token;
+
+    /**
+     * Lexer character buffer parse tree nodes span onto this buffer which contains the concatenated text contents of
+     * all of the elements. Lexsize must be reset for each file. Byte buffer of UTF-8 chars.
+     */
+    protected byte[] lexbuf;
+
+    /**
+     * allocated.
+     */
+    protected int lexlength;
+
+    /**
+     * used.
+     */
+    protected int lexsize;
+
+    /**
+     * Inline stack for compatibility with Mosaic. For deferring text node.
+     */
+    protected Node inode;
+
+    /**
+     * for inferring inline tags.
+     */
+    protected int insert;
+
+    /**
+     * stack.
+     */
+    protected Stack istack;
+
+    /**
+     * start of frame.
+     */
+    protected int istackbase;
+
+    /**
+     * used for cleaning up presentation markup.
+     */
+    protected Style styles;
+
+    /**
+     * configuration.
+     */
+    protected Configuration configuration;
+
+    /**
+     * already seen end body tag?
+     */
+    protected boolean seenEndBody;
+
+    /**
+     * already seen end html tag?
+     */
+    protected boolean seenEndHtml;
+
+    /**
+     * report.
+     */
+    protected Report report;
+
+    /**
+     * Root node is saved here.
+     */
+    protected Node root;
+
+    /**
+     * node list.
+     */
+    private List nodeList;
+
+    /**
+     * Instantiates a new Lexer.
+     * @param in StreamIn
+     * @param configuration configuation instance
+     * @param report report instance, for reporting errors
+     */
+    public Lexer(StreamIn in, Configuration configuration, Report report)
+    {
+        this.report = report;
+        this.in = in;
+        this.lines = 1;
+        this.columns = 1;
+        this.state = LEX_CONTENT;
+        this.versions = (Dict.VERS_ALL | Dict.VERS_PROPRIETARY);
+        this.doctype = Dict.VERS_UNKNOWN;
+        this.insert = -1;
+        this.istack = new Stack();
+        this.configuration = configuration;
+        this.nodeList = new Vector();
+    }
+
+    /**
+     * Creates a new node and add it to nodelist.
+     * @return Node
+     */
+    public Node newNode()
+    {
+        Node node = new Node();
+        this.nodeList.add(node);
+        return node;
+    }
+
+    /**
+     * Creates a new node and add it to nodelist.
+     * @param type node type: Node.ROOT_NODE | Node.DOCTYPE_TAG | Node.COMMENT_TAG | Node.PROC_INS_TAG | Node.TEXT_NODE |
+     * Node.START_TAG | Node.END_TAG | Node.START_END_TAG | Node.CDATA_TAG | Node.SECTION_TAG | Node. ASP_TAG |
+     * Node.JSTE_TAG | Node.PHP_TAG | Node.XML_DECL
+     * @param textarray array of bytes contained in the Node
+     * @param start start position
+     * @param end end position
+     * @return Node
+     */
+    public Node newNode(short type, byte[] textarray, int start, int end)
+    {
+        Node node = new Node(type, textarray, start, end);
+        this.nodeList.add(node);
+        return node;
+    }
+
+    /**
+     * Creates a new node and add it to nodelist.
+     * @param type node type: Node.ROOT_NODE | Node.DOCTYPE_TAG | Node.COMMENT_TAG | Node.PROC_INS_TAG | Node.TEXT_NODE |
+     * Node.START_TAG | Node.END_TAG | Node.START_END_TAG | Node.CDATA_TAG | Node.SECTION_TAG | Node. ASP_TAG |
+     * Node.JSTE_TAG | Node.PHP_TAG | Node.XML_DECL
+     * @param textarray array of bytes contained in the Node
+     * @param start start position
+     * @param end end position
+     * @param element tag name
+     * @return Node
+     */
+    public Node newNode(short type, byte[] textarray, int start, int end, String element)
+    {
+        Node node = new Node(type, textarray, start, end, element, this.configuration.tt);
+        this.nodeList.add(node);
+        return node;
+    }
+
+    /**
+     * Clones a node and add it to node list.
+     * @param node Node
+     * @return cloned Node
+     */
+    public Node cloneNode(Node node)
+    {
+        Node cnode = (Node) node.clone();
+        this.nodeList.add(cnode);
+        for (AttVal att = cnode.attributes; att != null; att = att.next)
+        {
+            if (att.asp != null)
+            {
+                this.nodeList.add(att.asp);
+            }
+            if (att.php != null)
+            {
+                this.nodeList.add(att.php);
+            }
+        }
+        return cnode;
+    }
+
+    /**
+     * Clones an attribute value and add eventual asp or php node to node list.
+     * @param attrs original AttVal
+     * @return cloned AttVal
+     */
+    public AttVal cloneAttributes(AttVal attrs)
+    {
+        AttVal cattrs = (AttVal) attrs.clone();
+        for (AttVal att = cattrs; att != null; att = att.next)
+        {
+            if (att.asp != null)
+            {
+                this.nodeList.add(att.asp);
+            }
+            if (att.php != null)
+            {
+                this.nodeList.add(att.php);
+            }
+        }
+        return cattrs;
+    }
+
+    /**
+     * Update <code>oldtextarray</code> in the current nodes.
+     * @param oldtextarray previous text array
+     * @param newtextarray new text array
+     */
+    protected void updateNodeTextArrays(byte[] oldtextarray, byte[] newtextarray)
+    {
+        Node node;
+        for (int i = 0; i < this.nodeList.size(); i++)
+        {
+            node = (Node) (this.nodeList.get(i));
+            if (node.textarray == oldtextarray)
+            {
+                node.textarray = newtextarray;
+            }
+        }
+    }
+
+    /**
+     * Adds a new line node. Used for creating preformatted text from Word2000.
+     * @return new line node
+     */
+    public Node newLineNode()
+    {
+        Node node = newNode();
+
+        node.textarray = this.lexbuf;
+        node.start = this.lexsize;
+        addCharToLexer('\n');
+        node.end = this.lexsize;
+        return node;
+    }
+
+    /**
+     * Has end of input stream been reached?
+     * @return <code>true</code> if end of input stream been reached
+     */
+    public boolean endOfInput()
+    {
+        return this.in.isEndOfStream();
+    }
+
+    /**
+     * Adds a byte to lexer buffer.
+     * @param c byte to add
+     */
+    public void addByte(int c)
+    {
+        if (this.lexsize + 1 >= this.lexlength)
+        {
+            while (this.lexsize + 1 >= this.lexlength)
+            {
+                if (this.lexlength == 0)
+                {
+                    this.lexlength = 8192;
+                }
+                else
+                {
+                    this.lexlength = this.lexlength * 2;
+                }
+            }
+
+            byte[] temp = this.lexbuf;
+            this.lexbuf = new byte[this.lexlength];
+            if (temp != null)
+            {
+                System.arraycopy(temp, 0, this.lexbuf, 0, temp.length);
+                updateNodeTextArrays(temp, this.lexbuf);
+            }
+        }
+
+        this.lexbuf[this.lexsize++] = (byte) c;
+        this.lexbuf[this.lexsize] = (byte) '\0'; // debug
+    }
+
+    /**
+     * Substitute the last char in buffer.
+     * @param c new char
+     */
+    public void changeChar(byte c)
+    {
+        if (this.lexsize > 0)
+        {
+            this.lexbuf[this.lexsize - 1] = c;
+        }
+    }
+
+    /**
+     * Store char c as UTF-8 encoded byte stream.
+     * @param c char to store
+     */
+    public void addCharToLexer(int c)
+    {
+        // Allow only valid XML characters. See: http://www.w3.org/TR/2004/REC-xml-20040204/#NT-Char
+        // Fix by Pablo Mayrgundter 17-08-2004
+
+        if ((this.configuration.xmlOut || this.configuration.xHTML) // only for xml output
+            && !((c >= 0x20 && c <= 0xD7FF) // Check the common-case first.
+                || c == 0x9 || c == 0xA || c == 0xD // Then white-space.
+                || (c >= 0xE000 && c <= 0xFFFD) // Then high-range unicode.
+            || (c >= 0x10000 && c <= 0x10FFFF)))
+        {
+            return;
+        }
+
+        int i = 0;
+        int[] count = new int[]{0};
+        byte[] buf = new byte[10]; // unsigned char
+
+        boolean err = EncodingUtils.encodeCharToUTF8Bytes(c, buf, null, count);
+        if (err)
+        {
+            // replacement char 0xFFFD encoded as UTF-8
+            buf[0] = (byte) 0xEF;
+            buf[1] = (byte) 0xBF;
+            buf[2] = (byte) 0xBD;
+            count[0] = 3;
+        }
+
+        for (i = 0; i < count[0]; i++)
+        {
+            addByte(buf[i]); // uint
+        }
+
+    }
+
+    /**
+     * Adds a string to lexer buffer.
+     * @param str String to add
+     */
+    public void addStringToLexer(String str)
+    {
+        for (int i = 0; i < str.length(); i++)
+        {
+            addCharToLexer(str.charAt(i));
+        }
+    }
+
+    /**
+     * Parse an html entity.
+     * @param mode mode
+     */
+    public void parseEntity(short mode)
+    {
+        // No longer attempts to insert missing ';' for unknown
+        // entities unless one was present already, since this
+        // gives unexpected results.
+        // 
+        // For example: <a href="something.htm?foo&bar&fred">
+        // was tidied to: <a href="something.htm?foo&amp;bar;&amp;fred;">
+        // rather than: <a href="something.htm?foo&amp;bar&amp;fred">
+        // 
+        // My thanks for Maurice Buxton for spotting this.
+        // 
+        // Also Randy Waki pointed out the following case for the
+        // 04 Aug 00 version (bug #433012):
+        // 
+        // For example: <a href="something.htm?id=1&lang=en">
+        // was tidied to: <a href="something.htm?id=1&lang;=en">
+        // rather than: <a href="something.htm?id=1&amp;lang=en">
+        //
+        // where "lang" is a known entity (#9001), but browsers would
+        // misinterpret "&lang;" because it had a value > 256.
+        //
+        // So the case of an apparently known entity with a value > 256 and
+        // missing a semicolon is handled specially.
+        //
+        // "ParseEntity" is also a bit of a misnomer - it handles entities and
+        // numeric character references. Invalid NCR's are now reported.
+
+        int start;
+        boolean first = true;
+        boolean semicolon = false;
+        int c, ch, startcol;
+        String str;
+
+        start = this.lexsize - 1; // to start at "&"
+        startcol = this.in.getCurcol() - 1;
+
+        while ((c = this.in.readChar()) != StreamIn.END_OF_STREAM)
+        {
+            if (c == ';')
+            {
+                semicolon = true;
+                break;
+            }
+
+            if (first && c == '#')
+            {
+                // #431953 - start RJ
+                if (!this.configuration.ncr
+                    || this.configuration.getInCharEncoding() == Configuration.BIG5
+                    || this.configuration.getInCharEncoding() == Configuration.SHIFTJIS)
+                {
+                    this.in.ungetChar(c);
+                    return;
+                }
+                // #431953 - end RJ
+
+                addCharToLexer(c);
+                first = false;
+                continue;
+            }
+
+            first = false;
+
+            if (TidyUtils.isNamechar((char) c))
+            {
+                addCharToLexer(c);
+                continue;
+            }
+
+            // otherwise put it back
+            this.in.ungetChar(c);
+            break;
+        }
+
+        str = TidyUtils.getString(this.lexbuf, start, this.lexsize - start);
+
+        if ("&apos".equals(str) && !configuration.xmlOut && !this.isvoyager && !configuration.xHTML)
+        {
+            report.entityError(this, Report.APOS_UNDEFINED, str, 39);
+        }
+
+        ch = EntityTable.getDefaultEntityTable().entityCode(str);
+
+        // drops invalid numeric entities from XML mode. Fix by Pablo Mayrgundter 17-08-2004
+        // if ((this.configuration.xmlOut || this.configuration.xHTML) // only for xml output
+        // && !((ch >= 0x20 && ch <= 0xD7FF) // Check the common-case first.
+        // || ch == 0x9 || ch == 0xA || ch == 0xD // Then white-space.
+        // || (ch >= 0xE000 && ch <= 0xFFFD)))
+        // {
+        // this.lexsize = start;
+        // return;
+        // }
+
+        // deal with unrecognized or invalid entities
+        // #433012 - fix by Randy Waki 17 Feb 01
+        // report invalid NCR's - Terry Teague 01 Sep 01
+        if (ch <= 0 || (ch >= 256 && c != ';'))
+        {
+            // set error position just before offending character
+            this.lines = this.in.getCurline();
+            this.columns = startcol;
+
+            if (this.lexsize > start + 1)
+            {
+                if (ch >= 128 && ch <= 159)
+                {
+                    // invalid numeric character reference
+                    int c1 = 0;
+
+                    if (configuration.replacementCharEncoding == Configuration.WIN1252)
+                    {
+                        c1 = EncodingUtils.decodeWin1252(ch);
+                    }
+                    else if (configuration.replacementCharEncoding == Configuration.MACROMAN)
+                    {
+                        c1 = EncodingUtils.decodeMacRoman(ch);
+                    }
+
+                    // "or" DISCARDED_CHAR with the other errors if discarding char; otherwise default is replacing
+
+                    int replaceMode = c1 != 0 ? Report.REPLACED_CHAR : Report.DISCARDED_CHAR;
+
+                    if (c != ';') /* issue warning if not terminated by ';' */
+                    {
+                        report.entityError(this, Report.MISSING_SEMICOLON_NCR, str, c);
+                    }
+
+                    report.encodingError(this, (short) (Report.INVALID_NCR | replaceMode), ch);
+
+                    if (c1 != 0)
+                    {
+                        // make the replacement
+                        this.lexsize = start;
+                        addCharToLexer(c1);
+                        semicolon = false;
+                    }
+                    else
+                    {
+                        /* discard */
+                        this.lexsize = start;
+                        semicolon = false;
+                    }
+
+                }
+                else
+                {
+                    report.entityError(this, Report.UNKNOWN_ENTITY, str, ch);
+                }
+
+                if (semicolon)
+                {
+                    addCharToLexer(';');
+                }
+            }
+            else
+            {
+                // naked &
+                report.entityError(this, Report.UNESCAPED_AMPERSAND, str, ch);
+            }
+        }
+        else
+        {
+            // issue warning if not terminated by ';'
+            if (c != ';')
+            {
+                // set error position just before offending character
+                this.lines = this.in.getCurline();
+                this.columns = startcol;
+                report.entityError(this, Report.MISSING_SEMICOLON, str, c);
+            }
+
+            this.lexsize = start;
+
+            if (ch == 160 && TidyUtils.toBoolean(mode & PREFORMATTED))
+            {
+                ch = ' ';
+            }
+
+            addCharToLexer(ch);
+
+            if (ch == '&' && !this.configuration.quoteAmpersand)
+            {
+                addCharToLexer('a');
+                addCharToLexer('m');
+                addCharToLexer('p');
+                addCharToLexer(';');
+            }
+        }
+    }
+
+    /**
+     * Parses a tag name.
+     * @return first char after the tag name
+     */
+    public char parseTagName()
+    {
+        int c;
+
+        // fold case of first char in buffer
+        c = this.lexbuf[this.txtstart];
+
+        if (!this.configuration.xmlTags && TidyUtils.isUpper((char) c))
+        {
+            c = TidyUtils.toLower((char) c);
+            this.lexbuf[this.txtstart] = (byte) c;
+        }
+
+        while ((c = this.in.readChar()) != StreamIn.END_OF_STREAM)
+        {
+            if (!TidyUtils.isNamechar((char) c))
+            {
+                break;
+            }
+
+            // fold case of subsequent chars
+            if (!this.configuration.xmlTags && TidyUtils.isUpper((char) c))
+            {
+                c = TidyUtils.toLower((char) c);
+            }
+
+            addCharToLexer(c);
+        }
+
+        this.txtend = this.lexsize;
+        return (char) c;
+    }
+
+    /**
+     * calls addCharToLexer for any char in the string.
+     * @param str input String
+     */
+    public void addStringLiteral(String str)
+    {
+        int len = str.length();
+        for (int i = 0; i < len; i++)
+        {
+            addCharToLexer(str.charAt(i));
+        }
+    }
+
+    /**
+     * calls addCharToLexer for any char in the string till len is reached.
+     * @param str input String
+     * @param len length of the substring to be added
+     */
+    void addStringLiteralLen(String str, int len)
+    {
+        int strlen = str.length();
+        if (strlen < len)
+        {
+            len = strlen;
+        }
+        for (int i = 0; i < len; i++)
+        {
+            addCharToLexer(str.charAt(i));
+        }
+    }
+
+    /**
+     * Choose what version to use for new doctype.
+     * @return html version constant
+     */
+    public short htmlVersion()
+    {
+        if (TidyUtils.toBoolean(versions & Dict.VERS_HTML20))
+        {
+            return Dict.VERS_HTML20;
+        }
+
+        if (!(this.configuration.xmlOut | this.configuration.xmlTags | this.isvoyager)
+            && TidyUtils.toBoolean(versions & Dict.VERS_HTML32))
+        {
+            return Dict.VERS_HTML32;
+        }
+        if (TidyUtils.toBoolean(versions & Dict.VERS_XHTML11))
+        {
+            return Dict.VERS_XHTML11;
+        }
+        if (TidyUtils.toBoolean(versions & Dict.VERS_HTML40_STRICT))
+        {
+            return Dict.VERS_HTML40_STRICT;
+        }
+
+        if (TidyUtils.toBoolean(versions & Dict.VERS_HTML40_LOOSE))
+        {
+            return Dict.VERS_HTML40_LOOSE;
+        }
+
+        if (TidyUtils.toBoolean(versions & Dict.VERS_FRAMESET))
+        {
+            return Dict.VERS_FRAMESET;
+        }
+
+        return Dict.VERS_UNKNOWN;
+    }
+
+    /**
+     * Choose what version to use for new doctype.
+     * @return html version name
+     */
+    public String htmlVersionName()
+    {
+        short guessed;
+        int j;
+
+        guessed = apparentVersion();
+
+        for (j = 0; j < W3CVERSION.length; ++j)
+        {
+            if (guessed == W3CVERSION[j].code)
+            {
+                if (this.isvoyager)
+                {
+                    return W3CVERSION[j].voyagerName;
+                }
+
+                return W3CVERSION[j].name;
+            }
+        }
+
+        return null;
+    }
+
+    /**
+     * Add meta element for Tidy. If the meta tag is already present, update release date.
+     * @param root root node
+     * @return <code>true</code> if the tag has been added
+     */
+    public boolean addGenerator(Node root)
+    {
+        AttVal attval;
+        Node node;
+        Node head = root.findHEAD(this.configuration.tt);
+
+        if (head != null)
+        {
+            String meta = "HTML Tidy for Java (vers. " + Report.RELEASE_DATE_STRING + "), see www.w3.org";
+
+            for (node = head.content; node != null; node = node.next)
+            {
+                if (node.tag == this.configuration.tt.tagMeta)
+                {
+                    attval = node.getAttrByName("name");
+
+                    if (attval != null && attval.value != null && "generator".equalsIgnoreCase(attval.value))
+                    {
+                        attval = node.getAttrByName("content");
+
+                        if (attval != null
+                            && attval.value != null
+                            && attval.value.length() >= 9
+                            && "HTML Tidy".equalsIgnoreCase(attval.value.substring(0, 9)))
+                        {
+                            attval.value = meta;
+                            return false;
+                        }
+                    }
+                }
+            }
+
+            node = this.inferredTag("meta");
+            node.addAttribute("content", meta);
+            node.addAttribute("name", "generator");
+            head.insertNodeAtStart(node);
+            return true;
+        }
+
+        return false;
+    }
+
+    /**
+     * Check system keywords (keywords should be uppercase).
+     * @param doctype doctype node
+     * @return true if doctype keywords are all uppercase
+     */
+    public boolean checkDocTypeKeyWords(Node doctype)
+    {
+        int len = doctype.end - doctype.start;
+        String s = TidyUtils.getString(this.lexbuf, doctype.start, len);
+
+        return !(TidyUtils.findBadSubString("SYSTEM", s, len)
+            || TidyUtils.findBadSubString("PUBLIC", s, len)
+            || TidyUtils.findBadSubString("//DTD", s, len)
+            || TidyUtils.findBadSubString("//W3C", s, len) || TidyUtils.findBadSubString("//EN", s, len));
+    }
+
+    /**
+     * Examine DOCTYPE to identify version.
+     * @param doctype doctype node
+     * @return version code
+     */
+    public short findGivenVersion(Node doctype)
+    {
+        String p, s;
+        int i, j;
+        int len;
+        String str1;
+        String str2;
+
+        // if root tag for doctype isn't html give up now
+        str1 = TidyUtils.getString(this.lexbuf, doctype.start, 5);
+        if (!"html ".equalsIgnoreCase(str1))
+        {
+            return 0;
+        }
+
+        if (!checkDocTypeKeyWords(doctype))
+        {
+            report.warning(this, doctype, null, Report.DTYPE_NOT_UPPER_CASE);
+        }
+
+        // give up if all we are given is the system id for the doctype
+        str1 = TidyUtils.getString(this.lexbuf, doctype.start + 5, 7);
+        if ("SYSTEM ".equalsIgnoreCase(str1))
+        {
+            // but at least ensure the case is correct
+            if (!str1.substring(0, 6).equals("SYSTEM"))
+            {
+                System.arraycopy(TidyUtils.getBytes("SYSTEM"), 0, this.lexbuf, doctype.start + 5, 6);
+            }
+            return 0; // unrecognized
+        }
+
+        if ("PUBLIC ".equalsIgnoreCase(str1))
+        {
+            if (!str1.substring(0, 6).equals("PUBLIC"))
+            {
+                System.arraycopy(TidyUtils.getBytes("PUBLIC "), 0, this.lexbuf, doctype.start + 5, 6);
+            }
+        }
+        else
+        {
+            this.badDoctype = true;
+        }
+
+        for (i = doctype.start; i < doctype.end; ++i)
+        {
+            if (this.lexbuf[i] == (byte) '"')
+            {
+                str1 = TidyUtils.getString(this.lexbuf, i + 1, 12);
+                str2 = TidyUtils.getString(this.lexbuf, i + 1, 13);
+                if (str1.equals("-//W3C//DTD "))
+                {
+                    // compute length of identifier e.g. "HTML 4.0 Transitional"
+                    for (j = i + 13; j < doctype.end && this.lexbuf[j] != (byte) '/'; ++j)
+                    {
+                        //
+                    }
+                    len = j - i - 13;
+                    p = TidyUtils.getString(this.lexbuf, i + 13, len);
+
+                    for (j = 1; j < W3CVERSION.length; ++j)
+                    {
+                        s = W3CVERSION[j].name;
+                        if (len == s.length() && s.equals(p))
+                        {
+                            return W3CVERSION[j].code;
+                        }
+                    }
+
+                    // else unrecognized version
+                }
+                else if (str2.equals("-//IETF//DTD "))
+                {
+                    // compute length of identifier e.g. "HTML 2.0"
+                    for (j = i + 14; j < doctype.end && this.lexbuf[j] != (byte) '/'; ++j)
+                    {
+                        //
+                    }
+                    len = j - i - 14;
+
+                    p = TidyUtils.getString(this.lexbuf, i + 14, len);
+                    s = W3CVERSION[0].name;
+                    if (len == s.length() && s.equals(p))
+                    {
+                        return W3CVERSION[0].code;
+                    }
+
+                    // else unrecognized version
+                }
+                break;
+            }
+        }
+
+        return 0;
+    }
+
+    /**
+     * Fix xhtml namespace.
+     * @param root root Node
+     * @param profile current profile
+     */
+    public void fixHTMLNameSpace(Node root, String profile)
+    {
+        Node node;
+        AttVal attr;
+
+        node = root.content;
+        while (node != null && node.tag != this.configuration.tt.tagHtml)
+        {
+            node = node.next;
+        }
+
+        if (node != null)
+        {
+
+            for (attr = node.attributes; attr != null; attr = attr.next)
+            {
+                if (attr.attribute.equals("xmlns"))
+                {
+                    break;
+                }
+
+            }
+
+            if (attr != null)
+            {
+                if (!attr.value.equals(profile))
+                {
+                    report.warning(this, node, null, Report.INCONSISTENT_NAMESPACE);
+                    attr.value = profile;
+                }
+            }
+            else
+            {
+                attr = new AttVal(node.attributes, null, '"', "xmlns", profile);
+                attr.dict = AttributeTable.getDefaultAttributeTable().findAttribute(attr);
+                node.attributes = attr;
+            }
+        }
+    }
+
+    /**
+     * Put DOCTYPE declaration between the &lt:?xml version "1.0" ... ?&gt; declaration, if any, and the
+     * <code>html</code> tag. Should also work for any comments, etc. that may precede the <code>html</code> tag.
+     * @param root root node
+     * @return new doctype node
+     */
+    Node newXhtmlDocTypeNode(Node root)
+    {
+        Node html = root.findHTML(this.configuration.tt);
+        if (html == null)
+        {
+            return null;
+        }
+
+        Node newdoctype = newNode();
+        newdoctype.setType(Node.DOCTYPE_TAG);
+        newdoctype.next = html;
+        newdoctype.parent = root;
+        newdoctype.prev = null;
+
+        if (html == root.content)
+        {
+            // No <?xml ... ?> declaration.
+            root.content.prev = newdoctype;
+            root.content = newdoctype;
+            newdoctype.prev = null;
+        }
+        else
+        {
+            // we have an <?xml ... ?> declaration.
+            newdoctype.prev = html.prev;
+            newdoctype.prev.next = newdoctype;
+        }
+        html.prev = newdoctype;
+        return newdoctype;
+    }
+
+    /**
+     * Adds a new xhtml doctype to the document.
+     * @param root root node
+     * @return <code>true</code> if a doctype has been added
+     */
+    public boolean setXHTMLDocType(Node root)
+    {
+        String fpi = " ";
+        String sysid = "";
+        String namespace = XHTML_NAMESPACE;
+        String dtdsub = null;
+        Node doctype;
+        int dtdlen = 0;
+
+        if ( this.configuration.docTypeMode == Configuration.DOCTYPE_IGNORE)
+        {
+            return true;
+        }
+
+        doctype = root.findDocType();
+
+        fixHTMLNameSpace(root, namespace); // #427839 - fix by Evan Lenz 05 Sep 00
+
+        if (this.configuration.docTypeMode == Configuration.DOCTYPE_OMIT)
+        {
+            if (doctype != null)
+            {
+                Node.discardElement(doctype);
+            }
+            return true;
+        }
+
+        if (this.configuration.docTypeMode == Configuration.DOCTYPE_AUTO)
+        {
+            // see what flavor of XHTML this document matches
+            if (TidyUtils.toBoolean(this.versions & Dict.VERS_HTML40_STRICT))
+            {
+                // use XHTML strict
+                fpi = "-//W3C//DTD XHTML 1.0 Strict//EN";
+                sysid = VOYAGER_STRICT;
+            }
+            else if (TidyUtils.toBoolean(this.versions & Dict.VERS_FRAMESET))
+            {
+                // use XHTML frames
+                fpi = "-//W3C//DTD XHTML 1.0 Frameset//EN";
+                sysid = VOYAGER_FRAMESET;
+            }
+            else if (TidyUtils.toBoolean(this.versions & Dict.VERS_LOOSE))
+            {
+                fpi = "-//W3C//DTD XHTML 1.0 Transitional//EN";
+                sysid = VOYAGER_LOOSE;
+            }
+            else if (TidyUtils.toBoolean(this.versions & Dict.VERS_XHTML11))
+            {
+                // use XHTML 1.1
+                fpi = "-//W3C//DTD XHTML 1.1//EN";
+                sysid = VOYAGER_11;
+            }
+            else
+            {
+                // proprietary
+                fpi = null;
+                sysid = "";
+                if (doctype != null)// #473490 - fix by Bjoern Hoehrmann 10 Oct 01
+                {
+                    Node.discardElement(doctype);
+                }
+            }
+        }
+        else if (this.configuration.docTypeMode == Configuration.DOCTYPE_STRICT)
+        {
+            fpi = "-//W3C//DTD XHTML 1.0 Strict//EN";
+            sysid = VOYAGER_STRICT;
+        }
+        else if (this.configuration.docTypeMode == Configuration.DOCTYPE_LOOSE)
+        {
+            fpi = "-//W3C//DTD XHTML 1.0 Transitional//EN";
+            sysid = VOYAGER_LOOSE;
+        }
+
+        if (this.configuration.docTypeMode == Configuration.DOCTYPE_USER && this.configuration.docTypeStr != null)
+        {
+            fpi = this.configuration.docTypeStr;
+            sysid = "";
+        }
+
+        if (fpi == null)
+        {
+            return false;
+        }
+
+        if (doctype != null)
+        {
+            // Look for internal DTD subset
+            if (configuration.xHTML || configuration.xmlOut)
+            {
+
+                int len = doctype.end - doctype.start + 1;
+                String start = TidyUtils.getString(this.lexbuf, doctype.start, len);
+
+                int dtdbeg = start.indexOf('[');
+                if (dtdbeg >= 0)
+                {
+                    int dtdend = start.substring(dtdbeg).indexOf(']');
+                    if (dtdend >= 0)
+                    {
+                        dtdlen = dtdend + 1;
+                        dtdsub = start.substring(dtdbeg);
+                    }
+                }
+            }
+        }
+        else
+        {
+            if ((doctype = newXhtmlDocTypeNode(root)) == null)
+            {
+                return false;
+            }
+        }
+
+        this.txtstart = this.lexsize;
+        this.txtend = this.lexsize;
+
+        // add public identifier
+        addStringLiteral("html PUBLIC ");
+
+        // check if the fpi is quoted or not
+        if (fpi.charAt(0) == '"')
+        {
+            addStringLiteral(fpi);
+        }
+        else
+        {
+            addStringLiteral("\"");
+            addStringLiteral(fpi);
+            addStringLiteral("\"");
+        }
+
+        if (this.configuration.wraplen != 0 && sysid.length() + 6 >= this.configuration.wraplen)
+        {
+            addStringLiteral("\n\"");
+        }
+        else
+        {
+            // FG: don't wrap
+            addStringLiteral(" \"");
+        }
+
+        // add system identifier
+        addStringLiteral(sysid);
+        addStringLiteral("\"");
+
+        if (dtdlen > 0 && dtdsub != null)
+        {
+            addCharToLexer(' ');
+            addStringLiteralLen(dtdsub, dtdlen);
+        }
+
+        this.txtend = this.lexsize;
+
+        int length = this.txtend - this.txtstart;
+        doctype.textarray = new byte[length];
+
+        System.arraycopy(this.lexbuf, this.txtstart, doctype.textarray, 0, length);
+        doctype.start = 0;
+        doctype.end = length;
+
+        return false;
+    }
+
+    /**
+     * Return the html version used in document.
+     * @return version code
+     */
+    public short apparentVersion()
+    {
+        switch (this.doctype)
+        {
+            case Dict.VERS_UNKNOWN :
+                return htmlVersion();
+
+            case Dict.VERS_HTML20 :
+                if (TidyUtils.toBoolean(this.versions & Dict.VERS_HTML20))
+                {
+                    return Dict.VERS_HTML20;
+                }
+
+                break;
+
+            case Dict.VERS_HTML32 :
+                if (TidyUtils.toBoolean(this.versions & Dict.VERS_HTML32))
+                {
+                    return Dict.VERS_HTML32;
+                }
+
+                break; // to replace old version by new
+
+            case Dict.VERS_HTML40_STRICT :
+                if (TidyUtils.toBoolean(this.versions & Dict.VERS_HTML40_STRICT))
+                {
+                    return Dict.VERS_HTML40_STRICT;
+                }
+
+                break;
+
+            case Dict.VERS_HTML40_LOOSE :
+                if (TidyUtils.toBoolean(this.versions & Dict.VERS_HTML40_LOOSE))
+                {
+                    return Dict.VERS_HTML40_LOOSE;
+                }
+
+                break; // to replace old version by new
+
+            case Dict.VERS_FRAMESET :
+                if (TidyUtils.toBoolean(this.versions & Dict.VERS_FRAMESET))
+                {
+                    return Dict.VERS_FRAMESET;
+                }
+
+                break;
+
+            case Dict.VERS_XHTML11 :
+                if (TidyUtils.toBoolean(this.versions & Dict.VERS_XHTML11))
+                {
+                    return Dict.VERS_XHTML11;
+                }
+
+                break;
+            default :
+                // should never reach here
+                break;
+        }
+
+        // kludge to avoid error appearing at end of file
+        // it would be better to note the actual position
+        // when first encountering the doctype declaration
+
+        this.lines = 1;
+        this.columns = 1;
+
+        report.warning(this, null, null, Report.INCONSISTENT_VERSION);
+        return this.htmlVersion();
+    }
+
+    /**
+     * Fixup doctype if missing.
+     * @param root root node
+     * @return <code>false</code> if current version has not been identified
+     */
+    public boolean fixDocType(Node root)
+    {
+        Node doctype;
+        int guessed = Dict.VERS_HTML40_STRICT, i;
+
+        if (this.badDoctype)
+        {
+            report.warning(this, null, null, Report.MALFORMED_DOCTYPE);
+        }
+
+        doctype = root.findDocType();
+
+        if (this.configuration.docTypeMode == Configuration.DOCTYPE_OMIT)
+        {
+            if (doctype != null)
+            {
+                Node.discardElement(doctype);
+            }
+            return true;
+        }
+
+        if (this.configuration.xmlOut || this.configuration.docTypeMode == Configuration.DOCTYPE_IGNORE)
+        {
+            return true;
+        }
+
+        if (this.configuration.docTypeMode == Configuration.DOCTYPE_STRICT)
+        {
+            Node.discardElement(doctype);
+            doctype = null;
+            guessed = Dict.VERS_HTML40_STRICT;
+        }
+        else if (this.configuration.docTypeMode == Configuration.DOCTYPE_LOOSE)
+        {
+            Node.discardElement(doctype);
+            doctype = null;
+            guessed = Dict.VERS_HTML40_LOOSE;
+        }
+        else if (this.configuration.docTypeMode == Configuration.DOCTYPE_AUTO)
+        {
+            if (doctype != null)
+            {
+                if (this.doctype == Dict.VERS_UNKNOWN)
+                {
+                    return false;
+                }
+
+                switch (this.doctype)
+                {
+                    case Dict.VERS_UNKNOWN :
+                        return false;
+
+                    case Dict.VERS_HTML20 :
+                        if (TidyUtils.toBoolean(this.versions & Dict.VERS_HTML20))
+                        {
+                            return true;
+                        }
+
+                        break; // to replace old version by new
+
+                    case Dict.VERS_HTML32 :
+                        if (TidyUtils.toBoolean(this.versions & Dict.VERS_HTML32))
+                        {
+                            return true;
+                        }
+
+                        break; // to replace old version by new
+
+                    case Dict.VERS_HTML40_STRICT :
+                        if (TidyUtils.toBoolean(this.versions & Dict.VERS_HTML40_STRICT))
+                        {
+                            return true;
+                        }
+
+                        break; // to replace old version by new
+
+                    case Dict.VERS_HTML40_LOOSE :
+                        if (TidyUtils.toBoolean(this.versions & Dict.VERS_HTML40_LOOSE))
+                        {
+                            return true;
+                        }
+
+                        break; // to replace old version by new
+
+                    case Dict.VERS_FRAMESET :
+                        if (TidyUtils.toBoolean(this.versions & Dict.VERS_FRAMESET))
+                        {
+                            return true;
+                        }
+
+                        break; // to replace old version by new
+
+                    case Dict.VERS_XHTML11 :
+                        if (TidyUtils.toBoolean(this.versions & Dict.VERS_XHTML11))
+                        {
+                            return true;
+                        }
+
+                        break; // to replace old version by new
+                    default :
+                        // should never reach here
+                        break;
+                }
+
+                // INCONSISTENT_VERSION warning is now issued by ApparentVersion()
+            }
+
+            // choose new doctype
+            guessed = htmlVersion();
+        }
+
+        if (guessed == Dict.VERS_UNKNOWN)
+        {
+            return false;
+        }
+
+        // for XML use the Voyager system identifier
+        if (this.configuration.xmlOut || this.configuration.xmlTags || this.isvoyager)
+        {
+            if (doctype != null)
+            {
+                Node.discardElement(doctype);
+            }
+
+            fixHTMLNameSpace(root, XHTML_NAMESPACE);
+
+            // Namespace is the same for all XHTML variants
+            // Also, don't return yet. Still need to add DOCTYPE declaration.
+            //
+            // for (i = 0; i < W3CVersion.length; ++i)
+            // {
+            // if (guessed == W3CVersion[i].code)
+            // {
+            // fixHTMLNameSpace(root, W3CVersion[i].profile);
+            // break;
+            // }
+            // }
+            // return true;
+        }
+
+        if (doctype == null)
+        {
+            if ((doctype = newXhtmlDocTypeNode(root)) == null)
+            {
+                return false;
+            }
+        }
+
+        this.txtstart = this.lexsize;
+        this.txtend = this.lexsize;
+
+        // use the appropriate public identifier
+        addStringLiteral("html PUBLIC ");
+
+        if (this.configuration.docTypeMode == Configuration.DOCTYPE_USER
+            && this.configuration.docTypeStr != null
+            && this.configuration.docTypeStr.length() > 0)
+        {
+            // check if the fpi is quoted or not
+            if (this.configuration.docTypeStr.charAt(0) == '"')
+            {
+                addStringLiteral(this.configuration.docTypeStr);
+            }
+            else
+            {
+                addStringLiteral("\""); // #431889 - fix by Dave Bryan 04 Jan 2001
+                addStringLiteral(this.configuration.docTypeStr);
+                addStringLiteral("\""); // #431889 - fix by Dave Bryan 04 Jan 2001
+            }
+        }
+        else if (guessed == Dict.VERS_HTML20)
+        {
+            addStringLiteral("\"-//IETF//DTD HTML 2.0//EN\"");
+        }
+        else
+        {
+            addStringLiteral("\"-//W3C//DTD ");
+
+            for (i = 0; i < W3CVERSION.length; ++i)
+            {
+                if (guessed == W3CVERSION[i].code)
+                {
+                    addStringLiteral(W3CVERSION[i].name);
+                    break;
+                }
+            }
+
+            addStringLiteral("//EN\"");
+        }
+
+        this.txtend = this.lexsize;
+
+        int length = this.txtend - this.txtstart;
+        doctype.textarray = new byte[length];
+
+        System.arraycopy(this.lexbuf, this.txtstart, doctype.textarray, 0, length);
+        doctype.start = 0;
+        doctype.end = length;
+
+        return true;
+    }
+
+    /**
+     * Ensure XML document starts with <code>&lt;?XML version="1.0"?&gt;</code>. Add encoding attribute if not using
+     * ASCII or UTF-8 output.
+     * @param root root node
+     * @return always true
+     */
+    public boolean fixXmlDecl(Node root)
+    {
+        Node xml;
+        AttVal version;
+        AttVal encoding;
+
+        if (root.content != null && root.content.type == Node.XML_DECL)
+        {
+            xml = root.content;
+        }
+        else
+        {
+            xml = newNode(Node.XML_DECL, this.lexbuf, 0, 0);
+            xml.next = root.content;
+
+            if (root.content != null)
+            {
+                root.content.prev = xml;
+                xml.next = root.content;
+            }
+
+            root.content = xml;
+        }
+
+        version = xml.getAttrByName("version");
+        encoding = xml.getAttrByName("encoding");
+
+        // We need to insert a check if declared encoding and output encoding mismatch
+        // and fix the Xml declaration accordingly!!!
+        if (encoding == null && this.configuration.getOutCharEncoding() != Configuration.UTF8)
+        {
+            if (this.configuration.getOutCharEncoding() == Configuration.LATIN1)
+            {
+                xml.addAttribute("encoding", "iso-8859-1");
+            }
+            if (this.configuration.getOutCharEncoding() == Configuration.ISO2022)
+            {
+                xml.addAttribute("encoding", "iso-2022");
+            }
+        }
+
+        if (version == null)
+        {
+            xml.addAttribute("version", "1.0");
+        }
+
+        return true;
+    }
+
+    
+    /**
+     * Generates and inserts a new node.
+     * @param name tag name
+     * @return generated node
+     */
+    public Node inferredTag(String name)
+    {
+        Node node;
+
+        node = newNode(Node.START_TAG, this.lexbuf, this.txtstart, this.txtend, name);
+        node.implicit = true;
+        return node;
+    }
+
+    /**
+     * Create a text node for the contents of a CDATA element like style or script which ends with &lt;/foo> for some
+     * foo.
+     * @param container container node
+     * @return cdata node
+     */
+    public Node getCDATA(Node container)
+    {
+        int c, lastc, prelastc, start, len, i;
+        int qt = 0;
+        int esc = 0;
+        String str="";
+        boolean endtag = false;
+        boolean begtag = false;
+        boolean cdata = false;
+        boolean comment = false;
+
+        if (container.isJavaScript())
+        {
+            esc = '\\';
+        }
+
+        this.lines = this.in.getCurline();
+        this.columns = this.in.getCurcol();
+        this.waswhite = false;
+        this.txtstart = this.lexsize;
+        this.txtend = this.lexsize;
+
+        lastc = '\0';
+        prelastc = '\0';
+        start = -1;
+
+        while ((c = this.in.readChar()) != StreamIn.END_OF_STREAM)
+        {
+            // treat \r\n as \n and \r as \n
+            if (qt > 0)
+            {
+                // #598860 script parsing fails with quote chars
+                // A quoted string is ended by the quotation character, or end of line
+                if ((c == '\r' || c == '\n' || c == qt) && (!TidyUtils.toBoolean(esc) || lastc != esc))
+                {
+                    qt = 0;
+                }
+                else if (c == '/' && lastc == '<')
+                {
+                    start = this.lexsize + 1; // to first letter
+                }
+
+                else if (c == '>' && start >= 0)
+                {
+                    len = this.lexsize - start;
+
+                    this.lines = this.in.getCurline();
+                    this.columns = this.in.getCurcol() - 3;
+
+                    report.warning(this, null, null, Report.BAD_CDATA_CONTENT);
+
+                    // if javascript insert backslash before /
+                    if (TidyUtils.toBoolean(esc))
+                    {
+                        for (i = this.lexsize; i > start - 1; --i)
+                        {
+                            this.lexbuf[i] = this.lexbuf[i - 1];
+                        }
+
+                        this.lexbuf[start - 1] = (byte) esc;
+                        this.lexsize++;
+                    }
+
+                    start = -1;
+                }
+            }
+            else if (TidyUtils.isQuote(c) && (!TidyUtils.toBoolean(esc) || lastc != esc))
+            {
+                qt = c;
+            }
+            else if (c == '<' && !cdata && !comment)
+            {
+                start = this.lexsize + 1; // to first letter
+                endtag = false;
+                begtag = true;
+            }
+//            else if (c == '!' && lastc == '<') // Cancel start tag
+//            {
+//                start = -1;
+//                endtag = false;
+//                begtag = false;
+//            }
+            // Fix CDATA and comments.
+            else if( c == '[' && this.lexsize >= 8 && TidyUtils.getString(this.lexbuf, this.lexsize-8, 8).equals("<![CDATA")){
+            	cdata = true;
+            }
+            else if( c == '-' && lastc == '-' && this.lexsize >= 3 && TidyUtils.getString(this.lexbuf, this.lexsize-3, 3).equals("<!-")){
+            	comment = true;
+            	if(cdata || this.configuration.xHTML ){
+            		this.lexsize -= 3;
+            		continue;
+            	}
+            }
+            else if (c == '/' && lastc == '<' && !cdata && !comment)
+            {
+                start = this.lexsize + 1; // to first letter
+                endtag = true;
+                begtag = false;
+                str = "";
+            }
+            else if( c == '>' && cdata && lastc == ']' && prelastc == ']'){
+            	cdata = false;
+            }
+            else if( c == '>' && comment && lastc == '-' && prelastc == '-'){
+            	comment = false;
+            	if(cdata || this.configuration.xHTML ){
+            		this.lexsize -= 2;
+            		continue;
+            	}
+            }
+            else if (c == '>' && start >= 0) // End of begin or end tag
+            {
+                int decr = 2;
+
+                if (endtag)
+                {
+
+//                    str = TidyUtils.getString(this.lexbuf, start, len);
+                    if (container.element.equalsIgnoreCase(str))
+                    {
+                        this.txtend = start - decr;
+                        this.lexsize = start - decr; // #433857 - fix by Huajun Zeng 26 Apr 01
+                        break;
+                    }
+                }
+
+                // Unquoted markup will end SCRIPT or STYLE elements
+
+                this.lines = this.in.getCurline();
+                this.columns = this.in.getCurcol() - 3;
+
+                report.warning(this, null, null, Report.BAD_CDATA_CONTENT);
+                if (begtag)
+                {
+                    decr = 1;
+                }
+                this.txtend = start - decr;
+                this.lexsize = start - decr;
+                break;
+            }
+            // #427844 - fix by Markus Hoenicka 21 Oct 00
+            else if (c == '\r')
+            {
+//                if (begtag || endtag)
+//                {
+//                    continue; // discard whitespace in endtag
+//                }
+
+                c = this.in.readChar();
+
+                if (c != '\n')
+                {
+                    this.in.ungetChar(c);
+                }
+
+                c = '\n';
+
+            }
+//            else if ((c == '\n' || c == '\t' || c == ' ') && (endtag))
+//            {
+//                continue; // discard whitespace in endtag
+//            }
+            if (endtag && TidyUtils.isNamechar((char) c) ) {
+				str = str + (char) c;
+			}
+            if(begtag && !TidyUtils.isNamechar((char) c)){
+            	if(lastc == '<' || ( qt == 0 && c !='=' && c !=';' && !TidyUtils.isWhite((char) c)) ){
+                    start = -1;
+                    endtag = false;
+                    begtag = false;
+            	}
+            }
+
+            addCharToLexer(c);
+            this.txtend = this.lexsize;
+            prelastc = lastc;
+            lastc = c;
+        }
+
+        if (c == StreamIn.END_OF_STREAM)
+        {
+            report.warning(this, container, null, Report.MISSING_ENDTAG_FOR);
+        }
+
+        if (this.txtend > this.txtstart)
+        {
+            this.token = newNode(Node.TEXT_NODE, this.lexbuf, this.txtstart, this.txtend);
+            return this.token;
+        }
+
+        return null;
+    }
+
+    /**
+     * 
+     *
+     */
+    public void ungetToken()
+    {
+        this.pushed = true;
+    }
+
+    /**
+     * Gets a token.
+     * @param mode one of the following:
+     * <ul>
+     * <li><code>MixedContent</code>-- for elements which don't accept PCDATA</li>
+     * <li><code>Preformatted</code>-- white spacepreserved as is</li>
+     * <li><code>IgnoreMarkup</code>-- for CDATA elements such as script, style</li>
+     * </ul>
+     * @return next Node
+     */
+    public Node getToken(short mode)
+    {
+        int c = 0;
+        int badcomment = 0;
+        // pass by reference
+        boolean[] isempty = new boolean[1];
+        boolean inDTDSubset = false;
+        AttVal attributes = null;
+        short basemode = mode;
+
+        if (this.pushed)
+        {
+            // duplicate inlines in preference to pushed text nodes when appropriate
+            if (this.token.type != Node.TEXT_NODE || (this.insert == -1 && this.inode == null))
+            {
+                this.pushed = false;
+                return this.token;
+            }
+        }
+
+        // at start of block elements, unclosed inline
+        if (this.insert != -1 || this.inode != null)
+        {
+            return insertedToken();
+        }
+
+        this.lines = this.in.getCurline();
+        this.columns = this.in.getCurcol();
+        this.waswhite = false;
+
+        this.txtstart = this.lexsize;
+        this.txtend = this.lexsize;
+
+        while ((c = this.in.readChar()) != StreamIn.END_OF_STREAM)
+        {
+            // FG fix for [427846] different from tidy
+            // if (this.insertspace && (!TidyUtils.toBoolean(mode & IGNORE_WHITESPACE)))
+            if (this.insertspace && mode != IGNORE_WHITESPACE)
+            {
+                addCharToLexer(' ');
+            }
+            if (this.insertspace && (!TidyUtils.toBoolean(mode & IGNORE_WHITESPACE)))
+            {
+                this.waswhite = true;
+                this.insertspace = false;
+            }
+
+            // treat \r\n as \n and \r as \n
+            if (c == '\r')
+            {
+                c = this.in.readChar();
+
+                if (c != '\n')
+                {
+                    this.in.ungetChar(c);
+                }
+
+                c = '\n';
+            }
+
+            addCharToLexer(c);
+
+            switch (this.state)
+            {
+                case LEX_CONTENT :
+                    // element content
+
+                    // Discard white space if appropriate.
+                    // Its cheaper to do this here rather than in parser methods for elements that
+                    // don't have mixed content.
+                    if (TidyUtils.isWhite((char) c) && (mode == IGNORE_WHITESPACE) && this.lexsize == this.txtstart + 1)
+                    {
+                        --this.lexsize;
+                        this.waswhite = false;
+                        this.lines = this.in.getCurline();
+                        this.columns = this.in.getCurcol();
+                        continue;
+                    }
+
+                    if (c == '<')
+                    {
+                        this.state = LEX_GT;
+                        continue;
+                    }
+
+                    if (TidyUtils.isWhite((char) c))
+                    {
+                        // was previous char white?
+                        if (this.waswhite)
+                        {
+                            if (mode != PREFORMATTED && mode != IGNORE_MARKUP)
+                            {
+                                --this.lexsize;
+                                this.lines = this.in.getCurline();
+                                this.columns = this.in.getCurcol();
+                            }
+                        }
+                        else
+                        {
+                            // prev char wasn't white
+                            this.waswhite = true;
+
+                            if (mode != PREFORMATTED && mode != IGNORE_MARKUP && c != ' ')
+                            {
+                                changeChar((byte) ' ');
+                            }
+                        }
+
+                        continue;
+                    }
+                    else if (c == '&' && mode != IGNORE_MARKUP)
+                    {
+                        parseEntity(mode);
+                    }
+
+                    // this is needed to avoid trimming trailing whitespace
+                    if (mode == IGNORE_WHITESPACE)
+                    {
+                        mode = MIXED_CONTENT;
+                    }
+
+                    this.waswhite = false;
+                    continue;
+
+                case LEX_GT :
+                    // <
+
+                    // check for endtag
+                    if (c == '/')
+                    {
+                        c = this.in.readChar();
+                        if (c == StreamIn.END_OF_STREAM)
+                        {
+                            this.in.ungetChar(c);
+                            continue;
+                        }
+
+                        addCharToLexer(c);
+
+                        if (TidyUtils.isLetter((char) c))
+                        {
+                            this.lexsize -= 3;
+                            this.txtend = this.lexsize;
+                            this.in.ungetChar(c);
+                            this.state = LEX_ENDTAG;
+                            this.lexbuf[this.lexsize] = (byte) '\0'; // debug
+
+                            // changed from
+                            // this.in.curcol -= 2;
+                            this.columns -= 2;
+
+                            // if some text before the </ return it now
+                            if (this.txtend > this.txtstart)
+                            {
+                                // trim space char before end tag
+                                if (mode == IGNORE_WHITESPACE && this.lexbuf[this.lexsize - 1] == (byte) ' ')
+                                {
+                                    this.lexsize -= 1;
+                                    this.txtend = this.lexsize;
+                                }
+
+                                this.token = newNode(Node.TEXT_NODE, this.lexbuf, this.txtstart, this.txtend);
+                                return this.token;
+                            }
+
+                            continue; // no text so keep going
+                        }
+
+                        // otherwise treat as CDATA
+                        this.waswhite = false;
+                        this.state = LEX_CONTENT;
+                        continue;
+                    }
+
+                    if (mode == IGNORE_MARKUP)
+                    {
+                        // otherwise treat as CDATA
+                        this.waswhite = false;
+                        this.state = LEX_CONTENT;
+                        continue;
+                    }
+
+                    // look out for comments, doctype or marked sections this isn't quite right, but its getting there
+                    if (c == '!')
+                    {
+                        c = this.in.readChar();
+
+                        if (c == '-')
+                        {
+                            c = this.in.readChar();
+
+                            if (c == '-')
+                            {
+                                this.state = LEX_COMMENT; // comment
+                                this.lexsize -= 2;
+                                this.txtend = this.lexsize;
+
+                                // if some text before < return it now
+                                if (this.txtend > this.txtstart)
+                                {
+                                    this.token = newNode(Node.TEXT_NODE, this.lexbuf, this.txtstart, this.txtend);
+                                    return this.token;
+                                }
+
+                                this.txtstart = this.lexsize;
+                                continue;
+                            }
+
+                            report.warning(this, null, null, Report.MALFORMED_COMMENT);
+                        }
+                        else if (c == 'd' || c == 'D')
+                        {
+                            this.state = LEX_DOCTYPE; // doctype
+                            this.lexsize -= 2;
+                            this.txtend = this.lexsize;
+                            mode = IGNORE_WHITESPACE;
+
+                            // skip until white space or '>'
+
+                            for (;;)
+                            {
+                                c = this.in.readChar();
+
+                                if (c == StreamIn.END_OF_STREAM || c == '>')
+                                {
+                                    this.in.ungetChar(c);
+                                    break;
+                                }
+
+                                if (!TidyUtils.isWhite((char) c))
+                                {
+                                    continue;
+                                }
+
+                                // and skip to end of whitespace
+
+                                for (;;)
+                                {
+                                    c = this.in.readChar();
+
+                                    if (c == StreamIn.END_OF_STREAM || c == '>')
+                                    {
+                                        this.in.ungetChar(c);
+                                        break;
+                                    }
+
+                                    if (TidyUtils.isWhite((char) c))
+                                    {
+                                        continue;
+                                    }
+
+                                    this.in.ungetChar(c);
+                                    break;
+                                }
+
+                                break;
+                            }
+
+                            // if some text before < return it now
+                            if (this.txtend > this.txtstart)
+                            {
+                                this.token = newNode(Node.TEXT_NODE, this.lexbuf, this.txtstart, this.txtend);
+                                return this.token;
+                            }
+
+                            this.txtstart = this.lexsize;
+                            continue;
+                        }
+                        else if (c == '[')
+                        {
+                            // Word 2000 embeds <![if ...]> ... <![endif]> sequences
+                            this.lexsize -= 2;
+                            this.state = LEX_SECTION;
+                            this.txtend = this.lexsize;
+
+                            // if some text before < return it now
+                            if (this.txtend > this.txtstart)
+                            {
+                                this.token = newNode(Node.TEXT_NODE, this.lexbuf, this.txtstart, this.txtend);
+                                return this.token;
+                            }
+
+                            this.txtstart = this.lexsize;
+                            continue;
+                        }
+
+                        // otherwise swallow chars up to and including next '>'
+                        while (true)
+                        {
+                            c = this.in.readChar();
+                            if (c == '>')
+                            {
+                                break;
+                            }
+                            if (c == -1)
+                            {
+                                this.in.ungetChar(c);
+                                break;
+                            }
+                        }
+
+                        this.lexsize -= 2;
+                        this.lexbuf[this.lexsize] = (byte) '\0';
+                        this.state = LEX_CONTENT;
+                        continue;
+                    }
+
+                    // processing instructions
+
+                    if (c == '?')
+                    {
+                        this.lexsize -= 2;
+                        this.state = LEX_PROCINSTR;
+                        this.txtend = this.lexsize;
+
+                        // if some text before < return it now
+                        if (this.txtend > this.txtstart)
+                        {
+                            this.token = newNode(Node.TEXT_NODE, this.lexbuf, this.txtstart, this.txtend);
+                            return this.token;
+                        }
+
+                        this.txtstart = this.lexsize;
+                        continue;
+                    }
+
+                    // Microsoft ASP's e.g. <% ... server-code ... %>
+                    if (c == '%')
+                    {
+                        this.lexsize -= 2;
+                        this.state = LEX_ASP;
+                        this.txtend = this.lexsize;
+
+                        // if some text before < return it now
+                        if (this.txtend > this.txtstart)
+                        {
+                            this.token = newNode(Node.TEXT_NODE, this.lexbuf, this.txtstart, this.txtend);
+                            return this.token;
+                        }
+
+                        this.txtstart = this.lexsize;
+                        continue;
+                    }
+
+                    // Netscapes JSTE e.g. <# ... server-code ... #>
+                    if (c == '#')
+                    {
+                        this.lexsize -= 2;
+                        this.state = LEX_JSTE;
+                        this.txtend = this.lexsize;
+
+                        // if some text before < return it now
+                        if (this.txtend > this.txtstart)
+                        {
+                            this.token = newNode(Node.TEXT_NODE, this.lexbuf, this.txtstart, this.txtend);
+                            return this.token;
+                        }
+
+                        this.txtstart = this.lexsize;
+                        continue;
+                    }
+
+                    // check for start tag
+                    if (TidyUtils.isLetter((char) c))
+                    {
+                        this.in.ungetChar(c); // push back letter
+                        this.lexsize -= 2; // discard " <" + letter
+                        this.txtend = this.lexsize;
+                        this.state = LEX_STARTTAG; // ready to read tag name
+
+                        // if some text before < return it now
+                        if (this.txtend > this.txtstart)
+                        {
+                            this.token = newNode(Node.TEXT_NODE, this.lexbuf, this.txtstart, this.txtend);
+                            return this.token;
+                        }
+
+                        continue; // no text so keep going
+                    }
+
+                    // otherwise treat as CDATA
+                    this.state = LEX_CONTENT;
+                    this.waswhite = false;
+                    continue;
+
+                case LEX_ENDTAG :
+                    // </letter
+                    this.txtstart = this.lexsize - 1;
+
+                    // changed from
+                    // this.in.curcol -= 2;
+                    this.columns -= 2;
+
+                    c = parseTagName();
+                    this.token = newNode(Node.END_TAG, // create endtag token
+                        this.lexbuf, this.txtstart, this.txtend, TidyUtils.getString(
+                            this.lexbuf,
+                            this.txtstart,
+                            this.txtend - this.txtstart));
+                    this.lexsize = this.txtstart;
+                    this.txtend = this.txtstart;
+
+                    // skip to '>'
+                    while (c != '>')
+                    {
+                        c = this.in.readChar();
+
+                        if (c == StreamIn.END_OF_STREAM)
+                        {
+                            break;
+                        }
+                    }
+
+                    if (c == StreamIn.END_OF_STREAM)
+                    {
+                        this.in.ungetChar(c);
+                        continue;
+                    }
+
+                    this.state = LEX_CONTENT;
+                    this.waswhite = false;
+                    return this.token; // the endtag token
+
+                case LEX_STARTTAG :
+                    // first letter of tagname
+                    this.txtstart = this.lexsize - 1; // set txtstart to first letter
+                    c = parseTagName();
+                    isempty[0] = false;
+                    attributes = null;
+                    this.token = newNode(
+                        (isempty[0] ? Node.START_END_TAG : Node.START_TAG),
+                        this.lexbuf,
+                        this.txtstart,
+                        this.txtend,
+                        TidyUtils.getString(this.lexbuf, this.txtstart, this.txtend - this.txtstart));
+
+                    // parse attributes, consuming closing ">"
+                    if (c != '>')
+                    {
+                        if (c == '/')
+                        {
+                            this.in.ungetChar(c);
+                        }
+
+                        attributes = parseAttrs(isempty);
+                    }
+
+                    if (isempty[0])
+                    {
+                        this.token.type = Node.START_END_TAG;
+                    }
+
+                    this.token.attributes = attributes;
+                    this.lexsize = this.txtstart;
+                    this.txtend = this.txtstart;
+
+                    // swallow newline following start tag
+                    // special check needed for CRLF sequence
+                    // this doesn't apply to empty elements
+                    // nor to preformatted content that needs escaping
+
+                    if (
+
+                    (mode != PREFORMATTED || preContent(this.token))
+                        && (this.token.expectsContent() || this.token.tag == this.configuration.tt.tagBr))
+                    {
+
+                        c = this.in.readChar();
+
+                        if (c == '\r')
+                        {
+                            c = this.in.readChar();
+
+                            if (c != '\n')
+                            {
+                                this.in.ungetChar(c);
+                            }
+                        }
+                        else if (c != '\n' && c != '\f')
+                        {
+                            this.in.ungetChar(c);
+                        }
+
+                        this.waswhite = true; // to swallow leading whitespace
+                    }
+                    else
+                    {
+                        this.waswhite = false;
+                    }
+
+                    this.state = LEX_CONTENT;
+
+                    if (this.token.tag == null)
+                    {
+                        report.error(this, null, this.token, Report.UNKNOWN_ELEMENT);
+                    }
+                    else if (!this.configuration.xmlTags)
+                    {
+                        constrainVersion(this.token.tag.versions);
+
+                        if (TidyUtils.toBoolean(this.token.tag.versions & Dict.VERS_PROPRIETARY))
+                        {
+                            // #427810 - fix by Gary Deschaines 24 May 00
+                            if (this.configuration.makeClean && (this.token.tag != this.configuration.tt.tagNobr && //
+                                this.token.tag != this.configuration.tt.tagWbr))
+                            {
+                                report.warning(this, null, this.token, Report.PROPRIETARY_ELEMENT);
+                            }
+                            // #427810 - fix by Terry Teague 2 Jul 01
+                            else if (!this.configuration.makeClean)
+                            {
+                                report.warning(this, null, this.token, Report.PROPRIETARY_ELEMENT);
+                            }
+                        }
+
+                        if (this.token.tag.getChkattrs() != null)
+                        {
+                            this.token.tag.getChkattrs().check(this, this.token);
+                        }
+                        else
+                        {
+                            this.token.checkAttributes(this);
+                        }
+
+                        // should this be called before attribute checks?
+                        this.token.repairDuplicateAttributes(this);
+
+                    }
+
+                    return this.token; // return start tag
+
+                case LEX_COMMENT :
+                    // seen <!-- so look for -->
+
+                    if (c != '-')
+                    {
+                        continue;
+                    }
+
+                    c = this.in.readChar();
+                    addCharToLexer(c);
+
+                    if (c != '-')
+                    {
+                        continue;
+                    }
+
+                    end_comment : while (true)
+                    {
+                        c = this.in.readChar();
+
+                        if (c == '>')
+                        {
+                            if (badcomment != 0)
+                            {
+                                report.warning(this, null, null, Report.MALFORMED_COMMENT);
+                            }
+
+                            this.txtend = this.lexsize - 2; // AQ 8Jul2000
+                            this.lexbuf[this.lexsize] = (byte) '\0';
+                            this.state = LEX_CONTENT;
+                            this.waswhite = false;
+                            this.token = newNode(Node.COMMENT_TAG, this.lexbuf, this.txtstart, this.txtend);
+
+                            // now look for a line break
+
+                            c = this.in.readChar();
+
+                            if (c == '\r')
+                            {
+                                c = this.in.readChar();
+
+                                if (c != '\n')
+                                {
+                                    this.token.linebreak = true;
+                                }
+                            }
+
+                            if (c == '\n')
+                            {
+                                this.token.linebreak = true;
+                            }
+                            else
+                            {
+                                this.in.ungetChar(c);
+                            }
+
+                            return this.token;
+                        }
+
+                        // note position of first such error in the comment
+                        if (badcomment == 0)
+                        {
+                            this.lines = this.in.getCurline();
+                            this.columns = this.in.getCurcol() - 3;
+                        }
+
+                        badcomment++;
+                        if (this.configuration.fixComments)
+                        {
+                            this.lexbuf[this.lexsize - 2] = (byte) '=';
+                        }
+
+                        addCharToLexer(c);
+
+                        // if '-' then look for '>' to end the comment
+                        if (c != '-')
+                        {
+                            break end_comment;
+                        }
+
+                    }
+                    // otherwise continue to look for -->
+                    this.lexbuf[this.lexsize - 2] = (byte) '=';
+                    continue;
+
+                case LEX_DOCTYPE :
+                    // seen <!d so look for '> ' munging whitespace
+
+                    if (TidyUtils.isWhite((char) c))
+                    {
+                        if (this.waswhite)
+                        {
+                            this.lexsize -= 1;
+                        }
+
+                        this.waswhite = true;
+                    }
+                    else
+                    {
+                        this.waswhite = false;
+                    }
+
+                    if (inDTDSubset)
+                    {
+                        if (c == ']')
+                        {
+                            inDTDSubset = false;
+                        }
+                    }
+                    else if (c == '[')
+                    {
+                        inDTDSubset = true;
+                    }
+                    if (inDTDSubset || c != '>')
+                    {
+                        continue;
+                    }
+
+                    this.lexsize -= 1;
+                    this.txtend = this.lexsize;
+                    this.lexbuf[this.lexsize] = (byte) '\0';
+                    this.state = LEX_CONTENT;
+                    this.waswhite = false;
+                    this.token = newNode(Node.DOCTYPE_TAG, this.lexbuf, this.txtstart, this.txtend);
+                    // make a note of the version named by the doctype
+                    this.doctype = findGivenVersion(this.token);
+                    return this.token;
+
+                case LEX_PROCINSTR :
+                    // seen <? so look for '> '
+                    // check for PHP preprocessor instructions <?php ... ?>
+
+                    if (this.lexsize - this.txtstart == 3)
+                    {
+                        if ((TidyUtils.getString(this.lexbuf, this.txtstart, 3)).equals("php"))
+                        {
+                            this.state = LEX_PHP;
+                            continue;
+                        }
+                    }
+
+                    if (this.lexsize - this.txtstart == 4)
+                    {
+                        if ((TidyUtils.getString(this.lexbuf, this.txtstart, 3)).equals("xml")
+                            && TidyUtils.isWhite((char) this.lexbuf[this.txtstart + 3]))
+                        {
+                            this.state = LEX_XMLDECL;
+                            attributes = null;
+                            continue;
+                        }
+                    }
+
+                    if (this.configuration.xmlPIs) // insist on ?> as terminator
+                    {
+                        if (c != '?')
+                        {
+                            continue;
+                        }
+
+                        // now look for '>'
+                        c = this.in.readChar();
+
+                        if (c == StreamIn.END_OF_STREAM)
+                        {
+                            report.warning(this, null, null, Report.UNEXPECTED_END_OF_FILE);
+                            this.in.ungetChar(c);
+                            continue;
+                        }
+
+                        addCharToLexer(c);
+                    }
+
+                    if (c != '>')
+                    {
+                        continue;
+                    }
+
+                    this.lexsize -= 1;
+                    this.txtend = this.lexsize;
+                    this.lexbuf[this.lexsize] = (byte) '\0';
+                    this.state = LEX_CONTENT;
+                    this.waswhite = false;
+                    this.token = newNode(Node.PROC_INS_TAG, this.lexbuf, this.txtstart, this.txtend);
+                    return this.token;
+
+                case LEX_ASP :
+                    // seen <% so look for "%> "
+                    if (c != '%')
+                    {
+                        continue;
+                    }
+
+                    // now look for '>'
+                    c = this.in.readChar();
+
+                    if (c != '>')
+                    {
+                        this.in.ungetChar(c);
+                        continue;
+                    }
+
+                    this.lexsize -= 1;
+                    this.txtend = this.lexsize;
+                    this.lexbuf[this.lexsize] = (byte) '\0';
+                    this.state = LEX_CONTENT;
+                    this.waswhite = false;
+                    this.token = newNode(Node.ASP_TAG, this.lexbuf, this.txtstart, this.txtend);
+                    return this.token;
+
+                case LEX_JSTE :
+                    // seen <# so look for "#> "
+                    if (c != '#')
+                    {
+                        continue;
+                    }
+
+                    // now look for '>'
+                    c = this.in.readChar();
+
+                    if (c != '>')
+                    {
+                        this.in.ungetChar(c);
+                        continue;
+                    }
+
+                    this.lexsize -= 1;
+                    this.txtend = this.lexsize;
+                    this.lexbuf[this.lexsize] = (byte) '\0';
+                    this.state = LEX_CONTENT;
+                    this.waswhite = false;
+                    this.token = newNode(Node.JSTE_TAG, this.lexbuf, this.txtstart, this.txtend);
+                    return this.token;
+
+                case LEX_PHP :
+                    // seen " <?php" so look for "?> "
+                    if (c != '?')
+                    {
+                        continue;
+                    }
+
+                    // now look for '>'
+                    c = this.in.readChar();
+
+                    if (c != '>')
+                    {
+                        this.in.ungetChar(c);
+                        continue;
+                    }
+
+                    this.lexsize -= 1;
+                    this.txtend = this.lexsize;
+                    this.lexbuf[this.lexsize] = (byte) '\0';
+                    this.state = LEX_CONTENT;
+                    this.waswhite = false;
+                    this.token = newNode(Node.PHP_TAG, this.lexbuf, this.txtstart, this.txtend);
+                    return this.token;
+
+                case LEX_XMLDECL : // seen "<?xml" so look for "?>"
+
+                    if (TidyUtils.isWhite((char) c) && c != '?')
+                    {
+                        continue;
+                    }
+
+                    // get pseudo-attribute
+                    if (c != '?')
+                    {
+                        String name;
+                        Node[] asp = new Node[1];
+                        Node[] php = new Node[1];
+                        AttVal av = new AttVal();
+                        int[] pdelim = new int[1];
+                        isempty[0] = false;
+
+                        this.in.ungetChar(c);
+
+                        name = this.parseAttribute(isempty, asp, php);
+                        av.attribute = name;
+
+                        av.value = this.parseValue(name, true, isempty, pdelim);
+                        av.delim = pdelim[0];
+                        av.next = attributes;
+
+                        attributes = av;
+                        // continue;
+                    }
+
+                    // now look for '>'
+                    c = this.in.readChar();
+
+                    if (c != '>')
+                    {
+                        this.in.ungetChar(c);
+                        continue;
+                    }
+                    this.lexsize -= 1;
+                    this.txtend = this.txtstart;
+                    this.lexbuf[this.txtend] = '\0';
+                    this.state = LEX_CONTENT;
+                    this.waswhite = false;
+                    this.token = newNode(Node.XML_DECL, this.lexbuf, this.txtstart, this.txtend);
+                    this.token.attributes = attributes;
+                    return this.token;
+
+                case LEX_SECTION :
+                    // seen " <![" so look for "]> "
+                    if (c == '[')
+                    {
+                        if (this.lexsize == (this.txtstart + 6)
+                            && (TidyUtils.getString(this.lexbuf, this.txtstart, 6)).equals("CDATA["))
+                        {
+                            this.state = LEX_CDATA;
+                            this.lexsize -= 6;
+                            mode = IGNORE_MARKUP;
+                            continue;
+                        }
+                    }
+
+                    if (c != ']')
+                    {
+                        continue;
+                    }
+
+                    // now look for '>'
+                    c = this.in.readChar();
+
+                    if (c != '>')
+                    {
+                        this.in.ungetChar(c);
+                        continue;
+                    }
+
+                    this.lexsize -= 1;
+                    this.txtend = this.lexsize;
+                    this.lexbuf[this.lexsize] = (byte) '\0';
+                    this.state = LEX_CONTENT;
+                    this.waswhite = false;
+                    this.token = newNode(Node.SECTION_TAG, this.lexbuf, this.txtstart, this.txtend);
+                    return this.token;
+
+                case LEX_CDATA :
+                    // seen " <![CDATA[" so look for "]]> "
+                    if (c != ']')
+                    {
+                        continue;
+                    }
+
+                    // now look for ']'
+                    c = this.in.readChar();
+
+                    if (c != ']')
+                    {
+                        this.in.ungetChar(c);
+                        continue;
+                    }
+
+                    // now look for '>'
+                    c = this.in.readChar();
+
+                    if (c != '>')
+                    {
+                        this.in.ungetChar(c);
+                        continue;
+                    }
+
+                    this.lexsize -= 1;
+                    this.txtend = this.lexsize;
+                    this.lexbuf[this.lexsize] = (byte) '\0';
+                    this.state = LEX_CONTENT;
+                    this.waswhite = false;
+                    this.token = newNode(Node.CDATA_TAG, this.lexbuf, this.txtstart, this.txtend);
+                    return this.token;
+
+                default :
+                    // should never reach here
+                    break;
+            }
+        }
+
+        if (this.state == LEX_CONTENT) // text string
+        {
+            this.txtend = this.lexsize;
+
+            if (this.txtend > this.txtstart)
+            {
+                this.in.ungetChar(c);
+
+                if (this.lexbuf[this.lexsize - 1] == (byte) ' ')
+                {
+                    this.lexsize -= 1;
+                    this.txtend = this.lexsize;
+                }
+
+                this.token = newNode(Node.TEXT_NODE, this.lexbuf, this.txtstart, this.txtend);
+                return this.token;
+            }
+        }
+        else if (this.state == LEX_COMMENT) // comment
+        {
+            if (c == StreamIn.END_OF_STREAM)
+            {
+                report.warning(this, null, null, Report.MALFORMED_COMMENT);
+            }
+
+            this.txtend = this.lexsize;
+            this.lexbuf[this.lexsize] = (byte) '\0';
+            this.state = LEX_CONTENT;
+            this.waswhite = false;
+            this.token = newNode(Node.COMMENT_TAG, this.lexbuf, this.txtstart, this.txtend);
+            return this.token;
+        }
+
+        return null;
+    }
+
+    /**
+     * parser for ASP within start tags Some people use ASP for to customize attributes Tidy isn't really well suited to
+     * dealing with ASP This is a workaround for attributes, but won't deal with the case where the ASP is used to
+     * tailor the attribute value. Here is an example of a work around for using ASP in attribute values:
+     * <code>href='<%=rsSchool.Fields("ID").Value%>'</code> where the ASP that generates the attribute value is
+     * masked from Tidy by the quotemarks.
+     * @return parsed Node
+     */
+    public Node parseAsp()
+    {
+        int c;
+        Node asp = null;
+
+        this.txtstart = this.lexsize;
+
+        while ((c = this.in.readChar()) != StreamIn.END_OF_STREAM)
+        {
+
+            addCharToLexer(c);
+
+            if (c != '%')
+            {
+                continue;
+            }
+
+            if ((c = this.in.readChar()) == StreamIn.END_OF_STREAM)
+            {
+                break;
+            }
+            addCharToLexer(c);
+
+            if (c == '>')
+            {
+                break;
+            }
+        }
+
+        this.lexsize -= 2;
+        this.txtend = this.lexsize;
+
+        if (this.txtend > this.txtstart)
+        {
+            asp = newNode(Node.ASP_TAG, this.lexbuf, this.txtstart, this.txtend);
+        }
+
+        this.txtstart = this.txtend;
+        return asp;
+    }
+
+    /**
+     * PHP is like ASP but is based upon XML processing instructions, e.g. <code>&lt;?php ... ?&gt;</code>.
+     * @return parsed Node
+     */
+    public Node parsePhp()
+    {
+        int c;
+        Node php = null;
+
+        this.txtstart = this.lexsize;
+
+        while ((c = this.in.readChar()) != StreamIn.END_OF_STREAM)
+        {
+            addCharToLexer(c);
+
+            if (c != '?')
+            {
+                continue;
+            }
+
+            if ((c = this.in.readChar()) == StreamIn.END_OF_STREAM)
+            {
+                break;
+            }
+            addCharToLexer(c);
+
+            if (c == '>')
+            {
+                break;
+            }
+        }
+
+        this.lexsize -= 2;
+        this.txtend = this.lexsize;
+
+        if (this.txtend > this.txtstart)
+        {
+            php = newNode(Node.PHP_TAG, this.lexbuf, this.txtstart, this.txtend);
+        }
+
+        this.txtstart = this.txtend;
+        return php;
+    }
+
+    /**
+     * consumes the '>' terminating start tags.
+     * @param isempty flag is passed as array so it can be modified
+     * @param asp asp Node, passed as array so it can be modified
+     * @param php php Node, passed as array so it can be modified
+     * @return parsed attribute
+     */
+    public String parseAttribute(boolean[] isempty, Node[] asp, Node[] php)
+    {
+        int start = 0;
+        String attr;
+        int c = 0;
+        int lastc = 0;
+
+        asp[0] = null; // clear asp pointer
+        php[0] = null; // clear php pointer
+        // skip white space before the attribute
+
+        for (;;)
+        {
+            c = this.in.readChar();
+
+            if (c == '/')
+            {
+                c = this.in.readChar();
+
+                if (c == '>')
+                {
+                    isempty[0] = true;
+                    return null;
+                }
+
+                this.in.ungetChar(c);
+                c = '/';
+                break;
+            }
+
+            if (c == '>')
+            {
+                return null;
+            }
+
+            if (c == '<')
+            {
+                c = this.in.readChar();
+
+                if (c == '%')
+                {
+                    asp[0] = parseAsp();
+                    return null;
+                }
+                else if (c == '?')
+                {
+                    php[0] = parsePhp();
+                    return null;
+                }
+
+                this.in.ungetChar(c);
+                if (this.state != LEX_XMLDECL) // FG fix for 532535
+                {
+                    this.in.ungetChar('<'); // fix for 433360
+                }
+                report.attrError(this, this.token, null, Report.UNEXPECTED_GT);
+                return null;
+            }
+
+            if (c == '=')
+            {
+                report.attrError(this, this.token, null, Report.UNEXPECTED_EQUALSIGN);
+                continue;
+            }
+
+            if (c == '"' || c == '\'')
+            {
+                report.attrError(this, this.token, null, Report.UNEXPECTED_QUOTEMARK);
+                continue;
+            }
+
+            if (c == StreamIn.END_OF_STREAM)
+            {
+                report.attrError(this, this.token, null, Report.UNEXPECTED_END_OF_FILE);
+                this.in.ungetChar(c);
+                return null;
+            }
+
+            if (!TidyUtils.isWhite((char) c))
+            {
+                break;
+            }
+        }
+
+        start = this.lexsize;
+        lastc = c;
+
+        for (;;)
+        {
+            // but push back '=' for parseValue()
+            if (c == '=' || c == '>')
+            {
+                this.in.ungetChar(c);
+                break;
+            }
+
+            if (c == '<' || c == StreamIn.END_OF_STREAM)
+            {
+                this.in.ungetChar(c);
+                break;
+            }
+            if (lastc == '-' && (c == '"' || c == '\''))
+            {
+                this.lexsize--;
+                this.in.ungetChar(c);
+                break;
+            }
+            if (TidyUtils.isWhite((char) c))
+            {
+                break;
+            }
+
+            // what should be done about non-namechar characters?
+            // currently these are incorporated into the attr name
+
+            if (!this.configuration.xmlTags && TidyUtils.isUpper((char) c))
+            {
+                c = TidyUtils.toLower((char) c);
+            }
+
+            // ++len; #427672 - handle attribute names with multibyte chars - fix by Randy Waki - 10 Aug 00
+            addCharToLexer(c);
+
+            lastc = c;
+            c = this.in.readChar();
+        }
+
+        // #427672 - handle attribute names with multibyte chars - fix by Randy Waki - 10 Aug 00
+        int len = this.lexsize - start;
+        attr = (len > 0 ? TidyUtils.getString(this.lexbuf, start, len) : null);
+        this.lexsize = start;
+
+        return attr;
+    }
+
+    /**
+     * Invoked when &lt; is seen in place of attribute value but terminates on whitespace if not ASP, PHP or Tango this
+     * routine recognizes ' and " quoted strings.
+     * @return delimiter
+     */
+    public int parseServerInstruction()
+    {
+        int c, delim = '"';
+        boolean isrule = false;
+
+        c = this.in.readChar();
+        addCharToLexer(c);
+
+        // check for ASP, PHP or Tango
+        if (c == '%' || c == '?' || c == '@')
+        {
+            isrule = true;
+        }
+
+        for (;;)
+        {
+            c = this.in.readChar();
+
+            if (c == StreamIn.END_OF_STREAM)
+            {
+                break;
+            }
+
+            if (c == '>')
+            {
+                if (isrule)
+                {
+                    addCharToLexer(c);
+                }
+                else
+                {
+                    this.in.ungetChar(c);
+                }
+
+                break;
+            }
+
+            // if not recognized as ASP, PHP or Tango
+            // then also finish value on whitespace
+            if (!isrule)
+            {
+                if (TidyUtils.isWhite((char) c))
+                {
+                    break;
+                }
+            }
+
+            addCharToLexer(c);
+
+            if (c == '"')
+            {
+                do
+                {
+                    c = this.in.readChar();
+
+                    if (endOfInput()) // #427840 - fix by Terry Teague 30 Jun 01
+                    {
+                        report.attrError(this, this.token, null, Report.UNEXPECTED_END_OF_FILE);
+                        this.in.ungetChar(c);
+                        return 0;
+                    }
+                    if (c == '>') // #427840 - fix by Terry Teague 30 Jun 01
+                    {
+                        this.in.ungetChar(c);
+                        report.attrError(this, this.token, null, Report.UNEXPECTED_GT);
+                        return 0;
+                    }
+
+                    addCharToLexer(c);
+                }
+                while (c != '"');
+                delim = '\'';
+                continue;
+            }
+
+            if (c == '\'')
+            {
+                do
+                {
+                    c = this.in.readChar();
+
+                    if (endOfInput()) // #427840 - fix by Terry Teague 30 Jun 01
+                    {
+                        report.attrError(this, this.token, null, Report.UNEXPECTED_END_OF_FILE);
+                        this.in.ungetChar(c);
+                        return 0;
+                    }
+                    if (c == '>') // #427840 - fix by Terry Teague 30 Jun 01
+                    {
+                        this.in.ungetChar(c);
+                        report.attrError(this, this.token, null, Report.UNEXPECTED_GT);
+                        return 0;
+                    }
+
+                    addCharToLexer(c);
+                }
+                while (c != '\'');
+            }
+        }
+
+        return delim;
+    }
+
+    /**
+     * Parse an attribute value.
+     * @param name attribute name
+     * @param foldCase fold case?
+     * @param isempty is attribute empty? Passed as an array reference to allow modification
+     * @param pdelim delimiter, passed as an array reference to allow modification
+     * @return parsed value
+     */
+    public String parseValue(String name, boolean foldCase, boolean[] isempty, int[] pdelim)
+    {
+        // values start with "=" or " = " etc.
+        // doesn't consume the ">" at end of start tag
+
+        int len = 0;
+        int start;
+        boolean seenGt = false;
+        boolean munge = true;
+        int c = 0;
+        int lastc, delim, quotewarning;
+        String value;
+
+        delim = 0;
+        pdelim[0] = '"';
+
+        // Henry Zrepa reports that some folk are using the embed element with script attributes where newlines are
+        // significant and must be preserved
+
+        if (this.configuration.literalAttribs)
+        {
+            munge = false;
+        }
+
+        // skip white space before the '='
+        while (true)
+        {
+            c = this.in.readChar();
+
+            if (c == StreamIn.END_OF_STREAM)
+            {
+                this.in.ungetChar(c);
+                break;
+            }
+
+            if (!TidyUtils.isWhite((char) c))
+            {
+                break;
+            }
+        }
+
+        // c should be '=' if there is a value other legal possibilities are white space, '/' and '>'
+
+        if (c != '=' && c != '"' && c != '\'')
+        {
+            this.in.ungetChar(c);
+            return null;
+        }
+
+        // skip white space after '='
+
+        while (true)
+        {
+            c = this.in.readChar();
+
+            if (c == StreamIn.END_OF_STREAM)
+            {
+                this.in.ungetChar(c);
+                break;
+            }
+
+            if (!TidyUtils.isWhite((char) c))
+            {
+                break;
+            }
+        }
+
+        // check for quote marks
+
+        if (c == '"' || c == '\'')
+        {
+            delim = c;
+        }
+        else if (c == '<')
+        {
+            start = this.lexsize;
+            addCharToLexer(c);
+            pdelim[0] = parseServerInstruction();
+            len = this.lexsize - start;
+            this.lexsize = start;
+            return (len > 0 ? TidyUtils.getString(this.lexbuf, start, len) : null);
+        }
+        else
+        {
+            this.in.ungetChar(c);
+        }
+
+        // and read the value string check for quote mark if needed
+
+        quotewarning = 0;
+        start = this.lexsize;
+        c = '\0';
+
+        while (true)
+        {
+            lastc = c; // track last character
+            c = this.in.readChar();
+
+            if (c == StreamIn.END_OF_STREAM)
+            {
+                report.attrError(this, this.token, null, Report.UNEXPECTED_END_OF_FILE);
+                this.in.ungetChar(c);
+                break;
+            }
+
+            if (delim == (char) 0)
+            {
+                if (c == '>')
+                {
+                    this.in.ungetChar(c);
+                    break;
+                }
+
+                if (c == '"' || c == '\'')
+                {
+                    report.attrError(this, this.token, null, Report.UNEXPECTED_QUOTEMARK);
+                    break;
+                }
+
+                if (c == '<')
+                {
+                    this.in.ungetChar(c); // fix for 433360
+                    c = '>';
+                    this.in.ungetChar(c);
+                    report.attrError(this, this.token, null, Report.UNEXPECTED_GT);
+                    break;
+                }
+
+                // For cases like <br clear=all/> need to avoid treating /> as part of the attribute value, however
+                // care is needed to avoid so treating <a href=http://www.acme.com /> in this way, which would map the
+                // <a> tag to <a href="http://www.acme.com"/>
+
+                if (c == '/')
+                {
+                    // peek ahead in case of />
+                    c = this.in.readChar();
+
+                    if (c == '>' && !AttributeTable.getDefaultAttributeTable().isUrl(name))
+                    {
+                        isempty[0] = true;
+                        this.in.ungetChar(c);
+                        break;
+                    }
+
+                    // unget peeked char
+                    this.in.ungetChar(c);
+                    c = '/';
+                }
+            }
+            else
+            {
+                // delim is '\'' or '"'
+                if (c == delim)
+                {
+                    break;
+                }
+
+                // treat CRLF, CR and LF as single line break
+
+                if (c == '\r')
+                {
+                    c = this.in.readChar();
+                    if (c != '\n')
+                    {
+                        this.in.ungetChar(c);
+                    }
+
+                    c = '\n';
+                }
+
+                if (c == '\n' || c == '<' || c == '>')
+                {
+                    ++quotewarning;
+                }
+
+                if (c == '>')
+                {
+                    seenGt = true;
+                }
+            }
+
+            if (c == '&')
+            {
+                // no entities in ID attributes
+                if ("id".equalsIgnoreCase(name))
+                {
+                    report.attrError(this, null, null, Report.ENTITY_IN_ID);
+                    continue;
+                }
+
+                addCharToLexer(c);
+                parseEntity((short) 0);
+                continue;
+
+            }
+
+            // kludge for JavaScript attribute values with line continuations in string literals
+
+            if (c == '\\')
+            {
+                c = this.in.readChar();
+
+                if (c != '\n')
+                {
+                    this.in.ungetChar(c);
+                    c = '\\';
+                }
+            }
+
+            if (TidyUtils.isWhite((char) c))
+            {
+                if (delim == (char) 0)
+                {
+                    break;
+                }
+
+                if (munge)
+                {
+                    // discard line breaks in quoted URLs
+                    // #438650 - fix by Randy Waki
+                    if (c == '\n' && AttributeTable.getDefaultAttributeTable().isUrl(name))
+                    {
+                        // warn that we discard this newline
+                        report.attrError(this, this.token, null, Report.NEWLINE_IN_URI);
+                        continue;
+                    }
+
+                    c = ' ';
+
+                    if (lastc == ' ')
+                    {
+                        continue;
+                    }
+                }
+            }
+            else if (foldCase && TidyUtils.isUpper((char) c))
+            {
+                c = TidyUtils.toLower((char) c);
+            }
+
+            addCharToLexer(c);
+        }
+
+        if (quotewarning > 10 && seenGt && munge)
+        {
+            // there is almost certainly a missing trailing quote mark as we have see too many newlines, < or >
+            // characters. an exception is made for Javascript attributes and the javascript URL scheme which may
+            // legitimately include < and >, and for attributes starting with "<xml " as generated by Microsoft Office.
+
+            if (!AttributeTable.getDefaultAttributeTable().isScript(name)
+                && !(AttributeTable.getDefaultAttributeTable().isUrl(name) && "javascript:".equals(TidyUtils.getString(
+                    this.lexbuf,
+                    start,
+                    11)))
+                && !"<xml ".equals(TidyUtils.getString(this.lexbuf, start, 5))) // #500236 - fix by Klaus Johannes Rusch
+            // 06 Jan 02
+            {
+                report.error(this, null, null, Report.SUSPECTED_MISSING_QUOTE);
+            }
+        }
+
+        len = this.lexsize - start;
+        this.lexsize = start;
+
+        if (len > 0 || delim != 0)
+        {
+            // ignore leading and trailing white space for all but title, alt, value and prompts attributes unless
+            // --literal-attributes is set to yes
+            // #994841 - Whitespace is removed from value attributes
+
+            if (munge && !TidyUtils.isInValuesIgnoreCase(new String[]{"alt", "title", "value", "prompt"}, name))
+            {
+                while (TidyUtils.isWhite((char) this.lexbuf[start + len - 1]))
+                {
+                    --len;
+                }
+
+                while (TidyUtils.isWhite((char) this.lexbuf[start]) && start < len)
+                {
+                    ++start;
+                    --len;
+                }
+            }
+
+            value = TidyUtils.getString(this.lexbuf, start, len);
+        }
+        else
+        {
+            value = null;
+        }
+
+        // note delimiter if given
+        if (delim != 0)
+        {
+            pdelim[0] = delim;
+        }
+        else
+        {
+            pdelim[0] = '"';
+        }
+
+        return value;
+    }
+
+    /**
+     * Check if attr is a valid name.
+     * @param attr String to check, must be non-null
+     * @return <code>true</code> if attr is a valid name.
+     */
+    public static boolean isValidAttrName(String attr)
+    {
+        char c;
+        int i;
+
+        // first character should be a letter
+        c = attr.charAt(0);
+
+        if (!TidyUtils.isLetter(c))
+        {
+            return false;
+        }
+
+        // remaining characters should be namechars
+        for (i = 1; i < attr.length(); i++)
+        {
+            c = attr.charAt(i);
+
+            if (TidyUtils.isNamechar(c))
+            {
+                continue;
+            }
+
+            return false;
+        }
+
+        return true;
+    }
+
+    /**
+     * In CSS1, selectors can contain only the characters A-Z, 0-9, and Unicode characters 161-255, plus dash (-); they
+     * cannot start with a dash or a digit; they can also contain escaped characters and any Unicode character as a
+     * numeric code (see next item). The backslash followed by at most four hexadecimal digits (0..9A..F) stands for the
+     * Unicode character with that number. Any character except a hexadecimal digit can be escaped to remove its special
+     * meaning, by putting a backslash in front.
+     * @param buf css selector name
+     * @return <code>true</code> if the given string is a valid css1 selector name
+     */
+    public static boolean isCSS1Selector(String buf)
+    {
+        if (buf == null)
+        {
+            return false;
+        }
+
+        // #508936 - CSS class naming for -clean option
+        boolean valid = true;
+        int esclen = 0;
+        char c;
+        int pos;
+
+        for (pos = 0; valid && pos < buf.length(); ++pos)
+        {
+            c = buf.charAt(pos);
+            if (c == '\\')
+            {
+                esclen = 1; // ab\555\444 is 4 chars {'a', 'b', \555, \444}
+            }
+            else if (Character.isDigit(c))
+            {
+                // Digit not 1st, unless escaped (Max length "\112F")
+                if (esclen > 0)
+                {
+                    valid = (++esclen < 6);
+                }
+                if (valid)
+                {
+                    valid = (pos > 0 || esclen > 0);
+                }
+            }
+            else
+            {
+                valid = (esclen > 0 // Escaped? Anything goes.
+                    || (pos > 0 && c == '-') // Dash cannot be 1st char
+                    || Character.isLetter(c) // a-z, A-Z anywhere
+                || (c >= 161 && c <= 255)); // Unicode 161-255 anywhere
+                esclen = 0;
+            }
+        }
+        return valid;
+    }
+
+    /**
+     * Parse tag attributes.
+     * @param isempty is tag empty?
+     * @return parsed attribute/value list
+     */
+    public AttVal parseAttrs(boolean[] isempty)
+    {
+        AttVal av, list;
+        String attribute, value;
+        int[] delim = new int[1];
+        Node[] asp = new Node[1];
+        Node[] php = new Node[1];
+
+        list = null;
+
+        while (!endOfInput())
+        {
+            attribute = parseAttribute(isempty, asp, php);
+
+            if (attribute == null)
+            {
+                // check if attributes are created by ASP markup
+                if (asp[0] != null)
+                {
+                    av = new AttVal(list, null, asp[0], null, '\0', null, null);
+                    list = av;
+                    continue;
+                }
+
+                // check if attributes are created by PHP markup
+                if (php[0] != null)
+                {
+                    av = new AttVal(list, null, null, php[0], '\0', null, null);
+                    list = av;
+                    continue;
+                }
+
+                break;
+            }
+
+            value = parseValue(attribute, false, isempty, delim);
+
+            if (attribute != null && isValidAttrName(attribute))
+            {
+                av = new AttVal(list, null, null, null, delim[0], attribute, value);
+                av.dict = AttributeTable.getDefaultAttributeTable().findAttribute(av);
+                list = av;
+            }
+            else
+            {
+                av = new AttVal(null, null, null, null, 0, attribute, value);
+
+                // #427664 - fix by Gary Peskin 04 Aug 00; other fixes by Dave Raggett
+                if (value != null)
+                {
+                    report.attrError(this, this.token, av, Report.BAD_ATTRIBUTE_VALUE);
+                }
+                else if (TidyUtils.lastChar(attribute) == '"')
+                {
+                    report.attrError(this, this.token, av, Report.MISSING_QUOTEMARK);
+                }
+                else
+                {
+                    report.attrError(this, this.token, av, Report.UNKNOWN_ATTRIBUTE);
+                }
+            }
+        }
+
+        return list;
+    }
+
+    /**
+     * Push a copy of an inline node onto stack but don't push if implicit or OBJECT or APPLET (implicit tags are ones
+     * generated from the istack) One issue arises with pushing inlines when the tag is already pushed. For instance:
+     * <code>&lt;p>&lt;em> text &lt;p>&lt;em> more text</code> Shouldn't be mapped to
+     * <code>&lt;p>&lt;em> text &lt;/em>&lt;/p>&lt;p>&lt;em>&lt;em> more text &lt;/em>&lt;/em></code>
+     * @param node Node to be pushed
+     */
+    public void pushInline(Node node)
+    {
+        IStack is;
+
+        if (node.implicit)
+        {
+            return;
+        }
+
+        if (node.tag == null)
+        {
+            return;
+        }
+
+        if (!TidyUtils.toBoolean(node.tag.model & Dict.CM_INLINE))
+        {
+            return;
+        }
+
+        if (TidyUtils.toBoolean(node.tag.model & Dict.CM_OBJECT))
+        {
+            return;
+        }
+
+        if (node.tag != this.configuration.tt.tagFont && isPushed(node))
+        {
+            return;
+        }
+
+        // make sure there is enough space for the stack
+        is = new IStack();
+        is.tag = node.tag;
+        is.element = node.element;
+        if (node.attributes != null)
+        {
+            is.attributes = cloneAttributes(node.attributes);
+        }
+        this.istack.push(is);
+    }
+
+    /**
+     * Pop a copy of an inline node from the stack.
+     * @param node Node to be popped
+     */
+    public void popInline(Node node)
+    {
+        IStack is;
+
+        if (node != null)
+        {
+
+            if (node.tag == null)
+            {
+                return;
+            }
+
+            if (!TidyUtils.toBoolean(node.tag.model & Dict.CM_INLINE))
+            {
+                return;
+            }
+
+            if (TidyUtils.toBoolean(node.tag.model & Dict.CM_OBJECT))
+            {
+                return;
+            }
+
+            // if node is </a> then pop until we find an <a>
+            if (node.tag == this.configuration.tt.tagA)
+            {
+
+                while (this.istack.size() > 0)
+                {
+                    is = (IStack) this.istack.pop();
+                    if (is.tag == this.configuration.tt.tagA)
+                    {
+                        break;
+                    }
+                }
+
+                if (this.insert >= this.istack.size())
+                {
+                    this.insert = -1;
+                }
+                return;
+            }
+        }
+
+        if (this.istack.size() > 0)
+        {
+            is = (IStack) this.istack.pop();
+            if (this.insert >= this.istack.size())
+            {
+                this.insert = -1;
+            }
+        }
+    }
+
+    /**
+     * Is the node in the stack?
+     * @param node Node
+     * @return <code>true</code> is the node is found in the stack
+     */
+    public boolean isPushed(Node node)
+    {
+        int i;
+        IStack is;
+
+        for (i = this.istack.size() - 1; i >= 0; --i)
+        {
+            is = (IStack) this.istack.elementAt(i);
+            if (is.tag == node.tag)
+            {
+                return true;
+            }
+        }
+
+        return false;
+    }
+
+    /**
+     * This has the effect of inserting "missing" inline elements around the contents of blocklevel elements such as P,
+     * TD, TH, DIV, PRE etc. This procedure is called at the start of ParseBlock. When the inline stack is not empty, as
+     * will be the case in: <code>&lt;i>&lt;h1>italic heading&lt;/h1>&lt;/i></code> which is then treated as
+     * equivalent to <code>&lt;h1>&lt;i>italic heading&lt;/i>&lt;/h1></code> This is implemented by setting the lexer
+     * into a mode where it gets tokens from the inline stack rather than from the input stream.
+     * @param node original node
+     * @return stack size
+     */
+    public int inlineDup(Node node)
+    {
+        int n;
+
+        n = this.istack.size() - this.istackbase;
+        if (n > 0)
+        {
+            this.insert = this.istackbase;
+            this.inode = node;
+        }
+
+        return n;
+    }
+
+    /**
+     * @return
+     */
+    public Node insertedToken()
+    {
+        Node node;
+        IStack is;
+        int n;
+
+        // this will only be null if inode != null
+        if (this.insert == -1)
+        {
+            node = this.inode;
+            this.inode = null;
+            return node;
+        }
+
+        // is this is the "latest" node then update the position, otherwise use current values
+        if (this.inode == null)
+        {
+            this.lines = this.in.getCurline();
+            this.columns = this.in.getCurcol();
+        }
+
+        node = newNode(Node.START_TAG, this.lexbuf, this.txtstart, this.txtend);
+
+        // GLP: Bugfix 126261. Remove when this change is fixed in istack.c in the original Tidy
+        node.implicit = true;
+        is = (IStack) this.istack.elementAt(this.insert);
+        node.element = is.element;
+        node.tag = is.tag;
+        if (is.attributes != null)
+        {
+            node.attributes = cloneAttributes(is.attributes);
+        }
+
+        // advance lexer to next item on the stack
+        n = this.insert;
+
+        // and recover state if we have reached the end
+        if (++n < this.istack.size())
+        {
+            this.insert = n;
+        }
+        else
+        {
+            this.insert = -1;
+        }
+
+        return node;
+    }
+
+    /**
+     * Can the given element be removed?
+     * @param element node
+     * @return <code>true</code> if he element can be removed
+     */
+    public boolean canPrune(Node element)
+    {
+        if (element.type == Node.TEXT_NODE)
+        {
+            return true;
+        }
+
+        if (element.content != null)
+        {
+            return false;
+        }
+
+        if (element.tag == this.configuration.tt.tagA && element.attributes != null)
+        {
+            return false;
+        }
+
+        if (element.tag == this.configuration.tt.tagP && !this.configuration.dropEmptyParas)
+        {
+            return false;
+        }
+
+        if (element.tag == null)
+        {
+            return false;
+        }
+
+        if (TidyUtils.toBoolean(element.tag.model & Dict.CM_ROW))
+        {
+            return false;
+        }
+
+        if (TidyUtils.toBoolean(element.tag.model & Dict.CM_EMPTY))
+        {
+            return false;
+        }
+
+        if (element.tag == this.configuration.tt.tagApplet)
+        {
+            return false;
+        }
+
+        if (element.tag == this.configuration.tt.tagObject)
+        {
+            return false;
+        }
+
+        if (element.tag == this.configuration.tt.tagScript && element.getAttrByName("src") != null)
+        {
+            return false;
+        }
+
+        // #540555 Empty title tag is trimmed
+        if (element.tag == this.configuration.tt.tagTitle)
+        {
+            return false;
+        }
+
+        // #433359 - fix by Randy Waki 12 Mar 01 - Empty iframe is trimmed
+        if (element.tag == this.configuration.tt.tagIframe)
+        {
+            return false;
+        }
+
+        if (element.getAttrByName("id") != null || element.getAttrByName("name") != null)
+        {
+            return false;
+        }
+
+        return true;
+    }
+
+    /**
+     * duplicate name attribute as an id and check if id and name match.
+     * @param node Node to check for name/it attributes
+     */
+    public void fixId(Node node)
+    {
+        AttVal name = node.getAttrByName("name");
+        AttVal id = node.getAttrByName("id");
+
+        if (name != null)
+        {
+            if (id != null)
+            {
+                if (id.value != null && !id.value.equals(name.value))
+                {
+                    report.attrError(this, node, name, Report.ID_NAME_MISMATCH);
+                }
+            }
+            else if (this.configuration.xmlOut)
+            {
+                node.addAttribute("id", name.value);
+            }
+        }
+    }
+
+    /**
+     * Defer duplicates when entering a table or other element where the inlines shouldn't be duplicated.
+     */
+    public void deferDup()
+    {
+        this.insert = -1;
+        this.inode = null;
+    }
+    
+    /**
+     * Find last inserted element for put properly place to error message.
+     * @return
+     */
+    public Node getLastNode() {
+    	Node last = root;
+    	while(last.last != null) {
+    		last=last.last;
+    	}
+    	return last;
+    }
+
+    /**
+     * Constraint the html version in the document to the given one. Everything is allowed in proprietary version of
+     * HTML this is handled here rather than in the tag/attr dicts.
+     * @param vers html version code
+     */
+    void constrainVersion(int vers)
+    {
+        this.versions &= (vers | Dict.VERS_PROPRIETARY);
+    }
+
+    /**
+     * Is content acceptable for pre elements?
+     * @param node content
+     * @return <code>true</code> if node is acceptable in pre elements
+     */
+    protected boolean preContent(Node node)
+    {
+        // p is coerced to br's
+        if (node.tag == this.configuration.tt.tagP)
+        {
+            return true;
+        }
+
+        if (node.tag == null
+            || node.tag == this.configuration.tt.tagP
+            || !TidyUtils.toBoolean(node.tag.model & (Dict.CM_INLINE | Dict.CM_NEW)))
+        {
+            return false;
+        }
+        return true;
+    }
+
+    /**
+     * document type.
+     */
+    private static class W3CVersionInfo
+    {
+
+        /**
+         * name.
+         */
+        String name;
+
+        /**
+         * voyager name.
+         */
+        String voyagerName;
+
+        /**
+         * profile.
+         */
+        String profile;
+
+        /**
+         * code.
+         */
+        short code;
+
+        /**
+         * Instantiates a new W3CVersionInfo.
+         * @param name version name
+         * @param voyagerName voyager (xhtml) name
+         * @param profile VOYAGER_STRICT | VOYAGER_LOOSE | VOYAGER_FRAMESET
+         * @param code unique code for this version info
+         */
+        public W3CVersionInfo(String name, String voyagerName, String profile, short code)
+        {
+            this.name = name;
+            this.voyagerName = voyagerName;
+            this.profile = profile;
+            this.code = code;
+        }
+    }
+
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/Node.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/Node.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/Node.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1618 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ *  Java HTML Tidy - JTidy
+ *  HTML parser and pretty printer
+ *
+ *  Copyright (c) 1998-2000 World Wide Web Consortium (Massachusetts
+ *  Institute of Technology, Institut National de Recherche en
+ *  Informatique et en Automatique, Keio University). All Rights
+ *  Reserved.
+ *
+ *  Contributing Author(s):
+ *
+ *     Dave Raggett <dsr at w3.org>
+ *     Andy Quick <ac.quick at sympatico.ca> (translation to Java)
+ *     Gary L Peskin <garyp at firstech.com> (Java development)
+ *     Sami Lempinen <sami at lempinen.net> (release management)
+ *     Fabrizio Giustina <fgiust at users.sourceforge.net>
+ *
+ *  The contributing author(s) would like to thank all those who
+ *  helped with testing, bug fixes, and patience.  This wouldn't
+ *  have been possible without all of you.
+ *
+ *  COPYRIGHT NOTICE:
+ * 
+ *  This software and documentation is provided "as is," and
+ *  the copyright holders and contributing author(s) make no
+ *  representations or warranties, express or implied, including
+ *  but not limited to, warranties of merchantability or fitness
+ *  for any particular purpose or that the use of the software or
+ *  documentation will not infringe any third party patents,
+ *  copyrights, trademarks or other rights. 
+ *
+ *  The copyright holders and contributing author(s) will not be
+ *  liable for any direct, indirect, special or consequential damages
+ *  arising out of any use of the software or documentation, even if
+ *  advised of the possibility of such damage.
+ *
+ *  Permission is hereby granted to use, copy, modify, and distribute
+ *  this source code, or portions hereof, documentation and executables,
+ *  for any purpose, without fee, subject to the following restrictions:
+ *
+ *  1. The origin of this source code must not be misrepresented.
+ *  2. Altered versions must be plainly marked as such and must
+ *     not be misrepresented as being the original source.
+ *  3. This Copyright notice may not be removed or altered from any
+ *     source or altered source distribution.
+ * 
+ *  The copyright holders and contributing author(s) specifically
+ *  permit, without fee, and encourage the use of this source code
+ *  as a component for supporting the Hypertext Markup Language in
+ *  commercial products. If you use this source code in a product,
+ *  acknowledgment is not required but would be appreciated.
+ *
+ */
+package org.ajax4jsf.org.w3c.tidy;
+
+/**
+ * Used for elements and text nodes element name is null for text nodes start and end are offsets into lexbuf which
+ * contains the textual content of all elements in the parse tree. Parent and content allow traversal of the parse tree
+ * in any direction. attributes are represented as a linked list of AttVal nodes which hold the strings for
+ * attribute/value pairs.
+ * @author Dave Raggett <a href="mailto:dsr at w3.org">dsr at w3.org </a>
+ * @author Andy Quick <a href="mailto:ac.quick at sympatico.ca">ac.quick at sympatico.ca </a> (translation to Java)
+ * @author Fabrizio Giustina
+ * @version $Revision: 1.1.2.1 $ ($Author: alexsmirnov $)
+ */
+public class Node implements Cloneable
+{
+
+    /**
+     * node type: root.
+     */
+    public static final short ROOT_NODE = 0;
+
+    /**
+     * node type: doctype.
+     */
+    public static final short DOCTYPE_TAG = 1;
+
+    /**
+     * node type: comment.
+     */
+    public static final short COMMENT_TAG = 2;
+
+    /**
+     * node type: .
+     */
+    public static final short PROC_INS_TAG = 3;
+
+    /**
+     * node type: text.
+     */
+    public static final short TEXT_NODE = 4;
+
+    /**
+     * Start tag.
+     */
+    public static final short START_TAG = 5;
+
+    /**
+     * End tag.
+     */
+    public static final short END_TAG = 6;
+
+    /**
+     * Start of an end tag.
+     */
+    public static final short START_END_TAG = 7;
+
+    /**
+     * node type: CDATA.
+     */
+    public static final short CDATA_TAG = 8;
+
+    /**
+     * node type: section tag.
+     */
+    public static final short SECTION_TAG = 9;
+
+    /**
+     * node type: asp tag.
+     */
+    public static final short ASP_TAG = 10;
+
+    /**
+     * node type: jste tag.
+     */
+    public static final short JSTE_TAG = 11;
+
+    /**
+     * node type: php tag.
+     */
+    public static final short PHP_TAG = 12;
+
+    /**
+     * node type: doctype.
+     */
+    public static final short XML_DECL = 13;
+
+    /**
+     * node type: doctype.
+     */
+    public static final short CDATA_TEXT = 14;
+
+    /**
+     * Description for all the node types. Used in toString.
+     */
+    private static final String[] NODETYPE_STRING = {
+        "RootNode",
+        "DocTypeTag",
+        "CommentTag",
+        "ProcInsTag",
+        "TextNode",
+        "StartTag",
+        "EndTag",
+        "StartEndTag",
+        "SectionTag",
+        "AspTag",
+        "PhpTag",
+        "XmlDecl",
+        "CDATAText"};
+
+    /**
+     * parent node.
+     */
+    protected Node parent;
+
+    /**
+     * pevious node.
+     */
+    protected Node prev;
+
+    /**
+     * next node.
+     */
+    protected Node next;
+
+    /**
+     * last node.
+     */
+    protected Node last;
+
+    /**
+     * start of span onto text array.
+     */
+    protected int start;
+
+    /**
+     * end of span onto text array.
+     */
+    protected int end;
+
+    /**
+     * the text array.
+     */
+    protected byte[] textarray;
+
+    /**
+     * TextNode, StartTag, EndTag etc.
+     */
+    protected short type;
+
+    /**
+     * true if closed by explicit end tag.
+     */
+    protected boolean closed;
+
+    /**
+     * true if inferred.
+     */
+    protected boolean implicit;
+
+    /**
+     * true if followed by a line break.
+     */
+    protected boolean linebreak;
+
+    /**
+     * old tag when it was changed.
+     */
+    protected Dict was;
+
+    /**
+     * tag's dictionary definition.
+     */
+    protected Dict tag;
+
+    /**
+     * Tag name.
+     */
+    protected String element;
+
+    /**
+     * Attribute/Value linked list.
+     */
+    protected AttVal attributes;
+
+    /**
+     * Contained node.
+     */
+    protected Node content;
+
+    /**
+     * DOM adapter.
+     */
+    protected org.w3c.dom.Node adapter;
+
+    /**
+     * Instantiates a new text node.
+     */
+    public Node()
+    {
+        this(TEXT_NODE, null, 0, 0);
+    }
+
+    /**
+     * Instantiates a new node.
+     * @param type node type: Node.ROOT_NODE | Node.DOCTYPE_TAG | Node.COMMENT_TAG | Node.PROC_INS_TAG | Node.TEXT_NODE |
+     * Node.START_TAG | Node.END_TAG | Node.START_END_TAG | Node.CDATA_TAG | Node.SECTION_TAG | Node. ASP_TAG |
+     * Node.JSTE_TAG | Node.PHP_TAG | Node.XML_DECL
+     * @param textarray array of bytes contained in the Node
+     * @param start start position
+     * @param end end position
+     */
+    public Node(short type, byte[] textarray, int start, int end)
+    {
+        this.parent = null;
+        this.prev = null;
+        this.next = null;
+        this.last = null;
+        this.start = start;
+        this.end = end;
+        this.textarray = textarray;
+        this.type = type;
+        this.closed = false;
+        this.implicit = false;
+        this.linebreak = false;
+        this.was = null;
+        this.tag = null;
+        this.element = null;
+        this.attributes = null;
+        this.content = null;
+    }
+
+    /**
+     * Instantiates a new node.
+     * @param type node type: Node.ROOT_NODE | Node.DOCTYPE_TAG | Node.COMMENT_TAG | Node.PROC_INS_TAG | Node.TEXT_NODE |
+     * Node.START_TAG | Node.END_TAG | Node.START_END_TAG | Node.CDATA_TAG | Node.SECTION_TAG | Node. ASP_TAG |
+     * Node.JSTE_TAG | Node.PHP_TAG | Node.XML_DECL
+     * @param textarray array of bytes contained in the Node
+     * @param start start position
+     * @param end end position
+     * @param element tag name
+     * @param tt tag table instance
+     */
+    public Node(short type, byte[] textarray, int start, int end, String element, TagTable tt)
+    {
+        this.parent = null;
+        this.prev = null;
+        this.next = null;
+        this.last = null;
+        this.start = start;
+        this.end = end;
+        this.textarray = textarray;
+        this.type = type;
+        this.closed = false;
+        this.implicit = false;
+        this.linebreak = false;
+        this.was = null;
+        this.tag = null;
+        this.element = element;
+        this.attributes = null;
+        this.content = null;
+        if (type == START_TAG || type == START_END_TAG || type == END_TAG)
+        {
+            tt.findTag(this);
+        }
+    }
+
+    /**
+     * Used to clone heading nodes when split by an hr.
+     * @see java.lang.Object#clone()
+     */
+    protected Object clone()
+    {
+        Node node;
+        try
+        {
+            node = (Node) super.clone();
+        }
+        catch (CloneNotSupportedException e)
+        {
+            // should never happen
+            throw new RuntimeException("CloneNotSupportedException " + e.getMessage());
+        }
+        if (this.textarray != null)
+        {
+            node.textarray = new byte[this.end - this.start];
+            node.start = 0;
+            node.end = this.end - this.start;
+            if (node.end > 0)
+            {
+                System.arraycopy(this.textarray, this.start, node.textarray, node.start, node.end);
+            }
+        }
+        if (this.attributes != null)
+        {
+            node.attributes = (AttVal) this.attributes.clone();
+        }
+        return node;
+    }
+
+    /**
+     * Returns an attribute with the given name in the current node.
+     * @param name attribute name.
+     * @return AttVal instance or null if no attribute with the iven name is found
+     */
+    public AttVal getAttrByName(String name)
+    {
+        AttVal attr;
+
+        for (attr = this.attributes; attr != null; attr = attr.next)
+        {
+            if (name != null && attr.attribute != null && attr.attribute.equals(name))
+            {
+                break;
+            }
+        }
+
+        return attr;
+    }
+
+    /**
+     * Default method for checking an element's attributes.
+     * @param lexer Lexer
+     */
+    public void checkAttributes(Lexer lexer)
+    {
+        AttVal attval;
+
+        for (attval = this.attributes; attval != null; attval = attval.next)
+        {
+            attval.checkAttribute(lexer, this);
+        }
+    }
+
+    /**
+     * The same attribute name can't be used more than once in each element. Discard or join attributes according to
+     * configuration.
+     * @param lexer Lexer
+     */
+    public void repairDuplicateAttributes(Lexer lexer)
+    {
+        AttVal attval;
+
+        for (attval = this.attributes; attval != null;)
+        {
+            if (attval.asp == null && attval.php == null)
+            {
+                AttVal current;
+
+                for (current = attval.next; current != null;)
+                {
+                    if (current.asp == null
+                        && current.php == null
+                        && attval.attribute != null
+                        && attval.attribute.equalsIgnoreCase(current.attribute))
+                    {
+                        AttVal temp;
+
+                        if ("class".equalsIgnoreCase(current.attribute) && lexer.configuration.joinClasses)
+                        {
+                            // concatenate classes
+                            current.value = current.value + " " + attval.value;
+
+                            temp = attval.next;
+
+                            if (temp.next == null)
+                            {
+                                current = null;
+                            }
+                            else
+                            {
+                                current = current.next;
+                            }
+
+                            lexer.report.attrError(lexer, this, attval, Report.JOINING_ATTRIBUTE);
+
+                            removeAttribute(attval);
+                            attval = temp;
+                        }
+                        else if ("style".equalsIgnoreCase(current.attribute) && lexer.configuration.joinStyles)
+                        {
+                            // concatenate styles
+
+                            // this doesn't handle CSS comments and leading/trailing white-space very well see
+                            // http://www.w3.org/TR/css-style-attr
+
+                            int end = current.value.length() - 1;
+
+                            if (current.value.charAt(end) == ';')
+                            {
+                                // attribute ends with declaration seperator
+                                current.value = current.value + " " + attval.value;
+                            }
+                            else if (current.value.charAt(end) == '}')
+                            {
+                                // attribute ends with rule set
+                                current.value = current.value + " { " + attval.value + " }";
+                            }
+                            else
+                            {
+                                // attribute ends with property value
+                                current.value = current.value + "; " + attval.value;
+                            }
+
+                            temp = attval.next;
+
+                            if (temp.next == null)
+                            {
+                                current = null;
+                            }
+                            else
+                            {
+                                current = current.next;
+                            }
+
+                            lexer.report.attrError(lexer, this, attval, Report.JOINING_ATTRIBUTE);
+
+                            removeAttribute(attval);
+                            attval = temp;
+
+                        }
+                        else if (lexer.configuration.duplicateAttrs == Configuration.KEEP_LAST)
+                        {
+                            temp = current.next;
+
+                            lexer.report.attrError(lexer, this, current, Report.REPEATED_ATTRIBUTE);
+
+                            removeAttribute(current);
+                            current = temp;
+                        }
+                        else
+                        {
+                            temp = attval.next;
+
+                            if (attval.next == null)
+                            {
+                                current = null;
+                            }
+                            else
+                            {
+                                current = current.next;
+                            }
+
+                            lexer.report.attrError(lexer, this, attval, Report.REPEATED_ATTRIBUTE);
+
+                            removeAttribute(attval);
+                            attval = temp;
+                        }
+                    }
+                    else
+                    {
+                        current = current.next;
+                    }
+                }
+                attval = attval.next;
+            }
+            else
+            {
+                attval = attval.next;
+            }
+        }
+    }
+
+    /**
+     * Adds an attribute to the node.
+     * @param name attribute name
+     * @param value attribute value
+     */
+    public void addAttribute(String name, String value)
+    {
+        AttVal av = new AttVal(null, null, null, null, '"', name, value);
+        av.dict = AttributeTable.getDefaultAttributeTable().findAttribute(av);
+
+        if (this.attributes == null)
+        {
+            this.attributes = av;
+        }
+        else
+        {
+            // append to end of attributes
+            AttVal here = this.attributes;
+
+            while (here.next != null)
+            {
+                here = here.next;
+            }
+
+            here.next = av;
+        }
+    }
+
+    /**
+     * Remove an attribute from node and then free it.
+     * @param attr attribute to remove
+     */
+    public void removeAttribute(AttVal attr)
+    {
+        AttVal av;
+        AttVal prev = null;
+        AttVal next;
+
+        for (av = this.attributes; av != null; av = next)
+        {
+            next = av.next;
+
+            if (av == attr)
+            {
+                if (prev != null)
+                {
+                    prev.next = next;
+                }
+                else
+                {
+                    this.attributes = next;
+                }
+            }
+            else
+            {
+                prev = av;
+            }
+        }
+    }
+
+    /**
+     * Find the doctype element.
+     * @return doctype node or null if not found
+     */
+    public Node findDocType()
+    {
+        Node node = this.content;
+
+        while (node != null && node.type != DOCTYPE_TAG)
+        {
+            node = node.next;
+        }
+
+        return node;
+    }
+
+    /**
+     * Discard the doctype node.
+     */
+    public void discardDocType()
+    {
+        Node node;
+
+        node = findDocType();
+        if (node != null)
+        {
+            if (node.prev != null)
+            {
+                node.prev.next = node.next;
+            }
+            else
+            {
+                node.parent.content = node.next;
+            }
+
+            if (node.next != null)
+            {
+                node.next.prev = node.prev;
+            }
+
+            node.next = null;
+        }
+    }
+
+    /**
+     * Remove node from markup tree and discard it.
+     * @param element discarded node
+     * @return next node
+     */
+    public static Node discardElement(Node element)
+    {
+        Node next = null;
+
+        if (element != null)
+        {
+            next = element.next;
+            element.removeNode();
+        }
+
+        return next;
+    }
+
+    /**
+     * Insert a node into markup tree.
+     * @param node to insert
+     */
+    public void insertNodeAtStart(Node node)
+    {
+        node.parent = this;
+
+        if (this.content == null)
+        {
+            this.last = node;
+        }
+        else
+        {
+            this.content.prev = node; // AQ added 13 Apr 2000
+        }
+
+        node.next = this.content;
+        node.prev = null;
+        this.content = node;
+    }
+
+    /**
+     * Insert node into markup tree.
+     * @param node Node to insert
+     */
+    public void insertNodeAtEnd(Node node)
+    {
+        node.parent = this;
+        node.prev = this.last;
+
+        if (this.last != null)
+        {
+            this.last.next = node;
+        }
+        else
+        {
+            this.content = node;
+        }
+
+        this.last = node;
+    }
+
+    /**
+     * Insert node into markup tree in pace of element which is moved to become the child of the node.
+     * @param element child node. Will be inserted as a child of element
+     * @param node parent node
+     */
+    public static void insertNodeAsParent(Node element, Node node)
+    {
+        node.content = element;
+        node.last = element;
+        node.parent = element.parent;
+        element.parent = node;
+
+        if (node.parent.content == element)
+        {
+            node.parent.content = node;
+        }
+
+        if (node.parent.last == element)
+        {
+            node.parent.last = node;
+        }
+
+        node.prev = element.prev;
+        element.prev = null;
+
+        if (node.prev != null)
+        {
+            node.prev.next = node;
+        }
+
+        node.next = element.next;
+        element.next = null;
+
+        if (node.next != null)
+        {
+            node.next.prev = node;
+        }
+    }
+
+    /**
+     * Insert node into markup tree before element.
+     * @param element child node. Will be insertedbefore element
+     * @param node following node
+     */
+    public static void insertNodeBeforeElement(Node element, Node node)
+    {
+        Node parent;
+
+        parent = element.parent;
+        node.parent = parent;
+        node.next = element;
+        node.prev = element.prev;
+        element.prev = node;
+
+        if (node.prev != null)
+        {
+            node.prev.next = node;
+        }
+
+        if (parent != null && parent.content == element)
+        {
+            parent.content = node;
+        }
+    }
+
+    /**
+     * Insert node into markup tree after element.
+     * @param node new node to insert
+     */
+    public void insertNodeAfterElement(Node node)
+    {
+        Node parent;
+
+        parent = this.parent;
+        node.parent = parent;
+
+        // AQ - 13Jan2000 fix for parent == null
+        if (parent != null && parent.last == this)
+        {
+            parent.last = node;
+        }
+        else
+        {
+            node.next = this.next;
+            // AQ - 13Jan2000 fix for node.next == null
+            if (node.next != null)
+            {
+                node.next.prev = node;
+            }
+        }
+
+        this.next = node;
+        node.prev = this;
+    }
+
+    /**
+     * Trim an empty element.
+     * @param lexer Lexer
+     * @param element empty node to be removed
+     */
+    public static void trimEmptyElement(Lexer lexer, Node element)
+    {
+        // don't trim if user explicitely set trim-empty-elements to false
+        // empty element can be needed in css sites
+        if (lexer.configuration.trimEmpty)
+        {
+            TagTable tt = lexer.configuration.tt;
+
+            if (lexer.canPrune(element))
+            {
+                if (element.type != TEXT_NODE)
+                {
+                    lexer.report.warning(lexer, element, null, Report.TRIM_EMPTY_ELEMENT);
+                }
+
+                discardElement(element);
+            }
+            else if (element.tag == tt.tagP && element.content == null)
+            {
+                // replace <p></p> by <br><br> to preserve formatting
+                Node node = lexer.inferredTag("br");
+                Node.coerceNode(lexer, element, tt.tagBr);
+                element.insertNodeAfterElement(node);
+            }
+        }
+    }
+
+    /**
+     * This maps <em> hello </em> <strong>world </strong> to <em> hello </em> <strong>world </strong>. If last child of
+     * element is a text node then trim trailing white space character moving it to after element's end tag.
+     * @param lexer Lexer
+     * @param element node
+     * @param last last child of element
+     */
+    public static void trimTrailingSpace(Lexer lexer, Node element, Node last)
+    {
+        byte c;
+        TagTable tt = lexer.configuration.tt;
+
+        if (last != null && last.type == Node.TEXT_NODE)
+        {
+            if (last.end > last.start)
+
+            {
+                c = lexer.lexbuf[last.end - 1];
+
+                if (c == 160 || c == (byte) ' ')
+                {
+                    // take care with <td> &nbsp; </td>
+                    // fix for [435920]
+                    if (c == 160 && (element.tag == tt.tagTd || element.tag == tt.tagTh))
+                    {
+                        if (last.end > last.start + 1)
+                        {
+                            last.end -= 1;
+                        }
+                    }
+                    else
+                    {
+                        last.end -= 1;
+
+                        if (TidyUtils.toBoolean(element.tag.model & Dict.CM_INLINE)
+                            && !TidyUtils.toBoolean(element.tag.model & Dict.CM_FIELD))
+                        {
+                            lexer.insertspace = true;
+                        }
+                    }
+                }
+            }
+            // if empty string then delete from parse tree
+            if (last.start == last.end) // COMMENT_NBSP_FIX: && tag != tag_td && tag != tag_th
+            {
+                trimEmptyElement(lexer, last);
+            }
+        }
+    }
+
+    /**
+     * Escapes the given tag.
+     * @param lexer Lexer
+     * @param element node to be escaped
+     * @return escaped node
+     */
+    protected static Node escapeTag(Lexer lexer, Node element)
+    {
+        Node node = lexer.newNode();
+        node.start = lexer.lexsize;
+        node.textarray = element.textarray; // @todo check it
+        lexer.addByte('<');
+
+        if (element.type == END_TAG)
+        {
+            lexer.addByte('/');
+        }
+
+        if (element.element != null)
+        {
+            lexer.addStringLiteral(element.element);
+        }
+        else if (element.type == DOCTYPE_TAG)
+        {
+            int i;
+
+            lexer.addByte('!');
+            lexer.addByte('D');
+            lexer.addByte('O');
+            lexer.addByte('C');
+            lexer.addByte('T');
+            lexer.addByte('Y');
+            lexer.addByte('P');
+            lexer.addByte('E');
+            lexer.addByte(' ');
+
+            for (i = element.start; i < element.end; ++i)
+            {
+                lexer.addByte(lexer.lexbuf[i]);
+            }
+        }
+
+        if (element.type == START_END_TAG)
+        {
+            lexer.addByte('/');
+        }
+
+        lexer.addByte('>');
+        node.end = lexer.lexsize;
+
+        return node;
+    }
+
+    /**
+     * Is the node content empty or blank? Assumes node is a text node.
+     * @param lexer Lexer
+     * @return <code>true</code> if the node content empty or blank
+     */
+    public boolean isBlank(Lexer lexer)
+    {
+        if (this.type == TEXT_NODE)
+        {
+            if (this.end == this.start)
+            {
+                return true;
+            }
+            if (this.end == this.start + 1 && lexer.lexbuf[this.end - 1] == ' ')
+            {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * This maps <code>&lt;p> hello &lt;em> world &lt;/em></code> to <code>&lt;p> hello &lt;em> world &lt;/em></code>.
+     * Trims initial space, by moving it before the start tag, or if this element is the first in parent's content, then
+     * by discarding the space.
+     * @param lexer Lexer
+     * @param element parent node
+     * @param text text node
+     */
+    public static void trimInitialSpace(Lexer lexer, Node element, Node text)
+    {
+        Node prev, node;
+
+        // #427677 - fix by Gary Peskin 31 Oct 00
+        if (text.type == TEXT_NODE && text.textarray[text.start] == (byte) ' ' && (text.start < text.end))
+        {
+            if (TidyUtils.toBoolean(element.tag.model & Dict.CM_INLINE)
+                && !TidyUtils.toBoolean(element.tag.model & Dict.CM_FIELD)
+                && element.parent.content != element)
+            {
+                prev = element.prev;
+
+                if (prev != null && prev.type == TEXT_NODE)
+                {
+                    if (prev.textarray[prev.end - 1] != (byte) ' ')
+                    {
+                        prev.textarray[prev.end++] = (byte) ' ';
+                    }
+
+                    ++element.start;
+                }
+                else
+                {
+                    // create new node
+                    node = lexer.newNode();
+                    // Local fix for bug 228486 (GLP). This handles the case
+                    // where we need to create a preceeding text node but there are
+                    // no "slots" in textarray that we can steal from the current
+                    // element. Therefore, we create a new textarray containing
+                    // just the blank. When Tidy is fixed, this should be removed.
+                    if (element.start >= element.end)
+                    {
+                        node.start = 0;
+                        node.end = 1;
+                        node.textarray = new byte[1];
+                    }
+                    else
+                    {
+                        node.start = element.start++;
+                        node.end = element.start;
+                        node.textarray = element.textarray;
+                    }
+                    node.textarray[node.start] = (byte) ' ';
+                    node.prev = prev;
+                    if (prev != null)
+                    {
+                        prev.next = node;
+                    }
+                    node.next = element;
+                    element.prev = node;
+                    node.parent = element.parent;
+                }
+            }
+
+            // discard the space in current node
+            ++text.start;
+        }
+    }
+
+    /**
+     * Move initial and trailing space out. This routine maps: hello <em> world </em> to hello <em> world </em> and
+     * <em> hello </em> <strong>world </strong> to <em> hello </em> <strong>world </strong>.
+     * @param lexer Lexer
+     * @param element Node
+     */
+    public static void trimSpaces(Lexer lexer, Node element)
+    {
+        Node text = element.content;
+        TagTable tt = lexer.configuration.tt;
+
+        if (text != null && text.type == Node.TEXT_NODE && element.tag != tt.tagPre)
+        {
+            trimInitialSpace(lexer, element, text);
+        }
+
+        text = element.last;
+
+        if (text != null && text.type == Node.TEXT_NODE)
+        {
+            trimTrailingSpace(lexer, element, text);
+        }
+    }
+
+    /**
+     * Is this node contained in a given tag?
+     * @param tag descendant tag
+     * @return <code>true</code> if node is contained in tag
+     */
+    public boolean isDescendantOf(Dict tag)
+    {
+        Node parent;
+
+        for (parent = this.parent; parent != null; parent = parent.parent)
+        {
+            if (parent.tag == tag)
+            {
+                return true;
+            }
+        }
+
+        return false;
+    }
+
+    /**
+     * The doctype has been found after other tags, and needs moving to before the html element.
+     * @param lexer Lexer
+     * @param element document
+     * @param doctype doctype node to insert at the beginning of element
+     */
+    public static void insertDocType(Lexer lexer, Node element, Node doctype)
+    {
+        TagTable tt = lexer.configuration.tt;
+
+        lexer.report.warning(lexer, element, doctype, Report.DOCTYPE_AFTER_TAGS);
+
+        while (element.tag != tt.tagHtml)
+        {
+            element = element.parent;
+        }
+
+        insertNodeBeforeElement(element, doctype);
+    }
+
+    /**
+     * Find the body node.
+     * @param tt tag table
+     * @return body node
+     */
+    public Node findBody(TagTable tt)
+    {
+        Node node;
+
+        node = this.content;
+
+        while (node != null && node.tag != tt.tagHtml)
+        {
+            node = node.next;
+        }
+
+        if (node == null)
+        {
+            return null;
+        }
+
+        node = node.content;
+
+        while (node != null && node.tag != tt.tagBody && node.tag != tt.tagFrameset)
+        {
+            node = node.next;
+        }
+
+        if (node.tag == tt.tagFrameset)
+        {
+            node = node.content;
+
+            while (node != null && node.tag != tt.tagNoframes)
+            {
+                node = node.next;
+            }
+
+            if (node != null)
+            {
+                node = node.content;
+                while (node != null && node.tag != tt.tagBody)
+                {
+                    node = node.next;
+                }
+            }
+        }
+
+        return node;
+    }
+
+    /**
+     * Is the node an element?
+     * @return <code>true</code> if type is START_TAG | START_END_TAG
+     */
+    public boolean isElement()
+    {
+        return (this.type == START_TAG || this.type == START_END_TAG ? true : false);
+    }
+
+    /**
+     * Unexpected content in table row is moved to just before the table in accordance with Netscape and IE. This code
+     * assumes that node hasn't been inserted into the row.
+     * @param row Row node
+     * @param node Node which should be moved before the table
+     * @param tt tag table
+     */
+    public static void moveBeforeTable(Node row, Node node, TagTable tt)
+    {
+        Node table;
+
+        /* first find the table element */
+        for (table = row.parent; table != null; table = table.parent)
+        {
+            if (table.tag == tt.tagTable)
+            {
+                if (table.parent.content == table)
+                {
+                    table.parent.content = node;
+                }
+
+                node.prev = table.prev;
+                node.next = table;
+                table.prev = node;
+                node.parent = table.parent;
+
+                if (node.prev != null)
+                {
+                    node.prev.next = node;
+                }
+
+                break;
+            }
+        }
+    }
+
+    /**
+     * If a table row is empty then insert an empty cell.This practice is consistent with browser behavior and avoids
+     * potential problems with row spanning cells.
+     * @param lexer Lexer
+     * @param row row node
+     */
+    public static void fixEmptyRow(Lexer lexer, Node row)
+    {
+        Node cell;
+
+        if (row.content == null)
+        {
+            cell = lexer.inferredTag("td");
+            row.insertNodeAtEnd(cell);
+            lexer.report.warning(lexer, row, cell, Report.MISSING_STARTTAG);
+        }
+    }
+
+    /**
+     * Coerce a node.
+     * @param lexer Lexer
+     * @param node Node
+     * @param tag tag dictionary reference
+     */
+    public static void coerceNode(Lexer lexer, Node node, Dict tag)
+    {
+        Node tmp = lexer.inferredTag(tag.name);
+        lexer.report.warning(lexer, node, tmp, Report.OBSOLETE_ELEMENT);
+        node.was = node.tag;
+        node.tag = tag;
+        node.type = START_TAG;
+        node.implicit = true;
+        node.element = tag.name;
+    }
+
+    /**
+     * Extract this node and its children from a markup tree.
+     */
+    public void removeNode()
+    {
+        if (this.prev != null)
+        {
+            this.prev.next = this.next;
+        }
+
+        if (this.next != null)
+        {
+            this.next.prev = this.prev;
+        }
+
+        if (this.parent != null)
+        {
+            if (this.parent.content == this)
+            {
+                this.parent.content = this.next;
+            }
+
+            if (this.parent.last == this)
+            {
+                this.parent.last = this.prev;
+            }
+        }
+
+        this.parent = null;
+        this.prev = null;
+        this.next = null;
+    }
+
+    /**
+     * Insert a node at the end.
+     * @param element parent node
+     * @param node will be inserted at the end of element
+     * @return <code>true</code> if the node has been inserted
+     */
+    public static boolean insertMisc(Node element, Node node)
+    {
+        if (node.type == COMMENT_TAG
+            || node.type == PROC_INS_TAG
+            || node.type == CDATA_TAG
+            || node.type == SECTION_TAG
+            || node.type == ASP_TAG
+            || node.type == JSTE_TAG
+            || node.type == PHP_TAG
+            || node.type == XML_DECL)
+        {
+            element.insertNodeAtEnd(node);
+            return true;
+        }
+
+        return false;
+    }
+
+    /**
+     * Is this a new (user defined) node? Used to determine how attributes without values should be printed. This was
+     * introduced to deal with user defined tags e.g. Cold Fusion.
+     * @return <code>true</code> if this node represents a user-defined tag.
+     */
+    public boolean isNewNode()
+    {
+        if (this.tag != null)
+        {
+            return TidyUtils.toBoolean(this.tag.model & Dict.CM_NEW);
+        }
+
+        return true;
+    }
+
+    /**
+     * Does the node have one (and only one) child?
+     * @return <code>true</code> if the node has one child
+     */
+    public boolean hasOneChild()
+    {
+        return (this.content != null && this.content.next == null);
+    }
+
+    /**
+     * Find the "html" element.
+     * @param tt tag table
+     * @return html node
+     */
+    public Node findHTML(TagTable tt)
+    {
+        Node node;
+
+        for (node = this.content; node != null && node.tag != tt.tagHtml; node = node.next)
+        {
+            //
+        }
+
+        return node;
+    }
+
+    /**
+     * Find the head tag.
+     * @param tt tag table
+     * @return head node
+     */
+    public Node findHEAD(TagTable tt)
+    {
+        Node node;
+
+        node = this.findHTML(tt);
+
+        if (node != null)
+        {
+            for (node = node.content; node != null && node.tag != tt.tagHead; node = node.next)
+            {
+                //
+            }
+        }
+
+        return node;
+    }
+
+    /**
+     * Checks for node integrity.
+     * @return false if node is not consistent
+     */
+    public boolean checkNodeIntegrity()
+    {
+        Node child;
+        boolean found = false;
+
+        if (this.prev != null)
+        {
+            if (this.prev.next != this)
+            {
+                return false;
+            }
+        }
+
+        if (this.next != null)
+        {
+            if (this.next.prev != this)
+            {
+                return false;
+            }
+        }
+
+        if (this.parent != null)
+        {
+            if (this.prev == null && this.parent.content != this)
+            {
+                return false;
+            }
+
+            if (this.next == null && this.parent.last != this)
+            {
+                return false;
+            }
+
+            for (child = this.parent.content; child != null; child = child.next)
+            {
+                if (child == this)
+                {
+                    found = true;
+                    break;
+                }
+            }
+
+            if (!found)
+            {
+                return false;
+            }
+        }
+
+        for (child = this.content; child != null; child = child.next)
+        {
+            if (!child.checkNodeIntegrity())
+            {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    /**
+     * Add a css class to the node. If a class attribute already exists adds the value to the existing attribute.
+     * @param classname css class name
+     */
+    public void addClass(String classname)
+    {
+        AttVal classattr = this.getAttrByName("class");
+
+        // if there already is a class attribute then append class name after a space
+        if (classattr != null)
+        {
+            classattr.value = classattr.value + " " + classname;
+        }
+        else
+        {
+            // create new class attribute
+            this.addAttribute("class", classname);
+        }
+    }
+
+    /**
+     * @see java.lang.Object#toString()
+     */
+    public String toString()
+    {
+        String s = "";
+        Node n = this;
+
+        while (n != null)
+        {
+            s += "[Node type=";
+            s += NODETYPE_STRING[n.type];
+            s += ",element=";
+            if (n.element != null)
+            {
+                s += n.element;
+            }
+            else
+            {
+                s += "null";
+            }
+            if (n.type == TEXT_NODE || n.type == COMMENT_TAG || n.type == PROC_INS_TAG)
+            {
+                s += ",text=";
+                if (n.textarray != null && n.start <= n.end)
+                {
+                    s += "\"";
+                    s += TidyUtils.getString(n.textarray, n.start, n.end - n.start);
+                    s += "\"";
+                }
+                else
+                {
+                    s += "null";
+                }
+            }
+            s += ",content=";
+            if (n.content != null)
+            {
+                s += n.content.toString();
+            }
+            else
+            {
+                s += "null";
+            }
+            s += "]";
+            if (n.next != null)
+            {
+                s += ",";
+            }
+            n = n.next;
+        }
+        return s;
+    }
+
+    /**
+     * Returns a DOM Node which wrap the current tidy Node.
+     * @return org.w3c.dom.Node instance
+     */
+    protected org.w3c.dom.Node getAdapter()
+    {
+        if (adapter == null)
+        {
+            switch (this.type)
+            {
+                case ROOT_NODE :
+                    adapter = new DOMDocumentImpl(this);
+                    break;
+                case START_TAG :
+                case START_END_TAG :
+                    adapter = new DOMElementImpl(this);
+                    break;
+                case DOCTYPE_TAG :
+                    adapter = new DOMDocumentTypeImpl(this);
+                    break;
+                case COMMENT_TAG :
+                    adapter = new DOMCommentImpl(this);
+                    break;
+                case TEXT_NODE :
+                    adapter = new DOMTextImpl(this);
+                    break;
+                case CDATA_TEXT :
+                case CDATA_TAG :
+                    adapter = new DOMCDATASectionImpl(this);
+                    break;
+                case PROC_INS_TAG :
+                    adapter = new DOMProcessingInstructionImpl(this);
+                    break;
+                default :
+                    adapter = new DOMNodeImpl(this);
+            }
+        }
+        return adapter;
+    }
+
+    /**
+     * Clone this node.
+     * @param deep if true deep clone the node (also clones all the contained nodes)
+     * @return cloned node
+     */
+    protected Node cloneNode(boolean deep)
+    {
+        Node node = (Node) this.clone();
+        if (deep)
+        {
+            Node child;
+            Node newChild;
+            for (child = this.content; child != null; child = child.next)
+            {
+                newChild = child.cloneNode(deep);
+                node.insertNodeAtEnd(newChild);
+            }
+        }
+        return node;
+    }
+
+    /**
+     * Setter for node type.
+     * @param newType a valid node type constant
+     */
+    protected void setType(short newType)
+    {
+        this.type = newType;
+    }
+
+    /**
+     * Used to check script node for script language.
+     * @return <code>true</code> if the script node contains javascript
+     */
+    public boolean isJavaScript()
+    {
+        boolean result = false;
+        AttVal attr;
+
+        if (this.attributes == null)
+        {
+            return true;
+        }
+
+        for (attr = this.attributes; attr != null; attr = attr.next)
+        {
+            if (("language".equalsIgnoreCase(attr.attribute) || "type".equalsIgnoreCase(attr.attribute))
+                && "javascript".equalsIgnoreCase(attr.value))
+            {
+                result = true;
+            }
+        }
+
+        return result;
+    }
+
+    /**
+     * Does the node expect contents?
+     * @return <code>false</code> if this node should be empty
+     */
+    public boolean expectsContent()
+    {
+        if (this.type != Node.START_TAG)
+        {
+            return false;
+        }
+
+        // unknown element?
+        if (this.tag == null)
+        {
+            return true;
+        }
+
+        if (TidyUtils.toBoolean(this.tag.model & Dict.CM_EMPTY))
+        {
+            return false;
+        }
+
+        return true;
+    }
+
+	/**
+	 * @return Returns the content.
+	 */
+	public Node getContent() {
+		return content;
+	}
+
+	/**
+	 * @return Returns the element.
+	 */
+	public String getElement() {
+		return element;
+	}
+
+	/**
+	 * @return Returns the tag.
+	 */
+	public Dict getTag() {
+		return tag;
+	}
+
+	/**
+	 * @return Returns the type.
+	 */
+	public short getType() {
+		return type;
+	}
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/Out.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/Out.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/Out.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,111 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ *  Java HTML Tidy - JTidy
+ *  HTML parser and pretty printer
+ *
+ *  Copyright (c) 1998-2000 World Wide Web Consortium (Massachusetts
+ *  Institute of Technology, Institut National de Recherche en
+ *  Informatique et en Automatique, Keio University). All Rights
+ *  Reserved.
+ *
+ *  Contributing Author(s):
+ *
+ *     Dave Raggett <dsr at w3.org>
+ *     Andy Quick <ac.quick at sympatico.ca> (translation to Java)
+ *     Gary L Peskin <garyp at firstech.com> (Java development)
+ *     Sami Lempinen <sami at lempinen.net> (release management)
+ *     Fabrizio Giustina <fgiust at users.sourceforge.net>
+ *
+ *  The contributing author(s) would like to thank all those who
+ *  helped with testing, bug fixes, and patience.  This wouldn't
+ *  have been possible without all of you.
+ *
+ *  COPYRIGHT NOTICE:
+ * 
+ *  This software and documentation is provided "as is," and
+ *  the copyright holders and contributing author(s) make no
+ *  representations or warranties, express or implied, including
+ *  but not limited to, warranties of merchantability or fitness
+ *  for any particular purpose or that the use of the software or
+ *  documentation will not infringe any third party patents,
+ *  copyrights, trademarks or other rights. 
+ *
+ *  The copyright holders and contributing author(s) will not be
+ *  liable for any direct, indirect, special or consequential damages
+ *  arising out of any use of the software or documentation, even if
+ *  advised of the possibility of such damage.
+ *
+ *  Permission is hereby granted to use, copy, modify, and distribute
+ *  this source code, or portions hereof, documentation and executables,
+ *  for any purpose, without fee, subject to the following restrictions:
+ *
+ *  1. The origin of this source code must not be misrepresented.
+ *  2. Altered versions must be plainly marked as such and must
+ *     not be misrepresented as being the original source.
+ *  3. This Copyright notice may not be removed or altered from any
+ *     source or altered source distribution.
+ * 
+ *  The copyright holders and contributing author(s) specifically
+ *  permit, without fee, and encourage the use of this source code
+ *  as a component for supporting the Hypertext Markup Language in
+ *  commercial products. If you use this source code in a product,
+ *  acknowledgment is not required but would be appreciated.
+ *
+ */
+package org.ajax4jsf.org.w3c.tidy;
+
+import java.io.IOException;
+
+/**
+ * Tidy Output interface.
+ * @author Dave Raggett <a href="mailto:dsr at w3.org">dsr at w3.org </a>
+ * @author Andy Quick <a href="mailto:ac.quick at sympatico.ca">ac.quick at sympatico.ca </a> (translation to Java)
+ * @author Fabrizio Giustina
+ * @version $Revision: 1.1.2.1 $ ($Author: alexsmirnov $)
+ */
+public interface Out
+{
+
+    /**
+     * writes an char.
+     * @param c char to write
+     */
+    void outc(int c) throws IOException;
+
+    /**
+     * writes a byte.
+     * @param c byte to write
+     */
+    void outc(byte c) throws IOException;
+
+    /**
+     * writes a newline.
+     */
+    void newline() throws IOException;
+
+    /**
+     * Flush and close the stream.
+     */
+    void close() throws IOException;
+
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/OutFactory.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/OutFactory.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/OutFactory.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,121 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ *  Java HTML Tidy - JTidy
+ *  HTML parser and pretty printer
+ *
+ *  Copyright (c) 1998-2000 World Wide Web Consortium (Massachusetts
+ *  Institute of Technology, Institut National de Recherche en
+ *  Informatique et en Automatique, Keio University). All Rights
+ *  Reserved.
+ *
+ *  Contributing Author(s):
+ *
+ *     Dave Raggett <dsr at w3.org>
+ *     Andy Quick <ac.quick at sympatico.ca> (translation to Java)
+ *     Gary L Peskin <garyp at firstech.com> (Java development)
+ *     Sami Lempinen <sami at lempinen.net> (release management)
+ *     Fabrizio Giustina <fgiust at users.sourceforge.net>
+ *
+ *  The contributing author(s) would like to thank all those who
+ *  helped with testing, bug fixes, and patience.  This wouldn't
+ *  have been possible without all of you.
+ *
+ *  COPYRIGHT NOTICE:
+ * 
+ *  This software and documentation is provided "as is," and
+ *  the copyright holders and contributing author(s) make no
+ *  representations or warranties, express or implied, including
+ *  but not limited to, warranties of merchantability or fitness
+ *  for any particular purpose or that the use of the software or
+ *  documentation will not infringe any third party patents,
+ *  copyrights, trademarks or other rights. 
+ *
+ *  The copyright holders and contributing author(s) will not be
+ *  liable for any direct, indirect, special or consequential damages
+ *  arising out of any use of the software or documentation, even if
+ *  advised of the possibility of such damage.
+ *
+ *  Permission is hereby granted to use, copy, modify, and distribute
+ *  this source code, or portions hereof, documentation and executables,
+ *  for any purpose, without fee, subject to the following restrictions:
+ *
+ *  1. The origin of this source code must not be misrepresented.
+ *  2. Altered versions must be plainly marked as such and must
+ *     not be misrepresented as being the original source.
+ *  3. This Copyright notice may not be removed or altered from any
+ *     source or altered source distribution.
+ * 
+ *  The copyright holders and contributing author(s) specifically
+ *  permit, without fee, and encourage the use of this source code
+ *  as a component for supporting the Hypertext Markup Language in
+ *  commercial products. If you use this source code in a product,
+ *  acknowledgment is not required but would be appreciated.
+ *
+ */
+package org.ajax4jsf.org.w3c.tidy;
+
+import java.io.OutputStream;
+import java.io.UnsupportedEncodingException;
+import java.io.Writer;
+
+import org.ajax4jsf.framework.util.message.Messages;
+
+
+/**
+ * Tidy Output factory.
+ * @author Fabrizio Giustina
+ * @version $Revision: 1.1.2.1 $ ($Author: alexsmirnov $)
+ */
+public final class OutFactory
+{
+
+    /**
+     * Don't instantiate.
+     */
+    private OutFactory()
+    {
+        // unused
+    }
+
+    /**
+     * Returns the appropriate Out implementation.
+     * @param config configuration instance
+     * @param stream output stream
+     * @return out instance
+     */
+    public static Out getOut(Configuration config, OutputStream stream)
+    {
+        try
+        {
+            return new OutJavaImpl(config, config.getOutCharEncodingName(), stream);
+        }
+        catch (UnsupportedEncodingException e)
+        {
+            throw new RuntimeException(Messages.getMessage(Messages.UNSUPPORTED_ENCODING_ERROR, e.getMessage()));
+        }
+    }
+
+	public static Out getOut(Configuration config, Writer out) {
+            return new OutJavaImpl(config, config.getOutCharEncodingName(), out);
+	}
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/OutImpl.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/OutImpl.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/OutImpl.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,460 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ *  Java HTML Tidy - JTidy
+ *  HTML parser and pretty printer
+ *
+ *  Copyright (c) 1998-2000 World Wide Web Consortium (Massachusetts
+ *  Institute of Technology, Institut National de Recherche en
+ *  Informatique et en Automatique, Keio University). All Rights
+ *  Reserved.
+ *
+ *  Contributing Author(s):
+ *
+ *     Dave Raggett <dsr at w3.org>
+ *     Andy Quick <ac.quick at sympatico.ca> (translation to Java)
+ *     Gary L Peskin <garyp at firstech.com> (Java development)
+ *     Sami Lempinen <sami at lempinen.net> (release management)
+ *     Fabrizio Giustina <fgiust at users.sourceforge.net>
+ *
+ *  The contributing author(s) would like to thank all those who
+ *  helped with testing, bug fixes, and patience.  This wouldn't
+ *  have been possible without all of you.
+ *
+ *  COPYRIGHT NOTICE:
+ * 
+ *  This software and documentation is provided "as is," and
+ *  the copyright holders and contributing author(s) make no
+ *  representations or warranties, express or implied, including
+ *  but not limited to, warranties of merchantability or fitness
+ *  for any particular purpose or that the use of the software or
+ *  documentation will not infringe any third party patents,
+ *  copyrights, trademarks or other rights. 
+ *
+ *  The copyright holders and contributing author(s) will not be
+ *  liable for any direct, indirect, special or consequential damages
+ *  arising out of any use of the software or documentation, even if
+ *  advised of the possibility of such damage.
+ *
+ *  Permission is hereby granted to use, copy, modify, and distribute
+ *  this source code, or portions hereof, documentation and executables,
+ *  for any purpose, without fee, subject to the following restrictions:
+ *
+ *  1. The origin of this source code must not be misrepresented.
+ *  2. Altered versions must be plainly marked as such and must
+ *     not be misrepresented as being the original source.
+ *  3. This Copyright notice may not be removed or altered from any
+ *     source or altered source distribution.
+ * 
+ *  The copyright holders and contributing author(s) specifically
+ *  permit, without fee, and encourage the use of this source code
+ *  as a component for supporting the Hypertext Markup Language in
+ *  commercial products. If you use this source code in a product,
+ *  acknowledgment is not required but would be appreciated.
+ *
+ */
+package org.ajax4jsf.org.w3c.tidy;
+
+import java.io.IOException;
+import java.io.OutputStream;
+
+import org.ajax4jsf.org.w3c.tidy.EncodingUtils.PutBytes;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+
+
+/**
+ * Output implementation. This implementation is from the c version of tidy and it doesn't take advantage of java
+ * writers.
+ * @author Dave Raggett <a href="mailto:dsr at w3.org">dsr at w3.org </a>
+ * @author Andy Quick <a href="mailto:ac.quick at sympatico.ca">ac.quick at sympatico.ca </a> (translation to Java)
+ * @author Fabrizio Giustina
+ * @version $Revision: 1.1.2.1 $ ($Author: alexsmirnov $)
+ */
+public class OutImpl implements Out
+{
+	
+	private static final Log log = LogFactory.getLog(OutImpl.class);
+
+    /**
+     * output encoding.
+     */
+    private int encoding;
+
+    /**
+     * actual state for ISO 2022.
+     */
+    private int state;
+
+    /**
+     * output stream.
+     */
+    private OutputStream out;
+
+    /**
+     * putter callback.
+     */
+    private PutBytes putBytes;
+
+    /**
+     * newline bytes.
+     */
+    private byte[] newline;
+
+    /**
+     * Constructor.
+     * @param configuration actual configuration instance (needed for newline configuration)
+     * @param encoding encoding constant
+     * @param out output stream
+     */
+    public OutImpl(Configuration configuration, int encoding, OutputStream out)
+    {
+        this.encoding = encoding;
+        this.state = EncodingUtils.FSM_ASCII;
+        this.out = out;
+
+        // copy configured newline in bytes
+        this.newline = new byte[configuration.newline.length];
+        for (int j = 0; j < configuration.newline.length; j++)
+        {
+            this.newline[j] = (byte) configuration.newline[j];
+        }
+
+        this.putBytes = new PutBytes()
+        {
+
+            private OutImpl impl;
+
+            PutBytes setOut(OutImpl out)
+            {
+                this.impl = out;
+                return this;
+            }
+
+            public void doPut(byte[] buf, int[] count)
+            {
+                impl.outcUTF8Bytes(buf, count);
+            }
+        } // set the out instance direclty
+            .setOut(this);
+    }
+
+    /**
+     * output UTF-8 bytes to output stream.
+     * @param buf array of bytes
+     * @param count number of bytes in buf to write
+     */
+    void outcUTF8Bytes(byte[] buf, int[] count)
+    {
+        try
+        {
+            for (int i = 0; i < count[0]; i++)
+            {
+                out.write(buf[i]);
+            }
+        }
+        catch (IOException e)
+        {
+            log.error("OutImpl.outcUTF8Bytes: " + e.toString());
+        }
+    }
+
+    /**
+     * .
+     * @see org.ajax4jsf.org.w3c.tidy.Out#outc(byte)
+     */
+    public void outc(byte c)
+    {
+        outc(c & 0xFF); // Convert to unsigned.
+    }
+
+    /**
+     * @see org.ajax4jsf.org.w3c.tidy.Out#outc(int)
+     */
+    public void outc(int c)
+    {
+        int ch;
+
+        try
+        {
+
+            if (this.encoding == Configuration.MACROMAN)
+            {
+                if (c < 128)
+                {
+                    out.write(c);
+                }
+                else
+                {
+                    int i;
+
+                    for (i = 128; i < 256; i++)
+                    {
+                        if (EncodingUtils.decodeMacRoman(i - 128) == c)
+                        {
+                            out.write(i);
+                            break;
+                        }
+                    }
+                }
+            }
+            else
+
+            if (this.encoding == Configuration.WIN1252)
+            {
+                if (c < 128 || (c > 159 && c < 256))
+                {
+                    out.write(c);
+                }
+                else
+                {
+                    int i;
+
+                    for (i = 128; i < 160; i++)
+                    {
+                        if (EncodingUtils.decodeWin1252(i - 128) == c)
+                        {
+                            out.write(i);
+                            break;
+                        }
+                    }
+                }
+            }
+            else if (this.encoding == Configuration.UTF8)
+            {
+                int[] count = new int[]{0};
+
+                EncodingUtils.encodeCharToUTF8Bytes(c, null, this.putBytes, count);
+                if (count[0] <= 0)
+                {
+                    /* ReportEncodingError(in->lexer, INVALID_UTF8 | REPLACED_CHAR, c); */
+                    /* replacement char 0xFFFD encoded as UTF-8 */
+                    out.write(0xEF);
+                    out.write(0xBF);
+                    out.write(0xBF);
+                }
+            }
+            else if (this.encoding == Configuration.ISO2022)
+            {
+                if (c == 0x1b) /* ESC */
+                {
+                    this.state = EncodingUtils.FSM_ESC;
+                }
+                else
+                {
+                    switch (this.state)
+                    {
+                        case EncodingUtils.FSM_ESC :
+                            if (c == '$')
+                            {
+                                this.state = EncodingUtils.FSM_ESCD;
+                            }
+                            else if (c == '(')
+                            {
+                                this.state = EncodingUtils.FSM_ESCP;
+                            }
+                            else
+                            {
+                                this.state = EncodingUtils.FSM_ASCII;
+                            }
+                            break;
+
+                        case EncodingUtils.FSM_ESCD :
+                            if (c == '(')
+                            {
+                                this.state = EncodingUtils.FSM_ESCDP;
+                            }
+                            else
+                            {
+                                this.state = EncodingUtils.FSM_NONASCII;
+                            }
+                            break;
+
+                        case EncodingUtils.FSM_ESCDP :
+                            this.state = EncodingUtils.FSM_NONASCII;
+                            break;
+
+                        case EncodingUtils.FSM_ESCP :
+                            this.state = EncodingUtils.FSM_ASCII;
+                            break;
+
+                        case EncodingUtils.FSM_NONASCII :
+                            c &= 0x7F;
+                            break;
+
+                        default :
+                            // should not reach here
+                            break;
+                    }
+                }
+
+                this.out.write(c);
+            }
+            else if (this.encoding == Configuration.UTF16LE
+                || this.encoding == Configuration.UTF16BE
+                || this.encoding == Configuration.UTF16)
+            {
+                int i = 1;
+                int numChars = 1;
+                int[] theChars = new int[2];
+
+                if (c > EncodingUtils.MAX_UTF16_FROM_UCS4)
+                {
+                    // invalid UTF-16 value
+                    /* ReportEncodingError(in.lexer, INVALID_UTF16 | DISCARDED_CHAR, c); */
+                    c = 0;
+                    numChars = 0;
+                }
+                else if (c >= EncodingUtils.UTF16_SURROGATES_BEGIN)
+                {
+                    // encode surrogate pairs
+
+                    // check for invalid pairs
+                    if (((c & 0x0000FFFE) == 0x0000FFFE) || ((c & 0x0000FFFF) == 0x0000FFFF))
+                    {
+                        /* ReportEncodingError(in.lexer, INVALID_UTF16 | DISCARDED_CHAR, c); */
+                        c = 0;
+                        numChars = 0;
+                    }
+                    else
+                    {
+                        theChars[0] = (c - EncodingUtils.UTF16_SURROGATES_BEGIN)
+                            / 0x400
+                            + EncodingUtils.UTF16_LOW_SURROGATE_BEGIN;
+                        theChars[1] = (c - EncodingUtils.UTF16_SURROGATES_BEGIN)
+                            % 0x400
+                            + EncodingUtils.UTF16_HIGH_SURROGATE_BEGIN;
+
+                        // output both
+                        numChars = 2;
+                    }
+                }
+                else
+                {
+                    // just put the char out
+                    theChars[0] = c;
+                }
+
+                for (i = 0; i < numChars; i++)
+                {
+                    c = theChars[i];
+
+                    if (this.encoding == Configuration.UTF16LE)
+                    {
+                        ch = c & 0xFF;
+                        out.write(ch);
+                        ch = (c >> 8) & 0xFF;
+                        out.write(ch);
+                    }
+
+                    else if (this.encoding == Configuration.UTF16BE || this.encoding == Configuration.UTF16)
+                    {
+                        ch = (c >> 8) & 0xFF;
+                        out.write(ch);
+                        ch = c & 0xFF;
+                        out.write(ch);
+                    }
+                }
+            }
+            // #431953 - start RJ
+            else if (this.encoding == Configuration.BIG5 || this.encoding == Configuration.SHIFTJIS)
+            {
+                if (c < 128)
+                {
+                    this.out.write(c);
+                }
+                else
+                {
+                    ch = (c >> 8) & 0xFF;
+                    this.out.write(ch);
+                    ch = c & 0xFF;
+                    this.out.write(ch);
+                }
+            }
+            // #431953 - end RJ
+            else
+            {
+                this.out.write(c);
+            }
+        }
+        catch (IOException e)
+        {
+        	log.error("OutImpl.outc: " + e.toString());
+        }
+    }
+
+    /**
+     * @see org.ajax4jsf.org.w3c.tidy.Out#newline()
+     */
+    public void newline()
+    {
+        try
+        {
+            this.out.write(this.newline);
+            this.out.flush();
+        }
+        catch (IOException e)
+        {
+        	log.error("OutImpl.newline: " + e.toString());
+        }
+    }
+
+    /**
+     * Setter for <code>out</code>.
+     * @param out The out to set.
+     */
+    public void setOut(OutputStream out)
+    {
+        this.out = out;
+    }
+
+    /**
+     * Output a Byte Order Mark.
+     */
+    public void outBOM()
+    {
+        if (this.encoding == Configuration.UTF8
+            || this.encoding == Configuration.UTF16LE
+            || this.encoding == Configuration.UTF16BE
+            || this.encoding == Configuration.UTF16)
+        {
+            outc(EncodingUtils.UNICODE_BOM); // this will take care of encoding the BOM correctly
+        }
+    }
+
+    /**
+     * @see org.ajax4jsf.org.w3c.tidy.Out#close()
+     */
+    public void close()
+    {
+        try
+        {
+            this.out.flush();
+            this.out.close();
+        }
+        catch (IOException e)
+        {
+        	log.error("OutImpl.close: " + e.toString());
+        }
+    }
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/OutJavaImpl.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/OutJavaImpl.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/OutJavaImpl.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,201 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ *  Java HTML Tidy - JTidy
+ *  HTML parser and pretty printer
+ *
+ *  Copyright (c) 1998-2000 World Wide Web Consortium (Massachusetts
+ *  Institute of Technology, Institut National de Recherche en
+ *  Informatique et en Automatique, Keio University). All Rights
+ *  Reserved.
+ *
+ *  Contributing Author(s):
+ *
+ *     Dave Raggett <dsr at w3.org>
+ *     Andy Quick <ac.quick at sympatico.ca> (translation to Java)
+ *     Gary L Peskin <garyp at firstech.com> (Java development)
+ *     Sami Lempinen <sami at lempinen.net> (release management)
+ *     Fabrizio Giustina <fgiust at users.sourceforge.net>
+ *
+ *  The contributing author(s) would like to thank all those who
+ *  helped with testing, bug fixes, and patience.  This wouldn't
+ *  have been possible without all of you.
+ *
+ *  COPYRIGHT NOTICE:
+ * 
+ *  This software and documentation is provided "as is," and
+ *  the copyright holders and contributing author(s) make no
+ *  representations or warranties, express or implied, including
+ *  but not limited to, warranties of merchantability or fitness
+ *  for any particular purpose or that the use of the software or
+ *  documentation will not infringe any third party patents,
+ *  copyrights, trademarks or other rights. 
+ *
+ *  The copyright holders and contributing author(s) will not be
+ *  liable for any direct, indirect, special or consequential damages
+ *  arising out of any use of the software or documentation, even if
+ *  advised of the possibility of such damage.
+ *
+ *  Permission is hereby granted to use, copy, modify, and distribute
+ *  this source code, or portions hereof, documentation and executables,
+ *  for any purpose, without fee, subject to the following restrictions:
+ *
+ *  1. The origin of this source code must not be misrepresented.
+ *  2. Altered versions must be plainly marked as such and must
+ *     not be misrepresented as being the original source.
+ *  3. This Copyright notice may not be removed or altered from any
+ *     source or altered source distribution.
+ * 
+ *  The copyright holders and contributing author(s) specifically
+ *  permit, without fee, and encourage the use of this source code
+ *  as a component for supporting the Hypertext Markup Language in
+ *  commercial products. If you use this source code in a product,
+ *  acknowledgment is not required but would be appreciated.
+ *
+ */
+package org.ajax4jsf.org.w3c.tidy;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.io.UnsupportedEncodingException;
+import java.io.Writer;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+
+/**
+ * Output implementation using java writers.
+ * @author Fabrizio Giustina
+ * @version $Revision: 1.1.2.1 $ ($Author: alexsmirnov $)
+ */
+public class OutJavaImpl implements Out
+{
+
+	private static final Log log = LogFactory.getLog(OutJavaImpl.class);
+	
+    /**
+     * Java input stream writer.
+     */
+    private Writer writer;
+
+    /**
+     * Newline string.
+     */
+    private char[] newline;
+
+    /**
+     * Constructor.
+     * @param configuration actual configuration instance (needed for newline configuration)
+     * @param encoding encoding name
+     * @param out output stream
+     * @throws UnsupportedEncodingException if the undelining OutputStreamWriter doesn't support the rquested encoding.
+     */
+    public OutJavaImpl(Configuration configuration, String encoding, OutputStream out)
+        throws UnsupportedEncodingException
+    {
+        this.writer = new OutputStreamWriter(out, encoding);
+        this.newline = configuration.newline;
+    }
+
+    public OutJavaImpl(Configuration config, String outCharEncodingName, Writer out) {
+        this.writer = out;
+        this.newline = config.newline;
+	}
+
+	/**
+     * @see org.ajax4jsf.org.w3c.tidy.Out#outc(int)
+     */
+    public void outc(int c)  throws IOException
+    {
+        try
+        {
+            writer.write(c);
+        }
+        catch (IOException e)
+        {
+            // @todo throws exception
+            if (log.isErrorEnabled()) {
+            	log.error("OutJavaImpl.outc: " + e.getMessage());
+            }
+            throw e;
+        }
+    }
+
+    /**
+     * @see org.ajax4jsf.org.w3c.tidy.Out#outc(byte)
+     */
+    public void outc(byte c)  throws IOException
+    {
+        try
+        {
+            writer.write(c);
+        }
+        catch (IOException e)
+        {
+            // @todo throws exception
+            if (log.isErrorEnabled()) {
+            	log.error("OutJavaImpl.outc: " + e.getMessage());
+            }
+            throw e;
+        }
+    }
+
+    /**
+     * @see org.ajax4jsf.org.w3c.tidy.Out#newline()
+     */
+    public void newline()  throws IOException
+    {
+        try
+        {
+            writer.write(this.newline);
+        }
+        catch (IOException e)
+        {
+            // @todo throws exception
+            if (log.isErrorEnabled()) {
+            	log.error("OutJavaImpl.newline: " + e.getMessage());
+            }
+            throw e;
+        }
+    }
+
+    /**
+     * @see org.ajax4jsf.org.w3c.tidy.Out#close()
+     */
+    public void close() throws IOException
+    {
+        try
+        {
+            writer.close();
+        }
+        catch (IOException e)
+        {
+            if (log.isErrorEnabled()) {
+            	log.error("OutJavaImpl.close: " + e.getMessage());
+            }
+            throw e;
+        }
+    }
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/PPrint.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/PPrint.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/PPrint.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,2861 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ *  Java HTML Tidy - JTidy
+ *  HTML parser and pretty printer
+ *
+ *  Copyright (c) 1998-2000 World Wide Web Consortium (Massachusetts
+ *  Institute of Technology, Institut National de Recherche en
+ *  Informatique et en Automatique, Keio University). All Rights
+ *  Reserved.
+ *
+ *  Contributing Author(s):
+ *
+ *     Dave Raggett <dsr at w3.org>
+ *     Andy Quick <ac.quick at sympatico.ca> (translation to Java)
+ *     Gary L Peskin <garyp at firstech.com> (Java development)
+ *     Sami Lempinen <sami at lempinen.net> (release management)
+ *     Fabrizio Giustina <fgiust at users.sourceforge.net>
+ *
+ *  The contributing author(s) would like to thank all those who
+ *  helped with testing, bug fixes, and patience.  This wouldn't
+ *  have been possible without all of you.
+ *
+ *  COPYRIGHT NOTICE:
+ * 
+ *  This software and documentation is provided "as is," and
+ *  the copyright holders and contributing author(s) make no
+ *  representations or warranties, express or implied, including
+ *  but not limited to, warranties of merchantability or fitness
+ *  for any particular purpose or that the use of the software or
+ *  documentation will not infringe any third party patents,
+ *  copyrights, trademarks or other rights. 
+ *
+ *  The copyright holders and contributing author(s) will not be
+ *  liable for any direct, indirect, special or consequential damages
+ *  arising out of any use of the software or documentation, even if
+ *  advised of the possibility of such damage.
+ *
+ *  Permission is hereby granted to use, copy, modify, and distribute
+ *  this source code, or portions hereof, documentation and executables,
+ *  for any purpose, without fee, subject to the following restrictions:
+ *
+ *  1. The origin of this source code must not be misrepresented.
+ *  2. Altered versions must be plainly marked as such and must
+ *     not be misrepresented as being the original source.
+ *  3. This Copyright notice may not be removed or altered from any
+ *     source or altered source distribution.
+ * 
+ *  The copyright holders and contributing author(s) specifically
+ *  permit, without fee, and encourage the use of this source code
+ *  as a component for supporting the Hypertext Markup Language in
+ *  commercial products. If you use this source code in a product,
+ *  acknowledgment is not required but would be appreciated.
+ *
+ */
+package org.ajax4jsf.org.w3c.tidy;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.text.NumberFormat;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+
+/**
+ * Pretty print parse tree. Block-level and unknown elements are printed on new lines and their contents indented 2
+ * spaces Inline elements are printed inline. Inline content is wrapped on spaces (except in attribute values or
+ * preformatted text, after start tags and before end tags.
+ * @author Dave Raggett <a href="mailto:dsr at w3.org">dsr at w3.org </a>
+ * @author Andy Quick <a href="mailto:ac.quick at sympatico.ca">ac.quick at sympatico.ca </a> (translation to Java)
+ * @author Fabrizio Giustina
+ * @version $Revision: 1.1.2.1 $ ($Author: alexsmirnov $)
+ */
+public class PPrint
+{
+	private static final Log log = LogFactory.getLog(PPrint.class);
+
+    /**
+     * position: normal.
+     */
+    private static final short NORMAL = 0;
+
+    /**
+     * position: preformatted text.
+     */
+    private static final short PREFORMATTED = 1;
+
+    /**
+     * position: comment.
+     */
+    private static final short COMMENT = 2;
+
+    /**
+     * position: attribute value.
+     */
+    private static final short ATTRIBVALUE = 4;
+
+    /**
+     * position: nowrap.
+     */
+    private static final short NOWRAP = 8;
+
+    /**
+     * position: cdata.
+     */
+    private static final short CDATA = 16;
+
+    /**
+     * Start cdata token.
+     */
+    private static final String CDATA_START = "<![CDATA[";
+
+    /**
+     * End cdata token.
+     */
+    private static final String CDATA_END = "]]>";
+
+    /**
+     * Javascript comment start.
+     */
+    private static final String JS_COMMENT_START = "//";
+
+    /**
+     * Javascript comment end.
+     */
+    private static final String JS_COMMENT_END = "";
+
+    /**
+     * VB comment start.
+     */
+    private static final String VB_COMMENT_START = "\'";
+
+    /**
+     * VB comment end.
+     */
+    private static final String VB_COMMENT_END = "";
+
+    /**
+     * CSS comment start.
+     */
+    private static final String CSS_COMMENT_START = "/*";
+
+    /**
+     * CSS comment end.
+     */
+    private static final String CSS_COMMENT_END = "*/";
+
+    /**
+     * Default comment start.
+     */
+    private static final String DEFAULT_COMMENT_START = "";
+
+    /**
+     * Default comment end.
+     */
+    private static final String DEFAULT_COMMENT_END = "";
+
+    private int[] linebuf;
+
+    private int lbufsize;
+
+    private int linelen;
+
+    private int wraphere;
+
+    private boolean inAttVal;
+
+    private boolean inString;
+
+    /**
+     * Current slide number.
+     */
+    private int slide;
+
+    /**
+     * Total slides count.
+     */
+    private int count;
+
+    private Node slidecontent;
+
+    /**
+     * current configuration.
+     */
+    private Configuration configuration;
+
+    /**
+     * Instantiates a new PPrint.
+     * @param configuration configuration
+     */
+    public PPrint(Configuration configuration)
+    {
+        this.configuration = configuration;
+    }
+
+    /**
+     * @param ind
+     * @return
+     */
+    int cWrapLen(int ind)
+    {
+        /* #431953 - start RJ Wraplen adjusted for smooth international ride */
+        if ("zh".equals(this.configuration.language))
+        {
+            // Chinese characters take two positions on a fixed-width screen
+            // It would be more accurate to keep a parallel linelen and wraphere incremented by 2 for Chinese characters
+            // and 1 otherwise, but this is way simpler.
+            return (ind + ((this.configuration.wraplen - ind) / 2));
+        }
+        if ("ja".equals(this.configuration.language))
+        {
+            /* average Japanese text is 30% kanji */
+            return (ind + (((this.configuration.wraplen - ind) * 7) / 10));
+        }
+        return (this.configuration.wraplen);
+        /* #431953 - end RJ */
+    }
+
+    /**
+     * return one less than the number of bytes used by the UTF-8 byte sequence. The Unicode char is returned in ch.
+     * @param str points to the UTF-8 byte sequence
+     * @param start starting offset in str
+     * @param ch initialized to 1st byte, passed as an array to allow modification
+     * @return one less that the number of bytes used by UTF-8 char
+     */
+    public static int getUTF8(byte[] str, int start, int[] ch)
+    {
+
+        int[] n = new int[1];
+
+        int[] bytes = new int[]{0};
+
+        // first byte "str[0]" is passed in separately from the
+        // rest of the UTF-8 byte sequence starting at "str[1]"
+        byte[] successorBytes = str;
+
+        boolean err = EncodingUtils.decodeUTF8BytesToChar(
+            n,
+            TidyUtils.toUnsigned(str[start]),
+            successorBytes,
+            null,
+            bytes,
+            start + 1);
+
+        if (err)
+        {
+            n[0] = 0xFFFD; // replacement char
+        }
+        ch[0] = n[0];
+        return bytes[0] - 1;
+
+    }
+
+    /**
+     * store char c as UTF-8 encoded byte stream.
+     * @param buf
+     * @param start
+     * @param c
+     * @return
+     */
+    public static int putUTF8(byte[] buf, int start, int c)
+    {
+        int[] count = new int[]{0};
+
+        boolean err = EncodingUtils.encodeCharToUTF8Bytes(c, buf, null, count);
+        if (err)
+        {
+            // replacement char 0xFFFD encoded as UTF-8
+            buf[0] = (byte) 0xEF;
+            buf[1] = (byte) 0xBF;
+            buf[2] = (byte) 0xBD;
+            count[0] = 3;
+        }
+
+        start += count[0];
+
+        return start;
+    }
+
+    private void addC(int c, int index)
+    {
+        if (index + 1 >= lbufsize)
+        {
+            while (index + 1 >= lbufsize)
+            {
+                if (lbufsize == 0)
+                {
+                    lbufsize = 256;
+                }
+                else
+                {
+                    lbufsize = lbufsize * 2;
+                }
+            }
+
+            int[] temp = new int[lbufsize];
+            if (linebuf != null)
+            {
+                System.arraycopy(linebuf, 0, temp, 0, index);
+            }
+            linebuf = temp;
+        }
+
+        linebuf[index] = c;
+    }
+
+    /**
+     * Adds an ascii String.
+     * @param str String to be added
+     * @param index actual line lenght
+     * @return final line length
+     */
+    private int addAsciiString(String str, int index)
+    {
+
+        int len = str.length();
+        if (index + len >= lbufsize)
+        {
+            while (index + len >= lbufsize)
+            {
+                if (lbufsize == 0)
+                {
+                    lbufsize = 256;
+                }
+                else
+                {
+                    lbufsize = lbufsize * 2;
+                }
+            }
+
+            int[] temp = new int[lbufsize];
+            if (linebuf != null)
+            {
+                System.arraycopy(linebuf, 0, temp, 0, index);
+            }
+            linebuf = temp;
+        }
+
+        for (int ix = 0; ix < len; ++ix)
+        {
+            linebuf[index + ix] = str.charAt(ix);
+        }
+        return index + len;
+    }
+
+    /**
+     * @param fout
+     * @param indent
+     * @throws IOException 
+     */
+    private void wrapLine(Out fout, int indent) throws IOException
+    {
+        int i, p, q;
+
+        if (wraphere == 0)
+        {
+            return;
+        }
+
+        for (i = 0; i < indent; ++i)
+        {
+            fout.outc(' ');
+        }
+
+        for (i = 0; i < wraphere; ++i)
+        {
+            fout.outc(linebuf[i]);
+        }
+
+        if (inString)
+        {
+            fout.outc(' ');
+            fout.outc('\\');
+        }
+
+        fout.newline();
+
+        if (linelen > wraphere)
+        {
+            p = 0;
+
+            if (linebuf[wraphere] == ' ')
+            {
+                ++wraphere;
+            }
+
+            q = wraphere;
+            addC('\0', linelen);
+
+            while (true)
+            {
+                linebuf[p] = linebuf[q];
+                if (linebuf[q] == 0)
+                {
+                    break;
+                }
+                p++;
+                q++;
+            }
+            linelen -= wraphere;
+        }
+        else
+        {
+            linelen = 0;
+        }
+
+        wraphere = 0;
+    }
+
+    /**
+     * @param fout
+     * @param indent
+     * @param inString
+     * @throws IOException 
+     */
+    private void wrapAttrVal(Out fout, int indent, boolean inString) throws IOException
+    {
+        int i, p, q;
+
+        for (i = 0; i < indent; ++i)
+        {
+            fout.outc(' ');
+        }
+
+        for (i = 0; i < wraphere; ++i)
+        {
+            fout.outc(linebuf[i]);
+        }
+
+        fout.outc(' ');
+
+        if (inString)
+        {
+            fout.outc('\\');
+        }
+
+        fout.newline();
+
+        if (linelen > wraphere)
+        {
+            p = 0;
+
+            if (linebuf[wraphere] == ' ')
+            {
+                ++wraphere;
+            }
+
+            q = wraphere;
+            addC('\0', linelen);
+
+            while (true)
+            {
+                linebuf[p] = linebuf[q];
+                if (linebuf[q] == 0)
+                {
+                    break;
+                }
+                p++;
+                q++;
+            }
+            linelen -= wraphere;
+        }
+        else
+        {
+            linelen = 0;
+        }
+
+        wraphere = 0;
+    }
+
+    /**
+     * @param fout
+     * @param indent
+     * @throws IOException 
+     */
+    public void flushLine(Out fout, int indent) throws IOException
+    {
+        int i;
+
+        if (linelen > 0)
+        {
+            if (indent + linelen >= this.configuration.wraplen)
+            {
+                wrapLine(fout, indent);
+            }
+
+            if (!inAttVal || this.configuration.indentAttributes)
+            {
+                for (i = 0; i < indent; ++i)
+                {
+                    fout.outc(' ');
+                }
+            }
+
+            for (i = 0; i < linelen; ++i)
+            {
+                fout.outc(linebuf[i]);
+            }
+        }
+
+//        fout.newline();
+        linelen = 0;
+        wraphere = 0;
+        inAttVal = false;
+    }
+
+    /**
+     * @param fout
+     * @param indent
+     * @throws IOException 
+     */
+    public void condFlushLine(Out fout, int indent) throws IOException
+    {
+        int i;
+
+        if (linelen > 0)
+        {
+            if (indent + linelen >= this.configuration.wraplen)
+            {
+                wrapLine(fout, indent);
+            }
+
+            if (!inAttVal || this.configuration.indentAttributes)
+            {
+                for (i = 0; i < indent; ++i)
+                {
+                    fout.outc(' ');
+                }
+            }
+
+            for (i = 0; i < linelen; ++i)
+            {
+                fout.outc(linebuf[i]);
+            }
+
+//            fout.newline();
+            linelen = 0;
+            wraphere = 0;
+            inAttVal = false;
+        }
+    }
+
+    /**
+     * @param c
+     * @param mode
+     */
+    private void printChar(int c, short mode)
+    {
+        String entity;
+        boolean breakable = false; // #431953 - RJ
+
+        if (c == ' ' && !TidyUtils.toBoolean(mode & (PREFORMATTED | COMMENT | ATTRIBVALUE | CDATA)))
+        {
+            // coerce a space character to a non-breaking space
+            if (TidyUtils.toBoolean(mode & NOWRAP))
+            {
+                // by default XML doesn't define &nbsp;
+                if (this.configuration.numEntities || this.configuration.xmlTags)
+                {
+                    addC('&', linelen++);
+                    addC('#', linelen++);
+                    addC('1', linelen++);
+                    addC('6', linelen++);
+                    addC('0', linelen++);
+                    addC(';', linelen++);
+                }
+                else
+                {
+                    // otherwise use named entity
+                    addC('&', linelen++);
+                    addC('n', linelen++);
+                    addC('b', linelen++);
+                    addC('s', linelen++);
+                    addC('p', linelen++);
+                    addC(';', linelen++);
+                }
+                return;
+            }
+            wraphere = linelen;
+        }
+
+        // comment characters are passed raw
+        if (TidyUtils.toBoolean(mode & (COMMENT | CDATA)))
+        {
+            addC(c, linelen++);
+            return;
+        }
+
+        // except in CDATA map < to &lt; etc.
+        if (!TidyUtils.toBoolean(mode & CDATA))
+        {
+            if (c == '<')
+            {
+                addC('&', linelen++);
+                addC('l', linelen++);
+                addC('t', linelen++);
+                addC(';', linelen++);
+                return;
+            }
+
+            if (c == '>')
+            {
+                addC('&', linelen++);
+                addC('g', linelen++);
+                addC('t', linelen++);
+                addC(';', linelen++);
+                return;
+            }
+
+            // naked '&' chars can be left alone or quoted as &amp;
+            // The latter is required for XML where naked '&' are illegal.
+            if (c == '&' && this.configuration.quoteAmpersand)
+            {
+                addC('&', linelen++);
+                addC('a', linelen++);
+                addC('m', linelen++);
+                addC('p', linelen++);
+                addC(';', linelen++);
+                return;
+            }
+
+            if (c == '"' && this.configuration.quoteMarks)
+            {
+                addC('&', linelen++);
+                addC('q', linelen++);
+                addC('u', linelen++);
+                addC('o', linelen++);
+                addC('t', linelen++);
+                addC(';', linelen++);
+                return;
+            }
+
+            if (c == '\'' && this.configuration.quoteMarks)
+            {
+                addC('&', linelen++);
+                addC('#', linelen++);
+                addC('3', linelen++);
+                addC('9', linelen++);
+                addC(';', linelen++);
+                return;
+            }
+
+            if (c == 160 && !this.configuration.rawOut)
+            {
+                if (this.configuration.makeBare)
+                {
+                    addC(' ', linelen++);
+                }
+                else if (this.configuration.quoteNbsp)
+                {
+                    addC('&', linelen++);
+
+                    if (this.configuration.numEntities || this.configuration.xmlTags)
+                    {
+                        addC('#', linelen++);
+                        addC('1', linelen++);
+                        addC('6', linelen++);
+                        addC('0', linelen++);
+                    }
+                    else
+                    {
+                        addC('n', linelen++);
+                        addC('b', linelen++);
+                        addC('s', linelen++);
+                        addC('p', linelen++);
+                    }
+
+                    addC(';', linelen++);
+                }
+                else
+                {
+                    addC(c, linelen++);
+                }
+
+                return;
+            }
+        }
+
+        // #431953 - start RJ
+        // Handle encoding-specific issues
+
+        switch (this.configuration.getOutCharEncoding())
+        {
+            case Configuration.UTF8 :
+                // Chinese doesn't have spaces, so it needs other kinds of breaks
+                // This will also help documents using nice Unicode punctuation
+                // But we leave the ASCII range punctuation untouched
+
+                // Break after any punctuation or spaces characters
+                if ((c >= 0x2000) && !TidyUtils.toBoolean(mode & PREFORMATTED))
+                {
+                    if (((c >= 0x2000) && (c <= 0x2006))
+                        || ((c >= 0x2008) && (c <= 0x2010))
+                        || ((c >= 0x2011) && (c <= 0x2046))
+                        || ((c >= 0x207D) && (c <= 0x207E))
+                        || ((c >= 0x208D) && (c <= 0x208E))
+                        || ((c >= 0x2329) && (c <= 0x232A))
+                        || ((c >= 0x3001) && (c <= 0x3003))
+                        || ((c >= 0x3008) && (c <= 0x3011))
+                        || ((c >= 0x3014) && (c <= 0x301F))
+                        || ((c >= 0xFD3E) && (c <= 0xFD3F))
+                        || ((c >= 0xFE30) && (c <= 0xFE44))
+                        || ((c >= 0xFE49) && (c <= 0xFE52))
+                        || ((c >= 0xFE54) && (c <= 0xFE61))
+                        || ((c >= 0xFE6A) && (c <= 0xFE6B))
+                        || ((c >= 0xFF01) && (c <= 0xFF03))
+                        || ((c >= 0xFF05) && (c <= 0xFF0A))
+                        || ((c >= 0xFF0C) && (c <= 0xFF0F))
+                        || ((c >= 0xFF1A) && (c <= 0xFF1B))
+                        || ((c >= 0xFF1F) && (c <= 0xFF20))
+                        || ((c >= 0xFF3B) && (c <= 0xFF3D))
+                        || ((c >= 0xFF61) && (c <= 0xFF65)))
+                    {
+                        wraphere = linelen + 2; // 2, because AddChar is not till later
+                        breakable = true;
+                    }
+                    else
+                    {
+                        switch (c)
+                        {
+                            case 0xFE63 :
+                            case 0xFE68 :
+                            case 0x3030 :
+                            case 0x30FB :
+                            case 0xFF3F :
+                            case 0xFF5B :
+                            case 0xFF5D :
+                                wraphere = linelen + 2;
+                                breakable = true;
+                        }
+                    }
+                    // but break before a left punctuation
+                    if (breakable)
+                    {
+                        if (((c >= 0x201A) && (c <= 0x201C)) || ((c >= 0x201E) && (c <= 0x201F)))
+                        {
+                            wraphere--;
+                        }
+                        else
+                        {
+                            switch (c)
+                            {
+                                case 0x2018 :
+                                case 0x2039 :
+                                case 0x2045 :
+                                case 0x207D :
+                                case 0x208D :
+                                case 0x2329 :
+                                case 0x3008 :
+                                case 0x300A :
+                                case 0x300C :
+                                case 0x300E :
+                                case 0x3010 :
+                                case 0x3014 :
+                                case 0x3016 :
+                                case 0x3018 :
+                                case 0x301A :
+                                case 0x301D :
+                                case 0xFD3E :
+                                case 0xFE35 :
+                                case 0xFE37 :
+                                case 0xFE39 :
+                                case 0xFE3B :
+                                case 0xFE3D :
+                                case 0xFE3F :
+                                case 0xFE41 :
+                                case 0xFE43 :
+                                case 0xFE59 :
+                                case 0xFE5B :
+                                case 0xFE5D :
+                                case 0xFF08 :
+                                case 0xFF3B :
+                                case 0xFF5B :
+                                case 0xFF62 :
+                                    wraphere--;
+                            }
+                        }
+                    }
+                }
+                break;
+            case Configuration.BIG5 :
+                // Allow linebreak at Chinese punctuation characters
+                // There are not many spaces in Chinese
+                addC(c, linelen++);
+                if (((c & 0xFF00) == 0xA100) && !TidyUtils.toBoolean(mode & PREFORMATTED))
+                {
+                    wraphere = linelen;
+                    // opening brackets have odd codes: break before them
+                    if ((c > 0x5C) && (c < 0xAD) && ((c & 1) == 1))
+                    {
+                        wraphere--;
+                    }
+                }
+                return;
+            case Configuration.SHIFTJIS :
+            case Configuration.ISO2022 : // ISO 2022 characters are passed raw
+                addC(c, linelen++);
+                return;
+            default :
+                if (this.configuration.rawOut)
+                {
+                    addC(c, linelen++);
+                    return;
+                }
+        // #431953 - end RJ
+        }
+
+        // if preformatted text, map &nbsp; to space
+        if (c == 160 && TidyUtils.toBoolean(mode & PREFORMATTED))
+        {
+            addC(' ', linelen++);
+            return;
+        }
+
+        // Filters from Word and PowerPoint often use smart quotes resulting in character codes between 128 and 159.
+        // Unfortunately, the corresponding HTML 4.0 entities for these are not widely supported.
+        // The following converts dashes and quotation marks to the nearest ASCII equivalent.
+        // My thanks to Andrzej Novosiolov for his help with this code.
+
+        if (this.configuration.makeClean && this.configuration.asciiChars || this.configuration.makeBare)
+        {
+            if (c >= 0x2013 && c <= 0x201E)
+            {
+                switch (c)
+                {
+                    case 0x2013 : // en dash
+                    case 0x2014 : // em dash
+                        c = '-';
+                        break;
+                    case 0x2018 : // left single quotation mark
+                    case 0x2019 : // right single quotation mark
+                    case 0x201A : // single low-9 quotation mark
+                        c = '\'';
+                        break;
+                    case 0x201C : // left double quotation mark
+                    case 0x201D : // right double quotation mark
+                    case 0x201E : // double low-9 quotation mark
+                        c = '"';
+                        break;
+                }
+            }
+        }
+
+        // don't map latin-1 chars to entities
+        if (this.configuration.getOutCharEncoding() == Configuration.LATIN1)
+        {
+            if (c > 255) /* multi byte chars */
+            {
+                if (!this.configuration.numEntities)
+                {
+                    entity = EntityTable.getDefaultEntityTable().entityName((short) c);
+                    if (entity != null)
+                    {
+                        entity = "&" + entity + ";";
+                    }
+                    else
+                    {
+                        entity = "&#" + c + ";";
+                    }
+                }
+                else
+                {
+                    entity = "&#" + c + ";";
+                }
+
+                for (int i = 0; i < entity.length(); i++)
+                {
+                    addC(entity.charAt(i), linelen++);
+                }
+
+                return;
+            }
+
+            if (c > 126 && c < 160)
+            {
+                entity = "&#" + c + ";";
+
+                for (int i = 0; i < entity.length(); i++)
+                {
+                    addC(entity.charAt(i), linelen++);
+                }
+
+                return;
+            }
+
+            addC(c, linelen++);
+            return;
+        }
+
+        // don't map utf8 or utf16 chars to entities
+        if (this.configuration.getOutCharEncoding() == Configuration.UTF8
+            || this.configuration.getOutCharEncoding() == Configuration.UTF16
+            || this.configuration.getOutCharEncoding() == Configuration.UTF16LE
+            || this.configuration.getOutCharEncoding() == Configuration.UTF16BE)
+        {
+            addC(c, linelen++);
+            return;
+        }
+
+        // use numeric entities only for XML
+        if (this.configuration.xmlTags)
+        {
+            // if ASCII use numeric entities for chars > 127
+            if (c > 127 && this.configuration.getOutCharEncoding() == Configuration.ASCII)
+            {
+                entity = "&#" + c + ";";
+
+                for (int i = 0; i < entity.length(); i++)
+                {
+                    addC(entity.charAt(i), linelen++);
+                }
+
+                return;
+            }
+
+            // otherwise output char raw
+            addC(c, linelen++);
+            return;
+        }
+
+        // default treatment for ASCII
+        if (this.configuration.getOutCharEncoding() == Configuration.ASCII && (c > 126 || (c < ' ' && c != '\t')))
+        {
+            if (!this.configuration.numEntities)
+            {
+                entity = EntityTable.getDefaultEntityTable().entityName((short) c);
+                if (entity != null)
+                {
+                    entity = "&" + entity + ";";
+                }
+                else
+                {
+                    entity = "&#" + c + ";";
+                }
+            }
+            else
+            {
+                entity = "&#" + c + ";";
+            }
+
+            for (int i = 0; i < entity.length(); i++)
+            {
+                addC(entity.charAt(i), linelen++);
+            }
+
+            return;
+        }
+
+        addC(c, linelen++);
+    }
+
+    /**
+     * The line buffer is uint not char so we can hold Unicode values unencoded. The translation to UTF-8 is deferred to
+     * the outc routine called to flush the line buffer.
+     * @param fout
+     * @param mode
+     * @param indent
+     * @param textarray
+     * @param start
+     * @param end
+     * @throws IOException 
+     */
+    private void printText(Out fout, short mode, int indent, byte[] textarray, int start, int end) throws IOException
+    {
+        int i, c;
+        int[] ci = new int[1];
+
+        for (i = start; i < end; ++i)
+        {
+            if (indent + linelen >= this.configuration.wraplen)
+            {
+                wrapLine(fout, indent);
+            }
+
+            c = (textarray[i]) & 0xFF; // Convert to unsigned.
+
+            // look for UTF-8 multibyte character
+            if (c > 0x7F)
+            {
+                i += getUTF8(textarray, i, ci);
+                c = ci[0];
+            }
+
+            if (c == '\n')
+            {
+                flushLine(fout, indent);
+                fout.newline();
+                continue;
+            }
+
+            printChar(c, mode);
+        }
+    }
+
+    /**
+     * @param str
+     */
+    private void printString(String str)
+    {
+        for (int i = 0; i < str.length(); i++)
+        {
+            addC(str.charAt(i), linelen++);
+        }
+    }
+
+    /**
+     * @param fout
+     * @param indent
+     * @param value
+     * @param delim
+     * @param wrappable
+     * @throws IOException 
+     */
+    private void printAttrValue(Out fout, int indent, String value, int delim, boolean wrappable) throws IOException
+    {
+        int c;
+        int[] ci = new int[1];
+        boolean wasinstring = false;
+        byte[] valueChars = null;
+        int i;
+        short mode = (wrappable ? (short) (NORMAL | ATTRIBVALUE) : (short) (PREFORMATTED | ATTRIBVALUE));
+
+        if (value != null)
+        {
+            valueChars = TidyUtils.getBytes(value);
+        }
+
+        // look for ASP, Tango or PHP instructions for computed attribute value
+        if (valueChars != null && valueChars.length >= 5 && valueChars[0] == '<')
+        {
+            if (valueChars[1] == '%' || valueChars[1] == '@' || (new String(valueChars, 0, 5)).equals("<?php"))
+            {
+                mode |= CDATA;
+            }
+        }
+
+        if (delim == 0)
+        {
+            delim = '"';
+        }
+
+        addC('=', linelen++);
+
+        // don't wrap after "=" for xml documents
+        if (!this.configuration.xmlOut)
+        {
+
+            if (indent + linelen < this.configuration.wraplen)
+            {
+                wraphere = linelen;
+            }
+
+            if (indent + linelen >= this.configuration.wraplen)
+            {
+                wrapLine(fout, indent);
+            }
+
+            if (indent + linelen < this.configuration.wraplen)
+            {
+                wraphere = linelen;
+            }
+            else
+            {
+                condFlushLine(fout, indent);
+            }
+        }
+
+        addC(delim, linelen++);
+
+        if (value != null)
+        {
+            inString = false;
+
+            i = 0;
+            while (i < valueChars.length)
+            {
+                c = (valueChars[i]) & 0xFF; // Convert to unsigned.
+
+                if (wrappable && c == ' ' && indent + linelen < this.configuration.wraplen)
+                {
+                    wraphere = linelen;
+                    wasinstring = inString;
+                }
+
+                if (wrappable && wraphere > 0 && indent + linelen >= this.configuration.wraplen)
+                {
+                    wrapAttrVal(fout, indent, wasinstring);
+                }
+
+                if (c == delim)
+                {
+                    String entity;
+
+                    entity = (c == '"' ? "&quot;" : "&#39;");
+
+                    for (int j = 0; j < entity.length(); j++)
+                    {
+                        addC(entity.charAt(j), linelen++);
+                    }
+
+                    ++i;
+                    continue;
+                }
+                else if (c == '"')
+                {
+                    if (this.configuration.quoteMarks)
+                    {
+                        addC('&', linelen++);
+                        addC('q', linelen++);
+                        addC('u', linelen++);
+                        addC('o', linelen++);
+                        addC('t', linelen++);
+                        addC(';', linelen++);
+                    }
+                    else
+                    {
+                        addC('"', linelen++);
+                    }
+
+                    if (delim == '\'')
+                    {
+                        inString = !inString;
+                    }
+
+                    ++i;
+                    continue;
+                }
+                else if (c == '\'')
+                {
+                    if (this.configuration.quoteMarks)
+                    {
+                        addC('&', linelen++);
+                        addC('#', linelen++);
+                        addC('3', linelen++);
+                        addC('9', linelen++);
+                        addC(';', linelen++);
+                    }
+                    else
+                    {
+                        addC('\'', linelen++);
+                    }
+
+                    if (delim == '"')
+                    {
+                        inString = !inString;
+                    }
+
+                    ++i;
+                    continue;
+                }
+
+                // look for UTF-8 multibyte character
+                if (c > 0x7F)
+                {
+                    i += getUTF8(valueChars, i, ci);
+                    c = ci[0];
+                }
+
+                ++i;
+
+                if (c == '\n')
+                {
+                    flushLine(fout, indent);
+                    continue;
+                }
+
+                printChar(c, mode);
+            }
+        }
+
+        inString = false;
+        addC(delim, linelen++);
+    }
+
+    /**
+     * @param fout
+     * @param indent
+     * @param node
+     * @param attr
+     * @throws IOException 
+     */
+    private void printAttribute(Out fout, int indent, Node node, AttVal attr) throws IOException
+    {
+        String name;
+        boolean wrappable = false;
+
+        if (this.configuration.indentAttributes)
+        {
+            flushLine(fout, indent);
+            indent += this.configuration.spaces;
+        }
+
+        name = attr.attribute;
+
+        if (indent + linelen >= this.configuration.wraplen)
+        {
+            wrapLine(fout, indent);
+        }
+
+        if (!this.configuration.xmlTags && !this.configuration.xmlOut && attr.dict != null)
+        {
+            if (AttributeTable.getDefaultAttributeTable().isScript(name))
+            {
+                wrappable = this.configuration.wrapScriptlets;
+            }
+            else if (!attr.dict.isNowrap() && this.configuration.wrapAttVals)
+            {
+                wrappable = true;
+            }
+        }
+
+        if (indent + linelen < this.configuration.wraplen)
+        {
+            wraphere = linelen;
+            addC(' ', linelen++);
+        }
+        else
+        {
+            condFlushLine(fout, indent);
+            addC(' ', linelen++);
+        }
+
+        for (int i = 0; i < name.length(); i++)
+        {
+            addC(
+                TidyUtils.foldCase(name.charAt(i), this.configuration.upperCaseAttrs, this.configuration.xmlTags),
+                linelen++);
+        }
+
+        if (indent + linelen >= this.configuration.wraplen)
+        {
+            wrapLine(fout, indent);
+        }
+
+        if (attr.value == null)
+        {
+            if (this.configuration.xmlTags || this.configuration.xmlOut)
+            {
+                printAttrValue(fout, indent, (attr.isBoolAttribute() ? attr.attribute : ""), attr.delim, true);
+            }
+            else if (!attr.isBoolAttribute() && node != null && !node.isNewNode())
+            {
+                printAttrValue(fout, indent, "", attr.delim, true);
+            }
+            else if (indent + linelen < this.configuration.wraplen)
+            {
+                wraphere = linelen;
+            }
+
+        }
+        else
+        {
+            printAttrValue(fout, indent, attr.value, attr.delim, wrappable);
+        }
+    }
+
+    /**
+     * @param fout
+     * @param indent
+     * @param node
+     * @param attr
+     * @throws IOException 
+     */
+    private void printAttrs(Out fout, int indent, Node node, AttVal attr) throws IOException
+    {
+        // add xml:space attribute to pre and other elements
+        if (configuration.xmlOut
+            && configuration.xmlSpace
+            && ParserImpl.XMLPreserveWhiteSpace(node, configuration.tt)
+            && node.getAttrByName("xml:space") == null)
+        {
+            node.addAttribute("xml:space", "preserve");
+            if (attr != null)
+            {
+                attr = node.attributes;
+            }
+        }
+
+        if (attr != null)
+        {
+            if (attr.next != null)
+            {
+                printAttrs(fout, indent, node, attr.next);
+            }
+
+            if (attr.attribute != null)
+            {
+                Attribute attribute = attr.dict;
+
+                if (!this.configuration.dropProprietaryAttributes
+                    || !(attribute == null || TidyUtils.toBoolean(attribute.getVersions() & Dict.VERS_PROPRIETARY)))
+                {
+                    printAttribute(fout, indent, node, attr);
+                }
+            }
+            else if (attr.asp != null)
+            {
+                addC(' ', linelen++);
+                printAsp(fout, indent, attr.asp);
+            }
+            else if (attr.php != null)
+            {
+                addC(' ', linelen++);
+                printPhp(fout, indent, attr.php);
+            }
+        }
+
+    }
+
+    /**
+     * Line can be wrapped immediately after inline start tag provided if follows a text node ending in a space, or it
+     * parent is an inline element that that rule applies to. This behaviour was reverse engineered from Netscape 3.0
+     * @param node current Node
+     * @return <code>true</code> if the current char follows a space
+     */
+    private static boolean afterSpace(Node node)
+    {
+        Node prev;
+        int c;
+
+        if (node == null || node.tag == null || !TidyUtils.toBoolean(node.tag.model & Dict.CM_INLINE))
+        {
+            return true;
+        }
+
+        prev = node.prev;
+
+        if (prev != null)
+        {
+            if (prev.type == Node.TEXT_NODE && prev.end > prev.start)
+            {
+                c = (prev.textarray[prev.end - 1]) & 0xFF; // Convert to unsigned.
+
+                if (c == 160 || c == ' ' || c == '\n')
+                {
+                    return true;
+                }
+            }
+
+            return false;
+        }
+
+        return afterSpace(node.parent);
+    }
+
+    /**
+     * @param lexer
+     * @param fout
+     * @param mode
+     * @param indent
+     * @param node
+     * @throws IOException 
+     */
+    private void printTag(Lexer lexer, Out fout, short mode, int indent, Node node) throws IOException
+    {
+        String p;
+        TagTable tt = this.configuration.tt;
+
+        addC('<', linelen++);
+
+        if (node.type == Node.END_TAG)
+        {
+            addC('/', linelen++);
+        }
+
+        p = node.element;
+        for (int i = 0; i < p.length(); i++)
+        {
+            addC(
+                TidyUtils.foldCase(p.charAt(i), this.configuration.upperCaseTags, this.configuration.xmlTags),
+                linelen++);
+        }
+
+        printAttrs(fout, indent, node, node.attributes);
+
+        if (node.type == Node.START_END_TAG || TidyUtils.toBoolean(node.tag.model & Dict.CM_EMPTY)) {
+			if ((this.configuration.xmlOut || this.configuration.xHTML) ||
+					! TidyUtils.toBoolean(node.tag.model & Dict.CM_EMPTY) )
+			{
+				addC(' ', linelen++); // Space is NS compatibility hack <br />
+				addC('/', linelen++); // Required end tag marker
+			}
+		}
+
+        addC('>', linelen++);
+
+        if ((node.type != Node.START_END_TAG || configuration.xHTML) && !TidyUtils.toBoolean(mode & PREFORMATTED))
+        {
+            if (indent + linelen >= this.configuration.wraplen)
+            {
+                wrapLine(fout, indent);
+            }
+
+            if (indent + linelen < this.configuration.wraplen)
+            {
+
+                // wrap after start tag if is <br/> or if it's not inline
+                // fix for [514348]
+                if (!TidyUtils.toBoolean(mode & NOWRAP)
+                        && (node.tag == tt.tagBr)
+//                    && (!TidyUtils.toBoolean(node.tag.model & Dict.CM_INLINE) || (node.tag == tt.tagBr))
+                    && afterSpace(node))
+                {
+                    wraphere = linelen;
+                }
+
+            }
+        }
+        else
+        {
+            condFlushLine(fout, indent);
+        }
+
+    }
+
+    /**
+     * @param mode
+     * @param indent
+     * @param node
+     */
+    private void printEndTag(short mode, int indent, Node node)
+    {
+        String p;
+
+        // Netscape ignores SGML standard by not ignoring a line break before </A> or </U> etc.
+        // To avoid rendering this as an underlined space, I disable line wrapping before inline end tags
+
+        // if (indent + linelen < this.configuration.wraplen && !TidyUtils.toBoolean(mode & NOWRAP))
+        // {
+        //     wraphere = linelen;
+        // }
+
+        addC('<', linelen++);
+        addC('/', linelen++);
+
+        p = node.element;
+        for (int i = 0; i < p.length(); i++)
+        {
+            addC(
+                TidyUtils.foldCase(p.charAt(i), this.configuration.upperCaseTags, this.configuration.xmlTags),
+                linelen++);
+        }
+
+        addC('>', linelen++);
+    }
+
+    /**
+     * @param fout
+     * @param indent
+     * @param node
+     * @throws IOException 
+     */
+    private void printComment(Out fout, int indent, Node node) throws IOException
+    {
+        if (this.configuration.hideComments)
+        {
+            return;
+        }
+
+        if (indent + linelen < this.configuration.wraplen)
+        {
+            wraphere = linelen;
+        }
+
+        addC('<', linelen++);
+        addC('!', linelen++);
+        addC('-', linelen++);
+        addC('-', linelen++);
+
+        printText(fout, COMMENT, indent, node.textarray, node.start, node.end);
+
+        // See Lexer.java: AQ 8Jul2000
+        addC('-', linelen++);
+        addC('-', linelen++);
+        addC('>', linelen++);
+
+        if (node.linebreak)
+        {
+            flushLine(fout, indent);
+            fout.newline();
+        }
+    }
+
+    /**
+     * @param fout
+     * @param indent
+     * @param lexer
+     * @param node
+     * @throws IOException 
+     */
+    private void printDocType(Out fout, int indent, Lexer lexer, Node node) throws IOException
+    {
+        int i, c = 0;
+        short mode = 0;
+        boolean q = this.configuration.quoteMarks;
+
+        this.configuration.quoteMarks = false;
+
+        if (indent + linelen < this.configuration.wraplen)
+        {
+            wraphere = linelen;
+        }
+
+        condFlushLine(fout, indent);
+
+        addC('<', linelen++);
+        addC('!', linelen++);
+        addC('D', linelen++);
+        addC('O', linelen++);
+        addC('C', linelen++);
+        addC('T', linelen++);
+        addC('Y', linelen++);
+        addC('P', linelen++);
+        addC('E', linelen++);
+        addC(' ', linelen++);
+
+        if (indent + linelen < this.configuration.wraplen)
+        {
+            wraphere = linelen;
+        }
+
+        for (i = node.start; i < node.end; ++i)
+        {
+            if (indent + linelen >= this.configuration.wraplen)
+            {
+                wrapLine(fout, indent);
+            }
+
+            c = node.textarray[i] & 0xFF; // Convert to unsigned.
+
+            // inDTDSubset?
+            if (TidyUtils.toBoolean(mode & CDATA))
+            {
+                if (c == ']')
+                {
+                    mode &= ~CDATA;
+                }
+            }
+            else if (c == '[')
+            {
+                mode |= CDATA;
+            }
+            int[] ci = new int[1];
+
+            // look for UTF-8 multibyte character
+            if (c > 0x7F)
+            {
+                i += getUTF8(node.textarray, i, ci);
+                c = ci[0];
+            }
+
+            if (c == '\n')
+            {
+                flushLine(fout, indent);
+                fout.newline();
+                continue;
+            }
+
+            printChar(c, mode);
+        }
+
+        if (linelen < this.configuration.wraplen)
+        {
+            wraphere = linelen;
+        }
+
+        addC('>', linelen++);
+        this.configuration.quoteMarks = q;
+        condFlushLine(fout, indent);
+        fout.newline();
+    }
+
+    /**
+     * @param fout
+     * @param indent
+     * @param node
+     * @throws IOException 
+     */
+    private void printPI(Out fout, int indent, Node node) throws IOException
+    {
+        if (indent + linelen < this.configuration.wraplen)
+        {
+            wraphere = linelen;
+        }
+
+        addC('<', linelen++);
+        addC('?', linelen++);
+
+        // set CDATA to pass < and > unescaped
+        printText(fout, CDATA, indent, node.textarray, node.start, node.end);
+
+        if (node.end <= 0 || node.textarray[node.end - 1] != '?') // #542029 - fix by Terry Teague 10 Apr 02
+        {
+            addC('?', linelen++);
+        }
+
+        addC('>', linelen++);
+        condFlushLine(fout, indent);
+        fout.newline();
+    }
+
+    /**
+     * Pretty print the xml declaration.
+     * @param fout
+     * @param indent
+     * @param node
+     * @throws IOException 
+     */
+    private void printXmlDecl(Out fout, int indent, Node node) throws IOException
+    {
+        if (indent + linelen < this.configuration.wraplen)
+        {
+            wraphere = linelen;
+        }
+
+        addC('<', linelen++);
+        addC('?', linelen++);
+        addC('x', linelen++);
+        addC('m', linelen++);
+        addC('l', linelen++);
+
+        printAttrs(fout, indent, node, node.attributes);
+
+        if (node.end <= 0 || node.textarray[node.end - 1] != '?') // #542029 - fix by Terry Teague 10 Apr 02
+        {
+            addC('?', linelen++);
+        }
+
+        addC('>', linelen++);
+
+        condFlushLine(fout, indent);
+        fout.newline();
+    }
+
+    /**
+     * note ASP and JSTE share <% ... %> syntax.
+     * @param fout
+     * @param indent
+     * @param node
+     * @throws IOException 
+     */
+    private void printAsp(Out fout, int indent, Node node) throws IOException
+    {
+        int savewraplen = this.configuration.wraplen;
+
+        // disable wrapping if so requested
+
+        if (!this.configuration.wrapAsp || !this.configuration.wrapJste)
+        {
+            this.configuration.wraplen = 0xFFFFFF; // a very large number
+        }
+
+        addC('<', linelen++);
+        addC('%', linelen++);
+
+        printText(fout, (this.configuration.wrapAsp ? CDATA : COMMENT), indent, node.textarray, node.start, node.end);
+
+        addC('%', linelen++);
+        addC('>', linelen++);
+        /* condFlushLine(fout, indent); */
+        this.configuration.wraplen = savewraplen;
+    }
+
+    /**
+     * JSTE also supports <# ... #> syntax
+     * @param fout
+     * @param indent
+     * @param node
+     * @throws IOException 
+     */
+    private void printJste(Out fout, int indent, Node node) throws IOException
+    {
+        int savewraplen = this.configuration.wraplen;
+
+        // disable wrapping if so requested
+
+        if (!this.configuration.wrapJste)
+        {
+            this.configuration.wraplen = 0xFFFFFF; // a very large number
+        }
+
+        addC('<', linelen++);
+        addC('#', linelen++);
+
+        printText(fout, (this.configuration.wrapJste ? CDATA : COMMENT), indent, node.textarray, node.start, node.end);
+
+        addC('#', linelen++);
+        addC('>', linelen++);
+        // condFlushLine(fout, indent);
+        this.configuration.wraplen = savewraplen;
+    }
+
+    /**
+     * PHP is based on XML processing instructions.
+     * @param fout
+     * @param indent
+     * @param node
+     * @throws IOException 
+     */
+    private void printPhp(Out fout, int indent, Node node) throws IOException
+    {
+        int savewraplen = this.configuration.wraplen;
+
+        // disable wrapping if so requested
+
+        if (!this.configuration.wrapPhp)
+        {
+            this.configuration.wraplen = 0xFFFFFF; // a very large number
+        }
+
+        addC('<', linelen++);
+        addC('?', linelen++);
+
+        printText(fout, (this.configuration.wrapPhp ? CDATA : COMMENT), indent, node.textarray, node.start, node.end);
+
+        addC('?', linelen++);
+        addC('>', linelen++);
+        // PCondFlushLine(fout, indent);
+        this.configuration.wraplen = savewraplen;
+    }
+
+    /**
+     * @param fout
+     * @param indent
+     * @param node
+     * @throws IOException 
+     */
+    private void printCDATA(Out fout, int indent, Node node) throws IOException
+    {
+        int savewraplen = this.configuration.wraplen;
+
+        if (!this.configuration.indentCdata)
+        {
+            indent = 0;
+        }
+
+        condFlushLine(fout, indent);
+
+        // disable wrapping
+        this.configuration.wraplen = 0xFFFFFF; // a very large number
+
+        addC('<', linelen++);
+        addC('!', linelen++);
+        addC('[', linelen++);
+        addC('C', linelen++);
+        addC('D', linelen++);
+        addC('A', linelen++);
+        addC('T', linelen++);
+        addC('A', linelen++);
+        addC('[', linelen++);
+
+        printText(fout, COMMENT, indent, node.textarray, node.start, node.end);
+
+        addC(']', linelen++);
+        addC(']', linelen++);
+        addC('>', linelen++);
+        condFlushLine(fout, indent);
+        this.configuration.wraplen = savewraplen;
+    }
+
+    /**
+     * @param fout
+     * @param indent
+     * @param node
+     * @throws IOException 
+     */
+    private void printSection(Out fout, int indent, Node node) throws IOException
+    {
+        int savewraplen = this.configuration.wraplen;
+
+        // disable wrapping if so requested
+
+        if (!this.configuration.wrapSection)
+        {
+            this.configuration.wraplen = 0xFFFFFF; // a very large number
+        }
+
+        addC('<', linelen++);
+        addC('!', linelen++);
+        addC('[', linelen++);
+
+        printText(
+            fout,
+            (this.configuration.wrapSection ? CDATA : COMMENT),
+            indent,
+            node.textarray,
+            node.start,
+            node.end);
+
+        addC(']', linelen++);
+        addC('>', linelen++);
+        // PCondFlushLine(fout, indent);
+        this.configuration.wraplen = savewraplen;
+    }
+
+    /**
+     * Is the current node inside HEAD?
+     * @param node Node
+     * @return <code>true</code> if node is inside an HEAD tag
+     */
+    private boolean insideHead(Node node)
+    {
+        if (node.tag == this.configuration.tt.tagHead)
+        {
+            return true;
+        }
+
+        if (node.parent != null)
+        {
+            return insideHead(node.parent);
+        }
+        return false;
+    }
+
+    /**
+     * Is text node and already ends w/ a newline? Used to pretty print CDATA/PRE text content. If it already ends on a
+     * newline, it is not necessary to print another before printing end tag.
+     * @param lexer Lexer
+     * @param node text node
+     * @return text indent
+     */
+    private int textEndsWithNewline(Lexer lexer, Node node)
+    {
+        if (node.type == Node.TEXT_NODE && node.end > node.start)
+        {
+            int ch, ix = node.end - 1;
+            // Skip non-newline whitespace
+            while (ix >= node.start
+                && TidyUtils.toBoolean(ch = (node.textarray[ix] & 0xff))
+                && (ch == ' ' || ch == '\t' || ch == '\r'))
+            {
+                --ix;
+            }
+
+            if (ix >= 0 && node.textarray[ix] == '\n')
+            {
+                return node.end - ix - 1; // #543262 tidy eats all memory
+            }
+        }
+        return -1;
+    }
+
+    /**
+     * Does the current node contain a CDATA section?
+     * @param lexer Lexer
+     * @param node Node
+     * @return <code>true</code> if node contains a CDATA section
+     */
+    static boolean hasCDATA(Lexer lexer, Node node)
+    {
+        // Scan forward through the textarray. Since the characters we're
+        // looking for are < 0x7f, we don't have to do any UTF-8 decoding.
+
+        if (node.type != Node.TEXT_NODE)
+        {
+            return false;
+        }
+
+        int len = node.end - node.start + 1;
+        String start = TidyUtils.getString(node.textarray, node.start, len);
+
+        int indexOfCData = start.indexOf(CDATA_START);
+        return indexOfCData > -1 && indexOfCData <= len;
+    }
+
+    /**
+     * Print script and style elements. For XHTML, wrap the content as follows:
+     * 
+     * <pre>
+     *     JavaScript:
+     *         //&lt;![CDATA[
+     *             content
+     *         //]]>
+     *     VBScript:
+     *         '&lt;![CDATA[
+     *             content
+     *         ']]>
+     *     CSS:
+     *         /*&lt;![CDATA[* /
+     *             content
+     *         /*]]>* /
+     *     other:
+     *        &lt;![CDATA[
+     *             content
+     *         ]]>
+     * </pre>
+     * 
+     * @param fout
+     * @param mode
+     * @param indent
+     * @param lexer
+     * @param node
+     * @throws IOException 
+     */
+    private void printScriptStyle(Out fout, short mode, int indent, Lexer lexer, Node node) throws IOException
+    {
+        Node content;
+        String commentStart = DEFAULT_COMMENT_START;
+        String commentEnd = DEFAULT_COMMENT_END;
+        boolean hasCData = false;
+        int contentIndent = -1;
+
+        if (insideHead(node))
+        {
+            // flushLine(fout, indent);
+        }
+
+        indent = 0;
+
+        // start script
+        printTag(lexer, fout, mode, indent, node);
+        // flushLine(fout, indent); // extra newline
+
+        if ((lexer.configuration.xHTML || lexer.configuration.xmlOut )&& node.content != null)
+        {
+            AttVal type = node.getAttrByName("type");
+            if (type != null)
+            {
+                if ("text/javascript".equalsIgnoreCase(type.value))
+                {
+                    commentStart = JS_COMMENT_START;
+                    commentEnd = JS_COMMENT_END;
+                }
+                else if ("text/css".equalsIgnoreCase(type.value))
+                {
+                    commentStart = CSS_COMMENT_START;
+                    commentEnd = CSS_COMMENT_END;
+                }
+                else if ("text/vbscript".equalsIgnoreCase(type.value))
+                {
+                    commentStart = VB_COMMENT_START;
+                    commentEnd = VB_COMMENT_END;
+                }
+            }
+
+            hasCData = hasCDATA(lexer, node.content);
+            if (!hasCData)
+            {
+                // disable wrapping
+                int savewraplen = lexer.configuration.wraplen;
+                lexer.configuration.wraplen = 0xFFFFFF; // a very large number
+
+                linelen = addAsciiString(commentStart, linelen);
+                linelen = addAsciiString(CDATA_START, linelen);
+                linelen = addAsciiString(commentEnd, linelen);
+                condFlushLine(fout, indent);
+                fout.newline();
+                // restore wrapping
+                lexer.configuration.wraplen = savewraplen;
+            }
+        }
+
+        for (content = node.content; content != null; content = content.next)
+        {
+            printTree(fout, (short) (mode | PREFORMATTED | NOWRAP | CDATA), 0, lexer, content);
+
+            if (content.next == null)
+            {
+                contentIndent = textEndsWithNewline(lexer, content);
+            }
+
+        }
+
+        if (contentIndent < 0)
+        {
+            condFlushLine(fout, indent);
+            fout.newline();
+            contentIndent = 0;
+        }
+
+        if ((lexer.configuration.xHTML || lexer.configuration.xmlOut ) && node.content != null)
+        {
+            if (!hasCData)
+            {
+                // disable wrapping
+                int ix, savewraplen = lexer.configuration.wraplen;
+                lexer.configuration.wraplen = 0xFFFFFF; // a very large number
+
+                // Add spaces to last text node to align w/ indent
+                if (contentIndent > 0 && linelen < contentIndent)
+                {
+                    linelen = contentIndent;
+                }
+                for (ix = 0; contentIndent < indent && ix < indent - contentIndent; ++ix)
+                {
+                    addC(' ', linelen++);
+                }
+
+                linelen = addAsciiString(commentStart, linelen);
+                linelen = addAsciiString(CDATA_END, linelen);
+                linelen = addAsciiString(commentEnd, linelen);
+
+                // restore wrapping
+                lexer.configuration.wraplen = savewraplen;
+                condFlushLine(fout, 0);
+                fout.newline();
+            }
+        }
+
+        printEndTag(mode, indent, node);
+
+        if (!lexer.configuration.indentContent && node.next != null
+
+        && !((node.tag != null && TidyUtils.toBoolean(node.tag.model & Dict.CM_INLINE))
+
+        || node.type != Node.TEXT_NODE
+
+        ))
+        {
+            flushLine(fout, indent);
+        }
+
+        flushLine(fout, indent);
+    }
+
+    /**
+     * Should tidy indent the give tag?
+     * @param node actual node
+     * @return <code>true</code> if line should be indented
+     */
+    private boolean shouldIndent(Node node)
+    {
+        TagTable tt = this.configuration.tt;
+
+        if (!this.configuration.indentContent)
+        {
+            return false;
+        }
+
+        if (this.configuration.smartIndent)
+        {
+            if (node.content != null && TidyUtils.toBoolean(node.tag.model & Dict.CM_NO_INDENT))
+            {
+                for (node = node.content; node != null; node = node.next)
+                {
+                    if (node.tag != null && TidyUtils.toBoolean(node.tag.model & Dict.CM_BLOCK))
+                    {
+                        return true;
+                    }
+                }
+
+                return false;
+            }
+
+            if (TidyUtils.toBoolean(node.tag.model & Dict.CM_HEADING))
+            {
+                return false;
+            }
+
+            if (node.tag == tt.tagP)
+            {
+                return false;
+            }
+
+            if (node.tag == tt.tagTitle)
+            {
+                return false;
+            }
+        }
+
+        if (TidyUtils.toBoolean(node.tag.model & (Dict.CM_FIELD | Dict.CM_OBJECT)))
+        {
+            return true;
+        }
+
+        if (node.tag == tt.tagMap)
+        {
+            return true;
+        }
+
+        return !TidyUtils.toBoolean(node.tag.model & Dict.CM_INLINE);
+    }
+
+    /**
+     * Print just the content of the body element. Useful when you want to reuse material from other documents.
+     * @param fout
+     * @param lexer
+     * @param root
+     * @param xml
+     * @throws IOException 
+     */
+    void printBody(Out fout, Lexer lexer, Node root, boolean xml) throws IOException
+    {
+        if (root == null)
+        {
+            return;
+        }
+
+        // Feature request #434940 - fix by Dave Raggett/Ignacio Vazquez-Abrams 21 Jun 01
+        // Sebastiano Vigna <vigna at dsi.unimi.it>
+        Node body = root.findBody(lexer.configuration.tt);
+
+        if (body != null)
+        {
+            Node content;
+            for (content = body.content; content != null; content = content.next)
+            {
+                if (xml)
+                {
+                    printXMLTree(fout, (short) 0, 0, lexer, content);
+                }
+                else
+                {
+                    printTree(fout, (short) 0, 0, lexer, content);
+                }
+            }
+        }
+    }
+
+    /**
+     * @param fout
+     * @param mode
+     * @param indent
+     * @param lexer
+     * @param node
+     * @throws IOException 
+     */
+    public void printTree(Out fout, short mode, int indent, Lexer lexer, Node node) throws IOException
+    {
+        Node content, last;
+        TagTable tt = this.configuration.tt;
+
+        if (node == null)
+        {
+            return;
+        }
+
+        if (node.type == Node.TEXT_NODE || (node.type == Node.CDATA_TAG && lexer.configuration.escapeCdata))
+        {
+            printText(fout, mode, indent, node.textarray, node.start, node.end);
+        } else if (node.type == Node.CDATA_TEXT )
+        {
+            printText(fout, CDATA, indent, node.textarray, node.start, node.end);
+        }
+        else if (node.type == Node.COMMENT_TAG)
+        {
+            printComment(fout, indent, node);
+        }
+        else if (node.type == Node.ROOT_NODE)
+        {
+            for (content = node.content; content != null; content = content.next)
+            {
+                printTree(fout, mode, indent, lexer, content);
+            }
+        }
+        else if (node.type == Node.DOCTYPE_TAG)
+        {
+            printDocType(fout, indent, lexer, node);
+        }
+        else if (node.type == Node.PROC_INS_TAG)
+        {
+            printPI(fout, indent, node);
+        }
+        else if (node.type == Node.XML_DECL)
+        {
+            printXmlDecl(fout, indent, node);
+        }
+        else if (node.type == Node.CDATA_TAG)
+        {
+            printCDATA(fout, indent, node);
+        }
+        else if (node.type == Node.SECTION_TAG)
+        {
+            printSection(fout, indent, node);
+        }
+        else if (node.type == Node.ASP_TAG)
+        {
+            printAsp(fout, indent, node);
+        }
+        else if (node.type == Node.JSTE_TAG)
+        {
+            printJste(fout, indent, node);
+        }
+        else if (node.type == Node.PHP_TAG)
+        {
+            printPhp(fout, indent, node);
+        }
+        else if (TidyUtils.toBoolean(node.tag.model & Dict.CM_EMPTY))
+//            || (node.type == Node.START_END_TAG && !configuration.xHTML))
+        {
+            if (!TidyUtils.toBoolean(node.tag.model & Dict.CM_INLINE))
+            {
+                condFlushLine(fout, indent);
+            }
+
+            if (node.tag == tt.tagBr
+                && node.prev != null
+                && node.prev.tag != tt.tagBr
+                && this.configuration.breakBeforeBR)
+            {
+                flushLine(fout, indent);
+            }
+
+            if (this.configuration.makeClean && node.tag == tt.tagWbr)
+            {
+                printString(" ");
+            }
+            else
+            {
+                printTag(lexer, fout, mode, indent, node);
+            }
+
+            if (node.tag == tt.tagParam || node.tag == tt.tagArea)
+            {
+                condFlushLine(fout, indent);
+            }
+            else if (node.tag == tt.tagBr || node.tag == tt.tagHr)
+            {
+                flushLine(fout, indent);
+            }
+        }
+        else
+        {
+            if (node.type == Node.START_END_TAG)
+            {
+                node.type = Node.START_TAG;
+            }
+
+            // some kind of container element
+            if (node.tag != null && node.tag.getParser() == ParserImpl.PRE)
+            {
+                condFlushLine(fout, indent);
+
+                indent = 0;
+                condFlushLine(fout, indent);
+                printTag(lexer, fout, mode, indent, node);
+                flushLine(fout, indent);
+
+                for (content = node.content; content != null; content = content.next)
+                {
+                    printTree(fout, (short) (mode | PREFORMATTED | NOWRAP), indent, lexer, content);
+                }
+
+                condFlushLine(fout, indent);
+                printEndTag(mode, indent, node);
+                flushLine(fout, indent);
+
+                if (!this.configuration.indentContent && node.next != null)
+                {
+                    flushLine(fout, indent);
+                }
+            }
+            else if (node.tag == tt.tagStyle || node.tag == tt.tagScript)
+            {
+                printScriptStyle(fout, (short) (mode | PREFORMATTED | NOWRAP | CDATA), indent, lexer, node);
+            }
+            else if (TidyUtils.toBoolean(node.tag.model & Dict.CM_INLINE))
+            {
+                if (this.configuration.makeClean)
+                {
+                    // discards <font> and </font> tags
+                    if (node.tag == tt.tagFont)
+                    {
+                        for (content = node.content; content != null; content = content.next)
+                        {
+                            printTree(fout, mode, indent, lexer, content);
+                        }
+                        return;
+                    }
+
+                    // replace <nobr> ... </nobr> by &nbsp; or &#160; etc.
+                    if (node.tag == tt.tagNobr)
+                    {
+                        for (content = node.content; content != null; content = content.next)
+                        {
+                            printTree(fout, (short) (mode | NOWRAP), indent, lexer, content);
+                        }
+                        return;
+                    }
+                }
+
+                // otherwise a normal inline element
+
+                printTag(lexer, fout, mode, indent, node);
+
+                // indent content for SELECT, TEXTAREA, MAP, OBJECT and APPLET
+
+                if (shouldIndent(node))
+                {
+                    condFlushLine(fout, indent);
+                    indent += this.configuration.spaces;
+
+                    for (content = node.content; content != null; content = content.next)
+                    {
+                        printTree(fout, mode, indent, lexer, content);
+                    }
+
+                    condFlushLine(fout, indent);
+                    indent -= this.configuration.spaces;
+                    condFlushLine(fout, indent);
+                }
+                else
+                {
+
+                    for (content = node.content; content != null; content = content.next)
+                    {
+                        printTree(fout, mode, indent, lexer, content);
+                    }
+                }
+
+                printEndTag(mode, indent, node);
+            }
+            else
+            {
+                // other tags
+                condFlushLine(fout, indent);
+
+                if (this.configuration.smartIndent && node.prev != null)
+                {
+                    flushLine(fout, indent);
+                }
+
+                // do not omit elements with attributes
+                if (!this.configuration.hideEndTags
+                    || !(node.tag != null && TidyUtils.toBoolean(node.tag.model & Dict.CM_OMITST))
+                    || node.attributes != null)
+                {
+                    printTag(lexer, fout, mode, indent, node);
+
+                    if (shouldIndent(node))
+                    {
+                        condFlushLine(fout, indent);
+                    }
+                    else if (TidyUtils.toBoolean(node.tag.model & Dict.CM_HTML)
+                        || node.tag == tt.tagNoframes
+                        || (TidyUtils.toBoolean(node.tag.model & Dict.CM_HEAD) && !(node.tag == tt.tagTitle)))
+                    {
+                        flushLine(fout, indent);
+                    }
+                }
+
+                if (node.tag == tt.tagBody && this.configuration.burstSlides)
+                {
+                    printSlide(fout, mode, (this.configuration.indentContent
+                        ? indent + this.configuration.spaces
+                        : indent), lexer);
+                }
+                else
+                {
+                    last = null;
+
+                    for (content = node.content; content != null; content = content.next)
+                    {
+                        // kludge for naked text before block level tag
+                        if (last != null
+                            && !this.configuration.indentContent
+                            && last.type == Node.TEXT_NODE
+                            && content.tag != null
+                            && !TidyUtils.toBoolean(content.tag.model & Dict.CM_INLINE))
+                        {
+                            flushLine(fout, indent);
+                        }
+
+                        printTree(
+                            fout,
+                            mode,
+                            (shouldIndent(node) ? indent + this.configuration.spaces : indent),
+                            lexer,
+                            content);
+
+                        last = content;
+                    }
+                }
+
+                // don't flush line for td and th
+                if (shouldIndent(node)
+                    || ((TidyUtils.toBoolean(node.tag.model & Dict.CM_HTML) || node.tag == tt.tagNoframes || //
+                    (TidyUtils.toBoolean(node.tag.model & Dict.CM_HEAD) && !(node.tag == tt.tagTitle))) && //
+                    !this.configuration.hideEndTags))
+                {
+                    condFlushLine(
+                        fout,
+                        (this.configuration.indentContent ? indent + this.configuration.spaces : indent));
+
+                    if (!this.configuration.hideEndTags || !TidyUtils.toBoolean(node.tag.model & Dict.CM_OPT))
+                    {
+                        printEndTag(mode, indent, node);
+
+                        // #603128 tidy adds newslines after </html> tag
+                        // Fix by Fabrizio Giustina 12-02-2004
+                        // fix is different from the one in original tidy
+                        if (!lexer.seenEndHtml)
+                        {
+                            flushLine(fout, indent);
+                        }
+                    }
+                }
+                else
+                {
+                    if (!this.configuration.hideEndTags || !TidyUtils.toBoolean(node.tag.model & Dict.CM_OPT))
+                    {
+                        printEndTag(mode, indent, node);
+                    }
+
+                    flushLine(fout, indent);
+                }
+
+                // FG commented out: double newlines
+                // if (!this.configuration.indentContent
+                //     && node.next != null
+                //     && !this.configuration.hideEndTags
+                //     && (node.tag.model
+                //     & TidyUtils.toBoolean(Dict.CM_BLOCK | Dict.CM_TABLE | Dict.CM_LIST | Dict.CM_DEFLIST)))
+                //     {
+                //         flushLine(fout, indent);
+                //     }
+            }
+        }
+    }
+
+    /**
+     * @param fout
+     * @param mode
+     * @param indent
+     * @param lexer
+     * @param node
+     * @throws IOException 
+     */
+    public void printXMLTree(Out fout, short mode, int indent, Lexer lexer, Node node) throws IOException
+    {
+        TagTable tt = this.configuration.tt;
+
+        if (node == null)
+        {
+            return;
+        }
+
+        if (node.type == Node.TEXT_NODE || (node.type == Node.CDATA_TAG && lexer.configuration.escapeCdata))
+        {
+            printText(fout, mode, indent, node.textarray, node.start, node.end);
+        } else if (node.type == Node.CDATA_TEXT )
+        {
+            printText(fout, CDATA, indent, node.textarray, node.start, node.end);
+        }
+        else if (node.type == Node.COMMENT_TAG)
+        {
+            condFlushLine(fout, indent);
+            printComment(fout, 0, node);
+            condFlushLine(fout, 0);
+        }
+        else if (node.type == Node.ROOT_NODE)
+        {
+            Node content;
+
+            for (content = node.content; content != null; content = content.next)
+            {
+                printXMLTree(fout, mode, indent, lexer, content);
+            }
+        }
+        else if (node.type == Node.DOCTYPE_TAG)
+        {
+            printDocType(fout, indent, lexer, node);
+        }
+        else if (node.type == Node.PROC_INS_TAG)
+        {
+            printPI(fout, indent, node);
+        }
+        else if (node.type == Node.XML_DECL)
+        {
+            printXmlDecl(fout, indent, node);
+        }
+        else if (node.type == Node.CDATA_TAG)
+        {
+            printCDATA(fout, indent, node);
+        }
+        else if (node.type == Node.SECTION_TAG)
+        {
+            printSection(fout, indent, node);
+        }
+        else if (node.type == Node.ASP_TAG)
+        {
+            printAsp(fout, indent, node);
+        }
+        else if (node.type == Node.JSTE_TAG)
+        {
+            printJste(fout, indent, node);
+        }
+        else if (node.type == Node.PHP_TAG)
+        {
+            printPhp(fout, indent, node);
+        }
+        else if (TidyUtils.toBoolean(node.tag.model & Dict.CM_EMPTY)
+            || node.type == Node.START_END_TAG
+            && !configuration.xHTML)
+        {
+            condFlushLine(fout, indent);
+            printTag(lexer, fout, mode, indent, node);
+            // fgiust: Remove empty lines between tags in XML.
+            //flushLine(fout, indent);
+
+            // CPR: folks don't want so much vertical spacing in XML
+            // if (node.next != null) { flushLine(fout, indent); }
+
+        }
+        else
+        {
+            // some kind of container element
+            Node content;
+            boolean mixed = false;
+            int cindent;
+
+            for (content = node.content; content != null; content = content.next)
+            {
+                if (content.type == Node.TEXT_NODE)
+                {
+                    mixed = true;
+                    break;
+                }
+            }
+
+            condFlushLine(fout, indent);
+
+            if (ParserImpl.XMLPreserveWhiteSpace(node, tt))
+            {
+                indent = 0;
+                cindent = 0;
+                mixed = false;
+            }
+            else if (mixed)
+            {
+                cindent = indent;
+            }
+            else
+            {
+                cindent = indent + this.configuration.spaces;
+            }
+
+            printTag(lexer, fout, mode, indent, node);
+
+            if (!mixed && node.content != null)
+            {
+                flushLine(fout, indent);
+            }
+
+            for (content = node.content; content != null; content = content.next)
+            {
+                printXMLTree(fout, mode, cindent, lexer, content);
+            }
+
+            if (!mixed && node.content != null)
+            {
+                condFlushLine(fout, cindent);
+            }
+            printEndTag(mode, indent, node);
+            //condFlushLine(fout, indent);
+
+            // CPR: folks don't want so much vertical spacing in XML
+            // if (node.next != null) { flushLine(fout, indent); }
+
+        }
+    }
+
+    /**
+     * Split parse tree by h2 elements and output to separate files. Counts number of h2 children (if any) belonging to
+     * node.
+     * @param node root node
+     * @return number of slides (number of h2 elements)
+     */
+    public int countSlides(Node node)
+    {
+        // assume minimum of 1 slide
+        int n = 1;
+
+        TagTable tt = this.configuration.tt;
+
+        //fix for [431716] avoid empty slides
+        if (node != null && node.content != null && node.content.tag == tt.tagH2)
+        {
+            // "first" slide is empty, so ignore it
+            n--;
+        }
+
+        if (node != null)
+        {
+            for (node = node.content; node != null; node = node.next)
+            {
+                if (node.tag == tt.tagH2)
+                {
+                    ++n;
+                }
+            }
+        }
+
+        return n;
+    }
+
+    /**
+     * @param fout
+     * @param indent
+     * @throws IOException 
+     */
+    private void printNavBar(Out fout, int indent) throws IOException
+    {
+        String buf;
+
+        condFlushLine(fout, indent);
+        printString("<center><small>");
+
+        NumberFormat numberFormat = NumberFormat.getInstance();
+        numberFormat.setMinimumIntegerDigits(3);
+
+        if (slide > 1)
+        {
+            buf = "<a href=\"slide" + numberFormat.format(slide - 1) + ".html\">previous</a> | ";
+            // #427666 - fix by Eric Rossen 02 Aug 00
+            printString(buf);
+            condFlushLine(fout, indent);
+
+            if (slide < count)
+            {
+                printString("<a href=\"slide001.html\">start</a> | ");
+                // #427666 - fix by Eric Rossen 02 Aug 00
+            }
+            else
+            {
+                printString("<a href=\"slide001.html\">start</a>");
+                // #427666 - fix by Eric Rossen 02 Aug 00
+            }
+
+            condFlushLine(fout, indent);
+        }
+
+        if (slide < count)
+        {
+            buf = "<a href=\"slide" + numberFormat.format(slide + 1) + ".html\">next</a>";
+            // #427666 - fix by Eric Rossen 02 Aug 00
+            printString(buf);
+        }
+
+        printString("</small></center>");
+        condFlushLine(fout, indent);
+    }
+
+    /**
+     * Called from printTree to print the content of a slide from the node slidecontent. On return slidecontent points
+     * to the node starting the next slide or null. The variables slide and count are used to customise the navigation
+     * bar.
+     * @param fout
+     * @param mode
+     * @param indent
+     * @param lexer
+     * @throws IOException 
+     */
+    public void printSlide(Out fout, short mode, int indent, Lexer lexer) throws IOException
+    {
+        Node content, last;
+        TagTable tt = this.configuration.tt;
+
+        NumberFormat numberFormat = NumberFormat.getInstance();
+        numberFormat.setMinimumIntegerDigits(3);
+
+        /* insert div for onclick handler */
+        String s;
+        s = "<div onclick=\"document.location='slide"
+            + numberFormat.format(slide < count ? slide + 1 : 1)
+            + ".html'\">";
+        // #427666 - fix by Eric Rossen 02 Aug 00
+        printString(s);
+        condFlushLine(fout, indent);
+
+        /* first print the h2 element and navbar */
+        if (slidecontent != null && slidecontent.tag == tt.tagH2)
+        {
+            printNavBar(fout, indent);
+
+            /* now print an hr after h2 */
+
+            addC('<', linelen++);
+
+            addC(TidyUtils.foldCase('h', this.configuration.upperCaseTags, this.configuration.xmlTags), linelen++);
+            addC(TidyUtils.foldCase('r', this.configuration.upperCaseTags, this.configuration.xmlTags), linelen++);
+
+            if (this.configuration.xmlOut)
+            {
+                printString(" />");
+            }
+            else
+            {
+                addC('>', linelen++);
+            }
+
+            if (this.configuration.indentContent)
+            {
+                condFlushLine(fout, indent);
+            }
+
+            // PrintVertSpacer(fout, indent);
+
+            // condFlushLine(fout, indent);
+
+            // print the h2 element
+            printTree(
+                fout,
+                mode,
+                (this.configuration.indentContent ? indent + this.configuration.spaces : indent),
+                lexer,
+                slidecontent);
+
+            slidecontent = slidecontent.next;
+        }
+
+        // now continue until we reach the next h2
+
+        last = null;
+        content = slidecontent;
+
+        for (; content != null; content = content.next)
+        {
+            if (content.tag == tt.tagH2)
+            {
+                break;
+            }
+
+            // kludge for naked text before block level tag
+            if (last != null
+                && !this.configuration.indentContent
+                && last.type == Node.TEXT_NODE
+                && content.tag != null
+                && TidyUtils.toBoolean(content.tag.model & Dict.CM_BLOCK))
+            {
+                flushLine(fout, indent);
+                flushLine(fout, indent);
+            }
+
+            printTree(
+                fout,
+                mode,
+                (this.configuration.indentContent ? indent + this.configuration.spaces : indent),
+                lexer,
+                content);
+
+            last = content;
+        }
+
+        slidecontent = content;
+
+        // now print epilog
+
+        condFlushLine(fout, indent);
+
+        printString("<br clear=\"all\">");
+        condFlushLine(fout, indent);
+
+        addC('<', linelen++);
+
+        addC(TidyUtils.foldCase('h', this.configuration.upperCaseTags, this.configuration.xmlTags), linelen++);
+        addC(TidyUtils.foldCase('r', this.configuration.upperCaseTags, this.configuration.xmlTags), linelen++);
+
+        if (this.configuration.xmlOut)
+        {
+            printString(" />");
+        }
+        else
+        {
+            addC('>', linelen++);
+        }
+
+        if (this.configuration.indentContent)
+        {
+            condFlushLine(fout, indent);
+        }
+
+        printNavBar(fout, indent);
+
+        // end tag for div
+        printString("</div>");
+        condFlushLine(fout, indent);
+    }
+
+    /**
+     * Add meta element for page transition effect, this works on IE but not NS.
+     * @param lexer
+     * @param root
+     * @param duration
+     */
+    public void addTransitionEffect(Lexer lexer, Node root, double duration)
+    {
+        Node head = root.findHEAD(lexer.configuration.tt);
+        String transition;
+
+        transition = "blendTrans(Duration=" + (new Double(duration)).toString() + ")";
+
+        if (head != null)
+        {
+            Node meta = lexer.inferredTag("meta");
+            meta.addAttribute("http-equiv", "Page-Enter");
+            meta.addAttribute("content", transition);
+            head.insertNodeAtStart(meta);
+        }
+    }
+
+    /**
+     * Creates slides from h2.
+     * @param lexer Lexer
+     * @param root root node
+     */
+    public void createSlides(Lexer lexer, Node root)
+    {
+        Node body;
+        String buf;
+
+        NumberFormat numberFormat = NumberFormat.getInstance();
+        numberFormat.setMinimumIntegerDigits(3);
+
+        body = root.findBody(lexer.configuration.tt);
+        count = countSlides(body);
+        slidecontent = body.content;
+
+        addTransitionEffect(lexer, root, 3.0);
+
+        for (slide = 1; slide <= count; ++slide)
+        {
+            buf = "slide" + numberFormat.format(slide) + ".html";
+
+            try
+            {
+                FileOutputStream fis = new FileOutputStream(buf);
+                Out out = OutFactory.getOut(configuration, fis);
+
+                printTree(out, (short) 0, 0, lexer, root);
+                flushLine(out, 0);
+                out.close();
+            }
+            catch (IOException e)
+            {
+            	log.error(buf + e.toString());
+            }
+        }
+
+        // delete superfluous slides by deleting slideN.html for N = count+1, count+2, etc.
+        // until no such file is found.
+
+        // #427666 - fix by Eric Rossen 02 Aug 00
+        while ((new File("slide" + numberFormat.format(slide) + ".html")).delete())
+        {
+            ++slide;
+        }
+    }
+
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/ParseProperty.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/ParseProperty.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/ParseProperty.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,115 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ *  Java HTML Tidy - JTidy
+ *  HTML parser and pretty printer
+ *
+ *  Copyright (c) 1998-2000 World Wide Web Consortium (Massachusetts
+ *  Institute of Technology, Institut National de Recherche en
+ *  Informatique et en Automatique, Keio University). All Rights
+ *  Reserved.
+ *
+ *  Contributing Author(s):
+ *
+ *     Dave Raggett <dsr at w3.org>
+ *     Andy Quick <ac.quick at sympatico.ca> (translation to Java)
+ *     Gary L Peskin <garyp at firstech.com> (Java development)
+ *     Sami Lempinen <sami at lempinen.net> (release management)
+ *     Fabrizio Giustina <fgiust at users.sourceforge.net>
+ *
+ *  The contributing author(s) would like to thank all those who
+ *  helped with testing, bug fixes, and patience.  This wouldn't
+ *  have been possible without all of you.
+ *
+ *  COPYRIGHT NOTICE:
+ * 
+ *  This software and documentation is provided "as is," and
+ *  the copyright holders and contributing author(s) make no
+ *  representations or warranties, express or implied, including
+ *  but not limited to, warranties of merchantability or fitness
+ *  for any particular purpose or that the use of the software or
+ *  documentation will not infringe any third party patents,
+ *  copyrights, trademarks or other rights. 
+ *
+ *  The copyright holders and contributing author(s) will not be
+ *  liable for any direct, indirect, special or consequential damages
+ *  arising out of any use of the software or documentation, even if
+ *  advised of the possibility of such damage.
+ *
+ *  Permission is hereby granted to use, copy, modify, and distribute
+ *  this source code, or portions hereof, documentation and executables,
+ *  for any purpose, without fee, subject to the following restrictions:
+ *
+ *  1. The origin of this source code must not be misrepresented.
+ *  2. Altered versions must be plainly marked as such and must
+ *     not be misrepresented as being the original source.
+ *  3. This Copyright notice may not be removed or altered from any
+ *     source or altered source distribution.
+ * 
+ *  The copyright holders and contributing author(s) specifically
+ *  permit, without fee, and encourage the use of this source code
+ *  as a component for supporting the Hypertext Markup Language in
+ *  commercial products. If you use this source code in a product,
+ *  acknowledgment is not required but would be appreciated.
+ *
+ */
+package org.ajax4jsf.org.w3c.tidy;
+
+/**
+ * Interface for configuration property parser.
+ * @author Fabrizio Giustina
+ * @version $Revision $ ($Author $)
+ */
+public interface ParseProperty
+{
+
+    /**
+     * Parse a configuration option.
+     * @param value option value
+     * @param option option name
+     * @param configuration actual configuration instance
+     * @return parsed configuration value
+     */
+    Object parse(String value, String option, Configuration configuration);
+
+    /**
+     * Returns the option type.
+     * @return option type
+     */
+    String getType();
+
+    /**
+     * Returns the valid values.
+     * @return valid values (text)
+     */
+    String getOptionValues();
+
+    /**
+     * Returns the "friendly name" for the passed value. Needed to print actual configuration setting.
+     * @param option option name
+     * @param value actual value
+     * @param configuration actual configuration
+     * @return "friendly" actual value
+     */
+    String getFriendlyName(String option, Object value, Configuration configuration);
+
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/ParsePropertyImpl.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/ParsePropertyImpl.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/ParsePropertyImpl.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,950 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ *  Java HTML Tidy - JTidy
+ *  HTML parser and pretty printer
+ *
+ *  Copyright (c) 1998-2000 World Wide Web Consortium (Massachusetts
+ *  Institute of Technology, Institut National de Recherche en
+ *  Informatique et en Automatique, Keio University). All Rights
+ *  Reserved.
+ *
+ *  Contributing Author(s):
+ *
+ *     Dave Raggett <dsr at w3.org>
+ *     Andy Quick <ac.quick at sympatico.ca> (translation to Java)
+ *     Gary L Peskin <garyp at firstech.com> (Java development)
+ *     Sami Lempinen <sami at lempinen.net> (release management)
+ *     Fabrizio Giustina <fgiust at users.sourceforge.net>
+ *
+ *  The contributing author(s) would like to thank all those who
+ *  helped with testing, bug fixes, and patience.  This wouldn't
+ *  have been possible without all of you.
+ *
+ *  COPYRIGHT NOTICE:
+ * 
+ *  This software and documentation is provided "as is," and
+ *  the copyright holders and contributing author(s) make no
+ *  representations or warranties, express or implied, including
+ *  but not limited to, warranties of merchantability or fitness
+ *  for any particular purpose or that the use of the software or
+ *  documentation will not infringe any third party patents,
+ *  copyrights, trademarks or other rights. 
+ *
+ *  The copyright holders and contributing author(s) will not be
+ *  liable for any direct, indirect, special or consequential damages
+ *  arising out of any use of the software or documentation, even if
+ *  advised of the possibility of such damage.
+ *
+ *  Permission is hereby granted to use, copy, modify, and distribute
+ *  this source code, or portions hereof, documentation and executables,
+ *  for any purpose, without fee, subject to the following restrictions:
+ *
+ *  1. The origin of this source code must not be misrepresented.
+ *  2. Altered versions must be plainly marked as such and must
+ *     not be misrepresented as being the original source.
+ *  3. This Copyright notice may not be removed or altered from any
+ *     source or altered source distribution.
+ * 
+ *  The copyright holders and contributing author(s) specifically
+ *  permit, without fee, and encourage the use of this source code
+ *  as a component for supporting the Hypertext Markup Language in
+ *  commercial products. If you use this source code in a product,
+ *  acknowledgment is not required but would be appreciated.
+ *
+ */
+package org.ajax4jsf.org.w3c.tidy;
+
+import java.util.Iterator;
+import java.util.List;
+import java.util.StringTokenizer;
+
+
+/**
+ * Property parser instances.
+ * @author Fabrizio Giustina
+ * @version $Revision $ ($Author $)
+ */
+public final class ParsePropertyImpl
+{
+
+    /**
+     * configuration parser for int values.
+     */
+    static final ParseProperty INT = new ParseInt();
+
+    /**
+     * configuration parser for boolean values.
+     */
+    static final ParseProperty BOOL = new ParseBoolean();
+
+    /**
+     * configuration parser for inverted boolean values.
+     */
+    static final ParseProperty INVBOOL = new ParseInvBoolean();
+
+    /**
+     * configuration parser for char encoding values.
+     */
+    static final ParseProperty CHAR_ENCODING = new ParseCharEncoding();
+
+    /**
+     * configuration parser for name values.
+     */
+    static final ParseProperty NAME = new ParseName();
+
+    /**
+     * configuration parser for tag names.
+     */
+    static final ParseProperty TAGNAMES = new ParseTagNames();
+
+    /**
+     * configuration parser for doctype property.
+     */
+    static final ParseProperty DOCTYPE = new ParseDocType();
+
+    /**
+     * configuration parser for repetated attribute property.
+     */
+    static final ParseProperty REPEATED_ATTRIBUTES = new ParseRepeatedAttribute();
+
+    /**
+     * configuration parser for String values.
+     */
+    static final ParseProperty STRING = new ParseString();
+
+    /**
+     * configuration parser for indent property.
+     */
+    static final ParseProperty INDENT = new ParseIndent();
+
+    /**
+     * configuration parser for css selectors.
+     */
+    static final ParseProperty CSS1SELECTOR = new ParseCSS1Selector();
+
+    /**
+     * configuration parser for new line bytes.
+     */
+    static final ParseProperty NEWLINE = new ParseNewLine();
+
+    /**
+     * don't instantiate.
+     */
+    private ParsePropertyImpl()
+    {
+        // unused
+    }
+
+    /**
+     * parser for integer values.
+     */
+    static class ParseInt implements ParseProperty
+    {
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.ParseProperty#parse(java.lang.String, java.lang.String, org.ajax4jsf.org.w3c.tidy.Configuration)
+         */
+        public Object parse(String value, String option, Configuration configuration)
+        {
+            int i = 0;
+            try
+            {
+                i = Integer.parseInt(value);
+            }
+            catch (NumberFormatException e)
+            {
+                configuration.report.badArgument(value, option);
+                i = -1;
+            }
+            return new Integer(i);
+        }
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.ParseProperty#getType()
+         */
+        public String getType()
+        {
+            return "Integer";
+        }
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.ParseProperty#getOptionValues()
+         */
+        public String getOptionValues()
+        {
+            return "0, 1, 2, ...";
+        }
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.ParseProperty#getFriendlyName(java.lang.String, java.lang.Object, Configuration)
+         */
+        public String getFriendlyName(String option, Object value, Configuration configuration)
+        {
+            return value == null ? "" : value.toString();
+        }
+    }
+
+    /**
+     * parser for boolean values.
+     */
+    static class ParseBoolean implements ParseProperty
+    {
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.ParseProperty#parse(java.lang.String, java.lang.String, org.ajax4jsf.org.w3c.tidy.Configuration)
+         */
+        public Object parse(String value, String option, Configuration configuration)
+        {
+            Boolean b = Boolean.TRUE;
+            if (value != null && value.length() > 0)
+            {
+                char c = value.charAt(0);
+                if ((c == 't') || (c == 'T') || (c == 'Y') || (c == 'y') || (c == '1'))
+                {
+                    b = Boolean.TRUE;
+                }
+                else if ((c == 'f') || (c == 'F') || (c == 'N') || (c == 'n') || (c == '0'))
+                {
+                    b = Boolean.FALSE;
+                }
+                else
+                {
+                    configuration.report.badArgument(value, option);
+                }
+            }
+            return b;
+        }
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.ParseProperty#getType()
+         */
+        public String getType()
+        {
+            return "Boolean";
+        }
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.ParseProperty#getOptionValues()
+         */
+        public String getOptionValues()
+        {
+            return "y/n, yes/no, t/f, true/false, 1/0";
+        }
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.ParseProperty#getFriendlyName(java.lang.String, java.lang.Object, Configuration)
+         */
+        public String getFriendlyName(String option, Object value, Configuration configuration)
+        {
+            if (value == null)
+            {
+                return "";
+            }
+
+            return ((Boolean) value).booleanValue() ? "yes" : "no";
+        }
+    }
+
+    /**
+     * parser for boolean values.
+     */
+    static class ParseInvBoolean implements ParseProperty
+    {
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.ParseProperty#parse(java.lang.String, java.lang.String, org.ajax4jsf.org.w3c.tidy.Configuration)
+         */
+        public Object parse(String value, String option, Configuration configuration)
+        {
+            return (((Boolean) BOOL.parse(value, option, configuration)).booleanValue() ? Boolean.FALSE : Boolean.TRUE);
+        }
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.ParseProperty#getType()
+         */
+        public String getType()
+        {
+            return "Boolean";
+        }
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.ParseProperty#getOptionValues()
+         */
+        public String getOptionValues()
+        {
+            return "yes, no, true, false";
+        }
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.ParseProperty#getFriendlyName(java.lang.String, java.lang.Object, Configuration)
+         */
+        public String getFriendlyName(String option, Object value, Configuration configuration)
+        {
+            if (value == null)
+            {
+                return "";
+            }
+
+            return ((Boolean) value).booleanValue() ? "no" : "yes";
+        }
+    }
+
+    /**
+     * parse character encoding option. Can be RAW, ASCII, LATIN1, UTF8, ISO2022, MACROMAN, UTF16LE, UTF16BE, UTF16,
+     * WIN1252, BIG5, SHIFTJIS
+     */
+    static class ParseCharEncoding implements ParseProperty
+    {
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.ParseProperty#parse(java.lang.String, java.lang.String, org.ajax4jsf.org.w3c.tidy.Configuration)
+         */
+        public Object parse(String value, String option, Configuration configuration)
+        {
+
+            if ("raw".equalsIgnoreCase(value))
+            {
+                // special value for compatibility with tidy c
+                configuration.rawOut = true;
+            }
+            else if (!TidyUtils.isCharEncodingSupported(value))
+            {
+                configuration.report.badArgument(value, option);
+            }
+            else if ("input-encoding".equalsIgnoreCase(option))
+            {
+                configuration.setInCharEncodingName(value);
+            }
+            else if ("output-encoding".equalsIgnoreCase(option))
+            {
+                configuration.setOutCharEncodingName(value);
+            }
+            else if ("char-encoding".equalsIgnoreCase(option))
+            {
+                configuration.setInCharEncodingName(value);
+                configuration.setOutCharEncodingName(value);
+            }
+
+            return null;
+        }
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.ParseProperty#getType()
+         */
+        public String getType()
+        {
+            return "Encoding";
+        }
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.ParseProperty#getOptionValues()
+         */
+        public String getOptionValues()
+        {
+            // ascii, latin1, raw, utf-8, iso2022, mac, utf-16, utf-16be, utf-16le, big5, shiftjis
+            return "Any valid java char encoding name";
+        }
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.ParseProperty#getFriendlyName(java.lang.String, java.lang.Object, Configuration)
+         */
+        public String getFriendlyName(String option, Object value, Configuration configuration)
+        {
+            if ("output-encoding".equalsIgnoreCase(option))
+            {
+                return configuration.getOutCharEncodingName();
+            }
+
+            // for input-encoding or char-encoding
+            return configuration.getInCharEncodingName();
+        }
+    }
+
+    /**
+     * parser for name values (a string excluding whitespace).
+     */
+    static class ParseName implements ParseProperty
+    {
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.ParseProperty#parse(java.lang.String, java.lang.String, org.ajax4jsf.org.w3c.tidy.Configuration)
+         */
+        public Object parse(String value, String option, Configuration configuration)
+        {
+            StringTokenizer t = new StringTokenizer(value);
+            String rs = null;
+            if (t.countTokens() >= 1)
+            {
+                rs = t.nextToken();
+            }
+            else
+            {
+                configuration.report.badArgument(value, option);
+            }
+            return rs;
+        }
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.ParseProperty#getType()
+         */
+        public String getType()
+        {
+            return "Name";
+        }
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.ParseProperty#getOptionValues()
+         */
+        public String getOptionValues()
+        {
+            return "-";
+        }
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.ParseProperty#getFriendlyName(java.lang.String, java.lang.Object, Configuration)
+         */
+        public String getFriendlyName(String option, Object value, Configuration configuration)
+        {
+            return value == null ? "" : value.toString();
+        }
+    }
+
+    /**
+     * parser for name values.
+     */
+    static class ParseTagNames implements ParseProperty
+    {
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.ParseProperty#parse(java.lang.String, java.lang.String, org.ajax4jsf.org.w3c.tidy.Configuration)
+         */
+        public Object parse(String value, String option, Configuration configuration)
+        {
+            short tagType = Dict.TAGTYPE_INLINE;
+
+            if ("new-inline-tags".equals(option))
+            {
+                tagType = Dict.TAGTYPE_INLINE;
+            }
+            else if ("new-blocklevel-tags".equals(option))
+            {
+                tagType = Dict.TAGTYPE_BLOCK;
+            }
+            else if ("new-empty-tags".equals(option))
+            {
+                tagType = Dict.TAGTYPE_EMPTY;
+            }
+            else if ("new-pre-tags".equals(option))
+            {
+                tagType = Dict.TAGTYPE_PRE;
+            }
+
+            StringTokenizer t = new StringTokenizer(value, " \t\n\r,");
+            while (t.hasMoreTokens())
+            {
+                configuration.definedTags |= tagType;
+                configuration.tt.defineTag(tagType, t.nextToken());
+            }
+            return null;
+        }
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.ParseProperty#getType()
+         */
+        public String getType()
+        {
+            return "Tag names";
+        }
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.ParseProperty#getOptionValues()
+         */
+        public String getOptionValues()
+        {
+            return "tagX, tagY, ...";
+        }
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.ParseProperty#getFriendlyName(java.lang.String, java.lang.Object, Configuration)
+         */
+        public String getFriendlyName(String option, Object value, Configuration configuration)
+        {
+            short tagType;
+            if ("new-inline-tags".equals(option))
+            {
+                tagType = Dict.TAGTYPE_INLINE;
+            }
+            else if ("new-blocklevel-tags".equals(option))
+            {
+                tagType = Dict.TAGTYPE_BLOCK;
+            }
+            else if ("new-empty-tags".equals(option))
+            {
+                tagType = Dict.TAGTYPE_EMPTY;
+            }
+            else if ("new-pre-tags".equals(option))
+            {
+                tagType = Dict.TAGTYPE_PRE;
+            }
+            else
+            {
+                return "";
+            }
+
+            List tagList = configuration.tt.findAllDefinedTag(tagType);
+            if (tagList.isEmpty())
+            {
+                return "";
+            }
+
+            StringBuffer buffer = new StringBuffer();
+            Iterator iterator = tagList.iterator();
+            while (iterator.hasNext())
+            {
+                buffer.append(iterator.next());
+                buffer.append(" ");
+            }
+
+            return buffer.toString();
+        }
+    }
+
+    /**
+     * Parse doctype preference. doctype: <code>omit | auto | strict | loose | [fpi]</code> where the fpi is a string
+     * similar to <code>"-//ACME//DTD HTML 3.14159//EN"</code>.
+     */
+    static class ParseDocType implements ParseProperty
+    {
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.ParseProperty#parse(java.lang.String, java.lang.String, org.ajax4jsf.org.w3c.tidy.Configuration)
+         */
+        public Object parse(String value, String option, Configuration configuration)
+        {
+            value = value.trim();
+
+            /* "-//ACME//DTD HTML 3.14159//EN" or similar */
+
+            if (value.startsWith("\""))
+            {
+                configuration.docTypeMode = Configuration.DOCTYPE_USER;
+                return value;
+            }
+
+            /* read first word */
+            String word = "";
+            StringTokenizer t = new StringTokenizer(value, " \t\n\r,");
+            if (t.hasMoreTokens())
+            {
+                word = t.nextToken();
+            }
+            // #443663 - fix by Terry Teague 23 Jul 01
+            if ("auto".equalsIgnoreCase(word))
+            {
+                configuration.docTypeMode = Configuration.DOCTYPE_AUTO;
+            }
+            else if ("omit".equalsIgnoreCase(word))
+            {
+                configuration.docTypeMode = Configuration.DOCTYPE_OMIT;
+            }
+            else if ("strict".equalsIgnoreCase(word))
+            {
+                configuration.docTypeMode = Configuration.DOCTYPE_STRICT;
+            }
+            else if ("loose".equalsIgnoreCase(word) || "transitional".equalsIgnoreCase(word))
+            {
+                configuration.docTypeMode = Configuration.DOCTYPE_LOOSE;
+            }
+            else if ("ignore".equalsIgnoreCase(word))
+            {
+                configuration.docTypeMode = Configuration.DOCTYPE_IGNORE;
+            }
+            else
+            {
+                configuration.report.badArgument(value, option);
+            }
+            return null;
+        }
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.ParseProperty#getType()
+         */
+        public String getType()
+        {
+            return "DocType";
+        }
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.ParseProperty#getOptionValues()
+         */
+        public String getOptionValues()
+        {
+            return "omit | auto | strict | loose | ignore | [fpi]";
+        }
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.ParseProperty#getFriendlyName(java.lang.String, java.lang.Object, Configuration)
+         */
+        public String getFriendlyName(String option, Object value, Configuration configuration)
+        {
+
+            String stringValue;
+
+            switch (configuration.docTypeMode)
+            {
+                case Configuration.DOCTYPE_AUTO :
+                    stringValue = "auto";
+                    break;
+
+                case Configuration.DOCTYPE_OMIT :
+                    stringValue = "omit";
+                    break;
+
+                case Configuration.DOCTYPE_STRICT :
+                    stringValue = "strict";
+                    break;
+
+                case Configuration.DOCTYPE_LOOSE :
+                    stringValue = "transitional";
+                    break;
+
+                case Configuration.DOCTYPE_IGNORE :
+                    stringValue = "ignore";
+                    break;
+
+                case Configuration.DOCTYPE_USER :
+                    stringValue = configuration.docTypeStr;
+                    break;
+
+                default :
+                    stringValue = "unknown";
+                    break;
+            }
+
+            return stringValue;
+        }
+    }
+
+    /**
+     * keep-first or keep-last?
+     */
+    static class ParseRepeatedAttribute implements ParseProperty
+    {
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.ParseProperty#parse(java.lang.String, java.lang.String, org.ajax4jsf.org.w3c.tidy.Configuration)
+         */
+        public Object parse(String value, String option, Configuration configuration)
+        {
+            int dupAttr;
+
+            if ("keep-first".equalsIgnoreCase(value))
+            {
+                dupAttr = Configuration.KEEP_FIRST;
+            }
+            else if ("keep-last".equalsIgnoreCase(value))
+            {
+                dupAttr = Configuration.KEEP_LAST;
+            }
+            else
+            {
+                configuration.report.badArgument(value, option);
+                dupAttr = -1;
+            }
+            return new Integer(dupAttr);
+        }
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.ParseProperty#getType()
+         */
+        public String getType()
+        {
+            return "Enum";
+        }
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.ParseProperty#getOptionValues()
+         */
+        public String getOptionValues()
+        {
+            return "keep-first, keep-last";
+        }
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.ParseProperty#getFriendlyName(java.lang.String, java.lang.Object, Configuration)
+         */
+        public String getFriendlyName(String option, Object value, Configuration configuration)
+        {
+            if (value == null)
+            {
+                return "";
+            }
+
+            int intValue = ((Integer) value).intValue();
+            String stringValue;
+
+            switch (intValue)
+            {
+                case Configuration.KEEP_FIRST :
+                    stringValue = "keep-first";
+                    break;
+
+                case Configuration.KEEP_LAST :
+                    stringValue = "keep-last";
+                    break;
+
+                default :
+                    stringValue = "unknown";
+                    break;
+            }
+
+            return stringValue;
+        }
+    }
+
+    /**
+     * Parser for String values.
+     */
+    static class ParseString implements ParseProperty
+    {
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.ParseProperty#parse(java.lang.String, java.lang.String, org.ajax4jsf.org.w3c.tidy.Configuration)
+         */
+        public Object parse(String value, String option, Configuration configuration)
+        {
+            return value;
+        }
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.ParseProperty#getType()
+         */
+        public String getType()
+        {
+            return "String";
+        }
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.ParseProperty#getOptionValues()
+         */
+        public String getOptionValues()
+        {
+            return "-";
+        }
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.ParseProperty#getFriendlyName(java.lang.String, java.lang.Object, Configuration)
+         */
+        public String getFriendlyName(String option, Object value, Configuration configuration)
+        {
+            return value == null ? "" : (String) value;
+        }
+    }
+
+    /**
+     * Parser for indent values.
+     */
+    static class ParseIndent implements ParseProperty
+    {
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.ParseProperty#parse(java.lang.String, java.lang.String, org.ajax4jsf.org.w3c.tidy.Configuration)
+         */
+        public Object parse(String value, String option, Configuration configuration)
+        {
+            boolean b = configuration.indentContent;
+
+            if ("yes".equalsIgnoreCase(value))
+            {
+                b = true;
+                configuration.smartIndent = false;
+            }
+            else if ("true".equalsIgnoreCase(value))
+            {
+                b = true;
+                configuration.smartIndent = false;
+            }
+            else if ("no".equalsIgnoreCase(value))
+            {
+                b = false;
+                configuration.smartIndent = false;
+            }
+            else if ("false".equalsIgnoreCase(value))
+            {
+                b = false;
+                configuration.smartIndent = false;
+            }
+            else if ("auto".equalsIgnoreCase(value))
+            {
+                b = true;
+                configuration.smartIndent = true;
+            }
+            else
+            {
+                configuration.report.badArgument(value, option);
+            }
+            return b ? Boolean.TRUE : Boolean.FALSE;
+        }
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.ParseProperty#getType()
+         */
+        public String getType()
+        {
+            return "Indent";
+        }
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.ParseProperty#getOptionValues()
+         */
+        public String getOptionValues()
+        {
+            return "auto, y/n, yes/no, t/f, true/false, 1/0";
+        }
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.ParseProperty#getFriendlyName(java.lang.String, java.lang.Object, Configuration)
+         */
+        public String getFriendlyName(String option, Object value, Configuration configuration)
+        {
+            return value == null ? "" : value.toString();
+        }
+    }
+
+    /**
+     * Parser for css selectors.
+     */
+    static class ParseCSS1Selector implements ParseProperty
+    {
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.ParseProperty#parse(java.lang.String, java.lang.String, org.ajax4jsf.org.w3c.tidy.Configuration)
+         */
+        public Object parse(String value, String option, Configuration configuration)
+        {
+            StringTokenizer t = new StringTokenizer(value);
+            String buf = null;
+            if (t.countTokens() >= 1)
+            {
+                buf = t.nextToken() + "-"; // Make sure any escaped Unicode is terminated so valid class names are
+                // generated after Tidy appends last digits.
+            }
+            else
+            {
+                configuration.report.badArgument(value, option);
+            }
+
+            if (!Lexer.isCSS1Selector(value))
+            {
+                configuration.report.badArgument(value, option);
+            }
+
+            return buf;
+        }
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.ParseProperty#getType()
+         */
+        public String getType()
+        {
+            return "Name";
+        }
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.ParseProperty#getOptionValues()
+         */
+        public String getOptionValues()
+        {
+            return "CSS1 selector";
+        }
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.ParseProperty#getFriendlyName(java.lang.String, java.lang.Object, Configuration)
+         */
+        public String getFriendlyName(String option, Object value, Configuration configuration)
+        {
+            return value == null ? "" : (String) value;
+        }
+    }
+
+    /**
+     * Parser for newline bytes. Allows lf|crlf|cr.
+     */
+    static class ParseNewLine implements ParseProperty
+    {
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.ParseProperty#parse(java.lang.String, java.lang.String, org.ajax4jsf.org.w3c.tidy.Configuration)
+         */
+        public Object parse(String value, String option, Configuration configuration)
+        {
+            // lf|crlf|cr
+            if ("lf".equalsIgnoreCase(value))
+            {
+                configuration.newline = new char[]{'\n'};
+            }
+            else if ("cr".equalsIgnoreCase(value))
+            {
+                configuration.newline = new char[]{'\r'};
+            }
+            else if ("crlf".equalsIgnoreCase(value))
+            {
+                configuration.newline = new char[]{'\r', '\n'};
+            }
+            else
+            {
+                configuration.report.badArgument(value, option);
+            }
+            return null;
+        }
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.ParseProperty#getType()
+         */
+        public String getType()
+        {
+            return "Enum";
+        }
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.ParseProperty#getOptionValues()
+         */
+        public String getOptionValues()
+        {
+            return "lf, crlf, cr";
+        }
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.ParseProperty#getFriendlyName(java.lang.String, java.lang.Object, Configuration)
+         */
+        public String getFriendlyName(String option, Object value, Configuration configuration)
+        {
+            if (configuration.newline.length == 1)
+            {
+                return (configuration.newline[0] == '\n') ? "lf" : "cr";
+            }
+            return "crlf";
+        }
+    }
+
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/Parser.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/Parser.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/Parser.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,95 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ *  Java HTML Tidy - JTidy
+ *  HTML parser and pretty printer
+ *
+ *  Copyright (c) 1998-2000 World Wide Web Consortium (Massachusetts
+ *  Institute of Technology, Institut National de Recherche en
+ *  Informatique et en Automatique, Keio University). All Rights
+ *  Reserved.
+ *
+ *  Contributing Author(s):
+ *
+ *     Dave Raggett <dsr at w3.org>
+ *     Andy Quick <ac.quick at sympatico.ca> (translation to Java)
+ *     Gary L Peskin <garyp at firstech.com> (Java development)
+ *     Sami Lempinen <sami at lempinen.net> (release management)
+ *     Fabrizio Giustina <fgiust at users.sourceforge.net>
+ *
+ *  The contributing author(s) would like to thank all those who
+ *  helped with testing, bug fixes, and patience.  This wouldn't
+ *  have been possible without all of you.
+ *
+ *  COPYRIGHT NOTICE:
+ * 
+ *  This software and documentation is provided "as is," and
+ *  the copyright holders and contributing author(s) make no
+ *  representations or warranties, express or implied, including
+ *  but not limited to, warranties of merchantability or fitness
+ *  for any particular purpose or that the use of the software or
+ *  documentation will not infringe any third party patents,
+ *  copyrights, trademarks or other rights. 
+ *
+ *  The copyright holders and contributing author(s) will not be
+ *  liable for any direct, indirect, special or consequential damages
+ *  arising out of any use of the software or documentation, even if
+ *  advised of the possibility of such damage.
+ *
+ *  Permission is hereby granted to use, copy, modify, and distribute
+ *  this source code, or portions hereof, documentation and executables,
+ *  for any purpose, without fee, subject to the following restrictions:
+ *
+ *  1. The origin of this source code must not be misrepresented.
+ *  2. Altered versions must be plainly marked as such and must
+ *     not be misrepresented as being the original source.
+ *  3. This Copyright notice may not be removed or altered from any
+ *     source or altered source distribution.
+ * 
+ *  The copyright holders and contributing author(s) specifically
+ *  permit, without fee, and encourage the use of this source code
+ *  as a component for supporting the Hypertext Markup Language in
+ *  commercial products. If you use this source code in a product,
+ *  acknowledgment is not required but would be appreciated.
+ *
+ */
+package org.ajax4jsf.org.w3c.tidy;
+
+/**
+ * HTML Parser.
+ * @author Dave Raggett <a href="mailto:dsr at w3.org">dsr at w3.org </a>
+ * @author Andy Quick <a href="mailto:ac.quick at sympatico.ca">ac.quick at sympatico.ca </a> (translation to Java)
+ * @author Fabrizio Giustina
+ * @version $Revision: 1.1.2.1 $ ($Author: alexsmirnov $)
+ */
+public interface Parser
+{
+
+    /**
+     * Parse the given node.
+     * @param lexer Lexer
+     * @param node node created by the lexer upon seeing the start tag, or by the parser when the start tag is inferred
+     * @param mode content mode
+     */
+    void parse(Lexer lexer, Node node, short mode);
+
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/ParserImpl.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/ParserImpl.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/ParserImpl.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,3645 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ *  Java HTML Tidy - JTidy
+ *  HTML parser and pretty printer
+ *
+ *  Copyright (c) 1998-2000 World Wide Web Consortium (Massachusetts
+ *  Institute of Technology, Institut National de Recherche en
+ *  Informatique et en Automatique, Keio University). All Rights
+ *  Reserved.
+ *
+ *  Contributing Author(s):
+ *
+ *     Dave Raggett <dsr at w3.org>
+ *     Andy Quick <ac.quick at sympatico.ca> (translation to Java)
+ *     Gary L Peskin <garyp at firstech.com> (Java development)
+ *     Sami Lempinen <sami at lempinen.net> (release management)
+ *     Fabrizio Giustina <fgiust at users.sourceforge.net>
+ *
+ *  The contributing author(s) would like to thank all those who
+ *  helped with testing, bug fixes, and patience.  This wouldn't
+ *  have been possible without all of you.
+ *
+ *  COPYRIGHT NOTICE:
+ * 
+ *  This software and documentation is provided "as is," and
+ *  the copyright holders and contributing author(s) make no
+ *  representations or warranties, express or implied, including
+ *  but not limited to, warranties of merchantability or fitness
+ *  for any particular purpose or that the use of the software or
+ *  documentation will not infringe any third party patents,
+ *  copyrights, trademarks or other rights. 
+ *
+ *  The copyright holders and contributing author(s) will not be
+ *  liable for any direct, indirect, special or consequential damages
+ *  arising out of any use of the software or documentation, even if
+ *  advised of the possibility of such damage.
+ *
+ *  Permission is hereby granted to use, copy, modify, and distribute
+ *  this source code, or portions hereof, documentation and executables,
+ *  for any purpose, without fee, subject to the following restrictions:
+ *
+ *  1. The origin of this source code must not be misrepresented.
+ *  2. Altered versions must be plainly marked as such and must
+ *     not be misrepresented as being the original source.
+ *  3. This Copyright notice may not be removed or altered from any
+ *     source or altered source distribution.
+ * 
+ *  The copyright holders and contributing author(s) specifically
+ *  permit, without fee, and encourage the use of this source code
+ *  as a component for supporting the Hypertext Markup Language in
+ *  commercial products. If you use this source code in a product,
+ *  acknowledgment is not required but would be appreciated.
+ *
+ */
+package org.ajax4jsf.org.w3c.tidy;
+
+/**
+ * HTML Parser implementation.
+ * @author Dave Raggett <a href="mailto:dsr at w3.org">dsr at w3.org </a>
+ * @author Andy Quick <a href="mailto:ac.quick at sympatico.ca">ac.quick at sympatico.ca </a> (translation to Java)
+ * @author Fabrizio Giustina
+ * @version $Revision: 1.1.2.1 $ ($Author: alexsmirnov $)
+ */
+public final class ParserImpl
+{
+
+    /**
+     * parser for html.
+     */
+    public static final Parser HTML = new ParseHTML();
+
+    /**
+     * parser for head.
+     */
+    public static final Parser HEAD = new ParseHead();
+
+    /**
+     * parser for title.
+     */
+    public static final Parser TITLE = new ParseTitle();
+
+    /**
+     * parser for script.
+     */
+    public static final Parser SCRIPT = new ParseScript();
+
+    /**
+     * parser for body.
+     */
+    public static final Parser BODY = new ParseBody();
+
+    /**
+     * parser for frameset.
+     */
+    public static final Parser FRAMESET = new ParseFrameSet();
+
+    /**
+     * parser for inline.
+     */
+    public static final Parser INLINE = new ParseInline();
+
+    /**
+     * parser for list.
+     */
+    public static final Parser LIST = new ParseList();
+
+    /**
+     * parser for definition lists.
+     */
+    public static final Parser DEFLIST = new ParseDefList();
+
+    /**
+     * parser for pre.
+     */
+    public static final Parser PRE = new ParsePre();
+
+    /**
+     * parser for block elements.
+     */
+    public static final Parser BLOCK = new ParseBlock();
+
+    /**
+     * parser for table.
+     */
+    public static final Parser TABLETAG = new ParseTableTag();
+
+    /**
+     * parser for colgroup.
+     */
+    public static final Parser COLGROUP = new ParseColGroup();
+
+    /**
+     * parser for rowgroup.
+     */
+    public static final Parser ROWGROUP = new ParseRowGroup();
+
+    /**
+     * parser for row.
+     */
+    public static final Parser ROW = new ParseRow();
+
+    /**
+     * parser for noframes.
+     */
+    public static final Parser NOFRAMES = new ParseNoFrames();
+
+    /**
+     * parser for select.
+     */
+    public static final Parser SELECT = new ParseSelect();
+
+    /**
+     * parser for text.
+     */
+    public static final Parser TEXT = new ParseText();
+
+    /**
+     * parser for empty elements.
+     */
+    public static final Parser EMPTY = new ParseEmpty();
+
+    /**
+     * parser for optgroup.
+     */
+    public static final Parser OPTGROUP = new ParseOptGroup();
+
+    /**
+     * ParserImpl should not be instantiated.
+     */
+    private ParserImpl()
+    {
+        // unused
+    }
+
+    /**
+     * @param lexer
+     * @param node
+     * @param mode
+     */
+    protected static void parseTag(Lexer lexer, Node node, short mode)
+    {
+        // Fix by GLP 2000-12-21. Need to reset insertspace if this
+        // is both a non-inline and empty tag (base, link, meta, isindex, hr, area).
+        if ((node.tag.model & Dict.CM_EMPTY) != 0)
+        {
+            lexer.waswhite = false;
+        }
+        else if (!((node.tag.model & Dict.CM_INLINE) != 0))
+        {
+            lexer.insertspace = false;
+        }
+
+        if (node.tag.getParser() == null)
+        {
+            return;
+        }
+
+        if (node.type == Node.START_END_TAG)
+        {
+            Node.trimEmptyElement(lexer, node);
+            return;
+        }
+
+        node.tag.getParser().parse(lexer, node, mode);
+    }
+
+    /**
+     * Move node to the head, where element is used as starting point in hunt for head. Normally called during parsing.
+     * @param lexer
+     * @param element
+     * @param node
+     */
+    protected static void moveToHead(Lexer lexer, Node element, Node node)
+    {
+			Node head;
+			node.removeNode(); // make sure that node is isolated
+
+			TagTable tt = lexer.configuration.tt;
+
+			if (node.type == Node.START_TAG || node.type == Node.START_END_TAG) {
+				lexer.report.warning(lexer, element, node,
+						Report.TAG_NOT_ALLOWED_IN);
+// Parse node
+				if (node.tag.getParser() != null) {
+					parseTag(lexer, node, Lexer.IGNORE_WHITESPACE);
+				}
+				
+		        if (lexer.configuration.moveElements) {
+
+				while (element.tag != tt.tagHtml) {
+					element = element.parent;
+				}
+
+				for (head = element.content; head != null; head = head.next) {
+					if (head.tag == tt.tagHead) {
+						head.insertNodeAtEnd(node);
+						break;
+					}
+				}
+				} else {
+					element.insertNodeAtEnd(node);
+				}
+
+			} else {
+				lexer.report.warning(lexer, element, node,
+						Report.DISCARDING_UNEXPECTED);
+			}
+    }
+
+    /**
+     * moves given node to end of body element.
+     * @param lexer Lexer
+     * @param node Node to insert
+     */
+    static void moveNodeToBody(Lexer lexer, Node node)
+    {
+        if (lexer.configuration.moveElements) {
+			node.removeNode();
+			Node body = lexer.root.findBody(lexer.configuration.tt);
+			body.insertNodeAtEnd(node);
+		}
+    }
+
+    /**
+     * Parser for HTML.
+     */
+    public static class ParseHTML implements Parser
+    {
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.Parser#parse(org.ajax4jsf.org.w3c.tidy.Lexer, org.ajax4jsf.org.w3c.tidy.Node, short)
+         */
+        public void parse(Lexer lexer, Node html, short mode)
+        {
+            Node node, head;
+            Node frameset = null;
+            Node noframes = null;
+
+            lexer.configuration.xmlTags = false;
+            lexer.seenEndBody = false;
+            TagTable tt = lexer.configuration.tt;
+
+            while (true)
+            {
+                node = lexer.getToken(Lexer.IGNORE_WHITESPACE);
+
+                if (node == null)
+                {
+                    node = lexer.inferredTag("head");
+                    break;
+                }
+
+                if (node.tag == tt.tagHead)
+                {
+                    break;
+                }
+
+                if (node.tag == html.tag && node.type == Node.END_TAG)
+                {
+                    lexer.report.warning(lexer, html, node, Report.DISCARDING_UNEXPECTED);
+                    continue;
+                }
+
+                // deal with comments etc.
+                if (Node.insertMisc(html, node))
+                {
+                    continue;
+                }
+
+                lexer.ungetToken();
+                node = lexer.inferredTag("head");
+                break;
+            }
+
+            head = node;
+            html.insertNodeAtEnd(head);
+            HEAD.parse(lexer, head, mode);
+
+            while (true)
+            {
+                node = lexer.getToken(Lexer.IGNORE_WHITESPACE);
+
+                if (node == null)
+                {
+                    if (frameset == null)
+                    {
+                        // implied body
+                        node = lexer.inferredTag("body");
+                        html.insertNodeAtEnd(node);
+                        BODY.parse(lexer, node, mode);
+                    }
+
+                    return;
+                }
+
+                // robustly handle html tags
+                if (node.tag == html.tag)
+                {
+                    if (node.type != Node.START_TAG && frameset == null)
+                    {
+                        lexer.report.warning(lexer, html, node, Report.DISCARDING_UNEXPECTED);
+                    }
+                    else if (node.type == Node.END_TAG)
+                    {
+                        lexer.seenEndHtml = true;
+                    }
+
+                    continue;
+                }
+
+                // deal with comments etc.
+                if (Node.insertMisc(html, node))
+                {
+                    continue;
+                }
+
+                // if frameset document coerce <body> to <noframes>
+                if (node.tag == tt.tagBody)
+                {
+                    if (node.type != Node.START_TAG)
+                    {
+                        lexer.report.warning(lexer, html, node, Report.DISCARDING_UNEXPECTED);
+                        continue;
+                    }
+
+                    if (frameset != null)
+                    {
+                        lexer.ungetToken();
+
+                        if (noframes == null)
+                        {
+                            noframes = lexer.inferredTag("noframes");
+                            frameset.insertNodeAtEnd(noframes);
+                            lexer.report.warning(lexer, html, noframes, Report.INSERTING_TAG);
+                        }
+
+                        parseTag(lexer, noframes, mode);
+                        continue;
+                    }
+
+                    lexer.constrainVersion(~Dict.VERS_FRAMESET);
+                    break; // to parse body
+                }
+
+                // flag an error if we see more than one frameset
+                if (node.tag == tt.tagFrameset)
+                {
+                    if (node.type != Node.START_TAG)
+                    {
+                        lexer.report.warning(lexer, html, node, Report.DISCARDING_UNEXPECTED);
+                        continue;
+                    }
+
+                    if (frameset != null)
+                    {
+                        lexer.report.error(lexer, html, node, Report.DUPLICATE_FRAMESET);
+                    }
+                    else
+                    {
+                        frameset = node;
+                    }
+
+                    html.insertNodeAtEnd(node);
+                    parseTag(lexer, node, mode);
+
+                    // see if it includes a noframes element so that we can merge subsequent noframes elements
+
+                    for (node = frameset.content; node != null; node = node.next)
+                    {
+                        if (node.tag == tt.tagNoframes)
+                        {
+                            noframes = node;
+                        }
+                    }
+                    continue;
+                }
+
+                // if not a frameset document coerce <noframes> to <body>
+                if (node.tag == tt.tagNoframes)
+                {
+                    if (node.type != Node.START_TAG)
+                    {
+                        lexer.report.warning(lexer, html, node, Report.DISCARDING_UNEXPECTED);
+                        continue;
+                    }
+
+                    if (frameset == null)
+                    {
+                        lexer.report.warning(lexer, html, node, Report.DISCARDING_UNEXPECTED);
+                        node = lexer.inferredTag("body");
+                        break;
+                    }
+
+                    if (noframes == null)
+                    {
+                        noframes = node;
+                        frameset.insertNodeAtEnd(noframes);
+                    }
+
+                    parseTag(lexer, noframes, mode);
+                    continue;
+                }
+
+                if (node.type == Node.START_TAG || node.type == Node.START_END_TAG)
+                {
+                    if (node.tag != null && (node.tag.model & Dict.CM_HEAD) != 0)
+                    {
+                        moveToHead(lexer, html, node);
+                        continue;
+                    }
+
+                    // #427675 - discard illegal frame element following a frameset - fix by Randy Waki 11 Oct 00
+                    if (frameset != null && node.tag == tt.tagFrame)
+                    {
+                        lexer.report.warning(lexer, html, node, Report.DISCARDING_UNEXPECTED);
+                        continue;
+                    }
+                }
+
+                lexer.ungetToken();
+
+                // insert other content into noframes element
+                if (frameset != null)
+                {
+                    if (noframes == null)
+                    {
+                        noframes = lexer.inferredTag("noframes");
+                        frameset.insertNodeAtEnd(noframes);
+                    }
+                    else
+                    {
+                        lexer.report.warning(lexer, html, node, Report.NOFRAMES_CONTENT);
+                    }
+
+                    lexer.constrainVersion(Dict.VERS_FRAMESET);
+                    parseTag(lexer, noframes, mode);
+                    continue;
+                }
+
+                node = lexer.inferredTag("body");
+                lexer.constrainVersion(~Dict.VERS_FRAMESET);
+                break;
+            }
+
+            // node must be body
+            html.insertNodeAtEnd(node);
+            parseTag(lexer, node, mode);
+            lexer.seenEndHtml = true;
+        }
+
+    }
+
+    /**
+     * Parser for HEAD.
+     */
+    public static class ParseHead implements Parser
+    {
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.Parser#parse(org.ajax4jsf.org.w3c.tidy.Lexer, org.ajax4jsf.org.w3c.tidy.Node, short)
+         */
+        public void parse(Lexer lexer, Node head, short mode)
+        {
+            Node node;
+            int hasTitle = 0;
+            int hasBase = 0;
+            TagTable tt = lexer.configuration.tt;
+
+            while ((node = lexer.getToken(Lexer.IGNORE_WHITESPACE)) != null)
+            {
+                if (node.tag == head.tag && node.type == Node.END_TAG)
+                {
+                    head.closed = true;
+                    break;
+                }
+
+                if (node.type == Node.TEXT_NODE)
+                {
+                    lexer.report.warning(lexer, head, node, Report.TAG_NOT_ALLOWED_IN);
+                    lexer.ungetToken();
+                    break;
+                }
+
+                // deal with comments etc.
+                if (Node.insertMisc(head, node))
+                {
+                    continue;
+                }
+
+                if (node.type == Node.DOCTYPE_TAG)
+                {
+                    Node.insertDocType(lexer, head, node);
+                    continue;
+                }
+
+                // discard unknown tags
+                if (node.tag == null)
+                {
+                    lexer.report.warning(lexer, head, node, Report.DISCARDING_UNEXPECTED);
+                    continue;
+                }
+
+                if (!TidyUtils.toBoolean(node.tag.model & Dict.CM_HEAD))
+                {
+                    // #545067 Implicit closing of head broken - warn only for XHTML input
+                    if (lexer.isvoyager)
+                    {
+                        lexer.report.warning(lexer, head, node, Report.TAG_NOT_ALLOWED_IN);
+                    }
+                    lexer.ungetToken();
+                    break;
+                }
+
+                if (node.type == Node.START_TAG || node.type == Node.START_END_TAG)
+                {
+                    if (node.tag == tt.tagTitle)
+                    {
+                        ++hasTitle;
+
+                        if (hasTitle > 1)
+                        {
+                            lexer.report.warning(lexer, head, node, Report.TOO_MANY_ELEMENTS);
+                        }
+                    }
+                    else if (node.tag == tt.tagBase)
+                    {
+                        ++hasBase;
+
+                        if (hasBase > 1)
+                        {
+                            lexer.report.warning(lexer, head, node, Report.TOO_MANY_ELEMENTS);
+                        }
+                    }
+                    else if (node.tag == tt.tagNoscript)
+                    {
+                        lexer.report.warning(lexer, head, node, Report.TAG_NOT_ALLOWED_IN);
+                    }
+
+                    head.insertNodeAtEnd(node);
+                    parseTag(lexer, node, Lexer.IGNORE_WHITESPACE);
+                    continue;
+                }
+
+                // discard unexpected text nodes and end tags
+                lexer.report.warning(lexer, head, node, Report.DISCARDING_UNEXPECTED);
+            }
+
+            if (hasTitle == 0)
+            {
+                if (!lexer.configuration.bodyOnly)
+                {
+                    lexer.report.warning(lexer, head, null, Report.MISSING_TITLE_ELEMENT);
+                }
+                head.insertNodeAtEnd(lexer.inferredTag("title"));
+            }
+        }
+
+    }
+
+    /**
+     * Parser for TITLE.
+     */
+    public static class ParseTitle implements Parser
+    {
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.Parser#parse(org.ajax4jsf.org.w3c.tidy.Lexer, org.ajax4jsf.org.w3c.tidy.Node, short)
+         */
+        public void parse(Lexer lexer, Node title, short mode)
+        {
+            Node node;
+
+            while ((node = lexer.getToken(Lexer.MIXED_CONTENT)) != null)
+            {
+                // [438658] : Missing / in title endtag makes 2 titles
+                if (node.tag == title.tag && node.type == Node.START_TAG)
+                {
+                    lexer.report.warning(lexer, title, node, Report.COERCE_TO_ENDTAG);
+                    node.type = Node.END_TAG;
+                    continue;
+                }
+                else if (node.tag == title.tag && node.type == Node.END_TAG)
+                {
+                    title.closed = true;
+                    Node.trimSpaces(lexer, title);
+                    return;
+                }
+
+                if (node.type == Node.TEXT_NODE)
+                {
+                    // only called for 1st child
+                    if (title.content == null)
+                    {
+                        Node.trimInitialSpace(lexer, title, node);
+                    }
+
+                    if (node.start >= node.end)
+                    {
+                        continue;
+                    }
+
+                    title.insertNodeAtEnd(node);
+                    continue;
+                }
+
+                // deal with comments etc.
+                if (Node.insertMisc(title, node))
+                {
+                    continue;
+                }
+
+                // discard unknown tags
+                if (node.tag == null)
+                {
+                    lexer.report.warning(lexer, title, node, Report.DISCARDING_UNEXPECTED);
+                    continue;
+                }
+
+                // pushback unexpected tokens
+                lexer.report.warning(lexer, title, node, Report.MISSING_ENDTAG_BEFORE);
+                lexer.ungetToken();
+                Node.trimSpaces(lexer, title);
+                return;
+            }
+
+            lexer.report.warning(lexer, title, node, Report.MISSING_ENDTAG_FOR);
+        }
+
+    }
+
+    /**
+     * Parser for SCRIPT.
+     */
+    public static class ParseScript implements Parser
+    {
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.Parser#parse(org.ajax4jsf.org.w3c.tidy.Lexer, org.ajax4jsf.org.w3c.tidy.Node, short)
+         */
+        public void parse(Lexer lexer, Node script, short mode)
+        {
+            // This isn't quite right for CDATA content as it recognises tags within the content and parses them
+            // accordingly. This will unfortunately screw up scripts which include < + letter, < + !, < + ? or < + / +
+            // letter
+
+            Node node = lexer.getCDATA(script);
+
+            if (node != null)
+            {
+                script.insertNodeAtEnd(node);
+            }
+        }
+
+    }
+
+    /**
+     * Parser for BODY.
+     */
+    public static class ParseBody implements Parser
+    {
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.Parser#parse(org.ajax4jsf.org.w3c.tidy.Lexer, org.ajax4jsf.org.w3c.tidy.Node, short)
+         */
+        public void parse(Lexer lexer, Node body, short mode)
+        {
+            Node node;
+            boolean checkstack, iswhitenode;
+
+            mode = Lexer.IGNORE_WHITESPACE;
+            checkstack = true;
+            TagTable tt = lexer.configuration.tt;
+
+            Clean.bumpObject(lexer, body.parent);
+
+            while ((node = lexer.getToken(mode)) != null)
+            {
+
+                // #538536 Extra endtags not detected
+                if (node.tag == tt.tagHtml)
+                {
+                    if (node.type == Node.START_TAG || node.type == Node.START_END_TAG || lexer.seenEndHtml)
+                    {
+                        lexer.report.warning(lexer, body, node, Report.DISCARDING_UNEXPECTED);
+                    }
+                    else
+                    {
+                        lexer.seenEndHtml = true;
+                    }
+
+                    continue;
+                }
+
+                if (lexer.seenEndBody
+                    && (node.type == Node.START_TAG || node.type == Node.END_TAG || node.type == Node.START_END_TAG))
+                {
+                    lexer.report.warning(lexer, body, node, Report.CONTENT_AFTER_BODY);
+                }
+
+                if (node.tag == body.tag && node.type == Node.END_TAG)
+                {
+                    body.closed = true;
+                    Node.trimSpaces(lexer, body);
+                    lexer.seenEndBody = true;
+                    mode = Lexer.IGNORE_WHITESPACE;
+
+                    if (body.parent.tag == tt.tagNoframes)
+                    {
+                        break;
+                    }
+
+                    continue;
+                }
+
+                if (node.tag == tt.tagNoframes)
+                {
+                    if (node.type == Node.START_TAG)
+                    {
+                        body.insertNodeAtEnd(node);
+                        BLOCK.parse(lexer, node, mode);
+                        continue;
+                    }
+
+                    if (node.type == Node.END_TAG && body.parent.tag == tt.tagNoframes)
+                    {
+                        Node.trimSpaces(lexer, body);
+                        lexer.ungetToken();
+                        break;
+                    }
+                }
+
+                if ((node.tag == tt.tagFrame || node.tag == tt.tagFrameset) && body.parent.tag == tt.tagNoframes)
+                {
+                    Node.trimSpaces(lexer, body);
+                    lexer.ungetToken();
+                    break;
+                }
+
+                iswhitenode = false;
+
+                if (node.type == Node.TEXT_NODE
+                    && node.end <= node.start + 1
+                    && node.textarray[node.start] == (byte) ' ')
+                {
+                    iswhitenode = true;
+                }
+
+                // deal with comments etc.
+                if (Node.insertMisc(body, node))
+                {
+                    continue;
+                }
+
+                // #538536 Extra endtags not detected
+                // if (lexer.seenEndBody && !iswhitenode)
+                // {
+                //     lexer.seenEndBody = true;
+                //     lexer.report.warning(lexer, body, node, Report.CONTENT_AFTER_BODY);
+                // }
+
+                // mixed content model permits text
+                if (node.type == Node.TEXT_NODE)
+                {
+                    if (iswhitenode && mode == Lexer.IGNORE_WHITESPACE)
+                    {
+                        continue;
+                    }
+
+                    if (lexer.configuration.encloseBodyText && !iswhitenode)
+                    {
+                        Node para;
+
+                        lexer.ungetToken();
+                        para = lexer.inferredTag("p");
+                        body.insertNodeAtEnd(para);
+                        parseTag(lexer, para, mode);
+                        mode = Lexer.MIXED_CONTENT;
+                        continue;
+                    }
+
+                    //  HTML2 and HTML4 strict doesn't allow text here
+                    lexer.constrainVersion(~(Dict.VERS_HTML40_STRICT | Dict.VERS_HTML20));
+
+                    if (checkstack)
+                    {
+                        checkstack = false;
+
+                        if (lexer.inlineDup(node) > 0)
+                        {
+                            continue;
+                        }
+                    }
+
+                    body.insertNodeAtEnd(node);
+                    mode = Lexer.MIXED_CONTENT;
+                    continue;
+                }
+
+                if (node.type == Node.DOCTYPE_TAG)
+                {
+                    Node.insertDocType(lexer, body, node);
+                    continue;
+                }
+                // discard unknown and PARAM tags
+                if (node.tag == null || node.tag == tt.tagParam)
+                {
+                    lexer.report.warning(lexer, body, node, Report.DISCARDING_UNEXPECTED);
+                    continue;
+                }
+
+                // Netscape allows LI and DD directly in BODY We infer UL or DL respectively and use this boolean to
+                // exclude block-level elements so as to match Netscape's observed behaviour.
+
+                lexer.excludeBlocks = false;
+
+                if ((!((node.tag.model & Dict.CM_BLOCK) != 0) && !((node.tag.model & Dict.CM_INLINE) != 0))
+                    || node.tag == tt.tagInput)
+                {
+                    // avoid this error message being issued twice
+                    if (!((node.tag.model & Dict.CM_HEAD) != 0))
+                    {
+                        lexer.report.warning(lexer, body, node, Report.TAG_NOT_ALLOWED_IN);
+                    }
+
+                    if ((node.tag.model & Dict.CM_HTML) != 0)
+                    {
+                        // copy body attributes if current body was inferred
+                        if (node.tag == tt.tagBody && body.implicit && body.attributes == null)
+                        {
+                            body.attributes = node.attributes;
+                            node.attributes = null;
+                        }
+
+                        continue;
+                    }
+
+                    if ((node.tag.model & Dict.CM_HEAD) != 0)
+                    {
+                        moveToHead(lexer, body, node);
+                        continue;
+                    }
+
+                    if ((node.tag.model & Dict.CM_LIST) != 0)
+                    {
+                        lexer.ungetToken();
+                        node = lexer.inferredTag("ul");
+                        node.addClass("noindent");
+                        lexer.excludeBlocks = true;
+                    }
+                    else if ((node.tag.model & Dict.CM_DEFLIST) != 0)
+                    {
+                        lexer.ungetToken();
+                        node = lexer.inferredTag("dl");
+                        lexer.excludeBlocks = true;
+                    }
+                    else if ((node.tag.model & (Dict.CM_TABLE | Dict.CM_ROWGRP | Dict.CM_ROW)) != 0)
+                    {
+                        lexer.ungetToken();
+                        node = lexer.inferredTag("table");
+                        lexer.excludeBlocks = true;
+                    }
+                    // Changed by Asmirnov - exclude empty <form> inserting
+                    else if (node.tag == tt.tagInput)
+                    {
+                        // lexer.ungetToken();
+                    	// node = lexer.inferredTag("form");
+                        lexer.excludeBlocks = true;
+                    }
+                    else
+                    {
+                        if (!((node.tag.model & (Dict.CM_ROW | Dict.CM_FIELD)) != 0))
+                        {
+                            lexer.ungetToken();
+                            return;
+                        }
+
+                        // ignore </td></th> <option> etc.
+                        continue;
+                    }
+                }
+
+                if (node.type == Node.END_TAG)
+                {
+                    if (node.tag == tt.tagBr)
+                    {
+                        node.type = Node.START_TAG;
+                    }
+                    else if (node.tag == tt.tagP)
+                    {
+                        Node.coerceNode(lexer, node, tt.tagBr);
+                        body.insertNodeAtEnd(node);
+                        node = lexer.inferredTag("br");
+                    }
+                    else if ((node.tag.model & Dict.CM_INLINE) != 0)
+                    {
+                        lexer.popInline(node);
+                    }
+                }
+
+                if (node.type == Node.START_TAG || node.type == Node.START_END_TAG)
+                {
+                    if (((node.tag.model & Dict.CM_INLINE) != 0) && !((node.tag.model & Dict.CM_MIXED) != 0))
+                    {
+                        // HTML4 strict doesn't allow inline content here
+                        // but HTML2 does allow img elements as children of body
+                        if (node.tag == tt.tagImg)
+                        {
+                            lexer.constrainVersion(~Dict.VERS_HTML40_STRICT);
+                        }
+                        else
+                        {
+                            lexer.constrainVersion(~(Dict.VERS_HTML40_STRICT | Dict.VERS_HTML20));
+                        }
+
+                        if (checkstack && !node.implicit)
+                        {
+                            checkstack = false;
+
+                            if (lexer.inlineDup(node) > 0)
+                            {
+                                continue;
+                            }
+                        }
+
+                        mode = Lexer.MIXED_CONTENT;
+                    }
+                    else
+                    {
+                        checkstack = true;
+                        mode = Lexer.IGNORE_WHITESPACE;
+                    }
+
+                    if (node.implicit)
+                    {
+                        lexer.report.warning(lexer, body, node, Report.INSERTING_TAG);
+                    }
+
+                    body.insertNodeAtEnd(node);
+                    parseTag(lexer, node, mode);
+                    continue;
+                }
+
+                // discard unexpected tags
+                lexer.report.warning(lexer, body, node, Report.DISCARDING_UNEXPECTED);
+            }
+        }
+
+    }
+
+    /**
+     * Parser for FRAMESET.
+     */
+    public static class ParseFrameSet implements Parser
+    {
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.Parser#parse(org.ajax4jsf.org.w3c.tidy.Lexer, org.ajax4jsf.org.w3c.tidy.Node, short)
+         */
+        public void parse(Lexer lexer, Node frameset, short mode)
+        {
+            Node node;
+            TagTable tt = lexer.configuration.tt;
+
+            lexer.badAccess |= Report.USING_FRAMES;
+
+            while ((node = lexer.getToken(Lexer.IGNORE_WHITESPACE)) != null)
+            {
+                if (node.tag == frameset.tag && node.type == Node.END_TAG)
+                {
+                    frameset.closed = true;
+                    Node.trimSpaces(lexer, frameset);
+                    return;
+                }
+
+                // deal with comments etc.
+                if (Node.insertMisc(frameset, node))
+                {
+                    continue;
+                }
+
+                if (node.tag == null)
+                {
+                    lexer.report.warning(lexer, frameset, node, Report.DISCARDING_UNEXPECTED);
+                    continue;
+                }
+
+                if (node.type == Node.START_TAG || node.type == Node.START_END_TAG)
+                {
+                    if (node.tag != null && (node.tag.model & Dict.CM_HEAD) != 0)
+                    {
+                        moveToHead(lexer, frameset, node);
+                        continue;
+                    }
+                }
+
+                if (node.tag == tt.tagBody)
+                {
+                    lexer.ungetToken();
+                    node = lexer.inferredTag("noframes");
+                    lexer.report.warning(lexer, frameset, node, Report.INSERTING_TAG);
+                }
+
+                if (node.type == Node.START_TAG && (node.tag.model & Dict.CM_FRAMES) != 0)
+                {
+                    frameset.insertNodeAtEnd(node);
+                    lexer.excludeBlocks = false;
+                    parseTag(lexer, node, Lexer.MIXED_CONTENT);
+                    continue;
+                }
+                else if (node.type == Node.START_END_TAG && (node.tag.model & Dict.CM_FRAMES) != 0)
+                {
+                    frameset.insertNodeAtEnd(node);
+                    continue;
+                }
+
+                // discard unexpected tags
+                lexer.report.warning(lexer, frameset, node, Report.DISCARDING_UNEXPECTED);
+            }
+
+            lexer.report.warning(lexer, frameset, node, Report.MISSING_ENDTAG_FOR);
+        }
+
+    }
+
+    /**
+     * Parser for INLINE.
+     */
+    public static class ParseInline implements Parser
+    {
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.Parser#parse(org.ajax4jsf.org.w3c.tidy.Lexer, org.ajax4jsf.org.w3c.tidy.Node, short)
+         */
+        public void parse(Lexer lexer, Node element, short mode)
+        {
+            Node node, parent;
+            TagTable tt = lexer.configuration.tt;
+
+            if (TidyUtils.toBoolean(element.tag.model & Dict.CM_EMPTY))
+            {
+                return;
+            }
+
+            // ParseInline is used for some block level elements like H1 to H6 For such elements we need to insert
+            // inline emphasis tags currently on the inline stack. For Inline elements, we normally push them onto the
+            // inline stack provided they aren't implicit or OBJECT/APPLET. This test is carried out in PushInline and
+            // PopInline, see istack.c We don't push SPAN to replicate current browser behavior
+
+            if (TidyUtils.toBoolean(element.tag.model & Dict.CM_BLOCK) || (element.tag == tt.tagDt))
+            {
+                lexer.inlineDup(null);
+            }
+            else if (TidyUtils.toBoolean(element.tag.model & Dict.CM_INLINE) && element.tag != tt.tagSpan )
+            {
+                // && element.tag != tt.tagSpan #540571 Inconsistent behaviour with span inline element
+                lexer.pushInline(element);
+            }
+
+            if (element.tag == tt.tagNobr)
+            {
+                lexer.badLayout |= Report.USING_NOBR;
+            }
+            else if (element.tag == tt.tagFont)
+            {
+                lexer.badLayout |= Report.USING_FONT;
+            }
+
+            // Inline elements may or may not be within a preformatted element
+            if (mode != Lexer.PREFORMATTED)
+            {
+                mode = Lexer.MIXED_CONTENT;
+            }
+
+            while ((node = lexer.getToken(mode)) != null)
+            {
+                // end tag for current element
+                if (node.tag == element.tag && node.type == Node.END_TAG)
+                {
+                    if (TidyUtils.toBoolean(element.tag.model & Dict.CM_INLINE))
+                    {
+                        lexer.popInline(node);
+                    }
+
+                    if (!TidyUtils.toBoolean(mode & Lexer.PREFORMATTED))
+                    {
+                        Node.trimSpaces(lexer, element);
+                    }
+
+                    // if a font element wraps an anchor and nothing else then move the font element inside the anchor
+                    // since otherwise it won't alter the anchor text color
+
+                    if (element.tag == tt.tagFont && element.content != null && element.content == element.last)
+                    {
+                        Node child = element.content;
+
+                        if (child.tag == tt.tagA)
+                        {
+                            child.parent = element.parent;
+                            child.next = element.next;
+                            child.prev = element.prev;
+
+                            if (child.prev != null)
+                            {
+                                child.prev.next = child;
+                            }
+                            else
+                            {
+                                child.parent.content = child;
+                            }
+
+                            if (child.next != null)
+                            {
+                                child.next.prev = child;
+                            }
+                            else
+                            {
+                                child.parent.last = child;
+                            }
+
+                            element.next = null;
+                            element.prev = null;
+                            element.parent = child;
+                            element.content = child.content;
+                            element.last = child.last;
+                            child.content = element;
+                            child.last = element;
+                            for (child = element.content; child != null; child = child.next)
+                            {
+                                child.parent = element;
+                            }
+                        }
+                    }
+                    element.closed = true;
+                    Node.trimSpaces(lexer, element);
+                    Node.trimEmptyElement(lexer, element);
+                    return;
+                }
+
+                // <u> ... <u> map 2nd <u> to </u> if 1st is explicit
+                // otherwise emphasis nesting is probably unintentional
+                // big and small have cumulative effect to leave them alone
+                if (node.type == Node.START_TAG
+                    && node.tag == element.tag
+                    && lexer.isPushed(node)
+                    && !node.implicit
+                    && !element.implicit
+                    && node.tag != null
+                    && ((node.tag.model & Dict.CM_INLINE) != 0)
+                    && node.tag != tt.tagA
+                    && node.tag != tt.tagFont
+                    && node.tag != tt.tagBig
+                    && node.tag != tt.tagSmall
+                    && node.tag != tt.tagQ)
+                {
+                    if (element.content != null && node.attributes == null)
+                    {
+                        lexer.report.warning(lexer, element, node, Report.COERCE_TO_ENDTAG);
+                        node.type = Node.END_TAG;
+                        lexer.ungetToken();
+                        continue;
+                    }
+
+                    lexer.report.warning(lexer, element, node, Report.NESTED_EMPHASIS);
+                }
+                else if (lexer.isPushed(node) && node.type == Node.START_TAG && node.tag == tt.tagQ)
+                {
+                    lexer.report.warning(lexer, element, node, Report.NESTED_QUOTATION);
+                }
+
+                if (node.type == Node.TEXT_NODE)
+                {
+                    // only called for 1st child
+                    if (element.content == null && !TidyUtils.toBoolean(mode & Lexer.PREFORMATTED))
+                    {
+                        Node.trimSpaces(lexer, element);
+                    }
+
+                    if (node.start >= node.end)
+                    {
+                        continue;
+                    }
+
+                    element.insertNodeAtEnd(node);
+                    continue;
+                }
+
+                // mixed content model so allow text
+                if (Node.insertMisc(element, node))
+                {
+                    continue;
+                }
+
+                // deal with HTML tags
+                if (node.tag == tt.tagHtml)
+                {
+                    if (node.type == Node.START_TAG || node.type == Node.START_END_TAG)
+                    {
+                        lexer.report.warning(lexer, element, node, Report.DISCARDING_UNEXPECTED);
+                        continue;
+                    }
+
+                    // otherwise infer end of inline element
+                    lexer.ungetToken();
+                    if (!((mode & Lexer.PREFORMATTED) != 0))
+                    {
+                        Node.trimSpaces(lexer, element);
+                    }
+                    Node.trimEmptyElement(lexer, element);
+                    return;
+                }
+
+                // within <dt> or <pre> map <p> to <br>
+                if (node.tag == tt.tagP
+                    && node.type == Node.START_TAG
+                    && ((mode & Lexer.PREFORMATTED) != 0 || element.tag == tt.tagDt || element.isDescendantOf(tt.tagDt)))
+                {
+                    node.tag = tt.tagBr;
+                    node.element = "br";
+                    Node.trimSpaces(lexer, element);
+                    element.insertNodeAtEnd(node);
+                    continue;
+                }
+
+                // ignore unknown and PARAM tags
+                if (node.tag == null || node.tag == tt.tagParam)
+                {
+                    lexer.report.warning(lexer, element, node, Report.DISCARDING_UNEXPECTED);
+                    continue;
+                }
+
+                if (node.tag == tt.tagBr && node.type == Node.END_TAG)
+                {
+                    node.type = Node.START_TAG;
+                }
+
+                if (node.type == Node.END_TAG)
+                {
+                    // coerce </br> to <br>
+                    if (node.tag == tt.tagBr)
+                    {
+                        node.type = Node.START_TAG;
+                    }
+                    else if (node.tag == tt.tagP)
+                    {
+                        // coerce unmatched </p> to <br><br>
+                        if (!element.isDescendantOf(tt.tagP))
+                        {
+                            Node.coerceNode(lexer, node, tt.tagBr);
+                            Node.trimSpaces(lexer, element);
+                            element.insertNodeAtEnd(node);
+                            node = lexer.inferredTag("br");
+                            continue;
+                        }
+                    }
+                    else if ((node.tag.model & Dict.CM_INLINE) != 0
+                        && node.tag != tt.tagA
+                        && !((node.tag.model & Dict.CM_OBJECT) != 0)
+                        && (element.tag.model & Dict.CM_INLINE) != 0)
+                    {
+                        // allow any inline end tag to end current element
+                        lexer.popInline(element);
+
+                        if (element.tag != tt.tagA)
+                        {
+                            if (node.tag == tt.tagA && node.tag != element.tag)
+                            {
+                                lexer.report.warning(lexer, element, node, Report.MISSING_ENDTAG_BEFORE);
+                                lexer.ungetToken();
+                            }
+                            else
+                            {
+                                lexer.report.warning(lexer, element, node, Report.NON_MATCHING_ENDTAG);
+                            }
+
+                            if (!((mode & Lexer.PREFORMATTED) != 0))
+                            {
+                                Node.trimSpaces(lexer, element);
+                            }
+                            Node.trimEmptyElement(lexer, element);
+                            return;
+                        }
+
+                        // if parent is <a> then discard unexpected inline end tag
+                        lexer.report.warning(lexer, element, node, Report.DISCARDING_UNEXPECTED);
+                        continue;
+                    } // special case </tr> etc. for stuff moved in front of table
+                    else if (lexer.exiled && node.tag.model != 0 && (node.tag.model & Dict.CM_TABLE) != 0)
+                    {
+                        lexer.ungetToken();
+                        Node.trimSpaces(lexer, element);
+                        Node.trimEmptyElement(lexer, element);
+                        return;
+                    }
+                }
+
+                // allow any header tag to end current header
+                if ((node.tag.model & Dict.CM_HEADING) != 0 && (element.tag.model & Dict.CM_HEADING) != 0)
+                {
+                    if (node.tag == element.tag)
+                    {
+                        lexer.report.warning(lexer, element, node, Report.NON_MATCHING_ENDTAG);
+                    }
+                    else
+                    {
+                        lexer.report.warning(lexer, element, node, Report.MISSING_ENDTAG_BEFORE);
+                        lexer.ungetToken();
+                    }
+                    if (!((mode & Lexer.PREFORMATTED) != 0))
+                    {
+                        Node.trimSpaces(lexer, element);
+                    }
+                    Node.trimEmptyElement(lexer, element);
+                    return;
+                }
+
+                // an <A> tag to ends any open <A> element but <A href=...> is mapped to </A><A href=...>
+
+                // #427827 - fix by Randy Waki and Bjoern Hoehrmann 23 Aug 00
+                // if (node.tag == tt.tagA && !node.implicit && lexer.isPushed(node))
+                if (node.tag == tt.tagA
+                    && !node.implicit
+                    && (element.tag == tt.tagA || element.isDescendantOf(tt.tagA)))
+                {
+                    // coerce <a> to </a> unless it has some attributes
+                    // #427827 - fix by Randy Waki and Bjoern Hoehrmann 23 Aug 00
+                    // other fixes by Dave Raggett
+                    // if (node.attributes == null)
+                    if (node.type != Node.END_TAG && node.attributes == null)
+                    {
+                        node.type = Node.END_TAG;
+                        lexer.report.warning(lexer, element, node, Report.COERCE_TO_ENDTAG);
+                        // lexer.popInline(node);
+                        lexer.ungetToken();
+                        continue;
+                    }
+
+                    lexer.ungetToken();
+                    lexer.report.warning(lexer, element, node, Report.MISSING_ENDTAG_BEFORE);
+                    // lexer.popInline(element);
+                    if (!((mode & Lexer.PREFORMATTED) != 0))
+                    {
+                        Node.trimSpaces(lexer, element);
+                    }
+                    Node.trimEmptyElement(lexer, element);
+                    return;
+                }
+
+                if ((element.tag.model & Dict.CM_HEADING) != 0)
+                {
+                    if (node.tag == tt.tagCenter || node.tag == tt.tagDiv)
+                    {
+                        if (node.type != Node.START_TAG && node.type != Node.START_END_TAG)
+                        {
+                            lexer.report.warning(lexer, element, node, Report.DISCARDING_UNEXPECTED);
+                            continue;
+                        }
+
+                        lexer.report.warning(lexer, element, node, Report.TAG_NOT_ALLOWED_IN);
+
+                        // insert center as parent if heading is empty
+                        if (element.content == null)
+                        {
+                            Node.insertNodeAsParent(element, node);
+                            continue;
+                        }
+
+                        // split heading and make center parent of 2nd part
+                        element.insertNodeAfterElement(node);
+
+                        if (!((mode & Lexer.PREFORMATTED) != 0))
+                        {
+                            Node.trimSpaces(lexer, element);
+                        }
+
+                        element = lexer.cloneNode(element);
+                        element.start = lexer.lexsize;
+                        element.end = lexer.lexsize;
+                        node.insertNodeAtEnd(element);
+                        continue;
+                    }
+
+                    if (node.tag == tt.tagHr)
+                    {
+                        if (node.type != Node.START_TAG && node.type != Node.START_END_TAG)
+                        {
+                            lexer.report.warning(lexer, element, node, Report.DISCARDING_UNEXPECTED);
+                            continue;
+                        }
+
+                        lexer.report.warning(lexer, element, node, Report.TAG_NOT_ALLOWED_IN);
+
+                        // insert hr before heading if heading is empty
+                        if (element.content == null)
+                        {
+                            Node.insertNodeBeforeElement(element, node);
+                            continue;
+                        }
+
+                        // split heading and insert hr before 2nd part
+                        element.insertNodeAfterElement(node);
+
+                        if (!((mode & Lexer.PREFORMATTED) != 0))
+                        {
+                            Node.trimSpaces(lexer, element);
+                        }
+
+                        element = lexer.cloneNode(element);
+                        element.start = lexer.lexsize;
+                        element.end = lexer.lexsize;
+                        node.insertNodeAfterElement(element);
+                        continue;
+                    }
+                }
+
+                if (element.tag == tt.tagDt)
+                {
+                    if (node.tag == tt.tagHr)
+                    {
+                        Node dd;
+
+                        if (node.type != Node.START_TAG && node.type != Node.START_END_TAG)
+                        {
+                            lexer.report.warning(lexer, element, node, Report.DISCARDING_UNEXPECTED);
+                            continue;
+                        }
+
+                        lexer.report.warning(lexer, element, node, Report.TAG_NOT_ALLOWED_IN);
+                        dd = lexer.inferredTag("dd");
+
+                        // insert hr within dd before dt if dt is empty
+                        if (element.content == null)
+                        {
+                            Node.insertNodeBeforeElement(element, dd);
+                            dd.insertNodeAtEnd(node);
+                            continue;
+                        }
+
+                        // split dt and insert hr within dd before 2nd part
+                        element.insertNodeAfterElement(dd);
+                        dd.insertNodeAtEnd(node);
+
+                        if (!((mode & Lexer.PREFORMATTED) != 0))
+                        {
+                            Node.trimSpaces(lexer, element);
+                        }
+
+                        element = lexer.cloneNode(element);
+                        element.start = lexer.lexsize;
+                        element.end = lexer.lexsize;
+                        dd.insertNodeAfterElement(element);
+                        continue;
+                    }
+                }
+
+                // if this is the end tag for an ancestor element then infer end tag for this element
+
+                if (node.type == Node.END_TAG)
+                {
+                    for (parent = element.parent; parent != null; parent = parent.parent)
+                    {
+                        if (node.tag == parent.tag)
+                        {
+                            if (!((element.tag.model & Dict.CM_OPT) != 0) && !element.implicit)
+                            {
+                                lexer.report.warning(lexer, element, node, Report.MISSING_ENDTAG_BEFORE);
+                            }
+
+                            if (element.tag == tt.tagA)
+                            {
+                                lexer.popInline(element);
+                            }
+
+                            lexer.ungetToken();
+
+                            if (!((mode & Lexer.PREFORMATTED) != 0))
+                            {
+                                Node.trimSpaces(lexer, element);
+                            }
+
+                            Node.trimEmptyElement(lexer, element);
+                            return;
+                        }
+                    }
+                }
+
+                // block level tags end this element, expect span - used jsf for mark facets and groups.
+                if (!((node.tag.model & Dict.CM_INLINE) != 0) && element.tag != tt.tagSpan)
+                {
+                    if (node.type != Node.START_TAG)
+                    {
+                        lexer.report.warning(lexer, element, node, Report.DISCARDING_UNEXPECTED);
+                        continue;
+                    }
+
+                    if (!((element.tag.model & Dict.CM_OPT) != 0))
+                    {
+                        lexer.report.warning(lexer, element, node, Report.MISSING_ENDTAG_BEFORE);
+                    }
+
+                    if ((node.tag.model & Dict.CM_HEAD) != 0 && !((node.tag.model & Dict.CM_BLOCK) != 0))
+                    {
+                        moveToHead(lexer, element, node);
+                        continue;
+                    }
+
+                    // prevent anchors from propagating into block tags except for headings h1 to h6
+
+                    if (element.tag == tt.tagA)
+                    {
+                        if (node.tag != null && !((node.tag.model & Dict.CM_HEADING) != 0))
+                        {
+                            lexer.popInline(element);
+                        }
+                        else if (!(element.content != null))
+                        {
+                            Node.discardElement(element);
+                            lexer.ungetToken();
+                            return;
+                        }
+                    }
+
+                    lexer.ungetToken();
+
+                    if (!((mode & Lexer.PREFORMATTED) != 0))
+                    {
+                        Node.trimSpaces(lexer, element);
+                    }
+
+                    Node.trimEmptyElement(lexer, element);
+                    return;
+                }
+
+                // parse inline element
+                if (node.type == Node.START_TAG || node.type == Node.START_END_TAG)
+                {
+                    if (node.implicit)
+                    {
+                        lexer.report.warning(lexer, element, node, Report.INSERTING_TAG);
+                    }
+
+                    // trim white space before <br>
+                    if (node.tag == tt.tagBr)
+                    {
+                        Node.trimSpaces(lexer, element);
+                    }
+
+                    element.insertNodeAtEnd(node);
+                    parseTag(lexer, node, mode);
+                    continue;
+                }
+
+                // discard unexpected tags
+                lexer.report.warning(lexer, element, node, Report.DISCARDING_UNEXPECTED);
+                continue;
+            }
+
+            if (!((element.tag.model & Dict.CM_OPT) != 0))
+            {
+                lexer.report.warning(lexer, element, node, Report.MISSING_ENDTAG_FOR);
+            }
+
+            Node.trimEmptyElement(lexer, element);
+        }
+    }
+
+    /**
+     * Parser for LIST.
+     */
+    public static class ParseList implements Parser
+    {
+
+        public void parse(Lexer lexer, Node list, short mode)
+        {
+            Node node;
+            Node parent;
+            TagTable tt = lexer.configuration.tt;
+
+            if ((list.tag.model & Dict.CM_EMPTY) != 0)
+            {
+                return;
+            }
+
+            lexer.insert = -1; // defer implicit inline start tags
+
+            while ((node = lexer.getToken(Lexer.IGNORE_WHITESPACE)) != null)
+            {
+                if (node.tag == list.tag && node.type == Node.END_TAG)
+                {
+                    if ((list.tag.model & Dict.CM_OBSOLETE) != 0)
+                    {
+                        Node.coerceNode(lexer, list, tt.tagUl);
+                    }
+
+                    list.closed = true;
+                    Node.trimEmptyElement(lexer, list);
+                    return;
+                }
+
+                // deal with comments etc.
+                if (Node.insertMisc(list, node))
+                {
+                    continue;
+                }
+
+                if (node.type != Node.TEXT_NODE && node.tag == null)
+                {
+                    lexer.report.warning(lexer, list, node, Report.DISCARDING_UNEXPECTED);
+                    continue;
+                }
+
+                // if this is the end tag for an ancestor element then infer end tag for this element
+
+                if (node.type == Node.END_TAG)
+                {
+                    if (node.tag == tt.tagForm)
+                    {
+                        badForm(lexer);
+                        lexer.report.warning(lexer, list, node, Report.DISCARDING_UNEXPECTED);
+                        continue;
+                    }
+
+                    if (node.tag != null && (node.tag.model & Dict.CM_INLINE) != 0)
+                    {
+                        lexer.report.warning(lexer, list, node, Report.DISCARDING_UNEXPECTED);
+                        lexer.popInline(node);
+                        continue;
+                    }
+
+                    for (parent = list.parent; parent != null; parent = parent.parent)
+                    {
+                        if (node.tag == parent.tag)
+                        {
+                            lexer.report.warning(lexer, list, node, Report.MISSING_ENDTAG_BEFORE);
+                            lexer.ungetToken();
+
+                            if ((list.tag.model & Dict.CM_OBSOLETE) != 0)
+                            {
+                                Node.coerceNode(lexer, list, tt.tagUl);
+                            }
+
+                            Node.trimEmptyElement(lexer, list);
+                            return;
+                        }
+                    }
+
+                    lexer.report.warning(lexer, list, node, Report.DISCARDING_UNEXPECTED);
+                    continue;
+                }
+
+                if (node.tag != tt.tagLi)
+                {
+                    lexer.ungetToken();
+
+                    if (node.tag != null && (node.tag.model & Dict.CM_BLOCK) != 0 && lexer.excludeBlocks)
+                    {
+                        lexer.report.warning(lexer, list, node, Report.MISSING_ENDTAG_BEFORE);
+                        Node.trimEmptyElement(lexer, list);
+                        return;
+                    }
+
+                    node = lexer.inferredTag("li");
+                    node.addAttribute("style", "list-style: none");
+                    lexer.report.warning(lexer, list, node, Report.MISSING_STARTTAG);
+                }
+
+                // node should be <LI>
+                list.insertNodeAtEnd(node);
+                parseTag(lexer, node, Lexer.IGNORE_WHITESPACE);
+            }
+
+            if ((list.tag.model & Dict.CM_OBSOLETE) != 0)
+            {
+                Node.coerceNode(lexer, list, tt.tagUl);
+            }
+
+            lexer.report.warning(lexer, list, node, Report.MISSING_ENDTAG_FOR);
+            Node.trimEmptyElement(lexer, list);
+        }
+
+    }
+
+    /**
+     * Parser for empty elements.
+     */
+    public static class ParseEmpty implements Parser
+    {
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.Parser#parse(org.ajax4jsf.org.w3c.tidy.Lexer, org.ajax4jsf.org.w3c.tidy.Node, short)
+         */
+        public void parse(Lexer lexer, Node element, short mode)
+        {
+            if (lexer.isvoyager)
+            {
+                Node node = lexer.getToken(mode);
+                if (node != null && !(node.type == Node.END_TAG && node.tag == element.tag))
+                {
+                    lexer.report.warning(lexer, element, node, Report.ELEMENT_NOT_EMPTY);
+                    lexer.ungetToken();
+                }
+            }
+        }
+    }
+
+    /**
+     * Parser for DEFLIST.
+     */
+    public static class ParseDefList implements Parser
+    {
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.Parser#parse(org.ajax4jsf.org.w3c.tidy.Lexer, org.ajax4jsf.org.w3c.tidy.Node, short)
+         */
+        public void parse(Lexer lexer, Node list, short mode)
+        {
+            Node node, parent;
+            TagTable tt = lexer.configuration.tt;
+
+            if ((list.tag.model & Dict.CM_EMPTY) != 0)
+            {
+                return;
+            }
+
+            lexer.insert = -1; // defer implicit inline start tags
+
+            while ((node = lexer.getToken(Lexer.IGNORE_WHITESPACE)) != null)
+            {
+                if (node.tag == list.tag && node.type == Node.END_TAG)
+                {
+                    list.closed = true;
+                    Node.trimEmptyElement(lexer, list);
+                    return;
+                }
+
+                // deal with comments etc.
+                if (Node.insertMisc(list, node))
+                {
+                    continue;
+                }
+
+                if (node.type == Node.TEXT_NODE)
+                {
+                    lexer.ungetToken();
+                    node = lexer.inferredTag("dt");
+                    lexer.report.warning(lexer, list, node, Report.MISSING_STARTTAG);
+                }
+
+                if (node.tag == null)
+                {
+                    lexer.report.warning(lexer, list, node, Report.DISCARDING_UNEXPECTED);
+                    continue;
+                }
+
+                // if this is the end tag for an ancestor element then infer end tag for this element
+
+                if (node.type == Node.END_TAG)
+                {
+                    if (node.tag == tt.tagForm)
+                    {
+                        badForm(lexer);
+                        lexer.report.warning(lexer, list, node, Report.DISCARDING_UNEXPECTED);
+                        continue;
+                    }
+
+                    for (parent = list.parent; parent != null; parent = parent.parent)
+                    {
+                        if (node.tag == parent.tag)
+                        {
+                            lexer.report.warning(lexer, list, node, Report.MISSING_ENDTAG_BEFORE);
+
+                            lexer.ungetToken();
+                            Node.trimEmptyElement(lexer, list);
+                            return;
+                        }
+                    }
+                }
+
+                // center in a dt or a dl breaks the dl list in two
+                if (node.tag == tt.tagCenter)
+                {
+                    if (list.content != null)
+                    {
+                        list.insertNodeAfterElement(node);
+                    }
+                    else
+                    {
+                        // trim empty dl list
+                        Node.insertNodeBeforeElement(list, node);
+
+                        // #540296 tidy dumps with empty definition list
+                        Node.discardElement(list);
+                    }
+
+                    // and parse contents of center
+                    parseTag(lexer, node, mode);
+
+                    // now create a new dl element
+                    list = lexer.inferredTag("dl");
+                    node.insertNodeAfterElement(list);
+                    continue;
+                }
+
+                if (!(node.tag == tt.tagDt || node.tag == tt.tagDd))
+                {
+                    lexer.ungetToken();
+
+                    if (!((node.tag.model & (Dict.CM_BLOCK | Dict.CM_INLINE)) != 0))
+                    {
+                        lexer.report.warning(lexer, list, node, Report.TAG_NOT_ALLOWED_IN);
+                        Node.trimEmptyElement(lexer, list);
+                        return;
+                    }
+
+                    // if DD appeared directly in BODY then exclude blocks
+                    if (!((node.tag.model & Dict.CM_INLINE) != 0) && lexer.excludeBlocks)
+                    {
+                        Node.trimEmptyElement(lexer, list);
+                        return;
+                    }
+
+                    node = lexer.inferredTag("dd");
+                    lexer.report.warning(lexer, list, node, Report.MISSING_STARTTAG);
+                }
+
+                if (node.type == Node.END_TAG)
+                {
+                    lexer.report.warning(lexer, list, node, Report.DISCARDING_UNEXPECTED);
+                    continue;
+                }
+
+                // node should be <DT> or <DD>
+                list.insertNodeAtEnd(node);
+                parseTag(lexer, node, Lexer.IGNORE_WHITESPACE);
+            }
+
+            lexer.report.warning(lexer, list, node, Report.MISSING_ENDTAG_FOR);
+            Node.trimEmptyElement(lexer, list);
+        }
+
+    }
+
+    /**
+     * Parser for PRE.
+     */
+    public static class ParsePre implements Parser
+    {
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.Parser#parse(org.ajax4jsf.org.w3c.tidy.Lexer, org.ajax4jsf.org.w3c.tidy.Node, short)
+         */
+        public void parse(Lexer lexer, Node pre, short mode)
+        {
+            Node node;
+            TagTable tt = lexer.configuration.tt;
+
+            if ((pre.tag.model & Dict.CM_EMPTY) != 0)
+            {
+                return;
+            }
+
+            if ((pre.tag.model & Dict.CM_OBSOLETE) != 0)
+            {
+                Node.coerceNode(lexer, pre, tt.tagPre);
+            }
+
+            lexer.inlineDup(null); // tell lexer to insert inlines if needed
+
+            while ((node = lexer.getToken(Lexer.PREFORMATTED)) != null)
+            {
+                if (node.tag == pre.tag && node.type == Node.END_TAG)
+                {
+                    Node.trimSpaces(lexer, pre);
+                    pre.closed = true;
+                    Node.trimEmptyElement(lexer, pre);
+                    return;
+                }
+
+                if (node.tag == tt.tagHtml)
+                {
+                    if (node.type == Node.START_TAG || node.type == Node.START_END_TAG)
+                    {
+                        lexer.report.warning(lexer, pre, node, Report.DISCARDING_UNEXPECTED);
+                    }
+
+                    continue;
+                }
+
+                if (node.type == Node.TEXT_NODE)
+                {
+                    // if first check for inital newline
+                    if (pre.content == null)
+                    {
+                        if (node.textarray[node.start] == (byte) '\n')
+                        {
+                            ++node.start;
+                        }
+
+                        if (node.start >= node.end)
+                        {
+                            continue;
+                        }
+                    }
+
+                    pre.insertNodeAtEnd(node);
+                    continue;
+                }
+
+                // deal with comments etc.
+                if (Node.insertMisc(pre, node))
+                {
+                    continue;
+                }
+
+                // strip unexpected tags
+                if (!lexer.preContent(node))
+                {
+                    Node newnode;
+
+                    lexer.report.warning(lexer, pre, node, Report.UNESCAPED_ELEMENT);
+                    newnode = Node.escapeTag(lexer, node);
+                    pre.insertNodeAtEnd(newnode);
+                    continue;
+                }
+
+                if (node.tag == tt.tagP)
+                {
+                    if (node.type == Node.START_TAG)
+                    {
+                        lexer.report.warning(lexer, pre, node, Report.USING_BR_INPLACE_OF);
+
+                        // trim white space before <p> in <pre>
+                        Node.trimSpaces(lexer, pre);
+
+                        // coerce both <p> and </p> to <br>
+                        Node.coerceNode(lexer, node, tt.tagBr);
+                        pre.insertNodeAtEnd(node);
+                    }
+                    else
+                    {
+                        lexer.report.warning(lexer, pre, node, Report.DISCARDING_UNEXPECTED);
+                    }
+                    continue;
+                }
+
+                if (node.type == Node.START_TAG || node.type == Node.START_END_TAG)
+                {
+                    // trim white space before <br>
+                    if (node.tag == tt.tagBr)
+                    {
+                        Node.trimSpaces(lexer, pre);
+                    }
+
+                    pre.insertNodeAtEnd(node);
+                    parseTag(lexer, node, Lexer.PREFORMATTED);
+                    continue;
+                }
+
+                // discard unexpected tags
+                lexer.report.warning(lexer, pre, node, Report.DISCARDING_UNEXPECTED);
+            }
+
+            lexer.report.warning(lexer, pre, node, Report.MISSING_ENDTAG_FOR);
+            Node.trimEmptyElement(lexer, pre);
+        }
+
+    }
+
+    /**
+     * Parser for block elements.
+     */
+    public static class ParseBlock implements Parser
+    {
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.Parser#parse(org.ajax4jsf.org.w3c.tidy.Lexer, org.ajax4jsf.org.w3c.tidy.Node, short)
+         */
+        public void parse(Lexer lexer, Node element, short mode)
+        {
+            // element is node created by the lexer upon seeing the start tag, or by the parser when the start tag is
+            // inferred.
+            Node node, parent;
+            boolean checkstack;
+            int istackbase = 0;
+            TagTable tt = lexer.configuration.tt;
+
+            checkstack = true;
+
+            if ((element.tag.model & Dict.CM_EMPTY) != 0)
+            {
+                return;
+            }
+
+            if (element.tag == tt.tagForm && element.isDescendantOf(tt.tagForm))
+            {
+                lexer.report.warning(lexer, element, null, Report.ILLEGAL_NESTING);
+            }
+
+            // InlineDup() asks the lexer to insert inline emphasis tags currently pushed on the istack, but take care
+            // to avoid propagating inline emphasis inside OBJECT or APPLET. For these elements a fresh inline stack
+            // context is created and disposed of upon reaching the end of the element. They thus behave like table
+            // cells in this respect.
+
+            if ((element.tag.model & Dict.CM_OBJECT) != 0)
+            {
+                istackbase = lexer.istackbase;
+                lexer.istackbase = lexer.istack.size();
+            }
+
+            if (!((element.tag.model & Dict.CM_MIXED) != 0))
+            {
+                lexer.inlineDup(null);
+            }
+
+            mode = Lexer.IGNORE_WHITESPACE;
+
+            while ((node = lexer.getToken(mode)) != null)
+            {
+                // end tag for this element
+                if (node.type == Node.END_TAG
+                    && node.tag != null
+                    && (node.tag == element.tag || element.was == node.tag))
+                {
+
+                    if ((element.tag.model & Dict.CM_OBJECT) != 0)
+                    {
+                        // pop inline stack
+                        while (lexer.istack.size() > lexer.istackbase)
+                        {
+                            lexer.popInline(null);
+                        }
+                        lexer.istackbase = istackbase;
+                    }
+
+                    element.closed = true;
+                    Node.trimSpaces(lexer, element);
+                    Node.trimEmptyElement(lexer, element);
+                    return;
+                }
+
+                if (node.tag == tt.tagHtml || node.tag == tt.tagHead || node.tag == tt.tagBody)
+                {
+                    if (node.type == Node.START_TAG || node.type == Node.START_END_TAG)
+                    {
+                        lexer.report.warning(lexer, element, node, Report.DISCARDING_UNEXPECTED);
+                    }
+
+                    continue;
+                }
+
+                if (node.type == Node.END_TAG)
+                {
+                    if (node.tag == null)
+                    {
+                        lexer.report.warning(lexer, element, node, Report.DISCARDING_UNEXPECTED);
+
+                        continue;
+                    }
+                    else if (node.tag == tt.tagBr)
+                    {
+                        node.type = Node.START_TAG;
+                    }
+                    else if (node.tag == tt.tagP)
+                    {
+                        Node.coerceNode(lexer, node, tt.tagBr);
+                        element.insertNodeAtEnd(node);
+                        node = lexer.inferredTag("br");
+                    }
+                    else
+                    {
+                        // if this is the end tag for an ancestor element then infer end tag for this element
+
+                        for (parent = element.parent; parent != null; parent = parent.parent)
+                        {
+                            if (node.tag == parent.tag)
+                            {
+                                if (!((element.tag.model & Dict.CM_OPT) != 0))
+                                {
+                                    lexer.report.warning(lexer, element, node, Report.MISSING_ENDTAG_BEFORE);
+                                }
+
+                                lexer.ungetToken();
+
+                                if ((element.tag.model & Dict.CM_OBJECT) != 0)
+                                {
+                                    // pop inline stack
+                                    while (lexer.istack.size() > lexer.istackbase)
+                                    {
+                                        lexer.popInline(null);
+                                    }
+                                    lexer.istackbase = istackbase;
+                                }
+
+                                Node.trimSpaces(lexer, element);
+                                Node.trimEmptyElement(lexer, element);
+                                return;
+                            }
+                        }
+                        // special case </tr> etc. for stuff moved in front of table
+                        if (lexer.exiled && node.tag.model != 0 && (node.tag.model & Dict.CM_TABLE) != 0)
+                        {
+                            lexer.ungetToken();
+                            Node.trimSpaces(lexer, element);
+                            Node.trimEmptyElement(lexer, element);
+                            return;
+                        }
+                    }
+                }
+
+                // mixed content model permits text
+                if (node.type == Node.TEXT_NODE)
+                {
+                    boolean iswhitenode = false;
+
+                    if (node.type == Node.TEXT_NODE
+                        && node.end <= node.start + 1
+                        && lexer.lexbuf[node.start] == (byte) ' ')
+                    {
+                        iswhitenode = true;
+                    }
+
+                    if (lexer.configuration.encloseBlockText && !iswhitenode)
+                    {
+                        lexer.ungetToken();
+                        node = lexer.inferredTag("p");
+                        element.insertNodeAtEnd(node);
+                        parseTag(lexer, node, Lexer.MIXED_CONTENT);
+                        continue;
+                    }
+
+                    if (checkstack)
+                    {
+                        checkstack = false;
+
+                        if (!((element.tag.model & Dict.CM_MIXED) != 0))
+                        {
+                            if (lexer.inlineDup(node) > 0)
+                            {
+                                continue;
+                            }
+                        }
+                    }
+
+                    element.insertNodeAtEnd(node);
+                    mode = Lexer.MIXED_CONTENT;
+
+                    // HTML4 strict doesn't allow mixed content for elements with %block; as their content model
+                    // But only body, map, blockquote, form and noscript have content model %block;
+                    if (element.tag == tt.tagBody
+                        || element.tag == tt.tagMap
+                        || element.tag == tt.tagBlockquote
+                        || element.tag == tt.tagForm
+                        || element.tag == tt.tagNoscript)
+                    {
+                        lexer.constrainVersion(~Dict.VERS_HTML40_STRICT);
+                    }
+                    continue;
+                }
+
+                if (Node.insertMisc(element, node))
+                {
+                    continue;
+                }
+
+                // allow PARAM elements?
+                if (node.tag == tt.tagParam)
+                {
+                    if (((element.tag.model & Dict.CM_PARAM) != 0)
+                        && (node.type == Node.START_TAG || node.type == Node.START_END_TAG))
+                    {
+                        element.insertNodeAtEnd(node);
+                        continue;
+                    }
+
+                    // otherwise discard it
+                    lexer.report.warning(lexer, element, node, Report.DISCARDING_UNEXPECTED);
+                    continue;
+                }
+
+                // allow AREA elements?
+                if (node.tag == tt.tagArea)
+                {
+                    if ((element.tag == tt.tagMap) && (node.type == Node.START_TAG || node.type == Node.START_END_TAG))
+                    {
+                        element.insertNodeAtEnd(node);
+                        continue;
+                    }
+
+                    // otherwise discard it
+                    lexer.report.warning(lexer, element, node, Report.DISCARDING_UNEXPECTED);
+                    continue;
+                }
+
+                // ignore unknown start/end tags
+                if (node.tag == null)
+                {
+                    lexer.report.warning(lexer, element, node, Report.DISCARDING_UNEXPECTED);
+                    continue;
+                }
+
+                // Allow Dict.CM_INLINE elements here. Allow Dict.CM_BLOCK elements here unless lexer.excludeBlocks is
+                // yes. LI and DD are special cased. Otherwise infer end tag for this element.
+
+                if (!((node.tag.model & Dict.CM_INLINE) != 0))
+                {
+                    if (node.type != Node.START_TAG && node.type != Node.START_END_TAG)
+                    {
+                        if (node.tag == tt.tagForm)
+                        {
+                            badForm(lexer);
+                        }
+                        lexer.report.warning(lexer, element, node, Report.DISCARDING_UNEXPECTED);
+                        continue;
+                    }
+
+                    // #427671 - Fix by Randy Waki - 10 Aug 00
+                    // If an LI contains an illegal FRAME, FRAMESET, OPTGROUP, or OPTION start tag, discard the start
+                    // tag and let the subsequent content get parsed as content of the enclosing LI. This seems to
+                    // mimic IE and Netscape, and avoids an infinite loop: without this check, ParseBlock (which is
+                    // parsing the LI's content) and ParseList (which is parsing the LI's parent's content) repeatedly
+                    // defer to each other to parse the illegal start tag, each time inferring a missing </li> or <li>
+                    // respectively. NOTE: This check is a bit fragile. It specifically checks for the four tags that
+                    // happen to weave their way through the current series of tests performed by ParseBlock and
+                    // ParseList to trigger the infinite loop.
+
+                    if (element.tag == tt.tagLi)
+                    {
+                        if (node.tag == tt.tagFrame
+                            || node.tag == tt.tagFrameset
+                            || node.tag == tt.tagOptgroup
+                            || node.tag == tt.tagOption)
+                        {
+                            lexer.report.warning(lexer, element, node, Report.DISCARDING_UNEXPECTED);
+                            continue;
+                        }
+                    }
+
+                    if (element.tag == tt.tagTd || element.tag == tt.tagTh)
+                    {
+                        // if parent is a table cell, avoid inferring the end of the cell
+
+                        if ((node.tag.model & Dict.CM_HEAD) != 0)
+                        {
+                            moveToHead(lexer, element, node);
+                            continue;
+                        }
+
+                        if ((node.tag.model & Dict.CM_LIST) != 0)
+                        {
+                            lexer.ungetToken();
+                            node = lexer.inferredTag("ul");
+                            node.addClass("noindent");
+                            lexer.excludeBlocks = true;
+                        }
+                        else if ((node.tag.model & Dict.CM_DEFLIST) != 0)
+                        {
+                            lexer.ungetToken();
+                            node = lexer.inferredTag("dl");
+                            lexer.excludeBlocks = true;
+                        }
+
+                        // infer end of current table cell
+                        if (!((node.tag.model & Dict.CM_BLOCK) != 0))
+                        {
+                            lexer.ungetToken();
+                            Node.trimSpaces(lexer, element);
+                            Node.trimEmptyElement(lexer, element);
+                            return;
+                        }
+                    }
+                    else if ((node.tag.model & Dict.CM_BLOCK) != 0)
+                    {
+                        if (lexer.excludeBlocks)
+                        {
+                            if (!((element.tag.model & Dict.CM_OPT) != 0))
+                            {
+                                lexer.report.warning(lexer, element, node, Report.MISSING_ENDTAG_BEFORE);
+                            }
+
+                            lexer.ungetToken();
+
+                            if ((element.tag.model & Dict.CM_OBJECT) != 0)
+                            {
+                                lexer.istackbase = istackbase;
+                            }
+
+                            Node.trimSpaces(lexer, element);
+                            Node.trimEmptyElement(lexer, element);
+                            return;
+                        }
+                    }
+                    else
+                    {
+                        // things like list items
+
+                        if ((node.tag.model & Dict.CM_HEAD) != 0)
+                        {
+                            moveToHead(lexer, element, node);
+                            continue;
+                        }
+
+                        // special case where a form start tag occurs in a tr and is followed by td or th
+                        if (element.tag == tt.tagForm && element.parent.tag == tt.tagTd && element.parent.implicit)
+                        {
+                            if (node.tag == tt.tagTd)
+                            {
+                                lexer.report.warning(lexer, element, node, Report.DISCARDING_UNEXPECTED);
+                                continue;
+                            }
+
+                            if (node.tag == tt.tagTh)
+                            {
+                                lexer.report.warning(lexer, element, node, Report.DISCARDING_UNEXPECTED);
+                                node = element.parent;
+                                node.element = "th";
+                                node.tag = tt.tagTh;
+                                continue;
+                            }
+                        }
+
+                        if (!((element.tag.model & Dict.CM_OPT) != 0) && !element.implicit)
+                        {
+                            lexer.report.warning(lexer, element, node, Report.MISSING_ENDTAG_BEFORE);
+                        }
+
+                        lexer.ungetToken();
+
+                        if ((node.tag.model & Dict.CM_LIST) != 0)
+                        {
+                            if (element.parent != null
+                                && element.parent.tag != null
+                                && element.parent.tag.getParser() == LIST)
+                            {
+                                Node.trimSpaces(lexer, element);
+                                Node.trimEmptyElement(lexer, element);
+                                return;
+                            }
+
+                            node = lexer.inferredTag("ul");
+                            node.addClass("noindent");
+                        }
+                        else if ((node.tag.model & Dict.CM_DEFLIST) != 0)
+                        {
+                            if (element.parent.tag == tt.tagDl)
+                            {
+                                Node.trimSpaces(lexer, element);
+                                Node.trimEmptyElement(lexer, element);
+                                return;
+                            }
+
+                            node = lexer.inferredTag("dl");
+                        }
+                        else if ((node.tag.model & Dict.CM_TABLE) != 0 || (node.tag.model & Dict.CM_ROW) != 0)
+                        {
+                            node = lexer.inferredTag("table");
+                        }
+                        else if ((element.tag.model & Dict.CM_OBJECT) != 0)
+                        {
+                            // pop inline stack
+                            while (lexer.istack.size() > lexer.istackbase)
+                            {
+                                lexer.popInline(null);
+                            }
+                            lexer.istackbase = istackbase;
+                            Node.trimSpaces(lexer, element);
+                            Node.trimEmptyElement(lexer, element);
+                            return;
+
+                        }
+                        else
+                        {
+                            Node.trimSpaces(lexer, element);
+                            Node.trimEmptyElement(lexer, element);
+                            return;
+                        }
+                    }
+                }
+
+                // parse known element
+                if (node.type == Node.START_TAG || node.type == Node.START_END_TAG)
+                {
+                    if (TidyUtils.toBoolean(node.tag.model & Dict.CM_INLINE))
+                    {
+                        // DSR - 27Apr02 ensure we wrap anchors and other inline content
+                        if (lexer.configuration.encloseBlockText)
+                        {
+                            lexer.ungetToken();
+                            node = lexer.inferredTag("p");
+                            element.insertNodeAtEnd(node);
+                            parseTag(lexer, node, Lexer.MIXED_CONTENT);
+                            continue;
+                        }
+
+                        if (checkstack && !node.implicit)
+                        {
+                            checkstack = false;
+
+                            // #431731 - fix by Randy Waki 25 Dec 00
+                            if (!TidyUtils.toBoolean(element.tag.model & Dict.CM_MIXED))
+                            {
+                                if (lexer.inlineDup(node) > 0)
+                                {
+                                    continue;
+                                }
+                            }
+                        }
+
+                        mode = Lexer.MIXED_CONTENT;
+                    }
+                    else
+                    {
+                        checkstack = true;
+                        mode = Lexer.IGNORE_WHITESPACE;
+                    }
+
+                    // trim white space before <br>
+                    if (node.tag == tt.tagBr)
+                    {
+                        Node.trimSpaces(lexer, element);
+                    }
+
+                    element.insertNodeAtEnd(node);
+
+                    if (node.implicit)
+                    {
+                        lexer.report.warning(lexer, element, node, Report.INSERTING_TAG);
+                    }
+
+                    parseTag(lexer, node, Lexer.IGNORE_WHITESPACE // Lexer.MixedContent
+                    );
+                    continue;
+                }
+
+                // discard unexpected tags
+                if (node.type == Node.END_TAG)
+                {
+                    lexer.popInline(node); // if inline end tag
+                }
+
+                lexer.report.warning(lexer, element, node, Report.DISCARDING_UNEXPECTED);
+                continue;
+            }
+
+            if (!((element.tag.model & Dict.CM_OPT) != 0))
+            {
+                lexer.report.warning(lexer, element, node, Report.MISSING_ENDTAG_FOR);
+            }
+
+            if ((element.tag.model & Dict.CM_OBJECT) != 0)
+            {
+                // pop inline stack
+                while (lexer.istack.size() > lexer.istackbase)
+                {
+                    lexer.popInline(null);
+                }
+                lexer.istackbase = istackbase;
+            }
+
+            Node.trimSpaces(lexer, element);
+            Node.trimEmptyElement(lexer, element);
+        }
+
+    }
+
+    /**
+     * Parser for TABLE.
+     */
+    public static class ParseTableTag implements Parser
+    {
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.Parser#parse(org.ajax4jsf.org.w3c.tidy.Lexer, org.ajax4jsf.org.w3c.tidy.Node, short)
+         */
+        public void parse(Lexer lexer, Node table, short mode)
+        {
+            Node node, parent;
+            int istackbase;
+            TagTable tt = lexer.configuration.tt;
+
+            lexer.deferDup();
+            istackbase = lexer.istackbase;
+            lexer.istackbase = lexer.istack.size();
+
+            while ((node = lexer.getToken(Lexer.IGNORE_WHITESPACE)) != null)
+            {
+                if (node.tag == table.tag && node.type == Node.END_TAG)
+                {
+                    lexer.istackbase = istackbase;
+                    table.closed = true;
+                    Node.trimEmptyElement(lexer, table);
+                    return;
+                }
+
+                // deal with comments etc.
+                if (Node.insertMisc(table, node))
+                {
+                    continue;
+                }
+
+                // discard unknown tags
+                if (node.tag == null && node.type != Node.TEXT_NODE)
+                {
+                    lexer.report.warning(lexer, table, node, Report.DISCARDING_UNEXPECTED);
+                    continue;
+                }
+
+                // if TD or TH or text or inline or block then infer <TR>
+
+                if (node.type != Node.END_TAG)
+                {
+                	// Modified by Alexander Smirnov
+                	// TODO - correct parse table with <thead> but withowt <tbody>
+                	if (node.tag == tt.tagTr )
+                    {
+                        lexer.ungetToken();
+                        node = lexer.inferredTag("tbody");
+                        lexer.report.warning(lexer, table, node, Report.MISSING_STARTTAG);
+                    }
+                    else if (node.tag == tt.tagTd || node.tag == tt.tagTh || node.tag == tt.tagTable)
+                    {
+                        lexer.ungetToken();
+                        node = lexer.inferredTag("tr");
+                        lexer.report.warning(lexer, table, node, Report.MISSING_STARTTAG);
+                    }
+                    else if (node.type == Node.TEXT_NODE || (node.tag.model & (Dict.CM_BLOCK | Dict.CM_INLINE)) != 0)
+                    {
+                        Node.insertNodeBeforeElement(table, node);
+                        lexer.report.warning(lexer, table, node, Report.TAG_NOT_ALLOWED_IN);
+                        lexer.exiled = true;
+
+                        if (!(node.type == Node.TEXT_NODE)) // #427662 - was (!node.type == TextNode) - fix by Young
+                        {
+                            parseTag(lexer, node, Lexer.IGNORE_WHITESPACE);
+                        }
+
+                        lexer.exiled = false;
+                        continue;
+                    }
+                    else if ((node.tag.model & Dict.CM_HEAD) != 0)
+                    {
+                        moveToHead(lexer, table, node);
+                        continue;
+                    }
+                }
+
+                // if this is the end tag for an ancestor element then infer end tag for this element
+
+                if (node.type == Node.END_TAG)
+                {
+                    if (node.tag == tt.tagForm
+                        || (node.tag != null && ((node.tag.model & (Dict.CM_BLOCK | Dict.CM_INLINE)) != 0)))
+                    {
+                        badForm(lexer);
+                        lexer.report.warning(lexer, table, node, Report.DISCARDING_UNEXPECTED);
+                        continue;
+                    }
+
+                    if ((node.tag != null && (node.tag.model & (Dict.CM_TABLE | Dict.CM_ROW)) != 0)
+                        || (node.tag != null && (node.tag.model & (Dict.CM_BLOCK | Dict.CM_INLINE)) != 0))
+                    {
+                        lexer.report.warning(lexer, table, node, Report.DISCARDING_UNEXPECTED);
+                        continue;
+                    }
+
+                    for (parent = table.parent; parent != null; parent = parent.parent)
+                    {
+                        if (node.tag == parent.tag)
+                        {
+                            lexer.report.warning(lexer, table, node, Report.MISSING_ENDTAG_BEFORE);
+                            lexer.ungetToken();
+                            lexer.istackbase = istackbase;
+                            Node.trimEmptyElement(lexer, table);
+                            return;
+                        }
+                    }
+                }
+
+                if (!((node.tag.model & Dict.CM_TABLE) != 0))
+                {
+                    lexer.ungetToken();
+                    lexer.report.warning(lexer, table, node, Report.TAG_NOT_ALLOWED_IN);
+                    lexer.istackbase = istackbase;
+                    Node.trimEmptyElement(lexer, table);
+                    return;
+                }
+
+                if (node.type == Node.START_TAG || node.type == Node.START_END_TAG)
+                {
+                    table.insertNodeAtEnd(node);
+
+                    parseTag(lexer, node, Lexer.IGNORE_WHITESPACE);
+                    continue;
+                }
+
+                // discard unexpected text nodes and end tags
+                lexer.report.warning(lexer, table, node, Report.DISCARDING_UNEXPECTED);
+            }
+
+            lexer.report.warning(lexer, table, node, Report.MISSING_ENDTAG_FOR);
+            Node.trimEmptyElement(lexer, table);
+            lexer.istackbase = istackbase;
+        }
+
+    }
+
+    /**
+     * Parser for COLGROUP.
+     */
+    public static class ParseColGroup implements Parser
+    {
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.Parser#parse(org.ajax4jsf.org.w3c.tidy.Lexer, org.ajax4jsf.org.w3c.tidy.Node, short)
+         */
+        public void parse(Lexer lexer, Node colgroup, short mode)
+        {
+            Node node, parent;
+            TagTable tt = lexer.configuration.tt;
+
+            if ((colgroup.tag.model & Dict.CM_EMPTY) != 0)
+            {
+                return;
+            }
+
+            while ((node = lexer.getToken(Lexer.IGNORE_WHITESPACE)) != null)
+            {
+                if (node.tag == colgroup.tag && node.type == Node.END_TAG)
+                {
+                    colgroup.closed = true;
+                    return;
+                }
+
+                // if this is the end tag for an ancestor element then infer end tag for this element
+
+                if (node.type == Node.END_TAG)
+                {
+                    if (node.tag == tt.tagForm)
+                    {
+                        badForm(lexer);
+                        lexer.report.warning(lexer, colgroup, node, Report.DISCARDING_UNEXPECTED);
+                        continue;
+                    }
+
+                    for (parent = colgroup.parent; parent != null; parent = parent.parent)
+                    {
+
+                        if (node.tag == parent.tag)
+                        {
+                            lexer.ungetToken();
+                            return;
+                        }
+                    }
+                }
+
+                if (node.type == Node.TEXT_NODE)
+                {
+                    lexer.ungetToken();
+                    return;
+                }
+
+                // deal with comments etc.
+                if (Node.insertMisc(colgroup, node))
+                {
+                    continue;
+                }
+
+                // discard unknown tags
+                if (node.tag == null)
+                {
+                    lexer.report.warning(lexer, colgroup, node, Report.DISCARDING_UNEXPECTED);
+                    continue;
+                }
+
+                if (node.tag != tt.tagCol)
+                {
+                    lexer.ungetToken();
+                    return;
+                }
+
+                if (node.type == Node.END_TAG)
+                {
+                    lexer.report.warning(lexer, colgroup, node, Report.DISCARDING_UNEXPECTED);
+                    continue;
+                }
+
+                // node should be <COL>
+                colgroup.insertNodeAtEnd(node);
+                parseTag(lexer, node, Lexer.IGNORE_WHITESPACE);
+            }
+        }
+
+    }
+
+    /**
+     * Parser for ROWGROUP.
+     */
+    public static class ParseRowGroup implements Parser
+    {
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.Parser#parse(org.ajax4jsf.org.w3c.tidy.Lexer, org.ajax4jsf.org.w3c.tidy.Node, short)
+         */
+        public void parse(Lexer lexer, Node rowgroup, short mode)
+        {
+            Node node, parent;
+            TagTable tt = lexer.configuration.tt;
+
+            if ((rowgroup.tag.model & Dict.CM_EMPTY) != 0)
+            {
+                return;
+            }
+
+            while ((node = lexer.getToken(Lexer.IGNORE_WHITESPACE)) != null)
+            {
+                if (node.tag == rowgroup.tag)
+                {
+                    if (node.type == Node.END_TAG)
+                    {
+                        rowgroup.closed = true;
+                        Node.trimEmptyElement(lexer, rowgroup);
+                        return;
+                    }
+
+                    lexer.ungetToken();
+                    return;
+                }
+
+                // if </table> infer end tag
+                if (node.tag == tt.tagTable && node.type == Node.END_TAG)
+                {
+                    lexer.ungetToken();
+                    Node.trimEmptyElement(lexer, rowgroup);
+                    return;
+                }
+
+                // deal with comments etc.
+                if (Node.insertMisc(rowgroup, node))
+                {
+                    continue;
+                }
+
+                // discard unknown tags
+                if (node.tag == null && node.type != Node.TEXT_NODE)
+                {
+                    lexer.report.warning(lexer, rowgroup, node, Report.DISCARDING_UNEXPECTED);
+                    continue;
+                }
+
+                // if TD or TH then infer <TR> if text or inline or block move before table if head content move to
+                // head
+
+                if (node.type != Node.END_TAG)
+                {
+                    if (node.tag == tt.tagTd || node.tag == tt.tagTh)
+                    {
+                        lexer.ungetToken();
+                        node = lexer.inferredTag("tr");
+                        lexer.report.warning(lexer, rowgroup, node, Report.MISSING_STARTTAG);
+                    }
+                    else if (node.type == Node.TEXT_NODE || (node.tag.model & (Dict.CM_BLOCK | Dict.CM_INLINE)) != 0)
+                    {
+                        lexer.report.warning(lexer, rowgroup, node, Report.TAG_NOT_ALLOWED_IN);
+                        if (lexer.configuration.moveElements) {
+							Node.moveBeforeTable(rowgroup, node, tt);
+							lexer.exiled = true;
+						}
+
+                        // #427662 was (!node.type == TextNode) fix by Young 04 Aug 00
+                        if (node.type != Node.TEXT_NODE)
+                        {
+                            parseTag(lexer, node, Lexer.IGNORE_WHITESPACE);
+                        }
+
+                        lexer.exiled = false;
+                        continue;
+                    }
+                    else if ((node.tag.model & Dict.CM_HEAD) != 0)
+                    {
+                        lexer.report.warning(lexer, rowgroup, node, Report.TAG_NOT_ALLOWED_IN);
+                        moveToHead(lexer, rowgroup, node);
+                        continue;
+                    }
+                }
+
+                // if this is the end tag for ancestor element then infer end tag for this element
+
+                if (node.type == Node.END_TAG)
+                {
+
+                    if (node.tag == tt.tagForm
+                        || (node.tag != null && (node.tag.model & (Dict.CM_BLOCK | Dict.CM_INLINE)) != 0))
+                    {
+                        if (node.tag == tt.tagForm)
+                        {
+                            badForm(lexer);
+                        }
+                        lexer.report.warning(lexer, rowgroup, node, Report.DISCARDING_UNEXPECTED);
+                        continue;
+                    }
+
+                    if (node.tag == tt.tagTr || node.tag == tt.tagTd || node.tag == tt.tagTh)
+                    {
+                        lexer.report.warning(lexer, rowgroup, node, Report.DISCARDING_UNEXPECTED);
+                        continue;
+                    }
+
+                    for (parent = rowgroup.parent; parent != null; parent = parent.parent)
+                    {
+                        if (node.tag == parent.tag)
+                        {
+                            lexer.ungetToken();
+                            Node.trimEmptyElement(lexer, rowgroup);
+                            return;
+                        }
+                    }
+
+                }
+
+                // if THEAD, TFOOT or TBODY then implied end tag
+
+                if ((node.tag.model & Dict.CM_ROWGRP) != 0)
+                {
+                    if (node.type != Node.END_TAG)
+                    {
+                        lexer.ungetToken();
+                    }
+
+                    Node.trimEmptyElement(lexer, rowgroup);
+                    return;
+                }
+
+                if (node.type == Node.END_TAG)
+                {
+                    lexer.report.warning(lexer, rowgroup, node, Report.DISCARDING_UNEXPECTED);
+                    continue;
+                }
+
+                if (!(node.tag == tt.tagTr))
+                {
+                    node = lexer.inferredTag("tr");
+                    lexer.report.warning(lexer, rowgroup, node, Report.MISSING_STARTTAG);
+                    lexer.ungetToken();
+                }
+
+                // node should be <TR>
+                rowgroup.insertNodeAtEnd(node);
+                parseTag(lexer, node, Lexer.IGNORE_WHITESPACE);
+            }
+            Node.trimEmptyElement(lexer, rowgroup);
+        }
+    }
+
+    /**
+     * Parser for ROW.
+     */
+    public static class ParseRow implements Parser
+    {
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.Parser#parse(org.ajax4jsf.org.w3c.tidy.Lexer, org.ajax4jsf.org.w3c.tidy.Node, short)
+         */
+        public void parse(Lexer lexer, Node row, short mode)
+        {
+            Node node, parent;
+            boolean excludeState;
+            TagTable tt = lexer.configuration.tt;
+
+            if ((row.tag.model & Dict.CM_EMPTY) != 0)
+            {
+                return;
+            }
+
+            while ((node = lexer.getToken(Lexer.IGNORE_WHITESPACE)) != null)
+            {
+                if (node.tag == row.tag)
+                {
+                    if (node.type == Node.END_TAG)
+                    {
+                        row.closed = true;
+                        Node.fixEmptyRow(lexer, row);
+                        return;
+                    }
+
+                    lexer.ungetToken();
+                    Node.fixEmptyRow(lexer, row);
+                    return;
+                }
+
+                // if this is the end tag for an ancestor element then infer end tag for this element
+                if (node.type == Node.END_TAG)
+                {
+                    if (node.tag == tt.tagForm
+                        || (node.tag != null && (node.tag.model & (Dict.CM_BLOCK | Dict.CM_INLINE)) != 0))
+                    {
+                        if (node.tag == tt.tagForm)
+                        {
+                            badForm(lexer);
+                        }
+                        lexer.report.warning(lexer, row, node, Report.DISCARDING_UNEXPECTED);
+                        continue;
+                    }
+
+                    if (node.tag == tt.tagTd || node.tag == tt.tagTh)
+                    {
+                        lexer.report.warning(lexer, row, node, Report.DISCARDING_UNEXPECTED);
+                        continue;
+                    }
+
+                    for (parent = row.parent; parent != null; parent = parent.parent)
+                    {
+                        if (node.tag == parent.tag)
+                        {
+                            lexer.ungetToken();
+                            Node.trimEmptyElement(lexer, row);
+                            return;
+                        }
+                    }
+                }
+
+                // deal with comments etc.
+                if (Node.insertMisc(row, node))
+                {
+                    continue;
+                }
+
+                // discard unknown tags
+                if (node.tag == null && node.type != Node.TEXT_NODE)
+                {
+                    lexer.report.warning(lexer, row, node, Report.DISCARDING_UNEXPECTED);
+                    continue;
+                }
+
+                // discard unexpected <table> element
+                if (node.tag == tt.tagTable)
+                {
+                    lexer.report.warning(lexer, row, node, Report.DISCARDING_UNEXPECTED);
+                    continue;
+                }
+
+                // THEAD, TFOOT or TBODY
+                if (node.tag != null && (node.tag.model & Dict.CM_ROWGRP) != 0)
+                {
+                    lexer.ungetToken();
+                    Node.trimEmptyElement(lexer, row);
+                    return;
+                }
+
+                if (node.type == Node.END_TAG)
+                {
+                    lexer.report.warning(lexer, row, node, Report.DISCARDING_UNEXPECTED);
+                    continue;
+                }
+
+                // if text or inline or block move before table if head content move to head
+
+                if (node.type != Node.END_TAG)
+                {
+                    if (node.tag == tt.tagForm)
+                    {
+                        lexer.ungetToken();
+                        node = lexer.inferredTag("td");
+                        lexer.report.warning(lexer, row, node, Report.MISSING_STARTTAG);
+                    }
+                    else if (node.type == Node.TEXT_NODE || (node.tag.model & (Dict.CM_BLOCK | Dict.CM_INLINE)) != 0)
+                    {
+                        lexer.report.warning(lexer, row, node, Report.TAG_NOT_ALLOWED_IN);
+                        if (lexer.configuration.moveElements) {
+							Node.moveBeforeTable(row, node, tt);
+							lexer.exiled = true;
+						}
+
+                        if (node.type != Node.TEXT_NODE)
+                        {
+                            parseTag(lexer, node, Lexer.IGNORE_WHITESPACE);
+                        }
+
+                        lexer.exiled = false;
+                        continue;
+                    }
+                    else if ((node.tag.model & Dict.CM_HEAD) != 0)
+                    {
+                        lexer.report.warning(lexer, row, node, Report.TAG_NOT_ALLOWED_IN);
+                        moveToHead(lexer, row, node);
+                        continue;
+                    }
+                }
+
+                if (!(node.tag == tt.tagTd || node.tag == tt.tagTh))
+                {
+                    lexer.report.warning(lexer, row, node, Report.TAG_NOT_ALLOWED_IN);
+                    continue;
+                }
+
+                // node should be <TD> or <TH>
+                row.insertNodeAtEnd(node);
+                excludeState = lexer.excludeBlocks;
+                lexer.excludeBlocks = false;
+                parseTag(lexer, node, Lexer.IGNORE_WHITESPACE);
+                lexer.excludeBlocks = excludeState;
+
+                // pop inline stack
+
+                while (lexer.istack.size() > lexer.istackbase)
+                {
+                    lexer.popInline(null);
+                }
+            }
+
+            Node.trimEmptyElement(lexer, row);
+        }
+
+    }
+
+    /**
+     * Parser for NOFRAMES.
+     */
+    public static class ParseNoFrames implements Parser
+    {
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.Parser#parse(org.ajax4jsf.org.w3c.tidy.Lexer, org.ajax4jsf.org.w3c.tidy.Node, short)
+         */
+        public void parse(Lexer lexer, Node noframes, short mode)
+        {
+            Node node;
+            TagTable tt = lexer.configuration.tt;
+
+            lexer.badAccess |= Report.USING_NOFRAMES;
+            mode = Lexer.IGNORE_WHITESPACE;
+
+            while ((node = lexer.getToken(mode)) != null)
+            {
+                if (node.tag == noframes.tag && node.type == Node.END_TAG)
+                {
+                    noframes.closed = true;
+                    Node.trimSpaces(lexer, noframes);
+                    return;
+                }
+
+                if ((node.tag == tt.tagFrame || node.tag == tt.tagFrameset))
+                {
+
+                    Node.trimSpaces(lexer, noframes);
+
+                    // fix for [539369]
+                    if (node.type == Node.END_TAG)
+                    {
+                        lexer.report.warning(lexer, noframes, node, Report.DISCARDING_UNEXPECTED);
+                        // Throw it away
+                    }
+                    else
+                    {
+                        lexer.report.warning(lexer, noframes, node, Report.MISSING_ENDTAG_BEFORE);
+
+                        lexer.ungetToken();
+                    }
+                    return;
+                }
+
+                if (node.tag == tt.tagHtml)
+                {
+                    if (node.type == Node.START_TAG || node.type == Node.START_END_TAG)
+                    {
+                        lexer.report.warning(lexer, noframes, node, Report.DISCARDING_UNEXPECTED);
+                    }
+
+                    continue;
+                }
+
+                // deal with comments etc.
+                if (Node.insertMisc(noframes, node))
+                {
+                    continue;
+                }
+
+                if (node.tag == tt.tagBody && node.type == Node.START_TAG)
+                {
+                    boolean seenbody = lexer.seenEndBody;
+                    noframes.insertNodeAtEnd(node);
+                    parseTag(lexer, node, Lexer.IGNORE_WHITESPACE); // MixedContent
+
+                    if (seenbody)
+                    {
+                        Node.coerceNode(lexer, node, tt.tagDiv);
+                        moveNodeToBody(lexer, node);
+                    }
+                    continue;
+                }
+
+                // implicit body element inferred
+                if (node.type == Node.TEXT_NODE || (node.tag != null && node.type != Node.END_TAG))
+                {
+                    if (lexer.seenEndBody)
+                    {
+                        Node body = lexer.root.findBody(tt);
+
+                        if (node.type == Node.TEXT_NODE)
+                        {
+                            lexer.ungetToken();
+                            node = lexer.inferredTag("p");
+                            lexer.report.warning(lexer, noframes, node, Report.CONTENT_AFTER_BODY);
+                        }
+
+                        body.insertNodeAtEnd(node);
+                    }
+                    else
+                    {
+                        lexer.ungetToken();
+                        node = lexer.inferredTag("body");
+                        if (lexer.configuration.xmlOut)
+                        {
+                            lexer.report.warning(lexer, noframes, node, Report.INSERTING_TAG);
+                        }
+                        noframes.insertNodeAtEnd(node);
+                    }
+                    parseTag(lexer, node, Lexer.IGNORE_WHITESPACE);
+                    // MixedContent
+                    continue;
+                }
+                // discard unexpected end tags
+                lexer.report.warning(lexer, noframes, node, Report.DISCARDING_UNEXPECTED);
+            }
+
+            lexer.report.warning(lexer, noframes, node, Report.MISSING_ENDTAG_FOR);
+        }
+
+    }
+
+    /**
+     * Parser for SELECT.
+     */
+    public static class ParseSelect implements Parser
+    {
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.Parser#parse(org.ajax4jsf.org.w3c.tidy.Lexer, org.ajax4jsf.org.w3c.tidy.Node, short)
+         */
+        public void parse(Lexer lexer, Node field, short mode)
+        {
+            Node node;
+            TagTable tt = lexer.configuration.tt;
+
+            lexer.insert = -1; // defer implicit inline start tags
+
+            while ((node = lexer.getToken(Lexer.IGNORE_WHITESPACE)) != null)
+            {
+                if (node.tag == field.tag && node.type == Node.END_TAG)
+                {
+                    field.closed = true;
+                    Node.trimSpaces(lexer, field);
+                    return;
+                }
+
+                // deal with comments etc.
+                if (Node.insertMisc(field, node))
+                {
+                    continue;
+                }
+
+                if (node.type == Node.START_TAG
+                    && (node.tag == tt.tagOption || node.tag == tt.tagOptgroup || node.tag == tt.tagScript))
+                {
+                    field.insertNodeAtEnd(node);
+                    parseTag(lexer, node, Lexer.IGNORE_WHITESPACE);
+                    continue;
+                }
+
+                // discard unexpected tags
+                lexer.report.warning(lexer, field, node, Report.DISCARDING_UNEXPECTED);
+            }
+
+            lexer.report.warning(lexer, field, node, Report.MISSING_ENDTAG_FOR);
+        }
+
+    }
+
+    /**
+     * Parser for text nodes.
+     */
+    public static class ParseText implements Parser
+    {
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.Parser#parse(org.ajax4jsf.org.w3c.tidy.Lexer, org.ajax4jsf.org.w3c.tidy.Node, short)
+         */
+        public void parse(Lexer lexer, Node field, short mode)
+        {
+            Node node;
+            TagTable tt = lexer.configuration.tt;
+
+            lexer.insert = -1; // defer implicit inline start tags
+
+            if (field.tag == tt.tagTextarea)
+            {
+                mode = Lexer.PREFORMATTED;
+            }
+            else
+            {
+                mode = Lexer.MIXED_CONTENT; // kludge for font tags
+            }
+
+            while ((node = lexer.getToken(mode)) != null)
+            {
+                if (node.tag == field.tag && node.type == Node.END_TAG)
+                {
+                    field.closed = true;
+                    Node.trimSpaces(lexer, field);
+                    return;
+                }
+
+                // deal with comments etc.
+                if (Node.insertMisc(field, node))
+                {
+                    continue;
+                }
+
+                if (node.type == Node.TEXT_NODE)
+                {
+                    // only called for 1st child
+                    if (field.content == null && !((mode & Lexer.PREFORMATTED) != 0))
+                    {
+                        Node.trimSpaces(lexer, field);
+                    }
+
+                    if (node.start >= node.end)
+                    {
+                        continue;
+                    }
+
+                    field.insertNodeAtEnd(node);
+                    continue;
+                }
+
+                // for textarea should all cases of < and & be escaped?
+                // discard inline tags e.g. font
+                if (node.tag != null
+                    && ((node.tag.model & Dict.CM_INLINE) != 0)
+                    && (node.tag.model & Dict.CM_FIELD) == 0) // #487283 - fix by Lee Passey 25 Jan 02
+                {
+                    lexer.report.warning(lexer, field, node, Report.DISCARDING_UNEXPECTED);
+                    continue;
+                }
+
+                // terminate element on other tags
+                if (!((field.tag.model & Dict.CM_OPT) != 0))
+                {
+                    lexer.report.warning(lexer, field, node, Report.MISSING_ENDTAG_BEFORE);
+                }
+
+                lexer.ungetToken();
+                Node.trimSpaces(lexer, field);
+                return;
+            }
+
+            if (!((field.tag.model & Dict.CM_OPT) != 0))
+            {
+                lexer.report.warning(lexer, field, node, Report.MISSING_ENDTAG_FOR);
+            }
+        }
+
+    }
+
+    /**
+     * Parser for OPTGROUP.
+     */
+    public static class ParseOptGroup implements Parser
+    {
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.Parser#parse(org.ajax4jsf.org.w3c.tidy.Lexer, org.ajax4jsf.org.w3c.tidy.Node, short)
+         */
+        public void parse(Lexer lexer, Node field, short mode)
+        {
+            Node node;
+            TagTable tt = lexer.configuration.tt;
+
+            lexer.insert = -1; // defer implicit inline start tags
+
+            while ((node = lexer.getToken(Lexer.IGNORE_WHITESPACE)) != null)
+            {
+                if (node.tag == field.tag && node.type == Node.END_TAG)
+                {
+                    field.closed = true;
+                    Node.trimSpaces(lexer, field);
+                    return;
+                }
+
+                // deal with comments etc.
+                if (Node.insertMisc(field, node))
+                {
+                    continue;
+                }
+
+                if (node.type == Node.START_TAG && (node.tag == tt.tagOption || node.tag == tt.tagOptgroup))
+                {
+                    if (node.tag == tt.tagOptgroup)
+                    {
+                        lexer.report.warning(lexer, field, node, Report.CANT_BE_NESTED);
+                    }
+
+                    field.insertNodeAtEnd(node);
+                    parseTag(lexer, node, Lexer.MIXED_CONTENT);
+                    continue;
+                }
+
+                // discard unexpected tags
+                lexer.report.warning(lexer, field, node, Report.DISCARDING_UNEXPECTED);
+            }
+        }
+
+    }
+
+    /**
+     * HTML is the top level element.
+     */
+    public static Node parseDocument(Lexer lexer)
+    {
+        Node node, document, html;
+        Node doctype = null;
+        TagTable tt = lexer.configuration.tt;
+
+        document = lexer.newNode();
+        document.type = Node.ROOT_NODE;
+
+        lexer.root = document;
+
+        while ((node = lexer.getToken(Lexer.IGNORE_WHITESPACE)) != null)
+        {
+            // deal with comments etc.
+            if (Node.insertMisc(document, node))
+            {
+                continue;
+            }
+
+            if (node.type == Node.DOCTYPE_TAG)
+            {
+                if (doctype == null)
+                {
+                    document.insertNodeAtEnd(node);
+                    doctype = node;
+                }
+                else
+                {
+                    lexer.report.warning(lexer, document, node, Report.DISCARDING_UNEXPECTED);
+                }
+                continue;
+            }
+
+            if (node.type == Node.END_TAG)
+            {
+                lexer.report.warning(lexer, document, node, Report.DISCARDING_UNEXPECTED); //TODO?
+                continue;
+            }
+
+            if (node.type != Node.START_TAG || node.tag != tt.tagHtml)
+            {
+                lexer.ungetToken();
+                html = lexer.inferredTag("html");
+            }
+            else
+            {
+                html = node;
+            }
+
+            if (document.findDocType() == null && !lexer.configuration.bodyOnly)
+            {
+                lexer.report.warning(lexer, null, null, Report.MISSING_DOCTYPE);
+            }
+
+            document.insertNodeAtEnd(html);
+            HTML.parse(lexer, html, (short) 0); // TODO?
+            break;
+        }
+
+        return document;
+    }
+
+    /**
+     * Indicates whether or not whitespace should be preserved for this element. If an <code>xml:space</code>
+     * attribute is found, then if the attribute value is <code>preserve</code>, returns <code>true</code>. For
+     * any other value, returns <code>false</code>. If an <code>xml:space</code> attribute was <em>not</em>
+     * found, then the following element names result in a return value of <code>true:
+     *  pre, script, style,</code> and
+     * <code>xsl:text</code>. Finally, if a <code>TagTable</code> was passed in and the element appears as the
+     * "pre" element in the <code>TagTable</code>, then <code>true</code> will be returned. Otherwise,
+     * <code>false</code> is returned.
+     * @param element The <code>Node</code> to test to see if whitespace should be preserved.
+     * @param tt The <code>TagTable</code> to test for the <code>getNodePre()</code> function. This may be
+     * <code>null</code>, in which case this test is bypassed.
+     * @return <code>true</code> or <code>false</code>, as explained above.
+     */
+    public static boolean XMLPreserveWhiteSpace(Node element, TagTable tt)
+    {
+        AttVal attribute;
+
+        // search attributes for xml:space
+        for (attribute = element.attributes; attribute != null; attribute = attribute.next)
+        {
+            if (attribute.attribute.equals("xml:space"))
+            {
+                if (attribute.value.equals("preserve"))
+                {
+                    return true;
+                }
+
+                return false;
+            }
+        }
+
+        if (element.element == null) // Debian Bug #137124. Fix based on suggestion by Cesar Eduardo Barros 06 Mar 02
+        {
+            return false;
+        }
+
+        // kludge for html docs without explicit xml:space attribute
+        if ("pre".equalsIgnoreCase(element.element)
+            || "script".equalsIgnoreCase(element.element)
+            || "style".equalsIgnoreCase(element.element))
+        {
+            return true;
+        }
+
+        if ((tt != null) && (tt.findParser(element) == PRE))
+        {
+            return true;
+        }
+
+        // kludge for XSL docs
+        if ("xsl:text".equalsIgnoreCase(element.element))
+        {
+            return true;
+        }
+
+        return false;
+    }
+
+    /**
+     * XML documents.
+     */
+    public static void parseXMLElement(Lexer lexer, Node element, short mode)
+    {
+        Node node;
+
+        // if node is pre or has xml:space="preserve" then do so
+
+        if (XMLPreserveWhiteSpace(element, lexer.configuration.tt))
+        {
+            mode = Lexer.PREFORMATTED;
+        }
+
+        while ((node = lexer.getToken(mode)) != null)
+        {
+            if (node.type == Node.END_TAG && node.element.equals(element.element))
+            {
+                element.closed = true;
+                break;
+            }
+
+            // discard unexpected end tags
+            if (node.type == Node.END_TAG)
+            {
+                lexer.report.error(lexer, element, node, Report.UNEXPECTED_ENDTAG);
+                continue;
+            }
+
+            // parse content on seeing start tag
+            if (node.type == Node.START_TAG)
+            {
+                parseXMLElement(lexer, node, mode);
+            }
+
+            element.insertNodeAtEnd(node);
+        }
+
+        // if first child is text then trim initial space and delete text node if it is empty.
+
+        node = element.content;
+
+        if (node != null && node.type == Node.TEXT_NODE && mode != Lexer.PREFORMATTED)
+        {
+            if (node.textarray[node.start] == (byte) ' ')
+            {
+                node.start++;
+
+                if (node.start >= node.end)
+                {
+                    Node.discardElement(node);
+                }
+            }
+        }
+
+        // if last child is text then trim final space and delete the text node if it is empty
+
+        node = element.last;
+
+        if (node != null && node.type == Node.TEXT_NODE && mode != Lexer.PREFORMATTED)
+        {
+            if (node.textarray[node.end - 1] == (byte) ' ')
+            {
+                node.end--;
+
+                if (node.start >= node.end)
+                {
+                    Node.discardElement(node);
+                }
+            }
+        }
+    }
+
+    public static Node parseXMLDocument(Lexer lexer)
+    {
+        Node node, document, doctype;
+
+        document = lexer.newNode();
+        document.type = Node.ROOT_NODE;
+        doctype = null;
+        lexer.configuration.xmlTags = true;
+
+        while ((node = lexer.getToken(Lexer.IGNORE_WHITESPACE)) != null)
+        {
+            // discard unexpected end tags
+            if (node.type == Node.END_TAG)
+            {
+                lexer.report.warning(lexer, null, node, Report.UNEXPECTED_ENDTAG);
+                continue;
+            }
+
+            // deal with comments etc.
+            if (Node.insertMisc(document, node))
+            {
+                continue;
+            }
+
+            if (node.type == Node.DOCTYPE_TAG)
+            {
+                if (doctype == null)
+                {
+                    document.insertNodeAtEnd(node);
+                    doctype = node;
+                }
+                else
+                {
+                    lexer.report.warning(lexer, document, node, Report.DISCARDING_UNEXPECTED); // TODO
+                }
+                continue;
+            }
+
+            if (node.type == Node.START_END_TAG)
+            {
+                document.insertNodeAtEnd(node);
+                continue;
+            }
+
+            // if start tag then parse element's content
+            if (node.type == Node.START_TAG)
+            {
+                document.insertNodeAtEnd(node);
+                parseXMLElement(lexer, node, Lexer.IGNORE_WHITESPACE);
+            }
+
+        }
+
+        if (doctype != null && !lexer.checkDocTypeKeyWords(doctype))
+        {
+            lexer.report.warning(lexer, doctype, null, Report.DTYPE_NOT_UPPER_CASE);
+        }
+
+        // ensure presence of initial <?XML version="1.0"?>
+        if (lexer.configuration.xmlPi)
+        {
+            lexer.fixXmlDecl(document);
+        }
+
+        return document;
+    }
+
+    /**
+     * errors in positioning of form start or end tags generally require human intervention to fix.
+     */
+    static void badForm(Lexer lexer)
+    {
+        lexer.badForm = 1;
+        lexer.errors++;
+    }
+
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/Report.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/Report.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/Report.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1844 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ *  Java HTML Tidy - JTidy
+ *  HTML parser and pretty printer
+ *
+ *  Copyright (c) 1998-2000 World Wide Web Consortium (Massachusetts
+ *  Institute of Technology, Institut National de Recherche en
+ *  Informatique et en Automatique, Keio University). All Rights
+ *  Reserved.
+ *
+ *  Contributing Author(s):
+ *
+ *     Dave Raggett <dsr at w3.org>
+ *     Andy Quick <ac.quick at sympatico.ca> (translation to Java)
+ *     Gary L Peskin <garyp at firstech.com> (Java development)
+ *     Sami Lempinen <sami at lempinen.net> (release management)
+ *     Fabrizio Giustina <fgiust at users.sourceforge.net>
+ *
+ *  The contributing author(s) would like to thank all those who
+ *  helped with testing, bug fixes, and patience.  This wouldn't
+ *  have been possible without all of you.
+ *
+ *  COPYRIGHT NOTICE:
+ * 
+ *  This software and documentation is provided "as is," and
+ *  the copyright holders and contributing author(s) make no
+ *  representations or warranties, express or implied, including
+ *  but not limited to, warranties of merchantability or fitness
+ *  for any particular purpose or that the use of the software or
+ *  documentation will not infringe any third party patents,
+ *  copyrights, trademarks or other rights. 
+ *
+ *  The copyright holders and contributing author(s) will not be
+ *  liable for any direct, indirect, special or consequential damages
+ *  arising out of any use of the software or documentation, even if
+ *  advised of the possibility of such damage.
+ *
+ *  Permission is hereby granted to use, copy, modify, and distribute
+ *  this source code, or portions hereof, documentation and executables,
+ *  for any purpose, without fee, subject to the following restrictions:
+ *
+ *  1. The origin of this source code must not be misrepresented.
+ *  2. Altered versions must be plainly marked as such and must
+ *     not be misrepresented as being the original source.
+ *  3. This Copyright notice may not be removed or altered from any
+ *     source or altered source distribution.
+ * 
+ *  The copyright holders and contributing author(s) specifically
+ *  permit, without fee, and encourage the use of this source code
+ *  as a component for supporting the Hypertext Markup Language in
+ *  commercial products. If you use this source code in a product,
+ *  acknowledgment is not required but would be appreciated.
+ *
+ */
+package org.ajax4jsf.org.w3c.tidy;
+
+import java.io.PrintWriter;
+import java.text.MessageFormat;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+import org.ajax4jsf.org.w3c.tidy.TidyMessage.Level;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+
+
+/**
+ * Error/informational message reporter. You should only need to edit the file TidyMessages.properties to localize HTML
+ * tidy.
+ * @author Dave Raggett <a href="mailto:dsr at w3.org">dsr at w3.org </a>
+ * @author Andy Quick <a href="mailto:ac.quick at sympatico.ca">ac.quick at sympatico.ca </a> (translation to Java)
+ * @author Fabrizio Giustina
+ * @version $Revision: 1.1.2.1 $ ($Author: alexsmirnov $)
+ */
+public final class Report
+{
+
+	private static final Log log = LogFactory.getLog(Report.class);
+	
+    /**
+     * used to point to Web Accessibility Guidelines.
+     */
+    public static final String ACCESS_URL = "http://www.w3.org/WAI/GL";
+
+    /**
+     * Release date.
+     */
+    public static final Date RELEASE_DATE = new Date(1096227718000L);
+
+    /**
+     * Release date String.
+     */
+    public static final String RELEASE_DATE_STRING = new SimpleDateFormat("dd MMM yyyy").format(RELEASE_DATE);
+
+    /**
+     * invalid entity: missing semicolon.
+     */
+    public static final short MISSING_SEMICOLON = 1;
+
+    /**
+     * invalid entity: missing semicolon.
+     */
+    public static final short MISSING_SEMICOLON_NCR = 2;
+
+    /**
+     * invalid entity: unknown entity.
+     */
+    public static final short UNKNOWN_ENTITY = 3;
+
+    /**
+     * invalid entity: unescaped ampersand.
+     */
+    public static final short UNESCAPED_AMPERSAND = 4;
+
+    /**
+     * invalid entity: apos undefined in current definition.
+     */
+    public static final short APOS_UNDEFINED = 5;
+
+    /**
+     * missing an end tag.
+     */
+    public static final short MISSING_ENDTAG_FOR = 6;
+
+    /**
+     * missing end tag before.
+     */
+    public static final short MISSING_ENDTAG_BEFORE = 7;
+
+    /**
+     * discarding unexpected element.
+     */
+    public static final short DISCARDING_UNEXPECTED = 8;
+
+    /**
+     * nested emphasis.
+     */
+    public static final short NESTED_EMPHASIS = 9;
+
+    /**
+     * non matching end tag.
+     */
+    public static final short NON_MATCHING_ENDTAG = 10;
+
+    /**
+     * tag not allowed in.
+     */
+    public static final short TAG_NOT_ALLOWED_IN = 11;
+
+    /**
+     * missing start tag.
+     */
+    public static final short MISSING_STARTTAG = 12;
+
+    /**
+     * unexpected end tag.
+     */
+    public static final short UNEXPECTED_ENDTAG = 13;
+
+    /**
+     * unsing br in place of.
+     */
+    public static final short USING_BR_INPLACE_OF = 14;
+
+    /**
+     * inserting tag.
+     */
+    public static final short INSERTING_TAG = 15;
+
+    /**
+     * suspected missing quote.
+     */
+    public static final short SUSPECTED_MISSING_QUOTE = 16;
+
+    /**
+     * missing title element.
+     */
+    public static final short MISSING_TITLE_ELEMENT = 17;
+
+    /**
+     * duplicate frameset.
+     */
+    public static final short DUPLICATE_FRAMESET = 18;
+
+    /**
+     * elments can be nested.
+     */
+    public static final short CANT_BE_NESTED = 19;
+
+    /**
+     * obsolete element.
+     */
+    public static final short OBSOLETE_ELEMENT = 20;
+
+    /**
+     * proprietary element.
+     */
+    public static final short PROPRIETARY_ELEMENT = 21;
+
+    /**
+     * unknown element.
+     */
+    public static final short UNKNOWN_ELEMENT = 22;
+
+    /**
+     * trim empty element.
+     */
+    public static final short TRIM_EMPTY_ELEMENT = 23;
+
+    /**
+     * coerce to end tag.
+     */
+    public static final short COERCE_TO_ENDTAG = 24;
+
+    /**
+     * illegal nesting.
+     */
+    public static final short ILLEGAL_NESTING = 25;
+
+    /**
+     * noframes content.
+     */
+    public static final short NOFRAMES_CONTENT = 26;
+
+    /**
+     * content after body.
+     */
+    public static final short CONTENT_AFTER_BODY = 27;
+
+    /**
+     * inconsistent version.
+     */
+    public static final short INCONSISTENT_VERSION = 28;
+
+    /**
+     * malformed comment.
+     */
+    public static final short MALFORMED_COMMENT = 29;
+
+    /**
+     * bad coment chars.
+     */
+    public static final short BAD_COMMENT_CHARS = 30;
+
+    /**
+     * bad xml comment.
+     */
+    public static final short BAD_XML_COMMENT = 31;
+
+    /**
+     * bad cdata comment.
+     */
+    public static final short BAD_CDATA_CONTENT = 32;
+
+    /**
+     * inconsistent namespace.
+     */
+    public static final short INCONSISTENT_NAMESPACE = 33;
+
+    /**
+     * doctype after tags.
+     */
+    public static final short DOCTYPE_AFTER_TAGS = 34;
+
+    /**
+     * malformed doctype.
+     */
+    public static final short MALFORMED_DOCTYPE = 35;
+
+    /**
+     * unexpected end of file.
+     */
+    public static final short UNEXPECTED_END_OF_FILE = 36;
+
+    /**
+     * doctype not upper case.
+     */
+    public static final short DTYPE_NOT_UPPER_CASE = 37;
+
+    /**
+     * too many element.
+     */
+    public static final short TOO_MANY_ELEMENTS = 38;
+
+    /**
+     * unescaped element.
+     */
+    public static final short UNESCAPED_ELEMENT = 39;
+
+    /**
+     * nested quotation.
+     */
+    public static final short NESTED_QUOTATION = 40;
+
+    /**
+     * element not empty.
+     */
+    public static final short ELEMENT_NOT_EMPTY = 41;
+
+    /**
+     * encoding IO conflict.
+     */
+    public static final short ENCODING_IO_CONFLICT = 42;
+
+    /**
+     * mixed content in block.
+     */
+    public static final short MIXED_CONTENT_IN_BLOCK = 43;
+
+    /**
+     * missing doctype.
+     */
+    public static final short MISSING_DOCTYPE = 44;
+
+    /**
+     * space preceding xml declaration.
+     */
+    public static final short SPACE_PRECEDING_XMLDECL = 45;
+
+    /**
+     * too many elements in.
+     */
+    public static final short TOO_MANY_ELEMENTS_IN = 46;
+
+    /**
+     * unexpected endag in.
+     */
+    public static final short UNEXPECTED_ENDTAG_IN = 47;
+
+    /**
+     * replacing element.
+     */
+    public static final short REPLACING_ELEMENT = 83;
+
+    /**
+     * replacing unexcaped element.
+     */
+    public static final short REPLACING_UNEX_ELEMENT = 84;
+
+    /**
+     * coerce to endtag.
+     */
+    public static final short COERCE_TO_ENDTAG_WARN = 85;
+
+    /**
+     * attribute: unknown attribute.
+     */
+    public static final short UNKNOWN_ATTRIBUTE = 48;
+
+    /**
+     * attribute: missing attribute.
+     */
+    public static final short MISSING_ATTRIBUTE = 49;
+
+    /**
+     * attribute: missing attribute value.
+     */
+    public static final short MISSING_ATTR_VALUE = 50;
+
+    /**
+     * attribute: bad attribute value.
+     */
+    public static final short BAD_ATTRIBUTE_VALUE = 51;
+
+    /**
+     * attribute: unexpected gt.
+     */
+    public static final short UNEXPECTED_GT = 52;
+
+    /**
+     * attribute: proprietary attribute.
+     */
+    public static final short PROPRIETARY_ATTRIBUTE = 53;
+
+    /**
+     * attribute: proprietary attribute value.
+     */
+    public static final short PROPRIETARY_ATTR_VALUE = 54;
+
+    /**
+     * attribute: repeated attribute.
+     */
+    public static final short REPEATED_ATTRIBUTE = 55;
+
+    /**
+     * attribute: missing image map.
+     */
+    public static final short MISSING_IMAGEMAP = 56;
+
+    /**
+     * attribute: xml attribute value.
+     */
+    public static final short XML_ATTRIBUTE_VALUE = 57;
+
+    /**
+     * attribute: missing quotemark.
+     */
+    public static final short MISSING_QUOTEMARK = 58;
+
+    /**
+     * attribute: unexpected quotemark.
+     */
+    public static final short UNEXPECTED_QUOTEMARK = 59;
+
+    /**
+     * attribute: id and name mismatch.
+     */
+    public static final short ID_NAME_MISMATCH = 60;
+
+    /**
+     * attribute: backslash in URI.
+     */
+    public static final short BACKSLASH_IN_URI = 61;
+
+    /**
+     * attribute: fixed backslash.
+     */
+    public static final short FIXED_BACKSLASH = 62;
+
+    /**
+     * attribute: illegal URI reference.
+     */
+    public static final short ILLEGAL_URI_REFERENCE = 63;
+
+    /**
+     * attribute: escaped illegal URI.
+     */
+    public static final short ESCAPED_ILLEGAL_URI = 64;
+
+    /**
+     * attribute: newline in URI.
+     */
+    public static final short NEWLINE_IN_URI = 65;
+
+    /**
+     * attribute: anchor not unique.
+     */
+    public static final short ANCHOR_NOT_UNIQUE = 66;
+
+    /**
+     * attribute: entity in id.
+     */
+    public static final short ENTITY_IN_ID = 67;
+
+    /**
+     * attribute: joining attribute.
+     */
+    public static final short JOINING_ATTRIBUTE = 68;
+
+    /**
+     * attribute: expected equalsign.
+     */
+    public static final short UNEXPECTED_EQUALSIGN = 69;
+
+    /**
+     * attribute: attribute value not lower case.
+     */
+    public static final short ATTR_VALUE_NOT_LCASE = 70;
+
+    /**
+     * attribute: id sintax.
+     */
+    public static final short XML_ID_SYNTAX = 71;
+
+    /**
+     * attribute: invalid attribute.
+     */
+    public static final short INVALID_ATTRIBUTE = 72;
+
+    /**
+     * attribute: bad attribute value replaced.
+     */
+    public static final short BAD_ATTRIBUTE_VALUE_REPLACED = 73;
+
+    /**
+     * attribute: invalid xml id.
+     */
+    public static final short INVALID_XML_ID = 74;
+
+    /**
+     * attribute: unexpected end of file.
+     */
+    public static final short UNEXPECTED_END_OF_FILE_ATTR = 75;
+
+    /**
+     * character encoding: vendor specific chars.
+     */
+    public static final short VENDOR_SPECIFIC_CHARS = 76;
+
+    /**
+     * character encoding: invalid sgml chars.
+     */
+    public static final short INVALID_SGML_CHARS = 77;
+
+    /**
+     * character encoding: invalid utf8.
+     */
+    public static final short INVALID_UTF8 = 78;
+
+    /**
+     * character encoding: invalid utf16.
+     */
+    public static final short INVALID_UTF16 = 79;
+
+    /**
+     * character encoding: encoding mismatch.
+     */
+    public static final short ENCODING_MISMATCH = 80;
+
+    /**
+     * character encoding: nvalid URI.
+     */
+    public static final short INVALID_URI = 81;
+
+    /**
+     * character encoding: invalid NCR.
+     */
+    public static final short INVALID_NCR = 82;
+
+    /**
+     * Constant used for reporting of given doctype.
+     */
+    public static final short DOCTYPE_GIVEN_SUMMARY = 110;
+
+    /**
+     * Constant used for reporting of version summary.
+     */
+    public static final short REPORT_VERSION_SUMMARY = 111;
+
+    /**
+     * Constant used for reporting of bad access summary.
+     */
+    public static final short BADACCESS_SUMMARY = 112;
+
+    /**
+     * Constant used for reporting of bad form summary.
+     */
+    public static final short BADFORM_SUMMARY = 113;
+
+    /**
+     * accessibility flaw: missing image map.
+     */
+    public static final short MISSING_IMAGE_ALT = 1;
+
+    /**
+     * accessibility flaw: missing link alt.
+     */
+    public static final short MISSING_LINK_ALT = 2;
+
+    /**
+     * accessibility flaw: missing summary.
+     */
+    public static final short MISSING_SUMMARY = 4;
+
+    /**
+     * accessibility flaw: missing image map.
+     */
+    public static final short MISSING_IMAGE_MAP = 8;
+
+    /**
+     * accessibility flaw: using frames.
+     */
+    public static final short USING_FRAMES = 16;
+
+    /**
+     * accessibility flaw: using noframes.
+     */
+    public static final short USING_NOFRAMES = 32;
+
+    /**
+     * presentation flaw: using spacer.
+     */
+    public static final short USING_SPACER = 1;
+
+    /**
+     * presentation flaw: using layer.
+     */
+    public static final short USING_LAYER = 2;
+
+    /**
+     * presentation flaw: using nobr.
+     */
+    public static final short USING_NOBR = 4;
+
+    /**
+     * presentation flaw: using font.
+     */
+    public static final short USING_FONT = 8;
+
+    /**
+     * presentation flaw: using body.
+     */
+    public static final short USING_BODY = 16;
+
+    /**
+     * character encoding error: windows chars.
+     */
+    public static final short WINDOWS_CHARS = 1;
+
+    /**
+     * character encoding error: non ascii.
+     */
+    public static final short NON_ASCII = 2;
+
+    /**
+     * character encoding error: found utf16.
+     */
+    public static final short FOUND_UTF16 = 4;
+
+    /**
+     * char has been replaced.
+     */
+    public static final short REPLACED_CHAR = 0;
+
+    /**
+     * char has been discarder.
+     */
+    public static final short DISCARDED_CHAR = 1;
+
+    /**
+     * Resource bundle with messages.
+     */
+    private static ResourceBundle res;
+
+    /**
+     * Printed in GNU Emacs messages.
+     */
+    private String currentFile;
+
+    /**
+     * message listener for error reporting.
+     */
+    private TidyMessageListener listener;
+
+    static
+    {
+        try
+        {
+            res = ResourceBundle.getBundle("org/ajax4jsf/org/w3c/tidy/TidyMessages");
+        }
+        catch (MissingResourceException e)
+        {
+            throw new Error(e.toString());
+        }
+    }
+
+    /**
+     * Instantiated only in Tidy() constructor.
+     */
+    protected Report()
+    {
+        super();
+    }
+
+    /**
+     * Generates a complete message for the warning/error. The message is composed by:
+     * <ul>
+     * <li>position in file</li>
+     * <li>prefix for the error level (warning: | error:)</li>
+     * <li>message read from ResourceBundle</li>
+     * <li>optional parameters added to message using MessageFormat</li>
+     * </ul>
+     * @param errorCode tidy error code
+     * @param lexer Lexer
+     * @param element last appended element - for insert comment in generated dom tree with error message.
+     * @param message key for the ResourceBundle
+     * @param params optional parameters added with MessageFormat
+     * @param level message level. One of <code>TidyMessage.LEVEL_ERROR</code>,
+     * <code>TidyMessage.LEVEL_WARNING</code>,<code>TidyMessage.LEVEL_INFO</code>
+     * @return formatted message
+     * @throws MissingResourceException if <code>message</code> key is not available in jtidy resource bundle.
+     * @see TidyMessage
+     */
+    protected String getMessage(int errorCode, Lexer lexer, Node element, String message, Object[] params, Level level)
+        throws MissingResourceException
+    {
+        String resource;
+        resource = res.getString(message);
+
+        String position;
+
+        if (lexer != null && level != Level.SUMMARY)
+        {
+            position = getPosition(lexer);
+        }
+        else
+        {
+            position = "";
+        }
+
+        String prefix;
+
+        if (level == Level.ERROR)
+        {
+            prefix = res.getString("error");
+        }
+        else if (level == Level.WARNING)
+        {
+            prefix = res.getString("warning");
+        }
+        else
+        {
+            prefix = "";
+        }
+
+        String messageString;
+
+        if (params != null)
+        {
+            messageString = MessageFormat.format(resource, params);
+        }
+        else
+        {
+            messageString = resource;
+        }
+
+        if (listener != null)
+        {
+            TidyMessage msg = new TidyMessage(errorCode, (lexer != null) ? lexer.lines : 0, (lexer != null)
+                ? lexer.columns
+                : 0, level, messageString);
+            // Changed by asmirnov - add reference to lexer for manipulate tree.
+            msg.setLexer(lexer);
+            msg.setElement(element);
+            listener.messageReceived(msg);
+        }
+
+        return position + prefix + messageString;
+    }
+
+    /**
+     * Prints a message to lexer.errout after calling getMessage().
+     * @param errorCode tidy error code
+     * @param lexer Lexer
+     * @param element TODO
+     * @param message key for the ResourceBundle
+     * @param params optional parameters added with MessageFormat
+     * @param level message level. One of <code>TidyMessage.LEVEL_ERROR</code>,
+     * <code>TidyMessage.LEVEL_WARNING</code>,<code>TidyMessage.LEVEL_INFO</code>
+     * @see TidyMessage
+     */
+    private void printMessage(int errorCode, Lexer lexer, Node element, String message, Object[] params, Level level)
+    {
+        String resource;
+        try
+        {
+            resource = getMessage(errorCode, lexer, element, message, params, level);
+        }
+        catch (MissingResourceException e)
+        {
+            lexer.errout.println(e.toString());
+            return;
+        }
+
+        lexer.errout.println(resource);
+    }
+
+    /**
+     * Prints a message to errout after calling getMessage(). Used when lexer is not yet defined.
+     * @param errout PrintWriter
+     * @param message key for the ResourceBundle
+     * @param params optional parameters added with MessageFormat
+     * @param level message level. One of <code>TidyMessage.LEVEL_ERROR</code>,
+     * <code>TidyMessage.LEVEL_WARNING</code>,<code>TidyMessage.LEVEL_INFO</code>
+     * @see TidyMessage
+     */
+    private void printMessage(PrintWriter errout, String message, Object[] params, Level level)
+    {
+        String resource;
+        try
+        {
+            resource = getMessage(-1, null, null, message, params, level);
+        }
+        catch (MissingResourceException e)
+        {
+            errout.println(e.toString());
+            return;
+        }
+        errout.println(resource);
+    }
+
+    /**
+     * print version information.
+     * @param p printWriter
+     */
+    public void showVersion(PrintWriter p)
+    {
+        printMessage(p, "version_summary", new Object[]{RELEASE_DATE}, Level.SUMMARY);
+    }
+
+    /**
+     * Returns a formatted tag name handling start and ent tags, nulls, doctypes, and text.
+     * @param tag Node
+     * @return formatted tag name
+     */
+    private String getTagName(Node tag)
+    {
+        if (tag != null)
+        {
+            if (tag.type == Node.START_TAG)
+            {
+                return "<" + tag.element + ">";
+            }
+            else if (tag.type == Node.END_TAG)
+            {
+                return "</" + tag.element + ">";
+            }
+            else if (tag.type == Node.DOCTYPE_TAG)
+            {
+                return "<!DOCTYPE>";
+            }
+            else if (tag.type == Node.TEXT_NODE)
+            {
+                return "plain text";
+            }
+            else
+            {
+                return tag.element;
+            }
+        }
+        return "";
+    }
+
+    /**
+     * Prints an "unknown option" error message. Lexer is not defined when this is called.
+     * @param option unknown option name
+     */
+    public void unknownOption(String option)
+    {
+        try
+        {
+            log.error(MessageFormat.format(res.getString("unknown_option"), new Object[]{option}));
+        }
+        catch (MissingResourceException e)
+        {
+            log.error(e.toString());
+        }
+    }
+
+    /**
+     * Prints a "bad argument" error message. Lexer is not defined when this is called.
+     * @param key argument name
+     * @param value bad argument value
+     */
+    public void badArgument(String key, String value)
+    {
+        try
+        {
+        	log.error(MessageFormat.format(res.getString("bad_argument"), new Object[]{value, key}));
+        }
+        catch (MissingResourceException e)
+        {
+        	log.error(e.toString());
+        }
+    }
+
+    /**
+     * Returns a formatted String describing the current position in file.
+     * @param lexer Lexer
+     * @return String position ("line:column")
+     */
+    private String getPosition(Lexer lexer)
+    {
+        try
+        {
+            // Change formatting to be parsable by GNU Emacs
+            if (lexer.configuration.emacs)
+            {
+                return MessageFormat.format(res.getString("emacs_format"), new Object[]{
+                    this.currentFile,
+                    new Integer(lexer.lines),
+                    new Integer(lexer.columns)})
+                    + " ";
+            }
+            // traditional format
+            return MessageFormat.format(res.getString("line_column"), new Object[]{
+                new Integer(lexer.lines),
+                new Integer(lexer.columns)});
+
+        }
+        catch (MissingResourceException e)
+        {
+            lexer.errout.println(e.toString());
+        }
+        return "";
+    }
+
+    /**
+     * Prints encoding error messages.
+     * @param lexer Lexer
+     * @param code error code
+     * @param c invalid char
+     */
+    public void encodingError(Lexer lexer, int code, int c)
+    {
+        lexer.warnings++;
+
+        if (lexer.errors > lexer.configuration.showErrors) // keep quiet after <showErrors> errors
+        {
+            return;
+        }
+
+        if (lexer.configuration.showWarnings)
+        {
+            String buf = Integer.toHexString(c);
+
+            // An encoding mismatch is currently treated as a non-fatal error
+            if ((code & ~DISCARDED_CHAR) == ENCODING_MISMATCH)
+            {
+                // actual encoding passed in "c"
+                lexer.badChars |= ENCODING_MISMATCH;
+                printMessage(
+                    code,
+                    lexer,
+                    null,
+                    "encoding_mismatch",
+                    new Object[]{
+                        lexer.configuration.getInCharEncodingName(),
+                        ParsePropertyImpl.CHAR_ENCODING.getFriendlyName(null, new Integer(c), lexer.configuration)}, Level.WARNING);
+            }
+            else if ((code & ~DISCARDED_CHAR) == VENDOR_SPECIFIC_CHARS)
+            {
+                lexer.badChars |= VENDOR_SPECIFIC_CHARS;
+                printMessage(
+                    code,
+                    lexer,
+                    null,
+                    "invalid_char",
+                    new Object[]{new Integer(code & DISCARDED_CHAR), buf}, Level.WARNING);
+            }
+            else if ((code & ~DISCARDED_CHAR) == INVALID_SGML_CHARS)
+            {
+                lexer.badChars |= INVALID_SGML_CHARS;
+                printMessage(
+                    code,
+                    lexer,
+                    null,
+                    "invalid_char",
+                    new Object[]{new Integer(code & DISCARDED_CHAR), buf}, Level.WARNING);
+            }
+            else if ((code & ~DISCARDED_CHAR) == INVALID_UTF8)
+            {
+                lexer.badChars |= INVALID_UTF8;
+                printMessage(
+                    code,
+                    lexer,
+                    null,
+                    "invalid_utf8",
+                    new Object[]{new Integer(code & DISCARDED_CHAR), buf}, Level.WARNING);
+            }
+
+            else if ((code & ~DISCARDED_CHAR) == INVALID_UTF16)
+            {
+                lexer.badChars |= INVALID_UTF16;
+                printMessage(
+                    code,
+                    lexer,
+                    null,
+                    "invalid_utf16",
+                    new Object[]{new Integer(code & DISCARDED_CHAR), buf}, Level.WARNING);
+
+            }
+
+            else if ((code & ~DISCARDED_CHAR) == INVALID_NCR)
+            {
+                lexer.badChars |= INVALID_NCR;
+                printMessage(
+                    code,
+                    lexer,
+                    null,
+                    "invalid_ncr",
+                    new Object[]{new Integer(code & DISCARDED_CHAR), buf}, Level.WARNING);
+            }
+
+        }
+    }
+
+    /**
+     * Prints entity error messages.
+     * @param lexer Lexer
+     * @param code error code
+     * @param entity invalid entity String
+     * @param c invalid char
+     */
+    public void entityError(Lexer lexer, short code, String entity, int c)
+    {
+        lexer.warnings++;
+
+        if (lexer.errors > lexer.configuration.showErrors) // keep quiet after <showErrors> errors
+        {
+            return;
+        }
+
+        if (lexer.configuration.showWarnings)
+        {
+            switch (code)
+            {
+                case MISSING_SEMICOLON :
+                    printMessage(code, lexer, null, "missing_semicolon", new Object[]{entity}, Level.WARNING);
+                    break;
+                case MISSING_SEMICOLON_NCR :
+                    printMessage(code, lexer, null, "missing_semicolon_ncr", new Object[]{entity}, Level.WARNING);
+                    break;
+                case UNKNOWN_ENTITY :
+                    printMessage(code, lexer, null, "unknown_entity", new Object[]{entity}, Level.WARNING);
+                    break;
+                case UNESCAPED_AMPERSAND :
+                    printMessage(code, lexer, null, "unescaped_ampersand", null, Level.WARNING);
+                    break;
+                case APOS_UNDEFINED :
+                    printMessage(code, lexer, null, "apos_undefined", null, Level.WARNING);
+                    break;
+                default :
+                    // should not reach here
+                    break;
+            }
+        }
+    }
+
+    /**
+     * Prints error messages for attributes.
+     * @param lexer Lexer
+     * @param node current tag
+     * @param attribute attribute
+     * @param code error code
+     */
+    public void attrError(Lexer lexer, Node node, AttVal attribute, short code)
+    {
+    	// for insertion message BEFORE node.
+    	Node element = (node != null && node.prev != null)?node.prev:node;
+        if (code == UNEXPECTED_GT)
+        {
+            lexer.errors++;
+        }
+        else
+        {
+            lexer.warnings++;
+        }
+
+        if (lexer.errors > lexer.configuration.showErrors) // keep quiet after <showErrors> errors
+        {
+            return;
+        }
+
+        if (code == UNEXPECTED_GT) // error
+        {
+            printMessage(code, lexer, element, "unexpected_gt", new Object[]{getTagName(node)}, Level.ERROR);
+        }
+
+        if (!lexer.configuration.showWarnings) // warnings
+        {
+            return;
+        }
+
+        switch (code)
+        {
+            case UNKNOWN_ATTRIBUTE :
+                printMessage(code, lexer, element, "unknown_attribute", new Object[]{attribute.attribute}, Level.WARNING);
+                break;
+
+            case MISSING_ATTRIBUTE :
+                printMessage(
+                    code,
+                    lexer,
+                    element,
+                    "missing_attribute",
+                    new Object[]{getTagName(node), attribute.attribute}, Level.WARNING);
+                break;
+
+            case MISSING_ATTR_VALUE :
+                printMessage(
+                    code,
+                    lexer,
+                    element,
+                    "missing_attr_value",
+                    new Object[]{getTagName(node), attribute.attribute}, Level.WARNING);
+                break;
+
+            case MISSING_IMAGEMAP :
+                printMessage(code, lexer, element, "missing_imagemap", new Object[]{getTagName(node)}, Level.WARNING);
+                lexer.badAccess |= MISSING_IMAGE_MAP;
+                break;
+
+            case BAD_ATTRIBUTE_VALUE :
+                printMessage(code, lexer, element, "bad_attribute_value", new Object[]{
+					    getTagName(node),
+					    attribute.attribute,
+					    attribute.value}, Level.WARNING);
+                break;
+
+            case XML_ID_SYNTAX :
+                printMessage(
+                    code,
+                    lexer,
+                    element,
+                    "xml_id_sintax",
+                    new Object[]{getTagName(node), attribute.attribute}, Level.WARNING);
+                break;
+
+            case XML_ATTRIBUTE_VALUE :
+                printMessage(
+                    code,
+                    lexer,
+                    element,
+                    "xml_attribute_value",
+                    new Object[]{getTagName(node), attribute.attribute}, Level.WARNING);
+                break;
+
+            case UNEXPECTED_QUOTEMARK :
+                printMessage(code, lexer, element, "unexpected_quotemark", new Object[]{getTagName(node)}, Level.WARNING);
+                break;
+
+            case MISSING_QUOTEMARK :
+                printMessage(code, lexer, element, "missing_quotemark", new Object[]{getTagName(node)}, Level.WARNING);
+                break;
+
+            case REPEATED_ATTRIBUTE :
+                printMessage(code, lexer, element, "repeated_attribute", new Object[]{
+					    getTagName(node),
+					    attribute.value,
+					    attribute.attribute}, Level.WARNING);
+                break;
+
+            case PROPRIETARY_ATTR_VALUE :
+                printMessage(
+                    code,
+                    lexer,
+                    element,
+                    "proprietary_attr_value",
+                    new Object[]{getTagName(node), attribute.value}, Level.WARNING);
+                break;
+
+            case PROPRIETARY_ATTRIBUTE :
+                printMessage(
+                    code,
+                    lexer,
+                    element,
+                    "proprietary_attribute",
+                    new Object[]{getTagName(node), attribute.attribute}, Level.WARNING);
+                break;
+
+            case UNEXPECTED_END_OF_FILE :
+                // on end of file adjust reported position to end of input
+                lexer.lines = lexer.in.getCurline();
+                lexer.columns = lexer.in.getCurcol();
+                printMessage(code, lexer, element, "unexpected_end_of_file", new Object[]{getTagName(node)}, Level.WARNING);
+                break;
+
+            case ID_NAME_MISMATCH :
+                printMessage(code, lexer, element, "id_name_mismatch", new Object[]{getTagName(node)}, Level.WARNING);
+                break;
+
+            case BACKSLASH_IN_URI :
+                printMessage(code, lexer, element, "backslash_in_uri", new Object[]{getTagName(node)}, Level.WARNING);
+                break;
+
+            case FIXED_BACKSLASH :
+                printMessage(code, lexer, element, "fixed_backslash", new Object[]{getTagName(node)}, Level.WARNING);
+                break;
+
+            case ILLEGAL_URI_REFERENCE :
+                printMessage(code, lexer, element, "illegal_uri_reference", new Object[]{getTagName(node)}, Level.WARNING);
+                break;
+
+            case ESCAPED_ILLEGAL_URI :
+                printMessage(code, lexer, element, "escaped_illegal_uri", new Object[]{getTagName(node)}, Level.WARNING);
+                break;
+
+            case NEWLINE_IN_URI :
+                printMessage(code, lexer, element, "newline_in_uri", new Object[]{getTagName(node)}, Level.WARNING);
+                break;
+
+            case ANCHOR_NOT_UNIQUE :
+                printMessage(
+                    code,
+                    lexer,
+                    element,
+                    "anchor_not_unique",
+                    new Object[]{getTagName(node), attribute.value}, Level.WARNING);
+                break;
+
+            case ENTITY_IN_ID :
+                printMessage(code, lexer, element, "entity_in_id", null, Level.WARNING);
+                break;
+
+            case JOINING_ATTRIBUTE :
+                printMessage(
+                    code,
+                    lexer,
+                    element,
+                    "joining_attribute",
+                    new Object[]{getTagName(node), attribute.attribute}, Level.WARNING);
+                break;
+
+            case UNEXPECTED_EQUALSIGN :
+                printMessage(code, lexer, element, "expected_equalsign", new Object[]{getTagName(node)}, Level.WARNING);
+                break;
+
+            case ATTR_VALUE_NOT_LCASE :
+                printMessage(code, lexer, element, "attr_value_not_lcase", new Object[]{
+					    getTagName(node),
+					    attribute.value,
+					    attribute.attribute}, Level.WARNING);
+                break;
+
+            default :
+                break;
+        }
+    }
+
+    /**
+     * Prints warnings.
+     * @param lexer Lexer
+     * @param element parent/missing tag
+     * @param node current tag
+     * @param code error code
+     */
+    public void warning(Lexer lexer, Node element, Node node, short code)
+    {
+
+        TagTable tt = lexer.configuration.tt;
+        if (!((code == DISCARDING_UNEXPECTED) && lexer.badForm != 0)) // lexer->errors++; already done in BadForm()
+        {
+            lexer.warnings++;
+        }
+
+        // keep quiet after <showErrors> errors
+        if (lexer.errors > lexer.configuration.showErrors)
+        {
+            return;
+        }
+
+        if (lexer.configuration.showWarnings)
+        {
+            switch (code)
+            {
+                case MISSING_ENDTAG_FOR :
+                    printMessage(code, lexer, element, "missing_endtag_for", new Object[]{element.element}, Level.WARNING);
+                    break;
+
+                case MISSING_ENDTAG_BEFORE :
+                    printMessage(
+                        code,
+                        lexer,
+                        element,
+                        "missing_endtag_before",
+                        new Object[]{element.element, getTagName(node)}, Level.WARNING);
+                    break;
+
+                case DISCARDING_UNEXPECTED :
+                    if (lexer.badForm == 0)
+                    {
+                        // the case for when this is an error not a warning, is handled later
+                        printMessage(
+                            code,
+                            lexer,
+                            element,
+                            "discarding_unexpected",
+                            new Object[]{getTagName(node)}, Level.WARNING);
+                    }
+                    break;
+
+                case NESTED_EMPHASIS :
+                    printMessage(code, lexer, element, "nested_emphasis", new Object[]{getTagName(node)}, Level.INFO);
+                    break;
+
+                case COERCE_TO_ENDTAG :
+                    printMessage(code, lexer, element, "coerce_to_endtag", new Object[]{element.element}, Level.INFO);
+                    break;
+
+                case NON_MATCHING_ENDTAG :
+                    printMessage(
+                        code,
+                        lexer,
+                        element,
+                        "non_matching_endtag",
+                        new Object[]{getTagName(node), element.element}, Level.WARNING);
+                    break;
+
+                case TAG_NOT_ALLOWED_IN :
+                    printMessage(
+                        code,
+                        lexer,
+                        element,
+                        "tag_not_allowed_in",
+                        new Object[]{getTagName(node), element.element}, Level.WARNING);
+                    break;
+
+                case DOCTYPE_AFTER_TAGS :
+                    printMessage(code, lexer, element, "doctype_after_tags", null, Level.WARNING);
+                    break;
+
+                case MISSING_STARTTAG :
+                    printMessage(code, lexer, element, "missing_starttag", new Object[]{node.element}, Level.WARNING);
+                    break;
+
+                case UNEXPECTED_ENDTAG :
+                    if (element != null)
+                    {
+                        printMessage(
+                            code,
+                            lexer,
+                            element,
+                            "unexpected_endtag_in",
+                            new Object[]{node.element, element.element}, Level.WARNING);
+                    }
+                    else
+                    {
+                        printMessage(code, lexer, null, "unexpected_endtag", new Object[]{node.element}, Level.WARNING);
+                    }
+                    break;
+
+                case TOO_MANY_ELEMENTS :
+                    if (element != null)
+                    {
+                        printMessage(
+                            code,
+                            lexer,
+                            element,
+                            "too_many_elements_in",
+                            new Object[]{node.element, element.element}, Level.WARNING);
+                    }
+                    else
+                    {
+                        printMessage(code, lexer, element, "too_many_elements", new Object[]{node.element}, Level.WARNING);
+                    }
+                    break;
+
+                case USING_BR_INPLACE_OF :
+                    printMessage(code, lexer, element, "using_br_inplace_of", new Object[]{getTagName(node)}, Level.WARNING);
+                    break;
+
+                case INSERTING_TAG :
+                    printMessage(code, lexer, element, "inserting_tag", new Object[]{node.element}, Level.WARNING);
+                    break;
+
+                case CANT_BE_NESTED :
+                    printMessage(code, lexer, element, "cant_be_nested", new Object[]{getTagName(node)}, Level.WARNING);
+                    break;
+
+                case PROPRIETARY_ELEMENT :
+                    printMessage(code, lexer, element, "proprietary_element", new Object[]{getTagName(node)}, Level.WARNING);
+
+                    if (node.tag == tt.tagLayer)
+                    {
+                        lexer.badLayout |= USING_LAYER;
+                    }
+                    else if (node.tag == tt.tagSpacer)
+                    {
+                        lexer.badLayout |= USING_SPACER;
+                    }
+                    else if (node.tag == tt.tagNobr)
+                    {
+                        lexer.badLayout |= USING_NOBR;
+                    }
+                    break;
+
+                case OBSOLETE_ELEMENT :
+                    if (element.tag != null && (element.tag.model & Dict.CM_OBSOLETE) != 0)
+                    {
+                        printMessage(code, lexer, element, "obsolete_element", new Object[]{
+							    getTagName(element),
+							    getTagName(node)}, Level.WARNING);
+                    }
+                    else
+                    {
+                        printMessage(code, lexer, element, "replacing_element", new Object[]{
+							    getTagName(element),
+							    getTagName(node)}, Level.WARNING);
+                    }
+                    break;
+
+                case UNESCAPED_ELEMENT :
+                    printMessage(code, lexer, element, "unescaped_element", new Object[]{getTagName(element)}, Level.WARNING);
+                    break;
+
+                case TRIM_EMPTY_ELEMENT :
+                    printMessage(code, lexer, element, "trim_empty_element", new Object[]{getTagName(element)}, Level.WARNING);
+                    break;
+
+                case MISSING_TITLE_ELEMENT :
+                    printMessage(code, lexer, element, "missing_title_element", null, Level.WARNING);
+                    break;
+
+                case ILLEGAL_NESTING :
+                    printMessage(code, lexer, element, "illegal_nesting", new Object[]{getTagName(element)}, Level.WARNING);
+                    break;
+
+                case NOFRAMES_CONTENT :
+                    printMessage(code, lexer, element, "noframes_content", new Object[]{getTagName(node)}, Level.WARNING);
+                    break;
+
+                case INCONSISTENT_VERSION :
+                    printMessage(code, lexer, element, "inconsistent_version", null, Level.WARNING);
+                    break;
+
+                case MALFORMED_DOCTYPE :
+                    printMessage(code, lexer, element, "malformed_doctype", null, Level.WARNING);
+                    break;
+
+                case CONTENT_AFTER_BODY :
+                    printMessage(code, lexer, element, "content_after_body", null, Level.WARNING);
+                    break;
+
+                case MALFORMED_COMMENT :
+                    printMessage(code, lexer, element, "malformed_comment", null, Level.WARNING);
+                    break;
+
+                case BAD_COMMENT_CHARS :
+                    printMessage(code, lexer, element, "bad_comment_chars", null, Level.WARNING);
+                    break;
+
+                case BAD_XML_COMMENT :
+                    printMessage(code, lexer, element, "bad_xml_comment", null, Level.WARNING);
+                    break;
+
+                case BAD_CDATA_CONTENT :
+                    printMessage(code, lexer, element, "bad_cdata_content", null, Level.WARNING);
+                    break;
+
+                case INCONSISTENT_NAMESPACE :
+                    printMessage(code, lexer, element, "inconsistent_namespace", null, Level.WARNING);
+                    break;
+
+                case DTYPE_NOT_UPPER_CASE :
+                    printMessage(code, lexer, element, "dtype_not_upper_case", null, Level.WARNING);
+                    break;
+
+                case UNEXPECTED_END_OF_FILE :
+                    // on end of file adjust reported position to end of input
+                    lexer.lines = lexer.in.getCurline();
+                    lexer.columns = lexer.in.getCurcol();
+                    printMessage(
+                        code,
+                        lexer,
+                        element,
+                        "unexpected_end_of_file",
+                        new Object[]{getTagName(element)}, Level.WARNING);
+                    break;
+
+                case NESTED_QUOTATION :
+                    printMessage(code, lexer, element, "nested_quotation", null, Level.WARNING);
+                    break;
+
+                case ELEMENT_NOT_EMPTY :
+                    printMessage(code, lexer, element, "element_not_empty", new Object[]{getTagName(element)}, Level.WARNING);
+                    break;
+
+                case MISSING_DOCTYPE :
+                    printMessage(code, lexer, element, "missing_doctype", null, Level.WARNING);
+                    break;
+
+                default :
+                    break;
+            }
+        }
+
+        if ((code == DISCARDING_UNEXPECTED) && lexer.badForm != 0)
+        {
+            // the case for when this is a warning not an error, is handled earlier
+            printMessage(code, lexer, element, "discarding_unexpected", new Object[]{getTagName(node)}, Level.ERROR);
+        }
+
+    }
+
+    /**
+     * Prints errors.
+     * @param lexer Lexer
+     * @param element parent/missing tag
+     * @param node current tag
+     * @param code error code
+     */
+    public void error(Lexer lexer, Node element, Node node, short code)
+    {
+        lexer.errors++;
+
+        // keep quiet after <showErrors> errors
+        if (lexer.errors > lexer.configuration.showErrors)
+        {
+            return;
+        }
+
+        if (code == SUSPECTED_MISSING_QUOTE)
+        {
+            printMessage(code, lexer, element, "suspected_missing_quote", null, Level.ERROR);
+        }
+        else if (code == DUPLICATE_FRAMESET)
+        {
+            printMessage(code, lexer, element, "duplicate_frameset", null, Level.ERROR);
+        }
+        else if (code == UNKNOWN_ELEMENT)
+        {
+            printMessage(code, lexer, element, "unknown_element", new Object[]{getTagName(node)}, Level.ERROR);
+        }
+        else if (code == UNEXPECTED_ENDTAG)
+        {
+            if (element != null)
+            {
+                printMessage(
+                    code,
+                    lexer,
+                    element,
+                    "unexpected_endtag_in",
+                    new Object[]{node.element, element.element}, Level.ERROR);
+            }
+            else
+            {
+                printMessage(code, lexer, node, "unexpected_endtag", new Object[]{node.element}, Level.ERROR);
+            }
+        }
+    }
+
+    /**
+     * Prints error summary.
+     * @param lexer Lexer
+     */
+    public void errorSummary(Lexer lexer)
+    {
+        // adjust badAccess to that its null if frames are ok
+        if ((lexer.badAccess & (USING_FRAMES | USING_NOFRAMES)) != 0)
+        {
+            if (!(((lexer.badAccess & USING_FRAMES) != 0) && ((lexer.badAccess & USING_NOFRAMES) == 0)))
+            {
+                lexer.badAccess &= ~(USING_FRAMES | USING_NOFRAMES);
+            }
+        }
+        if (lexer.badChars != 0)
+        {
+            if ((lexer.badChars & VENDOR_SPECIFIC_CHARS) != 0)
+            {
+                int encodingChoiche = 0;
+
+                if ("Cp1252".equals(lexer.configuration.getInCharEncodingName()))
+                {
+                    encodingChoiche = 1;
+                }
+                else if ("MacRoman".equals(lexer.configuration.getInCharEncodingName()))
+                {
+                    encodingChoiche = 2;
+                }
+
+                printMessage(VENDOR_SPECIFIC_CHARS, lexer, null, "vendor_specific_chars_summary", new Object[]{new Integer(
+					    encodingChoiche)}, Level.SUMMARY);
+            }
+
+            if ((lexer.badChars & INVALID_SGML_CHARS) != 0 || (lexer.badChars & INVALID_NCR) != 0)
+            {
+                int encodingChoiche = 0;
+
+                if ("Cp1252".equals(lexer.configuration.getInCharEncodingName()))
+                {
+                    encodingChoiche = 1;
+                }
+                else if ("MacRoman".equals(lexer.configuration.getInCharEncodingName()))
+                {
+                    encodingChoiche = 2;
+                }
+
+                printMessage(INVALID_SGML_CHARS, lexer, null, "invalid_sgml_chars_summary", new Object[]{new Integer(
+					    encodingChoiche)}, Level.SUMMARY);
+            }
+
+            if ((lexer.badChars & INVALID_UTF8) != 0)
+            {
+                printMessage(INVALID_UTF8, lexer, null, "invalid_utf8_summary", null, Level.SUMMARY);
+            }
+
+            if ((lexer.badChars & INVALID_UTF16) != 0)
+            {
+                printMessage(INVALID_UTF16, lexer, null, "invalid_utf16_summary", null, Level.SUMMARY);
+            }
+
+            if ((lexer.badChars & INVALID_URI) != 0)
+            {
+                printMessage(INVALID_URI, lexer, null, "invaliduri_summary", null, Level.SUMMARY);
+            }
+        }
+
+        if (lexer.badForm != 0)
+        {
+            printMessage(BADFORM_SUMMARY, lexer, null, "badform_summary", null, Level.SUMMARY);
+        }
+
+        if (lexer.badAccess != 0)
+        {
+            if ((lexer.badAccess & MISSING_SUMMARY) != 0)
+            {
+                printMessage(MISSING_SUMMARY, lexer, null, "badaccess_missing_summary", null, Level.SUMMARY);
+            }
+
+            if ((lexer.badAccess & MISSING_IMAGE_ALT) != 0)
+            {
+                printMessage(MISSING_IMAGE_ALT, lexer, null, "badaccess_missing_image_alt", null, Level.SUMMARY);
+            }
+
+            if ((lexer.badAccess & MISSING_IMAGE_MAP) != 0)
+            {
+                printMessage(MISSING_IMAGE_MAP, lexer, null, "badaccess_missing_image_map", null, Level.SUMMARY);
+            }
+
+            if ((lexer.badAccess & MISSING_LINK_ALT) != 0)
+            {
+                printMessage(MISSING_LINK_ALT, lexer, null, "badaccess_missing_link_alt", null, Level.SUMMARY);
+            }
+
+            if (((lexer.badAccess & USING_FRAMES) != 0) && ((lexer.badAccess & USING_NOFRAMES) == 0))
+            {
+                printMessage(USING_FRAMES, lexer, null, "badaccess_frames", null, Level.SUMMARY);
+            }
+
+            printMessage(BADACCESS_SUMMARY, lexer, null, "badaccess_summary", new Object[]{ACCESS_URL}, Level.SUMMARY);
+        }
+
+        if (lexer.badLayout != 0)
+        {
+            if ((lexer.badLayout & USING_LAYER) != 0)
+            {
+                printMessage(USING_LAYER, lexer, null, "badlayout_using_layer", null, Level.SUMMARY);
+            }
+
+            if ((lexer.badLayout & USING_SPACER) != 0)
+            {
+                printMessage(USING_SPACER, lexer, null, "badlayout_using_spacer", null, Level.SUMMARY);
+            }
+
+            if ((lexer.badLayout & USING_FONT) != 0)
+            {
+                printMessage(USING_FONT, lexer, null, "badlayout_using_font", null, Level.SUMMARY);
+            }
+
+            if ((lexer.badLayout & USING_NOBR) != 0)
+            {
+                printMessage(USING_NOBR, lexer, null, "badlayout_using_nobr", null, Level.SUMMARY);
+            }
+
+            if ((lexer.badLayout & USING_BODY) != 0)
+            {
+                printMessage(USING_BODY, lexer, null, "badlayout_using_body", null, Level.SUMMARY);
+            }
+        }
+    }
+
+    /**
+     * Prints the "unknown option" message.
+     * @param errout PrintWriter
+     * @param c invalid option char
+     */
+    public void unknownOption(PrintWriter errout, char c)
+    {
+        printMessage(errout, "unrecognized_option", new Object[]{new String(new char[]{c})}, Level.ERROR);
+    }
+
+    /**
+     * Prints the "unknown file" message.
+     * @param errout PrintWriter
+     * @param file invalid file name
+     */
+    public void unknownFile(PrintWriter errout, String file)
+    {
+        printMessage(errout, "unknown_file", new Object[]{"Tidy", file}, Level.ERROR);
+    }
+
+    /**
+     * Prints the "needs author intervention" message.
+     * @param errout PrintWriter
+     */
+    public void needsAuthorIntervention(PrintWriter errout)
+    {
+        printMessage(errout, "needs_author_intervention", null, Level.SUMMARY);
+    }
+
+    /**
+     * Prints the "missing body" message.
+     * @param errout PrintWriter
+     */
+    public void missingBody(PrintWriter errout)
+    {
+        printMessage(errout, "missing_body", null, Level.ERROR);
+    }
+
+    /**
+     * Prints the number of generated slides.
+     * @param errout PrintWriter
+     * @param count slides count
+     */
+    public void reportNumberOfSlides(PrintWriter errout, int count)
+    {
+        printMessage(errout, "slides_found", new Object[]{new Integer(count)}, Level.SUMMARY);
+    }
+
+    /**
+     * Prints tidy general info.
+     * @param errout PrintWriter
+     */
+    public void generalInfo(PrintWriter errout)
+    {
+        printMessage(errout, "general_info", null, Level.SUMMARY);
+    }
+
+    /**
+     * Prints tidy hello message.
+     * @param errout PrintWriter
+     */
+    public void helloMessage(PrintWriter errout)
+    {
+        printMessage(errout, "hello_message", new Object[]{Report.RELEASE_DATE, this.currentFile}, Level.SUMMARY);
+    }
+
+    /**
+     * Sets the current file name.
+     * @param filename current file.
+     */
+    public void setFilename(String filename)
+    {
+        this.currentFile = filename; // for use with Gnu Emacs
+    }
+
+    /**
+     * Prints information for html version in input file.
+     * @param errout PrintWriter
+     * @param lexer Lexer
+     * @param filename file name
+     * @param doctype doctype Node
+     */
+    public void reportVersion(PrintWriter errout, Lexer lexer, String filename, Node doctype)
+    {
+        int i, c;
+        int state = 0;
+        String vers = lexer.htmlVersionName();
+        int[] cc = new int[1];
+
+        // adjust reported position to first line
+        lexer.lines = 1;
+        lexer.columns = 1;
+
+        if (doctype != null)
+        {
+
+            StringBuffer doctypeBuffer = new StringBuffer();
+            for (i = doctype.start; i < doctype.end; ++i)
+            {
+                c = doctype.textarray[i];
+
+                // look for UTF-8 multibyte character
+                if (c < 0)
+                {
+                    i += PPrint.getUTF8(doctype.textarray, i, cc);
+                    c = cc[0];
+                }
+
+                if (c == '"')
+                {
+                    ++state;
+                }
+                else if (state == 1)
+                {
+                    doctypeBuffer.append((char) c);
+                }
+            }
+
+            printMessage(
+                DOCTYPE_GIVEN_SUMMARY,
+                lexer,
+                null,
+                "doctype_given",
+                new Object[]{filename, doctypeBuffer}, Level.SUMMARY);
+        }
+
+        printMessage(REPORT_VERSION_SUMMARY, lexer, null, "report_version", new Object[]{
+			    filename,
+			    (vers != null ? vers : "HTML proprietary")}, Level.SUMMARY);
+    }
+
+    /**
+     * Prints the number of error/warnings found.
+     * @param errout PrintWriter
+     * @param lexer Lexer
+     */
+    public void reportNumWarnings(PrintWriter errout, Lexer lexer)
+    {
+        if (lexer.warnings > 0 || lexer.errors > 0)
+        {
+            printMessage(
+                errout,
+                "num_warnings",
+                new Object[]{new Integer(lexer.warnings), new Integer(lexer.errors)},
+                Level.SUMMARY);
+        }
+        else
+        {
+            printMessage(errout, "no_warnings", null, Level.SUMMARY);
+        }
+    }
+
+    /**
+     * Prints tidy help.
+     * @param out PrintWriter
+     */
+    public void helpText(PrintWriter out)
+    {
+        printMessage(out, "help_text", new Object[]{"Tidy", RELEASE_DATE}, Level.SUMMARY);
+    }
+
+    /**
+     * Prints the "bad tree" message.
+     * @param errout PrintWriter
+     */
+    public void badTree(PrintWriter errout)
+    {
+        printMessage(errout, "bad_tree", null, Level.ERROR);
+    }
+
+    /**
+     * Adds a message listener.
+     * @param listener TidyMessageListener
+     */
+    public void addMessageListener(TidyMessageListener listener)
+    {
+        this.listener = listener;
+    }
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/StreamIn.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/StreamIn.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/StreamIn.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,135 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ *  Java HTML Tidy - JTidy
+ *  HTML parser and pretty printer
+ *
+ *  Copyright (c) 1998-2000 World Wide Web Consortium (Massachusetts
+ *  Institute of Technology, Institut National de Recherche en
+ *  Informatique et en Automatique, Keio University). All Rights
+ *  Reserved.
+ *
+ *  Contributing Author(s):
+ *
+ *     Dave Raggett <dsr at w3.org>
+ *     Andy Quick <ac.quick at sympatico.ca> (translation to Java)
+ *     Gary L Peskin <garyp at firstech.com> (Java development)
+ *     Sami Lempinen <sami at lempinen.net> (release management)
+ *     Fabrizio Giustina <fgiust at users.sourceforge.net>
+ *
+ *  The contributing author(s) would like to thank all those who
+ *  helped with testing, bug fixes, and patience.  This wouldn't
+ *  have been possible without all of you.
+ *
+ *  COPYRIGHT NOTICE:
+ * 
+ *  This software and documentation is provided "as is," and
+ *  the copyright holders and contributing author(s) make no
+ *  representations or warranties, express or implied, including
+ *  but not limited to, warranties of merchantability or fitness
+ *  for any particular purpose or that the use of the software or
+ *  documentation will not infringe any third party patents,
+ *  copyrights, trademarks or other rights. 
+ *
+ *  The copyright holders and contributing author(s) will not be
+ *  liable for any direct, indirect, special or consequential damages
+ *  arising out of any use of the software or documentation, even if
+ *  advised of the possibility of such damage.
+ *
+ *  Permission is hereby granted to use, copy, modify, and distribute
+ *  this source code, or portions hereof, documentation and executables,
+ *  for any purpose, without fee, subject to the following restrictions:
+ *
+ *  1. The origin of this source code must not be misrepresented.
+ *  2. Altered versions must be plainly marked as such and must
+ *     not be misrepresented as being the original source.
+ *  3. This Copyright notice may not be removed or altered from any
+ *     source or altered source distribution.
+ * 
+ *  The copyright holders and contributing author(s) specifically
+ *  permit, without fee, and encourage the use of this source code
+ *  as a component for supporting the Hypertext Markup Language in
+ *  commercial products. If you use this source code in a product,
+ *  acknowledgment is not required but would be appreciated.
+ *
+ */
+package org.ajax4jsf.org.w3c.tidy;
+
+/**
+ * Input Stream.
+ * @author Dave Raggett <a href="mailto:dsr at w3.org">dsr at w3.org </a>
+ * @author Andy Quick <a href="mailto:ac.quick at sympatico.ca">ac.quick at sympatico.ca </a> (translation to Java)
+ * @author Fabrizio Giustina
+ * @version $Revision: 1.1.2.1 $ ($Author: alexsmirnov $)
+ */
+
+public interface StreamIn
+{
+
+    /**
+     * end of stream char.
+     */
+    int END_OF_STREAM = -1;
+
+    /**
+     * Getter for <code>curcol</code>.
+     * @return Returns the curcol.
+     */
+    int getCurcol();
+
+    /**
+     * Getter for <code>curline</code>.
+     * @return Returns the curline.
+     */
+    int getCurline();
+
+    /**
+     * reads a char from the stream.
+     * @return char
+     */
+    int readCharFromStream();
+
+    /**
+     * Read a char.
+     * @return char
+     */
+    int readChar();
+
+    /**
+     * Unget a char.
+     * @param c char
+     */
+    void ungetChar(int c);
+
+    /**
+     * Has end of stream been reached?
+     * @return <code>true</code> if end of stream has been reached
+     */
+    boolean isEndOfStream();
+
+    /**
+     * Setter for lexer instance (needed for error reporting).
+     * @param lexer Lexer
+     */
+    void setLexer(Lexer lexer);
+
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/StreamInFactory.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/StreamInFactory.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/StreamInFactory.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,125 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ *  Java HTML Tidy - JTidy
+ *  HTML parser and pretty printer
+ *
+ *  Copyright (c) 1998-2000 World Wide Web Consortium (Massachusetts
+ *  Institute of Technology, Institut National de Recherche en
+ *  Informatique et en Automatique, Keio University). All Rights
+ *  Reserved.
+ *
+ *  Contributing Author(s):
+ *
+ *     Dave Raggett <dsr at w3.org>
+ *     Andy Quick <ac.quick at sympatico.ca> (translation to Java)
+ *     Gary L Peskin <garyp at firstech.com> (Java development)
+ *     Sami Lempinen <sami at lempinen.net> (release management)
+ *     Fabrizio Giustina <fgiust at users.sourceforge.net>
+ *
+ *  The contributing author(s) would like to thank all those who
+ *  helped with testing, bug fixes, and patience.  This wouldn't
+ *  have been possible without all of you.
+ *
+ *  COPYRIGHT NOTICE:
+ * 
+ *  This software and documentation is provided "as is," and
+ *  the copyright holders and contributing author(s) make no
+ *  representations or warranties, express or implied, including
+ *  but not limited to, warranties of merchantability or fitness
+ *  for any particular purpose or that the use of the software or
+ *  documentation will not infringe any third party patents,
+ *  copyrights, trademarks or other rights. 
+ *
+ *  The copyright holders and contributing author(s) will not be
+ *  liable for any direct, indirect, special or consequential damages
+ *  arising out of any use of the software or documentation, even if
+ *  advised of the possibility of such damage.
+ *
+ *  Permission is hereby granted to use, copy, modify, and distribute
+ *  this source code, or portions hereof, documentation and executables,
+ *  for any purpose, without fee, subject to the following restrictions:
+ *
+ *  1. The origin of this source code must not be misrepresented.
+ *  2. Altered versions must be plainly marked as such and must
+ *     not be misrepresented as being the original source.
+ *  3. This Copyright notice may not be removed or altered from any
+ *     source or altered source distribution.
+ * 
+ *  The copyright holders and contributing author(s) specifically
+ *  permit, without fee, and encourage the use of this source code
+ *  as a component for supporting the Hypertext Markup Language in
+ *  commercial products. If you use this source code in a product,
+ *  acknowledgment is not required but would be appreciated.
+ *
+ */
+package org.ajax4jsf.org.w3c.tidy;
+
+import java.io.InputStream;
+import java.io.Reader;
+import java.io.UnsupportedEncodingException;
+
+import org.ajax4jsf.framework.util.message.Messages;
+
+
+/**
+ * Tidy Input factory.
+ * @author Fabrizio Giustina
+ * @version $Revision: 1.1.2.1 $ ($Author: alexsmirnov $)
+ */
+public final class StreamInFactory
+{
+
+    /**
+     * Don't instantiate.
+     */
+    private StreamInFactory()
+    {
+        // unused
+    }
+
+    /**
+     * Returns the appropriate StreamIn implementation.
+     * @param config configuration instance
+     * @param stream input stream
+     * @return StreamIn instance
+     */
+    public static StreamIn getStreamIn(Configuration config, Object in)
+    {
+    	if (in instanceof Reader) {
+            return new StreamInJavaImpl((Reader) in, config.tabsize);			
+		} else if (in instanceof String) {
+            return new StreamInJavaImpl((String) in, config.tabsize);			
+		} else if (in instanceof InputStream) {			
+        try
+        {
+            return new StreamInJavaImpl((InputStream)in, config.getInCharEncodingName(), config.tabsize);
+        }
+        catch (UnsupportedEncodingException e)
+        {
+            throw new RuntimeException(Messages.getMessage(Messages.UNSUPPORTED_ENCODING_ERROR, e.getMessage()));
+        }
+		} else {
+            throw new RuntimeException(Messages.getMessage(Messages.UNSUPPORTED_INPUT_SOURCE_ERROR, in.getClass().getName()));			
+		}
+    }
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/StreamInImpl.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/StreamInImpl.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/StreamInImpl.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,853 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ *  Java HTML Tidy - JTidy
+ *  HTML parser and pretty printer
+ *
+ *  Copyright (c) 1998-2000 World Wide Web Consortium (Massachusetts
+ *  Institute of Technology, Institut National de Recherche en
+ *  Informatique et en Automatique, Keio University). All Rights
+ *  Reserved.
+ *
+ *  Contributing Author(s):
+ *
+ *     Dave Raggett <dsr at w3.org>
+ *     Andy Quick <ac.quick at sympatico.ca> (translation to Java)
+ *     Gary L Peskin <garyp at firstech.com> (Java development)
+ *     Sami Lempinen <sami at lempinen.net> (release management)
+ *     Fabrizio Giustina <fgiust at users.sourceforge.net>
+ *
+ *  The contributing author(s) would like to thank all those who
+ *  helped with testing, bug fixes, and patience.  This wouldn't
+ *  have been possible without all of you.
+ *
+ *  COPYRIGHT NOTICE:
+ * 
+ *  This software and documentation is provided "as is," and
+ *  the copyright holders and contributing author(s) make no
+ *  representations or warranties, express or implied, including
+ *  but not limited to, warranties of merchantability or fitness
+ *  for any particular purpose or that the use of the software or
+ *  documentation will not infringe any third party patents,
+ *  copyrights, trademarks or other rights. 
+ *
+ *  The copyright holders and contributing author(s) will not be
+ *  liable for any direct, indirect, special or consequential damages
+ *  arising out of any use of the software or documentation, even if
+ *  advised of the possibility of such damage.
+ *
+ *  Permission is hereby granted to use, copy, modify, and distribute
+ *  this source code, or portions hereof, documentation and executables,
+ *  for any purpose, without fee, subject to the following restrictions:
+ *
+ *  1. The origin of this source code must not be misrepresented.
+ *  2. Altered versions must be plainly marked as such and must
+ *     not be misrepresented as being the original source.
+ *  3. This Copyright notice may not be removed or altered from any
+ *     source or altered source distribution.
+ * 
+ *  The copyright holders and contributing author(s) specifically
+ *  permit, without fee, and encourage the use of this source code
+ *  as a component for supporting the Hypertext Markup Language in
+ *  commercial products. If you use this source code in a product,
+ *  acknowledgment is not required but would be appreciated.
+ *
+ */
+package org.ajax4jsf.org.w3c.tidy;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import org.ajax4jsf.org.w3c.tidy.EncodingUtils.GetBytes;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+
+
+/**
+ * Input Stream Implementation. This implementation is from the c version of tidy and it doesn't take advantage of java
+ * readers.
+ * @author Dave Raggett <a href="mailto:dsr at w3.org">dsr at w3.org </a>
+ * @author Andy Quick <a href="mailto:ac.quick at sympatico.ca">ac.quick at sympatico.ca </a> (translation to Java)
+ * @author Fabrizio Giustina
+ * @version $Revision: 1.1.2.1 $ ($Author: alexsmirnov $)
+ */
+public class StreamInImpl implements StreamIn
+{
+
+	private final static Log log = LogFactory.getLog(StreamInImpl.class);
+	
+    /**
+     * number of characters kept in buffer.
+     */
+    private static final int CHARBUF_SIZE = 5;
+
+    /**
+     * needed for error reporting.
+     */
+    private Lexer lexer;
+
+    /**
+     * character buffer.
+     */
+    private int[] charbuf = new int[CHARBUF_SIZE];
+
+    /**
+     * actual position in buffer.
+     */
+    private int bufpos;
+
+    /**
+     * Private unget buffer for the raw bytes read from the input stream. Normally this will only be used by the UTF-8
+     * decoder to resynchronize the input stream after finding an illegal UTF-8 sequences. But it can be used for other
+     * purposes when reading bytes in ReadCharFromStream.
+     */
+    private char[] rawBytebuf = new char[CHARBUF_SIZE];
+
+    /**
+     * actual position in rawBytebuf.
+     */
+    private int rawBufpos;
+
+    /**
+     * has a raw byte been pushed into stack?
+     */
+    private boolean rawPushed;
+
+    /**
+     * looking for an UTF BOM?
+     */
+    private boolean lookingForBOM = true;
+
+    /**
+     * has end of stream been reached?
+     */
+    private boolean endOfStream;
+
+    private boolean pushed;
+
+    private int tabs;
+
+    /**
+     * tab size in chars.
+     */
+    private int tabsize;
+
+    /**
+     * FSM for ISO2022.
+     */
+    private int state;
+
+    /**
+     * Encoding.
+     */
+    private int encoding;
+
+    /**
+     * current column number.
+     */
+    private int curcol;
+
+    /**
+     * last column.
+     */
+    private int lastcol;
+
+    /**
+     * current line number.
+     */
+    private int curline;
+
+    /**
+     * input stream.
+     */
+    private InputStream stream;
+
+    /**
+     * Getter.
+     */
+    private GetBytes getBytes;
+
+    /**
+     * Avoid mapping values > 127 to entities.
+     */
+    private boolean rawOut;
+
+    /**
+     * Instatiates a new StreamInImpl.
+     * @param stream input stream
+     * @param configuration Configuration
+     */
+    public StreamInImpl(InputStream stream, Configuration configuration)
+    {
+        this.stream = stream;
+        this.charbuf[0] = '\0';
+        this.tabsize = configuration.tabsize;
+        this.curline = 1;
+        this.curcol = 1;
+        this.encoding = configuration.getInCharEncoding();
+        this.rawOut = configuration.rawOut;
+        this.state = EncodingUtils.FSM_ASCII;
+        this.getBytes = new GetBytes()
+        {
+
+            StreamInImpl in;
+
+            GetBytes setStreamIn(StreamInImpl in)
+            {
+                this.in = in;
+                return this;
+            }
+
+            public void doGet(int[] buf, int[] count, boolean unget)
+            {
+                in.readRawBytesFromStream(buf, count, unget);
+            }
+        } // set the StreamInImpl instance directly
+            .setStreamIn(this);
+    }
+
+    /**
+     * @see org.ajax4jsf.org.w3c.tidy.StreamIn#getCurcol()
+     */
+    public int getCurcol()
+    {
+        return this.curcol;
+    }
+
+    /**
+     * @see org.ajax4jsf.org.w3c.tidy.StreamIn#getCurline()
+     */
+    public int getCurline()
+    {
+        return this.curline;
+    }
+
+    /**
+     * Setter for <code>lexer</code>.
+     * @param lexer The lexer to set.
+     */
+    public void setLexer(Lexer lexer)
+    {
+        this.lexer = lexer;
+    }
+
+    /**
+     * @see org.ajax4jsf.org.w3c.tidy.StreamIn#readChar()
+     */
+    public int readChar()
+    {
+        int c;
+
+        if (this.pushed)
+        {
+            c = this.charbuf[--(this.bufpos)];
+            if ((this.bufpos) == 0)
+            {
+                this.pushed = false;
+            }
+
+            if (c == '\n')
+            {
+                this.curcol = 1;
+                this.curline++;
+            }
+            else
+            {
+                this.curcol++;
+            }
+
+            return c;
+        }
+
+        this.lastcol = this.curcol;
+
+        if (this.tabs > 0)
+        {
+            this.curcol++;
+            this.tabs--;
+            return ' ';
+        }
+
+        while (true)
+        {
+            c = readCharFromStream();
+
+            if (c < 0)
+            {
+                return END_OF_STREAM;
+            }
+
+            if (c == '\n')
+            {
+                this.curcol = 1;
+                this.curline++;
+                break;
+            }
+
+            // #427663 - map '\r' to '\n' - Andy Quick 11 Aug 00
+            if (c == '\r')
+            {
+                c = readCharFromStream();
+                if (c != '\n')
+                {
+                    if (c != END_OF_STREAM) // EOF fix by Terry Teague 12 Aug 01
+                    {
+                        ungetChar(c);
+                    }
+                    c = '\n';
+                }
+                this.curcol = 1;
+                this.curline++;
+                break;
+            }
+
+            if (c == '\t')
+            {
+                this.tabs = this.tabsize - ((this.curcol - 1) % this.tabsize) - 1;
+                this.curcol++;
+                c = ' ';
+                break;
+            }
+
+            // strip control characters, except for Esc
+            if (c == '\033')
+            {
+                break;
+            }
+            else if (c == '\015' && !lexer.configuration.xmlTags) //Form Feed is allowed in HTML
+            {
+                break;
+            }
+            else if (0 < c && c < 32)
+            {
+                continue; // discard control char
+            }
+
+            // watch out for chars that have already been decoded such as
+            // IS02022, UTF-8 etc, that don't require further decoding
+            if (rawOut
+                || this.encoding == Configuration.ISO2022
+                || this.encoding == Configuration.UTF8
+                || this.encoding == Configuration.SHIFTJIS // #431953 - RJ
+                || this.encoding == Configuration.BIG5) // #431953 - RJ
+            {
+                this.curcol++;
+                break;
+            }
+
+            // handle surrogate pairs
+            if ((this.encoding == Configuration.UTF16LE)
+                || (this.encoding == Configuration.UTF16)
+                || (this.encoding == Configuration.UTF16BE))
+            {
+                if (c > EncodingUtils.MAX_UTF8_FROM_UCS4)
+                {
+                    // invalid UTF-16 value
+                    this.lexer.report.encodingError(this.lexer, Report.INVALID_UTF16 | Report.DISCARDED_CHAR, c);
+                    c = 0;
+                }
+                // high surrogate
+                else if (c >= EncodingUtils.UTF16_LOW_SURROGATE_BEGIN && c <= EncodingUtils.UTF16_LOW_SURROGATE_END)
+                {
+                    int n, m;
+
+                    n = c;
+
+                    m = readCharFromStream();
+                    if (m < 0)
+                    {
+                        return END_OF_STREAM;
+                    }
+                    // low surrogate
+                    if (m >= EncodingUtils.UTF16_HIGH_SURROGATE_BEGIN && m <= EncodingUtils.UTF16_HIGH_SURROGATE_END)
+                    {
+                        // pair found, recombine them
+                        c = (n - EncodingUtils.UTF16_LOW_SURROGATE_BEGIN)
+                            * 0x400
+                            + (m - EncodingUtils.UTF16_HIGH_SURROGATE_BEGIN)
+                            + 0x10000;
+
+                        // check for invalid pairs
+                        if (((c & 0x0000FFFE) == 0x0000FFFE)
+                            || ((c & 0x0000FFFF) == 0x0000FFFF)
+                            || (c < EncodingUtils.UTF16_SURROGATES_BEGIN))
+                        {
+                            this.lexer.report
+                                .encodingError(this.lexer, Report.INVALID_UTF16 | Report.DISCARDED_CHAR, c);
+                            c = 0;
+                        }
+                    }
+                    else
+                    {
+                        // not a valid pair
+                        this.lexer.report.encodingError(this.lexer, Report.INVALID_UTF16 | Report.DISCARDED_CHAR, c);
+                        c = 0;
+                        // should we unget the just read char?
+                    }
+                }
+                else
+                {
+                    // no recombination needed
+                }
+            }
+
+            if (this.encoding == Configuration.MACROMAN)
+            {
+                c = EncodingUtils.decodeMacRoman(c);
+            }
+
+            // produced e.g. as a side-effect of smart quotes in Word
+            // but can't happen if using MACROMAN encoding
+            if (127 < c && c < 160)
+            {
+                int c1 = 0;
+                int replaceMode;
+
+                // set error position just before offending character
+                this.lexer.lines = this.curline;
+                this.lexer.columns = this.curcol;
+
+                if ((this.encoding == Configuration.WIN1252)
+                    || (this.lexer.configuration.replacementCharEncoding == Configuration.WIN1252))
+                {
+                    c1 = EncodingUtils.decodeWin1252(c);
+                }
+                else if (this.lexer.configuration.replacementCharEncoding == Configuration.MACROMAN)
+                {
+                    c1 = EncodingUtils.decodeMacRoman(c);
+                }
+
+                replaceMode = TidyUtils.toBoolean(c1) ? Report.REPLACED_CHAR : Report.DISCARDED_CHAR;
+
+                if ((c1 == 0) && (this.encoding == Configuration.WIN1252) || (this.encoding == Configuration.MACROMAN))
+                {
+                    this.lexer.report.encodingError(this.lexer, Report.VENDOR_SPECIFIC_CHARS | replaceMode, c);
+                }
+                else if ((this.encoding != Configuration.WIN1252) && (this.encoding != Configuration.MACROMAN))
+                {
+                    this.lexer.report.encodingError(this.lexer, Report.INVALID_SGML_CHARS | replaceMode, c);
+                }
+
+                c = c1;
+            }
+
+            if (c == 0)
+            {
+                continue; // illegal char is discarded
+            }
+
+            this.curcol++;
+            break;
+        }
+
+        return c;
+    }
+
+    /**
+     * @see org.ajax4jsf.org.w3c.tidy.StreamIn#ungetChar(int)
+     */
+    public void ungetChar(int c)
+    {
+        this.pushed = true;
+        if (this.bufpos >= CHARBUF_SIZE)
+        {
+            // pop last element
+            System.arraycopy(this.charbuf, 0, this.charbuf, 1, CHARBUF_SIZE - 1);
+            this.bufpos--;
+        }
+        this.charbuf[(this.bufpos)++] = c;
+
+        if (c == '\n')
+        {
+            --this.curline;
+        }
+
+        this.curcol = this.lastcol;
+    }
+
+    /**
+     * @see org.ajax4jsf.org.w3c.tidy.StreamIn#isEndOfStream()
+     */
+    public boolean isEndOfStream()
+    {
+        return this.endOfStream;
+    }
+
+    /**
+     * @see org.ajax4jsf.org.w3c.tidy.StreamIn#readCharFromStream()
+     */
+    public int readCharFromStream()
+    {
+        int c;
+        int[] n = new int[]{0};
+        int[] tempchar = new int[1];
+        int[] count = new int[]{1};
+
+        readRawBytesFromStream(tempchar, count, false);
+        if (count[0] <= 0)
+        {
+            endOfStream = true;
+            return END_OF_STREAM;
+        }
+
+        c = tempchar[0];
+
+        if (lookingForBOM
+            && (this.encoding == Configuration.UTF16
+                || this.encoding == Configuration.UTF16LE
+                || this.encoding == Configuration.UTF16BE || this.encoding == Configuration.UTF8))
+        {
+            // check for a Byte Order Mark
+            int c1, bom;
+
+            lookingForBOM = false;
+
+            if (c == END_OF_STREAM)
+            {
+                lookingForBOM = false;
+                endOfStream = true;
+                return END_OF_STREAM;
+            }
+
+            count[0] = 1;
+            readRawBytesFromStream(tempchar, count, false);
+            c1 = tempchar[0];
+
+            bom = (c << 8) + c1;
+
+            if (bom == EncodingUtils.UNICODE_BOM_BE)
+            {
+                // big-endian UTF-16
+                if (this.encoding != Configuration.UTF16 && this.encoding != Configuration.UTF16BE)
+                {
+                    this.lexer.report.encodingError(this.lexer, Report.ENCODING_MISMATCH, Configuration.UTF16BE);
+                    // non-fatal error
+                }
+                this.encoding = Configuration.UTF16BE;
+                this.lexer.configuration.setInCharEncoding(Configuration.UTF16BE);
+                return EncodingUtils.UNICODE_BOM; // return decoded BOM
+            }
+            else if (bom == EncodingUtils.UNICODE_BOM_LE)
+            {
+                // little-endian UTF-16
+                if (this.encoding != Configuration.UTF16 && this.encoding != Configuration.UTF16LE)
+                {
+                    this.lexer.report.encodingError(this.lexer, Report.ENCODING_MISMATCH, Configuration.UTF16LE);
+                    // non-fatal error
+                }
+                this.encoding = Configuration.UTF16LE;
+                this.lexer.configuration.setInCharEncoding(Configuration.UTF16LE);
+                return EncodingUtils.UNICODE_BOM; // return decoded BOM
+            }
+            else
+            {
+                int c2;
+
+                count[0] = 1;
+                readRawBytesFromStream(tempchar, count, false);
+                c2 = tempchar[0];
+
+                if (((c << 16) + (c1 << 8) + c2) == EncodingUtils.UNICODE_BOM_UTF8)
+                {
+                    // UTF-8
+                    this.encoding = Configuration.UTF8;
+                    if (this.encoding != Configuration.UTF8)
+                    {
+                        this.lexer.report.encodingError(this.lexer, Report.ENCODING_MISMATCH, Configuration.UTF8);
+                        // non-fatal error
+                    }
+                    this.lexer.configuration.setInCharEncoding(Configuration.UTF8);
+                    return EncodingUtils.UNICODE_BOM; // return decoded BOM
+                }
+
+                // the 2nd and/or 3rd bytes weren't what we were expecting, so unget the extra 2 bytes
+                rawPushed = true;
+
+                if ((rawBufpos + 1) >= CHARBUF_SIZE)
+                {
+                    System.arraycopy(rawBytebuf, 2, rawBytebuf, 0, CHARBUF_SIZE - 2);
+                    rawBufpos -= 2;
+                }
+                // make sure the bytes are pushed in the right order
+                rawBytebuf[rawBufpos++] = (char) c2;
+                rawBytebuf[rawBufpos++] = (char) c1;
+                // drop through to code below, with the original char
+
+            }
+        }
+
+        this.lookingForBOM = false;
+
+        // A document in ISO-2022 based encoding uses some ESC sequences called "designator" to switch character sets.
+        // The designators defined and used in ISO-2022-JP are: "ESC" + "(" + ? for ISO646 variants "ESC" + "$" + ? and
+        // "ESC" + "$" + "(" + ? for multibyte character sets Where ? stands for a single character used to indicate the
+        // character set for multibyte characters. Tidy handles this by preserving the escape sequence and setting the
+        // top bit of each byte for non-ascii chars. This bit is then cleared on output. The input stream keeps track of
+        // the state to determine when to set/clear the bit.
+
+        if (this.encoding == Configuration.ISO2022)
+        {
+            if (c == 0x1b) // ESC
+            {
+                this.state = EncodingUtils.FSM_ESC;
+                return c;
+            }
+
+            switch (this.state)
+            {
+                case EncodingUtils.FSM_ESC :
+                    if (c == '$')
+                    {
+                        this.state = EncodingUtils.FSM_ESCD;
+                    }
+                    else if (c == '(')
+                    {
+                        this.state = EncodingUtils.FSM_ESCP;
+                    }
+                    else
+                    {
+                        this.state = EncodingUtils.FSM_ASCII;
+                    }
+                    break;
+
+                case EncodingUtils.FSM_ESCD :
+                    if (c == '(')
+                    {
+                        this.state = EncodingUtils.FSM_ESCDP;
+                    }
+                    else
+                    {
+                        this.state = EncodingUtils.FSM_NONASCII;
+                    }
+                    break;
+
+                case EncodingUtils.FSM_ESCDP :
+                    this.state = EncodingUtils.FSM_NONASCII;
+                    break;
+
+                case EncodingUtils.FSM_ESCP :
+                    this.state = EncodingUtils.FSM_ASCII;
+                    break;
+
+                case EncodingUtils.FSM_NONASCII :
+                    c |= 0x80;
+                    break;
+
+                default :
+                    // 
+                    break;
+            }
+
+            return c;
+        }
+
+        if (this.encoding == Configuration.UTF16LE)
+        {
+            int c1;
+
+            count[0] = 1;
+            readRawBytesFromStream(tempchar, count, false);
+            if (count[0] <= 0)
+            {
+                endOfStream = true;
+                return END_OF_STREAM;
+            }
+            c1 = tempchar[0];
+
+            n[0] = (c1 << 8) + c;
+
+            return n[0];
+        }
+
+        // UTF-16 is big-endian by default
+        if ((this.encoding == Configuration.UTF16) || (this.encoding == Configuration.UTF16BE))
+        {
+            int c1;
+
+            count[0] = 1;
+            readRawBytesFromStream(tempchar, count, false);
+            if (count[0] <= 0)
+            {
+                endOfStream = true;
+                return END_OF_STREAM;
+            }
+            c1 = tempchar[0];
+
+            n[0] = (c << 8) + c1;
+
+            return n[0];
+        }
+
+        if (this.encoding == Configuration.UTF8)
+        {
+            // deal with UTF-8 encoded char
+            int[] count2 = new int[]{0};
+
+            // first byte "c" is passed in separately
+            boolean err = EncodingUtils.decodeUTF8BytesToChar(n, c, new byte[0], this.getBytes, count2, 0);
+            if (!err && (n[0] == END_OF_STREAM) && (count2[0] == 1)) /* EOF */
+            {
+                endOfStream = true;
+                return END_OF_STREAM;
+            }
+            else if (err)
+            {
+                /* set error position just before offending character */
+                this.lexer.lines = this.curline;
+                this.lexer.columns = this.curcol;
+
+                this.lexer.report.encodingError(this.lexer, (short) (Report.INVALID_UTF8 | Report.REPLACED_CHAR), n[0]);
+                n[0] = 0xFFFD; /* replacement char */
+            }
+
+            return n[0];
+        }
+
+        // #431953 - start RJ
+        // This section is suitable for any "multibyte" variable-width character encoding in which a one-byte code is
+        // less than 128, and the first byte of a two-byte code is greater or equal to 128. Note that Big5 and ShiftJIS
+        // fit into this kind, even though their second byte may be less than 128
+
+        if ((this.encoding == Configuration.BIG5) || (this.encoding == Configuration.SHIFTJIS))
+        {
+            if (c < 128)
+            {
+                return c;
+            }
+            else if ((this.encoding == Configuration.SHIFTJIS) && (c >= 0xa1 && c <= 0xdf))
+            {
+                // 461643 - fix suggested by Rick Cameron 14 Sep 01
+                // for Shift_JIS, the values from 0xa1 through 0xdf represent singe-byte characters (U+FF61 to U+FF9F -
+                // half-shift Katakana)
+                return c;
+            }
+            else
+            {
+                int c1;
+                count[0] = 1;
+                readRawBytesFromStream(tempchar, count, false);
+
+                if (count[0] <= 0)
+                {
+                    endOfStream = true;
+                    return END_OF_STREAM;
+                }
+
+                c1 = tempchar[0];
+                n[0] = (c << 8) + c1;
+                return n[0];
+            }
+        }
+        // #431953 - end RJ
+        n[0] = c;
+
+        return n[0];
+    }
+
+    /**
+     * Read raw bytes from stream, return <= 0 if EOF; or if "unget" is true, Unget the bytes to re-synchronize the
+     * input stream Normally UTF-8 successor bytes are read using this routine.
+     * @param buf character buffer
+     * @param count number of bytes to read
+     * @param unget unget bytes
+     */
+    protected void readRawBytesFromStream(int[] buf, int[] count, boolean unget)
+    {
+
+        try
+        {
+            for (int i = 0; i < count[0]; i++)
+            {
+                if (unget)
+                {
+
+///                    int c = this.stream.read();
+                    int c = readByteFromStreamBuffer();
+
+                    // should never get here; testing for 0xFF, a valid char, is not a good idea
+                    if (c == END_OF_STREAM) // || buf[i] == (unsigned char)EndOfStream
+                    {
+                        count[0] = -i;
+                        return;
+                    }
+
+                    rawPushed = true;
+
+                    if (rawBufpos >= CHARBUF_SIZE)
+                    {
+                        System.arraycopy(rawBytebuf, 1, rawBytebuf, 0, CHARBUF_SIZE - 1);
+                        rawBufpos--;
+                    }
+                    rawBytebuf[rawBufpos++] = (char) buf[i];
+                }
+                else
+                {
+                    if (rawPushed)
+                    {
+                        buf[i] = rawBytebuf[--rawBufpos];
+                        if (rawBufpos == 0)
+                        {
+                            rawPushed = false;
+                        }
+                    }
+                    else
+                    {
+///                        int c = this.stream.read();
+                        int c = readByteFromStreamBuffer();
+                        if (c == END_OF_STREAM)
+                        {
+                            count[0] = -i;
+                            break;
+                        }
+                        buf[i] = (char) c;
+                    }
+                }
+            }
+        }
+        catch (IOException e)
+        {
+        	log.error("StreamInImpl.readRawBytesFromStream: " + e.toString());
+        }
+        return;
+    }
+
+    private byte[] bytes = new byte[256];
+    private int index = 0;
+    private int length = 0;
+    
+    private int readByteFromStreamBuffer() throws IOException {
+    	if(index >= length) {
+    		if(length < 0) return -1;
+    		length = stream.read(bytes);
+    		index = 0;
+    	}
+    	if(index < length) {
+    		int c = bytes[index];
+    		if(c < 0) c += 256;
+    		index++;
+    		return c;
+    	}
+    	return -1;
+    }
+
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/StreamInJavaImpl.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/StreamInJavaImpl.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/StreamInJavaImpl.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,363 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ *  Java HTML Tidy - JTidy
+ *  HTML parser and pretty printer
+ *
+ *  Copyright (c) 1998-2000 World Wide Web Consortium (Massachusetts
+ *  Institute of Technology, Institut National de Recherche en
+ *  Informatique et en Automatique, Keio University). All Rights
+ *  Reserved.
+ *
+ *  Contributing Author(s):
+ *
+ *     Dave Raggett <dsr at w3.org>
+ *     Andy Quick <ac.quick at sympatico.ca> (translation to Java)
+ *     Gary L Peskin <garyp at firstech.com> (Java development)
+ *     Sami Lempinen <sami at lempinen.net> (release management)
+ *     Fabrizio Giustina <fgiust at users.sourceforge.net>
+ *
+ *  The contributing author(s) would like to thank all those who
+ *  helped with testing, bug fixes, and patience.  This wouldn't
+ *  have been possible without all of you.
+ *
+ *  COPYRIGHT NOTICE:
+ * 
+ *  This software and documentation is provided "as is," and
+ *  the copyright holders and contributing author(s) make no
+ *  representations or warranties, express or implied, including
+ *  but not limited to, warranties of merchantability or fitness
+ *  for any particular purpose or that the use of the software or
+ *  documentation will not infringe any third party patents,
+ *  copyrights, trademarks or other rights. 
+ *
+ *  The copyright holders and contributing author(s) will not be
+ *  liable for any direct, indirect, special or consequential damages
+ *  arising out of any use of the software or documentation, even if
+ *  advised of the possibility of such damage.
+ *
+ *  Permission is hereby granted to use, copy, modify, and distribute
+ *  this source code, or portions hereof, documentation and executables,
+ *  for any purpose, without fee, subject to the following restrictions:
+ *
+ *  1. The origin of this source code must not be misrepresented.
+ *  2. Altered versions must be plainly marked as such and must
+ *     not be misrepresented as being the original source.
+ *  3. This Copyright notice may not be removed or altered from any
+ *     source or altered source distribution.
+ * 
+ *  The copyright holders and contributing author(s) specifically
+ *  permit, without fee, and encourage the use of this source code
+ *  as a component for supporting the Hypertext Markup Language in
+ *  commercial products. If you use this source code in a product,
+ *  acknowledgment is not required but would be appreciated.
+ *
+ */
+package org.ajax4jsf.org.w3c.tidy;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.io.StringReader;
+import java.io.UnsupportedEncodingException;
+
+
+/**
+ * StreamIn Implementation using java writers.
+ * @author Fabrizio Giustina
+ * @version $Revision: 1.1.2.1 $ ($Author: alexsmirnov $)
+ */
+public class StreamInJavaImpl implements StreamIn
+{
+
+    /**
+     * number of characters kept in buffer.
+     */
+    private static final int CHARBUF_SIZE = 10;
+
+    /**
+     * character buffer.
+     */
+    private int[] charbuf = new int[CHARBUF_SIZE];
+
+    /**
+     * actual position in buffer.
+     */
+    private int bufpos;
+
+    /**
+     * Java input stream reader.
+     */
+    private Reader reader;
+
+    /**
+     * has end of stream been reached?
+     */
+    private boolean endOfStream;
+
+    /**
+     * Is char pushed?
+     */
+    private boolean pushed;
+
+    /**
+     * current column number.
+     */
+    private int curcol;
+
+    /**
+     * last column.
+     */
+    private int lastcol;
+
+    /**
+     * current line number.
+     */
+    private int curline;
+
+    /**
+     * tab size in chars.
+     */
+    private int tabsize;
+
+    private int tabs;
+
+    public StreamInJavaImpl(Reader in , int tabsize)
+    {
+        reader = in;
+        this.pushed = false;
+        this.tabsize = tabsize;
+        this.curline = 1;
+        this.curcol = 1;
+        this.endOfStream = false;
+    }
+    /**
+     * @param content
+     * @param tabsize
+     * @throws UnsupportedEncodingException
+     */
+    public StreamInJavaImpl(String content, int tabsize)
+    {
+        reader = new StringReader(content);
+        this.pushed = false;
+        this.tabsize = tabsize;
+        this.curline = 1;
+        this.curcol = 1;
+        this.endOfStream = false;
+    }
+    /**
+     * Instantiates a new StreamInJavaImpl.
+     * @param stream
+     * @param encoding
+     * @param tabsize
+     * @throws UnsupportedEncodingException
+     */
+    public StreamInJavaImpl(InputStream stream, String encoding, int tabsize) throws UnsupportedEncodingException
+    {
+        reader = new InputStreamReader(stream, encoding);
+        this.pushed = false;
+        this.tabsize = tabsize;
+        this.curline = 1;
+        this.curcol = 1;
+        this.endOfStream = false;
+    }
+
+    /**
+     * @see org.ajax4jsf.org.w3c.tidy.StreamIn#readCharFromStream()
+     */
+    public int readCharFromStream()
+    {
+        int c;
+        try
+        {
+///            c = reader.read();
+            c = readCharFromStreamBuffer();
+            if (c < 0)
+            {
+                endOfStream = true;
+            }
+
+        }
+        catch (IOException e)
+        {
+            // @todo how to handle?
+            endOfStream = true;
+            return END_OF_STREAM;
+        }
+
+        return c;
+    }
+
+    /**
+     * @see org.ajax4jsf.org.w3c.tidy.StreamIn#readChar()
+     */
+    public int readChar()
+    {
+        int c;
+
+        if (this.pushed)
+        {
+            c = this.charbuf[--(this.bufpos)];
+            if ((this.bufpos) == 0)
+            {
+                this.pushed = false;
+            }
+
+            if (c == '\n')
+            {
+                this.curcol = 1;
+                this.curline++;
+                return c;
+            }
+
+            this.curcol++;
+            return c;
+        }
+
+        this.lastcol = this.curcol;
+
+        if (this.tabs > 0)
+        {
+            this.curcol++;
+            this.tabs--;
+            return ' ';
+        }
+
+        c = readCharFromStream();
+
+        if (c < 0)
+        {
+            endOfStream = true;
+            return END_OF_STREAM;
+        }
+
+        if (c == '\n')
+        {
+            this.curcol = 1;
+            this.curline++;
+            return c;
+        }
+        else if (c == '\r') // \r\n
+        {
+            c = readCharFromStream();
+            if (c != '\n')
+            {
+                if (c != END_OF_STREAM)
+                {
+                    ungetChar(c);
+                }
+                c = '\n';
+            }
+            this.curcol = 1;
+            this.curline++;
+            return c;
+        }
+
+        if (c == '\t')
+        {
+            this.tabs = this.tabsize - ((this.curcol - 1) % this.tabsize) - 1;
+            this.curcol++;
+            c = ' ';
+            return c;
+        }
+
+        this.curcol++;
+
+        return c;
+    }
+
+    /**
+     * @see org.ajax4jsf.org.w3c.tidy.StreamIn#ungetChar(int)
+     */
+    public void ungetChar(int c)
+    {
+        this.pushed = true;
+        if (this.bufpos >= CHARBUF_SIZE)
+        {
+            // pop last element
+            System.arraycopy(this.charbuf, 0, this.charbuf, 1, CHARBUF_SIZE - 1);
+            this.bufpos--;
+        }
+        this.charbuf[(this.bufpos)++] = c;
+
+        if (c == '\n')
+        {
+            --this.curline;
+        }
+
+        this.curcol = this.lastcol;
+    }
+
+    /**
+     * @see org.ajax4jsf.org.w3c.tidy.StreamIn#isEndOfStream()
+     */
+    public boolean isEndOfStream()
+    {
+        return endOfStream;
+    }
+
+    /**
+     * Getter for <code>curcol</code>.
+     * @return Returns the curcol.
+     */
+    public int getCurcol()
+    {
+        return this.curcol;
+    }
+
+    /**
+     * Getter for <code>curline</code>.
+     * @return Returns the curline.
+     */
+    public int getCurline()
+    {
+        return this.curline;
+    }
+
+    /**
+     * @see org.ajax4jsf.org.w3c.tidy.StreamIn#setLexer(org.ajax4jsf.org.w3c.tidy.Lexer)
+     */
+    public void setLexer(Lexer lexer)
+    {
+        // unused in the java implementation
+    }    
+    
+    private char[] chars = new char[256];
+    private int index = 0;
+    private int length = 0;
+    
+    private int readCharFromStreamBuffer() throws IOException {
+    	if(index >= length) {
+    		if(length < 0) return -1;
+    		length = reader.read(chars);
+    		index = 0;
+    	}
+    	if(index < length) {
+    		char c = chars[index];
+    		index++;
+    		return c;
+    	}
+    	return -1;
+    }    
+
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/Style.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/Style.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/Style.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,122 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ *  Java HTML Tidy - JTidy
+ *  HTML parser and pretty printer
+ *
+ *  Copyright (c) 1998-2000 World Wide Web Consortium (Massachusetts
+ *  Institute of Technology, Institut National de Recherche en
+ *  Informatique et en Automatique, Keio University). All Rights
+ *  Reserved.
+ *
+ *  Contributing Author(s):
+ *
+ *     Dave Raggett <dsr at w3.org>
+ *     Andy Quick <ac.quick at sympatico.ca> (translation to Java)
+ *     Gary L Peskin <garyp at firstech.com> (Java development)
+ *     Sami Lempinen <sami at lempinen.net> (release management)
+ *     Fabrizio Giustina <fgiust at users.sourceforge.net>
+ *
+ *  The contributing author(s) would like to thank all those who
+ *  helped with testing, bug fixes, and patience.  This wouldn't
+ *  have been possible without all of you.
+ *
+ *  COPYRIGHT NOTICE:
+ * 
+ *  This software and documentation is provided "as is," and
+ *  the copyright holders and contributing author(s) make no
+ *  representations or warranties, express or implied, including
+ *  but not limited to, warranties of merchantability or fitness
+ *  for any particular purpose or that the use of the software or
+ *  documentation will not infringe any third party patents,
+ *  copyrights, trademarks or other rights. 
+ *
+ *  The copyright holders and contributing author(s) will not be
+ *  liable for any direct, indirect, special or consequential damages
+ *  arising out of any use of the software or documentation, even if
+ *  advised of the possibility of such damage.
+ *
+ *  Permission is hereby granted to use, copy, modify, and distribute
+ *  this source code, or portions hereof, documentation and executables,
+ *  for any purpose, without fee, subject to the following restrictions:
+ *
+ *  1. The origin of this source code must not be misrepresented.
+ *  2. Altered versions must be plainly marked as such and must
+ *     not be misrepresented as being the original source.
+ *  3. This Copyright notice may not be removed or altered from any
+ *     source or altered source distribution.
+ * 
+ *  The copyright holders and contributing author(s) specifically
+ *  permit, without fee, and encourage the use of this source code
+ *  as a component for supporting the Hypertext Markup Language in
+ *  commercial products. If you use this source code in a product,
+ *  acknowledgment is not required but would be appreciated.
+ *
+ */
+package org.ajax4jsf.org.w3c.tidy;
+
+/**
+ * Linked list of class names and styles.
+ * @author Dave Raggett <a href="mailto:dsr at w3.org">dsr at w3.org </a>
+ * @author Andy Quick <a href="mailto:ac.quick at sympatico.ca">ac.quick at sympatico.ca </a> (translation to Java)
+ * @author Fabrizio Giustina
+ * @version $Revision: 1.1.2.1 $ ($Author: alexsmirnov $)
+ */
+public class Style
+{
+
+    /**
+     * Tag name.
+     */
+    protected String tag;
+
+    /**
+     * Tag class.
+     */
+    protected String tagClass;
+
+    /**
+     * Style properties.
+     */
+    protected String properties;
+
+    /**
+     * Next linked style element.
+     */
+    protected Style next;
+
+    /**
+     * Instantiates a new style.
+     * @param tag Tag name
+     * @param tagClass Tag class
+     * @param properties Style properties
+     * @param next Next linked style element. Can be null.
+     */
+    public Style(String tag, String tagClass, String properties, Style next)
+    {
+        this.tag = tag;
+        this.tagClass = tagClass;
+        this.properties = properties;
+        this.next = next;
+    }
+
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/StyleProp.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/StyleProp.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/StyleProp.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,115 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ *  Java HTML Tidy - JTidy
+ *  HTML parser and pretty printer
+ *
+ *  Copyright (c) 1998-2000 World Wide Web Consortium (Massachusetts
+ *  Institute of Technology, Institut National de Recherche en
+ *  Informatique et en Automatique, Keio University). All Rights
+ *  Reserved.
+ *
+ *  Contributing Author(s):
+ *
+ *     Dave Raggett <dsr at w3.org>
+ *     Andy Quick <ac.quick at sympatico.ca> (translation to Java)
+ *     Gary L Peskin <garyp at firstech.com> (Java development)
+ *     Sami Lempinen <sami at lempinen.net> (release management)
+ *     Fabrizio Giustina <fgiust at users.sourceforge.net>
+ *
+ *  The contributing author(s) would like to thank all those who
+ *  helped with testing, bug fixes, and patience.  This wouldn't
+ *  have been possible without all of you.
+ *
+ *  COPYRIGHT NOTICE:
+ * 
+ *  This software and documentation is provided "as is," and
+ *  the copyright holders and contributing author(s) make no
+ *  representations or warranties, express or implied, including
+ *  but not limited to, warranties of merchantability or fitness
+ *  for any particular purpose or that the use of the software or
+ *  documentation will not infringe any third party patents,
+ *  copyrights, trademarks or other rights. 
+ *
+ *  The copyright holders and contributing author(s) will not be
+ *  liable for any direct, indirect, special or consequential damages
+ *  arising out of any use of the software or documentation, even if
+ *  advised of the possibility of such damage.
+ *
+ *  Permission is hereby granted to use, copy, modify, and distribute
+ *  this source code, or portions hereof, documentation and executables,
+ *  for any purpose, without fee, subject to the following restrictions:
+ *
+ *  1. The origin of this source code must not be misrepresented.
+ *  2. Altered versions must be plainly marked as such and must
+ *     not be misrepresented as being the original source.
+ *  3. This Copyright notice may not be removed or altered from any
+ *     source or altered source distribution.
+ * 
+ *  The copyright holders and contributing author(s) specifically
+ *  permit, without fee, and encourage the use of this source code
+ *  as a component for supporting the Hypertext Markup Language in
+ *  commercial products. If you use this source code in a product,
+ *  acknowledgment is not required but would be appreciated.
+ *
+ */
+package org.ajax4jsf.org.w3c.tidy;
+
+/**
+ * Linked list of style properties.
+ * @author Dave Raggett <a href="mailto:dsr at w3.org">dsr at w3.org </a>
+ * @author Andy Quick <a href="mailto:ac.quick at sympatico.ca">ac.quick at sympatico.ca </a> (translation to Java)
+ * @author Fabrizio Giustina
+ * @version $Revision: 1.1.2.1 $ ($Author: alexsmirnov $)
+ */
+public class StyleProp
+{
+
+    /**
+     * Style name.
+     */
+    protected String name;
+
+    /**
+     * Style value.
+     */
+    protected String value;
+
+    /**
+     * Next linked style property.
+     */
+    protected StyleProp next;
+
+    /**
+     * Instantiates a new style property.
+     * @param name Style name
+     * @param value Style value
+     * @param next Next linked style property. Can be null.
+     */
+    public StyleProp(String name, String value, StyleProp next)
+    {
+        this.name = name;
+        this.value = value;
+        this.next = next;
+    }
+
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/TagCheck.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/TagCheck.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/TagCheck.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,95 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ *  Java HTML Tidy - JTidy
+ *  HTML parser and pretty printer
+ *
+ *  Copyright (c) 1998-2000 World Wide Web Consortium (Massachusetts
+ *  Institute of Technology, Institut National de Recherche en
+ *  Informatique et en Automatique, Keio University). All Rights
+ *  Reserved.
+ *
+ *  Contributing Author(s):
+ *
+ *     Dave Raggett <dsr at w3.org>
+ *     Andy Quick <ac.quick at sympatico.ca> (translation to Java)
+ *     Gary L Peskin <garyp at firstech.com> (Java development)
+ *     Sami Lempinen <sami at lempinen.net> (release management)
+ *     Fabrizio Giustina <fgiust at users.sourceforge.net>
+ *
+ *  The contributing author(s) would like to thank all those who
+ *  helped with testing, bug fixes, and patience.  This wouldn't
+ *  have been possible without all of you.
+ *
+ *  COPYRIGHT NOTICE:
+ * 
+ *  This software and documentation is provided "as is," and
+ *  the copyright holders and contributing author(s) make no
+ *  representations or warranties, express or implied, including
+ *  but not limited to, warranties of merchantability or fitness
+ *  for any particular purpose or that the use of the software or
+ *  documentation will not infringe any third party patents,
+ *  copyrights, trademarks or other rights. 
+ *
+ *  The copyright holders and contributing author(s) will not be
+ *  liable for any direct, indirect, special or consequential damages
+ *  arising out of any use of the software or documentation, even if
+ *  advised of the possibility of such damage.
+ *
+ *  Permission is hereby granted to use, copy, modify, and distribute
+ *  this source code, or portions hereof, documentation and executables,
+ *  for any purpose, without fee, subject to the following restrictions:
+ *
+ *  1. The origin of this source code must not be misrepresented.
+ *  2. Altered versions must be plainly marked as such and must
+ *     not be misrepresented as being the original source.
+ *  3. This Copyright notice may not be removed or altered from any
+ *     source or altered source distribution.
+ * 
+ *  The copyright holders and contributing author(s) specifically
+ *  permit, without fee, and encourage the use of this source code
+ *  as a component for supporting the Hypertext Markup Language in
+ *  commercial products. If you use this source code in a product,
+ *  acknowledgment is not required but would be appreciated.
+ *
+ */
+
+package org.ajax4jsf.org.w3c.tidy;
+
+/**
+ * Check HTML attributes.
+ * @author Dave Raggett <a href="mailto:dsr at w3.org">dsr at w3.org </a>
+ * @author Andy Quick <a href="mailto:ac.quick at sympatico.ca">ac.quick at sympatico.ca </a> (translation to Java)
+ * @author Fabrizio Giustina
+ * @version $Revision: 1.1.2.1 $ ($Author: alexsmirnov $)
+ */
+public interface TagCheck
+{
+
+    /**
+     * Checks attributes in given Node.
+     * @param lexer Lexer
+     * @param node Node to check for valid attributes.
+     */
+    void check(Lexer lexer, Node node);
+
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/TagCheckImpl.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/TagCheckImpl.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/TagCheckImpl.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,658 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ *  Java HTML Tidy - JTidy
+ *  HTML parser and pretty printer
+ *
+ *  Copyright (c) 1998-2000 World Wide Web Consortium (Massachusetts
+ *  Institute of Technology, Institut National de Recherche en
+ *  Informatique et en Automatique, Keio University). All Rights
+ *  Reserved.
+ *
+ *  Contributing Author(s):
+ *
+ *     Dave Raggett <dsr at w3.org>
+ *     Andy Quick <ac.quick at sympatico.ca> (translation to Java)
+ *     Gary L Peskin <garyp at firstech.com> (Java development)
+ *     Sami Lempinen <sami at lempinen.net> (release management)
+ *     Fabrizio Giustina <fgiust at users.sourceforge.net>
+ *
+ *  The contributing author(s) would like to thank all those who
+ *  helped with testing, bug fixes, and patience.  This wouldn't
+ *  have been possible without all of you.
+ *
+ *  COPYRIGHT NOTICE:
+ * 
+ *  This software and documentation is provided "as is," and
+ *  the copyright holders and contributing author(s) make no
+ *  representations or warranties, express or implied, including
+ *  but not limited to, warranties of merchantability or fitness
+ *  for any particular purpose or that the use of the software or
+ *  documentation will not infringe any third party patents,
+ *  copyrights, trademarks or other rights. 
+ *
+ *  The copyright holders and contributing author(s) will not be
+ *  liable for any direct, indirect, special or consequential damages
+ *  arising out of any use of the software or documentation, even if
+ *  advised of the possibility of such damage.
+ *
+ *  Permission is hereby granted to use, copy, modify, and distribute
+ *  this source code, or portions hereof, documentation and executables,
+ *  for any purpose, without fee, subject to the following restrictions:
+ *
+ *  1. The origin of this source code must not be misrepresented.
+ *  2. Altered versions must be plainly marked as such and must
+ *     not be misrepresented as being the original source.
+ *  3. This Copyright notice may not be removed or altered from any
+ *     source or altered source distribution.
+ * 
+ *  The copyright holders and contributing author(s) specifically
+ *  permit, without fee, and encourage the use of this source code
+ *  as a component for supporting the Hypertext Markup Language in
+ *  commercial products. If you use this source code in a product,
+ *  acknowledgment is not required but would be appreciated.
+ *
+ */
+package org.ajax4jsf.org.w3c.tidy;
+
+/**
+ * Check HTML attributes implementation.
+ * @author Dave Raggett <a href="mailto:dsr at w3.org">dsr at w3.org </a>
+ * @author Andy Quick <a href="mailto:ac.quick at sympatico.ca">ac.quick at sympatico.ca </a> (translation to Java)
+ * @author Fabrizio Giustina
+ * @version $Revision: 1.1.2.1 $ ($Author: alexsmirnov $)
+ */
+public final class TagCheckImpl
+{
+
+    /**
+     * CheckHTML instance.
+     */
+    public static final TagCheck HTML = new CheckHTML();
+
+    /**
+     * CheckSCRIPT instance.
+     */
+    public static final TagCheck SCRIPT = new CheckSCRIPT();
+
+    /**
+     * CheckTABLE instance.
+     */
+    public static final TagCheck TABLE = new CheckTABLE();
+
+    /**
+     * CheckCaption instance.
+     */
+    public static final TagCheck CAPTION = new CheckCaption();
+
+    /**
+     * CheckIMG instance.
+     */
+    public static final TagCheck IMG = new CheckIMG();
+
+    /**
+     * CheckAREA instance.
+     */
+    public static final TagCheck AREA = new CheckAREA();
+
+    /**
+     * CheckAnchor instance.
+     */
+    public static final TagCheck ANCHOR = new CheckAnchor();
+
+    /**
+     * CheckMap instance.
+     */
+    public static final TagCheck MAP = new CheckMap();
+
+    /**
+     * CheckSTYLE instance.
+     */
+    public static final TagCheck STYLE = new CheckSTYLE();
+
+    /**
+     * CheckTableCell instance.
+     */
+    public static final TagCheck TABLECELL = new CheckTableCell();
+
+    /**
+     * CheckLINK instance.
+     */
+    public static final TagCheck LINK = new CheckLINK();
+
+    /**
+     * CheckHR instance.
+     */
+    public static final TagCheck HR = new CheckHR();
+
+    /**
+     * CheckForm instance.
+     */
+    public static final TagCheck FORM = new CheckForm();
+
+    /**
+     * CheckMeta instance.
+     */
+    public static final TagCheck META = new CheckMeta();
+
+    /**
+     * don't instantiate.
+     */
+    private TagCheckImpl()
+    {
+        // unused
+    }
+
+    /**
+     * Checker implementation for html tag.
+     */
+    public static class CheckHTML implements TagCheck
+    {
+
+        /**
+         * xhtml namepace String.
+         */
+        private static final String XHTML_NAMESPACE = "http://www.w3.org/1999/xhtml";
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.TagCheck#check(org.ajax4jsf.org.w3c.tidy.Lexer, org.ajax4jsf.org.w3c.tidy.Node)
+         */
+        public void check(Lexer lexer, Node node)
+        {
+
+            AttVal attval;
+            AttVal xmlns;
+
+            xmlns = node.getAttrByName("xmlns");
+
+            if (xmlns != null && XHTML_NAMESPACE.equals(xmlns.value))
+            {
+                lexer.isvoyager = true;
+                if (!lexer.configuration.htmlOut) // Unless user has specified plain HTML output,
+                {
+                    lexer.configuration.xHTML = true; // output format will be XHTML.
+                }
+                // adjust other config options, just as in Configuration
+                lexer.configuration.xmlOut = true;
+                lexer.configuration.upperCaseTags = false;
+                lexer.configuration.upperCaseAttrs = false;
+            }
+
+            for (attval = node.attributes; attval != null; attval = attval.next)
+            {
+                attval.checkAttribute(lexer, node);
+            }
+        }
+
+    }
+
+    /**
+     * Checker implementation for script tags.
+     */
+    public static class CheckSCRIPT implements TagCheck
+    {
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.TagCheck#check(org.ajax4jsf.org.w3c.tidy.Lexer, org.ajax4jsf.org.w3c.tidy.Node)
+         */
+        public void check(Lexer lexer, Node node)
+        {
+            AttVal lang, type;
+
+            node.checkAttributes(lexer);
+
+            lang = node.getAttrByName("language");
+            type = node.getAttrByName("type");
+
+            if (type == null)
+            {
+                AttVal missingType = new AttVal(null, null, '"', "type", "");
+                lexer.report.attrError(lexer, node, missingType, Report.MISSING_ATTRIBUTE);
+
+                // check for javascript
+                if (lang != null)
+                {
+                    String str = lang.value;
+                    if ("javascript".equalsIgnoreCase(str) || "jscript".equalsIgnoreCase(str))
+                    {
+                        node.addAttribute("type", "text/javascript");
+                    }
+                    else if ("vbscript".equalsIgnoreCase(str))
+                    {
+                        // per Randy Waki 8/6/01
+                        node.addAttribute("type", "text/vbscript");
+                    }
+                }
+                else
+                {
+                    node.addAttribute("type", "text/javascript");
+                }
+            }
+        }
+
+    }
+
+    /**
+     * Checker implementation for table.
+     */
+    public static class CheckTABLE implements TagCheck
+    {
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.TagCheck#check(org.ajax4jsf.org.w3c.tidy.Lexer, org.ajax4jsf.org.w3c.tidy.Node)
+         */
+        public void check(Lexer lexer, Node node)
+        {
+            AttVal attval;
+            Attribute attribute;
+            boolean hasSummary = false;
+
+            for (attval = node.attributes; attval != null; attval = attval.next)
+            {
+                attribute = attval.checkAttribute(lexer, node);
+
+                if (attribute == AttributeTable.attrSummary)
+                {
+                    hasSummary = true;
+                }
+            }
+
+            /* suppress warning for missing summary for HTML 2.0 and HTML 3.2 */
+            if (!hasSummary && lexer.doctype != Dict.VERS_HTML20 && lexer.doctype != Dict.VERS_HTML32)
+            {
+                lexer.badAccess |= Report.MISSING_SUMMARY;
+
+                // summary is not required, should be only an accessibility warning
+                // AttVal missingSummary = new AttVal(null, null, '"', "summary", "");
+                // lexer.report.attrError(lexer, node, missingSummary, Report.MISSING_ATTRIBUTE);
+            }
+
+            /* convert <table border> to <table border="1"> */
+            if (lexer.configuration.xmlOut)
+            {
+                attval = node.getAttrByName("border");
+                if (attval != null)
+                {
+                    if (attval.value == null)
+                    {
+                        attval.value = "1";
+                    }
+                }
+            }
+
+            /* <table height="..."> is proprietary */
+            if ((attval = node.getAttrByName("height")) != null)
+            {
+                lexer.report.attrError(lexer, node, attval, Report.PROPRIETARY_ATTRIBUTE);
+                lexer.versions &= Dict.VERS_PROPRIETARY;
+            }
+
+        }
+
+    }
+
+    /**
+     * Checker implementation for table caption.
+     */
+    public static class CheckCaption implements TagCheck
+    {
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.TagCheck#check(org.ajax4jsf.org.w3c.tidy.Lexer, org.ajax4jsf.org.w3c.tidy.Node)
+         */
+        public void check(Lexer lexer, Node node)
+        {
+            AttVal attval;
+            String value = null;
+
+            node.checkAttributes(lexer);
+
+            for (attval = node.attributes; attval != null; attval = attval.next)
+            {
+                if ("align".equalsIgnoreCase(attval.attribute))
+                {
+                    value = attval.value;
+                    break;
+                }
+            }
+
+            if (value != null)
+            {
+                if ("left".equalsIgnoreCase(value) || "right".equalsIgnoreCase(value))
+                {
+                    lexer.constrainVersion(Dict.VERS_HTML40_LOOSE);
+                }
+                else if ("top".equalsIgnoreCase(value) || "bottom".equalsIgnoreCase(value))
+                {
+                    lexer.constrainVersion(~(Dict.VERS_HTML20 | Dict.VERS_HTML32));
+                }
+                else
+                {
+                    lexer.report.attrError(lexer, node, attval, Report.BAD_ATTRIBUTE_VALUE);
+                }
+            }
+        }
+
+    }
+
+    /**
+     * Checker implementation for hr.
+     */
+    public static class CheckHR implements TagCheck
+    {
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.TagCheck#check(org.ajax4jsf.org.w3c.tidy.Lexer, org.ajax4jsf.org.w3c.tidy.Node)
+         */
+        public void check(Lexer lexer, Node node)
+        {
+            AttVal av = node.getAttrByName("src");
+
+            node.checkAttributes(lexer);
+
+            if (av != null)
+            {
+                lexer.report.attrError(lexer, node, av, Report.PROPRIETARY_ATTR_VALUE);
+            }
+        }
+    }
+
+    /**
+     * Checker implementation for image tags.
+     */
+    public static class CheckIMG implements TagCheck
+    {
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.TagCheck#check(org.ajax4jsf.org.w3c.tidy.Lexer, org.ajax4jsf.org.w3c.tidy.Node)
+         */
+        public void check(Lexer lexer, Node node)
+        {
+            AttVal attval;
+            Attribute attribute;
+            boolean hasAlt = false;
+            boolean hasSrc = false;
+            boolean hasUseMap = false;
+            boolean hasIsMap = false;
+            boolean hasDataFld = false;
+
+            for (attval = node.attributes; attval != null; attval = attval.next)
+            {
+                attribute = attval.checkAttribute(lexer, node);
+
+                if (attribute == AttributeTable.attrAlt)
+                {
+                    hasAlt = true;
+                }
+                else if (attribute == AttributeTable.attrSrc)
+                {
+                    hasSrc = true;
+                }
+                else if (attribute == AttributeTable.attrUsemap)
+                {
+                    hasUseMap = true;
+                }
+                else if (attribute == AttributeTable.attrIsmap)
+                {
+                    hasIsMap = true;
+                }
+                else if (attribute == AttributeTable.attrDatafld)
+                {
+                    hasDataFld = true;
+                }
+                else if (attribute == AttributeTable.attrWidth || attribute == AttributeTable.attrHeight)
+                {
+                    lexer.constrainVersion(~Dict.VERS_HTML20);
+                }
+            }
+
+            if (!hasAlt)
+            {
+                lexer.badAccess |= Report.MISSING_IMAGE_ALT;
+                AttVal missingAlt = new AttVal(null, null, '"', "alt", "");
+                lexer.report.attrError(lexer, node, missingAlt, Report.MISSING_ATTRIBUTE);
+                if (lexer.configuration.altText != null)
+                {
+                    node.addAttribute("alt", lexer.configuration.altText);
+                }
+            }
+
+            if (!hasSrc && !hasDataFld)
+            {
+                AttVal missingSrc = new AttVal(null, null, '"', "src", "");
+                lexer.report.attrError(lexer, node, missingSrc, Report.MISSING_ATTRIBUTE);
+            }
+
+            if (hasIsMap && !hasUseMap)
+            {
+                AttVal missingIsMap = new AttVal(null, null, '"', "ismap", "");
+                lexer.report.attrError(lexer, node, missingIsMap, Report.MISSING_IMAGEMAP);
+            }
+        }
+
+    }
+
+    /**
+     * Checker implementation for area.
+     */
+    public static class CheckAREA implements TagCheck
+    {
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.TagCheck#check(org.ajax4jsf.org.w3c.tidy.Lexer, org.ajax4jsf.org.w3c.tidy.Node)
+         */
+        public void check(Lexer lexer, Node node)
+        {
+            AttVal attval;
+            Attribute attribute;
+            boolean hasAlt = false;
+            boolean hasHref = false;
+
+            for (attval = node.attributes; attval != null; attval = attval.next)
+            {
+                attribute = attval.checkAttribute(lexer, node);
+
+                if (attribute == AttributeTable.attrAlt)
+                {
+                    hasAlt = true;
+                }
+                else if (attribute == AttributeTable.attrHref)
+                {
+                    hasHref = true;
+                }
+            }
+
+            if (!hasAlt)
+            {
+                lexer.badAccess |= Report.MISSING_LINK_ALT;
+                AttVal missingAlt = new AttVal(null, null, '"', "alt", "");
+                lexer.report.attrError(lexer, node, missingAlt, Report.MISSING_ATTRIBUTE);
+            }
+            if (!hasHref)
+            {
+                AttVal missingHref = new AttVal(null, null, '"', "href", "");
+                lexer.report.attrError(lexer, node, missingHref, Report.MISSING_ATTRIBUTE);
+            }
+        }
+
+    }
+
+    /**
+     * Checker implementation for anchors.
+     */
+    public static class CheckAnchor implements TagCheck
+    {
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.TagCheck#check(org.ajax4jsf.org.w3c.tidy.Lexer, org.ajax4jsf.org.w3c.tidy.Node)
+         */
+        public void check(Lexer lexer, Node node)
+        {
+            node.checkAttributes(lexer);
+
+            lexer.fixId(node);
+        }
+    }
+
+    /**
+     * Checker implementation for image maps.
+     */
+    public static class CheckMap implements TagCheck
+    {
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.TagCheck#check(org.ajax4jsf.org.w3c.tidy.Lexer, org.ajax4jsf.org.w3c.tidy.Node)
+         */
+        public void check(Lexer lexer, Node node)
+        {
+            node.checkAttributes(lexer);
+
+            lexer.fixId(node);
+        }
+    }
+
+    /**
+     * Checker implementation for style tags.
+     */
+    public static class CheckSTYLE implements TagCheck
+    {
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.TagCheck#check(org.ajax4jsf.org.w3c.tidy.Lexer, org.ajax4jsf.org.w3c.tidy.Node)
+         */
+        public void check(Lexer lexer, Node node)
+        {
+            AttVal type = node.getAttrByName("type");
+
+            node.checkAttributes(lexer);
+
+            if (type == null)
+            {
+                AttVal missingType = new AttVal(null, null, '"', "type", "");
+                lexer.report.attrError(lexer, node, missingType, Report.MISSING_ATTRIBUTE);
+
+                node.addAttribute("type", "text/css");
+            }
+        }
+    }
+
+    /**
+     * Checker implementation for forms. Reports missing action attribute.
+     */
+    public static class CheckForm implements TagCheck
+    {
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.TagCheck#check(org.ajax4jsf.org.w3c.tidy.Lexer, org.ajax4jsf.org.w3c.tidy.Node)
+         */
+        public void check(Lexer lexer, Node node)
+        {
+            AttVal action = node.getAttrByName("action");
+
+            node.checkAttributes(lexer);
+
+            if (action == null)
+            {
+                AttVal missingAttribute = new AttVal(null, null, '"', "action", "");
+                lexer.report.attrError(lexer, node, missingAttribute, Report.MISSING_ATTRIBUTE);
+            }
+        }
+    }
+
+    /**
+     * Checker implementation for meta tags. Reports missing content attribute.
+     */
+    public static class CheckMeta implements TagCheck
+    {
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.TagCheck#check(org.ajax4jsf.org.w3c.tidy.Lexer, org.ajax4jsf.org.w3c.tidy.Node)
+         */
+        public void check(Lexer lexer, Node node)
+        {
+            AttVal content = node.getAttrByName("content");
+
+            node.checkAttributes(lexer);
+
+            if (content == null)
+            {
+                AttVal missingAttribute = new AttVal(null, null, '"', "content", "");
+                lexer.report.attrError(lexer, node, missingAttribute, Report.MISSING_ATTRIBUTE);
+            }
+
+            // name or http-equiv attribute must also be set
+        }
+    }
+
+    /**
+     * Checker implementation for table cells.
+     */
+    public static class CheckTableCell implements TagCheck
+    {
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.TagCheck#check(org.ajax4jsf.org.w3c.tidy.Lexer, org.ajax4jsf.org.w3c.tidy.Node)
+         */
+        public void check(Lexer lexer, Node node)
+        {
+            node.checkAttributes(lexer);
+
+            // HTML4 strict doesn't allow mixed content for elements with %block; as their content model
+
+            if (node.getAttrByName("width") != null || node.getAttrByName("height") != null)
+            {
+                lexer.constrainVersion(~Dict.VERS_HTML40_STRICT);
+            }
+        }
+    }
+
+    /**
+     * add missing type attribute when appropriate.
+     */
+    public static class CheckLINK implements TagCheck
+    {
+
+        /**
+         * @see org.ajax4jsf.org.w3c.tidy.TagCheck#check(org.ajax4jsf.org.w3c.tidy.Lexer, org.ajax4jsf.org.w3c.tidy.Node)
+         */
+        public void check(Lexer lexer, Node node)
+        {
+            AttVal rel = node.getAttrByName("rel");
+
+            node.checkAttributes(lexer);
+
+            if (rel != null && rel.value != null && rel.value.equals("stylesheet"))
+            {
+                AttVal type = node.getAttrByName("type");
+
+                if (type == null)
+                {
+                    AttVal missingType = new AttVal(null, null, '"', "type", "");
+                    lexer.report.attrError(lexer, node, missingType, Report.MISSING_ATTRIBUTE);
+
+                    node.addAttribute("type", "text/css");
+                }
+            }
+        }
+    }
+
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/TagTable.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/TagTable.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/TagTable.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1090 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ *  Java HTML Tidy - JTidy
+ *  HTML parser and pretty printer
+ *
+ *  Copyright (c) 1998-2000 World Wide Web Consortium (Massachusetts
+ *  Institute of Technology, Institut National de Recherche en
+ *  Informatique et en Automatique, Keio University). All Rights
+ *  Reserved.
+ *
+ *  Contributing Author(s):
+ *
+ *     Dave Raggett <dsr at w3.org>
+ *     Andy Quick <ac.quick at sympatico.ca> (translation to Java)
+ *     Gary L Peskin <garyp at firstech.com> (Java development)
+ *     Sami Lempinen <sami at lempinen.net> (release management)
+ *     Fabrizio Giustina <fgiust at users.sourceforge.net>
+ *
+ *  The contributing author(s) would like to thank all those who
+ *  helped with testing, bug fixes, and patience.  This wouldn't
+ *  have been possible without all of you.
+ *
+ *  COPYRIGHT NOTICE:
+ * 
+ *  This software and documentation is provided "as is," and
+ *  the copyright holders and contributing author(s) make no
+ *  representations or warranties, express or implied, including
+ *  but not limited to, warranties of merchantability or fitness
+ *  for any particular purpose or that the use of the software or
+ *  documentation will not infringe any third party patents,
+ *  copyrights, trademarks or other rights. 
+ *
+ *  The copyright holders and contributing author(s) will not be
+ *  liable for any direct, indirect, special or consequential damages
+ *  arising out of any use of the software or documentation, even if
+ *  advised of the possibility of such damage.
+ *
+ *  Permission is hereby granted to use, copy, modify, and distribute
+ *  this source code, or portions hereof, documentation and executables,
+ *  for any purpose, without fee, subject to the following restrictions:
+ *
+ *  1. The origin of this source code must not be misrepresented.
+ *  2. Altered versions must be plainly marked as such and must
+ *     not be misrepresented as being the original source.
+ *  3. This Copyright notice may not be removed or altered from any
+ *     source or altered source distribution.
+ * 
+ *  The copyright holders and contributing author(s) specifically
+ *  permit, without fee, and encourage the use of this source code
+ *  as a component for supporting the Hypertext Markup Language in
+ *  commercial products. If you use this source code in a product,
+ *  acknowledgment is not required but would be appreciated.
+ *
+ */
+package org.ajax4jsf.org.w3c.tidy;
+
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * Tag dictionary node hash table.
+ * @author Dave Raggett <a href="mailto:dsr at w3.org">dsr at w3.org </a>
+ * @author Andy Quick <a href="mailto:ac.quick at sympatico.ca">ac.quick at sympatico.ca </a> (translation to Java)
+ * @author Fabrizio Giustina
+ * @version $Revision: 1.1.2.1 $ ($Author: alexsmirnov $)
+ */
+public final class TagTable
+{
+
+    /**
+     * dummy entry for all xml tags.
+     */
+    public static final Dict XML_TAGS = new Dict(null, Dict.VERS_ALL, Dict.CM_BLOCK, null, null);
+
+    /**
+     * all the known tags.
+     */
+    private static final Dict[] TAGS = {
+        new Dict(
+            "html",
+            Dict.VERS_ALL,
+            (Dict.CM_HTML | Dict.CM_OPT | Dict.CM_OMITST),
+            ParserImpl.HTML,
+            TagCheckImpl.HTML),
+        new Dict("head", Dict.VERS_ALL, (Dict.CM_HTML | Dict.CM_OPT | Dict.CM_OMITST), ParserImpl.HEAD, null),
+        new Dict("title", Dict.VERS_ALL, Dict.CM_HEAD, ParserImpl.TITLE, null),
+        new Dict("base", Dict.VERS_ALL, (Dict.CM_HEAD | Dict.CM_EMPTY), ParserImpl.EMPTY, null),
+        new Dict("link", Dict.VERS_ALL, (Dict.CM_HEAD | Dict.CM_EMPTY), ParserImpl.EMPTY, TagCheckImpl.LINK),
+        new Dict("meta", Dict.VERS_ALL, (Dict.CM_HEAD | Dict.CM_EMPTY), ParserImpl.EMPTY, TagCheckImpl.META),
+        new Dict(
+            "style",
+            (short) (Dict.VERS_HTML40 & ~Dict.VERS_BASIC),
+            Dict.CM_HEAD,
+            ParserImpl.SCRIPT,
+            TagCheckImpl.STYLE),
+        new Dict(
+            "script",
+            (short) (Dict.VERS_HTML40 & ~Dict.VERS_BASIC),
+            (Dict.CM_HEAD | Dict.CM_MIXED | Dict.CM_BLOCK | Dict.CM_INLINE),
+            ParserImpl.SCRIPT,
+            TagCheckImpl.SCRIPT),
+        new Dict(
+            "server",
+            Dict.VERS_NETSCAPE,
+            (Dict.CM_HEAD | Dict.CM_MIXED | Dict.CM_BLOCK | Dict.CM_INLINE),
+            ParserImpl.SCRIPT,
+            null),
+        new Dict("body", Dict.VERS_ALL, (Dict.CM_HTML | Dict.CM_OPT | Dict.CM_OMITST), ParserImpl.BODY, null),
+        new Dict("frameset", Dict.VERS_FRAMESET, (Dict.CM_HTML | Dict.CM_FRAMES), ParserImpl.FRAMESET, null),
+        new Dict("p", Dict.VERS_ALL, (Dict.CM_BLOCK | Dict.CM_OPT), ParserImpl.INLINE, null),
+        new Dict("h1", Dict.VERS_ALL, (Dict.CM_BLOCK | Dict.CM_HEADING), ParserImpl.INLINE, null),
+        new Dict("h2", Dict.VERS_ALL, (Dict.CM_BLOCK | Dict.CM_HEADING), ParserImpl.INLINE, null),
+        new Dict("h3", Dict.VERS_ALL, (Dict.CM_BLOCK | Dict.CM_HEADING), ParserImpl.INLINE, null),
+        new Dict("h4", Dict.VERS_ALL, (Dict.CM_BLOCK | Dict.CM_HEADING), ParserImpl.INLINE, null),
+        new Dict("h5", Dict.VERS_ALL, (Dict.CM_BLOCK | Dict.CM_HEADING), ParserImpl.INLINE, null),
+        new Dict("h6", Dict.VERS_ALL, (Dict.CM_BLOCK | Dict.CM_HEADING), ParserImpl.INLINE, null),
+        new Dict("ul", Dict.VERS_ALL, Dict.CM_BLOCK, ParserImpl.LIST, null),
+        new Dict("ol", Dict.VERS_ALL, Dict.CM_BLOCK, ParserImpl.LIST, null),
+        new Dict("dl", Dict.VERS_ALL, Dict.CM_BLOCK, ParserImpl.DEFLIST, null),
+        new Dict("dir", Dict.VERS_LOOSE, (Dict.CM_BLOCK | Dict.CM_OBSOLETE), ParserImpl.LIST, null),
+        new Dict("menu", Dict.VERS_LOOSE, (Dict.CM_BLOCK | Dict.CM_OBSOLETE), ParserImpl.LIST, null),
+        new Dict("pre", Dict.VERS_ALL, Dict.CM_BLOCK, ParserImpl.PRE, null),
+        new Dict("listing", Dict.VERS_ALL, (Dict.CM_BLOCK | Dict.CM_OBSOLETE), ParserImpl.PRE, null),
+        new Dict("xmp", Dict.VERS_ALL, (Dict.CM_BLOCK | Dict.CM_OBSOLETE), ParserImpl.PRE, null),
+        new Dict("plaintext", Dict.VERS_ALL, (Dict.CM_BLOCK | Dict.CM_OBSOLETE), ParserImpl.PRE, null),
+        new Dict("address", Dict.VERS_ALL, Dict.CM_BLOCK, ParserImpl.BLOCK, null),
+        new Dict("blockquote", Dict.VERS_ALL, Dict.CM_BLOCK, ParserImpl.BLOCK, null),
+        new Dict("form", Dict.VERS_ALL, Dict.CM_BLOCK, ParserImpl.BLOCK, TagCheckImpl.FORM),
+        new Dict("isindex", Dict.VERS_LOOSE, (Dict.CM_BLOCK | Dict.CM_EMPTY), ParserImpl.EMPTY, null),
+        new Dict("fieldset", (short) (Dict.VERS_HTML40 & ~Dict.VERS_BASIC), Dict.CM_BLOCK, ParserImpl.BLOCK, null),
+        new Dict("table", Dict.VERS_FROM32, Dict.CM_BLOCK, ParserImpl.TABLETAG, TagCheckImpl.TABLE),
+        new Dict(
+            "hr",
+            (short) (Dict.VERS_ALL & ~Dict.VERS_BASIC),
+            (Dict.CM_BLOCK | Dict.CM_EMPTY),
+            ParserImpl.EMPTY,
+            TagCheckImpl.HR),
+        new Dict("div", Dict.VERS_FROM32, Dict.CM_BLOCK, ParserImpl.BLOCK, null),
+        new Dict("multicol", Dict.VERS_NETSCAPE, Dict.CM_BLOCK, ParserImpl.BLOCK, null),
+        new Dict("nosave", Dict.VERS_NETSCAPE, Dict.CM_BLOCK, ParserImpl.BLOCK, null),
+        new Dict("layer", Dict.VERS_NETSCAPE, Dict.CM_BLOCK, ParserImpl.BLOCK, null),
+        new Dict("ilayer", Dict.VERS_NETSCAPE, Dict.CM_INLINE, ParserImpl.INLINE, null),
+        new Dict(
+            "nolayer",
+            Dict.VERS_NETSCAPE,
+            (Dict.CM_BLOCK | Dict.CM_INLINE | Dict.CM_MIXED),
+            ParserImpl.BLOCK,
+            null),
+        new Dict("align", Dict.VERS_NETSCAPE, Dict.CM_BLOCK, ParserImpl.BLOCK, null),
+        new Dict("center", Dict.VERS_LOOSE, Dict.CM_BLOCK, ParserImpl.BLOCK, null),
+        new Dict(
+            "ins",
+            (short) (Dict.VERS_HTML40 & ~Dict.VERS_BASIC),
+            (Dict.CM_INLINE | Dict.CM_BLOCK | Dict.CM_MIXED),
+            ParserImpl.INLINE,
+            null),
+        new Dict(
+            "del",
+            (short) (Dict.VERS_HTML40 & ~Dict.VERS_BASIC),
+            (Dict.CM_INLINE | Dict.CM_BLOCK | Dict.CM_MIXED),
+            ParserImpl.INLINE,
+            null),
+        new Dict("li", Dict.VERS_ALL, (Dict.CM_LIST | Dict.CM_OPT | Dict.CM_NO_INDENT), ParserImpl.BLOCK, null),
+        new Dict("dt", Dict.VERS_ALL, (Dict.CM_DEFLIST | Dict.CM_OPT | Dict.CM_NO_INDENT), ParserImpl.INLINE, null),
+        new Dict("dd", Dict.VERS_ALL, (Dict.CM_DEFLIST | Dict.CM_OPT | Dict.CM_NO_INDENT), ParserImpl.BLOCK, null),
+        new Dict("caption", Dict.VERS_FROM32, Dict.CM_TABLE, ParserImpl.INLINE, TagCheckImpl.CAPTION),
+        new Dict("colgroup", Dict.VERS_HTML40, (Dict.CM_TABLE | Dict.CM_OPT), ParserImpl.COLGROUP, null),
+        new Dict("col", Dict.VERS_HTML40, (Dict.CM_TABLE | Dict.CM_EMPTY), ParserImpl.EMPTY, null),
+        new Dict(
+            "thead",
+            (short) (Dict.VERS_HTML40 & ~Dict.VERS_BASIC),
+            (Dict.CM_TABLE | Dict.CM_ROWGRP | Dict.CM_OPT),
+            ParserImpl.ROWGROUP,
+            null),
+        new Dict(
+            "tfoot",
+            (short) (Dict.VERS_HTML40 & ~Dict.VERS_BASIC),
+            (Dict.CM_TABLE | Dict.CM_ROWGRP | Dict.CM_OPT),
+            ParserImpl.ROWGROUP,
+            null),
+        new Dict(
+            "tbody",
+            (short) (Dict.VERS_HTML40 & ~Dict.VERS_BASIC),
+            (Dict.CM_TABLE | Dict.CM_ROWGRP | Dict.CM_OPT),
+            ParserImpl.ROWGROUP,
+            null),
+        new Dict("tr", Dict.VERS_FROM32, (Dict.CM_TABLE | Dict.CM_OPT), ParserImpl.ROW, null),
+        new Dict(
+            "td",
+            Dict.VERS_FROM32,
+            (Dict.CM_ROW | Dict.CM_OPT | Dict.CM_NO_INDENT),
+            ParserImpl.BLOCK,
+            TagCheckImpl.TABLECELL),
+        new Dict(
+            "th",
+            Dict.VERS_FROM32,
+            (Dict.CM_ROW | Dict.CM_OPT | Dict.CM_NO_INDENT),
+            ParserImpl.BLOCK,
+            TagCheckImpl.TABLECELL),
+        new Dict("q", Dict.VERS_HTML40, Dict.CM_INLINE, ParserImpl.INLINE, null),
+        new Dict("a", Dict.VERS_ALL, Dict.CM_INLINE, ParserImpl.INLINE, TagCheckImpl.ANCHOR),
+        new Dict("br", Dict.VERS_ALL, (Dict.CM_INLINE | Dict.CM_EMPTY), ParserImpl.EMPTY, null),
+        new Dict(
+            "img",
+            Dict.VERS_ALL,
+            (Dict.CM_INLINE | Dict.CM_IMG | Dict.CM_EMPTY),
+            ParserImpl.EMPTY,
+            TagCheckImpl.IMG),
+        new Dict(
+            "object",
+            Dict.VERS_HTML40,
+            (Dict.CM_OBJECT | Dict.CM_HEAD | Dict.CM_IMG | Dict.CM_INLINE | Dict.CM_PARAM),
+            ParserImpl.BLOCK,
+            null),
+        new Dict(
+            "applet",
+            Dict.VERS_LOOSE,
+            (Dict.CM_OBJECT | Dict.CM_IMG | Dict.CM_INLINE | Dict.CM_PARAM),
+            ParserImpl.BLOCK,
+            null),
+        new Dict(
+            "servlet",
+            Dict.VERS_SUN,
+            (Dict.CM_OBJECT | Dict.CM_IMG | Dict.CM_INLINE | Dict.CM_PARAM),
+            ParserImpl.BLOCK,
+            null),
+        new Dict("param", Dict.VERS_FROM32, (Dict.CM_INLINE | Dict.CM_EMPTY), ParserImpl.EMPTY, null),
+        new Dict("embed", Dict.VERS_NETSCAPE, (Dict.CM_INLINE | Dict.CM_IMG | Dict.CM_EMPTY), ParserImpl.EMPTY, null),
+        new Dict("noembed", Dict.VERS_NETSCAPE, Dict.CM_INLINE, ParserImpl.INLINE, null),
+        new Dict("iframe", Dict.VERS_HTML40_LOOSE, Dict.CM_INLINE, ParserImpl.BLOCK, null),
+        new Dict("frame", Dict.VERS_FRAMESET, (Dict.CM_FRAMES | Dict.CM_EMPTY), ParserImpl.EMPTY, null),
+        new Dict("noframes", Dict.VERS_IFRAME, (Dict.CM_BLOCK | Dict.CM_FRAMES), ParserImpl.NOFRAMES, null),
+        new Dict(
+            "noscript",
+            (short) (Dict.VERS_HTML40 & ~Dict.VERS_BASIC),
+            (Dict.CM_BLOCK | Dict.CM_INLINE | Dict.CM_MIXED),
+            ParserImpl.BLOCK,
+            null),
+        new Dict("b", (short) (Dict.VERS_ALL & ~Dict.VERS_BASIC), Dict.CM_INLINE, ParserImpl.INLINE, null),
+        new Dict("i", (short) (Dict.VERS_ALL & ~Dict.VERS_BASIC), Dict.CM_INLINE, ParserImpl.INLINE, null),
+        new Dict("u", Dict.VERS_LOOSE, Dict.CM_INLINE, ParserImpl.INLINE, null),
+        new Dict("tt", (short) (Dict.VERS_ALL & ~Dict.VERS_BASIC), Dict.CM_INLINE, ParserImpl.INLINE, null),
+        new Dict("s", Dict.VERS_LOOSE, Dict.CM_INLINE, ParserImpl.INLINE, null),
+        new Dict("strike", Dict.VERS_LOOSE, Dict.CM_INLINE, ParserImpl.INLINE, null),
+        new Dict("big", (short) (Dict.VERS_HTML40 & ~Dict.VERS_BASIC), Dict.CM_INLINE, ParserImpl.INLINE, null),
+        new Dict("small", (short) (Dict.VERS_HTML40 & ~Dict.VERS_BASIC), Dict.CM_INLINE, ParserImpl.INLINE, null),
+        new Dict("sub", (short) (Dict.VERS_HTML40 & ~Dict.VERS_BASIC), Dict.CM_INLINE, ParserImpl.INLINE, null),
+        new Dict("sup", (short) (Dict.VERS_HTML40 & ~Dict.VERS_BASIC), Dict.CM_INLINE, ParserImpl.INLINE, null),
+        new Dict("em", Dict.VERS_ALL, Dict.CM_INLINE, ParserImpl.INLINE, null),
+        new Dict("strong", Dict.VERS_ALL, Dict.CM_INLINE, ParserImpl.INLINE, null),
+        new Dict("dfn", Dict.VERS_ALL, Dict.CM_INLINE, ParserImpl.INLINE, null),
+        new Dict("code", Dict.VERS_ALL, Dict.CM_INLINE, ParserImpl.INLINE, null),
+        new Dict("samp", Dict.VERS_ALL, Dict.CM_INLINE, ParserImpl.INLINE, null),
+        new Dict("kbd", Dict.VERS_ALL, Dict.CM_INLINE, ParserImpl.INLINE, null),
+        new Dict("var", Dict.VERS_ALL, Dict.CM_INLINE, ParserImpl.INLINE, null),
+        new Dict("cite", Dict.VERS_ALL, Dict.CM_INLINE, ParserImpl.INLINE, null),
+        new Dict("abbr", Dict.VERS_HTML40, Dict.CM_INLINE, ParserImpl.INLINE, null),
+        new Dict("acronym", Dict.VERS_HTML40, Dict.CM_INLINE, ParserImpl.INLINE, null),
+        new Dict("span", Dict.VERS_FROM32, Dict.CM_INLINE, ParserImpl.INLINE, null),
+        new Dict("blink", Dict.VERS_PROPRIETARY, Dict.CM_INLINE, ParserImpl.INLINE, null),
+        new Dict("nobr", Dict.VERS_PROPRIETARY, Dict.CM_INLINE, ParserImpl.INLINE, null),
+        new Dict("wbr", Dict.VERS_PROPRIETARY, (Dict.CM_INLINE | Dict.CM_EMPTY), ParserImpl.EMPTY, null),
+        new Dict("marquee", Dict.VERS_MICROSOFT, (Dict.CM_INLINE | Dict.CM_OPT), ParserImpl.INLINE, null),
+        new Dict("bgsound", Dict.VERS_MICROSOFT, (Dict.CM_HEAD | Dict.CM_EMPTY), ParserImpl.EMPTY, null),
+        new Dict("comment", Dict.VERS_MICROSOFT, Dict.CM_INLINE, ParserImpl.INLINE, null),
+        new Dict("spacer", Dict.VERS_NETSCAPE, (Dict.CM_INLINE | Dict.CM_EMPTY), ParserImpl.EMPTY, null),
+        new Dict("keygen", Dict.VERS_NETSCAPE, (Dict.CM_INLINE | Dict.CM_EMPTY), ParserImpl.EMPTY, null),
+        new Dict(
+            "nolayer",
+            Dict.VERS_NETSCAPE,
+            (Dict.CM_BLOCK | Dict.CM_INLINE | Dict.CM_MIXED),
+            ParserImpl.BLOCK,
+            null),
+        new Dict("ilayer", Dict.VERS_NETSCAPE, Dict.CM_INLINE, ParserImpl.INLINE, null),
+        new Dict(
+            "map",
+            (short) (Dict.VERS_HTML40 & ~Dict.VERS_BASIC),
+            Dict.CM_INLINE,
+            ParserImpl.BLOCK,
+            TagCheckImpl.MAP),
+        new Dict(
+            "area",
+            (short) (Dict.VERS_ALL & ~Dict.VERS_BASIC),
+            (Dict.CM_BLOCK | Dict.CM_EMPTY),
+            ParserImpl.EMPTY,
+            TagCheckImpl.AREA),
+        new Dict("input", Dict.VERS_ALL, (Dict.CM_INLINE | Dict.CM_IMG | Dict.CM_EMPTY), ParserImpl.EMPTY, null),
+        new Dict("select", Dict.VERS_ALL, (Dict.CM_INLINE | Dict.CM_FIELD), ParserImpl.SELECT, null),
+        new Dict("option", Dict.VERS_ALL, (Dict.CM_FIELD | Dict.CM_OPT), ParserImpl.TEXT, null),
+        new Dict(
+            "optgroup",
+            (short) (Dict.VERS_HTML40 & ~Dict.VERS_BASIC),
+            (Dict.CM_FIELD | Dict.CM_OPT),
+            ParserImpl.OPTGROUP,
+            null),
+        new Dict("textarea", Dict.VERS_ALL, (Dict.CM_INLINE | Dict.CM_FIELD), ParserImpl.TEXT, null),
+        new Dict("label", Dict.VERS_HTML40, Dict.CM_INLINE, ParserImpl.INLINE, null),
+        new Dict("legend", (short) (Dict.VERS_HTML40 & ~Dict.VERS_BASIC), Dict.CM_INLINE, ParserImpl.INLINE, null),
+        new Dict("button", (short) (Dict.VERS_HTML40 & ~Dict.VERS_BASIC), Dict.CM_INLINE, ParserImpl.INLINE, null),
+        new Dict("basefont", Dict.VERS_LOOSE, (Dict.CM_INLINE | Dict.CM_EMPTY), ParserImpl.EMPTY, null),
+        new Dict("font", Dict.VERS_LOOSE, Dict.CM_INLINE, ParserImpl.INLINE, null),
+        new Dict("bdo", (short) (Dict.VERS_HTML40 & ~Dict.VERS_BASIC), Dict.CM_INLINE, ParserImpl.INLINE, null),
+        // elements for XHTML 1.1
+        new Dict("ruby", Dict.VERS_XHTML11, Dict.CM_INLINE, ParserImpl.INLINE, null),
+        new Dict("rbc", Dict.VERS_XHTML11, Dict.CM_INLINE, ParserImpl.INLINE, null),
+        new Dict("rtc", Dict.VERS_XHTML11, Dict.CM_INLINE, ParserImpl.INLINE, null),
+        new Dict("rb", Dict.VERS_XHTML11, Dict.CM_INLINE, ParserImpl.INLINE, null),
+        new Dict("rt", Dict.VERS_XHTML11, Dict.CM_INLINE, ParserImpl.INLINE, null),
+        new Dict("", Dict.VERS_XHTML11, Dict.CM_INLINE, ParserImpl.INLINE, null),
+        new Dict("rp", Dict.VERS_XHTML11, Dict.CM_INLINE, ParserImpl.INLINE, null),
+    //
+    };
+
+    /**
+     * html tag.
+     */
+    protected Dict tagHtml;
+
+    /**
+     * head tag.
+     */
+    protected Dict tagHead;
+
+    /**
+     * body tag.
+     */
+    protected Dict tagBody;
+
+    /**
+     * frameset tag.
+     */
+    protected Dict tagFrameset;
+
+    /**
+     * frame tag.
+     */
+    protected Dict tagFrame;
+
+    /**
+     * iframe tag.
+     */
+    protected Dict tagIframe;
+
+    /**
+     * noframes tag.
+     */
+    protected Dict tagNoframes;
+
+    /**
+     * meta tag.
+     */
+    protected Dict tagMeta;
+
+    /**
+     * title tag.
+     */
+    protected Dict tagTitle;
+
+    /**
+     * base tag.
+     */
+    protected Dict tagBase;
+
+    /**
+     * hr tag.
+     */
+    protected Dict tagHr;
+
+    /**
+     * pre tag.
+     */
+    protected Dict tagPre;
+
+    /**
+     * listing tag.
+     */
+    protected Dict tagListing;
+
+    /**
+     * h1 tag.
+     */
+    protected Dict tagH1;
+
+    /**
+     * h2 tag.
+     */
+    protected Dict tagH2;
+
+    /**
+     * p tag.
+     */
+    protected Dict tagP;
+
+    /**
+     * ul tag.
+     */
+    protected Dict tagUl;
+
+    /**
+     * ol tag.
+     */
+    protected Dict tagOl;
+
+    /**
+     * dir tag.
+     */
+    protected Dict tagDir;
+
+    /**
+     * li tag.
+     */
+    protected Dict tagLi;
+
+    /**
+     * dt tag.
+     */
+    protected Dict tagDt;
+
+    /**
+     * dd tag.
+     */
+    protected Dict tagDd;
+
+    /**
+     * dl tag.
+     */
+    protected Dict tagDl;
+
+    /**
+     * td tag.
+     */
+    protected Dict tagTd;
+
+    /**
+     * th tag.
+     */
+    protected Dict tagTh;
+
+    /**
+     * tr tag.
+     */
+    protected Dict tagTr;
+
+    /**
+     * col tag.
+     */
+    protected Dict tagCol;
+
+    /**
+     * colgroup tag.
+     */
+    protected Dict tagColgroup;
+
+    /**
+     * br tag.
+     */
+    protected Dict tagBr;
+
+    /**
+     * a tag.
+     */
+    protected Dict tagA;
+
+    /**
+     * link tag.
+     */
+    protected Dict tagLink;
+
+    /**
+     * b tag.
+     */
+    protected Dict tagB;
+
+    /**
+     * i tag.
+     */
+    protected Dict tagI;
+
+    /**
+     * strong tag.
+     */
+    protected Dict tagStrong;
+
+    /**
+     * em tag.
+     */
+    protected Dict tagEm;
+
+    /**
+     * big tag.
+     */
+    protected Dict tagBig;
+
+    /**
+     * small tag.
+     */
+    protected Dict tagSmall;
+
+    /**
+     * param tag.
+     */
+    protected Dict tagParam;
+
+    /**
+     * option tag.
+     */
+    protected Dict tagOption;
+
+    /**
+     * optgroup tag.
+     */
+    protected Dict tagOptgroup;
+
+    /**
+     * img tag.
+     */
+    protected Dict tagImg;
+
+    /**
+     * map tag.
+     */
+    protected Dict tagMap;
+
+    /**
+     * area tag.
+     */
+    protected Dict tagArea;
+
+    /**
+     * nobr tag.
+     */
+    protected Dict tagNobr;
+
+    /**
+     * wbr tag.
+     */
+    protected Dict tagWbr;
+
+    /**
+     * font tag.
+     */
+    protected Dict tagFont;
+
+    /**
+     * spacer tag.
+     */
+    protected Dict tagSpacer;
+
+    /**
+     * layer tag.
+     */
+    protected Dict tagLayer;
+
+    /**
+     * center tag.
+     */
+    protected Dict tagCenter;
+
+    /**
+     * style tag.
+     */
+    protected Dict tagStyle;
+
+    /**
+     * script tag.
+     */
+    protected Dict tagScript;
+
+    /**
+     * noscript tag.
+     */
+    protected Dict tagNoscript;
+
+    /**
+     * table tag.
+     */
+    protected Dict tagTable;
+
+    /**
+     * caption tag.
+     */
+    protected Dict tagCaption;
+
+    /**
+     * form tag.
+     */
+    protected Dict tagForm;
+
+    /**
+     * textarea tag.
+     */
+    protected Dict tagTextarea;
+
+    /**
+     * blockquote tag.
+     */
+    protected Dict tagBlockquote;
+
+    /**
+     * applet tag.
+     */
+    protected Dict tagApplet;
+
+    /**
+     * object tag.
+     */
+    protected Dict tagObject;
+
+    /**
+     * div tag.
+     */
+    protected Dict tagDiv;
+
+    /**
+     * span tag.
+     */
+    protected Dict tagSpan;
+
+    /**
+     * input tag.
+     */
+    protected Dict tagInput;
+
+    /**
+     * tag.
+     */
+    protected Dict tagQ;
+
+    /**
+     * a proprietary tag added by Tidy, along with tag_nobr, tag_wbr.
+     */
+    protected Dict tagBlink;
+
+    /**
+     * anchor/node hash.
+     */
+    protected Anchor anchorList;
+
+    /**
+     * configuration.
+     */
+    private Configuration configuration;
+
+    /**
+     * hashTable containing tags.
+     */
+    private Map tagHashtable = new Hashtable();
+
+    /**
+     * Instantiates a new tag table with known tags.
+     */
+    protected TagTable()
+    {
+        for (int i = 0; i < TAGS.length; i++)
+        {
+            install(TAGS[i]);
+        }
+        tagHtml = lookup("html");
+        tagHead = lookup("head");
+        tagBody = lookup("body");
+        tagFrameset = lookup("frameset");
+        tagFrame = lookup("frame");
+        tagIframe = lookup("iframe");
+        tagNoframes = lookup("noframes");
+        tagMeta = lookup("meta");
+        tagTitle = lookup("title");
+        tagBase = lookup("base");
+        tagHr = lookup("hr");
+        tagPre = lookup("pre");
+        tagListing = lookup("listing");
+        tagH1 = lookup("h1");
+        tagH2 = lookup("h2");
+        tagP = lookup("p");
+        tagUl = lookup("ul");
+        tagOl = lookup("ol");
+        tagDir = lookup("dir");
+        tagLi = lookup("li");
+        tagDt = lookup("dt");
+        tagDd = lookup("dd");
+        tagDl = lookup("dl");
+        tagTd = lookup("td");
+        tagTh = lookup("th");
+        tagTr = lookup("tr");
+        tagCol = lookup("col");
+        tagColgroup = lookup("colgroup");
+        tagBr = lookup("br");
+        tagA = lookup("a");
+        tagLink = lookup("link");
+        tagB = lookup("b");
+        tagI = lookup("i");
+        tagStrong = lookup("strong");
+        tagEm = lookup("em");
+        tagBig = lookup("big");
+        tagSmall = lookup("small");
+        tagParam = lookup("param");
+        tagOption = lookup("option");
+        tagOptgroup = lookup("optgroup");
+        tagImg = lookup("img");
+        tagMap = lookup("map");
+        tagArea = lookup("area");
+        tagNobr = lookup("nobr");
+        tagWbr = lookup("wbr");
+        tagFont = lookup("font");
+        tagSpacer = lookup("spacer");
+        tagLayer = lookup("layer");
+        tagCenter = lookup("center");
+        tagStyle = lookup("style");
+        tagScript = lookup("script");
+        tagNoscript = lookup("noscript");
+        tagTable = lookup("table");
+        tagCaption = lookup("caption");
+        tagForm = lookup("form");
+        tagTextarea = lookup("textarea");
+        tagBlockquote = lookup("blockquote");
+        tagApplet = lookup("applet");
+        tagObject = lookup("object");
+        tagDiv = lookup("div");
+        tagSpan = lookup("span");
+        tagInput = lookup("input");
+        tagQ = lookup("q");
+        tagBlink = lookup("blink");
+    }
+
+    /**
+     * Setter for the current configuration instance.
+     * @param configuration configuration instance
+     */
+    public void setConfiguration(Configuration configuration)
+    {
+        this.configuration = configuration;
+    }
+
+    /**
+     * Lookup a tag definition by its name.
+     * @param name tag name
+     * @return tag definition (Dict)
+     */
+    public Dict lookup(String name)
+    {
+        return (Dict) tagHashtable.get(name);
+    }
+
+    /**
+     * Installs a new tag in the tag table, or modify an existing one.
+     * @param dict tag definition
+     * @return installed Dict instance
+     */
+    public Dict install(Dict dict)
+    {
+        Dict d = (Dict) tagHashtable.get(dict.name);
+        if (d != null)
+        {
+            d.versions = dict.versions;
+            d.model |= dict.model;
+            d.setParser(dict.getParser());
+            d.setChkattrs(dict.getChkattrs());
+            return d;
+        }
+
+        tagHashtable.put(dict.name, dict);
+        return dict;
+
+    }
+
+    /**
+     * Finds a tag by name.
+     * @param node Node to find. If the element is found the tag property of node will be set.
+     * @return true if the tag is found, false otherwise
+     */
+    public boolean findTag(Node node)
+    {
+        Dict np;
+
+        if (configuration != null && configuration.xmlTags)
+        {
+            node.tag = XML_TAGS;
+            return true;
+        }
+
+        if (node.element != null)
+        {
+            np = lookup(node.element);
+            if (np != null)
+            {
+                node.tag = np;
+                return true;
+            }
+        }
+
+        return false;
+    }
+
+    /**
+     * Finds a parser fo the given node.
+     * @param node Node
+     * @return parser for the node
+     */
+    public Parser findParser(Node node)
+    {
+        Dict np;
+
+        if (node.element != null)
+        {
+            np = lookup(node.element);
+            if (np != null)
+            {
+                return np.getParser();
+            }
+        }
+
+        return null;
+    }
+
+    /**
+     * May id or name serve as anchor?
+     * @param node Node
+     * @return <code>true</code> if tag can serve as an anchor
+     */
+    boolean isAnchorElement(Node node)
+    {
+        return node.tag == this.tagA
+            || node.tag == this.tagApplet
+            || node.tag == this.tagForm
+            || node.tag == this.tagFrame
+            || node.tag == this.tagIframe
+            || node.tag == this.tagImg
+            || node.tag == this.tagMap;
+    }
+
+    /**
+     * Defines a new tag.
+     * @param tagType tag type. Can be TAGTYPE_BLOCK | TAGTYPE_EMPTY | TAGTYPE_PRE | TAGTYPE_INLINE
+     * @param name tag name
+     */
+    public void defineTag(short tagType, String name)
+    {
+        Parser tagParser;
+        short model;
+
+        switch (tagType)
+        {
+            case Dict.TAGTYPE_BLOCK :
+                model = (short) (Dict.CM_BLOCK | Dict.CM_NO_INDENT | Dict.CM_NEW);
+                tagParser = ParserImpl.BLOCK;
+                break;
+
+            case Dict.TAGTYPE_EMPTY :
+                model = (short) (Dict.CM_EMPTY | Dict.CM_NO_INDENT | Dict.CM_NEW);
+                tagParser = ParserImpl.BLOCK;
+                break;
+
+            case Dict.TAGTYPE_PRE :
+                model = (short) (Dict.CM_BLOCK | Dict.CM_NO_INDENT | Dict.CM_NEW);
+                tagParser = ParserImpl.PRE;
+                break;
+
+            case Dict.TAGTYPE_INLINE :
+            default :
+                // default to inline tag
+                model = (short) (Dict.CM_INLINE | Dict.CM_NO_INDENT | Dict.CM_NEW);
+                tagParser = ParserImpl.INLINE;
+                break;
+        }
+
+        install(new Dict(name, Dict.VERS_PROPRIETARY, model, tagParser, null));
+    }
+
+    /**
+     * return a List containing all the user-defined tag names.
+     * @param tagType one of Dict.TAGTYPE_EMPTY | Dict.TAGTYPE_INLINE | Dict.TAGTYPE_BLOCK | Dict.TAGTYPE_PRE
+     * @return List containing all the user-defined tag names
+     */
+    List findAllDefinedTag(short tagType)
+    {
+        List tagNames = new ArrayList();
+
+        Iterator iterator = tagHashtable.values().iterator();
+        while (iterator.hasNext())
+        {
+            Dict curDictEntry = (Dict) iterator.next();
+
+            if (curDictEntry != null)
+            {
+                switch (tagType)
+                {
+                    // defined tags can be empty + inline
+                    case Dict.TAGTYPE_EMPTY :
+                        if ((curDictEntry.versions == Dict.VERS_PROPRIETARY)
+                            && ((curDictEntry.model & Dict.CM_EMPTY) == Dict.CM_EMPTY)
+                            && // (curDictEntry.parser == ParseBlock) &&
+                            (curDictEntry != tagWbr))
+                        {
+                            tagNames.add(curDictEntry.name);
+                        }
+                        break;
+
+                    // defined tags can be empty + inline
+                    case Dict.TAGTYPE_INLINE :
+                        if ((curDictEntry.versions == Dict.VERS_PROPRIETARY)
+                            && ((curDictEntry.model & Dict.CM_INLINE) == Dict.CM_INLINE)
+                            && // (curDictEntry.parser == ParseInline) &&
+                            (curDictEntry != tagBlink)
+                            && (curDictEntry != tagNobr)
+                            && (curDictEntry != tagWbr))
+                        {
+                            tagNames.add(curDictEntry.name);
+                        }
+                        break;
+
+                    // defined tags can be empty + block
+                    case Dict.TAGTYPE_BLOCK :
+                        if ((curDictEntry.versions == Dict.VERS_PROPRIETARY)
+                            && ((curDictEntry.model & Dict.CM_BLOCK) == Dict.CM_BLOCK)
+                            && (curDictEntry.getParser() == ParserImpl.BLOCK))
+                        {
+                            tagNames.add(curDictEntry.name);
+                        }
+                        break;
+
+                    case Dict.TAGTYPE_PRE :
+                        if ((curDictEntry.versions == Dict.VERS_PROPRIETARY)
+                            && ((curDictEntry.model & Dict.CM_BLOCK) == Dict.CM_BLOCK)
+                            && (curDictEntry.getParser() == ParserImpl.PRE))
+                        {
+                            tagNames.add(curDictEntry.name);
+                        }
+                        break;
+                }
+            }
+        }
+
+        return tagNames;
+    }
+
+    /**
+     * Free node's attributes.
+     * @param node Node
+     */
+    public void freeAttrs(Node node)
+    {
+        while (node.attributes != null)
+        {
+            AttVal av = node.attributes;
+            if ("id".equalsIgnoreCase(av.attribute) || "name".equalsIgnoreCase(av.attribute) && isAnchorElement(node))
+            {
+                removeAnchorByNode(node);
+            }
+
+            node.attributes = av.next;
+        }
+    }
+
+    /**
+     * Removes anchor for specific node.
+     * @param node Node
+     */
+    void removeAnchorByNode(Node node)
+    {
+        Anchor delme = null;
+        Anchor found = null;
+        Anchor prev = null;
+        Anchor next = null;
+
+        for (found = anchorList; found != null; found = found.next)
+        {
+            next = found.next;
+
+            if (found.node == node)
+            {
+                if (prev != null)
+                {
+                    prev.next = next;
+                }
+                else
+                {
+                    anchorList = next;
+                }
+
+                delme = found;
+            }
+            else
+            {
+                prev = found;
+            }
+        }
+        if (delme != null)
+        {
+            delme = null; // freeAnchor
+        }
+    }
+
+    /**
+     * Initialize a new anchor.
+     * @return a new anchor element
+     */
+    Anchor newAnchor()
+    {
+        Anchor a = new Anchor();
+        return a;
+    }
+
+    /**
+     * Adds a new anchor to namespace.
+     * @param name anchor name
+     * @param node destination for this anchor
+     * @return Anchor
+     */
+    Anchor addAnchor(String name, Node node)
+    {
+        Anchor a = newAnchor();
+
+        a.name = name;
+        a.node = node;
+
+        if (anchorList == null)
+        {
+            anchorList = a;
+        }
+        else
+        {
+            Anchor here = anchorList;
+
+            while (here.next != null)
+            {
+                here = here.next;
+            }
+            here.next = a;
+        }
+
+        return anchorList;
+    }
+
+    /**
+     * Return node associated with anchor.
+     * @param name anchor name
+     * @return node associated with anchor
+     */
+    Node getNodeByAnchor(String name)
+    {
+        Anchor found;
+
+        for (found = anchorList; found != null; found = found.next)
+        {
+            if (name.equalsIgnoreCase(found.name))
+            {
+                break;
+            }
+        }
+
+        if (found != null)
+        {
+            return found.node;
+        }
+
+        return null;
+    }
+
+    /**
+     * free all anchors.
+     */
+    void freeAnchors()
+    {
+        anchorList = null;
+    }
+
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/Tidy.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/Tidy.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/Tidy.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,2401 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ *  Java HTML Tidy - JTidy
+ *  HTML parser and pretty printer
+ *
+ *  Copyright (c) 1998-2000 World Wide Web Consortium (Massachusetts
+ *  Institute of Technology, Institut National de Recherche en
+ *  Informatique et en Automatique, Keio University). All Rights
+ *  Reserved.
+ *
+ *  Contributing Author(s):
+ *
+ *     Dave Raggett <dsr at w3.org>
+ *     Andy Quick <ac.quick at sympatico.ca> (translation to Java)
+ *     Gary L Peskin <garyp at firstech.com> (Java development)
+ *     Sami Lempinen <sami at lempinen.net> (release management)
+ *     Fabrizio Giustina <fgiust at users.sourceforge.net>
+ *
+ *  The contributing author(s) would like to thank all those who
+ *  helped with testing, bug fixes, and patience.  This wouldn't
+ *  have been possible without all of you.
+ *
+ *  COPYRIGHT NOTICE:
+ * 
+ *  This software and documentation is provided "as is," and
+ *  the copyright holders and contributing author(s) make no
+ *  representations or warranties, express or implied, including
+ *  but not limited to, warranties of merchantability or fitness
+ *  for any particular purpose or that the use of the software or
+ *  documentation will not infringe any third party patents,
+ *  copyrights, trademarks or other rights. 
+ *
+ *  The copyright holders and contributing author(s) will not be
+ *  liable for any direct, indirect, special or consequential damages
+ *  arising out of any use of the software or documentation, even if
+ *  advised of the possibility of such damage.
+ *
+ *  Permission is hereby granted to use, copy, modify, and distribute
+ *  this source code, or portions hereof, documentation and executables,
+ *  for any purpose, without fee, subject to the following restrictions:
+ *
+ *  1. The origin of this source code must not be misrepresented.
+ *  2. Altered versions must be plainly marked as such and must
+ *     not be misrepresented as being the original source.
+ *  3. This Copyright notice may not be removed or altered from any
+ *     source or altered source distribution.
+ * 
+ *  The copyright holders and contributing author(s) specifically
+ *  permit, without fee, and encourage the use of this source code
+ *  as a component for supporting the Hypertext Markup Language in
+ *  commercial products. If you use this source code in a product,
+ *  acknowledgment is not required but would be appreciated.
+ *
+ */
+package org.ajax4jsf.org.w3c.tidy;
+
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.PrintWriter;
+import java.io.Reader;
+import java.io.Serializable;
+import java.io.Writer;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+import org.ajax4jsf.io.FastBufferOutputStream;
+import org.ajax4jsf.io.FastBufferWriter;
+
+
+/**
+ * HTML parser and pretty printer.
+ * @author Dave Raggett <a href="mailto:dsr at w3.org">dsr at w3.org </a>
+ * @author Andy Quick <a href="mailto:ac.quick at sympatico.ca">ac.quick at sympatico.ca </a> (translation to Java)
+ * @author Fabrizio Giustina
+ * @version $Revision: 1.1.2.1 $ ($Author: alexsmirnov $)
+ */
+public class Tidy implements Serializable
+{
+
+    /**
+     * Serial Version UID to avoid problems during serialization.
+     */
+    static final long serialVersionUID = -2794371560623987718L;
+
+    /**
+     * Alias for configuration options accepted in command line.
+     */
+    private static final Map CMDLINE_ALIAS = new HashMap();
+
+    static
+    {
+        CMDLINE_ALIAS.put("xml", "input-xml");
+        CMDLINE_ALIAS.put("xml", "output-xhtml");
+        CMDLINE_ALIAS.put("asxml", "output-xhtml");
+        CMDLINE_ALIAS.put("ashtml", "output-html");
+        CMDLINE_ALIAS.put("omit", "hide-endtags");
+        CMDLINE_ALIAS.put("upper", "uppercase-tags");
+        CMDLINE_ALIAS.put("raw", "output-raw");
+        CMDLINE_ALIAS.put("numeric", "numeric-entities");
+        CMDLINE_ALIAS.put("change", "write-back");
+        CMDLINE_ALIAS.put("update", "write-back");
+        CMDLINE_ALIAS.put("modify", "write-back");
+        CMDLINE_ALIAS.put("errors", "only-errors");
+        CMDLINE_ALIAS.put("slides", "split");
+        CMDLINE_ALIAS.put("lang", "language");
+        CMDLINE_ALIAS.put("w", "wrap");
+        CMDLINE_ALIAS.put("file", "error-file");
+        CMDLINE_ALIAS.put("f", "error-file");
+    }
+
+    /**
+     * Error output stream.
+     */
+    private PrintWriter errout;
+
+    private PrintWriter stderr;
+
+    private Configuration configuration;
+
+    private String inputStreamName = "InputStream";
+
+    private int parseErrors;
+
+    private int parseWarnings;
+
+    private Report report;
+
+    /**
+     * Instantiates a new Tidy instance. It's reccomended that a new instance is used at each parsing.
+     */
+    public Tidy()
+    {
+        this.report = new Report();
+        configuration = new Configuration(this.report);
+        if (configuration == null)
+        {
+            return;
+        }
+
+        AttributeTable at = AttributeTable.getDefaultAttributeTable();
+        if (at == null)
+        {
+            return;
+        }
+        TagTable tt = new TagTable();
+        if (tt == null)
+        {
+            return;
+        }
+        tt.setConfiguration(configuration);
+        configuration.tt = tt;
+        EntityTable et = EntityTable.getDefaultEntityTable();
+        if (et == null)
+        {
+            return;
+        }
+
+        configuration.errfile = null;
+        stderr = new PrintWriter(System.err, true);
+        errout = stderr;
+    }
+
+    /**
+     * Returns the actual configuration
+     * @return tidy configuration
+     */
+    public Configuration getConfiguration()
+    {
+        return configuration;
+    }
+
+    public PrintWriter getStderr()
+    {
+        return stderr;
+    }
+
+    /**
+     * ParseErrors - the number of errors that occurred in the most recent parse operation.
+     * @return number of errors that occurred in the most recent parse operation.
+     */
+    public int getParseErrors()
+    {
+        return parseErrors;
+    }
+
+    /**
+     * ParseWarnings - the number of warnings that occurred in the most recent parse operation.
+     * @return number of warnings that occurred in the most recent parse operation.
+     */
+    public int getParseWarnings()
+    {
+        return parseWarnings;
+    }
+
+    /**
+     * InputStreamName - the name of the input stream (printed in the header information).
+     * @param name input stream name
+     */
+    public void setInputStreamName(String name)
+    {
+        if (name != null)
+        {
+            inputStreamName = name;
+        }
+    }
+
+    public String getInputStreamName()
+    {
+        return inputStreamName;
+    }
+
+    /**
+     * Errout - the error output stream.
+     * @return error output stream.
+     */
+    public PrintWriter getErrout()
+    {
+        return errout;
+    }
+
+    public void setErrout(PrintWriter out)
+    {
+        this.errout = out;
+    }
+
+    /**
+     * Sets the configuration from a configuration file.
+     * @param filename configuration file name/path.
+     */
+    public void setConfigurationFromFile(String filename)
+    {
+        configuration.parseFile(filename);
+    }
+
+    /**
+     * Sets the configuration from a properties object.
+     * @param props Properties object
+     */
+    public void setConfigurationFromProps(Properties props)
+    {
+        configuration.addProps(props);
+    }
+
+    /**
+     * Parses InputStream in and returns the root Node. If out is non-null, pretty prints to OutputStream out.
+     * @param in input content Possible {@link InputStream} , {@link Reader} or {@link String}.
+     * @param out optional output stream
+     * @return parsed org.w3c.tidy.Node
+     */
+    public Node parse(Object in, OutputStream out)
+    {
+        Node document = null;
+
+        try
+        {
+            document = parse(in, null, out);
+        }
+        catch (FileNotFoundException fnfe)
+        {
+            // ignore
+        }
+        catch (IOException e)
+        {
+            // ignore
+        }
+
+        return document;
+    }
+
+    /**
+     * Internal routine that actually does the parsing. The caller can pass either an InputStream or file name. If both
+     * are passed, the file name is preferred.
+     * @param in input content (used only if <code>file</code> is null) Possible {@link InputStream} , {@link Reader} or {@link String}.
+     * @param file file name
+     * @param out output stream
+     * @return parsed org.w3c.tidy.Node
+     * @throws FileNotFoundException if <code>file</code> is not null but it can't be found
+     * @throws IOException for errors in reading input stream or file
+     */
+    private Node parse(Object in, String file, OutputStream out) throws FileNotFoundException, IOException
+    {
+        Lexer lexer;
+        Node document = null;
+        Node doctype;
+        PPrint pprint;
+
+        if (errout == null)
+        {
+            return null;
+        }
+
+        parseErrors = 0;
+        parseWarnings = 0;
+
+        // ensure config is self-consistent
+        configuration.adjust();
+
+        if (file != null)
+        {
+            in = new FileInputStream(file);
+            inputStreamName = file;
+        }
+        else if (in == null)
+        {
+            in = System.in;
+            inputStreamName = "stdin";
+        }
+
+        if (in != null)
+        {
+
+            StreamIn streamIn = StreamInFactory.getStreamIn(configuration, in);
+
+            lexer = new Lexer(streamIn, configuration, this.report);
+            lexer.errout = errout;
+
+            // store pointer to lexer in input stream to allow character encoding errors to be reported
+            streamIn.setLexer(lexer);
+
+            this.report.setFilename(inputStreamName); // #431895 - fix by Dave Bryan 04 Jan 01
+
+            if (!configuration.quiet)
+            {
+                this.report.helloMessage(errout);
+            }
+
+            // skip byte order mark
+
+            //            if (lexer.configuration.getInCharEncoding() == Configuration.UTF8
+            //                || lexer.configuration.getInCharEncoding() == Configuration.UTF16LE
+            //                || lexer.configuration.getInCharEncoding() == Configuration.UTF16BE
+            //                || lexer.configuration.getInCharEncoding() == Configuration.UTF16)
+            //            {
+            //                int c = lexer.in.readChar();
+            //                if (c != EncodingUtils.UNICODE_BOM)
+            //                {
+            //                    lexer.in.ungetChar(c);
+            //                }
+            //            }
+
+            // Tidy doesn't alter the doctype for generic XML docs
+            if (configuration.xmlTags)
+            {
+                document = ParserImpl.parseXMLDocument(lexer);
+                if (!document.checkNodeIntegrity())
+                {
+                    if (!configuration.quiet)
+                    {
+                        report.badTree(errout);
+                    }
+                    return null;
+                }
+            }
+            else
+            {
+                lexer.warnings = 0;
+
+                document = ParserImpl.parseDocument(lexer);
+
+                if (!document.checkNodeIntegrity())
+                {
+                    if (!configuration.quiet)
+                    {
+                        this.report.badTree(errout);
+                    }
+                    return null;
+                }
+
+                Clean cleaner = new Clean(configuration.tt);
+
+                // simplifies <b><b> ... </b> ... </b> etc.
+                cleaner.nestedEmphasis(document);
+
+                // cleans up <dir> indented text </dir> etc.
+                cleaner.list2BQ(document);
+                cleaner.bQ2Div(document);
+
+                // replaces i by em and b by strong
+                if (configuration.logicalEmphasis)
+                {
+                    cleaner.emFromI(document);
+                }
+
+                if (configuration.word2000 && cleaner.isWord2000(document))
+                {
+                    // prune Word2000's <![if ...]> ... <![endif]>
+                    cleaner.dropSections(lexer, document);
+
+                    // drop style & class attributes and empty p, span elements
+                    cleaner.cleanWord2000(lexer, document);
+                }
+
+                // replaces presentational markup by style rules
+                if (configuration.makeClean || configuration.dropFontTags)
+                {
+                    cleaner.cleanTree(lexer, document);
+                }
+
+                if (!document.checkNodeIntegrity())
+                {
+                    this.report.badTree(errout);
+                    return null;
+                }
+
+                doctype = document.findDocType();
+
+                // remember given doctype
+                if (doctype != null)
+                {
+                    doctype = (Node) doctype.clone();
+                }
+
+                if (document.content != null)
+                {
+                    if (configuration.xHTML)
+                    {
+                        lexer.setXHTMLDocType(document);
+                    }
+                    else
+                    {
+                        lexer.fixDocType(document);
+                    }
+
+                    if (configuration.tidyMark)
+                    {
+                        lexer.addGenerator(document);
+                    }
+                }
+
+                // ensure presence of initial <?XML version="1.0"?>
+                if (configuration.xmlOut && configuration.xmlPi)
+                {
+                    lexer.fixXmlDecl(document);
+                }
+
+                if (!configuration.quiet && document.content != null)
+                {
+                    this.report.reportVersion(errout, lexer, inputStreamName, doctype);
+                }
+            }
+
+            // Try to close the InputStream but only if if we created it.
+            if ((file != null) && (in != System.in))
+            {
+                try
+                {
+                    ((FileInputStream) in).close();
+                }
+                catch (IOException e)
+                {
+                    // ignore
+                }
+            }
+
+            if (!configuration.quiet)
+            {
+                parseWarnings = lexer.warnings;
+                parseErrors = lexer.errors;
+                this.report.reportNumWarnings(errout, lexer);
+            }
+
+            if (!configuration.quiet && lexer.errors > 0 && !configuration.forceOutput)
+            {
+                this.report.needsAuthorIntervention(errout);
+            }
+
+            if (!configuration.onlyErrors && (lexer.errors == 0 || configuration.forceOutput))
+            {
+                if (configuration.burstSlides)
+                {
+                    Node body;
+
+                    body = null;
+                    // remove doctype to avoid potential clash with markup introduced when bursting into slides
+
+                    // discard the document type
+                    doctype = document.findDocType();
+
+                    if (doctype != null)
+                    {
+                        Node.discardElement(doctype);
+                    }
+
+                    /* slides use transitional features */
+                    lexer.versions |= Dict.VERS_HTML40_LOOSE;
+
+                    // and patch up doctype to match
+                    if (configuration.xHTML)
+                    {
+                        lexer.setXHTMLDocType(document);
+                    }
+                    else
+                    {
+                        lexer.fixDocType(document);
+                    }
+
+                    // find the body element which may be implicit
+                    body = document.findBody(configuration.tt);
+
+                    if (body != null)
+                    {
+                        pprint = new PPrint(configuration);
+                        if (!configuration.quiet)
+                        {
+                            this.report.reportNumberOfSlides(errout, pprint.countSlides(body));
+                        }
+                        pprint.createSlides(lexer, document);
+                    }
+                    else if (!configuration.quiet)
+                    {
+                        this.report.missingBody(errout);
+                    }
+                }
+                else if (configuration.writeback && (file != null))
+                {
+                    try
+                    {
+                        pprint = new PPrint(configuration);
+                        FileOutputStream fis = new FileOutputStream(file);
+
+                        Out o = OutFactory.getOut(this.configuration, fis);
+
+                        if (document.findDocType() == null)
+                        {
+                            // only use numeric character references if no doctype could be determined (e.g., because
+                            // the document contains proprietary features) to ensure well-formedness.
+                            configuration.numEntities = true;
+                        }
+                        if (configuration.bodyOnly)
+                        {
+                            // Feature request #434940 - fix by Dave Raggett/Ignacio Vazquez-Abrams 21 Jun 01
+                            pprint.printBody(o, lexer, document, configuration.xmlOut);
+                        }
+                        else if (configuration.xmlOut && !configuration.xHTML)
+                        {
+                            pprint.printXMLTree(o, (short) 0, 0, lexer, document);
+                        }
+                        else
+                        {
+                            pprint.printTree(o, (short) 0, 0, lexer, document);
+                        }
+
+                        pprint.flushLine(o, 0);
+                        o.close();
+                    }
+                    catch (IOException e)
+                    {
+                        errout.println(file + e.toString());
+                    }
+                }
+                else if (out != null)
+                {
+                    pprint = new PPrint(configuration);
+
+                    Out o = OutFactory.getOut(this.configuration, out); // normal output stream
+
+                    if (document.findDocType() == null)
+                    {
+                        // only use numeric character references if no doctype could be determined (e.g., because
+                        // the document contains proprietary features) to ensure well-formedness.
+                        configuration.numEntities = true;
+                    }
+                    if (configuration.bodyOnly)
+                    {
+                        // Feature request #434940 - fix by Dave Raggett/Ignacio Vazquez-Abrams 21 Jun 01
+                        pprint.printBody(o, lexer, document, configuration.xmlOut);
+                    }
+                    else if (configuration.xmlOut && !configuration.xHTML)
+                    {
+                        pprint.printXMLTree(o, (short) 0, 0, lexer, document);
+                    }
+                    else
+                    {
+                        pprint.printTree(o, (short) 0, 0, lexer, document);
+                    }
+
+                    pprint.flushLine(o, 0);
+                    o.close();
+                }
+
+            }
+
+            if (!configuration.quiet)
+            {
+                this.report.errorSummary(lexer);
+            }
+        }
+        return document;
+    }
+
+    /**
+     * Parses InputStream in and returns a DOM Document node. If out is non-null, pretty prints to OutputStream out.
+     * @param in input stream. Possible {@link InputStream} , {@link Reader} or {@link String}.
+     * @param out optional output stream
+     * @return parsed org.w3c.dom.Document
+     */
+    public org.w3c.dom.Document parseDOM(Object in, OutputStream out)
+    {
+        Node document = parse(in, out);
+        if (document != null)
+        {
+            return (org.w3c.dom.Document) document.getAdapter();
+        }
+        return null;
+    }
+
+    /**
+     * Creates an empty DOM Document.
+     * @return a new org.w3c.dom.Document
+     */
+    public static org.w3c.dom.Document createEmptyDocument()
+    {
+        Node document = new Node(Node.ROOT_NODE, new byte[0], 0, 0);
+        Node node = new Node(Node.START_TAG, new byte[0], 0, 0, "html", new TagTable());
+        if (document != null && node != null)
+        {
+            document.insertNodeAtStart(node);
+            return (org.w3c.dom.Document) document.getAdapter();
+        }
+
+        return null;
+    }
+
+    /**
+     * Pretty-prints a DOM Document. Must be an instance of org.w3c.tidy.DOMDocumentImpl.
+     * @param doc org.w3c.dom.Document
+     * @param out output stream
+     * @throws IOException 
+     */
+    public void pprint(org.w3c.dom.Document doc, OutputStream out) throws IOException
+    {
+        if (!(doc instanceof DOMDocumentImpl))
+        {
+            // @todo should we inform users that tidy can't print a generic Document or change the method signature?
+            return;
+        }
+
+        if (null != out) {
+			pprint(((DOMDocumentImpl) doc).adaptee, OutFactory.getOut(
+					this.configuration, out));
+		}
+    }
+
+    /**
+     * Pretty-prints a DOM Document. Must be an instance of org.w3c.tidy.DOMDocumentImpl.
+     * @param doc org.w3c.dom.Document
+     * @param out output stream
+     * @throws IOException 
+     */
+    public void pprint(org.w3c.dom.Document doc, Writer out) throws IOException
+    {
+        if (!(doc instanceof DOMDocumentImpl))
+        {
+            // @todo should we inform users that tidy can't print a generic Document or change the method signature?
+            return;
+        }
+
+        if (null != out) {
+        	if(!(out instanceof FastBufferWriter)) {
+        		FastBufferWriter bout = new FastBufferWriter();
+    			pprint(((DOMDocumentImpl) doc).adaptee, OutFactory.getOut(
+    					this.configuration, bout));
+    			bout.writeTo(out);
+        	} else {
+    			pprint(((DOMDocumentImpl) doc).adaptee, OutFactory.getOut(
+    					this.configuration, out));
+        	}
+		}
+    }
+
+    /**
+     * Pretty-prints a DOM Node.
+     * @param node org.w3c.dom.Node. Must be an instance of org.w3c.tidy.DOMNodeImpl.
+     * @param out output stream
+     * @throws IOException 
+     */
+    public void pprint(org.w3c.dom.Node node, OutputStream out) throws IOException
+    {
+        if (!(node instanceof DOMNodeImpl))
+        {
+            // @todo should we inform users than tidy can't print a generic Node or change the method signature?
+            return;
+        }
+        if (null != out) {
+        	if(!(out instanceof FastBufferOutputStream)) {
+        		FastBufferOutputStream bout = new FastBufferOutputStream();
+    			pprint(((DOMNodeImpl) node).adaptee, OutFactory.getOut(
+    					this.configuration, bout));
+    			bout.writeTo(out);
+        	} else {
+    			pprint(((DOMNodeImpl) node).adaptee, OutFactory.getOut(
+    					this.configuration, out));
+        	}
+		}
+    }
+
+    /**
+     * Pretty-prints a tidy Node.
+     * @param node org.w3c.tidy.Node
+     * @param out output stream
+     * @throws IOException 
+     */
+    private void pprint(Node node, Out o) throws IOException
+    {
+
+        Lexer lexer = new Lexer(null, this.configuration, this.report);
+
+		PPrint pprint = new PPrint(configuration);
+
+		if (configuration.xmlTags)
+		{
+		    pprint.printXMLTree(o, (short) 0, 0, lexer, node);
+		}
+		else
+		{
+		    pprint.printTree(o, (short) 0, 0, lexer, node);
+		}
+
+		pprint.flushLine(o, 0);
+		o.close();
+    }
+
+    /**
+     * Command line interface to parser and pretty printer.
+     * @param argv command line parameters
+     */
+    public static void main(String[] argv)
+    {
+        Tidy tidy = new Tidy();
+        int returnCode = tidy.mainExec(argv);
+        System.exit(returnCode);
+    }
+
+    /**
+     * Main method, but returns the return code as an int instead of calling System.exit(code). Needed for testing main
+     * method without shutting down tests.
+     * @param argv command line parameters
+     * @return return code
+     */
+    protected int mainExec(String[] argv)
+    {
+        String file;
+        int argCount = argv.length;
+        int argIndex = 0;
+
+        // read command line
+        Properties properties = new Properties();
+
+        while (argCount > 0)
+        {
+            if (argv[argIndex].startsWith("-"))
+            {
+                // support -foo and --foo
+                String argName = argv[argIndex].toLowerCase();
+                while (argName.length() > 0 && argName.charAt(0) == '-')
+                {
+                    argName = argName.substring(1);
+                }
+
+                // "exclusive" options
+                if (argName.equals("help") || argName.equals("h") || argName.equals("?"))
+                {
+                    this.report.helpText(new PrintWriter(System.out, true));
+                    return 0;
+                }
+                else if (argName.equals("help-config"))
+                {
+                    configuration.printConfigOptions(new PrintWriter(System.out, true), false);
+                    return 0;
+                }
+                else if (argName.equals("show-config"))
+                {
+                    configuration.adjust(); // ensure config is self-consistent
+                    configuration.printConfigOptions(errout, true);
+                    return 0;
+                }
+                else if (argName.equals("version") || argName.equals("v"))
+                {
+                    this.report.showVersion(errout);
+                    return 0;
+                }
+
+                // optional value for non boolean options
+                String argValue = null;
+                if (argCount > 2 && !argv[argIndex + 1].startsWith("-"))
+                {
+                    argValue = argv[argIndex + 1];
+                    --argCount;
+                    ++argIndex;
+                }
+
+                // handle "special" aliases
+                String alias = (String) CMDLINE_ALIAS.get(argName);
+                if (alias != null)
+                {
+                    argName = alias;
+                }
+
+                if (Configuration.isKnownOption(argName)) // handle any standard config option
+                {
+                    properties.setProperty(argName, (argValue == null ? "" : argName));
+                }
+                else if (argName.equals("config")) // parse a property file
+                {
+                    if (argValue != null)
+                    {
+                        configuration.parseFile(argValue);
+                    }
+                }
+                else if (TidyUtils.isCharEncodingSupported(argName)) // handle any encoding name
+                {
+                    properties.setProperty("char-encoding", argName);
+                }
+                else
+                {
+
+                    for (int i = 0; i < argName.length(); i++)
+                    {
+                        switch (argName.charAt(i))
+                        {
+                            case 'i' :
+                                configuration.indentContent = true;
+                                configuration.smartIndent = true;
+                                break;
+
+                            case 'o' :
+                                configuration.hideEndTags = true;
+                                break;
+
+                            case 'u' :
+                                configuration.upperCaseTags = true;
+                                break;
+
+                            case 'c' :
+                                configuration.makeClean = true;
+                                break;
+
+                            case 'b' :
+                                configuration.makeBare = true;
+                                break;
+
+                            case 'n' :
+                                configuration.numEntities = true;
+                                break;
+
+                            case 'm' :
+                                configuration.writeback = true;
+                                break;
+
+                            case 'e' :
+                                configuration.onlyErrors = true;
+                                break;
+
+                            case 'q' :
+                                configuration.quiet = true;
+                                break;
+
+                            default :
+                                this.report.unknownOption(this.errout, argName.charAt(i));
+                                break;
+                        }
+                    }
+                }
+
+                --argCount;
+                ++argIndex;
+                continue;
+            }
+
+            configuration.addProps(properties);
+
+            // ensure config is self-consistent
+            configuration.adjust();
+
+            // user specified error file
+            if (configuration.errfile != null)
+            {
+
+                String errorfile = "stderr";
+
+                // is it same as the currently opened file?
+                if (!configuration.errfile.equals(errorfile))
+                {
+                    // no so close previous error file
+
+                    if (this.errout != this.stderr)
+                    {
+                        this.errout.close();
+                    }
+
+                    // and try to open the new error file
+                    try
+                    {
+                        this.setErrout(new PrintWriter(new FileWriter(configuration.errfile), true));
+                        errorfile = configuration.errfile;
+                    }
+                    catch (IOException e)
+                    {
+                        // can't be opened so fall back to stderr
+                        errorfile = "stderr";
+                        this.setErrout(stderr);
+                    }
+                }
+            }
+
+            if (argCount > 0)
+            {
+                file = argv[argIndex];
+            }
+            else
+            {
+                file = "stdin";
+            }
+
+            try
+            {
+                parse(null, file, System.out);
+            }
+            catch (FileNotFoundException fnfe)
+            {
+                this.report.unknownFile(this.errout, file);
+            }
+            catch (IOException ioe)
+            {
+                this.report.unknownFile(this.errout, file);
+            }
+
+            --argCount;
+            ++argIndex;
+
+            if (argCount <= 0)
+            {
+                break;
+            }
+        }
+
+        if (this.parseErrors + this.parseWarnings > 0 && !configuration.quiet)
+        {
+            this.report.generalInfo(this.errout);
+        }
+
+        if (this.errout != this.stderr)
+        {
+            this.errout.close();
+        }
+
+        // return status can be used by scripts
+        if (this.parseErrors > 0)
+        {
+            return 2;
+        }
+
+        if (this.parseWarnings > 0)
+        {
+            return 1;
+        }
+
+        // 0 means all is ok
+        return 0;
+    }
+
+    /**
+     * Attach a TidyMessageListener which will be notified for messages and errors.
+     * @param listener TidyMessageListener implementation
+     */
+    public void setMessageListener(TidyMessageListener listener)
+    {
+        this.report.addMessageListener(listener);
+    }
+
+    /**
+     * <code>indent-spaces</code>- default indentation.
+     * @param spaces number of spaces used for indentation
+     * @see Configuration#spaces
+     */
+    public void setSpaces(int spaces)
+    {
+        configuration.spaces = spaces;
+    }
+
+    /**
+     * <code>indent-spaces</code>- default indentation.
+     * @return number of spaces used for indentation
+     * @see Configuration#spaces
+     */
+    public int getSpaces()
+    {
+        return configuration.spaces;
+    }
+
+    /**
+     * <code>wrap</code>- default wrap margin.
+     * @param wraplen default wrap margin
+     * @see Configuration#wraplen
+     */
+    public void setWraplen(int wraplen)
+    {
+        configuration.wraplen = wraplen;
+    }
+
+    /**
+     * <code>wrap</code>- default wrap margin.
+     * @return default wrap margin
+     * @see Configuration#wraplen
+     */
+    public int getWraplen()
+    {
+        return configuration.wraplen;
+    }
+
+    /**
+     * <code>tab-size</code>- tab size in chars.
+     * @param tabsize tab size in chars
+     * @see Configuration#tabsize
+     */
+    public void setTabsize(int tabsize)
+    {
+        configuration.tabsize = tabsize;
+    }
+
+    /**
+     * <code>tab-size</code>- tab size in chars.
+     * @return tab size in chars
+     * @see Configuration#tabsize
+     */
+    public int getTabsize()
+    {
+        return configuration.tabsize;
+    }
+
+    /**
+     * Errfile - file name to write errors to.
+     * @param errfile file name to write errors to
+     * @see Configuration#errfile
+     */
+    public void setErrfile(String errfile)
+    {
+        configuration.errfile = errfile;
+    }
+
+    /**
+     * Errfile - file name to write errors to.
+     * @return error file name
+     * @see Configuration#errfile
+     */
+    public String getErrfile()
+    {
+        return configuration.errfile;
+    }
+
+    /**
+     * writeback - if true then output tidied markup. NOTE: this property is ignored when parsing from an InputStream.
+     * @param writeback <code>true</code>= output tidied markup
+     * @see Configuration#writeback
+     */
+    public void setWriteback(boolean writeback)
+    {
+        configuration.writeback = writeback;
+    }
+
+    /**
+     * writeback - if true then output tidied markup. NOTE: this property is ignored when parsing from an InputStream.
+     * @return <code>true</code> if tidy will output tidied markup in input file
+     * @see Configuration#writeback
+     */
+    public boolean getWriteback()
+    {
+        return configuration.writeback;
+    }
+
+    /**
+     * only-errors - if true normal output is suppressed.
+     * @param onlyErrors if <code>true</code> normal output is suppressed.
+     * @see Configuration#onlyErrors
+     */
+    public void setOnlyErrors(boolean onlyErrors)
+    {
+        configuration.onlyErrors = onlyErrors;
+    }
+
+    /**
+     * only-errors - if true normal output is suppressed.
+     * @return <code>true</code> if normal output is suppressed.
+     * @see Configuration#onlyErrors
+     */
+    public boolean getOnlyErrors()
+    {
+        return configuration.onlyErrors;
+    }
+
+    /**
+     * show-warnings - show warnings? (errors are always shown).
+     * @param showWarnings if <code>false</code> warnings are not shown
+     * @see Configuration#showWarnings
+     */
+    public void setShowWarnings(boolean showWarnings)
+    {
+        configuration.showWarnings = showWarnings;
+    }
+
+    /**
+     * show-warnings - show warnings? (errors are always shown).
+     * @return <code>false</code> if warnings are not shown
+     * @see Configuration#showWarnings
+     */
+    public boolean getShowWarnings()
+    {
+        return configuration.showWarnings;
+    }
+
+    /**
+     * quiet - no 'Parsing X', guessed DTD or summary.
+     * @param quiet <code>true</code>= don't output summary, warnings or errors
+     * @see Configuration#quiet
+     */
+    public void setQuiet(boolean quiet)
+    {
+        configuration.quiet = quiet;
+    }
+
+    /**
+     * quiet - no 'Parsing X', guessed DTD or summary.
+     * @return <code>true</code> if tidy will not output summary, warnings or errors
+     * @see Configuration#quiet
+     */
+    public boolean getQuiet()
+    {
+        return configuration.quiet;
+    }
+
+    /**
+     * indent - indent content of appropriate tags.
+     * @param indentContent indent content of appropriate tags
+     * @see Configuration#indentContent
+     */
+    public void setIndentContent(boolean indentContent)
+    {
+        configuration.indentContent = indentContent;
+    }
+
+    /**
+     * indent - indent content of appropriate tags.
+     * @return <code>true</code> if tidy will indent content of appropriate tags
+     * @see Configuration#indentContent
+     */
+    public boolean getIndentContent()
+    {
+        return configuration.indentContent;
+    }
+
+    /**
+     * SmartIndent - does text/block level content effect indentation.
+     * @param smartIndent <code>true</code> if text/block level content should effect indentation
+     * @see Configuration#smartIndent
+     */
+    public void setSmartIndent(boolean smartIndent)
+    {
+        configuration.smartIndent = smartIndent;
+    }
+
+    /**
+     * SmartIndent - does text/block level content effect indentation.
+     * @return <code>true</code> if text/block level content should effect indentation
+     * @see Configuration#smartIndent
+     */
+    public boolean getSmartIndent()
+    {
+        return configuration.smartIndent;
+    }
+
+    /**
+     * hide-endtags - suppress optional end tags.
+     * @param hideEndTags <code>true</code>= suppress optional end tags
+     * @see Configuration#hideEndTags
+     */
+    public void setHideEndTags(boolean hideEndTags)
+    {
+        configuration.hideEndTags = hideEndTags;
+    }
+
+    /**
+     * hide-endtags - suppress optional end tags.
+     * @return <code>true</code> if tidy will suppress optional end tags
+     * @see Configuration#hideEndTags
+     */
+    public boolean getHideEndTags()
+    {
+        return configuration.hideEndTags;
+    }
+
+    /**
+     * input-xml - treat input as XML.
+     * @param xmlTags <code>true</code> if tidy should treat input as XML
+     * @see Configuration#xmlTags
+     */
+    public void setXmlTags(boolean xmlTags)
+    {
+        configuration.xmlTags = xmlTags;
+    }
+
+    /**
+     * input-xml - treat input as XML.
+     * @return <code>true</code> if tidy will treat input as XML
+     * @see Configuration#xmlTags
+     */
+    public boolean getXmlTags()
+    {
+        return configuration.xmlTags;
+    }
+
+    /**
+     * output-xml - create output as XML.
+     * @param xmlOut <code>true</code> if tidy should create output as xml
+     * @see Configuration#xmlOut
+     */
+    public void setXmlOut(boolean xmlOut)
+    {
+        configuration.xmlOut = xmlOut;
+    }
+
+    /**
+     * output-xml - create output as XML.
+     * @return <code>true</code> if tidy will create output as xml
+     * @see Configuration#xmlOut
+     */
+    public boolean getXmlOut()
+    {
+        return configuration.xmlOut;
+    }
+
+    /**
+     * output-xhtml - output extensible HTML.
+     * @param xhtml <code>true</code> if tidy should output XHTML
+     * @see Configuration#xHTML
+     */
+    public void setXHTML(boolean xhtml)
+    {
+        configuration.xHTML = xhtml;
+    }
+
+    /**
+     * output-xhtml - output extensible HTML.
+     * @return <code>true</code> if tidy will output XHTML
+     * @see Configuration#xHTML
+     */
+    public boolean getXHTML()
+    {
+        return configuration.xHTML;
+    }
+
+    /**
+     * uppercase-tags - output tags in upper case.
+     * @param upperCaseTags <code>true</code> if tidy should output tags in upper case (default is lowercase)
+     * @see Configuration#upperCaseTags
+     */
+    public void setUpperCaseTags(boolean upperCaseTags)
+    {
+        configuration.upperCaseTags = upperCaseTags;
+    }
+
+    /**
+     * uppercase-tags - output tags in upper case.
+     * @return <code>true</code> if tidy should will tags in upper case
+     * @see Configuration#upperCaseTags
+     */
+    public boolean getUpperCaseTags()
+    {
+        return configuration.upperCaseTags;
+    }
+
+    /**
+     * uppercase-attributes - output attributes in upper case.
+     * @param upperCaseAttrs <code>true</code> if tidy should output attributes in upper case (default is lowercase)
+     * @see Configuration#upperCaseAttrs
+     */
+    public void setUpperCaseAttrs(boolean upperCaseAttrs)
+    {
+        configuration.upperCaseAttrs = upperCaseAttrs;
+    }
+
+    /**
+     * uppercase-attributes - output attributes in upper case.
+     * @return <code>true</code> if tidy should will attributes in upper case
+     * @see Configuration#upperCaseAttrs
+     */
+    public boolean getUpperCaseAttrs()
+    {
+        return configuration.upperCaseAttrs;
+    }
+
+    /**
+     * make-clean - remove presentational clutter.
+     * @param makeClean true to remove presentational clutter
+     * @see Configuration#makeClean
+     */
+    public void setMakeClean(boolean makeClean)
+    {
+        configuration.makeClean = makeClean;
+    }
+
+    /**
+     * make-clean - remove presentational clutter.
+     * @return true if tidy will remove presentational clutter
+     * @see Configuration#makeClean
+     */
+    public boolean getMakeClean()
+    {
+        return configuration.makeClean;
+    }
+
+    /**
+     * make-bare - remove Microsoft cruft.
+     * @param makeBare true to remove Microsoft cruft
+     * @see Configuration#makeBare
+     */
+    public void setMakeBare(boolean makeBare)
+    {
+        configuration.makeBare = makeBare;
+    }
+
+    /**
+     * make-clean - remove Microsoft cruft.
+     * @return true if tidy will remove Microsoft cruft
+     * @see Configuration#makeBare
+     */
+    public boolean getMakeBare()
+    {
+        return configuration.makeBare;
+    }
+
+    /**
+     * break-before-br - output newline before &lt;br&gt;.
+     * @param breakBeforeBR <code>true</code> if tidy should output a newline before &lt;br&gt;
+     * @see Configuration#breakBeforeBR
+     */
+    public void setBreakBeforeBR(boolean breakBeforeBR)
+    {
+        configuration.breakBeforeBR = breakBeforeBR;
+    }
+
+    /**
+     * break-before-br - output newline before &lt;br&gt;.
+     * @return <code>true</code> if tidy will output a newline before &lt;br&gt;
+     * @see Configuration#breakBeforeBR
+     */
+    public boolean getBreakBeforeBR()
+    {
+        return configuration.breakBeforeBR;
+    }
+
+    /**
+     * <code>split</code>- create slides on each h2 element.
+     * @param burstSlides <code>true</code> if tidy should create slides on each h2 element
+     * @see Configuration#burstSlides
+     */
+    public void setBurstSlides(boolean burstSlides)
+    {
+        configuration.burstSlides = burstSlides;
+    }
+
+    /**
+     * <code>split</code>- create slides on each h2 element.
+     * @return <code>true</code> if tidy will create slides on each h2 element
+     * @see Configuration#burstSlides
+     */
+    public boolean getBurstSlides()
+    {
+        return configuration.burstSlides;
+    }
+
+    /**
+     * <code>numeric-entities</code>- output entities other than the built-in HTML entities in the numeric rather
+     * than the named entity form.
+     * @param numEntities <code>true</code> if tidy should output entities in the numeric form.
+     * @see Configuration#numEntities
+     */
+    public void setNumEntities(boolean numEntities)
+    {
+        configuration.numEntities = numEntities;
+    }
+
+    /**
+     * <code>numeric-entities</code>- output entities other than the built-in HTML entities in the numeric rather
+     * than the named entity form.
+     * @return <code>true</code> if tidy will output entities in the numeric form.
+     * @see Configuration#numEntities
+     */
+    public boolean getNumEntities()
+    {
+        return configuration.numEntities;
+    }
+
+    /**
+     * <code>quote-marks</code>- output " marks as &amp;quot;.
+     * @param quoteMarks <code>true</code> if tidy should output " marks as &amp;quot;
+     * @see Configuration#quoteMarks
+     */
+    public void setQuoteMarks(boolean quoteMarks)
+    {
+        configuration.quoteMarks = quoteMarks;
+    }
+
+    /**
+     * <code>quote-marks</code>- output " marks as &amp;quot;.
+     * @return <code>true</code> if tidy will output " marks as &amp;quot;
+     * @see Configuration#quoteMarks
+     */
+    public boolean getQuoteMarks()
+    {
+        return configuration.quoteMarks;
+    }
+
+    /**
+     * <code>quote-nbsp</code>- output non-breaking space as entity.
+     * @param quoteNbsp <code>true</code> if tidy should output non-breaking space as entity
+     * @see Configuration#quoteNbsp
+     */
+    public void setQuoteNbsp(boolean quoteNbsp)
+    {
+        configuration.quoteNbsp = quoteNbsp;
+    }
+
+    /**
+     * <code>quote-nbsp</code>- output non-breaking space as entity.
+     * @return <code>true</code> if tidy will output non-breaking space as entity
+     * @see Configuration#quoteNbsp
+     */
+    public boolean getQuoteNbsp()
+    {
+        return configuration.quoteNbsp;
+    }
+
+    /**
+     * <code>quote-ampersand</code>- output naked ampersand as &amp;.
+     * @param quoteAmpersand <code>true</code> if tidy should output naked ampersand as &amp;
+     * @see Configuration#quoteAmpersand
+     */
+    public void setQuoteAmpersand(boolean quoteAmpersand)
+    {
+        configuration.quoteAmpersand = quoteAmpersand;
+    }
+
+    /**
+     * <code>quote-ampersand</code>- output naked ampersand as &amp;.
+     * @return <code>true</code> if tidy will output naked ampersand as &amp;
+     * @see Configuration#quoteAmpersand
+     */
+    public boolean getQuoteAmpersand()
+    {
+        return configuration.quoteAmpersand;
+    }
+
+    /**
+     * <code>wrap-attributes</code>- wrap within attribute values.
+     * @param wrapAttVals <code>true</code> if tidy should wrap within attribute values
+     * @see Configuration#wrapAttVals
+     */
+    public void setWrapAttVals(boolean wrapAttVals)
+    {
+        configuration.wrapAttVals = wrapAttVals;
+    }
+
+    /**
+     * <code>wrap-attributes</code>- wrap within attribute values.
+     * @return <code>true</code> if tidy will wrap within attribute values
+     * @see Configuration#wrapAttVals
+     */
+    public boolean getWrapAttVals()
+    {
+        return configuration.wrapAttVals;
+    }
+
+    /**
+     * <code>wrap-script-literals</code>- wrap within JavaScript string literals.
+     * @param wrapScriptlets <code>true</code> if tidy should wrap within JavaScript string literals
+     * @see Configuration#wrapScriptlets
+     */
+    public void setWrapScriptlets(boolean wrapScriptlets)
+    {
+        configuration.wrapScriptlets = wrapScriptlets;
+    }
+
+    /**
+     * <code>wrap-script-literals</code>- wrap within JavaScript string literals.
+     * @return <code>true</code> if tidy will wrap within JavaScript string literals
+     * @see Configuration#wrapScriptlets
+     */
+    public boolean getWrapScriptlets()
+    {
+        return configuration.wrapScriptlets;
+    }
+
+    /**
+     * <code>wrap-sections</code>- wrap within &lt;![ ... ]&gt; section tags
+     * @param wrapSection <code>true</code> if tidy should wrap within &lt;![ ... ]&gt; section tags
+     * @see Configuration#wrapSection
+     */
+    public void setWrapSection(boolean wrapSection)
+    {
+        configuration.wrapSection = wrapSection;
+    }
+
+    /**
+     * <code>wrap-sections</code>- wrap within &lt;![ ... ]&gt; section tags
+     * @return <code>true</code> if tidy will wrap within &lt;![ ... ]&gt; section tags
+     * @see Configuration#wrapSection
+     */
+    public boolean getWrapSection()
+    {
+        return configuration.wrapSection;
+    }
+
+    /**
+     * <code>alt-text</code>- default text for alt attribute.
+     * @param altText default text for alt attribute
+     * @see Configuration#altText
+     */
+    public void setAltText(String altText)
+    {
+        configuration.altText = altText;
+    }
+
+    /**
+     * <code>alt-text</code>- default text for alt attribute.
+     * @return default text for alt attribute
+     * @see Configuration#altText
+     */
+    public String getAltText()
+    {
+        return configuration.altText;
+    }
+
+    /**
+     * <code>add-xml-pi</code>- add &lt;?xml?&gt; for XML docs.
+     * @param xmlPi <code>true</code> if tidy should add &lt;?xml?&gt; for XML docs
+     * @see Configuration#xmlPi
+     */
+    public void setXmlPi(boolean xmlPi)
+    {
+        configuration.xmlPi = xmlPi;
+    }
+
+    /**
+     * <code>add-xml-pi</code>- add &lt;?xml?&gt; for XML docs.
+     * @return <code>true</code> if tidy will add &lt;?xml?&gt; for XML docs
+     * @see Configuration#xmlPi
+     */
+    public boolean getXmlPi()
+    {
+        return configuration.xmlPi;
+    }
+
+    /**
+     * <code>drop-font-tags</code>- discard presentation tags.
+     * @param dropFontTags <code>true</code> if tidy should discard presentation tags
+     * @see Configuration#dropFontTags
+     */
+    public void setDropFontTags(boolean dropFontTags)
+    {
+        configuration.dropFontTags = dropFontTags;
+    }
+
+    /**
+     * <code>drop-font-tags</code>- discard presentation tags.
+     * @return <code>true</code> if tidy will discard presentation tags
+     * @see Configuration#dropFontTags
+     */
+    public boolean getDropFontTags()
+    {
+        return configuration.dropFontTags;
+    }
+
+    /**
+     * <code>drop-proprietary-attributes</code>- discard proprietary attributes.
+     * @param dropProprietaryAttributes <code>true</code> if tidy should discard proprietary attributes
+     * @see Configuration#dropProprietaryAttributes
+     */
+    public void setDropProprietaryAttributes(boolean dropProprietaryAttributes)
+    {
+        configuration.dropProprietaryAttributes = dropProprietaryAttributes;
+    }
+
+    /**
+     * <code>drop-proprietary-attributes</code>- discard proprietary attributes.
+     * @return <code>true</code> if tidy will discard proprietary attributes
+     * @see Configuration#dropProprietaryAttributes
+     */
+    public boolean getDropProprietaryAttributes()
+    {
+        return configuration.dropProprietaryAttributes;
+    }
+
+    /**
+     * <code>drop-empty-paras</code>- discard empty p elements.
+     * @param dropEmptyParas <code>true</code> if tidy should discard empty p elements
+     * @see Configuration#dropEmptyParas
+     */
+    public void setDropEmptyParas(boolean dropEmptyParas)
+    {
+        configuration.dropEmptyParas = dropEmptyParas;
+    }
+
+    /**
+     * <code>drop-empty-paras</code>- discard empty p elements.
+     * @return <code>true</code> if tidy will discard empty p elements
+     * @see Configuration#dropEmptyParas
+     */
+    public boolean getDropEmptyParas()
+    {
+        return configuration.dropEmptyParas;
+    }
+
+    /**
+     * <code>fix-bad-comments</code>- fix comments with adjacent hyphens.
+     * @param fixComments <code>true</code> if tidy should fix comments with adjacent hyphens
+     * @see Configuration#fixComments
+     */
+    public void setFixComments(boolean fixComments)
+    {
+        configuration.fixComments = fixComments;
+    }
+
+    /**
+     * <code>fix-bad-comments</code>- fix comments with adjacent hyphens.
+     * @return <code>true</code> if tidy will fix comments with adjacent hyphens
+     * @see Configuration#fixComments
+     */
+    public boolean getFixComments()
+    {
+        return configuration.fixComments;
+    }
+
+    /**
+     * <code>wrap-asp</code>- wrap within ASP pseudo elements.
+     * @param wrapAsp <code>true</code> if tidy should wrap within ASP pseudo elements
+     * @see Configuration#wrapAsp
+     */
+    public void setWrapAsp(boolean wrapAsp)
+    {
+        configuration.wrapAsp = wrapAsp;
+    }
+
+    /**
+     * <code>wrap-asp</code>- wrap within ASP pseudo elements.
+     * @return <code>true</code> if tidy will wrap within ASP pseudo elements
+     * @see Configuration#wrapAsp
+     */
+    public boolean getWrapAsp()
+    {
+        return configuration.wrapAsp;
+    }
+
+    /**
+     * <code>wrap-jste</code>- wrap within JSTE pseudo elements.
+     * @param wrapJste <code>true</code> if tidy should wrap within JSTE pseudo elements
+     * @see Configuration#wrapJste
+     */
+    public void setWrapJste(boolean wrapJste)
+    {
+        configuration.wrapJste = wrapJste;
+    }
+
+    /**
+     * <code>wrap-jste</code>- wrap within JSTE pseudo elements.
+     * @return <code>true</code> if tidy will wrap within JSTE pseudo elements
+     * @see Configuration#wrapJste
+     */
+    public boolean getWrapJste()
+    {
+        return configuration.wrapJste;
+    }
+
+    /**
+     * <code>wrap-php</code>- wrap within PHP pseudo elements.
+     * @param wrapPhp <code>true</code> if tidy should wrap within PHP pseudo elements
+     * @see Configuration#wrapPhp
+     */
+    public void setWrapPhp(boolean wrapPhp)
+    {
+        configuration.wrapPhp = wrapPhp;
+    }
+
+    /**
+     * <code>wrap-php</code>- wrap within PHP pseudo elements.
+     * @return <code>true</code> if tidy will wrap within PHP pseudo elements
+     * @see Configuration#wrapPhp
+     */
+    public boolean getWrapPhp()
+    {
+        return configuration.wrapPhp;
+    }
+
+    /**
+     * <code>fix-backslash</code>- fix URLs by replacing \ with /.
+     * @param fixBackslash <code>true</code> if tidy should fix URLs by replacing \ with /
+     * @see Configuration#fixBackslash
+     */
+    public void setFixBackslash(boolean fixBackslash)
+    {
+        configuration.fixBackslash = fixBackslash;
+    }
+
+    /**
+     * <code>fix-backslash</code>- fix URLs by replacing \ with /.
+     * @return <code>true</code> if tidy will fix URLs by replacing \ with /
+     * @see Configuration#fixBackslash
+     */
+    public boolean getFixBackslash()
+    {
+        return configuration.fixBackslash;
+    }
+
+    /**
+     * <code>indent-attributes</code>- newline+indent before each attribute.
+     * @param indentAttributes <code>true</code> if tidy should output a newline+indent before each attribute
+     * @see Configuration#indentAttributes
+     */
+    public void setIndentAttributes(boolean indentAttributes)
+    {
+        configuration.indentAttributes = indentAttributes;
+    }
+
+    /**
+     * <code>indent-attributes</code>- newline+indent before each attribute.
+     * @return <code>true</code> if tidy will output a newline+indent before each attribute
+     * @see Configuration#indentAttributes
+     */
+    public boolean getIndentAttributes()
+    {
+        return configuration.indentAttributes;
+    }
+
+    /**
+     * <code>doctype</code>- user specified doctype.
+     * @param doctype <code>omit | auto | strict | loose | <em>fpi</em></code> where the <em>fpi </em> is a string
+     * similar to &quot;-//ACME//DTD HTML 3.14159//EN&quot; Note: for <em>fpi </em> include the double-quotes in the
+     * string.
+     * @see Configuration#docTypeStr
+     * @see Configuration#docTypeMode
+     */
+    public void setDocType(String doctype)
+    {
+        if (doctype != null)
+        {
+            configuration.docTypeStr = (String) ParsePropertyImpl.DOCTYPE.parse(doctype, "doctype", configuration);
+        }
+    }
+
+    /**
+     * <code>doctype</code>- user specified doctype.
+     * @return <code>omit | auto | strict | loose | <em>fpi</em></code> where the <em>fpi </em> is a string similar
+     * to &quot;-//ACME//DTD HTML 3.14159//EN&quot; Note: for <em>fpi </em> include the double-quotes in the string.
+     * @see Configuration#docTypeStr
+     * @see Configuration#docTypeMode
+     */
+    public String getDocType()
+    {
+        String result = null;
+        switch (configuration.docTypeMode)
+        {
+            case Configuration.DOCTYPE_OMIT :
+                result = "omit";
+                break;
+            case Configuration.DOCTYPE_AUTO :
+                result = "auto";
+                break;
+            case Configuration.DOCTYPE_STRICT :
+                result = "strict";
+                break;
+            case Configuration.DOCTYPE_LOOSE :
+                result = "loose";
+                break;
+            case Configuration.DOCTYPE_IGNORE :
+                result = "ignore";
+                break;
+            case Configuration.DOCTYPE_USER :
+                result = configuration.docTypeStr;
+                break;
+        }
+        return result;
+    }
+
+    /**
+     * <code>logical-emphasis</code>- replace i by em and b by strong.
+     * @param logicalEmphasis <code>true</code> if tidy should replace i by em and b by strong
+     * @see Configuration#logicalEmphasis
+     */
+    public void setLogicalEmphasis(boolean logicalEmphasis)
+    {
+        configuration.logicalEmphasis = logicalEmphasis;
+    }
+
+    /**
+     * <code>logical-emphasis</code>- replace i by em and b by strong.
+     * @return <code>true</code> if tidy will replace i by em and b by strong
+     * @see Configuration#logicalEmphasis
+     */
+    public boolean getLogicalEmphasis()
+    {
+        return configuration.logicalEmphasis;
+    }
+
+    /**
+     * <code>assume-xml-procins</code> This option specifies if Tidy should change the parsing of processing
+     * instructions to require ?> as the terminator rather than >. This option is automatically set if the input is in
+     * XML.
+     * @param xmlPIs <code>true</code> if tidy should expect a ?> at the end of processing instructions
+     * @see Configuration#xmlPIs
+     */
+    public void setXmlPIs(boolean xmlPIs)
+    {
+        configuration.xmlPIs = xmlPIs;
+    }
+
+    /**
+     * <code>assume-xml-procins</code> This option specifies if Tidy should change the parsing of processing
+     * instructions to require ?> as the terminator rather than >. This option is automatically set if the input is in
+     * XML.
+     * @return <code>true</code> if tidy will expect a ?> at the end of processing instructions
+     * @see Configuration#xmlPIs
+     */
+    public boolean getXmlPIs()
+    {
+        return configuration.xmlPIs;
+    }
+
+    /**
+     * <code>enclose-text</code>- if true text at body is wrapped in &lt;p&gt;'s.
+     * @param encloseText <code>true</code> if tidy should wrap text at body in &lt;p&gt;'s.
+     * @see Configuration#encloseBodyText
+     */
+    public void setEncloseText(boolean encloseText)
+    {
+        configuration.encloseBodyText = encloseText;
+    }
+
+    /**
+     * <code>enclose-text</code>- if true text at body is wrapped in &lt;p&gt;'s.
+     * @return <code>true</code> if tidy will wrap text at body in &lt;p&gt;'s.
+     * @see Configuration#encloseBodyText
+     */
+    public boolean getEncloseText()
+    {
+        return configuration.encloseBodyText;
+    }
+
+    /**
+     * <code>enclose-block-text</code>- if true text in blocks is wrapped in &lt;p&gt;'s.
+     * @param encloseBlockText <code>true</code> if tidy should wrap text text in blocks in &lt;p&gt;'s.
+     * @see Configuration#encloseBlockText
+     */
+    public void setEncloseBlockText(boolean encloseBlockText)
+    {
+        configuration.encloseBlockText = encloseBlockText;
+    }
+
+    /**
+     * <code>enclose-block-text</code>- if true text in blocks is wrapped in &lt;p&gt;'s. return <code>true</code>
+     * if tidy should will text text in blocks in &lt;p&gt;'s.
+     * @see Configuration#encloseBlockText
+     */
+    public boolean getEncloseBlockText()
+    {
+        return configuration.encloseBlockText;
+    }
+
+    /**
+     * <code>word-2000</code>- draconian cleaning for Word2000.
+     * @param word2000 <code>true</code> if tidy should clean word2000 documents
+     * @see Configuration#word2000
+     */
+    public void setWord2000(boolean word2000)
+    {
+        configuration.word2000 = word2000;
+    }
+
+    /**
+     * <code>word-2000</code>- draconian cleaning for Word2000.
+     * @return <code>true</code> if tidy will clean word2000 documents
+     * @see Configuration#word2000
+     */
+    public boolean getWord2000()
+    {
+        return configuration.word2000;
+    }
+
+    /**
+     * <code>tidy-mark</code>- add meta element indicating tidied doc.
+     * @param tidyMark <code>true</code> if tidy should add meta element indicating tidied doc
+     * @see Configuration#tidyMark
+     */
+    public void setTidyMark(boolean tidyMark)
+    {
+        configuration.tidyMark = tidyMark;
+    }
+
+    /**
+     * <code>tidy-mark</code>- add meta element indicating tidied doc.
+     * @return <code>true</code> if tidy will add meta element indicating tidied doc
+     * @see Configuration#tidyMark
+     */
+    public boolean getTidyMark()
+    {
+        return configuration.tidyMark;
+    }
+
+    /**
+     * <code>add-xml-space</code>- if set to yes adds xml:space attr as needed.
+     * @param xmlSpace <code>true</code> if tidy should add xml:space attr as needed
+     * @see Configuration#xmlSpace
+     */
+    public void setXmlSpace(boolean xmlSpace)
+    {
+        configuration.xmlSpace = xmlSpace;
+    }
+
+    /**
+     * <code>add-xml-space</code>- if set to yes adds xml:space attr as needed.
+     * @return <code>true</code> if tidy will add xml:space attr as needed
+     * @see Configuration#xmlSpace
+     */
+    public boolean getXmlSpace()
+    {
+        return configuration.xmlSpace;
+    }
+
+    /**
+     * <code>gnu-emacs</code>- if true format error output for GNU Emacs.
+     * @param emacs <code>true</code> if tidy should format error output for GNU Emacs
+     * @see Configuration#emacs
+     */
+    public void setEmacs(boolean emacs)
+    {
+        configuration.emacs = emacs;
+    }
+
+    /**
+     * <code>gnu-emacs</code>- if true format error output for GNU Emacs.
+     * @return <code>true</code> if tidy will format error output for GNU Emacs
+     * @see Configuration#emacs
+     */
+    public boolean getEmacs()
+    {
+        return configuration.emacs;
+    }
+
+    /**
+     * <code>literal-attributes</code>- if true attributes may use newlines.
+     * @param literalAttribs <code>true</code> if attributes may use newlines
+     * @see Configuration#literalAttribs
+     */
+    public void setLiteralAttribs(boolean literalAttribs)
+    {
+        configuration.literalAttribs = literalAttribs;
+    }
+
+    /**
+     * <code>literal-attributes</code>- if true attributes may use newlines.
+     * @return <code>true</code> if attributes may use newlines
+     * @see Configuration#literalAttribs
+     */
+    public boolean getLiteralAttribs()
+    {
+        return configuration.literalAttribs;
+    }
+
+    /**
+     * <code>print-body-only</code>- output BODY content only.
+     * @param bodyOnly true = print only the document body
+     * @see Configuration#bodyOnly
+     */
+    public void setPrintBodyOnly(boolean bodyOnly)
+    {
+        configuration.bodyOnly = bodyOnly;
+    }
+
+    /**
+     * <code>print-body-only</code>- output BODY content only.
+     * @return true if tidy will print only the document body
+     */
+    public boolean getPrintBodyOnly()
+    {
+        return configuration.bodyOnly;
+    }
+
+    /**
+     * <code>fix-uri</code>- fix uri references applying URI encoding if necessary.
+     * @param fixUri true = fix uri references
+     * @see Configuration#fixUri
+     */
+    public void setFixUri(boolean fixUri)
+    {
+        configuration.fixUri = fixUri;
+    }
+
+    /**
+     * <code>fix-uri</code>- output BODY content only.
+     * @return true if tidy will fix uri references
+     */
+    public boolean getFixUri()
+    {
+        return configuration.fixUri;
+    }
+
+    /**
+     * <code>lower-literals</code>- folds known attribute values to lower case.
+     * @param lowerLiterals true = folds known attribute values to lower case
+     * @see Configuration#lowerLiterals
+     */
+    public void setLowerLiterals(boolean lowerLiterals)
+    {
+        configuration.lowerLiterals = lowerLiterals;
+    }
+
+    /**
+     * <code>lower-literals</code>- folds known attribute values to lower case.
+     * @return true if tidy will folds known attribute values to lower case
+     */
+    public boolean getLowerLiterals()
+    {
+        return configuration.lowerLiterals;
+    }
+
+    /**
+     * <code>hide-comments</code>- hides all (real) comments in output.
+     * @param hideComments true = hides all comments in output
+     * @see Configuration#hideComments
+     */
+    public void setHideComments(boolean hideComments)
+    {
+        configuration.hideComments = hideComments;
+    }
+
+    /**
+     * <code>hide-comments</code>- hides all (real) comments in output.
+     * @return true if tidy will hide all comments in output
+     */
+    public boolean getHideComments()
+    {
+        return configuration.hideComments;
+    }
+
+    /**
+     * <code>indent-cdata</code>- indent CDATA sections.
+     * @param indentCdata true = indent CDATA sections
+     * @see Configuration#indentCdata
+     */
+    public void setIndentCdata(boolean indentCdata)
+    {
+        configuration.indentCdata = indentCdata;
+    }
+
+    /**
+     * <code>indent-cdata</code>- indent CDATA sections.
+     * @return true if tidy will indent CDATA sections
+     */
+    public boolean getIndentCdata()
+    {
+        return configuration.indentCdata;
+    }
+
+    /**
+     * <code>force-output</code>- output document even if errors were found.
+     * @param forceOutput true = output document even if errors were found
+     * @see Configuration#forceOutput
+     */
+    public void setForceOutput(boolean forceOutput)
+    {
+        configuration.forceOutput = forceOutput;
+    }
+
+    /**
+     * <code>force-output</code>- output document even if errors were found.
+     * @return true if tidy will output document even if errors were found
+     */
+    public boolean getForceOutput()
+    {
+        return configuration.forceOutput;
+    }
+
+    /**
+     * <code>show-errors</code>- set the number of errors to put out.
+     * @param showErrors number of errors to put out
+     * @see Configuration#showErrors
+     */
+    public void setShowErrors(int showErrors)
+    {
+        configuration.showErrors = showErrors;
+    }
+
+    /**
+     * <code>show-errors</code>- number of errors to put out.
+     * @return the number of errors tidy will put out
+     */
+    public int getShowErrors()
+    {
+        return configuration.showErrors;
+    }
+
+    /**
+     * <code>ascii-chars</code>- convert quotes and dashes to nearest ASCII char.
+     * @param asciiChars true = convert quotes and dashes to nearest ASCII char
+     * @see Configuration#asciiChars
+     */
+    public void setAsciiChars(boolean asciiChars)
+    {
+        configuration.asciiChars = asciiChars;
+    }
+
+    /**
+     * <code>ascii-chars</code>- convert quotes and dashes to nearest ASCII char.
+     * @return true if tidy will convert quotes and dashes to nearest ASCII char
+     */
+    public boolean getAsciiChars()
+    {
+        return configuration.asciiChars;
+    }
+
+    /**
+     * <code>join-classes</code>- join multiple class attributes.
+     * @param joinClasses true = join multiple class attributes
+     * @see Configuration#joinClasses
+     */
+    public void setJoinClasses(boolean joinClasses)
+    {
+        configuration.joinClasses = joinClasses;
+    }
+
+    /**
+     * <code>join-classes</code>- join multiple class attributes.
+     * @return true if tidy will join multiple class attributes
+     */
+    public boolean getJoinClasses()
+    {
+        return configuration.joinClasses;
+    }
+
+    /**
+     * <code>join-styles</code>- join multiple style attributes.
+     * @param joinStyles true = join multiple style attributes
+     * @see Configuration#joinStyles
+     */
+    public void setJoinStyles(boolean joinStyles)
+    {
+        configuration.joinStyles = joinStyles;
+    }
+
+    /**
+     * <code>join-styles</code>- join multiple style attributes.
+     * @return true if tidy will join multiple style attributes
+     */
+    public boolean getJoinStyles()
+    {
+        return configuration.joinStyles;
+    }
+
+    /**
+     * <code>trim-empty-elements</code>- trim empty elements.
+     * @param trim-empty-elements true = trim empty elements
+     * @see Configuration#trimEmpty
+     */
+    public void setTrimEmptyElements(boolean trimEmpty)
+    {
+        configuration.trimEmpty = trimEmpty;
+    }
+
+    /**
+     * <code>trim-empty-elements</code>- trim empty elements.
+     * @return true if tidy will trim empty elements
+     */
+    public boolean getTrimEmptyElements()
+    {
+        return configuration.trimEmpty;
+    }
+
+    /**
+     * <code>replace-color</code>- replace hex color attribute values with names.
+     * @param replaceColor true = replace hex color attribute values with names
+     * @see Configuration#replaceColor
+     */
+    public void setReplaceColor(boolean replaceColor)
+    {
+        configuration.replaceColor = replaceColor;
+    }
+
+    /**
+     * <code>replace-color</code>- replace hex color attribute values with names.
+     * @return true if tidy will replace hex color attribute values with names
+     */
+    public boolean getReplaceColor()
+    {
+        return configuration.replaceColor;
+    }
+
+    /**
+     * <code>escape-cdata</code>- replace CDATA sections with escaped text.
+     * @param escapeCdata true = replace CDATA sections with escaped text
+     * @see Configuration#escapeCdata
+     */
+    public void setEscapeCdata(boolean escapeCdata)
+    {
+        configuration.escapeCdata = escapeCdata;
+    }
+
+    /**
+     * <code>escape-cdata</code> -replace CDATA sections with escaped text.
+     * @return true if tidy will replace CDATA sections with escaped text
+     */
+    public boolean getEscapeCdata()
+    {
+        return configuration.escapeCdata;
+    }
+
+    /**
+     * <code>repeated-attributes</code>- keep first or last duplicate attribute.
+     * @param repeatedAttributes <code>Configuration.KEEP_FIRST | Configuration.KEEP_LAST</code>
+     * @see Configuration#duplicateAttrs
+     */
+    public void setRepeatedAttributes(int repeatedAttributes)
+    {
+        configuration.duplicateAttrs = repeatedAttributes;
+    }
+
+    /**
+     * <code>repeated-attributes</code>- keep first or last duplicate attribute.
+     * @return <code>Configuration.KEEP_FIRST | Configuration.KEEP_LAST</code>
+     */
+    public int getRepeatedAttributes()
+    {
+        return configuration.duplicateAttrs;
+    }
+
+    /**
+     * <code>keep-time</code>- if true last modified time is preserved.
+     * @param keepFileTimes <code>true</code> if tidy should preserved last modified time in input file.
+     * @todo <strong>this is NOT supported at this time. </strong>
+     * @see Configuration#keepFileTimes
+     */
+    public void setKeepFileTimes(boolean keepFileTimes)
+    {
+        configuration.keepFileTimes = keepFileTimes;
+    }
+
+    /**
+     * <code>keep-time</code>- if true last modified time is preserved.
+     * @return <code>true</code> if tidy will preserved last modified time in input file.
+     * @todo <strong>this is NOT supported at this time. </strong>
+     * @see Configuration#keepFileTimes
+     */
+    public boolean getKeepFileTimes()
+    {
+        return configuration.keepFileTimes;
+    }
+
+    /**
+     * Sets the character encoding used both for input and for output.
+     * @param charencoding encoding constant
+     * @deprecated set input/output encoding using java encoding names
+     */
+    public void setCharEncoding(int charencoding)
+    {
+        String ceName = configuration.convertCharEncoding(charencoding);
+        if (ceName != null)
+        {
+            configuration.setInCharEncodingName(ceName);
+            configuration.setOutCharEncodingName(ceName);
+        }
+    }
+
+    /**
+     * Returns the configured character encoding.
+     * @return character encoding constant
+     * @deprecated from r8 tidy can use different encoding for input and output. This method will only return the
+     * <strong>input </strong> character encoding.
+     */
+    public int getCharEncoding()
+    {
+        return configuration.getInCharEncoding();
+    }
+
+    /**
+     * @param slidestyle N/A
+     * @deprecated does nothing
+     */
+    public void setSlidestyle(String slidestyle)
+    {
+        configuration.slidestyle = slidestyle;
+    }
+
+    /**
+     * @deprecated does nothing
+     * @return <code>null</code>
+     */
+    public String getSlidestyle()
+    {
+        return null;
+    }
+
+    /**
+     * <code>output-raw</code>- avoid mapping values > 127 to entities. This has the same effect of specifying a
+     * "raw" encoding in the original version of tidy.
+     * @param rawOut avoid mapping values > 127 to entities
+     * @see Configuration#rawOut
+     */
+    public void setRawOut(boolean rawOut)
+    {
+        configuration.rawOut = rawOut;
+    }
+
+    /**
+     * <code>output-raw</code>- avoid mapping values > 127 to entities.
+     * @return <code>true</code> if tidy will not map values > 127 to entities
+     * @see Configuration#rawOut
+     */
+    public boolean getRawOut()
+    {
+        return configuration.rawOut;
+    }
+
+    /**
+     * <code>input-encoding</code> the character encoding used for input.
+     * @param encoding a valid java encoding name
+     */
+    public void setInputEncoding(String encoding)
+    {
+        configuration.setInCharEncodingName(encoding);
+    }
+
+    /**
+     * <code>input-encoding</code> the character encoding used for input.
+     * @return the java name of the encoding currently used for input
+     */
+    public String getInputEncoding()
+    {
+        return configuration.getInCharEncodingName();
+    }
+
+    /**
+     * <code>output-encoding</code> the character encoding used for output.
+     * @param encoding a valid java encoding name
+     */
+    public void setOutputEncoding(String encoding)
+    {
+        configuration.setOutCharEncodingName(encoding);
+    }
+
+    /**
+     * <code>output-encoding</code> the character encoding used for output.
+     * @return the java name of the encoding currently used for output
+     */
+    public String getOutputEncoding()
+    {
+        return configuration.getOutCharEncodingName();
+    }
+    /**
+     * <code>move-elements</code>- move style to head, th to thead etc.
+     * @param move allow to move elements in page
+     * @see Configuration#moveElements
+     */
+    public void setMoveElements(boolean move)
+    {
+        configuration.moveElements = move;
+    }
+
+    /**
+     * <code>move-elements</code>- move style to head, th to thead etc.
+     * @return <code>true</code> if tidy will move elements in page to proper position
+     * @see Configuration#moveElements
+     */
+    public boolean getMoveElements()
+    {
+        return configuration.moveElements;
+    }
+
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/TidyBeanInfo.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/TidyBeanInfo.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/TidyBeanInfo.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,99 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ *  Java HTML Tidy - JTidy
+ *  HTML parser and pretty printer
+ *
+ *  Copyright (c) 1998-2000 World Wide Web Consortium (Massachusetts
+ *  Institute of Technology, Institut National de Recherche en
+ *  Informatique et en Automatique, Keio University). All Rights
+ *  Reserved.
+ *
+ *  Contributing Author(s):
+ *
+ *     Dave Raggett <dsr at w3.org>
+ *     Andy Quick <ac.quick at sympatico.ca> (translation to Java)
+ *     Gary L Peskin <garyp at firstech.com> (Java development)
+ *     Sami Lempinen <sami at lempinen.net> (release management)
+ *     Fabrizio Giustina <fgiust at users.sourceforge.net>
+ *
+ *  The contributing author(s) would like to thank all those who
+ *  helped with testing, bug fixes, and patience.  This wouldn't
+ *  have been possible without all of you.
+ *
+ *  COPYRIGHT NOTICE:
+ * 
+ *  This software and documentation is provided "as is," and
+ *  the copyright holders and contributing author(s) make no
+ *  representations or warranties, express or implied, including
+ *  but not limited to, warranties of merchantability or fitness
+ *  for any particular purpose or that the use of the software or
+ *  documentation will not infringe any third party patents,
+ *  copyrights, trademarks or other rights. 
+ *
+ *  The copyright holders and contributing author(s) will not be
+ *  liable for any direct, indirect, special or consequential damages
+ *  arising out of any use of the software or documentation, even if
+ *  advised of the possibility of such damage.
+ *
+ *  Permission is hereby granted to use, copy, modify, and distribute
+ *  this source code, or portions hereof, documentation and executables,
+ *  for any purpose, without fee, subject to the following restrictions:
+ *
+ *  1. The origin of this source code must not be misrepresented.
+ *  2. Altered versions must be plainly marked as such and must
+ *     not be misrepresented as being the original source.
+ *  3. This Copyright notice may not be removed or altered from any
+ *     source or altered source distribution.
+ * 
+ *  The copyright holders and contributing author(s) specifically
+ *  permit, without fee, and encourage the use of this source code
+ *  as a component for supporting the Hypertext Markup Language in
+ *  commercial products. If you use this source code in a product,
+ *  acknowledgment is not required but would be appreciated.
+ *
+ */
+package org.ajax4jsf.org.w3c.tidy;
+
+import java.awt.Image;
+import java.beans.SimpleBeanInfo;
+
+
+/**
+ * BeanInfo for Tidy.
+ * @author Dave Raggett <a href="mailto:dsr at w3.org">dsr at w3.org </a>
+ * @author Andy Quick <a href="mailto:ac.quick at sympatico.ca">ac.quick at sympatico.ca </a> (translation to Java)
+ * @author Fabrizio Giustina
+ * @version $Revision: 1.1.2.1 $ ($Author: alexsmirnov $)
+ */
+public class TidyBeanInfo extends SimpleBeanInfo
+{
+
+    /**
+     * @see java.beans.BeanInfo#getIcon(int)
+     */
+    public Image getIcon(int kind)
+    {
+        return loadImage("tidy.gif");
+    }
+
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/TidyLexerListener.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/TidyLexerListener.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/TidyLexerListener.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,31 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.org.w3c.tidy;
+
+/**
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:56:47 $
+ *
+ */
+public interface TidyLexerListener extends TidyMessageListener {
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/TidyMessage.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/TidyMessage.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/TidyMessage.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,335 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ *  Java HTML Tidy - JTidy
+ *  HTML parser and pretty printer
+ *
+ *  Copyright (c) 1998-2000 World Wide Web Consortium (Massachusetts
+ *  Institute of Technology, Institut National de Recherche en
+ *  Informatique et en Automatique, Keio University). All Rights
+ *  Reserved.
+ *
+ *  Contributing Author(s):
+ *
+ *     Dave Raggett <dsr at w3.org>
+ *     Andy Quick <ac.quick at sympatico.ca> (translation to Java)
+ *     Gary L Peskin <garyp at firstech.com> (Java development)
+ *     Sami Lempinen <sami at lempinen.net> (release management)
+ *     Fabrizio Giustina <fgiust at users.sourceforge.net>
+ *
+ *  The contributing author(s) would like to thank all those who
+ *  helped with testing, bug fixes, and patience.  This wouldn't
+ *  have been possible without all of you.
+ *
+ *  COPYRIGHT NOTICE:
+ * 
+ *  This software and documentation is provided "as is," and
+ *  the copyright holders and contributing author(s) make no
+ *  representations or warranties, express or implied, including
+ *  but not limited to, warranties of merchantability or fitness
+ *  for any particular purpose or that the use of the software or
+ *  documentation will not infringe any third party patents,
+ *  copyrights, trademarks or other rights. 
+ *
+ *  The copyright holders and contributing author(s) will not be
+ *  liable for any direct, indirect, special or consequential damages
+ *  arising out of any use of the software or documentation, even if
+ *  advised of the possibility of such damage.
+ *
+ *  Permission is hereby granted to use, copy, modify, and distribute
+ *  this source code, or portions hereof, documentation and executables,
+ *  for any purpose, without fee, subject to the following restrictions:
+ *
+ *  1. The origin of this source code must not be misrepresented.
+ *  2. Altered versions must be plainly marked as such and must
+ *     not be misrepresented as being the original source.
+ *  3. This Copyright notice may not be removed or altered from any
+ *     source or altered source distribution.
+ * 
+ *  The copyright holders and contributing author(s) specifically
+ *  permit, without fee, and encourage the use of this source code
+ *  as a component for supporting the Hypertext Markup Language in
+ *  commercial products. If you use this source code in a product,
+ *  acknowledgment is not required but would be appreciated.
+ *
+ */
+package org.ajax4jsf.org.w3c.tidy;
+
+/**
+ * Message sent to listeners for validation errors/warnings and info.
+ * @see Tidy#setMessageListener(TidyMessageListener)
+ * @author Fabrizio Giustina
+ * @version $Revision: 1.1.2.1 $ ($Author: alexsmirnov $)
+ */
+public final class TidyMessage
+{
+
+	/**
+	 * Reference to lexer for manipulate output tree
+	 */
+	private Lexer lexer;
+    /**
+     * Line in the source file (can be 0 if the message is not related to a particular line, such as a summary message).
+     */
+    private int line;
+
+    /**
+     * Column in the source file (can be 0 if the message is not related to a particular column, such as a summary
+     * message).
+     */
+    private int column;
+
+    /**
+     * Level for this message. Can be TidyMessage.Level.SUMMARY | TidyMessage.Level.INFO | TidyMessage.Level.WARNING |
+     * TidyMessage.Level.ERROR.
+     */
+    private Level level;
+
+    /**
+     * Formatted text for this message.
+     */
+    private String message;
+
+    /**
+     * Tidy internal error code.
+     */
+    private int errorCode;
+    
+    private Node element;
+
+    /**
+     * Instantiates a new message.
+     * @param errorCode Tidy internal error code.
+     * @param line Line number in the source file
+     * @param column Column number in the source file
+     * @param level severity
+     * @param message message text
+     */
+    public TidyMessage(int errorCode, int line, int column, Level level, String message)
+    {
+        this.errorCode = errorCode;
+        this.line = line;
+        this.column = column;
+        this.level = level;
+        this.message = message;
+    }
+
+    /**
+     * Getter for <code>errorCode</code>.
+     * @return Returns the errorCode.
+     */
+    public int getErrorCode()
+    {
+        return this.errorCode;
+    }
+
+    /**
+     * Getter for <code>column</code>.
+     * @return Returns the column.
+     */
+    public int getColumn()
+    {
+        return this.column;
+    }
+
+    /**
+     * Getter for <code>level</code>.
+     * @return Returns the level.
+     */
+    public Level getLevel()
+    {
+        return this.level;
+    }
+
+    /**
+     * Getter for <code>line</code>.
+     * @return Returns the line.
+     */
+    public int getLine()
+    {
+        return this.line;
+    }
+
+    /**
+     * Getter for <code>message</code>.
+     * @return Returns the message.
+     */
+    public String getMessage()
+    {
+        return this.message;
+    }
+
+    /**
+     * Message severity enumeration.
+     * @author fgiust
+     * @version $Revision: 1.1.2.1 $ ($Author: alexsmirnov $)
+     */
+    public static final class Level implements Comparable
+    {
+
+        /**
+         * level = summary (0).
+         */
+        public static final Level SUMMARY = new Level(0);
+
+        /**
+         * level = info (1).
+         */
+        public static final Level INFO = new Level(1);
+
+        /**
+         * level = warning (2).
+         */
+        public static final Level WARNING = new Level(2);
+
+        /**
+         * level = error (3).
+         */
+        public static final Level ERROR = new Level(3);
+
+        /**
+         * short value for this level.
+         */
+        private short code;
+
+        /**
+         * Instantiates a new message with the given code.
+         * @param code int value for this level
+         */
+        private Level(int code)
+        {
+            this.code = (short) code;
+        }
+
+        /**
+         * Returns the int value for this level.
+         * @return int value for this level
+         */
+        public short getCode()
+        {
+            return this.code;
+        }
+
+        /**
+         * Returns the Level instance corresponding to the given int value.
+         * @param code int value for the level
+         * @return Level instance
+         */
+        public static Level fromCode(int code)
+        {
+            switch (code)
+            {
+                case 0 :
+                    return SUMMARY;
+                case 1 :
+                    return INFO;
+                case 2 :
+                    return WARNING;
+                case 3 :
+                    return ERROR;
+
+                default :
+                    return null;
+            }
+        }
+
+        /**
+         * @see java.lang.Comparable#compareTo(Object)
+         */
+        public int compareTo(Object object)
+        {
+            return this.code - ((Level) object).code;
+        }
+
+        /**
+         * @see java.lang.Object#equals(Object)
+         */
+        public boolean equals(Object object)
+        {
+            if (!(object instanceof Level))
+            {
+                return false;
+            }
+            return this.code == ((Level) object).code;
+        }
+
+        /**
+         * @see java.lang.Object#toString()
+         */
+        public String toString()
+        {
+            switch (code)
+            {
+                case 0 :
+                    return "SUMMARY";
+                case 1 :
+                    return "INFO";
+                case 2 :
+                    return "WARNING";
+                case 3 :
+                    return "ERROR";
+
+                default :
+                    // should not happen
+                    return "?";
+            }
+        }
+
+        /**
+         * @see java.lang.Object#hashCode()
+         */
+        public int hashCode()
+        {
+            // new instances should not be created
+            return super.hashCode();
+        }
+    }
+
+	/**
+	 * @return Returns the lexer.
+	 */
+	public Lexer getLexer() {
+		return lexer;
+	}
+
+	/**
+	 * @param lexer The lexer to set.
+	 */
+	public void setLexer(Lexer lexer) {
+		this.lexer = lexer;
+	}
+
+	/**
+	 * @return Returns the element.
+	 */
+	public Node getElement() {
+		return element;
+	}
+
+	/**
+	 * @param element The element to set.
+	 */
+	public void setElement(Node element) {
+		this.element = element;
+	}
+
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/TidyMessageListener.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/TidyMessageListener.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/TidyMessageListener.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,92 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ *  Java HTML Tidy - JTidy
+ *  HTML parser and pretty printer
+ *
+ *  Copyright (c) 1998-2000 World Wide Web Consortium (Massachusetts
+ *  Institute of Technology, Institut National de Recherche en
+ *  Informatique et en Automatique, Keio University). All Rights
+ *  Reserved.
+ *
+ *  Contributing Author(s):
+ *
+ *     Dave Raggett <dsr at w3.org>
+ *     Andy Quick <ac.quick at sympatico.ca> (translation to Java)
+ *     Gary L Peskin <garyp at firstech.com> (Java development)
+ *     Sami Lempinen <sami at lempinen.net> (release management)
+ *     Fabrizio Giustina <fgiust at users.sourceforge.net>
+ *
+ *  The contributing author(s) would like to thank all those who
+ *  helped with testing, bug fixes, and patience.  This wouldn't
+ *  have been possible without all of you.
+ *
+ *  COPYRIGHT NOTICE:
+ * 
+ *  This software and documentation is provided "as is," and
+ *  the copyright holders and contributing author(s) make no
+ *  representations or warranties, express or implied, including
+ *  but not limited to, warranties of merchantability or fitness
+ *  for any particular purpose or that the use of the software or
+ *  documentation will not infringe any third party patents,
+ *  copyrights, trademarks or other rights. 
+ *
+ *  The copyright holders and contributing author(s) will not be
+ *  liable for any direct, indirect, special or consequential damages
+ *  arising out of any use of the software or documentation, even if
+ *  advised of the possibility of such damage.
+ *
+ *  Permission is hereby granted to use, copy, modify, and distribute
+ *  this source code, or portions hereof, documentation and executables,
+ *  for any purpose, without fee, subject to the following restrictions:
+ *
+ *  1. The origin of this source code must not be misrepresented.
+ *  2. Altered versions must be plainly marked as such and must
+ *     not be misrepresented as being the original source.
+ *  3. This Copyright notice may not be removed or altered from any
+ *     source or altered source distribution.
+ * 
+ *  The copyright holders and contributing author(s) specifically
+ *  permit, without fee, and encourage the use of this source code
+ *  as a component for supporting the Hypertext Markup Language in
+ *  commercial products. If you use this source code in a product,
+ *  acknowledgment is not required but would be appreciated.
+ *
+ */
+package org.ajax4jsf.org.w3c.tidy;
+
+/**
+ * Listener interface for validation errors/warnings and info.
+ * @see Tidy#setMessageListener(TidyMessageListener)
+ * @author Fabrizio Giustina
+ * @version $Revision: 1.1.2.1 $ ($Author: alexsmirnov $)
+ */
+public interface TidyMessageListener
+{
+
+    /**
+     * Called by tidy when a warning or error occurs.
+     * @param message Tidy message
+     */
+    void messageReceived(TidyMessage message);
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/TidyUtils.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/TidyUtils.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/TidyUtils.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,891 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ *  Java HTML Tidy - JTidy
+ *  HTML parser and pretty printer
+ *
+ *  Copyright (c) 1998-2000 World Wide Web Consortium (Massachusetts
+ *  Institute of Technology, Institut National de Recherche en
+ *  Informatique et en Automatique, Keio University). All Rights
+ *  Reserved.
+ *
+ *  Contributing Author(s):
+ *
+ *     Dave Raggett <dsr at w3.org>
+ *     Andy Quick <ac.quick at sympatico.ca> (translation to Java)
+ *     Gary L Peskin <garyp at firstech.com> (Java development)
+ *     Sami Lempinen <sami at lempinen.net> (release management)
+ *     Fabrizio Giustina <fgiust at users.sourceforge.net>
+ *
+ *  The contributing author(s) would like to thank all those who
+ *  helped with testing, bug fixes, and patience.  This wouldn't
+ *  have been possible without all of you.
+ *
+ *  COPYRIGHT NOTICE:
+ *
+ *  This software and documentation is provided "as is," and
+ *  the copyright holders and contributing author(s) make no
+ *  representations or warranties, express or implied, including
+ *  but not limited to, warranties of merchantability or fitness
+ *  for any particular purpose or that the use of the software or
+ *  documentation will not infringe any third party patents,
+ *  copyrights, trademarks or other rights.
+ *
+ *  The copyright holders and contributing author(s) will not be
+ *  liable for any direct, indirect, special or consequential damages
+ *  arising out of any use of the software or documentation, even if
+ *  advised of the possibility of such damage.
+ *
+ *  Permission is hereby granted to use, copy, modify, and distribute
+ *  this source code, or portions hereof, documentation and executables,
+ *  for any purpose, without fee, subject to the following restrictions:
+ *
+ *  1. The origin of this source code must not be misrepresented.
+ *  2. Altered versions must be plainly marked as such and must
+ *     not be misrepresented as being the original source.
+ *  3. This Copyright notice may not be removed or altered from any
+ *     source or altered source distribution.
+ *
+ *  The copyright holders and contributing author(s) specifically
+ *  permit, without fee, and encourage the use of this source code
+ *  as a component for supporting the Hypertext Markup Language in
+ *  commercial products. If you use this source code in a product,
+ *  acknowledgment is not required but would be appreciated.
+ *
+ */
+
+package org.ajax4jsf.org.w3c.tidy;
+
+import org.ajax4jsf.framework.util.message.Messages;
+
+/**
+ * Utility class with handy methods, mainly for String handling or for reproducing c behaviours.
+ * @author Fabrizio Giustina
+ * @version $Revision $ ($Author $)
+ */
+public final class TidyUtils
+{
+
+    /**
+     * char type: digit.
+     */
+    private static final short DIGIT = 1;
+
+    /**
+     * char type: letter.
+     */
+    private static final short LETTER = 2;
+
+    /**
+     * char type: namechar.
+     */
+    private static final short NAMECHAR = 4;
+
+    /**
+     * char type: whitespace.
+     */
+    private static final short WHITE = 8;
+
+    /**
+     * char type: newline.
+     */
+    private static final short NEWLINE = 16;
+
+    /**
+     * char type: lowercase.
+     */
+    private static final short LOWERCASE = 32;
+
+    /**
+     * char type: uppercase.
+     */
+    private static final short UPPERCASE = 64;
+
+    /**
+     * used to classify chars for lexical purposes.
+     */
+    private static short[] lexmap = new short[128];
+
+    static
+    {
+        mapStr("\r\n\f", (short) (NEWLINE | WHITE));
+        mapStr(" \t", WHITE);
+        mapStr("-.:_", NAMECHAR);
+        mapStr("0123456789", (short) (DIGIT | NAMECHAR));
+        mapStr("abcdefghijklmnopqrstuvwxyz", (short) (LOWERCASE | LETTER | NAMECHAR));
+        mapStr("ABCDEFGHIJKLMNOPQRSTUVWXYZ", (short) (UPPERCASE | LETTER | NAMECHAR));
+    }
+
+    /**
+     * utility class, don't instantiate.
+     */
+    private TidyUtils()
+    {
+        // unused
+    }
+
+    /**
+     * Converts a int to a boolean.
+     * @param value int value
+     * @return <code>true</code> if value is != 0
+     */
+    static boolean toBoolean(int value)
+    {
+        return value != 0;
+    }
+
+    /**
+     * convert an int to unsigned (& 0xFF).
+     * @param c signed int
+     * @return unsigned int
+     */
+    static int toUnsigned(int c)
+    {
+        return c & 0xFF;
+    }
+
+    /**
+     * check if the first String contains the second one.
+     * @param s1 full String
+     * @param len1 maximum position in String
+     * @param s2 String to search for
+     * @return true if s1 contains s2 in the range 0-len1
+     */
+    static boolean wsubstrn(String s1, int len1, String s2)
+    {
+        int searchIndex = s1.indexOf(s2);
+        return searchIndex > -1 && searchIndex <= len1;
+    }
+
+    /**
+     * check if the first String contains the second one (ignore case).
+     * @param s1 full String
+     * @param len1 maximum position in String
+     * @param s2 String to search for
+     * @return true if s1 contains s2 in the range 0-len1
+     */
+    static boolean wsubstrncase(String s1, int len1, String s2)
+    {
+        return wsubstrn(s1.toLowerCase(), len1, s2.toLowerCase());
+    }
+
+    /**
+     * return offset of cc from beginning of s1, -1 if not found.
+     * @param s1 String
+     * @param len1 maximum offset (values > than lenl are ignored and returned as -1)
+     * @param cc character to search for
+     * @return index of cc in s1
+     */
+    static int wstrnchr(String s1, int len1, char cc)
+    {
+        int indexOf = s1.indexOf(cc);
+        if (indexOf < len1)
+        {
+            return indexOf;
+        }
+
+        return -1;
+    }
+
+    /**
+     * Same as wsubstrn, but without a specified length.
+     * @param s1 full String
+     * @param s2 String to search for
+     * @return <code>true</code> if s2 is found in s2 (case insensitive search)
+     */
+    static boolean wsubstr(String s1, String s2)
+    {
+        int i;
+        int len1 = s1.length();
+        int len2 = s2.length();
+
+        for (i = 0; i <= len1 - len2; ++i)
+        {
+            if (s2.equalsIgnoreCase(s1.substring(i)))
+            {
+                return true;
+            }
+        }
+
+        return false;
+    }
+
+    /**
+     * Is the character a hex digit?
+     * @param c char
+     * @return <code>true</code> if he given character is a hex digit
+     */
+    static boolean isxdigit(char c)
+    {
+        return Character.isDigit(c) || (Character.toLowerCase(c) >= 'a' && Character.toLowerCase(c) <= 'f');
+    }
+
+    /**
+     * Check if the string valueToCheck is contained in validValues array (case insesitie comparison).
+     * @param validValues array of valid values
+     * @param valueToCheck value to search for
+     * @return <code>true</code> if valueToCheck is found in validValues
+     */
+    static boolean isInValuesIgnoreCase(String[] validValues, String valueToCheck)
+    {
+        int len = validValues.length;
+        for (int j = 0; j < len; j++)
+        {
+            if (validValues[j].equalsIgnoreCase(valueToCheck))
+            {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * Return true if substring s is in p and isn't all in upper case. This is used to check the case of SYSTEM, PUBLIC,
+     * DTD and EN.
+     * @param s substring
+     * @param p full string
+     * @param len how many chars to check in p
+     * @return true if substring s is in p and isn't all in upper case
+     */
+    public static boolean findBadSubString(String s, String p, int len)
+    {
+        int n = s.length();
+        int i = 0;
+        String ps;
+
+        while (n < len)
+        {
+            ps = p.substring(i, i + n);
+            if (s.equalsIgnoreCase(ps))
+            {
+                return (!ps.equals(s.substring(0, n)));
+            }
+
+            ++i;
+            --len;
+        }
+
+        return false;
+    }
+
+    /**
+     * Is the given char a valid xml letter?
+     * @param c char
+     * @return <code>true</code> if the char is a valid xml letter
+     */
+    static boolean isXMLLetter(char c)
+    {
+        return ((c >= 0x41 && c <= 0x5a)
+            || (c >= 0x61 && c <= 0x7a)
+            || (c >= 0xc0 && c <= 0xd6)
+            || (c >= 0xd8 && c <= 0xf6)
+            || (c >= 0xf8 && c <= 0xff)
+            || (c >= 0x100 && c <= 0x131)
+            || (c >= 0x134 && c <= 0x13e)
+            || (c >= 0x141 && c <= 0x148)
+            || (c >= 0x14a && c <= 0x17e)
+            || (c >= 0x180 && c <= 0x1c3)
+            || (c >= 0x1cd && c <= 0x1f0)
+            || (c >= 0x1f4 && c <= 0x1f5)
+            || (c >= 0x1fa && c <= 0x217)
+            || (c >= 0x250 && c <= 0x2a8)
+            || (c >= 0x2bb && c <= 0x2c1)
+            || c == 0x386
+            || (c >= 0x388 && c <= 0x38a)
+            || c == 0x38c
+            || (c >= 0x38e && c <= 0x3a1)
+            || (c >= 0x3a3 && c <= 0x3ce)
+            || (c >= 0x3d0 && c <= 0x3d6)
+            || c == 0x3da
+            || c == 0x3dc
+            || c == 0x3de
+            || c == 0x3e0
+            || (c >= 0x3e2 && c <= 0x3f3)
+            || (c >= 0x401 && c <= 0x40c)
+            || (c >= 0x40e && c <= 0x44f)
+            || (c >= 0x451 && c <= 0x45c)
+            || (c >= 0x45e && c <= 0x481)
+            || (c >= 0x490 && c <= 0x4c4)
+            || (c >= 0x4c7 && c <= 0x4c8)
+            || (c >= 0x4cb && c <= 0x4cc)
+            || (c >= 0x4d0 && c <= 0x4eb)
+            || (c >= 0x4ee && c <= 0x4f5)
+            || (c >= 0x4f8 && c <= 0x4f9)
+            || (c >= 0x531 && c <= 0x556)
+            || c == 0x559
+            || (c >= 0x561 && c <= 0x586)
+            || (c >= 0x5d0 && c <= 0x5ea)
+            || (c >= 0x5f0 && c <= 0x5f2)
+            || (c >= 0x621 && c <= 0x63a)
+            || (c >= 0x641 && c <= 0x64a)
+            || (c >= 0x671 && c <= 0x6b7)
+            || (c >= 0x6ba && c <= 0x6be)
+            || (c >= 0x6c0 && c <= 0x6ce)
+            || (c >= 0x6d0 && c <= 0x6d3)
+            || c == 0x6d5
+            || (c >= 0x6e5 && c <= 0x6e6)
+            || (c >= 0x905 && c <= 0x939)
+            || c == 0x93d
+            || (c >= 0x958 && c <= 0x961)
+            || (c >= 0x985 && c <= 0x98c)
+            || (c >= 0x98f && c <= 0x990)
+            || (c >= 0x993 && c <= 0x9a8)
+            || (c >= 0x9aa && c <= 0x9b0)
+            || c == 0x9b2
+            || (c >= 0x9b6 && c <= 0x9b9)
+            || (c >= 0x9dc && c <= 0x9dd)
+            || (c >= 0x9df && c <= 0x9e1)
+            || (c >= 0x9f0 && c <= 0x9f1)
+            || (c >= 0xa05 && c <= 0xa0a)
+            || (c >= 0xa0f && c <= 0xa10)
+            || (c >= 0xa13 && c <= 0xa28)
+            || (c >= 0xa2a && c <= 0xa30)
+            || (c >= 0xa32 && c <= 0xa33)
+            || (c >= 0xa35 && c <= 0xa36)
+            || (c >= 0xa38 && c <= 0xa39)
+            || (c >= 0xa59 && c <= 0xa5c)
+            || c == 0xa5e
+            || (c >= 0xa72 && c <= 0xa74)
+            || (c >= 0xa85 && c <= 0xa8b)
+            || c == 0xa8d
+            || (c >= 0xa8f && c <= 0xa91)
+            || (c >= 0xa93 && c <= 0xaa8)
+            || (c >= 0xaaa && c <= 0xab0)
+            || (c >= 0xab2 && c <= 0xab3)
+            || (c >= 0xab5 && c <= 0xab9)
+            || c == 0xabd
+            || c == 0xae0
+            || (c >= 0xb05 && c <= 0xb0c)
+            || (c >= 0xb0f && c <= 0xb10)
+            || (c >= 0xb13 && c <= 0xb28)
+            || (c >= 0xb2a && c <= 0xb30)
+            || (c >= 0xb32 && c <= 0xb33)
+            || (c >= 0xb36 && c <= 0xb39)
+            || c == 0xb3d
+            || (c >= 0xb5c && c <= 0xb5d)
+            || (c >= 0xb5f && c <= 0xb61)
+            || (c >= 0xb85 && c <= 0xb8a)
+            || (c >= 0xb8e && c <= 0xb90)
+            || (c >= 0xb92 && c <= 0xb95)
+            || (c >= 0xb99 && c <= 0xb9a)
+            || c == 0xb9c
+            || (c >= 0xb9e && c <= 0xb9f)
+            || (c >= 0xba3 && c <= 0xba4)
+            || (c >= 0xba8 && c <= 0xbaa)
+            || (c >= 0xbae && c <= 0xbb5)
+            || (c >= 0xbb7 && c <= 0xbb9)
+            || (c >= 0xc05 && c <= 0xc0c)
+            || (c >= 0xc0e && c <= 0xc10)
+            || (c >= 0xc12 && c <= 0xc28)
+            || (c >= 0xc2a && c <= 0xc33)
+            || (c >= 0xc35 && c <= 0xc39)
+            || (c >= 0xc60 && c <= 0xc61)
+            || (c >= 0xc85 && c <= 0xc8c)
+            || (c >= 0xc8e && c <= 0xc90)
+            || (c >= 0xc92 && c <= 0xca8)
+            || (c >= 0xcaa && c <= 0xcb3)
+            || (c >= 0xcb5 && c <= 0xcb9)
+            || c == 0xcde
+            || (c >= 0xce0 && c <= 0xce1)
+            || (c >= 0xd05 && c <= 0xd0c)
+            || (c >= 0xd0e && c <= 0xd10)
+            || (c >= 0xd12 && c <= 0xd28)
+            || (c >= 0xd2a && c <= 0xd39)
+            || (c >= 0xd60 && c <= 0xd61)
+            || (c >= 0xe01 && c <= 0xe2e)
+            || c == 0xe30
+            || (c >= 0xe32 && c <= 0xe33)
+            || (c >= 0xe40 && c <= 0xe45)
+            || (c >= 0xe81 && c <= 0xe82)
+            || c == 0xe84
+            || (c >= 0xe87 && c <= 0xe88)
+            || c == 0xe8a
+            || c == 0xe8d
+            || (c >= 0xe94 && c <= 0xe97)
+            || (c >= 0xe99 && c <= 0xe9f)
+            || (c >= 0xea1 && c <= 0xea3)
+            || c == 0xea5
+            || c == 0xea7
+            || (c >= 0xeaa && c <= 0xeab)
+            || (c >= 0xead && c <= 0xeae)
+            || c == 0xeb0
+            || (c >= 0xeb2 && c <= 0xeb3)
+            || c == 0xebd
+            || (c >= 0xec0 && c <= 0xec4)
+            || (c >= 0xf40 && c <= 0xf47)
+            || (c >= 0xf49 && c <= 0xf69)
+            || (c >= 0x10a0 && c <= 0x10c5)
+            || (c >= 0x10d0 && c <= 0x10f6)
+            || c == 0x1100
+            || (c >= 0x1102 && c <= 0x1103)
+            || (c >= 0x1105 && c <= 0x1107)
+            || c == 0x1109
+            || (c >= 0x110b && c <= 0x110c)
+            || (c >= 0x110e && c <= 0x1112)
+            || c == 0x113c
+            || c == 0x113e
+            || c == 0x1140
+            || c == 0x114c
+            || c == 0x114e
+            || c == 0x1150
+            || (c >= 0x1154 && c <= 0x1155)
+            || c == 0x1159
+            || (c >= 0x115f && c <= 0x1161)
+            || c == 0x1163
+            || c == 0x1165
+            || c == 0x1167
+            || c == 0x1169
+            || (c >= 0x116d && c <= 0x116e)
+            || (c >= 0x1172 && c <= 0x1173)
+            || c == 0x1175
+            || c == 0x119e
+            || c == 0x11a8
+            || c == 0x11ab
+            || (c >= 0x11ae && c <= 0x11af)
+            || (c >= 0x11b7 && c <= 0x11b8)
+            || c == 0x11ba
+            || (c >= 0x11bc && c <= 0x11c2)
+            || c == 0x11eb
+            || c == 0x11f0
+            || c == 0x11f9
+            || (c >= 0x1e00 && c <= 0x1e9b)
+            || (c >= 0x1ea0 && c <= 0x1ef9)
+            || (c >= 0x1f00 && c <= 0x1f15)
+            || (c >= 0x1f18 && c <= 0x1f1d)
+            || (c >= 0x1f20 && c <= 0x1f45)
+            || (c >= 0x1f48 && c <= 0x1f4d)
+            || (c >= 0x1f50 && c <= 0x1f57)
+            || c == 0x1f59
+            || c == 0x1f5b
+            || c == 0x1f5d
+            || (c >= 0x1f5f && c <= 0x1f7d)
+            || (c >= 0x1f80 && c <= 0x1fb4)
+            || (c >= 0x1fb6 && c <= 0x1fbc)
+            || c == 0x1fbe
+            || (c >= 0x1fc2 && c <= 0x1fc4)
+            || (c >= 0x1fc6 && c <= 0x1fcc)
+            || (c >= 0x1fd0 && c <= 0x1fd3)
+            || (c >= 0x1fd6 && c <= 0x1fdb)
+            || (c >= 0x1fe0 && c <= 0x1fec)
+            || (c >= 0x1ff2 && c <= 0x1ff4)
+            || (c >= 0x1ff6 && c <= 0x1ffc)
+            || c == 0x2126
+            || (c >= 0x212a && c <= 0x212b)
+            || c == 0x212e
+            || (c >= 0x2180 && c <= 0x2182)
+            || (c >= 0x3041 && c <= 0x3094)
+            || (c >= 0x30a1 && c <= 0x30fa)
+            || (c >= 0x3105 && c <= 0x312c)
+            || (c >= 0xac00 && c <= 0xd7a3)
+            || (c >= 0x4e00 && c <= 0x9fa5)
+            || c == 0x3007
+            || (c >= 0x3021 && c <= 0x3029)
+            || (c >= 0x4e00 && c <= 0x9fa5)
+            || c == 0x3007 || (c >= 0x3021 && c <= 0x3029));
+    }
+
+    /**
+     * Is the given char valid in xml name?
+     * @param c char
+     * @return <code>true</code> if the char is a valid xml name char
+     */
+    static boolean isXMLNamechar(char c)
+    {
+        return (isXMLLetter(c)
+            || c == '.'
+            || c == '_'
+            || c == ':'
+            || c == '-'
+            || (c >= 0x300 && c <= 0x345)
+            || (c >= 0x360 && c <= 0x361)
+            || (c >= 0x483 && c <= 0x486)
+            || (c >= 0x591 && c <= 0x5a1)
+            || (c >= 0x5a3 && c <= 0x5b9)
+            || (c >= 0x5bb && c <= 0x5bd)
+            || c == 0x5bf
+            || (c >= 0x5c1 && c <= 0x5c2)
+            || c == 0x5c4
+            || (c >= 0x64b && c <= 0x652)
+            || c == 0x670
+            || (c >= 0x6d6 && c <= 0x6dc)
+            || (c >= 0x6dd && c <= 0x6df)
+            || (c >= 0x6e0 && c <= 0x6e4)
+            || (c >= 0x6e7 && c <= 0x6e8)
+            || (c >= 0x6ea && c <= 0x6ed)
+            || (c >= 0x901 && c <= 0x903)
+            || c == 0x93c
+            || (c >= 0x93e && c <= 0x94c)
+            || c == 0x94d
+            || (c >= 0x951 && c <= 0x954)
+            || (c >= 0x962 && c <= 0x963)
+            || (c >= 0x981 && c <= 0x983)
+            || c == 0x9bc
+            || c == 0x9be
+            || c == 0x9bf
+            || (c >= 0x9c0 && c <= 0x9c4)
+            || (c >= 0x9c7 && c <= 0x9c8)
+            || (c >= 0x9cb && c <= 0x9cd)
+            || c == 0x9d7
+            || (c >= 0x9e2 && c <= 0x9e3)
+            || c == 0xa02
+            || c == 0xa3c
+            || c == 0xa3e
+            || c == 0xa3f
+            || (c >= 0xa40 && c <= 0xa42)
+            || (c >= 0xa47 && c <= 0xa48)
+            || (c >= 0xa4b && c <= 0xa4d)
+            || (c >= 0xa70 && c <= 0xa71)
+            || (c >= 0xa81 && c <= 0xa83)
+            || c == 0xabc
+            || (c >= 0xabe && c <= 0xac5)
+            || (c >= 0xac7 && c <= 0xac9)
+            || (c >= 0xacb && c <= 0xacd)
+            || (c >= 0xb01 && c <= 0xb03)
+            || c == 0xb3c
+            || (c >= 0xb3e && c <= 0xb43)
+            || (c >= 0xb47 && c <= 0xb48)
+            || (c >= 0xb4b && c <= 0xb4d)
+            || (c >= 0xb56 && c <= 0xb57)
+            || (c >= 0xb82 && c <= 0xb83)
+            || (c >= 0xbbe && c <= 0xbc2)
+            || (c >= 0xbc6 && c <= 0xbc8)
+            || (c >= 0xbca && c <= 0xbcd)
+            || c == 0xbd7
+            || (c >= 0xc01 && c <= 0xc03)
+            || (c >= 0xc3e && c <= 0xc44)
+            || (c >= 0xc46 && c <= 0xc48)
+            || (c >= 0xc4a && c <= 0xc4d)
+            || (c >= 0xc55 && c <= 0xc56)
+            || (c >= 0xc82 && c <= 0xc83)
+            || (c >= 0xcbe && c <= 0xcc4)
+            || (c >= 0xcc6 && c <= 0xcc8)
+            || (c >= 0xcca && c <= 0xccd)
+            || (c >= 0xcd5 && c <= 0xcd6)
+            || (c >= 0xd02 && c <= 0xd03)
+            || (c >= 0xd3e && c <= 0xd43)
+            || (c >= 0xd46 && c <= 0xd48)
+            || (c >= 0xd4a && c <= 0xd4d)
+            || c == 0xd57
+            || c == 0xe31
+            || (c >= 0xe34 && c <= 0xe3a)
+            || (c >= 0xe47 && c <= 0xe4e)
+            || c == 0xeb1
+            || (c >= 0xeb4 && c <= 0xeb9)
+            || (c >= 0xebb && c <= 0xebc)
+            || (c >= 0xec8 && c <= 0xecd)
+            || (c >= 0xf18 && c <= 0xf19)
+            || c == 0xf35
+            || c == 0xf37
+            || c == 0xf39
+            || c == 0xf3e
+            || c == 0xf3f
+            || (c >= 0xf71 && c <= 0xf84)
+            || (c >= 0xf86 && c <= 0xf8b)
+            || (c >= 0xf90 && c <= 0xf95)
+            || c == 0xf97
+            || (c >= 0xf99 && c <= 0xfad)
+            || (c >= 0xfb1 && c <= 0xfb7)
+            || c == 0xfb9
+            || (c >= 0x20d0 && c <= 0x20dc)
+            || c == 0x20e1
+            || (c >= 0x302a && c <= 0x302f)
+            || c == 0x3099
+            || c == 0x309a
+            || (c >= 0x30 && c <= 0x39)
+            || (c >= 0x660 && c <= 0x669)
+            || (c >= 0x6f0 && c <= 0x6f9)
+            || (c >= 0x966 && c <= 0x96f)
+            || (c >= 0x9e6 && c <= 0x9ef)
+            || (c >= 0xa66 && c <= 0xa6f)
+            || (c >= 0xae6 && c <= 0xaef)
+            || (c >= 0xb66 && c <= 0xb6f)
+            || (c >= 0xbe7 && c <= 0xbef)
+            || (c >= 0xc66 && c <= 0xc6f)
+            || (c >= 0xce6 && c <= 0xcef)
+            || (c >= 0xd66 && c <= 0xd6f)
+            || (c >= 0xe50 && c <= 0xe59)
+            || (c >= 0xed0 && c <= 0xed9)
+            || (c >= 0xf20 && c <= 0xf29)
+            || c == 0xb7
+            || c == 0x2d0
+            || c == 0x2d1
+            || c == 0x387
+            || c == 0x640
+            || c == 0xe46
+            || c == 0xec6
+            || c == 0x3005
+            || (c >= 0x3031 && c <= 0x3035)
+            || (c >= 0x309d && c <= 0x309e) || (c >= 0x30fc && c <= 0x30fe));
+    }
+
+    /**
+     * Is the given character a single or double quote?
+     * @param c char
+     * @return <code>true</code> if c is " or '
+     */
+    static boolean isQuote(int c)
+    {
+        return (c == '\'' || c == '\"');
+    }
+
+    /**
+     * Should always be able convert to/from UTF-8, so encoding exceptions are converted to an Error to avoid adding
+     * throws declarations in lots of methods.
+     * @param str String
+     * @return utf8 bytes
+     * @see String#getBytes()
+     */
+    public static byte[] getBytes(String str)
+    {
+        try
+        {
+            return str.getBytes("UTF8");
+        }
+        catch (java.io.UnsupportedEncodingException e)
+        {
+            throw new Error(Messages.getMessage(Messages.STRING_CONVERSION_ERROR, e.getMessage()));
+        }
+    }
+
+    /**
+     * Should always be able convert to/from UTF-8, so encoding exceptions are converted to an Error to avoid adding
+     * throws declarations in lots of methods.
+     * @param bytes byte array
+     * @param offset starting offset in byte array
+     * @param length length in byte array starting from offset
+     * @return same as <code>new String(bytes, offset, length, "UTF8")</code>
+     */
+    public static String getString(byte[] bytes, int offset, int length)
+    {
+        try
+        {
+            return new String(bytes, offset, length, "UTF8");
+        }
+        catch (java.io.UnsupportedEncodingException e)
+        {
+            throw new Error(Messages.getMessage(Messages.UTF_CONVERSION_ERROR, e.getMessage()));
+        }
+    }
+
+    /**
+     * Return the last char in string. This is useful when trailing quotemark is missing on an attribute
+     * @param str String
+     * @return last char in String
+     */
+    public static int lastChar(String str)
+    {
+        if (str != null && str.length() > 0)
+        {
+            return str.charAt(str.length() - 1);
+        }
+
+        return 0;
+    }
+
+    /**
+     * Determines if the specified character is whitespace.
+     * @param c char
+     * @return <code>true</code> if char is whitespace.
+     */
+    public static boolean isWhite(char c)
+    {
+        short m = map(c);
+        return TidyUtils.toBoolean(m & WHITE);
+    }
+
+    /**
+     * Is the given char a digit?
+     * @param c char
+     * @return <code>true</code> if the given char is a digit
+     */
+    public static boolean isDigit(char c)
+    {
+        short m;
+        m = map(c);
+        return TidyUtils.toBoolean(m & DIGIT);
+    }
+
+    /**
+     * Is the given char a letter?
+     * @param c char
+     * @return <code>true</code> if the given char is a letter
+     */
+    public static boolean isLetter(char c)
+    {
+        short m;
+        m = map(c);
+        return TidyUtils.toBoolean(m & LETTER);
+    }
+
+    /**
+     * Is the given char valid in name? (letter, digit or "-", ".", ":", "_")
+     * @param c char
+     * @return <code>true</code> if char is a name char.
+     */
+    public static boolean isNamechar(char c)
+    {
+        short map = map(c);
+
+        return TidyUtils.toBoolean(map & NAMECHAR);
+    }
+
+    /**
+     * Determines if the specified character is a lowercase character.
+     * @param c char
+     * @return <code>true</code> if char is lower case.
+     */
+    public static boolean isLower(char c)
+    {
+        short map = map(c);
+
+        return TidyUtils.toBoolean(map & LOWERCASE);
+    }
+
+    /**
+     * Determines if the specified character is a uppercase character.
+     * @param c char
+     * @return <code>true</code> if char is upper case.
+     */
+    public static boolean isUpper(char c)
+    {
+        short map = map(c);
+
+        return TidyUtils.toBoolean(map & UPPERCASE);
+    }
+
+    /**
+     * Maps the given character to its lowercase equivalent.
+     * @param c char
+     * @return lowercase char.
+     */
+    public static char toLower(char c)
+    {
+        short m = map(c);
+
+        if (TidyUtils.toBoolean(m & UPPERCASE))
+        {
+            c = (char) (c + 'a' - 'A');
+        }
+
+        return c;
+    }
+
+    /**
+     * Maps the given character to its uppercase equivalent.
+     * @param c char
+     * @return uppercase char.
+     */
+    public static char toUpper(char c)
+    {
+        short m = map(c);
+
+        if (TidyUtils.toBoolean(m & LOWERCASE))
+        {
+            c = (char) (c + 'A' - 'a');
+        }
+
+        return c;
+    }
+
+    /**
+     * Fold case of a char.
+     * @param c char
+     * @param tocaps convert to caps
+     * @param xmlTags use xml tags? If true no change will be performed
+     * @return folded char
+     * @todo check the use of xmlTags parameter
+     */
+    public static char foldCase(char c, boolean tocaps, boolean xmlTags)
+    {
+
+        if (!xmlTags)
+        {
+
+            if (tocaps)
+            {
+                if (isLower(c))
+                {
+                    c = toUpper(c);
+                }
+            }
+            else
+            {
+                // force to lower case
+                if (isUpper(c))
+                {
+                    c = toLower(c);
+                }
+            }
+        }
+
+        return c;
+    }
+
+    /**
+     * Classify chars in String and put them in lexmap.
+     * @param str String
+     * @param code code associated to chars in the String
+     */
+    private static void mapStr(String str, short code)
+    {
+        int c;
+        for (int i = 0; i < str.length(); i++)
+        {
+            c = str.charAt(i);
+            lexmap[c] |= code;
+        }
+    }
+
+    /**
+     * Returns the constant which defines the classification of char in lexmap.
+     * @param c char
+     * @return char type
+     */
+    private static short map(char c)
+    {
+        return (c < 128 ? lexmap[c] : 0);
+    }
+
+    /**
+     * Is the given character encoding supported?
+     * @param name character encoding name
+     * @return <code>true</code> if encoding is supported, false otherwhise.
+     */
+    public static boolean isCharEncodingSupported(String name)
+    {
+        name = EncodingNameMapper.toJava(name);
+        if (name == null)
+        {
+            return false;
+        }
+
+        try
+        {
+            "".getBytes(name);
+        }
+        catch (java.io.UnsupportedEncodingException e)
+        {
+            return false;
+        }
+        return true;
+    }
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/ValidUTF8Sequence.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/ValidUTF8Sequence.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/ValidUTF8Sequence.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,119 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ *  Java HTML Tidy - JTidy
+ *  HTML parser and pretty printer
+ *
+ *  Copyright (c) 1998-2000 World Wide Web Consortium (Massachusetts
+ *  Institute of Technology, Institut National de Recherche en
+ *  Informatique et en Automatique, Keio University). All Rights
+ *  Reserved.
+ *
+ *  Contributing Author(s):
+ *
+ *     Dave Raggett <dsr at w3.org>
+ *     Andy Quick <ac.quick at sympatico.ca> (translation to Java)
+ *     Gary L Peskin <garyp at firstech.com> (Java development)
+ *     Sami Lempinen <sami at lempinen.net> (release management)
+ *     Fabrizio Giustina <fgiust at users.sourceforge.net>
+ *
+ *  The contributing author(s) would like to thank all those who
+ *  helped with testing, bug fixes, and patience.  This wouldn't
+ *  have been possible without all of you.
+ *
+ *  COPYRIGHT NOTICE:
+ * 
+ *  This software and documentation is provided "as is," and
+ *  the copyright holders and contributing author(s) make no
+ *  representations or warranties, express or implied, including
+ *  but not limited to, warranties of merchantability or fitness
+ *  for any particular purpose or that the use of the software or
+ *  documentation will not infringe any third party patents,
+ *  copyrights, trademarks or other rights. 
+ *
+ *  The copyright holders and contributing author(s) will not be
+ *  liable for any direct, indirect, special or consequential damages
+ *  arising out of any use of the software or documentation, even if
+ *  advised of the possibility of such damage.
+ *
+ *  Permission is hereby granted to use, copy, modify, and distribute
+ *  this source code, or portions hereof, documentation and executables,
+ *  for any purpose, without fee, subject to the following restrictions:
+ *
+ *  1. The origin of this source code must not be misrepresented.
+ *  2. Altered versions must be plainly marked as such and must
+ *     not be misrepresented as being the original source.
+ *  3. This Copyright notice may not be removed or altered from any
+ *     source or altered source distribution.
+ * 
+ *  The copyright holders and contributing author(s) specifically
+ *  permit, without fee, and encourage the use of this source code
+ *  as a component for supporting the Hypertext Markup Language in
+ *  commercial products. If you use this source code in a product,
+ *  acknowledgment is not required but would be appreciated.
+ *
+ */
+package org.ajax4jsf.org.w3c.tidy;
+
+/**
+ * @author Fabrizio Giustina (translation from c)
+ * @version $Revision: 1.1.2.1 $ ($Author: alexsmirnov $)
+ */
+public class ValidUTF8Sequence
+{
+
+    /**
+     * low char.
+     */
+    int lowChar;
+
+    /**
+     * high char.
+     */
+    int highChar;
+
+    /**
+     * number of bytes.
+     */
+    int numBytes;
+
+    /**
+     * array of valid bytes.
+     */
+    char[] validBytes = new char[8];
+
+    /**
+     * Instantiates a new ValidUTF8Sequence.
+     * @param lowChar low utf8 char
+     * @param highChar high utf8 char
+     * @param numBytes number of bytes in the sequence
+     * @param validBytes valid bytes array
+     */
+    public ValidUTF8Sequence(int lowChar, int highChar, int numBytes, char[] validBytes)
+    {
+        this.lowChar = lowChar;
+        this.highChar = highChar;
+        this.numBytes = numBytes;
+        this.validBytes = validBytes;
+    }
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/renderkit/AjaxCommandRendererBase.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/renderkit/AjaxCommandRendererBase.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/renderkit/AjaxCommandRendererBase.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,115 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.renderkit;
+
+import java.io.IOException;
+import java.util.Map;
+
+import javax.faces.component.UIComponent;
+import javax.faces.component.ValueHolder;
+import javax.faces.component.html.HtmlCommandButton;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+
+import org.ajax4jsf.framework.ajax.AjaxContext;
+import org.ajax4jsf.framework.ajax.AjaxEvent;
+import org.ajax4jsf.framework.renderer.AjaxComponentRendererBase;
+import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
+
+
+/**
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.3 $ $Date: 2007/02/12 17:46:53 $
+ *
+ */
+public abstract class AjaxCommandRendererBase extends AjaxComponentRendererBase {
+
+	protected void doDecode(FacesContext facesContext, UIComponent uiComponent) {
+	
+	    //super.decode must not be called, because value is handled here
+	    if ( isSubmitted(facesContext, uiComponent))
+	    {
+	    	Map attributes = uiComponent.getAttributes();
+			Object type = attributes.get("type");
+        	if (! "reset".equalsIgnoreCase((String)type) ) {
+				ActionEvent event;
+				event = new ActionEvent(uiComponent);
+				uiComponent.queueEvent(event); 
+			} 
+			uiComponent.queueEvent( new AjaxEvent(uiComponent));
+//	        org.ajax4jsf.framework.ajax.AjaxRegionListener.addRegionsFromComponent(uiComponent, facesContext);
+	    }
+	}
+
+	public String getOnClick(FacesContext context, UIComponent component) {
+	        StringBuffer onClick;
+			if ( !getUtils().isBooleanAttribute(component,"disabled")) {
+				onClick = AjaxRendererUtils.buildOnClick(component, context);
+				if (!"reset".equals(component.getAttributes().get("type"))) {
+					onClick.append(";return false;");
+				}
+			} else {
+				onClick = new StringBuffer("return false;");
+			}
+	        return onClick.toString();
+		}
+
+	public void encodeChildren(FacesContext context, UIComponent component) throws IOException {
+	    renderChildren(context, component);
+	}
+
+	public Object getValue(UIComponent uiComponent) {
+	    if (uiComponent instanceof ValueHolder) {
+	        return ((ValueHolder) uiComponent).getValue();
+	    }
+	    return uiComponent.getAttributes().get("value");
+	}
+
+	public String getType(UIComponent uiComponent) {
+	    String type;
+	    if (uiComponent instanceof HtmlCommandButton) {
+	        type = ((HtmlCommandButton) uiComponent).getType();
+	    } else {
+	        type = (String) uiComponent.getAttributes().get("type");
+	    }
+	    if (type == null) {
+	        type = "button";
+	    }
+	    return type;
+	}
+
+	
+	protected boolean isSubmitted(FacesContext facesContext, UIComponent uiComponent) {
+		// Componet accept only ajax requests. 
+		if ( !AjaxContext.getCurrentInstance(facesContext).isAjaxRequest(facesContext)) {
+			return false;
+		}
+		if(getUtils().isBooleanAttribute(uiComponent,"disabled")){
+			return false;
+		}
+	    String clientId = uiComponent.getClientId(facesContext);
+	    Map paramMap = facesContext.getExternalContext().getRequestParameterMap();
+	    Object  value = paramMap.get( clientId );
+		return null != value;
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/renderkit/AjaxFunctionRendererBase.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/renderkit/AjaxFunctionRendererBase.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/renderkit/AjaxFunctionRendererBase.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,92 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.renderkit;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIParameter;
+import javax.faces.context.FacesContext;
+
+import org.ajax4jsf.ajax.UIAjaxFunction;
+import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
+import org.ajax4jsf.framework.util.javascript.JSFunction;
+import org.ajax4jsf.framework.util.javascript.JSFunctionDefinition;
+import org.ajax4jsf.framework.util.javascript.JSReference;
+import org.ajax4jsf.framework.util.javascript.ScriptUtils;
+
+/**
+ * @author shura
+ * 
+ */
+public class AjaxFunctionRendererBase extends AjaxCommandRendererBase {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.renderer.RendererBase#getComponentClass()
+	 */
+	protected Class getComponentClass() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public String getFunction(FacesContext context, UIAjaxFunction component) {
+		StringBuffer script = new StringBuffer();
+		JSFunctionDefinition func = new JSFunctionDefinition();
+		func.setName(component.getName());
+		// Create AJAX Submit function.
+		JSFunction ajaxFunction = AjaxRendererUtils.buildAjaxFunction(
+				component, context,AjaxRendererUtils.AJAX_FUNCTION_NAME);
+		Map options = AjaxRendererUtils.buildEventOptions(context, component);
+		Map parameters = (Map) options.get("parameters");
+		if (null == parameters) {
+			parameters = new HashMap();
+			options.put("parameters", parameters);
+		}
+		ajaxFunction.addParameter(JSReference.NULL);
+		ajaxFunction.addParameter(options);
+		// Fill parameters.
+		for (Iterator it = component.getChildren().iterator(); it.hasNext();) {
+			UIComponent child = (UIComponent) it.next();
+			if (child instanceof UIParameter) {
+				UIParameter parameter = ((UIParameter) child);
+				String name = parameter.getName();
+				func.addParameter(name);
+				// Put parameter name to AJAX.Submit parameter, with default value.
+				JSReference reference = new JSReference(name);
+				if (null != parameter.getValue()) {
+					reference = new JSReference(name + "||"
+							+ ScriptUtils.toScript(parameters.get(name)));
+
+				}
+				// Replace parameter value to reference.
+				parameters.put(name, reference);
+			}
+		}
+		func.addToBody(ajaxFunction.toScript());
+		func.appendScript(script);
+		return script.toString();
+	}
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/renderkit/LoadResourceRendererBase.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/renderkit/LoadResourceRendererBase.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/renderkit/LoadResourceRendererBase.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,93 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.renderkit;
+
+import java.util.LinkedHashSet;
+
+import javax.faces.FacesException;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+
+import org.ajax4jsf.ajax.UIResource;
+import org.ajax4jsf.framework.renderer.HeaderResourceProducer;
+import org.ajax4jsf.framework.renderer.HeaderResourcesRendererBase;
+import org.ajax4jsf.framework.renderer.RendererBase;
+import org.ajax4jsf.framework.resource.InternetResource;
+
+/**
+ * @author shura
+ *
+ */
+public class LoadResourceRendererBase extends RendererBase implements HeaderResourceProducer {
+	
+	private static final String SCRIPT_COMPONENT_FAMILY="org.ajax4jsf.LoadScript";
+	private static final String STYLE_COMPONENT_FAMILY="org.ajax4jsf.LoadStyle";
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.HeaderResourceProducer#getHeaderScripts(javax.faces.context.FacesContext, javax.faces.component.UIComponent)
+	 */
+	public LinkedHashSet getHeaderScripts(FacesContext context, UIComponent component) {
+		UIResource resource = (UIResource) component;
+		if (SCRIPT_COMPONENT_FAMILY.equals(resource.getFamily())) {
+			return getResources(context, resource);
+		}
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.HeaderResourceProducer#getHeaderStyles(javax.faces.context.FacesContext, javax.faces.component.UIComponent)
+	 */
+	public LinkedHashSet getHeaderStyles(FacesContext context, UIComponent component) {
+		UIResource resource = (UIResource) component;
+		if (STYLE_COMPONENT_FAMILY.equals(resource.getFamily())) {
+			return getResources(context, resource);
+		}
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.RendererBase#getComponentClass()
+	 */
+	protected Class getComponentClass() {
+		return UIResource.class;
+	}
+	
+	private LinkedHashSet getResources(FacesContext context, UIResource resource) {
+		Object src = resource.getSrc();
+		if(null == src){
+			throw new FacesException("Source for resource is null for component "+resource.getClientId(context));
+		}
+		LinkedHashSet set = new LinkedHashSet(1);
+		String uri ;
+		if(src instanceof InternetResource){
+			uri=((InternetResource)src).getUri(context, resource);
+		} else {
+			// Process as ordinary url, same as for h:graphicsImage.
+			uri=context.getApplication().getViewHandler().
+            getResourceURL(context, src.toString());
+			uri=context.getExternalContext().encodeResourceURL(uri);
+		}
+		set.add(uri);
+		return set;
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/renderkit/html/AjaxFormRenderer.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/renderkit/html/AjaxFormRenderer.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/renderkit/html/AjaxFormRenderer.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,382 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.renderkit.html;
+
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
+import javax.faces.component.NamingContainer;
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIForm;
+import javax.faces.component.UIViewRoot;
+import javax.faces.component.html.HtmlForm;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+
+import org.ajax4jsf.ajax.UIAjaxForm;
+import org.ajax4jsf.framework.ajax.AjaxEvent;
+import org.ajax4jsf.framework.renderer.AjaxComponentRendererBase;
+import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
+import org.ajax4jsf.framework.renderer.RendererUtils.HTML;
+import org.ajax4jsf.framework.resource.InternetResource;
+import org.ajax4jsf.framework.util.javascript.JSFunction;
+import org.ajax4jsf.framework.util.javascript.JSReference;
+
+/**
+ * @author shura
+ * 
+ */
+public class AjaxFormRenderer extends AjaxComponentRendererBase {
+
+	public static final String FORM_SUBMIT_FUNCTION_NAME = "_JSFFormSubmit";
+
+	public static final String FORM_CLEAR_FUNCTION_NAME = "_clearJSFFormParameters";
+
+	private static final String FORM_HAS_COMMAND_LINK_ATTR = "com.sun.faces.FORM_HAS_COMMAND_LINK_ATTR";
+
+	private static final String NO_COMMAND_LINK_FOUND_VALUE = "com.sun.faces.NO_COMMAND_LINK_FOUND";
+
+	public static final String CONTENT_TYPE_IS_XHTML = "com.sun.faces"
+			+ "ContentTypeIsXHTML";
+
+	public static final String HIDDEN_FIELD_SUFFIX = NamingContainer.SEPARATOR_CHAR
+			+ UIViewRoot.UNIQUE_ID_PREFIX + "cl";
+
+	private static final String HIDDEN_COMMAND_INPUTS_SET_ATTR = UIForm.class
+			.getName()
+			+ ".org.apache.myfaces.HIDDEN_COMMAND_INPUTS_SET";
+
+	private static final String MYFACES_HIDDEN_FIELD_SUFFIX = NamingContainer.SEPARATOR_CHAR
+			+ "_link_hidden_";
+
+	private InternetResource[] _scripts = { getResource("scripts/form.js") };
+
+	private static final String[] exclusions = { "onsubmit" };
+
+	public static final String AJAX_FORM_FUNCTION_NAME = "A4J.AJAX.SubmitForm";
+
+	/*
+	 * (non-Javadoc)
+	 * 	
+	 * @see org.ajax4jsf.framework.renderer.RendererBase#doDecode(javax.faces.context.FacesContext,
+	 *      javax.faces.component.UIComponent)
+	 */
+	protected void doDecode(FacesContext context, UIComponent component) {
+		UIForm form = (UIForm) component;
+		boolean submitted = context.getExternalContext()
+				.getRequestParameterMap().containsKey(
+						component.getClientId(context));
+		form.setSubmitted(submitted);
+		if (component instanceof UIAjaxForm) {
+		    UIAjaxForm ajaxForm = (UIAjaxForm) component;
+			if (submitted && ajaxForm.isAjaxSubmit()) {
+				component.queueEvent(new AjaxEvent(component));
+			}		    
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.renderer.HeaderResourcesRendererBase#getScripts()
+	 */
+	protected InternetResource[] getAdditionalScripts() {
+		// TODO Auto-generated method stub
+		return _scripts;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.renderer.RendererBase#doEncodeBegin(javax.faces.context.ResponseWriter,
+	 *      javax.faces.context.FacesContext, javax.faces.component.UIComponent)
+	 */
+	protected void doEncodeBegin(ResponseWriter writer, FacesContext context,
+			UIComponent component) throws IOException {
+		String clientId = component.getClientId(context);
+		writer.startElement(HTML.FORM_ELEMENT, component);
+		writer.writeAttribute(HTML.id_ATTRIBUTE, clientId, null);
+		writer.writeAttribute(HTML.NAME_ATTRIBUTE, clientId, null);
+		writer.writeAttribute(HTML.METHOD_ATTRIBUTE, "post", null);
+		getUtils().encodeAttribute(context, component, "style");
+		getUtils().encodeAttribute(context, component, "class");
+		getUtils().encodePassThru(context, component);
+		context.getExternalContext().getRequestMap().put(
+				FORM_HAS_COMMAND_LINK_ATTR, clientId);
+		if (component instanceof UIAjaxForm) {
+			UIAjaxForm form = (UIAjaxForm) component;
+			if (form.isAjaxSubmit()) {
+				StringBuffer onSubmit = new StringBuffer("javascript:");
+				JSFunction ajaxFunction = AjaxRendererUtils.buildAjaxFunction(
+						component, context,
+						AJAX_FORM_FUNCTION_NAME);
+				ajaxFunction.addParameter(AjaxRendererUtils.buildEventOptions(
+						context, component));
+				ajaxFunction.appendScript(onSubmit);
+				writer.writeURIAttribute("action", onSubmit, "action");
+			} else {
+				encodeSubmitAction(writer, context);
+			}
+		} else {
+			encodeSubmitAction(writer, context);
+		}
+	}
+
+	/**
+	 * @param writer
+	 * @param context
+	 * @throws IOException
+	 */
+	private void encodeSubmitAction(ResponseWriter writer, FacesContext context)
+			throws IOException {
+		String actionURL = getUtils().getActionUrl(context);
+		String encodedActionURL = context.getExternalContext().encodeActionURL(
+				actionURL);
+		writer.writeURIAttribute("action", encodedActionURL, "action");
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.renderer.RendererBase#doEncodeEnd(javax.faces.context.ResponseWriter,
+	 *      javax.faces.context.FacesContext, javax.faces.component.UIComponent)
+	 */
+	protected void doEncodeEnd(ResponseWriter writer, FacesContext context,
+			UIComponent component) throws IOException {
+		// Encode form submitting flag hidden field.
+		String clientId = component.getClientId(context);
+		renderHiddenInputField(writer, clientId, clientId);
+		renderHiddenInputField(writer, "autoScroll", null);
+		// MyFaces compability - render hidden field and Script.
+		// render hidden command inputs
+		Set hiddenFields = new HashSet();
+		hiddenFields.add(clientId + HIDDEN_FIELD_SUFFIX);
+		hiddenFields.add(clientId + MYFACES_HIDDEN_FIELD_SUFFIX);
+		Set set = (Set) component.getAttributes().get(
+				HIDDEN_COMMAND_INPUTS_SET_ATTR);
+		if (set != null) {
+			hiddenFields.addAll(set);
+		}
+		set = (Set) context.getExternalContext().getRequestMap().get(
+				getHiddenCommandInputsSetName(context, component));
+		if (set != null) {
+			hiddenFields.addAll(set);
+		}
+		renderHiddenCommandFormParams(writer, hiddenFields);
+		String target;
+		if (component instanceof HtmlForm) {
+			target = ((HtmlForm) component).getTarget();
+		} else {
+			target = (String) component.getAttributes().get(
+					HTML.target_ATTRIBUTE);
+		}
+		renderClearHiddenCommandFormParamsFunction(writer, clientId, hiddenFields, target);
+		// Script
+		if (component instanceof UIAjaxForm) {
+			UIAjaxForm form = (UIAjaxForm) component;
+			if (form.isAjaxSubmit()) {
+				renderAjaxFormSetupScript(writer, clientId);
+			}
+		}
+		// writeFormSubmitScript(context, writer);
+		getUtils().encodeEndForm(context, writer);
+		context.getExternalContext().getRequestMap().put(
+				FORM_HAS_COMMAND_LINK_ATTR, NO_COMMAND_LINK_FOUND_VALUE);
+	}
+
+	private static String getHiddenCommandInputsSetName(
+			FacesContext facesContext, UIComponent form) {
+		StringBuffer buf = new StringBuffer();
+		buf.append(HIDDEN_COMMAND_INPUTS_SET_ATTR);
+		buf.append("_");
+		buf.append(form.getClientId(facesContext));
+		return buf.toString();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.renderer.RendererBase#getComponentClass()
+	 */
+	protected Class getComponentClass() {
+		// TODO Auto-generated method stub
+		return UIForm.class;
+	}
+
+	// For MyFaces compability - create hidden firlds and script. Code got from
+	// project to simulate same functionality.
+	public void renderHiddenCommandFormParams(ResponseWriter writer,
+			Set formParams) throws IOException {
+		for (Iterator it = formParams.iterator(); it.hasNext();) {
+			Object name = it.next();
+			renderHiddenInputField(writer, name, "");
+		}
+	}
+
+	public void renderHiddenInputField(ResponseWriter writer, Object name,
+			Object value) throws IOException {
+		writer.startElement(HTML.INPUT_ELEM, null);
+		writer.writeAttribute(HTML.TYPE_ATTR, HTML.INPUT_TYPE_HIDDEN, null);
+		writer.writeAttribute(HTML.NAME_ATTRIBUTE, name, null);
+		writer.writeAttribute(HTML.value_ATTRIBUTE, value != null?value:"", null);
+		writer.endElement(HTML.INPUT_ELEM);
+	}
+	
+	
+	public void renderAjaxFormSetupScript(ResponseWriter writer, String formName) throws IOException {
+		writer.startElement(HTML.SCRIPT_ELEM, null);
+		writer.writeAttribute(HTML.TYPE_ATTR, "text/javascript", null);
+		writer.writeText("A4J.setupForm('"+formName+"');", null);
+		writer.endElement(HTML.SCRIPT_ELEM);
+	}
+
+	/**
+	 * Render the javascript function that is called on a click on a commandLink
+	 * to clear the hidden inputs. This is necessary because on a browser back,
+	 * each hidden input still has it's old value (browser cache!) and therefore
+	 * a new submit would cause the according action once more!
+	 * 
+	 * @param writer
+	 * @param formName
+	 * @param dummyFormParams
+	 * @param formTarget
+	 * @throws IOException
+	 */
+	public void renderClearHiddenCommandFormParamsFunction(
+			ResponseWriter writer, String formName, Set dummyFormParams,
+			String formTarget) throws IOException {
+		// render the clear hidden inputs javascript function
+		String functionName = getClearHiddenCommandFormParamsFunctionName(formName);
+		writer.startElement(HTML.SCRIPT_ELEM, null);
+		writer.writeAttribute(HTML.TYPE_ATTR, "text/javascript", null);
+
+		// Using writeComment instead of write with <!-- tag
+		StringBuffer script = new StringBuffer();
+		script.append("function ");
+		script.append(functionName);
+		script.append("() {\n");
+		script.append(FORM_CLEAR_FUNCTION_NAME);
+		script.append("('");
+		script.append(formName);
+		script.append("','");
+		if (formTarget != null && formTarget.length() > 0) {
+			script.append(formTarget);
+		}
+		script.append("'");
+		if (dummyFormParams != null) {
+			script.append(",[");
+			for (Iterator it = dummyFormParams.iterator(); it.hasNext();) {
+				script.append('\'');
+				script.append((String) it.next());
+				script.append('\'');
+				if (it.hasNext()) {
+					script.append(',');
+				}
+			}
+			script.append("]");
+		}
+		script.append(");");
+		script.append("\n}");
+		script.append("\n");
+		script.append("function ").append("clearFormHiddenParams_").append(
+				getValidJavascriptName(formName));
+		script.append("(){").append(functionName).append("();}\n");
+		// MyFaces 1.1.5 clear form function name
+		script.append("function ").append("clearFormHiddenParams_").append(
+			formName.replace("-", "$_").replace(':', '_'));
+		script.append("(){").append(functionName).append("();}\n");
+		// Just to be sure we call this clear method on each load.
+		// Otherwise in the case, that someone submits a form by pressing Enter
+		// within a text input, the hidden inputs won't be cleared!
+		script.append(functionName);
+		script.append("();");
+
+		writer.writeText(script.toString(), null);
+		writer.endElement(HTML.SCRIPT_ELEM);
+	}
+
+	/**
+	 * Prefixes the given String with "clear_" and removes special characters
+	 * 
+	 * @param formName
+	 * @return String
+	 */
+	public String getClearHiddenCommandFormParamsFunctionName(String formName) {
+		return "clear_" + getValidJavascriptName(formName);
+	}
+
+	public String getValidJavascriptName(String s) {
+
+		StringBuffer buf = null;
+		for (int i = 0, len = s.length(); i < len; i++) {
+			char c = s.charAt(i);
+
+			if (Character.isLetterOrDigit(c)||c=='_' ) {
+				// allowed char
+				if (buf != null)
+					buf.append(c);
+			} else {
+				if (buf == null) {
+					buf = new StringBuffer(s.length() + 10);
+					buf.append(s.substring(0, i));
+				}
+
+				buf.append('_');
+				if (c < 16) {
+					// pad single hex digit values with '0' on the left
+					buf.append('0');
+				}
+
+				if (c < 128) {
+					// first 128 chars match their byte representation in UTF-8
+					buf.append(Integer.toHexString(c).toUpperCase());
+				} else {
+					byte[] bytes;
+					try {
+						bytes = Character.toString(c).getBytes("UTF-8");
+					} catch (UnsupportedEncodingException e) {
+						throw new RuntimeException(e);
+					}
+
+					for (int j = 0; j < bytes.length; j++) {
+						int intVal = bytes[j];
+						if (intVal < 0) {
+							// intVal will be >= 128
+							intVal = 256 + intVal;
+						} else if (intVal < 16) {
+							// pad single hex digit values with '0' on the left
+							buf.append('0');
+						}
+						buf.append(Integer.toHexString(intVal).toUpperCase());
+					}
+				}
+			}
+
+		}
+
+		return buf == null ? s : buf.toString();
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/renderkit/html/AjaxIncludeRenderer.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/renderkit/html/AjaxIncludeRenderer.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/renderkit/html/AjaxIncludeRenderer.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,97 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.renderkit.html;
+
+import java.io.IOException;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+
+import org.ajax4jsf.ajax.UIInclude;
+import org.ajax4jsf.framework.renderer.RendererBase;
+import org.ajax4jsf.framework.renderer.RendererUtils.HTML;
+
+/**
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/02/01 15:31:25 $
+ * 
+ */
+public class AjaxIncludeRenderer extends RendererBase {
+
+	private final String[] STYLE_ATTRIBUTES = new String[] { "style", "class" };
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.renderer.RendererBase#getComponentClass()
+	 */
+	protected Class getComponentClass() {
+		// TODO Auto-generated method stub
+		return UIInclude.class;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.renderer.RendererBase#doEncodeBegin(javax.faces.context.ResponseWriter,
+	 *      javax.faces.context.FacesContext, javax.faces.component.UIComponent)
+	 */
+	protected void doEncodeBegin(ResponseWriter writer, FacesContext context,
+			UIComponent component) throws IOException {
+		UIInclude panel = (UIInclude) component;
+		if (!UIInclude.LAYOUT_NONE.equals(panel.getLayout())) {
+			writer.startElement(getTag(panel), panel);
+			getUtils().encodeId(context, component);
+			getUtils().encodePassThru(context, component);
+			getUtils().encodeAttributesFromArray(context, component,
+					STYLE_ATTRIBUTES);
+
+		}
+	}
+
+	/**
+	 * @param panel
+	 * @return
+	 */
+	private String getTag(UIInclude panel) {
+		// TODO Auto-generated method stub
+		return UIInclude.LAYOUT_BLOCK.equals(panel.getLayout()) ? HTML.DIV_ELEM
+				: HTML.SPAN_ELEM;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.renderer.RendererBase#doEncodeEnd(javax.faces.context.ResponseWriter,
+	 *      javax.faces.context.FacesContext, javax.faces.component.UIComponent)
+	 */
+	protected void doEncodeEnd(ResponseWriter writer, FacesContext context,
+			UIComponent component) throws IOException {
+		UIInclude panel = (UIInclude) component;
+		if (!UIInclude.LAYOUT_NONE.equals(panel.getLayout())) {
+			writer.endElement(getTag(panel));
+
+		}
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/renderkit/html/AjaxOutputPanelRenderer.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/renderkit/html/AjaxOutputPanelRenderer.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/renderkit/html/AjaxOutputPanelRenderer.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,148 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.renderkit.html;
+
+import java.io.IOException;
+import java.util.Iterator;
+import java.util.Set;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+
+import org.ajax4jsf.ajax.UIAjaxOutputPanel;
+import org.ajax4jsf.framework.ajax.AjaxContext;
+import org.ajax4jsf.framework.renderer.RendererBase;
+import org.ajax4jsf.framework.renderer.RendererUtils.HTML;
+
+
+/**
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/02/01 15:31:27 $
+ *
+ */
+public class AjaxOutputPanelRenderer extends RendererBase {
+	
+	private final String[] STYLE_ATTRIBUTES = new String[]{"style","class"};
+
+	/* (non-Javadoc)
+	 * @see javax.faces.render.Renderer#encodeChildren(javax.faces.context.FacesContext, javax.faces.component.UIComponent)
+	 */
+	public void encodeChildren(FacesContext context, UIComponent component) throws IOException {
+		// 
+		UIAjaxOutputPanel panel = (UIAjaxOutputPanel) component;
+		if ("none".equals(panel.getLayout())) {
+			if (component.getChildCount() > 0) {
+				AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context);
+				boolean ajaxRequest = ajaxContext.isAjaxRequest();
+				Set ajaxRenderedAreas = ajaxContext.getAjaxRenderedAreas();
+				for (Iterator it = component.getChildren().iterator(); it.hasNext();) {
+					UIComponent child = (UIComponent) it.next();
+					String childId = child.getClientId(context);
+					if (child.isRendered()) {
+						renderChild(context, child);						
+					} else {
+						// Render "dummy" span.
+						ResponseWriter out = context.getResponseWriter();
+						out.startElement(HTML.SPAN_ELEM,child);
+						out.writeAttribute(HTML.id_ATTRIBUTE,childId,HTML.id_ATTRIBUTE);
+						out.writeAttribute(HTML.style_ATTRIBUTE,"display: none;","style");
+						out.endElement(HTML.SPAN_ELEM);
+					}
+					// register child as rendered
+					if(ajaxRequest && null != ajaxRenderedAreas) {
+						ajaxRenderedAreas.add(childId);
+					}
+				}
+			}
+			
+		} else {
+			renderChildren(context,component);
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.render.Renderer#getRendersChildren()
+	 */
+	public boolean getRendersChildren() {
+		// TODO Auto-generated method stub
+		return true;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.RendererBase#getComponentClass()
+	 */
+	protected Class getComponentClass() {
+		// TODO Auto-generated method stub
+		return UIAjaxOutputPanel.class;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.RendererBase#doEncodeBegin(javax.faces.context.ResponseWriter, javax.faces.context.FacesContext, javax.faces.component.UIComponent)
+	 */
+	protected void doEncodeBegin(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
+		UIAjaxOutputPanel panel = (UIAjaxOutputPanel) component;
+		if (!"none".equals(panel.getLayout())) {
+			writer.startElement(getTag(panel), panel);
+			getUtils().encodeId(context, component);
+			getUtils().encodePassThru(context, component);
+			getUtils().encodeAttributesFromArray(context,component,STYLE_ATTRIBUTES);
+		}
+	}
+
+	/**
+	 * @param panel
+	 * @return
+	 */
+	private String getTag(UIAjaxOutputPanel panel) {
+		// TODO Auto-generated method stub
+		return "block".equals(panel.getLayout())?HTML.DIV_ELEM:HTML.SPAN_ELEM;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.RendererBase#doEncodeEnd(javax.faces.context.ResponseWriter, javax.faces.context.FacesContext, javax.faces.component.UIComponent)
+	 */
+	protected void doEncodeEnd(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
+		UIAjaxOutputPanel panel = (UIAjaxOutputPanel) component;
+		if (!"none".equals(panel.getLayout())) {
+			writer.endElement(getTag(panel));
+		}
+		if (panel.isKeepTransient()) {
+			markNoTransient(component);
+		}
+	}
+
+	/**
+	 * Set "transient" flag to false for component and all its children ( recursive ).
+	 * @param component
+	 */
+	private void markNoTransient(UIComponent component) {
+		for (Iterator iter = component.getFacetsAndChildren(); iter.hasNext();) {
+			UIComponent element = (UIComponent) iter.next();
+			markNoTransient(element);
+			element.setTransient(false);
+		}
+		
+	}
+
+	
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/renderkit/html/AjaxPageRenderer.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/renderkit/html/AjaxPageRenderer.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/renderkit/html/AjaxPageRenderer.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,228 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.renderkit.html;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Locale;
+import java.util.Map;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+
+import org.ajax4jsf.framework.ajax.AjaxContainer;
+import org.ajax4jsf.framework.ajax.AjaxContext;
+import org.ajax4jsf.framework.ajax.AjaxViewRoot;
+import org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter;
+import org.ajax4jsf.framework.renderer.AjaxContainerRenderer;
+import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
+import org.ajax4jsf.framework.renderer.RendererUtils.HTML;
+
+/**
+ * @author shura
+ * 
+ * Render full Html page for AJAX view. Facet "head" rendered in &lthead&gt; of
+ * page.
+ */
+public class AjaxPageRenderer extends AjaxContainerRenderer {
+
+	public static final String RENDERER_TYPE = "org.ajax4jsf.components.AjaxPageRenderer";
+
+	private static final Map doctypes ;
+
+	static {
+		// Fill doctype, content-type and namespace map for different formats.
+		doctypes = new HashMap();
+		doctypes
+				.put(
+						"html-transitional",
+						new String[] {
+								"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n",
+								"text/html", null });
+		doctypes.put("html", new String[] {
+				"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\"\n"
+						+ "\"http://www.w3.org/TR/html4/strict.dtd\">\n",
+				"text/html", null });
+		doctypes.put("html-frameset", new String[] {
+				"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Frameset//EN\"\n"
+						+ "\"http://www.w3.org/TR/html4/frameset.dtd\">\n",
+				"text/html", null });
+		doctypes
+				.put(
+						"xhtml",
+						new String[] {
+								"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"\n"
+										+ "\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n",
+								"application/xhtml+xml",
+								"http://www.w3.org/1999/xhtml" });
+		doctypes
+				.put(
+						"xhtml-transitional",
+						new String[] {
+								"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n"
+										+ "\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n",
+								"application/xhtml+xml",
+								"http://www.w3.org/1999/xhtml" });
+		doctypes
+				.put(
+						"xhtml-frameset",
+						new String[] {
+								"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Frameset//EN\"\n"
+										+ "\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd\">\n",
+								"application/xhtml+xml",
+								"http://www.w3.org/1999/xhtml" });
+		doctypes.put("html-3.2", new String[] {
+				"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2 Final//EN\">\n",
+				"text/html", null });
+	}
+
+	// private PreparedTemplate pageStyles =
+	// HtmlCompiler.compileResource("com/exadel/vcp/renderers/templates/ajax/page-styles.xml");
+	protected void preEncodeBegin(FacesContext context, UIComponent component)
+			throws IOException {
+		// Scripts must be encoded in component, not before html element
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see javax.faces.render.Renderer#encodeBegin(javax.faces.context.FacesContext,
+	 *      javax.faces.component.UIComponent)
+	 */
+	public void doEncodeBegin(ResponseWriter out, FacesContext context,
+			UIComponent component) throws IOException {
+		AjaxContainer ajax = (AjaxContainer) component;
+		// ServletResponse response = (ServletResponse)
+		// context.getExternalContext().getResponse();
+		Map attributes = component.getAttributes();
+		String format = (String) attributes.get("format");
+		String contentType = null;
+		String namespace = null;
+		// String characterEncoding = out.getCharacterEncoding();
+		if (null != format) {
+			String[] docType = (String[]) doctypes.get(format);
+			if (null != docType) {
+				contentType = docType[1];
+				namespace = docType[2];
+				out.write(docType[0]);
+			}
+		}
+		if (null == contentType) {
+			contentType = (String) attributes.get("contentType");
+		}
+		if (null != contentType) {
+			// response.setContentType(contentType /*+ ";charset=" +
+			// characterEncoding*/);
+		}
+		// TODO - create "format" attribute and insert properly DOCTYPE
+		// declaratiom
+		out.startElement("html", component);
+		if (null == namespace) {
+			namespace = (String) attributes.get("namespace");
+		}
+		if (null != namespace) {
+			out.writeAttribute("xmlns", namespace, "namespace");
+		}
+		// TODO - html attributes. lang - from current locale ?
+		Locale locale = context.getViewRoot().getLocale();
+		out.writeAttribute(HTML.lang_ATTRIBUTE, locale.toString(), "lang");
+		if (!AjaxContext.getCurrentInstance(context).isAjaxRequest(context)) {
+			out.startElement("head", component);
+			// Out title - requied html element.
+			Object title = attributes.get("pageTitle");
+			String viewId = context.getViewRoot().getViewId();
+			if (null == title) {
+				title = viewId;// use viewId for empty title
+			}
+			out.startElement(HTML.title_ELEM, component);
+			out.writeText(title, "pageTitle");
+			out.endElement(HTML.title_ELEM);
+			// Page base - set to current view action url.
+			// String pageBase =
+			// context.getApplication().getViewHandler().getActionURL(context,
+			// viewId);
+			// out.startElement("base", component);
+			// out.writeURIAttribute("href", pageBase, "pageBase");
+			// out.endElement("base");
+			// pageStyles.encode(this, context, component);
+			UIComponent headFacet = component.getFacet("head");
+			if (headFacet != null) {
+				// context.getExternalContext().log("Render head facet in AJAX
+				// Page");
+				renderChild(context, headFacet);
+			}
+			if (null != contentType) {
+				out.startElement("meta", component);
+				out.writeAttribute("http-equiv", "Content-Type", null);
+				out.writeAttribute("content",
+						contentType /* + ";charset=" + characterEncoding */,
+						null);
+				out.endElement("meta");
+			}
+			if ((null == context.getExternalContext().getRequestMap().get(
+					BaseFilter.RESPONSE_WRAPPER_ATTRIBUTE))) {
+				// Filter not used - encode scripts and CSS before component.
+				encodeResourcesArray(context, component, getScripts());
+				encodeResourcesArray(context, component, getStyles());
+			}
+			out.endElement("head");
+		}
+		out.startElement("body", component);
+		getUtils().encodePassThru(context, component);
+		getUtils().encodeAttributesFromArray(context, component,
+				HTML.PASS_THRU_STYLES);
+		// TODO - special body attributes :
+		getUtils().encodeAttribute(context, component, "onload");
+		getUtils().encodeAttribute(context, component, "onunload");
+		// onload, onunload
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see javax.faces.render.Renderer#encodeEnd(javax.faces.context.FacesContext,
+	 *      javax.faces.component.UIComponent)
+	 */
+	public void doEncodeEnd(ResponseWriter out, FacesContext context,
+			UIComponent component) throws IOException {
+		out.endElement("body");
+		out.endElement("html");
+		// DebugUtils.traceView("ViewRoot in AJAX Page encode end");
+	}
+
+	/*
+	 * (non-Javadoc) For ajax requests, ViewRoot render childrens directly.
+	 * 
+	 * @see org.ajax4jsf.framework.renderer.AjaxContainerRenderer#getRendersChildren()
+	 */
+	public boolean getRendersChildren() {
+		FacesContext context = FacesContext.getCurrentInstance();
+		if (AjaxContext.getCurrentInstance(context).isAjaxRequest(context)) {
+			// Ajax Request. Control all output.
+			return true;
+		}
+		// For non Ajax request, view root not render children
+		return false;
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/renderkit/html/AjaxPollRenderer.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/renderkit/html/AjaxPollRenderer.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/renderkit/html/AjaxPollRenderer.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,100 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.renderkit.html;
+
+import java.io.IOException;
+import java.util.Map;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+
+import org.ajax4jsf.ajax.UIPoll;
+import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
+import org.ajax4jsf.framework.renderer.RendererUtils.HTML;
+import org.ajax4jsf.framework.util.javascript.JSFunction;
+import org.ajax4jsf.framework.util.javascript.JSFunctionDefinition;
+import org.ajax4jsf.renderkit.AjaxCommandRendererBase;
+
+/**
+ * @author shura
+ *
+ */
+public class AjaxPollRenderer extends AjaxCommandRendererBase {
+	
+	
+
+	private static final String AJAX_POLL_FUNCTION = "A4J.AJAX.Poll";
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.RendererBase#doEncodeEnd(javax.faces.context.ResponseWriter, javax.faces.context.FacesContext, javax.faces.component.UIComponent)
+	 */
+	protected void doEncodeEnd(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
+		UIPoll poll = (UIPoll) component;
+		writer.startElement(HTML.SPAN_ELEM, component);
+		writer.writeAttribute(HTML.style_ATTRIBUTE, "display:none;", null);
+		getUtils().encodeId(context, component);
+			// polling script.
+				writer.startElement(HTML.SCRIPT_ELEM, component);
+				writer.writeAttribute(HTML.TYPE_ATTR, "text/javascript", null);
+				StringBuffer script = new StringBuffer("\n");
+				if(poll.isEnabled()){
+				JSFunction function = AjaxRendererUtils.buildAjaxFunction(component, context, AJAX_POLL_FUNCTION);
+				Map options = AjaxRendererUtils.buildEventOptions(context, component);
+				Integer interval = new Integer(poll.getInterval());
+				options.put("pollinterval", interval);
+				options.put("pollId", component.getClientId(context));
+				Object onsubmit = component.getAttributes().get("onsubmit");
+				if (null != onsubmit) {
+					JSFunctionDefinition onsubmitFunction = new JSFunctionDefinition();
+					onsubmitFunction.addToBody(onsubmit);
+					options.put("onsubmit", onsubmitFunction);
+				}
+
+//				options.put("timeout", interval);
+				function.addParameter(options);
+				function.appendScript(script);
+				} else {
+					script.append("A4J.AJAX.StopPoll('").append(component.getClientId(context)).append("')");
+				}
+				script.append(";\n");
+				writer.writeText(script.toString(),null);
+				writer.endElement(HTML.SCRIPT_ELEM);				
+		writer.endElement(HTML.SPAN_ELEM);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.RendererBase#getComponentClass()
+	 */
+	protected Class getComponentClass() {
+		// only poll component is allowed.
+		return UIPoll.class;
+	}
+	
+	protected boolean isSubmitted(FacesContext facesContext, UIComponent uiComponent) {
+		boolean submitted = super.isSubmitted(facesContext, uiComponent);
+		UIPoll poll = (UIPoll) uiComponent;
+		poll.setSubmitted(submitted);
+		return submitted;
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/renderkit/html/AjaxPushRenderer.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/renderkit/html/AjaxPushRenderer.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/renderkit/html/AjaxPushRenderer.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,118 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.renderkit.html;
+
+import java.io.IOException;
+import java.util.Map;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+
+import org.ajax4jsf.ajax.UIPush;
+import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
+import org.ajax4jsf.framework.renderer.RendererUtils;
+import org.ajax4jsf.framework.renderer.RendererUtils.HTML;
+import org.ajax4jsf.framework.util.javascript.JSFunction;
+import org.ajax4jsf.framework.util.javascript.JSReference;
+import org.ajax4jsf.renderkit.AjaxCommandRendererBase;
+
+/**
+ * @author shura
+ *
+ */
+public class AjaxPushRenderer extends AjaxCommandRendererBase {
+	
+	public static final String PUSH_INTERVAL_PARAMETER = "A4J.AJAX.Push.INTERVAL";
+
+	public static final String PUSH_WAIT_PARAMETER = "A4J.AJAX.Push.WAIT";
+
+	public static final String PUSH_URL_PARAMETER = "A4J.AJAX.Push.URL";
+
+	public static final int DEFAULT_PUSH_INTERVAL = 1000;
+
+	public static final int DEFAULT_PUSH_WAIT = Integer.MIN_VALUE;
+	
+	private static final String AJAX_PUSH_FUNCTION = "A4J.AJAX.Push";
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.RendererBase#doEncodeEnd(javax.faces.context.ResponseWriter, javax.faces.context.FacesContext, javax.faces.component.UIComponent)
+	 */
+	protected void doEncodeEnd(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
+		UIPush push = (UIPush) component;
+		writer.startElement(HTML.SPAN_ELEM, component);
+		writer.writeAttribute(HTML.style_ATTRIBUTE, "display:none;", null);
+		getUtils().encodeId(context, component);
+		getUtils().encodeBeginFormIfNessesary(context, component);
+			// pushing script.
+				writer.startElement(HTML.SCRIPT_ELEM, component);
+				writer.writeAttribute(HTML.TYPE_ATTR, "text/javascript", null);
+				StringBuffer script = new StringBuffer("\n");
+				if(push.isEnabled()){
+				JSFunction function = AjaxRendererUtils.buildAjaxFunction(component, context, AJAX_PUSH_FUNCTION);
+				// Set dummy form id, if nessesary.
+				Map options = AjaxRendererUtils.buildEventOptions(context, component);
+				options.put("dummyForm", component.getClientId(context)+RendererUtils.DUMMY_FORM_ID);
+				int interval = push.getInterval();
+				if(interval == Integer.MIN_VALUE){
+				    String intervalInitParameter = context.getExternalContext().getInitParameter(PUSH_INTERVAL_PARAMETER);
+				    if(null != intervalInitParameter){
+					interval = Integer.parseInt(intervalInitParameter);
+				    } else {
+					interval = DEFAULT_PUSH_INTERVAL;
+				    }
+				}
+				options.put("pushinterval", new Integer(interval));
+				options.put("pushId", push.getListenerId(context));
+				String pushUrl = context.getExternalContext().getInitParameter(PUSH_URL_PARAMETER);
+				if(null != pushUrl){
+				    options.put("pushUrl", pushUrl);
+				}
+				//				options.put("timeout", interval);
+				function.addParameter(options);
+				function.appendScript(script);
+				} else {
+					script.append("A4J.AJAX.StopPush('").append(push.getListenerId(context)).append("')");
+				}
+				script.append(";\n");
+				writer.writeText(script.toString(),null);
+				writer.endElement(HTML.SCRIPT_ELEM);
+		getUtils().encodeEndFormIfNessesary(context, component);
+		writer.endElement(HTML.SPAN_ELEM);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.RendererBase#getComponentClass()
+	 */
+	protected Class getComponentClass() {
+		// only push component is allowed.
+		return UIPush.class;
+	}
+	
+	protected boolean isSubmitted(FacesContext facesContext, UIComponent uiComponent) {
+		boolean submitted = super.isSubmitted(facesContext, uiComponent);
+		UIPush push = (UIPush) uiComponent;
+		push.setSubmitted(submitted);
+		return submitted;
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/renderkit/html/AjaxRegionRenderer.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/renderkit/html/AjaxRegionRenderer.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/renderkit/html/AjaxRegionRenderer.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,58 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.renderkit.html;
+
+import java.io.IOException;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+
+import org.ajax4jsf.framework.renderer.AjaxContainerRenderer;
+
+
+/**
+ * @author asmirnov at exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/02/01 15:31:28 $
+ *
+ */
+public class AjaxRegionRenderer extends AjaxContainerRenderer {
+	
+    public static final String RENDERER_TYPE = "org.ajax4jsf.components.AjaxRegionRenderer";
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.RendererBase#doEncodeBegin(javax.faces.context.ResponseWriter, javax.faces.context.FacesContext, javax.faces.component.UIComponent)
+	 */
+	protected void doEncodeBegin(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
+//		AjaxRendererUtils.encodeClientScript(context,component);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.RendererBase#doEncodeEnd(javax.faces.context.ResponseWriter, javax.faces.context.FacesContext, javax.faces.component.UIComponent)
+	 */
+	protected void doEncodeEnd(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
+//        if (((AjaxContainer) component).isAjaxRequest()) {
+//			AjaxRendererUtils.encodeAreas(context,component);
+//		}
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/renderkit/html/AjaxStatusRenderer.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/renderkit/html/AjaxStatusRenderer.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/renderkit/html/AjaxStatusRenderer.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,167 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.renderkit.html;
+
+import java.io.IOException;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+
+import org.ajax4jsf.ajax.UIAjaxStatus;
+import org.ajax4jsf.framework.renderer.RendererBase;
+import org.ajax4jsf.framework.renderer.RendererUtils.HTML;
+import org.ajax4jsf.framework.util.javascript.JSFunctionDefinition;
+
+
+/**
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.2 $ $Date: 2007/02/19 11:17:10 $
+ *
+ * Render status component as two span's, one for start request,
+ * one for complete.
+ */
+public class AjaxStatusRenderer extends RendererBase
+{
+    /**
+     *
+     */
+    public static final String RENDERER_TYPE = "org.ajax4jsf.components.AjaxStatusRenderer";
+    
+    /**
+     *
+     */
+    public static final String START_STYLE = "display: none";
+
+    /* (non-Javadoc)
+     * @see javax.faces.render.Renderer#encodeEnd(javax.faces.context.FacesContext, javax.faces.component.UIComponent)
+     */
+    public void doEncodeEnd(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException
+    {
+        // find form clientId for wich we render status.
+        String statusId = component.getClientId(context);
+    	String tag = getTag(component);
+        writer.startElement(tag, component);
+		writer.writeAttribute(HTML.id_ATTRIBUTE, statusId , null);
+        // render 2 span components for different states
+        encodeSpan(writer, context, component,statusId, "start", tag);
+        encodeSpan(writer, context, component,statusId, "stop", tag);
+        writer.endElement(tag);
+    }
+    
+    /**
+     * Encode one span for start or stop status
+     * @param context - current context
+     * @param component - status component
+     * @param state - name of state ( start or stop ) for span.
+     * @param tag TODO
+     * @throws IOException 
+     */
+    protected void encodeSpan(ResponseWriter writer, FacesContext context, UIComponent component, String id, String state, String tag) throws IOException {
+        writer.startElement(tag, component);
+        String spanId = id+"."+state;
+		writer.writeAttribute(HTML.id_ATTRIBUTE, spanId , null);
+        // Styles for concrete state.
+        String style = getNamedAttribute(component, "Style", state);
+        // for start state rendered style always disable display of status 
+        // ( since it will enabled by JavaScript on start request ) 
+        if("start".equals(state)) {
+            if(null == style) {
+                style = START_STYLE;
+            } else {
+                style += "; "+START_STYLE;
+            }
+        }
+//        HtmlRendererUtils.renderHTMLAttribute(writer, "style", "style", style );
+//        HtmlRendererUtils.renderHTMLAttribute(writer, "styleClass", "styleClass", getNamedAttribute(component, "StyleClass", state));
+        if (null != style) {
+			writer.writeAttribute("style", style, null);
+		}
+        String styleClass = getNamedAttribute(component, "StyleClass", state);
+        if(null != styleClass){
+			writer.writeAttribute("class", styleClass, null);        	
+        }
+//        getUtils().encodeAttribute(context,component,"class");
+        getUtils().encodePassThru(context , component);
+        // render facet or text.
+        UIComponent facet = component.getFacet(state);
+        if(null != facet) {
+            renderChild(context, facet);
+        } else {
+            String namedAttribute = getNamedAttribute(component, "Text", state);
+			if (null != namedAttribute) {
+				writer.writeText(namedAttribute, "text");
+			} 
+//			else {
+//				throw new FacesException("Status component must have one of '"+state+"' facet or '"+state+"Text' atribute");
+//			}
+        }
+        writer.endElement(tag);
+        // ENCODE onstart/onstop javaScript.
+        Object eventHandler = component.getAttributes().get("on"+state);
+        if(null != eventHandler){
+        	StringBuffer script = new StringBuffer("\n");
+        	script.append("window.document.getElementById('").append(spanId).append("').on").append(state).append("=");
+        	JSFunctionDefinition function = new JSFunctionDefinition();
+        	function.addToBody(eventHandler).addToBody(";").appendScript(script);
+        	script.append(";\n");
+        	getUtils().writeScript(context, component, script);
+        }
+    }
+    
+    /**
+     * @param component 
+     * @param name name of attribute for current state
+     * @param state 'start' or 'stop' . all dublicated attributes foe Ajax state
+     * have same syntax : startStyle/stopStyle ...
+     * @return value of attribute for name and state
+     */
+    protected String getNamedAttribute(UIComponent component, String name, String state)
+    {
+        String fullName = (new StringBuffer(state).append(name)).toString();
+        return (String) component.getAttributes().get(fullName);
+    }
+
+	protected Class getComponentClass() {
+		// TODO Auto-generated method stub
+		return UIAjaxStatus.class;
+	}
+
+	/**
+	 * @param status
+	 * @return
+	 */
+	private String getTag(UIComponent status) {
+		// TODO Auto-generated method stub
+		return "block".equals(status.getAttributes().get("layout"))?HTML.DIV_ELEM:HTML.SPAN_ELEM;
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.render.Renderer#getRendersChildren()
+	 */
+	public boolean getRendersChildren() {
+		// TODO Auto-generated method stub
+		return true;
+	}
+	
+	
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/renderkit/html/AjaxSupportRenderer.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/renderkit/html/AjaxSupportRenderer.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/renderkit/html/AjaxSupportRenderer.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,57 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.renderkit.html;
+
+import org.ajax4jsf.renderkit.AjaxCommandRendererBase;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+
+
+/**
+ * Since <code>UIAjaxRegion</code> dont render itself ( only set apropriate event to parent component )
+ * only <code>decode()</code> method implemented.
+ * In case of Ajax Request caused by event for a given component
+ * send action event.
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/02/01 15:31:24 $
+ *
+ */
+public class AjaxSupportRenderer extends AjaxCommandRendererBase
+{
+    private static final Log log = LogFactory.getLog(AjaxSupportRenderer.class);
+
+    /* (non-Javadoc)
+     * @see javax.faces.render.Renderer#getRendersChildren()
+     */
+    public boolean getRendersChildren()
+    {
+        
+        return false;
+    }
+
+	protected Class getComponentClass() {
+		// TODO Auto-generated method stub
+		return org.ajax4jsf.ajax.UIAjaxSupport.class;
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/renderkit/html/HtmlCommandLinkRenderer.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/renderkit/html/HtmlCommandLinkRenderer.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/renderkit/html/HtmlCommandLinkRenderer.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,212 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.renderkit.html;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import javax.faces.component.UICommand;
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIForm;
+import javax.faces.component.UIParameter;
+import javax.faces.component.ValueHolder;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+import javax.faces.event.ActionEvent;
+
+import org.ajax4jsf.framework.renderer.RendererBase;
+import org.ajax4jsf.framework.renderer.RendererUtils.HTML;
+import org.ajax4jsf.framework.util.javascript.JSFunction;
+import org.ajax4jsf.framework.util.message.Messages;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * "Wrapped" standard {@link javax.faces.component.html.HtmlCommandLink} renderer,
+ * to avoid common problem - If no commandLink's exist in initial rendered page, {@link javax.faces.component.html.HtmlForm} renderer
+ * don't encode nessesary hidden fields for link and it's param. Our form-link renderer can avoid this problem.
+ * @author shura
+ *
+ */
+public class HtmlCommandLinkRenderer extends RendererBase {
+
+	private static final Log _log = LogFactory.getLog(HtmlCommandLinkRenderer.class);
+	
+	private static final String[] LINK_EXCLUSIONS = {"onclick","target","href"};
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.RendererBase#doDecode(javax.faces.context.FacesContext, javax.faces.component.UIComponent)
+	 */
+	protected void doDecode(FacesContext context, UIComponent component) {
+		UIForm form = getUtils().getNestingForm(context,component);
+		if(null != form){
+			String hiddenFieldId = form.getClientId(context)+AjaxFormRenderer.HIDDEN_FIELD_SUFFIX;
+			Object hiddenFieldValue;
+			if(null != (hiddenFieldValue=context.getExternalContext().getRequestParameterMap().get(hiddenFieldId))){
+				if(component.getClientId(context).equals(hiddenFieldValue)){
+					// Link submitted !
+					if(_log.isDebugEnabled()){
+						_log.debug(Messages.getMessage(Messages.COMMAND_LINK_SUBMIT_INFO, component.getClientId(context)));
+					}
+			        ActionEvent actionEvent = new ActionEvent(component);
+			        component.queueEvent(actionEvent);
+				}
+			}
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.RendererBase#doEncodeBegin(javax.faces.context.ResponseWriter, javax.faces.context.FacesContext, javax.faces.component.UIComponent)
+	 */
+	protected void doEncodeBegin(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
+		if(isDisabled(context,component)){
+			doEncodePassiveBegin(writer, context, component);
+		} else {
+			doEncodeActiveBegin(writer, context, component);
+		}
+	}
+
+	protected void doEncodeActiveBegin(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException{
+		writer.startElement(HTML.a_ELEMENT,component);
+		getUtils().encodeId(context,component);
+		getUtils().encodeAttributesFromArray(context,component,HTML.PASS_THRU_STYLES);
+		getUtils().encodePassThruWithExclusionsArray(context,component,LINK_EXCLUSIONS);
+		writer.writeAttribute("href","#",null);
+		UIForm form = getUtils().getNestingForm(context,component);
+		String clientId = component.getClientId(context);
+		if(null == form){
+			if(_log.isWarnEnabled()){
+				_log.warn(Messages.getMessage(Messages.COMMAND_LINK_NOT_IN_FORM_WARNING, clientId));
+			}
+			return;
+		}
+		// Encode onclick attribute.
+		Object click = component.getAttributes().get("onclick");
+		StringBuffer onclick = new StringBuffer(256);
+		if(null != click){
+			onclick.append(click).append(';');
+		}
+		JSFunction submit = new JSFunction(AjaxFormRenderer.FORM_SUBMIT_FUNCTION_NAME);
+		submit.addParameter(clientId);
+		submit.addParameter(form.getClientId(context));
+		submit.addParameter(component.getAttributes().get("target"));
+		Map parameters = new HashMap();
+		for (Iterator iter = component.getChildren().iterator(); iter.hasNext();) {
+			Object child =  iter.next();
+			if (child instanceof UIParameter) {
+				UIParameter param = (UIParameter) child;
+				parameters.put(param.getName(),param.getValue());
+			}
+		}
+		submit.addParameter(parameters);
+		onclick.append("return ");
+		submit.appendScript(onclick);
+		writer.writeAttribute(HTML.onclick_ATTRIBUTE,onclick,"onclick");
+		// 
+		encodeValue(writer,context,component);
+	}
+
+	protected void doEncodePassiveBegin(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException{
+		writer.startElement(HTML.SPAN_ELEM,component);
+		getUtils().encodeId(context,component);
+		getUtils().encodeAttributesFromArray(context,component,HTML.PASS_THRU_STYLES);
+		getUtils().encodePassThru(context,component);
+		encodeValue(writer,context,component);
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.faces.render.Renderer#encodeChildren(javax.faces.context.FacesContext, javax.faces.component.UIComponent)
+	 */
+	public void encodeChildren(FacesContext context, UIComponent component) throws IOException {
+		// TODO Auto-generated method stub
+		renderChildren(context,component);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.RendererBase#doEncodeEnd(javax.faces.context.ResponseWriter, javax.faces.context.FacesContext, javax.faces.component.UIComponent)
+	 */
+	protected void doEncodeEnd(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
+		if(isDisabled(context,component)){
+			doEncodePassiveEnd(writer, context, component);
+		} else {
+			doEncodeActiveEnd(writer, context, component);
+		}
+	}
+
+	protected void doEncodeActiveEnd(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException{
+		writer.endElement(HTML.a_ELEMENT);
+	}
+
+	protected void doEncodePassiveEnd(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException{
+		writer.endElement(HTML.SPAN_ELEM);
+	}
+
+/**
+ * Check for disabled component
+ * @param context
+ * @param command
+ * @return true if link is disabled.
+ */
+private boolean isDisabled(FacesContext context, UIComponent command){
+    if (command.getAttributes().get("disabled") != null) {
+        if ((command.getAttributes().get("disabled")).equals(Boolean.TRUE)) {
+            return true;
+        }
+    }
+    return false;
+}
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.RendererBase#getComponentClass()
+	 */
+	protected Class getComponentClass() {
+		// TODO Auto-generated method stub
+		return UICommand.class;
+	}
+
+    /* (non-Javadoc)
+     * @see javax.faces.render.Renderer#getRendersChildren()
+     */
+    public boolean getRendersChildren() {
+        return true;
+    }
+
+    protected void encodeValue(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException{
+        String valueString = null;
+        if (component instanceof UICommand) {
+            Object value = ((UICommand) component).getValue();
+            if (value != null) {
+                valueString = value.toString();
+            }
+        } else if (component instanceof ValueHolder) {
+            Object value = ((ValueHolder) component).getValue();
+            if (value != null) {
+                valueString = getUtils().formatValue(context,component,value);
+            }
+        }
+        	
+            if (null != valueString && valueString.length()>0) {
+				writer.write(valueString);
+			}
+        }
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/renderkit/html/MediaOutputRenderer.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/renderkit/html/MediaOutputRenderer.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/renderkit/html/MediaOutputRenderer.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,134 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.renderkit.html;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import javax.faces.FacesException;
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIParameter;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+
+import org.ajax4jsf.ajax.resource.UIMediaOutput;
+import org.ajax4jsf.framework.renderer.RendererBase;
+import org.ajax4jsf.framework.renderer.RendererUtils.HTML;
+import org.ajax4jsf.framework.resource.InternetResource;
+import org.ajax4jsf.framework.resource.InternetResourceBuilder;
+import org.ajax4jsf.framework.util.message.Messages;
+
+/**
+ * @author shura
+ *
+ */
+public class MediaOutputRenderer extends RendererBase {
+	
+    public static final String RENDERER_TYPE = "org.ajax4jsf.MMediaRenderer";
+    
+    /**
+     * Associationd between element name and uri attributes
+     */
+    private static final Map uriAttributes;
+    
+    static {
+    	uriAttributes = new HashMap();
+    	uriAttributes.put("a","href");
+    	uriAttributes.put("img","src");
+    	uriAttributes.put("object","data");
+    	uriAttributes.put("link","href");
+    }
+
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.RendererBase#doEncodeEnd(javax.faces.context.ResponseWriter, javax.faces.context.FacesContext, javax.faces.component.UIComponent)
+	 */
+	protected void doEncodeEnd(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
+		UIMediaOutput mmedia = (UIMediaOutput) component;
+		String element = mmedia.getElement();
+		if(null == element){
+			throw new FacesException(Messages.getMessage(Messages.NULL_ATTRIBUTE_ERROR,"element",component.getClientId(context)));
+		}
+		writer.endElement(element);
+	}
+
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.RendererBase#getComponentClass()
+	 */
+	protected Class getComponentClass() {
+		// TODO Auto-generated method stub
+		return UIMediaOutput.class;
+	}
+
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.framework.renderer.RendererBase#doEncodeBegin(javax.faces.context.ResponseWriter, javax.faces.context.FacesContext, javax.faces.component.UIComponent)
+	 */
+	protected void doEncodeBegin(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
+		UIMediaOutput mmedia = (UIMediaOutput) component;
+		String element = mmedia.getElement();
+		if(null == element){
+			throw new FacesException(Messages.getMessage(Messages.NULL_ATTRIBUTE_ERROR,"element",component.getClientId(context)));
+		}
+		String uriAttribute = mmedia.getUriAttribute();
+		// Check for pre-defined attributes
+		if(null == uriAttribute){
+			uriAttribute = (String) uriAttributes.get(element);
+			if(null == uriAttribute){
+				throw new FacesException(Messages.getMessage(Messages.NULL_ATTRIBUTE_ERROR,"uriAttribute",component.getClientId(context)));
+			}
+		}
+		writer.startElement(element,mmedia);
+		getUtils().encodeId(context,component);
+		InternetResourceBuilder internetResourceBuilder = InternetResourceBuilder.getInstance();
+		InternetResource resource = internetResourceBuilder.createUserResource(mmedia.isCacheable(),mmedia.isSession(),mmedia.getMimeType());
+		StringBuffer uri = new StringBuffer(resource.getUri(context,mmedia));
+		// Append parameters to resource Uri
+		boolean haveQestion = uri.indexOf("?")>=0;
+        Iterator kids = component.getChildren().iterator();
+        while (kids.hasNext()) {
+            UIComponent kid = (UIComponent) kids.next();
+
+            if (kid instanceof UIParameter) {
+                UIParameter uiParam = (UIParameter) kid;
+                String name = uiParam.getName();
+                Object value = uiParam.getValue();
+                if(null != value){
+                	if(haveQestion){
+                		uri.append('&');
+                	} else {
+						uri.append('?');
+						haveQestion = true;
+					}
+                	uri.append(name).append('=').append(value.toString());
+                }
+            }
+        }
+		writer.writeURIAttribute(uriAttribute,uri,"uri");
+        getUtils().encodeAttributesFromArray(context,component,HTML.PASS_THRU_STYLES);
+		getUtils().encodePassThru(context,mmedia);
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/renderkit/html/RepeatRenderer.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/renderkit/html/RepeatRenderer.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/renderkit/html/RepeatRenderer.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,81 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.renderkit.html;
+
+import java.io.IOException;
+import java.util.ListIterator;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+
+import org.ajax4jsf.ajax.repeat.DataVisitor;
+import org.ajax4jsf.ajax.repeat.UIRepeat;
+import org.ajax4jsf.framework.renderer.RendererBase;
+
+/**
+ * @author shura
+ * 
+ */
+public class RepeatRenderer extends RendererBase {
+
+	public void encodeChildren(FacesContext context, UIComponent component)
+			throws IOException {
+		final UIRepeat repeater = (UIRepeat) component;
+		repeater.captureOrigValue(context);
+		try {
+			DataVisitor visitor = new DataVisitor() {
+
+				public void process(FacesContext context, Object rowKey, Object argument) throws IOException {
+					repeater.setRowKey(rowKey);
+					ListIterator childIterator = repeater.getChildren()
+							.listIterator();
+					while (childIterator.hasNext()) {
+						UIComponent child = (UIComponent) childIterator.next();
+						renderChild(context, child);
+					}
+
+				}
+
+			};
+			repeater.walk(context, visitor, null);
+
+		} finally {
+			repeater.restoreOrigValue(context);
+			repeater.setRowKey(null);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.renderer.RendererBase#getComponentClass()
+	 */
+	protected Class getComponentClass() {
+		// TODO Auto-generated method stub
+		return UIRepeat.class;
+	}
+
+	public boolean getRendersChildren() {
+		return true;
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/facelets/ActionParamHandler.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/facelets/ActionParamHandler.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/facelets/ActionParamHandler.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,178 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.taglib.html.facelets;
+
+import javax.faces.application.Application;
+import javax.faces.component.ActionSource;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.convert.Converter;
+
+import org.ajax4jsf.ajax.UIActionParameter;
+import org.ajax4jsf.framework.util.message.Messages;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.el.LegacyValueBinding;
+import com.sun.facelets.tag.MetaRule;
+import com.sun.facelets.tag.MetaRuleset;
+import com.sun.facelets.tag.Metadata;
+import com.sun.facelets.tag.MetadataTarget;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.TagAttributeException;
+import com.sun.facelets.tag.jsf.ComponentConfig;
+import com.sun.facelets.tag.jsf.ComponentHandler;
+
+/**
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/02/01 15:31:23 $
+ *
+ */
+public class ActionParamHandler extends ComponentHandler {
+
+    /**
+	 * @author shura (latest modification by $Author: alexsmirnov $)
+	 * @version $Revision: 1.1.2.1 $ $Date: 2007/02/01 15:31:23 $
+	 *
+	 */
+	public static class ActionParamMetaRule extends MetaRule {
+
+		/* (non-Javadoc)
+		 * @see org.ajax4jsf.tag.SuggestionHandler.SuggestionMetaRule#applyRule(java.lang.String, com.sun.facelets.tag.TagAttribute, com.sun.facelets.tag.MetadataTarget)
+		 */
+		public Metadata applyRule(String name, TagAttribute attribute, MetadataTarget meta) {
+	        if (meta.isTargetInstanceOf(UIActionParameter.class)) {
+	        	if ("assignTo".equals(name)) {
+					return new AssignToValueBindingMetadata(attribute);
+				} else if ("converter".equals(name)) {
+	                if (attribute.isLiteral()) {
+	                    return new LiteralConverterMetadata(attribute.getValue());
+	                } else {
+	                    return new DynamicConverterMetadata(attribute);
+	                }
+					
+				}
+	        }
+
+			return null;
+		}
+
+		
+	}
+	
+    final static class LiteralConverterMetadata extends Metadata {
+
+        private final String converterId;
+
+        public LiteralConverterMetadata(String converterId) {
+            this.converterId = converterId;
+        }
+
+        public void applyMetadata(FaceletContext ctx, Object instance) {
+            ((UIActionParameter) instance).setConverter(ctx.getFacesContext()
+                    .getApplication().createConverter(this.converterId));
+        }
+    }
+
+    final static class DynamicConverterMetadata extends Metadata {
+
+        private final TagAttribute attr;
+
+        public DynamicConverterMetadata(TagAttribute attr) {
+            this.attr = attr;
+        }
+
+        public void applyMetadata(FaceletContext ctx, Object instance) {
+            ((UIActionParameter) instance).setConverter((Converter) this.attr
+                    .getObject(ctx, Converter.class));
+        }
+    }
+
+    final static class AssignToValueBindingMetadata extends Metadata {
+
+        private final TagAttribute attr;
+
+        public AssignToValueBindingMetadata(TagAttribute attr) {
+            this.attr = attr;
+        }
+
+        public void applyMetadata(FaceletContext ctx, Object instance) {
+            ((UIActionParameter) instance).setAssignToBinding(
+                    new LegacyValueBinding(attr.getValueExpression(ctx,
+                            Object.class)));
+        }
+    }
+
+
+	private TagAttribute _assignTo;
+    private TagAttribute _converter;
+
+    /**
+	 * @param config
+	 */
+	public ActionParamHandler(ComponentConfig config) {
+		super(config);
+		_assignTo = getAttribute("assignTo");
+		_converter = getAttribute("converter");
+		if(null != _assignTo) {
+            if (_assignTo.isLiteral()) {
+                throw new TagAttributeException(this.tag, this._assignTo, Messages.getMessage(Messages.MUST_BE_EXPRESSION_ERROR));
+            }
+
+		}
+		// TODO Auto-generated constructor stub
+	}
+    /*
+     * (non-Javadoc)
+     * 
+     * @see com.sun.facelets.FaceletHandler#apply(com.sun.facelets.FaceletContext,
+     *      javax.faces.component.UIComponent)
+     */
+    public void onComponentCreated(FaceletContext ctx, UIComponent c, UIComponent parent) {
+        if (parent instanceof ActionSource)
+        {
+            FacesContext facesContext = FacesContext.getCurrentInstance();
+            Application application = facesContext.getApplication();
+            if (_assignTo != null) {
+                UIActionParameter al = (UIActionParameter)c;
+                // TODO - in jsf 1.2 use ELValueExpression
+//                al.setAssignToBinding(application.createValueBinding(_assignTo.getValue()));
+//                if (_converter != null) {
+//                    Converter converter = application.createConverter(_converter.getValue(ctx));
+//                    al.setConverter(converter);
+//                }
+                ((ActionSource)parent).addActionListener(al);
+            }
+        }
+    }
+
+	private static final ActionParamMetaRule actionParamMetaRule = new ActionParamMetaRule();
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.tag.AjaxComponentHandler#createMetaRuleset(java.lang.Class)
+	 */
+	protected MetaRuleset createMetaRuleset(Class type) {
+		MetaRuleset metaRules = super.createMetaRuleset(type);
+		metaRules.addRule(actionParamMetaRule);
+		return metaRules;
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/facelets/AjaxActionsRule.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/facelets/AjaxActionsRule.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/facelets/AjaxActionsRule.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,99 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.taglib.html.facelets;
+
+import javax.faces.component.ActionSource;
+import javax.faces.event.ActionEvent;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.el.LegacyMethodBinding;
+import com.sun.facelets.tag.MetaRule;
+import com.sun.facelets.tag.Metadata;
+import com.sun.facelets.tag.MetadataTarget;
+import com.sun.facelets.tag.TagAttribute;
+
+/**
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/02/01 15:31:21 $
+ *
+ */
+public class AjaxActionsRule extends MetaRule {
+
+    public final static Class[] ACTION_SIG = new Class[0];
+
+    public final static Class[] ACTION_LISTENER_SIG = new Class[] { ActionEvent.class };
+
+    public final static class ActionMapper extends Metadata {
+
+        private final TagAttribute attr;
+
+        public ActionMapper(TagAttribute attr) {
+            this.attr = attr;
+        }
+
+        public void applyMetadata(FaceletContext ctx, Object instance) {
+            ((ActionSource) instance).setAction(new LegacyMethodBinding(
+                    this.attr.getMethodExpression(ctx, String.class,
+                            AjaxActionsRule.ACTION_SIG)));
+        }
+    }
+
+    public final static class ActionListenerMapper extends Metadata {
+
+        private final TagAttribute attr;
+
+        public ActionListenerMapper(TagAttribute attr) {
+            this.attr = attr;
+        }
+
+        public void applyMetadata(FaceletContext ctx, Object instance) {
+            ((ActionSource) instance)
+                    .setActionListener(new LegacyMethodBinding(this.attr
+                            .getMethodExpression(ctx, null,
+                                    AjaxActionsRule.ACTION_LISTENER_SIG)));
+        }
+
+    }
+
+    public final static AjaxActionsRule instance = new AjaxActionsRule();
+
+    public AjaxActionsRule() {
+        super();
+    }
+
+    public Metadata applyRule(String name, TagAttribute attribute,
+            MetadataTarget meta) {
+        if (meta.isTargetInstanceOf(ActionSource.class)) {
+
+
+            if ("action".equals(name)) {
+                    return new ActionMapper(attribute);
+            }
+
+            if ("actionListener".equals(name)) {
+                    return new ActionListenerMapper(attribute);
+            }
+        }
+        return null;
+    }
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/facelets/AjaxComponentHandler.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/facelets/AjaxComponentHandler.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/facelets/AjaxComponentHandler.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,58 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.taglib.html.facelets;
+
+import javax.faces.component.ActionSource;
+
+import com.sun.facelets.tag.MetaRuleset;
+import com.sun.facelets.tag.jsf.ComponentConfig;
+import com.sun.facelets.tag.jsf.ComponentHandler;
+
+/**
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/02/01 15:31:23 $
+ *
+ */
+public class AjaxComponentHandler extends ComponentHandler {
+
+	/**
+	 * @param config
+	 */
+	public AjaxComponentHandler(ComponentConfig config) {
+		super(config);
+		// TODO Auto-generated constructor stub
+	}
+
+	/* (non-Javadoc)
+	 * @see com.sun.facelets.tag.jsf.ComponentHandler#createMetaRuleset(java.lang.Class)
+	 */
+	protected MetaRuleset createMetaRuleset(Class type) {
+		// TODO Auto-generated method stub
+		MetaRuleset metaRules = super.createMetaRuleset(type);
+		if (ActionSource.class.isAssignableFrom(type)) {
+			metaRules.addRule(AjaxActionsRule.instance);
+		}
+		metaRules.addRule(AjaxReRendrRule.instance);
+		return metaRules;
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/facelets/AjaxListenerHandler.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/facelets/AjaxListenerHandler.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/facelets/AjaxListenerHandler.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,119 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.taglib.html.facelets;
+
+import java.io.IOException;
+
+import javax.el.ELException;
+import javax.el.ValueExpression;
+import javax.faces.FacesException;
+import javax.faces.component.UIComponent;
+
+import org.ajax4jsf.framework.ajax.AjaxListener;
+import org.ajax4jsf.framework.ajax.AjaxListenerHelper;
+import org.ajax4jsf.framework.ajax.AjaxSource;
+import org.ajax4jsf.framework.util.message.Messages;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.FaceletException;
+import com.sun.facelets.el.LegacyValueBinding;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.TagAttributeException;
+import com.sun.facelets.tag.TagConfig;
+import com.sun.facelets.tag.TagException;
+import com.sun.facelets.tag.TagHandler;
+
+/**
+ * Register an ActionListener instance on the UIComponent associated with the
+ * closest parent UIComponent custom action. <p/> See <a target="_new"
+ * href="http://java.sun.com/j2ee/javaserverfaces/1.1_01/docs/tlddocs/f/actionListener.html">tag
+ * documentation</a>.
+ * 
+ * @see javax.faces.event.ActionListener
+ * @see javax.faces.component.AjaxContainer
+ * @author Jacob Hookom
+ * @version $Id: AjaxListenerHandler.java,v 1.1.2.1 2007/02/01 15:31:23 alexsmirnov Exp $
+ */
+public final class AjaxListenerHandler extends TagHandler {
+
+    private Class listenerType;
+
+    private final TagAttribute type;
+
+    private final TagAttribute binding;
+
+    /**
+     * @param config
+     */
+    public AjaxListenerHandler(TagConfig config) {
+        super(config);
+        this.binding = this.getAttribute("binding");
+        this.type = this.getRequiredAttribute("type");
+        if (type != null) {
+            if (!type.isLiteral()) {
+                throw new TagAttributeException(this.tag, this.type, Messages.getMessage(Messages.MUST_BE_LITERAL_ERROR));
+            }
+            try {
+                this.listenerType = Class.forName(type.getValue());
+            } catch (Exception e) {
+                throw new TagAttributeException(this.tag, this.type, e);
+            }
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see com.sun.facelets.FaceletHandler#apply(com.sun.facelets.FaceletContext,
+     *      javax.faces.component.UIComponent)
+     */
+    public void apply(FaceletContext ctx, UIComponent parent)
+            throws IOException, FacesException, FaceletException, ELException {
+        if (parent instanceof AjaxSource) {
+            // only process if parent was just created
+            if (parent.getParent() == null) {
+                AjaxSource src = (AjaxSource) parent;
+                AjaxListener listener = null;
+                ValueExpression ve = null;
+                if (this.binding != null) {
+                    ve = this.binding.getValueExpression(ctx,
+                            AjaxListener.class);
+                    // TODO - handle both JSF 1.2/1.1 cases.
+                    listener = new AjaxListenerHelper(new LegacyValueBinding(ve));
+                }
+                if (listener == null) {
+                    try {
+                        listener = (AjaxListener) listenerType.newInstance();
+                    } catch (Exception e) {
+                        throw new TagAttributeException(this.tag, this.type, e.getCause());
+                    }
+                    if (ve != null) {
+                        ve.setValue(ctx, ve);
+                    }
+                }
+                src.addAjaxListener(listener);
+            }
+        } else {
+            throw new TagException(this.tag, Messages.getMessage(Messages.NOT_PARENT_AJAX_COMPONENT_ERROR, parent));
+        }
+    }
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/facelets/AjaxReRendrRule.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/facelets/AjaxReRendrRule.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/facelets/AjaxReRendrRule.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,88 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.taglib.html.facelets;
+
+import java.util.Set;
+
+import org.ajax4jsf.framework.ajax.AjaxComponent;
+import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.tag.MetaRule;
+import com.sun.facelets.tag.Metadata;
+import com.sun.facelets.tag.MetadataTarget;
+import com.sun.facelets.tag.TagAttribute;
+
+/**
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/02/01 15:31:22 $
+ *
+ */
+public class AjaxReRendrRule extends MetaRule {
+
+	public static final AjaxReRendrRule instance = new AjaxReRendrRule();
+	/**
+	 * 
+	 */
+	public AjaxReRendrRule() {
+		super();
+		// TODO Auto-generated constructor stub
+	}
+
+	/* (non-Javadoc)
+	 * @see com.sun.facelets.tag.MetaRule#applyRule(java.lang.String, com.sun.facelets.tag.TagAttribute, com.sun.facelets.tag.MetadataTarget)
+	 */
+	public Metadata applyRule(String name, TagAttribute attribute,
+			MetadataTarget meta) {
+        if (meta.isTargetInstanceOf(AjaxComponent.class)) {
+        	if ("reRender".equals(name)) {
+				if (attribute.isLiteral()) {
+					return new ReRendersSetMataData(attribute.getValue());
+				} else {
+					// Process as usual expression
+					return null;
+				}
+			}
+        }
+		return null;
+	}
+
+	static class ReRendersSetMataData extends Metadata{
+
+		private Set _reRender;
+		/**
+		 * @param value
+		 */
+		public ReRendersSetMataData(String value) {
+			_reRender = AjaxRendererUtils.asSet(value);
+		}
+
+		/* (non-Javadoc)
+		 * @see com.sun.facelets.tag.Metadata#applyMetadata(com.sun.facelets.FaceletContext, java.lang.Object)
+		 */
+		public void applyMetadata(FaceletContext ctx, Object instance) {
+			((AjaxComponent) instance).setReRender(_reRender);
+			
+		}
+		
+	}
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/facelets/AjaxSupportHandler.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/facelets/AjaxSupportHandler.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/facelets/AjaxSupportHandler.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,97 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.taglib.html.facelets;
+
+import java.io.IOException;
+
+import javax.el.ELException;
+import javax.faces.FacesException;
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIComponentBase;
+
+import org.ajax4jsf.taglib.html.jsp.AjaxSupportTag;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.FaceletException;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.TagHandler;
+import com.sun.facelets.tag.jsf.ComponentConfig;
+
+/**
+ * "proxy" class for creating UIAjaxSupport component as facet for it's parent.
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/02/01 15:31:22 $
+ *
+ */
+public class AjaxSupportHandler extends TagHandler {
+    /**
+     * A UIComponent for capturing a child UIComponent, representative of the
+     * desired Facet
+     * 
+     * @author Jacob Hookom
+     * 
+     */
+    private final static class UIFacet extends UIComponentBase {
+        public String getFamily() {
+            return null;
+        }
+    }
+
+	/**
+	 * Real tag handler for create component.
+	 */
+	private TagHandler _ajaxSupportHandler;
+	
+	private TagAttribute _event;
+	/**
+	 * @param config
+	 */
+	public AjaxSupportHandler(ComponentConfig config) {
+		super(config);
+		_event = getRequiredAttribute("event");
+		_ajaxSupportHandler = new AjaxComponentHandler(config);
+	}
+
+	/* (non-Javadoc)
+	 * @see com.sun.facelets.FaceletHandler#apply(com.sun.facelets.FaceletContext, javax.faces.component.UIComponent)
+	 */
+	public void apply(FaceletContext ctx, UIComponent parent)
+			throws IOException, FacesException, FaceletException, ELException {
+        UIComponent c;
+        // our id
+//        String id = ctx.generateUniqueId(this.tagId);
+        UIFacet facet = new UIFacet();
+        // Find facet for support component
+        String facetName = AjaxSupportTag.AJAX_SUPPORT_FACET+_event.getValue();
+		c = parent.getFacet(facetName);
+        if (null != c) {
+			parent.getFacets().remove(facetName);
+			facet.getChildren().add(c);
+		}
+        this._ajaxSupportHandler.apply(ctx, facet);
+        c = (UIComponent) facet.getChildren().get(0);
+        parent.getFacets().put(facetName, c);
+        // Fix for possible incompabilites in different frameworks.
+//        c.setParentProperties(parent);
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/facelets/FacetHandler.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/facelets/FacetHandler.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/facelets/FacetHandler.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,94 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.taglib.html.facelets;
+
+import java.io.IOException;
+
+import javax.el.ELException;
+import javax.faces.FacesException;
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIComponentBase;
+
+import org.ajax4jsf.framework.util.message.Messages;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.FaceletException;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.TagConfig;
+import com.sun.facelets.tag.TagException;
+import com.sun.facelets.tag.TagHandler;
+
+/**
+ * Register a named facet on the UIComponent associated with the closest parent
+ * UIComponent custom action. <p/> See <a target="_new"
+ * href="http://java.sun.com/j2ee/javaserverfaces/1.1_01/docs/tlddocs/f/facet.html">tag
+ * documentation</a>.
+ * 
+ * @author Jacob Hookom
+ * @version $Id: FacetHandler.java,v 1.1.2.1 2007/02/01 15:31:21 alexsmirnov Exp $
+ */
+public final class FacetHandler extends TagHandler {
+
+    /**
+     * A UIComponent for capturing a child UIComponent, representative of the
+     * desired Facet
+     * 
+     * @author Jacob Hookom
+     * 
+     */
+    private final static class UIFacet extends UIComponentBase {
+        public String getFamily() {
+            return null;
+        }
+    }
+
+    protected final TagAttribute name;
+
+    public FacetHandler(TagConfig config) {
+        super(config);
+        this.name = this.getRequiredAttribute("name");
+    }
+
+    /* (non-Javadoc)
+     * @see com.sun.facelets.FaceletHandler#apply(com.sun.facelets.FaceletContext, javax.faces.component.UIComponent)
+     */
+    public void apply(FaceletContext ctx, UIComponent parent)
+            throws IOException, FacesException, FaceletException, ELException {
+        UIFacet facet = new UIFacet();
+        UIComponent c;
+        // Check for existing facet
+        String facetName = this.name.getValue(ctx);
+		c = parent.getFacet(facetName);
+        if (null != c) {
+			parent.getFacets().remove(facetName);
+			facet.getChildren().add(c);
+		}
+        this.nextHandler.apply(ctx, facet);
+        int childCount = facet.getChildCount();
+        if (childCount == 1) {
+            c = (UIComponent) facet.getChildren().get(0);
+            parent.getFacets().put(facetName, c);
+        } else {
+            throw new TagException(this.tag, Messages.getMessage(Messages.FACET_TAG_MANY_CHILDREN_ERROR));
+        }
+    }
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/facelets/IncludeFaceletContext.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/facelets/IncludeFaceletContext.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/facelets/IncludeFaceletContext.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,274 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.taglib.html.facelets;
+
+import java.io.IOException;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Locale;
+import java.util.Map;
+
+import javax.el.ELException;
+import javax.el.ELResolver;
+import javax.el.ExpressionFactory;
+import javax.el.FunctionMapper;
+import javax.el.VariableMapper;
+import javax.faces.FacesException;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.FaceletException;
+import com.sun.facelets.TemplateClient;
+
+/**
+ * @author shura
+ *
+ */
+public class IncludeFaceletContext extends FaceletContext {
+	
+	private FaceletContext defaultContext;
+	
+	private Map ids;
+
+	/**
+	 * @param defaultContext
+	 */
+	public IncludeFaceletContext(FaceletContext defaultContext) {
+		this.defaultContext = defaultContext;
+		this.ids = new HashMap();
+	}
+
+	/**
+	 * @param client
+	 * @see com.sun.facelets.FaceletContext#extendClient(com.sun.facelets.TemplateClient)
+	 */
+	public void extendClient(TemplateClient client) {
+		this.defaultContext.extendClient(client);
+	}
+
+	/**
+	 * @param base
+	 * @return
+	 * @see com.sun.facelets.FaceletContext#generateUniqueId(java.lang.String)
+	 */
+    public String generateUniqueId(String base) {
+        Integer cnt = (Integer) this.ids.get(base);
+        if (cnt == null) {
+            this.ids.put(base, new Integer(0));
+            return base;
+        } else {
+            int i = cnt.intValue() + 1;
+            this.ids.put(base, new Integer(i));
+            return base + "_" + i;
+        }
+    }
+
+	/**
+	 * @param name
+	 * @return
+	 * @see com.sun.facelets.FaceletContext#getAttribute(java.lang.String)
+	 */
+	public Object getAttribute(String name) {
+		return this.defaultContext.getAttribute(name);
+	}
+
+	/**
+	 * @param key
+	 * @return
+	 * @see javax.el.ELContext#getContext(java.lang.Class)
+	 */
+	public Object getContext(Class key) {
+		return this.defaultContext.getContext(key);
+	}
+
+	/**
+	 * @return
+	 * @see javax.el.ELContext#getELResolver()
+	 */
+	public ELResolver getELResolver() {
+		return this.defaultContext.getELResolver();
+	}
+
+	/**
+	 * @return
+	 * @see com.sun.facelets.FaceletContext#getExpressionFactory()
+	 */
+	public ExpressionFactory getExpressionFactory() {
+		return this.defaultContext.getExpressionFactory();
+	}
+
+	/**
+	 * @return
+	 * @see com.sun.facelets.FaceletContext#getFacesContext()
+	 */
+	public FacesContext getFacesContext() {
+		return this.defaultContext.getFacesContext();
+	}
+
+	/**
+	 * @return
+	 * @see javax.el.ELContext#getFunctionMapper()
+	 */
+	public FunctionMapper getFunctionMapper() {
+		return this.defaultContext.getFunctionMapper();
+	}
+
+	/**
+	 * @return
+	 * @see javax.el.ELContext#getLocale()
+	 */
+	public Locale getLocale() {
+		return this.defaultContext.getLocale();
+	}
+
+	/**
+	 * @return
+	 * @see javax.el.ELContext#getVariableMapper()
+	 */
+	public VariableMapper getVariableMapper() {
+		return this.defaultContext.getVariableMapper();
+	}
+
+	/**
+	 * @return
+	 * @see java.lang.Object#hashCode()
+	 */
+	public int hashCode() {
+		return this.defaultContext.hashCode();
+	}
+
+	/**
+	 * @param parent
+	 * @param name
+	 * @return
+	 * @throws IOException
+	 * @throws FaceletException
+	 * @throws FacesException
+	 * @throws ELException
+	 * @see com.sun.facelets.FaceletContext#includeDefinition(javax.faces.component.UIComponent, java.lang.String)
+	 */
+	public boolean includeDefinition(UIComponent parent, String name) throws IOException, FaceletException, FacesException, ELException {
+		return this.defaultContext.includeDefinition(parent, name);
+	}
+
+	/**
+	 * @param parent
+	 * @param relativePath
+	 * @throws IOException
+	 * @throws FaceletException
+	 * @throws FacesException
+	 * @throws ELException
+	 * @see com.sun.facelets.FaceletContext#includeFacelet(javax.faces.component.UIComponent, java.lang.String)
+	 */
+	public void includeFacelet(UIComponent parent, String relativePath) throws IOException, FaceletException, FacesException, ELException {
+		this.defaultContext.includeFacelet(parent, relativePath);
+	}
+
+	/**
+	 * @param parent
+	 * @param absolutePath
+	 * @throws IOException
+	 * @throws FaceletException
+	 * @throws FacesException
+	 * @throws ELException
+	 * @see com.sun.facelets.FaceletContext#includeFacelet(javax.faces.component.UIComponent, java.net.URL)
+	 */
+	public void includeFacelet(UIComponent parent, URL absolutePath) throws IOException, FaceletException, FacesException, ELException {
+		this.defaultContext.includeFacelet(parent, absolutePath);
+	}
+
+	/**
+	 * @return
+	 * @see javax.el.ELContext#isPropertyResolved()
+	 */
+	public boolean isPropertyResolved() {
+		return this.defaultContext.isPropertyResolved();
+	}
+
+	/**
+	 * @param client
+	 * @see com.sun.facelets.FaceletContext#popClient(com.sun.facelets.TemplateClient)
+	 */
+	public void popClient(TemplateClient client) {
+		this.defaultContext.popClient(client);
+	}
+
+	/**
+	 * @param client
+	 * @see com.sun.facelets.FaceletContext#pushClient(com.sun.facelets.TemplateClient)
+	 */
+	public void pushClient(TemplateClient client) {
+		this.defaultContext.pushClient(client);
+	}
+
+	/**
+	 * @param key
+	 * @param contextObject
+	 * @see javax.el.ELContext#putContext(java.lang.Class, java.lang.Object)
+	 */
+	public void putContext(Class key, Object contextObject) {
+		this.defaultContext.putContext(key, contextObject);
+	}
+
+	/**
+	 * @param name
+	 * @param value
+	 * @see com.sun.facelets.FaceletContext#setAttribute(java.lang.String, java.lang.Object)
+	 */
+	public void setAttribute(String name, Object value) {
+		this.defaultContext.setAttribute(name, value);
+	}
+
+	/**
+	 * @param fnMapper
+	 * @see com.sun.facelets.FaceletContext#setFunctionMapper(javax.el.FunctionMapper)
+	 */
+	public void setFunctionMapper(FunctionMapper fnMapper) {
+		this.defaultContext.setFunctionMapper(fnMapper);
+	}
+
+	/**
+	 * @param locale
+	 * @see javax.el.ELContext#setLocale(java.util.Locale)
+	 */
+	public void setLocale(Locale locale) {
+		this.defaultContext.setLocale(locale);
+	}
+
+	/**
+	 * @param resolved
+	 * @see javax.el.ELContext#setPropertyResolved(boolean)
+	 */
+	public void setPropertyResolved(boolean resolved) {
+		this.defaultContext.setPropertyResolved(resolved);
+	}
+
+	/**
+	 * @param varMapper
+	 * @see com.sun.facelets.FaceletContext#setVariableMapper(javax.el.VariableMapper)
+	 */
+	public void setVariableMapper(VariableMapper varMapper) {
+		this.defaultContext.setVariableMapper(varMapper);
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/facelets/IncludeHandler.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/facelets/IncludeHandler.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/facelets/IncludeHandler.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,95 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.taglib.html.facelets;
+
+import java.io.IOException;
+
+import javax.el.ELException;
+import javax.el.VariableMapper;
+import javax.faces.FacesException;
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIViewRoot;
+import javax.faces.context.FacesContext;
+import javax.servlet.jsp.JspException;
+
+import org.ajax4jsf.ajax.UIInclude;
+import org.ajax4jsf.framework.ajax.AjaxViewRoot;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.el.VariableMapperWrapper;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.jsf.ComponentConfig;
+import com.sun.facelets.tag.jsf.ComponentHandler;
+
+/**
+ * @author shura
+ * 
+ */
+public class IncludeHandler extends ComponentHandler {
+
+	private TagAttribute viewId;
+
+	public IncludeHandler(ComponentConfig config) {
+		super(config);
+		this.viewId = getRequiredAttribute("viewId");
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.sun.facelets.tag.jsf.ComponentHandler#onComponentCreated(com.sun.facelets.FaceletContext,
+	 *      javax.faces.component.UIComponent,
+	 *      javax.faces.component.UIComponent)
+	 */
+	protected void onComponentCreated(FaceletContext ctx, UIComponent c,
+			UIComponent parent) {
+		// TODO Auto-generated method stub
+		super.onComponentCreated(ctx, c, parent);
+	}
+
+	protected void applyNextHandler(FaceletContext ctx, UIComponent component)
+			throws IOException, FacesException, ELException {
+		String path;
+			if (component instanceof UIInclude) {
+				UIInclude include = (UIInclude) component;
+				path = include.getViewId();
+				 if(include.isWasNavigation()){
+					 component.getChildren().clear();
+				 }
+			} else {
+				path = (String) component.getAttributes().get("viewId");
+			}
+			VariableMapper orig = ctx.getVariableMapper();
+			ctx.setVariableMapper(new VariableMapperWrapper(orig));
+			try {
+				this.nextHandler.apply(ctx, component);
+				ctx.includeFacelet(component, path);
+			} catch (Exception e) {
+				throw new FacesException("UIInclude component "
+						+ component.getClientId(ctx.getFacesContext())
+						+ " could't include page with path " + path, e);
+			} finally {
+				ctx.setVariableMapper(orig);
+			}
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/facelets/KeepAliveHandler.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/facelets/KeepAliveHandler.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/facelets/KeepAliveHandler.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,82 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.taglib.html.facelets;
+
+import java.io.IOException;
+
+import javax.el.ELException;
+import javax.faces.FacesException;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.el.ValueBinding;
+
+import org.ajax4jsf.framework.renderer.AjaxPhaseListener;
+import org.ajax4jsf.framework.util.message.Messages;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.FaceletException;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.TagAttributeException;
+import com.sun.facelets.tag.TagConfig;
+import com.sun.facelets.tag.TagHandler;
+
+/**
+ * @author shura
+ *
+ */
+public class KeepAliveHandler extends TagHandler {
+
+	private final TagAttribute beanName;
+
+	private final TagAttribute ajaxOnly;
+	/**
+	 * @param config
+	 */
+	public KeepAliveHandler(TagConfig config) {
+		super(config);
+        this.beanName = this.getRequiredAttribute("beanName");
+        if (beanName != null) {
+            if (!beanName.isLiteral()) {
+                throw new TagAttributeException(this.tag, this.beanName, Messages.getMessage(Messages.MUST_BE_LITERAL_ERROR));
+            }
+        }
+        this.ajaxOnly = getAttribute("ajaxOnly");
+	}
+
+	/* (non-Javadoc)
+	 * @see com.sun.facelets.FaceletHandler#apply(com.sun.facelets.FaceletContext, javax.faces.component.UIComponent)
+	 */
+	public void apply(FaceletContext ctx, UIComponent parent)
+			throws IOException, FacesException, FaceletException, ELException {
+        // Get bean instance from EL expression.
+		String name = beanName.getValue();
+		boolean isAjaxOnly = ajaxOnly!=null?ajaxOnly.getBoolean(ctx):false;
+        FacesContext facesContext = ctx.getFacesContext();
+        String beanExpression = "#{"+name+"}";
+        ValueBinding valueBinding = facesContext.getApplication().createValueBinding(beanExpression);
+        Object bean = valueBinding.getValue(facesContext);
+        String beanAttributeName = isAjaxOnly?AjaxPhaseListener.AJAX_BEAN_PREFIX:AjaxPhaseListener.VIEW_BEAN_PREFIX+name;
+		// Put bean instance to ViewRoot. 
+        facesContext.getViewRoot().getAttributes().put(beanAttributeName, bean);
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/facelets/MediaOutputHandler.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/facelets/MediaOutputHandler.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/facelets/MediaOutputHandler.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,121 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.taglib.html.facelets;
+
+import java.io.OutputStream;
+
+import org.ajax4jsf.ajax.resource.UIMediaOutput;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.el.LegacyMethodBinding;
+import com.sun.facelets.tag.MetaRule;
+import com.sun.facelets.tag.MetaRuleset;
+import com.sun.facelets.tag.Metadata;
+import com.sun.facelets.tag.MetadataTarget;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.jsf.ComponentConfig;
+import com.sun.facelets.tag.jsf.ComponentHandler;
+
+/**
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/02/01 15:31:22 $
+ *
+ */
+public class MediaOutputHandler extends ComponentHandler {
+
+	private static final MetaRule mmediaMetaRule = new MMediaMetaRule();
+	/**
+	 * @param config
+	 */
+	public MediaOutputHandler(ComponentConfig config) {
+		super(config);
+		
+	}
+
+	/* (non-Javadoc)
+	 * @see org.ajax4jsf.tag.AjaxComponentHandler#createMetaRuleset(java.lang.Class)
+	 */
+	protected MetaRuleset createMetaRuleset(Class type) {
+		MetaRuleset metaRules = super.createMetaRuleset(type);
+		metaRules.addRule(mmediaMetaRule);
+		return metaRules;
+	}
+
+	/**
+	 * @author shura (latest modification by $Author: alexsmirnov $)
+	 * @version $Revision: 1.1.2.1 $ $Date: 2007/02/01 15:31:22 $
+	 *
+	 */
+	static class MMediaMetaRule extends MetaRule{
+
+		/**
+		 * 
+		 */
+		public MMediaMetaRule() {
+			super();
+		}
+
+		/* (non-Javadoc)
+		 * @see com.sun.facelets.tag.MetaRule#applyRule(java.lang.String, com.sun.facelets.tag.TagAttribute, com.sun.facelets.tag.MetadataTarget)
+		 */
+		public Metadata applyRule(String name, TagAttribute attribute, MetadataTarget meta) {
+	        if (meta.isTargetInstanceOf(UIMediaOutput.class)) {
+
+
+	            if ("createContent".equals(name)) {
+	                    return new MMediaActionMapper(attribute);
+	            }
+	        }
+			return null;
+		}
+
+	}
+	/**
+	 * @author shura (latest modification by $Author: alexsmirnov $)
+	 * @version $Revision: 1.1.2.1 $ $Date: 2007/02/01 15:31:22 $
+	 *
+	 */
+	static class MMediaActionMapper extends Metadata {
+
+		private static final Class[] MMEDIA_ACTION_SIG = new Class[] {OutputStream.class,Object.class};
+
+		private final TagAttribute _send;
+		/**
+		 * @param attribute
+		 */
+		public MMediaActionMapper(TagAttribute attribute) {
+			_send = attribute;
+		}
+
+		/* (non-Javadoc)
+		 * @see com.sun.facelets.tag.Metadata#applyMetadata(com.sun.facelets.FaceletContext, java.lang.Object)
+		 */
+		public void applyMetadata(FaceletContext ctx, Object instance) {
+            ((UIMediaOutput) instance)
+            .setCreateContent(new LegacyMethodBinding(this._send
+                    .getMethodExpression(ctx, null,
+                            MMEDIA_ACTION_SIG)));
+		}
+
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/jsp/ActionParamTag.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/jsp/ActionParamTag.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/jsp/ActionParamTag.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,146 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.taglib.html.jsp;
+
+import javax.faces.application.Application;
+import javax.faces.component.ActionSource;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.convert.Converter;
+import javax.faces.webapp.UIComponentTag;
+
+import org.ajax4jsf.ajax.UIActionParameter;
+import org.ajax4jsf.framework.taglib.UIComponentTagBase;
+import org.ajax4jsf.framework.util.message.Messages;
+
+
+/**
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/02/01 15:31:31 $
+ *
+ */
+public class ActionParamTag extends UIComponentTagBase
+{
+
+    /* (non-Javadoc)
+     * @see javax.faces.webapp.UIComponentTag#getComponentType()
+     */
+    public String getComponentType()
+    {
+        return "org.ajax4jsf.components.ActionParameter";
+    }
+
+    /* (non-Javadoc)
+     * @see javax.faces.webapp.UIComponentTag#getRendererType()
+     */
+    public String getRendererType()
+    {
+        return null;
+    }
+    // UIComponent attributes --> already implemented in UIComponentTagBase
+
+    // UIParameter attributes
+    // value already implemented in UIComponentTagBase
+    private String _name;
+    private String _assignTo;
+    private String _converter;
+    private String _noEscape;
+
+    protected void setProperties(UIComponent component)
+    {
+        super.setProperties(component);        
+        setStringProperty(component, "name", _name);
+        setBooleanProperty(component, "noEscape", _noEscape);
+
+        //Find parent UIComponentTag
+        UIComponentTag componentTag = UIComponentTag.getParentUIComponentTag(pageContext);
+        if (componentTag == null)
+        {
+            throw new IllegalArgumentException(Messages.getMessage(Messages.NO_UI_COMPONENT_TAG_ANCESTOR_ERROR, "ActionParameterTag"));
+        }
+
+        if (componentTag.getCreated())
+        {
+            //Component was just created, so we add the Listener
+            UIComponent parentComponent = componentTag.getComponentInstance();
+            if (parentComponent instanceof ActionSource)
+            {
+                FacesContext facesContext = FacesContext.getCurrentInstance();
+                Application application = facesContext.getApplication();
+                if (_assignTo != null) {
+                    if (!UIComponentTag.isValueReference(_assignTo)) throw new IllegalArgumentException(Messages.getMessage(Messages.NO_VALUE_REFERENCE_ERROR_2, _assignTo));
+                    UIActionParameter al = (UIActionParameter)component;
+                    al.setAssignToBinding(application.createValueBinding(_assignTo));
+                if (_converter != null)
+                {
+                    Converter converter = application.createConverter(_converter);
+                    al.setConverter(converter);
+                }
+                ((ActionSource)parentComponent).addActionListener(al);
+                }
+            }
+        }
+
+    }
+
+    public void setName(String name)
+    {
+        _name = name;
+    }
+
+    /**
+     * @param converter The converter to set.
+     */
+    public void setConverter(String converter)
+    {
+        this._converter = converter;
+    }
+
+    /**
+     * @param noEscape The noEscape to set.
+     */
+    public void setNoEscape(String noEscape)
+    {
+        this._noEscape = noEscape;
+    }
+
+    /**
+     * @param property The property to set.
+     */
+    public void setAssignTo(String property)
+    {
+        this._assignTo = property;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.myfaces.taglib.UIComponentTagBase#release()
+     */
+    public void release()
+    {
+        _name = null;
+        _assignTo = null;
+        _converter = null;
+        _noEscape = null;
+        super.release();
+    }
+    
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/jsp/AjaxFormTag.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/jsp/AjaxFormTag.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/jsp/AjaxFormTag.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,55 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.taglib.html.jsp;
+
+import org.ajax4jsf.ajax.UIAjaxForm;
+import org.ajax4jsf.framework.taglib.UIComponentTagBase;
+
+
+/**
+ * Tag for creating Ajax version of HTML Form.
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/02/01 15:31:32 $
+ *
+ */
+public class AjaxFormTag extends UIComponentTagBase
+{
+
+    /* (non-Javadoc)
+     * @see javax.faces.webapp.UIComponentTag#getComponentType()
+     */
+    public String getComponentType()
+    {
+        // TODO Auto-generated method stub
+        return UIAjaxForm.COMPONENT_TYPE;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.faces.webapp.UIComponentTag#getRendererType()
+     */
+    public String getRendererType()
+    {
+        // TODO Auto-generated method stub
+        return "javax.faces.Form";
+    }
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/jsp/AjaxListenerTag.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/jsp/AjaxListenerTag.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/jsp/AjaxListenerTag.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,127 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.taglib.html.jsp;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.el.ReferenceSyntaxException;
+import javax.faces.el.ValueBinding;
+import javax.faces.webapp.UIComponentTag;
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.tagext.Tag;
+import javax.servlet.jsp.tagext.TagSupport;
+
+import org.ajax4jsf.framework.ajax.AjaxListener;
+import org.ajax4jsf.framework.ajax.AjaxListenerHelper;
+import org.ajax4jsf.framework.ajax.AjaxSource;
+import org.ajax4jsf.framework.util.message.Messages;
+
+
+/**
+ * @author shura
+ * 
+ * Custom tag for append AJAX request listeners to AjaxContainer.
+ *  
+ */
+public class AjaxListenerTag extends TagSupport {
+
+    /**
+     * 
+     */
+    private static final long serialVersionUID = 2576519366310474212L;
+    /**
+     * class name for ajax events listener.   
+     */
+    private String type = null;
+    
+    private String binding = null;
+
+    /**
+     *  
+     */
+    public AjaxListenerTag() {
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    /**
+	 * @param binding the binding to set
+	 */
+	public void setBinding(String binding) {
+		this.binding = binding;
+	}
+
+	public int doStartTag() throws JspException {
+        if (type == null) {
+            throw new JspException(Messages.getMessage(Messages.NULL_TYPE_ATTRIBUTE_ERROR));
+        }
+
+        //Find parent UIComponentTag
+        UIComponentTag componentTag = UIComponentTag
+                .getParentUIComponentTag(pageContext);
+        if (componentTag == null) {
+            throw new JspException(
+            		Messages.getMessage(Messages.NO_UI_COMPONENT_TAG_ANCESTOR_ERROR, "AjaxListenerTag"));
+        }
+
+        if (componentTag.getCreated()) {
+            //Component was just created, so we add the Listener
+            UIComponent component = componentTag.getComponentInstance();
+            if (component instanceof AjaxSource) {
+                AjaxListener listener;
+                if(null != binding){
+                	ValueBinding valueBinding;
+                	try {
+					valueBinding = FacesContext.getCurrentInstance().getApplication().createValueBinding(binding);
+                	} catch (ReferenceSyntaxException e) {
+						throw new JspException(e);
+					}
+                	listener = new AjaxListenerHelper(valueBinding);
+                } else {
+                String className;
+                if (UIComponentTag.isValueReference(type)) {
+                    FacesContext facesContext = FacesContext
+                            .getCurrentInstance();
+                    ValueBinding valueBinding = facesContext.getApplication()
+                            .createValueBinding(type);
+                    className = (String) valueBinding.getValue(facesContext);
+                } else {
+                    className = type;
+                }
+				try {
+					listener = (AjaxListener) Class.forName(className).newInstance();
+				} catch (Exception e) {
+	                throw new JspException(Messages.getMessage(Messages.INSTANTIATE_LISTENER_ERROR, className, component.getId()), e);
+				} 
+                }
+                ((AjaxSource) component).addAjaxListener(listener);
+            } else {
+                throw new JspException(Messages.getMessage(Messages.NOT_PARENT_AJAX_COMPONENT_ERROR, component.getId()));
+            }
+        }
+
+        return Tag.SKIP_BODY;
+    }
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/jsp/AjaxPageTag.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/jsp/AjaxPageTag.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/jsp/AjaxPageTag.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,87 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.taglib.html.jsp;
+
+import javax.faces.component.UIComponent;
+
+import org.ajax4jsf.renderkit.html.AjaxPageRenderer;
+
+
+/**
+ * @author shura
+ *
+ * Other variant of AJAX View - render full html page with root <html>,
+ * <head> ( filled from "head" facet ) and <body> areas.
+ * 
+ */
+public class AjaxPageTag extends AjaxRegionTag {
+    
+    private String onload;
+    private String onunload;
+
+    /* (non-Javadoc)
+     * @see javax.faces.webapp.UIComponentTag#getRendererType()
+     */
+    public String getRendererType() {
+        return AjaxPageRenderer.RENDERER_TYPE;
+    }
+    /* (non-Javadoc)
+     * @see javax.servlet.jsp.tagext.Tag#release()
+     */
+    public void release() {
+        this.onload = null;
+        this.onunload = null;
+        super.release();
+    }
+    /* (non-Javadoc)
+     * @see javax.faces.webapp.UIComponentTag#setProperties(javax.faces.component.UIComponent)
+     */
+    protected void setProperties(UIComponent component) {
+        super.setProperties(component);
+        setStringProperty(component, "onload", this.onload);
+        setStringProperty(component, "onunload", this.onunload);
+    }
+    /**
+     * @return Returns the onload.
+     */
+    public String getOnload() {
+        return onload;
+    }
+    /**
+     * @return Returns the onunload.
+     */
+    public String getOnunload() {
+        return onunload;
+    }
+    /**
+     * @param onload The onload to set.
+     */
+    public void setOnload(String onload) {
+        this.onload = onload;
+    }
+    /**
+     * @param onunload The onunload to set.
+     */
+    public void setOnunload(String onunload) {
+        this.onunload = onunload;
+    }
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/jsp/AjaxRegionTag.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/jsp/AjaxRegionTag.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/jsp/AjaxRegionTag.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,162 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.taglib.html.jsp;
+
+import javax.faces.component.UIComponent;
+import javax.faces.el.MethodBinding;
+
+import org.ajax4jsf.ajax.UIAjaxRegion;
+import org.ajax4jsf.framework.ajax.AjaxContainer;
+import org.ajax4jsf.framework.ajax.AjaxListener;
+import org.ajax4jsf.framework.taglib.UIComponentTagBase;
+import org.ajax4jsf.framework.util.message.Messages;
+import org.ajax4jsf.renderkit.html.AjaxRegionRenderer;
+
+
+/**
+ * @author shura
+ * Tag for create root Ajax component. must be immediate in produced html/body.
+ * Example use in jsp:
+ *  
+ * For produce correct html code in any ( ajax and non-ajax requests ),
+ * better result with &lt;ajax:page&gt; tag.
+ */
+public class AjaxRegionTag extends UIComponentTagBase {
+
+    private String ajaxListener = null;
+
+    private String reRender = null;
+
+    private String immediate = null;
+    
+    private String selfRendered = null;
+    
+    private String javascriptLocation = null;
+
+    /**
+     *  
+     */
+    public AjaxRegionTag() {
+        super();
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see javax.faces.webapp.UIComponentTag#getComponentType()
+     */
+    public String getComponentType() {
+        return UIAjaxRegion.COMPONENT_TYPE;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see javax.faces.webapp.UIComponentTag#getRendererType()
+     */
+    public String getRendererType() {
+        return AjaxRegionRenderer.RENDERER_TYPE;
+    }
+
+    // set component properties
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see javax.servlet.jsp.tagext.Tag#release()
+     */
+    public void release() {
+        // release reources properties
+        super.release();
+        this.reRender = null;
+        this.ajaxListener = null;
+        this.immediate = null;
+        this.selfRendered = null;
+        this.javascriptLocation = null;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see javax.faces.webapp.UIComponentTag#setProperties(javax.faces.component.UIComponent)
+     */
+    protected void setProperties(UIComponent component) {
+        super.setProperties(component);
+        setBooleanProperty(component, "immediate", this.immediate);
+        setStringProperty(component, "ajaxAreas", this.reRender);
+        setBooleanProperty(component,"selfRendered",this.selfRendered);
+        setStringProperty(component, "javascriptLocation", this.javascriptLocation);
+        if (ajaxListener != null) {
+            if (!(component instanceof AjaxContainer)) {
+                throw new IllegalArgumentException(Messages.getMessage(Messages.NOT_AJAX_CONTAINER_ERROR, component.getClientId(getFacesContext())));
+            }
+            if (isValueReference(ajaxListener)) {
+                MethodBinding mb = getFacesContext().getApplication()
+                        .createMethodBinding(ajaxListener,
+                                AjaxListener.AJAX_LISTENER_ARGS);
+                ((AjaxContainer) component).setAjaxListener(mb);
+            } else {
+                getFacesContext().getExternalContext().log(Messages.getMessage(Messages.INVALID_EXPRESSION, ajaxListener));
+            }
+
+        }
+    }
+
+    /**
+     * @param ajaxAreas
+     *            The ajaxAreas to set.
+     */
+    public void setReRender(String ajaxAreas) {
+        this.reRender = ajaxAreas;
+    }
+
+    /**
+     * @param ajaxListener
+     *            The ajaxListener to set.
+     */
+    public void setAjaxListener(String ajaxListener) {
+        this.ajaxListener = ajaxListener;
+    }
+
+    /**
+     * @param immediate
+     *            The immediate to set.
+     */
+    public void setImmediate(String immediate) {
+        this.immediate = immediate;
+    }
+
+	/**
+	 * @param selfRendered The selfRendered to set.
+	 */
+	public void setSelfRendered(String selfRendered) {
+		this.selfRendered = selfRendered;
+	}
+
+//	public String getJavascriptLocation() {
+//		return javascriptLocation;
+//	}
+//
+	public void setJavascriptLocation(String javascriptLocation) {
+		this.javascriptLocation = javascriptLocation;
+	}
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/jsp/AjaxStatusTag.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/jsp/AjaxStatusTag.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/jsp/AjaxStatusTag.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,189 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.taglib.html.jsp;
+
+import javax.faces.component.UIComponent;
+
+import org.ajax4jsf.ajax.UIAjaxStatus;
+import org.ajax4jsf.framework.taglib.HtmlComponentTagBase;
+import org.ajax4jsf.renderkit.html.AjaxStatusRenderer;
+
+
+/**
+ * 
+ * Jsp Tag for create request state component.
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/02/01 15:31:30 $
+ *
+ */
+public class AjaxStatusTag extends HtmlComponentTagBase
+{
+
+    private String _for = null;
+    /**
+     * Text to output on start request
+     */
+    private String _startText = null;
+    /**
+     * Text to display on complete request
+     */
+    private String _stopText = null;
+
+    /**
+     * Style for display on start request
+     */
+    private String _startStyle = null;
+    /**
+     * Style for displaying on complete
+     */
+    private String _stopStyle = null;
+    /**
+     * Style class for display on request
+     */
+    private String _startStyleClass = null;
+    /**
+     * Style class for display on complete request
+     */
+    private String _stopStyleClass = null;
+    
+    /**
+     * Force id to render in Html as is
+     */
+    private String _forceId = null;
+    /* (non-Javadoc)
+     * @see javax.faces.webapp.UIComponentTag#getComponentType()
+     */
+    public String getComponentType()
+    {
+        // TODO Auto-generated method stub
+        return UIAjaxStatus.COMPONENT_TYPE;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.faces.webapp.UIComponentTag#getRendererType()
+     */
+    public String getRendererType()
+    {
+        // TODO Auto-generated method stub
+        return AjaxStatusRenderer.RENDERER_TYPE;
+    }
+
+    /* (non-Javadoc)
+     * @see org.ajax4jsf.components.taglib.html.HtmlComponentTagBase#release()
+     */
+    public void release()
+    {
+        super.release();
+        this._for = null;
+        this._startStyle = null;
+        this._startStyleClass = null;
+        this._startText = null;
+        this._stopStyle = null;
+        this._stopStyleClass = null;
+        this._stopText = null;
+        this._forceId = null;
+        
+    }
+
+    /* (non-Javadoc)
+     * @see org.ajax4jsf.components.taglib.html.HtmlComponentTagBase#setProperties(javax.faces.component.UIComponent)
+     */
+    protected void setProperties(UIComponent component)
+    {
+        super.setProperties(component);
+        setStringProperty(component, "for", _for);
+        setStringProperty(component, "startText", _startText);
+        setStringProperty(component, "stopText", _stopText);
+        setStringProperty(component, "startStyle", _startStyle);
+        setStringProperty(component, "stopStyle", _stopStyle);
+        setStringProperty(component, "startStyleClass", _startStyleClass);
+        setStringProperty(component, "stopStyleClass", _stopStyleClass);
+        setBooleanProperty(component, "forceId", _forceId);
+        
+    }
+
+    
+    /**
+     * @param _for The _for to set.
+     */
+    public void setFor(String _for)
+    {
+        this._for = _for;
+    }
+
+    /**
+     * @param style The _startStyle to set.
+     */
+    public void setStartStyle(String style)
+    {
+        _startStyle = style;
+    }
+
+    /**
+     * @param styleClass The _startStyleClass to set.
+     */
+    public void setStartStyleClass(String styleClass)
+    {
+        _startStyleClass = styleClass;
+    }
+
+    /**
+     * @param text The _startText to set.
+     */
+    public void setStartText(String text)
+    {
+        _startText = text;
+    }
+
+    /**
+     * @param stopText The stopText to set.
+     */
+    public void setStopText(String stopText)
+    {
+        this._stopText = stopText;
+    }
+
+    /**
+     * @param style The _stopStyle to set.
+     */
+    public void setStopStyle(String style)
+    {
+        _stopStyle = style;
+    }
+
+    /**
+     * @param styleClass The _stopStyleClass to set.
+     */
+    public void setStopStyleClass(String styleClass)
+    {
+        _stopStyleClass = styleClass;
+    }
+
+    /**
+     * @param forceId The forceId to set.
+     */
+    public void setForceId(String forceId)
+    {
+        this._forceId = forceId;
+    }
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/jsp/AjaxSupportTag.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/jsp/AjaxSupportTag.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/jsp/AjaxSupportTag.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,283 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.taglib.html.jsp;
+
+import javax.faces.component.UIComponent;
+import javax.faces.webapp.UIComponentTag;
+
+import org.ajax4jsf.ajax.UIAjaxSupport;
+import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
+import org.ajax4jsf.framework.renderer.RendererUtils.HTML;
+import org.ajax4jsf.framework.taglib.UIComponentTagBase;
+import org.ajax4jsf.framework.util.message.Messages;
+
+
+/**
+ * 
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/02/01 15:31:32 $
+ *
+ */
+public class AjaxSupportTag extends UIComponentTagBase {
+
+    static final String[] EVENT_HANDLER_ATTRIBUTES =
+    {
+        HTML.ondblclick_ATTRIBUTE,
+        HTML.onmousedown_ATTRIBUTE,
+        HTML.onmouseup_ATTRIBUTE,
+        HTML.onmouseover_ATTRIBUTE,
+        HTML.onmousemove_ATTRIBUTE,
+        HTML.onmouseout_ATTRIBUTE,
+        HTML.onkeypress_ATTRIBUTE,
+        HTML.onkeydown_ATTRIBUTE,
+        HTML.onkeyup_ATTRIBUTE,
+        HTML.onclick_ATTRIBUTE,
+        HTML.onchange_ATTRIBUTE,
+        HTML.onblur_ATTRIBUTE,
+        HTML.onfocus_ATTRIBUTE,
+        HTML.onselect_ATTRIBUTE
+    };
+    
+	public static final String AJAX_SUPPORT_FACET = "org.ajax4jsf.ajax.SUPPORT";
+    /**
+     * Id ( in form of findComponent method param ) of JSF component,
+     * updated by this component ( parnt tag ) action.
+     */
+    private String reRender = null;
+    
+    /**
+     * Generate script for given event ( onclick, onenter ... )
+     */
+    private String event = null;
+    
+    
+    /**
+     * Id of request status component.
+     */
+    private String status = null;
+    
+    /**
+     * JavaScript function for call after request completed.
+     */
+    private String oncomplete = null ;
+    
+    private String action = null;
+    private String actionListener = null;
+    private String limitToList = null;
+    private String disableDefault = null;
+    private String value = null;
+    private String immediate = null;
+    private String ajaxSingle = null;
+    
+
+
+
+    /**
+     * @param type The type to set.
+     */
+    public void setDisableDefault(String ajaxType)
+    {
+        this.disableDefault = ajaxType;
+    }
+
+    /**
+     * @param reRender
+     *            The targetId to set.
+     */
+    public void setReRender(String ajaxId) {
+        this.reRender = ajaxId;
+    }
+
+    
+    /**
+     * @param event The event to set.
+     */
+    public void setEvent(String event)
+    {
+        this.event = event;
+    }
+
+    /**
+     * @param oncomplete The oncomplete to set.
+     */
+    public void setOncomplete(String oncomplete)
+    {
+        this.oncomplete = oncomplete;
+    }
+
+    /**
+     * @param status The status to set.
+     */
+    public void setStatus(String status)
+    {
+        this.status = status;
+    }
+
+    /**
+     * @param limitToList The submitForm to set.
+     */
+    public void setLimitToList(String limitToList)
+    {
+        this.limitToList = limitToList;
+    }
+
+    /**
+     * @param action The action to set.
+     */
+    public void setAction(String action)
+    {
+        this.action = action;
+    }
+
+    /**
+     * @param actionListener The actionListener to set.
+     */
+    public void setActionListener(String actionListener)
+    {
+        this.actionListener = actionListener;
+    }
+
+    protected void setParentProperties(UIAjaxSupport uiComponent)  {
+
+        //Find parent UIComponentTag
+        UIComponentTag componentTag = null;
+		try {
+			componentTag = UIComponentTag.getParentUIComponentTag(pageContext);
+	        if (componentTag == null) {
+	            throw new IllegalArgumentException(
+	            		Messages.getMessage(Messages.NO_UI_COMPONENT_TAG_ANCESTOR_ERROR, "AjaxSupportTag"));
+	        }
+
+	        if (componentTag.getCreated()) {
+	            //Component was just created, so we add the Listener
+	            UIComponent component = componentTag.getComponentInstance();
+	            uiComponent.setParentProperties(component);
+	        }
+		} catch (ClassCastException e) {
+			// JSF 1.2 - tags have other parent.
+		}
+
+    } 
+
+    /* (non-Javadoc)
+     * @see javax.servlet.jsp.tagext.Tag#release()
+     */
+    public void release() {
+        this.reRender = null;
+        this.oncomplete = null;
+        this.event = null;
+        this.status =null;
+        this.action = null;
+        this.actionListener = null;
+        this.limitToList = null;
+        this.disableDefault = null;
+        this.value = null;
+        this.immediate=null;
+        this.ajaxSingle = null;
+        super.release();
+    }
+
+    /* (non-Javadoc)
+     * @see javax.faces.webapp.UIComponentTag#getComponentType()
+     */
+    public String getComponentType()
+    {
+        
+        return UIAjaxSupport.COMPONENT_TYPE;
+    }
+
+    /* (non-Javadoc)
+     * @see javax.faces.webapp.UIComponentTag#getRendererType()
+     */
+    public String getRendererType()
+    {
+        
+        return UIAjaxSupport.DEFAULT_RENDERER_TYPE;
+    }
+
+    /**
+	 * @param value The value to set.
+	 */
+	public void setValue(String value) {
+		this.value = value;
+	}
+
+	/**
+	 * @param immediate The immediate to set.
+	 */
+	public void setImmediate(String immediate) {
+		this.immediate = immediate;
+	}
+
+	/**
+	 * @param ajaxSingle The ajaxSingle to set.
+	 */
+	public void setAjaxSingle(String ajaxSingle) {
+		this.ajaxSingle = ajaxSingle;
+	}
+
+	/* (non-Javadoc)
+     * @see org.ajax4jsf.components.taglib.UIComponentTagBase#setProperties(javax.faces.component.UIComponent)
+     */
+    protected void setProperties(UIComponent component)
+    {        
+        super.setProperties(component);
+        setStringProperty(component, "event", event);
+        setReRenderProperty(component);
+        setStringProperty(component, "status", status);
+        setStringProperty(component, "oncomplete", oncomplete);
+        setBooleanProperty(component, "disableDefault", disableDefault );
+        setBooleanProperty(component, "limitToList", limitToList);
+        setActionProperty(component, action);
+        setActionListenerProperty(component, actionListener);
+        setValueProperty(component,value);
+        setBooleanProperty(component,"immediate",immediate);
+        setBooleanProperty(component,"ajaxSingle",ajaxSingle);
+        
+        setParentProperties((UIAjaxSupport) component);
+    }
+    
+    private void setReRenderProperty(UIComponent component) {
+        if (reRender != null) {
+            if (isValueReference(reRender)) {
+            	setStringProperty(component, "reRender", reRender);
+            } else {
+                ((UIAjaxSupport) component).setReRender( AjaxRendererUtils.asSet(reRender));
+            }
+        }
+    	
+    }
+
+	/* (non-Javadoc)
+	 * @see javax.faces.webapp.UIComponentTag#getFacetName()
+	 */
+	protected String getFacetName() {
+		// TODO Auto-generated method stub
+		if (null != event) {
+			return AJAX_SUPPORT_FACET + event;
+		} else {
+			return AJAX_SUPPORT_FACET;			
+		}
+	}
+    
+    
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/jsp/IncludeTag.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/jsp/IncludeTag.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/jsp/IncludeTag.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,243 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.taglib.html.jsp;
+
+import java.io.IOException;
+
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIViewRoot;
+import javax.faces.context.FacesContext;
+import javax.servlet.RequestDispatcher;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.JspWriter;
+
+import org.ajax4jsf.ajax.UIInclude;
+import org.ajax4jsf.framework.ajax.AjaxViewRoot;
+import org.ajax4jsf.framework.taglib.UIComponentTagBase;
+
+/**
+ * @author shura
+ * 
+ */
+public class IncludeTag extends UIComponentTagBase {
+
+	/**
+	 * @author shura
+	 *
+	 */
+	private static final class NullJspWriter extends JspWriter {
+		
+		
+		/**
+		 * @param arg0
+		 * @param arg1
+		 */
+		private NullJspWriter() {
+			super(1024, false);
+		}
+
+		public void clear() throws IOException {
+		}
+
+		public void clearBuffer() throws IOException {
+		}
+
+		public void close() throws IOException {
+		}
+
+		public void flush() throws IOException {
+		}
+
+		public int getRemaining() {
+			return 0;
+		}
+
+		public void newLine() throws IOException {
+		}
+
+		public void print(boolean arg0) throws IOException {
+		}
+
+		public void print(char arg0) throws IOException {
+		}
+
+		public void print(int arg0) throws IOException {
+		}
+
+		public void print(long arg0) throws IOException {
+		}
+
+		public void print(float arg0) throws IOException {
+		}
+
+		public void print(double arg0) throws IOException {
+		}
+
+		public void print(char[] arg0) throws IOException {
+		}
+
+		public void print(String arg0) throws IOException {
+		}
+
+		public void print(Object arg0) throws IOException {
+		}
+
+		public void println() throws IOException {
+		}
+
+		public void println(boolean arg0) throws IOException {
+		}
+
+		public void println(char arg0) throws IOException {
+		}
+
+		public void println(int arg0) throws IOException {
+		}
+
+		public void println(long arg0) throws IOException {
+		}
+
+		public void println(float arg0) throws IOException {
+		}
+
+		public void println(double arg0) throws IOException {
+		}
+
+		public void println(char[] arg0) throws IOException {
+		}
+
+		public void println(String arg0) throws IOException {
+		}
+
+		public void println(Object arg0) throws IOException {
+		}
+
+		public void write(char[] cbuf, int off, int len) throws IOException {
+		}
+	}
+
+	private String viewId;
+
+	/**
+	 * @param viewId
+	 *            the viewId to set
+	 */
+	public void setViewId(String viewId) {
+		this.viewId = viewId;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.taglib.UIComponentTagBase#release()
+	 */
+	public void release() {
+		super.release();
+		viewId = null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.ajax4jsf.framework.taglib.UIComponentTagBase#setProperties(javax.faces.component.UIComponent)
+	 */
+	protected void setProperties(UIComponent component) {
+		super.setProperties(component);
+		setStringProperty(component, "viewId", viewId);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see javax.faces.webapp.UIComponentTag#doEndTag()
+	 */
+	public int doEndTag() throws JspException {
+		int i = super.doEndTag();
+		return i;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see javax.faces.webapp.UIComponentTag#doStartTag()
+	 */
+	public int doStartTag() throws JspException {
+		int i = super.doStartTag();
+		String resourcePath;
+		UIComponent component = getComponentInstance();
+		UIInclude includeComponent = null;
+		if (component instanceof UIInclude) {
+			includeComponent = (UIInclude) component;
+			resourcePath = includeComponent.getViewId();
+			 if(includeComponent.isWasNavigation()){
+			 component.getChildren().clear();
+			 }
+		} else {
+			resourcePath = (String) component.getAttributes().get("viewId");
+		}
+		JspWriter out;
+		if (component.isRendered()) {
+			out = this.pageContext.getOut();
+		} else {
+			// All content of response will be skip.
+			out = new NullJspWriter();
+		}
+		ServletRequest request = this.pageContext.getRequest();
+		ServletResponse response = this.pageContext.getResponse();
+		RequestDispatcher rd = request.getRequestDispatcher(resourcePath);
+		FacesContext facesContext = getFacesContext();
+		if(null == rd){
+			throw new JspException("UIInclude component "+component.getClientId(facesContext)+ " could't include page with path "+resourcePath);
+		}
+		try {
+			ServletResponseWrapperInclude responseWrapper = new ServletResponseWrapperInclude(
+					response, out);
+			rd.include(request, responseWrapper);
+			// Write buffered data, if any;
+			responseWrapper.flushBuffer();
+		} catch (Exception e) {
+			throw new JspException(e);
+		}
+		return i;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see javax.faces.webapp.UIComponentTag#getComponentType()
+	 */
+	public String getComponentType() {
+		return UIInclude.COMPONENT_TYPE;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see javax.faces.webapp.UIComponentTag#getRendererType()
+	 */
+	public String getRendererType() {
+		return null;
+	}
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/jsp/KeepAliveTag.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/jsp/KeepAliveTag.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/jsp/KeepAliveTag.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,122 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.taglib.html.jsp;
+
+import javax.faces.context.FacesContext;
+import javax.faces.el.ValueBinding;
+import javax.faces.webapp.UIComponentTag;
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.tagext.Tag;
+import javax.servlet.jsp.tagext.TagSupport;
+
+import org.ajax4jsf.framework.renderer.AjaxPhaseListener;
+import org.ajax4jsf.framework.util.message.Messages;
+
+/**
+ * @author shura
+ *
+ */
+public class KeepAliveTag extends TagSupport {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 4322021112358067548L;
+	
+	private String beanName = null;
+	
+	private String ajaxOnly = null;
+
+	/**
+	 * @return the ajaxOnly
+	 */
+	public String getAjaxOnly() {
+		return ajaxOnly;
+	}
+
+	/**
+	 * @param ajaxOnly the ajaxOnly to set
+	 */
+	public void setAjaxOnly(String ajaxOnly) {
+		this.ajaxOnly = ajaxOnly;
+	}
+
+	/**
+	 * @return the name
+	 */
+	public String getBeanName() {
+		return beanName;
+	}
+
+	/**
+	 * @param name the name to set
+	 */
+	public void setBeanName(String name) {
+		this.beanName = name;
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.servlet.jsp.tagext.TagSupport#doStartTag()
+	 */
+	public int doStartTag() throws JspException {
+        if (beanName == null) {
+            throw new JspException(Messages.getMessage(Messages.NULL_TYPE_ATTRIBUTE_ERROR));
+        }
+        if(UIComponentTag.isValueReference(beanName)){
+            throw new JspException(Messages.getMessage(Messages.NAME_MUST_BE_LITERAL));
+        }
+		boolean isAjaxOnly = false;
+		FacesContext facesContext = FacesContext.getCurrentInstance();
+		if (null != ajaxOnly) {
+            if (UIComponentTag.isValueReference(ajaxOnly))
+            {
+                ValueBinding vb = facesContext.getApplication().createValueBinding(ajaxOnly);
+                isAjaxOnly = Boolean.TRUE.equals(vb.getValue(facesContext));
+            }
+            else
+            {
+                //TODO: More sophisticated way to convert boolean value (yes/no, 1/0, on/off, etc.)
+                isAjaxOnly = Boolean.parseBoolean(ajaxOnly);
+            }
+
+		}
+        // Get bean instance from EL expression.
+        String beanExpression = "#{"+beanName+"}";
+        ValueBinding valueBinding = facesContext.getApplication().createValueBinding(beanExpression);
+        Object bean = valueBinding.getValue(facesContext);
+        // Put bean instance to ViewRoot. 
+        String beanAttributeName = isAjaxOnly?AjaxPhaseListener.AJAX_BEAN_PREFIX:AjaxPhaseListener.VIEW_BEAN_PREFIX+beanName;
+        facesContext.getViewRoot().getAttributes().put(beanAttributeName, bean);
+		return Tag.SKIP_BODY;
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.servlet.jsp.tagext.TagSupport#release()
+	 */
+	public void release() {
+		beanName = null;
+		ajaxOnly = null;
+		super.release();
+	}
+	
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/jsp/ServletResponseWrapperInclude.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/jsp/ServletResponseWrapperInclude.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/taglib/html/jsp/ServletResponseWrapperInclude.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,189 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 1999,2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.ajax4jsf.taglib.html.jsp;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.Locale;
+
+import javax.servlet.ServletOutputStream;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpServletResponseWrapper;
+import javax.servlet.jsp.JspWriter;
+
+import org.ajax4jsf.io.FastBufferOutputStream;
+
+
+
+/**
+ * ServletResponseWrapper used by the JSP 'include' action.
+ * 
+ * This wrapper response object is passed to RequestDispatcher.include(), so
+ * that the output of the included resource is appended to that of the including
+ * page.
+ * 
+ * @author Pierre Delisle
+ */
+
+public class ServletResponseWrapperInclude extends HttpServletResponseWrapper {
+
+	/**
+	 * PrintWriter which appends to the JspWriter of the including page.
+	 */
+	private PrintWriter _printWriter;
+	
+	private FastBufferOutputStream _bytes ;
+	
+	private ServletOutputStream _servletStream;
+
+	private JspWriter _jspWriter;
+	
+	private boolean useWriter = false;
+	
+	private boolean useStream = false;
+
+	public ServletResponseWrapperInclude(ServletResponse response,
+			JspWriter jspWriter) {
+		super((HttpServletResponse) response);
+		this._printWriter = new PrintWriter(jspWriter);
+		this._jspWriter = jspWriter;
+	}
+
+	/**
+	 * Returns a wrapper around the JspWriter of the including page.
+	 */
+	public PrintWriter getWriter() throws IOException {
+		if (useStream) {
+			throw new IllegalStateException();
+		}
+		useWriter = true;
+		return _printWriter;
+	}
+
+	public ServletOutputStream getOutputStream() throws IOException {
+		if(useWriter){
+			throw new IllegalStateException();
+		}
+		if (!useStream) {
+			_bytes = new FastBufferOutputStream(getBufferSize());
+			_servletStream = new ServletOutputStream(){
+
+				/* (non-Javadoc)
+				 * @see java.io.OutputStream#flush()
+				 */
+				public void flush() throws IOException {
+					// TODO Auto-generated method stub
+					super.flush();
+				}
+
+				/* (non-Javadoc)
+				 * @see java.io.OutputStream#write(byte[], int, int)
+				 */
+				public void write(byte[] b, int off, int len) throws IOException {
+					// TODO Auto-generated method stub
+					_bytes.write(b, off, len);
+				}
+
+				/* (non-Javadoc)
+				 * @see java.io.OutputStream#write(byte[])
+				 */
+				public void write(byte[] b) throws IOException {
+					// TODO Auto-generated method stub
+					_bytes.write(b);
+				}
+
+				/* (non-Javadoc)
+				 * @see java.io.OutputStream#write(int)
+				 */
+				public void write(int b) throws IOException {
+					_bytes.write(b);					
+				}
+				
+			};
+			useStream = true;
+		}
+		return _servletStream;
+	}
+
+	/**
+	 * Clears the output buffer of the JspWriter associated with the including
+	 * page.
+	 */
+	public void resetBuffer() {
+		try {
+			_jspWriter.clearBuffer();
+			useWriter = false;
+			useStream = false;
+			_bytes = null;
+		} catch (IOException ioe) {
+		}
+	}
+	
+	public void reset() {
+		// TODO Auto-generated method stub
+		resetBuffer();
+	}
+	
+	public void flushBuffer() throws IOException {
+		if (useStream) {
+			// TODO - detect encoding ?
+			_bytes.writeTo(_jspWriter, getCharacterEncoding());
+			_bytes = new FastBufferOutputStream(getBufferSize());
+		}
+	}
+	
+	// Override ignored methods.
+	public void setBufferSize(int arg0) {
+	}
+	
+	public void setContentLength(int arg0) {
+	}
+	public void setContentType(String arg0) {
+	}
+	public void setStatus(int arg0) {
+	}
+	public void setLocale(Locale arg0) {
+	}
+	public void sendRedirect(String arg0) throws IOException {
+		throw new IllegalStateException();
+	}
+//	public void setStatus(int arg0, String arg1) {
+//	}
+	
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/AttributesImplSerializer.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/AttributesImplSerializer.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/AttributesImplSerializer.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,256 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 2003-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: AttributesImplSerializer.java,v 1.1.2.1 2007/01/09 18:57:22 alexsmirnov Exp $
+ */
+
+package org.ajax4jsf.xml.serializer;
+
+import java.util.Hashtable;
+
+import org.xml.sax.Attributes;
+import org.xml.sax.helpers.AttributesImpl;
+
+/**
+ * This class extends org.xml.sax.helpers.AttributesImpl which implements org.
+ * xml.sax.Attributes. But for optimization this class adds a Hashtable for
+ * faster lookup of an index by qName, which is commonly done in the stream
+ * serializer.
+ * 
+ * @see org.xml.sax.Attributes
+ * 
+ * @xsl.usage internal
+ */
+public final class AttributesImplSerializer extends AttributesImpl
+{
+    /**
+     * Hash table of qName/index values to quickly lookup the index
+     * of an attributes qName.  qNames are in uppercase in the hash table
+     * to make the search case insensitive.
+     * 
+     * The keys to the hashtable to find the index are either
+     * "prefix:localName"  or "{uri}localName".
+     */
+    private final Hashtable m_indexFromQName = new Hashtable();
+    
+    private final StringBuffer m_buff = new StringBuffer();
+    
+    /**
+     * This is the number of attributes before switching to the hash table,
+     * and can be tuned, but 12 seems good for now - Brian M.
+     */
+    private static final int MAX = 12;
+    
+    /**
+     * One less than the number of attributes before switching to
+     * the Hashtable.
+     */
+    private static final int MAXMinus1 = MAX - 1;
+
+    /**
+     * This method gets the index of an attribute given its qName.
+     * @param qname the qualified name of the attribute, e.g. "prefix1:locName1"
+     * @return the integer index of the attribute.
+     * @see org.xml.sax.Attributes#getIndex(String)
+     */
+    public final int getIndex(String qname)
+    {
+        int index;
+
+        if (super.getLength() < MAX)
+        {
+            // if we haven't got too many attributes let the
+            // super class look it up
+            index = super.getIndex(qname);
+            return index;
+        }
+        // we have too many attributes and the super class is slow
+        // so find it quickly using our Hashtable.
+        Integer i = (Integer)m_indexFromQName.get(qname);
+        if (i == null)
+            index = -1;
+        else
+            index = i.intValue();
+        return index;
+    }
+    /**
+     * This method adds the attribute, but also records its qName/index pair in
+     * the hashtable for fast lookup by getIndex(qName).
+     * @param uri the URI of the attribute
+     * @param local the local name of the attribute
+     * @param qname the qualified name of the attribute
+     * @param type the type of the attribute
+     * @param val the value of the attribute
+     *
+     * @see org.xml.sax.helpers.AttributesImpl#addAttribute(String, String, String, String, String)
+     * @see #getIndex(String)
+     */
+    public final void addAttribute(
+        String uri,
+        String local,
+        String qname,
+        String type,
+        String val)
+    {
+        int index = super.getLength();
+        super.addAttribute(uri, local, qname, type, val);
+        // (index + 1) is now the number of attributes
+        // so either compare (index+1) to MAX, or compare index to (MAX-1)
+
+        if (index < MAXMinus1)
+        {
+            return;
+        }
+        else if (index == MAXMinus1)
+        {
+            switchOverToHash(MAX);
+        }
+        else
+        {
+            /* add the key with the format of "prefix:localName" */
+            /* we have just added the attibute, its index is the old length */
+            Integer i = new Integer(index);
+            m_indexFromQName.put(qname, i);
+            
+            /* now add with key of the format "{uri}localName" */
+            m_buff.setLength(0);
+            m_buff.append('{').append(uri).append('}').append(local);
+            String key = m_buff.toString();
+            m_indexFromQName.put(key, i);
+        }
+        return;
+    }
+
+    /**
+     * We are switching over to having a hash table for quick look
+     * up of attributes, but up until now we haven't kept any
+     * information in the Hashtable, so we now update the Hashtable.
+     * Future additional attributes will update the Hashtable as
+     * they are added.
+     * @param numAtts
+     */
+    private void switchOverToHash(int numAtts)
+    {
+        for (int index = 0; index < numAtts; index++)
+        {
+            String qName = super.getQName(index);
+            Integer i = new Integer(index);
+            m_indexFromQName.put(qName, i);
+            
+            // Add quick look-up to find with uri/local name pair
+            String uri = super.getURI(index);
+            String local = super.getLocalName(index);
+            m_buff.setLength(0);
+            m_buff.append('{').append(uri).append('}').append(local);
+            String key = m_buff.toString();
+            m_indexFromQName.put(key, i);
+        }
+    }
+
+    /**
+     * This method clears the accumulated attributes.
+     *
+     * @see org.xml.sax.helpers.AttributesImpl#clear()
+     */
+    public final void clear()
+    {
+
+        int len = super.getLength();
+        super.clear();
+        if (MAX <= len)
+        {
+            // if we have had enough attributes and are
+            // using the Hashtable, then clear the Hashtable too.
+            m_indexFromQName.clear();
+        }
+
+    }
+
+    /**
+     * This method sets the attributes, previous attributes are cleared,
+     * it also keeps the hashtable up to date for quick lookup via
+     * getIndex(qName).
+     * @param atts the attributes to copy into these attributes.
+     * @see org.xml.sax.helpers.AttributesImpl#setAttributes(Attributes)
+     * @see #getIndex(String)
+     */
+    public final void setAttributes(Attributes atts)
+    {
+
+        super.setAttributes(atts);
+
+        // we've let the super class add the attributes, but
+        // we need to keep the hash table up to date ourselves for the
+        // potentially new qName/index pairs for quick lookup. 
+        int numAtts = atts.getLength();
+        if (MAX <= numAtts)
+            switchOverToHash(numAtts);
+
+    }
+    
+    /**
+     * This method gets the index of an attribute given its uri and locanName.
+     * @param uri the URI of the attribute name.
+     * @param localName the local namer (after the ':' ) of the attribute name.
+     * @return the integer index of the attribute.
+     * @see org.xml.sax.Attributes#getIndex(String)
+     */
+    public final int getIndex(String uri, String localName)
+    {
+        int index;
+
+        if (super.getLength() < MAX)
+        {
+            // if we haven't got too many attributes let the
+            // super class look it up
+            index = super.getIndex(uri,localName);
+            return index;
+        }
+        // we have too many attributes and the super class is slow
+        // so find it quickly using our Hashtable.
+        // Form the key of format "{uri}localName"
+        m_buff.setLength(0);
+        m_buff.append('{').append(uri).append('}').append(localName);
+        String key = m_buff.toString();
+        Integer i = (Integer)m_indexFromQName.get(key);
+        if (i == null)
+            index = -1;
+        else
+            index = i.intValue();
+        return index;
+    }
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/CharInfo.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/CharInfo.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/CharInfo.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,765 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: CharInfo.java,v 1.1.2.1 2007/01/09 18:57:18 alexsmirnov Exp $
+ */
+package org.ajax4jsf.xml.serializer;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.UnsupportedEncodingException;
+import java.net.URL;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.PropertyResourceBundle;
+import java.util.ResourceBundle;
+
+import javax.xml.transform.TransformerException;
+
+import org.ajax4jsf.xml.serializer.utils.MsgKey;
+import org.ajax4jsf.xml.serializer.utils.SystemIDResolver;
+import org.ajax4jsf.xml.serializer.utils.Utils;
+import org.ajax4jsf.xml.serializer.utils.WrappedRuntimeException;
+
+/**
+ * This class provides services that tell if a character should have
+ * special treatement, such as entity reference substitution or normalization
+ * of a newline character.  It also provides character to entity reference
+ * lookup.
+ *
+ * DEVELOPERS: See Known Issue in the constructor.
+ * 
+ * @xsl.usage internal
+ */
+final class CharInfo
+{
+    /** Given a character, lookup a String to output (e.g. a decorated entity reference). */
+    private Hashtable m_charToString = new Hashtable();
+
+    /**
+     * The name of the HTML entities file.
+     * If specified, the file will be resource loaded with the default class loader.
+     */
+    public static final String HTML_ENTITIES_RESOURCE = 
+                "org.ajax4jsf.xml.serializer.HTMLEntities";
+
+    /**
+     * The name of the XML entities file.
+     * If specified, the file will be resource loaded with the default class loader.
+     */
+    public static final String XML_ENTITIES_RESOURCE = 
+                "org.ajax4jsf.xml.serializer.XMLEntities";
+
+    /** The horizontal tab character, which the parser should always normalize. */
+    public static final char S_HORIZONAL_TAB = 0x09;
+
+    /** The linefeed character, which the parser should always normalize. */
+    public static final char S_LINEFEED = 0x0A;
+
+    /** The carriage return character, which the parser should always normalize. */
+    public static final char S_CARRIAGERETURN = 0x0D;
+    
+    /** This flag is an optimization for HTML entities. It false if entities 
+     * other than quot (34), amp (38), lt (60) and gt (62) are defined
+     * in the range 0 to 127.
+     * @xsl.usage internal
+     */    
+    final boolean onlyQuotAmpLtGt;
+    
+    /** Copy the first 0,1 ... ASCII_MAX values into an array */
+    private static final int ASCII_MAX = 128;
+    
+    /** Array of values is faster access than a set of bits 
+     * to quickly check ASCII characters in attribute values. 
+     */
+    private boolean[] isSpecialAttrASCII = new boolean[ASCII_MAX];
+    
+    /** Array of values is faster access than a set of bits 
+     * to quickly check ASCII characters in text nodes. 
+     */
+    private boolean[] isSpecialTextASCII = new boolean[ASCII_MAX];
+
+    private boolean[] isCleanTextASCII = new boolean[ASCII_MAX];
+
+    /** An array of bits to record if the character is in the set.
+     * Although information in this array is complete, the
+     * isSpecialAttrASCII array is used first because access to its values
+     * is common and faster.
+     */   
+    private int array_of_bits[] = createEmptySetOfIntegers(65535);
+     
+    
+    // 5 for 32 bit words,  6 for 64 bit words ...
+    /*
+     * This constant is used to shift an integer to quickly
+     * calculate which element its bit is stored in.
+     * 5 for 32 bit words (int) ,  6 for 64 bit words (long)
+     */
+    private static final int SHIFT_PER_WORD = 5;
+    
+    /*
+     * A mask to get the low order bits which are used to
+     * calculate the value of the bit within a given word,
+     * that will represent the presence of the integer in the 
+     * set.
+     * 
+     * 0x1F for 32 bit words (int),
+     * or 0x3F for 64 bit words (long) 
+     */
+    private static final int LOW_ORDER_BITMASK = 0x1f;
+    
+    /*
+     * This is used for optimizing the lookup of bits representing
+     * the integers in the set. It is the index of the first element
+     * in the array array_of_bits[] that is not used.
+     */
+    private int firstWordNotUsed;
+
+
+    /**
+     * Constructor that reads in a resource file that describes the mapping of
+     * characters to entity references.
+     * This constructor is private, just to force the use
+     * of the getCharInfo(entitiesResource) factory
+     *
+     * Resource files must be encoded in UTF-8 and can either be properties
+     * files with a .properties extension assumed.  Alternatively, they can
+     * have the following form, with no particular extension assumed:
+     *
+     * <pre>
+     * # First char # is a comment
+     * Entity numericValue
+     * quot 34
+     * amp 38
+     * </pre>
+     *    
+     * @param entitiesResource Name of properties or resource file that should
+     * be loaded, which describes that mapping of characters to entity
+     * references.
+     */
+    private CharInfo(String entitiesResource, String method)
+    {
+        this(entitiesResource, method, false);
+    }
+
+    private CharInfo(String entitiesResource, String method, boolean internal)
+    {
+        ResourceBundle entities = null;
+        boolean noExtraEntities = true;
+
+        // Make various attempts to interpret the parameter as a properties
+        // file or resource file, as follows:
+        //
+        //   1) attempt to load .properties file using ResourceBundle
+        //   2) try using the class loader to find the specified file a resource
+        //      file
+        //   3) try treating the resource a URI
+
+        if (internal) { 
+            try {
+                // Load entity property files by using PropertyResourceBundle,
+                // cause of security issure for applets
+                entities = PropertyResourceBundle.getBundle(entitiesResource);
+            } catch (Exception e) {}
+        }
+
+        if (entities != null) {
+            Enumeration keys = entities.getKeys();
+            while (keys.hasMoreElements()){
+                String name = (String) keys.nextElement();
+                String value = entities.getString(name);
+                int code = Integer.parseInt(value);
+                defineEntity(name, (char) code);
+                if (extraEntity(code))
+                    noExtraEntities = false;
+            }
+            set(S_LINEFEED);
+            set(S_CARRIAGERETURN);
+        } else {
+            InputStream is = null;
+
+            // Load user specified resource file by using URL loading, it
+            // requires a valid URI as parameter
+            try {
+                if (internal) {
+                    is = CharInfo.class.getResourceAsStream(entitiesResource);
+                } else {
+                    ClassLoader cl = ObjectFactory.findClassLoader();
+                    if (cl == null) {
+                        is = ClassLoader.getSystemResourceAsStream(entitiesResource);
+                    } else {
+                        is = cl.getResourceAsStream(entitiesResource);
+                    }
+
+                    if (is == null) {
+                        try {
+                            URL url = new URL(entitiesResource);
+                            is = url.openStream();
+                        } catch (Exception e) {}
+                    }
+                }
+
+                if (is == null) {
+                    throw new RuntimeException(
+                        Utils.messages.createMessage(
+                            MsgKey.ER_RESOURCE_COULD_NOT_FIND,
+                            new Object[] {entitiesResource, entitiesResource}));
+                }
+
+                // Fix Bugzilla#4000: force reading in UTF-8
+                //  This creates the de facto standard that Xalan's resource 
+                //  files must be encoded in UTF-8. This should work in all
+                // JVMs.
+                //
+                // %REVIEW% KNOWN ISSUE: IT FAILS IN MICROSOFT VJ++, which
+                // didn't implement the UTF-8 encoding. Theoretically, we should
+                // simply let it fail in that case, since the JVM is obviously
+                // broken if it doesn't support such a basic standard.  But
+                // since there are still some users attempting to use VJ++ for
+                // development, we have dropped in a fallback which makes a
+                // second attempt using the platform's default encoding. In VJ++
+                // this is apparently ASCII, which is subset of UTF-8... and
+                // since the strings we'll be reading here are also primarily
+                // limited to the 7-bit ASCII range (at least, in English
+                // versions of Xalan), this should work well enough to keep us
+                // on the air until we're ready to officially decommit from
+                // VJ++.
+
+                BufferedReader reader;
+                try {
+                    reader = new BufferedReader(new InputStreamReader(is, "UTF-8"));
+                } catch (UnsupportedEncodingException e) {
+                    reader = new BufferedReader(new InputStreamReader(is));
+                }
+
+                String line = reader.readLine();
+
+                while (line != null) {
+                    if (line.length() == 0 || line.charAt(0) == '#') {
+                        line = reader.readLine();
+
+                        continue;
+                    }
+
+                    int index = line.indexOf(' ');
+
+                    if (index > 1) {
+                        String name = line.substring(0, index);
+
+                        ++index;
+
+                        if (index < line.length()) {
+                            String value = line.substring(index);
+                            index = value.indexOf(' ');
+
+                            if (index > 0) {
+                                value = value.substring(0, index);
+                            }
+
+                            int code = Integer.parseInt(value);
+
+                            defineEntity(name, (char) code);
+                            if (extraEntity(code))
+                                noExtraEntities = false;
+                        }
+                    }
+
+                    line = reader.readLine();
+                }
+
+                is.close();
+                set(S_LINEFEED);
+                set(S_CARRIAGERETURN);
+            } catch (Exception e) {
+                throw new RuntimeException(
+                    Utils.messages.createMessage(
+                        MsgKey.ER_RESOURCE_COULD_NOT_LOAD,
+                        new Object[] { entitiesResource,
+                                       e.toString(),
+                                       entitiesResource,
+                                       e.toString()}));
+            } finally {
+                if (is != null) {
+                    try {
+                        is.close();
+                    } catch (Exception except) {}
+                }
+            }
+        }
+          
+        /* initialize the array isCleanTextASCII[] with a cache of values
+         * for use by ToStream.character(char[], int , int)
+         * and the array isSpecialTextASCII[] with the opposite values
+         * (all in the name of performance!)
+         */
+        for (int ch = 0; ch <ASCII_MAX; ch++)
+        if((((0x20 <= ch || (0x0A == ch || 0x0D == ch || 0x09 == ch)))
+             && (!get(ch))) || ('"' == ch))
+        {
+            isCleanTextASCII[ch] = true;
+            isSpecialTextASCII[ch] = false;
+        }
+        else {
+            isCleanTextASCII[ch] = false;
+            isSpecialTextASCII[ch] = true;     
+        }       
+        
+
+
+        onlyQuotAmpLtGt = noExtraEntities;
+
+        // initialize the array with a cache of the BitSet values
+        for (int i=0; i<ASCII_MAX; i++)
+            isSpecialAttrASCII[i] = get(i);   
+            
+        /* Now that we've used get(ch) just above to initialize the
+         * two arrays we will change by adding a tab to the set of 
+         * special chars for XML (but not HTML!).
+         * We do this because a tab is always a
+         * special character in an XML attribute, 
+         * but only a special character in XML text 
+         * if it has an entity defined for it.
+         * This is the reason for this delay.
+         */
+        if (Method.XML.equals(method)) 
+        {
+            isSpecialAttrASCII[S_HORIZONAL_TAB] = true;
+        }
+    }
+
+    /**
+     * Defines a new character reference. The reference's name and value are
+     * supplied. Nothing happens if the character reference is already defined.
+     * <p>Unlike internal entities, character references are a string to single
+     * character mapping. They are used to map non-ASCII characters both on
+     * parsing and printing, primarily for HTML documents. '&lt;amp;' is an
+     * example of a character reference.</p>
+     *
+     * @param name The entity's name
+     * @param value The entity's value
+     */
+    private void defineEntity(String name, char value)
+    {
+        StringBuffer sb = new StringBuffer("&");
+        sb.append(name);
+        sb.append(';');
+        String entityString = sb.toString();
+        
+        defineChar2StringMapping(entityString, value);
+    }
+
+    private CharKey m_charKey = new CharKey();
+
+    /**
+     * Map a character to a String. For example given
+     * the character '>' this method would return the fully decorated
+     * entity name "&lt;".
+     * Strings for entity references are loaded from a properties file,
+     * but additional mappings defined through calls to defineChar2String()
+     * are possible. Such entity reference mappings could be over-ridden.
+     *
+     * This is reusing a stored key object, in an effort to avoid
+     * heap activity. Unfortunately, that introduces a threading risk.
+     * Simplest fix for now is to make it a synchronized method, or to give
+     * up the reuse; I see very little performance difference between them.
+     * Long-term solution would be to replace the hashtable with a sparse array
+     * keyed directly from the character's integer value; see DTM's
+     * string pool for a related solution.
+     *
+     * @param value The character that should be resolved to
+     * a String, e.g. resolve '>' to  "&lt;".
+     *
+     * @return The String that the character is mapped to, or null if not found.
+     * @xsl.usage internal
+     */
+    synchronized String getOutputStringForChar(char value)
+    {
+        // CharKey m_charKey = new CharKey(); //Alternative to synchronized
+        m_charKey.setChar(value);
+        return (String) m_charToString.get(m_charKey);
+    }
+    
+    /**
+     * Tell if the character argument that is from
+     * an attribute value should have special treatment.
+     * 
+     * @param value the value of a character that is in an attribute value
+     * @return true if the character should have any special treatment, 
+     * such as when writing out attribute values, 
+     * or entity references.
+     * @xsl.usage internal
+     */
+    final boolean isSpecialAttrChar(int value)
+    {
+        // for performance try the values in the boolean array first,
+        // this is faster access than the BitSet for common ASCII values
+
+        if (value < ASCII_MAX)
+            return isSpecialAttrASCII[value];
+
+        // rather than java.util.BitSet, our private
+        // implementation is faster (and less general).
+        return get(value);
+    }    
+
+    /**
+     * Tell if the character argument that is from a 
+     * text node should have special treatment.
+     * 
+     * @param value the value of a character that is in a text node
+     * @return true if the character should have any special treatment, 
+     * such as when writing out attribute values, 
+     * or entity references.
+     * @xsl.usage internal
+     */
+    final boolean isSpecialTextChar(int value)
+    {
+        // for performance try the values in the boolean array first,
+        // this is faster access than the BitSet for common ASCII values
+
+        if (value < ASCII_MAX)
+            return isSpecialTextASCII[value];
+
+        // rather than java.util.BitSet, our private
+        // implementation is faster (and less general).
+        return get(value);
+    }
+    
+    /**
+     * This method is used to determine if an ASCII character in
+     * a text node (not an attribute value) is "clean".
+     * @param value the character to check (0 to 127).
+     * @return true if the character can go to the writer as-is
+     * @xsl.usage internal
+     */
+    final boolean isTextASCIIClean(int value)
+    {
+        return isCleanTextASCII[value];
+    }
+    
+//  In the future one might want to use the array directly and avoid
+//  the method call, but I think the JIT alreay inlines this well enough
+//  so don't do it (for now) - bjm    
+//    public final boolean[] getASCIIClean()
+//    {
+//        return isCleanTextASCII;
+//    }
+
+     
+    private static CharInfo getCharInfoBasedOnPrivilege(
+        final String entitiesFileName, final String method, 
+        final boolean internal){
+            return (CharInfo) AccessController.doPrivileged(
+                new PrivilegedAction() {
+                        public Object run() {
+                            return new CharInfo(entitiesFileName, 
+                              method, internal);}
+            });            
+    }
+     
+    /**
+     * Factory that reads in a resource file that describes the mapping of
+     * characters to entity references.
+     *
+     * Resource files must be encoded in UTF-8 and have a format like:
+     * <pre>
+     * # First char # is a comment
+     * Entity numericValue
+     * quot 34
+     * amp 38
+     * </pre>
+     * (Note: Why don't we just switch to .properties files? Oct-01 -sc)
+     *
+     * @param entitiesResource Name of entities resource file that should
+     * be loaded, which describes that mapping of characters to entity references.
+     * @param method the output method type, which should be one of "xml", "html", "text"...
+     * 
+     * @xsl.usage internal
+     */
+    static CharInfo getCharInfo(String entitiesFileName, String method)
+    {
+        CharInfo charInfo = (CharInfo) m_getCharInfoCache.get(entitiesFileName);
+        if (charInfo != null) {
+            return charInfo;
+        }
+
+        // try to load it internally - cache
+        try {
+            charInfo = getCharInfoBasedOnPrivilege(entitiesFileName, 
+                                        method, true);
+            m_getCharInfoCache.put(entitiesFileName, charInfo);
+            return charInfo;
+        } catch (Exception e) {}
+
+        // try to load it externally - do not cache
+        try {
+            return getCharInfoBasedOnPrivilege(entitiesFileName, 
+                                method, false);
+        } catch (Exception e) {}
+
+        String absoluteEntitiesFileName;
+
+        if (entitiesFileName.indexOf(':') < 0) {
+            absoluteEntitiesFileName =
+                SystemIDResolver.getAbsoluteURIFromRelative(entitiesFileName);
+        } else {
+            try {
+                absoluteEntitiesFileName =
+                    SystemIDResolver.getAbsoluteURI(entitiesFileName, null);
+            } catch (TransformerException te) {
+                throw new WrappedRuntimeException(te);
+            }
+        }
+
+        return getCharInfoBasedOnPrivilege(entitiesFileName, 
+                                method, false);
+    }
+
+    /** Table of user-specified char infos. */
+    private static Hashtable m_getCharInfoCache = new Hashtable();
+
+    /**
+     * Returns the array element holding the bit value for the
+     * given integer
+     * @param i the integer that might be in the set of integers
+     * 
+     */
+    private static int arrayIndex(int i) {
+        return (i >> SHIFT_PER_WORD);
+    }
+
+    /**
+     * For a given integer in the set it returns the single bit
+     * value used within a given word that represents whether
+     * the integer is in the set or not.
+     */
+    private static int bit(int i) {
+        int ret = (1 << (i & LOW_ORDER_BITMASK));
+        return ret;
+    }
+
+    /**
+     * Creates a new empty set of integers (characters)
+     * @param max the maximum integer to be in the set.
+     */
+    private int[] createEmptySetOfIntegers(int max) {
+        firstWordNotUsed = 0; // an optimization 
+
+        int[] arr = new int[arrayIndex(max - 1) + 1];
+            return arr;
+ 
+    }
+
+    /**
+     * Adds the integer (character) to the set of integers.
+     * @param i the integer to add to the set, valid values are 
+     * 0, 1, 2 ... up to the maximum that was specified at
+     * the creation of the set.
+     */
+    private final void set(int i) {   
+        setASCIIdirty(i);
+             
+        int j = (i >> SHIFT_PER_WORD); // this word is used
+        int k = j + 1;       
+        
+        if(firstWordNotUsed < k) // for optimization purposes.
+            firstWordNotUsed = k;
+            
+        array_of_bits[j] |= (1 << (i & LOW_ORDER_BITMASK));
+    }
+
+
+    /**
+     * Return true if the integer (character)is in the set of integers.
+     * 
+     * This implementation uses an array of integers with 32 bits per
+     * integer.  If a bit is set to 1 the corresponding integer is 
+     * in the set of integers.
+     * 
+     * @param i an integer that is tested to see if it is the
+     * set of integers, or not.
+     */
+    private final boolean get(int i) {
+
+        boolean in_the_set = false;
+        int j = (i >> SHIFT_PER_WORD); // wordIndex(i)
+        // an optimization here, ... a quick test to see
+        // if this integer is beyond any of the words in use
+        if(j < firstWordNotUsed)
+            in_the_set = (array_of_bits[j] & 
+                          (1 << (i & LOW_ORDER_BITMASK))
+            ) != 0;  // 0L for 64 bit words
+        return in_the_set;
+    }
+    
+    // record if there are any entities other than
+    // quot, amp, lt, gt  (probably user defined)
+    /**
+     * @return true if the entity 
+     * @param code The value of the character that has an entity defined
+     * for it.
+     */
+    private boolean extraEntity(int entityValue)
+    {
+        boolean extra = false;
+        if (entityValue < 128)
+        {
+            switch (entityValue)
+            {
+                case 34 : // quot
+                case 38 : // amp
+                case 60 : // lt
+                case 62 : // gt
+                    break;
+                default : // other entity in range 0 to 127  
+                    extra = true;
+            }
+        }
+        return extra;
+    }    
+    
+    /**
+     * If the character is a printable ASCII character then
+     * mark it as not clean and needing replacement with
+     * a String on output.
+     * @param ch
+     */
+    private void setASCIIdirty(int j) 
+    {
+        if (0 <= j && j < ASCII_MAX) 
+        {
+            isCleanTextASCII[j] = false;
+            isSpecialTextASCII[j] = true;
+        } 
+    }
+
+    /**
+     * If the character is a printable ASCII character then
+     * mark it as and not needing replacement with
+     * a String on output.
+     * @param ch
+     */    
+    private void setASCIIclean(int j)
+    {
+        if (0 <= j && j < ASCII_MAX) 
+        {        
+            isCleanTextASCII[j] = true;
+            isSpecialTextASCII[j] = false;
+        }
+    }
+    
+    private void defineChar2StringMapping(String outputString, char inputChar) 
+    {
+        CharKey character = new CharKey(inputChar);
+        m_charToString.put(character, outputString);
+        set(inputChar);        
+    }
+
+    /**
+     * Simple class for fast lookup of char values, when used with
+     * hashtables.  You can set the char, then use it as a key.
+     * 
+     * This class is a copy of the one in org.apache.xml.utils. 
+     * It exists to cut the serializers dependancy on that package.
+     *  
+     * @xsl.usage internal
+     */
+    private static class CharKey extends Object
+    {
+
+      /** String value          */
+      private char m_char;
+
+      /**
+       * Constructor CharKey
+       *
+       * @param key char value of this object.
+       */
+      public CharKey(char key)
+      {
+        m_char = key;
+      }
+  
+      /**
+       * Default constructor for a CharKey.
+       *
+       * @param key char value of this object.
+       */
+      public CharKey()
+      {
+      }
+  
+      /**
+       * Get the hash value of the character.  
+       *
+       * @return hash value of the character.
+       */
+      public final void setChar(char c)
+      {
+        m_char = c;
+      }
+
+
+
+      /**
+       * Get the hash value of the character.  
+       *
+       * @return hash value of the character.
+       */
+      public final int hashCode()
+      {
+        return (int)m_char;
+      }
+
+      /**
+       * Override of equals() for this object 
+       *
+       * @param obj to compare to
+       *
+       * @return True if this object equals this string value 
+       */
+      public final boolean equals(Object obj)
+      {
+        return ((CharKey)obj).m_char == m_char;
+      }
+    }
+   
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/DOMSerializer.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/DOMSerializer.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/DOMSerializer.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,85 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: DOMSerializer.java,v 1.1.2.1 2007/01/09 18:57:29 alexsmirnov Exp $
+ */
+package org.ajax4jsf.xml.serializer;
+
+import java.io.IOException;
+
+import org.w3c.dom.Node;
+
+/**
+ * Interface for a DOM serializer implementation.
+ * <p>
+ * The DOMSerializer is a facet of a serializer and is obtained from the
+ * asDOMSerializer() method of the Serializer interface. 
+ * A serializer may or may not support a DOM serializer, if it does not then the 
+ * return value from asDOMSerializer() is null.
+ * <p>
+ * Example:
+ * <pre>
+ * Document     doc;
+ * Serializer   ser;
+ * OutputStream os;
+ * 
+ * ser = ...;
+ * os = ...;
+ *
+ * ser.setOutputStream( os );
+ * DOMSerialzier dser = ser.asDOMSerializer();
+ * dser.serialize(doc);
+ * </pre>
+ * 
+ * @see Serializer
+ * 
+ * @xsl.usage general
+ *
+ */
+public interface DOMSerializer
+{
+    /**
+     * Serializes the DOM node. Throws an exception only if an I/O
+     * exception occured while serializing.
+     * 
+     * This interface is a public API.
+     *
+     * @param node the DOM node to serialize
+     * @throws IOException if an I/O exception occured while serializing
+     */
+    public void serialize(Node node) throws IOException;
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ElemContext.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ElemContext.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ElemContext.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,238 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 2003-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: ElemContext.java,v 1.1.2.1 2007/01/09 18:57:13 alexsmirnov Exp $
+ */
+package org.ajax4jsf.xml.serializer;
+
+/**
+ * This class is a stack frame that consists of 
+ * information about the element currently being processed 
+ * by a serializer. Consider this example:
+ * <pre>
+ *   <A>
+ *     <B1>
+ *     </B1>
+ *     <B2>
+ *     </B2>
+ *   <A>
+ * </pre> 
+ * 
+ * A stack frame will be pushed for "A" at depth 1, 
+ * then another one for "B1" at depth 2.
+ * Then "B1" stackframe is popped.  When the stack frame for "B2" is 
+ * pushed, this implementation re-uses the old stack fram object used
+ * by "B1" to be efficient at not creating too many of these object.
+ * 
+ * This is by no means a public class, and neither are its fields or methods,
+ * they are all helper fields for a serializer.
+ * 
+ * The purpose of this class is to be more consistent with pushing information
+ * when a new element is being serialized and more quickly restoring the old
+ * information about the parent element with a simple pop() when the
+ * child element is done.  Previously there was some redundant and error-prone
+ * calculations going on to retore information.
+ * 
+ * @xsl.usage internal
+ */
+final class ElemContext
+{
+    // Fields that form the context of the element
+
+    /**
+     * The nesting depth of the element inside other elements.
+     */
+    final int m_currentElemDepth;
+
+    /** HTML field, the element description of the HTML element */
+    ElemDesc m_elementDesc = null;
+
+    /**
+     * The local name of the element.
+     */
+    String m_elementLocalName = null;
+
+    /**
+     * The fully qualified name of the element (with prefix, if any).
+     */
+    String m_elementName = null;
+
+    /**
+     * The URI of the element.
+     */
+    String m_elementURI = null;
+
+    /** If the element is in the cdata-section-names list
+     * then the value is true. If it is true the text children of the element
+     * should be output in CDATA section blocks. 
+     */
+    boolean m_isCdataSection;
+
+    /** True if the current element has output escaping disabled.
+     * This is true for SCRIPT and STYLE elements. 
+     */
+    boolean m_isRaw = false;
+
+    /** The next element "stack frame". This value will only be
+     * set once as deeper stack frames are not deleted when popped off,
+     * but are rather re-used when a push is required.
+     * 
+     * This makes for very fast pushing and popping of stack frames 
+     * because very few stack frame objects are ever created, they are
+     * mostly re-used.  This re-use saves object creation but it also means
+     * that connections between the frames via m_next and m_prev
+     * never changes either. Just the contents of the frames change
+     * as they are re-used. Only the reference to the current stack frame, which
+     * is held by the serializer is changed via a quick pop() or push().
+     */
+    private ElemContext m_next;
+
+    /** The previous element "stack frame". */
+    final ElemContext m_prev;
+
+    /**
+     * Set to true when a start tag is started, or open, but not all the
+     * attributes or namespace information is yet collected.
+     */
+    boolean m_startTagOpen = false;
+
+    /**
+     * Constructor to create the root of the element contexts. 
+     *
+     */
+    ElemContext()
+    {
+        // this assignment means can never pop this context off
+        m_prev = this;
+        // depth 0 because it doesn't correspond to any element
+        m_currentElemDepth = 0;
+    }
+
+    /**
+     * Constructor to create the "stack frame" for a given element depth.
+     * 
+     * This implementation will re-use the context at each depth. If
+     * a documents deepest element depth is N then there will be (N+1)
+     * such objects created, no more than that.
+     * 
+     * @param previous The "stack frame" corresponding to the new
+     * elements parent element.
+     */
+    private ElemContext(final ElemContext previous)
+    {
+        m_prev = previous;
+        m_currentElemDepth = previous.m_currentElemDepth + 1;
+    }
+
+    /**
+     * Pop the current "stack frame".
+     * @return Returns the parent "stack frame" of the one popped.
+     */
+    final ElemContext pop()
+    {
+        /* a very simple pop.  No clean up is done of the deeper
+         * stack frame.  All deeper stack frames are still attached
+         * but dormant, just waiting to be re-used.
+         */
+        return this.m_prev;
+    }
+
+    /**
+     * This method pushes an element "stack frame" 
+     * but with no initialization of values in that frame.
+     * This method is used for optimization purposes, like when pushing
+     * a stack frame for an HTML "IMG" tag which has no children and
+     * the stack frame will almost immediately be popped.
+     */
+    final ElemContext push()
+    {
+        ElemContext frame = this.m_next;
+        if (frame == null)
+        {
+            /* We have never been at this depth yet, and there is no
+             * stack frame to re-use, so we now make a new one.
+             */
+            frame = new ElemContext(this);
+            this.m_next = frame;
+        }
+        /*
+         * We shouldn't need to set this true because we should just
+         * be pushing a dummy stack frame that will be instantly popped.
+         * Yet we need to be ready in case this element does have
+         * unexpected children.
+         */
+        frame.m_startTagOpen = true;
+        return frame;
+    }
+    
+    /**
+     * Push an element context on the stack. This context keeps track of
+     * information gathered about the element.
+     * @param uri The URI for the namespace for the element name, 
+     * can be null if it is not yet known.
+     * @param localName The local name of the element (no prefix),  
+     * can be null.
+     * @param qName The qualified name (with prefix, if any) 
+     * of the element, this parameter is required.
+     */
+    final ElemContext push(
+        final String uri,
+        final String localName,
+        final String qName)
+    {
+        ElemContext frame = this.m_next;
+        if (frame == null)
+        {
+            /* We have never been at this depth yet, and there is no
+             * stack frame to re-use, so we now make a new one.
+             */
+            frame = new ElemContext(this);
+            this.m_next = frame;
+        }
+
+        // Initialize, or reset values in the new or re-used stack frame.
+        frame.m_elementName = qName;
+        frame.m_elementLocalName = localName;
+        frame.m_elementURI = uri;
+        frame.m_isCdataSection = false;
+        frame.m_startTagOpen = true;
+
+        // is_Raw is already set in the HTML startElement() method
+        // frame.m_isRaw = false; 
+        return frame;
+    }
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ElemDesc.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ElemDesc.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ElemDesc.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,197 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: ElemDesc.java,v 1.1.2.1 2007/01/09 18:57:28 alexsmirnov Exp $
+ */
+package org.ajax4jsf.xml.serializer;
+
+import org.ajax4jsf.xml.serializer.utils.StringToIntTable;
+
+/**
+ * This class has a series of flags (bit values) that describe an HTML element
+ * 
+ * This class is public because XSLTC uses it, it is not a public API.
+ * 
+ * @xsl.usage internal
+ */
+public final class ElemDesc
+{
+    /** Bit flags to tell about this element type. */
+    private int m_flags;
+
+    /**
+     * Table of attribute names to integers, which contain bit flags telling about
+     *  the attributes.
+     */
+    private StringToIntTable m_attrs = null;
+
+    /** Bit position if this element type is empty. */
+    static final int EMPTY = (1 << 1);
+
+    /** Bit position if this element type is a flow. */
+    private static final int FLOW = (1 << 2);
+
+    /** Bit position if this element type is a block. */
+    static final int BLOCK = (1 << 3);
+
+    /** Bit position if this element type is a block form. */
+    static final int BLOCKFORM = (1 << 4);
+
+    /** Bit position if this element type is a block form field set. */
+    static final int BLOCKFORMFIELDSET = (1 << 5);
+
+    /** Bit position if this element type is CDATA. */
+    private static final int CDATA = (1 << 6);
+
+    /** Bit position if this element type is PCDATA. */
+    private static final int PCDATA = (1 << 7);
+
+    /** Bit position if this element type is should be raw characters. */
+    static final int RAW = (1 << 8);
+
+    /** Bit position if this element type should be inlined. */
+    private static final int INLINE = (1 << 9);
+
+    /** Bit position if this element type is INLINEA. */
+    private static final int INLINEA = (1 << 10);
+
+    /** Bit position if this element type is an inline label. */
+    static final int INLINELABEL = (1 << 11);
+
+    /** Bit position if this element type is a font style. */
+    static final int FONTSTYLE = (1 << 12);
+
+    /** Bit position if this element type is a phrase. */
+    static final int PHRASE = (1 << 13);
+
+    /** Bit position if this element type is a form control. */
+    static final int FORMCTRL = (1 << 14);
+
+    /** Bit position if this element type is ???. */
+    static final int SPECIAL = (1 << 15);
+
+    /** Bit position if this element type is ???. */
+    static final int ASPECIAL = (1 << 16);
+
+    /** Bit position if this element type is an odd header element. */
+    static final int HEADMISC = (1 << 17);
+
+    /** Bit position if this element type is a head element (i.e. H1, H2, etc.) */
+    static final int HEAD = (1 << 18);
+
+    /** Bit position if this element type is a list. */
+    static final int LIST = (1 << 19);
+
+    /** Bit position if this element type is a preformatted type. */
+    static final int PREFORMATTED = (1 << 20);
+
+    /** Bit position if this element type is whitespace sensitive. */
+    static final int WHITESPACESENSITIVE = (1 << 21);
+
+    /** Bit position if this element type is a header element (i.e. HEAD). */
+    static final int HEADELEM = (1 << 22);
+    
+    /** Bit position if this element is the "HTML" element */
+    private static final int HTMLELEM = (1 << 23);
+
+    /** Bit position if this attribute type is a URL. */
+    public static final int ATTRURL = (1 << 1);
+
+    /** Bit position if this attribute type is an empty type. */
+    public static final int ATTREMPTY = (1 << 2);
+
+    /**
+     * Construct an ElemDesc from a set of bit flags.
+     *
+     *
+     * @param flags Bit flags that describe the basic properties of this element type.
+     */
+    ElemDesc(int flags)
+    {
+        m_flags = flags;
+    }
+
+    /**
+     * Tell if this element type has the basic bit properties that are passed
+     * as an argument.
+     *
+     * @param flags Bit flags that describe the basic properties of interest.
+     *
+     * @return true if any of the flag bits are true.
+     */
+    private boolean is(int flags)
+    {
+
+        // int which = (m_flags & flags);
+        return (m_flags & flags) != 0;
+    }
+
+    int getFlags() {
+        return m_flags;
+    }
+
+    /**
+     * Set an attribute name and it's bit properties.
+     *
+     *
+     * @param name non-null name of attribute, in upper case.
+     * @param flags flag bits.
+     */
+    void setAttr(String name, int flags)
+    {
+
+        if (null == m_attrs)
+            m_attrs = new StringToIntTable();
+
+        m_attrs.put(name, flags);
+    }
+
+    /**
+     * Tell if any of the bits of interest are set for a named attribute type.
+     *
+     * @param name non-null reference to attribute name, in any case.
+     * @param flags flag mask.
+     *
+     * @return true if any of the flags are set for the named attribute.
+     */
+    public boolean isAttrFlagSet(String name, int flags)
+    {
+        return (null != m_attrs)
+            ? ((m_attrs.getIgnoreCase(name) & flags) != 0)
+            : false;
+    }
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/EmptySerializer.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/EmptySerializer.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/EmptySerializer.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,776 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 2003-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: EmptySerializer.java,v 1.1.2.1 2007/01/09 18:57:13 alexsmirnov Exp $
+ */
+package org.ajax4jsf.xml.serializer;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.Writer;
+import java.util.Hashtable;
+import java.util.Properties;
+import java.util.Vector;
+
+import javax.xml.transform.SourceLocator;
+import javax.xml.transform.Transformer;
+
+import org.w3c.dom.Node;
+import org.xml.sax.Attributes;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.Locator;
+import org.xml.sax.SAXException;
+import org.xml.sax.SAXParseException;
+
+/**
+ * This class is an adapter class. Its only purpose is to be extended and
+ * for that extended class to over-ride all methods that are to be used. 
+ * 
+ * This class is not a public API, it is only public because it is used
+ * across package boundaries.
+ * 
+ * @xsl.usage internal
+ */
+public class EmptySerializer implements SerializationHandler
+{
+    protected static final String ERR = "EmptySerializer method not over-ridden";
+    /**
+     * @see SerializationHandler#asContentHandler()
+     */
+    
+    protected void couldThrowIOException() throws IOException
+    {
+        return; // don't do anything.
+    }
+    
+    protected void couldThrowSAXException() throws SAXException
+    {
+        return; // don't do anything.
+    }
+    
+    protected void couldThrowSAXException(char[] chars, int off, int len) throws SAXException
+    {
+        return; // don't do anything.
+    }
+    
+    protected void couldThrowSAXException(String elemQName) throws SAXException
+    {
+        return; // don't do anything.
+    }
+    
+    protected void couldThrowException() throws Exception
+    {
+        return; // don't do anything.
+    }
+
+    void aMethodIsCalled()
+    {
+
+        // throw new RuntimeException(err);
+        return;
+    }
+  
+    
+    /**
+     * @see SerializationHandler#asContentHandler()
+     */
+    public ContentHandler asContentHandler() throws IOException
+    {
+        couldThrowIOException();
+        return null;
+    }
+    /**
+     * @see SerializationHandler#setContentHandler(org.xml.sax.ContentHandler)
+     */
+    public void setContentHandler(ContentHandler ch)
+    {
+        aMethodIsCalled();
+    }
+    /**
+     * @see SerializationHandler#close()
+     */
+    public void close()
+    {
+        aMethodIsCalled();
+    }
+    /**
+     * @see SerializationHandler#getOutputFormat()
+     */
+    public Properties getOutputFormat()
+    {
+        aMethodIsCalled();
+        return null;
+    }
+    /**
+     * @see SerializationHandler#getOutputStream()
+     */
+    public OutputStream getOutputStream()
+    {
+        aMethodIsCalled();
+        return null;
+    }
+    /**
+     * @see SerializationHandler#getWriter()
+     */
+    public Writer getWriter()
+    {
+        aMethodIsCalled();
+        return null;
+    }
+    /**
+     * @see SerializationHandler#reset()
+     */
+    public boolean reset()
+    {
+        aMethodIsCalled();
+        return false;
+    }
+    /**
+     * @see SerializationHandler#serialize(org.w3c.dom.Node)
+     */
+    public void serialize(Node node) throws IOException
+    {
+        couldThrowIOException();
+    }
+    /**
+     * @see SerializationHandler#setCdataSectionElements(java.util.Vector)
+     */
+    public void setCdataSectionElements(Vector URI_and_localNames)
+    {
+        aMethodIsCalled();
+    }
+    /**
+     * @see SerializationHandler#setEscaping(boolean)
+     */
+    public boolean setEscaping(boolean escape) throws SAXException
+    {
+        couldThrowSAXException();
+        return false;
+    }
+    /**
+     * @see SerializationHandler#setIndent(boolean)
+     */
+    public void setIndent(boolean indent)
+    {
+        aMethodIsCalled();
+    }
+    /**
+     * @see SerializationHandler#setIndentAmount(int)
+     */
+    public void setIndentAmount(int spaces)
+    {
+        aMethodIsCalled();
+    }
+    /**
+     * @see SerializationHandler#setOutputFormat(java.util.Properties)
+     */
+    public void setOutputFormat(Properties format)
+    {
+        aMethodIsCalled();
+    }
+    /**
+     * @see SerializationHandler#setOutputStream(java.io.OutputStream)
+     */
+    public void setOutputStream(OutputStream output)
+    {
+        aMethodIsCalled();
+    }
+    /**
+     * @see SerializationHandler#setVersion(java.lang.String)
+     */
+    public void setVersion(String version)
+    {
+        aMethodIsCalled();
+    }
+    /**
+     * @see SerializationHandler#setWriter(java.io.Writer)
+     */
+    public void setWriter(Writer writer)
+    {
+        aMethodIsCalled();
+    }
+    /**
+     * @see SerializationHandler#setTransformer(javax.xml.transform.Transformer)
+     */
+    public void setTransformer(Transformer transformer)
+    {
+        aMethodIsCalled();
+    }
+    /**
+     * @see SerializationHandler#getTransformer()
+     */
+    public Transformer getTransformer()
+    {
+        aMethodIsCalled();
+        return null;
+    }
+    /**
+     * @see SerializationHandler#flushPending()
+     */
+    public void flushPending() throws SAXException
+    {
+        couldThrowSAXException();
+    }
+    /**
+     * @see ExtendedContentHandler#addAttribute(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)
+     */
+    public void addAttribute(
+        String uri,
+        String localName,
+        String rawName,
+        String type,
+        String value,
+        boolean XSLAttribute)        
+        throws SAXException
+    {
+        couldThrowSAXException();
+    }
+    /**
+     * @see ExtendedContentHandler#addAttributes(org.xml.sax.Attributes)
+     */
+    public void addAttributes(Attributes atts) throws SAXException
+    {
+        couldThrowSAXException();
+    }
+    /**
+     * @see ExtendedContentHandler#addAttribute(java.lang.String, java.lang.String)
+     */
+    public void addAttribute(String name, String value)
+    {
+        aMethodIsCalled();
+    }
+
+    /**
+     * @see ExtendedContentHandler#characters(java.lang.String)
+     */
+    public void characters(String chars) throws SAXException
+    {
+        couldThrowSAXException();
+    }
+    /**
+     * @see ExtendedContentHandler#endElement(java.lang.String)
+     */
+    public void endElement(String elemName) throws SAXException
+    {
+        couldThrowSAXException();
+    }
+    /**
+     * @see ExtendedContentHandler#startDocument()
+     */
+    public void startDocument() throws SAXException
+    {
+        couldThrowSAXException();
+    }
+    /**
+     * @see ExtendedContentHandler#startElement(java.lang.String, java.lang.String, java.lang.String)
+     */
+    public void startElement(String uri, String localName, String qName)
+        throws SAXException
+    {
+        couldThrowSAXException(qName);
+    }
+    /**
+     * @see ExtendedContentHandler#startElement(java.lang.String)
+     */
+    public void startElement(String qName) throws SAXException
+    {
+        couldThrowSAXException(qName);
+    }
+    /**
+     * @see ExtendedContentHandler#namespaceAfterStartElement(java.lang.String, java.lang.String)
+     */
+    public void namespaceAfterStartElement(String uri, String prefix)
+        throws SAXException
+    {
+        couldThrowSAXException();
+    }
+    /**
+     * @see ExtendedContentHandler#startPrefixMapping(java.lang.String, java.lang.String, boolean)
+     */
+    public boolean startPrefixMapping(
+        String prefix,
+        String uri,
+        boolean shouldFlush)
+        throws SAXException
+    {
+        couldThrowSAXException();
+        return false;
+    }
+    /**
+     * @see ExtendedContentHandler#entityReference(java.lang.String)
+     */
+    public void entityReference(String entityName) throws SAXException
+    {
+        couldThrowSAXException();
+    }
+    /**
+     * @see ExtendedContentHandler#getNamespaceMappings()
+     */
+    public NamespaceMappings getNamespaceMappings()
+    {
+        aMethodIsCalled();
+        return null;
+    }
+    /**
+     * @see ExtendedContentHandler#getPrefix(java.lang.String)
+     */
+    public String getPrefix(String uri)
+    {
+        aMethodIsCalled();
+        return null;
+    }
+    /**
+     * @see ExtendedContentHandler#getNamespaceURI(java.lang.String, boolean)
+     */
+    public String getNamespaceURI(String name, boolean isElement)
+    {
+        aMethodIsCalled();
+        return null;
+    }
+    /**
+     * @see ExtendedContentHandler#getNamespaceURIFromPrefix(java.lang.String)
+     */
+    public String getNamespaceURIFromPrefix(String prefix)
+    {
+        aMethodIsCalled();
+        return null;
+    }
+    /**
+     * @see org.xml.sax.ContentHandler#setDocumentLocator(org.xml.sax.Locator)
+     */
+    public void setDocumentLocator(Locator arg0)
+    {
+        aMethodIsCalled();
+    }
+    /**
+     * @see org.xml.sax.ContentHandler#endDocument()
+     */
+    public void endDocument() throws SAXException
+    {
+        couldThrowSAXException();
+    }
+    /**
+     * @see org.xml.sax.ContentHandler#startPrefixMapping(java.lang.String, java.lang.String)
+     */
+    public void startPrefixMapping(String arg0, String arg1)
+        throws SAXException
+    {
+        couldThrowSAXException();
+    }
+    /**
+     * @see org.xml.sax.ContentHandler#endPrefixMapping(java.lang.String)
+     */
+    public void endPrefixMapping(String arg0) throws SAXException
+    {
+        couldThrowSAXException();
+    }
+    /**
+     * @see org.xml.sax.ContentHandler#startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)
+     */
+    public void startElement(
+        String arg0,
+        String arg1,
+        String arg2,
+        Attributes arg3)
+        throws SAXException
+    {
+        couldThrowSAXException();
+    }
+    /**
+     * @see org.xml.sax.ContentHandler#endElement(java.lang.String, java.lang.String, java.lang.String)
+     */
+    public void endElement(String arg0, String arg1, String arg2)
+        throws SAXException
+    {
+        couldThrowSAXException();
+    }
+    /**
+     * @see org.xml.sax.ContentHandler#characters(char[], int, int)
+     */
+    public void characters(char[] arg0, int arg1, int arg2) throws SAXException
+    {
+        couldThrowSAXException(arg0, arg1, arg2);
+    }
+    /**
+     * @see org.xml.sax.ContentHandler#ignorableWhitespace(char[], int, int)
+     */
+    public void ignorableWhitespace(char[] arg0, int arg1, int arg2)
+        throws SAXException
+    {
+        couldThrowSAXException();
+    }
+    /**
+     * @see org.xml.sax.ContentHandler#processingInstruction(java.lang.String, java.lang.String)
+     */
+    public void processingInstruction(String arg0, String arg1)
+        throws SAXException
+    {
+        couldThrowSAXException();
+    }
+    /**
+     * @see org.xml.sax.ContentHandler#skippedEntity(java.lang.String)
+     */
+    public void skippedEntity(String arg0) throws SAXException
+    {
+        couldThrowSAXException();
+    }
+    /**
+     * @see ExtendedLexicalHandler#comment(java.lang.String)
+     */
+    public void comment(String comment) throws SAXException
+    {
+        couldThrowSAXException();
+    }
+    /**
+     * @see org.xml.sax.ext.LexicalHandler#startDTD(java.lang.String, java.lang.String, java.lang.String)
+     */
+    public void startDTD(String arg0, String arg1, String arg2)
+        throws SAXException
+    {
+        couldThrowSAXException();
+    }
+    /**
+     * @see org.xml.sax.ext.LexicalHandler#endDTD()
+     */
+    public void endDTD() throws SAXException
+    {
+        couldThrowSAXException();
+    }
+    /**
+     * @see org.xml.sax.ext.LexicalHandler#startEntity(java.lang.String)
+     */
+    public void startEntity(String arg0) throws SAXException
+    {
+        couldThrowSAXException();
+    }
+    /**
+     * @see org.xml.sax.ext.LexicalHandler#endEntity(java.lang.String)
+     */
+    public void endEntity(String arg0) throws SAXException
+    {
+        couldThrowSAXException();
+    }
+    /**
+     * @see org.xml.sax.ext.LexicalHandler#startCDATA()
+     */
+    public void startCDATA() throws SAXException
+    {
+        couldThrowSAXException();
+    }
+    /**
+     * @see org.xml.sax.ext.LexicalHandler#endCDATA()
+     */
+    public void endCDATA() throws SAXException
+    {
+        couldThrowSAXException();
+    }
+    /**
+     * @see org.xml.sax.ext.LexicalHandler#comment(char[], int, int)
+     */
+    public void comment(char[] arg0, int arg1, int arg2) throws SAXException
+    {
+        couldThrowSAXException();
+    }
+    /**
+     * @see XSLOutputAttributes#getDoctypePublic()
+     */
+    public String getDoctypePublic()
+    {
+        aMethodIsCalled();
+        return null;
+    }
+    /**
+     * @see XSLOutputAttributes#getDoctypeSystem()
+     */
+    public String getDoctypeSystem()
+    {
+        aMethodIsCalled();
+        return null;
+    }
+    /**
+     * @see XSLOutputAttributes#getEncoding()
+     */
+    public String getEncoding()
+    {
+        aMethodIsCalled();
+        return null;
+    }
+    /**
+     * @see XSLOutputAttributes#getIndent()
+     */
+    public boolean getIndent()
+    {
+        aMethodIsCalled();
+        return false;
+    }
+    /**
+     * @see XSLOutputAttributes#getIndentAmount()
+     */
+    public int getIndentAmount()
+    {
+        aMethodIsCalled();
+        return 0;
+    }
+    /**
+     * @see XSLOutputAttributes#getMediaType()
+     */
+    public String getMediaType()
+    {
+        aMethodIsCalled();
+        return null;
+    }
+    /**
+     * @see XSLOutputAttributes#getOmitXMLDeclaration()
+     */
+    public boolean getOmitXMLDeclaration()
+    {
+        aMethodIsCalled();
+        return false;
+    }
+    /**
+     * @see XSLOutputAttributes#getStandalone()
+     */
+    public String getStandalone()
+    {
+        aMethodIsCalled();
+        return null;
+    }
+    /**
+     * @see XSLOutputAttributes#getVersion()
+     */
+    public String getVersion()
+    {
+        aMethodIsCalled();
+        return null;
+    }
+    /**
+     * @see XSLOutputAttributes#setCdataSectionElements
+     */
+    public void setCdataSectionElements(Hashtable h) throws Exception
+    {
+        couldThrowException();
+    }
+    /**
+     * @see XSLOutputAttributes#setDoctype(java.lang.String, java.lang.String)
+     */
+    public void setDoctype(String system, String pub)
+    {
+        aMethodIsCalled();
+    }
+    /**
+     * @see XSLOutputAttributes#setDoctypePublic(java.lang.String)
+     */
+    public void setDoctypePublic(String doctype)
+    {
+        aMethodIsCalled();
+    }
+    /**
+     * @see XSLOutputAttributes#setDoctypeSystem(java.lang.String)
+     */
+    public void setDoctypeSystem(String doctype)
+    {
+        aMethodIsCalled();
+    }
+    /**
+     * @see XSLOutputAttributes#setEncoding(java.lang.String)
+     */
+    public void setEncoding(String encoding)
+    {
+        aMethodIsCalled();
+    }
+    /**
+     * @see XSLOutputAttributes#setMediaType(java.lang.String)
+     */
+    public void setMediaType(String mediatype)
+    {
+        aMethodIsCalled();
+    }
+    /**
+     * @see XSLOutputAttributes#setOmitXMLDeclaration(boolean)
+     */
+    public void setOmitXMLDeclaration(boolean b)
+    {
+        aMethodIsCalled();
+    }
+    /**
+     * @see XSLOutputAttributes#setStandalone(java.lang.String)
+     */
+    public void setStandalone(String standalone)
+    {
+        aMethodIsCalled();
+    }
+    /**
+     * @see org.xml.sax.ext.DeclHandler#elementDecl(java.lang.String, java.lang.String)
+     */
+    public void elementDecl(String arg0, String arg1) throws SAXException
+    {
+        couldThrowSAXException();
+    }
+    /**
+     * @see org.xml.sax.ext.DeclHandler#attributeDecl(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)
+     */
+    public void attributeDecl(
+        String arg0,
+        String arg1,
+        String arg2,
+        String arg3,
+        String arg4)
+        throws SAXException
+    {
+        couldThrowSAXException();
+    }
+    /**
+     * @see org.xml.sax.ext.DeclHandler#internalEntityDecl(java.lang.String, java.lang.String)
+     */
+    public void internalEntityDecl(String arg0, String arg1)
+        throws SAXException
+    {
+        couldThrowSAXException();
+    }
+    /**
+     * @see org.xml.sax.ext.DeclHandler#externalEntityDecl(java.lang.String, java.lang.String, java.lang.String)
+     */
+    public void externalEntityDecl(String arg0, String arg1, String arg2)
+        throws SAXException
+    {
+        couldThrowSAXException();
+    }
+    /**
+     * @see org.xml.sax.ErrorHandler#warning(org.xml.sax.SAXParseException)
+     */
+    public void warning(SAXParseException arg0) throws SAXException
+    {
+        couldThrowSAXException();
+    }
+    /**
+     * @see org.xml.sax.ErrorHandler#error(org.xml.sax.SAXParseException)
+     */
+    public void error(SAXParseException arg0) throws SAXException
+    {
+        couldThrowSAXException();
+    }
+    /**
+     * @see org.xml.sax.ErrorHandler#fatalError(org.xml.sax.SAXParseException)
+     */
+    public void fatalError(SAXParseException arg0) throws SAXException
+    {
+        couldThrowSAXException();
+    }
+    /**
+     * @see Serializer#asDOMSerializer()
+     */
+    public DOMSerializer asDOMSerializer() throws IOException
+    {
+        couldThrowIOException();
+        return null;
+    }
+
+    /**
+     * @see SerializationHandler#setNamespaceMappings(NamespaceMappings)
+     */
+    public void setNamespaceMappings(NamespaceMappings mappings) {
+        aMethodIsCalled();
+    }
+    
+    /**
+     * @see ExtendedContentHandler#setSourceLocator(javax.xml.transform.SourceLocator)
+     */
+    public void setSourceLocator(SourceLocator locator)
+    {
+        aMethodIsCalled();
+    }
+
+    /**
+     * @see ExtendedContentHandler#addUniqueAttribute(java.lang.String, java.lang.String, int)
+     */
+    public void addUniqueAttribute(String name, String value, int flags)
+        throws SAXException
+    {
+        couldThrowSAXException();
+    }
+
+    /**
+     * @see ExtendedContentHandler#characters(org.w3c.dom.Node)
+     */
+    public void characters(Node node) throws SAXException
+    {
+        couldThrowSAXException();        
+    }
+    
+    /**
+     * @see ExtendedContentHandler#addXSLAttribute(java.lang.String, java.lang.String, java.lang.String)
+     */
+    public void addXSLAttribute(String qName, String value, String uri)
+    {
+        aMethodIsCalled();        
+    }
+
+    /**
+     * @see ExtendedContentHandler#addAttribute(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)
+     */
+    public void addAttribute(String uri, String localName, String rawName, String type, String value) throws SAXException 
+    {
+        couldThrowSAXException();        
+    }
+    /**
+     * @see org.xml.sax.DTDHandler#notationDecl(java.lang.String, java.lang.String, java.lang.String)
+     */
+    public void notationDecl(String arg0, String arg1, String arg2) throws SAXException 
+    {
+        couldThrowSAXException(); 
+    }
+
+    /**
+     * @see org.xml.sax.DTDHandler#unparsedEntityDecl(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
+     */
+    public void unparsedEntityDecl(
+        String arg0,
+        String arg1,
+        String arg2,
+        String arg3)
+        throws SAXException {
+        couldThrowSAXException();
+    }
+
+    /**
+     * @see SerializationHandler#setDTDEntityExpansion(boolean)
+     */
+    public void setDTDEntityExpansion(boolean expand) {
+        aMethodIsCalled();
+
+    }
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/EncodingInfo.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/EncodingInfo.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/EncodingInfo.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,528 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: EncodingInfo.java,v 1.1.2.1 2007/01/09 18:57:25 alexsmirnov Exp $
+ */
+package org.ajax4jsf.xml.serializer;
+
+
+/**
+ * Holds information about a given encoding, which is the Java name for the
+ * encoding, the equivalent ISO name.
+ * <p>
+ * An object of this type has two useful methods
+ * <pre>
+ * isInEncoding(char ch);
+ * </pre>
+ * which can be called if the character is not the high one in
+ * a surrogate pair and:
+ * <pre>
+ * isInEncoding(char high, char low);
+ * </pre>
+ * which can be called if the two characters from a high/low surrogate pair.
+ * <p>
+ * An EncodingInfo object is a node in a binary search tree. Such a node
+ * will answer if a character is in the encoding, and do so for a given
+ * range of unicode values (<code>m_first</code> to
+ * <code>m_last</code>). It will handle a certain range of values
+ * explicitly (<code>m_explFirst</code> to <code>m_explLast</code>).
+ * If the unicode point is before that explicit range, that is it
+ * is in the range <code>m_first <= value < m_explFirst</code>, then it will delegate to another EncodingInfo object for The root
+ * of such a tree, m_before.  Likewise for values in the range 
+ * <code>m_explLast < value <= m_last</code>, but delgating to <code>m_after</code>
+ * <p>
+ * Actually figuring out if a code point is in the encoding is expensive. So the
+ * purpose of this tree is to cache such determinations, and not to build the
+ * entire tree of information at the start, but only build up as much of the 
+ * tree as is used during the transformation.
+ * <p>
+ * This Class is not a public API, and should only be used internally within
+ * the serializer.
+ * 
+ * @xsl.usage internal
+ */
+public final class EncodingInfo extends Object
+{
+
+    /**
+     * The ISO encoding name.
+     */
+    final String name;
+
+    /**
+     * The name used by the Java convertor.
+     */
+    final String javaName;
+    
+    /**
+     * A helper object that we can ask if a
+     * single char, or a surrogate UTF-16 pair
+     * of chars that form a single character,
+     * is in this encoding.
+     */
+    private InEncoding m_encoding;
+    
+    /**
+     * This is not a public API. It returns true if the
+     * char in question is in the encoding.
+     * @param ch the char in question.
+     * @xsl.usage internal
+     */
+    public boolean isInEncoding(char ch) {
+        if (m_encoding == null) {
+            m_encoding = new EncodingImpl();
+            
+            // One could put alternate logic in here to
+            // instantiate another object that implements the
+            // InEncoding interface. For example if the JRE is 1.4 or up
+            // we could have an object that uses JRE 1.4 methods
+        }
+        return m_encoding.isInEncoding(ch); 
+    }
+    
+    /**
+     * This is not a public API. It returns true if the
+     * character formed by the high/low pair is in the encoding.
+     * @param high a char that the a high char of a high/low surrogate pair.
+     * @param low a char that is the low char of a high/low surrogate pair.
+     * @xsl.usage internal
+     */
+    public boolean isInEncoding(char high, char low) {
+        if (m_encoding == null) {
+            m_encoding = new EncodingImpl();
+            
+            // One could put alternate logic in here to
+            // instantiate another object that implements the
+            // InEncoding interface. For example if the JRE is 1.4 or up
+            // we could have an object that uses JRE 1.4 methods
+        }
+        return m_encoding.isInEncoding(high, low); 
+    }
+
+    /**
+     * Create an EncodingInfo object based on the ISO name and Java name.
+     * If both parameters are null any character will be considered to
+     * be in the encoding. This is useful for when the serializer is in
+     * temporary output state, and has no assciated encoding.
+     *
+     * @param name reference to the ISO name.
+     * @param javaName reference to the Java encoding name.
+     */
+    public EncodingInfo(String name, String javaName)
+    {
+
+        this.name = name;
+        this.javaName = javaName;
+    }
+    
+    
+    
+    /**
+     * A simple interface to isolate the implementation.
+     * We could also use some new JRE 1.4 methods in another implementation
+     * provided we use reflection with them.
+     * <p>
+     * This interface is not a public API,
+     * and should only be used internally within the serializer. 
+     * @xsl.usage internal
+     */
+    private interface InEncoding {
+        /**
+         * Returns true if the char is in the encoding
+         */
+        public boolean isInEncoding(char ch);
+        /**
+         * Returns true if the high/low surrogate pair forms
+         * a character that is in the encoding.
+         */
+        public boolean isInEncoding(char high, char low);
+    }
+
+    /**
+     * This class implements the 
+     */
+    private class EncodingImpl implements InEncoding {
+        
+
+
+        public boolean isInEncoding(char ch1) {
+            final boolean ret;
+            int codePoint = Encodings.toCodePoint(ch1);
+            if (codePoint < m_explFirst) {
+                // The unicode value is before the range
+                // that we explictly manage, so we delegate the answer.
+                
+                // If we don't have an m_before object to delegate to, make one.
+                if (m_before == null)
+                    m_before =
+                        new EncodingImpl(
+                            m_encoding,
+                            m_first,
+                            m_explFirst - 1,
+                            codePoint);
+                ret = m_before.isInEncoding(ch1);
+            } else if (m_explLast < codePoint) {
+                // The unicode value is after the range
+                // that we explictly manage, so we delegate the answer.
+                
+                // If we don't have an m_after object to delegate to, make one.
+                if (m_after == null)
+                    m_after =
+                        new EncodingImpl(
+                            m_encoding,
+                            m_explLast + 1,
+                            m_last,
+                            codePoint);
+                ret = m_after.isInEncoding(ch1);
+            } else {
+                // The unicode value is in the range we explitly handle
+                final int idx = codePoint - m_explFirst;
+                
+                // If we already know the answer, just return it.
+                if (m_alreadyKnown[idx])
+                    ret = m_isInEncoding[idx];
+                else {
+                    // We don't know the answer, so find out,
+                    // which may be expensive, then cache the answer 
+                    ret = inEncoding(ch1, m_encoding);
+                    m_alreadyKnown[idx] = true;
+                    m_isInEncoding[idx] = ret;
+                }
+            }
+            return ret;
+        }
+
+        public boolean isInEncoding(char high, char low) {
+            final boolean ret;
+            int codePoint = Encodings.toCodePoint(high,low);
+            if (codePoint < m_explFirst) {
+                // The unicode value is before the range
+                // that we explictly manage, so we delegate the answer.
+                
+                // If we don't have an m_before object to delegate to, make one.
+                if (m_before == null)
+                    m_before =
+                        new EncodingImpl(
+                            m_encoding,
+                            m_first,
+                            m_explFirst - 1,
+                            codePoint);
+                ret = m_before.isInEncoding(high,low);
+            } else if (m_explLast < codePoint) {
+                // The unicode value is after the range
+                // that we explictly manage, so we delegate the answer.
+                
+                // If we don't have an m_after object to delegate to, make one.
+                if (m_after == null)
+                    m_after =
+                        new EncodingImpl(
+                            m_encoding,
+                            m_explLast + 1,
+                            m_last,
+                            codePoint);
+                ret = m_after.isInEncoding(high,low);
+            } else {
+                // The unicode value is in the range we explitly handle
+                final int idx = codePoint - m_explFirst;
+                
+                // If we already know the answer, just return it.
+                if (m_alreadyKnown[idx])
+                    ret = m_isInEncoding[idx];
+                else {
+                    // We don't know the answer, so find out,
+                    // which may be expensive, then cache the answer 
+                    ret = inEncoding(high, low, m_encoding);
+                    m_alreadyKnown[idx] = true;
+                    m_isInEncoding[idx] = ret;
+                }
+            }
+            return ret;
+        }
+
+        /**
+         * The encoding.
+         */
+        final private String m_encoding;
+        /**
+         * m_first through m_last is the range of unicode
+         * values that this object will return an answer on.
+         * It may delegate to a similar object with a different
+         * range
+         */
+        final private int m_first;
+        
+        /**
+         * m_explFirst through m_explLast is the range of unicode
+         * value that this object handles explicitly and does not
+         * delegate to a similar object.
+         */
+        final private int m_explFirst;
+        final private int m_explLast;
+        final private int m_last;
+
+        /**
+         * The object, of the same type as this one,
+         * that handles unicode values in a range before
+         * the range explictly handled by this object, and
+         * to which this object may delegate.
+         */
+        private InEncoding m_before;
+        /**
+         * The object, of the same type as this one,
+         * that handles unicode values in a range after
+         * the range explictly handled by this object, and
+         * to which this object may delegate.
+         */
+        private InEncoding m_after;
+        
+        /**
+         * The number of unicode values explicitly handled
+         * by a single EncodingInfo object. This value is 
+         * tuneable, but is set to 128 because that covers the
+         * entire low range of ASCII type chars within a single
+         * object.
+         */
+        private static final int RANGE = 128;
+
+        /**
+         * A flag to record if we already know the answer
+         * for the given unicode value.
+         */
+        final private boolean m_alreadyKnown[] = new boolean[RANGE];
+        /**
+         * A table holding the answer on whether the given unicode
+         * value is in the encoding.
+         */
+        final private boolean m_isInEncoding[] = new boolean[RANGE];
+        
+        private EncodingImpl() {
+            // This object will answer whether any unicode value
+            // is in the encoding, it handles values 0 through Integer.MAX_VALUE
+            this(javaName, 0, Integer.MAX_VALUE, (char) 0);
+        }
+
+        private EncodingImpl(String encoding, int first, int last, int codePoint) {
+            // Set the range of unicode values that this object manages
+            // either explicitly or implicitly.
+            m_first = first;
+            m_last = last;  
+                      
+            // Set the range of unicode values that this object 
+            // explicitly manages
+            m_explFirst = codePoint;
+            m_explLast = codePoint + (RANGE-1);  
+            
+            m_encoding = encoding;
+            
+            if (javaName != null)
+            {
+                // Some optimization.
+                if (0 <= m_explFirst && m_explFirst <= 127) {
+                    // This particular EncodingImpl explicitly handles
+                    // characters in the low range.
+                    if ("UTF8".equals(javaName)
+                        || "UTF-16".equals(javaName)
+                        || "ASCII".equals(javaName)
+                        || "US-ASCII".equals(javaName)
+                        || "Unicode".equals(javaName)
+                        || "UNICODE".equals(javaName)
+                        || javaName.startsWith("ISO8859")) {
+                        
+                        // Not only does this EncodingImpl object explicitly
+                        // handle chracters in the low range, it is
+                        // also one that we know something about, without
+                        // needing to call inEncoding(char ch, String encoding)
+                        // for this low range
+                        //
+                        // By initializing the table ahead of time
+                        // for these low values, we prevent the expensive
+                        // inEncoding(char ch, String encoding)
+                        // from being called, at least for these common
+                        // encodings.
+                        for (int unicode = 1; unicode < 127; unicode++) {
+                            final int idx = unicode - m_explFirst;
+                            if (0 <= idx && idx < RANGE) {
+                                m_alreadyKnown[idx] = true;
+                                m_isInEncoding[idx] = true;
+                            }
+                        }
+                    }
+                }
+
+                /* A little bit more than optimization.
+                 * 
+                 * We will say that any character is in the encoding if
+                 * we don't have an encoding.
+                 * This is meaningful when the serializer is being used
+                 * in temporary output state, where we are not writing to
+                 * the final output tree.  It is when writing to the
+                 * final output tree that we need to worry about the output
+                 * encoding
+                 */
+                if (javaName == null) {
+                    for (int idx = 0; idx < m_alreadyKnown.length; idx++) {
+                        m_alreadyKnown[idx] = true;
+                        m_isInEncoding[idx] = true;
+                    }
+                }
+            }
+        }
+    }
+
+    /**
+     * This is heart of the code that determines if a given character
+     * is in the given encoding. This method is probably expensive,
+     * and the answer should be cached.
+     * <p>
+     * This method is not a public API,
+     * and should only be used internally within the serializer.
+     * @param ch the char in question, that is not a high char of
+     * a high/low surrogate pair.
+     * @param encoding the Java name of the enocding.
+     * 
+     * @xsl.usage internal
+     * 
+     */
+    private static boolean inEncoding(char ch, String encoding) {
+        boolean isInEncoding;
+        try {
+            char cArray[] = new char[1];
+            cArray[0] = ch;
+            // Construct a String from the char 
+            String s = new String(cArray);
+            // Encode the String into a sequence of bytes 
+            // using the given, named charset. 
+            byte[] bArray = s.getBytes(encoding);
+            isInEncoding = inEncoding(ch, bArray);
+
+        } catch (Exception e) {
+            isInEncoding = false;
+            
+            // If for some reason the encoding is null, e.g.
+            // for a temporary result tree, we should just
+            // say that every character is in the encoding.
+            if (encoding == null)
+            	isInEncoding = true;
+        }
+        return isInEncoding;
+    }
+    
+    /**
+     * This is heart of the code that determines if a given high/low
+     * surrogate pair forms a character that is in the given encoding.
+     * This method is probably expensive, and the answer should be cached. 
+     * <p>
+     * This method is not a public API,
+     * and should only be used internally within the serializer.
+     * @param high the high char of
+     * a high/low surrogate pair.
+     * @param low the low char of a high/low surrogate pair.
+     * @param encoding the Java name of the encoding.
+     * 
+     * @xsl.usage internal
+     * 
+     */ 
+    private static boolean inEncoding(char high, char low, String encoding) {
+        boolean isInEncoding;
+        try {
+            char cArray[] = new char[2];
+            cArray[0] = high;
+            cArray[1] = low;
+            // Construct a String from the char 
+            String s = new String(cArray);
+            // Encode the String into a sequence of bytes 
+            // using the given, named charset. 
+            byte[] bArray = s.getBytes(encoding);
+            isInEncoding = inEncoding(high,bArray);
+        } catch (Exception e) {
+            isInEncoding = false;
+        }
+        
+        return isInEncoding;
+    } 
+    
+    /**
+     * This method is the core of determining if character
+     * is in the encoding. The method is not foolproof, because
+     * s.getBytes(encoding) has specified behavior only if the
+     * characters are in the specified encoding. However this
+     * method tries it's best.
+     * @param ch the char that was converted using getBytes, or
+     * the first char of a high/low pair that was converted.
+     * @param data the bytes written out by the call to s.getBytes(encoding);
+     * @return true if the character is in the encoding.
+     */
+    private static boolean inEncoding(char ch, byte[] data) {
+        final boolean isInEncoding;
+        // If the string written out as data is not in the encoding,
+        // the output is not specified according to the documentation
+        // on the String.getBytes(encoding) method,
+        // but we do our best here.        
+        if (data==null || data.length == 0) {
+            isInEncoding = false;
+        }
+        else {
+            if (data[0] == 0)
+                isInEncoding = false;
+            else if (data[0] == '?' && ch != '?')
+                isInEncoding = false;
+            /*
+             * else if (isJapanese) {
+             *   // isJapanese is really 
+             *   //   (    "EUC-JP".equals(javaName) 
+             *   //    ||  "EUC_JP".equals(javaName)
+             *  //     ||  "SJIS".equals(javaName)   )
+             * 
+             *   // Work around some bugs in JRE for Japanese
+             *   if(data[0] == 0x21)
+             *     isInEncoding = false;
+             *   else if (ch == 0xA5)
+             *     isInEncoding = false;
+             *   else
+             *     isInEncoding = true;
+             * }
+             */ 
+                
+            else {
+                // We don't know for sure, but it looks like it is in the encoding
+                isInEncoding = true; 
+            }
+        }
+        return isInEncoding;
+    }
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/Encodings.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/Encodings.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/Encodings.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,472 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: Encodings.java,v 1.1.2.1 2007/01/09 18:57:26 alexsmirnov Exp $
+ */
+package org.ajax4jsf.xml.serializer;
+
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.io.UnsupportedEncodingException;
+import java.io.Writer;
+import java.net.URL;
+import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.Properties;
+import java.util.StringTokenizer;
+
+
+/**
+ * Provides information about encodings. Depends on the Java runtime
+ * to provides writers for the different encodings.
+ * 
+ * This class is only for internal use within Xalan. However, it is used directly
+ * by org.apache.xalan.xsltc.compiler.Output.
+ *
+ * @xsl.usage internal
+ */
+
+public final class Encodings extends Object
+{
+    /**
+     * Standard filename for properties file with encodings data.
+     */
+    private static final String ENCODINGS_FILE = "org/ajax4jsf/xml/serializer/Encodings.properties";
+
+    /**
+     * Standard filename for properties file with encodings data.
+     */
+    private static final String ENCODINGS_PROP = "org.apache.xalan.serialize.encodings";
+
+    /**
+     * Returns a writer for the specified encoding based on
+     * an output stream.
+     * <p>
+     * This is not a public API.
+     * @param output The output stream
+     * @param encoding The encoding
+     * @return A suitable writer
+     * @throws UnsupportedEncodingException There is no convertor
+     *  to support this encoding
+     * @xsl.usage internal
+     */
+    static Writer getWriter(OutputStream output, String encoding)
+        throws UnsupportedEncodingException
+    {
+
+        for (int i = 0; i < _encodings.length; ++i)
+        {
+            if (_encodings[i].name.equalsIgnoreCase(encoding))
+            {
+                try
+                {
+                    return new OutputStreamWriter(
+                        output,
+                        _encodings[i].javaName);
+                }
+                catch (java.lang.IllegalArgumentException iae) // java 1.1.8
+                {
+                    // keep trying
+                }
+                catch (UnsupportedEncodingException usee)
+                {
+
+                    // keep trying
+                }
+            }
+        }
+
+        try
+        {
+            return new OutputStreamWriter(output, encoding);
+        }
+        catch (java.lang.IllegalArgumentException iae) // java 1.1.8
+        {
+            throw new UnsupportedEncodingException(encoding);
+        }
+    }
+
+    /**
+     * Returns the EncodingInfo object for the specified
+     * encoding.
+     * <p>
+     * This is not a public API.
+     *
+     * @param encoding The encoding
+     * @return The object that is used to determine if 
+     * characters are in the given encoding.
+     * @xsl.usage internal
+     */
+    static EncodingInfo getEncodingInfo(String encoding)
+    {
+        EncodingInfo ei;
+
+        String normalizedEncoding = toUpperCaseFast(encoding);
+        ei = (EncodingInfo) _encodingTableKeyJava.get(normalizedEncoding);
+        if (ei == null)
+            ei = (EncodingInfo) _encodingTableKeyMime.get(normalizedEncoding);
+        if (ei == null) {
+            // We shouldn't have to do this, but just in case.
+            ei = new EncodingInfo(null,null);
+        }
+
+        return ei;
+    }
+ 
+    /**
+     * A fast and cheap way to uppercase a String that is
+     * only made of printable ASCII characters.
+     * <p>
+     * This is not a public API.
+     * @param s a String of ASCII characters
+     * @return an uppercased version of the input String,
+     * possibly the same String.
+     * @xsl.usage internal
+     */
+    static private String toUpperCaseFast(final String s) {
+
+    	boolean different = false;
+    	final int mx = s.length();
+		char[] chars = new char[mx];
+    	for (int i=0; i < mx; i++) {
+    		char ch = s.charAt(i);
+            // is the character a lower case ASCII one?
+    		if ('a' <= ch && ch <= 'z') {
+                // a cheap and fast way to uppercase that is good enough
+    			ch = (char) (ch + ('A' - 'a'));
+    			different = true; // the uppercased String is different
+    		}
+    		chars[i] = ch;
+    	}
+    	
+    	// A little optimization, don't call String.valueOf() if
+    	// the uppercased string is the same as the input string.
+    	final String upper;
+    	if (different) 
+    		upper = String.valueOf(chars);
+    	else
+    		upper = s;
+    		
+    	return upper;
+    }
+
+    /** The default encoding, ISO style, ISO style.   */
+    static final String DEFAULT_MIME_ENCODING = "UTF-8";
+
+    /**
+     * Get the proper mime encoding.  From the XSLT recommendation: "The encoding
+     * attribute specifies the preferred encoding to use for outputting the result
+     * tree. XSLT processors are required to respect values of UTF-8 and UTF-16.
+     * For other values, if the XSLT processor does not support the specified
+     * encoding it may signal an error; if it does not signal an error it should
+     * use UTF-8 or UTF-16 instead. The XSLT processor must not use an encoding
+     * whose name does not match the EncName production of the XML Recommendation
+     * [XML]. If no encoding attribute is specified, then the XSLT processor should
+     * use either UTF-8 or UTF-16."
+     * <p>
+     * This is not a public API.
+     *
+     * @param encoding Reference to java-style encoding string, which may be null,
+     * in which case a default will be found.
+     *
+     * @return The ISO-style encoding string, or null if failure.
+     * @xsl.usage internal
+     */
+    static String getMimeEncoding(String encoding)
+    {
+
+        if (null == encoding)
+        {
+            try
+            {
+
+                // Get the default system character encoding.  This may be
+                // incorrect if they passed in a writer, but right now there
+                // seems to be no way to get the encoding from a writer.
+                encoding = System.getProperty("file.encoding", "UTF8");
+
+                if (null != encoding)
+                {
+
+                    /*
+                    * See if the mime type is equal to UTF8.  If you don't
+                    * do that, then  convertJava2MimeEncoding will convert
+                    * 8859_1 to "ISO-8859-1", which is not what we want,
+                    * I think, and I don't think I want to alter the tables
+                    * to convert everything to UTF-8.
+                    */
+                    String jencoding =
+                        (encoding.equalsIgnoreCase("Cp1252")
+                            || encoding.equalsIgnoreCase("ISO8859_1")
+                            || encoding.equalsIgnoreCase("8859_1")
+                            || encoding.equalsIgnoreCase("UTF8"))
+                            ? DEFAULT_MIME_ENCODING
+                            : convertJava2MimeEncoding(encoding);
+
+                    encoding =
+                        (null != jencoding) ? jencoding : DEFAULT_MIME_ENCODING;
+                }
+                else
+                {
+                    encoding = DEFAULT_MIME_ENCODING;
+                }
+            }
+            catch (SecurityException se)
+            {
+                encoding = DEFAULT_MIME_ENCODING;
+            }
+        }
+        else
+        {
+            encoding = convertJava2MimeEncoding(encoding);
+        }
+
+        return encoding;
+    }
+
+    /**
+     * Try the best we can to convert a Java encoding to a XML-style encoding.
+     * <p>
+     * This is not a public API.
+     * @param encoding non-null reference to encoding string, java style.
+     *
+     * @return ISO-style encoding string.
+     * @xsl.usage internal
+     */
+    private static String convertJava2MimeEncoding(String encoding)
+    {
+        EncodingInfo enc =
+            (EncodingInfo) _encodingTableKeyJava.get(toUpperCaseFast(encoding));
+        if (null != enc)
+            return enc.name;
+        return encoding;
+    }
+
+    /**
+     * Try the best we can to convert a Java encoding to a XML-style encoding.
+     * <p>
+     * This is not a public API.
+     *
+     * @param encoding non-null reference to encoding string, java style.
+     *
+     * @return ISO-style encoding string.
+     *
+     * @xsl.usage internal
+     */
+    public static String convertMime2JavaEncoding(String encoding)
+    {
+
+        for (int i = 0; i < _encodings.length; ++i)
+        {
+            if (_encodings[i].name.equalsIgnoreCase(encoding))
+            {
+                return _encodings[i].javaName;
+            }
+        }
+
+        return encoding;
+    }
+
+    /**
+     * Load a list of all the supported encodings.
+     *
+     * System property "encodings" formatted using URL syntax may define an
+     * external encodings list. Thanks to Sergey Ushakov for the code
+     * contribution!
+     * @xsl.usage internal
+     */
+    private static EncodingInfo[] loadEncodingInfo()
+    {
+        URL url = null;
+        try
+        {
+            String urlString = null;
+            InputStream is = null;
+
+            try
+            {
+                urlString = System.getProperty(ENCODINGS_PROP, "");
+            }
+            catch (SecurityException e)
+            {
+            }
+
+            if (urlString != null && urlString.length() > 0) {
+                url = new URL(urlString);
+                is = url.openStream();
+            }
+
+            if (is == null) {
+                SecuritySupport ss = SecuritySupport.getInstance();
+                is = ss.getResourceAsStream(ObjectFactory.findClassLoader(),
+                                            ENCODINGS_FILE);
+            }
+
+            Properties props = new Properties();
+            if (is != null) {
+                props.load(is);
+                is.close();
+            } else {
+                // Seems to be no real need to force failure here, let the
+                // system do its best... The issue is not really very critical,
+                // and the output will be in any case _correct_ though maybe not
+                // always human-friendly... :)
+                // But maybe report/log the resource problem?
+                // Any standard ways to report/log errors (in static context)?
+            }
+
+            int totalEntries = props.size();
+            int totalMimeNames = 0;
+            Enumeration keys = props.keys();
+            for (int i = 0; i < totalEntries; ++i)
+            {
+                String javaName = (String) keys.nextElement();
+                String val = props.getProperty(javaName);
+                totalMimeNames++;
+                int pos = val.indexOf(' ');
+                for (int j = 0; j < pos; ++j)
+                    if (val.charAt(j) == ',')
+                        totalMimeNames++;
+            }
+            EncodingInfo[] ret = new EncodingInfo[totalMimeNames];
+            int j = 0;
+            keys = props.keys();
+            for (int i = 0; i < totalEntries; ++i)
+            {
+                String javaName = (String) keys.nextElement();
+                String val = props.getProperty(javaName);
+                int pos = val.indexOf(' ');
+                String mimeName;
+                //int lastPrintable;
+                if (pos < 0)
+                {
+                    // Maybe report/log this problem?
+                    //  "Last printable character not defined for encoding " +
+                    //  mimeName + " (" + val + ")" ...
+                    mimeName = val;
+                   // lastPrintable = 0x00FF;
+                }
+                else
+                {
+//                    lastPrintable =
+//                        Integer.decode(val.substring(pos).trim()).intValue();
+                    StringTokenizer st =
+                        new StringTokenizer(val.substring(0, pos), ",");
+                    for (boolean first = true;
+                        st.hasMoreTokens();
+                        first = false)
+                    {
+                        mimeName = st.nextToken();
+                        ret[j] =
+                            new EncodingInfo(mimeName, javaName);
+                        _encodingTableKeyMime.put(
+                            mimeName.toUpperCase(),
+                            ret[j]);
+                        if (first)
+                            _encodingTableKeyJava.put(
+                                javaName.toUpperCase(),
+                                ret[j]);
+                        j++;
+                    }
+                }
+            }
+            return ret;
+        }
+        catch (java.net.MalformedURLException mue)
+        {
+            throw new org.ajax4jsf.xml.serializer.utils.WrappedRuntimeException(mue);
+        }
+        catch (java.io.IOException ioe)
+        {
+            throw new org.ajax4jsf.xml.serializer.utils.WrappedRuntimeException(ioe);
+        }
+    }
+
+    /**
+     * Return true if the character is the high member of a surrogate pair.
+     * <p>
+     * This is not a public API.
+     * @param ch the character to test
+     * @xsl.usage internal
+     */
+    static boolean isHighUTF16Surrogate(char ch) {
+        return ('\uD800' <= ch && ch <= '\uDBFF');
+    }
+    /**
+     * Return true if the character is the low member of a surrogate pair.
+     * <p>
+     * This is not a public API.
+     * @param ch the character to test
+     * @xsl.usage internal
+     */
+    static boolean isLowUTF16Surrogate(char ch) {
+        return ('\uDC00' <= ch && ch <= '\uDFFF');
+    }
+    /**
+     * Return the unicode code point represented by the high/low surrogate pair.
+     * <p>
+     * This is not a public API.
+     * @param highSurrogate the high char of the high/low pair
+     * @param lowSurrogate the low char of the high/low pair
+     * @xsl.usage internal
+     */
+    static int toCodePoint(char highSurrogate, char lowSurrogate) {
+        int codePoint =
+            ((highSurrogate - 0xd800) << 10)
+                + (lowSurrogate - 0xdc00)
+                + 0x10000;
+        return codePoint;
+    }
+    /**
+     * Return the unicode code point represented by the char.
+     * A bit of a dummy method, since all it does is return the char,
+     * but as an int value.
+     * <p>
+     * This is not a public API.
+     * @param ch the char.
+     * @xsl.usage internal
+     */
+    static int toCodePoint(char ch) {
+        int codePoint = ch;
+        return codePoint;
+    }
+
+    private static final Hashtable _encodingTableKeyJava = new Hashtable();
+    private static final Hashtable _encodingTableKeyMime = new Hashtable();
+    private static final EncodingInfo[] _encodings = loadEncodingInfo();
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ExtendedContentHandler.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ExtendedContentHandler.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ExtendedContentHandler.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,290 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 2003-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: ExtendedContentHandler.java,v 1.1.2.1 2007/01/09 18:57:26 alexsmirnov Exp $
+ */
+package org.ajax4jsf.xml.serializer;
+
+import javax.xml.transform.SourceLocator;
+
+import org.xml.sax.SAXException;
+
+/**
+ * This interface describes extensions to the SAX ContentHandler interface.
+ * It is intended to be used by a serializer. The methods on this interface will
+ * implement SAX- like behavior. This allows the gradual collection of
+ * information rather than having it all up front. For example the call
+ * <pre>
+ * startElement(namespaceURI,localName,qName,atts)
+ * </pre>
+ * could be replaced with the calls
+ * <pre>
+ * startElement(namespaceURI,localName,qName)
+ * addAttributes(atts)
+ * </pre>
+ * If there are no attributes the second call can be dropped. If attributes are
+ * to be added one at a time with calls to
+ * <pre>
+ * addAttribute(namespaceURI, localName, qName, type, value)
+ * </pre>
+ * @xsl.usage internal
+ */
+abstract interface ExtendedContentHandler extends org.xml.sax.ContentHandler
+{
+    /**
+     * Add at attribute to the current element
+     * @param uri the namespace URI of the attribute name
+     * @param localName the local name of the attribute (without prefix)
+     * @param rawName the qualified name of the attribute
+     * @param type the attribute type typically character data (CDATA)
+     * @param value the value of the attribute
+     * @param XSLAttribute true if the added attribute is coming from an xsl:attribute element
+     * @throws SAXException
+     */
+    public void addAttribute(
+        String uri,
+        String localName,
+        String rawName,
+        String type,
+        String value,
+        boolean XSLAttribute)
+        throws SAXException;
+    /**
+     * Add attributes to the current element
+     * @param atts the attributes to add.
+     * @throws SAXException
+     */
+    public void addAttributes(org.xml.sax.Attributes atts)
+        throws org.xml.sax.SAXException;
+    /**
+     * Add an attribute to the current element. The namespace URI of the
+     * attribute will be calculated from the prefix of qName. The local name
+     * will be derived from qName and the type will be assumed to be "CDATA".
+     * @param qName
+     * @param value
+     */
+    public void addAttribute(String qName, String value);
+    
+    /**
+     * This method is used to notify of a character event, but passing the data
+     * as a character String rather than the standard character array.
+     * @param chars the character data
+     * @throws SAXException
+     */
+    public void characters(String chars) throws SAXException;
+    
+    /**
+     * This method is used to notify of a character event, but passing the data
+     * as a DOM Node rather than the standard character array.
+     * @param node a DOM Node containing text.
+     * @throws SAXException
+     */    
+    public void characters(org.w3c.dom.Node node) throws org.xml.sax.SAXException;
+    /**
+     * This method is used to notify that an element has ended. Unlike the
+     * standard SAX method
+     * <pre>
+     * endElement(namespaceURI,localName,qName)
+     * </pre>
+     * only the last parameter is passed. If needed the serializer can derive
+     * the localName from the qualified name and derive the namespaceURI from
+     * its implementation.
+     * @param elemName the fully qualified element name.
+     * @throws SAXException
+     */
+    public void endElement(String elemName) throws SAXException;
+
+    /**
+     * This method is used to notify that an element is starting.
+     * This method is just like the standard SAX method
+     * <pre>
+     * startElement(uri,localName,qname,atts)
+     * </pre>
+     * but without the attributes.
+     * @param uri the namespace URI of the element
+     * @param localName the local name (without prefix) of the element
+     * @param qName the qualified name of the element
+     * 
+     * @throws SAXException
+     */
+    public void startElement(String uri, String localName, String qName)
+        throws org.xml.sax.SAXException;
+
+    /**
+     * This method is used to notify of the start of an element
+     * @param qName the fully qualified name of the element
+     * @throws SAXException
+     */
+    public void startElement(String qName) throws SAXException;
+    /**
+     * This method is used to notify that a prefix mapping is to start, but
+     * after an element is started. The SAX method call
+     * <pre>
+     * startPrefixMapping(prefix,uri)
+     * </pre>
+     * is used just before an element starts and applies to the element to come,
+     * not to the current element.  This method applies to the current element.
+     * For example one could make the calls in this order:
+     * <pre>
+     * startElement("prfx8:elem9")
+     * namespaceAfterStartElement("http://namespace8","prfx8")
+     * </pre>
+     * 
+     * @param uri the namespace URI being declared
+     * @param prefix the prefix that maps to the given namespace
+     * @throws SAXException
+     */
+    public void namespaceAfterStartElement(String uri, String prefix)
+        throws SAXException;
+
+    /**
+     * This method is used to notify that a prefix maping is to start, which can
+     * be for the current element, or for the one to come.
+     * @param prefix the prefix that maps to the given URI
+     * @param uri the namespace URI of the given prefix
+     * @param shouldFlush if true this call is like the SAX
+     * startPrefixMapping(prefix,uri) call and the mapping applies to the
+     * element to come.  If false the mapping applies to the current element.
+     * @return boolean false if the prefix mapping was already in effect (in
+     * other words we are just re-declaring), true if this is a new, never
+     * before seen mapping for the element.
+     * @throws SAXException
+     */
+    public boolean startPrefixMapping(
+        String prefix,
+        String uri,
+        boolean shouldFlush)
+        throws SAXException;
+    /**
+     * Notify of an entity reference.
+     * @param entityName the name of the entity
+     * @throws SAXException
+     */
+    public void entityReference(String entityName) throws SAXException;
+
+    /**
+     * This method returns an object that has the current namespace mappings in
+     * effect.
+     * 
+     * @return NamespaceMappings an object that has the current namespace
+     * mappings in effect.
+     */
+    public NamespaceMappings getNamespaceMappings();
+    /**
+     * This method returns the prefix that currently maps to the given namespace
+     * URI.
+     * @param uri the namespace URI
+     * @return String the prefix that currently maps to the given URI.
+     */
+    public String getPrefix(String uri);
+    /**
+     * This method gets the prefix associated with a current element or
+     * attribute name.
+     * @param name the qualified name of an element, or attribute
+     * @param isElement true if it is an element name, false if it is an
+     * atttribute name
+     * @return String the namespace URI associated with the element or
+     * attribute.
+     */
+    public String getNamespaceURI(String name, boolean isElement);
+    /**
+     * This method returns the namespace URI currently associated with the
+     * prefix.
+     * @param prefix a prefix of an element or attribute.
+     * @return String the namespace URI currently associated with the prefix.
+     */
+    public String getNamespaceURIFromPrefix(String prefix);
+
+    /**
+     * This method is used to set the source locator, which might be used to
+     * generated an error message.
+     * @param locator the source locator
+     */
+    public void setSourceLocator(SourceLocator locator);
+
+    // Bit constants for addUniqueAttribute().
+    
+    // The attribute value contains no bad characters. A "bad" character is one which
+    // is greater than 126 or it is one of '<', '>', '&' or '"'.
+    public static final int NO_BAD_CHARS = 0x1;
+    
+    // An HTML empty attribute (e.g. <OPTION selected>).
+    public static final int HTML_ATTREMPTY = 0x2;
+    
+    // An HTML URL attribute
+    public static final int HTML_ATTRURL = 0x4;
+
+    /**
+     * Add a unique attribute to the current element.
+     * The attribute is guaranteed to be unique here. The serializer can write
+     * it out immediately without saving it in a table first. The integer
+     * flag contains information about the attribute, which helps the serializer
+     * to decide whether a particular processing is needed.
+     *
+     * @param qName the fully qualified attribute name.
+     * @param value the attribute value
+     * @param flags a bitwise flag
+     */
+    public void addUniqueAttribute(String qName, String value, int flags)
+        throws SAXException;
+    
+    /**
+     * Add an attribute from an xsl:attribute element.
+     * @param qName the qualified attribute name (prefix:localName)
+     * @param value the attributes value
+     * @param uri the uri that the prefix of the qName is mapped to.
+     */    
+    public void addXSLAttribute(String qName, final String value, final String uri);
+    
+    /**
+     * Add at attribute to the current element, not from an xsl:attribute
+     * element.
+     * @param uri the namespace URI of the attribute name
+     * @param localName the local name of the attribute (without prefix)
+     * @param rawName the qualified name of the attribute
+     * @param type the attribute type typically character data (CDATA)
+     * @param value the value of the attribute
+     * @throws SAXException
+     */
+    public void addAttribute(
+        String uri,
+        String localName,
+        String rawName,
+        String type,
+        String value)
+        throws SAXException;
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ExtendedLexicalHandler.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ExtendedLexicalHandler.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ExtendedLexicalHandler.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,58 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 2003-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: ExtendedLexicalHandler.java,v 1.1.2.1 2007/01/09 18:57:17 alexsmirnov Exp $
+ */
+package org.ajax4jsf.xml.serializer;
+
+import org.xml.sax.SAXException;
+
+/**
+ * This interface has extensions to the standard SAX LexicalHandler interface.
+ * This interface is intended to be used by a serializer.
+ * @xsl.usage internal
+ */
+abstract interface ExtendedLexicalHandler extends org.xml.sax.ext.LexicalHandler
+{
+    /**
+     * This method is used to notify of a comment
+     * @param comment the comment, but unlike the SAX comment() method this
+     * method takes a String rather than a character array.
+     * @throws SAXException
+     */
+    public void comment(String comment) throws SAXException;
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/Method.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/Method.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/Method.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,95 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: Method.java,v 1.1.2.1 2007/01/09 18:57:27 alexsmirnov Exp $
+ */
+package org.ajax4jsf.xml.serializer;
+
+/**
+ * This class defines the constants which are the names of the four default
+ * output methods.
+ * <p>
+ * Three default output methods are defined: XML, HTML, and TEXT. 
+ * These constants can be used as an argument to the
+ * OutputPropertiesFactory.getDefaultMethodProperties() method to get
+ * the properties to create a serializer.
+ * 
+ * This class is a public API.
+ * 
+ * @see OutputPropertiesFactory
+ * @see Serializer
+ * 
+ * @xsl.usage general
+ */
+public final class Method
+{
+    /**
+     * A private constructor to prevent the creation of such a class.
+     */
+    private Method() {
+        
+    }
+
+  /**
+   * The output method type for XML documents: <tt>xml</tt>.
+   */
+  public static final String XML = "xml";
+
+  /**
+   * The output method type for HTML documents: <tt>html</tt>.
+   */
+  public static final String HTML = "html";
+
+  /**
+   * The output method for XHTML documents,
+   * this method type is not currently supported: <tt>xhtml</tt>.
+   */
+  public static final String XHTML = "xhtml";
+
+  /**
+   * The output method type for text documents: <tt>text</tt>.
+   */
+  public static final String TEXT = "text";
+  
+  /**
+   * The "internal" method, just used when no method is 
+   * specified in the style sheet, and a serializer of this type wraps either an
+   * XML or HTML type (depending on the first tag in the output being html or
+   * not)
+   */  
+  public static final String UNKNOWN = "";
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/NamespaceMappings.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/NamespaceMappings.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/NamespaceMappings.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,346 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 2003-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: NamespaceMappings.java,v 1.1.2.1 2007/01/09 18:57:19 alexsmirnov Exp $
+ */
+package org.ajax4jsf.xml.serializer;
+
+import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.Stack;
+
+import org.xml.sax.ContentHandler;
+import org.xml.sax.SAXException;
+
+/**
+ * This class keeps track of the currently defined namespaces. Conceptually the
+ * prefix/uri/depth triplets are pushed on a stack pushed on a stack. The depth
+ * indicates the nesting depth of the element for which the mapping was made.
+ * 
+ * <p>For example:
+ * <pre>
+ * <chapter xmlns:p1="def">
+ *   <paragraph xmlns:p2="ghi">
+ *      <sentance xmlns:p3="jkl">
+ *      </sentance>
+ *    </paragraph>
+ *    <paragraph xlmns:p4="mno">
+ *    </paragraph>
+ * </chapter>
+ * </pre>
+ * 
+ * When the <chapter> element is encounted the prefix "p1" associated with uri
+ * "def" is pushed on the stack with depth 1.
+ * When the first <paragraph> is encountered "p2" and "ghi" are pushed with
+ * depth 2.
+ * When the <sentance> is encountered "p3" and "jkl" are pushed with depth 3.
+ * When </sentance> occurs the popNamespaces(3) will pop "p3"/"jkl" off the
+ * stack.  Of course popNamespaces(2) would pop anything with depth 2 or
+ * greater.
+ * 
+ * So prefix/uri pairs are pushed and poped off the stack as elements are
+ * processed.  At any given moment of processing the currently visible prefixes
+ * are on the stack and a prefix can be found given a uri, or a uri can be found
+ * given a prefix.
+ * 
+ * This class is public only because it is used by Xalan. It is not a public API
+ * 
+ * @xsl.usage internal
+ */
+public class NamespaceMappings
+{
+    /**
+     * This member is continually incremented when new prefixes need to be
+     * generated. ("ns0"  "ns1" ...)
+     */
+    private int count = 0;
+
+    /**
+     * Each entry (prefix) in this hashtable points to a Stack of URIs
+     * This table maps a prefix (String) to a Stack of prefix mappings.
+     * All mappings in that retrieved stack have the same prefix,
+     * though possibly different URI's or depths. Such a stack must have
+     * mappings at deeper depths push later on such a stack.  Mappings pushed
+     * earlier on the stack will have smaller values for MappingRecord.m_declarationDepth.
+     */
+    private Hashtable m_namespaces = new Hashtable();
+
+    /** 
+     * The top of this stack contains the MapRecord
+     * of the last declared a namespace.
+     * Used to know how many prefix mappings to pop when leaving
+     * the current element depth.
+     * For every prefix mapping the current element depth is 
+     * pushed on this stack.
+     * That way all prefixes pushed at the current depth can be 
+     * removed at the same time.
+     * Used to ensure prefix/uri map scopes are closed correctly
+     *
+     */
+    private Stack m_nodeStack = new Stack();
+
+    private static final String EMPTYSTRING = "";
+    private static final String XML_PREFIX = "xml"; // was "xmlns"
+
+    /**
+     * Default constructor
+     * @see java.lang.Object#Object()
+     */
+    public NamespaceMappings()
+    {
+        initNamespaces();
+    }
+
+    /**
+     * This method initializes the namespace object with appropriate stacks
+     * and predefines a few prefix/uri pairs which always exist.
+     */
+    private void initNamespaces()
+    {
+ 
+
+        // Define the default namespace (initially maps to "" uri)
+        Stack stack;
+        m_namespaces.put(EMPTYSTRING, stack = new Stack());
+        stack.push(new MappingRecord(EMPTYSTRING,EMPTYSTRING,0));
+
+        m_namespaces.put(XML_PREFIX, stack = new Stack());
+        stack.push(new MappingRecord( XML_PREFIX,
+            "http://www.w3.org/XML/1998/namespace",0));
+
+        m_nodeStack.push(new MappingRecord(null,null,-1));
+
+    }
+
+    /**
+     * Use a namespace prefix to lookup a namespace URI.
+     * 
+     * @param prefix String the prefix of the namespace
+     * @return the URI corresponding to the prefix
+     */
+    public String lookupNamespace(String prefix)
+    {
+        final Stack stack = (Stack) m_namespaces.get(prefix);
+        return stack != null && !stack.isEmpty() ? 
+            ((MappingRecord) stack.peek()).m_uri : null;
+    }
+    
+    MappingRecord getMappingFromPrefix(String prefix) {
+        final Stack stack = (Stack) m_namespaces.get(prefix);
+        return stack != null && !stack.isEmpty() ? 
+            ((MappingRecord) stack.peek()) : null;
+    }
+
+    /**
+     * Given a namespace uri, and the namespaces mappings for the 
+     * current element, return the current prefix for that uri.
+     * 
+     * @param uri the namespace URI to be search for
+     * @return an existing prefix that maps to the given URI, null if no prefix
+     * maps to the given namespace URI.
+     */
+    public String lookupPrefix(String uri)
+    {
+        String foundPrefix = null;
+        Enumeration prefixes = m_namespaces.keys();
+        while (prefixes.hasMoreElements())
+        {
+            String prefix = (String) prefixes.nextElement();
+            String uri2 = lookupNamespace(prefix);
+            if (uri2 != null && uri2.equals(uri))
+            {
+                foundPrefix = prefix;
+                break;
+            }
+        }
+        return foundPrefix;
+    }
+    
+    MappingRecord getMappingFromURI(String uri)
+    {
+        MappingRecord foundMap = null;
+        Enumeration prefixes = m_namespaces.keys();
+        while (prefixes.hasMoreElements())
+        {
+            String prefix = (String) prefixes.nextElement();
+            MappingRecord map2 = getMappingFromPrefix(prefix);
+            if (map2 != null && (map2.m_uri).equals(uri))
+            {
+                foundMap = map2;
+                break;
+            }
+        }
+        return foundMap;
+    }
+
+    /**
+     * Undeclare the namespace that is currently pointed to by a given prefix
+     */
+    boolean popNamespace(String prefix)
+    {
+        // Prefixes "xml" and "xmlns" cannot be redefined
+        if (prefix.startsWith(XML_PREFIX))
+        {
+            return false;
+        }
+
+        Stack stack;
+        if ((stack = (Stack) m_namespaces.get(prefix)) != null)
+        {
+            stack.pop();
+            return true;
+        }
+        return false;
+    }
+
+    /**
+     * Declare a mapping of a prefix to namespace URI at the given element depth.
+     * @param prefix a String with the prefix for a qualified name
+     * @param uri a String with the uri to which the prefix is to map
+     * @param elemDepth the depth of current declaration
+     */
+    boolean pushNamespace(String prefix, String uri, int elemDepth)
+    {
+        // Prefixes "xml" and "xmlns" cannot be redefined
+        if (prefix.startsWith(XML_PREFIX))
+        {
+            return false;
+        }
+
+        Stack stack;
+        // Get the stack that contains URIs for the specified prefix
+        if ((stack = (Stack) m_namespaces.get(prefix)) == null)
+        {
+            m_namespaces.put(prefix, stack = new Stack());
+        }
+
+        if (!stack.empty() && uri.equals(((MappingRecord)stack.peek()).m_uri))
+        {
+            return false;
+        }
+        MappingRecord map = new MappingRecord(prefix,uri,elemDepth);
+        stack.push(map);
+        m_nodeStack.push(map);
+        return true;
+    }
+
+    /**
+     * Pop, or undeclare all namespace definitions that are currently
+     * declared at the given element depth, or deepter.
+     * @param elemDepth the element depth for which mappings declared at this
+     * depth or deeper will no longer be valid
+     * @param saxHandler The ContentHandler to notify of any endPrefixMapping()
+     * calls.  This parameter can be null.
+     */
+    void popNamespaces(int elemDepth, ContentHandler saxHandler)
+    {
+        while (true)
+        {
+            if (m_nodeStack.isEmpty())
+                return;
+            MappingRecord map = (MappingRecord)(m_nodeStack.peek());
+            int depth = map.m_declarationDepth;
+            if (depth < elemDepth)
+                return;
+            /* the depth of the declared mapping is elemDepth or deeper
+             * so get rid of it
+             */
+
+            map = (MappingRecord) m_nodeStack.pop();
+            final String prefix = map.m_prefix; 
+            popNamespace(prefix);
+            if (saxHandler != null)
+            {
+                try
+                {
+                    saxHandler.endPrefixMapping(prefix);
+                }
+                catch (SAXException e)
+                {
+                    // not much we can do if they aren't willing to listen
+                }
+            }
+               
+        }
+    }
+
+    /**
+     * Generate a new namespace prefix ( ns0, ns1 ...) not used before
+     * @return String a new namespace prefix ( ns0, ns1, ns2 ...)
+     */
+    public String generateNextPrefix()
+    {
+        return "ns" + (count++);
+    }
+
+ 
+    /**
+     * This method makes a clone of this object.
+     *
+     */
+    public Object clone() throws CloneNotSupportedException {
+        NamespaceMappings clone = new NamespaceMappings();
+        clone.m_nodeStack = (Stack) m_nodeStack.clone();
+        clone.m_namespaces = (Hashtable) m_namespaces.clone();
+        
+        clone.count = count;
+        return clone;
+        
+    }
+    
+    final void reset()
+    {
+        this.count = 0;
+        this.m_namespaces.clear();
+        this.m_nodeStack.clear();        
+        initNamespaces();
+    }
+    
+    class MappingRecord {
+        final String m_prefix;  // the prefix
+        final String m_uri;     // the uri
+        // the depth of the element where declartion was made
+        final int m_declarationDepth;
+        MappingRecord(String prefix, String uri, int depth) {
+            m_prefix = prefix;
+            m_uri = uri;
+            m_declarationDepth = depth;
+            
+        }
+    }
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ObjectFactory.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ObjectFactory.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ObjectFactory.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,679 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: ObjectFactory.java,v 1.1.2.1 2007/01/09 18:57:30 alexsmirnov Exp $
+ */
+
+package org.ajax4jsf.xml.serializer;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.Properties;
+
+/**
+ * This class is duplicated for each JAXP subpackage so keep it in sync.
+ * It is package private and therefore is not exposed as part of the JAXP
+ * API.
+ * <p>
+ * This code is designed to implement the JAXP 1.1 spec pluggability
+ * feature and is designed to run on JDK version 1.1 and
+ * later, and to compile on JDK 1.2 and onward.  
+ * The code also runs both as part of an unbundled jar file and
+ * when bundled as part of the JDK.
+ * <p>
+ * This class was moved from the <code>javax.xml.parsers.ObjectFactory</code>
+ * class and modified to be used as a general utility for creating objects 
+ * dynamically.
+ *
+ * @xsl.usage internal
+ */
+class ObjectFactory {
+
+    //
+    // Constants
+    //
+
+    // name of default properties file to look for in JDK's jre/lib directory
+    private static final String DEFAULT_PROPERTIES_FILENAME =
+                                                     "xalan.properties";
+
+    private static final String SERVICES_PATH = "META-INF/services/";
+
+    /** Set to true for debugging */
+    private static final boolean DEBUG = false;
+
+    /** cache the contents of the xalan.properties file.
+     *  Until an attempt has been made to read this file, this will
+     * be null; if the file does not exist or we encounter some other error
+     * during the read, this will be empty.
+     */
+    private static Properties fXalanProperties = null;
+
+    /***
+     * Cache the time stamp of the xalan.properties file so
+     * that we know if it's been modified and can invalidate
+     * the cache when necessary.
+     */
+    private static long fLastModified = -1;
+
+    //
+    // Public static methods
+    //
+
+    /**
+     * Finds the implementation Class object in the specified order.  The
+     * specified order is the following:
+     * <ol>
+     *  <li>query the system property using <code>System.getProperty</code>
+     *  <li>read <code>META-INF/services/<i>factoryId</i></code> file
+     *  <li>use fallback classname
+     * </ol>
+     *
+     * @return instance of factory, never null
+     *
+     * @param factoryId             Name of the factory to find, same as
+     *                              a property name
+     * @param fallbackClassName     Implementation class name, if nothing else
+     *                              is found.  Use null to mean no fallback.
+     *
+     * @exception ObjectFactory.ConfigurationError
+     */
+    static Object createObject(String factoryId, String fallbackClassName)
+        throws ConfigurationError {
+        return createObject(factoryId, null, fallbackClassName);
+    } // createObject(String,String):Object
+
+    /**
+     * Finds the implementation Class object in the specified order.  The
+     * specified order is the following:
+     * <ol>
+     *  <li>query the system property using <code>System.getProperty</code>
+     *  <li>read <code>$java.home/lib/<i>propertiesFilename</i></code> file
+     *  <li>read <code>META-INF/services/<i>factoryId</i></code> file
+     *  <li>use fallback classname
+     * </ol>
+     *
+     * @return instance of factory, never null
+     *
+     * @param factoryId             Name of the factory to find, same as
+     *                              a property name
+     * @param propertiesFilename The filename in the $java.home/lib directory
+     *                           of the properties file.  If none specified,
+     *                           ${java.home}/lib/xalan.properties will be used.
+     * @param fallbackClassName     Implementation class name, if nothing else
+     *                              is found.  Use null to mean no fallback.
+     *
+     * @exception ObjectFactory.ConfigurationError
+     */
+    static Object createObject(String factoryId, 
+                                      String propertiesFilename,
+                                      String fallbackClassName)
+        throws ConfigurationError
+    {
+        Class factoryClass = lookUpFactoryClass(factoryId,
+                                                propertiesFilename,
+                                                fallbackClassName);
+
+        if (factoryClass == null) {
+            throw new ConfigurationError(
+                "Provider for " + factoryId + " cannot be found", null);
+        }
+
+        try{
+            Object instance = factoryClass.newInstance();
+            debugPrintln("created new instance of factory " + factoryId);
+            return instance;
+        } catch (Exception x) {
+            throw new ConfigurationError(
+                "Provider for factory " + factoryId
+                    + " could not be instantiated: " + x, x);
+        }
+    } // createObject(String,String,String):Object
+
+    /**
+     * Finds the implementation Class object in the specified order.  The
+     * specified order is the following:
+     * <ol>
+     *  <li>query the system property using <code>System.getProperty</code>
+     *  <li>read <code>$java.home/lib/<i>propertiesFilename</i></code> file
+     *  <li>read <code>META-INF/services/<i>factoryId</i></code> file
+     *  <li>use fallback classname
+     * </ol>
+     *
+     * @return Class object of factory, never null
+     *
+     * @param factoryId             Name of the factory to find, same as
+     *                              a property name
+     * @param propertiesFilename The filename in the $java.home/lib directory
+     *                           of the properties file.  If none specified,
+     *                           ${java.home}/lib/xalan.properties will be used.
+     * @param fallbackClassName     Implementation class name, if nothing else
+     *                              is found.  Use null to mean no fallback.
+     *
+     * @exception ObjectFactory.ConfigurationError
+     */
+    static Class lookUpFactoryClass(String factoryId) 
+        throws ConfigurationError
+    {
+        return lookUpFactoryClass(factoryId, null, null);
+    } // lookUpFactoryClass(String):Class
+
+    /**
+     * Finds the implementation Class object in the specified order.  The
+     * specified order is the following:
+     * <ol>
+     *  <li>query the system property using <code>System.getProperty</code>
+     *  <li>read <code>$java.home/lib/<i>propertiesFilename</i></code> file
+     *  <li>read <code>META-INF/services/<i>factoryId</i></code> file
+     *  <li>use fallback classname
+     * </ol>
+     *
+     * @return Class object that provides factory service, never null
+     *
+     * @param factoryId             Name of the factory to find, same as
+     *                              a property name
+     * @param propertiesFilename The filename in the $java.home/lib directory
+     *                           of the properties file.  If none specified,
+     *                           ${java.home}/lib/xalan.properties will be used.
+     * @param fallbackClassName     Implementation class name, if nothing else
+     *                              is found.  Use null to mean no fallback.
+     *
+     * @exception ObjectFactory.ConfigurationError
+     */
+    static Class lookUpFactoryClass(String factoryId,
+                                           String propertiesFilename,
+                                           String fallbackClassName)
+        throws ConfigurationError
+    {
+        String factoryClassName = lookUpFactoryClassName(factoryId,
+                                                         propertiesFilename,
+                                                         fallbackClassName);
+        ClassLoader cl = findClassLoader();
+
+        if (factoryClassName == null) {
+            factoryClassName = fallbackClassName;
+        }
+
+        // assert(className != null);
+        try{
+            Class providerClass = findProviderClass(factoryClassName,
+                                                    cl,
+                                                    true);
+            debugPrintln("created new instance of " + providerClass +
+                   " using ClassLoader: " + cl);
+            return providerClass;
+        } catch (ClassNotFoundException x) {
+            throw new ConfigurationError(
+                "Provider " + factoryClassName + " not found", x);
+        } catch (Exception x) {
+            throw new ConfigurationError(
+                "Provider "+factoryClassName+" could not be instantiated: "+x,
+                x);
+        }
+    } // lookUpFactoryClass(String,String,String):Class
+
+    /**
+     * Finds the name of the required implementation class in the specified
+     * order.  The specified order is the following:
+     * <ol>
+     *  <li>query the system property using <code>System.getProperty</code>
+     *  <li>read <code>$java.home/lib/<i>propertiesFilename</i></code> file
+     *  <li>read <code>META-INF/services/<i>factoryId</i></code> file
+     *  <li>use fallback classname
+     * </ol>
+     *
+     * @return name of class that provides factory service, never null
+     *
+     * @param factoryId             Name of the factory to find, same as
+     *                              a property name
+     * @param propertiesFilename The filename in the $java.home/lib directory
+     *                           of the properties file.  If none specified,
+     *                           ${java.home}/lib/xalan.properties will be used.
+     * @param fallbackClassName     Implementation class name, if nothing else
+     *                              is found.  Use null to mean no fallback.
+     *
+     * @exception ObjectFactory.ConfigurationError
+     */
+    static String lookUpFactoryClassName(String factoryId,
+                                                String propertiesFilename,
+                                                String fallbackClassName)
+    {
+        SecuritySupport ss = SecuritySupport.getInstance();
+
+        // Use the system property first
+        try {
+            String systemProp = ss.getSystemProperty(factoryId);
+            if (systemProp != null) {
+                debugPrintln("found system property, value=" + systemProp);
+                return systemProp;
+            }
+        } catch (SecurityException se) {
+            // Ignore and continue w/ next location
+        }
+
+        // Try to read from propertiesFilename, or
+        // $java.home/lib/xalan.properties
+        String factoryClassName = null;
+        // no properties file name specified; use
+        // $JAVA_HOME/lib/xalan.properties:
+        if (propertiesFilename == null) {
+            File propertiesFile = null;
+            boolean propertiesFileExists = false;
+            try {
+                String javah = ss.getSystemProperty("java.home");
+                propertiesFilename = javah + File.separator +
+                    "lib" + File.separator + DEFAULT_PROPERTIES_FILENAME;
+                propertiesFile = new File(propertiesFilename);
+                propertiesFileExists = ss.getFileExists(propertiesFile);
+            } catch (SecurityException e) {
+                // try again...
+                fLastModified = -1;
+                fXalanProperties = null;
+            }
+
+            synchronized (ObjectFactory.class) {
+                boolean loadProperties = false;
+                FileInputStream fis = null;
+                try {
+                    // file existed last time
+                    if(fLastModified >= 0) {
+                        if(propertiesFileExists &&
+                                (fLastModified < (fLastModified = ss.getLastModified(propertiesFile)))) {
+                            loadProperties = true;
+                        } else {
+                            // file has stopped existing...
+                            if(!propertiesFileExists) {
+                                fLastModified = -1;
+                                fXalanProperties = null;
+                            } // else, file wasn't modified!
+                        }
+                    } else {
+                        // file has started to exist:
+                        if(propertiesFileExists) {
+                            loadProperties = true;
+                            fLastModified = ss.getLastModified(propertiesFile);
+                        } // else, nothing's changed
+                    }
+                    if(loadProperties) {
+                        // must never have attempted to read xalan.properties
+                        // before (or it's outdeated)
+                        fXalanProperties = new Properties();
+                        fis = ss.getFileInputStream(propertiesFile);
+                        fXalanProperties.load(fis);
+                    }
+	        } catch (Exception x) {
+	            fXalanProperties = null;
+	            fLastModified = -1;
+                    // assert(x instanceof FileNotFoundException
+	            //        || x instanceof SecurityException)
+	            // In both cases, ignore and continue w/ next location
+	        }
+                finally {
+                    // try to close the input stream if one was opened.
+                    if (fis != null) {
+                        try {
+                            fis.close();
+                        }
+                        // Ignore the exception.
+                        catch (IOException exc) {}
+                    }
+                }	            
+            }
+            if(fXalanProperties != null) {
+                factoryClassName = fXalanProperties.getProperty(factoryId);
+            }
+        } else {
+            FileInputStream fis = null;
+            try {
+                fis = ss.getFileInputStream(new File(propertiesFilename));
+                Properties props = new Properties();
+                props.load(fis);
+                factoryClassName = props.getProperty(factoryId);
+            } catch (Exception x) {
+                // assert(x instanceof FileNotFoundException
+                //        || x instanceof SecurityException)
+                // In both cases, ignore and continue w/ next location
+            }
+            finally {
+                // try to close the input stream if one was opened.
+                if (fis != null) {
+                    try {
+                        fis.close();
+                    }
+                    // Ignore the exception.
+                    catch (IOException exc) {}
+                }
+            }               
+        }
+        if (factoryClassName != null) {
+            debugPrintln("found in " + propertiesFilename + ", value="
+                          + factoryClassName);
+            return factoryClassName;
+        }
+
+        // Try Jar Service Provider Mechanism
+        return findJarServiceProviderName(factoryId);
+    } // lookUpFactoryClass(String,String):String
+
+    //
+    // Private static methods
+    //
+
+    /** Prints a message to standard error if debugging is enabled. */
+    private static void debugPrintln(String msg) {
+        if (DEBUG) {
+            System.err.println("JAXP: " + msg);
+        }
+    } // debugPrintln(String)
+
+    /**
+     * Figure out which ClassLoader to use.  For JDK 1.2 and later use
+     * the context ClassLoader.
+     */
+    static ClassLoader findClassLoader()
+        throws ConfigurationError
+    { 
+        SecuritySupport ss = SecuritySupport.getInstance();
+
+        // Figure out which ClassLoader to use for loading the provider
+        // class.  If there is a Context ClassLoader then use it.
+        ClassLoader context = ss.getContextClassLoader();
+        ClassLoader system = ss.getSystemClassLoader();
+
+        ClassLoader chain = system;
+        while (true) {
+            if (context == chain) {
+                // Assert: we are on JDK 1.1 or we have no Context ClassLoader
+                // or any Context ClassLoader in chain of system classloader
+                // (including extension ClassLoader) so extend to widest
+                // ClassLoader (always look in system ClassLoader if Xalan
+                // is in boot/extension/system classpath and in current
+                // ClassLoader otherwise); normal classloaders delegate
+                // back to system ClassLoader first so this widening doesn't
+                // change the fact that context ClassLoader will be consulted
+                ClassLoader current = ObjectFactory.class.getClassLoader();
+
+                chain = system;
+                while (true) {
+                    if (current == chain) {
+                        // Assert: Current ClassLoader in chain of
+                        // boot/extension/system ClassLoaders
+                        return system;
+                    }
+                    if (chain == null) {
+                        break;
+                    }
+                    chain = ss.getParentClassLoader(chain);
+                }
+
+                // Assert: Current ClassLoader not in chain of
+                // boot/extension/system ClassLoaders
+                return current;
+            }
+
+            if (chain == null) {
+                // boot ClassLoader reached
+                break;
+            }
+
+            // Check for any extension ClassLoaders in chain up to
+            // boot ClassLoader
+            chain = ss.getParentClassLoader(chain);
+        };
+
+        // Assert: Context ClassLoader not in chain of
+        // boot/extension/system ClassLoaders
+        return context;
+    } // findClassLoader():ClassLoader
+
+    /**
+     * Create an instance of a class using the specified ClassLoader
+     */ 
+    static Object newInstance(String className, ClassLoader cl,
+                                      boolean doFallback)
+        throws ConfigurationError
+    {
+        // assert(className != null);
+        try{
+            Class providerClass = findProviderClass(className, cl, doFallback);
+            Object instance = providerClass.newInstance();
+            debugPrintln("created new instance of " + providerClass +
+                   " using ClassLoader: " + cl);
+            return instance;
+        } catch (ClassNotFoundException x) {
+            throw new ConfigurationError(
+                "Provider " + className + " not found", x);
+        } catch (Exception x) {
+            throw new ConfigurationError(
+                "Provider " + className + " could not be instantiated: " + x,
+                x);
+        }
+    }
+
+    /**
+     * Find a Class using the specified ClassLoader
+     */ 
+    static Class findProviderClass(String className, ClassLoader cl,
+                                           boolean doFallback)
+        throws ClassNotFoundException, ConfigurationError
+    {   
+        //throw security exception if the calling thread is not allowed to access the
+        //class. Restrict the access to the package classes as specified in java.security policy.
+        SecurityManager security = System.getSecurityManager();
+        try{
+                if (security != null){
+                    final int lastDot = className.lastIndexOf(".");
+                    String packageName = className;
+                    if (lastDot != -1) packageName = className.substring(0, lastDot);
+                    security.checkPackageAccess(packageName);
+                 }   
+        }catch(SecurityException e){
+            throw e;
+        }
+        
+        Class providerClass;
+        if (cl == null) {
+            // XXX Use the bootstrap ClassLoader.  There is no way to
+            // load a class using the bootstrap ClassLoader that works
+            // in both JDK 1.1 and Java 2.  However, this should still
+            // work b/c the following should be true:
+            //
+            // (cl == null) iff current ClassLoader == null
+            //
+            // Thus Class.forName(String) will use the current
+            // ClassLoader which will be the bootstrap ClassLoader.
+            providerClass = Class.forName(className);
+        } else {
+            try {
+                providerClass = cl.loadClass(className);
+            } catch (ClassNotFoundException x) {
+                if (doFallback) {
+                    // Fall back to current classloader
+                    ClassLoader current = ObjectFactory.class.getClassLoader();
+                    if (current == null) {
+                        providerClass = Class.forName(className);
+                    } else if (cl != current) {
+                        cl = current;
+                        providerClass = cl.loadClass(className);
+                    } else {
+                        throw x;
+                    }
+                } else {
+                    throw x;
+                }
+            }
+        }
+
+        return providerClass;
+    }
+
+    /**
+     * Find the name of service provider using Jar Service Provider Mechanism
+     *
+     * @return instance of provider class if found or null
+     */
+    private static String findJarServiceProviderName(String factoryId)
+    {
+        SecuritySupport ss = SecuritySupport.getInstance();
+        String serviceId = SERVICES_PATH + factoryId;
+        InputStream is = null;
+
+        // First try the Context ClassLoader
+        ClassLoader cl = findClassLoader();
+
+        is = ss.getResourceAsStream(cl, serviceId);
+
+        // If no provider found then try the current ClassLoader
+        if (is == null) {
+            ClassLoader current = ObjectFactory.class.getClassLoader();
+            if (cl != current) {
+                cl = current;
+                is = ss.getResourceAsStream(cl, serviceId);
+            }
+        }
+
+        if (is == null) {
+            // No provider found
+            return null;
+        }
+
+        debugPrintln("found jar resource=" + serviceId +
+               " using ClassLoader: " + cl);
+
+        // Read the service provider name in UTF-8 as specified in
+        // the jar spec.  Unfortunately this fails in Microsoft
+        // VJ++, which does not implement the UTF-8
+        // encoding. Theoretically, we should simply let it fail in
+        // that case, since the JVM is obviously broken if it
+        // doesn't support such a basic standard.  But since there
+        // are still some users attempting to use VJ++ for
+        // development, we have dropped in a fallback which makes a
+        // second attempt using the platform's default encoding. In
+        // VJ++ this is apparently ASCII, which is a subset of
+        // UTF-8... and since the strings we'll be reading here are
+        // also primarily limited to the 7-bit ASCII range (at
+        // least, in English versions), this should work well
+        // enough to keep us on the air until we're ready to
+        // officially decommit from VJ++. [Edited comment from
+        // jkesselm]
+        BufferedReader rd;
+        try {
+            rd = new BufferedReader(new InputStreamReader(is, "UTF-8"));
+        } catch (java.io.UnsupportedEncodingException e) {
+            rd = new BufferedReader(new InputStreamReader(is));
+        }
+        
+        String factoryClassName = null;
+        try {
+            // XXX Does not handle all possible input as specified by the
+            // Jar Service Provider specification
+            factoryClassName = rd.readLine();
+        } catch (IOException x) {
+            // No provider found
+            return null;
+        }
+        finally {
+            try {
+                // try to close the reader.
+                rd.close();
+            }
+            // Ignore the exception.
+            catch (IOException exc) {}
+        }          
+
+        if (factoryClassName != null &&
+            ! "".equals(factoryClassName)) {
+            debugPrintln("found in resource, value="
+                   + factoryClassName);
+
+            // Note: here we do not want to fall back to the current
+            // ClassLoader because we want to avoid the case where the
+            // resource file was found using one ClassLoader and the
+            // provider class was instantiated using a different one.
+            return factoryClassName;
+        }
+
+        // No provider found
+        return null;
+    }
+
+    //
+    // Classes
+    //
+
+    /**
+     * A configuration error.
+     */
+    static class ConfigurationError 
+        extends Error {
+                static final long serialVersionUID = 8859254254255146542L;
+        //
+        // Data
+        //
+
+        /** Exception. */
+        private Exception exception;
+
+        //
+        // Constructors
+        //
+
+        /**
+         * Construct a new instance with the specified detail string and
+         * exception.
+         */
+        ConfigurationError(String msg, Exception x) {
+            super(msg);
+            this.exception = x;
+        } // <init>(String,Exception)
+
+        //
+        // Public methods
+        //
+
+        /** Returns the exception associated to this error. */
+        Exception getException() {
+            return exception;
+        } // getException():Exception
+
+    } // class ConfigurationError
+
+} // class ObjectFactory

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/OutputPropertiesFactory.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/OutputPropertiesFactory.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/OutputPropertiesFactory.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,552 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: OutputPropertiesFactory.java,v 1.1.2.1 2007/01/09 18:57:16 alexsmirnov Exp $
+ */
+package org.ajax4jsf.xml.serializer;
+
+import java.io.BufferedInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.util.Enumeration;
+import java.util.Properties;
+
+import javax.xml.transform.OutputKeys;
+
+import org.ajax4jsf.xml.serializer.utils.MsgKey;
+import org.ajax4jsf.xml.serializer.utils.Utils;
+import org.ajax4jsf.xml.serializer.utils.WrappedRuntimeException;
+
+/**
+ * This class is a factory to generate a set of default properties
+ * of key/value pairs that are used to create a serializer through the
+ * factory {@link SerializerFactory SerilizerFactory}. 
+ * The properties generated by this factory
+ * may be modified to non-default values before the SerializerFactory is used to
+ * create a Serializer.
+ * <p>
+ * The given output types supported are "xml", "text", and "html". 
+ * These type strings can be obtained from the 
+ * {@link Method Method} class in this package.
+ * <p>
+ * Other constants defined in this class are the non-standard property keys
+ * that can be used to set non-standard property values on a java.util.Properties object
+ * that is used to create or configure a serializer. Here are the non-standard keys:
+ * <ul>
+ * <li> <b>S_KEY_INDENT_AMOUNT </b> -
+ * The non-standard property key to use to set the indentation amount.
+ * The "indent" key needs to have a value of "yes", and this
+ * properties value is a the number of whitespaces to indent by per
+ * indentation level.
+ * 
+ * <li> <b>S_KEY_CONTENT_HANDLER </b> -
+ * This non-standard property key is used to set the name of the fully qualified 
+ * Java class that implements the ContentHandler interface. 
+ * The output of the serializer will be SAX events sent to this an
+ * object of this class.
+ * 
+ * <li> <b>S_KEY_ENTITIES </b> -
+ * This non-standard property key is used to specify the name of the property file
+ * that specifies character to entity reference mappings. A line in such a
+ * file is has the name of the entity and the numeric (base 10) value
+ * of the corresponding character, like this one: <br> quot=34 <br>
+ * 
+ * <li> <b>S_USE_URL_ESCAPING </b> -
+ * This non-standard property key is used to set a value of "yes" if the href values for HTML serialization should
+ *  use %xx escaping.
+ * 
+ * <li> <b>S_OMIT_META_TAG </b> -
+ * This non-standard property key is used to set a value of "yes" if the META tag should be omitted where it would
+ *  otherwise be supplied.
+ * </ul>
+ * 
+ * @see SerializerFactory
+ * @see Method
+ * @see Serializer
+ */
+public final class OutputPropertiesFactory
+{
+    /** S_BUILTIN_EXTENSIONS_URL is a mnemonic for the XML Namespace 
+     *(http://xml.apache.org/xalan) predefined to signify Xalan's
+     * built-in XSLT Extensions. When used in stylesheets, this is often 
+     * bound to the "xalan:" prefix.
+     */
+    private static final String 
+      S_BUILTIN_EXTENSIONS_URL = "http://xml.apache.org/xalan"; 
+
+    /**
+     * The old built-in extension url. It is still supported for
+     * backward compatibility.
+     */
+    private static final String 
+      S_BUILTIN_OLD_EXTENSIONS_URL = "http://xml.apache.org/xslt"; 
+      
+    //************************************************************
+    //*  PUBLIC CONSTANTS
+    //************************************************************
+    /** 
+     * This is not a public API.
+     * This is the built-in extensions namespace, 
+     * reexpressed in {namespaceURI} syntax
+     * suitable for prepending to a localname to produce a "universal
+     * name".
+     */
+    public static final String S_BUILTIN_EXTENSIONS_UNIVERSAL =
+        "{" + S_BUILTIN_EXTENSIONS_URL + "}";
+
+    // Some special Xalan keys.
+
+    /** 
+     * The non-standard property key to use to set the
+     * number of whitepaces to indent by, per indentation level,
+     * if indent="yes".
+     */
+    public static final String S_KEY_INDENT_AMOUNT =
+        S_BUILTIN_EXTENSIONS_UNIVERSAL + "indent-amount";
+        
+    /** 
+     * The non-standard property key to use to set the
+     * number of whitepaces to indent by, per indentation level,
+     * if indent="yes".
+     */
+    public static final String S_KEY_LINE_SEPARATOR =
+        S_BUILTIN_EXTENSIONS_UNIVERSAL + "line-separator";        
+
+    /** This non-standard property key is used to set the name of the fully qualified 
+     * Java class that implements the ContentHandler interface. 
+     * Fully qualified name of class with a default constructor that
+     *  implements the ContentHandler interface, where the result tree events
+     *  will be sent to.
+     */
+
+    public static final String S_KEY_CONTENT_HANDLER =
+        S_BUILTIN_EXTENSIONS_UNIVERSAL + "content-handler";
+
+    /**
+     * This non-standard property key is used to specify the name of the property file
+     * that specifies character to entity reference mappings.
+     */
+    public static final String S_KEY_ENTITIES =
+        S_BUILTIN_EXTENSIONS_UNIVERSAL + "entities";
+
+    /** 
+     * This non-standard property key is used to set a value of "yes" if the href values for HTML serialization should
+     *  use %xx escaping. */
+    public static final String S_USE_URL_ESCAPING =
+        S_BUILTIN_EXTENSIONS_UNIVERSAL + "use-url-escaping";
+
+    /** 
+     * This non-standard property key is used to set a value of "yes" if the META tag should be omitted where it would
+     *  otherwise be supplied.
+     */
+    public static final String S_OMIT_META_TAG =
+        S_BUILTIN_EXTENSIONS_UNIVERSAL + "omit-meta-tag";
+
+    /**
+     * The old built-in extension namespace, this is not a public API.
+     */
+    public static final String S_BUILTIN_OLD_EXTENSIONS_UNIVERSAL =
+        "{" + S_BUILTIN_OLD_EXTENSIONS_URL + "}";
+
+    /**
+     * This is not a public API, it is only public because it is used
+     * by outside of this package,
+     * it is the length of the old built-in extension namespace.
+     */
+    public static final int S_BUILTIN_OLD_EXTENSIONS_UNIVERSAL_LEN =
+        S_BUILTIN_OLD_EXTENSIONS_UNIVERSAL.length();
+
+    //************************************************************
+    //*  PRIVATE CONSTANTS
+    //************************************************************
+
+    private static final String S_XSLT_PREFIX = "xslt.output.";
+    private static final int S_XSLT_PREFIX_LEN = S_XSLT_PREFIX.length();
+    private static final String S_XALAN_PREFIX = "org.apache.xslt.";
+    private static final int S_XALAN_PREFIX_LEN = S_XALAN_PREFIX.length();
+
+    /** Synchronization object for lazy initialization of the above tables. */
+    private static Integer m_synch_object = new Integer(1);
+
+    /** the directory in which the various method property files are located */
+    private static final String PROP_DIR = "org/ajax4jsf/xml/serializer/";
+    /** property file for default XML properties */
+    private static final String PROP_FILE_XML = "output_xml.properties";
+    /** property file for default TEXT properties */
+    private static final String PROP_FILE_TEXT = "output_text.properties";
+    /** property file for default HTML properties */
+    private static final String PROP_FILE_HTML = "output_html.properties";
+    /** property file for default HTML properties */
+    private static final String PROP_FILE_XHTML = "output_xhtml.properties";
+    /** property file for default UNKNOWN (Either XML or HTML, to be determined later) properties */
+    private static final String PROP_FILE_UNKNOWN = "output_unknown.properties";
+
+    //************************************************************
+    //*  PRIVATE STATIC FIELDS
+    //************************************************************
+
+    /** The default properties of all output files. */
+    private static Properties m_xml_properties = null;
+
+    /** The default properties when method="html". */
+    private static Properties m_html_properties = null;
+
+
+    /** The default properties when method="xhtml". */
+    private static Properties m_xhtml_properties = null;
+
+    /** The default properties when method="text". */
+    private static Properties m_text_properties = null;
+
+    /** The properties when method="" for the "unknown" wrapper */
+    private static Properties m_unknown_properties = null;
+
+    private static final Class
+        ACCESS_CONTROLLER_CLASS = findAccessControllerClass();
+
+    private static Class findAccessControllerClass() {
+        try
+        {
+            // This Class was introduced in JDK 1.2. With the re-architecture of
+            // security mechanism ( starting in JDK 1.2 ), we have option of
+            // giving privileges to certain part of code using doPrivileged block.
+            // In JDK1.1.X applications won't be having security manager and if
+            // there is security manager ( in applets ), code need to be signed
+            // and trusted for having access to resources.
+
+            return Class.forName("java.security.AccessController");
+        }
+        catch (Exception e)
+        {
+            //User may be using older JDK ( JDK <1.2 ). Allow him/her to use it.
+            // But don't try to use doPrivileged
+        }
+
+        return null;
+    }
+
+    /**
+     * Creates an empty OutputProperties with the property key/value defaults specified by
+     * a property file.  The method argument is used to construct a string of
+     * the form output_[method].properties (for instance, output_html.properties).
+     * The output_xml.properties file is always used as the base.
+     * 
+     * <p>Anything other than 'text', 'xml', and 'html', will
+     * use the output_xml.properties file.</p>
+     *
+     * @param   method non-null reference to method name.
+     *
+     * @return Properties object that holds the defaults for the given method.
+     */
+    static public final Properties getDefaultMethodProperties(String method)
+    {
+        String fileName = null;
+        Properties defaultProperties = null;
+        // According to this article : Double-check locking does not work
+        // http://www.javaworld.com/javaworld/jw-02-2001/jw-0209-toolbox.html
+        try
+        {
+            synchronized (m_synch_object)
+            {
+                if (null == m_xml_properties) // double check
+                {
+                    fileName = PROP_FILE_XML;
+                    m_xml_properties = loadPropertiesFile(fileName, null);
+                }
+            }
+
+            if (method.equals(Method.XML))
+            {
+                defaultProperties = m_xml_properties;
+            }
+            else if (method.equals(Method.HTML))
+            {
+                if (null == m_html_properties) // double check
+                {
+                    fileName = PROP_FILE_HTML;
+                    m_html_properties =
+                        loadPropertiesFile(fileName, m_xml_properties);
+                }
+
+                defaultProperties = m_html_properties;
+            }
+            else if (method.equals(Method.XHTML))
+            {
+                if (null == m_xhtml_properties) // double check
+                {
+                    fileName = PROP_FILE_XHTML;
+                    m_xhtml_properties =
+                        loadPropertiesFile(fileName, m_xml_properties);
+                }
+
+                defaultProperties = m_xhtml_properties;
+            }
+            else if (method.equals(Method.TEXT))
+            {
+                if (null == m_text_properties) // double check
+                {
+                    fileName = PROP_FILE_TEXT;
+                    m_text_properties =
+                        loadPropertiesFile(fileName, m_xml_properties);
+                    if (null
+                        == m_text_properties.getProperty(OutputKeys.ENCODING))
+                    {
+                        String mimeEncoding = Encodings.getMimeEncoding(null);
+                        m_text_properties.put(
+                            OutputKeys.ENCODING,
+                            mimeEncoding);
+                    }
+                }
+
+                defaultProperties = m_text_properties;
+            }
+            else if (method.equals(org.ajax4jsf.xml.serializer.Method.UNKNOWN))
+            {
+                if (null == m_unknown_properties) // double check
+                {
+                    fileName = PROP_FILE_UNKNOWN;
+                    m_unknown_properties =
+                        loadPropertiesFile(fileName, m_xml_properties);
+                }
+
+                defaultProperties = m_unknown_properties;
+            }
+            else
+            {
+                // TODO: Calculate res file from name.
+                defaultProperties = m_xml_properties;
+            }
+        }
+        catch (IOException ioe)
+        {
+            throw new WrappedRuntimeException(
+                Utils.messages.createMessage(
+                    MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY,
+                    new Object[] { fileName, method }),
+                ioe);
+        }
+        // wrap these cached defaultProperties in a new Property object just so
+        // that the caller of this method can't modify the default values
+        return new Properties(defaultProperties);
+    }
+
+    /**
+     * Load the properties file from a resource stream.  If a
+     * key name such as "org.apache.xslt.xxx", fix up the start of
+     * string to be a curly namespace.  If a key name starts with
+     * "xslt.output.xxx", clip off "xslt.output.".  If a key name *or* a
+     * key value is discovered, check for \u003a in the text, and
+     * fix it up to be ":", since earlier versions of the JDK do not
+     * handle the escape sequence (at least in key names).
+     *
+     * @param resourceName non-null reference to resource name.
+     * @param defaults Default properties, which may be null.
+     */
+    static private Properties loadPropertiesFile(
+        final String resourceName,
+        Properties defaults)
+        throws IOException
+    {
+
+        // This static method should eventually be moved to a thread-specific class
+        // so that we can cache the ContextClassLoader and bottleneck all properties file
+        // loading throughout Xalan.
+
+        Properties props = new Properties(defaults);
+
+        InputStream is = null;
+        BufferedInputStream bis = null;
+
+        try
+        {
+            if (ACCESS_CONTROLLER_CLASS != null)
+            {
+                is = (InputStream) AccessController
+                    .doPrivileged(new PrivilegedAction() {
+                        public Object run()
+                        {
+                            return OutputPropertiesFactory.class
+                                .getResourceAsStream(resourceName);
+                        }
+                    });
+            }
+            else
+            {
+                // User may be using older JDK ( JDK < 1.2 )
+                is = OutputPropertiesFactory.class
+                    .getResourceAsStream(resourceName);
+            }
+
+            bis = new BufferedInputStream(is);
+            props.load(bis);
+        }
+        catch (IOException ioe)
+        {
+            if (defaults == null)
+            {
+                throw ioe;
+            }
+            else
+            {
+                throw new WrappedRuntimeException(
+                    Utils.messages.createMessage(
+                        MsgKey.ER_COULD_NOT_LOAD_RESOURCE,
+                        new Object[] { resourceName }),
+                    ioe);
+                //"Could not load '"+resourceName+"' (check CLASSPATH), now using just the defaults ", ioe);
+            }
+        }
+        catch (SecurityException se)
+        {
+            // Repeat IOException handling for sandbox/applet case -sc
+            if (defaults == null)
+            {
+                throw se;
+            }
+            else
+            {
+                throw new WrappedRuntimeException(
+                    Utils.messages.createMessage(
+                        MsgKey.ER_COULD_NOT_LOAD_RESOURCE,
+                        new Object[] { resourceName }),
+                    se);
+                //"Could not load '"+resourceName+"' (check CLASSPATH, applet security), now using just the defaults ", se);
+            }
+        }
+        finally
+        {
+            if (bis != null)
+            {
+                bis.close();
+            }
+            if (is != null)
+            {
+                is.close();
+            }
+        }
+
+        // Note that we're working at the HashTable level here,
+        // and not at the Properties level!  This is important
+        // because we don't want to modify the default properties.
+        // NB: If fixupPropertyString ends up changing the property
+        // name or value, we need to remove the old key and re-add
+        // with the new key and value.  However, then our Enumeration
+        // could lose its place in the HashTable.  So, we first
+        // clone the HashTable and enumerate over that since the
+        // clone will not change.  When we migrate to Collections,
+        // this code should be revisited and cleaned up to use
+        // an Iterator which may (or may not) alleviate the need for
+        // the clone.  Many thanks to Padraig O'hIceadha
+        // <padraig at gradient.ie> for finding this problem.  Bugzilla 2000.
+
+        Enumeration keys = ((Properties) props.clone()).keys();
+        while (keys.hasMoreElements())
+        {
+            String key = (String) keys.nextElement();
+            // Now check if the given key was specified as a
+            // System property. If so, the system property
+            // overides the default value in the propery file.
+            String value = null;
+            try
+            {
+                value = System.getProperty(key);
+            }
+            catch (SecurityException se)
+            {
+                // No-op for sandbox/applet case, leave null -sc
+            }
+            if (value == null)
+                value = (String) props.get(key);
+
+            String newKey = fixupPropertyString(key, true);
+            String newValue = null;
+            try
+            {
+                newValue = System.getProperty(newKey);
+            }
+            catch (SecurityException se)
+            {
+                // No-op for sandbox/applet case, leave null -sc
+            }
+            if (newValue == null)
+                newValue = fixupPropertyString(value, false);
+            else
+                newValue = fixupPropertyString(newValue, false);
+
+            if (key != newKey || value != newValue)
+            {
+                props.remove(key);
+                props.put(newKey, newValue);
+            }
+
+        }
+
+        return props;
+    }
+
+    /**
+     * Fix up a string in an output properties file according to
+     * the rules of {@link #loadPropertiesFile}.
+     *
+     * @param s non-null reference to string that may need to be fixed up.
+     * @return A new string if fixup occured, otherwise the s argument.
+     */
+    static private String fixupPropertyString(String s, boolean doClipping)
+    {
+        int index;
+        if (doClipping && s.startsWith(S_XSLT_PREFIX))
+        {
+            s = s.substring(S_XSLT_PREFIX_LEN);
+        }
+        if (s.startsWith(S_XALAN_PREFIX))
+        {
+            s =
+                S_BUILTIN_EXTENSIONS_UNIVERSAL
+                    + s.substring(S_XALAN_PREFIX_LEN);
+        }
+        if ((index = s.indexOf("\\u003a")) > 0)
+        {
+            String temp = s.substring(index + 6);
+            s = s.substring(0, index) + ":" + temp;
+
+        }
+        return s;
+    }
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/OutputPropertyUtils.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/OutputPropertyUtils.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/OutputPropertyUtils.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,102 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: OutputPropertyUtils.java,v 1.1.2.1 2007/01/09 18:57:15 alexsmirnov Exp $
+ */
+package org.ajax4jsf.xml.serializer;
+
+import java.util.Properties;
+
+/**
+ * This class contains some static methods that act as helpers when parsing a
+ * Java Property object.
+ * 
+ * This class is not a public API. 
+ * It is only public because it is used outside of this package.
+ * 
+ * @see java.util.Properties
+ * @xsl.usage internal
+ */
+public final class OutputPropertyUtils
+{
+    /**
+      * Searches for the boolean property with the specified key in the property list.
+      * If the key is not found in this property list, the default property list,
+      * and its defaults, recursively, are then checked. The method returns
+      * <code>false</code> if the property is not found, or if the value is other
+      * than "yes".
+      *
+      * @param   key   the property key.
+      * @param   props   the list of properties that will be searched.
+      * @return  the value in this property list as a boolean value, or false
+      * if null or not "yes".
+      */
+    public static boolean getBooleanProperty(String key, Properties props)
+    {
+
+        String s = props.getProperty(key);
+
+        if (null == s || !s.equals("yes"))
+            return false;
+        else
+            return true;
+    }
+
+    /**
+     * Searches for the int property with the specified key in the property list.
+     * If the key is not found in this property list, the default property list,
+     * and its defaults, recursively, are then checked. The method returns
+     * <code>false</code> if the property is not found, or if the value is other
+     * than "yes".
+     *
+     * @param   key   the property key.
+     * @param   props   the list of properties that will be searched.
+     * @return  the value in this property list as a int value, or 0
+     * if null or not a number.
+     */
+    public static int getIntProperty(String key, Properties props)
+    {
+
+        String s = props.getProperty(key);
+
+        if (null == s)
+            return 0;
+        else
+            return Integer.parseInt(s);
+    }
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/SecuritySupport.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/SecuritySupport.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/SecuritySupport.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,142 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 2002-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: SecuritySupport.java,v 1.1.2.1 2007/01/09 18:57:20 alexsmirnov Exp $
+ */
+
+package org.ajax4jsf.xml.serializer;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.InputStream;
+
+/**
+ * This class is duplicated for each Xalan-Java subpackage so keep it in sync.
+ * It is package private and therefore is not exposed as part of the Xalan-Java
+ * API.
+ *
+ * Base class with security related methods that work on JDK 1.1.
+ */
+class SecuritySupport {
+
+    /*
+     * Make this of type Object so that the verifier won't try to
+     * prove its type, thus possibly trying to load the SecuritySupport12
+     * class.
+     */
+    private static final Object securitySupport;
+
+    static {
+	SecuritySupport ss = null;
+	try {
+	    Class c = Class.forName("java.security.AccessController");
+	    // if that worked, we're on 1.2.
+	    /*
+	    // don't reference the class explicitly so it doesn't
+	    // get dragged in accidentally.
+	    c = Class.forName("javax.mail.SecuritySupport12");
+	    Constructor cons = c.getConstructor(new Class[] { });
+	    ss = (SecuritySupport)cons.newInstance(new Object[] { });
+	    */
+	    /*
+	     * Unfortunately, we can't load the class using reflection
+	     * because the class is package private.  And the class has
+	     * to be package private so the APIs aren't exposed to other
+	     * code that could use them to circumvent security.  Thus,
+	     * we accept the risk that the direct reference might fail
+	     * on some JDK 1.1 JVMs, even though we would never execute
+	     * this code in such a case.  Sigh...
+	     */
+	    ss = new SecuritySupport12();
+	} catch (Exception ex) {
+	    // ignore it
+	} finally {
+	    if (ss == null)
+		ss = new SecuritySupport();
+	    securitySupport = ss;
+	}
+    }
+
+    /**
+     * Return an appropriate instance of this class, depending on whether
+     * we're on a JDK 1.1 or J2SE 1.2 (or later) system.
+     */
+    static SecuritySupport getInstance() {
+	return (SecuritySupport)securitySupport;
+    }
+
+    ClassLoader getContextClassLoader() {
+	return null;
+    }
+
+    ClassLoader getSystemClassLoader() {
+        return null;
+    }
+
+    ClassLoader getParentClassLoader(ClassLoader cl) {
+        return null;
+    }
+
+    String getSystemProperty(String propName) {
+        return System.getProperty(propName);
+    }
+
+    FileInputStream getFileInputStream(File file)
+        throws FileNotFoundException
+    {
+        return new FileInputStream(file);
+    }
+
+    InputStream getResourceAsStream(ClassLoader cl, String name) {
+        InputStream ris;
+        if (cl == null) {
+            ris = ClassLoader.getSystemResourceAsStream(name);
+        } else {
+            ris = cl.getResourceAsStream(name);
+        }
+        return ris;
+    }
+    
+    boolean getFileExists(File f) {
+        return f.exists();
+    }
+    
+    long getLastModified(File f) {
+        return f.lastModified();
+    }    
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/SecuritySupport12.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/SecuritySupport12.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/SecuritySupport12.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,162 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 2002-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: SecuritySupport12.java,v 1.1.2.1 2007/01/09 18:57:18 alexsmirnov Exp $
+ */
+
+package org.ajax4jsf.xml.serializer;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.InputStream;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
+
+/**
+ * This class is duplicated for each Xalan-Java subpackage so keep it in sync.
+ * It is package private and therefore is not exposed as part of the Xalan-Java
+ * API.
+ *
+ * Security related methods that only work on J2SE 1.2 and newer.
+ */
+class SecuritySupport12 extends SecuritySupport {
+
+    ClassLoader getContextClassLoader() {
+        return (ClassLoader)
+                AccessController.doPrivileged(new PrivilegedAction() {
+            public Object run() {
+                ClassLoader cl = null;
+                try {
+                    cl = Thread.currentThread().getContextClassLoader();
+                } catch (SecurityException ex) { }
+                return cl;
+            }
+        });
+    }
+
+    ClassLoader getSystemClassLoader() {
+        return (ClassLoader)
+            AccessController.doPrivileged(new PrivilegedAction() {
+                public Object run() {
+                    ClassLoader cl = null;
+                    try {
+                        cl = ClassLoader.getSystemClassLoader();
+                    } catch (SecurityException ex) {}
+                    return cl;
+                }
+            });
+    }
+
+    ClassLoader getParentClassLoader(final ClassLoader cl) {
+        return (ClassLoader)
+            AccessController.doPrivileged(new PrivilegedAction() {
+                public Object run() {
+                    ClassLoader parent = null;
+                    try {
+                        parent = cl.getParent();
+                    } catch (SecurityException ex) {}
+
+                    // eliminate loops in case of the boot
+                    // ClassLoader returning itself as a parent
+                    return (parent == cl) ? null : parent;
+                }
+            });
+    }
+
+    String getSystemProperty(final String propName) {
+        return (String)
+            AccessController.doPrivileged(new PrivilegedAction() {
+                public Object run() {
+                    return System.getProperty(propName);
+                }
+            });
+    }
+
+    FileInputStream getFileInputStream(final File file)
+        throws FileNotFoundException
+    {
+        try {
+            return (FileInputStream)
+                AccessController.doPrivileged(new PrivilegedExceptionAction() {
+                    public Object run() throws FileNotFoundException {
+                        return new FileInputStream(file);
+                    }
+                });
+        } catch (PrivilegedActionException e) {
+            throw (FileNotFoundException)e.getException();
+        }
+    }
+
+    InputStream getResourceAsStream(final ClassLoader cl,
+                                           final String name)
+    {
+        return (InputStream)
+            AccessController.doPrivileged(new PrivilegedAction() {
+                public Object run() {
+                    InputStream ris;
+                    if (cl == null) {
+                        ris = ClassLoader.getSystemResourceAsStream(name);
+                    } else {
+                        ris = cl.getResourceAsStream(name);
+                    }
+                    return ris;
+                }
+            });
+    }
+    
+    boolean getFileExists(final File f) {
+    return ((Boolean)
+            AccessController.doPrivileged(new PrivilegedAction() {
+                public Object run() {
+                    return new Boolean(f.exists());
+                }
+            })).booleanValue();
+    }
+    
+    long getLastModified(final File f) {
+    return ((Long)
+            AccessController.doPrivileged(new PrivilegedAction() {
+                public Object run() {
+                    return new Long(f.lastModified());
+                }
+            })).longValue();
+    }
+        
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/SerializationHandler.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/SerializationHandler.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/SerializationHandler.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,145 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 2003-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: SerializationHandler.java,v 1.1.2.1 2007/01/09 18:57:23 alexsmirnov Exp $
+ */
+package org.ajax4jsf.xml.serializer;
+
+import java.io.IOException;
+
+import javax.xml.transform.Transformer;
+
+import org.w3c.dom.Node;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.ErrorHandler;
+import org.xml.sax.SAXException;
+import org.xml.sax.ext.DeclHandler;
+
+/**
+ * This interface is the one that a serializer implements. It is a group of
+ * other interfaces, such as ExtendedContentHandler, ExtendedLexicalHandler etc.
+ * In addition there are other methods, such as reset().
+ * 
+ * This class is public only because it is used in another package,
+ * it is not a public API.
+ * 
+ * @xsl.usage internal
+ */
+public interface SerializationHandler
+    extends
+        ExtendedContentHandler,
+        ExtendedLexicalHandler,
+        XSLOutputAttributes,
+        DeclHandler,
+        org.xml.sax.DTDHandler,
+        ErrorHandler,
+        DOMSerializer,
+        Serializer
+{
+    /**
+     * Set the SAX Content handler that the serializer sends its output to. This
+     * method only applies to a ToSAXHandler, not to a ToStream serializer.
+     * 
+     * @see Serializer#asContentHandler()
+     * @see ToSAXHandler
+     */
+    public void setContentHandler(ContentHandler ch);
+    
+    public void close();
+
+    /**
+     * Notify that the serializer should take this DOM node as input to be
+     * serialized.
+     * 
+     * @param node the DOM node to be serialized.
+     * @throws IOException
+     */
+    public void serialize(Node node) throws IOException;
+    /**
+     * Turns special character escaping on/off. 
+     * 
+     * Note that characters will
+     * never, even if this option is set to 'true', be escaped within
+     * CDATA sections in output XML documents.
+     * 
+     * @param escape true if escaping is to be set on.
+     */
+    public boolean setEscaping(boolean escape) throws SAXException;
+
+    /**
+     * Set the number of spaces to indent for each indentation level.
+     * @param spaces the number of spaces to indent for each indentation level.
+     */
+    public void setIndentAmount(int spaces);
+
+    /**
+     * Set the transformer associated with the serializer.
+     * @param transformer the transformer associated with the serializer.
+     */
+    public void setTransformer(Transformer transformer);
+    
+    /**
+     * Get the transformer associated with the serializer.
+     * @return Transformer the transformer associated with the serializer.
+     */
+    public Transformer getTransformer();
+
+    /** 
+     * Used only by TransformerSnapshotImpl to restore the serialization 
+     * to a previous state. 
+     * 
+     * @param mappings NamespaceMappings
+     */
+    public void setNamespaceMappings(NamespaceMappings mappings);
+
+    /**
+     * Flush any pending events currently queued up in the serializer. This will
+     * flush any input that the serializer has which it has not yet sent as
+     * output.
+     */
+    public void flushPending() throws SAXException;
+    
+    /**
+     * Default behavior is to expand DTD entities,
+     * that is the initall default value is true.
+     * @param expand true if DTD entities are to be expanded,
+     * false if they are to be left as DTD entity references. 
+     */
+    public void setDTDEntityExpansion(boolean expand);
+
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/Serializer.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/Serializer.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/Serializer.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,241 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: Serializer.java,v 1.1.2.1 2007/01/09 18:57:28 alexsmirnov Exp $
+ */
+package org.ajax4jsf.xml.serializer;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.Writer;
+import java.util.Properties;
+
+import org.xml.sax.ContentHandler;
+
+/**
+ * The Serializer interface is implemented by a serializer to enable users to:
+ * <ul>
+ * <li>get and set streams or writers
+ * <li>configure the serializer with key/value properties
+ * <li>get an org.xml.sax.ContentHandler or a DOMSerializer to provide input to
+ * </ul>
+ *
+ * <p>
+ * Here is an example using the asContentHandler() method:
+ * <pre>
+ * java.util.Properties props = 
+ *   OutputPropertiesFactory.getDefaultMethodProperties(Method.TEXT);
+ * Serializer ser = SerializerFactory.getSerializer(props);
+ * java.io.PrintStream ostream = System.out; 
+ * ser.setOutputStream(ostream);
+ * 
+ * // Provide the SAX input events
+ * ContentHandler handler = ser.asContentHandler();
+ * handler.startDocument();
+ * char[] chars = { 'a', 'b', 'c' };
+ * handler.characters(chars, 0, chars.length);
+ * handler.endDocument();
+ * 
+ * ser.reset(); // get ready to use the serializer for another document
+ *              // of the same output method (TEXT).
+ * </pre>
+ * 
+ * <p>
+ * As an alternate to supplying a series of SAX events as input through the 
+ * ContentHandler interface, the input to serialize may be given as a DOM. 
+ * <p>
+ * For example:
+ * <pre>
+ * org.w3c.dom.Document     inputDoc;
+ * org.ajax4jsf.xml.serializer.Serializer   ser;
+ * java.io.Writer owriter;
+ * 
+ * java.util.Properties props = 
+ *   OutputPropertiesFactory.getDefaultMethodProperties(Method.XML);
+ * Serializer ser = SerializerFactory.getSerializer(props);
+ * owriter = ...;  // create a writer to serialize the document to
+ * ser.setWriter( owriter );
+ * 
+ * inputDoc = ...; // create the DOM document to be serialized
+ * DOMSerializer dser = ser.asDOMSerializer(); // a DOM will be serialized
+ * dser.serialize(inputDoc); // serialize the DOM, sending output to owriter
+ * 
+ * ser.reset(); // get ready to use the serializer for another document
+ *              // of the same output method.
+ * </pre>
+ * 
+ * This interface is a public API.
+ * 
+ * @see Method
+ * @see OutputPropertiesFactory
+ * @see SerializerFactory
+ * @see DOMSerializer
+ * @see ContentHandler
+ * 
+ * @xsl.usage general
+ */
+public interface Serializer {
+
+    /**
+     * Specifies an output stream to which the document should be
+     * serialized. This method should not be called while the
+     * serializer is in the process of serializing a document.
+     * <p>
+     * The encoding specified in the output {@link Properties} is used, or
+     * if no encoding was specified, the default for the selected
+     * output method.
+     * <p>
+     * Only one of setWriter() or setOutputStream() should be called.
+     *
+     * @param output The output stream
+     */
+    public void setOutputStream(OutputStream output);
+
+    /**
+     * Get the output stream where the events will be serialized to.
+     *
+     * @return reference to the result stream, or null if only a writer was
+     * set.
+     */
+    public OutputStream getOutputStream();
+
+    /**
+     * Specifies a writer to which the document should be serialized.
+     * This method should not be called while the serializer is in
+     * the process of serializing a document.
+     * <p>
+     * The encoding specified for the output {@link Properties} must be
+     * identical to the output format used with the writer.
+     * 
+     * <p>
+     * Only one of setWriter() or setOutputStream() should be called.
+     *
+     * @param writer The output writer stream
+     */
+    public void setWriter(Writer writer);
+
+    /**
+     * Get the character stream where the events will be serialized to.
+     *
+     * @return Reference to the result Writer, or null.
+     */
+    public Writer getWriter();
+
+    /**
+     * Specifies an output format for this serializer. It the
+     * serializer has already been associated with an output format,
+     * it will switch to the new format. This method should not be
+     * called while the serializer is in the process of serializing
+     * a document.
+     * <p>
+     * The standard property keys supported are: "method", "version", "encoding",
+     * "omit-xml-declaration", "standalone", doctype-public",
+     * "doctype-system", "cdata-section-elements", "indent", "media-type". 
+     * These property keys and their values are described in the XSLT recommendation,
+     * see {@link <a href="http://www.w3.org/TR/1999/REC-xslt-19991116"> XSLT 1.0 recommendation</a>}
+     * <p>
+     * The non-standard property keys supported are defined in {@link OutputPropertiesFactory}.
+     *
+     * <p>
+     * This method can be called multiple times before a document is serialized. Each 
+     * time it is called more, or over-riding property values, can be specified. One 
+     * property value that can not be changed is that of the "method" property key.
+     * <p>
+     * The value of the "cdata-section-elements" property key is a whitespace
+     * separated list of elements. If the element is in a namespace then 
+     * value is passed in this format: {uri}localName 
+     * <p>
+     * If the "cdata-section-elements" key is specified on multiple calls
+     * to this method the set of elements specified in the value
+     * is not replaced from one call to the
+     * next, but it is cumulative across the calls.
+     *
+     * @param format The output format to use, as a set of key/value pairs.
+     */
+    public void setOutputFormat(Properties format);
+
+    /**
+     * Returns the output format properties for this serializer.
+     *
+     * @return The output format key/value pairs in use.
+     */
+    public Properties getOutputFormat();
+
+    /**
+     * Return a {@link ContentHandler} interface to provide SAX input to.
+     * Through the returned object the document to be serailized,
+     * as a series of SAX events, can be provided to the serialzier.
+     * If the serializer does not support the {@link ContentHandler}
+     * interface, it will return null.
+     * <p>
+     * In principle only one of asDOMSerializer() or asContentHander() 
+     * should be called.
+     *
+     * @return A {@link ContentHandler} interface into this serializer,
+     *  or null if the serializer is not SAX 2 capable
+     * @throws IOException An I/O exception occured
+     */
+    public ContentHandler asContentHandler() throws IOException;
+
+    /**
+     * Return a {@link DOMSerializer} interface into this serializer.
+     * Through the returned object the document to be serialized,
+     * a DOM, can be provided to the serializer.
+     * If the serializer does not support the {@link DOMSerializer}
+     * interface, it should return null.
+     * <p>
+     * In principle only one of asDOMSerializer() or asContentHander() 
+     * should be called.
+     *
+     * @return A {@link DOMSerializer} interface into this serializer,
+     *  or null if the serializer is not DOM capable
+     * @throws IOException An I/O exception occured
+     */
+    public DOMSerializer asDOMSerializer() throws IOException;
+
+    /**
+     * This method resets the serializer. 
+     * If this method returns true, the
+     * serializer may be used for subsequent serialization of new
+     * documents. It is possible to change the output format and
+     * output stream prior to serializing, or to reuse the existing
+     * output format and output stream or writer.
+     *
+     * @return True if serializer has been reset and can be reused
+     */
+    public boolean reset();
+}
+

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/SerializerBase.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/SerializerBase.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/SerializerBase.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1383 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: SerializerBase.java,v 1.1.2.1 2007/01/09 18:57:22 alexsmirnov Exp $
+ */
+package org.ajax4jsf.xml.serializer;
+
+import java.io.IOException;
+import java.util.Vector;
+
+import javax.xml.transform.SourceLocator;
+import javax.xml.transform.Transformer;
+
+import org.ajax4jsf.xml.serializer.utils.MsgKey;
+import org.ajax4jsf.xml.serializer.utils.Utils;
+import org.xml.sax.Attributes;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.Locator;
+import org.xml.sax.SAXException;
+import org.xml.sax.SAXParseException;
+
+
+/**
+ * This class acts as a base class for the XML "serializers"
+ * and the stream serializers.
+ * It contains a number of common fields and methods.
+ * 
+ * @xsl.usage internal
+ */
+public abstract class SerializerBase
+    implements SerializationHandler, SerializerConstants
+{
+    
+
+    /**
+     * To fire off the end element trace event
+     * @param name Name of element
+     */
+    protected void fireEndElem(String name)
+        throws org.xml.sax.SAXException
+    {
+        if (m_tracer != null)
+        {
+            flushMyWriter();
+            m_tracer.fireGenerateEvent(SerializerTrace.EVENTTYPE_ENDELEMENT,name, (Attributes)null);
+        }     	        	    	
+    }
+
+    /**
+     * Report the characters trace event
+     * @param chars  content of characters
+     * @param start  starting index of characters to output
+     * @param length  number of characters to output
+     */
+    protected void fireCharEvent(char[] chars, int start, int length)
+        throws org.xml.sax.SAXException
+    {
+        if (m_tracer != null)
+        {
+            flushMyWriter();
+            m_tracer.fireGenerateEvent(SerializerTrace.EVENTTYPE_CHARACTERS, chars, start,length);
+        }     	        	    	
+    }
+
+    /**
+     * true if we still need to call startDocumentInternal() 
+	 */
+    protected boolean m_needToCallStartDocument = true; 
+
+    /** True if a trailing "]]>" still needs to be written to be
+     * written out. Used to merge adjacent CDATA sections
+     */
+    protected boolean m_cdataTagOpen = false;
+
+    /**
+     * All the attributes of the current element, collected from
+     * startPrefixMapping() calls, or addAddtribute() calls, or 
+     * from the SAX attributes in a startElement() call.
+     */
+    protected AttributesImplSerializer m_attributes = new AttributesImplSerializer();
+
+    /**
+     * Tells if we're in an EntityRef event.
+     */
+    protected boolean m_inEntityRef = false;
+
+    /** This flag is set while receiving events from the external DTD */
+    protected boolean m_inExternalDTD = false;
+
+    /**
+     * The System ID for the doc type.
+     */
+    private String m_doctypeSystem;
+
+    /**
+     * The public ID for the doc type.
+     */
+    private String m_doctypePublic;
+
+    /**
+     * Flag to tell that we need to add the doctype decl, which we can't do
+     * until the first element is encountered.
+     */
+    boolean m_needToOutputDocTypeDecl = true;
+
+    /**
+     * The character encoding.  Must match the encoding used for the
+     * printWriter.
+     */
+    private String m_encoding = null;
+
+    /**
+     * Tells if we should write the XML declaration.
+     */
+    private boolean m_shouldNotWriteXMLHeader = false;
+
+    /**
+     * The standalone value for the doctype.
+     */
+    private String m_standalone;
+
+    /**
+     * True if standalone was specified.
+     */
+    protected boolean m_standaloneWasSpecified = false;
+
+    /**
+     * Flag to tell if indenting (pretty-printing) is on.
+     */
+    protected boolean m_doIndent = false;
+    /**
+     * Amount to indent.
+     */
+    protected int m_indentAmount = 0;
+
+    /**
+     * Tells the XML version, for writing out to the XML decl.
+     */
+    private String m_version = null;
+
+    /**
+     * The mediatype.  Not used right now.
+     */
+    private String m_mediatype;
+
+    /**
+     * The transformer that was around when this output handler was created (if
+     * any).
+     */
+    private Transformer m_transformer;
+
+    /** 
+     * Pairs of local names and corresponding URIs of CDATA sections. This list
+     * comes from the cdata-section-elements attribute. Every second one is a
+     * local name, and every other second one is the URI for the local name. 
+     */
+    protected Vector m_cdataSectionElements = null;
+
+    /**
+     * Namespace support, that keeps track of currently defined 
+     * prefix/uri mappings. As processed elements come and go, so do
+     * the associated mappings for that element.
+     */
+    protected NamespaceMappings m_prefixMap;
+    
+    /**
+     * Handle for firing generate events.  This interface may be implemented
+     * by the referenced transformer object.
+     */
+    protected SerializerTrace m_tracer;
+    
+    protected SourceLocator m_sourceLocator;
+    
+
+    /**
+     * The writer to send output to. This field is only used in the ToStream
+     * serializers, but exists here just so that the fireStartDoc() and
+     * other fire... methods can flush this writer when tracing.
+     */
+    protected java.io.Writer m_writer = null;
+    
+    /**
+     * A reference to "stack frame" corresponding to
+     * the current element. Such a frame is pushed at a startElement()
+     * and popped at an endElement(). This frame contains information about
+     * the element, such as its namespace URI. 
+     */
+    protected ElemContext m_elemContext = new ElemContext();
+    
+    /**
+     * A utility buffer for converting Strings passed to
+     * character() methods to character arrays.
+     * Reusing this buffer means not creating a new character array
+     * everytime and it runs faster.
+     */
+    protected char[] m_charsBuff = new char[60];
+    
+    /**
+     * A utility buffer for converting Strings passed to
+     * attribute methods to character arrays.
+     * Reusing this buffer means not creating a new character array
+     * everytime and it runs faster.
+     */
+    protected char[] m_attrBuff = new char[30];    
+
+    /**
+     * Receive notification of a comment.
+     * 
+     * @see ExtendedLexicalHandler#comment(String)
+     */
+    public void comment(String data) throws SAXException
+    {
+        final int length = data.length();
+        if (length > m_charsBuff.length)
+        {
+            m_charsBuff = new char[length * 2 + 1];
+        }
+        data.getChars(0, length, m_charsBuff, 0);
+        comment(m_charsBuff, 0, length);
+    }
+
+    /**
+     * If at runtime, when the qname of the attribute is
+     * known, another prefix is specified for the attribute, then we can
+     * patch or hack the name with this method. For
+     * a qname of the form "ns?:otherprefix:name", this function patches the
+     * qname by simply ignoring "otherprefix".
+     * TODO: This method is a HACK! We do not have access to the
+     * XML file, it sometimes generates a NS prefix of the form "ns?" for
+     * an attribute.
+     */
+    protected String patchName(String qname)
+    {
+
+        
+        final int lastColon = qname.lastIndexOf(':');
+
+        if (lastColon > 0) {
+            final int firstColon = qname.indexOf(':');
+            final String prefix = qname.substring(0, firstColon);
+            final String localName = qname.substring(lastColon + 1);
+
+        // If uri is "" then ignore prefix
+            final String uri = m_prefixMap.lookupNamespace(prefix);
+            if (uri != null && uri.length() == 0) {
+                return localName;
+            }
+            else if (firstColon != lastColon) {
+                return prefix + ':' + localName;
+            }
+        }
+        return qname;        
+    }
+
+    /**
+     * Returns the local name of a qualified name. If the name has no prefix,
+     * then it works as the identity (SAX2).
+     * @param qname the qualified name 
+     * @return the name, but excluding any prefix and colon.
+     */
+    protected static String getLocalName(String qname)
+    {
+        final int col = qname.lastIndexOf(':');
+        return (col > 0) ? qname.substring(col + 1) : qname;
+    }
+
+    /**
+     * Receive an object for locating the origin of SAX document events.
+     *
+     * @param locator An object that can return the location of any SAX document
+     * event.
+     * 
+     * Receive an object for locating the origin of SAX document events.
+     *
+     * <p>SAX parsers are strongly encouraged (though not absolutely
+     * required) to supply a locator: if it does so, it must supply
+     * the locator to the application by invoking this method before
+     * invoking any of the other methods in the DocumentHandler
+     * interface.</p>
+     *
+     * <p>The locator allows the application to determine the end
+     * position of any document-related event, even if the parser is
+     * not reporting an error.  Typically, the application will
+     * use this information for reporting its own errors (such as
+     * character content that does not match an application's
+     * business rules).  The information returned by the locator
+     * is probably not sufficient for use with a search engine.</p>
+     *
+     * <p>Note that the locator will return correct information only
+     * during the invocation of the events in this interface.  The
+     * application should not attempt to use it at any other time.</p>
+     */
+    public void setDocumentLocator(Locator locator)
+    {
+        return;
+
+        // I don't do anything with this yet.
+    }
+
+    /**
+     * Adds the given attribute to the set of collected attributes , but only if
+     * there is a currently open element.
+     * 
+     * An element is currently open if a startElement() notification has
+     * occured but the start of the element has not yet been written to the
+     * output.  In the stream case this means that we have not yet been forced
+     * to close the elements opening tag by another notification, such as a
+     * character notification.
+     * 
+     * @param uri the URI of the attribute
+     * @param localName the local name of the attribute
+     * @param rawName    the qualified name of the attribute
+     * @param type the type of the attribute (probably CDATA)
+     * @param value the value of the attribute
+     * @param XSLAttribute true if this attribute is coming from an xsl:attriute element
+     * @see ExtendedContentHandler#addAttribute(String, String, String, String, String)
+     */
+    public void addAttribute(
+        String uri,
+        String localName,
+        String rawName,
+        String type,
+        String value,
+        boolean XSLAttribute)
+        throws SAXException
+    {
+        if (m_elemContext.m_startTagOpen)
+        {
+            addAttributeAlways(uri, localName, rawName, type, value, XSLAttribute);
+        }
+
+    }
+    
+    /**
+     * Adds the given attribute to the set of attributes, even if there is
+     * no currently open element. This is useful if a SAX startPrefixMapping()
+     * should need to add an attribute before the element name is seen.
+     * 
+     * @param uri the URI of the attribute
+     * @param localName the local name of the attribute
+     * @param rawName   the qualified name of the attribute
+     * @param type the type of the attribute (probably CDATA)
+     * @param value the value of the attribute
+     * @param XSLAttribute true if this attribute is coming from an xsl:attribute element
+     * @return true if the attribute was added, 
+     * false if an existing value was replaced.
+     */
+    public boolean addAttributeAlways(
+        String uri,
+        String localName,
+        String rawName,
+        String type,
+        String value,
+        boolean XSLAttribute)
+    {
+        boolean was_added;
+//            final int index =
+//                (localName == null || uri == null) ?
+//                m_attributes.getIndex(rawName):m_attributes.getIndex(uri, localName);        
+            int index;
+//            if (localName == null || uri == null){
+//                index = m_attributes.getIndex(rawName);
+//            }
+//            else {
+//                index = m_attributes.getIndex(uri, localName);
+//            }
+            if (localName == null || uri == null || uri.length() == 0)
+                index = m_attributes.getIndex(rawName);
+            else {
+                index = m_attributes.getIndex(uri,localName);
+            }
+            if (index >= 0)
+            {
+                /* We've seen the attribute before.
+                 * We may have a null uri or localName, but all
+                 * we really want to re-set is the value anyway.
+                 */
+                m_attributes.setValue(index,value);
+                was_added = false;
+            }
+            else
+            {
+                // the attribute doesn't exist yet, create it
+                m_attributes.addAttribute(uri, localName, rawName, type, value);
+                was_added = true;
+            }
+            return was_added;
+        
+    }
+  
+
+    /**
+     *  Adds  the given attribute to the set of collected attributes, 
+     * but only if there is a currently open element.
+     *
+     * @param name the attribute's qualified name
+     * @param value the value of the attribute
+     */
+    public void addAttribute(String name, final String value)
+    {
+        if (m_elemContext.m_startTagOpen)
+        {
+            final String patchedName = patchName(name);
+            final String localName = getLocalName(patchedName);
+            final String uri = getNamespaceURI(patchedName, false);
+
+            addAttributeAlways(uri,localName, patchedName, "CDATA", value, false);
+         }
+    }    
+
+    /**
+     * Adds the given xsl:attribute to the set of collected attributes, 
+     * but only if there is a currently open element.
+     *
+     * @param name the attribute's qualified name (prefix:localName)
+     * @param value the value of the attribute
+     * @param uri the URI that the prefix of the name points to
+     */
+    public void addXSLAttribute(String name, final String value, final String uri)
+    {
+        if (m_elemContext.m_startTagOpen)
+        {
+            final String patchedName = patchName(name);
+            final String localName = getLocalName(patchedName);
+
+            addAttributeAlways(uri,localName, patchedName, "CDATA", value, true);
+         }
+    } 
+
+    /**
+     * Add the given attributes to the currently collected ones. These
+     * attributes are always added, regardless of whether on not an element
+     * is currently open.
+     * @param atts List of attributes to add to this list
+     */
+    public void addAttributes(Attributes atts) throws SAXException
+    {
+
+        int nAtts = atts.getLength();
+
+        for (int i = 0; i < nAtts; i++)
+        {
+            String uri = atts.getURI(i);
+
+            if (null == uri)
+                uri = "";
+
+            addAttributeAlways(
+                uri,
+                atts.getLocalName(i),
+                atts.getQName(i),
+                atts.getType(i),
+                atts.getValue(i),
+                false);
+
+        }
+    }
+
+    /**
+     * Return a {@link ContentHandler} interface into this serializer.
+     * If the serializer does not support the {@link ContentHandler}
+     * interface, it should return null.
+     *
+     * @return A {@link ContentHandler} interface into this serializer,
+     *  or null if the serializer is not SAX 2 capable
+     * @throws IOException An I/O exception occured
+     */
+    public ContentHandler asContentHandler() throws IOException
+    {
+        return this;
+    }
+
+    /**
+     * Report the end of an entity.
+     *
+     * @param name The name of the entity that is ending.
+     * @throws org.xml.sax.SAXException The application may raise an exception.
+     * @see #startEntity
+     */
+    public void endEntity(String name) throws org.xml.sax.SAXException
+    {
+        if (name.equals("[dtd]"))
+            m_inExternalDTD = false;
+        m_inEntityRef = false;
+
+        if (m_tracer != null)
+            this.fireEndEntity(name);        
+    }
+
+    /**
+     * Flush and close the underlying java.io.Writer. This method applies to
+     * ToStream serializers, not ToSAXHandler serializers.
+     * @see ToStream
+     */
+    public void close()
+    {
+        // do nothing (base behavior)
+    }
+
+    /**
+     * Initialize global variables
+     */
+    protected void initCDATA()
+    {
+        // CDATA stack
+        //        _cdataStack = new Stack();
+        //        _cdataStack.push(new Integer(-1)); // push dummy value
+    }
+
+    /**
+     * Returns the character encoding to be used in the output document.
+     * @return the character encoding to be used in the output document.
+     */
+    public String getEncoding()
+    {
+        return m_encoding;
+    }
+
+   /**
+     * Sets the character encoding coming from the xsl:output encoding stylesheet attribute.
+     * @param m_encoding the character encoding
+     */
+    public void setEncoding(String m_encoding)
+    {
+        this.m_encoding = m_encoding;
+    }
+
+    /**
+     * Sets the value coming from the xsl:output omit-xml-declaration stylesheet attribute
+     * @param b true if the XML declaration is to be omitted from the output
+     * document.
+     */
+    public void setOmitXMLDeclaration(boolean b)
+    {
+        this.m_shouldNotWriteXMLHeader = b;
+    }
+
+
+    /**
+     * @return true if the XML declaration is to be omitted from the output
+     * document.
+     */
+    public boolean getOmitXMLDeclaration()
+    {
+        return m_shouldNotWriteXMLHeader;
+    }
+
+    /**
+     * Returns the previously set value of the value to be used as the public
+     * identifier in the document type declaration (DTD).
+     * 
+     *@return the public identifier to be used in the DOCTYPE declaration in the
+     * output document.
+     */    
+    public String getDoctypePublic()
+    {
+        return m_doctypePublic;
+    }
+
+    /** Set the value coming from the xsl:output doctype-public stylesheet attribute.
+      * @param doctypePublic the public identifier to be used in the DOCTYPE
+      * declaration in the output document.
+      */
+    public void setDoctypePublic(String doctypePublic)
+    {
+        this.m_doctypePublic = doctypePublic;
+    }
+
+
+    /**
+     * Returns the previously set value of the value to be used
+     * as the system identifier in the document type declaration (DTD).
+	 * @return the system identifier to be used in the DOCTYPE declaration in
+	 * the output document.
+     *
+     */    
+    public String getDoctypeSystem()
+    {
+        return m_doctypeSystem;
+    }
+
+    /** Set the value coming from the xsl:output doctype-system stylesheet attribute.
+      * @param doctypeSystem the system identifier to be used in the DOCTYPE
+      * declaration in the output document.
+      */
+    public void setDoctypeSystem(String doctypeSystem)
+    {
+        this.m_doctypeSystem = doctypeSystem;
+    }
+
+    /** Set the value coming from the xsl:output doctype-public and doctype-system stylesheet properties
+     * @param doctypeSystem the system identifier to be used in the DOCTYPE
+     * declaration in the output document.
+     * @param doctypePublic the public identifier to be used in the DOCTYPE
+     * declaration in the output document.
+     */
+    public void setDoctype(String doctypeSystem, String doctypePublic)
+    {
+        this.m_doctypeSystem = doctypeSystem;
+        this.m_doctypePublic = doctypePublic;
+    }
+
+    /**
+     * Sets the value coming from the xsl:output standalone stylesheet attribute.
+     * @param standalone a value of "yes" indicates that the
+     * <code>standalone</code> delaration is to be included in the output
+     * document. This method remembers if the value was explicitly set using
+     * this method, verses if the value is the default value.
+     */
+    public void setStandalone(String standalone)
+    {
+        if (standalone != null)
+        {
+            m_standaloneWasSpecified = true;
+            setStandaloneInternal(standalone);
+        }
+    }
+    /**
+     * Sets the XSL standalone attribute, but does not remember if this is a
+     * default or explicite setting.
+     * @param standalone "yes" | "no"
+     */    
+    protected void setStandaloneInternal(String standalone)
+    {
+        if ("yes".equals(standalone))
+            m_standalone = "yes";
+        else
+            m_standalone = "no";
+        
+    }
+
+    /**
+     * Gets the XSL standalone attribute
+     * @return a value of "yes" if the <code>standalone</code> delaration is to
+     * be included in the output document.
+     *  @see XSLOutputAttributes#getStandalone()
+     */
+    public String getStandalone()
+    {
+        return m_standalone;
+    }
+
+    /**
+     * @return true if the output document should be indented to visually
+     * indicate its structure.
+     */
+    public boolean getIndent()
+    {
+        return m_doIndent;
+    }
+    /**
+     * Gets the mediatype the media-type or MIME type associated with the output
+     * document.
+     * @return the mediatype the media-type or MIME type associated with the
+     * output document.
+     */
+    public String getMediaType()
+    {
+        return m_mediatype;
+    }
+
+    /**
+     * Gets the version of the output format.
+     * @return the version of the output format.
+     */
+    public String getVersion()
+    {
+        return m_version;
+    }
+
+    /**
+     * Sets the value coming from the xsl:output version attribute.
+     * @param version the version of the output format.
+     * @see SerializationHandler#setVersion(String)
+     */
+    public void setVersion(String version)
+    {
+        m_version = version;
+    }
+
+    /**
+     * Sets the value coming from the xsl:output media-type stylesheet attribute.
+     * @param mediaType the non-null media-type or MIME type associated with the
+     * output document.
+     * @see javax.xml.transform.OutputKeys#MEDIA_TYPE
+     * @see SerializationHandler#setMediaType(String)
+     */
+    public void setMediaType(String mediaType)
+    {
+        m_mediatype = mediaType;
+    }
+
+    /**
+     * @return the number of spaces to indent for each indentation level.
+     */
+    public int getIndentAmount()
+    {
+        return m_indentAmount;
+    }
+
+    /**
+     * Sets the indentation amount.
+     * @param m_indentAmount The m_indentAmount to set
+     */
+    public void setIndentAmount(int m_indentAmount)
+    {
+        this.m_indentAmount = m_indentAmount;
+    }
+
+    /**
+     * Sets the value coming from the xsl:output indent stylesheet
+     * attribute.
+     * @param doIndent true if the output document should be indented to
+     * visually indicate its structure.
+     * @see XSLOutputAttributes#setIndent(boolean)
+     */
+    public void setIndent(boolean doIndent)
+    {
+        m_doIndent = doIndent;
+    }
+
+    /**
+     * This method is used when a prefix/uri namespace mapping
+     * is indicated after the element was started with a 
+     * startElement() and before and endElement().
+     * startPrefixMapping(prefix,uri) would be used before the
+     * startElement() call.
+     * @param uri the URI of the namespace
+     * @param prefix the prefix associated with the given URI.
+     * 
+     * @see ExtendedContentHandler#namespaceAfterStartElement(String, String)
+     */
+    public void namespaceAfterStartElement(String uri, String prefix)
+        throws SAXException
+    {
+        // default behavior is to do nothing
+    }
+
+    /**
+     * Return a {@link DOMSerializer} interface into this serializer. If the
+     * serializer does not support the {@link DOMSerializer} interface, it should
+     * return null.
+     *
+     * @return A {@link DOMSerializer} interface into this serializer,  or null
+     * if the serializer is not DOM capable
+     * @throws IOException An I/O exception occured
+     * @see Serializer#asDOMSerializer()
+     */
+    public DOMSerializer asDOMSerializer() throws IOException
+    { 
+        return this;
+    }
+
+    /**
+     * Push a boolean state based on if the name of the current element
+     * is found in the list of qnames.  A state is only pushed if
+     * there were some cdata-section-names were specified.
+     * <p>
+     * Hidden parameters are the vector of qualified elements specified in
+     * cdata-section-names attribute, and the m_cdataSectionStates stack
+     * onto which whether the current element is in the list is pushed (true or
+     * false). Other hidden parameters are the current elements namespaceURI,
+     * localName and qName
+     */
+    protected boolean isCdataSection()
+    {
+
+        boolean b = false;
+
+        if (null != m_cdataSectionElements)
+        {
+            if (m_elemContext.m_elementLocalName == null)
+                m_elemContext.m_elementLocalName = 
+                    getLocalName(m_elemContext.m_elementName);
+            if (m_elemContext.m_elementURI == null)
+            {
+                String prefix = getPrefixPart(m_elemContext.m_elementName);
+                if (prefix != null)
+                    m_elemContext.m_elementURI = 
+                        m_prefixMap.lookupNamespace(prefix);
+
+            }
+
+            if ((null != m_elemContext.m_elementURI) 
+                && m_elemContext.m_elementURI.length() == 0)
+                m_elemContext.m_elementURI = null;
+
+            int nElems = m_cdataSectionElements.size();
+
+            // loop through 2 at a time, as these are pairs of URI and localName
+            for (int i = 0; i < nElems; i += 2)
+            {
+                String uri = (String) m_cdataSectionElements.elementAt(i);
+                String loc = (String) m_cdataSectionElements.elementAt(i + 1);
+                if (loc.equals(m_elemContext.m_elementLocalName)
+                    && subPartMatch(m_elemContext.m_elementURI, uri))
+                {
+                    b = true;
+
+                    break;
+                }
+            }
+        }
+        return b;
+    }
+
+    /**
+     * Tell if two strings are equal, without worry if the first string is null.
+     *
+     * @param p String reference, which may be null.
+     * @param t String reference, which may be null.
+     *
+     * @return true if strings are equal.
+     */
+    private static final boolean subPartMatch(String p, String t)
+    {
+        return (p == t) || ((null != p) && (p.equals(t)));
+    }
+
+    /**
+     * Returns the local name of a qualified name. 
+     * If the name has no prefix,
+     * then it works as the identity (SAX2). 
+     * 
+     * @param qname a qualified name
+     * @return returns the prefix of the qualified name,
+     * or null if there is no prefix.
+     */
+    protected static final String getPrefixPart(String qname)
+    {
+        final int col = qname.indexOf(':');
+        return (col > 0) ? qname.substring(0, col) : null;
+        //return (col > 0) ? qname.substring(0,col) : "";
+    }
+
+    /**
+     * Some users of the serializer may need the current namespace mappings
+     * @return the current namespace mappings (prefix/uri)
+     * @see ExtendedContentHandler#getNamespaceMappings()
+     */
+    public NamespaceMappings getNamespaceMappings()
+    {
+        return m_prefixMap;
+    }
+
+    /**
+     * Returns the prefix currently pointing to the given URI (if any).
+     * @param namespaceURI the uri of the namespace in question
+     * @return a prefix pointing to the given URI (if any).
+     * @see ExtendedContentHandler#getPrefix(String)
+     */
+    public String getPrefix(String namespaceURI)
+    {
+        String prefix = m_prefixMap.lookupPrefix(namespaceURI);
+        return prefix;
+    }
+
+    /**
+     * Returns the URI of an element or attribute. Note that default namespaces
+     * do not apply directly to attributes.
+     * @param qname a qualified name
+     * @param isElement true if the qualified name is the name of 
+     * an element.
+     * @return returns the namespace URI associated with the qualified name.
+     */
+    public String getNamespaceURI(String qname, boolean isElement)
+    {
+        String uri = EMPTYSTRING;
+        int col = qname.lastIndexOf(':');
+        final String prefix = (col > 0) ? qname.substring(0, col) : EMPTYSTRING;
+
+        if (!EMPTYSTRING.equals(prefix) || isElement)
+        {
+            if (m_prefixMap != null)
+            {
+                uri = m_prefixMap.lookupNamespace(prefix);
+                if (uri == null && !prefix.equals(XMLNS_PREFIX))
+                {
+                    throw new RuntimeException(
+                        Utils.messages.createMessage(
+                            MsgKey.ER_NAMESPACE_PREFIX,
+                            new Object[] { qname.substring(0, col) }  ));
+                }
+            }
+        }
+        return uri;
+    }
+
+    /**
+     * Returns the URI of prefix (if any)
+     * 
+	 * @param prefix the prefix whose URI is searched for
+     * @return the namespace URI currently associated with the
+     * prefix, null if the prefix is undefined.
+     */
+    public String getNamespaceURIFromPrefix(String prefix)
+    {
+        String uri = null;
+        if (m_prefixMap != null)
+            uri = m_prefixMap.lookupNamespace(prefix);
+        return uri;
+    }
+
+    /**
+     * Entity reference event.
+     *
+     * @param name Name of entity
+     *
+     * @throws org.xml.sax.SAXException
+     */
+    public void entityReference(String name) throws org.xml.sax.SAXException
+    {
+
+        flushPending();
+
+        startEntity(name);
+        endEntity(name);
+
+        if (m_tracer != null)
+		    fireEntityReference(name);
+    }
+
+    /**
+     * Sets the transformer associated with this serializer
+     * @param t the transformer associated with this serializer.
+     * @see SerializationHandler#setTransformer(Transformer)
+     */
+    public void setTransformer(Transformer t)
+    {
+        m_transformer = t;
+        
+        // If this transformer object implements the SerializerTrace interface
+        // then assign m_tracer to the transformer object so it can be used
+        // to fire trace events.
+        if ((m_transformer instanceof SerializerTrace) &&
+            (((SerializerTrace) m_transformer).hasTraceListeners())) {
+           m_tracer = (SerializerTrace) m_transformer;
+        } else {
+           m_tracer = null;
+        }
+    }
+    /**
+     * Gets the transformer associated with this serializer
+     * @return returns the transformer associated with this serializer.
+     * @see SerializationHandler#getTransformer()
+     */
+    public Transformer getTransformer()
+    {
+        return m_transformer;
+    }
+    
+    /**
+     * This method gets the nodes value as a String and uses that String as if
+     * it were an input character notification.
+     * @param node the Node to serialize
+     * @throws org.xml.sax.SAXException
+     */
+    public void characters(org.w3c.dom.Node node)
+        throws org.xml.sax.SAXException
+    {
+        flushPending();
+        String data = node.getNodeValue();
+        if (data != null)
+        {
+            final int length = data.length();
+            if (length > m_charsBuff.length)
+            {
+                m_charsBuff = new char[length * 2 + 1];
+            }
+            data.getChars(0, length, m_charsBuff, 0);
+            characters(m_charsBuff, 0, length);
+        }
+    }
+    
+
+    /**
+     * @see org.xml.sax.ErrorHandler#error(SAXParseException)
+     */
+    public void error(SAXParseException exc) throws SAXException {
+    }
+
+    /**
+     * @see org.xml.sax.ErrorHandler#fatalError(SAXParseException)
+     */
+    public void fatalError(SAXParseException exc) throws SAXException {
+        
+      m_elemContext.m_startTagOpen = false;
+
+    }
+
+    /**
+     * @see org.xml.sax.ErrorHandler#warning(SAXParseException)
+     */
+    public void warning(SAXParseException exc) throws SAXException 
+    {
+    }
+
+    /**
+     * To fire off start entity trace event
+     * @param name Name of entity
+     */
+    protected void fireStartEntity(String name)
+        throws org.xml.sax.SAXException
+    {        
+        if (m_tracer != null)
+        {
+            flushMyWriter();
+            m_tracer.fireGenerateEvent(SerializerTrace.EVENTTYPE_ENTITYREF, name);
+        }     	        	    	
+    }
+
+    /**
+     * Report the characters event
+     * @param chars  content of characters
+     * @param start  starting index of characters to output
+     * @param length  number of characters to output
+     */
+//    protected void fireCharEvent(char[] chars, int start, int length)
+//        throws org.xml.sax.SAXException
+//    {
+//        if (m_tracer != null)
+//            m_tracer.fireGenerateEvent(SerializerTrace.EVENTTYPE_CHARACTERS, chars, start,length);     	        	    	
+//    }
+//        
+
+    /**
+     * This method is only used internally when flushing the writer from the
+     * various fire...() trace events.  Due to the writer being wrapped with 
+     * SerializerTraceWriter it may cause the flush of these trace events:
+     * EVENTTYPE_OUTPUT_PSEUDO_CHARACTERS 
+     * EVENTTYPE_OUTPUT_CHARACTERS
+     * which trace the output written to the output stream.
+     * 
+     */
+    private void flushMyWriter()
+    {
+        if (m_writer != null)
+        {
+            try
+            {
+                m_writer.flush();
+            }
+            catch(IOException ioe)
+            {
+            
+            }
+        }
+    }
+    /**
+     * Report the CDATA trace event
+     * @param chars  content of CDATA
+     * @param start  starting index of characters to output
+     * @param length  number of characters to output
+     */
+    protected void fireCDATAEvent(char[] chars, int start, int length)
+        throws org.xml.sax.SAXException
+    {
+		if (m_tracer != null)
+        {
+            flushMyWriter();
+			m_tracer.fireGenerateEvent(SerializerTrace.EVENTTYPE_CDATA, chars, start,length);
+        }     	        	    	
+    }
+
+    /**
+     * Report the comment trace event
+     * @param chars  content of comment
+     * @param start  starting index of comment to output
+     * @param length  number of characters to output
+     */
+    protected void fireCommentEvent(char[] chars, int start, int length)
+        throws org.xml.sax.SAXException
+    {
+		if (m_tracer != null)
+        {
+            flushMyWriter();
+			m_tracer.fireGenerateEvent(SerializerTrace.EVENTTYPE_COMMENT, new String(chars, start, length));
+        }     	        	    	
+    }
+
+
+    /**
+     * To fire off end entity trace event
+     * @param name Name of entity
+     */
+    public void fireEndEntity(String name)
+        throws org.xml.sax.SAXException
+    {
+        if (m_tracer != null)
+            flushMyWriter();
+    	// we do not need to handle this.
+    }    
+
+    /**
+     * To fire off start document trace  event
+     */
+     protected void fireStartDoc()
+        throws org.xml.sax.SAXException
+    {
+        if (m_tracer != null)
+        {
+            flushMyWriter();
+            m_tracer.fireGenerateEvent(SerializerTrace.EVENTTYPE_STARTDOCUMENT);
+        }     	    
+    }    
+
+
+    /**
+     * To fire off end document trace event
+     */
+    protected void fireEndDoc()
+        throws org.xml.sax.SAXException
+    {
+        if (m_tracer != null)
+        {
+            flushMyWriter();
+            m_tracer.fireGenerateEvent(SerializerTrace.EVENTTYPE_ENDDOCUMENT);
+        }     	        	
+    }    
+    
+    /**
+     * Report the start element trace event. This trace method needs to be
+     * called just before the attributes are cleared.
+     * 
+     * @param elemName the qualified name of the element
+     * 
+     */
+    protected void fireStartElem(String elemName)
+        throws org.xml.sax.SAXException
+    {        
+        if (m_tracer != null)
+        {
+            flushMyWriter();
+            m_tracer.fireGenerateEvent(SerializerTrace.EVENTTYPE_STARTELEMENT,
+                elemName, m_attributes);     	 
+        }       	
+    }    
+
+
+    /**
+     * To fire off the end element event
+     * @param name Name of element
+     */
+//    protected void fireEndElem(String name)
+//        throws org.xml.sax.SAXException
+//    {
+//        if (m_tracer != null)
+//            m_tracer.fireGenerateEvent(SerializerTrace.EVENTTYPE_ENDELEMENT,name, (Attributes)null);     	        	    	
+//    }    
+
+
+    /**
+     * To fire off the PI trace event
+     * @param name Name of PI
+     */
+    protected void fireEscapingEvent(String name, String data)
+        throws org.xml.sax.SAXException
+    {
+
+        if (m_tracer != null)
+        {
+            flushMyWriter();
+            m_tracer.fireGenerateEvent(SerializerTrace.EVENTTYPE_PI,name, data);
+        }     	        	    	
+    }    
+
+
+    /**
+     * To fire off the entity reference trace event
+     * @param name Name of entity reference
+     */
+    protected void fireEntityReference(String name)
+        throws org.xml.sax.SAXException
+    {
+        if (m_tracer != null)
+        {
+            flushMyWriter();
+            m_tracer.fireGenerateEvent(SerializerTrace.EVENTTYPE_ENTITYREF,name, (Attributes)null);
+        }     	        	    	
+    }    
+
+    /**
+     * Receive notification of the beginning of a document.
+     * This method is never a self generated call, 
+     * but only called externally.
+     *
+     * <p>The SAX parser will invoke this method only once, before any
+     * other methods in this interface or in DTDHandler (except for
+     * setDocumentLocator).</p>
+     *
+     * @throws org.xml.sax.SAXException Any SAX exception, possibly
+     *            wrapping another exception.
+     *
+     * @throws org.xml.sax.SAXException
+     */
+    public void startDocument() throws org.xml.sax.SAXException
+    {
+
+        // if we do get called with startDocument(), handle it right away       
+        startDocumentInternal();
+        m_needToCallStartDocument = false;
+        return;
+    }   
+    
+    /**
+     * This method handles what needs to be done at a startDocument() call,
+     * whether from an external caller, or internally called in the 
+     * serializer.  For historical reasons the serializer is flexible to
+     * startDocument() not always being called.
+     * Even if no external call is
+     * made into startDocument() this method will always be called as a self
+     * generated internal startDocument, it handles what needs to be done at a
+     * startDocument() call.
+     * 
+     * This method exists just to make sure that startDocument() is only ever
+     * called from an external caller, which in principle is just a matter of
+     * style.
+     * 
+     * @throws SAXException
+     */
+    protected void startDocumentInternal() throws org.xml.sax.SAXException
+    {
+        if (m_tracer != null)
+            this.fireStartDoc();
+    } 
+    /**
+     * This method is used to set the source locator, which might be used to
+     * generated an error message.
+     * @param locator the source locator
+     *
+     * @see ExtendedContentHandler#setSourceLocator(javax.xml.transform.SourceLocator)
+     */
+    public void setSourceLocator(SourceLocator locator)
+    {
+        m_sourceLocator = locator;    
+    }
+
+    
+    /** 
+     * Used only by TransformerSnapshotImpl to restore the serialization 
+     * to a previous state. 
+     * 
+     * @param mappings NamespaceMappings
+     */
+    public void setNamespaceMappings(NamespaceMappings mappings) {
+        m_prefixMap = mappings;
+    }
+    
+    public boolean reset()
+    {
+    	resetSerializerBase();
+    	return true;
+    }
+    
+    /**
+     * Reset all of the fields owned by SerializerBase
+     *
+     */
+    private void resetSerializerBase()
+    {
+    	this.m_attributes.clear();
+    	this.m_cdataSectionElements = null;
+        this.m_elemContext = new ElemContext();
+    	this.m_doctypePublic = null;
+    	this.m_doctypeSystem = null;
+    	this.m_doIndent = false;
+    	this.m_encoding = null;
+    	this.m_indentAmount = 0;
+    	this.m_inEntityRef = false;
+    	this.m_inExternalDTD = false;
+    	this.m_mediatype = null;
+    	this.m_needToCallStartDocument = true;
+    	this.m_needToOutputDocTypeDecl = false;
+        if (this.m_prefixMap != null)
+    	    this.m_prefixMap.reset();
+    	this.m_shouldNotWriteXMLHeader = false;
+    	this.m_sourceLocator = null;
+    	this.m_standalone = null;
+    	this.m_standaloneWasSpecified = false;
+    	this.m_tracer = null;
+    	this.m_transformer = null;
+    	this.m_version = null;
+    	// don't set writer to null, so that it might be re-used
+    	//this.m_writer = null;
+    }
+    
+    /**
+     * Returns true if the serializer is used for temporary output rather than
+     * final output.
+     * 
+     * This concept is made clear in the XSLT 2.0 draft.
+     */
+    final boolean inTemporaryOutputState() 
+    {
+        /* This is a hack. We should really be letting the serializer know
+         * that it is in temporary output state with an explicit call, but
+         * from a pragmatic point of view (for now anyways) having no output
+         * encoding at all, not even the default UTF-8 indicates that the serializer
+         * is being used for temporary RTF.
+         */ 
+        return (getEncoding() == null);
+        
+    }
+    
+    /**
+     * This method adds an attribute the the current element,
+     * but should not be used for an xsl:attribute child.
+     * @see ExtendedContentHandler#addAttribute(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)
+     */
+    public void addAttribute(String uri, String localName, String rawName, String type, String value) throws SAXException 
+    {
+        if (m_elemContext.m_startTagOpen)
+        {
+            addAttributeAlways(uri, localName, rawName, type, value, false);
+        }
+    }
+    
+    /**
+     * @see org.xml.sax.DTDHandler#notationDecl(java.lang.String, java.lang.String, java.lang.String)
+     */
+    public void notationDecl(String arg0, String arg1, String arg2)
+        throws SAXException {
+        // This method just provides a definition to satisfy the interface
+        // A particular sub-class of SerializerBase provides the implementation (if desired)        
+    }
+
+    /**
+     * @see org.xml.sax.DTDHandler#unparsedEntityDecl(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
+     */
+    public void unparsedEntityDecl(
+        String arg0,
+        String arg1,
+        String arg2,
+        String arg3)
+        throws SAXException {
+        // This method just provides a definition to satisfy the interface
+        // A particular sub-class of SerializerBase provides the implementation (if desired)        
+    }
+
+    /**
+     * If set to false the serializer does not expand DTD entities,
+     * but leaves them as is, the default value is true.
+     */
+    public void setDTDEntityExpansion(boolean expand) {
+        // This method just provides a definition to satisfy the interface
+        // A particular sub-class of SerializerBase provides the implementation (if desired)        
+    }
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/SerializerConstants.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/SerializerConstants.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/SerializerConstants.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,78 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: SerializerConstants.java,v 1.1.2.1 2007/01/09 18:57:21 alexsmirnov Exp $
+ */
+package org.ajax4jsf.xml.serializer;
+
+/**
+ * Constants used in serialization, such as the string "xmlns"
+ * @xsl.usage internal
+ */
+interface SerializerConstants
+{
+
+    /** To insert ]]> in a CDATA section by ending the last CDATA section with
+     * ]] and starting the next CDATA section with >
+     */
+    static final String CDATA_CONTINUE = "]]]]><![CDATA[>";
+    /**
+     * The constant "]]>"
+     */
+    static final String CDATA_DELIMITER_CLOSE = "]]>";
+    static final String CDATA_DELIMITER_OPEN = "<![CDATA[";
+
+    static final String EMPTYSTRING = "";
+
+    static final String ENTITY_AMP = "&amp;";
+    static final String ENTITY_CRLF = "&#xA;";
+    static final String ENTITY_GT = "&gt;";
+    static final String ENTITY_LT = "&lt;";
+    static final String ENTITY_QUOT = "&quot;";
+
+    static final String XML_PREFIX = "xml";
+    static final String XMLNS_PREFIX = "xmlns";
+    static final String XMLNS_URI = "http://www.w3.org/2000/xmlns/";
+   
+    public static final String DEFAULT_SAX_SERIALIZER="org.ajax4jsf.xml.serializer.ToXMLSAXHandler";
+    
+    /**
+     * Define the XML version.
+     */
+    static final String XMLVERSION11 = "1.1";
+    static final String XMLVERSION10 = "1.0";
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/SerializerFactory.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/SerializerFactory.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/SerializerFactory.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,205 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: SerializerFactory.java,v 1.1.2.1 2007/01/09 18:57:29 alexsmirnov Exp $
+ */
+package org.ajax4jsf.xml.serializer;
+
+import java.util.Hashtable;
+import java.util.Properties;
+
+import javax.xml.transform.OutputKeys;
+
+import org.ajax4jsf.xml.serializer.utils.MsgKey;
+import org.ajax4jsf.xml.serializer.utils.Utils;
+import org.ajax4jsf.xml.serializer.utils.WrappedRuntimeException;
+import org.xml.sax.ContentHandler;
+
+/**
+ * This class is a public API, it is a factory for creating serializers.
+   * 
+   * The properties object passed to the getSerializer() method should be created by
+   * the OutputPropertiesFactory. Although the properties object
+   * used to create a serializer does not need to be obtained 
+   * from OutputPropertiesFactory,
+   * using this factory ensures that the default key/value properties
+   * are set for the given output "method".
+   * 
+   * <p>
+   * The standard property keys supported are: "method", "version", "encoding",
+   * "omit-xml-declaration", "standalone", doctype-public",
+   * "doctype-system", "cdata-section-elements", "indent", "media-type". 
+   * These property keys and their values are described in the XSLT recommendation,
+   * see {@link <a href="http://www.w3.org/TR/1999/REC-xslt-19991116"> XSLT 1.0 recommendation</a>}
+   * 
+   * <p>
+   * The value of the "cdata-section-elements" property key is a whitespace
+   * separated list of elements. If the element is in a namespace then 
+   * value is passed in this format: {uri}localName 
+   *
+   * <p>
+   * The non-standard property keys supported are defined in {@link OutputPropertiesFactory}.
+   *
+   * @see OutputPropertiesFactory
+   * @see Method
+   * @see Serializer
+   */
+public final class SerializerFactory
+{
+  /**
+   * This constructor is private just to prevent the creation of such an object.
+   */
+
+  private SerializerFactory() {
+ 
+  }
+  /**
+   * Associates output methods to default output formats.
+   */
+  private static Hashtable m_formats = new Hashtable();
+
+  /**
+   * Returns a serializer for the specified output method. The output method
+   * is specified by the value of the property associated with the "method" key.
+   * If no implementation exists that supports the specified output method
+   * an exception of some type will be thrown.
+   * For a list of the output "method" key values see {@link Method}.
+   *
+   * @param format The output format, minimally the "method" property must be set.
+   * @return A suitable serializer.
+   * @throws IllegalArgumentException if method is
+   * null or an appropriate serializer can't be found
+   * @throws Exception if the class for the serializer is found but does not
+   * implement ContentHandler.
+   * @throws WrappedRuntimeException if an exception is thrown while trying to find serializer
+   */
+  public static Serializer getSerializer(Properties format)
+  {
+      Serializer ser;
+
+      try
+      {
+        String method = format.getProperty(OutputKeys.METHOD);
+
+        if (method == null) {
+            String msg = Utils.messages.createMessage(
+                MsgKey.ER_FACTORY_PROPERTY_MISSING,
+                new Object[] { OutputKeys.METHOD});
+            throw new IllegalArgumentException(msg);
+        }
+
+        String className =
+            format.getProperty(OutputPropertiesFactory.S_KEY_CONTENT_HANDLER);
+
+
+        if (null == className)
+        {
+            // Missing Content Handler property, load default using OutputPropertiesFactory
+            Properties methodDefaults =
+                OutputPropertiesFactory.getDefaultMethodProperties(method);
+            className = 
+            methodDefaults.getProperty(OutputPropertiesFactory.S_KEY_CONTENT_HANDLER);
+            if (null == className) {
+                String msg = Utils.messages.createMessage(
+                    MsgKey.ER_FACTORY_PROPERTY_MISSING,
+                    new Object[] { OutputPropertiesFactory.S_KEY_CONTENT_HANDLER});
+                throw new IllegalArgumentException(msg);
+            }
+
+        }
+
+
+
+        ClassLoader loader = ObjectFactory.findClassLoader();
+
+        Class cls = ObjectFactory.findProviderClass(className, loader, true);
+
+        // _serializers.put(method, cls);
+
+        Object obj = cls.newInstance();
+
+        if (obj instanceof SerializationHandler)
+        {
+              // this is one of the supplied serializers
+            ser = (Serializer) cls.newInstance();
+            ser.setOutputFormat(format);
+        }
+        else
+        {
+              /*
+               *  This  must be a user defined Serializer.
+               *  It had better implement ContentHandler.
+               */
+               if (obj instanceof ContentHandler)
+               {
+
+                  /*
+                   * The user defined serializer defines ContentHandler,
+                   * but we need to wrap it with ToXMLSAXHandler which
+                   * will collect SAX-like events and emit true
+                   * SAX ContentHandler events to the users handler.
+                   */
+                  className = SerializerConstants.DEFAULT_SAX_SERIALIZER;
+                  cls = ObjectFactory.findProviderClass(className, loader, true);
+                  SerializationHandler sh =
+                      (SerializationHandler) cls.newInstance();
+                  sh.setContentHandler( (ContentHandler) obj);
+                  sh.setOutputFormat(format);
+
+                  ser = sh;
+               }
+               else
+               {
+                  // user defined serializer does not implement
+                  // ContentHandler, ... very bad
+                   throw new Exception(
+                       Utils.messages.createMessage(
+                           MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER,
+                               new Object[] { className}));
+               }
+
+        }
+      }
+      catch (Exception e)
+      {
+        throw new org.ajax4jsf.xml.serializer.utils.WrappedRuntimeException(e);
+      }
+
+      // If we make it to here ser is not null.
+      return ser;
+  }
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/SerializerTrace.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/SerializerTrace.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/SerializerTrace.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,172 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: SerializerTrace.java,v 1.1.2.1 2007/01/09 18:57:20 alexsmirnov Exp $
+ */
+package org.ajax4jsf.xml.serializer;
+
+import org.xml.sax.Attributes;
+
+/**
+ * This interface defines a set of integer constants that identify trace event
+ * types.
+ * 
+ * @xsl.usage internal
+ */
+
+public interface SerializerTrace {
+    
+  /**
+   * Event type generated when a document begins.
+   *
+   */
+  public static final int EVENTTYPE_STARTDOCUMENT = 1;
+
+  /**
+   * Event type generated when a document ends.
+   */
+  public static final int EVENTTYPE_ENDDOCUMENT = 2;
+
+  /**
+   * Event type generated when an element begins (after the attributes have been processed but before the children have been added).
+   */
+  public static final int EVENTTYPE_STARTELEMENT = 3;
+
+  /**
+   * Event type generated when an element ends, after it's children have been added.
+   */
+  public static final int EVENTTYPE_ENDELEMENT = 4;
+
+  /**
+   * Event type generated for character data (CDATA and Ignorable Whitespace have their own events).
+   */
+  public static final int EVENTTYPE_CHARACTERS = 5;
+
+  /**
+   * Event type generated for ignorable whitespace (I'm not sure how much this is actually called.
+   */
+  public static final int EVENTTYPE_IGNORABLEWHITESPACE = 6;
+
+  /**
+   * Event type generated for processing instructions.
+   */
+  public static final int EVENTTYPE_PI = 7;
+
+  /**
+   * Event type generated after a comment has been added.
+   */
+  public static final int EVENTTYPE_COMMENT = 8;
+
+  /**
+   * Event type generate after an entity ref is created.
+   */
+  public static final int EVENTTYPE_ENTITYREF = 9;
+
+  /**
+   * Event type generated after CDATA is generated.
+   */
+  public static final int EVENTTYPE_CDATA = 10;
+  
+  /**
+   * Event type generated when characters might be written to an output stream,
+   *  but  these characters never are. They will ultimately be written out via
+   * EVENTTYPE_OUTPUT_CHARACTERS. This type is used as attributes are collected.
+   * Whenever the attributes change this event type is fired. At the very end
+   * however, when the attributes do not change anymore and are going to be
+   * ouput to the document the real characters will be written out using the
+   * EVENTTYPE_OUTPUT_CHARACTERS.
+   */
+  public static final int EVENTTYPE_OUTPUT_PSEUDO_CHARACTERS = 11;
+  
+  /**
+   * Event type generated when characters are written to an output stream.
+   */
+  public static final int EVENTTYPE_OUTPUT_CHARACTERS = 12;
+    
+
+  /**
+   * Tell if trace listeners are present.
+   *
+   * @return True if there are trace listeners
+   */
+  public boolean hasTraceListeners();
+  
+  /**
+   * Fire startDocument, endDocument events.
+   *
+   * @param eventType One of the EVENTTYPE_XXX constants.
+   */
+  public void fireGenerateEvent(int eventType);
+  
+  /**
+   * Fire startElement, endElement events.
+   *
+   * @param eventType One of the EVENTTYPE_XXX constants.
+   * @param name The name of the element.
+   * @param atts The SAX attribute list.
+   */
+  public void fireGenerateEvent(int eventType, String name, Attributes atts);
+  
+  /**
+   * Fire characters, cdata events.
+   *
+   * @param eventType One of the EVENTTYPE_XXX constants.
+   * @param ch The char array from the SAX event.
+   * @param start The start offset to be used in the char array.
+   * @param length The end offset to be used in the chara array.
+   */
+  public void fireGenerateEvent(int eventType, char ch[], int start, int length);
+  
+  /**
+   * Fire processingInstruction events.
+   *
+   * @param eventType One of the EVENTTYPE_XXX constants.
+   * @param name The name of the processing instruction.
+   * @param data The processing instruction data.
+   */
+  public void fireGenerateEvent(int eventType, String name, String data);
+  
+
+  /**
+   * Fire comment and entity ref events.
+   *
+   * @param eventType One of the EVENTTYPE_XXX constants.
+   * @param data The comment or entity ref data.
+   */
+  public void fireGenerateEvent(int eventType, String data);
+  
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/SerializerTraceWriter.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/SerializerTraceWriter.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/SerializerTraceWriter.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,360 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 2003-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: SerializerTraceWriter.java,v 1.1.2.1 2007/01/09 18:57:24 alexsmirnov Exp $
+ */
+package org.ajax4jsf.xml.serializer;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.Writer;
+
+/**
+ * This class wraps the real writer, it only purpose is to send
+ * CHARACTERTOSTREAM events to the trace listener. 
+ * Each method immediately sends the call to the wrapped writer unchanged, but
+ * in addition it collects characters to be issued to a trace listener.
+ * 
+ * In this way the trace
+ * listener knows what characters have been written to the output Writer.
+ * 
+ * There may still be differences in what the trace events say is going to the
+ * output writer and what is really going there. These differences will be due
+ * to the fact that this class is UTF-8 encoding before emiting the trace event
+ * and the underlying writer may not be UTF-8 encoding. There may also be
+ * encoding differences.  So the main pupose of this class is to provide a
+ * resonable facsimile of the true output.
+ * 
+ * @xsl.usage internal
+ */
+final class SerializerTraceWriter extends Writer implements WriterChain
+{
+
+    /** The real writer to immediately write to.
+     * This reference may be null, in which case nothing is written out, but
+     * only the trace events are fired for output.
+     */
+    private final java.io.Writer m_writer;
+
+    /** The tracer to send events to */
+    private final SerializerTrace m_tracer;
+
+    /** The size of the internal buffer, just to keep too many
+     * events from being sent to the tracer
+     */
+    private int buf_length;
+
+    /**
+     * Internal buffer to collect the characters to go to the trace listener.
+     * 
+     */
+    private byte buf[];
+
+    /**
+     * How many bytes have been collected and still need to go to trace
+     * listener.
+     */
+    private int count;
+
+    /**
+     * Creates or replaces the internal buffer, and makes sure it has a few
+     * extra bytes slight overflow of the last UTF8 encoded character.
+     * @param size
+     */
+    private void setBufferSize(int size)
+    {
+        buf = new byte[size + 3];
+        buf_length = size;
+        count = 0;
+    }
+
+    /**
+     * Constructor.
+     * If the writer passed in is null, then this SerializerTraceWriter will
+     * only signal trace events of what would have been written to that writer.
+     * If the writer passed in is not null then the trace events will mirror
+     * what is going to that writer. In this way tools, such as a debugger, can
+     * gather information on what is being written out.
+     * 
+     * @param out the Writer to write to (possibly null)
+     * @param tracer the tracer to inform that characters are being written
+     */
+    public SerializerTraceWriter(Writer out, SerializerTrace tracer)
+    {
+        m_writer = out;
+        m_tracer = tracer;
+        setBufferSize(1024);
+    }
+
+    /**
+     * Flush out the collected characters by sending them to the trace
+     * listener.  These characters are never written to the real writer
+     * (m_writer) because that has already happened with every method
+     * call. This method simple informs the listener of what has already
+     * happened.
+     * @throws IOException
+     */
+    private void flushBuffer() throws IOException
+    {
+
+        // Just for tracing purposes
+        if (count > 0)
+        {
+            char[] chars = new char[count];
+            for(int i=0; i<count; i++)
+                chars[i] = (char) buf[i];
+
+            if (m_tracer != null)
+                m_tracer.fireGenerateEvent(
+                    SerializerTrace.EVENTTYPE_OUTPUT_CHARACTERS,
+                    chars,
+                    0,
+                    chars.length);
+
+            count = 0;
+        }
+    }
+
+    /**
+     * Flush the internal buffer and flush the Writer
+     * @see java.io.Writer#flush()
+     */
+    public void flush() throws java.io.IOException
+    {
+        // send to the real writer
+        if (m_writer != null)
+            m_writer.flush();
+
+        // from here on just for tracing purposes
+        flushBuffer();
+    }
+
+    /**
+     * Flush the internal buffer and close the Writer
+     * @see java.io.Writer#close()
+     */
+    public void close() throws java.io.IOException
+    {
+        // send to the real writer
+        if (m_writer != null)   
+            m_writer.close();
+
+        // from here on just for tracing purposes
+        flushBuffer();
+    }
+
+
+    /**
+     * Write a single character.  The character to be written is contained in
+     * the 16 low-order bits of the given integer value; the 16 high-order bits
+     * are ignored.
+     *
+     * <p> Subclasses that intend to support efficient single-character output
+     * should override this method.
+     *
+     * @param c  int specifying a character to be written.
+     * @exception  IOException  If an I/O error occurs
+     */
+    public void write(final int c) throws IOException
+    {
+        // send to the real writer
+        if (m_writer != null)
+            m_writer.write(c);
+
+        // ---------- from here on just collect for tracing purposes
+
+        /* If we are close to the end of the buffer then flush it.
+         * Remember the buffer can hold a few more characters than buf_length
+         */
+        if (count >= buf_length)
+            flushBuffer();
+
+        if (c < 0x80)
+        {
+            buf[count++] = (byte) (c);
+        }
+        else if (c < 0x800)
+        {
+            buf[count++] = (byte) (0xc0 + (c >> 6));
+            buf[count++] = (byte) (0x80 + (c & 0x3f));
+        }
+        else
+        {
+            buf[count++] = (byte) (0xe0 + (c >> 12));
+            buf[count++] = (byte) (0x80 + ((c >> 6) & 0x3f));
+            buf[count++] = (byte) (0x80 + (c & 0x3f));
+        }
+    }
+
+    /**
+     * Write a portion of an array of characters.
+     *
+     * @param  chars  Array of characters
+     * @param  start   Offset from which to start writing characters
+     * @param  length   Number of characters to write
+     *
+     * @exception  IOException  If an I/O error occurs
+     *
+     * @throws java.io.IOException
+     */
+    public void write(final char chars[], final int start, final int length)
+        throws java.io.IOException
+    {
+        // send to the real writer
+        if (m_writer != null)
+            m_writer.write(chars, start, length);
+
+        // from here on just collect for tracing purposes
+        int lengthx3 = (length << 1) + length;
+
+        if (lengthx3 >= buf_length)
+        {
+
+            /* If the request length exceeds the size of the output buffer,
+              * flush the output buffer and make the buffer bigger to handle.
+              */
+
+            flushBuffer();
+            setBufferSize(2 * lengthx3);
+
+        }
+
+        if (lengthx3 > buf_length - count)
+        {
+            flushBuffer();
+        }
+
+        final int n = length + start;
+        for (int i = start; i < n; i++)
+        {
+            final char c = chars[i];
+
+            if (c < 0x80)
+                buf[count++] = (byte) (c);
+            else if (c < 0x800)
+            {
+                buf[count++] = (byte) (0xc0 + (c >> 6));
+                buf[count++] = (byte) (0x80 + (c & 0x3f));
+            }
+            else
+            {
+                buf[count++] = (byte) (0xe0 + (c >> 12));
+                buf[count++] = (byte) (0x80 + ((c >> 6) & 0x3f));
+                buf[count++] = (byte) (0x80 + (c & 0x3f));
+            }
+        }
+
+    }
+
+    /**
+     * Write a string.
+     *
+     * @param  s  String to be written
+     *
+     * @exception  IOException  If an I/O error occurs
+     */
+    public void write(final String s) throws IOException
+    {
+        // send to the real writer
+        if (m_writer != null)
+            m_writer.write(s);
+
+        // from here on just collect for tracing purposes
+        final int length = s.length();
+
+        // We multiply the length by three since this is the maximum length
+        // of the characters that we can put into the buffer.  It is possible
+        // for each Unicode character to expand to three bytes.
+
+        int lengthx3 = (length << 1) + length;
+
+        if (lengthx3 >= buf_length)
+        {
+
+            /* If the request length exceeds the size of the output buffer,
+              * flush the output buffer and make the buffer bigger to handle.
+              */
+
+            flushBuffer();
+            setBufferSize(2 * lengthx3);
+        }
+
+        if (lengthx3 > buf_length - count)
+        {
+            flushBuffer();
+        }
+
+        for (int i = 0; i < length; i++)
+        {
+            final char c = s.charAt(i);
+
+            if (c < 0x80)
+                buf[count++] = (byte) (c);
+            else if (c < 0x800)
+            {
+                buf[count++] = (byte) (0xc0 + (c >> 6));
+                buf[count++] = (byte) (0x80 + (c & 0x3f));
+            }
+            else
+            {
+                buf[count++] = (byte) (0xe0 + (c >> 12));
+                buf[count++] = (byte) (0x80 + ((c >> 6) & 0x3f));
+                buf[count++] = (byte) (0x80 + (c & 0x3f));
+            }
+        }
+    }
+
+    /**
+     * Get the writer that this one directly wraps.
+     */
+    public Writer getWriter()
+    {
+        return m_writer;
+    }
+
+    /**
+     * Get the OutputStream that is the at the end of the
+     * chain of writers.
+     */
+    public OutputStream getOutputStream()
+    {
+        OutputStream retval = null;
+        if (m_writer instanceof WriterChain)
+            retval = ((WriterChain) m_writer).getOutputStream();
+        return retval;
+    }
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ToHTMLSAXHandler.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ToHTMLSAXHandler.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ToHTMLSAXHandler.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,764 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: ToHTMLSAXHandler.java,v 1.1.2.1 2007/01/09 18:57:22 alexsmirnov Exp $
+ */
+
+package org.ajax4jsf.xml.serializer;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.Writer;
+import java.util.Properties;
+
+import javax.xml.transform.Result;
+
+import org.w3c.dom.Node;
+import org.xml.sax.Attributes;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.Locator;
+import org.xml.sax.SAXException;
+import org.xml.sax.ext.LexicalHandler;
+
+/**
+ * This class accepts SAX-like calls, then sends true SAX calls to a
+ * wrapped SAX handler.  There is optimization done knowing that the ultimate
+ * output is HTML.
+ * 
+ * This class is not a public API.
+ * 
+ * @xsl.usage internal
+ */
+public final class ToHTMLSAXHandler extends ToSAXHandler
+{
+	/**
+	 *  Handle document type declaration (for first element only)
+	 */
+	private boolean m_dtdHandled = false;
+	
+    /**
+     * Keeps track of whether output escaping is currently enabled
+     */
+    protected boolean m_escapeSetting = false;
+
+    /**
+     * Returns null.
+     * @return null
+     * @see Serializer#getOutputFormat()
+     */
+    public Properties getOutputFormat()
+    {
+        return null;
+    }
+
+    /**
+     * Reurns null
+     * @return null
+     * @see Serializer#getOutputStream()
+     */
+    public OutputStream getOutputStream()
+    {
+        return null;
+    }
+
+    /**
+     * Returns null
+     * @return null
+     * @see Serializer#getWriter()
+     */
+    public Writer getWriter()
+    {
+        return null;
+    }
+
+    /**
+     * Does nothing.
+     *
+     */
+    public void indent(int n) throws SAXException
+    {
+    }
+
+    /**
+     * Does nothing.
+     * @see DOMSerializer#serialize(Node)
+     */
+    public void serialize(Node node) throws IOException
+    {
+        return;
+    }
+
+    /**
+     * Turns special character escaping on/off.
+     *
+     *
+     * @param escape true if escaping is to be set on.
+     *
+     * @see SerializationHandler#setEscaping(boolean)
+     */
+    public boolean setEscaping(boolean escape) throws SAXException
+    {
+        boolean oldEscapeSetting = m_escapeSetting;
+        m_escapeSetting = escape;
+
+        if (escape) {
+            processingInstruction(Result.PI_ENABLE_OUTPUT_ESCAPING, "");
+        } else {
+            processingInstruction(Result.PI_DISABLE_OUTPUT_ESCAPING, "");
+        }
+
+        return oldEscapeSetting;
+    }
+
+    /**
+     * Does nothing
+     * @param indent the number of spaces to indent per indentation level
+     * (ignored)
+     * @see SerializationHandler#setIndent(boolean)
+     */
+    public void setIndent(boolean indent)
+    {
+    }
+
+    /**
+     * Does nothing.
+     * @param format this parameter is not used
+     * @see Serializer#setOutputFormat(Properties)
+     */
+    public void setOutputFormat(Properties format)
+    {
+    }
+
+    /**
+     * Does nothing.
+     * @param output this parameter is ignored
+     * @see Serializer#setOutputStream(OutputStream)
+     */
+    public void setOutputStream(OutputStream output)
+    {
+    }
+
+
+    /**
+     * Does nothing.
+     * @param writer this parameter is ignored.
+     * @see Serializer#setWriter(Writer)
+     */
+    public void setWriter(Writer writer)
+    {
+    }
+
+    /**
+     * @see org.xml.sax.ext.DeclHandler#attributeDecl(String, String, String, String, String)
+     */
+    /**
+     * Does nothing.
+     *
+     * @param eName this parameter is ignored
+     * @param aName this parameter is ignored
+     * @param type this parameter is ignored
+     * @param valueDefault this parameter is ignored
+     * @param value this parameter is ignored
+     * @see org.xml.sax.ext.DeclHandler#attributeDecl(String, String, String,String,String)
+     */    
+    public void attributeDecl(
+        String eName,
+        String aName,
+        String type,
+        String valueDefault,
+        String value)
+        throws SAXException
+    {
+    }
+
+
+    /**
+     * Does nothing.
+     * @see org.xml.sax.ext.DeclHandler#elementDecl(String, String)
+     */    
+    public void elementDecl(String name, String model) throws SAXException
+    {
+        return;
+    }
+
+    /**
+     * @see org.xml.sax.ext.DeclHandler#externalEntityDecl(String, String, String)
+     */
+    public void externalEntityDecl(String arg0, String arg1, String arg2)
+        throws SAXException
+    {
+    }
+
+    /**
+     * Does nothing.
+     *
+     * @see org.xml.sax.DTDHandler#unparsedEntityDecl
+     */
+    public void internalEntityDecl(String name, String value)
+        throws SAXException
+    {
+    }
+
+    /**
+     * Receive notification of the end of an element.
+     *
+     * <p>The SAX parser will invoke this method at the end of every
+     * element in the XML document; there will be a corresponding
+     * startElement() event for every endElement() event (even when the
+     * element is empty).</p>
+     *
+     * <p>If the element name has a namespace prefix, the prefix will
+     * still be attached to the name.</p>
+     *
+     *
+     * @param uri The Namespace URI, or the empty string if the
+     *        element has no Namespace URI or if Namespace
+     *        processing is not being performed.
+     * @param localName The local name (without prefix), or the
+     *        empty string if Namespace processing is not being
+     *        performed.
+     * @param qName The qualified name (with prefix), or the
+     *        empty string if qualified names are not available.
+     * @throws org.xml.sax.SAXException Any SAX exception, possibly
+     *            wrapping another exception.
+     * @see org.xml.sax.ContentHandler#endElement(String, String, String)
+     */
+    public void endElement(String uri, String localName, String qName)
+        throws SAXException
+    {
+        flushPending();
+        m_saxHandler.endElement(uri, localName, qName);
+        
+        // time to fire off endElement event
+        if (m_tracer != null)
+            super.fireEndElem(qName);
+    }
+
+    /**
+     * Does nothing.
+     */
+    public void endPrefixMapping(String prefix) throws SAXException
+    {
+    }
+
+    /**
+     * Does nothing.
+     * @see org.xml.sax.ContentHandler#ignorableWhitespace(char[], int, int)
+     */
+    public void ignorableWhitespace(char[] ch, int start, int length)
+        throws SAXException
+    {
+    }
+    
+    /**
+     * Receive notification of a processing instruction.
+     *
+     * <p>The Parser will invoke this method once for each processing
+     * instruction found: note that processing instructions may occur
+     * before or after the main document element.</p>
+     *
+     * <p>A SAX parser should never report an XML declaration (XML 1.0,
+     * section 2.8) or a text declaration (XML 1.0, section 4.3.1)
+     * using this method.</p>
+     *
+     * @param target The processing instruction target.
+     * @param data The processing instruction data, or null if
+     *        none was supplied.
+     * @throws org.xml.sax.SAXException Any SAX exception, possibly
+     *            wrapping another exception.
+     *
+     * @throws org.xml.sax.SAXException
+     * @see org.xml.sax.ContentHandler#processingInstruction(String, String)
+     */
+    public void processingInstruction(String target, String data)
+        throws SAXException
+    {
+        flushPending();
+        m_saxHandler.processingInstruction(target,data);
+
+		// time to fire off processing instruction event
+		
+        if (m_tracer != null)		
+		    super.fireEscapingEvent(target,data);        
+    }
+
+    /**
+     * Does nothing.  
+     * @see org.xml.sax.ContentHandler#setDocumentLocator(Locator)
+     */
+    public void setDocumentLocator(Locator arg0)
+    {
+        // do nothing
+    }
+
+    /**
+     * Does nothing.
+     * @see org.xml.sax.ContentHandler#skippedEntity(String)
+     */
+    public void skippedEntity(String arg0) throws SAXException
+    {
+    }
+
+    /**
+     * Receive notification of the beginning of an element, although this is a
+     * SAX method additional namespace or attribute information can occur before
+     * or after this call, that is associated with this element.
+     *
+     *
+     * @param namespaceURI The Namespace URI, or the empty string if the
+     *        element has no Namespace URI or if Namespace
+     *        processing is not being performed.
+     * @param localName The local name (without prefix), or the
+     *        empty string if Namespace processing is not being
+     *        performed.
+     * @param qName The elements name.
+     * @param atts The attributes attached to the element, if any.
+     * @throws org.xml.sax.SAXException Any SAX exception, possibly
+     *            wrapping another exception.
+     * @see org.xml.sax.ContentHandler#startElement
+     * @see org.xml.sax.ContentHandler#endElement
+     * @see org.xml.sax.AttributeList
+     *
+     * @throws org.xml.sax.SAXException
+     *
+     * @see org.xml.sax.ContentHandler#startElement(String, String, String, Attributes)
+     */
+    public void startElement(
+        String namespaceURI,
+        String localName,
+        String qName,
+        Attributes atts)
+        throws SAXException
+    {
+        flushPending();
+        super.startElement(namespaceURI, localName, qName, atts);
+        m_saxHandler.startElement(namespaceURI, localName, qName, atts);
+        m_elemContext.m_startTagOpen = false;
+    }
+
+    /**
+     * Receive notification of a comment anywhere in the document. This callback
+     * will be used for comments inside or outside the document element.
+     * @param ch An array holding the characters in the comment.
+     * @param start The starting position in the array.
+     * @param length The number of characters to use from the array.
+     * @throws org.xml.sax.SAXException The application may raise an exception.
+     *
+     * @see org.xml.sax.ext.LexicalHandler#comment(char[], int, int)
+     */
+    public void comment(char[] ch, int start, int length) throws SAXException
+    {
+        flushPending();
+        if (m_lexHandler != null)
+            m_lexHandler.comment(ch, start, length);
+
+        // time to fire off comment event
+        if (m_tracer != null)
+            super.fireCommentEvent(ch, start, length);
+        return;
+    }
+
+    /**
+     * Does nothing.
+     * @see org.xml.sax.ext.LexicalHandler#endCDATA()
+     */
+    public void endCDATA() throws SAXException
+    {
+        return;
+    }
+
+    /**
+     * Does nothing.
+     * @see org.xml.sax.ext.LexicalHandler#endDTD()
+     */
+    public void endDTD() throws SAXException
+    {
+    }
+
+    /**
+     * Does nothing.
+     * @see org.xml.sax.ext.LexicalHandler#startCDATA()
+     */
+    public void startCDATA() throws SAXException
+    {
+    }
+
+    /**
+     * Does nothing.
+     * @see org.xml.sax.ext.LexicalHandler#startEntity(String)
+     */
+    public void startEntity(String arg0) throws SAXException
+    {
+    }
+
+    /**
+     * Receive notification of the end of a document.
+     *
+     * <p>The SAX parser will invoke this method only once, and it will
+     * be the last method invoked during the parse.  The parser shall
+     * not invoke this method until it has either abandoned parsing
+     * (because of an unrecoverable error) or reached the end of
+     * input.</p>
+     *
+     * @throws org.xml.sax.SAXException Any SAX exception, possibly
+     *            wrapping another exception.
+     *
+     * @throws org.xml.sax.SAXException
+     *
+     *
+     */
+    public void endDocument() throws SAXException
+    {
+        flushPending();
+
+        // Close output document
+        m_saxHandler.endDocument();
+
+        if (m_tracer != null)
+            super.fireEndDoc();        
+    }
+
+    /**
+     * This method is called when all the data needed for a call to the
+     * SAX handler's startElement() method has been gathered.
+     */
+    protected void closeStartTag() throws SAXException
+    {
+
+        m_elemContext.m_startTagOpen = false;
+
+        // Now is time to send the startElement event
+        m_saxHandler.startElement(
+            EMPTYSTRING,
+            m_elemContext.m_elementName,
+            m_elemContext.m_elementName,
+            m_attributes);
+        m_attributes.clear();       
+
+    }
+
+    /**
+     * Do nothing.
+     * @see SerializationHandler#close()
+     */
+    public void close()
+    {
+        return;
+    }
+
+    /**
+     * Receive notification of character data.
+     *
+     * @param chars The string of characters to process.
+     *
+     * @throws org.xml.sax.SAXException
+     *
+     * @see ExtendedContentHandler#characters(String)
+     */
+    public void characters(final String chars) throws SAXException
+    {
+        final int length = chars.length();
+        if (length > m_charsBuff.length)
+        {
+            m_charsBuff = new char[length * 2 + 1];
+        }
+        chars.getChars(0, length, m_charsBuff, 0);        
+        this.characters(m_charsBuff, 0, length);
+    }
+
+
+    /**
+     * A constructor
+     * @param handler the wrapped SAX content handler
+     * @param encoding the encoding of the output HTML document
+     */
+    public ToHTMLSAXHandler(ContentHandler handler, String encoding)
+    {
+        super(handler,encoding);
+    }
+    /**
+     * A constructor.
+     * @param handler the wrapped SAX content handler
+     * @param lex the wrapped lexical handler
+     * @param encoding the encoding of the output HTML document
+     */
+    public ToHTMLSAXHandler(
+        ContentHandler handler,
+        LexicalHandler lex,
+        String encoding)
+    {
+        super(handler,lex,encoding);
+    }
+
+    /**
+     * An element starts, but attributes are not fully known yet.
+     *
+     * @param elementNamespaceURI the URI of the namespace of the element
+     * (optional)
+     * @param elementLocalName the element name, but without prefix
+     * (optional)
+     * @param elementName the element name, with prefix, if any (required)
+     *
+     * @see ExtendedContentHandler#startElement(String)
+     */
+    public void startElement(
+        String elementNamespaceURI,
+        String elementLocalName,
+        String elementName) throws SAXException
+    {
+
+        super.startElement(elementNamespaceURI, elementLocalName, elementName);
+
+        flushPending();
+
+        // Handle document type declaration (for first element only)
+        if (!m_dtdHandled)
+        {
+            String doctypeSystem = getDoctypeSystem();
+            String doctypePublic = getDoctypePublic();
+            if ((doctypeSystem != null) || (doctypePublic != null)) {
+                if (m_lexHandler != null)
+                    m_lexHandler.startDTD(
+                        elementName,
+                        doctypePublic,
+                        doctypeSystem);
+            }
+			m_dtdHandled = true;
+        }
+        m_elemContext = m_elemContext.push(elementNamespaceURI, elementLocalName, elementName);
+    }
+    /**
+     * An element starts, but attributes are not fully known yet.
+     *
+     * @param elementName the element name, with prefix, if any
+     *
+     * @see ExtendedContentHandler#startElement(String)
+     */
+    public void startElement(String elementName) throws SAXException
+    {
+        this.startElement(null,null, elementName);
+    }
+    
+    /**
+     * Receive notification of the end of an element.
+     * @param elementName The element type name
+     * @throws org.xml.sax.SAXException Any SAX exception, possibly
+     *     wrapping another exception.
+     *
+     * @see ExtendedContentHandler#endElement(String)
+     */
+    public void endElement(String elementName) throws SAXException
+    {
+        flushPending();
+        m_saxHandler.endElement(EMPTYSTRING, elementName, elementName);
+
+        // time to fire off endElement event
+		if (m_tracer != null)
+            super.fireEndElem(elementName);        
+    }
+
+    /**
+     * Receive notification of character data.
+     *
+     * <p>The Parser will call this method to report each chunk of
+     * character data.  SAX parsers may return all contiguous character
+     * data in a single chunk, or they may split it into several
+     * chunks; however, all of the characters in any single event
+     * must come from the same external entity, so that the Locator
+     * provides useful information.</p>
+     *
+     * <p>The application must not attempt to read from the array
+     * outside of the specified range.</p>
+     *
+     * <p>Note that some parsers will report whitespace using the
+     * ignorableWhitespace() method rather than this one (validating
+     * parsers must do so).</p>
+     *
+     * @param ch The characters from the XML document.
+     * @param off The start position in the array.
+     * @param len The number of characters to read from the array.
+     * @throws org.xml.sax.SAXException Any SAX exception, possibly
+     *            wrapping another exception.
+     * @see #ignorableWhitespace
+     * @see org.xml.sax.Locator
+     *
+     * @throws org.xml.sax.SAXException
+     *
+     * @see org.xml.sax.ContentHandler#characters(char[], int, int)
+     */
+    public void characters(char[] ch, int off, int len) throws SAXException
+    {
+
+        flushPending();
+        m_saxHandler.characters(ch, off, len);
+
+        // time to fire off characters event
+		if (m_tracer != null)
+            super.fireCharEvent(ch, off, len);        
+    }
+
+    /**
+     * This method flushes any pending events, which can be startDocument()
+     * closing the opening tag of an element, or closing an open CDATA section.
+     */
+    public void flushPending() throws SAXException
+    {
+		if (m_needToCallStartDocument)
+		{
+			startDocumentInternal();
+			m_needToCallStartDocument = false;
+		}       	
+        // Close any open element
+        if (m_elemContext.m_startTagOpen)
+        {
+            closeStartTag();
+            m_elemContext.m_startTagOpen = false;
+        }
+    }
+    /**
+     * Handle a prefix/uri mapping, which is associated with a startElement()
+     * that is soon to follow. Need to close any open start tag to make
+     * sure than any name space attributes due to this event are associated wih
+     * the up comming element, not the current one.
+     * @see ExtendedContentHandler#startPrefixMapping
+     *
+     * @param prefix The Namespace prefix being declared.
+     * @param uri The Namespace URI the prefix is mapped to.
+     * @param shouldFlush true if any open tags need to be closed first, this
+     * will impact which element the mapping applies to (open parent, or its up
+     * comming child)
+     * @return returns true if the call made a change to the current
+     * namespace information, false if it did not change anything, e.g. if the
+     * prefix/namespace mapping was already in scope from before.
+     *
+     * @throws org.xml.sax.SAXException The client may throw
+     *            an exception during processing.
+     */    
+    public boolean startPrefixMapping(
+        String prefix,
+        String uri,
+        boolean shouldFlush)
+        throws SAXException
+    {
+        // no namespace support for HTML
+        if (shouldFlush) 
+            flushPending();   
+        m_saxHandler.startPrefixMapping(prefix,uri);
+        return false;
+    }
+
+    /**
+     * Begin the scope of a prefix-URI Namespace mapping
+     * just before another element is about to start.
+     * This call will close any open tags so that the prefix mapping
+     * will not apply to the current element, but the up comming child.
+     *
+     * @see org.xml.sax.ContentHandler#startPrefixMapping
+     *
+     * @param prefix The Namespace prefix being declared.
+     * @param uri The Namespace URI the prefix is mapped to.
+     *
+     * @throws org.xml.sax.SAXException The client may throw
+     *            an exception during processing.
+     *
+     */
+    public void startPrefixMapping(String prefix, String uri)
+        throws org.xml.sax.SAXException
+    {
+        startPrefixMapping(prefix,uri,true);        
+    }
+
+    /**
+     * This method is used when a prefix/uri namespace mapping
+     * is indicated after the element was started with a
+     * startElement() and before and endElement().
+     * startPrefixMapping(prefix,uri) would be used before the
+     * startElement() call.
+     * @param prefix the prefix associated with the given URI.
+     * @param uri the URI of the namespace
+     *
+     * @see ExtendedContentHandler#namespaceAfterStartElement(String, String)
+     */
+    public void namespaceAfterStartElement(
+        final String prefix,
+        final String uri)
+        throws SAXException
+    {
+        // hack for XSLTC with finding URI for default namespace
+        if (m_elemContext.m_elementURI == null)
+        {
+            String prefix1 = getPrefixPart(m_elemContext.m_elementName);
+            if (prefix1 == null && EMPTYSTRING.equals(prefix))
+            {
+                // the elements URI is not known yet, and it
+                // doesn't have a prefix, and we are currently
+                // setting the uri for prefix "", so we have
+                // the uri for the element... lets remember it
+                m_elemContext.m_elementURI = uri;
+            }
+        }       
+        startPrefixMapping(prefix,uri,false);
+    }
+    
+    /**
+     * Try's to reset the super class and reset this class for 
+     * re-use, so that you don't need to create a new serializer 
+     * (mostly for performance reasons).
+     * 
+     * @return true if the class was successfuly reset.
+     * @see Serializer#reset()
+     */
+    public boolean reset()
+    {
+        boolean wasReset = false;
+        if (super.reset())
+        {
+            resetToHTMLSAXHandler();
+            wasReset = true;
+        }
+        return wasReset;
+    }
+    
+    /**
+     * Reset all of the fields owned by ToHTMLSAXHandler class
+     *
+     */
+    private void resetToHTMLSAXHandler()
+    {
+        this.m_escapeSetting = false;
+    }  
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ToHTMLStream.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ToHTMLStream.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ToHTMLStream.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,2324 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: ToHTMLStream.java,v 1.1.2.1 2007/01/09 18:57:14 alexsmirnov Exp $
+ */
+package org.ajax4jsf.xml.serializer;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.UnsupportedEncodingException;
+import java.util.Properties;
+
+import javax.xml.transform.Result;
+
+import org.ajax4jsf.xml.serializer.utils.MsgKey;
+import org.ajax4jsf.xml.serializer.utils.Utils;
+import org.xml.sax.Attributes;
+import org.xml.sax.SAXException;
+
+/**
+ * This serializer takes a series of SAX or
+ * SAX-like events and writes its output
+ * to the given stream.
+ * 
+ * This class is not a public API, it is public
+ * because it is used from another package.
+ * 
+ * @xsl.usage internal
+ */
+public final class ToHTMLStream extends ToStream 
+{
+
+    /** This flag is set while receiving events from the DTD */
+    protected boolean m_inDTD = false;
+
+    /** True if the current element is a block element.  (seems like 
+     *  this needs to be a stack. -sb). */
+    private boolean m_inBlockElem = false;
+
+    /**
+     * Map that tells which XML characters should have special treatment, and it
+     *  provides character to entity name lookup.
+     */
+    private static final CharInfo m_htmlcharInfo =
+//        new CharInfo(CharInfo.HTML_ENTITIES_RESOURCE);
+        CharInfo.getCharInfo(CharInfo.HTML_ENTITIES_RESOURCE, Method.HTML);
+
+    /** A digital search trie for fast, case insensitive lookup of ElemDesc objects. */
+    static final Trie m_elementFlags = new Trie();
+
+    static {
+        initTagReference(m_elementFlags);
+    }
+    static void initTagReference(Trie m_elementFlags) {
+
+        // HTML 4.0 loose DTD
+        m_elementFlags.put("BASEFONT", new ElemDesc(0 | ElemDesc.EMPTY));
+        m_elementFlags.put(
+            "FRAME",
+            new ElemDesc(0 | ElemDesc.EMPTY | ElemDesc.BLOCK));
+        m_elementFlags.put("FRAMESET", new ElemDesc(0 | ElemDesc.BLOCK));
+        m_elementFlags.put("NOFRAMES", new ElemDesc(0 | ElemDesc.BLOCK));
+        m_elementFlags.put(
+            "ISINDEX",
+            new ElemDesc(0 | ElemDesc.EMPTY | ElemDesc.BLOCK));
+        m_elementFlags.put(
+            "APPLET",
+            new ElemDesc(0 | ElemDesc.WHITESPACESENSITIVE));
+        m_elementFlags.put("CENTER", new ElemDesc(0 | ElemDesc.BLOCK));
+        m_elementFlags.put("DIR", new ElemDesc(0 | ElemDesc.BLOCK));
+        m_elementFlags.put("MENU", new ElemDesc(0 | ElemDesc.BLOCK));
+
+        // HTML 4.0 strict DTD
+        m_elementFlags.put("TT", new ElemDesc(0 | ElemDesc.FONTSTYLE));
+        m_elementFlags.put("I", new ElemDesc(0 | ElemDesc.FONTSTYLE));
+        m_elementFlags.put("B", new ElemDesc(0 | ElemDesc.FONTSTYLE));
+        m_elementFlags.put("BIG", new ElemDesc(0 | ElemDesc.FONTSTYLE));
+        m_elementFlags.put("SMALL", new ElemDesc(0 | ElemDesc.FONTSTYLE));
+        m_elementFlags.put("EM", new ElemDesc(0 | ElemDesc.PHRASE));
+        m_elementFlags.put("STRONG", new ElemDesc(0 | ElemDesc.PHRASE));
+        m_elementFlags.put("DFN", new ElemDesc(0 | ElemDesc.PHRASE));
+        m_elementFlags.put("CODE", new ElemDesc(0 | ElemDesc.PHRASE));
+        m_elementFlags.put("SAMP", new ElemDesc(0 | ElemDesc.PHRASE));
+        m_elementFlags.put("KBD", new ElemDesc(0 | ElemDesc.PHRASE));
+        m_elementFlags.put("VAR", new ElemDesc(0 | ElemDesc.PHRASE));
+        m_elementFlags.put("CITE", new ElemDesc(0 | ElemDesc.PHRASE));
+        m_elementFlags.put("ABBR", new ElemDesc(0 | ElemDesc.PHRASE));
+        m_elementFlags.put("ACRONYM", new ElemDesc(0 | ElemDesc.PHRASE));
+        m_elementFlags.put(
+            "SUP",
+            new ElemDesc(0 | ElemDesc.SPECIAL | ElemDesc.ASPECIAL));
+        m_elementFlags.put(
+            "SUB",
+            new ElemDesc(0 | ElemDesc.SPECIAL | ElemDesc.ASPECIAL));
+        m_elementFlags.put(
+            "SPAN",
+            new ElemDesc(0 | ElemDesc.SPECIAL | ElemDesc.ASPECIAL));
+        m_elementFlags.put(
+            "BDO",
+            new ElemDesc(0 | ElemDesc.SPECIAL | ElemDesc.ASPECIAL));
+        m_elementFlags.put(
+            "BR",
+            new ElemDesc(
+                0
+                    | ElemDesc.SPECIAL
+                    | ElemDesc.ASPECIAL
+                    | ElemDesc.EMPTY
+                    | ElemDesc.BLOCK));
+        m_elementFlags.put("BODY", new ElemDesc(0 | ElemDesc.BLOCK));
+        m_elementFlags.put(
+            "ADDRESS",
+            new ElemDesc(
+                0
+                    | ElemDesc.BLOCK
+                    | ElemDesc.BLOCKFORM
+                    | ElemDesc.BLOCKFORMFIELDSET));
+        m_elementFlags.put(
+            "DIV",
+            new ElemDesc(
+                0
+                    | ElemDesc.BLOCK
+                    | ElemDesc.BLOCKFORM
+                    | ElemDesc.BLOCKFORMFIELDSET));
+        m_elementFlags.put("A", new ElemDesc(0 | ElemDesc.SPECIAL));
+        m_elementFlags.put(
+            "MAP",
+            new ElemDesc(
+                0 | ElemDesc.SPECIAL | ElemDesc.ASPECIAL | ElemDesc.BLOCK));
+        m_elementFlags.put(
+            "AREA",
+            new ElemDesc(0 | ElemDesc.EMPTY | ElemDesc.BLOCK));
+        m_elementFlags.put(
+            "LINK",
+            new ElemDesc(
+                0 | ElemDesc.HEADMISC | ElemDesc.EMPTY | ElemDesc.BLOCK));
+        m_elementFlags.put(
+            "IMG",
+            new ElemDesc(
+                0
+                    | ElemDesc.SPECIAL
+                    | ElemDesc.ASPECIAL
+                    | ElemDesc.EMPTY
+                    | ElemDesc.WHITESPACESENSITIVE));
+        m_elementFlags.put(
+            "OBJECT",
+            new ElemDesc(
+                0
+                    | ElemDesc.SPECIAL
+                    | ElemDesc.ASPECIAL
+                    | ElemDesc.HEADMISC
+                    | ElemDesc.WHITESPACESENSITIVE));
+        m_elementFlags.put("PARAM", new ElemDesc(0 | ElemDesc.EMPTY));
+        m_elementFlags.put(
+            "HR",
+            new ElemDesc(
+                0
+                    | ElemDesc.BLOCK
+                    | ElemDesc.BLOCKFORM
+                    | ElemDesc.BLOCKFORMFIELDSET
+                    | ElemDesc.EMPTY));
+        m_elementFlags.put(
+            "P",
+            new ElemDesc(
+                0
+                    | ElemDesc.BLOCK
+                    | ElemDesc.BLOCKFORM
+                    | ElemDesc.BLOCKFORMFIELDSET));
+        m_elementFlags.put(
+            "H1",
+            new ElemDesc(0 | ElemDesc.HEAD | ElemDesc.BLOCK));
+        m_elementFlags.put(
+            "H2",
+            new ElemDesc(0 | ElemDesc.HEAD | ElemDesc.BLOCK));
+        m_elementFlags.put(
+            "H3",
+            new ElemDesc(0 | ElemDesc.HEAD | ElemDesc.BLOCK));
+        m_elementFlags.put(
+            "H4",
+            new ElemDesc(0 | ElemDesc.HEAD | ElemDesc.BLOCK));
+        m_elementFlags.put(
+            "H5",
+            new ElemDesc(0 | ElemDesc.HEAD | ElemDesc.BLOCK));
+        m_elementFlags.put(
+            "H6",
+            new ElemDesc(0 | ElemDesc.HEAD | ElemDesc.BLOCK));
+        m_elementFlags.put(
+            "PRE",
+            new ElemDesc(0 | ElemDesc.PREFORMATTED | ElemDesc.BLOCK));
+        m_elementFlags.put(
+            "Q",
+            new ElemDesc(0 | ElemDesc.SPECIAL | ElemDesc.ASPECIAL));
+        m_elementFlags.put(
+            "BLOCKQUOTE",
+            new ElemDesc(
+                0
+                    | ElemDesc.BLOCK
+                    | ElemDesc.BLOCKFORM
+                    | ElemDesc.BLOCKFORMFIELDSET));
+        m_elementFlags.put("INS", new ElemDesc(0));
+        m_elementFlags.put("DEL", new ElemDesc(0));
+        m_elementFlags.put(
+            "DL",
+            new ElemDesc(
+                0
+                    | ElemDesc.BLOCK
+                    | ElemDesc.BLOCKFORM
+                    | ElemDesc.BLOCKFORMFIELDSET));
+        m_elementFlags.put("DT", new ElemDesc(0 | ElemDesc.BLOCK));
+        m_elementFlags.put("DD", new ElemDesc(0 | ElemDesc.BLOCK));
+        m_elementFlags.put(
+            "OL",
+            new ElemDesc(0 | ElemDesc.LIST | ElemDesc.BLOCK));
+        m_elementFlags.put(
+            "UL",
+            new ElemDesc(0 | ElemDesc.LIST | ElemDesc.BLOCK));
+        m_elementFlags.put("LI", new ElemDesc(0 | ElemDesc.BLOCK));
+        m_elementFlags.put("FORM", new ElemDesc(0 | ElemDesc.BLOCK));
+        m_elementFlags.put("LABEL", new ElemDesc(0 | ElemDesc.FORMCTRL));
+        m_elementFlags.put(
+            "INPUT",
+            new ElemDesc(
+                0 | ElemDesc.FORMCTRL | ElemDesc.INLINELABEL | ElemDesc.EMPTY));
+        m_elementFlags.put(
+            "SELECT",
+            new ElemDesc(0 | ElemDesc.FORMCTRL | ElemDesc.INLINELABEL));
+        m_elementFlags.put("OPTGROUP", new ElemDesc(0));
+        m_elementFlags.put("OPTION", new ElemDesc(0));
+        m_elementFlags.put(
+            "TEXTAREA",
+            new ElemDesc(0 | ElemDesc.FORMCTRL | ElemDesc.INLINELABEL));
+        m_elementFlags.put(
+            "FIELDSET",
+            new ElemDesc(0 | ElemDesc.BLOCK | ElemDesc.BLOCKFORM));
+        m_elementFlags.put("LEGEND", new ElemDesc(0));
+        m_elementFlags.put(
+            "BUTTON",
+            new ElemDesc(0 | ElemDesc.FORMCTRL | ElemDesc.INLINELABEL));
+        m_elementFlags.put(
+            "TABLE",
+            new ElemDesc(
+                0
+                    | ElemDesc.BLOCK
+                    | ElemDesc.BLOCKFORM
+                    | ElemDesc.BLOCKFORMFIELDSET));
+        m_elementFlags.put("CAPTION", new ElemDesc(0 | ElemDesc.BLOCK));
+        m_elementFlags.put("THEAD", new ElemDesc(0 | ElemDesc.BLOCK));
+        m_elementFlags.put("TFOOT", new ElemDesc(0 | ElemDesc.BLOCK));
+        m_elementFlags.put("TBODY", new ElemDesc(0 | ElemDesc.BLOCK));
+        m_elementFlags.put("COLGROUP", new ElemDesc(0 | ElemDesc.BLOCK));
+        m_elementFlags.put(
+            "COL",
+            new ElemDesc(0 | ElemDesc.EMPTY | ElemDesc.BLOCK));
+        m_elementFlags.put("TR", new ElemDesc(0 | ElemDesc.BLOCK));
+        m_elementFlags.put("TH", new ElemDesc(0));
+        m_elementFlags.put("TD", new ElemDesc(0));
+        m_elementFlags.put(
+            "HEAD",
+            new ElemDesc(0 | ElemDesc.BLOCK | ElemDesc.HEADELEM));
+        m_elementFlags.put("TITLE", new ElemDesc(0 | ElemDesc.BLOCK));
+        m_elementFlags.put(
+            "BASE",
+            new ElemDesc(0 | ElemDesc.EMPTY | ElemDesc.BLOCK));
+        m_elementFlags.put(
+            "META",
+            new ElemDesc(
+                0 | ElemDesc.HEADMISC | ElemDesc.EMPTY | ElemDesc.BLOCK));
+        m_elementFlags.put(
+            "STYLE",
+            new ElemDesc(
+                0 | ElemDesc.HEADMISC | ElemDesc.RAW | ElemDesc.BLOCK));
+        m_elementFlags.put(
+            "SCRIPT",
+            new ElemDesc(
+                0
+                    | ElemDesc.SPECIAL
+                    | ElemDesc.ASPECIAL
+                    | ElemDesc.HEADMISC
+                    | ElemDesc.RAW));
+        m_elementFlags.put(
+            "NOSCRIPT",
+            new ElemDesc(
+                0
+                    | ElemDesc.BLOCK
+                    | ElemDesc.BLOCKFORM
+                    | ElemDesc.BLOCKFORMFIELDSET));
+        m_elementFlags.put("HTML", new ElemDesc(0 | ElemDesc.BLOCK));
+
+        // From "John Ky" <hand at syd.speednet.com.au
+        // Transitional Document Type Definition ()
+        // file:///C:/Documents%20and%20Settings/sboag.BOAG600E/My%20Documents/html/sgml/loosedtd.html#basefont
+        m_elementFlags.put("FONT", new ElemDesc(0 | ElemDesc.FONTSTYLE));
+
+        // file:///C:/Documents%20and%20Settings/sboag.BOAG600E/My%20Documents/html/present/graphics.html#edef-STRIKE
+        m_elementFlags.put("S", new ElemDesc(0 | ElemDesc.FONTSTYLE));
+        m_elementFlags.put("STRIKE", new ElemDesc(0 | ElemDesc.FONTSTYLE));
+
+        // file:///C:/Documents%20and%20Settings/sboag.BOAG600E/My%20Documents/html/present/graphics.html#edef-U
+        m_elementFlags.put("U", new ElemDesc(0 | ElemDesc.FONTSTYLE));
+
+        // From "John Ky" <hand at syd.speednet.com.au
+        m_elementFlags.put("NOBR", new ElemDesc(0 | ElemDesc.FONTSTYLE));
+
+        // HTML 4.0, section 16.5
+        m_elementFlags.put(
+            "IFRAME",
+            new ElemDesc(
+                0
+                    | ElemDesc.BLOCK
+                    | ElemDesc.BLOCKFORM
+                    | ElemDesc.BLOCKFORMFIELDSET));
+                    
+        // Netscape 4 extension
+        m_elementFlags.put(
+            "LAYER",
+            new ElemDesc(
+                0
+                    | ElemDesc.BLOCK
+                    | ElemDesc.BLOCKFORM
+                    | ElemDesc.BLOCKFORMFIELDSET));
+        // Netscape 4 extension                    
+        m_elementFlags.put(
+            "ILAYER",
+            new ElemDesc(
+                0
+                    | ElemDesc.BLOCK
+                    | ElemDesc.BLOCKFORM
+                    | ElemDesc.BLOCKFORMFIELDSET));
+
+
+        // NOW FOR ATTRIBUTE INFORMATION . . .
+        ElemDesc elemDesc;
+
+
+        // ----------------------------------------------
+        elemDesc = (ElemDesc) m_elementFlags.get("A");
+        elemDesc.setAttr("HREF", ElemDesc.ATTRURL);
+        elemDesc.setAttr("NAME", ElemDesc.ATTRURL);
+        
+        // ----------------------------------------------
+        elemDesc = (ElemDesc) m_elementFlags.get("AREA");
+        elemDesc.setAttr("HREF", ElemDesc.ATTRURL);
+        elemDesc.setAttr("NOHREF", ElemDesc.ATTREMPTY);
+
+        // ----------------------------------------------
+        elemDesc = (ElemDesc) m_elementFlags.get("BASE");
+        elemDesc.setAttr("HREF", ElemDesc.ATTRURL);
+
+        // ----------------------------------------------
+        elemDesc = (ElemDesc) m_elementFlags.get("BUTTON");
+        elemDesc.setAttr("DISABLED", ElemDesc.ATTREMPTY);
+
+        // ----------------------------------------------
+        elemDesc = (ElemDesc) m_elementFlags.get("BLOCKQUOTE");
+        elemDesc.setAttr("CITE", ElemDesc.ATTRURL);
+
+        // ----------------------------------------------
+        elemDesc = (ElemDesc) m_elementFlags.get("DEL");
+        elemDesc.setAttr("CITE", ElemDesc.ATTRURL);
+     
+        // ----------------------------------------------
+        elemDesc = (ElemDesc) m_elementFlags.get("DIR");
+        elemDesc.setAttr("COMPACT", ElemDesc.ATTREMPTY);
+           
+        // ----------------------------------------------
+        
+        elemDesc = (ElemDesc) m_elementFlags.get("DIV");
+        elemDesc.setAttr("SRC", ElemDesc.ATTRURL); // Netscape 4 extension
+        elemDesc.setAttr("NOWRAP", ElemDesc.ATTREMPTY); // Internet-Explorer extension
+   
+        // ----------------------------------------------        
+        elemDesc = (ElemDesc) m_elementFlags.get("DL");
+        elemDesc.setAttr("COMPACT", ElemDesc.ATTREMPTY);
+           
+        // ----------------------------------------------
+        elemDesc = (ElemDesc) m_elementFlags.get("FORM");
+        elemDesc.setAttr("ACTION", ElemDesc.ATTRURL);
+
+        // ----------------------------------------------
+        // Attribution to: "Voytenko, Dimitry" <DVoytenko at SECTORBASE.COM>
+        elemDesc = (ElemDesc) m_elementFlags.get("FRAME");
+        elemDesc.setAttr("SRC", ElemDesc.ATTRURL);
+        elemDesc.setAttr("LONGDESC", ElemDesc.ATTRURL);
+        elemDesc.setAttr("NORESIZE",ElemDesc.ATTREMPTY);
+
+        // ----------------------------------------------
+        elemDesc = (ElemDesc) m_elementFlags.get("HEAD");
+        elemDesc.setAttr("PROFILE", ElemDesc.ATTRURL);
+
+        // ----------------------------------------------        
+        elemDesc = (ElemDesc) m_elementFlags.get("HR");
+        elemDesc.setAttr("NOSHADE", ElemDesc.ATTREMPTY);
+        
+        // ----------------------------------------------
+        // HTML 4.0, section 16.5
+        elemDesc = (ElemDesc) m_elementFlags.get("IFRAME");
+        elemDesc.setAttr("SRC", ElemDesc.ATTRURL);
+        elemDesc.setAttr("LONGDESC", ElemDesc.ATTRURL);
+
+        // ----------------------------------------------
+        // Netscape 4 extension
+        elemDesc = (ElemDesc) m_elementFlags.get("ILAYER");
+        elemDesc.setAttr("SRC", ElemDesc.ATTRURL);
+
+        // ----------------------------------------------
+        elemDesc = (ElemDesc) m_elementFlags.get("IMG");
+        elemDesc.setAttr("SRC", ElemDesc.ATTRURL);
+        elemDesc.setAttr("LONGDESC", ElemDesc.ATTRURL);
+        elemDesc.setAttr("USEMAP", ElemDesc.ATTRURL);
+        elemDesc.setAttr("ISMAP", ElemDesc.ATTREMPTY);
+
+        // ----------------------------------------------
+        elemDesc = (ElemDesc) m_elementFlags.get("INPUT");
+        elemDesc.setAttr("SRC", ElemDesc.ATTRURL);
+        elemDesc.setAttr("USEMAP", ElemDesc.ATTRURL);
+        elemDesc.setAttr("CHECKED", ElemDesc.ATTREMPTY);
+        elemDesc.setAttr("DISABLED", ElemDesc.ATTREMPTY);
+        elemDesc.setAttr("ISMAP", ElemDesc.ATTREMPTY);
+        elemDesc.setAttr("READONLY", ElemDesc.ATTREMPTY);
+        
+        // ----------------------------------------------
+        elemDesc = (ElemDesc) m_elementFlags.get("INS");
+        elemDesc.setAttr("CITE", ElemDesc.ATTRURL);
+
+        // ----------------------------------------------
+        // Netscape 4 extension
+        elemDesc = (ElemDesc) m_elementFlags.get("LAYER");
+        elemDesc.setAttr("SRC", ElemDesc.ATTRURL);
+
+        // ----------------------------------------------
+        elemDesc = (ElemDesc) m_elementFlags.get("LINK");
+        elemDesc.setAttr("HREF", ElemDesc.ATTRURL);
+       
+        // ----------------------------------------------       
+        elemDesc = (ElemDesc) m_elementFlags.get("MENU");
+        elemDesc.setAttr("COMPACT", ElemDesc.ATTREMPTY);
+        
+        // ----------------------------------------------
+        elemDesc = (ElemDesc) m_elementFlags.get("OBJECT");
+        elemDesc.setAttr("CLASSID", ElemDesc.ATTRURL);
+        elemDesc.setAttr("CODEBASE", ElemDesc.ATTRURL);
+        elemDesc.setAttr("DATA", ElemDesc.ATTRURL);
+        elemDesc.setAttr("ARCHIVE", ElemDesc.ATTRURL);
+        elemDesc.setAttr("USEMAP", ElemDesc.ATTRURL);
+        elemDesc.setAttr("DECLARE", ElemDesc.ATTREMPTY);
+        
+        // ----------------------------------------------        
+        elemDesc = (ElemDesc) m_elementFlags.get("OL");
+        elemDesc.setAttr("COMPACT", ElemDesc.ATTREMPTY);
+        
+        // ----------------------------------------------
+        elemDesc = (ElemDesc) m_elementFlags.get("OPTGROUP");
+        elemDesc.setAttr("DISABLED", ElemDesc.ATTREMPTY);
+
+        // ----------------------------------------------
+        elemDesc = (ElemDesc) m_elementFlags.get("OPTION");
+        elemDesc.setAttr("SELECTED", ElemDesc.ATTREMPTY);
+        elemDesc.setAttr("DISABLED", ElemDesc.ATTREMPTY);
+        
+        // ----------------------------------------------
+        elemDesc = (ElemDesc) m_elementFlags.get("Q");
+        elemDesc.setAttr("CITE", ElemDesc.ATTRURL);
+
+        // ----------------------------------------------
+        elemDesc = (ElemDesc) m_elementFlags.get("SCRIPT");
+        elemDesc.setAttr("SRC", ElemDesc.ATTRURL);
+        elemDesc.setAttr("FOR", ElemDesc.ATTRURL);
+        elemDesc.setAttr("DEFER", ElemDesc.ATTREMPTY);
+
+        // ----------------------------------------------
+        elemDesc = (ElemDesc) m_elementFlags.get("SELECT");
+        elemDesc.setAttr("DISABLED", ElemDesc.ATTREMPTY);
+        elemDesc.setAttr("MULTIPLE", ElemDesc.ATTREMPTY);
+
+        // ----------------------------------------------
+        elemDesc = (ElemDesc) m_elementFlags.get("TABLE");
+        elemDesc.setAttr("NOWRAP", ElemDesc.ATTREMPTY); // Internet-Explorer extension
+        
+        // ----------------------------------------------        
+        elemDesc = (ElemDesc) m_elementFlags.get("TD");
+        elemDesc.setAttr("NOWRAP", ElemDesc.ATTREMPTY);
+
+        // ----------------------------------------------
+        elemDesc = (ElemDesc) m_elementFlags.get("TEXTAREA");
+        elemDesc.setAttr("DISABLED", ElemDesc.ATTREMPTY);
+        elemDesc.setAttr("READONLY", ElemDesc.ATTREMPTY);
+       
+        // ----------------------------------------------                
+        elemDesc = (ElemDesc) m_elementFlags.get("TH");
+        elemDesc.setAttr("NOWRAP", ElemDesc.ATTREMPTY);
+        
+        // ----------------------------------------------
+        // The nowrap attribute of a tr element is both
+        // a Netscape and Internet-Explorer extension                
+        elemDesc = (ElemDesc) m_elementFlags.get("TR");
+        elemDesc.setAttr("NOWRAP", ElemDesc.ATTREMPTY);
+        
+        // ----------------------------------------------        
+        elemDesc = (ElemDesc) m_elementFlags.get("UL");
+        elemDesc.setAttr("COMPACT", ElemDesc.ATTREMPTY);
+    }
+
+    /**
+     * Dummy element for elements not found.
+     */
+    static private final ElemDesc m_dummy = new ElemDesc(0 | ElemDesc.BLOCK);
+
+    /** True if URLs should be specially escaped with the %xx form. */
+    private boolean m_specialEscapeURLs = true;
+
+    /** True if the META tag should be omitted. */
+    private boolean m_omitMetaTag = false;
+
+    /**
+     * Tells if the formatter should use special URL escaping.
+     *
+     * @param bool True if URLs should be specially escaped with the %xx form.
+     */
+    public void setSpecialEscapeURLs(boolean bool)
+    {
+        m_specialEscapeURLs = bool;
+    }
+
+    /**
+     * Tells if the formatter should omit the META tag.
+     *
+     * @param bool True if the META tag should be omitted.
+     */
+    public void setOmitMetaTag(boolean bool)
+    {
+        m_omitMetaTag = bool;
+    }
+
+    /**
+     * Specifies an output format for this serializer. It the
+     * serializer has already been associated with an output format,
+     * it will switch to the new format. This method should not be
+     * called while the serializer is in the process of serializing
+     * a document.
+     * 
+     * This method can be called multiple times before starting
+     * the serialization of a particular result-tree. In principle
+     * all serialization parameters can be changed, with the exception
+     * of method="html" (it must be method="html" otherwise we
+     * shouldn't even have a ToHTMLStream object here!) 
+     *
+     * @param format The output format or serialzation parameters
+     * to use.
+     */
+    public void setOutputFormat(Properties format)
+    {
+ 
+        m_specialEscapeURLs =
+            OutputPropertyUtils.getBooleanProperty(
+                OutputPropertiesFactory.S_USE_URL_ESCAPING,
+                format);
+
+        m_omitMetaTag =
+            OutputPropertyUtils.getBooleanProperty(
+                OutputPropertiesFactory.S_OMIT_META_TAG,
+                format);
+
+        super.setOutputFormat(format);
+    }
+
+    /**
+     * Tells if the formatter should use special URL escaping.
+     *
+     * @return True if URLs should be specially escaped with the %xx form.
+     */
+    private final boolean getSpecialEscapeURLs()
+    {
+        return m_specialEscapeURLs;
+    }
+
+    /**
+     * Tells if the formatter should omit the META tag.
+     *
+     * @return True if the META tag should be omitted.
+     */
+    private final boolean getOmitMetaTag()
+    {
+        return m_omitMetaTag;
+    }
+
+    /**
+     * Get a description of the given element.
+     *
+     * @param name non-null name of element, case insensitive.
+     *
+     * @return non-null reference to ElemDesc, which may be m_dummy if no 
+     *         element description matches the given name.
+     */
+    public static final ElemDesc getElemDesc(String name)
+    {
+        /* this method used to return m_dummy  when name was null
+         * but now it doesn't check and and requires non-null name.
+         */
+        Object obj = m_elementFlags.get(name);
+        if (null != obj)
+            return (ElemDesc)obj;
+        return m_dummy;
+    }
+    
+    /**
+     * A Trie that is just a copy of the "static" one.
+     * We need this one to be able to use the faster, but not thread-safe
+     * method Trie.get2(name)
+     */
+    private Trie m_htmlInfo = new Trie(m_elementFlags);
+    /**
+     * Calls to this method could be replaced with calls to
+     * getElemDesc(name), but this one should be faster.
+     */
+    private ElemDesc getElemDesc2(String name)
+    {
+        Object obj = m_htmlInfo.get2(name);
+        if (null != obj)
+            return (ElemDesc)obj;
+        return m_dummy;
+    }
+
+    /**
+     * Default constructor.
+     */
+    public ToHTMLStream()
+    {
+
+        super();
+        m_charInfo = m_htmlcharInfo;
+        // initialize namespaces
+        m_prefixMap = new NamespaceMappings();
+
+    }
+
+    /** The name of the current element. */
+//    private String m_currentElementName = null;
+
+    /**
+     * Receive notification of the beginning of a document.
+     *
+     * @throws org.xml.sax.SAXException Any SAX exception, possibly
+     *            wrapping another exception.
+     *
+     * @throws org.xml.sax.SAXException
+     */
+    protected void startDocumentInternal() throws org.xml.sax.SAXException
+    {
+        super.startDocumentInternal();
+
+        m_needToCallStartDocument = false; 
+        m_needToOutputDocTypeDecl = true;
+        m_startNewLine = false;
+        setOmitXMLDeclaration(true);
+
+        if (true == m_needToOutputDocTypeDecl)
+        {
+            String doctypeSystem = getDoctypeSystem();
+            String doctypePublic = getDoctypePublic();
+            if ((null != doctypeSystem) || (null != doctypePublic))
+            {
+                final java.io.Writer writer = m_writer;
+                try
+                {
+                writer.write("<!DOCTYPE html");
+
+                if (null != doctypePublic)
+                {
+                    writer.write(" PUBLIC \"");
+                    writer.write(doctypePublic);
+                    writer.write('"');
+                }
+
+                if (null != doctypeSystem)
+                {
+                    if (null == doctypePublic)
+                        writer.write(" SYSTEM \"");
+                    else
+                        writer.write(" \"");
+
+                    writer.write(doctypeSystem);
+                    writer.write('"');
+                }
+
+                writer.write('>');
+                outputLineSep();
+                }
+                catch(IOException e)
+                {
+                    throw new SAXException(e);
+                }
+            }
+        }
+
+        m_needToOutputDocTypeDecl = false;
+    }
+
+    /**
+     * Receive notification of the end of a document. 
+     *
+     * @throws org.xml.sax.SAXException Any SAX exception, possibly
+     *            wrapping another exception.
+     *
+     * @throws org.xml.sax.SAXException
+     */
+    public final void endDocument() throws org.xml.sax.SAXException
+    {
+        
+        flushPending();
+        if (m_doIndent && !m_isprevtext)
+        {
+            try
+            {
+            outputLineSep();
+            }
+            catch(IOException e)
+            {
+                throw new SAXException(e);
+            }
+        }
+
+        flushWriter();
+        if (m_tracer != null)
+            super.fireEndDoc();
+    }
+
+    /**
+     *  Receive notification of the beginning of an element.
+     *
+     *
+     *  @param namespaceURI
+     *  @param localName
+     *  @param name The element type name.
+     *  @param atts The attributes attached to the element, if any.
+     *  @throws org.xml.sax.SAXException Any SAX exception, possibly
+     *             wrapping another exception.
+     *  @see #endElement
+     *  @see org.xml.sax.AttributeList
+     */
+    public void startElement(
+        String namespaceURI,
+        String localName,
+        String name,
+        Attributes atts)
+        throws org.xml.sax.SAXException
+    {
+
+        ElemContext elemContext = m_elemContext;
+
+        // clean up any pending things first
+        if (elemContext.m_startTagOpen)
+        {
+            closeStartTag();
+            elemContext.m_startTagOpen = false;
+        }
+        else if (m_cdataTagOpen)
+        {
+            closeCDATA();
+            m_cdataTagOpen = false;
+        }
+        else if (m_needToCallStartDocument)
+        {
+            startDocumentInternal();
+            m_needToCallStartDocument = false;
+        }
+
+
+        // if this element has a namespace then treat it like XML
+        if (null != namespaceURI && namespaceURI.length() > 0)
+        {
+            super.startElement(namespaceURI, localName, name, atts);
+
+            return;
+        }
+        
+        try
+        {
+            // getElemDesc2(name) is faster than getElemDesc(name)
+            ElemDesc elemDesc = getElemDesc2(name);
+            int elemFlags = elemDesc.getFlags();
+
+            // deal with indentation issues first
+            if (m_doIndent)
+            {
+
+                boolean isBlockElement = (elemFlags & ElemDesc.BLOCK) != 0;
+                if (m_ispreserve)
+                    m_ispreserve = false;
+                else if (
+                    (null != elemContext.m_elementName)
+                    && (!m_inBlockElem
+                        || isBlockElement) /* && !isWhiteSpaceSensitive */
+                    )
+                {
+                    m_startNewLine = true;
+
+                    indent();
+
+                }
+                m_inBlockElem = !isBlockElement;
+            }
+
+            // save any attributes for later processing
+            if (atts != null)
+                addAttributes(atts);            
+
+            m_isprevtext = false;
+            final java.io.Writer writer = m_writer;
+            writer.write('<');
+            writer.write(name);
+
+
+
+            if (m_tracer != null)
+                firePseudoAttributes();
+            
+            if ((elemFlags & ElemDesc.EMPTY) != 0)  
+            {
+                // an optimization for elements which are expected
+                // to be empty.
+                m_elemContext = elemContext.push();
+                /* XSLTC sometimes calls namespaceAfterStartElement()
+                 * so we need to remember the name
+                 */
+                m_elemContext.m_elementName = name;
+                m_elemContext.m_elementDesc = elemDesc;
+                return;                
+            } 
+            else
+            {
+                elemContext = elemContext.push(namespaceURI,localName,name);
+                m_elemContext = elemContext;
+                elemContext.m_elementDesc = elemDesc;
+                elemContext.m_isRaw = (elemFlags & ElemDesc.RAW) != 0;
+            }
+            
+
+            if ((elemFlags & ElemDesc.HEADELEM) != 0)
+            {
+                // This is the <HEAD> element, do some special processing
+                closeStartTag();
+                elemContext.m_startTagOpen = false;
+                if (!m_omitMetaTag)
+                {
+                    if (m_doIndent)
+                        indent();
+                    writer.write(
+                        "<META http-equiv=\"Content-Type\" content=\"text/html;charset=");
+                    String encoding = getEncoding();
+                    String encode = Encodings.getMimeEncoding(encoding);
+                    writer.write(encode);
+                    writer.write("\">");
+                }
+            }
+        }
+        catch (IOException e)
+        {
+            throw new SAXException(e);
+        }
+    }
+
+    /**
+     *  Receive notification of the end of an element.
+     *
+     *
+     *  @param namespaceURI
+     *  @param localName
+     *  @param name The element type name
+     *  @throws org.xml.sax.SAXException Any SAX exception, possibly
+     *             wrapping another exception.
+     */
+    public final void endElement(
+        final String namespaceURI,
+        final String localName,
+        final String name)
+        throws org.xml.sax.SAXException
+    {
+        // deal with any pending issues
+        if (m_cdataTagOpen)
+            closeCDATA();
+
+        // if the element has a namespace, treat it like XML, not HTML
+        if (null != namespaceURI && namespaceURI.length() > 0)
+        {
+            super.endElement(namespaceURI, localName, name);
+
+            return;
+        }
+
+        try
+        {
+
+            ElemContext elemContext = m_elemContext;
+            final ElemDesc elemDesc = elemContext.m_elementDesc;
+            final int elemFlags = elemDesc.getFlags();
+            final boolean elemEmpty = (elemFlags & ElemDesc.EMPTY) != 0;
+
+            // deal with any indentation issues
+            if (m_doIndent)
+            {
+                final boolean isBlockElement = (elemFlags&ElemDesc.BLOCK) != 0;
+                boolean shouldIndent = false;
+
+                if (m_ispreserve)
+                {
+                    m_ispreserve = false;
+                }
+                else if (m_doIndent && (!m_inBlockElem || isBlockElement))
+                {
+                    m_startNewLine = true;
+                    shouldIndent = true;
+                }
+                if (!elemContext.m_startTagOpen && shouldIndent)
+                    indent(elemContext.m_currentElemDepth - 1);
+                m_inBlockElem = !isBlockElement;
+            }
+
+            final java.io.Writer writer = m_writer;
+            if (!elemContext.m_startTagOpen)
+            {
+                writer.write("</");
+                writer.write(name);
+                writer.write('>');
+            }
+            else
+            {
+                // the start-tag open when this method was called,
+                // so we need to process it now.
+                
+                if (m_tracer != null)
+                    super.fireStartElem(name);
+
+                // the starting tag was still open when we received this endElement() call
+                // so we need to process any gathered attributes NOW, before they go away.
+                int nAttrs = m_attributes.getLength();
+                if (nAttrs > 0)
+                {
+                    processAttributes(m_writer, nAttrs);
+                    // clear attributes object for re-use with next element
+                    m_attributes.clear();
+                }
+                if (!elemEmpty)
+                {
+                    // As per Dave/Paul recommendation 12/06/2000
+                    // if (shouldIndent)
+                    // writer.write('>');
+                    //  indent(m_currentIndent);
+
+                    writer.write("></");
+                    writer.write(name);
+                    writer.write('>');
+                }
+                else
+                {
+                    writer.write('>');
+                }
+            }
+            
+            // clean up because the element has ended
+            if ((elemFlags & ElemDesc.WHITESPACESENSITIVE) != 0)
+                m_ispreserve = true;
+            m_isprevtext = false;
+
+            // fire off the end element event
+            if (m_tracer != null)
+                super.fireEndElem(name);            
+                           
+            // OPTIMIZE-EMPTY                
+            if (elemEmpty)
+            {
+                // a quick exit if the HTML element had no children.
+                // This block of code can be removed if the corresponding block of code
+                // in startElement() also labeled with "OPTIMIZE-EMPTY" is also removed
+                m_elemContext = elemContext.m_prev;
+                return;
+            }
+
+            // some more clean because the element has ended. 
+            if (!elemContext.m_startTagOpen)
+            {
+                if (m_doIndent && !m_preserves.isEmpty())
+                    m_preserves.pop();
+            }
+            m_elemContext = elemContext.m_prev;
+//            m_isRawStack.pop();
+        }
+        catch (IOException e)
+        {
+            throw new SAXException(e);
+        }
+    }
+
+    /**
+     * Process an attribute.
+     * @param   writer The writer to write the processed output to.
+     * @param   name   The name of the attribute.
+     * @param   value   The value of the attribute.
+     * @param   elemDesc The description of the HTML element 
+     *           that has this attribute.
+     *
+     * @throws org.xml.sax.SAXException
+     */
+    protected void processAttribute(
+        java.io.Writer writer,
+        String name,
+        String value,
+        ElemDesc elemDesc)
+        throws IOException
+    {
+        writer.write(' ');
+
+        if (   ((value.length() == 0) || value.equalsIgnoreCase(name))
+            && elemDesc != null 
+            && elemDesc.isAttrFlagSet(name, ElemDesc.ATTREMPTY))
+        {
+            writer.write(name);
+        }
+        else
+        {
+            // %REVIEW% %OPT%
+            // Two calls to single-char write may NOT
+            // be more efficient than one to string-write...
+            writer.write(name);
+            writer.write("=\"");
+            if (   elemDesc != null
+                && elemDesc.isAttrFlagSet(name, ElemDesc.ATTRURL))
+                writeAttrURI(writer, value, m_specialEscapeURLs);
+            else
+                writeAttrString(writer, value, this.getEncoding());
+            writer.write('"');
+
+        }
+    }
+
+    /**
+     * Tell if a character is an ASCII digit.
+     */
+    private boolean isASCIIDigit(char c)
+    {
+        return (c >= '0' && c <= '9');
+    }
+
+    /**
+     * Make an integer into an HH hex value.
+     * Does no checking on the size of the input, since this 
+     * is only meant to be used locally by writeAttrURI.
+     * 
+     * @param i must be a value less than 255.
+     * 
+     * @return should be a two character string.
+     */
+    private static String makeHHString(int i)
+    {
+        String s = Integer.toHexString(i).toUpperCase();
+        if (s.length() == 1)
+        {
+            s = "0" + s;
+        }
+        return s;
+    }
+
+    /**
+    * Dmitri Ilyin: Makes sure if the String is HH encoded sign.
+    * @param str must be 2 characters long
+    *
+    * @return true or false
+    */
+    private boolean isHHSign(String str)
+    {
+        boolean sign = true;
+        try
+        {
+            char r = (char) Integer.parseInt(str, 16);
+        }
+        catch (NumberFormatException e)
+        {
+            sign = false;
+        }
+        return sign;
+    }
+
+    /**
+     * Write the specified <var>string</var> after substituting non ASCII characters,
+     * with <CODE>%HH</CODE>, where HH is the hex of the byte value.
+     *
+     * @param   string      String to convert to XML format.
+     * @param doURLEscaping True if we should try to encode as 
+     *                      per http://www.ietf.org/rfc/rfc2396.txt.
+     *
+     * @throws org.xml.sax.SAXException if a bad surrogate pair is detected.
+     */
+    public void writeAttrURI(
+        final java.io.Writer writer, String string, boolean doURLEscaping)
+        throws IOException
+    {
+        // http://www.ietf.org/rfc/rfc2396.txt says:
+        // A URI is always in an "escaped" form, since escaping or unescaping a
+        // completed URI might change its semantics.  Normally, the only time
+        // escape encodings can safely be made is when the URI is being created
+        // from its component parts; each component may have its own set of
+        // characters that are reserved, so only the mechanism responsible for
+        // generating or interpreting that component can determine whether or
+        // not escaping a character will change its semantics. Likewise, a URI
+        // must be separated into its components before the escaped characters
+        // within those components can be safely decoded.
+        //
+        // ...So we do our best to do limited escaping of the URL, without 
+        // causing damage.  If the URL is already properly escaped, in theory, this 
+        // function should not change the string value.
+
+        final int end = string.length();
+        if (end > m_attrBuff.length)
+        {
+           m_attrBuff = new char[end*2 + 1];               
+        }
+        string.getChars(0,end, m_attrBuff, 0); 
+        final char[] chars = m_attrBuff;
+
+        int cleanStart = 0;
+        int cleanLength = 0;
+        
+        
+        char ch = 0;
+        for (int i = 0; i < end; i++)
+        {
+            ch = chars[i];
+
+            if ((ch < 32) || (ch > 126))
+            {
+                if (cleanLength > 0)
+                {
+                    writer.write(chars, cleanStart, cleanLength);
+                    cleanLength = 0;
+                }
+                if (doURLEscaping)
+                {
+                    // Encode UTF16 to UTF8.
+                    // Reference is Unicode, A Primer, by Tony Graham.
+                    // Page 92.
+
+                    // Note that Kay doesn't escape 0x20...
+                    //  if(ch == 0x20) // Not sure about this... -sb
+                    //  {
+                    //    writer.write(ch);
+                    //  }
+                    //  else 
+                    if (ch <= 0x7F)
+                    {
+                        writer.write('%');
+                        writer.write(makeHHString(ch));
+                    }
+                    else if (ch <= 0x7FF)
+                    {
+                        // Clear low 6 bits before rotate, put high 4 bits in low byte, 
+                        // and set two high bits.
+                        int high = (ch >> 6) | 0xC0;
+                        int low = (ch & 0x3F) | 0x80;
+                        // First 6 bits, + high bit
+                        writer.write('%');
+                        writer.write(makeHHString(high));
+                        writer.write('%');
+                        writer.write(makeHHString(low));
+                    }
+                    else if (Encodings.isHighUTF16Surrogate(ch)) // high surrogate
+                    {
+                        // I'm sure this can be done in 3 instructions, but I choose 
+                        // to try and do it exactly like it is done in the book, at least 
+                        // until we are sure this is totally clean.  I don't think performance 
+                        // is a big issue with this particular function, though I could be 
+                        // wrong.  Also, the stuff below clearly does more masking than 
+                        // it needs to do.
+
+                        // Clear high 6 bits.
+                        int highSurrogate = ((int) ch) & 0x03FF;
+
+                        // Middle 4 bits (wwww) + 1
+                        // "Note that the value of wwww from the high surrogate bit pattern
+                        // is incremented to make the uuuuu bit pattern in the scalar value 
+                        // so the surrogate pair don't address the BMP."
+                        int wwww = ((highSurrogate & 0x03C0) >> 6);
+                        int uuuuu = wwww + 1;
+
+                        // next 4 bits
+                        int zzzz = (highSurrogate & 0x003C) >> 2;
+
+                        // low 2 bits
+                        int yyyyyy = ((highSurrogate & 0x0003) << 4) & 0x30;
+
+                        // Get low surrogate character.
+                        ch = chars[++i];
+
+                        // Clear high 6 bits.
+                        int lowSurrogate = ((int) ch) & 0x03FF;
+
+                        // put the middle 4 bits into the bottom of yyyyyy (byte 3)
+                        yyyyyy = yyyyyy | ((lowSurrogate & 0x03C0) >> 6);
+
+                        // bottom 6 bits.
+                        int xxxxxx = (lowSurrogate & 0x003F);
+
+                        int byte1 = 0xF0 | (uuuuu >> 2); // top 3 bits of uuuuu
+                        int byte2 =
+                            0x80 | (((uuuuu & 0x03) << 4) & 0x30) | zzzz;
+                        int byte3 = 0x80 | yyyyyy;
+                        int byte4 = 0x80 | xxxxxx;
+
+                        writer.write('%');
+                        writer.write(makeHHString(byte1));
+                        writer.write('%');
+                        writer.write(makeHHString(byte2));
+                        writer.write('%');
+                        writer.write(makeHHString(byte3));
+                        writer.write('%');
+                        writer.write(makeHHString(byte4));
+                    }
+                    else
+                    {
+                        int high = (ch >> 12) | 0xE0; // top 4 bits
+                        int middle = ((ch & 0x0FC0) >> 6) | 0x80;
+                        // middle 6 bits
+                        int low = (ch & 0x3F) | 0x80;
+                        // First 6 bits, + high bit
+                        writer.write('%');
+                        writer.write(makeHHString(high));
+                        writer.write('%');
+                        writer.write(makeHHString(middle));
+                        writer.write('%');
+                        writer.write(makeHHString(low));
+                    }
+
+                }
+                else if (escapingNotNeeded(ch))
+                {
+                    writer.write(ch);
+                }
+                else
+                {
+                    writer.write("&#");
+                    writer.write(Integer.toString(ch));
+                    writer.write(';');
+                }
+                // In this character range we have first written out any previously accumulated 
+                // "clean" characters, then processed the current more complicated character,
+                // which may have incremented "i".
+                // We now we reset the next possible clean character.
+                cleanStart = i + 1;
+            }
+            // Since http://www.ietf.org/rfc/rfc2396.txt refers to the URI grammar as
+            // not allowing quotes in the URI proper syntax, nor in the fragment 
+            // identifier, we believe that it's OK to double escape quotes.
+            else if (ch == '"')
+            {
+                // If the character is a '%' number number, try to avoid double-escaping.
+                // There is a question if this is legal behavior.
+
+                // Dmitri Ilyin: to check if '%' number number is invalid. It must be checked if %xx is a sign, that would be encoded
+                // The encoded signes are in Hex form. So %xx my be in form %3C that is "<" sign. I will try to change here a little.
+
+                //        if( ((i+2) < len) && isASCIIDigit(stringArray[i+1]) && isASCIIDigit(stringArray[i+2]) )
+
+                // We are no longer escaping '%'
+
+                if (cleanLength > 0)
+                {
+                    writer.write(chars, cleanStart, cleanLength);
+                    cleanLength = 0;
+                }   
+                
+                
+                // Mike Kay encodes this as &#34;, so he may know something I don't?
+                if (doURLEscaping)
+                    writer.write("%22");
+                else
+                    writer.write("&quot;"); // we have to escape this, I guess.
+
+                // We have written out any clean characters, then the escaped '%' and now we
+                // We now we reset the next possible clean character.
+                cleanStart = i + 1;    
+            }
+            else
+            {
+                // no processing for this character, just count how
+                // many characters in a row that we have that need no processing
+                cleanLength++;
+            }
+        }
+        
+        // are there any clean characters at the end of the array
+        // that we haven't processed yet?
+        if (cleanLength > 1)
+        {
+            // if the whole string can be written out as-is do so
+            // otherwise write out the clean chars at the end of the
+            // array
+            if (cleanStart == 0)
+                writer.write(string);
+            else
+                writer.write(chars, cleanStart, cleanLength);
+        }
+        else if (cleanLength == 1)
+        {
+            // a little optimization for 1 clean character
+            // (we could have let the previous if(...) handle them all)
+            writer.write(ch);
+        }
+    }
+
+    /**
+     * Writes the specified <var>string</var> after substituting <VAR>specials</VAR>,
+     * and UTF-16 surrogates for character references <CODE>&amp;#xnn</CODE>.
+     *
+     * @param   string      String to convert to XML format.
+     * @param   encoding    CURRENTLY NOT IMPLEMENTED.
+     *
+     * @throws org.xml.sax.SAXException
+     */
+    public void writeAttrString(
+        final java.io.Writer writer, String string, String encoding)
+        throws IOException
+    {
+        final int end = string.length();
+        if (end > m_attrBuff.length)
+        {
+            m_attrBuff = new char[end * 2 + 1];
+        }
+        string.getChars(0, end, m_attrBuff, 0);
+        final char[] chars = m_attrBuff;
+
+        
+
+        int cleanStart = 0;
+        int cleanLength = 0;
+
+        char ch = 0;
+        for (int i = 0; i < end; i++)
+        {
+            ch = chars[i];
+
+            // System.out.println("SPECIALSSIZE: "+SPECIALSSIZE);
+            // System.out.println("ch: "+(int)ch);
+            // System.out.println("m_maxCharacter: "+(int)m_maxCharacter);
+            // System.out.println("m_attrCharsMap[ch]: "+(int)m_attrCharsMap[ch]);
+            if (escapingNotNeeded(ch) && (!m_charInfo.isSpecialAttrChar(ch)))
+            {
+                cleanLength++;
+            }
+            else if ('<' == ch || '>' == ch)
+            {
+                cleanLength++; // no escaping in this case, as specified in 15.2
+            }
+            else if (
+                ('&' == ch) && ((i + 1) < end) && ('{' == chars[i + 1]))
+            {
+                cleanLength++; // no escaping in this case, as specified in 15.2
+            }
+            else
+            {
+                if (cleanLength > 0)
+                {
+                    writer.write(chars,cleanStart,cleanLength);
+                    cleanLength = 0;
+                }
+                int pos = accumDefaultEntity(writer, ch, i, chars, end, false, true);
+
+                if (i != pos)
+                {
+                    i = pos - 1;
+                }
+                else
+                {
+                    if (Encodings.isHighUTF16Surrogate(ch))
+                    {
+ 
+                            writeUTF16Surrogate(ch, chars, i, end);
+                            i++; // two input characters processed
+                                 // this increments by one and the for()
+                                 // loop itself increments by another one.
+                    }
+
+                    // The next is kind of a hack to keep from escaping in the case 
+                    // of Shift_JIS and the like.
+
+                    /*
+                    else if ((ch < m_maxCharacter) && (m_maxCharacter == 0xFFFF)
+                    && (ch != 160))
+                    {
+                    writer.write(ch);  // no escaping in this case
+                    }
+                    else
+                    */
+                    String outputStringForChar = m_charInfo.getOutputStringForChar(ch);
+                    if (null != outputStringForChar)
+                    {
+                        writer.write(outputStringForChar);
+                    }
+                    else if (escapingNotNeeded(ch))
+                    {
+                        writer.write(ch); // no escaping in this case
+                    }
+                    else
+                    {
+                        writer.write("&#");
+                        writer.write(Integer.toString(ch));
+                        writer.write(';');
+                    }
+                }
+                cleanStart = i + 1;
+            }
+        } // end of for()
+        
+        // are there any clean characters at the end of the array
+        // that we haven't processed yet?
+        if (cleanLength > 1)
+        {
+            // if the whole string can be written out as-is do so
+            // otherwise write out the clean chars at the end of the
+            // array
+            if (cleanStart == 0)
+                writer.write(string);
+            else
+                writer.write(chars, cleanStart, cleanLength);
+        }
+        else if (cleanLength == 1)
+        {
+            // a little optimization for 1 clean character
+            // (we could have let the previous if(...) handle them all)
+            writer.write(ch);
+        }
+    }
+
+
+
+    /**
+     * Receive notification of character data.
+     *
+     * <p>The Parser will call this method to report each chunk of
+     * character data.  SAX parsers may return all contiguous character
+     * data in a single chunk, or they may split it into several
+     * chunks; however, all of the characters in any single event
+     * must come from the same external entity, so that the Locator
+     * provides useful information.</p>
+     *
+     * <p>The application must not attempt to read from the array
+     * outside of the specified range.</p>
+     *
+     * <p>Note that some parsers will report whitespace using the
+     * ignorableWhitespace() method rather than this one (validating
+     * parsers must do so).</p>
+     *
+     * @param chars The characters from the XML document.
+     * @param start The start position in the array.
+     * @param length The number of characters to read from the array.
+     * @throws org.xml.sax.SAXException Any SAX exception, possibly
+     *            wrapping another exception.
+     * @see #ignorableWhitespace
+     * @see org.xml.sax.Locator
+     *
+     * @throws org.xml.sax.SAXException
+     */
+    public final void characters(char chars[], int start, int length)
+        throws org.xml.sax.SAXException
+    {
+
+        if (m_elemContext.m_isRaw)
+        {
+            try
+            {
+                if (m_elemContext.m_startTagOpen)
+                {
+                    closeStartTag();
+                    m_elemContext.m_startTagOpen = false;
+                }
+                m_ispreserve = true;
+                
+//              With m_ispreserve just set true it looks like shouldIndent()
+//              will always return false, so drop any possible indentation.
+//              if (shouldIndent())
+//                  indent();
+
+                // writer.write("<![CDATA[");
+                // writer.write(chars, start, length);
+                writeNormalizedChars(chars, start, length, false, m_lineSepUse);
+
+                // writer.write("]]>");
+                
+                // time to generate characters event
+                if (m_tracer != null)
+                    super.fireCharEvent(chars, start, length);
+                
+                return;
+            }
+            catch (IOException ioe)
+            {
+                throw new org.xml.sax.SAXException(
+                    Utils.messages.createMessage(
+                        MsgKey.ER_OIERROR,
+                        null),
+                    ioe);
+                //"IO error", ioe);
+            }
+        }
+        else
+        {
+            super.characters(chars, start, length);
+        }
+    }
+
+    /**
+     *  Receive notification of cdata.
+     *
+     *  <p>The Parser will call this method to report each chunk of
+     *  character data.  SAX parsers may return all contiguous character
+     *  data in a single chunk, or they may split it into several
+     *  chunks; however, all of the characters in any single event
+     *  must come from the same external entity, so that the Locator
+     *  provides useful information.</p>
+     *
+     *  <p>The application must not attempt to read from the array
+     *  outside of the specified range.</p>
+     *
+     *  <p>Note that some parsers will report whitespace using the
+     *  ignorableWhitespace() method rather than this one (validating
+     *  parsers must do so).</p>
+     *
+     *  @param ch The characters from the XML document.
+     *  @param start The start position in the array.
+     *  @param length The number of characters to read from the array.
+     *  @throws org.xml.sax.SAXException Any SAX exception, possibly
+     *             wrapping another exception.
+     *  @see #ignorableWhitespace
+     *  @see org.xml.sax.Locator
+     *
+     * @throws org.xml.sax.SAXException
+     */
+    public final void cdata(char ch[], int start, int length)
+        throws org.xml.sax.SAXException
+    {
+
+        if ((null != m_elemContext.m_elementName)
+            && (m_elemContext.m_elementName.equalsIgnoreCase("SCRIPT")
+                || m_elemContext.m_elementName.equalsIgnoreCase("STYLE")))
+        {
+            try
+            {
+                if (m_elemContext.m_startTagOpen)
+                {
+                    closeStartTag();
+                    m_elemContext.m_startTagOpen = false;
+                }
+
+                m_ispreserve = true;
+
+                if (shouldIndent())
+                    indent();
+
+                // writer.write(ch, start, length);
+                writeNormalizedChars(ch, start, length, true, m_lineSepUse);
+            }
+            catch (IOException ioe)
+            {
+                throw new org.xml.sax.SAXException(
+                    Utils.messages.createMessage(
+                        MsgKey.ER_OIERROR,
+                        null),
+                    ioe);
+                //"IO error", ioe);
+            }
+        }
+        else
+        {
+            super.cdata(ch, start, length);
+        }
+    }
+
+    /**
+     *  Receive notification of a processing instruction.
+     *
+     *  @param target The processing instruction target.
+     *  @param data The processing instruction data, or null if
+     *         none was supplied.
+     *  @throws org.xml.sax.SAXException Any SAX exception, possibly
+     *             wrapping another exception.
+     *
+     * @throws org.xml.sax.SAXException
+     */
+    public void processingInstruction(String target, String data)
+        throws org.xml.sax.SAXException
+    {
+
+        // Process any pending starDocument and startElement first.
+        flushPending(); 
+        
+        // Use a fairly nasty hack to tell if the next node is supposed to be 
+        // unescaped text.
+        if (target.equals(Result.PI_DISABLE_OUTPUT_ESCAPING))
+        {
+            startNonEscaping();
+        }
+        else if (target.equals(Result.PI_ENABLE_OUTPUT_ESCAPING))
+        {
+            endNonEscaping();
+        }
+        else
+        {
+            try
+            {
+            if (m_elemContext.m_startTagOpen)
+            {
+                closeStartTag();
+                m_elemContext.m_startTagOpen = false;
+            }
+            else if (m_needToCallStartDocument)
+                startDocumentInternal();
+
+            if (shouldIndent())
+                indent();
+
+            final java.io.Writer writer = m_writer;
+            //writer.write("<?" + target);
+            writer.write("<?");
+            writer.write(target);
+
+            if (data.length() > 0 && !Character.isSpaceChar(data.charAt(0)))
+                writer.write(' '); 
+
+            //writer.write(data + ">"); // different from XML
+            writer.write(data); // different from XML
+            writer.write('>'); // different from XML
+
+            // Always output a newline char if not inside of an 
+            // element. The whitespace is not significant in that
+            // case.
+            if (m_elemContext.m_currentElemDepth <= 0)
+                outputLineSep();
+
+            m_startNewLine = true;
+            }
+            catch(IOException e)
+            {
+                throw new SAXException(e);
+            }
+        }
+               
+        // now generate the PI event
+        if (m_tracer != null)
+            super.fireEscapingEvent(target, data);
+     }
+
+    /**
+     * Receive notivication of a entityReference.
+     *
+     * @param name non-null reference to entity name string.
+     *
+     * @throws org.xml.sax.SAXException
+     */
+    public final void entityReference(String name)
+        throws org.xml.sax.SAXException
+    {
+        try
+        {
+
+        final java.io.Writer writer = m_writer;
+        writer.write('&');
+        writer.write(name);
+        writer.write(';');
+        
+        } catch(IOException e)
+        {
+            throw new SAXException(e);
+        }
+    }
+    /**
+     * @see ExtendedContentHandler#endElement(String)
+     */
+    public final void endElement(String elemName) throws SAXException
+    {
+        endElement(null, null, elemName);
+    }
+
+    /**
+     * Process the attributes, which means to write out the currently
+     * collected attributes to the writer. The attributes are not
+     * cleared by this method
+     * 
+     * @param writer the writer to write processed attributes to.
+     * @param nAttrs the number of attributes in m_attributes 
+     * to be processed
+     *
+     * @throws org.xml.sax.SAXException
+     */
+    public void processAttributes(java.io.Writer writer, int nAttrs)
+        throws IOException,SAXException
+    {
+            /* 
+             * process the collected attributes
+             */
+            for (int i = 0; i < nAttrs; i++)
+            {
+                processAttribute(
+                    writer,
+                    m_attributes.getQName(i),
+                    m_attributes.getValue(i),
+                    m_elemContext.m_elementDesc);
+            }
+    }
+
+    /**
+     * For the enclosing elements starting tag write out out any attributes
+     * followed by ">"
+     *
+     *@throws org.xml.sax.SAXException
+     */
+    protected void closeStartTag() throws SAXException
+    {
+            try
+            {
+
+            // finish processing attributes, time to fire off the start element event
+            if (m_tracer != null)
+                super.fireStartElem(m_elemContext.m_elementName);  
+            
+            int nAttrs = m_attributes.getLength();   
+            if (nAttrs>0)
+            {
+                processAttributes(m_writer, nAttrs);
+                // clear attributes object for re-use with next element
+                m_attributes.clear();
+            }
+
+            m_writer.write('>');
+
+            /* whether Xalan or XSLTC, we have the prefix mappings now, so
+             * lets determine if the current element is specified in the cdata-
+             * section-elements list.
+             */
+            if (m_cdataSectionElements != null) 
+                m_elemContext.m_isCdataSection = isCdataSection();
+            if (m_doIndent)
+            {
+                m_isprevtext = false;
+                m_preserves.push(m_ispreserve);
+            }
+            
+            }
+            catch(IOException e)
+            {
+                throw new SAXException(e);
+            }
+    }
+    /**
+     * Initialize the serializer with the specified output stream and output
+     * format. Must be called before calling any of the serialize methods.
+     *
+     * @param output The output stream to use
+     * @param format The output format
+     * @throws UnsupportedEncodingException The encoding specified   in the
+     * output format is not supported
+     */
+    protected synchronized void init(OutputStream output, Properties format)
+        throws UnsupportedEncodingException
+    {
+        if (null == format)
+        {
+            format = OutputPropertiesFactory.getDefaultMethodProperties(Method.HTML);
+         }
+        super.init(output,format, false);
+    }
+    
+        /**
+         * Specifies an output stream to which the document should be
+         * serialized. This method should not be called while the
+         * serializer is in the process of serializing a document.
+         * <p>
+         * The encoding specified in the output properties is used, or
+         * if no encoding was specified, the default for the selected
+         * output method.
+         *
+         * @param output The output stream
+         */
+        public void setOutputStream(OutputStream output)
+        {
+
+            try
+            {
+                Properties format;
+                if (null == m_format)
+                    format = OutputPropertiesFactory.getDefaultMethodProperties(Method.HTML);
+                else
+                    format = m_format;
+                init(output, format, true);
+            }
+            catch (UnsupportedEncodingException uee)
+            {
+
+                // Should have been warned in init, I guess...
+            }
+        }    
+        /**
+         * This method is used when a prefix/uri namespace mapping
+         * is indicated after the element was started with a
+         * startElement() and before and endElement().
+         * startPrefixMapping(prefix,uri) would be used before the
+         * startElement() call.
+         * @param uri the URI of the namespace
+         * @param prefix the prefix associated with the given URI.
+         *
+         * @see ExtendedContentHandler#namespaceAfterStartElement(String, String)
+         */
+        public void namespaceAfterStartElement(String prefix, String uri)
+            throws SAXException
+        {
+            // hack for XSLTC with finding URI for default namespace
+            if (m_elemContext.m_elementURI == null)
+            {
+                String prefix1 = getPrefixPart(m_elemContext.m_elementName);
+                if (prefix1 == null && EMPTYSTRING.equals(prefix))
+                {
+                    // the elements URI is not known yet, and it
+                    // doesn't have a prefix, and we are currently
+                    // setting the uri for prefix "", so we have
+                    // the uri for the element... lets remember it
+                    m_elemContext.m_elementURI = uri;
+                }
+            }            
+            startPrefixMapping(prefix,uri,false);
+        }
+
+    public void startDTD(String name, String publicId, String systemId)
+        throws SAXException
+    {
+        m_inDTD = true;
+        super.startDTD(name, publicId, systemId);
+    }
+
+    /**
+     * Report the end of DTD declarations.
+     * @throws org.xml.sax.SAXException The application may raise an exception.
+     * @see #startDTD
+     */
+    public void endDTD() throws org.xml.sax.SAXException
+    {
+        m_inDTD = false;
+        /* for ToHTMLStream the DOCTYPE is entirely output in the
+         * startDocumentInternal() method, so don't do anything here
+         */
+    }
+    /**
+     * This method does nothing.
+     */
+    public void attributeDecl(
+        String eName,
+        String aName,
+        String type,
+        String valueDefault,
+        String value)
+        throws SAXException
+    {
+        // The internal DTD subset is not serialized by the ToHTMLStream serializer
+    }
+
+    /**
+     * This method does nothing.
+     */
+    public void elementDecl(String name, String model) throws SAXException
+    {
+        // The internal DTD subset is not serialized by the ToHTMLStream serializer
+    }
+    /**
+     * This method does nothing.
+     */
+    public void internalEntityDecl(String name, String value)
+        throws SAXException
+    {
+        // The internal DTD subset is not serialized by the ToHTMLStream serializer
+    }
+    /**
+     * This method does nothing.
+     */
+    public void externalEntityDecl(
+        String name,
+        String publicId,
+        String systemId)
+        throws SAXException
+    {
+        // The internal DTD subset is not serialized by the ToHTMLStream serializer
+    }
+
+    /**
+     * This method is used to add an attribute to the currently open element. 
+     * The caller has guaranted that this attribute is unique, which means that it
+     * not been seen before and will not be seen again.
+     * 
+     * @param name the qualified name of the attribute
+     * @param value the value of the attribute which can contain only
+     * ASCII printable characters characters in the range 32 to 127 inclusive.
+     * @param flags the bit values of this integer give optimization information.
+     */
+    public void addUniqueAttribute(String name, String value, int flags)
+        throws SAXException
+    {
+        try
+        {
+            final java.io.Writer writer = m_writer;
+            if ((flags & NO_BAD_CHARS) > 0 && m_htmlcharInfo.onlyQuotAmpLtGt)
+            {
+                // "flags" has indicated that the characters
+                // '>'  '<'   '&'  and '"' are not in the value and
+                // m_htmlcharInfo has recorded that there are no other
+                // entities in the range 0 to 127 so we write out the
+                // value directly
+                writer.write(' ');
+                writer.write(name);
+                writer.write("=\"");
+                writer.write(value);
+                writer.write('"');
+            }
+            else if (
+                (flags & HTML_ATTREMPTY) > 0
+                    && (value.length() == 0 || value.equalsIgnoreCase(name)))
+            {
+                writer.write(' ');
+                writer.write(name);
+            }
+            else
+            {
+                writer.write(' ');
+                writer.write(name);
+                writer.write("=\"");
+                if ((flags & HTML_ATTRURL) > 0)
+                {
+                    writeAttrURI(writer, value, m_specialEscapeURLs);
+                }
+                else
+                {
+                    writeAttrString(writer, value, this.getEncoding());
+                }
+                writer.write('"');
+            }
+        } catch (IOException e) {
+            throw new SAXException(e);
+        }
+    }
+
+    public void comment(char ch[], int start, int length)
+            throws SAXException
+    {
+        // The internal DTD subset is not serialized by the ToHTMLStream serializer
+        if (m_inDTD)
+            return;
+        super.comment(ch, start, length);
+    }
+    
+    public boolean reset()
+    {
+        boolean ret = super.reset();
+        if (!ret)
+            return false;
+        initToHTMLStream();
+        return true;        
+    }
+    
+    private void initToHTMLStream()
+    {
+//        m_elementDesc = null;
+        m_inBlockElem = false;
+        m_inDTD = false;
+//        m_isRawStack.clear();
+        m_omitMetaTag = false;
+        m_specialEscapeURLs = true;     
+    }
+    
+    static class Trie
+    {
+        /**
+         * A digital search trie for 7-bit ASCII text
+         * The API is a subset of java.util.Hashtable
+         * The key must be a 7-bit ASCII string
+         * The value may be any Java Object
+         * One can get an object stored in a trie from its key, 
+         * but the search is either case sensitive or case 
+         * insensitive to the characters in the key, and this
+         * choice of sensitivity or insensitivity is made when
+         * the Trie is created, before any objects are put in it.
+         * 
+         * This class is a copy of the one in org.apache.xml.utils. 
+         * It exists to cut the serializers dependancy on that package.
+         *  
+         * @xsl.usage internal
+         */
+
+        /** Size of the m_nextChar array.  */
+        public static final int ALPHA_SIZE = 128;
+
+        /** The root node of the tree.    */
+        final Node m_Root;
+
+        /** helper buffer to convert Strings to char arrays */
+        private char[] m_charBuffer = new char[0];
+
+        /** true if the search for an object is lower case only with the key */
+        private final boolean m_lowerCaseOnly;
+
+        /**
+         * Construct the trie that has a case insensitive search.
+         */
+        public Trie()
+        {
+            m_Root = new Node();
+            m_lowerCaseOnly = false;
+        }
+
+        /**
+         * Construct the trie given the desired case sensitivity with the key.
+         * @param lowerCaseOnly true if the search keys are to be loser case only,
+         * not case insensitive.
+         */
+        public Trie(boolean lowerCaseOnly)
+        {
+            m_Root = new Node();
+            m_lowerCaseOnly = lowerCaseOnly;
+        }
+
+        /**
+         * Put an object into the trie for lookup.
+         *
+         * @param key must be a 7-bit ASCII string
+         * @param value any java object.
+         *
+         * @return The old object that matched key, or null.
+         */
+        public Object put(String key, Object value)
+        {
+
+            final int len = key.length();
+            if (len > m_charBuffer.length)
+            {
+                // make the biggest buffer ever needed in get(String)
+                m_charBuffer = new char[len];
+            }
+
+            Node node = m_Root;
+
+            for (int i = 0; i < len; i++)
+            {
+                Node nextNode =
+                    node.m_nextChar[Character.toLowerCase(key.charAt(i))];
+
+                if (nextNode != null)
+                {
+                    node = nextNode;
+                }
+                else
+                {
+                    for (; i < len; i++)
+                    {
+                        Node newNode = new Node();
+                        if (m_lowerCaseOnly)
+                        {
+                            // put this value into the tree only with a lower case key 
+                            node.m_nextChar[Character.toLowerCase(
+                                key.charAt(i))] =
+                                newNode;
+                        }
+                        else
+                        {
+                            // put this value into the tree with a case insensitive key
+                            node.m_nextChar[Character.toUpperCase(
+                                key.charAt(i))] =
+                                newNode;
+                            node.m_nextChar[Character.toLowerCase(
+                                key.charAt(i))] =
+                                newNode;
+                        }
+                        node = newNode;
+                    }
+                    break;
+                }
+            }
+
+            Object ret = node.m_Value;
+
+            node.m_Value = value;
+
+            return ret;
+        }
+
+        /**
+         * Get an object that matches the key.
+         *
+         * @param key must be a 7-bit ASCII string
+         *
+         * @return The object that matches the key, or null.
+         */
+        public Object get(final String key)
+        {
+
+            final int len = key.length();
+
+            /* If the name is too long, we won't find it, this also keeps us
+             * from overflowing m_charBuffer
+             */
+            if (m_charBuffer.length < len)
+                return null;
+
+            Node node = m_Root;
+            switch (len) // optimize the look up based on the number of chars
+            {
+                // case 0 looks silly, but the generated bytecode runs
+                // faster for lookup of elements of length 2 with this in
+                // and a fair bit faster.  Don't know why.
+                case 0 :
+                    {
+                        return null;
+                    }
+
+                case 1 :
+                    {
+                        final char ch = key.charAt(0);
+                        if (ch < ALPHA_SIZE)
+                        {
+                            node = node.m_nextChar[ch];
+                            if (node != null)
+                                return node.m_Value;
+                        }
+                        return null;
+                    }
+                    //                comment out case 2 because the default is faster            
+                    //                case 2 :
+                    //                    {
+                    //                        final char ch0 = key.charAt(0);
+                    //                        final char ch1 = key.charAt(1);
+                    //                        if (ch0 < ALPHA_SIZE && ch1 < ALPHA_SIZE)
+                    //                        {
+                    //                            node = node.m_nextChar[ch0];
+                    //                            if (node != null)
+                    //                            {
+                    //                        
+                    //                                if (ch1 < ALPHA_SIZE) 
+                    //                                {
+                    //                                    node = node.m_nextChar[ch1];
+                    //                                    if (node != null)
+                    //                                        return node.m_Value;
+                    //                                }
+                    //                            }
+                    //                        }
+                    //                        return null;
+                    //                   }
+                default :
+                    {
+                        for (int i = 0; i < len; i++)
+                        {
+                            // A thread-safe way to loop over the characters
+                            final char ch = key.charAt(i);
+                            if (ALPHA_SIZE <= ch)
+                            {
+                                // the key is not 7-bit ASCII so we won't find it here
+                                return null;
+                            }
+
+                            node = node.m_nextChar[ch];
+                            if (node == null)
+                                return null;
+                        }
+
+                        return node.m_Value;
+                    }
+            }
+        }
+
+        /**
+         * The node representation for the trie.
+         * @xsl.usage internal
+         */
+        private class Node
+        {
+
+            /**
+             * Constructor, creates a Node[ALPHA_SIZE].
+             */
+            Node()
+            {
+                m_nextChar = new Node[ALPHA_SIZE];
+                m_Value = null;
+            }
+
+            /** The next nodes.   */
+            final Node m_nextChar[];
+
+            /** The value.   */
+            Object m_Value;
+        }
+        /**
+         * Construct the trie from another Trie.
+         * Both the existing Trie and this new one share the same table for
+         * lookup, and it is assumed that the table is fully populated and
+         * not changing anymore.
+         * 
+         * @param existingTrie the Trie that this one is a copy of.
+         */
+        public Trie(Trie existingTrie)
+        {
+            // copy some fields from the existing Trie into this one.
+            m_Root = existingTrie.m_Root;
+            m_lowerCaseOnly = existingTrie.m_lowerCaseOnly;
+
+            // get a buffer just big enough to hold the longest key in the table.
+            int max = existingTrie.getLongestKeyLength();
+            m_charBuffer = new char[max];
+        }
+
+        /**
+         * Get an object that matches the key.
+         * This method is faster than get(), but is not thread-safe.
+         *
+         * @param key must be a 7-bit ASCII string
+         *
+         * @return The object that matches the key, or null.
+         */
+        public Object get2(final String key)
+        {
+
+            final int len = key.length();
+
+            /* If the name is too long, we won't find it, this also keeps us
+             * from overflowing m_charBuffer
+             */
+            if (m_charBuffer.length < len)
+                return null;
+
+            Node node = m_Root;
+            switch (len) // optimize the look up based on the number of chars
+            {
+                // case 0 looks silly, but the generated bytecode runs
+                // faster for lookup of elements of length 2 with this in
+                // and a fair bit faster.  Don't know why.
+                case 0 :
+                    {
+                        return null;
+                    }
+
+                case 1 :
+                    {
+                        final char ch = key.charAt(0);
+                        if (ch < ALPHA_SIZE)
+                        {
+                            node = node.m_nextChar[ch];
+                            if (node != null)
+                                return node.m_Value;
+                        }
+                        return null;
+                    }
+                default :
+                    {
+                        /* Copy string into array. This is not thread-safe because
+                         * it modifies the contents of m_charBuffer. If multiple
+                         * threads were to use this Trie they all would be
+                         * using this same array (not good). So this 
+                         * method is not thread-safe, but it is faster because
+                         * converting to a char[] and looping over elements of
+                         * the array is faster than a String's charAt(i).
+                         */
+                        key.getChars(0, len, m_charBuffer, 0);
+
+                        for (int i = 0; i < len; i++)
+                        {
+                            final char ch = m_charBuffer[i];
+                            if (ALPHA_SIZE <= ch)
+                            {
+                                // the key is not 7-bit ASCII so we won't find it here
+                                return null;
+                            }
+
+                            node = node.m_nextChar[ch];
+                            if (node == null)
+                                return null;
+                        }
+
+                        return node.m_Value;
+                    }
+            }
+        }
+
+        /**
+         * Get the length of the longest key used in the table. 
+         */
+        public int getLongestKeyLength()
+        {
+            return m_charBuffer.length;
+        }
+    }
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ToSAXHandler.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ToSAXHandler.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ToSAXHandler.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,457 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: ToSAXHandler.java,v 1.1.2.1 2007/01/09 18:57:27 alexsmirnov Exp $
+ */
+package org.ajax4jsf.xml.serializer;
+
+import java.util.Vector;
+
+import org.xml.sax.Attributes;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.ErrorHandler;
+import org.xml.sax.SAXException;
+import org.xml.sax.SAXParseException;
+import org.xml.sax.ext.LexicalHandler;
+
+/**
+ * This class is used to provide a base behavior to be inherited
+ * by other To...SAXHandler serializers.
+ * 
+ * This class is not a public API.
+ * 
+ * @xsl.usage internal
+ */
+public abstract class ToSAXHandler extends SerializerBase 
+{
+    public ToSAXHandler()
+    {
+    }
+
+    public ToSAXHandler(
+        ContentHandler hdlr,
+        LexicalHandler lex,
+        String encoding)
+    {
+        setContentHandler(hdlr);
+        setLexHandler(lex);
+        setEncoding(encoding);
+    }
+    public ToSAXHandler(ContentHandler handler, String encoding)
+    {
+        setContentHandler(handler);
+        setEncoding(encoding);
+    }
+
+    /**
+     * Underlying SAX handler. Taken from XSLTC
+     */
+    protected ContentHandler m_saxHandler;
+
+    /**
+     * Underlying LexicalHandler. Taken from XSLTC
+     */
+    protected LexicalHandler m_lexHandler;
+
+    /**
+     * A startPrefixMapping() call on a ToSAXHandler will pass that call
+     * on to the wrapped ContentHandler, but should we also mirror these calls
+     * with matching attributes, if so this field is true.
+     * For example if this field is true then a call such as
+     * startPrefixMapping("prefix1","uri1") will also cause the additional
+     * internally generated attribute xmlns:prefix1="uri1" to be effectively added
+     * to the attributes passed to the wrapped ContentHandler.
+     */ 
+    private boolean m_shouldGenerateNSAttribute = true;
+    
+    /** If this is true, then the content handler wrapped by this
+     * serializer implements the TransformState interface which
+     * will give the content handler access to the state of
+     * the transform. */
+    protected TransformStateSetter m_state = null;
+
+    /**
+     * Pass callback to the SAX Handler
+     */
+    protected void startDocumentInternal() throws SAXException
+    {
+        if (m_needToCallStartDocument)  
+        {
+            super.startDocumentInternal();
+
+            m_saxHandler.startDocument();
+            m_needToCallStartDocument = false;
+        }
+    }
+    /**
+     * Do nothing.
+     * @see org.xml.sax.ext.LexicalHandler#startDTD(String, String, String)
+     */
+    public void startDTD(String arg0, String arg1, String arg2)
+        throws SAXException
+    {
+        // do nothing for now
+    }
+
+    /**
+     * Receive notification of character data.
+     *
+     * @param characters The string of characters to process.
+     *
+     * @throws org.xml.sax.SAXException
+     *
+     * @see ExtendedContentHandler#characters(String)
+     */
+    public void characters(String characters) throws SAXException
+    {
+        final int len = characters.length();
+        if (len > m_charsBuff.length)
+        {
+           m_charsBuff = new char[len*2 + 1];             
+        }
+        characters.getChars(0,len, m_charsBuff, 0);   
+        characters(m_charsBuff, 0, len);
+    }
+
+    /**
+     * Receive notification of a comment.
+     *
+     * @see ExtendedLexicalHandler#comment(String)
+     */
+    public void comment(String comment) throws SAXException
+    {
+        flushPending();
+
+        // Ignore if a lexical handler has not been set
+        if (m_lexHandler != null)
+        {
+            final int len = comment.length();
+            if (len > m_charsBuff.length)
+            {
+               m_charsBuff = new char[len*2 + 1];              
+            }
+            comment.getChars(0,len, m_charsBuff, 0);            
+            m_lexHandler.comment(m_charsBuff, 0, len);
+            // time to fire off comment event
+            if (m_tracer != null)
+                super.fireCommentEvent(m_charsBuff, 0, len);
+        }
+
+    }
+
+    /**
+     * Do nothing as this is an abstract class. All subclasses will need to
+     * define their behavior if it is different.
+     * @see org.xml.sax.ContentHandler#processingInstruction(String, String)
+     */
+    public void processingInstruction(String target, String data)
+        throws SAXException
+    {
+        // Redefined in SAXXMLOutput
+    }
+
+    protected void closeStartTag() throws SAXException
+    {
+    }
+
+    protected void closeCDATA() throws SAXException
+    {
+        // Redefined in SAXXMLOutput
+    }
+    
+    /**
+     * Receive notification of the beginning of an element, although this is a
+     * SAX method additional namespace or attribute information can occur before
+     * or after this call, that is associated with this element.
+     *
+     * @throws org.xml.sax.SAXException Any SAX exception, possibly
+     *            wrapping another exception.
+     * @see org.xml.sax.ContentHandler#startElement
+     * @see org.xml.sax.ContentHandler#endElement
+     * @see org.xml.sax.AttributeList
+     *
+     * @throws org.xml.sax.SAXException
+     *
+     * @see org.xml.sax.ContentHandler#startElement(String,String,String,Attributes)
+     */
+    public void startElement(
+        String arg0,
+        String arg1,
+        String arg2,
+        Attributes arg3)
+        throws SAXException
+    {
+        if (m_state != null) {
+            m_state.resetState(getTransformer());
+        }
+
+        // fire off the start element event
+        if (m_tracer != null)
+            super.fireStartElem(arg2);
+    }
+
+    /**
+     * Sets the LexicalHandler.
+     * @param _lexHandler The LexicalHandler to set
+     */
+    public void setLexHandler(LexicalHandler _lexHandler)
+    {
+        this.m_lexHandler = _lexHandler;
+    }
+
+    /**
+     * Sets the SAX ContentHandler.
+     * @param _saxHandler The ContentHandler to set
+     */
+    public void setContentHandler(ContentHandler _saxHandler)
+    {
+        this.m_saxHandler = _saxHandler;
+        if (m_lexHandler == null && _saxHandler instanceof LexicalHandler)
+        {
+            // we are not overwriting an existing LexicalHandler, and _saxHandler
+            // is also implements LexicalHandler, so lets use it
+            m_lexHandler = (LexicalHandler) _saxHandler;
+        }
+    }
+
+    /**
+     * Does nothing. The setting of CDATA section elements has an impact on
+     * stream serializers.
+     * @see SerializationHandler#setCdataSectionElements(java.util.Vector)
+     */
+    public void setCdataSectionElements(Vector URI_and_localNames)
+    {
+        // do nothing
+    }
+    
+    /** Set whether or not namespace declarations (e.g. 
+     * xmlns:foo) should appear as attributes of 
+     * elements
+     * @param doOutputNSAttr whether or not namespace declarations
+     * should appear as attributes
+     */
+    public void setShouldOutputNSAttr(boolean doOutputNSAttr)
+    {
+        m_shouldGenerateNSAttribute = doOutputNSAttr;
+    }
+ 
+    /** 
+     * Returns true if namespace declarations from calls such as
+     * startPrefixMapping("prefix1","uri1") should
+     * also be mirrored with self generated additional attributes of elements 
+     * that declare the namespace, for example the attribute xmlns:prefix1="uri1"
+     */
+    boolean getShouldOutputNSAttr()
+    {
+        return m_shouldGenerateNSAttribute;
+    }
+
+    /**
+     * This method flushes any pending events, which can be startDocument()
+     * closing the opening tag of an element, or closing an open CDATA section.
+     */
+    public void flushPending() throws SAXException
+    {
+    
+            if (m_needToCallStartDocument)
+            {
+                startDocumentInternal();
+                m_needToCallStartDocument = false;
+            }
+
+            if (m_elemContext.m_startTagOpen)
+            {
+                closeStartTag();
+                m_elemContext.m_startTagOpen = false;
+            }
+            
+            if (m_cdataTagOpen)
+            {
+                closeCDATA();
+                m_cdataTagOpen = false;
+            }
+
+    }
+
+    /**
+     * Pass in a reference to a TransformState object, which
+     * can be used during SAX ContentHandler events to obtain
+     * information about he state of the transformation. This
+     * method will be called  before each startDocument event.
+     *
+     * @param ts A reference to a TransformState object
+     */
+    public void setTransformState(TransformStateSetter ts) {
+        this.m_state = ts;
+    }
+    
+    /**
+     * Receives notification that an element starts, but attributes are not
+     * fully known yet.
+     *
+     * @param uri the URI of the namespace of the element (optional)
+     * @param localName the element name, but without prefix (optional)
+     * @param qName the element name, with prefix, if any (required)
+     *
+     * @see ExtendedContentHandler#startElement(String, String, String)
+     */
+    public void startElement(String uri, String localName, String qName)
+        throws SAXException {
+            
+        if (m_state != null) {
+            m_state.resetState(getTransformer());
+        }
+
+        // fire off the start element event
+        if (m_tracer != null)
+            super.fireStartElem(qName);         
+    }
+
+    /**
+     * An element starts, but attributes are not fully known yet.
+     *
+     * @param qName the element name, with prefix (if any).
+
+     * @see ExtendedContentHandler#startElement(String)
+     */
+    public void startElement(String qName) throws SAXException {
+        if (m_state != null) {
+            m_state.resetState(getTransformer());
+        }        
+        // fire off the start element event
+        if (m_tracer != null)
+            super.fireStartElem(qName);              
+    }
+    
+    /**
+     * This method gets the node's value as a String and uses that String as if
+     * it were an input character notification.
+     * @param node the Node to serialize
+     * @throws org.xml.sax.SAXException
+     */    
+    public void characters(org.w3c.dom.Node node)
+        throws org.xml.sax.SAXException
+    {
+        // remember the current node
+        if (m_state != null)
+        {
+            m_state.setCurrentNode(node);
+        }
+        
+        // Get the node's value as a String and use that String as if
+        // it were an input character notification.
+        String data = node.getNodeValue();
+        if (data != null) {
+            this.characters(data);
+        }
+    }    
+
+    /**
+     * @see org.xml.sax.ErrorHandler#fatalError(SAXParseException)
+     */
+    public void fatalError(SAXParseException exc) throws SAXException {
+        super.fatalError(exc);
+        
+        m_needToCallStartDocument = false;
+        
+        if (m_saxHandler instanceof ErrorHandler) {
+            ((ErrorHandler)m_saxHandler).fatalError(exc);            
+        }
+    }
+
+    /**
+     * @see org.xml.sax.ErrorHandler#error(SAXParseException)
+     */
+    public void error(SAXParseException exc) throws SAXException {
+        super.error(exc);
+        
+        if (m_saxHandler instanceof ErrorHandler)
+            ((ErrorHandler)m_saxHandler).error(exc);        
+        
+    }
+
+    /**
+     * @see org.xml.sax.ErrorHandler#warning(SAXParseException)
+     */
+    public void warning(SAXParseException exc) throws SAXException {
+        super.warning(exc);
+        
+        if (m_saxHandler instanceof ErrorHandler)
+            ((ErrorHandler)m_saxHandler).warning(exc);        
+    }
+    
+       
+    /**
+     * Try's to reset the super class and reset this class for 
+     * re-use, so that you don't need to create a new serializer 
+     * (mostly for performance reasons).
+     * 
+     * @return true if the class was successfuly reset.
+     * @see Serializer#reset()
+     */
+    public boolean reset()
+    {
+        boolean wasReset = false;
+        if (super.reset())
+        {
+            resetToSAXHandler();
+            wasReset = true;
+        }
+        return wasReset;
+    }
+    
+    /**
+     * Reset all of the fields owned by ToSAXHandler class
+     *
+     */
+    private void resetToSAXHandler()
+    {
+        this.m_lexHandler = null;
+        this.m_saxHandler = null;
+        this.m_state = null;
+        this.m_shouldGenerateNSAttribute = false;
+    }  
+
+    /**
+     * Add a unique attribute
+     */
+    public void addUniqueAttribute(String qName, String value, int flags)
+        throws SAXException
+    {
+        addAttribute(qName, value); 
+    }
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ToStream.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ToStream.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ToStream.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,3354 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: ToStream.java,v 1.1.2.1 2007/01/09 18:57:20 alexsmirnov Exp $
+ */
+package org.ajax4jsf.xml.serializer;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.UnsupportedEncodingException;
+import java.io.Writer;
+import java.util.EmptyStackException;
+import java.util.Properties;
+import java.util.StringTokenizer;
+import java.util.Vector;
+
+import javax.xml.transform.ErrorListener;
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerException;
+
+import org.ajax4jsf.xml.serializer.utils.MsgKey;
+import org.ajax4jsf.xml.serializer.utils.Utils;
+import org.ajax4jsf.xml.serializer.utils.WrappedRuntimeException;
+import org.w3c.dom.Node;
+import org.xml.sax.Attributes;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.SAXException;
+
+//import com.sun.media.sound.IESecurity;
+
+/**
+ * This abstract class is a base class for other stream 
+ * serializers (xml, html, text ...) that write output to a stream.
+ * 
+ * @xsl.usage internal
+ */
+abstract public class ToStream extends SerializerBase
+{
+
+    private static final String COMMENT_BEGIN = "<!--";
+    private static final String COMMENT_END = "-->";
+
+    /** Stack to keep track of disabling output escaping. */
+    protected BoolStack m_disableOutputEscapingStates = new BoolStack();
+
+
+    /**
+     * The encoding information associated with this serializer.
+     * Although initially there is no encoding,
+     * there is a dummy EncodingInfo object that will say
+     * that every character is in the encoding. This is useful
+     * for a serializer that is in temporary output state and has
+     * no associated encoding. A serializer in final output state
+     * will have an encoding, and will worry about whether 
+     * single chars or surrogate pairs of high/low chars form
+     * characters in the output encoding. 
+     */
+    EncodingInfo m_encodingInfo = new EncodingInfo(null,null);
+    
+    /**
+     * Stack to keep track of whether or not we need to
+     * preserve whitespace.
+     * 
+     * Used to push/pop values used for the field m_ispreserve, but
+     * m_ispreserve is only relevant if m_doIndent is true.
+     * If m_doIndent is false this field has no impact.
+     * 
+     */
+    protected BoolStack m_preserves = new BoolStack();
+
+    /**
+     * State flag to tell if preservation of whitespace
+     * is important. 
+     * 
+     * Used only in shouldIndent() but only if m_doIndent is true.
+     * If m_doIndent is false this flag has no impact.
+     * 
+     */
+    protected boolean m_ispreserve = false;
+
+    /**
+     * State flag that tells if the previous node processed
+     * was text, so we can tell if we should preserve whitespace.
+     * 
+     * Used in endDocument() and shouldIndent() but
+     * only if m_doIndent is true. 
+     * If m_doIndent is false this flag has no impact.
+     */
+    protected boolean m_isprevtext = false;
+
+
+    /**
+     * The system line separator for writing out line breaks.
+     * The default value is from the system property,
+     * but this value can be set through the xsl:output
+     * extension attribute xalan:line-separator.
+     */
+    protected char[] m_lineSep =
+        System.getProperty("line.separator").toCharArray();
+        
+    /**
+     * True if the the system line separator is to be used.
+     */    
+    protected boolean m_lineSepUse = true;    
+
+    /**
+     * The length of the line seperator, since the write is done
+     * one character at a time.
+     */
+    protected int m_lineSepLen = m_lineSep.length;
+
+    /**
+     * Map that tells which characters should have special treatment, and it
+     *  provides character to entity name lookup.
+     */
+    protected CharInfo m_charInfo;
+
+    /** True if we control the buffer, and we should flush the output on endDocument. */
+    boolean m_shouldFlush = true;
+
+    /**
+     * Add space before '/>' for XHTML.
+     */
+    protected boolean m_spaceBeforeClose = false;
+
+    /**
+     * Flag to signal that a newline should be added.
+     * 
+     * Used only in indent() which is called only if m_doIndent is true.
+     * If m_doIndent is false this flag has no impact.
+     */
+    boolean m_startNewLine;
+
+    /**
+     * Tells if we're in an internal document type subset.
+     */
+    protected boolean m_inDoctype = false;
+
+    /**
+       * Flag to quickly tell if the encoding is UTF8.
+       */
+    boolean m_isUTF8 = false;
+
+    /** The xsl:output properties. */
+    protected Properties m_format;
+
+    /**
+     * remembers if we are in between the startCDATA() and endCDATA() callbacks
+     */
+    protected boolean m_cdataStartCalled = false;
+    
+    /**
+     * If this flag is true DTD entity references are not left as-is,
+     * which is exiting older behavior.
+     */
+    private boolean m_expandDTDEntities = true;
+  
+
+    /**
+     * Default constructor
+     */
+    public ToStream()
+    {
+    }
+
+    /**
+     * This helper method to writes out "]]>" when closing a CDATA section.
+     *
+     * @throws org.xml.sax.SAXException
+     */
+    protected void closeCDATA() throws org.xml.sax.SAXException
+    {
+        try
+        {
+            m_writer.write(CDATA_DELIMITER_CLOSE);
+            // write out a CDATA section closing "]]>"
+            m_cdataTagOpen = false; // Remember that we have done so.
+        }
+        catch (IOException e)
+        {
+            throw new SAXException(e);
+        }
+    }
+
+    /**
+     * Serializes the DOM node. Throws an exception only if an I/O
+     * exception occured while serializing.
+     *
+     * @param node Node to serialize.
+     * @throws IOException An I/O exception occured while serializing
+     */
+    public void serialize(Node node) throws IOException
+    {
+
+        try
+        {
+            TreeWalker walker =
+                new TreeWalker(this);
+
+            walker.traverse(node);
+        }
+        catch (org.xml.sax.SAXException se)
+        {
+            throw new WrappedRuntimeException(se);
+        }
+    }
+
+    /**
+     * Taken from XSLTC 
+     */
+    private boolean m_escaping = true;
+
+    /**
+     * Flush the formatter's result stream.
+     *
+     * @throws org.xml.sax.SAXException
+     */
+    protected final void flushWriter() throws org.xml.sax.SAXException
+    {
+        final java.io.Writer writer = m_writer;
+        if (null != writer)
+        {
+            try
+            {
+                if (writer instanceof WriterToUTF8Buffered)
+                {
+                    if (m_shouldFlush)
+                         ((WriterToUTF8Buffered) writer).flush();
+                    else
+                         ((WriterToUTF8Buffered) writer).flushBuffer();
+                }
+                if (writer instanceof WriterToASCI)
+                {
+                    if (m_shouldFlush)
+                        writer.flush();
+                }
+                else
+                {
+                    // Flush always. 
+                    // Not a great thing if the writer was created 
+                    // by this class, but don't have a choice.
+                    writer.flush();
+                }
+            }
+            catch (IOException ioe)
+            {
+                throw new org.xml.sax.SAXException(ioe);
+            }
+        }
+    }
+
+    /**
+     * Get the output stream where the events will be serialized to.
+     *
+     * @return reference to the result stream, or null of only a writer was
+     * set.
+     */
+    public OutputStream getOutputStream()
+    {
+
+        if (m_writer instanceof WriterToUTF8Buffered)
+            return ((WriterToUTF8Buffered) m_writer).getOutputStream();
+        if (m_writer instanceof WriterToASCI)
+            return ((WriterToASCI) m_writer).getOutputStream();
+        else
+            return null;
+    }
+
+    // Implement DeclHandler
+
+    /**
+     *   Report an element type declaration.
+     *  
+     *   <p>The content model will consist of the string "EMPTY", the
+     *   string "ANY", or a parenthesised group, optionally followed
+     *   by an occurrence indicator.  The model will be normalized so
+     *   that all whitespace is removed,and will include the enclosing
+     *   parentheses.</p>
+     *  
+     *   @param name The element type name.
+     *   @param model The content model as a normalized string.
+     *   @exception SAXException The application may raise an exception.
+     */
+    public void elementDecl(String name, String model) throws SAXException
+    {
+        // Do not inline external DTD
+        if (m_inExternalDTD)
+            return;
+        try
+        {
+            final java.io.Writer writer = m_writer;
+            DTDprolog();
+
+            writer.write("<!ELEMENT ");
+            writer.write(name);
+            writer.write(' ');
+            writer.write(model);
+            writer.write('>');
+            writer.write(m_lineSep, 0, m_lineSepLen);
+        }
+        catch (IOException e)
+        {
+            throw new SAXException(e);
+        }
+
+    }
+
+    /**
+     * Report an internal entity declaration.
+     *
+     * <p>Only the effective (first) declaration for each entity
+     * will be reported.</p>
+     *
+     * @param name The name of the entity.  If it is a parameter
+     *        entity, the name will begin with '%'.
+     * @param value The replacement text of the entity.
+     * @exception SAXException The application may raise an exception.
+     * @see #externalEntityDecl
+     * @see org.xml.sax.DTDHandler#unparsedEntityDecl
+     */
+    public void internalEntityDecl(String name, String value)
+        throws SAXException
+    {
+        // Do not inline external DTD
+        if (m_inExternalDTD)
+            return;
+        try
+        {
+            DTDprolog();
+            outputEntityDecl(name, value);
+        }
+        catch (IOException e)
+        {
+            throw new SAXException(e);
+        }
+
+    }
+
+    /**
+     * Output the doc type declaration.
+     *
+     * @param name non-null reference to document type name.
+     * NEEDSDOC @param value
+     *
+     * @throws org.xml.sax.SAXException
+     */
+    void outputEntityDecl(String name, String value) throws IOException
+    {
+        final java.io.Writer writer = m_writer;
+        writer.write("<!ENTITY ");
+        writer.write(name);
+        writer.write(" \"");
+        writer.write(value);
+        writer.write("\">");
+        writer.write(m_lineSep, 0, m_lineSepLen);
+    }
+
+    /**
+     * Output a system-dependent line break.
+     *
+     * @throws org.xml.sax.SAXException
+     */
+    protected final void outputLineSep() throws IOException
+    {
+
+        m_writer.write(m_lineSep, 0, m_lineSepLen);
+    }
+
+    /**
+     * Specifies an output format for this serializer. It the
+     * serializer has already been associated with an output format,
+     * it will switch to the new format. This method should not be
+     * called while the serializer is in the process of serializing
+     * a document.
+     *
+     * @param format The output format to use
+     */
+    public void setOutputFormat(Properties format)
+    {
+
+        boolean shouldFlush = m_shouldFlush;
+
+        init(m_writer, format, false, false);
+
+        m_shouldFlush = shouldFlush;
+    }
+
+    /**
+     * Initialize the serializer with the specified writer and output format.
+     * Must be called before calling any of the serialize methods.
+     * This method can be called multiple times and the xsl:output properties
+     * passed in the 'format' parameter are accumulated across calls.
+     *
+     * @param writer The writer to use
+     * @param format The output format
+     * @param shouldFlush True if the writer should be flushed at EndDocument.
+     */
+    private synchronized void init(
+        Writer writer,
+        Properties format,
+        boolean defaultProperties,
+        boolean shouldFlush)
+    {
+
+        m_shouldFlush = shouldFlush;
+
+        
+        // if we are tracing events we need to trace what
+        // characters are written to the output writer.
+        if (m_tracer != null
+         && !(writer instanceof SerializerTraceWriter)  )
+            m_writer = new SerializerTraceWriter(writer, m_tracer);
+        else
+            m_writer = writer;        
+        
+
+        m_format = format;
+        //        m_cdataSectionNames =
+        //            OutputProperties.getQNameProperties(
+        //                OutputKeys.CDATA_SECTION_ELEMENTS,
+        //                format);
+        setCdataSectionElements(OutputKeys.CDATA_SECTION_ELEMENTS, format);
+
+        setIndentAmount(
+            OutputPropertyUtils.getIntProperty(
+                OutputPropertiesFactory.S_KEY_INDENT_AMOUNT,
+                format));
+        setIndent(
+            OutputPropertyUtils.getBooleanProperty(OutputKeys.INDENT, format));
+            
+        {
+            String sep = 
+                    format.getProperty(OutputPropertiesFactory.S_KEY_LINE_SEPARATOR);
+            if (sep != null) {
+                m_lineSep = sep.toCharArray();
+                m_lineSepLen = sep.length();
+            }
+        }
+
+        boolean shouldNotWriteXMLHeader =
+            OutputPropertyUtils.getBooleanProperty(
+                OutputKeys.OMIT_XML_DECLARATION,
+                format);
+        setOmitXMLDeclaration(shouldNotWriteXMLHeader);
+        setDoctypeSystem(format.getProperty(OutputKeys.DOCTYPE_SYSTEM));
+        String doctypePublic = format.getProperty(OutputKeys.DOCTYPE_PUBLIC);
+        setDoctypePublic(doctypePublic);
+
+        // if standalone was explicitly specified
+        if (format.get(OutputKeys.STANDALONE) != null)
+        {
+            String val = format.getProperty(OutputKeys.STANDALONE);
+            if (defaultProperties)
+                setStandaloneInternal(val);
+            else
+                setStandalone(val);
+        }
+
+        setMediaType(format.getProperty(OutputKeys.MEDIA_TYPE));
+
+        if (null != doctypePublic)
+        {
+            if (doctypePublic.startsWith("-//W3C//DTD XHTML"))
+                m_spaceBeforeClose = true;
+        }
+
+        /* 
+         * This code is added for XML 1.1 Version output.
+         */
+        String version = getVersion();
+        if (null == version)
+        {
+            version = format.getProperty(OutputKeys.VERSION);
+            setVersion(version);
+        }
+
+        // initCharsMap();
+        String encoding = getEncoding();
+        if (null == encoding)
+        {
+            encoding =
+                Encodings.getMimeEncoding(
+                    format.getProperty(OutputKeys.ENCODING));
+            setEncoding(encoding);
+        }
+
+        m_isUTF8 = encoding.equals(Encodings.DEFAULT_MIME_ENCODING);
+
+        // Access this only from the Hashtable level... we don't want to 
+        // get default properties.
+        String entitiesFileName =
+            (String) format.get(OutputPropertiesFactory.S_KEY_ENTITIES);
+
+        if (null != entitiesFileName)
+        {
+
+            String method = 
+                (String) format.get(OutputKeys.METHOD);
+            
+            m_charInfo = CharInfo.getCharInfo(entitiesFileName, method);
+        }
+
+    }
+
+    /**
+     * Initialize the serializer with the specified writer and output format.
+     * Must be called before calling any of the serialize methods.
+     *
+     * @param writer The writer to use
+     * @param format The output format
+     */
+    private synchronized void init(Writer writer, Properties format)
+    {
+        init(writer, format, false, false);
+    }
+    /**
+     * Initialize the serializer with the specified output stream and output
+     * format. Must be called before calling any of the serialize methods.
+     *
+     * @param output The output stream to use
+     * @param format The output format
+     * @param defaultProperties true if the properties are the default
+     * properties
+     * 
+     * @throws UnsupportedEncodingException The encoding specified   in the
+     * output format is not supported
+     */
+    protected synchronized void init(
+        OutputStream output,
+        Properties format,
+        boolean defaultProperties)
+        throws UnsupportedEncodingException
+    {
+
+        String encoding = getEncoding();
+        if (encoding == null)
+        {
+            // if not already set then get it from the properties
+            encoding =
+                Encodings.getMimeEncoding(
+                    format.getProperty(OutputKeys.ENCODING));
+            setEncoding(encoding);
+        }
+
+        if (encoding.equalsIgnoreCase("UTF-8"))
+        {
+            m_isUTF8 = true;
+            //            if (output instanceof java.io.BufferedOutputStream)
+            //            {
+            //                init(new WriterToUTF8(output), format, defaultProperties, true);
+            //            }
+            //            else if (output instanceof java.io.FileOutputStream)
+            //            {
+            //                init(new WriterToUTF8Buffered(output), format, defaultProperties, true);
+            //            }
+            //            else
+            //            {
+            //                // Not sure what to do in this case.  I'm going to be conservative 
+            //                // and not buffer.
+            //                init(new WriterToUTF8(output), format, defaultProperties, true);
+            //            }
+         
+
+                init(
+                    new WriterToUTF8Buffered(output),
+                    format,
+                    defaultProperties,
+                    true);
+
+
+        }
+        else if (
+            encoding.equals("WINDOWS-1250")
+                || encoding.equals("US-ASCII")
+                || encoding.equals("ASCII"))
+        {
+            init(new WriterToASCI(output), format, defaultProperties, true);
+        }
+        else
+        {
+            Writer osw;
+
+            try
+            {
+                osw = Encodings.getWriter(output, encoding);
+            }
+            catch (UnsupportedEncodingException uee)
+            {
+                System.out.println(
+                    "Warning: encoding \""
+                        + encoding
+                        + "\" not supported"
+                        + ", using "
+                        + Encodings.DEFAULT_MIME_ENCODING);
+
+                encoding = Encodings.DEFAULT_MIME_ENCODING;
+                setEncoding(encoding);
+                osw = Encodings.getWriter(output, encoding);
+            }
+
+            init(osw, format, defaultProperties, true);
+        }
+
+    }
+
+    /**
+     * Returns the output format for this serializer.
+     *
+     * @return The output format in use
+     */
+    public Properties getOutputFormat()
+    {
+        return m_format;
+    }
+
+    /**
+     * Specifies a writer to which the document should be serialized.
+     * This method should not be called while the serializer is in
+     * the process of serializing a document.
+     *
+     * @param writer The output writer stream
+     */
+    public void setWriter(Writer writer)
+    {        
+        // if we are tracing events we need to trace what 
+        // characters are written to the output writer.
+        if (m_tracer != null
+         && !(writer instanceof SerializerTraceWriter)  )
+            m_writer = new SerializerTraceWriter(writer, m_tracer);
+        else
+            m_writer = writer;
+    }
+    
+    /**
+     * Set if the operating systems end-of-line line separator should
+     * be used when serializing.  If set false NL character 
+     * (decimal 10) is left alone, otherwise the new-line will be replaced on
+     * output with the systems line separator. For example on UNIX this is
+     * NL, while on Windows it is two characters, CR NL, where CR is the
+     * carriage-return (decimal 13).
+     *  
+     * @param use_sytem_line_break True if an input NL is replaced with the 
+     * operating systems end-of-line separator.
+     * @return The previously set value of the serializer.
+     */
+    public boolean setLineSepUse(boolean use_sytem_line_break)
+    {
+        boolean oldValue = m_lineSepUse;
+        m_lineSepUse = use_sytem_line_break;
+        return oldValue;
+    }
+
+    /**
+     * Specifies an output stream to which the document should be
+     * serialized. This method should not be called while the
+     * serializer is in the process of serializing a document.
+     * <p>
+     * The encoding specified in the output properties is used, or
+     * if no encoding was specified, the default for the selected
+     * output method.
+     *
+     * @param output The output stream
+     */
+    public void setOutputStream(OutputStream output)
+    {
+
+        try
+        {
+            Properties format;
+            if (null == m_format)
+                format =
+                    OutputPropertiesFactory.getDefaultMethodProperties(
+                        Method.XML);
+            else
+                format = m_format;
+            init(output, format, true);
+        }
+        catch (UnsupportedEncodingException uee)
+        {
+
+            // Should have been warned in init, I guess...
+        }
+    }
+
+    /**
+     * @see SerializationHandler#setEscaping(boolean)
+     */
+    public boolean setEscaping(boolean escape)
+    {
+        final boolean temp = m_escaping;
+        m_escaping = escape;
+        return temp;
+
+    }
+
+
+    /**
+     * Might print a newline character and the indentation amount
+     * of the given depth.
+     * 
+     * @param depth the indentation depth (element nesting depth)
+     *
+     * @throws org.xml.sax.SAXException if an error occurs during writing.
+     */
+    protected void indent(int depth) throws IOException
+    {
+
+        if (m_startNewLine)
+            outputLineSep();
+        /* For m_indentAmount > 0 this extra test might be slower
+         * but Xalan's default value is 0, so this extra test
+         * will run faster in that situation.
+         */
+        if (m_indentAmount > 0)
+            printSpace(depth * m_indentAmount);
+
+    }
+    
+    /**
+     * Indent at the current element nesting depth.
+     * @throws IOException
+     */
+    protected void indent() throws IOException
+    {
+        indent(m_elemContext.m_currentElemDepth);
+    }
+    /**
+     * Prints <var>n</var> spaces.
+     * @param n         Number of spaces to print.
+     *
+     * @throws org.xml.sax.SAXException if an error occurs when writing.
+     */
+    private void printSpace(int n) throws IOException
+    {
+        final java.io.Writer writer = m_writer;
+        for (int i = 0; i < n; i++)
+        {
+            writer.write(' ');
+        }
+
+    }
+
+    /**
+     * Report an attribute type declaration.
+     *
+     * <p>Only the effective (first) declaration for an attribute will
+     * be reported.  The type will be one of the strings "CDATA",
+     * "ID", "IDREF", "IDREFS", "NMTOKEN", "NMTOKENS", "ENTITY",
+     * "ENTITIES", or "NOTATION", or a parenthesized token group with
+     * the separator "|" and all whitespace removed.</p>
+     *
+     * @param eName The name of the associated element.
+     * @param aName The name of the attribute.
+     * @param type A string representing the attribute type.
+     * @param valueDefault A string representing the attribute default
+     *        ("#IMPLIED", "#REQUIRED", or "#FIXED") or null if
+     *        none of these applies.
+     * @param value A string representing the attribute's default value,
+     *        or null if there is none.
+     * @exception SAXException The application may raise an exception.
+     */
+    public void attributeDecl(
+        String eName,
+        String aName,
+        String type,
+        String valueDefault,
+        String value)
+        throws SAXException
+    {
+        // Do not inline external DTD
+        if (m_inExternalDTD)
+            return;
+        try
+        {
+            final java.io.Writer writer = m_writer;
+            DTDprolog();
+
+            writer.write("<!ATTLIST ");
+            writer.write(eName);
+            writer.write(' ');
+
+            writer.write(aName);
+            writer.write(' ');
+            writer.write(type);
+            if (valueDefault != null)
+            {
+                writer.write(' ');
+                writer.write(valueDefault);
+            }
+
+            //writer.write(" ");
+            //writer.write(value);
+            writer.write('>');
+            writer.write(m_lineSep, 0, m_lineSepLen);
+        }
+        catch (IOException e)
+        {
+            throw new SAXException(e);
+        }
+    }
+
+    /**
+     * Get the character stream where the events will be serialized to.
+     *
+     * @return Reference to the result Writer, or null.
+     */
+    public Writer getWriter()
+    {
+        return m_writer;
+    }
+
+    /**
+     * Report a parsed external entity declaration.
+     *
+     * <p>Only the effective (first) declaration for each entity
+     * will be reported.</p>
+     *
+     * @param name The name of the entity.  If it is a parameter
+     *        entity, the name will begin with '%'.
+     * @param publicId The declared public identifier of the entity, or
+     *        null if none was declared.
+     * @param systemId The declared system identifier of the entity.
+     * @exception SAXException The application may raise an exception.
+     * @see #internalEntityDecl
+     * @see org.xml.sax.DTDHandler#unparsedEntityDecl
+     */
+    public void externalEntityDecl(
+        String name,
+        String publicId,
+        String systemId)
+        throws SAXException
+    {
+        try {
+            DTDprolog();
+            
+            m_writer.write("<!ENTITY ");            
+            m_writer.write(name);
+            if (publicId != null) {
+                m_writer.write(" PUBLIC \"");
+                m_writer.write(publicId);
+  
+            }
+            else {
+                m_writer.write(" SYSTEM \"");
+                m_writer.write(systemId);
+            }
+            m_writer.write("\" >");
+            m_writer.write(m_lineSep, 0, m_lineSepLen);
+        } catch (IOException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+
+    }
+
+    /**
+     * Tell if this character can be written without escaping.
+     */
+    protected boolean escapingNotNeeded(char ch)
+    {
+        final boolean ret;
+        if (ch < 127)
+        {
+            // This is the old/fast code here, but is this 
+            // correct for all encodings?
+            if (ch >= 0x20 || (0x0A == ch || 0x0D == ch || 0x09 == ch))
+                ret= true;
+            else
+                ret = false;
+        }
+        else {            
+            ret = m_encodingInfo.isInEncoding(ch);
+        }
+        return ret;
+    }
+
+    /**
+     * Once a surrogate has been detected, write out the pair of
+     * characters if it is in the encoding, or if there is no
+     * encoding, otherwise write out an entity reference
+     * of the value of the unicode code point of the character
+     * represented by the high/low surrogate pair.
+     * <p>
+     * An exception is thrown if there is no low surrogate in the pair,
+     * because the array ends unexpectely, or if the low char is there
+     * but its value is such that it is not a low surrogate.
+     *
+     * @param c the first (high) part of the surrogate, which
+     * must be confirmed before calling this method.
+     * @param ch Character array.
+     * @param i position Where the surrogate was detected.
+     * @param end The end index of the significant characters.
+     * @return 0 if the pair of characters was written out as-is,
+     * the unicode code point of the character represented by
+     * the surrogate pair if an entity reference with that value
+     * was written out. 
+     * 
+     * @throws IOException
+     * @throws org.xml.sax.SAXException if invalid UTF-16 surrogate detected.
+     */
+    protected int writeUTF16Surrogate(char c, char ch[], int i, int end)
+        throws IOException
+    {
+        int codePoint = 0;
+        if (i + 1 >= end)
+        {
+            throw new IOException(
+                Utils.messages.createMessage(
+                    MsgKey.ER_INVALID_UTF16_SURROGATE,
+                    new Object[] { Integer.toHexString((int) c)}));
+        }
+        
+        final char high = c;
+        final char low = ch[i+1];
+        if (!Encodings.isLowUTF16Surrogate(low)) {
+            throw new IOException(
+                Utils.messages.createMessage(
+                    MsgKey.ER_INVALID_UTF16_SURROGATE,
+                    new Object[] {
+                        Integer.toHexString((int) c)
+                            + " "
+                            + Integer.toHexString(low)}));
+        }
+
+        final java.io.Writer writer = m_writer;
+                
+        // If we make it to here we have a valid high, low surrogate pair
+        if (m_encodingInfo.isInEncoding(c,low)) {
+            // If the character formed by the surrogate pair
+            // is in the encoding, so just write it out
+            writer.write(ch,i,2);
+        }
+        else {
+            // Don't know what to do with this char, it is
+            // not in the encoding and not a high char in
+            // a surrogate pair, so write out as an entity ref
+            final String encoding = getEncoding();
+            if (encoding != null) {
+                /* The output encoding is known, 
+                 * so somthing is wrong.
+                  */
+                codePoint = Encodings.toCodePoint(high, low);
+                // not in the encoding, so write out a character reference
+                writer.write('&');
+                writer.write('#');
+                writer.write(Integer.toString(codePoint));
+                writer.write(';');
+            } else {
+                /* The output encoding is not known,
+                 * so just write it out as-is.
+                 */
+                writer.write(ch, i, 2);
+            }
+        }
+        // non-zero only if character reference was written out.
+        return codePoint;
+    }
+
+    /**
+     * Handle one of the default entities, return false if it
+     * is not a default entity.
+     *
+     * @param ch character to be escaped.
+     * @param i index into character array.
+     * @param chars non-null reference to character array.
+     * @param len length of chars.
+     * @param fromTextNode true if the characters being processed
+     * are from a text node, false if they are from an attribute value
+     * @param escLF true if the linefeed should be escaped.
+     *
+     * @return i+1 if the character was written, else i.
+     *
+     * @throws java.io.IOException
+     */
+    protected int accumDefaultEntity(
+        java.io.Writer writer,
+        char ch,
+        int i,
+        char[] chars,
+        int len,
+        boolean fromTextNode,
+        boolean escLF)
+        throws IOException
+    {
+
+        if (!escLF && CharInfo.S_LINEFEED == ch)
+        {
+            writer.write(m_lineSep, 0, m_lineSepLen);
+        }
+        else
+        {
+            // if this is text node character and a special one of those,
+            // or if this is a character from attribute value and a special one of those
+            if ((fromTextNode && m_charInfo.isSpecialTextChar(ch)) || (!fromTextNode && m_charInfo.isSpecialAttrChar(ch)))
+            {
+                String outputStringForChar = m_charInfo.getOutputStringForChar(ch);
+
+                if (null != outputStringForChar)
+                {
+                    writer.write(outputStringForChar);
+                }
+                else
+                    return i;
+            }
+            else
+                return i;
+        }
+
+        return i + 1;
+
+    }
+    /**
+     * Normalize the characters, but don't escape.
+     *
+     * @param ch The characters from the XML document.
+     * @param start The start position in the array.
+     * @param length The number of characters to read from the array.
+     * @param isCData true if a CDATA block should be built around the characters.
+     * @param useSystemLineSeparator true if the operating systems 
+     * end-of-line separator should be output rather than a new-line character.
+     *
+     * @throws IOException
+     * @throws org.xml.sax.SAXException
+     */
+    void writeNormalizedChars(
+        char ch[],
+        int start,
+        int length,
+        boolean isCData,
+        boolean useSystemLineSeparator)
+        throws IOException, org.xml.sax.SAXException
+    {
+        final java.io.Writer writer = m_writer;
+        int end = start + length;
+
+        for (int i = start; i < end; i++)
+        {
+            char c = ch[i];
+
+            if (CharInfo.S_LINEFEED == c && useSystemLineSeparator)
+            {
+                writer.write(m_lineSep, 0, m_lineSepLen);
+            }
+            else if (isCData && (!escapingNotNeeded(c)))
+            {
+                //                if (i != 0)
+                if (m_cdataTagOpen)
+                    closeCDATA();
+
+                // This needs to go into a function... 
+                if (Encodings.isHighUTF16Surrogate(c))
+                {
+                    writeUTF16Surrogate(c, ch, i, end);
+                    i++ ; // process two input characters
+                }
+                else
+                {
+                    writer.write("&#");
+
+                    String intStr = Integer.toString((int) c);
+
+                    writer.write(intStr);
+                    writer.write(';');
+                }
+
+                //                if ((i != 0) && (i < (end - 1)))
+                //                if (!m_cdataTagOpen && (i < (end - 1)))
+                //                {
+                //                    writer.write(CDATA_DELIMITER_OPEN);
+                //                    m_cdataTagOpen = true;
+                //                }
+            }
+            else if (
+                isCData
+                    && ((i < (end - 2))
+                        && (']' == c)
+                        && (']' == ch[i + 1])
+                        && ('>' == ch[i + 2])))
+            {
+                writer.write(CDATA_CONTINUE);
+
+                i += 2;
+            }
+            else
+            {
+                if (escapingNotNeeded(c))
+                {
+                    if (isCData && !m_cdataTagOpen)
+                    {
+                        writer.write(CDATA_DELIMITER_OPEN);
+                        m_cdataTagOpen = true;
+                    }
+                    writer.write(c);
+                }
+
+                // This needs to go into a function... 
+                else if (Encodings.isHighUTF16Surrogate(c))
+                {
+                    if (m_cdataTagOpen)
+                        closeCDATA();
+                    writeUTF16Surrogate(c, ch, i, end);
+                    i++; // process two input characters
+                }
+                else
+                {
+                    if (m_cdataTagOpen)
+                        closeCDATA();
+                    writer.write("&#");
+
+                    String intStr = Integer.toString((int) c);
+
+                    writer.write(intStr);
+                    writer.write(';');
+                }
+            }
+        }
+
+    }
+
+    /**
+     * Ends an un-escaping section.
+     *
+     * @see #startNonEscaping
+     *
+     * @throws org.xml.sax.SAXException
+     */
+    public void endNonEscaping() throws org.xml.sax.SAXException
+    {
+        m_disableOutputEscapingStates.pop();
+    }
+
+    /**
+     * Starts an un-escaping section. All characters printed within an un-
+     * escaping section are printed as is, without escaping special characters
+     * into entity references. Only XML and HTML serializers need to support
+     * this method.
+     * <p> The contents of the un-escaping section will be delivered through the
+     * regular <tt>characters</tt> event.
+     *
+     * @throws org.xml.sax.SAXException
+     */
+    public void startNonEscaping() throws org.xml.sax.SAXException
+    {
+        m_disableOutputEscapingStates.push(true);
+    }
+
+    /**
+     * Receive notification of cdata.
+     *
+     * <p>The Parser will call this method to report each chunk of
+     * character data.  SAX parsers may return all contiguous character
+     * data in a single chunk, or they may split it into several
+     * chunks; however, all of the characters in any single event
+     * must come from the same external entity, so that the Locator
+     * provides useful information.</p>
+     *
+     * <p>The application must not attempt to read from the array
+     * outside of the specified range.</p>
+     *
+     * <p>Note that some parsers will report whitespace using the
+     * ignorableWhitespace() method rather than this one (validating
+     * parsers must do so).</p>
+     *
+     * @param ch The characters from the XML document.
+     * @param start The start position in the array.
+     * @param length The number of characters to read from the array.
+     * @throws org.xml.sax.SAXException Any SAX exception, possibly
+     *            wrapping another exception.
+     * @see #ignorableWhitespace
+     * @see org.xml.sax.Locator
+     *
+     * @throws org.xml.sax.SAXException
+     */
+    protected void cdata(char ch[], int start, final int length)
+        throws org.xml.sax.SAXException
+    {
+
+        try
+        {
+            final int old_start = start;
+            if (m_elemContext.m_startTagOpen)
+            {
+                closeStartTag();
+                m_elemContext.m_startTagOpen = false;
+            }
+            m_ispreserve = true;
+
+            if (shouldIndent())
+                indent();
+
+            boolean writeCDataBrackets =
+                (((length >= 1) && escapingNotNeeded(ch[start])));
+
+            /* Write out the CDATA opening delimiter only if
+             * we are supposed to, and if we are not already in
+             * the middle of a CDATA section  
+             */
+            if (writeCDataBrackets && !m_cdataTagOpen)
+            {
+                m_writer.write(CDATA_DELIMITER_OPEN);
+                m_cdataTagOpen = true;
+            }
+
+            // writer.write(ch, start, length);
+            if (isEscapingDisabled())
+            {
+                charactersRaw(ch, start, length);
+            }
+            else
+                writeNormalizedChars(ch, start, length, true, m_lineSepUse);
+
+            /* used to always write out CDATA closing delimiter here,
+             * but now we delay, so that we can merge CDATA sections on output.    
+             * need to write closing delimiter later
+             */
+            if (writeCDataBrackets)
+            {
+                /* if the CDATA section ends with ] don't leave it open
+                 * as there is a chance that an adjacent CDATA sections
+                 * starts with ]>.  
+                 * We don't want to merge ]] with > , or ] with ]> 
+                 */
+                if (ch[start + length - 1] == ']')
+                    closeCDATA();
+            }
+
+            // time to fire off CDATA event
+            if (m_tracer != null)
+                super.fireCDATAEvent(ch, old_start, length);
+        }
+        catch (IOException ioe)
+        {
+            throw new org.xml.sax.SAXException(
+                Utils.messages.createMessage(
+                    MsgKey.ER_OIERROR,
+                    null),
+                ioe);
+            //"IO error", ioe);
+        }
+    }
+
+    /**
+     * Tell if the character escaping should be disabled for the current state.
+     *
+     * @return true if the character escaping should be disabled.
+     */
+    private boolean isEscapingDisabled()
+    {
+        return m_disableOutputEscapingStates.peekOrFalse();
+    }
+
+    /**
+     * If available, when the disable-output-escaping attribute is used,
+     * output raw text without escaping.
+     *
+     * @param ch The characters from the XML document.
+     * @param start The start position in the array.
+     * @param length The number of characters to read from the array.
+     *
+     * @throws org.xml.sax.SAXException
+     */
+    protected void charactersRaw(char ch[], int start, int length)
+        throws org.xml.sax.SAXException
+    {
+
+        if (m_inEntityRef)
+            return;
+        try
+        {
+            if (m_elemContext.m_startTagOpen)
+            {
+                closeStartTag();
+                m_elemContext.m_startTagOpen = false;
+            }
+
+            m_ispreserve = true;
+
+            m_writer.write(ch, start, length);
+        }
+        catch (IOException e)
+        {
+            throw new SAXException(e);
+        }
+
+    }
+
+    /**
+     * Receive notification of character data.
+     *
+     * <p>The Parser will call this method to report each chunk of
+     * character data.  SAX parsers may return all contiguous character
+     * data in a single chunk, or they may split it into several
+     * chunks; however, all of the characters in any single event
+     * must come from the same external entity, so that the Locator
+     * provides useful information.</p>
+     *
+     * <p>The application must not attempt to read from the array
+     * outside of the specified range.</p>
+     *
+     * <p>Note that some parsers will report whitespace using the
+     * ignorableWhitespace() method rather than this one (validating
+     * parsers must do so).</p>
+     *
+     * @param chars The characters from the XML document.
+     * @param start The start position in the array.
+     * @param length The number of characters to read from the array.
+     * @throws org.xml.sax.SAXException Any SAX exception, possibly
+     *            wrapping another exception.
+     * @see #ignorableWhitespace
+     * @see org.xml.sax.Locator
+     *
+     * @throws org.xml.sax.SAXException
+     */
+    public void characters(final char chars[], final int start, final int length)
+        throws org.xml.sax.SAXException
+    {
+        // It does not make sense to continue with rest of the method if the number of 
+        // characters to read from array is 0.
+        // Section 7.6.1 of XSLT 1.0 (http://www.w3.org/TR/xslt#value-of) suggest no text node
+        // is created if string is empty.	
+        if (length == 0 || (m_inEntityRef && !m_expandDTDEntities))
+            return;
+        if (m_elemContext.m_startTagOpen)
+        {
+            closeStartTag();
+            m_elemContext.m_startTagOpen = false;
+        }
+        else if (m_needToCallStartDocument)
+        {
+            startDocumentInternal();
+        }
+
+        if (m_cdataStartCalled || m_elemContext.m_isCdataSection)
+        {
+            /* either due to startCDATA() being called or due to 
+             * cdata-section-elements atribute, we need this as cdata
+             */
+            cdata(chars, start, length);
+
+            return;
+        }
+
+        if (m_cdataTagOpen)
+            closeCDATA();
+        // the check with _escaping is a bit of a hack for XLSTC
+
+        if (m_disableOutputEscapingStates.peekOrFalse() || (!m_escaping))
+        {
+            charactersRaw(chars, start, length);
+
+            // time to fire off characters generation event
+            if (m_tracer != null)
+                super.fireCharEvent(chars, start, length);
+
+            return;
+        }
+
+        if (m_elemContext.m_startTagOpen)
+        {
+            closeStartTag();
+            m_elemContext.m_startTagOpen = false;
+        }
+
+        
+        try
+        {
+            int i;
+            char ch1;
+            int startClean;
+            
+            // skip any leading whitspace 
+            // don't go off the end and use a hand inlined version
+            // of isWhitespace(ch)
+            final int end = start + length;
+            int lastDirty = start - 1; // last character that needed processing
+            for (i = start;
+                ((i < end)                
+                    && ((ch1 = chars[i]) == 0x20
+                        || (ch1 == 0xA && m_lineSepUse)
+                        || ch1 == 0xD
+                        || ch1 == 0x09));
+                i++)
+            {
+                /*
+                 * We are processing leading whitespace, but are doing the same
+                 * processing for dirty characters here as for non-whitespace.
+                 * 
+                 */
+                if (!m_charInfo.isTextASCIIClean(ch1))
+                {
+                    lastDirty = processDirty(chars,end, i,ch1, lastDirty, true);
+                    i = lastDirty;
+                }
+            }
+            /* If there is some non-whitespace, mark that we may need
+             * to preserve this. This is only important if we have indentation on.
+             */            
+            if (i < end) 
+                m_ispreserve = true;
+                
+
+//            int lengthClean;    // number of clean characters in a row
+//            final boolean[] isAsciiClean = m_charInfo.getASCIIClean();
+            
+            final boolean isXML10 = XMLVERSION10.equals(getVersion());
+            // we've skipped the leading whitespace, now deal with the rest
+            for (; i < end; i++)
+            {                      
+                {
+                    // A tight loop to skip over common clean chars
+                    // This tight loop makes it easier for the JIT
+                    // to optimize.
+                    char ch2;
+                    while (i<end 
+                            && ((ch2 = chars[i])<127)
+                            && m_charInfo.isTextASCIIClean(ch2))
+                            i++;
+                    if (i == end)
+                        break;
+                }  
+                   
+                final char ch = chars[i];
+                /*  The check for isCharacterInC0orC1Ranger and 
+                 *  isNELorLSEPCharacter has been added
+                 *  to support Control Characters in XML 1.1
+                 */     
+                if (!isCharacterInC0orC1Range(ch) && 
+                    (isXML10 || !isNELorLSEPCharacter(ch)) &&
+                    (escapingNotNeeded(ch) && (!m_charInfo.isSpecialTextChar(ch)))
+                        || ('"' == ch))
+                {
+                    ; // a character needing no special processing
+                }
+                else
+                {
+                    lastDirty = processDirty(chars,end, i, ch, lastDirty, true);
+                    i = lastDirty;
+                }
+            }
+            
+            // we've reached the end. Any clean characters at the
+            // end of the array than need to be written out?
+            startClean = lastDirty + 1;
+            if (i > startClean)
+            {
+                int lengthClean = i - startClean;
+                m_writer.write(chars, startClean, lengthClean);
+            }
+
+            // For indentation purposes, mark that we've just writen text out
+            m_isprevtext = true;
+        }
+        catch (IOException e)
+        {
+            throw new SAXException(e);
+        }
+
+        // time to fire off characters generation event
+        if (m_tracer != null)
+            super.fireCharEvent(chars, start, length);
+    }     
+    /**
+     * This method checks if a given character is between C0 or C1 range
+     * of Control characters.
+     * This method is added to support Control Characters for XML 1.1
+     * If a given character is TAB (0x09), LF (0x0A) or CR (0x0D), this method
+     * return false. Since they are whitespace characters, no special processing is needed.
+     * 
+     * @param ch
+     * @return boolean
+     */
+    private static boolean isCharacterInC0orC1Range(char ch)
+    {
+        if(ch == 0x09 || ch == 0x0A || ch == 0x0D)
+        	return false;
+        else        	    	
+        	return (ch >= 0x7F && ch <= 0x9F)|| (ch >= 0x01 && ch <= 0x1F);
+    }
+    /**
+     * This method checks if a given character either NEL (0x85) or LSEP (0x2028)
+     * These are new end of line charcters added in XML 1.1.  These characters must be
+     * written as Numeric Character References (NCR) in XML 1.1 output document.
+     * 
+     * @param ch
+     * @return boolean
+     */
+    private static boolean isNELorLSEPCharacter(char ch)
+    {
+        return (ch == 0x85 || ch == 0x2028);
+    }
+    /**
+     * Process a dirty character and any preeceding clean characters
+     * that were not yet processed.
+     * @param chars array of characters being processed
+     * @param end one (1) beyond the last character 
+     * in chars to be processed
+     * @param i the index of the dirty character
+     * @param ch the character in chars[i]
+     * @param lastDirty the last dirty character previous to i
+     * @param fromTextNode true if the characters being processed are
+     * from a text node, false if they are from an attribute value.
+     * @return the index of the last character processed
+     */
+    private int processDirty(
+        char[] chars, 
+        int end,
+        int i, 
+        char ch,
+        int lastDirty,
+        boolean fromTextNode) throws IOException
+    {
+        int startClean = lastDirty + 1;
+        // if we have some clean characters accumulated
+        // process them before the dirty one.                   
+        if (i > startClean)
+        {
+            int lengthClean = i - startClean;
+            m_writer.write(chars, startClean, lengthClean);
+        }
+
+        // process the "dirty" character
+        if (CharInfo.S_LINEFEED == ch && fromTextNode)
+        {
+            m_writer.write(m_lineSep, 0, m_lineSepLen);
+        }
+        else
+        {
+            startClean =
+                accumDefaultEscape(
+                    m_writer,
+                    (char)ch,
+                    i,
+                    chars,
+                    end,
+                    fromTextNode,
+                    false);
+            i = startClean - 1;
+        }
+        // Return the index of the last character that we just processed 
+        // which is a dirty character.
+        return i;
+    }
+
+    /**
+     * Receive notification of character data.
+     *
+     * @param s The string of characters to process.
+     *
+     * @throws org.xml.sax.SAXException
+     */
+    public void characters(String s) throws org.xml.sax.SAXException
+    {
+        if (m_inEntityRef && !m_expandDTDEntities)
+            return;
+        final int length = s.length();
+        if (length > m_charsBuff.length)
+        {
+            m_charsBuff = new char[length * 2 + 1];
+        }
+        s.getChars(0, length, m_charsBuff, 0);
+        characters(m_charsBuff, 0, length);
+    }
+
+    /**
+     * Escape and writer.write a character.
+     *
+     * @param ch character to be escaped.
+     * @param i index into character array.
+     * @param chars non-null reference to character array.
+     * @param len length of chars.
+     * @param fromTextNode true if the characters being processed are
+     * from a text node, false if the characters being processed are from
+     * an attribute value.
+     * @param escLF true if the linefeed should be escaped.
+     *
+     * @return i+1 if a character was written, i+2 if two characters
+     * were written out, else return i.
+     *
+     * @throws org.xml.sax.SAXException
+     */
+    protected int accumDefaultEscape(
+        Writer writer,
+        char ch,
+        int i,
+        char[] chars,
+        int len,
+        boolean fromTextNode,
+        boolean escLF)
+        throws IOException
+    {
+
+        int pos = accumDefaultEntity(writer, ch, i, chars, len, fromTextNode, escLF);
+
+        if (i == pos)
+        {
+            if (Encodings.isHighUTF16Surrogate(ch))
+            {
+
+                // Should be the UTF-16 low surrogate of the hig/low pair.
+                char next;
+                // Unicode code point formed from the high/low pair.
+                int codePoint = 0;
+
+                if (i + 1 >= len)
+                {
+                    throw new IOException(
+                        Utils.messages.createMessage(
+                            MsgKey.ER_INVALID_UTF16_SURROGATE,
+                            new Object[] { Integer.toHexString(ch)}));
+                    //"Invalid UTF-16 surrogate detected: "
+
+                    //+Integer.toHexString(ch)+ " ?");
+                }
+                else
+                {
+                    next = chars[++i];
+
+                    if (!(Encodings.isLowUTF16Surrogate(next)))
+                        throw new IOException(
+                            Utils.messages.createMessage(
+                                MsgKey
+                                    .ER_INVALID_UTF16_SURROGATE,
+                                new Object[] {
+                                    Integer.toHexString(ch)
+                                        + " "
+                                        + Integer.toHexString(next)}));
+                    //"Invalid UTF-16 surrogate detected: "
+
+                    //+Integer.toHexString(ch)+" "+Integer.toHexString(next));
+                    codePoint = Encodings.toCodePoint(ch,next);
+                }
+
+                writer.write("&#");
+                writer.write(Integer.toString(codePoint));
+                writer.write(';');
+                pos += 2; // count the two characters that went into writing out this entity
+            }
+            else
+            {
+                /*  This if check is added to support control characters in XML 1.1.
+                 *  If a character is a Control Character within C0 and C1 range, it is desirable
+                 *  to write it out as Numeric Character Reference(NCR) regardless of XML Version
+                 *  being used for output document.
+                 */ 
+                if (isCharacterInC0orC1Range(ch) || 
+                        (XMLVERSION11.equals(getVersion()) && isNELorLSEPCharacter(ch)))
+                {
+                    writer.write("&#");
+                    writer.write(Integer.toString(ch));
+                    writer.write(';');
+                }
+                else if ((!escapingNotNeeded(ch) || 
+                    (  (fromTextNode && m_charInfo.isSpecialTextChar(ch))
+                     || (!fromTextNode && m_charInfo.isSpecialAttrChar(ch)))) 
+                && m_elemContext.m_currentElemDepth > 0)
+                {
+                    writer.write("&#");
+                    writer.write(Integer.toString(ch));
+                    writer.write(';');
+                }
+                else
+                {
+                    writer.write(ch);
+                }
+                pos++;  // count the single character that was processed
+            }
+
+        }
+        return pos;
+    }
+
+    /**
+     * Receive notification of the beginning of an element, although this is a
+     * SAX method additional namespace or attribute information can occur before
+     * or after this call, that is associated with this element.
+     *
+     *
+     * @param namespaceURI The Namespace URI, or the empty string if the
+     *        element has no Namespace URI or if Namespace
+     *        processing is not being performed.
+     * @param localName The local name (without prefix), or the
+     *        empty string if Namespace processing is not being
+     *        performed.
+     * @param name The element type name.
+     * @param atts The attributes attached to the element, if any.
+     * @throws org.xml.sax.SAXException Any SAX exception, possibly
+     *            wrapping another exception.
+     * @see org.xml.sax.ContentHandler#startElement
+     * @see org.xml.sax.ContentHandler#endElement
+     * @see org.xml.sax.AttributeList
+     *
+     * @throws org.xml.sax.SAXException
+     */
+    public void startElement(
+        String namespaceURI,
+        String localName,
+        String name,
+        Attributes atts)
+        throws org.xml.sax.SAXException
+    {
+        if (m_inEntityRef)
+            return;
+
+        if (m_needToCallStartDocument)
+        {
+            startDocumentInternal();
+            m_needToCallStartDocument = false;
+        }
+        else if (m_cdataTagOpen)
+            closeCDATA();
+        try
+        {
+            if ((true == m_needToOutputDocTypeDecl)
+                && (null != getDoctypeSystem()))
+            {
+                outputDocTypeDecl(name, true);
+            }
+
+            m_needToOutputDocTypeDecl = false;
+        
+            /* before we over-write the current elementLocalName etc.
+             * lets close out the old one (if we still need to)
+             */
+            if (m_elemContext.m_startTagOpen)
+            {
+                closeStartTag();
+                m_elemContext.m_startTagOpen = false;
+            }
+
+            if (namespaceURI != null)
+                ensurePrefixIsDeclared(namespaceURI, name);
+                
+            m_ispreserve = false;
+
+            if (shouldIndent() && m_startNewLine)
+            {
+                indent();
+            }
+
+            m_startNewLine = true;
+
+            final java.io.Writer writer = m_writer;
+            writer.write('<');
+            writer.write(name);
+        }
+        catch (IOException e)
+        {
+            throw new SAXException(e);
+        }
+
+        // process the attributes now, because after this SAX call they might be gone
+        if (atts != null)
+            addAttributes(atts);
+            
+        m_elemContext = m_elemContext.push(namespaceURI,localName,name);
+        m_isprevtext = false;
+
+        if (m_tracer != null)
+            firePseudoAttributes();
+    }
+
+    /**
+      * Receive notification of the beginning of an element, additional
+      * namespace or attribute information can occur before or after this call,
+      * that is associated with this element.
+      *
+      *
+      * @param elementNamespaceURI The Namespace URI, or the empty string if the
+      *        element has no Namespace URI or if Namespace
+      *        processing is not being performed.
+      * @param elementLocalName The local name (without prefix), or the
+      *        empty string if Namespace processing is not being
+      *        performed.
+      * @param elementName The element type name.
+      * @throws org.xml.sax.SAXException Any SAX exception, possibly
+      *            wrapping another exception.
+      * @see org.xml.sax.ContentHandler#startElement
+      * @see org.xml.sax.ContentHandler#endElement
+      * @see org.xml.sax.AttributeList
+      *
+      * @throws org.xml.sax.SAXException
+      */
+    public void startElement(
+        String elementNamespaceURI,
+        String elementLocalName,
+        String elementName)
+        throws SAXException
+    {
+        startElement(elementNamespaceURI, elementLocalName, elementName, null);
+    }
+
+    public void startElement(String elementName) throws SAXException
+    {
+        startElement(null, null, elementName, null);
+    }
+
+    /**
+     * Output the doc type declaration.
+     *
+     * @param name non-null reference to document type name.
+     * NEEDSDOC @param closeDecl
+     *
+     * @throws java.io.IOException
+     */
+    void outputDocTypeDecl(String name, boolean closeDecl) throws SAXException
+    {
+        if (m_cdataTagOpen)
+            closeCDATA();
+        try
+        {
+            final java.io.Writer writer = m_writer;
+            writer.write("<!DOCTYPE ");
+            writer.write(name);
+
+            String doctypePublic = getDoctypePublic();
+            if (null != doctypePublic)
+            {
+                writer.write(" PUBLIC \"");
+                writer.write(doctypePublic);
+                writer.write('\"');
+            }
+
+            String doctypeSystem = getDoctypeSystem();
+            if (null != doctypeSystem)
+            {
+                if (null == doctypePublic)
+                    writer.write(" SYSTEM \"");
+                else
+                    writer.write(" \"");
+
+                writer.write(doctypeSystem);
+
+                if (closeDecl)
+                {
+                    writer.write("\">");
+                    writer.write(m_lineSep, 0, m_lineSepLen);
+                    closeDecl = false; // done closing
+                }
+                else
+                    writer.write('\"');
+            }
+            boolean dothis = false;
+            if (dothis)
+            {
+                // at one point this code seemed right,
+                // but not anymore - Brian M.
+                if (closeDecl)
+                {
+                    writer.write('>');
+                    writer.write(m_lineSep, 0, m_lineSepLen);
+                }
+            }
+        }
+        catch (IOException e)
+        {
+            throw new SAXException(e);
+        }
+    }
+
+    /**
+     * Process the attributes, which means to write out the currently
+     * collected attributes to the writer. The attributes are not
+     * cleared by this method
+     * 
+     * @param writer the writer to write processed attributes to.
+     * @param nAttrs the number of attributes in m_attributes 
+     * to be processed
+     *
+     * @throws java.io.IOException
+     * @throws org.xml.sax.SAXException
+     */
+    public void processAttributes(java.io.Writer writer, int nAttrs) throws IOException, SAXException
+    {
+            /* real SAX attributes are not passed in, so process the 
+             * attributes that were collected after the startElement call.
+             * _attribVector is a "cheap" list for Stream serializer output
+             * accumulated over a series of calls to attribute(name,value)
+             */
+
+            String encoding = getEncoding();
+            for (int i = 0; i < nAttrs; i++)
+            {
+                // elementAt is JDK 1.1.8
+                final String name = m_attributes.getQName(i);
+                final String value = m_attributes.getValue(i);
+                writer.write(' ');
+                writer.write(name);
+                writer.write("=\"");
+                writeAttrString(writer, value, encoding);
+                writer.write('\"');
+            }
+    }
+
+    /**
+     * Returns the specified <var>string</var> after substituting <VAR>specials</VAR>,
+     * and UTF-16 surrogates for chracter references <CODE>&amp;#xnn</CODE>.
+     *
+     * @param   string      String to convert to XML format.
+     * @param   encoding    CURRENTLY NOT IMPLEMENTED.
+     *
+     * @throws java.io.IOException
+     */
+    public void writeAttrString(
+        Writer writer,
+        String string,
+        String encoding)
+        throws IOException
+    {
+        final int len = string.length();
+        if (len > m_attrBuff.length)
+        {
+           m_attrBuff = new char[len*2 + 1];             
+        }
+        string.getChars(0,len, m_attrBuff, 0);   
+        final char[] stringChars = m_attrBuff;
+
+        int start = 0;
+        int current = 0;
+        for (; current < len; current++)
+        {
+            char ch = stringChars[current];
+            if (escapingNotNeeded(ch) && (!m_charInfo.isSpecialAttrChar(ch)))
+            {
+//                writer.write(ch);
+            }
+            else
+            { // I guess the parser doesn't normalize cr/lf in attributes. -sb
+//                if ((CharInfo.S_CARRIAGERETURN == ch)
+//                    && ((i + 1) < len)
+//                    && (CharInfo.S_LINEFEED == stringChars[i + 1]))
+//                {
+//                    i++;
+//                    ch = CharInfo.S_LINEFEED;
+//                }
+
+            	// Write buffer
+            	if(start < current){
+            		writer.write(stringChars,start,current-start);
+            	}
+                accumDefaultEscape(writer, ch, current, stringChars, len, false, true);
+                start=current+1;
+            }
+        }
+    	if(start < current){
+    		writer.write(stringChars,start,current-start);
+    	}
+
+    }
+
+    /**
+     * Receive notification of the end of an element.
+     *
+     *
+     * @param namespaceURI The Namespace URI, or the empty string if the
+     *        element has no Namespace URI or if Namespace
+     *        processing is not being performed.
+     * @param localName The local name (without prefix), or the
+     *        empty string if Namespace processing is not being
+     *        performed.
+     * @param name The element type name
+     * @throws org.xml.sax.SAXException Any SAX exception, possibly
+     *            wrapping another exception.
+     *
+     * @throws org.xml.sax.SAXException
+     */
+    public void endElement(String namespaceURI, String localName, String name)
+        throws org.xml.sax.SAXException
+    {
+        if (m_inEntityRef)
+            return;
+
+        // namespaces declared at the current depth are no longer valid
+        // so get rid of them    
+        m_prefixMap.popNamespaces(m_elemContext.m_currentElemDepth, null);
+
+        try
+        {
+            final java.io.Writer writer = m_writer;
+            if (m_elemContext.m_startTagOpen)
+            {
+                if (m_tracer != null)
+                    super.fireStartElem(m_elemContext.m_elementName);
+                int nAttrs = m_attributes.getLength();
+                if (nAttrs > 0)
+                {
+                    processAttributes(m_writer, nAttrs);
+                    // clear attributes object for re-use with next element
+                    m_attributes.clear();
+                }
+                if (m_spaceBeforeClose)
+                    writer.write(" />");
+                else
+                    writer.write("/>");
+                /* don't need to pop cdataSectionState because
+                 * this element ended so quickly that we didn't get
+                 * to push the state.
+                 */
+
+            }
+            else
+            {
+                if (m_cdataTagOpen)
+                    closeCDATA();
+
+                if (shouldIndent())
+                    indent(m_elemContext.m_currentElemDepth - 1);
+                writer.write('<');
+                writer.write('/');
+                writer.write(name);
+                writer.write('>');
+            }
+        }
+        catch (IOException e)
+        {
+            throw new SAXException(e);
+        }
+
+        if (!m_elemContext.m_startTagOpen && m_doIndent)
+        {
+            m_ispreserve = m_preserves.isEmpty() ? false : m_preserves.pop();
+        }
+
+        m_isprevtext = false;
+
+        // fire off the end element event
+        if (m_tracer != null)
+            super.fireEndElem(name);
+        m_elemContext = m_elemContext.m_prev;
+    }
+
+    /**
+     * Receive notification of the end of an element.
+     * @param name The element type name
+     * @throws org.xml.sax.SAXException Any SAX exception, possibly
+     *     wrapping another exception.
+     */
+    public void endElement(String name) throws org.xml.sax.SAXException
+    {
+        endElement(null, null, name);
+    }
+
+    /**
+     * Begin the scope of a prefix-URI Namespace mapping
+     * just before another element is about to start.
+     * This call will close any open tags so that the prefix mapping
+     * will not apply to the current element, but the up comming child.
+     * 
+     * @see org.xml.sax.ContentHandler#startPrefixMapping
+     * 
+     * @param prefix The Namespace prefix being declared.
+     * @param uri The Namespace URI the prefix is mapped to.
+     * 
+     * @throws org.xml.sax.SAXException The client may throw
+     *            an exception during processing.
+     * 
+     */
+    public void startPrefixMapping(String prefix, String uri)
+        throws org.xml.sax.SAXException
+    {
+        // the "true" causes the flush of any open tags
+        startPrefixMapping(prefix, uri, true);
+    }
+
+    /**
+     * Handle a prefix/uri mapping, which is associated with a startElement()
+     * that is soon to follow. Need to close any open start tag to make
+     * sure than any name space attributes due to this event are associated wih
+     * the up comming element, not the current one.
+     * @see ExtendedContentHandler#startPrefixMapping
+     *
+     * @param prefix The Namespace prefix being declared.
+     * @param uri The Namespace URI the prefix is mapped to.
+     * @param shouldFlush true if any open tags need to be closed first, this
+     * will impact which element the mapping applies to (open parent, or its up
+     * comming child)
+     * @return returns true if the call made a change to the current 
+     * namespace information, false if it did not change anything, e.g. if the
+     * prefix/namespace mapping was already in scope from before.
+     * 
+     * @throws org.xml.sax.SAXException The client may throw
+     *            an exception during processing.
+     *
+     *
+     */
+    public boolean startPrefixMapping(
+        String prefix,
+        String uri,
+        boolean shouldFlush)
+        throws org.xml.sax.SAXException
+    {
+
+        /* Remember the mapping, and at what depth it was declared
+         * This is one greater than the current depth because these
+         * mappings will apply to the next depth. This is in
+         * consideration that startElement() will soon be called
+         */
+
+        boolean pushed;
+        int pushDepth;
+        if (shouldFlush)
+        {
+            flushPending();
+            // the prefix mapping applies to the child element (one deeper)
+            pushDepth = m_elemContext.m_currentElemDepth + 1;
+        }
+        else
+        {
+            // the prefix mapping applies to the current element
+            pushDepth = m_elemContext.m_currentElemDepth;
+        }
+        pushed = m_prefixMap.pushNamespace(prefix, uri, pushDepth);
+
+        if (pushed)
+        {
+            /* Brian M.: don't know if we really needto do this. The
+             * callers of this object should have injected both
+             * startPrefixMapping and the attributes.  We are 
+             * just covering our butt here.
+             */
+            String name;
+            if (EMPTYSTRING.equals(prefix))
+            {
+                name = "xmlns";
+                addAttributeAlways(XMLNS_URI, name, name, "CDATA", uri, false);
+            }
+            else
+            {
+                if (!EMPTYSTRING.equals(uri))
+                    // hack for XSLTC attribset16 test
+                { // that maps ns1 prefix to "" URI
+                    name = "xmlns:" + prefix;
+
+                    /* for something like xmlns:abc="w3.pretend.org"
+                     *  the      uri is the value, that is why we pass it in the
+                     * value, or 5th slot of addAttributeAlways()
+                     */
+                    addAttributeAlways(XMLNS_URI, prefix, name, "CDATA", uri, false);
+                }
+            }
+        }
+        return pushed;
+    }
+
+    /**
+     * Receive notification of an XML comment anywhere in the document. This
+     * callback will be used for comments inside or outside the document
+     * element, including comments in the external DTD subset (if read).
+     * @param ch An array holding the characters in the comment.
+     * @param start The starting position in the array.
+     * @param length The number of characters to use from the array.
+     * @throws org.xml.sax.SAXException The application may raise an exception.
+     */
+    public void comment(char ch[], int start, int length)
+        throws org.xml.sax.SAXException
+    {
+
+        int start_old = start;
+        if (m_inEntityRef)
+            return;
+        if (m_elemContext.m_startTagOpen)
+        {
+            closeStartTag();
+            m_elemContext.m_startTagOpen = false;
+        }
+        else if (m_needToCallStartDocument)
+        {
+            startDocumentInternal();
+            m_needToCallStartDocument = false;
+        }
+
+        try
+        {
+            if (shouldIndent())
+                indent();
+
+            final int limit = start + length;
+            boolean wasDash = false;
+            if (m_cdataTagOpen)
+                closeCDATA();
+            final java.io.Writer writer = m_writer;    
+            writer.write(COMMENT_BEGIN);
+            // Detect occurrences of two consecutive dashes, handle as necessary.
+            for (int i = start; i < limit; i++)
+            {
+                if (wasDash && ch[i] == '-')
+                {
+                    writer.write(ch, start, i - start);
+                    writer.write(" -");
+                    start = i + 1;
+                }
+                wasDash = (ch[i] == '-');
+            }
+
+            // if we have some chars in the comment
+            if (length > 0)
+            {
+                // Output the remaining characters (if any)
+                final int remainingChars = (limit - start);
+                if (remainingChars > 0)
+                    writer.write(ch, start, remainingChars);
+                // Protect comment end from a single trailing dash
+                if (ch[limit - 1] == '-')
+                    writer.write(' ');
+            }
+            writer.write(COMMENT_END);
+        }
+        catch (IOException e)
+        {
+            throw new SAXException(e);
+        }
+
+        m_startNewLine = true;
+        // time to generate comment event
+        if (m_tracer != null)
+            super.fireCommentEvent(ch, start_old,length);
+    }
+
+    /**
+     * Report the end of a CDATA section.
+     * @throws org.xml.sax.SAXException The application may raise an exception.
+     *
+     *  @see  #startCDATA
+     */
+    public void endCDATA() throws org.xml.sax.SAXException
+    {
+        if (m_cdataTagOpen)
+            closeCDATA();
+        m_cdataStartCalled = false;
+    }
+
+    /**
+     * Report the end of DTD declarations.
+     * @throws org.xml.sax.SAXException The application may raise an exception.
+     * @see #startDTD
+     */
+    public void endDTD() throws org.xml.sax.SAXException
+    {
+        try
+        {
+            if (m_needToOutputDocTypeDecl)
+            {
+                outputDocTypeDecl(m_elemContext.m_elementName, false);
+                m_needToOutputDocTypeDecl = false;
+            }
+            final java.io.Writer writer = m_writer;
+            if (!m_inDoctype)
+                writer.write("]>");
+            else
+            {
+                writer.write('>');
+            }
+
+            writer.write(m_lineSep, 0, m_lineSepLen);
+        }
+        catch (IOException e)
+        {
+            throw new SAXException(e);
+        }
+
+    }
+
+    /**
+     * End the scope of a prefix-URI Namespace mapping.
+     * @see org.xml.sax.ContentHandler#endPrefixMapping
+     * 
+     * @param prefix The prefix that was being mapping.
+     * @throws org.xml.sax.SAXException The client may throw
+     *            an exception during processing.
+     */
+    public void endPrefixMapping(String prefix) throws org.xml.sax.SAXException
+    { // do nothing
+    }
+
+    /**
+     * Receive notification of ignorable whitespace in element content.
+     * 
+     * Not sure how to get this invoked quite yet.
+     * 
+     * @param ch The characters from the XML document.
+     * @param start The start position in the array.
+     * @param length The number of characters to read from the array.
+     * @throws org.xml.sax.SAXException Any SAX exception, possibly
+     *            wrapping another exception.
+     * @see #characters
+     * 
+     * @throws org.xml.sax.SAXException
+     */
+    public void ignorableWhitespace(char ch[], int start, int length)
+        throws org.xml.sax.SAXException
+    {
+
+        if (0 == length)
+            return;
+        characters(ch, start, length);
+    }
+
+    /**
+     * Receive notification of a skipped entity.
+     * @see org.xml.sax.ContentHandler#skippedEntity
+     * 
+     * @param name The name of the skipped entity.  If it is a
+     *       parameter                   entity, the name will begin with '%',
+     * and if it is the external DTD subset, it will be the string
+     * "[dtd]".
+     * @throws org.xml.sax.SAXException Any SAX exception, possibly wrapping
+     * another exception.
+     */
+    public void skippedEntity(String name) throws org.xml.sax.SAXException
+    { // TODO: Should handle
+    }
+
+    /**
+     * Report the start of a CDATA section.
+     * 
+     * @throws org.xml.sax.SAXException The application may raise an exception.
+     * @see #endCDATA
+     */
+    public void startCDATA() throws org.xml.sax.SAXException
+    {
+        m_cdataStartCalled = true;
+    }
+
+    /**
+     * Report the beginning of an entity.
+     * 
+     * The start and end of the document entity are not reported.
+     * The start and end of the external DTD subset are reported
+     * using the pseudo-name "[dtd]".  All other events must be
+     * properly nested within start/end entity events.
+     * 
+     * @param name The name of the entity.  If it is a parameter
+     *        entity, the name will begin with '%'.
+     * @throws org.xml.sax.SAXException The application may raise an exception.
+     * @see #endEntity
+     * @see org.xml.sax.ext.DeclHandler#internalEntityDecl
+     * @see org.xml.sax.ext.DeclHandler#externalEntityDecl
+     */
+    public void startEntity(String name) throws org.xml.sax.SAXException
+    {
+        if (name.equals("[dtd]"))
+            m_inExternalDTD = true;
+
+        if (!m_expandDTDEntities && !m_inExternalDTD) {
+            /* Only leave the entity as-is if
+             * we've been told not to expand them
+             * and this is not the magic [dtd] name.
+             */
+            startNonEscaping();
+            characters("&" + name + ';');
+            endNonEscaping();
+        }
+
+        m_inEntityRef = true;
+    }
+
+    /**
+     * For the enclosing elements starting tag write out
+     * out any attributes followed by ">"
+     *
+     * @throws org.xml.sax.SAXException
+     */
+    protected void closeStartTag() throws SAXException
+    {
+
+        if (m_elemContext.m_startTagOpen)
+        {
+
+            try
+            {
+                if (m_tracer != null)
+                    super.fireStartElem(m_elemContext.m_elementName);
+                int nAttrs = m_attributes.getLength();
+                if (nAttrs > 0)
+                {
+                    processAttributes(m_writer, nAttrs);
+                    // clear attributes object for re-use with next element
+                    m_attributes.clear();
+                }
+                m_writer.write('>');
+            }
+            catch (IOException e)
+            {
+                throw new SAXException(e);
+            }
+
+            /* whether Xalan or XSLTC, we have the prefix mappings now, so
+             * lets determine if the current element is specified in the cdata-
+             * section-elements list.
+             */
+            if (m_cdataSectionElements != null)
+                m_elemContext.m_isCdataSection = isCdataSection();
+
+            if (m_doIndent)
+            {
+                m_isprevtext = false;
+                m_preserves.push(m_ispreserve);
+            }
+        }
+
+    }
+
+    /**
+     * Report the start of DTD declarations, if any.
+     *
+     * Any declarations are assumed to be in the internal subset unless
+     * otherwise indicated.
+     * 
+     * @param name The document type name.
+     * @param publicId The declared public identifier for the
+     *        external DTD subset, or null if none was declared.
+     * @param systemId The declared system identifier for the
+     *        external DTD subset, or null if none was declared.
+     * @throws org.xml.sax.SAXException The application may raise an
+     *            exception.
+     * @see #endDTD
+     * @see #startEntity
+     */
+    public void startDTD(String name, String publicId, String systemId)
+        throws org.xml.sax.SAXException
+    {
+        setDoctypeSystem(systemId);
+        setDoctypePublic(publicId);
+
+        m_elemContext.m_elementName = name;
+        m_inDoctype = true;
+    }
+
+    /**
+     * Returns the m_indentAmount.
+     * @return int
+     */
+    public int getIndentAmount()
+    {
+        return m_indentAmount;
+    }
+
+    /**
+     * Sets the m_indentAmount.
+     * 
+     * @param m_indentAmount The m_indentAmount to set
+     */
+    public void setIndentAmount(int m_indentAmount)
+    {
+        this.m_indentAmount = m_indentAmount;
+    }
+
+    /**
+     * Tell if, based on space preservation constraints and the doIndent property,
+     * if an indent should occur.
+     *
+     * @return True if an indent should occur.
+     */
+    protected boolean shouldIndent()
+    {
+        return m_doIndent && (!m_ispreserve && !m_isprevtext);
+    }
+
+    /**
+     * Searches for the list of qname properties with the specified key in the
+     * property list. If the key is not found in this property list, the default
+     * property list, and its defaults, recursively, are then checked. The
+     * method returns <code>null</code> if the property is not found.
+     *
+     * @param   key   the property key.
+     * @param props the list of properties to search in.
+     * 
+     * Sets the vector of local-name/URI pairs of the cdata section elements
+     * specified in the cdata-section-elements property.
+     * 
+     * This method is essentially a copy of getQNameProperties() from
+     * OutputProperties. Eventually this method should go away and a call
+     * to setCdataSectionElements(Vector v) should be made directly.
+     */
+    private void setCdataSectionElements(String key, Properties props)
+    {
+
+        String s = props.getProperty(key);
+
+        if (null != s)
+        {
+            // Vector of URI/LocalName pairs
+            Vector v = new Vector();
+            int l = s.length();
+            boolean inCurly = false;
+            StringBuffer buf = new StringBuffer();
+
+            // parse through string, breaking on whitespaces.  I do this instead
+            // of a tokenizer so I can track whitespace inside of curly brackets,
+            // which theoretically shouldn't happen if they contain legal URLs.
+            for (int i = 0; i < l; i++)
+            {
+                char c = s.charAt(i);
+
+                if (Character.isWhitespace(c))
+                {
+                    if (!inCurly)
+                    {
+                        if (buf.length() > 0)
+                        {
+                            addCdataSectionElement(buf.toString(), v);
+                            buf.setLength(0);
+                        }
+                        continue;
+                    }
+                }
+                else if ('{' == c)
+                    inCurly = true;
+                else if ('}' == c)
+                    inCurly = false;
+
+                buf.append(c);
+            }
+
+            if (buf.length() > 0)
+            {
+                addCdataSectionElement(buf.toString(), v);
+                buf.setLength(0);
+            }
+            // call the official, public method to set the collected names
+            setCdataSectionElements(v);
+        }
+
+    }
+
+    /**
+     * Adds a URI/LocalName pair of strings to the list.
+     *
+     * @param URI_and_localName String of the form "{uri}local" or "local" 
+     * 
+     * @return a QName object
+     */
+    private void addCdataSectionElement(String URI_and_localName, Vector v)
+    {
+
+        StringTokenizer tokenizer =
+            new StringTokenizer(URI_and_localName, "{}", false);
+        String s1 = tokenizer.nextToken();
+        String s2 = tokenizer.hasMoreTokens() ? tokenizer.nextToken() : null;
+
+        if (null == s2)
+        {
+            // add null URI and the local name
+            v.addElement(null);
+            v.addElement(s1);
+        }
+        else
+        {
+            // add URI, then local name
+            v.addElement(s1);
+            v.addElement(s2);
+        }
+    }
+
+    /**
+     * Remembers the cdata sections specified in the cdata-section-elements.
+     * The "official way to set URI and localName pairs. 
+     * This method should be used by both Xalan and XSLTC.
+     * 
+     * @param URI_and_localNames a vector of pairs of Strings (URI/local)
+     */
+    public void setCdataSectionElements(Vector URI_and_localNames)
+    {
+        m_cdataSectionElements = URI_and_localNames;
+    }
+
+    /**
+     * Makes sure that the namespace URI for the given qualified attribute name
+     * is declared.
+     * @param ns the namespace URI
+     * @param rawName the qualified name 
+     * @return returns null if no action is taken, otherwise it returns the
+     * prefix used in declaring the namespace. 
+     * @throws SAXException
+     */
+    protected String ensureAttributesNamespaceIsDeclared(
+        String ns,
+        String localName,
+        String rawName)
+        throws org.xml.sax.SAXException
+    {
+
+        if (ns != null && ns.length() > 0)
+        {
+
+            // extract the prefix in front of the raw name
+            int index = 0;
+            String prefixFromRawName =
+                (index = rawName.indexOf(":")) < 0
+                    ? ""
+                    : rawName.substring(0, index);
+
+            if (index > 0)
+            {
+                // we have a prefix, lets see if it maps to a namespace 
+                String uri = m_prefixMap.lookupNamespace(prefixFromRawName);
+                if (uri != null && uri.equals(ns))
+                {
+                    // the prefix in the raw name is already maps to the given namespace uri
+                    // so we don't need to do anything
+                    return null;
+                }
+                else
+                {
+                    // The uri does not map to the prefix in the raw name,
+                    // so lets make the mapping.
+                    this.startPrefixMapping(prefixFromRawName, ns, false);
+                    this.addAttribute(
+                        "http://www.w3.org/2000/xmlns/",
+                        prefixFromRawName,
+                        "xmlns:" + prefixFromRawName,
+                        "CDATA",
+                        ns, false);
+                    return prefixFromRawName;
+                }
+            }
+            else
+            {
+                // we don't have a prefix in the raw name.
+                // Does the URI map to a prefix already?
+                String prefix = m_prefixMap.lookupPrefix(ns);
+                if (prefix == null)
+                {
+                    // uri is not associated with a prefix,
+                    // so lets generate a new prefix to use
+                    prefix = m_prefixMap.generateNextPrefix();
+                    this.startPrefixMapping(prefix, ns, false);
+                    this.addAttribute(
+                        "http://www.w3.org/2000/xmlns/",
+                        prefix,
+                        "xmlns:" + prefix,
+                        "CDATA",
+                        ns, false);
+                }
+
+                return prefix;
+
+            }
+        }
+        return null;
+    }
+
+    void ensurePrefixIsDeclared(String ns, String rawName)
+        throws org.xml.sax.SAXException
+    {
+
+        if (ns != null && ns.length() > 0)
+        {
+            int index;
+            final boolean no_prefix = ((index = rawName.indexOf(":")) < 0);
+            String prefix = (no_prefix) ? "" : rawName.substring(0, index);
+
+            if (null != prefix)
+            {
+                String foundURI = m_prefixMap.lookupNamespace(prefix);
+
+                if ((null == foundURI) || !foundURI.equals(ns))
+                {
+                    this.startPrefixMapping(prefix, ns);
+
+                    // Bugzilla1133: Generate attribute as well as namespace event.
+                    // SAX does expect both.
+
+                    this.addAttributeAlways(
+                        "http://www.w3.org/2000/xmlns/",
+                        no_prefix ? "xmlns" : prefix,  // local name
+                        no_prefix ? "xmlns" : ("xmlns:"+ prefix), // qname
+                        "CDATA",
+                        ns,
+                        false);
+                }
+
+            }
+        }
+    }
+
+    /**
+     * This method flushes any pending events, which can be startDocument()
+     * closing the opening tag of an element, or closing an open CDATA section.
+     */
+    public void flushPending() throws SAXException
+    {
+            if (m_needToCallStartDocument)
+            {
+                startDocumentInternal();
+                m_needToCallStartDocument = false;
+            }
+            if (m_elemContext.m_startTagOpen)
+            {
+                closeStartTag();
+                m_elemContext.m_startTagOpen = false;
+            }
+
+            if (m_cdataTagOpen)
+            {
+                closeCDATA();
+                m_cdataTagOpen = false;
+            }
+    }
+
+    public void setContentHandler(ContentHandler ch)
+    {
+        // this method is really only useful in the ToSAXHandler classes but it is
+        // in the interface.  If the method defined here is ever called
+        // we are probably in trouble.
+    }
+
+    /**
+     * Adds the given attribute to the set of attributes, even if there is
+     * no currently open element. This is useful if a SAX startPrefixMapping()
+     * should need to add an attribute before the element name is seen.
+     * 
+     * This method is a copy of its super classes method, except that some
+     * tracing of events is done.  This is so the tracing is only done for
+     * stream serializers, not for SAX ones.
+     *
+     * @param uri the URI of the attribute
+     * @param localName the local name of the attribute
+     * @param rawName   the qualified name of the attribute
+     * @param type the type of the attribute (probably CDATA)
+     * @param value the value of the attribute
+     * @param xslAttribute true if this attribute is coming from an xsl:attribute element.
+     * @return true if the attribute value was added, 
+     * false if the attribute already existed and the value was
+     * replaced with the new value.
+     */
+    public boolean addAttributeAlways(
+        String uri,
+        String localName,
+        String rawName,
+        String type,
+        String value,
+        boolean xslAttribute)
+    {
+        boolean was_added;
+        int index;
+        if (uri == null || localName == null || uri.length() == 0)
+            index = m_attributes.getIndex(rawName);
+        else {
+            index = m_attributes.getIndex(uri, localName);
+        }
+
+        if (index >= 0)
+        {
+            String old_value = null;
+            if (m_tracer != null)
+            {
+                old_value = m_attributes.getValue(index);
+                if (value.equals(old_value))
+                    old_value = null;
+            }
+
+            /* We've seen the attribute before.
+             * We may have a null uri or localName, but all we really
+             * want to re-set is the value anyway.
+             */
+            m_attributes.setValue(index, value);
+            was_added = false;
+            if (old_value != null)
+                firePseudoAttributes();
+
+        }
+        else
+        {
+            // the attribute doesn't exist yet, create it
+            if (xslAttribute)
+            {
+                /*
+                 * This attribute is from an xsl:attribute element so we take some care in
+                 * adding it, e.g.
+                 *   <elem1  foo:attr1="1" xmlns:foo="uri1">
+                 *       <xsl:attribute name="foo:attr2">2</xsl:attribute>
+                 *   </elem1>
+                 * 
+                 * We are adding attr1 and attr2 both as attributes of elem1,
+                 * and this code is adding attr2 (the xsl:attribute ).
+                 * We could have a collision with the prefix like in the example above.
+                 */
+
+                // In the example above, is there a prefix like foo ?
+                final int colonIndex = rawName.indexOf(':');
+                if (colonIndex > 0)
+                {
+                    String prefix = rawName.substring(0,colonIndex);
+                    NamespaceMappings.MappingRecord existing_mapping = m_prefixMap.getMappingFromPrefix(prefix);
+
+                    /* Before adding this attribute (foo:attr2),
+                     * is the prefix for it (foo) already mapped at the current depth?
+                     */
+                    if (existing_mapping != null 
+                    && existing_mapping.m_declarationDepth == m_elemContext.m_currentElemDepth
+                    && !existing_mapping.m_uri.equals(uri))
+                    {
+                        /*
+                         * There is an existing mapping of this prefix,
+                         * it differs from the one we need,
+                         * and unfortunately it is at the current depth so we 
+                         * can not over-ride it.
+                         */
+
+                        /*
+                         * Are we lucky enough that an existing other prefix maps to this URI ?
+                         */
+                        prefix = m_prefixMap.lookupPrefix(uri);
+                        if (prefix == null)
+                        {
+                            /* Unfortunately there is no existing prefix that happens to map to ours,
+                             * so to avoid a prefix collision we must generated a new prefix to use. 
+                             * This is OK because the prefix URI mapping
+                             * defined in the xsl:attribute is short in scope, 
+                             * just the xsl:attribute element itself, 
+                             * and at this point in serialization the body of the
+                             * xsl:attribute, if any, is just a String. Right?
+                             *   . . . I sure hope so - Brian M. 
+                             */
+                            prefix = m_prefixMap.generateNextPrefix();
+                        }
+
+                        rawName = prefix + ':' + localName;
+                    }
+                }
+
+                try
+                {
+                    /* This is our last chance to make sure the namespace for this
+                     * attribute is declared, especially if we just generated an alternate
+                     * prefix to avoid a collision (the new prefix/rawName will go out of scope
+                     * soon and be lost ...  last chance here.
+                     */
+                    String prefixUsed =
+                        ensureAttributesNamespaceIsDeclared(
+                            uri,
+                            localName,
+                            rawName);
+                }
+                catch (SAXException e)
+                {
+                    // TODO Auto-generated catch block
+                    e.printStackTrace();
+                }
+            }
+            m_attributes.addAttribute(uri, localName, rawName, type, value);
+            was_added = true;
+            if (m_tracer != null)
+                firePseudoAttributes();
+        }
+        return was_added;
+    }
+
+    /**
+     * To fire off the pseudo characters of attributes, as they currently
+     * exist. This method should be called everytime an attribute is added,
+     * or when an attribute value is changed, or an element is created.
+     */
+
+    protected void firePseudoAttributes()
+    {
+        if (m_tracer != null)
+        {
+            try
+            {
+                // flush out the "<elemName" if not already flushed
+                m_writer.flush();
+                
+                // make a StringBuffer to write the name="value" pairs to.
+                StringBuffer sb = new StringBuffer();
+                int nAttrs = m_attributes.getLength();
+                if (nAttrs > 0)
+                {
+                    // make a writer that internally appends to the same
+                    // StringBuffer
+                    java.io.Writer writer =
+                        new ToStream.WritertoStringBuffer(sb);
+
+                    processAttributes(writer, nAttrs);
+                    // Don't clear the attributes! 
+                    // We only want to see what would be written out
+                    // at this point, we don't want to loose them.
+                }
+                sb.append('>');  // the potential > after the attributes.
+                // convert the StringBuffer to a char array and
+                // emit the trace event that these characters "might"
+                // be written                
+                char ch[] = sb.toString().toCharArray();
+                m_tracer.fireGenerateEvent(
+                    SerializerTrace.EVENTTYPE_OUTPUT_PSEUDO_CHARACTERS,
+                    ch,
+                    0,
+                    ch.length);                
+            }
+            catch (IOException ioe)
+            {
+                // ignore ?
+            }
+            catch (SAXException se)
+            {
+                // ignore ?
+            }
+        }
+    }
+
+    /**
+     * This inner class is used only to collect attribute values
+     * written by the method writeAttrString() into a string buffer.
+     * In this manner trace events, and the real writing of attributes will use
+     * the same code.
+     */
+    private class WritertoStringBuffer extends java.io.Writer
+    {
+        final private StringBuffer m_stringbuf;
+        /**
+         * @see java.io.Writer#write(char[], int, int)
+         */
+        WritertoStringBuffer(StringBuffer sb)
+        {
+            m_stringbuf = sb;
+        }
+
+        public void write(char[] arg0, int arg1, int arg2) throws IOException
+        {
+            m_stringbuf.append(arg0, arg1, arg2);
+        }
+        /**
+         * @see java.io.Writer#flush()
+         */
+        public void flush() throws IOException
+        {
+        }
+        /**
+         * @see java.io.Writer#close()
+         */
+        public void close() throws IOException
+        {
+        }
+
+        public void write(int i)
+        {
+            m_stringbuf.append((char) i);
+        }
+        
+        public void write(String s)
+        {
+            m_stringbuf.append(s);
+        }
+    }
+
+    /**
+     * @see SerializationHandler#setTransformer(Transformer)
+     */
+    public void setTransformer(Transformer transformer) {
+        super.setTransformer(transformer);
+        if (m_tracer != null
+         && !(m_writer instanceof SerializerTraceWriter)  )
+            m_writer = new SerializerTraceWriter(m_writer, m_tracer);        
+        
+        
+    }
+    /**
+     * Try's to reset the super class and reset this class for 
+     * re-use, so that you don't need to create a new serializer 
+     * (mostly for performance reasons).
+     * 
+     * @return true if the class was successfuly reset.
+     */
+    public boolean reset()
+    {
+        boolean wasReset = false;
+        if (super.reset())
+        {
+            resetToStream();
+            wasReset = true;
+        }
+        return wasReset;
+    }
+    
+    /**
+     * Reset all of the fields owned by ToStream class
+     *
+     */
+    private void resetToStream()
+    {
+         this.m_cdataStartCalled = false;
+         /* The stream is being reset. It is one of
+          * ToXMLStream, ToHTMLStream ... and this type can't be changed
+          * so neither should m_charInfo which is associated with the
+          * type of Stream. Just leave m_charInfo as-is for the next re-use.
+          * 
+          */
+         // this.m_charInfo = null; // don't set to null 
+
+         this.m_disableOutputEscapingStates.clear();
+         
+         this.m_escaping = true;
+         // Leave m_format alone for now - Brian M.
+         // this.m_format = null;
+         this.m_inDoctype = false;
+         this.m_ispreserve = false;
+         this.m_ispreserve = false;
+         this.m_isprevtext = false;
+         this.m_isUTF8 = false; //  ?? used anywhere ??
+         this.m_preserves.clear();
+         this.m_shouldFlush = true;
+         this.m_spaceBeforeClose = false;
+         this.m_startNewLine = false;
+         this.m_lineSepUse = true;
+         // DON'T SET THE WRITER TO NULL, IT MAY BE REUSED !!
+         // this.m_writer = null;  
+         this.m_expandDTDEntities = true;      
+ 
+    }        
+    
+    /**
+      * Sets the character encoding coming from the xsl:output encoding stylesheet attribute.
+      * @param encoding the character encoding
+      */
+     public void setEncoding(String encoding)
+     {
+         String old = getEncoding();
+         super.setEncoding(encoding); 
+         if (old == null || !old.equals(encoding)) {        
+            // If we have changed the setting of the 
+            m_encodingInfo = Encodings.getEncodingInfo(encoding);
+            
+            if (encoding != null && m_encodingInfo.name == null) {
+            	// We tried to get an EncodingInfo for Object for the given
+            	// encoding, but it came back with an internall null name
+            	// so the encoding is not supported by the JDK, issue a message.
+            	String msg = Utils.messages.createMessage(
+            			MsgKey.ER_ENCODING_NOT_SUPPORTED,new Object[]{ encoding });
+            	try 
+            	{
+            		// Prepare to issue the warning message
+            		Transformer tran = super.getTransformer();
+            		if (tran != null) {
+            			ErrorListener errHandler = tran.getErrorListener();
+            			// Issue the warning message
+            			if (null != errHandler && m_sourceLocator != null)
+            				errHandler.warning(new TransformerException(msg, m_sourceLocator));
+            			else
+            				System.out.println(msg);
+            	    }
+            		else
+            			System.out.println(msg);
+            	}
+            	catch (Exception e){}
+            }
+         }
+         return;
+     }
+     
+    /**
+     * Simple stack for boolean values.
+     * 
+     * This class is a copy of the one in org.apache.xml.utils. 
+     * It exists to cut the serializers dependancy on that package.
+     * A minor changes from that package are:
+     * doesn't implement Clonable
+     *  
+     * @xsl.usage internal
+     */
+    static final class BoolStack
+    {
+
+      /** Array of boolean values          */
+      private boolean m_values[];
+
+      /** Array size allocated           */
+      private int m_allocatedSize;
+
+      /** Index into the array of booleans          */
+      private int m_index;
+
+      /**
+       * Default constructor.  Note that the default
+       * block size is very small, for small lists.
+       */
+      public BoolStack()
+      {
+        this(32);
+      }
+
+      /**
+       * Construct a IntVector, using the given block size.
+       *
+       * @param size array size to allocate
+       */
+      public BoolStack(int size)
+      {
+
+        m_allocatedSize = size;
+        m_values = new boolean[size];
+        m_index = -1;
+      }
+
+      /**
+       * Get the length of the list.
+       *
+       * @return Current length of the list
+       */
+      public final int size()
+      {
+        return m_index + 1;
+      }
+
+      /**
+       * Clears the stack.
+       *
+       */
+      public final void clear()
+      {
+        m_index = -1;
+      }
+
+      /**
+       * Pushes an item onto the top of this stack.
+       *
+       *
+       * @param val the boolean to be pushed onto this stack.
+       * @return  the <code>item</code> argument.
+       */
+      public final boolean push(boolean val)
+      {
+
+        if (m_index == m_allocatedSize - 1)
+          grow();
+
+        return (m_values[++m_index] = val);
+      }
+
+      /**
+       * Removes the object at the top of this stack and returns that
+       * object as the value of this function.
+       *
+       * @return     The object at the top of this stack.
+       * @throws  EmptyStackException  if this stack is empty.
+       */
+      public final boolean pop()
+      {
+        return m_values[m_index--];
+      }
+
+      /**
+       * Removes the object at the top of this stack and returns the
+       * next object at the top as the value of this function.
+       *
+       *
+       * @return Next object to the top or false if none there
+       */
+      public final boolean popAndTop()
+      {
+
+        m_index--;
+
+        return (m_index >= 0) ? m_values[m_index] : false;
+      }
+
+      /**
+       * Set the item at the top of this stack  
+       *
+       *
+       * @param b Object to set at the top of this stack
+       */
+      public final void setTop(boolean b)
+      {
+        m_values[m_index] = b;
+      }
+
+      /**
+       * Looks at the object at the top of this stack without removing it
+       * from the stack.
+       *
+       * @return     the object at the top of this stack.
+       * @throws  EmptyStackException  if this stack is empty.
+       */
+      public final boolean peek()
+      {
+        return m_values[m_index];
+      }
+
+      /**
+       * Looks at the object at the top of this stack without removing it
+       * from the stack.  If the stack is empty, it returns false.
+       *
+       * @return     the object at the top of this stack.
+       */
+      public final boolean peekOrFalse()
+      {
+        return (m_index > -1) ? m_values[m_index] : false;
+      }
+
+      /**
+       * Looks at the object at the top of this stack without removing it
+       * from the stack.  If the stack is empty, it returns true.
+       *
+       * @return     the object at the top of this stack.
+       */
+      public final boolean peekOrTrue()
+      {
+        return (m_index > -1) ? m_values[m_index] : true;
+      }
+
+      /**
+       * Tests if this stack is empty.
+       *
+       * @return  <code>true</code> if this stack is empty;
+       *          <code>false</code> otherwise.
+       */
+      public boolean isEmpty()
+      {
+        return (m_index == -1);
+      }
+
+      /**
+       * Grows the size of the stack
+       *
+       */
+      private void grow()
+      {
+
+        m_allocatedSize *= 2;
+
+        boolean newVector[] = new boolean[m_allocatedSize];
+
+        System.arraycopy(m_values, 0, newVector, 0, m_index + 1);
+
+        m_values = newVector;
+      }
+    }
+    
+    // Implement DTDHandler
+    /**
+     * If this method is called, the serializer is used as a
+     * DTDHandler, which changes behavior how the serializer 
+     * handles document entities. 
+     * @see org.xml.sax.DTDHandler#notationDecl(java.lang.String, java.lang.String, java.lang.String)
+     */
+    public void notationDecl(String name, String pubID, String sysID) throws SAXException {
+        // TODO Auto-generated method stub
+        try {
+            DTDprolog();
+            
+            m_writer.write("<!NOTATION ");            
+            m_writer.write(name);
+            if (pubID != null) {
+                m_writer.write(" PUBLIC \"");
+                m_writer.write(pubID);
+  
+            }
+            else {
+                m_writer.write(" SYSTEM \"");
+                m_writer.write(sysID);
+            }
+            m_writer.write("\" >");
+            m_writer.write(m_lineSep, 0, m_lineSepLen);
+        } catch (IOException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+    }
+
+    /**
+     * If this method is called, the serializer is used as a
+     * DTDHandler, which changes behavior how the serializer 
+     * handles document entities. 
+     * @see org.xml.sax.DTDHandler#unparsedEntityDecl(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
+     */
+    public void unparsedEntityDecl(String name, String pubID, String sysID, String notationName) throws SAXException {
+        // TODO Auto-generated method stub
+        try {
+            DTDprolog();       
+            
+            m_writer.write("<!ENTITY ");            
+            m_writer.write(name);
+            if (pubID != null) {
+                m_writer.write(" PUBLIC \"");
+                m_writer.write(pubID);
+  
+            }
+            else {
+                m_writer.write(" SYSTEM \"");
+                m_writer.write(sysID);
+            }
+            m_writer.write("\" NDATA ");
+            m_writer.write(notationName);
+            m_writer.write(" >");
+            m_writer.write(m_lineSep, 0, m_lineSepLen);
+        } catch (IOException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }        
+    }
+    
+    /**
+     * A private helper method to output the 
+     * @throws SAXException
+     * @throws IOException
+     */
+    private void DTDprolog() throws SAXException, IOException {
+        final java.io.Writer writer = m_writer;
+        if (m_needToOutputDocTypeDecl)
+        {
+            outputDocTypeDecl(m_elemContext.m_elementName, false);
+            m_needToOutputDocTypeDecl = false;
+        }
+        if (m_inDoctype)
+        {
+            writer.write(" [");
+            writer.write(m_lineSep, 0, m_lineSepLen);
+            m_inDoctype = false;
+        }
+    }
+    
+    /**
+     * If set to false the serializer does not expand DTD entities,
+     * but leaves them as is, the default value is true;
+     */
+    public void setDTDEntityExpansion(boolean expand) { 
+        m_expandDTDEntities = expand;     
+    }
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ToTextSAXHandler.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ToTextSAXHandler.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ToTextSAXHandler.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,430 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: ToTextSAXHandler.java,v 1.1.2.1 2007/01/09 18:57:14 alexsmirnov Exp $
+ */
+package org.ajax4jsf.xml.serializer;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.Writer;
+import java.util.Properties;
+
+import org.w3c.dom.Node;
+import org.xml.sax.Attributes;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.Locator;
+import org.xml.sax.SAXException;
+import org.xml.sax.ext.LexicalHandler;
+
+/**
+ * This class converts SAX-like event to SAX events for
+ * xsl:output method "text". 
+ * 
+ * This class is only to be used internally. This class is not a public API.
+ * 
+ * @xsl.usage internal
+ */
+public final class ToTextSAXHandler extends ToSAXHandler 
+{
+    /**
+     * From XSLTC
+     * @see ExtendedContentHandler#endElement(String)
+     */
+    public void endElement(String elemName) throws SAXException
+    {
+        if (m_tracer != null)
+            super.fireEndElem(elemName);
+    }
+
+    /**
+     * @see org.xml.sax.ContentHandler#endElement(String, String, String)
+     */
+    public void endElement(String arg0, String arg1, String arg2)
+        throws SAXException
+    {
+		if (m_tracer != null)
+            super.fireEndElem(arg2);    	
+    }
+
+    public ToTextSAXHandler(ContentHandler hdlr, LexicalHandler lex, String encoding)
+    {
+        super(hdlr, lex, encoding);
+    }
+    
+        /**
+     * From XSLTC
+     */
+    public ToTextSAXHandler(ContentHandler handler, String encoding)
+    {
+        super(handler,encoding);
+    }
+
+    public void comment(char ch[], int start, int length)
+        throws org.xml.sax.SAXException
+    {
+        if (m_tracer != null)
+            super.fireCommentEvent(ch, start, length);
+    }
+
+    public void comment(String data) throws org.xml.sax.SAXException
+    {
+        final int length = data.length();
+        if (length > m_charsBuff.length)
+        {
+            m_charsBuff = new char[length*2 + 1];
+        }
+        data.getChars(0, length, m_charsBuff, 0);
+        comment(m_charsBuff, 0, length);
+    }
+
+    /**
+     * @see Serializer#getOutputFormat()
+     */
+    public Properties getOutputFormat()
+    {
+        return null;
+    }
+
+    /**
+     * @see Serializer#getOutputStream()
+     */
+    public OutputStream getOutputStream()
+    {
+        return null;
+    }
+
+    /**
+     * @see Serializer#getWriter()
+     */
+    public Writer getWriter()
+    {
+        return null;
+    }
+
+    /**
+     * Does nothing because 
+     * the indent attribute is ignored for text output.
+     *
+     */
+    public void indent(int n) throws SAXException
+    {
+    }
+
+    /**
+     * @see Serializer#reset()
+     */
+    public boolean reset()
+    {
+        return false;
+    }
+
+    /**
+     * @see DOMSerializer#serialize(Node)
+     */
+    public void serialize(Node node) throws IOException
+    {
+    }
+
+    /**
+     * @see SerializationHandler#setEscaping(boolean)
+     */
+    public boolean setEscaping(boolean escape)
+    {
+        return false;
+    }
+
+    /**
+     * @see SerializationHandler#setIndent(boolean)
+     */
+    public void setIndent(boolean indent)
+    {
+    }
+
+    /**
+     * @see Serializer#setOutputFormat(Properties)
+     */
+    public void setOutputFormat(Properties format)
+    {
+    }
+
+    /**
+     * @see Serializer#setOutputStream(OutputStream)
+     */
+    public void setOutputStream(OutputStream output)
+    {
+    }
+
+    /**
+     * @see Serializer#setWriter(Writer)
+     */
+    public void setWriter(Writer writer)
+    {
+    }
+
+    /**
+     * @see ExtendedContentHandler#addAttribute(String, String, String, String, String)
+     */
+    public void addAttribute(
+        String uri,
+        String localName,
+        String rawName,
+        String type,
+        String value,
+        boolean XSLAttribute)
+    {
+    }
+
+    /**
+     * @see org.xml.sax.ext.DeclHandler#attributeDecl(String, String, String, String, String)
+     */
+    public void attributeDecl(
+        String arg0,
+        String arg1,
+        String arg2,
+        String arg3,
+        String arg4)
+        throws SAXException
+    {
+    }
+
+    /**
+     * @see org.xml.sax.ext.DeclHandler#elementDecl(String, String)
+     */
+    public void elementDecl(String arg0, String arg1) throws SAXException
+    {
+    }
+
+    /**
+     * @see org.xml.sax.ext.DeclHandler#externalEntityDecl(String, String, String)
+     */
+    public void externalEntityDecl(String arg0, String arg1, String arg2)
+        throws SAXException
+    {
+    }
+
+    /**
+     * @see org.xml.sax.ext.DeclHandler#internalEntityDecl(String, String)
+     */
+    public void internalEntityDecl(String arg0, String arg1)
+        throws SAXException
+    {
+    }
+
+    /**
+     * @see org.xml.sax.ContentHandler#endPrefixMapping(String)
+     */
+    public void endPrefixMapping(String arg0) throws SAXException
+    {
+    }
+
+    /**
+     * @see org.xml.sax.ContentHandler#ignorableWhitespace(char[], int, int)
+     */
+    public void ignorableWhitespace(char[] arg0, int arg1, int arg2)
+        throws SAXException
+    {
+    }
+
+    /**
+     * From XSLTC
+     * @see org.xml.sax.ContentHandler#processingInstruction(String, String)
+     */
+    public void processingInstruction(String arg0, String arg1)
+        throws SAXException
+    {
+        if (m_tracer != null)
+            super.fireEscapingEvent(arg0, arg1);
+    }
+
+    /**
+     * @see org.xml.sax.ContentHandler#setDocumentLocator(Locator)
+     */
+    public void setDocumentLocator(Locator arg0)
+    {
+    }
+
+    /**
+     * @see org.xml.sax.ContentHandler#skippedEntity(String)
+     */
+    public void skippedEntity(String arg0) throws SAXException
+    {
+    }
+
+    /**
+     * @see org.xml.sax.ContentHandler#startElement(String, String, String, Attributes)
+     */
+    public void startElement(
+        String arg0,
+        String arg1,
+        String arg2,
+        Attributes arg3)
+        throws SAXException
+    {
+        flushPending();
+        super.startElement(arg0, arg1, arg2, arg3);
+    }
+
+    /**
+     * @see org.xml.sax.ext.LexicalHandler#endCDATA()
+     */
+    public void endCDATA() throws SAXException
+    {
+    }
+
+    /**
+     * @see org.xml.sax.ext.LexicalHandler#endDTD()
+     */
+    public void endDTD() throws SAXException
+    {
+    }
+
+    /**
+     * @see org.xml.sax.ext.LexicalHandler#startCDATA()
+     */
+    public void startCDATA() throws SAXException
+    {
+    }
+
+
+    /**
+     * @see org.xml.sax.ext.LexicalHandler#startEntity(String)
+     */
+    public void startEntity(String arg0) throws SAXException
+    {
+    }
+
+
+    /**
+     * From XSLTC
+     * @see ExtendedContentHandler#startElement(String)
+     */
+    public void startElement(
+    String elementNamespaceURI,
+    String elementLocalName,
+    String elementName) throws SAXException
+    {
+        super.startElement(elementNamespaceURI, elementLocalName, elementName);
+    }
+    
+    public void startElement(
+    String elementName) throws SAXException
+    {
+        super.startElement(elementName);
+    }
+    
+
+    /**
+     * From XSLTC
+     * @see org.xml.sax.ContentHandler#endDocument()
+     */
+    public void endDocument() throws SAXException { 
+        
+        flushPending();
+        m_saxHandler.endDocument();
+		
+        if (m_tracer != null)
+            super.fireEndDoc();
+    }
+ 
+    /**
+	 *	
+     * @see ExtendedContentHandler#characters(String)
+     */
+    public void characters(String characters) 
+    throws SAXException 
+    { 
+        final int length = characters.length();
+        if (length > m_charsBuff.length)
+        {
+            m_charsBuff = new char[length*2 + 1];
+        }
+        characters.getChars(0, length, m_charsBuff, 0);
+   
+        m_saxHandler.characters(m_charsBuff, 0, length);
+    
+    }
+    /**
+	 * @see org.xml.sax.ContentHandler#characters(char[], int, int)
+     */
+    public void characters(char[] characters, int offset, int length)
+    throws SAXException 
+    { 
+    
+        m_saxHandler.characters(characters, offset, length);
+
+        // time to fire off characters event
+		if (m_tracer != null)
+            super.fireCharEvent(characters, offset, length);                
+    }
+
+    /**
+     * From XSLTC
+     */
+    public void addAttribute(String name, String value) 
+    {
+        // do nothing
+    }
+
+
+    public boolean startPrefixMapping(
+        String prefix,
+        String uri,
+        boolean shouldFlush)
+        throws SAXException
+    {
+        // no namespace support for HTML
+        return false;
+    }
+
+
+    public void startPrefixMapping(String prefix, String uri)
+        throws org.xml.sax.SAXException
+    {
+        // no namespace support for HTML
+    }
+
+
+    public void namespaceAfterStartElement(
+        final String prefix,
+        final String uri)
+        throws SAXException
+    {
+        // no namespace support for HTML
+    }
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ToTextStream.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ToTextStream.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ToTextStream.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,653 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: ToTextStream.java,v 1.1.2.1 2007/01/09 18:57:30 alexsmirnov Exp $
+ */
+package org.ajax4jsf.xml.serializer;
+
+import java.io.IOException;
+
+import org.ajax4jsf.xml.serializer.utils.MsgKey;
+import org.ajax4jsf.xml.serializer.utils.Utils;
+import org.xml.sax.Attributes;
+import org.xml.sax.SAXException;
+
+/**
+ * This class is not a public API.
+ * It is only public because it is used in other packages. 
+ * This class converts SAX or SAX-like calls to a 
+ * serialized document for xsl:output method of "text".
+ * @xsl.usage internal
+ */
+public final class ToTextStream extends ToStream 
+{ 
+
+       
+  /**
+   * Default constructor.
+   */
+  public ToTextStream()
+  {
+    super();
+  }
+
+ 
+ 
+  /**
+   * Receive notification of the beginning of a document.
+   *
+   * <p>The SAX parser will invoke this method only once, before any
+   * other methods in this interface or in DTDHandler (except for
+   * setDocumentLocator).</p>
+   *
+   * @throws org.xml.sax.SAXException Any SAX exception, possibly
+   *            wrapping another exception.
+   *
+   * @throws org.xml.sax.SAXException
+   */
+  protected void startDocumentInternal() throws org.xml.sax.SAXException
+  {
+    super.startDocumentInternal();
+
+    m_needToCallStartDocument = false;
+
+    // No action for the moment.
+  }
+
+  /**
+   * Receive notification of the end of a document.
+   *
+   * <p>The SAX parser will invoke this method only once, and it will
+   * be the last method invoked during the parse.  The parser shall
+   * not invoke this method until it has either abandoned parsing
+   * (because of an unrecoverable error) or reached the end of
+   * input.</p>
+   *
+   * @throws org.xml.sax.SAXException Any SAX exception, possibly
+   *            wrapping another exception.
+   *
+   * @throws org.xml.sax.SAXException
+   */
+  public void endDocument() throws org.xml.sax.SAXException
+  {
+    flushPending();
+    flushWriter();
+    if (m_tracer != null)
+        super.fireEndDoc();
+  }
+
+  /**
+   * Receive notification of the beginning of an element.
+   *
+   * <p>The Parser will invoke this method at the beginning of every
+   * element in the XML document; there will be a corresponding
+   * endElement() event for every startElement() event (even when the
+   * element is empty). All of the element's content will be
+   * reported, in order, before the corresponding endElement()
+   * event.</p>
+   *
+   * <p>If the element name has a namespace prefix, the prefix will
+   * still be attached.  Note that the attribute list provided will
+   * contain only attributes with explicit values (specified or
+   * defaulted): #IMPLIED attributes will be omitted.</p>
+   *
+   *
+   * @param namespaceURI The Namespace URI, or the empty string if the
+   *        element has no Namespace URI or if Namespace
+   *        processing is not being performed.
+   * @param localName The local name (without prefix), or the
+   *        empty string if Namespace processing is not being
+   *        performed.
+   * @param name The qualified name (with prefix), or the
+   *        empty string if qualified names are not available.
+   * @param atts The attributes attached to the element, if any.
+   * @throws org.xml.sax.SAXException Any SAX exception, possibly
+   *            wrapping another exception.
+   * @see #endElement
+   * @see org.xml.sax.AttributeList
+   *
+   * @throws org.xml.sax.SAXException
+   */
+  public void startElement(
+          String namespaceURI, String localName, String name, Attributes atts)
+            throws org.xml.sax.SAXException
+  {
+    // time to fire off startElement event
+    if (m_tracer != null) {
+        super.fireStartElem(name);
+        this.firePseudoAttributes();
+    }
+    return;
+  }
+
+  /**
+   * Receive notification of the end of an element.
+   *
+   * <p>The SAX parser will invoke this method at the end of every
+   * element in the XML document; there will be a corresponding
+   * startElement() event for every endElement() event (even when the
+   * element is empty).</p>
+   *
+   * <p>If the element name has a namespace prefix, the prefix will
+   * still be attached to the name.</p>
+   *
+   *
+   * @param namespaceURI The Namespace URI, or the empty string if the
+   *        element has no Namespace URI or if Namespace
+   *        processing is not being performed.
+   * @param localName The local name (without prefix), or the
+   *        empty string if Namespace processing is not being
+   *        performed.
+   * @param name The qualified name (with prefix), or the
+   *        empty string if qualified names are not available.
+   * @throws org.xml.sax.SAXException Any SAX exception, possibly
+   *            wrapping another exception.
+   *
+   * @throws org.xml.sax.SAXException
+   */
+  public void endElement(String namespaceURI, String localName, String name)
+          throws org.xml.sax.SAXException
+  {
+        if (m_tracer != null)
+            super.fireEndElem(name);           
+  }
+
+  /**
+   * Receive notification of character data.
+   *
+   * <p>The Parser will call this method to report each chunk of
+   * character data.  SAX parsers may return all contiguous character
+   * data in a single chunk, or they may split it into several
+   * chunks; however, all of the characters in any single event
+   * must come from the same external entity, so that the Locator
+   * provides useful information.</p>
+   *
+   * <p>The application must not attempt to read from the array
+   * outside of the specified range.</p>
+   *
+   * <p>Note that some parsers will report whitespace using the
+   * ignorableWhitespace() method rather than this one (validating
+   * parsers must do so).</p>
+   *
+   * @param ch The characters from the XML document.
+   * @param start The start position in the array.
+   * @param length The number of characters to read from the array.
+   * @throws org.xml.sax.SAXException Any SAX exception, possibly
+   *            wrapping another exception.
+   * @see #ignorableWhitespace
+   * @see org.xml.sax.Locator
+   */
+  public void characters(char ch[], int start, int length)
+          throws org.xml.sax.SAXException
+  {
+
+    flushPending();    
+    
+    try
+    {
+        if (inTemporaryOutputState()) {
+            /* leave characters un-processed as we are
+             * creating temporary output, the output generated by
+             * this serializer will be input to a final serializer 
+             * later on and it will do the processing in final
+             * output state (not temporary output state).
+             * 
+             * A "temporary" ToTextStream serializer is used to
+             * evaluate attribute value templates (for example),
+             * and the result of evaluating such a thing
+             * is fed into a final serializer later on.
+             */
+            m_writer.write(ch, start, length);
+        }
+        else {
+            // In final output state we do process the characters!
+            writeNormalizedChars(ch, start, length, m_lineSepUse);
+        }
+            
+        if (m_tracer != null)
+            super.fireCharEvent(ch, start, length);      
+    }
+    catch(IOException ioe)
+    {
+      throw new SAXException(ioe);
+    }
+  }
+
+  /**
+   * If available, when the disable-output-escaping attribute is used,
+   * output raw text without escaping.
+   *
+   * @param ch The characters from the XML document.
+   * @param start The start position in the array.
+   * @param length The number of characters to read from the array.
+   *
+   * @throws org.xml.sax.SAXException Any SAX exception, possibly
+   *            wrapping another exception.
+   */
+  public void charactersRaw(char ch[], int start, int length)
+          throws org.xml.sax.SAXException
+  {
+
+    try
+    {
+      writeNormalizedChars(ch, start, length, m_lineSepUse);
+    }
+    catch(IOException ioe)
+    {
+      throw new SAXException(ioe);
+    }
+  }
+  
+    /**
+     * Normalize the characters, but don't escape.  Different from 
+     * SerializerToXML#writeNormalizedChars because it does not attempt to do 
+     * XML escaping at all.
+     *
+     * @param ch The characters from the XML document.
+     * @param start The start position in the array.
+     * @param length The number of characters to read from the array.
+     * @param useLineSep true if the operating systems 
+     * end-of-line separator should be output rather than a new-line character.
+     * 
+     * @throws IOException
+     * @throws org.xml.sax.SAXException
+     */
+    void writeNormalizedChars(
+        final char ch[],
+            final int start,
+            final int length,
+            final boolean useLineSep)
+            throws IOException, org.xml.sax.SAXException 
+    {
+        final String encoding = getEncoding();
+        final java.io.Writer writer = m_writer;
+        final int end = start + length;
+
+        /* copy a few "constants" before the loop for performance */
+        final char S_LINEFEED = CharInfo.S_LINEFEED;
+
+        // This for() loop always increments i by one at the end
+        // of the loop.  Additional increments of i adjust for when
+        // two input characters (a high/low UTF16 surrogate pair)
+        // are processed.
+        for (int i = start; i < end; i++) {
+            final char c = ch[i];
+
+            if (S_LINEFEED == c && useLineSep) {
+                writer.write(m_lineSep, 0, m_lineSepLen);
+                // one input char processed
+            } else if (m_encodingInfo.isInEncoding(c)) {
+                writer.write(c);
+                // one input char processed    
+            } else if (Encodings.isHighUTF16Surrogate(c)) {
+                final int codePoint = writeUTF16Surrogate(c, ch, i, end);
+                if (codePoint != 0) {
+                    // I think we can just emit the message,
+                    // not crash and burn.
+                    final String integralValue = Integer.toString(codePoint);
+                    final String msg = Utils.messages.createMessage(
+                        MsgKey.ER_ILLEGAL_CHARACTER,
+                        new Object[] { integralValue, encoding });
+                      
+                    //Older behavior was to throw the message,
+                    //but newer gentler behavior is to write a message to System.err
+                    //throw new SAXException(msg);
+                    System.err.println(msg);                            
+
+                }
+                i++; // two input chars processed               
+            } else {
+                // Don't know what to do with this char, it is
+                // not in the encoding and not a high char in
+                // a surrogate pair, so write out as an entity ref
+                if (encoding != null) {
+                    /* The output encoding is known, 
+                     * so somthing is wrong.
+                     */
+
+                    // not in the encoding, so write out a character reference
+                    writer.write('&');
+                    writer.write('#');
+                    writer.write(Integer.toString(c));
+                    writer.write(';');
+
+                    // I think we can just emit the message,
+                    // not crash and burn.
+                    final String integralValue = Integer.toString(c);
+                    final String msg = Utils.messages.createMessage(
+                        MsgKey.ER_ILLEGAL_CHARACTER,
+                        new Object[] { integralValue, encoding });
+                      
+                    //Older behavior was to throw the message,
+                    //but newer gentler behavior is to write a message to System.err
+                    //throw new SAXException(msg);
+                    System.err.println(msg); 
+                } else {
+                    /* The output encoding is not known,
+                     * so just write it out as-is.
+                     */
+                    writer.write(c);
+                }
+
+                // one input char was processed
+            }
+        }
+    }
+
+  /**
+   * Receive notification of cdata.
+   *
+   * <p>The Parser will call this method to report each chunk of
+   * character data.  SAX parsers may return all contiguous character
+   * data in a single chunk, or they may split it into several
+   * chunks; however, all of the characters in any single event
+   * must come from the same external entity, so that the Locator
+   * provides useful information.</p>
+   *
+   * <p>The application must not attempt to read from the array
+   * outside of the specified range.</p>
+   *
+   * <p>Note that some parsers will report whitespace using the
+   * ignorableWhitespace() method rather than this one (validating
+   * parsers must do so).</p>
+   *
+   * @param ch The characters from the XML document.
+   * @param start The start position in the array.
+   * @param length The number of characters to read from the array.
+   * @throws org.xml.sax.SAXException Any SAX exception, possibly
+   *            wrapping another exception.
+   * @see #ignorableWhitespace
+   * @see org.xml.sax.Locator
+   */
+  public void cdata(char ch[], int start, int length)
+          throws org.xml.sax.SAXException
+  {
+    try
+    {
+        writeNormalizedChars(ch, start, length, m_lineSepUse);
+        if (m_tracer != null)
+            super.fireCDATAEvent(ch, start, length);              
+    }
+    catch(IOException ioe)
+    {
+      throw new SAXException(ioe);
+    }
+  }
+
+  /**
+   * Receive notification of ignorable whitespace in element content.
+   *
+   * <p>Validating Parsers must use this method to report each chunk
+   * of ignorable whitespace (see the W3C XML 1.0 recommendation,
+   * section 2.10): non-validating parsers may also use this method
+   * if they are capable of parsing and using content models.</p>
+   *
+   * <p>SAX parsers may return all contiguous whitespace in a single
+   * chunk, or they may split it into several chunks; however, all of
+   * the characters in any single event must come from the same
+   * external entity, so that the Locator provides useful
+   * information.</p>
+   *
+   * <p>The application must not attempt to read from the array
+   * outside of the specified range.</p>
+   *
+   * @param ch The characters from the XML document.
+   * @param start The start position in the array.
+   * @param length The number of characters to read from the array.
+   * @throws org.xml.sax.SAXException Any SAX exception, possibly
+   *            wrapping another exception.
+   * @see #characters
+   *
+   * @throws org.xml.sax.SAXException
+   */
+  public void ignorableWhitespace(char ch[], int start, int length)
+          throws org.xml.sax.SAXException
+  {
+
+    try
+    {
+      writeNormalizedChars(ch, start, length, m_lineSepUse);
+    }
+    catch(IOException ioe)
+    {
+      throw new SAXException(ioe);
+    }
+  }
+
+  /**
+   * Receive notification of a processing instruction.
+   *
+   * <p>The Parser will invoke this method once for each processing
+   * instruction found: note that processing instructions may occur
+   * before or after the main document element.</p>
+   *
+   * <p>A SAX parser should never report an XML declaration (XML 1.0,
+   * section 2.8) or a text declaration (XML 1.0, section 4.3.1)
+   * using this method.</p>
+   *
+   * @param target The processing instruction target.
+   * @param data The processing instruction data, or null if
+   *        none was supplied.
+   * @throws org.xml.sax.SAXException Any SAX exception, possibly
+   *            wrapping another exception.
+   *
+   * @throws org.xml.sax.SAXException
+   */
+  public void processingInstruction(String target, String data)
+          throws org.xml.sax.SAXException
+  {
+    // flush anything pending first
+    flushPending();  
+    
+    if (m_tracer != null)
+        super.fireEscapingEvent(target, data);  
+  }
+
+  /**
+   * Called when a Comment is to be constructed.
+   * Note that Xalan will normally invoke the other version of this method.
+   * %REVIEW% In fact, is this one ever needed, or was it a mistake?
+   *
+   * @param   data  The comment data.
+   * @throws org.xml.sax.SAXException Any SAX exception, possibly
+   *            wrapping another exception.
+   */
+  public void comment(String data) throws org.xml.sax.SAXException
+  {
+      final int length = data.length();
+      if (length > m_charsBuff.length)
+      {
+          m_charsBuff = new char[length*2 + 1];
+      }
+      data.getChars(0, length, m_charsBuff, 0);
+      comment(m_charsBuff, 0, length);
+  }
+
+  /**
+   * Report an XML comment anywhere in the document.
+   *
+   * This callback will be used for comments inside or outside the
+   * document element, including comments in the external DTD
+   * subset (if read).
+   *
+   * @param ch An array holding the characters in the comment.
+   * @param start The starting position in the array.
+   * @param length The number of characters to use from the array.
+   * @throws org.xml.sax.SAXException The application may raise an exception.
+   */
+  public void comment(char ch[], int start, int length)
+          throws org.xml.sax.SAXException
+  {
+
+    flushPending();
+    if (m_tracer != null)
+        super.fireCommentEvent(ch, start, length);
+  }
+
+  /**
+   * Receive notivication of a entityReference.
+   *
+   * @param name non-null reference to the name of the entity.
+   *
+   * @throws org.xml.sax.SAXException
+   */
+  public void entityReference(String name) throws org.xml.sax.SAXException
+  {
+        if (m_tracer != null)
+            super.fireEntityReference(name);    
+  }
+  
+    /**
+     * @see ExtendedContentHandler#addAttribute(String, String, String, String, String)
+     */
+    public void addAttribute(
+        String uri,
+        String localName,
+        String rawName,
+        String type,
+        String value,
+        boolean XSLAttribute)
+    {
+        // do nothing, just forget all about the attribute
+    }
+ 
+    /**
+     * @see org.xml.sax.ext.LexicalHandler#endCDATA()
+     */
+    public void endCDATA() throws SAXException
+    {
+        // do nothing
+    }
+
+    /**
+     * @see ExtendedContentHandler#endElement(String)
+     */
+    public void endElement(String elemName) throws SAXException
+    {
+        if (m_tracer != null)
+            super.fireEndElem(elemName);                       
+    }
+ 
+    /**
+     * From XSLTC
+     */
+    public void startElement(
+    String elementNamespaceURI,
+    String elementLocalName,
+    String elementName) 
+    throws SAXException 
+    {
+        if (m_needToCallStartDocument)
+            startDocumentInternal();        
+        // time to fire off startlement event.
+        if (m_tracer != null) {
+            super.fireStartElem(elementName);
+            this.firePseudoAttributes();
+        }
+        
+        return;
+    }
+
+
+    /**
+     * From XSLTC
+     */
+    public void characters(String characters) 
+    throws SAXException 
+    { 
+        final int length = characters.length();
+        if (length > m_charsBuff.length)
+        {
+            m_charsBuff = new char[length*2 + 1];
+        }
+        characters.getChars(0, length, m_charsBuff, 0);
+        characters(m_charsBuff, 0, length); 
+    }
+
+
+    /**
+     * From XSLTC
+     */
+    public void addAttribute(String name, String value)
+    {
+        // do nothing, forget about the attribute
+    }
+    
+    /**
+     * Add a unique attribute
+     */
+    public void addUniqueAttribute(String qName, String value, int flags)
+        throws SAXException
+    {
+        // do nothing, forget about the attribute 
+    }
+
+    public boolean startPrefixMapping(
+        String prefix,
+        String uri,
+        boolean shouldFlush)
+        throws SAXException
+    {
+        // no namespace support for HTML
+        return false;
+    }
+
+
+    public void startPrefixMapping(String prefix, String uri)
+        throws org.xml.sax.SAXException
+    {
+        // no namespace support for HTML
+    }
+
+
+    public void namespaceAfterStartElement(
+        final String prefix,
+        final String uri)
+        throws SAXException
+    {
+        // no namespace support for HTML
+    }    
+
+    public void flushPending() throws org.xml.sax.SAXException
+    {
+            if (m_needToCallStartDocument)
+            {
+                startDocumentInternal();
+                m_needToCallStartDocument = false;
+            }
+    }
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ToUnknownStream.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ToUnknownStream.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ToUnknownStream.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1327 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: ToUnknownStream.java,v 1.1.2.1 2007/01/09 18:57:25 alexsmirnov Exp $
+ */
+package org.ajax4jsf.xml.serializer;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.Writer;
+import java.util.Properties;
+import java.util.Vector;
+
+import javax.xml.transform.SourceLocator;
+import javax.xml.transform.Transformer;
+
+import org.w3c.dom.Node;
+import org.xml.sax.Attributes;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.Locator;
+import org.xml.sax.SAXException;
+
+
+/**
+ *This class wraps another SerializationHandler. The wrapped object will either
+ * handler XML or HTML, which is not known until a little later when the first XML
+ * tag is seen.  If the first tag is <html> then the wrapped object is an HTML
+ * handler, otherwise it is an XML handler.
+ *
+ * This class effectively caches the first few calls to it then passes them
+ * on to the wrapped handler (once it exists).  After that subsequent calls a
+ * simply passed directly to the wrapped handler.
+ *
+ * The user of this class doesn't know if the output is ultimatley XML or HTML.
+ * 
+ * This class is not a public API, it is public because it is used within Xalan.
+ * @xsl.usage internal
+ */
+public final class ToUnknownStream extends SerializerBase
+{
+
+    /**
+     * The wrapped handler, initially XML but possibly switched to HTML
+     */
+    private SerializationHandler m_handler;
+
+    /**
+     * A String with no characters
+     */
+    private static final String EMPTYSTRING = "";
+
+    /**
+     * true if the underlying handler (XML or HTML) is fully initialized
+     */
+    private boolean m_wrapped_handler_not_initialized = false;
+
+
+    /**
+     * the prefix of the very first tag in the document
+     */
+    private String m_firstElementPrefix;
+    /**
+     * the element name (including any prefix) of the very first tag in the document
+     */
+    private String m_firstElementName;
+
+    /**
+     * the namespace URI associated with the first element
+     */
+    private String m_firstElementURI;
+    
+    /**
+     * the local name (no prefix) associated with the first element
+     */
+    private String m_firstElementLocalName = null;
+
+    /**
+     * true if the first tag has been emitted to the wrapped handler
+     */
+    private boolean m_firstTagNotEmitted = true;
+
+    /**
+     * A collection of namespace URI's (only for first element).
+     * _namespacePrefix has the matching prefix for these URI's
+     */
+    private Vector m_namespaceURI = null;
+    /**
+     * A collection of namespace Prefix (only for first element)
+     * _namespaceURI has the matching URIs for these prefix'
+     */
+    private Vector m_namespacePrefix = null;
+
+    /**
+     * true if startDocument() was called before the underlying handler
+     * was initialized
+     */
+    private boolean m_needToCallStartDocument = false;
+    /**
+     * true if setVersion() was called before the underlying handler
+     * was initialized
+     */
+    private boolean m_setVersion_called = false;
+    /**
+     * true if setDoctypeSystem() was called before the underlying handler
+     * was initialized
+     */
+    private boolean m_setDoctypeSystem_called = false;
+    /**
+     * true if setDoctypePublic() was called before the underlying handler
+     * was initialized
+     */
+    private boolean m_setDoctypePublic_called = false;
+    /**
+     * true if setMediaType() was called before the underlying handler
+     * was initialized
+     */
+    private boolean m_setMediaType_called = false;
+
+    /**
+     * Default constructor.
+     * Initially this object wraps an XML Stream object, so _handler is never null.
+     * That may change later to an HTML Stream object.
+     */
+    public ToUnknownStream()
+    {
+        m_handler = new ToXMLStream();
+    }
+
+    /**
+     * @see Serializer#asContentHandler()
+     * @return the wrapped XML or HTML handler
+     */
+    public ContentHandler asContentHandler() throws IOException
+    {
+        /* don't return the real handler ( m_handler ) because
+         * that would expose the real handler to the outside.
+         * Keep m_handler private so it can be internally swapped
+         * to an HTML handler.
+         */
+        return this;
+    }
+
+    /**
+     * @see SerializationHandler#close()
+     */
+    public void close()
+    {
+        m_handler.close();
+    }
+
+    /**
+     * @see Serializer#getOutputFormat()
+     * @return the properties of the underlying handler
+     */
+    public Properties getOutputFormat()
+    {
+        return m_handler.getOutputFormat();
+    }
+
+    /**
+     * @see Serializer#getOutputStream()
+     * @return the OutputStream of the underlying XML or HTML handler
+     */
+    public OutputStream getOutputStream()
+    {
+        return m_handler.getOutputStream();
+    }
+
+    /**
+     * @see Serializer#getWriter()
+     * @return the Writer of the underlying XML or HTML handler
+     */
+    public Writer getWriter()
+    {
+        return m_handler.getWriter();
+    }
+
+    /**
+     * passes the call on to the underlying HTML or XML handler
+     * @see Serializer#reset()
+     * @return ???
+     */
+    public boolean reset()
+    {
+        return m_handler.reset();
+    }
+
+    /**
+     * Converts the DOM node to output
+     * @param node the DOM node to transform to output
+     * @see DOMSerializer#serialize(Node)
+     *
+     */
+    public void serialize(Node node) throws IOException
+    {
+        if (m_firstTagNotEmitted)
+        {
+            flush();
+        }
+        m_handler.serialize(node);
+    }
+
+    /**
+     * @see SerializationHandler#setEscaping(boolean)
+     */
+    public boolean setEscaping(boolean escape) throws SAXException
+    {
+        return m_handler.setEscaping(escape);
+    }
+
+    /**
+     * Set the properties of the handler
+     * @param format the output properties to set
+     * @see Serializer#setOutputFormat(Properties)
+     */
+    public void setOutputFormat(Properties format)
+    {
+        m_handler.setOutputFormat(format);
+    }
+
+    /**
+     * Sets the output stream to write to
+     * @param output the OutputStream to write to
+     * @see Serializer#setOutputStream(OutputStream)
+     */
+    public void setOutputStream(OutputStream output)
+    {
+        m_handler.setOutputStream(output);
+    }
+
+    /**
+     * Sets the writer to write to
+     * @param writer the writer to write to
+     * @see Serializer#setWriter(Writer)
+     */
+    public void setWriter(Writer writer)
+    {
+        m_handler.setWriter(writer);
+    }
+
+    /**
+     * Adds an attribute to the currenly open tag
+     * @param uri the URI of a namespace
+     * @param localName the attribute name, without prefix
+     * @param rawName the attribute name, with prefix (if any)
+     * @param type the type of the attribute, typically "CDATA"
+     * @param value the value of the parameter
+     * @param XSLAttribute true if this attribute is coming from an xsl:attribute element
+     * @see ExtendedContentHandler#addAttribute(String, String, String, String, String)
+     */
+    public void addAttribute(
+        String uri,
+        String localName,
+        String rawName,
+        String type,
+        String value,
+        boolean XSLAttribute)
+        throws SAXException
+    {
+        if (m_firstTagNotEmitted)
+        {
+            flush();
+        }
+        m_handler.addAttribute(uri, localName, rawName, type, value, XSLAttribute);
+    }
+    /**
+     * Adds an attribute to the currenly open tag
+     * @param rawName the attribute name, with prefix (if any)
+     * @param value the value of the parameter
+     * @see ExtendedContentHandler#addAttribute(String, String)
+     */
+    public void addAttribute(String rawName, String value)
+    {
+        if (m_firstTagNotEmitted)
+        {
+            flush();
+        }
+        m_handler.addAttribute(rawName, value);
+ 
+    }
+
+    /**
+     * Adds a unique attribute to the currenly open tag
+     */
+    public void addUniqueAttribute(String rawName, String value, int flags)
+        throws SAXException
+    {
+        if (m_firstTagNotEmitted)
+        {
+            flush();
+        }
+        m_handler.addUniqueAttribute(rawName, value, flags);
+ 
+    }
+
+    /**
+     * Converts the String to a character array and calls the SAX method 
+     * characters(char[],int,int);
+     * 
+     * @see ExtendedContentHandler#characters(String)
+     */
+    public void characters(String chars) throws SAXException
+    {
+        final int length = chars.length();
+        if (length > m_charsBuff.length)
+        {
+            m_charsBuff = new char[length*2 + 1];
+        }
+        chars.getChars(0, length, m_charsBuff, 0);
+        this.characters(m_charsBuff, 0, length);  
+    }    
+
+    /**
+     * Pass the call on to the underlying handler
+     * @see ExtendedContentHandler#endElement(String)
+     */
+    public void endElement(String elementName) throws SAXException
+    {
+        if (m_firstTagNotEmitted)
+        {
+            flush();
+        }
+        m_handler.endElement(elementName);
+    }
+
+
+    /**
+     * @see org.xml.sax.ContentHandler#startPrefixMapping(String, String)
+     * @param prefix The prefix that maps to the URI
+     * @param uri The URI for the namespace
+     */
+    public void startPrefixMapping(String prefix, String uri) throws SAXException
+    {
+        this.startPrefixMapping(prefix,uri, true);
+    }
+
+    /**
+     * This method is used when a prefix/uri namespace mapping
+     * is indicated after the element was started with a
+     * startElement() and before and endElement().
+     * startPrefixMapping(prefix,uri) would be used before the
+     * startElement() call.
+     * @param uri the URI of the namespace
+     * @param prefix the prefix associated with the given URI.
+     *
+     * @see ExtendedContentHandler#namespaceAfterStartElement(String, String)
+     */    
+    public void namespaceAfterStartElement(String prefix, String uri)
+        throws SAXException 
+    {  
+        // hack for XSLTC with finding URI for default namespace
+        if (m_firstTagNotEmitted && m_firstElementURI == null && m_firstElementName != null)
+        {
+            String prefix1 = getPrefixPart(m_firstElementName);
+            if (prefix1 == null && EMPTYSTRING.equals(prefix))
+            {
+                // the elements URI is not known yet, and it
+                // doesn't have a prefix, and we are currently
+                // setting the uri for prefix "", so we have
+                // the uri for the element... lets remember it
+                m_firstElementURI = uri;
+            }
+        }         
+        startPrefixMapping(prefix,uri, false);          
+    }
+    
+    public boolean startPrefixMapping(String prefix, String uri, boolean shouldFlush)
+        throws SAXException
+    {
+        boolean pushed = false;
+        if (m_firstTagNotEmitted)
+        {
+            if (m_firstElementName != null && shouldFlush)
+            {
+                /* we've already seen a startElement, and this is a prefix mapping
+                 * for the up coming element, so flush the old element
+                 * then send this event on its way.
+                 */
+                flush();
+                pushed = m_handler.startPrefixMapping(prefix, uri, shouldFlush);
+            } 
+            else 
+            {           
+                if (m_namespacePrefix == null)
+                {
+                    m_namespacePrefix = new Vector();
+                    m_namespaceURI = new Vector();
+                }
+                m_namespacePrefix.addElement(prefix);
+                m_namespaceURI.addElement(uri);
+            
+                if (m_firstElementURI == null)
+                {
+                    if (prefix.equals(m_firstElementPrefix))
+                        m_firstElementURI = uri;
+                }
+            }
+
+        }
+        else
+        {
+           pushed = m_handler.startPrefixMapping(prefix, uri, shouldFlush);
+        }
+        return pushed;
+    }
+
+    /**
+      * This method cannot be cached because default is different in
+      * HTML and XML (we need more than a boolean).
+      */
+
+    public void setVersion(String version)
+    {
+        m_handler.setVersion(version);
+
+        // Cache call to setVersion()
+        //       super.setVersion(version);
+        m_setVersion_called = true;
+    }
+
+    /**
+     * @see org.xml.sax.ContentHandler#startDocument()
+     */
+    public void startDocument() throws SAXException
+    {
+        m_needToCallStartDocument = true;
+    }
+
+ 
+    
+    public void startElement(String qName) throws SAXException
+    {
+        this.startElement(null, null, qName, null);
+    }
+    
+    public void startElement(String namespaceURI, String localName, String qName) throws SAXException
+    {
+        this.startElement(namespaceURI, localName, qName, null);
+    }
+
+    public void startElement(
+        String namespaceURI,
+        String localName,
+        String elementName,
+        Attributes atts) throws SAXException
+    {
+        /* we are notified of the start of an element */
+        if (m_firstTagNotEmitted)
+        {
+            /* we have not yet sent the first element on its way */
+            if (m_firstElementName != null) 
+            {
+                /* this is not the first element, but a later one.
+                 * But we have the old element pending, so flush it out,
+                 * then send this one on its way. 
+                 */
+                flush();
+                m_handler.startElement(namespaceURI, localName, elementName,  atts);                
+            }
+            else
+            {
+                /* this is the very first element that we have seen, 
+                 * so save it for flushing later.  We may yet get to know its
+                 * URI due to added attributes.
+                 */
+                 
+                m_wrapped_handler_not_initialized = true;
+                m_firstElementName = elementName;
+                
+                // null if not known
+                m_firstElementPrefix = getPrefixPartUnknown(elementName);
+                
+                // null if not known
+                m_firstElementURI = namespaceURI;
+                
+                // null if not known
+                m_firstElementLocalName = localName;
+
+                if (m_tracer != null)
+                    firePseudoElement(elementName);
+                    
+                /* we don't want to call our own addAttributes, which
+                 * merely delegates to the wrapped handler, but we want to
+                 * add these attributes to m_attributes. So me must call super.
+                 * addAttributes() In this case m_attributes is only used for the
+                 * first element, after that this class totally delegates to the
+                 * wrapped handler which is either XML or HTML.
+                 */
+                if (atts != null)   
+                    super.addAttributes(atts);
+                
+                // if there are attributes, then lets make the flush()
+                // call the startElement on the handler and send the
+                // attributes on their way.
+                if (atts != null)   
+                    flush();
+                
+            }
+        }
+        else
+        {
+            // this is not the first element, but a later one, so just
+            // send it on its way.
+            m_handler.startElement(namespaceURI, localName, elementName,  atts);
+        }
+    }
+
+    /**
+     * Pass the call on to the underlying handler
+     * @see ExtendedLexicalHandler#comment(String)
+     */
+    public void comment(String comment) throws SAXException
+    {
+        if (m_firstTagNotEmitted && m_firstElementName != null)
+        {
+            emitFirstTag();
+        }
+        else if (m_needToCallStartDocument)
+        {
+            m_handler.startDocument();
+            m_needToCallStartDocument = false;
+        }
+
+        m_handler.comment(comment);
+    }
+
+    /**
+     * Pass the call on to the underlying handler
+     * @see XSLOutputAttributes#getDoctypePublic()
+     */
+    public String getDoctypePublic()
+    {
+
+        return m_handler.getDoctypePublic();
+    }
+
+    /**
+     * Pass the call on to the underlying handler
+     * @see XSLOutputAttributes#getDoctypeSystem()
+     */
+    public String getDoctypeSystem()
+    {
+        return m_handler.getDoctypeSystem();
+    }
+
+    /**
+     * Pass the call on to the underlying handler
+     * @see XSLOutputAttributes#getEncoding()
+     */
+    public String getEncoding()
+    {
+        return m_handler.getEncoding();
+    }
+
+    /**
+     * Pass the call on to the underlying handler
+     * @see XSLOutputAttributes#getIndent()
+     */
+    public boolean getIndent()
+    {
+        return m_handler.getIndent();
+    }
+
+    /**
+     * Pass the call on to the underlying handler
+     * @see XSLOutputAttributes#getIndentAmount()
+     */
+    public int getIndentAmount()
+    {
+        return m_handler.getIndentAmount();
+    }
+
+    /**
+     * Pass the call on to the underlying handler
+     * @see XSLOutputAttributes#getMediaType()
+     */
+    public String getMediaType()
+    {
+        return m_handler.getMediaType();
+    }
+
+    /**
+     * Pass the call on to the underlying handler
+     * @see XSLOutputAttributes#getOmitXMLDeclaration()
+     */
+    public boolean getOmitXMLDeclaration()
+    {
+        return m_handler.getOmitXMLDeclaration();
+    }
+
+    /**
+     * Pass the call on to the underlying handler
+     * @see XSLOutputAttributes#getStandalone()
+     */
+    public String getStandalone()
+    {
+        return m_handler.getStandalone();
+    }
+
+    /**
+     * Pass the call on to the underlying handler
+     * @see XSLOutputAttributes#getVersion()
+     */
+    public String getVersion()
+    {
+        return m_handler.getVersion();
+    }
+
+    /**
+     * @see XSLOutputAttributes#setDoctype(String, String)
+     */
+    public void setDoctype(String system, String pub)
+    {
+        m_handler.setDoctypePublic(pub);
+        m_handler.setDoctypeSystem(system);
+    }
+
+    /**
+     * Set the doctype in the underlying XML handler. Remember that this method
+     * was called, just in case we need to transfer this doctype to an HTML handler
+     * @param doctype the public doctype to set
+     * @see XSLOutputAttributes#setDoctypePublic(String)
+     */
+    public void setDoctypePublic(String doctype)
+    {
+        m_handler.setDoctypePublic(doctype);
+        m_setDoctypePublic_called = true;
+    }
+
+    /**
+     * Set the doctype in the underlying XML handler. Remember that this method
+     * was called, just in case we need to transfer this doctype to an HTML handler
+     * @param doctype the system doctype to set
+     * @see XSLOutputAttributes#setDoctypeSystem(String)
+     */
+    public void setDoctypeSystem(String doctype)
+    {
+        m_handler.setDoctypeSystem(doctype);
+        m_setDoctypeSystem_called = true;
+    }
+
+    /**
+     * Pass the call on to the underlying handler
+     * @see XSLOutputAttributes#setEncoding(String)
+     */
+    public void setEncoding(String encoding)
+    {
+        m_handler.setEncoding(encoding);
+    }
+
+    /**
+     * Pass the call on to the underlying handler
+     * @see XSLOutputAttributes#setIndent(boolean)
+     */
+    public void setIndent(boolean indent)
+    {
+        m_handler.setIndent(indent);
+    }
+
+    /**
+     * Pass the call on to the underlying handler
+     */
+    public void setIndentAmount(int value)
+    {
+        m_handler.setIndentAmount(value);
+    }
+
+    /**
+     * @see XSLOutputAttributes#setMediaType(String)
+     */
+    public void setMediaType(String mediaType)
+    {
+        m_handler.setMediaType(mediaType);
+        m_setMediaType_called = true;
+    }
+
+    /**
+     * Pass the call on to the underlying handler
+     * @see XSLOutputAttributes#setOmitXMLDeclaration(boolean)
+     */
+    public void setOmitXMLDeclaration(boolean b)
+    {
+        m_handler.setOmitXMLDeclaration(b);
+    }
+
+    /**
+     * Pass the call on to the underlying handler
+     * @see XSLOutputAttributes#setStandalone(String)
+     */
+    public void setStandalone(String standalone)
+    {
+        m_handler.setStandalone(standalone);
+    }
+
+    /**
+     * @see XSLOutputAttributes#setVersion(String)
+     */
+
+    /**
+     * Pass the call on to the underlying handler
+     * @see org.xml.sax.ext.DeclHandler#attributeDecl(String, String, String, String, String)
+     */
+    public void attributeDecl(
+        String arg0,
+        String arg1,
+        String arg2,
+        String arg3,
+        String arg4)
+        throws SAXException
+    {
+        m_handler.attributeDecl(arg0, arg1, arg2, arg3, arg4);
+    }
+
+    /**
+     * Pass the call on to the underlying handler
+     * @see org.xml.sax.ext.DeclHandler#elementDecl(String, String)
+     */
+    public void elementDecl(String arg0, String arg1) throws SAXException
+    {
+        if (m_firstTagNotEmitted)
+        {
+            emitFirstTag();
+        }
+        m_handler.elementDecl(arg0, arg1);
+    }
+
+    /**
+     * Pass the call on to the underlying handler
+     * @see org.xml.sax.ext.DeclHandler#externalEntityDecl(String, String, String)
+     */
+    public void externalEntityDecl(
+        String name,
+        String publicId,
+        String systemId)
+        throws SAXException
+    {
+        if (m_firstTagNotEmitted)
+        {
+            flush();
+        }
+        m_handler.externalEntityDecl(name, publicId, systemId);
+    }
+
+    /**
+     * Pass the call on to the underlying handler
+     * @see org.xml.sax.ext.DeclHandler#internalEntityDecl(String, String)
+     */
+    public void internalEntityDecl(String arg0, String arg1)
+        throws SAXException
+    {
+        if (m_firstTagNotEmitted)
+        {
+            flush();
+        }
+        m_handler.internalEntityDecl(arg0, arg1);
+    }
+
+    /**
+     * Pass the call on to the underlying handler
+     * @see org.xml.sax.ContentHandler#characters(char[], int, int)
+     */
+    public void characters(char[] characters, int offset, int length)
+        throws SAXException
+    {
+        if (m_firstTagNotEmitted)
+        {
+            flush();
+        }
+
+        m_handler.characters(characters, offset, length);
+
+    }
+
+    /**
+     * Pass the call on to the underlying handler
+     * @see org.xml.sax.ContentHandler#endDocument()
+     */
+    public void endDocument() throws SAXException
+    {
+        if (m_firstTagNotEmitted)
+        {
+            flush();
+        }
+
+        m_handler.endDocument();
+        
+    
+    }
+
+    /**
+     * Pass the call on to the underlying handler
+     * @see org.xml.sax.ContentHandler#endElement(String, String, String)
+     */
+    public void endElement(String namespaceURI, String localName, String qName)
+        throws SAXException
+    {
+        if (m_firstTagNotEmitted)
+        {
+            flush();
+            if (namespaceURI == null && m_firstElementURI != null)
+                namespaceURI = m_firstElementURI;
+
+
+            if (localName == null && m_firstElementLocalName != null)
+                localName = m_firstElementLocalName;
+        }
+        
+        m_handler.endElement(namespaceURI, localName, qName);
+    }
+
+    /**
+     * Pass the call on to the underlying handler
+     * @see org.xml.sax.ContentHandler#endPrefixMapping(String)
+     */
+    public void endPrefixMapping(String prefix) throws SAXException
+    {
+        m_handler.endPrefixMapping(prefix);
+    }
+
+    /**
+     * Pass the call on to the underlying handler
+     * @see org.xml.sax.ContentHandler#ignorableWhitespace(char[], int, int)
+     */
+    public void ignorableWhitespace(char[] ch, int start, int length)
+        throws SAXException
+    {
+        if (m_firstTagNotEmitted)
+        {
+            flush();
+        }
+        m_handler.ignorableWhitespace(ch, start, length);
+    }
+
+    /**
+     * Pass the call on to the underlying handler
+     * @see org.xml.sax.ContentHandler#processingInstruction(String, String)
+     */
+    public void processingInstruction(String target, String data)
+        throws SAXException
+    {
+        if (m_firstTagNotEmitted)
+        {
+            flush();
+        }
+
+        m_handler.processingInstruction(target, data);
+    }
+
+    /**
+     * Pass the call on to the underlying handler
+     * @see org.xml.sax.ContentHandler#setDocumentLocator(Locator)
+     */
+    public void setDocumentLocator(Locator locator)
+    {
+        m_handler.setDocumentLocator(locator);
+    }
+
+    /**
+     * Pass the call on to the underlying handler
+     * @see org.xml.sax.ContentHandler#skippedEntity(String)
+     */
+    public void skippedEntity(String name) throws SAXException
+    {
+        m_handler.skippedEntity(name);
+    }
+
+
+
+    /**
+     * Pass the call on to the underlying handler
+     * @see org.xml.sax.ext.LexicalHandler#comment(char[], int, int)
+     */
+    public void comment(char[] ch, int start, int length) throws SAXException
+    {
+        if (m_firstTagNotEmitted)
+        {
+            flush();
+        }
+
+        m_handler.comment(ch, start, length);
+    }
+
+    /**
+     * Pass the call on to the underlying handler
+     * @see org.xml.sax.ext.LexicalHandler#endCDATA()
+     */
+    public void endCDATA() throws SAXException
+    {
+
+        m_handler.endCDATA();
+    }
+
+    /**
+     * Pass the call on to the underlying handler
+     * @see org.xml.sax.ext.LexicalHandler#endDTD()
+     */
+    public void endDTD() throws SAXException
+    {
+
+        m_handler.endDTD();
+    }
+
+    /**
+     * Pass the call on to the underlying handler
+     * @see org.xml.sax.ext.LexicalHandler#endEntity(String)
+     */
+    public void endEntity(String name) throws SAXException
+    {
+        if (m_firstTagNotEmitted)
+        {
+            emitFirstTag();
+        }
+        m_handler.endEntity(name);
+    }
+
+    /**
+     * Pass the call on to the underlying handler
+     * @see org.xml.sax.ext.LexicalHandler#startCDATA()
+     */
+    public void startCDATA() throws SAXException
+    {
+        m_handler.startCDATA();
+    }
+
+    /**
+     * Pass the call on to the underlying handler
+     * @see org.xml.sax.ext.LexicalHandler#startDTD(String, String, String)
+     */
+    public void startDTD(String name, String publicId, String systemId)
+        throws SAXException
+    {
+        m_handler.startDTD(name, publicId, systemId);
+    }
+
+    /**
+     * Pass the call on to the underlying handler
+     * @see org.xml.sax.ext.LexicalHandler#startEntity(String)
+     */
+    public void startEntity(String name) throws SAXException
+    {
+        m_handler.startEntity(name);
+    }
+
+    /**
+     * Initialize the wrapped output stream (XML or HTML).
+     * If the stream handler should be HTML, then replace the XML handler with
+     * an HTML handler. After than send the starting method calls that were cached
+     * to the wrapped handler.
+     *
+     */
+    private void initStreamOutput() throws SAXException
+    {
+
+        // Try to rule out if this is an not to be an HTML document based on prefix
+        boolean firstElementIsHTML = isFirstElemHTML();
+
+        if (firstElementIsHTML)
+        {
+            // create an HTML output handler, and initialize it
+
+            // keep a reference to the old handler, ... it will soon be gone
+            SerializationHandler oldHandler = m_handler;
+
+            /* We have to make sure we get an output properties with the proper
+             * defaults for the HTML method.  The easiest way to do this is to
+             * have the OutputProperties class do it.
+             */
+
+            Properties htmlProperties =
+                OutputPropertiesFactory.getDefaultMethodProperties(Method.HTML);
+            Serializer serializer =
+                SerializerFactory.getSerializer(htmlProperties);
+
+            // The factory should be returning a ToStream
+            // Don't know what to do if it doesn't
+            // i.e. the user has over-ridden the content-handler property
+            // for html
+            m_handler = (SerializationHandler) serializer;
+            //m_handler = new ToHTMLStream();
+
+            Writer writer = oldHandler.getWriter();
+
+            if (null != writer)
+                m_handler.setWriter(writer);
+            else
+            {
+                OutputStream os = oldHandler.getOutputStream();
+
+                if (null != os)
+                    m_handler.setOutputStream(os);
+            }
+
+            // need to copy things from the old handler to the new one here
+
+            //            if (_setVersion_called)
+            //            {
+            m_handler.setVersion(oldHandler.getVersion());
+            //            }
+            //            if (_setDoctypeSystem_called)
+            //            {
+            m_handler.setDoctypeSystem(oldHandler.getDoctypeSystem());
+            //            }
+            //            if (_setDoctypePublic_called)
+            //            {
+            m_handler.setDoctypePublic(oldHandler.getDoctypePublic());
+            //            }
+            //            if (_setMediaType_called)
+            //            {
+            m_handler.setMediaType(oldHandler.getMediaType());
+            //            }
+            
+            m_handler.setTransformer(oldHandler.getTransformer());
+        }
+
+        /* Now that we have a real wrapped handler (XML or HTML) lets
+         * pass any cached calls to it
+         */
+        // Call startDocument() if necessary
+        if (m_needToCallStartDocument)
+        {
+            m_handler.startDocument();
+            m_needToCallStartDocument = false;
+        }
+
+        // the wrapped handler is now fully initialized
+        m_wrapped_handler_not_initialized = false;
+    }
+
+    private void emitFirstTag() throws SAXException
+    {   
+        if (m_firstElementName != null)
+        {
+            if (m_wrapped_handler_not_initialized)
+            {
+                initStreamOutput();
+                m_wrapped_handler_not_initialized = false;
+            }
+            // Output first tag
+            m_handler.startElement(m_firstElementURI, null, m_firstElementName, m_attributes);
+            // don't need the collected attributes of the first element anymore.
+            m_attributes = null;
+
+            // Output namespaces of first tag
+            if (m_namespacePrefix != null)
+            {
+                final int n = m_namespacePrefix.size();
+                for (int i = 0; i < n; i++)
+                {
+                    final String prefix =
+                        (String) m_namespacePrefix.elementAt(i);
+                    final String uri = (String) m_namespaceURI.elementAt(i);
+                    m_handler.startPrefixMapping(prefix, uri, false);
+                }
+                m_namespacePrefix = null;
+                m_namespaceURI = null;
+            }
+            m_firstTagNotEmitted = false;
+        }
+    }
+
+    /**
+     * Utility function for calls to local-name().
+     *
+     * Don't want to override static function on SerializerBase
+     * So added Unknown suffix to method name.
+     */
+    private String getLocalNameUnknown(String value)
+    {
+        int idx = value.lastIndexOf(':');
+        if (idx >= 0)
+            value = value.substring(idx + 1);
+        idx = value.lastIndexOf('@');
+        if (idx >= 0)
+            value = value.substring(idx + 1);
+        return (value);
+    }
+
+    /**
+         * Utility function to return prefix
+         *
+         * Don't want to override static function on SerializerBase
+         * So added Unknown suffix to method name.
+         */
+    private String getPrefixPartUnknown(String qname)
+    {
+        final int index = qname.indexOf(':');
+        return (index > 0) ? qname.substring(0, index) : EMPTYSTRING;
+    }
+
+    /**
+     * Determine if the firts element in the document is <html> or <HTML>
+     * This uses the cached first element name, first element prefix and the
+     * cached namespaces from previous method calls
+     *
+     * @return true if the first element is an opening <html> tag
+     */
+    private boolean isFirstElemHTML()
+    {
+        boolean isHTML;
+
+        // is the first tag html, not considering the prefix ?
+        isHTML =
+            getLocalNameUnknown(m_firstElementName).equalsIgnoreCase("html");
+
+        // Try to rule out if this is not to be an HTML document based on URI
+        if (isHTML
+            && m_firstElementURI != null
+            && !EMPTYSTRING.equals(m_firstElementURI))
+        {
+            // the <html> element has a non-trivial namespace
+            isHTML = false;
+        }
+        // Try to rule out if this is an not to be an HTML document based on prefix
+        if (isHTML && m_namespacePrefix != null)
+        {
+            /* the first element has a name of "html", but lets check the prefix.
+             * If the prefix points to a namespace with a URL that is not ""
+             * then the doecument doesn't start with an <html> tag, and isn't html
+             */
+            final int max = m_namespacePrefix.size();
+            for (int i = 0; i < max; i++)
+            {
+                final String prefix = (String) m_namespacePrefix.elementAt(i);
+                final String uri = (String) m_namespaceURI.elementAt(i);
+
+                if (m_firstElementPrefix != null
+                    && m_firstElementPrefix.equals(prefix)
+                    && !EMPTYSTRING.equals(uri))
+                {
+                    // The first element has a prefix, so it can't be <html>
+                    isHTML = false;
+                    break;
+                }
+            }
+
+        }
+        return isHTML;
+    }
+    /**
+     * @see Serializer#asDOMSerializer()
+     */
+    public DOMSerializer asDOMSerializer() throws IOException
+    {
+        return m_handler.asDOMSerializer();
+    }
+
+    /**
+     * @param URI_and_localNames Vector a list of pairs of URI/localName
+     * specified in the cdata-section-elements attribute.
+     * @see SerializationHandler#setCdataSectionElements(java.util.Vector)
+     */
+    public void setCdataSectionElements(Vector URI_and_localNames)
+    {
+        m_handler.setCdataSectionElements(URI_and_localNames);
+    }
+    /**
+     * @see ExtendedContentHandler#addAttributes(org.xml.sax.Attributes)
+     */
+    public void addAttributes(Attributes atts) throws SAXException
+    {
+        m_handler.addAttributes(atts);
+    }
+
+    /**
+     * Get the current namespace mappings.
+     * Simply returns the mappings of the wrapped handler.
+     * @see ExtendedContentHandler#getNamespaceMappings()
+     */
+    public NamespaceMappings getNamespaceMappings()
+    {
+        NamespaceMappings mappings = null;
+        if (m_handler != null)
+        {
+            mappings = m_handler.getNamespaceMappings();
+        }
+        return mappings;
+    }
+    /**
+     * @see SerializationHandler#flushPending()
+     */
+    public void flushPending() throws SAXException
+    {
+ 
+        flush();
+      
+        m_handler.flushPending();
+    }
+    
+    private void flush()
+    {
+        try
+        {
+        if (m_firstTagNotEmitted)
+        {
+            emitFirstTag();
+        }
+        if (m_needToCallStartDocument)
+        {
+            m_handler.startDocument();
+            m_needToCallStartDocument = false;
+        }
+        }
+        catch(SAXException e)
+        {
+            throw new RuntimeException(e.toString());
+        }
+          
+    
+    }
+
+    /**
+     * @see ExtendedContentHandler#getPrefix
+     */
+    public String getPrefix(String namespaceURI)
+    {
+        return m_handler.getPrefix(namespaceURI);
+    }
+    /**
+     * @see ExtendedContentHandler#entityReference(java.lang.String)
+     */
+    public void entityReference(String entityName) throws SAXException
+    {
+        m_handler.entityReference(entityName);
+    }
+
+    /**
+     * @see ExtendedContentHandler#getNamespaceURI(java.lang.String, boolean)
+     */
+    public String getNamespaceURI(String qname, boolean isElement)
+    {
+        return m_handler.getNamespaceURI(qname, isElement);
+    }
+
+    public String getNamespaceURIFromPrefix(String prefix)
+    {
+        return m_handler.getNamespaceURIFromPrefix(prefix);
+    }
+
+    public void setTransformer(Transformer t)
+    {       
+        m_handler.setTransformer(t);
+        if ((t instanceof SerializerTrace) &&
+            (((SerializerTrace) t).hasTraceListeners())) {
+           m_tracer = (SerializerTrace) t;
+        } else {
+           m_tracer = null;
+        }        
+    }
+    public Transformer getTransformer()
+    {
+        return m_handler.getTransformer();
+    }
+
+    /**
+     * @see SerializationHandler#setContentHandler(org.xml.sax.ContentHandler)
+     */
+    public void setContentHandler(ContentHandler ch)
+    {
+        m_handler.setContentHandler(ch);
+    }
+    /**
+     * This method is used to set the source locator, which might be used to
+     * generated an error message.
+     * @param locator the source locator
+     *
+     * @see ExtendedContentHandler#setSourceLocator(javax.xml.transform.SourceLocator)
+     */    
+    public void setSourceLocator(SourceLocator locator)
+    {
+        m_handler.setSourceLocator(locator);
+    }
+
+    protected void firePseudoElement(String elementName)
+    {
+        
+        if (m_tracer != null) {
+            StringBuffer sb = new StringBuffer();
+                
+            sb.append('<');
+            sb.append(elementName);
+            
+            // convert the StringBuffer to a char array and
+            // emit the trace event that these characters "might"
+            // be written
+            char ch[] = sb.toString().toCharArray();
+            m_tracer.fireGenerateEvent(
+                SerializerTrace.EVENTTYPE_OUTPUT_PSEUDO_CHARACTERS,
+                ch,
+                0,
+                ch.length);
+        }
+    }
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ToXHTMLStream.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ToXHTMLStream.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ToXHTMLStream.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,2363 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: ToXHTMLStream.java,v 1.1.2.1 2007/01/09 18:57:19 alexsmirnov Exp $
+ */
+package org.ajax4jsf.xml.serializer;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.UnsupportedEncodingException;
+import java.util.Properties;
+
+import javax.xml.transform.Result;
+
+import org.ajax4jsf.xml.serializer.utils.MsgKey;
+import org.ajax4jsf.xml.serializer.utils.Utils;
+import org.xml.sax.Attributes;
+import org.xml.sax.SAXException;
+
+/**
+ * This serializer takes a series of SAX or
+ * SAX-like events and writes its output
+ * to the given stream.
+ * 
+ * This class is not a public API, it is public
+ * because it is used from another package.
+ * 
+ * @xsl.usage internal
+ */
+public final class ToXHTMLStream extends ToStream 
+{
+
+    /** This flag is set while receiving events from the DTD */
+    protected boolean m_inDTD = false;
+
+    /** True if the current element is a block element.  (seems like 
+     *  this needs to be a stack. -sb). */
+    private boolean m_inBlockElem = false;
+
+    /**
+     * Map that tells which XML characters should have special treatment, and it
+     *  provides character to entity name lookup.
+     */
+    private static final CharInfo m_htmlcharInfo =
+//        new CharInfo(CharInfo.HTML_ENTITIES_RESOURCE);
+        CharInfo.getCharInfo(CharInfo.HTML_ENTITIES_RESOURCE, Method.HTML);
+
+    /** A digital search trie for fast, case insensitive lookup of ElemDesc objects. */
+    static final Trie m_elementFlags = new Trie();
+
+    static {
+        initTagReference(m_elementFlags);
+    }
+    static void initTagReference(Trie m_elementFlags) {
+
+        // HTML 4.0 loose DTD
+        m_elementFlags.put("BASEFONT", new ElemDesc(0 | ElemDesc.EMPTY));
+        m_elementFlags.put(
+            "FRAME",
+            new ElemDesc(0 | ElemDesc.EMPTY | ElemDesc.BLOCK));
+        m_elementFlags.put("FRAMESET", new ElemDesc(0 | ElemDesc.BLOCK));
+        m_elementFlags.put("NOFRAMES", new ElemDesc(0 | ElemDesc.BLOCK));
+        m_elementFlags.put(
+            "ISINDEX",
+            new ElemDesc(0 | ElemDesc.EMPTY | ElemDesc.BLOCK));
+        m_elementFlags.put(
+            "APPLET",
+            new ElemDesc(0 | ElemDesc.WHITESPACESENSITIVE));
+        m_elementFlags.put("CENTER", new ElemDesc(0 | ElemDesc.BLOCK));
+        m_elementFlags.put("DIR", new ElemDesc(0 | ElemDesc.BLOCK));
+        m_elementFlags.put("MENU", new ElemDesc(0 | ElemDesc.BLOCK));
+
+        // HTML 4.0 strict DTD
+        m_elementFlags.put("TT", new ElemDesc(0 | ElemDesc.FONTSTYLE));
+        m_elementFlags.put("I", new ElemDesc(0 | ElemDesc.FONTSTYLE));
+        m_elementFlags.put("B", new ElemDesc(0 | ElemDesc.FONTSTYLE));
+        m_elementFlags.put("BIG", new ElemDesc(0 | ElemDesc.FONTSTYLE));
+        m_elementFlags.put("SMALL", new ElemDesc(0 | ElemDesc.FONTSTYLE));
+        m_elementFlags.put("EM", new ElemDesc(0 | ElemDesc.PHRASE));
+        m_elementFlags.put("STRONG", new ElemDesc(0 | ElemDesc.PHRASE));
+        m_elementFlags.put("DFN", new ElemDesc(0 | ElemDesc.PHRASE));
+        m_elementFlags.put("CODE", new ElemDesc(0 | ElemDesc.PHRASE));
+        m_elementFlags.put("SAMP", new ElemDesc(0 | ElemDesc.PHRASE));
+        m_elementFlags.put("KBD", new ElemDesc(0 | ElemDesc.PHRASE));
+        m_elementFlags.put("VAR", new ElemDesc(0 | ElemDesc.PHRASE));
+        m_elementFlags.put("CITE", new ElemDesc(0 | ElemDesc.PHRASE));
+        m_elementFlags.put("ABBR", new ElemDesc(0 | ElemDesc.PHRASE));
+        m_elementFlags.put("ACRONYM", new ElemDesc(0 | ElemDesc.PHRASE));
+        m_elementFlags.put(
+            "SUP",
+            new ElemDesc(0 | ElemDesc.SPECIAL | ElemDesc.ASPECIAL));
+        m_elementFlags.put(
+            "SUB",
+            new ElemDesc(0 | ElemDesc.SPECIAL | ElemDesc.ASPECIAL));
+        m_elementFlags.put(
+            "SPAN",
+            new ElemDesc(0 | ElemDesc.SPECIAL | ElemDesc.ASPECIAL));
+        m_elementFlags.put(
+            "BDO",
+            new ElemDesc(0 | ElemDesc.SPECIAL | ElemDesc.ASPECIAL));
+        m_elementFlags.put(
+            "BR",
+            new ElemDesc(
+                0
+                    | ElemDesc.SPECIAL
+                    | ElemDesc.ASPECIAL
+                    | ElemDesc.EMPTY
+                    | ElemDesc.BLOCK));
+        m_elementFlags.put("BODY", new ElemDesc(0 | ElemDesc.BLOCK));
+        m_elementFlags.put(
+            "ADDRESS",
+            new ElemDesc(
+                0
+                    | ElemDesc.BLOCK
+                    | ElemDesc.BLOCKFORM
+                    | ElemDesc.BLOCKFORMFIELDSET));
+        m_elementFlags.put(
+            "DIV",
+            new ElemDesc(
+                0
+                    | ElemDesc.BLOCK
+                    | ElemDesc.BLOCKFORM
+                    | ElemDesc.BLOCKFORMFIELDSET));
+        m_elementFlags.put("A", new ElemDesc(0 | ElemDesc.SPECIAL));
+        m_elementFlags.put(
+            "MAP",
+            new ElemDesc(
+                0 | ElemDesc.SPECIAL | ElemDesc.ASPECIAL | ElemDesc.BLOCK));
+        m_elementFlags.put(
+            "AREA",
+            new ElemDesc(0 | ElemDesc.EMPTY | ElemDesc.BLOCK));
+        m_elementFlags.put(
+            "LINK",
+            new ElemDesc(
+                0 | ElemDesc.HEADMISC | ElemDesc.EMPTY | ElemDesc.BLOCK));
+        m_elementFlags.put(
+            "IMG",
+            new ElemDesc(
+                0
+                    | ElemDesc.SPECIAL
+                    | ElemDesc.ASPECIAL
+                    | ElemDesc.EMPTY
+                    | ElemDesc.WHITESPACESENSITIVE));
+        m_elementFlags.put(
+            "OBJECT",
+            new ElemDesc(
+                0
+                    | ElemDesc.SPECIAL
+                    | ElemDesc.ASPECIAL
+                    | ElemDesc.HEADMISC
+                    | ElemDesc.WHITESPACESENSITIVE));
+        m_elementFlags.put("PARAM", new ElemDesc(0 | ElemDesc.EMPTY));
+        m_elementFlags.put(
+            "HR",
+            new ElemDesc(
+                0
+                    | ElemDesc.BLOCK
+                    | ElemDesc.BLOCKFORM
+                    | ElemDesc.BLOCKFORMFIELDSET
+                    | ElemDesc.EMPTY));
+        m_elementFlags.put(
+            "P",
+            new ElemDesc(
+                0
+                    | ElemDesc.BLOCK
+                    | ElemDesc.BLOCKFORM
+                    | ElemDesc.BLOCKFORMFIELDSET));
+        m_elementFlags.put(
+            "H1",
+            new ElemDesc(0 | ElemDesc.HEAD | ElemDesc.BLOCK));
+        m_elementFlags.put(
+            "H2",
+            new ElemDesc(0 | ElemDesc.HEAD | ElemDesc.BLOCK));
+        m_elementFlags.put(
+            "H3",
+            new ElemDesc(0 | ElemDesc.HEAD | ElemDesc.BLOCK));
+        m_elementFlags.put(
+            "H4",
+            new ElemDesc(0 | ElemDesc.HEAD | ElemDesc.BLOCK));
+        m_elementFlags.put(
+            "H5",
+            new ElemDesc(0 | ElemDesc.HEAD | ElemDesc.BLOCK));
+        m_elementFlags.put(
+            "H6",
+            new ElemDesc(0 | ElemDesc.HEAD | ElemDesc.BLOCK));
+        m_elementFlags.put(
+            "PRE",
+            new ElemDesc(0 | ElemDesc.PREFORMATTED | ElemDesc.BLOCK));
+        m_elementFlags.put(
+            "Q",
+            new ElemDesc(0 | ElemDesc.SPECIAL | ElemDesc.ASPECIAL));
+        m_elementFlags.put(
+            "BLOCKQUOTE",
+            new ElemDesc(
+                0
+                    | ElemDesc.BLOCK
+                    | ElemDesc.BLOCKFORM
+                    | ElemDesc.BLOCKFORMFIELDSET));
+        m_elementFlags.put("INS", new ElemDesc(0));
+        m_elementFlags.put("DEL", new ElemDesc(0));
+        m_elementFlags.put(
+            "DL",
+            new ElemDesc(
+                0
+                    | ElemDesc.BLOCK
+                    | ElemDesc.BLOCKFORM
+                    | ElemDesc.BLOCKFORMFIELDSET));
+        m_elementFlags.put("DT", new ElemDesc(0 | ElemDesc.BLOCK));
+        m_elementFlags.put("DD", new ElemDesc(0 | ElemDesc.BLOCK));
+        m_elementFlags.put(
+            "OL",
+            new ElemDesc(0 | ElemDesc.LIST | ElemDesc.BLOCK));
+        m_elementFlags.put(
+            "UL",
+            new ElemDesc(0 | ElemDesc.LIST | ElemDesc.BLOCK));
+        m_elementFlags.put("LI", new ElemDesc(0 | ElemDesc.BLOCK));
+        m_elementFlags.put("FORM", new ElemDesc(0 | ElemDesc.BLOCK));
+        m_elementFlags.put("LABEL", new ElemDesc(0 | ElemDesc.FORMCTRL));
+        m_elementFlags.put(
+            "INPUT",
+            new ElemDesc(
+                0 | ElemDesc.FORMCTRL | ElemDesc.INLINELABEL | ElemDesc.EMPTY));
+        m_elementFlags.put(
+            "SELECT",
+            new ElemDesc(0 | ElemDesc.FORMCTRL | ElemDesc.INLINELABEL));
+        m_elementFlags.put("OPTGROUP", new ElemDesc(0));
+        m_elementFlags.put("OPTION", new ElemDesc(0));
+        m_elementFlags.put(
+            "TEXTAREA",
+            new ElemDesc(0 | ElemDesc.FORMCTRL | ElemDesc.INLINELABEL));
+        m_elementFlags.put(
+            "FIELDSET",
+            new ElemDesc(0 | ElemDesc.BLOCK | ElemDesc.BLOCKFORM));
+        m_elementFlags.put("LEGEND", new ElemDesc(0));
+        m_elementFlags.put(
+            "BUTTON",
+            new ElemDesc(0 | ElemDesc.FORMCTRL | ElemDesc.INLINELABEL));
+        m_elementFlags.put(
+            "TABLE",
+            new ElemDesc(
+                0
+                    | ElemDesc.BLOCK
+                    | ElemDesc.BLOCKFORM
+                    | ElemDesc.BLOCKFORMFIELDSET));
+        m_elementFlags.put("CAPTION", new ElemDesc(0 | ElemDesc.BLOCK));
+        m_elementFlags.put("THEAD", new ElemDesc(0 | ElemDesc.BLOCK));
+        m_elementFlags.put("TFOOT", new ElemDesc(0 | ElemDesc.BLOCK));
+        m_elementFlags.put("TBODY", new ElemDesc(0 | ElemDesc.BLOCK));
+        m_elementFlags.put("COLGROUP", new ElemDesc(0 | ElemDesc.BLOCK));
+        m_elementFlags.put(
+            "COL",
+            new ElemDesc(0 | ElemDesc.EMPTY | ElemDesc.BLOCK));
+        m_elementFlags.put("TR", new ElemDesc(0 | ElemDesc.BLOCK));
+        m_elementFlags.put("TH", new ElemDesc(0));
+        m_elementFlags.put("TD", new ElemDesc(0));
+        m_elementFlags.put(
+            "HEAD",
+            new ElemDesc(0 | ElemDesc.BLOCK | ElemDesc.HEADELEM));
+        m_elementFlags.put("TITLE", new ElemDesc(0 | ElemDesc.BLOCK));
+        m_elementFlags.put(
+            "BASE",
+            new ElemDesc(0 | ElemDesc.EMPTY | ElemDesc.BLOCK));
+        m_elementFlags.put(
+            "META",
+            new ElemDesc(
+                0 | ElemDesc.HEADMISC | ElemDesc.EMPTY | ElemDesc.BLOCK));
+        m_elementFlags.put(
+            "STYLE",
+            new ElemDesc(
+                0 | ElemDesc.HEADMISC | ElemDesc.RAW | ElemDesc.BLOCK));
+        m_elementFlags.put(
+            "SCRIPT",
+            new ElemDesc(
+                0
+                    | ElemDesc.SPECIAL
+                    | ElemDesc.ASPECIAL
+                    | ElemDesc.HEADMISC
+                    | ElemDesc.RAW));
+        m_elementFlags.put(
+            "NOSCRIPT",
+            new ElemDesc(
+                0
+                    | ElemDesc.BLOCK
+                    | ElemDesc.BLOCKFORM
+                    | ElemDesc.BLOCKFORMFIELDSET));
+        m_elementFlags.put("HTML", new ElemDesc(0 | ElemDesc.BLOCK));
+
+        // From "John Ky" <hand at syd.speednet.com.au
+        // Transitional Document Type Definition ()
+        // file:///C:/Documents%20and%20Settings/sboag.BOAG600E/My%20Documents/html/sgml/loosedtd.html#basefont
+        m_elementFlags.put("FONT", new ElemDesc(0 | ElemDesc.FONTSTYLE));
+
+        // file:///C:/Documents%20and%20Settings/sboag.BOAG600E/My%20Documents/html/present/graphics.html#edef-STRIKE
+        m_elementFlags.put("S", new ElemDesc(0 | ElemDesc.FONTSTYLE));
+        m_elementFlags.put("STRIKE", new ElemDesc(0 | ElemDesc.FONTSTYLE));
+
+        // file:///C:/Documents%20and%20Settings/sboag.BOAG600E/My%20Documents/html/present/graphics.html#edef-U
+        m_elementFlags.put("U", new ElemDesc(0 | ElemDesc.FONTSTYLE));
+
+        // From "John Ky" <hand at syd.speednet.com.au
+        m_elementFlags.put("NOBR", new ElemDesc(0 | ElemDesc.FONTSTYLE));
+
+        // HTML 4.0, section 16.5
+        m_elementFlags.put(
+            "IFRAME",
+            new ElemDesc(
+                0
+                    | ElemDesc.BLOCK
+                    | ElemDesc.BLOCKFORM
+                    | ElemDesc.BLOCKFORMFIELDSET));
+                    
+        // Netscape 4 extension
+        m_elementFlags.put(
+            "LAYER",
+            new ElemDesc(
+                0
+                    | ElemDesc.BLOCK
+                    | ElemDesc.BLOCKFORM
+                    | ElemDesc.BLOCKFORMFIELDSET));
+        // Netscape 4 extension                    
+        m_elementFlags.put(
+            "ILAYER",
+            new ElemDesc(
+                0
+                    | ElemDesc.BLOCK
+                    | ElemDesc.BLOCKFORM
+                    | ElemDesc.BLOCKFORMFIELDSET));
+
+
+        // NOW FOR ATTRIBUTE INFORMATION . . .
+        ElemDesc elemDesc;
+
+
+        // ----------------------------------------------
+        elemDesc = (ElemDesc) m_elementFlags.get("A");
+        elemDesc.setAttr("HREF", ElemDesc.ATTRURL);
+        elemDesc.setAttr("NAME", ElemDesc.ATTRURL);
+        
+        // ----------------------------------------------
+        elemDesc = (ElemDesc) m_elementFlags.get("AREA");
+        elemDesc.setAttr("HREF", ElemDesc.ATTRURL);
+        elemDesc.setAttr("NOHREF", ElemDesc.ATTREMPTY);
+
+        // ----------------------------------------------
+        elemDesc = (ElemDesc) m_elementFlags.get("BASE");
+        elemDesc.setAttr("HREF", ElemDesc.ATTRURL);
+
+        // ----------------------------------------------
+        elemDesc = (ElemDesc) m_elementFlags.get("BUTTON");
+        elemDesc.setAttr("DISABLED", ElemDesc.ATTREMPTY);
+
+        // ----------------------------------------------
+        elemDesc = (ElemDesc) m_elementFlags.get("BLOCKQUOTE");
+        elemDesc.setAttr("CITE", ElemDesc.ATTRURL);
+
+        // ----------------------------------------------
+        elemDesc = (ElemDesc) m_elementFlags.get("DEL");
+        elemDesc.setAttr("CITE", ElemDesc.ATTRURL);
+     
+        // ----------------------------------------------
+        elemDesc = (ElemDesc) m_elementFlags.get("DIR");
+        elemDesc.setAttr("COMPACT", ElemDesc.ATTREMPTY);
+           
+        // ----------------------------------------------
+        
+        elemDesc = (ElemDesc) m_elementFlags.get("DIV");
+        elemDesc.setAttr("SRC", ElemDesc.ATTRURL); // Netscape 4 extension
+        elemDesc.setAttr("NOWRAP", ElemDesc.ATTREMPTY); // Internet-Explorer extension
+   
+        // ----------------------------------------------        
+        elemDesc = (ElemDesc) m_elementFlags.get("DL");
+        elemDesc.setAttr("COMPACT", ElemDesc.ATTREMPTY);
+           
+        // ----------------------------------------------
+        elemDesc = (ElemDesc) m_elementFlags.get("FORM");
+        elemDesc.setAttr("ACTION", ElemDesc.ATTRURL);
+
+        // ----------------------------------------------
+        // Attribution to: "Voytenko, Dimitry" <DVoytenko at SECTORBASE.COM>
+        elemDesc = (ElemDesc) m_elementFlags.get("FRAME");
+        elemDesc.setAttr("SRC", ElemDesc.ATTRURL);
+        elemDesc.setAttr("LONGDESC", ElemDesc.ATTRURL);
+        elemDesc.setAttr("NORESIZE",ElemDesc.ATTREMPTY);
+
+        // ----------------------------------------------
+        elemDesc = (ElemDesc) m_elementFlags.get("HEAD");
+        elemDesc.setAttr("PROFILE", ElemDesc.ATTRURL);
+
+        // ----------------------------------------------        
+        elemDesc = (ElemDesc) m_elementFlags.get("HR");
+        elemDesc.setAttr("NOSHADE", ElemDesc.ATTREMPTY);
+        
+        // ----------------------------------------------
+        // HTML 4.0, section 16.5
+        elemDesc = (ElemDesc) m_elementFlags.get("IFRAME");
+        elemDesc.setAttr("SRC", ElemDesc.ATTRURL);
+        elemDesc.setAttr("LONGDESC", ElemDesc.ATTRURL);
+
+        // ----------------------------------------------
+        // Netscape 4 extension
+        elemDesc = (ElemDesc) m_elementFlags.get("ILAYER");
+        elemDesc.setAttr("SRC", ElemDesc.ATTRURL);
+
+        // ----------------------------------------------
+        elemDesc = (ElemDesc) m_elementFlags.get("IMG");
+        elemDesc.setAttr("SRC", ElemDesc.ATTRURL);
+        elemDesc.setAttr("LONGDESC", ElemDesc.ATTRURL);
+        elemDesc.setAttr("USEMAP", ElemDesc.ATTRURL);
+        elemDesc.setAttr("ISMAP", ElemDesc.ATTREMPTY);
+
+        // ----------------------------------------------
+        elemDesc = (ElemDesc) m_elementFlags.get("INPUT");
+        elemDesc.setAttr("SRC", ElemDesc.ATTRURL);
+        elemDesc.setAttr("USEMAP", ElemDesc.ATTRURL);
+        elemDesc.setAttr("CHECKED", ElemDesc.ATTREMPTY);
+        elemDesc.setAttr("DISABLED", ElemDesc.ATTREMPTY);
+        elemDesc.setAttr("ISMAP", ElemDesc.ATTREMPTY);
+        elemDesc.setAttr("READONLY", ElemDesc.ATTREMPTY);
+        
+        // ----------------------------------------------
+        elemDesc = (ElemDesc) m_elementFlags.get("INS");
+        elemDesc.setAttr("CITE", ElemDesc.ATTRURL);
+
+        // ----------------------------------------------
+        // Netscape 4 extension
+        elemDesc = (ElemDesc) m_elementFlags.get("LAYER");
+        elemDesc.setAttr("SRC", ElemDesc.ATTRURL);
+
+        // ----------------------------------------------
+        elemDesc = (ElemDesc) m_elementFlags.get("LINK");
+        elemDesc.setAttr("HREF", ElemDesc.ATTRURL);
+       
+        // ----------------------------------------------       
+        elemDesc = (ElemDesc) m_elementFlags.get("MENU");
+        elemDesc.setAttr("COMPACT", ElemDesc.ATTREMPTY);
+        
+        // ----------------------------------------------
+        elemDesc = (ElemDesc) m_elementFlags.get("OBJECT");
+        elemDesc.setAttr("CLASSID", ElemDesc.ATTRURL);
+        elemDesc.setAttr("CODEBASE", ElemDesc.ATTRURL);
+        elemDesc.setAttr("DATA", ElemDesc.ATTRURL);
+        elemDesc.setAttr("ARCHIVE", ElemDesc.ATTRURL);
+        elemDesc.setAttr("USEMAP", ElemDesc.ATTRURL);
+        elemDesc.setAttr("DECLARE", ElemDesc.ATTREMPTY);
+        
+        // ----------------------------------------------        
+        elemDesc = (ElemDesc) m_elementFlags.get("OL");
+        elemDesc.setAttr("COMPACT", ElemDesc.ATTREMPTY);
+        
+        // ----------------------------------------------
+        elemDesc = (ElemDesc) m_elementFlags.get("OPTGROUP");
+        elemDesc.setAttr("DISABLED", ElemDesc.ATTREMPTY);
+
+        // ----------------------------------------------
+        elemDesc = (ElemDesc) m_elementFlags.get("OPTION");
+        elemDesc.setAttr("SELECTED", ElemDesc.ATTREMPTY);
+        elemDesc.setAttr("DISABLED", ElemDesc.ATTREMPTY);
+        
+        // ----------------------------------------------
+        elemDesc = (ElemDesc) m_elementFlags.get("Q");
+        elemDesc.setAttr("CITE", ElemDesc.ATTRURL);
+
+        // ----------------------------------------------
+        elemDesc = (ElemDesc) m_elementFlags.get("SCRIPT");
+        elemDesc.setAttr("SRC", ElemDesc.ATTRURL);
+        elemDesc.setAttr("FOR", ElemDesc.ATTRURL);
+        elemDesc.setAttr("DEFER", ElemDesc.ATTREMPTY);
+
+        // ----------------------------------------------
+        elemDesc = (ElemDesc) m_elementFlags.get("SELECT");
+        elemDesc.setAttr("DISABLED", ElemDesc.ATTREMPTY);
+        elemDesc.setAttr("MULTIPLE", ElemDesc.ATTREMPTY);
+
+        // ----------------------------------------------
+        elemDesc = (ElemDesc) m_elementFlags.get("TABLE");
+        elemDesc.setAttr("NOWRAP", ElemDesc.ATTREMPTY); // Internet-Explorer extension
+        
+        // ----------------------------------------------        
+        elemDesc = (ElemDesc) m_elementFlags.get("TD");
+        elemDesc.setAttr("NOWRAP", ElemDesc.ATTREMPTY);
+
+        // ----------------------------------------------
+        elemDesc = (ElemDesc) m_elementFlags.get("TEXTAREA");
+        elemDesc.setAttr("DISABLED", ElemDesc.ATTREMPTY);
+        elemDesc.setAttr("READONLY", ElemDesc.ATTREMPTY);
+       
+        // ----------------------------------------------                
+        elemDesc = (ElemDesc) m_elementFlags.get("TH");
+        elemDesc.setAttr("NOWRAP", ElemDesc.ATTREMPTY);
+        
+        // ----------------------------------------------
+        // The nowrap attribute of a tr element is both
+        // a Netscape and Internet-Explorer extension                
+        elemDesc = (ElemDesc) m_elementFlags.get("TR");
+        elemDesc.setAttr("NOWRAP", ElemDesc.ATTREMPTY);
+        
+        // ----------------------------------------------        
+        elemDesc = (ElemDesc) m_elementFlags.get("UL");
+        elemDesc.setAttr("COMPACT", ElemDesc.ATTREMPTY);
+    }
+
+    /**
+     * Dummy element for elements not found.
+     */
+    static private final ElemDesc m_dummy = new ElemDesc(0 | ElemDesc.BLOCK);
+
+    /** True if URLs should be specially escaped with the %xx form. */
+    private boolean m_specialEscapeURLs = true;
+
+    /** True if the META tag should be omitted. */
+    private boolean m_omitMetaTag = false;
+
+    /**
+     * Tells if the formatter should use special URL escaping.
+     *
+     * @param bool True if URLs should be specially escaped with the %xx form.
+     */
+    public void setSpecialEscapeURLs(boolean bool)
+    {
+        m_specialEscapeURLs = bool;
+    }
+
+    /**
+     * Tells if the formatter should omit the META tag.
+     *
+     * @param bool True if the META tag should be omitted.
+     */
+    public void setOmitMetaTag(boolean bool)
+    {
+        m_omitMetaTag = bool;
+    }
+
+    /**
+     * Specifies an output format for this serializer. It the
+     * serializer has already been associated with an output format,
+     * it will switch to the new format. This method should not be
+     * called while the serializer is in the process of serializing
+     * a document.
+     * 
+     * This method can be called multiple times before starting
+     * the serialization of a particular result-tree. In principle
+     * all serialization parameters can be changed, with the exception
+     * of method="html" (it must be method="html" otherwise we
+     * shouldn't even have a ToHTMLStream object here!) 
+     *
+     * @param format The output format or serialzation parameters
+     * to use.
+     */
+    public void setOutputFormat(Properties format)
+    {
+ 
+        m_specialEscapeURLs =
+            OutputPropertyUtils.getBooleanProperty(
+                OutputPropertiesFactory.S_USE_URL_ESCAPING,
+                format);
+
+        m_omitMetaTag =
+            OutputPropertyUtils.getBooleanProperty(
+                OutputPropertiesFactory.S_OMIT_META_TAG,
+                format);
+
+        super.setOutputFormat(format);
+    }
+
+    /**
+     * Tells if the formatter should use special URL escaping.
+     *
+     * @return True if URLs should be specially escaped with the %xx form.
+     */
+    private final boolean getSpecialEscapeURLs()
+    {
+        return m_specialEscapeURLs;
+    }
+
+    /**
+     * Tells if the formatter should omit the META tag.
+     *
+     * @return True if the META tag should be omitted.
+     */
+    private final boolean getOmitMetaTag()
+    {
+        return m_omitMetaTag;
+    }
+
+    /**
+     * Get a description of the given element.
+     *
+     * @param name non-null name of element, case insensitive.
+     *
+     * @return non-null reference to ElemDesc, which may be m_dummy if no 
+     *         element description matches the given name.
+     */
+    public static final ElemDesc getElemDesc(String name)
+    {
+        /* this method used to return m_dummy  when name was null
+         * but now it doesn't check and and requires non-null name.
+         */
+        Object obj = m_elementFlags.get(name);
+        if (null != obj)
+            return (ElemDesc)obj;
+        return m_dummy;
+    }
+    
+    /**
+     * A Trie that is just a copy of the "static" one.
+     * We need this one to be able to use the faster, but not thread-safe
+     * method Trie.get2(name)
+     */
+    private Trie m_htmlInfo = new Trie(m_elementFlags);
+    /**
+     * Calls to this method could be replaced with calls to
+     * getElemDesc(name), but this one should be faster.
+     */
+    private ElemDesc getElemDesc2(String name)
+    {
+        Object obj = m_htmlInfo.get2(name);
+        if (null != obj)
+            return (ElemDesc)obj;
+        return m_dummy;
+    }
+
+    /**
+     * Default constructor.
+     */
+    public ToXHTMLStream()
+    {
+
+        super();
+        m_charInfo = m_htmlcharInfo;
+        // initialize namespaces
+        m_prefixMap = new NamespaceMappings();
+
+    }
+
+    /** The name of the current element. */
+//    private String m_currentElementName = null;
+
+    /**
+     * Receive notification of the beginning of a document.
+     *
+     * @throws org.xml.sax.SAXException Any SAX exception, possibly
+     *            wrapping another exception.
+     *
+     * @throws org.xml.sax.SAXException
+     */
+    protected void startDocumentInternal() throws org.xml.sax.SAXException
+    {
+        super.startDocumentInternal();
+
+        m_needToCallStartDocument = false; 
+        m_needToOutputDocTypeDecl = true;
+        m_startNewLine = false;
+//        setOmitXMLDeclaration(true);
+
+        /* The call to getXMLVersion() might emit an error message
+         * and we should emit this message regardless of if we are 
+         * writing out an XML header or not.
+         */ 
+        final String version = XMLVERSION10;
+        if (getOmitXMLDeclaration() == false)
+        {
+            String encoding = Encodings.getMimeEncoding(getEncoding());
+            String standalone;
+
+            if (m_standaloneWasSpecified)
+            {
+                standalone = " standalone=\"" + getStandalone() + "\"";
+            }
+            else
+            {
+                standalone = "";
+            }
+
+            try
+            {
+                final java.io.Writer writer = m_writer;
+                writer.write("<?xml version=\"");
+                writer.write(version);
+                writer.write("\" encoding=\"");
+                writer.write(encoding);
+                writer.write('\"');
+                writer.write(standalone);
+                writer.write("?>");
+                if (m_doIndent)
+                    writer.write(m_lineSep, 0, m_lineSepLen);
+            } 
+            catch(IOException e)
+            {
+                throw new SAXException(e);
+            }
+
+        }
+
+        if (true == m_needToOutputDocTypeDecl)
+        {
+            String doctypeSystem = getDoctypeSystem();
+            String doctypePublic = getDoctypePublic();
+            if ((null != doctypeSystem) || (null != doctypePublic))
+            {
+                final java.io.Writer writer = m_writer;
+                try
+                {
+                writer.write("<!DOCTYPE html");
+
+                if (null != doctypePublic)
+                {
+                    writer.write(" PUBLIC \"");
+                    writer.write(doctypePublic);
+                    writer.write('"');
+                }
+
+                if (null != doctypeSystem)
+                {
+                    if (null == doctypePublic)
+                        writer.write(" SYSTEM \"");
+                    else
+                        writer.write(" \"");
+
+                    writer.write(doctypeSystem);
+                    writer.write('"');
+                }
+
+                writer.write('>');
+                outputLineSep();
+                }
+                catch(IOException e)
+                {
+                    throw new SAXException(e);
+                }
+            }
+        }
+
+        m_needToOutputDocTypeDecl = false;
+    }
+
+    /**
+     * Receive notification of the end of a document. 
+     *
+     * @throws org.xml.sax.SAXException Any SAX exception, possibly
+     *            wrapping another exception.
+     *
+     * @throws org.xml.sax.SAXException
+     */
+    public final void endDocument() throws org.xml.sax.SAXException
+    {
+        
+        flushPending();
+        if (m_doIndent && !m_isprevtext)
+        {
+            try
+            {
+            outputLineSep();
+            }
+            catch(IOException e)
+            {
+                throw new SAXException(e);
+            }
+        }
+
+        flushWriter();
+        if (m_tracer != null)
+            super.fireEndDoc();
+    }
+
+    /**
+     *  Receive notification of the beginning of an element.
+     *
+     *
+     *  @param namespaceURI
+     *  @param localName
+     *  @param name The element type name.
+     *  @param atts The attributes attached to the element, if any.
+     *  @throws org.xml.sax.SAXException Any SAX exception, possibly
+     *             wrapping another exception.
+     *  @see #endElement
+     *  @see org.xml.sax.AttributeList
+     */
+    public void startElement(
+        String namespaceURI,
+        String localName,
+        String name,
+        Attributes atts)
+        throws org.xml.sax.SAXException
+    {
+
+        ElemContext elemContext = m_elemContext;
+
+        // clean up any pending things first
+        if (elemContext.m_startTagOpen)
+        {
+            closeStartTag();
+            elemContext.m_startTagOpen = false;
+        }
+        else if (m_cdataTagOpen)
+        {
+            closeCDATA();
+            m_cdataTagOpen = false;
+        }
+        else if (m_needToCallStartDocument)
+        {
+            startDocumentInternal();
+            m_needToCallStartDocument = false;
+        }
+
+
+        // if this element has a namespace then treat it like XML
+        if (null != namespaceURI && namespaceURI.length() > 0)
+        {
+            super.startElement(namespaceURI, localName, name, atts);
+
+            return;
+        }
+        
+        try
+        {
+            // getElemDesc2(name) is faster than getElemDesc(name)
+            ElemDesc elemDesc = getElemDesc2(name);
+            int elemFlags = elemDesc.getFlags();
+
+            // deal with indentation issues first
+            if (m_doIndent)
+            {
+
+                boolean isBlockElement = (elemFlags & ElemDesc.BLOCK) != 0;
+                if (m_ispreserve)
+                    m_ispreserve = false;
+                else if (
+                    (null != elemContext.m_elementName)
+                    && (!m_inBlockElem
+                        || isBlockElement) /* && !isWhiteSpaceSensitive */
+                    )
+                {
+                    m_startNewLine = true;
+
+                    indent();
+
+                }
+                m_inBlockElem = !isBlockElement;
+            }
+
+            // save any attributes for later processing
+            if (atts != null)
+                addAttributes(atts);            
+
+            m_isprevtext = false;
+            final java.io.Writer writer = m_writer;
+            writer.write('<');
+            writer.write(name);
+
+
+
+            if (m_tracer != null)
+                firePseudoAttributes();
+            
+            if ((elemFlags & ElemDesc.EMPTY) != 0)  
+            {
+                // an optimization for elements which are expected
+                // to be empty.
+                m_elemContext = elemContext.push();
+                /* XSLTC sometimes calls namespaceAfterStartElement()
+                 * so we need to remember the name
+                 */
+                m_elemContext.m_elementName = name;
+                m_elemContext.m_elementDesc = elemDesc;
+                return;                
+            } 
+            else
+            {
+                elemContext = elemContext.push(namespaceURI,localName,name);
+                m_elemContext = elemContext;
+                elemContext.m_elementDesc = elemDesc;
+                elemContext.m_isRaw = (elemFlags & ElemDesc.RAW) != 0;
+            }
+            
+
+            if ((elemFlags & ElemDesc.HEADELEM) != 0)
+            {
+                // This is the <HEAD> element, do some special processing
+                closeStartTag();
+                elemContext.m_startTagOpen = false;
+                if (!m_omitMetaTag)
+                {
+                    if (m_doIndent)
+                        indent();
+                    writer.write(
+                        "<META http-equiv=\"Content-Type\" content=\"text/html;charset=");
+                    String encoding = getEncoding();
+                    String encode = Encodings.getMimeEncoding(encoding);
+                    writer.write(encode);
+                    writer.write("\">");
+                }
+            }
+        }
+        catch (IOException e)
+        {
+            throw new SAXException(e);
+        }
+    }
+
+    /**
+     *  Receive notification of the end of an element.
+     *
+     *
+     *  @param namespaceURI
+     *  @param localName
+     *  @param name The element type name
+     *  @throws org.xml.sax.SAXException Any SAX exception, possibly
+     *             wrapping another exception.
+     */
+    public final void endElement(
+        final String namespaceURI,
+        final String localName,
+        final String name)
+        throws org.xml.sax.SAXException
+    {
+        // deal with any pending issues
+        if (m_cdataTagOpen)
+            closeCDATA();
+
+        // if the element has a namespace, treat it like XML, not HTML
+        if (null != namespaceURI && namespaceURI.length() > 0)
+        {
+            super.endElement(namespaceURI, localName, name);
+
+            return;
+        }
+
+        try
+        {
+
+            ElemContext elemContext = m_elemContext;
+            final ElemDesc elemDesc = elemContext.m_elementDesc;
+            final int elemFlags = elemDesc.getFlags();
+            final boolean elemEmpty = (elemFlags & ElemDesc.EMPTY) != 0;
+
+            // deal with any indentation issues
+            if (m_doIndent)
+            {
+                final boolean isBlockElement = (elemFlags&ElemDesc.BLOCK) != 0;
+                boolean shouldIndent = false;
+
+                if (m_ispreserve)
+                {
+                    m_ispreserve = false;
+                }
+                else if (m_doIndent && (!m_inBlockElem || isBlockElement))
+                {
+                    m_startNewLine = true;
+                    shouldIndent = true;
+                }
+                if (!elemContext.m_startTagOpen && shouldIndent)
+                    indent(elemContext.m_currentElemDepth - 1);
+                m_inBlockElem = !isBlockElement;
+            }
+
+            final java.io.Writer writer = m_writer;
+            if (!elemContext.m_startTagOpen)
+            {
+                writer.write("</");
+                writer.write(name);
+                writer.write('>');
+            }
+            else
+            {
+                // the start-tag open when this method was called,
+                // so we need to process it now.
+                
+                if (m_tracer != null)
+                    super.fireStartElem(name);
+
+                // the starting tag was still open when we received this endElement() call
+                // so we need to process any gathered attributes NOW, before they go away.
+                int nAttrs = m_attributes.getLength();
+                if (nAttrs > 0)
+                {
+                    processAttributes(m_writer, nAttrs);
+                    // clear attributes object for re-use with next element
+                    m_attributes.clear();
+                }
+                if (!elemEmpty)
+                {
+                    // As per Dave/Paul recommendation 12/06/2000
+                    // if (shouldIndent)
+                    // writer.write('>');
+                    //  indent(m_currentIndent);
+
+                    writer.write("></");
+                    writer.write(name);
+                    writer.write('>');
+                }
+                else
+                {
+                    writer.write(" />");
+                }
+            }
+            
+            // clean up because the element has ended
+            if ((elemFlags & ElemDesc.WHITESPACESENSITIVE) != 0)
+                m_ispreserve = true;
+            m_isprevtext = false;
+
+            // fire off the end element event
+            if (m_tracer != null)
+                super.fireEndElem(name);            
+                           
+            // OPTIMIZE-EMPTY                
+            if (elemEmpty)
+            {
+                // a quick exit if the HTML element had no children.
+                // This block of code can be removed if the corresponding block of code
+                // in startElement() also labeled with "OPTIMIZE-EMPTY" is also removed
+                m_elemContext = elemContext.m_prev;
+                return;
+            }
+
+            // some more clean because the element has ended. 
+            if (!elemContext.m_startTagOpen)
+            {
+                if (m_doIndent && !m_preserves.isEmpty())
+                    m_preserves.pop();
+            }
+            m_elemContext = elemContext.m_prev;
+//            m_isRawStack.pop();
+        }
+        catch (IOException e)
+        {
+            throw new SAXException(e);
+        }
+    }
+
+    /**
+     * Process an attribute.
+     * @param   writer The writer to write the processed output to.
+     * @param   name   The name of the attribute.
+     * @param   value   The value of the attribute.
+     * @param   elemDesc The description of the HTML element 
+     *           that has this attribute.
+     *
+     * @throws org.xml.sax.SAXException
+     */
+    protected void processAttribute(
+        java.io.Writer writer,
+        String name,
+        String value,
+        ElemDesc elemDesc)
+        throws IOException
+    {
+        writer.write(' ');
+
+        if (   ((value.length() == 0) || value.equalsIgnoreCase(name))
+            && elemDesc != null 
+            && elemDesc.isAttrFlagSet(name, ElemDesc.ATTREMPTY))
+        {
+            writer.write(name);
+        }
+        else
+        {
+            // %REVIEW% %OPT%
+            // Two calls to single-char write may NOT
+            // be more efficient than one to string-write...
+            writer.write(name);
+            writer.write("=\"");
+            if (   elemDesc != null
+                && elemDesc.isAttrFlagSet(name, ElemDesc.ATTRURL))
+                writeAttrURI(writer, value, m_specialEscapeURLs);
+            else
+                writeAttrString(writer, value, this.getEncoding());
+            writer.write('"');
+
+        }
+    }
+
+    /**
+     * Tell if a character is an ASCII digit.
+     */
+    private boolean isASCIIDigit(char c)
+    {
+        return (c >= '0' && c <= '9');
+    }
+
+    /**
+     * Make an integer into an HH hex value.
+     * Does no checking on the size of the input, since this 
+     * is only meant to be used locally by writeAttrURI.
+     * 
+     * @param i must be a value less than 255.
+     * 
+     * @return should be a two character string.
+     */
+    private static String makeHHString(int i)
+    {
+        String s = Integer.toHexString(i).toUpperCase();
+        if (s.length() == 1)
+        {
+            s = "0" + s;
+        }
+        return s;
+    }
+
+    /**
+    * Dmitri Ilyin: Makes sure if the String is HH encoded sign.
+    * @param str must be 2 characters long
+    *
+    * @return true or false
+    */
+    private boolean isHHSign(String str)
+    {
+        boolean sign = true;
+        try
+        {
+            char r = (char) Integer.parseInt(str, 16);
+        }
+        catch (NumberFormatException e)
+        {
+            sign = false;
+        }
+        return sign;
+    }
+
+    /**
+     * Write the specified <var>string</var> after substituting non ASCII characters,
+     * with <CODE>%HH</CODE>, where HH is the hex of the byte value.
+     *
+     * @param   string      String to convert to XML format.
+     * @param doURLEscaping True if we should try to encode as 
+     *                      per http://www.ietf.org/rfc/rfc2396.txt.
+     *
+     * @throws org.xml.sax.SAXException if a bad surrogate pair is detected.
+     */
+    public void writeAttrURI(
+        final java.io.Writer writer, String string, boolean doURLEscaping)
+        throws IOException
+    {
+        // http://www.ietf.org/rfc/rfc2396.txt says:
+        // A URI is always in an "escaped" form, since escaping or unescaping a
+        // completed URI might change its semantics.  Normally, the only time
+        // escape encodings can safely be made is when the URI is being created
+        // from its component parts; each component may have its own set of
+        // characters that are reserved, so only the mechanism responsible for
+        // generating or interpreting that component can determine whether or
+        // not escaping a character will change its semantics. Likewise, a URI
+        // must be separated into its components before the escaped characters
+        // within those components can be safely decoded.
+        //
+        // ...So we do our best to do limited escaping of the URL, without 
+        // causing damage.  If the URL is already properly escaped, in theory, this 
+        // function should not change the string value.
+
+        final int end = string.length();
+        if (end > m_attrBuff.length)
+        {
+           m_attrBuff = new char[end*2 + 1];               
+        }
+        string.getChars(0,end, m_attrBuff, 0); 
+        final char[] chars = m_attrBuff;
+
+        int cleanStart = 0;
+        int cleanLength = 0;
+        
+        
+        char ch = 0;
+        for (int i = 0; i < end; i++)
+        {
+            ch = chars[i];
+
+            if ((ch < 32) || (ch > 126))
+            {
+                if (cleanLength > 0)
+                {
+                    writer.write(chars, cleanStart, cleanLength);
+                    cleanLength = 0;
+                }
+                if (doURLEscaping)
+                {
+                    // Encode UTF16 to UTF8.
+                    // Reference is Unicode, A Primer, by Tony Graham.
+                    // Page 92.
+
+                    // Note that Kay doesn't escape 0x20...
+                    //  if(ch == 0x20) // Not sure about this... -sb
+                    //  {
+                    //    writer.write(ch);
+                    //  }
+                    //  else 
+                    if (ch <= 0x7F)
+                    {
+                        writer.write('%');
+                        writer.write(makeHHString(ch));
+                    }
+                    else if (ch <= 0x7FF)
+                    {
+                        // Clear low 6 bits before rotate, put high 4 bits in low byte, 
+                        // and set two high bits.
+                        int high = (ch >> 6) | 0xC0;
+                        int low = (ch & 0x3F) | 0x80;
+                        // First 6 bits, + high bit
+                        writer.write('%');
+                        writer.write(makeHHString(high));
+                        writer.write('%');
+                        writer.write(makeHHString(low));
+                    }
+                    else if (Encodings.isHighUTF16Surrogate(ch)) // high surrogate
+                    {
+                        // I'm sure this can be done in 3 instructions, but I choose 
+                        // to try and do it exactly like it is done in the book, at least 
+                        // until we are sure this is totally clean.  I don't think performance 
+                        // is a big issue with this particular function, though I could be 
+                        // wrong.  Also, the stuff below clearly does more masking than 
+                        // it needs to do.
+
+                        // Clear high 6 bits.
+                        int highSurrogate = ((int) ch) & 0x03FF;
+
+                        // Middle 4 bits (wwww) + 1
+                        // "Note that the value of wwww from the high surrogate bit pattern
+                        // is incremented to make the uuuuu bit pattern in the scalar value 
+                        // so the surrogate pair don't address the BMP."
+                        int wwww = ((highSurrogate & 0x03C0) >> 6);
+                        int uuuuu = wwww + 1;
+
+                        // next 4 bits
+                        int zzzz = (highSurrogate & 0x003C) >> 2;
+
+                        // low 2 bits
+                        int yyyyyy = ((highSurrogate & 0x0003) << 4) & 0x30;
+
+                        // Get low surrogate character.
+                        ch = chars[++i];
+
+                        // Clear high 6 bits.
+                        int lowSurrogate = ((int) ch) & 0x03FF;
+
+                        // put the middle 4 bits into the bottom of yyyyyy (byte 3)
+                        yyyyyy = yyyyyy | ((lowSurrogate & 0x03C0) >> 6);
+
+                        // bottom 6 bits.
+                        int xxxxxx = (lowSurrogate & 0x003F);
+
+                        int byte1 = 0xF0 | (uuuuu >> 2); // top 3 bits of uuuuu
+                        int byte2 =
+                            0x80 | (((uuuuu & 0x03) << 4) & 0x30) | zzzz;
+                        int byte3 = 0x80 | yyyyyy;
+                        int byte4 = 0x80 | xxxxxx;
+
+                        writer.write('%');
+                        writer.write(makeHHString(byte1));
+                        writer.write('%');
+                        writer.write(makeHHString(byte2));
+                        writer.write('%');
+                        writer.write(makeHHString(byte3));
+                        writer.write('%');
+                        writer.write(makeHHString(byte4));
+                    }
+                    else
+                    {
+                        int high = (ch >> 12) | 0xE0; // top 4 bits
+                        int middle = ((ch & 0x0FC0) >> 6) | 0x80;
+                        // middle 6 bits
+                        int low = (ch & 0x3F) | 0x80;
+                        // First 6 bits, + high bit
+                        writer.write('%');
+                        writer.write(makeHHString(high));
+                        writer.write('%');
+                        writer.write(makeHHString(middle));
+                        writer.write('%');
+                        writer.write(makeHHString(low));
+                    }
+
+                }
+                else if (escapingNotNeeded(ch))
+                {
+                    writer.write(ch);
+                }
+                else
+                {
+                    writer.write("&#");
+                    writer.write(Integer.toString(ch));
+                    writer.write(';');
+                }
+                // In this character range we have first written out any previously accumulated 
+                // "clean" characters, then processed the current more complicated character,
+                // which may have incremented "i".
+                // We now we reset the next possible clean character.
+                cleanStart = i + 1;
+            }
+            // Since http://www.ietf.org/rfc/rfc2396.txt refers to the URI grammar as
+            // not allowing quotes in the URI proper syntax, nor in the fragment 
+            // identifier, we believe that it's OK to double escape quotes.
+            else if (ch == '"')
+            {
+                // If the character is a '%' number number, try to avoid double-escaping.
+                // There is a question if this is legal behavior.
+
+                // Dmitri Ilyin: to check if '%' number number is invalid. It must be checked if %xx is a sign, that would be encoded
+                // The encoded signes are in Hex form. So %xx my be in form %3C that is "<" sign. I will try to change here a little.
+
+                //        if( ((i+2) < len) && isASCIIDigit(stringArray[i+1]) && isASCIIDigit(stringArray[i+2]) )
+
+                // We are no longer escaping '%'
+
+                if (cleanLength > 0)
+                {
+                    writer.write(chars, cleanStart, cleanLength);
+                    cleanLength = 0;
+                }   
+                
+                
+                // Mike Kay encodes this as &#34;, so he may know something I don't?
+                if (doURLEscaping)
+                    writer.write("%22");
+                else
+                    writer.write("&quot;"); // we have to escape this, I guess.
+
+                // We have written out any clean characters, then the escaped '%' and now we
+                // We now we reset the next possible clean character.
+                cleanStart = i + 1;    
+            }
+            else
+            {
+                // no processing for this character, just count how
+                // many characters in a row that we have that need no processing
+                cleanLength++;
+            }
+        }
+        
+        // are there any clean characters at the end of the array
+        // that we haven't processed yet?
+        if (cleanLength > 1)
+        {
+            // if the whole string can be written out as-is do so
+            // otherwise write out the clean chars at the end of the
+            // array
+            if (cleanStart == 0)
+                writer.write(string);
+            else
+                writer.write(chars, cleanStart, cleanLength);
+        }
+        else if (cleanLength == 1)
+        {
+            // a little optimization for 1 clean character
+            // (we could have let the previous if(...) handle them all)
+            writer.write(ch);
+        }
+    }
+
+    /**
+     * Writes the specified <var>string</var> after substituting <VAR>specials</VAR>,
+     * and UTF-16 surrogates for character references <CODE>&amp;#xnn</CODE>.
+     *
+     * @param   string      String to convert to XML format.
+     * @param   encoding    CURRENTLY NOT IMPLEMENTED.
+     *
+     * @throws org.xml.sax.SAXException
+     */
+    public void writeAttrString(
+        final java.io.Writer writer, String string, String encoding)
+        throws IOException
+    {
+        final int end = string.length();
+        if (end > m_attrBuff.length)
+        {
+            m_attrBuff = new char[end * 2 + 1];
+        }
+        string.getChars(0, end, m_attrBuff, 0);
+        final char[] chars = m_attrBuff;
+
+        
+
+        int cleanStart = 0;
+        int cleanLength = 0;
+
+        char ch = 0;
+        for (int i = 0; i < end; i++)
+        {
+            ch = chars[i];
+
+            // System.out.println("SPECIALSSIZE: "+SPECIALSSIZE);
+            // System.out.println("ch: "+(int)ch);
+            // System.out.println("m_maxCharacter: "+(int)m_maxCharacter);
+            // System.out.println("m_attrCharsMap[ch]: "+(int)m_attrCharsMap[ch]);
+            if (escapingNotNeeded(ch) && (!m_charInfo.isSpecialAttrChar(ch)))
+            {
+                cleanLength++;
+            }
+            else if ('<' == ch || '>' == ch)
+            {
+                cleanLength++; // no escaping in this case, as specified in 15.2
+            }
+            else if (
+                ('&' == ch) && ((i + 1) < end) && ('{' == chars[i + 1]))
+            {
+                cleanLength++; // no escaping in this case, as specified in 15.2
+            }
+            else
+            {
+                if (cleanLength > 0)
+                {
+                    writer.write(chars,cleanStart,cleanLength);
+                    cleanLength = 0;
+                }
+                int pos = accumDefaultEntity(writer, ch, i, chars, end, false, true);
+
+                if (i != pos)
+                {
+                    i = pos - 1;
+                }
+                else
+                {
+                    if (Encodings.isHighUTF16Surrogate(ch))
+                    {
+ 
+                            writeUTF16Surrogate(ch, chars, i, end);
+                            i++; // two input characters processed
+                                 // this increments by one and the for()
+                                 // loop itself increments by another one.
+                    }
+
+                    // The next is kind of a hack to keep from escaping in the case 
+                    // of Shift_JIS and the like.
+
+                    /*
+                    else if ((ch < m_maxCharacter) && (m_maxCharacter == 0xFFFF)
+                    && (ch != 160))
+                    {
+                    writer.write(ch);  // no escaping in this case
+                    }
+                    else
+                    */
+                    String outputStringForChar = m_charInfo.getOutputStringForChar(ch);
+                    if (null != outputStringForChar)
+                    {
+                        writer.write(outputStringForChar);
+                    }
+                    else if (escapingNotNeeded(ch))
+                    {
+                        writer.write(ch); // no escaping in this case
+                    }
+                    else
+                    {
+                        writer.write("&#");
+                        writer.write(Integer.toString(ch));
+                        writer.write(';');
+                    }
+                }
+                cleanStart = i + 1;
+            }
+        } // end of for()
+        
+        // are there any clean characters at the end of the array
+        // that we haven't processed yet?
+        if (cleanLength > 1)
+        {
+            // if the whole string can be written out as-is do so
+            // otherwise write out the clean chars at the end of the
+            // array
+            if (cleanStart == 0)
+                writer.write(string);
+            else
+                writer.write(chars, cleanStart, cleanLength);
+        }
+        else if (cleanLength == 1)
+        {
+            // a little optimization for 1 clean character
+            // (we could have let the previous if(...) handle them all)
+            writer.write(ch);
+        }
+    }
+
+
+
+    /**
+     * Receive notification of character data.
+     *
+     * <p>The Parser will call this method to report each chunk of
+     * character data.  SAX parsers may return all contiguous character
+     * data in a single chunk, or they may split it into several
+     * chunks; however, all of the characters in any single event
+     * must come from the same external entity, so that the Locator
+     * provides useful information.</p>
+     *
+     * <p>The application must not attempt to read from the array
+     * outside of the specified range.</p>
+     *
+     * <p>Note that some parsers will report whitespace using the
+     * ignorableWhitespace() method rather than this one (validating
+     * parsers must do so).</p>
+     *
+     * @param chars The characters from the XML document.
+     * @param start The start position in the array.
+     * @param length The number of characters to read from the array.
+     * @throws org.xml.sax.SAXException Any SAX exception, possibly
+     *            wrapping another exception.
+     * @see #ignorableWhitespace
+     * @see org.xml.sax.Locator
+     *
+     * @throws org.xml.sax.SAXException
+     */
+    public final void characters(char chars[], int start, int length)
+        throws org.xml.sax.SAXException
+    {
+
+        if (m_elemContext.m_isRaw)
+        {
+            try
+            {
+                if (m_elemContext.m_startTagOpen)
+                {
+                    closeStartTag();
+                    m_elemContext.m_startTagOpen = false;
+                }
+                m_ispreserve = true;
+                
+//              With m_ispreserve just set true it looks like shouldIndent()
+//              will always return false, so drop any possible indentation.
+//              if (shouldIndent())
+//                  indent();
+
+                // writer.write("<![CDATA[");
+                // writer.write(chars, start, length);
+                writeNormalizedChars(chars, start, length, false, m_lineSepUse);
+
+                // writer.write("]]>");
+                
+                // time to generate characters event
+                if (m_tracer != null)
+                    super.fireCharEvent(chars, start, length);
+                
+                return;
+            }
+            catch (IOException ioe)
+            {
+                throw new org.xml.sax.SAXException(
+                    Utils.messages.createMessage(
+                        MsgKey.ER_OIERROR,
+                        null),
+                    ioe);
+                //"IO error", ioe);
+            }
+        }
+        else
+        {
+            super.characters(chars, start, length);
+        }
+    }
+
+    /**
+     *  Receive notification of cdata.
+     *
+     *  <p>The Parser will call this method to report each chunk of
+     *  character data.  SAX parsers may return all contiguous character
+     *  data in a single chunk, or they may split it into several
+     *  chunks; however, all of the characters in any single event
+     *  must come from the same external entity, so that the Locator
+     *  provides useful information.</p>
+     *
+     *  <p>The application must not attempt to read from the array
+     *  outside of the specified range.</p>
+     *
+     *  <p>Note that some parsers will report whitespace using the
+     *  ignorableWhitespace() method rather than this one (validating
+     *  parsers must do so).</p>
+     *
+     *  @param ch The characters from the XML document.
+     *  @param start The start position in the array.
+     *  @param length The number of characters to read from the array.
+     *  @throws org.xml.sax.SAXException Any SAX exception, possibly
+     *             wrapping another exception.
+     *  @see #ignorableWhitespace
+     *  @see org.xml.sax.Locator
+     *
+     * @throws org.xml.sax.SAXException
+     */
+    public final void cdata(char ch[], int start, int length)
+        throws org.xml.sax.SAXException
+    {
+
+        if ((null != m_elemContext.m_elementName)
+          /*  && (m_elemContext.m_elementName.equalsIgnoreCase("SCRIPT")
+                || m_elemContext.m_elementName.equalsIgnoreCase("STYLE")) */)
+        {
+            try
+            {
+                if (m_elemContext.m_startTagOpen)
+                {
+                    closeStartTag();
+                    m_elemContext.m_startTagOpen = false;
+                }
+
+                m_ispreserve = true;
+
+                if (shouldIndent())
+                    indent();
+
+                // writer.write(ch, start, length);
+                writeNormalizedChars(ch, start, length, true, m_lineSepUse);
+            }
+            catch (IOException ioe)
+            {
+                throw new org.xml.sax.SAXException(
+                    Utils.messages.createMessage(
+                        MsgKey.ER_OIERROR,
+                        null),
+                    ioe);
+                //"IO error", ioe);
+            }
+        }
+        else
+        {
+            super.cdata(ch, start, length);
+        }
+    }
+
+    /**
+     *  Receive notification of a processing instruction.
+     *
+     *  @param target The processing instruction target.
+     *  @param data The processing instruction data, or null if
+     *         none was supplied.
+     *  @throws org.xml.sax.SAXException Any SAX exception, possibly
+     *             wrapping another exception.
+     *
+     * @throws org.xml.sax.SAXException
+     */
+    public void processingInstruction(String target, String data)
+        throws org.xml.sax.SAXException
+    {
+
+        // Process any pending starDocument and startElement first.
+        flushPending(); 
+        
+        // Use a fairly nasty hack to tell if the next node is supposed to be 
+        // unescaped text.
+        if (target.equals(Result.PI_DISABLE_OUTPUT_ESCAPING))
+        {
+            startNonEscaping();
+        }
+        else if (target.equals(Result.PI_ENABLE_OUTPUT_ESCAPING))
+        {
+            endNonEscaping();
+        }
+        else
+        {
+            try
+            {
+            if (m_elemContext.m_startTagOpen)
+            {
+                closeStartTag();
+                m_elemContext.m_startTagOpen = false;
+            }
+            else if (m_needToCallStartDocument)
+                startDocumentInternal();
+
+            if (shouldIndent())
+                indent();
+
+            final java.io.Writer writer = m_writer;
+            //writer.write("<?" + target);
+            writer.write("<?");
+            writer.write(target);
+
+            if (data.length() > 0 && !Character.isSpaceChar(data.charAt(0)))
+                writer.write(' '); 
+
+            //writer.write(data + ">"); // different from XML
+            writer.write(data); // different from XML
+            writer.write('>'); // different from XML
+
+            // Always output a newline char if not inside of an 
+            // element. The whitespace is not significant in that
+            // case.
+            if (m_elemContext.m_currentElemDepth <= 0)
+                outputLineSep();
+
+            m_startNewLine = true;
+            }
+            catch(IOException e)
+            {
+                throw new SAXException(e);
+            }
+        }
+               
+        // now generate the PI event
+        if (m_tracer != null)
+            super.fireEscapingEvent(target, data);
+     }
+
+    /**
+     * Receive notivication of a entityReference.
+     *
+     * @param name non-null reference to entity name string.
+     *
+     * @throws org.xml.sax.SAXException
+     */
+    public final void entityReference(String name)
+        throws org.xml.sax.SAXException
+    {
+        try
+        {
+
+        final java.io.Writer writer = m_writer;
+        writer.write('&');
+        writer.write(name);
+        writer.write(';');
+        
+        } catch(IOException e)
+        {
+            throw new SAXException(e);
+        }
+    }
+    /**
+     * @see ExtendedContentHandler#endElement(String)
+     */
+    public final void endElement(String elemName) throws SAXException
+    {
+        endElement(null, null, elemName);
+    }
+
+    /**
+     * Process the attributes, which means to write out the currently
+     * collected attributes to the writer. The attributes are not
+     * cleared by this method
+     * 
+     * @param writer the writer to write processed attributes to.
+     * @param nAttrs the number of attributes in m_attributes 
+     * to be processed
+     *
+     * @throws org.xml.sax.SAXException
+     */
+    public void processAttributes(java.io.Writer writer, int nAttrs)
+        throws IOException,SAXException
+    {
+            /* 
+             * process the collected attributes
+             */
+            for (int i = 0; i < nAttrs; i++)
+            {
+                processAttribute(
+                    writer,
+                    m_attributes.getQName(i),
+                    m_attributes.getValue(i),
+                    m_elemContext.m_elementDesc);
+            }
+    }
+
+    /**
+     * For the enclosing elements starting tag write out out any attributes
+     * followed by ">"
+     *
+     *@throws org.xml.sax.SAXException
+     */
+    protected void closeStartTag() throws SAXException
+    {
+            try
+            {
+
+            // finish processing attributes, time to fire off the start element event
+            if (m_tracer != null)
+                super.fireStartElem(m_elemContext.m_elementName);  
+            
+            int nAttrs = m_attributes.getLength();   
+            if (nAttrs>0)
+            {
+                processAttributes(m_writer, nAttrs);
+                // clear attributes object for re-use with next element
+                m_attributes.clear();
+            }
+
+            m_writer.write('>');
+
+            /* whether Xalan or XSLTC, we have the prefix mappings now, so
+             * lets determine if the current element is specified in the cdata-
+             * section-elements list.
+             */
+            if (m_cdataSectionElements != null) 
+                m_elemContext.m_isCdataSection = isCdataSection();
+            if (m_doIndent)
+            {
+                m_isprevtext = false;
+                m_preserves.push(m_ispreserve);
+            }
+            
+            }
+            catch(IOException e)
+            {
+                throw new SAXException(e);
+            }
+    }
+    /**
+     * Initialize the serializer with the specified output stream and output
+     * format. Must be called before calling any of the serialize methods.
+     *
+     * @param output The output stream to use
+     * @param format The output format
+     * @throws UnsupportedEncodingException The encoding specified   in the
+     * output format is not supported
+     */
+    protected synchronized void init(OutputStream output, Properties format)
+        throws UnsupportedEncodingException
+    {
+        if (null == format)
+        {
+            format = OutputPropertiesFactory.getDefaultMethodProperties(Method.HTML);
+         }
+        super.init(output,format, false);
+    }
+    
+        /**
+         * Specifies an output stream to which the document should be
+         * serialized. This method should not be called while the
+         * serializer is in the process of serializing a document.
+         * <p>
+         * The encoding specified in the output properties is used, or
+         * if no encoding was specified, the default for the selected
+         * output method.
+         *
+         * @param output The output stream
+         */
+        public void setOutputStream(OutputStream output)
+        {
+
+            try
+            {
+                Properties format;
+                if (null == m_format)
+                    format = OutputPropertiesFactory.getDefaultMethodProperties(Method.HTML);
+                else
+                    format = m_format;
+                init(output, format, true);
+            }
+            catch (UnsupportedEncodingException uee)
+            {
+
+                // Should have been warned in init, I guess...
+            }
+        }    
+        /**
+         * This method is used when a prefix/uri namespace mapping
+         * is indicated after the element was started with a
+         * startElement() and before and endElement().
+         * startPrefixMapping(prefix,uri) would be used before the
+         * startElement() call.
+         * @param uri the URI of the namespace
+         * @param prefix the prefix associated with the given URI.
+         *
+         * @see ExtendedContentHandler#namespaceAfterStartElement(String, String)
+         */
+        public void namespaceAfterStartElement(String prefix, String uri)
+            throws SAXException
+        {
+            // hack for XSLTC with finding URI for default namespace
+            if (m_elemContext.m_elementURI == null)
+            {
+                String prefix1 = getPrefixPart(m_elemContext.m_elementName);
+                if (prefix1 == null && EMPTYSTRING.equals(prefix))
+                {
+                    // the elements URI is not known yet, and it
+                    // doesn't have a prefix, and we are currently
+                    // setting the uri for prefix "", so we have
+                    // the uri for the element... lets remember it
+                    m_elemContext.m_elementURI = uri;
+                }
+            }            
+            startPrefixMapping(prefix,uri,false);
+        }
+
+    public void startDTD(String name, String publicId, String systemId)
+        throws SAXException
+    {
+        m_inDTD = true;
+        super.startDTD(name, publicId, systemId);
+    }
+
+    /**
+     * Report the end of DTD declarations.
+     * @throws org.xml.sax.SAXException The application may raise an exception.
+     * @see #startDTD
+     */
+    public void endDTD() throws org.xml.sax.SAXException
+    {
+        m_inDTD = false;
+        /* for ToHTMLStream the DOCTYPE is entirely output in the
+         * startDocumentInternal() method, so don't do anything here
+         */
+    }
+    /**
+     * This method does nothing.
+     */
+    public void attributeDecl(
+        String eName,
+        String aName,
+        String type,
+        String valueDefault,
+        String value)
+        throws SAXException
+    {
+        // The internal DTD subset is not serialized by the ToHTMLStream serializer
+    }
+
+    /**
+     * This method does nothing.
+     */
+    public void elementDecl(String name, String model) throws SAXException
+    {
+        // The internal DTD subset is not serialized by the ToHTMLStream serializer
+    }
+    /**
+     * This method does nothing.
+     */
+    public void internalEntityDecl(String name, String value)
+        throws SAXException
+    {
+        // The internal DTD subset is not serialized by the ToHTMLStream serializer
+    }
+    /**
+     * This method does nothing.
+     */
+    public void externalEntityDecl(
+        String name,
+        String publicId,
+        String systemId)
+        throws SAXException
+    {
+        // The internal DTD subset is not serialized by the ToHTMLStream serializer
+    }
+
+    /**
+     * This method is used to add an attribute to the currently open element. 
+     * The caller has guaranted that this attribute is unique, which means that it
+     * not been seen before and will not be seen again.
+     * 
+     * @param name the qualified name of the attribute
+     * @param value the value of the attribute which can contain only
+     * ASCII printable characters characters in the range 32 to 127 inclusive.
+     * @param flags the bit values of this integer give optimization information.
+     */
+    public void addUniqueAttribute(String name, String value, int flags)
+        throws SAXException
+    {
+        try
+        {
+            final java.io.Writer writer = m_writer;
+            if ((flags & NO_BAD_CHARS) > 0 && m_htmlcharInfo.onlyQuotAmpLtGt)
+            {
+                // "flags" has indicated that the characters
+                // '>'  '<'   '&'  and '"' are not in the value and
+                // m_htmlcharInfo has recorded that there are no other
+                // entities in the range 0 to 127 so we write out the
+                // value directly
+                writer.write(' ');
+                writer.write(name);
+                writer.write("=\"");
+                writer.write(value);
+                writer.write('"');
+            }
+            else if (
+                (flags & HTML_ATTREMPTY) > 0
+                    && (value.length() == 0 || value.equalsIgnoreCase(name)))
+            {
+                writer.write(' ');
+                writer.write(name);
+            }
+            else
+            {
+                writer.write(' ');
+                writer.write(name);
+                writer.write("=\"");
+                if ((flags & HTML_ATTRURL) > 0)
+                {
+                    writeAttrURI(writer, value, m_specialEscapeURLs);
+                }
+                else
+                {
+                    writeAttrString(writer, value, this.getEncoding());
+                }
+                writer.write('"');
+            }
+        } catch (IOException e) {
+            throw new SAXException(e);
+        }
+    }
+
+    public void comment(char ch[], int start, int length)
+            throws SAXException
+    {
+        // The internal DTD subset is not serialized by the ToHTMLStream serializer
+        if (m_inDTD)
+            return;
+        super.comment(ch, start, length);
+    }
+    
+    public boolean reset()
+    {
+        boolean ret = super.reset();
+        if (!ret)
+            return false;
+        initToHTMLStream();
+        return true;        
+    }
+    
+    private void initToHTMLStream()
+    {
+//        m_elementDesc = null;
+        m_inBlockElem = false;
+        m_inDTD = false;
+//        m_isRawStack.clear();
+        m_omitMetaTag = false;
+        m_specialEscapeURLs = true;     
+    }
+    
+    static class Trie
+    {
+        /**
+         * A digital search trie for 7-bit ASCII text
+         * The API is a subset of java.util.Hashtable
+         * The key must be a 7-bit ASCII string
+         * The value may be any Java Object
+         * One can get an object stored in a trie from its key, 
+         * but the search is either case sensitive or case 
+         * insensitive to the characters in the key, and this
+         * choice of sensitivity or insensitivity is made when
+         * the Trie is created, before any objects are put in it.
+         * 
+         * This class is a copy of the one in org.apache.xml.utils. 
+         * It exists to cut the serializers dependancy on that package.
+         *  
+         * @xsl.usage internal
+         */
+
+        /** Size of the m_nextChar array.  */
+        public static final int ALPHA_SIZE = 128;
+
+        /** The root node of the tree.    */
+        final Node m_Root;
+
+        /** helper buffer to convert Strings to char arrays */
+        private char[] m_charBuffer = new char[0];
+
+        /** true if the search for an object is lower case only with the key */
+        private final boolean m_lowerCaseOnly;
+
+        /**
+         * Construct the trie that has a case insensitive search.
+         */
+        public Trie()
+        {
+            m_Root = new Node();
+            m_lowerCaseOnly = false;
+        }
+
+        /**
+         * Construct the trie given the desired case sensitivity with the key.
+         * @param lowerCaseOnly true if the search keys are to be loser case only,
+         * not case insensitive.
+         */
+        public Trie(boolean lowerCaseOnly)
+        {
+            m_Root = new Node();
+            m_lowerCaseOnly = lowerCaseOnly;
+        }
+
+        /**
+         * Put an object into the trie for lookup.
+         *
+         * @param key must be a 7-bit ASCII string
+         * @param value any java object.
+         *
+         * @return The old object that matched key, or null.
+         */
+        public Object put(String key, Object value)
+        {
+
+            final int len = key.length();
+            if (len > m_charBuffer.length)
+            {
+                // make the biggest buffer ever needed in get(String)
+                m_charBuffer = new char[len];
+            }
+
+            Node node = m_Root;
+
+            for (int i = 0; i < len; i++)
+            {
+                Node nextNode =
+                    node.m_nextChar[Character.toLowerCase(key.charAt(i))];
+
+                if (nextNode != null)
+                {
+                    node = nextNode;
+                }
+                else
+                {
+                    for (; i < len; i++)
+                    {
+                        Node newNode = new Node();
+                        if (m_lowerCaseOnly)
+                        {
+                            // put this value into the tree only with a lower case key 
+                            node.m_nextChar[Character.toLowerCase(
+                                key.charAt(i))] =
+                                newNode;
+                        }
+                        else
+                        {
+                            // put this value into the tree with a case insensitive key
+                            node.m_nextChar[Character.toUpperCase(
+                                key.charAt(i))] =
+                                newNode;
+                            node.m_nextChar[Character.toLowerCase(
+                                key.charAt(i))] =
+                                newNode;
+                        }
+                        node = newNode;
+                    }
+                    break;
+                }
+            }
+
+            Object ret = node.m_Value;
+
+            node.m_Value = value;
+
+            return ret;
+        }
+
+        /**
+         * Get an object that matches the key.
+         *
+         * @param key must be a 7-bit ASCII string
+         *
+         * @return The object that matches the key, or null.
+         */
+        public Object get(final String key)
+        {
+
+            final int len = key.length();
+
+            /* If the name is too long, we won't find it, this also keeps us
+             * from overflowing m_charBuffer
+             */
+            if (m_charBuffer.length < len)
+                return null;
+
+            Node node = m_Root;
+            switch (len) // optimize the look up based on the number of chars
+            {
+                // case 0 looks silly, but the generated bytecode runs
+                // faster for lookup of elements of length 2 with this in
+                // and a fair bit faster.  Don't know why.
+                case 0 :
+                    {
+                        return null;
+                    }
+
+                case 1 :
+                    {
+                        final char ch = key.charAt(0);
+                        if (ch < ALPHA_SIZE)
+                        {
+                            node = node.m_nextChar[ch];
+                            if (node != null)
+                                return node.m_Value;
+                        }
+                        return null;
+                    }
+                    //                comment out case 2 because the default is faster            
+                    //                case 2 :
+                    //                    {
+                    //                        final char ch0 = key.charAt(0);
+                    //                        final char ch1 = key.charAt(1);
+                    //                        if (ch0 < ALPHA_SIZE && ch1 < ALPHA_SIZE)
+                    //                        {
+                    //                            node = node.m_nextChar[ch0];
+                    //                            if (node != null)
+                    //                            {
+                    //                        
+                    //                                if (ch1 < ALPHA_SIZE) 
+                    //                                {
+                    //                                    node = node.m_nextChar[ch1];
+                    //                                    if (node != null)
+                    //                                        return node.m_Value;
+                    //                                }
+                    //                            }
+                    //                        }
+                    //                        return null;
+                    //                   }
+                default :
+                    {
+                        for (int i = 0; i < len; i++)
+                        {
+                            // A thread-safe way to loop over the characters
+                            final char ch = key.charAt(i);
+                            if (ALPHA_SIZE <= ch)
+                            {
+                                // the key is not 7-bit ASCII so we won't find it here
+                                return null;
+                            }
+
+                            node = node.m_nextChar[ch];
+                            if (node == null)
+                                return null;
+                        }
+
+                        return node.m_Value;
+                    }
+            }
+        }
+
+        /**
+         * The node representation for the trie.
+         * @xsl.usage internal
+         */
+        private class Node
+        {
+
+            /**
+             * Constructor, creates a Node[ALPHA_SIZE].
+             */
+            Node()
+            {
+                m_nextChar = new Node[ALPHA_SIZE];
+                m_Value = null;
+            }
+
+            /** The next nodes.   */
+            final Node m_nextChar[];
+
+            /** The value.   */
+            Object m_Value;
+        }
+        /**
+         * Construct the trie from another Trie.
+         * Both the existing Trie and this new one share the same table for
+         * lookup, and it is assumed that the table is fully populated and
+         * not changing anymore.
+         * 
+         * @param existingTrie the Trie that this one is a copy of.
+         */
+        public Trie(Trie existingTrie)
+        {
+            // copy some fields from the existing Trie into this one.
+            m_Root = existingTrie.m_Root;
+            m_lowerCaseOnly = existingTrie.m_lowerCaseOnly;
+
+            // get a buffer just big enough to hold the longest key in the table.
+            int max = existingTrie.getLongestKeyLength();
+            m_charBuffer = new char[max];
+        }
+
+        /**
+         * Get an object that matches the key.
+         * This method is faster than get(), but is not thread-safe.
+         *
+         * @param key must be a 7-bit ASCII string
+         *
+         * @return The object that matches the key, or null.
+         */
+        public Object get2(final String key)
+        {
+
+            final int len = key.length();
+
+            /* If the name is too long, we won't find it, this also keeps us
+             * from overflowing m_charBuffer
+             */
+            if (m_charBuffer.length < len)
+                return null;
+
+            Node node = m_Root;
+            switch (len) // optimize the look up based on the number of chars
+            {
+                // case 0 looks silly, but the generated bytecode runs
+                // faster for lookup of elements of length 2 with this in
+                // and a fair bit faster.  Don't know why.
+                case 0 :
+                    {
+                        return null;
+                    }
+
+                case 1 :
+                    {
+                        final char ch = key.charAt(0);
+                        if (ch < ALPHA_SIZE)
+                        {
+                            node = node.m_nextChar[ch];
+                            if (node != null)
+                                return node.m_Value;
+                        }
+                        return null;
+                    }
+                default :
+                    {
+                        /* Copy string into array. This is not thread-safe because
+                         * it modifies the contents of m_charBuffer. If multiple
+                         * threads were to use this Trie they all would be
+                         * using this same array (not good). So this 
+                         * method is not thread-safe, but it is faster because
+                         * converting to a char[] and looping over elements of
+                         * the array is faster than a String's charAt(i).
+                         */
+                        key.getChars(0, len, m_charBuffer, 0);
+
+                        for (int i = 0; i < len; i++)
+                        {
+                            final char ch = m_charBuffer[i];
+                            if (ALPHA_SIZE <= ch)
+                            {
+                                // the key is not 7-bit ASCII so we won't find it here
+                                return null;
+                            }
+
+                            node = node.m_nextChar[ch];
+                            if (node == null)
+                                return null;
+                        }
+
+                        return node.m_Value;
+                    }
+            }
+        }
+
+        /**
+         * Get the length of the longest key used in the table. 
+         */
+        public int getLongestKeyLength()
+        {
+            return m_charBuffer.length;
+        }
+    }
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ToXMLSAXHandler.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ToXMLSAXHandler.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ToXMLSAXHandler.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,794 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: ToXMLSAXHandler.java,v 1.1.2.1 2007/01/09 18:57:23 alexsmirnov Exp $
+ */
+ package org.ajax4jsf.xml.serializer;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.Writer;
+import java.util.Properties;
+
+import javax.xml.transform.Result;
+
+import org.w3c.dom.Node;
+import org.xml.sax.Attributes;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.Locator;
+import org.xml.sax.SAXException;
+import org.xml.sax.ext.LexicalHandler;
+
+/**
+ * This class receives notification of SAX-like events, and with gathered
+ * information over these calls it will invoke the equivalent SAX methods
+ * on a handler, the ultimate xsl:output method is known to be "xml".
+ * 
+ * This class is not a public API, it is only public because it is used by Xalan.
+ * @xsl.usage internal
+ */
+public final class ToXMLSAXHandler extends ToSAXHandler
+{
+
+    /**
+     * Keeps track of whether output escaping is currently enabled
+     */
+    protected boolean m_escapeSetting = false;
+
+    public ToXMLSAXHandler()
+    {
+        // default constructor (need to set content handler ASAP !)
+        m_prefixMap = new NamespaceMappings();
+        initCDATA();
+    }
+
+    /**
+     * @see Serializer#getOutputFormat()
+     */
+    public Properties getOutputFormat()
+    {
+        return null;
+    }
+
+    /**
+     * @see Serializer#getOutputStream()
+     */
+    public OutputStream getOutputStream()
+    {
+        return null;
+    }
+
+    /**
+     * @see Serializer#getWriter()
+     */
+    public Writer getWriter()
+    {
+        return null;
+    }
+
+    /**
+     * Do nothing for SAX.
+     */
+    public void indent(int n) throws SAXException
+    {
+    }
+
+
+    /**
+     * @see DOMSerializer#serialize(Node)
+     */
+    public void serialize(Node node) throws IOException
+    {
+    }
+
+    /**
+     * @see SerializationHandler#setEscaping(boolean)
+     */
+    public boolean setEscaping(boolean escape) throws SAXException
+    {
+        boolean oldEscapeSetting = m_escapeSetting;
+        m_escapeSetting = escape;
+
+        if (escape) {
+            processingInstruction(Result.PI_ENABLE_OUTPUT_ESCAPING, "");
+        } else {
+            processingInstruction(Result.PI_DISABLE_OUTPUT_ESCAPING, "");
+        }
+
+        return oldEscapeSetting;
+    }
+
+    /**
+     * @see Serializer#setOutputFormat(Properties)
+     */
+    public void setOutputFormat(Properties format)
+    {
+    }
+
+    /**
+     * @see Serializer#setOutputStream(OutputStream)
+     */
+    public void setOutputStream(OutputStream output)
+    {
+    }
+
+    /**
+     * @see Serializer#setWriter(Writer)
+     */
+    public void setWriter(Writer writer)
+    {
+    }
+
+    /**
+     * @see org.xml.sax.ext.DeclHandler#attributeDecl(String, String, String, String, String)
+     */
+    public void attributeDecl(
+        String arg0,
+        String arg1,
+        String arg2,
+        String arg3,
+        String arg4)
+        throws SAXException
+    {
+    }
+
+    /**
+     * @see org.xml.sax.ext.DeclHandler#elementDecl(String, String)
+     */
+    public void elementDecl(String arg0, String arg1) throws SAXException
+    {
+    }
+
+    /**
+     * @see org.xml.sax.ext.DeclHandler#externalEntityDecl(String, String, String)
+     */
+    public void externalEntityDecl(String arg0, String arg1, String arg2)
+        throws SAXException
+    {
+    }
+
+    /**
+     * @see org.xml.sax.ext.DeclHandler#internalEntityDecl(String, String)
+     */
+    public void internalEntityDecl(String arg0, String arg1)
+        throws SAXException
+    {
+    }
+
+    /**
+     * Receives notification of the end of the document.
+     * @see org.xml.sax.ContentHandler#endDocument()
+     */
+    public void endDocument() throws SAXException
+    {
+
+        flushPending();
+
+        // Close output document
+        m_saxHandler.endDocument();
+
+        if (m_tracer != null)
+            super.fireEndDoc();
+    }
+
+    /**
+     * This method is called when all the data needed for a call to the
+     * SAX handler's startElement() method has been gathered.
+     */
+    protected void closeStartTag() throws SAXException
+    {
+
+        m_elemContext.m_startTagOpen = false;
+
+        final String localName = getLocalName(m_elemContext.m_elementName);
+        final String uri = getNamespaceURI(m_elemContext.m_elementName, true);
+
+        // Now is time to send the startElement event
+        if (m_needToCallStartDocument)
+        {
+            startDocumentInternal();
+        }
+        m_saxHandler.startElement(uri, localName, m_elemContext.m_elementName, m_attributes);
+        // we've sent the official SAX attributes on their way,
+        // now we don't need them anymore.
+        m_attributes.clear();
+
+        if(m_state != null)
+          m_state.setCurrentNode(null);
+    }
+
+    /**
+     * Closes ane open cdata tag, and
+     * unlike the this.endCDATA() method (from the LexicalHandler) interface,
+     * this "internal" method will send the endCDATA() call to the wrapped
+     * handler.
+     * 
+     */
+    public void closeCDATA() throws SAXException
+    {
+
+        // Output closing bracket - "]]>"
+        if (m_lexHandler != null && m_cdataTagOpen) {
+            m_lexHandler.endCDATA();
+        }
+        
+
+        // There are no longer any calls made to 
+        // m_lexHandler.startCDATA() without a balancing call to
+        // m_lexHandler.endCDATA()
+        // so we set m_cdataTagOpen to false to remember this.
+        m_cdataTagOpen = false;        
+    }
+
+    /**
+     * @see org.xml.sax.ContentHandler#endElement(String, String, String)
+     */
+    public void endElement(String namespaceURI, String localName, String qName)
+        throws SAXException
+    {
+        // Close any open elements etc.
+        flushPending();
+        
+        if (namespaceURI == null)
+        {
+            if (m_elemContext.m_elementURI != null)
+                namespaceURI = m_elemContext.m_elementURI;
+            else
+                namespaceURI = getNamespaceURI(qName, true);
+        }
+        
+        if (localName == null)
+        {
+            if (m_elemContext.m_elementLocalName != null)
+                localName = m_elemContext.m_elementLocalName;
+            else
+                localName = getLocalName(qName);
+        }
+
+        m_saxHandler.endElement(namespaceURI, localName, qName);
+
+        if (m_tracer != null)
+            super.fireEndElem(qName);       
+
+        /* Pop all namespaces at the current element depth.
+         * We are not waiting for official endPrefixMapping() calls.
+         */
+        m_prefixMap.popNamespaces(m_elemContext.m_currentElemDepth,
+            m_saxHandler);
+        m_elemContext = m_elemContext.m_prev;
+    }
+
+    /**
+     * @see org.xml.sax.ContentHandler#endPrefixMapping(String)
+     */
+    public void endPrefixMapping(String prefix) throws SAXException
+    {
+        /* poping all prefix mappings should have been done
+         * in endElement() already
+         */
+         return;
+    }
+
+    /**
+     * @see org.xml.sax.ContentHandler#ignorableWhitespace(char[], int, int)
+     */
+    public void ignorableWhitespace(char[] arg0, int arg1, int arg2)
+        throws SAXException
+    {
+        m_saxHandler.ignorableWhitespace(arg0,arg1,arg2);
+    }
+
+    /**
+     * @see org.xml.sax.ContentHandler#setDocumentLocator(Locator)
+     */
+    public void setDocumentLocator(Locator arg0)
+    {
+        m_saxHandler.setDocumentLocator(arg0);
+    }
+
+    /**
+     * @see org.xml.sax.ContentHandler#skippedEntity(String)
+     */
+    public void skippedEntity(String arg0) throws SAXException
+    {
+        m_saxHandler.skippedEntity(arg0);
+    }
+
+    /**
+     * @see org.xml.sax.ContentHandler#startPrefixMapping(String, String)
+     * @param prefix The prefix that maps to the URI
+     * @param uri The URI for the namespace
+     */
+    public void startPrefixMapping(String prefix, String uri)
+        throws SAXException
+    {
+       startPrefixMapping(prefix, uri, true);
+    }
+
+    /**
+     * Remember the prefix/uri mapping at the current nested element depth.
+     *
+     * @see org.xml.sax.ContentHandler#startPrefixMapping(String, String)
+     * @param prefix The prefix that maps to the URI
+     * @param uri The URI for the namespace
+     * @param shouldFlush a flag indicating if the mapping applies to the
+     * current element or an up coming child (not used).
+     */
+
+    public boolean startPrefixMapping(
+        String prefix,
+        String uri,
+        boolean shouldFlush)
+        throws org.xml.sax.SAXException
+    {
+
+        /* Remember the mapping, and at what depth it was declared
+         * This is one greater than the current depth because these
+         * mappings will apply to the next depth. This is in
+         * consideration that startElement() will soon be called
+         */
+
+        boolean pushed;
+        int pushDepth;
+        if (shouldFlush)
+        {
+            flushPending();
+            // the prefix mapping applies to the child element (one deeper)
+            pushDepth = m_elemContext.m_currentElemDepth + 1;
+        }
+        else
+        {
+            // the prefix mapping applies to the current element
+            pushDepth = m_elemContext.m_currentElemDepth;
+        }
+        pushed = m_prefixMap.pushNamespace(prefix, uri, pushDepth);
+
+        if (pushed)
+        {
+            m_saxHandler.startPrefixMapping(prefix,uri);
+            
+            if (getShouldOutputNSAttr()) 
+            {
+
+	              /* Brian M.: don't know if we really needto do this. The
+	               * callers of this object should have injected both
+	               * startPrefixMapping and the attributes.  We are
+	               * just covering our butt here.
+	               */
+	              String name;
+  	            if (EMPTYSTRING.equals(prefix))
+  	            {
+  	                name = "xmlns";
+  	                addAttributeAlways(XMLNS_URI, name, name,"CDATA",uri, false);
+  	            }
+  	            else 
+                {
+  	                if (!EMPTYSTRING.equals(uri)) // hack for XSLTC attribset16 test
+  	                {                             // that maps ns1 prefix to "" URI 
+  	                    name = "xmlns:" + prefix;
+  	
+  	                    /* for something like xmlns:abc="w3.pretend.org"
+  	             	 	     *  the uri is the value, that is why we pass it in the
+  	             	 	     * value, or 5th slot of addAttributeAlways()
+  	                 	   */
+  	                    addAttributeAlways(XMLNS_URI, prefix, name,"CDATA",uri, false );
+  	                }
+  	            }
+            }
+        }
+        return pushed;
+    }
+        
+
+    /**
+     * @see org.xml.sax.ext.LexicalHandler#comment(char[], int, int)
+     */
+    public void comment(char[] arg0, int arg1, int arg2) throws SAXException
+    {
+        flushPending();
+        if (m_lexHandler != null)
+            m_lexHandler.comment(arg0, arg1, arg2);
+            
+        if (m_tracer != null)            
+            super.fireCommentEvent(arg0, arg1, arg2);
+    }
+
+    /**
+     * @see org.xml.sax.ext.LexicalHandler#endCDATA()
+     */
+    public void endCDATA() throws SAXException
+    {
+        /* Normally we would do somthing with this but we ignore it.
+         * The neccessary call to m_lexHandler.endCDATA() will be made
+         * in flushPending().
+         * 
+         * This is so that if we get calls like these:
+         *   this.startCDATA();
+         *   this.characters(chars1, off1, len1);
+         *   this.endCDATA();
+         *   this.startCDATA();
+         *   this.characters(chars2, off2, len2);
+         *   this.endCDATA();
+         * 
+         * that we will only make these calls to the wrapped handlers:
+         * 
+         *   m_lexHandler.startCDATA();
+         *   m_saxHandler.characters(chars1, off1, len1);
+         *   m_saxHandler.characters(chars1, off2, len2);
+         *   m_lexHandler.endCDATA();
+         * 
+         * We will merge adjacent CDATA blocks.
+         */ 
+    }
+
+    /**
+     * @see org.xml.sax.ext.LexicalHandler#endDTD()
+     */
+    public void endDTD() throws SAXException
+    {
+        if (m_lexHandler != null)
+            m_lexHandler.endDTD();
+    }
+
+    /**
+     * @see org.xml.sax.ext.LexicalHandler#startEntity(String)
+     */
+    public void startEntity(String arg0) throws SAXException
+    {
+        if (m_lexHandler != null)
+            m_lexHandler.startEntity(arg0);
+    }
+
+    /**
+     * @see ExtendedContentHandler#characters(String)
+     */
+    public void characters(String chars) throws SAXException
+    {
+        final int length = chars.length();
+        if (length > m_charsBuff.length)
+        {
+            m_charsBuff = new char[length*2 + 1];
+        }
+        chars.getChars(0, length, m_charsBuff, 0);
+        this.characters(m_charsBuff, 0, length); 
+    }
+
+    /////////////////// from XSLTC //////////////
+    public ToXMLSAXHandler(ContentHandler handler, String encoding)
+    {
+        super(handler, encoding);
+
+        initCDATA();
+        // initNamespaces();
+        m_prefixMap = new NamespaceMappings();
+    }
+
+    public ToXMLSAXHandler(
+        ContentHandler handler,
+        LexicalHandler lex,
+        String encoding)
+    {
+        super(handler, lex, encoding);
+
+        initCDATA();
+        //      initNamespaces();
+        m_prefixMap = new NamespaceMappings();
+    }
+
+    /**
+     * Start an element in the output document. This might be an XML element
+     * (<elem>data</elem> type) or a CDATA section.
+     */
+    public void startElement(
+    String elementNamespaceURI,
+    String elementLocalName,
+    String elementName) throws SAXException
+    {
+        startElement(
+            elementNamespaceURI,elementLocalName,elementName, null);
+
+
+    }
+    public void startElement(String elementName) throws SAXException
+    {
+        startElement(null, null, elementName, null);
+    }
+
+
+    public void characters(char[] ch, int off, int len) throws SAXException
+    {
+        // We do the first two things in flushPending() but we don't
+        // close any open CDATA calls.        
+        if (m_needToCallStartDocument)
+        {
+            startDocumentInternal();
+            m_needToCallStartDocument = false;
+        }
+
+        if (m_elemContext.m_startTagOpen)
+        {
+            closeStartTag();
+            m_elemContext.m_startTagOpen = false;
+        }
+
+        if (m_elemContext.m_isCdataSection && !m_cdataTagOpen
+        && m_lexHandler != null) 
+        {
+            m_lexHandler.startCDATA();
+            // We have made a call to m_lexHandler.startCDATA() with
+            // no balancing call to m_lexHandler.endCDATA()
+            // so we set m_cdataTagOpen true to remember this.
+            m_cdataTagOpen = true;
+        }
+        
+        /* If there are any occurances of "]]>" in the character data
+         * let m_saxHandler worry about it, we've already warned them with
+         * the previous call of m_lexHandler.startCDATA();
+         */ 
+        m_saxHandler.characters(ch, off, len);
+
+        // time to generate characters event
+        if (m_tracer != null)
+            fireCharEvent(ch, off, len);
+    }
+    
+
+    /**
+     * @see ExtendedContentHandler#endElement(String)
+     */
+    public void endElement(String elemName) throws SAXException
+    {
+        endElement(null, null, elemName);
+    }    
+
+
+    /**
+     * Send a namespace declaration in the output document. The namespace
+     * declaration will not be include if the namespace is already in scope
+     * with the same prefix.
+     */
+    public void namespaceAfterStartElement(
+        final String prefix,
+        final String uri)
+        throws SAXException
+    {
+        startPrefixMapping(prefix,uri,false);
+    }
+
+    /**
+     *
+     * @see org.xml.sax.ContentHandler#processingInstruction(String, String)
+     * Send a processing instruction to the output document
+     */
+    public void processingInstruction(String target, String data)
+        throws SAXException
+    {
+        flushPending();
+
+        // Pass the processing instruction to the SAX handler
+        m_saxHandler.processingInstruction(target, data);
+
+        // we don't want to leave serializer to fire off this event,
+        // so do it here.
+        if (m_tracer != null)
+            super.fireEscapingEvent(target, data);
+    }
+
+    /**
+     * Undeclare the namespace that is currently pointed to by a given
+     * prefix. Inform SAX handler if prefix was previously mapped.
+     */
+    protected boolean popNamespace(String prefix)
+    {
+        try
+        {
+            if (m_prefixMap.popNamespace(prefix))
+            {
+                m_saxHandler.endPrefixMapping(prefix);
+                return true;
+            }
+        }
+        catch (SAXException e)
+        {
+            // falls through
+        }
+        return false;
+    }
+
+    public void startCDATA() throws SAXException
+    {
+        /* m_cdataTagOpen can only be true here if we have ignored the
+         * previous call to this.endCDATA() and the previous call 
+         * this.startCDATA() before that is still "open". In this way
+         * we merge adjacent CDATA. If anything else happened after the 
+         * ignored call to this.endCDATA() and this call then a call to 
+         * flushPending() would have been made which would have
+         * closed the CDATA and set m_cdataTagOpen to false.
+         */
+        if (!m_cdataTagOpen ) 
+        {
+            flushPending();
+            if (m_lexHandler != null) {
+                m_lexHandler.startCDATA();
+
+                // We have made a call to m_lexHandler.startCDATA() with
+                // no balancing call to m_lexHandler.endCDATA()
+                // so we set m_cdataTagOpen true to remember this.                
+                m_cdataTagOpen = true;     
+            }              
+        }        
+    }
+
+    /**
+     * @see org.xml.sax.ContentHandler#startElement(String, String, String, Attributes)
+     */
+    public void startElement(
+    String namespaceURI,
+    String localName,
+    String name,
+    Attributes atts)
+        throws SAXException
+    {
+        flushPending();
+        super.startElement(namespaceURI, localName, name, atts);
+
+        // Handle document type declaration (for first element only)
+         if (m_needToOutputDocTypeDecl)
+         {
+             String doctypeSystem = getDoctypeSystem();
+             if (doctypeSystem != null && m_lexHandler != null)
+             {
+                 String doctypePublic = getDoctypePublic();
+                 if (doctypeSystem != null)
+                     m_lexHandler.startDTD(
+                         name,
+                         doctypePublic,
+                         doctypeSystem);
+             }
+             m_needToOutputDocTypeDecl = false;
+         }
+        m_elemContext = m_elemContext.push(namespaceURI, localName, name);
+
+        // ensurePrefixIsDeclared depends on the current depth, so
+        // the previous increment is necessary where it is.
+        if (namespaceURI != null)
+            ensurePrefixIsDeclared(namespaceURI, name);
+
+        // add the attributes to the collected ones
+        if (atts != null)
+            addAttributes(atts);
+
+         
+        // do we really need this CDATA section state?
+        m_elemContext.m_isCdataSection = isCdataSection();
+   
+    }
+ 
+    private void ensurePrefixIsDeclared(String ns, String rawName)
+        throws org.xml.sax.SAXException
+    {
+
+        if (ns != null && ns.length() > 0)
+        {
+            int index;
+            final boolean no_prefix = ((index = rawName.indexOf(":")) < 0);
+            String prefix = (no_prefix) ? "" : rawName.substring(0, index);
+
+
+            if (null != prefix)
+            {
+                String foundURI = m_prefixMap.lookupNamespace(prefix);
+
+                if ((null == foundURI) || !foundURI.equals(ns))
+                {
+                    this.startPrefixMapping(prefix, ns, false);
+
+                    if (getShouldOutputNSAttr()) {
+                        // Bugzilla1133: Generate attribute as well as namespace event.
+                        // SAX does expect both.
+                        this.addAttributeAlways(
+                            "http://www.w3.org/2000/xmlns/",
+                            no_prefix ? "xmlns" : prefix,  // local name
+                            no_prefix ? "xmlns" : ("xmlns:"+ prefix), // qname
+                            "CDATA",
+                            ns,
+                            false);
+                    }
+                }
+
+            }
+        }
+    }
+    /**
+     * Adds the given attribute to the set of attributes, and also makes sure
+     * that the needed prefix/uri mapping is declared, but only if there is a
+     * currently open element.
+     * 
+     * @param uri the URI of the attribute
+     * @param localName the local name of the attribute
+     * @param rawName    the qualified name of the attribute
+     * @param type the type of the attribute (probably CDATA)
+     * @param value the value of the attribute
+     * @param XSLAttribute true if this attribute is coming from an xsl:attribute element
+     * @see ExtendedContentHandler#addAttribute(String, String, String, String, String)
+     */
+    public void addAttribute(
+        String uri,
+        String localName,
+        String rawName,
+        String type,
+        String value,
+        boolean XSLAttribute)
+        throws SAXException
+    {      
+        if (m_elemContext.m_startTagOpen)
+        {
+            ensurePrefixIsDeclared(uri, rawName);
+            addAttributeAlways(uri, localName, rawName, type, value, false);
+        }
+
+    } 
+       
+    /**
+     * Try's to reset the super class and reset this class for 
+     * re-use, so that you don't need to create a new serializer 
+     * (mostly for performance reasons).
+     * 
+     * @return true if the class was successfuly reset.
+     * @see Serializer#reset()
+     */
+    public boolean reset()
+    {
+        boolean wasReset = false;
+        if (super.reset())
+        {
+            resetToXMLSAXHandler();
+            wasReset = true;
+        }
+        return wasReset;
+    }
+    
+    /**
+     * Reset all of the fields owned by ToXMLSAXHandler class
+     *
+     */
+    private void resetToXMLSAXHandler()
+    {
+        this.m_escapeSetting = false;
+    }  
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ToXMLStream.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ToXMLStream.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ToXMLStream.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,644 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: ToXMLStream.java,v 1.1.2.1 2007/01/09 18:57:21 alexsmirnov Exp $
+ */
+ package org.ajax4jsf.xml.serializer;
+
+import java.io.IOException;
+
+import javax.xml.transform.ErrorListener;
+import javax.xml.transform.Result;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerException;
+
+import org.ajax4jsf.xml.serializer.utils.MsgKey;
+import org.ajax4jsf.xml.serializer.utils.Utils;
+import org.xml.sax.SAXException;
+
+/**
+ * This class converts SAX or SAX-like calls to a 
+ * serialized xml document.  The xsl:output method is "xml".
+ * 
+ * This class is used explicitly in code generated by XSLTC, 
+ * so it is "public", but it should 
+ * be viewed as internal or package private, this is not an API.
+ * 
+ * @xsl.usage internal
+ */
+public final class ToXMLStream extends ToStream
+{
+
+    /**
+     * remembers if we need to write out "]]>" to close the CDATA
+     */
+    boolean m_cdataTagOpen = false;
+
+
+    /**
+     * Map that tells which XML characters should have special treatment, and it
+     *  provides character to entity name lookup.
+     */
+    private static CharInfo m_xmlcharInfo =
+//      new CharInfo(CharInfo.XML_ENTITIES_RESOURCE);
+        CharInfo.getCharInfo(CharInfo.XML_ENTITIES_RESOURCE, Method.XML);
+
+    /**
+     * Default constructor.
+     */
+    public ToXMLStream()
+    {
+        m_charInfo = m_xmlcharInfo;
+
+        initCDATA();
+        // initialize namespaces
+        m_prefixMap = new NamespaceMappings();
+
+    }
+
+    /**
+     * Copy properties from another SerializerToXML.
+     *
+     * @param xmlListener non-null reference to a SerializerToXML object.
+     */
+    public void CopyFrom(ToXMLStream xmlListener)
+    {
+
+        m_writer = xmlListener.m_writer;
+
+
+        // m_outputStream = xmlListener.m_outputStream;
+        String encoding = xmlListener.getEncoding();
+        setEncoding(encoding);
+
+        setOmitXMLDeclaration(xmlListener.getOmitXMLDeclaration());
+
+        m_ispreserve = xmlListener.m_ispreserve;
+        m_preserves = xmlListener.m_preserves;
+        m_isprevtext = xmlListener.m_isprevtext;
+        m_doIndent = xmlListener.m_doIndent;
+        setIndentAmount(xmlListener.getIndentAmount());
+        m_startNewLine = xmlListener.m_startNewLine;
+        m_needToOutputDocTypeDecl = xmlListener.m_needToOutputDocTypeDecl;
+        setDoctypeSystem(xmlListener.getDoctypeSystem());
+        setDoctypePublic(xmlListener.getDoctypePublic());        
+        setStandalone(xmlListener.getStandalone());
+        setMediaType(xmlListener.getMediaType());
+        m_encodingInfo = xmlListener.m_encodingInfo;
+        m_spaceBeforeClose = xmlListener.m_spaceBeforeClose;
+        m_cdataStartCalled = xmlListener.m_cdataStartCalled;
+
+    }
+
+    /**
+     * Receive notification of the beginning of a document.
+     *
+     * @throws org.xml.sax.SAXException Any SAX exception, possibly
+     *            wrapping another exception.
+     *
+     * @throws org.xml.sax.SAXException
+     */
+    public void startDocumentInternal() throws org.xml.sax.SAXException
+    {
+
+        if (m_needToCallStartDocument)
+        { 
+            super.startDocumentInternal();
+            m_needToCallStartDocument = false;
+
+            if (m_inEntityRef)
+                return;
+
+            m_needToOutputDocTypeDecl = true;
+            m_startNewLine = false;
+            /* The call to getXMLVersion() might emit an error message
+             * and we should emit this message regardless of if we are 
+             * writing out an XML header or not.
+             */ 
+            final String version = getXMLVersion();
+            if (getOmitXMLDeclaration() == false)
+            {
+                String encoding = Encodings.getMimeEncoding(getEncoding());
+                String standalone;
+
+                if (m_standaloneWasSpecified)
+                {
+                    standalone = " standalone=\"" + getStandalone() + "\"";
+                }
+                else
+                {
+                    standalone = "";
+                }
+
+                try
+                {
+                    final java.io.Writer writer = m_writer;
+                    writer.write("<?xml version=\"");
+                    writer.write(version);
+                    writer.write("\" encoding=\"");
+                    writer.write(encoding);
+                    writer.write('\"');
+                    writer.write(standalone);
+                    writer.write("?>");
+                    if (m_doIndent)
+                        writer.write(m_lineSep, 0, m_lineSepLen);
+                } 
+                catch(IOException e)
+                {
+                    throw new SAXException(e);
+                }
+
+            }
+        }
+    }
+
+    /**
+     * Receive notification of the end of a document.
+     *
+     * @throws org.xml.sax.SAXException Any SAX exception, possibly
+     *            wrapping another exception.
+     *
+     * @throws org.xml.sax.SAXException
+     */
+    public void endDocument() throws org.xml.sax.SAXException
+    {
+        flushPending();
+        if (m_doIndent && !m_isprevtext)
+        {
+            try
+            {
+            outputLineSep();
+            }
+            catch(IOException e)
+            {
+                throw new SAXException(e);
+            }
+        }
+
+        flushWriter();
+        
+        if (m_tracer != null)
+            super.fireEndDoc();
+    }
+
+    /**
+     * Starts a whitespace preserving section. All characters printed
+     * within a preserving section are printed without indentation and
+     * without consolidating multiple spaces. This is equivalent to
+     * the <tt>xml:space=&quot;preserve&quot;</tt> attribute. Only XML
+     * and HTML serializers need to support this method.
+     * <p>
+     * The contents of the whitespace preserving section will be delivered
+     * through the regular <tt>characters</tt> event.
+     *
+     * @throws org.xml.sax.SAXException
+     */
+    public void startPreserving() throws org.xml.sax.SAXException
+    {
+
+        // Not sure this is really what we want.  -sb
+        m_preserves.push(true);
+
+        m_ispreserve = true;
+    }
+
+    /**
+     * Ends a whitespace preserving section.
+     *
+     * @see #startPreserving
+     *
+     * @throws org.xml.sax.SAXException
+     */
+    public void endPreserving() throws org.xml.sax.SAXException
+    {
+
+        // Not sure this is really what we want.  -sb
+        m_ispreserve = m_preserves.isEmpty() ? false : m_preserves.pop();
+    }
+
+    /**
+     * Receive notification of a processing instruction.
+     *
+     * @param target The processing instruction target.
+     * @param data The processing instruction data, or null if
+     *        none was supplied.
+     * @throws org.xml.sax.SAXException Any SAX exception, possibly
+     *            wrapping another exception.
+     *
+     * @throws org.xml.sax.SAXException
+     */
+    public void processingInstruction(String target, String data)
+        throws org.xml.sax.SAXException
+    {
+        if (m_inEntityRef)
+            return;
+        
+        flushPending();   
+
+        if (target.equals(Result.PI_DISABLE_OUTPUT_ESCAPING))
+        {
+            startNonEscaping();
+        }
+        else if (target.equals(Result.PI_ENABLE_OUTPUT_ESCAPING))
+        {
+            endNonEscaping();
+        }
+        else
+        {
+            try
+            {
+                if (m_elemContext.m_startTagOpen)
+                {
+                    closeStartTag();
+                    m_elemContext.m_startTagOpen = false;
+                }
+                else if (m_needToCallStartDocument)
+                    startDocumentInternal();                
+
+                if (shouldIndent())
+                    indent();
+
+                final java.io.Writer writer = m_writer;
+                writer.write("<?");
+                writer.write(target);
+
+                if (data.length() > 0
+                    && !Character.isSpaceChar(data.charAt(0)))
+                    writer.write(' ');
+
+                int indexOfQLT = data.indexOf("?>");
+
+                if (indexOfQLT >= 0)
+                {
+
+                    // See XSLT spec on error recovery of "?>" in PIs.
+                    if (indexOfQLT > 0)
+                    {
+                        writer.write(data.substring(0, indexOfQLT));
+                    }
+
+                    writer.write("? >"); // add space between.
+
+                    if ((indexOfQLT + 2) < data.length())
+                    {
+                        writer.write(data.substring(indexOfQLT + 2));
+                    }
+                }
+                else
+                {
+                    writer.write(data);
+                }
+
+                writer.write('?');
+                writer.write('>');
+
+                // Always output a newline char if not inside of an
+                // element. The whitespace is not significant in that
+                // case.
+                if (m_elemContext.m_currentElemDepth <= 0)
+                    writer.write(m_lineSep, 0, m_lineSepLen);
+
+                m_startNewLine = true;
+            }
+            catch(IOException e)
+            {
+                throw new SAXException(e);
+            }
+        }
+        
+        if (m_tracer != null)
+            super.fireEscapingEvent(target, data);  
+    }
+
+    /**
+     * Receive notivication of a entityReference.
+     *
+     * @param name The name of the entity.
+     *
+     * @throws org.xml.sax.SAXException
+     */
+    public void entityReference(String name) throws org.xml.sax.SAXException
+    {
+        if (m_elemContext.m_startTagOpen)
+        {
+            closeStartTag();
+            m_elemContext.m_startTagOpen = false;
+        }
+
+        try
+        {
+            if (shouldIndent())
+                indent();
+
+            final java.io.Writer writer = m_writer;
+            writer.write('&');
+            writer.write(name);
+            writer.write(';');
+        }
+        catch(IOException e)
+        {
+            throw new SAXException(e);
+        }
+        
+        if (m_tracer != null)
+            super.fireEntityReference(name);            
+    }
+
+    /**
+     * This method is used to add an attribute to the currently open element. 
+     * The caller has guaranted that this attribute is unique, which means that it
+     * not been seen before and will not be seen again.
+     * 
+     * @param name the qualified name of the attribute
+     * @param value the value of the attribute which can contain only
+     * ASCII printable characters characters in the range 32 to 127 inclusive.
+     * @param flags the bit values of this integer give optimization information.
+     */
+    public void addUniqueAttribute(String name, String value, int flags)
+        throws SAXException
+    {
+        if (m_elemContext.m_startTagOpen)
+        {
+           
+            try
+            {
+                final String patchedName = patchName(name);
+                final java.io.Writer writer = m_writer;
+                if ((flags & NO_BAD_CHARS) > 0 && m_xmlcharInfo.onlyQuotAmpLtGt)
+                {
+                    // "flags" has indicated that the characters
+                    // '>'  '<'   '&'  and '"' are not in the value and
+                    // m_htmlcharInfo has recorded that there are no other
+                    // entities in the range 32 to 127 so we write out the
+                    // value directly
+                    
+                    writer.write(' ');
+                    writer.write(patchedName);
+                    writer.write("=\"");
+                    writer.write(value);
+                    writer.write('"');
+                }
+                else
+                {
+                    writer.write(' ');
+                    writer.write(patchedName);
+                    writer.write("=\"");
+                    writeAttrString(writer, value, this.getEncoding());
+                    writer.write('"');
+                }
+            } catch (IOException e) {
+                throw new SAXException(e);
+            }
+        }
+    }
+
+    /**
+     * Add an attribute to the current element.
+     * @param uri the URI associated with the element name
+     * @param localName local part of the attribute name
+     * @param rawName   prefix:localName
+     * @param type
+     * @param value the value of the attribute
+     * @param xslAttribute true if this attribute is from an xsl:attribute,
+     * false if declared within the elements opening tag.
+     * @throws SAXException
+     */
+    public void addAttribute(
+        String uri,
+        String localName,
+        String rawName,
+        String type,
+        String value,
+        boolean xslAttribute)
+        throws SAXException
+    {
+        if (m_elemContext.m_startTagOpen)
+        {
+            boolean was_added = addAttributeAlways(uri, localName, rawName, type, value, xslAttribute);
+            
+
+            /*
+             * We don't run this block of code if:
+             * 1. The attribute value was only replaced (was_added is false).
+             * 2. The attribute is from an xsl:attribute element (that is handled
+             *    in the addAttributeAlways() call just above.
+             * 3. The name starts with "xmlns", i.e. it is a namespace declaration.
+             */
+            if (was_added && !xslAttribute && !rawName.startsWith("xmlns"))
+            {
+                String prefixUsed =
+                    ensureAttributesNamespaceIsDeclared(
+                        uri,
+                        localName,
+                        rawName);
+                if (prefixUsed != null
+                    && rawName != null
+                    && !rawName.startsWith(prefixUsed))
+                {
+                    // use a different raw name, with the prefix used in the
+                    // generated namespace declaration
+                    rawName = prefixUsed + ":" + localName;
+
+                }
+            }
+            addAttributeAlways(uri, localName, rawName, type, value, xslAttribute);
+        }
+        else
+        {
+            /*
+             * The startTag is closed, yet we are adding an attribute?
+             *
+             * Section: 7.1.3 Creating Attributes Adding an attribute to an
+             * element after a PI (for example) has been added to it is an
+             * error. The attributes can be ignored. The spec doesn't explicitly
+             * say this is disallowed, as it does for child elements, but it
+             * makes sense to have the same treatment.
+             *
+             * We choose to ignore the attribute which is added too late.
+             */
+            // Generate a warning of the ignored attributes
+
+            // Create the warning message
+            String msg = Utils.messages.createMessage(
+                    MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION,new Object[]{ localName });
+
+            try {
+                // Prepare to issue the warning message
+                Transformer tran = super.getTransformer();
+                ErrorListener errHandler = tran.getErrorListener();
+
+
+                // Issue the warning message
+                if (null != errHandler && m_sourceLocator != null)
+                  errHandler.warning(new TransformerException(msg, m_sourceLocator));
+                else
+                  System.out.println(msg);
+                }
+            catch (Exception e){}             
+        }
+    }
+
+    /**
+     * @see ExtendedContentHandler#endElement(String)
+     */
+    public void endElement(String elemName) throws SAXException
+    {
+        endElement(null, null, elemName);
+    }
+
+    /**
+     * This method is used to notify the serializer of a namespace mapping (or node)
+     * that applies to the current element whose startElement() call has already been seen.
+     * The official SAX startPrefixMapping(prefix,uri) is to define a mapping for a child
+     * element that is soon to be seen with a startElement() call. The official SAX call 
+     * does not apply to the current element, hence the reason for this method.
+     */
+    public void namespaceAfterStartElement(
+        final String prefix,
+        final String uri)
+        throws SAXException
+    {
+
+        // hack for XSLTC with finding URI for default namespace
+        if (m_elemContext.m_elementURI == null)
+        {
+            String prefix1 = getPrefixPart(m_elemContext.m_elementName);
+            if (prefix1 == null && EMPTYSTRING.equals(prefix))
+            {
+                // the elements URI is not known yet, and it
+                // doesn't have a prefix, and we are currently
+                // setting the uri for prefix "", so we have
+                // the uri for the element... lets remember it
+                m_elemContext.m_elementURI = uri;
+            }
+        }            
+        startPrefixMapping(prefix,uri,false);
+        return;
+
+    }
+
+    /**
+     * From XSLTC
+     * Declare a prefix to point to a namespace URI. Inform SAX handler
+     * if this is a new prefix mapping.
+     */
+    protected boolean pushNamespace(String prefix, String uri)
+    {
+        try
+        {
+            if (m_prefixMap.pushNamespace(
+                prefix, uri, m_elemContext.m_currentElemDepth))
+            {
+                startPrefixMapping(prefix, uri);
+                return true;
+            }
+        }
+        catch (SAXException e)
+        {
+            // falls through
+        }
+        return false;
+    }
+    /**
+     * Try's to reset the super class and reset this class for 
+     * re-use, so that you don't need to create a new serializer 
+     * (mostly for performance reasons).
+     * 
+     * @return true if the class was successfuly reset.
+     */
+    public boolean reset()
+    {
+        boolean wasReset = false;
+        if (super.reset())
+        {
+            resetToXMLStream();
+            wasReset = true;
+        }
+        return wasReset;
+    }
+    
+    /**
+     * Reset all of the fields owned by ToStream class
+     *
+     */
+    private void resetToXMLStream()
+    {
+        this.m_cdataTagOpen = false;
+
+    }  
+
+    /**
+     * This method checks for the XML version of output document.
+     * If XML version of output document is not specified, then output 
+     * document is of version XML 1.0.
+     * If XML version of output doucment is specified, but it is not either 
+     * XML 1.0 or XML 1.1, a warning message is generated, the XML Version of
+     * output document is set to XML 1.0 and processing continues.
+     * @return string (XML version)
+     */
+    private String getXMLVersion()
+    {
+        String xmlVersion = getVersion();
+        if(xmlVersion == null || xmlVersion.equals(XMLVERSION10))
+        {
+            xmlVersion = XMLVERSION10;
+        }
+        else if(xmlVersion.equals(XMLVERSION11))
+        {
+            xmlVersion = XMLVERSION11;
+        }
+        else
+        {
+            String msg = Utils.messages.createMessage(
+                               MsgKey.ER_XML_VERSION_NOT_SUPPORTED,new Object[]{ xmlVersion });
+            try 
+            {
+                // Prepare to issue the warning message
+                Transformer tran = super.getTransformer();
+                ErrorListener errHandler = tran.getErrorListener();
+                // Issue the warning message
+                if (null != errHandler && m_sourceLocator != null)
+                    errHandler.warning(new TransformerException(msg, m_sourceLocator));
+                else
+                    System.out.println(msg);
+            }
+            catch (Exception e){}
+            xmlVersion = XMLVERSION10;								
+        }
+        return xmlVersion;
+    }
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/TransformStateSetter.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/TransformStateSetter.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/TransformStateSetter.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,75 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: TransformStateSetter.java,v 1.1.2.1 2007/01/09 18:57:27 alexsmirnov Exp $
+ */
+package org.ajax4jsf.xml.serializer;
+
+import javax.xml.transform.Transformer;
+
+import org.w3c.dom.Node;
+/**
+ * This interface is meant to be used by a base interface to
+ * TransformState, but which as only the setters which have non Xalan
+ * specific types in their signature, so that there are no dependancies
+ * of the serializer on Xalan.
+ * 
+ * This interface is not a public API, it is only public because it is
+ * used by Xalan.
+ * 
+ * @see org.apache.xalan.transformer.TransformState
+ * @xsl.usage internal
+ */
+public interface TransformStateSetter
+{
+
+
+  /**
+   * Set the current node.
+   *
+   * @param n The current node.
+   */
+  void setCurrentNode(Node n);
+
+  /**
+   * Reset the state on the given transformer object.
+   *
+   * @param transformer
+   */
+  void resetState(Transformer transformer);
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/TreeWalker.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/TreeWalker.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/TreeWalker.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,547 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 1999-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: TreeWalker.java,v 1.1.2.1 2007/01/09 18:57:17 alexsmirnov Exp $
+ */
+package org.ajax4jsf.xml.serializer;
+
+import java.io.File;
+
+import javax.xml.transform.TransformerException;
+
+import org.ajax4jsf.xml.serializer.utils.AttList;
+import org.ajax4jsf.xml.serializer.utils.DOM2Helper;
+import org.w3c.dom.Comment;
+import org.w3c.dom.Element;
+import org.w3c.dom.EntityReference;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.w3c.dom.ProcessingInstruction;
+import org.w3c.dom.Text;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.Locator;
+import org.xml.sax.ext.LexicalHandler;
+import org.xml.sax.helpers.LocatorImpl;
+
+/**
+ * This class does a pre-order walk of the DOM tree, calling a ContentHandler
+ * interface as it goes.
+ * 
+ * This class is a copy of the one in org.apache.xml.utils. 
+ * It exists to cut the serializers dependancy on that package.
+ *  
+ * @xsl.usage internal
+ */
+
+public final class TreeWalker
+{
+
+  /** Local reference to a ContentHandler          */
+  final private ContentHandler m_contentHandler;
+  /** 
+   * If m_contentHandler is a SerializationHandler, then this is 
+   * a reference to the same object. 
+   */
+  final private SerializationHandler m_Serializer;
+
+  // ARGHH!!  JAXP Uses Xerces without setting the namespace processing to ON!
+  // DOM2Helper m_dh = new DOM2Helper();
+
+  /** DomHelper for this TreeWalker          */
+  final protected DOM2Helper m_dh;
+        
+  /** Locator object for this TreeWalker          */
+  final private LocatorImpl m_locator = new LocatorImpl();
+
+  /**
+   * Get the ContentHandler used for the tree walk.
+   *
+   * @return the ContentHandler used for the tree walk
+   */
+  public ContentHandler getContentHandler()
+  {
+    return m_contentHandler;
+  }
+  
+  public TreeWalker(ContentHandler ch) {
+      this(ch,null);
+  }
+  /**
+   * Constructor.
+   * @param   contentHandler The implemention of the
+   * contentHandler operation (toXMLString, digest, ...)
+   */
+  public TreeWalker(ContentHandler contentHandler, String systemId)
+  {
+      // Set the content handler
+      m_contentHandler = contentHandler;
+      if (m_contentHandler instanceof SerializationHandler) {
+          m_Serializer = (SerializationHandler) m_contentHandler;
+      }
+      else
+          m_Serializer = null;
+          
+      // Set the system ID, if it is given
+      m_contentHandler.setDocumentLocator(m_locator);
+      if (systemId != null)
+          m_locator.setSystemId(systemId);
+      else {
+          try {
+            // Bug see Bugzilla  26741
+            m_locator.setSystemId(System.getProperty("user.dir") + File.separator + "dummy.xsl");
+           }
+           catch (SecurityException se) {// user.dir not accessible from applet             
+           }
+      }
+          
+      // Set the document locator  
+                if (m_contentHandler != null)
+                        m_contentHandler.setDocumentLocator(m_locator);
+                try {
+                   // Bug see Bugzilla  26741
+                  m_locator.setSystemId(System.getProperty("user.dir") + File.separator + "dummy.xsl");
+                } 
+                catch (SecurityException se){// user.dir not accessible from applet
+                  
+    }
+    m_dh = new DOM2Helper();
+  }
+
+  /**
+   * Perform a pre-order traversal non-recursive style.  
+   *
+   * Note that TreeWalker assumes that the subtree is intended to represent 
+   * a complete (though not necessarily well-formed) document and, during a 
+   * traversal, startDocument and endDocument will always be issued to the 
+   * SAX listener.
+   *  
+   * @param pos Node in the tree where to start traversal
+   *
+   * @throws TransformerException
+   */
+  public void traverse(Node pos) throws org.xml.sax.SAXException
+  {
+
+    this.m_contentHandler.startDocument();
+
+    Node top = pos;
+
+    while (null != pos)
+    {
+      startNode(pos);
+
+      Node nextNode = pos.getFirstChild();
+
+      while (null == nextNode)
+      {
+        endNode(pos);
+
+        if (top.equals(pos))
+          break;
+
+        nextNode = pos.getNextSibling();
+
+        if (null == nextNode)
+        {
+          pos = pos.getParentNode();
+
+          if ((null == pos) || (top.equals(pos)))
+          {
+            if (null != pos)
+              endNode(pos);
+
+            nextNode = null;
+
+            break;
+          }
+        }
+      }
+
+      pos = nextNode;
+    }
+    this.m_contentHandler.endDocument();
+  }
+
+  /**
+   * Perform a pre-order traversal non-recursive style.
+
+   * Note that TreeWalker assumes that the subtree is intended to represent 
+   * a complete (though not necessarily well-formed) document and, during a 
+   * traversal, startDocument and endDocument will always be issued to the 
+   * SAX listener.
+   *
+   * @param pos Node in the tree where to start traversal
+   * @param top Node in the tree where to end traversal
+   *
+   * @throws TransformerException
+   */
+  public void traverse(Node pos, Node top) throws org.xml.sax.SAXException
+  {
+
+    this.m_contentHandler.startDocument();
+    
+    while (null != pos)
+    {
+      startNode(pos);
+
+      Node nextNode = pos.getFirstChild();
+
+      while (null == nextNode)
+      {
+        endNode(pos);
+
+        if ((null != top) && top.equals(pos))
+          break;
+
+        nextNode = pos.getNextSibling();
+
+        if (null == nextNode)
+        {
+          pos = pos.getParentNode();
+
+          if ((null == pos) || ((null != top) && top.equals(pos)))
+          {
+            nextNode = null;
+
+            break;
+          }
+        }
+      }
+
+      pos = nextNode;
+    }
+    this.m_contentHandler.endDocument();
+  }
+
+  /** Flag indicating whether following text to be processed is raw text          */
+  boolean nextIsRaw = false;
+  
+  /**
+   * Optimized dispatch of characters.
+   */
+  private final void dispatachChars(Node node)
+     throws org.xml.sax.SAXException
+  {
+    if(m_Serializer != null)
+    {
+      this.m_Serializer.characters(node);
+    }
+    else
+    {
+      String data = ((Text) node).getData();
+      this.m_contentHandler.characters(data.toCharArray(), 0, data.length());
+    }
+  }
+
+  /**
+   * Start processing given node
+   *
+   *
+   * @param node Node to process
+   *
+   * @throws org.xml.sax.SAXException
+   */
+  protected void startNode(Node node) throws org.xml.sax.SAXException
+  {
+
+//   TODO: <REVIEW>
+//    A Serializer implements ContentHandler, but not NodeConsumer
+//    so drop this reference to NodeConsumer which would otherwise
+//    pull in all sorts of things
+//    if (m_contentHandler instanceof NodeConsumer)
+//    {
+//      ((NodeConsumer) m_contentHandler).setOriginatingNode(node);
+//    }
+//    TODO: </REVIEW>
+                
+                if (node instanceof Locator)
+                {
+                        Locator loc = (Locator)node;
+                        m_locator.setColumnNumber(loc.getColumnNumber());
+                        m_locator.setLineNumber(loc.getLineNumber());
+                        m_locator.setPublicId(loc.getPublicId());
+                        m_locator.setSystemId(loc.getSystemId());
+                }
+                else
+                {
+                        m_locator.setColumnNumber(0);
+      m_locator.setLineNumber(0);
+                }
+
+    switch (node.getNodeType())
+    {
+    case Node.COMMENT_NODE :
+    {
+      String data = ((Comment) node).getData();
+
+      if (m_contentHandler instanceof LexicalHandler)
+      {
+        LexicalHandler lh = ((LexicalHandler) this.m_contentHandler);
+
+        lh.comment(data.toCharArray(), 0, data.length());
+      }
+    }
+    break;
+    case Node.DOCUMENT_FRAGMENT_NODE :
+
+      // ??;
+      break;
+    case Node.DOCUMENT_NODE :
+    
+      break;
+    case Node.ELEMENT_NODE :
+      Element elem_node = (Element) node;
+      {
+          // Make sure the namespace node
+          // for the element itself is declared
+          // to the ContentHandler
+          String uri = elem_node.getNamespaceURI();
+          if (uri != null) {
+              String prefix = elem_node.getPrefix();
+              if (prefix==null)
+                prefix="";
+              this.m_contentHandler.startPrefixMapping(prefix,uri);              
+          }
+      }
+      NamedNodeMap atts = elem_node.getAttributes();
+      int nAttrs = atts.getLength();
+      // System.out.println("TreeWalker#startNode: "+node.getNodeName());
+
+      
+      // Make sure the namespace node of
+      // each attribute is declared to the ContentHandler
+      for (int i = 0; i < nAttrs; i++)
+      {
+        final Node attr = atts.item(i);
+        final String attrName = attr.getNodeName();
+        final int colon = attrName.indexOf(':');
+        final String prefix;
+
+        // System.out.println("TreeWalker#startNode: attr["+i+"] = "+attrName+", "+attr.getNodeValue());
+        if (attrName.equals("xmlns") || attrName.startsWith("xmlns:"))
+        {
+          // Use "" instead of null, as Xerces likes "" for the 
+          // name of the default namespace.  Fix attributed 
+          // to "Steven Murray" <smurray at ebt.com>.
+          if (colon < 0)
+            prefix = "";
+          else
+            prefix = attrName.substring(colon + 1);
+
+          this.m_contentHandler.startPrefixMapping(prefix,
+                                                   attr.getNodeValue());
+        }
+        else if (colon > 0) {
+            prefix = attrName.substring(0,colon);
+            String uri = attr.getNamespaceURI();
+            if (uri != null)
+                this.m_contentHandler.startPrefixMapping(prefix,uri);
+        }        
+      }
+
+      String ns = m_dh.getNamespaceOfNode(node);
+      if(null == ns)
+        ns = "";
+      this.m_contentHandler.startElement(ns,
+                                         m_dh.getLocalNameOfNode(node),
+                                         node.getNodeName(),
+                                         new AttList(atts, m_dh));
+      break;
+    case Node.PROCESSING_INSTRUCTION_NODE :
+    {
+      ProcessingInstruction pi = (ProcessingInstruction) node;
+      String name = pi.getNodeName();
+
+      // String data = pi.getData();
+      if (name.equals("xslt-next-is-raw"))
+      {
+        nextIsRaw = true;
+      }
+      else
+      {
+        this.m_contentHandler.processingInstruction(pi.getNodeName(),
+                                                    pi.getData());
+      }
+    }
+    break;
+    case Node.CDATA_SECTION_NODE :
+    {
+      boolean isLexH = (m_contentHandler instanceof LexicalHandler);
+      LexicalHandler lh = isLexH
+                          ? ((LexicalHandler) this.m_contentHandler) : null;
+
+      if (isLexH)
+      {
+        lh.startCDATA();
+      }
+      
+      dispatachChars(node);
+
+      {
+        if (isLexH)
+        {
+          lh.endCDATA();
+        }
+      }
+    }
+    break;
+    case Node.TEXT_NODE :
+    {
+      //String data = ((Text) node).getData();
+
+      if (nextIsRaw)
+      {
+        nextIsRaw = false;
+
+        m_contentHandler.processingInstruction(javax.xml.transform.Result.PI_DISABLE_OUTPUT_ESCAPING, "");
+        dispatachChars(node);
+        m_contentHandler.processingInstruction(javax.xml.transform.Result.PI_ENABLE_OUTPUT_ESCAPING, "");
+      }
+      else
+      {
+        dispatachChars(node);
+      }
+    }
+    break;
+    case Node.ENTITY_REFERENCE_NODE :
+    {
+      EntityReference eref = (EntityReference) node;
+
+      if (m_contentHandler instanceof LexicalHandler)
+      {
+        ((LexicalHandler) this.m_contentHandler).startEntity(
+          eref.getNodeName());
+      }
+      else
+      {
+
+        // warning("Can not output entity to a pure SAX ContentHandler");
+      }
+    }
+    break;
+    default :
+    }
+  }
+
+  /**
+   * End processing of given node 
+   *
+   *
+   * @param node Node we just finished processing
+   *
+   * @throws org.xml.sax.SAXException
+   */
+  protected void endNode(Node node) throws org.xml.sax.SAXException
+  {
+
+    switch (node.getNodeType())
+    {
+    case Node.DOCUMENT_NODE :
+      break;
+      
+    case Node.ELEMENT_NODE :
+      String ns = m_dh.getNamespaceOfNode(node);
+      if(null == ns)
+        ns = "";
+      this.m_contentHandler.endElement(ns,
+                                         m_dh.getLocalNameOfNode(node),
+                                         node.getNodeName());
+
+      if (m_Serializer == null) {
+      // Don't bother with endPrefixMapping calls if the ContentHandler is a
+      // SerializationHandler because SerializationHandler's ignore the
+      // endPrefixMapping() calls anyways. . . .  This is an optimization.    
+      Element elem_node = (Element) node;    
+      NamedNodeMap atts = elem_node.getAttributes();
+      int nAttrs = atts.getLength();
+
+      // do the endPrefixMapping calls in reverse order 
+      // of the startPrefixMapping calls
+      for (int i = (nAttrs-1); 0 <= i; i--)
+      {
+        final Node attr = atts.item(i);
+        final String attrName = attr.getNodeName();
+        final int colon = attrName.indexOf(':');
+        final String prefix;
+
+        if (attrName.equals("xmlns") || attrName.startsWith("xmlns:"))
+        {
+          // Use "" instead of null, as Xerces likes "" for the 
+          // name of the default namespace.  Fix attributed 
+          // to "Steven Murray" <smurray at ebt.com>.
+          if (colon < 0)
+            prefix = "";
+          else
+            prefix = attrName.substring(colon + 1);
+
+          this.m_contentHandler.endPrefixMapping(prefix);
+        }
+        else if (colon > 0) {
+            prefix = attrName.substring(0, colon);
+            this.m_contentHandler.endPrefixMapping(prefix);
+        }
+      }
+      {
+          String uri = elem_node.getNamespaceURI();
+          if (uri != null) {
+              String prefix = elem_node.getPrefix();
+              if (prefix==null)
+                prefix="";
+              this.m_contentHandler.endPrefixMapping(prefix);              
+          }
+      }
+      }
+      break;
+    case Node.CDATA_SECTION_NODE :
+      break;
+    case Node.ENTITY_REFERENCE_NODE :
+    {
+      EntityReference eref = (EntityReference) node;
+
+      if (m_contentHandler instanceof LexicalHandler)
+      {
+        LexicalHandler lh = ((LexicalHandler) this.m_contentHandler);
+
+        lh.endEntity(eref.getNodeName());
+      }
+    }
+    break;
+    default :
+    }
+  }
+}  //TreeWalker
+

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/Version.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/Version.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/Version.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,169 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: Version.java,v 1.1.2.1 2007/01/09 18:57:25 alexsmirnov Exp $
+ */
+package org.ajax4jsf.xml.serializer;
+
+/**
+ * Administrative class to keep track of the version number of
+ * the Serializer release.
+ * <P>This class implements the upcoming standard of having
+ * org.apache.project-name.Version.getVersion() be a standard way 
+ * to get version information.</P> 
+ * @xsl.usage general
+ */
+public final class Version
+{
+
+  /**
+   * Get the basic version string for the current Serializer.
+   * Version String formatted like 
+   * <CODE>"<B>Serializer</B> <B>Java</B> v.r[.dd| <B>D</B>nn]"</CODE>.
+   *
+   * Futurework: have this read version info from jar manifest.
+   *
+   * @return String denoting our current version
+   */
+  public static String getVersion()
+  {
+     return getProduct()+" "+getImplementationLanguage()+" "
+           +getMajorVersionNum()+"."+getReleaseVersionNum()+"."
+           +( (getDevelopmentVersionNum() > 0) ? 
+               ("D"+getDevelopmentVersionNum()) : (""+getMaintenanceVersionNum()));  
+  }
+
+  /**
+   * Print the processor version to the command line.
+   *
+   * @param argv command line arguments, unused.
+   */
+  public static void main(String argv[])
+  {
+    System.out.println(getVersion());
+  }
+  
+  /**
+   * Name of product: Serializer.
+   */
+  public static String getProduct()
+  {
+    return "Serializer";
+  }
+
+  /**
+   * Implementation Language: Java.
+   */
+  public static String getImplementationLanguage()
+  {
+    return "Java";
+  }
+  
+  
+  /**
+   * Major version number.
+   * Version number. This changes only when there is a
+   *          significant, externally apparent enhancement from
+   *          the previous release. 'n' represents the n'th
+   *          version.
+   *
+   *          Clients should carefully consider the implications
+   *          of new versions as external interfaces and behaviour
+   *          may have changed.
+   */
+  public static int getMajorVersionNum()
+  {
+    return 2;
+    
+  }  
+
+  /**
+   * Release Number.
+   * Release number. This changes when:
+   *            -  a new set of functionality is to be added, eg,
+   *               implementation of a new W3C specification.
+   *            -  API or behaviour change.
+   *            -  its designated as a reference release.
+   */
+  public static int getReleaseVersionNum()
+  {
+    return 7;
+  }
+  
+  /**
+   * Maintenance Drop Number.
+   * Optional identifier used to designate maintenance
+   *          drop applied to a specific release and contains
+   *          fixes for defects reported. It maintains compatibility
+   *          with the release and contains no API changes.
+   *          When missing, it designates the final and complete
+   *          development drop for a release.
+   */
+  public static int getMaintenanceVersionNum()
+  {
+    return 0;
+  }
+
+  /**
+   * Development Drop Number.
+   * Optional identifier designates development drop of
+   *          a specific release. D01 is the first development drop
+   *          of a new release.
+   *
+   *          Development drops are works in progress towards a
+   *          compeleted, final release. A specific development drop
+   *          may not completely implement all aspects of a new
+   *          feature, which may take several development drops to
+   *          complete. At the point of the final drop for the
+   *          release, the D suffix will be omitted.
+   *
+   *          Each 'D' drops can contain functional enhancements as
+   *          well as defect fixes. 'D' drops may not be as stable as
+   *          the final releases.
+   */
+  public static int getDevelopmentVersionNum()
+  { 
+    try {   
+        if ((new String("")).length() == 0)
+          return 0;
+        else  
+          return Integer.parseInt("");
+    } catch (NumberFormatException nfe) {
+           return 0;
+    }    
+  }      
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/WriterChain.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/WriterChain.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/WriterChain.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,101 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: WriterChain.java,v 1.1.2.1 2007/01/09 18:57:16 alexsmirnov Exp $
+ */
+package org.ajax4jsf.xml.serializer;
+
+import java.io.IOException;
+
+/**
+ * It is unfortunate that java.io.Writer is a class rather than an interface.
+ * The serializer has a number of classes that extend java.io.Writer
+ * and which send their ouput to a yet another wrapped Writer or OutputStream.
+ * 
+ * The purpose of this interface is to force such classes to over-ride all of
+ * the important methods defined on the java.io.Writer class, namely these:
+ * <code>
+ * write(int val)
+ * write(char[] chars)
+ * write(char[] chars, int start, int count)
+ * write(String chars)
+ * write(String chars, int start, int count)
+ * flush()
+ * close()
+ * </code>
+ * In this manner nothing will accidentally go directly to 
+ * the base class rather than to the wrapped Writer or OutputStream. 
+ * 
+ * The purpose of this class is to have a uniform way of chaining the output of one writer to
+ * the next writer in the chain. In addition there are methods to obtain the Writer or 
+ * OutputStream that this object sends its output to.
+ * 
+ * This interface is only for internal use withing the serializer. 
+ * @xsl.usage internal
+ */
+interface WriterChain
+{
+    /** This method forces us to over-ride the method defined in java.io.Writer */
+    public void write(int val) throws IOException;
+    /** This method forces us to over-ride the method defined in java.io.Writer */
+    public void write(char[] chars) throws IOException;
+    /** This method forces us to over-ride the method defined in java.io.Writer */
+    public void write(char[] chars, int start, int count) throws IOException;
+    /** This method forces us to over-ride the method defined in java.io.Writer */
+    public void write(String chars) throws IOException;
+    /** This method forces us to over-ride the method defined in java.io.Writer */
+    public void write(String chars, int start, int count) throws IOException;
+    /** This method forces us to over-ride the method defined in java.io.Writer */
+    public void flush() throws IOException;
+    /** This method forces us to over-ride the method defined in java.io.Writer */
+    public void close() throws IOException;
+
+    /**
+     * If this method returns null, getOutputStream() must return non-null.
+     * Get the writer that this writer sends its output to.
+     * 
+     * It is possible that the Writer returned by this method does not
+     * implement the WriterChain interface.
+     */
+    public java.io.Writer getWriter();
+    
+    /**
+     * If this method returns null, getWriter() must return non-null.
+     * Get the OutputStream that this writer sends its output to.
+     */
+    public java.io.OutputStream getOutputStream();
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/WriterToASCI.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/WriterToASCI.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/WriterToASCI.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,174 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: WriterToASCI.java,v 1.1.2.1 2007/01/09 18:57:21 alexsmirnov Exp $
+ */
+package org.ajax4jsf.xml.serializer;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.Writer;
+
+
+
+/**
+ * This class writes ASCII to a byte stream as quickly as possible.  For the
+ * moment it does not do buffering, though I reserve the right to do some
+ * buffering down the line if I can prove that it will be faster even if the
+ * output stream is buffered.
+ * 
+ * This class is only used internally within Xalan.
+ * 
+ * @xsl.usage internal
+ */
+class WriterToASCI extends Writer implements WriterChain
+{
+
+  /** The byte stream to write to.  */
+  private final OutputStream m_os;
+
+  /**
+   * Create an unbuffered ASCII writer.
+   *
+   *
+   * @param os The byte stream to write to.
+   */
+  public WriterToASCI(OutputStream os)
+  {
+    m_os = os;
+  }
+
+  /**
+   * Write a portion of an array of characters.
+   *
+   * @param  chars  Array of characters
+   * @param  start   Offset from which to start writing characters
+   * @param  length   Number of characters to write
+   *
+   * @exception  IOException  If an I/O error occurs
+   *
+   * @throws java.io.IOException
+   */
+  public void write(char chars[], int start, int length)
+          throws java.io.IOException
+  {
+
+    int n = length+start;
+
+    for (int i = start; i < n; i++)
+    {
+      m_os.write(chars[i]);
+    }
+  }
+
+  /**
+   * Write a single character.  The character to be written is contained in
+   * the 16 low-order bits of the given integer value; the 16 high-order bits
+   * are ignored.
+   *
+   * <p> Subclasses that intend to support efficient single-character output
+   * should override this method.
+   *
+   * @param c  int specifying a character to be written.
+   * @exception  IOException  If an I/O error occurs
+   */
+  public void write(int c) throws IOException
+  {
+    m_os.write(c);
+  }
+
+  /**
+   * Write a string.
+   *
+   * @param  s String to be written
+   *
+   * @exception  IOException  If an I/O error occurs
+   */
+  public void write(String s) throws IOException
+  {
+    int n = s.length();
+    for (int i = 0; i < n; i++)
+    {
+      m_os.write(s.charAt(i));
+    }
+  }
+
+  /**
+   * Flush the stream.  If the stream has saved any characters from the
+   * various write() methods in a buffer, write them immediately to their
+   * intended destination.  Then, if that destination is another character or
+   * byte stream, flush it.  Thus one flush() invocation will flush all the
+   * buffers in a chain of Writers and OutputStreams.
+   *
+   * @exception  IOException  If an I/O error occurs
+   */
+  public void flush() throws java.io.IOException
+  {
+    m_os.flush();
+  }
+
+  /**
+   * Close the stream, flushing it first.  Once a stream has been closed,
+   * further write() or flush() invocations will cause an IOException to be
+   * thrown.  Closing a previously-closed stream, however, has no effect.
+   *
+   * @exception  IOException  If an I/O error occurs
+   */
+  public void close() throws java.io.IOException
+  {
+    m_os.close();
+  }
+
+  /**
+   * Get the output stream where the events will be serialized to.
+   *
+   * @return reference to the result stream, or null of only a writer was
+   * set.
+   */
+  public OutputStream getOutputStream()
+  {
+    return m_os;
+  }
+
+  /**
+   * Get the writer that this writer directly chains to.
+   */
+  public Writer getWriter()
+  {
+      return null;
+  }
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/WriterToUTF8Buffered.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/WriterToUTF8Buffered.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/WriterToUTF8Buffered.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,522 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 1999-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: WriterToUTF8Buffered.java,v 1.1.2.1 2007/01/09 18:57:15 alexsmirnov Exp $
+ */
+package org.ajax4jsf.xml.serializer;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.UnsupportedEncodingException;
+import java.io.Writer;
+
+
+/**
+ * This class writes unicode characters to a byte stream (java.io.OutputStream)
+ * as quickly as possible. It buffers the output in an internal
+ * buffer which must be flushed to the OutputStream when done. This flushing
+ * is done via the close() flush() or flushBuffer() method. 
+ * 
+ * This class is only used internally within Xalan.
+ * 
+ * @xsl.usage internal
+ */
+final class WriterToUTF8Buffered extends Writer implements WriterChain
+{
+    
+  /** number of bytes that the byte buffer can hold.
+   * This is a fixed constant is used rather than m_outputBytes.lenght for performance.
+   */
+  private static final int BYTES_MAX=16*1024;
+  /** number of characters that the character buffer can hold.
+   * This is 1/3 of the number of bytes because UTF-8 encoding
+   * can expand one unicode character by up to 3 bytes.
+   */
+  private static final int CHARS_MAX=(BYTES_MAX/3);
+  
+ // private static final int 
+  
+  /** The byte stream to write to. (sc & sb remove final to compile in JDK 1.1.8) */
+  private final OutputStream m_os;
+
+  /**
+   * The internal buffer where data is stored.
+   * (sc & sb remove final to compile in JDK 1.1.8)
+   */
+  private final byte m_outputBytes[];
+  
+  private final char m_inputChars[];
+
+  /**
+   * The number of valid bytes in the buffer. This value is always
+   * in the range <tt>0</tt> through <tt>m_outputBytes.length</tt>; elements
+   * <tt>m_outputBytes[0]</tt> through <tt>m_outputBytes[count-1]</tt> contain valid
+   * byte data.
+   */
+  private int count;
+
+  /**
+   * Create an buffered UTF-8 writer.
+   *
+   *
+   * @param   out    the underlying output stream.
+   *
+   * @throws UnsupportedEncodingException
+   */
+  public WriterToUTF8Buffered(OutputStream out)
+          throws UnsupportedEncodingException
+  {
+      m_os = out;
+      // get 3 extra bytes to make buffer overflow checking simpler and faster
+      // we won't have to keep checking for a few extra characters
+      m_outputBytes = new byte[BYTES_MAX + 3];
+      
+      // Big enough to hold the input chars that will be transformed
+      // into output bytes in m_ouputBytes.
+      m_inputChars = new char[CHARS_MAX + 2];
+      count = 0;
+      
+//      the old body of this constructor, before the buffersize was changed to a constant      
+//      this(out, 8*1024);
+  }
+
+  /**
+   * Create an buffered UTF-8 writer to write data to the
+   * specified underlying output stream with the specified buffer
+   * size.
+   *
+   * @param   out    the underlying output stream.
+   * @param   size   the buffer size.
+   * @exception IllegalArgumentException if size <= 0.
+   */
+//  public WriterToUTF8Buffered(final OutputStream out, final int size)
+//  {
+//
+//    m_os = out;
+//
+//    if (size <= 0)
+//    {
+//      throw new IllegalArgumentException(
+//        SerializerMessages.createMessage(SerializerErrorResources.ER_BUFFER_SIZE_LESSTHAN_ZERO, null)); //"Buffer size <= 0");
+//    }
+//
+//    m_outputBytes = new byte[size];
+//    count = 0;
+//  }
+
+  /**
+   * Write a single character.  The character to be written is contained in
+   * the 16 low-order bits of the given integer value; the 16 high-order bits
+   * are ignored.
+   *
+   * <p> Subclasses that intend to support efficient single-character output
+   * should override this method.
+   *
+   * @param c  int specifying a character to be written.
+   * @exception  IOException  If an I/O error occurs
+   */
+  public void write(final int c) throws IOException
+  {
+    
+    /* If we are close to the end of the buffer then flush it.
+     * Remember the buffer can hold a few more bytes than BYTES_MAX
+     */ 
+    if (count >= BYTES_MAX)
+        flushBuffer();
+
+    if (c < 0x80)
+    {
+       m_outputBytes[count++] = (byte) (c);
+    }
+    else if (c < 0x800)
+    {
+      m_outputBytes[count++] = (byte) (0xc0 + (c >> 6));
+      m_outputBytes[count++] = (byte) (0x80 + (c & 0x3f));
+    }
+    else if (c < 0x10000)
+    {
+      m_outputBytes[count++] = (byte) (0xe0 + (c >> 12));
+      m_outputBytes[count++] = (byte) (0x80 + ((c >> 6) & 0x3f));
+      m_outputBytes[count++] = (byte) (0x80 + (c & 0x3f));
+    }
+	else
+	{
+	  m_outputBytes[count++] = (byte) (0xf0 + (c >> 18));
+	  m_outputBytes[count++] = (byte) (0x80 + ((c >> 12) & 0x3f));
+	  m_outputBytes[count++] = (byte) (0x80 + ((c >> 6) & 0x3f));
+	  m_outputBytes[count++] = (byte) (0x80 + (c & 0x3f));
+	}
+
+  }
+
+
+  /**
+   * Write a portion of an array of characters.
+   *
+   * @param  chars  Array of characters
+   * @param  start   Offset from which to start writing characters
+   * @param  length   Number of characters to write
+   *
+   * @exception  IOException  If an I/O error occurs
+   *
+   * @throws java.io.IOException
+   */
+  public void write(final char chars[], final int start, final int length)
+          throws java.io.IOException
+  {
+
+    // We multiply the length by three since this is the maximum length
+    // of the characters that we can put into the buffer.  It is possible
+    // for each Unicode character to expand to three bytes.
+
+    int lengthx3 = 3*length;
+
+    if (lengthx3 >= BYTES_MAX - count)
+    {
+      // The requested length is greater than the unused part of the buffer
+      flushBuffer();
+
+      if (lengthx3 > BYTES_MAX)
+      {
+        /*
+         * The requested length exceeds the size of the buffer.
+         * Cut the buffer up into chunks, each of which will
+         * not cause an overflow to the output buffer m_outputBytes,
+         * and make multiple recursive calls.
+         * Be careful about integer overflows in multiplication.
+         */
+        int split = length/CHARS_MAX; 
+        final int chunks;
+        if (split > 1)
+            chunks = split;
+        else
+            chunks = 2;
+        int end_chunk = start;
+        for (int chunk = 1; chunk <= chunks; chunk++)
+        {
+            int start_chunk = end_chunk;
+            end_chunk = start + (int) ((((long) length) * chunk) / chunks);
+            
+            // Adjust the end of the chunk if it ends on a high char 
+            // of a Unicode surrogate pair and low char of the pair
+            // is not going to be in the same chunk
+            final char c = chars[end_chunk - 1]; 
+            int ic = chars[end_chunk - 1];
+            if (c >= 0xD800 && c <= 0xDBFF) {
+                // The last Java char that we were going
+                // to process is the first of a
+                // Java surrogate char pair that
+                // represent a Unicode character.
+
+                if (end_chunk < start + length) {
+                    // Avoid spanning by including the low
+                    // char in the current chunk of chars.
+                    end_chunk++;
+                } else {
+                    /* This is the last char of the last chunk,
+                     * and it is the high char of a high/low pair with
+                     * no low char provided.
+                     * TODO: error message needed.
+                     * The char array incorrectly ends in a high char
+                     * of a high/low surrogate pair, but there is
+                     * no corresponding low as the high is the last char 
+                     */
+                    end_chunk--;
+                }
+            }
+
+
+            int len_chunk = (end_chunk - start_chunk);
+            this.write(chars,start_chunk, len_chunk);
+        }
+        return;
+      }
+    }
+
+
+
+    final int n = length+start;
+    final byte[] buf_loc = m_outputBytes; // local reference for faster access
+    int count_loc = count;      // local integer for faster access
+    int i = start;
+    {
+        /* This block could be omitted and the code would produce
+         * the same result. But this block exists to give the JIT
+         * a better chance of optimizing a tight and common loop which
+         * occurs when writing out ASCII characters. 
+         */ 
+        char c;
+        for(; i < n && (c = chars[i])< 0x80 ; i++ )
+            buf_loc[count_loc++] = (byte)c;
+    }
+    for (; i < n; i++)
+    {
+
+      final char c = chars[i];
+
+      if (c < 0x80)
+        buf_loc[count_loc++] = (byte) (c);
+      else if (c < 0x800)
+      {
+        buf_loc[count_loc++] = (byte) (0xc0 + (c >> 6));
+        buf_loc[count_loc++] = (byte) (0x80 + (c & 0x3f));
+      }
+      /**
+        * The following else if condition is added to support XML 1.1 Characters for 
+        * UTF-8:   [1111 0uuu] [10uu zzzz] [10yy yyyy] [10xx xxxx]*
+        * Unicode: [1101 10ww] [wwzz zzyy] (high surrogate)
+        *          [1101 11yy] [yyxx xxxx] (low surrogate)
+        *          * uuuuu = wwww + 1
+        */
+      else if (c >= 0xD800 && c <= 0xDBFF) 
+      {
+          char high, low;
+          high = c;
+          i++;
+          low = chars[i];
+
+          buf_loc[count_loc++] = (byte) (0xF0 | (((high + 0x40) >> 8) & 0xf0));
+          buf_loc[count_loc++] = (byte) (0x80 | (((high + 0x40) >> 2) & 0x3f));
+          buf_loc[count_loc++] = (byte) (0x80 | ((low >> 6) & 0x0f) + ((high << 4) & 0x30));
+          buf_loc[count_loc++] = (byte) (0x80 | (low & 0x3f));
+      }
+      else
+      {
+        buf_loc[count_loc++] = (byte) (0xe0 + (c >> 12));
+        buf_loc[count_loc++] = (byte) (0x80 + ((c >> 6) & 0x3f));
+        buf_loc[count_loc++] = (byte) (0x80 + (c & 0x3f));
+      }
+    }
+    // Store the local integer back into the instance variable
+    count = count_loc;
+
+  }
+
+  /**
+   * Write a string.
+   *
+   * @param  s  String to be written
+   *
+   * @exception  IOException  If an I/O error occurs
+   */
+  public void write(final String s) throws IOException
+  {
+
+    // We multiply the length by three since this is the maximum length
+    // of the characters that we can put into the buffer.  It is possible
+    // for each Unicode character to expand to three bytes.
+    final int length = s.length();
+    int lengthx3 = 3*length;
+
+    if (lengthx3 >= BYTES_MAX - count)
+    {
+      // The requested length is greater than the unused part of the buffer
+      flushBuffer();
+
+      if (lengthx3 > BYTES_MAX)
+      {
+        /*
+         * The requested length exceeds the size of the buffer,
+         * so break it up in chunks that don't exceed the buffer size.
+         */
+         final int start = 0;
+         int split = length/CHARS_MAX; 
+         final int chunks;
+         if (split > 1)
+             chunks = split;
+         else
+             chunks = 2;
+         int end_chunk = 0;
+         for (int chunk = 1; chunk <= chunks; chunk++)
+         {
+             int start_chunk = end_chunk;
+             end_chunk = start + (int) ((((long) length) * chunk) / chunks);
+             s.getChars(start_chunk,end_chunk, m_inputChars,0);
+             int len_chunk = (end_chunk - start_chunk);
+
+             // Adjust the end of the chunk if it ends on a high char 
+             // of a Unicode surrogate pair and low char of the pair
+             // is not going to be in the same chunk
+             final char c = m_inputChars[len_chunk - 1];
+             if (c >= 0xD800 && c <= 0xDBFF) {
+                 // Exclude char in this chunk, 
+                 // to avoid spanning a Unicode character 
+                 // that is in two Java chars as a high/low surrogate
+                 end_chunk--;
+                 len_chunk--;
+                 if (chunk == chunks) {
+                     /* TODO: error message needed.
+                      * The String incorrectly ends in a high char
+                      * of a high/low surrogate pair, but there is
+                      * no corresponding low as the high is the last char
+                      * Recover by ignoring this last char.
+                      */
+                 }
+             }
+
+             this.write(m_inputChars,0, len_chunk);
+         }
+         return;
+      }
+    }
+
+
+    s.getChars(0, length , m_inputChars, 0);
+    final char[] chars = m_inputChars;
+    final int n = length;
+    final byte[] buf_loc = m_outputBytes; // local reference for faster access
+    int count_loc = count;      // local integer for faster access
+    int i = 0;
+    {
+        /* This block could be omitted and the code would produce
+         * the same result. But this block exists to give the JIT
+         * a better chance of optimizing a tight and common loop which
+         * occurs when writing out ASCII characters. 
+         */ 
+        char c;
+        for(; i < n && (c = chars[i])< 0x80 ; i++ )
+            buf_loc[count_loc++] = (byte)c;
+    }
+    for (; i < n; i++)
+    {
+
+      final char c = chars[i];
+
+      if (c < 0x80)
+        buf_loc[count_loc++] = (byte) (c);
+      else if (c < 0x800)
+      {
+        buf_loc[count_loc++] = (byte) (0xc0 + (c >> 6));
+        buf_loc[count_loc++] = (byte) (0x80 + (c & 0x3f));
+      }
+    /**
+      * The following else if condition is added to support XML 1.1 Characters for 
+      * UTF-8:   [1111 0uuu] [10uu zzzz] [10yy yyyy] [10xx xxxx]*
+      * Unicode: [1101 10ww] [wwzz zzyy] (high surrogate)
+      *          [1101 11yy] [yyxx xxxx] (low surrogate)
+      *          * uuuuu = wwww + 1
+      */
+    else if (c >= 0xD800 && c <= 0xDBFF) 
+    {
+        char high, low;
+        high = c;
+        i++;
+        low = chars[i];
+
+        buf_loc[count_loc++] = (byte) (0xF0 | (((high + 0x40) >> 8) & 0xf0));
+        buf_loc[count_loc++] = (byte) (0x80 | (((high + 0x40) >> 2) & 0x3f));
+        buf_loc[count_loc++] = (byte) (0x80 | ((low >> 6) & 0x0f) + ((high << 4) & 0x30));
+        buf_loc[count_loc++] = (byte) (0x80 | (low & 0x3f));
+    }
+      else
+      {
+        buf_loc[count_loc++] = (byte) (0xe0 + (c >> 12));
+        buf_loc[count_loc++] = (byte) (0x80 + ((c >> 6) & 0x3f));
+        buf_loc[count_loc++] = (byte) (0x80 + (c & 0x3f));
+      }
+    }
+    // Store the local integer back into the instance variable
+    count = count_loc;
+
+  }
+
+  /**
+   * Flush the internal buffer
+   *
+   * @throws IOException
+   */
+  public void flushBuffer() throws IOException
+  {
+
+    if (count > 0)
+    {
+      m_os.write(m_outputBytes, 0, count);
+
+      count = 0;
+    }
+  }
+
+  /**
+   * Flush the stream.  If the stream has saved any characters from the
+   * various write() methods in a buffer, write them immediately to their
+   * intended destination.  Then, if that destination is another character or
+   * byte stream, flush it.  Thus one flush() invocation will flush all the
+   * buffers in a chain of Writers and OutputStreams.
+   *
+   * @exception  IOException  If an I/O error occurs
+   *
+   * @throws java.io.IOException
+   */
+  public void flush() throws java.io.IOException
+  {
+    flushBuffer();
+    m_os.flush();
+  }
+
+  /**
+   * Close the stream, flushing it first.  Once a stream has been closed,
+   * further write() or flush() invocations will cause an IOException to be
+   * thrown.  Closing a previously-closed stream, however, has no effect.
+   *
+   * @exception  IOException  If an I/O error occurs
+   *
+   * @throws java.io.IOException
+   */
+  public void close() throws java.io.IOException
+  {
+    flushBuffer();
+    m_os.close();
+  }
+
+  /**
+   * Get the output stream where the events will be serialized to.
+   *
+   * @return reference to the result stream, or null of only a writer was
+   * set.
+   */
+  public OutputStream getOutputStream()
+  {
+    return m_os;
+  }
+
+  public Writer getWriter()
+  {
+    // Only one of getWriter() or getOutputStream() can return null
+    // This type of writer wraps an OutputStream, not a Writer.
+    return null;
+  }
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/XSLOutputAttributes.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/XSLOutputAttributes.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/XSLOutputAttributes.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,201 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 2003-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: XSLOutputAttributes.java,v 1.1.2.1 2007/01/09 18:57:14 alexsmirnov Exp $
+ */
+package org.ajax4jsf.xml.serializer;
+
+import java.util.Vector;
+
+/**
+ * This interface has methods associated with the XSLT xsl:output attribues
+ * specified in the stylesheet that effect the format of the document output.
+ * 
+ * In an XSLT stylesheet these attributes appear for example as:
+ * <pre>
+ * <xsl:output method="xml" omit-xml-declaration="no" indent="yes"/> 
+ * </pre>
+ * The xsl:output attributes covered in this interface are:
+ * <pre>
+ * version
+ * encoding
+ * omit-xml-declarations
+ * standalone
+ * doctype-public
+ * doctype-system
+ * cdata-section-elements
+ * indent
+ * media-type
+ * </pre>
+ * 
+ * The one attribute not covered in this interface is <code>method</code> as
+ * this value is implicitly chosen by the serializer that is created, for
+ * example ToXMLStream vs. ToHTMLStream or another one.
+ * 
+ * This interface is only used internally within Xalan.
+ * 
+ * @xsl.usage internal
+ */
+interface XSLOutputAttributes
+{
+    /**
+     * Returns the previously set value of the value to be used as the public
+     * identifier in the document type declaration (DTD).
+     *
+     *@return the public identifier to be used in the DOCTYPE declaration in the
+     * output document.
+     */
+    public String getDoctypePublic();
+    /**
+     * Returns the previously set value of the value to be used
+     * as the system identifier in the document type declaration (DTD).
+     * @return the system identifier to be used in the DOCTYPE declaration in
+     * the output document.
+     *
+     */ 
+    public String getDoctypeSystem();
+    /**
+     * @return the character encoding to be used in the output document.
+     */    
+    public String getEncoding();
+    /**
+	 * @return true if the output document should be indented to visually
+	 * indicate its structure.
+     */    
+    public boolean getIndent();
+    
+    /**
+     * @return the number of spaces to indent for each indentation level.
+     */
+    public int getIndentAmount();
+    /**
+     * @return the mediatype the media-type or MIME type associated with the
+     * output document.
+     */    
+    public String getMediaType();
+    /**
+     * @return true if the XML declaration is to be omitted from the output
+     * document.
+     */    
+    public boolean getOmitXMLDeclaration();
+    /**
+      * @return a value of "yes" if the <code>standalone</code> delaration is to
+      * be included in the output document.
+      */    
+    public String getStandalone();
+    /**
+     * @return the version of the output format.
+     */    
+    public String getVersion();
+
+
+
+
+
+
+    /**
+     * Sets the value coming from the xsl:output cdata-section-elements
+     * stylesheet property.
+     * 
+     * This sets the elements whose text elements are to be output as CDATA
+     * sections.
+     * @param URI_and_localNames pairs of namespace URI and local names that
+     * identify elements whose text elements are to be output as CDATA sections.
+     * The namespace of the local element must be the given URI to match. The
+     * qName is not given because the prefix does not matter, only the namespace
+     * URI to which that prefix would map matters, so the prefix itself is not
+     * relevant in specifying which elements have their text to be output as
+     * CDATA sections.
+     */
+    public void setCdataSectionElements(Vector URI_and_localNames);
+
+    /** Set the value coming from the xsl:output doctype-public and doctype-system stylesheet properties
+     * @param system the system identifier to be used in the DOCTYPE declaration
+     * in the output document.
+     * @param pub the public identifier to be used in the DOCTYPE declaration in
+     * the output document.
+     */
+    public void setDoctype(String system, String pub);
+
+    /** Set the value coming from the xsl:output doctype-public stylesheet attribute.
+      * @param doctype the public identifier to be used in the DOCTYPE
+      * declaration in the output document.
+      */
+    public void setDoctypePublic(String doctype);
+    /** Set the value coming from the xsl:output doctype-system stylesheet attribute.
+      * @param doctype the system identifier to be used in the DOCTYPE
+      * declaration in the output document.
+      */
+    public void setDoctypeSystem(String doctype);
+    /**
+     * Sets the character encoding coming from the xsl:output encoding stylesheet attribute.
+     * @param encoding the character encoding
+     */
+    public void setEncoding(String encoding);
+    /**
+     * Sets the value coming from the xsl:output indent stylesheet
+     * attribute.
+     * @param indent true if the output document should be indented to visually
+     * indicate its structure.
+     */
+    public void setIndent(boolean indent);
+    /**
+     * Sets the value coming from the xsl:output media-type stylesheet attribute.
+     * @param mediatype the media-type or MIME type associated with the output
+     * document.
+     */
+    public void setMediaType(String mediatype);
+    /**
+     * Sets the value coming from the xsl:output omit-xml-declaration stylesheet attribute
+     * @param b true if the XML declaration is to be omitted from the output
+     * document.
+     */
+    public void setOmitXMLDeclaration(boolean b);
+    /**
+     * Sets the value coming from the xsl:output standalone stylesheet attribute.
+     * @param standalone a value of "yes" indicates that the
+     * <code>standalone</code> delaration is to be included in the output
+     * document.
+     */
+    public void setStandalone(String standalone);
+    /**
+     * Sets the value coming from the xsl:output version attribute.
+     * @param version the version of the output format.
+     */
+    public void setVersion(String version);
+
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/AttList.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/AttList.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/AttList.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,282 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: AttList.java,v 1.1.2.1 2007/01/09 18:58:36 alexsmirnov Exp $
+ */
+package org.ajax4jsf.xml.serializer.utils;
+
+import org.w3c.dom.Attr;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.xml.sax.Attributes;
+
+/**
+ * Wraps a DOM attribute list in a SAX Attributes.
+ * 
+ * This class is a copy of the one in org.apache.xml.utils. 
+ * It exists to cut the serializers dependancy on that package.
+ * A minor changes from that package are:
+ * DOMHelper reference changed to DOM2Helper, class is not "public"
+ *  
+ * This class is not a public API, it is only public because it is 
+ * used in org.ajax4jsf.xml.serializer.
+ * 
+ * @xsl.usage internal
+ */
+public final class AttList implements Attributes
+{
+
+  /** List of attribute nodes          */
+  NamedNodeMap m_attrs;
+
+  /** Index of last attribute node          */
+  int m_lastIndex;
+
+  // ARGHH!!  JAXP Uses Xerces without setting the namespace processing to ON!
+  // DOM2Helper m_dh = new DOM2Helper();
+
+  /** Local reference to DOMHelper          */
+  DOM2Helper m_dh;
+
+//  /**
+//   * Constructor AttList
+//   *
+//   *
+//   * @param attrs List of attributes this will contain
+//   */
+//  public AttList(NamedNodeMap attrs)
+//  {
+//
+//    m_attrs = attrs;
+//    m_lastIndex = m_attrs.getLength() - 1;
+//    m_dh = new DOM2Helper();
+//  }
+
+  /**
+   * Constructor AttList
+   *
+   *
+   * @param attrs List of attributes this will contain
+   * @param dh DOMHelper 
+   */
+  public AttList(NamedNodeMap attrs, DOM2Helper dh)
+  {
+    
+    m_attrs = attrs;
+    m_lastIndex = m_attrs.getLength() - 1;
+    m_dh = dh;
+  }
+
+  /**
+   * Get the number of attribute nodes in the list 
+   *
+   *
+   * @return number of attribute nodes
+   */
+  public int getLength()
+  {
+    return m_attrs.getLength();
+  }
+
+  /**
+   * Look up an attribute's Namespace URI by index.
+   *
+   * @param index The attribute index (zero-based).
+   * @return The Namespace URI, or the empty string if none
+   *         is available, or null if the index is out of
+   *         range.
+   */
+  public String getURI(int index)
+  {
+    String ns = m_dh.getNamespaceOfNode(((Attr) m_attrs.item(index)));
+    if(null == ns)
+      ns = "";
+    return ns;
+  }
+
+  /**
+   * Look up an attribute's local name by index.
+   *
+   * @param index The attribute index (zero-based).
+   * @return The local name, or the empty string if Namespace
+   *         processing is not being performed, or null
+   *         if the index is out of range.
+   */
+  public String getLocalName(int index)
+  {
+    return m_dh.getLocalNameOfNode(((Attr) m_attrs.item(index)));
+  }
+
+  /**
+   * Look up an attribute's qualified name by index.
+   *
+   *
+   * @param i The attribute index (zero-based).
+   *
+   * @return The attribute's qualified name
+   */
+  public String getQName(int i)
+  {
+    return ((Attr) m_attrs.item(i)).getName();
+  }
+
+  /**
+   * Get the attribute's node type by index
+   *
+   *
+   * @param i The attribute index (zero-based)
+   *
+   * @return the attribute's node type
+   */
+  public String getType(int i)
+  {
+    return "CDATA";  // for the moment
+  }
+
+  /**
+   * Get the attribute's node value by index
+   *
+   *
+   * @param i The attribute index (zero-based)
+   *
+   * @return the attribute's node value
+   */
+  public String getValue(int i)
+  {
+    return ((Attr) m_attrs.item(i)).getValue();
+  }
+
+  /**
+   * Get the attribute's node type by name
+   *
+   *
+   * @param name Attribute name
+   *
+   * @return the attribute's node type
+   */
+  public String getType(String name)
+  {
+    return "CDATA";  // for the moment
+  }
+
+  /**
+   * Look up an attribute's type by Namespace name.
+   *
+   * @param uri The Namespace URI, or the empty String if the
+   *        name has no Namespace URI.
+   * @param localName The local name of the attribute.
+   * @return The attribute type as a string, or null if the
+   *         attribute is not in the list or if Namespace
+   *         processing is not being performed.
+   */
+  public String getType(String uri, String localName)
+  {
+    return "CDATA";  // for the moment
+  }
+
+  /**
+   * Look up an attribute's value by name.
+   *
+   *
+   * @param name The attribute node's name
+   *
+   * @return The attribute node's value
+   */
+  public String getValue(String name)
+  {
+    Attr attr = ((Attr) m_attrs.getNamedItem(name));
+    return (null != attr) 
+          ? attr.getValue() : null;
+  }
+
+  /**
+   * Look up an attribute's value by Namespace name.
+   *
+   * @param uri The Namespace URI, or the empty String if the
+   *        name has no Namespace URI.
+   * @param localName The local name of the attribute.
+   * @return The attribute value as a string, or null if the
+   *         attribute is not in the list.
+   */
+  public String getValue(String uri, String localName)
+  {
+        Node a=m_attrs.getNamedItemNS(uri,localName);
+        return (a==null) ? null : a.getNodeValue();
+  }
+
+  /**
+   * Look up the index of an attribute by Namespace name.
+   *
+   * @param uri The Namespace URI, or the empty string if
+   *        the name has no Namespace URI.
+   * @param localPart The attribute's local name.
+   * @return The index of the attribute, or -1 if it does not
+   *         appear in the list.
+   */
+  public int getIndex(String uri, String localPart)
+  {
+    for(int i=m_attrs.getLength()-1;i>=0;--i)
+    {
+      Node a=m_attrs.item(i);
+      String u=a.getNamespaceURI();
+      if( (u==null ? uri==null : u.equals(uri))
+      &&
+      a.getLocalName().equals(localPart) )
+    return i;
+    }
+    return -1;
+  }
+
+  /**
+   * Look up the index of an attribute by raw XML 1.0 name.
+   *
+   * @param qName The qualified (prefixed) name.
+   * @return The index of the attribute, or -1 if it does not
+   *         appear in the list.
+   */
+  public int getIndex(String qName)
+  {
+    for(int i=m_attrs.getLength()-1;i>=0;--i)
+    {
+      Node a=m_attrs.item(i);
+      if(a.getNodeName().equals(qName) )
+    return i;
+    }
+    return -1;
+  }
+}
+

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/BoolStack.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/BoolStack.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/BoolStack.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,225 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: BoolStack.java,v 1.1.2.1 2007/01/09 18:58:39 alexsmirnov Exp $
+ */
+package org.ajax4jsf.xml.serializer.utils;
+
+import java.util.EmptyStackException;
+
+
+/**
+ * Simple stack for boolean values.
+ * 
+ * This class is a copy of the one in org.apache.xml.utils. 
+ * It exists to cut the serializers dependancy on that package.
+ * A minor changes from that package are:
+ * doesn't implement Clonable
+ *  
+ * This class is not a public API, it is only public because it is 
+ * used in org.ajax4jsf.xml.serializer.
+ * 
+ * @xsl.usage internal
+ */
+public final class BoolStack
+{
+
+  /** Array of boolean values          */
+  private boolean m_values[];
+
+  /** Array size allocated           */
+  private int m_allocatedSize;
+
+  /** Index into the array of booleans          */
+  private int m_index;
+
+  /**
+   * Default constructor.  Note that the default
+   * block size is very small, for small lists.
+   */
+  public BoolStack()
+  {
+    this(32);
+  }
+
+  /**
+   * Construct a IntVector, using the given block size.
+   *
+   * @param size array size to allocate
+   */
+  public BoolStack(int size)
+  {
+
+    m_allocatedSize = size;
+    m_values = new boolean[size];
+    m_index = -1;
+  }
+
+  /**
+   * Get the length of the list.
+   *
+   * @return Current length of the list
+   */
+  public final int size()
+  {
+    return m_index + 1;
+  }
+
+  /**
+   * Clears the stack.
+   *
+   */
+  public final void clear()
+  {
+    m_index = -1;
+  }
+
+  /**
+   * Pushes an item onto the top of this stack.
+   *
+   *
+   * @param val the boolean to be pushed onto this stack.
+   * @return  the <code>item</code> argument.
+   */
+  public final boolean push(boolean val)
+  {
+
+    if (m_index == m_allocatedSize - 1)
+      grow();
+
+    return (m_values[++m_index] = val);
+  }
+
+  /**
+   * Removes the object at the top of this stack and returns that
+   * object as the value of this function.
+   *
+   * @return     The object at the top of this stack.
+   * @throws  EmptyStackException  if this stack is empty.
+   */
+  public final boolean pop()
+  {
+    return m_values[m_index--];
+  }
+
+  /**
+   * Removes the object at the top of this stack and returns the
+   * next object at the top as the value of this function.
+   *
+   *
+   * @return Next object to the top or false if none there
+   */
+  public final boolean popAndTop()
+  {
+
+    m_index--;
+
+    return (m_index >= 0) ? m_values[m_index] : false;
+  }
+
+  /**
+   * Set the item at the top of this stack  
+   *
+   *
+   * @param b Object to set at the top of this stack
+   */
+  public final void setTop(boolean b)
+  {
+    m_values[m_index] = b;
+  }
+
+  /**
+   * Looks at the object at the top of this stack without removing it
+   * from the stack.
+   *
+   * @return     the object at the top of this stack.
+   * @throws  EmptyStackException  if this stack is empty.
+   */
+  public final boolean peek()
+  {
+    return m_values[m_index];
+  }
+
+  /**
+   * Looks at the object at the top of this stack without removing it
+   * from the stack.  If the stack is empty, it returns false.
+   *
+   * @return     the object at the top of this stack.
+   */
+  public final boolean peekOrFalse()
+  {
+    return (m_index > -1) ? m_values[m_index] : false;
+  }
+
+  /**
+   * Looks at the object at the top of this stack without removing it
+   * from the stack.  If the stack is empty, it returns true.
+   *
+   * @return     the object at the top of this stack.
+   */
+  public final boolean peekOrTrue()
+  {
+    return (m_index > -1) ? m_values[m_index] : true;
+  }
+
+  /**
+   * Tests if this stack is empty.
+   *
+   * @return  <code>true</code> if this stack is empty;
+   *          <code>false</code> otherwise.
+   */
+  public boolean isEmpty()
+  {
+    return (m_index == -1);
+  }
+
+  /**
+   * Grows the size of the stack
+   *
+   */
+  private void grow()
+  {
+
+    m_allocatedSize *= 2;
+
+    boolean newVector[] = new boolean[m_allocatedSize];
+
+    System.arraycopy(m_values, 0, newVector, 0, m_index + 1);
+
+    m_values = newVector;
+  }
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/DOM2Helper.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/DOM2Helper.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/DOM2Helper.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,141 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: DOM2Helper.java,v 1.1.2.1 2007/01/09 18:58:35 alexsmirnov Exp $
+ */
+package org.ajax4jsf.xml.serializer.utils;
+
+import org.w3c.dom.Node;
+
+/**
+ * This class provides a DOM level 2 "helper", which provides services currently 
+ * not provided be the DOM standard.
+ * 
+ * This class is a copy of the one in org.apache.xml.utils. 
+ * It exists to cut the serializers dependancy on that package.
+ * 
+ * The differences from the original class are:
+ * it doesn't extend DOMHelper, not depricated, 
+ * dropped method isNodeAfter(Node node1, Node node2)
+ * dropped method parse(InputSource)
+ * dropped method supportSAX()
+ * dropped method setDocument(doc) 
+ * dropped method checkNode(Node)
+ * dropped method getDocument()
+ * dropped method getElementByID(String id, Document doc)
+ * dropped method getParentOfNode(Node node)
+ * dropped field Document m_doc;
+ * made class non-public
+ *   
+ * This class is not a public API, it is only public because it is 
+ * used in org.ajax4jsf.xml.serializer.
+ * 
+ * @xsl.usage internal
+ */
+public final class DOM2Helper
+{
+
+  /**
+   * Construct an instance.
+   */
+  public DOM2Helper(){}
+
+  /**
+   * Returns the local name of the given node, as defined by the
+   * XML Namespaces specification. This is prepared to handle documents
+   * built using DOM Level 1 methods by falling back upon explicitly
+   * parsing the node name.
+   *
+   * @param n Node to be examined
+   *
+   * @return String containing the local name, or null if the node
+   * was not assigned a Namespace.
+   */
+  public String getLocalNameOfNode(Node n)
+  {
+
+    String name = n.getLocalName();
+
+    return (null == name) ? getLocalNameOfNodeFallback(n) : name;
+  }
+  
+  /**
+   * Returns the local name of the given node. If the node's name begins
+   * with a namespace prefix, this is the part after the colon; otherwise
+   * it's the full node name.
+   * 
+   * This method is copied from org.apache.xml.utils.DOMHelper
+   *
+   * @param n the node to be examined.
+   *
+   * @return String containing the Local Name
+   */
+  private String getLocalNameOfNodeFallback(Node n)
+  {
+
+    String qname = n.getNodeName();
+    int index = qname.indexOf(':');
+
+    return (index < 0) ? qname : qname.substring(index + 1);
+  }
+
+  /**
+   * Returns the Namespace Name (Namespace URI) for the given node.
+   * In a Level 2 DOM, you can ask the node itself. Note, however, that
+   * doing so conflicts with our decision in getLocalNameOfNode not
+   * to trust the that the DOM was indeed created using the Level 2
+   * methods. If Level 1 methods were used, these two functions will
+   * disagree with each other.
+   * <p>
+   * TODO: Reconcile with getLocalNameOfNode.
+   *
+   * @param n Node to be examined
+   *
+   * @return String containing the Namespace URI bound to this DOM node
+   * at the time the Node was created.
+   */
+  public String getNamespaceOfNode(Node n)
+  {
+    return n.getNamespaceURI();
+  }
+
+  /** Field m_useDOM2getNamespaceURI is a compile-time flag which
+   *  gates some of the parser options used to build a DOM -- but 
+   * that code is commented out at this time and nobody else
+   * references it, so I've commented this out as well. */
+  //private boolean m_useDOM2getNamespaceURI = false;
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/Messages.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/Messages.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/Messages.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,385 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: Messages.java,v 1.1.2.1 2007/01/09 18:58:38 alexsmirnov Exp $
+ */
+package org.ajax4jsf.xml.serializer.utils;
+
+import java.util.ListResourceBundle;
+import java.util.Locale;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+/**
+ * A utility class for issuing error messages.
+ * 
+ * A user of this class normally would create a singleton 
+ * instance of this class, passing the name
+ * of the message class on the constructor. For example:
+ * <CODE>
+ * static Messages x = new Messages("org.package.MyMessages");
+ * </CODE>
+ * Later the message is typically generated this way if there are no 
+ * substitution arguments:
+ * <CODE>
+ * String msg = x.createMessage(org.package.MyMessages.KEY_ONE, null); 
+ * </CODE>
+ * If there are arguments substitutions then something like this:
+ * <CODE>
+ * String filename = ...;
+ * String directory = ...;
+ * String msg = x.createMessage(org.package.MyMessages.KEY_TWO, 
+ *   new Object[] {filename, directory) ); 
+ * </CODE>
+ *  
+ * The constructor of an instance of this class must be given
+ * the class name of a class that extends java.util.ListResourceBundle 
+ * ("org.package.MyMessages" in the example above).  
+ * The name should not have any language suffix 
+ * which will be added automatically by this utility class.
+ * 
+ * The message class ("org.package.MyMessages")
+ * must define the abstract method getContents() that is
+ * declared in its base class, for example:
+ * <CODE>
+ * public Object[][] getContents() {return contents;}
+ * </CODE>
+ * 
+ * It is suggested that the message class expose its
+ * message keys like this:
+ * <CODE>
+ *   public static final String KEY_ONE = "KEY1";
+ *   public static final String KEY_TWO = "KEY2";
+ *   . . . 
+ * </CODE>
+ * and used through their names (KEY_ONE ...) rather than
+ * their values ("KEY1" ...).
+ * 
+ * The field contents (returned by getContents()
+ * should be initialized something like this:
+ * <CODE>
+ * public static final Object[][] contents = {
+ * { KEY_ONE, "Something has gone wrong!" },
+ * { KEY_TWO, "The file ''{0}'' does not exist in directory ''{1}''." },
+ * . . .
+ * { KEY_N, "Message N" }  }
+ * </CODE>
+ * 
+ * Where that section of code with the KEY to Message mappings
+ * (where the message classes 'contents' field is initialized)
+ * can have the Message strings translated in an alternate language
+ * in a errorResourceClass with a language suffix.
+ * 
+ * More sophisticated use of this class would be to pass null
+ * when contructing it, but then call loadResourceBundle()
+ * before creating any messages.
+ * 
+ * This class is not a public API, it is only public because it is 
+ * used in org.ajax4jsf.xml.serializer.
+ *
+ *  @xsl.usage internal
+ */
+public final class Messages
+{
+    /** The local object to use.  */
+    private final Locale m_locale = Locale.getDefault();
+
+    /** The language specific resource object for messages.  */
+    private ListResourceBundle m_resourceBundle;
+
+    /** The class name of the error message string table with no language suffix. */
+    private String m_resourceBundleName;
+
+
+
+    /**
+     * Constructor.
+     * @param resourceBundle the class name of the ListResourceBundle
+     * that the instance of this class is associated with and will use when
+     * creating messages.
+     * The class name is without a language suffix. If the value passed
+     * is null then loadResourceBundle(errorResourceClass) needs to be called
+     * explicitly before any messages are created.
+     * 
+     * @xsl.usage internal
+     */
+    Messages(String resourceBundle)
+    {
+
+        m_resourceBundleName = resourceBundle;
+    }
+    
+    /*
+     * Set the Locale object to use. If this method is not called the
+     * default locale is used. This method needs to be called before
+     * loadResourceBundle().
+     * 
+     * @param locale non-null reference to Locale object.
+     * @xsl.usage internal
+     */
+//    public void setLocale(Locale locale)
+//    {
+//        m_locale = locale;
+//    }
+
+    /**
+     * Get the Locale object that is being used.
+     * 
+     * @return non-null reference to Locale object.
+     * @xsl.usage internal
+     */
+    private Locale getLocale()
+    {
+        return m_locale;
+    }
+
+    /**
+     * Get the ListResourceBundle being used by this Messages instance which was
+     * previously set by a call to loadResourceBundle(className)
+     * @xsl.usage internal
+     */
+    private ListResourceBundle getResourceBundle()
+    {
+        return m_resourceBundle;
+    }
+
+    /**
+     * Creates a message from the specified key and replacement
+     * arguments, localized to the given locale.
+     *
+     * @param msgKey  The key for the message text.
+     * @param args    The arguments to be used as replacement text
+     * in the message created.
+     *
+     * @return The formatted message string.
+     * @xsl.usage internal
+     */
+    public final String createMessage(String msgKey, Object args[])
+    {
+        if (m_resourceBundle == null)
+            m_resourceBundle = loadResourceBundle(m_resourceBundleName);
+
+        if (m_resourceBundle != null)
+        {
+            return createMsg(m_resourceBundle, msgKey, args);
+        }
+        else
+            return "Could not load the resource bundles: "+ m_resourceBundleName;
+    }
+
+    /**
+     * Creates a message from the specified key and replacement
+     * arguments, localized to the given locale.
+     *
+     * @param errorCode The key for the message text.
+     *
+     * @param fResourceBundle The resource bundle to use.
+     * @param msgKey  The message key to use.
+     * @param args      The arguments to be used as replacement text
+     *                  in the message created.
+     *
+     * @return The formatted message string.
+     * @xsl.usage internal
+     */
+    private final String createMsg(
+        ListResourceBundle fResourceBundle,
+        String msgKey,
+        Object args[]) //throws Exception
+    {
+
+        String fmsg = null;
+        boolean throwex = false;
+        String msg = null;
+
+        if (msgKey != null)
+            msg = fResourceBundle.getString(msgKey);
+        else
+            msgKey = "";
+
+        if (msg == null)
+        {
+            throwex = true;
+            /* The message is not in the bundle . . . this is bad,
+             * so try to get the message that the message is not in the bundle
+             */
+            try
+            {
+
+                msg =
+                    java.text.MessageFormat.format(
+                        MsgKey.BAD_MSGKEY,
+                        new Object[] { msgKey, m_resourceBundleName });
+            }
+            catch (Exception e)
+            {
+                /* even the message that the message is not in the bundle is
+                 * not there ... this is really bad
+                 */
+                msg =
+                    "The message key '"
+                        + msgKey
+                        + "' is not in the message class '"
+                        + m_resourceBundleName+"'";
+            }
+        }
+        else if (args != null)
+        {
+            try
+            {
+                // Do this to keep format from crying.
+                // This is better than making a bunch of conditional
+                // code all over the place.
+                int n = args.length;
+
+                for (int i = 0; i < n; i++)
+                {
+                    if (null == args[i])
+                        args[i] = "";
+                }
+
+                fmsg = java.text.MessageFormat.format(msg, args);
+                // if we get past the line above we have create the message ... hurray!
+            }
+            catch (Exception e)
+            {
+                throwex = true;
+                try
+                {
+                    // Get the message that the format failed.
+                    fmsg =
+                        java.text.MessageFormat.format(
+                            MsgKey.BAD_MSGFORMAT,
+                            new Object[] { msgKey, m_resourceBundleName });
+                    fmsg += " " + msg;
+                }
+                catch (Exception formatfailed)
+                {
+                    // We couldn't even get the message that the format of
+                    // the message failed ... so fall back to English.
+                    fmsg =
+                        "The format of message '"
+                            + msgKey
+                            + "' in message class '"
+                            + m_resourceBundleName
+                            + "' failed.";
+                }
+            }
+        }
+        else
+            fmsg = msg;
+
+        if (throwex)
+        {
+            throw new RuntimeException(fmsg);
+        }
+
+        return fmsg;
+    }
+
+    /**
+     * Return a named ResourceBundle for a particular locale.  This method mimics the behavior
+     * of ResourceBundle.getBundle().
+     * 
+     * @param className the name of the class that implements ListResourceBundle,
+     * without language suffix.
+     * @return the ResourceBundle
+     * @throws MissingResourceException
+     * @xsl.usage internal
+     */
+    private ListResourceBundle loadResourceBundle(String resourceBundle)
+        throws MissingResourceException
+    {
+        m_resourceBundleName = resourceBundle;
+        Locale locale = getLocale();
+
+        ListResourceBundle lrb;
+
+        try
+        {
+
+            ResourceBundle rb =
+                ResourceBundle.getBundle(m_resourceBundleName, locale);
+            lrb = (ListResourceBundle) rb;
+        }
+        catch (MissingResourceException e)
+        {
+            try // try to fall back to en_US if we can't load
+                {
+
+                // Since we can't find the localized property file,
+                // fall back to en_US.
+                lrb =
+                    (ListResourceBundle) ResourceBundle.getBundle(
+                        m_resourceBundleName,
+                        new Locale("en", "US"));
+            }
+            catch (MissingResourceException e2)
+            {
+
+                // Now we are really in trouble.
+                // very bad, definitely very bad...not going to get very far
+                throw new MissingResourceException(
+                    "Could not load any resource bundles." + m_resourceBundleName,
+                    m_resourceBundleName,
+                    "");
+            }
+        }
+        m_resourceBundle = lrb;
+        return lrb;
+    }
+
+    /**
+     * Return the resource file suffic for the indicated locale
+     * For most locales, this will be based the language code.  However
+     * for Chinese, we do distinguish between Taiwan and PRC
+     *
+     * @param locale the locale
+     * @return an String suffix which can be appended to a resource name
+     * @xsl.usage internal
+     */
+    private static String getResourceSuffix(Locale locale)
+    {
+
+        String suffix = "_" + locale.getLanguage();
+        String country = locale.getCountry();
+
+        if (country.equals("TW"))
+            suffix += "_" + country;
+
+        return suffix;
+    }
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/MsgKey.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/MsgKey.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/MsgKey.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,119 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: MsgKey.java,v 1.1.2.1 2007/01/09 18:58:39 alexsmirnov Exp $
+ */
+package org.ajax4jsf.xml.serializer.utils;
+
+/**
+ * This class is not a public API,
+ * It is used internally by serializer and is public,
+ * in the Java sense, only because its use crosses
+ * package boundaries.
+ * <p>
+ * This class holds only the message keys used
+ * when generating messages.
+ */
+public class MsgKey {
+
+    /** An internal error with the messages,
+     * this is the message to use if the message key can't be found 
+     */
+    public static final String BAD_MSGKEY = "BAD_MSGKEY";
+
+    /** 
+     * An internal error with the messages,
+     * this is the message to use if the message format operation failed.  
+     */
+    public static final String BAD_MSGFORMAT = "BAD_MSGFORMAT";
+
+    public static final String ER_RESOURCE_COULD_NOT_FIND =
+        "ER_RESOURCE_COULD_NOT_FIND";
+    public static final String ER_RESOURCE_COULD_NOT_LOAD =
+        "ER_RESOURCE_COULD_NOT_LOAD";
+    public static final String ER_BUFFER_SIZE_LESSTHAN_ZERO =
+        "ER_BUFFER_SIZE_LESSTHAN_ZERO";
+    public static final String ER_INVALID_UTF16_SURROGATE =
+        "ER_INVALID_UTF16_SURROGATE";
+    public static final String ER_OIERROR = "ER_OIERROR";
+    public static final String ER_NAMESPACE_PREFIX = "ER_NAMESPACE_PREFIX";
+    public static final String ER_STRAY_ATTRIBUTE = "ER_STRAY_ATTRIBUTE";
+    public static final String ER_STRAY_NAMESPACE = "ER_STRAY_NAMESPACE";
+    public static final String ER_COULD_NOT_LOAD_RESOURCE =
+        "ER_COULD_NOT_LOAD_RESOURCE";
+    public static final String ER_COULD_NOT_LOAD_METHOD_PROPERTY =
+        "ER_COULD_NOT_LOAD_METHOD_PROPERTY";
+    public static final String ER_SERIALIZER_NOT_CONTENTHANDLER =
+        "ER_SERIALIZER_NOT_CONTENTHANDLER";
+    public static final String ER_ILLEGAL_ATTRIBUTE_POSITION =
+        "ER_ILLEGAL_ATTRIBUTE_POSITION";
+    public static final String ER_ILLEGAL_CHARACTER = "ER_ILLEGAL_CHARACTER";
+
+    public static final String ER_INVALID_PORT = "ER_INVALID_PORT";
+    public static final String ER_PORT_WHEN_HOST_NULL =
+        "ER_PORT_WHEN_HOST_NULL";
+    public static final String ER_HOST_ADDRESS_NOT_WELLFORMED =
+        "ER_HOST_ADDRESS_NOT_WELLFORMED";
+    public static final String ER_SCHEME_NOT_CONFORMANT =
+        "ER_SCHEME_NOT_CONFORMANT";
+    public static final String ER_SCHEME_FROM_NULL_STRING =
+        "ER_SCHEME_FROM_NULL_STRING";
+    public static final String ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE =
+        "ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE";
+    public static final String ER_PATH_INVALID_CHAR = "ER_PATH_INVALID_CHAR";
+    public static final String ER_NO_SCHEME_INURI = "ER_NO_SCHEME_INURI";
+    public static final String ER_FRAG_INVALID_CHAR = "ER_FRAG_INVALID_CHAR";
+    public static final String ER_FRAG_WHEN_PATH_NULL =
+        "ER_FRAG_WHEN_PATH_NULL";
+    public static final String ER_FRAG_FOR_GENERIC_URI =
+        "ER_FRAG_FOR_GENERIC_URI";
+    public static final String ER_NO_SCHEME_IN_URI = "ER_NO_SCHEME_IN_URI";
+    public static final String ER_CANNOT_INIT_URI_EMPTY_PARMS =
+        "ER_CANNOT_INIT_URI_EMPTY_PARMS";
+    public static final String ER_NO_FRAGMENT_STRING_IN_PATH =
+        "ER_NO_FRAGMENT_STRING_IN_PATH";
+    public static final String ER_NO_QUERY_STRING_IN_PATH =
+        "ER_NO_QUERY_STRING_IN_PATH";
+    public static final String ER_NO_PORT_IF_NO_HOST = "ER_NO_PORT_IF_NO_HOST";
+    public static final String ER_NO_USERINFO_IF_NO_HOST =
+        "ER_NO_USERINFO_IF_NO_HOST";
+    public static final String ER_SCHEME_REQUIRED = "ER_SCHEME_REQUIRED";
+    public static final String ER_XML_VERSION_NOT_SUPPORTED = "ER_XML_VERSION_NOT_SUPPORTED";
+    public static final String ER_FACTORY_PROPERTY_MISSING = "ER_FACTORY_PROPERTY_MISSING";
+    public static final String ER_ENCODING_NOT_SUPPORTED = "ER_ENCODING_NOT_SUPPORTED";
+    
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,222 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: SerializerMessages.java,v 1.1.2.1 2007/01/09 18:58:40 alexsmirnov Exp $
+ */
+package org.ajax4jsf.xml.serializer.utils;
+
+import java.util.ListResourceBundle;
+
+/**
+ * An instance of this class is a ListResourceBundle that
+ * has the required getContents() method that returns
+ * an array of message-key/message associations.
+ * <p>
+ * The message keys are defined in {@link MsgKey}. The
+ * messages that those keys map to are defined here.
+ * <p>
+ * The messages in the English version are intended to be
+ * translated. 
+ * 
+ * This class is not a public API, it is only public because it is 
+ * used in org.ajax4jsf.xml.serializer.
+ * 
+ * @xsl.usage internal
+ */
+public class SerializerMessages extends ListResourceBundle {
+
+    /*
+     * This file contains error and warning messages related to
+     * Serializer Error Handling.
+     *
+     *  General notes to translators:
+    
+     *  1) A stylesheet is a description of how to transform an input XML document
+     *     into a resultant XML document (or HTML document or text).  The
+     *     stylesheet itself is described in the form of an XML document.
+    
+     *
+     *  2) An element is a mark-up tag in an XML document; an attribute is a
+     *     modifier on the tag.  For example, in <elem attr='val' attr2='val2'>
+     *     "elem" is an element name, "attr" and "attr2" are attribute names with
+     *     the values "val" and "val2", respectively.
+     *
+     *  3) A namespace declaration is a special attribute that is used to associate
+     *     a prefix with a URI (the namespace).  The meanings of element names and
+     *     attribute names that use that prefix are defined with respect to that
+     *     namespace.
+     *
+     *
+     */
+
+    /** The lookup table for error messages.   */
+    public Object[][] getContents() {
+        Object[][] contents = new Object[][] {
+            {   MsgKey.BAD_MSGKEY,
+                "The message key ''{0}'' is not in the message class ''{1}''" },
+                
+            {   MsgKey.BAD_MSGFORMAT,
+                "The format of message ''{0}'' in message class ''{1}'' failed." },
+
+            {   MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER,
+                "The serializer class ''{0}'' does not implement org.xml.sax.ContentHandler." },
+
+            {   MsgKey.ER_RESOURCE_COULD_NOT_FIND,
+                    "The resource [ {0} ] could not be found.\n {1}" },
+
+            {   MsgKey.ER_RESOURCE_COULD_NOT_LOAD,
+                    "The resource [ {0} ] could not load: {1} \n {2} \t {3}" },
+
+            {   MsgKey.ER_BUFFER_SIZE_LESSTHAN_ZERO, 
+                    "Buffer size <=0" }, 
+
+            {   MsgKey.ER_INVALID_UTF16_SURROGATE,
+                    "Invalid UTF-16 surrogate detected: {0} ?" },
+
+            {   MsgKey.ER_OIERROR, 
+                "IO error" }, 
+
+            {   MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION,
+                "Cannot add attribute {0} after child nodes or before an element is produced.  Attribute will be ignored." },
+
+            /*
+             * Note to translators:  The stylesheet contained a reference to a
+             * namespace prefix that was undefined.  The value of the substitution
+             * text is the name of the prefix.
+             */ 
+            {   MsgKey.ER_NAMESPACE_PREFIX,
+                "Namespace for prefix ''{0}'' has not been declared." },
+
+            /*
+             * Note to translators:  This message is reported if the stylesheet
+             * being processed attempted to construct an XML document with an
+             * attribute in a place other than on an element.  The substitution text
+             * specifies the name of the attribute.
+             */ 
+            {   MsgKey.ER_STRAY_ATTRIBUTE,
+                "Attribute ''{0}'' outside of element." },
+
+            /*
+             * Note to translators:  As with the preceding message, a namespace
+             * declaration has the form of an attribute and is only permitted to
+             * appear on an element.  The substitution text {0} is the namespace
+             * prefix and {1} is the URI that was being used in the erroneous
+             * namespace declaration.
+             */ 
+            {   MsgKey.ER_STRAY_NAMESPACE,
+                "Namespace declaration ''{0}''=''{1}'' outside of element." },
+
+            {   MsgKey.ER_COULD_NOT_LOAD_RESOURCE,
+                "Could not load ''{0}'' (check CLASSPATH), now using just the defaults" },
+
+            {   MsgKey.ER_ILLEGAL_CHARACTER,
+                "Attempt to output character of integral value {0} that is not represented in specified output encoding of {1}." },
+
+            {   MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY,
+                "Could not load the propery file ''{0}'' for output method ''{1}'' (check CLASSPATH)" },
+
+            {   MsgKey.ER_INVALID_PORT, 
+                "Invalid port number" }, 
+
+            {   MsgKey.ER_PORT_WHEN_HOST_NULL,
+                "Port cannot be set when host is null" },
+
+            {   MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED,
+                "Host is not a well formed address" },
+
+            {   MsgKey.ER_SCHEME_NOT_CONFORMANT,
+                "The scheme is not conformant." },
+
+            {   MsgKey.ER_SCHEME_FROM_NULL_STRING,
+                "Cannot set scheme from null string" },
+
+            {   MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE,
+                "Path contains invalid escape sequence" },
+
+            {   MsgKey.ER_PATH_INVALID_CHAR,
+                "Path contains invalid character: {0}" },
+
+            {   MsgKey.ER_FRAG_INVALID_CHAR,
+                "Fragment contains invalid character" },
+
+            {   MsgKey.ER_FRAG_WHEN_PATH_NULL,
+                "Fragment cannot be set when path is null" },
+
+            {   MsgKey.ER_FRAG_FOR_GENERIC_URI,
+                "Fragment can only be set for a generic URI" },
+
+            {   MsgKey.ER_NO_SCHEME_IN_URI, 
+                "No scheme found in URI" }, 
+
+            {   MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS,
+                "Cannot initialize URI with empty parameters" },
+
+            {   MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH,
+                "Fragment cannot be specified in both the path and fragment" },
+
+            {   MsgKey.ER_NO_QUERY_STRING_IN_PATH,
+                "Query string cannot be specified in path and query string" },
+
+            {   MsgKey.ER_NO_PORT_IF_NO_HOST,
+                "Port may not be specified if host is not specified" },
+
+            {   MsgKey.ER_NO_USERINFO_IF_NO_HOST,
+                "Userinfo may not be specified if host is not specified" },
+
+            {   MsgKey.ER_XML_VERSION_NOT_SUPPORTED,
+                "Warning:  The version of the output document is requested to be ''{0}''.  This version of XML is not supported.  The version of the output document will be ''1.0''." },
+
+            {   MsgKey.ER_SCHEME_REQUIRED, 
+                "Scheme is required!" },
+                
+            /*
+             * Note to translators:  The words 'Properties' and
+             * 'SerializerFactory' in this message are Java class names
+             * and should not be translated.
+             */    
+            {   MsgKey.ER_FACTORY_PROPERTY_MISSING,
+                "The Properties object passed to the SerializerFactory does not have a ''{0}'' property." },
+
+            {   MsgKey.ER_ENCODING_NOT_SUPPORTED,
+                "Warning:  The encoding ''{0}'' is not supported by the Java runtime." },
+                
+
+        };
+
+        return contents;
+    }
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_ca.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_ca.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_ca.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,147 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: SerializerMessages_ca.java,v 1.1.2.1 2007/01/09 18:58:40 alexsmirnov Exp $
+ */
+
+package org.ajax4jsf.xml.serializer.utils;
+
+import java.util.ListResourceBundle;
+
+public class SerializerMessages_ca extends ListResourceBundle {
+  public Object[][] getContents() {
+    Object[][] contents =  new Object[][] {
+      { MsgKey.BAD_MSGKEY,
+        "The message key ''{0}'' is not in the message class ''{1}''"},
+
+      { MsgKey.BAD_MSGFORMAT,
+        "The format of message ''{0}'' in message class ''{1}'' failed."},
+
+      { MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER,
+        "The serializer class ''{0}'' does not implement org.xml.sax.ContentHandler."},
+
+      { MsgKey.ER_RESOURCE_COULD_NOT_FIND,
+        "The resource [ {0} ] could not be found.\n {1}"},
+
+      { MsgKey.ER_RESOURCE_COULD_NOT_LOAD,
+        "The resource [ {0} ] could not load: {1} \n {2} \n {3}"},
+
+      { MsgKey.ER_BUFFER_SIZE_LESSTHAN_ZERO,
+        "Buffer size <=0"},
+
+      { MsgKey.ER_INVALID_UTF16_SURROGATE,
+        "Invalid UTF-16 surrogate detected: {0} ?"},
+
+      { MsgKey.ER_OIERROR,
+        "IO error"},
+
+      { MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION,
+        "Cannot add attribute {0} after child nodes or before an element is produced.  Attribute will be ignored."},
+
+      { MsgKey.ER_NAMESPACE_PREFIX,
+        "Namespace for prefix ''{0}'' has not been declared."},
+
+      { MsgKey.ER_STRAY_ATTRIBUTE,
+        "Attribute ''{0}'' outside of element."},
+
+      { MsgKey.ER_STRAY_NAMESPACE,
+        "Namespace declaration ''{0}''=''{1}'' outside of element."},
+
+      { MsgKey.ER_COULD_NOT_LOAD_RESOURCE,
+        "Could not load ''{0}'' (check CLASSPATH), now using just the defaults"},
+
+      { MsgKey.ER_ILLEGAL_CHARACTER,
+        "Attempt to output character of integral value {0} that is not represented in specified output encoding of {1}."},
+
+      { MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY,
+        "Could not load the propery file ''{0}'' for output method ''{1}'' (check CLASSPATH)"},
+
+      { MsgKey.ER_INVALID_PORT,
+        "Invalid port number"},
+
+      { MsgKey.ER_PORT_WHEN_HOST_NULL,
+        "Port cannot be set when host is null"},
+
+      { MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED,
+        "Host is not a well formed address"},
+
+      { MsgKey.ER_SCHEME_NOT_CONFORMANT,
+        "The scheme is not conformant."},
+
+      { MsgKey.ER_SCHEME_FROM_NULL_STRING,
+        "Cannot set scheme from null string"},
+
+      { MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE,
+        "Path contains invalid escape sequence"},
+
+      { MsgKey.ER_PATH_INVALID_CHAR,
+        "Path contains invalid character: {0}"},
+
+      { MsgKey.ER_FRAG_INVALID_CHAR,
+        "Fragment contains invalid character"},
+
+      { MsgKey.ER_FRAG_WHEN_PATH_NULL,
+        "Fragment cannot be set when path is null"},
+
+      { MsgKey.ER_FRAG_FOR_GENERIC_URI,
+        "Fragment can only be set for a generic URI"},
+
+      { MsgKey.ER_NO_SCHEME_IN_URI,
+        "No scheme found in URI"},
+
+      { MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS,
+        "Cannot initialize URI with empty parameters"},
+
+      { MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH,
+        "Fragment cannot be specified in both the path and fragment"},
+
+      { MsgKey.ER_NO_QUERY_STRING_IN_PATH,
+        "Query string cannot be specified in path and query string"},
+
+      { MsgKey.ER_NO_PORT_IF_NO_HOST,
+        "Port may not be specified if host is not specified"},
+
+      { MsgKey.ER_NO_USERINFO_IF_NO_HOST,
+        "Userinfo may not be specified if host is not specified"},
+
+      { MsgKey.ER_SCHEME_REQUIRED,
+        "Scheme is required!"}
+
+    };
+    return contents;
+  }
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_cs.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_cs.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_cs.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,139 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: SerializerMessages_cs.java,v 1.1.2.1 2007/01/09 18:58:37 alexsmirnov Exp $
+ */
+
+package org.ajax4jsf.xml.serializer.utils;
+
+import java.util.ListResourceBundle;
+
+public class SerializerMessages_cs extends ListResourceBundle {
+  public Object[][] getContents() {
+    Object[][] contents =  new Object[][] {
+        // BAD_MSGKEY needs translation
+        // BAD_MSGFORMAT needs translation
+      { MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER,
+        "T\u0159\u00edda serializace ''{0}'' neimplementuje org.xml.sax.ContentHandler."},
+
+      { MsgKey.ER_RESOURCE_COULD_NOT_FIND,
+        "Nelze naj\u00edt zdroj [ {0} ].\n {1}"},
+
+      { MsgKey.ER_RESOURCE_COULD_NOT_LOAD,
+        "Nelze zav\u00e9st zdroj [ {0} ]: {1} \n {2} \n {3}"},
+
+      { MsgKey.ER_BUFFER_SIZE_LESSTHAN_ZERO,
+        "Velikost vyrovn\u00e1vac\u00ed pam\u011bti <=0"},
+
+      { MsgKey.ER_INVALID_UTF16_SURROGATE,
+        "Byla zji\u0161t\u011bna neplatn\u00e1 n\u00e1hrada UTF-16: {0} ?"},
+
+      { MsgKey.ER_OIERROR,
+        "Chyba vstupu/v\u00fdstupu"},
+
+      { MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION,
+        "Nelze p\u0159idat atribut {0} po uzlech potomk\u016f ani p\u0159ed t\u00edm, ne\u017e je vytvo\u0159en prvek. Atribut bude ignorov\u00e1n."},
+
+      { MsgKey.ER_NAMESPACE_PREFIX,
+        "Obor n\u00e1zv\u016f pro p\u0159edponu ''{0}'' nebyl deklarov\u00e1n."},
+
+        // ER_STRAY_ATTRIBUTE needs translation
+      { MsgKey.ER_STRAY_NAMESPACE,
+        "Deklarace oboru n\u00e1zv\u016f ''{0}''=''{1}'' je vn\u011b prvku."},
+
+      { MsgKey.ER_COULD_NOT_LOAD_RESOURCE,
+        "Nelze zav\u00e9st ''{0}'' (zkontrolujte prom\u011bnnou CLASSPATH), proto se pou\u017e\u00edvaj\u00ed pouze v\u00fdchoz\u00ed hodnoty"},
+
+        // ER_ILLEGAL_CHARACTER needs translation
+      { MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY,
+        "Nelze na\u010d\u00edst soubor vlastnost\u00ed ''{0}'' pro v\u00fdstupn\u00ed metodu ''{1}'' (zkontrolujte prom\u011bnnou CLASSPATH)."},
+
+      { MsgKey.ER_INVALID_PORT,
+        "Neplatn\u00e9 \u010d\u00edslo portu."},
+
+      { MsgKey.ER_PORT_WHEN_HOST_NULL,
+        "M\u00e1-li hostitel hodnotu null, nelze nastavit port."},
+
+      { MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED,
+        "Adresa hostitele m\u00e1 nespr\u00e1vn\u00fd form\u00e1t."},
+
+      { MsgKey.ER_SCHEME_NOT_CONFORMANT,
+        "Sch\u00e9ma nevyhovuje."},
+
+      { MsgKey.ER_SCHEME_FROM_NULL_STRING,
+        "Nelze nastavit sch\u00e9ma \u0159et\u011bzce s hodnotou null."},
+
+      { MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE,
+        "Cesta obsahuje neplatnou escape sekvenci"},
+
+      { MsgKey.ER_PATH_INVALID_CHAR,
+        "Cesta obsahuje neplatn\u00fd znak: {0}"},
+
+      { MsgKey.ER_FRAG_INVALID_CHAR,
+        "Fragment obsahuje neplatn\u00fd znak."},
+
+      { MsgKey.ER_FRAG_WHEN_PATH_NULL,
+        "M\u00e1-li cesta hodnotu null, nelze nastavit fragment."},
+
+      { MsgKey.ER_FRAG_FOR_GENERIC_URI,
+        "Fragment lze nastavit jen u generick\u00e9ho URI."},
+
+      { MsgKey.ER_NO_SCHEME_IN_URI,
+        "V URI nebylo nalezeno \u017e\u00e1dn\u00e9 sch\u00e9ma: {0}"},
+
+      { MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS,
+        "URI nelze inicializovat s pr\u00e1zdn\u00fdmi parametry."},
+
+      { MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH,
+        "Fragment nelze ur\u010dit z\u00e1rove\u0148 v cest\u011b i ve fragmentu."},
+
+      { MsgKey.ER_NO_QUERY_STRING_IN_PATH,
+        "V \u0159et\u011bzci cesty a dotazu nelze zadat \u0159et\u011bzec dotazu."},
+
+      { MsgKey.ER_NO_PORT_IF_NO_HOST,
+        "Nen\u00ed-li ur\u010den hostitel, nelze zadat port."},
+
+      { MsgKey.ER_NO_USERINFO_IF_NO_HOST,
+        "Nen\u00ed-li ur\u010den hostitel, nelze zadat \u00fadaje o u\u017eivateli."},
+
+      { MsgKey.ER_SCHEME_REQUIRED,
+        "Je vy\u017eadov\u00e1no sch\u00e9ma!"}
+
+    };
+    return contents;
+  }
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_de.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_de.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_de.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,139 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: SerializerMessages_de.java,v 1.1.2.1 2007/01/09 18:58:37 alexsmirnov Exp $
+ */
+
+package org.ajax4jsf.xml.serializer.utils;
+
+import java.util.ListResourceBundle;
+
+public class SerializerMessages_de extends ListResourceBundle {
+  public Object[][] getContents() {
+    Object[][] contents =  new Object[][] {
+        // BAD_MSGKEY needs translation
+        // BAD_MSGFORMAT needs translation
+      { MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER,
+        "Die Parallel-Seriell-Umsetzerklasse ''{0}'' implementiert org.xml.sax.ContentHandler nicht."},
+
+      { MsgKey.ER_RESOURCE_COULD_NOT_FIND,
+        "Die Ressource [ {0} ] konnte nicht gefunden werden.\n {1}"},
+
+      { MsgKey.ER_RESOURCE_COULD_NOT_LOAD,
+        "Die Ressource [ {0} ] konnte nicht geladen werden: {1} \n {2} \n {3}"},
+
+      { MsgKey.ER_BUFFER_SIZE_LESSTHAN_ZERO,
+        "Puffergr\u00f6\u00dfe <=0"},
+
+      { MsgKey.ER_INVALID_UTF16_SURROGATE,
+        "Ung\u00fcltige UTF-16-Ersetzung festgestellt: {0} ?"},
+
+      { MsgKey.ER_OIERROR,
+        "E/A-Fehler"},
+
+      { MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION,
+        "Attribut {0} kann nicht nach Kindknoten oder vor dem Erstellen eines Elements hinzugef\u00fcgt werden.  Das Attribut wird ignoriert."},
+
+      { MsgKey.ER_NAMESPACE_PREFIX,
+        "Der Namensbereich f\u00fcr Pr\u00e4fix ''{0}'' wurde nicht deklariert."},
+
+        // ER_STRAY_ATTRIBUTE needs translation
+      { MsgKey.ER_STRAY_NAMESPACE,
+        "Namensbereichsdeklaration ''{0}''=''{1}'' befindet sich nicht in einem Element."},
+
+      { MsgKey.ER_COULD_NOT_LOAD_RESOURCE,
+        "''{0}'' konnte nicht geladen werden (CLASSPATH pr\u00fcfen); es werden die Standardwerte verwendet"},
+
+        // ER_ILLEGAL_CHARACTER needs translation
+      { MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY,
+        "Merkmaldatei ''{0}'' konnte f\u00fcr Ausgabemethode ''{1}'' nicht geladen werden (CLASSPATH pr\u00fcfen)"},
+
+      { MsgKey.ER_INVALID_PORT,
+        "Ung\u00fcltige Portnummer"},
+
+      { MsgKey.ER_PORT_WHEN_HOST_NULL,
+        "Der Port kann nicht festgelegt werden, wenn der Host gleich Null ist."},
+
+      { MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED,
+        "Der Host ist keine syntaktisch korrekte Adresse."},
+
+      { MsgKey.ER_SCHEME_NOT_CONFORMANT,
+        "Das Schema ist nicht angepasst."},
+
+      { MsgKey.ER_SCHEME_FROM_NULL_STRING,
+        "Schema kann nicht von Nullzeichenfolge festgelegt werden."},
+
+      { MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE,
+        "Der Pfad enth\u00e4lt eine ung\u00fcltige Escapezeichenfolge."},
+
+      { MsgKey.ER_PATH_INVALID_CHAR,
+        "Pfad enth\u00e4lt ung\u00fcltiges Zeichen: {0}."},
+
+      { MsgKey.ER_FRAG_INVALID_CHAR,
+        "Fragment enth\u00e4lt ein ung\u00fcltiges Zeichen."},
+
+      { MsgKey.ER_FRAG_WHEN_PATH_NULL,
+        "Fragment kann nicht festgelegt werden, wenn der Pfad gleich Null ist."},
+
+      { MsgKey.ER_FRAG_FOR_GENERIC_URI,
+        "Fragment kann nur f\u00fcr eine generische URI (Uniform Resource Identifier) festgelegt werden."},
+
+      { MsgKey.ER_NO_SCHEME_IN_URI,
+        "Kein Schema gefunden in URI: {0}."},
+
+      { MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS,
+        "URI (Uniform Resource Identifier) kann nicht mit leeren Parametern initialisiert werden."},
+
+      { MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH,
+        "Fragment kann nicht im Pfad und im Fragment angegeben werden."},
+
+      { MsgKey.ER_NO_QUERY_STRING_IN_PATH,
+        "Abfragezeichenfolge kann nicht im Pfad und in der Abfragezeichenfolge angegeben werden."},
+
+      { MsgKey.ER_NO_PORT_IF_NO_HOST,
+        "Der Port kann nicht angegeben werden, wenn der Host nicht angegeben wurde."},
+
+      { MsgKey.ER_NO_USERINFO_IF_NO_HOST,
+        "Benutzerinformationen k\u00f6nnen nicht angegeben werden, wenn der Host nicht angegeben wurde."},
+
+      { MsgKey.ER_SCHEME_REQUIRED,
+        "Schema ist erforderlich!"}
+
+    };
+    return contents;
+  }
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_en.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_en.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_en.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,49 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: SerializerMessages_en.java,v 1.1.2.1 2007/01/09 18:58:35 alexsmirnov Exp $
+ */
+package org.ajax4jsf.xml.serializer.utils;
+
+
+/**
+ * Default implementation.  This is just an empty class.
+ * @xsl.usage internal
+ */
+public final class SerializerMessages_en extends SerializerMessages
+{
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_es.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_es.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_es.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,139 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: SerializerMessages_es.java,v 1.1.2.1 2007/01/09 18:58:37 alexsmirnov Exp $
+ */
+
+package org.ajax4jsf.xml.serializer.utils;
+
+import java.util.ListResourceBundle;
+
+public class SerializerMessages_es extends ListResourceBundle {
+  public Object[][] getContents() {
+    Object[][] contents =  new Object[][] {
+        // BAD_MSGKEY needs translation
+        // BAD_MSGFORMAT needs translation
+      { MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER,
+        "La clase serializer ''{0}'' no implementa org.xml.sax.ContentHandler."},
+
+      { MsgKey.ER_RESOURCE_COULD_NOT_FIND,
+        "No se ha podido cargar el recurso [ {0} ].\n{1}"},
+
+      { MsgKey.ER_RESOURCE_COULD_NOT_LOAD,
+        "No se ha podido cargar el recurso [ {0} ]: {1} \n {2} \n {3}"},
+
+      { MsgKey.ER_BUFFER_SIZE_LESSTHAN_ZERO,
+        "Tama\u00f1o de almacenamiento intermedio <=0"},
+
+      { MsgKey.ER_INVALID_UTF16_SURROGATE,
+        "\u00bfSe ha detectado un sustituto UTF-16 no v\u00e1lido: {0}?"},
+
+      { MsgKey.ER_OIERROR,
+        "Error de ES"},
+
+      { MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION,
+        "No se puede a\u00f1adir el atributo {0} despu\u00e9s de nodos hijo o antes de que se produzca un elemento. Se ignorar\u00e1 el atributo."},
+
+      { MsgKey.ER_NAMESPACE_PREFIX,
+        "No se ha declarado el espacio de nombres para el prefijo ''{0}''."},
+
+        // ER_STRAY_ATTRIBUTE needs translation
+      { MsgKey.ER_STRAY_NAMESPACE,
+        "Declaraci\u00f3n del espacio de nombres ''{0}''=''{1}'' fuera del elemento."},
+
+      { MsgKey.ER_COULD_NOT_LOAD_RESOURCE,
+        "No se ha podido cargar ''{0}'' (compruebe la CLASSPATH), ahora s\u00f3lo se est\u00e1n utilizando los valores por omisi\u00f3n"},
+
+        // ER_ILLEGAL_CHARACTER needs translation
+      { MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY,
+        "No se ha podido cargar el archivo de propiedades ''{0}'' para el m\u00e9todo de salida ''{1}'' (compruebe la CLASSPATH)"},
+
+      { MsgKey.ER_INVALID_PORT,
+        "N\u00famero de puerto no v\u00e1lido"},
+
+      { MsgKey.ER_PORT_WHEN_HOST_NULL,
+        "No se puede establecer el puerto si el sistema principal es nulo"},
+
+      { MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED,
+        "El sistema principal no es una direcci\u00f3n bien formada"},
+
+      { MsgKey.ER_SCHEME_NOT_CONFORMANT,
+        "El esquema no es compatible."},
+
+      { MsgKey.ER_SCHEME_FROM_NULL_STRING,
+        "No se puede establecer un esquema de una serie nula"},
+
+      { MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE,
+        "La v\u00eda de acceso contiene una secuencia de escape no v\u00e1lida"},
+
+      { MsgKey.ER_PATH_INVALID_CHAR,
+        "La v\u00eda de acceso contiene un car\u00e1cter no v\u00e1lido: {0}"},
+
+      { MsgKey.ER_FRAG_INVALID_CHAR,
+        "El fragmento contiene un car\u00e1cter no v\u00e1lido"},
+
+      { MsgKey.ER_FRAG_WHEN_PATH_NULL,
+        "No se puede establecer el fragmento si la v\u00eda de acceso es nula"},
+
+      { MsgKey.ER_FRAG_FOR_GENERIC_URI,
+        "S\u00f3lo se puede establecer el fragmento para un URI gen\u00e9rico"},
+
+      { MsgKey.ER_NO_SCHEME_IN_URI,
+        "No se ha encontrado un esquema en el URI: {0}"},
+
+      { MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS,
+        "No se puede inicializar el URI con par\u00e1metros vac\u00edos"},
+
+      { MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH,
+        "No se puede especificar el fragmento en la v\u00eda de acceso y en el fragmento"},
+
+      { MsgKey.ER_NO_QUERY_STRING_IN_PATH,
+        "No se puede especificar la serie de consulta en la v\u00eda de acceso y en la serie de consulta"},
+
+      { MsgKey.ER_NO_PORT_IF_NO_HOST,
+        "No se puede especificar el puerto si no se ha especificado el sistema principal"},
+
+      { MsgKey.ER_NO_USERINFO_IF_NO_HOST,
+        "No se puede especificar la informaci\u00f3n de usuario si no se ha especificado el sistema principal"},
+
+      { MsgKey.ER_SCHEME_REQUIRED,
+        "\u00a1Se necesita un esquema!"}
+
+    };
+    return contents;
+  }
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_fr.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_fr.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_fr.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,139 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: SerializerMessages_fr.java,v 1.1.2.1 2007/01/09 18:58:33 alexsmirnov Exp $
+ */
+
+package org.ajax4jsf.xml.serializer.utils;
+
+import java.util.ListResourceBundle;
+
+public class SerializerMessages_fr extends ListResourceBundle {
+  public Object[][] getContents() {
+    Object[][] contents =  new Object[][] {
+        // BAD_MSGKEY needs translation
+        // BAD_MSGFORMAT needs translation
+      { MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER,
+        "La classe de la m\u00e9thode de s\u00e9rialisation ''{0}'' n''impl\u00e9mente pas org.xml.sax.ContentHandler."},
+
+      { MsgKey.ER_RESOURCE_COULD_NOT_FIND,
+        "La ressource [ {0} ] est introuvable.\n {1}"},
+
+      { MsgKey.ER_RESOURCE_COULD_NOT_LOAD,
+        "La ressource [ {0} ] n''a pas pu charger : {1} \n {2} \n {3}"},
+
+      { MsgKey.ER_BUFFER_SIZE_LESSTHAN_ZERO,
+        "Taille du tampon <=0"},
+
+      { MsgKey.ER_INVALID_UTF16_SURROGATE,
+        "Substitut UTF-16 non valide d\u00e9tect\u00e9 : {0} ?"},
+
+      { MsgKey.ER_OIERROR,
+        "Erreur d''E-S"},
+
+      { MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION,
+        "Ajout impossible de l''attribut {0} apr\u00e8s des noeuds enfants ou avant la production d''un \u00e9l\u00e9ment.  L''attribut est ignor\u00e9."},
+
+      { MsgKey.ER_NAMESPACE_PREFIX,
+        "L''espace de noms du pr\u00e9fixe ''{0}'' n''a pas \u00e9t\u00e9 d\u00e9clar\u00e9."},
+
+        // ER_STRAY_ATTRIBUTE needs translation
+      { MsgKey.ER_STRAY_NAMESPACE,
+        "La d\u00e9claration d''espace de noms ''{0}''=''{1}'' est \u00e0 l''ext\u00e9rieur de l''\u00e9l\u00e9ment."},
+
+      { MsgKey.ER_COULD_NOT_LOAD_RESOURCE,
+        "Impossible de charger ''{0}'' (v\u00e9rifier CLASSPATH), les valeurs par d\u00e9faut sont donc employ\u00e9es "},
+
+        // ER_ILLEGAL_CHARACTER needs translation
+      { MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY,
+        "Impossible de charger le fichier de propri\u00e9t\u00e9s ''{0}'' pour la m\u00e9thode de sortie ''{1}'' (v\u00e9rifier CLASSPATH)"},
+
+      { MsgKey.ER_INVALID_PORT,
+        "Num\u00e9ro de port non valide"},
+
+      { MsgKey.ER_PORT_WHEN_HOST_NULL,
+        "Le port ne peut \u00eatre d\u00e9fini quand l'h\u00f4te est vide"},
+
+      { MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED,
+        "L'h\u00f4te n'est pas une adresse bien form\u00e9e"},
+
+      { MsgKey.ER_SCHEME_NOT_CONFORMANT,
+        "Le processus n'est pas conforme."},
+
+      { MsgKey.ER_SCHEME_FROM_NULL_STRING,
+        "Impossible de d\u00e9finir le processus \u00e0 partir de la cha\u00eene vide"},
+
+      { MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE,
+        "Le chemin d'acc\u00e8s contient une s\u00e9quence d'\u00e9chappement non valide"},
+
+      { MsgKey.ER_PATH_INVALID_CHAR,
+        "Le chemin contient un caract\u00e8re non valide : {0}"},
+
+      { MsgKey.ER_FRAG_INVALID_CHAR,
+        "Le fragment contient un caract\u00e8re non valide"},
+
+      { MsgKey.ER_FRAG_WHEN_PATH_NULL,
+        "Le fragment ne peut \u00eatre d\u00e9fini quand le chemin d'acc\u00e8s est vide"},
+
+      { MsgKey.ER_FRAG_FOR_GENERIC_URI,
+        "Le fragment ne peut \u00eatre d\u00e9fini que pour un URI g\u00e9n\u00e9rique"},
+
+      { MsgKey.ER_NO_SCHEME_IN_URI,
+        "Processus introuvable dans l''URI : {0}"},
+
+      { MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS,
+        "Impossible d'initialiser l'URI avec des param\u00e8tres vides"},
+
+      { MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH,
+        "Le fragment ne doit pas \u00eatre indiqu\u00e9 \u00e0 la fois dans le chemin et dans le fragment"},
+
+      { MsgKey.ER_NO_QUERY_STRING_IN_PATH,
+        "La cha\u00eene de requ\u00eate ne doit pas figurer dans un chemin et une cha\u00eene de requ\u00eate"},
+
+      { MsgKey.ER_NO_PORT_IF_NO_HOST,
+        "Le port peut ne pas \u00eatre sp\u00e9cifi\u00e9 si l'h\u00f4te n'est pas sp\u00e9cifi\u00e9"},
+
+      { MsgKey.ER_NO_USERINFO_IF_NO_HOST,
+        "Userinfo ne peut \u00eatre sp\u00e9cifi\u00e9 si l'h\u00f4te ne l'est pas"},
+
+      { MsgKey.ER_SCHEME_REQUIRED,
+        "Processus requis !"}
+
+    };
+    return contents;
+  }
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_hu.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_hu.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_hu.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,139 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: SerializerMessages_hu.java,v 1.1.2.1 2007/01/09 18:58:40 alexsmirnov Exp $
+ */
+
+package org.ajax4jsf.xml.serializer.utils;
+
+import java.util.ListResourceBundle;
+
+public class SerializerMessages_hu extends ListResourceBundle {
+  public Object[][] getContents() {
+    Object[][] contents =  new Object[][] {
+        // BAD_MSGKEY needs translation
+        // BAD_MSGFORMAT needs translation
+      { MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER,
+        "A(z) ''{0}'' serializer oszt\u00e1ly nem val\u00f3s\u00edtja meg az org.xml.sax.ContentHandler funkci\u00f3t."},
+
+      { MsgKey.ER_RESOURCE_COULD_NOT_FIND,
+        "A(z) [ {0} ] er\u0151forr\u00e1s nem tal\u00e1lhat\u00f3.\n {1}"},
+
+      { MsgKey.ER_RESOURCE_COULD_NOT_LOAD,
+        "Az er\u0151forr\u00e1st [ {0} ] nem lehet bet\u00f6lteni: {1} \n {2} \n {3}"},
+
+      { MsgKey.ER_BUFFER_SIZE_LESSTHAN_ZERO,
+        "Pufferm\u00e9ret <= 0"},
+
+      { MsgKey.ER_INVALID_UTF16_SURROGATE,
+        "\u00c9rv\u00e9nytelen UTF-16 helyettes\u00edt\u00e9s: {0} ?"},
+
+      { MsgKey.ER_OIERROR,
+        "IO hiba"},
+
+      { MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION,
+        "Nem lehet {0} attrib\u00fatumat felvenni a gyermek node-ok ut\u00e1n vagy miel\u0151tt egy elem l\u00e9trej\u00f6nne.  Az attrib\u00fatum figyelmen k\u00edv\u00fcl marad."},
+
+      { MsgKey.ER_NAMESPACE_PREFIX,
+        "A(z) ''{0}'' el\u0151tag n\u00e9vtere nem defini\u00e1lt."},
+
+        // ER_STRAY_ATTRIBUTE needs translation
+      { MsgKey.ER_STRAY_NAMESPACE,
+        "A(z) ''{0}''=''{1}'' n\u00e9vt\u00e9r-deklar\u00e1ci\u00f3 k\u00edv\u00fcl esik az elemen."},
+
+      { MsgKey.ER_COULD_NOT_LOAD_RESOURCE,
+        "Nem lehet bet\u00f6lteni ''{0}''-t (ellen\u0151rizze a CLASSPATH be\u00e1ll\u00edt\u00e1st), az alap\u00e9rtelmez\u00e9seket haszn\u00e1lom"},
+
+        // ER_ILLEGAL_CHARACTER needs translation
+      { MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY,
+        "Nem lehet bet\u00f6lteni a(z) ''{0}'' tulajdons\u00e1g-f\u00e1jlt a(z) ''{1}''  (ellen\u0151rizze a CLASSPATH be\u00e1ll\u00edt\u00e1st)"},
+
+      { MsgKey.ER_INVALID_PORT,
+        "\u00c9rv\u00e9nytelen portsz\u00e1m"},
+
+      { MsgKey.ER_PORT_WHEN_HOST_NULL,
+        "A port-t nem \u00e1ll\u00edthatja be, ha a host null"},
+
+      { MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED,
+        "A host nem j\u00f3l form\u00e1zott c\u00edm"},
+
+      { MsgKey.ER_SCHEME_NOT_CONFORMANT,
+        "A s\u00e9ma nem megfelel\u0151."},
+
+      { MsgKey.ER_SCHEME_FROM_NULL_STRING,
+        "Nem lehet be\u00e1ll\u00edtani a s\u00e9m\u00e1t null karakterl\u00e1ncb\u00f3l"},
+
+      { MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE,
+        "Az el\u00e9r\u00e9i \u00fat \u00e9rv\u00e9nytelen eszk\u00e9pszekvenci\u00e1t tartalmaz"},
+
+      { MsgKey.ER_PATH_INVALID_CHAR,
+        "Az el\u00e9r\u00e9si \u00fat \u00e9rv\u00e9nytelen karaktert tartalmaz: {0}"},
+
+      { MsgKey.ER_FRAG_INVALID_CHAR,
+        "A darab \u00e9rv\u00e9nytelen karaktert tartalmaz"},
+
+      { MsgKey.ER_FRAG_WHEN_PATH_NULL,
+        "A darabot csak nem \u00e1ll\u00edthatja be, h\u00ed az el\u00e9r\u00e9si \u00fat null"},
+
+      { MsgKey.ER_FRAG_FOR_GENERIC_URI,
+        "Darabot csak egy \u00e1ltal\u00e1nos URI-hoz \u00e1ll\u00edthat be"},
+
+      { MsgKey.ER_NO_SCHEME_IN_URI,
+        "Nem tal\u00e1lhat\u00f3 s\u00e9ma az URI-ban: {0}"},
+
+      { MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS,
+        "Nem inicializ\u00e1lhatja az URI-t \u00fcres param\u00e9terekkel"},
+
+      { MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH,
+        "Darabot nem adhat meg sem az el\u00e9r\u00e9si \u00fatban sem a darabban"},
+
+      { MsgKey.ER_NO_QUERY_STRING_IN_PATH,
+        "Lek\u00e9rdez\u00e9si karakterl\u00e1ncot nem adhat meg el\u00e9r\u00e9si \u00fatban \u00e9s lek\u00e9rdez\u00e9si karakterl\u00e1ncban"},
+
+      { MsgKey.ER_NO_PORT_IF_NO_HOST,
+        "Nem adhat meg port-ot, ha nem adott meg host-ot"},
+
+      { MsgKey.ER_NO_USERINFO_IF_NO_HOST,
+        "Nem adhat meg userinfo-t, ha nem adott meg host-ot"},
+
+      { MsgKey.ER_SCHEME_REQUIRED,
+        "S\u00e9m\u00e1ra sz\u00fcks\u00e9g van!"}
+
+    };
+    return contents;
+  }
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_it.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_it.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_it.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,139 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: SerializerMessages_it.java,v 1.1.2.1 2007/01/09 18:58:42 alexsmirnov Exp $
+ */
+
+package org.ajax4jsf.xml.serializer.utils;
+
+import java.util.ListResourceBundle;
+
+public class SerializerMessages_it extends ListResourceBundle {
+  public Object[][] getContents() {
+    Object[][] contents =  new Object[][] {
+        // BAD_MSGKEY needs translation
+        // BAD_MSGFORMAT needs translation
+      { MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER,
+        "La classe serializer ''{0}'' non implementa org.xml.sax.ContentHandler."},
+
+      { MsgKey.ER_RESOURCE_COULD_NOT_FIND,
+        "Risorsa [ {0} ] non trovata.\n {1}"},
+
+      { MsgKey.ER_RESOURCE_COULD_NOT_LOAD,
+        "Impossibile caricare la risorsa [ {0} ]: {1} \n {2} \n {3}"},
+
+      { MsgKey.ER_BUFFER_SIZE_LESSTHAN_ZERO,
+        "Dimensione buffer <=0"},
+
+      { MsgKey.ER_INVALID_UTF16_SURROGATE,
+        "Rilevato surrogato UTF-16 non valido: {0} ?"},
+
+      { MsgKey.ER_OIERROR,
+        "Errore IO"},
+
+      { MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION,
+        "Impossibile aggiungere l''attributo {0} dopo i nodi secondari o prima che sia prodotto un elemento. L''attributo verr\u00e0 ignorato. "},
+
+      { MsgKey.ER_NAMESPACE_PREFIX,
+        "Lo spazio nomi per il prefisso ''{0}'' non \u00e8 stato dichiarato. "},
+
+        // ER_STRAY_ATTRIBUTE needs translation
+      { MsgKey.ER_STRAY_NAMESPACE,
+        "Dichiarazione dello spazio nome ''{0}''=''{1}'' al di fuori dell''elemento. "},
+
+      { MsgKey.ER_COULD_NOT_LOAD_RESOURCE,
+        "Impossibile caricare ''{0}'' (verificare CLASSPATH); verranno utilizzati i valori predefiniti "},
+
+        // ER_ILLEGAL_CHARACTER needs translation
+      { MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY,
+        "Impossibile caricare il file delle propriet\u00e0 ''{0}'' per il metodo di emissione ''{1}'' (verificare CLASSPATH)"},
+
+      { MsgKey.ER_INVALID_PORT,
+        "Numero di porta non valido"},
+
+      { MsgKey.ER_PORT_WHEN_HOST_NULL,
+        "La porta non pu\u00f2 essere impostata se l'host \u00e8 nullo"},
+
+      { MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED,
+        "Host non \u00e8 un'indirizzo corretto"},
+
+      { MsgKey.ER_SCHEME_NOT_CONFORMANT,
+        "Lo schema non \u00e8 conforme."},
+
+      { MsgKey.ER_SCHEME_FROM_NULL_STRING,
+        "Impossibile impostare lo schema da una stringa nulla"},
+
+      { MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE,
+        "Il percorso contiene sequenza di escape non valida"},
+
+      { MsgKey.ER_PATH_INVALID_CHAR,
+        "Il percorso contiene un carattere non valido: {0}"},
+
+      { MsgKey.ER_FRAG_INVALID_CHAR,
+        "Il frammento contiene un carattere non valido"},
+
+      { MsgKey.ER_FRAG_WHEN_PATH_NULL,
+        "Il frammento non pu\u00f2 essere impostato se il percorso \u00e8 nullo"},
+
+      { MsgKey.ER_FRAG_FOR_GENERIC_URI,
+        "Il frammento pu\u00f2 essere impostato solo per un URI generico"},
+
+      { MsgKey.ER_NO_SCHEME_IN_URI,
+        "Nessuno schema trovato nell''URI: {0}"},
+
+      { MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS,
+        "Impossibile inizializzare l'URI con i parametri vuoti"},
+
+      { MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH,
+        "Il frammento non pu\u00f2 essere specificato sia nel percorso che nel frammento"},
+
+      { MsgKey.ER_NO_QUERY_STRING_IN_PATH,
+        "La stringa di interrogazione non pu\u00f2 essere specificata nella stringa di interrogazione e percorso."},
+
+      { MsgKey.ER_NO_PORT_IF_NO_HOST,
+        "La porta non pu\u00f2 essere specificata se l'host non \u00e8 specificato"},
+
+      { MsgKey.ER_NO_USERINFO_IF_NO_HOST,
+        "Userinfo non pu\u00f2 essere specificato se l'host non \u00e8 specificato"},
+
+      { MsgKey.ER_SCHEME_REQUIRED,
+        "Lo schema \u00e8 obbligatorio."}
+
+    };
+    return contents;
+  }
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_ja.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_ja.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_ja.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,139 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: SerializerMessages_ja.java,v 1.1.2.1 2007/01/09 18:58:38 alexsmirnov Exp $
+ */
+
+package org.ajax4jsf.xml.serializer.utils;
+
+import java.util.ListResourceBundle;
+
+public class SerializerMessages_ja extends ListResourceBundle {
+  public Object[][] getContents() {
+    Object[][] contents =  new Object[][] {
+        // BAD_MSGKEY needs translation
+        // BAD_MSGFORMAT needs translation
+      { MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER,
+        "\u30b7\u30ea\u30a2\u30e9\u30a4\u30b6\u30fc\u30fb\u30af\u30e9\u30b9 ''{0}'' \u306f org.xml.sax.ContentHandler \u3092\u30a4\u30f3\u30d7\u30ea\u30e1\u30f3\u30c8\u3057\u307e\u305b\u3093\u3002"},
+
+      { MsgKey.ER_RESOURCE_COULD_NOT_FIND,
+        "\u30ea\u30bd\u30fc\u30b9 [ {0} ] \u306f\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002\n {1}"},
+
+      { MsgKey.ER_RESOURCE_COULD_NOT_LOAD,
+        "\u30ea\u30bd\u30fc\u30b9 [ {0} ] \u3092\u30ed\u30fc\u30c9\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f: {1} \n {2} \n {3}"},
+
+      { MsgKey.ER_BUFFER_SIZE_LESSTHAN_ZERO,
+        "\u30d0\u30c3\u30d5\u30a1\u30fc\u30fb\u30b5\u30a4\u30ba <=0"},
+
+      { MsgKey.ER_INVALID_UTF16_SURROGATE,
+        "\u7121\u52b9\u306a UTF-16 \u30b5\u30ed\u30b2\u30fc\u30c8\u304c\u691c\u51fa\u3055\u308c\u307e\u3057\u305f: {0} ?"},
+
+      { MsgKey.ER_OIERROR,
+        "\u5165\u51fa\u529b\u30a8\u30e9\u30fc"},
+
+      { MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION,
+        "\u4e0b\u4f4d\u30ce\u30fc\u30c9\u306e\u5f8c\u307e\u305f\u306f\u30a8\u30ec\u30e1\u30f3\u30c8\u304c\u751f\u6210\u3055\u308c\u308b\u524d\u306b\u5c5e\u6027 {0} \u3092\u8ffd\u52a0\u3067\u304d\u307e\u305b\u3093\u3002\u5c5e\u6027\u306f\u7121\u8996\u3055\u308c\u307e\u3059\u3002"},
+
+      { MsgKey.ER_NAMESPACE_PREFIX,
+        "\u63a5\u982d\u90e8 ''{0}'' \u306e\u30cd\u30fc\u30e0\u30fb\u30b9\u30da\u30fc\u30b9\u304c\u5ba3\u8a00\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002"},
+
+        // ER_STRAY_ATTRIBUTE needs translation
+      { MsgKey.ER_STRAY_NAMESPACE,
+        "\u30cd\u30fc\u30e0\u30fb\u30b9\u30da\u30fc\u30b9\u5ba3\u8a00 ''{0}''=''{1}'' \u304c\u30a8\u30ec\u30e1\u30f3\u30c8\u306e\u5916\u5074\u3067\u3059\u3002"},
+
+      { MsgKey.ER_COULD_NOT_LOAD_RESOURCE,
+        "''{0}'' \u3092\u30ed\u30fc\u30c9\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f (CLASSPATH \u3092\u8abf\u3079\u3066\u304f\u3060\u3055\u3044)\u3002\u73fe\u5728\u306f\u5358\u306b\u30c7\u30d5\u30a9\u30eb\u30c8\u3092\u4f7f\u7528\u3057\u3066\u3044\u307e\u3059\u3002"},
+
+        // ER_ILLEGAL_CHARACTER needs translation
+      { MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY,
+        "\u51fa\u529b\u30e1\u30bd\u30c3\u30c9 ''{1}'' \u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u30fc\u30fb\u30d5\u30a1\u30a4\u30eb ''{0}'' \u3092\u30ed\u30fc\u30c9\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f (CLASSPATH \u3092\u78ba\u8a8d)"},
+
+      { MsgKey.ER_INVALID_PORT,
+        "\u7121\u52b9\u306a\u30dd\u30fc\u30c8\u756a\u53f7"},
+
+      { MsgKey.ER_PORT_WHEN_HOST_NULL,
+        "\u30db\u30b9\u30c8\u304c\u30cc\u30eb\u3067\u3042\u308b\u3068\u30dd\u30fc\u30c8\u3092\u8a2d\u5b9a\u3067\u304d\u307e\u305b\u3093"},
+
+      { MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED,
+        "\u30db\u30b9\u30c8\u306f\u3046\u307e\u304f\u69cb\u6210\u3055\u308c\u305f\u30a2\u30c9\u30ec\u30b9\u3067\u3042\u308a\u307e\u305b\u3093"},
+
+      { MsgKey.ER_SCHEME_NOT_CONFORMANT,
+        "\u30b9\u30ad\u30fc\u30e0\u306f\u4e00\u81f4\u3057\u3066\u3044\u307e\u305b\u3093\u3002"},
+
+      { MsgKey.ER_SCHEME_FROM_NULL_STRING,
+        "\u30cc\u30eb\u30fb\u30b9\u30c8\u30ea\u30f3\u30b0\u304b\u3089\u306f\u30b9\u30ad\u30fc\u30e0\u3092\u8a2d\u5b9a\u3067\u304d\u307e\u305b\u3093"},
+
+      { MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE,
+        "\u30d1\u30b9\u306b\u7121\u52b9\u306a\u30a8\u30b9\u30b1\u30fc\u30d7\u30fb\u30b7\u30fc\u30b1\u30f3\u30b9\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059"},
+
+      { MsgKey.ER_PATH_INVALID_CHAR,
+        "\u30d1\u30b9\u306b\u7121\u52b9\u6587\u5b57: {0} \u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059"},
+
+      { MsgKey.ER_FRAG_INVALID_CHAR,
+        "\u30d5\u30e9\u30b0\u30e1\u30f3\u30c8\u306b\u7121\u52b9\u6587\u5b57\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059"},
+
+      { MsgKey.ER_FRAG_WHEN_PATH_NULL,
+        "\u30d1\u30b9\u304c\u30cc\u30eb\u3067\u3042\u308b\u3068\u30d5\u30e9\u30b0\u30e1\u30f3\u30c8\u3092\u8a2d\u5b9a\u3067\u304d\u307e\u305b\u3093"},
+
+      { MsgKey.ER_FRAG_FOR_GENERIC_URI,
+        "\u7dcf\u79f0 URI \u306e\u30d5\u30e9\u30b0\u30e1\u30f3\u30c8\u3057\u304b\u8a2d\u5b9a\u3067\u304d\u307e\u305b\u3093"},
+
+      { MsgKey.ER_NO_SCHEME_IN_URI,
+        "\u30b9\u30ad\u30fc\u30e0\u306f URI {0} \u3067\u898b\u3064\u304b\u308a\u307e\u305b\u3093"},
+
+      { MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS,
+        "URI \u306f\u7a7a\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u3092\u4f7f\u7528\u3057\u3066\u521d\u671f\u5316\u3067\u304d\u307e\u305b\u3093"},
+
+      { MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH,
+        "\u30d5\u30e9\u30b0\u30e1\u30f3\u30c8\u306f\u30d1\u30b9\u3068\u30d5\u30e9\u30b0\u30e1\u30f3\u30c8\u306e\u4e21\u65b9\u306b\u6307\u5b9a\u3067\u304d\u307e\u305b\u3093"},
+
+      { MsgKey.ER_NO_QUERY_STRING_IN_PATH,
+        "\u7167\u4f1a\u30b9\u30c8\u30ea\u30f3\u30b0\u306f\u30d1\u30b9\u304a\u3088\u3073\u7167\u4f1a\u30b9\u30c8\u30ea\u30f3\u30b0\u5185\u306b\u6307\u5b9a\u3067\u304d\u307e\u305b\u3093"},
+
+      { MsgKey.ER_NO_PORT_IF_NO_HOST,
+        "\u30db\u30b9\u30c8\u304c\u6307\u5b9a\u3055\u308c\u3066\u3044\u306a\u3044\u5834\u5408\u306f\u30dd\u30fc\u30c8\u3092\u6307\u5b9a\u3057\u3066\u306f\u3044\u3051\u307e\u305b\u3093"},
+
+      { MsgKey.ER_NO_USERINFO_IF_NO_HOST,
+        "\u30db\u30b9\u30c8\u304c\u6307\u5b9a\u3055\u308c\u3066\u3044\u306a\u3044\u5834\u5408\u306f Userinfo \u3092\u6307\u5b9a\u3057\u3066\u306f\u3044\u3051\u307e\u305b\u3093"},
+
+      { MsgKey.ER_SCHEME_REQUIRED,
+        "\u30b9\u30ad\u30fc\u30e0\u304c\u5fc5\u8981\u3067\u3059!"}
+
+    };
+    return contents;
+  }
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_ko.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_ko.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_ko.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,139 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: SerializerMessages_ko.java,v 1.1.2.1 2007/01/09 18:58:36 alexsmirnov Exp $
+ */
+
+package org.ajax4jsf.xml.serializer.utils;
+
+import java.util.ListResourceBundle;
+
+public class SerializerMessages_ko extends ListResourceBundle {
+  public Object[][] getContents() {
+    Object[][] contents =  new Object[][] {
+        // BAD_MSGKEY needs translation
+        // BAD_MSGFORMAT needs translation
+      { MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER,
+        "''{0}'' \uc9c1\ub82c\ud654 \ud504\ub85c\uadf8\ub7a8 \ud074\ub798\uc2a4\uac00 org.xml.sax.ContentHandler\ub97c \uad6c\ud604\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4."},
+
+      { MsgKey.ER_RESOURCE_COULD_NOT_FIND,
+        "[ {0} ] \uc790\uc6d0\uc744 \ucc3e\uc744 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.\n {1}"},
+
+      { MsgKey.ER_RESOURCE_COULD_NOT_LOAD,
+        "[ {0} ] \uc790\uc6d0\uc774 {1} \n {2} \n {3}\uc744(\ub97c) \ub85c\ub4dc\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. "},
+
+      { MsgKey.ER_BUFFER_SIZE_LESSTHAN_ZERO,
+        "\ubc84\ud37c \ud06c\uae30 <=0"},
+
+      { MsgKey.ER_INVALID_UTF16_SURROGATE,
+        "\uc798\ubabb\ub41c UTF-16 \ub300\ub9ac\uc790(surrogate)\uac00 \ubc1c\uacac\ub418\uc5c8\uc2b5\ub2c8\ub2e4: {0} ?"},
+
+      { MsgKey.ER_OIERROR,
+        "IO \uc624\ub958"},
+
+      { MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION,
+        "\ud558\uc704 \ub178\ub4dc\uac00 \uc0dd\uc131\ub41c \uc774\ud6c4 \ub610\ub294 \uc694\uc18c\uac00 \uc791\uc131\ub418\uae30 \uc774\uc804\uc5d0 {0} \uc18d\uc131\uc744 \ucd94\uac00\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. \uc18d\uc131\uc774 \ubb34\uc2dc\ub429\ub2c8\ub2e4."},
+
+      { MsgKey.ER_NAMESPACE_PREFIX,
+        "''{0}'' \uc811\ub450\ubd80\uc5d0 \ub300\ud55c \uc774\ub984 \uacf5\uac04\uc774 \uc120\uc5b8\ub418\uc9c0 \uc54a\uc558\uc2b5\ub2c8\ub2e4."},
+
+        // ER_STRAY_ATTRIBUTE needs translation
+      { MsgKey.ER_STRAY_NAMESPACE,
+        "''{0}''=''{1}'' \uc774\ub984 \uacf5\uac04 \uc120\uc5b8\uc774 \uc694\uc18c\uc758 \uc678\ubd80\uc5d0 \uc788\uc2b5\ub2c8\ub2e4."},
+
+      { MsgKey.ER_COULD_NOT_LOAD_RESOURCE,
+        "''{0}''(CLASSPATH \ud655\uc778)\uc744(\ub97c) \ub85c\ub4dc\ud560 \uc218 \uc5c6\uc73c\ubbc0\ub85c, \ud604\uc7ac \uae30\ubcf8\uac12\ub9cc\uc744 \uc0ac\uc6a9 \uc911\uc785\ub2c8\ub2e4."},
+
+        // ER_ILLEGAL_CHARACTER needs translation
+      { MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY,
+        "''{1}''\ucd9c\ub825 \uba54\uc18c\ub4dc(CLASSPATH \ud655\uc778)\uc5d0 \ub300\ud55c ''{0}'' \ud2b9\uc131 \ud30c\uc77c\uc744 \ub85c\ub4dc\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4."},
+
+      { MsgKey.ER_INVALID_PORT,
+        "\uc798\ubabb\ub41c \ud3ec\ud2b8 \ubc88\ud638"},
+
+      { MsgKey.ER_PORT_WHEN_HOST_NULL,
+        "\ud638\uc2a4\ud2b8\uac00 \ub110(null)\uc774\uba74 \ud3ec\ud2b8\ub97c \uc124\uc815\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4."},
+
+      { MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED,
+        "\ud638\uc2a4\ud2b8\uac00 \uc644\uc804\ud55c \uc8fc\uc18c\uac00 \uc544\ub2d9\ub2c8\ub2e4."},
+
+      { MsgKey.ER_SCHEME_NOT_CONFORMANT,
+        "\uc124\uacc4\uac00 \uc77c\uce58\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4."},
+
+      { MsgKey.ER_SCHEME_FROM_NULL_STRING,
+        "\ub110(null) \ubb38\uc790\uc5f4\uc5d0\uc11c \uc124\uacc4\ub97c \uc124\uc815\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4."},
+
+      { MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE,
+        "\uacbd\ub85c\uc5d0 \uc798\ubabb\ub41c \uc774\uc2a4\ucf00\uc774\ud504 \uc21c\uc11c\uac00 \uc788\uc2b5\ub2c8\ub2e4."},
+
+      { MsgKey.ER_PATH_INVALID_CHAR,
+        "\uacbd\ub85c\uc5d0 \uc798\ubabb\ub41c \ubb38\uc790\uac00 \uc788\uc2b5\ub2c8\ub2e4: {0}"},
+
+      { MsgKey.ER_FRAG_INVALID_CHAR,
+        "\ub2e8\ud3b8\uc5d0 \uc798\ubabb\ub41c \ubb38\uc790\uac00 \uc788\uc2b5\ub2c8\ub2e4."},
+
+      { MsgKey.ER_FRAG_WHEN_PATH_NULL,
+        "\uacbd\ub85c\uac00 \ub110(null)\uc774\uba74 \ub2e8\ud3b8\uc744 \uc124\uc815\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4."},
+
+      { MsgKey.ER_FRAG_FOR_GENERIC_URI,
+        "\uc77c\ubc18 URI\uc5d0 \ub300\ud574\uc11c\ub9cc \ub2e8\ud3b8\uc744 \uc124\uc815\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4."},
+
+      { MsgKey.ER_NO_SCHEME_IN_URI,
+        "URI\uc5d0 \uc124\uacc4\uac00 \uc5c6\uc2b5\ub2c8\ub2e4: {0}"},
+
+      { MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS,
+        "\ube48 \ub9e4\uac1c\ubcc0\uc218\ub85c URI\ub97c \ucd08\uae30\ud654\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4."},
+
+      { MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH,
+        "\uacbd\ub85c \ubc0f \ub2e8\ud3b8 \ub458 \ub2e4\uc5d0 \ub2e8\ud3b8\uc744 \uc9c0\uc815\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4."},
+
+      { MsgKey.ER_NO_QUERY_STRING_IN_PATH,
+        "\uacbd\ub85c \ubc0f \uc870\ud68c \ubb38\uc790\uc5f4\uc5d0 \uc870\ud68c \ubb38\uc790\uc5f4\uc744 \uc9c0\uc815\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4."},
+
+      { MsgKey.ER_NO_PORT_IF_NO_HOST,
+        "\ud638\uc2a4\ud2b8\ub97c \uc9c0\uc815\ud558\uc9c0 \uc54a\uc740 \uacbd\uc6b0\uc5d0\ub294 \ud3ec\ud2b8\ub97c \uc9c0\uc815\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4."},
+
+      { MsgKey.ER_NO_USERINFO_IF_NO_HOST,
+        "\ud638\uc2a4\ud2b8\ub97c \uc9c0\uc815\ud558\uc9c0 \uc54a\uc740 \uacbd\uc6b0\uc5d0\ub294 Userinfo\ub97c \uc9c0\uc815\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4."},
+
+      { MsgKey.ER_SCHEME_REQUIRED,
+        "\uc124\uacc4\uac00 \ud544\uc694\ud569\ub2c8\ub2e4!"}
+
+    };
+    return contents;
+  }
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_pl.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_pl.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_pl.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,139 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: SerializerMessages_pl.java,v 1.1.2.1 2007/01/09 18:58:35 alexsmirnov Exp $
+ */
+
+package org.ajax4jsf.xml.serializer.utils;
+
+import java.util.ListResourceBundle;
+
+public class SerializerMessages_pl extends ListResourceBundle {
+  public Object[][] getContents() {
+    Object[][] contents =  new Object[][] {
+        // BAD_MSGKEY needs translation
+        // BAD_MSGFORMAT needs translation
+      { MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER,
+        "Klasa szereguj\u0105ca ''{0}'' nie implementuje procedury obs\u0142ugi org.xml.sax.ContentHandler."},
+
+      { MsgKey.ER_RESOURCE_COULD_NOT_FIND,
+        "Nie mo\u017cna znale\u017a\u0107 zasobu [ {0} ].\n {1}"},
+
+      { MsgKey.ER_RESOURCE_COULD_NOT_LOAD,
+        "Zas\u00f3b [ {0} ] nie m\u00f3g\u0142 za\u0142adowa\u0107: {1} \n {2} \n {3}"},
+
+      { MsgKey.ER_BUFFER_SIZE_LESSTHAN_ZERO,
+        "Wielko\u015b\u0107 bufora <=0"},
+
+      { MsgKey.ER_INVALID_UTF16_SURROGATE,
+        "Wykryto niepoprawny surogat UTF-16: {0} ?"},
+
+      { MsgKey.ER_OIERROR,
+        "B\u0142\u0105d we/wy"},
+
+      { MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION,
+        "Nie mo\u017cna doda\u0107 atrybutu {0} po w\u0119z\u0142ach potomnych ani przed wyprodukowaniem elementu.  Atrybut zostanie zignorowany."},
+
+      { MsgKey.ER_NAMESPACE_PREFIX,
+        "Nie zadeklarowano przestrzeni nazw dla przedrostka ''{0}''."},
+
+        // ER_STRAY_ATTRIBUTE needs translation
+      { MsgKey.ER_STRAY_NAMESPACE,
+        "Deklaracja przestrzeni nazw ''{0}''=''{1}'' poza elementem."},
+
+      { MsgKey.ER_COULD_NOT_LOAD_RESOURCE,
+        "Nie mo\u017cna za\u0142adowa\u0107 ''{0}'' (sprawd\u017a CLASSPATH), u\u017cywane s\u0105 teraz warto\u015bci domy\u015blne"},
+
+        // ER_ILLEGAL_CHARACTER needs translation
+      { MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY,
+        "Nie mo\u017cna za\u0142adowa\u0107 pliku w\u0142a\u015bciwo\u015bci ''{0}'' dla metody wyj\u015bciowej ''{1}'' (sprawd\u017a CLASSPATH)"},
+
+      { MsgKey.ER_INVALID_PORT,
+        "Niepoprawny numer portu"},
+
+      { MsgKey.ER_PORT_WHEN_HOST_NULL,
+        "Nie mo\u017cna ustawi\u0107 portu, kiedy host jest pusty"},
+
+      { MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED,
+        "Host nie jest poprawnie skonstruowanym adresem"},
+
+      { MsgKey.ER_SCHEME_NOT_CONFORMANT,
+        "Schemat nie jest zgodny."},
+
+      { MsgKey.ER_SCHEME_FROM_NULL_STRING,
+        "Nie mo\u017cna ustawi\u0107 schematu z pustego ci\u0105gu znak\u00f3w"},
+
+      { MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE,
+        "\u015acie\u017cka zawiera niepoprawn\u0105 sekwencj\u0119 o zmienionym znaczeniu"},
+
+      { MsgKey.ER_PATH_INVALID_CHAR,
+        "\u015acie\u017cka zawiera niepoprawny znak {0}"},
+
+      { MsgKey.ER_FRAG_INVALID_CHAR,
+        "Fragment zawiera niepoprawny znak"},
+
+      { MsgKey.ER_FRAG_WHEN_PATH_NULL,
+        "Nie mo\u017cna ustawi\u0107 fragmentu, kiedy \u015bcie\u017cka jest pusta"},
+
+      { MsgKey.ER_FRAG_FOR_GENERIC_URI,
+        "Fragment mo\u017cna ustawi\u0107 tylko dla og\u00f3lnego URI"},
+
+      { MsgKey.ER_NO_SCHEME_IN_URI,
+        "Nie znaleziono schematu w URI {0}"},
+
+      { MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS,
+        "Nie mo\u017cna zainicjowa\u0107 URI z pustymi parametrami"},
+
+      { MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH,
+        "Nie mo\u017cna poda\u0107 fragmentu jednocze\u015bnie w \u015bcie\u017cce i fragmencie"},
+
+      { MsgKey.ER_NO_QUERY_STRING_IN_PATH,
+        "Tekstu zapytania nie mo\u017cna poda\u0107 w tek\u015bcie \u015bcie\u017cki i zapytania"},
+
+      { MsgKey.ER_NO_PORT_IF_NO_HOST,
+        "Nie mo\u017cna poda\u0107 portu, je\u015bli nie podano hosta"},
+
+      { MsgKey.ER_NO_USERINFO_IF_NO_HOST,
+        "Nie mo\u017cna poda\u0107 informacji o u\u017cytkowniku, je\u015bli nie podano hosta"},
+
+      { MsgKey.ER_SCHEME_REQUIRED,
+        "Schemat jest wymagany!"}
+
+    };
+    return contents;
+  }
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_pt_BR.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_pt_BR.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_pt_BR.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,139 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: SerializerMessages_pt_BR.java,v 1.1.2.1 2007/01/09 18:58:42 alexsmirnov Exp $
+ */
+
+package org.ajax4jsf.xml.serializer.utils;
+
+import java.util.ListResourceBundle;
+
+public class SerializerMessages_pt_BR extends ListResourceBundle {
+  public Object[][] getContents() {
+    Object[][] contents =  new Object[][] {
+        // BAD_MSGKEY needs translation
+        // BAD_MSGFORMAT needs translation
+      { MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER,
+        "A classe de serializador ''{0}'' n\u00e3o implementa org.xml.sax.ContentHandler."},
+
+      { MsgKey.ER_RESOURCE_COULD_NOT_FIND,
+        "O recurso [ {0} ] n\u00e3o p\u00f4de ser encontrado.\n {1}"},
+
+      { MsgKey.ER_RESOURCE_COULD_NOT_LOAD,
+        "O recurso [ {0} ] n\u00e3o p\u00f4de carregar: {1} \n {2} \n {3}"},
+
+      { MsgKey.ER_BUFFER_SIZE_LESSTHAN_ZERO,
+        "Tamanho do buffer <=0"},
+
+      { MsgKey.ER_INVALID_UTF16_SURROGATE,
+        "Detectado substituto UTF-16 inv\u00e1lido: {0} ?"},
+
+      { MsgKey.ER_OIERROR,
+        "Erro de E/S"},
+
+      { MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION,
+        "Imposs\u00edvel incluir atributo {0} depois de n\u00f3s filhos ou antes da gera\u00e7\u00e3o de um elemento. O atributo ser\u00e1 ignorado."},
+
+      { MsgKey.ER_NAMESPACE_PREFIX,
+        "Namespace para prefixo ''{0}'' n\u00e3o foi declarado. "},
+
+        // ER_STRAY_ATTRIBUTE needs translation
+      { MsgKey.ER_STRAY_NAMESPACE,
+        "Declara\u00e7\u00e3o de namespace ''{0}''=''{1}'' fora do elemento. "},
+
+      { MsgKey.ER_COULD_NOT_LOAD_RESOURCE,
+        "N\u00e3o foi poss\u00edvel carregar ''{0}'' (verifique CLASSPATH), utilizando agora somente os padr\u00f5es"},
+
+        // ER_ILLEGAL_CHARACTER needs translation
+      { MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY,
+        "N\u00e3o foi poss\u00edvel carregar o arquivo de propriedade ''{0}'' para o m\u00e9todo de sa\u00edda ''{1}'' (verifique CLASSPATH)"},
+
+      { MsgKey.ER_INVALID_PORT,
+        "N\u00famero de porta inv\u00e1lido"},
+
+      { MsgKey.ER_PORT_WHEN_HOST_NULL,
+        "A porta n\u00e3o pode ser definida quando o host \u00e9 nulo"},
+
+      { MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED,
+        "O host n\u00e3o \u00e9 um endere\u00e7o formado corretamente"},
+
+      { MsgKey.ER_SCHEME_NOT_CONFORMANT,
+        "O esquema n\u00e3o est\u00e1 em conformidade."},
+
+      { MsgKey.ER_SCHEME_FROM_NULL_STRING,
+        "Imposs\u00edvel definir esquema a partir da cadeia nula"},
+
+      { MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE,
+        "O caminho cont\u00e9m seq\u00fc\u00eancia de escape inv\u00e1lida"},
+
+      { MsgKey.ER_PATH_INVALID_CHAR,
+        "O caminho cont\u00e9m caractere inv\u00e1lido: {0}"},
+
+      { MsgKey.ER_FRAG_INVALID_CHAR,
+        "O fragmento cont\u00e9m caractere inv\u00e1lido"},
+
+      { MsgKey.ER_FRAG_WHEN_PATH_NULL,
+        "O fragmento n\u00e3o pode ser definido quando o caminho \u00e9 nulo"},
+
+      { MsgKey.ER_FRAG_FOR_GENERIC_URI,
+        "O fragmento s\u00f3 pode ser definido para um URI gen\u00e9rico"},
+
+      { MsgKey.ER_NO_SCHEME_IN_URI,
+        "Nenhum esquema encontrado no URI: {0}"},
+
+      { MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS,
+        "Imposs\u00edvel inicializar URI com par\u00e2metros vazios"},
+
+      { MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH,
+        "O fragmento n\u00e3o pode ser especificado no caminho e fragmento"},
+
+      { MsgKey.ER_NO_QUERY_STRING_IN_PATH,
+        "A cadeia de consulta n\u00e3o pode ser especificada na cadeia de consulta e caminho"},
+
+      { MsgKey.ER_NO_PORT_IF_NO_HOST,
+        "Port n\u00e3o pode ser especificado se host n\u00e3o for especificado"},
+
+      { MsgKey.ER_NO_USERINFO_IF_NO_HOST,
+        "Userinfo n\u00e3o pode ser especificado se host n\u00e3o for especificado"},
+
+      { MsgKey.ER_SCHEME_REQUIRED,
+        "O esquema \u00e9 obrigat\u00f3rio!"}
+
+    };
+    return contents;
+  }
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_ru.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_ru.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_ru.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,139 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: SerializerMessages_ru.java,v 1.1.2.1 2007/01/09 18:58:41 alexsmirnov Exp $
+ */
+
+package org.ajax4jsf.xml.serializer.utils;
+
+import java.util.ListResourceBundle;
+
+public class SerializerMessages_ru extends ListResourceBundle {
+  public Object[][] getContents() {
+    Object[][] contents =  new Object[][] {
+        // BAD_MSGKEY needs translation
+        // BAD_MSGFORMAT needs translation
+      { MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER,
+        "\u041a\u043b\u0430\u0441\u0441 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 ''{0}'' \u043d\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 org.xml.sax.ContentHandler."},
+
+      { MsgKey.ER_RESOURCE_COULD_NOT_FIND,
+        "\u0420\u0435\u0441\u0443\u0440\u0441 [ {0} ] \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d.\n{1}"},
+
+      { MsgKey.ER_RESOURCE_COULD_NOT_LOAD,
+        "\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0440\u0435\u0441\u0443\u0440\u0441 [ {0} ]: {1} \n {2} \n {3}"},
+
+      { MsgKey.ER_BUFFER_SIZE_LESSTHAN_ZERO,
+        "\u0420\u0430\u0437\u043c\u0435\u0440 \u0431\u0443\u0444\u0435\u0440\u0430 <=0"},
+
+      { MsgKey.ER_INVALID_UTF16_SURROGATE,
+        "\u041e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u043e \u043d\u0435\u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 UTF-16: {0} ?"},
+
+      { MsgKey.ER_OIERROR,
+        "\u041e\u0448\u0438\u0431\u043a\u0430 \u0432\u0432\u043e\u0434\u0430-\u0432\u044b\u0432\u043e\u0434\u0430"},
+
+      { MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION,
+        "\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0430\u0442\u0440\u0438\u0431\u0443\u0442 {0} \u043f\u043e\u0441\u043b\u0435 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0445 \u0443\u0437\u043b\u043e\u0432 \u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u0434 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430. \u0410\u0442\u0440\u0438\u0431\u0443\u0442 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u043d. "},
+
+      { MsgKey.ER_NAMESPACE_PREFIX,
+        "\u041f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0438\u043c\u0435\u043d \u0434\u043b\u044f \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u0430 ''{0}'' \u043d\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043e."},
+
+        // ER_STRAY_ATTRIBUTE needs translation
+      { MsgKey.ER_STRAY_NAMESPACE,
+        "\u041e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0438\u043c\u0435\u043d ''{0}''=''{1}'' \u0432\u043d\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430."},
+
+      { MsgKey.ER_COULD_NOT_LOAD_RESOURCE,
+        "\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c ''{0}'' (\u043f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 CLASSPATH), \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e"},
+
+        // ER_ILLEGAL_CHARACTER needs translation
+      { MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY,
+        "\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0444\u0430\u0439\u043b \u0441\u0432\u043e\u0439\u0441\u0442\u0432 ''{0}'' \u0434\u043b\u044f \u043c\u0435\u0442\u043e\u0434\u0430 \u0432\u044b\u0432\u043e\u0434\u0430 ''{1}'' (\u043f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 CLASSPATH)"},
+
+      { MsgKey.ER_INVALID_PORT,
+        "\u041d\u0435\u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0439 \u043d\u043e\u043c\u0435\u0440 \u043f\u043e\u0440\u0442\u0430"},
+
+      { MsgKey.ER_PORT_WHEN_HOST_NULL,
+        "\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u043f\u043e\u0440\u0442 \u0434\u043b\u044f \u043f\u0443\u0441\u0442\u043e\u0433\u043e \u0430\u0434\u0440\u0435\u0441\u0430 \u0445\u043e\u0441\u0442\u0430"},
+
+      { MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED,
+        "\u041d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d \u0430\u0434\u0440\u0435\u0441 \u0445\u043e\u0441\u0442\u0430"},
+
+      { MsgKey.ER_SCHEME_NOT_CONFORMANT,
+        "\u0421\u0445\u0435\u043c\u0430 \u043d\u0435 \u043a\u043e\u043d\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0432\u043d\u0430."},
+
+      { MsgKey.ER_SCHEME_FROM_NULL_STRING,
+        "\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u0441\u0445\u0435\u043c\u0443 \u0434\u043b\u044f \u043f\u0443\u0441\u0442\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438"},
+
+      { MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE,
+        "\u0412 \u0438\u043c\u0435\u043d\u0438 \u043f\u0443\u0442\u0438 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442\u0441\u044f \u043d\u0435\u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u0430\u044f Esc-\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c"},
+
+      { MsgKey.ER_PATH_INVALID_CHAR,
+        "\u0412 \u0438\u043c\u0435\u043d\u0438 \u043f\u0443\u0442\u0438 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d \u043d\u0435\u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0439 \u0441\u0438\u043c\u0432\u043e\u043b: {0}"},
+
+      { MsgKey.ER_FRAG_INVALID_CHAR,
+        "\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u0435\u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0439 \u0441\u0438\u043c\u0432\u043e\u043b"},
+
+      { MsgKey.ER_FRAG_WHEN_PATH_NULL,
+        "\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u043f\u0443\u0441\u0442\u043e\u0433\u043e \u043f\u0443\u0442\u0438"},
+
+      { MsgKey.ER_FRAG_FOR_GENERIC_URI,
+        "\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u0430 URI"},
+
+      { MsgKey.ER_NO_SCHEME_IN_URI,
+        "\u0412 URI \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u0430 \u0441\u0445\u0435\u043c\u0430: {0}"},
+
+      { MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS,
+        "\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c URI \u0441 \u043f\u0443\u0441\u0442\u044b\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438"},
+
+      { MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH,
+        "\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0434\u043b\u044f \u043f\u0443\u0442\u0438 \u0438 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430"},
+
+      { MsgKey.ER_NO_QUERY_STRING_IN_PATH,
+        "\u041d\u0435\u043b\u044c\u0437\u044f \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432 \u0441\u0442\u0440\u043e\u043a\u0435 \u043f\u0443\u0442\u0438 \u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430"},
+
+      { MsgKey.ER_NO_PORT_IF_NO_HOST,
+        "\u041d\u0435\u043b\u044c\u0437\u044f \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043f\u043e\u0440\u0442, \u0435\u0441\u043b\u0438 \u043d\u0435 \u0437\u0430\u0434\u0430\u043d \u0445\u043e\u0441\u0442"},
+
+      { MsgKey.ER_NO_USERINFO_IF_NO_HOST,
+        "\u041d\u0435\u043b\u044c\u0437\u044f \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435, \u0435\u0441\u043b\u0438 \u043d\u0435 \u0437\u0430\u0434\u0430\u043d \u0445\u043e\u0441\u0442"},
+
+      { MsgKey.ER_SCHEME_REQUIRED,
+        "\u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0430 \u0441\u0445\u0435\u043c\u0430!"}
+
+    };
+    return contents;
+  }
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_sv.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_sv.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_sv.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,117 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: SerializerMessages_sv.java,v 1.1.2.1 2007/01/09 18:58:33 alexsmirnov Exp $
+ */
+
+package org.ajax4jsf.xml.serializer.utils;
+
+import java.util.ListResourceBundle;
+
+public class SerializerMessages_sv extends ListResourceBundle {
+  public Object[][] getContents() {
+    Object[][] contents =  new Object[][] {
+        // BAD_MSGKEY needs translation
+        // BAD_MSGFORMAT needs translation
+        // ER_SERIALIZER_NOT_CONTENTHANDLER needs translation
+        // ER_RESOURCE_COULD_NOT_FIND needs translation
+        // ER_RESOURCE_COULD_NOT_LOAD needs translation
+        // ER_BUFFER_SIZE_LESSTHAN_ZERO needs translation
+        // ER_INVALID_UTF16_SURROGATE needs translation
+        // ER_OIERROR needs translation
+        // ER_ILLEGAL_ATTRIBUTE_POSITION needs translation
+        // ER_NAMESPACE_PREFIX needs translation
+        // ER_STRAY_ATTRIBUTE needs translation
+        // ER_STRAY_NAMESPACE needs translation
+        // ER_COULD_NOT_LOAD_RESOURCE needs translation
+        // ER_ILLEGAL_CHARACTER needs translation
+        // ER_COULD_NOT_LOAD_METHOD_PROPERTY needs translation
+      { MsgKey.ER_INVALID_PORT,
+        "Ogiltigt portnummer"},
+
+      { MsgKey.ER_PORT_WHEN_HOST_NULL,
+        "Port kan inte s\u00e4ttas n\u00e4r v\u00e4rd \u00e4r null"},
+
+      { MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED,
+        "V\u00e4rd \u00e4r inte en v\u00e4lformulerad adress"},
+
+      { MsgKey.ER_SCHEME_NOT_CONFORMANT,
+        "Schemat \u00e4r inte likformigt."},
+
+      { MsgKey.ER_SCHEME_FROM_NULL_STRING,
+        "Kan inte s\u00e4tta schema fr\u00e5n null-str\u00e4ng"},
+
+      { MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE,
+        "V\u00e4g inneh\u00e5ller ogiltig flyktsekvens"},
+
+      { MsgKey.ER_PATH_INVALID_CHAR,
+        "V\u00e4g inneh\u00e5ller ogiltigt tecken: {0}"},
+
+      { MsgKey.ER_FRAG_INVALID_CHAR,
+        "Fragment inneh\u00e5ller ogiltigt tecken"},
+
+      { MsgKey.ER_FRAG_WHEN_PATH_NULL,
+        "Fragment kan inte s\u00e4ttas n\u00e4r v\u00e4g \u00e4r null"},
+
+      { MsgKey.ER_FRAG_FOR_GENERIC_URI,
+        "Fragment kan bara s\u00e4ttas f\u00f6r en allm\u00e4n URI"},
+
+      { MsgKey.ER_NO_SCHEME_IN_URI,
+        "Schema saknas i URI: {0}"},
+
+      { MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS,
+        "Kan inte initialisera URI med tomma parametrar"},
+
+      { MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH,
+        "Fragment kan inte anges i b\u00e5de v\u00e4gen och fragmentet"},
+
+      { MsgKey.ER_NO_QUERY_STRING_IN_PATH,
+        "F\u00f6rfr\u00e5gan-str\u00e4ng kan inte anges i v\u00e4g och f\u00f6rfr\u00e5gan-str\u00e4ng"},
+
+      { MsgKey.ER_NO_PORT_IF_NO_HOST,
+        "Port f\u00e5r inte anges om v\u00e4rden inte \u00e4r angiven"},
+
+      { MsgKey.ER_NO_USERINFO_IF_NO_HOST,
+        "Userinfo f\u00e5r inte anges om v\u00e4rden inte \u00e4r angiven"},
+
+      { MsgKey.ER_SCHEME_REQUIRED,
+        "Schema kr\u00e4vs!"}
+
+    };
+    return contents;
+  }
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_tr.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_tr.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_tr.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,139 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: SerializerMessages_tr.java,v 1.1.2.1 2007/01/09 18:58:34 alexsmirnov Exp $
+ */
+
+package org.ajax4jsf.xml.serializer.utils;
+
+import java.util.ListResourceBundle;
+
+public class SerializerMessages_tr extends ListResourceBundle {
+  public Object[][] getContents() {
+    Object[][] contents =  new Object[][] {
+        // BAD_MSGKEY needs translation
+        // BAD_MSGFORMAT needs translation
+      { MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER,
+        "Diziselle\u015ftirici s\u0131n\u0131f\u0131 ''{0}'' org.xml.sax.ContentHandler i\u015flevini uygulam\u0131yor."},
+
+      { MsgKey.ER_RESOURCE_COULD_NOT_FIND,
+        "Kaynak [ {0} ] bulunamad\u0131.\n {1}"},
+
+      { MsgKey.ER_RESOURCE_COULD_NOT_LOAD,
+        "Kaynak [ {0} ] y\u00fckleyemedi: {1} \n {2} \n {3}"},
+
+      { MsgKey.ER_BUFFER_SIZE_LESSTHAN_ZERO,
+        "Arabellek b\u00fcy\u00fckl\u00fc\u011f\u00fc <=0"},
+
+      { MsgKey.ER_INVALID_UTF16_SURROGATE,
+        "UTF-16 yerine kullan\u0131lan de\u011fer ge\u00e7ersiz: {0} ?"},
+
+      { MsgKey.ER_OIERROR,
+        "G\u00c7 hatas\u0131"},
+
+      { MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION,
+        "Alt d\u00fc\u011f\u00fcmlerden sonra ya da bir \u00f6\u011fe \u00fcretilmeden \u00f6nce {0} \u00f6zniteli\u011fi eklenemez. \u00d6znitelik yoksay\u0131lacak."},
+
+      { MsgKey.ER_NAMESPACE_PREFIX,
+        "''{0}'' \u00f6nekine ili\u015fkin ad alan\u0131 bildirilmedi."},
+
+        // ER_STRAY_ATTRIBUTE needs translation
+      { MsgKey.ER_STRAY_NAMESPACE,
+        "''{0}''=''{1}'' ad alan\u0131 bildirimi \u00f6\u011fenin d\u0131\u015f\u0131nda."},
+
+      { MsgKey.ER_COULD_NOT_LOAD_RESOURCE,
+        "''{0}'' y\u00fcklenemedi (CLASSPATH de\u011fi\u015fkeninizi inceleyin), yaln\u0131zca varsay\u0131lanlar kullan\u0131l\u0131yor"},
+
+        // ER_ILLEGAL_CHARACTER needs translation
+      { MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY,
+        "''{1}'' \u00e7\u0131k\u0131\u015f y\u00f6ntemi i\u00e7in ''{0}'' \u00f6zellik dosyas\u0131 y\u00fcklenemedi (CLASSPATH de\u011fi\u015fkenini inceleyin)"},
+
+      { MsgKey.ER_INVALID_PORT,
+        "Kap\u0131 numaras\u0131 ge\u00e7ersiz"},
+
+      { MsgKey.ER_PORT_WHEN_HOST_NULL,
+        "Anasistem bo\u015f de\u011ferliyken kap\u0131 tan\u0131mlanamaz"},
+
+      { MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED,
+        "Anasistem do\u011fru bi\u00e7imli bir adres de\u011fil"},
+
+      { MsgKey.ER_SCHEME_NOT_CONFORMANT,
+        "\u015eema uyumlu de\u011fil."},
+
+      { MsgKey.ER_SCHEME_FROM_NULL_STRING,
+        "Bo\u015f de\u011ferli dizgiden \u015fema tan\u0131mlanamaz"},
+
+      { MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE,
+        "Yol ge\u00e7ersiz ka\u00e7\u0131\u015f dizisi i\u00e7eriyor"},
+
+      { MsgKey.ER_PATH_INVALID_CHAR,
+        "Yol ge\u00e7ersiz karakter i\u00e7eriyor: {0}"},
+
+      { MsgKey.ER_FRAG_INVALID_CHAR,
+        "Par\u00e7a ge\u00e7ersiz karakter i\u00e7eriyor"},
+
+      { MsgKey.ER_FRAG_WHEN_PATH_NULL,
+        "Yol bo\u015f de\u011ferliyken par\u00e7a tan\u0131mlanamaz"},
+
+      { MsgKey.ER_FRAG_FOR_GENERIC_URI,
+        "Par\u00e7a yaln\u0131zca soysal URI i\u00e7in tan\u0131mlanabilir"},
+
+      { MsgKey.ER_NO_SCHEME_IN_URI,
+        "URI i\u00e7inde \u015fema bulunamad\u0131: {0}"},
+
+      { MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS,
+        "Bo\u015f de\u011fi\u015ftirgelerle URI kullan\u0131ma haz\u0131rlanamaz"},
+
+      { MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH,
+        "Par\u00e7a hem yolda, hem de par\u00e7ada belirtilemez"},
+
+      { MsgKey.ER_NO_QUERY_STRING_IN_PATH,
+        "Yol ve sorgu dizgisinde sorgu dizgisi belirtilemez"},
+
+      { MsgKey.ER_NO_PORT_IF_NO_HOST,
+        "Anasistem belirtilmediyse kap\u0131 belirtilemez"},
+
+      { MsgKey.ER_NO_USERINFO_IF_NO_HOST,
+        "Anasistem belirtilmediyse kullan\u0131c\u0131 bilgisi belirtilemez"},
+
+      { MsgKey.ER_SCHEME_REQUIRED,
+        "\u015eema gerekli!"}
+
+    };
+    return contents;
+  }
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_zh_CN.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_zh_CN.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_zh_CN.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,139 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: SerializerMessages_zh_CN.java,v 1.1.2.1 2007/01/09 18:58:42 alexsmirnov Exp $
+ */
+
+package org.ajax4jsf.xml.serializer.utils;
+
+import java.util.ListResourceBundle;
+
+public class SerializerMessages_zh_CN extends ListResourceBundle {
+  public Object[][] getContents() {
+    Object[][] contents =  new Object[][] {
+        // BAD_MSGKEY needs translation
+        // BAD_MSGFORMAT needs translation
+      { MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER,
+        "\u4e32\u884c\u5668\u7c7b\u201c{0}\u201d\u4e0d\u5b9e\u73b0 org.xml.sax.ContentHandler."},
+
+      { MsgKey.ER_RESOURCE_COULD_NOT_FIND,
+        "\u627e\u4e0d\u5230\u8d44\u6e90 [ {0} ]\u3002\n {1}"},
+
+      { MsgKey.ER_RESOURCE_COULD_NOT_LOAD,
+        "\u8d44\u6e90 [ {0} ] \u65e0\u6cd5\u88c5\u5165\uff1a{1} \n {2} \n {3}"},
+
+      { MsgKey.ER_BUFFER_SIZE_LESSTHAN_ZERO,
+        "\u7f13\u51b2\u533a\u5927\u5c0f <=0"},
+
+      { MsgKey.ER_INVALID_UTF16_SURROGATE,
+        "\u68c0\u6d4b\u5230\u65e0\u6548\u7684 UTF-16 \u66ff\u4ee3\u8005\uff1a{0}\uff1f"},
+
+      { MsgKey.ER_OIERROR,
+        "IO \u9519\u8bef"},
+
+      { MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION,
+        "\u5728\u751f\u6210\u5b50\u8282\u70b9\u4e4b\u540e\u6216\u5728\u751f\u6210\u5143\u7d20\u4e4b\u524d\u65e0\u6cd5\u6dfb\u52a0\u5c5e\u6027 {0}\u3002\u5c06\u5ffd\u7565\u5c5e\u6027\u3002"},
+
+      { MsgKey.ER_NAMESPACE_PREFIX,
+        "\u6ca1\u6709\u8bf4\u660e\u540d\u79f0\u7a7a\u95f4\u524d\u7f00\u201c{0}\u201d\u3002"},
+
+        // ER_STRAY_ATTRIBUTE needs translation
+      { MsgKey.ER_STRAY_NAMESPACE,
+        "\u540d\u79f0\u7a7a\u95f4\u8bf4\u660e\u201c{0}\u201d=\u201c{1}\u201d\u5728\u5143\u7d20\u5916\u3002"},
+
+      { MsgKey.ER_COULD_NOT_LOAD_RESOURCE,
+        "\u65e0\u6cd5\u88c5\u5165\u201c{0}\u201d\uff08\u68c0\u67e5 CLASSPATH\uff09\uff0c\u73b0\u5728\u53ea\u4f7f\u7528\u7f3a\u7701\u503c"},
+
+        // ER_ILLEGAL_CHARACTER needs translation
+      { MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY,
+        "\u65e0\u6cd5\u4e3a\u8f93\u51fa\u65b9\u6cd5\u201c{1}\u201d\u88c5\u8f7d\u5c5e\u6027\u6587\u4ef6\u201c{0}\u201d\uff08\u68c0\u67e5 CLASSPATH\uff09"},
+
+      { MsgKey.ER_INVALID_PORT,
+        "\u65e0\u6548\u7684\u7aef\u53e3\u53f7"},
+
+      { MsgKey.ER_PORT_WHEN_HOST_NULL,
+        "\u4e3b\u673a\u4e3a\u7a7a\u65f6\uff0c\u65e0\u6cd5\u8bbe\u7f6e\u7aef\u53e3"},
+
+      { MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED,
+        "\u4e3b\u673a\u4e0d\u662f\u683c\u5f0f\u826f\u597d\u7684\u5730\u5740"},
+
+      { MsgKey.ER_SCHEME_NOT_CONFORMANT,
+        "\u6a21\u5f0f\u4e0d\u4e00\u81f4\u3002"},
+
+      { MsgKey.ER_SCHEME_FROM_NULL_STRING,
+        "\u65e0\u6cd5\u4ece\u7a7a\u5b57\u7b26\u4e32\u8bbe\u7f6e\u6a21\u5f0f"},
+
+      { MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE,
+        "\u8def\u5f84\u5305\u542b\u65e0\u6548\u7684\u8f6c\u4e49\u5e8f\u5217"},
+
+      { MsgKey.ER_PATH_INVALID_CHAR,
+        "\u8def\u5f84\u5305\u542b\u975e\u6cd5\u5b57\u7b26\uff1a{0}"},
+
+      { MsgKey.ER_FRAG_INVALID_CHAR,
+        "\u7247\u6bb5\u5305\u542b\u65e0\u6548\u7684\u5b57\u7b26"},
+
+      { MsgKey.ER_FRAG_WHEN_PATH_NULL,
+        "\u8def\u5f84\u4e3a\u7a7a\u65f6\uff0c\u65e0\u6cd5\u8bbe\u7f6e\u7247\u6bb5"},
+
+      { MsgKey.ER_FRAG_FOR_GENERIC_URI,
+        "\u53ea\u80fd\u4e3a\u4e00\u822c URI \u8bbe\u7f6e\u7247\u6bb5"},
+
+      { MsgKey.ER_NO_SCHEME_IN_URI,
+        "\u5728 URI \u4e2d\u627e\u4e0d\u5230\u6a21\u5f0f\uff1a{0}"},
+
+      { MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS,
+        "\u65e0\u6cd5\u4ee5\u7a7a\u53c2\u6570\u521d\u59cb\u5316 URI"},
+
+      { MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH,
+        "\u8def\u5f84\u548c\u7247\u6bb5\u4e2d\u90fd\u65e0\u6cd5\u6307\u5b9a\u7247\u6bb5"},
+
+      { MsgKey.ER_NO_QUERY_STRING_IN_PATH,
+        "\u8def\u5f84\u548c\u67e5\u8be2\u5b57\u7b26\u4e32\u4e2d\u4e0d\u80fd\u6307\u5b9a\u67e5\u8be2\u5b57\u7b26\u4e32"},
+
+      { MsgKey.ER_NO_PORT_IF_NO_HOST,
+        "\u5982\u679c\u6ca1\u6709\u6307\u5b9a\u4e3b\u673a\uff0c\u5219\u4e0d\u53ef\u4ee5\u6307\u5b9a\u7aef\u53e3"},
+
+      { MsgKey.ER_NO_USERINFO_IF_NO_HOST,
+        "\u5982\u679c\u6ca1\u6709\u6307\u5b9a\u4e3b\u673a\uff0c\u5219\u4e0d\u53ef\u4ee5\u6307\u5b9a Userinfo"},
+
+      { MsgKey.ER_SCHEME_REQUIRED,
+        "\u6a21\u5f0f\u662f\u5fc5\u9700\u7684\uff01"}
+
+    };
+    return contents;
+  }
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_zh_TW.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_zh_TW.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SerializerMessages_zh_TW.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,139 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: SerializerMessages_zh_TW.java,v 1.1.2.1 2007/01/09 18:58:41 alexsmirnov Exp $
+ */
+
+package org.ajax4jsf.xml.serializer.utils;
+
+import java.util.ListResourceBundle;
+
+public class SerializerMessages_zh_TW extends ListResourceBundle {
+  public Object[][] getContents() {
+    Object[][] contents =  new Object[][] {
+        // BAD_MSGKEY needs translation
+        // BAD_MSGFORMAT needs translation
+      { MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER,
+        "serializer \u985e\u5225 ''{0}'' \u4e0d\u5be6\u4f5c org.xml.sax.ContentHandler\u3002"},
+
+      { MsgKey.ER_RESOURCE_COULD_NOT_FIND,
+        "\u627e\u4e0d\u5230\u8cc7\u6e90 [ {0} ]\u3002\n{1}"},
+
+      { MsgKey.ER_RESOURCE_COULD_NOT_LOAD,
+        "\u7121\u6cd5\u8f09\u5165\u8cc7\u6e90 [ {0} ]\uff1a{1} \n {2} \n {3}"},
+
+      { MsgKey.ER_BUFFER_SIZE_LESSTHAN_ZERO,
+        "\u7de9\u885d\u5340\u5927\u5c0f <=0"},
+
+      { MsgKey.ER_INVALID_UTF16_SURROGATE,
+        "\u5075\u6e2c\u5230\u7121\u6548\u7684 UTF-16 \u4ee3\u7406\uff1a{0}?"},
+
+      { MsgKey.ER_OIERROR,
+        "IO \u932f\u8aa4"},
+
+      { MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION,
+        "\u5728\u7522\u751f\u5b50\u9805\u7bc0\u9ede\u4e4b\u5f8c\uff0c\u6216\u5728\u7522\u751f\u5143\u7d20\u4e4b\u524d\uff0c\u4e0d\u53ef\u65b0\u589e\u5c6c\u6027 {0}\u3002\u5c6c\u6027\u6703\u88ab\u5ffd\u7565\u3002"},
+
+      { MsgKey.ER_NAMESPACE_PREFIX,
+        "\u5b57\u9996 ''{0}'' \u7684\u540d\u7a31\u7a7a\u9593\u5c1a\u672a\u5ba3\u544a\u3002"},
+
+        // ER_STRAY_ATTRIBUTE needs translation
+      { MsgKey.ER_STRAY_NAMESPACE,
+        "\u540d\u7a31\u7a7a\u9593\u5ba3\u544a ''{0}''=''{1}'' \u8d85\u51fa\u5143\u7d20\u5916\u3002"},
+
+      { MsgKey.ER_COULD_NOT_LOAD_RESOURCE,
+        "\u7121\u6cd5\u8f09\u5165 ''{0}''\uff08\u6aa2\u67e5 CLASSPATH\uff09\uff0c\u76ee\u524d\u53ea\u4f7f\u7528\u9810\u8a2d\u503c"},
+
+        // ER_ILLEGAL_CHARACTER needs translation
+      { MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY,
+        "\u7121\u6cd5\u8f09\u5165\u8f38\u51fa\u65b9\u6cd5 ''{1}'' \u7684\u5167\u5bb9\u6a94 ''{0}''\uff08\u6aa2\u67e5 CLASSPATH\uff09"},
+
+      { MsgKey.ER_INVALID_PORT,
+        "\u7121\u6548\u7684\u57e0\u7de8\u865f"},
+
+      { MsgKey.ER_PORT_WHEN_HOST_NULL,
+        "\u4e3b\u6a5f\u70ba\u7a7a\u503c\u6642\uff0c\u7121\u6cd5\u8a2d\u5b9a\u57e0"},
+
+      { MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED,
+        "\u4e3b\u6a5f\u6c92\u6709\u5b8c\u6574\u7684\u4f4d\u5740"},
+
+      { MsgKey.ER_SCHEME_NOT_CONFORMANT,
+        "\u7db1\u8981\u4e0d\u662f conformant\u3002"},
+
+      { MsgKey.ER_SCHEME_FROM_NULL_STRING,
+        "\u7121\u6cd5\u5f9e\u7a7a\u5b57\u4e32\u8a2d\u5b9a\u7db1\u8981"},
+
+      { MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE,
+        "\u8def\u5f91\u5305\u542b\u7121\u6548\u7684\u8df3\u812b\u5b57\u5143"},
+
+      { MsgKey.ER_PATH_INVALID_CHAR,
+        "\u8def\u5f91\u5305\u542b\u7121\u6548\u7684\u5b57\u5143\uff1a{0}"},
+
+      { MsgKey.ER_FRAG_INVALID_CHAR,
+        "\u7247\u6bb5\u5305\u542b\u7121\u6548\u7684\u5b57\u5143"},
+
+      { MsgKey.ER_FRAG_WHEN_PATH_NULL,
+        "\u8def\u5f91\u70ba\u7a7a\u503c\u6642\uff0c\u7121\u6cd5\u8a2d\u5b9a\u7247\u6bb5"},
+
+      { MsgKey.ER_FRAG_FOR_GENERIC_URI,
+        "\u53ea\u80fd\u5c0d\u901a\u7528\u7684 URI \u8a2d\u5b9a\u7247\u6bb5"},
+
+      { MsgKey.ER_NO_SCHEME_IN_URI,
+        "\u5728 URI\uff1a{0} \u627e\u4e0d\u5230\u7db1\u8981"},
+
+      { MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS,
+        "\u7121\u6cd5\u4ee5\u7a7a\u767d\u53c3\u6578\u8d77\u59cb\u8a2d\u5b9a URI"},
+
+      { MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH,
+        "\u7247\u6bb5\u7121\u6cd5\u540c\u6642\u5728\u8def\u5f91\u548c\u7247\u6bb5\u4e2d\u6307\u5b9a"},
+
+      { MsgKey.ER_NO_QUERY_STRING_IN_PATH,
+        "\u5728\u8def\u5f91\u53ca\u67e5\u8a62\u5b57\u4e32\u4e2d\u4e0d\u53ef\u6307\u5b9a\u67e5\u8a62\u5b57\u4e32"},
+
+      { MsgKey.ER_NO_PORT_IF_NO_HOST,
+        "\u5982\u679c\u6c92\u6709\u6307\u5b9a\u4e3b\u6a5f\uff0c\u4e0d\u53ef\u6307\u5b9a\u57e0"},
+
+      { MsgKey.ER_NO_USERINFO_IF_NO_HOST,
+        "\u5982\u679c\u6c92\u6709\u6307\u5b9a\u4e3b\u6a5f\uff0c\u4e0d\u53ef\u6307\u5b9a Userinfo"},
+
+      { MsgKey.ER_SCHEME_REQUIRED,
+        "\u7db1\u8981\u662f\u5fc5\u9700\u7684\uff01"}
+
+    };
+    return contents;
+  }
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/StringToIntTable.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/StringToIntTable.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/StringToIntTable.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,222 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: StringToIntTable.java,v 1.1.2.1 2007/01/09 18:58:33 alexsmirnov Exp $
+ */
+package org.ajax4jsf.xml.serializer.utils;
+
+/**
+ * A very simple lookup table that stores a list of strings, the even
+ * number strings being keys, and the odd number strings being values.
+ * 
+ * This class is a copy of the one in org.apache.xml.utils. 
+ * It exists to cut the serializers dependancy on that package.
+ * 
+ * This class is not a public API, it is only public so it can be used
+ * in org.ajax4jsf.xml.serializer.
+ *  
+ * @xsl.usage internal
+ */
+public final class StringToIntTable
+{
+
+  public static final int INVALID_KEY = -10000;
+  
+  /** Block size to allocate          */
+  private int m_blocksize;
+
+  /** Array of strings this table points to. Associated with ints
+   * in m_values         */
+  private String m_map[];
+
+  /** Array of ints this table points. Associated with strings from
+   * m_map.         */
+  private int m_values[];
+
+  /** Number of ints in the table          */
+  private int m_firstFree = 0;
+
+  /** Size of this table         */
+  private int m_mapSize;
+
+  /**
+   * Default constructor.  Note that the default
+   * block size is very small, for small lists.
+   */
+  public StringToIntTable()
+  {
+
+    m_blocksize = 8;
+    m_mapSize = m_blocksize;
+    m_map = new String[m_blocksize];
+    m_values = new int[m_blocksize];
+  }
+
+  /**
+   * Construct a StringToIntTable, using the given block size.
+   *
+   * @param blocksize Size of block to allocate
+   */
+  public StringToIntTable(int blocksize)
+  {
+
+    m_blocksize = blocksize;
+    m_mapSize = blocksize;
+    m_map = new String[blocksize];
+    m_values = new int[m_blocksize];
+  }
+
+  /**
+   * Get the length of the list.
+   *
+   * @return the length of the list 
+   */
+  public final int getLength()
+  {
+    return m_firstFree;
+  }
+
+  /**
+   * Append a string onto the vector.
+   *
+   * @param key String to append
+   * @param value The int value of the string
+   */
+  public final void put(String key, int value)
+  {
+
+    if ((m_firstFree + 1) >= m_mapSize)
+    {
+      m_mapSize += m_blocksize;
+
+      String newMap[] = new String[m_mapSize];
+
+      System.arraycopy(m_map, 0, newMap, 0, m_firstFree + 1);
+
+      m_map = newMap;
+
+      int newValues[] = new int[m_mapSize];
+
+      System.arraycopy(m_values, 0, newValues, 0, m_firstFree + 1);
+
+      m_values = newValues;
+    }
+
+    m_map[m_firstFree] = key;
+    m_values[m_firstFree] = value;
+
+    m_firstFree++;
+  }
+
+  /**
+   * Tell if the table contains the given string.
+   *
+   * @param key String to look for
+   *
+   * @return The String's int value
+   * 
+   */
+  public final int get(String key)
+  {
+
+    for (int i = 0; i < m_firstFree; i++)
+    {
+      if (m_map[i].equals(key))
+        return m_values[i];
+    }
+
+    return INVALID_KEY;
+  }
+
+  /**
+   * Tell if the table contains the given string. Ignore case.
+   *
+   * @param key String to look for
+   *
+   * @return The string's int value
+   */
+  public final int getIgnoreCase(String key)
+  {
+
+    if (null == key)
+        return INVALID_KEY;
+
+    for (int i = 0; i < m_firstFree; i++)
+    {
+      if (m_map[i].equalsIgnoreCase(key))
+        return m_values[i];
+    }
+
+    return INVALID_KEY;
+  }
+
+  /**
+   * Tell if the table contains the given string.
+   *
+   * @param key String to look for
+   *
+   * @return True if the string is in the table
+   */
+  public final boolean contains(String key)
+  {
+
+    for (int i = 0; i < m_firstFree; i++)
+    {
+      if (m_map[i].equals(key))
+        return true;
+    }
+
+    return false;
+  }
+  
+  /**
+   * Return array of keys in the table.
+   * 
+   * @return Array of strings
+   */
+  public final String[] keys()
+  {
+    String [] keysArr = new String[m_firstFree];
+
+    for (int i = 0; i < m_firstFree; i++)
+    {
+      keysArr[i] = m_map[i];
+    }
+
+    return keysArr;
+  }  
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SystemIDResolver.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SystemIDResolver.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/SystemIDResolver.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,321 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: SystemIDResolver.java,v 1.1.2.1 2007/01/09 18:58:41 alexsmirnov Exp $
+ */
+package org.ajax4jsf.xml.serializer.utils;
+
+import java.io.File;
+
+import javax.xml.transform.TransformerException;
+
+import org.ajax4jsf.xml.serializer.utils.URI.MalformedURIException;
+
+/**
+ * This class is used to resolve relative URIs and SystemID 
+ * strings into absolute URIs.
+ *
+ * <p>This is a generic utility for resolving URIs, other than the 
+ * fact that it's declared to throw TransformerException.  Please 
+ * see code comments for details on how resolution is performed.</p>
+ * 
+ * This class is a copy of the one in org.apache.xml.utils. 
+ * It exists to cut the serializers dependancy on that package.
+ *
+ * This class is not a public API, it is only public because it is
+ * used in org.ajax4jsf.xml.serializer. 
+ * 
+ * @xsl.usage internal
+ */
+public final class SystemIDResolver
+{
+
+  /**
+   * Get an absolute URI from a given relative URI (local path). 
+   * 
+   * <p>The relative URI is a local filesystem path. The path can be
+   * absolute or relative. If it is a relative path, it is resolved relative 
+   * to the system property "user.dir" if it is available; if not (i.e. in an 
+   * Applet perhaps which throws SecurityException) then we just return the
+   * relative path. The space and backslash characters are also replaced to
+   * generate a good absolute URI.</p>
+   *
+   * @param localPath The relative URI to resolve
+   *
+   * @return Resolved absolute URI
+   */
+  public static String getAbsoluteURIFromRelative(String localPath)
+  {
+    if (localPath == null || localPath.length() == 0)
+      return "";
+      
+    // If the local path is a relative path, then it is resolved against
+    // the "user.dir" system property.
+    String absolutePath = localPath;
+    if (!isAbsolutePath(localPath))
+    {
+      try 
+      {
+        absolutePath = getAbsolutePathFromRelativePath(localPath);
+      }
+      // user.dir not accessible from applet
+      catch (SecurityException se) 
+      {
+        return "file:" + localPath;
+      }
+    }
+
+    String urlString;
+    if (null != absolutePath)
+    {
+      if (absolutePath.startsWith(File.separator))
+        urlString = "file://" + absolutePath;
+      else
+        urlString = "file:///" + absolutePath;        
+    }
+    else
+      urlString = "file:" + localPath;
+    
+    return replaceChars(urlString);
+  }
+  
+  /**
+   * Return an absolute path from a relative path.
+   *
+   * @param relativePath A relative path
+   * @return The absolute path
+   */
+  private static String getAbsolutePathFromRelativePath(String relativePath)
+  {
+    return new File(relativePath).getAbsolutePath();
+  }
+  
+  /**
+   * Return true if the systemId denotes an absolute URI .
+   *
+   * @param systemId The systemId string
+   * @return true if the systemId is an an absolute URI
+   */
+  public static boolean isAbsoluteURI(String systemId)
+  {
+     /** http://www.ietf.org/rfc/rfc2396.txt
+      *   Authors should be aware that a path segment which contains a colon
+      * character cannot be used as the first segment of a relative URI path
+      * (e.g., "this:that"), because it would be mistaken for a scheme name.
+     **/
+     /** 
+      * %REVIEW% Can we assume here that systemId is a valid URI?
+      * It looks like we cannot ( See discussion of this common problem in 
+      * Bugzilla Bug 22777 ). 
+     **/
+     //"fix" for Bugzilla Bug 22777
+    if(isWindowsAbsolutePath(systemId)){
+        return false;
+     }
+    
+    final int fragmentIndex = systemId.indexOf('#');
+    final int queryIndex = systemId.indexOf('?');
+    final int slashIndex = systemId.indexOf('/');
+    final int colonIndex = systemId.indexOf(':');
+    
+    //finding substring  before '#', '?', and '/' 
+    int index = systemId.length() -1;
+    if(fragmentIndex > 0) 
+        index = fragmentIndex;
+    if((queryIndex > 0) && (queryIndex <index)) 
+        index = queryIndex;
+    if((slashIndex > 0) && (slashIndex <index))
+        index = slashIndex; 
+    // return true if there is ':' before '#', '?', and '/'
+    return ((colonIndex >0) && (colonIndex<index));
+    
+  }
+  
+  /**
+   * Return true if the local path is an absolute path.
+   *
+   * @param systemId The path string
+   * @return true if the path is absolute
+   */
+  public static boolean isAbsolutePath(String systemId)
+  {
+    if(systemId == null)
+        return false;
+    final File file = new File(systemId);
+    return file.isAbsolute();
+    
+  }
+  
+   /**
+   * Return true if the local path is a Windows absolute path.
+   *
+   * @param systemId The path string
+   * @return true if the path is a Windows absolute path
+   */
+    private static boolean isWindowsAbsolutePath(String systemId)
+  {
+    if(!isAbsolutePath(systemId))
+      return false;
+    // On Windows, an absolute path starts with "[drive_letter]:\".
+    if (systemId.length() > 2 
+        && systemId.charAt(1) == ':'
+        && Character.isLetter(systemId.charAt(0))
+        && (systemId.charAt(2) == '\\' || systemId.charAt(2) == '/'))
+      return true;
+    else
+      return false;
+  }
+  
+  /**
+   * Replace spaces with "%20" and backslashes with forward slashes in 
+   * the input string to generate a well-formed URI string.
+   *
+   * @param str The input string
+   * @return The string after conversion
+   */
+  private static String replaceChars(String str)
+  {
+    StringBuffer buf = new StringBuffer(str);
+    int length = buf.length();
+    for (int i = 0; i < length; i++)
+    {
+      char currentChar = buf.charAt(i);
+      // Replace space with "%20"
+      if (currentChar == ' ')
+      {
+        buf.setCharAt(i, '%');
+        buf.insert(i+1, "20");
+        length = length + 2;
+        i = i + 2;
+      }
+      // Replace backslash with forward slash
+      else if (currentChar == '\\')
+      {
+        buf.setCharAt(i, '/');
+      }
+    }
+    
+    return buf.toString();
+  }
+  
+  /**
+   * Take a SystemID string and try to turn it into a good absolute URI.
+   *
+   * @param systemId A URI string, which may be absolute or relative.
+   *
+   * @return The resolved absolute URI
+   */
+  public static String getAbsoluteURI(String systemId)
+  {
+    String absoluteURI = systemId;
+    if (isAbsoluteURI(systemId))
+    {
+      // Only process the systemId if it starts with "file:".
+      if (systemId.startsWith("file:"))
+      {
+        String str = systemId.substring(5);
+        
+        // Resolve the absolute path if the systemId starts with "file:///"
+        // or "file:/". Don't do anything if it only starts with "file://".
+        if (str != null && str.startsWith("/"))
+        {
+          if (str.startsWith("///") || !str.startsWith("//"))
+          {
+            // A Windows path containing a drive letter can be relative.
+            // A Unix path starting with "file:/" is always absolute.
+            int secondColonIndex = systemId.indexOf(':', 5);
+            if (secondColonIndex > 0)
+            {
+              String localPath = systemId.substring(secondColonIndex-1);
+              try {
+                if (!isAbsolutePath(localPath))
+                  absoluteURI = systemId.substring(0, secondColonIndex-1) + 
+                                getAbsolutePathFromRelativePath(localPath);
+              }
+              catch (SecurityException se) {
+                return systemId;
+              }
+            }
+          }          
+        }
+        else
+        {
+          return getAbsoluteURIFromRelative(systemId.substring(5));
+        }
+                
+        return replaceChars(absoluteURI);
+      }
+      else
+        return systemId;
+    }
+    else
+      return getAbsoluteURIFromRelative(systemId);
+    
+  }
+
+
+  /**
+   * Take a SystemID string and try to turn it into a good absolute URI.
+   *
+   * @param urlString SystemID string
+   * @param base The URI string used as the base for resolving the systemID
+   *
+   * @return The resolved absolute URI
+   * @throws TransformerException thrown if the string can't be turned into a URI.
+   */
+  public static String getAbsoluteURI(String urlString, String base)
+          throws TransformerException
+  {    
+    if (base == null)
+      return getAbsoluteURI(urlString);
+    
+    String absoluteBase = getAbsoluteURI(base);
+    URI uri = null;
+    try 
+    {
+      URI baseURI = new URI(absoluteBase);
+      uri = new URI(baseURI, urlString);
+    }
+    catch (MalformedURIException mue)
+    {
+      throw new TransformerException(mue);
+    }
+    
+    return replaceChars(uri.toString());
+  }
+  
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/URI.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/URI.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/URI.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1672 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: URI.java,v 1.1.2.1 2007/01/09 18:58:38 alexsmirnov Exp $
+ */
+package org.ajax4jsf.xml.serializer.utils;
+
+import java.io.IOException;
+
+
+/**
+ * A class to represent a Uniform Resource Identifier (URI). This class
+ * is designed to handle the parsing of URIs and provide access to
+ * the various components (scheme, host, port, userinfo, path, query
+ * string and fragment) that may constitute a URI.
+ * <p>
+ * Parsing of a URI specification is done according to the URI
+ * syntax described in RFC 2396
+ * <http://www.ietf.org/rfc/rfc2396.txt?number=2396>. Every URI consists
+ * of a scheme, followed by a colon (':'), followed by a scheme-specific
+ * part. For URIs that follow the "generic URI" syntax, the scheme-
+ * specific part begins with two slashes ("//") and may be followed
+ * by an authority segment (comprised of user information, host, and
+ * port), path segment, query segment and fragment. Note that RFC 2396
+ * no longer specifies the use of the parameters segment and excludes
+ * the "user:password" syntax as part of the authority segment. If
+ * "user:password" appears in a URI, the entire user/password string
+ * is stored as userinfo.
+ * <p>
+ * For URIs that do not follow the "generic URI" syntax (e.g. mailto),
+ * the entire scheme-specific part is treated as the "path" portion
+ * of the URI.
+ * <p>
+ * Note that, unlike the java.net.URL class, this class does not provide
+ * any built-in network access functionality nor does it provide any
+ * scheme-specific functionality (for example, it does not know a
+ * default port for a specific scheme). Rather, it only knows the
+ * grammar and basic set of operations that can be applied to a URI.
+ *
+ * This class is a copy of the one in org.apache.xml.utils. 
+ * It exists to cut the serializers dependancy on that package.
+ * 
+ * A minor change from the original is that this class no longer implements
+ * Serializable, and the serialVersionUID magic field is dropped, and
+ * the class is no longer "public".
+ *  
+ * @xsl.usage internal
+ */
+final class URI
+{
+  /**
+   * MalformedURIExceptions are thrown in the process of building a URI
+   * or setting fields on a URI when an operation would result in an
+   * invalid URI specification.
+   *
+   */
+  public static class MalformedURIException extends IOException
+  {
+
+    /**
+     * Constructs a <code>MalformedURIException</code> with no specified
+     * detail message.
+     */
+    public MalformedURIException()
+    {
+      super();
+    }
+
+    /**
+     * Constructs a <code>MalformedURIException</code> with the
+     * specified detail message.
+     *
+     * @param p_msg the detail message.
+     */
+    public MalformedURIException(String p_msg)
+    {
+      super(p_msg);
+    }
+  }
+
+  /** reserved characters */
+  private static final String RESERVED_CHARACTERS = ";/?:@&=+$,";
+
+  /**
+   * URI punctuation mark characters - these, combined with
+   *   alphanumerics, constitute the "unreserved" characters 
+   */
+  private static final String MARK_CHARACTERS = "-_.!~*'() ";
+
+  /** scheme can be composed of alphanumerics and these characters */
+  private static final String SCHEME_CHARACTERS = "+-.";
+
+  /**
+   * userinfo can be composed of unreserved, escaped and these
+   *   characters 
+   */
+  private static final String USERINFO_CHARACTERS = ";:&=+$,";
+
+  /** Stores the scheme (usually the protocol) for this URI.
+   *  @serial */
+  private String m_scheme = null;
+
+  /** If specified, stores the userinfo for this URI; otherwise null.
+   *  @serial */
+  private String m_userinfo = null;
+
+  /** If specified, stores the host for this URI; otherwise null.
+   *  @serial */
+  private String m_host = null;
+
+  /** If specified, stores the port for this URI; otherwise -1.
+   *  @serial */
+  private int m_port = -1;
+
+  /** If specified, stores the path for this URI; otherwise null.
+   *  @serial */
+  private String m_path = null;
+
+  /**
+   * If specified, stores the query string for this URI; otherwise
+   *   null. 
+   * @serial 
+   */
+  private String m_queryString = null;
+
+  /** If specified, stores the fragment for this URI; otherwise null.
+   *  @serial */
+  private String m_fragment = null;
+
+  /** Indicate whether in DEBUG mode          */
+  private static boolean DEBUG = false;
+
+  /**
+   * Construct a new and uninitialized URI.
+   */
+  public URI(){}
+
+  /**
+   * Construct a new URI from another URI. All fields for this URI are
+   * set equal to the fields of the URI passed in.
+   *
+   * @param p_other the URI to copy (cannot be null)
+   */
+  public URI(URI p_other)
+  {
+    initialize(p_other);
+  }
+
+  /**
+   * Construct a new URI from a URI specification string. If the
+   * specification follows the "generic URI" syntax, (two slashes
+   * following the first colon), the specification will be parsed
+   * accordingly - setting the scheme, userinfo, host,port, path, query
+   * string and fragment fields as necessary. If the specification does
+   * not follow the "generic URI" syntax, the specification is parsed
+   * into a scheme and scheme-specific part (stored as the path) only.
+   *
+   * @param p_uriSpec the URI specification string (cannot be null or
+   *                  empty)
+   *
+   * @throws MalformedURIException if p_uriSpec violates any syntax
+   *                                   rules
+   */
+  public URI(String p_uriSpec) throws MalformedURIException
+  {
+    this((URI) null, p_uriSpec);
+  }
+
+  /**
+   * Construct a new URI from a base URI and a URI specification string.
+   * The URI specification string may be a relative URI.
+   *
+   * @param p_base the base URI (cannot be null if p_uriSpec is null or
+   *               empty)
+   * @param p_uriSpec the URI specification string (cannot be null or
+   *                  empty if p_base is null)
+   *
+   * @throws MalformedURIException if p_uriSpec violates any syntax
+   *                                  rules
+   */
+  public URI(URI p_base, String p_uriSpec) throws MalformedURIException
+  {
+    initialize(p_base, p_uriSpec);
+  }
+
+  /**
+   * Construct a new URI that does not follow the generic URI syntax.
+   * Only the scheme and scheme-specific part (stored as the path) are
+   * initialized.
+   *
+   * @param p_scheme the URI scheme (cannot be null or empty)
+   * @param p_schemeSpecificPart the scheme-specific part (cannot be
+   *                             null or empty)
+   *
+   * @throws MalformedURIException if p_scheme violates any
+   *                                  syntax rules
+   */
+  public URI(String p_scheme, String p_schemeSpecificPart)
+          throws MalformedURIException
+  {
+
+    if (p_scheme == null || p_scheme.trim().length() == 0)
+    {
+      throw new MalformedURIException(
+        "Cannot construct URI with null/empty scheme!");
+    }
+
+    if (p_schemeSpecificPart == null
+            || p_schemeSpecificPart.trim().length() == 0)
+    {
+      throw new MalformedURIException(
+        "Cannot construct URI with null/empty scheme-specific part!");
+    }
+
+    setScheme(p_scheme);
+    setPath(p_schemeSpecificPart);
+  }
+
+  /**
+   * Construct a new URI that follows the generic URI syntax from its
+   * component parts. Each component is validated for syntax and some
+   * basic semantic checks are performed as well.  See the individual
+   * setter methods for specifics.
+   *
+   * @param p_scheme the URI scheme (cannot be null or empty)
+   * @param p_host the hostname or IPv4 address for the URI
+   * @param p_path the URI path - if the path contains '?' or '#',
+   *               then the query string and/or fragment will be
+   *               set from the path; however, if the query and
+   *               fragment are specified both in the path and as
+   *               separate parameters, an exception is thrown
+   * @param p_queryString the URI query string (cannot be specified
+   *                      if path is null)
+   * @param p_fragment the URI fragment (cannot be specified if path
+   *                   is null)
+   *
+   * @throws MalformedURIException if any of the parameters violates
+   *                                  syntax rules or semantic rules
+   */
+  public URI(String p_scheme, String p_host, String p_path, String p_queryString, String p_fragment)
+          throws MalformedURIException
+  {
+    this(p_scheme, null, p_host, -1, p_path, p_queryString, p_fragment);
+  }
+
+  /**
+   * Construct a new URI that follows the generic URI syntax from its
+   * component parts. Each component is validated for syntax and some
+   * basic semantic checks are performed as well.  See the individual
+   * setter methods for specifics.
+   *
+   * @param p_scheme the URI scheme (cannot be null or empty)
+   * @param p_userinfo the URI userinfo (cannot be specified if host
+   *                   is null)
+   * @param p_host the hostname or IPv4 address for the URI
+   * @param p_port the URI port (may be -1 for "unspecified"; cannot
+   *               be specified if host is null)
+   * @param p_path the URI path - if the path contains '?' or '#',
+   *               then the query string and/or fragment will be
+   *               set from the path; however, if the query and
+   *               fragment are specified both in the path and as
+   *               separate parameters, an exception is thrown
+   * @param p_queryString the URI query string (cannot be specified
+   *                      if path is null)
+   * @param p_fragment the URI fragment (cannot be specified if path
+   *                   is null)
+   *
+   * @throws MalformedURIException if any of the parameters violates
+   *                                  syntax rules or semantic rules
+   */
+  public URI(String p_scheme, String p_userinfo, String p_host, int p_port, String p_path, String p_queryString, String p_fragment)
+          throws MalformedURIException
+  {
+
+    if (p_scheme == null || p_scheme.trim().length() == 0)
+    {
+      throw new MalformedURIException(Utils.messages.createMessage(MsgKey.ER_SCHEME_REQUIRED, null)); //"Scheme is required!");
+    }
+
+    if (p_host == null)
+    {
+      if (p_userinfo != null)
+      {
+        throw new MalformedURIException(
+          Utils.messages.createMessage(MsgKey.ER_NO_USERINFO_IF_NO_HOST, null)); //"Userinfo may not be specified if host is not specified!");
+      }
+
+      if (p_port != -1)
+      {
+        throw new MalformedURIException(
+          Utils.messages.createMessage(MsgKey.ER_NO_PORT_IF_NO_HOST, null)); //"Port may not be specified if host is not specified!");
+      }
+    }
+
+    if (p_path != null)
+    {
+      if (p_path.indexOf('?') != -1 && p_queryString != null)
+      {
+        throw new MalformedURIException(
+          Utils.messages.createMessage(MsgKey.ER_NO_QUERY_STRING_IN_PATH, null)); //"Query string cannot be specified in path and query string!");
+      }
+
+      if (p_path.indexOf('#') != -1 && p_fragment != null)
+      {
+        throw new MalformedURIException(
+          Utils.messages.createMessage(MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH, null)); //"Fragment cannot be specified in both the path and fragment!");
+      }
+    }
+
+    setScheme(p_scheme);
+    setHost(p_host);
+    setPort(p_port);
+    setUserinfo(p_userinfo);
+    setPath(p_path);
+    setQueryString(p_queryString);
+    setFragment(p_fragment);
+  }
+
+  /**
+   * Initialize all fields of this URI from another URI.
+   *
+   * @param p_other the URI to copy (cannot be null)
+   */
+  private void initialize(URI p_other)
+  {
+
+    m_scheme = p_other.getScheme();
+    m_userinfo = p_other.getUserinfo();
+    m_host = p_other.getHost();
+    m_port = p_other.getPort();
+    m_path = p_other.getPath();
+    m_queryString = p_other.getQueryString();
+    m_fragment = p_other.getFragment();
+  }
+
+  /**
+   * Initializes this URI from a base URI and a URI specification string.
+   * See RFC 2396 Section 4 and Appendix B for specifications on parsing
+   * the URI and Section 5 for specifications on resolving relative URIs
+   * and relative paths.
+   *
+   * @param p_base the base URI (may be null if p_uriSpec is an absolute
+   *               URI)
+   * @param p_uriSpec the URI spec string which may be an absolute or
+   *                  relative URI (can only be null/empty if p_base
+   *                  is not null)
+   *
+   * @throws MalformedURIException if p_base is null and p_uriSpec
+   *                                  is not an absolute URI or if
+   *                                  p_uriSpec violates syntax rules
+   */
+  private void initialize(URI p_base, String p_uriSpec)
+          throws MalformedURIException
+  {
+
+    if (p_base == null
+            && (p_uriSpec == null || p_uriSpec.trim().length() == 0))
+    {
+      throw new MalformedURIException(
+        Utils.messages.createMessage(MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS, null)); //"Cannot initialize URI with empty parameters.");
+    }
+
+    // just make a copy of the base if spec is empty
+    if (p_uriSpec == null || p_uriSpec.trim().length() == 0)
+    {
+      initialize(p_base);
+
+      return;
+    }
+
+    String uriSpec = p_uriSpec.trim();
+    int uriSpecLen = uriSpec.length();
+    int index = 0;
+
+    // check for scheme
+    int colonIndex = uriSpec.indexOf(':');
+    if (colonIndex < 0)
+    {
+      if (p_base == null)
+      {
+        throw new MalformedURIException(Utils.messages.createMessage(MsgKey.ER_NO_SCHEME_IN_URI, new Object[]{uriSpec})); //"No scheme found in URI: "+uriSpec);
+      }
+    }
+    else
+    {
+      initializeScheme(uriSpec);
+      uriSpec = uriSpec.substring(colonIndex+1);
+      uriSpecLen = uriSpec.length();
+    }
+
+    // two slashes means generic URI syntax, so we get the authority
+    if (((index + 1) < uriSpecLen)
+            && (uriSpec.substring(index).startsWith("//")))
+    {
+      index += 2;
+
+      int startPos = index;
+
+      // get authority - everything up to path, query or fragment
+      char testChar = '\0';
+
+      while (index < uriSpecLen)
+      {
+        testChar = uriSpec.charAt(index);
+
+        if (testChar == '/' || testChar == '?' || testChar == '#')
+        {
+          break;
+        }
+
+        index++;
+      }
+
+      // if we found authority, parse it out, otherwise we set the
+      // host to empty string
+      if (index > startPos)
+      {
+        initializeAuthority(uriSpec.substring(startPos, index));
+      }
+      else
+      {
+        m_host = "";
+      }
+    }
+
+    initializePath(uriSpec.substring(index));
+
+    // Resolve relative URI to base URI - see RFC 2396 Section 5.2
+    // In some cases, it might make more sense to throw an exception
+    // (when scheme is specified is the string spec and the base URI
+    // is also specified, for example), but we're just following the
+    // RFC specifications 
+    if (p_base != null)
+    {
+
+      // check to see if this is the current doc - RFC 2396 5.2 #2
+      // note that this is slightly different from the RFC spec in that
+      // we don't include the check for query string being null
+      // - this handles cases where the urispec is just a query
+      // string or a fragment (e.g. "?y" or "#s") - 
+      // see <http://www.ics.uci.edu/~fielding/url/test1.html> which
+      // identified this as a bug in the RFC
+      if (m_path.length() == 0 && m_scheme == null && m_host == null)
+      {
+        m_scheme = p_base.getScheme();
+        m_userinfo = p_base.getUserinfo();
+        m_host = p_base.getHost();
+        m_port = p_base.getPort();
+        m_path = p_base.getPath();
+
+        if (m_queryString == null)
+        {
+          m_queryString = p_base.getQueryString();
+        }
+
+        return;
+      }
+
+      // check for scheme - RFC 2396 5.2 #3
+      // if we found a scheme, it means absolute URI, so we're done
+      if (m_scheme == null)
+      {
+        m_scheme = p_base.getScheme();
+      }
+
+      // check for authority - RFC 2396 5.2 #4
+      // if we found a host, then we've got a network path, so we're done
+      if (m_host == null)
+      {
+        m_userinfo = p_base.getUserinfo();
+        m_host = p_base.getHost();
+        m_port = p_base.getPort();
+      }
+      else
+      {
+        return;
+      }
+
+      // check for absolute path - RFC 2396 5.2 #5
+      if (m_path.length() > 0 && m_path.startsWith("/"))
+      {
+        return;
+      }
+
+      // if we get to this point, we need to resolve relative path
+      // RFC 2396 5.2 #6
+      String path = new String();
+      String basePath = p_base.getPath();
+
+      // 6a - get all but the last segment of the base URI path
+      if (basePath != null)
+      {
+        int lastSlash = basePath.lastIndexOf('/');
+
+        if (lastSlash != -1)
+        {
+          path = basePath.substring(0, lastSlash + 1);
+        }
+      }
+
+      // 6b - append the relative URI path
+      path = path.concat(m_path);
+
+      // 6c - remove all "./" where "." is a complete path segment
+      index = -1;
+
+      while ((index = path.indexOf("/./")) != -1)
+      {
+        path = path.substring(0, index + 1).concat(path.substring(index + 3));
+      }
+
+      // 6d - remove "." if path ends with "." as a complete path segment
+      if (path.endsWith("/."))
+      {
+        path = path.substring(0, path.length() - 1);
+      }
+
+      // 6e - remove all "<segment>/../" where "<segment>" is a complete 
+      // path segment not equal to ".."
+      index = -1;
+
+      int segIndex = -1;
+      String tempString = null;
+
+      while ((index = path.indexOf("/../")) > 0)
+      {
+        tempString = path.substring(0, path.indexOf("/../"));
+        segIndex = tempString.lastIndexOf('/');
+
+        if (segIndex != -1)
+        {
+          if (!tempString.substring(segIndex++).equals(".."))
+          {
+            path = path.substring(0, segIndex).concat(path.substring(index
+                    + 4));
+          }
+        }
+      }
+
+      // 6f - remove ending "<segment>/.." where "<segment>" is a 
+      // complete path segment
+      if (path.endsWith("/.."))
+      {
+        tempString = path.substring(0, path.length() - 3);
+        segIndex = tempString.lastIndexOf('/');
+
+        if (segIndex != -1)
+        {
+          path = path.substring(0, segIndex + 1);
+        }
+      }
+
+      m_path = path;
+    }
+  }
+
+  /**
+   * Initialize the scheme for this URI from a URI string spec.
+   *
+   * @param p_uriSpec the URI specification (cannot be null)
+   *
+   * @throws MalformedURIException if URI does not have a conformant
+   *                                  scheme
+   */
+  private void initializeScheme(String p_uriSpec) throws MalformedURIException
+  {
+
+    int uriSpecLen = p_uriSpec.length();
+    int index = 0;
+    String scheme = null;
+    char testChar = '\0';
+
+    while (index < uriSpecLen)
+    {
+      testChar = p_uriSpec.charAt(index);
+
+      if (testChar == ':' || testChar == '/' || testChar == '?'
+              || testChar == '#')
+      {
+        break;
+      }
+
+      index++;
+    }
+
+    scheme = p_uriSpec.substring(0, index);
+
+    if (scheme.length() == 0)
+    {
+      throw new MalformedURIException(Utils.messages.createMessage(MsgKey.ER_NO_SCHEME_INURI, null)); //"No scheme found in URI.");
+    }
+    else
+    {
+      setScheme(scheme);
+    }
+  }
+
+  /**
+   * Initialize the authority (userinfo, host and port) for this
+   * URI from a URI string spec.
+   *
+   * @param p_uriSpec the URI specification (cannot be null)
+   *
+   * @throws MalformedURIException if p_uriSpec violates syntax rules
+   */
+  private void initializeAuthority(String p_uriSpec)
+          throws MalformedURIException
+  {
+
+    int index = 0;
+    int start = 0;
+    int end = p_uriSpec.length();
+    char testChar = '\0';
+    String userinfo = null;
+
+    // userinfo is everything up @
+    if (p_uriSpec.indexOf('@', start) != -1)
+    {
+      while (index < end)
+      {
+        testChar = p_uriSpec.charAt(index);
+
+        if (testChar == '@')
+        {
+          break;
+        }
+
+        index++;
+      }
+
+      userinfo = p_uriSpec.substring(start, index);
+
+      index++;
+    }
+
+    // host is everything up to ':'
+    String host = null;
+
+    start = index;
+
+    while (index < end)
+    {
+      testChar = p_uriSpec.charAt(index);
+
+      if (testChar == ':')
+      {
+        break;
+      }
+
+      index++;
+    }
+
+    host = p_uriSpec.substring(start, index);
+
+    int port = -1;
+
+    if (host.length() > 0)
+    {
+
+      // port
+      if (testChar == ':')
+      {
+        index++;
+
+        start = index;
+
+        while (index < end)
+        {
+          index++;
+        }
+
+        String portStr = p_uriSpec.substring(start, index);
+
+        if (portStr.length() > 0)
+        {
+          for (int i = 0; i < portStr.length(); i++)
+          {
+            if (!isDigit(portStr.charAt(i)))
+            {
+              throw new MalformedURIException(
+                portStr + " is invalid. Port should only contain digits!");
+            }
+          }
+
+          try
+          {
+            port = Integer.parseInt(portStr);
+          }
+          catch (NumberFormatException nfe)
+          {
+
+            // can't happen
+          }
+        }
+      }
+    }
+
+    setHost(host);
+    setPort(port);
+    setUserinfo(userinfo);
+  }
+
+  /**
+   * Initialize the path for this URI from a URI string spec.
+   *
+   * @param p_uriSpec the URI specification (cannot be null)
+   *
+   * @throws MalformedURIException if p_uriSpec violates syntax rules
+   */
+  private void initializePath(String p_uriSpec) throws MalformedURIException
+  {
+
+    if (p_uriSpec == null)
+    {
+      throw new MalformedURIException(
+        "Cannot initialize path from null string!");
+    }
+
+    int index = 0;
+    int start = 0;
+    int end = p_uriSpec.length();
+    char testChar = '\0';
+
+    // path - everything up to query string or fragment
+    while (index < end)
+    {
+      testChar = p_uriSpec.charAt(index);
+
+      if (testChar == '?' || testChar == '#')
+      {
+        break;
+      }
+
+      // check for valid escape sequence
+      if (testChar == '%')
+      {
+        if (index + 2 >= end ||!isHex(p_uriSpec.charAt(index + 1))
+                ||!isHex(p_uriSpec.charAt(index + 2)))
+        {
+          throw new MalformedURIException(
+            Utils.messages.createMessage(MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE, null)); //"Path contains invalid escape sequence!");
+        }
+      }
+      else if (!isReservedCharacter(testChar)
+               &&!isUnreservedCharacter(testChar))
+      {
+        if ('\\' != testChar)
+          throw new MalformedURIException(Utils.messages.createMessage(MsgKey.ER_PATH_INVALID_CHAR, new Object[]{String.valueOf(testChar)})); //"Path contains invalid character: "
+                                          //+ testChar);
+      }
+
+      index++;
+    }
+
+    m_path = p_uriSpec.substring(start, index);
+
+    // query - starts with ? and up to fragment or end
+    if (testChar == '?')
+    {
+      index++;
+
+      start = index;
+
+      while (index < end)
+      {
+        testChar = p_uriSpec.charAt(index);
+
+        if (testChar == '#')
+        {
+          break;
+        }
+
+        if (testChar == '%')
+        {
+          if (index + 2 >= end ||!isHex(p_uriSpec.charAt(index + 1))
+                  ||!isHex(p_uriSpec.charAt(index + 2)))
+          {
+            throw new MalformedURIException(
+              "Query string contains invalid escape sequence!");
+          }
+        }
+        else if (!isReservedCharacter(testChar)
+                 &&!isUnreservedCharacter(testChar))
+        {
+          throw new MalformedURIException(
+            "Query string contains invalid character:" + testChar);
+        }
+
+        index++;
+      }
+
+      m_queryString = p_uriSpec.substring(start, index);
+    }
+
+    // fragment - starts with #
+    if (testChar == '#')
+    {
+      index++;
+
+      start = index;
+
+      while (index < end)
+      {
+        testChar = p_uriSpec.charAt(index);
+
+        if (testChar == '%')
+        {
+          if (index + 2 >= end ||!isHex(p_uriSpec.charAt(index + 1))
+                  ||!isHex(p_uriSpec.charAt(index + 2)))
+          {
+            throw new MalformedURIException(
+              "Fragment contains invalid escape sequence!");
+          }
+        }
+        else if (!isReservedCharacter(testChar)
+                 &&!isUnreservedCharacter(testChar))
+        {
+          throw new MalformedURIException(
+            "Fragment contains invalid character:" + testChar);
+        }
+
+        index++;
+      }
+
+      m_fragment = p_uriSpec.substring(start, index);
+    }
+  }
+
+  /**
+   * Get the scheme for this URI.
+   *
+   * @return the scheme for this URI
+   */
+  public String getScheme()
+  {
+    return m_scheme;
+  }
+
+  /**
+   * Get the scheme-specific part for this URI (everything following the
+   * scheme and the first colon). See RFC 2396 Section 5.2 for spec.
+   *
+   * @return the scheme-specific part for this URI
+   */
+  public String getSchemeSpecificPart()
+  {
+
+    StringBuffer schemespec = new StringBuffer();
+
+    if (m_userinfo != null || m_host != null || m_port != -1)
+    {
+      schemespec.append("//");
+    }
+
+    if (m_userinfo != null)
+    {
+      schemespec.append(m_userinfo);
+      schemespec.append('@');
+    }
+
+    if (m_host != null)
+    {
+      schemespec.append(m_host);
+    }
+
+    if (m_port != -1)
+    {
+      schemespec.append(':');
+      schemespec.append(m_port);
+    }
+
+    if (m_path != null)
+    {
+      schemespec.append((m_path));
+    }
+
+    if (m_queryString != null)
+    {
+      schemespec.append('?');
+      schemespec.append(m_queryString);
+    }
+
+    if (m_fragment != null)
+    {
+      schemespec.append('#');
+      schemespec.append(m_fragment);
+    }
+
+    return schemespec.toString();
+  }
+
+  /**
+   * Get the userinfo for this URI.
+   *
+   * @return the userinfo for this URI (null if not specified).
+   */
+  public String getUserinfo()
+  {
+    return m_userinfo;
+  }
+
+  /**
+   * Get the host for this URI.
+   *
+   * @return the host for this URI (null if not specified).
+   */
+  public String getHost()
+  {
+    return m_host;
+  }
+
+  /**
+   * Get the port for this URI.
+   *
+   * @return the port for this URI (-1 if not specified).
+   */
+  public int getPort()
+  {
+    return m_port;
+  }
+
+  /**
+   * Get the path for this URI (optionally with the query string and
+   * fragment).
+   *
+   * @param p_includeQueryString if true (and query string is not null),
+   *                             then a "?" followed by the query string
+   *                             will be appended
+   * @param p_includeFragment if true (and fragment is not null),
+   *                             then a "#" followed by the fragment
+   *                             will be appended
+   *
+   * @return the path for this URI possibly including the query string
+   *         and fragment
+   */
+  public String getPath(boolean p_includeQueryString,
+                        boolean p_includeFragment)
+  {
+
+    StringBuffer pathString = new StringBuffer(m_path);
+
+    if (p_includeQueryString && m_queryString != null)
+    {
+      pathString.append('?');
+      pathString.append(m_queryString);
+    }
+
+    if (p_includeFragment && m_fragment != null)
+    {
+      pathString.append('#');
+      pathString.append(m_fragment);
+    }
+
+    return pathString.toString();
+  }
+
+  /**
+   * Get the path for this URI. Note that the value returned is the path
+   * only and does not include the query string or fragment.
+   *
+   * @return the path for this URI.
+   */
+  public String getPath()
+  {
+    return m_path;
+  }
+
+  /**
+   * Get the query string for this URI.
+   *
+   * @return the query string for this URI. Null is returned if there
+   *         was no "?" in the URI spec, empty string if there was a
+   *         "?" but no query string following it.
+   */
+  public String getQueryString()
+  {
+    return m_queryString;
+  }
+
+  /**
+   * Get the fragment for this URI.
+   *
+   * @return the fragment for this URI. Null is returned if there
+   *         was no "#" in the URI spec, empty string if there was a
+   *         "#" but no fragment following it.
+   */
+  public String getFragment()
+  {
+    return m_fragment;
+  }
+
+  /**
+   * Set the scheme for this URI. The scheme is converted to lowercase
+   * before it is set.
+   *
+   * @param p_scheme the scheme for this URI (cannot be null)
+   *
+   * @throws MalformedURIException if p_scheme is not a conformant
+   *                                  scheme name
+   */
+  public void setScheme(String p_scheme) throws MalformedURIException
+  {
+
+    if (p_scheme == null)
+    {
+      throw new MalformedURIException(Utils.messages.createMessage(MsgKey.ER_SCHEME_FROM_NULL_STRING, null)); //"Cannot set scheme from null string!");
+    }
+
+    if (!isConformantSchemeName(p_scheme))
+    {
+      throw new MalformedURIException(Utils.messages.createMessage(MsgKey.ER_SCHEME_NOT_CONFORMANT, null)); //"The scheme is not conformant.");
+    }
+
+    m_scheme = p_scheme.toLowerCase();
+  }
+
+  /**
+   * Set the userinfo for this URI. If a non-null value is passed in and
+   * the host value is null, then an exception is thrown.
+   *
+   * @param p_userinfo the userinfo for this URI
+   *
+   * @throws MalformedURIException if p_userinfo contains invalid
+   *                                  characters
+   */
+  public void setUserinfo(String p_userinfo) throws MalformedURIException
+  {
+
+    if (p_userinfo == null)
+    {
+      m_userinfo = null;
+    }
+    else
+    {
+      if (m_host == null)
+      {
+        throw new MalformedURIException(
+          "Userinfo cannot be set when host is null!");
+      }
+
+      // userinfo can contain alphanumerics, mark characters, escaped
+      // and ';',':','&','=','+','$',','
+      int index = 0;
+      int end = p_userinfo.length();
+      char testChar = '\0';
+
+      while (index < end)
+      {
+        testChar = p_userinfo.charAt(index);
+
+        if (testChar == '%')
+        {
+          if (index + 2 >= end ||!isHex(p_userinfo.charAt(index + 1))
+                  ||!isHex(p_userinfo.charAt(index + 2)))
+          {
+            throw new MalformedURIException(
+              "Userinfo contains invalid escape sequence!");
+          }
+        }
+        else if (!isUnreservedCharacter(testChar)
+                 && USERINFO_CHARACTERS.indexOf(testChar) == -1)
+        {
+          throw new MalformedURIException(
+            "Userinfo contains invalid character:" + testChar);
+        }
+
+        index++;
+      }
+    }
+
+    m_userinfo = p_userinfo;
+  }
+
+  /**
+   * Set the host for this URI. If null is passed in, the userinfo
+   * field is also set to null and the port is set to -1.
+   *
+   * @param p_host the host for this URI
+   *
+   * @throws MalformedURIException if p_host is not a valid IP
+   *                                  address or DNS hostname.
+   */
+  public void setHost(String p_host) throws MalformedURIException
+  {
+
+    if (p_host == null || p_host.trim().length() == 0)
+    {
+      m_host = p_host;
+      m_userinfo = null;
+      m_port = -1;
+    }
+    else if (!isWellFormedAddress(p_host))
+    {
+      throw new MalformedURIException(Utils.messages.createMessage(MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED, null)); //"Host is not a well formed address!");
+    }
+
+    m_host = p_host;
+  }
+
+  /**
+   * Set the port for this URI. -1 is used to indicate that the port is
+   * not specified, otherwise valid port numbers are  between 0 and 65535.
+   * If a valid port number is passed in and the host field is null,
+   * an exception is thrown.
+   *
+   * @param p_port the port number for this URI
+   *
+   * @throws MalformedURIException if p_port is not -1 and not a
+   *                                  valid port number
+   */
+  public void setPort(int p_port) throws MalformedURIException
+  {
+
+    if (p_port >= 0 && p_port <= 65535)
+    {
+      if (m_host == null)
+      {
+        throw new MalformedURIException(
+          Utils.messages.createMessage(MsgKey.ER_PORT_WHEN_HOST_NULL, null)); //"Port cannot be set when host is null!");
+      }
+    }
+    else if (p_port != -1)
+    {
+      throw new MalformedURIException(Utils.messages.createMessage(MsgKey.ER_INVALID_PORT, null)); //"Invalid port number!");
+    }
+
+    m_port = p_port;
+  }
+
+  /**
+   * Set the path for this URI. If the supplied path is null, then the
+   * query string and fragment are set to null as well. If the supplied
+   * path includes a query string and/or fragment, these fields will be
+   * parsed and set as well. Note that, for URIs following the "generic
+   * URI" syntax, the path specified should start with a slash.
+   * For URIs that do not follow the generic URI syntax, this method
+   * sets the scheme-specific part.
+   *
+   * @param p_path the path for this URI (may be null)
+   *
+   * @throws MalformedURIException if p_path contains invalid
+   *                                  characters
+   */
+  public void setPath(String p_path) throws MalformedURIException
+  {
+
+    if (p_path == null)
+    {
+      m_path = null;
+      m_queryString = null;
+      m_fragment = null;
+    }
+    else
+    {
+      initializePath(p_path);
+    }
+  }
+
+  /**
+   * Append to the end of the path of this URI. If the current path does
+   * not end in a slash and the path to be appended does not begin with
+   * a slash, a slash will be appended to the current path before the
+   * new segment is added. Also, if the current path ends in a slash
+   * and the new segment begins with a slash, the extra slash will be
+   * removed before the new segment is appended.
+   *
+   * @param p_addToPath the new segment to be added to the current path
+   *
+   * @throws MalformedURIException if p_addToPath contains syntax
+   *                                  errors
+   */
+  public void appendPath(String p_addToPath) throws MalformedURIException
+  {
+
+    if (p_addToPath == null || p_addToPath.trim().length() == 0)
+    {
+      return;
+    }
+
+    if (!isURIString(p_addToPath))
+    {
+      throw new MalformedURIException(Utils.messages.createMessage(MsgKey.ER_PATH_INVALID_CHAR, new Object[]{p_addToPath})); //"Path contains invalid character!");
+    }
+
+    if (m_path == null || m_path.trim().length() == 0)
+    {
+      if (p_addToPath.startsWith("/"))
+      {
+        m_path = p_addToPath;
+      }
+      else
+      {
+        m_path = "/" + p_addToPath;
+      }
+    }
+    else if (m_path.endsWith("/"))
+    {
+      if (p_addToPath.startsWith("/"))
+      {
+        m_path = m_path.concat(p_addToPath.substring(1));
+      }
+      else
+      {
+        m_path = m_path.concat(p_addToPath);
+      }
+    }
+    else
+    {
+      if (p_addToPath.startsWith("/"))
+      {
+        m_path = m_path.concat(p_addToPath);
+      }
+      else
+      {
+        m_path = m_path.concat("/" + p_addToPath);
+      }
+    }
+  }
+
+  /**
+   * Set the query string for this URI. A non-null value is valid only
+   * if this is an URI conforming to the generic URI syntax and
+   * the path value is not null.
+   *
+   * @param p_queryString the query string for this URI
+   *
+   * @throws MalformedURIException if p_queryString is not null and this
+   *                                  URI does not conform to the generic
+   *                                  URI syntax or if the path is null
+   */
+  public void setQueryString(String p_queryString)
+          throws MalformedURIException
+  {
+
+    if (p_queryString == null)
+    {
+      m_queryString = null;
+    }
+    else if (!isGenericURI())
+    {
+      throw new MalformedURIException(
+        "Query string can only be set for a generic URI!");
+    }
+    else if (getPath() == null)
+    {
+      throw new MalformedURIException(
+        "Query string cannot be set when path is null!");
+    }
+    else if (!isURIString(p_queryString))
+    {
+      throw new MalformedURIException(
+        "Query string contains invalid character!");
+    }
+    else
+    {
+      m_queryString = p_queryString;
+    }
+  }
+
+  /**
+   * Set the fragment for this URI. A non-null value is valid only
+   * if this is a URI conforming to the generic URI syntax and
+   * the path value is not null.
+   *
+   * @param p_fragment the fragment for this URI
+   *
+   * @throws MalformedURIException if p_fragment is not null and this
+   *                                  URI does not conform to the generic
+   *                                  URI syntax or if the path is null
+   */
+  public void setFragment(String p_fragment) throws MalformedURIException
+  {
+
+    if (p_fragment == null)
+    {
+      m_fragment = null;
+    }
+    else if (!isGenericURI())
+    {
+      throw new MalformedURIException(
+        Utils.messages.createMessage(MsgKey.ER_FRAG_FOR_GENERIC_URI, null)); //"Fragment can only be set for a generic URI!");
+    }
+    else if (getPath() == null)
+    {
+      throw new MalformedURIException(
+        Utils.messages.createMessage(MsgKey.ER_FRAG_WHEN_PATH_NULL, null)); //"Fragment cannot be set when path is null!");
+    }
+    else if (!isURIString(p_fragment))
+    {
+      throw new MalformedURIException(Utils.messages.createMessage(MsgKey.ER_FRAG_INVALID_CHAR, null)); //"Fragment contains invalid character!");
+    }
+    else
+    {
+      m_fragment = p_fragment;
+    }
+  }
+
+  /**
+   * Determines if the passed-in Object is equivalent to this URI.
+   *
+   * @param p_test the Object to test for equality.
+   *
+   * @return true if p_test is a URI with all values equal to this
+   *         URI, false otherwise
+   */
+  public boolean equals(Object p_test)
+  {
+
+    if (p_test instanceof URI)
+    {
+      URI testURI = (URI) p_test;
+
+      if (((m_scheme == null && testURI.m_scheme == null) || (m_scheme != null && testURI.m_scheme != null && m_scheme.equals(
+              testURI.m_scheme))) && ((m_userinfo == null && testURI.m_userinfo == null) || (m_userinfo != null && testURI.m_userinfo != null && m_userinfo.equals(
+              testURI.m_userinfo))) && ((m_host == null && testURI.m_host == null) || (m_host != null && testURI.m_host != null && m_host.equals(
+              testURI.m_host))) && m_port == testURI.m_port && ((m_path == null && testURI.m_path == null) || (m_path != null && testURI.m_path != null && m_path.equals(
+              testURI.m_path))) && ((m_queryString == null && testURI.m_queryString == null) || (m_queryString != null && testURI.m_queryString != null && m_queryString.equals(
+              testURI.m_queryString))) && ((m_fragment == null && testURI.m_fragment == null) || (m_fragment != null && testURI.m_fragment != null && m_fragment.equals(
+              testURI.m_fragment))))
+      {
+        return true;
+      }
+    }
+
+    return false;
+  }
+
+  /**
+   * Get the URI as a string specification. See RFC 2396 Section 5.2.
+   *
+   * @return the URI string specification
+   */
+  public String toString()
+  {
+
+    StringBuffer uriSpecString = new StringBuffer();
+
+    if (m_scheme != null)
+    {
+      uriSpecString.append(m_scheme);
+      uriSpecString.append(':');
+    }
+
+    uriSpecString.append(getSchemeSpecificPart());
+
+    return uriSpecString.toString();
+  }
+
+  /**
+   * Get the indicator as to whether this URI uses the "generic URI"
+   * syntax.
+   *
+   * @return true if this URI uses the "generic URI" syntax, false
+   *         otherwise
+   */
+  public boolean isGenericURI()
+  {
+
+    // presence of the host (whether valid or empty) means 
+    // double-slashes which means generic uri
+    return (m_host != null);
+  }
+
+  /**
+   * Determine whether a scheme conforms to the rules for a scheme name.
+   * A scheme is conformant if it starts with an alphanumeric, and
+   * contains only alphanumerics, '+','-' and '.'.
+   *
+   *
+   * @param p_scheme The sheme name to check
+   * @return true if the scheme is conformant, false otherwise
+   */
+  public static boolean isConformantSchemeName(String p_scheme)
+  {
+
+    if (p_scheme == null || p_scheme.trim().length() == 0)
+    {
+      return false;
+    }
+
+    if (!isAlpha(p_scheme.charAt(0)))
+    {
+      return false;
+    }
+
+    char testChar;
+
+    for (int i = 1; i < p_scheme.length(); i++)
+    {
+      testChar = p_scheme.charAt(i);
+
+      if (!isAlphanum(testChar) && SCHEME_CHARACTERS.indexOf(testChar) == -1)
+      {
+        return false;
+      }
+    }
+
+    return true;
+  }
+
+  /**
+   * Determine whether a string is syntactically capable of representing
+   * a valid IPv4 address or the domain name of a network host. A valid
+   * IPv4 address consists of four decimal digit groups separated by a
+   * '.'. A hostname consists of domain labels (each of which must
+   * begin and end with an alphanumeric but may contain '-') separated
+   * & by a '.'. See RFC 2396 Section 3.2.2.
+   *
+   *
+   * @param p_address The address string to check
+   * @return true if the string is a syntactically valid IPv4 address
+   *              or hostname
+   */
+  public static boolean isWellFormedAddress(String p_address)
+  {
+
+    if (p_address == null)
+    {
+      return false;
+    }
+
+    String address = p_address.trim();
+    int addrLength = address.length();
+
+    if (addrLength == 0 || addrLength > 255)
+    {
+      return false;
+    }
+
+    if (address.startsWith(".") || address.startsWith("-"))
+    {
+      return false;
+    }
+
+    // rightmost domain label starting with digit indicates IP address
+    // since top level domain label can only start with an alpha
+    // see RFC 2396 Section 3.2.2
+    int index = address.lastIndexOf('.');
+
+    if (address.endsWith("."))
+    {
+      index = address.substring(0, index).lastIndexOf('.');
+    }
+
+    if (index + 1 < addrLength && isDigit(p_address.charAt(index + 1)))
+    {
+      char testChar;
+      int numDots = 0;
+
+      // make sure that 1) we see only digits and dot separators, 2) that
+      // any dot separator is preceded and followed by a digit and 
+      // 3) that we find 3 dots
+      for (int i = 0; i < addrLength; i++)
+      {
+        testChar = address.charAt(i);
+
+        if (testChar == '.')
+        {
+          if (!isDigit(address.charAt(i - 1))
+                  || (i + 1 < addrLength &&!isDigit(address.charAt(i + 1))))
+          {
+            return false;
+          }
+
+          numDots++;
+        }
+        else if (!isDigit(testChar))
+        {
+          return false;
+        }
+      }
+
+      if (numDots != 3)
+      {
+        return false;
+      }
+    }
+    else
+    {
+
+      // domain labels can contain alphanumerics and '-"
+      // but must start and end with an alphanumeric
+      char testChar;
+
+      for (int i = 0; i < addrLength; i++)
+      {
+        testChar = address.charAt(i);
+
+        if (testChar == '.')
+        {
+          if (!isAlphanum(address.charAt(i - 1)))
+          {
+            return false;
+          }
+
+          if (i + 1 < addrLength &&!isAlphanum(address.charAt(i + 1)))
+          {
+            return false;
+          }
+        }
+        else if (!isAlphanum(testChar) && testChar != '-')
+        {
+          return false;
+        }
+      }
+    }
+
+    return true;
+  }
+
+  /**
+   * Determine whether a char is a digit.
+   *
+   *
+   * @param p_char the character to check
+   * @return true if the char is betweeen '0' and '9', false otherwise
+   */
+  private static boolean isDigit(char p_char)
+  {
+    return p_char >= '0' && p_char <= '9';
+  }
+
+  /**
+   * Determine whether a character is a hexadecimal character.
+   *
+   *
+   * @param p_char the character to check
+   * @return true if the char is betweeen '0' and '9', 'a' and 'f'
+   *         or 'A' and 'F', false otherwise
+   */
+  private static boolean isHex(char p_char)
+  {
+    return (isDigit(p_char) || (p_char >= 'a' && p_char <= 'f')
+            || (p_char >= 'A' && p_char <= 'F'));
+  }
+
+  /**
+   * Determine whether a char is an alphabetic character: a-z or A-Z
+   *
+   *
+   * @param p_char the character to check
+   * @return true if the char is alphabetic, false otherwise
+   */
+  private static boolean isAlpha(char p_char)
+  {
+    return ((p_char >= 'a' && p_char <= 'z')
+            || (p_char >= 'A' && p_char <= 'Z'));
+  }
+
+  /**
+   * Determine whether a char is an alphanumeric: 0-9, a-z or A-Z
+   *
+   *
+   * @param p_char the character to check
+   * @return true if the char is alphanumeric, false otherwise
+   */
+  private static boolean isAlphanum(char p_char)
+  {
+    return (isAlpha(p_char) || isDigit(p_char));
+  }
+
+  /**
+   * Determine whether a character is a reserved character:
+   * ';', '/', '?', ':', '@', '&', '=', '+', '$' or ','
+   *
+   *
+   * @param p_char the character to check
+   * @return true if the string contains any reserved characters
+   */
+  private static boolean isReservedCharacter(char p_char)
+  {
+    return RESERVED_CHARACTERS.indexOf(p_char) != -1;
+  }
+
+  /**
+   * Determine whether a char is an unreserved character.
+   *
+   *
+   * @param p_char the character to check
+   * @return true if the char is unreserved, false otherwise
+   */
+  private static boolean isUnreservedCharacter(char p_char)
+  {
+    return (isAlphanum(p_char) || MARK_CHARACTERS.indexOf(p_char) != -1);
+  }
+
+  /**
+   * Determine whether a given string contains only URI characters (also
+   * called "uric" in RFC 2396). uric consist of all reserved
+   * characters, unreserved characters and escaped characters.
+   *
+   *
+   * @param p_uric URI string
+   * @return true if the string is comprised of uric, false otherwise
+   */
+  private static boolean isURIString(String p_uric)
+  {
+
+    if (p_uric == null)
+    {
+      return false;
+    }
+
+    int end = p_uric.length();
+    char testChar = '\0';
+
+    for (int i = 0; i < end; i++)
+    {
+      testChar = p_uric.charAt(i);
+
+      if (testChar == '%')
+      {
+        if (i + 2 >= end ||!isHex(p_uric.charAt(i + 1))
+                ||!isHex(p_uric.charAt(i + 2)))
+        {
+          return false;
+        }
+        else
+        {
+          i += 2;
+
+          continue;
+        }
+      }
+
+      if (isReservedCharacter(testChar) || isUnreservedCharacter(testChar))
+      {
+        continue;
+      }
+      else
+      {
+        return false;
+      }
+    }
+
+    return true;
+  }
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/Utils.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/Utils.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/Utils.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,61 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 2003-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: Utils.java,v 1.1.2.1 2007/01/09 18:58:36 alexsmirnov Exp $
+ */
+package org.ajax4jsf.xml.serializer.utils;
+
+
+/**
+ * This class contains utilities used by the serializer.
+ * 
+ * This class is not a public API, it is only public because it is
+ * used by org.ajax4jsf.xml.serializer.
+ * 
+ * @xsl.usage internal
+ */
+public final class Utils
+{
+    /**
+     * A singleton Messages object is used to load the 
+     * given resource bundle just once, it is
+     * used by multiple transformations as long as the JVM stays up.
+     */
+    public static final org.ajax4jsf.xml.serializer.utils.Messages messages= 
+        new org.ajax4jsf.xml.serializer.utils.Messages(
+            "org.ajax4jsf.xml.serializer.utils.SerializerMessages");
+}

Added: branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/WrappedRuntimeException.java
===================================================================
--- branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/WrappedRuntimeException.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/utils/WrappedRuntimeException.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,100 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: WrappedRuntimeException.java,v 1.1.2.1 2007/01/09 18:58:34 alexsmirnov Exp $
+ */
+package org.ajax4jsf.xml.serializer.utils;
+
+/**
+ * This class is for throwing important checked exceptions
+ * over non-checked methods.  It should be used with care,
+ * and in limited circumstances.
+ * 
+ * This class is a copy of the one in org.apache.xml.utils. 
+ * It exists to cut the serializers dependancy on that package.
+ * 
+ * This class is not a public API, it is only public because it is
+ * used by org.ajax4jsf.xml.serializer.
+ * @xsl.usage internal
+ */
+public final class WrappedRuntimeException extends RuntimeException
+{
+    static final long serialVersionUID = 7140414456714658073L;
+
+  /** Primary checked exception.
+   *  @serial          */
+  private Exception m_exception;
+
+  /**
+   * Construct a WrappedRuntimeException from a
+   * checked exception.
+   *
+   * @param e Primary checked exception
+   */
+  public WrappedRuntimeException(Exception e)
+  {
+
+    super(e.getMessage());
+
+    m_exception = e;
+  }
+
+  /**
+   * Constructor WrappedRuntimeException
+   *
+   *
+   * @param msg Exception information.
+   * @param e Primary checked exception
+   */
+  public WrappedRuntimeException(String msg, Exception e)
+  {
+
+    super(msg);
+
+    m_exception = e;
+  }
+  
+  /**
+   * Get the checked exception that this runtime exception wraps.
+   *
+   * @return The primary checked exception
+   */
+  public Exception getException()
+  {
+    return m_exception;
+  }
+}

Added: branches/refactor1/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js
===================================================================
--- branches/refactor1/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,1196 @@
+// Global Variables
+// var timeout = null;
+
+// TODO - use sarissa for standard XMLHttpRequest Support.
+
+
+// AJAX-JSF AJAX-like library, for communicate with view Tree on server side.
+
+// Modified by Alexander J. Smirnov to use as JSF AJAX-like components. 
+
+A4J.AJAX = {};
+
+/**
+ * XMLHttp transport class - incapsulate most of client-specifiv functions for call server requests.
+ */
+A4J.AJAX.XMLHttpRequest = function(query){
+ 	this._query = query;
+ };
+
+A4J.AJAX.XMLHttpRequest.prototype = {
+	_query : null,
+	_timeout : 0,
+	_timeoutID : null,
+	onready : null,
+	_parsingStatus : Sarissa.PARSED_EMPTY,
+	_errorMessage : "XML Response object not set",
+	_contentType : null,
+	_onerror : function(req,status,message) {
+         // Status not 200 - error !!!! TODO - I18N ???
+         	window.alert(message);
+        },
+	onfinish : null,
+	options : {},
+	domEvt : null,
+	form : null,
+	_request : null,
+	_aborted : false,
+
+	setRequestTimeout : function(timeout){
+		this._timeout = timeout;
+	},
+	/**
+	 * Send request to server with parameters from query ( POST or GET depend on client type )
+	 */
+	send : function(){
+ 	this._request = new XMLHttpRequest();
+ 	var _this = this;
+ 	this._request.onreadystatechange =  function(){
+ 				if(_this._aborted){return;};
+          		LOG.debug("Reqest state : "+_this._request.readyState );
+		      	if (_this._request.readyState == 4  ) {
+          			LOG.debug("Reqest end with state 4");
+		      		if(_this._timeoutID){
+		      			window.clearTimeout(_this._timeoutID);
+		      		}
+		      		if(_this._request.status == 200){
+						try {
+            				LOG.debug("Response  with content-type: "+ _this.getResponseHeader('Content-Type'));
+			            	LOG.debug("Full response content: ", _this.getResponseText());
+						} catch(e) {
+				// IE Can throw exception for any responses
+						}
+		      			// Prepare XML, if exist.
+		      			if(_this._request.responseXML ){
+			      			_this._parsingStatus = Sarissa.getParseErrorText(_this._request.responseXML);
+			      			if(_this._parsingStatus == Sarissa.PARSED_OK && Sarissa.setXpathNamespaces ){
+			      				Sarissa.setXpathNamespaces(_this._request.responseXML,"xmlns='http://www.w3.org/1999/xhtml'");
+			      			}
+		      			}
+		      			if(_this.onready){
+		      				_this.onready(_this);
+		      			}
+		      		} else {
+		      			_this._errorMessage = "Reqest error, status : "+_this._request.status +" " + _this._request.statusText + "\n Message: " + _this.getResponseHeader("Ajax-Error-Message");
+		      			LOG.error(_this._errorMessage);
+		      			if(typeof(_this._onerror) == "function"){
+		      				_this._onerror(_this,_this._request.status,_this._errorMessage);
+		      			}
+		      		}
+		      		if(_this.onfinish){
+		      			_this.onfinish(_this);
+		      		}
+			      	_this = undefined;
+		      	}
+	}; //this._onReady;
+    try{
+    LOG.debug("Start XmlHttpRequest");
+    this._request.open('POST', this._query.getActionUrl("") , true);
+    // Query use utf-8 encoding for prepare urlencode data, force request content-type and charset.
+    var contentType = "application/x-www-form-urlencoded; charset=UTF-8";
+	this._request.setRequestHeader( "Content-Type", contentType); 
+    } catch(e){
+    	// Opera 7-8 - force get
+    	LOG.debug("XmlHttpRequest not support setRequestHeader - use GET instead of POST");
+    	this._request.open('GET', this._query.getActionUrl("")+"?"+this._query.getQueryString() , true);
+    }
+    // send data.
+    this._request.send(this._query.getQueryString());
+    if(this._timeout > 0){
+    	this._timeoutID = window.setTimeout(function(){
+   			LOG.warn("request stopped due to timeout");
+   			if(!_this._aborted){
+			    A4J.AJAX.status(_this.containerId,_this.options.status,false);
+		     if(typeof(A4J.AJAX.onAbort) == "function"){
+   				A4J.AJAX.onAbort(_this);
+		     }
+   			}
+			_this._aborted=true;
+    		_this._request.abort();
+    		if(_this._onerror){
+      			_this._errorMessage = "Request timeout";
+		    	_this._onerror(_this,500,_this._errorMessage);
+		    }
+      		if(_this.onfinish){
+      			_this.onfinish(_this);
+      		}
+		    _this._request=undefined;
+	      	_this = undefined;
+    	},this._timeout);
+    }
+	},
+	
+	abort: function(){
+   			if(!this._aborted){
+		     A4J.AJAX.status(this.containerId,this.options.status,false);
+		     if(typeof(A4J.AJAX.onAbort) == "function"){
+   				A4J.AJAX.onAbort(this);
+		     }
+   			}
+		this._aborted=true;
+		if(this._request){
+			try{
+				this._request.abort();
+				if(this._timeoutID){
+					window.clearTimeout(this._timeoutID);
+				}
+			} catch (e){
+				LOG.warn("Exception for abort current request "+e.Message);
+			}
+		}
+	},
+	getResponseText : function(){
+		return this._request.responseText;
+	},
+	getError : function(){
+		return this._errorMessage;
+	},
+	getParserStatus : function(){
+		return this._parsingStatus;
+	},
+	getContentType : function(){
+		if(!this._contentType){
+			var contentType = this.getResponseHeader('Content-Type');
+			if(contentType){
+				var i = contentType.indexOf(';');
+				if( i >= 0 ){
+					this._contentType = contentType.substring(0,i);
+				} else {
+					this._contentType = contentType;				
+				}
+			} else {
+				this._contentType="text/html";
+			}
+		}
+		return this._contentType;
+	},
+	getResponseHeader : function(name){
+		var result;
+		// Different behavior - for non-existing headers, Firefox throws exception,
+		// IE return "" , 
+		try{
+			result = this._request.getResponseHeader(name);
+			if(result === ""){
+				result = undefined;
+			}
+		} catch(e) {
+		}
+		if(!result){
+		// Header not exist or Opera <=8.0 error. Try to find <meta > tag with same name.
+			LOG.debug("Header "+name+" not found, search in <meta>");
+			if(this._parsingStatus == Sarissa.PARSED_OK){
+				var metas = this.getElementsByTagName("meta");
+				for(var i = 0; i < metas.length;i++){
+					var meta = metas[i];
+					LOG.debug("Find <meta name='"+meta.getAttribute('name')+"' content='"+meta.getAttribute('content')+"'>");
+					if(meta.getAttribute("name") == name){
+						result = meta.getAttribute("content");
+						break;
+					}
+				}
+			}
+			
+		}
+		return result;
+	},
+	/**
+	 * get elements with elementname in responseXML or, if present - in element.
+	 */
+	getElementsByTagName : function(elementname,element){
+		if(!element){
+			element = this._request.responseXML;
+		}
+		LOG.debug("search for elements by name '"+elementname+"' "+" in element "+element.nodeName);
+   		var elements; 
+	    try
+	    {
+	        elements = element.selectNodes(".//*[local-name()=\""+ 
+	                                           elementname +"\"]");
+			LOG.debug("selectNodes found "+elements.length);
+	    }
+	    catch (ex) {
+			elements = element.getElementsByTagName(elementname);
+			LOG.debug("getElementsByTagName found "+elements.length);	    	
+	    }
+//	    return document.getElementsByTagName(tagName);
+//		elements = element.getElementsByTagNameNS("http://www.w3.org/1999/xhtml",elementname);
+//		LOG.debug("getElementsByTagNameNS found "+elements.length);
+		return elements;
+	},
+	/**
+	 * Find element in response by ID. Since in IE response not validated, use selectSingleNode instead.
+	 */
+	getElementById : function(id){
+		// first attempt - .getElementById.
+		var oDoc = this._request.responseXML;
+    	if(typeof(oDoc.getElementById) != 'undefined') {
+			LOG.debug("call getElementById for id= "+id);
+    		return  oDoc.getElementById(id);
+    	} 
+    	else if(typeof(oDoc.selectSingleNode) != "undefined") {
+			LOG.debug("call selectSingleNode for id= "+id);
+    		return oDoc.selectSingleNode("//*[@id='"+id+"']"); /* XPATH istead of ID */
+    	}
+    	// nodeFromID not worked since XML validation disabled by
+    	// default for MS 
+    	else if(typeof(oDoc.nodeFromID) != "undefined") {
+			LOG.debug("call nodeFromID for id= "+id);
+    		return oDoc.nodeFromID(id);
+    	} 
+		LOG.error("No functions for getElementById found ");
+    	return null;
+		
+	},
+	
+	getJSON : function(id){
+		     	  	var data;
+        	  		var dataElement = this.getElementById(id);
+        	  		if(dataElement){
+        	  			try {
+        	  				data = Sarissa.getText(dataElement,true);
+        	  				data = window.eval('('+data+')');
+        	  			} catch(e){
+        	  				LOG.error("Error on parsing JSON data "+e.message,data);
+        	  			}
+        	  		}
+		return data;
+	},
+	
+	evalScripts : function(node){
+			var newscripts = this.getElementsByTagName("script",node);
+	        LOG.debug("Scripts in updated part count : " + newscripts.length);
+			if( newscripts.length > 0 ){
+		      window.setTimeout(function() {
+		        for (var i = 0; i < newscripts.length; i++){
+		          var newscript = Sarissa.getText( newscripts[i],true ) ; // TODO - Mozilla disable innerHTML in XML page ..."";
+	    	      try {
+	    		        LOG.debug("Evaluate script replaced area in document: ", newscript);
+    			  		if (window.execScript) {
+				      		window.execScript( newscript );
+    			  		} else {
+     	      				window.eval(newscript);
+    			  		}
+		        	  } catch(e){
+		          		LOG.error("ERROR Evaluate script:  Error name: " + e.name + e.message?". Error message: "+e.message:"");
+		          	  }
+			    }
+			    newscripts = null;
+			  },50);
+		    }
+		
+	},
+	/**
+	 * Update DOM element with given ID by element with same ID in parsed responseXML
+	 */
+	updatePagePart : function(id){
+		var newnode = this.getElementById(id);
+		if( ! newnode ) { LOG.error("New node for ID "+id+" is not present in response");return;}
+		var oldnode = window.document.getElementById(id);
+		if ( oldnode  ) {
+			var anchor = oldnode.parentNode ;
+    // need to check for firstChild due to opera 8 bug with hasChildNodes
+			Sarissa.clearChildNodes(oldnode);
+			if(oldnode.outerHTML){
+   		        LOG.debug("Replace content of node by outerHTML()");
+				oldnode.outerHTML = new XMLSerializer().serializeToString(newnode); 
+			} else {
+		    	var importednode ;
+	    		importednode = window.document.importNode(newnode, true);
+   		        LOG.debug("Replace content of node by replaceChild()");
+				anchor.replaceChild(importednode,oldnode);
+			} 
+	// re-execute all script fragments in imported subtree...
+	// TODO - opera 8 run scripts at replace content stage.
+			if(!A4J.AJAX._scriptEvaluated){
+				this.evalScripts(newnode);
+			}
+	        LOG.debug("Update part of page for Id: "+id + " successful");
+		} else {
+			LOG.warn("Node for replace by response with id "+id+" not found in document");
+		}
+		
+	},
+	
+	appendNewHeadElements : function(){
+        	  // Append scripts and styles to head, if not presented in page before.
+        	  this._appendNewElements("script","src",["type","language","charset"]);
+        	  this._appendNewElements("link","href",["type","rel","rev","media"]);		
+	}, 
+	
+	_appendNewElements : function(tag,href,attributes){
+		      var newscripts = this.getElementsByTagName(tag);
+        	  var oldscripts = document.getElementsByTagName(tag);
+        	  var head = document.getElementsByTagName("head")[0]||document.documentElement;
+        	  for(var i=0 ; i<newscripts.length;i++){
+        	  	 var element = newscripts[i];
+        	  	 var src = element.getAttribute(href);
+        	  	 if(src){
+        	  	 	var exist = false;
+        	  	 	LOG.debug("<"+tag+"> in response with src="+src);
+        	  				for(var j = 0 ; j < oldscripts.length; j++){
+        	  					if(this._noSessionHref(src) == this._noSessionHref(oldscripts[j].getAttribute(href))){
+        	  						LOG.debug("Such element exist in document");
+        	  						exist = true;
+        	  						break;
+        	  					}
+        	  				}
+        	  		 if(!exist){
+        	  		 	// var script = window.document.importNode(element,true); //
+        	  		 	var script = document.createElement(tag);
+        	  		 	script.setAttribute(href,src);
+        	  		 	for(var j = 0 ; j < attributes.length; j++){
+        	  		 		this._copyAttribute(element,script,attributes[j]);
+        	  		 	}
+        	  		 	LOG.debug("append element to document");
+        	  		 	head.appendChild(script);
+        	  		 }     	  	 	
+        	  	 }
+        	  }
+		
+	},
+	
+	_noSessionHref : function(href){
+		var cref = href;
+		if(href){
+		var sessionid = href.lastIndexOf(";jsessionid=");
+		if(sessionid>0){
+			cref = href.substring(0,sessionid);
+			var params = href.lastIndexOf("?");
+			if(params>sessionid){
+				cref=cref+href.substring(params);
+			}
+		}
+		}
+		return cref; 		
+	},
+	
+	_copyAttribute : function(src,dst,attr){
+		var value = src.getAttribute(attr);
+		if(value){
+			dst.setAttribute(attr,value);
+		}
+	}
+
+};
+// eventsQueues for ajax submit events.
+A4J.AJAX._eventsQueues={};
+  
+//Listeners should be notified
+A4J.AJAX.Listener = function(onafterajax){
+	this.onafterajax = onafterajax;
+};
+
+A4J.AJAX._listeners= [];
+A4J.AJAX.AddListener = function(listener){
+	A4J.AJAX._listeners.push(listener);	
+};
+A4J.AJAX.removeListeners = function(listener){
+	A4J.AJAX._listeners = [];	
+};
+// pollers timerId's
+A4J.AJAX._pollers = {};
+/*
+ * 
+ * 
+ */
+A4J.AJAX.Poll =  function( containerId, form, options ) {
+	A4J.AJAX.StopPoll(options.pollId);
+	options.onerror = function(){
+		// For error, re-submit request.
+		A4J.AJAX.Poll(containerId,form,options);
+	};
+	A4J.AJAX._pollers[options.pollId] = window.setTimeout(function(){
+		A4J.AJAX._pollers[options.pollId]=undefined;
+		if((typeof(options.onsubmit) == 'function') && (!options.onsubmit())){
+			// Onsubmit disable current poll, start next interval.
+			A4J.AJAX.Poll(containerId,form,options);			
+		} else {
+			A4J.AJAX.SubmitRequest(containerId,form,null,options);
+		}
+	},options.pollinterval);
+};
+
+A4J.AJAX.StopPoll =  function( Id ) {
+	if(A4J.AJAX._pollers[Id]){
+		window.clearTimeout(A4J.AJAX._pollers[Id]);
+		A4J.AJAX._pollers[Id] = undefined;
+	}
+};
+
+/*
+ * 
+ * 
+ */
+A4J.AJAX.Push =  function( containerId, form, options ) {
+	A4J.AJAX.StopPush(options.pushId);
+	options.onerror = function(){
+		// For error, re-submit request.
+		A4J.AJAX.Push(containerId,form,options);
+	};
+	A4J.AJAX._pollers[options.pushId] = window.setTimeout(function(){
+		var request = new XMLHttpRequest();
+		request.onreadystatechange =  function(){
+		      	if (request.readyState == 4  ) {
+		      		try {
+		      		if(request.status == 200){
+//		      			A4J.AJAX._pollers[options.pushId]=undefined;
+				        A4J.AJAX.SubmitRequest(containerId,form||options.dummyForm,null,options);
+		      		}
+		      		} catch(e){
+		      			// Network error.
+		      		}
+		      		// Re-send request.
+		      		A4J.AJAX.Push( containerId, form, options );
+		      		request=null;
+//					A4J.AJAX._pollers[options.pushId] = window.setTimeout(function(){
+//						A4J.AJAX.SendPush( request,options );
+//					},options.pushinterval);
+		      	}
+		}
+		A4J.AJAX.SendPush( request,options );
+	},options.pushinterval);
+};
+
+A4J.AJAX.SendPush =  function( request,options ) {
+	    var url = options.pushUrl || options.actionUrl;
+		request.open('HEAD', url , true);
+		request.setRequestHeader( "Ajax-Push-Key", options.pushId);
+		if(options.timeout){
+			request.setRequestHeader( "Timeout", options.timeout);			
+		}
+		request.send();	
+}
+
+A4J.AJAX.StopPush =  function( Id ) {
+	if(A4J.AJAX._pollers[Id]){
+		window.clearTimeout(A4J.AJAX._pollers[Id]);
+		A4J.AJAX._pollers[Id] = undefined;
+	}
+};
+
+
+
+A4J.AJAX.CloneObject =  function( obj, noFunctions ) {
+	var cloned = {};
+	for( var n in obj ){
+		if(noFunctions && typeof(evt[prop]) == 'function'){
+			continue;
+		}
+		cloned[n]=obj[n];
+	}
+	return cloned;
+}
+
+
+A4J.AJAX.SubmitForm =  function( containerId, form, options ) {
+	var opt = A4J.AJAX.CloneObject(options);
+	// Setup active control if form submitted by button.
+	if(A4J._formInput){
+		LOG.debug("Form submitted by button "+A4J._formInput.id);
+		opt.control = A4J._formInput;
+		A4J._formInput = null;
+		opt.submitByForm=true;
+	}
+	A4J.AJAX.Submit(containerId,form,null,opt);
+}
+  
+// Submit or put in queue request. It not full queues - framework perform waiting only one request to same queue, new events simple replace last.
+// If request for same queue already performed, replace with current parameters.
+A4J.AJAX.Submit =  function( containerId, form, evt , options ) {
+	var domEvt;
+	evt = evt || window.event || null;
+	if(evt){
+		// Create copy of event object, since most of properties undefined outside of event capture.
+		try {
+			domEvt = A4J.AJAX.CloneObject(evt,false);
+		} catch(e){
+			LOG.warn("Exception on clone event");
+		}
+		LOG.debug("Have Event "+domEvt+" with properties: target: "+domEvt.target+", srcElement: "+domEvt.srcElement+", type: "+domEvt.type);
+	}
+    if(options.eventsQueue){
+      var eventsQueue =  A4J.AJAX._eventsQueues[options.eventsQueue];
+       if( eventsQueue )   {
+       		 var eventsCount = eventsQueue.options.eventsCount||1;
+	         eventsQueue.wait=true;
+	         eventsQueue.containerId=containerId;
+	         eventsQueue.form=form;
+	         eventsQueue.domEvt=domEvt;
+	         eventsQueue.options=options;	         
+	         eventsQueue.options.eventsCount = eventsCount+1;
+	       if(options.ignoreDupResponses && eventsQueue.request){
+		        LOG.debug("Abort uncompleted request in queue "+options.eventsQueue);
+	       		eventsQueue.request.abort();
+	       		eventsQueue.request=false;
+	            eventsQueue.wait=false;
+       	        if( options.requestDelay ){
+		    		window.setTimeout(function() {
+		        	LOG.debug("End delay waiting, make request in queue "+options.eventsQueue);
+		    		A4J.AJAX.SubmiteventsQueue(A4J.AJAX._eventsQueues[options.eventsQueue]);
+		    		},options.requestDelay);
+	       			LOG.debug("Create new waiting for request in queue "+options.eventsQueue);
+	       			return;
+       	   		}
+	       } else {
+	         LOG.debug("Put new event to queue "+options.eventsQueue);
+	         return;
+	       }
+       } else {
+       	   var queue = { wait : false,  containerId : containerId , form : form, domEvt : domEvt, options : options};
+	       A4J.AJAX._eventsQueues[options.eventsQueue] = queue;
+       	   if( options.requestDelay ){
+		    window.setTimeout(function() {
+		        LOG.debug("End delay waiting, make request in queue "+options.eventsQueue);
+		    	A4J.AJAX.SubmiteventsQueue(A4J.AJAX._eventsQueues[options.eventsQueue]);
+		    },options.requestDelay);
+	       LOG.debug("Event occurs, create waiting for request in queue "+options.eventsQueue);
+	       return;
+       	   }
+       } 
+   }
+  A4J.AJAX.SubmitRequest( containerId, form, domEvt , options );
+};
+
+A4J.AJAX.SubmiteventsQueue =  function( eventsQueue ) {
+	// Clear wait flag to avoid resend same request.
+	 eventsQueue.wait=false;
+	 A4J.AJAX.SubmitRequest( eventsQueue.containerId, eventsQueue.form ,eventsQueue.domEvt , eventsQueue.options );	 
+};
+  // Main request submitting functions.
+  // parameters :
+  // form - HtmlForm object for submit.
+  // control - form element, called request, or, clientID for JSF view.
+  // affected - Array of ID's for DOM Objects, updated after request. Override
+  // list of updated areas in response.
+  // statusID - DOM id request status tags.
+  // oncomplete - function for call after complete request.
+A4J.AJAX.SubmitRequest =  function( containerId, formId ,domEvt , options ) {
+    // First - run onsubmit event for client-side validation.
+	LOG.debug("NEW AJAX REQUEST !!! with form :"+formId );
+//	var	form = A4J.AJAX.locateForm(event);
+	var form = window.document.getElementById(formId);
+	if( (!form || form.nodeName.toUpperCase() != "FORM") && domEvt ) {
+		var srcElement = domEvt.target||domEvt.srcElement||null;
+		if(srcElement){
+			form = A4J.AJAX.locateForm(srcElement);
+		};
+	};
+	// TODO - test for null of form object
+    if(!options.submitByForm && form && form.onsubmit) {
+		LOG.debug("Form have onsubmit function, call it" );
+    	if( form.onsubmit() == false ){
+    		return false;
+    	};
+    };
+    var tosend = new A4J.Query(containerId, form);
+    tosend.appendFormControls(options.single);
+    if(options.control){
+    	tosend.appendControl(options.control,true);
+    };
+    if(options.parameters){
+    	tosend.appendParameters(options.parameters);
+    }; 
+    if(options.eventsCount){
+    	tosend.appendParameter("AJAX:EVENTS_COUNT",options.eventsCount);
+    };
+    if(options.actionUrl){
+    	tosend.setActionUrl(options.actionUrl);
+    };
+    // build  xxxHttpRequest. by Sarissa / JSHttpRequest class always defined.
+    var req = new A4J.AJAX.XMLHttpRequest(tosend);
+    
+    req.options = options;
+    req.containerId = containerId;
+    req.domEvt = domEvt;
+    req.form = form;
+    if(options.timeout){
+    	req.setRequestTimeout(options.timeout);
+    };
+    
+    // Event handler for process response result.
+    req.onready = A4J.AJAX.processResponse;
+    
+    if(options.onerror){
+    	req._onerror = options.onerror;
+    } else if(typeof(A4J.AJAX.onError)== "function"){
+		req._onerror = A4J.AJAX.onError;
+    }
+	req.onfinish = A4J.AJAX.finishRequest;   
+
+    A4J.AJAX.status(containerId,options.status,true);
+    req.send();
+    if(options.eventsQueue){
+      var eventsQueue =  A4J.AJAX._eventsQueues[options.eventsQueue];
+       if( eventsQueue )   {
+       	  eventsQueue.request=req;
+       }
+    }
+    
+    return false;
+  };
+
+        
+
+A4J.AJAX.processResponse = function(req) {
+    	    var options = req.options;
+			var ajaxResponse = req.getResponseHeader('Ajax-Response');
+          	if( ajaxResponse != "true"){
+          	  	// NO Ajax header - new page.
+          	  	LOG.warn("No ajax response header ");
+         		var loc = req.getResponseHeader("Location");
+	         	try{
+	         		if(ajaxResponse == 'redirect' && loc){
+						var expiredMsg = req.getResponseHeader('Ajax-Expired');
+	         			if(expiredMsg){
+	         				loc = A4J.AJAX.onExpired(loc,expiredMsg);
+	         				if(!loc){
+	         					return;
+	         				}
+	         			} 
+	         			window.location = loc;
+	         		} else if(ajaxResponse == "reload"){
+       					window.location.reload(true);
+	         		} else {
+	         			var isIE = _SARISSA_IS_IE;
+						// maksimkaszynski
+						//Prevent "Permission denied in IE7"
+						//Reset calling principal
+						if (isIE) {
+							var oldDocOpen = window.document.open;
+							window.document.open = function() {
+								oldDocOpen.apply(this, arguments);
+							}
+						}
+						// /maksimkaszynski
+						window.setTimeout(function() {
+							var isDocOpen=false;
+							try {  	
+		          				window.document.open(req.getContentType(),true);
+		          				isDocOpen=true;
+		          				window.document.write(req.getResponseText());
+		          				window.document.close();
+	          				if(isIE){
+	          			// For Ie , scripts on page not activated.
+	          					window.location.reload(false);
+	          				}
+							} catch(e) {
+								if(isDocOpen){
+		          					window.document.close();
+								}
+								// Firefox/Mozilla in XHTML case don't support document.write()
+//								window.location = "data:"+req.getContentType()+";charset=utf-8," + encodeURIComponent(req.getResponseText())
+								// Use dom manipulation instead.
+								var	oDomDoc = (new DOMParser()).parseFromString(req.getResponseText(), "application/xhtml+xml");
+						    	var node = window.document.importNode(oDomDoc.documentElement, true);
+								window.document.replaceChild(node,window.document.documentElement);
+								// TODO - scripts reloading ?
+							}
+	          			},30);
+	         		}
+	         	} catch(e){
+	         		LOG.error("Error redirect to new location ");
+	         	}
+          	} else {
+			  if(req.getParserStatus() == Sarissa.PARSED_OK){
+				var idsFromResponse = req.getResponseHeader("Ajax-Update-Ids");
+        // 3 strategy for replace :
+        // if setted affected parameters - replace its
+        	  	if( options.affected ) {
+	        	  	req.appendNewHeadElements();
+					for ( var k =0; k < options.affected.length ; k++ ) {
+						LOG.debug("Update page part from call parameter for ID " + options.affected[k]);
+						req.updatePagePart(options.affected[k]);
+					};
+		// if resopnce contains element with ID "ajax:update" get id's from
+		// child text element . like :
+		// <div id="ajax:update" style="display none" >
+		//   <span>_id1:1234</span>
+		//    .........
+		// </div>
+		//
+        	  } else if( idsFromResponse != "" ) {
+				LOG.debug("Update page by list of rendered areas from response " + idsFromResponse );
+        	  // Append scripts and styles to head, if not presented in page before.
+        	  	req.appendNewHeadElements();
+				var childs = idsFromResponse.split(",");
+	        	for ( var k=0 ; k < childs.length ; k++ ) {
+	        		var id = childs[k];
+	        		LOG.debug("Attempt to update part of page for Id: "+id);
+					if ( id ) {req.updatePagePart(id);};
+				};
+        	  } else {
+        			// if none of above - error ?
+					// A4J.AJAX.replace(form.id,A4J.AJAX.findElement(form.id,xmlDoc));
+					LOG.warn("No information in response about elements to replace");
+        	  }
+        	  // Replace client-side hidden inputs for JSF View state.
+        	  var idsSpan = req.getElementById("ajax-update-ids");
+	          LOG.debug("Hidden JSF state fields: "+idsSpan);
+        	  if(idsSpan != null){
+        	  	// For a portal case, replace content in the current window only.
+			        var namespace = options.parameters['org.ajax4jsf.portlet.NAMESPACE'];
+			        LOG.debug("Namespace for hidden view-state input fields is "+namespace);
+			        var anchor = namespace?window.document.getElementById(namespace):window.document;        	  	    
+        	  		var inputs = anchor.getElementsByTagName("input");
+        	  		var newinputs = req.getElementsByTagName("input",idsSpan);
+        	  		A4J.AJAX.replaceViewState(inputs,newinputs);
+        	  		// For any cases, new state can be in uppercase element
+        	  		newinputs = req.getElementsByTagName("INPUT",idsSpan);
+        	  		A4J.AJAX.replaceViewState(inputs,newinputs);
+        	  }
+        	  // Process listeners.
+        	  for(var li = 0; li < A4J.AJAX._listeners.length; li++){
+        	  	var listener = A4J.AJAX._listeners[li];
+        	  	if(listener.onafterajax){
+        	  		// Evaluate data as JSON String.
+        	  		var data = req.getJSON('_ajax:data');
+        	  		listener.onafterajax(req,req.domEvt,data);
+        	  	}
+        	  }
+        	  // Set focus, if nessesary.
+        	  var focusId = req.getJSON("_A4J.AJAX.focus");
+        	  if(focusId){
+        	  	LOG.debug("focus must be set to control "+focusId);
+        	  	var focusElement=false;
+        	  	if(req.form){
+        	  		// Attempt to get form control for name. By Richfaces naming convensions, 
+        	  		// complex component must set clientId as DOM id for a root element ,
+        	  		// and as input element name.
+        	  		focusElement = req.form.elements[focusId];
+        	  	}
+        	  	if(!focusElement){
+        	  		// If not found as control element, search in DOM.
+        	  		LOG.debug("No control element "+focusId+" in submitted form");
+        	  		focusElement = document.getElementById(focusId);
+        	  	}
+        	  	if(focusElement){
+        	  		LOG.debug("Set focus to control ");
+        	  		focusElement.focus();
+        	  	} else {
+        	  		LOG.warn("Element for set focus not found");
+        	  	}
+        	  } else {
+        	  	LOG.debug("No focus information in response");        	  	
+        	  }
+           } else {
+           // No response XML
+   			LOG.error( "Error parsing XML" );
+			LOG.error("Parse Error: " + req.getParserStatus());
+           }
+          }
+         }; 
+         
+A4J.AJAX.onExpired = function(loc,expiredMsg){
+	if(window.confirm(expiredMsg)){
+		return loc;
+	} else {
+		return undefined;
+	}
+};
+         
+
+A4J.AJAX.replaceViewState = function(inputs,newinputs){
+	      	  		LOG.debug("Replace value for inputs: "+inputs.length + " by new values: "+ newinputs.length);
+        	  		if( (newinputs.length > 0) && (inputs.length > 0) ){
+        	  			for(var i = 0 ; i < newinputs.length; i++){
+        	  				var newinput = newinputs[i];
+        	  				LOG.debug("Input in response: "+newinput.getAttribute("name"));
+        	  				for(var j = 0 ; j < inputs.length; j++){
+        	  					var input = inputs[j];
+        	  					if(input.name == newinput.getAttribute("name")){
+	        	  				LOG.debug("Found same input on page with type: "+input.type);
+        	  						input.value = newinput.getAttribute("value");
+        	  					}
+        	  				}
+        	  			}
+        	  		}
+	
+};
+/**
+ * 
+ */
+A4J.AJAX.finishRequest = function(req){
+   	    var options = req.options;
+       // mark status object ( if any ) for complete request ;
+	     A4J.AJAX.status(req.containerId,options.status,false);
+	     // we can set listener for complete request - for example,
+	     // it can shedule next request for update page.
+	     if(options.oncomplete){
+   			LOG.debug( "Call request oncomplete function after processing updates" );
+   			window.setTimeout(function(){
+	     		options.oncomplete(req,req.domEvt,req.getJSON('_ajax:data'));},
+	     	50);
+	     	
+	      }
+	      // If we have events in queue - send next request.
+          if(options.eventsQueue){
+                var eventsQueue =  A4J.AJAX._eventsQueues[options.eventsQueue];
+                 if( eventsQueue  )   {
+              		A4J.AJAX._eventsQueues[options.eventsQueue]=false;
+           	    	if(eventsQueue.wait){
+	       				LOG.debug("Queue not empty, execute next request in queue "+options.eventsQueue);
+           	     		A4J.AJAX.SubmiteventsQueue(eventsQueue);
+           	   			}
+          		}
+          	}
+          };
+
+A4J.AJAX.getCursorPos =	function(inp){
+
+		   if(inp.selectionEnd != null)
+		     return inp.selectionEnd;
+		
+		   // IE specific code
+		   var range = document.selection.createRange();
+		   var isCollapsed = range.compareEndPoints("StartToEnd", range) == 0;
+		   if (!isCollapsed)
+		     range.collapse(false);
+		   var b = range.getBookmark();
+		   return b.charCodeAt(2) - 2;
+		}
+          
+	// Locate enclosing form for object.
+A4J.AJAX.locateForm = function(obj){
+		
+		var parent = obj;
+		 while(parent && parent.nodeName.toLowerCase() != 'form'){
+			parent = parent.parentNode;
+		};
+		return parent;
+	
+	};
+	
+A4J.AJAX.getElementById = function(id,options){
+	var namespace = options['org.ajax4jsf.portlet.NAMESPACE'];
+	var anchor = namespace?window.document.getElementById(namespace):window.document;
+	var element;
+	if(anchor){
+		element = anchor.getElementById(id);
+	} else {
+		LOG.error("No root element for portlet namespace "+namespace+" on page");
+	}
+	return element;
+}
+    
+    // hash for requests count for all ID's
+A4J.AJAX._requestsCounts = {};
+    // Change status object on start/stop request.
+    // on start, document object with targetID+".start" make visible,
+    // document object with targetID+".stop" make invisible.
+    // on stop - inverse.
+A4J.AJAX.status = function(regionID,targetID,start){
+	try {
+    	var elem;
+    	targetID = targetID || regionID +":status";
+	    A4J.AJAX._requestsCounts[targetID]=(A4J.AJAX._requestsCounts[targetID]||0)+(start?1:-1);
+	    if(A4J.AJAX._requestsCounts[targetID]>0){
+	    	elem = document.getElementById(targetID+".stop");
+	    	if(elem){elem.style.display="none";}
+	    	elem = document.getElementById(targetID+".start");
+	    	if(elem){
+	    		elem.style.display="";
+	    		if(typeof(elem.onstart) == 'function'){
+	    			elem.onstart();
+	    		}
+	    	}
+	    }else{
+	    	elem = document.getElementById(targetID+".start");
+	    	if(elem){elem.style.display="none";}
+	    	elem = document.getElementById(targetID+".stop");
+	    	if(elem){
+	    		elem.style.display="";
+	    		if(typeof(elem.onstop) == 'function'){
+	    			elem.onstop();
+	    		}
+	    	}
+	    }
+    } catch(e){
+    	LOG.error("Exception on status change: ");
+    }
+};
+    
+	
+
+  
+// Class for build query string.
+A4J.Query = function(containerId,form){ 
+	// For detect AJAX Request.
+	 this._query = {AJAXREQUEST : containerId};
+	 this._oldSubmit = null ;	
+	 this._form = form ;
+	 this._actionUrl = ( this._form.action)?this._form.action:this._form;
+	};
+
+A4J.Query.prototype = {
+	 _form : null,
+	 _actionUrl : null,
+	 _ext	: "",
+	 _query : {},
+	 _oldSubmit : null,
+ // init at loading time - script can change location at run time ? ...
+	 _pageBase : window.location.protocol+"//"+window.location.host,
+ // hash for control elements query string functions
+ 	 
+ 	 hidden : function(control){
+ 	 		this._value_query(control);
+ 	 		// TODO - configurable mask for hidden command scripts.
+ 	 		if( (control.name.length > 4) && (control.name.lastIndexOf("_idcl") ==  (control.name.length-5)) ){
+ 	 			control.value="";
+ 	 		// MYfaces version ...	
+ 	 		} else if( (control.name.length > 12) && (control.name.lastIndexOf("_link_hidden_") ==  (control.name.length-13)) ){
+ 	 			control.value="";
+ 	 		} 
+ 	 },
+ 	 
+ 	 text : function(control){
+ 	 		this._value_query(control);
+ 	 },
+
+ 	 textarea : function(control){
+ 	 		this._value_query(control);
+ 	 },
+
+ 	 'select-one' : function(control){
+ 	 	// If none options selected, don't include parameter.
+ 	 	if (control.selectedIndex != -1) {
+    		this._value_query(control);
+		} 
+//	 	 	for( var i =0; i< control.childNodes.length; i++ ){
+//	 	 		var child=control.childNodes[i];
+//	 	 		if( child.selected ){
+//		 	 		this._value_query(control); 		
+//		 	 		break;
+//	 	 		}
+//	 	 	}
+ 	 },
+
+ 	 password : function(control){
+ 	 		this._value_query(control);
+ 	 },
+
+ 	 file : function(control){
+ 	 		this._value_query(control);
+ 	 },
+
+ 	 radio : function(control){
+ 	 		this._check_query(control);
+ 	 },
+
+ 	 checkbox : function(control){
+ 	 		this._check_query(control);
+ 	 },
+
+ 	 
+ 	 'select-multiple' : function(control){
+ 		var cname = control.name;
+ 		var childs = control.childNodes;
+	 	for( var i=0 ;i< childs.length;i++ ){
+ 		  var child=childs[i];
+ 		  if( child.tagName == 'OPTGROUP' ){
+ 			var options = child.childNodes;
+			for(var j=0; j < options.length; j++){
+				this._addOption(cname, options[j]);
+			}
+ 		  } else {
+			this._addOption(cname, child);
+		  }
+ 		}
+ 	},
+ 	
+ 	_addOption : function(cname,option){
+		if ( option.selected ){
+			if( ! this._query[cname] ){
+				this._query[cname]=[];
+			}
+			this._query[cname][this._query[cname].length]=option.value;
+		}
+ 		
+ 	},
+// command inputs
+
+ 	 image : function( control, action ){ 	 	
+ 	 		if(action) this._value_query(control);
+ 	 },
+ 	 button : function( control, action ){ 	 	
+ 	 		if(action) this._value_query(control);
+ 	 },
+ 	 
+ 	 submit : function( control, action ){ 	 	
+ 	 		if(action) { 
+ 	 			this._value_query(control);
+ 	 		}
+ 	 },
+ 	 
+ 	 // Anchor link pseudo-control.
+ 	 link : function(control, action ){
+ 	 		if(action) {
+ 	 			this._value_query(control);
+ 	 			if(control.parameters){
+ 	 				this.appendParameters(control.parameters);
+ 	 			}
+ 	 		}
+ 	 },
+ 	 
+	// same as link, but have additional field - control, for input submit.
+ 	 input : function(control, action ){
+ 	 	if(action) {
+ 	 		this.link(control, action );
+ 	 		// append original control.
+			if( control.control ) {
+        		this.appendControl(control.control,action);
+        	}
+ 	 	}
+ 	 },
+ 	 
+	 // Append one control to query.
+	 appendControl : function(control,action){
+			if( this[control.type] ) {
+        		this[control.type](control,action);
+        	} else {
+        		this._appendById(control.id||control);
+          }
+	 
+	 },
+	 
+	 // Append all non-hidden controls from form to query.
+	 appendFormControls : function(hiddenOnly){
+	 	try {
+	 	 var elems = this._form.elements;
+	 	 if(elems){
+		 var k = 0;
+		   for ( k=0;k<elems.length;k++ ) {
+		          var element=elems[k];
+				  try {  
+				    if(  !hiddenOnly || element.type == "hidden") {
+		          		this.appendControl(element,false) ;
+		            }
+		   		  } catch( ee ) {
+			        	 LOG.error("exception in building query ( append form control ) " + ee );
+			      }
+		    }
+		  }
+	 	} catch(e) {
+	 		LOG.warn("Error with append form controls to query "+e)
+	 	}
+	 },
+
+	// append map of parameters to query.
+	 appendParameters : function(parameters){
+		for( k in parameters ){
+ 	 	  if(typeof Object.prototype[k] == 'undefined'){
+ 	 	    LOG.debug( "parameter " + k  + " with value "+parameters[k]);
+		  	this.appendParameter(k,parameters[k]);
+		  }
+		}	
+	 },
+	 
+	 setActionUrl : function(actionUrl){
+	 	this._actionUrl = actionUrl;
+	 },
+// Return action URL ( append extention, if present )
+ 	 getActionUrl : function( ext ) {
+ 	 	var actionUrl = this._actionUrl ;
+ 	 	var ask = actionUrl.indexOf('?');
+ 	 	// create absolute reference - for Firefox XMLHttpRequest base url can vary
+ 	 	if( actionUrl.substring(0,1) == '/' ) {
+ 	 		actionUrl = this._pageBase+actionUrl;
+ 	 	}
+ 	 	if ( ! ext ) ext = this._ext ;
+ 	 	if( ask >=0 )
+ 	 		{
+ 	 		return actionUrl.substring(0,ask) + ext + actionUrl.substring(ask); 	 		
+ 	 		}
+ 	 	else return actionUrl + ext;
+ 	 },
+ 	 
+ 	 
+// Build query string for send to server.
+ 	 getQueryString : function() {
+ 	 	var qs = "";
+ 	 	var iname ;
+ 	 	for ( var k in this._query ){
+ 	 	  if(typeof Object.prototype[k] == 'undefined'){
+ 	 		iname = this._query[k];
+ 	 		if( iname instanceof Object ){
+ 	 			for ( var l=0; l< iname.length; l++ ) {
+	 	 			qs += this._encode(k) + "=" + this._encode(iname[l]) + "&";
+	 	 		}
+ 	 		} else {
+ 	 			qs += this._encode(k) + "=" + this._encode(iname) + "&";
+ 	 		}
+ 	 	  }
+ 	 	}
+ 	 	LOG.debug("QueryString: "+qs);
+ 	 	return qs;
+ 	 },
+ 	 // private methods
+ 	 
+	 _appendById : function( id ) {
+	 	this.appendParameter(this._form.id + "_link_hidden_", id);
+	 	// JSF-ri version ...
+	 	// this._query[this._form.id + "_idcl"]=id;
+	 },
+	 
+
+ 	 _value_query : function(control){
+ 	 	LOG.debug("Append "+control.type+" control "+control.name+" with value ["+control.value+"] and value attribute ["+control.getAttribute('value')+"]");
+		if(null != control.value){
+	 	 	this.appendParameter(control.name, control.value);
+		}
+ 	 },
+ 	 
+ 	 _check_query : function(control){
+ 	 	if( control.checked ) {
+ 	 		this.appendParameter(control.name, control.value?control.value:"on");
+ 	 	}
+ 	 },
+ 	 
+ 	 // Append parameter to query. if name exist, append to array of parameters
+ 	 appendParameter: function(cname,value){
+ 	 			if( ! this._query[cname] ){
+ 	 				this._query[cname]=value;
+ 	 				return;
+ 	 			} else if( !(this._query[cname] instanceof Object) ){
+ 	 				this._query[cname] = [this._query[cname]];
+ 	 			}
+ 	 			this._query[cname][this._query[cname].length]=value;
+ 	 },
+ 	 
+    // Encode data string for request string
+    _encode : function(string) {
+	    try {
+	    	return encodeURIComponent(string);
+	    } catch(e) {
+	    var str = escape(string);
+	    // escape don't encode +. but form replace  ' ' in fields by '+'
+		return str.split('+').join('%2B');
+	    }
+    }
+ 	 
+ 	 
+  }
+  	
+// Test for re-evaluate Scripts in updated part. Opera & Safari do it.
+A4J.AJAX._scriptEvaluated=false;
+if (!document.all || window.opera){
+ setTimeout(function(){
+		try{
+			// Simulate same calls as on XmlHttp
+			var oDomDoc = Sarissa.getDomDocument();
+			var _span = document.createElement("span");
+			document.documentElement.appendChild(_span);
+			// If script evaluated with used replace method, variable will be set to true
+			var xmlString = "<html xmlns='http://www.w3.org/1999/xhtml'><sc"+"ript>A4J.AJAX._scriptEvaluated=true;</scr"+"ipt></html>";
+			oDomDoc = (new DOMParser()).parseFromString(xmlString, "text/xml");
+			var _script=oDomDoc.getElementsByTagName("script")[0];
+			if(_span.outerHTML){
+				_span.outerHTML = new XMLSerializer().serializeToString(_script); 
+			} else {
+		    	var importednode ;
+		   		importednode = window.document.importNode(_script, true);
+				document.documentElement.replaceChild(importednode,_span);
+			}
+			
+		} catch(e){ /* Mozilla in XHTML mode not have innerHTML */ };
+  },50);
+}

Added: branches/refactor1/framework/impl/src/main/javascript/ajaxjsf/epilog.js
===================================================================
--- branches/refactor1/framework/impl/src/main/javascript/ajaxjsf/epilog.js	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/javascript/ajaxjsf/epilog.js	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,4 @@
+/*
+* final trail for ajax jsf library
+*/
+// }
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/javascript/ajaxjsf/imagecache.js
===================================================================
--- branches/refactor1/framework/impl/src/main/javascript/ajaxjsf/imagecache.js	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/javascript/ajaxjsf/imagecache.js	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,13 @@
+if (!Exadel) var Exadel = {};
+
+Exadel.setImages =
+	function (element, images) {
+		element = $(element);
+		if (!element) return;
+		for(imageSrc in images){
+			if(typeof imageSrc != 'function'){
+				element[imageSrc] = new Image();
+				element[imageSrc].src = images[imageSrc];
+			}
+		}
+	}

Added: branches/refactor1/framework/impl/src/main/javascript/ajaxjsf/jsshell.js
===================================================================
--- branches/refactor1/framework/impl/src/main/javascript/ajaxjsf/jsshell.js	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/javascript/ajaxjsf/jsshell.js	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,7 @@
+// short bookmarklet
+// javascript:function loadScript(scriptURL) { var scriptElem = document.createElement('SCRIPT'); scriptElem.setAttribute('language', 'JavaScript'); scriptElem.setAttribute('src', scriptURL); document.body.appendChild(scriptElem);} loadScript('http://blog.monstuff.com/archives/images/jsshell.js');
+
+
+with(window.open("","_blank","width="+screen.width*.6+",left="+screen.width*.35+",height="+screen.height*.9+",resizable,scrollbars=yes")){document.write("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n\n<html onclick=\"keepFocusInTextbox(event)\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">\n<title>JavaScript Shell 1.4 modified to support IE</title>\n\n<script type=\"text/javascript\">\nvar \nhistList = [\"\"], \nhistPos = 0, \n_scope = {}, \n_win, // a top-level context\nquestion,\n_in,\n_out,\ntooManyMatches = null,\nlastError = null;\n\nfunction refocus()\n{\n  _in.blur(); // Needed for Mozilla to scroll correctly.\n  _in.focus();\n}\n\nfunction init()\n{\n  _in = document.getElementById(\"input\");\n  _out = document.getElementById(\"output\");\n\n  _win = window;\n\n  if (opener && !opener.closed)\n  {\n    println(\"Using bookmarklet version of shell: commands will run in opener!
 's context.\", \"message\");\n    _win = opener;\n  }\n\n  initTarget();\n\n  recalculateInputHeight();\n  refocus();\n}\n\nfunction initTarget()\n{\n  _win.Shell = window;\n  _win.print = shellCommands.print;\n}\n\n\n// Unless the user is selected something, refocus the textbox.\n// (requested by caillon, brendan, asa)\nfunction keepFocusInTextbox(e) \n{\n  var g = e.srcElement ? e.srcElement : e.target; // IE vs. standard\n  \n  while (!g.tagName)\n    g = g.parentNode;\n  var t = g.tagName.toUpperCase();\n  if (t==\"A\" || t==\"INPUT\")\n    return;\n    \n  if (window.getSelection) {\n    // Mozilla\n    if (String(window.getSelection()))\n      return;\n  }\n  else if (document.getSelection) {\n    // Opera? Netscape 4?\n    if (document.getSelection())\n      return;\n  }\n  else {\n    // IE\n    if ( document.selection.createRange().text )\n      return;\n  }\n  \n  refocus();\n}\n\nfunction inputKeydown(e) {\n  // Use onkeydown because IE doesn't support onkeypress!
  for arrow keys\n\n  //alert(e.keyCode + \" ^ \" + e.keycode);\n\n  if
 (e.shiftKey && e.keyCode == 13) { // shift-enter\n    // don't do anything; allow the shift-enter to insert a line break as normal\n  } else if (e.keyCode == 13) { // enter\n    // execute the input on enter\n    try { go(); } catch(er) { alert(er); };\n    setTimeout(function() { _in.value = \"\"; }, 0); // can't preventDefault on input, so clear it later\n  } else if (e.keyCode == 38) { // up\n    // go up in history if at top or ctrl-up\n    if (e.ctrlKey || caretInFirstLine(_in))\n      hist(true);\n  } else if (e.keyCode == 40) { // down\n    // go down in history if at end or ctrl-down\n    if (e.ctrlKey || caretInLastLine(_in))\n      hist(false);\n  } "+
+"else if(e.ctrlKey && e.keyCode == 32) { // ctrl-space\n    tabcomplete();\n    e.cancelBubble = false;\n    e.returnValue = false;\n    return false; }" +
+"else if (e.keyCode == 9) { // tab\n    tabcomplete();\n    setTimeout(function() { refocus(); }, 0); // refocus because tab was hit\n  } else { }\n\n  setTimeout(recalculateInputHeight, 0);\n  \n  //return true;\n};\n\nfunction caretInFirstLine(textbox)\n{\n  // IE doesn't support selectionStart/selectionEnd\n  if (textbox.selectionStart == undefined)\n    return true;\n\n  var firstLineBreak = textbox.value.indexOf(\"\\n\");\n  \n  return ((firstLineBreak == -1) || (textbox.selectionStart <= firstLineBreak));\n}\n\nfunction caretInLastLine(textbox)\n{\n  // IE doesn't support selectionStart/selectionEnd\n  if (textbox.selectionEnd == undefined)\n    return true;\n\n  var lastLineBreak = textbox.value.lastIndexOf(\"\\n\");\n  \n  return (textbox.selectionEnd > lastLineBreak);\n}\n\nfunction recalculateInputHeight()\n{\n  var rows = _in.value.split(/\\n/).length\n    + 1 // prevent scrollbar flickering in Mozilla\n    + (window.opera ? 1 : 0); // leave room for scrollbar in!
  Opera\n  \n  if (_in.rows != rows) // without this check, it is impossible to select text in Opera 7.60 or Opera 8.0.\n    _in.rows = rows;\n}\n\nfunction println(s, type)\n{\n  if((s=String(s)))\n  {\n    var newdiv = document.createElement(\"div\");\n    newdiv.appendChild(document.createTextNode(s));\n    newdiv.className = type;\n    _out.appendChild(newdiv);\n    return newdiv;\n  }\n}\n\nfunction printWithRunin(h, s, type)\n{\n  var div = println(s, type);\n  var head = document.createElement(\"strong\");\n  head.appendChild(document.createTextNode(h + \": \"));\n  div.insertBefore(head, div.firstChild);\n}\n\n\nvar shellCommands = \n{\nload : function load(url)\n{\n  var s = _win.document.createElement(\"script\");\n  s.type = \"text/javascript\";\n  s.src = url;\n  _win.document.getElementsByTagName(\"head\")[0].appendChild(s);\n  println(\"Loading \" + url + \"...\", \"message\");\n},\n\nclear : function clear()\n{\n  var CHILDREN_TO_PRESERVE = 3;\n  while (_out.c!
 hildNodes[CHILDREN_TO_PRESERVE]) \n    _out.removeChild(_out.childNode
s[CHILDREN_TO_PRESERVE]);\n},\n\nprint : function print(s) { println(s, \"print\"); },\n\n// the normal function, \"print\", shouldn't return a value\n// (suggested by brendan; later noticed it was a problem when showing others)\npr : function pr(s) \n{ \n  shellCommands.print(s); // need to specify shellCommands so it doesn't try window.print()!\n  return s;\n},\n\nprops : function props(e, onePerLine)\n{\n  if (e === null) {\n    println(\"props called with null argument\", \"error\");\n    return;\n  }\n\n  if (e === undefined) {\n    println(\"props called with undefined argument\", \"error\");\n    return;\n  }\n\n  var ns = [\"Methods\", \"Fields\", \"Unreachables\"];\n  var as = [[], [], []]; // array of (empty) arrays of arrays!\n  var p, j, i; // loop variables, several used multiple times\n\n  var protoLevels = 0;\n\n  for (p = e; p; p = p.__proto__)\n  {\n    for (i=0; i<ns.length; ++i)\n      as[i][protoLevels] = [];\n    ++protoLevels;\n  }\n\n  for(var a in e)\!
 n  {\n    // Shortcoming: doesn't check that VALUES are the same in object and prototype.\n\n    var protoLevel = -1;\n    try\n    {\n      for (p = e; p && (a in p); p = p.__proto__)\n        ++protoLevel;\n    }\n    catch(er) { protoLevel = 0; } // \"in\" operator throws when param to props() is a string\n\n    var type = 1;\n    try\n    {\n      if ((typeof e[a]) == \"function\")\n        type = 0;\n    }\n    catch (er) { type = 2; }\n\n    as[type][protoLevel].push(a);\n  }\n\n  function times(s, n) { return n ? s + times(s, n-1) : \"\"; }\n\n  for (j=0; j<protoLevels; ++j)\n    for (i=0;i<ns.length;++i)\n      if (as[i][j].length) \n        printWithRunin(\n          ns[i] + times(\" of prototype\", j), \n          (onePerLine ? \"\\n\\n\" : \"\") + as[i][j].sort().join(onePerLine ? \"\\n\" : \", \") + (onePerLine ? \"\\n\\n\" : \"\"), \n          \"propList\"\n        );\n},\n\nblink : function blink(node)\n{\n  if (!node)                     throw(\"blink: argume!
 nt is null or undefined.\");\n  if (node.nodeType == null)     throw(\
"blink: argument must be a node.\");\n  if (node.nodeType == 3)        throw(\"blink: argument must not be a text node\");\n  if (node.documentElement)      throw(\"blink: argument must not be the document object\");\n\n  function setOutline(o) { \n    return function() {\n      if (node.style.outline != node.style.bogusProperty) {\n        // browser supports outline (Firefox 1.1 and newer, CSS3, Opera 8).\n        node.style.outline = o;\n      }\n      else if (node.style.MozOutline != node.style.bogusProperty) {\n        // browser supports MozOutline (Firefox 1.0.x and older)\n        node.style.MozOutline = o;\n      }\n      else {\n        // browser only supports border (IE). border is a fallback because it moves things around.\n        node.style.border = o;\n      }\n    }\n  } \n  \n  function focusIt(a) {\n    return function() {\n      a.focus(); \n    }\n  }\n\n  if (node.ownerDocument) {\n    var windowToFocusNow = (node.ownerDocument.defaultView || node.owne!
 rDocument.parentWindow); // Moz vs. IE\n    if (windowToFocusNow)\n      setTimeout(focusIt(windowToFocusNow.top), 0);\n  }\n\n  for(var i=1;i<7;++i)\n    setTimeout(setOutline((i%252)?'3px solid red':'none'), i*100);\n\n  setTimeout(focusIt(window), 800);\n  setTimeout(focusIt(_in), 810);\n},\n\nscope : function scope(sc)\n{\n  if (!sc) sc = {};\n  _scope = sc;\n  println(\"Scope is now \" + sc + \".  If a variable is not found in this scope, window will also be searched.  New variables will still go on window.\", \"message\");\n},\n\nmathHelp : function mathHelp()\n{\n  printWithRunin(\"Math constants\", \"E, LN2, LN10, LOG2E, LOG10E, PI, SQRT1_2, SQRT2\", \"propList\");\n  printWithRunin(\"Math methods\", \"abs, acos, asin, atan, atan2, ceil, cos, exp, floor, log, max, min, pow, random, round, sin, sqrt, tan\", \"propList\");\n},\n\nans : undefined\n};\n\n\nfunction hist(up)\n{\n  // histList[0] = first command entered, [1] = second, etc.\n  // type something, press up -!
 -> thing typed is now in \"limbo\"\n  // (last item in histList) and s
hould be reachable by pressing \n  // down again.\n\n  var L = histList.length;\n\n  if (L == 1)\n    return;\n\n  if (up)\n  {\n    if (histPos == L-1)\n    {\n      // Save this entry in case the user hits the down key.\n      histList[histPos] = _in.value;\n    }\n\n    if (histPos > 0)\n    {\n      histPos--;\n      // Use a timeout to prevent up from moving cursor within new text\n      // Set to nothing first for the same reason\n      setTimeout(\n        function() {\n          _in.value = ''; \n          _in.value = histList[histPos];\n          var caretPos = _in.value.length;\n          if (_in.setSelectionRange) \n            _in.setSelectionRange(caretPos, caretPos);\n        },\n        0\n      );\n    }\n  } \n  else // down\n  {\n    if (histPos < L-1)\n    {\n      histPos++;\n      _in.value = histList[histPos];\n    }\n    else if (histPos == L-1)\n    {\n      // Already on the current entry: clear but save\n      if (_in.value)\n      {\n        histLi!
 st[histPos] = _in.value;\n        ++histPos;\n        _in.value = \"\";\n      }\n    }\n  }\n}\n\nfunction tabcomplete()\n{\n  /*\n   * Working backwards from s[from], find the spot\n   * where this expression starts.  It will scan\n   * until it hits a mismatched ( or a space,\n   * but it skips over quoted strings.\n   * If stopAtDot is true, stop at a '.'\n   */\n  function findbeginning(s, from, stopAtDot)\n  {\n    /*\n     *  Complicated function.\n     *\n     *  Return true if s[i] == q BUT ONLY IF\n     *  s[i-1] is not a backslash.\n     */\n    function equalButNotEscaped(s,i,q)\n    {\n      if(s.charAt(i) != q) // not equal go no further\n        return false;\n\n      if(i==0) // beginning of string\n        return true;\n\n      if(s.charAt(i-1) == '\\\\') // escaped?\n        return false;\n\n      return true;\n    }\n\n    var nparens = 0;\n    var i;\n    for(i=from; i>=0; i--)\n    {\n      if(s.charAt(i) == ' ')\n        break;\n\n      if(stopAtDot &&!
  s.charAt(i) == '.')\n        break;\n        \n      if(s.charAt(i) =
= ')')\n        nparens++;\n      else if(s.charAt(i) == '(')\n        nparens--;\n\n      if(nparens < 0)\n        break;\n\n      // skip quoted strings\n      if(s.charAt(i) == '\\'' || s.charAt(i) == '\\\"')\n      {\n        //dump(\"skipping quoted chars: \");\n        var quot = s.charAt(i);\n        i--;\n        while(i >= 0 && !equalButNotEscaped(s,i,quot)) {\n          //dump(s.charAt(i));\n          i--;\n        }\n        //dump(\"\\n\");\n      }\n    }\n    return i;\n  }\n\n  // XXX should be used more consistently (instead of using selectionStart/selectionEnd throughout code)\n  // XXX doesn't work in IE, even though it contains IE-specific code\n  function getcaretpos(inp)\n  {\n    if(inp.selectionEnd != null)\n      return inp.selectionEnd;\n      \n    var range = document.selection.createRange();\n    var isCollapsed = range.compareEndPoints(\"StartToEnd\", range) == 0;\n    if (!isCollapsed)\n        range.collapse(false);\n    var b = range.getBookma!
 rk();\n    return b.charCodeAt(2) - 2;  \n  }\n\n  function setselectionto(inp,pos)\n  {\n    if(inp.selectionStart) {\n      inp.selectionStart = inp.selectionEnd = pos;\n    }\n    else if(inp.createTextRange) {\n      var docrange = _win.Shell.document.selection.createRange();\n      var inprange = inp.createTextRange();\n      inprange.move('character',pos);\n      inprange.select();\n    }\n    else { // err...\n    /*\n      inp.select();\n      if(_win.Shell.document.getSelection())\n        _win.Shell.document.getSelection() = \"\";\n        */\n    }\n  }\n    // get position of cursor within the input box\n    var caret = getcaretpos(_in);\n\n    if(caret) {\n      //dump(\"----\\n\");\n      var dotpos, spacepos, complete, obj;\n      //dump(\"caret pos: \" + caret + \"\\n\");\n      // see if there's a dot before here\n      dotpos = findbeginning(_in.value, caret-1, true);\n      //dump(\"dot pos: \" + dotpos + \"\\n\");\n      if(dotpos == -1 || _in.value.char!
 At(dotpos) != '.') {\n        dotpos = caret;\n//dump(\"changed dot po
s: \" + dotpos + \"\\n\");\n      }\n\n      // look backwards for a non-variable-name character\n      spacepos = findbeginning(_in.value, dotpos-1, false);\n      //dump(\"space pos: \" + spacepos + \"\\n\");\n      // get the object we're trying to complete on\n      if(spacepos == dotpos || spacepos+1 == dotpos || dotpos == caret)\n      {\n        // try completing function args\n        if(_in.value.charAt(dotpos) == '(' ||\n (_in.value.charAt(spacepos) == '(' && (spacepos+1) == dotpos))\n        {\n          var fn,fname;\n  var from = (_in.value.charAt(dotpos) == '(') ? dotpos : spacepos;\n          spacepos = findbeginning(_in.value, from-1, false);\n\n          fname = _in.value.substr(spacepos+1,from-(spacepos+1));\n  //dump(\"fname: \" + fname + \"\\n\");\n          try {\n            with(_win.Shell._scope)\n              with(_win)\n                with(Shell.shellCommands)\n                  fn = eval(fname);\n          }\n          catch(er) {\n            //!
 dump('fn is not a valid object\\n');\n            return;\n          }\n          if(fn == undefined) {\n             //dump('fn is undefined');\n             return;\n          }\n          if(fn instanceof Function)\n          {\n            // Print function definition, including argument names, but not function body\n            if(!fn.toString().match(/function .+?\\(\\) +\\{\\n +\\[native code\\]\\n\\}/))\n              println(fn.toString().match(/function .+?\\(.*?\\)/), \"tabcomplete\");\n          }\n\n          return;\n        }\n        else\n          obj = _win;\n      }\n      else\n      {\n        var objname = _in.value.substr(spacepos+1,dotpos-(spacepos+1));\n        //dump(\"objname: |\" + objname + \"|\\n\");\n        try {\n          with(_win.Shell._scope)\n            with(_win)\n                obj = eval(objname);\n        }\n        catch(er) {\n          printError(er); \n          return;\n        }\n        if(obj == undefined) {\n          //!
  sometimes this is tabcomplete's fault, so don't print it :(\n        
  // e.g. completing from \"print(document.getElements\"\n          // println(\"Can't complete from null or undefined expression \" + objname, \"error\");\n          return;\n        }\n      }\n      //dump(\"obj: \" + obj + \"\\n\");\n      // get the thing we're trying to complete\n      if(dotpos == caret)\n      {\n        if(spacepos+1 == dotpos || spacepos == dotpos)\n        {\n          // nothing to complete\n          //dump(\"nothing to complete\\n\");\n          return;\n        }\n\n        complete = _in.value.substr(spacepos+1,dotpos-(spacepos+1));\n      }\n      else {\n        complete = _in.value.substr(dotpos+1,caret-(dotpos+1));\n      }\n      //dump(\"complete: \" + complete + \"\\n\");\n      // ok, now look at all the props/methods of this obj\n      // and find ones starting with 'complete'\n      var matches = [];\n      var bestmatch = null;\n      for(var a in obj)\n      {\n        //a = a.toString();\n        //XXX: making it lowercase could !
 help some cases,\n        // but screws up my general logic.\n        if(a.substr(0,complete.length) == complete) {\n          matches.push(a);\n          ////dump(\"match: \" + a + \"\\n\");\n          // if no best match, this is the best match\n          if(bestmatch == null)\n          {\n            bestmatch = a;\n          }\n          else {\n            // the best match is the longest common string\n            function min(a,b){ return ((a<b)?a:b); }\n            var i;\n            for(i=0; i< min(bestmatch.length, a.length); i++)\n            {\n              if(bestmatch.charAt(i) != a.charAt(i))\n                break;\n            }\n            bestmatch = bestmatch.substr(0,i);\n            ////dump(\"bestmatch len: \" + i + \"\\n\");\n          }\n          ////dump(\"bestmatch: \" + bestmatch + \"\\n\");\n        }\n      }\n      bestmatch = (bestmatch || \"\");\n      ////dump(\"matches: \" + matches + \"\\n\");\n      var objAndComplete = (objname || !
 obj) + \".\" + bestmatch;\n      //dump(\"matches.length: \" + matches
.length + \", tooManyMatches: \" + tooManyMatches + \", objAndComplete: \" + objAndComplete + \"\\n\");\n      if(matches.length > 1 && (tooManyMatches == objAndComplete || matches.length <= 10)) {\n\n        printWithRunin(\"Matches: \", matches.join(', '), \"tabcomplete\");\n        tooManyMatches = null;\n      }\n      else if(matches.length > 10)\n      {\n        println(matches.length + \" matches.  Press tab or ctrl-space again to see them all\", \"tabcomplete\");\n        tooManyMatches = objAndComplete;\n      }\n      else {\n        tooManyMatches = null;\n      }\n      if(bestmatch != \"\")\n      {\n        var sstart;\n        if(dotpos == caret) {\n          sstart = spacepos+1;\n        }\n        else {\n          sstart = dotpos+1;\n        }\n        _in.value = _in.value.substr(0, sstart)\n                  + bestmatch\n                  + _in.value.substr(caret);\n        setselectionto(_in,caret + (bestmatch.length - complete.length));\n      }\n    }!
 \n}\n\nfunction printQuestion(q)\n{\n  println(q, \"input\");\n}\n\nfunction printAnswer(a)\n{\n  if (a !== undefined) {\n    println(a, \"normalOutput\");\n    shellCommands.ans = a;\n  }\n}\n\nfunction printError(er)\n{ \n  var lineNumberString;\n\n  lastError = er; // for debugging the shell\n  if (er.name)\n  {\n    // lineNumberString should not be \"\", to avoid a very wacky bug in IE 6.\n    lineNumberString = (er.lineNumber != undefined) ? (\" on line \" + er.lineNumber + \": \") : \": \";\n    println(er.name + lineNumberString + er.message, \"error\"); // Because IE doesn't have error.toString.\n  }\n  else\n    println(er, \"error\"); // Because security errors in Moz /only/ have toString.\n}\n\nfunction go(s)\n{\n  _in.value = question = s ? s : _in.value;\n\n  if (question == \"\")\n    return;\n\n  histList[histList.length-1] = question;\n  histList[histList.length] = \"\";\n  histPos = histList.length - 1;\n  \n  // Unfortunately, this has to happen *before* !
 the JavaScript is run, so that \n  // print() output will go in the ri
ght place.\n  _in.value='';\n  recalculateInputHeight();\n  printQuestion(question);\n\n  if (_win.closed) {\n    printError(\"Target window has been closed.\");\n    return;\n  }\n  \n  try { (\"Shell\" in _win) }\n  catch(er) {\n    printError(\"The JavaScript Shell cannot access variables in the target window.  The most likely reason is that the target window now has a different page loaded and that page has a different hostname than the original page.\");\n    return;\n  }\n\n  if (!(\"Shell\" in _win))\n    initTarget(); // silent\n\n  // Evaluate Shell.question using _win's eval (this is why eval isn't in the |with|, IIRC).\n  _win.location.href = \"javascript:try{ Shell.printAnswer(eval('with(Shell._scope) with(Shell.shellCommands) {' + Shell.question + String.fromCharCode(10) + '}')); } catch(er) { Shell.printError(er); }; setTimeout(Shell.refocus, 0); void 0\";\n}\n\n</script>\n\n<!-- for http://ted.mielczarek.org/code/mozilla/extensiondev/ -->\n<script type=\"text/!
 javascript\" src=\"chrome://extensiondev/content/rdfhistory.js\"></script>\n<script type=\"text/javascript\" src=\"chrome://extensiondev/content/chromeShellExtras.js\"></script>\n\n<style type=\"text/css\">\nbody { background: white; color: black; }\n\n#output { white-space: pre; white-space: -moz-pre-wrap; } /* Preserve line breaks, but wrap too if browser supports it */\nh3 { margin-top: 0; margin-bottom: 0em; }\nh3 + div { margin: 0; }\n\nform { margin: 0; padding: 0; }\n#input { width: 100%; border: none; padding: 0; overflow: auto; }\n\n.input { color: blue; background: white; font: inherit; font-weight: bold; margin-top: .5em; /* background: #E6E6FF; */ }\n.normalOutput { color: black; background: white; }\n.print { color: brown; background: white; }\n.error { color: red; background: white; }\n.propList { color: green; background: white; }\n.message { color: green; background: white; }\n.tabcomplete { color: purple; background: white; }\n</style>\n</head>\n\n<body onl!
 oad=\"init()\">\n\n<div id=\"output\"><h3>JavaScript Shell 1.4</h3><h4
>Modified by <a href=\"http://blog.monstuff.com\">Julien Couvreur</a> to work in IE.</h4><div>Features: autocompletion of property names with Tab and Ctrl-Space, multiline input with Shift+Enter, input history with (Ctrl+) Up/Down, <a accesskey=\"M\" href=\"javascript:go('scope(Math); mathHelp();');\" title=\"Accesskey: M\">Math</a>, <a accesskey=\"H\" href=\"http://www.squarefree.com/shell/?ignoreReferrerFrom=shell1.4\"  title=\"Accesskey: H\">help</a></div><div>Values and functions: ans, print(string), <a accesskey=\"P\" href=\"javascript:go('props(ans)')\" title=\"Accesskey: P\">props(object)</a>, <a accesskey=\"B\" href=\"javascript:go('blink(ans)')\" title=\"Accesskey: B\">blink(node)</a>, <a accesskey=\"C\" href=\"javascript:go('clear()')\" title=\"Accesskey: C\">clear()</a>, load(scriptURL), scope(object)</div></div>\n\n<div><textarea id=\"input\" class=\"input\" wrap=\"off\" onkeydown=\"inputKeydown(event)\" rows=\"1\"></textarea></div>\n\n</body>\n\n</html>");docume!
 nt.close();}

Added: branches/refactor1/framework/impl/src/main/javascript/ajaxjsf/log4ajax.js
===================================================================
--- branches/refactor1/framework/impl/src/main/javascript/ajaxjsf/log4ajax.js	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/javascript/ajaxjsf/log4ajax.js	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,194 @@
+
+/**
+ * Provide client side logging capabilities to AJAX applications.
+ *
+ * @author <a href="mailto:thespiegs at users.sourceforge.net">Eric Spiegelberg</a>
+ * @see <a href="http://sourceforge.net/projects/log4ajax">Log4Ajax</a>
+ */
+ 
+function LOG()
+{
+  throw "Do not instantiate LOG";
+}
+
+LOG.Level = function(name, priority, color){
+	this.name = name;
+	this.priority = priority;
+	if(color){
+		this.color = color;
+	}
+}
+
+LOG.OFF = new LOG.Level("off", 1000);
+LOG.FATAL  = new LOG.Level("fatal", 900, "red");
+LOG.ERROR = new LOG.Level("error", 800, "red");
+LOG.WARN = new LOG.Level("warn", 500, "yellow");
+LOG.INFO = new LOG.Level("info", 400, "blue");
+LOG.DEBUG = new LOG.Level("debug", 300, "darkblue");
+LOG.ALL = new LOG.Level("all", 100);
+LOG.A4J_DEBUG = new LOG.Level("a4j_debug", 0, "green");
+
+LOG.LEVEL = LOG.OFF;
+
+LOG._window = null;
+LOG.transmitToServer = true;
+LOG.consoleDivId = "logConsole";
+LOG.styles = {
+a4j_debug: "green",
+debug : "darkblue",
+info : "blue",
+warn : "yellow",
+error : "red",
+fatal : "red"
+};
+
+LOG.a4j_debug = function(msg,pre)
+{
+	LOG._log(msg, LOG.A4J_DEBUG ,pre);
+}
+
+LOG.debug = function(msg,pre)
+{
+	LOG._log(msg, LOG.DEBUG ,pre);
+}
+
+LOG.info = function(msg,pre)
+{
+	LOG._log(msg, LOG.INFO ,pre);
+}
+
+LOG.warn = function(msg,pre)
+{
+	LOG._log(msg, LOG.WARN ,pre);
+}
+
+LOG.error = function(msg,pre)
+{
+	LOG._log(msg, LOG.ERROR ,pre);
+}
+
+LOG.fatal = function(msg,pre)
+{
+	LOG._log(msg, LOG.FATAL ,pre);
+}
+
+LOG.registerPopup = function(hotkey,name,width,height,level){
+	if(!LOG._onkeydown){
+		LOG._onkeydown = document.onkeydown;
+	}
+	var key = hotkey.toUpperCase();
+	document.onkeydown = function(e){
+		if (window.event){ e = window.event;};
+		if (String.fromCharCode(e.keyCode) == key & e.shiftKey & e.ctrlKey){ 
+			LOG.LEVEL = level;
+			LOG.openWindow(name,'width='+width+',height='+height+',toolbar=no,scrollbars=yes,location=no,statusbar=no,menubar=no,resizable=yes,left = '+((screen.width - width) / 2)+',top ='+((screen.height - height) / 2));
+		} else {
+	      if(LOG._onkeydown) LOG._onkeydown(e);
+		}; 
+	}
+}
+
+LOG.openWindow = function(name,features){
+	if(LOG._window){
+		LOG._window.focus();
+	} else {
+		LOG._window = window.open("",name,features);
+		var _LOG = LOG;
+		LOG._window.onunload = function(){
+			_LOG._window = null;
+			_LOG.LEVEL = _LOG.OFF;
+			_LOG=undefined;
+		}
+	}
+}
+
+LOG._log = function(msg, logLevel,pre)
+{
+	if(logLevel.priority >= LOG.LEVEL.priority){
+		LOG._logToConsole(msg, logLevel,pre);
+	
+		if (LOG.transmitToServer)
+		{
+			LOG._logToServer(msg, logLevel);
+		}
+	}
+}
+
+LOG._time = function(){
+	var currentTime = new Date();
+	var hours = currentTime.getHours();
+	var minutes = currentTime.getMinutes();
+	if (minutes < 10){
+		minutes = "0" + minutes;
+	}
+	var seconds = currentTime.getSeconds();
+	if (seconds < 10){
+		seconds = "0" + seconds;
+	}
+	var millisec = currentTime.getTime()%1000;
+	if(millisec<100){
+		millisec = "0"+millisec;
+	}
+	if(millisec<10){
+		millisec = "0"+millisec;
+	}
+	return hours+":"+minutes+":"+seconds+","+millisec;
+}
+
+LOG._logToConsole = function(msg, logLevel,preformat)
+{
+	var consoleDiv ;
+	var doc;
+	if(LOG._window && LOG._window.document){
+		doc = LOG._window.document;
+		consoleDiv = LOG._window.document.body;
+	} else {
+		doc = window.document;
+		consoleDiv = window.document.getElementById(LOG.consoleDivId);
+	}
+	if (consoleDiv)
+	{
+		var span = doc.createElement("span");
+		span.style.color=logLevel.color;
+		span.appendChild(doc.createTextNode(logLevel.name+"["+LOG._time()+"]: "));
+	 	var div = doc.createElement("div");
+   		var textnode = doc.createTextNode(msg);
+        div.appendChild(span);
+   		div.appendChild(textnode);
+   		// preformatted - for example, html
+   		if(preformat){
+		 	var pre = doc.createElement("span");
+   			textnode = doc.createTextNode(preformat);
+   			pre.appendChild(textnode);
+	   		div.appendChild(pre);
+   		}
+        consoleDiv.appendChild(div);
+/*	
+		consoleDiv.innerHTML = "<span style='" + LOG.styles[logLevel] + "'>" + 
+							   logLevel + "</span>: " + msg + "<br/>" + 
+							   consoleDiv.innerHTML;*/
+	}
+	else
+	{
+		// If the consoleDiv is not available, you could create a 
+		// new div or open a new window.
+	}
+}
+
+LOG._logToServer = function(msg, logLevel)
+{
+	var data = logLevel.name.substring(0, 1) + msg;
+	// TODO - use sarissa-enabled request.
+	// Use request.js to make an AJAX transmission to the server
+//	Http.get({
+//		url: "log",
+//		method: "POST",
+//		body: data,
+//		callback: LOG._requestCallBack
+//	});
+}
+
+LOG._requestCallBack = function()
+{
+	// Handle callback functionality here; if appropriate
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/javascript/ajaxjsf/prolog.js
===================================================================
--- branches/refactor1/framework/impl/src/main/javascript/ajaxjsf/prolog.js	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/javascript/ajaxjsf/prolog.js	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,6 @@
+/*
+ * Prolog for created Ajax4Jsf library
+ */
+if (!window.A4J) { window.A4J= {};}
+
+//if(window.A4J.AJAX && window.A4J.AJAX.XMLHttpRequest) return;

Added: branches/refactor1/framework/impl/src/main/javascript/ajaxjsf/request.js
===================================================================
--- branches/refactor1/framework/impl/src/main/javascript/ajaxjsf/request.js	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/javascript/ajaxjsf/request.js	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,199 @@
+/* 
+	XmlHttpRequest Wrapper
+	Version 1.2.2
+	29 Jul 2005 
+	adamv.com/dev/
+*/
+
+var Http = {
+	ReadyState: {
+		Uninitialized: 0,
+		Loading: 1,
+		Loaded:2,
+		Interactive:3,
+		Complete: 4
+	},
+		
+	Status: {
+		OK: 200,
+		
+		Created: 201,
+		Accepted: 202,
+		NoContent: 204,
+		
+		BadRequest: 400,
+		Forbidden: 403,
+		NotFound: 404,
+		Gone: 410,
+		
+		ServerError: 500
+	},
+		
+	Cache: {
+		Get: 1,
+		GetCache: 2,
+		GetNoCache: 3,
+		FromCache: 4
+	},
+	
+	Method: {Get: "GET", Post: "POST", Put: "PUT", Delete: "DELETE"},
+	
+	enabled: false,
+	logging: false,
+	_get: null,	// Reference to the XmlHttpRequest object
+	_cache: new Object(),
+	
+	Init: function(){
+		Http._get = Http._getXmlHttp()
+		Http.enabled = (Http._get != null)
+		Http.logging = (window.Logging != null);
+	},
+	
+	_getXmlHttp: function(){
+	/*@cc_on @*//*@if (@_jscript_version >= 5)
+		try { return new ActiveXObject("Msxml2.XMLHTTP"); } 
+		catch (e) {} 
+		try { return new ActiveXObject("Microsoft.XMLHTTP"); } 
+		catch (e) {} 
+	@end @*/
+		try { return new XMLHttpRequest();}
+		catch (e) {}
+
+		return null;
+	},
+
+/*
+	Params:
+		url: The URL to request. Required.
+		cache: Cache control. Defaults to Cache.Get.
+		callback: onreadystatechange function, called when request is completed. Optional.
+		method: HTTP method. Defaults to Method.Get.
+*/
+	get: function(params, callback_args){	
+	
+		if (!Http.enabled) throw "Http: XmlHttpRequest not available.";
+		
+		var url = params.url;
+		if (!url) throw "Http: A URL must be specified";
+				
+		var cache = params.cache || Http.Cache.Get;
+		var method = params.method || Http.Method.Get;
+		var callback = params.callback;
+		
+		if ((cache == Http.Cache.FromCache) || (cache == Http.Cache.GetCache))
+		{
+			var in_cache = Http.from_cache(url, callback, callback_args)
+
+			if (Http.logging){
+				Logging.log(["Http: URL in cache: " + in_cache]);
+			}
+
+			if (in_cache || (cache == Http.Cache.FromCache)) return in_cache;
+		}
+		
+		if (cache == Http.Cache.GetNoCache)
+		{
+			var sep = (-1 < url.indexOf("?")) ? "&" : "?"	
+			url = url + sep + "__=" + encodeURIComponent((new Date()).getTime());
+		}
+	
+		// Only one request at a time, please
+		if ((Http._get.readyState != Http.ReadyState.Uninitialized) && 
+			(Http._get.readyState != Http.ReadyState.Complete)){
+			this._get.abort();
+			
+			if (Http.logging){
+				Logging.log(["Http: Aborted request in progress."]);
+			}
+		}
+		
+		Http._get.open(method, url, true);
+
+		Http._get.onreadystatechange =  function() {
+			if (Http._get.readyState != Http.ReadyState.Complete) return;
+			
+			if (Http.logging){
+				Logging.log(["Http: Returned, status: " + Http._get.status]);
+			}
+
+			if ((cache == Http.Cache.GetCache) && (Http._get.status == Http.Status.OK)){
+				Http._cache[url] = Http._get.responseText;
+			}
+			
+			if (callback_args == null) callback_args = new Array();
+
+			var cb_params = new Array();
+			cb_params.push(Http._get);
+			for(var i=0;i<callback_args.length;i++)
+				cb_params.push(callback_args[i]);
+				
+			callback.apply(null, cb_params);
+		}
+		
+		if(Http.logging){
+			Logging.log(["Http: Started\n\tURL: " + url + "\n\tMethod: " + method + "; Cache: " + Hash.keyName(Http.Cache,cache)])
+		}
+		
+		Http._get.send(params.body || null);
+	},
+	
+	from_cache: function(url, callback, callback_args){
+		var result = Http._cache[url];
+		
+		if (result != null) {
+			var response = new Http.CachedResponse(result)
+			
+			var cb_params = new Array();
+			cb_params.push(response);
+			for(var i=0;i<callback_args.length;i++)
+				cb_params.push(callback_args[i]);
+							
+			callback.apply(null, cb_params);
+				
+			return true
+		}
+		else
+			return false
+	},
+	
+	clear_cache: function(){
+		Http._cache = new Object();
+	},
+	
+	is_cached: function(url){
+		return Http._cache[url]!=null;
+	},
+	
+	CachedResponse: function(response) {
+		this.readyState = Http.ReadyState.Complete
+		this.status = Http.Status.OK
+		this.responseText = response
+	}	
+}
+
+Http.Init()
+
+function json_response(response){
+	var js = response.responseText;
+	try{
+		return eval(js); 
+	} catch(e){
+		if (Http.logging){
+			Logging.logError(["json_response: " + e]);
+		}
+		else{
+			alert("Error: " + e + "\n" + js);
+		}
+		return null;
+	}
+}
+
+function getResponseProps(response, header){
+	try {
+		var s = response.getResponseHeader(header || 'X-Ajax-Props');
+		if (s==null || s=="")
+			return new Object()
+		else
+			return eval("o="+s)
+	} catch (e) { return new Object() }
+}

Added: branches/refactor1/framework/impl/src/main/javascript/ajaxjsf/sarissa.js
===================================================================
--- branches/refactor1/framework/impl/src/main/javascript/ajaxjsf/sarissa.js	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/javascript/ajaxjsf/sarissa.js	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,664 @@
+/**
+ * ====================================================================
+ * About
+ * ====================================================================
+ * Sarissa is an ECMAScript library acting as a cross-browser wrapper for native XML APIs.
+ * The library supports Gecko based browsers like Mozilla and Firefox,
+ * Internet Explorer (5.5+ with MSXML3.0+), Konqueror, Safari and a little of Opera
+ * @version ${project.version}
+ * @author: Manos Batsis, mailto: mbatsis at users full stop sourceforge full stop net
+ * ====================================================================
+ * Licence
+ * ====================================================================
+ * Sarissa is free software distributed under the GNU GPL version 2 (see <a href="gpl.txt">gpl.txt</a>) or higher, 
+ * GNU LGPL version 2.1 (see <a href="lgpl.txt">lgpl.txt</a>) or higher and Apache Software License 2.0 or higher 
+ * (see <a href="asl.txt">asl.txt</a>). This means you can choose one of the three and use that if you like. If 
+ * you make modifications under the ASL, i would appreciate it if you submitted those.
+ * In case your copy of Sarissa does not include the license texts, you may find
+ * them online in various formats at <a href="http://www.gnu.org">http://www.gnu.org</a> and 
+ * <a href="http://www.apache.org">http://www.apache.org</a>.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY 
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 
+ * WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE 
+ * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+/**
+ * <p>Sarissa is a utility class. Provides "static" methods for DOMDocument, 
+ * DOM Node serialization to XML strings and other utility goodies.</p>
+ * @constructor
+ */
+function Sarissa(){};
+Sarissa.VERSION = "${project.version}";
+Sarissa.PARSED_OK = "Document contains no parsing errors";
+Sarissa.PARSED_EMPTY = "Document is empty";
+Sarissa.PARSED_UNKNOWN_ERROR = "Not well-formed or other error";
+Sarissa.IS_ENABLED_TRANSFORM_NODE = false;
+var _sarissa_iNsCounter = 0;
+var _SARISSA_IEPREFIX4XSLPARAM = "";
+var _SARISSA_HAS_DOM_IMPLEMENTATION = document.implementation && true;
+var _SARISSA_HAS_DOM_CREATE_DOCUMENT = _SARISSA_HAS_DOM_IMPLEMENTATION && document.implementation.createDocument;
+var _SARISSA_HAS_DOM_FEATURE = _SARISSA_HAS_DOM_IMPLEMENTATION && document.implementation.hasFeature;
+var _SARISSA_IS_MOZ = _SARISSA_HAS_DOM_CREATE_DOCUMENT && _SARISSA_HAS_DOM_FEATURE;
+var _SARISSA_IS_SAFARI = (navigator.userAgent && navigator.vendor && (navigator.userAgent.toLowerCase().indexOf("applewebkit") != -1 || navigator.vendor.indexOf("Apple") != -1));
+var _SARISSA_IS_IE = document.all && window.ActiveXObject && navigator.userAgent.toLowerCase().indexOf("msie") > -1  && navigator.userAgent.toLowerCase().indexOf("opera") == -1;
+if(!window.Node || !Node.ELEMENT_NODE){
+    Node = {ELEMENT_NODE: 1, ATTRIBUTE_NODE: 2, TEXT_NODE: 3, CDATA_SECTION_NODE: 4, ENTITY_REFERENCE_NODE: 5,  ENTITY_NODE: 6, PROCESSING_INSTRUCTION_NODE: 7, COMMENT_NODE: 8, DOCUMENT_NODE: 9, DOCUMENT_TYPE_NODE: 10, DOCUMENT_FRAGMENT_NODE: 11, NOTATION_NODE: 12};
+};
+
+if(typeof XMLDocument == "undefined" && typeof Document !="undefined"){ XMLDocument = Document; } 
+
+// IE initialization
+if(_SARISSA_IS_IE){
+    // for XSLT parameter names, prefix needed by IE
+    _SARISSA_IEPREFIX4XSLPARAM = "xsl:";
+    // used to store the most recent ProgID available out of the above
+    var _SARISSA_DOM_PROGID = "";
+    var _SARISSA_XMLHTTP_PROGID = "";
+    var _SARISSA_DOM_XMLWRITER = "";
+    /**
+     * Called when the Sarissa_xx.js file is parsed, to pick most recent
+     * ProgIDs for IE, then gets destroyed.
+     * @private
+     * @param idList an array of MSXML PROGIDs from which the most recent will be picked for a given object
+     * @param enabledList an array of arrays where each array has two items; the index of the PROGID for which a certain feature is enabled
+     */
+    Sarissa.pickRecentProgID = function (idList){
+        // found progID flag
+        var bFound = false;
+        for(var i=0; i < idList.length && !bFound; i++){
+            try{
+                var oDoc = new ActiveXObject(idList[i]);
+                o2Store = idList[i];
+                bFound = true;
+            }catch (objException){
+                // trap; try next progID
+            };
+        };
+        if (!bFound) {
+            throw "Could not retreive a valid progID of Class: " + idList[idList.length-1]+". (original exception: "+e+")";
+        };
+        idList = null;
+        return o2Store;
+    };
+    // pick best available MSXML progIDs
+    _SARISSA_DOM_PROGID = null;
+    _SARISSA_THREADEDDOM_PROGID = null;
+    _SARISSA_XSLTEMPLATE_PROGID = null;
+    _SARISSA_XMLHTTP_PROGID = null;
+    if(!window.XMLHttpRequest){
+        /**
+         * Emulate XMLHttpRequest
+         * @constructor
+         */
+        XMLHttpRequest = function() {
+            if(!_SARISSA_XMLHTTP_PROGID){
+                _SARISSA_XMLHTTP_PROGID = Sarissa.pickRecentProgID(["Msxml2.XMLHTTP.6.0", "MSXML2.XMLHTTP.3.0", "MSXML2.XMLHTTP", "Microsoft.XMLHTTP"]);
+            };
+            return new ActiveXObject(_SARISSA_XMLHTTP_PROGID);
+        };
+    };
+    // we dont need this anymore
+    //============================================
+    // Factory methods (IE)
+    //============================================
+    // see non-IE version
+    Sarissa.getDomDocument = function(sUri, sName){
+        if(!_SARISSA_DOM_PROGID){
+            _SARISSA_DOM_PROGID = Sarissa.pickRecentProgID(["Msxml2.DOMDocument.6.0", "Msxml2.DOMDocument.3.0", "MSXML2.DOMDocument", "MSXML.DOMDocument", "Microsoft.XMLDOM"]);
+        };
+        var oDoc = new ActiveXObject(_SARISSA_DOM_PROGID);
+        // if a root tag name was provided, we need to load it in the DOM object
+        if (sName){
+            // create an artifical namespace prefix 
+            // or reuse existing prefix if applicable
+            var prefix = "";
+            if(sUri){
+                if(sName.indexOf(":") > 1){
+                    prefix = sName.substring(0, sName.indexOf(":"));
+                    sName = sName.substring(sName.indexOf(":")+1); 
+                }else{
+                    prefix = "a" + (_sarissa_iNsCounter++);
+                };
+            };
+            // use namespaces if a namespace URI exists
+            if(sUri){
+                oDoc.loadXML('<' + prefix+':'+sName + " xmlns:" + prefix + "=\"" + sUri + "\"" + " />");
+            } else {
+                oDoc.loadXML('<' + sName + " />");
+            };
+        };
+        return oDoc;
+    };
+    // see non-IE version   
+    Sarissa.getParseErrorText = function (oDoc) {
+        var parseErrorText = Sarissa.PARSED_OK;
+        if(oDoc && oDoc.parseError && oDoc.parseError.errorCode && oDoc.parseError.errorCode != 0){
+            parseErrorText = "XML Parsing Error: " + oDoc.parseError.reason + 
+                "\nLocation: " + oDoc.parseError.url + 
+                "\nLine Number " + oDoc.parseError.line + ", Column " + 
+                oDoc.parseError.linepos + 
+                ":\n" + oDoc.parseError.srcText +
+                "\n";
+            for(var i = 0;  i < oDoc.parseError.linepos;i++){
+                parseErrorText += "-";
+            };
+            parseErrorText +=  "^\n";
+        }
+        else if(oDoc.documentElement == null){
+            parseErrorText = Sarissa.PARSED_EMPTY;
+        };
+        return parseErrorText;
+    };
+    // see non-IE version
+    Sarissa.setXpathNamespaces = function(oDoc, sNsSet) {
+        oDoc.setProperty("SelectionLanguage", "XPath");
+        oDoc.setProperty("SelectionNamespaces", sNsSet);
+    };   
+    /**
+     * Basic implementation of Mozilla's XSLTProcessor for IE. 
+     * Reuses the same XSLT stylesheet for multiple transforms
+     * @constructor
+     */
+    XSLTProcessor = function(){
+        if(!_SARISSA_XSLTEMPLATE_PROGID){
+            _SARISSA_XSLTEMPLATE_PROGID = Sarissa.pickRecentProgID(["Msxml2.XSLTemplate.6.0", "MSXML2.XSLTemplate.3.0"]);
+        };
+        this.template = new ActiveXObject(_SARISSA_XSLTEMPLATE_PROGID);
+        this.processor = null;
+    };
+    /**
+     * Imports the given XSLT DOM and compiles it to a reusable transform
+     * <b>Note:</b> If the stylesheet was loaded from a URL and contains xsl:import or xsl:include elements,it will be reloaded to resolve those
+     * @argument xslDoc The XSLT DOMDocument to import
+     */
+    XSLTProcessor.prototype.importStylesheet = function(xslDoc){
+        if(!_SARISSA_THREADEDDOM_PROGID){
+            _SARISSA_THREADEDDOM_PROGID = Sarissa.pickRecentProgID(["MSXML2.FreeThreadedDOMDocument.6.0", "MSXML2.FreeThreadedDOMDocument.3.0"]);
+        };
+        xslDoc.setProperty("SelectionLanguage", "XPath");
+        xslDoc.setProperty("SelectionNamespaces", "xmlns:xsl='http://www.w3.org/1999/XSL/Transform'");
+        // convert stylesheet to free threaded
+        var converted = new ActiveXObject(_SARISSA_THREADEDDOM_PROGID);
+        // make included/imported stylesheets work if exist and xsl was originally loaded from url
+        if(xslDoc.url && xslDoc.selectSingleNode("//xsl:*[local-name() = 'import' or local-name() = 'include']") != null){
+            converted.async = false;
+            if (_SARISSA_THREADEDDOM_PROGID == "MSXML2.FreeThreadedDOMDocument.6.0") { 
+                converted.setProperty("AllowDocumentFunction", true); 
+                converted.resolveExternals = true; 
+            }
+            converted.load(xslDoc.url);
+        } else {
+            converted.loadXML(xslDoc.xml);
+        };
+        converted.setProperty("SelectionNamespaces", "xmlns:xsl='http://www.w3.org/1999/XSL/Transform'");
+        var output = converted.selectSingleNode("//xsl:output");
+        this.outputMethod = output ? output.getAttribute("method") : "html";
+        this.template.stylesheet = converted;
+        this.processor = this.template.createProcessor();
+        // for getParameter and clearParameters
+        this.paramsSet = new Array();
+    };
+
+    /**
+     * Transform the given XML DOM and return the transformation result as a new DOM document
+     * @argument sourceDoc The XML DOMDocument to transform
+     * @return The transformation result as a DOM Document
+     */
+    XSLTProcessor.prototype.transformToDocument = function(sourceDoc){
+        // fix for bug 1549749
+        if(_SARISSA_THREADEDDOM_PROGID){
+            this.processor.input=sourceDoc;
+            var outDoc=new ActiveXObject(_SARISSA_DOM_PROGID);
+            this.processor.output=outDoc;
+            this.processor.transform();
+            return outDoc;
+        }
+        else{
+            if(!_SARISSA_DOM_XMLWRITER){
+                _SARISSA_DOM_XMLWRITER = Sarissa.pickRecentProgID(["Msxml2.MXXMLWriter.6.0", "Msxml2.MXXMLWriter.3.0", "MSXML2.MXXMLWriter", "MSXML.MXXMLWriter", "Microsoft.XMLDOM"]);
+            };
+            this.processor.input = sourceDoc;
+            var outDoc = new ActiveXObject(_SARISSA_DOM_XMLWRITER);
+            this.processor.output = outDoc; 
+            this.processor.transform();
+            var oDoc = new ActiveXObject(_SARISSA_DOM_PROGID);
+            oDoc.loadXML(outDoc.output+"");
+            return oDoc;
+        };
+    };
+    
+    /**
+     * Transform the given XML DOM and return the transformation result as a new DOM fragment.
+     * <b>Note</b>: The xsl:output method must match the nature of the owner document (XML/HTML).
+     * @argument sourceDoc The XML DOMDocument to transform
+     * @argument ownerDoc The owner of the result fragment
+     * @return The transformation result as a DOM Document
+     */
+    XSLTProcessor.prototype.transformToFragment = function (sourceDoc, ownerDoc) {
+        this.processor.input = sourceDoc;
+        this.processor.transform();
+        var s = this.processor.output;
+        var f = ownerDoc.createDocumentFragment();
+        if (this.outputMethod == 'text') {
+            f.appendChild(ownerDoc.createTextNode(s));
+        } else if (ownerDoc.body && ownerDoc.body.innerHTML) {
+            var container = ownerDoc.createElement('div');
+            container.innerHTML = s;
+            while (container.hasChildNodes()) {
+                f.appendChild(container.firstChild);
+            }
+        }
+        else {
+            var oDoc = new ActiveXObject(_SARISSA_DOM_PROGID);
+            if (s.substring(0, 5) == '<?xml') {
+                s = s.substring(s.indexOf('?>') + 2);
+            }
+            var xml = ''.concat('<my>', s, '</my>');
+            oDoc.loadXML(xml);
+            var container = oDoc.documentElement;
+            while (container.hasChildNodes()) {
+                f.appendChild(container.firstChild);
+            }
+        }
+        return f;
+    };
+    
+    /**
+     * Set global XSLT parameter of the imported stylesheet
+     * @argument nsURI The parameter namespace URI
+     * @argument name The parameter base name
+     * @argument value The new parameter value
+     */
+    XSLTProcessor.prototype.setParameter = function(nsURI, name, value){
+        // make value a zero length string if null to allow clearing
+        value = value ? value : "";
+        // nsURI is optional but cannot be null 
+        if(nsURI){
+            this.processor.addParameter(name, value, nsURI);
+        }else{
+            this.processor.addParameter(name, value);
+        };
+        // update updated params for getParameter 
+        if(!this.paramsSet[""+nsURI]){
+            this.paramsSet[""+nsURI] = new Array();
+        };
+        this.paramsSet[""+nsURI][name] = value;
+    };
+    /**
+     * Gets a parameter if previously set by setParameter. Returns null
+     * otherwise
+     * @argument name The parameter base name
+     * @argument value The new parameter value
+     * @return The parameter value if reviously set by setParameter, null otherwise
+     */
+    XSLTProcessor.prototype.getParameter = function(nsURI, name){
+        nsURI = "" + nsURI;
+        if(this.paramsSet[nsURI] && this.paramsSet[nsURI][name]){
+            return this.paramsSet[nsURI][name];
+        }else{
+            return null;
+        };
+    };
+    /**
+     * Clear parameters (set them to default values as defined in the stylesheet itself)
+     */
+    XSLTProcessor.prototype.clearParameters = function(){
+        for(var nsURI in this.paramsSet){
+            for(var name in this.paramsSet[nsURI]){
+                if(nsURI){
+                    this.processor.addParameter(name, "", nsURI);
+                }else{
+                    this.processor.addParameter(name, "");
+                };
+            };
+        };
+        this.paramsSet = new Array();
+    };
+}else{ /* end IE initialization, try to deal with real browsers now ;-) */
+    if(_SARISSA_HAS_DOM_CREATE_DOCUMENT){
+        /**
+         * <p>Ensures the document was loaded correctly, otherwise sets the
+         * parseError to -1 to indicate something went wrong. Internal use</p>
+         * @private
+         */
+        Sarissa.__handleLoad__ = function(oDoc){
+            Sarissa.__setReadyState__(oDoc, 4);
+        };
+        /**
+        * <p>Attached by an event handler to the load event. Internal use.</p>
+        * @private
+        */
+        _sarissa_XMLDocument_onload = function(){
+            Sarissa.__handleLoad__(this);
+        };
+        /**
+         * <p>Sets the readyState property of the given DOM Document object.
+         * Internal use.</p>
+         * @private
+         * @argument oDoc the DOM Document object to fire the
+         *          readystatechange event
+         * @argument iReadyState the number to change the readystate property to
+         */
+        Sarissa.__setReadyState__ = function(oDoc, iReadyState){
+            oDoc.readyState = iReadyState;
+            oDoc.readystate = iReadyState;
+            if (oDoc.onreadystatechange != null && typeof oDoc.onreadystatechange == "function")
+                oDoc.onreadystatechange();
+        };
+        Sarissa.getDomDocument = function(sUri, sName){
+            var oDoc = document.implementation.createDocument(sUri?sUri:null, sName?sName:null, null);
+            if(!oDoc.onreadystatechange){
+            
+                /**
+                * <p>Emulate IE's onreadystatechange attribute</p>
+                */
+                oDoc.onreadystatechange = null;
+            };
+            if(!oDoc.readyState){
+                /**
+                * <p>Emulates IE's readyState property, which always gives an integer from 0 to 4:</p>
+                * <ul><li>1 == LOADING,</li>
+                * <li>2 == LOADED,</li>
+                * <li>3 == INTERACTIVE,</li>
+                * <li>4 == COMPLETED</li></ul>
+                */
+                oDoc.readyState = 0;
+            };
+            oDoc.addEventListener("load", _sarissa_XMLDocument_onload, false);
+            return oDoc;
+        };
+        if(window.XMLDocument){
+            // do nothing
+        }// TODO: check if the new document has content before trying to copynodes, check  for error handling in DOM 3 LS
+        else if(_SARISSA_HAS_DOM_FEATURE && window.Document && !Document.prototype.load && document.implementation.hasFeature('LS', '3.0')){
+            //Opera 9 may get the XPath branch which gives creates XMLDocument, therefore it doesn't reach here which is good
+            /**
+            * <p>Factory method to obtain a new DOM Document object</p>
+            * @argument sUri the namespace of the root node (if any)
+            * @argument sUri the local name of the root node (if any)
+            * @returns a new DOM Document
+            */
+            Sarissa.getDomDocument = function(sUri, sName){
+                var oDoc = document.implementation.createDocument(sUri?sUri:null, sName?sName:null, null);
+                return oDoc;
+            };
+        }
+        else {
+            Sarissa.getDomDocument = function(sUri, sName){
+                var oDoc = document.implementation.createDocument(sUri?sUri:null, sName?sName:null, null);
+                // looks like safari does not create the root element for some unknown reason
+                if(oDoc && (sUri || sName) && !oDoc.documentElement){
+                    oDoc.appendChild(oDoc.createElementNS(sUri, sName));
+                };
+                return oDoc;
+            };
+        };
+    };//if(_SARISSA_HAS_DOM_CREATE_DOCUMENT)
+};
+//==========================================
+// Common stuff
+//==========================================
+if(!window.DOMParser){
+    if(_SARISSA_IS_SAFARI){
+        /*
+         * DOMParser is a utility class, used to construct DOMDocuments from XML strings
+         * @constructor
+         */
+        DOMParser = function() { };
+        /** 
+        * Construct a new DOM Document from the given XMLstring
+        * @param sXml the given XML string
+        * @param contentType the content type of the document the given string represents (one of text/xml, application/xml, application/xhtml+xml). 
+        * @return a new DOM Document from the given XML string
+        */
+        DOMParser.prototype.parseFromString = function(sXml, contentType){
+            var xmlhttp = new XMLHttpRequest();
+            xmlhttp.open("GET", "data:text/xml;charset=utf-8," + encodeURIComponent(sXml), false);
+            xmlhttp.send(null);
+            return xmlhttp.responseXML;
+        };
+    }else if(Sarissa.getDomDocument && Sarissa.getDomDocument() && Sarissa.getDomDocument(null, "bar").xml){
+        DOMParser = function() { };
+        DOMParser.prototype.parseFromString = function(sXml, contentType){
+            var doc = Sarissa.getDomDocument();
+            doc.loadXML(sXml);
+            return doc;
+        };
+    };
+};
+
+if((typeof(document.importNode) == "undefined") && _SARISSA_IS_IE){
+    try{
+        /**
+        * Implementation of importNode for the context window document in IE.
+        * If <code>oNode</code> is a TextNode, <code>bChildren</code> is ignored.
+        * @param oNode the Node to import
+        * @param bChildren whether to include the children of oNode
+        * @returns the imported node for further use
+        */
+        document.importNode = function(oNode, bChildren){
+            var tmp;
+            if (oNode.nodeName=='#text') {
+                return document.createTextElement(oNode.data);
+            }
+            else {
+                if(oNode.nodeName == "tbody" || oNode.nodeName == "tr"){
+                    tmp = document.createElement("table");
+                }
+                else if(oNode.nodeName == "td"){
+                    tmp = document.createElement("tr");
+                }
+                else if(oNode.nodeName == "option"){
+                    tmp = document.createElement("select");
+                }
+                else{
+                    tmp = document.createElement("div");
+                };
+                if(bChildren){
+                    tmp.innerHTML = oNode.xml ? oNode.xml : oNode.outerHTML;
+                }else{
+                    tmp.innerHTML = oNode.xml ? oNode.cloneNode(false).xml : oNode.cloneNode(false).outerHTML;
+                };
+                return tmp.getElementsByTagName("*")[0];
+            };
+            
+        };
+    }catch(e){ };
+};
+if(!Sarissa.getParseErrorText){
+    /**
+     * <p>Returns a human readable description of the parsing error. Usefull
+     * for debugging. Tip: append the returned error string in a &lt;pre&gt;
+     * element if you want to render it.</p>
+     * <p>Many thanks to Christian Stocker for the initial patch.</p>
+     * @argument oDoc The target DOM document
+     * @returns The parsing error description of the target Document in
+     *          human readable form (preformated text)
+     */
+    Sarissa.getParseErrorText = function (oDoc){
+        var parseErrorText = Sarissa.PARSED_OK;
+        if(!oDoc.documentElement){
+            parseErrorText = Sarissa.PARSED_EMPTY;
+        } else if(oDoc.documentElement.tagName == "parsererror"){
+            parseErrorText = oDoc.documentElement.firstChild.data;
+            parseErrorText += "\n" +  oDoc.documentElement.firstChild.nextSibling.firstChild.data;
+        } else if(oDoc.getElementsByTagName("parsererror").length > 0){
+            var parsererror = oDoc.getElementsByTagName("parsererror")[0];
+            parseErrorText = Sarissa.getText(parsererror, true)+"\n";
+        } else if(oDoc.parseError && oDoc.parseError.errorCode != 0){
+            parseErrorText = Sarissa.PARSED_UNKNOWN_ERROR;
+        };
+        return parseErrorText;
+    };
+};
+Sarissa.getText = function(oNode, deep){
+    var s = "";
+    var nodes = oNode.childNodes;
+    for(var i=0; i < nodes.length; i++){
+        var node = nodes[i];
+        var nodeType = node.nodeType;
+        if(nodeType == Node.TEXT_NODE || nodeType == Node.CDATA_SECTION_NODE){
+            s += node.data;
+        } else if(deep == true
+                    && (nodeType == Node.ELEMENT_NODE
+                        || nodeType == Node.DOCUMENT_NODE
+                        || nodeType == Node.DOCUMENT_FRAGMENT_NODE)){
+            s += Sarissa.getText(node, true);
+        };
+    };
+    return s;
+};
+if(!window.XMLSerializer 
+    && Sarissa.getDomDocument 
+    && Sarissa.getDomDocument("","foo", null).xml){
+    /**
+     * Utility class to serialize DOM Node objects to XML strings
+     * @constructor
+     */
+    XMLSerializer = function(){};
+    /**
+     * Serialize the given DOM Node to an XML string
+     * @param oNode the DOM Node to serialize
+     */
+    XMLSerializer.prototype.serializeToString = function(oNode) {
+        return oNode.xml;
+    };
+};
+
+/**
+ * strips tags from a markup string
+ */
+Sarissa.stripTags = function (s) {
+    return s.replace(/<[^>]+>/g,"");
+};
+/**
+ * <p>Deletes all child nodes of the given node</p>
+ * @argument oNode the Node to empty
+ */
+Sarissa.clearChildNodes = function(oNode) {
+    // need to check for firstChild due to opera 8 bug with hasChildNodes
+    while(oNode.firstChild) {
+        oNode.removeChild(oNode.firstChild);
+    };
+};
+/**
+ * <p> Copies the childNodes of nodeFrom to nodeTo</p>
+ * <p> <b>Note:</b> The second object's original content is deleted before 
+ * the copy operation, unless you supply a true third parameter</p>
+ * @argument nodeFrom the Node to copy the childNodes from
+ * @argument nodeTo the Node to copy the childNodes to
+ * @argument bPreserveExisting whether to preserve the original content of nodeTo, default is false
+ */
+Sarissa.copyChildNodes = function(nodeFrom, nodeTo, bPreserveExisting) {
+    if((!nodeFrom) || (!nodeTo)){
+        throw "Both source and destination nodes must be provided";
+    };
+    if(!bPreserveExisting){
+        Sarissa.clearChildNodes(nodeTo);
+    };
+    var ownerDoc = nodeTo.nodeType == Node.DOCUMENT_NODE ? nodeTo : nodeTo.ownerDocument;
+    var nodes = nodeFrom.childNodes;
+    if(typeof(ownerDoc.importNode) != "undefined")  {
+        for(var i=0;i < nodes.length;i++) {
+            nodeTo.appendChild(ownerDoc.importNode(nodes[i], true));
+        };
+    } else {
+        for(var i=0;i < nodes.length;i++) {
+            nodeTo.appendChild(nodes[i].cloneNode(true));
+        };
+    };
+};
+
+/**
+ * <p> Moves the childNodes of nodeFrom to nodeTo</p>
+ * <p> <b>Note:</b> The second object's original content is deleted before 
+ * the move operation, unless you supply a true third parameter</p>
+ * @argument nodeFrom the Node to copy the childNodes from
+ * @argument nodeTo the Node to copy the childNodes to
+ * @argument bPreserveExisting whether to preserve the original content of nodeTo, default is
+ */ 
+Sarissa.moveChildNodes = function(nodeFrom, nodeTo, bPreserveExisting) {
+    if((!nodeFrom) || (!nodeTo)){
+        throw "Both source and destination nodes must be provided";
+    };
+    if(!bPreserveExisting){
+        Sarissa.clearChildNodes(nodeTo);
+    };
+    var nodes = nodeFrom.childNodes;
+    // if within the same doc, just move, else copy and delete
+    if(nodeFrom.ownerDocument == nodeTo.ownerDocument){
+        while(nodeFrom.firstChild){
+            nodeTo.appendChild(nodeFrom.firstChild);
+        };
+    } else {
+        var ownerDoc = nodeTo.nodeType == Node.DOCUMENT_NODE ? nodeTo : nodeTo.ownerDocument;
+        if(typeof(ownerDoc.importNode) != "undefined") {
+           for(var i=0;i < nodes.length;i++) {
+               nodeTo.appendChild(ownerDoc.importNode(nodes[i], true));
+           };
+        }else{
+           for(var i=0;i < nodes.length;i++) {
+               nodeTo.appendChild(nodes[i].cloneNode(true));
+           };
+        };
+        Sarissa.clearChildNodes(nodeFrom);
+    };
+};
+
+/** 
+ * <p>Serialize any object to an XML string. All properties are serialized using the property name
+ * as the XML element name. Array elements are rendered as <code>array-item</code> elements, 
+ * using their index/key as the value of the <code>key</code> attribute.</p>
+ * @argument anyObject the object to serialize
+ * @argument objectName a name for that object
+ * @return the XML serializationj of the given object as a string
+ */
+Sarissa.xmlize = function(anyObject, objectName, indentSpace){
+    indentSpace = indentSpace?indentSpace:'';
+    var s = indentSpace  + '<' + objectName + '>';
+    var isLeaf = false;
+    if(!(anyObject instanceof Object) || anyObject instanceof Number || anyObject instanceof String 
+        || anyObject instanceof Boolean || anyObject instanceof Date){
+        s += Sarissa.escape(""+anyObject);
+        isLeaf = true;
+    }else{
+        s += "\n";
+        var itemKey = '';
+        var isArrayItem = anyObject instanceof Array;
+        for(var name in anyObject){
+            s += Sarissa.xmlize(anyObject[name], (isArrayItem?"array-item key=\""+name+"\"":name), indentSpace + "   ");
+        };
+        s += indentSpace;
+    };
+    return s += (objectName.indexOf(' ')!=-1?"</array-item>\n":"</" + objectName + ">\n");
+};
+
+/** 
+ * Escape the given string chacters that correspond to the five predefined XML entities
+ * @param sXml the string to escape
+ */
+Sarissa.escape = function(sXml){
+    return sXml.replace(/&/g, "&amp;")
+        .replace(/</g, "&lt;")
+        .replace(/>/g, "&gt;")
+        .replace(/"/g, "&quot;")
+        .replace(/'/g, "&apos;");
+};
+
+/** 
+ * Unescape the given string. This turns the occurences of the predefined XML 
+ * entities to become the characters they represent correspond to the five predefined XML entities
+ * @param sXml the string to unescape
+ */
+Sarissa.unescape = function(sXml){
+    return sXml.replace(/&apos;/g,"'")
+        .replace(/&quot;/g,"\"")
+        .replace(/&gt;/g,">")
+        .replace(/&lt;/g,"<")
+        .replace(/&amp;/g,"&");
+};
+//   EOF

Added: branches/refactor1/framework/impl/src/main/javascript/ajaxjsf/sarissa_dhtml.js
===================================================================
--- branches/refactor1/framework/impl/src/main/javascript/ajaxjsf/sarissa_dhtml.js	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/javascript/ajaxjsf/sarissa_dhtml.js	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,127 @@
+/**
+ * ====================================================================
+ * About
+ * ====================================================================
+ * Sarissa cross browser XML library - AJAX module
+ * @version ${project.version}
+ * @author: Copyright Manos Batsis, mailto: mbatsis at users full stop sourceforge full stop net
+ *
+ * This module contains some convenient AJAX tricks based on Sarissa 
+ *
+ * ====================================================================
+ * Licence
+ * ====================================================================
+ * Sarissa is free software distributed under the GNU GPL version 2 (see <a href="gpl.txt">gpl.txt</a>) or higher, 
+ * GNU LGPL version 2.1 (see <a href="lgpl.txt">lgpl.txt</a>) or higher and Apache Software License 2.0 or higher 
+ * (see <a href="asl.txt">asl.txt</a>). This means you can choose one of the three and use that if you like. If 
+ * you make modifications under the ASL, i would appreciate it if you submitted those.
+ * In case your copy of Sarissa does not include the license texts, you may find
+ * them online in various formats at <a href="http://www.gnu.org">http://www.gnu.org</a> and 
+ * <a href="http://www.apache.org">http://www.apache.org</a>.
+ *
+  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY 
+  * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 
+  * WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE 
+  * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 
+  * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 
+  * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 
+  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+/** @private */
+Sarissa.updateCursor = function(oTargetElement, sValue) {
+    if(oTargetElement && oTargetElement.style && oTargetElement.style.cursor != undefined ){
+        oTargetElement.style.cursor = sValue;
+    };
+};
+
+/**
+ * Asynchronously update an element with response of a GET request on the given URL.  Passing a configured XSLT 
+ * processor will result in transforming and updating oNode before using it to update oTargetElement.
+ * You can also pass a callback function to be executed when the update is finished. The function will be called as 
+ * <code>functionName(oNode, oTargetElement);</code>
+ * @addon
+ * @param sFromUrl the URL to make the request to
+ * @param oTargetElement the element to update
+ * @param xsltproc (optional) the transformer to use on the returned
+ *                  content before updating the target element with it
+ * @param callback (optional) a Function object to execute once the update is finished successfuly, called as <code>callback(oNode, oTargetElement)</code>
+ * @param skipCache (optional) whether to skip any cache
+ */
+Sarissa.updateContentFromURI = function(sFromUrl, oTargetElement, xsltproc, callback, skipCache) {
+    try{
+        Sarissa.updateCursor(oTargetElement, "wait");
+        var xmlhttp = new XMLHttpRequest();
+        xmlhttp.open("GET", sFromUrl, true);
+        function sarissa_dhtml_loadHandler() {
+            if (xmlhttp.readyState == 4) {
+                Sarissa.updateContentFromNode(xmlhttp.responseXML, oTargetElement, xsltproc, callback);
+            };
+        };
+        xmlhttp.onreadystatechange = sarissa_dhtml_loadHandler;
+        if (skipCache) {
+             var oldage = "Sat, 1 Jan 2000 00:00:00 GMT";
+             xmlhttp.setRequestHeader("If-Modified-Since", oldage);
+        };
+        xmlhttp.send("");
+    }
+    catch(e){
+        Sarissa.updateCursor(oTargetElement, "auto");
+        throw e;
+    };
+};
+
+/**
+ * Update an element's content with the given DOM node. Passing a configured XSLT 
+ * processor will result in transforming and updating oNode before using it to update oTargetElement.
+ * You can also pass a callback function to be executed when the update is finished. The function will be called as 
+ * <code>functionName(oNode, oTargetElement);</code>
+ * @addon
+ * @param oNode the URL to make the request to
+ * @param oTargetElement the element to update
+ * @param xsltproc (optional) the transformer to use on the given 
+ *                  DOM node before updating the target element with it
+ * @param callback (optional) a Function object to execute once the update is finished successfuly, called as <code>callback(oNode, oTargetElement)</code>
+ */
+Sarissa.updateContentFromNode = function(oNode, oTargetElement, xsltproc, callback) {
+    try {
+        Sarissa.updateCursor(oTargetElement, "wait");
+        Sarissa.clearChildNodes(oTargetElement);
+        // check for parsing errors
+        var ownerDoc = oNode.nodeType == Node.DOCUMENT_NODE?oNode:oNode.ownerDocument;
+        if(ownerDoc.parseError && ownerDoc.parseError != 0) {
+            var pre = document.createElement("pre");
+            pre.appendChild(document.createTextNode(Sarissa.getParseErrorText(ownerDoc)));
+            oTargetElement.appendChild(pre);
+        }
+        else {
+            // transform if appropriate
+            if(xsltproc) {
+                oNode = xsltproc.transformToDocument(oNode);
+            };
+            // be smart, maybe the user wants to display the source instead
+            if(oTargetElement.tagName.toLowerCase() == "textarea" || oTargetElement.tagName.toLowerCase() == "input") {
+                oTargetElement.value = new XMLSerializer().serializeToString(oNode);
+            }
+            else {
+                // ok that was not smart; it was paranoid. Keep up the good work by trying to use DOM instead of innerHTML
+                if(oNode.nodeType == Node.DOCUMENT_NODE || oNode.ownerDocument.documentElement == oNode) {
+                    oTargetElement.innerHTML = new XMLSerializer().serializeToString(oNode);
+                }
+                else{
+                    oTargetElement.appendChild(oTargetElement.ownerDocument.importNode(oNode, true));
+                };
+            };  
+        };
+        if (callback) {
+            callback(oNode, oTargetElement);
+        };
+    }
+    catch(e) {
+            throw e;
+    }
+    finally{
+        Sarissa.updateCursor(oTargetElement, "auto");
+    };
+};
+

Added: branches/refactor1/framework/impl/src/main/javascript/ajaxjsf/sarissa_ieemu_load.js
===================================================================
--- branches/refactor1/framework/impl/src/main/javascript/ajaxjsf/sarissa_ieemu_load.js	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/javascript/ajaxjsf/sarissa_ieemu_load.js	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,236 @@
+/**
+ * ====================================================================
+ * About
+ * ====================================================================
+ * Sarissa cross browser XML library - IE .load eulation (deprecated)
+ * @version ${project.version}
+ * @author: Manos Batsis, mailto: mbatsis at users full stop sourceforge full stop net
+ *
+ * This script emulates Internet Explorer's .load method of DOM Document objects. 
+ *
+ * All functionality in this file is DEPRECATED, XMLHttpRequest objects 
+ * should be used to load XML documents instead 
+ *
+ * @version @sarissa.version@
+ * @author: Manos Batsis, mailto: mbatsis at users full stop sourceforge full stop net
+ * ====================================================================
+ * Licence
+ * ====================================================================
+ * Sarissa is free software distributed under the GNU GPL version 2 (see <a href="gpl.txt">gpl.txt</a>) or higher, 
+ * GNU LGPL version 2.1 (see <a href="lgpl.txt">lgpl.txt</a>) or higher and Apache Software License 2.0 or higher 
+ * (see <a href="asl.txt">asl.txt</a>). This means you can choose one of the three and use that if you like. If 
+ * you make modifications under the ASL, i would appreciate it if you submitted those.
+ * In case your copy of Sarissa does not include the license texts, you may find
+ * them online in various formats at <a href="http://www.gnu.org">http://www.gnu.org</a> and 
+ * <a href="http://www.apache.org">http://www.apache.org</a>.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY 
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 
+ * WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE 
+ * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+if(!_SARISSA_IS_IE){
+    if(_SARISSA_HAS_DOM_CREATE_DOCUMENT){
+        /**
+         * <p>Ensures the document was loaded correctly, otherwise sets the
+         * parseError to -1 to indicate something went wrong. Internal use</p>
+         * @private
+         */
+        Sarissa.__handleLoad__ = function(oDoc){
+            Sarissa.__setReadyState__(oDoc, 4);
+        };
+        function SarissaParseError() {
+            this.errorCode = 0;
+        };
+        /**
+        * <p>Attached by an event handler to the load event. Internal use.</p>
+        * @private
+        */
+        _sarissa_XMLDocument_onload = function(){
+            Sarissa.__handleLoad__(this);
+        };
+        /**
+         * <p>Sets the readyState property of the given DOM Document object.
+         * Internal use.</p>
+         * @private
+         * @argument oDoc the DOM Document object to fire the
+         *          readystatechange event
+         * @argument iReadyState the number to change the readystate property to
+         */
+        Sarissa.__setReadyState__ = function(oDoc, iReadyState){
+            oDoc.readyState = iReadyState;
+            oDoc.readystate = iReadyState;
+            if (oDoc.onreadystatechange != null && typeof oDoc.onreadystatechange == "function")
+                oDoc.onreadystatechange();
+        };
+        Sarissa.getDomDocument = function(sUri, sName){
+            
+            var oDoc = document.implementation.createDocument(sUri?sUri:null, sName?sName:null, null);
+            if(!oDoc.onreadystatechange){
+            
+                /**
+                * <p>Emulate IE's onreadystatechange attribute</p>
+                */
+                oDoc.onreadystatechange = null;
+            };
+            if(!oDoc.readyState){
+                /**
+                * <p>Emulates IE's readyState property, which always gives an integer from 0 to 4:</p>
+                * <ul><li>1 == LOADING,</li>
+                * <li>2 == LOADED,</li>
+                * <li>3 == INTERACTIVE,</li>
+                * <li>4 == COMPLETED</li></ul>
+                */
+                oDoc.readyState = 0;
+            };
+            if(!oDoc.parseError){
+                oDoc.parseError = new SarissaParseError();
+            };
+            oDoc.addEventListener("load", _sarissa_XMLDocument_onload, false);
+            return oDoc;
+        };
+        if(window.XMLDocument){
+            /**
+            * <p>Keeps a handle to the original load() method. Internal use and only
+            * if Mozilla version is lower than 1.4</p>
+            * @private
+            */
+            XMLDocument.prototype._sarissa_load = XMLDocument.prototype.load;
+            // NOTE: setting async to false will only work with documents
+            // called over HTTP (meaning a server), not the local file system,
+            // unless you are using Moz 1.4+.
+        
+            /**
+            * <p>This is deprecated, use XMLHttpRequest to load remote documents instead. 
+            * Overrides the original load method to provide synchronous loading for
+            * Mozilla versions prior to 1.4 and fix ready state stuff.</p>
+            * @deprecated 
+            * @returns the DOM Object as it was before the load() call (may be  empty)
+            */
+            XMLDocument.prototype.load = function(sURI) {
+                var oDoc = Sarissa.getDomDocument();
+                Sarissa.copyChildNodes(this, oDoc);
+                this.parseError.errorCode = 0;
+                Sarissa.__setReadyState__(this, 1);
+                try {
+                    if(this.async == false && _SARISSA_SYNC_NON_IMPLEMENTED) {
+                        var tmp = new XMLHttpRequest();
+                        tmp.open("GET", sURI, false);
+                        tmp.send(null);
+                        Sarissa.__setReadyState__(this, 2);
+                        Sarissa.copyChildNodes(tmp.responseXML, this);
+                        Sarissa.__setReadyState__(this, 3);
+                    }else{
+                        this._sarissa_load(sURI);
+                    };
+                }
+                catch (objException) {
+                        oDoc.parseError.errorCode = -1;
+                }
+                finally {
+                    if (!oDoc.documentElement || oDoc.documentElement.tagName == "parsererror"){
+                        oDoc.parseError.errorCode = -1;
+                    };
+                    if(this.async == false){
+                        Sarissa.__handleLoad__(this);
+                    };
+                };
+                return oDoc;
+            };
+        //if(window.XMLDocument) , now mainly for opera  
+        }// TODO: check if the new document has content before trying to copynodes, check  for error handling in DOM 3 LS
+        else if(document.implementation && document.implementation.hasFeature && document.implementation.hasFeature('LS', '3.0')){
+            Document.prototype.async = true;
+            Document.prototype.onreadystatechange = null;
+            Document.prototype.load = function(sURI) {
+                var oldDoc = Sarissa.getDomDocument();
+                Sarissa.copyChildNodes(this, oldDoc, false);
+                var parser = document.implementation.createLSParser(this.async ? document.implementation.MODE_ASYNCHRONOUS : document.implementation.MODE_SYNCHRONOUS, null);
+                if(this.async){
+                    var self = this;
+                    parser.addEventListener("load", 
+                        function(e) { 
+                              self.readyState = 4;
+                              Sarissa.copyChildNodes(e.newDocument, self, false);
+                              self.onreadystatechange.call(); 
+                        }, 
+                        false); 
+                };
+                try {
+                    var oDoc = parser.parseURI(sURI);
+                    if(!this.async) {
+                        Sarissa.copyChildNodes(oDoc, this, false);
+                    };
+                }
+                catch(e){
+                    this.parseError.errorCode = -1;
+                };
+                return oldDoc;
+            };
+            /**
+            * <p>Factory method to obtain a new DOM Document object</p>
+            * @argument sUri the namespace of the root node (if any)
+            * @argument sUri the local name of the root node (if any)
+            * @returns a new DOM Document
+            */
+            Sarissa.getDomDocument = function(sUri, sName){
+                var oDoc = document.implementation.createDocument(sUri?sUri:null, sName?sName:null, null);
+                if(!oDoc.parseError){
+                    oDoc.parseError = {errorCode:0};
+                };
+                return oDoc;
+            };
+        }
+        else {
+            Sarissa.getDomDocument = function(sUri, sName){
+                var oDoc = document.implementation.createDocument(sUri?sUri:null, sName?sName:null, null);
+                // looks like safari does not create the root element for some unknown reason
+                if(oDoc && (sUri || sName) && !oDoc.documentElement){
+                    oDoc.appendChild(oDoc.createElementNS(sUri, sName));
+                };
+                // attachb to the new object as we have no prototype to use, this is for safari
+                if(!oDoc.load) {
+                        oDoc.load = function(sUrl) {
+                            var oldDoc = document.implementation.createDocument();
+                            Sarissa.copyChildNodes(this, oldDoc);
+                            this.parseError = {errorCode : 0};
+                            Sarissa.__setReadyState__(this, 1);
+                            if(this.async == false) {
+                                var tmp = new XMLHttpRequest();
+                                tmp.open("GET", sUrl, false);
+                                tmp.send(null);
+                                Sarissa.__setReadyState__(this, 2);
+                                Sarissa.copyChildNodes(tmp.responseXML, oDoc);
+                                if(!oDoc.documentElement || oDoc.getElementsByTagName("parsererror").length >0){
+                                    oDoc.parseError.errorCode = -1;
+                                };
+                                Sarissa.__setReadyState__(this, 3);
+                                Sarissa.__setReadyState__(this, 4);
+                            }
+                            else {
+                                var xmlhttp = new XMLHttpRequest();
+                                xmlhttp.open('GET', sUrl, true);
+                                xmlhttp.onreadystatechange = function(){
+                                    if (xmlhttp.readyState == 4) {
+                                        Sarissa.copyChildNodes(xmlhttp.responseXML, oDoc);
+                                        if(!oDoc.documentElement || oDoc.getElementsByTagName("parsererror").length > 0){
+                                            oDoc.parseError.errorCode = -1;
+                                        };      
+                                    };
+                                Sarissa.__setReadyState__(oDoc, xmlhttp.readyState);
+                                };
+                                xmlhttp.send(null);
+                            };
+                            return oldDoc;
+                        };
+                };
+                return oDoc;
+            };
+        };
+    };//if(_SARISSA_HAS_DOM_CREATE_DOCUMENT)
+};
+//   EOF

Added: branches/refactor1/framework/impl/src/main/javascript/ajaxjsf/sarissa_ieemu_xpath.js
===================================================================
--- branches/refactor1/framework/impl/src/main/javascript/ajaxjsf/sarissa_ieemu_xpath.js	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/javascript/ajaxjsf/sarissa_ieemu_xpath.js	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,200 @@
+/**
+ * ====================================================================
+ * About
+ * ====================================================================
+ * Sarissa cross browser XML library - IE XPath Emulation 
+ * @version ${project.version}
+ * @author: Manos Batsis, mailto: mbatsis at users full stop sourceforge full stop net
+ *
+ * This script emulates Internet Explorer's selectNodes and selectSingleNode
+ * for Mozilla. Associating namespace prefixes with URIs for your XPath queries
+ * is easy with IE's setProperty. 
+ * USers may also map a namespace prefix to a default (unprefixed) namespace in the
+ * source document with Sarissa.setXpathNamespaces
+ *
+ *
+ * ====================================================================
+ * Licence
+ * ====================================================================
+ * Sarissa is free software distributed under the GNU GPL version 2 (see <a href="gpl.txt">gpl.txt</a>) or higher, 
+ * GNU LGPL version 2.1 (see <a href="lgpl.txt">lgpl.txt</a>) or higher and Apache Software License 2.0 or higher 
+ * (see <a href="asl.txt">asl.txt</a>). This means you can choose one of the three and use that if you like. If 
+ * you make modifications under the ASL, i would appreciate it if you submitted those.
+ * In case your copy of Sarissa does not include the license texts, you may find
+ * them online in various formats at <a href="http://www.gnu.org">http://www.gnu.org</a> and 
+ * <a href="http://www.apache.org">http://www.apache.org</a>.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY 
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 
+ * WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE 
+ * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+if(_SARISSA_HAS_DOM_FEATURE && document.implementation.hasFeature("XPath", "3.0")){
+    /**
+    * <p>SarissaNodeList behaves as a NodeList but is only used as a result to <code>selectNodes</code>,
+    * so it also has some properties IEs proprietery object features.</p>
+    * @private
+    * @constructor
+    * @argument i the (initial) list size
+    */
+    function SarissaNodeList(i){
+        this.length = i;
+    };
+    /** <p>Set an Array as the prototype object</p> */
+    SarissaNodeList.prototype = new Array(0);
+    /** <p>Inherit the Array constructor </p> */
+    SarissaNodeList.prototype.constructor = Array;
+    /**
+    * <p>Returns the node at the specified index or null if the given index
+    * is greater than the list size or less than zero </p>
+    * <p><b>Note</b> that in ECMAScript you can also use the square-bracket
+    * array notation instead of calling <code>item</code>
+    * @argument i the index of the member to return
+    * @returns the member corresponding to the given index
+    */
+    SarissaNodeList.prototype.item = function(i) {
+        return (i < 0 || i >= this.length)?null:this[i];
+    };
+    /**
+    * <p>Emulate IE's expr property
+    * (Here the SarissaNodeList object is given as the result of selectNodes).</p>
+    * @returns the XPath expression passed to selectNodes that resulted in
+    *          this SarissaNodeList
+    */
+    SarissaNodeList.prototype.expr = "";
+    /** dummy, used to accept IE's stuff without throwing errors */
+    if(window.XMLDocument && (!XMLDocument.prototype.setProperty)){
+        XMLDocument.prototype.setProperty  = function(x,y){};
+    };
+    /**
+    * <p>Programmatically control namespace URI/prefix mappings for XPath
+    * queries.</p>
+    * <p>This method comes especially handy when used to apply XPath queries
+    * on XML documents with a default namespace, as there is no other way
+    * of mapping that to a prefix.</p>
+    * <p>Using no namespace prefix in DOM Level 3 XPath queries, implies you
+    * are looking for elements in the null namespace. If you need to look
+    * for nodes in the default namespace, you need to map a prefix to it
+    * first like:</p>
+    * <pre>Sarissa.setXpathNamespaces(oDoc, &quot;xmlns:myprefix=&amp;aposhttp://mynsURI&amp;apos&quot;);</pre>
+    * <p><b>Note 1 </b>: Use this method only if the source document features
+    * a default namespace (without a prefix), otherwise just use IE's setProperty
+    * (moz will rezolve non-default namespaces by itself). You will need to map that
+    * namespace to a prefix for queries to work.</p>
+    * <p><b>Note 2 </b>: This method calls IE's setProperty method to set the
+    * appropriate namespace-prefix mappings, so you dont have to do that.</p>
+    * @param oDoc The target XMLDocument to set the namespace mappings for.
+    * @param sNsSet A whilespace-seperated list of namespace declarations as
+    *            those would appear in an XML document. E.g.:
+    *            <code>&quot;xmlns:xhtml=&apos;http://www.w3.org/1999/xhtml&apos;
+    * xmlns:&apos;http://www.w3.org/1999/XSL/Transform&apos;&quot;</code>
+    * @throws An error if the format of the given namespace declarations is bad.
+    */
+    Sarissa.setXpathNamespaces = function(oDoc, sNsSet) {
+        //oDoc._sarissa_setXpathNamespaces(sNsSet);
+        oDoc._sarissa_useCustomResolver = true;
+        var namespaces = sNsSet.indexOf(" ")>-1?sNsSet.split(" "):new Array(sNsSet);
+        oDoc._sarissa_xpathNamespaces = new Array(namespaces.length);
+        for(var i=0;i < namespaces.length;i++){
+            var ns = namespaces[i];
+            var colonPos = ns.indexOf(":");
+            var assignPos = ns.indexOf("=");
+            if(colonPos > 0 && assignPos > colonPos+1){
+                var prefix = ns.substring(colonPos+1, assignPos);
+                var uri = ns.substring(assignPos+2, ns.length-1);
+                oDoc._sarissa_xpathNamespaces[prefix] = uri;
+            }else{
+                throw "Bad format on namespace declaration(s) given";
+            };
+        };
+    };
+    /**
+    * @private Flag to control whether a custom namespace resolver should
+    *          be used, set to true by Sarissa.setXpathNamespaces
+    */
+    XMLDocument.prototype._sarissa_useCustomResolver = false;
+    /** @private */
+    XMLDocument.prototype._sarissa_xpathNamespaces = new Array();
+    /**
+    * <p>Extends the XMLDocument to emulate IE's selectNodes.</p>
+    * @argument sExpr the XPath expression to use
+    * @argument contextNode this is for internal use only by the same
+    *           method when called on Elements
+    * @returns the result of the XPath search as a SarissaNodeList
+    * @throws An error if no namespace URI is found for the given prefix.
+    */
+    XMLDocument.prototype.selectNodes = function(sExpr, contextNode, returnSingle){
+        var nsDoc = this;
+        var nsresolver = this._sarissa_useCustomResolver
+        ? function(prefix){
+            var s = nsDoc._sarissa_xpathNamespaces[prefix];
+            if(s)return s;
+            else throw "No namespace URI found for prefix: '" + prefix+"'";
+            }
+        : this.createNSResolver(this.documentElement);
+        var result = null;
+        if(!returnSingle){
+            var oResult = this.evaluate(sExpr,
+                (contextNode?contextNode:this),
+                nsresolver,
+                XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
+            var nodeList = new SarissaNodeList(oResult.snapshotLength);
+            nodeList.expr = sExpr;
+            for(var i=0;i<nodeList.length;i++)
+                nodeList[i] = oResult.snapshotItem(i);
+            result = nodeList;
+        }
+        else {
+            result = oResult = this.evaluate(sExpr,
+                (contextNode?contextNode:this),
+                nsresolver,
+                XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
+        };
+        return result;      
+    };
+    /**
+    * <p>Extends the Element to emulate IE's selectNodes</p>
+    * @argument sExpr the XPath expression to use
+    * @returns the result of the XPath search as an (Sarissa)NodeList
+    * @throws An
+    *             error if invoked on an HTML Element as this is only be
+    *             available to XML Elements.
+    */
+    Element.prototype.selectNodes = function(sExpr){
+        var doc = this.ownerDocument;
+        if(doc.selectNodes)
+            return doc.selectNodes(sExpr, this);
+        else
+            throw "Method selectNodes is only supported by XML Elements";
+    };
+    /**
+    * <p>Extends the XMLDocument to emulate IE's selectSingleNode.</p>
+    * @argument sExpr the XPath expression to use
+    * @argument contextNode this is for internal use only by the same
+    *           method when called on Elements
+    * @returns the result of the XPath search as an (Sarissa)NodeList
+    */
+    XMLDocument.prototype.selectSingleNode = function(sExpr, contextNode){
+        var ctx = contextNode?contextNode:null;
+        return this.selectNodes(sExpr, ctx, true);
+    };
+    /**
+    * <p>Extends the Element to emulate IE's selectSingleNode.</p>
+    * @argument sExpr the XPath expression to use
+    * @returns the result of the XPath search as an (Sarissa)NodeList
+    * @throws An error if invoked on an HTML Element as this is only be
+    *             available to XML Elements.
+    */
+    Element.prototype.selectSingleNode = function(sExpr){
+        var doc = this.ownerDocument;
+        if(doc.selectSingleNode)
+            return doc.selectSingleNode(sExpr, this);
+        else
+            throw "Method selectNodes is only supported by XML Elements";
+    };
+    Sarissa.IS_ENABLED_SELECT_NODES = true;
+};

Added: branches/refactor1/framework/impl/src/main/javascript/ajaxjsf/sarissa_ieemu_xslt.js
===================================================================
--- branches/refactor1/framework/impl/src/main/javascript/ajaxjsf/sarissa_ieemu_xslt.js	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/javascript/ajaxjsf/sarissa_ieemu_xslt.js	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,165 @@
+/**
+ * ====================================================================
+ * About
+ * ====================================================================
+ * Sarissa cross browser XML library - IE XSLT Emulation (deprecated)
+ * @version ${project.version}
+ * @author: Manos Batsis, mailto: mbatsis at users full stop sourceforge full stop net
+ *
+ * This script emulates Internet Explorer's transformNode and transformNodeToObject
+ * for Mozilla and provides a common way to set XSLT parameters
+ * via Sarissa.setXslParameter.
+ *
+ * All functionality in this file is DEPRECATED, the XSLTProcessor
+ * should be used instead.
+ *
+ * ====================================================================
+ * Licence
+ * ====================================================================
+ * Sarissa is free software distributed under the GNU GPL version 2 (see <a href="gpl.txt">gpl.txt</a>) or higher, 
+ * GNU LGPL version 2.1 (see <a href="lgpl.txt">lgpl.txt</a>) or higher and Apache Software License 2.0 or higher 
+ * (see <a href="asl.txt">asl.txt</a>). This means you can choose one of the three and use that if you like. If 
+ * you make modifications under the ASL, i would appreciate it if you submitted those.
+ * In case your copy of Sarissa does not include the license texts, you may find
+ * them online in various formats at <a href="http://www.gnu.org">http://www.gnu.org</a> and 
+ * <a href="http://www.apache.org">http://www.apache.org</a>.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY 
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 
+ * WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE 
+ * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+if(!Sarissa.IS_ENABLED_TRANSFORM_NODE && window.XSLTProcessor){
+    /** 
+     * <p><b>Deprecated, will be removed in 0.9.6 (use XSLTProcessor instead): </b>Extends the Element class to emulate IE's transformNodeToObject (deprecated).
+     * <b>Note </b>: The transformation result <i>must </i> be well formed,
+     * otherwise an error will be thrown</p>
+     * @uses Mozilla's XSLTProcessor  
+     * @deprecated use the XSLTProcessor instead
+     * @argument xslDoc The stylesheet to use (a DOM Document instance)
+     * @argument oResult The Document to store the transformation result
+     */
+    XMLElement.prototype.transformNodeToObject = function(xslDoc, oResult){
+        var oDoc = document.implementation.createDocument("", "", null);
+        Sarissa.copyChildNodes(this, oDoc);
+        oDoc.transformNodeToObject(xslDoc, oResult);
+    };
+    /**
+     * <p><b>Deprecated, will be removed in 0.9.6 (use XSLTProcessor instead): </b> Extends the Document class to emulate IE's transformNodeToObject (deprecated).</p>
+     * @uses Mozilla's XSLTProcessor  
+     * @deprecated use the XSLTProcessor instead
+     * @argument xslDoc The stylesheet to use (a DOM Document instance)
+     * @argument oResult The Document to store the transformation result
+     * @throws Errors that try to be informative
+     */
+    Document.prototype.transformNodeToObject = function(xslDoc, oResult){
+        var xsltProcessor = null;
+        try{
+            xsltProcessor = new XSLTProcessor();
+            if(xsltProcessor.reset){
+                /* new nsIXSLTProcessor is available */
+                xsltProcessor.importStylesheet(xslDoc);
+                var newFragment = xsltProcessor.transformToFragment(this, oResult);
+                Sarissa.copyChildNodes(newFragment, oResult);
+            }else{
+                /* only nsIXSLTProcessorObsolete is available */
+                xsltProcessor.transformDocument(this, xslDoc, oResult, null);
+            };
+        }catch(e){
+            if(xslDoc && oResult)
+                throw "Failed to transform document. (original exception: "+e+")";
+            else if(!xslDoc)
+                throw "No Stylesheet Document was provided. (original exception: "+e+")";
+            else if(!oResult)
+                throw "No Result Document was provided. (original exception: "+e+")";
+            else if(xsltProcessor == null)
+                throw "Could not instantiate an XSLTProcessor object. (original exception: "+e+")";
+            else
+                throw e;
+        };
+    };
+    /**
+     * <p><b>Deprecated, will be removed in 0.9.6 (use XSLTProcessor instead): </b>Extends the Element class to emulate IE's transformNode (deprecated). </p>
+     * <p><b>Note </b>: The result of your transformation must be well formed,
+     * otherwise you will get an error</p>. 
+     * @uses Mozilla's XSLTProcessor    
+     * @deprecated use the XSLTProcessor instead
+     * @argument xslDoc The stylesheet to use (a DOM Document instance)
+     * @returns the result of the transformation serialized to an XML String
+     */
+    XMLElement.prototype.transformNode = function(xslDoc){
+        var oDoc = document.implementation.createDocument("", "", null);
+        Sarissa.copyChildNodes(this, oDoc);
+        return oDoc.transformNode(xslDoc);
+    };
+    /**
+     * <p><b>Deprecated, will be removed in 0.9.6 (use XSLTProcessor instead): </b>Extends the Document class to emulate IE's transformNode (deprecated).</p>
+     * <p><b>Note </b>: The result of your transformation must be well formed,
+     * otherwise you will get an error</p>
+     * @uses Mozilla's XSLTProcessor
+     * @deprecated use the XSLTProcessor instead
+     * @argument xslDoc The stylesheet to use (a DOM Document instance)
+     * @returns the result of the transformation serialized to an XML String
+     */
+    Document.prototype.transformNode = function(xslDoc){
+        var out = document.implementation.createDocument("", "", null);
+        this.transformNodeToObject(xslDoc, out);
+        var str = null;
+        try{
+            var serializer = new XMLSerializer();
+            str = serializer.serializeToString(out);
+        }catch(e){
+            throw "Failed to serialize result document. (original exception: "+e+")";
+        };
+        return str;
+    };
+    Sarissa.IS_ENABLED_TRANSFORM_NODE = true;
+};
+/**
+ * <p>Deprecated (use XSLTProcessor instead): Set xslt parameters.</p>
+ * <p><b>Note </b> that this method can only work for the main stylesheet and not any included/imported files.</p>
+ * @deprecated use the XSLTProcessor instead
+ * @argument oXslDoc the target XSLT DOM Document
+ * @argument sParamName the name of the XSLT parameter
+ * @argument sParamValue the value of the XSLT parameter
+ * @returns whether the parameter was set succefully
+ */
+Sarissa.setXslParameter = function(oXslDoc, sParamQName, sParamValue){
+    try{
+        var params = oXslDoc.getElementsByTagName(_SARISSA_IEPREFIX4XSLPARAM+"param");
+        var iLength = params.length;
+        var bFound = false;
+        var param;
+        if(sParamValue){
+            for(var i=0; i < iLength && !bFound;i++){
+                if(params[i].getAttribute("name") == sParamQName){
+                        param = params[i];
+                    while(param.firstChild)
+                        param.removeChild(param.firstChild);
+                    if(!sParamValue || sParamValue == null){
+                    }else if(typeof sParamValue == "string"){ 
+                        param.setAttribute("select", sParamValue);
+                        bFound = true;
+                    }else if(sParamValue.nodeName){
+                        param.removeAttribute("select");
+                        param.appendChild(sParamValue.cloneNode(true));
+                        bFound = true;
+                    }else if (sParamValue.item(0) && sParamValue.item(0).nodeType){
+                        for(var j=0;j < sParamValue.length;j++)
+                            if(sParamValue.item(j).nodeType)
+                                param.appendChild(sParamValue.item(j).cloneNode(true));
+                        bFound = true;
+                    }else
+                        throw "Failed to set xsl:param "+sParamQName+" (original exception: "+e+")";
+                };
+            };
+        };
+        return bFound;
+    }catch(e){
+        throw e;
+        return false;
+    };
+};

Added: branches/refactor1/framework/impl/src/main/javascript/ajaxjsf/smartposition.js
===================================================================
--- branches/refactor1/framework/impl/src/main/javascript/ajaxjsf/smartposition.js	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/javascript/ajaxjsf/smartposition.js	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,134 @@
+if (!Exadel) {var Exadel = {};}
+if (!Exadel.SmartPosition )
+Exadel.SmartPosition = {
+	options: $H({"positionX": ["right","left","center"], "positionY": ["bottom","top"], positionFloat: true}),
+	getBase: function() {
+		return (document.compatMode && document.compatMode.toLowerCase() == "css1compat" && 
+						!/Netscape|Opera/.test(navigator.userAgent)) ?
+			document.documentElement : (document.body || null);
+	},
+
+	screenOffset: function (element, debug) {
+		element = $(element);
+//		var offset = Position.page(element);
+
+		var base = this.getBase();
+		var isOpera = /Opera/.test(navigator.userAgent);
+		var valueT = 0, valueL = 0;
+
+var str = "";
+		var _element = element;
+		do {
+str += "element: " + _element.tagName + ", offsetTop = " + _element.offsetTop + ", offsetLeft = " + _element.offsetLeft + "\n";
+			valueT += _element.offsetTop  || 0; valueL += _element.offsetLeft || 0;
+str += "valueT = " + valueT + ", valueL = " + valueL + "\n";
+
+//			if (_element.offsetParent==document.body && Element.getStyle(_element,'position')=='absolute') break;
+			if (_element.offsetParent == base && Element.getStyle(_element,'position')=='absolute') break;
+
+		} while (_element = _element.offsetParent);
+
+str += "\n\n";
+		_element = element;
+		do {
+str += "element: " + _element.tagName + ", scrollTop = " + _element.scrollTop + ", scrollLeft = " + _element.scrollLeft + "\n";
+			if (!isOpera || 
+				(_element.tagName != undefined && (_element.tagName.toLowerCase() != "tr" && _element != element && _element != element.parentNode)				 )
+				) {
+				valueT -= _element.scrollTop  || 0; valueL -= _element.scrollLeft || 0;
+			}
+str += "valueT = " + valueT + ", valueL = " + valueL + "\n";
+			if (_element == base) break;
+		} while (_element = _element.parentNode);
+
+		var offset = [valueL, valueT];
+if (arguments.length > 1 && debug) alert(str + "\n\n" + "offset = " + offset);
+
+		element = $(element);
+		if (!isOpera && element.tagName.toLowerCase() == "input") offset[0] += element.scrollLeft;
+
+		return offset;
+	},
+
+	getVSpaces: function (element) {
+		var base = this.getBase();
+		if (this.isElement(element)) {
+			var screenOffset = this.screenOffset(element);
+			var dimensions = Element.getDimensions(element);
+			var top = screenOffset[1];
+			var bottom = base.clientHeight - screenOffset[1] - dimensions.height;
+		} else {
+			var top = element[1] - base.scrollTop;
+			var bottom = base.clientHeight - (element[1] - base.scrollTop);
+		}
+		return {top: top, bottom: bottom};
+	},
+
+	getHSpaces: function (element) {
+		var base = this.getBase();
+		if (this.isElement(element)) {
+			var screenOffset = this.screenOffset(element);
+			var dimensions = Element.getDimensions(element);
+			var left = screenOffset[0] + dimensions.width;
+			var right = base.clientWidth - screenOffset[0];
+		} else {
+			var left = element[0] - base.scrollLeft;
+			var right = base.clientWidth - (element[0] - base.scrollLeft);
+		}
+		return {left: left, right: right};
+	},
+
+	getPosition: function (element, popup, options) {
+		var base = this.getBase();
+		var popupDimensions = [$(popup).offsetWidth, $(popup).offsetHeight];
+		var hSpaces = this.getHSpaces(element);
+		var vSpaces = this.getVSpaces(element);
+
+		if (this.isElement(element)) {
+			var screenOffset = this.screenOffset(element);
+			var elementDimensions = {width: $(element).offsetWidth, height: $(element).offsetHeight};
+			var pos = [screenOffset[0], screenOffset[1] + elementDimensions.height];
+		} else {
+			var pos = [element[0], element[1]];
+		}
+		if (hSpaces.right < popupDimensions[0] &&
+			hSpaces.left >= popupDimensions[0]) {
+			if (this.isElement(element)) {
+				pos[0] = screenOffset[0] + elementDimensions.width - popupDimensions[0];
+			} else {
+				pos[0] = element[0] - popupDimensions[0];
+			}
+		}
+		if (this.isElement(element)) pos[0] += base.scrollLeft; 
+		if (vSpaces.bottom < popupDimensions[1] &&
+			vSpaces.top >= popupDimensions[1]) {
+			if (this.isElement(element)) {
+				pos[1] = screenOffset[1] - popupDimensions[1];
+			} else {
+				pos[1] = pos[1] - popupDimensions[1];
+			}
+		}
+		if (this.isElement(element)) pos[1] += base.scrollTop;
+		return pos;
+	},
+
+	getOption: function (options) {
+		if (options) {
+			return $H(options);
+		} else {
+			return this.options;
+		}
+	},
+
+	calcSizes: function(content) {
+		if (content.tagName.toLowerCase() == "table") {
+			content.style.width = "0px";
+			content.style.height = "0px";
+			return {width: content.offsetWidth, height: content.offsetHeight};
+		}
+	},
+
+	isElement: function(element) {
+		return (element.length == undefined);
+	}
+}

Added: branches/refactor1/framework/impl/src/main/javascript/comment.js
===================================================================
--- branches/refactor1/framework/impl/src/main/javascript/comment.js	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/javascript/comment.js	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,27 @@
+
+/*------------------------------------------------*/
+
+function fun(linkId,formName,target,parameters){
+	var form = document.forms[formName];
+	if(form){
+		var hiddenFiled = form.elements[form.name+":_idcl"];
+		hiddenField.value=linkId;
+		if(target){
+			form.target=target;
+		}
+		for(var param in parameters){
+			if(form.elements[param]){
+				form.elements[param].value = parameters[param];
+			} else {
+				var input = document.createElement("input");
+				input.type="hidden";
+				input.name=param;
+				input.value=parameters[param];
+				form.appendChild(input);
+			}
+		}
+		form.submit();
+	} else {
+		alert("Form "+formName+" not found in document");
+	}
+};
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/javascript/dnd/dnd-draggable.js
===================================================================
--- branches/refactor1/framework/impl/src/main/javascript/dnd/dnd-draggable.js	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/javascript/dnd/dnd-draggable.js	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,55 @@
+/**
+ * @author Maksim Kaszynski
+ * base class for draggable component.
+ */
+DnD.Draggable = function() {};
+DnD.Draggable.prototype = {
+	
+	/**
+	 * @return type of draggable content
+	 */
+	getContentType: function() {
+		return "ZZZZZ";
+	},
+	/**
+	 * implementations are responsible for getting drag indicator
+	 * @return DnD.Indicator
+	 */
+	getIndicator: function() {
+		return null;
+	},
+
+	startDrag : function(event) {
+		var type = this.getContentType();
+		var indicator = this.getIndicator();
+		var drag = new DnD.Drag(this, indicator, type);
+		DnD.startDrag(drag);
+		DnD.updateDrag(event);
+		this.ondragstart(event, drag);
+		if (indicator) {
+			indicator.show();
+		}
+	},
+	/**
+	 * 
+	 * @param {DnD.Drag} drag
+	 */
+	endDrag: function(event, drag) {
+		var indicator = drag.indicator;
+		if (indicator) {
+			indicator.hide();
+		}
+		this.ondragend(event, drag);
+	},
+	/**
+	 * cubclasses may define custom behavior
+	 * @param {Object} drag
+	 */
+	ondragstart: function(event, drag) {
+		
+	},
+	
+	ondragend: function (event, drag) {
+		
+	}
+};
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/javascript/dnd/dnd-dropzone.js
===================================================================
--- branches/refactor1/framework/impl/src/main/javascript/dnd/dnd-dropzone.js	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/javascript/dnd/dnd-dropzone.js	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,82 @@
+/**
+ * @author Maksim Kaszynski
+ *	@classDescription
+ * Base class for drop zones
+ */
+DnD.Dropzone = function(){};
+DnD.Dropzone.DROP_TARGET_ID = "dropTargetId";
+DnD.Dropzone.prototype = {
+	/**
+	 * 
+	 * @param {Object} drag
+	 * @return 
+	 */
+	accept: function(drag) {
+		return this.getAcceptedTypes().indexOf(drag.type) > -1 ;
+	},
+	getAcceptedTypes: function() {
+		return [];
+	},
+	getTypeMapping: function() {
+		return {};
+	},
+	drop: function(event, drag){
+	},		
+	getIconCodeForType: function(type) {
+		var types = this.getTypeMapping();
+		if (type && types) {
+			return types[type];
+		}
+		return null;
+	},
+
+	/**
+	 * implementations call this method when mouse over them
+	 * @param {Object} drag
+	 */
+	dragEnter: function(event) {
+		var drag = window.drag;
+		drag.dropzone = this;	
+		var icon;
+		var indicator = drag.indicator;
+		if (this.accept(drag)) {
+			icon = this.getIconCodeForType(drag.type);
+			if (!indicator.hasTemplate(icon)) {
+				icon = DnD.CODE_ACCEPT;
+			}
+			indicator.accept();
+		} else {
+			icon = DnD.CODE_REJECT;
+			indicator.reject();
+		}
+		indicator.setLeftCell(icon);
+	},
+	
+	
+	/**
+	 * Implementations call this method when mouse exits them
+	 * @param {Object} drag
+	 */
+	dragLeave: function(event) {
+		var drag = window.drag;
+		drag.dropzone = null;
+		var indicator = drag.indicator;
+		indicator.setLeftCell(DnD.CODE_DEFAULT);
+		indicator.leave();
+	},
+	
+	onafterdrag: function(event) {
+	},
+	
+	onbeforedrag: function(event, drag){
+	},
+	
+	ondragenter: function(event) {
+		
+	},
+	ondragexit : function(event) {
+		
+	}
+	
+};
+

Added: branches/refactor1/framework/impl/src/main/javascript/dnd/dnd.js
===================================================================
--- branches/refactor1/framework/impl/src/main/javascript/dnd/dnd.js	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/javascript/dnd/dnd.js	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,100 @@
+/**
+ * Document-wide object manipulating drag and drop events.
+ * When drag is in process, <code>window.drag</code> object of class <code>DnD.Drag</code> holds its state.
+ * Draggables should create DnD.Drag instance and pass it to DnD.startDrag call to initialize drag.
+ * Dropzones should implement accept method to be able to get drag results.
+ * @author Maksim Kaszynski
+ */
+var DnD = {
+	
+	CODE_ACCEPT : "accept",
+	
+	CODE_DEFAULT: "default",
+	
+	CODE_REJECT: "reject",
+	
+	/**
+	 * Switch mouse observing to DnD mode
+	 * @param {DnD.Drag} drag
+	 */
+	startDrag: function(drag) {
+		if (!window.drag) {
+			this.init();
+			window.drag = drag;
+			Event.observe(document, 'mousemove', this.mousemove);
+			Event.observe(document, 'mouseup', this.mouseup);
+		} else {
+			alert('drag in progress');
+		}
+	},
+	
+	endDrag: function(event) {
+		Event.stopObserving(document, 'mousemove', this.mousemove);
+		Event.stopObserving(document, 'mouseup', this.mouseup);
+		var drag = window.drag;
+		if (drag) {
+			window.drag = null;
+			var dropzone = drag.dropzone;
+			drag.source.endDrag(event, drag);
+			if (dropzone) {
+				dropzone.onbeforedrag(event, drag);
+				if (dropzone.accept(drag)) {
+					dropzone.drop(event, drag);
+				}
+				dropzone.onafterdrag(event);
+			}
+		}
+	},
+	
+	updateDrag: function(event) {
+		var drag = window.drag;
+	    
+	    if (!drag.source.onupdatedrag || (drag.source.onupdatedrag(event) != false)) {
+		    var x = Event.pointerX(event);
+		    var y = Event.pointerY(event);
+			drag.indicator.position(x + 5, y + 14);
+			Event.stop(event);
+	    }
+	},
+	
+	initialized : false,
+	
+	init: function() {
+		if (!this.initialized) {
+			this.mousemove = this.updateDrag.bindAsEventListener(this);
+			this.mouseup = this.endDrag.bindAsEventListener(this);
+			this.initialized = true;
+		}	
+			
+	}
+	
+
+
+};
+
+/**
+ * @classDescription
+ * Object holding drag state info
+ */
+DnD.Drag = Class.create();
+DnD.Drag.prototype = {
+	/**
+	 * @constructor
+	 * @param {DnD.Draggable} source
+	 * @param {DnD.Indicator} indicator
+	 */
+	initialize: function(source, indicator, type) {
+		this.source = source;
+		this.indicator = indicator;
+		this.type = type;
+	},
+	params: {},
+	dragged: false,
+	dropzone: null,
+	getParameters: function() {
+		var params = {};
+		Object.extend(params, this.params);
+	
+		return params;
+	}
+};

Added: branches/refactor1/framework/impl/src/main/javascript/dnd/epilog.js
===================================================================
--- branches/refactor1/framework/impl/src/main/javascript/dnd/epilog.js	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/javascript/dnd/epilog.js	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,4 @@
+/*
+* final trail for ajax jsf library
+*/
+// }
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/javascript/dnd/prolog.js
===================================================================
--- branches/refactor1/framework/impl/src/main/javascript/dnd/prolog.js	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/javascript/dnd/prolog.js	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,5 @@
+/*
+ * Prolog for avoid execute Prototype library twice.
+ */
+
+//if(!window.DnD){

Added: branches/refactor1/framework/impl/src/main/javascript/prototype/HEADER
===================================================================
--- branches/refactor1/framework/impl/src/main/javascript/prototype/HEADER	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/javascript/prototype/HEADER	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,21 @@
+/*  Prototype JavaScript framework, version <%= PROTOTYPE_VERSION %>
+
+ *  (c) 2005 Sam Stephenson <sam at conio.net>
+
+ *
+
+ *  THIS FILE IS AUTOMATICALLY GENERATED. When sending patches, please diff
+
+ *  against the source tree, available from the Prototype darcs repository. 
+
+ *
+
+ *  Prototype is freely distributable under the terms of an MIT-style license.
+
+ *
+
+ *  For details, see the Prototype web site: http://prototype.conio.net/
+
+ *
+
+/*--------------------------------------------------------------------------*/
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/javascript/prototype/ajax.js
===================================================================
--- branches/refactor1/framework/impl/src/main/javascript/prototype/ajax.js	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/javascript/prototype/ajax.js	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,285 @@
+var Ajax = {
+  getTransport: function() {
+    return Try.these(
+      function() {return new ActiveXObject('Msxml2.XMLHTTP')},
+      function() {return new ActiveXObject('Microsoft.XMLHTTP')},
+      function() {return new XMLHttpRequest()}
+    ) || false;
+  },
+  
+  activeRequestCount: 0
+}
+
+Ajax.Responders = {
+  responders: [],
+  
+  _each: function(iterator) {
+    this.responders._each(iterator);
+  },
+
+  register: function(responderToAdd) {
+    if (!this.include(responderToAdd))
+      this.responders.push(responderToAdd);
+  },
+  
+  unregister: function(responderToRemove) {
+    this.responders = this.responders.without(responderToRemove);
+  },
+  
+  dispatch: function(callback, request, transport, json) {
+    this.each(function(responder) {
+      if (responder[callback] && typeof responder[callback] == 'function') {
+        try {
+          responder[callback].apply(responder, [request, transport, json]);
+        } catch (e) {}
+      }
+    });
+  }
+};
+
+Object.extend(Ajax.Responders, Enumerable);
+
+Ajax.Responders.register({
+  onCreate: function() {
+    Ajax.activeRequestCount++;
+  },
+  
+  onComplete: function() {
+    Ajax.activeRequestCount--;
+  }
+});
+
+Ajax.Base = function() {};
+Ajax.Base.prototype = {
+  setOptions: function(options) {
+    this.options = {
+      method:       'post',
+      asynchronous: true,
+      parameters:   ''
+    }
+    Object.extend(this.options, options || {});
+  },
+
+  responseIsSuccess: function() {
+    return this.transport.status == undefined
+        || this.transport.status == 0 
+        || (this.transport.status >= 200 && this.transport.status < 300);
+  },
+
+  responseIsFailure: function() {
+    return !this.responseIsSuccess();
+  }
+}
+
+Ajax.Request = Class.create();
+Ajax.Request.Events = 
+  ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete'];
+
+Ajax.Request.prototype = Object.extend(new Ajax.Base(), {
+  initialize: function(url, options) {
+    this.transport = Ajax.getTransport();
+    this.setOptions(options);
+    this.request(url);
+  },
+
+  request: function(url) {
+    var parameters = this.options.parameters || '';
+    if (parameters.length > 0) parameters += '&_=';
+
+    try {
+      this.url = url;
+      if (this.options.method == 'get' && parameters.length > 0)
+        this.url += (this.url.match(/\?/) ? '&' : '?') + parameters;
+      
+      Ajax.Responders.dispatch('onCreate', this, this.transport);
+      
+      this.transport.open(this.options.method, this.url, 
+        this.options.asynchronous);
+
+      if (this.options.asynchronous) {
+        this.transport.onreadystatechange = this.onStateChange.bind(this);
+        setTimeout((function() {this.respondToReadyState(1)}).bind(this), 10);
+      }
+
+      this.setRequestHeaders();
+
+      var body = this.options.postBody ? this.options.postBody : parameters;
+      this.transport.send(this.options.method == 'post' ? body : null);
+
+    } catch (e) {
+      this.dispatchException(e);
+    }
+  },
+
+  setRequestHeaders: function() {
+    var requestHeaders = 
+      ['X-Requested-With', 'XMLHttpRequest',
+       'X-Prototype-Version', Prototype.Version];
+
+    if (this.options.method == 'post') {
+      requestHeaders.push('Content-type', 
+        'application/x-www-form-urlencoded');
+
+      /* Force "Connection: close" for Mozilla browsers to work around
+       * a bug where XMLHttpReqeuest sends an incorrect Content-length
+       * header. See Mozilla Bugzilla #246651. 
+       */
+      if (this.transport.overrideMimeType)
+        requestHeaders.push('Connection', 'close');
+    }
+
+    if (this.options.requestHeaders)
+      requestHeaders.push.apply(requestHeaders, this.options.requestHeaders);
+
+    for (var i = 0; i < requestHeaders.length; i += 2)
+      this.transport.setRequestHeader(requestHeaders[i], requestHeaders[i+1]);
+  },
+
+  onStateChange: function() {
+    var readyState = this.transport.readyState;
+    if (readyState != 1)
+      this.respondToReadyState(this.transport.readyState);
+  },
+  
+  header: function(name) {
+    try {
+      return this.transport.getResponseHeader(name);
+    } catch (e) {}
+  },
+  
+  evalJSON: function() {
+    try {
+      return eval(this.header('X-JSON'));
+    } catch (e) {}
+  },
+  
+  evalResponse: function() {
+    try {
+      return eval(this.transport.responseText);
+    } catch (e) {
+      this.dispatchException(e);
+    }
+  },
+
+  respondToReadyState: function(readyState) {
+    var event = Ajax.Request.Events[readyState];
+    var transport = this.transport, json = this.evalJSON();
+
+    if (event == 'Complete') {
+      try {
+        (this.options['on' + this.transport.status]
+         || this.options['on' + (this.responseIsSuccess() ? 'Success' : 'Failure')]
+         || Prototype.emptyFunction)(transport, json);
+      } catch (e) {
+        this.dispatchException(e);
+      }
+      
+      if ((this.header('Content-type') || '').match(/^text\/javascript/i))
+        this.evalResponse();
+    }
+    
+    try {
+      (this.options['on' + event] || Prototype.emptyFunction)(transport, json);
+      Ajax.Responders.dispatch('on' + event, this, transport, json);
+    } catch (e) {
+      this.dispatchException(e);
+    }
+    
+    /* Avoid memory leak in MSIE: clean up the oncomplete event handler */
+    if (event == 'Complete')
+      this.transport.onreadystatechange = Prototype.emptyFunction;
+  },
+  
+  dispatchException: function(exception) {
+    (this.options.onException || Prototype.emptyFunction)(this, exception);
+    Ajax.Responders.dispatch('onException', this, exception);
+  }
+});
+
+Ajax.Updater = Class.create();
+
+Object.extend(Object.extend(Ajax.Updater.prototype, Ajax.Request.prototype), {
+  initialize: function(container, url, options) {
+    this.containers = {
+      success: container.success ? $(container.success) : $(container),
+      failure: container.failure ? $(container.failure) :
+        (container.success ? null : $(container))
+    }
+
+    this.transport = Ajax.getTransport();
+    this.setOptions(options);
+
+    var onComplete = this.options.onComplete || Prototype.emptyFunction;
+    this.options.onComplete = (function(transport, object) {
+      this.updateContent();
+      onComplete(transport, object);
+    }).bind(this);
+
+    this.request(url);
+  },
+
+  updateContent: function() {
+    var receiver = this.responseIsSuccess() ?
+      this.containers.success : this.containers.failure;
+    var response = this.transport.responseText;
+    
+    if (!this.options.evalScripts)
+      response = response.stripScripts();
+
+    if (receiver) {
+      if (this.options.insertion) {
+        new this.options.insertion(receiver, response);
+      } else {
+        Element.update(receiver, response);
+      }
+    }
+
+    if (this.responseIsSuccess()) {
+      if (this.onComplete)
+        setTimeout(this.onComplete.bind(this), 10);
+    }
+  }
+});
+
+Ajax.PeriodicalUpdater = Class.create();
+Ajax.PeriodicalUpdater.prototype = Object.extend(new Ajax.Base(), {
+  initialize: function(container, url, options) {
+    this.setOptions(options);
+    this.onComplete = this.options.onComplete;
+
+    this.frequency = (this.options.frequency || 2);
+    this.decay = (this.options.decay || 1);
+    
+    this.updater = {};
+    this.container = container;
+    this.url = url;
+
+    this.start();
+  },
+
+  start: function() {
+    this.options.onComplete = this.updateComplete.bind(this);
+    this.onTimerEvent();
+  },
+
+  stop: function() {
+    this.updater.onComplete = undefined;
+    clearTimeout(this.timer);
+    (this.onComplete || Prototype.emptyFunction).apply(this, arguments);
+  },
+
+  updateComplete: function(request) {
+    if (this.options.decay) {
+      this.decay = (request.responseText == this.lastText ? 
+        this.decay * this.options.decay : 1);
+
+      this.lastText = request.responseText;
+    }
+    this.timer = setTimeout(this.onTimerEvent.bind(this), 
+      this.decay * this.frequency * 1000);
+  },
+
+  onTimerEvent: function() {
+    this.updater = new Ajax.Updater(this.container, this.url, this.options);
+  }
+});

Added: branches/refactor1/framework/impl/src/main/javascript/prototype/array.js
===================================================================
--- branches/refactor1/framework/impl/src/main/javascript/prototype/array.js	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/javascript/prototype/array.js	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,77 @@
+var $A = Array.from = function(iterable) {
+  if (!iterable) return [];
+  if (iterable.toArray) {
+    return iterable.toArray();
+  } else {
+    var results = [];
+    for (var i = 0; i < iterable.length; i++)
+      results.push(iterable[i]);
+    return results;
+  }
+}
+
+Object.extend(Array.prototype, Enumerable);
+
+Array.prototype._reverse = Array.prototype.reverse;
+
+Object.extend(Array.prototype, {
+  _each: function(iterator) {
+    for (var i = 0; i < this.length; i++)
+      iterator(this[i]);
+  },
+  
+  clear: function() {
+    this.length = 0;
+    return this;
+  },
+  
+  first: function() {
+    return this[0];
+  },
+  
+  last: function() {
+    return this[this.length - 1];
+  },
+  
+  compact: function() {
+    return this.select(function(value) {
+      return value != undefined || value != null;
+    });
+  },
+  
+  flatten: function() {
+    return this.inject([], function(array, value) {
+      return array.concat(value.constructor == Array ?
+        value.flatten() : [value]);
+    });
+  },
+  
+  without: function() {
+    var values = $A(arguments);
+    return this.select(function(value) {
+      return !values.include(value);
+    });
+  },
+  
+  indexOf: function(object) {
+    for (var i = 0; i < this.length; i++)
+      if (this[i] == object) return i;
+    return -1;
+  },
+  
+  reverse: function(inline) {
+    return (inline !== false ? this : this.toArray())._reverse();
+  },
+  
+  shift: function() {
+    var result = this[0];
+    for (var i = 0; i < this.length - 1; i++)
+      this[i] = this[i + 1];
+    this.length--;
+    return result;
+  },
+
+  inspect: function() {
+    return '[' + this.map(Object.inspect).join(', ') + ']';
+  }
+});

Added: branches/refactor1/framework/impl/src/main/javascript/prototype/base.js
===================================================================
--- branches/refactor1/framework/impl/src/main/javascript/prototype/base.js	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/javascript/prototype/base.js	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,121 @@
+var Class = {
+  create: function() {
+    return function() { 
+      this.initialize.apply(this, arguments);
+    }
+  }
+}
+
+var Abstract = new Object();
+
+Object.extend = function(destination, source) {
+  for (property in source) {
+    destination[property] = source[property];
+  }
+  return destination;
+}
+
+Object.inspect = function(object) {
+  try {
+    if (object == undefined) return 'undefined';
+    if (object == null) return 'null';
+    return object.inspect ? object.inspect() : object.toString();
+  } catch (e) {
+    if (e instanceof RangeError) return '...';
+    throw e;
+  }
+}
+
+Function.prototype.bind = function() {
+  var __method = this, args = $A(arguments), object = args.shift();
+  return function() {
+    return __method.apply(object, args.concat($A(arguments)));
+  }
+}
+
+Function.prototype.bindAsEventListener = function(object) {
+  var __method = this;
+  return function(event) {
+    return __method.call(object, event || window.event);
+  }
+}
+
+Object.extend(Number.prototype, {
+  toColorPart: function() {
+    var digits = this.toString(16);
+    if (this < 16) return '0' + digits;
+    return digits;
+  },
+
+  succ: function() {
+    return this + 1;
+  },
+  
+  times: function(iterator) {
+    $R(0, this, true).each(iterator);
+    return this;
+  }
+});
+
+var Try = {
+  these: function() {
+    var returnValue;
+
+    for (var i = 0; i < arguments.length; i++) {
+      var lambda = arguments[i];
+      try {
+        returnValue = lambda();
+        break;
+      } catch (e) {}
+    }
+
+    return returnValue;
+  }
+}
+
+/*--------------------------------------------------------------------------*/
+
+var PeriodicalExecuter = Class.create();
+PeriodicalExecuter.prototype = {
+  initialize: function(callback, frequency) {
+    this.callback = callback;
+    this.frequency = frequency;
+    this.currentlyExecuting = false;
+
+    this.registerCallback();
+  },
+
+  registerCallback: function() {
+    setInterval(this.onTimerEvent.bind(this), this.frequency * 1000);
+  },
+
+  onTimerEvent: function() {
+    if (!this.currentlyExecuting) {
+      try { 
+        this.currentlyExecuting = true;
+        this.callback(); 
+      } finally { 
+        this.currentlyExecuting = false;
+      }
+    }
+  }
+}
+
+/*--------------------------------------------------------------------------*/
+
+function $() {
+  var elements = new Array();
+
+  for (var i = 0; i < arguments.length; i++) {
+    var element = arguments[i];
+    if (typeof element == 'string')
+      element = document.getElementById(element);
+
+    if (arguments.length == 1) 
+      return element;
+
+    elements.push(element);
+  }
+
+  return elements;
+}

Added: branches/refactor1/framework/impl/src/main/javascript/prototype/compat.js
===================================================================
--- branches/refactor1/framework/impl/src/main/javascript/prototype/compat.js	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/javascript/prototype/compat.js	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,27 @@
+if (!Array.prototype.push) {
+  Array.prototype.push = function() {
+		var startLength = this.length;
+		for (var i = 0; i < arguments.length; i++)
+      this[startLength + i] = arguments[i];
+	  return this.length;
+  }
+}
+
+if (!Function.prototype.apply) {
+  // Based on code from http://www.youngpup.net/
+  Function.prototype.apply = function(object, parameters) {
+    var parameterStrings = new Array();
+    if (!object)     object = window;
+    if (!parameters) parameters = new Array();
+    
+    for (var i = 0; i < parameters.length; i++)
+      parameterStrings[i] = 'parameters[' + i + ']';
+    
+    object.__apply__ = this;
+    var result = eval('object.__apply__(' + 
+      parameterStrings.join(', ') + ')');
+    object.__apply__ = null;
+    
+    return result;
+  }
+}

Added: branches/refactor1/framework/impl/src/main/javascript/prototype/dom.js
===================================================================
--- branches/refactor1/framework/impl/src/main/javascript/prototype/dom.js	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/javascript/prototype/dom.js	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,317 @@
+document.getElementsByClassName = function(className, parentElement) {
+  var children = ($(parentElement) || document.body).getElementsByTagName('*');
+  return $A(children).inject([], function(elements, child) {
+    if (child.className.match(new RegExp("(^|\\s)" + className + "(\\s|$)")))
+      elements.push(child);
+    return elements;
+  });
+}
+
+/*--------------------------------------------------------------------------*/
+
+if (!window.Element) {
+  var Element = new Object();
+}
+
+Object.extend(Element, {
+  visible: function(element) {
+    return $(element).style.display != 'none';
+  },
+  
+  toggle: function() {
+    for (var i = 0; i < arguments.length; i++) {
+      var element = $(arguments[i]);
+      Element[Element.visible(element) ? 'hide' : 'show'](element);
+    }
+  },
+
+  hide: function() {
+    for (var i = 0; i < arguments.length; i++) {
+      var element = $(arguments[i]);
+      element.style.display = 'none';
+    }
+  },
+  
+  show: function() {
+    for (var i = 0; i < arguments.length; i++) {
+      var element = $(arguments[i]);
+      element.style.display = '';
+    }
+  },
+
+  remove: function(element) {
+    element = $(element);
+    element.parentNode.removeChild(element);
+  },
+
+  update: function(element, html) {
+    $(element).innerHTML = html.stripScripts();
+    setTimeout(function() {html.evalScripts()}, 10);
+  },
+  
+  getHeight: function(element) {
+    element = $(element);
+    return element.offsetHeight; 
+  },
+  
+  classNames: function(element) {
+    return new Element.ClassNames(element);
+  },
+
+  hasClassName: function(element, className) {
+    if (!(element = $(element))) return;
+    return Element.classNames(element).include(className);
+  },
+
+  addClassName: function(element, className) {
+    if (!(element = $(element))) return;
+    return Element.classNames(element).add(className);
+  },
+
+  removeClassName: function(element, className) {
+    if (!(element = $(element))) return;
+    return Element.classNames(element).remove(className);
+  },
+  
+  // removes whitespace-only text node children
+  cleanWhitespace: function(element) {
+    element = $(element);
+    for (var i = 0; i < element.childNodes.length; i++) {
+      var node = element.childNodes[i];
+      if (node.nodeType == 3 && !/\S/.test(node.nodeValue)) 
+        Element.remove(node);
+    }
+  },
+  
+  empty: function(element) {
+    return $(element).innerHTML.match(/^\s*$/);
+  },
+  
+  scrollTo: function(element) {
+    element = $(element);
+    var x = element.x ? element.x : element.offsetLeft,
+        y = element.y ? element.y : element.offsetTop;
+    window.scrollTo(x, y);
+  },
+  
+  getStyle: function(element, style) {
+    element = $(element);
+    var value = element.style ? element.style[style.camelize()] : null;
+    if (!value) {
+      if (document.defaultView && document.defaultView.getComputedStyle) {
+        var css = document.defaultView.getComputedStyle(element, null);
+        value = css ? css.getPropertyValue(style) : null;
+      } else if (element.currentStyle) {
+        value = element.currentStyle[style.camelize()];
+      }
+    }
+
+    if (window.opera && ['left', 'top', 'right', 'bottom'].include(style))
+      if (Element.getStyle(element, 'position') == 'static') value = 'auto';
+
+    return value == 'auto' ? null : value;
+  },
+  
+  setStyle: function(element, style) {
+    element = $(element);
+    for (name in style) 
+      element.style[name.camelize()] = style[name];
+  },
+  
+  getDimensions: function(element) {
+    element = $(element);
+    if (Element.getStyle(element, 'display') != 'none')
+      return {width: element.offsetWidth, height: element.offsetHeight};
+    
+    // All *Width and *Height properties give 0 on elements with display none,
+    // so enable the element temporarily
+    var els = element.style;
+    var originalVisibility = els.visibility;
+    var originalPosition = els.position;
+    els.visibility = 'hidden';
+    els.position = 'absolute';
+    els.display = '';
+    var originalWidth = element.clientWidth;
+    var originalHeight = element.clientHeight;
+    els.display = 'none';
+    els.position = originalPosition;
+    els.visibility = originalVisibility;
+    return {width: originalWidth, height: originalHeight};    
+  },
+  
+  makePositioned: function(element) {
+    element = $(element);
+    var pos = Element.getStyle(element, 'position');
+    if (pos == 'static' || !pos) {
+      element._madePositioned = true;
+      element.style.position = 'relative';
+      // Opera returns the offset relative to the positioning context, when an
+      // element is position relative but top and left have not been defined
+      if (window.opera) {
+        element.style.top = 0;
+        element.style.left = 0;
+      }  
+    }
+  },
+
+  undoPositioned: function(element) {
+    element = $(element);
+    if (element._madePositioned) {
+      element._madePositioned = undefined;
+      element.style.position =
+        element.style.top =
+        element.style.left =
+        element.style.bottom =
+        element.style.right = '';   
+    }
+  },
+
+  makeClipping: function(element) {
+    element = $(element);
+    if (element._overflow) return;
+    element._overflow = element.style.overflow;
+    if ((Element.getStyle(element, 'overflow') || 'visible') != 'hidden')
+      element.style.overflow = 'hidden';
+  },
+
+  undoClipping: function(element) {
+    element = $(element);
+    if (element._overflow) return;
+    element.style.overflow = element._overflow;
+    element._overflow = undefined;
+  }
+});
+
+var Toggle = new Object();
+Toggle.display = Element.toggle;
+
+/*--------------------------------------------------------------------------*/
+
+Abstract.Insertion = function(adjacency) {
+  this.adjacency = adjacency;
+}
+
+Abstract.Insertion.prototype = {
+  initialize: function(element, content) {
+    this.element = $(element);
+    this.content = content.stripScripts();
+    
+    if (this.adjacency && this.element.insertAdjacentHTML) {
+      try {
+        this.element.insertAdjacentHTML(this.adjacency, this.content);
+      } catch (e) {
+        if (this.element.tagName.toLowerCase() == 'tbody') {
+          this.insertContent(this.contentFromAnonymousTable());
+        } else {
+          throw e;
+        }
+      }
+    } else {
+      this.range = this.element.ownerDocument.createRange();
+      if (this.initializeRange) this.initializeRange();
+      this.insertContent([this.range.createContextualFragment(this.content)]);
+    }
+
+    setTimeout(function() {content.evalScripts()}, 10);   
+  },
+  
+  contentFromAnonymousTable: function() {
+    var div = document.createElement('div');
+    div.innerHTML = '<table><tbody>' + this.content + '</tbody></table>';
+    return $A(div.childNodes[0].childNodes[0].childNodes);
+  }
+}
+
+var Insertion = new Object();
+
+Insertion.Before = Class.create();
+Insertion.Before.prototype = Object.extend(new Abstract.Insertion('beforeBegin'), {
+  initializeRange: function() {
+    this.range.setStartBefore(this.element);
+  },
+  
+  insertContent: function(fragments) {
+    fragments.each((function(fragment) {
+      this.element.parentNode.insertBefore(fragment, this.element);
+    }).bind(this));
+  }
+});
+
+Insertion.Top = Class.create();
+Insertion.Top.prototype = Object.extend(new Abstract.Insertion('afterBegin'), {
+  initializeRange: function() {
+    this.range.selectNodeContents(this.element);
+    this.range.collapse(true);
+  },
+  
+  insertContent: function(fragments) {
+    fragments.reverse(false).each((function(fragment) {
+      this.element.insertBefore(fragment, this.element.firstChild);
+    }).bind(this));
+  }
+});
+
+Insertion.Bottom = Class.create();
+Insertion.Bottom.prototype = Object.extend(new Abstract.Insertion('beforeEnd'), {
+  initializeRange: function() {
+    this.range.selectNodeContents(this.element);
+    this.range.collapse(this.element);
+  },
+  
+  insertContent: function(fragments) {
+    fragments.each((function(fragment) {
+      this.element.appendChild(fragment);
+    }).bind(this));
+  }
+});
+
+Insertion.After = Class.create();
+Insertion.After.prototype = Object.extend(new Abstract.Insertion('afterEnd'), {
+  initializeRange: function() {
+    this.range.setStartAfter(this.element);
+  },
+  
+  insertContent: function(fragments) {
+    fragments.each((function(fragment) {
+      this.element.parentNode.insertBefore(fragment, 
+        this.element.nextSibling);
+    }).bind(this));
+  }
+});
+
+/*--------------------------------------------------------------------------*/
+
+Element.ClassNames = Class.create();
+Element.ClassNames.prototype = {
+  initialize: function(element) {
+    this.element = $(element);
+  },
+
+  _each: function(iterator) {
+    this.element.className.split(/\s+/).select(function(name) {
+      return name.length > 0;
+    })._each(iterator);
+  },
+  
+  set: function(className) {
+    this.element.className = className;
+  },
+  
+  add: function(classNameToAdd) {
+    if (this.include(classNameToAdd)) return;
+    this.set(this.toArray().concat(classNameToAdd).join(' '));
+  },
+  
+  remove: function(classNameToRemove) {
+    if (!this.include(classNameToRemove)) return;
+    this.set(this.select(function(className) {
+      return className != classNameToRemove;
+    }).join(' '));
+  },
+  
+  toString: function() {
+    return this.toArray().join(' ');
+  }
+}
+
+Object.extend(Element.ClassNames.prototype, Enumerable);

Added: branches/refactor1/framework/impl/src/main/javascript/prototype/empty.js
===================================================================
--- branches/refactor1/framework/impl/src/main/javascript/prototype/empty.js	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/javascript/prototype/empty.js	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,5 @@
+var Prototype = {
+  Version: '1.4.0',
+  emptyFunction: function() {},
+  K: function(x) {return x}
+ }

Added: branches/refactor1/framework/impl/src/main/javascript/prototype/enumerable.js
===================================================================
--- branches/refactor1/framework/impl/src/main/javascript/prototype/enumerable.js	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/javascript/prototype/enumerable.js	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,182 @@
+var $break    = new Object();
+var $continue = new Object();
+
+var Enumerable = {
+  each: function(iterator) {
+    var index = 0;
+    try {
+      this._each(function(value) {
+        try {
+          iterator(value, index++);
+        } catch (e) {
+          if (e != $continue) throw e;
+        }
+      });
+    } catch (e) {
+      if (e != $break) throw e;
+    }
+  },
+
+  all: function(iterator) {
+    var result = true;
+    this.each(function(value, index) {
+      result = result && !!(iterator || Prototype.K)(value, index);
+      if (!result) throw $break;
+    });
+    return result;
+  },
+
+  any: function(iterator) {
+    var result = true;
+    this.each(function(value, index) {
+      if (result = !!(iterator || Prototype.K)(value, index))
+        throw $break;
+    });
+    return result;
+  },
+
+  collect: function(iterator) {
+    var results = [];
+    this.each(function(value, index) {
+      results.push(iterator(value, index));
+    });
+    return results;
+  },
+
+  detect: function (iterator) {
+    var result;
+    this.each(function(value, index) {
+      if (iterator(value, index)) {
+        result = value;
+        throw $break;
+      }
+    });
+    return result;
+  },
+
+  findAll: function(iterator) {
+    var results = [];
+    this.each(function(value, index) {
+      if (iterator(value, index))
+        results.push(value);
+    });
+    return results;
+  },
+
+  grep: function(pattern, iterator) {
+    var results = [];
+    this.each(function(value, index) {
+      var stringValue = value.toString();
+      if (stringValue.match(pattern))
+        results.push((iterator || Prototype.K)(value, index));
+    })
+    return results;
+  },
+
+  include: function(object) {
+    var found = false;
+    this.each(function(value) {
+      if (value == object) {
+        found = true;
+        throw $break;
+      }
+    });
+    return found;
+  },
+
+  inject: function(memo, iterator) {
+    this.each(function(value, index) {
+      memo = iterator(memo, value, index);
+    });
+    return memo;
+  },
+
+  invoke: function(method) {
+    var args = $A(arguments).slice(1);
+    return this.collect(function(value) {
+      return value[method].apply(value, args);
+    });
+  },
+
+  max: function(iterator) {
+    var result;
+    this.each(function(value, index) {
+      value = (iterator || Prototype.K)(value, index);
+      if (result == undefined || value >= result)
+        result = value;
+    });
+    return result;
+  },
+
+  min: function(iterator) {
+    var result;
+    this.each(function(value, index) {
+      value = (iterator || Prototype.K)(value, index);
+      if (result == undefined || value < result)
+        result = value;
+    });
+    return result;
+  },
+
+  partition: function(iterator) {
+    var trues = [], falses = [];
+    this.each(function(value, index) {
+      ((iterator || Prototype.K)(value, index) ?
+        trues : falses).push(value);
+    });
+    return [trues, falses];
+  },
+
+  pluck: function(property) {
+    var results = [];
+    this.each(function(value, index) {
+      results.push(value[property]);
+    });
+    return results;
+  },
+
+  reject: function(iterator) {
+    var results = [];
+    this.each(function(value, index) {
+      if (!iterator(value, index))
+        results.push(value);
+    });
+    return results;
+  },
+
+  sortBy: function(iterator) {
+    return this.collect(function(value, index) {
+      return {value: value, criteria: iterator(value, index)};
+    }).sort(function(left, right) {
+      var a = left.criteria, b = right.criteria;
+      return a < b ? -1 : a > b ? 1 : 0;
+    }).pluck('value');
+  },
+
+  toArray: function() {
+    return this.collect(Prototype.K);
+  },
+
+  zip: function() {
+    var iterator = Prototype.K, args = $A(arguments);
+    if (typeof args.last() == 'function')
+      iterator = args.pop();
+
+    var collections = [this].concat(args).map($A);
+    return this.map(function(value, index) {
+      return iterator(collections.pluck(index));
+    });
+  },
+
+  inspect: function() {
+    return '#<Enumerable:' + this.toArray().inspect() + '>';
+  }
+}
+
+Object.extend(Enumerable, {
+  map:     Enumerable.collect,
+  find:    Enumerable.detect,
+  select:  Enumerable.findAll,
+  member:  Enumerable.include,
+  entries: Enumerable.toArray
+});

Added: branches/refactor1/framework/impl/src/main/javascript/prototype/epilog.js
===================================================================
--- branches/refactor1/framework/impl/src/main/javascript/prototype/epilog.js	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/javascript/prototype/epilog.js	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,4 @@
+/*
+* final trail for ajax jsf library
+*/
+// }
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/javascript/prototype/event.js
===================================================================
--- branches/refactor1/framework/impl/src/main/javascript/prototype/event.js	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/javascript/prototype/event.js	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,107 @@
+if (!window.Event) {
+  var Event = new Object();
+}
+
+Object.extend(Event, {
+  KEY_BACKSPACE: 8,
+  KEY_TAB:       9,
+  KEY_RETURN:   13,
+  KEY_ESC:      27,
+  KEY_LEFT:     37,
+  KEY_UP:       38,
+  KEY_RIGHT:    39,
+  KEY_DOWN:     40,
+  KEY_DELETE:   46,
+
+  element: function(event) {
+    return event.target || event.srcElement;
+  },
+
+  isLeftClick: function(event) {
+    return (((event.which) && (event.which == 1)) ||
+            ((event.button) && (event.button == 1)));
+  },
+
+  pointerX: function(event) {
+    return event.pageX || (event.clientX + 
+      (document.documentElement.scrollLeft || document.body.scrollLeft));
+  },
+
+  pointerY: function(event) {
+    return event.pageY || (event.clientY + 
+      (document.documentElement.scrollTop || document.body.scrollTop));
+  },
+
+  stop: function(event) {
+    if (event.preventDefault) { 
+      event.preventDefault(); 
+      event.stopPropagation(); 
+    } else {
+      event.returnValue = false;
+      event.cancelBubble = true;
+    }
+  },
+
+  // find the first node with the given tagName, starting from the
+  // node the event was triggered on; traverses the DOM upwards
+  findElement: function(event, tagName) {
+    var element = Event.element(event);
+    while (element.parentNode && (!element.tagName ||
+        (element.tagName.toUpperCase() != tagName.toUpperCase())))
+      element = element.parentNode;
+    return element;
+  },
+
+  observers: false,
+  
+  _observeAndCache: function(element, name, observer, useCapture) {
+    if (!this.observers) this.observers = [];
+    if (element.addEventListener) {
+      this.observers.push([element, name, observer, useCapture]);
+      element.addEventListener(name, observer, useCapture);
+    } else if (element.attachEvent) {
+      this.observers.push([element, name, observer, useCapture]);
+      element.attachEvent('on' + name, observer);
+    }
+  },
+  
+  unloadCache: function() {
+    if (!Event.observers) return;
+    for (var i = 0; i < Event.observers.length; i++) {
+      Event.stopObserving.apply(this, Event.observers[i]);
+      Event.observers[i][0] = null;
+    }
+    Event.observers = false;
+  },
+
+  observe: function(element, name, observer, useCapture) {
+    var element = $(element);
+    useCapture = useCapture || false;
+    
+    if (name == 'keypress' &&
+        (navigator.appVersion.match(/Konqueror|Safari|KHTML/)
+        || element.attachEvent))
+      name = 'keydown';
+    
+    this._observeAndCache(element, name, observer, useCapture);
+  },
+
+  stopObserving: function(element, name, observer, useCapture) {
+    var element = $(element);
+    useCapture = useCapture || false;
+    
+    if (name == 'keypress' &&
+        (navigator.appVersion.match(/Konqueror|Safari|KHTML/)
+        || element.detachEvent))
+      name = 'keydown';
+    
+    if (element.removeEventListener) {
+      element.removeEventListener(name, observer, useCapture);
+    } else if (element.detachEvent) {
+      element.detachEvent('on' + name, observer);
+    }
+  }
+});
+
+/* prevent memory leaks in IE */
+Event.observe(window, 'unload', Event.unloadCache, false);

Added: branches/refactor1/framework/impl/src/main/javascript/prototype/form.js
===================================================================
--- branches/refactor1/framework/impl/src/main/javascript/prototype/form.js	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/javascript/prototype/form.js	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,298 @@
+var Field = {
+  clear: function() {
+    for (var i = 0; i < arguments.length; i++)
+      $(arguments[i]).value = '';
+  },
+
+  focus: function(element) {
+    $(element).focus();
+  },
+  
+  present: function() {
+    for (var i = 0; i < arguments.length; i++)
+      if ($(arguments[i]).value == '') return false;
+    return true;
+  },
+  
+  select: function(element) {
+    $(element).select();
+  },
+   
+  activate: function(element) {
+    element = $(element);
+    element.focus();
+    if (element.select)
+      element.select();
+  }
+}
+
+/*--------------------------------------------------------------------------*/
+
+var Form = {
+  serialize: function(form) {
+    var elements = Form.getElements($(form));
+    var queryComponents = new Array();
+    
+    for (var i = 0; i < elements.length; i++) {
+      var queryComponent = Form.Element.serialize(elements[i]);
+      if (queryComponent)
+        queryComponents.push(queryComponent);
+    }
+    
+    return queryComponents.join('&');
+  },
+  
+  getElements: function(form) {
+    form = $(form);
+    var elements = new Array();
+
+    for (tagName in Form.Element.Serializers) {
+      var tagElements = form.getElementsByTagName(tagName);
+      for (var j = 0; j < tagElements.length; j++)
+        elements.push(tagElements[j]);
+    }
+    return elements;
+  },
+  
+  getInputs: function(form, typeName, name) {
+    form = $(form);
+    var inputs = form.getElementsByTagName('input');
+    
+    if (!typeName && !name)
+      return inputs;
+      
+    var matchingInputs = new Array();
+    for (var i = 0; i < inputs.length; i++) {
+      var input = inputs[i];
+      if ((typeName && input.type != typeName) ||
+          (name && input.name != name)) 
+        continue;
+      matchingInputs.push(input);
+    }
+
+    return matchingInputs;
+  },
+
+  disable: function(form) {
+    var elements = Form.getElements(form);
+    for (var i = 0; i < elements.length; i++) {
+      var element = elements[i];
+      element.blur();
+      element.disabled = 'true';
+    }
+  },
+
+  enable: function(form) {
+    var elements = Form.getElements(form);
+    for (var i = 0; i < elements.length; i++) {
+      var element = elements[i];
+      element.disabled = '';
+    }
+  },
+
+  findFirstElement: function(form) {
+    return Form.getElements(form).find(function(element) {
+      return element.type != 'hidden' && !element.disabled &&
+        ['input', 'select', 'textarea'].include(element.tagName.toLowerCase());
+    });
+  },
+
+  focusFirstElement: function(form) {
+    Field.activate(Form.findFirstElement(form));
+  },
+
+  reset: function(form) {
+    $(form).reset();
+  }
+}
+
+Form.Element = {
+  serialize: function(element) {
+    element = $(element);
+    var method = element.tagName.toLowerCase();
+    var parameter = Form.Element.Serializers[method](element);
+    
+    if (parameter) {
+      var key = encodeURIComponent(parameter[0]);
+      if (key.length == 0) return;
+      
+      if (parameter[1].constructor != Array)
+        parameter[1] = [parameter[1]];
+      
+      return parameter[1].map(function(value) {
+        return key + '=' + encodeURIComponent(value);
+      }).join('&');
+    }
+  },
+  
+  getValue: function(element) {
+    element = $(element);
+    var method = element.tagName.toLowerCase();
+    var parameter = Form.Element.Serializers[method](element);
+    
+    if (parameter)
+      return parameter[1];
+  }
+}
+
+Form.Element.Serializers = {
+  input: function(element) {
+    switch (element.type.toLowerCase()) {
+      case 'submit':
+      case 'hidden':
+      case 'password':
+      case 'text':
+        return Form.Element.Serializers.textarea(element);
+      case 'checkbox':  
+      case 'radio':
+        return Form.Element.Serializers.inputSelector(element);
+    }
+    return false;
+  },
+
+  inputSelector: function(element) {
+    if (element.checked)
+      return [element.name, element.value];
+  },
+
+  textarea: function(element) {
+    return [element.name, element.value];
+  },
+  
+  select: function(element) {
+    return Form.Element.Serializers[element.type == 'select-one' ? 
+      'selectOne' : 'selectMany'](element);
+  },
+  
+  selectOne: function(element) {
+    var value = '', opt, index = element.selectedIndex;
+    if (index >= 0) {
+      opt = element.options[index];
+      value = opt.value;
+      if (!value && !('value' in opt))
+        value = opt.text;
+    }
+    return [element.name, value];
+  },
+  
+  selectMany: function(element) {
+    var value = new Array();
+    for (var i = 0; i < element.length; i++) {
+      var opt = element.options[i];
+      if (opt.selected) {
+        var optValue = opt.value;
+        if (!optValue && !('value' in opt))
+          optValue = opt.text;
+        value.push(optValue);
+      }
+    }
+    return [element.name, value];
+  }
+}
+
+/*--------------------------------------------------------------------------*/
+
+var $F = Form.Element.getValue;
+
+/*--------------------------------------------------------------------------*/
+
+Abstract.TimedObserver = function() {}
+Abstract.TimedObserver.prototype = {
+  initialize: function(element, frequency, callback) {
+    this.frequency = frequency;
+    this.element   = $(element);
+    this.callback  = callback;
+    
+    this.lastValue = this.getValue();
+    this.registerCallback();
+  },
+  
+  registerCallback: function() {
+    setInterval(this.onTimerEvent.bind(this), this.frequency * 1000);
+  },
+  
+  onTimerEvent: function() {
+    var value = this.getValue();
+    if (this.lastValue != value) {
+      this.callback(this.element, value);
+      this.lastValue = value;
+    }
+  }
+}
+
+Form.Element.Observer = Class.create();
+Form.Element.Observer.prototype = Object.extend(new Abstract.TimedObserver(), {
+  getValue: function() {
+    return Form.Element.getValue(this.element);
+  }
+});
+
+Form.Observer = Class.create();
+Form.Observer.prototype = Object.extend(new Abstract.TimedObserver(), {
+  getValue: function() {
+    return Form.serialize(this.element);
+  }
+});
+
+/*--------------------------------------------------------------------------*/
+
+Abstract.EventObserver = function() {}
+Abstract.EventObserver.prototype = {
+  initialize: function(element, callback) {
+    this.element  = $(element);
+    this.callback = callback;
+    
+    this.lastValue = this.getValue();
+    if (this.element.tagName.toLowerCase() == 'form')
+      this.registerFormCallbacks();
+    else
+      this.registerCallback(this.element);
+  },
+  
+  onElementEvent: function() {
+    var value = this.getValue();
+    if (this.lastValue != value) {
+      this.callback(this.element, value);
+      this.lastValue = value;
+    }
+  },
+  
+  registerFormCallbacks: function() {
+    var elements = Form.getElements(this.element);
+    for (var i = 0; i < elements.length; i++)
+      this.registerCallback(elements[i]);
+  },
+  
+  registerCallback: function(element) {
+    if (element.type) {
+      switch (element.type.toLowerCase()) {
+        case 'checkbox':  
+        case 'radio':
+          Event.observe(element, 'click', this.onElementEvent.bind(this));
+          break;
+        case 'password':
+        case 'text':
+        case 'textarea':
+        case 'select-one':
+        case 'select-multiple':
+          Event.observe(element, 'change', this.onElementEvent.bind(this));
+          break;
+      }
+    }    
+  }
+}
+
+Form.Element.EventObserver = Class.create();
+Form.Element.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), {
+  getValue: function() {
+    return Form.Element.getValue(this.element);
+  }
+});
+
+Form.EventObserver = Class.create();
+Form.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), {
+  getValue: function() {
+    return Form.serialize(this.element);
+  }
+});
+

Added: branches/refactor1/framework/impl/src/main/javascript/prototype/hash.js
===================================================================
--- branches/refactor1/framework/impl/src/main/javascript/prototype/hash.js	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/javascript/prototype/hash.js	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,47 @@
+var Hash = {
+  _each: function(iterator) {
+    for (key in this) {
+      var value = this[key];
+      if (typeof value == 'function') continue;
+      
+      var pair = [key, value];
+      pair.key = key;
+      pair.value = value;
+      iterator(pair);
+    }
+  },
+  
+  keys: function() {
+    return this.pluck('key');
+  },
+  
+  values: function() {
+    return this.pluck('value');
+  },
+  
+  merge: function(hash) {
+    return $H(hash).inject($H(this), function(mergedHash, pair) {
+      mergedHash[pair.key] = pair.value;
+      return mergedHash;
+    });
+  },
+  
+  toQueryString: function() {
+    return this.map(function(pair) {
+      return pair.map(encodeURIComponent).join('=');
+    }).join('&');
+  },
+  
+  inspect: function() {
+    return '#<Hash:{' + this.map(function(pair) {
+      return pair.map(Object.inspect).join(': ');
+    }).join(', ') + '}>';
+  }
+}
+
+function $H(object) {
+  var hash = Object.extend({}, object || {});
+  Object.extend(hash, Enumerable);
+  Object.extend(hash, Hash);
+  return hash;
+}

Added: branches/refactor1/framework/impl/src/main/javascript/prototype/patches.js
===================================================================
--- branches/refactor1/framework/impl/src/main/javascript/prototype/patches.js	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/javascript/prototype/patches.js	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,30 @@
+/**
+* MyFaces compatibility issue
+**/
+Function.prototype.indexOf = function(){
+	return -1;
+}
+
+/**
+* Clear children
+**/
+
+Element.clearChildren = function(element) {
+	element = $(element);
+    while(element.firstChild) {
+		element.removeChild(element.firstChild);
+	}
+	return element;
+};
+/**
+ * Detect if element is child of another one
+ * @param {DomNode} node
+ * @param {DomNode} supposedParent
+ */
+Element.isChildOf = function(node, supposedParent){
+	while(node && supposedParent !=node) {
+		node = node.parentNode;
+	}
+	
+	return supposedParent == node;
+};
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/javascript/prototype/position.js
===================================================================
--- branches/refactor1/framework/impl/src/main/javascript/prototype/position.js	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/javascript/prototype/position.js	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,258 @@
+var Position = {
+  // set to true if needed, warning: firefox performance problems
+  // NOT neeeded for page scrolling, only if draggable contained in
+  // scrollable elements
+  includeScrollOffsets: false, 
+
+  // must be called before calling withinIncludingScrolloffset, every time the
+  // page is scrolled
+  prepare: function() {
+    this.deltaX =  window.pageXOffset 
+                || document.documentElement.scrollLeft 
+                || document.body.scrollLeft 
+                || 0;
+    this.deltaY =  window.pageYOffset 
+                || document.documentElement.scrollTop 
+                || document.body.scrollTop 
+                || 0;
+  },
+
+  realOffset: function(element) {
+    var valueT = 0, valueL = 0;
+    do {
+      valueT += element.scrollTop  || 0;
+      valueL += element.scrollLeft || 0; 
+      element = element.parentNode;
+    } while (element);
+    return [valueL, valueT];
+  },
+
+  realOffsetOpera: function(element) {
+    var valueT = 0, valueL = 0;
+    do {
+		if (element && element.tagName.toLowerCase() != "tr") {
+	      valueT += element.scrollTop  || 0;
+	      valueL += element.scrollLeft || 0; 
+	    }
+      element = element.parentNode;
+    } while (element && element != document.body);
+    return [valueL, valueT];
+  },
+
+  cumulativeOffset: function(element) {
+    var valueT = 0, valueL = 0;
+    do {
+      valueT += element.offsetTop  || 0;
+      valueL += element.offsetLeft || 0;
+      element = element.offsetParent;
+    } while (element);
+    return [valueL, valueT];
+  },
+
+  positionedOffset: function(element) {
+    var valueT = 0, valueL = 0;
+    do {
+      valueT += element.offsetTop  || 0;
+      valueL += element.offsetLeft || 0;
+      element = element.offsetParent;
+      if (element) {
+        p = Element.getStyle(element, 'position');
+        if (p == 'relative' || p == 'absolute') break;
+      }
+    } while (element);
+    return [valueL, valueT];
+  },
+  
+  offsetParent: function(element) {
+    if (element.offsetParent && element.offsetParent.tagName.toLowerCase() != "html") return element.offsetParent;
+    if (element == document.body) return element;
+
+    while ((element = element.parentNode) && element != document.body)
+      if (Element.getStyle(element, 'position') != 'static')
+        return element;
+
+    return document.body;
+  },
+  
+  // caches x/y coordinate pair to use with overlap
+  within: function(element, x, y) {
+    if (this.includeScrollOffsets)
+      return this.withinIncludingScrolloffsets(element, x, y);
+    this.xcomp = x;
+    this.ycomp = y;
+    this.offset = this.cumulativeOffset(element);
+
+    return (y >= this.offset[1] &&
+            y <  this.offset[1] + element.offsetHeight &&
+            x >= this.offset[0] && 
+            x <  this.offset[0] + element.offsetWidth);
+  },
+
+  withinIncludingScrolloffsets: function(element, x, y) {
+    var isOpera = (arguments.length > 3);
+	var offsetcache = (!isOpera) ? this.realOffset(element) : this.realOffsetOpera(element);
+
+    this.xcomp = x + offsetcache[0] - (!isOpera ? this.deltaX : 0);
+    this.ycomp = y + offsetcache[1] - (!isOpera ? this.deltaY : 0);
+    this.offset = this.cumulativeOffset(element);
+
+    return (this.ycomp >= this.offset[1] &&
+            this.ycomp <  this.offset[1] + element.offsetHeight &&
+            this.xcomp >= this.offset[0] && 
+            this.xcomp <  this.offset[0] + element.offsetWidth);
+  },
+
+  // within must be called directly before
+  overlap: function(mode, element) {  
+    if (!mode) return 0;  
+    if (mode == 'vertical') 
+      return ((this.offset[1] + element.offsetHeight) - this.ycomp) / 
+        element.offsetHeight;
+    if (mode == 'horizontal')
+      return ((this.offset[0] + element.offsetWidth) - this.xcomp) / 
+        element.offsetWidth;
+  },
+
+  clone: function(source, target) {
+    source = $(source);
+    target = $(target);
+    target.style.position = 'absolute';
+    var offsets = this.cumulativeOffset(source);
+    target.style.top    = offsets[1] + 'px';
+    target.style.left   = offsets[0] + 'px';
+    target.style.width  = source.offsetWidth + 'px';
+    target.style.height = source.offsetHeight + 'px';
+  },
+
+  page: function(forElement) {
+    var valueT = 0, valueL = 0;
+
+    var element = forElement;
+    do {
+      valueT += element.offsetTop  || 0;
+      valueL += element.offsetLeft || 0;
+
+      // Safari fix
+      if (element.offsetParent==document.body)
+        if (Element.getStyle(element,'position')=='absolute') break;
+
+    } while (element = element.offsetParent);
+
+    element = forElement;
+    do {
+      valueT -= element.scrollTop  || 0;
+      valueL -= element.scrollLeft || 0;    
+    } while (element = element.parentNode);
+
+    return [valueL, valueT];
+  },
+
+  clone: function(source, target) {
+    var options = Object.extend({
+      setLeft:    true,
+      setTop:     true,
+      setWidth:   true,
+      setHeight:  true,
+      offsetTop:  0,
+      offsetLeft: 0
+    }, arguments[2] || {})
+
+    // find page position of source
+    source = $(source);
+    var p = Position.page(source);
+
+    // find coordinate system to use
+    target = $(target);
+    var delta = [0, 0];
+    var parent = null;
+    // delta [0,0] will do fine with position: fixed elements, 
+    // position:absolute needs offsetParent deltas
+    if (Element.getStyle(target,'position') == 'absolute') {
+      parent = Position.offsetParent(target);
+      delta = Position.page(parent);
+    }
+
+    // correct by body offsets (fixes Safari)
+    if (parent == document.body) {
+      delta[0] -= document.body.offsetLeft;
+      delta[1] -= document.body.offsetTop; 
+    }
+
+    // set position
+    if(options.setLeft)   target.style.left  = (p[0] - delta[0] + options.offsetLeft) + 'px';
+    if(options.setTop)    target.style.top   = (p[1] - delta[1] + options.offsetTop) + 'px';
+    if(options.setWidth)  target.style.width = source.offsetWidth + 'px';
+    if(options.setHeight) target.style.height = source.offsetHeight + 'px';
+  },
+
+  absolutize: function(element, moveToDocumentBody) {
+    element = $(element);
+    if (element.style.position == 'absolute') return;
+    Position.prepare();
+
+    var offsets = Position.positionedOffset(element);
+    var top     = offsets[1];
+    var left    = offsets[0];
+    var width   = element.clientWidth;
+    var height  = element.clientHeight;
+
+    element._originalLeft   = left - parseFloat(element.style.left  || 0);
+    element._originalTop    = top  - parseFloat(element.style.top || 0);
+    element._originalWidth  = element.style.width;
+    element._originalHeight = element.style.height;
+
+
+	if (arguments.length > 1 && moveToDocumentBody) {
+		element._originalParent = element.parentNode;
+		element._originalNextSibling = element.nextSibling;
+		var el = element.parentNode.removeChild(element);
+		document.body.appendChild(el);
+	}
+	element.style.position = 'absolute';
+    element.style.top    = top + 'px';
+    element.style.left   = left + 'px';
+    element.style.width  = width + 'px';
+    element.style.height = height + 'px';
+  },
+
+  relativize: function(element, moveToOriginalParent) {
+    element = $(element);
+    if (element.style.position == 'relative') return;
+
+	if (arguments.length > 1 && moveToOriginalParent) {
+		var el = document.body.removeChild(element);
+		element._originalParent.insertBefore(el, element._originalNextSibling);
+	}
+
+    Position.prepare();
+	element.style.position = 'relative';
+    var top  = parseFloat(element.style.top  || 0) - (element._originalTop || 0);
+    var left = parseFloat(element.style.left || 0) - (element._originalLeft || 0);
+
+    element.style.top    = top + 'px';
+    element.style.left   = left + 'px';
+    if (element._originalHeight != "") element.style.height = element._originalHeight;
+    if (element._originalWidth != "") element.style.width  = element._originalWidth;
+  }
+}
+
+// Safari returns margins on body which is incorrect if the child is absolutely
+// positioned.  For performance reasons, redefine Position.cumulativeOffset for
+// KHTML/WebKit only.
+if (/Konqueror|Safari|KHTML/.test(navigator.userAgent)) {
+  Position.cumulativeOffset = function(element) {
+    var valueT = 0, valueL = 0;
+    do {
+      valueT += element.offsetTop  || 0;
+      valueL += element.offsetLeft || 0;
+      if (element.offsetParent == document.body)
+        if (Element.getStyle(element, 'position') == 'absolute') break;
+        
+      element = element.offsetParent;
+    } while (element);
+    
+    return [valueL, valueT];
+  }
+}
+
+

Added: branches/refactor1/framework/impl/src/main/javascript/prototype/prolog.js
===================================================================
--- branches/refactor1/framework/impl/src/main/javascript/prototype/prolog.js	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/javascript/prototype/prolog.js	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,5 @@
+/*
+ * Prolog for avoid execute Prototype library twice.
+ */
+
+//if(!window.Prototype){

Added: branches/refactor1/framework/impl/src/main/javascript/prototype/prototype.js
===================================================================
--- branches/refactor1/framework/impl/src/main/javascript/prototype/prototype.js	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/javascript/prototype/prototype.js	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,14 @@
+<%= include 'HEADER' %>
+
+var Prototype = {
+  Version: '<%= PROTOTYPE_VERSION %>',
+  
+  emptyFunction: function() {},
+  K: function(x) {return x}
+}
+
+<%= include 'base.js', 'string.js', 'empty.js' %>
+
+<%= include 'enumerable.js', 'array.js', 'hash.js', 'range.js' %>
+
+<%= include 'ajax.js', 'dom.js', 'form.js', 'event.js', 'position.js' %>
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/javascript/prototype/prototype1.5.0.js
===================================================================
--- branches/refactor1/framework/impl/src/main/javascript/prototype/prototype1.5.0.js	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/javascript/prototype/prototype1.5.0.js	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,2516 @@
+/*  Prototype JavaScript framework, version 1.5.0
+ *  (c) 2005-2007 Sam Stephenson
+ *
+ *  Prototype is freely distributable under the terms of an MIT-style license.
+ *  For details, see the Prototype web site: http://prototype.conio.net/
+ *
+/*--------------------------------------------------------------------------*/
+
+var Prototype = {
+  Version: '1.5.0',
+  BrowserFeatures: {
+    XPath: !!document.evaluate
+  },
+
+  ScriptFragment: '(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)',
+  emptyFunction: function() {},
+  K: function(x) { return x }
+}
+
+var Class = {
+  create: function() {
+    return function() {
+      this.initialize.apply(this, arguments);
+    }
+  }
+}
+
+var Abstract = new Object();
+
+Object.extend = function(destination, source) {
+  for (var property in source) {
+    destination[property] = source[property];
+  }
+  return destination;
+}
+
+Object.extend(Object, {
+  inspect: function(object) {
+    try {
+      if (object === undefined) return 'undefined';
+      if (object === null) return 'null';
+      return object.inspect ? object.inspect() : object.toString();
+    } catch (e) {
+      if (e instanceof RangeError) return '...';
+      throw e;
+    }
+  },
+
+  keys: function(object) {
+    var keys = [];
+    for (var property in object)
+      keys.push(property);
+    return keys;
+  },
+
+  values: function(object) {
+    var values = [];
+    for (var property in object)
+      values.push(object[property]);
+    return values;
+  },
+
+  clone: function(object) {
+    return Object.extend({}, object);
+  }
+});
+
+Function.prototype.bind = function() {
+  var __method = this, args = $A(arguments), object = args.shift();
+  return function() {
+    return __method.apply(object, args.concat($A(arguments)));
+  }
+}
+
+Function.prototype.bindAsEventListener = function(object) {
+  var __method = this, args = $A(arguments), object = args.shift();
+  return function(event) {
+    return __method.apply(object, [( event || window.event)].concat(args).concat($A(arguments)));
+  }
+}
+
+Object.extend(Number.prototype, {
+  toColorPart: function() {
+    var digits = this.toString(16);
+    if (this < 16) return '0' + digits;
+    return digits;
+  },
+
+  succ: function() {
+    return this + 1;
+  },
+
+  times: function(iterator) {
+    $R(0, this, true).each(iterator);
+    return this;
+  }
+});
+
+var Try = {
+  these: function() {
+    var returnValue;
+
+    for (var i = 0, length = arguments.length; i < length; i++) {
+      var lambda = arguments[i];
+      try {
+        returnValue = lambda();
+        break;
+      } catch (e) {}
+    }
+
+    return returnValue;
+  }
+}
+
+/*--------------------------------------------------------------------------*/
+
+var PeriodicalExecuter = Class.create();
+PeriodicalExecuter.prototype = {
+  initialize: function(callback, frequency) {
+    this.callback = callback;
+    this.frequency = frequency;
+    this.currentlyExecuting = false;
+
+    this.registerCallback();
+  },
+
+  registerCallback: function() {
+    this.timer = setInterval(this.onTimerEvent.bind(this), this.frequency * 1000);
+  },
+
+  stop: function() {
+    if (!this.timer) return;
+    clearInterval(this.timer);
+    this.timer = null;
+  },
+
+  onTimerEvent: function() {
+    if (!this.currentlyExecuting) {
+      try {
+        this.currentlyExecuting = true;
+        this.callback(this);
+      } finally {
+        this.currentlyExecuting = false;
+      }
+    }
+  }
+}
+String.interpret = function(value){
+  return value == null ? '' : String(value);
+}
+
+Object.extend(String.prototype, {
+  gsub: function(pattern, replacement) {
+    var result = '', source = this, match;
+    replacement = arguments.callee.prepareReplacement(replacement);
+
+    while (source.length > 0) {
+      if (match = source.match(pattern)) {
+        result += source.slice(0, match.index);
+        result += String.interpret(replacement(match));
+        source  = source.slice(match.index + match[0].length);
+      } else {
+        result += source, source = '';
+      }
+    }
+    return result;
+  },
+
+  sub: function(pattern, replacement, count) {
+    replacement = this.gsub.prepareReplacement(replacement);
+    count = count === undefined ? 1 : count;
+
+    return this.gsub(pattern, function(match) {
+      if (--count < 0) return match[0];
+      return replacement(match);
+    });
+  },
+
+  scan: function(pattern, iterator) {
+    this.gsub(pattern, iterator);
+    return this;
+  },
+
+  truncate: function(length, truncation) {
+    length = length || 30;
+    truncation = truncation === undefined ? '...' : truncation;
+    return this.length > length ?
+      this.slice(0, length - truncation.length) + truncation : this;
+  },
+
+  strip: function() {
+    return this.replace(/^\s+/, '').replace(/\s+$/, '');
+  },
+
+  stripTags: function() {
+    return this.replace(/<\/?[^>]+>/gi, '');
+  },
+
+  stripScripts: function() {
+    return this.replace(new RegExp(Prototype.ScriptFragment, 'img'), '');
+  },
+
+  extractScripts: function() {
+    var matchAll = new RegExp(Prototype.ScriptFragment, 'img');
+    var matchOne = new RegExp(Prototype.ScriptFragment, 'im');
+    return (this.match(matchAll) || []).map(function(scriptTag) {
+      return (scriptTag.match(matchOne) || ['', ''])[1];
+    });
+  },
+
+  evalScripts: function() {
+    return this.extractScripts().map(function(script) { return eval(script) });
+  },
+
+  escapeHTML: function() {
+    var div = document.createElement('div');
+    var text = document.createTextNode(this);
+    div.appendChild(text);
+    return div.innerHTML;
+  },
+
+  unescapeHTML: function() {
+    var div = document.createElement('div');
+    div.innerHTML = this.stripTags();
+    return div.childNodes[0] ? (div.childNodes.length > 1 ?
+      $A(div.childNodes).inject('',function(memo,node){ return memo+node.nodeValue }) :
+      div.childNodes[0].nodeValue) : '';
+  },
+
+  toQueryParams: function(separator) {
+    var match = this.strip().match(/([^?#]*)(#.*)?$/);
+    if (!match) return {};
+
+    return match[1].split(separator || '&').inject({}, function(hash, pair) {
+      if ((pair = pair.split('='))[0]) {
+        var name = decodeURIComponent(pair[0]);
+        var value = pair[1] ? decodeURIComponent(pair[1]) : undefined;
+
+        if (hash[name] !== undefined) {
+          if (hash[name].constructor != Array)
+            hash[name] = [hash[name]];
+          if (value) hash[name].push(value);
+        }
+        else hash[name] = value;
+      }
+      return hash;
+    });
+  },
+
+  toArray: function() {
+    return this.split('');
+  },
+
+  succ: function() {
+    return this.slice(0, this.length - 1) +
+      String.fromCharCode(this.charCodeAt(this.length - 1) + 1);
+  },
+
+  camelize: function() {
+    var parts = this.split('-'), len = parts.length;
+    if (len == 1) return parts[0];
+
+    var camelized = this.charAt(0) == '-'
+      ? parts[0].charAt(0).toUpperCase() + parts[0].substring(1)
+      : parts[0];
+
+    for (var i = 1; i < len; i++)
+      camelized += parts[i].charAt(0).toUpperCase() + parts[i].substring(1);
+
+    return camelized;
+  },
+
+  capitalize: function(){
+    return this.charAt(0).toUpperCase() + this.substring(1).toLowerCase();
+  },
+
+  underscore: function() {
+    return this.gsub(/::/, '/').gsub(/([A-Z]+)([A-Z][a-z])/,'#{1}_#{2}').gsub(/([a-z\d])([A-Z])/,'#{1}_#{2}').gsub(/-/,'_').toLowerCase();
+  },
+
+  dasherize: function() {
+    return this.gsub(/_/,'-');
+  },
+
+  inspect: function(useDoubleQuotes) {
+    var escapedString = this.replace(/\\/g, '\\\\');
+    if (useDoubleQuotes)
+      return '"' + escapedString.replace(/"/g, '\\"') + '"';
+    else
+      return "'" + escapedString.replace(/'/g, '\\\'') + "'";
+  }
+});
+
+String.prototype.gsub.prepareReplacement = function(replacement) {
+  if (typeof replacement == 'function') return replacement;
+  var template = new Template(replacement);
+  return function(match) { return template.evaluate(match) };
+}
+
+String.prototype.parseQuery = String.prototype.toQueryParams;
+
+var Template = Class.create();
+Template.Pattern = /(^|.|\r|\n)(#\{(.*?)\})/;
+Template.prototype = {
+  initialize: function(template, pattern) {
+    this.template = template.toString();
+    this.pattern  = pattern || Template.Pattern;
+  },
+
+  evaluate: function(object) {
+    return this.template.gsub(this.pattern, function(match) {
+      var before = match[1];
+      if (before == '\\') return match[2];
+      return before + String.interpret(object[match[3]]);
+    });
+  }
+}
+
+var $break    = new Object();
+var $continue = new Object();
+
+var Enumerable = {
+  each: function(iterator) {
+    var index = 0;
+    try {
+      this._each(function(value) {
+        try {
+          iterator(value, index++);
+        } catch (e) {
+          if (e != $continue) throw e;
+        }
+      });
+    } catch (e) {
+      if (e != $break) throw e;
+    }
+    return this;
+  },
+
+  eachSlice: function(number, iterator) {
+    var index = -number, slices = [], array = this.toArray();
+    while ((index += number) < array.length)
+      slices.push(array.slice(index, index+number));
+    return slices.map(iterator);
+  },
+
+  all: function(iterator) {
+    var result = true;
+    this.each(function(value, index) {
+      result = result && !!(iterator || Prototype.K)(value, index);
+      if (!result) throw $break;
+    });
+    return result;
+  },
+
+  any: function(iterator) {
+    var result = false;
+    this.each(function(value, index) {
+      if (result = !!(iterator || Prototype.K)(value, index))
+        throw $break;
+    });
+    return result;
+  },
+
+  collect: function(iterator) {
+    var results = [];
+    this.each(function(value, index) {
+      results.push((iterator || Prototype.K)(value, index));
+    });
+    return results;
+  },
+
+  detect: function(iterator) {
+    var result;
+    this.each(function(value, index) {
+      if (iterator(value, index)) {
+        result = value;
+        throw $break;
+      }
+    });
+    return result;
+  },
+
+  findAll: function(iterator) {
+    var results = [];
+    this.each(function(value, index) {
+      if (iterator(value, index))
+        results.push(value);
+    });
+    return results;
+  },
+
+  grep: function(pattern, iterator) {
+    var results = [];
+    this.each(function(value, index) {
+      var stringValue = value.toString();
+      if (stringValue.match(pattern))
+        results.push((iterator || Prototype.K)(value, index));
+    })
+    return results;
+  },
+
+  include: function(object) {
+    var found = false;
+    this.each(function(value) {
+      if (value == object) {
+        found = true;
+        throw $break;
+      }
+    });
+    return found;
+  },
+
+  inGroupsOf: function(number, fillWith) {
+    fillWith = fillWith === undefined ? null : fillWith;
+    return this.eachSlice(number, function(slice) {
+      while(slice.length < number) slice.push(fillWith);
+      return slice;
+    });
+  },
+
+  inject: function(memo, iterator) {
+    this.each(function(value, index) {
+      memo = iterator(memo, value, index);
+    });
+    return memo;
+  },
+
+  invoke: function(method) {
+    var args = $A(arguments).slice(1);
+    return this.map(function(value) {
+      return value[method].apply(value, args);
+    });
+  },
+
+  max: function(iterator) {
+    var result;
+    this.each(function(value, index) {
+      value = (iterator || Prototype.K)(value, index);
+      if (result == undefined || value >= result)
+        result = value;
+    });
+    return result;
+  },
+
+  min: function(iterator) {
+    var result;
+    this.each(function(value, index) {
+      value = (iterator || Prototype.K)(value, index);
+      if (result == undefined || value < result)
+        result = value;
+    });
+    return result;
+  },
+
+  partition: function(iterator) {
+    var trues = [], falses = [];
+    this.each(function(value, index) {
+      ((iterator || Prototype.K)(value, index) ?
+        trues : falses).push(value);
+    });
+    return [trues, falses];
+  },
+
+  pluck: function(property) {
+    var results = [];
+    this.each(function(value, index) {
+      results.push(value[property]);
+    });
+    return results;
+  },
+
+  reject: function(iterator) {
+    var results = [];
+    this.each(function(value, index) {
+      if (!iterator(value, index))
+        results.push(value);
+    });
+    return results;
+  },
+
+  sortBy: function(iterator) {
+    return this.map(function(value, index) {
+      return {value: value, criteria: iterator(value, index)};
+    }).sort(function(left, right) {
+      var a = left.criteria, b = right.criteria;
+      return a < b ? -1 : a > b ? 1 : 0;
+    }).pluck('value');
+  },
+
+  toArray: function() {
+    return this.map();
+  },
+
+  zip: function() {
+    var iterator = Prototype.K, args = $A(arguments);
+    if (typeof args.last() == 'function')
+      iterator = args.pop();
+
+    var collections = [this].concat(args).map($A);
+    return this.map(function(value, index) {
+      return iterator(collections.pluck(index));
+    });
+  },
+
+  size: function() {
+    return this.toArray().length;
+  },
+
+  inspect: function() {
+    return '#<Enumerable:' + this.toArray().inspect() + '>';
+  }
+}
+
+Object.extend(Enumerable, {
+  map:     Enumerable.collect,
+  find:    Enumerable.detect,
+  select:  Enumerable.findAll,
+  member:  Enumerable.include,
+  entries: Enumerable.toArray
+});
+var $A = Array.from = function(iterable) {
+  if (!iterable) return [];
+  if (iterable.toArray) {
+    return iterable.toArray();
+  } else {
+    var results = [];
+    for (var i = 0, length = iterable.length; i < length; i++)
+      results.push(iterable[i]);
+    return results;
+  }
+}
+
+Object.extend(Array.prototype, Enumerable);
+
+if (!Array.prototype._reverse)
+  Array.prototype._reverse = Array.prototype.reverse;
+
+Object.extend(Array.prototype, {
+  _each: function(iterator) {
+    for (var i = 0, length = this.length; i < length; i++)
+      iterator(this[i]);
+  },
+
+  clear: function() {
+    this.length = 0;
+    return this;
+  },
+
+  first: function() {
+    return this[0];
+  },
+
+  last: function() {
+    return this[this.length - 1];
+  },
+
+  compact: function() {
+    return this.select(function(value) {
+      return value != null;
+    });
+  },
+
+  flatten: function() {
+    return this.inject([], function(array, value) {
+      return array.concat(value && value.constructor == Array ?
+        value.flatten() : [value]);
+    });
+  },
+
+  without: function() {
+    var values = $A(arguments);
+    return this.select(function(value) {
+      return !values.include(value);
+    });
+  },
+
+  indexOf: function(object) {
+    for (var i = 0, length = this.length; i < length; i++)
+      if (this[i] == object) return i;
+    return -1;
+  },
+
+  reverse: function(inline) {
+    return (inline !== false ? this : this.toArray())._reverse();
+  },
+
+  reduce: function() {
+    return this.length > 1 ? this : this[0];
+  },
+
+  uniq: function() {
+    return this.inject([], function(array, value) {
+      return array.include(value) ? array : array.concat([value]);
+    });
+  },
+
+  clone: function() {
+    return [].concat(this);
+  },
+
+  size: function() {
+    return this.length;
+  },
+
+  inspect: function() {
+    return '[' + this.map(Object.inspect).join(', ') + ']';
+  }
+});
+
+Array.prototype.toArray = Array.prototype.clone;
+
+function $w(string){
+  string = string.strip();
+  return string ? string.split(/\s+/) : [];
+}
+
+if(window.opera){
+  Array.prototype.concat = function(){
+    var array = [];
+    for(var i = 0, length = this.length; i < length; i++) array.push(this[i]);
+    for(var i = 0, length = arguments.length; i < length; i++) {
+      if(arguments[i].constructor == Array) {
+        for(var j = 0, arrayLength = arguments[i].length; j < arrayLength; j++)
+          array.push(arguments[i][j]);
+      } else {
+        array.push(arguments[i]);
+      }
+    }
+    return array;
+  }
+}
+var Hash = function(obj) {
+  Object.extend(this, obj || {});
+};
+
+Object.extend(Hash, {
+  toQueryString: function(obj) {
+    var parts = [];
+
+	  this.prototype._each.call(obj, function(pair) {
+      if (!pair.key) return;
+
+      if (pair.value && pair.value.constructor == Array) {
+        var values = pair.value.compact();
+        if (values.length < 2) pair.value = values.reduce();
+        else {
+        	key = encodeURIComponent(pair.key);
+          values.each(function(value) {
+            value = value != undefined ? encodeURIComponent(value) : '';
+            parts.push(key + '=' + encodeURIComponent(value));
+          });
+          return;
+        }
+      }
+      if (pair.value == undefined) pair[1] = '';
+      parts.push(pair.map(encodeURIComponent).join('='));
+	  });
+
+    return parts.join('&');
+  }
+});
+
+Object.extend(Hash.prototype, Enumerable);
+Object.extend(Hash.prototype, {
+  _each: function(iterator) {
+    for (var key in this) {
+      var value = this[key];
+      if (value && value == Hash.prototype[key]) continue;
+
+      var pair = [key, value];
+      pair.key = key;
+      pair.value = value;
+      iterator(pair);
+    }
+  },
+
+  keys: function() {
+    return this.pluck('key');
+  },
+
+  values: function() {
+    return this.pluck('value');
+  },
+
+  merge: function(hash) {
+    return $H(hash).inject(this, function(mergedHash, pair) {
+      mergedHash[pair.key] = pair.value;
+      return mergedHash;
+    });
+  },
+
+  remove: function() {
+    var result;
+    for(var i = 0, length = arguments.length; i < length; i++) {
+      var value = this[arguments[i]];
+      if (value !== undefined){
+        if (result === undefined) result = value;
+        else {
+          if (result.constructor != Array) result = [result];
+          result.push(value)
+        }
+      }
+      delete this[arguments[i]];
+    }
+    return result;
+  },
+
+  toQueryString: function() {
+    return Hash.toQueryString(this);
+  },
+
+  inspect: function() {
+    return '#<Hash:{' + this.map(function(pair) {
+      return pair.map(Object.inspect).join(': ');
+    }).join(', ') + '}>';
+  }
+});
+
+function $H(object) {
+  if (object && object.constructor == Hash) return object;
+  return new Hash(object);
+};
+ObjectRange = Class.create();
+Object.extend(ObjectRange.prototype, Enumerable);
+Object.extend(ObjectRange.prototype, {
+  initialize: function(start, end, exclusive) {
+    this.start = start;
+    this.end = end;
+    this.exclusive = exclusive;
+  },
+
+  _each: function(iterator) {
+    var value = this.start;
+    while (this.include(value)) {
+      iterator(value);
+      value = value.succ();
+    }
+  },
+
+  include: function(value) {
+    if (value < this.start)
+      return false;
+    if (this.exclusive)
+      return value < this.end;
+    return value <= this.end;
+  }
+});
+
+var $R = function(start, end, exclusive) {
+  return new ObjectRange(start, end, exclusive);
+}
+
+var Ajax = {
+  getTransport: function() {
+    return Try.these(
+      function() {return new XMLHttpRequest()},
+      function() {return new ActiveXObject('Msxml2.XMLHTTP')},
+      function() {return new ActiveXObject('Microsoft.XMLHTTP')}
+    ) || false;
+  },
+
+  activeRequestCount: 0
+}
+
+Ajax.Responders = {
+  responders: [],
+
+  _each: function(iterator) {
+    this.responders._each(iterator);
+  },
+
+  register: function(responder) {
+    if (!this.include(responder))
+      this.responders.push(responder);
+  },
+
+  unregister: function(responder) {
+    this.responders = this.responders.without(responder);
+  },
+
+  dispatch: function(callback, request, transport, json) {
+    this.each(function(responder) {
+      if (typeof responder[callback] == 'function') {
+        try {
+          responder[callback].apply(responder, [request, transport, json]);
+        } catch (e) {}
+      }
+    });
+  }
+};
+
+Object.extend(Ajax.Responders, Enumerable);
+
+Ajax.Responders.register({
+  onCreate: function() {
+    Ajax.activeRequestCount++;
+  },
+  onComplete: function() {
+    Ajax.activeRequestCount--;
+  }
+});
+
+Ajax.Base = function() {};
+Ajax.Base.prototype = {
+  setOptions: function(options) {
+    this.options = {
+      method:       'post',
+      asynchronous: true,
+      contentType:  'application/x-www-form-urlencoded',
+      encoding:     'UTF-8',
+      parameters:   ''
+    }
+    Object.extend(this.options, options || {});
+
+    this.options.method = this.options.method.toLowerCase();
+    if (typeof this.options.parameters == 'string')
+      this.options.parameters = this.options.parameters.toQueryParams();
+  }
+}
+
+Ajax.Request = Class.create();
+Ajax.Request.Events =
+  ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete'];
+
+Ajax.Request.prototype = Object.extend(new Ajax.Base(), {
+  _complete: false,
+
+  initialize: function(url, options) {
+    this.transport = Ajax.getTransport();
+    this.setOptions(options);
+    this.request(url);
+  },
+
+  request: function(url) {
+    this.url = url;
+    this.method = this.options.method;
+    var params = this.options.parameters;
+
+    if (!['get', 'post'].include(this.method)) {
+      // simulate other verbs over post
+      params['_method'] = this.method;
+      this.method = 'post';
+    }
+
+    params = Hash.toQueryString(params);
+    if (params && /Konqueror|Safari|KHTML/.test(navigator.userAgent)) params += '&_='
+
+    // when GET, append parameters to URL
+    if (this.method == 'get' && params)
+      this.url += (this.url.indexOf('?') > -1 ? '&' : '?') + params;
+
+    try {
+      Ajax.Responders.dispatch('onCreate', this, this.transport);
+
+      this.transport.open(this.method.toUpperCase(), this.url,
+        this.options.asynchronous);
+
+      if (this.options.asynchronous)
+        setTimeout(function() { this.respondToReadyState(1) }.bind(this), 10);
+
+      this.transport.onreadystatechange = this.onStateChange.bind(this);
+      this.setRequestHeaders();
+
+      var body = this.method == 'post' ? (this.options.postBody || params) : null;
+
+      this.transport.send(body);
+
+      /* Force Firefox to handle ready state 4 for synchronous requests */
+      if (!this.options.asynchronous && this.transport.overrideMimeType)
+        this.onStateChange();
+
+    }
+    catch (e) {
+      this.dispatchException(e);
+    }
+  },
+
+  onStateChange: function() {
+    var readyState = this.transport.readyState;
+    if (readyState > 1 && !((readyState == 4) && this._complete))
+      this.respondToReadyState(this.transport.readyState);
+  },
+
+  setRequestHeaders: function() {
+    var headers = {
+      'X-Requested-With': 'XMLHttpRequest',
+      'X-Prototype-Version': Prototype.Version,
+      'Accept': 'text/javascript, text/html, application/xml, text/xml, */*'
+    };
+
+    if (this.method == 'post') {
+      headers['Content-type'] = this.options.contentType +
+        (this.options.encoding ? '; charset=' + this.options.encoding : '');
+
+      /* Force "Connection: close" for older Mozilla browsers to work
+       * around a bug where XMLHttpRequest sends an incorrect
+       * Content-length header. See Mozilla Bugzilla #246651.
+       */
+      if (this.transport.overrideMimeType &&
+          (navigator.userAgent.match(/Gecko\/(\d{4})/) || [0,2005])[1] < 2005)
+            headers['Connection'] = 'close';
+    }
+
+    // user-defined headers
+    if (typeof this.options.requestHeaders == 'object') {
+      var extras = this.options.requestHeaders;
+
+      if (typeof extras.push == 'function')
+        for (var i = 0, length = extras.length; i < length; i += 2)
+          headers[extras[i]] = extras[i+1];
+      else
+        $H(extras).each(function(pair) { headers[pair.key] = pair.value });
+    }
+
+    for (var name in headers)
+      this.transport.setRequestHeader(name, headers[name]);
+  },
+
+  success: function() {
+    return !this.transport.status
+        || (this.transport.status >= 200 && this.transport.status < 300);
+  },
+
+  respondToReadyState: function(readyState) {
+    var state = Ajax.Request.Events[readyState];
+    var transport = this.transport, json = this.evalJSON();
+
+    if (state == 'Complete') {
+      try {
+        this._complete = true;
+        (this.options['on' + this.transport.status]
+         || this.options['on' + (this.success() ? 'Success' : 'Failure')]
+         || Prototype.emptyFunction)(transport, json);
+      } catch (e) {
+        this.dispatchException(e);
+      }
+
+      if ((this.getHeader('Content-type') || 'text/javascript').strip().
+        match(/^(text|application)\/(x-)?(java|ecma)script(;.*)?$/i))
+          this.evalResponse();
+    }
+
+    try {
+      (this.options['on' + state] || Prototype.emptyFunction)(transport, json);
+      Ajax.Responders.dispatch('on' + state, this, transport, json);
+    } catch (e) {
+      this.dispatchException(e);
+    }
+
+    if (state == 'Complete') {
+      // avoid memory leak in MSIE: clean up
+      this.transport.onreadystatechange = Prototype.emptyFunction;
+    }
+  },
+
+  getHeader: function(name) {
+    try {
+      return this.transport.getResponseHeader(name);
+    } catch (e) { return null }
+  },
+
+  evalJSON: function() {
+    try {
+      var json = this.getHeader('X-JSON');
+      return json ? eval('(' + json + ')') : null;
+    } catch (e) { return null }
+  },
+
+  evalResponse: function() {
+    try {
+      return eval(this.transport.responseText);
+    } catch (e) {
+      this.dispatchException(e);
+    }
+  },
+
+  dispatchException: function(exception) {
+    (this.options.onException || Prototype.emptyFunction)(this, exception);
+    Ajax.Responders.dispatch('onException', this, exception);
+  }
+});
+
+Ajax.Updater = Class.create();
+
+Object.extend(Object.extend(Ajax.Updater.prototype, Ajax.Request.prototype), {
+  initialize: function(container, url, options) {
+    this.container = {
+      success: (container.success || container),
+      failure: (container.failure || (container.success ? null : container))
+    }
+
+    this.transport = Ajax.getTransport();
+    this.setOptions(options);
+
+    var onComplete = this.options.onComplete || Prototype.emptyFunction;
+    this.options.onComplete = (function(transport, param) {
+      this.updateContent();
+      onComplete(transport, param);
+    }).bind(this);
+
+    this.request(url);
+  },
+
+  updateContent: function() {
+    var receiver = this.container[this.success() ? 'success' : 'failure'];
+    var response = this.transport.responseText;
+
+    if (!this.options.evalScripts) response = response.stripScripts();
+
+    if (receiver = $(receiver)) {
+      if (this.options.insertion)
+        new this.options.insertion(receiver, response);
+      else
+        receiver.update(response);
+    }
+
+    if (this.success()) {
+      if (this.onComplete)
+        setTimeout(this.onComplete.bind(this), 10);
+    }
+  }
+});
+
+Ajax.PeriodicalUpdater = Class.create();
+Ajax.PeriodicalUpdater.prototype = Object.extend(new Ajax.Base(), {
+  initialize: function(container, url, options) {
+    this.setOptions(options);
+    this.onComplete = this.options.onComplete;
+
+    this.frequency = (this.options.frequency || 2);
+    this.decay = (this.options.decay || 1);
+
+    this.updater = {};
+    this.container = container;
+    this.url = url;
+
+    this.start();
+  },
+
+  start: function() {
+    this.options.onComplete = this.updateComplete.bind(this);
+    this.onTimerEvent();
+  },
+
+  stop: function() {
+    this.updater.options.onComplete = undefined;
+    clearTimeout(this.timer);
+    (this.onComplete || Prototype.emptyFunction).apply(this, arguments);
+  },
+
+  updateComplete: function(request) {
+    if (this.options.decay) {
+      this.decay = (request.responseText == this.lastText ?
+        this.decay * this.options.decay : 1);
+
+      this.lastText = request.responseText;
+    }
+    this.timer = setTimeout(this.onTimerEvent.bind(this),
+      this.decay * this.frequency * 1000);
+  },
+
+  onTimerEvent: function() {
+    this.updater = new Ajax.Updater(this.container, this.url, this.options);
+  }
+});
+function $(element) {
+  if (arguments.length > 1) {
+    for (var i = 0, elements = [], length = arguments.length; i < length; i++)
+      elements.push($(arguments[i]));
+    return elements;
+  }
+  if (typeof element == 'string')
+    element = document.getElementById(element);
+  return Element.extend(element);
+}
+
+if (Prototype.BrowserFeatures.XPath) {
+  document._getElementsByXPath = function(expression, parentElement) {
+    var results = [];
+    var query = document.evaluate(expression, $(parentElement) || document,
+      null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
+    for (var i = 0, length = query.snapshotLength; i < length; i++)
+      results.push(query.snapshotItem(i));
+    return results;
+  };
+}
+
+document.getElementsByClassName = function(className, parentElement) {
+  if (Prototype.BrowserFeatures.XPath) {
+    var q = ".//*[contains(concat(' ', @class, ' '), ' " + className + " ')]";
+    return document._getElementsByXPath(q, parentElement);
+  } else {
+    var children = ($(parentElement) || document.body).getElementsByTagName('*');
+    var elements = [], child;
+    for (var i = 0, length = children.length; i < length; i++) {
+      child = children[i];
+      if (Element.hasClassName(child, className))
+        elements.push(Element.extend(child));
+    }
+    return elements;
+  }
+};
+
+/*--------------------------------------------------------------------------*/
+
+if (!window.Element)
+  var Element = new Object();
+
+Element.extend = function(element) {
+  if (!element || _nativeExtensions || element.nodeType == 3) return element;
+
+  if (!element._extended && element.tagName && element != window) {
+    var methods = Object.clone(Element.Methods), cache = Element.extend.cache;
+
+    if (element.tagName == 'FORM')
+      Object.extend(methods, Form.Methods);
+    if (['INPUT', 'TEXTAREA', 'SELECT'].include(element.tagName))
+      Object.extend(methods, Form.Element.Methods);
+
+    Object.extend(methods, Element.Methods.Simulated);
+
+    for (var property in methods) {
+      var value = methods[property];
+      if (typeof value == 'function' && !(property in element))
+        element[property] = cache.findOrStore(value);
+    }
+  }
+
+  element._extended = true;
+  return element;
+};
+
+Element.extend.cache = {
+  findOrStore: function(value) {
+    return this[value] = this[value] || function() {
+      return value.apply(null, [this].concat($A(arguments)));
+    }
+  }
+};
+
+Element.Methods = {
+  visible: function(element) {
+    return $(element).style.display != 'none';
+  },
+
+  toggle: function(element) {
+    element = $(element);
+    Element[Element.visible(element) ? 'hide' : 'show'](element);
+    return element;
+  },
+
+  hide: function(element) {
+    $(element).style.display = 'none';
+    return element;
+  },
+
+  show: function(element) {
+    $(element).style.display = '';
+    return element;
+  },
+
+  remove: function(element) {
+    element = $(element);
+    element.parentNode.removeChild(element);
+    return element;
+  },
+
+  update: function(element, html) {
+    html = typeof html == 'undefined' ? '' : html.toString();
+    $(element).innerHTML = html.stripScripts();
+    setTimeout(function() {html.evalScripts()}, 10);
+    return element;
+  },
+
+  replace: function(element, html) {
+    element = $(element);
+    html = typeof html == 'undefined' ? '' : html.toString();
+    if (element.outerHTML) {
+      element.outerHTML = html.stripScripts();
+    } else {
+      var range = element.ownerDocument.createRange();
+      range.selectNodeContents(element);
+      element.parentNode.replaceChild(
+        range.createContextualFragment(html.stripScripts()), element);
+    }
+    setTimeout(function() {html.evalScripts()}, 10);
+    return element;
+  },
+
+  inspect: function(element) {
+    element = $(element);
+    var result = '<' + element.tagName.toLowerCase();
+    $H({'id': 'id', 'className': 'class'}).each(function(pair) {
+      var property = pair.first(), attribute = pair.last();
+      var value = (element[property] || '').toString();
+      if (value) result += ' ' + attribute + '=' + value.inspect(true);
+    });
+    return result + '>';
+  },
+
+  recursivelyCollect: function(element, property) {
+    element = $(element);
+    var elements = [];
+    while (element = element[property])
+      if (element.nodeType == 1)
+        elements.push(Element.extend(element));
+    return elements;
+  },
+
+  ancestors: function(element) {
+    return $(element).recursivelyCollect('parentNode');
+  },
+
+  descendants: function(element) {
+    return $A($(element).getElementsByTagName('*'));
+  },
+
+  immediateDescendants: function(element) {
+    if (!(element = $(element).firstChild)) return [];
+    while (element && element.nodeType != 1) element = element.nextSibling;
+    if (element) return [element].concat($(element).nextSiblings());
+    return [];
+  },
+
+  previousSiblings: function(element) {
+    return $(element).recursivelyCollect('previousSibling');
+  },
+
+  nextSiblings: function(element) {
+    return $(element).recursivelyCollect('nextSibling');
+  },
+
+  siblings: function(element) {
+    element = $(element);
+    return element.previousSiblings().reverse().concat(element.nextSiblings());
+  },
+
+  match: function(element, selector) {
+    if (typeof selector == 'string')
+      selector = new Selector(selector);
+    return selector.match($(element));
+  },
+
+  up: function(element, expression, index) {
+    return Selector.findElement($(element).ancestors(), expression, index);
+  },
+
+  down: function(element, expression, index) {
+    return Selector.findElement($(element).descendants(), expression, index);
+  },
+
+  previous: function(element, expression, index) {
+    return Selector.findElement($(element).previousSiblings(), expression, index);
+  },
+
+  next: function(element, expression, index) {
+    return Selector.findElement($(element).nextSiblings(), expression, index);
+  },
+
+  getElementsBySelector: function() {
+    var args = $A(arguments), element = $(args.shift());
+    return Selector.findChildElements(element, args);
+  },
+
+  getElementsByClassName: function(element, className) {
+    return document.getElementsByClassName(className, element);
+  },
+
+  readAttribute: function(element, name) {
+    element = $(element);
+    if (document.all && !window.opera) {
+      var t = Element._attributeTranslations;
+      if (t.values[name]) return t.values[name](element, name);
+      if (t.names[name])  name = t.names[name];
+      var attribute = element.attributes[name];
+      if(attribute) return attribute.nodeValue;
+    }
+    return element.getAttribute(name);
+  },
+
+  getHeight: function(element) {
+    return $(element).getDimensions().height;
+  },
+
+  getWidth: function(element) {
+    return $(element).getDimensions().width;
+  },
+
+  classNames: function(element) {
+    return new Element.ClassNames(element);
+  },
+
+  hasClassName: function(element, className) {
+    if (!(element = $(element))) return;
+    var elementClassName = element.className;
+    if (elementClassName.length == 0) return false;
+    if (elementClassName == className ||
+        elementClassName.match(new RegExp("(^|\\s)" + className + "(\\s|$)")))
+      return true;
+    return false;
+  },
+
+  addClassName: function(element, className) {
+    if (!(element = $(element))) return;
+    Element.classNames(element).add(className);
+    return element;
+  },
+
+  removeClassName: function(element, className) {
+    if (!(element = $(element))) return;
+    Element.classNames(element).remove(className);
+    return element;
+  },
+
+  toggleClassName: function(element, className) {
+    if (!(element = $(element))) return;
+    Element.classNames(element)[element.hasClassName(className) ? 'remove' : 'add'](className);
+    return element;
+  },
+
+  observe: function() {
+    Event.observe.apply(Event, arguments);
+    return $A(arguments).first();
+  },
+
+  stopObserving: function() {
+    Event.stopObserving.apply(Event, arguments);
+    return $A(arguments).first();
+  },
+
+  // removes whitespace-only text node children
+  cleanWhitespace: function(element) {
+    element = $(element);
+    var node = element.firstChild;
+    while (node) {
+      var nextNode = node.nextSibling;
+      if (node.nodeType == 3 && !/\S/.test(node.nodeValue))
+        element.removeChild(node);
+      node = nextNode;
+    }
+    return element;
+  },
+
+  empty: function(element) {
+    return $(element).innerHTML.match(/^\s*$/);
+  },
+
+  descendantOf: function(element, ancestor) {
+    element = $(element), ancestor = $(ancestor);
+    while (element = element.parentNode)
+      if (element == ancestor) return true;
+    return false;
+  },
+
+  scrollTo: function(element) {
+    element = $(element);
+    var pos = Position.cumulativeOffset(element);
+    window.scrollTo(pos[0], pos[1]);
+    return element;
+  },
+
+  getStyle: function(element, style) {
+    element = $(element);
+    if (['float','cssFloat'].include(style))
+      style = (typeof element.style.styleFloat != 'undefined' ? 'styleFloat' : 'cssFloat');
+    style = style.camelize();
+    var value = element.style[style];
+    if (!value) {
+      if (document.defaultView && document.defaultView.getComputedStyle) {
+        var css = document.defaultView.getComputedStyle(element, null);
+        value = css ? css[style] : null;
+      } else if (element.currentStyle) {
+        value = element.currentStyle[style];
+      }
+    }
+
+    if((value == 'auto') && ['width','height'].include(style) && (element.getStyle('display') != 'none'))
+      value = element['offset'+style.capitalize()] + 'px';
+
+    if (window.opera && ['left', 'top', 'right', 'bottom'].include(style))
+      if (Element.getStyle(element, 'position') == 'static') value = 'auto';
+    if(style == 'opacity') {
+      if(value) return parseFloat(value);
+      if(value = (element.getStyle('filter') || '').match(/alpha\(opacity=(.*)\)/))
+        if(value[1]) return parseFloat(value[1]) / 100;
+      return 1.0;
+    }
+    return value == 'auto' ? null : value;
+  },
+
+  setStyle: function(element, style) {
+    element = $(element);
+    for (var name in style) {
+      var value = style[name];
+      if(name == 'opacity') {
+        if (value == 1) {
+          value = (/Gecko/.test(navigator.userAgent) &&
+            !/Konqueror|Safari|KHTML/.test(navigator.userAgent)) ? 0.999999 : 1.0;
+          if(/MSIE/.test(navigator.userAgent) && !window.opera)
+            element.style.filter = element.getStyle('filter').replace(/alpha\([^\)]*\)/gi,'');
+        } else if(value == '') {
+          if(/MSIE/.test(navigator.userAgent) && !window.opera)
+            element.style.filter = element.getStyle('filter').replace(/alpha\([^\)]*\)/gi,'');
+        } else {
+          if(value < 0.00001) value = 0;
+          if(/MSIE/.test(navigator.userAgent) && !window.opera)
+            element.style.filter = element.getStyle('filter').replace(/alpha\([^\)]*\)/gi,'') +
+              'alpha(opacity='+value*100+')';
+        }
+      } else if(['float','cssFloat'].include(name)) name = (typeof element.style.styleFloat != 'undefined') ? 'styleFloat' : 'cssFloat';
+      element.style[name.camelize()] = value;
+    }
+    return element;
+  },
+
+  getDimensions: function(element) {
+    element = $(element);
+    var display = $(element).getStyle('display');
+    if (display != 'none' && display != null) // Safari bug
+      return {width: element.offsetWidth, height: element.offsetHeight};
+
+    // All *Width and *Height properties give 0 on elements with display none,
+    // so enable the element temporarily
+    var els = element.style;
+    var originalVisibility = els.visibility;
+    var originalPosition = els.position;
+    var originalDisplay = els.display;
+    els.visibility = 'hidden';
+    els.position = 'absolute';
+    els.display = 'block';
+    var originalWidth = element.clientWidth;
+    var originalHeight = element.clientHeight;
+    els.display = originalDisplay;
+    els.position = originalPosition;
+    els.visibility = originalVisibility;
+    return {width: originalWidth, height: originalHeight};
+  },
+
+  makePositioned: function(element) {
+    element = $(element);
+    var pos = Element.getStyle(element, 'position');
+    if (pos == 'static' || !pos) {
+      element._madePositioned = true;
+      element.style.position = 'relative';
+      // Opera returns the offset relative to the positioning context, when an
+      // element is position relative but top and left have not been defined
+      if (window.opera) {
+        element.style.top = 0;
+        element.style.left = 0;
+      }
+    }
+    return element;
+  },
+
+  undoPositioned: function(element) {
+    element = $(element);
+    if (element._madePositioned) {
+      element._madePositioned = undefined;
+      element.style.position =
+        element.style.top =
+        element.style.left =
+        element.style.bottom =
+        element.style.right = '';
+    }
+    return element;
+  },
+
+  makeClipping: function(element) {
+    element = $(element);
+    if (element._overflow) return element;
+    element._overflow = element.style.overflow || 'auto';
+    if ((Element.getStyle(element, 'overflow') || 'visible') != 'hidden')
+      element.style.overflow = 'hidden';
+    return element;
+  },
+
+  undoClipping: function(element) {
+    element = $(element);
+    if (!element._overflow) return element;
+    element.style.overflow = element._overflow == 'auto' ? '' : element._overflow;
+    element._overflow = null;
+    return element;
+  }
+};
+
+Object.extend(Element.Methods, {childOf: Element.Methods.descendantOf});
+
+Element._attributeTranslations = {};
+
+Element._attributeTranslations.names = {
+  colspan:   "colSpan",
+  rowspan:   "rowSpan",
+  valign:    "vAlign",
+  datetime:  "dateTime",
+  accesskey: "accessKey",
+  tabindex:  "tabIndex",
+  enctype:   "encType",
+  maxlength: "maxLength",
+  readonly:  "readOnly",
+  longdesc:  "longDesc"
+};
+
+Element._attributeTranslations.values = {
+  _getAttr: function(element, attribute) {
+    return element.getAttribute(attribute, 2);
+  },
+
+  _flag: function(element, attribute) {
+    return $(element).hasAttribute(attribute) ? attribute : null;
+  },
+
+  style: function(element) {
+    return element.style.cssText.toLowerCase();
+  },
+
+  title: function(element) {
+    var node = element.getAttributeNode('title');
+    return node.specified ? node.nodeValue : null;
+  }
+};
+
+Object.extend(Element._attributeTranslations.values, {
+  href: Element._attributeTranslations.values._getAttr,
+  src:  Element._attributeTranslations.values._getAttr,
+  disabled: Element._attributeTranslations.values._flag,
+  checked:  Element._attributeTranslations.values._flag,
+  readonly: Element._attributeTranslations.values._flag,
+  multiple: Element._attributeTranslations.values._flag
+});
+
+Element.Methods.Simulated = {
+  hasAttribute: function(element, attribute) {
+    var t = Element._attributeTranslations;
+    attribute = t.names[attribute] || attribute;
+    return $(element).getAttributeNode(attribute).specified;
+  }
+};
+
+// IE is missing .innerHTML support for TABLE-related elements
+if (document.all && !window.opera){
+  Element.Methods.update = function(element, html) {
+    element = $(element);
+    html = typeof html == 'undefined' ? '' : html.toString();
+    var tagName = element.tagName.toUpperCase();
+    if (['THEAD','TBODY','TR','TD'].include(tagName)) {
+      var div = document.createElement('div');
+      switch (tagName) {
+        case 'THEAD':
+        case 'TBODY':
+          div.innerHTML = '<table><tbody>' +  html.stripScripts() + '</tbody></table>';
+          depth = 2;
+          break;
+        case 'TR':
+          div.innerHTML = '<table><tbody><tr>' +  html.stripScripts() + '</tr></tbody></table>';
+          depth = 3;
+          break;
+        case 'TD':
+          div.innerHTML = '<table><tbody><tr><td>' +  html.stripScripts() + '</td></tr></tbody></table>';
+          depth = 4;
+      }
+      $A(element.childNodes).each(function(node){
+        element.removeChild(node)
+      });
+      depth.times(function(){ div = div.firstChild });
+
+      $A(div.childNodes).each(
+        function(node){ element.appendChild(node) });
+    } else {
+      element.innerHTML = html.stripScripts();
+    }
+    setTimeout(function() {html.evalScripts()}, 10);
+    return element;
+  }
+};
+
+Object.extend(Element, Element.Methods);
+
+var _nativeExtensions = false;
+
+if(/Konqueror|Safari|KHTML/.test(navigator.userAgent))
+  ['', 'Form', 'Input', 'TextArea', 'Select'].each(function(tag) {
+    var className = 'HTML' + tag + 'Element';
+    if(window[className]) return;
+    var klass = window[className] = {};
+    klass.prototype = document.createElement(tag ? tag.toLowerCase() : 'div').__proto__;
+  });
+
+Element.addMethods = function(methods) {
+  Object.extend(Element.Methods, methods || {});
+
+  function copy(methods, destination, onlyIfAbsent) {
+    onlyIfAbsent = onlyIfAbsent || false;
+    var cache = Element.extend.cache;
+    for (var property in methods) {
+      var value = methods[property];
+      if (!onlyIfAbsent || !(property in destination))
+        destination[property] = cache.findOrStore(value);
+    }
+  }
+
+  if (typeof HTMLElement != 'undefined') {
+    copy(Element.Methods, HTMLElement.prototype);
+    copy(Element.Methods.Simulated, HTMLElement.prototype, true);
+    copy(Form.Methods, HTMLFormElement.prototype);
+    [HTMLInputElement, HTMLTextAreaElement, HTMLSelectElement].each(function(klass) {
+      copy(Form.Element.Methods, klass.prototype);
+    });
+    _nativeExtensions = true;
+  }
+}
+
+var Toggle = new Object();
+Toggle.display = Element.toggle;
+
+/*--------------------------------------------------------------------------*/
+
+Abstract.Insertion = function(adjacency) {
+  this.adjacency = adjacency;
+}
+
+Abstract.Insertion.prototype = {
+  initialize: function(element, content) {
+    this.element = $(element);
+    this.content = content.stripScripts();
+
+    if (this.adjacency && this.element.insertAdjacentHTML) {
+      try {
+        this.element.insertAdjacentHTML(this.adjacency, this.content);
+      } catch (e) {
+        var tagName = this.element.tagName.toUpperCase();
+        if (['TBODY', 'TR'].include(tagName)) {
+          this.insertContent(this.contentFromAnonymousTable());
+        } else {
+          throw e;
+        }
+      }
+    } else {
+      this.range = this.element.ownerDocument.createRange();
+      if (this.initializeRange) this.initializeRange();
+      this.insertContent([this.range.createContextualFragment(this.content)]);
+    }
+
+    setTimeout(function() {content.evalScripts()}, 10);
+  },
+
+  contentFromAnonymousTable: function() {
+    var div = document.createElement('div');
+    div.innerHTML = '<table><tbody>' + this.content + '</tbody></table>';
+    return $A(div.childNodes[0].childNodes[0].childNodes);
+  }
+}
+
+var Insertion = new Object();
+
+Insertion.Before = Class.create();
+Insertion.Before.prototype = Object.extend(new Abstract.Insertion('beforeBegin'), {
+  initializeRange: function() {
+    this.range.setStartBefore(this.element);
+  },
+
+  insertContent: function(fragments) {
+    fragments.each((function(fragment) {
+      this.element.parentNode.insertBefore(fragment, this.element);
+    }).bind(this));
+  }
+});
+
+Insertion.Top = Class.create();
+Insertion.Top.prototype = Object.extend(new Abstract.Insertion('afterBegin'), {
+  initializeRange: function() {
+    this.range.selectNodeContents(this.element);
+    this.range.collapse(true);
+  },
+
+  insertContent: function(fragments) {
+    fragments.reverse(false).each((function(fragment) {
+      this.element.insertBefore(fragment, this.element.firstChild);
+    }).bind(this));
+  }
+});
+
+Insertion.Bottom = Class.create();
+Insertion.Bottom.prototype = Object.extend(new Abstract.Insertion('beforeEnd'), {
+  initializeRange: function() {
+    this.range.selectNodeContents(this.element);
+    this.range.collapse(this.element);
+  },
+
+  insertContent: function(fragments) {
+    fragments.each((function(fragment) {
+      this.element.appendChild(fragment);
+    }).bind(this));
+  }
+});
+
+Insertion.After = Class.create();
+Insertion.After.prototype = Object.extend(new Abstract.Insertion('afterEnd'), {
+  initializeRange: function() {
+    this.range.setStartAfter(this.element);
+  },
+
+  insertContent: function(fragments) {
+    fragments.each((function(fragment) {
+      this.element.parentNode.insertBefore(fragment,
+        this.element.nextSibling);
+    }).bind(this));
+  }
+});
+
+/*--------------------------------------------------------------------------*/
+
+Element.ClassNames = Class.create();
+Element.ClassNames.prototype = {
+  initialize: function(element) {
+    this.element = $(element);
+  },
+
+  _each: function(iterator) {
+    this.element.className.split(/\s+/).select(function(name) {
+      return name.length > 0;
+    })._each(iterator);
+  },
+
+  set: function(className) {
+    this.element.className = className;
+  },
+
+  add: function(classNameToAdd) {
+    if (this.include(classNameToAdd)) return;
+    this.set($A(this).concat(classNameToAdd).join(' '));
+  },
+
+  remove: function(classNameToRemove) {
+    if (!this.include(classNameToRemove)) return;
+    this.set($A(this).without(classNameToRemove).join(' '));
+  },
+
+  toString: function() {
+    return $A(this).join(' ');
+  }
+};
+
+Object.extend(Element.ClassNames.prototype, Enumerable);
+var Selector = Class.create();
+Selector.prototype = {
+  initialize: function(expression) {
+    this.params = {classNames: []};
+    this.expression = expression.toString().strip();
+    this.parseExpression();
+    this.compileMatcher();
+  },
+
+  parseExpression: function() {
+    function abort(message) { throw 'Parse error in selector: ' + message; }
+
+    if (this.expression == '')  abort('empty expression');
+
+    var params = this.params, expr = this.expression, match, modifier, clause, rest;
+    while (match = expr.match(/^(.*)\[([a-z0-9_:-]+?)(?:([~\|!]?=)(?:"([^"]*)"|([^\]\s]*)))?\]$/i)) {
+      params.attributes = params.attributes || [];
+      params.attributes.push({name: match[2], operator: match[3], value: match[4] || match[5] || ''});
+      expr = match[1];
+    }
+
+    if (expr == '*') return this.params.wildcard = true;
+
+    while (match = expr.match(/^([^a-z0-9_-])?([a-z0-9_-]+)(.*)/i)) {
+      modifier = match[1], clause = match[2], rest = match[3];
+      switch (modifier) {
+        case '#':       params.id = clause; break;
+        case '.':       params.classNames.push(clause); break;
+        case '':
+        case undefined: params.tagName = clause.toUpperCase(); break;
+        default:        abort(expr.inspect());
+      }
+      expr = rest;
+    }
+
+    if (expr.length > 0) abort(expr.inspect());
+  },
+
+  buildMatchExpression: function() {
+    var params = this.params, conditions = [], clause;
+
+    if (params.wildcard)
+      conditions.push('true');
+    if (clause = params.id)
+      conditions.push('element.readAttribute("id") == ' + clause.inspect());
+    if (clause = params.tagName)
+      conditions.push('element.tagName.toUpperCase() == ' + clause.inspect());
+    if ((clause = params.classNames).length > 0)
+      for (var i = 0, length = clause.length; i < length; i++)
+        conditions.push('element.hasClassName(' + clause[i].inspect() + ')');
+    if (clause = params.attributes) {
+      clause.each(function(attribute) {
+        var value = 'element.readAttribute(' + attribute.name.inspect() + ')';
+        var splitValueBy = function(delimiter) {
+          return value + ' && ' + value + '.split(' + delimiter.inspect() + ')';
+        }
+
+        switch (attribute.operator) {
+          case '=':       conditions.push(value + ' == ' + attribute.value.inspect()); break;
+          case '~=':      conditions.push(splitValueBy(' ') + '.include(' + attribute.value.inspect() + ')'); break;
+          case '|=':      conditions.push(
+                            splitValueBy('-') + '.first().toUpperCase() == ' + attribute.value.toUpperCase().inspect()
+                          ); break;
+          case '!=':      conditions.push(value + ' != ' + attribute.value.inspect()); break;
+          case '':
+          case undefined: conditions.push('element.hasAttribute(' + attribute.name.inspect() + ')'); break;
+          default:        throw 'Unknown operator ' + attribute.operator + ' in selector';
+        }
+      });
+    }
+
+    return conditions.join(' && ');
+  },
+
+  compileMatcher: function() {
+    this.match = new Function('element', 
+		'if (!element.tagName) return false;' +
+         'element = $(element); return ' + 
+         this.buildMatchExpression());
+  },
+
+  findElements: function(scope) {
+    var element;
+
+    if (element = $(this.params.id))
+      if (this.match(element))
+        if (!scope || Element.childOf(element, scope))
+          return [element];
+
+    scope = (scope || document).getElementsByTagName(this.params.tagName || '*');
+
+    var results = [];
+    for (var i = 0, length = scope.length; i < length; i++)
+      if (this.match(element = scope[i]))
+        results.push(Element.extend(element));
+
+    return results;
+  },
+
+  toString: function() {
+    return this.expression;
+  }
+}
+
+Object.extend(Selector, {
+  matchElements: function(elements, expression) {
+    var selector = new Selector(expression);
+    return elements.select(selector.match.bind(selector)).map(Element.extend);
+  },
+
+  findElement: function(elements, expression, index) {
+    if (typeof expression == 'number') index = expression, expression = false;
+    return Selector.matchElements(elements, expression || '*')[index || 0];
+  },
+
+  findChildElements: function(element, expressions) {
+    return expressions.map(function(expression) {
+      return expression.match(/[^\s"]+(?:"[^"]*"[^\s"]+)*/g).inject([null], function(results, expr) {
+        var selector = new Selector(expr);
+        return results.inject([], function(elements, result) {
+          return elements.concat(selector.findElements(result || element));
+        });
+      });
+    }).flatten();
+  }
+});
+
+function $$() {
+  return Selector.findChildElements(document, $A(arguments));
+}
+var Form = {
+  reset: function(form) {
+    $(form).reset();
+    return form;
+  },
+
+  serializeElements: function(elements, getHash) {
+    var data = elements.inject({}, function(result, element) {
+      if (!element.disabled && element.name) {
+        var key = element.name, value = $(element).getValue();
+        if (value != undefined) {
+          if (result[key]) {
+            if (result[key].constructor != Array) result[key] = [result[key]];
+            result[key].push(value);
+          }
+          else result[key] = value;
+        }
+      }
+      return result;
+    });
+
+    return getHash ? data : Hash.toQueryString(data);
+  }
+};
+
+Form.Methods = {
+  serialize: function(form, getHash) {
+    return Form.serializeElements(Form.getElements(form), getHash);
+  },
+
+  getElements: function(form) {
+    return $A($(form).getElementsByTagName('*')).inject([],
+      function(elements, child) {
+        if (Form.Element.Serializers[child.tagName.toLowerCase()])
+          elements.push(Element.extend(child));
+        return elements;
+      }
+    );
+  },
+
+  getInputs: function(form, typeName, name) {
+    form = $(form);
+    var inputs = form.getElementsByTagName('input');
+
+    if (!typeName && !name) return $A(inputs).map(Element.extend);
+
+    for (var i = 0, matchingInputs = [], length = inputs.length; i < length; i++) {
+      var input = inputs[i];
+      if ((typeName && input.type != typeName) || (name && input.name != name))
+        continue;
+      matchingInputs.push(Element.extend(input));
+    }
+
+    return matchingInputs;
+  },
+
+  disable: function(form) {
+    form = $(form);
+    form.getElements().each(function(element) {
+      element.blur();
+      element.disabled = 'true';
+    });
+    return form;
+  },
+
+  enable: function(form) {
+    form = $(form);
+    form.getElements().each(function(element) {
+      element.disabled = '';
+    });
+    return form;
+  },
+
+  findFirstElement: function(form) {
+    return $(form).getElements().find(function(element) {
+      return element.type != 'hidden' && !element.disabled &&
+        ['input', 'select', 'textarea'].include(element.tagName.toLowerCase());
+    });
+  },
+
+  focusFirstElement: function(form) {
+    form = $(form);
+    form.findFirstElement().activate();
+    return form;
+  }
+}
+
+Object.extend(Form, Form.Methods);
+
+/*--------------------------------------------------------------------------*/
+
+Form.Element = {
+  focus: function(element) {
+    $(element).focus();
+    return element;
+  },
+
+  select: function(element) {
+    $(element).select();
+    return element;
+  }
+}
+
+Form.Element.Methods = {
+  serialize: function(element) {
+    element = $(element);
+    if (!element.disabled && element.name) {
+      var value = element.getValue();
+      if (value != undefined) {
+        var pair = {};
+        pair[element.name] = value;
+        return Hash.toQueryString(pair);
+      }
+    }
+    return '';
+  },
+
+  getValue: function(element) {
+    element = $(element);
+    var method = element.tagName.toLowerCase();
+    return Form.Element.Serializers[method](element);
+  },
+
+  clear: function(element) {
+    $(element).value = '';
+    return element;
+  },
+
+  present: function(element) {
+    return $(element).value != '';
+  },
+
+  activate: function(element) {
+    element = $(element);
+    element.focus();
+    if (element.select && ( element.tagName.toLowerCase() != 'input' ||
+      !['button', 'reset', 'submit'].include(element.type) ) )
+      element.select();
+    return element;
+  },
+
+  disable: function(element) {
+    element = $(element);
+    element.disabled = true;
+    return element;
+  },
+
+  enable: function(element) {
+    element = $(element);
+    element.blur();
+    element.disabled = false;
+    return element;
+  }
+}
+
+Object.extend(Form.Element, Form.Element.Methods);
+var Field = Form.Element;
+var $F = Form.Element.getValue;
+
+/*--------------------------------------------------------------------------*/
+
+Form.Element.Serializers = {
+  input: function(element) {
+    switch (element.type.toLowerCase()) {
+      case 'checkbox':
+      case 'radio':
+        return Form.Element.Serializers.inputSelector(element);
+      default:
+        return Form.Element.Serializers.textarea(element);
+    }
+  },
+
+  inputSelector: function(element) {
+    return element.checked ? element.value : null;
+  },
+
+  textarea: function(element) {
+    return element.value;
+  },
+
+  select: function(element) {
+    return this[element.type == 'select-one' ?
+      'selectOne' : 'selectMany'](element);
+  },
+
+  selectOne: function(element) {
+    var index = element.selectedIndex;
+    return index >= 0 ? this.optionValue(element.options[index]) : null;
+  },
+
+  selectMany: function(element) {
+    var values, length = element.length;
+    if (!length) return null;
+
+    for (var i = 0, values = []; i < length; i++) {
+      var opt = element.options[i];
+      if (opt.selected) values.push(this.optionValue(opt));
+    }
+    return values;
+  },
+
+  optionValue: function(opt) {
+    // extend element because hasAttribute may not be native
+    return Element.extend(opt).hasAttribute('value') ? opt.value : opt.text;
+  }
+}
+
+/*--------------------------------------------------------------------------*/
+
+Abstract.TimedObserver = function() {}
+Abstract.TimedObserver.prototype = {
+  initialize: function(element, frequency, callback) {
+    this.frequency = frequency;
+    this.element   = $(element);
+    this.callback  = callback;
+
+    this.lastValue = this.getValue();
+    this.registerCallback();
+  },
+
+  registerCallback: function() {
+    setInterval(this.onTimerEvent.bind(this), this.frequency * 1000);
+  },
+
+  onTimerEvent: function() {
+    var value = this.getValue();
+    var changed = ('string' == typeof this.lastValue && 'string' == typeof value
+      ? this.lastValue != value : String(this.lastValue) != String(value));
+    if (changed) {
+      this.callback(this.element, value);
+      this.lastValue = value;
+    }
+  }
+}
+
+Form.Element.Observer = Class.create();
+Form.Element.Observer.prototype = Object.extend(new Abstract.TimedObserver(), {
+  getValue: function() {
+    return Form.Element.getValue(this.element);
+  }
+});
+
+Form.Observer = Class.create();
+Form.Observer.prototype = Object.extend(new Abstract.TimedObserver(), {
+  getValue: function() {
+    return Form.serialize(this.element);
+  }
+});
+
+/*--------------------------------------------------------------------------*/
+
+Abstract.EventObserver = function() {}
+Abstract.EventObserver.prototype = {
+  initialize: function(element, callback) {
+    this.element  = $(element);
+    this.callback = callback;
+
+    this.lastValue = this.getValue();
+    if (this.element.tagName.toLowerCase() == 'form')
+      this.registerFormCallbacks();
+    else
+      this.registerCallback(this.element);
+  },
+
+  onElementEvent: function() {
+    var value = this.getValue();
+    if (this.lastValue != value) {
+      this.callback(this.element, value);
+      this.lastValue = value;
+    }
+  },
+
+  registerFormCallbacks: function() {
+    Form.getElements(this.element).each(this.registerCallback.bind(this));
+  },
+
+  registerCallback: function(element) {
+    if (element.type) {
+      switch (element.type.toLowerCase()) {
+        case 'checkbox':
+        case 'radio':
+          Event.observe(element, 'click', this.onElementEvent.bind(this));
+          break;
+        default:
+          Event.observe(element, 'change', this.onElementEvent.bind(this));
+          break;
+      }
+    }
+  }
+}
+
+Form.Element.EventObserver = Class.create();
+Form.Element.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), {
+  getValue: function() {
+    return Form.Element.getValue(this.element);
+  }
+});
+
+Form.EventObserver = Class.create();
+Form.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), {
+  getValue: function() {
+    return Form.serialize(this.element);
+  }
+});
+if (!window.Event) {
+  var Event = new Object();
+}
+
+Object.extend(Event, {
+  KEY_BACKSPACE: 8,
+  KEY_TAB:       9,
+  KEY_RETURN:   13,
+  KEY_ESC:      27,
+  KEY_LEFT:     37,
+  KEY_UP:       38,
+  KEY_RIGHT:    39,
+  KEY_DOWN:     40,
+  KEY_DELETE:   46,
+  KEY_HOME:     36,
+  KEY_END:      35,
+  KEY_PAGEUP:   33,
+  KEY_PAGEDOWN: 34,
+
+  element: function(event) {
+    return event.target || event.srcElement;
+  },
+
+  isLeftClick: function(event) {
+    return (((event.which) && (event.which == 1)) ||
+            ((event.button) && (event.button == 1)));
+  },
+
+  pointerX: function(event) {
+    return event.pageX || (event.clientX +
+      (document.documentElement.scrollLeft || document.body.scrollLeft));
+  },
+
+  pointerY: function(event) {
+    return event.pageY || (event.clientY +
+      (document.documentElement.scrollTop || document.body.scrollTop));
+  },
+
+  stop: function(event) {
+    if (event.preventDefault) {
+      event.preventDefault();
+      event.stopPropagation();
+    } else {
+      event.returnValue = false;
+      event.cancelBubble = true;
+    }
+  },
+
+  // find the first node with the given tagName, starting from the
+  // node the event was triggered on; traverses the DOM upwards
+  findElement: function(event, tagName) {
+    var element = Event.element(event);
+    while (element.parentNode && (!element.tagName ||
+        (element.tagName.toUpperCase() != tagName.toUpperCase())))
+      element = element.parentNode;
+    return element;
+  },
+
+  observers: false,
+
+  _observeAndCache: function(element, name, observer, useCapture) {
+    if (!this.observers) this.observers = [];
+    if (element.addEventListener) {
+      this.observers.push([element, name, observer, useCapture]);
+      element.addEventListener(name, observer, useCapture);
+    } else if (element.attachEvent) {
+      this.observers.push([element, name, observer, useCapture]);
+      element.attachEvent('on' + name, observer);
+    }
+  },
+
+  unloadCache: function() {
+    if (!Event.observers) return;
+    for (var i = 0, length = Event.observers.length; i < length; i++) {
+      Event.stopObserving.apply(this, Event.observers[i]);
+      Event.observers[i][0] = null;
+    }
+    Event.observers = false;
+  },
+
+  observe: function(element, name, observer, useCapture) {
+    element = $(element);
+    useCapture = useCapture || false;
+
+    if (name == 'keypress' &&
+        (navigator.appVersion.match(/Konqueror|Safari|KHTML/)
+        || element.attachEvent))
+      name = 'keydown';
+
+    Event._observeAndCache(element, name, observer, useCapture);
+  },
+
+  stopObserving: function(element, name, observer, useCapture) {
+    element = $(element);
+    useCapture = useCapture || false;
+
+    if (name == 'keypress' &&
+        (navigator.appVersion.match(/Konqueror|Safari|KHTML/)
+        || element.detachEvent))
+      name = 'keydown';
+
+    if (element.removeEventListener) {
+      element.removeEventListener(name, observer, useCapture);
+    } else if (element.detachEvent) {
+      try {
+        element.detachEvent('on' + name, observer);
+      } catch (e) {}
+    }
+  }
+});
+
+/* prevent memory leaks in IE */
+if (navigator.appVersion.match(/\bMSIE\b/))
+  Event.observe(window, 'unload', Event.unloadCache, false);
+var Position = {
+  // set to true if needed, warning: firefox performance problems
+  // NOT neeeded for page scrolling, only if draggable contained in
+  // scrollable elements
+  includeScrollOffsets: false,
+
+  // must be called before calling withinIncludingScrolloffset, every time the
+  // page is scrolled
+  prepare: function() {
+    this.deltaX =  window.pageXOffset
+                || document.documentElement.scrollLeft
+                || document.body.scrollLeft
+                || 0;
+    this.deltaY =  window.pageYOffset
+                || document.documentElement.scrollTop
+                || document.body.scrollTop
+                || 0;
+  },
+
+  realOffset: function(element) {
+    var valueT = 0, valueL = 0;
+    do {
+      valueT += element.scrollTop  || 0;
+      valueL += element.scrollLeft || 0;
+      element = element.parentNode;
+    } while (element);
+    return [valueL, valueT];
+  },
+
+  cumulativeOffset: function(element) {
+    var valueT = 0, valueL = 0;
+    do {
+      valueT += element.offsetTop  || 0;
+      valueL += element.offsetLeft || 0;
+      element = element.offsetParent;
+    } while (element);
+    return [valueL, valueT];
+  },
+
+  positionedOffset: function(element) {
+    var valueT = 0, valueL = 0;
+    do {
+      valueT += element.offsetTop  || 0;
+      valueL += element.offsetLeft || 0;
+      element = element.offsetParent;
+      if (element) {
+        if(element.tagName=='BODY') break;
+        var p = Element.getStyle(element, 'position');
+        if (p == 'relative' || p == 'absolute') break;
+      }
+    } while (element);
+    return [valueL, valueT];
+  },
+
+  offsetParent: function(element) {
+    if (element.offsetParent) return element.offsetParent;
+    if (element == document.body) return element;
+
+    while ((element = element.parentNode) && element != document.body)
+      if (Element.getStyle(element, 'position') != 'static')
+        return element;
+
+    return document.body;
+  },
+
+  // caches x/y coordinate pair to use with overlap
+  within: function(element, x, y) {
+    if (this.includeScrollOffsets)
+      return this.withinIncludingScrolloffsets(element, x, y);
+    this.xcomp = x;
+    this.ycomp = y;
+    this.offset = this.cumulativeOffset(element);
+
+    return (y >= this.offset[1] &&
+            y <  this.offset[1] + element.offsetHeight &&
+            x >= this.offset[0] &&
+            x <  this.offset[0] + element.offsetWidth);
+  },
+
+  withinIncludingScrolloffsets: function(element, x, y) {
+    var offsetcache = this.realOffset(element);
+
+    this.xcomp = x + offsetcache[0] - this.deltaX;
+    this.ycomp = y + offsetcache[1] - this.deltaY;
+    this.offset = this.cumulativeOffset(element);
+
+    return (this.ycomp >= this.offset[1] &&
+            this.ycomp <  this.offset[1] + element.offsetHeight &&
+            this.xcomp >= this.offset[0] &&
+            this.xcomp <  this.offset[0] + element.offsetWidth);
+  },
+
+  // within must be called directly before
+  overlap: function(mode, element) {
+    if (!mode) return 0;
+    if (mode == 'vertical')
+      return ((this.offset[1] + element.offsetHeight) - this.ycomp) /
+        element.offsetHeight;
+    if (mode == 'horizontal')
+      return ((this.offset[0] + element.offsetWidth) - this.xcomp) /
+        element.offsetWidth;
+  },
+
+  page: function(forElement) {
+    var valueT = 0, valueL = 0;
+
+    var element = forElement;
+    do {
+      valueT += element.offsetTop  || 0;
+      valueL += element.offsetLeft || 0;
+
+      // Safari fix
+      if (element.offsetParent==document.body)
+        if (Element.getStyle(element,'position')=='absolute') break;
+
+    } while (element = element.offsetParent);
+
+    element = forElement;
+    do {
+      if (!window.opera || element.tagName=='BODY') {
+        valueT -= element.scrollTop  || 0;
+        valueL -= element.scrollLeft || 0;
+      }
+    } while (element = element.parentNode);
+
+    return [valueL, valueT];
+  },
+
+  clone: function(source, target) {
+    var options = Object.extend({
+      setLeft:    true,
+      setTop:     true,
+      setWidth:   true,
+      setHeight:  true,
+      offsetTop:  0,
+      offsetLeft: 0
+    }, arguments[2] || {})
+
+    // find page position of source
+    source = $(source);
+    var p = Position.page(source);
+
+    // find coordinate system to use
+    target = $(target);
+    var delta = [0, 0];
+    var parent = null;
+    // delta [0,0] will do fine with position: fixed elements,
+    // position:absolute needs offsetParent deltas
+    if (Element.getStyle(target,'position') == 'absolute') {
+      parent = Position.offsetParent(target);
+      delta = Position.page(parent);
+    }
+
+    // correct by body offsets (fixes Safari)
+    if (parent == document.body) {
+      delta[0] -= document.body.offsetLeft;
+      delta[1] -= document.body.offsetTop;
+    }
+
+    // set position
+    if(options.setLeft)   target.style.left  = (p[0] - delta[0] + options.offsetLeft) + 'px';
+    if(options.setTop)    target.style.top   = (p[1] - delta[1] + options.offsetTop) + 'px';
+    if(options.setWidth)  target.style.width = source.offsetWidth + 'px';
+    if(options.setHeight) target.style.height = source.offsetHeight + 'px';
+  },
+
+  absolutize: function(element) {
+    element = $(element);
+    if (element.style.position == 'absolute') return;
+    Position.prepare();
+
+    var offsets = Position.positionedOffset(element);
+    var top     = offsets[1];
+    var left    = offsets[0];
+    var width   = element.clientWidth;
+    var height  = element.clientHeight;
+
+    element._originalLeft   = left - parseFloat(element.style.left  || 0);
+    element._originalTop    = top  - parseFloat(element.style.top || 0);
+    element._originalWidth  = element.style.width;
+    element._originalHeight = element.style.height;
+
+    element.style.position = 'absolute';
+    element.style.top    = top + 'px';
+    element.style.left   = left + 'px';
+    element.style.width  = width + 'px';
+    element.style.height = height + 'px';
+  },
+
+  relativize: function(element) {
+    element = $(element);
+    if (element.style.position == 'relative') return;
+    Position.prepare();
+
+    element.style.position = 'relative';
+    var top  = parseFloat(element.style.top  || 0) - (element._originalTop || 0);
+    var left = parseFloat(element.style.left || 0) - (element._originalLeft || 0);
+
+    element.style.top    = top + 'px';
+    element.style.left   = left + 'px';
+    element.style.height = element._originalHeight;
+    element.style.width  = element._originalWidth;
+  }
+}
+
+// Safari returns margins on body which is incorrect if the child is absolutely
+// positioned.  For performance reasons, redefine Position.cumulativeOffset for
+// KHTML/WebKit only.
+if (/Konqueror|Safari|KHTML/.test(navigator.userAgent)) {
+  Position.cumulativeOffset = function(element) {
+    var valueT = 0, valueL = 0;
+    do {
+      valueT += element.offsetTop  || 0;
+      valueL += element.offsetLeft || 0;
+      if (element.offsetParent == document.body)
+        if (Element.getStyle(element, 'position') == 'absolute') break;
+
+      element = element.offsetParent;
+    } while (element);
+
+    return [valueL, valueT];
+  }
+}
+
+Element.addMethods();
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/javascript/prototype/range.js
===================================================================
--- branches/refactor1/framework/impl/src/main/javascript/prototype/range.js	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/javascript/prototype/range.js	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,29 @@
+ObjectRange = Class.create();
+Object.extend(ObjectRange.prototype, Enumerable);
+Object.extend(ObjectRange.prototype, {
+  initialize: function(start, end, exclusive) {
+    this.start = start;
+    this.end = end;
+    this.exclusive = exclusive;
+  },
+  
+  _each: function(iterator) {
+    var value = this.start;
+    do {
+      iterator(value);
+      value = value.succ();
+    } while (this.include(value));
+  },
+  
+  include: function(value) {
+    if (value < this.start) 
+      return false;
+    if (this.exclusive)
+      return value < this.end;
+    return value <= this.end;
+  }
+});
+
+var $R = function(start, end, exclusive) {
+  return new ObjectRange(start, end, exclusive);
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/javascript/prototype/string.js
===================================================================
--- branches/refactor1/framework/impl/src/main/javascript/prototype/string.js	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/javascript/prototype/string.js	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,69 @@
+Object.extend(String.prototype, {
+  stripTags: function() {
+    return this.replace(/<\/?[^>]+>/gi, '');
+  },
+
+  stripScripts: function() {
+    return this.replace(new RegExp(Prototype.ScriptFragment, 'img'), '');
+  },
+  
+  extractScripts: function() {
+    var matchAll = new RegExp(Prototype.ScriptFragment, 'img');
+    var matchOne = new RegExp(Prototype.ScriptFragment, 'im');
+    return (this.match(matchAll) || []).map(function(scriptTag) {
+      return (scriptTag.match(matchOne) || ['', ''])[1];
+    });
+  },
+  
+  evalScripts: function() {
+    return this.extractScripts().map(eval);
+  },
+
+  escapeHTML: function() {
+    var div = document.createElement('div');
+    var text = document.createTextNode(this);
+    div.appendChild(text);
+    return div.innerHTML;
+  },
+
+  unescapeHTML: function() {
+    var div = document.createElement('div');
+    div.innerHTML = this.stripTags();
+    return div.childNodes[0] ? div.childNodes[0].nodeValue : '';
+  },
+  
+  toQueryParams: function() {
+    var pairs = this.match(/^\??(.*)$/)[1].split('&');
+    return pairs.inject({}, function(params, pairString) {
+      var pair = pairString.split('=');
+      params[pair[0]] = pair[1];
+      return params;
+    });
+  },
+  
+  toArray: function() {
+    return this.split('');
+  },
+  
+  camelize: function() {
+    var oStringList = this.split('-');
+    if (oStringList.length == 1) return oStringList[0];
+      
+    var camelizedString = this.indexOf('-') == 0
+      ? oStringList[0].charAt(0).toUpperCase() + oStringList[0].substring(1) 
+      : oStringList[0];
+      
+    for (var i = 1, len = oStringList.length; i < len; i++) {
+      var s = oStringList[i];
+      camelizedString += s.charAt(0).toUpperCase() + s.substring(1);
+    }
+    
+    return camelizedString;
+  },
+
+  inspect: function() {
+    return "'" + this.replace('\\', '\\\\').replace("'", '\\\'') + "'";
+  }
+});
+
+String.prototype.parseQuery = String.prototype.toQueryParams;

Added: branches/refactor1/framework/impl/src/main/resources/META-INF/.svnignore
===================================================================
--- branches/refactor1/framework/impl/src/main/resources/META-INF/.svnignore	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/resources/META-INF/.svnignore	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1 @@
+MANIFEST.MF

Added: branches/refactor1/framework/impl/src/main/resources/META-INF/services/javax.imageio.spi.ImageWriterSpi
===================================================================
--- branches/refactor1/framework/impl/src/main/resources/META-INF/services/javax.imageio.spi.ImageWriterSpi	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/resources/META-INF/services/javax.imageio.spi.ImageWriterSpi	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,2 @@
+org.ajax4jsf.framework.util.image.imageio.gif.GIFImageWriterSpi
+

Added: branches/refactor1/framework/impl/src/main/resources/META-INF/skins/DEFAULT.skin.properties
===================================================================
--- branches/refactor1/framework/impl/src/main/resources/META-INF/skins/DEFAULT.skin.properties	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/resources/META-INF/skins/DEFAULT.skin.properties	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,50 @@
+#Colors
+headerBackgroundColor=#D4CFC7
+headerGradientColor=#EDEAE6
+headerTextColor=#000000
+headerWeightFont=bold
+
+generalBackgroundColor=#FFFFFF
+generalTextColor=#000000
+generalSizeFont=11px
+generalFamilyFont=Arial, Verdana, sans-serif 
+
+controlTextColor=#000000
+controlBackgroundColor=#ffffff
+additionalBackgroundColor=#F1EEE9
+
+shadowBackgroundColor=#000000
+shadowOpacity=1
+
+panelBorderColor=#C4C0B9
+subBorderColor=#ffffff
+
+tabBackgroundColor=#E3DED5
+tabDisabledTextColor=#B1ADA7
+
+trimColor=#DFDCD5
+
+tipBackgroundColor=\#FAE6B0 
+tipBorderColor=\#E5973E 
+
+selectControlColor=#E79A00
+
+
+generalLinkColor=#0078D0
+hoverLinkColor=#0090FF
+visitedLinkColor=#0090FF
+
+# Fonts
+headerSizeFont=11px
+headerFamilyFont=Arial, Verdana, sans-serif
+
+tabSizeFont=11
+tabFamilyFont=Arial, Verdana, sans-serif
+
+buttonSizeFont=11
+buttonFamilyFont=Arial, Verdana, sans-serif
+
+tableBackgroundColor=#FFFFFF
+tableFooterBackgroundColor=#cccccc
+tableSubfooterBackgroundColor=#f1f1f1
+tableBorderColor=#C4C0C9

Added: branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/framework/ajax/jsshell.html
===================================================================
--- branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/framework/ajax/jsshell.html	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/framework/ajax/jsshell.html	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,740 @@
+<!-- short bookmarklet
+// javascript:function loadScript(scriptURL) { var scriptElem = document.createElement('SCRIPT'); scriptElem.setAttribute('language', 'JavaScript'); scriptElem.setAttribute('src', scriptURL); document.body.appendChild(scriptElem);} loadScript('http://blog.monstuff.com/archives/images/jsshell.js');
+
+
+with(window.open("","_blank","width="+screen.width*.6+",left="+screen.width*.35+",height="+screen.height*.9+",resizable,scrollbars=yes")){document.write("" +
+-->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+
+<html >
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>JavaScript Shell 1.4 modified to support IE</title>
+
+<script type="text/javascript">
+var 
+histList = [""], 
+histPos = 0, 
+_scope = {}, 
+_win, // a top-level context
+question,
+_in,
+_out,
+tooManyMatches = null,
+lastError = null;
+
+function refocus()
+{
+  _in.blur(); // Needed for Mozilla to scroll correctly.
+  _in.focus();
+}
+
+function init()
+{
+  _in = document.getElementById("input");
+  _out = document.getElementById("output");
+
+  _win = window;
+
+  if (opener && !opener.closed)
+  {
+    println("Using bookmarklet version of shell: commands will run in opener's context.", "message");
+    _win = opener;
+  }
+
+  initTarget();
+
+  recalculateInputHeight();
+  refocus();
+}
+
+function initTarget()
+{
+  _win.Shell = window;
+  _win.print = shellCommands.print;
+}
+
+
+// Unless the user is selected something, refocus the textbox.
+// (requested by caillon, brendan, asa)
+function keepFocusInTextbox(e) 
+{
+  var g = e.srcElement ? e.srcElement : e.target; // IE vs. standard
+  
+  while (!g.tagName)
+    g = g.parentNode;
+  var t = g.tagName.toUpperCase();
+  if (t=="A" || t=="INPUT")
+    return;
+    
+  if (window.getSelection) {
+    // Mozilla
+    if (String(window.getSelection()))
+      return;
+  }
+  else if (document.getSelection) {
+    // Opera? Netscape 4?
+    if (document.getSelection())
+      return;
+  }
+  else {
+    // IE
+    if ( document.selection.createRange().text )
+      return;
+  }
+  
+  refocus();
+}
+
+function inputKeydown(e) {
+  // Use onkeydown because IE doesn't support onkeypress for arrow keys
+
+  //alert(e.keyCode + " ^ " + e.keycode);
+
+  if (e.shiftKey && e.keyCode == 13) { // shift-enter
+    // don't do anything; allow the shift-enter to insert a line break as normal
+  } else if (e.keyCode == 13) { // enter
+    // execute the input on enter
+    try { go(); } catch(er) { alert(er); };
+    setTimeout(function() { _in.value = ""; }, 0); // can't preventDefault on input, so clear it later
+  } else if (e.keyCode == 38) { // up
+    // go up in history if at top or ctrl-up
+    if (e.ctrlKey || caretInFirstLine(_in))
+      hist(true);
+  } else if (e.keyCode == 40) { // down
+    // go down in history if at end or ctrl-down
+    if (e.ctrlKey || caretInLastLine(_in))
+      hist(false);
+  } else if(e.ctrlKey && e.keyCode == 32) { // ctrl-space
+    tabcomplete();
+    e.cancelBubble = false;
+    e.returnValue = false;
+    return false;
+  } else if (e.keyCode == 9) { // tab
+    tabcomplete();
+    setTimeout(function() { refocus(); }, 0); // refocus because tab was hit
+  } else { }
+
+  setTimeout(recalculateInputHeight, 0);
+  
+  //return true;
+};
+
+function caretInFirstLine(textbox)
+{
+  // IE doesn't support selectionStart/selectionEnd
+  if (textbox.selectionStart == undefined)
+    return true;
+
+  var firstLineBreak = textbox.value.indexOf("\n");
+  
+  return ((firstLineBreak == -1) || (textbox.selectionStart <= firstLineBreak));
+}
+
+function caretInLastLine(textbox)
+{
+  // IE doesn't support selectionStart/selectionEnd
+  if (textbox.selectionEnd == undefined)
+    return true;
+
+  var lastLineBreak = textbox.value.lastIndexOf("\n");
+  
+  return (textbox.selectionEnd > lastLineBreak);
+}
+
+function recalculateInputHeight()
+{
+  var rows = _in.value.split(/\n/).length
+    + 1 // prevent scrollbar flickering in Mozilla
+    + (window.opera ? 1 : 0); // leave room for scrollbar in Opera
+  
+  if (_in.rows != rows) // without this check, it is impossible to select text in Opera 7.60 or Opera 8.0.
+    _in.rows = rows;
+}
+
+function println(s, type)
+{
+  if((s=String(s)))
+  {
+    var newdiv = document.createElement("div");
+    newdiv.appendChild(document.createTextNode(s));
+    newdiv.className = type;
+    _out.appendChild(newdiv);
+    return newdiv;
+  }
+}
+
+function printWithRunin(h, s, type)
+{
+  var div = println(s, type);
+  var head = document.createElement("strong");
+  head.appendChild(document.createTextNode(h + ": "));
+  div.insertBefore(head, div.firstChild);
+}
+
+
+var shellCommands = 
+{
+load : function load(url)
+{
+  var s = _win.document.createElement("script");
+  s.type = "text/javascript";
+  s.src = url;
+  _win.document.getElementsByTagName("head")[0].appendChild(s);
+  println("Loading " + url + "...", "message");
+},
+
+clear : function clear()
+{
+  var CHILDREN_TO_PRESERVE = 3;
+  while (_out.childNodes[CHILDREN_TO_PRESERVE]) 
+    _out.removeChild(_out.childNodes[CHILDREN_TO_PRESERVE]);
+},
+
+print : function print(s) { println(s, "print"); },
+
+// the normal function, "print", shouldn't return a value
+// (suggested by brendan; later noticed it was a problem when showing others)
+pr : function pr(s) 
+{ 
+  shellCommands.print(s); // need to specify shellCommands so it doesn't try window.print()!
+  return s;
+},
+
+props : function props(e, onePerLine)
+{
+  if (e === null) {
+    println("props called with null argument", "error");
+    return;
+  }
+
+  if (e === undefined) {
+    println("props called with undefined argument", "error");
+    return;
+  }
+
+  var ns = ["Methods", "Fields", "Unreachables"];
+  var as = [[], [], []]; // array of (empty) arrays of arrays!
+  var p, j, i; // loop variables, several used multiple times
+
+  var protoLevels = 0;
+
+  for (p = e; p; p = p.__proto__)
+  {
+    for (i=0; i<ns.length; ++i)
+      as[i][protoLevels] = [];
+    ++protoLevels;
+  }
+
+  for(var a in e)
+  {
+    // Shortcoming: doesn't check that VALUES are the same in object and prototype.
+
+    var protoLevel = -1;
+    try
+    {
+      for (p = e; p && (a in p); p = p.__proto__)
+        ++protoLevel;
+    }
+    catch(er) { protoLevel = 0; } // "in" operator throws when param to props() is a string
+
+    var type = 1;
+    try
+    {
+      if ((typeof e[a]) == "function")
+        type = 0;
+    }
+    catch (er) { type = 2; }
+
+    as[type][protoLevel].push(a);
+  }
+
+  function times(s, n) { return n ? s + times(s, n-1) : ""; }
+
+  for (j=0; j<protoLevels; ++j)
+    for (i=0;i<ns.length;++i)
+      if (as[i][j].length) 
+        printWithRunin(
+          ns[i] + times(" of prototype", j), 
+          (onePerLine ? "\n\n" : "") + as[i][j].sort().join(onePerLine ? "\n" : ", ") + (onePerLine ? "\n\n" : ""), 
+          "propList"
+        );
+},
+
+blink : function blink(node)
+{
+  if (!node)                     throw("blink: argument is null or undefined.");
+  if (node.nodeType == null)     throw("blink: argument must be a node.");
+  if (node.nodeType == 3)        throw("blink: argument must not be a text node");
+  if (node.documentElement)      throw("blink: argument must not be the document object");
+
+  function setOutline(o) { 
+    return function() {
+      if (node.style.outline != node.style.bogusProperty) {
+        // browser supports outline (Firefox 1.1 and newer, CSS3, Opera 8).
+        node.style.outline = o;
+      }
+      else if (node.style.MozOutline != node.style.bogusProperty) {
+        // browser supports MozOutline (Firefox 1.0.x and older)
+        node.style.MozOutline = o;
+      }
+      else {
+        // browser only supports border (IE). border is a fallback because it moves things around.
+        node.style.border = o;
+      }
+    }
+  } 
+  
+  function focusIt(a) {
+    return function() {
+      a.focus(); 
+    }
+  }
+
+  if (node.ownerDocument) {
+    var windowToFocusNow = (node.ownerDocument.defaultView || node.ownerDocument.parentWindow); // Moz vs. IE
+    if (windowToFocusNow)
+      setTimeout(focusIt(windowToFocusNow.top), 0);
+  }
+
+  for(var i=1;i<7;++i)
+    setTimeout(setOutline((i%252)?'3px solid red':'none'), i*100);
+
+  setTimeout(focusIt(window), 800);
+  setTimeout(focusIt(_in), 810);
+},
+
+scope : function scope(sc)
+{
+  if (!sc) sc = {};
+  _scope = sc;
+  println("Scope is now " + sc + ".  If a variable is not found in this scope, window will also be searched.  New variables will still go on window.", "message");
+},
+
+mathHelp : function mathHelp()
+{
+  printWithRunin("Math constants", "E, LN2, LN10, LOG2E, LOG10E, PI, SQRT1_2, SQRT2", "propList");
+  printWithRunin("Math methods", "abs, acos, asin, atan, atan2, ceil, cos, exp, floor, log, max, min, pow, random, round, sin, sqrt, tan", "propList");
+},
+
+ans : undefined
+};
+
+
+function hist(up)
+{
+  // histList[0] = first command entered, [1] = second, etc.
+  // type something, press up --> thing typed is now in "limbo"
+  // (last item in histList) and should be reachable by pressing 
+  // down again.
+
+  var L = histList.length;
+
+  if (L == 1)
+    return;
+
+  if (up)
+  {
+    if (histPos == L-1)
+    {
+      // Save this entry in case the user hits the down key.
+      histList[histPos] = _in.value;
+    }
+
+    if (histPos > 0)
+    {
+      histPos--;
+      // Use a timeout to prevent up from moving cursor within new text
+      // Set to nothing first for the same reason
+      setTimeout(
+        function() {
+          _in.value = ''; 
+          _in.value = histList[histPos];
+          var caretPos = _in.value.length;
+          if (_in.setSelectionRange) 
+            _in.setSelectionRange(caretPos, caretPos);
+        },
+        0
+      );
+    }
+  } 
+  else // down
+  {
+    if (histPos < L-1)
+    {
+      histPos++;
+      _in.value = histList[histPos];
+    }
+    else if (histPos == L-1)
+    {
+      // Already on the current entry: clear but save
+      if (_in.value)
+      {
+        histList[histPos] = _in.value;
+        ++histPos;
+        _in.value = "";
+      }
+    }
+  }
+}
+
+function tabcomplete()
+{
+  /*
+   * Working backwards from s[from], find the spot
+   * where this expression starts.  It will scan
+   * until it hits a mismatched ( or a space,
+   * but it skips over quoted strings.
+   * If stopAtDot is true, stop at a '.'
+   */
+  function findbeginning(s, from, stopAtDot)
+  {
+    /*
+     *  Complicated function.
+     *
+     *  Return true if s[i] == q BUT ONLY IF
+     *  s[i-1] is not a backslash.
+     */
+    function equalButNotEscaped(s,i,q)
+    {
+      if(s.charAt(i) != q) // not equal go no further
+        return false;
+
+      if(i==0) // beginning of string
+        return true;
+
+      if(s.charAt(i-1) == '') // escaped?
+        return false;
+
+      return true;
+    }
+
+    var nparens = 0;
+    var i;
+    for(i=from; i>=0; i--)
+    {
+      if(s.charAt(i) == ' ')
+        break;
+
+      if(stopAtDot && s.charAt(i) == '.')
+        break;
+        
+      if(s.charAt(i) == ')')
+        nparens++;
+      else if(s.charAt(i) == '(')
+        nparens--;
+
+      if(nparens < 0)
+        break;
+
+      // skip quoted strings
+      if(s.charAt(i) == '\'' || s.charAt(i) == '"')
+      {
+        //dump("skipping quoted chars: ");
+        var quot = s.charAt(i);
+        i--;
+        while(i >= 0 && !equalButNotEscaped(s,i,quot)) {
+          //dump(s.charAt(i));
+          i--;
+        }
+        //dump("\n");
+      }
+    }
+    return i;
+  }
+
+  // XXX should be used more consistently (instead of using selectionStart/selectionEnd throughout code)
+  // XXX doesn't work in IE, even though it contains IE-specific code
+  function getcaretpos(inp)
+  {
+    if(inp.selectionEnd != null)
+      return inp.selectionEnd;
+      
+    var range = document.selection.createRange();
+    var isCollapsed = range.compareEndPoints("StartToEnd", range) == 0;
+    if (!isCollapsed)
+        range.collapse(false);
+    var b = range.getBookmark();
+    return b.charCodeAt(2) - 2;  
+  }
+
+  function setselectionto(inp,pos)
+  {
+    if(inp.selectionStart) {
+      inp.selectionStart = inp.selectionEnd = pos;
+    }
+    else if(inp.createTextRange) {
+      var docrange = _win.Shell.document.selection.createRange();
+      var inprange = inp.createTextRange();
+      inprange.move('character',pos);
+      inprange.select();
+    }
+    else { // err...
+    /*
+      inp.select();
+      if(_win.Shell.document.getSelection())
+        _win.Shell.document.getSelection() = "";
+        */
+    }
+  }
+    // get position of cursor within the input box
+    var caret = getcaretpos(_in);
+
+    if(caret) {
+      //dump("----\n");
+      var dotpos, spacepos, complete, obj;
+      //dump("caret pos: " + caret + "\n");
+      // see if there's a dot before here
+      dotpos = findbeginning(_in.value, caret-1, true);
+      //dump("dot pos: " + dotpos + "\n");
+      if(dotpos == -1 || _in.value.charAt(dotpos) != '.') {
+        dotpos = caret;
+	  //dump("changed dot pos: " + dotpos + "\n");
+      }
+
+      // look backwards for a non-variable-name character
+      spacepos = findbeginning(_in.value, dotpos-1, false);
+      //dump("space pos: " + spacepos + "\n");
+      // get the object we're trying to complete on
+      if(spacepos == dotpos || spacepos+1 == dotpos || dotpos == caret)
+      {
+        // try completing function args
+        if(_in.value.charAt(dotpos) == '(' ||
+ (_in.value.charAt(spacepos) == '(' && (spacepos+1) == dotpos))
+        {
+          var fn,fname;
+  var from = (_in.value.charAt(dotpos) == '(') ? dotpos : spacepos;
+          spacepos = findbeginning(_in.value, from-1, false);
+
+          fname = _in.value.substr(spacepos+1,from-(spacepos+1));
+  //dump("fname: " + fname + "\n");
+          try {
+            with(_win.Shell._scope)
+              with(_win)
+                with(Shell.shellCommands)
+                  fn = eval(fname);
+          }
+          catch(er) {
+            //dump('fn is not a valid object\n');
+            return;
+          }
+          if(fn == undefined) {
+             //dump('fn is undefined');
+             return;
+          }
+          if(fn instanceof Function)
+          {
+            // Print function definition, including argument names, but not function body
+            if(!fn.toString().match(/function .+?\(\) +\{\n +\[native code\]\n\}/))
+              println(fn.toString().match(/function .+?\(.*?\)/), "tabcomplete");
+          }
+
+          return;
+        }
+        else
+          obj = _win;
+      }
+      else
+      {
+        var objname = _in.value.substr(spacepos+1,dotpos-(spacepos+1));
+        //dump("objname: |" + objname + "|\n");
+        try {
+          with(_win.Shell._scope)
+            with(_win)
+                obj = eval(objname);
+        }
+        catch(er) {
+          printError(er); 
+          return;
+        }
+        if(obj == undefined) {
+          // sometimes this is tabcomplete's fault, so don't print it :(
+          // e.g. completing from "print(document.getElements"
+          // println("Can't complete from null or undefined expression " + objname, "error");
+          return;
+        }
+      }
+      //dump("obj: " + obj + "\n");
+      // get the thing we're trying to complete
+      if(dotpos == caret)
+      {
+        if(spacepos+1 == dotpos || spacepos == dotpos)
+        {
+          // nothing to complete
+          //dump("nothing to complete\n");
+          return;
+        }
+
+        complete = _in.value.substr(spacepos+1,dotpos-(spacepos+1));
+      }
+      else {
+        complete = _in.value.substr(dotpos+1,caret-(dotpos+1));
+      }
+      //dump("complete: " + complete + "\n");
+      // ok, now look at all the props/methods of this obj
+      // and find ones starting with 'complete'
+      var matches = [];
+      var bestmatch = null;
+      for(var a in obj)
+      {
+        //a = a.toString();
+        //XXX: making it lowercase could help some cases,
+        // but screws up my general logic.
+        if(a.substr(0,complete.length) == complete) {
+          matches.push(a);
+          ////dump("match: " + a + "\n");
+          // if no best match, this is the best match
+          if(bestmatch == null)
+          {
+            bestmatch = a;
+          }
+          else {
+            // the best match is the longest common string
+            function min(a,b){ return ((a<b)?a:b); }
+            var i;
+            for(i=0; i< min(bestmatch.length, a.length); i++)
+            {
+              if(bestmatch.charAt(i) != a.charAt(i))
+                break;
+            }
+            bestmatch = bestmatch.substr(0,i);
+            ////dump("bestmatch len: " + i + "\n");
+          }
+          ////dump("bestmatch: " + bestmatch + "\n");
+        }
+      }
+      bestmatch = (bestmatch || "");
+      ////dump("matches: " + matches + "\n");
+      var objAndComplete = (objname || obj) + "." + bestmatch;
+      //dump("matches.length: " + matches.length + ", tooManyMatches: " + tooManyMatches + ", objAndComplete: " + objAndComplete + "\n");
+      if(matches.length > 1 && (tooManyMatches == objAndComplete || matches.length <= 10)) {
+
+        printWithRunin("Matches: ", matches.join(', '), "tabcomplete");
+        tooManyMatches = null;
+      }
+      else if(matches.length > 10)
+      {
+        println(matches.length + " matches.  Press tab or ctrl-space again to see them all", "tabcomplete");
+        tooManyMatches = objAndComplete;
+      }
+      else {
+        tooManyMatches = null;
+      }
+      if(bestmatch != "")
+      {
+        var sstart;
+        if(dotpos == caret) {
+          sstart = spacepos+1;
+        }
+        else {
+          sstart = dotpos+1;
+        }
+        _in.value = _in.value.substr(0, sstart)
+                  + bestmatch
+                  + _in.value.substr(caret);
+        setselectionto(_in,caret + (bestmatch.length - complete.length));
+      }
+    }
+}
+
+function printQuestion(q)
+{
+  println(q, "input");
+}
+
+function printAnswer(a)
+{
+  if (a !== undefined) {
+    println(a, "normalOutput");
+    shellCommands.ans = a;
+  }
+}
+
+function printError(er)
+{ 
+  var lineNumberString;
+
+  lastError = er; // for debugging the shell
+  if (er.name)
+  {
+    // lineNumberString should not be "", to avoid a very wacky bug in IE 6.
+    lineNumberString = (er.lineNumber != undefined) ? (" on line " + er.lineNumber + ": ") : ": ";
+    println(er.name + lineNumberString + er.message, "error"); // Because IE doesn't have error.toString.
+  }
+  else
+    println(er, "error"); // Because security errors in Moz /only/ have toString.
+}
+
+function go(s)
+{
+  _in.value = question = s ? s : _in.value;
+
+  if (question == "")
+    return;
+
+  histList[histList.length-1] = question;
+  histList[histList.length] = "";
+  histPos = histList.length - 1;
+  
+  // Unfortunately, this has to happen *before* the JavaScript is run, so that 
+  // print() output will go in the right place.
+  _in.value='';
+  recalculateInputHeight();
+  printQuestion(question);
+
+  if (_win.closed) {
+    printError("Target window has been closed.");
+    return;
+  }
+  
+  try { ("Shell" in _win) }
+  catch(er) {
+    printError("The JavaScript Shell cannot access variables in the target window.  The most likely reason is that the target window now has a different page loaded and that page has a different hostname than the original page.");
+    return;
+  }
+
+  if (!("Shell" in _win))
+    initTarget(); // silent
+
+  // Evaluate Shell.question using _win's eval (this is why eval isn't in the |with|, IIRC).
+  _win.location.href = "javascript:try{ Shell.printAnswer(eval('with(Shell._scope) with(Shell.shellCommands) {' + Shell.question + String.fromCharCode(10) + '}')); } catch(er) { Shell.printError(er); }; setTimeout(Shell.refocus, 0); void 0";
+}
+
+</script>
+
+<!-- for http://ted.mielczarek.org/code/mozilla/extensiondev/ -->
+<script type="text/javascript" src="chrome://extensiondev/content/rdfhistory.js"></script>
+<script type="text/javascript" src="chrome://extensiondev/content/chromeShellExtras.js"></script>
+
+<style type="text/css">
+body { background: white; color: black; }
+
+#output { white-space: pre; white-space: -moz-pre-wrap; } /* Preserve line breaks, but wrap too if browser supports it */
+h3 { margin-top: 0; margin-bottom: 0em; }
+h3 + div { margin: 0; }
+
+form { margin: 0; padding: 0; }
+#input { width: 100%; border: none; padding: 0; overflow: auto; }
+
+.input { color: blue; background: white; font: inherit; font-weight: bold; margin-top: .5em; /* background: #E6E6FF; */ }
+.normalOutput { color: black; background: white; }
+.print { color: brown; background: white; }
+.error { color: red; background: white; }
+.propList { color: green; background: white; }
+.message { color: green; background: white; }
+.tabcomplete { color: purple; background: white; }
+</style>
+</head>
+
+<body onload="init()" onclick="keepFocusInTextbox(event)">
+
+<div id="output"><h3>JavaScript Shell 1.4</h3><h4>Modified by <a href="http://blog.monstuff.com">Julien Couvreur</a> to work in IE.</h4><div>Features: autocompletion of property names with Tab and Ctrl-Space, multiline input with Shift+Enter, input history with (Ctrl+) Up/Down, <a accesskey="M" href="javascript:go('scope(Math); mathHelp();');" title="Accesskey: M">Math</a>, <a accesskey="H" href="http://www.squarefree.com/shell/?ignoreReferrerFrom=shell1.4"  title="Accesskey: H">help</a></div><div>Values and functions: ans, print(string), <a accesskey="P" href="javascript:go('props(ans)')" title="Accesskey: P">props(object)</a>, <a accesskey="B" href="javascript:go('blink(ans)')" title="Accesskey: B">blink(node)</a>, <a accesskey="C" href="javascript:go('clear()')" title="Accesskey: C">clear()</a>, load(scriptURL), scope(object)</div></div>
+
+<div><textarea id="input" class="input" wrap="off" onkeydown="inputKeydown(event)" rows="1"></textarea></div>
+
+</body>
+
+</html>
+<!--
+");document.close();}
+-->
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/framework/ajax/xmlfilter/oscache.properties
===================================================================
--- branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/framework/ajax/xmlfilter/oscache.properties	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/framework/ajax/xmlfilter/oscache.properties	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,144 @@
+cache.memory = true
+cache.capacity = 10000
+cache.use.host.domain.in.key = true
+
+# CACHE IN MEMORY
+#
+# If you want to disable memory caching, just uncomment this line.
+#
+# cache.memory=false
+
+
+# CACHE KEY
+#
+# This is the key that will be used to store the cache in the application
+# and session scope.
+#
+# If you want to set the cache key to anything other than the default
+# uncomment this line and change the cache.key
+#
+# cache.key=__oscache_cache
+
+
+# USE HOST DOMAIN NAME IN KEY
+#
+# Servers for multiple host domains may wish to add host name info to
+# the generation of the key.  If this is true, then uncomment the
+# following line.
+#
+# cache.use.host.domain.in.key=true
+
+
+# CACHE LISTENERS
+#
+# These hook OSCache events and perform various actions such as logging
+# cache hits and misses, or broadcasting to other cache instances across a cluster.
+# See the documentation for further information.
+#
+# cache.event.listeners=com.opensymphony.oscache.plugins.clustersupport.JMSBroadcastingListener,  \
+#                       com.opensymphony.oscache.extra.CacheEntryEventListenerImpl,               \
+#                       com.opensymphony.oscache.extra.CacheMapAccessEventListenerImpl,           \
+#                       com.opensymphony.oscache.extra.ScopeEventListenerImpl
+
+
+# CACHE PERSISTENCE CLASS
+#
+# Specify the class to use for persistence. If you use the supplied DiskPersistenceListener,
+# don't forget to supply the cache.path property to specify the location of the cache
+# directory.
+# 
+# If a persistence class is not specified, OSCache will use memory caching only.
+#
+# cache.persistence.class=com.opensymphony.oscache.plugins.diskpersistence.DiskPersistenceListener
+
+# CACHE OVERFLOW PERSISTENCE
+# Use persistent cache in overflow or not. The default value is false, which means
+# the persistent cache will be used at all times for every entry.  true is the recommended setting.
+#
+# cache.persistence.overflow.only=true
+
+
+# CACHE DIRECTORY
+#
+# This is the directory on disk where caches will be stored by the DiskPersistenceListener.
+# it will be created if it doesn't already exist. Remember that OSCache must have
+# write permission to this directory.
+#
+# Note: for Windows machines, this needs \ to be escaped
+# ie Windows:
+# cache.path=c:\\myapp\\cache
+# or *ix:
+# cache.path=/opt/myapp/cache
+#
+# cache.path=c:\\app\\cache
+
+
+# CACHE ALGORITHM
+#
+# Default cache algorithm to use. Note that in order to use an algorithm
+# the cache size must also be specified. If the cache size is not specified,
+# the cache algorithm will be Unlimited cache.
+#
+# cache.algorithm=com.opensymphony.oscache.base.algorithm.LRUCache
+# cache.algorithm=com.opensymphony.oscache.base.algorithm.FIFOCache
+# cache.algorithm=com.opensymphony.oscache.base.algorithm.UnlimitedCache
+
+# THREAD BLOCKING BEHAVIOR
+#
+# When a request is made for a stale cache entry, it is possible that another thread is already
+# in the process of rebuilding that entry. This setting specifies how OSCache handles the
+# subsequent 'non-building' threads. The default behaviour (cache.blocking=false) is to serve
+# the old content to subsequent threads until the cache entry has been updated. This provides
+# the best performance (at the cost of serving slightly stale data). When blocking is enabled,
+# threads will instead block until the new cache entry is ready to be served. Once the new entry
+# is put in the cache the blocked threads will be restarted and given the new entry.
+# Note that even if blocking is disabled, when there is no stale data available to be served
+# threads will block until the data is added to the cache by the thread that is responsible
+# for building the data.
+#
+# cache.blocking=false
+
+
+# CACHE SIZE
+#
+# Default cache size in number of items. If a size is specified but not
+# an algorithm, the cache algorithm used will be LRUCache.
+#
+cache.capacity=1000
+
+
+# CACHE UNLIMITED DISK
+# Use unlimited disk cache or not. The default value is false, which means
+# the disk cache will be limited in size to the value specified by cache.capacity.
+#
+# cache.unlimited.disk=false
+
+
+# JMS CLUSTER PROPERTIES
+#
+# Configuration properties for JMS clustering. See the clustering documentation
+# for more information on these settings.
+#
+#cache.cluster.jms.topic.factory=java:comp/env/jms/TopicConnectionFactory
+#cache.cluster.jms.topic.name=java:comp/env/jms/OSCacheTopic
+#cache.cluster.jms.node.name=node1
+
+
+# JAVAGROUPS CLUSTER PROPERTIES
+#
+# Configuration properites for the JavaGroups clustering. Only one of these
+# should be specified. Default values (as shown below) will be used if niether
+# property is set. See the clustering documentation and the JavaGroups project
+# (www.javagroups.com) for more information on these settings.
+#
+#cache.cluster.properties=UDP(mcast_addr=231.12.21.132;mcast_port=45566;ip_ttl=32;\
+#mcast_send_buf_size=150000;mcast_recv_buf_size=80000):\
+#PING(timeout=2000;num_initial_members=3):\
+#MERGE2(min_interval=5000;max_interval=10000):\
+#FD_SOCK:VERIFY_SUSPECT(timeout=1500):\
+#pbcast.NAKACK(gc_lag=50;retransmit_timeout=300,600,1200,2400,4800;max_xmit_size=8192):\
+#UNICAST(timeout=300,600,1200,2400):\
+#pbcast.STABLE(desired_avg_gossip=20000):\
+#FRAG(frag_size=8096;down_thread=false;up_thread=false):\
+#pbcast.GMS(join_timeout=5000;join_retry_timeout=2000;shun=false;print_local_addr=true)
+#cache.cluster.multicast.ip=231.12.21.132

Added: branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/framework/ajax/xmlfilter/output.properties
===================================================================
--- branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/framework/ajax/xmlfilter/output.properties	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/framework/ajax/xmlfilter/output.properties	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,4 @@
+method = xml
+omit-xml-declaration = no
+doctype-public = -//W3C//DTD XHTML 1.0 Transitional//EN
+doctype-system = http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/framework/ajax/xmlfilter/tidy/tidy.properties
===================================================================
--- branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/framework/ajax/xmlfilter/tidy/tidy.properties	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/framework/ajax/xmlfilter/tidy/tidy.properties	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,55 @@
+add-xml-decl=false
+doctype=ignore
+#add-xml-space=
+#alt-text=
+#assume-xml-procins=
+break-before-br=false
+#char-encoding=1
+#clean=
+#drop-empty-paras=
+#drop-font-tags=
+#enclose-block-text=
+#enclose-text=
+#error-file=
+#fix-bad-comments=
+#hide-endtags=
+indent-attributes=false
+#indent-spaces=2
+#indent=
+#input-xml=
+#keep-time=
+#literal-attributes=
+#logical-emphasis=
+#markup=
+#new-blocklevel-tags=
+#new-empty-tags=
+#new-inline-tags=
+#new-pre-tags=
+numeric-entities=true
+#output-xhtml=true
+#output-xml=true
+quiet=true
+#quote-ampersand=true
+#quote-marks=
+#quote-nbsp=
+#raw=
+show-warnings=true
+#slide-style=
+#split=
+#tab-size=4
+tidy-mark=false
+uppercase-attributes=false
+uppercase-tags=false
+#word-2000=
+#wrap-asp=
+#wrap-jste=
+#wrap-php=
+#wrap-script-literals=false
+#wrap-sections=
+wrap=0
+#write-back=
+join-classes=true
+join-styles=true
+#literal-attributes=true
+smart-indent=false
+trim-empty-elements=false
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/framework/util/command/command.js
===================================================================
--- branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/framework/util/command/command.js	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/framework/util/command/command.js	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,196 @@
+/**
+
+*  Client-side implementation of command script for commadd links, buttons etc.
+
+*  
+
+*/
+
+A4J_Command = Class.create();
+
+A4J_Command.prototype = {
+
+	/**
+
+	* Object is usually created on click event.
+
+	*/
+
+	initialize: function(e, params, target) {
+
+		this.form = Event.findElement(e, 'form');
+
+		this.target = target;
+
+		this.objectsCreated = new Array();
+
+		this.oldValuesOfExistingInputs = {};
+
+		
+
+		this.appendParameters(params);
+
+		
+
+		this.processClick();
+
+		
+
+		this.cleanUp();
+
+		
+
+	},
+
+	/**
+
+	* store form;'s target
+
+	* append temporary parameter nodes
+
+	* submit form
+
+	*/
+
+	processClick: function() {
+
+		var form = this.form;
+
+		var targ = form.target;
+
+		
+
+		$A(this.objectsCreated).each(
+
+			function(node) {
+
+				form.appendChild(node);
+
+			}
+
+		);
+
+		
+
+		if (this.target){
+
+			form.target = this.target;
+
+		}
+
+		
+
+		form.submit();
+
+		
+
+		form.target = targ;
+
+		
+
+	},
+
+	/**
+
+	iterate over set of parameters, setting values of hidden inputs
+
+	*/
+
+	appendParameters: function(params) {
+
+		var dis = this;
+
+		$H(params).each(
+
+			function(parameter) {
+
+				dis.createOrInitHiddenInput(parameter.key, parameter.value);
+
+			}
+
+		);
+
+	},
+
+	/**
+
+	*	remove created hidden inputs, and restore values of previously existed
+
+	*/
+
+	cleanUp: function(){
+
+		var form = this.form;
+
+		
+
+		$H(this.oldValuesOfExistingInputs).each(
+
+			function(input){
+
+				($(input.key) || form[input.key]).value = input.value;
+
+			}
+
+		
+
+		);
+
+		
+
+		$A(this.objectsCreated).each(
+
+			function(node) {
+
+				form.removeChild(node);
+
+			}
+
+		);
+
+		
+
+		delete (this.objectsCreated);
+
+		
+
+	},
+
+		
+
+	/**
+
+	*  init hidden inputs with parameter values, creating inputs if necessary
+
+	*/
+
+	createOrInitHiddenInput : function(name, value) {
+
+		var hiddenObj = $(name) || this.form[name];
+
+		
+
+		if (!hiddenObj) {
+
+			hiddenObj = document.createElement('input');
+
+			hiddenObj.setAttribute('type', 'hidden');
+
+			hiddenObj.setAttribute('name', name);
+
+			hiddenObj.setAttribute('id', name);
+
+			this.objectsCreated.push(hiddenObj);
+
+		} else {
+
+			this.oldValuesOfExistingInputs[name] = hiddenObj.value;
+
+		}
+
+		hiddenObj.value = value;
+
+	}
+
+};
+

Added: branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/framework/util/message/messages.properties
===================================================================
--- branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/framework/util/message/messages.properties	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/framework/util/message/messages.properties	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,252 @@
+BUNDLE_MAP_NO_PUT_VALUE=Bundle map not allow to put values
+BUNDLE_MAP_NO_REMOVE_VALUE=Bundle map not allow to remove values
+NO_CONVERTER_REGISTERED=No Converter registered with UpdateActionListener and no appropriate standard converter found. Needed to convert String to {0}
+FOR_TARGETS_NO_AJAX_CONTAINER=Target pointed Attribute 'for' of AjaxStatus component with id {0} not is AjaxContainer
+VAR_MUST_BE_LITERAL=Attribute 'var' for ajax support component {0} must be literal
+NAME_MUST_BE_LITERAL=Attribute 'name' for view scope bean must be literal
+EVENT_MUST_BE_LITERAL=Attribute 'event' for ajax support component {0} must be literal
+CREATE_JAVASCRIPT_EVENT=Create JavaScript event string for component {0}
+CALLED_SET_PARENT=Called setParent for AjaxSupport component with parent \: {0}
+DETECT_NEW_COMPONENT=Detect newly created component
+SET_VALUE_BINDING_FOR_EVENT=Set ValueBinding for {0} event property
+COULD_NOT_LOAD_RESOURCE_BUNDLE=Could not load ResourceBundle "{0}"
+FACES_CONTEXT_NOT_CREATED=Faces context not created then occurs exception
+FACES_CONTEXT_HAS_NOT_EXTERNAL=Faces context not have external then occurs exception
+FACES_CONTEXT_HAS_NOT_RESPONSE=Faces context not have http response object then occurs exception
+CREATE_ALTERNATE_HANDLER=Create new instance of alternate handler class {0}
+ALTERNATE_HANDLER_CONSTRUCTOR_WARNING=Alternate view handler not use parent in constructor!
+VIEW_HANDLER_INSTANTIATION_ERROR=Error instantiation parent Faces ViewHandler
+ERROR_ON_PAGE=Error on page {0}
+LIFECYCLE_ERROR=Error on JSF lifecycle in view {0} in {1} lyfecycle method
+LIFECYCLE_ERROR_AT_PHASE=Error on JSF lifecycle in view {0} in {1} lyfecycle method,\n at phase {2}
+COMPONENT_TREE_NOT_CREATED=Component tree not created
+SET_AJAX_LISTENER=Set AjaxListener to {0}
+ADD_AJAX_AREA=Append single ID of area to render\: {0}
+ADD_AJAX_AREAS=Append collection of ID's to render as AjaxAreas 
+SET_AJAX_REQUEST=Set request as ajax powered to {0}
+SUBMITTED_AJAX_REQUEST=Submitted AJAX request - Queue Event to AjaxListeners
+SEND_EVENT_TO_AJAX_LISTENER=Send Event to AjaxListeners from AjaxContainer with Id {0}
+RENDER_AJAX_REQUEST=Render ajax request by container with Id {0}
+RENDERING_AJAX_REGION_ERROR=Error rendering Ajax Region with id {0}
+RESTORE_AJAX_COMPONENT_STATE=Restore State of UIAjaxComponent with Id {0}
+SAVE_AJAX_COMPONENT_STATE=Save State of UIAjaxComponent with Id {0}
+CREATE_AJAX_AREAS_SET_TO_RENDER=Create new set of Ajax Areas to render
+ARGUMENT_IS_NOT_AJAX_REGION_ERROR=Argument for append AJAX region not instance of AjaxContainer , region is {0}
+NULL_EVENT_SUBMITTED_ERROR=New event submitted to ViewRoot events queue is null
+CONTENT_TYPE_ENCODING=Incoming request has Content-Type header with character encoding {0}
+CONTENT_TYPE_NO_ENCODING=Incoming request has Content-Type header without character encoding: {0}
+FILTER_START_INFO=Filter start request processing at {0}  for uri\: {1}
+FILTER_XML_OUTPUT=Filter request output to XML
+FILTER_NO_XML_CHAIN=Filter perform not-xml parsing chain
+FILTER_NO_XML_CHAIN_2=Not is faces request, Filter perform not-xml parsing chain
+FILTER_STOP_INFO=Finished request processing total time {0}ms for uri: {1}
+PARSER_NOT_INSTANTIATED_ERROR=Parser for content type {0} not instantiated !
+PARSING_TIME_INFO=Parsing html total time {0}ms
+JTIDY_PARSING_ERROR=Error on parsing response by Jtidy 
+COMPONENT_NOT_FOUND=AjaxUpdate component not found for id: {0}
+EVENT_IS_READ_ONLY=Event string is read-only
+FLUSH_BUFFERED_STREAM_ERROR=Error on flush buffered stream in response wrapper
+UNSUPPORTED_ENCODING_WARNING=Unsupported encoding for convert writer content to bytes
+UNSUPPORTED_ENCODING_WARNING_2=Unsupported encoding for convert bytes content to string
+NO_WRITER_CALLED_INFO=Filtered resource did not call getWriter() or getOutputStream().
+PARSE_XML_DOCUMENT_INFO=XML document to parse in filter, return as stream \: 
+NO_WRITER_POSSIBLE_ERROR=Servlet response already use stream, Writer not possible
+CREATE_WRITER_INFO=Create StringWriter for buffer servlet output
+NO_STREAM_POSSIBLE_ERROR=Servlet response already use Writer, OutputStream not possible
+CREATE_STREAM_INFO=Create ByteArrayServletOutputStream for buffer servlet output
+OPEN_CLOSE_TAGS_DO_NOT_MATCH_ERROR=Open-close tags don't match in JSSerialisation
+VARIABLE_SUBSTITUTION_WARNING=Could not perform variable substitution.
+START_DOCUMENT_SAX_EXCEPTION=StartDocument SAX exception: {0}
+COMMENT_SAX_EXCEPTION=Comment SAX exception: {0}
+END_ELEMENT_SAX_EXCEPTION=Sax exceptions in endElement: {0}
+END_DOCUMENT_SAX_EXCEPTION=Sax exceptions in endDocument: {0}
+START_ELEMENT_SAX_EXCEPTION=Sax exceptions in startElement: {0}
+TEXT_SAX_EXCEPTION=Sax exceptions in writeText: {0}
+MESSAGE_PARSING_INFO=Message for HTML parsing : {0}
+CREATE_JTIDY_INFO=Parsers pool empty - create new JTidy parser
+READING_TIDY_PROPERTIES_ERROR=Error reading properties from tidy.properties
+ILLEGAL_METHOD_STATE=Illegal state for this method 
+WRAPPED_RULES_NULL_ERROR=Wrapped rules must not be null
+NO_NAME_ATTRIBUTE_ERROR=Tag {0} must have mantadory attribute "name"
+ENCODE_COMPILED_TEMPLATE_INFO=Encode compiled template "{0}" from breakpoint {1}
+ENCODING_TEMPLATE_TERMINATED_INFO=Encoding template "{0}" terminated by breakpoint\: {1}
+ENCODE_COMPILED_TEMPLATE_INFO2=Encode compiled template "{0}"
+CONVERTING_NON_VALUE_HOLDER_COMPONENT_ERROR=Attempt for get converted value for non ValueHolder component {0}
+COMPONENT_CLASS_ERROR=Component {0} not instance of {1}
+CONTEXT_NULL_ERROR=Context in renderer {0} method is null
+COMPONENT_NULL_ERROR=Component in renderer {0} method is null
+START_DECODING_COMPONENT_INFO=Start decoding of component {0} with class {1}
+START_ENCODING_COMPONENT_INFO=Start encoding of component {0} with class {1}
+CHILDREN_ENCODING_COMPONENT_INFO=Encoding children of component {0} with class {1}
+FINISH_ENCODING_COMPONENT_INFO=Finish encoding of component {0} with class {1}
+NAMESPACE_NOT_RECOGNIZED_ERROR=Template namespace element <{0}> not recognized
+RENDERER_METHOD_NOT_SET_ERROR=Renderer method not set in template
+METHOD_CALL_ERROR_1=Error call renderer utils method {0} for component {1}
+METHOD_CALL_ERROR_2=Error invoke renderer utils method {0} for component {1}, caused\: {2}
+METHOD_CALL_ERROR_3=Illegal Access Error call renderer utils method {0} for component {1}
+METHOD_CALL_ERROR_4=Illegal Access Error invoke renderer utils method {0} for component {1}, caused\: {2}
+METHOD_CALL_ERROR_5=Method {0} not found in renderer utils for component {1}
+METHOD_CALL_ERROR_6=Method {0} not found for RendererUtils
+METHOD_CALL_ERROR_1a=Error call renderer method {0} for component {1}
+METHOD_CALL_ERROR_2a=Error invoke renderer method {0} for component {1}, caused\: {2}
+METHOD_CALL_ERROR_3a=Illegal Access Error call renderer method {0} for component {1}
+METHOD_CALL_ERROR_4a=Illegal Access Error invoke renderer method {0} for component {1}, caused\: {2}
+METHOD_CALL_ERROR_5a=Method {0} not found in renderer for component {1}
+METHOD_CALL_ERROR_6a=Method {0} not found for Renderer
+PARSING_TEMPLATE_ERROR=Parsing Error when compile template from Reader at line\: {0} column\: {1} \: {2}
+TEMPLATE_IO_ERROR=I/O Error when compile template from Reader \: {0}
+PARSING_TEMPLATE_ERROR_2=SAX Error then compile template from Reader \: {0}
+START_COMPILE_TEMPLATE_INFO=Start compile template from {0}
+PARSING_TEMPLATE_ERROR_a=Parsing Error when compile template {0} at line\: {1} column\: {2} \: {3}
+TEMPLATE_IO_ERROR_a=I/O Error when compile template {0} \: {1}
+PARSING_TEMPLATE_ERROR_2a=SAX Error then compile template {0} \: {1}
+FINISH_COMPILE_TEMPLATE_INFO=Finish compilation template from {0}
+TEMPLATE_NOT_COMPILED_ERROR=XML template not compiled
+NO_CHILD_ALLOWED=Childs not allowed for Error element
+NO_FACET_NAME_ATTRIBUTE=Tag {0} must have not null facet name attribute( name,skin,property etc. attributes )
+BREAKPOINTS_UNSUPPORTED_ERROR=Breakpoints in rendering facet <u:insertFacet> unsupported, for facet {0}
+BREAKPOINT_NOT_REGISTERED_ERROR=Breakpoint ["{0}"] not registered in template
+CHILD_NOT_ALLOWED_ERROR=Element {0} not allowed as child for {1}
+INVOKE_RENDERER_METHOD_ERROR=Error invoke renderer method for value of template element {0}
+METHOD_CALL_ERROR_2b=Error invoke renderer utils method {0}, caused\: {1}
+METHOD_CALL_ERROR_4b=Illegal Access Error invoke renderer utils method {0}, caused\: {1}
+METHOD_CALL_ERROR_6b=Method {0} not found in object {1}
+STYLE_ATTRIBUTE_ERROR=Name for style attribute not set
+BREAKPOINTS_UNSUPPORTED_ERROR_2=Breakpoints in rendering children <u:insertChildren> unsupported
+BREAKPOINTS_UNSUPPORTED_ERROR_3=Breakpoints in rendering child <u:insertChild> unsupported
+REQUEST_CHAMELEON_RENDER_KIT_INFO=Request to get Chameleon renderKit with id: {0}
+GET_DEFAULT_RENDER_KIT_ERROR=Error for get default render kit 
+DEFAULT_RENDER_KIT_INFO=Default render kit id for chameleon will: {0}
+AJAX_RESPONSE_NOT_RENDERED_INFO=AJAX response not rendered - possible MyFaces <f:view tag behavior.
+ENTER_BEFORE_RENDER_VIEW_PHASE=PhaseListener enter Before RenderView Phase with ViewId {0} and RenderKitId {1}
+SET_RENDER_KIT_ID_INFO=PhaseListener Set new RenderKitId to {0}
+PROCESS_AJAX_EVENTS_INFO=Process AJAX events to calculate areas.
+DELEGATE_AJAX_PROCESSING_INFO=Delegate AJAX processing  to container.
+BREAKPOINTS_UNSUPPORTED_INSIDE_ATTRIBUTE_ERROR=Breakpoints inside attribute element not allowed, attribute name: {0} of component: {1}
+BUILD_ONCLICK_INFO=Build onclick string for component {0} as {1}
+UNNAMED_PARAMETER_ERROR=Unnamed parameter not allowed for AJAX components, parameter for {0}
+AJAX_STATUS_COMPONENT_NOT_FOWND_WARNING=AJAX Status component not found for AjaxComponent with id {0}
+COMPONENT_NULL_ERROR_2=Component argument is null
+CALCULATE_COMPONENT_ID_INFO=Calculate absolute ID for component {0} as {1}
+DETECTING_ENCODING_DISABLED_ERROR=Detecting request character encoding is disable.
+OBTAIN_RESPONSE_SET_HEADER_ERROR=Failed to obtain Response\#setHeader() method\: {0}
+INVOKE_AJAX_REGION_LISTENER=Invoke AjaxRegion Listener for component with Id\={0}
+APPENDING_AJAX_REGION_TO_NON_AJAX_CONTAINER_WARNING=Attempt to append AJAX regions to render in non-ajax container
+RENDER_CHILDREN_NON_AJAX_INFO=AjaxView RenderChildren() components for normal faces request
+RENDER_CHILDREN_AJAX_INFO=AjaxView RenderChildren() components for AJAX request 
+ENCODE_CHILD_AJAX_INFO=AjaxView encodeChild component for AJAX request with at path {0} ID {1}
+RENDER_AJAX_AREA_INFO=Render Ajax Area component with ID {0}
+DECODE_AJAX_REQUEST_STATUS_INFO=Decode ajax request status for {0}
+REQUEST_PARAMETERS_MAP=Request parameters map {0}
+SET_MYFACES_SEQUENCE_INFO=Set MyFaces sequence to {0}
+SKIP_ENCODING_HTML_INFO=Skip encoding HTML for Script Resource with key [{0}] due to AJAX request
+SKIP_ENCODE_BEGIN_HTML_INFO=Skip encodeBegin HTML for Script Resource with key [{0}] due to AJAX request
+SKIP_ENCODE_END_HTML_INFO=Skip encodeEnd HTML for Script Resource with key [{0}] due to AJAX request
+QUERY_STRING_BUILDING_ERROR=Error building query string for store data
+BUILD_RESOURCE_URI_INFO=Build URI for Resource with key [{0}] as \: {1}
+RESTORE_DATA_FROM_RESOURCE_URI_INFO=Restore data object for Resource with key [{0}] from uri string \: {1}
+DESERIALIZE_DATA_INPUT_ERROR=Input error for deserialize data 
+DATA_CLASS_NOT_FOUND_ERROR=Data class for restore not found
+METHOD_NOT_IMPLEMENTED=Method {0} not implemented
+ENCODE_HTML_INFO=Encode HTML for Resource with key [{0}]
+ENCODE_HTML_INFO_2=Encode HTML for Resource with key [{0}] and attributes\: {1}
+ENCODE_BEGIN_HTML_INFO=EncodeBegin HTML for Resource with key [{0}] and attributes: {1}
+ENCODE_END_HTML_INFO=EncodeEnd HTML for Resource with key [{0}]
+SEND_CONTENT_INFO=Send content data for Resource with key [{0}]
+NO_INPUT_STREAM_ERROR=Could not get Input stream for resource\: {0}
+SET_RESPONSE_HEADERS_INFO=Set response http headers for Resource with key [{0}]
+BUILD_RESOURCE_INFO=build new resource for path {0}
+NO_RESOURCE_REGISTERED_ERROR=Resource not registered\: {0}
+NO_RESOURCE_REGISTERED_ERROR_2=Not registered type of resource {0} allowed extentions is {1}
+NO_RESOURCE_EXISTS_ERROR=Resource not exist in classpath\: {0}
+INSTANTIATE_RESOURCE_ERROR=Error for instatiate resource from {0}
+INSTANTIATE_CLASS_ERROR=Instatiate class not InternetResource
+STATIC_RESOURCE_NOT_FOUND_ERROR=Static resource not found for path {0}
+PARSING_IF_MODIFIED_SINCE_WARNING=Error in parsing request If-Modified-Since header
+GET_CONTENT_FROM_CACHE_INFO=Get content from cache for resource {0}
+CONTENT_NOT_FOUND_ERROR=Content not found in cache for resource {0}
+SEND_RESOURCE_ERROR=Error on send resource 
+SEND_RESOURCE_ERROR_2=Error on send new resource for cache by {0}
+READING_PROPERTIES_ERROR=Error reading properties from {0}
+SEND_IMAGE_ERROR=Error send image from resource {0}
+SEND_IMAGE_ERROR_2=Error send image 
+SKIP_ENCODE_BEGIN_HTML_INFO_2=Skip begin encoding HTML for Resource with key [{0}] due to previsius rendering 
+MARK_AS_RENDERED_INFO=Mark in context Resource with key [{0}] as rendered 
+SKIP_ENCODE_END_HTML_INFO_2=Skip end encoding HTML for Resource with key [{0}] due to previsius rendering
+VARIABLE_SUBSTITUTION_ERROR=Could not perform variable substitution.
+SET_SKIN_FACTORY_INFO=Class name for SkinFactory set to {0} by META-INF/services
+CREATING_SKIN_FACTORY_ERROR=Unhandled exception then creating instance
+NULL_SKIN_NAME_ERROR=Name for current Skin calculated as null
+CREATE_SKIN_INFO=Create new Skin instance for name {0} 
+DEFAULT_PROPERTIES_NOT_FOUND_ERROR=Default properties for skin not found in {0}
+SKIN_PROPERTIES_IO_ERROR=Attempt to load Skin property file caused IOError
+SKIN_NOT_FOUND_ERROR=Skin with name {0} not found
+ACESSING_SKIN_PROPERTY_AS_ARRAY_ERROR=Attempt to access to skin property as array
+ACESSING_SKIN_PROPERTY_ERROR=Attempt to access to skin property not as string parameter
+SKIN_PROPERTIES_READ_ONLY_ERROR=Skin properties is read-only 
+NO_VALUE_HOLDER_ERROR=Component {0} is no ValueHolder, cannot set value.
+NO_EDITABLE_VALUE_HOLDER_ERROR=Component {0} is no EditableValueHolder
+INVALID_VALIDATION_EXPRESSION=Component {0} has invalid validation expression {1}
+NO_ACTION_SOURCE_ERROR=Component {0} is no ActionSource
+INVALID_ACTION_LISTENER=Component {0} has invalid actionListener value\: {1}
+INVALID_VALUE_CHANGE_LISTENER=Component {0} has invalid valueChangedListener expression {1}
+NO_VALUE_REFERENCE_ERROR=Component {0} attribute {1} must be a value reference, was {2}
+NO_BYTE_ARRAY_ERROR=Parameter supplied to Base64 decode is not a byte[]
+BUFFER_TYPE_ERROR=Wrong Destination Buffer type
+IMAGE_ERROR=Image must be 8-bit
+CANNOT_WRITE_RASTERS=Cannot write rasters
+NULL_OUTPUT_ERROR=output was not set
+IMAGE_NOT_BUFFERED_ERROR=RenderedImage is not a BufferedImage
+NOT_DATA_OUTPUT_ERROR=output is not a DataOutput
+NULL_COLOR_PARAMETER_ERROR=Parameter "color" for convert from HTML to java is null
+DECODE_COLOR_PARAMETER_ERROR=Parameter "color" for convert from HTML to java can not be decoded\: [{0}], reason\: {1}
+NULL_COLOR_PARAMETER_ERROR_2=Parameter "color" for convert from java.awt.Color to HTML is null
+DECODE_PARAMETER_ERROR=Parameter "{0}" for convert from HTML to java can not be decoded\: [{1}], reason\: {2}
+IMAGE_GENERATOR_CLASS_NOT_FOUND=The imageGenerator class cannot be found\: {0}
+CREATING_IMAGE_GENERATOR_ERROR=The ImageGenerator instance could not be created\: {0}
+INVALID_COMMENT_INDEX=Not a valid comment index\: {0}
+LOADING_IMAGE_ERROR=Error loading image
+NOT_INDEXED_IMAGE_ERROR=Image is not indexed!
+INVALID_RADIUS=Radius must be greater than 0.
+INVALID_ATTRIBUTE_VALUE=Value {0} of tag {1} attribute is incorrect.
+VALUE_BINDING_TYPE_ERROR=ValueBinding for UISelectMany must be of type List or Array
+NO_CONVERTER_FOUND_ERROR=No Converter for type {0} found
+GRABBER_ERROR=Grabber returned false\: {0}
+TOOMANY_COLORS_ERROR=Too many colors.
+GET_RESOURCE_AS_STREAM_ERROR=ServletContext not allow to getResourceAsStream for {0}
+PARSING_WEB_XML_IO_ERROR=Error parsing web.xml due to IOexception
+PARSING_WEB_XML_SAX_ERROR=Error parsing web.xml due to SAX exception  
+NULL_FILTER_NAME_WARNING=Filter name for definition is null 
+FILTER_NOT_FOUND_ERROR=Filter definition not found for name {0}
+FILTER_NOT_CONFIGURED_ERROR=Filter for name {0} not configured in web.xml
+NO_PREFIX_OR_SUFFIX_IN_FILTER_MAPPING_ERROR=Filter mapping for chameleon filter {0} do not contain wilcard prefix or suffix
+CONFIG_INITIALIZATION_ERROR={0} during config initialization for field {1} with value [{2}]: {3}
+FIELD_READING_ERROR={0} when reading field {1}
+CONFIG_INITIALIZATION_ERROR_2={0} during config initialization for field {1}
+DOM_METHOD_NOT_SUPPORTED=DOM method not supported
+METHOD_NOT_SUPPORTED=Method {0} not supported
+NAMED_ITEM_NOT_FOUND_ERROR=Named item {0} not found
+AJAX_SUPPORT_REQUEST_PARAMETER_INFO=Have request parameter for AjaxSupport component {0}
+COMMAND_LINK_SUBMIT_INFO=CommandLink component {0} submit request
+COMMAND_LINK_NOT_IN_FORM_WARNING=CommandLink {0} not enclosed in form
+MUST_BE_EXPRESSION_ERROR=Must be expression to modifyable property
+NOT_PARENT_AJAX_CONTAINER_ERROR=Parent is not of type AjaxContainer, type is\: {0}
+NOT_PARENT_AJAX_COMPONENT_ERROR=Parent component {0} for a ajaxListener is not source of AjaxEvent's
+MUST_BE_LITERAL_ERROR=Must be literal
+FACET_TAG_MANY_CHILDREN_ERROR=Facet Tag can only have one child UIComponent
+NO_UI_COMPONENT_TAG_ANCESTOR_ERROR={0} has no UIComponentTag ancestor
+NO_VALUE_REFERENCE_ERROR_2=property attribute is no valid value reference\: {0}
+NULL_TYPE_ATTRIBUTE_ERROR=type attribute not set
+INSTANTIATE_LISTENER_ERROR=Listener class {0} for Component {1} is not instantiable
+NOT_AJAX_CONTAINER_ERROR=Component {0} is no AjaxContainer
+INVALID_EXPRESSION=Invalid expression {0}
+NOT_INSTANCE_OF_ERROR={0} is not instance of {1} 
+UNSUPPORTED_ENCODING_ERROR=Unsupported encoding\: {0}
+UNSUPPORTED_INPUT_SOURCE_ERROR=Unsupported type of input source\: {0}
+STRING_CONVERSION_ERROR=String to UTF-8 conversion failed\: {0}
+UTF_CONVERSION_ERROR=UTF-8 to string conversion failed\: {0}
+READ_ONLY_NODE_ERROR=Node is read only
+AJAX_VIEW_EXPIRED=View state could't be restored - reload page ?
+SKIN_CYCLIC_REFERENCE=Cyclic reference in Skin configuration for property \: {0}
+SKIN_ILLEGAL_REFERENCE=Reference for property "{0}" not present in Skin configuration
+NULL_ATTRIBUTE_ERROR="Requied attribute {0} for component {1} is null
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/org/w3c/tidy/TidyMessages.properties
===================================================================
--- branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/org/w3c/tidy/TidyMessages.properties	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/org/w3c/tidy/TidyMessages.properties	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,114 @@
+anchor_not_unique={0} Anchor "{1}" already defined
+apos_undefined=Named Entity &apos; only defined in XML/XHTML
+attr_value_not_lcase={0} attribute value "{1}" for "{2}" must be lower case for XHTML
+# to be translated
+backslash_in_uri={0} URI reference contains backslash. Typo?
+bad_argument=Warning - missing or malformed argument "{1}" for option "{0}"
+bad_attribute_value={0} attribute "{1}" has invalid value "{2}"
+bad_cdata_content='<' + '/' + letter not allowed here
+bad_comment_chars=expecting -- or >
+bad_tree=Panic - tree has lost its integrity
+bad_xml_comment=XML comments can't contain --
+badaccess_frames=Pages designed using frames presents problems for\u000apeople who are either blind or using a browser that\u000adoesn't support frames. A frames-based page should always\u000ainclude an alternative layout inside a NOFRAMES element.
+badaccess_missing_image_alt=The alt attribute should be used to give a short description\u000aof an image; longer descriptions should be given with the\u000alongdesc attribute which takes a URL linked to the description.\u000aThese measures are needed for people using non-graphical browsers.
+badaccess_missing_image_map=Use client-side image maps in preference to server-side image\u000amaps as the latter are inaccessible to people using non-\u000agraphical browsers. In addition, client-side maps are easier\u000ato set up and provide immediate feedback to users.
+badaccess_missing_link_alt=For hypertext links defined using a client-side image map, you\u000aneed to use the alt attribute to provide a textual description\u000aof the link for people using non-graphical browsers.
+badaccess_missing_summary=The table summary attribute should be used to describe\u000athe table structure. It is very helpful for people using\u000anon-visual browsers. The scope and headers attributes for\u000atable cells are useful for specifying which headers apply\u000ato each table cell, enabling non-visual browsers to provide\u000aa meaningful context for each cell.
+badaccess_summary=For further advice on how to make your pages accessible\u000asee "{0}". You may also want to try\u000a"http://www.cast.org/bobby/" which is a free Web-based\u000aservice for checking URLs for accessibility.
+badchars_summary=Characters codes for the Microsoft Windows fonts in the range\u000a128 - 159 may not be recognized on other platforms. You are\u000ainstead recommended to use named entities, e.g. &trade; rather\u000athan Windows character code 153 (0x2122 in Unicode). Note that\u000aas of February 1998 few browsers support the new entities."
+badform_summary=You may need to move one or both of the <form> and </form>\u000atags. HTML elements should be properly nested and form elements\u000aare no exception. For instance you should not place the <form>\u000ain one table cell and the </form> in another. If the <form> is\u000aplaced before a table, the </form> cannot be placed inside the\u000atable! Note that one form can't be nested inside another!
+badlayout_using_body=You are recommended to use CSS to specify page and link colors
+badlayout_using_font=You are recommended to use CSS to specify the font and\u000aproperties such as its size and color. This will reduce\u000athe size of HTML files and make them easier to maintain\u000acompared with using <FONT> elements.
+badlayout_using_layer=The Cascading Style Sheets (CSS) Positioning mechanism\u000ais recommended in preference to the proprietary <LAYER>\u000aelement due to limited vendor support for LAYER.
+badlayout_using_nobr=You are recommended to use CSS to control line wrapping.\u000aUse "white-space: nowrap" to inhibit wrapping in place\u000aof inserting <NOBR>...</NOBR> into the markup.
+badlayout_using_spacer=You are recommended to use CSS for controlling white\u000aspace (e.g. for indentation, margins and line spacing).\u000aThe proprietary <SPACER> element has limited vendor support.
+cant_be_nested={0} can''t be nested
+coerce_to_endtag=<{0}> is probably intended as </{0}>
+content_after_body=content occurs after end of body
+discarding_unexpected=discarding unexpected {0}
+doctype_after_tags=<!DOCTYPE> isn't allowed after elements
+doctype_given={0}: Doctype given is "{1}"
+dtype_not_upper_case=SYSTEM, PUBLIC, W3C, DTD, EN must be upper case
+duplicate_frameset=repeated FRAMESET element
+element_not_empty={0} element not empty or not closed
+emacs_format={0}:{1,number}:{2,number}:
+encoding_mismatch=specified input encoding ({0}) does not match actual input encoding ({1})
+entity_in_id=no entities allowed in id attribute, discarding "&"
+error=Error: 
+escaped_illegal_uri={0} escaping malformed URI reference
+expected_equalsign={0} unexpected '=', expected attribute name
+fixed_backslash={0} converting backslash in URI to slash
+forced_end_anchor=Warning: <a> is probably intended as </a>
+general_info=To learn more about JTidy see http://jtidy.sourceforge.net\u000aPlease report bugs at http://sourceforge.net/tracker/?group_id=13153&atid=113153\u000aHTML & CSS specifications are available from http://www.w3.org/\u000aLobby your company to join W3C, see http://www.w3.org/Consortium
+hello_message=Tidy (vers {0, date}) Parsing "{1}"
+help_text={0} [option...] [file...]\u000aUtility to clean up and pretty print HTML/XHTML/XML\u000asee http://www.w3.org/People/Raggett/tidy/\u000a\u000aOptions for JTidy released on {1, date}\u000aProcessing directives\u000a---------------------\u000a  -indent  or -i    to indent element content\u000a  -omit    or -o    to omit optional end tags\u000a  -wrap <column>    to wrap text at the specified <column> (default is 68)\u000a  -upper   or -u    to force tags to upper case (default is lower case)\u000a  -clean   or -c    to replace FONT, NOBR and CENTER tags by CSS\u000a  -bare    or -b    to strip out smart quotes and em dashes, etc.\u000a  -numeric or -n    to output numeric rather than named entities\u000a  -errors  or -e    to only show errors\u000a  -quiet   or -q    to suppress nonessential output\u000a  -xml              to specify the input is well formed XML\u000a  -asxml            to convert HTML to well formed XHTML\u000a  -asxhtml          to convert HTML to!
  well formed XHTML\u000a  -ashtml           to force XHTML to well formed HTML\u000a  -slides           to burst into slides on H2 elements\u000a\u000aCharacter encodings\u000a-------------------\u000a  -raw              to output values above 127 without conversion to entities\u000a  -ascii            to use US-ASCII for output, ISO-8859-1 for input\u000a  -latin1           to use ISO-8859-1 for both input and output\u000a  -iso2022          to use ISO-2022 for both input and output\u000a  -utf8             to use UTF-8 for both input and output\u000a  -mac              to use MacRoman for input, US-ASCII for output\u000a  -utf16le          to use UTF-16LE for both input and output\u000a  -utf16be          to use UTF-16BE for both input and output\u000a  -utf16            to use UTF-16 for both input and output\u000a  -win1252          to use Windows-1252 for input, US-ASCII for output\u000a  -big5             to use Big5 for both input and output\u000a  -shiftjis         !
 to use Shift_JIS for both input and output\u000a  -language <lang>  to
 set the two-letter language code <lang> (for future use)\u000a\u000aFile manipulation\u000a-----------------\u000a  -config <file>    to set configuration options from the specified <file>\u000a  -f      <file>    to write errors to the specified <file>\u000a  -modify or -m     to modify the original input files\u000a\u000aMiscellaneous\u000a-------------\u000a  -version  or -v   to show the version of Tidy\u000a  -help, -h or -?   to list the command line options\u000a  -help-config      to list all configuration options\u000a  -show-config      to list the current configuration settings\u000a\u000aYou can also use --blah for any configuration option blah\u000a\u000aInput/Output default to stdin/stdout respectively\u000aSingle letter options apart from -f may be combined\u000aas in:  tidy -f errs.txt -imu foo.html\u000aFor further info on HTML see http://www.w3.org/MarkUp
+id_name_mismatch={0} id and name attribute value mismatch
+illegal_char=Warning: replacing illegal character code {0,number}
+illegal_nesting={0} shouldn''t be nested
+illegal_uri_reference={0} improperly escaped URI reference
+inconsistent_namespace=html namespace doesn't match content
+inconsistent_version=html doctype doesn't match content
+inserting_tag=inserting implicit <{0}>
+invalid_char={0,choice,0#replacing|1#discarding} invalid character code {1}
+invalid_ncr={0,choice,0#replacing|1#discarding} invalid numeric character reference {1}
+invalid_sgml_chars_summary=Character codes 128 to 159 (U+0080 to U+009F) are not allowed in HTML;\u000aeven if they were, they would likely be unprintable control characters.\u000aTidy assumed you wanted to refer to a character with the same byte value in the \u000a{0,choice,0#specified|1#Windows-1252|2#MacRoman} encoding and replaced that reference with the Unicode equivalent.
+invalid_utf16={0,choice,0#replacing|1#discarding} invalid UTF-16 surrogate pair (char. code {1})
+invalid_utf16_summary=Character codes for UTF-16 must be in the range: U+0000 to U+10FFFF.\u000aThe definition of UTF-16 in Annex C of ISO/IEC 10646-1:2000 does not allow the\u000amapping of unpaired surrogates. For more information please refer to\u000ahttp://www.unicode.org/unicode and http://www.cl.cam.ac.uk/~mgk25/unicode.html
+invalid_utf8={0,choice,0#replacing|1#discarding} invalid UTF-8 bytes (char. code {1})
+invalid_utf8_summary=Character codes for UTF-8 must be in the range: U+0000 to U+10FFFF.\u000aThe definition of UTF-8 in Annex D of ISO/IEC 10646-1:2000 also\u000aallows for the use of five- and six-byte sequences to encode\u000acharacters that are outside the range of the Unicode character set;\u000athose five- and six-byte sequences are illegal for the use of\u000aUTF-8 as a transformation of Unicode characters. ISO/IEC 10646\u000adoes not allow mapping of unpaired surrogates, nor U+FFFE and U+FFFF\u000a(but it does allow other noncharacters). For more information please refer to\u000ahttp://www.unicode.org/unicode and http://www.cl.cam.ac.uk/~mgk25/unicode.html
+invaliduri_summary=URIs must be properly escaped, they must not contain unescaped\u000acharacters below U+0021 including the space character and not\u000aabove U+007E. Tidy escapes the URI for you as recommended by\u000aHTML 4.01 section B.2.1 and XML 1.0 section 4.2.2. Some user agents\u000ause another algorithm to escape such URIs and some server-sided\u000ascripts depend on that. If you want to depend on that, you must\u000aescape the URI by your own. For more information please refer to\u000ahttp://www.w3.org/International/O-URL-and-ident.html
+joining_attribute={0} joining values of repeated attribute "{1}"
+line_column=line {0,number} column {1,number} - 
+malformed_comment=adjacent hyphens within comment
+malformed_doctype=expected "html PUBLIC" or "html SYSTEM"
+missing_attr_value={0} attribute "{1}" lacks value
+missing_attribute={0} lacks "{1}" attribute
+missing_body=Can't create slides - document is missing a body element.
+missing_doctype=missing <!DOCTYPE> declaration
+missing_endtag_before=missing </{0}> before {1}
+missing_endtag_for=missing </{0}>
+missing_imagemap={0} should use client-side image map
+missing_quotemark={0} attribute with missing trailing quote mark
+missing_semicolon=Warning: entity "{0}" doesn''t end in '';''
+missing_semicolon_ncr=numeric character reference "{0}" doesn't end in ";"
+missing_starttag=missing <{0}>
+missing_title_element=inserting missing 'title' element
+needs_author_intervention=This document has errors that must be fixed before\u000ausing HTML Tidy to generate a tidied up version.
+nested_emphasis=nested emphasis {0}
+nested_quotation=nested q elements, possible typo
+newline_in_uri={0} discarding newline in URI reference
+no_warnings=no warnings or errors were found
+noframes_content={0} not inside ''noframes'' element
+non_matching_endtag=replacing unexpected {0} by </{1}>
+num_warnings={0,choice,0#no warnings|1#1 warning|1<{0,number,integer} warnings}, {1,choice,0#no errors|1#1 error|2#{1,number,integer} errors} were found!
+obsolete_element=replacing obsolete element {0} by {1}
+proprietary_attr_value={0} proprietary attribute value "{1}"
+proprietary_attribute={0} proprietary attribute "{1}"
+proprietary_element={0} is not approved by W3C
+repeated_attribute={0} dropping value "{1}" for repeated attribute "{2}"
+replacing_element=replacing element {0} by {1}
+report_version={0}: Document content looks like {1}
+slides_found={0,number} Slides found
+suspected_missing_quote=missing quotemark for attribute value
+tag_not_allowed_in={0} isn''t allowed in <{1}> elements
+too_many_elements=too many {0} elements
+too_many_elements_in=too many {0} elements in <{1}>
+trim_empty_element=trimming empty {0}
+unescaped_ampersand=Warning: unescaped & which should be written as &amp;
+unescaped_element=unescaped {0} in pre content
+unexpected_end_of_file=end of file while parsing attributes {0}
+unexpected_endtag=unexpected </{0}>
+unexpected_endtag_in=unexpected </{0}> in <{1}>
+unexpected_gt={0} missing ''>'' for end of tag
+unexpected_quotemark={0} unexpected or duplicate quote mark
+unknown_attribute=unknown attribute "{0}"
+unknown_element={0} is not recognized!
+unknown_entity=Warning: unescaped & or unknown entity "{0}"
+unknown_file={0}: can''t open file "{1}"
+unknown_option=Warning - unknown option: {0}
+unrecognized_option=unrecognized option -{0} use -help to list options
+using_br_inplace_of=using <br> in place of {0}
+vendor_specific_chars_summary=It is unlikely that vendor-specific, system-dependent encodings\u000awork widely enough on the World Wide Web; you should avoid using the \u000a{0,choice,0#specified|1#Windows-1252|2#MacRoman} character encoding, instead you are recommended to\u000ause named entities, e.g. &trade;.
+warning=Warning: 
+xml_attribute_value={0} has XML attribute "{1}"
+xml_id_sintax=ID "{0}" uses XML ID syntax

Added: branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/org/w3c/tidy/TidyMessages_de.properties
===================================================================
--- branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/org/w3c/tidy/TidyMessages_de.properties	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/org/w3c/tidy/TidyMessages_de.properties	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,113 @@
+anchor_not_unique=
+apos_undefined=
+attr_value_not_lcase=
+backslash_in_uri=
+bad_argument=Warnung: Fehlendes oder missgebildetes Argument "{1}" f\u00fcr Option "{0}"
+bad_attribute_value={0} Attribut "{1}" unbekannter Attribut-Wert "{2}"
+bad_cdata_content='<' + '/' + Buchstabe ist hier nicht erlaubt
+bad_comment_chars=erwarte -- oder >
+bad_tree=Interner Fehler: der Parse-Baum hat seine Integrit\u00e4t verloren.
+bad_xml_comment=XML-Kommentare d\u00fcrfen kein -- enthalten
+badaccess_frames=Seiten, welche Frames nutzen, sind problematisch f\u00fcr Leute,\u000adie entweder blind sind oder einen Browser nutzen, der keine\u000aFrames unterst\u00fctzt. Eine Frames-basierte Seite sollte immer\u000aauch ein alternatives Layout innerhalb eines NOFRAMES-Elementes\u000aenthalten.
+badaccess_missing_image_alt=Das alt-Attribut sollte verwendet werden, um ein kurze Beschreibung\u000aeines Bildes zu geben; l\u00e4ngere Beschreibungen sollten mit dem\u000alongdesc-Attribut angegeben werden, welches eine URL mit der\u000aBeschreibung annimmt. Diese Ma\u00dfnahmen sind notwendig f\u00fcr Leute\u000amit nicht-grafischen Browsern.
+badaccess_missing_image_map=Benutzen Sie client-seitige Image-Maps (usemap) anstatt serverseitigen\u000aImage-Maps (ismap), weil letztere unbenutzbar sind f\u00fcr Leute
+badaccess_missing_link_alt=F\u00fcr Hypertext-Links, welche durch eine clientseitige Image-Map\u000adefiniert sind, sollten Sie das alt-Attribut nutzen, um eine\u000atextuelle Beschreibung f\u00fcr Leute zu geben, die nichtgrafische\u000aBrowser nutzen.
+badaccess_missing_summary=Das summary-Attribut von <table> sollte benutzt werden, um die\u000aTabellenstruktur zu beschreiben. Das ist sehr hilfreich f\u00fcr\u000aLeute mit nicht-visuellen Browsern. Die scope- und\u000aheader-Attribute f\u00fcr Tabellenzellen sind n\u00fctzlich, um anzugeben,\u000awelche header f\u00fcr jede Tabellenzelle gelten, wodurch nicht-\u000avisuelle Browser bef\u00e4higt werden, sinnvollen Kontext f\u00fcr jede\u000aZelle zur Verf\u00fcgung zu stellen.
+badaccess_summary=F\u00fcr weitere Ratschl\u00e4ge, wie Sie Ihre Seite zug\u00e4nglich machen\u000ak\u00f6nnen, siehe "{0}". Vielleicht wollen\u000aSie sich auch die (englische) Seite "http://www.cast.org/bobby/"\u000aansehen, welche einen kostenlosen, web-basierten Dienst zur\u000a\u00dcberpr\u00fcfung von URLs auf Zug\u00e4nglichkeit enth\u00e4lt.
+badchars_summary=Zeichen-Codes f\u00fcr die Microsoft-Windows-Schriftarten im Bereich\u000a128 - 159 werden auf anderen Plattformen nicht unbedingt erkannt.\u000aEs wird empfohlen, statt dessen die benannten Entit\u00e4ten zu benutzen,\u000az.B. &trade; anstatt dem Windows-Zeichen-Code 153 (0x2122 in Unicode).
+badform_summary=Sie sollten eines oder beide <form>- bzw. </form>-Tags verschieben.\u000aHTML-Elemente sollten sauber verschachtelt sein, und <form>-Elemente\u000asind da keine Ausnahme. Zum Beispiel sollte nicht das <form>-Element\u000avor der Tabelle und das </form>-Element in der Tabelle plaziert sein.\u000aAuch kann nicht ein <form> in einem anderem verschachtelt sein.
+badlayout_using_body=Es wird empfohlen, CSS zu benutzen, um Seiten- und\u000aLink-Farben einzustellen.
+badlayout_using_font=Benutzen Sie CSS, um die Schriftart und Eigenschaften\u000awie Gr\u00f6\u00dfe und Farbe einzustellen. Das wird die Gr\u00f6\u00dfe der\u000aHTML-Dateien reduzieren und sie leichter wartbar machen\u000aim Vergleich mit <FONT>-Elementen.
+badlayout_using_layer=Es wird empfohlen, den CSS-Positionierungs-Mechanismus\u000aanstelle des propriet\u00e4ren <LAYER>-Elementes zu verwenden,\u000ada letzteres nicht standardisiert ist und deswegen nur\u000abegrenzt von den Browserherstellern unterst\u00fctzt wird.
+badlayout_using_nobr=Benutzen Sie CSS, um die Zeilenumbr\u00fcche zu kontrollieren.\u000aBenutzen Sie "white-space: nowrap", um Umbr\u00fcche zu\u000averhindern, anstatt <NOBR>...</NOBR> in das Dokument\u000aeinzuf\u00fcgen
+badlayout_using_spacer=Benutzen Sie CSS um Leerr\u00e4ume zu kontrollieren,\u000a(z.B. f\u00fcr Einr\u00fcckungen, R\u00e4nder und Zeilenabst\u00e4nde).\u000aDas propriet\u00e4re <SPACER>-Element hat nur begrenzten\u000aHersteller-Unterst\u00fctzung.
+cant_be_nested={0} kann nicht verschachtelt werden
+coerce_to_endtag=<{0}> ist wahrscheinlich als </{0}> gemeint
+content_after_body=Inhalt erscheint nach dem Ende von <body>.
+discarding_unexpected=entsorge unerwartetes {0}
+doctype_after_tags=<!DOCTYPE> darf nur am Anfang des Dokumentes stehen, nicht nach Elementen
+doctype_given=
+dtype_not_upper_case=SYSTEM, PUBLIC, W3C, DTD, EN m\u00fcssen komplett in Gro\u00dfbuchstaben geschrieben werden.
+duplicate_frameset=wiederholtes <frameset>-Element
+element_not_empty=
+emacs_format={0}:{1,number}:{2,number}:
+encoding_mismatch=
+entity_in_id=
+error=Fehler:
+escaped_illegal_uri=
+expected_equalsign=
+fixed_backslash=
+forced_end_anchor=Warnung: <a> ist wahrscheinlich gemeint als </a>
+general_info=Um mehr \u00fcber Tidy zu erfahren, sehen\u000aSie sich die Seite http://www.w3.org/People/Raggett/tidy/\u000aan. JTidy gibt es hier: http://jtidy.sourceforge.net\u000a\u00dcberzeugen Sie Ihr Unternehmen davon, dem W3C beizutreten,\u000asiehe http://www.w3.org/Consortium\u000aHTML- und CSS-Spezifikationen sind verf\u00fcgbar bei http://www.w3.org.
+hello_message=Tidy (Version {0, date}) parst "{1}"
+help_text=  {0}: datei1 datei2 ...\u000a Werkzeug, um HTML-Dateien zu s\u00e4ubern und auszudrucken.\u000a Siehe http://www.w3.org/People/Raggett/tidy/\u000a \u000a Optionen f\u00fcr tidy (Version {1}):\u000a \u000a Verarbeitungs-Anweisungen\u000a -------------------------\u000a   -i | -indent      Element-Inhalt einr\u00fccken\u000a   -o | -omit        optionale Ende-Tags weglassen\u000a        -wrap nn     Text bei Zeile nn umbrechen (Default: 68)\u000a   -u | -upper       Tags in GROSSBUCHSTABEN (Default: kleinbuchstaben)\u000a   -c | -clean       <font>, <nobr>, <center>-Tags durch CSS ersetzen\u000a   -n | -numeric     numerische anstelle benannter Entit\u00e4ten verwenden\u000a   -e | -errors      nur Fehler anzeigen (nicht den korrigierten Text)\u000a   -q | -quiet       nicht notwendige Ausgaben unterdr\u00fccken\u000a        -xml         die Eingabe ist bereits wohlgeformtes XML\u000a        -asxml       die Ausgabe soll wohlgeformtes XML sein\u000a        -slides !
      das Dokument an den <h2>-Elementen in "slides"\u000a                     (Einzelseiten) zerst\u00fcckeln: slide1.html, slide2.html, ...\u000a \u000a Zeichen-S\u00e4tze / -Kodierung\u000a    -raw             alle Bytes > 128 in der Ausgabe unver\u00e4ndert lassen\u000a    -ascii           ASCII f\u00fcr die Ausgabe, Latin-1 f\u00fcr die Eingabe verwenden\u000a    -latin1          Latin-1 f\u00fcr Ein- und Ausgabe verwenden\u000a    -iso2022         ISO2022 (v.a. Japanisch) f\u00fcr Ein- und Ausgabe verwenden\u000a    -utf8            UTF8 (Unicode) f\u00fcr Ein- und Ausgabe verwenden\u000a    -mac             Den MacRoman-Zeichensatz verwenden\u000a \u000a Datei-Manipulation\u000a ------------------\u000a    -config <datei>  lese Optionen aus der angegebenen Konfigurations-Datei\u000a    -f <datei>       Fehler zur angegebenen Datei schreiben\u000a   -m | -modify      die Original-Datei \u00e4ndern\u000a \u000a Vermischtes\u000a -----------\u000a   -v | -version     die!
  Programmversion anzeigen\u000a   -h | -help        diese Kommandozeil
enhilfe anzeigen\u000a Au\u00dferdem kann f\u00fcr jede Konfigurations-Datei-Option "bla" auch\u000a "--blah" in der Kommandozeile genutzt werden.\u000a Ein- und Ausgabe ist (wenn nicht anders angegeben) die Standard-Ein-\u000a oder Ausgabe.\u000a Einzel-Buchstaben-Optionen au\u00dfer -f k\u00f6nnen miteinander kombiniert\u000a werden, wie z.B.   tidy -f errs.txt -imu foo.html\u000a F\u00fcr weitere Informationen \u00fcber HTML siehe http://www.w3.org/MarkUp
+id_name_mismatch={0} das id- und das name-Attribut haben nicht den gleichen Wert
+illegal_char=Warnung: Ung\u00fcltiges Zeichen mit Code {0,number} wird ersetzt.
+illegal_nesting={0} sollte nicht verschachtelt werden.
+illegal_uri_reference=
+inconsistent_namespace=HTML Namensraum (namespace) passt nicht zum Inhalt
+inconsistent_version=HTML-DocTyp passt nicht zum Inhalt.
+inserting_tag=f\u00fcge implizites <{0}> ein
+invalid_char=
+invalid_ncr=
+invalid_sgml_chars_summary=
+invalid_utf16=
+invalid_utf16_summary=
+invalid_utf8=
+invalid_utf8_summary=
+invaliduri_summary=
+joining_attribute=
+line_column=Zeile {0,number} Spalte {1,number} -
+malformed_comment=zusammenh\u00e4ngende Bindestriche (--) innerhalb eines Kommentars.
+malformed_doctype=erwarte "html PUBLIC" oder "html SYSTEM"
+missing_attr_value={0} dem Attribut "{1}" fehlt ein Wert
+missing_attribute={0} hat kein "{1}"-Attribut
+missing_body=Ich kann keine Slides erstellen, weil das Dokument kein <body>-Element enth\u00e4lt.
+missing_doctype=
+missing_endtag_before=fehlendes </{0}> vor {1}
+missing_endtag_for=fehlendes </{0}>
+missing_imagemap={0} sollte eine Client-seitige Image-Map benutzen  (usemap=... anstatt ismap)
+missing_quotemark=
+missing_semicolon=Warnung: Die Entit\u00e4t "{0}" endet nicht mit ";"
+missing_semicolon_ncr=
+missing_starttag=fehlendes <{0}>
+missing_title_element=f\u00fcge fehlendes <title>-Element ein.
+needs_author_intervention=Dieses Dokument hat Fehler, die korrigiert werden m\u00fcssen,\u000abevor HTML Tidy das Dokument aufr\u00e4umen kann.
+nested_emphasis=verschachtelte Hervorhebung {0}
+nested_quotation=
+newline_in_uri=
+no_warnings=Es wurden keine Warnungen oder Fehler gefunden.
+noframes_content={0} nicht innerhalb eines <noframe>-Elementes
+non_matching_endtag=ersetze unerwartetes unexpected {0} durch </{1}>
+num_warnings=Es wurden  {0,choice,0#keine Warnungen|1#1 Warnungen|1<{0,number,integer} Warnungen}, {1,choice,0#keine Fehler|1#1 Fehler|2#{1,number,integer} Fehler} gefunden!
+obsolete_element=ersetze veraltetes Element {0} durch {1}
+proprietary_attr_value={0} propriet\u00e4rer (nicht-standardisierter) Attribut-Wert "{1}"
+proprietary_attribute={0} propriet\u00e4rer (nicht-standardisierter) Attribut "{1}"
+proprietary_element={0} ist nicht vom W3C abgesegnet
+repeated_attribute=
+replacing_element=ersetze Element {0} durch {1}
+report_version={0}: Der Inhalt des Dokumentes sieht aus wie {1}.
+slides_found=Es wurden {0,number} Slides gefunden.
+suspected_missing_quote=Fehlendes Anf\u00fchrungszeichen (") f\u00fcr Attribut-Wert
+tag_not_allowed_in={0} ist nicht erlaubt in <{1}>-Elementen.
+too_many_elements=zu viele {0}-Elemente
+too_many_elements_in=zu viele {0}-Elemente in <{1}>
+trim_empty_element=entferne leeres {0}
+unescaped_ampersand=Warnung: einzelnes "&" (sollte "&amp;" sein).
+unescaped_element=
+unexpected_end_of_file=Ende der Datei, w\u00e4hrend Attribute geparst werden {0}
+unexpected_endtag=unerwartetes </{0}>
+unexpected_endtag_in=unerwartetes </{0}> in <{1}>
+unexpected_gt={0} fehlendes ''>'' am Ende des Tags
+unexpected_quotemark={0} unerwartetes oder dupliziertes Anf\u00fchrungszeichen (' oder ")
+unknown_attribute=unbekanntes Attribut "{0}"
+unknown_element={0} wird nicht erkannt!
+unknown_entity=Warnung: einzelnes "&" (sollte "&amp;" sein) oder unbekannte Entit\u00e4t "{0}"
+unknown_file={0}: Ich kann die Datei "{1}" nicht \u00f6ffnen.
+unknown_option=
+unrecognized_option=Unbekannte Option -{0}. Benutzen Sie -help, um die Optionen aufzulisten.
+using_br_inplace_of=es wird <br> genutzt statt {0}
+vendor_specific_chars_summary=
+warning=Warnung:
+xml_attribute_value={0} hat das XML-Attribut "{1}"
+xml_id_sintax=

Added: branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/org/w3c/tidy/TidyMessages_es.properties
===================================================================
--- branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/org/w3c/tidy/TidyMessages_es.properties	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/org/w3c/tidy/TidyMessages_es.properties	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,113 @@
+anchor_not_unique=
+apos_undefined=
+attr_value_not_lcase=
+backslash_in_uri=
+bad_argument=Aviso: erroneo argumento "{1}" para opci\u00f3n: "{0}"
+bad_attribute_value={0} atributo "{1}" tiene valor desconocido "{2}"
+bad_cdata_content=letra '<' + '/' + no permitida aqu\u00ed
+bad_comment_chars=se espera -- o >
+bad_tree=Panic: - arbol ha perdido su integridad
+bad_xml_comment=comentarios XML no pueden contener --
+badaccess_frames=P\u00e1ginas dise\u00f1adas usando marcos ( frames ) presentan problemas para usuarios ciegos o con navegadors que no los soporten. Una p\u00e1gina basada en marcos deberia incluir una composici\u00f3n alternativa dentro de un elemento NOFRAMES.
+badaccess_missing_image_alt=El atributo 'alt' se deberia usar para dar una corta descripci\u00f3n de una imagen; descripciones m\u00e1s largas deberian darse con el atributo 'longdesc' que utiliza una URL asociada con la descripci\u00f3n. Estas medidas son necesarias para gente usando navegadores no graficos.
+badaccess_missing_image_map=Utilice mapas de imagen de cliente en preferencia a mapas de servidor ya que estos son inaccesibles para gente usando navegadores no graficos. Ademas, mapas de cliente son m\u00e1s faciles de configurar y proporcionan realimentaci\u00f3n inmediata a los usuarios.
+badaccess_missing_link_alt=En enlaces de hipertexto que usan un mapa de imagen de cliente\u000ase debe usar el atributo 'alt' para proporcionar una descripci\u00f3n textual\u000adel enlace.
+badaccess_missing_summary=Se deber\u00eda usar el atributo 'summary' de una tabla para describir su estructura. Es de gran ayuda para gente usando navegadores no visuales. Los atributos 'scope' y 'headers' de las celdas de las tablas son utiles para especificar que cabeceras aplican a cada celda, permitiendo a navegadores no visuales el proporcionar un contecto significativo a cada celda.
+badaccess_summary=Para m\u00e1s recomendaciones sobre como hacer las p\u00e1ginas accesibles visite "{0}". Tambien le puede interesar visitar "http://www.cast.org/bobby/", un servicio gratuito para comprobar la accesibilidad de sitios web.
+badchars_summary=C\u00f3digos de caracteres para las fuentes de Microsoft Windows en el rango\u000a128 - 159 podr\u00edan no ser reconocidos en otras plataformas. Se recomienda\u000ausar entidades con nombre, por ejemplo &trade; mejor que el c\u00f3digo de\u000acaracter 153 (0x2122 en Unicode) de Windows.\u000a
+badform_summary=Se deberia mover una o ambas de las etiquetas <form> y </form>.\u000aLos elementos HTML deberian estar adecuadamente anidados y los\u000aelementos 'form' no son excepci\u00f3n. Por ejemplo no se deberia colocar\u000aun <form> en una celda de tabla y el </form> en otra. Si <form> esta\u000aantes de una tabla, </form> deberia estar despues \u00a1Recuerde que los\u000aformularios no se pueden anidar!\u000a
+badlayout_using_body=Se recomienda utilizar CSS para especificar colores de p\u00e1gina y enlaces
+badlayout_using_font=Se recomienda utilizar CSS para especificar fuentes y propiedades\u000acomo tama\u00f1o y color. Esto reducira el tama\u00f1o de los archivos HTML\u000ay hara m\u00e1s facil el mantenimiento que con elementos FONT.\u000a
+badlayout_using_layer=Se recomienda el mecanismo de posicionado con hojas de estilo (CSS) en preferencia al elemento propietario LAYER, debido a su limitado soporte por vendedores.
+badlayout_using_nobr=Se recomienda utilizar CSS para controlar la division de lineas. Use "white-space: nowrap" para inhibir division en lugar de insertar <NOBR>...</NOBR> en el etiquetado.
+badlayout_using_spacer=Se recomienda utilizar CSS para controlar espacios en blanco (por ejemplo para indentation, margenes y separacion de lineas ). El elemento propietario SPACER tiene limitado soporte.
+cant_be_nested={0} no se puede anidar
+coerce_to_endtag=<{0}> deberia ser probablemente </{0}>
+content_after_body=contenido despues del final del 'body'
+discarding_unexpected=descartando inesperado {0}
+doctype_after_tags=<!DOCTYPE> no esta permitido despu\u00e9s de elementos
+doctype_given={0}: Doctype dado es "{1}"
+dtype_not_upper_case=SYSTEM, PUBLIC, W3C, DTD, EN deben ir en may\u00fasculas
+duplicate_frameset=elemento FRAMESET repetido
+element_not_empty=
+emacs_format={0}:{1,number}:{2,number}:
+encoding_mismatch=
+entity_in_id=
+error=Error:
+escaped_illegal_uri=
+expected_equalsign=
+fixed_backslash=
+forced_end_anchor=Aviso:  <a> deberia ser probablemente </a>
+general_info=Para aprender m\u00e1s sobre JTidy visite http://jtidy.sourceforge.net\u000aPor favor, notifique errores en http://sourceforge.net/tracker/?group_id=13153&atid=113153\u000aEspecificaciones de HTML y CSS estan disponibles en http://www.w3.org/
+hello_message=Tidy (versi\u00f3n {0}) Analizando "{1}"
+help_text={0}: file1 file2 ...\u000aAplicaci\u00f3n para limpiar y formatear archivos html\u000aconsulte http://www.w3.org/People/Raggett/tidy/\u000aopciones para tidy disponibles en {1}\u000a\u000aDirectivas de procesado\u000a--------------------\u000a  -indent o -i    indentar contenido de elemento\u000a  -omit   o -o    omitir etiquetas finales opcionales\u000a  -wrap 72        dividir texto en la columna 72 (68 por defecto)\u000a  -upper  o -u    forzar etiquetas en may\u00fasculas (min\u00fasculas por defecto)\u000a  -clean  o -c    remplazar etiquetas FONT, NOBR y CENTER tags por CSS\u000a  -numeric o -n   generar entidades num\u00e9ricas m\u00e1s que nombradas\u000a  -errors o -e    s\u00f3lo mostrar errores\u000a  -quiet o -q     suprimir salida no esencial\u000a  -xml            usar cuando la entrada es xml bien formado\u000a  -asxml          para convertir html a xml bien formado\u000a  -slides         para generar presentaciones a partir de elementos H2\u000a\u0!
 00aC\u00f3digos de caracteresn------------------\u000a  -raw            dejar caracteres > 128 igual que a la entrada\u000a  -ascii          usar ASCII para salida, Latin-1 para entrada\u000a  -latin1         usar Latin-1 para entrada y salida\u000a  -iso2022        usar ISO2022 para entrada y salida\u000a  -utf8           usar UTF-8 para entrada y salida\u000a  -mac            usar el c\u00f3digo de caracteres MacRoman de Apple\u000a\u000aFile manipulation\u000a---------------\u000a  -config <file>  configurar opciones a partir del archivo <file>\u000a  -f <file>       escribir errores al archivo <file>\u000a  -modify o -m    para midificar archivos originales\u000a\u000aVarios\u000a------------\u000a  -version o -v  mostrar versi\u00f3n\u000a  -help   o -h   listar opciones de la l\u00ednea de comando\u000aTambi\u00e9n puede usar --blah para cualquier opci\u00f3n de configuraci\u00f3n blah\u000a\u000aInput/Output son stdin/stdout por defecto\u000aOpciones de una s\u00f3la!
  letra, excepto -f, se pueden combinar\u000acomo en:  tidy -f errs.txt
 -imu foo.html\u000aPara m\u00e1s informaci\u00f3n sobre HTML consultar http://www.w3.org/MarkUp
+id_name_mismatch={0} valor de atributos 'id' y 'name' no coinciden
+illegal_char=Aviso: remplazar c\u00f3digo de caracter ilegal {0,number}
+illegal_nesting={0} no deber\u00eda estar anidado
+illegal_uri_reference=
+inconsistent_namespace=espacio de nombres no corresponde al contenido
+inconsistent_version=html doctype no corresponde al contenido
+inserting_tag=insertando <{0}> implicito
+invalid_char=
+invalid_ncr=
+invalid_sgml_chars_summary=
+invalid_utf16=
+invalid_utf16_summary=
+invalid_utf8=
+invalid_utf8_summary=
+invaliduri_summary=
+joining_attribute=
+line_column=linea {0,number} columna {1,number} -
+malformed_comment=guiones adjacentes dentro de comentario
+malformed_doctype=se espera "html PUBLIC" o "html SYSTEM"
+missing_attr_value={0} atributo "{1}" sin valor
+missing_attribute={0} falta atributo "{1}"
+missing_body=No se puede crear diapositivas, falta elemento BODY.
+missing_doctype=falta <!DOCTYPE> declaraci\u00f3n
+missing_endtag_before=falta </{0}> antes {1}
+missing_endtag_for=falta </{0}>
+missing_imagemap={0} debe usar mapa de imagen del lado del cliente
+missing_quotemark=
+missing_semicolon=Aviso: entidad "{0}" no termina en '';''
+missing_semicolon_ncr=
+missing_starttag=falta <{0}>
+missing_title_element=insertado elemento 'title'
+needs_author_intervention=Este documento tiene errores que se deben solucionar para que Tidy pueda generar una version corregida
+nested_emphasis=enfasis anidado {0}
+nested_quotation=
+newline_in_uri=
+no_warnings=no hay avisos ni errores
+noframes_content={0} no dentro de elemento ''noframes''
+non_matching_endtag=remplazar {0} inesperado por </{1}>
+num_warnings=hallados {0,choice,0#no avisos|1#1 aviso|1<{0,number,integer} avisos}, {1,choice,0#no errors|1#1 error|2#{1,number,integer} errors}!
+obsolete_element=elemento obsoleto {0} por {1}
+proprietary_attr_value={0} valor de atributo "{1}" proprietario
+proprietary_attribute={0} atributo "{1}" proprietario
+proprietary_element={0} no aprobado por W3C
+repeated_attribute=
+replacing_element=remplazar elemento {0} por {1}
+report_version={0}: Contenido de documento parece {1}
+slides_found=Se han hallado {0,number} diapositivas
+suspected_missing_quote=faltan comillas para valor de atributo
+tag_not_allowed_in={0} no permitido en elementos <{1}>
+too_many_elements=demasiados elementos {0}
+too_many_elements_in=demasiados elementos {0} en <{1}>
+trim_empty_element=elemento vacio eliminado {0}
+unescaped_ampersand=Aviso: '&' no escapado que deber\u00eda ser escrito como &amp;
+unescaped_element=
+unexpected_end_of_file=final de archivo mientras se analizan atributos {0}
+unexpected_endtag=</{0}> inesperado
+unexpected_endtag_in=</{0}> inesperado en <{1}>
+unexpected_gt={0} falta ''>'' al final de la etiqueta
+unexpected_quotemark={0} comillas inesperadas o duplicadas
+unknown_attribute=atributo "{0}" desconocido
+unknown_element={0} no se reconoce!
+unknown_entity=Aviso: '&' no escapado o entidad desconocida "{0}"
+unknown_file={0}: no se puede abrir archivo "{1}"
+unknown_option=Aviso: option desconocida: {0}
+unrecognized_option=opcion -{0} desconocida. Use -help para listar opciones
+using_br_inplace_of=usando <br> en lugar de {0}
+vendor_specific_chars_summary=
+warning=Aviso:
+xml_attribute_value={0} tiene atributo XML "{1}"
+xml_id_sintax=

Added: branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/org/w3c/tidy/config.txt
===================================================================
--- branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/org/w3c/tidy/config.txt	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/org/w3c/tidy/config.txt	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,20 @@
+# sample config file for Java HTML tidy
+
+indent=auto
+indent-spaces=2
+wrap=72
+markup=yes
+clean=yes
+output-xml=no
+input-xml=no
+show-warnings=yes
+numeric-entities=yes
+quote-marks=yes
+quote-nbsp=yes
+quote-ampersand=no
+break-before-br=no
+uppercase-tags=yes
+uppercase-attributes=yes
+smart-indent=no
+output-xhtml=yes
+char-encoding=latin1

Added: branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/renderkit/html/scripts/form.js
===================================================================
--- branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/renderkit/html/scripts/form.js	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/renderkit/html/scripts/form.js	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,101 @@
+
+if (!window.A4J) { window.A4J= {};}
+
+if(!A4J.findForm){
+
+function _JSFFormSubmit(linkId,formName,target,parameters){
+	var form = document.getElementById(formName);
+	if(form){
+		var hiddenField = form.elements[formName+":_idcl"];
+		if(hiddenField){
+			hiddenField.value=linkId;
+	    } else {
+			var input = document.createElement("input");
+			input.type="hidden";
+			input.name=formName+":_idcl";
+			input.value=linkId;
+			form.appendChild(input);
+		}
+		if(target){
+			form.target=target;
+		}
+		if(parameters){
+			for(var param in parameters){
+				if(form.elements[param]){
+					form.elements[param].value = parameters[param];
+				} else {
+					var input = document.createElement("input");
+					input.type="hidden";
+					input.name=param;
+					input.value=parameters[param];
+					form.appendChild(input);
+				}
+			}
+		}
+		form.submit();
+	} else {
+		alert("Form "+formName+" not found in document");
+	}
+	return false;
+};
+
+function _clearJSFFormParameters(formName,target,fields){
+	var form = document.getElementById(formName);
+	if(form){
+		if(target){
+			form.target = target;
+		} else {
+			form.target = '';
+		}
+		if(fields){
+		 for(var i=0;i<fields.length;i++){
+			var field = form.elements[fields[i]];
+			if(field){
+				field.value='';
+			}
+		 }
+		}
+	}
+}
+
+function clearFormHiddenParams(formName,target,fields){
+	_clearJSFFormParameters(formName,target,fields);
+}
+
+
+  A4J.findForm = function(element){
+	var parent = element;
+	do{
+		parent = parent.parentNode;
+	} while (parent && parent.nodeName.toLowerCase() != 'form');
+	if(!parent){
+		parent = {reset:function(){}, submit:function(){}};
+	}
+	return parent;
+  }
+
+  A4J._formInput = null;
+
+// setup form to handle 'onclick' events, to detect input element.
+  A4J.setupForm = function(id){
+  		var element = window.document.getElementById(id);
+	    var name = "click";
+        if (element.addEventListener) {
+             element.addEventListener(name, A4J._observer, false);
+        } else if (element.attachEvent) {
+             element.attachEvent('on' + name, A4J._observer);
+        }
+        // TODO - handle array of all attached forms and remove listeners
+        // on ajax updates, to avoid memory leaks.
+  }
+
+  A4J._observer = function(evt){
+  	var src = evt.target||evt.srcElement;
+  	if( src && src.nodeName.toUpperCase() == 'INPUT' && src.type.toUpperCase() == 'SUBMIT'){
+  		A4J._formInput = src;
+  	} else {
+  		A4J._formInput = null;
+  	}
+  }
+}
+//
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/xml/serializer/Encodings.properties
===================================================================
--- branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/xml/serializer/Encodings.properties	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/xml/serializer/Encodings.properties	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,116 @@
+###########################################################################
+# Copyright 2003-2004 The Apache Software Foundation.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+##########################################################################
+#
+# $Id: Encodings.properties,v 1.1.2.1 2007/01/10 19:33:36 alexsmirnov Exp $
+#
+# <JAVA name encoding>, <PREFERRED name MIME>
+# Peter Smolik
+Cp1250 WINDOWS-1250 0x00FF
+# Patch attributed to havardw at underdusken.no (Håvard Wigtil)
+Cp1251 WINDOWS-1251 0x00FF
+Cp1252 WINDOWS-1252 0x00FF
+ISO8859_1 ISO-8859-1 0x00FF
+# Patch attributed to havardw at underdusken.no (Håvard Wigtil)
+ISO8859-1 ISO-8859-1 0x00FF
+ISO8859_2 ISO-8859-2 0x00FF
+# I'm going to apply "ISO8859-X" variant to all these, to be safe.
+ISO8859-2 ISO-8859-2 0x00FF
+ISO8859_3 ISO-8859-3 0x00FF
+ISO8859-3 ISO-8859-3 0x00FF
+ISO8859_4 ISO-8859-4 0x00FF
+ISO8859-4 ISO-8859-4 0x00FF
+ISO8859_5 ISO-8859-5 0x00FF
+ISO8859-5 ISO-8859-5 0x00FF
+ISO8859_6 ISO-8859-6 0x00FF
+ISO8859-6 ISO-8859-6 0x00FF
+ISO8859_7 ISO-8859-7 0x00FF
+ISO8859-7 ISO-8859-7 0x00FF
+ISO8859_8 ISO-8859-8 0x00FF
+ISO8859-8 ISO-8859-8 0x00FF
+ISO8859_9 ISO-8859-9 0x00FF
+ISO8859-9 ISO-8859-9 0x00FF
+ISO8859_10 ISO-8859-10 0x00FF
+ISO8859-10 ISO-8859-10 0x00FF
+ISO8859_11 ISO-8859-11 0x00FF
+ISO8859-11 ISO-8859-11 0x00FF
+ISO8859_12 ISO-8859-12 0x00FF
+ISO8859-12 ISO-8859-12 0x00FF
+ISO8859_13 ISO-8859-13 0x00FF
+ISO8859-13 ISO-8859-13 0x00FF
+ISO8859_14 ISO-8859-14 0x00FF
+ISO8859-14 ISO-8859-14 0x00FF
+ISO8859_15 ISO-8859-15 0x00FF
+ISO8859-15 ISO-8859-15 0x00FF
+# # ?
+8859_1 ISO-8859-1 0x00FF
+8859_2 ISO-8859-2 0x00FF
+8859_3 ISO-8859-3 0x00FF
+8859_4 ISO-8859-4 0x00FF
+8859_5 ISO-8859-5 0x00FF
+8859_6 ISO-8859-6 0x00FF
+8859_7 ISO-8859-7 0x00FF
+8859_8 ISO-8859-8 0x00FF
+8859_9 ISO-8859-9 0x00FF
+8859-1 ISO-8859-1 0x00FF
+8859-2 ISO-8859-2 0x00FF
+8859-3 ISO-8859-3 0x00FF
+8859-4 ISO-8859-4 0x00FF
+8859-5 ISO-8859-5 0x00FF
+8859-6 ISO-8859-6 0x00FF
+8859-7 ISO-8859-7 0x00FF
+8859-8 ISO-8859-8 0x00FF
+8859-9 ISO-8859-9 0x00FF
+JIS ISO-2022-JP 0xFFFF
+ISO2022KR ISO-2022-KR 0xFFFF
+SJIS SHIFT_JIS 0xFFFF
+EUC_JP EUC-JP 0xFFFF
+EUC_KR EUC-KR 0xFFFF
+EUC_CN EUC-CN 0xFFFF
+EUC_TW EUC-TW 0xFFFF
+EUC_CN GB2312 0xFFFF
+EUC-JP EUC-JP 0xFFFF
+EUC-KR EUC-KR 0xFFFF
+EUC-CN EUC-CN 0xFFFF
+EUC-TW EUC-TW 0xFFFF
+EUC-CN GB2312 0xFFFF
+GB2312 GB2312 0xFFFF
+Big5 BIG5 0xFFFF
+EUCJIS EUC-JP 0xFFFF
+KSC5601 EUC-KR 0xFFFF
+KOI8_R KOI8-R 0xFFFF
+Cp037 EBCDIC-CP-US,EBCDIC-CP-CA,EBCDIC-CP-NL 0x00FF
+Cp277 EBCDIC-CP-DK,EBCDIC-CP-NO 0x00FF
+Cp278 EBCDIC-CP-FI,EBCDIC-CP-SE 0x00FF
+Cp280 EBCDIC-CP-IT 0x00FF
+Cp284 EBCDIC-CP-ES 0x00FF
+Cp285 EBCDIC-CP-GB 0x00FF
+Cp297 EBCDIC-CP-FR 0x00FF
+Cp420 EBCDIC-CP-AR1 0x00FF
+Cp424 EBCDIC-CP-HE 0x00FF
+Cp500 EBCDIC-CP-CH 0x00FF
+Cp870 EBCDIC-CP-ROECE,EBCDIC-CP-YU 0x00FF
+Cp871 EBCDIC-CP-IS 0x00FF
+Cp918 EBCDIC-CP-AR2 0x00FF
+Cp1047 IBM1047,IBM-1047 0x00FF
+MacTEC MacRoman 0x00FF
+ASCII ASCII,US-ASCII 0x007F
+Unicode UNICODE,UTF-16 0xFFFF
+UTF8 UTF-8 0xFFFF
+# patch attributed to Jinsung Lee
+KS_C_5601-1987 KS_C_5601-1987,iso-ir-149,KS_C_5601-1989,KSC_5601,csKSC56011987 0xFFFF
+# note that more character set names and their aliases
+# can be found at http://www.iana.org/assignments/character-sets
+

Added: branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/xml/serializer/HTMLEntities.properties
===================================================================
--- branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/xml/serializer/HTMLEntities.properties	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/xml/serializer/HTMLEntities.properties	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,311 @@
+###########################################################################
+# Copyright 2003-2004 The Apache Software Foundation.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+##########################################################################
+#
+# $Id: HTMLEntities.properties,v 1.1.2.1 2007/01/10 19:33:38 alexsmirnov Exp $
+# in ./java/src/org/ajax4jsf/xml/serializer
+#
+# @version $Revision: 1.1.2.1 $ $Date: 2007/01/10 19:33:38 $
+# @author <a href="mailto:arkin at intalio.com">Assaf Arkin</a>
+# This file must be encoded in UTF-8; see org.ajax4jsf.xml.serializer.CharInfo
+#
+# Character entity references for markup-significant
+#
+quot=34
+amp=38
+lt=60
+gt=62
+nbsp=160
+#
+# Character entity references for ISO 8859-1 characters
+#
+iexcl=161
+cent=162
+pound=163
+curren=164
+yen=165
+brvbar=166
+sect=167
+uml=168
+copy=169
+ordf=170
+laquo=171
+not=172
+shy=173
+reg=174
+macr=175
+deg=176
+plusmn=177
+sup2=178
+sup3=179
+acute=180
+micro=181
+para=182
+middot=183
+cedil=184
+sup1=185
+ordm=186
+raquo=187
+frac14=188
+frac12=189
+frac34=190
+iquest=191
+Agrave=192
+Aacute=193
+Acirc=194
+Atilde=195
+Auml=196
+Aring=197
+AElig=198
+Ccedil=199
+Egrave=200
+Eacute=201
+Ecirc=202
+Euml=203
+Igrave=204
+Iacute=205
+Icirc=206
+Iuml=207
+ETH=208
+Ntilde=209
+Ograve=210
+Oacute=211
+Ocirc=212
+Otilde=213
+Ouml=214
+times=215
+Oslash=216
+Ugrave=217
+Uacute=218
+Ucirc=219
+Uuml=220
+Yacute=221
+THORN=222
+szlig=223
+agrave=224
+aacute=225
+acirc=226
+atilde=227
+auml=228
+aring=229
+aelig=230
+ccedil=231
+egrave=232
+eacute=233
+ecirc=234
+euml=235
+igrave=236
+iacute=237
+icirc=238
+iuml=239
+eth=240
+ntilde=241
+ograve=242
+oacute=243
+ocirc=244
+otilde=245
+ouml=246
+divide=247
+oslash=248
+ugrave=249
+uacute=250
+ucirc=251
+uuml=252
+yacute=253
+thorn=254
+yuml=255
+#
+# Character entity references for symbols, mathematical symbols, and Greek letters
+#
+# Latin Extended -- Netscape can't handle
+# fnof 402
+#
+# Greek - Netscape can't handle these
+# Alpha 913
+# Beta 914
+# Gamma 915
+# Delta 916
+# Epsilon 917
+# Zeta 918
+# Eta 919
+# Theta 920
+# Iota 921
+# Kappa 922
+# Lambda 923
+# Mu 924
+# Nu 925
+# Xi 926
+# Omicron 927
+# Pi 928
+# Rho 929
+# Sigma 931
+# Tau 932
+# Upsilon 933
+# Phi 934
+# Chi 935
+# Psi 936
+# Omega 937
+# alpha 945
+# beta 946
+# gamma 947
+# delta 948
+# epsilon 949
+# zeta 950
+# eta 951
+# theta 952
+# iota 953
+# kappa 954
+# lambda 955
+# mu 956
+# nu 957
+# xi 958
+# omicron 959
+# pi 960
+# rho 961
+# sigmaf 962
+# sigma 963
+# tau 964
+# upsilon 965
+# phi 966
+# chi 967
+# psi 968
+# omega 969
+# thetasym 977
+# upsih 978
+# piv 982
+#
+# General Punctuation
+bull=8226
+hellip=8230
+prime=8242
+Prime=8243
+oline=8254
+frasl=8260
+#
+# Letterlike Symbols
+weierp=8472
+image=8465
+real=8476
+trade=8482
+alefsym=8501
+#
+# Arrows
+larr=8592
+uarr=8593
+rarr=8594
+darr=8595
+harr=8596
+crarr=8629
+lArr=8656
+uArr=8657
+rArr=8658
+dArr=8659
+hArr=8660
+#
+# Mathematical Operators
+forall=8704
+part=8706
+exist=8707
+empty=8709
+nabla=8711
+isin=8712
+notin=8713
+ni=8715
+prod=8719
+sum=8721
+minus=8722
+lowast=8727
+radic=8730
+prop=8733
+infin=8734
+ang=8736
+and=8743
+or=8744
+cap=8745
+cup=8746
+int=8747
+there4=8756
+sim=8764
+cong=8773
+asymp=8776
+ne=8800
+equiv=8801
+le=8804
+ge=8805
+sub=8834
+sup=8835
+nsub=8836
+sube=8838
+supe=8839
+oplus=8853
+otimes=8855
+perp=8869
+sdot=8901
+#
+# Miscellaneous Technical
+lceil=8968
+rceil=8969
+lfloor=8970
+rfloor=8971
+lang=9001
+rang=9002
+#
+# Geometric Shapes
+loz=9674
+#
+# Miscellaneous Symbols
+spades=9824
+clubs=9827
+hearts=9829
+diams=9830
+#
+# Character entity references for internationalization characters
+#
+# Latin Extended-A
+# Netscape can't handle!
+# OElig 338
+# oelig 339
+
+#-- NN 4.7 does not seem to support these, so they might ought to be commented.
+# Scaron 352
+# scaron 353
+# Yuml 376
+#
+# Spacing Modifier Letters -- Netscape can't handle
+# circ 710
+# tilde 732
+#
+# General Punctuation
+ensp=8194
+emsp=8195
+thinsp=8201
+zwnj=8204
+zwj=8205
+lrm=8206
+rlm=8207
+ndash=8211
+mdash=8212
+lsquo=8216
+rsquo=8217
+sbquo=8218
+ldquo=8220
+rdquo=8221
+bdquo=8222
+dagger=8224
+Dagger=8225
+permil=8240
+lsaquo=8249
+rsaquo=8250
+euro=8364

Added: branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/xml/serializer/Version.src
===================================================================
--- branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/xml/serializer/Version.src	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/xml/serializer/Version.src	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,148 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: Version.src,v 1.1.2.1 2007/01/10 19:33:35 alexsmirnov Exp $
+ */
+package org.ajax4jsf.xml.serializer;
+
+/**
+ * Administrative class to keep track of the version number of
+ * the Serializer release.
+ * <P>This class implements the upcoming standard of having
+ * org.apache.project-name.Version.getVersion() be a standard way 
+ * to get version information.</P> 
+ * @xsl.usage general
+ */
+public final class Version
+{
+
+  /**
+   * Get the basic version string for the current Serializer.
+   * Version String formatted like 
+   * <CODE>"<B>Serializer</B> <B>Java</B> v.r[.dd| <B>D</B>nn]"</CODE>.
+   *
+   * Futurework: have this read version info from jar manifest.
+   *
+   * @return String denoting our current version
+   */
+  public static String getVersion()
+  {
+     return getProduct()+" "+getImplementationLanguage()+" "
+           +getMajorVersionNum()+"."+getReleaseVersionNum()+"."
+           +( (getDevelopmentVersionNum() > 0) ? 
+               ("D"+getDevelopmentVersionNum()) : (""+getMaintenanceVersionNum()));  
+  }
+
+  /**
+   * Print the processor version to the command line.
+   *
+   * @param argv command line arguments, unused.
+   */
+  public static void main(String argv[])
+  {
+    System.out.println(getVersion());
+  }
+  
+  /**
+   * Name of product: Serializer.
+   */
+  public static String getProduct()
+  {
+    return "Serializer";
+  }
+
+  /**
+   * Implementation Language: Java.
+   */
+  public static String getImplementationLanguage()
+  {
+    return "Java";
+  }
+  
+  
+  /**
+   * Major version number.
+   * Version number. This changes only when there is a
+   *          significant, externally apparent enhancement from
+   *          the previous release. 'n' represents the n'th
+   *          version.
+   *
+   *          Clients should carefully consider the implications
+   *          of new versions as external interfaces and behaviour
+   *          may have changed.
+   */
+  public static int getMajorVersionNum()
+  {
+    return @version.VERSION@;
+    
+  }  
+
+  /**
+   * Release Number.
+   * Release number. This changes when:
+   *            -  a new set of functionality is to be added, eg,
+   *               implementation of a new W3C specification.
+   *            -  API or behaviour change.
+   *            -  its designated as a reference release.
+   */
+  public static int getReleaseVersionNum()
+  {
+    return @version.RELEASE@;
+  }
+  
+  /**
+   * Maintenance Drop Number.
+   * Optional identifier used to designate maintenance
+   *          drop applied to a specific release and contains
+   *          fixes for defects reported. It maintains compatibility
+   *          with the release and contains no API changes.
+   *          When missing, it designates the final and complete
+   *          development drop for a release.
+   */
+  public static int getMaintenanceVersionNum()
+  {
+    return @version.MINOR@;
+  }
+
+  /**
+   * Development Drop Number.
+   * Optional identifier designates development drop of
+   *          a specific release. D01 is the first development drop
+   *          of a new release.
+   *
+   *          Development drops are works in progress towards a
+   *          compeleted, final release. A specific development drop
+   *          may not completely implement all aspects of a new
+   *          feature, which may take several development drops to
+   *          complete. At the point of the final drop for the
+   *          release, the D suffix will be omitted.
+   *
+   *          Each 'D' drops can contain functional enhancements as
+   *          well as defect fixes. 'D' drops may not be as stable as
+   *          the final releases.
+   */
+  public static int getDevelopmentVersionNum()
+  { 
+    try {   
+        if ((new String("@version.DEVELOPER@")).length() == 0)
+          return 0;
+        else  
+          return Integer.parseInt("@version.DEVELOPER@");
+    } catch (NumberFormatException nfe) {
+           return 0;
+    }    
+  }      
+}

Added: branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/xml/serializer/XMLEntities.properties
===================================================================
--- branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/xml/serializer/XMLEntities.properties	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/xml/serializer/XMLEntities.properties	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,29 @@
+###########################################################################
+# Copyright 2003-2004 The Apache Software Foundation.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+##########################################################################
+#
+# $Id: XMLEntities.properties,v 1.1.2.1 2007/01/10 19:33:34 alexsmirnov Exp $
+#
+# @version $Revision: 1.1.2.1 $ $Date: 2007/01/10 19:33:34 $
+# @author <a href="mailto:arkin at intalio.com">Assaf Arkin</a>
+# This file must be encoded in UTF-8; see org.ajax4jsf.xml.serializer.CharInfo
+#
+# Character entity references for markup-significant
+#
+quot=34
+amp=38
+lt=60
+gt=62
+

Added: branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/xml/serializer/output_html.properties
===================================================================
--- branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/xml/serializer/output_html.properties	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/xml/serializer/output_html.properties	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,42 @@
+###########################################################################
+# Copyright 2003-2004 The Apache Software Foundation.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+##########################################################################
+#
+# $Id: output_html.properties,v 1.1.2.1 2007/01/10 19:33:38 alexsmirnov Exp $
+#
+# Specify defaults when method="html".  These defaults use output_xml.properties 
+# as a base.
+#
+
+# XSLT properties do not need namespace qualification.
+method=html
+indent=yes
+media-type=text/html
+version=4.0
+
+# Xalan-specific output properties.  These can be overridden in the stylesheet 
+# assigning a xalan namespace.  For example:
+# <xsl:stylesheet version="1.0"
+#          xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+#          xmlns:xalan="http://xml.apache.org/xalan">
+#  <xsl:output method="html" encoding="UTF-8"
+#              xalan:content-handler="MyContentHandler"/>
+#  ...
+# Note that the colon after the protocol needs to be escaped.
+{http\u003a//xml.apache.org/xalan}indent-amount=0
+{http\u003a//xml.apache.org/xalan}content-handler=org.ajax4jsf.xml.serializer.ToHTMLStream
+{http\u003a//xml.apache.org/xalan}entities=org/ajax4jsf/xml/serializer/HTMLEntities
+{http\u003a//xml.apache.org/xalan}use-url-escaping=yes
+{http\u003a//xml.apache.org/xalan}omit-meta-tag=no

Added: branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/xml/serializer/output_text.properties
===================================================================
--- branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/xml/serializer/output_text.properties	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/xml/serializer/output_text.properties	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,35 @@
+##########################################################################
+# Copyright 2003-2004 The Apache Software Foundation.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+##########################################################################
+#
+# $Id: output_text.properties,v 1.1.2.1 2007/01/10 19:33:39 alexsmirnov Exp $
+#
+# Specify defaults when method="text".
+#
+
+# XSLT properties do not need namespace qualification.
+method=text
+media-type=text/plain
+
+# Xalan-specific output properties.  These can be overridden in the stylesheet 
+# assigning a xalan namespace.  For example:
+# <xsl:stylesheet version="1.0"
+#          xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+#          xmlns:xalan="http://xml.apache.org/xalan">
+#  <xsl:output method="html" encoding="UTF-8"
+#              xalan:content-handler="MyContentHandler"/>
+#  ...
+# Note that the colon after the protocol needs to be escaped.
+{http\u003a//xml.apache.org/xalan}content-handler=org.ajax4jsf.xml.serializer.ToTextStream
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/xml/serializer/output_unknown.properties
===================================================================
--- branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/xml/serializer/output_unknown.properties	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/xml/serializer/output_unknown.properties	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,44 @@
+###########################################################################
+# Copyright 2003-2004 The Apache Software Foundation.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+##########################################################################
+#
+# $Id: output_unknown.properties,v 1.1.2.1 2007/01/10 19:33:37 alexsmirnov Exp $
+#
+# Specify defaults when no method="..." is specified.
+# This type of output will quickly switch to "xml" or "html"
+# depending on the first element name.
+#
+
+# XSLT properties do not need namespace qualification.
+method=xml
+version=1.0
+encoding=UTF-8
+indent=no
+omit-xml-declaration=no
+standalone=no
+media-type=text/xml
+
+# Xalan-specific output properties.  These can be overridden in the stylesheet 
+# assigning a xalan namespace.  For example:
+# <xsl:stylesheet version="1.0"
+#          xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+#          xmlns:xalan="http://xml.apache.org/xalan">
+#  <xsl:output method="html" encoding="UTF-8"
+#              xalan:content-handler="MyContentHandler"/>
+#  ...
+# Note that the colon after the protocol needs to be escaped.
+{http\u003a//xml.apache.org/xalan}indent-amount=0
+{http\u003a//xml.apache.org/xalan}content-handler=org.ajax4jsf.xml.serializer.ToUnknownStream
+

Added: branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/xml/serializer/output_xhtml.properties
===================================================================
--- branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/xml/serializer/output_xhtml.properties	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/xml/serializer/output_xhtml.properties	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,42 @@
+###########################################################################
+# Copyright 2003-2004 The Apache Software Foundation.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+##########################################################################
+#
+# $Id: output_xhtml.properties,v 1.1.2.1 2007/01/10 19:33:38 alexsmirnov Exp $
+#
+# Specify defaults when method="html".  These defaults use output_xml.properties 
+# as a base.
+#
+
+# XSLT properties do not need namespace qualification.
+method=xhtml
+indent=yes
+media-type=application/xml+xhtml
+version=1.0
+
+# Xalan-specific output properties.  These can be overridden in the stylesheet 
+# assigning a xalan namespace.  For example:
+# <xsl:stylesheet version="1.0"
+#          xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+#          xmlns:xalan="http://xml.apache.org/xalan">
+#  <xsl:output method="html" encoding="UTF-8"
+#              xalan:content-handler="MyContentHandler"/>
+#  ...
+# Note that the colon after the protocol needs to be escaped.
+{http\u003a//xml.apache.org/xalan}indent-amount=0
+{http\u003a//xml.apache.org/xalan}content-handler=org.ajax4jsf.xml.serializer.ToXHTMLStream
+{http\u003a//xml.apache.org/xalan}entities=org/ajax4jsf/xml/serializer/HTMLEntities
+{http\u003a//xml.apache.org/xalan}use-url-escaping=yes
+{http\u003a//xml.apache.org/xalan}omit-meta-tag=yes

Added: branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/xml/serializer/output_xml.properties
===================================================================
--- branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/xml/serializer/output_xml.properties	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/xml/serializer/output_xml.properties	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,44 @@
+###########################################################################
+# Copyright 2003-2004 The Apache Software Foundation.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+##########################################################################
+#
+# $Id: output_xml.properties,v 1.1.2.1 2007/01/10 19:33:36 alexsmirnov Exp $
+#
+# Specify defaults when method="xml".  These defaults serve as a base for 
+# other defaults, such as output_html and output_text.
+#
+
+# XSLT properties do not need namespace qualification.
+method=xml
+version=1.0
+encoding=UTF-8
+indent=no
+omit-xml-declaration=no
+standalone=no
+media-type=text/xml
+
+# Xalan-specific output properties.  These can be overridden in the stylesheet 
+# assigning a xalan namespace.  For example:
+# <xsl:stylesheet version="1.0"
+#          xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+#          xmlns:xalan="http://xml.apache.org/xalan">
+#  <xsl:output method="html" encoding="UTF-8"
+#              xalan:content-handler="MyContentHandler"/>
+#  ...
+# Note that the colon after the protocol needs to be escaped.
+{http\u003a//xml.apache.org/xalan}indent-amount=0
+{http\u003a//xml.apache.org/xalan}content-handler=org.ajax4jsf.xml.serializer.ToXMLStream
+{http\u003a//xml.apache.org/xalan}entities=org/ajax4jsf/xml/serializer/XMLEntities
+

Added: branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/xml/serializer/package.html
===================================================================
--- branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/xml/serializer/package.html	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/resources/org/ajax4jsf/xml/serializer/package.html	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,41 @@
+<!--
+ * Copyright 2003-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+-->
+<!-- $Id: package.html,v 1.1.2.1 2007/01/10 19:33:37 alexsmirnov Exp $ -->
+<html>
+  <title>Xalan Serializer Package.</title>
+  <body>
+    <p>Processes SAX events into streams.</p>
+    
+    <p>The {@link org.ajax4jsf.xml.serializer.SerializerFactory} is used to 
+    create a {@link org.ajax4jsf.xml.serializer.Serializer} from a set of 
+    output properties (see {@link javax.xml.transform.OutputKeys}).</p>
+    <p>{@link org.ajax4jsf.xml.serializer.ToStream} acts as the main 
+    baseclass for the Xalan serializer implementations.  
+    {@link org.ajax4jsf.xml.serializer.ToHTMLStream} derives from this 
+    to implement HTML serialization.  
+    {@link org.ajax4jsf.xml.serializer.ToTextStream}
+    implements plain text serialization.
+    {@link org.ajax4jsf.xml.serializer.ToXMLStream}
+    implements XML serialization.
+    </p>
+    <p>XML mapping from characters to entity references is defined in 
+    XMLEntities.res.  HTML entity reference mapping is defined in HTMLEntities.res.
+    </p>
+    <p>Encoding information is defined in {@link org.ajax4jsf.xml.serializer.Encodings}.</p>
+ </body>
+</html>
+
+

Added: branches/refactor1/framework/impl/src/main/templates/org/ajax4jsf/renderkit/html/button.jspx
===================================================================
--- branches/refactor1/framework/impl/src/main/templates/org/ajax4jsf/renderkit/html/button.jspx	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/templates/org/ajax4jsf/renderkit/html/button.jspx	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<f:root 
+	xmlns:f="http://jsf.exadel.com/template" 
+	xmlns:c=" http://java.sun.com/jsf/core" 
+	xmlns:ui=" http://jsf.exadel.com/ui"
+	xmlns:vcp=" http://jsf.exadel.com/vcp"
+	xmlns:u=" http://jsf.exadel.com/vcp"
+	xmlns:x=" http://jsf.exadel.com/vcp"
+	class="org.ajax4jsf.renderkit.html.CommandButtonRenderer"
+	baseclass="org.ajax4jsf.renderkit.AjaxCommandRendererBase"
+	component="org.ajax4jsf.ajax.UIAjaxCommandButton" 
+	xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0" >
+	<jsp:directive.page import="javax.faces.context.FacesContext,javax.faces.component.UIComponent"/>
+	<f:clientid var="clientId"/>	
+	<jsp:declaration><![CDATA[
+    public void encodeTypeAndImage(FacesContext context, UIComponent uiComponent) throws IOException {
+    	ResponseWriter writer = context.getResponseWriter();
+    	String type = (String)uiComponent.getAttributes().get("type");
+		String image =	(String)uiComponent.getAttributes().get("image");
+		if(image != null){
+			image = context.getApplication().getViewHandler().getResourceURL(context,image);
+			image = context.getExternalContext().encodeResourceURL(image);
+			writer.writeAttribute("type","image","image");
+			writer.writeURIAttribute("src",image,"image");
+			Object value;
+			if (null == uiComponent.getAttributes().get("alt") &&  null != (value = uiComponent.getAttributes().get("value")) ) {
+				writer.writeAttribute("alt",value,"value");
+			}
+		} else {
+			if(null != type ){
+			writer.writeAttribute("type",type.toLowerCase(),"type");
+			} else {
+				writer.writeAttribute("type","button","type");				
+			}
+		}
+    }	
+	]]></jsp:declaration>
+	<input 
+		id="#{clientId}"
+		name="#{clientId}"
+		value=""
+		x:value="#{this:getValue(component)}" 
+		x:passThruWithExclusions="value,name,onclick,type,id"
+		onclick="#{this:getOnClick(context,component)}"
+		>
+		<jsp:scriptlet>encodeTypeAndImage(context,component);</jsp:scriptlet>
+</input>
+
+</f:root>
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/templates/org/ajax4jsf/renderkit/html/function.jspx
===================================================================
--- branches/refactor1/framework/impl/src/main/templates/org/ajax4jsf/renderkit/html/function.jspx	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/templates/org/ajax4jsf/renderkit/html/function.jspx	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<f:root 
+	xmlns:f="http://jsf.exadel.com/template" 
+	xmlns:c=" http://java.sun.com/jsf/core" 
+	xmlns:ui=" http://jsf.exadel.com/ui"
+	xmlns:vcp=" http://jsf.exadel.com/vcp"
+	xmlns:u=" http://jsf.exadel.com/vcp"
+	xmlns:x=" http://jsf.exadel.com/vcp"
+	class="org.ajax4jsf.renderkit.html.FunctionRenderer"
+	baseclass="org.ajax4jsf.renderkit.AjaxFunctionRendererBase"
+	component="org.ajax4jsf.ajax.UIAjaxFunction" 
+	xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0" >
+	<jsp:directive.page import="javax.faces.context.FacesContext,javax.faces.component.UIComponent"/>
+	<f:clientid var="clientId"/>	
+	<script
+		id="#{clientId}"
+		type="text/javascript"
+		>
+		<vcp:body />
+		//<![CDATA[
+		#{this:getFunction(context,component)};
+		//]]>
+	</script>
+</f:root>
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/templates/org/ajax4jsf/renderkit/html/link.jspx
===================================================================
--- branches/refactor1/framework/impl/src/main/templates/org/ajax4jsf/renderkit/html/link.jspx	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/templates/org/ajax4jsf/renderkit/html/link.jspx	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<f:root 
+	xmlns:f="http://jsf.exadel.com/template" 
+	xmlns:c=" http://java.sun.com/jsf/core" 
+	xmlns:ui=" http://jsf.exadel.com/ui"
+	xmlns:vcp=" http://jsf.exadel.com/vcp"
+	xmlns:u=" http://jsf.exadel.com/vcp"
+	xmlns:x=" http://jsf.exadel.com/vcp"
+	class="org.ajax4jsf.renderkit.html.CommandLinkRenderer"
+	baseclass="org.ajax4jsf.renderkit.AjaxCommandRendererBase"
+	component="org.ajax4jsf.ajax.UIAjaxCommandLink" 
+	xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0" >
+	<jsp:directive.page import="javax.faces.context.FacesContext,javax.faces.component.UIComponent"/>
+	<f:clientid var="clientId"/>	
+	<a
+		id="#{clientId}"
+		name="#{clientId}"
+		type="#{component.attributes['type']}"
+		x:passThruWithExclusions="value,name,onclick,type,href,id"
+		onclick="#{this:getOnClick(context,component)}"
+		href="#"
+		>
+		#{this:getValue(component)}
+		<vcp:body>
+		<f:call name="renderChildren" />
+		</vcp:body>
+	</a>
+
+</f:root>
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/main/templates/org/ajax4jsf/renderkit/html/log.jspx
===================================================================
--- branches/refactor1/framework/impl/src/main/templates/org/ajax4jsf/renderkit/html/log.jspx	                        (rev 0)
+++ branches/refactor1/framework/impl/src/main/templates/org/ajax4jsf/renderkit/html/log.jspx	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<f:root 
+	xmlns:f="http://jsf.exadel.com/template" 
+	xmlns:c=" http://java.sun.com/jsf/core" 
+	xmlns:ui=" http://jsf.exadel.com/ui"
+	xmlns:vcp=" http://jsf.exadel.com/vcp"
+	xmlns:u=" http://jsf.exadel.com/vcp"
+	xmlns:x=" http://jsf.exadel.com/vcp"
+	class="org.ajax4jsf.renderkit.html.LogRenderer"
+	baseclass="org.ajax4jsf.framework.renderer.AjaxComponentRendererBase"
+	component="org.ajax4jsf.ajax.UIAjaxLog" 
+	xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0" >
+	<jsp:directive.page import="javax.faces.context.FacesContext,javax.faces.component.UIComponent"/>
+	<f:clientid var="clientId"/>
+	<jsp:scriptlet> if(component.isPopup()){</jsp:scriptlet>
+	<script 
+		id="#{clientId}"
+		type="text/javascript"
+		>
+		LOG.registerPopup('#{component.hotkey}','#{component.name}',#{component.width},#{component.height},LOG.#{component.level});
+	</script>
+	<jsp:scriptlet>} else {</jsp:scriptlet>
+		<div id="logConsole"
+		x:style='width:#{component.width};height:#{component.height};overflow:auto;#{component.attributes["style"]}'
+		x:passThruWithExclusions="value,name,id,style"
+		>
+	<script type="text/javascript">
+		LOG.LEVEL = LOG.#{component.level};
+	</script>
+		</div>
+	<jsp:scriptlet> } </jsp:scriptlet>
+</f:root>
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/site/site.xml
===================================================================
--- branches/refactor1/framework/impl/src/site/site.xml	                        (rev 0)
+++ branches/refactor1/framework/impl/src/site/site.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<project name="JSF Components development kit">
+  <bannerLeft>
+    <name>JSF Components development kit</name>
+    <src>images/exadel_logo.jpg</src>
+    <href>http://ajax4jsf.org/cdk</href>
+  </bannerLeft>
+  <bannerRight>
+    <src>http://maven.apache.org/images/maven-small.gif</src>
+  </bannerRight>
+  <publishDate position="navigation-bottom" format="MM-dd-yy"/>
+  <body>
+    <links>
+      <item name="JSF" href="https://javaserverfaces.dev.java.net/" />
+      <item name="Maven 2" href="http://maven.apache.org/maven2/"/>
+    </links>
+
+     <menu ref="modules" />
+     <menu ref="reports" />
+  </body>
+</project>
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/test/java/org/ajax4jsf/cache/LRUMapCacheThreadedTest.java
===================================================================
--- branches/refactor1/framework/impl/src/test/java/org/ajax4jsf/cache/LRUMapCacheThreadedTest.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/test/java/org/ajax4jsf/cache/LRUMapCacheThreadedTest.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,82 @@
+/**
+ * 
+ */
+package org.ajax4jsf.cache;
+
+import java.util.Random;
+
+import junit.framework.TestCase;
+
+/**
+ * @author Nick - mailto:nbelaevski at exadel.com
+ * created 02.05.2007
+ * 
+ */
+public class LRUMapCacheThreadedTest extends TestCase {
+	private CacheLoader cacheLoader = new CacheLoader() {
+
+		public Object load(Object key, Object context) throws CacheException {
+			try {
+				Thread.sleep(new Random().nextInt(100) + 1);
+			} catch (InterruptedException e) {
+				// TODO Auto-generated catch block
+				e.printStackTrace();
+			}
+			return key;
+		}
+	};
+	
+	private static final int COUNT = 2000;
+	private static final int PASS_COUNT = 2;
+	
+
+	public void testCache() throws Exception {
+		long millis = System.currentTimeMillis();
+		
+		for (int k = 0; k < PASS_COUNT; k++) {
+			Cache cache = new LRUMapCache(cacheLoader, COUNT);
+			Thread[] threads = new Thread[COUNT];
+			
+			try {
+				for (int i = 0; i < COUNT; i++) {
+					threads[i] = new LRUMapCacheTestThread(cache, new Integer(new Random().nextInt(10)));
+					threads[i].start();
+				}
+			} catch (Exception e) {
+				e.printStackTrace();
+			}
+		
+			for (int i = 0; i < COUNT; i++) {
+				threads[i].join();
+			}
+		}
+
+		System.out.println((double) (System.currentTimeMillis() - millis) / PASS_COUNT);
+	}
+}
+
+class LRUMapCacheTestThread extends Thread {
+	private Cache cache;
+	private Integer idx;
+	
+	public LRUMapCacheTestThread(Cache cache, Integer idx) {
+		super();
+		this.cache = cache;
+		this.idx = idx;
+	}
+	
+	public void run() {
+		super.run();
+
+		try {
+			if (!idx.equals(cache.get(idx, null))) {
+				throw new IllegalStateException();
+			} else {
+			//	System.out.println("TestThread.run(): " + idx);
+			}
+		} catch (CacheException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+	}
+}
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/test/java/org/ajax4jsf/framework/ajax/xmlfilter/nekko/HtmlCorrectionFilterTestCase.java
===================================================================
--- branches/refactor1/framework/impl/src/test/java/org/ajax4jsf/framework/ajax/xmlfilter/nekko/HtmlCorrectionFilterTestCase.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/test/java/org/ajax4jsf/framework/ajax/xmlfilter/nekko/HtmlCorrectionFilterTestCase.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,447 @@
+/**
+ * 
+ */
+package org.ajax4jsf.framework.ajax.xmlfilter.nekko;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.apache.xerces.util.XMLAttributesImpl;
+import org.apache.xerces.xni.Augmentations;
+import org.apache.xerces.xni.NamespaceContext;
+import org.apache.xerces.xni.QName;
+import org.apache.xerces.xni.XMLAttributes;
+import org.apache.xerces.xni.XMLDocumentFragmentHandler;
+import org.apache.xerces.xni.XMLDocumentHandler;
+import org.apache.xerces.xni.XMLLocator;
+import org.apache.xerces.xni.XMLResourceIdentifier;
+import org.apache.xerces.xni.XMLString;
+import org.apache.xerces.xni.XNIException;
+import org.apache.xerces.xni.parser.XMLDocumentSource;
+import org.cyberneko.html.HTMLAugmentations;
+
+import junit.framework.TestCase;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class HtmlCorrectionFilterTestCase extends TestCase {
+    
+    private List elements;
+    private HtmlCorrectionFilter filter;
+
+    /* (non-Javadoc)
+     * @see junit.framework.TestCase#setUp()
+     */
+    protected void setUp() throws Exception {
+	super.setUp();
+	elements = new ArrayList();
+	filter = new HtmlCorrectionFilter();
+	filter.setDocumentHandler(new TestHandler());
+    }
+
+    /* (non-Javadoc)
+     * @see junit.framework.TestCase#tearDown()
+     */
+    protected void tearDown() throws Exception {
+	elements = null;
+	filter = null;
+	super.tearDown();	
+    }
+
+    private void startElement(String name){
+        QName element = new QName(null,name,name,null);
+	XMLAttributes attrs = new XMLAttributesImpl();
+	Augmentations augs = new HTMLAugmentations();
+	filter.startElement(element, attrs, augs);
+    }
+
+    private void endElement(String name){
+        QName element = new QName(null,name,name,null);
+	Augmentations augs = new HTMLAugmentations();
+	filter.endElement(element, augs);
+    }
+
+    private void emptyElement(String name){
+        QName element = new QName(null,name,name,null);
+	XMLAttributes attrs = new XMLAttributesImpl();
+	Augmentations augs = new HTMLAugmentations();
+	filter.emptyElement(element, attrs, augs);
+    }
+
+    
+    private void executeSequence(El[] seq){
+	for (int i=0; i<seq.length;i++) {
+	    El element = seq[i];
+	    switch (element.type) {
+	    case XNIElement.EMPTY:
+		emptyElement(element.name);
+		break;
+	    case XNIElement.START:
+		startElement(element.name);
+		break;
+	    case XNIElement.END:
+		endElement(element.name);
+		break;
+	    default:
+		break;
+	    }
+	}
+    }
+    
+    
+    private void assertSequence(El[] seq){
+	for (int i = 0; i < seq.length; i++) {
+	    assertFalse("Record less elements then expected",i>=elements.size());
+	    El element = (El) seq[i];
+	    XNIElement rec = (XNIElement) elements.get(i);
+	    assertEquals("at position "+i,element.type, rec.type);
+	    assertEquals("at position "+i,element.name, rec.element.localpart);
+	}
+    }
+    /**
+     * Test method for {@link org.ajax4jsf.framework.ajax.xmlfilter.nekko.HtmlCorrectionFilter#endElement(org.apache.xerces.xni.QName, org.apache.xerces.xni.Augmentations)}.
+     */
+    public void testEndElementQNameAugmentations() {
+	startElement("html");//0
+		startElement("body");
+			startElement("table");// 2
+				emptyElement("thead");
+				startElement("tbody"); //4
+					startElement("tr");
+						startElement("td");//6
+						endElement("td");
+					endElement("tr");//8
+				endElement("tbody");
+			endElement("table");//10
+		endElement("body");
+	endElement("html");//12
+	endElement("html");//overflow ?
+	
+	assertEquals(XNIElement.START, ((XNIElement)elements.get(0)).type);
+	assertEquals("html", ((XNIElement)elements.get(0)).element.rawname);
+	assertEquals(XNIElement.START, ((XNIElement)elements.get(1)).type);
+	assertEquals("body", ((XNIElement)elements.get(1)).element.rawname);
+	assertEquals(XNIElement.START, ((XNIElement)elements.get(2)).type);
+	assertEquals("table", ((XNIElement)elements.get(2)).element.rawname);
+	assertEquals(XNIElement.EMPTY, ((XNIElement)elements.get(3)).type);
+	assertEquals("thead", ((XNIElement)elements.get(3)).element.rawname);
+	assertEquals(XNIElement.START, ((XNIElement)elements.get(4)).type);
+	assertEquals("tbody", ((XNIElement)elements.get(4)).element.rawname);
+	assertEquals(XNIElement.START, ((XNIElement)elements.get(5)).type);
+	assertEquals("tr", ((XNIElement)elements.get(5)).element.rawname);
+	assertEquals(XNIElement.START, ((XNIElement)elements.get(6)).type);
+	assertEquals("td", ((XNIElement)elements.get(6)).element.rawname);
+	assertEquals(XNIElement.END, ((XNIElement)elements.get(7)).type);
+	assertEquals("td", ((XNIElement)elements.get(7)).element.rawname);
+	assertEquals(XNIElement.END, ((XNIElement)elements.get(8)).type);
+	assertEquals("tr", ((XNIElement)elements.get(8)).element.rawname);
+	assertEquals(XNIElement.END, ((XNIElement)elements.get(9)).type);
+	assertEquals("tbody", ((XNIElement)elements.get(9)).element.rawname);
+	assertEquals(XNIElement.END, ((XNIElement)elements.get(10)).type);
+	assertEquals("table", ((XNIElement)elements.get(10)).element.rawname);
+	assertEquals(XNIElement.END, ((XNIElement)elements.get(11)).type);
+	assertEquals("body", ((XNIElement)elements.get(11)).element.rawname);
+    }
+
+    public void testInsertTbody() {
+	startElement("html");//0
+		startElement("body");
+			startElement("table");// 2
+				emptyElement("thead");
+//				startElement("tbody"); //4
+					startElement("tr");
+						startElement("td");//6
+						endElement("td");
+					endElement("tr");//8
+//				endElement("tbody");
+			endElement("table");//10
+		endElement("body");
+	endElement("html");//12
+	endElement("html");//overflow ?
+	
+	assertEquals(XNIElement.START, ((XNIElement)elements.get(0)).type);
+	assertEquals("html", ((XNIElement)elements.get(0)).element.rawname);
+	assertEquals(XNIElement.START, ((XNIElement)elements.get(1)).type);
+	assertEquals("body", ((XNIElement)elements.get(1)).element.rawname);
+	assertEquals(XNIElement.START, ((XNIElement)elements.get(2)).type);
+	assertEquals("table", ((XNIElement)elements.get(2)).element.rawname);
+	assertEquals(XNIElement.EMPTY, ((XNIElement)elements.get(3)).type);
+	assertEquals("thead", ((XNIElement)elements.get(3)).element.rawname);
+	assertEquals(XNIElement.START, ((XNIElement)elements.get(4)).type);
+	assertEquals("tbody", ((XNIElement)elements.get(4)).element.rawname);
+	assertEquals(XNIElement.START, ((XNIElement)elements.get(5)).type);
+	assertEquals("tr", ((XNIElement)elements.get(5)).element.rawname);
+	assertEquals(XNIElement.START, ((XNIElement)elements.get(6)).type);
+	assertEquals("td", ((XNIElement)elements.get(6)).element.rawname);
+	assertEquals(XNIElement.END, ((XNIElement)elements.get(7)).type);
+	assertEquals("td", ((XNIElement)elements.get(7)).element.rawname);
+	assertEquals(XNIElement.END, ((XNIElement)elements.get(8)).type);
+	assertEquals("tr", ((XNIElement)elements.get(8)).element.rawname);
+	assertEquals(XNIElement.END, ((XNIElement)elements.get(9)).type);
+	assertEquals("tbody", ((XNIElement)elements.get(9)).element.rawname);
+	assertEquals(XNIElement.END, ((XNIElement)elements.get(10)).type);
+	assertEquals("table", ((XNIElement)elements.get(10)).element.rawname);
+	assertEquals(XNIElement.END, ((XNIElement)elements.get(11)).type);
+	assertEquals("body", ((XNIElement)elements.get(11)).element.rawname);
+    }
+    
+    
+    public void testEnclosedTables() throws Exception {
+	El[] exec = {
+		new El("html",1),
+		new El("table",1),
+		 new El("tbody",1),
+		  new El("tr",1),
+		   new El("td",1),
+		    new El("table",1),
+		     new El("tr",1),
+		      new El("td",1),
+		      new El("td",2),
+		     new El("tr",2),
+		    new El("table",2),
+		   new El("td",2),
+		  new El("tr",2),
+		 new El("tbody",2),
+		new El("table",2),
+		new El("html",2)
+	};
+	executeSequence(exec);
+	El[] expect = {
+		new El("html",1),
+		new El("table",1),
+		 new El("tbody",1),
+		  new El("tr",1),
+		   new El("td",1),
+		    new El("table",1),
+			 new El("tbody",1),
+		     new El("tr",1),
+		      new El("td",1),
+		      new El("td",2),
+		     new El("tr",2),
+			 new El("tbody",2),
+		    new El("table",2),
+		   new El("td",2),
+		  new El("tr",2),
+		 new El("tbody",2),
+		new El("table",2),
+		new El("html",2)
+	};
+	assertSequence(expect);
+    }
+
+    public void testEnclosedTwoTables() throws Exception {
+	El[] exec = {
+		new El("html",1),
+		new El("table",1),
+		 new El("tbody",1),
+		  new El("tr",1),
+		   new El("td",1),
+		    new El("table",1),
+		     new El("tr",1),
+		      new El("td",1),
+			    new El("table",1),
+			     new El("tr",1),
+			      new El("td",1),
+			      new El("td",2),
+			     new El("tr",2),
+			    new El("table",2),
+		      new El("td",2),
+		     new El("tr",2),
+		    new El("table",2),
+		   new El("td",2),
+		  new El("tr",2),
+		 new El("tbody",2),
+		new El("table",2),
+		new El("html",2)
+	};
+	executeSequence(exec);
+	El[] expect = {
+		new El("html",1),
+		new El("table",1),
+		 new El("tbody",1),
+		  new El("tr",1),
+		   new El("td",1),
+		    new El("table",1),
+			 new El("tbody",1),
+		     new El("tr",1),
+		      new El("td",1),
+			    new El("table",1),
+				 new El("tbody",1),
+			     new El("tr",1),
+			      new El("td",1),
+			      new El("td",2),
+			     new El("tr",2),
+				 new El("tbody",2),
+			    new El("table",2),
+		      new El("td",2),
+		     new El("tr",2),
+			 new El("tbody",2),
+		    new El("table",2),
+		   new El("td",2),
+		  new El("tr",2),
+		 new El("tbody",2),
+		new El("table",2),
+		new El("html",2)
+	};
+	assertSequence(expect);
+    }
+    /**
+     * Test method for {@link org.ajax4jsf.framework.ajax.xmlfilter.nekko.HtmlCorrectionFilter#startElement(org.apache.xerces.xni.QName, org.apache.xerces.xni.XMLAttributes, org.apache.xerces.xni.Augmentations)}.
+     */
+//    public void testResVoid() {
+//	fail("Not yet implemented");
+//    }
+
+    private class TestHandler implements XMLDocumentHandler{
+
+	public void characters(XMLString text, Augmentations augmentations)
+		throws XNIException {
+	    // TODO Auto-generated method stub
+	    
+	}
+
+	public void comment(XMLString text, Augmentations augmentations)
+		throws XNIException {
+	    // TODO Auto-generated method stub
+	    
+	}
+
+	public void emptyElement(QName element, XMLAttributes attributes,
+		Augmentations augmentations) throws XNIException {
+	    elements.add(new XNIElement(element,XNIElement.EMPTY));
+	    
+	}
+
+	public void endCDATA(Augmentations augmentations) throws XNIException {
+	    // TODO Auto-generated method stub
+	    
+	}
+
+	public void endDocumentFragment(Augmentations augmentations)
+		throws XNIException {
+	    // TODO Auto-generated method stub
+	    
+	}
+
+	public void endElement(QName element, Augmentations augmentations)
+		throws XNIException {
+	    elements.add(new XNIElement(element,XNIElement.END));
+	    
+	}
+
+	public void endGeneralEntity(String name, Augmentations augmentations)
+		throws XNIException {
+	    // TODO Auto-generated method stub
+	    
+	}
+
+	public void ignorableWhitespace(XMLString text,
+		Augmentations augmentations) throws XNIException {
+	    // TODO Auto-generated method stub
+	    
+	}
+
+	public void processingInstruction(String target, XMLString data,
+		Augmentations augmentations) throws XNIException {
+	    // TODO Auto-generated method stub
+	    
+	}
+
+	public void startCDATA(Augmentations augmentations) throws XNIException {
+	    // TODO Auto-generated method stub
+	    
+	}
+
+	public void startDocumentFragment(XMLLocator locator,
+		NamespaceContext namespaceContext, Augmentations augmentations)
+		throws XNIException {
+	    // TODO Auto-generated method stub
+	    
+	}
+
+	public void startElement(QName element, XMLAttributes attributes,
+		Augmentations augmentations) throws XNIException {
+	    elements.add(new XNIElement(element,XNIElement.START));
+	    
+	}
+
+	public void startGeneralEntity(String name,
+		XMLResourceIdentifier identifier, String encoding,
+		Augmentations augmentations) throws XNIException {
+	    // TODO Auto-generated method stub
+	    
+	}
+
+	public void textDecl(String version, String encoding,
+		Augmentations augmentations) throws XNIException {
+	    // TODO Auto-generated method stub
+	    
+	}
+
+	public void doctypeDecl(String rootElement, String publicId,
+		String systemId, Augmentations augs) throws XNIException {
+	    // TODO Auto-generated method stub
+	    
+	}
+
+	public void endDocument(Augmentations augs) throws XNIException {
+	    // TODO Auto-generated method stub
+	    
+	}
+
+	public XMLDocumentSource getDocumentSource() {
+	    // TODO Auto-generated method stub
+	    return null;
+	}
+
+	public void setDocumentSource(XMLDocumentSource source) {
+	    // TODO Auto-generated method stub
+	    
+	}
+
+	public void startDocument(XMLLocator locator, String encoding,
+		NamespaceContext namespaceContext, Augmentations augs)
+		throws XNIException {
+	    // TODO Auto-generated method stub
+	    
+	}
+
+	public void xmlDecl(String version, String encoding, String standalone,
+		Augmentations augs) throws XNIException {
+	    // TODO Auto-generated method stub
+	    
+	}
+	
+    }
+    
+    private static class XNIElement {
+	static final int EMPTY=0;
+	static final int START=1;
+	static final int END=2;
+	QName element;
+	int type;
+	public XNIElement(QName element, int type) {
+	    super();
+	    this.element = element;
+	    this.type = type;
+	}
+	
+    }
+    
+    private static class El{
+	String name;
+	int type;
+	/**
+	 * @param name
+	 * @param type
+	 */
+	public El(String name, int type) {
+	    this.name = name;
+	    this.type = type;
+	}
+	
+    }
+}

Added: branches/refactor1/framework/impl/src/test/java/org/ajax4jsf/framework/util/javascript/ScriptUtilsTest.java
===================================================================
--- branches/refactor1/framework/impl/src/test/java/org/ajax4jsf/framework/util/javascript/ScriptUtilsTest.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/test/java/org/ajax4jsf/framework/util/javascript/ScriptUtilsTest.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,216 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.framework.util.javascript;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeMap;
+import java.util.TreeSet;
+
+import junit.framework.TestCase;
+
+/**
+ * @author shura
+ *
+ */
+public class ScriptUtilsTest extends TestCase {
+
+	/**
+	 * @author shura
+	 *
+	 */
+	public static class Bean {
+		
+		int _integer;
+		boolean _bool;
+		Object _foo;
+		
+		/**
+		 * 
+		 */
+		public Bean() {
+		}
+		/**
+		 * @param ineger
+		 * @param bool
+		 * @param foo
+		 */
+		public Bean(int ineger, boolean bool, Object foo) {
+			this._integer = ineger;
+			this._bool = bool;
+			this._foo = foo;
+		}
+		/**
+		 * @return the bool
+		 */
+		public boolean isBool() {
+			return this._bool;
+		}
+		/**
+		 * @param bool the bool to set
+		 */
+		public void setBool(boolean bool) {
+			this._bool = bool;
+		}
+		/**
+		 * @return the ineger
+		 */
+		public int getInteger() {
+			return this._integer;
+		}
+		/**
+		 * @param ineger the ineger to set
+		 */
+		public void setInteger(int ineger) {
+			this._integer = ineger;
+		}
+		/**
+		 * @return the foo
+		 */
+		public Object getFoo() {
+			return this._foo;
+		}
+		/**
+		 * @param foo the foo to set
+		 */
+		public void setFoo(Object foo) {
+			this._foo = foo;
+		}
+
+	}
+
+	/**
+	 * @param name
+	 */
+	public ScriptUtilsTest(String name) {
+		super(name);
+	}
+
+	/**
+	 * Test method for {@link org.ajax4jsf.framework.util.javascript.ScriptUtils#toScript(java.lang.Object)}.
+	 */
+	public void testStringToScript() {
+		Object obj = "foo";
+		assertEquals("'foo'", ScriptUtils.toScript(obj));
+	}
+
+	/**
+	 * Test method for {@link org.ajax4jsf.framework.util.javascript.ScriptUtils#toScript(java.lang.Object)}.
+	 */
+	public void testArrayToScript() {
+		int[] obj = {1,2,3,4,5};
+		assertEquals("[1,2,3,4,5] ", ScriptUtils.toScript(obj));
+	}
+	/**
+	 * Test method for {@link org.ajax4jsf.framework.util.javascript.ScriptUtils#toScript(java.lang.Object)}.
+	 */
+	public void testTwoDimentionalArrayToScript() {
+		int[][] obj = {{1,2},{3,4}};
+		assertEquals("[[1,2] ,[3,4] ] ", ScriptUtils.toScript(obj));
+	}
+
+	/**
+	 * Test method for {@link org.ajax4jsf.framework.util.javascript.ScriptUtils#toScript(java.lang.Object)}.
+	 */
+	public void testTwoDimentionalStringArrayToScript() {
+		String[][] obj = {{"one","two"},{"three","four"}};
+		assertEquals("[['one','two'] ,['three','four'] ] ", ScriptUtils.toScript(obj));
+		Map map = new TreeMap();
+		map.put("a", obj);
+		map.put("b", "c");
+		assertEquals("{'a':[['one','two'] ,['three','four'] ] ,'b':'c'} ", ScriptUtils.toScript(map));
+	}
+	/**
+	 * Test method for {@link org.ajax4jsf.framework.util.javascript.ScriptUtils#toScript(java.lang.Object)}.
+	 */
+	public void testListToScript() {
+		List obj = new ArrayList();
+		obj.add(new Integer(1));
+		obj.add(new Integer(2));
+		obj.add(new Integer(3));
+		obj.add(new Integer(4));
+		obj.add(new Integer(5));
+		assertEquals("[1,2,3,4,5] ", ScriptUtils.toScript(obj));
+	}
+
+	/**
+	 * Test method for {@link org.ajax4jsf.framework.util.javascript.ScriptUtils#toScript(java.lang.Object)}.
+	 */
+	public void testSetToScript() {
+		Set obj = new TreeSet();
+		obj.add(new Integer(1));
+		obj.add(new Integer(2));
+		obj.add(new Integer(3));
+		obj.add(new Integer(4));
+		obj.add(new Integer(5));
+		assertEquals("[1,2,3,4,5] ", ScriptUtils.toScript(obj));
+	}
+	/**
+	 * Test method for {@link org.ajax4jsf.framework.util.javascript.ScriptUtils#toScript(java.lang.Object)}.
+	 */
+	public void testObjectArrayToScript() {
+		Bean[] obj = {new Bean(1,true,"foo"),new Bean(2,false,"bar")};
+		assertEquals("[{'bool':true,'foo':'foo',\'integer\':1} ,{'bool':false,'foo':'bar','integer':2} ] ", ScriptUtils.toScript(obj));
+	}
+
+	/**
+	 * Test method for {@link org.ajax4jsf.framework.util.javascript.ScriptUtils#toScript(java.lang.Object)}.
+	 */
+	public void testObjectListToScript() {
+		Bean[] array = {new Bean(1,true,"foo"),new Bean(2,false,"bar")};
+		List obj = Arrays.asList(array);
+		assertEquals("[{'bool':true,'foo':'foo',\'integer\':1} ,{'bool':false,'foo':'bar','integer':2} ] ", ScriptUtils.toScript(obj));
+	}
+	
+	/**
+	 * Test method for {@link org.ajax4jsf.framework.util.javascript.ScriptUtils#toScript(java.lang.Object)}.
+	 */
+	public void testMapToScript() {
+		TreeMap obj = new TreeMap();
+		obj.put("a", "foo");
+		obj.put("b", "bar");
+		obj.put("c", "baz");
+		assertEquals("{'a':'foo','b':'bar','c':'baz'} ", ScriptUtils.toScript(obj));
+	}
+	/**
+	 * Test method for {@link org.ajax4jsf.framework.util.javascript.ScriptUtils#addEncodedString(java.lang.StringBuffer, java.lang.Object)}.
+	 */
+	public void testAddEncodedString() {
+		StringBuffer buff = new StringBuffer();
+		ScriptUtils.addEncodedString(buff, "foo");
+		assertEquals("'foo'", buff.toString());
+	}
+
+	/**
+	 * Test method for {@link org.ajax4jsf.framework.util.javascript.ScriptUtils#addEncoded(java.lang.StringBuffer, java.lang.Object)}.
+	 */
+	public void testAddEncoded() {
+		StringBuffer buff = new StringBuffer();
+		ScriptUtils.addEncoded(buff, "foo\"\'");
+		assertEquals("foo\\\"\\\'", buff.toString());
+	}
+
+	
+}

Added: branches/refactor1/framework/impl/src/test/java/org/ajax4jsf/io/parser/AllParsingTests.java
===================================================================
--- branches/refactor1/framework/impl/src/test/java/org/ajax4jsf/io/parser/AllParsingTests.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/test/java/org/ajax4jsf/io/parser/AllParsingTests.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,38 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.io.parser;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+public class AllParsingTests {
+
+	public static Test suite() {
+		TestSuite suite = new TestSuite("Test for org.ajax4jsf.io.parser");
+		//$JUnit-BEGIN$
+		suite.addTestSuite(ParsingTest.class);
+		suite.addTestSuite(FastParserTest.class);
+		//$JUnit-END$
+		return suite;
+	}
+
+}

Added: branches/refactor1/framework/impl/src/test/java/org/ajax4jsf/io/parser/FastParserTest.java
===================================================================
--- branches/refactor1/framework/impl/src/test/java/org/ajax4jsf/io/parser/FastParserTest.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/test/java/org/ajax4jsf/io/parser/FastParserTest.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,144 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.io.parser;
+
+import java.io.IOException;
+import java.io.StringReader;
+import java.io.StringWriter;
+import java.util.HashSet;
+import java.util.Set;
+
+import junit.framework.TestCase;
+
+public class FastParserTest extends TestCase {
+
+	
+	/*
+	 * Test method for 'org.ajax4jsf.io.parser.FastHtmlParser.parse(Reader, Writer)'
+	 */
+	public void testParse() {
+
+		String toParse="<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n" + 
+		"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" + 
+		"<!-- Test for page comment -->\n" + 
+//		"<f:view  contentType=\"application/xhtml+xml\" \n" + 
+//		"    xmlns:f=\"http://java.sun.com/jsf/core\"\n" + 
+//		"	xmlns:h=\"http://java.sun.com/jsf/html\" \n" + 
+//		"	xmlns:a4j=\"https://ajax4jsf.dev.java.net/ajax\" >\n" + 
+		"<html xmlns=\"http://www.w3.org/1999/xhtml\" >\n" + 
+		"<body>";
+		String resultString = parseString(toParse);
+		int indexOf = resultString.indexOf("<html");
+		assertTrue(indexOf>=0);
+		int indexOf2 = resultString.indexOf("<head>");
+		assertTrue(indexOf2>=0);
+		assertTrue(indexOf2>indexOf);
+		int indexOf3 = resultString.indexOf("</head>");
+		assertTrue(indexOf3>=0);
+		assertTrue(indexOf3>indexOf2);
+	}
+
+	public void testParseWithHead() {
+
+		String toParse="<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n" + 
+		"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" + 
+		"<!-- Test for page comment -->\n" + 
+		"<html xmlns=\"http://www.w3.org/1999/xhtml\" ><head></head>\n" + 
+		"<body>";
+		String resultString = parseString(toParse);
+		assertTrue(resultString.indexOf("<html")>=0);
+		assertTrue(resultString.indexOf("<head>")>0);
+		assertTrue(resultString.indexOf("</head>")>0);
+		assertTrue(resultString.indexOf("<head>")==resultString.lastIndexOf("<head>"));
+		assertTrue(resultString.indexOf("</head>")==resultString.lastIndexOf("</head>"));
+	}
+
+	public void testParseWithHeadTitle() {
+
+		String toParse="<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n" + 
+		"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" + 
+		"<!-- Test for page comment -->\n" + 
+		"<html xmlns=\"http://www.w3.org/1999/xhtml\" ><head><title>Title</title></head>\n" + 
+		"<body>";
+		String resultString = parseString(toParse);
+		assertTrue(resultString.indexOf("<html")>=0);
+		assertTrue(resultString.indexOf("<head>")>0);
+		assertTrue(resultString.indexOf("</head>")>0);
+		assertTrue(resultString.indexOf("<script")>0);
+		assertTrue(resultString.indexOf("</script>")>0);
+		assertTrue(resultString.indexOf("<head>")==resultString.lastIndexOf("<head>"));
+		assertTrue(resultString.indexOf("</head>")==resultString.lastIndexOf("</head>"));
+		assertTrue(resultString.indexOf("<head>")<resultString.lastIndexOf("<title>"));
+		assertTrue(resultString.indexOf("<title>")<resultString.lastIndexOf("<script"));
+		assertTrue(resultString.indexOf("<title>")<resultString.lastIndexOf("<link"));
+		assertTrue(resultString.indexOf("</head>")>resultString.lastIndexOf("</script"));
+		assertTrue(resultString.indexOf("</head>")>resultString.lastIndexOf("<link"));
+	}
+
+	public void testParseWithHeadTitleMeta() {
+
+		String toParse="<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n" + 
+		"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" + 
+		"<!-- Test for page comment -->\n" + 
+		"<html xmlns=\"http://www.w3.org/1999/xhtml\" ><head><title>Title</title><meta name='xxx' content='yyy'/> </head>\n" + 
+		"<body>";
+		String resultString = parseString(toParse);
+		assertTrue(resultString.indexOf("<html")>=0);
+		assertTrue(resultString.indexOf("<head>")>0);
+		assertTrue(resultString.indexOf("</head>")>0);
+		assertTrue(resultString.indexOf("<script")>0);
+		assertTrue(resultString.indexOf("</script>")>0);
+		assertTrue(resultString.indexOf("<head>")==resultString.lastIndexOf("<head>"));
+		assertTrue(resultString.indexOf("</head>")==resultString.lastIndexOf("</head>"));
+		assertTrue(resultString.indexOf("<head>")<resultString.lastIndexOf("<title>"));
+		assertTrue(resultString.indexOf("<title>")<resultString.lastIndexOf("<script"));
+		assertTrue(resultString.indexOf("<title>")<resultString.lastIndexOf("<link"));
+		assertTrue(resultString.indexOf("</head>")>resultString.lastIndexOf("</script"));
+		assertTrue(resultString.indexOf("</head>")>resultString.lastIndexOf("<link"));
+		assertTrue(resultString.indexOf("<meta")>resultString.lastIndexOf("</script"));
+		assertTrue(resultString.indexOf("<meta")>resultString.lastIndexOf("<link"));
+	}
+	
+	/**
+	 * @param toParse
+	 * @return
+	 */
+	private String parseString(String toParse) {
+		FastHtmlParser parser = new FastHtmlParser();
+		StringReader in = new StringReader(toParse);
+		StringWriter out = new StringWriter();
+		Set scripts = new HashSet();
+		scripts.add("/some/script.js");
+		parser.setScripts(scripts);
+		parser.setStyles(scripts);
+		try {
+			parser.parse(in,out);
+		} catch (IOException e) {
+			assertFalse("Exception in parsing",true);
+			e.printStackTrace();
+		}
+		String resultString = out.toString();
+		System.out.println(resultString);
+		return resultString;
+	}
+
+}

Added: branches/refactor1/framework/impl/src/test/java/org/ajax4jsf/io/parser/ParsingTest.java
===================================================================
--- branches/refactor1/framework/impl/src/test/java/org/ajax4jsf/io/parser/ParsingTest.java	                        (rev 0)
+++ branches/refactor1/framework/impl/src/test/java/org/ajax4jsf/io/parser/ParsingTest.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,193 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.ajax4jsf.io.parser;
+
+import java.io.IOException;
+import java.io.StringWriter;
+
+import junit.framework.TestCase;
+
+public class ParsingTest extends TestCase {
+	
+	ParserState initialState;
+	ParsingStateManager instance;
+	StringWriter out;
+
+	protected void setUp() throws Exception {
+		super.setUp();
+        instance = ParsingStateManager.getInstance();
+		initialState = instance.getInitialState();
+	}
+
+	protected void tearDown() throws Exception {
+		super.tearDown();
+	}
+
+	protected ParserState parseString(String toParse) {
+		char[] buff = toParse.toCharArray();
+        out = new StringWriter();
+		ParsingContext context = new ParsingContext(out);
+		context.setBaseState(initialState);
+		ParserState state = initialState;
+		for (int i = 0; i < buff.length; i++) {
+			char c = buff[i];
+			state = state.getNextState(c,context);
+			try {
+				state.send(c,context);
+			} catch (IOException e) {
+				assertTrue("Exception on send char",false);
+				e.printStackTrace();
+			}
+		}
+		try {
+			context.send();
+		} catch (IOException e) {
+			assertTrue("Exception on send char",false);
+			e.printStackTrace();
+		}
+		return state;
+	}
+	/*
+	 * Test method for 'org.ajax4jsf.io.parser.ParsingStateManager.getInitialState()'
+	 */
+	public void testGetInitialState() {
+		assertSame(initialState,instance.DOCUMENT);
+	}
+	
+	public void testParseLt(){
+		ParserState state = parseString(" <");
+		assertSame(state,instance.LT);
+		state = parseString(" < ");
+		assertSame(state,instance.DOCUMENT);
+	}
+
+	public void testParsePI(){
+		ParserState state = parseString("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>");
+		assertSame(state,instance.PIEND);
+		state = parseString("<?xml version=\"1.0\" encoding=\"UTF-8\" ?> ");
+		assertSame(state,instance.DOCUMENT);
+		state = parseString("<?xml version=\"1.0\" encoding=\"UTF-8\" ? ");
+		assertSame(state,instance.PI);
+	}
+
+	public void testParseDOCTYPE(){
+		ParserState state = parseString("<!DOC ");
+		assertSame(state,instance.DOCUMENT);
+		state = parseString("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">");
+		assertSame(state,instance.DOCTYPEEND);
+		state = parseString("<!DOCTYPE html <");
+		assertSame(state,instance.DOCTYPE);
+		state = parseString("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"> ");
+		assertSame(state,instance.DOCUMENT);
+	}
+
+	public void testParseCDATA(){
+		ParserState state = parseString("<![CDATA []]>");
+		assertSame(state,instance.DOCUMENT);
+		state = parseString("<![CDATA[]]>");
+		assertSame(state,instance.CDATAEND);
+		state = parseString("<![CDATA[ ] ]>");
+		assertSame(state,instance.CDATA);
+		state = parseString("<![CDATA[<?xml <!DOCTYPE html  ]]> ");
+		assertSame(state,instance.DOCUMENT);
+	}
+
+	public void testParseComment(){
+		ParserState state = parseString("<!-- -->");
+		assertSame(state,instance.COMMENTEND);
+		state = parseString("<!-- --> ");
+		assertSame(state,instance.DOCUMENT);
+		state = parseString("<!-- -- >");
+		assertSame(state,instance.COMMENT);
+		state = parseString("<!- - -->");
+		assertSame(state,instance.DOCUMENT);
+	}
+
+	public void testParseElement(){
+		ParserState state = parseString("<foo -->");
+		assertSame(state,instance.ENDELEMENT);
+		state = parseString("<foo   ");
+		assertSame(state,instance.INELEMENT);
+		state = parseString("<foo --");
+		assertSame(state,instance.INELEMENTCONTENT);
+		state = parseString("<foo x='<!-- ");
+		assertSame(state,instance.COMMENT_ELEMENT);
+		state = parseString("<foo x='<![CDATA[ ] ]> ");
+		assertSame(state,instance.CDATA_ELEMENT);
+		state = parseString("<foo x='<![CDATA[ ]]>' <!-- --> >");
+		assertSame(state,instance.ENDELEMENT);
+	}
+
+	public void testParseHtml0(){
+		ParserState state = parseString("<html -->");
+		assertSame(state,instance.ENDELEMENT);
+	}
+		public void testParseHtml1(){
+		ParserState state = parseString("<htmlfo");
+		assertSame(state,instance.ELEMENT);
+		}
+		public void testParseHtml2(){
+		ParserState state = parseString("<htm");
+		assertSame(state,instance.HTML);
+		}
+		public void testParseHtml3(){
+		ParserState state = parseString("<html x='<!-- ");
+		assertSame(state,instance.COMMENT_ELEMENT);
+		}
+		public void testParseHtml4(){
+		ParserState state = parseString("<html x='<![CDATA[ ] ]> ");
+		assertSame(state,instance.CDATA_ELEMENT);
+		}
+		public void testParseHtml5(){
+		ParserState state = parseString("<html x='<![CDATA[ ]]>' <!-- --> >");
+		assertSame(state,instance.ENDELEMENT);
+	}
+	
+		public void testParseHtml6(){
+			ParserState state = parseString("<html --><");
+			assertSame(state,instance.LT);
+		}
+		
+		
+	public void testSendParsed(){
+		String toParse;
+		ParserState state;
+		toParse="xxx";
+		state = parseString(toParse);
+		assertEquals(toParse,out.toString());
+		toParse="<xxx";
+		state = parseString(toParse);
+		assertEquals(toParse,out.toString());
+		assertSame(state, instance.ELEMENT);
+		toParse="<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n" + 
+				"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" + 
+				"<!-- Test for page comment -->\n" + 
+				"<f:view  contentType=\"application/xhtml+xml\" \n" + 
+				"    xmlns:f=\"http://java.sun.com/jsf/core\"\n" + 
+				"	xmlns:h=\"http://java.sun.com/jsf/html\" \n" + 
+				"	xmlns:a4j=\"https://ajax4jsf.dev.java.net/ajax\" >\n" + 
+				"<html xmlns=\"http://www.w3.org/1999/xhtml\" >\n" + 
+				"<body>";
+		state = parseString(toParse);
+		assertEquals(toParse,out.toString());
+	}
+}

Added: branches/refactor1/framework/impl/src/test/resources/META-INF/skins/DEFAULT.skin.properties
===================================================================
--- branches/refactor1/framework/impl/src/test/resources/META-INF/skins/DEFAULT.skin.properties	                        (rev 0)
+++ branches/refactor1/framework/impl/src/test/resources/META-INF/skins/DEFAULT.skin.properties	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,11 @@
+customFormColor=#F5F0E7
+a=default
+
+b=&a
+
+c=&b
+
+x=xxx
+
+y=&x
+

Added: branches/refactor1/framework/impl/src/test/resources/META-INF/skins/cyclic.skin.properties
===================================================================
--- branches/refactor1/framework/impl/src/test/resources/META-INF/skins/cyclic.skin.properties	                        (rev 0)
+++ branches/refactor1/framework/impl/src/test/resources/META-INF/skins/cyclic.skin.properties	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,4 @@
+base.property=base.string
+
+x=&x
+

Added: branches/refactor1/framework/impl/src/test/resources/META-INF/skins/noref.skin.properties
===================================================================
--- branches/refactor1/framework/impl/src/test/resources/META-INF/skins/noref.skin.properties	                        (rev 0)
+++ branches/refactor1/framework/impl/src/test/resources/META-INF/skins/noref.skin.properties	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,4 @@
+base.property=base.string
+
+x=&z
+

Added: branches/refactor1/framework/impl/src/test/resources/META-INF/skins/style.skin.properties
===================================================================
--- branches/refactor1/framework/impl/src/test/resources/META-INF/skins/style.skin.properties	                        (rev 0)
+++ branches/refactor1/framework/impl/src/test/resources/META-INF/skins/style.skin.properties	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,3 @@
+generalStyleSheet=resource\://skin/style.xcss
+intermediateTextColor=&customFormColor
+generalTextColor=&intermediateTextColor
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/test/resources/META-INF/skins/test.skin.properties
===================================================================
--- branches/refactor1/framework/impl/src/test/resources/META-INF/skins/test.skin.properties	                        (rev 0)
+++ branches/refactor1/framework/impl/src/test/resources/META-INF/skins/test.skin.properties	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,4 @@
+base.property=base.string
+
+x=yyy
+

Added: branches/refactor1/framework/impl/src/test/resources/bindedtest.skin.properties
===================================================================
--- branches/refactor1/framework/impl/src/test/resources/bindedtest.skin.properties	                        (rev 0)
+++ branches/refactor1/framework/impl/src/test/resources/bindedtest.skin.properties	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,4 @@
+render.kit=TEST
+string.property=bindedstring
+int.property=10
+bind.property=\#{test.bean}

Added: branches/refactor1/framework/impl/src/test/resources/log4j.xml
===================================================================
--- branches/refactor1/framework/impl/src/test/resources/log4j.xml	                        (rev 0)
+++ branches/refactor1/framework/impl/src/test/resources/log4j.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!DOCTYPE log4j:configuration SYSTEM "file:///eclipse/dtdcache/log4j.dtd">
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
+
+    <!-- This is a sample configuration for log4j.
+         It simply just logs everything into a single
+         log file.
+         Note, that you can use properties for value substitution.
+    -->
+    <appender name="DEFAULT" class="org.apache.log4j.ConsoleAppender">
+        <layout class="org.apache.log4j.PatternLayout">
+            <param name="ConversionPattern" value="%t %-5p %c{2} - %m:%n"/>
+        </layout>	    
+    </appender>
+
+<!-- 
+    <appender name="FACES" class="org.apache.log4j.ConsoleAppender">
+        <layout class="org.apache.log4j.PatternLayout">
+            <param name="ConversionPattern" value="%t %-5p %c{2} - %m:%n"/>
+        </layout>	    
+    </appender>
+
+    <appender name="CHAMELEON" class="org.apache.log4j.ConsoleAppender">
+        <layout class="org.apache.log4j.PatternLayout">
+            <param name="ConversionPattern" value="%t %-5p %c{2} - %m:%n"/>
+        </layout>	    
+    </appender>
+ -->
+     <category name="com.sun.faces">
+         <priority value="DEBUG" />
+         <appender-ref ref="DEFAULT"/>
+     </category>    
+    
+     <category name="org.apache.myfaces">
+         <priority value="DEBUG" />
+         <appender-ref ref="DEFAULT"/>
+     </category>    
+
+     <category name="javax.faces">
+         <priority value="INFO" />
+         <appender-ref ref="DEFAULT"/>
+     </category>
+    
+     <category name="faces">
+         <priority value="INFO" />
+         <appender-ref ref="DEFAULT"/>
+     </category>    
+        
+     <category name="com.exadel.vcp">
+         <priority value="DEBUG" />
+         <appender-ref ref="DEFAULT"/>
+     </category>    
+
+        
+     <category name="org.ajax4jsf">
+         <priority value="DEBUG" />
+         <appender-ref ref="DEFAULT"/>
+     </category>    
+
+       <!-- 
+    <root>
+      <priority value ="info" />
+      <appender-ref ref="DEFAULT" />
+    </root>
+     -->
+</log4j:configuration>

Added: branches/refactor1/framework/impl/src/test/resources/oscache.properties
===================================================================
--- branches/refactor1/framework/impl/src/test/resources/oscache.properties	                        (rev 0)
+++ branches/refactor1/framework/impl/src/test/resources/oscache.properties	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,2 @@
+cache.memory true
+cache.capacity 15
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/test/resources/placeholder.txt
===================================================================
--- branches/refactor1/framework/impl/src/test/resources/placeholder.txt	                        (rev 0)
+++ branches/refactor1/framework/impl/src/test/resources/placeholder.txt	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1 @@
+Test Cases for framework
\ No newline at end of file

Added: branches/refactor1/framework/impl/src/test/resources/test.skin.properties
===================================================================
--- branches/refactor1/framework/impl/src/test/resources/test.skin.properties	                        (rev 0)
+++ branches/refactor1/framework/impl/src/test/resources/test.skin.properties	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,6 @@
+string.property=string
+
+int.property=10
+
+bind.property=\#{test.bean}
+

Added: branches/refactor1/framework/impl/src/test/resources/test.web.root
===================================================================

Added: branches/refactor1/samples/ajaxPortlet/.exadelproject
===================================================================
--- branches/refactor1/samples/ajaxPortlet/.exadelproject	                        (rev 0)
+++ branches/refactor1/samples/ajaxPortlet/.exadelproject	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<FILESYSTEMS APPLICATION_NAME="portalAjaxSample" ENTITY="FileSystems"
+ VERSION="8.0.4" WORKSPACE_HOME="./resources/WEB-INF">
+ <FILESYSTEM ENTITY="FileSystemFolder" LOCATION="%exadel.workspace%" NAME="WEB-INF"/>
+ <FILESYSTEM ENTITY="FileSystemFolder" INFO="Content-Type=Web"
+  LOCATION="%exadel.workspace%/.." NAME="WEB-ROOT"/>
+ <FILESYSTEM ENTITY="FileSystemFolder"
+  LOCATION="%exadel.workspace%/../../src" NAME="src"/>
+ <FILESYSTEM ENTITY="FileSystemFolder"
+  LOCATION="%exadel.eclipse.project%" NAME="ajaxPortlet"/>
+ <FILESYSTEM ENTITY="FileSystemFolder" LOCATION="%exadel.workspace%/lib" NAME="lib"/>
+ <FILESYSTEM ENTITY="FileSystemFolder"
+  LOCATION="%exadel.workspace%/../../../../target/classes" NAME="classes"/>
+ <WEB ENTITY="ExadelWeb" MODEL_PATH="/web.xml" SERVLET_VERSION="2.4">
+  <MODULE ENTITY="WebJSFModule" ROOT="WEB-ROOT" SRC="src" URI="/WEB-INF/faces-config.xml"/>
+ </WEB>
+</FILESYSTEMS>

Added: branches/refactor1/samples/ajaxPortlet/pom.xml
===================================================================
--- branches/refactor1/samples/ajaxPortlet/pom.xml	                        (rev 0)
+++ branches/refactor1/samples/ajaxPortlet/pom.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>org.ajax4jsf</groupId>
+	<artifactId>portalAjaxSample</artifactId>
+	<packaging>war</packaging>
+	<version>0.0.1</version>
+	<description>Ajax JSF sample portlet</description>
+	<build>
+		<defaultGoal>package</defaultGoal>
+    	<finalName>portalAjaxSample</finalName>
+	</build>
+	<dependencies>
+		<dependency>
+			<groupId>javax.portlet</groupId>
+			<artifactId>portlet-api</artifactId>
+			<version>1.0</version>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.ajax4jsf</groupId>
+			<artifactId>a4j-portlet</artifactId>
+			<version>1.1.1-SNAPSHOT</version>
+			<exclusions>
+				<exclusion>
+					<groupId>javax.faces</groupId>
+					<artifactId>jsf-api</artifactId>
+				</exclusion>
+				<exclusion>
+					<groupId>javax.faces</groupId>
+					<artifactId>jsf-impl</artifactId>
+				</exclusion>
+			</exclusions>
+		</dependency>
+		<dependency>
+			<groupId>javax.faces</groupId>
+			<artifactId>jsf-api</artifactId>
+			<version>1.2_04</version>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>javax.faces</groupId>
+			<artifactId>jsf-impl</artifactId>
+			<version>1.2_04</version>
+			<scope>provided</scope>
+		</dependency>
+	</dependencies>
+</project>
+

Added: branches/refactor1/samples/ajaxPortlet/src/main/java/portal/Bean.java
===================================================================
--- branches/refactor1/samples/ajaxPortlet/src/main/java/portal/Bean.java	                        (rev 0)
+++ branches/refactor1/samples/ajaxPortlet/src/main/java/portal/Bean.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,53 @@
+/**
+ * 
+ */
+package portal;
+
+import javax.faces.context.FacesContext;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class Bean {
+    private int counter=0;
+    
+    private String text ="";
+
+    /**
+     * @return the counter
+     */
+    public int getCounter() {
+        return counter;
+    }
+
+    /**
+     * @param counter the counter to set
+     */
+    public void setCounter(int counter) {
+        this.counter = counter;
+    }
+
+    /**
+     * @return the text
+     */
+    public String getText() {
+        return text;
+    }
+
+    /**
+     * @param text the text to set
+     */
+    public void setText(String text) {
+        this.text = text;
+    }
+    
+    public String click(){
+	counter++;
+	return null;
+    }
+
+    public String getNamespace(){
+	return FacesContext.getCurrentInstance().getExternalContext().encodeNamespace("");
+    }
+}

Added: branches/refactor1/samples/ajaxPortlet/src/main/webapp/META-INF/MANIFEST.MF
===================================================================
--- branches/refactor1/samples/ajaxPortlet/src/main/webapp/META-INF/MANIFEST.MF	                        (rev 0)
+++ branches/refactor1/samples/ajaxPortlet/src/main/webapp/META-INF/MANIFEST.MF	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,2 @@
+Manifest-Version: 1.0
+

Added: branches/refactor1/samples/ajaxPortlet/src/main/webapp/WEB-INF/ajaxportlet-object.xml
===================================================================
--- branches/refactor1/samples/ajaxPortlet/src/main/webapp/WEB-INF/ajaxportlet-object.xml	                        (rev 0)
+++ branches/refactor1/samples/ajaxPortlet/src/main/webapp/WEB-INF/ajaxportlet-object.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<deployments>
+  <deployment>
+    <parent-ref>default</parent-ref>
+    <if-exists>overwrite</if-exists>
+    <instance>
+      <instance-name>AjaxPortletInstance</instance-name>
+      <component-ref>ajaxPortletApp.ajaxPortlet</component-ref>
+    </instance>
+  </deployment>
+  <!--
+  	<deployment>
+  	<parent-ref>default</parent-ref>
+  	<if-exists>overwrite</if-exists>
+  	<page>
+  	<page-name>ajaxPortlet</page-name>
+  	<window>
+  	<window-name>ajaxportletWindow</window-name>
+  	<instance-ref>AjaxPortletInstance</instance-ref>
+  	<default>true</default>
+  	<region>center</region>
+  	<height>0</height>
+  	</window>
+  	<window>
+  	<window-name>ajaxportletSecondWindow</window-name>
+  	<instance-ref>AjaxPortletSecondInstance</instance-ref>
+  	<default>true</default>
+  	<region>center</region>
+  	<height>0</height>
+  	</window>
+  	</page>
+  	</deployment>
+  -->
+  <deployment>
+      <if-exists>overwrite</if-exists>
+      <parent-ref>default.default</parent-ref>
+	    <window>
+		    <window-name>otherAjaxportletWindow</window-name>
+		    <instance-ref>AjaxPortletInstance</instance-ref>
+		    <default>true</default>
+		    <region>center</region>
+		    <height>0</height>
+	    </window>
+  </deployment><!--
+  <deployment>
+    <parent-ref>default</parent-ref>
+    <if-exists>overwrite</if-exists>
+    <instance>
+      <instance-name>AjaxPortletSecondInstance</instance-name>
+      <component-ref>ajaxPortletApp.ajaxPortlet</component-ref>
+    </instance>
+  </deployment>
+--></deployments>

Added: branches/refactor1/samples/ajaxPortlet/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- branches/refactor1/samples/ajaxPortlet/src/main/webapp/WEB-INF/faces-config.xml	                        (rev 0)
+++ branches/refactor1/samples/ajaxPortlet/src/main/webapp/WEB-INF/faces-config.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
+                              "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
+<faces-config>
+ <managed-bean>
+  <managed-bean-name>bean</managed-bean-name>
+  <managed-bean-class>portal.Bean</managed-bean-class>
+  <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+ <navigation-rule>
+  <from-view-id>/jsf/start.xhtml</from-view-id>
+  <navigation-case>
+   <from-outcome>repeater</from-outcome>
+   <to-view-id>/jsf/repeater.xhtml</to-view-id>
+  </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+  <from-view-id>/jsf/repeater.xhtml</from-view-id>
+  <navigation-case>
+   <from-outcome>start</from-outcome>
+   <to-view-id>/jsf/start.xhtml</to-view-id>
+  </navigation-case>
+ </navigation-rule>
+ <render-kit>
+  <renderer>
+   <description>override the viewroot</description>
+   <component-family>javax.faces.ViewRoot</component-family>
+   <renderer-type>javax.faces.ViewRoot</renderer-type>
+   <renderer-class>org.ajax4jsf.portlet.renderkit.portlet.PortletAjaxViewRootRenderer</renderer-class>
+  </renderer>
+ </render-kit>
+ <application>
+  <view-handler>org.ajax4jsf.portlet.application.PortletViewHandler</view-handler>
+  <state-manager>org.ajax4jsf.portlet.application.PortalStateManager</state-manager>
+  <!-- 
+  <view-handler>com.sun.facelets.FaceletPortletViewHandler</view-handler>
+   -->
+ </application>
+</faces-config>

Added: branches/refactor1/samples/ajaxPortlet/src/main/webapp/WEB-INF/faces-config.xml.l4t
===================================================================
--- branches/refactor1/samples/ajaxPortlet/src/main/webapp/WEB-INF/faces-config.xml.l4t	                        (rev 0)
+++ branches/refactor1/samples/ajaxPortlet/src/main/webapp/WEB-INF/faces-config.xml.l4t	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<PROCESS ENTITY="JSFProcess">
+ <PROCESS-ITEM ENTITY="JSFProcessGroup" NAME="rules:#jsf#start.xhtml"
+  PATH="/jsf/start.xhtml" SHAPE="32,17,0,0">
+  <PROCESS-ITEM ENTITY="JSFProcessItem" ID="rules:#jsf#start.xhtml:0"
+   NAME="item" PATH="/jsf/start.xhtml">
+   <PROCESS-ITEM-OUTPUT ENTITY="JSFProcessItemOutput"
+    ID="repeater::#jsf#repeater.xhtml" NAME="output"
+    PATH="/jsf/repeater.xhtml" TARGET="rules:#jsf#repeater.xhtml" TITLE="repeater"/>
+  </PROCESS-ITEM>
+ </PROCESS-ITEM>
+ <PROCESS-ITEM ENTITY="JSFProcessGroup" NAME="rules:#jsf#repeater.xhtml"
+  PATH="/jsf/repeater.xhtml" SHAPE="205,106,0,0">
+  <PROCESS-ITEM ENTITY="JSFProcessItem" ID="rules:#jsf#repeater.xhtml:0"
+   NAME="item" PATH="/jsf/repeater.xhtml">
+   <PROCESS-ITEM-OUTPUT ENTITY="JSFProcessItemOutput"
+    ID="start::#jsf#start.xhtml" NAME="output" PATH="/jsf/start.xhtml"
+    TARGET="rules:#jsf#start.xhtml" TITLE="start"/>
+  </PROCESS-ITEM>
+ </PROCESS-ITEM>
+</PROCESS>

Added: branches/refactor1/samples/ajaxPortlet/src/main/webapp/WEB-INF/jboss-app.xml
===================================================================
--- branches/refactor1/samples/ajaxPortlet/src/main/webapp/WEB-INF/jboss-app.xml	                        (rev 0)
+++ branches/refactor1/samples/ajaxPortlet/src/main/webapp/WEB-INF/jboss-app.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,3 @@
+<jboss-app>
+	<app-name>ajaxPortletApp</app-name>
+</jboss-app>
\ No newline at end of file

Added: branches/refactor1/samples/ajaxPortlet/src/main/webapp/WEB-INF/jboss-portlet.xml
===================================================================
--- branches/refactor1/samples/ajaxPortlet/src/main/webapp/WEB-INF/jboss-portlet.xml	                        (rev 0)
+++ branches/refactor1/samples/ajaxPortlet/src/main/webapp/WEB-INF/jboss-portlet.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+
+<!DOCTYPE portlet-app PUBLIC
+   "-//JBoss Portal//DTD JBoss Portlet 2.6//EN"
+   "http://www.jboss.org/portal/dtd/jboss-portlet_2_6.dtd"><portlet-app>
+    <portlet>
+         <portlet-name>ajaxPortlet</portlet-name>
+    </portlet>
+</portlet-app>         
\ No newline at end of file

Added: branches/refactor1/samples/ajaxPortlet/src/main/webapp/WEB-INF/jboss_portal.tld
===================================================================
--- branches/refactor1/samples/ajaxPortlet/src/main/webapp/WEB-INF/jboss_portal.tld	                        (rev 0)
+++ branches/refactor1/samples/ajaxPortlet/src/main/webapp/WEB-INF/jboss_portal.tld	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,26 @@
+<!DOCTYPE taglib
+  PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" 
+  "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
+<taglib>
+<tlib-version>0.01</tlib-version>
+<jsp-version>1.2</jsp-version>
+<short-name>scroller</short-name>
+<uri>http://www.jboss.com/portal</uri>
+<description>This tag library contains the scroller tag.</description>
+
+<tag>
+   <name>scroller</name>
+   <tag-class>org.jboss.portal.faces.scroller.ScrollerTag</tag-class>
+   
+   <attribute>
+     <name>for</name>
+     <required>true</required>
+   </attribute>
+   
+   <attribute>
+     <name>styleClass</name>
+   </attribute>
+   
+</tag>
+
+</taglib>
\ No newline at end of file

Added: branches/refactor1/samples/ajaxPortlet/src/main/webapp/WEB-INF/lib/jsf-facelets.jar
===================================================================
(Binary files differ)


Property changes on: branches/refactor1/samples/ajaxPortlet/src/main/webapp/WEB-INF/lib/jsf-facelets.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: branches/refactor1/samples/ajaxPortlet/src/main/webapp/WEB-INF/myfaces_ext.tld
===================================================================
--- branches/refactor1/samples/ajaxPortlet/src/main/webapp/WEB-INF/myfaces_ext.tld	                        (rev 0)
+++ branches/refactor1/samples/ajaxPortlet/src/main/webapp/WEB-INF/myfaces_ext.tld	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,9147 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+--><!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
+<taglib>
+
+    <tlib-version>1.0.10</tlib-version>
+    <jsp-version>1.2</jsp-version>
+    <short-name>t</short-name>
+    <uri>http://myfaces.apache.org/extensions</uri>
+    <description>
+        MyFaces subproject that contains components and other goodies to be used with any JSF implementation.
+    </description>
+
+<!--     Extended standard components     -->
+
+    <!-- commandButton -->
+    <tag>
+        <name>commandButton</name>
+        <tag-class>org.apache.myfaces.taglib.html.ext.HtmlCommandButtonTag</tag-class>
+        <body-content>JSP</body-content>
+        <description>
+            Extends standard commandButton by user role support.
+        </description>
+                <!-- all standard attributes of the commandButton tag -->
+                <!-- UICommand attributes -->
+        <!-- UIComponent attributes -->
+        <attribute>
+            <name>id</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Every component may have an unique id. Automatically created if omitted.</description>
+        </attribute>
+        <attribute>
+            <name>rendered</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If false, this component will not be rendered.</description>
+        </attribute>
+        <attribute>
+            <name>binding</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Component binding.</description>
+        </attribute>
+
+        <attribute>
+            <name>action</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>MethodBinding pointing at the application action to be invoked, if this UIComponent is activated by the user, during the Apply Request Values or Invoke Application phase of the request processing lifecycle, depending on the value of the immediate property.</description>
+        </attribute>
+        <attribute>
+            <name>actionListener</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>MethodBinding pointing at method acception an ActionEvent with return type void.</description>
+        </attribute>
+        <attribute>
+            <name>immediate</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>True means, that the default ActionListener should be executed immediately (i.e. during Apply Request Values phase of the request processing lifecycle), rather than waiting until the Invoke Application phase.</description>
+        </attribute>
+        <attribute>
+            <name>value</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Initial value to set when rendered for the first time.</description>
+        </attribute>
+
+        <!-- HTML 4.0 universal attributes -->
+        <attribute><name>dir</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>lang</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>style</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>title</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute>
+            <name>styleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Corresponds to the HTML class attribute.</description>
+        </attribute>
+
+        <!-- HTML 4.0 event-handler attributes -->
+        <attribute><name>onclick</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>ondblclick</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousedown</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseup</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseover</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousemove</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseout</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeypress</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeydown</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeyup</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+
+        <!-- HTML 4.0 button attributes -->
+        <attribute><name>accesskey</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>alt</name>         <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>disabled</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>onblur</name>      <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>onchange</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>onfocus</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>onselect</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>size</name>        <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>tabindex</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>type</name>        <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+
+        <!-- HtmlCommandButton attributes -->
+        <attribute>
+            <name>image</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+
+        <!-- MyFaces extension: user role attributes -->
+        <attribute>
+            <name>enabledOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, no hyperlink is rendered but all nested
+                tags (=body) are rendered.
+            </description>
+        </attribute>
+        <attribute>
+            <name>visibleOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, nothing is rendered and the body of this tag
+                will be skipped.
+            </description>
+        </attribute>
+
+                <!-- 
+        This attribute indicates that the component should be forced to use the specified id instead of 
+        using the one that faces generates.  Components contained within a "list" will include a '[n]'  
+        suffix where 'n' is the row index (unless the forceIdIndex attribute is set to false).
+        -->
+        <attribute>
+            <name>forceId</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If true, this component will force the use of the specified id when rendering.</description>
+        </attribute>        
+
+        <!-- 
+        If the component is contained within an "list" (such as dataTable), this attribute indicates whether or not a 
+        '[n]' suffix should be added where 'n' is the row index.  Default is true.  The attribute is ignored if forceId 
+        is false (or not specified)
+        -->
+        <attribute>
+            <name>forceIdIndex</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>
+                If false, this component will not append a '[n]' suffix (where 'n' is the row index) to components 
+                that are contained within a "list."  This value will be true by default and the value will be ignored if 
+                the value of forceId is false (or not specified.)
+            </description>
+        </attribute>        
+
+    </tag>
+
+    <!-- commandLink -->
+    <tag>
+        <name>commandLink</name>
+        <tag-class>org.apache.myfaces.taglib.html.ext.HtmlCommandLinkTag</tag-class>
+        <body-content>JSP</body-content>
+        <description>
+            Extends standard commandLink by user role support and the HTML target attribute.
+        </description>
+                <!-- all standard attributes of the commandLink tag -->
+                <!-- UICommand attributes -->
+        <!-- UIComponent attributes -->
+        <attribute>
+            <name>id</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Every component may have an unique id. Automatically created if omitted.</description>
+        </attribute>
+        <attribute>
+            <name>rendered</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If false, this component will not be rendered.</description>
+        </attribute>
+        <attribute>
+            <name>binding</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Component binding.</description>
+        </attribute>
+
+        <attribute>
+            <name>action</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>MethodBinding pointing at the application action to be invoked, if this UIComponent is activated by the user, during the Apply Request Values or Invoke Application phase of the request processing lifecycle, depending on the value of the immediate property.</description>
+        </attribute>
+        <attribute>
+            <name>actionListener</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>MethodBinding pointing at method acception an ActionEvent with return type void.</description>
+        </attribute>
+        <attribute>
+            <name>immediate</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>True means, that the default ActionListener should be executed immediately (i.e. during Apply Request Values phase of the request processing lifecycle), rather than waiting until the Invoke Application phase.</description>
+        </attribute>
+        <attribute>
+            <name>value</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Initial value to set when rendered for the first time.</description>
+        </attribute>
+
+        <!-- HTML 4.0 universal attributes -->
+        <attribute><name>dir</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>lang</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>style</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>title</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute>
+            <name>styleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Corresponds to the HTML class attribute.</description>
+        </attribute>
+
+        <!-- HTML 4.0 event-handler attributes -->
+        <attribute><name>onclick</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>ondblclick</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousedown</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseup</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseover</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousemove</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseout</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeypress</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeydown</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeyup</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+
+        <!-- HTML 4.0 anchor (=a) attributes -->
+        <attribute><name>accesskey</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>charset</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>coords</name>      <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <!-- "href" is a special LinkRenderer attribute -->
+        <attribute><name>hreflang</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <!-- "name" cannot be set by user -->
+        <attribute><name>rel</name>         <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>rev</name>         <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>shape</name>       <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>tabindex</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>type</name>        <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <!--todo: is in JSF API of HtmlCommandLink and HtmlOutputLink, but there is no corresponding tag in HTML 4.0.. What to do?-->
+        <attribute>
+            <name>onblur</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <!--todo: is in JSF API of HtmlCommandLink and HtmlOutputLink, but there is no corresponding tag in HTML 4.0.. What to do?-->
+        <attribute>
+            <name>onfocus</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>target</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+
+
+        <!-- MyFaces extension: user role attributes -->
+        <attribute>
+            <name>enabledOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, no hyperlink is rendered but all nested
+                tags (=body) are rendered.
+            </description>
+        </attribute>
+        <attribute>
+            <name>visibleOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, nothing is rendered and the body of this tag
+                will be skipped.
+            </description>
+        </attribute>
+
+                <!-- 
+        This attribute indicates that the component should be forced to use the specified id instead of 
+        using the one that faces generates.  Components contained within a "list" will include a '[n]'  
+        suffix where 'n' is the row index (unless the forceIdIndex attribute is set to false).
+        -->
+        <attribute>
+            <name>forceId</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If true, this component will force the use of the specified id when rendering.</description>
+        </attribute>        
+
+        <!-- 
+        If the component is contained within an "list" (such as dataTable), this attribute indicates whether or not a 
+        '[n]' suffix should be added where 'n' is the row index.  Default is true.  The attribute is ignored if forceId 
+        is false (or not specified)
+        -->
+        <attribute>
+            <name>forceIdIndex</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>
+                If false, this component will not append a '[n]' suffix (where 'n' is the row index) to components 
+                that are contained within a "list."  This value will be true by default and the value will be ignored if 
+                the value of forceId is false (or not specified.)
+            </description>
+        </attribute>        
+
+    </tag>
+
+    <!-- dataTable -->
+    <tag>
+        <name>dataTable</name>
+        <tag-class>org.apache.myfaces.taglib.html.ext.HtmlDataTableTag</tag-class>
+        <body-content>JSP</body-content>
+        <description>
+            Extended data_table that adds some additional features to the standard
+            data_table action: see attribute descriptions for preserveDataModel,
+            sortColumn, sortAscending and preserveSort.
+        </description>
+                <!-- all standard attributes of the dataTable tag -->
+                <!-- UIPanel attributes -->
+        <!-- UIComponent attributes -->
+        <attribute>
+            <name>id</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Every component may have an unique id. Automatically created if omitted.</description>
+        </attribute>
+        <attribute>
+            <name>rendered</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If false, this component will not be rendered.</description>
+        </attribute>
+        <attribute>
+            <name>binding</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Component binding.</description>
+        </attribute>
+
+
+        <!-- HTML 4.0 universal attributes -->
+        <attribute><name>dir</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>lang</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>style</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>title</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute>
+            <name>styleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Corresponds to the HTML class attribute.</description>
+        </attribute>
+
+        <!-- HTML 4.0 event-handler attributes -->
+        <attribute><name>onclick</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>ondblclick</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousedown</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseup</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseover</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousemove</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseout</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeypress</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeydown</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeyup</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+
+        <!-- HTML 4.0 table attributes -->
+        <attribute><name>align</name>           <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>border</name>          <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>bgcolor</name>         <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>cellpadding</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>cellspacing</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>datafld</name>         <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>datasrc</name>         <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>dataformatas</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>frame</name>           <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>rules</name>           <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>summary</name>         <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>width</name>           <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+
+        <!-- UIData attributes -->
+        <attribute>
+            <name>value</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Supported types see JSF Spec 4.1.3</description>
+        </attribute>
+        <attribute>
+            <name>var</name>
+            <required>true</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>rows</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>first</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <!-- TableRenderer attributes -->
+        <attribute>
+            <name>columnClasses</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>footerClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>headerClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>rowClasses</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+
+        <!-- MyFaces extensions -->
+                <!-- 
+        This attribute indicates that the component should be forced to use the specified id instead of 
+        using the one that faces generates.  Components contained within a "list" will include a '[n]'  
+        suffix where 'n' is the row index (unless the forceIdIndex attribute is set to false).
+        -->
+        <attribute>
+            <name>forceId</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If true, this component will force the use of the specified id when rendering.</description>
+        </attribute>        
+
+        <!-- 
+        If the component is contained within an "list" (such as dataTable), this attribute indicates whether or not a 
+        '[n]' suffix should be added where 'n' is the row index.  Default is true.  The attribute is ignored if forceId 
+        is false (or not specified)
+        -->
+        <attribute>
+            <name>forceIdIndex</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>
+                If false, this component will not append a '[n]' suffix (where 'n' is the row index) to components 
+                that are contained within a "list."  This value will be true by default and the value will be ignored if 
+                the value of forceId is false (or not specified.)
+            </description>
+        </attribute>        
+
+        <!-- MyFaces extension: user role attributes -->
+        <attribute>
+            <name>enabledOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, no hyperlink is rendered but all nested
+                tags (=body) are rendered.
+            </description>
+        </attribute>
+        <attribute>
+            <name>visibleOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, nothing is rendered and the body of this tag
+                will be skipped.
+            </description>
+        </attribute>
+
+        <attribute>
+            <name>preserveDataModel</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Indicates whether the state of the whole DataModel should be saved and
+                restored.
+                Default: false
+            </description>
+        </attribute>
+        <attribute>
+            <name>forceIdIndexFormula</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+				A formula that overrides the defaut row index in the construction of table's
+				body components.
+				Example : #{myRowVar.key}
+				Warning, the EL should evaluate to a unique value for each row !
+            </description>
+        </attribute>
+        <attribute>
+            <name>sortColumn</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Value reference to a model property that gives the current sort column name.
+            </description>
+        </attribute>
+        <attribute>
+            <name>sortAscending</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Value reference to a model property that gives the current sort direction.
+            </description>
+        </attribute>
+        <attribute>
+            <name>preserveSort</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Indicates whether the state of the sortColumn and sortAscending attribute
+                should be saved and restored and written back to the model during the
+                update model phase.
+                Default: true
+            </description>
+        </attribute>
+        <attribute>
+            <name>renderedIfEmpty</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Indicates whether this table should be rendered if the underlying DataModel is
+                empty.
+                You could as well use rendered="#{not empty bean.list}", but this one causes
+                the getList method of your model bean beeing called up to five times per
+                request, which is not optimal when the list is backed by a DB table.
+                Using renderedIfEmpty="false" solves this problem, because the MyFaces
+                extended HtmlDataTable automatically caches the DataModel and calles the
+                model getter only once per request.
+                Default: true
+            </description>
+        </attribute>
+        <attribute>
+            <name>rowIndexVar</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                A parameter name, under which the current rowIndex is set in request scope
+                similar to the var parameter.
+            </description>
+        </attribute>
+        <attribute>
+            <name>rowCountVar</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                A parameter name, under which the rowCount is set in request scope
+                similar to the var parameter.
+            </description>
+        </attribute>
+        <attribute>
+            <name>previousRowDataVar</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                A parameter name, under which the previous RowData Object is set in request scope
+                similar to the rowIndexVar and rowCountVar parameters.
+                Mind that the value of this request scope attribute is null in the first row
+                or when isRowAvailable returns false for the previous row.
+            </description>
+        </attribute>
+        <attribute>
+            <name>rowOnClick</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Defines a JavaScript onclick event handler for each table row
+            </description>
+        </attribute>
+        <attribute>
+            <name>rowOnDblClick</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Defines a JavaScript ondblclick event handler for each table row
+            </description>
+        </attribute>
+        <attribute>
+            <name>rowOnMouseDown</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Defines a JavaScript onmpusedown event handler for each table row
+            </description>
+        </attribute>
+        <attribute>
+            <name>rowOnMouseUp</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Defines a JavaScript onmouseup event handler for each table row
+            </description>
+        </attribute>
+        <attribute>
+            <name>rowOnMouseOver</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Defines a JavaScript onmouseover event handler for each table row
+            </description>
+        </attribute>
+        <attribute>
+            <name>rowOnMouseMove</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Defines a JavaScript onmousemove event handler for each table row
+            </description>
+        </attribute>
+        <attribute>
+            <name>rowOnMouseOut</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Defines a JavaScript onmouseout event handler for each table row
+            </description>
+        </attribute>
+        <attribute>
+            <name>rowOnKeyPress</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Defines a JavaScript onkeypress event handler for each table row
+            </description>
+        </attribute>
+        <attribute>
+            <name>rowOnKeyDown</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Defines a JavaScript onkeydown event handler for each table row
+            </description>
+        </attribute>
+        <attribute>
+            <name>rowOnKeyUp</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Defines a JavaScript onkeyup event handler for each table row
+            </description>
+        </attribute>
+        <attribute>
+            <name>rowId</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                The id to use for &lt;tr&gt; elements that are generated by the table.
+            </description>
+        </attribute>        
+        <attribute>
+            <name>rowStyleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Corresponds to the HTML class attribute for the row tr tag.</description>
+        </attribute>
+        <attribute>
+            <name>rowStyle</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Corresponds to the HTML style attribute for the row tr tag.</description>
+        </attribute>
+     </tag>
+
+    <!-- inputHidden -->
+    <tag>
+        <name>inputHidden</name>
+        <tag-class>org.apache.myfaces.taglib.html.ext.HtmlInputHiddenTag</tag-class>
+        <body-content>JSP</body-content>
+        <description>
+            Extends standard inputHidden by providing additional MyFaces goodies.
+        </description>
+                <!-- UIInput attributes -->
+                <!-- UIOutput attributes -->
+        <!-- UIComponent attributes -->
+        <attribute>
+            <name>id</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Every component may have an unique id. Automatically created if omitted.</description>
+        </attribute>
+        <attribute>
+            <name>rendered</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If false, this component will not be rendered.</description>
+        </attribute>
+        <attribute>
+            <name>binding</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Component binding.</description>
+        </attribute>
+
+        <attribute>
+            <name>value</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Initial value to set when rendered for the first time.</description>
+        </attribute>
+        <attribute>
+            <name>converter</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Id of Converter to be used or reference to a Converter.</description>
+        </attribute>
+
+        <attribute>
+            <name>immediate</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description> Flag indicating that this component's value must be converted and validated immediately (that is, during Apply Request Values phase), rather than waiting until Process Validations phase.</description>
+        </attribute>
+        <attribute>
+            <name>required</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If true, this component will be checked for non-empty input.</description>
+        </attribute>
+        <attribute>
+            <name>validator</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>MethodBinding pointing at a method that will be called during Process Validations phase of the request processing lifecycle, to validate the current value of this component.</description>
+        </attribute>
+        <attribute>
+            <name>valueChangeListener</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Listener for value changes.</description>
+        </attribute>
+
+                <!-- 
+        This attribute indicates that the component should be forced to use the specified id instead of 
+        using the one that faces generates.  Components contained within a "list" will include a '[n]'  
+        suffix where 'n' is the row index (unless the forceIdIndex attribute is set to false).
+        -->
+        <attribute>
+            <name>forceId</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If true, this component will force the use of the specified id when rendering.</description>
+        </attribute>        
+
+        <!-- 
+        If the component is contained within an "list" (such as dataTable), this attribute indicates whether or not a 
+        '[n]' suffix should be added where 'n' is the row index.  Default is true.  The attribute is ignored if forceId 
+        is false (or not specified)
+        -->
+        <attribute>
+            <name>forceIdIndex</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>
+                If false, this component will not append a '[n]' suffix (where 'n' is the row index) to components 
+                that are contained within a "list."  This value will be true by default and the value will be ignored if 
+                the value of forceId is false (or not specified.)
+            </description>
+        </attribute>        
+
+    </tag>
+
+    <!-- inputSecret -->
+    <tag>
+        <name>inputSecret</name>
+        <tag-class>org.apache.myfaces.taglib.html.ext.HtmlInputSecretTag</tag-class>
+        <body-content>JSP</body-content>
+        <description>
+            Extends standard inputSecret.
+        </description>
+         <attribute><name>datafld</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>datasrc</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>dataformatas</name><required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+                <!-- UIInput attributes -->
+                <!-- UIOutput attributes -->
+        <!-- UIComponent attributes -->
+        <attribute>
+            <name>id</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Every component may have an unique id. Automatically created if omitted.</description>
+        </attribute>
+        <attribute>
+            <name>rendered</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If false, this component will not be rendered.</description>
+        </attribute>
+        <attribute>
+            <name>binding</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Component binding.</description>
+        </attribute>
+
+        <attribute>
+            <name>value</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Initial value to set when rendered for the first time.</description>
+        </attribute>
+        <attribute>
+            <name>converter</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Id of Converter to be used or reference to a Converter.</description>
+        </attribute>
+
+        <attribute>
+            <name>immediate</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description> Flag indicating that this component's value must be converted and validated immediately (that is, during Apply Request Values phase), rather than waiting until Process Validations phase.</description>
+        </attribute>
+        <attribute>
+            <name>required</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If true, this component will be checked for non-empty input.</description>
+        </attribute>
+        <attribute>
+            <name>validator</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>MethodBinding pointing at a method that will be called during Process Validations phase of the request processing lifecycle, to validate the current value of this component.</description>
+        </attribute>
+        <attribute>
+            <name>valueChangeListener</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Listener for value changes.</description>
+        </attribute>
+
+        <!-- HTML 4.0 input attributes -->
+        <attribute><name>accesskey</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>align</name>       <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>alt</name>         <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>disabled</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>maxlength</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>onblur</name>      <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>onchange</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>onfocus</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>onselect</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>readonly</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>size</name>        <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>tabindex</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <!-- HTML 4.0 universal attributes -->
+        <attribute><name>dir</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>lang</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>style</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>title</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute>
+            <name>styleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Corresponds to the HTML class attribute.</description>
+        </attribute>
+
+        <!-- HTML 4.0 event-handler attributes -->
+        <attribute><name>onclick</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>ondblclick</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousedown</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseup</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseover</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousemove</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseout</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeypress</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeydown</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeyup</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+
+        <!-- MyFaces extension: user role attributes -->
+        <attribute>
+            <name>enabledOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, no hyperlink is rendered but all nested
+                tags (=body) are rendered.
+            </description>
+        </attribute>
+        <attribute>
+            <name>visibleOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, nothing is rendered and the body of this tag
+                will be skipped.
+            </description>
+        </attribute>
+
+                <!-- 
+        This attribute indicates that the component should be forced to use the specified id instead of 
+        using the one that faces generates.  Components contained within a "list" will include a '[n]'  
+        suffix where 'n' is the row index (unless the forceIdIndex attribute is set to false).
+        -->
+        <attribute>
+            <name>forceId</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If true, this component will force the use of the specified id when rendering.</description>
+        </attribute>        
+
+        <!-- 
+        If the component is contained within an "list" (such as dataTable), this attribute indicates whether or not a 
+        '[n]' suffix should be added where 'n' is the row index.  Default is true.  The attribute is ignored if forceId 
+        is false (or not specified)
+        -->
+        <attribute>
+            <name>forceIdIndex</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>
+                If false, this component will not append a '[n]' suffix (where 'n' is the row index) to components 
+                that are contained within a "list."  This value will be true by default and the value will be ignored if 
+                the value of forceId is false (or not specified.)
+            </description>
+        </attribute>        
+
+        <!-- MyFaces extension: user role attributes -->
+        <attribute>
+            <name>displayValueOnly</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If true, renders only the value of the component, but no input widget.
+                Default is false.
+            </description>
+        </attribute>
+        <attribute>
+            <name>displayValueOnlyStyle</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Style used when displayValueOnly is true.
+            </description>
+        </attribute>
+        <attribute>
+            <name>displayValueOnlyStyleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Style class used when displayValueOnly is true.
+            </description>
+        </attribute>        
+        <!-- SecretRenderer attributes -->
+        <attribute>
+            <name>redisplay</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If true, the value will be re-sent (in plaintext) when the form
+                is rerendered (see JSF.7.4.4). Default is false.
+            </description>
+        </attribute>
+    </tag>
+
+    <!-- inputText -->
+    <tag>
+        <name>inputText</name>
+        <tag-class>org.apache.myfaces.taglib.html.ext.HtmlInputTextTag</tag-class>
+        <body-content>JSP</body-content>
+        <description>
+            Extends standard inputText by user role support.
+        </description>
+        <attribute><name>datafld</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>datasrc</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>dataformatas</name><required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+                <!-- all standard attributes of the inputText tag -->
+                <!-- UIInput attributes -->
+                <!-- UIOutput attributes -->
+        <!-- UIComponent attributes -->
+        <attribute>
+            <name>id</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Every component may have an unique id. Automatically created if omitted.</description>
+        </attribute>
+        <attribute>
+            <name>rendered</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If false, this component will not be rendered.</description>
+        </attribute>
+        <attribute>
+            <name>binding</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Component binding.</description>
+        </attribute>
+
+        <attribute>
+            <name>value</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Initial value to set when rendered for the first time.</description>
+        </attribute>
+        <attribute>
+            <name>converter</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Id of Converter to be used or reference to a Converter.</description>
+        </attribute>
+
+        <attribute>
+            <name>immediate</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description> Flag indicating that this component's value must be converted and validated immediately (that is, during Apply Request Values phase), rather than waiting until Process Validations phase.</description>
+        </attribute>
+        <attribute>
+            <name>required</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If true, this component will be checked for non-empty input.</description>
+        </attribute>
+        <attribute>
+            <name>validator</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>MethodBinding pointing at a method that will be called during Process Validations phase of the request processing lifecycle, to validate the current value of this component.</description>
+        </attribute>
+        <attribute>
+            <name>valueChangeListener</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Listener for value changes.</description>
+        </attribute>
+
+        <!-- HTML 4.0 universal attributes -->
+        <attribute><name>dir</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>lang</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>style</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>title</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute>
+            <name>styleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Corresponds to the HTML class attribute.</description>
+        </attribute>
+
+        <!-- HTML 4.0 event-handler attributes -->
+        <attribute><name>onclick</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>ondblclick</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousedown</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseup</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseover</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousemove</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseout</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeypress</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeydown</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeyup</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+
+        <!-- HTML 4.0 input attributes -->
+        <attribute><name>accesskey</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>align</name>       <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>alt</name>         <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>disabled</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>maxlength</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>onblur</name>      <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>onchange</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>onfocus</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>onselect</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>readonly</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>size</name>        <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>tabindex</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+
+        <!-- MyFaces extension: user role attributes -->
+        <attribute>
+            <name>enabledOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, no hyperlink is rendered but all nested
+                tags (=body) are rendered.
+            </description>
+        </attribute>
+        <attribute>
+            <name>visibleOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, nothing is rendered and the body of this tag
+                will be skipped.
+            </description>
+        </attribute>
+
+                <!-- 
+        This attribute indicates that the component should be forced to use the specified id instead of 
+        using the one that faces generates.  Components contained within a "list" will include a '[n]'  
+        suffix where 'n' is the row index (unless the forceIdIndex attribute is set to false).
+        -->
+        <attribute>
+            <name>forceId</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If true, this component will force the use of the specified id when rendering.</description>
+        </attribute>        
+
+        <!-- 
+        If the component is contained within an "list" (such as dataTable), this attribute indicates whether or not a 
+        '[n]' suffix should be added where 'n' is the row index.  Default is true.  The attribute is ignored if forceId 
+        is false (or not specified)
+        -->
+        <attribute>
+            <name>forceIdIndex</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>
+                If false, this component will not append a '[n]' suffix (where 'n' is the row index) to components 
+                that are contained within a "list."  This value will be true by default and the value will be ignored if 
+                the value of forceId is false (or not specified.)
+            </description>
+        </attribute>        
+
+        <!-- MyFaces extension: user role attributes -->
+        <attribute>
+            <name>displayValueOnly</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If true, renders only the value of the component, but no input widget.
+                Default is false.
+            </description>
+        </attribute>
+        <attribute>
+            <name>displayValueOnlyStyle</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Style used when displayValueOnly is true.
+            </description>
+        </attribute>
+        <attribute>
+            <name>displayValueOnlyStyleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Style class used when displayValueOnly is true.
+            </description>
+        </attribute>        
+    </tag>
+
+    <!-- inputTextHelp -->
+    <tag>
+        <name>inputTextHelp</name>
+        <tag-class>org.apache.myfaces.custom.inputTextHelp.HtmlInputTextHelpTag</tag-class>
+        <body-content>JSP</body-content>
+        <description>
+            Extends standard inputText by helptext support.
+        </description>
+                <!-- all standard attributes of the inputText tag -->
+                <!-- UIInput attributes -->
+                <!-- UIOutput attributes -->
+        <!-- UIComponent attributes -->
+        <attribute>
+            <name>id</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Every component may have an unique id. Automatically created if omitted.</description>
+        </attribute>
+        <attribute>
+            <name>rendered</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If false, this component will not be rendered.</description>
+        </attribute>
+        <attribute>
+            <name>binding</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Component binding.</description>
+        </attribute>
+
+        <attribute>
+            <name>value</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Initial value to set when rendered for the first time.</description>
+        </attribute>
+        <attribute>
+            <name>converter</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Id of Converter to be used or reference to a Converter.</description>
+        </attribute>
+
+        <attribute>
+            <name>immediate</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description> Flag indicating that this component's value must be converted and validated immediately (that is, during Apply Request Values phase), rather than waiting until Process Validations phase.</description>
+        </attribute>
+        <attribute>
+            <name>required</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If true, this component will be checked for non-empty input.</description>
+        </attribute>
+        <attribute>
+            <name>validator</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>MethodBinding pointing at a method that will be called during Process Validations phase of the request processing lifecycle, to validate the current value of this component.</description>
+        </attribute>
+        <attribute>
+            <name>valueChangeListener</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Listener for value changes.</description>
+        </attribute>
+
+        <!-- HTML 4.0 universal attributes -->
+        <attribute><name>dir</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>lang</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>style</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>title</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute>
+            <name>styleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Corresponds to the HTML class attribute.</description>
+        </attribute>
+
+        <!-- HTML 4.0 event-handler attributes -->
+        <attribute><name>onclick</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>ondblclick</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousedown</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseup</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseover</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousemove</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseout</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeypress</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeydown</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeyup</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+
+        <!-- HTML 4.0 input attributes -->
+        <attribute><name>accesskey</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>align</name>       <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>alt</name>         <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>disabled</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>maxlength</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>onblur</name>      <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>onchange</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>onfocus</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>onselect</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>readonly</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>size</name>        <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>tabindex</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+
+        <!-- MyFaces extension: user role attributes -->
+        <attribute>
+            <name>enabledOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, no hyperlink is rendered but all nested
+                tags (=body) are rendered.
+            </description>
+        </attribute>
+        <attribute>
+            <name>visibleOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, nothing is rendered and the body of this tag
+                will be skipped.
+            </description>
+        </attribute>
+
+                <!-- 
+        This attribute indicates that the component should be forced to use the specified id instead of 
+        using the one that faces generates.  Components contained within a "list" will include a '[n]'  
+        suffix where 'n' is the row index (unless the forceIdIndex attribute is set to false).
+        -->
+        <attribute>
+            <name>forceId</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If true, this component will force the use of the specified id when rendering.</description>
+        </attribute>        
+
+        <!-- 
+        If the component is contained within an "list" (such as dataTable), this attribute indicates whether or not a 
+        '[n]' suffix should be added where 'n' is the row index.  Default is true.  The attribute is ignored if forceId 
+        is false (or not specified)
+        -->
+        <attribute>
+            <name>forceIdIndex</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>
+                If false, this component will not append a '[n]' suffix (where 'n' is the row index) to components 
+                that are contained within a "list."  This value will be true by default and the value will be ignored if 
+                the value of forceId is false (or not specified.)
+            </description>
+        </attribute>        
+
+        <!-- MyFaces extension: user role attributes -->
+        <attribute>
+            <name>displayValueOnly</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If true, renders only the value of the component, but no input widget.
+                Default is false.
+            </description>
+        </attribute>
+        <attribute>
+            <name>displayValueOnlyStyle</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Style used when displayValueOnly is true.
+            </description>
+        </attribute>
+        <attribute>
+            <name>displayValueOnlyStyleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Style class used when displayValueOnly is true.
+            </description>
+        </attribute>        
+        <!-- Attributes for HtmlInputText with Helptext -->
+        <attribute>
+            <name>helpText</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+        </attribute>
+        <attribute>
+            <name>selectText</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+    </tag>
+
+    <!-- inputTextarea -->
+    <tag>
+        <name>inputTextarea</name>
+        <tag-class>org.apache.myfaces.taglib.html.ext.HtmlInputTextareaTag</tag-class>
+        <body-content>JSP</body-content>
+        <description>
+            Extends standard inputTextarea by user role support.
+        </description>
+                <!-- all standard attributes of the inputTextarea tag -->
+                <!-- UIInput attributes -->
+                <!-- UIOutput attributes -->
+        <!-- UIComponent attributes -->
+        <attribute>
+            <name>id</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Every component may have an unique id. Automatically created if omitted.</description>
+        </attribute>
+        <attribute>
+            <name>rendered</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If false, this component will not be rendered.</description>
+        </attribute>
+        <attribute>
+            <name>binding</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Component binding.</description>
+        </attribute>
+
+        <attribute>
+            <name>value</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Initial value to set when rendered for the first time.</description>
+        </attribute>
+        <attribute>
+            <name>converter</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Id of Converter to be used or reference to a Converter.</description>
+        </attribute>
+
+        <attribute>
+            <name>immediate</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description> Flag indicating that this component's value must be converted and validated immediately (that is, during Apply Request Values phase), rather than waiting until Process Validations phase.</description>
+        </attribute>
+        <attribute>
+            <name>required</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If true, this component will be checked for non-empty input.</description>
+        </attribute>
+        <attribute>
+            <name>validator</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>MethodBinding pointing at a method that will be called during Process Validations phase of the request processing lifecycle, to validate the current value of this component.</description>
+        </attribute>
+        <attribute>
+            <name>valueChangeListener</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Listener for value changes.</description>
+        </attribute>
+
+        <!-- HTML 4.0 textarea attributes -->
+        <attribute><name>accesskey</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>cols</name>        <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>datafld</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>datasrc</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>dataformatas</name><required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>disabled</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>onblur</name>      <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>onchange</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>onfocus</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>onselect</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>readonly</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>rows</name>        <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>tabindex</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+
+        <!-- HTML 4.0 universal attributes -->
+        <attribute><name>dir</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>lang</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>style</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>title</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute>
+            <name>styleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Corresponds to the HTML class attribute.</description>
+        </attribute>
+
+        <!-- HTML 4.0 event-handler attributes -->
+        <attribute><name>onclick</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>ondblclick</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousedown</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseup</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseover</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousemove</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseout</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeypress</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeydown</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeyup</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+
+
+        <!-- MyFaces extension: user role attributes -->
+        <attribute>
+            <name>enabledOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, no hyperlink is rendered but all nested
+                tags (=body) are rendered.
+            </description>
+        </attribute>
+        <attribute>
+            <name>visibleOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, nothing is rendered and the body of this tag
+                will be skipped.
+            </description>
+        </attribute>
+
+                <!-- 
+        This attribute indicates that the component should be forced to use the specified id instead of 
+        using the one that faces generates.  Components contained within a "list" will include a '[n]'  
+        suffix where 'n' is the row index (unless the forceIdIndex attribute is set to false).
+        -->
+        <attribute>
+            <name>forceId</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If true, this component will force the use of the specified id when rendering.</description>
+        </attribute>        
+
+        <!-- 
+        If the component is contained within an "list" (such as dataTable), this attribute indicates whether or not a 
+        '[n]' suffix should be added where 'n' is the row index.  Default is true.  The attribute is ignored if forceId 
+        is false (or not specified)
+        -->
+        <attribute>
+            <name>forceIdIndex</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>
+                If false, this component will not append a '[n]' suffix (where 'n' is the row index) to components 
+                that are contained within a "list."  This value will be true by default and the value will be ignored if 
+                the value of forceId is false (or not specified.)
+            </description>
+        </attribute>        
+
+        <!-- MyFaces extension: user role attributes -->
+        <attribute>
+            <name>displayValueOnly</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If true, renders only the value of the component, but no input widget.
+                Default is false.
+            </description>
+        </attribute>
+        <attribute>
+            <name>displayValueOnlyStyle</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Style used when displayValueOnly is true.
+            </description>
+        </attribute>
+        <attribute>
+            <name>displayValueOnlyStyleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Style class used when displayValueOnly is true.
+            </description>
+        </attribute>        
+    </tag>
+
+     <!-- graphicImage -->
+    <tag>
+        <name>graphicImage</name>
+        <tag-class>org.apache.myfaces.taglib.html.ext.HtmlGraphicImageTag</tag-class>
+        <body-content>JSP</body-content>
+        <description>
+            Extends standard graphicImage.
+        </description>
+                <!-- UIGraphic attributes -->
+        <!-- UIComponent attributes -->
+        <attribute>
+            <name>id</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Every component may have an unique id. Automatically created if omitted.</description>
+        </attribute>
+        <attribute>
+            <name>rendered</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If false, this component will not be rendered.</description>
+        </attribute>
+        <attribute>
+            <name>binding</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Component binding.</description>
+        </attribute>
+
+        <attribute>
+            <name>url</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>URL of the image (see JSF.4.1.5).</description>
+        </attribute>
+        <attribute>
+            <name>value</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>URL of the image (see JSF.4.1.5).</description>
+        </attribute>
+
+        <!-- HTML 4.0 universal attributes -->
+        <attribute><name>dir</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>lang</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>style</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>title</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute>
+            <name>styleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Corresponds to the HTML class attribute.</description>
+        </attribute>
+
+        <!-- HTML 4.0 event-handler attributes -->
+        <attribute><name>onclick</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>ondblclick</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousedown</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseup</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseover</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousemove</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseout</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeypress</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeydown</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeyup</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+
+        <!-- HTML 4.0 img attributes that are not part of the JSF 1.1 specification -->
+        <attribute>
+            <name>align</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+        </attribute>
+        <attribute>
+            <name>border</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+        </attribute>
+        <attribute>
+            <name>hspace</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+        </attribute>
+        <attribute>
+            <name>vspace</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+        </attribute>
+
+        <!-- The subset of HTML 4.0 img attributes that are supported by the JSF 1.1 specification -->
+        <attribute>
+            <name>alt</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+        </attribute>
+        <attribute>
+            <name>height</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+        </attribute>
+        <attribute>
+            <name>ismap</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+        </attribute>
+        <attribute>
+            <name>longdesc</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+        </attribute>
+        <!-- "name" attribute cannot be set directly by user -->
+        <!-- "src" attribute cannot be set directly, use "url" instead! -->
+        <attribute>
+            <name>usemap</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+        </attribute>
+        <attribute>
+            <name>width</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+        </attribute>
+
+        <!-- MyFaces extension: user role attributes -->
+        <attribute>
+            <name>enabledOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, no hyperlink is rendered but all nested
+                tags (=body) are rendered.
+            </description>
+        </attribute>
+        <attribute>
+            <name>visibleOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, nothing is rendered and the body of this tag
+                will be skipped.
+            </description>
+        </attribute>
+
+                <!-- 
+        This attribute indicates that the component should be forced to use the specified id instead of 
+        using the one that faces generates.  Components contained within a "list" will include a '[n]'  
+        suffix where 'n' is the row index (unless the forceIdIndex attribute is set to false).
+        -->
+        <attribute>
+            <name>forceId</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If true, this component will force the use of the specified id when rendering.</description>
+        </attribute>        
+
+        <!-- 
+        If the component is contained within an "list" (such as dataTable), this attribute indicates whether or not a 
+        '[n]' suffix should be added where 'n' is the row index.  Default is true.  The attribute is ignored if forceId 
+        is false (or not specified)
+        -->
+        <attribute>
+            <name>forceIdIndex</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>
+                If false, this component will not append a '[n]' suffix (where 'n' is the row index) to components 
+                that are contained within a "list."  This value will be true by default and the value will be ignored if 
+                the value of forceId is false (or not specified.)
+            </description>
+        </attribute>        
+
+    </tag>
+
+    <!-- message -->
+    <tag>
+        <name>message</name>
+        <tag-class>org.apache.myfaces.taglib.html.ext.HtmlMessageTag</tag-class>
+        <body-content>JSP</body-content>
+        <description>
+            MyFaces extension to the standard messages tag: see summaryDetailSeparator attribute
+        </description>
+                <!-- all standard attributes of the message tag -->
+                <!-- UIMessage attributes -->
+        <!-- UIComponent attributes -->
+        <attribute>
+            <name>id</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Every component may have an unique id. Automatically created if omitted.</description>
+        </attribute>
+        <attribute>
+            <name>rendered</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If false, this component will not be rendered.</description>
+        </attribute>
+        <attribute>
+            <name>binding</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Component binding.</description>
+        </attribute>
+
+        <attribute>
+            <name>for</name>
+            <required>true</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>The client identifier of the component for which this component represents associated message(s).</description>
+        </attribute>
+        <attribute>
+            <name>showSummary</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Indicates whether the summary of the associated message(s) should be displayed.
+                         Default is: true</description>
+        </attribute>
+        <attribute>
+            <name>showDetail</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Indicates whether the detail of the associated message(s) should be displayed.
+                         Default is: false</description>
+        </attribute>
+
+
+        <!-- HTML 4.0 universal attributes -->
+        <attribute><name>dir</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>lang</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>style</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>title</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute>
+            <name>styleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Corresponds to the HTML class attribute.</description>
+        </attribute>
+
+        <!-- HTML 4.0 event-handler attributes -->
+        <attribute><name>onclick</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>ondblclick</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousedown</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseup</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseover</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousemove</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseout</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeypress</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeydown</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeyup</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+
+        <!-- HtmlMessage attributes -->
+        <attribute>
+            <name>infoClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>CSS class to be used for messages with severity "INFO".</description>
+        </attribute>
+        <attribute>
+            <name>infoStyle</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>CSS style to be used for messages with severity "INFO".</description>
+        </attribute>
+        <attribute>
+            <name>warnClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>CSS class to be used for messages with severity "WARN".</description>
+        </attribute>
+        <attribute>
+            <name>warnStyle</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>CSS style to be used for messages with severity "WARN".</description>
+        </attribute>
+        <attribute>
+            <name>errorClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>CSS class to be used for messages with severity "ERROR".</description>
+        </attribute>
+        <attribute>
+            <name>errorStyle</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>CSS style to be used for messages with severity "ERROR".</description>
+        </attribute>
+        <attribute>
+            <name>fatalClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>CSS class to be used for messages with severity "FATAL".</description>
+        </attribute>
+        <attribute>
+            <name>fatalStyle</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>CSS style to be used for messages with severity "FATAL".</description>
+        </attribute>
+        <attribute>
+            <name>tooltip</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If true, the message summary will be rendered as a tooltip (i.e. HTML title attribute).
+            </description>
+        </attribute>
+
+        <!-- MyFaces extensions -->
+        <!-- MyFaces extension: user role attributes -->
+        <attribute>
+            <name>enabledOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, no hyperlink is rendered but all nested
+                tags (=body) are rendered.
+            </description>
+        </attribute>
+        <attribute>
+            <name>visibleOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, nothing is rendered and the body of this tag
+                will be skipped.
+            </description>
+        </attribute>
+
+                <!-- 
+        This attribute indicates that the component should be forced to use the specified id instead of 
+        using the one that faces generates.  Components contained within a "list" will include a '[n]'  
+        suffix where 'n' is the row index (unless the forceIdIndex attribute is set to false).
+        -->
+        <attribute>
+            <name>forceId</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If true, this component will force the use of the specified id when rendering.</description>
+        </attribute>        
+
+        <!-- 
+        If the component is contained within an "list" (such as dataTable), this attribute indicates whether or not a 
+        '[n]' suffix should be added where 'n' is the row index.  Default is true.  The attribute is ignored if forceId 
+        is false (or not specified)
+        -->
+        <attribute>
+            <name>forceIdIndex</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>
+                If false, this component will not append a '[n]' suffix (where 'n' is the row index) to components 
+                that are contained within a "list."  This value will be true by default and the value will be ignored if 
+                the value of forceId is false (or not specified.)
+            </description>
+        </attribute>        
+
+        <attribute>
+            <name>summaryFormat</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If present, instead of rendering the message summary, a MessageFormat with this
+                attribute as pattern is created. The format method of this MessageFormat is
+                called with the message summary as the first argument and the label of the
+                associated component (if any) as the second argument.
+                Example: "{0}:"
+            </description>
+        </attribute>
+        <attribute>
+            <name>detailFormat</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If present, instead of rendering the message detail, a MessageFormat with this
+                attribute as pattern is created. The format method of this MessageFormat is
+                called with the message detail as the first argument and the label of the
+                associated component (if any) as the second argument.
+                Example: "The input in field {1} is wrong: {0}"
+            </description>
+        </attribute>
+        <attribute>
+            <name>replaceIdWithLabel</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If present, all occurrences of the id of the component for which the message
+                is rendered will be replaced by the label. Standard is true for the extended
+                message renderer.
+            </description>
+        </attribute>
+    </tag>
+
+    <!-- messages -->
+    <tag>
+        <name>messages</name>
+        <tag-class>org.apache.myfaces.taglib.html.ext.HtmlMessagesTag</tag-class>
+        <body-content>JSP</body-content>
+        <description>
+            MyFaces extension to the standard messages tag: see showInputLabel attribute
+        </description>
+                <!-- all standard attributes of the messages tag -->
+                <!-- UIMessages attributes -->
+        <!-- UIComponent attributes -->
+        <attribute>
+            <name>id</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Every component may have an unique id. Automatically created if omitted.</description>
+        </attribute>
+        <attribute>
+            <name>rendered</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If false, this component will not be rendered.</description>
+        </attribute>
+        <attribute>
+            <name>binding</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Component binding.</description>
+        </attribute>
+
+        <attribute>
+            <name>showSummary</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Indicates whether the summary of the message(s) should be displayed.
+                         Default is: true</description>
+        </attribute>
+        <attribute>
+            <name>showDetail</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Indicates whether the detail of the message(s) should be displayed.
+                         Default is: false</description>
+        </attribute>
+        <attribute>
+            <name>globalOnly</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Indicates whether only global messages (that is, messages with no associated client identifier) should be rendered.
+                         Default is: false</description>
+        </attribute>
+
+        <!-- HTML 4.0 universal attributes -->
+        <attribute><name>dir</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>lang</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>style</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>title</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute>
+            <name>styleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Corresponds to the HTML class attribute.</description>
+        </attribute>
+
+        <!-- HTML 4.0 event-handler attributes -->
+        <attribute><name>onclick</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>ondblclick</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousedown</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseup</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseover</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousemove</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseout</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeypress</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeydown</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeyup</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+
+        <!-- HtmlMessages attributes -->
+        <attribute>
+            <name>infoClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>CSS class to be used for messages with severity "INFO".</description>
+        </attribute>
+        <attribute>
+            <name>infoStyle</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>CSS style to be used for messages with severity "INFO".</description>
+        </attribute>
+        <attribute>
+            <name>warnClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>CSS class to be used for messages with severity "WARN".</description>
+        </attribute>
+        <attribute>
+            <name>warnStyle</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>CSS style to be used for messages with severity "WARN".</description>
+        </attribute>
+        <attribute>
+            <name>errorClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>CSS class to be used for messages with severity "ERROR".</description>
+        </attribute>
+        <attribute>
+            <name>errorStyle</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>CSS style to be used for messages with severity "ERROR".</description>
+        </attribute>
+        <attribute>
+            <name>fatalClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>CSS class to be used for messages with severity "FATAL".</description>
+        </attribute>
+        <attribute>
+            <name>fatalStyle</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>CSS style to be used for messages with severity "FATAL".</description>
+        </attribute>
+        <attribute>
+            <name>layout</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>The layout: "table" or "list". Default: list</description>
+        </attribute>
+        <attribute>
+            <name>tooltip</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If true, the message summary will be rendered as a tooltip (i.e. HTML title attribute).
+            </description>
+        </attribute>
+
+        <!-- MyFaces extensions -->
+        <!-- MyFaces extension: user role attributes -->
+        <attribute>
+            <name>enabledOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, no hyperlink is rendered but all nested
+                tags (=body) are rendered.
+            </description>
+        </attribute>
+        <attribute>
+            <name>visibleOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, nothing is rendered and the body of this tag
+                will be skipped.
+            </description>
+        </attribute>
+
+                <!-- 
+        This attribute indicates that the component should be forced to use the specified id instead of 
+        using the one that faces generates.  Components contained within a "list" will include a '[n]'  
+        suffix where 'n' is the row index (unless the forceIdIndex attribute is set to false).
+        -->
+        <attribute>
+            <name>forceId</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If true, this component will force the use of the specified id when rendering.</description>
+        </attribute>        
+
+        <!-- 
+        If the component is contained within an "list" (such as dataTable), this attribute indicates whether or not a 
+        '[n]' suffix should be added where 'n' is the row index.  Default is true.  The attribute is ignored if forceId 
+        is false (or not specified)
+        -->
+        <attribute>
+            <name>forceIdIndex</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>
+                If false, this component will not append a '[n]' suffix (where 'n' is the row index) to components 
+                that are contained within a "list."  This value will be true by default and the value will be ignored if 
+                the value of forceId is false (or not specified.)
+            </description>
+        </attribute>        
+
+        <attribute>
+            <name>summaryFormat</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If present, instead of rendering the message summary, a MessageFormat with this
+                attribute as pattern is created. The format method of this MessageFormat is
+                called with the message summary as the first argument and the label of the
+                associated component (if any) as the second argument.
+                Example: "{0}:" or "{0} in field {1}"
+            </description>
+        </attribute>
+        <attribute>
+            <name>globalSummaryFormat</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Like summaryFormat, but applies to global messages (i.e. messages not associated
+                with a component). If no globalSummaryFormat is given, the summaryFormat is used for
+                global messages.
+                Example: "{0}:"
+            </description>
+        </attribute>
+        <attribute>
+            <name>detailFormat</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If present, instead of rendering the message detail, a MessageFormat with this
+                attribute as pattern is created. The format method of this MessageFormat is
+                called with the message detail as the first argument and the label of the
+                associated component (if any) as the second argument.
+                Example: "The input in field {1} is wrong: {0}"
+            </description>
+        </attribute>
+        <attribute>
+            <name>replaceIdWithLabel</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If present, all occurrences of the id of the component for which the message
+                is rendered will be replaced by the label.
+            </description>
+        </attribute>
+    </tag>
+
+    <!-- outputLabel -->
+    <tag>
+        <name>outputLabel</name>
+        <tag-class>org.apache.myfaces.taglib.html.ext.HtmlOutputLabelTag</tag-class>
+        <body-content>JSP</body-content>
+        <description>
+            Extends standard outputLabel by user role support.
+        </description>
+                <!-- all standard attributes of the outputLabel tag -->
+                <!-- UIOutput attributes -->
+        <!-- UIComponent attributes -->
+        <attribute>
+            <name>id</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Every component may have an unique id. Automatically created if omitted.</description>
+        </attribute>
+        <attribute>
+            <name>rendered</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If false, this component will not be rendered.</description>
+        </attribute>
+        <attribute>
+            <name>binding</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Component binding.</description>
+        </attribute>
+
+        <attribute>
+            <name>value</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Initial value to set when rendered for the first time.</description>
+        </attribute>
+        <attribute>
+            <name>converter</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Id of Converter to be used or reference to a Converter.</description>
+        </attribute>
+
+        <!-- HTML 4.0 universal attributes -->
+        <attribute><name>dir</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>lang</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>style</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>title</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute>
+            <name>styleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Corresponds to the HTML class attribute.</description>
+        </attribute>
+
+        <!-- HTML 4.0 event-handler attributes -->
+        <attribute><name>onclick</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>ondblclick</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousedown</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseup</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseover</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousemove</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseout</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeypress</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeydown</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeyup</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+
+        <!-- HTML 4.0 label attributes -->
+        <attribute><name>accesskey</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <!-- "for" is a specific LabelRenderer attribute -->
+        <attribute><name>onblur</name>      <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onfocus</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+
+        <!-- LabelRenderer attributes -->
+        <attribute>
+          <name>for</name>
+          <required>false</required>
+          <rtexprvalue>false</rtexprvalue>
+        </attribute>
+
+        <!-- MyFaces extension: user role attributes -->
+        <attribute>
+            <name>enabledOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, no hyperlink is rendered but all nested
+                tags (=body) are rendered.
+            </description>
+        </attribute>
+        <attribute>
+            <name>visibleOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, nothing is rendered and the body of this tag
+                will be skipped.
+            </description>
+        </attribute>
+
+                <!-- 
+        This attribute indicates that the component should be forced to use the specified id instead of 
+        using the one that faces generates.  Components contained within a "list" will include a '[n]'  
+        suffix where 'n' is the row index (unless the forceIdIndex attribute is set to false).
+        -->
+        <attribute>
+            <name>forceId</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If true, this component will force the use of the specified id when rendering.</description>
+        </attribute>        
+
+        <!-- 
+        If the component is contained within an "list" (such as dataTable), this attribute indicates whether or not a 
+        '[n]' suffix should be added where 'n' is the row index.  Default is true.  The attribute is ignored if forceId 
+        is false (or not specified)
+        -->
+        <attribute>
+            <name>forceIdIndex</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>
+                If false, this component will not append a '[n]' suffix (where 'n' is the row index) to components 
+                that are contained within a "list."  This value will be true by default and the value will be ignored if 
+                the value of forceId is false (or not specified.)
+            </description>
+        </attribute>        
+
+    </tag>
+
+    <!-- outputText -->
+    <tag>
+        <name>outputText</name>
+        <tag-class>org.apache.myfaces.taglib.html.ext.HtmlOutputTextTag</tag-class>
+        <body-content>JSP</body-content>
+        <description>
+            Extends standard outputText by user role support.
+        </description>
+                <!-- all standard attributes of the outputText tag -->
+                <!-- UIOutput attributes -->
+        <!-- UIComponent attributes -->
+        <attribute>
+            <name>id</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Every component may have an unique id. Automatically created if omitted.</description>
+        </attribute>
+        <attribute>
+            <name>rendered</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If false, this component will not be rendered.</description>
+        </attribute>
+        <attribute>
+            <name>binding</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Component binding.</description>
+        </attribute>
+
+        <attribute>
+            <name>value</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Initial value to set when rendered for the first time.</description>
+        </attribute>
+        <attribute>
+            <name>converter</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Id of Converter to be used or reference to a Converter.</description>
+        </attribute>
+
+        <!-- HTML 4.0 universal attributes -->
+        <attribute><name>dir</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>lang</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>style</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>title</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute>
+            <name>styleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Corresponds to the HTML class attribute.</description>
+        </attribute>
+
+        <!-- HTML 4.0 event-handler attributes -->
+        <attribute><name>onclick</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>ondblclick</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousedown</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseup</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseover</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousemove</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseout</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeypress</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeydown</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeyup</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+
+        <!-- HtmlOutputText attributes -->
+        <attribute>
+            <name>escape</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Indicates whether rendered markup should be escaped.
+                Default: true
+            </description>
+        </attribute>
+
+        <!-- MyFaces extension: user role attributes -->
+        <attribute>
+            <name>enabledOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, no hyperlink is rendered but all nested
+                tags (=body) are rendered.
+            </description>
+        </attribute>
+        <attribute>
+            <name>visibleOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, nothing is rendered and the body of this tag
+                will be skipped.
+            </description>
+        </attribute>
+
+                <!-- 
+        This attribute indicates that the component should be forced to use the specified id instead of 
+        using the one that faces generates.  Components contained within a "list" will include a '[n]'  
+        suffix where 'n' is the row index (unless the forceIdIndex attribute is set to false).
+        -->
+        <attribute>
+            <name>forceId</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If true, this component will force the use of the specified id when rendering.</description>
+        </attribute>        
+
+        <!-- 
+        If the component is contained within an "list" (such as dataTable), this attribute indicates whether or not a 
+        '[n]' suffix should be added where 'n' is the row index.  Default is true.  The attribute is ignored if forceId 
+        is false (or not specified)
+        -->
+        <attribute>
+            <name>forceIdIndex</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>
+                If false, this component will not append a '[n]' suffix (where 'n' is the row index) to components 
+                that are contained within a "list."  This value will be true by default and the value will be ignored if 
+                the value of forceId is false (or not specified.)
+            </description>
+        </attribute>        
+
+    </tag>
+
+    <!-- panelGrid -->
+    <tag>
+        <name>panelGrid</name>
+        <tag-class>org.apache.myfaces.taglib.html.ext.HtmlPanelGridTag</tag-class>
+        <body-content>JSP</body-content>
+        <description>
+            Extends standard panelGrid by user role support.
+        </description>
+                        <!-- UIPanel attributes -->
+        <!-- UIComponent attributes -->
+        <attribute>
+            <name>id</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Every component may have an unique id. Automatically created if omitted.</description>
+        </attribute>
+        <attribute>
+            <name>rendered</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If false, this component will not be rendered.</description>
+        </attribute>
+        <attribute>
+            <name>binding</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Component binding.</description>
+        </attribute>
+
+
+        <!-- HTML 4.0 universal attributes -->
+        <attribute><name>dir</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>lang</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>style</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>title</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute>
+            <name>styleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Corresponds to the HTML class attribute.</description>
+        </attribute>
+
+        <!-- HTML 4.0 event-handler attributes -->
+        <attribute><name>onclick</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>ondblclick</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousedown</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseup</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseover</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousemove</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseout</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeypress</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeydown</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeyup</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+
+        <!-- HTML 4.0 table attributes -->
+        <attribute><name>align</name>           <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>border</name>          <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>bgcolor</name>         <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>cellpadding</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>cellspacing</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>datafld</name>         <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>datasrc</name>         <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>dataformatas</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>frame</name>           <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>rules</name>           <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>summary</name>         <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>width</name>           <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+
+        <!-- GridRenderer attributes -->
+        <attribute>
+            <name>columnClasses</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>columns</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>footerClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>headerClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>rowClasses</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+
+        <!-- MyFaces extension: user role attributes -->
+        <attribute>
+            <name>enabledOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, no hyperlink is rendered but all nested
+                tags (=body) are rendered.
+            </description>
+        </attribute>
+        <attribute>
+            <name>visibleOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, nothing is rendered and the body of this tag
+                will be skipped.
+            </description>
+        </attribute>
+
+                <!-- 
+        This attribute indicates that the component should be forced to use the specified id instead of 
+        using the one that faces generates.  Components contained within a "list" will include a '[n]'  
+        suffix where 'n' is the row index (unless the forceIdIndex attribute is set to false).
+        -->
+        <attribute>
+            <name>forceId</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If true, this component will force the use of the specified id when rendering.</description>
+        </attribute>        
+
+        <!-- 
+        If the component is contained within an "list" (such as dataTable), this attribute indicates whether or not a 
+        '[n]' suffix should be added where 'n' is the row index.  Default is true.  The attribute is ignored if forceId 
+        is false (or not specified)
+        -->
+        <attribute>
+            <name>forceIdIndex</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>
+                If false, this component will not append a '[n]' suffix (where 'n' is the row index) to components 
+                that are contained within a "list."  This value will be true by default and the value will be ignored if 
+                the value of forceId is false (or not specified.)
+            </description>
+        </attribute>        
+
+        <!-- MyFaces extension: user role attributes -->
+        <attribute>
+            <name>displayValueOnly</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If true, renders only the value of the component, but no input widget.
+                Default is false.
+            </description>
+        </attribute>
+        <attribute>
+            <name>displayValueOnlyStyle</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Style used when displayValueOnly is true.
+            </description>
+        </attribute>
+        <attribute>
+            <name>displayValueOnlyStyleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Style class used when displayValueOnly is true.
+            </description>
+        </attribute>        
+    </tag>
+
+    <!-- panelGroup -->
+    <tag>
+        <name>panelGroup</name>
+        <tag-class>org.apache.myfaces.taglib.html.ext.HtmlPanelGroupTag</tag-class>
+        <body-content>JSP</body-content>
+        <description>
+            Extends standard panelGroup by user role support.
+        </description>
+                <!-- all standard attributes of the panelGroup tag -->
+                <!-- UIPanel attributes -->
+        <!-- UIComponent attributes -->
+        <attribute>
+            <name>id</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Every component may have an unique id. Automatically created if omitted.</description>
+        </attribute>
+        <attribute>
+            <name>rendered</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If false, this component will not be rendered.</description>
+        </attribute>
+        <attribute>
+            <name>binding</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Component binding.</description>
+        </attribute>
+
+
+        <!-- HTML 4.0 universal attributes -->
+        <attribute><name>dir</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>lang</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>style</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>title</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute>
+            <name>styleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Corresponds to the HTML class attribute.</description>
+        </attribute>
+
+        <!-- HTML 4.0 event-handler attributes -->
+        <attribute><name>onclick</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>ondblclick</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousedown</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseup</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseover</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousemove</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseout</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeypress</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeydown</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeyup</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+
+
+        <!-- MyFaces extension: user role attributes -->
+        <attribute>
+            <name>enabledOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, no hyperlink is rendered but all nested
+                tags (=body) are rendered.
+            </description>
+        </attribute>
+        <attribute>
+            <name>visibleOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, nothing is rendered and the body of this tag
+                will be skipped.
+            </description>
+        </attribute>
+
+                <!-- 
+        This attribute indicates that the component should be forced to use the specified id instead of 
+        using the one that faces generates.  Components contained within a "list" will include a '[n]'  
+        suffix where 'n' is the row index (unless the forceIdIndex attribute is set to false).
+        -->
+        <attribute>
+            <name>forceId</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If true, this component will force the use of the specified id when rendering.</description>
+        </attribute>        
+
+        <!-- 
+        If the component is contained within an "list" (such as dataTable), this attribute indicates whether or not a 
+        '[n]' suffix should be added where 'n' is the row index.  Default is true.  The attribute is ignored if forceId 
+        is false (or not specified)
+        -->
+        <attribute>
+            <name>forceIdIndex</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>
+                If false, this component will not append a '[n]' suffix (where 'n' is the row index) to components 
+                that are contained within a "list."  This value will be true by default and the value will be ignored if 
+                the value of forceId is false (or not specified.)
+            </description>
+        </attribute>        
+
+        <!-- MyFaces extension: user role attributes -->
+        <attribute>
+            <name>displayValueOnly</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If true, renders only the value of the component, but no input widget.
+                Default is false.
+            </description>
+        </attribute>
+        <attribute>
+            <name>displayValueOnlyStyle</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Style used when displayValueOnly is true.
+            </description>
+        </attribute>
+        <attribute>
+            <name>displayValueOnlyStyleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Style class used when displayValueOnly is true.
+            </description>
+        </attribute>        
+    </tag>
+
+    <!-- selectOneMenu -->
+    <tag>
+        <name>selectOneMenu</name>
+        <tag-class>org.apache.myfaces.taglib.html.ext.HtmlSelectOneMenuTag</tag-class>
+        <body-content>JSP</body-content>
+        <description>
+            Extends standard selectOneMenu by user role support.
+        </description>
+                <!-- all standard attributes of the selectOneMenu tag -->
+                <!-- UISelectOne attributes -->
+                <!-- UIInput attributes -->
+                <!-- UIOutput attributes -->
+        <!-- UIComponent attributes -->
+        <attribute>
+            <name>id</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Every component may have an unique id. Automatically created if omitted.</description>
+        </attribute>
+        <attribute>
+            <name>rendered</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If false, this component will not be rendered.</description>
+        </attribute>
+        <attribute>
+            <name>binding</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Component binding.</description>
+        </attribute>
+
+        <attribute>
+            <name>value</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Initial value to set when rendered for the first time.</description>
+        </attribute>
+        <attribute>
+            <name>converter</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Id of Converter to be used or reference to a Converter.</description>
+        </attribute>
+
+        <attribute>
+            <name>immediate</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description> Flag indicating that this component's value must be converted and validated immediately (that is, during Apply Request Values phase), rather than waiting until Process Validations phase.</description>
+        </attribute>
+        <attribute>
+            <name>required</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If true, this component will be checked for non-empty input.</description>
+        </attribute>
+        <attribute>
+            <name>validator</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>MethodBinding pointing at a method that will be called during Process Validations phase of the request processing lifecycle, to validate the current value of this component.</description>
+        </attribute>
+        <attribute>
+            <name>valueChangeListener</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Listener for value changes.</description>
+        </attribute>
+
+
+        <!-- HTML 4.0 universal attributes -->
+        <attribute><name>dir</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>lang</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>style</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>title</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute>
+            <name>styleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Corresponds to the HTML class attribute.</description>
+        </attribute>
+
+        <!-- HTML 4.0 event-handler attributes -->
+        <attribute><name>onclick</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>ondblclick</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousedown</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseup</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseover</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousemove</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseout</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeypress</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeydown</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeyup</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+
+        <!-- HTML 4.0 select attributes -->
+        <attribute><name>datafld</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>datasrc</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>dataformatas</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>disabled</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <!-- "multiple" cannot be set manually -->
+        <!-- "name" cannot be set manually -->
+        <attribute><name>onblur</name>      <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onchange</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onfocus</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <!-- "size" cannot be set directly for it is a MenuRenderer specific attribute -->
+        <attribute><name>tabindex</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute>
+            <name>readonly</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Flag indicating that this component will prohibit
+          changes by the user.  The element may receive focus
+          unless it has also been disabled.</description>
+        </attribute>
+        <attribute><name>enabledClass</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+         <attribute><name>disabledClass</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <!-- MyFaces extension: user role attributes -->
+        <attribute>
+            <name>enabledOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, no hyperlink is rendered but all nested
+                tags (=body) are rendered.
+            </description>
+        </attribute>
+        <attribute>
+            <name>visibleOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, nothing is rendered and the body of this tag
+                will be skipped.
+            </description>
+        </attribute>
+
+                <!-- 
+        This attribute indicates that the component should be forced to use the specified id instead of 
+        using the one that faces generates.  Components contained within a "list" will include a '[n]'  
+        suffix where 'n' is the row index (unless the forceIdIndex attribute is set to false).
+        -->
+        <attribute>
+            <name>forceId</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If true, this component will force the use of the specified id when rendering.</description>
+        </attribute>        
+
+        <!-- 
+        If the component is contained within an "list" (such as dataTable), this attribute indicates whether or not a 
+        '[n]' suffix should be added where 'n' is the row index.  Default is true.  The attribute is ignored if forceId 
+        is false (or not specified)
+        -->
+        <attribute>
+            <name>forceIdIndex</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>
+                If false, this component will not append a '[n]' suffix (where 'n' is the row index) to components 
+                that are contained within a "list."  This value will be true by default and the value will be ignored if 
+                the value of forceId is false (or not specified.)
+            </description>
+        </attribute>        
+
+        <!-- MyFaces extension: user role attributes -->
+        <attribute>
+            <name>displayValueOnly</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If true, renders only the value of the component, but no input widget.
+                Default is false.
+            </description>
+        </attribute>
+        <attribute>
+            <name>displayValueOnlyStyle</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Style used when displayValueOnly is true.
+            </description>
+        </attribute>
+        <attribute>
+            <name>displayValueOnlyStyleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Style class used when displayValueOnly is true.
+            </description>
+        </attribute>        
+    </tag>
+
+    <!-- selectManyMenu -->
+    <tag>
+        <name>selectManyMenu</name>
+        <tag-class>org.apache.myfaces.taglib.html.ext.HtmlSelectManyMenuTag</tag-class>
+        <body-content>JSP</body-content>
+        <description>
+            Extends standard selectManyMenu by user role support.
+        </description>
+                        <!-- UISelectMany attributes -->
+                <!-- UIInput attributes -->
+                <!-- UIOutput attributes -->
+        <!-- UIComponent attributes -->
+        <attribute>
+            <name>id</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Every component may have an unique id. Automatically created if omitted.</description>
+        </attribute>
+        <attribute>
+            <name>rendered</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If false, this component will not be rendered.</description>
+        </attribute>
+        <attribute>
+            <name>binding</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Component binding.</description>
+        </attribute>
+
+        <attribute>
+            <name>value</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Initial value to set when rendered for the first time.</description>
+        </attribute>
+        <attribute>
+            <name>converter</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Id of Converter to be used or reference to a Converter.</description>
+        </attribute>
+
+        <attribute>
+            <name>immediate</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description> Flag indicating that this component's value must be converted and validated immediately (that is, during Apply Request Values phase), rather than waiting until Process Validations phase.</description>
+        </attribute>
+        <attribute>
+            <name>required</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If true, this component will be checked for non-empty input.</description>
+        </attribute>
+        <attribute>
+            <name>validator</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>MethodBinding pointing at a method that will be called during Process Validations phase of the request processing lifecycle, to validate the current value of this component.</description>
+        </attribute>
+        <attribute>
+            <name>valueChangeListener</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Listener for value changes.</description>
+        </attribute>
+
+
+        <!-- HTML 4.0 universal attributes -->
+        <attribute><name>dir</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>lang</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>style</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>title</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute>
+            <name>styleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Corresponds to the HTML class attribute.</description>
+        </attribute>
+
+        <!-- HTML 4.0 event-handler attributes -->
+        <attribute><name>onclick</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>ondblclick</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousedown</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseup</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseover</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousemove</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseout</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeypress</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeydown</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeyup</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+
+        <!-- HTML 4.0 select attributes -->
+        <attribute><name>datafld</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>datasrc</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>dataformatas</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>disabled</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <!-- "multiple" cannot be set manually -->
+        <!-- "name" cannot be set manually -->
+        <attribute><name>onblur</name>      <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onchange</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onfocus</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <!-- "size" cannot be set directly for it is a MenuRenderer specific attribute -->
+        <attribute><name>tabindex</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute>
+            <name>readonly</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Flag indicating that this component will prohibit
+          changes by the user.  The element may receive focus
+          unless it has also been disabled.</description>
+        </attribute>
+        <attribute><name>enabledClass</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+         <attribute><name>disabledClass</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        
+        <!-- MyFaces extension: user role attributes -->
+        <attribute>
+            <name>enabledOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, no hyperlink is rendered but all nested
+                tags (=body) are rendered.
+            </description>
+        </attribute>
+        <attribute>
+            <name>visibleOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, nothing is rendered and the body of this tag
+                will be skipped.
+            </description>
+        </attribute>
+
+                <!-- 
+        This attribute indicates that the component should be forced to use the specified id instead of 
+        using the one that faces generates.  Components contained within a "list" will include a '[n]'  
+        suffix where 'n' is the row index (unless the forceIdIndex attribute is set to false).
+        -->
+        <attribute>
+            <name>forceId</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If true, this component will force the use of the specified id when rendering.</description>
+        </attribute>        
+
+        <!-- 
+        If the component is contained within an "list" (such as dataTable), this attribute indicates whether or not a 
+        '[n]' suffix should be added where 'n' is the row index.  Default is true.  The attribute is ignored if forceId 
+        is false (or not specified)
+        -->
+        <attribute>
+            <name>forceIdIndex</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>
+                If false, this component will not append a '[n]' suffix (where 'n' is the row index) to components 
+                that are contained within a "list."  This value will be true by default and the value will be ignored if 
+                the value of forceId is false (or not specified.)
+            </description>
+        </attribute>        
+
+        <!-- MyFaces extension: user role attributes -->
+        <attribute>
+            <name>displayValueOnly</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If true, renders only the value of the component, but no input widget.
+                Default is false.
+            </description>
+        </attribute>
+        <attribute>
+            <name>displayValueOnlyStyle</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Style used when displayValueOnly is true.
+            </description>
+        </attribute>
+        <attribute>
+            <name>displayValueOnlyStyleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Style class used when displayValueOnly is true.
+            </description>
+        </attribute>        
+    </tag>
+
+    <!-- selectOneRadio -->
+    <tag>
+        <name>selectOneRadio</name>
+        <tag-class>org.apache.myfaces.taglib.html.ext.HtmlSelectOneRadioTag</tag-class>
+        <body-content>JSP</body-content>
+        <description>
+            Extends standard selectOneRadio by user role support.
+            Additionally this extended selectOneRadio accepts a layout attribute
+            of value "spread" (see custom radio tag).
+        </description>
+                <!-- all standard attributes of the selectOneRadio tag -->
+                <!-- UISelectOne attributes -->
+                <!-- UIInput attributes -->
+                <!-- UIOutput attributes -->
+        <!-- UIComponent attributes -->
+        <attribute>
+            <name>id</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Every component may have an unique id. Automatically created if omitted.</description>
+        </attribute>
+        <attribute>
+            <name>rendered</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If false, this component will not be rendered.</description>
+        </attribute>
+        <attribute>
+            <name>binding</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Component binding.</description>
+        </attribute>
+
+        <attribute>
+            <name>value</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Initial value to set when rendered for the first time.</description>
+        </attribute>
+        <attribute>
+            <name>converter</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Id of Converter to be used or reference to a Converter.</description>
+        </attribute>
+
+        <attribute>
+            <name>immediate</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description> Flag indicating that this component's value must be converted and validated immediately (that is, during Apply Request Values phase), rather than waiting until Process Validations phase.</description>
+        </attribute>
+        <attribute>
+            <name>required</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If true, this component will be checked for non-empty input.</description>
+        </attribute>
+        <attribute>
+            <name>validator</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>MethodBinding pointing at a method that will be called during Process Validations phase of the request processing lifecycle, to validate the current value of this component.</description>
+        </attribute>
+        <attribute>
+            <name>valueChangeListener</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Listener for value changes.</description>
+        </attribute>
+
+
+        <!-- HTML 4.0 universal attributes -->
+        <attribute><name>dir</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>lang</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>style</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>title</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute>
+            <name>styleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Corresponds to the HTML class attribute.</description>
+        </attribute>
+
+        <!-- HTML 4.0 event-handler attributes -->
+        <attribute><name>onclick</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>ondblclick</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousedown</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseup</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseover</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousemove</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseout</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeypress</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeydown</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeyup</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+
+        <!-- HTML 4.0 input attributes for type "radio" -->
+        <attribute><name>accesskey</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>alt</name>         <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>datafld</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>datasrc</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>dataformatas</name><required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>disabled</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>onblur</name>      <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>onchange</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>onfocus</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>onselect</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>readonly</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>tabindex</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+
+        <!-- RadioRenderer attributes -->
+        <attribute>
+            <name>layout</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>see JSF Spec. 8.5.10</description>
+        </attribute>
+        <attribute>
+            <name>border</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>see JSF Spec. 8.5.10</description>
+        </attribute>
+        <attribute><name>enabledClass</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+         <attribute><name>disabledClass</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+
+        <!-- MyFaces extension: user role attributes -->
+        <attribute>
+            <name>enabledOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, no hyperlink is rendered but all nested
+                tags (=body) are rendered.
+            </description>
+        </attribute>
+        <attribute>
+            <name>visibleOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, nothing is rendered and the body of this tag
+                will be skipped.
+            </description>
+        </attribute>
+
+                <!-- 
+        This attribute indicates that the component should be forced to use the specified id instead of 
+        using the one that faces generates.  Components contained within a "list" will include a '[n]'  
+        suffix where 'n' is the row index (unless the forceIdIndex attribute is set to false).
+        -->
+        <attribute>
+            <name>forceId</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If true, this component will force the use of the specified id when rendering.</description>
+        </attribute>        
+
+        <!-- 
+        If the component is contained within an "list" (such as dataTable), this attribute indicates whether or not a 
+        '[n]' suffix should be added where 'n' is the row index.  Default is true.  The attribute is ignored if forceId 
+        is false (or not specified)
+        -->
+        <attribute>
+            <name>forceIdIndex</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>
+                If false, this component will not append a '[n]' suffix (where 'n' is the row index) to components 
+                that are contained within a "list."  This value will be true by default and the value will be ignored if 
+                the value of forceId is false (or not specified.)
+            </description>
+        </attribute>        
+
+        <!-- MyFaces extension: user role attributes -->
+        <attribute>
+            <name>displayValueOnly</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If true, renders only the value of the component, but no input widget.
+                Default is false.
+            </description>
+        </attribute>
+        <attribute>
+            <name>displayValueOnlyStyle</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Style used when displayValueOnly is true.
+            </description>
+        </attribute>
+        <attribute>
+            <name>displayValueOnlyStyleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Style class used when displayValueOnly is true.
+            </description>
+        </attribute>        
+    </tag>
+
+    <!-- selectBooleanCheckbox -->
+    <tag>
+        <name>selectBooleanCheckbox</name>
+        <tag-class>org.apache.myfaces.taglib.html.ext.HtmlSelectBooleanCheckboxTag</tag-class>
+        <body-content>JSP</body-content>
+        <description>
+            Extends standard selectBooleanCheckbox by user role support.
+        </description>
+                        <!-- UISelectBoolean attributes -->
+        <!-- "selected" attribute is covered by HTML "checked" attribute -->
+                <!-- UIInput attributes -->
+                <!-- UIOutput attributes -->
+        <!-- UIComponent attributes -->
+        <attribute>
+            <name>id</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Every component may have an unique id. Automatically created if omitted.</description>
+        </attribute>
+        <attribute>
+            <name>rendered</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If false, this component will not be rendered.</description>
+        </attribute>
+        <attribute>
+            <name>binding</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Component binding.</description>
+        </attribute>
+
+        <attribute>
+            <name>value</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Initial value to set when rendered for the first time.</description>
+        </attribute>
+        <attribute>
+            <name>converter</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Id of Converter to be used or reference to a Converter.</description>
+        </attribute>
+
+        <attribute>
+            <name>immediate</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description> Flag indicating that this component's value must be converted and validated immediately (that is, during Apply Request Values phase), rather than waiting until Process Validations phase.</description>
+        </attribute>
+        <attribute>
+            <name>required</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If true, this component will be checked for non-empty input.</description>
+        </attribute>
+        <attribute>
+            <name>validator</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>MethodBinding pointing at a method that will be called during Process Validations phase of the request processing lifecycle, to validate the current value of this component.</description>
+        </attribute>
+        <attribute>
+            <name>valueChangeListener</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Listener for value changes.</description>
+        </attribute>
+
+
+        <!-- HTML 4.0 universal attributes -->
+        <attribute><name>dir</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>lang</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>style</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>title</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute>
+            <name>styleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Corresponds to the HTML class attribute.</description>
+        </attribute>
+
+        <!-- HTML 4.0 event-handler attributes -->
+        <attribute><name>onclick</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>ondblclick</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousedown</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseup</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseover</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousemove</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseout</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeypress</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeydown</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeyup</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+
+        <!-- HTML 4.0 input attributes for type "checkbox" -->
+        <attribute><name>accesskey</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>alt</name>         <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>datafld</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>datasrc</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>dataformatas</name><required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>disabled</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>onblur</name>      <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>onchange</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>onfocus</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>onselect</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>readonly</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>tabindex</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+
+        <!-- MyFaces extension: user role attributes -->
+        <attribute>
+            <name>enabledOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, no hyperlink is rendered but all nested
+                tags (=body) are rendered.
+            </description>
+        </attribute>
+        <attribute>
+            <name>visibleOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, nothing is rendered and the body of this tag
+                will be skipped.
+            </description>
+        </attribute>
+
+                <!-- 
+        This attribute indicates that the component should be forced to use the specified id instead of 
+        using the one that faces generates.  Components contained within a "list" will include a '[n]'  
+        suffix where 'n' is the row index (unless the forceIdIndex attribute is set to false).
+        -->
+        <attribute>
+            <name>forceId</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If true, this component will force the use of the specified id when rendering.</description>
+        </attribute>        
+
+        <!-- 
+        If the component is contained within an "list" (such as dataTable), this attribute indicates whether or not a 
+        '[n]' suffix should be added where 'n' is the row index.  Default is true.  The attribute is ignored if forceId 
+        is false (or not specified)
+        -->
+        <attribute>
+            <name>forceIdIndex</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>
+                If false, this component will not append a '[n]' suffix (where 'n' is the row index) to components 
+                that are contained within a "list."  This value will be true by default and the value will be ignored if 
+                the value of forceId is false (or not specified.)
+            </description>
+        </attribute>        
+
+        <!-- MyFaces extension: user role attributes -->
+        <attribute>
+            <name>displayValueOnly</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If true, renders only the value of the component, but no input widget.
+                Default is false.
+            </description>
+        </attribute>
+        <attribute>
+            <name>displayValueOnlyStyle</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Style used when displayValueOnly is true.
+            </description>
+        </attribute>
+        <attribute>
+            <name>displayValueOnlyStyleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Style class used when displayValueOnly is true.
+            </description>
+        </attribute>        
+    </tag>
+
+    <!-- selectManyCheckbox -->
+    <tag>
+        <name>selectManyCheckbox</name>
+        <tag-class>org.apache.myfaces.taglib.html.ext.HtmlSelectManyCheckboxTag</tag-class>
+        <body-content>JSP</body-content>
+        <description>
+            Extends standard selectManyCheckbox by user role support.
+            Additionally this extended selectManyCheckbox accepts a layout attribute
+            of value "spread" (see custom checkbox tag).
+        </description>
+                <!-- all standard attributes of the selectManyCheckbox tag -->
+                <!-- UISelectMany attributes -->
+                <!-- UIInput attributes -->
+                <!-- UIOutput attributes -->
+        <!-- UIComponent attributes -->
+        <attribute>
+            <name>id</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Every component may have an unique id. Automatically created if omitted.</description>
+        </attribute>
+        <attribute>
+            <name>rendered</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If false, this component will not be rendered.</description>
+        </attribute>
+        <attribute>
+            <name>binding</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Component binding.</description>
+        </attribute>
+
+        <attribute>
+            <name>value</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Initial value to set when rendered for the first time.</description>
+        </attribute>
+        <attribute>
+            <name>converter</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Id of Converter to be used or reference to a Converter.</description>
+        </attribute>
+
+        <attribute>
+            <name>immediate</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description> Flag indicating that this component's value must be converted and validated immediately (that is, during Apply Request Values phase), rather than waiting until Process Validations phase.</description>
+        </attribute>
+        <attribute>
+            <name>required</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If true, this component will be checked for non-empty input.</description>
+        </attribute>
+        <attribute>
+            <name>validator</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>MethodBinding pointing at a method that will be called during Process Validations phase of the request processing lifecycle, to validate the current value of this component.</description>
+        </attribute>
+        <attribute>
+            <name>valueChangeListener</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Listener for value changes.</description>
+        </attribute>
+
+
+        <!-- HTML 4.0 universal attributes -->
+        <attribute><name>dir</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>lang</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>style</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>title</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute>
+            <name>styleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Corresponds to the HTML class attribute.</description>
+        </attribute>
+
+        <!-- HTML 4.0 event-handler attributes -->
+        <attribute><name>onclick</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>ondblclick</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousedown</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseup</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseover</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousemove</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseout</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeypress</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeydown</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeyup</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+
+        <!-- HTML 4.0 input attributes for type "checkbox" -->
+        <attribute><name>accesskey</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>alt</name>         <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>datafld</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>datasrc</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>dataformatas</name><required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>disabled</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>onblur</name>      <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>onchange</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>onfocus</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>onselect</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>readonly</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>tabindex</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+
+        <!-- CheckboxListRenderer attributes -->
+        <attribute>
+            <name>layout</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>see JSF Spec. 8.5.9</description>
+        </attribute>
+        <!--TODO: disabledClass, enabledClass -->
+        <attribute><name>enabledClass</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+         <attribute><name>disabledClass</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+
+        <attribute>
+            <name>layoutWidth</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                A number representing the amount of checkbox rows if
+                the layout is lineDirection and checkbox columns if
+                the layout is pageDirection.
+            </description>
+        </attribute>
+        <!-- MyFaces extension: user role attributes -->
+        <attribute>
+            <name>enabledOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, no hyperlink is rendered but all nested
+                tags (=body) are rendered.
+            </description>
+        </attribute>
+        <attribute>
+            <name>visibleOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, nothing is rendered and the body of this tag
+                will be skipped.
+            </description>
+        </attribute>
+
+                <!-- 
+        This attribute indicates that the component should be forced to use the specified id instead of 
+        using the one that faces generates.  Components contained within a "list" will include a '[n]'  
+        suffix where 'n' is the row index (unless the forceIdIndex attribute is set to false).
+        -->
+        <attribute>
+            <name>forceId</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If true, this component will force the use of the specified id when rendering.</description>
+        </attribute>        
+
+        <!-- 
+        If the component is contained within an "list" (such as dataTable), this attribute indicates whether or not a 
+        '[n]' suffix should be added where 'n' is the row index.  Default is true.  The attribute is ignored if forceId 
+        is false (or not specified)
+        -->
+        <attribute>
+            <name>forceIdIndex</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>
+                If false, this component will not append a '[n]' suffix (where 'n' is the row index) to components 
+                that are contained within a "list."  This value will be true by default and the value will be ignored if 
+                the value of forceId is false (or not specified.)
+            </description>
+        </attribute>        
+
+        <!-- MyFaces extension: user role attributes -->
+        <attribute>
+            <name>displayValueOnly</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If true, renders only the value of the component, but no input widget.
+                Default is false.
+            </description>
+        </attribute>
+        <attribute>
+            <name>displayValueOnlyStyle</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Style used when displayValueOnly is true.
+            </description>
+        </attribute>
+        <attribute>
+            <name>displayValueOnlyStyleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Style class used when displayValueOnly is true.
+            </description>
+        </attribute>        
+    </tag>
+
+    <!-- selectOneListbox -->
+    <tag>
+        <name>selectOneListbox</name>
+        <tag-class>org.apache.myfaces.taglib.html.ext.HtmlSelectOneListboxTag</tag-class>
+        <body-content>JSP</body-content>
+        <description>
+            Extends standard selectOneListbox by user role support.
+        </description>
+                        <!-- UISelectOne attributes -->
+                <!-- UIInput attributes -->
+                <!-- UIOutput attributes -->
+        <!-- UIComponent attributes -->
+        <attribute>
+            <name>id</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Every component may have an unique id. Automatically created if omitted.</description>
+        </attribute>
+        <attribute>
+            <name>rendered</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If false, this component will not be rendered.</description>
+        </attribute>
+        <attribute>
+            <name>binding</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Component binding.</description>
+        </attribute>
+
+        <attribute>
+            <name>value</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Initial value to set when rendered for the first time.</description>
+        </attribute>
+        <attribute>
+            <name>converter</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Id of Converter to be used or reference to a Converter.</description>
+        </attribute>
+
+        <attribute>
+            <name>immediate</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description> Flag indicating that this component's value must be converted and validated immediately (that is, during Apply Request Values phase), rather than waiting until Process Validations phase.</description>
+        </attribute>
+        <attribute>
+            <name>required</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If true, this component will be checked for non-empty input.</description>
+        </attribute>
+        <attribute>
+            <name>validator</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>MethodBinding pointing at a method that will be called during Process Validations phase of the request processing lifecycle, to validate the current value of this component.</description>
+        </attribute>
+        <attribute>
+            <name>valueChangeListener</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Listener for value changes.</description>
+        </attribute>
+
+
+        <!-- HTML 4.0 universal attributes -->
+        <attribute><name>dir</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>lang</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>style</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>title</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute>
+            <name>styleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Corresponds to the HTML class attribute.</description>
+        </attribute>
+
+        <!-- HTML 4.0 event-handler attributes -->
+        <attribute><name>onclick</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>ondblclick</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousedown</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseup</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseover</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousemove</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseout</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeypress</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeydown</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeyup</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+
+        <!-- HTML 4.0 select attributes -->
+        <attribute><name>datafld</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>datasrc</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>dataformatas</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>disabled</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <!-- "multiple" cannot be set manually -->
+        <!-- "name" cannot be set manually -->
+        <attribute><name>onblur</name>      <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onchange</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onfocus</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <!-- "size" cannot be set directly for it is a MenuRenderer specific attribute -->
+        <attribute><name>tabindex</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute>
+            <name>readonly</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Flag indicating that this component will prohibit
+          changes by the user.  The element may receive focus
+          unless it has also been disabled.</description>
+        </attribute>
+        <!-- ListboxRenderer attributes -->
+        <attribute>
+            <name>size</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>see JSF Spec.</description>
+        </attribute>
+        <attribute><name>enabledClass</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+         <attribute><name>disabledClass</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+
+        <!-- MyFaces extension: user role attributes -->
+        <attribute>
+            <name>enabledOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, no hyperlink is rendered but all nested
+                tags (=body) are rendered.
+            </description>
+        </attribute>
+        <attribute>
+            <name>visibleOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, nothing is rendered and the body of this tag
+                will be skipped.
+            </description>
+        </attribute>
+
+                <!-- 
+        This attribute indicates that the component should be forced to use the specified id instead of 
+        using the one that faces generates.  Components contained within a "list" will include a '[n]'  
+        suffix where 'n' is the row index (unless the forceIdIndex attribute is set to false).
+        -->
+        <attribute>
+            <name>forceId</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If true, this component will force the use of the specified id when rendering.</description>
+        </attribute>        
+
+        <!-- 
+        If the component is contained within an "list" (such as dataTable), this attribute indicates whether or not a 
+        '[n]' suffix should be added where 'n' is the row index.  Default is true.  The attribute is ignored if forceId 
+        is false (or not specified)
+        -->
+        <attribute>
+            <name>forceIdIndex</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>
+                If false, this component will not append a '[n]' suffix (where 'n' is the row index) to components 
+                that are contained within a "list."  This value will be true by default and the value will be ignored if 
+                the value of forceId is false (or not specified.)
+            </description>
+        </attribute>        
+
+        <!-- MyFaces extension: user role attributes -->
+        <attribute>
+            <name>displayValueOnly</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If true, renders only the value of the component, but no input widget.
+                Default is false.
+            </description>
+        </attribute>
+        <attribute>
+            <name>displayValueOnlyStyle</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Style used when displayValueOnly is true.
+            </description>
+        </attribute>
+        <attribute>
+            <name>displayValueOnlyStyleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Style class used when displayValueOnly is true.
+            </description>
+        </attribute>        
+    </tag>
+
+    <!-- selectManyListbox -->
+    <tag>
+        <name>selectManyListbox</name>
+        <tag-class>org.apache.myfaces.taglib.html.ext.HtmlSelectManyListboxTag</tag-class>
+        <body-content>JSP</body-content>
+        <description>
+            Extends standard selectManyListbox by user role support.
+        </description>
+                        <!-- UISelectMany attributes -->
+                <!-- UIInput attributes -->
+                <!-- UIOutput attributes -->
+        <!-- UIComponent attributes -->
+        <attribute>
+            <name>id</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Every component may have an unique id. Automatically created if omitted.</description>
+        </attribute>
+        <attribute>
+            <name>rendered</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If false, this component will not be rendered.</description>
+        </attribute>
+        <attribute>
+            <name>binding</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Component binding.</description>
+        </attribute>
+
+        <attribute>
+            <name>value</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Initial value to set when rendered for the first time.</description>
+        </attribute>
+        <attribute>
+            <name>converter</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Id of Converter to be used or reference to a Converter.</description>
+        </attribute>
+
+        <attribute>
+            <name>immediate</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description> Flag indicating that this component's value must be converted and validated immediately (that is, during Apply Request Values phase), rather than waiting until Process Validations phase.</description>
+        </attribute>
+        <attribute>
+            <name>required</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If true, this component will be checked for non-empty input.</description>
+        </attribute>
+        <attribute>
+            <name>validator</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>MethodBinding pointing at a method that will be called during Process Validations phase of the request processing lifecycle, to validate the current value of this component.</description>
+        </attribute>
+        <attribute>
+            <name>valueChangeListener</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Listener for value changes.</description>
+        </attribute>
+
+
+        <!-- HTML 4.0 universal attributes -->
+        <attribute><name>dir</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>lang</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>style</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>title</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute>
+            <name>styleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Corresponds to the HTML class attribute.</description>
+        </attribute>
+
+        <!-- HTML 4.0 event-handler attributes -->
+        <attribute><name>onclick</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>ondblclick</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousedown</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseup</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseover</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousemove</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseout</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeypress</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeydown</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeyup</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+
+        <!-- HTML 4.0 select attributes -->
+        <attribute><name>datafld</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>datasrc</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>dataformatas</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>disabled</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <!-- "multiple" cannot be set manually -->
+        <!-- "name" cannot be set manually -->
+        <attribute><name>onblur</name>      <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onchange</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onfocus</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <!-- "size" cannot be set directly for it is a MenuRenderer specific attribute -->
+        <attribute><name>tabindex</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute>
+            <name>readonly</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Flag indicating that this component will prohibit
+          changes by the user.  The element may receive focus
+          unless it has also been disabled.</description>
+        </attribute>
+        <!-- ListboxRenderer attributes -->
+        <attribute>
+            <name>size</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>see JSF Spec.</description>
+        </attribute>
+        <attribute><name>enabledClass</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+         <attribute><name>disabledClass</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+
+        <!-- MyFaces extension: user role attributes -->
+        <attribute>
+            <name>enabledOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, no hyperlink is rendered but all nested
+                tags (=body) are rendered.
+            </description>
+        </attribute>
+        <attribute>
+            <name>visibleOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, nothing is rendered and the body of this tag
+                will be skipped.
+            </description>
+        </attribute>
+
+                <!-- 
+        This attribute indicates that the component should be forced to use the specified id instead of 
+        using the one that faces generates.  Components contained within a "list" will include a '[n]'  
+        suffix where 'n' is the row index (unless the forceIdIndex attribute is set to false).
+        -->
+        <attribute>
+            <name>forceId</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If true, this component will force the use of the specified id when rendering.</description>
+        </attribute>        
+
+        <!-- 
+        If the component is contained within an "list" (such as dataTable), this attribute indicates whether or not a 
+        '[n]' suffix should be added where 'n' is the row index.  Default is true.  The attribute is ignored if forceId 
+        is false (or not specified)
+        -->
+        <attribute>
+            <name>forceIdIndex</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>
+                If false, this component will not append a '[n]' suffix (where 'n' is the row index) to components 
+                that are contained within a "list."  This value will be true by default and the value will be ignored if 
+                the value of forceId is false (or not specified.)
+            </description>
+        </attribute>        
+
+        <!-- MyFaces extension: user role attributes -->
+        <attribute>
+            <name>displayValueOnly</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If true, renders only the value of the component, but no input widget.
+                Default is false.
+            </description>
+        </attribute>
+        <attribute>
+            <name>displayValueOnlyStyle</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Style used when displayValueOnly is true.
+            </description>
+        </attribute>
+        <attribute>
+            <name>displayValueOnlyStyleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Style class used when displayValueOnly is true.
+            </description>
+        </attribute>        
+    </tag>
+
+<!--     Custom components     -->
+
+    <!-- calendar -->
+    <tag>
+        <name>inputCalendar</name>
+        <tag-class>org.apache.myfaces.custom.calendar.HtmlInputCalendarTag</tag-class>
+        <body-content>JSP</body-content>
+        <description>
+            Provides a calendar.
+        </description>
+                <!-- UIInput attributes -->
+                <!-- UIOutput attributes -->
+        <!-- UIComponent attributes -->
+        <attribute>
+            <name>id</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Every component may have an unique id. Automatically created if omitted.</description>
+        </attribute>
+        <attribute>
+            <name>rendered</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If false, this component will not be rendered.</description>
+        </attribute>
+        <attribute>
+            <name>binding</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Component binding.</description>
+        </attribute>
+
+        <attribute>
+            <name>value</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Initial value to set when rendered for the first time.</description>
+        </attribute>
+        <attribute>
+            <name>converter</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Id of Converter to be used or reference to a Converter.</description>
+        </attribute>
+
+        <attribute>
+            <name>immediate</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description> Flag indicating that this component's value must be converted and validated immediately (that is, during Apply Request Values phase), rather than waiting until Process Validations phase.</description>
+        </attribute>
+        <attribute>
+            <name>required</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If true, this component will be checked for non-empty input.</description>
+        </attribute>
+        <attribute>
+            <name>validator</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>MethodBinding pointing at a method that will be called during Process Validations phase of the request processing lifecycle, to validate the current value of this component.</description>
+        </attribute>
+        <attribute>
+            <name>valueChangeListener</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Listener for value changes.</description>
+        </attribute>
+
+        <!-- HTML 4.0 event-handler attributes -->
+        <attribute><name>onclick</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>ondblclick</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousedown</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseup</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseover</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousemove</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseout</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeypress</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeydown</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeyup</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+
+        <!-- HTML 4.0 universal attributes -->
+        <attribute><name>dir</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>lang</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>style</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>title</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute>
+            <name>styleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Corresponds to the HTML class attribute.</description>
+        </attribute>
+
+        <!-- HTML 4.0 input attributes -->
+        <attribute><name>accesskey</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>align</name>       <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>alt</name>         <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>disabled</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>maxlength</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>onblur</name>      <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>onchange</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>onfocus</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>onselect</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>readonly</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>size</name>        <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>tabindex</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <!-- MyFaces extension: user role attributes -->
+        <attribute>
+            <name>enabledOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, no hyperlink is rendered but all nested
+                tags (=body) are rendered.
+            </description>
+        </attribute>
+        <attribute>
+            <name>visibleOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, nothing is rendered and the body of this tag
+                will be skipped.
+            </description>
+        </attribute>
+
+                <!-- 
+        This attribute indicates that the component should be forced to use the specified id instead of 
+        using the one that faces generates.  Components contained within a "list" will include a '[n]'  
+        suffix where 'n' is the row index (unless the forceIdIndex attribute is set to false).
+        -->
+        <attribute>
+            <name>forceId</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If true, this component will force the use of the specified id when rendering.</description>
+        </attribute>        
+
+        <!-- 
+        If the component is contained within an "list" (such as dataTable), this attribute indicates whether or not a 
+        '[n]' suffix should be added where 'n' is the row index.  Default is true.  The attribute is ignored if forceId 
+        is false (or not specified)
+        -->
+        <attribute>
+            <name>forceIdIndex</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>
+                If false, this component will not append a '[n]' suffix (where 'n' is the row index) to components 
+                that are contained within a "list."  This value will be true by default and the value will be ignored if 
+                the value of forceId is false (or not specified.)
+            </description>
+        </attribute>        
+
+        <attribute>
+            <name>monthYearRowClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>CSS class to be used for the header-row showing month and year.</description>
+        </attribute>
+        <attribute>
+            <name>weekRowClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>CSS class to be used for the header-row showing the week-days.</description>
+        </attribute>
+        <attribute>
+            <name>dayCellClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>CSS class to be used for the cells showing days.</description>
+        </attribute>
+        <attribute>
+            <name>currentDayCellClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>CSS class to be used for the cell of the currently selected date.</description>
+        </attribute>
+        <attribute>
+            <name>renderAsPopup</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Render the input-calendar as a java-script popup on client.</description>
+        </attribute>
+        <attribute>
+            <name>addResources</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Automatically add the input-calendar scripts and css files to the header - set that to false to provide the scripts yourself.</description>
+        </attribute>
+        <attribute>
+            <name>popupDateFormat</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Defines the date format used by the java-script popup on client.</description>
+        </attribute>
+        <attribute>
+            <name>popupButtonString</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Defines the string displayed on the button which leads to the calendar-popup-window (... by default).</description>
+        </attribute>
+        <attribute>
+            <name>popupGotoString</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Set the string for "Go To Current Month"</description>
+        </attribute>
+        <attribute>
+            <name>popupTodayString</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Set the string for "Today is"</description>
+        </attribute>
+        <attribute>
+            <name>popupWeekString</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Set the string for "Wk"</description>
+        </attribute>
+        <attribute>
+            <name>popupScrollLeftMessage</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Set the string for scrolling to the left.</description>
+        </attribute>
+        <attribute>
+            <name>popupScrollRightMessage</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Set the string for scrolling to the right.</description>
+        </attribute>
+        <attribute>
+            <name>popupSelectMonthMessage</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Set the string for "Click to select a month".</description>
+        </attribute>
+        <attribute>
+            <name>popupSelectYearMessage</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Set the string for "Click to select a year".</description>
+        </attribute>
+        <attribute>
+            <name>popupSelectDateMessage</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Set the string for "Select [date] as date" (do not replace [date], it will be replaced by the current date).</description>
+		</attribute>
+        <attribute>
+            <name>renderPopupButtonAsImage</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>If true, renders a calendar icon instead of the button to pop up the calendar.</description>
+        </attribute>
+    </tag>
+
+    <!-- jsValueChangeListener -->
+    <tag>
+        <name>jsValueChangeListener</name>
+        <tag-class>org.apache.myfaces.custom.jslistener.JsValueChangeListenerTag</tag-class>
+        <body-content>empty</body-content>
+        <description>Value change listener on client side.</description>
+        <attribute>
+          <name>for</name>
+          <required>false</required>
+          <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+          <name>property</name>
+          <required>false</required>
+          <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+          <name>expressionValue</name>
+          <required>true</required>
+          <rtexprvalue>false</rtexprvalue>
+        </attribute>
+    </tag>
+
+    <!-- jsValueSet -->
+    <tag>
+        <name>jsValueSet</name>
+        <tag-class>org.apache.myfaces.custom.jsvalueset.HtmlJsValueSetTag</tag-class>
+        <body-content>empty</body-content>
+        <description>Setting a value from the model in java-script so that it can be used (e.g. by the value change listener) afterwards.</description>
+        <attribute>
+          <name>name</name>
+          <required>true</required>
+          <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+          <name>value</name>
+          <required>true</required>
+          <rtexprvalue>false</rtexprvalue>
+        </attribute>
+    </tag>
+
+    <!-- checkbox -->
+    <tag>
+        <name>checkbox</name>
+        <tag-class>org.apache.myfaces.custom.checkbox.HtmlCheckboxTag</tag-class>
+        <body-content>JSP</body-content>
+        <description>
+            Renders a HTML input of type "checkbox". The associated SelectItem comes from
+            an extended selectManyCheckbox component with layout "spread". The selectManyCheckbox
+            is referenced by the "for" attribute.
+            All HTML pass-through attributes for this input are taken from the associated
+            selectManyCheckbox.
+        </description>
+        <!-- UIComponent attributes -->
+        <attribute>
+            <name>id</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Every component may have an unique id. Automatically created if omitted.</description>
+        </attribute>
+        <attribute>
+            <name>rendered</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If false, this component will not be rendered.</description>
+        </attribute>
+        <attribute>
+            <name>binding</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Component binding.</description>
+        </attribute>
+
+        <!-- MyFaces extension: user role attributes -->
+        <attribute>
+            <name>enabledOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, no hyperlink is rendered but all nested
+                tags (=body) are rendered.
+            </description>
+        </attribute>
+        <attribute>
+            <name>visibleOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, nothing is rendered and the body of this tag
+                will be skipped.
+            </description>
+        </attribute>
+
+        <!-- HtmlCheckbox attributes -->
+        <attribute>
+            <name>for</name>
+            <required>true</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                id of the referenced extended selectManyCheckbox component
+            </description>
+        </attribute>
+        <attribute>
+            <name>index</name>
+            <required>true</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                n-th SelectItem of referenced UISelectMany starting with 0.
+            </description>
+        </attribute>
+    </tag>
+
+    <!-- commandNavigation2 -->
+    <tag>
+        <name>commandNavigation2</name>
+        <tag-class>org.apache.myfaces.custom.navmenu.htmlnavmenu.HtmlCommandNavigationItemTag</tag-class>
+        <body-content>JSP</body-content>
+        <description>
+            Must be nested inside a panel_navigation action and renders a
+            clickable navigation item.
+            This action is derived from the standard command_link action and
+            has equal attributes.
+            (Replaces former "navigation_item" tag.)
+        </description>
+        <!--TODO: make id attribute mandatory -->
+                <!-- UICommand attributes -->
+        <!-- UIComponent attributes -->
+        <attribute>
+            <name>id</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Every component may have an unique id. Automatically created if omitted.</description>
+        </attribute>
+        <attribute>
+            <name>rendered</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If false, this component will not be rendered.</description>
+        </attribute>
+        <attribute>
+            <name>binding</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Component binding.</description>
+        </attribute>
+
+        <attribute>
+            <name>action</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>MethodBinding pointing at the application action to be invoked, if this UIComponent is activated by the user, during the Apply Request Values or Invoke Application phase of the request processing lifecycle, depending on the value of the immediate property.</description>
+        </attribute>
+        <attribute>
+            <name>actionListener</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>MethodBinding pointing at method acception an ActionEvent with return type void.</description>
+        </attribute>
+        <attribute>
+            <name>immediate</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>True means, that the default ActionListener should be executed immediately (i.e. during Apply Request Values phase of the request processing lifecycle), rather than waiting until the Invoke Application phase.</description>
+        </attribute>
+        <attribute>
+            <name>value</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Initial value to set when rendered for the first time.</description>
+        </attribute>
+
+        <!-- HTML 4.0 universal attributes -->
+        <attribute><name>dir</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>lang</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>style</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>title</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute>
+            <name>styleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Corresponds to the HTML class attribute.</description>
+        </attribute>
+
+        <!-- HTML 4.0 event-handler attributes -->
+        <attribute><name>onclick</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>ondblclick</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousedown</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseup</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseover</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousemove</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseout</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeypress</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeydown</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeyup</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+
+        <!-- HTML 4.0 anchor (=a) attributes -->
+        <attribute><name>accesskey</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>charset</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>coords</name>      <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <!-- "href" is a special LinkRenderer attribute -->
+        <attribute><name>hreflang</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <!-- "name" cannot be set by user -->
+        <attribute><name>rel</name>         <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>rev</name>         <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>shape</name>       <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>tabindex</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>type</name>        <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <!--todo: is in JSF API of HtmlCommandLink and HtmlOutputLink, but there is no corresponding tag in HTML 4.0.. What to do?-->
+        <attribute>
+            <name>onblur</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <!--todo: is in JSF API of HtmlCommandLink and HtmlOutputLink, but there is no corresponding tag in HTML 4.0.. What to do?-->
+        <attribute>
+            <name>onfocus</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>target</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+
+        <!-- MyFaces extension: user role attributes -->
+        <attribute>
+            <name>enabledOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, no hyperlink is rendered but all nested
+                tags (=body) are rendered.
+            </description>
+        </attribute>
+        <attribute>
+            <name>visibleOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, nothing is rendered and the body of this tag
+                will be skipped.
+            </description>
+        </attribute>
+
+        <!-- HtmlCommandLink attributes -->
+        <!--TODO: is in JSF API, but there is no corresponding tag in HTML 4.0.. What to do?-->
+        <attribute>
+            <name>onblur</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <!--TODO: is in JSF API, but there is no corresponding tag in HTML 4.0.. What to do?-->
+        <attribute>
+            <name>onfocus</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <!-- TODO attributes image, label - old todo.. still necessary?-->
+    </tag>
+
+    <!-- commandNavigation -->
+    <tag>
+        <name>commandNavigation</name>
+        <tag-class>org.apache.myfaces.custom.navigation.HtmlCommandNavigationTag</tag-class>
+        <body-content>JSP</body-content>
+        <description>
+            Must be nested inside a panel_navigation action and renders a
+            clickable navigation item.
+            This action is derived from the standard command_link action and
+            has equal attributes.
+            (Replaces former "navigation_item" tag.)
+        </description>
+        <!--TODO: make id attribute mandatory -->
+                <!-- UICommand attributes -->
+        <!-- UIComponent attributes -->
+        <attribute>
+            <name>id</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Every component may have an unique id. Automatically created if omitted.</description>
+        </attribute>
+        <attribute>
+            <name>rendered</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If false, this component will not be rendered.</description>
+        </attribute>
+        <attribute>
+            <name>binding</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Component binding.</description>
+        </attribute>
+
+        <attribute>
+            <name>action</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>MethodBinding pointing at the application action to be invoked, if this UIComponent is activated by the user, during the Apply Request Values or Invoke Application phase of the request processing lifecycle, depending on the value of the immediate property.</description>
+        </attribute>
+        <attribute>
+            <name>actionListener</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>MethodBinding pointing at method acception an ActionEvent with return type void.</description>
+        </attribute>
+        <attribute>
+            <name>immediate</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>True means, that the default ActionListener should be executed immediately (i.e. during Apply Request Values phase of the request processing lifecycle), rather than waiting until the Invoke Application phase.</description>
+        </attribute>
+        <attribute>
+            <name>value</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Initial value to set when rendered for the first time.</description>
+        </attribute>
+
+        <!-- HTML 4.0 universal attributes -->
+        <attribute><name>dir</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>lang</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>style</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>title</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute>
+            <name>styleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Corresponds to the HTML class attribute.</description>
+        </attribute>
+
+        <!-- HTML 4.0 event-handler attributes -->
+        <attribute><name>onclick</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>ondblclick</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousedown</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseup</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseover</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousemove</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseout</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeypress</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeydown</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeyup</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+
+        <!-- HTML 4.0 anchor (=a) attributes -->
+        <attribute><name>accesskey</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>charset</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>coords</name>      <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <!-- "href" is a special LinkRenderer attribute -->
+        <attribute><name>hreflang</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <!-- "name" cannot be set by user -->
+        <attribute><name>rel</name>         <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>rev</name>         <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>shape</name>       <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>tabindex</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>type</name>        <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <!--todo: is in JSF API of HtmlCommandLink and HtmlOutputLink, but there is no corresponding tag in HTML 4.0.. What to do?-->
+        <attribute>
+            <name>onblur</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <!--todo: is in JSF API of HtmlCommandLink and HtmlOutputLink, but there is no corresponding tag in HTML 4.0.. What to do?-->
+        <attribute>
+            <name>onfocus</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>target</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+
+        <!-- MyFaces extension: user role attributes -->
+        <attribute>
+            <name>enabledOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, no hyperlink is rendered but all nested
+                tags (=body) are rendered.
+            </description>
+        </attribute>
+        <attribute>
+            <name>visibleOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, nothing is rendered and the body of this tag
+                will be skipped.
+            </description>
+        </attribute>
+
+        <!-- HtmlCommandLink attributes -->
+        <!--TODO: is in JSF API, but there is no corresponding tag in HTML 4.0.. What to do?-->
+        <attribute>
+            <name>onblur</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <!--TODO: is in JSF API, but there is no corresponding tag in HTML 4.0.. What to do?-->
+        <attribute>
+            <name>onfocus</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <!-- TODO attributes image, label - old todo.. still necessary?-->
+    </tag>
+
+    <!-- commandSortHeader -->
+    <tag>
+        <name>commandSortHeader</name>
+        <tag-class>org.apache.myfaces.custom.sortheader.HtmlCommandSortHeaderTag</tag-class>
+        <body-content>JSP</body-content>
+        <description>
+            Clickable sort column header.
+            Must be nested inside an extended data_table tag.
+            This tag is derived from the standard command_link tag and
+            has the additional attributes columnName and arrow.
+            Note: In contrary to normal command links the default for the "immediate"
+            attribute is "true".
+        </description>
+                <!-- UICommand attributes -->
+        <!-- UIComponent attributes -->
+        <attribute>
+            <name>id</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Every component may have an unique id. Automatically created if omitted.</description>
+        </attribute>
+        <attribute>
+            <name>rendered</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If false, this component will not be rendered.</description>
+        </attribute>
+        <attribute>
+            <name>binding</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Component binding.</description>
+        </attribute>
+
+        <attribute>
+            <name>action</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>MethodBinding pointing at the application action to be invoked, if this UIComponent is activated by the user, during the Apply Request Values or Invoke Application phase of the request processing lifecycle, depending on the value of the immediate property.</description>
+        </attribute>
+        <attribute>
+            <name>actionListener</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>MethodBinding pointing at method acception an ActionEvent with return type void.</description>
+        </attribute>
+        <attribute>
+            <name>immediate</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>True means, that the default ActionListener should be executed immediately (i.e. during Apply Request Values phase of the request processing lifecycle), rather than waiting until the Invoke Application phase.</description>
+        </attribute>
+        <attribute>
+            <name>value</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Initial value to set when rendered for the first time.</description>
+        </attribute>
+
+        <!-- HTML 4.0 universal attributes -->
+        <attribute><name>dir</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>lang</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>style</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>title</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute>
+            <name>styleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Corresponds to the HTML class attribute.</description>
+        </attribute>
+
+        <!-- HTML 4.0 event-handler attributes -->
+        <attribute><name>onclick</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>ondblclick</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousedown</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseup</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseover</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousemove</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseout</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeypress</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeydown</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeyup</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+
+        <!-- HTML 4.0 anchor (=a) attributes -->
+        <attribute><name>accesskey</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>charset</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>coords</name>      <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <!-- "href" is a special LinkRenderer attribute -->
+        <attribute><name>hreflang</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <!-- "name" cannot be set by user -->
+        <attribute><name>rel</name>         <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>rev</name>         <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>shape</name>       <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>tabindex</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>type</name>        <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <!--todo: is in JSF API of HtmlCommandLink and HtmlOutputLink, but there is no corresponding tag in HTML 4.0.. What to do?-->
+        <attribute>
+            <name>onblur</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <!--todo: is in JSF API of HtmlCommandLink and HtmlOutputLink, but there is no corresponding tag in HTML 4.0.. What to do?-->
+        <attribute>
+            <name>onfocus</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>target</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+
+        <!-- MyFaces extension: user role attributes -->
+        <attribute>
+            <name>enabledOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, no hyperlink is rendered but all nested
+                tags (=body) are rendered.
+            </description>
+        </attribute>
+        <attribute>
+            <name>visibleOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, nothing is rendered and the body of this tag
+                will be skipped.
+            </description>
+        </attribute>
+
+        <!-- HtmlCommandSortHeader attributes -->
+        <attribute>
+            <name>columnName</name>
+            <required>true</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                The name of this column.
+                This name must uniquely identify this column among all other (sortable) columns
+                in the same data_table.
+                The sortColumn attribute of the embedding data_table reflects the current
+                sort column (see extended data_table).
+            </description>
+        </attribute>
+        <attribute>
+            <name>arrow</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Indicates whether an arrow, that shows the sort direction should be rendered.
+                Default: false
+            </description>
+        </attribute>
+    </tag>
+
+    <!-- dataList -->
+    <tag>
+        <name>dataList</name>
+        <tag-class>org.apache.myfaces.custom.datalist.HtmlDataListTag</tag-class>
+        <body-content>JSP</body-content>
+        <description>
+            Similar to dataTable, but does not render a table. Instead the layout
+            attribute controls how each dataRow is rendered.
+        </description>
+                <!-- UIPanel attributes -->
+        <!-- UIComponent attributes -->
+        <attribute>
+            <name>id</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Every component may have an unique id. Automatically created if omitted.</description>
+        </attribute>
+        <attribute>
+            <name>rendered</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If false, this component will not be rendered.</description>
+        </attribute>
+        <attribute>
+            <name>binding</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Component binding.</description>
+        </attribute>
+
+
+        <!-- HTML 4.0 universal attributes -->
+        <attribute><name>dir</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>lang</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>style</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>title</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute>
+            <name>styleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Corresponds to the HTML class attribute.</description>
+        </attribute>
+
+        <!-- HTML 4.0 event-handler attributes -->
+        <attribute><name>onclick</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>ondblclick</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousedown</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseup</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseover</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousemove</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseout</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeypress</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeydown</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeyup</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+
+                <!-- 
+        This attribute indicates that the component should be forced to use the specified id instead of 
+        using the one that faces generates.  Components contained within a "list" will include a '[n]'  
+        suffix where 'n' is the row index (unless the forceIdIndex attribute is set to false).
+        -->
+        <attribute>
+            <name>forceId</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If true, this component will force the use of the specified id when rendering.</description>
+        </attribute>        
+
+        <!-- 
+        If the component is contained within an "list" (such as dataTable), this attribute indicates whether or not a 
+        '[n]' suffix should be added where 'n' is the row index.  Default is true.  The attribute is ignored if forceId 
+        is false (or not specified)
+        -->
+        <attribute>
+            <name>forceIdIndex</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>
+                If false, this component will not append a '[n]' suffix (where 'n' is the row index) to components 
+                that are contained within a "list."  This value will be true by default and the value will be ignored if 
+                the value of forceId is false (or not specified.)
+            </description>
+        </attribute>        
+
+        <!-- UIData attributes -->
+        <attribute>
+            <name>value</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Supported types see JSF Spec 4.1.3</description>
+        </attribute>
+        <attribute>
+            <name>var</name>
+            <required>true</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>rows</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>first</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <!-- MyFaces extension: user role attributes -->
+        <attribute>
+            <name>enabledOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, no hyperlink is rendered but all nested
+                tags (=body) are rendered.
+            </description>
+        </attribute>
+        <attribute>
+            <name>visibleOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, nothing is rendered and the body of this tag
+                will be skipped.
+            </description>
+        </attribute>
+
+        <attribute>
+            <name>layout</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                simple|unorderedList|orderedList
+                simple = for each dataRow all children are simply rendered
+                unorderedList = the list is rendered as HTML unordered list (= bullet list)
+                orderedList = the list is rendered as HTML ordered list
+                Default: simple
+            </description>
+        </attribute>
+        <attribute>
+            <name>rowIndexVar</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                A parameter name, under which the current rowIndex is set in request scope
+                similar to the var parameter.
+            </description>
+        </attribute>
+        <attribute>
+            <name>rowCountVar</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                A parameter name, under which the rowCount is set in request scope
+                similar to the var parameter.
+            </description>
+        </attribute>
+     </tag>
+
+    <!-- dataScroller -->
+    <tag>
+        <name>dataScroller</name>
+        <tag-class>org.apache.myfaces.custom.datascroller.HtmlDataScrollerTag</tag-class>
+        <body-content>JSP</body-content>
+        <description>
+            Scroller for UIData components eg. dataTable
+            Must be nested inside footer facet of dataTable OR for attribute must be given
+            so that corresponding uiData can be found
+        </description>
+        <!-- UIComponent attributes -->
+        <attribute>
+            <name>id</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Every component may have an unique id. Automatically created if omitted.</description>
+        </attribute>
+        <attribute>
+            <name>rendered</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If false, this component will not be rendered.</description>
+        </attribute>
+        <attribute>
+            <name>binding</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Component binding.</description>
+        </attribute>
+
+        <!-- MyFaces extension: user role attributes -->
+        <attribute>
+            <name>enabledOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, no hyperlink is rendered but all nested
+                tags (=body) are rendered.
+            </description>
+        </attribute>
+        <attribute>
+            <name>visibleOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, nothing is rendered and the body of this tag
+                will be skipped.
+            </description>
+        </attribute>
+
+        <attribute>
+            <name>for</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>fastStep</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>step (pages) used for fastforward and fastrewind</description>
+        </attribute>
+        <attribute>
+            <name>pageIndexVar</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                A parameter name, under which the actual page index is set in request scope
+                similar to the var parameter.
+            </description>
+        </attribute>
+        <attribute>
+            <name>pageCountVar</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                A parameter name, under which the actual page count is set in request scope
+                similar to the var parameter.
+            </description>
+        </attribute>
+        <attribute>
+            <name>rowsCountVar</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                A parameter name, under which the actual rows count is set in request scope
+                similar to the var parameter.
+            </description>
+        </attribute>
+        <attribute>
+            <name>displayedRowsCountVar</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                A parameter name, under which the actual displayed rows count is set in request scope
+                similar to the var parameter.
+            </description>
+        </attribute>
+        <attribute>
+            <name>firstRowIndexVar</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                A parameter name, under which the actual first displayed row index is set in request scope
+                similar to the var parameter.
+            </description>
+        </attribute>
+        <attribute>
+            <name>lastRowIndexVar</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                A parameter name, under which the actual last displayed row index is set in request scope
+                similar to the var parameter.
+            </description>
+        </attribute>
+        <attribute>
+            <name>styleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                styleClass for scroller table
+            </description>
+        </attribute>
+        <attribute>
+            <name>style</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                style for scroller table
+            </description>
+        </attribute>
+        <attribute>
+            <name>paginator</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If set true, then the paginator gets rendered
+            </description>
+        </attribute>
+        <attribute>
+            <name>paginatorMaxPages</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                The maximum amount of pages to be displayed in the paginator.
+            </description>
+        </attribute>
+        <attribute>
+            <name>paginatorTableClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                styleclass for pagingator
+            </description>
+        </attribute>
+        <attribute>
+            <name>paginatorTableStyle</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                style for pagingator
+            </description>
+        </attribute>
+        <attribute>
+            <name>paginatorColumnClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                styleClass for paginator's column
+            </description>
+        </attribute>
+        <attribute>
+            <name>paginatorColumnStyle</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                style for paginator's column
+            </description>
+        </attribute>
+        <attribute>
+            <name>paginatorActiveColumnClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                styleClass for paginator's column with pageIndex = currentPageIndex
+            </description>
+        </attribute>
+        <attribute>
+            <name>paginatorActiveColumnStyle</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                style for paginator's column with pageIndex = currentPageIndex
+            </description>
+        </attribute>
+        <attribute>
+            <name>renderFacetsIfSinglePage</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If set to false, the facets aren't renderd if all the lines are contained on a single page.
+                Default is true.
+            </description>
+        </attribute>
+        <attribute>
+            <name>immediate</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>True means, that the default ActionListener should be executed immediately (i.e. during Apply Request Values phase of the request processing lifecycle), rather than waiting until the Invoke Application phase.</description>
+        </attribute>
+        <attribute>
+            <name>actionListener</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>MethodBinding pointing at method acception an ActionEvent with return type void.</description>
+        </attribute>
+     </tag>
+
+    <!-- inputDate -->
+    <tag>
+        <name>inputDate</name>
+        <tag-class>org.apache.myfaces.custom.date.HtmlInputDateTag</tag-class>
+        <body-content>JSP</body-content>
+                <!-- UIInput attributes -->
+                <!-- UIOutput attributes -->
+        <!-- UIComponent attributes -->
+        <attribute>
+            <name>id</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Every component may have an unique id. Automatically created if omitted.</description>
+        </attribute>
+        <attribute>
+            <name>rendered</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If false, this component will not be rendered.</description>
+        </attribute>
+        <attribute>
+            <name>binding</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Component binding.</description>
+        </attribute>
+
+        <attribute>
+            <name>value</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Initial value to set when rendered for the first time.</description>
+        </attribute>
+        <attribute>
+            <name>converter</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Id of Converter to be used or reference to a Converter.</description>
+        </attribute>
+
+        <attribute>
+            <name>immediate</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description> Flag indicating that this component's value must be converted and validated immediately (that is, during Apply Request Values phase), rather than waiting until Process Validations phase.</description>
+        </attribute>
+        <attribute>
+            <name>required</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If true, this component will be checked for non-empty input.</description>
+        </attribute>
+        <attribute>
+            <name>validator</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>MethodBinding pointing at a method that will be called during Process Validations phase of the request processing lifecycle, to validate the current value of this component.</description>
+        </attribute>
+        <attribute>
+            <name>valueChangeListener</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Listener for value changes.</description>
+        </attribute>
+
+        <!-- HTML 4.0 universal attributes -->
+        <attribute><name>dir</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>lang</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>style</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>title</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute>
+            <name>styleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Corresponds to the HTML class attribute.</description>
+        </attribute>
+
+        <!-- HTML 4.0 event-handler attributes -->
+        <attribute><name>onclick</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>ondblclick</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousedown</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseup</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseover</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousemove</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseout</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeypress</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeydown</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeyup</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+
+        <!-- HTML 4.0 input attributes -->
+        <attribute><name>accesskey</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>align</name>       <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>alt</name>         <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>disabled</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>maxlength</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>onblur</name>      <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>onchange</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>onfocus</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>onselect</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>readonly</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>size</name>        <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>tabindex</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+		<!-- MyFaces extension: user role attributes -->
+        <attribute>
+            <name>enabledOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, no hyperlink is rendered but all nested
+                tags (=body) are rendered.
+            </description>
+        </attribute>
+        <attribute>
+            <name>visibleOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, nothing is rendered and the body of this tag
+                will be skipped.
+            </description>
+        </attribute>
+
+		<!-- type == date | time | both -->
+        <attribute>
+	        <name>type</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+	        <name>popupCalendar</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>timeZone</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+    </tag>
+
+    <!-- inputFileUpload -->
+    <tag>
+        <name>inputFileUpload</name>
+        <tag-class>org.apache.myfaces.custom.fileupload.HtmlInputFileUploadTag</tag-class>
+        <body-content>JSP</body-content>
+        <description>
+            You must enable the MultiPart Filter to make this component
+            work (see web.xml). Also, don't forget to set the form's attribute
+            "enctype" to "multipart/form-data".
+            See "examples/web/fileupload.jsp" for an example!
+        </description>
+                <!-- UIInput attributes -->
+                <!-- UIOutput attributes -->
+        <!-- UIComponent attributes -->
+        <attribute>
+            <name>id</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Every component may have an unique id. Automatically created if omitted.</description>
+        </attribute>
+        <attribute>
+            <name>rendered</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If false, this component will not be rendered.</description>
+        </attribute>
+        <attribute>
+            <name>binding</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Component binding.</description>
+        </attribute>
+
+        <attribute>
+            <name>value</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Initial value to set when rendered for the first time.</description>
+        </attribute>
+        <attribute>
+            <name>converter</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Id of Converter to be used or reference to a Converter.</description>
+        </attribute>
+
+        <attribute>
+            <name>immediate</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description> Flag indicating that this component's value must be converted and validated immediately (that is, during Apply Request Values phase), rather than waiting until Process Validations phase.</description>
+        </attribute>
+        <attribute>
+            <name>required</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If true, this component will be checked for non-empty input.</description>
+        </attribute>
+        <attribute>
+            <name>validator</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>MethodBinding pointing at a method that will be called during Process Validations phase of the request processing lifecycle, to validate the current value of this component.</description>
+        </attribute>
+        <attribute>
+            <name>valueChangeListener</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Listener for value changes.</description>
+        </attribute>
+
+        <!-- HTML 4.0 universal attributes -->
+        <attribute><name>dir</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>lang</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>style</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>title</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute>
+            <name>styleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Corresponds to the HTML class attribute.</description>
+        </attribute>
+
+        <!-- HTML 4.0 event-handler attributes -->
+        <attribute><name>onclick</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>ondblclick</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousedown</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseup</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseover</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousemove</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseout</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeypress</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeydown</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeyup</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+
+        <!-- HTML 4.0 input attributes -->
+        <attribute><name>accesskey</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>align</name>       <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>alt</name>         <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>disabled</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>maxlength</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>onblur</name>      <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>onchange</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>onfocus</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>onselect</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>readonly</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>size</name>        <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <attribute><name>tabindex</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue><type>java.lang.String</type></attribute>
+        <!-- HTML 4.0 input type="file" attributes -->
+        <attribute>
+            <name>accept</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+	        <name>storage</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+    </tag>
+
+    <!-- inputHtml -->
+    <tag>
+        <name>inputHtml</name>
+        <tag-class>org.apache.myfaces.custom.inputHtml.InputHtmlTag</tag-class>
+        <body-content>JSP</body-content>
+        <description>
+            An inline HTML based word processor based on the Kupu library. See http://kupu.oscom.org
+            Right now, the support is limited to one editor per page
+            (but you can use tabs to have multiple editors, but only one rendered at a time).
+        </description>
+                <!-- UIInput attributes -->
+                <!-- UIOutput attributes -->
+        <!-- UIComponent attributes -->
+        <attribute>
+            <name>id</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Every component may have an unique id. Automatically created if omitted.</description>
+        </attribute>
+        <attribute>
+            <name>rendered</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If false, this component will not be rendered.</description>
+        </attribute>
+        <attribute>
+            <name>binding</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Component binding.</description>
+        </attribute>
+
+        <attribute>
+            <name>value</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Initial value to set when rendered for the first time.</description>
+        </attribute>
+        <attribute>
+            <name>converter</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Id of Converter to be used or reference to a Converter.</description>
+        </attribute>
+
+        <attribute>
+            <name>immediate</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description> Flag indicating that this component's value must be converted and validated immediately (that is, during Apply Request Values phase), rather than waiting until Process Validations phase.</description>
+        </attribute>
+        <attribute>
+            <name>required</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If true, this component will be checked for non-empty input.</description>
+        </attribute>
+        <attribute>
+            <name>validator</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>MethodBinding pointing at a method that will be called during Process Validations phase of the request processing lifecycle, to validate the current value of this component.</description>
+        </attribute>
+        <attribute>
+            <name>valueChangeListener</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Listener for value changes.</description>
+        </attribute>
+
+        <!-- MyFaces extension: user role attributes -->
+        <attribute>
+            <name>enabledOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, no hyperlink is rendered but all nested
+                tags (=body) are rendered.
+            </description>
+        </attribute>
+        <attribute>
+            <name>visibleOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, nothing is rendered and the body of this tag
+                will be skipped.
+            </description>
+        </attribute>
+
+        <!-- MyFaces extension: user role attributes -->
+        <attribute>
+            <name>displayValueOnly</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If true, renders only the value of the component, but no input widget.
+                Default is false.
+            </description>
+        </attribute>
+        <attribute>
+            <name>displayValueOnlyStyle</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Style used when displayValueOnly is true.
+            </description>
+        </attribute>
+        <attribute>
+            <name>displayValueOnlyStyleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Style class used when displayValueOnly is true.
+            </description>
+        </attribute>        
+        <attribute>
+	        <name>style</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+	        <name>styleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+	        <name>fallback</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+            	Use a text area instead of the javascript HTML editor.
+            	Default is false.
+            	Use with caution.
+            </description>
+        </attribute>
+        <attribute>
+	        <name>type</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+            	The type of the value. It can be either fragment for an HTML fragment (default)
+            	or document for a full HTML document, with head, title, body, ... tags.
+            </description>
+        </attribute>
+       	<attribute>
+	        <name>allowEditSource</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+            	Allows the user to edit the HTML source code.
+            	Default is true.
+            </description>
+       	</attribute>
+		<attribute>
+	        <name>allowExternalLinks</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+            	Allows the user to insert external links.
+            	Default is true.
+            </description>
+       	</attribute>
+       	<attribute>
+	        <name>addKupuLogo</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+            	Show the Kupu Logo in the buttons bar.
+            	Default is true.
+            </description>
+       	</attribute>
+       	<attribute>
+	        <name>showAllToolBoxes</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+			<description>
+            	Shortcut to avoid setting all the showXXToolBox to true.
+            	Default is false.
+            </description>
+        </attribute>
+       	<attribute>
+	        <name>showPropertiesToolBox</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+			<description>
+            	Show the Properties tool box next to the text.
+            	Default is false.
+            </description>
+        </attribute>
+       	<attribute>
+	        <name>showLinksToolBox</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+			<description>
+            	Show the Links tool box next to the text.
+            	Default is false.
+            </description>
+        </attribute>
+       	<attribute>
+	        <name>showImagesToolBox</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+			<description>
+            	Show the Images tool box next to the text.
+            	Default is false.
+            </description>
+        </attribute>
+       	<attribute>
+	        <name>showTablesToolBox</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+			<description>
+            	Show the Tables tool box next to the text.
+            	Default is false.
+            </description>
+        </attribute>
+		<attribute>
+	        <name>showCleanupExpressionsToolBox</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+			<description>
+            	Show the Cleanup Expressions tool box next to the text.
+            	Default is false.
+            </description>
+        </attribute>
+       	<attribute>
+	        <name>showDebugToolBox</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+			<description>
+            	Show the Debug tool box next to the text.
+            	Default is false.
+            </description>
+        </attribute>
+    </tag>
+
+    <!-- navigationMenu, jscookMenu -->
+    <tag>
+        <name>navigationMenuItem</name>
+        <tag-class>org.apache.myfaces.custom.navmenu.HtmlNavigationMenuItemTag</tag-class>
+        <body-content>JSP</body-content>
+        <!-- UISelectItem attributes -->
+        <attribute>
+            <name>binding</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Component binding.</description>
+        </attribute>
+        <attribute>
+            <name>itemDisabled</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If true, this component will not be saved during state saving.</description>
+        </attribute>
+        <attribute>
+            <name>id</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+        </attribute>
+        <attribute>
+            <name>itemDescription</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+        </attribute>
+        <attribute>
+            <name>itemLabel</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+        </attribute>
+        <attribute>
+            <name>itemValue</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+        </attribute>
+        <attribute>
+            <name>value</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Value reference pointing at a javax.faces.model.SelectItem instance.</description>
+        </attribute>
+
+        <!-- MyFaces extension: user role attributes -->
+        <attribute>
+            <name>enabledOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, no hyperlink is rendered but all nested
+                tags (=body) are rendered.
+            </description>
+        </attribute>
+        <attribute>
+            <name>visibleOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, nothing is rendered and the body of this tag
+                will be skipped.
+            </description>
+        </attribute>
+
+        <!-- navigationMenuItem attributes -->
+        <attribute>
+            <name>icon</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>split</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>action</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>rendered</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+    </tag>
+    <tag>
+        <name>navigationMenuItems</name>
+        <tag-class>org.apache.myfaces.custom.navmenu.HtmlNavigationMenuItemsTag</tag-class>
+        <body-content>empty</body-content>
+        <!-- UISelectItems attributes -->
+        <attribute>
+            <name>binding</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Component binding.</description>
+        </attribute>
+        <attribute>
+            <name>id</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+        </attribute>
+        <attribute>
+            <name>value</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Value reference pointing at a List or Array of javax.faces.model.SelectItem instances.</description>
+        </attribute>
+
+    </tag>
+    <tag>
+        <name>jscookMenu</name>
+        <tag-class>org.apache.myfaces.custom.navmenu.jscookmenu.HtmlJSCookMenuTag</tag-class>
+        <body-content>JSP</body-content>
+        <!-- UIComponent attributes -->
+        <attribute>
+            <name>id</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Every component may have an unique id. Automatically created if omitted.</description>
+        </attribute>
+        <attribute>
+            <name>rendered</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If false, this component will not be rendered.</description>
+        </attribute>
+        <attribute>
+            <name>binding</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Component binding.</description>
+        </attribute>
+
+        <!-- MyFaces extension: user role attributes -->
+        <attribute>
+            <name>enabledOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, no hyperlink is rendered but all nested
+                tags (=body) are rendered.
+            </description>
+        </attribute>
+        <attribute>
+            <name>visibleOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, nothing is rendered and the body of this tag
+                will be skipped.
+            </description>
+        </attribute>
+
+                <attribute>
+            <name>javascriptLocation</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>
+                An alternate location to find javascript resources.  If no values is specified, javascript will
+                be loaded from the resources directory using AddResource and ExtensionsFilter.
+            </description>
+        </attribute>
+
+        <attribute>
+            <name>imageLocation</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>
+                An alternate location to find image resources.  If no values is specified, images will
+                be loaded from the resources directory using AddResource and ExtensionsFilter.
+            </description>
+        </attribute>
+
+        <attribute>
+            <name>styleLocation</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>
+                An alternate location to find stylesheet resources.  If no values is specified, stylesheets will
+                be loaded from the resources directory using AddResource and ExtensionsFilter.
+            </description>
+        </attribute>
+
+        <!-- jscookMenu attributes -->
+        <attribute>
+            <name>layout</name>
+            <required>true</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>theme</name>
+            <required>true</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+    </tag>
+
+    <!-- panelLayout -->
+    <tag>
+        <name>panelLayout</name>
+        <tag-class>org.apache.myfaces.custom.layout.HtmlPanelLayoutTag</tag-class>
+        <body-content>JSP</body-content>
+                <!-- UIPanel attributes -->
+        <!-- UIComponent attributes -->
+        <attribute>
+            <name>id</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Every component may have an unique id. Automatically created if omitted.</description>
+        </attribute>
+        <attribute>
+            <name>rendered</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If false, this component will not be rendered.</description>
+        </attribute>
+        <attribute>
+            <name>binding</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Component binding.</description>
+        </attribute>
+
+
+        <!-- HTML 4.0 universal attributes -->
+        <attribute><name>dir</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>lang</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>style</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>title</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute>
+            <name>styleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Corresponds to the HTML class attribute.</description>
+        </attribute>
+
+        <!-- HTML 4.0 event-handler attributes -->
+        <attribute><name>onclick</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>ondblclick</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousedown</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseup</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseover</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousemove</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseout</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeypress</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeydown</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeyup</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+
+        <!-- HTML 4.0 table attributes -->
+        <attribute><name>align</name>           <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>border</name>          <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>bgcolor</name>         <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>cellpadding</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>cellspacing</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>datafld</name>         <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>datasrc</name>         <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>dataformatas</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>frame</name>           <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>rules</name>           <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>summary</name>         <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>width</name>           <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+
+        <attribute>
+            <name>layout</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>
+                layout           | header | navigation | body  | footer
+                =================|========|============|=======|========
+                classic (Default)| top    | left       | right | bottom
+                navigationRight  | top    | right      | left  | bottom
+                upsideDown       | bottom | left       | right | top
+            </description>
+        </attribute>
+        <attribute>
+            <name>headerClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>CSS class to be used for the table cell.</description>
+        </attribute>
+        <attribute>
+            <name>navigationClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>CSS class to be used for the table cell.</description>
+        </attribute>
+        <attribute>
+            <name>bodyClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>CSS class to be used for the table cell.</description>
+        </attribute>
+        <attribute>
+            <name>footerClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>CSS class to be used for the table cell.</description>
+        </attribute>
+        <attribute>
+            <name>headerStyle</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>CSS style to be used for the table cell.</description>
+        </attribute>
+        <attribute>
+            <name>navigationStyle</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>CSS style to be used for the table cell.</description>
+        </attribute>
+        <attribute>
+            <name>bodyStyle</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>CSS style to be used for the table cell.</description>
+        </attribute>
+        <attribute>
+            <name>footerStyle</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>CSS style to be used for the table cell.</description>
+        </attribute>
+    </tag>
+
+    <!-- panelNavigation2 -->
+    <tag>
+        <name>panelNavigation2</name>
+        <tag-class>org.apache.myfaces.custom.navmenu.htmlnavmenu.HtmlPanelNavigationMenuTag</tag-class>
+        <body-content>JSP</body-content>
+                <!-- UIPanel attributes -->
+        <!-- UIComponent attributes -->
+        <attribute>
+            <name>id</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Every component may have an unique id. Automatically created if omitted.</description>
+        </attribute>
+        <attribute>
+            <name>rendered</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If false, this component will not be rendered.</description>
+        </attribute>
+        <attribute>
+            <name>binding</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Component binding.</description>
+        </attribute>
+
+
+        <!-- HTML 4.0 universal attributes -->
+        <attribute><name>dir</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>lang</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>style</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>title</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute>
+            <name>styleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Corresponds to the HTML class attribute.</description>
+        </attribute>
+
+        <!-- HTML 4.0 event-handler attributes -->
+        <attribute><name>onclick</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>ondblclick</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousedown</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseup</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseover</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousemove</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseout</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeypress</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeydown</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeyup</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+
+        <!-- HTML 4.0 table attributes -->
+        <attribute><name>align</name>           <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>border</name>          <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>bgcolor</name>         <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>cellpadding</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>cellspacing</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>datafld</name>         <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>datasrc</name>         <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>dataformatas</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>frame</name>           <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>rules</name>           <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>summary</name>         <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>width</name>           <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+
+        <attribute>
+            <name>itemClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                The CSS class of closed navigation items.
+            </description>
+        </attribute>
+        <attribute>
+            <name>openItemClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                The CSS class of open navigation items.
+            </description>
+        </attribute>
+        <attribute>
+            <name>activeItemClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                The CSS class of the active navigation item.
+            </description>
+        </attribute>
+        <attribute>
+            <name>separatorClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                The CSS class for the td element of a separator.
+            </description>
+        </attribute>
+        <attribute>
+            <name>itemStyle</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                The CSS Style of closed navigation items.
+            </description>
+        </attribute>
+        <attribute>
+            <name>openItemStyle</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                The CSS Style of open navigation items.
+            </description>
+        </attribute>
+        <attribute>
+            <name>activeItemStyle</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                The CSS Style of the active navigation item.
+            </description>
+        </attribute>
+        <attribute>
+            <name>separatorStyle</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                The CSS Style for the td element of a separator.
+            </description>
+        </attribute>
+        <attribute>
+            <name>layout</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Table or List Layout (default is Table) 
+            </description>
+        </attribute>
+    </tag>
+
+    <!-- panelNavigation -->
+    <tag>
+        <name>panelNavigation</name>
+        <tag-class>org.apache.myfaces.custom.navigation.HtmlPanelNavigationTag</tag-class>
+        <body-content>JSP</body-content>
+                <!-- UIPanel attributes -->
+        <!-- UIComponent attributes -->
+        <attribute>
+            <name>id</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Every component may have an unique id. Automatically created if omitted.</description>
+        </attribute>
+        <attribute>
+            <name>rendered</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If false, this component will not be rendered.</description>
+        </attribute>
+        <attribute>
+            <name>binding</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Component binding.</description>
+        </attribute>
+
+
+        <!-- HTML 4.0 universal attributes -->
+        <attribute><name>dir</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>lang</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>style</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>title</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute>
+            <name>styleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Corresponds to the HTML class attribute.</description>
+        </attribute>
+
+        <!-- HTML 4.0 event-handler attributes -->
+        <attribute><name>onclick</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>ondblclick</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousedown</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseup</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseover</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousemove</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseout</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeypress</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeydown</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeyup</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+
+        <!-- HTML 4.0 table attributes -->
+        <attribute><name>align</name>           <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>border</name>          <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>bgcolor</name>         <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>cellpadding</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>cellspacing</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>datafld</name>         <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>datasrc</name>         <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>dataformatas</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>frame</name>           <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>rules</name>           <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>summary</name>         <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>width</name>           <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+
+        <attribute>
+            <name>itemClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                The CSS class of closed navigation items.
+            </description>
+        </attribute>
+        <attribute>
+            <name>openItemClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                The CSS class of open navigation items.
+            </description>
+        </attribute>
+        <attribute>
+            <name>activeItemClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                The CSS class of the active navigation item.
+            </description>
+        </attribute>
+        <attribute>
+            <name>separatorClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                The CSS class for the td element of a separator.
+            </description>
+        </attribute>
+        <attribute>
+            <name>itemStyle</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                The CSS Style of closed navigation items.
+            </description>
+        </attribute>
+        <attribute>
+            <name>openItemStyle</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                The CSS Style of open navigation items.
+            </description>
+        </attribute>
+        <attribute>
+            <name>activeItemStyle</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                The CSS Style of the active navigation item.
+            </description>
+        </attribute>
+        <attribute>
+            <name>separatorStyle</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                The CSS Style for the td element of a separator.
+            </description>
+        </attribute>
+    </tag>
+
+    <!-- panelTab -->
+    <tag>
+        <name>panelTab</name>
+        <tag-class>org.apache.myfaces.custom.tabbedpane.HtmlPanelTabTag</tag-class>
+        <body-content>JSP</body-content>
+                <!-- UIPanel attributes -->
+        <!-- UIComponent attributes -->
+        <attribute>
+            <name>id</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Every component may have an unique id. Automatically created if omitted.</description>
+        </attribute>
+        <attribute>
+            <name>rendered</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If false, this component will not be rendered.</description>
+        </attribute>
+        <attribute>
+            <name>binding</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Component binding.</description>
+        </attribute>
+
+
+        <!-- HTML 4.0 universal attributes -->
+        <attribute><name>dir</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>lang</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>style</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>title</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute>
+            <name>styleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Corresponds to the HTML class attribute.</description>
+        </attribute>
+
+        <!-- HTML 4.0 event-handler attributes -->
+        <attribute><name>onclick</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>ondblclick</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousedown</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseup</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseover</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousemove</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseout</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeypress</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeydown</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeyup</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+
+        <!-- MyFaces extension: user role attributes -->
+        <attribute>
+            <name>enabledOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, no hyperlink is rendered but all nested
+                tags (=body) are rendered.
+            </description>
+        </attribute>
+        <attribute>
+            <name>visibleOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, nothing is rendered and the body of this tag
+                will be skipped.
+            </description>
+        </attribute>
+
+        <attribute>
+            <name>label</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Label of this tab.
+            </description>
+        </attribute>
+    </tag>
+
+    <!-- panelTabbedPane -->
+    <tag>
+        <name>panelTabbedPane</name>
+        <tag-class>org.apache.myfaces.custom.tabbedpane.HtmlPanelTabbedPaneTag</tag-class>
+        <body-content>JSP</body-content>
+                <!-- UIPanel attributes -->
+        <!-- UIComponent attributes -->
+        <attribute>
+            <name>id</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Every component may have an unique id. Automatically created if omitted.</description>
+        </attribute>
+        <attribute>
+            <name>rendered</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If false, this component will not be rendered.</description>
+        </attribute>
+        <attribute>
+            <name>binding</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Component binding.</description>
+        </attribute>
+
+
+        <!-- HTML 4.0 universal attributes -->
+        <attribute><name>dir</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>lang</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>style</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>title</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute>
+            <name>styleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Corresponds to the HTML class attribute.</description>
+        </attribute>
+
+        <!-- HTML 4.0 event-handler attributes -->
+        <attribute><name>onclick</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>ondblclick</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousedown</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseup</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseover</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousemove</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseout</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeypress</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeydown</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeyup</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+
+        <!-- HTML 4.0 table attributes -->
+        <attribute><name>align</name>           <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>border</name>          <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>bgcolor</name>         <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>cellpadding</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>cellspacing</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>datafld</name>         <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>datasrc</name>         <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>dataformatas</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>frame</name>           <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>rules</name>           <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>summary</name>         <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>width</name>           <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+
+        <!-- MyFaces extension: user role attributes -->
+        <attribute>
+            <name>enabledOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, no hyperlink is rendered but all nested
+                tags (=body) are rendered.
+            </description>
+        </attribute>
+        <attribute>
+            <name>visibleOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, nothing is rendered and the body of this tag
+                will be skipped.
+            </description>
+        </attribute>
+
+        <attribute>
+            <name>selectedIndex</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Index of tab that is selected by default.
+            </description>
+        </attribute>
+        <attribute>
+            <name>activeTabStyleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Style class of the active tab cell.
+            </description>
+        </attribute>
+        <attribute>
+            <name>inactiveTabStyleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Style class of the inactive tab cells.
+            </description>
+        </attribute>
+        <attribute>
+            <name>disabledTabStyleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Style class of the disabled tab cells.
+            </description>
+        </attribute>
+        <attribute>
+            <name>activeSubStyleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Style class of the active tab sub cell.
+            </description>
+        </attribute>
+        <attribute>
+            <name>inactiveSubStyleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Style class of the inactive tab sub cells.
+            </description>
+        </attribute>
+        <attribute>
+            <name>tabContentStyleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Style class of the active tab content cell.
+            </description>
+        </attribute>
+    </tag>
+
+    <!-- tab change listener -->
+    <tag>
+        <name>tabChangeListener</name>
+        <tag-class>org.apache.myfaces.custom.tabbedpane.TabChangeListenerTag</tag-class>
+        <body-content>empty</body-content>
+        <attribute>
+            <name>type</name>
+            <required>true</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+    </tag>
+
+
+    <!-- collapsiblePanel -->
+    <tag>
+        <name>collapsiblePanel</name>
+        <tag-class>org.apache.myfaces.custom.collapsiblepanel.HtmlCollapsiblePanelTag</tag-class>
+        <body-content>JSP</body-content>
+                <!-- UIPanel attributes -->
+        <!-- UIComponent attributes -->
+        <attribute>
+            <name>id</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Every component may have an unique id. Automatically created if omitted.</description>
+        </attribute>
+        <attribute>
+            <name>rendered</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If false, this component will not be rendered.</description>
+        </attribute>
+        <attribute>
+            <name>binding</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Component binding.</description>
+        </attribute>
+
+
+        <!-- HTML 4.0 universal attributes -->
+        <attribute><name>dir</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>lang</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>style</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>title</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute>
+            <name>styleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Corresponds to the HTML class attribute.</description>
+        </attribute>
+
+        <!-- HTML 4.0 event-handler attributes -->
+        <attribute><name>onclick</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>ondblclick</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousedown</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseup</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseover</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousemove</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseout</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeypress</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeydown</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeyup</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+
+        <!-- MyFaces extension: user role attributes -->
+        <attribute>
+            <name>enabledOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, no hyperlink is rendered but all nested
+                tags (=body) are rendered.
+            </description>
+        </attribute>
+        <attribute>
+            <name>visibleOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, nothing is rendered and the body of this tag
+                will be skipped.
+            </description>
+        </attribute>
+
+        <attribute>
+            <name>collapsed</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+               Boolean value indicating whether the panel should be collapsed by default.
+            </description>
+        </attribute>
+        <attribute>
+            <name>value</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Label for collapsible panel.
+            </description>
+        </attribute>
+    </tag>
+
+	<!-- selectOneCountry -->
+    <tag>
+        <name>selectOneCountry</name>
+        <tag-class>org.apache.myfaces.custom.selectOneCountry.SelectOneCountryTag</tag-class>
+        <body-content>JSP</body-content>
+        <description>
+            A localized list of countries choose box.
+            The value binds to the country ISO 3166 code.
+            This is the same code as for java.util.Locale.getCountry().
+			The official codes list is available here :
+			http://www.iso.ch/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/list-en1.html
+        </description>
+        <attribute>
+            <name>maxLength</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+               Integer equals to the maximum number of characters in the country name.
+            </description>
+        </attribute>
+                <!-- all standard attributes of the selectOneMenu tag -->
+                <!-- UISelectOne attributes -->
+                <!-- UIInput attributes -->
+                <!-- UIOutput attributes -->
+        <!-- UIComponent attributes -->
+        <attribute>
+            <name>id</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Every component may have an unique id. Automatically created if omitted.</description>
+        </attribute>
+        <attribute>
+            <name>rendered</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If false, this component will not be rendered.</description>
+        </attribute>
+        <attribute>
+            <name>binding</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Component binding.</description>
+        </attribute>
+
+        <attribute>
+            <name>value</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Initial value to set when rendered for the first time.</description>
+        </attribute>
+        <attribute>
+            <name>converter</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Id of Converter to be used or reference to a Converter.</description>
+        </attribute>
+
+        <attribute>
+            <name>immediate</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description> Flag indicating that this component's value must be converted and validated immediately (that is, during Apply Request Values phase), rather than waiting until Process Validations phase.</description>
+        </attribute>
+        <attribute>
+            <name>required</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If true, this component will be checked for non-empty input.</description>
+        </attribute>
+        <attribute>
+            <name>validator</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>MethodBinding pointing at a method that will be called during Process Validations phase of the request processing lifecycle, to validate the current value of this component.</description>
+        </attribute>
+        <attribute>
+            <name>valueChangeListener</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Listener for value changes.</description>
+        </attribute>
+
+
+        <!-- HTML 4.0 universal attributes -->
+        <attribute><name>dir</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>lang</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>style</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>title</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute>
+            <name>styleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Corresponds to the HTML class attribute.</description>
+        </attribute>
+
+        <!-- HTML 4.0 event-handler attributes -->
+        <attribute><name>onclick</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>ondblclick</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousedown</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseup</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseover</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousemove</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseout</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeypress</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeydown</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeyup</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+
+        <!-- HTML 4.0 select attributes -->
+        <attribute><name>datafld</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>datasrc</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>dataformatas</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>disabled</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <!-- "multiple" cannot be set manually -->
+        <!-- "name" cannot be set manually -->
+        <attribute><name>onblur</name>      <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onchange</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onfocus</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <!-- "size" cannot be set directly for it is a MenuRenderer specific attribute -->
+        <attribute><name>tabindex</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute>
+            <name>readonly</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Flag indicating that this component will prohibit
+          changes by the user.  The element may receive focus
+          unless it has also been disabled.</description>
+        </attribute>
+        <attribute><name>enabledClass</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+         <attribute><name>disabledClass</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <!-- MyFaces extension: user role attributes -->
+        <attribute>
+            <name>enabledOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, no hyperlink is rendered but all nested
+                tags (=body) are rendered.
+            </description>
+        </attribute>
+        <attribute>
+            <name>visibleOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, nothing is rendered and the body of this tag
+                will be skipped.
+            </description>
+        </attribute>
+
+                <!-- 
+        This attribute indicates that the component should be forced to use the specified id instead of 
+        using the one that faces generates.  Components contained within a "list" will include a '[n]'  
+        suffix where 'n' is the row index (unless the forceIdIndex attribute is set to false).
+        -->
+        <attribute>
+            <name>forceId</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If true, this component will force the use of the specified id when rendering.</description>
+        </attribute>        
+
+        <!-- 
+        If the component is contained within an "list" (such as dataTable), this attribute indicates whether or not a 
+        '[n]' suffix should be added where 'n' is the row index.  Default is true.  The attribute is ignored if forceId 
+        is false (or not specified)
+        -->
+        <attribute>
+            <name>forceIdIndex</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>
+                If false, this component will not append a '[n]' suffix (where 'n' is the row index) to components 
+                that are contained within a "list."  This value will be true by default and the value will be ignored if 
+                the value of forceId is false (or not specified.)
+            </description>
+        </attribute>        
+
+        <!-- MyFaces extension: user role attributes -->
+        <attribute>
+            <name>displayValueOnly</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If true, renders only the value of the component, but no input widget.
+                Default is false.
+            </description>
+        </attribute>
+        <attribute>
+            <name>displayValueOnlyStyle</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Style used when displayValueOnly is true.
+            </description>
+        </attribute>
+        <attribute>
+            <name>displayValueOnlyStyleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Style class used when displayValueOnly is true.
+            </description>
+        </attribute>        
+    </tag>
+
+    <!-- selectOneLanguage -->
+    <tag>
+        <name>selectOneLanguage</name>
+        <tag-class>org.apache.myfaces.custom.selectOneLanguage.SelectOneLanguageTag</tag-class>
+        <body-content>JSP</body-content>
+        <description>
+            A localized list of languages choose box.
+            The value binds to the language ISO 639 code (lowercase).
+            This is the same code as for java.util.Locale.getLanguage().
+			The official codes list is available here :
+			http://www.loc.gov/standards/iso639-2/englangn.html
+        </description>
+        <attribute>
+            <name>maxLength</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+               Integer equals to the maximum number of characters in the language name.
+            </description>
+        </attribute>
+                <!-- all standard attributes of the selectOneMenu tag -->
+                <!-- UISelectOne attributes -->
+                <!-- UIInput attributes -->
+                <!-- UIOutput attributes -->
+        <!-- UIComponent attributes -->
+        <attribute>
+            <name>id</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Every component may have an unique id. Automatically created if omitted.</description>
+        </attribute>
+        <attribute>
+            <name>rendered</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If false, this component will not be rendered.</description>
+        </attribute>
+        <attribute>
+            <name>binding</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Component binding.</description>
+        </attribute>
+
+        <attribute>
+            <name>value</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Initial value to set when rendered for the first time.</description>
+        </attribute>
+        <attribute>
+            <name>converter</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Id of Converter to be used or reference to a Converter.</description>
+        </attribute>
+
+        <attribute>
+            <name>immediate</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description> Flag indicating that this component's value must be converted and validated immediately (that is, during Apply Request Values phase), rather than waiting until Process Validations phase.</description>
+        </attribute>
+        <attribute>
+            <name>required</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If true, this component will be checked for non-empty input.</description>
+        </attribute>
+        <attribute>
+            <name>validator</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>MethodBinding pointing at a method that will be called during Process Validations phase of the request processing lifecycle, to validate the current value of this component.</description>
+        </attribute>
+        <attribute>
+            <name>valueChangeListener</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Listener for value changes.</description>
+        </attribute>
+
+
+        <!-- HTML 4.0 universal attributes -->
+        <attribute><name>dir</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>lang</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>style</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>title</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute>
+            <name>styleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Corresponds to the HTML class attribute.</description>
+        </attribute>
+
+        <!-- HTML 4.0 event-handler attributes -->
+        <attribute><name>onclick</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>ondblclick</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousedown</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseup</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseover</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousemove</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseout</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeypress</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeydown</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeyup</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+
+        <!-- HTML 4.0 select attributes -->
+        <attribute><name>datafld</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>datasrc</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>dataformatas</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>disabled</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <!-- "multiple" cannot be set manually -->
+        <!-- "name" cannot be set manually -->
+        <attribute><name>onblur</name>      <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onchange</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onfocus</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <!-- "size" cannot be set directly for it is a MenuRenderer specific attribute -->
+        <attribute><name>tabindex</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute>
+            <name>readonly</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Flag indicating that this component will prohibit
+          changes by the user.  The element may receive focus
+          unless it has also been disabled.</description>
+        </attribute>
+        <attribute><name>enabledClass</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+         <attribute><name>disabledClass</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <!-- MyFaces extension: user role attributes -->
+        <attribute>
+            <name>enabledOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, no hyperlink is rendered but all nested
+                tags (=body) are rendered.
+            </description>
+        </attribute>
+        <attribute>
+            <name>visibleOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, nothing is rendered and the body of this tag
+                will be skipped.
+            </description>
+        </attribute>
+
+                <!-- 
+        This attribute indicates that the component should be forced to use the specified id instead of 
+        using the one that faces generates.  Components contained within a "list" will include a '[n]'  
+        suffix where 'n' is the row index (unless the forceIdIndex attribute is set to false).
+        -->
+        <attribute>
+            <name>forceId</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If true, this component will force the use of the specified id when rendering.</description>
+        </attribute>        
+
+        <!-- 
+        If the component is contained within an "list" (such as dataTable), this attribute indicates whether or not a 
+        '[n]' suffix should be added where 'n' is the row index.  Default is true.  The attribute is ignored if forceId 
+        is false (or not specified)
+        -->
+        <attribute>
+            <name>forceIdIndex</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>
+                If false, this component will not append a '[n]' suffix (where 'n' is the row index) to components 
+                that are contained within a "list."  This value will be true by default and the value will be ignored if 
+                the value of forceId is false (or not specified.)
+            </description>
+        </attribute>        
+
+        <!-- MyFaces extension: user role attributes -->
+        <attribute>
+            <name>displayValueOnly</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If true, renders only the value of the component, but no input widget.
+                Default is false.
+            </description>
+        </attribute>
+        <attribute>
+            <name>displayValueOnlyStyle</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Style used when displayValueOnly is true.
+            </description>
+        </attribute>
+        <attribute>
+            <name>displayValueOnlyStyleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Style class used when displayValueOnly is true.
+            </description>
+        </attribute>        
+    </tag>
+
+	<!-- stylesheet -->
+
+	<tag>
+		<name>stylesheet</name>
+		<tag-class>org.apache.myfaces.custom.stylesheet.StylesheetTag</tag-class>
+		<body-content>JSP</body-content>
+		<description>a component, which renders the path to a common CSS-file</description>
+		<!-- UIComponent attributes -->
+        <attribute>
+            <name>id</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Every component may have an unique id. Automatically created if omitted.</description>
+        </attribute>
+        <attribute>
+            <name>rendered</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If false, this component will not be rendered.</description>
+        </attribute>
+        <attribute>
+            <name>binding</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Component binding.</description>
+        </attribute>
+
+		<!-- MyFaces extension: user role attributes -->
+        <attribute>
+            <name>enabledOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, no hyperlink is rendered but all nested
+                tags (=body) are rendered.
+            </description>
+        </attribute>
+        <attribute>
+            <name>visibleOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, nothing is rendered and the body of this tag
+                will be skipped.
+            </description>
+        </attribute>
+
+		<attribute>
+			<name>path</name>
+			<required>true</required>
+			<rtexprvalue>false</rtexprvalue>
+			<description>
+				URL for CSS-file.
+			</description>
+		</attribute>
+	</tag>
+
+	<!-- div -->
+
+	<tag>
+		<name>div</name>
+		<tag-class>org.apache.myfaces.custom.div.DivTag</tag-class>
+		<body-content>JSP</body-content>
+		<description>Places a div around its children</description>
+		<!-- UIComponent attributes -->
+        <attribute>
+            <name>id</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Every component may have an unique id. Automatically created if omitted.</description>
+        </attribute>
+        <attribute>
+            <name>rendered</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If false, this component will not be rendered.</description>
+        </attribute>
+        <attribute>
+            <name>binding</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Component binding.</description>
+        </attribute>
+
+                <!-- 
+        This attribute indicates that the component should be forced to use the specified id instead of 
+        using the one that faces generates.  Components contained within a "list" will include a '[n]'  
+        suffix where 'n' is the row index (unless the forceIdIndex attribute is set to false).
+        -->
+        <attribute>
+            <name>forceId</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If true, this component will force the use of the specified id when rendering.</description>
+        </attribute>        
+
+        <!-- 
+        If the component is contained within an "list" (such as dataTable), this attribute indicates whether or not a 
+        '[n]' suffix should be added where 'n' is the row index.  Default is true.  The attribute is ignored if forceId 
+        is false (or not specified)
+        -->
+        <attribute>
+            <name>forceIdIndex</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>
+                If false, this component will not append a '[n]' suffix (where 'n' is the row index) to components 
+                that are contained within a "list."  This value will be true by default and the value will be ignored if 
+                the value of forceId is false (or not specified.)
+            </description>
+        </attribute>        
+
+        <!-- MyFaces extension: user role attributes -->
+        <attribute>
+            <name>enabledOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, no hyperlink is rendered but all nested
+                tags (=body) are rendered.
+            </description>
+        </attribute>
+        <attribute>
+            <name>visibleOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, nothing is rendered and the body of this tag
+                will be skipped.
+            </description>
+        </attribute>
+
+		<attribute>
+			<name>style</name>
+			<required>false</required>
+			<rtexprvalue>false</rtexprvalue>
+			<description>
+				The style to use for this div.
+			</description>
+		</attribute>
+		<attribute>
+			<name>styleClass</name>
+			<required>false</required>
+			<rtexprvalue>false</rtexprvalue>
+			<description>
+				The class to use for this div.
+			</description>
+		</attribute>
+	</tag>
+
+	<!-- htmlTag -->
+
+	<tag>
+		<name>htmlTag</name>
+		<tag-class>org.apache.myfaces.custom.htmlTag.HtmlTagTag</tag-class>
+		<body-content>JSP</body-content>
+		<description>Places the given HTML tag div around its children</description>
+		<!-- UIComponent attributes -->
+        <attribute>
+            <name>id</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Every component may have an unique id. Automatically created if omitted.</description>
+        </attribute>
+        <attribute>
+            <name>rendered</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If false, this component will not be rendered.</description>
+        </attribute>
+        <attribute>
+            <name>binding</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Component binding.</description>
+        </attribute>
+
+                <!-- 
+        This attribute indicates that the component should be forced to use the specified id instead of 
+        using the one that faces generates.  Components contained within a "list" will include a '[n]'  
+        suffix where 'n' is the row index (unless the forceIdIndex attribute is set to false).
+        -->
+        <attribute>
+            <name>forceId</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If true, this component will force the use of the specified id when rendering.</description>
+        </attribute>        
+
+        <!-- 
+        If the component is contained within an "list" (such as dataTable), this attribute indicates whether or not a 
+        '[n]' suffix should be added where 'n' is the row index.  Default is true.  The attribute is ignored if forceId 
+        is false (or not specified)
+        -->
+        <attribute>
+            <name>forceIdIndex</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>
+                If false, this component will not append a '[n]' suffix (where 'n' is the row index) to components 
+                that are contained within a "list."  This value will be true by default and the value will be ignored if 
+                the value of forceId is false (or not specified.)
+            </description>
+        </attribute>        
+
+        <!-- MyFaces extension: user role attributes -->
+        <attribute>
+            <name>enabledOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, no hyperlink is rendered but all nested
+                tags (=body) are rendered.
+            </description>
+        </attribute>
+        <attribute>
+            <name>visibleOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, nothing is rendered and the body of this tag
+                will be skipped.
+            </description>
+        </attribute>
+
+        <attribute>
+            <name>value</name>
+            <required>true</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+				The name of the tag. For example, use h1 to generate an h1 tag.
+			</description>
+        </attribute>
+		<attribute>
+			<name>style</name>
+			<required>false</required>
+			<rtexprvalue>false</rtexprvalue>
+			<description>
+				The style to use for this tag.
+			</description>
+		</attribute>
+		<attribute>
+			<name>styleClass</name>
+			<required>false</required>
+			<rtexprvalue>false</rtexprvalue>
+			<description>
+				The class to use for this tag.
+			</description>
+		</attribute>
+	</tag>
+
+
+    <!-- radio -->
+    <tag>
+        <name>radio</name>
+        <tag-class>org.apache.myfaces.custom.radio.HtmlRadioTag</tag-class>
+        <body-content>JSP</body-content>
+        <description>
+            Renders a HTML input of type "radio". The associated SelectItem comes from
+            an extended selectOneRadio component with layout "spread". The selectOneRadio
+            is referenced by the "for" attribute.
+            All HTML pass-through attributes for this input are taken from the associated
+            selectOneRadio.
+        </description>
+        <!-- UIComponent attributes -->
+        <attribute>
+            <name>id</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Every component may have an unique id. Automatically created if omitted.</description>
+        </attribute>
+        <attribute>
+            <name>rendered</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If false, this component will not be rendered.</description>
+        </attribute>
+        <attribute>
+            <name>binding</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Component binding.</description>
+        </attribute>
+
+        <!-- MyFaces extension: user role attributes -->
+        <attribute>
+            <name>enabledOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, no hyperlink is rendered but all nested
+                tags (=body) are rendered.
+            </description>
+        </attribute>
+        <attribute>
+            <name>visibleOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, nothing is rendered and the body of this tag
+                will be skipped.
+            </description>
+        </attribute>
+
+        <!-- HtmlRadio attributes -->
+        <attribute>
+            <name>for</name>
+            <required>true</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                 id of the referenced extended selectOneRadio component
+            </description>
+        </attribute>
+        <attribute>
+            <name>index</name>
+            <required>true</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                n-th SelectItem of referenced UISelectOne starting with 0.
+            </description>
+        </attribute>
+    </tag>
+
+   <!-- tree -->
+    <tag>
+        <name>tree</name>
+        <tag-class>org.apache.myfaces.custom.tree.taglib.TreeTag</tag-class>
+        <body-content>JSP</body-content>
+        <attribute>
+            <name>id</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>value</name>
+            <required>true</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>var</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>styleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>nodeClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>selectedNodeClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>headerClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>footerClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>rowClasses</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>columnClasses</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>iconClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>iconLine</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>iconNoline</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>iconChildFirst</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>iconChildMiddle</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>iconChildLast</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>iconNodeOpen</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>iconNodeOpenFirst</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>iconNodeOpenMiddle</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>iconNodeOpenLast</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>iconNodeClose</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>iconNodeCloseFirst</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>iconNodeCloseMiddle</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>iconNodeCloseLast</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>expandRoot</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>expireListeners</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Time interval the tree will remain registered as a TreeModelListener without being accessed</description>
+        </attribute>
+    </tag>
+
+    <tag>
+        <name>treeSelectionListener</name>
+        <tag-class>org.apache.myfaces.custom.tree.taglib.TreeSelectionListenerTag</tag-class>
+        <body-content>empty</body-content>
+        <attribute>
+            <name>type</name>
+            <required>true</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+    </tag>
+
+    <tag>
+        <name>iconProvider</name>
+        <tag-class>org.apache.myfaces.custom.tree.taglib.IconProviderTag</tag-class>
+        <body-content>empty</body-content>
+        <attribute>
+            <name>type</name>
+            <required>true</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+    </tag>
+
+    <!-- tree column -->
+    <tag>
+        <name>treeColumn</name>
+        <tag-class>org.apache.myfaces.custom.tree.taglib.TreeColumnTag</tag-class>
+        <body-content>JSP</body-content>
+        <description>
+            Renders a HTML input of type "treeColumn". This tag outlines the column where
+            the tree structure will be render as part of the tree table.
+        </description>
+        <!-- UIComponent attributes -->
+        <attribute>
+            <name>id</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Every component may have an unique id. Automatically created if omitted.</description>
+        </attribute>
+        <attribute>
+            <name>rendered</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If false, this component will not be rendered.</description>
+        </attribute>
+        <attribute>
+            <name>binding</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Component binding.</description>
+        </attribute>
+
+    </tag>
+
+    <!-- tree checkbox -->
+    <tag>
+        <name>treeCheckbox</name>
+        <tag-class>org.apache.myfaces.custom.tree.taglib.TreeCheckboxTag</tag-class>
+        <body-content>empty</body-content>
+        <description>
+            Renders a HTML input of type "treeCheckbox". The associated comes from
+            the treeCheckbox itemLabel and itemValue.  The selected items come from an extended
+            selectManyCheckbox component with layout "spread". The selectManyCheckbox
+            is referenced by the "for" attribute.
+            All HTML pass-through attributes for this input are taken from the associated
+            selectManyCheckbox.
+        </description>
+        <!-- UISelectItem attributes -->
+        <attribute>
+            <name>binding</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Component binding.</description>
+        </attribute>
+        <attribute>
+            <name>itemDisabled</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If true, this component will not be saved during state saving.</description>
+        </attribute>
+        <attribute>
+            <name>id</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+        </attribute>
+        <attribute>
+            <name>itemDescription</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+        </attribute>
+        <attribute>
+            <name>itemLabel</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+        </attribute>
+        <attribute>
+            <name>itemValue</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+        </attribute>
+        <attribute>
+            <name>value</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Value reference pointing at a javax.faces.model.SelectItem instance.</description>
+        </attribute>
+
+        <!-- HtmlTreeCheckbox attributes -->
+        <attribute>
+            <name>for</name>
+            <required>true</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                id of the referenced extended selectManyCheckbox component
+            </description>
+        </attribute>
+    </tag>
+
+   <!-- tree2 -->
+    <tag>
+        <name>tree2</name>
+        <tag-class>org.apache.myfaces.custom.tree2.TreeTag</tag-class>
+        <body-content>JSP</body-content>
+        <attribute>
+            <name>value</name>
+            <required>true</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>var</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>varNodeToggler</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>showNav</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Show the "plus" and "minus" navigation icons (default is true.) Value is ignored if
+                clientSideToggle is true.
+            </description>
+        </attribute>
+        <attribute>
+            <name>showLines</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Show the connecting lines (default is true.)</description>
+        </attribute>
+        <attribute>
+            <name>clientSideToggle</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Perform client-side toggling of expand/collapse state via javascript (default is true.)</description>
+        </attribute>
+        <attribute>
+            <name>showRootNode</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Include the root node when rendering the tree (default is true.)</description>
+        </attribute>
+        <attribute>
+            <name>preserveToggle</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Preserve changes in client-side toggle information between requests (default is true.)</description>
+        </attribute>
+                <attribute>
+            <name>javascriptLocation</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>
+                An alternate location to find javascript resources.  If no values is specified, javascript will
+                be loaded from the resources directory using AddResource and ExtensionsFilter.
+            </description>
+        </attribute>
+
+        <attribute>
+            <name>imageLocation</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>
+                An alternate location to find image resources.  If no values is specified, images will
+                be loaded from the resources directory using AddResource and ExtensionsFilter.
+            </description>
+        </attribute>
+
+        <attribute>
+            <name>styleLocation</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>
+                An alternate location to find stylesheet resources.  If no values is specified, stylesheets will
+                be loaded from the resources directory using AddResource and ExtensionsFilter.
+            </description>
+        </attribute>
+
+        <!-- UIComponent attributes -->
+        <attribute>
+            <name>id</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Every component may have an unique id. Automatically created if omitted.</description>
+        </attribute>
+        <attribute>
+            <name>rendered</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If false, this component will not be rendered.</description>
+        </attribute>
+        <attribute>
+            <name>binding</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Component binding.</description>
+        </attribute>
+
+    </tag>
+
+    <!-- panelStack -->
+    <tag>
+        <name>panelStack</name>
+        <tag-class>org.apache.myfaces.custom.panelstack.PanelStackTag</tag-class>
+        <body-content>JSP</body-content>
+        <attribute>
+            <name>id</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>selectedPanel</name>
+            <required>true</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Id of the child to be rendered.</description>
+        </attribute>
+    </tag>
+
+    <!-- popup -->
+    <tag>
+        <name>popup</name>
+        <tag-class>org.apache.myfaces.custom.popup.HtmlPopupTag</tag-class>
+        <body-content>JSP</body-content>
+        <description>
+            Renders a popup which displays on a mouse event.
+        </description>
+        <attribute>
+            <name>displayAtDistanceX</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Pop the panel up in horizontal distance of x pixels from
+                event.
+            </description>
+        </attribute>
+        <attribute>
+            <name>displayAtDistanceY</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Pop the panel up in vertical distance of y pixels from
+                event.
+            </description>
+        </attribute>
+        <attribute>
+            <name>closePopupOnExitingElement</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Close the popup when the triggering element is left.
+            </description>
+        </attribute>
+        <attribute>
+            <name>closePopupOnExitingPopup</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Close the popup when the popup itself is left.
+            </description>
+        </attribute>
+                <!-- UIPanel attributes -->
+        <!-- UIComponent attributes -->
+        <attribute>
+            <name>id</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Every component may have an unique id. Automatically created if omitted.</description>
+        </attribute>
+        <attribute>
+            <name>rendered</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If false, this component will not be rendered.</description>
+        </attribute>
+        <attribute>
+            <name>binding</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Component binding.</description>
+        </attribute>
+
+
+        <!-- HTML 4.0 universal attributes -->
+        <attribute><name>dir</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>lang</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>style</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>title</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute>
+            <name>styleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Corresponds to the HTML class attribute.</description>
+        </attribute>
+
+        <!-- HTML 4.0 event-handler attributes -->
+        <attribute><name>onclick</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>ondblclick</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousedown</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseup</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseover</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousemove</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseout</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeypress</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeydown</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeyup</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+
+        <!-- MyFaces extension: user role attributes -->
+        <attribute>
+            <name>enabledOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, no hyperlink is rendered but all nested
+                tags (=body) are rendered.
+            </description>
+        </attribute>
+        <attribute>
+            <name>visibleOnUserRole</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If user is in given role, this component will be rendered
+                normally. If not, nothing is rendered and the body of this tag
+                will be skipped.
+            </description>
+        </attribute>
+
+     </tag>
+
+
+    <!-- newspaperTable -->
+    <tag>
+        <name>newspaperTable</name>
+        <tag-class>org.apache.myfaces.custom.newspaper.HtmlNewspaperTableTag</tag-class>
+        <body-content>JSP</body-content>
+        <description>
+            A data table for rendering long skinny tables as short wide table by
+            wrapping the table over a specified number of columns.
+        </description>
+                <!-- all standard attributes of the dataTable tag -->
+                <!-- UIPanel attributes -->
+        <!-- UIComponent attributes -->
+        <attribute>
+            <name>id</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Every component may have an unique id. Automatically created if omitted.</description>
+        </attribute>
+        <attribute>
+            <name>rendered</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If false, this component will not be rendered.</description>
+        </attribute>
+        <attribute>
+            <name>binding</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Component binding.</description>
+        </attribute>
+
+
+        <!-- HTML 4.0 universal attributes -->
+        <attribute><name>dir</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>lang</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>style</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>title</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute>
+            <name>styleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Corresponds to the HTML class attribute.</description>
+        </attribute>
+
+        <!-- HTML 4.0 event-handler attributes -->
+        <attribute><name>onclick</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>ondblclick</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousedown</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseup</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseover</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousemove</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseout</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeypress</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeydown</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeyup</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+
+        <!-- HTML 4.0 table attributes -->
+        <attribute><name>align</name>           <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>border</name>          <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>bgcolor</name>         <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>cellpadding</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>cellspacing</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>datafld</name>         <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>datasrc</name>         <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>dataformatas</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>frame</name>           <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>rules</name>           <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>summary</name>         <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>width</name>           <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+
+        <!-- UIData attributes -->
+        <attribute>
+            <name>value</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Supported types see JSF Spec 4.1.3</description>
+        </attribute>
+        <attribute>
+            <name>var</name>
+            <required>true</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>rows</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>first</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <!-- TableRenderer attributes -->
+        <attribute>
+            <name>columnClasses</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>footerClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>headerClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>rowClasses</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+
+        <attribute>
+            <name>newspaperColumns</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                The number of columns to wrap the table over.
+                Default: 1
+            </description>
+        </attribute>
+     </tag>
+
+
+
+<!--     Custom non-component tags     -->
+
+	<!-- aliasBean -->
+    <tag>
+        <name>aliasBean</name>
+        <tag-class>org.apache.myfaces.custom.aliasbean.AliasBeanTag</tag-class>
+        <body-content>JSP</body-content>
+        <description>
+            A tag that defines a new bean (alias) with a given value.
+            This allows you to design a subform with a generic (fictive) beans and to include it in all the pages where you use it.
+			You just need to make an alias to the real bean named after the generic bean before including the subform.
+
+			When used within an aliasBeansScope tag, this tag adds the alias to the aliasBeansScope.
+			This makes configuration with multiple aliasBeans easier to write.
+        </description>
+        <attribute>
+            <name>id</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>alias</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                The bean that will be set to the given value.
+                Example : #{holder}
+            </description>
+        </attribute>
+        <attribute>
+            <name>value</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                The value that the alias can be set to.
+				This can be a string (like "toto") or a reference to an existing bean (like "#{myBean.member1}").
+            </description>
+        </attribute>
+    </tag>
+    <tag>
+        <name>aliasBeansScope</name>
+        <tag-class>org.apache.myfaces.custom.aliasbean.AliasBeansScopeTag</tag-class>
+        <body-content>JSP</body-content>
+        <description>
+            This is like an aliasBean tag, but instead of the alias/value attributes, you configure the aliases
+            by adding aliasBean tags in the body.
+
+            The aliasBeans should be declared right after this tag.
+        </description>
+        <attribute>
+            <name>id</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+    </tag>
+
+    <!-- bufferBean -->
+    <tag>
+        <name>buffer</name>
+        <tag-class>org.apache.myfaces.custom.buffer.BufferTag</tag-class>
+        <body-content>JSP</body-content>
+        <attribute>
+            <name>into</name>
+            <required>true</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+    </tag>
+
+    <!-- saveState -->
+    <tag>
+        <name>saveState</name>
+        <tag-class>org.apache.myfaces.custom.savestate.SaveStateTag</tag-class>
+        <body-content>JSP</body-content>
+        <description>
+            saveState enables you to persist beans and values longer than
+            request scope, but shorter than session scope. It is ideal for
+            persisting backing beans and values with the same scope as your view
+            components. It does this by saving the target state with the
+            component tree.
+        </description>
+        <attribute>
+            <name>id</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>value</name>
+            <required>true</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+    </tag>
+
+    <!-- updateActionListener -->
+    <tag>
+        <name>updateActionListener</name>
+        <tag-class>org.apache.myfaces.custom.updateactionlistener.UpdateActionListenerTag</tag-class>
+        <body-content>JSP</body-content>
+        <description>
+            Registers a org.apache.myfaces.custom.updateactionlistener.UpdateActionListener at the
+            parent component.
+        </description>
+        <attribute>
+            <name>property</name>
+            <required>true</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>value</name>
+            <required>true</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>converter</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+    </tag>
+
+
+<!-- validators -->
+
+
+        <!-- creditCard -->
+    <tag>
+        <name>validateCreditCard</name>
+        <tag-class>org.apache.myfaces.custom.creditcardvalidator.ValidateCreditCardTag</tag-class>
+        <body-content>JSP</body-content>
+        <description>
+			A custom validator for creditCards, based upons Jakarta Commons.
+        </description>
+
+        <attribute>
+            <name>none</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+				none of the given cardtypes is allowed.
+            </description>
+        </attribute>
+        <attribute>
+            <name>amex</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+				american express cards
+            </description>
+        </attribute>
+        <attribute>
+            <name>visa</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+				validation for visa
+            </description>
+        </attribute>
+        <attribute>
+            <name>mastercard</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+				validation for mastercard
+            </description>
+        </attribute>
+        <attribute>
+            <name>discover</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+				validation for discover
+            </description>
+        </attribute>
+    </tag>
+
+    <!-- Validator for Email -->
+     <tag>
+        <name>validateEmail</name>
+        <tag-class>org.apache.myfaces.custom.emailvalidator.ValidateEmailTag</tag-class>
+        <body-content>JSP</body-content>
+        <description>
+			A custom validator for email address format, based upons Jakarta Commons.
+        </description>
+	</tag>
+
+    <!-- Validator for ISBN -->
+     <!--tag>
+        <name>validateISBN</name>
+        <tag-class>org.apache.myfaces.custom.isbnvalidator.ValidateISBNTag</tag-class>
+        <body-content>JSP</body-content>
+        <description>
+			A custom validator for isbn codes, based upons Jakarta Commons.
+        </description>
+	</tag -->
+
+    <!-- Validator for Regular Expressions -->
+    <tag>
+        <name>validateRegExpr</name>
+        <tag-class>org.apache.myfaces.custom.regexprvalidator.ValidateRegExprTag</tag-class>
+        <body-content>JSP</body-content>
+        <description>
+			A custom validator for reg. expr., based upons Jakarta Commons.
+        </description>
+
+        <attribute>
+            <name>pattern</name>
+            <required>true</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+				the pattern, which is the base of the validation
+            </description>
+        </attribute>
+	</tag>
+
+    <!-- Validator for Equal -->
+     <tag>
+        <name>validateEqual</name>
+        <tag-class>org.apache.myfaces.custom.equalvalidator.ValidateEqualTag</tag-class>
+        <body-content>JSP</body-content>
+        <description>
+			A custom validator for validations against foreign component values.
+        </description>
+
+        <attribute>
+            <name>for</name>
+            <required>true</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+				the id of the foreign component, which is needed for the validation
+            </description>
+        </attribute>
+	</tag>
+
+    <!-- swap_image -->
+    <tag>
+        <name>swapImage</name>
+        <tag-class>org.apache.myfaces.custom.swapimage.HtmlSwapImageTag</tag-class>
+        <body-content>JSP</body-content>
+        <attribute>
+            <name>swapImageUrl</name>
+            <required>true</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+				the url of the image displayed onmouseover
+            </description>
+        </attribute>
+        <attribute>
+            <name>activeImageUrl</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+				activeImage will be rendered if: swapImage is a direct child of commandNavigation
+                and the commandNavigation.isActive
+            </description>
+        </attribute>
+                <!-- UIGraphic attributes -->
+        <!-- UIComponent attributes -->
+        <attribute>
+            <name>id</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Every component may have an unique id. Automatically created if omitted.</description>
+        </attribute>
+        <attribute>
+            <name>rendered</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If false, this component will not be rendered.</description>
+        </attribute>
+        <attribute>
+            <name>binding</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Component binding.</description>
+        </attribute>
+
+        <attribute>
+            <name>url</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>URL of the image (see JSF.4.1.5).</description>
+        </attribute>
+        <attribute>
+            <name>value</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>URL of the image (see JSF.4.1.5).</description>
+        </attribute>
+
+        <!-- HTML 4.0 universal attributes -->
+        <attribute><name>dir</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>lang</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>style</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>title</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute>
+            <name>styleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Corresponds to the HTML class attribute.</description>
+        </attribute>
+
+        <!-- HTML 4.0 img attributes that are not part of the JSF 1.1 specification -->
+        <attribute>
+            <name>align</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+        </attribute>
+        <attribute>
+            <name>border</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+        </attribute>
+        <attribute>
+            <name>hspace</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+        </attribute>
+        <attribute>
+            <name>vspace</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+        </attribute>
+
+        <!-- The subset of HTML 4.0 img attributes that are supported by the JSF 1.1 specification -->
+        <attribute>
+            <name>alt</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+        </attribute>
+        <attribute>
+            <name>height</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+        </attribute>
+        <attribute>
+            <name>ismap</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+        </attribute>
+        <attribute>
+            <name>longdesc</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+        </attribute>
+        <!-- "name" attribute cannot be set directly by user -->
+        <!-- "src" attribute cannot be set directly, use "url" instead! -->
+        <attribute>
+            <name>usemap</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+        </attribute>
+        <attribute>
+            <name>width</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+        </attribute>
+
+        <attribute><name>onclick</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>ondblclick</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeypress</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeydown</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeyup</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+    </tag>
+
+	<!-- columns -->
+    <tag>
+        <name>columns</name>
+        <tag-class>org.apache.myfaces.custom.crosstable.HtmlColumnsTag</tag-class>
+        <body-content>JSP</body-content>
+        <!-- UIComponent attributes -->
+        <attribute>
+            <name>id</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Every component may have an unique id. Automatically created if omitted.</description>
+        </attribute>
+        <attribute>
+            <name>rendered</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If false, this component will not be rendered.</description>
+        </attribute>
+        <attribute>
+            <name>binding</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Component binding.</description>
+        </attribute>
+
+        <!-- UIColumn attributes -->
+        <attribute>
+            <name>value</name>
+            <required>true</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Supported types see JSF Spec 4.1.3</description>
+        </attribute>
+        <attribute>
+            <name>var</name>
+            <required>true</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <!-- HTML 4.0 universal attributes -->
+        <attribute><name>dir</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>lang</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>style</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>title</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute>
+            <name>styleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Corresponds to the HTML class attribute.</description>
+        </attribute>
+
+        <!-- HTML 4.0 event-handler attributes -->
+        <attribute><name>onclick</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>ondblclick</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousedown</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseup</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseover</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousemove</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseout</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeypress</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeydown</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeyup</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+
+        
+        <!-- header attributes -->
+        <attribute><name>headerdir</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>headerlang</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>headerstyle</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>headertitle</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>headerstyleClass</name><required>false</required><rtexprvalue>false</rtexprvalue><description>Corresponds to the HTML class attribute.</description></attribute>
+        <attribute><name>headeronclick</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>headerondblclick</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>headeronmousedown</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>headeronmouseup</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>headeronmouseover</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>headeronmousemove</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>headeronmouseout</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>headeronkeypress</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>headeronkeydown</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>headeronkeyup</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+
+        <!-- footer attributes -->
+        <attribute><name>footerdir</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>footerlang</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>footerstyle</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>footertitle</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>footerstyleClass</name><required>false</required><rtexprvalue>false</rtexprvalue><description>Corresponds to the HTML class attribute.</description></attribute>
+        <attribute><name>footeronclick</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>footerondblclick</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>footeronmousedown</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>footeronmouseup</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>footeronmouseover</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>footeronmousemove</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>footeronmouseout</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>footeronkeypress</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>footeronkeydown</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>footeronkeyup</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+
+        <attribute>
+            <name>width</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>This attribute can be used to set the width of the &lt;TD&gt; elements</description>
+        </attribute>        
+     </tag>
+
+
+  <!-- column -->
+    <tag>
+        <name>column</name>
+        <tag-class>org.apache.myfaces.custom.column.HtmlColumnTag</tag-class>
+        <body-content>JSP</body-content>
+        <!-- UIComponent attributes -->
+        <attribute>
+            <name>id</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Every component may have an unique id. Automatically created if omitted.</description>
+        </attribute>
+        <attribute>
+            <name>rendered</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>If false, this component will not be rendered.</description>
+        </attribute>
+        <attribute>
+            <name>binding</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>Component binding.</description>
+        </attribute>
+
+        <!-- UIColumn attributes -->
+        <!-- HTML 4.0 universal attributes -->
+        <attribute><name>dir</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>lang</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>style</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>title</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute>
+            <name>styleClass</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Corresponds to the HTML class attribute.</description>
+        </attribute>
+
+        <!-- HTML 4.0 event-handler attributes -->
+        <attribute><name>onclick</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>ondblclick</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousedown</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseup</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseover</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmousemove</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onmouseout</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeypress</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeydown</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>onkeyup</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+
+        
+        <!-- header attributes -->
+        <attribute><name>headerdir</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>headerlang</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>headerstyle</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>headertitle</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>headerstyleClass</name><required>false</required><rtexprvalue>false</rtexprvalue><description>Corresponds to the HTML class attribute.</description></attribute>
+        <attribute><name>headeronclick</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>headerondblclick</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>headeronmousedown</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>headeronmouseup</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>headeronmouseover</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>headeronmousemove</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>headeronmouseout</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>headeronkeypress</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>headeronkeydown</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>headeronkeyup</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+
+        <!-- footer attributes -->
+        <attribute><name>footerdir</name>     <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>footerlang</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>footerstyle</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>footertitle</name>   <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>footerstyleClass</name><required>false</required><rtexprvalue>false</rtexprvalue><description>Corresponds to the HTML class attribute.</description></attribute>
+        <attribute><name>footeronclick</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>footerondblclick</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>footeronmousedown</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>footeronmouseup</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>footeronmouseover</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>footeronmousemove</name><required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>footeronmouseout</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>footeronkeypress</name> <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>footeronkeydown</name>  <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+        <attribute><name>footeronkeyup</name>    <required>false</required>  <rtexprvalue>false</rtexprvalue></attribute>
+
+        <attribute>
+            <name>width</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>This attribute can be used to set the width of the &lt;TD&gt; elements</description>
+        </attribute>        
+     </tag>
+
+</taglib>
\ No newline at end of file

Added: branches/refactor1/samples/ajaxPortlet/src/main/webapp/WEB-INF/portal.taglib.xml
===================================================================
--- branches/refactor1/samples/ajaxPortlet/src/main/webapp/WEB-INF/portal.taglib.xml	                        (rev 0)
+++ branches/refactor1/samples/ajaxPortlet/src/main/webapp/WEB-INF/portal.taglib.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<!DOCTYPE facelet-taglib PUBLIC "-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN" "facelet-taglib_1_0.dtd">
+<facelet-taglib>
+    <namespace>http://www.jboss.com/portal</namespace>
+    <tag>
+        <tag-name>scroller</tag-name>
+        <component>
+            <component-type>com.jboss.portal.Scroller</component-type>
+            <renderer-type>default</renderer-type>
+        </component>
+    </tag>
+</facelet-taglib>
\ No newline at end of file

Added: branches/refactor1/samples/ajaxPortlet/src/main/webapp/WEB-INF/portlet-instances.xml
===================================================================
--- branches/refactor1/samples/ajaxPortlet/src/main/webapp/WEB-INF/portlet-instances.xml	                        (rev 0)
+++ branches/refactor1/samples/ajaxPortlet/src/main/webapp/WEB-INF/portlet-instances.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<deployments>
+	<deployment>
+		<instance>
+			<instance-id>AjaxPortletInstance</instance-id>
+			<portlet-ref>ajaxPortlet</portlet-ref>
+		</instance>
+	</deployment>
+	<deployment>
+		<instance>
+			<instance-id>AjaxPortletSecondInstance</instance-id>
+			<portlet-ref>ajaxPortlet</portlet-ref>
+		</instance>
+	</deployment>
+</deployments>

Added: branches/refactor1/samples/ajaxPortlet/src/main/webapp/WEB-INF/portlet.tld
===================================================================
--- branches/refactor1/samples/ajaxPortlet/src/main/webapp/WEB-INF/portlet.tld	                        (rev 0)
+++ branches/refactor1/samples/ajaxPortlet/src/main/webapp/WEB-INF/portlet.tld	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
+<taglib>
+
+   <tlib-version>1.0</tlib-version>
+   <jsp-version>1.2</jsp-version>
+   <short-name>portlet</short-name>
+
+   <uri>http://java.sun.com/portlet</uri>
+
+   <tag>
+
+      <name>param</name>
+      <tag-class>org.jboss.portal.portlet.impl.jsr168.taglib.URLParameterTag</tag-class>
+      <body-content>empty</body-content>
+
+      <attribute>
+         <name>name</name>
+         <required>true</required>
+         <rtexprvalue>true</rtexprvalue>
+
+      </attribute>
+      <attribute>
+         <name>value</name>
+         <required>true</required>
+         <rtexprvalue>true</rtexprvalue>
+
+      </attribute>
+
+   </tag>
+   <tag>
+
+      <name>renderURL</name>
+      <tag-class>org.jboss.portal.portlet.impl.jsr168.taglib.RenderURLTag</tag-class>
+      <tei-class>org.jboss.portal.portlet.impl.jsr168.taglib.GenerateURLTagTEI</tei-class>
+      <body-content>JSP</body-content>
+
+      <attribute>
+         <name>portletMode</name>
+         <rtexprvalue>true</rtexprvalue>
+
+      </attribute>
+      <attribute>
+         <name>secure</name>
+         <rtexprvalue>true</rtexprvalue>
+
+      </attribute>
+      <attribute>
+         <name>var</name>
+         <rtexprvalue>true</rtexprvalue>
+
+      </attribute>
+      <attribute>
+         <name>windowState</name>
+         <rtexprvalue>true</rtexprvalue>
+
+      </attribute>
+
+   </tag>
+   <tag>
+
+      <name>defineObjects</name>
+      <tag-class>org.jboss.portal.portlet.impl.jsr168.taglib.DefineObjectsTag</tag-class>
+      <tei-class>org.jboss.portal.portlet.impl.jsr168.taglib.DefineObjectsTagTEI</tei-class>
+      <body-content>empty</body-content>
+
+   </tag>
+   <tag>
+
+      <name>actionURL</name>
+      <tag-class>org.jboss.portal.portlet.impl.jsr168.taglib.ActionURLTag</tag-class>
+      <tei-class>org.jboss.portal.portlet.impl.jsr168.taglib.GenerateURLTagTEI</tei-class>
+      <body-content>JSP</body-content>
+
+      <attribute>
+         <name>portletMode</name>
+         <rtexprvalue>true</rtexprvalue>
+
+      </attribute>
+      <attribute>
+         <name>secure</name>
+         <rtexprvalue>true</rtexprvalue>
+
+      </attribute>
+      <attribute>
+         <name>var</name>
+         <rtexprvalue>true</rtexprvalue>
+
+      </attribute>
+      <attribute>
+         <name>windowState</name>
+         <rtexprvalue>true</rtexprvalue>
+
+      </attribute>
+
+   </tag>
+   <tag>
+
+      <name>namespace</name>
+      <tag-class>org.jboss.portal.portlet.impl.jsr168.taglib.NamespaceTag</tag-class>
+      <body-content>empty</body-content>
+
+   </tag>
+
+</taglib>

Added: branches/refactor1/samples/ajaxPortlet/src/main/webapp/WEB-INF/portlet.xml
===================================================================
--- branches/refactor1/samples/ajaxPortlet/src/main/webapp/WEB-INF/portlet.xml	                        (rev 0)
+++ branches/refactor1/samples/ajaxPortlet/src/main/webapp/WEB-INF/portlet.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,34 @@
+<portlet-app version="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://java.sun.com/xml/ns/portlet"
+  xmlns="http://java.sun.com/xml/ns/portlet">
+  <portlet>
+    <portlet-name>ajaxPortlet</portlet-name>
+      <portlet-class>org.ajax4jsf.portlet.AjaxFacesPortlet</portlet-class>
+      <init-param>
+        <name>default-view</name>
+        <value>/jsf/start.xhtml</value>
+      </init-param>
+      <!-- 
+      <init-param>
+        <name>default-edit</name>
+        <value>/jsf/start-edit.xhtml</value>
+      </init-param>
+      <init-param>
+        <name>default-help</name>
+        <value>/jsf/start-help.xhtml</value>
+      </init-param>
+       -->
+    <expiration-cache>-0</expiration-cache>
+    <portlet-info>
+       <title>Ajax Portlet</title>
+    </portlet-info>
+    <supports>
+      <mime-type>text/html</mime-type>
+      <portlet-mode>VIEW</portlet-mode>
+      <!-- 
+      <portlet-mode>EDIT</portlet-mode>
+      <portlet-mode>HELP</portlet-mode>
+       -->
+    </supports>
+  </portlet>
+</portlet-app>

Added: branches/refactor1/samples/ajaxPortlet/src/main/webapp/WEB-INF/web.xml
===================================================================
--- branches/refactor1/samples/ajaxPortlet/src/main/webapp/WEB-INF/web.xml	                        (rev 0)
+++ branches/refactor1/samples/ajaxPortlet/src/main/webapp/WEB-INF/web.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,109 @@
+<?xml version="1.0"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+	~ JBoss, a division of Red Hat                                              ~
+	~ Copyright 2006, Red Hat Middleware, LLC, and individual                   ~
+	~ contributors as indicated by the @authors tag. See the                    ~
+	~ copyright.txt in the distribution for a full listing of                   ~
+	~ individual contributors.                                                  ~
+	~                                                                           ~
+	~ This is free software; you can redistribute it and/or modify it           ~
+	~ under the terms of the GNU Lesser General Public License as               ~
+	~ published by the Free Software Foundation; either version 2.1 of          ~
+	~ the License, or (at your option) any later version.                       ~
+	~                                                                           ~
+	~ This software is distributed in the hope that it will be useful,          ~
+	~ but WITHOUT ANY WARRANTY; without even the implied warranty of            ~
+	~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU          ~
+	~ Lesser General Public License for more details.                           ~
+	~                                                                           ~
+	~ You should have received a copy of the GNU Lesser General Public          ~
+	~ License along with this software; if not, write to the Free               ~
+	~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA        ~
+	~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.                  ~
+	~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee  http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+ <context-param>
+  <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
+  <param-value>true</param-value>
+ </context-param>
+ <context-param>
+  <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
+  <param-value>false</param-value>
+ </context-param>
+ <context-param>
+  <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
+  <param-value>false</param-value>
+ </context-param>
+ <context-param>
+  <param-name>org.apache.myfaces.CHECK_EXTENSIONS_FILTER</param-name>
+  <param-value>false</param-value>
+ </context-param>
+ <context-param>
+  <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
+  <param-value>true</param-value>
+ </context-param>
+ <context-param>
+  <param-name>facelets.DEVELOPMENT</param-name>
+  <param-value>false</param-value>
+ </context-param>
+ <context-param>
+  <param-name>facelets.SKIP_COMMENTS</param-name>
+  <param-value>true</param-value>
+ </context-param>
+ <context-param>
+  <param-name>facelets.VIEW_MAPPINGS</param-name>
+  <param-value>*.xhtml</param-value>
+ </context-param>
+ <context-param>
+  <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
+  <param-value>org.ajax4jsf.portlet.application.FaceletPortletViewHandler</param-value>
+ </context-param>
+ <!-- 
+		<context-param>
+		<param-name>facelets.LIBRARIES</param-name>
+		<param-value>/WEB-INF/portal.taglib.xml</param-value>
+		</context-param>
+	-->
+ <context-param>
+  <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
+  <param-value>.xhtml</param-value>
+ </context-param>
+ <context-param>
+  <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+  <param-value>server</param-value>
+ </context-param>
+ <filter>
+  <display-name>Ajax4jsf Filter</display-name>
+  <filter-name>ajax4jsf</filter-name>
+  <filter-class>org.ajax4jsf.Filter</filter-class>
+ </filter>
+ <filter-mapping>
+  <filter-name>ajax4jsf</filter-name>
+  <servlet-name>FacesServlet</servlet-name>
+  <dispatcher>FORWARD</dispatcher>
+  <dispatcher>REQUEST</dispatcher>
+  <dispatcher>INCLUDE</dispatcher>
+ </filter-mapping>
+ <!--
+ 	<listener>
+ 	<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
+ 	</listener>
+ -->
+ <servlet>
+  <servlet-name>FacesServlet</servlet-name>
+  <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+  <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+  <servlet-name>FacesServlet</servlet-name>
+  <url-pattern>/faces/*</url-pattern>
+ </servlet-mapping>
+ <mime-mapping>
+  <extension>svg</extension>
+  <mime-type>image/svg+xml</mime-type>
+ </mime-mapping>
+ <login-config>
+  <auth-method>BASIC</auth-method>
+ </login-config>
+</web-app>

Added: branches/refactor1/samples/ajaxPortlet/src/main/webapp/formSubmit/test.htc
===================================================================
--- branches/refactor1/samples/ajaxPortlet/src/main/webapp/formSubmit/test.htc	                        (rev 0)
+++ branches/refactor1/samples/ajaxPortlet/src/main/webapp/formSubmit/test.htc	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,7 @@
+<method name="submit" internalname="_submit" />
+<script type="text/javascript">
+  function _submit()
+  {
+     mycallback(this);
+  }
+</script>

Added: branches/refactor1/samples/ajaxPortlet/src/main/webapp/formSubmit/test.html
===================================================================
--- branches/refactor1/samples/ajaxPortlet/src/main/webapp/formSubmit/test.html	                        (rev 0)
+++ branches/refactor1/samples/ajaxPortlet/src/main/webapp/formSubmit/test.html	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,57 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+        "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+  <title>Test interception of programmatic form submission</title>
+   <!--<script type="text/javascript" src="../resources/prototype.js"></script>-->
+   <!--[if IE]>
+   <style type="text/css">
+       form
+       {
+          behavior: url(test.htc);
+       }
+   </style>
+   <![endif]-->
+   <script type="text/javascript">
+      var isIE = /msie/i.test(navigator.userAgent);
+      if (!isIE)
+      {
+         try
+         {
+            HTMLFormElement.prototype.submit = function()
+            {
+               mycallback(this)
+            };
+         }
+         catch (e)
+         {
+            alert("No prototype manipulation possible");
+         }
+      }
+   </script>
+</head>
+<body>
+
+
+<p>The goal of this page is to test the interception of programmatic form submission.</p>
+
+<form id="the_form" action="">
+   <select onclick="document.getElementById('the_form').submit()" multiple="multiple">
+      <option>A</option>
+      <option>B</option>
+      <option>C</option>
+   </select>
+</form>
+
+<a href="javascript:document.getElementById('the_form').submit()">submit</a>
+
+<script type="text/javascript">
+   function mycallback(form)
+   {
+      alert(form.id);
+   }
+</script>
+
+
+</body>
+</html>
\ No newline at end of file

Added: branches/refactor1/samples/ajaxPortlet/src/main/webapp/jsf/common/editPreferences.xhtml
===================================================================
--- branches/refactor1/samples/ajaxPortlet/src/main/webapp/jsf/common/editPreferences.xhtml	                        (rev 0)
+++ branches/refactor1/samples/ajaxPortlet/src/main/webapp/jsf/common/editPreferences.xhtml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,98 @@
+<div
+      xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:ui="http://java.sun.com/jsf/facelets"
+      xmlns:h="http://java.sun.com/jsf/html"
+      xmlns:f="http://java.sun.com/jsf/core"
+      xmlns:c="http://java.sun.com/jstl/core">
+
+   <h:form>
+      <table width="100%">
+         <thead class="portlet-section-header" style="text-align:left;">
+            <tr>
+               <th>Key</th>
+               <th>Name</th>
+               <th>ReadOnly</th>
+               <c:if test="#{prefs.mutable}">
+                  <th>Value</th>
+               </c:if>
+            </tr>
+         </thead>
+         <tbody>
+            <c:forEach items="#{prefs.entries}" var="pref" varStatus="status">
+               <tr class="#{status.index % 2 == 0 ? 'portlet-section-body' : 'portlet-section-alternate'}">
+                  <td>
+                     <c:choose>
+                        <c:when test="#{prefs.mutable and pref.readOnly == false}">
+                           <h:commandLink
+                              rendered="#{pref.readOnly == false}"
+                              action="#{pref.select}">#{pref.name}</h:commandLink>
+                        </c:when>
+                        <c:otherwise>#{pref.name}</c:otherwise>
+                     </c:choose>
+                  </td>
+                  <td>
+                     <h:outputText value="#{pref.displayName}"/>
+                  </td>
+                  <td>
+                     <h:selectBooleanCheckbox disabled="true" value="#{pref.readOnly}"/>
+                  </td>
+                  <c:if test="#{prefs.mutable}">
+                     <td>
+                        <h:outputText value="#{pref.value}"/>
+                     </td>
+                  </c:if>
+               </tr>
+            </c:forEach>
+         </tbody>
+      </table>
+   </h:form>
+
+   <c:if test="#{prefs.selectedEntry != null}">
+      <h:form style="padding: 1em 0 1em 0">
+         <fieldset style="border: 1px solid;">
+            <legend>Edit existing values</legend>
+            <table>
+               <tbody>
+                  <c:forEach items="#{prefs.selectedEntry.indices}" var="index" varStatus="status">
+                     <tr>
+                        <td>
+                           <h:outputLabel for="row_#{status.index}">
+                              <h:outputText value="Value #{status.index}: " styleClass="portlet-form-field-label"/>
+                           </h:outputLabel>
+                        </td>
+                        <td>
+                           <h:inputText value="#{prefs.selectedEntry[index]}" styleClass="portlet-form-input-field"/>
+                        </td>
+                        <td>
+                           <h:commandButton
+                              id="row_#{status.index}"
+                              actionListener="#{prefs.selectedEntry.deleteLine}"
+                              value="Delete"
+                              styleClass="portlet-form-button"/>
+                        </td>
+                     </tr>
+                  </c:forEach>
+                  <tr>
+                     <td colspan="3">
+                        <h:commandButton value="Update" styleClass="portlet-form-button"/>
+                     </td>
+                  </tr>
+               </tbody>
+            </table>
+         </fieldset>
+      </h:form>
+
+      <h:form>
+         <fieldset style="border: 1px solid;">
+            <legend>Append a value</legend>
+            <h:outputLabel for="new_value">
+               <h:outputText value="New value: " styleClass="portlet-form-field-label"/>
+            </h:outputLabel>
+            <h:inputText id="new_value" value="#{prefs.selectedEntry.line}" styleClass="portlet-form-input-field"/>
+            <h:commandButton action="#{prefs.selectedEntry.appendLine}" value="Append" styleClass="portlet-form-button"/>
+         </fieldset>
+      </h:form>
+
+   </c:if>
+
+</div>

Added: branches/refactor1/samples/ajaxPortlet/src/main/webapp/jsf/common/editSecurity.xhtml
===================================================================
--- branches/refactor1/samples/ajaxPortlet/src/main/webapp/jsf/common/editSecurity.xhtml	                        (rev 0)
+++ branches/refactor1/samples/ajaxPortlet/src/main/webapp/jsf/common/editSecurity.xhtml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,36 @@
+<div
+   xmlns="http://www.w3.org/1999/xhtml"
+   xmlns:ui="http://java.sun.com/jsf/facelets"
+   xmlns:h="http://java.sun.com/jsf/html"
+   xmlns:f="http://java.sun.com/jsf/core"
+   xmlns:c="http://java.sun.com/jstl/core">
+
+   <h:form>
+      <table>
+         <tbody>
+            <c:forEach items="#{auth.roles}" var="role" varStatus="status">
+               <tr>
+                  <td>
+                     <h:outputLabel for="cars_#{status.index}">
+                        <span class="portlet-form-field-label">Role <span>#{role == '__unchecked__' ? 'Unchecked' : (auth.roleDisplayNameMap[role] != null ? auth.roleDisplayNameMap[role] : role)}</span></span>:
+                     </h:outputLabel>
+                  </td>
+                  <td>
+                     <h:selectManyCheckbox
+                        id="cars_#{status.index}"
+                        styleClass="portlet-form-field"
+                        value="#{auth.forRole[role]}"
+                        layout="lineDirection">
+                        <f:selectItems value="#{auth.availableActions}"/>
+                     </h:selectManyCheckbox>
+                  </td>
+               </tr>
+            </c:forEach>
+         </tbody>
+      </table>
+      <div style="text-align:center;padding: 1em 0 1em 0">
+         <ui:insert name="form_submit"/>
+      </div>
+   </h:form>
+
+</div>
\ No newline at end of file

Added: branches/refactor1/samples/ajaxPortlet/src/main/webapp/jsf/common/editTheme.xhtml
===================================================================
--- branches/refactor1/samples/ajaxPortlet/src/main/webapp/jsf/common/editTheme.xhtml	                        (rev 0)
+++ branches/refactor1/samples/ajaxPortlet/src/main/webapp/jsf/common/editTheme.xhtml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,51 @@
+<div
+      xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:ui="http://java.sun.com/jsf/facelets"
+      xmlns:h="http://java.sun.com/jsf/html"
+      xmlns:f="http://java.sun.com/jsf/core">
+      
+   <h:panelGroup styleClass="portlet-section-body" id="themepg">
+   <h:form id="themeform">
+      <fieldset style="border: 1px solid;">
+         <legend>Theme properties</legend>
+         <table>
+            <tbody>
+               <tr>
+                  <td class="portlet-form-field-label">
+                     <h:outputLabel for="layout">Layout:</h:outputLabel>
+                  </td>
+                  <td>
+                     <h:selectOneMenu id="layout" styleClass="portlet-form-field" value="#{themePropertyAction.layoutName}">
+                        <f:selectItems value="#{portalobjectmgr.themes.layoutNames}"/>
+                     </h:selectOneMenu>
+                  </td>
+               </tr>
+               <tr>
+                  <td class="portlet-form-field-label">
+                     <h:outputLabel for="theme">Theme:</h:outputLabel>
+                  </td>
+                  <td>
+                     <h:selectOneMenu id="theme" styleClass="portlet-form-field" value="#{themePropertyAction.themeName}">
+                        <f:selectItems value="#{portalobjectmgr.themes.themeNames}"/>
+                     </h:selectOneMenu>
+                  </td>
+               </tr>
+               <tr>
+                  <td class="portlet-form-field-label">
+                     <h:outputLabel for="renderSet">RenderSet:</h:outputLabel>
+                  </td>
+                  <td>
+                     <h:selectOneMenu id="renderSet" styleClass="portlet-form-field" value="#{themePropertyAction.renderSetName}">
+                        <f:selectItems value="#{portalobjectmgr.themes.renderSetNames}"/>
+                     </h:selectOneMenu>
+                  </td>
+               </tr>
+            </tbody>
+         </table>
+      </fieldset>
+      <div style="text-align:center;padding: 1em 0 1em 0">
+         <ui:insert name="form_submit"/>
+      </div>
+   </h:form>
+</h:panelGroup>
+</div>
\ No newline at end of file

Added: branches/refactor1/samples/ajaxPortlet/src/main/webapp/jsf/common/showPortletDetails.xhtml
===================================================================
--- branches/refactor1/samples/ajaxPortlet/src/main/webapp/jsf/common/showPortletDetails.xhtml	                        (rev 0)
+++ branches/refactor1/samples/ajaxPortlet/src/main/webapp/jsf/common/showPortletDetails.xhtml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,18 @@
+<div
+      xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:ui="http://java.sun.com/jsf/facelets"
+      xmlns:h="http://java.sun.com/jsf/html"
+      xmlns:f="http://java.sun.com/jsf/core"
+      xmlns:c="http://java.sun.com/jstl/core">
+
+   <div><span class="portlet-form-field-label">Portlet name:</span> #{portlet.name.value}</div>
+   <div><span class="portlet-form-field-label">Portlet description:</span> #{portlet.description.value}</div>
+   <div><span class="portlet-form-field-label">Portlet title:</span> #{portlet.title.value}</div>
+   <div><span class="portlet-form-field-label">Portlet keywords:</span> #{portlet.keywords.value}</div>
+   <c:if test="#{not empty portlet.locales}">
+      <div><span class="portlet-form-field-label">Portlet locales:</span>
+         <c:forEach items="#{portlet.locales}" var="locale">  #{locale} </c:forEach>
+      </div>
+   </c:if>
+
+</div>
\ No newline at end of file

Added: branches/refactor1/samples/ajaxPortlet/src/main/webapp/jsf/repeater.xhtml
===================================================================
--- branches/refactor1/samples/ajaxPortlet/src/main/webapp/jsf/repeater.xhtml	                        (rev 0)
+++ branches/refactor1/samples/ajaxPortlet/src/main/webapp/jsf/repeater.xhtml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,21 @@
+<a4j:portlet
+      xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:f="http://java.sun.com/jsf/core"
+      xmlns:ui="http://java.sun.com/jsf/facelets"
+      xmlns:h="http://java.sun.com/jsf/html"
+      xmlns:a4j="https://ajax4jsf.dev.java.net/ajax">
+
+	<h:form id="portlet_form">
+	    <h:panelGrid columns="2">
+	    <h:inputText value="#{bean.text}" >
+	      <a4j:support event="onkeyup" reRender="text"/>
+	    </h:inputText>
+	    <h:outputText id="text" value="#{bean.text}"/>
+		<a4j:commandLink value="Portlet Instances" action="#{bean.click}" reRender="counter"/>
+	    <h:outputText id="counter" value="#{bean.counter}"/>
+	    <h:commandButton action="start" value="Switch to start page" />		
+	    <a4j:commandButton action="start" value="Ajax Switch to start page" />		
+		</h:panelGrid>
+	</h:form>
+
+</a4j:portlet>
\ No newline at end of file

Added: branches/refactor1/samples/ajaxPortlet/src/main/webapp/jsf/start.xhtml
===================================================================
--- branches/refactor1/samples/ajaxPortlet/src/main/webapp/jsf/start.xhtml	                        (rev 0)
+++ branches/refactor1/samples/ajaxPortlet/src/main/webapp/jsf/start.xhtml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,27 @@
+<a4j:portlet
+      xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:f="http://java.sun.com/jsf/core"
+      xmlns:ui="http://java.sun.com/jsf/facelets"
+      xmlns:h="http://java.sun.com/jsf/html"
+      xmlns:a4j="https://ajax4jsf.dev.java.net/ajax">
+
+	<h:form id="portlet_form">
+	    <h:panelGrid columns="2">
+	    <h:inputText value="#{bean.text}" id="repeaterText">
+	      <f:validateLength maximum="5" />
+	      <a4j:support event="onkeyup" reRender="text"/>
+	    </h:inputText>
+	    <a4j:outputPanel ajaxRendered="true">
+ 	      <h:outputText id="text" value="#{bean.text}"/>
+	      <h:message for="repeaterText"/>
+	    </a4j:outputPanel>
+		<a4j:commandLink value="Increment counter" action="#{bean.click}" reRender="counter"/>
+	    <h:outputText id="counter" value="#{bean.counter}"/>
+	    <h:outputText  value="Portlet namespace:"/>
+	    <h:outputText  value="#{bean.namespace}"/>
+	    <h:commandButton action="repeater" value="Switch to repeater page" />		
+	    <a4j:commandButton action="repeater" value="Ajax Switch to repeater page" />		
+		</h:panelGrid>
+	</h:form>
+
+</a4j:portlet>

Added: branches/refactor1/samples/ajaxPortlet/src/main/webapp/jsf/tabTemplate.xhtml
===================================================================
--- branches/refactor1/samples/ajaxPortlet/src/main/webapp/jsf/tabTemplate.xhtml	                        (rev 0)
+++ branches/refactor1/samples/ajaxPortlet/src/main/webapp/jsf/tabTemplate.xhtml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,19 @@
+<div xmlns="http://www.w3.org/1999/xhtml"
+     xmlns:h="http://java.sun.com/jsf/html"
+     xmlns:ui="http://java.sun.com/jsf/facelets">
+      
+   <h:form>
+      <ul class="topnav">
+         <li>
+            <h:commandLink value="Portal Objects" action="objects" actionListener="#{portalobjectmgr.selectRootObject}"/>
+         </li>
+         <li>
+            <h:commandLink value="Portlet Instances" action="instances"/>
+         </li>
+         <li>
+            <h:commandLink value="Portlet Definitions" action="portlets"/>
+         </li>
+      </ul>
+   </h:form>
+
+</div>

Added: branches/refactor1/samples/ajaxPortlet/src/main/webapp/objects.xhtml.html
===================================================================

Added: branches/refactor1/samples/portal-echo/pom.xml
===================================================================
--- branches/refactor1/samples/portal-echo/pom.xml	                        (rev 0)
+++ branches/refactor1/samples/portal-echo/pom.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>portal-echo</groupId>
+  <artifactId>portal-echo</artifactId>
+  <packaging>war</packaging>
+  <version>0.0.1</version>
+  <description>Ajax JSF sample portlet</description>
+      <build>
+        <defaultGoal>package</defaultGoal>
+	<finalName>portal-echo</finalName>
+        <plugins>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>jboss-maven-plugin</artifactId>
+                <configuration>
+                    <jbossHome>${env.JBOSS_HOME}</jbossHome>
+                    <hostName>${jboss_host}</hostName>
+                    <port>8080</port>                    
+                </configuration>
+            </plugin>
+            </plugins>
+       </build>
+  <dependencies>
+    <dependency>
+      <groupId>javax.portlet</groupId>
+      <artifactId>portlet-api</artifactId>
+      <version>1.0</version>
+	  <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>javax.faces</groupId>
+      <artifactId>jsf-api</artifactId>
+      <version>1.2_04</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>javax.faces</groupId>
+      <artifactId>jsf-impl</artifactId>
+      <version>1.2_04</version>
+	  <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.ajax4jsf</groupId>
+      <artifactId>a4j-portlet</artifactId>
+      <version>1.1.1-SNAPSHOT</version>
+	<exclusions>
+		<exclusion>
+			<groupId>javax.faces</groupId>
+			<artifactId>jsf-api</artifactId>
+		</exclusion>
+		<exclusion>
+			<groupId>javax.faces</groupId>
+			<artifactId>jsf-impl</artifactId>
+		</exclusion>
+	</exclusions>
+    </dependency>
+		<dependency>
+			<groupId>javax.faces</groupId>
+			<artifactId>jsf-api</artifactId>
+			<version>1.2_04</version>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>javax.faces</groupId>
+			<artifactId>jsf-impl</artifactId>
+			<version>1.2_04</version>
+			<scope>provided</scope>
+		</dependency>
+  </dependencies>
+</project>
+

Added: branches/refactor1/samples/portal-echo/src/main/java/portal/Bean.java
===================================================================
--- branches/refactor1/samples/portal-echo/src/main/java/portal/Bean.java	                        (rev 0)
+++ branches/refactor1/samples/portal-echo/src/main/java/portal/Bean.java	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,53 @@
+/**
+ * 
+ */
+package portal;
+
+import javax.faces.context.FacesContext;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class Bean {
+    private int counter=0;
+    
+    private String text ="";
+
+    /**
+     * @return the counter
+     */
+    public int getCounter() {
+        return counter;
+    }
+
+    /**
+     * @param counter the counter to set
+     */
+    public void setCounter(int counter) {
+        this.counter = counter;
+    }
+
+    /**
+     * @return the text
+     */
+    public String getText() {
+        return text;
+    }
+
+    /**
+     * @param text the text to set
+     */
+    public void setText(String text) {
+        this.text = text;
+    }
+    
+    public String click(){
+	counter++;
+	return null;
+    }
+
+    public String getNamespace(){
+	return FacesContext.getCurrentInstance().getExternalContext().encodeNamespace("");
+    }
+}

Added: branches/refactor1/samples/portal-echo/src/main/webapp/META-INF/MANIFEST.MF
===================================================================
--- branches/refactor1/samples/portal-echo/src/main/webapp/META-INF/MANIFEST.MF	                        (rev 0)
+++ branches/refactor1/samples/portal-echo/src/main/webapp/META-INF/MANIFEST.MF	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path: 
+

Added: branches/refactor1/samples/portal-echo/src/main/webapp/WEB-INF/ajaxportlet-object.xml
===================================================================
--- branches/refactor1/samples/portal-echo/src/main/webapp/WEB-INF/ajaxportlet-object.xml	                        (rev 0)
+++ branches/refactor1/samples/portal-echo/src/main/webapp/WEB-INF/ajaxportlet-object.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<deployments>
+  <deployment>
+    <parent-ref>default</parent-ref>
+    <if-exists>overwrite</if-exists>
+    <instance>
+      <instance-name>AjaxPortletInstance</instance-name>
+      <component-ref>portal-echo</component-ref>
+    </instance>
+  </deployment>
+  <deployment>
+    <parent-ref>default</parent-ref>
+    <if-exists>overwrite</if-exists>
+    <page>
+	    <page-name>Two-Portal-Echo</page-name>
+	    <window>
+		    <window-name>ajaxPortletWindow</window-name>
+		    <instance-ref>AjaxPortletInstance</instance-ref>
+		    <default>true</default>
+		    <region>center</region>
+		    <height>0</height>
+	    </window>
+	    <window>
+		    <window-name>ajaxPortletSecondWindow</window-name>
+		    <instance-ref>AjaxPortletSecondInstance</instance-ref>
+		    <default>true</default>
+		    <region>center</region>
+		    <height>0</height>
+	    </window>
+    </page>
+  </deployment>
+  <deployment>
+    <parent-ref>default</parent-ref>
+    <if-exists>overwrite</if-exists>
+     <page>
+	    <page-name>Portal-echo</page-name>
+	    <window>
+		    <window-name>otherAjaxportletWindow</window-name>
+		    <instance-ref>AjaxPortletInstance</instance-ref>
+		    <default>true</default>
+		    <region>center</region>
+		    <height>0</height>
+	    </window>
+    </page>
+  </deployment>
+  <deployment>
+    <parent-ref>default</parent-ref>
+    <if-exists>overwrite</if-exists>
+    <instance>
+      <instance-name>AjaxPortletSecondInstance</instance-name>
+      <component-ref>portal-echo</component-ref>
+    </instance>
+  </deployment>
+</deployments>

Added: branches/refactor1/samples/portal-echo/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- branches/refactor1/samples/portal-echo/src/main/webapp/WEB-INF/faces-config.xml	                        (rev 0)
+++ branches/refactor1/samples/portal-echo/src/main/webapp/WEB-INF/faces-config.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
+                              "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
+<faces-config>
+ <managed-bean>
+  <managed-bean-name>ajaxContext</managed-bean-name>
+  <managed-bean-class>org.ajax4jsf.portlet.PortletAjaxContext</managed-bean-class>
+  <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+  <managed-bean-name>bean</managed-bean-name>
+  <managed-bean-class>portal.Bean</managed-bean-class>
+  <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+ <navigation-rule>
+  <from-view-id>/jsf/start.xhtml</from-view-id>
+  <navigation-case>
+   <from-outcome>repeater</from-outcome>
+   <to-view-id>/jsf/repeater.xhtml</to-view-id>
+  </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+  <from-view-id>/jsf/repeater.xhtml</from-view-id>
+  <navigation-case>
+   <from-outcome>start</from-outcome>
+   <to-view-id>/jsf/start.xhtml</to-view-id>
+  </navigation-case>
+ </navigation-rule>
+ <application>
+  <view-handler>org.ajax4jsf.portlet.application.PortletViewHandler</view-handler>
+  <!-- 
+  <view-handler>com.sun.facelets.FaceletPortletViewHandler</view-handler>
+   -->
+ </application>
+  <render-kit>    
+    <renderer>
+      <description>
+        override the viewroot
+      </description>
+      <component-family>javax.faces.ViewRoot</component-family>
+      <renderer-type>javax.faces.ViewRoot</renderer-type>
+      <renderer-class>org.ajax4jsf.portlet.renderkit.portlet.PortletAjaxViewRootRenderer</renderer-class>
+    </renderer>
+  </render-kit>
+</faces-config>

Added: branches/refactor1/samples/portal-echo/src/main/webapp/WEB-INF/lib/jsf-facelets.jar
===================================================================
(Binary files differ)


Property changes on: branches/refactor1/samples/portal-echo/src/main/webapp/WEB-INF/lib/jsf-facelets.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: branches/refactor1/samples/portal-echo/src/main/webapp/WEB-INF/portlet-instances.xml
===================================================================
--- branches/refactor1/samples/portal-echo/src/main/webapp/WEB-INF/portlet-instances.xml	                        (rev 0)
+++ branches/refactor1/samples/portal-echo/src/main/webapp/WEB-INF/portlet-instances.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<deployments>
+	<deployment>
+		<instance>
+			<instance-id>AjaxPortletInstance</instance-id>
+			<portlet-ref>portal-echo</portlet-ref>
+		</instance>
+	</deployment>
+	<deployment>
+		<instance>
+			<instance-id>AjaxPortletSecondInstance</instance-id>
+			<portlet-ref>portal-echo</portlet-ref>
+		</instance>
+	</deployment>
+</deployments>

Added: branches/refactor1/samples/portal-echo/src/main/webapp/WEB-INF/portlet.xml
===================================================================
--- branches/refactor1/samples/portal-echo/src/main/webapp/WEB-INF/portlet.xml	                        (rev 0)
+++ branches/refactor1/samples/portal-echo/src/main/webapp/WEB-INF/portlet.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,34 @@
+<portlet-app version="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://java.sun.com/xml/ns/portlet"
+  xmlns="http://java.sun.com/xml/ns/portlet">
+  <portlet>
+    <portlet-name>portal-echo</portlet-name>
+      <portlet-class>org.ajax4jsf.portlet.AjaxFacesPortlet</portlet-class>
+      <init-param>
+        <name>default-view</name>
+        <value>/jsf/start.xhtml</value>
+      </init-param>
+      <!--
+      <init-param>
+        <name>default-edit</name>
+        <value>/jsf/start-edit.xhtml</value>
+      </init-param>
+      <init-param>
+        <name>default-help</name>
+        <value>/jsf/start-help.xhtml</value>
+      </init-param>
+      -->
+    <expiration-cache>0</expiration-cache>
+    <portlet-info>
+       <title>Portal Echo</title>
+    </portlet-info>
+    <supports>
+      <mime-type>text/html</mime-type>
+      <portlet-mode>VIEW</portlet-mode>
+      <!--
+      <portlet-mode>EDIT</portlet-mode>
+      <portlet-mode>HELP</portlet-mode>
+      -->
+    </supports>
+  </portlet>
+</portlet-app>

Added: branches/refactor1/samples/portal-echo/src/main/webapp/WEB-INF/web.xml
===================================================================
--- branches/refactor1/samples/portal-echo/src/main/webapp/WEB-INF/web.xml	                        (rev 0)
+++ branches/refactor1/samples/portal-echo/src/main/webapp/WEB-INF/web.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,107 @@
+<?xml version="1.0"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+	~ JBoss, a division of Red Hat                                              ~
+	~ Copyright 2006, Red Hat Middleware, LLC, and individual                   ~
+	~ contributors as indicated by the @authors tag. See the                    ~
+	~ copyright.txt in the distribution for a full listing of                   ~
+	~ individual contributors.                                                  ~
+	~                                                                           ~
+	~ This is free software; you can redistribute it and/or modify it           ~
+	~ under the terms of the GNU Lesser General Public License as               ~
+	~ published by the Free Software Foundation; either version 2.1 of          ~
+	~ the License, or (at your option) any later version.                       ~
+	~                                                                           ~
+	~ This software is distributed in the hope that it will be useful,          ~
+	~ but WITHOUT ANY WARRANTY; without even the implied warranty of            ~
+	~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU          ~
+	~ Lesser General Public License for more details.                           ~
+	~                                                                           ~
+	~ You should have received a copy of the GNU Lesser General Public          ~
+	~ License along with this software; if not, write to the Free               ~
+	~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA        ~
+	~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.                  ~
+	~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee  http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+ <context-param>
+  <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
+  <param-value>true</param-value>
+ </context-param>
+ <context-param>
+  <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
+  <param-value>false</param-value>
+ </context-param>
+ <context-param>
+  <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
+  <param-value>false</param-value>
+ </context-param>
+ <context-param>
+  <param-name>org.apache.myfaces.CHECK_EXTENSIONS_FILTER</param-name>
+  <param-value>false</param-value>
+ </context-param>
+ <context-param>
+  <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
+  <param-value>true</param-value>
+ </context-param>
+ <context-param>
+  <param-name>facelets.DEVELOPMENT</param-name>
+  <param-value>false</param-value>
+ </context-param>
+ <context-param>
+  <param-name>facelets.SKIP_COMMENTS</param-name>
+  <param-value>true</param-value>
+ </context-param>
+ <context-param>
+  <param-name>facelets.VIEW_MAPPINGS</param-name>
+  <param-value>*.xhtml</param-value>
+ </context-param>
+ <context-param>
+  <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
+  <param-value>org.ajax4jsf.portlet.application.FaceletPortletViewHandler</param-value>
+ </context-param>
+ <!-- 
+		<context-param>
+		<param-name>facelets.LIBRARIES</param-name>
+		<param-value>/WEB-INF/portal.taglib.xml</param-value>
+		</context-param>
+	-->
+ <context-param>
+  <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
+  <param-value>.xhtml</param-value>
+ </context-param>
+ <context-param>
+  <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+  <param-value>server</param-value>
+ </context-param>
+ <filter>
+  <display-name>Ajax4jsf Filter</display-name>
+  <filter-name>ajax4jsf</filter-name>
+  <filter-class>org.ajax4jsf.Filter</filter-class>
+ </filter>
+ <filter-mapping>
+  <filter-name>ajax4jsf</filter-name>
+  <servlet-name>FacesServlet</servlet-name>
+  <dispatcher>FORWARD</dispatcher>
+  <dispatcher>REQUEST</dispatcher>
+  <dispatcher>INCLUDE</dispatcher>
+ </filter-mapping>
+ <listener>
+  <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
+ </listener>
+ <servlet>
+  <servlet-name>FacesServlet</servlet-name>
+  <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+  <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+  <servlet-name>FacesServlet</servlet-name>
+  <url-pattern>/faces/*</url-pattern>
+ </servlet-mapping>
+ <mime-mapping>
+  <extension>svg</extension>
+  <mime-type>image/svg+xml</mime-type>
+ </mime-mapping>
+ <login-config>
+  <auth-method>BASIC</auth-method>
+ </login-config>
+</web-app>

Added: branches/refactor1/samples/portal-echo/src/main/webapp/jsf/common/editPreferences.xhtml
===================================================================
--- branches/refactor1/samples/portal-echo/src/main/webapp/jsf/common/editPreferences.xhtml	                        (rev 0)
+++ branches/refactor1/samples/portal-echo/src/main/webapp/jsf/common/editPreferences.xhtml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,98 @@
+<div
+      xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:ui="http://java.sun.com/jsf/facelets"
+      xmlns:h="http://java.sun.com/jsf/html"
+      xmlns:f="http://java.sun.com/jsf/core"
+      xmlns:c="http://java.sun.com/jstl/core">
+
+   <h:form>
+      <table width="100%">
+         <thead class="portlet-section-header" style="text-align:left;">
+            <tr>
+               <th>Key</th>
+               <th>Name</th>
+               <th>ReadOnly</th>
+               <c:if test="#{prefs.mutable}">
+                  <th>Value</th>
+               </c:if>
+            </tr>
+         </thead>
+         <tbody>
+            <c:forEach items="#{prefs.entries}" var="pref" varStatus="status">
+               <tr class="#{status.index % 2 == 0 ? 'portlet-section-body' : 'portlet-section-alternate'}">
+                  <td>
+                     <c:choose>
+                        <c:when test="#{prefs.mutable and pref.readOnly == false}">
+                           <h:commandLink
+                              rendered="#{pref.readOnly == false}"
+                              action="#{pref.select}">#{pref.name}</h:commandLink>
+                        </c:when>
+                        <c:otherwise>#{pref.name}</c:otherwise>
+                     </c:choose>
+                  </td>
+                  <td>
+                     <h:outputText value="#{pref.displayName}"/>
+                  </td>
+                  <td>
+                     <h:selectBooleanCheckbox disabled="true" value="#{pref.readOnly}"/>
+                  </td>
+                  <c:if test="#{prefs.mutable}">
+                     <td>
+                        <h:outputText value="#{pref.value}"/>
+                     </td>
+                  </c:if>
+               </tr>
+            </c:forEach>
+         </tbody>
+      </table>
+   </h:form>
+
+   <c:if test="#{prefs.selectedEntry != null}">
+      <h:form style="padding: 1em 0 1em 0">
+         <fieldset style="border: 1px solid;">
+            <legend>Edit existing values</legend>
+            <table>
+               <tbody>
+                  <c:forEach items="#{prefs.selectedEntry.indices}" var="index" varStatus="status">
+                     <tr>
+                        <td>
+                           <h:outputLabel for="row_#{status.index}">
+                              <h:outputText value="Value #{status.index}: " styleClass="portlet-form-field-label"/>
+                           </h:outputLabel>
+                        </td>
+                        <td>
+                           <h:inputText value="#{prefs.selectedEntry[index]}" styleClass="portlet-form-input-field"/>
+                        </td>
+                        <td>
+                           <h:commandButton
+                              id="row_#{status.index}"
+                              actionListener="#{prefs.selectedEntry.deleteLine}"
+                              value="Delete"
+                              styleClass="portlet-form-button"/>
+                        </td>
+                     </tr>
+                  </c:forEach>
+                  <tr>
+                     <td colspan="3">
+                        <h:commandButton value="Update" styleClass="portlet-form-button"/>
+                     </td>
+                  </tr>
+               </tbody>
+            </table>
+         </fieldset>
+      </h:form>
+
+      <h:form>
+         <fieldset style="border: 1px solid;">
+            <legend>Append a value</legend>
+            <h:outputLabel for="new_value">
+               <h:outputText value="New value: " styleClass="portlet-form-field-label"/>
+            </h:outputLabel>
+            <h:inputText id="new_value" value="#{prefs.selectedEntry.line}" styleClass="portlet-form-input-field"/>
+            <h:commandButton action="#{prefs.selectedEntry.appendLine}" value="Append" styleClass="portlet-form-button"/>
+         </fieldset>
+      </h:form>
+
+   </c:if>
+
+</div>

Added: branches/refactor1/samples/portal-echo/src/main/webapp/jsf/common/editSecurity.xhtml
===================================================================
--- branches/refactor1/samples/portal-echo/src/main/webapp/jsf/common/editSecurity.xhtml	                        (rev 0)
+++ branches/refactor1/samples/portal-echo/src/main/webapp/jsf/common/editSecurity.xhtml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,36 @@
+<div
+   xmlns="http://www.w3.org/1999/xhtml"
+   xmlns:ui="http://java.sun.com/jsf/facelets"
+   xmlns:h="http://java.sun.com/jsf/html"
+   xmlns:f="http://java.sun.com/jsf/core"
+   xmlns:c="http://java.sun.com/jstl/core">
+
+   <h:form>
+      <table>
+         <tbody>
+            <c:forEach items="#{auth.roles}" var="role" varStatus="status">
+               <tr>
+                  <td>
+                     <h:outputLabel for="cars_#{status.index}">
+                        <span class="portlet-form-field-label">Role <span>#{role == '__unchecked__' ? 'Unchecked' : (auth.roleDisplayNameMap[role] != null ? auth.roleDisplayNameMap[role] : role)}</span></span>:
+                     </h:outputLabel>
+                  </td>
+                  <td>
+                     <h:selectManyCheckbox
+                        id="cars_#{status.index}"
+                        styleClass="portlet-form-field"
+                        value="#{auth.forRole[role]}"
+                        layout="lineDirection">
+                        <f:selectItems value="#{auth.availableActions}"/>
+                     </h:selectManyCheckbox>
+                  </td>
+               </tr>
+            </c:forEach>
+         </tbody>
+      </table>
+      <div style="text-align:center;padding: 1em 0 1em 0">
+         <ui:insert name="form_submit"/>
+      </div>
+   </h:form>
+
+</div>
\ No newline at end of file

Added: branches/refactor1/samples/portal-echo/src/main/webapp/jsf/common/editTheme.xhtml
===================================================================
--- branches/refactor1/samples/portal-echo/src/main/webapp/jsf/common/editTheme.xhtml	                        (rev 0)
+++ branches/refactor1/samples/portal-echo/src/main/webapp/jsf/common/editTheme.xhtml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,51 @@
+<div
+      xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:ui="http://java.sun.com/jsf/facelets"
+      xmlns:h="http://java.sun.com/jsf/html"
+      xmlns:f="http://java.sun.com/jsf/core">
+      
+   <h:panelGroup styleClass="portlet-section-body" id="themepg">
+   <h:form id="themeform">
+      <fieldset style="border: 1px solid;">
+         <legend>Theme properties</legend>
+         <table>
+            <tbody>
+               <tr>
+                  <td class="portlet-form-field-label">
+                     <h:outputLabel for="layout">Layout:</h:outputLabel>
+                  </td>
+                  <td>
+                     <h:selectOneMenu id="layout" styleClass="portlet-form-field" value="#{themePropertyAction.layoutName}">
+                        <f:selectItems value="#{portalobjectmgr.themes.layoutNames}"/>
+                     </h:selectOneMenu>
+                  </td>
+               </tr>
+               <tr>
+                  <td class="portlet-form-field-label">
+                     <h:outputLabel for="theme">Theme:</h:outputLabel>
+                  </td>
+                  <td>
+                     <h:selectOneMenu id="theme" styleClass="portlet-form-field" value="#{themePropertyAction.themeName}">
+                        <f:selectItems value="#{portalobjectmgr.themes.themeNames}"/>
+                     </h:selectOneMenu>
+                  </td>
+               </tr>
+               <tr>
+                  <td class="portlet-form-field-label">
+                     <h:outputLabel for="renderSet">RenderSet:</h:outputLabel>
+                  </td>
+                  <td>
+                     <h:selectOneMenu id="renderSet" styleClass="portlet-form-field" value="#{themePropertyAction.renderSetName}">
+                        <f:selectItems value="#{portalobjectmgr.themes.renderSetNames}"/>
+                     </h:selectOneMenu>
+                  </td>
+               </tr>
+            </tbody>
+         </table>
+      </fieldset>
+      <div style="text-align:center;padding: 1em 0 1em 0">
+         <ui:insert name="form_submit"/>
+      </div>
+   </h:form>
+</h:panelGroup>
+</div>
\ No newline at end of file

Added: branches/refactor1/samples/portal-echo/src/main/webapp/jsf/common/showPortletDetails.xhtml
===================================================================
--- branches/refactor1/samples/portal-echo/src/main/webapp/jsf/common/showPortletDetails.xhtml	                        (rev 0)
+++ branches/refactor1/samples/portal-echo/src/main/webapp/jsf/common/showPortletDetails.xhtml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,18 @@
+<div
+      xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:ui="http://java.sun.com/jsf/facelets"
+      xmlns:h="http://java.sun.com/jsf/html"
+      xmlns:f="http://java.sun.com/jsf/core"
+      xmlns:c="http://java.sun.com/jstl/core">
+
+   <div><span class="portlet-form-field-label">Portlet name:</span> #{portlet.name.value}</div>
+   <div><span class="portlet-form-field-label">Portlet description:</span> #{portlet.description.value}</div>
+   <div><span class="portlet-form-field-label">Portlet title:</span> #{portlet.title.value}</div>
+   <div><span class="portlet-form-field-label">Portlet keywords:</span> #{portlet.keywords.value}</div>
+   <c:if test="#{not empty portlet.locales}">
+      <div><span class="portlet-form-field-label">Portlet locales:</span>
+         <c:forEach items="#{portlet.locales}" var="locale">  #{locale} </c:forEach>
+      </div>
+   </c:if>
+
+</div>
\ No newline at end of file

Added: branches/refactor1/samples/portal-echo/src/main/webapp/jsf/repeater.xhtml
===================================================================
--- branches/refactor1/samples/portal-echo/src/main/webapp/jsf/repeater.xhtml	                        (rev 0)
+++ branches/refactor1/samples/portal-echo/src/main/webapp/jsf/repeater.xhtml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,18 @@
+<a4j:portlet
+      xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:f="http://java.sun.com/jsf/core"
+      xmlns:ui="http://java.sun.com/jsf/facelets"
+      xmlns:h="http://java.sun.com/jsf/html"
+      xmlns:a4j="https://ajax4jsf.dev.java.net/ajax">
+
+	<h:form id="portlet_form">
+	    <h:panelGrid columns="2">
+	    
+	    <h:outputText id="text" value="Entered Text: #{bean.text}"/>
+	    <h:outputText id="counter" value="Result Counter: #{bean.counter}"/>
+	    <h:commandButton action="start" value="Return Back. Non-Ajax" />		
+	    <a4j:commandButton action="start" value="Return Back. Ajax" />		
+		</h:panelGrid>
+	</h:form>
+
+</a4j:portlet>
\ No newline at end of file

Added: branches/refactor1/samples/portal-echo/src/main/webapp/jsf/start.xhtml
===================================================================
--- branches/refactor1/samples/portal-echo/src/main/webapp/jsf/start.xhtml	                        (rev 0)
+++ branches/refactor1/samples/portal-echo/src/main/webapp/jsf/start.xhtml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,29 @@
+<a4j:portlet
+      xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:f="http://java.sun.com/jsf/core"
+      xmlns:ui="http://java.sun.com/jsf/facelets"
+      xmlns:h="http://java.sun.com/jsf/html"
+      xmlns:a4j="https://ajax4jsf.dev.java.net/ajax">
+
+	<h:form id="portlet_form">
+	    <a4j:outputPanel ajaxRendered="true">
+	    <h:message for="repeaterText"/>
+		</a4j:outputPanel>
+	    <h:panelGrid columns="2">
+	    <h:inputText value="#{bean.text}" id="repeaterText">
+	      <f:validateLength maximum="15" />
+	      <a4j:support event="onkeyup" reRender="text"/>
+	    </h:inputText>
+	    <a4j:outputPanel ajaxRendered="true">
+ 	      <h:outputText id="text" value="#{bean.text}"/>
+	    </a4j:outputPanel>
+		<a4j:commandLink value="Increment Counter" action="#{bean.click}" reRender="counter"/>
+	    <h:outputText id="counter" value="#{bean.counter}"/>
+	    <h:outputText  value="Portlet namespace:"/>
+	    <h:outputText  value="#{bean.namespace}"/>
+	    <h:commandButton action="repeater" value="Non-ajax Submit" />		
+	    <a4j:commandButton action="repeater" value="Ajax Submit" />		
+		</h:panelGrid>
+	</h:form>
+
+</a4j:portlet>

Added: branches/refactor1/samples/portal-echo/src/main/webapp/jsf/tabTemplate.xhtml
===================================================================
--- branches/refactor1/samples/portal-echo/src/main/webapp/jsf/tabTemplate.xhtml	                        (rev 0)
+++ branches/refactor1/samples/portal-echo/src/main/webapp/jsf/tabTemplate.xhtml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,19 @@
+<div xmlns="http://www.w3.org/1999/xhtml"
+     xmlns:h="http://java.sun.com/jsf/html"
+     xmlns:ui="http://java.sun.com/jsf/facelets">
+      
+   <h:form>
+      <ul class="topnav">
+         <li>
+            <h:commandLink value="Portal Objects" action="objects" actionListener="#{portalobjectmgr.selectRootObject}"/>
+         </li>
+         <li>
+            <h:commandLink value="Portlet Instances" action="instances"/>
+         </li>
+         <li>
+            <h:commandLink value="Portlet Definitions" action="portlets"/>
+         </li>
+      </ul>
+   </h:form>
+
+</div>

Added: branches/refactor1/samples/portal-echo/src/main/webapp/objects.xhtml.html
===================================================================

Copied: branches/refactor1/samples/richfaces-samples (from rev 1387, branches/refactor1/richfaces-samples)

Added: branches/refactor1/sandbox/api/pom.xml
===================================================================
--- branches/refactor1/sandbox/api/pom.xml	                        (rev 0)
+++ branches/refactor1/sandbox/api/pom.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,68 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<parent>
+		<artifactId>sandbox</artifactId>
+		<groupId>org.richfaces</groupId>
+		<version>3.1.0-SNAPSHOT</version>
+	</parent>
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>org.richfaces.sandbox</groupId>
+	<artifactId>api</artifactId>
+	<name>Java Server Faces AJAX framework API</name>
+	<properties>
+		<jsfVersion>1.1</jsfVersion>
+	</properties>
+	<dependencies>
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<version>3.8.1</version>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>com.sun.facelets</groupId>
+			<artifactId>jsf-facelets</artifactId>
+			<version>1.1.12</version>
+			<optional>true</optional>
+		</dependency>
+		<dependency>
+			<groupId>javax.el</groupId>
+			<artifactId>el-api</artifactId>
+			<version>1.0</version>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>commons-logging</groupId>
+			<artifactId>commons-logging</artifactId>
+			<version>1.0.4</version>
+		</dependency>
+		<dependency>
+			<groupId>commons-beanutils</groupId>
+			<artifactId>commons-beanutils</artifactId>
+			<version>1.7.0</version>
+		</dependency>
+		<dependency>
+			<groupId>commons-collections</groupId>
+			<artifactId>commons-collections</artifactId>
+			<version>3.2</version>
+		</dependency>
+		<dependency>
+			<groupId>javax.servlet</groupId>
+			<artifactId>servlet-api</artifactId>
+			<version>2.5</version>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>javax.servlet.jsp</groupId>
+			<artifactId>jsp-api</artifactId>
+			<version>2.1</version>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>javax.faces</groupId>
+			<artifactId>jsf-api</artifactId>
+			<version>1.2_03</version>
+		</dependency>
+	</dependencies>
+</project>
\ No newline at end of file

Copied: branches/refactor1/sandbox/samples (from rev 1387, branches/refactor1/sandbox-samples)

Copied: branches/refactor1/sandbox/ui/calendar (from rev 1387, branches/refactor1/sandbox/calendar)

Copied: branches/refactor1/sandbox/ui/panel2 (from rev 1387, branches/refactor1/sandbox/panel2)

Copied: branches/refactor1/sandbox/ui/panelmenu (from rev 1387, branches/refactor1/sandbox/panelmenu)

Copied: branches/refactor1/sandbox/ui/scrollable-grid (from rev 1387, branches/refactor1/sandbox/scrollable-grid)

Copied: branches/refactor1/sandbox/ui/simpleTogglePanel2 (from rev 1387, branches/refactor1/sandbox/simpleTogglePanel2)

Copied: branches/refactor1/ui (from rev 1387, branches/refactor1/richfaces)

Added: branches/refactor1/ui/core/pom.xml
===================================================================
--- branches/refactor1/ui/core/pom.xml	                        (rev 0)
+++ branches/refactor1/ui/core/pom.xml	2007-06-28 19:44:00 UTC (rev 1388)
@@ -0,0 +1,20 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<parent>
+		<artifactId>ui</artifactId>
+		<groupId>org.richfaces</groupId>
+		<version>3.1.0-SNAPSHOT</version>
+	</parent>
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>org.richfaces.ui</groupId>
+	<artifactId>core</artifactId>
+	<name>Java Server Faces AJAX framework</name>
+	<dependencies>
+		<dependency>
+			<groupId>org.richfaces.framework</groupId>
+			<artifactId>impl</artifactId>
+			<version>${project.version}</version>
+		</dependency>
+	</dependencies>
+</project>
\ No newline at end of file




More information about the richfaces-svn-commits mailing list